diff --git a/copilot/js/assets/agents/Plan.agent.md b/copilot/js/assets/agents/Plan.agent.md index d23282b3..25f907c3 100644 --- a/copilot/js/assets/agents/Plan.agent.md +++ b/copilot/js/assets/agents/Plan.agent.md @@ -2,7 +2,7 @@ name: Plan description: Researches and outlines multi-step plans argument-hint: Outline the goal or problem to research -x-github-copilot-invoke-policy: ["user", "model"] +x-github-copilot-invoke-policy: ["user"] tools: ['read_file', 'list_dir', 'semantic_search', 'grep_search', 'file_search', 'get_errors'] handoffs: - label: Start Implementation diff --git a/copilot/js/diffWorker.js b/copilot/js/diffWorker.js index 5e78adf9..5810d31c 100644 --- a/copilot/js/diffWorker.js +++ b/copilot/js/diffWorker.js @@ -40,4 +40,3 @@ ${f.join(` `).length>=15&&Mn(m,d=>d.length>=2)>=2}),u=qn(i,u),u}s(sn,"computeMovedLines");function Mn(i,e){let t=0;for(let n of i)e(n)&&t++;return t}s(Mn,"countWhere");function Un(i,e,t,n){let r=[],o=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new we(l.original,e,l)),u=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new we(l.modified,t,l))),a=new Set;for(let l of o){let c=-1,f;for(let m of u){let p=l.computeSimilarity(m);p>c&&(c=p,f=m)}if(c>.9&&f&&(u.delete(f),r.push(new H(l.range,f.range)),a.add(l.source),a.add(f.source)),!n.isValid())return{moves:r,excludedChanges:a}}return{moves:r,excludedChanges:a}}s(Un,"computeMovesFromSimpleDeletionsToSimpleInsertions");function kn(i,e,t,n,r,o){let u=[],a=new le;for(let p of i)for(let d=p.original.startLineNumber;dp.modified.startLineNumber,C));for(let p of i){let d=[];for(let g=p.modified.startLineNumber;g{for(let b of d)if(b.originalLineRange.endLineNumberExclusive+1===S.endLineNumberExclusive&&b.modifiedLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive){b.originalLineRange=new O(b.originalLineRange.startLineNumber,S.endLineNumberExclusive),b.modifiedLineRange=new O(b.modifiedLineRange.startLineNumber,w.endLineNumberExclusive),M.push(b);return}let P={modifiedLineRange:w,originalLineRange:S};l.push(P),M.push(P)}),d=M}if(!o.isValid())return[]}l.sort(St(Z(p=>p.modifiedLineRange.length,C)));let c=new re,f=new re;for(let p of l){let d=p.modifiedLineRange.startLineNumber-p.originalLineRange.startLineNumber,g=c.subtractFrom(p.modifiedLineRange),x=f.subtractFrom(p.originalLineRange).getWithDelta(d),w=g.getIntersection(x);for(let M of w.ranges){if(M.length<3)continue;let S=M,P=M.delta(-d);u.push(new H(P,S)),c.addRange(S),f.addRange(P)}}u.sort(Z(p=>p.original.startLineNumber,C));let m=new ve(i);for(let p=0;p_.original.startLineNumber<=d.original.startLineNumber),x=J(i,_=>_.modified.startLineNumber<=d.modified.startLineNumber),w=Math.max(d.original.startLineNumber-g.original.startLineNumber,d.modified.startLineNumber-x.modified.startLineNumber),M=m.findLastMonotonous(_=>_.original.startLineNumber_.modified.startLineNumbern.length||L>r.length||c.contains(L)||f.contains(_)||!rn(n[_-1],r[L-1],o))break}b>0&&(f.addRange(new O(d.original.startLineNumber-b,d.original.startLineNumber)),c.addRange(new O(d.modified.startLineNumber-b,d.modified.startLineNumber)));let T;for(T=0;Tn.length||L>r.length||c.contains(L)||f.contains(_)||!rn(n[_-1],r[L-1],o))break}T>0&&(f.addRange(new O(d.original.endLineNumberExclusive,d.original.endLineNumberExclusive+T)),c.addRange(new O(d.modified.endLineNumberExclusive,d.modified.endLineNumberExclusive+T))),(b>0||T>0)&&(u[p]=new H(new O(d.original.startLineNumber-b,d.original.endLineNumberExclusive+T),new O(d.modified.startLineNumber-b,d.modified.endLineNumberExclusive+T)))}return u}s(kn,"computeUnchangedMoves");function rn(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;let r=new he().compute(new ne([i],new y(1,1,1,i.length),!1),new ne([e],new y(1,1,1,e.length),!1),t),o=0,u=q.invert(r.diffs,i.length);for(let f of u)f.seq1Range.forEach(m=>{Ne(i.charCodeAt(m))||o++});function a(f){let m=0;for(let p=0;pe.length?i:e);return o/l>.6&&l>10}s(rn,"areLinesSimilar");function Pn(i){if(i.length===0)return i;i.sort(Z(t=>t.original.startLineNumber,C));let e=[i[0]];for(let t=1;t=0&&u>=0&&o+u<=2){e[e.length-1]=n.join(r);continue}e.push(r)}return e}s(Pn,"joinCloseConsecutiveMoves");function qn(i,e){let t=new ve(i);return e=e.filter(n=>{let r=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(c))}r.push(a)}return n.length>0&&r.push(n[n.length-1]),r}s(on,"joinSequenceDiffsByShifting");function Fn(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,o=t[n],u=n+1=n.start&&i.seq2Range.start-u>=r.start&&t.isStronglyEqual(i.seq2Range.start-u,i.seq2Range.endExclusive-u)&&u<100;)u++;u--;let a=0;for(;i.seq1Range.start+ac&&(c=g,l=f)}return i.delta(l)}s(un,"shiftDiffToBetterPosition");function an(i,e,t){let n=[];for(let r of t){let o=n[n.length-1];if(!o){n.push(r);continue}r.seq1Range.start-o.seq1Range.endExclusive<=2||r.seq2Range.start-o.seq2Range.endExclusive<=2?n[n.length-1]=new q(o.seq1Range.join(r.seq1Range),o.seq2Range.join(r.seq2Range)):n.push(r)}return n}s(an,"removeShortMatches");function Tt(i,e,t,n,r=!1){let o=q.invert(t,i.length),u=[],a=new Q(0,0);function l(f,m){if(f.offset10;){let S=o[0];if(!(S.seq1Range.intersects(g.seq1Range)||S.seq2Range.intersects(g.seq2Range)))break;let b=n(i,S.seq1Range.start),T=n(e,S.seq2Range.start),_=new q(b,T),L=_.intersect(S);if(w+=L.seq1Range.length,M+=L.seq2Range.length,g=g.join(_),g.seq1Range.endExclusive>=S.seq1Range.endExclusive)o.shift();else break}(r&&w+M0;){let f=o.shift();f.seq1Range.isEmpty||(l(f.getStarts(),f),l(f.getEndExclusives().delta(-1),f))}return Bn(t,u)}s(Tt,"extendDiffsToEntireWordIfAppropriate");function Bn(i,e){let t=[];for(;i.length>0||e.length>0;){let n=i[0],r=e[0],o;n&&(!r||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=o.seq1Range.start?t[t.length-1]=t[t.length-1].join(o):t.push(o)}return t}s(Bn,"mergeSequenceDiffs");function ln(i,e,t){let n=t;if(n.length===0)return n;let r=0,o;do{o=!1;let a=[n[0]];for(let l=1;l5||g.seq1Range.length+g.seq2Range.length>5)};var u=m;s(m,"shouldJoinDiffs");let c=n[l],f=a[a.length-1];m(f,c)?(o=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&o);return n}s(ln,"removeVeryShortMatchingLinesBetweenDiffs");function cn(i,e,t){let n=t;if(n.length===0)return n;let r=0,o;do{o=!1;let l=[n[0]];for(let c=1;c5||w.length>500)return!1;let S=i.getText(w).trim();if(S.length>20||S.split(/\r\n|\r|\n/).length>1)return!1;let P=i.countLinesIn(g.seq1Range),b=g.seq1Range.length,T=e.countLinesIn(g.seq2Range),_=g.seq2Range.length,L=i.countLinesIn(x.seq1Range),B=x.seq1Range.length,W=e.countLinesIn(x.seq2Range),Se=x.seq2Range.length,Ae=130;function _e(xt){return Math.min(xt,Ae)}return s(_e,"cap"),Math.pow(Math.pow(_e(P*40+b),1.5)+Math.pow(_e(T*40+_),1.5),1.5)+Math.pow(Math.pow(_e(L*40+B),1.5)+Math.pow(_e(W*40+Se),1.5),1.5)>(Ae**1.5)**1.5*1.3};var a=p;s(p,"shouldJoinDiffs");let f=n[c],m=l[l.length-1];p(m,f)?(o=!0,l[l.length-1]=l[l.length-1].join(f)):l.push(f)}n=l}while(r++<10&&o);let u=[];return wt(n,(l,c,f)=>{let m=c;function p(S){return S.length>0&&S.trim().length<=3&&c.seq1Range.length+c.seq2Range.length>100}s(p,"shouldMarkAsChanged");let d=i.extendToFullLines(c.seq1Range),g=i.getText(new A(d.start,c.seq1Range.start));p(g)&&(m=m.deltaStart(-g.length));let x=i.getText(new A(c.seq1Range.endExclusive,d.endExclusive));p(x)&&(m=m.deltaEnd(x.length));let w=q.fromOffsetPairs(l?l.getEndExclusives():Q.zero,f?f.getStarts():Q.max),M=m.intersect(w);u.length>0&&M.getStarts().equals(u[u.length-1].getEndExclusives())?u[u.length-1]=u[u.length-1].join(M):u.push(M)}),u}s(cn,"removeVeryShortMatchingTextBetweenLongDiffs");var De=class{constructor(e,t){this.trimmedHash=e;this.lines=t}static{s(this,"LineSequence")}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let t=e===0?0:fn(this.lines[e-1]),n=e===this.lines.length?0:fn(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` `)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function fn(i){let e=0;for(;eT===_))return new de([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new de([new ge(new O(1,e.length+1),new O(1,t.length+1),[new z(new y(1,1,e.length,e[e.length-1].length+1),new y(1,1,t.length,t[t.length-1].length+1))])],[],!1);let r=n.maxComputationTimeMs===0?te.instance:new je(n.maxComputationTimeMs),o=!n.ignoreTrimWhitespace,u=new Map;function a(T){let _=u.get(T);return _===void 0&&(_=u.size,u.set(T,_)),_}s(a,"getOrCreateHash");let l=e.map(T=>a(T.trim())),c=t.map(T=>a(T.trim())),f=new De(l,e),m=new De(c,t),p=f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,r,(T,_)=>e[T]===t[_]?t[_].length===0?.1:1+Math.log(1+t[_].length):.99):this.myersDiffingAlgorithm.compute(f,m,r),d=p.diffs,g=p.hitTimeout;d=ht(f,m,d),d=ln(f,m,d);let x=[],w=s(T=>{if(o)for(let _=0;_T.seq1Range.start-M===T.seq2Range.start-S);let _=T.seq1Range.start-M;w(_),M=T.seq1Range.endExclusive,S=T.seq2Range.endExclusive;let L=this.refineDiff(e,t,T,r,o,n);L.hitTimeout&&(g=!0);for(let B of L.mappings)x.push(B)}w(e.length-M);let P=pt(x,new se(e),new se(t)),b=[];return n.computeMoves&&(b=this.computeMoves(P,e,t,l,c,r,o,n)),ie(()=>{function T(L,B){if(L.lineNumber<1||L.lineNumber>B.length)return!1;let W=B[L.lineNumber-1];return!(L.column<1||L.column>W.length+1)}s(T,"validatePosition");function _(L,B){return!(L.startLineNumber<1||L.startLineNumber>B.length+1||L.endLineNumberExclusive<1||L.endLineNumberExclusive>B.length+1)}s(_,"validateRange");for(let L of P){if(!L.innerChanges)return!1;for(let B of L.innerChanges)if(!(T(B.modifiedRange.getStartPosition(),t)&&T(B.modifiedRange.getEndPosition(),t)&&T(B.originalRange.getStartPosition(),e)&&T(B.originalRange.getEndPosition(),e)))return!1;if(!_(L.modified,t)||!_(L.original,e))return!1}return!0}),new de(P,b,g)}computeMoves(e,t,n,r,o,u,a,l){return sn(e,t,n,r,o,u).map(m=>{let p=this.refineDiff(t,n,new q(m.original.toOffsetRange(),m.modified.toOffsetRange()),u,a,l),d=pt(p.mappings,new se(t),new se(n),!0);return new ze(m,d)})}refineDiff(e,t,n,r,o,u){let l=Vn(n).toRangeMapping2(e,t),c=new ne(e,l.originalRange,o),f=new ne(t,l.modifiedRange,o),m=c.length+f.length<500?this.dynamicProgrammingDiffing.compute(c,f,r):this.myersDiffingAlgorithm.compute(c,f,r),p=!1,d=m.diffs;p&&q.assertSorted(d),d=ht(c,f,d),p&&q.assertSorted(d),d=Tt(c,f,d,(x,w)=>x.findWordContaining(w)),p&&q.assertSorted(d),u.extendToSubwords&&(d=Tt(c,f,d,(x,w)=>x.findSubWordContaining(w),!0),p&&q.assertSorted(d)),d=an(c,f,d),p&&q.assertSorted(d),d=cn(c,f,d),p&&q.assertSorted(d);let g=d.map(x=>new z(c.translateRange(x.seq1Range),f.translateRange(x.seq2Range)));return p&&z.assertSorted(g),{mappings:g,hitTimeout:m.hitTimeout}}};function Vn(i){return new H(new O(i.seq1Range.start+1,i.seq1Range.endExclusive+1),new O(i.seq2Range.start+1,i.seq2Range.endExclusive+1))}s(Vn,"toLineRangeMapping");async function Kn(i,e,t){return mn(i,e,t)}s(Kn,"computeDiff");function mn(i,e,t){let n=i.split(/\r\n|\r|\n/),r=e.split(/\r\n|\r|\n/),u=new He().computeDiff(n,r,t),a=u.changes.length>0?!1:i===e;function l(c){return c.map(f=>[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,f.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return s(l,"getLineChanges"),{identical:a,quitEarly:u.hitTimeout,changes:l(u.changes),moves:u.moves.map(c=>[c.lineRangeMapping.original.startLineNumber,c.lineRangeMapping.original.endLineNumberExclusive,c.lineRangeMapping.modified.startLineNumber,c.lineRangeMapping.modified.endLineNumberExclusive,l(c.changes)])}}s(mn,"computeDiffSync");function zn(){let i=dn.parentPort;if(!i)throw new Error("This module should only be used in a worker thread.");i.on("message",async({id:e,fn:t,args:n})=>{try{let r=await _t[t](...n);i.postMessage({id:e,res:r})}catch(r){i.postMessage({id:e,err:r})}})}s(zn,"main");zn(); //!!! DO NOT modify, this file was COPIED from 'microsoft/vscode' -//# sourceMappingURL=diffWorker.js.map diff --git a/copilot/js/main.js b/copilot/js/main.js index fe5d38af..8bfc509c 100644 --- a/copilot/js/main.js +++ b/copilot/js/main.js @@ -1,79 +1,79 @@ -"use strict";var h1i=Object.create;var Ape=Object.defineProperty;var m1i=Object.getOwnPropertyDescriptor;var g1i=Object.getOwnPropertyNames;var A1i=Object.getPrototypeOf,y1i=Object.prototype.hasOwnProperty;var e1r=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),t1r=t=>{throw TypeError(t)};var a=(t,e)=>Ape(t,"name",{value:e,configurable:!0});var Pe=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ri=(t,e)=>{for(var r in e)Ape(t,r,{get:e[r],enumerable:!0})},r1r=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of g1i(e))!y1i.call(t,o)&&o!==r&&Ape(t,o,{get:()=>e[o],enumerable:!(n=m1i(e,o))||n.enumerable});return t};var de=(t,e,r)=>(r=t!=null?h1i(A1i(t)):{},r1r(e||!t||!t.__esModule?Ape(r,"default",{value:t,enumerable:!0}):r,t)),ba=t=>r1r(Ape({},"__esModule",{value:!0}),t);var Hht=(t,e,r)=>{if(e!=null){typeof e!="object"&&typeof e!="function"&&t1r("Object expected");var n,o;r&&(n=e[e1r("asyncDispose")]),n===void 0&&(n=e[e1r("dispose")],r&&(o=n)),typeof n!="function"&&t1r("Object not disposable"),o&&(n=function(){try{o.call(this)}catch(s){return Promise.reject(s)}}),t.push([r,n,e])}else r&&t.push([r]);return e},jht=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(c,l,u,d){return d=Error(u),d.name="SuppressedError",d.error=c,d.suppressed=l,d},o=c=>e=r?new n(c,e,"An error was suppressed during disposal"):(r=!0,c),s=c=>{for(;c=t.pop();)try{var l=c[1]&&c[1].call(c[2]);if(c[0])return Promise.resolve(l).then(s,u=>(o(u),s()))}catch(u){o(u)}if(r)throw e};return s()};var importMetaUrlShim,f=Pe(()=>{"use strict";importMetaUrlShim=typeof document>"u"?require("node:url").pathToFileURL(__filename).href:importMetaUrlShim});var i1r=T($ht=>{f();var n1r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");$ht.encode=function(t){if(0<=t&&t{f();var o1r=i1r(),Vht=5,s1r=1<>1;return e?-r:r}a(C1i,"fromVLQSigned");Wht.encode=a(function(e){var r="",n,o=E1i(e);do n=o&a1r,o>>>=Vht,o>0&&(n|=c1r),r+=o1r.encode(n);while(o>0);return r},"base64VLQ_encode");Wht.decode=a(function(e,r,n){var o=e.length,s=0,c=0,l,u;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(u=o1r.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));l=!!(u&c1r),u&=a1r,s=s+(u<{f();function _1i(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}a(_1i,"getArg");Ag.getArg=_1i;var l1r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,v1i=/^data:.+\,.+$/;function ype(t){var e=t.match(l1r);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}a(ype,"urlParse");Ag.urlParse=ype;function UX(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}a(UX,"urlGenerate");Ag.urlGenerate=UX;function Yht(t){var e=t,r=ype(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ag.isAbsolute(e),o=e.split(/\/+/),s,c=0,l=o.length-1;l>=0;l--)s=o[l],s==="."?o.splice(l,1):s===".."?c++:c>0&&(s===""?(o.splice(l+1,c),c=0):(o.splice(l,2),c--));return e=o.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,UX(r)):e}a(Yht,"normalize");Ag.normalize=Yht;function u1r(t,e){t===""&&(t="."),e===""&&(e=".");var r=ype(e),n=ype(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),UX(r);if(r||e.match(v1i))return e;if(n&&!n.host&&!n.path)return n.host=e,UX(n);var o=e.charAt(0)==="/"?e:Yht(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=o,UX(n)):o}a(u1r,"join");Ag.join=u1r;Ag.isAbsolute=function(t){return t.charAt(0)==="/"||l1r.test(t)};function b1i(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}a(b1i,"relative");Ag.relative=b1i;var d1r=(function(){var t=Object.create(null);return!("__proto__"in t)})();function f1r(t){return t}a(f1r,"identity");function T1i(t){return p1r(t)?"$"+t:t}a(T1i,"toSetString");Ag.toSetString=d1r?f1r:T1i;function S1i(t){return p1r(t)?t.slice(1):t}a(S1i,"fromSetString");Ag.fromSetString=d1r?f1r:S1i;function p1r(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}a(p1r,"isProtoString");function I1i(t,e,r){var n=QX(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:QX(t.name,e.name)}a(I1i,"compareByOriginalPositions");Ag.compareByOriginalPositions=I1i;function x1i(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=QX(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:QX(t.name,e.name)}a(x1i,"compareByGeneratedPositionsDeflated");Ag.compareByGeneratedPositionsDeflated=x1i;function QX(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}a(QX,"strcmp");function w1i(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=QX(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:QX(t.name,e.name)}a(w1i,"compareByGeneratedPositionsInflated");Ag.compareByGeneratedPositionsInflated=w1i;function R1i(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}a(R1i,"parseSourceMapInput");Ag.parseSourceMapInput=R1i;function P1i(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=ype(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}e=u1r(UX(n),e)}return Yht(e)}a(P1i,"computeSourceURL");Ag.computeSourceURL=P1i});var Xht=T(h1r=>{f();var Kht=qX(),Jht=Object.prototype.hasOwnProperty,kq=typeof Map<"u";function T5(){this._array=[],this._set=kq?new Map:Object.create(null)}a(T5,"ArraySet");T5.fromArray=a(function(e,r){for(var n=new T5,o=0,s=e.length;o=0)return r}else{var n=Kht.toSetString(e);if(Jht.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},"ArraySet_indexOf");T5.prototype.at=a(function(e){if(e>=0&&e{f();var m1r=qX();function k1i(t,e){var r=t.generatedLine,n=e.generatedLine,o=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=o||m1r.compareByGeneratedPositionsInflated(t,e)<=0}a(k1i,"generatedPositionAfter");function gNe(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}a(gNe,"MappingList");gNe.prototype.unsortedForEach=a(function(e,r){this._array.forEach(e,r)},"MappingList_forEach");gNe.prototype.add=a(function(e){k1i(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},"MappingList_add");gNe.prototype.toArray=a(function(){return this._sorted||(this._array.sort(m1r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");g1r.MappingList=gNe});var Zht=T(y1r=>{f();var Epe=zht(),$f=qX(),ANe=Xht().ArraySet,N1i=A1r().MappingList;function Rb(t){t||(t={}),this._file=$f.getArg(t,"file",null),this._sourceRoot=$f.getArg(t,"sourceRoot",null),this._skipValidation=$f.getArg(t,"skipValidation",!1),this._sources=new ANe,this._names=new ANe,this._mappings=new N1i,this._sourcesContents=null}a(Rb,"SourceMapGenerator");Rb.prototype._version=3;Rb.fromSourceMap=a(function(e){var r=e.sourceRoot,n=new Rb({file:e.file,sourceRoot:r});return e.eachMapping(function(o){var s={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(s.source=o.source,r!=null&&(s.source=$f.relative(r,s.source)),s.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(s.name=o.name)),n.addMapping(s)}),e.sources.forEach(function(o){var s=o;r!==null&&(s=$f.relative(r,o)),n._sources.has(s)||n._sources.add(s);var c=e.sourceContentFor(o);c!=null&&n.setSourceContent(o,c)}),n},"SourceMapGenerator_fromSourceMap");Rb.prototype.addMapping=a(function(e){var r=$f.getArg(e,"generated"),n=$f.getArg(e,"original",null),o=$f.getArg(e,"source",null),s=$f.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,o,s),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:s})},"SourceMapGenerator_addMapping");Rb.prototype.setSourceContent=a(function(e,r){var n=e;this._sourceRoot!=null&&(n=$f.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[$f.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[$f.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");Rb.prototype.applySourceMap=a(function(e,r,n){var o=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=e.file}var s=this._sourceRoot;s!=null&&(o=$f.relative(s,o));var c=new ANe,l=new ANe;this._mappings.unsortedForEach(function(u){if(u.source===o&&u.originalLine!=null){var d=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});d.source!=null&&(u.source=d.source,n!=null&&(u.source=$f.join(n,u.source)),s!=null&&(u.source=$f.relative(s,u.source)),u.originalLine=d.line,u.originalColumn=d.column,d.name!=null&&(u.name=d.name))}var p=u.source;p!=null&&!c.has(p)&&c.add(p);var h=u.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=c,this._names=l,e.sources.forEach(function(u){var d=e.sourceContentFor(u);d!=null&&(n!=null&&(u=$f.join(n,u)),s!=null&&(u=$f.relative(s,u)),this.setSourceContent(u,d))},this)},"SourceMapGenerator_applySourceMap");Rb.prototype._validateMapping=a(function(e,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!o)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:o}))}},"SourceMapGenerator_validateMapping");Rb.prototype._serializeMappings=a(function(){for(var e=0,r=1,n=0,o=0,s=0,c=0,l="",u,d,p,h,m=this._mappings.toArray(),g=0,A=m.length;g0){if(!$f.compareByGeneratedPositionsInflated(d,m[g-1]))continue;u+=","}u+=Epe.encode(d.generatedColumn-e),e=d.generatedColumn,d.source!=null&&(h=this._sources.indexOf(d.source),u+=Epe.encode(h-c),c=h,u+=Epe.encode(d.originalLine-1-o),o=d.originalLine-1,u+=Epe.encode(d.originalColumn-n),n=d.originalColumn,d.name!=null&&(p=this._names.indexOf(d.name),u+=Epe.encode(p-s),s=p)),l+=u}return l},"SourceMapGenerator_serializeMappings");Rb.prototype._generateSourcesContent=a(function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=$f.relative(r,n));var o=$f.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)},"SourceMapGenerator_generateSourcesContent");Rb.prototype.toJSON=a(function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},"SourceMapGenerator_toJSON");Rb.prototype.toString=a(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");y1r.SourceMapGenerator=Rb});var E1r=T(Nq=>{f();Nq.GREATEST_LOWER_BOUND=1;Nq.LEAST_UPPER_BOUND=2;function emt(t,e,r,n,o,s){var c=Math.floor((e-t)/2)+t,l=o(r,n[c],!0);return l===0?c:l>0?e-c>1?emt(c,e,r,n,o,s):s==Nq.LEAST_UPPER_BOUND?e1?emt(t,c,r,n,o,s):s==Nq.LEAST_UPPER_BOUND?c:t<0?-1:t}a(emt,"recursiveSearch");Nq.search=a(function(e,r,n,o){if(r.length===0)return-1;var s=emt(-1,r.length,e,r,n,o||Nq.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s},"search")});var _1r=T(C1r=>{f();function tmt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}a(tmt,"swap");function D1i(t,e){return Math.round(t+Math.random()*(e-t))}a(D1i,"randomIntInRange");function rmt(t,e,r,n){if(r{f();var yn=qX(),nmt=E1r(),GX=Xht().ArraySet,M1i=zht(),Cpe=_1r().quickSort;function Rl(t,e){var r=t;return typeof t=="string"&&(r=yn.parseSourceMapInput(t)),r.sections!=null?new OI(r,e):new em(r,e)}a(Rl,"SourceMapConsumer");Rl.fromSourceMap=function(t,e){return em.fromSourceMap(t,e)};Rl.prototype._version=3;Rl.prototype.__generatedMappings=null;Object.defineProperty(Rl.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:a(function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings},"get")});Rl.prototype.__originalMappings=null;Object.defineProperty(Rl.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:a(function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings},"get")});Rl.prototype._charIsMappingSeparator=a(function(e,r){var n=e.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Rl.prototype._parseMappings=a(function(e,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Rl.GENERATED_ORDER=1;Rl.ORIGINAL_ORDER=2;Rl.GREATEST_LOWER_BOUND=1;Rl.LEAST_UPPER_BOUND=2;Rl.prototype.eachMapping=a(function(e,r,n){var o=r||null,s=n||Rl.GENERATED_ORDER,c;switch(s){case Rl.GENERATED_ORDER:c=this._generatedMappings;break;case Rl.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;c.map(function(u){var d=u.source===null?null:this._sources.at(u.source);return d=yn.computeSourceURL(l,d,this._sourceMapURL),{source:d,generatedLine:u.generatedLine,generatedColumn:u.generatedColumn,originalLine:u.originalLine,originalColumn:u.originalColumn,name:u.name===null?null:this._names.at(u.name)}},this).forEach(e,o)},"SourceMapConsumer_eachMapping");Rl.prototype.allGeneratedPositionsFor=a(function(e){var r=yn.getArg(e,"line"),n={source:yn.getArg(e,"source"),originalLine:r,originalColumn:yn.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",yn.compareByOriginalPositions,nmt.LEAST_UPPER_BOUND);if(s>=0){var c=this._originalMappings[s];if(e.column===void 0)for(var l=c.originalLine;c&&c.originalLine===l;)o.push({line:yn.getArg(c,"generatedLine",null),column:yn.getArg(c,"generatedColumn",null),lastColumn:yn.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++s];else for(var u=c.originalColumn;c&&c.originalLine===r&&c.originalColumn==u;)o.push({line:yn.getArg(c,"generatedLine",null),column:yn.getArg(c,"generatedColumn",null),lastColumn:yn.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++s]}return o},"SourceMapConsumer_allGeneratedPositionsFor");yNe.SourceMapConsumer=Rl;function em(t,e){var r=t;typeof t=="string"&&(r=yn.parseSourceMapInput(t));var n=yn.getArg(r,"version"),o=yn.getArg(r,"sources"),s=yn.getArg(r,"names",[]),c=yn.getArg(r,"sourceRoot",null),l=yn.getArg(r,"sourcesContent",null),u=yn.getArg(r,"mappings"),d=yn.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);c&&(c=yn.normalize(c)),o=o.map(String).map(yn.normalize).map(function(p){return c&&yn.isAbsolute(c)&&yn.isAbsolute(p)?yn.relative(c,p):p}),this._names=GX.fromArray(s.map(String),!0),this._sources=GX.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return yn.computeSourceURL(c,p,e)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=e,this.file=d}a(em,"BasicSourceMapConsumer");em.prototype=Object.create(Rl.prototype);em.prototype.consumer=Rl;em.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=yn.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r1&&(y.source=l+_[1],l+=_[1],y.originalLine=s+_[2],s=y.originalLine,y.originalLine+=1,y.originalColumn=c+_[3],c=y.originalColumn,_.length>4&&(y.name=u+_[4],u+=_[4])),A.push(y),typeof y.originalLine=="number"&&g.push(y)}Cpe(A,yn.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,Cpe(g,yn.compareByOriginalPositions),this.__originalMappings=g},"SourceMapConsumer_parseMappings");em.prototype._findMapping=a(function(e,r,n,o,s,c){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[o]);return nmt.search(e,r,s,c)},"SourceMapConsumer_findMapping");em.prototype.computeColumnSpans=a(function(){for(var e=0;e=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var s=yn.getArg(o,"source",null);s!==null&&(s=this._sources.at(s),s=yn.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var c=yn.getArg(o,"name",null);return c!==null&&(c=this._names.at(c)),{source:s,line:yn.getArg(o,"originalLine",null),column:yn.getArg(o,"originalColumn",null),name:c}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");em.prototype.hasContentsOfAllSources=a(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");em.prototype.sourceContentFor=a(function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o=e;this.sourceRoot!=null&&(o=yn.relative(this.sourceRoot,o));var s;if(this.sourceRoot!=null&&(s=yn.urlParse(this.sourceRoot))){var c=o.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!s.path||s.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')},"SourceMapConsumer_sourceContentFor");em.prototype.generatedPositionFor=a(function(e){var r=yn.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:yn.getArg(e,"line"),originalColumn:yn.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",yn.compareByOriginalPositions,yn.getArg(e,"bias",Rl.GREATEST_LOWER_BOUND));if(o>=0){var s=this._originalMappings[o];if(s.source===n.source)return{line:yn.getArg(s,"generatedLine",null),column:yn.getArg(s,"generatedColumn",null),lastColumn:yn.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");yNe.BasicSourceMapConsumer=em;function OI(t,e){var r=t;typeof t=="string"&&(r=yn.parseSourceMapInput(t));var n=yn.getArg(r,"version"),o=yn.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new GX,this._names=new GX;var s={line:-1,column:0};this._sections=o.map(function(c){if(c.url)throw new Error("Support for url field in sections not implemented.");var l=yn.getArg(c,"offset"),u=yn.getArg(l,"line"),d=yn.getArg(l,"column");if(u{f();var O1i=Zht().SourceMapGenerator,ENe=qX(),B1i=/(\r?\n)/,L1i=10,HX="$$$isSourceNode$$$";function Q_(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=o??null,this[HX]=!0,n!=null&&this.add(n)}a(Q_,"SourceNode");Q_.fromStringWithSourceMap=a(function(e,r,n){var o=new Q_,s=e.split(B1i),c=0,l=a(function(){var m=A(),g=A()||"";return m+g;function A(){return c=0;r--)this.prepend(e[r]);else if(e[HX]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},"SourceNode_prepend");Q_.prototype.walk=a(function(e){for(var r,n=0,o=this.children.length;n0){for(r=[],n=0;n{f();CNe.SourceMapGenerator=Zht().SourceMapGenerator;CNe.SourceMapConsumer=b1r().SourceMapConsumer;CNe.SourceNode=S1r().SourceNode});var w1r=T((Q7a,x1r)=>{f();var F1i=Object.prototype.toString,imt=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function U1i(t){return F1i.call(t).slice(8,-1)==="ArrayBuffer"}a(U1i,"isArrayBuffer");function Q1i(t,e,r){e>>>=0;var n=t.byteLength-e;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return imt?Buffer.from(t.slice(e,e+r)):new Buffer(new Uint8Array(t.slice(e,e+r)))}a(Q1i,"fromArrayBuffer");function q1i(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Buffer.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');return imt?Buffer.from(t,e):new Buffer(t,e)}a(q1i,"fromString");function G1i(t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return U1i(t)?Q1i(t,e,r):typeof t=="string"?q1i(t,e):imt?Buffer.from(t):new Buffer(t)}a(G1i,"bufferFrom");x1r.exports=G1i});var B1r=T((Mq,cmt)=>{f();var H1i=I1r().SourceMapConsumer,omt=require("path"),M2;try{M2=require("fs"),(!M2.existsSync||!M2.readFileSync)&&(M2=null)}catch{}var j1i=w1r();function R1r(t,e){return t.require(e)}a(R1r,"dynamicRequire");var P1r=!1,k1r=!1,smt=!1,_pe="auto",Dq={},vpe={},$1i=/^data:application\/json[^,]+base64,/,nL=[],iL=[];function lmt(){return _pe==="browser"?!0:_pe==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}a(lmt,"isInBrowser");function V1i(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}a(V1i,"hasGlobalProcessEventEmitter");function W1i(){return typeof process=="object"&&process!==null?process.version:""}a(W1i,"globalProcessVersion");function z1i(){if(typeof process=="object"&&process!==null)return process.stderr}a(z1i,"globalProcessStderr");function Y1i(t){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(t)}a(Y1i,"globalProcessExit");function _Ne(t){return function(e){for(var r=0;r";var r=this.getLineNumber();if(r!=null){e+=":"+r;var n=this.getColumnNumber();n&&(e+=":"+n)}}var o="",s=this.getFunctionName(),c=!0,l=this.isConstructor(),u=!(this.isToplevel()||l);if(u){var d=this.getTypeName();d==="[object Object]"&&(d="null");var p=this.getMethodName();s?(d&&s.indexOf(d)!=0&&(o+=d+"."),o+=s,p&&s.indexOf("."+p)!=s.length-p.length-1&&(o+=" [as "+p+"]")):o+=d+"."+(p||"")}else l?o+="new "+(s||""):s?o+=s:(o+=e,c=!1);return c&&(o+=" ("+e+")"),o}a(J1i,"CallSiteToString");function N1r(t){var e={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(function(r){e[r]=/^(?:is|get)/.test(r)?function(){return t[r].call(t)}:t[r]}),e.toString=J1i,e}a(N1r,"cloneCallSite");function M1r(t,e){if(e===void 0&&(e={nextPosition:null,curPosition:null}),t.isNative())return e.curPosition=null,t;var r=t.getFileName()||t.getScriptNameOrSourceURL();if(r){var n=t.getLineNumber(),o=t.getColumnNumber()-1,s=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,c=s.test(W1i())?0:62;n===1&&o>c&&!lmt()&&!t.isEval()&&(o-=c);var l=fmt({source:r,line:n,column:o});e.curPosition=l,t=N1r(t);var u=t.getFunctionName;return t.getFunctionName=function(){return e.nextPosition==null?u():e.nextPosition.name||u()},t.getFileName=function(){return l.source},t.getLineNumber=function(){return l.line},t.getColumnNumber=function(){return l.column+1},t.getScriptNameOrSourceURL=function(){return l.source},t}var d=t.isEval()&&t.getEvalOrigin();return d&&(d=D1r(d),t=N1r(t),t.getEvalOrigin=function(){return d}),t}a(M1r,"wrapCallSite");function X1i(t,e){smt&&(Dq={},vpe={});for(var r=t.name||"Error",n=t.message||"",o=r+": "+n,s={nextPosition:null,curPosition:null},c=[],l=e.length-1;l>=0;l--)c.push(` - at `+M1r(e[l],s)),s.nextPosition=s.curPosition;return s.curPosition=s.nextPosition=null,o+c.reverse().join("")}a(X1i,"prepareStackTrace");function O1r(t){var e=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(t.stack);if(e){var r=e[1],n=+e[2],o=+e[3],s=Dq[r];if(!s&&M2&&M2.existsSync(r))try{s=M2.readFileSync(r,"utf8")}catch{s=""}if(s){var c=s.split(/(?:\r\n|\r|\n)/)[n-1];if(c)return r+":"+n+` +"use strict";var hvi=Object.create;var k0e=Object.defineProperty;var mvi=Object.getOwnPropertyDescriptor;var gvi=Object.getOwnPropertyNames;var Avi=Object.getPrototypeOf,yvi=Object.prototype.hasOwnProperty;var E1r=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),_1r=t=>{throw TypeError(t)};var a=(t,e)=>k0e(t,"name",{value:e,configurable:!0});var Pe=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ui=(t,e)=>{for(var r in e)k0e(t,r,{get:e[r],enumerable:!0})},C1r=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of gvi(e))!yvi.call(t,o)&&o!==r&&k0e(t,o,{get:()=>e[o],enumerable:!(n=mvi(e,o))||n.enumerable});return t};var de=(t,e,r)=>(r=t!=null?hvi(Avi(t)):{},C1r(e||!t||!t.__esModule?k0e(r,"default",{value:t,enumerable:!0}):r,t)),Aa=t=>C1r(k0e({},"__esModule",{value:!0}),t);var Jpt=(t,e,r)=>{if(e!=null){typeof e!="object"&&typeof e!="function"&&_1r("Object expected");var n,o;r&&(n=e[E1r("asyncDispose")]),n===void 0&&(n=e[E1r("dispose")],r&&(o=n)),typeof n!="function"&&_1r("Object not disposable"),o&&(n=function(){try{o.call(this)}catch(s){return Promise.reject(s)}}),t.push([r,n,e])}else r&&t.push([r]);return e},Xpt=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(c,l,u,d){return d=Error(u),d.name="SuppressedError",d.error=c,d.suppressed=l,d},o=c=>e=r?new n(c,e,"An error was suppressed during disposal"):(r=!0,c),s=c=>{for(;c=t.pop();)try{var l=c[1]&&c[1].call(c[2]);if(c[0])return Promise.resolve(l).then(s,u=>(o(u),s()))}catch(u){o(u)}if(r)throw e};return s()};var importMetaUrlShim,f=Pe(()=>{"use strict";importMetaUrlShim=typeof document>"u"?require("node:url").pathToFileURL(__filename).href:importMetaUrlShim});var b1r=T(Zpt=>{f();var v1r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Zpt.encode=function(t){if(0<=t&&t{f();var T1r=b1r(),eht=5,S1r=1<>1;return e?-r:r}a(_vi,"fromVLQSigned");tht.encode=a(function(e){var r="",n,o=Evi(e);do n=o&I1r,o>>>=eht,o>0&&(n|=x1r),r+=T1r.encode(n);while(o>0);return r},"base64VLQ_encode");tht.decode=a(function(e,r,n){var o=e.length,s=0,c=0,l,u;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(u=T1r.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));l=!!(u&x1r),u&=I1r,s=s+(u<{f();function Cvi(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}a(Cvi,"getArg");ag.getArg=Cvi;var w1r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,vvi=/^data:.+\,.+$/;function D0e(t){var e=t.match(w1r);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}a(D0e,"urlParse");ag.urlParse=D0e;function VJ(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}a(VJ,"urlGenerate");ag.urlGenerate=VJ;function nht(t){var e=t,r=D0e(t);if(r){if(!r.path)return t;e=r.path}for(var n=ag.isAbsolute(e),o=e.split(/\/+/),s,c=0,l=o.length-1;l>=0;l--)s=o[l],s==="."?o.splice(l,1):s===".."?c++:c>0&&(s===""?(o.splice(l+1,c),c=0):(o.splice(l,2),c--));return e=o.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,VJ(r)):e}a(nht,"normalize");ag.normalize=nht;function R1r(t,e){t===""&&(t="."),e===""&&(e=".");var r=D0e(e),n=D0e(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),VJ(r);if(r||e.match(vvi))return e;if(n&&!n.host&&!n.path)return n.host=e,VJ(n);var o=e.charAt(0)==="/"?e:nht(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=o,VJ(n)):o}a(R1r,"join");ag.join=R1r;ag.isAbsolute=function(t){return t.charAt(0)==="/"||w1r.test(t)};function bvi(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}a(bvi,"relative");ag.relative=bvi;var P1r=(function(){var t=Object.create(null);return!("__proto__"in t)})();function k1r(t){return t}a(k1r,"identity");function Tvi(t){return D1r(t)?"$"+t:t}a(Tvi,"toSetString");ag.toSetString=P1r?k1r:Tvi;function Svi(t){return D1r(t)?t.slice(1):t}a(Svi,"fromSetString");ag.fromSetString=P1r?k1r:Svi;function D1r(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}a(D1r,"isProtoString");function Ivi(t,e,r){var n=WJ(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:WJ(t.name,e.name)}a(Ivi,"compareByOriginalPositions");ag.compareByOriginalPositions=Ivi;function xvi(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=WJ(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:WJ(t.name,e.name)}a(xvi,"compareByGeneratedPositionsDeflated");ag.compareByGeneratedPositionsDeflated=xvi;function WJ(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}a(WJ,"strcmp");function wvi(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=WJ(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:WJ(t.name,e.name)}a(wvi,"compareByGeneratedPositionsInflated");ag.compareByGeneratedPositionsInflated=wvi;function Rvi(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}a(Rvi,"parseSourceMapInput");ag.parseSourceMapInput=Rvi;function Pvi(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=D0e(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}e=R1r(VJ(n),e)}return nht(e)}a(Pvi,"computeSourceURL");ag.computeSourceURL=Pvi});var sht=T(N1r=>{f();var iht=zJ(),oht=Object.prototype.hasOwnProperty,iq=typeof Map<"u";function fN(){this._array=[],this._set=iq?new Map:Object.create(null)}a(fN,"ArraySet");fN.fromArray=a(function(e,r){for(var n=new fN,o=0,s=e.length;o=0)return r}else{var n=iht.toSetString(e);if(oht.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},"ArraySet_indexOf");fN.prototype.at=a(function(e){if(e>=0&&e{f();var M1r=zJ();function kvi(t,e){var r=t.generatedLine,n=e.generatedLine,o=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=o||M1r.compareByGeneratedPositionsInflated(t,e)<=0}a(kvi,"generatedPositionAfter");function pke(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}a(pke,"MappingList");pke.prototype.unsortedForEach=a(function(e,r){this._array.forEach(e,r)},"MappingList_forEach");pke.prototype.add=a(function(e){kvi(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},"MappingList_add");pke.prototype.toArray=a(function(){return this._sorted||(this._array.sort(M1r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");O1r.MappingList=pke});var aht=T(L1r=>{f();var N0e=rht(),Ff=zJ(),hke=sht().ArraySet,Dvi=B1r().MappingList;function gb(t){t||(t={}),this._file=Ff.getArg(t,"file",null),this._sourceRoot=Ff.getArg(t,"sourceRoot",null),this._skipValidation=Ff.getArg(t,"skipValidation",!1),this._sources=new hke,this._names=new hke,this._mappings=new Dvi,this._sourcesContents=null}a(gb,"SourceMapGenerator");gb.prototype._version=3;gb.fromSourceMap=a(function(e){var r=e.sourceRoot,n=new gb({file:e.file,sourceRoot:r});return e.eachMapping(function(o){var s={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(s.source=o.source,r!=null&&(s.source=Ff.relative(r,s.source)),s.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(s.name=o.name)),n.addMapping(s)}),e.sources.forEach(function(o){var s=o;r!==null&&(s=Ff.relative(r,o)),n._sources.has(s)||n._sources.add(s);var c=e.sourceContentFor(o);c!=null&&n.setSourceContent(o,c)}),n},"SourceMapGenerator_fromSourceMap");gb.prototype.addMapping=a(function(e){var r=Ff.getArg(e,"generated"),n=Ff.getArg(e,"original",null),o=Ff.getArg(e,"source",null),s=Ff.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,o,s),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:s})},"SourceMapGenerator_addMapping");gb.prototype.setSourceContent=a(function(e,r){var n=e;this._sourceRoot!=null&&(n=Ff.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ff.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ff.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");gb.prototype.applySourceMap=a(function(e,r,n){var o=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=e.file}var s=this._sourceRoot;s!=null&&(o=Ff.relative(s,o));var c=new hke,l=new hke;this._mappings.unsortedForEach(function(u){if(u.source===o&&u.originalLine!=null){var d=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});d.source!=null&&(u.source=d.source,n!=null&&(u.source=Ff.join(n,u.source)),s!=null&&(u.source=Ff.relative(s,u.source)),u.originalLine=d.line,u.originalColumn=d.column,d.name!=null&&(u.name=d.name))}var p=u.source;p!=null&&!c.has(p)&&c.add(p);var h=u.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=c,this._names=l,e.sources.forEach(function(u){var d=e.sourceContentFor(u);d!=null&&(n!=null&&(u=Ff.join(n,u)),s!=null&&(u=Ff.relative(s,u)),this.setSourceContent(u,d))},this)},"SourceMapGenerator_applySourceMap");gb.prototype._validateMapping=a(function(e,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!o)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:o}))}},"SourceMapGenerator_validateMapping");gb.prototype._serializeMappings=a(function(){for(var e=0,r=1,n=0,o=0,s=0,c=0,l="",u,d,p,h,m=this._mappings.toArray(),g=0,A=m.length;g0){if(!Ff.compareByGeneratedPositionsInflated(d,m[g-1]))continue;u+=","}u+=N0e.encode(d.generatedColumn-e),e=d.generatedColumn,d.source!=null&&(h=this._sources.indexOf(d.source),u+=N0e.encode(h-c),c=h,u+=N0e.encode(d.originalLine-1-o),o=d.originalLine-1,u+=N0e.encode(d.originalColumn-n),n=d.originalColumn,d.name!=null&&(p=this._names.indexOf(d.name),u+=N0e.encode(p-s),s=p)),l+=u}return l},"SourceMapGenerator_serializeMappings");gb.prototype._generateSourcesContent=a(function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ff.relative(r,n));var o=Ff.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)},"SourceMapGenerator_generateSourcesContent");gb.prototype.toJSON=a(function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},"SourceMapGenerator_toJSON");gb.prototype.toString=a(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");L1r.SourceMapGenerator=gb});var F1r=T(oq=>{f();oq.GREATEST_LOWER_BOUND=1;oq.LEAST_UPPER_BOUND=2;function cht(t,e,r,n,o,s){var c=Math.floor((e-t)/2)+t,l=o(r,n[c],!0);return l===0?c:l>0?e-c>1?cht(c,e,r,n,o,s):s==oq.LEAST_UPPER_BOUND?e1?cht(t,c,r,n,o,s):s==oq.LEAST_UPPER_BOUND?c:t<0?-1:t}a(cht,"recursiveSearch");oq.search=a(function(e,r,n,o){if(r.length===0)return-1;var s=cht(-1,r.length,e,r,n,o||oq.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s},"search")});var Q1r=T(U1r=>{f();function lht(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}a(lht,"swap");function Nvi(t,e){return Math.round(t+Math.random()*(e-t))}a(Nvi,"randomIntInRange");function uht(t,e,r,n){if(r{f();var yn=zJ(),dht=F1r(),YJ=sht().ArraySet,Mvi=rht(),M0e=Q1r().quickSort;function vl(t,e){var r=t;return typeof t=="string"&&(r=yn.parseSourceMapInput(t)),r.sections!=null?new bI(r,e):new Wh(r,e)}a(vl,"SourceMapConsumer");vl.fromSourceMap=function(t,e){return Wh.fromSourceMap(t,e)};vl.prototype._version=3;vl.prototype.__generatedMappings=null;Object.defineProperty(vl.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:a(function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings},"get")});vl.prototype.__originalMappings=null;Object.defineProperty(vl.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:a(function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings},"get")});vl.prototype._charIsMappingSeparator=a(function(e,r){var n=e.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");vl.prototype._parseMappings=a(function(e,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");vl.GENERATED_ORDER=1;vl.ORIGINAL_ORDER=2;vl.GREATEST_LOWER_BOUND=1;vl.LEAST_UPPER_BOUND=2;vl.prototype.eachMapping=a(function(e,r,n){var o=r||null,s=n||vl.GENERATED_ORDER,c;switch(s){case vl.GENERATED_ORDER:c=this._generatedMappings;break;case vl.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;c.map(function(u){var d=u.source===null?null:this._sources.at(u.source);return d=yn.computeSourceURL(l,d,this._sourceMapURL),{source:d,generatedLine:u.generatedLine,generatedColumn:u.generatedColumn,originalLine:u.originalLine,originalColumn:u.originalColumn,name:u.name===null?null:this._names.at(u.name)}},this).forEach(e,o)},"SourceMapConsumer_eachMapping");vl.prototype.allGeneratedPositionsFor=a(function(e){var r=yn.getArg(e,"line"),n={source:yn.getArg(e,"source"),originalLine:r,originalColumn:yn.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",yn.compareByOriginalPositions,dht.LEAST_UPPER_BOUND);if(s>=0){var c=this._originalMappings[s];if(e.column===void 0)for(var l=c.originalLine;c&&c.originalLine===l;)o.push({line:yn.getArg(c,"generatedLine",null),column:yn.getArg(c,"generatedColumn",null),lastColumn:yn.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++s];else for(var u=c.originalColumn;c&&c.originalLine===r&&c.originalColumn==u;)o.push({line:yn.getArg(c,"generatedLine",null),column:yn.getArg(c,"generatedColumn",null),lastColumn:yn.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++s]}return o},"SourceMapConsumer_allGeneratedPositionsFor");mke.SourceMapConsumer=vl;function Wh(t,e){var r=t;typeof t=="string"&&(r=yn.parseSourceMapInput(t));var n=yn.getArg(r,"version"),o=yn.getArg(r,"sources"),s=yn.getArg(r,"names",[]),c=yn.getArg(r,"sourceRoot",null),l=yn.getArg(r,"sourcesContent",null),u=yn.getArg(r,"mappings"),d=yn.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);c&&(c=yn.normalize(c)),o=o.map(String).map(yn.normalize).map(function(p){return c&&yn.isAbsolute(c)&&yn.isAbsolute(p)?yn.relative(c,p):p}),this._names=YJ.fromArray(s.map(String),!0),this._sources=YJ.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return yn.computeSourceURL(c,p,e)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=e,this.file=d}a(Wh,"BasicSourceMapConsumer");Wh.prototype=Object.create(vl.prototype);Wh.prototype.consumer=vl;Wh.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=yn.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r1&&(y.source=l+_[1],l+=_[1],y.originalLine=s+_[2],s=y.originalLine,y.originalLine+=1,y.originalColumn=c+_[3],c=y.originalColumn,_.length>4&&(y.name=u+_[4],u+=_[4])),A.push(y),typeof y.originalLine=="number"&&g.push(y)}M0e(A,yn.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,M0e(g,yn.compareByOriginalPositions),this.__originalMappings=g},"SourceMapConsumer_parseMappings");Wh.prototype._findMapping=a(function(e,r,n,o,s,c){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[o]);return dht.search(e,r,s,c)},"SourceMapConsumer_findMapping");Wh.prototype.computeColumnSpans=a(function(){for(var e=0;e=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var s=yn.getArg(o,"source",null);s!==null&&(s=this._sources.at(s),s=yn.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var c=yn.getArg(o,"name",null);return c!==null&&(c=this._names.at(c)),{source:s,line:yn.getArg(o,"originalLine",null),column:yn.getArg(o,"originalColumn",null),name:c}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");Wh.prototype.hasContentsOfAllSources=a(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");Wh.prototype.sourceContentFor=a(function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o=e;this.sourceRoot!=null&&(o=yn.relative(this.sourceRoot,o));var s;if(this.sourceRoot!=null&&(s=yn.urlParse(this.sourceRoot))){var c=o.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!s.path||s.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')},"SourceMapConsumer_sourceContentFor");Wh.prototype.generatedPositionFor=a(function(e){var r=yn.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:yn.getArg(e,"line"),originalColumn:yn.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",yn.compareByOriginalPositions,yn.getArg(e,"bias",vl.GREATEST_LOWER_BOUND));if(o>=0){var s=this._originalMappings[o];if(s.source===n.source)return{line:yn.getArg(s,"generatedLine",null),column:yn.getArg(s,"generatedColumn",null),lastColumn:yn.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");mke.BasicSourceMapConsumer=Wh;function bI(t,e){var r=t;typeof t=="string"&&(r=yn.parseSourceMapInput(t));var n=yn.getArg(r,"version"),o=yn.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new YJ,this._names=new YJ;var s={line:-1,column:0};this._sections=o.map(function(c){if(c.url)throw new Error("Support for url field in sections not implemented.");var l=yn.getArg(c,"offset"),u=yn.getArg(l,"line"),d=yn.getArg(l,"column");if(u{f();var Ovi=aht().SourceMapGenerator,gke=zJ(),Bvi=/(\r?\n)/,Lvi=10,KJ="$$$isSourceNode$$$";function wC(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=o??null,this[KJ]=!0,n!=null&&this.add(n)}a(wC,"SourceNode");wC.fromStringWithSourceMap=a(function(e,r,n){var o=new wC,s=e.split(Bvi),c=0,l=a(function(){var m=A(),g=A()||"";return m+g;function A(){return c=0;r--)this.prepend(e[r]);else if(e[KJ]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},"SourceNode_prepend");wC.prototype.walk=a(function(e){for(var r,n=0,o=this.children.length;n0){for(r=[],n=0;n{f();Ake.SourceMapGenerator=aht().SourceMapGenerator;Ake.SourceMapConsumer=G1r().SourceMapConsumer;Ake.SourceNode=j1r().SourceNode});var W1r=T((HQa,V1r)=>{f();var Fvi=Object.prototype.toString,fht=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function Uvi(t){return Fvi.call(t).slice(8,-1)==="ArrayBuffer"}a(Uvi,"isArrayBuffer");function Qvi(t,e,r){e>>>=0;var n=t.byteLength-e;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return fht?Buffer.from(t.slice(e,e+r)):new Buffer(new Uint8Array(t.slice(e,e+r)))}a(Qvi,"fromArrayBuffer");function qvi(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Buffer.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');return fht?Buffer.from(t,e):new Buffer(t,e)}a(qvi,"fromString");function Gvi(t,e,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return Uvi(t)?Qvi(t,e,r):typeof t=="string"?qvi(t,e):fht?Buffer.from(t):new Buffer(t)}a(Gvi,"bufferFrom");V1r.exports=Gvi});var tvr=T((aq,ght)=>{f();var Hvi=$1r().SourceMapConsumer,pht=require("path"),b2;try{b2=require("fs"),(!b2.existsSync||!b2.readFileSync)&&(b2=null)}catch{}var jvi=W1r();function z1r(t,e){return t.require(e)}a(z1r,"dynamicRequire");var Y1r=!1,K1r=!1,hht=!1,O0e="auto",sq={},B0e={},$vi=/^data:application\/json[^,]+base64,/,U3=[],Q3=[];function Aht(){return O0e==="browser"?!0:O0e==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}a(Aht,"isInBrowser");function Vvi(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}a(Vvi,"hasGlobalProcessEventEmitter");function Wvi(){return typeof process=="object"&&process!==null?process.version:""}a(Wvi,"globalProcessVersion");function zvi(){if(typeof process=="object"&&process!==null)return process.stderr}a(zvi,"globalProcessStderr");function Yvi(t){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(t)}a(Yvi,"globalProcessExit");function yke(t){return function(e){for(var r=0;r";var r=this.getLineNumber();if(r!=null){e+=":"+r;var n=this.getColumnNumber();n&&(e+=":"+n)}}var o="",s=this.getFunctionName(),c=!0,l=this.isConstructor(),u=!(this.isToplevel()||l);if(u){var d=this.getTypeName();d==="[object Object]"&&(d="null");var p=this.getMethodName();s?(d&&s.indexOf(d)!=0&&(o+=d+"."),o+=s,p&&s.indexOf("."+p)!=s.length-p.length-1&&(o+=" [as "+p+"]")):o+=d+"."+(p||"")}else l?o+="new "+(s||""):s?o+=s:(o+=e,c=!1);return c&&(o+=" ("+e+")"),o}a(Jvi,"CallSiteToString");function J1r(t){var e={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(function(r){e[r]=/^(?:is|get)/.test(r)?function(){return t[r].call(t)}:t[r]}),e.toString=Jvi,e}a(J1r,"cloneCallSite");function Z1r(t,e){if(e===void 0&&(e={nextPosition:null,curPosition:null}),t.isNative())return e.curPosition=null,t;var r=t.getFileName()||t.getScriptNameOrSourceURL();if(r){var n=t.getLineNumber(),o=t.getColumnNumber()-1,s=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,c=s.test(Wvi())?0:62;n===1&&o>c&&!Aht()&&!t.isEval()&&(o-=c);var l=_ht({source:r,line:n,column:o});e.curPosition=l,t=J1r(t);var u=t.getFunctionName;return t.getFunctionName=function(){return e.nextPosition==null?u():e.nextPosition.name||u()},t.getFileName=function(){return l.source},t.getLineNumber=function(){return l.line},t.getColumnNumber=function(){return l.column+1},t.getScriptNameOrSourceURL=function(){return l.source},t}var d=t.isEval()&&t.getEvalOrigin();return d&&(d=X1r(d),t=J1r(t),t.getEvalOrigin=function(){return d}),t}a(Z1r,"wrapCallSite");function Xvi(t,e){hht&&(sq={},B0e={});for(var r=t.name||"Error",n=t.message||"",o=r+": "+n,s={nextPosition:null,curPosition:null},c=[],l=e.length-1;l>=0;l--)c.push(` + at `+Z1r(e[l],s)),s.nextPosition=s.curPosition;return s.curPosition=s.nextPosition=null,o+c.reverse().join("")}a(Xvi,"prepareStackTrace");function evr(t){var e=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(t.stack);if(e){var r=e[1],n=+e[2],o=+e[3],s=sq[r];if(!s&&b2&&b2.existsSync(r))try{s=b2.readFileSync(r,"utf8")}catch{s=""}if(s){var c=s.split(/(?:\r\n|\r|\n)/)[n-1];if(c)return r+":"+n+` `+c+` -`+new Array(o).join(" ")+"^"}}return null}a(O1r,"getErrorSource");function Z1i(t){var e=O1r(t),r=z1i();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),e&&(console.error(),console.error(e)),console.error(t.stack),Y1i(1)}a(Z1i,"printErrorAndExit");function evi(){var t=process.emit;process.emit=function(e){if(e==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(r&&!n)return Z1i(arguments[1])}return t.apply(this,arguments)}}a(evi,"shimEmitUncaughtException");var tvi=nL.slice(0),rvi=iL.slice(0);Mq.wrapCallSite=M1r;Mq.getErrorSource=O1r;Mq.mapSourcePosition=fmt;Mq.retrieveSourceMap=dmt;Mq.install=function(t){if(t=t||{},t.environment&&(_pe=t.environment,["node","browser","auto"].indexOf(_pe)===-1))throw new Error("environment "+_pe+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(nL.length=0),nL.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(iL.length=0),iL.unshift(t.retrieveSourceMap)),t.hookRequire&&!lmt()){var e=R1r(cmt,"module"),r=e.prototype._compile;r.__sourceMapSupport||(e.prototype._compile=function(s,c){return Dq[c]=s,vpe[c]=void 0,r.call(this,s,c)},e.prototype._compile.__sourceMapSupport=!0)}if(smt||(smt="emptyCacheBetweenOperations"in t?t.emptyCacheBetweenOperations:!1),P1r||(P1r=!0,Error.prepareStackTrace=X1i),!k1r){var n="handleUncaughtExceptions"in t?t.handleUncaughtExceptions:!0;try{var o=R1r(cmt,"worker_threads");o.isMainThread===!1&&(n=!1)}catch{}n&&V1i()&&(k1r=!0,evi())}};Mq.resetRetrieveHandlers=function(){nL.length=0,iL.length=0,nL=tvi.slice(0),iL=rvi.slice(0),dmt=_Ne(iL),umt=_Ne(nL)}});var Es=T((SNe,U1r)=>{f();(function(t,e){typeof SNe=="object"?U1r.exports=SNe=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(SNe,function(){var t=t||(function(e,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof require=="function")try{n=require("crypto")}catch{}var o=a(function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},"cryptoSecureRandomInt"),s=Object.create||(function(){function _(){}return a(_,"F"),function(v){var b;return _.prototype=v,b=new _,_.prototype=null,b}})(),c={},l=c.lib={},u=l.Base=(function(){return{extend:a(function(_){var v=s(this);return _&&v.mixIn(_),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},"extend"),create:a(function(){var _=this.extend();return _.init.apply(_,arguments),_},"create"),init:a(function(){},"init"),mixIn:a(function(_){for(var v in _)_.hasOwnProperty(v)&&(this[v]=_[v]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},"mixIn"),clone:a(function(){return this.init.prototype.extend(this)},"clone")}})(),d=l.WordArray=u.extend({init:a(function(_,v){_=this.words=_||[],v!=r?this.sigBytes=v:this.sigBytes=_.length*4},"init"),toString:a(function(_){return(_||h).stringify(this)},"toString"),concat:a(function(_){var v=this.words,b=_.words,I=this.sigBytes,x=_.sigBytes;if(this.clamp(),I%4)for(var R=0;R>>2]>>>24-R%4*8&255;v[I+R>>>2]|=w<<24-(I+R)%4*8}else for(var P=0;P>>2]=b[P>>>2];return this.sigBytes+=x,this},"concat"),clamp:a(function(){var _=this.words,v=this.sigBytes;_[v>>>2]&=4294967295<<32-v%4*8,_.length=e.ceil(v/4)},"clamp"),clone:a(function(){var _=u.clone.call(this);return _.words=this.words.slice(0),_},"clone"),random:a(function(_){for(var v=[],b=0;b<_;b+=4)v.push(o());return new d.init(v,_)},"random")}),p=c.enc={},h=p.Hex={stringify:a(function(_){for(var v=_.words,b=_.sigBytes,I=[],x=0;x>>2]>>>24-x%4*8&255;I.push((R>>>4).toString(16)),I.push((R&15).toString(16))}return I.join("")},"stringify"),parse:a(function(_){for(var v=_.length,b=[],I=0;I>>3]|=parseInt(_.substr(I,2),16)<<24-I%8*4;return new d.init(b,v/2)},"parse")},m=p.Latin1={stringify:a(function(_){for(var v=_.words,b=_.sigBytes,I=[],x=0;x>>2]>>>24-x%4*8&255;I.push(String.fromCharCode(R))}return I.join("")},"stringify"),parse:a(function(_){for(var v=_.length,b=[],I=0;I>>2]|=(_.charCodeAt(I)&255)<<24-I%4*8;return new d.init(b,v)},"parse")},g=p.Utf8={stringify:a(function(_){try{return decodeURIComponent(escape(m.stringify(_)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:a(function(_){return m.parse(unescape(encodeURIComponent(_)))},"parse")},A=l.BufferedBlockAlgorithm=u.extend({reset:a(function(){this._data=new d.init,this._nDataBytes=0},"reset"),_append:a(function(_){typeof _=="string"&&(_=g.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},"_append"),_process:a(function(_){var v,b=this._data,I=b.words,x=b.sigBytes,R=this.blockSize,w=R*4,P=x/w;_?P=e.ceil(P):P=e.max((P|0)-this._minBufferSize,0);var k=P*R,Q=e.min(k*4,x);if(k){for(var M=0;M{f();(function(t,e){typeof INe=="object"?Q1r.exports=INe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(INe,function(t){return(function(e){var r=t,n=r.lib,o=n.Base,s=n.WordArray,c=r.x64={},l=c.Word=o.extend({init:a(function(d,p){this.high=d,this.low=p},"init")}),u=c.WordArray=o.extend({init:a(function(d,p){d=this.words=d||[],p!=e?this.sigBytes=p:this.sigBytes=d.length*8},"init"),toX32:a(function(){for(var d=this.words,p=d.length,h=[],m=0;m{f();(function(t,e){typeof xNe=="object"?q1r.exports=xNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(xNe,function(t){return(function(){if(typeof ArrayBuffer=="function"){var e=t,r=e.lib,n=r.WordArray,o=n.init,s=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var l=c.byteLength,u=[],d=0;d>>2]|=c[d]<<24-d%4*8;o.call(this,u,l)}else o.apply(this,arguments)};s.prototype=n}})(),t.lib.WordArray})});var j1r=T((wNe,H1r)=>{f();(function(t,e){typeof wNe=="object"?H1r.exports=wNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(wNe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Utf16=o.Utf16BE={stringify:a(function(l){for(var u=l.words,d=l.sigBytes,p=[],h=0;h>>2]>>>16-h%4*8&65535;p.push(String.fromCharCode(m))}return p.join("")},"stringify"),parse:a(function(l){for(var u=l.length,d=[],p=0;p>>1]|=l.charCodeAt(p)<<16-p%2*16;return n.create(d,u*2)},"parse")};o.Utf16LE={stringify:a(function(l){for(var u=l.words,d=l.sigBytes,p=[],h=0;h>>2]>>>16-h%4*8&65535);p.push(String.fromCharCode(m))}return p.join("")},"stringify"),parse:a(function(l){for(var u=l.length,d=[],p=0;p>>1]|=c(l.charCodeAt(p)<<16-p%2*16);return n.create(d,u*2)},"parse")};function c(l){return l<<8&4278255360|l>>>8&16711935}a(c,"swapEndian")})(),t.enc.Utf16})});var oL=T((RNe,$1r)=>{f();(function(t,e){typeof RNe=="object"?$1r.exports=RNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(RNe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Base64={stringify:a(function(l){var u=l.words,d=l.sigBytes,p=this._map;l.clamp();for(var h=[],m=0;m>>2]>>>24-m%4*8&255,A=u[m+1>>>2]>>>24-(m+1)%4*8&255,y=u[m+2>>>2]>>>24-(m+2)%4*8&255,E=g<<16|A<<8|y,_=0;_<4&&m+_*.75>>6*(3-_)&63));var v=p.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},"stringify"),parse:a(function(l){var u=l.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h>>6-m%4*2,y=g|A;p[h>>>2]|=y<<24-h%4*8,h++}return n.create(p,h)}a(c,"parseLoop")})(),t.enc.Base64})});var W1r=T((PNe,V1r)=>{f();(function(t,e){typeof PNe=="object"?V1r.exports=PNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(PNe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Base64url={stringify:a(function(l,u){u===void 0&&(u=!0);var d=l.words,p=l.sigBytes,h=u?this._safe_map:this._map;l.clamp();for(var m=[],g=0;g>>2]>>>24-g%4*8&255,y=d[g+1>>>2]>>>24-(g+1)%4*8&255,E=d[g+2>>>2]>>>24-(g+2)%4*8&255,_=A<<16|y<<8|E,v=0;v<4&&g+v*.75>>6*(3-v)&63));var b=h.charAt(64);if(b)for(;m.length%4;)m.push(b);return m.join("")},"stringify"),parse:a(function(l,u){u===void 0&&(u=!0);var d=l.length,p=u?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var m=0;m>>6-m%4*2,y=g|A;p[h>>>2]|=y<<24-h%4*8,h++}return n.create(p,h)}a(c,"parseLoop")})(),t.enc.Base64url})});var sL=T((kNe,z1r)=>{f();(function(t,e){typeof kNe=="object"?z1r.exports=kNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(kNe,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=[];(function(){for(var g=0;g<64;g++)l[g]=e.abs(e.sin(g+1))*4294967296|0})();var u=c.MD5=s.extend({_doReset:a(function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},"_doReset"),_doProcessBlock:a(function(g,A){for(var y=0;y<16;y++){var E=A+y,_=g[E];g[E]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var v=this._hash.words,b=g[A+0],I=g[A+1],x=g[A+2],R=g[A+3],w=g[A+4],P=g[A+5],k=g[A+6],Q=g[A+7],M=g[A+8],D=g[A+9],G=g[A+10],O=g[A+11],N=g[A+12],F=g[A+13],U=g[A+14],L=g[A+15],H=v[0],$=v[1],W=v[2],j=v[3];H=d(H,$,W,j,b,7,l[0]),j=d(j,H,$,W,I,12,l[1]),W=d(W,j,H,$,x,17,l[2]),$=d($,W,j,H,R,22,l[3]),H=d(H,$,W,j,w,7,l[4]),j=d(j,H,$,W,P,12,l[5]),W=d(W,j,H,$,k,17,l[6]),$=d($,W,j,H,Q,22,l[7]),H=d(H,$,W,j,M,7,l[8]),j=d(j,H,$,W,D,12,l[9]),W=d(W,j,H,$,G,17,l[10]),$=d($,W,j,H,O,22,l[11]),H=d(H,$,W,j,N,7,l[12]),j=d(j,H,$,W,F,12,l[13]),W=d(W,j,H,$,U,17,l[14]),$=d($,W,j,H,L,22,l[15]),H=p(H,$,W,j,I,5,l[16]),j=p(j,H,$,W,k,9,l[17]),W=p(W,j,H,$,O,14,l[18]),$=p($,W,j,H,b,20,l[19]),H=p(H,$,W,j,P,5,l[20]),j=p(j,H,$,W,G,9,l[21]),W=p(W,j,H,$,L,14,l[22]),$=p($,W,j,H,w,20,l[23]),H=p(H,$,W,j,D,5,l[24]),j=p(j,H,$,W,U,9,l[25]),W=p(W,j,H,$,R,14,l[26]),$=p($,W,j,H,M,20,l[27]),H=p(H,$,W,j,F,5,l[28]),j=p(j,H,$,W,x,9,l[29]),W=p(W,j,H,$,Q,14,l[30]),$=p($,W,j,H,N,20,l[31]),H=h(H,$,W,j,P,4,l[32]),j=h(j,H,$,W,M,11,l[33]),W=h(W,j,H,$,O,16,l[34]),$=h($,W,j,H,U,23,l[35]),H=h(H,$,W,j,I,4,l[36]),j=h(j,H,$,W,w,11,l[37]),W=h(W,j,H,$,Q,16,l[38]),$=h($,W,j,H,G,23,l[39]),H=h(H,$,W,j,F,4,l[40]),j=h(j,H,$,W,b,11,l[41]),W=h(W,j,H,$,R,16,l[42]),$=h($,W,j,H,k,23,l[43]),H=h(H,$,W,j,D,4,l[44]),j=h(j,H,$,W,N,11,l[45]),W=h(W,j,H,$,L,16,l[46]),$=h($,W,j,H,x,23,l[47]),H=m(H,$,W,j,b,6,l[48]),j=m(j,H,$,W,Q,10,l[49]),W=m(W,j,H,$,U,15,l[50]),$=m($,W,j,H,P,21,l[51]),H=m(H,$,W,j,N,6,l[52]),j=m(j,H,$,W,R,10,l[53]),W=m(W,j,H,$,G,15,l[54]),$=m($,W,j,H,I,21,l[55]),H=m(H,$,W,j,M,6,l[56]),j=m(j,H,$,W,L,10,l[57]),W=m(W,j,H,$,k,15,l[58]),$=m($,W,j,H,F,21,l[59]),H=m(H,$,W,j,w,6,l[60]),j=m(j,H,$,W,O,10,l[61]),W=m(W,j,H,$,x,15,l[62]),$=m($,W,j,H,D,21,l[63]),v[0]=v[0]+H|0,v[1]=v[1]+$|0,v[2]=v[2]+W|0,v[3]=v[3]+j|0},"_doProcessBlock"),_doFinalize:a(function(){var g=this._data,A=g.words,y=this._nDataBytes*8,E=g.sigBytes*8;A[E>>>5]|=128<<24-E%32;var _=e.floor(y/4294967296),v=y;A[(E+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,A[(E+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,g.sigBytes=(A.length+1)*4,this._process();for(var b=this._hash,I=b.words,x=0;x<4;x++){var R=I[x];I[x]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return b},"_doFinalize"),clone:a(function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g},"clone")});function d(g,A,y,E,_,v,b){var I=g+(A&y|~A&E)+_+b;return(I<>>32-v)+A}a(d,"FF");function p(g,A,y,E,_,v,b){var I=g+(A&E|y&~E)+_+b;return(I<>>32-v)+A}a(p,"GG");function h(g,A,y,E,_,v,b){var I=g+(A^y^E)+_+b;return(I<>>32-v)+A}a(h,"HH");function m(g,A,y,E,_,v,b){var I=g+(y^(A|~E))+_+b;return(I<>>32-v)+A}a(m,"II"),r.MD5=s._createHelper(u),r.HmacMD5=s._createHmacHelper(u)})(Math),t.MD5})});var gmt=T((NNe,Y1r)=>{f();(function(t,e){typeof NNe=="object"?Y1r.exports=NNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(NNe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,c=[],l=s.SHA1=o.extend({_doReset:a(function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:a(function(u,d){for(var p=this._hash.words,h=p[0],m=p[1],g=p[2],A=p[3],y=p[4],E=0;E<80;E++){if(E<16)c[E]=u[d+E]|0;else{var _=c[E-3]^c[E-8]^c[E-14]^c[E-16];c[E]=_<<1|_>>>31}var v=(h<<5|h>>>27)+y+c[E];E<20?v+=(m&g|~m&A)+1518500249:E<40?v+=(m^g^A)+1859775393:E<60?v+=(m&g|m&A|g&A)-1894007588:v+=(m^g^A)-899497514,y=A,A=g,g=m<<30|m>>>2,m=h,h=v}p[0]=p[0]+h|0,p[1]=p[1]+m|0,p[2]=p[2]+g|0,p[3]=p[3]+A|0,p[4]=p[4]+y|0},"_doProcessBlock"),_doFinalize:a(function(){var u=this._data,d=u.words,p=this._nDataBytes*8,h=u.sigBytes*8;return d[h>>>5]|=128<<24-h%32,d[(h+64>>>9<<4)+14]=Math.floor(p/4294967296),d[(h+64>>>9<<4)+15]=p,u.sigBytes=d.length*4,this._process(),this._hash},"_doFinalize"),clone:a(function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u},"clone")});e.SHA1=o._createHelper(l),e.HmacSHA1=o._createHmacHelper(l)})(),t.SHA1})});var MNe=T((DNe,K1r)=>{f();(function(t,e){typeof DNe=="object"?K1r.exports=DNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(DNe,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=[],u=[];(function(){function h(y){for(var E=e.sqrt(y),_=2;_<=E;_++)if(!(y%_))return!1;return!0}a(h,"isPrime");function m(y){return(y-(y|0))*4294967296|0}a(m,"getFractionalBits");for(var g=2,A=0;A<64;)h(g)&&(A<8&&(l[A]=m(e.pow(g,1/2))),u[A]=m(e.pow(g,1/3)),A++),g++})();var d=[],p=c.SHA256=s.extend({_doReset:a(function(){this._hash=new o.init(l.slice(0))},"_doReset"),_doProcessBlock:a(function(h,m){for(var g=this._hash.words,A=g[0],y=g[1],E=g[2],_=g[3],v=g[4],b=g[5],I=g[6],x=g[7],R=0;R<64;R++){if(R<16)d[R]=h[m+R]|0;else{var w=d[R-15],P=(w<<25|w>>>7)^(w<<14|w>>>18)^w>>>3,k=d[R-2],Q=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;d[R]=P+d[R-7]+Q+d[R-16]}var M=v&b^~v&I,D=A&y^A&E^y&E,G=(A<<30|A>>>2)^(A<<19|A>>>13)^(A<<10|A>>>22),O=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),N=x+O+M+u[R]+d[R],F=G+D;x=I,I=b,b=v,v=_+N|0,_=E,E=y,y=A,A=N+F|0}g[0]=g[0]+A|0,g[1]=g[1]+y|0,g[2]=g[2]+E|0,g[3]=g[3]+_|0,g[4]=g[4]+v|0,g[5]=g[5]+b|0,g[6]=g[6]+I|0,g[7]=g[7]+x|0},"_doProcessBlock"),_doFinalize:a(function(){var h=this._data,m=h.words,g=this._nDataBytes*8,A=h.sigBytes*8;return m[A>>>5]|=128<<24-A%32,m[(A+64>>>9<<4)+14]=e.floor(g/4294967296),m[(A+64>>>9<<4)+15]=g,h.sigBytes=m.length*4,this._process(),this._hash},"_doFinalize"),clone:a(function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h},"clone")});r.SHA256=s._createHelper(p),r.HmacSHA256=s._createHmacHelper(p)})(Math),t.SHA256})});var X1r=T((ONe,J1r)=>{f();(function(t,e,r){typeof ONe=="object"?J1r.exports=ONe=e(Es(),MNe()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(t.CryptoJS)})(ONe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.algo,s=o.SHA256,c=o.SHA224=s.extend({_doReset:a(function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},"_doReset"),_doFinalize:a(function(){var l=s._doFinalize.call(this);return l.sigBytes-=4,l},"_doFinalize")});e.SHA224=s._createHelper(c),e.HmacSHA224=s._createHmacHelper(c)})(),t.SHA224})});var Amt=T((BNe,Z1r)=>{f();(function(t,e,r){typeof BNe=="object"?Z1r.exports=BNe=e(Es(),Tpe()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(BNe,function(t){return(function(){var e=t,r=e.lib,n=r.Hasher,o=e.x64,s=o.Word,c=o.WordArray,l=e.algo;function u(){return s.create.apply(s,arguments)}a(u,"X64Word_create");var d=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],p=[];(function(){for(var m=0;m<80;m++)p[m]=u()})();var h=l.SHA512=n.extend({_doReset:a(function(){this._hash=new c.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},"_doReset"),_doProcessBlock:a(function(m,g){for(var A=this._hash.words,y=A[0],E=A[1],_=A[2],v=A[3],b=A[4],I=A[5],x=A[6],R=A[7],w=y.high,P=y.low,k=E.high,Q=E.low,M=_.high,D=_.low,G=v.high,O=v.low,N=b.high,F=b.low,U=I.high,L=I.low,H=x.high,$=x.low,W=R.high,j=R.low,ce=w,J=P,Te=k,fe=Q,De=M,Ve=D,Ue=G,Ke=O,X=N,le=F,te=U,xe=L,Z=H,ae=$,Ne=W,Y=j,ee=0;ee<80;ee++){var Ee,Ae,ve=p[ee];if(ee<16)Ae=ve.high=m[g+ee*2]|0,Ee=ve.low=m[g+ee*2+1]|0;else{var We=p[ee-15],Ze=We.high,vt=We.low,Nt=(Ze>>>1|vt<<31)^(Ze>>>8|vt<<24)^Ze>>>7,Gt=(vt>>>1|Ze<<31)^(vt>>>8|Ze<<24)^(vt>>>7|Ze<<25),Qt=p[ee-2],ue=Qt.high,Be=Qt.low,et=(ue>>>19|Be<<13)^(ue<<3|Be>>>29)^ue>>>6,ut=(Be>>>19|ue<<13)^(Be<<3|ue>>>29)^(Be>>>6|ue<<26),ye=p[ee-7],Le=ye.high,$e=ye.low,rt=p[ee-16],ot=rt.high,ft=rt.low;Ee=Gt+$e,Ae=Nt+Le+(Ee>>>0>>0?1:0),Ee=Ee+ut,Ae=Ae+et+(Ee>>>0>>0?1:0),Ee=Ee+ft,Ae=Ae+ot+(Ee>>>0>>0?1:0),ve.high=Ae,ve.low=Ee}var z=X&te^~X&Z,se=le&xe^~le&ae,Ce=ce&Te^ce&De^Te&De,we=J&fe^J&Ve^fe&Ve,je=(ce>>>28|J<<4)^(ce<<30|J>>>2)^(ce<<25|J>>>7),Ye=(J>>>28|ce<<4)^(J<<30|ce>>>2)^(J<<25|ce>>>7),gt=(X>>>14|le<<18)^(X>>>18|le<<14)^(X<<23|le>>>9),xt=(le>>>14|X<<18)^(le>>>18|X<<14)^(le<<23|X>>>9),Bt=d[ee],Ct=Bt.high,Ie=Bt.low,K=Y+xt,pe=Ne+gt+(K>>>0>>0?1:0),K=K+se,pe=pe+z+(K>>>0>>0?1:0),K=K+Ie,pe=pe+Ct+(K>>>0>>0?1:0),K=K+Ee,pe=pe+Ae+(K>>>0>>0?1:0),me=Ye+we,ne=je+Ce+(me>>>0>>0?1:0);Ne=Z,Y=ae,Z=te,ae=xe,te=X,xe=le,le=Ke+K|0,X=Ue+pe+(le>>>0>>0?1:0)|0,Ue=De,Ke=Ve,De=Te,Ve=fe,Te=ce,fe=J,J=K+me|0,ce=pe+ne+(J>>>0>>0?1:0)|0}P=y.low=P+J,y.high=w+ce+(P>>>0>>0?1:0),Q=E.low=Q+fe,E.high=k+Te+(Q>>>0>>0?1:0),D=_.low=D+Ve,_.high=M+De+(D>>>0>>0?1:0),O=v.low=O+Ke,v.high=G+Ue+(O>>>0>>0?1:0),F=b.low=F+le,b.high=N+X+(F>>>0>>0?1:0),L=I.low=L+xe,I.high=U+te+(L>>>0>>0?1:0),$=x.low=$+ae,x.high=H+Z+($>>>0>>0?1:0),j=R.low=j+Y,R.high=W+Ne+(j>>>0>>0?1:0)},"_doProcessBlock"),_doFinalize:a(function(){var m=this._data,g=m.words,A=this._nDataBytes*8,y=m.sigBytes*8;g[y>>>5]|=128<<24-y%32,g[(y+128>>>10<<5)+30]=Math.floor(A/4294967296),g[(y+128>>>10<<5)+31]=A,m.sigBytes=g.length*4,this._process();var E=this._hash.toX32();return E},"_doFinalize"),clone:a(function(){var m=n.clone.call(this);return m._hash=this._hash.clone(),m},"clone"),blockSize:1024/32});e.SHA512=n._createHelper(h),e.HmacSHA512=n._createHmacHelper(h)})(),t.SHA512})});var tvr=T((LNe,evr)=>{f();(function(t,e,r){typeof LNe=="object"?evr.exports=LNe=e(Es(),Tpe(),Amt()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(t.CryptoJS)})(LNe,function(t){return(function(){var e=t,r=e.x64,n=r.Word,o=r.WordArray,s=e.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:a(function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},"_doReset"),_doFinalize:a(function(){var u=c._doFinalize.call(this);return u.sigBytes-=16,u},"_doFinalize")});e.SHA384=c._createHelper(l),e.HmacSHA384=c._createHmacHelper(l)})(),t.SHA384})});var nvr=T((FNe,rvr)=>{f();(function(t,e,r){typeof FNe=="object"?rvr.exports=FNe=e(Es(),Tpe()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(FNe,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.x64,l=c.Word,u=r.algo,d=[],p=[],h=[];(function(){for(var A=1,y=0,E=0;E<24;E++){d[A+5*y]=(E+1)*(E+2)/2%64;var _=y%5,v=(2*A+3*y)%5;A=_,y=v}for(var A=0;A<5;A++)for(var y=0;y<5;y++)p[A+5*y]=y+(2*A+3*y)%5*5;for(var b=1,I=0;I<24;I++){for(var x=0,R=0,w=0;w<7;w++){if(b&1){var P=(1<>>24)&16711935|(b<<24|b>>>8)&4278255360,I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360;var x=E[v];x.high^=I,x.low^=b}for(var R=0;R<24;R++){for(var w=0;w<5;w++){for(var P=0,k=0,Q=0;Q<5;Q++){var x=E[w+5*Q];P^=x.high,k^=x.low}var M=m[w];M.high=P,M.low=k}for(var w=0;w<5;w++)for(var D=m[(w+4)%5],G=m[(w+1)%5],O=G.high,N=G.low,P=D.high^(O<<1|N>>>31),k=D.low^(N<<1|O>>>31),Q=0;Q<5;Q++){var x=E[w+5*Q];x.high^=P,x.low^=k}for(var F=1;F<25;F++){var P,k,x=E[F],U=x.high,L=x.low,H=d[F];H<32?(P=U<>>32-H,k=L<>>32-H):(P=L<>>64-H,k=U<>>64-H);var $=m[p[F]];$.high=P,$.low=k}var W=m[0],j=E[0];W.high=j.high,W.low=j.low;for(var w=0;w<5;w++)for(var Q=0;Q<5;Q++){var F=w+5*Q,x=E[F],ce=m[F],J=m[(w+1)%5+5*Q],Te=m[(w+2)%5+5*Q];x.high=ce.high^~J.high&Te.high,x.low=ce.low^~J.low&Te.low}var x=E[0],fe=h[R];x.high^=fe.high,x.low^=fe.low}},"_doProcessBlock"),_doFinalize:a(function(){var A=this._data,y=A.words,E=this._nDataBytes*8,_=A.sigBytes*8,v=this.blockSize*32;y[_>>>5]|=1<<24-_%32,y[(e.ceil((_+1)/v)*v>>>5)-1]|=128,A.sigBytes=y.length*4,this._process();for(var b=this._state,I=this.cfg.outputLength/8,x=I/8,R=[],w=0;w>>24)&16711935|(k<<24|k>>>8)&4278255360,Q=(Q<<8|Q>>>24)&16711935|(Q<<24|Q>>>8)&4278255360,R.push(Q),R.push(k)}return new o.init(R,I)},"_doFinalize"),clone:a(function(){for(var A=s.clone.call(this),y=A._state=this._state.slice(0),E=0;E<25;E++)y[E]=y[E].clone();return A},"clone")});r.SHA3=s._createHelper(g),r.HmacSHA3=s._createHmacHelper(g)})(Math),t.SHA3})});var ovr=T((UNe,ivr)=>{f();(function(t,e){typeof UNe=="object"?ivr.exports=UNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(UNe,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=o.create([0,1518500249,1859775393,2400959708,2840853838]),m=o.create([1352829926,1548603684,1836072691,2053994217,0]),g=c.RIPEMD160=s.extend({_doReset:a(function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:a(function(I,x){for(var R=0;R<16;R++){var w=x+R,P=I[w];I[w]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}var k=this._hash.words,Q=h.words,M=m.words,D=l.words,G=u.words,O=d.words,N=p.words,F,U,L,H,$,W,j,ce,J,Te;W=F=k[0],j=U=k[1],ce=L=k[2],J=H=k[3],Te=$=k[4];for(var fe,R=0;R<80;R+=1)fe=F+I[x+D[R]]|0,R<16?fe+=A(U,L,H)+Q[0]:R<32?fe+=y(U,L,H)+Q[1]:R<48?fe+=E(U,L,H)+Q[2]:R<64?fe+=_(U,L,H)+Q[3]:fe+=v(U,L,H)+Q[4],fe=fe|0,fe=b(fe,O[R]),fe=fe+$|0,F=$,$=H,H=b(L,10),L=U,U=fe,fe=W+I[x+G[R]]|0,R<16?fe+=v(j,ce,J)+M[0]:R<32?fe+=_(j,ce,J)+M[1]:R<48?fe+=E(j,ce,J)+M[2]:R<64?fe+=y(j,ce,J)+M[3]:fe+=A(j,ce,J)+M[4],fe=fe|0,fe=b(fe,N[R]),fe=fe+Te|0,W=Te,Te=J,J=b(ce,10),ce=j,j=fe;fe=k[1]+L+J|0,k[1]=k[2]+H+Te|0,k[2]=k[3]+$+W|0,k[3]=k[4]+F+j|0,k[4]=k[0]+U+ce|0,k[0]=fe},"_doProcessBlock"),_doFinalize:a(function(){var I=this._data,x=I.words,R=this._nDataBytes*8,w=I.sigBytes*8;x[w>>>5]|=128<<24-w%32,x[(w+64>>>9<<4)+14]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360,I.sigBytes=(x.length+1)*4,this._process();for(var P=this._hash,k=P.words,Q=0;Q<5;Q++){var M=k[Q];k[Q]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}return P},"_doFinalize"),clone:a(function(){var I=s.clone.call(this);return I._hash=this._hash.clone(),I},"clone")});function A(I,x,R){return I^x^R}a(A,"f1");function y(I,x,R){return I&x|~I&R}a(y,"f2");function E(I,x,R){return(I|~x)^R}a(E,"f3");function _(I,x,R){return I&R|x&~R}a(_,"f4");function v(I,x,R){return I^(x|~R)}a(v,"f5");function b(I,x){return I<>>32-x}a(b,"rotl"),r.RIPEMD160=s._createHelper(g),r.HmacRIPEMD160=s._createHmacHelper(g)})(Math),t.RIPEMD160})});var qNe=T((QNe,svr)=>{f();(function(t,e){typeof QNe=="object"?svr.exports=QNe=e(Es()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(QNe,function(t){(function(){var e=t,r=e.lib,n=r.Base,o=e.enc,s=o.Utf8,c=e.algo,l=c.HMAC=n.extend({init:a(function(u,d){u=this._hasher=new u.init,typeof d=="string"&&(d=s.parse(d));var p=u.blockSize,h=p*4;d.sigBytes>h&&(d=u.finalize(d)),d.clamp();for(var m=this._oKey=d.clone(),g=this._iKey=d.clone(),A=m.words,y=g.words,E=0;E{f();(function(t,e,r){typeof GNe=="object"?avr.exports=GNe=e(Es(),MNe(),qNe()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(t.CryptoJS)})(GNe,function(t){return(function(){var e=t,r=e.lib,n=r.Base,o=r.WordArray,s=e.algo,c=s.SHA256,l=s.HMAC,u=s.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:a(function(d){this.cfg=this.cfg.extend(d)},"init"),compute:a(function(d,p){for(var h=this.cfg,m=l.create(h.hasher,d),g=o.create(),A=o.create([1]),y=g.words,E=A.words,_=h.keySize,v=h.iterations;y.length<_;){var b=m.update(p).finalize(A);m.reset();for(var I=b.words,x=I.length,R=b,w=1;w{f();(function(t,e,r){typeof HNe=="object"?lvr.exports=HNe=e(Es(),gmt(),qNe()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(t.CryptoJS)})(HNe,function(t){return(function(){var e=t,r=e.lib,n=r.Base,o=r.WordArray,s=e.algo,c=s.MD5,l=s.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:a(function(u){this.cfg=this.cfg.extend(u)},"init"),compute:a(function(u,d){for(var p,h=this.cfg,m=h.hasher.create(),g=o.create(),A=g.words,y=h.keySize,E=h.iterations;A.length{f();(function(t,e,r){typeof jNe=="object"?uvr.exports=jNe=e(Es(),I5()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(t.CryptoJS)})(jNe,function(t){t.lib.Cipher||(function(e){var r=t,n=r.lib,o=n.Base,s=n.WordArray,c=n.BufferedBlockAlgorithm,l=r.enc,u=l.Utf8,d=l.Base64,p=r.algo,h=p.EvpKDF,m=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:a(function(M,D){return this.create(this._ENC_XFORM_MODE,M,D)},"createEncryptor"),createDecryptor:a(function(M,D){return this.create(this._DEC_XFORM_MODE,M,D)},"createDecryptor"),init:a(function(M,D,G){this.cfg=this.cfg.extend(G),this._xformMode=M,this._key=D,this.reset()},"init"),reset:a(function(){c.reset.call(this),this._doReset()},"reset"),process:a(function(M){return this._append(M),this._process()},"process"),finalize:a(function(M){M&&this._append(M);var D=this._doFinalize();return D},"finalize"),keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function M(D){return typeof D=="string"?Q:w}return a(M,"selectCipherStrategy"),function(D){return{encrypt:a(function(G,O,N){return M(O).encrypt(D,G,O,N)},"encrypt"),decrypt:a(function(G,O,N){return M(O).decrypt(D,G,O,N)},"decrypt")}}})()}),g=n.StreamCipher=m.extend({_doFinalize:a(function(){var M=this._process(!0);return M},"_doFinalize"),blockSize:1}),A=r.mode={},y=n.BlockCipherMode=o.extend({createEncryptor:a(function(M,D){return this.Encryptor.create(M,D)},"createEncryptor"),createDecryptor:a(function(M,D){return this.Decryptor.create(M,D)},"createDecryptor"),init:a(function(M,D){this._cipher=M,this._iv=D},"init")}),E=A.CBC=(function(){var M=y.extend();M.Encryptor=M.extend({processBlock:a(function(G,O){var N=this._cipher,F=N.blockSize;D.call(this,G,O,F),N.encryptBlock(G,O),this._prevBlock=G.slice(O,O+F)},"processBlock")}),M.Decryptor=M.extend({processBlock:a(function(G,O){var N=this._cipher,F=N.blockSize,U=G.slice(O,O+F);N.decryptBlock(G,O),D.call(this,G,O,F),this._prevBlock=U},"processBlock")});function D(G,O,N){var F,U=this._iv;U?(F=U,this._iv=e):F=this._prevBlock;for(var L=0;L>>2]&255;M.sigBytes-=D},"unpad")},b=n.BlockCipher=m.extend({cfg:m.cfg.extend({mode:E,padding:v}),reset:a(function(){var M;m.reset.call(this);var D=this.cfg,G=D.iv,O=D.mode;this._xformMode==this._ENC_XFORM_MODE?M=O.createEncryptor:(M=O.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==M?this._mode.init(this,G&&G.words):(this._mode=M.call(O,this,G&&G.words),this._mode.__creator=M)},"reset"),_doProcessBlock:a(function(M,D){this._mode.processBlock(M,D)},"_doProcessBlock"),_doFinalize:a(function(){var M,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),M=this._process(!0)):(M=this._process(!0),D.unpad(M)),M},"_doFinalize"),blockSize:128/32}),I=n.CipherParams=o.extend({init:a(function(M){this.mixIn(M)},"init"),toString:a(function(M){return(M||this.formatter).stringify(this)},"toString")}),x=r.format={},R=x.OpenSSL={stringify:a(function(M){var D,G=M.ciphertext,O=M.salt;return O?D=s.create([1398893684,1701076831]).concat(O).concat(G):D=G,D.toString(d)},"stringify"),parse:a(function(M){var D,G=d.parse(M),O=G.words;return O[0]==1398893684&&O[1]==1701076831&&(D=s.create(O.slice(2,4)),O.splice(0,4),G.sigBytes-=16),I.create({ciphertext:G,salt:D})},"parse")},w=n.SerializableCipher=o.extend({cfg:o.extend({format:R}),encrypt:a(function(M,D,G,O){O=this.cfg.extend(O);var N=M.createEncryptor(G,O),F=N.finalize(D),U=N.cfg;return I.create({ciphertext:F,key:G,iv:U.iv,algorithm:M,mode:U.mode,padding:U.padding,blockSize:M.blockSize,formatter:O.format})},"encrypt"),decrypt:a(function(M,D,G,O){O=this.cfg.extend(O),D=this._parse(D,O.format);var N=M.createDecryptor(G,O).finalize(D.ciphertext);return N},"decrypt"),_parse:a(function(M,D){return typeof M=="string"?D.parse(M,this):M},"_parse")}),P=r.kdf={},k=P.OpenSSL={execute:a(function(M,D,G,O,N){if(O||(O=s.random(64/8)),N)var F=h.create({keySize:D+G,hasher:N}).compute(M,O);else var F=h.create({keySize:D+G}).compute(M,O);var U=s.create(F.words.slice(D),G*4);return F.sigBytes=D*4,I.create({key:F,iv:U,salt:O})},"execute")},Q=n.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:k}),encrypt:a(function(M,D,G,O){O=this.cfg.extend(O);var N=O.kdf.execute(G,M.keySize,M.ivSize,O.salt,O.hasher);O.iv=N.iv;var F=w.encrypt.call(this,M,D,N.key,O);return F.mixIn(N),F},"encrypt"),decrypt:a(function(M,D,G,O){O=this.cfg.extend(O),D=this._parse(D,O.format);var N=O.kdf.execute(G,M.keySize,M.ivSize,D.salt,O.hasher);O.iv=N.iv;var F=w.decrypt.call(this,M,D,N.key,O);return F},"decrypt")})})()})});var fvr=T(($Ne,dvr)=>{f();(function(t,e,r){typeof $Ne=="object"?dvr.exports=$Ne=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})($Ne,function(t){return t.mode.CFB=(function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize;r.call(this,n,o,c,s),this._prevBlock=n.slice(o,o+c)},"processBlock")}),e.Decryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=n.slice(o,o+c);r.call(this,n,o,c,s),this._prevBlock=l},"processBlock")});function r(n,o,s,c){var l,u=this._iv;u?(l=u.slice(0),this._iv=void 0):l=this._prevBlock,c.encryptBlock(l,0);for(var d=0;d{f();(function(t,e,r){typeof VNe=="object"?pvr.exports=VNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(VNe,function(t){return t.mode.CTR=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=this._iv,u=this._counter;l&&(u=this._counter=l.slice(0),this._iv=void 0);var d=u.slice(0);s.encryptBlock(d,0),u[c-1]=u[c-1]+1|0;for(var p=0;p{f();(function(t,e,r){typeof WNe=="object"?mvr.exports=WNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(WNe,function(t){return t.mode.CTRGladman=(function(){var e=t.lib.BlockCipherMode.extend();function r(s){if((s>>24&255)===255){var c=s>>16&255,l=s>>8&255,u=s&255;c===255?(c=0,l===255?(l=0,u===255?u=0:++u):++l):++c,s=0,s+=c<<16,s+=l<<8,s+=u}else s+=1<<24;return s}a(r,"incWord");function n(s){return(s[0]=r(s[0]))===0&&(s[1]=r(s[1])),s}a(n,"incCounter");var o=e.Encryptor=e.extend({processBlock:a(function(s,c){var l=this._cipher,u=l.blockSize,d=this._iv,p=this._counter;d&&(p=this._counter=d.slice(0),this._iv=void 0),n(p);var h=p.slice(0);l.encryptBlock(h,0);for(var m=0;m{f();(function(t,e,r){typeof zNe=="object"?Avr.exports=zNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(zNe,function(t){return t.mode.OFB=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=this._iv,u=this._keystream;l&&(u=this._keystream=l.slice(0),this._iv=void 0),s.encryptBlock(u,0);for(var d=0;d{f();(function(t,e,r){typeof YNe=="object"?Evr.exports=YNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(YNe,function(t){return t.mode.ECB=(function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:a(function(r,n){this._cipher.encryptBlock(r,n)},"processBlock")}),e.Decryptor=e.extend({processBlock:a(function(r,n){this._cipher.decryptBlock(r,n)},"processBlock")}),e})(),t.mode.ECB})});var vvr=T((KNe,_vr)=>{f();(function(t,e,r){typeof KNe=="object"?_vr.exports=KNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(KNe,function(t){return t.pad.AnsiX923={pad:a(function(e,r){var n=e.sigBytes,o=r*4,s=o-n%o,c=n+s-1;e.clamp(),e.words[c>>>2]|=s<<24-c%4*8,e.sigBytes+=s},"pad"),unpad:a(function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r},"unpad")},t.pad.Ansix923})});var Tvr=T((JNe,bvr)=>{f();(function(t,e,r){typeof JNe=="object"?bvr.exports=JNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(JNe,function(t){return t.pad.Iso10126={pad:a(function(e,r){var n=r*4,o=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},"pad"),unpad:a(function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r},"unpad")},t.pad.Iso10126})});var Ivr=T((XNe,Svr)=>{f();(function(t,e,r){typeof XNe=="object"?Svr.exports=XNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(XNe,function(t){return t.pad.Iso97971={pad:a(function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},"pad"),unpad:a(function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--},"unpad")},t.pad.Iso97971})});var wvr=T((ZNe,xvr)=>{f();(function(t,e,r){typeof ZNe=="object"?xvr.exports=ZNe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(ZNe,function(t){return t.pad.ZeroPadding={pad:a(function(e,r){var n=r*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},"pad"),unpad:a(function(e){for(var r=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}},"unpad")},t.pad.ZeroPadding})});var Pvr=T((eDe,Rvr)=>{f();(function(t,e,r){typeof eDe=="object"?Rvr.exports=eDe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(eDe,function(t){return t.pad.NoPadding={pad:a(function(){},"pad"),unpad:a(function(){},"unpad")},t.pad.NoPadding})});var Nvr=T((tDe,kvr)=>{f();(function(t,e,r){typeof tDe=="object"?kvr.exports=tDe=e(Es(),tp()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(tDe,function(t){return(function(e){var r=t,n=r.lib,o=n.CipherParams,s=r.enc,c=s.Hex,l=r.format,u=l.Hex={stringify:a(function(d){return d.ciphertext.toString(c)},"stringify"),parse:a(function(d){var p=c.parse(d);return o.create({ciphertext:p})},"parse")}})(),t.format.Hex})});var Mvr=T((rDe,Dvr)=>{f();(function(t,e,r){typeof rDe=="object"?Dvr.exports=rDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(rDe,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,o=e.algo,s=[],c=[],l=[],u=[],d=[],p=[],h=[],m=[],g=[],A=[];(function(){for(var _=[],v=0;v<256;v++)v<128?_[v]=v<<1:_[v]=v<<1^283;for(var b=0,I=0,v=0;v<256;v++){var x=I^I<<1^I<<2^I<<3^I<<4;x=x>>>8^x&255^99,s[b]=x,c[x]=b;var R=_[b],w=_[R],P=_[w],k=_[x]*257^x*16843008;l[b]=k<<24|k>>>8,u[b]=k<<16|k>>>16,d[b]=k<<8|k>>>24,p[b]=k;var k=P*16843009^w*65537^R*257^b*16843008;h[x]=k<<24|k>>>8,m[x]=k<<16|k>>>16,g[x]=k<<8|k>>>24,A[x]=k,b?(b=R^_[_[_[P^R]]],I^=_[_[I]]):b=I=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],E=o.AES=n.extend({_doReset:a(function(){var _;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,b=v.words,I=v.sigBytes/4,x=this._nRounds=I+6,R=(x+1)*4,w=this._keySchedule=[],P=0;P6&&P%I==4&&(_=s[_>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[_&255]):(_=_<<8|_>>>24,_=s[_>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[_&255],_^=y[P/I|0]<<24),w[P]=w[P-I]^_);for(var k=this._invKeySchedule=[],Q=0;Q>>24]]^m[s[_>>>16&255]]^g[s[_>>>8&255]]^A[s[_&255]]}}},"_doReset"),encryptBlock:a(function(_,v){this._doCryptBlock(_,v,this._keySchedule,l,u,d,p,s)},"encryptBlock"),decryptBlock:a(function(_,v){var b=_[v+1];_[v+1]=_[v+3],_[v+3]=b,this._doCryptBlock(_,v,this._invKeySchedule,h,m,g,A,c);var b=_[v+1];_[v+1]=_[v+3],_[v+3]=b},"decryptBlock"),_doCryptBlock:a(function(_,v,b,I,x,R,w,P){for(var k=this._nRounds,Q=_[v]^b[0],M=_[v+1]^b[1],D=_[v+2]^b[2],G=_[v+3]^b[3],O=4,N=1;N>>24]^x[M>>>16&255]^R[D>>>8&255]^w[G&255]^b[O++],U=I[M>>>24]^x[D>>>16&255]^R[G>>>8&255]^w[Q&255]^b[O++],L=I[D>>>24]^x[G>>>16&255]^R[Q>>>8&255]^w[M&255]^b[O++],H=I[G>>>24]^x[Q>>>16&255]^R[M>>>8&255]^w[D&255]^b[O++];Q=F,M=U,D=L,G=H}var F=(P[Q>>>24]<<24|P[M>>>16&255]<<16|P[D>>>8&255]<<8|P[G&255])^b[O++],U=(P[M>>>24]<<24|P[D>>>16&255]<<16|P[G>>>8&255]<<8|P[Q&255])^b[O++],L=(P[D>>>24]<<24|P[G>>>16&255]<<16|P[Q>>>8&255]<<8|P[M&255])^b[O++],H=(P[G>>>24]<<24|P[Q>>>16&255]<<16|P[M>>>8&255]<<8|P[D&255])^b[O++];_[v]=F,_[v+1]=U,_[v+2]=L,_[v+3]=H},"_doCryptBlock"),keySize:256/32});e.AES=n._createHelper(E)})(),t.AES})});var Bvr=T((nDe,Ovr)=>{f();(function(t,e,r){typeof nDe=="object"?Ovr.exports=nDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(nDe,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=r.BlockCipher,s=e.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=s.DES=o.extend({_doReset:a(function(){for(var y=this._key,E=y.words,_=[],v=0;v<56;v++){var b=c[v]-1;_[v]=E[b>>>5]>>>31-b%32&1}for(var I=this._subKeys=[],x=0;x<16;x++){for(var R=I[x]=[],w=u[x],v=0;v<24;v++)R[v/6|0]|=_[(l[v]-1+w)%28]<<31-v%6,R[4+(v/6|0)]|=_[28+(l[v+24]-1+w)%28]<<31-v%6;R[0]=R[0]<<1|R[0]>>>31;for(var v=1;v<7;v++)R[v]=R[v]>>>(v-1)*4+3;R[7]=R[7]<<5|R[7]>>>27}for(var P=this._invSubKeys=[],v=0;v<16;v++)P[v]=I[15-v]},"_doReset"),encryptBlock:a(function(y,E){this._doCryptBlock(y,E,this._subKeys)},"encryptBlock"),decryptBlock:a(function(y,E){this._doCryptBlock(y,E,this._invSubKeys)},"decryptBlock"),_doCryptBlock:a(function(y,E,_){this._lBlock=y[E],this._rBlock=y[E+1],m.call(this,4,252645135),m.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),m.call(this,1,1431655765);for(var v=0;v<16;v++){for(var b=_[v],I=this._lBlock,x=this._rBlock,R=0,w=0;w<8;w++)R|=d[w][((x^b[w])&p[w])>>>0];this._lBlock=x,this._rBlock=I^R}var P=this._lBlock;this._lBlock=this._rBlock,this._rBlock=P,m.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),y[E]=this._lBlock,y[E+1]=this._rBlock},"_doCryptBlock"),keySize:64/32,ivSize:64/32,blockSize:64/32});function m(y,E){var _=(this._lBlock>>>y^this._rBlock)&E;this._rBlock^=_,this._lBlock^=_<>>y^this._lBlock)&E;this._lBlock^=_,this._rBlock^=_<192.");var _=E.slice(0,2),v=E.length<4?E.slice(0,2):E.slice(2,4),b=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=h.createEncryptor(n.create(_)),this._des2=h.createEncryptor(n.create(v)),this._des3=h.createEncryptor(n.create(b))},"_doReset"),encryptBlock:a(function(y,E){this._des1.encryptBlock(y,E),this._des2.decryptBlock(y,E),this._des3.encryptBlock(y,E)},"encryptBlock"),decryptBlock:a(function(y,E){this._des3.decryptBlock(y,E),this._des2.encryptBlock(y,E),this._des1.decryptBlock(y,E)},"decryptBlock"),keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=o._createHelper(A)})(),t.TripleDES})});var Fvr=T((iDe,Lvr)=>{f();(function(t,e,r){typeof iDe=="object"?Lvr.exports=iDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(iDe,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:a(function(){for(var u=this._key,d=u.words,p=u.sigBytes,h=this._S=[],m=0;m<256;m++)h[m]=m;for(var m=0,g=0;m<256;m++){var A=m%p,y=d[A>>>2]>>>24-A%4*8&255;g=(g+h[m]+y)%256;var E=h[m];h[m]=h[g],h[g]=E}this._i=this._j=0},"_doReset"),_doProcessBlock:a(function(u,d){u[d]^=c.call(this)},"_doProcessBlock"),keySize:256/32,ivSize:0});function c(){for(var u=this._S,d=this._i,p=this._j,h=0,m=0;m<4;m++){d=(d+1)%256,p=(p+u[d])%256;var g=u[d];u[d]=u[p],u[p]=g,h|=u[(u[d]+u[p])%256]<<24-m*8}return this._i=d,this._j=p,h}a(c,"generateKeystreamWord"),e.RC4=n._createHelper(s);var l=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:a(function(){s._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)c.call(this)},"_doReset")});e.RC4Drop=n._createHelper(l)})(),t.RC4})});var Qvr=T((oDe,Uvr)=>{f();(function(t,e,r){typeof oDe=="object"?Uvr.exports=oDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(oDe,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=[],c=[],l=[],u=o.Rabbit=n.extend({_doReset:a(function(){for(var p=this._key.words,h=this.cfg.iv,m=0;m<4;m++)p[m]=(p[m]<<8|p[m]>>>24)&16711935|(p[m]<<24|p[m]>>>8)&4278255360;var g=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],A=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var m=0;m<4;m++)d.call(this);for(var m=0;m<8;m++)A[m]^=g[m+4&7];if(h){var y=h.words,E=y[0],_=y[1],v=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,I=v>>>16|b&4294901760,x=b<<16|v&65535;A[0]^=v,A[1]^=I,A[2]^=b,A[3]^=x,A[4]^=v,A[5]^=I,A[6]^=b,A[7]^=x;for(var m=0;m<4;m++)d.call(this)}},"_doReset"),_doProcessBlock:a(function(p,h){var m=this._X;d.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,p[h+g]^=s[g]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,h=this._C,m=0;m<8;m++)c[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var g=p[m]+h[m],A=g&65535,y=g>>>16,E=((A*A>>>17)+A*y>>>15)+y*y,_=((g&4294901760)*g|0)+((g&65535)*g|0);l[m]=E^_}p[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,p[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,p[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,p[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,p[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,p[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,p[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,p[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}a(d,"nextState"),e.Rabbit=n._createHelper(u)})(),t.Rabbit})});var Gvr=T((sDe,qvr)=>{f();(function(t,e,r){typeof sDe=="object"?qvr.exports=sDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(sDe,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=[],c=[],l=[],u=o.RabbitLegacy=n.extend({_doReset:a(function(){var p=this._key.words,h=this.cfg.iv,m=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],g=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var A=0;A<4;A++)d.call(this);for(var A=0;A<8;A++)g[A]^=m[A+4&7];if(h){var y=h.words,E=y[0],_=y[1],v=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,I=v>>>16|b&4294901760,x=b<<16|v&65535;g[0]^=v,g[1]^=I,g[2]^=b,g[3]^=x,g[4]^=v,g[5]^=I,g[6]^=b,g[7]^=x;for(var A=0;A<4;A++)d.call(this)}},"_doReset"),_doProcessBlock:a(function(p,h){var m=this._X;d.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,p[h+g]^=s[g]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,h=this._C,m=0;m<8;m++)c[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var g=p[m]+h[m],A=g&65535,y=g>>>16,E=((A*A>>>17)+A*y>>>15)+y*y,_=((g&4294901760)*g|0)+((g&65535)*g|0);l[m]=E^_}p[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,p[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,p[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,p[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,p[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,p[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,p[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,p[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}a(d,"nextState"),e.RabbitLegacy=n._createHelper(u)})(),t.RabbitLegacy})});var jvr=T((aDe,Hvr)=>{f();(function(t,e,r){typeof aDe=="object"?Hvr.exports=aDe=e(Es(),oL(),sL(),I5(),tp()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(aDe,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,o=e.algo;let s=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],l=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function d(A,y){let E=y>>24&255,_=y>>16&255,v=y>>8&255,b=y&255,I=A.sbox[0][E]+A.sbox[1][_];return I=I^A.sbox[2][v],I=I+A.sbox[3][b],I}a(d,"F");function p(A,y,E){let _=y,v=E,b;for(let I=0;I1;--I)_=_^A.pbox[I],v=d(A,_)^v,b=_,_=v,v=b;return b=_,_=v,v=b,v=v^A.pbox[1],_=_^A.pbox[0],{left:_,right:v}}a(h,"BlowFish_Decrypt");function m(A,y,E){for(let x=0;x<4;x++){A.sbox[x]=[];for(let R=0;R<256;R++)A.sbox[x][R]=l[x][R]}let _=0;for(let x=0;x=E&&(_=0);let v=0,b=0,I=0;for(let x=0;x{f();(function(t,e,r){typeof cDe=="object"?$vr.exports=cDe=e(Es(),Tpe(),G1r(),j1r(),oL(),W1r(),sL(),gmt(),MNe(),X1r(),Amt(),tvr(),nvr(),ovr(),qNe(),cvr(),I5(),tp(),fvr(),hvr(),gvr(),yvr(),Cvr(),vvr(),Tvr(),Ivr(),wvr(),Pvr(),Nvr(),Mvr(),Bvr(),Fvr(),Qvr(),Gvr(),jvr()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):t.CryptoJS=e(t.CryptoJS)})(cDe,function(t){return t})});var TZ=T(bg=>{"use strict";f();Object.defineProperty(bg,"__esModule",{value:!0});bg.stringArray=bg.array=bg.func=bg.error=bg.number=bg.string=bg.boolean=void 0;function bRi(t){return t===!0||t===!1}a(bRi,"boolean");bg.boolean=bRi;function LSr(t){return typeof t=="string"||t instanceof String}a(LSr,"string");bg.string=LSr;function TRi(t){return typeof t=="number"||t instanceof Number}a(TRi,"number");bg.number=TRi;function SRi(t){return t instanceof Error}a(SRi,"error");bg.error=SRi;function IRi(t){return typeof t=="function"}a(IRi,"func");bg.func=IRi;function FSr(t){return Array.isArray(t)}a(FSr,"array");bg.array=FSr;function xRi(t){return FSr(t)&&t.every(e=>LSr(e))}a(xRi,"stringArray");bg.stringArray=xRi});var Ygt=T(qn=>{"use strict";f();Object.defineProperty(qn,"__esModule",{value:!0});qn.Message=qn.NotificationType9=qn.NotificationType8=qn.NotificationType7=qn.NotificationType6=qn.NotificationType5=qn.NotificationType4=qn.NotificationType3=qn.NotificationType2=qn.NotificationType1=qn.NotificationType0=qn.NotificationType=qn.RequestType9=qn.RequestType8=qn.RequestType7=qn.RequestType6=qn.RequestType5=qn.RequestType4=qn.RequestType3=qn.RequestType2=qn.RequestType1=qn.RequestType=qn.RequestType0=qn.AbstractMessageSignature=qn.ParameterStructures=qn.ResponseError=qn.ErrorCodes=void 0;var Wq=TZ(),Sgt;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Sgt||(qn.ErrorCodes=Sgt={}));var Igt=class t extends Error{static{a(this,"ResponseError")}constructor(e,r,n){super(r),this.code=Wq.number(e)?e:Sgt.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};qn.ResponseError=Igt;var vE=class t{static{a(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};qn.ParameterStructures=vE;vE.auto=new vE("auto");vE.byPosition=new vE("byPosition");vE.byName=new vE("byName");var Bl=class{static{a(this,"AbstractMessageSignature")}constructor(e,r){this.method=e,this.numberOfParams=r}get parameterStructures(){return vE.auto}};qn.AbstractMessageSignature=Bl;var xgt=class extends Bl{static{a(this,"RequestType0")}constructor(e){super(e,0)}};qn.RequestType0=xgt;var wgt=class extends Bl{static{a(this,"RequestType")}constructor(e,r=vE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.RequestType=wgt;var Rgt=class extends Bl{static{a(this,"RequestType1")}constructor(e,r=vE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.RequestType1=Rgt;var Pgt=class extends Bl{static{a(this,"RequestType2")}constructor(e){super(e,2)}};qn.RequestType2=Pgt;var kgt=class extends Bl{static{a(this,"RequestType3")}constructor(e){super(e,3)}};qn.RequestType3=kgt;var Ngt=class extends Bl{static{a(this,"RequestType4")}constructor(e){super(e,4)}};qn.RequestType4=Ngt;var Dgt=class extends Bl{static{a(this,"RequestType5")}constructor(e){super(e,5)}};qn.RequestType5=Dgt;var Mgt=class extends Bl{static{a(this,"RequestType6")}constructor(e){super(e,6)}};qn.RequestType6=Mgt;var Ogt=class extends Bl{static{a(this,"RequestType7")}constructor(e){super(e,7)}};qn.RequestType7=Ogt;var Bgt=class extends Bl{static{a(this,"RequestType8")}constructor(e){super(e,8)}};qn.RequestType8=Bgt;var Lgt=class extends Bl{static{a(this,"RequestType9")}constructor(e){super(e,9)}};qn.RequestType9=Lgt;var Fgt=class extends Bl{static{a(this,"NotificationType")}constructor(e,r=vE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.NotificationType=Fgt;var Ugt=class extends Bl{static{a(this,"NotificationType0")}constructor(e){super(e,0)}};qn.NotificationType0=Ugt;var Qgt=class extends Bl{static{a(this,"NotificationType1")}constructor(e,r=vE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.NotificationType1=Qgt;var qgt=class extends Bl{static{a(this,"NotificationType2")}constructor(e){super(e,2)}};qn.NotificationType2=qgt;var Ggt=class extends Bl{static{a(this,"NotificationType3")}constructor(e){super(e,3)}};qn.NotificationType3=Ggt;var Hgt=class extends Bl{static{a(this,"NotificationType4")}constructor(e){super(e,4)}};qn.NotificationType4=Hgt;var jgt=class extends Bl{static{a(this,"NotificationType5")}constructor(e){super(e,5)}};qn.NotificationType5=jgt;var $gt=class extends Bl{static{a(this,"NotificationType6")}constructor(e){super(e,6)}};qn.NotificationType6=$gt;var Vgt=class extends Bl{static{a(this,"NotificationType7")}constructor(e){super(e,7)}};qn.NotificationType7=Vgt;var Wgt=class extends Bl{static{a(this,"NotificationType8")}constructor(e){super(e,8)}};qn.NotificationType8=Wgt;var zgt=class extends Bl{static{a(this,"NotificationType9")}constructor(e){super(e,9)}};qn.NotificationType9=zgt;var USr;(function(t){function e(o){let s=o;return s&&Wq.string(s.method)&&(Wq.string(s.id)||Wq.number(s.id))}a(e,"isRequest"),t.isRequest=e;function r(o){let s=o;return s&&Wq.string(s.method)&&o.id===void 0}a(r,"isNotification"),t.isNotification=r;function n(o){let s=o;return s&&(s.result!==void 0||!!s.error)&&(Wq.string(s.id)||Wq.number(s.id)||s.id===null)}a(n,"isResponse"),t.isResponse=n})(USr||(qn.Message=USr={}))});var Jgt=T(vL=>{"use strict";f();var QSr;Object.defineProperty(vL,"__esModule",{value:!0});vL.LRUCache=vL.LinkedMap=vL.Touch=void 0;var Tg;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(Tg||(vL.Touch=Tg={}));var KDe=class{static{a(this,"LinkedMap")}constructor(){this[QSr]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=Tg.None){let n=this._map.get(e);if(n)return r!==Tg.None&&this.touch(n,r),n.value}set(e,r,n=Tg.None){let o=this._map.get(e);if(o)o.value=r,n!==Tg.None&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case Tg.None:this.addItemLast(o);break;case Tg.First:this.addItemFirst(o);break;case Tg.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:r.key,done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}values(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:r.value,done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}entries(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:[r.key,r.value],done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}[(QSr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==Tg.First&&r!==Tg.Last)){if(r===Tg.First){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===Tg.Last){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}};vL.LinkedMap=KDe;var Kgt=class extends KDe{static{a(this,"LRUCache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=Tg.AsNew){return super.get(e,r)}peek(e){return super.get(e,Tg.None)}set(e,r){return super.set(e,r,Tg.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};vL.LRUCache=Kgt});var GSr=T(JDe=>{"use strict";f();Object.defineProperty(JDe,"__esModule",{value:!0});JDe.Disposable=void 0;var qSr;(function(t){function e(r){return{dispose:r}}a(e,"create"),t.create=e})(qSr||(JDe.Disposable=qSr={}))});var bL=T(eAt=>{"use strict";f();Object.defineProperty(eAt,"__esModule",{value:!0});var Xgt;function Zgt(){if(Xgt===void 0)throw new Error("No runtime abstraction layer installed");return Xgt}a(Zgt,"RAL");(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");Xgt=r}a(e,"install"),t.install=e})(Zgt||(Zgt={}));eAt.default=Zgt});var IZ=T(SZ=>{"use strict";f();Object.defineProperty(SZ,"__esModule",{value:!0});SZ.Emitter=SZ.Event=void 0;var wRi=bL(),HSr;(function(t){let e={dispose(){}};t.None=function(){return e}})(HSr||(SZ.Event=HSr={}));var tAt=class{static{a(this,"CallbackList")}add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:a(()=>this.remove(e,r),"dispose")})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let o=0,s=this._callbacks.length;o{this._callbacks||(this._callbacks=new tAt),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let o={dispose:a(()=>{this._callbacks&&(this._callbacks.remove(e,r),o.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};SZ.Emitter=XDe;XDe._noop=function(){}});var t5e=T(xZ=>{"use strict";f();Object.defineProperty(xZ,"__esModule",{value:!0});xZ.CancellationTokenSource=xZ.CancellationToken=void 0;var RRi=bL(),PRi=TZ(),rAt=IZ(),ZDe;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:rAt.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:rAt.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||PRi.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}a(e,"is"),t.is=e})(ZDe||(xZ.CancellationToken=ZDe={}));var kRi=Object.freeze(function(t,e){let r=(0,RRi.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),e5e=class{static{a(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?kRi:(this._emitter||(this._emitter=new rAt.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},nAt=class{static{a(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new e5e),this._token}cancel(){this._token?this._token.cancel():this._token=ZDe.Cancelled}dispose(){this._token?this._token instanceof e5e&&this._token.dispose():this._token=ZDe.None}};xZ.CancellationTokenSource=nAt});var jSr=T(wZ=>{"use strict";f();Object.defineProperty(wZ,"__esModule",{value:!0});wZ.SharedArrayReceiverStrategy=wZ.SharedArraySenderStrategy=void 0;var NRi=t5e(),$pe;(function(t){t.Continue=0,t.Cancelled=1})($pe||($pe={}));var iAt=class{static{a(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let r=new SharedArrayBuffer(4),n=new Int32Array(r,0,1);n[0]=$pe.Continue,this.buffers.set(e.id,r),e.$cancellationData=r}async sendCancellation(e,r){let n=this.buffers.get(r);if(n===void 0)return;let o=new Int32Array(n,0,1);Atomics.store(o,0,$pe.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};wZ.SharedArraySenderStrategy=iAt;var oAt=class{static{a(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===$pe.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},sAt=class{static{a(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new oAt(e)}cancel(){}dispose(){}},aAt=class{static{a(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){let r=e.$cancellationData;return r===void 0?new NRi.CancellationTokenSource:new sAt(r)}};wZ.SharedArrayReceiverStrategy=aAt});var lAt=T(r5e=>{"use strict";f();Object.defineProperty(r5e,"__esModule",{value:!0});r5e.Semaphore=void 0;var DRi=bL(),cAt=class{static{a(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((r,n)=>{this._waiting.push({thunk:e,resolve:r,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,DRi.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=e.thunk();r instanceof Promise?r.then(n=>{this._active--,e.resolve(n),this.runNext()},n=>{this._active--,e.reject(n),this.runNext()}):(this._active--,e.resolve(r),this.runNext())}catch(r){this._active--,e.reject(r),this.runNext()}}};r5e.Semaphore=cAt});var VSr=T(TL=>{"use strict";f();Object.defineProperty(TL,"__esModule",{value:!0});TL.ReadableStreamMessageReader=TL.AbstractMessageReader=TL.MessageReader=void 0;var dAt=bL(),RZ=TZ(),uAt=IZ(),MRi=lAt(),$Sr;(function(t){function e(r){let n=r;return n&&RZ.func(n.listen)&&RZ.func(n.dispose)&&RZ.func(n.onError)&&RZ.func(n.onClose)&&RZ.func(n.onPartialMessage)}a(e,"is"),t.is=e})($Sr||(TL.MessageReader=$Sr={}));var n5e=class{static{a(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new uAt.Emitter,this.closeEmitter=new uAt.Emitter,this.partialMessageEmitter=new uAt.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${RZ.string(e.message)?e.message:"unknown"}`)}};TL.AbstractMessageReader=n5e;var fAt;(function(t){function e(r){let n,o,s,c=new Map,l,u=new Map;if(r===void 0||typeof r=="string")n=r??"utf-8";else{if(n=r.charset??"utf-8",r.contentDecoder!==void 0&&(s=r.contentDecoder,c.set(s.name,s)),r.contentDecoders!==void 0)for(let d of r.contentDecoders)c.set(d.name,d);if(r.contentTypeDecoder!==void 0&&(l=r.contentTypeDecoder,u.set(l.name,l)),r.contentTypeDecoders!==void 0)for(let d of r.contentTypeDecoders)u.set(d.name,d)}return l===void 0&&(l=(0,dAt.default)().applicationJson.decoder,u.set(l.name,l)),{charset:n,contentDecoder:s,contentDecoders:c,contentTypeDecoder:l,contentTypeDecoders:u}}a(e,"fromOptions"),t.fromOptions=e})(fAt||(fAt={}));var pAt=class extends n5e{static{a(this,"ReadableStreamMessageReader")}constructor(e,r){super(),this.readable=e,this.options=fAt.fromOptions(r),this.buffer=(0,dAt.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new MRi.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let r=this.readable.onData(n=>{this.onData(n)});return this.readable.onError(n=>this.fireError(n)),this.readable.onClose(()=>this.fireClose()),r}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let n=this.buffer.tryReadHeaders(!0);if(!n)return;let o=n.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(n))}`));return}let s=parseInt(o);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let n=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,o=await this.options.contentTypeDecoder.decode(n,this.options);this.callback(o)}).catch(n=>{this.fireError(n)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,dAt.default)().timer.setTimeout((e,r)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};TL.ReadableStreamMessageReader=pAt});var JSr=T(SL=>{"use strict";f();Object.defineProperty(SL,"__esModule",{value:!0});SL.WriteableStreamMessageWriter=SL.AbstractMessageWriter=SL.MessageWriter=void 0;var WSr=bL(),Vpe=TZ(),ORi=lAt(),zSr=IZ(),BRi="Content-Length: ",YSr=`\r -`,KSr;(function(t){function e(r){let n=r;return n&&Vpe.func(n.dispose)&&Vpe.func(n.onClose)&&Vpe.func(n.onError)&&Vpe.func(n.write)}a(e,"is"),t.is=e})(KSr||(SL.MessageWriter=KSr={}));var i5e=class{static{a(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new zSr.Emitter,this.closeEmitter=new zSr.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,r,n){this.errorEmitter.fire([this.asError(e),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${Vpe.string(e.message)?e.message:"unknown"}`)}};SL.AbstractMessageWriter=i5e;var hAt;(function(t){function e(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,WSr.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,WSr.default)().applicationJson.encoder}}a(e,"fromOptions"),t.fromOptions=e})(hAt||(hAt={}));var mAt=class extends i5e{static{a(this,"WriteableStreamMessageWriter")}constructor(e,r){super(),this.writable=e,this.options=hAt.fromOptions(r),this.errorCount=0,this.writeSemaphore=new ORi.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let o=[];return o.push(BRi,n.byteLength.toString(),YSr),o.push(YSr),this.doWrite(e,o,n)},n=>{throw this.fireError(n),n}))}async doWrite(e,r,n){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(o){return this.handleError(o,e),Promise.reject(o)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){this.writable.end()}};SL.WriteableStreamMessageWriter=mAt});var XSr=T(o5e=>{"use strict";f();Object.defineProperty(o5e,"__esModule",{value:!0});o5e.AbstractMessageBuffer=void 0;var LRi=13,FRi=10,URi=`\r -`,gAt=class{static{a(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let r=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let r=0,n=0,o=0,s=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],c=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,c}let r=this.allocNative(e),n=0,o=0;for(;e>0;){let s=this._chunks[o];if(s.byteLength>e){let c=s.slice(0,e);r.set(c,n),n+=e,this._chunks[o]=s.slice(e),this._totalLength-=e,e-=e}else r.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return r}};o5e.AbstractMessageBuffer=gAt});var nIr=T(ro=>{"use strict";f();Object.defineProperty(ro,"__esModule",{value:!0});ro.createMessageConnection=ro.ConnectionOptions=ro.MessageStrategy=ro.CancellationStrategy=ro.CancellationSenderStrategy=ro.CancellationReceiverStrategy=ro.RequestCancellationReceiverStrategy=ro.IdCancellationReceiverStrategy=ro.ConnectionStrategy=ro.ConnectionError=ro.ConnectionErrors=ro.LogTraceNotification=ro.SetTraceNotification=ro.TraceFormat=ro.TraceValues=ro.Trace=ro.NullLogger=ro.ProgressType=ro.ProgressToken=void 0;var ZSr=bL(),Ku=TZ(),Ai=Ygt(),eIr=Jgt(),Wpe=IZ(),AAt=t5e(),Kpe;(function(t){t.type=new Ai.NotificationType("$/cancelRequest")})(Kpe||(Kpe={}));var yAt;(function(t){function e(r){return typeof r=="string"||typeof r=="number"}a(e,"is"),t.is=e})(yAt||(ro.ProgressToken=yAt={}));var zpe;(function(t){t.type=new Ai.NotificationType("$/progress")})(zpe||(zpe={}));var EAt=class{static{a(this,"ProgressType")}constructor(){}};ro.ProgressType=EAt;var CAt;(function(t){function e(r){return Ku.func(r)}a(e,"is"),t.is=e})(CAt||(CAt={}));ro.NullLogger=Object.freeze({error:a(()=>{},"error"),warn:a(()=>{},"warn"),info:a(()=>{},"info"),log:a(()=>{},"log")});var Pa;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(Pa||(ro.Trace=Pa={}));var tIr;(function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"})(tIr||(ro.TraceValues=tIr={}));(function(t){function e(n){if(!Ku.string(n))return t.Off;switch(n=n.toLowerCase(),n){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}a(e,"fromString"),t.fromString=e;function r(n){switch(n){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}a(r,"toString"),t.toString=r})(Pa||(ro.Trace=Pa={}));var J_;(function(t){t.Text="text",t.JSON="json"})(J_||(ro.TraceFormat=J_={}));(function(t){function e(r){return Ku.string(r)?(r=r.toLowerCase(),r==="json"?t.JSON:t.Text):t.Text}a(e,"fromString"),t.fromString=e})(J_||(ro.TraceFormat=J_={}));var _At;(function(t){t.type=new Ai.NotificationType("$/setTrace")})(_At||(ro.SetTraceNotification=_At={}));var s5e;(function(t){t.type=new Ai.NotificationType("$/logTrace")})(s5e||(ro.LogTraceNotification=s5e={}));var Ype;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(Ype||(ro.ConnectionErrors=Ype={}));var PZ=class t extends Error{static{a(this,"ConnectionError")}constructor(e,r){super(r),this.code=e,Object.setPrototypeOf(this,t.prototype)}};ro.ConnectionError=PZ;var vAt;(function(t){function e(r){let n=r;return n&&Ku.func(n.cancelUndispatched)}a(e,"is"),t.is=e})(vAt||(ro.ConnectionStrategy=vAt={}));var a5e;(function(t){function e(r){let n=r;return n&&(n.kind===void 0||n.kind==="id")&&Ku.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Ku.func(n.dispose))}a(e,"is"),t.is=e})(a5e||(ro.IdCancellationReceiverStrategy=a5e={}));var bAt;(function(t){function e(r){let n=r;return n&&n.kind==="request"&&Ku.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Ku.func(n.dispose))}a(e,"is"),t.is=e})(bAt||(ro.RequestCancellationReceiverStrategy=bAt={}));var c5e;(function(t){t.Message=Object.freeze({createCancellationTokenSource(r){return new AAt.CancellationTokenSource}});function e(r){return a5e.is(r)||bAt.is(r)}a(e,"is"),t.is=e})(c5e||(ro.CancellationReceiverStrategy=c5e={}));var l5e;(function(t){t.Message=Object.freeze({sendCancellation(r,n){return r.sendNotification(Kpe.type,{id:n})},cleanup(r){}});function e(r){let n=r;return n&&Ku.func(n.sendCancellation)&&Ku.func(n.cleanup)}a(e,"is"),t.is=e})(l5e||(ro.CancellationSenderStrategy=l5e={}));var u5e;(function(t){t.Message=Object.freeze({receiver:c5e.Message,sender:l5e.Message});function e(r){let n=r;return n&&c5e.is(n.receiver)&&l5e.is(n.sender)}a(e,"is"),t.is=e})(u5e||(ro.CancellationStrategy=u5e={}));var d5e;(function(t){function e(r){let n=r;return n&&Ku.func(n.handleMessage)}a(e,"is"),t.is=e})(d5e||(ro.MessageStrategy=d5e={}));var rIr;(function(t){function e(r){let n=r;return n&&(u5e.is(n.cancellationStrategy)||vAt.is(n.connectionStrategy)||d5e.is(n.messageStrategy))}a(e,"is"),t.is=e})(rIr||(ro.ConnectionOptions=rIr={}));var XI;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(XI||(XI={}));function QRi(t,e,r,n){let o=r!==void 0?r:ro.NullLogger,s=0,c=0,l=0,u="2.0",d,p=new Map,h,m=new Map,g=new Map,A,y=new eIr.LinkedMap,E=new Map,_=new Set,v=new Map,b=Pa.Off,I=J_.Text,x,R=XI.New,w=new Wpe.Emitter,P=new Wpe.Emitter,k=new Wpe.Emitter,Q=new Wpe.Emitter,M=new Wpe.Emitter,D=n&&n.cancellationStrategy?n.cancellationStrategy:u5e.Message;function G(ue){if(ue===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+ue.toString()}a(G,"createRequestQueueKey");function O(ue){return ue===null?"res-unknown-"+(++l).toString():"res-"+ue.toString()}a(O,"createResponseQueueKey");function N(){return"not-"+(++c).toString()}a(N,"createNotificationQueueKey");function F(ue,Be){Ai.Message.isRequest(Be)?ue.set(G(Be.id),Be):Ai.Message.isResponse(Be)?ue.set(O(Be.id),Be):ue.set(N(),Be)}a(F,"addMessageToQueue");function U(ue){}a(U,"cancelUndispatched");function L(){return R===XI.Listening}a(L,"isListening");function H(){return R===XI.Closed}a(H,"isClosed");function $(){return R===XI.Disposed}a($,"isDisposed");function W(){(R===XI.New||R===XI.Listening)&&(R=XI.Closed,P.fire(void 0))}a(W,"closeHandler");function j(ue){w.fire([ue,void 0,void 0])}a(j,"readErrorHandler");function ce(ue){w.fire(ue)}a(ce,"writeErrorHandler"),t.onClose(W),t.onError(j),e.onClose(W),e.onError(ce);function J(){A||y.size===0||(A=(0,ZSr.default)().timer.setImmediate(()=>{A=void 0,fe()}))}a(J,"triggerMessageQueue");function Te(ue){Ai.Message.isRequest(ue)?Ve(ue):Ai.Message.isNotification(ue)?Ke(ue):Ai.Message.isResponse(ue)?Ue(ue):X(ue)}a(Te,"handleMessage");function fe(){if(y.size===0)return;let ue=y.shift();try{let Be=n?.messageStrategy;d5e.is(Be)?Be.handleMessage(ue,Te):Te(ue)}finally{J()}}a(fe,"processMessageQueue");let De=a(ue=>{try{if(Ai.Message.isNotification(ue)&&ue.method===Kpe.type.method){let Be=ue.params.id,et=G(Be),ut=y.get(et);if(Ai.Message.isRequest(ut)){let Le=n?.connectionStrategy,$e=Le&&Le.cancelUndispatched?Le.cancelUndispatched(ut,U):void 0;if($e&&($e.error!==void 0||$e.result!==void 0)){y.delete(et),v.delete(Be),$e.id=ut.id,Z($e,ue.method,Date.now()),e.write($e).catch(()=>o.error("Sending response for canceled message failed."));return}}let ye=v.get(Be);if(ye!==void 0){ye.cancel(),Ne(ue);return}else _.add(Be)}F(y,ue)}finally{J()}},"callback");function Ve(ue){if($())return;function Be(ot,ft,z){let se={jsonrpc:u,id:ue.id};ot instanceof Ai.ResponseError?se.error=ot.toJson():se.result=ot===void 0?null:ot,Z(se,ft,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(Be,"reply");function et(ot,ft,z){let se={jsonrpc:u,id:ue.id,error:ot.toJson()};Z(se,ft,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(et,"replyError");function ut(ot,ft,z){ot===void 0&&(ot=null);let se={jsonrpc:u,id:ue.id,result:ot};Z(se,ft,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(ut,"replySuccess"),ae(ue);let ye=p.get(ue.method),Le,$e;ye&&(Le=ye.type,$e=ye.handler);let rt=Date.now();if($e||d){let ot=ue.id??String(Date.now()),ft=a5e.is(D.receiver)?D.receiver.createCancellationTokenSource(ot):D.receiver.createCancellationTokenSource(ue);ue.id!==null&&_.has(ue.id)&&ft.cancel(),ue.id!==null&&v.set(ot,ft);try{let z;if($e)if(ue.params===void 0){if(Le!==void 0&&Le.numberOfParams!==0){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines ${Le.numberOfParams} params but received none.`),ue.method,rt);return}z=$e(ft.token)}else if(Array.isArray(ue.params)){if(Le!==void 0&&Le.parameterStructures===Ai.ParameterStructures.byName){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines parameters by name but received parameters by position`),ue.method,rt);return}z=$e(...ue.params,ft.token)}else{if(Le!==void 0&&Le.parameterStructures===Ai.ParameterStructures.byPosition){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines parameters by position but received parameters by name`),ue.method,rt);return}z=$e(ue.params,ft.token)}else d&&(z=d(ue.method,ue.params,ft.token));let se=z;z?se.then?se.then(Ce=>{v.delete(ot),Be(Ce,ue.method,rt)},Ce=>{v.delete(ot),Ce instanceof Ai.ResponseError?et(Ce,ue.method,rt):Ce&&Ku.string(Ce.message)?et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed with message: ${Ce.message}`),ue.method,rt):et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed unexpectedly without providing any details.`),ue.method,rt)}):(v.delete(ot),Be(z,ue.method,rt)):(v.delete(ot),ut(z,ue.method,rt))}catch(z){v.delete(ot),z instanceof Ai.ResponseError?Be(z,ue.method,rt):z&&Ku.string(z.message)?et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed with message: ${z.message}`),ue.method,rt):et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed unexpectedly without providing any details.`),ue.method,rt)}}else et(new Ai.ResponseError(Ai.ErrorCodes.MethodNotFound,`Unhandled method ${ue.method}`),ue.method,rt)}a(Ve,"handleRequest");function Ue(ue){if(!$())if(ue.id===null)ue.error?o.error(`Received response message without id: Error is: -${JSON.stringify(ue.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let Be=ue.id,et=E.get(Be);if(Y(ue,et),et!==void 0){E.delete(Be);try{if(ue.error){let ut=ue.error;et.reject(new Ai.ResponseError(ut.code,ut.message,ut.data))}else if(ue.result!==void 0)et.resolve(ue.result);else throw new Error("Should never happen.")}catch(ut){ut.message?o.error(`Response handler '${et.method}' failed with message: ${ut.message}`):o.error(`Response handler '${et.method}' failed unexpectedly.`)}}}}a(Ue,"handleResponse");function Ke(ue){if($())return;let Be,et;if(ue.method===Kpe.type.method){let ut=ue.params.id;_.delete(ut),Ne(ue);return}else{let ut=m.get(ue.method);ut&&(et=ut.handler,Be=ut.type)}if(et||h)try{if(Ne(ue),et)if(ue.params===void 0)Be!==void 0&&Be.numberOfParams!==0&&Be.parameterStructures!==Ai.ParameterStructures.byName&&o.error(`Notification ${ue.method} defines ${Be.numberOfParams} params but received none.`),et();else if(Array.isArray(ue.params)){let ut=ue.params;ue.method===zpe.type.method&&ut.length===2&&yAt.is(ut[0])?et({token:ut[0],value:ut[1]}):(Be!==void 0&&(Be.parameterStructures===Ai.ParameterStructures.byName&&o.error(`Notification ${ue.method} defines parameters by name but received parameters by position`),Be.numberOfParams!==ue.params.length&&o.error(`Notification ${ue.method} defines ${Be.numberOfParams} params but received ${ut.length} arguments`)),et(...ut))}else Be!==void 0&&Be.parameterStructures===Ai.ParameterStructures.byPosition&&o.error(`Notification ${ue.method} defines parameters by position but received parameters by name`),et(ue.params);else h&&h(ue.method,ue.params)}catch(ut){ut.message?o.error(`Notification handler '${ue.method}' failed with message: ${ut.message}`):o.error(`Notification handler '${ue.method}' failed unexpectedly.`)}else k.fire(ue)}a(Ke,"handleNotification");function X(ue){if(!ue){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(ue,null,4)}`);let Be=ue;if(Ku.string(Be.id)||Ku.number(Be.id)){let et=Be.id,ut=E.get(et);ut&&ut.reject(new Error("The received response has neither a result nor an error property."))}}a(X,"handleInvalidMessage");function le(ue){if(ue!=null)switch(b){case Pa.Verbose:return JSON.stringify(ue,null,4);case Pa.Compact:return JSON.stringify(ue);default:return}}a(le,"stringifyTrace");function te(ue){if(!(b===Pa.Off||!x))if(I===J_.Text){let Be;(b===Pa.Verbose||b===Pa.Compact)&&ue.params&&(Be=`Params: ${le(ue.params)} +`+new Array(o).join(" ")+"^"}}return null}a(evr,"getErrorSource");function Zvi(t){var e=evr(t),r=zvi();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),e&&(console.error(),console.error(e)),console.error(t.stack),Yvi(1)}a(Zvi,"printErrorAndExit");function ebi(){var t=process.emit;process.emit=function(e){if(e==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(r&&!n)return Zvi(arguments[1])}return t.apply(this,arguments)}}a(ebi,"shimEmitUncaughtException");var tbi=U3.slice(0),rbi=Q3.slice(0);aq.wrapCallSite=Z1r;aq.getErrorSource=evr;aq.mapSourcePosition=_ht;aq.retrieveSourceMap=Eht;aq.install=function(t){if(t=t||{},t.environment&&(O0e=t.environment,["node","browser","auto"].indexOf(O0e)===-1))throw new Error("environment "+O0e+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(U3.length=0),U3.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(Q3.length=0),Q3.unshift(t.retrieveSourceMap)),t.hookRequire&&!Aht()){var e=z1r(ght,"module"),r=e.prototype._compile;r.__sourceMapSupport||(e.prototype._compile=function(s,c){return sq[c]=s,B0e[c]=void 0,r.call(this,s,c)},e.prototype._compile.__sourceMapSupport=!0)}if(hht||(hht="emptyCacheBetweenOperations"in t?t.emptyCacheBetweenOperations:!1),Y1r||(Y1r=!0,Error.prepareStackTrace=Xvi),!K1r){var n="handleUncaughtExceptions"in t?t.handleUncaughtExceptions:!0;try{var o=z1r(ght,"worker_threads");o.isMainThread===!1&&(n=!1)}catch{}n&&Vvi()&&(K1r=!0,ebi())}};aq.resetRetrieveHandlers=function(){U3.length=0,Q3.length=0,U3=tbi.slice(0),Q3=rbi.slice(0),Eht=yke(Q3),yht=yke(U3)}});var ms=T((vke,ivr)=>{f();(function(t,e){typeof vke=="object"?ivr.exports=vke=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(vke,function(){var t=t||(function(e,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof require=="function")try{n=require("crypto")}catch{}var o=a(function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},"cryptoSecureRandomInt"),s=Object.create||(function(){function _(){}return a(_,"F"),function(v){var b;return _.prototype=v,b=new _,_.prototype=null,b}})(),c={},l=c.lib={},u=l.Base=(function(){return{extend:a(function(_){var v=s(this);return _&&v.mixIn(_),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},"extend"),create:a(function(){var _=this.extend();return _.init.apply(_,arguments),_},"create"),init:a(function(){},"init"),mixIn:a(function(_){for(var v in _)_.hasOwnProperty(v)&&(this[v]=_[v]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},"mixIn"),clone:a(function(){return this.init.prototype.extend(this)},"clone")}})(),d=l.WordArray=u.extend({init:a(function(_,v){_=this.words=_||[],v!=r?this.sigBytes=v:this.sigBytes=_.length*4},"init"),toString:a(function(_){return(_||h).stringify(this)},"toString"),concat:a(function(_){var v=this.words,b=_.words,I=this.sigBytes,x=_.sigBytes;if(this.clamp(),I%4)for(var w=0;w>>2]>>>24-w%4*8&255;v[I+w>>>2]|=R<<24-(I+w)%4*8}else for(var P=0;P>>2]=b[P>>>2];return this.sigBytes+=x,this},"concat"),clamp:a(function(){var _=this.words,v=this.sigBytes;_[v>>>2]&=4294967295<<32-v%4*8,_.length=e.ceil(v/4)},"clamp"),clone:a(function(){var _=u.clone.call(this);return _.words=this.words.slice(0),_},"clone"),random:a(function(_){for(var v=[],b=0;b<_;b+=4)v.push(o());return new d.init(v,_)},"random")}),p=c.enc={},h=p.Hex={stringify:a(function(_){for(var v=_.words,b=_.sigBytes,I=[],x=0;x>>2]>>>24-x%4*8&255;I.push((w>>>4).toString(16)),I.push((w&15).toString(16))}return I.join("")},"stringify"),parse:a(function(_){for(var v=_.length,b=[],I=0;I>>3]|=parseInt(_.substr(I,2),16)<<24-I%8*4;return new d.init(b,v/2)},"parse")},m=p.Latin1={stringify:a(function(_){for(var v=_.words,b=_.sigBytes,I=[],x=0;x>>2]>>>24-x%4*8&255;I.push(String.fromCharCode(w))}return I.join("")},"stringify"),parse:a(function(_){for(var v=_.length,b=[],I=0;I>>2]|=(_.charCodeAt(I)&255)<<24-I%4*8;return new d.init(b,v)},"parse")},g=p.Utf8={stringify:a(function(_){try{return decodeURIComponent(escape(m.stringify(_)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:a(function(_){return m.parse(unescape(encodeURIComponent(_)))},"parse")},A=l.BufferedBlockAlgorithm=u.extend({reset:a(function(){this._data=new d.init,this._nDataBytes=0},"reset"),_append:a(function(_){typeof _=="string"&&(_=g.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},"_append"),_process:a(function(_){var v,b=this._data,I=b.words,x=b.sigBytes,w=this.blockSize,R=w*4,P=x/R;_?P=e.ceil(P):P=e.max((P|0)-this._minBufferSize,0);var k=P*w,Q=e.min(k*4,x);if(k){for(var M=0;M{f();(function(t,e){typeof bke=="object"?ovr.exports=bke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(bke,function(t){return(function(e){var r=t,n=r.lib,o=n.Base,s=n.WordArray,c=r.x64={},l=c.Word=o.extend({init:a(function(d,p){this.high=d,this.low=p},"init")}),u=c.WordArray=o.extend({init:a(function(d,p){d=this.words=d||[],p!=e?this.sigBytes=p:this.sigBytes=d.length*8},"init"),toX32:a(function(){for(var d=this.words,p=d.length,h=[],m=0;m{f();(function(t,e){typeof Tke=="object"?svr.exports=Tke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Tke,function(t){return(function(){if(typeof ArrayBuffer=="function"){var e=t,r=e.lib,n=r.WordArray,o=n.init,s=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var l=c.byteLength,u=[],d=0;d>>2]|=c[d]<<24-d%4*8;o.call(this,u,l)}else o.apply(this,arguments)};s.prototype=n}})(),t.lib.WordArray})});var lvr=T((Ske,cvr)=>{f();(function(t,e){typeof Ske=="object"?cvr.exports=Ske=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Ske,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Utf16=o.Utf16BE={stringify:a(function(l){for(var u=l.words,d=l.sigBytes,p=[],h=0;h>>2]>>>16-h%4*8&65535;p.push(String.fromCharCode(m))}return p.join("")},"stringify"),parse:a(function(l){for(var u=l.length,d=[],p=0;p>>1]|=l.charCodeAt(p)<<16-p%2*16;return n.create(d,u*2)},"parse")};o.Utf16LE={stringify:a(function(l){for(var u=l.words,d=l.sigBytes,p=[],h=0;h>>2]>>>16-h%4*8&65535);p.push(String.fromCharCode(m))}return p.join("")},"stringify"),parse:a(function(l){for(var u=l.length,d=[],p=0;p>>1]|=c(l.charCodeAt(p)<<16-p%2*16);return n.create(d,u*2)},"parse")};function c(l){return l<<8&4278255360|l>>>8&16711935}a(c,"swapEndian")})(),t.enc.Utf16})});var q3=T((Ike,uvr)=>{f();(function(t,e){typeof Ike=="object"?uvr.exports=Ike=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Ike,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Base64={stringify:a(function(l){var u=l.words,d=l.sigBytes,p=this._map;l.clamp();for(var h=[],m=0;m>>2]>>>24-m%4*8&255,A=u[m+1>>>2]>>>24-(m+1)%4*8&255,y=u[m+2>>>2]>>>24-(m+2)%4*8&255,E=g<<16|A<<8|y,_=0;_<4&&m+_*.75>>6*(3-_)&63));var v=p.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},"stringify"),parse:a(function(l){var u=l.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h>>6-m%4*2,y=g|A;p[h>>>2]|=y<<24-h%4*8,h++}return n.create(p,h)}a(c,"parseLoop")})(),t.enc.Base64})});var fvr=T((xke,dvr)=>{f();(function(t,e){typeof xke=="object"?dvr.exports=xke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(xke,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.enc,s=o.Base64url={stringify:a(function(l,u){u===void 0&&(u=!0);var d=l.words,p=l.sigBytes,h=u?this._safe_map:this._map;l.clamp();for(var m=[],g=0;g>>2]>>>24-g%4*8&255,y=d[g+1>>>2]>>>24-(g+1)%4*8&255,E=d[g+2>>>2]>>>24-(g+2)%4*8&255,_=A<<16|y<<8|E,v=0;v<4&&g+v*.75>>6*(3-v)&63));var b=h.charAt(64);if(b)for(;m.length%4;)m.push(b);return m.join("")},"stringify"),parse:a(function(l,u){u===void 0&&(u=!0);var d=l.length,p=u?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var m=0;m>>6-m%4*2,y=g|A;p[h>>>2]|=y<<24-h%4*8,h++}return n.create(p,h)}a(c,"parseLoop")})(),t.enc.Base64url})});var G3=T((wke,pvr)=>{f();(function(t,e){typeof wke=="object"?pvr.exports=wke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(wke,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=[];(function(){for(var g=0;g<64;g++)l[g]=e.abs(e.sin(g+1))*4294967296|0})();var u=c.MD5=s.extend({_doReset:a(function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},"_doReset"),_doProcessBlock:a(function(g,A){for(var y=0;y<16;y++){var E=A+y,_=g[E];g[E]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var v=this._hash.words,b=g[A+0],I=g[A+1],x=g[A+2],w=g[A+3],R=g[A+4],P=g[A+5],k=g[A+6],Q=g[A+7],M=g[A+8],N=g[A+9],G=g[A+10],O=g[A+11],D=g[A+12],F=g[A+13],U=g[A+14],L=g[A+15],H=v[0],$=v[1],W=v[2],j=v[3];H=d(H,$,W,j,b,7,l[0]),j=d(j,H,$,W,I,12,l[1]),W=d(W,j,H,$,x,17,l[2]),$=d($,W,j,H,w,22,l[3]),H=d(H,$,W,j,R,7,l[4]),j=d(j,H,$,W,P,12,l[5]),W=d(W,j,H,$,k,17,l[6]),$=d($,W,j,H,Q,22,l[7]),H=d(H,$,W,j,M,7,l[8]),j=d(j,H,$,W,N,12,l[9]),W=d(W,j,H,$,G,17,l[10]),$=d($,W,j,H,O,22,l[11]),H=d(H,$,W,j,D,7,l[12]),j=d(j,H,$,W,F,12,l[13]),W=d(W,j,H,$,U,17,l[14]),$=d($,W,j,H,L,22,l[15]),H=p(H,$,W,j,I,5,l[16]),j=p(j,H,$,W,k,9,l[17]),W=p(W,j,H,$,O,14,l[18]),$=p($,W,j,H,b,20,l[19]),H=p(H,$,W,j,P,5,l[20]),j=p(j,H,$,W,G,9,l[21]),W=p(W,j,H,$,L,14,l[22]),$=p($,W,j,H,R,20,l[23]),H=p(H,$,W,j,N,5,l[24]),j=p(j,H,$,W,U,9,l[25]),W=p(W,j,H,$,w,14,l[26]),$=p($,W,j,H,M,20,l[27]),H=p(H,$,W,j,F,5,l[28]),j=p(j,H,$,W,x,9,l[29]),W=p(W,j,H,$,Q,14,l[30]),$=p($,W,j,H,D,20,l[31]),H=h(H,$,W,j,P,4,l[32]),j=h(j,H,$,W,M,11,l[33]),W=h(W,j,H,$,O,16,l[34]),$=h($,W,j,H,U,23,l[35]),H=h(H,$,W,j,I,4,l[36]),j=h(j,H,$,W,R,11,l[37]),W=h(W,j,H,$,Q,16,l[38]),$=h($,W,j,H,G,23,l[39]),H=h(H,$,W,j,F,4,l[40]),j=h(j,H,$,W,b,11,l[41]),W=h(W,j,H,$,w,16,l[42]),$=h($,W,j,H,k,23,l[43]),H=h(H,$,W,j,N,4,l[44]),j=h(j,H,$,W,D,11,l[45]),W=h(W,j,H,$,L,16,l[46]),$=h($,W,j,H,x,23,l[47]),H=m(H,$,W,j,b,6,l[48]),j=m(j,H,$,W,Q,10,l[49]),W=m(W,j,H,$,U,15,l[50]),$=m($,W,j,H,P,21,l[51]),H=m(H,$,W,j,D,6,l[52]),j=m(j,H,$,W,w,10,l[53]),W=m(W,j,H,$,G,15,l[54]),$=m($,W,j,H,I,21,l[55]),H=m(H,$,W,j,M,6,l[56]),j=m(j,H,$,W,L,10,l[57]),W=m(W,j,H,$,k,15,l[58]),$=m($,W,j,H,F,21,l[59]),H=m(H,$,W,j,R,6,l[60]),j=m(j,H,$,W,O,10,l[61]),W=m(W,j,H,$,x,15,l[62]),$=m($,W,j,H,N,21,l[63]),v[0]=v[0]+H|0,v[1]=v[1]+$|0,v[2]=v[2]+W|0,v[3]=v[3]+j|0},"_doProcessBlock"),_doFinalize:a(function(){var g=this._data,A=g.words,y=this._nDataBytes*8,E=g.sigBytes*8;A[E>>>5]|=128<<24-E%32;var _=e.floor(y/4294967296),v=y;A[(E+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,A[(E+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,g.sigBytes=(A.length+1)*4,this._process();for(var b=this._hash,I=b.words,x=0;x<4;x++){var w=I[x];I[x]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return b},"_doFinalize"),clone:a(function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g},"clone")});function d(g,A,y,E,_,v,b){var I=g+(A&y|~A&E)+_+b;return(I<>>32-v)+A}a(d,"FF");function p(g,A,y,E,_,v,b){var I=g+(A&E|y&~E)+_+b;return(I<>>32-v)+A}a(p,"GG");function h(g,A,y,E,_,v,b){var I=g+(A^y^E)+_+b;return(I<>>32-v)+A}a(h,"HH");function m(g,A,y,E,_,v,b){var I=g+(y^(A|~E))+_+b;return(I<>>32-v)+A}a(m,"II"),r.MD5=s._createHelper(u),r.HmacMD5=s._createHmacHelper(u)})(Math),t.MD5})});var Tht=T((Rke,hvr)=>{f();(function(t,e){typeof Rke=="object"?hvr.exports=Rke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Rke,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,c=[],l=s.SHA1=o.extend({_doReset:a(function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:a(function(u,d){for(var p=this._hash.words,h=p[0],m=p[1],g=p[2],A=p[3],y=p[4],E=0;E<80;E++){if(E<16)c[E]=u[d+E]|0;else{var _=c[E-3]^c[E-8]^c[E-14]^c[E-16];c[E]=_<<1|_>>>31}var v=(h<<5|h>>>27)+y+c[E];E<20?v+=(m&g|~m&A)+1518500249:E<40?v+=(m^g^A)+1859775393:E<60?v+=(m&g|m&A|g&A)-1894007588:v+=(m^g^A)-899497514,y=A,A=g,g=m<<30|m>>>2,m=h,h=v}p[0]=p[0]+h|0,p[1]=p[1]+m|0,p[2]=p[2]+g|0,p[3]=p[3]+A|0,p[4]=p[4]+y|0},"_doProcessBlock"),_doFinalize:a(function(){var u=this._data,d=u.words,p=this._nDataBytes*8,h=u.sigBytes*8;return d[h>>>5]|=128<<24-h%32,d[(h+64>>>9<<4)+14]=Math.floor(p/4294967296),d[(h+64>>>9<<4)+15]=p,u.sigBytes=d.length*4,this._process(),this._hash},"_doFinalize"),clone:a(function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u},"clone")});e.SHA1=o._createHelper(l),e.HmacSHA1=o._createHmacHelper(l)})(),t.SHA1})});var kke=T((Pke,mvr)=>{f();(function(t,e){typeof Pke=="object"?mvr.exports=Pke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Pke,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=[],u=[];(function(){function h(y){for(var E=e.sqrt(y),_=2;_<=E;_++)if(!(y%_))return!1;return!0}a(h,"isPrime");function m(y){return(y-(y|0))*4294967296|0}a(m,"getFractionalBits");for(var g=2,A=0;A<64;)h(g)&&(A<8&&(l[A]=m(e.pow(g,1/2))),u[A]=m(e.pow(g,1/3)),A++),g++})();var d=[],p=c.SHA256=s.extend({_doReset:a(function(){this._hash=new o.init(l.slice(0))},"_doReset"),_doProcessBlock:a(function(h,m){for(var g=this._hash.words,A=g[0],y=g[1],E=g[2],_=g[3],v=g[4],b=g[5],I=g[6],x=g[7],w=0;w<64;w++){if(w<16)d[w]=h[m+w]|0;else{var R=d[w-15],P=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,k=d[w-2],Q=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;d[w]=P+d[w-7]+Q+d[w-16]}var M=v&b^~v&I,N=A&y^A&E^y&E,G=(A<<30|A>>>2)^(A<<19|A>>>13)^(A<<10|A>>>22),O=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),D=x+O+M+u[w]+d[w],F=G+N;x=I,I=b,b=v,v=_+D|0,_=E,E=y,y=A,A=D+F|0}g[0]=g[0]+A|0,g[1]=g[1]+y|0,g[2]=g[2]+E|0,g[3]=g[3]+_|0,g[4]=g[4]+v|0,g[5]=g[5]+b|0,g[6]=g[6]+I|0,g[7]=g[7]+x|0},"_doProcessBlock"),_doFinalize:a(function(){var h=this._data,m=h.words,g=this._nDataBytes*8,A=h.sigBytes*8;return m[A>>>5]|=128<<24-A%32,m[(A+64>>>9<<4)+14]=e.floor(g/4294967296),m[(A+64>>>9<<4)+15]=g,h.sigBytes=m.length*4,this._process(),this._hash},"_doFinalize"),clone:a(function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h},"clone")});r.SHA256=s._createHelper(p),r.HmacSHA256=s._createHmacHelper(p)})(Math),t.SHA256})});var Avr=T((Dke,gvr)=>{f();(function(t,e,r){typeof Dke=="object"?gvr.exports=Dke=e(ms(),kke()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(t.CryptoJS)})(Dke,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=e.algo,s=o.SHA256,c=o.SHA224=s.extend({_doReset:a(function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},"_doReset"),_doFinalize:a(function(){var l=s._doFinalize.call(this);return l.sigBytes-=4,l},"_doFinalize")});e.SHA224=s._createHelper(c),e.HmacSHA224=s._createHmacHelper(c)})(),t.SHA224})});var Sht=T((Nke,yvr)=>{f();(function(t,e,r){typeof Nke=="object"?yvr.exports=Nke=e(ms(),F0e()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(Nke,function(t){return(function(){var e=t,r=e.lib,n=r.Hasher,o=e.x64,s=o.Word,c=o.WordArray,l=e.algo;function u(){return s.create.apply(s,arguments)}a(u,"X64Word_create");var d=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],p=[];(function(){for(var m=0;m<80;m++)p[m]=u()})();var h=l.SHA512=n.extend({_doReset:a(function(){this._hash=new c.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},"_doReset"),_doProcessBlock:a(function(m,g){for(var A=this._hash.words,y=A[0],E=A[1],_=A[2],v=A[3],b=A[4],I=A[5],x=A[6],w=A[7],R=y.high,P=y.low,k=E.high,Q=E.low,M=_.high,N=_.low,G=v.high,O=v.low,D=b.high,F=b.low,U=I.high,L=I.low,H=x.high,$=x.low,W=w.high,j=w.low,ce=R,J=P,Te=k,fe=Q,Ne=M,Ve=N,Ue=G,Ke=O,X=D,le=F,te=U,xe=L,Z=H,ae=$,De=W,Y=j,ee=0;ee<80;ee++){var Ee,Ae,ve=p[ee];if(ee<16)Ae=ve.high=m[g+ee*2]|0,Ee=ve.low=m[g+ee*2+1]|0;else{var We=p[ee-15],Ze=We.high,Et=We.low,Rt=(Ze>>>1|Et<<31)^(Ze>>>8|Et<<24)^Ze>>>7,Qt=(Et>>>1|Ze<<31)^(Et>>>8|Ze<<24)^(Et>>>7|Ze<<25),Ft=p[ee-2],ue=Ft.high,Be=Ft.low,et=(ue>>>19|Be<<13)^(ue<<3|Be>>>29)^ue>>>6,lt=(Be>>>19|ue<<13)^(Be<<3|ue>>>29)^(Be>>>6|ue<<26),ye=p[ee-7],Le=ye.high,$e=ye.low,rt=p[ee-16],it=rt.high,dt=rt.low;Ee=Qt+$e,Ae=Rt+Le+(Ee>>>0>>0?1:0),Ee=Ee+lt,Ae=Ae+et+(Ee>>>0>>0?1:0),Ee=Ee+dt,Ae=Ae+it+(Ee>>>0
>>0?1:0),ve.high=Ae,ve.low=Ee}var z=X&te^~X&Z,se=le&xe^~le&ae,_e=ce&Te^ce&Ne^Te&Ne,we=J&fe^J&Ve^fe&Ve,je=(ce>>>28|J<<4)^(ce<<30|J>>>2)^(ce<<25|J>>>7),Ye=(J>>>28|ce<<4)^(J<<30|ce>>>2)^(J<<25|ce>>>7),ht=(X>>>14|le<<18)^(X>>>18|le<<14)^(X<<23|le>>>9),St=(le>>>14|X<<18)^(le>>>18|X<<14)^(le<<23|X>>>9),Mt=d[ee],At=Mt.high,Ie=Mt.low,K=Y+St,pe=De+ht+(K>>>0>>0?1:0),K=K+se,pe=pe+z+(K>>>0>>0?1:0),K=K+Ie,pe=pe+At+(K>>>0>>0?1:0),K=K+Ee,pe=pe+Ae+(K>>>0>>0?1:0),me=Ye+we,ne=je+_e+(me>>>0>>0?1:0);De=Z,Y=ae,Z=te,ae=xe,te=X,xe=le,le=Ke+K|0,X=Ue+pe+(le>>>0>>0?1:0)|0,Ue=Ne,Ke=Ve,Ne=Te,Ve=fe,Te=ce,fe=J,J=K+me|0,ce=pe+ne+(J>>>0>>0?1:0)|0}P=y.low=P+J,y.high=R+ce+(P>>>0>>0?1:0),Q=E.low=Q+fe,E.high=k+Te+(Q>>>0>>0?1:0),N=_.low=N+Ve,_.high=M+Ne+(N>>>0>>0?1:0),O=v.low=O+Ke,v.high=G+Ue+(O>>>0>>0?1:0),F=b.low=F+le,b.high=D+X+(F>>>0>>0?1:0),L=I.low=L+xe,I.high=U+te+(L>>>0>>0?1:0),$=x.low=$+ae,x.high=H+Z+($>>>0>>0?1:0),j=w.low=j+Y,w.high=W+De+(j>>>0>>0?1:0)},"_doProcessBlock"),_doFinalize:a(function(){var m=this._data,g=m.words,A=this._nDataBytes*8,y=m.sigBytes*8;g[y>>>5]|=128<<24-y%32,g[(y+128>>>10<<5)+30]=Math.floor(A/4294967296),g[(y+128>>>10<<5)+31]=A,m.sigBytes=g.length*4,this._process();var E=this._hash.toX32();return E},"_doFinalize"),clone:a(function(){var m=n.clone.call(this);return m._hash=this._hash.clone(),m},"clone"),blockSize:1024/32});e.SHA512=n._createHelper(h),e.HmacSHA512=n._createHmacHelper(h)})(),t.SHA512})});var _vr=T((Mke,Evr)=>{f();(function(t,e,r){typeof Mke=="object"?Evr.exports=Mke=e(ms(),F0e(),Sht()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(t.CryptoJS)})(Mke,function(t){return(function(){var e=t,r=e.x64,n=r.Word,o=r.WordArray,s=e.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:a(function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},"_doReset"),_doFinalize:a(function(){var u=c._doFinalize.call(this);return u.sigBytes-=16,u},"_doFinalize")});e.SHA384=c._createHelper(l),e.HmacSHA384=c._createHmacHelper(l)})(),t.SHA384})});var vvr=T((Oke,Cvr)=>{f();(function(t,e,r){typeof Oke=="object"?Cvr.exports=Oke=e(ms(),F0e()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(Oke,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.x64,l=c.Word,u=r.algo,d=[],p=[],h=[];(function(){for(var A=1,y=0,E=0;E<24;E++){d[A+5*y]=(E+1)*(E+2)/2%64;var _=y%5,v=(2*A+3*y)%5;A=_,y=v}for(var A=0;A<5;A++)for(var y=0;y<5;y++)p[A+5*y]=y+(2*A+3*y)%5*5;for(var b=1,I=0;I<24;I++){for(var x=0,w=0,R=0;R<7;R++){if(b&1){var P=(1<>>24)&16711935|(b<<24|b>>>8)&4278255360,I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360;var x=E[v];x.high^=I,x.low^=b}for(var w=0;w<24;w++){for(var R=0;R<5;R++){for(var P=0,k=0,Q=0;Q<5;Q++){var x=E[R+5*Q];P^=x.high,k^=x.low}var M=m[R];M.high=P,M.low=k}for(var R=0;R<5;R++)for(var N=m[(R+4)%5],G=m[(R+1)%5],O=G.high,D=G.low,P=N.high^(O<<1|D>>>31),k=N.low^(D<<1|O>>>31),Q=0;Q<5;Q++){var x=E[R+5*Q];x.high^=P,x.low^=k}for(var F=1;F<25;F++){var P,k,x=E[F],U=x.high,L=x.low,H=d[F];H<32?(P=U<>>32-H,k=L<>>32-H):(P=L<>>64-H,k=U<>>64-H);var $=m[p[F]];$.high=P,$.low=k}var W=m[0],j=E[0];W.high=j.high,W.low=j.low;for(var R=0;R<5;R++)for(var Q=0;Q<5;Q++){var F=R+5*Q,x=E[F],ce=m[F],J=m[(R+1)%5+5*Q],Te=m[(R+2)%5+5*Q];x.high=ce.high^~J.high&Te.high,x.low=ce.low^~J.low&Te.low}var x=E[0],fe=h[w];x.high^=fe.high,x.low^=fe.low}},"_doProcessBlock"),_doFinalize:a(function(){var A=this._data,y=A.words,E=this._nDataBytes*8,_=A.sigBytes*8,v=this.blockSize*32;y[_>>>5]|=1<<24-_%32,y[(e.ceil((_+1)/v)*v>>>5)-1]|=128,A.sigBytes=y.length*4,this._process();for(var b=this._state,I=this.cfg.outputLength/8,x=I/8,w=[],R=0;R>>24)&16711935|(k<<24|k>>>8)&4278255360,Q=(Q<<8|Q>>>24)&16711935|(Q<<24|Q>>>8)&4278255360,w.push(Q),w.push(k)}return new o.init(w,I)},"_doFinalize"),clone:a(function(){for(var A=s.clone.call(this),y=A._state=this._state.slice(0),E=0;E<25;E++)y[E]=y[E].clone();return A},"clone")});r.SHA3=s._createHelper(g),r.HmacSHA3=s._createHmacHelper(g)})(Math),t.SHA3})});var Tvr=T((Bke,bvr)=>{f();(function(t,e){typeof Bke=="object"?bvr.exports=Bke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Bke,function(t){return(function(e){var r=t,n=r.lib,o=n.WordArray,s=n.Hasher,c=r.algo,l=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=o.create([0,1518500249,1859775393,2400959708,2840853838]),m=o.create([1352829926,1548603684,1836072691,2053994217,0]),g=c.RIPEMD160=s.extend({_doReset:a(function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:a(function(I,x){for(var w=0;w<16;w++){var R=x+w,P=I[R];I[R]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}var k=this._hash.words,Q=h.words,M=m.words,N=l.words,G=u.words,O=d.words,D=p.words,F,U,L,H,$,W,j,ce,J,Te;W=F=k[0],j=U=k[1],ce=L=k[2],J=H=k[3],Te=$=k[4];for(var fe,w=0;w<80;w+=1)fe=F+I[x+N[w]]|0,w<16?fe+=A(U,L,H)+Q[0]:w<32?fe+=y(U,L,H)+Q[1]:w<48?fe+=E(U,L,H)+Q[2]:w<64?fe+=_(U,L,H)+Q[3]:fe+=v(U,L,H)+Q[4],fe=fe|0,fe=b(fe,O[w]),fe=fe+$|0,F=$,$=H,H=b(L,10),L=U,U=fe,fe=W+I[x+G[w]]|0,w<16?fe+=v(j,ce,J)+M[0]:w<32?fe+=_(j,ce,J)+M[1]:w<48?fe+=E(j,ce,J)+M[2]:w<64?fe+=y(j,ce,J)+M[3]:fe+=A(j,ce,J)+M[4],fe=fe|0,fe=b(fe,D[w]),fe=fe+Te|0,W=Te,Te=J,J=b(ce,10),ce=j,j=fe;fe=k[1]+L+J|0,k[1]=k[2]+H+Te|0,k[2]=k[3]+$+W|0,k[3]=k[4]+F+j|0,k[4]=k[0]+U+ce|0,k[0]=fe},"_doProcessBlock"),_doFinalize:a(function(){var I=this._data,x=I.words,w=this._nDataBytes*8,R=I.sigBytes*8;x[R>>>5]|=128<<24-R%32,x[(R+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,I.sigBytes=(x.length+1)*4,this._process();for(var P=this._hash,k=P.words,Q=0;Q<5;Q++){var M=k[Q];k[Q]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}return P},"_doFinalize"),clone:a(function(){var I=s.clone.call(this);return I._hash=this._hash.clone(),I},"clone")});function A(I,x,w){return I^x^w}a(A,"f1");function y(I,x,w){return I&x|~I&w}a(y,"f2");function E(I,x,w){return(I|~x)^w}a(E,"f3");function _(I,x,w){return I&w|x&~w}a(_,"f4");function v(I,x,w){return I^(x|~w)}a(v,"f5");function b(I,x){return I<>>32-x}a(b,"rotl"),r.RIPEMD160=s._createHelper(g),r.HmacRIPEMD160=s._createHmacHelper(g)})(Math),t.RIPEMD160})});var Fke=T((Lke,Svr)=>{f();(function(t,e){typeof Lke=="object"?Svr.exports=Lke=e(ms()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Lke,function(t){(function(){var e=t,r=e.lib,n=r.Base,o=e.enc,s=o.Utf8,c=e.algo,l=c.HMAC=n.extend({init:a(function(u,d){u=this._hasher=new u.init,typeof d=="string"&&(d=s.parse(d));var p=u.blockSize,h=p*4;d.sigBytes>h&&(d=u.finalize(d)),d.clamp();for(var m=this._oKey=d.clone(),g=this._iKey=d.clone(),A=m.words,y=g.words,E=0;E{f();(function(t,e,r){typeof Uke=="object"?Ivr.exports=Uke=e(ms(),kke(),Fke()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(t.CryptoJS)})(Uke,function(t){return(function(){var e=t,r=e.lib,n=r.Base,o=r.WordArray,s=e.algo,c=s.SHA256,l=s.HMAC,u=s.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:a(function(d){this.cfg=this.cfg.extend(d)},"init"),compute:a(function(d,p){for(var h=this.cfg,m=l.create(h.hasher,d),g=o.create(),A=o.create([1]),y=g.words,E=A.words,_=h.keySize,v=h.iterations;y.length<_;){var b=m.update(p).finalize(A);m.reset();for(var I=b.words,x=I.length,w=b,R=1;R{f();(function(t,e,r){typeof Qke=="object"?wvr.exports=Qke=e(ms(),Tht(),Fke()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(t.CryptoJS)})(Qke,function(t){return(function(){var e=t,r=e.lib,n=r.Base,o=r.WordArray,s=e.algo,c=s.MD5,l=s.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:a(function(u){this.cfg=this.cfg.extend(u)},"init"),compute:a(function(u,d){for(var p,h=this.cfg,m=h.hasher.create(),g=o.create(),A=g.words,y=h.keySize,E=h.iterations;A.length{f();(function(t,e,r){typeof qke=="object"?Rvr.exports=qke=e(ms(),hN()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(t.CryptoJS)})(qke,function(t){t.lib.Cipher||(function(e){var r=t,n=r.lib,o=n.Base,s=n.WordArray,c=n.BufferedBlockAlgorithm,l=r.enc,u=l.Utf8,d=l.Base64,p=r.algo,h=p.EvpKDF,m=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:a(function(M,N){return this.create(this._ENC_XFORM_MODE,M,N)},"createEncryptor"),createDecryptor:a(function(M,N){return this.create(this._DEC_XFORM_MODE,M,N)},"createDecryptor"),init:a(function(M,N,G){this.cfg=this.cfg.extend(G),this._xformMode=M,this._key=N,this.reset()},"init"),reset:a(function(){c.reset.call(this),this._doReset()},"reset"),process:a(function(M){return this._append(M),this._process()},"process"),finalize:a(function(M){M&&this._append(M);var N=this._doFinalize();return N},"finalize"),keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function M(N){return typeof N=="string"?Q:R}return a(M,"selectCipherStrategy"),function(N){return{encrypt:a(function(G,O,D){return M(O).encrypt(N,G,O,D)},"encrypt"),decrypt:a(function(G,O,D){return M(O).decrypt(N,G,O,D)},"decrypt")}}})()}),g=n.StreamCipher=m.extend({_doFinalize:a(function(){var M=this._process(!0);return M},"_doFinalize"),blockSize:1}),A=r.mode={},y=n.BlockCipherMode=o.extend({createEncryptor:a(function(M,N){return this.Encryptor.create(M,N)},"createEncryptor"),createDecryptor:a(function(M,N){return this.Decryptor.create(M,N)},"createDecryptor"),init:a(function(M,N){this._cipher=M,this._iv=N},"init")}),E=A.CBC=(function(){var M=y.extend();M.Encryptor=M.extend({processBlock:a(function(G,O){var D=this._cipher,F=D.blockSize;N.call(this,G,O,F),D.encryptBlock(G,O),this._prevBlock=G.slice(O,O+F)},"processBlock")}),M.Decryptor=M.extend({processBlock:a(function(G,O){var D=this._cipher,F=D.blockSize,U=G.slice(O,O+F);D.decryptBlock(G,O),N.call(this,G,O,F),this._prevBlock=U},"processBlock")});function N(G,O,D){var F,U=this._iv;U?(F=U,this._iv=e):F=this._prevBlock;for(var L=0;L>>2]&255;M.sigBytes-=N},"unpad")},b=n.BlockCipher=m.extend({cfg:m.cfg.extend({mode:E,padding:v}),reset:a(function(){var M;m.reset.call(this);var N=this.cfg,G=N.iv,O=N.mode;this._xformMode==this._ENC_XFORM_MODE?M=O.createEncryptor:(M=O.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==M?this._mode.init(this,G&&G.words):(this._mode=M.call(O,this,G&&G.words),this._mode.__creator=M)},"reset"),_doProcessBlock:a(function(M,N){this._mode.processBlock(M,N)},"_doProcessBlock"),_doFinalize:a(function(){var M,N=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(N.pad(this._data,this.blockSize),M=this._process(!0)):(M=this._process(!0),N.unpad(M)),M},"_doFinalize"),blockSize:128/32}),I=n.CipherParams=o.extend({init:a(function(M){this.mixIn(M)},"init"),toString:a(function(M){return(M||this.formatter).stringify(this)},"toString")}),x=r.format={},w=x.OpenSSL={stringify:a(function(M){var N,G=M.ciphertext,O=M.salt;return O?N=s.create([1398893684,1701076831]).concat(O).concat(G):N=G,N.toString(d)},"stringify"),parse:a(function(M){var N,G=d.parse(M),O=G.words;return O[0]==1398893684&&O[1]==1701076831&&(N=s.create(O.slice(2,4)),O.splice(0,4),G.sigBytes-=16),I.create({ciphertext:G,salt:N})},"parse")},R=n.SerializableCipher=o.extend({cfg:o.extend({format:w}),encrypt:a(function(M,N,G,O){O=this.cfg.extend(O);var D=M.createEncryptor(G,O),F=D.finalize(N),U=D.cfg;return I.create({ciphertext:F,key:G,iv:U.iv,algorithm:M,mode:U.mode,padding:U.padding,blockSize:M.blockSize,formatter:O.format})},"encrypt"),decrypt:a(function(M,N,G,O){O=this.cfg.extend(O),N=this._parse(N,O.format);var D=M.createDecryptor(G,O).finalize(N.ciphertext);return D},"decrypt"),_parse:a(function(M,N){return typeof M=="string"?N.parse(M,this):M},"_parse")}),P=r.kdf={},k=P.OpenSSL={execute:a(function(M,N,G,O,D){if(O||(O=s.random(64/8)),D)var F=h.create({keySize:N+G,hasher:D}).compute(M,O);else var F=h.create({keySize:N+G}).compute(M,O);var U=s.create(F.words.slice(N),G*4);return F.sigBytes=N*4,I.create({key:F,iv:U,salt:O})},"execute")},Q=n.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:k}),encrypt:a(function(M,N,G,O){O=this.cfg.extend(O);var D=O.kdf.execute(G,M.keySize,M.ivSize,O.salt,O.hasher);O.iv=D.iv;var F=R.encrypt.call(this,M,N,D.key,O);return F.mixIn(D),F},"encrypt"),decrypt:a(function(M,N,G,O){O=this.cfg.extend(O),N=this._parse(N,O.format);var D=O.kdf.execute(G,M.keySize,M.ivSize,N.salt,O.hasher);O.iv=D.iv;var F=R.decrypt.call(this,M,N,D.key,O);return F},"decrypt")})})()})});var kvr=T((Gke,Pvr)=>{f();(function(t,e,r){typeof Gke=="object"?Pvr.exports=Gke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Gke,function(t){return t.mode.CFB=(function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize;r.call(this,n,o,c,s),this._prevBlock=n.slice(o,o+c)},"processBlock")}),e.Decryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=n.slice(o,o+c);r.call(this,n,o,c,s),this._prevBlock=l},"processBlock")});function r(n,o,s,c){var l,u=this._iv;u?(l=u.slice(0),this._iv=void 0):l=this._prevBlock,c.encryptBlock(l,0);for(var d=0;d{f();(function(t,e,r){typeof Hke=="object"?Dvr.exports=Hke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Hke,function(t){return t.mode.CTR=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=this._iv,u=this._counter;l&&(u=this._counter=l.slice(0),this._iv=void 0);var d=u.slice(0);s.encryptBlock(d,0),u[c-1]=u[c-1]+1|0;for(var p=0;p{f();(function(t,e,r){typeof jke=="object"?Mvr.exports=jke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(jke,function(t){return t.mode.CTRGladman=(function(){var e=t.lib.BlockCipherMode.extend();function r(s){if((s>>24&255)===255){var c=s>>16&255,l=s>>8&255,u=s&255;c===255?(c=0,l===255?(l=0,u===255?u=0:++u):++l):++c,s=0,s+=c<<16,s+=l<<8,s+=u}else s+=1<<24;return s}a(r,"incWord");function n(s){return(s[0]=r(s[0]))===0&&(s[1]=r(s[1])),s}a(n,"incCounter");var o=e.Encryptor=e.extend({processBlock:a(function(s,c){var l=this._cipher,u=l.blockSize,d=this._iv,p=this._counter;d&&(p=this._counter=d.slice(0),this._iv=void 0),n(p);var h=p.slice(0);l.encryptBlock(h,0);for(var m=0;m{f();(function(t,e,r){typeof $ke=="object"?Bvr.exports=$ke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})($ke,function(t){return t.mode.OFB=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:a(function(n,o){var s=this._cipher,c=s.blockSize,l=this._iv,u=this._keystream;l&&(u=this._keystream=l.slice(0),this._iv=void 0),s.encryptBlock(u,0);for(var d=0;d{f();(function(t,e,r){typeof Vke=="object"?Fvr.exports=Vke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Vke,function(t){return t.mode.ECB=(function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:a(function(r,n){this._cipher.encryptBlock(r,n)},"processBlock")}),e.Decryptor=e.extend({processBlock:a(function(r,n){this._cipher.decryptBlock(r,n)},"processBlock")}),e})(),t.mode.ECB})});var qvr=T((Wke,Qvr)=>{f();(function(t,e,r){typeof Wke=="object"?Qvr.exports=Wke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Wke,function(t){return t.pad.AnsiX923={pad:a(function(e,r){var n=e.sigBytes,o=r*4,s=o-n%o,c=n+s-1;e.clamp(),e.words[c>>>2]|=s<<24-c%4*8,e.sigBytes+=s},"pad"),unpad:a(function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r},"unpad")},t.pad.Ansix923})});var Hvr=T((zke,Gvr)=>{f();(function(t,e,r){typeof zke=="object"?Gvr.exports=zke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(zke,function(t){return t.pad.Iso10126={pad:a(function(e,r){var n=r*4,o=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},"pad"),unpad:a(function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r},"unpad")},t.pad.Iso10126})});var $vr=T((Yke,jvr)=>{f();(function(t,e,r){typeof Yke=="object"?jvr.exports=Yke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Yke,function(t){return t.pad.Iso97971={pad:a(function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},"pad"),unpad:a(function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--},"unpad")},t.pad.Iso97971})});var Wvr=T((Kke,Vvr)=>{f();(function(t,e,r){typeof Kke=="object"?Vvr.exports=Kke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Kke,function(t){return t.pad.ZeroPadding={pad:a(function(e,r){var n=r*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},"pad"),unpad:a(function(e){for(var r=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}},"unpad")},t.pad.ZeroPadding})});var Yvr=T((Jke,zvr)=>{f();(function(t,e,r){typeof Jke=="object"?zvr.exports=Jke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Jke,function(t){return t.pad.NoPadding={pad:a(function(){},"pad"),unpad:a(function(){},"unpad")},t.pad.NoPadding})});var Jvr=T((Xke,Kvr)=>{f();(function(t,e,r){typeof Xke=="object"?Kvr.exports=Xke=e(ms(),K0()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(Xke,function(t){return(function(e){var r=t,n=r.lib,o=n.CipherParams,s=r.enc,c=s.Hex,l=r.format,u=l.Hex={stringify:a(function(d){return d.ciphertext.toString(c)},"stringify"),parse:a(function(d){var p=c.parse(d);return o.create({ciphertext:p})},"parse")}})(),t.format.Hex})});var Zvr=T((Zke,Xvr)=>{f();(function(t,e,r){typeof Zke=="object"?Xvr.exports=Zke=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(Zke,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,o=e.algo,s=[],c=[],l=[],u=[],d=[],p=[],h=[],m=[],g=[],A=[];(function(){for(var _=[],v=0;v<256;v++)v<128?_[v]=v<<1:_[v]=v<<1^283;for(var b=0,I=0,v=0;v<256;v++){var x=I^I<<1^I<<2^I<<3^I<<4;x=x>>>8^x&255^99,s[b]=x,c[x]=b;var w=_[b],R=_[w],P=_[R],k=_[x]*257^x*16843008;l[b]=k<<24|k>>>8,u[b]=k<<16|k>>>16,d[b]=k<<8|k>>>24,p[b]=k;var k=P*16843009^R*65537^w*257^b*16843008;h[x]=k<<24|k>>>8,m[x]=k<<16|k>>>16,g[x]=k<<8|k>>>24,A[x]=k,b?(b=w^_[_[_[P^w]]],I^=_[_[I]]):b=I=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],E=o.AES=n.extend({_doReset:a(function(){var _;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,b=v.words,I=v.sigBytes/4,x=this._nRounds=I+6,w=(x+1)*4,R=this._keySchedule=[],P=0;P6&&P%I==4&&(_=s[_>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[_&255]):(_=_<<8|_>>>24,_=s[_>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[_&255],_^=y[P/I|0]<<24),R[P]=R[P-I]^_);for(var k=this._invKeySchedule=[],Q=0;Q>>24]]^m[s[_>>>16&255]]^g[s[_>>>8&255]]^A[s[_&255]]}}},"_doReset"),encryptBlock:a(function(_,v){this._doCryptBlock(_,v,this._keySchedule,l,u,d,p,s)},"encryptBlock"),decryptBlock:a(function(_,v){var b=_[v+1];_[v+1]=_[v+3],_[v+3]=b,this._doCryptBlock(_,v,this._invKeySchedule,h,m,g,A,c);var b=_[v+1];_[v+1]=_[v+3],_[v+3]=b},"decryptBlock"),_doCryptBlock:a(function(_,v,b,I,x,w,R,P){for(var k=this._nRounds,Q=_[v]^b[0],M=_[v+1]^b[1],N=_[v+2]^b[2],G=_[v+3]^b[3],O=4,D=1;D>>24]^x[M>>>16&255]^w[N>>>8&255]^R[G&255]^b[O++],U=I[M>>>24]^x[N>>>16&255]^w[G>>>8&255]^R[Q&255]^b[O++],L=I[N>>>24]^x[G>>>16&255]^w[Q>>>8&255]^R[M&255]^b[O++],H=I[G>>>24]^x[Q>>>16&255]^w[M>>>8&255]^R[N&255]^b[O++];Q=F,M=U,N=L,G=H}var F=(P[Q>>>24]<<24|P[M>>>16&255]<<16|P[N>>>8&255]<<8|P[G&255])^b[O++],U=(P[M>>>24]<<24|P[N>>>16&255]<<16|P[G>>>8&255]<<8|P[Q&255])^b[O++],L=(P[N>>>24]<<24|P[G>>>16&255]<<16|P[Q>>>8&255]<<8|P[M&255])^b[O++],H=(P[G>>>24]<<24|P[Q>>>16&255]<<16|P[M>>>8&255]<<8|P[N&255])^b[O++];_[v]=F,_[v+1]=U,_[v+2]=L,_[v+3]=H},"_doCryptBlock"),keySize:256/32});e.AES=n._createHelper(E)})(),t.AES})});var tbr=T((e5e,ebr)=>{f();(function(t,e,r){typeof e5e=="object"?ebr.exports=e5e=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(e5e,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,o=r.BlockCipher,s=e.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=s.DES=o.extend({_doReset:a(function(){for(var y=this._key,E=y.words,_=[],v=0;v<56;v++){var b=c[v]-1;_[v]=E[b>>>5]>>>31-b%32&1}for(var I=this._subKeys=[],x=0;x<16;x++){for(var w=I[x]=[],R=u[x],v=0;v<24;v++)w[v/6|0]|=_[(l[v]-1+R)%28]<<31-v%6,w[4+(v/6|0)]|=_[28+(l[v+24]-1+R)%28]<<31-v%6;w[0]=w[0]<<1|w[0]>>>31;for(var v=1;v<7;v++)w[v]=w[v]>>>(v-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var P=this._invSubKeys=[],v=0;v<16;v++)P[v]=I[15-v]},"_doReset"),encryptBlock:a(function(y,E){this._doCryptBlock(y,E,this._subKeys)},"encryptBlock"),decryptBlock:a(function(y,E){this._doCryptBlock(y,E,this._invSubKeys)},"decryptBlock"),_doCryptBlock:a(function(y,E,_){this._lBlock=y[E],this._rBlock=y[E+1],m.call(this,4,252645135),m.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),m.call(this,1,1431655765);for(var v=0;v<16;v++){for(var b=_[v],I=this._lBlock,x=this._rBlock,w=0,R=0;R<8;R++)w|=d[R][((x^b[R])&p[R])>>>0];this._lBlock=x,this._rBlock=I^w}var P=this._lBlock;this._lBlock=this._rBlock,this._rBlock=P,m.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),y[E]=this._lBlock,y[E+1]=this._rBlock},"_doCryptBlock"),keySize:64/32,ivSize:64/32,blockSize:64/32});function m(y,E){var _=(this._lBlock>>>y^this._rBlock)&E;this._rBlock^=_,this._lBlock^=_<>>y^this._lBlock)&E;this._lBlock^=_,this._rBlock^=_<192.");var _=E.slice(0,2),v=E.length<4?E.slice(0,2):E.slice(2,4),b=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=h.createEncryptor(n.create(_)),this._des2=h.createEncryptor(n.create(v)),this._des3=h.createEncryptor(n.create(b))},"_doReset"),encryptBlock:a(function(y,E){this._des1.encryptBlock(y,E),this._des2.decryptBlock(y,E),this._des3.encryptBlock(y,E)},"encryptBlock"),decryptBlock:a(function(y,E){this._des3.decryptBlock(y,E),this._des2.encryptBlock(y,E),this._des1.decryptBlock(y,E)},"decryptBlock"),keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=o._createHelper(A)})(),t.TripleDES})});var nbr=T((t5e,rbr)=>{f();(function(t,e,r){typeof t5e=="object"?rbr.exports=t5e=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(t5e,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:a(function(){for(var u=this._key,d=u.words,p=u.sigBytes,h=this._S=[],m=0;m<256;m++)h[m]=m;for(var m=0,g=0;m<256;m++){var A=m%p,y=d[A>>>2]>>>24-A%4*8&255;g=(g+h[m]+y)%256;var E=h[m];h[m]=h[g],h[g]=E}this._i=this._j=0},"_doReset"),_doProcessBlock:a(function(u,d){u[d]^=c.call(this)},"_doProcessBlock"),keySize:256/32,ivSize:0});function c(){for(var u=this._S,d=this._i,p=this._j,h=0,m=0;m<4;m++){d=(d+1)%256,p=(p+u[d])%256;var g=u[d];u[d]=u[p],u[p]=g,h|=u[(u[d]+u[p])%256]<<24-m*8}return this._i=d,this._j=p,h}a(c,"generateKeystreamWord"),e.RC4=n._createHelper(s);var l=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:a(function(){s._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)c.call(this)},"_doReset")});e.RC4Drop=n._createHelper(l)})(),t.RC4})});var obr=T((r5e,ibr)=>{f();(function(t,e,r){typeof r5e=="object"?ibr.exports=r5e=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(r5e,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=[],c=[],l=[],u=o.Rabbit=n.extend({_doReset:a(function(){for(var p=this._key.words,h=this.cfg.iv,m=0;m<4;m++)p[m]=(p[m]<<8|p[m]>>>24)&16711935|(p[m]<<24|p[m]>>>8)&4278255360;var g=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],A=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var m=0;m<4;m++)d.call(this);for(var m=0;m<8;m++)A[m]^=g[m+4&7];if(h){var y=h.words,E=y[0],_=y[1],v=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,I=v>>>16|b&4294901760,x=b<<16|v&65535;A[0]^=v,A[1]^=I,A[2]^=b,A[3]^=x,A[4]^=v,A[5]^=I,A[6]^=b,A[7]^=x;for(var m=0;m<4;m++)d.call(this)}},"_doReset"),_doProcessBlock:a(function(p,h){var m=this._X;d.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,p[h+g]^=s[g]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,h=this._C,m=0;m<8;m++)c[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var g=p[m]+h[m],A=g&65535,y=g>>>16,E=((A*A>>>17)+A*y>>>15)+y*y,_=((g&4294901760)*g|0)+((g&65535)*g|0);l[m]=E^_}p[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,p[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,p[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,p[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,p[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,p[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,p[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,p[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}a(d,"nextState"),e.Rabbit=n._createHelper(u)})(),t.Rabbit})});var abr=T((n5e,sbr)=>{f();(function(t,e,r){typeof n5e=="object"?sbr.exports=n5e=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(n5e,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,o=e.algo,s=[],c=[],l=[],u=o.RabbitLegacy=n.extend({_doReset:a(function(){var p=this._key.words,h=this.cfg.iv,m=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],g=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var A=0;A<4;A++)d.call(this);for(var A=0;A<8;A++)g[A]^=m[A+4&7];if(h){var y=h.words,E=y[0],_=y[1],v=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,I=v>>>16|b&4294901760,x=b<<16|v&65535;g[0]^=v,g[1]^=I,g[2]^=b,g[3]^=x,g[4]^=v,g[5]^=I,g[6]^=b,g[7]^=x;for(var A=0;A<4;A++)d.call(this)}},"_doReset"),_doProcessBlock:a(function(p,h){var m=this._X;d.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,p[h+g]^=s[g]},"_doProcessBlock"),blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,h=this._C,m=0;m<8;m++)c[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var g=p[m]+h[m],A=g&65535,y=g>>>16,E=((A*A>>>17)+A*y>>>15)+y*y,_=((g&4294901760)*g|0)+((g&65535)*g|0);l[m]=E^_}p[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,p[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,p[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,p[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,p[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,p[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,p[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,p[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}a(d,"nextState"),e.RabbitLegacy=n._createHelper(u)})(),t.RabbitLegacy})});var lbr=T((i5e,cbr)=>{f();(function(t,e,r){typeof i5e=="object"?cbr.exports=i5e=e(ms(),q3(),G3(),hN(),K0()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(i5e,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,o=e.algo;let s=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],l=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function d(A,y){let E=y>>24&255,_=y>>16&255,v=y>>8&255,b=y&255,I=A.sbox[0][E]+A.sbox[1][_];return I=I^A.sbox[2][v],I=I+A.sbox[3][b],I}a(d,"F");function p(A,y,E){let _=y,v=E,b;for(let I=0;I1;--I)_=_^A.pbox[I],v=d(A,_)^v,b=_,_=v,v=b;return b=_,_=v,v=b,v=v^A.pbox[1],_=_^A.pbox[0],{left:_,right:v}}a(h,"BlowFish_Decrypt");function m(A,y,E){for(let x=0;x<4;x++){A.sbox[x]=[];for(let w=0;w<256;w++)A.sbox[x][w]=l[x][w]}let _=0;for(let x=0;x=E&&(_=0);let v=0,b=0,I=0;for(let x=0;x{f();(function(t,e,r){typeof o5e=="object"?ubr.exports=o5e=e(ms(),F0e(),avr(),lvr(),q3(),fvr(),G3(),Tht(),kke(),Avr(),Sht(),_vr(),vvr(),Tvr(),Fke(),xvr(),hN(),K0(),kvr(),Nvr(),Ovr(),Lvr(),Uvr(),qvr(),Hvr(),$vr(),Wvr(),Yvr(),Jvr(),Zvr(),tbr(),nbr(),obr(),abr(),lbr()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):t.CryptoJS=e(t.CryptoJS)})(o5e,function(t){return t})});var kX=T(pg=>{"use strict";f();Object.defineProperty(pg,"__esModule",{value:!0});pg.stringArray=pg.array=pg.func=pg.error=pg.number=pg.string=pg.boolean=void 0;function b2i(t){return t===!0||t===!1}a(b2i,"boolean");pg.boolean=b2i;function rIr(t){return typeof t=="string"||t instanceof String}a(rIr,"string");pg.string=rIr;function T2i(t){return typeof t=="number"||t instanceof Number}a(T2i,"number");pg.number=T2i;function S2i(t){return t instanceof Error}a(S2i,"error");pg.error=S2i;function I2i(t){return typeof t=="function"}a(I2i,"func");pg.func=I2i;function nIr(t){return Array.isArray(t)}a(nIr,"array");pg.array=nIr;function x2i(t){return nIr(t)&&t.every(e=>rIr(e))}a(x2i,"stringArray");pg.stringArray=x2i});var ngt=T(qn=>{"use strict";f();Object.defineProperty(qn,"__esModule",{value:!0});qn.Message=qn.NotificationType9=qn.NotificationType8=qn.NotificationType7=qn.NotificationType6=qn.NotificationType5=qn.NotificationType4=qn.NotificationType3=qn.NotificationType2=qn.NotificationType1=qn.NotificationType0=qn.NotificationType=qn.RequestType9=qn.RequestType8=qn.RequestType7=qn.RequestType6=qn.RequestType5=qn.RequestType4=qn.RequestType3=qn.RequestType2=qn.RequestType1=qn.RequestType=qn.RequestType0=qn.AbstractMessageSignature=qn.ParameterStructures=qn.ResponseError=qn.ErrorCodes=void 0;var _q=kX(),Nmt;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Nmt||(qn.ErrorCodes=Nmt={}));var Mmt=class t extends Error{static{a(this,"ResponseError")}constructor(e,r,n){super(r),this.code=_q.number(e)?e:Nmt.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};qn.ResponseError=Mmt;var pE=class t{static{a(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};qn.ParameterStructures=pE;pE.auto=new pE("auto");pE.byPosition=new pE("byPosition");pE.byName=new pE("byName");var Rl=class{static{a(this,"AbstractMessageSignature")}constructor(e,r){this.method=e,this.numberOfParams=r}get parameterStructures(){return pE.auto}};qn.AbstractMessageSignature=Rl;var Omt=class extends Rl{static{a(this,"RequestType0")}constructor(e){super(e,0)}};qn.RequestType0=Omt;var Bmt=class extends Rl{static{a(this,"RequestType")}constructor(e,r=pE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.RequestType=Bmt;var Lmt=class extends Rl{static{a(this,"RequestType1")}constructor(e,r=pE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.RequestType1=Lmt;var Fmt=class extends Rl{static{a(this,"RequestType2")}constructor(e){super(e,2)}};qn.RequestType2=Fmt;var Umt=class extends Rl{static{a(this,"RequestType3")}constructor(e){super(e,3)}};qn.RequestType3=Umt;var Qmt=class extends Rl{static{a(this,"RequestType4")}constructor(e){super(e,4)}};qn.RequestType4=Qmt;var qmt=class extends Rl{static{a(this,"RequestType5")}constructor(e){super(e,5)}};qn.RequestType5=qmt;var Gmt=class extends Rl{static{a(this,"RequestType6")}constructor(e){super(e,6)}};qn.RequestType6=Gmt;var Hmt=class extends Rl{static{a(this,"RequestType7")}constructor(e){super(e,7)}};qn.RequestType7=Hmt;var jmt=class extends Rl{static{a(this,"RequestType8")}constructor(e){super(e,8)}};qn.RequestType8=jmt;var $mt=class extends Rl{static{a(this,"RequestType9")}constructor(e){super(e,9)}};qn.RequestType9=$mt;var Vmt=class extends Rl{static{a(this,"NotificationType")}constructor(e,r=pE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.NotificationType=Vmt;var Wmt=class extends Rl{static{a(this,"NotificationType0")}constructor(e){super(e,0)}};qn.NotificationType0=Wmt;var zmt=class extends Rl{static{a(this,"NotificationType1")}constructor(e,r=pE.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};qn.NotificationType1=zmt;var Ymt=class extends Rl{static{a(this,"NotificationType2")}constructor(e){super(e,2)}};qn.NotificationType2=Ymt;var Kmt=class extends Rl{static{a(this,"NotificationType3")}constructor(e){super(e,3)}};qn.NotificationType3=Kmt;var Jmt=class extends Rl{static{a(this,"NotificationType4")}constructor(e){super(e,4)}};qn.NotificationType4=Jmt;var Xmt=class extends Rl{static{a(this,"NotificationType5")}constructor(e){super(e,5)}};qn.NotificationType5=Xmt;var Zmt=class extends Rl{static{a(this,"NotificationType6")}constructor(e){super(e,6)}};qn.NotificationType6=Zmt;var egt=class extends Rl{static{a(this,"NotificationType7")}constructor(e){super(e,7)}};qn.NotificationType7=egt;var tgt=class extends Rl{static{a(this,"NotificationType8")}constructor(e){super(e,8)}};qn.NotificationType8=tgt;var rgt=class extends Rl{static{a(this,"NotificationType9")}constructor(e){super(e,9)}};qn.NotificationType9=rgt;var iIr;(function(t){function e(o){let s=o;return s&&_q.string(s.method)&&(_q.string(s.id)||_q.number(s.id))}a(e,"isRequest"),t.isRequest=e;function r(o){let s=o;return s&&_q.string(s.method)&&o.id===void 0}a(r,"isNotification"),t.isNotification=r;function n(o){let s=o;return s&&(s.result!==void 0||!!s.error)&&(_q.string(s.id)||_q.number(s.id)||s.id===null)}a(n,"isResponse"),t.isResponse=n})(iIr||(qn.Message=iIr={}))});var ogt=T(iL=>{"use strict";f();var oIr;Object.defineProperty(iL,"__esModule",{value:!0});iL.LRUCache=iL.LinkedMap=iL.Touch=void 0;var hg;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(hg||(iL.Touch=hg={}));var W5e=class{static{a(this,"LinkedMap")}constructor(){this[oIr]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=hg.None){let n=this._map.get(e);if(n)return r!==hg.None&&this.touch(n,r),n.value}set(e,r,n=hg.None){let o=this._map.get(e);if(o)o.value=r,n!==hg.None&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case hg.None:this.addItemLast(o);break;case hg.First:this.addItemFirst(o);break;case hg.Last:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:r.key,done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}values(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:r.value,done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}entries(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:a(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let o={value:[r.key,r.value],done:!1};return r=r.next,o}else return{value:void 0,done:!0}},"next")};return n}[(oIr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==hg.First&&r!==hg.Last)){if(r===hg.First){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===hg.Last){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}};iL.LinkedMap=W5e;var igt=class extends W5e{static{a(this,"LRUCache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=hg.AsNew){return super.get(e,r)}peek(e){return super.get(e,hg.None)}set(e,r){return super.set(e,r,hg.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};iL.LRUCache=igt});var aIr=T(z5e=>{"use strict";f();Object.defineProperty(z5e,"__esModule",{value:!0});z5e.Disposable=void 0;var sIr;(function(t){function e(r){return{dispose:r}}a(e,"create"),t.create=e})(sIr||(z5e.Disposable=sIr={}))});var oL=T(cgt=>{"use strict";f();Object.defineProperty(cgt,"__esModule",{value:!0});var sgt;function agt(){if(sgt===void 0)throw new Error("No runtime abstraction layer installed");return sgt}a(agt,"RAL");(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");sgt=r}a(e,"install"),t.install=e})(agt||(agt={}));cgt.default=agt});var NX=T(DX=>{"use strict";f();Object.defineProperty(DX,"__esModule",{value:!0});DX.Emitter=DX.Event=void 0;var w2i=oL(),cIr;(function(t){let e={dispose(){}};t.None=function(){return e}})(cIr||(DX.Event=cIr={}));var lgt=class{static{a(this,"CallbackList")}add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:a(()=>this.remove(e,r),"dispose")})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let o=0,s=this._callbacks.length;o{this._callbacks||(this._callbacks=new lgt),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let o={dispose:a(()=>{this._callbacks&&(this._callbacks.remove(e,r),o.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};DX.Emitter=Y5e;Y5e._noop=function(){}});var X5e=T(MX=>{"use strict";f();Object.defineProperty(MX,"__esModule",{value:!0});MX.CancellationTokenSource=MX.CancellationToken=void 0;var R2i=oL(),P2i=kX(),ugt=NX(),K5e;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ugt.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ugt.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||P2i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}a(e,"is"),t.is=e})(K5e||(MX.CancellationToken=K5e={}));var k2i=Object.freeze(function(t,e){let r=(0,R2i.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),J5e=class{static{a(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?k2i:(this._emitter||(this._emitter=new ugt.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},dgt=class{static{a(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new J5e),this._token}cancel(){this._token?this._token.cancel():this._token=K5e.Cancelled}dispose(){this._token?this._token instanceof J5e&&this._token.dispose():this._token=K5e.None}};MX.CancellationTokenSource=dgt});var lIr=T(OX=>{"use strict";f();Object.defineProperty(OX,"__esModule",{value:!0});OX.SharedArrayReceiverStrategy=OX.SharedArraySenderStrategy=void 0;var D2i=X5e(),ope;(function(t){t.Continue=0,t.Cancelled=1})(ope||(ope={}));var fgt=class{static{a(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let r=new SharedArrayBuffer(4),n=new Int32Array(r,0,1);n[0]=ope.Continue,this.buffers.set(e.id,r),e.$cancellationData=r}async sendCancellation(e,r){let n=this.buffers.get(r);if(n===void 0)return;let o=new Int32Array(n,0,1);Atomics.store(o,0,ope.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};OX.SharedArraySenderStrategy=fgt;var pgt=class{static{a(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===ope.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},hgt=class{static{a(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new pgt(e)}cancel(){}dispose(){}},mgt=class{static{a(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){let r=e.$cancellationData;return r===void 0?new D2i.CancellationTokenSource:new hgt(r)}};OX.SharedArrayReceiverStrategy=mgt});var Agt=T(Z5e=>{"use strict";f();Object.defineProperty(Z5e,"__esModule",{value:!0});Z5e.Semaphore=void 0;var N2i=oL(),ggt=class{static{a(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((r,n)=>{this._waiting.push({thunk:e,resolve:r,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,N2i.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=e.thunk();r instanceof Promise?r.then(n=>{this._active--,e.resolve(n),this.runNext()},n=>{this._active--,e.reject(n),this.runNext()}):(this._active--,e.resolve(r),this.runNext())}catch(r){this._active--,e.reject(r),this.runNext()}}};Z5e.Semaphore=ggt});var dIr=T(sL=>{"use strict";f();Object.defineProperty(sL,"__esModule",{value:!0});sL.ReadableStreamMessageReader=sL.AbstractMessageReader=sL.MessageReader=void 0;var Egt=oL(),BX=kX(),ygt=NX(),M2i=Agt(),uIr;(function(t){function e(r){let n=r;return n&&BX.func(n.listen)&&BX.func(n.dispose)&&BX.func(n.onError)&&BX.func(n.onClose)&&BX.func(n.onPartialMessage)}a(e,"is"),t.is=e})(uIr||(sL.MessageReader=uIr={}));var eDe=class{static{a(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new ygt.Emitter,this.closeEmitter=new ygt.Emitter,this.partialMessageEmitter=new ygt.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${BX.string(e.message)?e.message:"unknown"}`)}};sL.AbstractMessageReader=eDe;var _gt;(function(t){function e(r){let n,o,s,c=new Map,l,u=new Map;if(r===void 0||typeof r=="string")n=r??"utf-8";else{if(n=r.charset??"utf-8",r.contentDecoder!==void 0&&(s=r.contentDecoder,c.set(s.name,s)),r.contentDecoders!==void 0)for(let d of r.contentDecoders)c.set(d.name,d);if(r.contentTypeDecoder!==void 0&&(l=r.contentTypeDecoder,u.set(l.name,l)),r.contentTypeDecoders!==void 0)for(let d of r.contentTypeDecoders)u.set(d.name,d)}return l===void 0&&(l=(0,Egt.default)().applicationJson.decoder,u.set(l.name,l)),{charset:n,contentDecoder:s,contentDecoders:c,contentTypeDecoder:l,contentTypeDecoders:u}}a(e,"fromOptions"),t.fromOptions=e})(_gt||(_gt={}));var Cgt=class extends eDe{static{a(this,"ReadableStreamMessageReader")}constructor(e,r){super(),this.readable=e,this.options=_gt.fromOptions(r),this.buffer=(0,Egt.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new M2i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let r=this.readable.onData(n=>{this.onData(n)});return this.readable.onError(n=>this.fireError(n)),this.readable.onClose(()=>this.fireClose()),r}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let n=this.buffer.tryReadHeaders(!0);if(!n)return;let o=n.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(n))}`));return}let s=parseInt(o);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let n=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,o=await this.options.contentTypeDecoder.decode(n,this.options);this.callback(o)}).catch(n=>{this.fireError(n)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Egt.default)().timer.setTimeout((e,r)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};sL.ReadableStreamMessageReader=Cgt});var gIr=T(aL=>{"use strict";f();Object.defineProperty(aL,"__esModule",{value:!0});aL.WriteableStreamMessageWriter=aL.AbstractMessageWriter=aL.MessageWriter=void 0;var fIr=oL(),spe=kX(),O2i=Agt(),pIr=NX(),B2i="Content-Length: ",hIr=`\r +`,mIr;(function(t){function e(r){let n=r;return n&&spe.func(n.dispose)&&spe.func(n.onClose)&&spe.func(n.onError)&&spe.func(n.write)}a(e,"is"),t.is=e})(mIr||(aL.MessageWriter=mIr={}));var tDe=class{static{a(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new pIr.Emitter,this.closeEmitter=new pIr.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,r,n){this.errorEmitter.fire([this.asError(e),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${spe.string(e.message)?e.message:"unknown"}`)}};aL.AbstractMessageWriter=tDe;var vgt;(function(t){function e(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,fIr.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,fIr.default)().applicationJson.encoder}}a(e,"fromOptions"),t.fromOptions=e})(vgt||(vgt={}));var bgt=class extends tDe{static{a(this,"WriteableStreamMessageWriter")}constructor(e,r){super(),this.writable=e,this.options=vgt.fromOptions(r),this.errorCount=0,this.writeSemaphore=new O2i.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let o=[];return o.push(B2i,n.byteLength.toString(),hIr),o.push(hIr),this.doWrite(e,o,n)},n=>{throw this.fireError(n),n}))}async doWrite(e,r,n){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(o){return this.handleError(o,e),Promise.reject(o)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){this.writable.end()}};aL.WriteableStreamMessageWriter=bgt});var AIr=T(rDe=>{"use strict";f();Object.defineProperty(rDe,"__esModule",{value:!0});rDe.AbstractMessageBuffer=void 0;var L2i=13,F2i=10,U2i=`\r +`,Tgt=class{static{a(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let r=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let r=0,n=0,o=0,s=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],c=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,c}let r=this.allocNative(e),n=0,o=0;for(;e>0;){let s=this._chunks[o];if(s.byteLength>e){let c=s.slice(0,e);r.set(c,n),n+=e,this._chunks[o]=s.slice(e),this._totalLength-=e,e-=e}else r.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return r}};rDe.AbstractMessageBuffer=Tgt});var vIr=T(Xi=>{"use strict";f();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.createMessageConnection=Xi.ConnectionOptions=Xi.MessageStrategy=Xi.CancellationStrategy=Xi.CancellationSenderStrategy=Xi.CancellationReceiverStrategy=Xi.RequestCancellationReceiverStrategy=Xi.IdCancellationReceiverStrategy=Xi.ConnectionStrategy=Xi.ConnectionError=Xi.ConnectionErrors=Xi.LogTraceNotification=Xi.SetTraceNotification=Xi.TraceFormat=Xi.TraceValues=Xi.Trace=Xi.NullLogger=Xi.ProgressType=Xi.ProgressToken=void 0;var yIr=oL(),Qu=kX(),Ai=ngt(),EIr=ogt(),ape=NX(),Sgt=X5e(),upe;(function(t){t.type=new Ai.NotificationType("$/cancelRequest")})(upe||(upe={}));var Igt;(function(t){function e(r){return typeof r=="string"||typeof r=="number"}a(e,"is"),t.is=e})(Igt||(Xi.ProgressToken=Igt={}));var cpe;(function(t){t.type=new Ai.NotificationType("$/progress")})(cpe||(cpe={}));var xgt=class{static{a(this,"ProgressType")}constructor(){}};Xi.ProgressType=xgt;var wgt;(function(t){function e(r){return Qu.func(r)}a(e,"is"),t.is=e})(wgt||(wgt={}));Xi.NullLogger=Object.freeze({error:a(()=>{},"error"),warn:a(()=>{},"warn"),info:a(()=>{},"info"),log:a(()=>{},"log")});var Ta;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(Ta||(Xi.Trace=Ta={}));var _Ir;(function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"})(_Ir||(Xi.TraceValues=_Ir={}));(function(t){function e(n){if(!Qu.string(n))return t.Off;switch(n=n.toLowerCase(),n){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}a(e,"fromString"),t.fromString=e;function r(n){switch(n){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}a(r,"toString"),t.toString=r})(Ta||(Xi.Trace=Ta={}));var UC;(function(t){t.Text="text",t.JSON="json"})(UC||(Xi.TraceFormat=UC={}));(function(t){function e(r){return Qu.string(r)?(r=r.toLowerCase(),r==="json"?t.JSON:t.Text):t.Text}a(e,"fromString"),t.fromString=e})(UC||(Xi.TraceFormat=UC={}));var Rgt;(function(t){t.type=new Ai.NotificationType("$/setTrace")})(Rgt||(Xi.SetTraceNotification=Rgt={}));var nDe;(function(t){t.type=new Ai.NotificationType("$/logTrace")})(nDe||(Xi.LogTraceNotification=nDe={}));var lpe;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(lpe||(Xi.ConnectionErrors=lpe={}));var LX=class t extends Error{static{a(this,"ConnectionError")}constructor(e,r){super(r),this.code=e,Object.setPrototypeOf(this,t.prototype)}};Xi.ConnectionError=LX;var Pgt;(function(t){function e(r){let n=r;return n&&Qu.func(n.cancelUndispatched)}a(e,"is"),t.is=e})(Pgt||(Xi.ConnectionStrategy=Pgt={}));var iDe;(function(t){function e(r){let n=r;return n&&(n.kind===void 0||n.kind==="id")&&Qu.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Qu.func(n.dispose))}a(e,"is"),t.is=e})(iDe||(Xi.IdCancellationReceiverStrategy=iDe={}));var kgt;(function(t){function e(r){let n=r;return n&&n.kind==="request"&&Qu.func(n.createCancellationTokenSource)&&(n.dispose===void 0||Qu.func(n.dispose))}a(e,"is"),t.is=e})(kgt||(Xi.RequestCancellationReceiverStrategy=kgt={}));var oDe;(function(t){t.Message=Object.freeze({createCancellationTokenSource(r){return new Sgt.CancellationTokenSource}});function e(r){return iDe.is(r)||kgt.is(r)}a(e,"is"),t.is=e})(oDe||(Xi.CancellationReceiverStrategy=oDe={}));var sDe;(function(t){t.Message=Object.freeze({sendCancellation(r,n){return r.sendNotification(upe.type,{id:n})},cleanup(r){}});function e(r){let n=r;return n&&Qu.func(n.sendCancellation)&&Qu.func(n.cleanup)}a(e,"is"),t.is=e})(sDe||(Xi.CancellationSenderStrategy=sDe={}));var aDe;(function(t){t.Message=Object.freeze({receiver:oDe.Message,sender:sDe.Message});function e(r){let n=r;return n&&oDe.is(n.receiver)&&sDe.is(n.sender)}a(e,"is"),t.is=e})(aDe||(Xi.CancellationStrategy=aDe={}));var cDe;(function(t){function e(r){let n=r;return n&&Qu.func(n.handleMessage)}a(e,"is"),t.is=e})(cDe||(Xi.MessageStrategy=cDe={}));var CIr;(function(t){function e(r){let n=r;return n&&(aDe.is(n.cancellationStrategy)||Pgt.is(n.connectionStrategy)||cDe.is(n.messageStrategy))}a(e,"is"),t.is=e})(CIr||(Xi.ConnectionOptions=CIr={}));var QI;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(QI||(QI={}));function Q2i(t,e,r,n){let o=r!==void 0?r:Xi.NullLogger,s=0,c=0,l=0,u="2.0",d,p=new Map,h,m=new Map,g=new Map,A,y=new EIr.LinkedMap,E=new Map,_=new Set,v=new Map,b=Ta.Off,I=UC.Text,x,w=QI.New,R=new ape.Emitter,P=new ape.Emitter,k=new ape.Emitter,Q=new ape.Emitter,M=new ape.Emitter,N=n&&n.cancellationStrategy?n.cancellationStrategy:aDe.Message;function G(ue){if(ue===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+ue.toString()}a(G,"createRequestQueueKey");function O(ue){return ue===null?"res-unknown-"+(++l).toString():"res-"+ue.toString()}a(O,"createResponseQueueKey");function D(){return"not-"+(++c).toString()}a(D,"createNotificationQueueKey");function F(ue,Be){Ai.Message.isRequest(Be)?ue.set(G(Be.id),Be):Ai.Message.isResponse(Be)?ue.set(O(Be.id),Be):ue.set(D(),Be)}a(F,"addMessageToQueue");function U(ue){}a(U,"cancelUndispatched");function L(){return w===QI.Listening}a(L,"isListening");function H(){return w===QI.Closed}a(H,"isClosed");function $(){return w===QI.Disposed}a($,"isDisposed");function W(){(w===QI.New||w===QI.Listening)&&(w=QI.Closed,P.fire(void 0))}a(W,"closeHandler");function j(ue){R.fire([ue,void 0,void 0])}a(j,"readErrorHandler");function ce(ue){R.fire(ue)}a(ce,"writeErrorHandler"),t.onClose(W),t.onError(j),e.onClose(W),e.onError(ce);function J(){A||y.size===0||(A=(0,yIr.default)().timer.setImmediate(()=>{A=void 0,fe()}))}a(J,"triggerMessageQueue");function Te(ue){Ai.Message.isRequest(ue)?Ve(ue):Ai.Message.isNotification(ue)?Ke(ue):Ai.Message.isResponse(ue)?Ue(ue):X(ue)}a(Te,"handleMessage");function fe(){if(y.size===0)return;let ue=y.shift();try{let Be=n?.messageStrategy;cDe.is(Be)?Be.handleMessage(ue,Te):Te(ue)}finally{J()}}a(fe,"processMessageQueue");let Ne=a(ue=>{try{if(Ai.Message.isNotification(ue)&&ue.method===upe.type.method){let Be=ue.params.id,et=G(Be),lt=y.get(et);if(Ai.Message.isRequest(lt)){let Le=n?.connectionStrategy,$e=Le&&Le.cancelUndispatched?Le.cancelUndispatched(lt,U):void 0;if($e&&($e.error!==void 0||$e.result!==void 0)){y.delete(et),v.delete(Be),$e.id=lt.id,Z($e,ue.method,Date.now()),e.write($e).catch(()=>o.error("Sending response for canceled message failed."));return}}let ye=v.get(Be);if(ye!==void 0){ye.cancel(),De(ue);return}else _.add(Be)}F(y,ue)}finally{J()}},"callback");function Ve(ue){if($())return;function Be(it,dt,z){let se={jsonrpc:u,id:ue.id};it instanceof Ai.ResponseError?se.error=it.toJson():se.result=it===void 0?null:it,Z(se,dt,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(Be,"reply");function et(it,dt,z){let se={jsonrpc:u,id:ue.id,error:it.toJson()};Z(se,dt,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(et,"replyError");function lt(it,dt,z){it===void 0&&(it=null);let se={jsonrpc:u,id:ue.id,result:it};Z(se,dt,z),e.write(se).catch(()=>o.error("Sending response failed."))}a(lt,"replySuccess"),ae(ue);let ye=p.get(ue.method),Le,$e;ye&&(Le=ye.type,$e=ye.handler);let rt=Date.now();if($e||d){let it=ue.id??String(Date.now()),dt=iDe.is(N.receiver)?N.receiver.createCancellationTokenSource(it):N.receiver.createCancellationTokenSource(ue);ue.id!==null&&_.has(ue.id)&&dt.cancel(),ue.id!==null&&v.set(it,dt);try{let z;if($e)if(ue.params===void 0){if(Le!==void 0&&Le.numberOfParams!==0){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines ${Le.numberOfParams} params but received none.`),ue.method,rt);return}z=$e(dt.token)}else if(Array.isArray(ue.params)){if(Le!==void 0&&Le.parameterStructures===Ai.ParameterStructures.byName){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines parameters by name but received parameters by position`),ue.method,rt);return}z=$e(...ue.params,dt.token)}else{if(Le!==void 0&&Le.parameterStructures===Ai.ParameterStructures.byPosition){et(new Ai.ResponseError(Ai.ErrorCodes.InvalidParams,`Request ${ue.method} defines parameters by position but received parameters by name`),ue.method,rt);return}z=$e(ue.params,dt.token)}else d&&(z=d(ue.method,ue.params,dt.token));let se=z;z?se.then?se.then(_e=>{v.delete(it),Be(_e,ue.method,rt)},_e=>{v.delete(it),_e instanceof Ai.ResponseError?et(_e,ue.method,rt):_e&&Qu.string(_e.message)?et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed with message: ${_e.message}`),ue.method,rt):et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed unexpectedly without providing any details.`),ue.method,rt)}):(v.delete(it),Be(z,ue.method,rt)):(v.delete(it),lt(z,ue.method,rt))}catch(z){v.delete(it),z instanceof Ai.ResponseError?Be(z,ue.method,rt):z&&Qu.string(z.message)?et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed with message: ${z.message}`),ue.method,rt):et(new Ai.ResponseError(Ai.ErrorCodes.InternalError,`Request ${ue.method} failed unexpectedly without providing any details.`),ue.method,rt)}}else et(new Ai.ResponseError(Ai.ErrorCodes.MethodNotFound,`Unhandled method ${ue.method}`),ue.method,rt)}a(Ve,"handleRequest");function Ue(ue){if(!$())if(ue.id===null)ue.error?o.error(`Received response message without id: Error is: +${JSON.stringify(ue.error,void 0,4)}`):o.error("Received response message without id. No further error information provided.");else{let Be=ue.id,et=E.get(Be);if(Y(ue,et),et!==void 0){E.delete(Be);try{if(ue.error){let lt=ue.error;et.reject(new Ai.ResponseError(lt.code,lt.message,lt.data))}else if(ue.result!==void 0)et.resolve(ue.result);else throw new Error("Should never happen.")}catch(lt){lt.message?o.error(`Response handler '${et.method}' failed with message: ${lt.message}`):o.error(`Response handler '${et.method}' failed unexpectedly.`)}}}}a(Ue,"handleResponse");function Ke(ue){if($())return;let Be,et;if(ue.method===upe.type.method){let lt=ue.params.id;_.delete(lt),De(ue);return}else{let lt=m.get(ue.method);lt&&(et=lt.handler,Be=lt.type)}if(et||h)try{if(De(ue),et)if(ue.params===void 0)Be!==void 0&&Be.numberOfParams!==0&&Be.parameterStructures!==Ai.ParameterStructures.byName&&o.error(`Notification ${ue.method} defines ${Be.numberOfParams} params but received none.`),et();else if(Array.isArray(ue.params)){let lt=ue.params;ue.method===cpe.type.method&<.length===2&&Igt.is(lt[0])?et({token:lt[0],value:lt[1]}):(Be!==void 0&&(Be.parameterStructures===Ai.ParameterStructures.byName&&o.error(`Notification ${ue.method} defines parameters by name but received parameters by position`),Be.numberOfParams!==ue.params.length&&o.error(`Notification ${ue.method} defines ${Be.numberOfParams} params but received ${lt.length} arguments`)),et(...lt))}else Be!==void 0&&Be.parameterStructures===Ai.ParameterStructures.byPosition&&o.error(`Notification ${ue.method} defines parameters by position but received parameters by name`),et(ue.params);else h&&h(ue.method,ue.params)}catch(lt){lt.message?o.error(`Notification handler '${ue.method}' failed with message: ${lt.message}`):o.error(`Notification handler '${ue.method}' failed unexpectedly.`)}else k.fire(ue)}a(Ke,"handleNotification");function X(ue){if(!ue){o.error("Received empty message.");return}o.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(ue,null,4)}`);let Be=ue;if(Qu.string(Be.id)||Qu.number(Be.id)){let et=Be.id,lt=E.get(et);lt&<.reject(new Error("The received response has neither a result nor an error property."))}}a(X,"handleInvalidMessage");function le(ue){if(ue!=null)switch(b){case Ta.Verbose:return JSON.stringify(ue,null,4);case Ta.Compact:return JSON.stringify(ue);default:return}}a(le,"stringifyTrace");function te(ue){if(!(b===Ta.Off||!x))if(I===UC.Text){let Be;(b===Ta.Verbose||b===Ta.Compact)&&ue.params&&(Be=`Params: ${le(ue.params)} -`),x.log(`Sending request '${ue.method} - (${ue.id})'.`,Be)}else ee("send-request",ue)}a(te,"traceSendingRequest");function xe(ue){if(!(b===Pa.Off||!x))if(I===J_.Text){let Be;(b===Pa.Verbose||b===Pa.Compact)&&(ue.params?Be=`Params: ${le(ue.params)} +`),x.log(`Sending request '${ue.method} - (${ue.id})'.`,Be)}else ee("send-request",ue)}a(te,"traceSendingRequest");function xe(ue){if(!(b===Ta.Off||!x))if(I===UC.Text){let Be;(b===Ta.Verbose||b===Ta.Compact)&&(ue.params?Be=`Params: ${le(ue.params)} `:Be=`No parameters provided. -`),x.log(`Sending notification '${ue.method}'.`,Be)}else ee("send-notification",ue)}a(xe,"traceSendingNotification");function Z(ue,Be,et){if(!(b===Pa.Off||!x))if(I===J_.Text){let ut;(b===Pa.Verbose||b===Pa.Compact)&&(ue.error&&ue.error.data?ut=`Error data: ${le(ue.error.data)} +`),x.log(`Sending notification '${ue.method}'.`,Be)}else ee("send-notification",ue)}a(xe,"traceSendingNotification");function Z(ue,Be,et){if(!(b===Ta.Off||!x))if(I===UC.Text){let lt;(b===Ta.Verbose||b===Ta.Compact)&&(ue.error&&ue.error.data?lt=`Error data: ${le(ue.error.data)} -`:ue.result?ut=`Result: ${le(ue.result)} +`:ue.result?lt=`Result: ${le(ue.result)} -`:ue.error===void 0&&(ut=`No result returned. +`:ue.error===void 0&&(lt=`No result returned. -`)),x.log(`Sending response '${Be} - (${ue.id})'. Processing request took ${Date.now()-et}ms`,ut)}else ee("send-response",ue)}a(Z,"traceSendingResponse");function ae(ue){if(!(b===Pa.Off||!x))if(I===J_.Text){let Be;(b===Pa.Verbose||b===Pa.Compact)&&ue.params&&(Be=`Params: ${le(ue.params)} +`)),x.log(`Sending response '${Be} - (${ue.id})'. Processing request took ${Date.now()-et}ms`,lt)}else ee("send-response",ue)}a(Z,"traceSendingResponse");function ae(ue){if(!(b===Ta.Off||!x))if(I===UC.Text){let Be;(b===Ta.Verbose||b===Ta.Compact)&&ue.params&&(Be=`Params: ${le(ue.params)} -`),x.log(`Received request '${ue.method} - (${ue.id})'.`,Be)}else ee("receive-request",ue)}a(ae,"traceReceivedRequest");function Ne(ue){if(!(b===Pa.Off||!x||ue.method===s5e.type.method))if(I===J_.Text){let Be;(b===Pa.Verbose||b===Pa.Compact)&&(ue.params?Be=`Params: ${le(ue.params)} +`),x.log(`Received request '${ue.method} - (${ue.id})'.`,Be)}else ee("receive-request",ue)}a(ae,"traceReceivedRequest");function De(ue){if(!(b===Ta.Off||!x||ue.method===nDe.type.method))if(I===UC.Text){let Be;(b===Ta.Verbose||b===Ta.Compact)&&(ue.params?Be=`Params: ${le(ue.params)} `:Be=`No parameters provided. -`),x.log(`Received notification '${ue.method}'.`,Be)}else ee("receive-notification",ue)}a(Ne,"traceReceivedNotification");function Y(ue,Be){if(!(b===Pa.Off||!x))if(I===J_.Text){let et;if((b===Pa.Verbose||b===Pa.Compact)&&(ue.error&&ue.error.data?et=`Error data: ${le(ue.error.data)} +`),x.log(`Received notification '${ue.method}'.`,Be)}else ee("receive-notification",ue)}a(De,"traceReceivedNotification");function Y(ue,Be){if(!(b===Ta.Off||!x))if(I===UC.Text){let et;if((b===Ta.Verbose||b===Ta.Compact)&&(ue.error&&ue.error.data?et=`Error data: ${le(ue.error.data)} `:ue.result?et=`Result: ${le(ue.result)} `:ue.error===void 0&&(et=`No result returned. -`)),Be){let ut=ue.error?` Request failed: ${ue.error.message} (${ue.error.code}).`:"";x.log(`Received response '${Be.method} - (${ue.id})' in ${Date.now()-Be.timerStart}ms.${ut}`,et)}else x.log(`Received response ${ue.id} without active response promise.`,et)}else ee("receive-response",ue)}a(Y,"traceReceivedResponse");function ee(ue,Be){if(!x||b===Pa.Off)return;let et={isLSPMessage:!0,type:ue,message:Be,timestamp:Date.now()};x.log(et)}a(ee,"logLSPMessage");function Ee(){if(H())throw new PZ(Ype.Closed,"Connection is closed.");if($())throw new PZ(Ype.Disposed,"Connection is disposed.")}a(Ee,"throwIfClosedOrDisposed");function Ae(){if(L())throw new PZ(Ype.AlreadyListening,"Connection is already listening")}a(Ae,"throwIfListening");function ve(){if(!L())throw new Error("Call listen() first.")}a(ve,"throwIfNotListening");function We(ue){return ue===void 0?null:ue}a(We,"undefinedToNull");function Ze(ue){if(ue!==null)return ue}a(Ze,"nullToUndefined");function vt(ue){return ue!=null&&!Array.isArray(ue)&&typeof ue=="object"}a(vt,"isNamedParam");function Nt(ue,Be){switch(ue){case Ai.ParameterStructures.auto:return vt(Be)?Ze(Be):[We(Be)];case Ai.ParameterStructures.byName:if(!vt(Be))throw new Error("Received parameters by name but param is not an object literal.");return Ze(Be);case Ai.ParameterStructures.byPosition:return[We(Be)];default:throw new Error(`Unknown parameter structure ${ue.toString()}`)}}a(Nt,"computeSingleParam");function Gt(ue,Be){let et,ut=ue.numberOfParams;switch(ut){case 0:et=void 0;break;case 1:et=Nt(ue.parameterStructures,Be[0]);break;default:et=[];for(let ye=0;ye{Ee();let et,ut;if(Ku.string(ue)){et=ue;let Le=Be[0],$e=0,rt=Ai.ParameterStructures.auto;Ai.ParameterStructures.is(Le)&&($e=1,rt=Le);let ot=Be.length,ft=ot-$e;switch(ft){case 0:ut=void 0;break;case 1:ut=Nt(rt,Be[$e]);break;default:if(rt===Ai.ParameterStructures.byName)throw new Error(`Received ${ft} parameters for 'by Name' notification parameter structure.`);ut=Be.slice($e,ot).map(z=>We(z));break}}else{let Le=Be;et=ue.method,ut=Gt(ue,Le)}let ye={jsonrpc:u,method:et,params:ut};return xe(ye),e.write(ye).catch(Le=>{throw o.error("Sending notification failed."),Le})},"sendNotification"),onNotification:a((ue,Be)=>{Ee();let et;return Ku.func(ue)?h=ue:Be&&(Ku.string(ue)?(et=ue,m.set(ue,{type:void 0,handler:Be})):(et=ue.method,m.set(ue.method,{type:ue,handler:Be}))),{dispose:a(()=>{et!==void 0?m.delete(et):h=void 0},"dispose")}},"onNotification"),onProgress:a((ue,Be,et)=>{if(g.has(Be))throw new Error(`Progress handler for token ${Be} already registered`);return g.set(Be,et),{dispose:a(()=>{g.delete(Be)},"dispose")}},"onProgress"),sendProgress:a((ue,Be,et)=>Qt.sendNotification(zpe.type,{token:Be,value:et}),"sendProgress"),onUnhandledProgress:Q.event,sendRequest:a((ue,...Be)=>{Ee(),ve();let et,ut,ye;if(Ku.string(ue)){et=ue;let ot=Be[0],ft=Be[Be.length-1],z=0,se=Ai.ParameterStructures.auto;Ai.ParameterStructures.is(ot)&&(z=1,se=ot);let Ce=Be.length;AAt.CancellationToken.is(ft)&&(Ce=Ce-1,ye=ft);let we=Ce-z;switch(we){case 0:ut=void 0;break;case 1:ut=Nt(se,Be[z]);break;default:if(se===Ai.ParameterStructures.byName)throw new Error(`Received ${we} parameters for 'by Name' request parameter structure.`);ut=Be.slice(z,Ce).map(je=>We(je));break}}else{let ot=Be;et=ue.method,ut=Gt(ue,ot);let ft=ue.numberOfParams;ye=AAt.CancellationToken.is(ot[ft])?ot[ft]:void 0}let Le=s++,$e;ye&&($e=ye.onCancellationRequested(()=>{let ot=D.sender.sendCancellation(Qt,Le);return ot===void 0?(o.log(`Received no promise from cancellation strategy when cancelling id ${Le}`),Promise.resolve()):ot.catch(()=>{o.log(`Sending cancellation messages for id ${Le} failed`)})}));let rt={jsonrpc:u,id:Le,method:et,params:ut};return te(rt),typeof D.sender.enableCancellation=="function"&&D.sender.enableCancellation(rt),new Promise(async(ot,ft)=>{let z=a(we=>{ot(we),D.sender.cleanup(Le),$e?.dispose()},"resolveWithCleanup"),se=a(we=>{ft(we),D.sender.cleanup(Le),$e?.dispose()},"rejectWithCleanup"),Ce={method:et,timerStart:Date.now(),resolve:z,reject:se};try{await e.write(rt),E.set(Le,Ce)}catch(we){throw o.error("Sending request failed."),Ce.reject(new Ai.ResponseError(Ai.ErrorCodes.MessageWriteError,we.message?we.message:"Unknown reason")),we}})},"sendRequest"),onRequest:a((ue,Be)=>{Ee();let et=null;return CAt.is(ue)?(et=void 0,d=ue):Ku.string(ue)?(et=null,Be!==void 0&&(et=ue,p.set(ue,{handler:Be,type:void 0}))):Be!==void 0&&(et=ue.method,p.set(ue.method,{type:ue,handler:Be})),{dispose:a(()=>{et!==null&&(et!==void 0?p.delete(et):d=void 0)},"dispose")}},"onRequest"),hasPendingResponse:a(()=>E.size>0,"hasPendingResponse"),trace:a(async(ue,Be,et)=>{let ut=!1,ye=J_.Text;et!==void 0&&(Ku.boolean(et)?ut=et:(ut=et.sendNotification||!1,ye=et.traceFormat||J_.Text)),b=ue,I=ye,b===Pa.Off?x=void 0:x=Be,ut&&!H()&&!$()&&await Qt.sendNotification(_At.type,{value:Pa.toString(ue)})},"trace"),onError:w.event,onClose:P.event,onUnhandledNotification:k.event,onDispose:M.event,end:a(()=>{e.end()},"end"),dispose:a(()=>{if($())return;R=XI.Disposed,M.fire(void 0);let ue=new Ai.ResponseError(Ai.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Be of E.values())Be.reject(ue);E=new Map,v=new Map,_=new Set,y=new eIr.LinkedMap,Ku.func(e.dispose)&&e.dispose(),Ku.func(t.dispose)&&t.dispose()},"dispose"),listen:a(()=>{Ee(),Ae(),R=XI.Listening,t.listen(De)},"listen"),inspect:a(()=>{(0,ZSr.default)().console.log("inspect")},"inspect")};return Qt.onNotification(s5e.type,ue=>{if(b===Pa.Off||!x)return;let Be=b===Pa.Verbose||b===Pa.Compact;x.log(ue.message,Be?ue.verbose:void 0)}),Qt.onNotification(zpe.type,ue=>{let Be=g.get(ue.token);Be?Be(ue.value):Q.fire(ue)}),Qt}a(QRi,"createMessageConnection");ro.createMessageConnection=QRi});var f5e=T(wt=>{"use strict";f();Object.defineProperty(wt,"__esModule",{value:!0});wt.ProgressType=wt.ProgressToken=wt.createMessageConnection=wt.NullLogger=wt.ConnectionOptions=wt.ConnectionStrategy=wt.AbstractMessageBuffer=wt.WriteableStreamMessageWriter=wt.AbstractMessageWriter=wt.MessageWriter=wt.ReadableStreamMessageReader=wt.AbstractMessageReader=wt.MessageReader=wt.SharedArrayReceiverStrategy=wt.SharedArraySenderStrategy=wt.CancellationToken=wt.CancellationTokenSource=wt.Emitter=wt.Event=wt.Disposable=wt.LRUCache=wt.Touch=wt.LinkedMap=wt.ParameterStructures=wt.NotificationType9=wt.NotificationType8=wt.NotificationType7=wt.NotificationType6=wt.NotificationType5=wt.NotificationType4=wt.NotificationType3=wt.NotificationType2=wt.NotificationType1=wt.NotificationType0=wt.NotificationType=wt.ErrorCodes=wt.ResponseError=wt.RequestType9=wt.RequestType8=wt.RequestType7=wt.RequestType6=wt.RequestType5=wt.RequestType4=wt.RequestType3=wt.RequestType2=wt.RequestType1=wt.RequestType0=wt.RequestType=wt.Message=wt.RAL=void 0;wt.MessageStrategy=wt.CancellationStrategy=wt.CancellationSenderStrategy=wt.CancellationReceiverStrategy=wt.ConnectionError=wt.ConnectionErrors=wt.LogTraceNotification=wt.SetTraceNotification=wt.TraceFormat=wt.TraceValues=wt.Trace=void 0;var rl=Ygt();Object.defineProperty(wt,"Message",{enumerable:!0,get:a(function(){return rl.Message},"get")});Object.defineProperty(wt,"RequestType",{enumerable:!0,get:a(function(){return rl.RequestType},"get")});Object.defineProperty(wt,"RequestType0",{enumerable:!0,get:a(function(){return rl.RequestType0},"get")});Object.defineProperty(wt,"RequestType1",{enumerable:!0,get:a(function(){return rl.RequestType1},"get")});Object.defineProperty(wt,"RequestType2",{enumerable:!0,get:a(function(){return rl.RequestType2},"get")});Object.defineProperty(wt,"RequestType3",{enumerable:!0,get:a(function(){return rl.RequestType3},"get")});Object.defineProperty(wt,"RequestType4",{enumerable:!0,get:a(function(){return rl.RequestType4},"get")});Object.defineProperty(wt,"RequestType5",{enumerable:!0,get:a(function(){return rl.RequestType5},"get")});Object.defineProperty(wt,"RequestType6",{enumerable:!0,get:a(function(){return rl.RequestType6},"get")});Object.defineProperty(wt,"RequestType7",{enumerable:!0,get:a(function(){return rl.RequestType7},"get")});Object.defineProperty(wt,"RequestType8",{enumerable:!0,get:a(function(){return rl.RequestType8},"get")});Object.defineProperty(wt,"RequestType9",{enumerable:!0,get:a(function(){return rl.RequestType9},"get")});Object.defineProperty(wt,"ResponseError",{enumerable:!0,get:a(function(){return rl.ResponseError},"get")});Object.defineProperty(wt,"ErrorCodes",{enumerable:!0,get:a(function(){return rl.ErrorCodes},"get")});Object.defineProperty(wt,"NotificationType",{enumerable:!0,get:a(function(){return rl.NotificationType},"get")});Object.defineProperty(wt,"NotificationType0",{enumerable:!0,get:a(function(){return rl.NotificationType0},"get")});Object.defineProperty(wt,"NotificationType1",{enumerable:!0,get:a(function(){return rl.NotificationType1},"get")});Object.defineProperty(wt,"NotificationType2",{enumerable:!0,get:a(function(){return rl.NotificationType2},"get")});Object.defineProperty(wt,"NotificationType3",{enumerable:!0,get:a(function(){return rl.NotificationType3},"get")});Object.defineProperty(wt,"NotificationType4",{enumerable:!0,get:a(function(){return rl.NotificationType4},"get")});Object.defineProperty(wt,"NotificationType5",{enumerable:!0,get:a(function(){return rl.NotificationType5},"get")});Object.defineProperty(wt,"NotificationType6",{enumerable:!0,get:a(function(){return rl.NotificationType6},"get")});Object.defineProperty(wt,"NotificationType7",{enumerable:!0,get:a(function(){return rl.NotificationType7},"get")});Object.defineProperty(wt,"NotificationType8",{enumerable:!0,get:a(function(){return rl.NotificationType8},"get")});Object.defineProperty(wt,"NotificationType9",{enumerable:!0,get:a(function(){return rl.NotificationType9},"get")});Object.defineProperty(wt,"ParameterStructures",{enumerable:!0,get:a(function(){return rl.ParameterStructures},"get")});var TAt=Jgt();Object.defineProperty(wt,"LinkedMap",{enumerable:!0,get:a(function(){return TAt.LinkedMap},"get")});Object.defineProperty(wt,"LRUCache",{enumerable:!0,get:a(function(){return TAt.LRUCache},"get")});Object.defineProperty(wt,"Touch",{enumerable:!0,get:a(function(){return TAt.Touch},"get")});var qRi=GSr();Object.defineProperty(wt,"Disposable",{enumerable:!0,get:a(function(){return qRi.Disposable},"get")});var iIr=IZ();Object.defineProperty(wt,"Event",{enumerable:!0,get:a(function(){return iIr.Event},"get")});Object.defineProperty(wt,"Emitter",{enumerable:!0,get:a(function(){return iIr.Emitter},"get")});var oIr=t5e();Object.defineProperty(wt,"CancellationTokenSource",{enumerable:!0,get:a(function(){return oIr.CancellationTokenSource},"get")});Object.defineProperty(wt,"CancellationToken",{enumerable:!0,get:a(function(){return oIr.CancellationToken},"get")});var sIr=jSr();Object.defineProperty(wt,"SharedArraySenderStrategy",{enumerable:!0,get:a(function(){return sIr.SharedArraySenderStrategy},"get")});Object.defineProperty(wt,"SharedArrayReceiverStrategy",{enumerable:!0,get:a(function(){return sIr.SharedArrayReceiverStrategy},"get")});var SAt=VSr();Object.defineProperty(wt,"MessageReader",{enumerable:!0,get:a(function(){return SAt.MessageReader},"get")});Object.defineProperty(wt,"AbstractMessageReader",{enumerable:!0,get:a(function(){return SAt.AbstractMessageReader},"get")});Object.defineProperty(wt,"ReadableStreamMessageReader",{enumerable:!0,get:a(function(){return SAt.ReadableStreamMessageReader},"get")});var IAt=JSr();Object.defineProperty(wt,"MessageWriter",{enumerable:!0,get:a(function(){return IAt.MessageWriter},"get")});Object.defineProperty(wt,"AbstractMessageWriter",{enumerable:!0,get:a(function(){return IAt.AbstractMessageWriter},"get")});Object.defineProperty(wt,"WriteableStreamMessageWriter",{enumerable:!0,get:a(function(){return IAt.WriteableStreamMessageWriter},"get")});var GRi=XSr();Object.defineProperty(wt,"AbstractMessageBuffer",{enumerable:!0,get:a(function(){return GRi.AbstractMessageBuffer},"get")});var sm=nIr();Object.defineProperty(wt,"ConnectionStrategy",{enumerable:!0,get:a(function(){return sm.ConnectionStrategy},"get")});Object.defineProperty(wt,"ConnectionOptions",{enumerable:!0,get:a(function(){return sm.ConnectionOptions},"get")});Object.defineProperty(wt,"NullLogger",{enumerable:!0,get:a(function(){return sm.NullLogger},"get")});Object.defineProperty(wt,"createMessageConnection",{enumerable:!0,get:a(function(){return sm.createMessageConnection},"get")});Object.defineProperty(wt,"ProgressToken",{enumerable:!0,get:a(function(){return sm.ProgressToken},"get")});Object.defineProperty(wt,"ProgressType",{enumerable:!0,get:a(function(){return sm.ProgressType},"get")});Object.defineProperty(wt,"Trace",{enumerable:!0,get:a(function(){return sm.Trace},"get")});Object.defineProperty(wt,"TraceValues",{enumerable:!0,get:a(function(){return sm.TraceValues},"get")});Object.defineProperty(wt,"TraceFormat",{enumerable:!0,get:a(function(){return sm.TraceFormat},"get")});Object.defineProperty(wt,"SetTraceNotification",{enumerable:!0,get:a(function(){return sm.SetTraceNotification},"get")});Object.defineProperty(wt,"LogTraceNotification",{enumerable:!0,get:a(function(){return sm.LogTraceNotification},"get")});Object.defineProperty(wt,"ConnectionErrors",{enumerable:!0,get:a(function(){return sm.ConnectionErrors},"get")});Object.defineProperty(wt,"ConnectionError",{enumerable:!0,get:a(function(){return sm.ConnectionError},"get")});Object.defineProperty(wt,"CancellationReceiverStrategy",{enumerable:!0,get:a(function(){return sm.CancellationReceiverStrategy},"get")});Object.defineProperty(wt,"CancellationSenderStrategy",{enumerable:!0,get:a(function(){return sm.CancellationSenderStrategy},"get")});Object.defineProperty(wt,"CancellationStrategy",{enumerable:!0,get:a(function(){return sm.CancellationStrategy},"get")});Object.defineProperty(wt,"MessageStrategy",{enumerable:!0,get:a(function(){return sm.MessageStrategy},"get")});var HRi=bL();wt.RAL=HRi.default});var lIr=T(PAt=>{"use strict";f();Object.defineProperty(PAt,"__esModule",{value:!0});var aIr=require("util"),H5=f5e(),p5e=class t extends H5.AbstractMessageBuffer{static{a(this,"MessageBuffer")}constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,r){return Buffer.from(e,r)}toString(e,r){return e instanceof Buffer?e.toString(r):new aIr.TextDecoder(r).decode(e)}asNative(e,r){return r===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,r):Buffer.from(e,0,r)}allocNative(e){return Buffer.allocUnsafe(e)}};p5e.emptyBuffer=Buffer.allocUnsafe(0);var xAt=class{static{a(this,"ReadableStreamWrapper")}constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),H5.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),H5.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),H5.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),H5.Disposable.create(()=>this.stream.off("data",e))}},wAt=class{static{a(this,"WritableStreamWrapper")}constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),H5.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),H5.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),H5.Disposable.create(()=>this.stream.off("end",e))}write(e,r){return new Promise((n,o)=>{let s=a(c=>{c==null?n():o(c)},"callback");typeof e=="string"?this.stream.write(e,r,s):this.stream.write(e,s)})}end(){this.stream.end()}},cIr=Object.freeze({messageBuffer:Object.freeze({create:a(t=>new p5e(t),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:a((t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(r){return Promise.reject(r)}},"encode")}),decoder:Object.freeze({name:"application/json",decode:a((t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new aIr.TextDecoder(e.charset).decode(t)))}catch(r){return Promise.reject(r)}},"decode")})}),stream:Object.freeze({asReadableStream:a(t=>new xAt(t),"asReadableStream"),asWritableStream:a(t=>new wAt(t),"asWritableStream")}),console,timer:Object.freeze({setTimeout(t,e,...r){let n=setTimeout(t,e,...r);return{dispose:a(()=>clearTimeout(n),"dispose")}},setImmediate(t,...e){let r=setImmediate(t,...e);return{dispose:a(()=>clearImmediate(r),"dispose")}},setInterval(t,e,...r){let n=setInterval(t,e,...r);return{dispose:a(()=>clearInterval(n),"dispose")}}})});function RAt(){return cIr}a(RAt,"RIL");(function(t){function e(){H5.RAL.install(cIr)}a(e,"install"),t.install=e})(RAt||(RAt={}));PAt.default=RAt});var Kq=T(Us=>{"use strict";f();var jRi=Us&&Us.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$Ri=Us&&Us.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&jRi(e,t,r)};Object.defineProperty(Us,"__esModule",{value:!0});Us.createMessageConnection=Us.createServerSocketTransport=Us.createClientSocketTransport=Us.createServerPipeTransport=Us.createClientPipeTransport=Us.generateRandomPipeName=Us.StreamMessageWriter=Us.StreamMessageReader=Us.SocketMessageWriter=Us.SocketMessageReader=Us.PortMessageWriter=Us.PortMessageReader=Us.IPCMessageWriter=Us.IPCMessageReader=void 0;var kZ=lIr();kZ.default.install();var uIr=require("path"),VRi=require("os"),WRi=require("crypto"),g5e=require("net"),X_=f5e();$Ri(f5e(),Us);var kAt=class extends X_.AbstractMessageReader{static{a(this,"IPCMessageReader")}constructor(e){super(),this.process=e;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),X_.Disposable.create(()=>this.process.off("message",e))}};Us.IPCMessageReader=kAt;var NAt=class extends X_.AbstractMessageWriter{static{a(this,"IPCMessageWriter")}constructor(e){super(),this.process=e,this.errorCount=0;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,r=>{r?(this.errorCount++,this.handleError(r,e)):this.errorCount=0}),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Us.IPCMessageWriter=NAt;var DAt=class extends X_.AbstractMessageReader{static{a(this,"PortMessageReader")}constructor(e){super(),this.onData=new X_.Emitter,e.on("close",()=>this.fireClose),e.on("error",r=>this.fireError(r)),e.on("message",r=>{this.onData.fire(r)})}listen(e){return this.onData.event(e)}};Us.PortMessageReader=DAt;var MAt=class extends X_.AbstractMessageWriter{static{a(this,"PortMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",r=>this.fireError(r))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Us.PortMessageWriter=MAt;var zq=class extends X_.ReadableStreamMessageReader{static{a(this,"SocketMessageReader")}constructor(e,r="utf-8"){super((0,kZ.default)().stream.asReadableStream(e),r)}};Us.SocketMessageReader=zq;var Yq=class extends X_.WriteableStreamMessageWriter{static{a(this,"SocketMessageWriter")}constructor(e,r){super((0,kZ.default)().stream.asWritableStream(e),r),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};Us.SocketMessageWriter=Yq;var h5e=class extends X_.ReadableStreamMessageReader{static{a(this,"StreamMessageReader")}constructor(e,r){super((0,kZ.default)().stream.asReadableStream(e),r)}};Us.StreamMessageReader=h5e;var m5e=class extends X_.WriteableStreamMessageWriter{static{a(this,"StreamMessageWriter")}constructor(e,r){super((0,kZ.default)().stream.asWritableStream(e),r)}};Us.StreamMessageWriter=m5e;var dIr=process.env.XDG_RUNTIME_DIR,zRi=new Map([["linux",107],["darwin",103]]);function YRi(){let t=(0,WRi.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let e;dIr?e=uIr.join(dIr,`vscode-ipc-${t}.sock`):e=uIr.join(VRi.tmpdir(),`vscode-${t}.sock`);let r=zRi.get(process.platform);return r!==void 0&&e.length>r&&(0,kZ.default)().console.warn(`WARNING: IPC handle "${e}" is longer than ${r} characters.`),e}a(YRi,"generateRandomPipeName");Us.generateRandomPipeName=YRi;function KRi(t,e="utf-8"){let r,n=new Promise((o,s)=>{r=o});return new Promise((o,s)=>{let c=(0,g5e.createServer)(l=>{c.close(),r([new zq(l,e),new Yq(l,e)])});c.on("error",s),c.listen(t,()=>{c.removeListener("error",s),o({onConnected:a(()=>n,"onConnected")})})})}a(KRi,"createClientPipeTransport");Us.createClientPipeTransport=KRi;function JRi(t,e="utf-8"){let r=(0,g5e.createConnection)(t);return[new zq(r,e),new Yq(r,e)]}a(JRi,"createServerPipeTransport");Us.createServerPipeTransport=JRi;function XRi(t,e="utf-8"){let r,n=new Promise((o,s)=>{r=o});return new Promise((o,s)=>{let c=(0,g5e.createServer)(l=>{c.close(),r([new zq(l,e),new Yq(l,e)])});c.on("error",s),c.listen(t,"127.0.0.1",()=>{c.removeListener("error",s),o({onConnected:a(()=>n,"onConnected")})})})}a(XRi,"createClientSocketTransport");Us.createClientSocketTransport=XRi;function ZRi(t,e="utf-8"){let r=(0,g5e.createConnection)(t,"127.0.0.1");return[new zq(r,e),new Yq(r,e)]}a(ZRi,"createServerSocketTransport");Us.createServerSocketTransport=ZRi;function e2i(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}a(e2i,"isReadableStream");function t2i(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}a(t2i,"isWritableStream");function r2i(t,e,r,n){r||(r=X_.NullLogger);let o=e2i(t)?new h5e(t):t,s=t2i(e)?new m5e(e):e;return X_.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,X_.createMessageConnection)(o,s,r,n)}a(r2i,"createMessageConnection");Us.createMessageConnection=r2i});var OAt=T((Voc,fIr)=>{"use strict";f();fIr.exports=Kq()});var Jpe=T((pIr,A5e)=>{f();(function(t){if(typeof A5e=="object"&&typeof A5e.exports=="object"){var e=t(require,pIr);e!==void 0&&(A5e.exports=e)}else typeof define=="function"&&define.amd&&define(["require","exports"],t)})(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocument=e.EOL=e.WorkspaceFolder=e.InlineCompletionContext=e.SelectedCompletionInfo=e.InlineCompletionTriggerKind=e.InlineCompletionList=e.InlineCompletionItem=e.StringValue=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.SemanticTokens=e.SemanticTokenModifiers=e.SemanticTokenTypes=e.SelectionRange=e.DocumentLink=e.FormattingOptions=e.CodeLens=e.CodeAction=e.CodeActionContext=e.CodeActionTriggerKind=e.CodeActionKind=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.SignatureInformation=e.ParameterInformation=e.Hover=e.MarkedString=e.CompletionList=e.CompletionItem=e.CompletionItemLabelDetails=e.InsertTextMode=e.InsertReplaceEdit=e.CompletionItemTag=e.InsertTextFormat=e.CompletionItemKind=e.MarkupContent=e.MarkupKind=e.TextDocumentItem=e.OptionalVersionedTextDocumentIdentifier=e.VersionedTextDocumentIdentifier=e.TextDocumentIdentifier=e.WorkspaceChange=e.WorkspaceEdit=e.DeleteFile=e.RenameFile=e.CreateFile=e.TextDocumentEdit=e.AnnotatedTextEdit=e.ChangeAnnotationIdentifier=e.ChangeAnnotation=e.TextEdit=e.Command=e.Diagnostic=e.CodeDescription=e.DiagnosticTag=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.FoldingRange=e.FoldingRangeKind=e.ColorPresentation=e.ColorInformation=e.Color=e.LocationLink=e.Location=e.Range=e.Position=e.uinteger=e.integer=e.URI=e.DocumentUri=void 0;var r;(function(K){function pe(me){return typeof me=="string"}a(pe,"is"),K.is=pe})(r||(e.DocumentUri=r={}));var n;(function(K){function pe(me){return typeof me=="string"}a(pe,"is"),K.is=pe})(n||(e.URI=n={}));var o;(function(K){K.MIN_VALUE=-2147483648,K.MAX_VALUE=2147483647;function pe(me){return typeof me=="number"&&K.MIN_VALUE<=me&&me<=K.MAX_VALUE}a(pe,"is"),K.is=pe})(o||(e.integer=o={}));var s;(function(K){K.MIN_VALUE=0,K.MAX_VALUE=2147483647;function pe(me){return typeof me=="number"&&K.MIN_VALUE<=me&&me<=K.MAX_VALUE}a(pe,"is"),K.is=pe})(s||(e.uinteger=s={}));var c;(function(K){function pe(ne,V){return ne===Number.MAX_VALUE&&(ne=s.MAX_VALUE),V===Number.MAX_VALUE&&(V=s.MAX_VALUE),{line:ne,character:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.uinteger(V.line)&&Ie.uinteger(V.character)}a(me,"is"),K.is=me})(c||(e.Position=c={}));var l;(function(K){function pe(ne,V,Re,ze){if(Ie.uinteger(ne)&&Ie.uinteger(V)&&Ie.uinteger(Re)&&Ie.uinteger(ze))return{start:c.create(ne,V),end:c.create(Re,ze)};if(c.is(ne)&&c.is(V))return{start:ne,end:V};throw new Error("Range#create called with invalid arguments[".concat(ne,", ").concat(V,", ").concat(Re,", ").concat(ze,"]"))}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&c.is(V.start)&&c.is(V.end)}a(me,"is"),K.is=me})(l||(e.Range=l={}));var u;(function(K){function pe(ne,V){return{uri:ne,range:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.range)&&(Ie.string(V.uri)||Ie.undefined(V.uri))}a(me,"is"),K.is=me})(u||(e.Location=u={}));var d;(function(K){function pe(ne,V,Re,ze){return{targetUri:ne,targetRange:V,targetSelectionRange:Re,originSelectionRange:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.targetRange)&&Ie.string(V.targetUri)&&l.is(V.targetSelectionRange)&&(l.is(V.originSelectionRange)||Ie.undefined(V.originSelectionRange))}a(me,"is"),K.is=me})(d||(e.LocationLink=d={}));var p;(function(K){function pe(ne,V,Re,ze){return{red:ne,green:V,blue:Re,alpha:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.numberRange(V.red,0,1)&&Ie.numberRange(V.green,0,1)&&Ie.numberRange(V.blue,0,1)&&Ie.numberRange(V.alpha,0,1)}a(me,"is"),K.is=me})(p||(e.Color=p={}));var h;(function(K){function pe(ne,V){return{range:ne,color:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.range)&&p.is(V.color)}a(me,"is"),K.is=me})(h||(e.ColorInformation=h={}));var m;(function(K){function pe(ne,V,Re){return{label:ne,textEdit:V,additionalTextEdits:Re}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.string(V.label)&&(Ie.undefined(V.textEdit)||x.is(V))&&(Ie.undefined(V.additionalTextEdits)||Ie.typedArray(V.additionalTextEdits,x.is))}a(me,"is"),K.is=me})(m||(e.ColorPresentation=m={}));var g;(function(K){K.Comment="comment",K.Imports="imports",K.Region="region"})(g||(e.FoldingRangeKind=g={}));var A;(function(K){function pe(ne,V,Re,ze,Mt,rr){var zt={startLine:ne,endLine:V};return Ie.defined(Re)&&(zt.startCharacter=Re),Ie.defined(ze)&&(zt.endCharacter=ze),Ie.defined(Mt)&&(zt.kind=Mt),Ie.defined(rr)&&(zt.collapsedText=rr),zt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.uinteger(V.startLine)&&Ie.uinteger(V.startLine)&&(Ie.undefined(V.startCharacter)||Ie.uinteger(V.startCharacter))&&(Ie.undefined(V.endCharacter)||Ie.uinteger(V.endCharacter))&&(Ie.undefined(V.kind)||Ie.string(V.kind))}a(me,"is"),K.is=me})(A||(e.FoldingRange=A={}));var y;(function(K){function pe(ne,V){return{location:ne,message:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&u.is(V.location)&&Ie.string(V.message)}a(me,"is"),K.is=me})(y||(e.DiagnosticRelatedInformation=y={}));var E;(function(K){K.Error=1,K.Warning=2,K.Information=3,K.Hint=4})(E||(e.DiagnosticSeverity=E={}));var _;(function(K){K.Unnecessary=1,K.Deprecated=2})(_||(e.DiagnosticTag=_={}));var v;(function(K){function pe(me){var ne=me;return Ie.objectLiteral(ne)&&Ie.string(ne.href)}a(pe,"is"),K.is=pe})(v||(e.CodeDescription=v={}));var b;(function(K){function pe(ne,V,Re,ze,Mt,rr){var zt={range:ne,message:V};return Ie.defined(Re)&&(zt.severity=Re),Ie.defined(ze)&&(zt.code=ze),Ie.defined(Mt)&&(zt.source=Mt),Ie.defined(rr)&&(zt.relatedInformation=rr),zt}a(pe,"create"),K.create=pe;function me(ne){var V,Re=ne;return Ie.defined(Re)&&l.is(Re.range)&&Ie.string(Re.message)&&(Ie.number(Re.severity)||Ie.undefined(Re.severity))&&(Ie.integer(Re.code)||Ie.string(Re.code)||Ie.undefined(Re.code))&&(Ie.undefined(Re.codeDescription)||Ie.string((V=Re.codeDescription)===null||V===void 0?void 0:V.href))&&(Ie.string(Re.source)||Ie.undefined(Re.source))&&(Ie.undefined(Re.relatedInformation)||Ie.typedArray(Re.relatedInformation,y.is))}a(me,"is"),K.is=me})(b||(e.Diagnostic=b={}));var I;(function(K){function pe(ne,V){for(var Re=[],ze=2;ze0&&(Mt.arguments=Re),Mt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.title)&&Ie.string(V.command)}a(me,"is"),K.is=me})(I||(e.Command=I={}));var x;(function(K){function pe(Re,ze){return{range:Re,newText:ze}}a(pe,"replace"),K.replace=pe;function me(Re,ze){return{range:{start:Re,end:Re},newText:ze}}a(me,"insert"),K.insert=me;function ne(Re){return{range:Re,newText:""}}a(ne,"del"),K.del=ne;function V(Re){var ze=Re;return Ie.objectLiteral(ze)&&Ie.string(ze.newText)&&l.is(ze.range)}a(V,"is"),K.is=V})(x||(e.TextEdit=x={}));var R;(function(K){function pe(ne,V,Re){var ze={label:ne};return V!==void 0&&(ze.needsConfirmation=V),Re!==void 0&&(ze.description=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.string(V.label)&&(Ie.boolean(V.needsConfirmation)||V.needsConfirmation===void 0)&&(Ie.string(V.description)||V.description===void 0)}a(me,"is"),K.is=me})(R||(e.ChangeAnnotation=R={}));var w;(function(K){function pe(me){var ne=me;return Ie.string(ne)}a(pe,"is"),K.is=pe})(w||(e.ChangeAnnotationIdentifier=w={}));var P;(function(K){function pe(Re,ze,Mt){return{range:Re,newText:ze,annotationId:Mt}}a(pe,"replace"),K.replace=pe;function me(Re,ze,Mt){return{range:{start:Re,end:Re},newText:ze,annotationId:Mt}}a(me,"insert"),K.insert=me;function ne(Re,ze){return{range:Re,newText:"",annotationId:ze}}a(ne,"del"),K.del=ne;function V(Re){var ze=Re;return x.is(ze)&&(R.is(ze.annotationId)||w.is(ze.annotationId))}a(V,"is"),K.is=V})(P||(e.AnnotatedTextEdit=P={}));var k;(function(K){function pe(ne,V){return{textDocument:ne,edits:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&H.is(V.textDocument)&&Array.isArray(V.edits)}a(me,"is"),K.is=me})(k||(e.TextDocumentEdit=k={}));var Q;(function(K){function pe(ne,V,Re){var ze={kind:"create",uri:ne};return V!==void 0&&(V.overwrite!==void 0||V.ignoreIfExists!==void 0)&&(ze.options=V),Re!==void 0&&(ze.annotationId=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="create"&&Ie.string(V.uri)&&(V.options===void 0||(V.options.overwrite===void 0||Ie.boolean(V.options.overwrite))&&(V.options.ignoreIfExists===void 0||Ie.boolean(V.options.ignoreIfExists)))&&(V.annotationId===void 0||w.is(V.annotationId))}a(me,"is"),K.is=me})(Q||(e.CreateFile=Q={}));var M;(function(K){function pe(ne,V,Re,ze){var Mt={kind:"rename",oldUri:ne,newUri:V};return Re!==void 0&&(Re.overwrite!==void 0||Re.ignoreIfExists!==void 0)&&(Mt.options=Re),ze!==void 0&&(Mt.annotationId=ze),Mt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="rename"&&Ie.string(V.oldUri)&&Ie.string(V.newUri)&&(V.options===void 0||(V.options.overwrite===void 0||Ie.boolean(V.options.overwrite))&&(V.options.ignoreIfExists===void 0||Ie.boolean(V.options.ignoreIfExists)))&&(V.annotationId===void 0||w.is(V.annotationId))}a(me,"is"),K.is=me})(M||(e.RenameFile=M={}));var D;(function(K){function pe(ne,V,Re){var ze={kind:"delete",uri:ne};return V!==void 0&&(V.recursive!==void 0||V.ignoreIfNotExists!==void 0)&&(ze.options=V),Re!==void 0&&(ze.annotationId=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="delete"&&Ie.string(V.uri)&&(V.options===void 0||(V.options.recursive===void 0||Ie.boolean(V.options.recursive))&&(V.options.ignoreIfNotExists===void 0||Ie.boolean(V.options.ignoreIfNotExists)))&&(V.annotationId===void 0||w.is(V.annotationId))}a(me,"is"),K.is=me})(D||(e.DeleteFile=D={}));var G;(function(K){function pe(me){var ne=me;return ne&&(ne.changes!==void 0||ne.documentChanges!==void 0)&&(ne.documentChanges===void 0||ne.documentChanges.every(function(V){return Ie.string(V.kind)?Q.is(V)||M.is(V)||D.is(V):k.is(V)}))}a(pe,"is"),K.is=pe})(G||(e.WorkspaceEdit=G={}));var O=(function(){function K(pe,me){this.edits=pe,this.changeAnnotations=me}return a(K,"TextEditChangeImpl"),K.prototype.insert=function(pe,me,ne){var V,Re;if(ne===void 0?V=x.insert(pe,me):w.is(ne)?(Re=ne,V=P.insert(pe,me,ne)):(this.assertChangeAnnotations(this.changeAnnotations),Re=this.changeAnnotations.manage(ne),V=P.insert(pe,me,Re)),this.edits.push(V),Re!==void 0)return Re},K.prototype.replace=function(pe,me,ne){var V,Re;if(ne===void 0?V=x.replace(pe,me):w.is(ne)?(Re=ne,V=P.replace(pe,me,ne)):(this.assertChangeAnnotations(this.changeAnnotations),Re=this.changeAnnotations.manage(ne),V=P.replace(pe,me,Re)),this.edits.push(V),Re!==void 0)return Re},K.prototype.delete=function(pe,me){var ne,V;if(me===void 0?ne=x.del(pe):w.is(me)?(V=me,ne=P.del(pe,me)):(this.assertChangeAnnotations(this.changeAnnotations),V=this.changeAnnotations.manage(me),ne=P.del(pe,V)),this.edits.push(ne),V!==void 0)return V},K.prototype.add=function(pe){this.edits.push(pe)},K.prototype.all=function(){return this.edits},K.prototype.clear=function(){this.edits.splice(0,this.edits.length)},K.prototype.assertChangeAnnotations=function(pe){if(pe===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},K})(),N=(function(){function K(pe){this._annotations=pe===void 0?Object.create(null):pe,this._counter=0,this._size=0}return a(K,"ChangeAnnotations"),K.prototype.all=function(){return this._annotations},Object.defineProperty(K.prototype,"size",{get:a(function(){return this._size},"get"),enumerable:!1,configurable:!0}),K.prototype.manage=function(pe,me){var ne;if(w.is(pe)?ne=pe:(ne=this.nextId(),me=pe),this._annotations[ne]!==void 0)throw new Error("Id ".concat(ne," is already in use."));if(me===void 0)throw new Error("No annotation provided for id ".concat(ne));return this._annotations[ne]=me,this._size++,ne},K.prototype.nextId=function(){return this._counter++,this._counter.toString()},K})(),F=(function(){function K(pe){var me=this;this._textEditChanges=Object.create(null),pe!==void 0?(this._workspaceEdit=pe,pe.documentChanges?(this._changeAnnotations=new N(pe.changeAnnotations),pe.changeAnnotations=this._changeAnnotations.all(),pe.documentChanges.forEach(function(ne){if(k.is(ne)){var V=new O(ne.edits,me._changeAnnotations);me._textEditChanges[ne.textDocument.uri]=V}})):pe.changes&&Object.keys(pe.changes).forEach(function(ne){var V=new O(pe.changes[ne]);me._textEditChanges[ne]=V})):this._workspaceEdit={}}return a(K,"WorkspaceChange"),Object.defineProperty(K.prototype,"edit",{get:a(function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},"get"),enumerable:!1,configurable:!0}),K.prototype.getTextEditChange=function(pe){if(H.is(pe)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var me={uri:pe.uri,version:pe.version},ne=this._textEditChanges[me.uri];if(!ne){var V=[],Re={textDocument:me,edits:V};this._workspaceEdit.documentChanges.push(Re),ne=new O(V,this._changeAnnotations),this._textEditChanges[me.uri]=ne}return ne}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var ne=this._textEditChanges[pe];if(!ne){var V=[];this._workspaceEdit.changes[pe]=V,ne=new O(V),this._textEditChanges[pe]=ne}return ne}},K.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new N,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},K.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},K.prototype.createFile=function(pe,me,ne){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var V;R.is(me)||w.is(me)?V=me:ne=me;var Re,ze;if(V===void 0?Re=Q.create(pe,ne):(ze=w.is(V)?V:this._changeAnnotations.manage(V),Re=Q.create(pe,ne,ze)),this._workspaceEdit.documentChanges.push(Re),ze!==void 0)return ze},K.prototype.renameFile=function(pe,me,ne,V){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var Re;R.is(ne)||w.is(ne)?Re=ne:V=ne;var ze,Mt;if(Re===void 0?ze=M.create(pe,me,V):(Mt=w.is(Re)?Re:this._changeAnnotations.manage(Re),ze=M.create(pe,me,V,Mt)),this._workspaceEdit.documentChanges.push(ze),Mt!==void 0)return Mt},K.prototype.deleteFile=function(pe,me,ne){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var V;R.is(me)||w.is(me)?V=me:ne=me;var Re,ze;if(V===void 0?Re=D.create(pe,ne):(ze=w.is(V)?V:this._changeAnnotations.manage(V),Re=D.create(pe,ne,ze)),this._workspaceEdit.documentChanges.push(Re),ze!==void 0)return ze},K})();e.WorkspaceChange=F;var U;(function(K){function pe(ne){return{uri:ne}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)}a(me,"is"),K.is=me})(U||(e.TextDocumentIdentifier=U={}));var L;(function(K){function pe(ne,V){return{uri:ne,version:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&Ie.integer(V.version)}a(me,"is"),K.is=me})(L||(e.VersionedTextDocumentIdentifier=L={}));var H;(function(K){function pe(ne,V){return{uri:ne,version:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&(V.version===null||Ie.integer(V.version))}a(me,"is"),K.is=me})(H||(e.OptionalVersionedTextDocumentIdentifier=H={}));var $;(function(K){function pe(ne,V,Re,ze){return{uri:ne,languageId:V,version:Re,text:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&Ie.string(V.languageId)&&Ie.integer(V.version)&&Ie.string(V.text)}a(me,"is"),K.is=me})($||(e.TextDocumentItem=$={}));var W;(function(K){K.PlainText="plaintext",K.Markdown="markdown";function pe(me){var ne=me;return ne===K.PlainText||ne===K.Markdown}a(pe,"is"),K.is=pe})(W||(e.MarkupKind=W={}));var j;(function(K){function pe(me){var ne=me;return Ie.objectLiteral(me)&&W.is(ne.kind)&&Ie.string(ne.value)}a(pe,"is"),K.is=pe})(j||(e.MarkupContent=j={}));var ce;(function(K){K.Text=1,K.Method=2,K.Function=3,K.Constructor=4,K.Field=5,K.Variable=6,K.Class=7,K.Interface=8,K.Module=9,K.Property=10,K.Unit=11,K.Value=12,K.Enum=13,K.Keyword=14,K.Snippet=15,K.Color=16,K.File=17,K.Reference=18,K.Folder=19,K.EnumMember=20,K.Constant=21,K.Struct=22,K.Event=23,K.Operator=24,K.TypeParameter=25})(ce||(e.CompletionItemKind=ce={}));var J;(function(K){K.PlainText=1,K.Snippet=2})(J||(e.InsertTextFormat=J={}));var Te;(function(K){K.Deprecated=1})(Te||(e.CompletionItemTag=Te={}));var fe;(function(K){function pe(ne,V,Re){return{newText:ne,insert:V,replace:Re}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&Ie.string(V.newText)&&l.is(V.insert)&&l.is(V.replace)}a(me,"is"),K.is=me})(fe||(e.InsertReplaceEdit=fe={}));var De;(function(K){K.asIs=1,K.adjustIndentation=2})(De||(e.InsertTextMode=De={}));var Ve;(function(K){function pe(me){var ne=me;return ne&&(Ie.string(ne.detail)||ne.detail===void 0)&&(Ie.string(ne.description)||ne.description===void 0)}a(pe,"is"),K.is=pe})(Ve||(e.CompletionItemLabelDetails=Ve={}));var Ue;(function(K){function pe(me){return{label:me}}a(pe,"create"),K.create=pe})(Ue||(e.CompletionItem=Ue={}));var Ke;(function(K){function pe(me,ne){return{items:me||[],isIncomplete:!!ne}}a(pe,"create"),K.create=pe})(Ke||(e.CompletionList=Ke={}));var X;(function(K){function pe(ne){return ne.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(pe,"fromPlainText"),K.fromPlainText=pe;function me(ne){var V=ne;return Ie.string(V)||Ie.objectLiteral(V)&&Ie.string(V.language)&&Ie.string(V.value)}a(me,"is"),K.is=me})(X||(e.MarkedString=X={}));var le;(function(K){function pe(me){var ne=me;return!!ne&&Ie.objectLiteral(ne)&&(j.is(ne.contents)||X.is(ne.contents)||Ie.typedArray(ne.contents,X.is))&&(me.range===void 0||l.is(me.range))}a(pe,"is"),K.is=pe})(le||(e.Hover=le={}));var te;(function(K){function pe(me,ne){return ne?{label:me,documentation:ne}:{label:me}}a(pe,"create"),K.create=pe})(te||(e.ParameterInformation=te={}));var xe;(function(K){function pe(me,ne){for(var V=[],Re=2;Re{Ee();let et,lt;if(Qu.string(ue)){et=ue;let Le=Be[0],$e=0,rt=Ai.ParameterStructures.auto;Ai.ParameterStructures.is(Le)&&($e=1,rt=Le);let it=Be.length,dt=it-$e;switch(dt){case 0:lt=void 0;break;case 1:lt=Rt(rt,Be[$e]);break;default:if(rt===Ai.ParameterStructures.byName)throw new Error(`Received ${dt} parameters for 'by Name' notification parameter structure.`);lt=Be.slice($e,it).map(z=>We(z));break}}else{let Le=Be;et=ue.method,lt=Qt(ue,Le)}let ye={jsonrpc:u,method:et,params:lt};return xe(ye),e.write(ye).catch(Le=>{throw o.error("Sending notification failed."),Le})},"sendNotification"),onNotification:a((ue,Be)=>{Ee();let et;return Qu.func(ue)?h=ue:Be&&(Qu.string(ue)?(et=ue,m.set(ue,{type:void 0,handler:Be})):(et=ue.method,m.set(ue.method,{type:ue,handler:Be}))),{dispose:a(()=>{et!==void 0?m.delete(et):h=void 0},"dispose")}},"onNotification"),onProgress:a((ue,Be,et)=>{if(g.has(Be))throw new Error(`Progress handler for token ${Be} already registered`);return g.set(Be,et),{dispose:a(()=>{g.delete(Be)},"dispose")}},"onProgress"),sendProgress:a((ue,Be,et)=>Ft.sendNotification(cpe.type,{token:Be,value:et}),"sendProgress"),onUnhandledProgress:Q.event,sendRequest:a((ue,...Be)=>{Ee(),ve();let et,lt,ye;if(Qu.string(ue)){et=ue;let it=Be[0],dt=Be[Be.length-1],z=0,se=Ai.ParameterStructures.auto;Ai.ParameterStructures.is(it)&&(z=1,se=it);let _e=Be.length;Sgt.CancellationToken.is(dt)&&(_e=_e-1,ye=dt);let we=_e-z;switch(we){case 0:lt=void 0;break;case 1:lt=Rt(se,Be[z]);break;default:if(se===Ai.ParameterStructures.byName)throw new Error(`Received ${we} parameters for 'by Name' request parameter structure.`);lt=Be.slice(z,_e).map(je=>We(je));break}}else{let it=Be;et=ue.method,lt=Qt(ue,it);let dt=ue.numberOfParams;ye=Sgt.CancellationToken.is(it[dt])?it[dt]:void 0}let Le=s++,$e;ye&&($e=ye.onCancellationRequested(()=>{let it=N.sender.sendCancellation(Ft,Le);return it===void 0?(o.log(`Received no promise from cancellation strategy when cancelling id ${Le}`),Promise.resolve()):it.catch(()=>{o.log(`Sending cancellation messages for id ${Le} failed`)})}));let rt={jsonrpc:u,id:Le,method:et,params:lt};return te(rt),typeof N.sender.enableCancellation=="function"&&N.sender.enableCancellation(rt),new Promise(async(it,dt)=>{let z=a(we=>{it(we),N.sender.cleanup(Le),$e?.dispose()},"resolveWithCleanup"),se=a(we=>{dt(we),N.sender.cleanup(Le),$e?.dispose()},"rejectWithCleanup"),_e={method:et,timerStart:Date.now(),resolve:z,reject:se};try{await e.write(rt),E.set(Le,_e)}catch(we){throw o.error("Sending request failed."),_e.reject(new Ai.ResponseError(Ai.ErrorCodes.MessageWriteError,we.message?we.message:"Unknown reason")),we}})},"sendRequest"),onRequest:a((ue,Be)=>{Ee();let et=null;return wgt.is(ue)?(et=void 0,d=ue):Qu.string(ue)?(et=null,Be!==void 0&&(et=ue,p.set(ue,{handler:Be,type:void 0}))):Be!==void 0&&(et=ue.method,p.set(ue.method,{type:ue,handler:Be})),{dispose:a(()=>{et!==null&&(et!==void 0?p.delete(et):d=void 0)},"dispose")}},"onRequest"),hasPendingResponse:a(()=>E.size>0,"hasPendingResponse"),trace:a(async(ue,Be,et)=>{let lt=!1,ye=UC.Text;et!==void 0&&(Qu.boolean(et)?lt=et:(lt=et.sendNotification||!1,ye=et.traceFormat||UC.Text)),b=ue,I=ye,b===Ta.Off?x=void 0:x=Be,lt&&!H()&&!$()&&await Ft.sendNotification(Rgt.type,{value:Ta.toString(ue)})},"trace"),onError:R.event,onClose:P.event,onUnhandledNotification:k.event,onDispose:M.event,end:a(()=>{e.end()},"end"),dispose:a(()=>{if($())return;w=QI.Disposed,M.fire(void 0);let ue=new Ai.ResponseError(Ai.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Be of E.values())Be.reject(ue);E=new Map,v=new Map,_=new Set,y=new EIr.LinkedMap,Qu.func(e.dispose)&&e.dispose(),Qu.func(t.dispose)&&t.dispose()},"dispose"),listen:a(()=>{Ee(),Ae(),w=QI.Listening,t.listen(Ne)},"listen"),inspect:a(()=>{(0,yIr.default)().console.log("inspect")},"inspect")};return Ft.onNotification(nDe.type,ue=>{if(b===Ta.Off||!x)return;let Be=b===Ta.Verbose||b===Ta.Compact;x.log(ue.message,Be?ue.verbose:void 0)}),Ft.onNotification(cpe.type,ue=>{let Be=g.get(ue.token);Be?Be(ue.value):Q.fire(ue)}),Ft}a(Q2i,"createMessageConnection");Xi.createMessageConnection=Q2i});var lDe=T(It=>{"use strict";f();Object.defineProperty(It,"__esModule",{value:!0});It.ProgressType=It.ProgressToken=It.createMessageConnection=It.NullLogger=It.ConnectionOptions=It.ConnectionStrategy=It.AbstractMessageBuffer=It.WriteableStreamMessageWriter=It.AbstractMessageWriter=It.MessageWriter=It.ReadableStreamMessageReader=It.AbstractMessageReader=It.MessageReader=It.SharedArrayReceiverStrategy=It.SharedArraySenderStrategy=It.CancellationToken=It.CancellationTokenSource=It.Emitter=It.Event=It.Disposable=It.LRUCache=It.Touch=It.LinkedMap=It.ParameterStructures=It.NotificationType9=It.NotificationType8=It.NotificationType7=It.NotificationType6=It.NotificationType5=It.NotificationType4=It.NotificationType3=It.NotificationType2=It.NotificationType1=It.NotificationType0=It.NotificationType=It.ErrorCodes=It.ResponseError=It.RequestType9=It.RequestType8=It.RequestType7=It.RequestType6=It.RequestType5=It.RequestType4=It.RequestType3=It.RequestType2=It.RequestType1=It.RequestType0=It.RequestType=It.Message=It.RAL=void 0;It.MessageStrategy=It.CancellationStrategy=It.CancellationSenderStrategy=It.CancellationReceiverStrategy=It.ConnectionError=It.ConnectionErrors=It.LogTraceNotification=It.SetTraceNotification=It.TraceFormat=It.TraceValues=It.Trace=void 0;var Yc=ngt();Object.defineProperty(It,"Message",{enumerable:!0,get:a(function(){return Yc.Message},"get")});Object.defineProperty(It,"RequestType",{enumerable:!0,get:a(function(){return Yc.RequestType},"get")});Object.defineProperty(It,"RequestType0",{enumerable:!0,get:a(function(){return Yc.RequestType0},"get")});Object.defineProperty(It,"RequestType1",{enumerable:!0,get:a(function(){return Yc.RequestType1},"get")});Object.defineProperty(It,"RequestType2",{enumerable:!0,get:a(function(){return Yc.RequestType2},"get")});Object.defineProperty(It,"RequestType3",{enumerable:!0,get:a(function(){return Yc.RequestType3},"get")});Object.defineProperty(It,"RequestType4",{enumerable:!0,get:a(function(){return Yc.RequestType4},"get")});Object.defineProperty(It,"RequestType5",{enumerable:!0,get:a(function(){return Yc.RequestType5},"get")});Object.defineProperty(It,"RequestType6",{enumerable:!0,get:a(function(){return Yc.RequestType6},"get")});Object.defineProperty(It,"RequestType7",{enumerable:!0,get:a(function(){return Yc.RequestType7},"get")});Object.defineProperty(It,"RequestType8",{enumerable:!0,get:a(function(){return Yc.RequestType8},"get")});Object.defineProperty(It,"RequestType9",{enumerable:!0,get:a(function(){return Yc.RequestType9},"get")});Object.defineProperty(It,"ResponseError",{enumerable:!0,get:a(function(){return Yc.ResponseError},"get")});Object.defineProperty(It,"ErrorCodes",{enumerable:!0,get:a(function(){return Yc.ErrorCodes},"get")});Object.defineProperty(It,"NotificationType",{enumerable:!0,get:a(function(){return Yc.NotificationType},"get")});Object.defineProperty(It,"NotificationType0",{enumerable:!0,get:a(function(){return Yc.NotificationType0},"get")});Object.defineProperty(It,"NotificationType1",{enumerable:!0,get:a(function(){return Yc.NotificationType1},"get")});Object.defineProperty(It,"NotificationType2",{enumerable:!0,get:a(function(){return Yc.NotificationType2},"get")});Object.defineProperty(It,"NotificationType3",{enumerable:!0,get:a(function(){return Yc.NotificationType3},"get")});Object.defineProperty(It,"NotificationType4",{enumerable:!0,get:a(function(){return Yc.NotificationType4},"get")});Object.defineProperty(It,"NotificationType5",{enumerable:!0,get:a(function(){return Yc.NotificationType5},"get")});Object.defineProperty(It,"NotificationType6",{enumerable:!0,get:a(function(){return Yc.NotificationType6},"get")});Object.defineProperty(It,"NotificationType7",{enumerable:!0,get:a(function(){return Yc.NotificationType7},"get")});Object.defineProperty(It,"NotificationType8",{enumerable:!0,get:a(function(){return Yc.NotificationType8},"get")});Object.defineProperty(It,"NotificationType9",{enumerable:!0,get:a(function(){return Yc.NotificationType9},"get")});Object.defineProperty(It,"ParameterStructures",{enumerable:!0,get:a(function(){return Yc.ParameterStructures},"get")});var Dgt=ogt();Object.defineProperty(It,"LinkedMap",{enumerable:!0,get:a(function(){return Dgt.LinkedMap},"get")});Object.defineProperty(It,"LRUCache",{enumerable:!0,get:a(function(){return Dgt.LRUCache},"get")});Object.defineProperty(It,"Touch",{enumerable:!0,get:a(function(){return Dgt.Touch},"get")});var q2i=aIr();Object.defineProperty(It,"Disposable",{enumerable:!0,get:a(function(){return q2i.Disposable},"get")});var bIr=NX();Object.defineProperty(It,"Event",{enumerable:!0,get:a(function(){return bIr.Event},"get")});Object.defineProperty(It,"Emitter",{enumerable:!0,get:a(function(){return bIr.Emitter},"get")});var TIr=X5e();Object.defineProperty(It,"CancellationTokenSource",{enumerable:!0,get:a(function(){return TIr.CancellationTokenSource},"get")});Object.defineProperty(It,"CancellationToken",{enumerable:!0,get:a(function(){return TIr.CancellationToken},"get")});var SIr=lIr();Object.defineProperty(It,"SharedArraySenderStrategy",{enumerable:!0,get:a(function(){return SIr.SharedArraySenderStrategy},"get")});Object.defineProperty(It,"SharedArrayReceiverStrategy",{enumerable:!0,get:a(function(){return SIr.SharedArrayReceiverStrategy},"get")});var Ngt=dIr();Object.defineProperty(It,"MessageReader",{enumerable:!0,get:a(function(){return Ngt.MessageReader},"get")});Object.defineProperty(It,"AbstractMessageReader",{enumerable:!0,get:a(function(){return Ngt.AbstractMessageReader},"get")});Object.defineProperty(It,"ReadableStreamMessageReader",{enumerable:!0,get:a(function(){return Ngt.ReadableStreamMessageReader},"get")});var Mgt=gIr();Object.defineProperty(It,"MessageWriter",{enumerable:!0,get:a(function(){return Mgt.MessageWriter},"get")});Object.defineProperty(It,"AbstractMessageWriter",{enumerable:!0,get:a(function(){return Mgt.AbstractMessageWriter},"get")});Object.defineProperty(It,"WriteableStreamMessageWriter",{enumerable:!0,get:a(function(){return Mgt.WriteableStreamMessageWriter},"get")});var G2i=AIr();Object.defineProperty(It,"AbstractMessageBuffer",{enumerable:!0,get:a(function(){return G2i.AbstractMessageBuffer},"get")});var Zh=vIr();Object.defineProperty(It,"ConnectionStrategy",{enumerable:!0,get:a(function(){return Zh.ConnectionStrategy},"get")});Object.defineProperty(It,"ConnectionOptions",{enumerable:!0,get:a(function(){return Zh.ConnectionOptions},"get")});Object.defineProperty(It,"NullLogger",{enumerable:!0,get:a(function(){return Zh.NullLogger},"get")});Object.defineProperty(It,"createMessageConnection",{enumerable:!0,get:a(function(){return Zh.createMessageConnection},"get")});Object.defineProperty(It,"ProgressToken",{enumerable:!0,get:a(function(){return Zh.ProgressToken},"get")});Object.defineProperty(It,"ProgressType",{enumerable:!0,get:a(function(){return Zh.ProgressType},"get")});Object.defineProperty(It,"Trace",{enumerable:!0,get:a(function(){return Zh.Trace},"get")});Object.defineProperty(It,"TraceValues",{enumerable:!0,get:a(function(){return Zh.TraceValues},"get")});Object.defineProperty(It,"TraceFormat",{enumerable:!0,get:a(function(){return Zh.TraceFormat},"get")});Object.defineProperty(It,"SetTraceNotification",{enumerable:!0,get:a(function(){return Zh.SetTraceNotification},"get")});Object.defineProperty(It,"LogTraceNotification",{enumerable:!0,get:a(function(){return Zh.LogTraceNotification},"get")});Object.defineProperty(It,"ConnectionErrors",{enumerable:!0,get:a(function(){return Zh.ConnectionErrors},"get")});Object.defineProperty(It,"ConnectionError",{enumerable:!0,get:a(function(){return Zh.ConnectionError},"get")});Object.defineProperty(It,"CancellationReceiverStrategy",{enumerable:!0,get:a(function(){return Zh.CancellationReceiverStrategy},"get")});Object.defineProperty(It,"CancellationSenderStrategy",{enumerable:!0,get:a(function(){return Zh.CancellationSenderStrategy},"get")});Object.defineProperty(It,"CancellationStrategy",{enumerable:!0,get:a(function(){return Zh.CancellationStrategy},"get")});Object.defineProperty(It,"MessageStrategy",{enumerable:!0,get:a(function(){return Zh.MessageStrategy},"get")});var H2i=oL();It.RAL=H2i.default});var wIr=T(Fgt=>{"use strict";f();Object.defineProperty(Fgt,"__esModule",{value:!0});var IIr=require("util"),kN=lDe(),uDe=class t extends kN.AbstractMessageBuffer{static{a(this,"MessageBuffer")}constructor(e="utf-8"){super(e)}emptyBuffer(){return t.emptyBuffer}fromString(e,r){return Buffer.from(e,r)}toString(e,r){return e instanceof Buffer?e.toString(r):new IIr.TextDecoder(r).decode(e)}asNative(e,r){return r===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,r):Buffer.from(e,0,r)}allocNative(e){return Buffer.allocUnsafe(e)}};uDe.emptyBuffer=Buffer.allocUnsafe(0);var Ogt=class{static{a(this,"ReadableStreamWrapper")}constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),kN.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),kN.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),kN.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),kN.Disposable.create(()=>this.stream.off("data",e))}},Bgt=class{static{a(this,"WritableStreamWrapper")}constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),kN.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),kN.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),kN.Disposable.create(()=>this.stream.off("end",e))}write(e,r){return new Promise((n,o)=>{let s=a(c=>{c==null?n():o(c)},"callback");typeof e=="string"?this.stream.write(e,r,s):this.stream.write(e,s)})}end(){this.stream.end()}},xIr=Object.freeze({messageBuffer:Object.freeze({create:a(t=>new uDe(t),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:a((t,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),e.charset))}catch(r){return Promise.reject(r)}},"encode")}),decoder:Object.freeze({name:"application/json",decode:a((t,e)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(e.charset))):Promise.resolve(JSON.parse(new IIr.TextDecoder(e.charset).decode(t)))}catch(r){return Promise.reject(r)}},"decode")})}),stream:Object.freeze({asReadableStream:a(t=>new Ogt(t),"asReadableStream"),asWritableStream:a(t=>new Bgt(t),"asWritableStream")}),console,timer:Object.freeze({setTimeout(t,e,...r){let n=setTimeout(t,e,...r);return{dispose:a(()=>clearTimeout(n),"dispose")}},setImmediate(t,...e){let r=setImmediate(t,...e);return{dispose:a(()=>clearImmediate(r),"dispose")}},setInterval(t,e,...r){let n=setInterval(t,e,...r);return{dispose:a(()=>clearInterval(n),"dispose")}}})});function Lgt(){return xIr}a(Lgt,"RIL");(function(t){function e(){kN.RAL.install(xIr)}a(e,"install"),t.install=e})(Lgt||(Lgt={}));Fgt.default=Lgt});var bq=T(Ms=>{"use strict";f();var j2i=Ms&&Ms.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$2i=Ms&&Ms.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&j2i(e,t,r)};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.createMessageConnection=Ms.createServerSocketTransport=Ms.createClientSocketTransport=Ms.createServerPipeTransport=Ms.createClientPipeTransport=Ms.generateRandomPipeName=Ms.StreamMessageWriter=Ms.StreamMessageReader=Ms.SocketMessageWriter=Ms.SocketMessageReader=Ms.PortMessageWriter=Ms.PortMessageReader=Ms.IPCMessageWriter=Ms.IPCMessageReader=void 0;var FX=wIr();FX.default.install();var RIr=require("path"),V2i=require("os"),W2i=require("crypto"),pDe=require("net"),QC=lDe();$2i(lDe(),Ms);var Ugt=class extends QC.AbstractMessageReader{static{a(this,"IPCMessageReader")}constructor(e){super(),this.process=e;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),QC.Disposable.create(()=>this.process.off("message",e))}};Ms.IPCMessageReader=Ugt;var Qgt=class extends QC.AbstractMessageWriter{static{a(this,"IPCMessageWriter")}constructor(e){super(),this.process=e,this.errorCount=0;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,r=>{r?(this.errorCount++,this.handleError(r,e)):this.errorCount=0}),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Ms.IPCMessageWriter=Qgt;var qgt=class extends QC.AbstractMessageReader{static{a(this,"PortMessageReader")}constructor(e){super(),this.onData=new QC.Emitter,e.on("close",()=>this.fireClose),e.on("error",r=>this.fireError(r)),e.on("message",r=>{this.onData.fire(r)})}listen(e){return this.onData.event(e)}};Ms.PortMessageReader=qgt;var Ggt=class extends QC.AbstractMessageWriter{static{a(this,"PortMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",r=>this.fireError(r))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};Ms.PortMessageWriter=Ggt;var Cq=class extends QC.ReadableStreamMessageReader{static{a(this,"SocketMessageReader")}constructor(e,r="utf-8"){super((0,FX.default)().stream.asReadableStream(e),r)}};Ms.SocketMessageReader=Cq;var vq=class extends QC.WriteableStreamMessageWriter{static{a(this,"SocketMessageWriter")}constructor(e,r){super((0,FX.default)().stream.asWritableStream(e),r),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};Ms.SocketMessageWriter=vq;var dDe=class extends QC.ReadableStreamMessageReader{static{a(this,"StreamMessageReader")}constructor(e,r){super((0,FX.default)().stream.asReadableStream(e),r)}};Ms.StreamMessageReader=dDe;var fDe=class extends QC.WriteableStreamMessageWriter{static{a(this,"StreamMessageWriter")}constructor(e,r){super((0,FX.default)().stream.asWritableStream(e),r)}};Ms.StreamMessageWriter=fDe;var PIr=process.env.XDG_RUNTIME_DIR,z2i=new Map([["linux",107],["darwin",103]]);function Y2i(){let t=(0,W2i.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let e;PIr?e=RIr.join(PIr,`vscode-ipc-${t}.sock`):e=RIr.join(V2i.tmpdir(),`vscode-${t}.sock`);let r=z2i.get(process.platform);return r!==void 0&&e.length>r&&(0,FX.default)().console.warn(`WARNING: IPC handle "${e}" is longer than ${r} characters.`),e}a(Y2i,"generateRandomPipeName");Ms.generateRandomPipeName=Y2i;function K2i(t,e="utf-8"){let r,n=new Promise((o,s)=>{r=o});return new Promise((o,s)=>{let c=(0,pDe.createServer)(l=>{c.close(),r([new Cq(l,e),new vq(l,e)])});c.on("error",s),c.listen(t,()=>{c.removeListener("error",s),o({onConnected:a(()=>n,"onConnected")})})})}a(K2i,"createClientPipeTransport");Ms.createClientPipeTransport=K2i;function J2i(t,e="utf-8"){let r=(0,pDe.createConnection)(t);return[new Cq(r,e),new vq(r,e)]}a(J2i,"createServerPipeTransport");Ms.createServerPipeTransport=J2i;function X2i(t,e="utf-8"){let r,n=new Promise((o,s)=>{r=o});return new Promise((o,s)=>{let c=(0,pDe.createServer)(l=>{c.close(),r([new Cq(l,e),new vq(l,e)])});c.on("error",s),c.listen(t,"127.0.0.1",()=>{c.removeListener("error",s),o({onConnected:a(()=>n,"onConnected")})})})}a(X2i,"createClientSocketTransport");Ms.createClientSocketTransport=X2i;function Z2i(t,e="utf-8"){let r=(0,pDe.createConnection)(t,"127.0.0.1");return[new Cq(r,e),new vq(r,e)]}a(Z2i,"createServerSocketTransport");Ms.createServerSocketTransport=Z2i;function ePi(t){let e=t;return e.read!==void 0&&e.addListener!==void 0}a(ePi,"isReadableStream");function tPi(t){let e=t;return e.write!==void 0&&e.addListener!==void 0}a(tPi,"isWritableStream");function rPi(t,e,r,n){r||(r=QC.NullLogger);let o=ePi(t)?new dDe(t):t,s=tPi(e)?new fDe(e):e;return QC.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,QC.createMessageConnection)(o,s,r,n)}a(rPi,"createMessageConnection");Ms.createMessageConnection=rPi});var Hgt=T((Yac,kIr)=>{"use strict";f();kIr.exports=bq()});var dpe=T((DIr,hDe)=>{f();(function(t){if(typeof hDe=="object"&&typeof hDe.exports=="object"){var e=t(require,DIr);e!==void 0&&(hDe.exports=e)}else typeof define=="function"&&define.amd&&define(["require","exports"],t)})(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocument=e.EOL=e.WorkspaceFolder=e.InlineCompletionContext=e.SelectedCompletionInfo=e.InlineCompletionTriggerKind=e.InlineCompletionList=e.InlineCompletionItem=e.StringValue=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.SemanticTokens=e.SemanticTokenModifiers=e.SemanticTokenTypes=e.SelectionRange=e.DocumentLink=e.FormattingOptions=e.CodeLens=e.CodeAction=e.CodeActionContext=e.CodeActionTriggerKind=e.CodeActionKind=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.SignatureInformation=e.ParameterInformation=e.Hover=e.MarkedString=e.CompletionList=e.CompletionItem=e.CompletionItemLabelDetails=e.InsertTextMode=e.InsertReplaceEdit=e.CompletionItemTag=e.InsertTextFormat=e.CompletionItemKind=e.MarkupContent=e.MarkupKind=e.TextDocumentItem=e.OptionalVersionedTextDocumentIdentifier=e.VersionedTextDocumentIdentifier=e.TextDocumentIdentifier=e.WorkspaceChange=e.WorkspaceEdit=e.DeleteFile=e.RenameFile=e.CreateFile=e.TextDocumentEdit=e.AnnotatedTextEdit=e.ChangeAnnotationIdentifier=e.ChangeAnnotation=e.TextEdit=e.Command=e.Diagnostic=e.CodeDescription=e.DiagnosticTag=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.FoldingRange=e.FoldingRangeKind=e.ColorPresentation=e.ColorInformation=e.Color=e.LocationLink=e.Location=e.Range=e.Position=e.uinteger=e.integer=e.URI=e.DocumentUri=void 0;var r;(function(K){function pe(me){return typeof me=="string"}a(pe,"is"),K.is=pe})(r||(e.DocumentUri=r={}));var n;(function(K){function pe(me){return typeof me=="string"}a(pe,"is"),K.is=pe})(n||(e.URI=n={}));var o;(function(K){K.MIN_VALUE=-2147483648,K.MAX_VALUE=2147483647;function pe(me){return typeof me=="number"&&K.MIN_VALUE<=me&&me<=K.MAX_VALUE}a(pe,"is"),K.is=pe})(o||(e.integer=o={}));var s;(function(K){K.MIN_VALUE=0,K.MAX_VALUE=2147483647;function pe(me){return typeof me=="number"&&K.MIN_VALUE<=me&&me<=K.MAX_VALUE}a(pe,"is"),K.is=pe})(s||(e.uinteger=s={}));var c;(function(K){function pe(ne,V){return ne===Number.MAX_VALUE&&(ne=s.MAX_VALUE),V===Number.MAX_VALUE&&(V=s.MAX_VALUE),{line:ne,character:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.uinteger(V.line)&&Ie.uinteger(V.character)}a(me,"is"),K.is=me})(c||(e.Position=c={}));var l;(function(K){function pe(ne,V,Re,ze){if(Ie.uinteger(ne)&&Ie.uinteger(V)&&Ie.uinteger(Re)&&Ie.uinteger(ze))return{start:c.create(ne,V),end:c.create(Re,ze)};if(c.is(ne)&&c.is(V))return{start:ne,end:V};throw new Error("Range#create called with invalid arguments[".concat(ne,", ").concat(V,", ").concat(Re,", ").concat(ze,"]"))}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&c.is(V.start)&&c.is(V.end)}a(me,"is"),K.is=me})(l||(e.Range=l={}));var u;(function(K){function pe(ne,V){return{uri:ne,range:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.range)&&(Ie.string(V.uri)||Ie.undefined(V.uri))}a(me,"is"),K.is=me})(u||(e.Location=u={}));var d;(function(K){function pe(ne,V,Re,ze){return{targetUri:ne,targetRange:V,targetSelectionRange:Re,originSelectionRange:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.targetRange)&&Ie.string(V.targetUri)&&l.is(V.targetSelectionRange)&&(l.is(V.originSelectionRange)||Ie.undefined(V.originSelectionRange))}a(me,"is"),K.is=me})(d||(e.LocationLink=d={}));var p;(function(K){function pe(ne,V,Re,ze){return{red:ne,green:V,blue:Re,alpha:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.numberRange(V.red,0,1)&&Ie.numberRange(V.green,0,1)&&Ie.numberRange(V.blue,0,1)&&Ie.numberRange(V.alpha,0,1)}a(me,"is"),K.is=me})(p||(e.Color=p={}));var h;(function(K){function pe(ne,V){return{range:ne,color:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&l.is(V.range)&&p.is(V.color)}a(me,"is"),K.is=me})(h||(e.ColorInformation=h={}));var m;(function(K){function pe(ne,V,Re){return{label:ne,textEdit:V,additionalTextEdits:Re}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.string(V.label)&&(Ie.undefined(V.textEdit)||x.is(V))&&(Ie.undefined(V.additionalTextEdits)||Ie.typedArray(V.additionalTextEdits,x.is))}a(me,"is"),K.is=me})(m||(e.ColorPresentation=m={}));var g;(function(K){K.Comment="comment",K.Imports="imports",K.Region="region"})(g||(e.FoldingRangeKind=g={}));var A;(function(K){function pe(ne,V,Re,ze,Dt,tr){var Wt={startLine:ne,endLine:V};return Ie.defined(Re)&&(Wt.startCharacter=Re),Ie.defined(ze)&&(Wt.endCharacter=ze),Ie.defined(Dt)&&(Wt.kind=Dt),Ie.defined(tr)&&(Wt.collapsedText=tr),Wt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.uinteger(V.startLine)&&Ie.uinteger(V.startLine)&&(Ie.undefined(V.startCharacter)||Ie.uinteger(V.startCharacter))&&(Ie.undefined(V.endCharacter)||Ie.uinteger(V.endCharacter))&&(Ie.undefined(V.kind)||Ie.string(V.kind))}a(me,"is"),K.is=me})(A||(e.FoldingRange=A={}));var y;(function(K){function pe(ne,V){return{location:ne,message:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&u.is(V.location)&&Ie.string(V.message)}a(me,"is"),K.is=me})(y||(e.DiagnosticRelatedInformation=y={}));var E;(function(K){K.Error=1,K.Warning=2,K.Information=3,K.Hint=4})(E||(e.DiagnosticSeverity=E={}));var _;(function(K){K.Unnecessary=1,K.Deprecated=2})(_||(e.DiagnosticTag=_={}));var v;(function(K){function pe(me){var ne=me;return Ie.objectLiteral(ne)&&Ie.string(ne.href)}a(pe,"is"),K.is=pe})(v||(e.CodeDescription=v={}));var b;(function(K){function pe(ne,V,Re,ze,Dt,tr){var Wt={range:ne,message:V};return Ie.defined(Re)&&(Wt.severity=Re),Ie.defined(ze)&&(Wt.code=ze),Ie.defined(Dt)&&(Wt.source=Dt),Ie.defined(tr)&&(Wt.relatedInformation=tr),Wt}a(pe,"create"),K.create=pe;function me(ne){var V,Re=ne;return Ie.defined(Re)&&l.is(Re.range)&&Ie.string(Re.message)&&(Ie.number(Re.severity)||Ie.undefined(Re.severity))&&(Ie.integer(Re.code)||Ie.string(Re.code)||Ie.undefined(Re.code))&&(Ie.undefined(Re.codeDescription)||Ie.string((V=Re.codeDescription)===null||V===void 0?void 0:V.href))&&(Ie.string(Re.source)||Ie.undefined(Re.source))&&(Ie.undefined(Re.relatedInformation)||Ie.typedArray(Re.relatedInformation,y.is))}a(me,"is"),K.is=me})(b||(e.Diagnostic=b={}));var I;(function(K){function pe(ne,V){for(var Re=[],ze=2;ze0&&(Dt.arguments=Re),Dt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.title)&&Ie.string(V.command)}a(me,"is"),K.is=me})(I||(e.Command=I={}));var x;(function(K){function pe(Re,ze){return{range:Re,newText:ze}}a(pe,"replace"),K.replace=pe;function me(Re,ze){return{range:{start:Re,end:Re},newText:ze}}a(me,"insert"),K.insert=me;function ne(Re){return{range:Re,newText:""}}a(ne,"del"),K.del=ne;function V(Re){var ze=Re;return Ie.objectLiteral(ze)&&Ie.string(ze.newText)&&l.is(ze.range)}a(V,"is"),K.is=V})(x||(e.TextEdit=x={}));var w;(function(K){function pe(ne,V,Re){var ze={label:ne};return V!==void 0&&(ze.needsConfirmation=V),Re!==void 0&&(ze.description=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.objectLiteral(V)&&Ie.string(V.label)&&(Ie.boolean(V.needsConfirmation)||V.needsConfirmation===void 0)&&(Ie.string(V.description)||V.description===void 0)}a(me,"is"),K.is=me})(w||(e.ChangeAnnotation=w={}));var R;(function(K){function pe(me){var ne=me;return Ie.string(ne)}a(pe,"is"),K.is=pe})(R||(e.ChangeAnnotationIdentifier=R={}));var P;(function(K){function pe(Re,ze,Dt){return{range:Re,newText:ze,annotationId:Dt}}a(pe,"replace"),K.replace=pe;function me(Re,ze,Dt){return{range:{start:Re,end:Re},newText:ze,annotationId:Dt}}a(me,"insert"),K.insert=me;function ne(Re,ze){return{range:Re,newText:"",annotationId:ze}}a(ne,"del"),K.del=ne;function V(Re){var ze=Re;return x.is(ze)&&(w.is(ze.annotationId)||R.is(ze.annotationId))}a(V,"is"),K.is=V})(P||(e.AnnotatedTextEdit=P={}));var k;(function(K){function pe(ne,V){return{textDocument:ne,edits:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&H.is(V.textDocument)&&Array.isArray(V.edits)}a(me,"is"),K.is=me})(k||(e.TextDocumentEdit=k={}));var Q;(function(K){function pe(ne,V,Re){var ze={kind:"create",uri:ne};return V!==void 0&&(V.overwrite!==void 0||V.ignoreIfExists!==void 0)&&(ze.options=V),Re!==void 0&&(ze.annotationId=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="create"&&Ie.string(V.uri)&&(V.options===void 0||(V.options.overwrite===void 0||Ie.boolean(V.options.overwrite))&&(V.options.ignoreIfExists===void 0||Ie.boolean(V.options.ignoreIfExists)))&&(V.annotationId===void 0||R.is(V.annotationId))}a(me,"is"),K.is=me})(Q||(e.CreateFile=Q={}));var M;(function(K){function pe(ne,V,Re,ze){var Dt={kind:"rename",oldUri:ne,newUri:V};return Re!==void 0&&(Re.overwrite!==void 0||Re.ignoreIfExists!==void 0)&&(Dt.options=Re),ze!==void 0&&(Dt.annotationId=ze),Dt}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="rename"&&Ie.string(V.oldUri)&&Ie.string(V.newUri)&&(V.options===void 0||(V.options.overwrite===void 0||Ie.boolean(V.options.overwrite))&&(V.options.ignoreIfExists===void 0||Ie.boolean(V.options.ignoreIfExists)))&&(V.annotationId===void 0||R.is(V.annotationId))}a(me,"is"),K.is=me})(M||(e.RenameFile=M={}));var N;(function(K){function pe(ne,V,Re){var ze={kind:"delete",uri:ne};return V!==void 0&&(V.recursive!==void 0||V.ignoreIfNotExists!==void 0)&&(ze.options=V),Re!==void 0&&(ze.annotationId=Re),ze}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&V.kind==="delete"&&Ie.string(V.uri)&&(V.options===void 0||(V.options.recursive===void 0||Ie.boolean(V.options.recursive))&&(V.options.ignoreIfNotExists===void 0||Ie.boolean(V.options.ignoreIfNotExists)))&&(V.annotationId===void 0||R.is(V.annotationId))}a(me,"is"),K.is=me})(N||(e.DeleteFile=N={}));var G;(function(K){function pe(me){var ne=me;return ne&&(ne.changes!==void 0||ne.documentChanges!==void 0)&&(ne.documentChanges===void 0||ne.documentChanges.every(function(V){return Ie.string(V.kind)?Q.is(V)||M.is(V)||N.is(V):k.is(V)}))}a(pe,"is"),K.is=pe})(G||(e.WorkspaceEdit=G={}));var O=(function(){function K(pe,me){this.edits=pe,this.changeAnnotations=me}return a(K,"TextEditChangeImpl"),K.prototype.insert=function(pe,me,ne){var V,Re;if(ne===void 0?V=x.insert(pe,me):R.is(ne)?(Re=ne,V=P.insert(pe,me,ne)):(this.assertChangeAnnotations(this.changeAnnotations),Re=this.changeAnnotations.manage(ne),V=P.insert(pe,me,Re)),this.edits.push(V),Re!==void 0)return Re},K.prototype.replace=function(pe,me,ne){var V,Re;if(ne===void 0?V=x.replace(pe,me):R.is(ne)?(Re=ne,V=P.replace(pe,me,ne)):(this.assertChangeAnnotations(this.changeAnnotations),Re=this.changeAnnotations.manage(ne),V=P.replace(pe,me,Re)),this.edits.push(V),Re!==void 0)return Re},K.prototype.delete=function(pe,me){var ne,V;if(me===void 0?ne=x.del(pe):R.is(me)?(V=me,ne=P.del(pe,me)):(this.assertChangeAnnotations(this.changeAnnotations),V=this.changeAnnotations.manage(me),ne=P.del(pe,V)),this.edits.push(ne),V!==void 0)return V},K.prototype.add=function(pe){this.edits.push(pe)},K.prototype.all=function(){return this.edits},K.prototype.clear=function(){this.edits.splice(0,this.edits.length)},K.prototype.assertChangeAnnotations=function(pe){if(pe===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},K})(),D=(function(){function K(pe){this._annotations=pe===void 0?Object.create(null):pe,this._counter=0,this._size=0}return a(K,"ChangeAnnotations"),K.prototype.all=function(){return this._annotations},Object.defineProperty(K.prototype,"size",{get:a(function(){return this._size},"get"),enumerable:!1,configurable:!0}),K.prototype.manage=function(pe,me){var ne;if(R.is(pe)?ne=pe:(ne=this.nextId(),me=pe),this._annotations[ne]!==void 0)throw new Error("Id ".concat(ne," is already in use."));if(me===void 0)throw new Error("No annotation provided for id ".concat(ne));return this._annotations[ne]=me,this._size++,ne},K.prototype.nextId=function(){return this._counter++,this._counter.toString()},K})(),F=(function(){function K(pe){var me=this;this._textEditChanges=Object.create(null),pe!==void 0?(this._workspaceEdit=pe,pe.documentChanges?(this._changeAnnotations=new D(pe.changeAnnotations),pe.changeAnnotations=this._changeAnnotations.all(),pe.documentChanges.forEach(function(ne){if(k.is(ne)){var V=new O(ne.edits,me._changeAnnotations);me._textEditChanges[ne.textDocument.uri]=V}})):pe.changes&&Object.keys(pe.changes).forEach(function(ne){var V=new O(pe.changes[ne]);me._textEditChanges[ne]=V})):this._workspaceEdit={}}return a(K,"WorkspaceChange"),Object.defineProperty(K.prototype,"edit",{get:a(function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},"get"),enumerable:!1,configurable:!0}),K.prototype.getTextEditChange=function(pe){if(H.is(pe)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var me={uri:pe.uri,version:pe.version},ne=this._textEditChanges[me.uri];if(!ne){var V=[],Re={textDocument:me,edits:V};this._workspaceEdit.documentChanges.push(Re),ne=new O(V,this._changeAnnotations),this._textEditChanges[me.uri]=ne}return ne}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var ne=this._textEditChanges[pe];if(!ne){var V=[];this._workspaceEdit.changes[pe]=V,ne=new O(V),this._textEditChanges[pe]=ne}return ne}},K.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new D,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},K.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},K.prototype.createFile=function(pe,me,ne){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var V;w.is(me)||R.is(me)?V=me:ne=me;var Re,ze;if(V===void 0?Re=Q.create(pe,ne):(ze=R.is(V)?V:this._changeAnnotations.manage(V),Re=Q.create(pe,ne,ze)),this._workspaceEdit.documentChanges.push(Re),ze!==void 0)return ze},K.prototype.renameFile=function(pe,me,ne,V){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var Re;w.is(ne)||R.is(ne)?Re=ne:V=ne;var ze,Dt;if(Re===void 0?ze=M.create(pe,me,V):(Dt=R.is(Re)?Re:this._changeAnnotations.manage(Re),ze=M.create(pe,me,V,Dt)),this._workspaceEdit.documentChanges.push(ze),Dt!==void 0)return Dt},K.prototype.deleteFile=function(pe,me,ne){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var V;w.is(me)||R.is(me)?V=me:ne=me;var Re,ze;if(V===void 0?Re=N.create(pe,ne):(ze=R.is(V)?V:this._changeAnnotations.manage(V),Re=N.create(pe,ne,ze)),this._workspaceEdit.documentChanges.push(Re),ze!==void 0)return ze},K})();e.WorkspaceChange=F;var U;(function(K){function pe(ne){return{uri:ne}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)}a(me,"is"),K.is=me})(U||(e.TextDocumentIdentifier=U={}));var L;(function(K){function pe(ne,V){return{uri:ne,version:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&Ie.integer(V.version)}a(me,"is"),K.is=me})(L||(e.VersionedTextDocumentIdentifier=L={}));var H;(function(K){function pe(ne,V){return{uri:ne,version:V}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&(V.version===null||Ie.integer(V.version))}a(me,"is"),K.is=me})(H||(e.OptionalVersionedTextDocumentIdentifier=H={}));var $;(function(K){function pe(ne,V,Re,ze){return{uri:ne,languageId:V,version:Re,text:ze}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return Ie.defined(V)&&Ie.string(V.uri)&&Ie.string(V.languageId)&&Ie.integer(V.version)&&Ie.string(V.text)}a(me,"is"),K.is=me})($||(e.TextDocumentItem=$={}));var W;(function(K){K.PlainText="plaintext",K.Markdown="markdown";function pe(me){var ne=me;return ne===K.PlainText||ne===K.Markdown}a(pe,"is"),K.is=pe})(W||(e.MarkupKind=W={}));var j;(function(K){function pe(me){var ne=me;return Ie.objectLiteral(me)&&W.is(ne.kind)&&Ie.string(ne.value)}a(pe,"is"),K.is=pe})(j||(e.MarkupContent=j={}));var ce;(function(K){K.Text=1,K.Method=2,K.Function=3,K.Constructor=4,K.Field=5,K.Variable=6,K.Class=7,K.Interface=8,K.Module=9,K.Property=10,K.Unit=11,K.Value=12,K.Enum=13,K.Keyword=14,K.Snippet=15,K.Color=16,K.File=17,K.Reference=18,K.Folder=19,K.EnumMember=20,K.Constant=21,K.Struct=22,K.Event=23,K.Operator=24,K.TypeParameter=25})(ce||(e.CompletionItemKind=ce={}));var J;(function(K){K.PlainText=1,K.Snippet=2})(J||(e.InsertTextFormat=J={}));var Te;(function(K){K.Deprecated=1})(Te||(e.CompletionItemTag=Te={}));var fe;(function(K){function pe(ne,V,Re){return{newText:ne,insert:V,replace:Re}}a(pe,"create"),K.create=pe;function me(ne){var V=ne;return V&&Ie.string(V.newText)&&l.is(V.insert)&&l.is(V.replace)}a(me,"is"),K.is=me})(fe||(e.InsertReplaceEdit=fe={}));var Ne;(function(K){K.asIs=1,K.adjustIndentation=2})(Ne||(e.InsertTextMode=Ne={}));var Ve;(function(K){function pe(me){var ne=me;return ne&&(Ie.string(ne.detail)||ne.detail===void 0)&&(Ie.string(ne.description)||ne.description===void 0)}a(pe,"is"),K.is=pe})(Ve||(e.CompletionItemLabelDetails=Ve={}));var Ue;(function(K){function pe(me){return{label:me}}a(pe,"create"),K.create=pe})(Ue||(e.CompletionItem=Ue={}));var Ke;(function(K){function pe(me,ne){return{items:me||[],isIncomplete:!!ne}}a(pe,"create"),K.create=pe})(Ke||(e.CompletionList=Ke={}));var X;(function(K){function pe(ne){return ne.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(pe,"fromPlainText"),K.fromPlainText=pe;function me(ne){var V=ne;return Ie.string(V)||Ie.objectLiteral(V)&&Ie.string(V.language)&&Ie.string(V.value)}a(me,"is"),K.is=me})(X||(e.MarkedString=X={}));var le;(function(K){function pe(me){var ne=me;return!!ne&&Ie.objectLiteral(ne)&&(j.is(ne.contents)||X.is(ne.contents)||Ie.typedArray(ne.contents,X.is))&&(me.range===void 0||l.is(me.range))}a(pe,"is"),K.is=pe})(le||(e.Hover=le={}));var te;(function(K){function pe(me,ne){return ne?{label:me,documentation:ne}:{label:me}}a(pe,"create"),K.create=pe})(te||(e.ParameterInformation=te={}));var xe;(function(K){function pe(me,ne){for(var V=[],Re=2;Re=0;gr--){var xr=rr[gr],wr=Re.offsetAt(xr.range.start),Ut=Re.offsetAt(xr.range.end);if(Ut<=zt)Mt=Mt.substring(0,wr)+xr.newText+Mt.substring(Ut,Mt.length);else throw new Error("Overlapping edit");zt=wr}return Mt}a(ne,"applyEdits"),K.applyEdits=ne;function V(Re,ze){if(Re.length<=1)return Re;var Mt=Re.length/2|0,rr=Re.slice(0,Mt),zt=Re.slice(Mt);V(rr,ze),V(zt,ze);for(var gr=0,xr=0,wr=0;gr=0;gr--){var xr=tr[gr],wr=Re.offsetAt(xr.range.start),Lt=Re.offsetAt(xr.range.end);if(Lt<=Wt)Dt=Dt.substring(0,wr)+xr.newText+Dt.substring(Lt,Dt.length);else throw new Error("Overlapping edit");Wt=wr}return Dt}a(ne,"applyEdits"),K.applyEdits=ne;function V(Re,ze){if(Re.length<=1)return Re;var Dt=Re.length/2|0,tr=Re.slice(0,Dt),Wt=Re.slice(Dt);V(tr,ze),V(Wt,ze);for(var gr=0,xr=0,wr=0;gr0&&pe.push(me.length),this._lineOffsets=pe}return this._lineOffsets},K.prototype.positionAt=function(pe){pe=Math.max(Math.min(pe,this._content.length),0);var me=this.getLineOffsets(),ne=0,V=me.length;if(V===0)return c.create(0,pe);for(;nepe?V=Re:ne=Re+1}var ze=ne-1;return c.create(ze,pe-me[ze])},K.prototype.offsetAt=function(pe){var me=this.getLineOffsets();if(pe.line>=me.length)return this._content.length;if(pe.line<0)return 0;var ne=me[pe.line],V=pe.line+1"u"}a(ne,"undefined"),K.undefined=ne;function V(Ut){return Ut===!0||Ut===!1}a(V,"boolean"),K.boolean=V;function Re(Ut){return pe.call(Ut)==="[object String]"}a(Re,"string"),K.string=Re;function ze(Ut){return pe.call(Ut)==="[object Number]"}a(ze,"number"),K.number=ze;function Mt(Ut,sr,Hp){return pe.call(Ut)==="[object Number]"&&sr<=Ut&&Ut<=Hp}a(Mt,"numberRange"),K.numberRange=Mt;function rr(Ut){return pe.call(Ut)==="[object Number]"&&-2147483648<=Ut&&Ut<=2147483647}a(rr,"integer"),K.integer=rr;function zt(Ut){return pe.call(Ut)==="[object Number]"&&0<=Ut&&Ut<=2147483647}a(zt,"uinteger"),K.uinteger=zt;function gr(Ut){return pe.call(Ut)==="[object Function]"}a(gr,"func"),K.func=gr;function xr(Ut){return Ut!==null&&typeof Ut=="object"}a(xr,"objectLiteral"),K.objectLiteral=xr;function wr(Ut,sr){return Array.isArray(Ut)&&Ut.every(sr)}a(wr,"typedArray"),K.typedArray=wr})(Ie||(Ie={}))})});var Cu=T(bE=>{"use strict";f();Object.defineProperty(bE,"__esModule",{value:!0});bE.ProtocolNotificationType=bE.ProtocolNotificationType0=bE.ProtocolRequestType=bE.ProtocolRequestType0=bE.RegistrationType=bE.MessageDirection=void 0;var NZ=Kq(),hIr;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(hIr||(bE.MessageDirection=hIr={}));var BAt=class{static{a(this,"RegistrationType")}constructor(e){this.method=e}};bE.RegistrationType=BAt;var LAt=class extends NZ.RequestType0{static{a(this,"ProtocolRequestType0")}constructor(e){super(e)}};bE.ProtocolRequestType0=LAt;var FAt=class extends NZ.RequestType{static{a(this,"ProtocolRequestType")}constructor(e){super(e,NZ.ParameterStructures.byName)}};bE.ProtocolRequestType=FAt;var UAt=class extends NZ.NotificationType0{static{a(this,"ProtocolNotificationType0")}constructor(e){super(e)}};bE.ProtocolNotificationType0=UAt;var QAt=class extends NZ.NotificationType{static{a(this,"ProtocolNotificationType")}constructor(e){super(e,NZ.ParameterStructures.byName)}};bE.ProtocolNotificationType=QAt});var y5e=T(zf=>{"use strict";f();Object.defineProperty(zf,"__esModule",{value:!0});zf.objectLiteral=zf.typedArray=zf.stringArray=zf.array=zf.func=zf.error=zf.number=zf.string=zf.boolean=void 0;function n2i(t){return t===!0||t===!1}a(n2i,"boolean");zf.boolean=n2i;function mIr(t){return typeof t=="string"||t instanceof String}a(mIr,"string");zf.string=mIr;function i2i(t){return typeof t=="number"||t instanceof Number}a(i2i,"number");zf.number=i2i;function o2i(t){return t instanceof Error}a(o2i,"error");zf.error=o2i;function s2i(t){return typeof t=="function"}a(s2i,"func");zf.func=s2i;function gIr(t){return Array.isArray(t)}a(gIr,"array");zf.array=gIr;function a2i(t){return gIr(t)&&t.every(e=>mIr(e))}a(a2i,"stringArray");zf.stringArray=a2i;function c2i(t,e){return Array.isArray(t)&&t.every(e)}a(c2i,"typedArray");zf.typedArray=c2i;function l2i(t){return t!==null&&typeof t=="object"}a(l2i,"objectLiteral");zf.objectLiteral=l2i});var EIr=T(E5e=>{"use strict";f();Object.defineProperty(E5e,"__esModule",{value:!0});E5e.ImplementationRequest=void 0;var AIr=Cu(),yIr;(function(t){t.method="textDocument/implementation",t.messageDirection=AIr.MessageDirection.clientToServer,t.type=new AIr.ProtocolRequestType(t.method)})(yIr||(E5e.ImplementationRequest=yIr={}))});var vIr=T(C5e=>{"use strict";f();Object.defineProperty(C5e,"__esModule",{value:!0});C5e.TypeDefinitionRequest=void 0;var CIr=Cu(),_Ir;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=CIr.MessageDirection.clientToServer,t.type=new CIr.ProtocolRequestType(t.method)})(_Ir||(C5e.TypeDefinitionRequest=_Ir={}))});var SIr=T(DZ=>{"use strict";f();Object.defineProperty(DZ,"__esModule",{value:!0});DZ.DidChangeWorkspaceFoldersNotification=DZ.WorkspaceFoldersRequest=void 0;var _5e=Cu(),bIr;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=_5e.MessageDirection.serverToClient,t.type=new _5e.ProtocolRequestType0(t.method)})(bIr||(DZ.WorkspaceFoldersRequest=bIr={}));var TIr;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=_5e.MessageDirection.clientToServer,t.type=new _5e.ProtocolNotificationType(t.method)})(TIr||(DZ.DidChangeWorkspaceFoldersNotification=TIr={}))});var wIr=T(v5e=>{"use strict";f();Object.defineProperty(v5e,"__esModule",{value:!0});v5e.ConfigurationRequest=void 0;var IIr=Cu(),xIr;(function(t){t.method="workspace/configuration",t.messageDirection=IIr.MessageDirection.serverToClient,t.type=new IIr.ProtocolRequestType(t.method)})(xIr||(v5e.ConfigurationRequest=xIr={}))});var kIr=T(MZ=>{"use strict";f();Object.defineProperty(MZ,"__esModule",{value:!0});MZ.ColorPresentationRequest=MZ.DocumentColorRequest=void 0;var b5e=Cu(),RIr;(function(t){t.method="textDocument/documentColor",t.messageDirection=b5e.MessageDirection.clientToServer,t.type=new b5e.ProtocolRequestType(t.method)})(RIr||(MZ.DocumentColorRequest=RIr={}));var PIr;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=b5e.MessageDirection.clientToServer,t.type=new b5e.ProtocolRequestType(t.method)})(PIr||(MZ.ColorPresentationRequest=PIr={}))});var MIr=T(OZ=>{"use strict";f();Object.defineProperty(OZ,"__esModule",{value:!0});OZ.FoldingRangeRefreshRequest=OZ.FoldingRangeRequest=void 0;var T5e=Cu(),NIr;(function(t){t.method="textDocument/foldingRange",t.messageDirection=T5e.MessageDirection.clientToServer,t.type=new T5e.ProtocolRequestType(t.method)})(NIr||(OZ.FoldingRangeRequest=NIr={}));var DIr;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=T5e.MessageDirection.serverToClient,t.type=new T5e.ProtocolRequestType0(t.method)})(DIr||(OZ.FoldingRangeRefreshRequest=DIr={}))});var LIr=T(S5e=>{"use strict";f();Object.defineProperty(S5e,"__esModule",{value:!0});S5e.DeclarationRequest=void 0;var OIr=Cu(),BIr;(function(t){t.method="textDocument/declaration",t.messageDirection=OIr.MessageDirection.clientToServer,t.type=new OIr.ProtocolRequestType(t.method)})(BIr||(S5e.DeclarationRequest=BIr={}))});var QIr=T(I5e=>{"use strict";f();Object.defineProperty(I5e,"__esModule",{value:!0});I5e.SelectionRangeRequest=void 0;var FIr=Cu(),UIr;(function(t){t.method="textDocument/selectionRange",t.messageDirection=FIr.MessageDirection.clientToServer,t.type=new FIr.ProtocolRequestType(t.method)})(UIr||(I5e.SelectionRangeRequest=UIr={}))});var jIr=T(IL=>{"use strict";f();Object.defineProperty(IL,"__esModule",{value:!0});IL.WorkDoneProgressCancelNotification=IL.WorkDoneProgressCreateRequest=IL.WorkDoneProgress=void 0;var u2i=Kq(),x5e=Cu(),qIr;(function(t){t.type=new u2i.ProgressType;function e(r){return r===t.type}a(e,"is"),t.is=e})(qIr||(IL.WorkDoneProgress=qIr={}));var GIr;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=x5e.MessageDirection.serverToClient,t.type=new x5e.ProtocolRequestType(t.method)})(GIr||(IL.WorkDoneProgressCreateRequest=GIr={}));var HIr;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=x5e.MessageDirection.clientToServer,t.type=new x5e.ProtocolNotificationType(t.method)})(HIr||(IL.WorkDoneProgressCancelNotification=HIr={}))});var zIr=T(xL=>{"use strict";f();Object.defineProperty(xL,"__esModule",{value:!0});xL.CallHierarchyOutgoingCallsRequest=xL.CallHierarchyIncomingCallsRequest=xL.CallHierarchyPrepareRequest=void 0;var BZ=Cu(),$Ir;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=BZ.MessageDirection.clientToServer,t.type=new BZ.ProtocolRequestType(t.method)})($Ir||(xL.CallHierarchyPrepareRequest=$Ir={}));var VIr;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=BZ.MessageDirection.clientToServer,t.type=new BZ.ProtocolRequestType(t.method)})(VIr||(xL.CallHierarchyIncomingCallsRequest=VIr={}));var WIr;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=BZ.MessageDirection.clientToServer,t.type=new BZ.ProtocolRequestType(t.method)})(WIr||(xL.CallHierarchyOutgoingCallsRequest=WIr={}))});var exr=T(TE=>{"use strict";f();Object.defineProperty(TE,"__esModule",{value:!0});TE.SemanticTokensRefreshRequest=TE.SemanticTokensRangeRequest=TE.SemanticTokensDeltaRequest=TE.SemanticTokensRequest=TE.SemanticTokensRegistrationType=TE.TokenFormat=void 0;var j5=Cu(),YIr;(function(t){t.Relative="relative"})(YIr||(TE.TokenFormat=YIr={}));var Xpe;(function(t){t.method="textDocument/semanticTokens",t.type=new j5.RegistrationType(t.method)})(Xpe||(TE.SemanticTokensRegistrationType=Xpe={}));var KIr;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=j5.MessageDirection.clientToServer,t.type=new j5.ProtocolRequestType(t.method),t.registrationMethod=Xpe.method})(KIr||(TE.SemanticTokensRequest=KIr={}));var JIr;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=j5.MessageDirection.clientToServer,t.type=new j5.ProtocolRequestType(t.method),t.registrationMethod=Xpe.method})(JIr||(TE.SemanticTokensDeltaRequest=JIr={}));var XIr;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=j5.MessageDirection.clientToServer,t.type=new j5.ProtocolRequestType(t.method),t.registrationMethod=Xpe.method})(XIr||(TE.SemanticTokensRangeRequest=XIr={}));var ZIr;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=j5.MessageDirection.serverToClient,t.type=new j5.ProtocolRequestType0(t.method)})(ZIr||(TE.SemanticTokensRefreshRequest=ZIr={}))});var nxr=T(w5e=>{"use strict";f();Object.defineProperty(w5e,"__esModule",{value:!0});w5e.ShowDocumentRequest=void 0;var txr=Cu(),rxr;(function(t){t.method="window/showDocument",t.messageDirection=txr.MessageDirection.serverToClient,t.type=new txr.ProtocolRequestType(t.method)})(rxr||(w5e.ShowDocumentRequest=rxr={}))});var sxr=T(R5e=>{"use strict";f();Object.defineProperty(R5e,"__esModule",{value:!0});R5e.LinkedEditingRangeRequest=void 0;var ixr=Cu(),oxr;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=ixr.MessageDirection.clientToServer,t.type=new ixr.ProtocolRequestType(t.method)})(oxr||(R5e.LinkedEditingRangeRequest=oxr={}))});var hxr=T(Sg=>{"use strict";f();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.WillDeleteFilesRequest=Sg.DidDeleteFilesNotification=Sg.DidRenameFilesNotification=Sg.WillRenameFilesRequest=Sg.DidCreateFilesNotification=Sg.WillCreateFilesRequest=Sg.FileOperationPatternKind=void 0;var Qb=Cu(),axr;(function(t){t.file="file",t.folder="folder"})(axr||(Sg.FileOperationPatternKind=axr={}));var cxr;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolRequestType(t.method)})(cxr||(Sg.WillCreateFilesRequest=cxr={}));var lxr;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolNotificationType(t.method)})(lxr||(Sg.DidCreateFilesNotification=lxr={}));var uxr;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolRequestType(t.method)})(uxr||(Sg.WillRenameFilesRequest=uxr={}));var dxr;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolNotificationType(t.method)})(dxr||(Sg.DidRenameFilesNotification=dxr={}));var fxr;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolNotificationType(t.method)})(fxr||(Sg.DidDeleteFilesNotification=fxr={}));var pxr;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolRequestType(t.method)})(pxr||(Sg.WillDeleteFilesRequest=pxr={}))});var Exr=T(wL=>{"use strict";f();Object.defineProperty(wL,"__esModule",{value:!0});wL.MonikerRequest=wL.MonikerKind=wL.UniquenessLevel=void 0;var mxr=Cu(),gxr;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(gxr||(wL.UniquenessLevel=gxr={}));var Axr;(function(t){t.$import="import",t.$export="export",t.local="local"})(Axr||(wL.MonikerKind=Axr={}));var yxr;(function(t){t.method="textDocument/moniker",t.messageDirection=mxr.MessageDirection.clientToServer,t.type=new mxr.ProtocolRequestType(t.method)})(yxr||(wL.MonikerRequest=yxr={}))});var bxr=T(RL=>{"use strict";f();Object.defineProperty(RL,"__esModule",{value:!0});RL.TypeHierarchySubtypesRequest=RL.TypeHierarchySupertypesRequest=RL.TypeHierarchyPrepareRequest=void 0;var LZ=Cu(),Cxr;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=LZ.MessageDirection.clientToServer,t.type=new LZ.ProtocolRequestType(t.method)})(Cxr||(RL.TypeHierarchyPrepareRequest=Cxr={}));var _xr;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=LZ.MessageDirection.clientToServer,t.type=new LZ.ProtocolRequestType(t.method)})(_xr||(RL.TypeHierarchySupertypesRequest=_xr={}));var vxr;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=LZ.MessageDirection.clientToServer,t.type=new LZ.ProtocolRequestType(t.method)})(vxr||(RL.TypeHierarchySubtypesRequest=vxr={}))});var Ixr=T(FZ=>{"use strict";f();Object.defineProperty(FZ,"__esModule",{value:!0});FZ.InlineValueRefreshRequest=FZ.InlineValueRequest=void 0;var P5e=Cu(),Txr;(function(t){t.method="textDocument/inlineValue",t.messageDirection=P5e.MessageDirection.clientToServer,t.type=new P5e.ProtocolRequestType(t.method)})(Txr||(FZ.InlineValueRequest=Txr={}));var Sxr;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=P5e.MessageDirection.serverToClient,t.type=new P5e.ProtocolRequestType0(t.method)})(Sxr||(FZ.InlineValueRefreshRequest=Sxr={}))});var Pxr=T(PL=>{"use strict";f();Object.defineProperty(PL,"__esModule",{value:!0});PL.InlayHintRefreshRequest=PL.InlayHintResolveRequest=PL.InlayHintRequest=void 0;var UZ=Cu(),xxr;(function(t){t.method="textDocument/inlayHint",t.messageDirection=UZ.MessageDirection.clientToServer,t.type=new UZ.ProtocolRequestType(t.method)})(xxr||(PL.InlayHintRequest=xxr={}));var wxr;(function(t){t.method="inlayHint/resolve",t.messageDirection=UZ.MessageDirection.clientToServer,t.type=new UZ.ProtocolRequestType(t.method)})(wxr||(PL.InlayHintResolveRequest=wxr={}));var Rxr;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=UZ.MessageDirection.serverToClient,t.type=new UZ.ProtocolRequestType0(t.method)})(Rxr||(PL.InlayHintRefreshRequest=Rxr={}))});var Lxr=T(qb=>{"use strict";f();Object.defineProperty(qb,"__esModule",{value:!0});qb.DiagnosticRefreshRequest=qb.WorkspaceDiagnosticRequest=qb.DocumentDiagnosticRequest=qb.DocumentDiagnosticReportKind=qb.DiagnosticServerCancellationData=void 0;var Bxr=Kq(),d2i=y5e(),QZ=Cu(),kxr;(function(t){function e(r){let n=r;return n&&d2i.boolean(n.retriggerRequest)}a(e,"is"),t.is=e})(kxr||(qb.DiagnosticServerCancellationData=kxr={}));var Nxr;(function(t){t.Full="full",t.Unchanged="unchanged"})(Nxr||(qb.DocumentDiagnosticReportKind=Nxr={}));var Dxr;(function(t){t.method="textDocument/diagnostic",t.messageDirection=QZ.MessageDirection.clientToServer,t.type=new QZ.ProtocolRequestType(t.method),t.partialResult=new Bxr.ProgressType})(Dxr||(qb.DocumentDiagnosticRequest=Dxr={}));var Mxr;(function(t){t.method="workspace/diagnostic",t.messageDirection=QZ.MessageDirection.clientToServer,t.type=new QZ.ProtocolRequestType(t.method),t.partialResult=new Bxr.ProgressType})(Mxr||(qb.WorkspaceDiagnosticRequest=Mxr={}));var Oxr;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=QZ.MessageDirection.serverToClient,t.type=new QZ.ProtocolRequestType0(t.method)})(Oxr||(qb.DiagnosticRefreshRequest=Oxr={}))});var jxr=T(bd=>{"use strict";f();Object.defineProperty(bd,"__esModule",{value:!0});bd.DidCloseNotebookDocumentNotification=bd.DidSaveNotebookDocumentNotification=bd.DidChangeNotebookDocumentNotification=bd.NotebookCellArrayChange=bd.DidOpenNotebookDocumentNotification=bd.NotebookDocumentSyncRegistrationType=bd.NotebookDocument=bd.NotebookCell=bd.ExecutionSummary=bd.NotebookCellKind=void 0;var Zpe=Jpe(),ZI=y5e(),H2=Cu(),qAt;(function(t){t.Markup=1,t.Code=2;function e(r){return r===1||r===2}a(e,"is"),t.is=e})(qAt||(bd.NotebookCellKind=qAt={}));var GAt;(function(t){function e(o,s){let c={executionOrder:o};return(s===!0||s===!1)&&(c.success=s),c}a(e,"create"),t.create=e;function r(o){let s=o;return ZI.objectLiteral(s)&&Zpe.uinteger.is(s.executionOrder)&&(s.success===void 0||ZI.boolean(s.success))}a(r,"is"),t.is=r;function n(o,s){return o===s?!0:o==null||s===null||s===void 0?!1:o.executionOrder===s.executionOrder&&o.success===s.success}a(n,"equals"),t.equals=n})(GAt||(bd.ExecutionSummary=GAt={}));var k5e;(function(t){function e(s,c){return{kind:s,document:c}}a(e,"create"),t.create=e;function r(s){let c=s;return ZI.objectLiteral(c)&&qAt.is(c.kind)&&Zpe.DocumentUri.is(c.document)&&(c.metadata===void 0||ZI.objectLiteral(c.metadata))}a(r,"is"),t.is=r;function n(s,c){let l=new Set;return s.document!==c.document&&l.add("document"),s.kind!==c.kind&&l.add("kind"),s.executionSummary!==c.executionSummary&&l.add("executionSummary"),(s.metadata!==void 0||c.metadata!==void 0)&&!o(s.metadata,c.metadata)&&l.add("metadata"),(s.executionSummary!==void 0||c.executionSummary!==void 0)&&!GAt.equals(s.executionSummary,c.executionSummary)&&l.add("executionSummary"),l}a(n,"diff"),t.diff=n;function o(s,c){if(s===c)return!0;if(s==null||c===null||c===void 0||typeof s!=typeof c||typeof s!="object")return!1;let l=Array.isArray(s),u=Array.isArray(c);if(l!==u)return!1;if(l&&u){if(s.length!==c.length)return!1;for(let d=0;d{"use strict";f();Object.defineProperty(N5e,"__esModule",{value:!0});N5e.InlineCompletionRequest=void 0;var $xr=Cu(),Vxr;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=$xr.MessageDirection.clientToServer,t.type=new $xr.ProtocolRequestType(t.method)})(Vxr||(N5e.InlineCompletionRequest=Vxr={}))});var sRr=T(be=>{"use strict";f();Object.defineProperty(be,"__esModule",{value:!0});be.WorkspaceSymbolRequest=be.CodeActionResolveRequest=be.CodeActionRequest=be.DocumentSymbolRequest=be.DocumentHighlightRequest=be.ReferencesRequest=be.DefinitionRequest=be.SignatureHelpRequest=be.SignatureHelpTriggerKind=be.HoverRequest=be.CompletionResolveRequest=be.CompletionRequest=be.CompletionTriggerKind=be.PublishDiagnosticsNotification=be.WatchKind=be.RelativePattern=be.FileChangeType=be.DidChangeWatchedFilesNotification=be.WillSaveTextDocumentWaitUntilRequest=be.WillSaveTextDocumentNotification=be.TextDocumentSaveReason=be.DidSaveTextDocumentNotification=be.DidCloseTextDocumentNotification=be.DidChangeTextDocumentNotification=be.TextDocumentContentChangeEvent=be.DidOpenTextDocumentNotification=be.TextDocumentSyncKind=be.TelemetryEventNotification=be.LogMessageNotification=be.ShowMessageRequest=be.ShowMessageNotification=be.MessageType=be.DidChangeConfigurationNotification=be.ExitNotification=be.ShutdownRequest=be.InitializedNotification=be.InitializeErrorCodes=be.InitializeRequest=be.WorkDoneProgressOptions=be.TextDocumentRegistrationOptions=be.StaticRegistrationOptions=be.PositionEncodingKind=be.FailureHandlingKind=be.ResourceOperationKind=be.UnregistrationRequest=be.RegistrationRequest=be.DocumentSelector=be.NotebookCellTextDocumentFilter=be.NotebookDocumentFilter=be.TextDocumentFilter=void 0;be.MonikerRequest=be.MonikerKind=be.UniquenessLevel=be.WillDeleteFilesRequest=be.DidDeleteFilesNotification=be.WillRenameFilesRequest=be.DidRenameFilesNotification=be.WillCreateFilesRequest=be.DidCreateFilesNotification=be.FileOperationPatternKind=be.LinkedEditingRangeRequest=be.ShowDocumentRequest=be.SemanticTokensRegistrationType=be.SemanticTokensRefreshRequest=be.SemanticTokensRangeRequest=be.SemanticTokensDeltaRequest=be.SemanticTokensRequest=be.TokenFormat=be.CallHierarchyPrepareRequest=be.CallHierarchyOutgoingCallsRequest=be.CallHierarchyIncomingCallsRequest=be.WorkDoneProgressCancelNotification=be.WorkDoneProgressCreateRequest=be.WorkDoneProgress=be.SelectionRangeRequest=be.DeclarationRequest=be.FoldingRangeRefreshRequest=be.FoldingRangeRequest=be.ColorPresentationRequest=be.DocumentColorRequest=be.ConfigurationRequest=be.DidChangeWorkspaceFoldersNotification=be.WorkspaceFoldersRequest=be.TypeDefinitionRequest=be.ImplementationRequest=be.ApplyWorkspaceEditRequest=be.ExecuteCommandRequest=be.PrepareRenameRequest=be.RenameRequest=be.PrepareSupportDefaultBehavior=be.DocumentOnTypeFormattingRequest=be.DocumentRangesFormattingRequest=be.DocumentRangeFormattingRequest=be.DocumentFormattingRequest=be.DocumentLinkResolveRequest=be.DocumentLinkRequest=be.CodeLensRefreshRequest=be.CodeLensResolveRequest=be.CodeLensRequest=be.WorkspaceSymbolResolveRequest=void 0;be.InlineCompletionRequest=be.DidCloseNotebookDocumentNotification=be.DidSaveNotebookDocumentNotification=be.DidChangeNotebookDocumentNotification=be.NotebookCellArrayChange=be.DidOpenNotebookDocumentNotification=be.NotebookDocumentSyncRegistrationType=be.NotebookDocument=be.NotebookCell=be.ExecutionSummary=be.NotebookCellKind=be.DiagnosticRefreshRequest=be.WorkspaceDiagnosticRequest=be.DocumentDiagnosticRequest=be.DocumentDiagnosticReportKind=be.DiagnosticServerCancellationData=be.InlayHintRefreshRequest=be.InlayHintResolveRequest=be.InlayHintRequest=be.InlineValueRefreshRequest=be.InlineValueRequest=be.TypeHierarchySupertypesRequest=be.TypeHierarchySubtypesRequest=be.TypeHierarchyPrepareRequest=void 0;var cr=Cu(),zxr=Jpe(),Yp=y5e(),f2i=EIr();Object.defineProperty(be,"ImplementationRequest",{enumerable:!0,get:a(function(){return f2i.ImplementationRequest},"get")});var p2i=vIr();Object.defineProperty(be,"TypeDefinitionRequest",{enumerable:!0,get:a(function(){return p2i.TypeDefinitionRequest},"get")});var rRr=SIr();Object.defineProperty(be,"WorkspaceFoldersRequest",{enumerable:!0,get:a(function(){return rRr.WorkspaceFoldersRequest},"get")});Object.defineProperty(be,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:a(function(){return rRr.DidChangeWorkspaceFoldersNotification},"get")});var h2i=wIr();Object.defineProperty(be,"ConfigurationRequest",{enumerable:!0,get:a(function(){return h2i.ConfigurationRequest},"get")});var nRr=kIr();Object.defineProperty(be,"DocumentColorRequest",{enumerable:!0,get:a(function(){return nRr.DocumentColorRequest},"get")});Object.defineProperty(be,"ColorPresentationRequest",{enumerable:!0,get:a(function(){return nRr.ColorPresentationRequest},"get")});var iRr=MIr();Object.defineProperty(be,"FoldingRangeRequest",{enumerable:!0,get:a(function(){return iRr.FoldingRangeRequest},"get")});Object.defineProperty(be,"FoldingRangeRefreshRequest",{enumerable:!0,get:a(function(){return iRr.FoldingRangeRefreshRequest},"get")});var m2i=LIr();Object.defineProperty(be,"DeclarationRequest",{enumerable:!0,get:a(function(){return m2i.DeclarationRequest},"get")});var g2i=QIr();Object.defineProperty(be,"SelectionRangeRequest",{enumerable:!0,get:a(function(){return g2i.SelectionRangeRequest},"get")});var WAt=jIr();Object.defineProperty(be,"WorkDoneProgress",{enumerable:!0,get:a(function(){return WAt.WorkDoneProgress},"get")});Object.defineProperty(be,"WorkDoneProgressCreateRequest",{enumerable:!0,get:a(function(){return WAt.WorkDoneProgressCreateRequest},"get")});Object.defineProperty(be,"WorkDoneProgressCancelNotification",{enumerable:!0,get:a(function(){return WAt.WorkDoneProgressCancelNotification},"get")});var zAt=zIr();Object.defineProperty(be,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:a(function(){return zAt.CallHierarchyIncomingCallsRequest},"get")});Object.defineProperty(be,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:a(function(){return zAt.CallHierarchyOutgoingCallsRequest},"get")});Object.defineProperty(be,"CallHierarchyPrepareRequest",{enumerable:!0,get:a(function(){return zAt.CallHierarchyPrepareRequest},"get")});var GZ=exr();Object.defineProperty(be,"TokenFormat",{enumerable:!0,get:a(function(){return GZ.TokenFormat},"get")});Object.defineProperty(be,"SemanticTokensRequest",{enumerable:!0,get:a(function(){return GZ.SemanticTokensRequest},"get")});Object.defineProperty(be,"SemanticTokensDeltaRequest",{enumerable:!0,get:a(function(){return GZ.SemanticTokensDeltaRequest},"get")});Object.defineProperty(be,"SemanticTokensRangeRequest",{enumerable:!0,get:a(function(){return GZ.SemanticTokensRangeRequest},"get")});Object.defineProperty(be,"SemanticTokensRefreshRequest",{enumerable:!0,get:a(function(){return GZ.SemanticTokensRefreshRequest},"get")});Object.defineProperty(be,"SemanticTokensRegistrationType",{enumerable:!0,get:a(function(){return GZ.SemanticTokensRegistrationType},"get")});var A2i=nxr();Object.defineProperty(be,"ShowDocumentRequest",{enumerable:!0,get:a(function(){return A2i.ShowDocumentRequest},"get")});var y2i=sxr();Object.defineProperty(be,"LinkedEditingRangeRequest",{enumerable:!0,get:a(function(){return y2i.LinkedEditingRangeRequest},"get")});var Jq=hxr();Object.defineProperty(be,"FileOperationPatternKind",{enumerable:!0,get:a(function(){return Jq.FileOperationPatternKind},"get")});Object.defineProperty(be,"DidCreateFilesNotification",{enumerable:!0,get:a(function(){return Jq.DidCreateFilesNotification},"get")});Object.defineProperty(be,"WillCreateFilesRequest",{enumerable:!0,get:a(function(){return Jq.WillCreateFilesRequest},"get")});Object.defineProperty(be,"DidRenameFilesNotification",{enumerable:!0,get:a(function(){return Jq.DidRenameFilesNotification},"get")});Object.defineProperty(be,"WillRenameFilesRequest",{enumerable:!0,get:a(function(){return Jq.WillRenameFilesRequest},"get")});Object.defineProperty(be,"DidDeleteFilesNotification",{enumerable:!0,get:a(function(){return Jq.DidDeleteFilesNotification},"get")});Object.defineProperty(be,"WillDeleteFilesRequest",{enumerable:!0,get:a(function(){return Jq.WillDeleteFilesRequest},"get")});var YAt=Exr();Object.defineProperty(be,"UniquenessLevel",{enumerable:!0,get:a(function(){return YAt.UniquenessLevel},"get")});Object.defineProperty(be,"MonikerKind",{enumerable:!0,get:a(function(){return YAt.MonikerKind},"get")});Object.defineProperty(be,"MonikerRequest",{enumerable:!0,get:a(function(){return YAt.MonikerRequest},"get")});var KAt=bxr();Object.defineProperty(be,"TypeHierarchyPrepareRequest",{enumerable:!0,get:a(function(){return KAt.TypeHierarchyPrepareRequest},"get")});Object.defineProperty(be,"TypeHierarchySubtypesRequest",{enumerable:!0,get:a(function(){return KAt.TypeHierarchySubtypesRequest},"get")});Object.defineProperty(be,"TypeHierarchySupertypesRequest",{enumerable:!0,get:a(function(){return KAt.TypeHierarchySupertypesRequest},"get")});var oRr=Ixr();Object.defineProperty(be,"InlineValueRequest",{enumerable:!0,get:a(function(){return oRr.InlineValueRequest},"get")});Object.defineProperty(be,"InlineValueRefreshRequest",{enumerable:!0,get:a(function(){return oRr.InlineValueRefreshRequest},"get")});var JAt=Pxr();Object.defineProperty(be,"InlayHintRequest",{enumerable:!0,get:a(function(){return JAt.InlayHintRequest},"get")});Object.defineProperty(be,"InlayHintResolveRequest",{enumerable:!0,get:a(function(){return JAt.InlayHintResolveRequest},"get")});Object.defineProperty(be,"InlayHintRefreshRequest",{enumerable:!0,get:a(function(){return JAt.InlayHintRefreshRequest},"get")});var ehe=Lxr();Object.defineProperty(be,"DiagnosticServerCancellationData",{enumerable:!0,get:a(function(){return ehe.DiagnosticServerCancellationData},"get")});Object.defineProperty(be,"DocumentDiagnosticReportKind",{enumerable:!0,get:a(function(){return ehe.DocumentDiagnosticReportKind},"get")});Object.defineProperty(be,"DocumentDiagnosticRequest",{enumerable:!0,get:a(function(){return ehe.DocumentDiagnosticRequest},"get")});Object.defineProperty(be,"WorkspaceDiagnosticRequest",{enumerable:!0,get:a(function(){return ehe.WorkspaceDiagnosticRequest},"get")});Object.defineProperty(be,"DiagnosticRefreshRequest",{enumerable:!0,get:a(function(){return ehe.DiagnosticRefreshRequest},"get")});var j2=jxr();Object.defineProperty(be,"NotebookCellKind",{enumerable:!0,get:a(function(){return j2.NotebookCellKind},"get")});Object.defineProperty(be,"ExecutionSummary",{enumerable:!0,get:a(function(){return j2.ExecutionSummary},"get")});Object.defineProperty(be,"NotebookCell",{enumerable:!0,get:a(function(){return j2.NotebookCell},"get")});Object.defineProperty(be,"NotebookDocument",{enumerable:!0,get:a(function(){return j2.NotebookDocument},"get")});Object.defineProperty(be,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:a(function(){return j2.NotebookDocumentSyncRegistrationType},"get")});Object.defineProperty(be,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:a(function(){return j2.DidOpenNotebookDocumentNotification},"get")});Object.defineProperty(be,"NotebookCellArrayChange",{enumerable:!0,get:a(function(){return j2.NotebookCellArrayChange},"get")});Object.defineProperty(be,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:a(function(){return j2.DidChangeNotebookDocumentNotification},"get")});Object.defineProperty(be,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:a(function(){return j2.DidSaveNotebookDocumentNotification},"get")});Object.defineProperty(be,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:a(function(){return j2.DidCloseNotebookDocumentNotification},"get")});var E2i=Wxr();Object.defineProperty(be,"InlineCompletionRequest",{enumerable:!0,get:a(function(){return E2i.InlineCompletionRequest},"get")});var HAt;(function(t){function e(r){let n=r;return Yp.string(n)||Yp.string(n.language)||Yp.string(n.scheme)||Yp.string(n.pattern)}a(e,"is"),t.is=e})(HAt||(be.TextDocumentFilter=HAt={}));var jAt;(function(t){function e(r){let n=r;return Yp.objectLiteral(n)&&(Yp.string(n.notebookType)||Yp.string(n.scheme)||Yp.string(n.pattern))}a(e,"is"),t.is=e})(jAt||(be.NotebookDocumentFilter=jAt={}));var $At;(function(t){function e(r){let n=r;return Yp.objectLiteral(n)&&(Yp.string(n.notebook)||jAt.is(n.notebook))&&(n.language===void 0||Yp.string(n.language))}a(e,"is"),t.is=e})($At||(be.NotebookCellTextDocumentFilter=$At={}));var VAt;(function(t){function e(r){if(!Array.isArray(r))return!1;for(let n of r)if(!Yp.string(n)&&!HAt.is(n)&&!$At.is(n))return!1;return!0}a(e,"is"),t.is=e})(VAt||(be.DocumentSelector=VAt={}));var Yxr;(function(t){t.method="client/registerCapability",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(Yxr||(be.RegistrationRequest=Yxr={}));var Kxr;(function(t){t.method="client/unregisterCapability",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(Kxr||(be.UnregistrationRequest=Kxr={}));var Jxr;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(Jxr||(be.ResourceOperationKind=Jxr={}));var Xxr;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(Xxr||(be.FailureHandlingKind=Xxr={}));var Zxr;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(Zxr||(be.PositionEncodingKind=Zxr={}));var ewr;(function(t){function e(r){let n=r;return n&&Yp.string(n.id)&&n.id.length>0}a(e,"hasId"),t.hasId=e})(ewr||(be.StaticRegistrationOptions=ewr={}));var twr;(function(t){function e(r){let n=r;return n&&(n.documentSelector===null||VAt.is(n.documentSelector))}a(e,"is"),t.is=e})(twr||(be.TextDocumentRegistrationOptions=twr={}));var rwr;(function(t){function e(n){let o=n;return Yp.objectLiteral(o)&&(o.workDoneProgress===void 0||Yp.boolean(o.workDoneProgress))}a(e,"is"),t.is=e;function r(n){let o=n;return o&&Yp.boolean(o.workDoneProgress)}a(r,"hasWorkDoneProgress"),t.hasWorkDoneProgress=r})(rwr||(be.WorkDoneProgressOptions=rwr={}));var nwr;(function(t){t.method="initialize",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(nwr||(be.InitializeRequest=nwr={}));var iwr;(function(t){t.unknownProtocolVersion=1})(iwr||(be.InitializeErrorCodes=iwr={}));var owr;(function(t){t.method="initialized",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(owr||(be.InitializedNotification=owr={}));var swr;(function(t){t.method="shutdown",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType0(t.method)})(swr||(be.ShutdownRequest=swr={}));var awr;(function(t){t.method="exit",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType0(t.method)})(awr||(be.ExitNotification=awr={}));var cwr;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(cwr||(be.DidChangeConfigurationNotification=cwr={}));var lwr;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(lwr||(be.MessageType=lwr={}));var uwr;(function(t){t.method="window/showMessage",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(uwr||(be.ShowMessageNotification=uwr={}));var dwr;(function(t){t.method="window/showMessageRequest",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(dwr||(be.ShowMessageRequest=dwr={}));var fwr;(function(t){t.method="window/logMessage",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(fwr||(be.LogMessageNotification=fwr={}));var pwr;(function(t){t.method="telemetry/event",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(pwr||(be.TelemetryEventNotification=pwr={}));var hwr;(function(t){t.None=0,t.Full=1,t.Incremental=2})(hwr||(be.TextDocumentSyncKind=hwr={}));var mwr;(function(t){t.method="textDocument/didOpen",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(mwr||(be.DidOpenTextDocumentNotification=mwr={}));var gwr;(function(t){function e(n){let o=n;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}a(e,"isIncremental"),t.isIncremental=e;function r(n){let o=n;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}a(r,"isFull"),t.isFull=r})(gwr||(be.TextDocumentContentChangeEvent=gwr={}));var Awr;(function(t){t.method="textDocument/didChange",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Awr||(be.DidChangeTextDocumentNotification=Awr={}));var ywr;(function(t){t.method="textDocument/didClose",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(ywr||(be.DidCloseTextDocumentNotification=ywr={}));var Ewr;(function(t){t.method="textDocument/didSave",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Ewr||(be.DidSaveTextDocumentNotification=Ewr={}));var Cwr;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(Cwr||(be.TextDocumentSaveReason=Cwr={}));var _wr;(function(t){t.method="textDocument/willSave",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(_wr||(be.WillSaveTextDocumentNotification=_wr={}));var vwr;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(vwr||(be.WillSaveTextDocumentWaitUntilRequest=vwr={}));var bwr;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(bwr||(be.DidChangeWatchedFilesNotification=bwr={}));var Twr;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Twr||(be.FileChangeType=Twr={}));var Swr;(function(t){function e(r){let n=r;return Yp.objectLiteral(n)&&(zxr.URI.is(n.baseUri)||zxr.WorkspaceFolder.is(n.baseUri))&&Yp.string(n.pattern)}a(e,"is"),t.is=e})(Swr||(be.RelativePattern=Swr={}));var Iwr;(function(t){t.Create=1,t.Change=2,t.Delete=4})(Iwr||(be.WatchKind=Iwr={}));var xwr;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(xwr||(be.PublishDiagnosticsNotification=xwr={}));var wwr;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(wwr||(be.CompletionTriggerKind=wwr={}));var Rwr;(function(t){t.method="textDocument/completion",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Rwr||(be.CompletionRequest=Rwr={}));var Pwr;(function(t){t.method="completionItem/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Pwr||(be.CompletionResolveRequest=Pwr={}));var kwr;(function(t){t.method="textDocument/hover",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(kwr||(be.HoverRequest=kwr={}));var Nwr;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Nwr||(be.SignatureHelpTriggerKind=Nwr={}));var Dwr;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Dwr||(be.SignatureHelpRequest=Dwr={}));var Mwr;(function(t){t.method="textDocument/definition",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Mwr||(be.DefinitionRequest=Mwr={}));var Owr;(function(t){t.method="textDocument/references",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Owr||(be.ReferencesRequest=Owr={}));var Bwr;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Bwr||(be.DocumentHighlightRequest=Bwr={}));var Lwr;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Lwr||(be.DocumentSymbolRequest=Lwr={}));var Fwr;(function(t){t.method="textDocument/codeAction",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Fwr||(be.CodeActionRequest=Fwr={}));var Uwr;(function(t){t.method="codeAction/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Uwr||(be.CodeActionResolveRequest=Uwr={}));var Qwr;(function(t){t.method="workspace/symbol",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Qwr||(be.WorkspaceSymbolRequest=Qwr={}));var qwr;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(qwr||(be.WorkspaceSymbolResolveRequest=qwr={}));var Gwr;(function(t){t.method="textDocument/codeLens",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Gwr||(be.CodeLensRequest=Gwr={}));var Hwr;(function(t){t.method="codeLens/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Hwr||(be.CodeLensResolveRequest=Hwr={}));var jwr;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType0(t.method)})(jwr||(be.CodeLensRefreshRequest=jwr={}));var $wr;(function(t){t.method="textDocument/documentLink",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})($wr||(be.DocumentLinkRequest=$wr={}));var Vwr;(function(t){t.method="documentLink/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Vwr||(be.DocumentLinkResolveRequest=Vwr={}));var Wwr;(function(t){t.method="textDocument/formatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Wwr||(be.DocumentFormattingRequest=Wwr={}));var zwr;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(zwr||(be.DocumentRangeFormattingRequest=zwr={}));var Ywr;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Ywr||(be.DocumentRangesFormattingRequest=Ywr={}));var Kwr;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Kwr||(be.DocumentOnTypeFormattingRequest=Kwr={}));var Jwr;(function(t){t.Identifier=1})(Jwr||(be.PrepareSupportDefaultBehavior=Jwr={}));var Xwr;(function(t){t.method="textDocument/rename",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Xwr||(be.RenameRequest=Xwr={}));var Zwr;(function(t){t.method="textDocument/prepareRename",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Zwr||(be.PrepareRenameRequest=Zwr={}));var eRr;(function(t){t.method="workspace/executeCommand",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(eRr||(be.ExecuteCommandRequest=eRr={}));var tRr;(function(t){t.method="workspace/applyEdit",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType("workspace/applyEdit")})(tRr||(be.ApplyWorkspaceEditRequest=tRr={}))});var cRr=T(D5e=>{"use strict";f();Object.defineProperty(D5e,"__esModule",{value:!0});D5e.createProtocolConnection=void 0;var aRr=Kq();function C2i(t,e,r,n){return aRr.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,aRr.createMessageConnection)(t,e,r,n)}a(C2i,"createProtocolConnection");D5e.createProtocolConnection=C2i});var uRr=T(SE=>{"use strict";f();var _2i=SE&&SE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M5e=SE&&SE.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_2i(e,t,r)};Object.defineProperty(SE,"__esModule",{value:!0});SE.LSPErrorCodes=SE.createProtocolConnection=void 0;M5e(Kq(),SE);M5e(Jpe(),SE);M5e(Cu(),SE);M5e(sRr(),SE);var v2i=cRr();Object.defineProperty(SE,"createProtocolConnection",{enumerable:!0,get:a(function(){return v2i.createProtocolConnection},"get")});var lRr;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(lRr||(SE.LSPErrorCodes=lRr={}))});var Nn=T($2=>{"use strict";f();var b2i=$2&&$2.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dRr=$2&&$2.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&b2i(e,t,r)};Object.defineProperty($2,"__esModule",{value:!0});$2.createProtocolConnection=void 0;var T2i=OAt();dRr(OAt(),$2);dRr(uRr(),$2);function S2i(t,e,r,n){return(0,T2i.createMessageConnection)(t,e,r,n)}a(S2i,"createProtocolConnection");$2.createProtocolConnection=S2i});var W_t=T(sBe=>{"use strict";f();Object.defineProperty(sBe,"__esModule",{value:!0});sBe.state=void 0;sBe.state={instrumenterImplementation:void 0}});var Fte=T((Avt,S5r)=>{f();var ZBe=require("buffer"),kP=ZBe.Buffer;function T5r(t,e){for(var r in t)e[r]=t[r]}a(T5r,"copyProps");kP.from&&kP.alloc&&kP.allocUnsafe&&kP.allocUnsafeSlow?S5r.exports=ZBe:(T5r(ZBe,Avt),Avt.Buffer=WH);function WH(t,e,r){return kP(t,e,r)}a(WH,"SafeBuffer");WH.prototype=Object.create(kP.prototype);T5r(kP,WH);WH.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return kP(t,e,r)};WH.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=kP(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};WH.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return kP(t)};WH.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ZBe.SlowBuffer(t)}});var yvt=T((aMc,I5r)=>{f();var e3e=Fte().Buffer,NOi=require("stream"),DOi=require("util");function t3e(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=e3e.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=e3e.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}a(t3e,"DataStream");DOi.inherits(t3e,NOi);t3e.prototype.write=a(function(e){this.buffer=e3e.concat([this.buffer,e3e.from(e)]),this.emit("data",e)},"write");t3e.prototype.end=a(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");I5r.exports=t3e});var w5r=T((uMc,x5r)=>{"use strict";f();function Evt(t){var e=(t/8|0)+(t%8===0?0:1);return e}a(Evt,"getParamSize");var MOi={ES256:Evt(256),ES384:Evt(384),ES512:Evt(521)};function OOi(t){var e=MOi[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}a(OOi,"getParamBytesForAlg");x5r.exports=OOi});var O5r=T((pMc,M5r)=>{"use strict";f();var r3e=Fte().Buffer,P5r=w5r(),n3e=128,k5r=0,BOi=32,LOi=16,FOi=2,N5r=LOi|BOi|k5r<<6,i3e=FOi|k5r<<6;function UOi(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(UOi,"base64Url");function D5r(t){if(r3e.isBuffer(t))return t;if(typeof t=="string")return r3e.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(D5r,"signatureAsBuffer");function QOi(t,e){t=D5r(t);var r=P5r(e),n=r+1,o=t.length,s=0;if(t[s++]!==N5r)throw new Error('Could not find expected "seq"');var c=t[s++];if(c===(n3e|1)&&(c=t[s++]),o-s=n3e;return o&&--n,n}a(R5r,"countPadding");function qOi(t,e){t=D5r(t);var r=P5r(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var o=R5r(t,0,r),s=R5r(t,r,t.length),c=r-o,l=r-s,u=2+c+1+1+l,d=u{"use strict";f();var uAe=require("buffer").Buffer,Cvt=require("buffer").SlowBuffer;B5r.exports=o3e;function o3e(t,e){if(!uAe.isBuffer(t)||!uAe.isBuffer(e)||t.length!==e.length)return!1;for(var r=0,n=0;n{f();var Qte=Fte().Buffer,lT=require("crypto"),U5r=O5r(),F5r=require("util"),jOi=`"%s" is not a valid algorithm. +`&&V++}ne&&me.length>0&&pe.push(me.length),this._lineOffsets=pe}return this._lineOffsets},K.prototype.positionAt=function(pe){pe=Math.max(Math.min(pe,this._content.length),0);var me=this.getLineOffsets(),ne=0,V=me.length;if(V===0)return c.create(0,pe);for(;nepe?V=Re:ne=Re+1}var ze=ne-1;return c.create(ze,pe-me[ze])},K.prototype.offsetAt=function(pe){var me=this.getLineOffsets();if(pe.line>=me.length)return this._content.length;if(pe.line<0)return 0;var ne=me[pe.line],V=pe.line+1"u"}a(ne,"undefined"),K.undefined=ne;function V(Lt){return Lt===!0||Lt===!1}a(V,"boolean"),K.boolean=V;function Re(Lt){return pe.call(Lt)==="[object String]"}a(Re,"string"),K.string=Re;function ze(Lt){return pe.call(Lt)==="[object Number]"}a(ze,"number"),K.number=ze;function Dt(Lt,sr,Lp){return pe.call(Lt)==="[object Number]"&&sr<=Lt&&Lt<=Lp}a(Dt,"numberRange"),K.numberRange=Dt;function tr(Lt){return pe.call(Lt)==="[object Number]"&&-2147483648<=Lt&&Lt<=2147483647}a(tr,"integer"),K.integer=tr;function Wt(Lt){return pe.call(Lt)==="[object Number]"&&0<=Lt&&Lt<=2147483647}a(Wt,"uinteger"),K.uinteger=Wt;function gr(Lt){return pe.call(Lt)==="[object Function]"}a(gr,"func"),K.func=gr;function xr(Lt){return Lt!==null&&typeof Lt=="object"}a(xr,"objectLiteral"),K.objectLiteral=xr;function wr(Lt,sr){return Array.isArray(Lt)&&Lt.every(sr)}a(wr,"typedArray"),K.typedArray=wr})(Ie||(Ie={}))})});var fu=T(hE=>{"use strict";f();Object.defineProperty(hE,"__esModule",{value:!0});hE.ProtocolNotificationType=hE.ProtocolNotificationType0=hE.ProtocolRequestType=hE.ProtocolRequestType0=hE.RegistrationType=hE.MessageDirection=void 0;var UX=bq(),NIr;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(NIr||(hE.MessageDirection=NIr={}));var jgt=class{static{a(this,"RegistrationType")}constructor(e){this.method=e}};hE.RegistrationType=jgt;var $gt=class extends UX.RequestType0{static{a(this,"ProtocolRequestType0")}constructor(e){super(e)}};hE.ProtocolRequestType0=$gt;var Vgt=class extends UX.RequestType{static{a(this,"ProtocolRequestType")}constructor(e){super(e,UX.ParameterStructures.byName)}};hE.ProtocolRequestType=Vgt;var Wgt=class extends UX.NotificationType0{static{a(this,"ProtocolNotificationType0")}constructor(e){super(e)}};hE.ProtocolNotificationType0=Wgt;var zgt=class extends UX.NotificationType{static{a(this,"ProtocolNotificationType")}constructor(e){super(e,UX.ParameterStructures.byName)}};hE.ProtocolNotificationType=zgt});var mDe=T(qf=>{"use strict";f();Object.defineProperty(qf,"__esModule",{value:!0});qf.objectLiteral=qf.typedArray=qf.stringArray=qf.array=qf.func=qf.error=qf.number=qf.string=qf.boolean=void 0;function nPi(t){return t===!0||t===!1}a(nPi,"boolean");qf.boolean=nPi;function MIr(t){return typeof t=="string"||t instanceof String}a(MIr,"string");qf.string=MIr;function iPi(t){return typeof t=="number"||t instanceof Number}a(iPi,"number");qf.number=iPi;function oPi(t){return t instanceof Error}a(oPi,"error");qf.error=oPi;function sPi(t){return typeof t=="function"}a(sPi,"func");qf.func=sPi;function OIr(t){return Array.isArray(t)}a(OIr,"array");qf.array=OIr;function aPi(t){return OIr(t)&&t.every(e=>MIr(e))}a(aPi,"stringArray");qf.stringArray=aPi;function cPi(t,e){return Array.isArray(t)&&t.every(e)}a(cPi,"typedArray");qf.typedArray=cPi;function lPi(t){return t!==null&&typeof t=="object"}a(lPi,"objectLiteral");qf.objectLiteral=lPi});var FIr=T(gDe=>{"use strict";f();Object.defineProperty(gDe,"__esModule",{value:!0});gDe.ImplementationRequest=void 0;var BIr=fu(),LIr;(function(t){t.method="textDocument/implementation",t.messageDirection=BIr.MessageDirection.clientToServer,t.type=new BIr.ProtocolRequestType(t.method)})(LIr||(gDe.ImplementationRequest=LIr={}))});var qIr=T(ADe=>{"use strict";f();Object.defineProperty(ADe,"__esModule",{value:!0});ADe.TypeDefinitionRequest=void 0;var UIr=fu(),QIr;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=UIr.MessageDirection.clientToServer,t.type=new UIr.ProtocolRequestType(t.method)})(QIr||(ADe.TypeDefinitionRequest=QIr={}))});var jIr=T(QX=>{"use strict";f();Object.defineProperty(QX,"__esModule",{value:!0});QX.DidChangeWorkspaceFoldersNotification=QX.WorkspaceFoldersRequest=void 0;var yDe=fu(),GIr;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=yDe.MessageDirection.serverToClient,t.type=new yDe.ProtocolRequestType0(t.method)})(GIr||(QX.WorkspaceFoldersRequest=GIr={}));var HIr;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=yDe.MessageDirection.clientToServer,t.type=new yDe.ProtocolNotificationType(t.method)})(HIr||(QX.DidChangeWorkspaceFoldersNotification=HIr={}))});var WIr=T(EDe=>{"use strict";f();Object.defineProperty(EDe,"__esModule",{value:!0});EDe.ConfigurationRequest=void 0;var $Ir=fu(),VIr;(function(t){t.method="workspace/configuration",t.messageDirection=$Ir.MessageDirection.serverToClient,t.type=new $Ir.ProtocolRequestType(t.method)})(VIr||(EDe.ConfigurationRequest=VIr={}))});var KIr=T(qX=>{"use strict";f();Object.defineProperty(qX,"__esModule",{value:!0});qX.ColorPresentationRequest=qX.DocumentColorRequest=void 0;var _De=fu(),zIr;(function(t){t.method="textDocument/documentColor",t.messageDirection=_De.MessageDirection.clientToServer,t.type=new _De.ProtocolRequestType(t.method)})(zIr||(qX.DocumentColorRequest=zIr={}));var YIr;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=_De.MessageDirection.clientToServer,t.type=new _De.ProtocolRequestType(t.method)})(YIr||(qX.ColorPresentationRequest=YIr={}))});var ZIr=T(GX=>{"use strict";f();Object.defineProperty(GX,"__esModule",{value:!0});GX.FoldingRangeRefreshRequest=GX.FoldingRangeRequest=void 0;var CDe=fu(),JIr;(function(t){t.method="textDocument/foldingRange",t.messageDirection=CDe.MessageDirection.clientToServer,t.type=new CDe.ProtocolRequestType(t.method)})(JIr||(GX.FoldingRangeRequest=JIr={}));var XIr;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=CDe.MessageDirection.serverToClient,t.type=new CDe.ProtocolRequestType0(t.method)})(XIr||(GX.FoldingRangeRefreshRequest=XIr={}))});var rxr=T(vDe=>{"use strict";f();Object.defineProperty(vDe,"__esModule",{value:!0});vDe.DeclarationRequest=void 0;var exr=fu(),txr;(function(t){t.method="textDocument/declaration",t.messageDirection=exr.MessageDirection.clientToServer,t.type=new exr.ProtocolRequestType(t.method)})(txr||(vDe.DeclarationRequest=txr={}))});var oxr=T(bDe=>{"use strict";f();Object.defineProperty(bDe,"__esModule",{value:!0});bDe.SelectionRangeRequest=void 0;var nxr=fu(),ixr;(function(t){t.method="textDocument/selectionRange",t.messageDirection=nxr.MessageDirection.clientToServer,t.type=new nxr.ProtocolRequestType(t.method)})(ixr||(bDe.SelectionRangeRequest=ixr={}))});var lxr=T(cL=>{"use strict";f();Object.defineProperty(cL,"__esModule",{value:!0});cL.WorkDoneProgressCancelNotification=cL.WorkDoneProgressCreateRequest=cL.WorkDoneProgress=void 0;var uPi=bq(),TDe=fu(),sxr;(function(t){t.type=new uPi.ProgressType;function e(r){return r===t.type}a(e,"is"),t.is=e})(sxr||(cL.WorkDoneProgress=sxr={}));var axr;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=TDe.MessageDirection.serverToClient,t.type=new TDe.ProtocolRequestType(t.method)})(axr||(cL.WorkDoneProgressCreateRequest=axr={}));var cxr;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=TDe.MessageDirection.clientToServer,t.type=new TDe.ProtocolNotificationType(t.method)})(cxr||(cL.WorkDoneProgressCancelNotification=cxr={}))});var pxr=T(lL=>{"use strict";f();Object.defineProperty(lL,"__esModule",{value:!0});lL.CallHierarchyOutgoingCallsRequest=lL.CallHierarchyIncomingCallsRequest=lL.CallHierarchyPrepareRequest=void 0;var HX=fu(),uxr;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=HX.MessageDirection.clientToServer,t.type=new HX.ProtocolRequestType(t.method)})(uxr||(lL.CallHierarchyPrepareRequest=uxr={}));var dxr;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=HX.MessageDirection.clientToServer,t.type=new HX.ProtocolRequestType(t.method)})(dxr||(lL.CallHierarchyIncomingCallsRequest=dxr={}));var fxr;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=HX.MessageDirection.clientToServer,t.type=new HX.ProtocolRequestType(t.method)})(fxr||(lL.CallHierarchyOutgoingCallsRequest=fxr={}))});var Exr=T(mE=>{"use strict";f();Object.defineProperty(mE,"__esModule",{value:!0});mE.SemanticTokensRefreshRequest=mE.SemanticTokensRangeRequest=mE.SemanticTokensDeltaRequest=mE.SemanticTokensRequest=mE.SemanticTokensRegistrationType=mE.TokenFormat=void 0;var DN=fu(),hxr;(function(t){t.Relative="relative"})(hxr||(mE.TokenFormat=hxr={}));var fpe;(function(t){t.method="textDocument/semanticTokens",t.type=new DN.RegistrationType(t.method)})(fpe||(mE.SemanticTokensRegistrationType=fpe={}));var mxr;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=DN.MessageDirection.clientToServer,t.type=new DN.ProtocolRequestType(t.method),t.registrationMethod=fpe.method})(mxr||(mE.SemanticTokensRequest=mxr={}));var gxr;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=DN.MessageDirection.clientToServer,t.type=new DN.ProtocolRequestType(t.method),t.registrationMethod=fpe.method})(gxr||(mE.SemanticTokensDeltaRequest=gxr={}));var Axr;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=DN.MessageDirection.clientToServer,t.type=new DN.ProtocolRequestType(t.method),t.registrationMethod=fpe.method})(Axr||(mE.SemanticTokensRangeRequest=Axr={}));var yxr;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=DN.MessageDirection.serverToClient,t.type=new DN.ProtocolRequestType0(t.method)})(yxr||(mE.SemanticTokensRefreshRequest=yxr={}))});var vxr=T(SDe=>{"use strict";f();Object.defineProperty(SDe,"__esModule",{value:!0});SDe.ShowDocumentRequest=void 0;var _xr=fu(),Cxr;(function(t){t.method="window/showDocument",t.messageDirection=_xr.MessageDirection.serverToClient,t.type=new _xr.ProtocolRequestType(t.method)})(Cxr||(SDe.ShowDocumentRequest=Cxr={}))});var Sxr=T(IDe=>{"use strict";f();Object.defineProperty(IDe,"__esModule",{value:!0});IDe.LinkedEditingRangeRequest=void 0;var bxr=fu(),Txr;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=bxr.MessageDirection.clientToServer,t.type=new bxr.ProtocolRequestType(t.method)})(Txr||(IDe.LinkedEditingRangeRequest=Txr={}))});var Nxr=T(mg=>{"use strict";f();Object.defineProperty(mg,"__esModule",{value:!0});mg.WillDeleteFilesRequest=mg.DidDeleteFilesNotification=mg.DidRenameFilesNotification=mg.WillRenameFilesRequest=mg.DidCreateFilesNotification=mg.WillCreateFilesRequest=mg.FileOperationPatternKind=void 0;var xb=fu(),Ixr;(function(t){t.file="file",t.folder="folder"})(Ixr||(mg.FileOperationPatternKind=Ixr={}));var xxr;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolRequestType(t.method)})(xxr||(mg.WillCreateFilesRequest=xxr={}));var wxr;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolNotificationType(t.method)})(wxr||(mg.DidCreateFilesNotification=wxr={}));var Rxr;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolRequestType(t.method)})(Rxr||(mg.WillRenameFilesRequest=Rxr={}));var Pxr;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolNotificationType(t.method)})(Pxr||(mg.DidRenameFilesNotification=Pxr={}));var kxr;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolNotificationType(t.method)})(kxr||(mg.DidDeleteFilesNotification=kxr={}));var Dxr;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=xb.MessageDirection.clientToServer,t.type=new xb.ProtocolRequestType(t.method)})(Dxr||(mg.WillDeleteFilesRequest=Dxr={}))});var Fxr=T(uL=>{"use strict";f();Object.defineProperty(uL,"__esModule",{value:!0});uL.MonikerRequest=uL.MonikerKind=uL.UniquenessLevel=void 0;var Mxr=fu(),Oxr;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(Oxr||(uL.UniquenessLevel=Oxr={}));var Bxr;(function(t){t.$import="import",t.$export="export",t.local="local"})(Bxr||(uL.MonikerKind=Bxr={}));var Lxr;(function(t){t.method="textDocument/moniker",t.messageDirection=Mxr.MessageDirection.clientToServer,t.type=new Mxr.ProtocolRequestType(t.method)})(Lxr||(uL.MonikerRequest=Lxr={}))});var Gxr=T(dL=>{"use strict";f();Object.defineProperty(dL,"__esModule",{value:!0});dL.TypeHierarchySubtypesRequest=dL.TypeHierarchySupertypesRequest=dL.TypeHierarchyPrepareRequest=void 0;var jX=fu(),Uxr;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=jX.MessageDirection.clientToServer,t.type=new jX.ProtocolRequestType(t.method)})(Uxr||(dL.TypeHierarchyPrepareRequest=Uxr={}));var Qxr;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=jX.MessageDirection.clientToServer,t.type=new jX.ProtocolRequestType(t.method)})(Qxr||(dL.TypeHierarchySupertypesRequest=Qxr={}));var qxr;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=jX.MessageDirection.clientToServer,t.type=new jX.ProtocolRequestType(t.method)})(qxr||(dL.TypeHierarchySubtypesRequest=qxr={}))});var $xr=T($X=>{"use strict";f();Object.defineProperty($X,"__esModule",{value:!0});$X.InlineValueRefreshRequest=$X.InlineValueRequest=void 0;var xDe=fu(),Hxr;(function(t){t.method="textDocument/inlineValue",t.messageDirection=xDe.MessageDirection.clientToServer,t.type=new xDe.ProtocolRequestType(t.method)})(Hxr||($X.InlineValueRequest=Hxr={}));var jxr;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=xDe.MessageDirection.serverToClient,t.type=new xDe.ProtocolRequestType0(t.method)})(jxr||($X.InlineValueRefreshRequest=jxr={}))});var Yxr=T(fL=>{"use strict";f();Object.defineProperty(fL,"__esModule",{value:!0});fL.InlayHintRefreshRequest=fL.InlayHintResolveRequest=fL.InlayHintRequest=void 0;var VX=fu(),Vxr;(function(t){t.method="textDocument/inlayHint",t.messageDirection=VX.MessageDirection.clientToServer,t.type=new VX.ProtocolRequestType(t.method)})(Vxr||(fL.InlayHintRequest=Vxr={}));var Wxr;(function(t){t.method="inlayHint/resolve",t.messageDirection=VX.MessageDirection.clientToServer,t.type=new VX.ProtocolRequestType(t.method)})(Wxr||(fL.InlayHintResolveRequest=Wxr={}));var zxr;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=VX.MessageDirection.serverToClient,t.type=new VX.ProtocolRequestType0(t.method)})(zxr||(fL.InlayHintRefreshRequest=zxr={}))});var rwr=T(wb=>{"use strict";f();Object.defineProperty(wb,"__esModule",{value:!0});wb.DiagnosticRefreshRequest=wb.WorkspaceDiagnosticRequest=wb.DocumentDiagnosticRequest=wb.DocumentDiagnosticReportKind=wb.DiagnosticServerCancellationData=void 0;var twr=bq(),dPi=mDe(),WX=fu(),Kxr;(function(t){function e(r){let n=r;return n&&dPi.boolean(n.retriggerRequest)}a(e,"is"),t.is=e})(Kxr||(wb.DiagnosticServerCancellationData=Kxr={}));var Jxr;(function(t){t.Full="full",t.Unchanged="unchanged"})(Jxr||(wb.DocumentDiagnosticReportKind=Jxr={}));var Xxr;(function(t){t.method="textDocument/diagnostic",t.messageDirection=WX.MessageDirection.clientToServer,t.type=new WX.ProtocolRequestType(t.method),t.partialResult=new twr.ProgressType})(Xxr||(wb.DocumentDiagnosticRequest=Xxr={}));var Zxr;(function(t){t.method="workspace/diagnostic",t.messageDirection=WX.MessageDirection.clientToServer,t.type=new WX.ProtocolRequestType(t.method),t.partialResult=new twr.ProgressType})(Zxr||(wb.WorkspaceDiagnosticRequest=Zxr={}));var ewr;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=WX.MessageDirection.serverToClient,t.type=new WX.ProtocolRequestType0(t.method)})(ewr||(wb.DiagnosticRefreshRequest=ewr={}))});var lwr=T(md=>{"use strict";f();Object.defineProperty(md,"__esModule",{value:!0});md.DidCloseNotebookDocumentNotification=md.DidSaveNotebookDocumentNotification=md.DidChangeNotebookDocumentNotification=md.NotebookCellArrayChange=md.DidOpenNotebookDocumentNotification=md.NotebookDocumentSyncRegistrationType=md.NotebookDocument=md.NotebookCell=md.ExecutionSummary=md.NotebookCellKind=void 0;var ppe=dpe(),qI=mDe(),D2=fu(),Ygt;(function(t){t.Markup=1,t.Code=2;function e(r){return r===1||r===2}a(e,"is"),t.is=e})(Ygt||(md.NotebookCellKind=Ygt={}));var Kgt;(function(t){function e(o,s){let c={executionOrder:o};return(s===!0||s===!1)&&(c.success=s),c}a(e,"create"),t.create=e;function r(o){let s=o;return qI.objectLiteral(s)&&ppe.uinteger.is(s.executionOrder)&&(s.success===void 0||qI.boolean(s.success))}a(r,"is"),t.is=r;function n(o,s){return o===s?!0:o==null||s===null||s===void 0?!1:o.executionOrder===s.executionOrder&&o.success===s.success}a(n,"equals"),t.equals=n})(Kgt||(md.ExecutionSummary=Kgt={}));var wDe;(function(t){function e(s,c){return{kind:s,document:c}}a(e,"create"),t.create=e;function r(s){let c=s;return qI.objectLiteral(c)&&Ygt.is(c.kind)&&ppe.DocumentUri.is(c.document)&&(c.metadata===void 0||qI.objectLiteral(c.metadata))}a(r,"is"),t.is=r;function n(s,c){let l=new Set;return s.document!==c.document&&l.add("document"),s.kind!==c.kind&&l.add("kind"),s.executionSummary!==c.executionSummary&&l.add("executionSummary"),(s.metadata!==void 0||c.metadata!==void 0)&&!o(s.metadata,c.metadata)&&l.add("metadata"),(s.executionSummary!==void 0||c.executionSummary!==void 0)&&!Kgt.equals(s.executionSummary,c.executionSummary)&&l.add("executionSummary"),l}a(n,"diff"),t.diff=n;function o(s,c){if(s===c)return!0;if(s==null||c===null||c===void 0||typeof s!=typeof c||typeof s!="object")return!1;let l=Array.isArray(s),u=Array.isArray(c);if(l!==u)return!1;if(l&&u){if(s.length!==c.length)return!1;for(let d=0;d{"use strict";f();Object.defineProperty(RDe,"__esModule",{value:!0});RDe.InlineCompletionRequest=void 0;var uwr=fu(),dwr;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=uwr.MessageDirection.clientToServer,t.type=new uwr.ProtocolRequestType(t.method)})(dwr||(RDe.InlineCompletionRequest=dwr={}))});var SRr=T(be=>{"use strict";f();Object.defineProperty(be,"__esModule",{value:!0});be.WorkspaceSymbolRequest=be.CodeActionResolveRequest=be.CodeActionRequest=be.DocumentSymbolRequest=be.DocumentHighlightRequest=be.ReferencesRequest=be.DefinitionRequest=be.SignatureHelpRequest=be.SignatureHelpTriggerKind=be.HoverRequest=be.CompletionResolveRequest=be.CompletionRequest=be.CompletionTriggerKind=be.PublishDiagnosticsNotification=be.WatchKind=be.RelativePattern=be.FileChangeType=be.DidChangeWatchedFilesNotification=be.WillSaveTextDocumentWaitUntilRequest=be.WillSaveTextDocumentNotification=be.TextDocumentSaveReason=be.DidSaveTextDocumentNotification=be.DidCloseTextDocumentNotification=be.DidChangeTextDocumentNotification=be.TextDocumentContentChangeEvent=be.DidOpenTextDocumentNotification=be.TextDocumentSyncKind=be.TelemetryEventNotification=be.LogMessageNotification=be.ShowMessageRequest=be.ShowMessageNotification=be.MessageType=be.DidChangeConfigurationNotification=be.ExitNotification=be.ShutdownRequest=be.InitializedNotification=be.InitializeErrorCodes=be.InitializeRequest=be.WorkDoneProgressOptions=be.TextDocumentRegistrationOptions=be.StaticRegistrationOptions=be.PositionEncodingKind=be.FailureHandlingKind=be.ResourceOperationKind=be.UnregistrationRequest=be.RegistrationRequest=be.DocumentSelector=be.NotebookCellTextDocumentFilter=be.NotebookDocumentFilter=be.TextDocumentFilter=void 0;be.MonikerRequest=be.MonikerKind=be.UniquenessLevel=be.WillDeleteFilesRequest=be.DidDeleteFilesNotification=be.WillRenameFilesRequest=be.DidRenameFilesNotification=be.WillCreateFilesRequest=be.DidCreateFilesNotification=be.FileOperationPatternKind=be.LinkedEditingRangeRequest=be.ShowDocumentRequest=be.SemanticTokensRegistrationType=be.SemanticTokensRefreshRequest=be.SemanticTokensRangeRequest=be.SemanticTokensDeltaRequest=be.SemanticTokensRequest=be.TokenFormat=be.CallHierarchyPrepareRequest=be.CallHierarchyOutgoingCallsRequest=be.CallHierarchyIncomingCallsRequest=be.WorkDoneProgressCancelNotification=be.WorkDoneProgressCreateRequest=be.WorkDoneProgress=be.SelectionRangeRequest=be.DeclarationRequest=be.FoldingRangeRefreshRequest=be.FoldingRangeRequest=be.ColorPresentationRequest=be.DocumentColorRequest=be.ConfigurationRequest=be.DidChangeWorkspaceFoldersNotification=be.WorkspaceFoldersRequest=be.TypeDefinitionRequest=be.ImplementationRequest=be.ApplyWorkspaceEditRequest=be.ExecuteCommandRequest=be.PrepareRenameRequest=be.RenameRequest=be.PrepareSupportDefaultBehavior=be.DocumentOnTypeFormattingRequest=be.DocumentRangesFormattingRequest=be.DocumentRangeFormattingRequest=be.DocumentFormattingRequest=be.DocumentLinkResolveRequest=be.DocumentLinkRequest=be.CodeLensRefreshRequest=be.CodeLensResolveRequest=be.CodeLensRequest=be.WorkspaceSymbolResolveRequest=void 0;be.InlineCompletionRequest=be.DidCloseNotebookDocumentNotification=be.DidSaveNotebookDocumentNotification=be.DidChangeNotebookDocumentNotification=be.NotebookCellArrayChange=be.DidOpenNotebookDocumentNotification=be.NotebookDocumentSyncRegistrationType=be.NotebookDocument=be.NotebookCell=be.ExecutionSummary=be.NotebookCellKind=be.DiagnosticRefreshRequest=be.WorkspaceDiagnosticRequest=be.DocumentDiagnosticRequest=be.DocumentDiagnosticReportKind=be.DiagnosticServerCancellationData=be.InlayHintRefreshRequest=be.InlayHintResolveRequest=be.InlayHintRequest=be.InlineValueRefreshRequest=be.InlineValueRequest=be.TypeHierarchySupertypesRequest=be.TypeHierarchySubtypesRequest=be.TypeHierarchyPrepareRequest=void 0;var cr=fu(),pwr=dpe(),Hp=mDe(),fPi=FIr();Object.defineProperty(be,"ImplementationRequest",{enumerable:!0,get:a(function(){return fPi.ImplementationRequest},"get")});var pPi=qIr();Object.defineProperty(be,"TypeDefinitionRequest",{enumerable:!0,get:a(function(){return pPi.TypeDefinitionRequest},"get")});var CRr=jIr();Object.defineProperty(be,"WorkspaceFoldersRequest",{enumerable:!0,get:a(function(){return CRr.WorkspaceFoldersRequest},"get")});Object.defineProperty(be,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:a(function(){return CRr.DidChangeWorkspaceFoldersNotification},"get")});var hPi=WIr();Object.defineProperty(be,"ConfigurationRequest",{enumerable:!0,get:a(function(){return hPi.ConfigurationRequest},"get")});var vRr=KIr();Object.defineProperty(be,"DocumentColorRequest",{enumerable:!0,get:a(function(){return vRr.DocumentColorRequest},"get")});Object.defineProperty(be,"ColorPresentationRequest",{enumerable:!0,get:a(function(){return vRr.ColorPresentationRequest},"get")});var bRr=ZIr();Object.defineProperty(be,"FoldingRangeRequest",{enumerable:!0,get:a(function(){return bRr.FoldingRangeRequest},"get")});Object.defineProperty(be,"FoldingRangeRefreshRequest",{enumerable:!0,get:a(function(){return bRr.FoldingRangeRefreshRequest},"get")});var mPi=rxr();Object.defineProperty(be,"DeclarationRequest",{enumerable:!0,get:a(function(){return mPi.DeclarationRequest},"get")});var gPi=oxr();Object.defineProperty(be,"SelectionRangeRequest",{enumerable:!0,get:a(function(){return gPi.SelectionRangeRequest},"get")});var tAt=lxr();Object.defineProperty(be,"WorkDoneProgress",{enumerable:!0,get:a(function(){return tAt.WorkDoneProgress},"get")});Object.defineProperty(be,"WorkDoneProgressCreateRequest",{enumerable:!0,get:a(function(){return tAt.WorkDoneProgressCreateRequest},"get")});Object.defineProperty(be,"WorkDoneProgressCancelNotification",{enumerable:!0,get:a(function(){return tAt.WorkDoneProgressCancelNotification},"get")});var rAt=pxr();Object.defineProperty(be,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:a(function(){return rAt.CallHierarchyIncomingCallsRequest},"get")});Object.defineProperty(be,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:a(function(){return rAt.CallHierarchyOutgoingCallsRequest},"get")});Object.defineProperty(be,"CallHierarchyPrepareRequest",{enumerable:!0,get:a(function(){return rAt.CallHierarchyPrepareRequest},"get")});var YX=Exr();Object.defineProperty(be,"TokenFormat",{enumerable:!0,get:a(function(){return YX.TokenFormat},"get")});Object.defineProperty(be,"SemanticTokensRequest",{enumerable:!0,get:a(function(){return YX.SemanticTokensRequest},"get")});Object.defineProperty(be,"SemanticTokensDeltaRequest",{enumerable:!0,get:a(function(){return YX.SemanticTokensDeltaRequest},"get")});Object.defineProperty(be,"SemanticTokensRangeRequest",{enumerable:!0,get:a(function(){return YX.SemanticTokensRangeRequest},"get")});Object.defineProperty(be,"SemanticTokensRefreshRequest",{enumerable:!0,get:a(function(){return YX.SemanticTokensRefreshRequest},"get")});Object.defineProperty(be,"SemanticTokensRegistrationType",{enumerable:!0,get:a(function(){return YX.SemanticTokensRegistrationType},"get")});var APi=vxr();Object.defineProperty(be,"ShowDocumentRequest",{enumerable:!0,get:a(function(){return APi.ShowDocumentRequest},"get")});var yPi=Sxr();Object.defineProperty(be,"LinkedEditingRangeRequest",{enumerable:!0,get:a(function(){return yPi.LinkedEditingRangeRequest},"get")});var Tq=Nxr();Object.defineProperty(be,"FileOperationPatternKind",{enumerable:!0,get:a(function(){return Tq.FileOperationPatternKind},"get")});Object.defineProperty(be,"DidCreateFilesNotification",{enumerable:!0,get:a(function(){return Tq.DidCreateFilesNotification},"get")});Object.defineProperty(be,"WillCreateFilesRequest",{enumerable:!0,get:a(function(){return Tq.WillCreateFilesRequest},"get")});Object.defineProperty(be,"DidRenameFilesNotification",{enumerable:!0,get:a(function(){return Tq.DidRenameFilesNotification},"get")});Object.defineProperty(be,"WillRenameFilesRequest",{enumerable:!0,get:a(function(){return Tq.WillRenameFilesRequest},"get")});Object.defineProperty(be,"DidDeleteFilesNotification",{enumerable:!0,get:a(function(){return Tq.DidDeleteFilesNotification},"get")});Object.defineProperty(be,"WillDeleteFilesRequest",{enumerable:!0,get:a(function(){return Tq.WillDeleteFilesRequest},"get")});var nAt=Fxr();Object.defineProperty(be,"UniquenessLevel",{enumerable:!0,get:a(function(){return nAt.UniquenessLevel},"get")});Object.defineProperty(be,"MonikerKind",{enumerable:!0,get:a(function(){return nAt.MonikerKind},"get")});Object.defineProperty(be,"MonikerRequest",{enumerable:!0,get:a(function(){return nAt.MonikerRequest},"get")});var iAt=Gxr();Object.defineProperty(be,"TypeHierarchyPrepareRequest",{enumerable:!0,get:a(function(){return iAt.TypeHierarchyPrepareRequest},"get")});Object.defineProperty(be,"TypeHierarchySubtypesRequest",{enumerable:!0,get:a(function(){return iAt.TypeHierarchySubtypesRequest},"get")});Object.defineProperty(be,"TypeHierarchySupertypesRequest",{enumerable:!0,get:a(function(){return iAt.TypeHierarchySupertypesRequest},"get")});var TRr=$xr();Object.defineProperty(be,"InlineValueRequest",{enumerable:!0,get:a(function(){return TRr.InlineValueRequest},"get")});Object.defineProperty(be,"InlineValueRefreshRequest",{enumerable:!0,get:a(function(){return TRr.InlineValueRefreshRequest},"get")});var oAt=Yxr();Object.defineProperty(be,"InlayHintRequest",{enumerable:!0,get:a(function(){return oAt.InlayHintRequest},"get")});Object.defineProperty(be,"InlayHintResolveRequest",{enumerable:!0,get:a(function(){return oAt.InlayHintResolveRequest},"get")});Object.defineProperty(be,"InlayHintRefreshRequest",{enumerable:!0,get:a(function(){return oAt.InlayHintRefreshRequest},"get")});var hpe=rwr();Object.defineProperty(be,"DiagnosticServerCancellationData",{enumerable:!0,get:a(function(){return hpe.DiagnosticServerCancellationData},"get")});Object.defineProperty(be,"DocumentDiagnosticReportKind",{enumerable:!0,get:a(function(){return hpe.DocumentDiagnosticReportKind},"get")});Object.defineProperty(be,"DocumentDiagnosticRequest",{enumerable:!0,get:a(function(){return hpe.DocumentDiagnosticRequest},"get")});Object.defineProperty(be,"WorkspaceDiagnosticRequest",{enumerable:!0,get:a(function(){return hpe.WorkspaceDiagnosticRequest},"get")});Object.defineProperty(be,"DiagnosticRefreshRequest",{enumerable:!0,get:a(function(){return hpe.DiagnosticRefreshRequest},"get")});var N2=lwr();Object.defineProperty(be,"NotebookCellKind",{enumerable:!0,get:a(function(){return N2.NotebookCellKind},"get")});Object.defineProperty(be,"ExecutionSummary",{enumerable:!0,get:a(function(){return N2.ExecutionSummary},"get")});Object.defineProperty(be,"NotebookCell",{enumerable:!0,get:a(function(){return N2.NotebookCell},"get")});Object.defineProperty(be,"NotebookDocument",{enumerable:!0,get:a(function(){return N2.NotebookDocument},"get")});Object.defineProperty(be,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:a(function(){return N2.NotebookDocumentSyncRegistrationType},"get")});Object.defineProperty(be,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:a(function(){return N2.DidOpenNotebookDocumentNotification},"get")});Object.defineProperty(be,"NotebookCellArrayChange",{enumerable:!0,get:a(function(){return N2.NotebookCellArrayChange},"get")});Object.defineProperty(be,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:a(function(){return N2.DidChangeNotebookDocumentNotification},"get")});Object.defineProperty(be,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:a(function(){return N2.DidSaveNotebookDocumentNotification},"get")});Object.defineProperty(be,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:a(function(){return N2.DidCloseNotebookDocumentNotification},"get")});var EPi=fwr();Object.defineProperty(be,"InlineCompletionRequest",{enumerable:!0,get:a(function(){return EPi.InlineCompletionRequest},"get")});var Jgt;(function(t){function e(r){let n=r;return Hp.string(n)||Hp.string(n.language)||Hp.string(n.scheme)||Hp.string(n.pattern)}a(e,"is"),t.is=e})(Jgt||(be.TextDocumentFilter=Jgt={}));var Xgt;(function(t){function e(r){let n=r;return Hp.objectLiteral(n)&&(Hp.string(n.notebookType)||Hp.string(n.scheme)||Hp.string(n.pattern))}a(e,"is"),t.is=e})(Xgt||(be.NotebookDocumentFilter=Xgt={}));var Zgt;(function(t){function e(r){let n=r;return Hp.objectLiteral(n)&&(Hp.string(n.notebook)||Xgt.is(n.notebook))&&(n.language===void 0||Hp.string(n.language))}a(e,"is"),t.is=e})(Zgt||(be.NotebookCellTextDocumentFilter=Zgt={}));var eAt;(function(t){function e(r){if(!Array.isArray(r))return!1;for(let n of r)if(!Hp.string(n)&&!Jgt.is(n)&&!Zgt.is(n))return!1;return!0}a(e,"is"),t.is=e})(eAt||(be.DocumentSelector=eAt={}));var hwr;(function(t){t.method="client/registerCapability",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(hwr||(be.RegistrationRequest=hwr={}));var mwr;(function(t){t.method="client/unregisterCapability",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(mwr||(be.UnregistrationRequest=mwr={}));var gwr;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(gwr||(be.ResourceOperationKind=gwr={}));var Awr;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(Awr||(be.FailureHandlingKind=Awr={}));var ywr;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(ywr||(be.PositionEncodingKind=ywr={}));var Ewr;(function(t){function e(r){let n=r;return n&&Hp.string(n.id)&&n.id.length>0}a(e,"hasId"),t.hasId=e})(Ewr||(be.StaticRegistrationOptions=Ewr={}));var _wr;(function(t){function e(r){let n=r;return n&&(n.documentSelector===null||eAt.is(n.documentSelector))}a(e,"is"),t.is=e})(_wr||(be.TextDocumentRegistrationOptions=_wr={}));var Cwr;(function(t){function e(n){let o=n;return Hp.objectLiteral(o)&&(o.workDoneProgress===void 0||Hp.boolean(o.workDoneProgress))}a(e,"is"),t.is=e;function r(n){let o=n;return o&&Hp.boolean(o.workDoneProgress)}a(r,"hasWorkDoneProgress"),t.hasWorkDoneProgress=r})(Cwr||(be.WorkDoneProgressOptions=Cwr={}));var vwr;(function(t){t.method="initialize",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(vwr||(be.InitializeRequest=vwr={}));var bwr;(function(t){t.unknownProtocolVersion=1})(bwr||(be.InitializeErrorCodes=bwr={}));var Twr;(function(t){t.method="initialized",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Twr||(be.InitializedNotification=Twr={}));var Swr;(function(t){t.method="shutdown",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType0(t.method)})(Swr||(be.ShutdownRequest=Swr={}));var Iwr;(function(t){t.method="exit",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType0(t.method)})(Iwr||(be.ExitNotification=Iwr={}));var xwr;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(xwr||(be.DidChangeConfigurationNotification=xwr={}));var wwr;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(wwr||(be.MessageType=wwr={}));var Rwr;(function(t){t.method="window/showMessage",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(Rwr||(be.ShowMessageNotification=Rwr={}));var Pwr;(function(t){t.method="window/showMessageRequest",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType(t.method)})(Pwr||(be.ShowMessageRequest=Pwr={}));var kwr;(function(t){t.method="window/logMessage",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(kwr||(be.LogMessageNotification=kwr={}));var Dwr;(function(t){t.method="telemetry/event",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(Dwr||(be.TelemetryEventNotification=Dwr={}));var Nwr;(function(t){t.None=0,t.Full=1,t.Incremental=2})(Nwr||(be.TextDocumentSyncKind=Nwr={}));var Mwr;(function(t){t.method="textDocument/didOpen",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Mwr||(be.DidOpenTextDocumentNotification=Mwr={}));var Owr;(function(t){function e(n){let o=n;return o!=null&&typeof o.text=="string"&&o.range!==void 0&&(o.rangeLength===void 0||typeof o.rangeLength=="number")}a(e,"isIncremental"),t.isIncremental=e;function r(n){let o=n;return o!=null&&typeof o.text=="string"&&o.range===void 0&&o.rangeLength===void 0}a(r,"isFull"),t.isFull=r})(Owr||(be.TextDocumentContentChangeEvent=Owr={}));var Bwr;(function(t){t.method="textDocument/didChange",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Bwr||(be.DidChangeTextDocumentNotification=Bwr={}));var Lwr;(function(t){t.method="textDocument/didClose",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Lwr||(be.DidCloseTextDocumentNotification=Lwr={}));var Fwr;(function(t){t.method="textDocument/didSave",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Fwr||(be.DidSaveTextDocumentNotification=Fwr={}));var Uwr;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(Uwr||(be.TextDocumentSaveReason=Uwr={}));var Qwr;(function(t){t.method="textDocument/willSave",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Qwr||(be.WillSaveTextDocumentNotification=Qwr={}));var qwr;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(qwr||(be.WillSaveTextDocumentWaitUntilRequest=qwr={}));var Gwr;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolNotificationType(t.method)})(Gwr||(be.DidChangeWatchedFilesNotification=Gwr={}));var Hwr;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Hwr||(be.FileChangeType=Hwr={}));var jwr;(function(t){function e(r){let n=r;return Hp.objectLiteral(n)&&(pwr.URI.is(n.baseUri)||pwr.WorkspaceFolder.is(n.baseUri))&&Hp.string(n.pattern)}a(e,"is"),t.is=e})(jwr||(be.RelativePattern=jwr={}));var $wr;(function(t){t.Create=1,t.Change=2,t.Delete=4})($wr||(be.WatchKind=$wr={}));var Vwr;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolNotificationType(t.method)})(Vwr||(be.PublishDiagnosticsNotification=Vwr={}));var Wwr;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Wwr||(be.CompletionTriggerKind=Wwr={}));var zwr;(function(t){t.method="textDocument/completion",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(zwr||(be.CompletionRequest=zwr={}));var Ywr;(function(t){t.method="completionItem/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Ywr||(be.CompletionResolveRequest=Ywr={}));var Kwr;(function(t){t.method="textDocument/hover",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Kwr||(be.HoverRequest=Kwr={}));var Jwr;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Jwr||(be.SignatureHelpTriggerKind=Jwr={}));var Xwr;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Xwr||(be.SignatureHelpRequest=Xwr={}));var Zwr;(function(t){t.method="textDocument/definition",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(Zwr||(be.DefinitionRequest=Zwr={}));var eRr;(function(t){t.method="textDocument/references",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(eRr||(be.ReferencesRequest=eRr={}));var tRr;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(tRr||(be.DocumentHighlightRequest=tRr={}));var rRr;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(rRr||(be.DocumentSymbolRequest=rRr={}));var nRr;(function(t){t.method="textDocument/codeAction",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(nRr||(be.CodeActionRequest=nRr={}));var iRr;(function(t){t.method="codeAction/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(iRr||(be.CodeActionResolveRequest=iRr={}));var oRr;(function(t){t.method="workspace/symbol",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(oRr||(be.WorkspaceSymbolRequest=oRr={}));var sRr;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(sRr||(be.WorkspaceSymbolResolveRequest=sRr={}));var aRr;(function(t){t.method="textDocument/codeLens",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(aRr||(be.CodeLensRequest=aRr={}));var cRr;(function(t){t.method="codeLens/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(cRr||(be.CodeLensResolveRequest=cRr={}));var lRr;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType0(t.method)})(lRr||(be.CodeLensRefreshRequest=lRr={}));var uRr;(function(t){t.method="textDocument/documentLink",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(uRr||(be.DocumentLinkRequest=uRr={}));var dRr;(function(t){t.method="documentLink/resolve",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(dRr||(be.DocumentLinkResolveRequest=dRr={}));var fRr;(function(t){t.method="textDocument/formatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(fRr||(be.DocumentFormattingRequest=fRr={}));var pRr;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(pRr||(be.DocumentRangeFormattingRequest=pRr={}));var hRr;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(hRr||(be.DocumentRangesFormattingRequest=hRr={}));var mRr;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(mRr||(be.DocumentOnTypeFormattingRequest=mRr={}));var gRr;(function(t){t.Identifier=1})(gRr||(be.PrepareSupportDefaultBehavior=gRr={}));var ARr;(function(t){t.method="textDocument/rename",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(ARr||(be.RenameRequest=ARr={}));var yRr;(function(t){t.method="textDocument/prepareRename",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(yRr||(be.PrepareRenameRequest=yRr={}));var ERr;(function(t){t.method="workspace/executeCommand",t.messageDirection=cr.MessageDirection.clientToServer,t.type=new cr.ProtocolRequestType(t.method)})(ERr||(be.ExecuteCommandRequest=ERr={}));var _Rr;(function(t){t.method="workspace/applyEdit",t.messageDirection=cr.MessageDirection.serverToClient,t.type=new cr.ProtocolRequestType("workspace/applyEdit")})(_Rr||(be.ApplyWorkspaceEditRequest=_Rr={}))});var xRr=T(PDe=>{"use strict";f();Object.defineProperty(PDe,"__esModule",{value:!0});PDe.createProtocolConnection=void 0;var IRr=bq();function _Pi(t,e,r,n){return IRr.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,IRr.createMessageConnection)(t,e,r,n)}a(_Pi,"createProtocolConnection");PDe.createProtocolConnection=_Pi});var RRr=T(gE=>{"use strict";f();var CPi=gE&&gE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kDe=gE&&gE.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&CPi(e,t,r)};Object.defineProperty(gE,"__esModule",{value:!0});gE.LSPErrorCodes=gE.createProtocolConnection=void 0;kDe(bq(),gE);kDe(dpe(),gE);kDe(fu(),gE);kDe(SRr(),gE);var vPi=xRr();Object.defineProperty(gE,"createProtocolConnection",{enumerable:!0,get:a(function(){return vPi.createProtocolConnection},"get")});var wRr;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(wRr||(gE.LSPErrorCodes=wRr={}))});var Dn=T(M2=>{"use strict";f();var bPi=M2&&M2.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PRr=M2&&M2.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bPi(e,t,r)};Object.defineProperty(M2,"__esModule",{value:!0});M2.createProtocolConnection=void 0;var TPi=Hgt();PRr(Hgt(),M2);PRr(RRr(),M2);function SPi(t,e,r,n){return(0,TPi.createMessageConnection)(t,e,r,n)}a(SPi,"createProtocolConnection");M2.createProtocolConnection=SPi});var tCt=T(iOe=>{"use strict";f();Object.defineProperty(iOe,"__esModule",{value:!0});iOe.state=void 0;iOe.state={instrumenterImplementation:void 0}});var Zee=T((Bvt,AMr)=>{f();var sBe=require("buffer"),yP=sBe.Buffer;function gMr(t,e){for(var r in t)e[r]=t[r]}a(gMr,"copyProps");yP.from&&yP.alloc&&yP.allocUnsafe&&yP.allocUnsafeSlow?AMr.exports=sBe:(gMr(sBe,Bvt),Bvt.Buffer=eH);function eH(t,e,r){return yP(t,e,r)}a(eH,"SafeBuffer");eH.prototype=Object.create(yP.prototype);gMr(yP,eH);eH.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return yP(t,e,r)};eH.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=yP(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};eH.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return yP(t)};eH.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return sBe.SlowBuffer(t)}});var Lvt=T((cOc,yMr)=>{f();var aBe=Zee().Buffer,kBi=require("stream"),DBi=require("util");function cBe(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=aBe.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=aBe.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}a(cBe,"DataStream");DBi.inherits(cBe,kBi);cBe.prototype.write=a(function(e){this.buffer=aBe.concat([this.buffer,aBe.from(e)]),this.emit("data",e)},"write");cBe.prototype.end=a(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");yMr.exports=cBe});var _Mr=T((dOc,EMr)=>{"use strict";f();function Fvt(t){var e=(t/8|0)+(t%8===0?0:1);return e}a(Fvt,"getParamSize");var NBi={ES256:Fvt(256),ES384:Fvt(384),ES512:Fvt(521)};function MBi(t){var e=NBi[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}a(MBi,"getParamBytesForAlg");EMr.exports=MBi});var xMr=T((hOc,IMr)=>{"use strict";f();var lBe=Zee().Buffer,vMr=_Mr(),uBe=128,bMr=0,OBi=32,BBi=16,LBi=2,TMr=BBi|OBi|bMr<<6,dBe=LBi|bMr<<6;function FBi(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(FBi,"base64Url");function SMr(t){if(lBe.isBuffer(t))return t;if(typeof t=="string")return lBe.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(SMr,"signatureAsBuffer");function UBi(t,e){t=SMr(t);var r=vMr(e),n=r+1,o=t.length,s=0;if(t[s++]!==TMr)throw new Error('Could not find expected "seq"');var c=t[s++];if(c===(uBe|1)&&(c=t[s++]),o-s=uBe;return o&&--n,n}a(CMr,"countPadding");function QBi(t,e){t=SMr(t);var r=vMr(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var o=CMr(t,0,r),s=CMr(t,r,t.length),c=r-o,l=r-s,u=2+c+1+1+l,d=u{"use strict";f();var cge=require("buffer").Buffer,Uvt=require("buffer").SlowBuffer;wMr.exports=fBe;function fBe(t,e){if(!cge.isBuffer(t)||!cge.isBuffer(e)||t.length!==e.length)return!1;for(var r=0,n=0;n{f();var tte=Zee().Buffer,Xb=require("crypto"),kMr=xMr(),PMr=require("util"),HBi=`"%s" is not a valid algorithm. Supported algorithms are: - "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,dAe="secret must be a string or buffer",Ute="key must be a string or a buffer",$Oi="key must be a string, a buffer or an object",vvt=typeof lT.createPublicKey=="function";vvt&&(Ute+=" or a KeyObject",dAe+="or a KeyObject");function Q5r(t){if(!Qte.isBuffer(t)&&typeof t!="string"&&(!vvt||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw vx(Ute)}a(Q5r,"checkIsPublicKey");function q5r(t){if(!Qte.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw vx($Oi)}a(q5r,"checkIsPrivateKey");function VOi(t){if(!Qte.isBuffer(t)){if(typeof t=="string")return t;if(!vvt||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw vx(dAe)}}a(VOi,"checkIsSecretKey");function bvt(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(bvt,"fromBase64");function G5r(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r{f();var r4i=require("buffer").Buffer;W5r.exports=a(function(e){return typeof e=="string"?e:typeof e=="number"||r4i.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var Z5r=T((SMc,X5r)=>{f();var n4i=Fte().Buffer,z5r=yvt(),i4i=Tvt(),o4i=require("stream"),Y5r=Svt(),Ivt=require("util");function K5r(t,e){return n4i.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(K5r,"base64url");function s4i(t,e,r){r=r||"utf8";var n=K5r(Y5r(t),"binary"),o=K5r(Y5r(e),r);return Ivt.format("%s.%s",n,o)}a(s4i,"jwsSecuredInput");function J5r(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,o=t.encoding,s=i4i(e.alg),c=s4i(e,r,o),l=s.sign(c,n);return Ivt.format("%s.%s",c,l)}a(J5r,"jwsSign");function s3e(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new z5r(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new z5r(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a(s3e,"SignStream");Ivt.inherits(s3e,o4i);s3e.prototype.sign=a(function(){try{var e=J5r({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}},"sign");s3e.sign=J5r;X5r.exports=s3e});var lMr=T((wMc,cMr)=>{f();var tMr=Fte().Buffer,eMr=yvt(),a4i=Tvt(),c4i=require("stream"),rMr=Svt(),l4i=require("util"),u4i=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function d4i(t){return Object.prototype.toString.call(t)==="[object Object]"}a(d4i,"isObject");function f4i(t){if(d4i(t))return t;try{return JSON.parse(t)}catch{return}}a(f4i,"safeJsonParse");function nMr(t){var e=t.split(".",1)[0];return f4i(tMr.from(e,"base64").toString("binary"))}a(nMr,"headerFromJWS");function p4i(t){return t.split(".",2).join(".")}a(p4i,"securedInputFromJWS");function iMr(t){return t.split(".")[2]}a(iMr,"signatureFromJWS");function h4i(t,e){e=e||"utf8";var r=t.split(".")[1];return tMr.from(r,"base64").toString(e)}a(h4i,"payloadFromJWS");function oMr(t){return u4i.test(t)&&!!nMr(t)}a(oMr,"isValidJws");function sMr(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=rMr(t);var o=iMr(t),s=p4i(t),c=a4i(e);return c.verify(s,o,r)}a(sMr,"jwsVerify");function aMr(t,e){if(e=e||{},t=rMr(t),!oMr(t))return null;var r=nMr(t);if(!r)return null;var n=h4i(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:iMr(t)}}a(aMr,"jwsDecode");function qte(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new eMr(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new eMr(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(qte,"VerifyStream");l4i.inherits(qte,c4i);qte.prototype.verify=a(function(){try{var e=sMr(this.signature.buffer,this.algorithm,this.key.buffer),r=aMr(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"verify");qte.decode=aMr;qte.isValid=oMr;qte.verify=sMr;cMr.exports=qte});var c3e=T(K8=>{f();var uMr=Z5r(),a3e=lMr(),m4i=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];K8.ALGORITHMS=m4i;K8.sign=uMr.sign;K8.verify=a3e.verify;K8.decode=a3e.decode;K8.isValid=a3e.isValid;K8.createSign=a(function(e){return new uMr(e)},"createSign");K8.createVerify=a(function(e){return new a3e(e)},"createVerify")});var xvt=T((MMc,dMr)=>{f();var g4i=c3e();dMr.exports=function(t,e){e=e||{};var r=g4i.decode(t,e);if(!r)return null;var n=r.payload;if(typeof n=="string")try{var o=JSON.parse(n);o!==null&&typeof o=="object"&&(n=o)}catch{}return e.complete===!0?{header:r.header,payload:n,signature:r.signature}:n}});var pAe=T((BMc,fMr)=>{f();var l3e=a(function(t,e){Error.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=t,e&&(this.inner=e)},"JsonWebTokenError");l3e.prototype=Object.create(Error.prototype);l3e.prototype.constructor=l3e;fMr.exports=l3e});var wvt=T((UMc,hMr)=>{f();var pMr=pAe(),u3e=a(function(t,e){pMr.call(this,t),this.name="NotBeforeError",this.date=e},"NotBeforeError");u3e.prototype=Object.create(pMr.prototype);u3e.prototype.constructor=u3e;hMr.exports=u3e});var Rvt=T((GMc,gMr)=>{f();var mMr=pAe(),d3e=a(function(t,e){mMr.call(this,t),this.name="TokenExpiredError",this.expiredAt=e},"TokenExpiredError");d3e.prototype=Object.create(mMr.prototype);d3e.prototype.constructor=d3e;gMr.exports=d3e});var Pvt=T(($Mc,AMr)=>{f();var Gte=1e3,Hte=Gte*60,jte=Hte*60,zH=jte*24,A4i=zH*7,y4i=zH*365.25;AMr.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return E4i(t);if(r==="number"&&isFinite(t))return e.long?_4i(t):C4i(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function E4i(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*y4i;case"weeks":case"week":case"w":return r*A4i;case"days":case"day":case"d":return r*zH;case"hours":case"hour":case"hrs":case"hr":case"h":return r*jte;case"minutes":case"minute":case"mins":case"min":case"m":return r*Hte;case"seconds":case"second":case"secs":case"sec":case"s":return r*Gte;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(E4i,"parse");function C4i(t){var e=Math.abs(t);return e>=zH?Math.round(t/zH)+"d":e>=jte?Math.round(t/jte)+"h":e>=Hte?Math.round(t/Hte)+"m":e>=Gte?Math.round(t/Gte)+"s":t+"ms"}a(C4i,"fmtShort");function _4i(t){var e=Math.abs(t);return e>=zH?f3e(t,e,zH,"day"):e>=jte?f3e(t,e,jte,"hour"):e>=Hte?f3e(t,e,Hte,"minute"):e>=Gte?f3e(t,e,Gte,"second"):t+" ms"}a(_4i,"fmtLong");function f3e(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(f3e,"plural")});var kvt=T((zMc,yMr)=>{f();var v4i=Pvt();yMr.exports=function(t,e){var r=e||Math.floor(Date.now()/1e3);if(typeof t=="string"){var n=v4i(t);return typeof n>"u"?void 0:Math.floor(r+n/1e3)}else return typeof t=="number"?r+t:void 0}});var hAe=T((KMc,EMr)=>{"use strict";f();var b4i="2.0.0",T4i=Number.MAX_SAFE_INTEGER||9007199254740991,S4i=16,I4i=250,x4i=["major","premajor","minor","preminor","patch","prepatch","prerelease"];EMr.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:S4i,MAX_SAFE_BUILD_LENGTH:I4i,MAX_SAFE_INTEGER:T4i,RELEASE_TYPES:x4i,SEMVER_SPEC_VERSION:b4i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var mAe=T((XMc,CMr)=>{"use strict";f();var w4i=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};CMr.exports=w4i});var $te=T((NP,_Mr)=>{"use strict";f();var{MAX_SAFE_COMPONENT_LENGTH:Nvt,MAX_SAFE_BUILD_LENGTH:R4i,MAX_LENGTH:P4i}=hAe(),k4i=mAe();NP=_Mr.exports={};var N4i=NP.re=[],D4i=NP.safeRe=[],sn=NP.src=[],M4i=NP.safeSrc=[],an=NP.t={},O4i=0,Dvt="[a-zA-Z0-9-]",B4i=[["\\s",1],["\\d",P4i],[Dvt,R4i]],L4i=a(t=>{for(let[e,r]of B4i)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),oo=a((t,e,r)=>{let n=L4i(e),o=O4i++;k4i(t,o,e),an[t]=o,sn[o]=e,M4i[o]=n,N4i[o]=new RegExp(e,r?"g":void 0),D4i[o]=new RegExp(n,r?"g":void 0)},"createToken");oo("NUMERICIDENTIFIER","0|[1-9]\\d*");oo("NUMERICIDENTIFIERLOOSE","\\d+");oo("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Dvt}*`);oo("MAINVERSION",`(${sn[an.NUMERICIDENTIFIER]})\\.(${sn[an.NUMERICIDENTIFIER]})\\.(${sn[an.NUMERICIDENTIFIER]})`);oo("MAINVERSIONLOOSE",`(${sn[an.NUMERICIDENTIFIERLOOSE]})\\.(${sn[an.NUMERICIDENTIFIERLOOSE]})\\.(${sn[an.NUMERICIDENTIFIERLOOSE]})`);oo("PRERELEASEIDENTIFIER",`(?:${sn[an.NONNUMERICIDENTIFIER]}|${sn[an.NUMERICIDENTIFIER]})`);oo("PRERELEASEIDENTIFIERLOOSE",`(?:${sn[an.NONNUMERICIDENTIFIER]}|${sn[an.NUMERICIDENTIFIERLOOSE]})`);oo("PRERELEASE",`(?:-(${sn[an.PRERELEASEIDENTIFIER]}(?:\\.${sn[an.PRERELEASEIDENTIFIER]})*))`);oo("PRERELEASELOOSE",`(?:-?(${sn[an.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${sn[an.PRERELEASEIDENTIFIERLOOSE]})*))`);oo("BUILDIDENTIFIER",`${Dvt}+`);oo("BUILD",`(?:\\+(${sn[an.BUILDIDENTIFIER]}(?:\\.${sn[an.BUILDIDENTIFIER]})*))`);oo("FULLPLAIN",`v?${sn[an.MAINVERSION]}${sn[an.PRERELEASE]}?${sn[an.BUILD]}?`);oo("FULL",`^${sn[an.FULLPLAIN]}$`);oo("LOOSEPLAIN",`[v=\\s]*${sn[an.MAINVERSIONLOOSE]}${sn[an.PRERELEASELOOSE]}?${sn[an.BUILD]}?`);oo("LOOSE",`^${sn[an.LOOSEPLAIN]}$`);oo("GTLT","((?:<|>)?=?)");oo("XRANGEIDENTIFIERLOOSE",`${sn[an.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);oo("XRANGEIDENTIFIER",`${sn[an.NUMERICIDENTIFIER]}|x|X|\\*`);oo("XRANGEPLAIN",`[v=\\s]*(${sn[an.XRANGEIDENTIFIER]})(?:\\.(${sn[an.XRANGEIDENTIFIER]})(?:\\.(${sn[an.XRANGEIDENTIFIER]})(?:${sn[an.PRERELEASE]})?${sn[an.BUILD]}?)?)?`);oo("XRANGEPLAINLOOSE",`[v=\\s]*(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:\\.(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:\\.(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:${sn[an.PRERELEASELOOSE]})?${sn[an.BUILD]}?)?)?`);oo("XRANGE",`^${sn[an.GTLT]}\\s*${sn[an.XRANGEPLAIN]}$`);oo("XRANGELOOSE",`^${sn[an.GTLT]}\\s*${sn[an.XRANGEPLAINLOOSE]}$`);oo("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Nvt}})(?:\\.(\\d{1,${Nvt}}))?(?:\\.(\\d{1,${Nvt}}))?`);oo("COERCE",`${sn[an.COERCEPLAIN]}(?:$|[^\\d])`);oo("COERCEFULL",sn[an.COERCEPLAIN]+`(?:${sn[an.PRERELEASE]})?(?:${sn[an.BUILD]})?(?:$|[^\\d])`);oo("COERCERTL",sn[an.COERCE],!0);oo("COERCERTLFULL",sn[an.COERCEFULL],!0);oo("LONETILDE","(?:~>?)");oo("TILDETRIM",`(\\s*)${sn[an.LONETILDE]}\\s+`,!0);NP.tildeTrimReplace="$1~";oo("TILDE",`^${sn[an.LONETILDE]}${sn[an.XRANGEPLAIN]}$`);oo("TILDELOOSE",`^${sn[an.LONETILDE]}${sn[an.XRANGEPLAINLOOSE]}$`);oo("LONECARET","(?:\\^)");oo("CARETTRIM",`(\\s*)${sn[an.LONECARET]}\\s+`,!0);NP.caretTrimReplace="$1^";oo("CARET",`^${sn[an.LONECARET]}${sn[an.XRANGEPLAIN]}$`);oo("CARETLOOSE",`^${sn[an.LONECARET]}${sn[an.XRANGEPLAINLOOSE]}$`);oo("COMPARATORLOOSE",`^${sn[an.GTLT]}\\s*(${sn[an.LOOSEPLAIN]})$|^$`);oo("COMPARATOR",`^${sn[an.GTLT]}\\s*(${sn[an.FULLPLAIN]})$|^$`);oo("COMPARATORTRIM",`(\\s*)${sn[an.GTLT]}\\s*(${sn[an.LOOSEPLAIN]}|${sn[an.XRANGEPLAIN]})`,!0);NP.comparatorTrimReplace="$1$2$3";oo("HYPHENRANGE",`^\\s*(${sn[an.XRANGEPLAIN]})\\s+-\\s+(${sn[an.XRANGEPLAIN]})\\s*$`);oo("HYPHENRANGELOOSE",`^\\s*(${sn[an.XRANGEPLAINLOOSE]})\\s+-\\s+(${sn[an.XRANGEPLAINLOOSE]})\\s*$`);oo("STAR","(<|>)?=?\\s*\\*");oo("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");oo("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var p3e=T((rOc,vMr)=>{"use strict";f();var F4i=Object.freeze({loose:!0}),U4i=Object.freeze({}),Q4i=a(t=>t?typeof t!="object"?F4i:t:U4i,"parseOptions");vMr.exports=Q4i});var Mvt=T((oOc,SMr)=>{"use strict";f();var bMr=/^[0-9]+$/,TMr=a((t,e)=>{let r=bMr.test(t),n=bMr.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:tTMr(e,t),"rcompareIdentifiers");SMr.exports={compareIdentifiers:TMr,rcompareIdentifiers:q4i}});var Dg=T((cOc,xMr)=>{"use strict";f();var h3e=mAe(),{MAX_LENGTH:IMr,MAX_SAFE_INTEGER:m3e}=hAe(),{safeRe:g3e,t:A3e}=$te(),G4i=p3e(),{compareIdentifiers:Vte}=Mvt(),Ovt=class t{static{a(this,"SemVer")}constructor(e,r){if(r=G4i(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>IMr)throw new TypeError(`version is longer than ${IMr} characters`);h3e("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?g3e[A3e.LOOSE]:g3e[A3e.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>m3e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>m3e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>m3e||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(r){let s=[r,o];n===!1&&(s=[r]),Vte(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};xMr.exports=Ovt});var YH=T((dOc,RMr)=>{"use strict";f();var wMr=Dg(),H4i=a((t,e,r=!1)=>{if(t instanceof wMr)return t;try{return new wMr(t,e)}catch(n){if(!r)return null;throw n}},"parse");RMr.exports=H4i});var kMr=T((hOc,PMr)=>{"use strict";f();var j4i=YH(),$4i=a((t,e)=>{let r=j4i(t,e);return r?r.version:null},"valid");PMr.exports=$4i});var DMr=T((AOc,NMr)=>{"use strict";f();var V4i=YH(),W4i=a((t,e)=>{let r=V4i(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");NMr.exports=W4i});var BMr=T((COc,OMr)=>{"use strict";f();var MMr=Dg(),z4i=a((t,e,r,n,o)=>{typeof r=="string"&&(o=n,n=r,r=void 0);try{return new MMr(t instanceof MMr?t.version:t,r).inc(e,n,o).version}catch{return null}},"inc");OMr.exports=z4i});var UMr=T((bOc,FMr)=>{"use strict";f();var LMr=YH(),Y4i=a((t,e)=>{let r=LMr(t,null,!0),n=LMr(e,null,!0),o=r.compare(n);if(o===0)return null;let s=o>0,c=s?r:n,l=s?n:r,u=!!c.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(l.compareMain(c)===0)return l.minor&&!l.patch?"minor":"patch"}let p=u?"pre":"";return r.major!==n.major?p+"major":r.minor!==n.minor?p+"minor":r.patch!==n.patch?p+"patch":"prerelease"},"diff");FMr.exports=Y4i});var qMr=T((IOc,QMr)=>{"use strict";f();var K4i=Dg(),J4i=a((t,e)=>new K4i(t,e).major,"major");QMr.exports=J4i});var HMr=T((ROc,GMr)=>{"use strict";f();var X4i=Dg(),Z4i=a((t,e)=>new X4i(t,e).minor,"minor");GMr.exports=Z4i});var $Mr=T((NOc,jMr)=>{"use strict";f();var eBi=Dg(),tBi=a((t,e)=>new eBi(t,e).patch,"patch");jMr.exports=tBi});var WMr=T((OOc,VMr)=>{"use strict";f();var rBi=YH(),nBi=a((t,e)=>{let r=rBi(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");VMr.exports=nBi});var uT=T((FOc,YMr)=>{"use strict";f();var zMr=Dg(),iBi=a((t,e,r)=>new zMr(t,r).compare(new zMr(e,r)),"compare");YMr.exports=iBi});var JMr=T((qOc,KMr)=>{"use strict";f();var oBi=uT(),sBi=a((t,e,r)=>oBi(e,t,r),"rcompare");KMr.exports=sBi});var ZMr=T((jOc,XMr)=>{"use strict";f();var aBi=uT(),cBi=a((t,e)=>aBi(t,e,!0),"compareLoose");XMr.exports=cBi});var y3e=T((WOc,tOr)=>{"use strict";f();var eOr=Dg(),lBi=a((t,e,r)=>{let n=new eOr(t,r),o=new eOr(e,r);return n.compare(o)||n.compareBuild(o)},"compareBuild");tOr.exports=lBi});var nOr=T((KOc,rOr)=>{"use strict";f();var uBi=y3e(),dBi=a((t,e)=>t.sort((r,n)=>uBi(r,n,e)),"sort");rOr.exports=dBi});var oOr=T((ZOc,iOr)=>{"use strict";f();var fBi=y3e(),pBi=a((t,e)=>t.sort((r,n)=>fBi(n,r,e)),"rsort");iOr.exports=pBi});var gAe=T((r4c,sOr)=>{"use strict";f();var hBi=uT(),mBi=a((t,e,r)=>hBi(t,e,r)>0,"gt");sOr.exports=mBi});var E3e=T((o4c,aOr)=>{"use strict";f();var gBi=uT(),ABi=a((t,e,r)=>gBi(t,e,r)<0,"lt");aOr.exports=ABi});var Bvt=T((c4c,cOr)=>{"use strict";f();var yBi=uT(),EBi=a((t,e,r)=>yBi(t,e,r)===0,"eq");cOr.exports=EBi});var Lvt=T((d4c,lOr)=>{"use strict";f();var CBi=uT(),_Bi=a((t,e,r)=>CBi(t,e,r)!==0,"neq");lOr.exports=_Bi});var C3e=T((h4c,uOr)=>{"use strict";f();var vBi=uT(),bBi=a((t,e,r)=>vBi(t,e,r)>=0,"gte");uOr.exports=bBi});var _3e=T((A4c,dOr)=>{"use strict";f();var TBi=uT(),SBi=a((t,e,r)=>TBi(t,e,r)<=0,"lte");dOr.exports=SBi});var Fvt=T((C4c,fOr)=>{"use strict";f();var IBi=Bvt(),xBi=Lvt(),wBi=gAe(),RBi=C3e(),PBi=E3e(),kBi=_3e(),NBi=a((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return IBi(t,r,n);case"!=":return xBi(t,r,n);case">":return wBi(t,r,n);case">=":return RBi(t,r,n);case"<":return PBi(t,r,n);case"<=":return kBi(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");fOr.exports=NBi});var hOr=T((b4c,pOr)=>{"use strict";f();var DBi=Dg(),MBi=YH(),{safeRe:v3e,t:b3e}=$te(),OBi=a((t,e)=>{if(t instanceof DBi)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?v3e[b3e.COERCEFULL]:v3e[b3e.COERCE]);else{let u=e.includePrerelease?v3e[b3e.COERCERTLFULL]:v3e[b3e.COERCERTL],d;for(;(d=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||d.index+d[0].length!==r.index+r[0].length)&&(r=d),u.lastIndex=d.index+d[1].length+d[2].length;u.lastIndex=-1}if(r===null)return null;let n=r[2],o=r[3]||"0",s=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",l=e.includePrerelease&&r[6]?`+${r[6]}`:"";return MBi(`${n}.${o}.${s}${c}${l}`,e)},"coerce");pOr.exports=OBi});var gOr=T((I4c,mOr)=>{"use strict";f();var Uvt=class{static{a(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(e,r)}return this}};mOr.exports=Uvt});var dT=T((R4c,COr)=>{"use strict";f();var BBi=/\s+/g,Qvt=class t{static{a(this,"Range")}constructor(e,r){if(r=FBi(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof qvt)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(BBi," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(o=>!yOr(o[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&$Bi(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&HBi)|(this.options.loose&&jBi))+":"+e,o=AOr.get(n);if(o)return o;let s=this.options.loose,c=s?qE[ey.HYPHENRANGELOOSE]:qE[ey.HYPHENRANGE];e=e.replace(c,t3i(this.options.includePrerelease)),$l("hyphen replace",e),e=e.replace(qE[ey.COMPARATORTRIM],QBi),$l("comparator trim",e),e=e.replace(qE[ey.TILDETRIM],qBi),$l("tilde trim",e),e=e.replace(qE[ey.CARETTRIM],GBi),$l("caret trim",e);let l=e.split(" ").map(h=>VBi(h,this.options)).join(" ").split(/\s+/).map(h=>e3i(h,this.options));s&&(l=l.filter(h=>($l("loose invalid filter",h,this.options),!!h.match(qE[ey.COMPARATORLOOSE])))),$l("range list",l);let u=new Map,d=l.map(h=>new qvt(h,this.options));for(let h of d){if(yOr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let p=[...u.values()];return AOr.set(n,p),p}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>EOr(n,r)&&e.set.some(o=>EOr(o,r)&&n.every(s=>o.every(c=>s.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new UBi(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),$Bi=a(t=>t.value==="","isAny"),EOr=a((t,e)=>{let r=!0,n=t.slice(),o=n.pop();for(;r&&n.length;)r=n.every(s=>o.intersects(s,e)),o=n.pop();return r},"isSatisfiable"),VBi=a((t,e)=>($l("comp",t,e),t=YBi(t,e),$l("caret",t),t=WBi(t,e),$l("tildes",t),t=JBi(t,e),$l("xrange",t),t=ZBi(t,e),$l("stars",t),t),"parseComparator"),ty=a(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),WBi=a((t,e)=>t.trim().split(/\s+/).map(r=>zBi(r,e)).join(" "),"replaceTildes"),zBi=a((t,e)=>{let r=e.loose?qE[ey.TILDELOOSE]:qE[ey.TILDE];return t.replace(r,(n,o,s,c,l)=>{$l("tilde",t,n,o,s,c,l);let u;return ty(o)?u="":ty(s)?u=`>=${o}.0.0 <${+o+1}.0.0-0`:ty(c)?u=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:l?($l("replaceTilde pr",l),u=`>=${o}.${s}.${c}-${l} <${o}.${+s+1}.0-0`):u=`>=${o}.${s}.${c} <${o}.${+s+1}.0-0`,$l("tilde return",u),u})},"replaceTilde"),YBi=a((t,e)=>t.trim().split(/\s+/).map(r=>KBi(r,e)).join(" "),"replaceCarets"),KBi=a((t,e)=>{$l("caret",t,e);let r=e.loose?qE[ey.CARETLOOSE]:qE[ey.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(o,s,c,l,u)=>{$l("caret",t,o,s,c,l,u);let d;return ty(s)?d="":ty(c)?d=`>=${s}.0.0${n} <${+s+1}.0.0-0`:ty(l)?s==="0"?d=`>=${s}.${c}.0${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.0${n} <${+s+1}.0.0-0`:u?($l("replaceCaret pr",u),s==="0"?c==="0"?d=`>=${s}.${c}.${l}-${u} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}-${u} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l}-${u} <${+s+1}.0.0-0`):($l("no pr"),s==="0"?c==="0"?d=`>=${s}.${c}.${l}${n} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l} <${+s+1}.0.0-0`),$l("caret return",d),d})},"replaceCaret"),JBi=a((t,e)=>($l("replaceXRanges",t,e),t.split(/\s+/).map(r=>XBi(r,e)).join(" ")),"replaceXRanges"),XBi=a((t,e)=>{t=t.trim();let r=e.loose?qE[ey.XRANGELOOSE]:qE[ey.XRANGE];return t.replace(r,(n,o,s,c,l,u)=>{$l("xRange",t,n,o,s,c,l,u);let d=ty(s),p=d||ty(c),h=p||ty(l),m=h;return o==="="&&m&&(o=""),u=e.includePrerelease?"-0":"",d?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),o==="<"&&(u="-0"),n=`${o+s}.${c}.${l}${u}`):p?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${c}.0${u} <${s}.${+c+1}.0-0`),$l("xRange return",n),n})},"replaceXRange"),ZBi=a((t,e)=>($l("replaceStars",t,e),t.trim().replace(qE[ey.STAR],"")),"replaceStars"),e3i=a((t,e)=>($l("replaceGTE0",t,e),t.trim().replace(qE[e.includePrerelease?ey.GTE0PRE:ey.GTE0],"")),"replaceGTE0"),t3i=a(t=>(e,r,n,o,s,c,l,u,d,p,h,m)=>(ty(n)?r="":ty(o)?r=`>=${n}.0.0${t?"-0":""}`:ty(s)?r=`>=${n}.${o}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ty(d)?u="":ty(p)?u=`<${+d+1}.0.0-0`:ty(h)?u=`<${d}.${+p+1}.0-0`:m?u=`<=${d}.${p}.${h}-${m}`:t?u=`<${d}.${p}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),"hyphenReplace"),r3i=a((t,e,r)=>{for(let n=0;n0){let o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0},"testSet")});var AAe=T((N4c,IOr)=>{"use strict";f();var yAe=Symbol("SemVer ANY"),jvt=class t{static{a(this,"Comparator")}static get ANY(){return yAe}constructor(e,r){if(r=_Or(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Hvt("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===yAe?this.value="":this.value=this.operator+this.semver.version,Hvt("comp",this)}parse(e){let r=this.options.loose?vOr[bOr.COMPARATORLOOSE]:vOr[bOr.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new TOr(n[2],this.options.loose):this.semver=yAe}toString(){return this.value}test(e){if(Hvt("Comparator.test",e,this.options.loose),this.semver===yAe||e===yAe)return!0;if(typeof e=="string")try{e=new TOr(e,this.options)}catch{return!1}return Gvt(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new SOr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new SOr(this.value,r).test(e.semver):(r=_Or(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Gvt(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Gvt(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};IOr.exports=jvt;var _Or=p3e(),{safeRe:vOr,t:bOr}=$te(),Gvt=Fvt(),Hvt=mAe(),TOr=Dg(),SOr=dT()});var EAe=T((O4c,xOr)=>{"use strict";f();var n3i=dT(),i3i=a((t,e,r)=>{try{e=new n3i(e,r)}catch{return!1}return e.test(t)},"satisfies");xOr.exports=i3i});var ROr=T((F4c,wOr)=>{"use strict";f();var o3i=dT(),s3i=a((t,e)=>new o3i(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");wOr.exports=s3i});var kOr=T((q4c,POr)=>{"use strict";f();var a3i=Dg(),c3i=dT(),l3i=a((t,e,r)=>{let n=null,o=null,s=null;try{s=new c3i(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new a3i(n,r))}),n},"maxSatisfying");POr.exports=l3i});var DOr=T((j4c,NOr)=>{"use strict";f();var u3i=Dg(),d3i=dT(),f3i=a((t,e,r)=>{let n=null,o=null,s=null;try{s=new d3i(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new u3i(n,r))}),n},"minSatisfying");NOr.exports=f3i});var BOr=T((W4c,OOr)=>{"use strict";f();var $vt=Dg(),p3i=dT(),MOr=gAe(),h3i=a((t,e)=>{t=new p3i(t,e);let r=new $vt("0.0.0");if(t.test(r)||(r=new $vt("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let l=new $vt(c.semver.version);switch(c.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||MOr(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),s&&(!r||MOr(r,s))&&(r=s)}return r&&t.test(r)?r:null},"minVersion");OOr.exports=h3i});var FOr=T((K4c,LOr)=>{"use strict";f();var m3i=dT(),g3i=a((t,e)=>{try{return new m3i(t,e).range||"*"}catch{return null}},"validRange");LOr.exports=g3i});var T3e=T((Z4c,GOr)=>{"use strict";f();var A3i=Dg(),qOr=AAe(),{ANY:y3i}=qOr,E3i=dT(),C3i=EAe(),UOr=gAe(),QOr=E3e(),_3i=_3e(),v3i=C3e(),b3i=a((t,e,r,n)=>{t=new A3i(t,n),e=new E3i(e,n);let o,s,c,l,u;switch(r){case">":o=UOr,s=_3i,c=QOr,l=">",u=">=";break;case"<":o=QOr,s=v3i,c=UOr,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(C3i(t,e,n))return!1;for(let d=0;d{g.semver===y3i&&(g=new qOr(">=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0},"outside");GOr.exports=b3i});var jOr=T((rBc,HOr)=>{"use strict";f();var T3i=T3e(),S3i=a((t,e,r)=>T3i(t,e,">",r),"gtr");HOr.exports=S3i});var VOr=T((oBc,$Or)=>{"use strict";f();var I3i=T3e(),x3i=a((t,e,r)=>I3i(t,e,"<",r),"ltr");$Or.exports=x3i});var YOr=T((cBc,zOr)=>{"use strict";f();var WOr=dT(),w3i=a((t,e,r)=>(t=new WOr(t,r),e=new WOr(e,r),t.intersects(e,r)),"intersects");zOr.exports=w3i});var JOr=T((dBc,KOr)=>{"use strict";f();var R3i=EAe(),P3i=uT();KOr.exports=(t,e,r)=>{let n=[],o=null,s=null,c=t.sort((p,h)=>P3i(p,h,r));for(let p of c)R3i(p,e,r)?(s=p,o||(o=p)):(s&&n.push([o,s]),s=null,o=null);o&&n.push([o,null]);let l=[];for(let[p,h]of n)p===h?l.push(p):!h&&p===c[0]?l.push("*"):h?p===c[0]?l.push(`<=${h}`):l.push(`${p} - ${h}`):l.push(`>=${p}`);let u=l.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return u.length{"use strict";f();var XOr=dT(),Wvt=AAe(),{ANY:Vvt}=Wvt,CAe=EAe(),zvt=uT(),k3i=a((t,e,r={})=>{if(t===e)return!0;t=new XOr(t,r),e=new XOr(e,r);let n=!1;e:for(let o of t.set){for(let s of e.set){let c=D3i(o,s,r);if(n=n||c!==null,c)continue e}if(n)return!1}return!0},"subset"),N3i=[new Wvt(">=0.0.0-0")],ZOr=[new Wvt(">=0.0.0")],D3i=a((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Vvt){if(e.length===1&&e[0].semver===Vvt)return!0;r.includePrerelease?t=N3i:t=ZOr}if(e.length===1&&e[0].semver===Vvt){if(r.includePrerelease)return!0;e=ZOr}let n=new Set,o,s;for(let g of t)g.operator===">"||g.operator===">="?o=e4r(o,g,r):g.operator==="<"||g.operator==="<="?s=t4r(s,g,r):n.add(g.semver);if(n.size>1)return null;let c;if(o&&s){if(c=zvt(o.semver,s.semver,r),c>0)return null;if(c===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let g of n){if(o&&!CAe(g,String(o),r)||s&&!CAe(g,String(s),r))return null;for(let A of e)if(!CAe(g,String(A),r))return!1;return!0}let l,u,d,p,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(p=p||g.operator===">"||g.operator===">=",d=d||g.operator==="<"||g.operator==="<=",o){if(m&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===m.major&&g.semver.minor===m.minor&&g.semver.patch===m.patch&&(m=!1),g.operator===">"||g.operator===">="){if(l=e4r(o,g,r),l===g&&l!==o)return!1}else if(o.operator===">="&&!CAe(o.semver,String(g),r))return!1}if(s){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(u=t4r(s,g,r),u===g&&u!==s)return!1}else if(s.operator==="<="&&!CAe(s.semver,String(g),r))return!1}if(!g.operator&&(s||o)&&c!==0)return!1}return!(o&&d&&!s&&c!==0||s&&p&&!o&&c!==0||m||h)},"simpleSubset"),e4r=a((t,e,r)=>{if(!t)return e;let n=zvt(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),t4r=a((t,e,r)=>{if(!t)return e;let n=zvt(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");r4r.exports=k3i});var J8=T((gBc,s4r)=>{"use strict";f();var Yvt=$te(),i4r=hAe(),M3i=Dg(),o4r=Mvt(),O3i=YH(),B3i=kMr(),L3i=DMr(),F3i=BMr(),U3i=UMr(),Q3i=qMr(),q3i=HMr(),G3i=$Mr(),H3i=WMr(),j3i=uT(),$3i=JMr(),V3i=ZMr(),W3i=y3e(),z3i=nOr(),Y3i=oOr(),K3i=gAe(),J3i=E3e(),X3i=Bvt(),Z3i=Lvt(),eLi=C3e(),tLi=_3e(),rLi=Fvt(),nLi=hOr(),iLi=AAe(),oLi=dT(),sLi=EAe(),aLi=ROr(),cLi=kOr(),lLi=DOr(),uLi=BOr(),dLi=FOr(),fLi=T3e(),pLi=jOr(),hLi=VOr(),mLi=YOr(),gLi=JOr(),ALi=n4r();s4r.exports={parse:O3i,valid:B3i,clean:L3i,inc:F3i,diff:U3i,major:Q3i,minor:q3i,patch:G3i,prerelease:H3i,compare:j3i,rcompare:$3i,compareLoose:V3i,compareBuild:W3i,sort:z3i,rsort:Y3i,gt:K3i,lt:J3i,eq:X3i,neq:Z3i,gte:eLi,lte:tLi,cmp:rLi,coerce:nLi,Comparator:iLi,Range:oLi,satisfies:sLi,toComparators:aLi,maxSatisfying:cLi,minSatisfying:lLi,minVersion:uLi,validRange:dLi,outside:fLi,gtr:pLi,ltr:hLi,intersects:mLi,simplifyRange:gLi,subset:ALi,SemVer:M3i,re:Yvt.re,src:Yvt.src,tokens:Yvt.t,SEMVER_SPEC_VERSION:i4r.SEMVER_SPEC_VERSION,RELEASE_TYPES:i4r.RELEASE_TYPES,compareIdentifiers:o4r.compareIdentifiers,rcompareIdentifiers:o4r.rcompareIdentifiers}});var c4r=T((yBc,a4r)=>{f();var yLi=J8();a4r.exports=yLi.satisfies(process.version,">=15.7.0")});var u4r=T((CBc,l4r)=>{f();var ELi=J8();l4r.exports=ELi.satisfies(process.version,">=16.9.0")});var Kvt=T((vBc,d4r)=>{f();var CLi=c4r(),_Li=u4r(),vLi={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},bLi={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};d4r.exports=function(t,e){if(!t||!e)return;let r=e.asymmetricKeyType;if(!r)return;let n=vLi[r];if(!n)throw new Error(`Unknown key type "${r}".`);if(!n.includes(t))throw new Error(`"alg" parameter for "${r}" key type must be one of: ${n.join(", ")}.`);if(CLi)switch(r){case"ec":let o=e.asymmetricKeyDetails.namedCurve,s=bLi[t];if(o!==s)throw new Error(`"alg" parameter "${t}" requires curve "${s}".`);break;case"rsa-pss":if(_Li){let c=parseInt(t.slice(-3),10),{hashAlgorithm:l,mgf1HashAlgorithm:u,saltLength:d}=e.asymmetricKeyDetails;if(l!==`sha${c}`||u!==l)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${t}.`);if(d!==void 0&&d>c>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${t}.`)}break}}});var Jvt=T((TBc,f4r)=>{f();var TLi=J8();f4r.exports=TLi.satisfies(process.version,"^6.12.0 || >=8.0.0")});var m4r=T((IBc,h4r)=>{f();var al=pAe(),SLi=wvt(),p4r=Rvt(),ILi=xvt(),xLi=kvt(),wLi=Kvt(),RLi=Jvt(),PLi=c3e(),{KeyObject:kLi,createSecretKey:NLi,createPublicKey:DLi}=require("crypto"),Xvt=["RS256","RS384","RS512"],MLi=["ES256","ES384","ES512"],Zvt=["RS256","RS384","RS512"],OLi=["HS256","HS384","HS512"];RLi&&(Xvt.splice(Xvt.length,0,"PS256","PS384","PS512"),Zvt.splice(Zvt.length,0,"PS256","PS384","PS512"));h4r.exports=function(t,e,r,n){typeof r=="function"&&!n&&(n=r,r={}),r||(r={}),r=Object.assign({},r);let o;if(n?o=n:o=a(function(p,h){if(p)throw p;return h},"done"),r.clockTimestamp&&typeof r.clockTimestamp!="number")return o(new al("clockTimestamp must be a number"));if(r.nonce!==void 0&&(typeof r.nonce!="string"||r.nonce.trim()===""))return o(new al("nonce must be a non-empty string"));if(r.allowInvalidAsymmetricKeyTypes!==void 0&&typeof r.allowInvalidAsymmetricKeyTypes!="boolean")return o(new al("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!t)return o(new al("jwt must be provided"));if(typeof t!="string")return o(new al("jwt must be a string"));let c=t.split(".");if(c.length!==3)return o(new al("jwt malformed"));let l;try{l=ILi(t,{complete:!0})}catch(p){return o(p)}if(!l)return o(new al("invalid token"));let u=l.header,d;if(typeof e=="function"){if(!n)return o(new al("verify must be called asynchronous if secret or public key is provided as a callback"));d=e}else d=a(function(p,h){return h(null,e)},"getSecret");return d(u,function(p,h){if(p)return o(new al("error in secret or public key callback: "+p.message));let m=c[2].trim()!=="";if(!m&&h)return o(new al("jwt signature is required"));if(m&&!h)return o(new al("secret or public key must be provided"));if(!m&&!r.algorithms)return o(new al('please specify "none" in "algorithms" to verify unsigned tokens'));if(h!=null&&!(h instanceof kLi))try{h=DLi(h)}catch{try{h=NLi(typeof h=="string"?Buffer.from(h):h)}catch{return o(new al("secretOrPublicKey is not valid key material"))}}if(r.algorithms||(h.type==="secret"?r.algorithms=OLi:["rsa","rsa-pss"].includes(h.asymmetricKeyType)?r.algorithms=Zvt:h.asymmetricKeyType==="ec"?r.algorithms=MLi:r.algorithms=Xvt),r.algorithms.indexOf(l.header.alg)===-1)return o(new al("invalid algorithm"));if(u.alg.startsWith("HS")&&h.type!=="secret")return o(new al(`secretOrPublicKey must be a symmetric key when using ${u.alg}`));if(/^(?:RS|PS|ES)/.test(u.alg)&&h.type!=="public")return o(new al(`secretOrPublicKey must be an asymmetric key when using ${u.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{wLi(u.alg,h)}catch(y){return o(y)}let g;try{g=PLi.verify(t,l.header.alg,h)}catch(y){return o(y)}if(!g)return o(new al("invalid signature"));let A=l.payload;if(typeof A.nbf<"u"&&!r.ignoreNotBefore){if(typeof A.nbf!="number")return o(new al("invalid nbf value"));if(A.nbf>s+(r.clockTolerance||0))return o(new SLi("jwt not active",new Date(A.nbf*1e3)))}if(typeof A.exp<"u"&&!r.ignoreExpiration){if(typeof A.exp!="number")return o(new al("invalid exp value"));if(s>=A.exp+(r.clockTolerance||0))return o(new p4r("jwt expired",new Date(A.exp*1e3)))}if(r.audience){let y=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(A.aud)?A.aud:[A.aud]).some(function(v){return y.some(function(b){return b instanceof RegExp?b.test(v):b===v})}))return o(new al("jwt audience invalid. expected: "+y.join(" or ")))}if(r.issuer&&(typeof r.issuer=="string"&&A.iss!==r.issuer||Array.isArray(r.issuer)&&r.issuer.indexOf(A.iss)===-1))return o(new al("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&A.sub!==r.subject)return o(new al("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&A.jti!==r.jwtid)return o(new al("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&A.nonce!==r.nonce)return o(new al("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if(typeof A.iat!="number")return o(new al("iat required when maxAge is specified"));let y=xLi(r.maxAge,A.iat);if(typeof y>"u")return o(new al('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=y+(r.clockTolerance||0))return o(new p4r("maxAge exceeded",new Date(y*1e3)))}if(r.complete===!0){let y=l.signature;return o(null,{header:u,payload:A,signature:y})}return o(null,A)})}});var _4r=T((RBc,C4r)=>{f();var g4r=1/0,y4r=9007199254740991,BLi=17976931348623157e292,A4r=NaN,LLi="[object Arguments]",FLi="[object Function]",ULi="[object GeneratorFunction]",QLi="[object String]",qLi="[object Symbol]",GLi=/^\s+|\s+$/g,HLi=/^[-+]0x[0-9a-f]+$/i,jLi=/^0b[01]+$/i,$Li=/^0o[0-7]+$/i,VLi=/^(?:0|[1-9]\d*)$/,WLi=parseInt;function zLi(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r-1&&t%1==0&&t-1:!!o&&KLi(t,e,r)>-1}a(c8i,"includes");function l8i(t){return u8i(t)&&tbt.call(t,"callee")&&(!t8i.call(t,"callee")||I3e.call(t)==LLi)}a(l8i,"isArguments");var E4r=Array.isArray;function rbt(t){return t!=null&&f8i(t.length)&&!d8i(t)}a(rbt,"isArrayLike");function u8i(t){return nbt(t)&&rbt(t)}a(u8i,"isArrayLikeObject");function d8i(t){var e=ebt(t)?I3e.call(t):"";return e==FLi||e==ULi}a(d8i,"isFunction");function f8i(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=y4r}a(f8i,"isLength");function ebt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(ebt,"isObject");function nbt(t){return!!t&&typeof t=="object"}a(nbt,"isObjectLike");function p8i(t){return typeof t=="string"||!E4r(t)&&nbt(t)&&I3e.call(t)==QLi}a(p8i,"isString");function h8i(t){return typeof t=="symbol"||nbt(t)&&I3e.call(t)==qLi}a(h8i,"isSymbol");function m8i(t){if(!t)return t===0?t:0;if(t=A8i(t),t===g4r||t===-g4r){var e=t<0?-1:1;return e*BLi}return t===t?t:0}a(m8i,"toFinite");function g8i(t){var e=m8i(t),r=e%1;return e===e?r?e-r:e:0}a(g8i,"toInteger");function A8i(t){if(typeof t=="number")return t;if(h8i(t))return A4r;if(ebt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ebt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(GLi,"");var r=jLi.test(t);return r||$Li.test(t)?WLi(t.slice(2),r?2:8):HLi.test(t)?A4r:+t}a(A8i,"toNumber");function y8i(t){return rbt(t)?i8i(t):o8i(t)}a(y8i,"keys");function E8i(t){return t?ZLi(t,y8i(t)):[]}a(E8i,"values");C4r.exports=c8i});var b4r=T((NBc,v4r)=>{f();var C8i="[object Boolean]",_8i=Object.prototype,v8i=_8i.toString;function b8i(t){return t===!0||t===!1||T8i(t)&&v8i.call(t)==C8i}a(b8i,"isBoolean");function T8i(t){return!!t&&typeof t=="object"}a(T8i,"isObjectLike");v4r.exports=b8i});var w4r=T((OBc,x4r)=>{f();var T4r=1/0,S8i=17976931348623157e292,S4r=NaN,I8i="[object Symbol]",x8i=/^\s+|\s+$/g,w8i=/^[-+]0x[0-9a-f]+$/i,R8i=/^0b[01]+$/i,P8i=/^0o[0-7]+$/i,k8i=parseInt,N8i=Object.prototype,D8i=N8i.toString;function M8i(t){return typeof t=="number"&&t==F8i(t)}a(M8i,"isInteger");function I4r(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(I4r,"isObject");function O8i(t){return!!t&&typeof t=="object"}a(O8i,"isObjectLike");function B8i(t){return typeof t=="symbol"||O8i(t)&&D8i.call(t)==I8i}a(B8i,"isSymbol");function L8i(t){if(!t)return t===0?t:0;if(t=U8i(t),t===T4r||t===-T4r){var e=t<0?-1:1;return e*S8i}return t===t?t:0}a(L8i,"toFinite");function F8i(t){var e=L8i(t),r=e%1;return e===e?r?e-r:e:0}a(F8i,"toInteger");function U8i(t){if(typeof t=="number")return t;if(B8i(t))return S4r;if(I4r(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=I4r(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(x8i,"");var r=R8i.test(t);return r||P8i.test(t)?k8i(t.slice(2),r?2:8):w8i.test(t)?S4r:+t}a(U8i,"toNumber");x4r.exports=M8i});var P4r=T((FBc,R4r)=>{f();var Q8i="[object Number]",q8i=Object.prototype,G8i=q8i.toString;function H8i(t){return!!t&&typeof t=="object"}a(H8i,"isObjectLike");function j8i(t){return typeof t=="number"||H8i(t)&&G8i.call(t)==Q8i}a(j8i,"isNumber");R4r.exports=j8i});var M4r=T((qBc,D4r)=>{f();var $8i="[object Object]";function V8i(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}a(V8i,"isHostObject");function W8i(t,e){return function(r){return t(e(r))}}a(W8i,"overArg");var z8i=Function.prototype,k4r=Object.prototype,N4r=z8i.toString,Y8i=k4r.hasOwnProperty,K8i=N4r.call(Object),J8i=k4r.toString,X8i=W8i(Object.getPrototypeOf,Object);function Z8i(t){return!!t&&typeof t=="object"}a(Z8i,"isObjectLike");function e6i(t){if(!Z8i(t)||J8i.call(t)!=$8i||V8i(t))return!1;var e=X8i(t);if(e===null)return!0;var r=Y8i.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&N4r.call(r)==K8i}a(e6i,"isPlainObject");D4r.exports=e6i});var B4r=T((jBc,O4r)=>{f();var t6i="[object String]",r6i=Object.prototype,n6i=r6i.toString,i6i=Array.isArray;function o6i(t){return!!t&&typeof t=="object"}a(o6i,"isObjectLike");function s6i(t){return typeof t=="string"||!i6i(t)&&o6i(t)&&n6i.call(t)==t6i}a(s6i,"isString");O4r.exports=s6i});var q4r=T((WBc,Q4r)=>{f();var a6i="Expected a function",L4r=1/0,c6i=17976931348623157e292,F4r=NaN,l6i="[object Symbol]",u6i=/^\s+|\s+$/g,d6i=/^[-+]0x[0-9a-f]+$/i,f6i=/^0b[01]+$/i,p6i=/^0o[0-7]+$/i,h6i=parseInt,m6i=Object.prototype,g6i=m6i.toString;function A6i(t,e){var r;if(typeof e!="function")throw new TypeError(a6i);return t=v6i(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}a(A6i,"before");function y6i(t){return A6i(2,t)}a(y6i,"once");function U4r(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(U4r,"isObject");function E6i(t){return!!t&&typeof t=="object"}a(E6i,"isObjectLike");function C6i(t){return typeof t=="symbol"||E6i(t)&&g6i.call(t)==l6i}a(C6i,"isSymbol");function _6i(t){if(!t)return t===0?t:0;if(t=b6i(t),t===L4r||t===-L4r){var e=t<0?-1:1;return e*c6i}return t===t?t:0}a(_6i,"toFinite");function v6i(t){var e=_6i(t),r=e%1;return e===e?r?e-r:e:0}a(v6i,"toInteger");function b6i(t){if(typeof t=="number")return t;if(C6i(t))return F4r;if(U4r(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=U4r(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(u6i,"");var r=f6i.test(t);return r||p6i.test(t)?h6i(t.slice(2),r?2:8):d6i.test(t)?F4r:+t}a(b6i,"toNumber");Q4r.exports=y6i});var K4r=T((KBc,Y4r)=>{f();var G4r=kvt(),T6i=Jvt(),S6i=Kvt(),H4r=c3e(),I6i=_4r(),x3e=b4r(),j4r=w4r(),ibt=P4r(),V4r=M4r(),X8=B4r(),x6i=q4r(),{KeyObject:w6i,createSecretKey:R6i,createPrivateKey:P6i}=require("crypto"),W4r=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];T6i&&W4r.splice(3,0,"PS256","PS384","PS512");var k6i={expiresIn:{isValid:a(function(t){return j4r(t)||X8(t)&&t},"isValid"),message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:a(function(t){return j4r(t)||X8(t)&&t},"isValid"),message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:a(function(t){return X8(t)||Array.isArray(t)},"isValid"),message:'"audience" must be a string or array'},algorithm:{isValid:I6i.bind(null,W4r),message:'"algorithm" must be a valid string enum value'},header:{isValid:V4r,message:'"header" must be an object'},encoding:{isValid:X8,message:'"encoding" must be a string'},issuer:{isValid:X8,message:'"issuer" must be a string'},subject:{isValid:X8,message:'"subject" must be a string'},jwtid:{isValid:X8,message:'"jwtid" must be a string'},noTimestamp:{isValid:x3e,message:'"noTimestamp" must be a boolean'},keyid:{isValid:X8,message:'"keyid" must be a string'},mutatePayload:{isValid:x3e,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:x3e,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:x3e,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},N6i={iat:{isValid:ibt,message:'"iat" should be a number of seconds'},exp:{isValid:ibt,message:'"exp" should be a number of seconds'},nbf:{isValid:ibt,message:'"nbf" should be a number of seconds'}};function z4r(t,e,r,n){if(!V4r(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(o){let s=t[o];if(!s){if(!e)throw new Error('"'+o+'" is not allowed in "'+n+'"');return}if(!s.isValid(r[o]))throw new Error(s.message)})}a(z4r,"validate");function D6i(t){return z4r(k6i,!1,t,"options")}a(D6i,"validateOptions");function M6i(t){return z4r(N6i,!0,t,"payload")}a(M6i,"validatePayload");var $4r={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},O6i=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];Y4r.exports=function(t,e,r,n){typeof r=="function"?(n=r,r={}):r=r||{};let o=typeof t=="object"&&!Buffer.isBuffer(t),s=Object.assign({alg:r.algorithm||"HS256",typ:o?"JWT":void 0,kid:r.keyid},r.header);function c(d){if(n)return n(d);throw d}if(a(c,"failure"),!e&&r.algorithm!=="none")return c(new Error("secretOrPrivateKey must have a value"));if(e!=null&&!(e instanceof w6i))try{e=P6i(e)}catch{try{e=R6i(typeof e=="string"?Buffer.from(e):e)}catch{return c(new Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&e.type!=="secret")return c(new Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));if(/^(?:RS|PS|ES)/.test(s.alg)){if(e.type!=="private")return c(new Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!r.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&e.asymmetricKeyDetails!==void 0&&e.asymmetricKeyDetails.modulusLength<2048)return c(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof t>"u")return c(new Error("payload is required"));if(o){try{M6i(t)}catch(d){return c(d)}r.mutatePayload||(t=Object.assign({},t))}else{let d=O6i.filter(function(p){return typeof r[p]<"u"});if(d.length>0)return c(new Error("invalid "+d.join(",")+" option for "+typeof t+" payload"))}if(typeof t.exp<"u"&&typeof r.expiresIn<"u")return c(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof t.nbf<"u"&&typeof r.notBefore<"u")return c(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{D6i(r)}catch(d){return c(d)}if(!r.allowInvalidAsymmetricKeyTypes)try{S6i(s.alg,e)}catch(d){return c(d)}let l=t.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete t.iat:o&&(t.iat=l),typeof r.notBefore<"u"){try{t.nbf=G4r(r.notBefore,l)}catch(d){return c(d)}if(typeof t.nbf>"u")return c(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof r.expiresIn<"u"&&typeof t=="object"){try{t.exp=G4r(r.expiresIn,l)}catch(d){return c(d)}if(typeof t.exp>"u")return c(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys($4r).forEach(function(d){let p=$4r[d];if(typeof r[d]<"u"){if(typeof t[p]<"u")return c(new Error('Bad "options.'+d+'" option. The payload already has an "'+p+'" property.'));t[p]=r[d]}});let u=r.encoding||"utf8";if(typeof n=="function")n=n&&x6i(n),H4r.createSign({header:s,privateKey:e,payload:t,encoding:u}).once("error",n).once("done",function(d){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&d.length<256)return n(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));n(null,d)});else{let d=H4r.sign({header:s,payload:t,secret:e,encoding:u});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&d.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return d}}});var X4r=T((ZBc,J4r)=>{f();J4r.exports={decode:xvt(),verify:m4r(),sign:K4r(),JsonWebTokenError:pAe(),NotBeforeError:wvt(),TokenExpiredError:Rvt()}});var Mbt=T((DUc,VBr)=>{f();function OFi(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=o,r.enabled=c,r.humanize=Pvt(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(R==="%%")return"%";I++;let P=r.formatters[w];if(typeof P=="function"){let k=E[I];R=P.call(_,k),E.splice(I,1),I--}return R}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h,m=(typeof p=="string"?p:"").split(/[\s,]+/),g=m.length;for(h=0;h"-"+h)].join(",");return r.enable(""),p}a(s,"disable");function c(p){if(p[p.length-1]==="*")return!0;let h,m;for(h=0,m=r.skips.length;h{f();P1.formatArgs=LFi;P1.save=FFi;P1.load=UFi;P1.useColors=BFi;P1.storage=QFi();P1.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();P1.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function BFi(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(BFi,"useColors");function LFi(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+rLe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(LFi,"formatArgs");P1.log=console.debug||console.log||(()=>{});function FFi(t){try{t?P1.storage.setItem("debug",t):P1.storage.removeItem("debug")}catch{}}a(FFi,"save");function UFi(){let t;try{t=P1.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(UFi,"load");function QFi(){try{return localStorage}catch{}}a(QFi,"localstorage");rLe.exports=Mbt()(P1);var{formatters:qFi}=rLe.exports;qFi.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var YBr=T((FUc,zBr)=>{"use strict";f();zBr.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return n!==-1&&(o===-1||n{"use strict";f();var GFi=require("os"),KBr=require("tty"),pT=YBr(),{env:nh}=process,n6;pT("no-color")||pT("no-colors")||pT("color=false")||pT("color=never")?n6=0:(pT("color")||pT("colors")||pT("color=true")||pT("color=always"))&&(n6=1);"FORCE_COLOR"in nh&&(nh.FORCE_COLOR==="true"?n6=1:nh.FORCE_COLOR==="false"?n6=0:n6=nh.FORCE_COLOR.length===0?1:Math.min(parseInt(nh.FORCE_COLOR,10),3));function Obt(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}a(Obt,"translateLevel");function Bbt(t,e){if(n6===0)return 0;if(pT("color=16m")||pT("color=full")||pT("color=truecolor"))return 3;if(pT("color=256"))return 2;if(t&&!e&&n6===void 0)return 0;let r=n6||0;if(nh.TERM==="dumb")return r;if(process.platform==="win32"){let n=GFi.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in nh)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in nh)||nh.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in nh)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(nh.TEAMCITY_VERSION)?1:0;if(nh.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in nh){let n=parseInt((nh.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(nh.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(nh.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(nh.TERM)||"COLORTERM"in nh?1:r}a(Bbt,"supportsColor");function HFi(t){let e=Bbt(t,t&&t.isTTY);return Obt(e)}a(HFi,"getSupportLevel");JBr.exports={supportsColor:HFi,stdout:Obt(Bbt(!0,KBr.isatty(1))),stderr:Obt(Bbt(!0,KBr.isatty(2)))}});var ZBr=T((Am,oLe)=>{f();var jFi=require("tty"),iLe=require("util");Am.init=JFi;Am.log=zFi;Am.formatArgs=VFi;Am.save=YFi;Am.load=KFi;Am.useColors=$Fi;Am.destroy=iLe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Am.colors=[6,2,3,4,5,1];try{let t=nLe();t&&(t.stderr||t).level>=2&&(Am.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Am.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function $Fi(){return"colors"in Am.inspectOpts?!!Am.inspectOpts.colors:jFi.isatty(process.stderr.fd)}a($Fi,"useColors");function VFi(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` + "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,lge="secret must be a string or buffer",ete="key must be a string or a buffer",jBi="key must be a string, a buffer or an object",qvt=typeof Xb.createPublicKey=="function";qvt&&(ete+=" or a KeyObject",lge+="or a KeyObject");function DMr(t){if(!tte.isBuffer(t)&&typeof t!="string"&&(!qvt||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw fx(ete)}a(DMr,"checkIsPublicKey");function NMr(t){if(!tte.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw fx(jBi)}a(NMr,"checkIsPrivateKey");function $Bi(t){if(!tte.isBuffer(t)){if(typeof t=="string")return t;if(!qvt||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw fx(lge)}}a($Bi,"checkIsSecretKey");function Gvt(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(Gvt,"fromBase64");function MMr(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r{f();var t3i=require("buffer").Buffer;UMr.exports=a(function(e){return typeof e=="string"?e:typeof e=="number"||t3i.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var $Mr=T((IOc,jMr)=>{f();var r3i=Zee().Buffer,QMr=Lvt(),n3i=Hvt(),i3i=require("stream"),qMr=jvt(),$vt=require("util");function GMr(t,e){return r3i.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(GMr,"base64url");function o3i(t,e,r){r=r||"utf8";var n=GMr(qMr(t),"binary"),o=GMr(qMr(e),r);return $vt.format("%s.%s",n,o)}a(o3i,"jwsSecuredInput");function HMr(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,o=t.encoding,s=n3i(e.alg),c=o3i(e,r,o),l=s.sign(c,n);return $vt.format("%s.%s",c,l)}a(HMr,"jwsSign");function pBe(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new QMr(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new QMr(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a(pBe,"SignStream");$vt.inherits(pBe,i3i);pBe.prototype.sign=a(function(){try{var e=HMr({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}},"sign");pBe.sign=HMr;jMr.exports=pBe});var t4r=T((ROc,e4r)=>{f();var WMr=Zee().Buffer,VMr=Lvt(),s3i=Hvt(),a3i=require("stream"),zMr=jvt(),c3i=require("util"),l3i=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function u3i(t){return Object.prototype.toString.call(t)==="[object Object]"}a(u3i,"isObject");function d3i(t){if(u3i(t))return t;try{return JSON.parse(t)}catch{return}}a(d3i,"safeJsonParse");function YMr(t){var e=t.split(".",1)[0];return d3i(WMr.from(e,"base64").toString("binary"))}a(YMr,"headerFromJWS");function f3i(t){return t.split(".",2).join(".")}a(f3i,"securedInputFromJWS");function KMr(t){return t.split(".")[2]}a(KMr,"signatureFromJWS");function p3i(t,e){e=e||"utf8";var r=t.split(".")[1];return WMr.from(r,"base64").toString(e)}a(p3i,"payloadFromJWS");function JMr(t){return l3i.test(t)&&!!YMr(t)}a(JMr,"isValidJws");function XMr(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=zMr(t);var o=KMr(t),s=f3i(t),c=s3i(e);return c.verify(s,o,r)}a(XMr,"jwsVerify");function ZMr(t,e){if(e=e||{},t=zMr(t),!JMr(t))return null;var r=YMr(t);if(!r)return null;var n=p3i(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:KMr(t)}}a(ZMr,"jwsDecode");function rte(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new VMr(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new VMr(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(rte,"VerifyStream");c3i.inherits(rte,a3i);rte.prototype.verify=a(function(){try{var e=XMr(this.signature.buffer,this.algorithm,this.key.buffer),r=ZMr(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"verify");rte.decode=ZMr;rte.isValid=JMr;rte.verify=XMr;e4r.exports=rte});var mBe=T(S8=>{f();var r4r=$Mr(),hBe=t4r(),h3i=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];S8.ALGORITHMS=h3i;S8.sign=r4r.sign;S8.verify=hBe.verify;S8.decode=hBe.decode;S8.isValid=hBe.isValid;S8.createSign=a(function(e){return new r4r(e)},"createSign");S8.createVerify=a(function(e){return new hBe(e)},"createVerify")});var Vvt=T((OOc,n4r)=>{f();var m3i=mBe();n4r.exports=function(t,e){e=e||{};var r=m3i.decode(t,e);if(!r)return null;var n=r.payload;if(typeof n=="string")try{var o=JSON.parse(n);o!==null&&typeof o=="object"&&(n=o)}catch{}return e.complete===!0?{header:r.header,payload:n,signature:r.signature}:n}});var dge=T((LOc,i4r)=>{f();var gBe=a(function(t,e){Error.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=t,e&&(this.inner=e)},"JsonWebTokenError");gBe.prototype=Object.create(Error.prototype);gBe.prototype.constructor=gBe;i4r.exports=gBe});var Wvt=T((QOc,s4r)=>{f();var o4r=dge(),ABe=a(function(t,e){o4r.call(this,t),this.name="NotBeforeError",this.date=e},"NotBeforeError");ABe.prototype=Object.create(o4r.prototype);ABe.prototype.constructor=ABe;s4r.exports=ABe});var zvt=T((HOc,c4r)=>{f();var a4r=dge(),yBe=a(function(t,e){a4r.call(this,t),this.name="TokenExpiredError",this.expiredAt=e},"TokenExpiredError");yBe.prototype=Object.create(a4r.prototype);yBe.prototype.constructor=yBe;c4r.exports=yBe});var Yvt=T((VOc,l4r)=>{f();var nte=1e3,ite=nte*60,ote=ite*60,tH=ote*24,g3i=tH*7,A3i=tH*365.25;l4r.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return y3i(t);if(r==="number"&&isFinite(t))return e.long?_3i(t):E3i(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function y3i(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*A3i;case"weeks":case"week":case"w":return r*g3i;case"days":case"day":case"d":return r*tH;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ote;case"minutes":case"minute":case"mins":case"min":case"m":return r*ite;case"seconds":case"second":case"secs":case"sec":case"s":return r*nte;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(y3i,"parse");function E3i(t){var e=Math.abs(t);return e>=tH?Math.round(t/tH)+"d":e>=ote?Math.round(t/ote)+"h":e>=ite?Math.round(t/ite)+"m":e>=nte?Math.round(t/nte)+"s":t+"ms"}a(E3i,"fmtShort");function _3i(t){var e=Math.abs(t);return e>=tH?EBe(t,e,tH,"day"):e>=ote?EBe(t,e,ote,"hour"):e>=ite?EBe(t,e,ite,"minute"):e>=nte?EBe(t,e,nte,"second"):t+" ms"}a(_3i,"fmtLong");function EBe(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(EBe,"plural")});var Kvt=T((YOc,u4r)=>{f();var C3i=Yvt();u4r.exports=function(t,e){var r=e||Math.floor(Date.now()/1e3);if(typeof t=="string"){var n=C3i(t);return typeof n>"u"?void 0:Math.floor(r+n/1e3)}else return typeof t=="number"?r+t:void 0}});var fge=T((JOc,d4r)=>{"use strict";f();var v3i="2.0.0",b3i=Number.MAX_SAFE_INTEGER||9007199254740991,T3i=16,S3i=250,I3i=["major","premajor","minor","preminor","patch","prepatch","prerelease"];d4r.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:T3i,MAX_SAFE_BUILD_LENGTH:S3i,MAX_SAFE_INTEGER:b3i,RELEASE_TYPES:I3i,SEMVER_SPEC_VERSION:v3i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var pge=T((ZOc,f4r)=>{"use strict";f();var x3i=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};f4r.exports=x3i});var ste=T((EP,p4r)=>{"use strict";f();var{MAX_SAFE_COMPONENT_LENGTH:Jvt,MAX_SAFE_BUILD_LENGTH:w3i,MAX_LENGTH:R3i}=fge(),P3i=pge();EP=p4r.exports={};var k3i=EP.re=[],D3i=EP.safeRe=[],sn=EP.src=[],N3i=EP.safeSrc=[],an=EP.t={},M3i=0,Xvt="[a-zA-Z0-9-]",O3i=[["\\s",1],["\\d",R3i],[Xvt,w3i]],B3i=a(t=>{for(let[e,r]of O3i)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),to=a((t,e,r)=>{let n=B3i(e),o=M3i++;P3i(t,o,e),an[t]=o,sn[o]=e,N3i[o]=n,k3i[o]=new RegExp(e,r?"g":void 0),D3i[o]=new RegExp(n,r?"g":void 0)},"createToken");to("NUMERICIDENTIFIER","0|[1-9]\\d*");to("NUMERICIDENTIFIERLOOSE","\\d+");to("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Xvt}*`);to("MAINVERSION",`(${sn[an.NUMERICIDENTIFIER]})\\.(${sn[an.NUMERICIDENTIFIER]})\\.(${sn[an.NUMERICIDENTIFIER]})`);to("MAINVERSIONLOOSE",`(${sn[an.NUMERICIDENTIFIERLOOSE]})\\.(${sn[an.NUMERICIDENTIFIERLOOSE]})\\.(${sn[an.NUMERICIDENTIFIERLOOSE]})`);to("PRERELEASEIDENTIFIER",`(?:${sn[an.NONNUMERICIDENTIFIER]}|${sn[an.NUMERICIDENTIFIER]})`);to("PRERELEASEIDENTIFIERLOOSE",`(?:${sn[an.NONNUMERICIDENTIFIER]}|${sn[an.NUMERICIDENTIFIERLOOSE]})`);to("PRERELEASE",`(?:-(${sn[an.PRERELEASEIDENTIFIER]}(?:\\.${sn[an.PRERELEASEIDENTIFIER]})*))`);to("PRERELEASELOOSE",`(?:-?(${sn[an.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${sn[an.PRERELEASEIDENTIFIERLOOSE]})*))`);to("BUILDIDENTIFIER",`${Xvt}+`);to("BUILD",`(?:\\+(${sn[an.BUILDIDENTIFIER]}(?:\\.${sn[an.BUILDIDENTIFIER]})*))`);to("FULLPLAIN",`v?${sn[an.MAINVERSION]}${sn[an.PRERELEASE]}?${sn[an.BUILD]}?`);to("FULL",`^${sn[an.FULLPLAIN]}$`);to("LOOSEPLAIN",`[v=\\s]*${sn[an.MAINVERSIONLOOSE]}${sn[an.PRERELEASELOOSE]}?${sn[an.BUILD]}?`);to("LOOSE",`^${sn[an.LOOSEPLAIN]}$`);to("GTLT","((?:<|>)?=?)");to("XRANGEIDENTIFIERLOOSE",`${sn[an.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);to("XRANGEIDENTIFIER",`${sn[an.NUMERICIDENTIFIER]}|x|X|\\*`);to("XRANGEPLAIN",`[v=\\s]*(${sn[an.XRANGEIDENTIFIER]})(?:\\.(${sn[an.XRANGEIDENTIFIER]})(?:\\.(${sn[an.XRANGEIDENTIFIER]})(?:${sn[an.PRERELEASE]})?${sn[an.BUILD]}?)?)?`);to("XRANGEPLAINLOOSE",`[v=\\s]*(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:\\.(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:\\.(${sn[an.XRANGEIDENTIFIERLOOSE]})(?:${sn[an.PRERELEASELOOSE]})?${sn[an.BUILD]}?)?)?`);to("XRANGE",`^${sn[an.GTLT]}\\s*${sn[an.XRANGEPLAIN]}$`);to("XRANGELOOSE",`^${sn[an.GTLT]}\\s*${sn[an.XRANGEPLAINLOOSE]}$`);to("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Jvt}})(?:\\.(\\d{1,${Jvt}}))?(?:\\.(\\d{1,${Jvt}}))?`);to("COERCE",`${sn[an.COERCEPLAIN]}(?:$|[^\\d])`);to("COERCEFULL",sn[an.COERCEPLAIN]+`(?:${sn[an.PRERELEASE]})?(?:${sn[an.BUILD]})?(?:$|[^\\d])`);to("COERCERTL",sn[an.COERCE],!0);to("COERCERTLFULL",sn[an.COERCEFULL],!0);to("LONETILDE","(?:~>?)");to("TILDETRIM",`(\\s*)${sn[an.LONETILDE]}\\s+`,!0);EP.tildeTrimReplace="$1~";to("TILDE",`^${sn[an.LONETILDE]}${sn[an.XRANGEPLAIN]}$`);to("TILDELOOSE",`^${sn[an.LONETILDE]}${sn[an.XRANGEPLAINLOOSE]}$`);to("LONECARET","(?:\\^)");to("CARETTRIM",`(\\s*)${sn[an.LONECARET]}\\s+`,!0);EP.caretTrimReplace="$1^";to("CARET",`^${sn[an.LONECARET]}${sn[an.XRANGEPLAIN]}$`);to("CARETLOOSE",`^${sn[an.LONECARET]}${sn[an.XRANGEPLAINLOOSE]}$`);to("COMPARATORLOOSE",`^${sn[an.GTLT]}\\s*(${sn[an.LOOSEPLAIN]})$|^$`);to("COMPARATOR",`^${sn[an.GTLT]}\\s*(${sn[an.FULLPLAIN]})$|^$`);to("COMPARATORTRIM",`(\\s*)${sn[an.GTLT]}\\s*(${sn[an.LOOSEPLAIN]}|${sn[an.XRANGEPLAIN]})`,!0);EP.comparatorTrimReplace="$1$2$3";to("HYPHENRANGE",`^\\s*(${sn[an.XRANGEPLAIN]})\\s+-\\s+(${sn[an.XRANGEPLAIN]})\\s*$`);to("HYPHENRANGELOOSE",`^\\s*(${sn[an.XRANGEPLAINLOOSE]})\\s+-\\s+(${sn[an.XRANGEPLAINLOOSE]})\\s*$`);to("STAR","(<|>)?=?\\s*\\*");to("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");to("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var _Be=T((nBc,h4r)=>{"use strict";f();var L3i=Object.freeze({loose:!0}),F3i=Object.freeze({}),U3i=a(t=>t?typeof t!="object"?L3i:t:F3i,"parseOptions");h4r.exports=U3i});var Zvt=T((sBc,A4r)=>{"use strict";f();var m4r=/^[0-9]+$/,g4r=a((t,e)=>{let r=m4r.test(t),n=m4r.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:tg4r(e,t),"rcompareIdentifiers");A4r.exports={compareIdentifiers:g4r,rcompareIdentifiers:Q3i}});var Sg=T((lBc,E4r)=>{"use strict";f();var CBe=pge(),{MAX_LENGTH:y4r,MAX_SAFE_INTEGER:vBe}=fge(),{safeRe:bBe,t:TBe}=ste(),q3i=_Be(),{compareIdentifiers:ate}=Zvt(),ebt=class t{static{a(this,"SemVer")}constructor(e,r){if(r=q3i(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>y4r)throw new TypeError(`version is longer than ${y4r} characters`);CBe("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?bBe[TBe.LOOSE]:bBe[TBe.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>vBe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>vBe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>vBe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(r){let s=[r,o];n===!1&&(s=[r]),ate(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};E4r.exports=ebt});var rH=T((fBc,C4r)=>{"use strict";f();var _4r=Sg(),G3i=a((t,e,r=!1)=>{if(t instanceof _4r)return t;try{return new _4r(t,e)}catch(n){if(!r)return null;throw n}},"parse");C4r.exports=G3i});var b4r=T((mBc,v4r)=>{"use strict";f();var H3i=rH(),j3i=a((t,e)=>{let r=H3i(t,e);return r?r.version:null},"valid");v4r.exports=j3i});var S4r=T((yBc,T4r)=>{"use strict";f();var $3i=rH(),V3i=a((t,e)=>{let r=$3i(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");T4r.exports=V3i});var w4r=T((CBc,x4r)=>{"use strict";f();var I4r=Sg(),W3i=a((t,e,r,n,o)=>{typeof r=="string"&&(o=n,n=r,r=void 0);try{return new I4r(t instanceof I4r?t.version:t,r).inc(e,n,o).version}catch{return null}},"inc");x4r.exports=W3i});var k4r=T((TBc,P4r)=>{"use strict";f();var R4r=rH(),z3i=a((t,e)=>{let r=R4r(t,null,!0),n=R4r(e,null,!0),o=r.compare(n);if(o===0)return null;let s=o>0,c=s?r:n,l=s?n:r,u=!!c.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(l.compareMain(c)===0)return l.minor&&!l.patch?"minor":"patch"}let p=u?"pre":"";return r.major!==n.major?p+"major":r.minor!==n.minor?p+"minor":r.patch!==n.patch?p+"patch":"prerelease"},"diff");P4r.exports=z3i});var N4r=T((xBc,D4r)=>{"use strict";f();var Y3i=Sg(),K3i=a((t,e)=>new Y3i(t,e).major,"major");D4r.exports=K3i});var O4r=T((PBc,M4r)=>{"use strict";f();var J3i=Sg(),X3i=a((t,e)=>new J3i(t,e).minor,"minor");M4r.exports=X3i});var L4r=T((NBc,B4r)=>{"use strict";f();var Z3i=Sg(),eLi=a((t,e)=>new Z3i(t,e).patch,"patch");B4r.exports=eLi});var U4r=T((BBc,F4r)=>{"use strict";f();var tLi=rH(),rLi=a((t,e)=>{let r=tLi(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");F4r.exports=rLi});var Zb=T((UBc,q4r)=>{"use strict";f();var Q4r=Sg(),nLi=a((t,e,r)=>new Q4r(t,r).compare(new Q4r(e,r)),"compare");q4r.exports=nLi});var H4r=T((GBc,G4r)=>{"use strict";f();var iLi=Zb(),oLi=a((t,e,r)=>iLi(e,t,r),"rcompare");G4r.exports=oLi});var $4r=T(($Bc,j4r)=>{"use strict";f();var sLi=Zb(),aLi=a((t,e)=>sLi(t,e,!0),"compareLoose");j4r.exports=aLi});var SBe=T((zBc,W4r)=>{"use strict";f();var V4r=Sg(),cLi=a((t,e,r)=>{let n=new V4r(t,r),o=new V4r(e,r);return n.compare(o)||n.compareBuild(o)},"compareBuild");W4r.exports=cLi});var Y4r=T((JBc,z4r)=>{"use strict";f();var lLi=SBe(),uLi=a((t,e)=>t.sort((r,n)=>lLi(r,n,e)),"sort");z4r.exports=uLi});var J4r=T((e3c,K4r)=>{"use strict";f();var dLi=SBe(),fLi=a((t,e)=>t.sort((r,n)=>dLi(n,r,e)),"rsort");K4r.exports=fLi});var hge=T((n3c,X4r)=>{"use strict";f();var pLi=Zb(),hLi=a((t,e,r)=>pLi(t,e,r)>0,"gt");X4r.exports=hLi});var IBe=T((s3c,Z4r)=>{"use strict";f();var mLi=Zb(),gLi=a((t,e,r)=>mLi(t,e,r)<0,"lt");Z4r.exports=gLi});var tbt=T((l3c,eOr)=>{"use strict";f();var ALi=Zb(),yLi=a((t,e,r)=>ALi(t,e,r)===0,"eq");eOr.exports=yLi});var rbt=T((f3c,tOr)=>{"use strict";f();var ELi=Zb(),_Li=a((t,e,r)=>ELi(t,e,r)!==0,"neq");tOr.exports=_Li});var xBe=T((m3c,rOr)=>{"use strict";f();var CLi=Zb(),vLi=a((t,e,r)=>CLi(t,e,r)>=0,"gte");rOr.exports=vLi});var wBe=T((y3c,nOr)=>{"use strict";f();var bLi=Zb(),TLi=a((t,e,r)=>bLi(t,e,r)<=0,"lte");nOr.exports=TLi});var nbt=T((C3c,iOr)=>{"use strict";f();var SLi=tbt(),ILi=rbt(),xLi=hge(),wLi=xBe(),RLi=IBe(),PLi=wBe(),kLi=a((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return SLi(t,r,n);case"!=":return ILi(t,r,n);case">":return xLi(t,r,n);case">=":return wLi(t,r,n);case"<":return RLi(t,r,n);case"<=":return PLi(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");iOr.exports=kLi});var sOr=T((T3c,oOr)=>{"use strict";f();var DLi=Sg(),NLi=rH(),{safeRe:RBe,t:PBe}=ste(),MLi=a((t,e)=>{if(t instanceof DLi)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?RBe[PBe.COERCEFULL]:RBe[PBe.COERCE]);else{let u=e.includePrerelease?RBe[PBe.COERCERTLFULL]:RBe[PBe.COERCERTL],d;for(;(d=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||d.index+d[0].length!==r.index+r[0].length)&&(r=d),u.lastIndex=d.index+d[1].length+d[2].length;u.lastIndex=-1}if(r===null)return null;let n=r[2],o=r[3]||"0",s=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",l=e.includePrerelease&&r[6]?`+${r[6]}`:"";return NLi(`${n}.${o}.${s}${c}${l}`,e)},"coerce");oOr.exports=MLi});var cOr=T((x3c,aOr)=>{"use strict";f();var ibt=class{static{a(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(e,r)}return this}};aOr.exports=ibt});var eT=T((P3c,fOr)=>{"use strict";f();var OLi=/\s+/g,obt=class t{static{a(this,"Range")}constructor(e,r){if(r=LLi(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof sbt)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(OLi," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(o=>!uOr(o[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&jLi(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&GLi)|(this.options.loose&&HLi))+":"+e,o=lOr.get(n);if(o)return o;let s=this.options.loose,c=s?PE[$A.HYPHENRANGELOOSE]:PE[$A.HYPHENRANGE];e=e.replace(c,e8i(this.options.includePrerelease)),Ll("hyphen replace",e),e=e.replace(PE[$A.COMPARATORTRIM],ULi),Ll("comparator trim",e),e=e.replace(PE[$A.TILDETRIM],QLi),Ll("tilde trim",e),e=e.replace(PE[$A.CARETTRIM],qLi),Ll("caret trim",e);let l=e.split(" ").map(h=>$Li(h,this.options)).join(" ").split(/\s+/).map(h=>ZLi(h,this.options));s&&(l=l.filter(h=>(Ll("loose invalid filter",h,this.options),!!h.match(PE[$A.COMPARATORLOOSE])))),Ll("range list",l);let u=new Map,d=l.map(h=>new sbt(h,this.options));for(let h of d){if(uOr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let p=[...u.values()];return lOr.set(n,p),p}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>dOr(n,r)&&e.set.some(o=>dOr(o,r)&&n.every(s=>o.every(c=>s.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new FLi(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),jLi=a(t=>t.value==="","isAny"),dOr=a((t,e)=>{let r=!0,n=t.slice(),o=n.pop();for(;r&&n.length;)r=n.every(s=>o.intersects(s,e)),o=n.pop();return r},"isSatisfiable"),$Li=a((t,e)=>(Ll("comp",t,e),t=zLi(t,e),Ll("caret",t),t=VLi(t,e),Ll("tildes",t),t=KLi(t,e),Ll("xrange",t),t=XLi(t,e),Ll("stars",t),t),"parseComparator"),VA=a(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),VLi=a((t,e)=>t.trim().split(/\s+/).map(r=>WLi(r,e)).join(" "),"replaceTildes"),WLi=a((t,e)=>{let r=e.loose?PE[$A.TILDELOOSE]:PE[$A.TILDE];return t.replace(r,(n,o,s,c,l)=>{Ll("tilde",t,n,o,s,c,l);let u;return VA(o)?u="":VA(s)?u=`>=${o}.0.0 <${+o+1}.0.0-0`:VA(c)?u=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:l?(Ll("replaceTilde pr",l),u=`>=${o}.${s}.${c}-${l} <${o}.${+s+1}.0-0`):u=`>=${o}.${s}.${c} <${o}.${+s+1}.0-0`,Ll("tilde return",u),u})},"replaceTilde"),zLi=a((t,e)=>t.trim().split(/\s+/).map(r=>YLi(r,e)).join(" "),"replaceCarets"),YLi=a((t,e)=>{Ll("caret",t,e);let r=e.loose?PE[$A.CARETLOOSE]:PE[$A.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(o,s,c,l,u)=>{Ll("caret",t,o,s,c,l,u);let d;return VA(s)?d="":VA(c)?d=`>=${s}.0.0${n} <${+s+1}.0.0-0`:VA(l)?s==="0"?d=`>=${s}.${c}.0${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.0${n} <${+s+1}.0.0-0`:u?(Ll("replaceCaret pr",u),s==="0"?c==="0"?d=`>=${s}.${c}.${l}-${u} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}-${u} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l}-${u} <${+s+1}.0.0-0`):(Ll("no pr"),s==="0"?c==="0"?d=`>=${s}.${c}.${l}${n} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l} <${+s+1}.0.0-0`),Ll("caret return",d),d})},"replaceCaret"),KLi=a((t,e)=>(Ll("replaceXRanges",t,e),t.split(/\s+/).map(r=>JLi(r,e)).join(" ")),"replaceXRanges"),JLi=a((t,e)=>{t=t.trim();let r=e.loose?PE[$A.XRANGELOOSE]:PE[$A.XRANGE];return t.replace(r,(n,o,s,c,l,u)=>{Ll("xRange",t,n,o,s,c,l,u);let d=VA(s),p=d||VA(c),h=p||VA(l),m=h;return o==="="&&m&&(o=""),u=e.includePrerelease?"-0":"",d?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),o==="<"&&(u="-0"),n=`${o+s}.${c}.${l}${u}`):p?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${c}.0${u} <${s}.${+c+1}.0-0`),Ll("xRange return",n),n})},"replaceXRange"),XLi=a((t,e)=>(Ll("replaceStars",t,e),t.trim().replace(PE[$A.STAR],"")),"replaceStars"),ZLi=a((t,e)=>(Ll("replaceGTE0",t,e),t.trim().replace(PE[e.includePrerelease?$A.GTE0PRE:$A.GTE0],"")),"replaceGTE0"),e8i=a(t=>(e,r,n,o,s,c,l,u,d,p,h,m)=>(VA(n)?r="":VA(o)?r=`>=${n}.0.0${t?"-0":""}`:VA(s)?r=`>=${n}.${o}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,VA(d)?u="":VA(p)?u=`<${+d+1}.0.0-0`:VA(h)?u=`<${d}.${+p+1}.0-0`:m?u=`<=${d}.${p}.${h}-${m}`:t?u=`<${d}.${p}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),"hyphenReplace"),t8i=a((t,e,r)=>{for(let n=0;n0){let o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0},"testSet")});var mge=T((N3c,yOr)=>{"use strict";f();var gge=Symbol("SemVer ANY"),lbt=class t{static{a(this,"Comparator")}static get ANY(){return gge}constructor(e,r){if(r=pOr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),cbt("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===gge?this.value="":this.value=this.operator+this.semver.version,cbt("comp",this)}parse(e){let r=this.options.loose?hOr[mOr.COMPARATORLOOSE]:hOr[mOr.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new gOr(n[2],this.options.loose):this.semver=gge}toString(){return this.value}test(e){if(cbt("Comparator.test",e,this.options.loose),this.semver===gge||e===gge)return!0;if(typeof e=="string")try{e=new gOr(e,this.options)}catch{return!1}return abt(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new AOr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new AOr(this.value,r).test(e.semver):(r=pOr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||abt(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||abt(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};yOr.exports=lbt;var pOr=_Be(),{safeRe:hOr,t:mOr}=ste(),abt=nbt(),cbt=pge(),gOr=Sg(),AOr=eT()});var Age=T((B3c,EOr)=>{"use strict";f();var r8i=eT(),n8i=a((t,e,r)=>{try{e=new r8i(e,r)}catch{return!1}return e.test(t)},"satisfies");EOr.exports=n8i});var COr=T((U3c,_Or)=>{"use strict";f();var i8i=eT(),o8i=a((t,e)=>new i8i(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");_Or.exports=o8i});var bOr=T((G3c,vOr)=>{"use strict";f();var s8i=Sg(),a8i=eT(),c8i=a((t,e,r)=>{let n=null,o=null,s=null;try{s=new a8i(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new s8i(n,r))}),n},"maxSatisfying");vOr.exports=c8i});var SOr=T(($3c,TOr)=>{"use strict";f();var l8i=Sg(),u8i=eT(),d8i=a((t,e,r)=>{let n=null,o=null,s=null;try{s=new u8i(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new l8i(n,r))}),n},"minSatisfying");TOr.exports=d8i});var wOr=T((z3c,xOr)=>{"use strict";f();var ubt=Sg(),f8i=eT(),IOr=hge(),p8i=a((t,e)=>{t=new f8i(t,e);let r=new ubt("0.0.0");if(t.test(r)||(r=new ubt("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let l=new ubt(c.semver.version);switch(c.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||IOr(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),s&&(!r||IOr(r,s))&&(r=s)}return r&&t.test(r)?r:null},"minVersion");xOr.exports=p8i});var POr=T((J3c,ROr)=>{"use strict";f();var h8i=eT(),m8i=a((t,e)=>{try{return new h8i(t,e).range||"*"}catch{return null}},"validRange");ROr.exports=m8i});var kBe=T((eLc,MOr)=>{"use strict";f();var g8i=Sg(),NOr=mge(),{ANY:A8i}=NOr,y8i=eT(),E8i=Age(),kOr=hge(),DOr=IBe(),_8i=wBe(),C8i=xBe(),v8i=a((t,e,r,n)=>{t=new g8i(t,n),e=new y8i(e,n);let o,s,c,l,u;switch(r){case">":o=kOr,s=_8i,c=DOr,l=">",u=">=";break;case"<":o=DOr,s=C8i,c=kOr,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(E8i(t,e,n))return!1;for(let d=0;d{g.semver===A8i&&(g=new NOr(">=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0},"outside");MOr.exports=v8i});var BOr=T((nLc,OOr)=>{"use strict";f();var b8i=kBe(),T8i=a((t,e,r)=>b8i(t,e,">",r),"gtr");OOr.exports=T8i});var FOr=T((sLc,LOr)=>{"use strict";f();var S8i=kBe(),I8i=a((t,e,r)=>S8i(t,e,"<",r),"ltr");LOr.exports=I8i});var qOr=T((lLc,QOr)=>{"use strict";f();var UOr=eT(),x8i=a((t,e,r)=>(t=new UOr(t,r),e=new UOr(e,r),t.intersects(e,r)),"intersects");QOr.exports=x8i});var HOr=T((fLc,GOr)=>{"use strict";f();var w8i=Age(),R8i=Zb();GOr.exports=(t,e,r)=>{let n=[],o=null,s=null,c=t.sort((p,h)=>R8i(p,h,r));for(let p of c)w8i(p,e,r)?(s=p,o||(o=p)):(s&&n.push([o,s]),s=null,o=null);o&&n.push([o,null]);let l=[];for(let[p,h]of n)p===h?l.push(p):!h&&p===c[0]?l.push("*"):h?p===c[0]?l.push(`<=${h}`):l.push(`${p} - ${h}`):l.push(`>=${p}`);let u=l.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return u.length{"use strict";f();var jOr=eT(),fbt=mge(),{ANY:dbt}=fbt,yge=Age(),pbt=Zb(),P8i=a((t,e,r={})=>{if(t===e)return!0;t=new jOr(t,r),e=new jOr(e,r);let n=!1;e:for(let o of t.set){for(let s of e.set){let c=D8i(o,s,r);if(n=n||c!==null,c)continue e}if(n)return!1}return!0},"subset"),k8i=[new fbt(">=0.0.0-0")],$Or=[new fbt(">=0.0.0")],D8i=a((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===dbt){if(e.length===1&&e[0].semver===dbt)return!0;r.includePrerelease?t=k8i:t=$Or}if(e.length===1&&e[0].semver===dbt){if(r.includePrerelease)return!0;e=$Or}let n=new Set,o,s;for(let g of t)g.operator===">"||g.operator===">="?o=VOr(o,g,r):g.operator==="<"||g.operator==="<="?s=WOr(s,g,r):n.add(g.semver);if(n.size>1)return null;let c;if(o&&s){if(c=pbt(o.semver,s.semver,r),c>0)return null;if(c===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let g of n){if(o&&!yge(g,String(o),r)||s&&!yge(g,String(s),r))return null;for(let A of e)if(!yge(g,String(A),r))return!1;return!0}let l,u,d,p,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(p=p||g.operator===">"||g.operator===">=",d=d||g.operator==="<"||g.operator==="<=",o){if(m&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===m.major&&g.semver.minor===m.minor&&g.semver.patch===m.patch&&(m=!1),g.operator===">"||g.operator===">="){if(l=VOr(o,g,r),l===g&&l!==o)return!1}else if(o.operator===">="&&!yge(o.semver,String(g),r))return!1}if(s){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(u=WOr(s,g,r),u===g&&u!==s)return!1}else if(s.operator==="<="&&!yge(s.semver,String(g),r))return!1}if(!g.operator&&(s||o)&&c!==0)return!1}return!(o&&d&&!s&&c!==0||s&&p&&!o&&c!==0||m||h)},"simpleSubset"),VOr=a((t,e,r)=>{if(!t)return e;let n=pbt(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),WOr=a((t,e,r)=>{if(!t)return e;let n=pbt(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");zOr.exports=P8i});var I8=T((ALc,XOr)=>{"use strict";f();var hbt=ste(),KOr=fge(),N8i=Sg(),JOr=Zvt(),M8i=rH(),O8i=b4r(),B8i=S4r(),L8i=w4r(),F8i=k4r(),U8i=N4r(),Q8i=O4r(),q8i=L4r(),G8i=U4r(),H8i=Zb(),j8i=H4r(),$8i=$4r(),V8i=SBe(),W8i=Y4r(),z8i=J4r(),Y8i=hge(),K8i=IBe(),J8i=tbt(),X8i=rbt(),Z8i=xBe(),e6i=wBe(),t6i=nbt(),r6i=sOr(),n6i=mge(),i6i=eT(),o6i=Age(),s6i=COr(),a6i=bOr(),c6i=SOr(),l6i=wOr(),u6i=POr(),d6i=kBe(),f6i=BOr(),p6i=FOr(),h6i=qOr(),m6i=HOr(),g6i=YOr();XOr.exports={parse:M8i,valid:O8i,clean:B8i,inc:L8i,diff:F8i,major:U8i,minor:Q8i,patch:q8i,prerelease:G8i,compare:H8i,rcompare:j8i,compareLoose:$8i,compareBuild:V8i,sort:W8i,rsort:z8i,gt:Y8i,lt:K8i,eq:J8i,neq:X8i,gte:Z8i,lte:e6i,cmp:t6i,coerce:r6i,Comparator:n6i,Range:i6i,satisfies:o6i,toComparators:s6i,maxSatisfying:a6i,minSatisfying:c6i,minVersion:l6i,validRange:u6i,outside:d6i,gtr:f6i,ltr:p6i,intersects:h6i,simplifyRange:m6i,subset:g6i,SemVer:N8i,re:hbt.re,src:hbt.src,tokens:hbt.t,SEMVER_SPEC_VERSION:KOr.SEMVER_SPEC_VERSION,RELEASE_TYPES:KOr.RELEASE_TYPES,compareIdentifiers:JOr.compareIdentifiers,rcompareIdentifiers:JOr.rcompareIdentifiers}});var eBr=T((ELc,ZOr)=>{f();var A6i=I8();ZOr.exports=A6i.satisfies(process.version,">=15.7.0")});var rBr=T((CLc,tBr)=>{f();var y6i=I8();tBr.exports=y6i.satisfies(process.version,">=16.9.0")});var mbt=T((bLc,nBr)=>{f();var E6i=eBr(),_6i=rBr(),C6i={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},v6i={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};nBr.exports=function(t,e){if(!t||!e)return;let r=e.asymmetricKeyType;if(!r)return;let n=C6i[r];if(!n)throw new Error(`Unknown key type "${r}".`);if(!n.includes(t))throw new Error(`"alg" parameter for "${r}" key type must be one of: ${n.join(", ")}.`);if(E6i)switch(r){case"ec":let o=e.asymmetricKeyDetails.namedCurve,s=v6i[t];if(o!==s)throw new Error(`"alg" parameter "${t}" requires curve "${s}".`);break;case"rsa-pss":if(_6i){let c=parseInt(t.slice(-3),10),{hashAlgorithm:l,mgf1HashAlgorithm:u,saltLength:d}=e.asymmetricKeyDetails;if(l!==`sha${c}`||u!==l)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${t}.`);if(d!==void 0&&d>c>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${t}.`)}break}}});var gbt=T((SLc,iBr)=>{f();var b6i=I8();iBr.exports=b6i.satisfies(process.version,"^6.12.0 || >=8.0.0")});var aBr=T((xLc,sBr)=>{f();var el=dge(),T6i=Wvt(),oBr=zvt(),S6i=Vvt(),I6i=Kvt(),x6i=mbt(),w6i=gbt(),R6i=mBe(),{KeyObject:P6i,createSecretKey:k6i,createPublicKey:D6i}=require("crypto"),Abt=["RS256","RS384","RS512"],N6i=["ES256","ES384","ES512"],ybt=["RS256","RS384","RS512"],M6i=["HS256","HS384","HS512"];w6i&&(Abt.splice(Abt.length,0,"PS256","PS384","PS512"),ybt.splice(ybt.length,0,"PS256","PS384","PS512"));sBr.exports=function(t,e,r,n){typeof r=="function"&&!n&&(n=r,r={}),r||(r={}),r=Object.assign({},r);let o;if(n?o=n:o=a(function(p,h){if(p)throw p;return h},"done"),r.clockTimestamp&&typeof r.clockTimestamp!="number")return o(new el("clockTimestamp must be a number"));if(r.nonce!==void 0&&(typeof r.nonce!="string"||r.nonce.trim()===""))return o(new el("nonce must be a non-empty string"));if(r.allowInvalidAsymmetricKeyTypes!==void 0&&typeof r.allowInvalidAsymmetricKeyTypes!="boolean")return o(new el("allowInvalidAsymmetricKeyTypes must be a boolean"));let s=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!t)return o(new el("jwt must be provided"));if(typeof t!="string")return o(new el("jwt must be a string"));let c=t.split(".");if(c.length!==3)return o(new el("jwt malformed"));let l;try{l=S6i(t,{complete:!0})}catch(p){return o(p)}if(!l)return o(new el("invalid token"));let u=l.header,d;if(typeof e=="function"){if(!n)return o(new el("verify must be called asynchronous if secret or public key is provided as a callback"));d=e}else d=a(function(p,h){return h(null,e)},"getSecret");return d(u,function(p,h){if(p)return o(new el("error in secret or public key callback: "+p.message));let m=c[2].trim()!=="";if(!m&&h)return o(new el("jwt signature is required"));if(m&&!h)return o(new el("secret or public key must be provided"));if(!m&&!r.algorithms)return o(new el('please specify "none" in "algorithms" to verify unsigned tokens'));if(h!=null&&!(h instanceof P6i))try{h=D6i(h)}catch{try{h=k6i(typeof h=="string"?Buffer.from(h):h)}catch{return o(new el("secretOrPublicKey is not valid key material"))}}if(r.algorithms||(h.type==="secret"?r.algorithms=M6i:["rsa","rsa-pss"].includes(h.asymmetricKeyType)?r.algorithms=ybt:h.asymmetricKeyType==="ec"?r.algorithms=N6i:r.algorithms=Abt),r.algorithms.indexOf(l.header.alg)===-1)return o(new el("invalid algorithm"));if(u.alg.startsWith("HS")&&h.type!=="secret")return o(new el(`secretOrPublicKey must be a symmetric key when using ${u.alg}`));if(/^(?:RS|PS|ES)/.test(u.alg)&&h.type!=="public")return o(new el(`secretOrPublicKey must be an asymmetric key when using ${u.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{x6i(u.alg,h)}catch(y){return o(y)}let g;try{g=R6i.verify(t,l.header.alg,h)}catch(y){return o(y)}if(!g)return o(new el("invalid signature"));let A=l.payload;if(typeof A.nbf<"u"&&!r.ignoreNotBefore){if(typeof A.nbf!="number")return o(new el("invalid nbf value"));if(A.nbf>s+(r.clockTolerance||0))return o(new T6i("jwt not active",new Date(A.nbf*1e3)))}if(typeof A.exp<"u"&&!r.ignoreExpiration){if(typeof A.exp!="number")return o(new el("invalid exp value"));if(s>=A.exp+(r.clockTolerance||0))return o(new oBr("jwt expired",new Date(A.exp*1e3)))}if(r.audience){let y=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(A.aud)?A.aud:[A.aud]).some(function(v){return y.some(function(b){return b instanceof RegExp?b.test(v):b===v})}))return o(new el("jwt audience invalid. expected: "+y.join(" or ")))}if(r.issuer&&(typeof r.issuer=="string"&&A.iss!==r.issuer||Array.isArray(r.issuer)&&r.issuer.indexOf(A.iss)===-1))return o(new el("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&A.sub!==r.subject)return o(new el("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&A.jti!==r.jwtid)return o(new el("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&A.nonce!==r.nonce)return o(new el("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if(typeof A.iat!="number")return o(new el("iat required when maxAge is specified"));let y=I6i(r.maxAge,A.iat);if(typeof y>"u")return o(new el('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(s>=y+(r.clockTolerance||0))return o(new oBr("maxAge exceeded",new Date(y*1e3)))}if(r.complete===!0){let y=l.signature;return o(null,{header:u,payload:A,signature:y})}return o(null,A)})}});var pBr=T((PLc,fBr)=>{f();var cBr=1/0,uBr=9007199254740991,O6i=17976931348623157e292,lBr=NaN,B6i="[object Arguments]",L6i="[object Function]",F6i="[object GeneratorFunction]",U6i="[object String]",Q6i="[object Symbol]",q6i=/^\s+|\s+$/g,G6i=/^[-+]0x[0-9a-f]+$/i,H6i=/^0b[01]+$/i,j6i=/^0o[0-7]+$/i,$6i=/^(?:0|[1-9]\d*)$/,V6i=parseInt;function W6i(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r-1&&t%1==0&&t-1:!!o&&Y6i(t,e,r)>-1}a(aFi,"includes");function cFi(t){return lFi(t)&&_bt.call(t,"callee")&&(!eFi.call(t,"callee")||NBe.call(t)==B6i)}a(cFi,"isArguments");var dBr=Array.isArray;function Cbt(t){return t!=null&&dFi(t.length)&&!uFi(t)}a(Cbt,"isArrayLike");function lFi(t){return vbt(t)&&Cbt(t)}a(lFi,"isArrayLikeObject");function uFi(t){var e=Ebt(t)?NBe.call(t):"";return e==L6i||e==F6i}a(uFi,"isFunction");function dFi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uBr}a(dFi,"isLength");function Ebt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(Ebt,"isObject");function vbt(t){return!!t&&typeof t=="object"}a(vbt,"isObjectLike");function fFi(t){return typeof t=="string"||!dBr(t)&&vbt(t)&&NBe.call(t)==U6i}a(fFi,"isString");function pFi(t){return typeof t=="symbol"||vbt(t)&&NBe.call(t)==Q6i}a(pFi,"isSymbol");function hFi(t){if(!t)return t===0?t:0;if(t=gFi(t),t===cBr||t===-cBr){var e=t<0?-1:1;return e*O6i}return t===t?t:0}a(hFi,"toFinite");function mFi(t){var e=hFi(t),r=e%1;return e===e?r?e-r:e:0}a(mFi,"toInteger");function gFi(t){if(typeof t=="number")return t;if(pFi(t))return lBr;if(Ebt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ebt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(q6i,"");var r=H6i.test(t);return r||j6i.test(t)?V6i(t.slice(2),r?2:8):G6i.test(t)?lBr:+t}a(gFi,"toNumber");function AFi(t){return Cbt(t)?nFi(t):iFi(t)}a(AFi,"keys");function yFi(t){return t?X6i(t,AFi(t)):[]}a(yFi,"values");fBr.exports=aFi});var mBr=T((NLc,hBr)=>{f();var EFi="[object Boolean]",_Fi=Object.prototype,CFi=_Fi.toString;function vFi(t){return t===!0||t===!1||bFi(t)&&CFi.call(t)==EFi}a(vFi,"isBoolean");function bFi(t){return!!t&&typeof t=="object"}a(bFi,"isObjectLike");hBr.exports=vFi});var _Br=T((BLc,EBr)=>{f();var gBr=1/0,TFi=17976931348623157e292,ABr=NaN,SFi="[object Symbol]",IFi=/^\s+|\s+$/g,xFi=/^[-+]0x[0-9a-f]+$/i,wFi=/^0b[01]+$/i,RFi=/^0o[0-7]+$/i,PFi=parseInt,kFi=Object.prototype,DFi=kFi.toString;function NFi(t){return typeof t=="number"&&t==LFi(t)}a(NFi,"isInteger");function yBr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(yBr,"isObject");function MFi(t){return!!t&&typeof t=="object"}a(MFi,"isObjectLike");function OFi(t){return typeof t=="symbol"||MFi(t)&&DFi.call(t)==SFi}a(OFi,"isSymbol");function BFi(t){if(!t)return t===0?t:0;if(t=FFi(t),t===gBr||t===-gBr){var e=t<0?-1:1;return e*TFi}return t===t?t:0}a(BFi,"toFinite");function LFi(t){var e=BFi(t),r=e%1;return e===e?r?e-r:e:0}a(LFi,"toInteger");function FFi(t){if(typeof t=="number")return t;if(OFi(t))return ABr;if(yBr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=yBr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(IFi,"");var r=wFi.test(t);return r||RFi.test(t)?PFi(t.slice(2),r?2:8):xFi.test(t)?ABr:+t}a(FFi,"toNumber");EBr.exports=NFi});var vBr=T((ULc,CBr)=>{f();var UFi="[object Number]",QFi=Object.prototype,qFi=QFi.toString;function GFi(t){return!!t&&typeof t=="object"}a(GFi,"isObjectLike");function HFi(t){return typeof t=="number"||GFi(t)&&qFi.call(t)==UFi}a(HFi,"isNumber");CBr.exports=HFi});var IBr=T((GLc,SBr)=>{f();var jFi="[object Object]";function $Fi(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}a($Fi,"isHostObject");function VFi(t,e){return function(r){return t(e(r))}}a(VFi,"overArg");var WFi=Function.prototype,bBr=Object.prototype,TBr=WFi.toString,zFi=bBr.hasOwnProperty,YFi=TBr.call(Object),KFi=bBr.toString,JFi=VFi(Object.getPrototypeOf,Object);function XFi(t){return!!t&&typeof t=="object"}a(XFi,"isObjectLike");function ZFi(t){if(!XFi(t)||KFi.call(t)!=jFi||$Fi(t))return!1;var e=JFi(t);if(e===null)return!0;var r=zFi.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&TBr.call(r)==YFi}a(ZFi,"isPlainObject");SBr.exports=ZFi});var wBr=T(($Lc,xBr)=>{f();var e9i="[object String]",t9i=Object.prototype,r9i=t9i.toString,n9i=Array.isArray;function i9i(t){return!!t&&typeof t=="object"}a(i9i,"isObjectLike");function o9i(t){return typeof t=="string"||!n9i(t)&&i9i(t)&&r9i.call(t)==e9i}a(o9i,"isString");xBr.exports=o9i});var NBr=T((zLc,DBr)=>{f();var s9i="Expected a function",RBr=1/0,a9i=17976931348623157e292,PBr=NaN,c9i="[object Symbol]",l9i=/^\s+|\s+$/g,u9i=/^[-+]0x[0-9a-f]+$/i,d9i=/^0b[01]+$/i,f9i=/^0o[0-7]+$/i,p9i=parseInt,h9i=Object.prototype,m9i=h9i.toString;function g9i(t,e){var r;if(typeof e!="function")throw new TypeError(s9i);return t=C9i(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}a(g9i,"before");function A9i(t){return g9i(2,t)}a(A9i,"once");function kBr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}a(kBr,"isObject");function y9i(t){return!!t&&typeof t=="object"}a(y9i,"isObjectLike");function E9i(t){return typeof t=="symbol"||y9i(t)&&m9i.call(t)==c9i}a(E9i,"isSymbol");function _9i(t){if(!t)return t===0?t:0;if(t=v9i(t),t===RBr||t===-RBr){var e=t<0?-1:1;return e*a9i}return t===t?t:0}a(_9i,"toFinite");function C9i(t){var e=_9i(t),r=e%1;return e===e?r?e-r:e:0}a(C9i,"toInteger");function v9i(t){if(typeof t=="number")return t;if(E9i(t))return PBr;if(kBr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=kBr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(l9i,"");var r=d9i.test(t);return r||f9i.test(t)?p9i(t.slice(2),r?2:8):u9i.test(t)?PBr:+t}a(v9i,"toNumber");DBr.exports=A9i});var GBr=T((JLc,qBr)=>{f();var MBr=Kvt(),b9i=gbt(),T9i=mbt(),OBr=mBe(),S9i=pBr(),MBe=mBr(),BBr=_Br(),bbt=vBr(),FBr=IBr(),x8=wBr(),I9i=NBr(),{KeyObject:x9i,createSecretKey:w9i,createPrivateKey:R9i}=require("crypto"),UBr=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];b9i&&UBr.splice(3,0,"PS256","PS384","PS512");var P9i={expiresIn:{isValid:a(function(t){return BBr(t)||x8(t)&&t},"isValid"),message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:a(function(t){return BBr(t)||x8(t)&&t},"isValid"),message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:a(function(t){return x8(t)||Array.isArray(t)},"isValid"),message:'"audience" must be a string or array'},algorithm:{isValid:S9i.bind(null,UBr),message:'"algorithm" must be a valid string enum value'},header:{isValid:FBr,message:'"header" must be an object'},encoding:{isValid:x8,message:'"encoding" must be a string'},issuer:{isValid:x8,message:'"issuer" must be a string'},subject:{isValid:x8,message:'"subject" must be a string'},jwtid:{isValid:x8,message:'"jwtid" must be a string'},noTimestamp:{isValid:MBe,message:'"noTimestamp" must be a boolean'},keyid:{isValid:x8,message:'"keyid" must be a string'},mutatePayload:{isValid:MBe,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:MBe,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:MBe,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},k9i={iat:{isValid:bbt,message:'"iat" should be a number of seconds'},exp:{isValid:bbt,message:'"exp" should be a number of seconds'},nbf:{isValid:bbt,message:'"nbf" should be a number of seconds'}};function QBr(t,e,r,n){if(!FBr(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(o){let s=t[o];if(!s){if(!e)throw new Error('"'+o+'" is not allowed in "'+n+'"');return}if(!s.isValid(r[o]))throw new Error(s.message)})}a(QBr,"validate");function D9i(t){return QBr(P9i,!1,t,"options")}a(D9i,"validateOptions");function N9i(t){return QBr(k9i,!0,t,"payload")}a(N9i,"validatePayload");var LBr={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},M9i=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];qBr.exports=function(t,e,r,n){typeof r=="function"?(n=r,r={}):r=r||{};let o=typeof t=="object"&&!Buffer.isBuffer(t),s=Object.assign({alg:r.algorithm||"HS256",typ:o?"JWT":void 0,kid:r.keyid},r.header);function c(d){if(n)return n(d);throw d}if(a(c,"failure"),!e&&r.algorithm!=="none")return c(new Error("secretOrPrivateKey must have a value"));if(e!=null&&!(e instanceof x9i))try{e=R9i(e)}catch{try{e=w9i(typeof e=="string"?Buffer.from(e):e)}catch{return c(new Error("secretOrPrivateKey is not valid key material"))}}if(s.alg.startsWith("HS")&&e.type!=="secret")return c(new Error(`secretOrPrivateKey must be a symmetric key when using ${s.alg}`));if(/^(?:RS|PS|ES)/.test(s.alg)){if(e.type!=="private")return c(new Error(`secretOrPrivateKey must be an asymmetric key when using ${s.alg}`));if(!r.allowInsecureKeySizes&&!s.alg.startsWith("ES")&&e.asymmetricKeyDetails!==void 0&&e.asymmetricKeyDetails.modulusLength<2048)return c(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`))}if(typeof t>"u")return c(new Error("payload is required"));if(o){try{N9i(t)}catch(d){return c(d)}r.mutatePayload||(t=Object.assign({},t))}else{let d=M9i.filter(function(p){return typeof r[p]<"u"});if(d.length>0)return c(new Error("invalid "+d.join(",")+" option for "+typeof t+" payload"))}if(typeof t.exp<"u"&&typeof r.expiresIn<"u")return c(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof t.nbf<"u"&&typeof r.notBefore<"u")return c(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{D9i(r)}catch(d){return c(d)}if(!r.allowInvalidAsymmetricKeyTypes)try{T9i(s.alg,e)}catch(d){return c(d)}let l=t.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete t.iat:o&&(t.iat=l),typeof r.notBefore<"u"){try{t.nbf=MBr(r.notBefore,l)}catch(d){return c(d)}if(typeof t.nbf>"u")return c(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof r.expiresIn<"u"&&typeof t=="object"){try{t.exp=MBr(r.expiresIn,l)}catch(d){return c(d)}if(typeof t.exp>"u")return c(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(LBr).forEach(function(d){let p=LBr[d];if(typeof r[d]<"u"){if(typeof t[p]<"u")return c(new Error('Bad "options.'+d+'" option. The payload already has an "'+p+'" property.'));t[p]=r[d]}});let u=r.encoding||"utf8";if(typeof n=="function")n=n&&I9i(n),OBr.createSign({header:s,privateKey:e,payload:t,encoding:u}).once("error",n).once("done",function(d){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&d.length<256)return n(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`));n(null,d)});else{let d=OBr.sign({header:s,payload:t,secret:e,encoding:u});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(s.alg)&&d.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${s.alg}`);return d}}});var jBr=T((e8c,HBr)=>{f();HBr.exports={decode:Vvt(),verify:aBr(),sign:GBr(),JsonWebTokenError:dge(),NotBeforeError:Wvt(),TokenExpiredError:zvt()}});var eTt=T((zqc,j3r)=>{f();function B7i(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=o,r.enabled=c,r.humanize=Yvt(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(w==="%%")return"%";I++;let P=r.formatters[R];if(typeof P=="function"){let k=E[I];w=P.call(_,k),E.splice(I,1),I--}return w}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h,m=(typeof p=="string"?p:"").split(/[\s,]+/),g=m.length;for(h=0;h"-"+h)].join(",");return r.enable(""),p}a(s,"disable");function c(p){if(p[p.length-1]==="*")return!0;let h,m;for(h=0,m=r.skips.length;h{f();A1.formatArgs=F7i;A1.save=U7i;A1.load=Q7i;A1.useColors=L7i;A1.storage=q7i();A1.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();A1.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function L7i(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(L7i,"useColors");function F7i(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+d3e.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(F7i,"formatArgs");A1.log=console.debug||console.log||(()=>{});function U7i(t){try{t?A1.storage.setItem("debug",t):A1.storage.removeItem("debug")}catch{}}a(U7i,"save");function Q7i(){let t;try{t=A1.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(Q7i,"load");function q7i(){try{return localStorage}catch{}}a(q7i,"localstorage");d3e.exports=eTt()(A1);var{formatters:G7i}=d3e.exports;G7i.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var W3r=T((Zqc,V3r)=>{"use strict";f();V3r.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return n!==-1&&(o===-1||n{"use strict";f();var H7i=require("os"),z3r=require("tty"),rT=W3r(),{env:Kp}=process,P8;rT("no-color")||rT("no-colors")||rT("color=false")||rT("color=never")?P8=0:(rT("color")||rT("colors")||rT("color=true")||rT("color=always"))&&(P8=1);"FORCE_COLOR"in Kp&&(Kp.FORCE_COLOR==="true"?P8=1:Kp.FORCE_COLOR==="false"?P8=0:P8=Kp.FORCE_COLOR.length===0?1:Math.min(parseInt(Kp.FORCE_COLOR,10),3));function tTt(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}a(tTt,"translateLevel");function rTt(t,e){if(P8===0)return 0;if(rT("color=16m")||rT("color=full")||rT("color=truecolor"))return 3;if(rT("color=256"))return 2;if(t&&!e&&P8===void 0)return 0;let r=P8||0;if(Kp.TERM==="dumb")return r;if(process.platform==="win32"){let n=H7i.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Kp)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Kp)||Kp.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Kp)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Kp.TEAMCITY_VERSION)?1:0;if(Kp.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Kp){let n=parseInt((Kp.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Kp.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Kp.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Kp.TERM)||"COLORTERM"in Kp?1:r}a(rTt,"supportsColor");function j7i(t){let e=rTt(t,t&&t.isTTY);return tTt(e)}a(j7i,"getSupportLevel");Y3r.exports={supportsColor:j7i,stdout:tTt(rTt(!0,z3r.isatty(1))),stderr:tTt(rTt(!0,z3r.isatty(2)))}});var J3r=T((am,h3e)=>{f();var $7i=require("tty"),p3e=require("util");am.init=X7i;am.log=Y7i;am.formatArgs=W7i;am.save=K7i;am.load=J7i;am.useColors=V7i;am.destroy=p3e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");am.colors=[6,2,3,4,5,1];try{let t=f3e();t&&(t.stderr||t).level>=2&&(am.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}am.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function V7i(){return"colors"in am.inspectOpts?!!am.inspectOpts.colors:$7i.isatty(process.stderr.fd)}a(V7i,"useColors");function W7i(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` `).join(` -`+s),t.push(o+"m+"+oLe.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=WFi()+e+" "+t[0]}a(VFi,"formatArgs");function WFi(){return Am.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(WFi,"getDate");function zFi(...t){return process.stderr.write(iLe.format(...t)+` -`)}a(zFi,"log");function YFi(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(YFi,"save");function KFi(){return process.env.DEBUG}a(KFi,"load");function JFi(t){t.inspectOpts={};let e=Object.keys(Am.inspectOpts);for(let r=0;re.trim()).join(" ")};XBr.O=function(t){return this.inspectOpts.colors=this.useColors,iLe.inspect(t,this.inspectOpts)}});var Sx=T(($Uc,Lbt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Lbt.exports=WBr():Lbt.exports=ZBr()});var r3r=T(jE=>{"use strict";f();var XFi=jE&&jE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ZFi=jE&&jE.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),e3r=jE&&jE.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&XFi(e,t,r);return ZFi(e,t),e};Object.defineProperty(jE,"__esModule",{value:!0});jE.req=jE.json=jE.toBuffer=void 0;var e9i=e3r(require("http")),t9i=e3r(require("https"));async function t3r(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}a(t3r,"toBuffer");jE.toBuffer=t3r;async function r9i(t){let r=(await t3r(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}a(r9i,"json");jE.json=r9i;function n9i(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?t9i:e9i).request(t,e),o=new Promise((s,c)=>{n.once("response",s).once("error",c).end()});return n.then=o.then.bind(o),n}a(n9i,"req");jE.req=n9i});var Ubt=T(k1=>{"use strict";f();var i3r=k1&&k1.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),i9i=k1&&k1.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),o3r=k1&&k1.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&i3r(e,t,r);return i9i(e,t),e},o9i=k1&&k1.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&i3r(e,t,r)};Object.defineProperty(k1,"__esModule",{value:!0});k1.Agent=void 0;var s9i=o3r(require("net")),n3r=o3r(require("http")),a9i=require("https");o9i(r3r(),k1);var OP=Symbol("AgentBaseInternalState"),Fbt=class extends n3r.Agent{static{a(this,"Agent")}constructor(e){super(e),this[OP]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` -`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new s9i.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?a9i.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),c=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(l=>{if(this.decrementSockets(s,c),l instanceof n3r.Agent)return l.addRequest(e,o);this[OP].currentSocket=l,super.createSocket(e,r,n)},l=>{this.decrementSockets(s,c),n(l)})}createConnection(){let e=this[OP].currentSocket;if(this[OP].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[OP].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[OP]&&(this[OP].defaultPort=e)}get protocol(){return this[OP].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[OP]&&(this[OP].protocol=e)}};k1.Agent=Fbt});var s3r=T(sre=>{"use strict";f();var c9i=sre&&sre.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sre,"__esModule",{value:!0});sre.parseProxyResponse=void 0;var l9i=c9i(Sx()),sLe=(0,l9i.default)("https-proxy-agent:parse-proxy-response");function u9i(t){return new Promise((e,r)=>{let n=0,o=[];function s(){let p=t.read();p?d(p):t.once("readable",s)}a(s,"read");function c(){t.removeListener("end",l),t.removeListener("error",u),t.removeListener("readable",s)}a(c,"cleanup");function l(){c(),sLe("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}a(l,"onend");function u(p){c(),sLe("onerror %o",p),r(p)}a(u,"onerror");function d(p){o.push(p),n+=p.length;let h=Buffer.concat(o,n),m=h.indexOf(`\r +`+s),t.push(o+"m+"+h3e.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=z7i()+e+" "+t[0]}a(W7i,"formatArgs");function z7i(){return am.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(z7i,"getDate");function Y7i(...t){return process.stderr.write(p3e.format(...t)+` +`)}a(Y7i,"log");function K7i(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(K7i,"save");function J7i(){return process.env.DEBUG}a(J7i,"load");function X7i(t){t.inspectOpts={};let e=Object.keys(am.inspectOpts);for(let r=0;re.trim()).join(" ")};K3r.O=function(t){return this.inspectOpts.colors=this.useColors,p3e.inspect(t,this.inspectOpts)}});var hx=T((sGc,nTt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nTt.exports=$3r():nTt.exports=J3r()});var eLr=T(NE=>{"use strict";f();var Z7i=NE&&NE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eUi=NE&&NE.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),X3r=NE&&NE.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Z7i(e,t,r);return eUi(e,t),e};Object.defineProperty(NE,"__esModule",{value:!0});NE.req=NE.json=NE.toBuffer=void 0;var tUi=X3r(require("http")),rUi=X3r(require("https"));async function Z3r(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}a(Z3r,"toBuffer");NE.toBuffer=Z3r;async function nUi(t){let r=(await Z3r(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}a(nUi,"json");NE.json=nUi;function iUi(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?rUi:tUi).request(t,e),o=new Promise((s,c)=>{n.once("response",s).once("error",c).end()});return n.then=o.then.bind(o),n}a(iUi,"req");NE.req=iUi});var oTt=T(y1=>{"use strict";f();var rLr=y1&&y1.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oUi=y1&&y1.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nLr=y1&&y1.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rLr(e,t,r);return oUi(e,t),e},sUi=y1&&y1.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rLr(e,t,r)};Object.defineProperty(y1,"__esModule",{value:!0});y1.Agent=void 0;var aUi=nLr(require("net")),tLr=nLr(require("http")),cUi=require("https");sUi(eLr(),y1);var bP=Symbol("AgentBaseInternalState"),iTt=class extends tLr.Agent{static{a(this,"Agent")}constructor(e){super(e),this[bP]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` +`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new aUi.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?cUi.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),c=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(l=>{if(this.decrementSockets(s,c),l instanceof tLr.Agent)return l.addRequest(e,o);this[bP].currentSocket=l,super.createSocket(e,r,n)},l=>{this.decrementSockets(s,c),n(l)})}createConnection(){let e=this[bP].currentSocket;if(this[bP].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[bP].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[bP]&&(this[bP].defaultPort=e)}get protocol(){return this[bP].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[bP]&&(this[bP].protocol=e)}};y1.Agent=iTt});var iLr=T(Cte=>{"use strict";f();var lUi=Cte&&Cte.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cte,"__esModule",{value:!0});Cte.parseProxyResponse=void 0;var uUi=lUi(hx()),m3e=(0,uUi.default)("https-proxy-agent:parse-proxy-response");function dUi(t){return new Promise((e,r)=>{let n=0,o=[];function s(){let p=t.read();p?d(p):t.once("readable",s)}a(s,"read");function c(){t.removeListener("end",l),t.removeListener("error",u),t.removeListener("readable",s)}a(c,"cleanup");function l(){c(),m3e("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}a(l,"onend");function u(p){c(),m3e("onerror %o",p),r(p)}a(u,"onerror");function d(p){o.push(p),n+=p.length;let h=Buffer.concat(o,n),m=h.indexOf(`\r \r -`);if(m===-1){sLe("have not received end of HTTP headers yet..."),s();return}let g=h.slice(0,m).toString("ascii").split(`\r -`),A=g.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let y=A.split(" "),E=+y[1],_=y.slice(2).join(" "),v={};for(let b of g){if(!b)continue;let I=b.indexOf(":");if(I===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${b}"`));let x=b.slice(0,I).toLowerCase(),R=b.slice(I+1).trimStart(),w=v[x];typeof w=="string"?v[x]=[w,R]:Array.isArray(w)?w.push(R):v[x]=R}sLe("got proxy server response: %o %o",A,v),c(),e({connect:{statusCode:E,statusText:_,headers:v},buffered:h})}a(d,"ondata"),t.on("error",u),t.on("end",l),s()})}a(u9i,"parseProxyResponse");sre.parseProxyResponse=u9i});var qbt=T(hT=>{"use strict";f();var d9i=hT&&hT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),f9i=hT&&hT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),l3r=hT&&hT.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&d9i(e,t,r);return f9i(e,t),e},u3r=hT&&hT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hT,"__esModule",{value:!0});hT.HttpsProxyAgent=void 0;var Qbt=l3r(require("net")),a3r=l3r(require("tls")),p9i=u3r(require("assert")),h9i=u3r(Sx()),m9i=Ubt(),g9i=require("url"),A9i=s3r(),DAe=(0,h9i.default)("https-proxy-agent"),aLe=class extends m9i.Agent{static{a(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new g9i.URL(e):e,this.proxyHeaders=r?.headers??{},DAe("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?c3r(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;if(n.protocol==="https:"){DAe("Creating `tls.Socket`: %o",this.connectOpts);let m=this.connectOpts.servername||this.connectOpts.host;o=a3r.connect({...this.connectOpts,servername:m})}else DAe("Creating `net.Socket`: %o",this.connectOpts),o=Qbt.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=Qbt.isIPv6(r.host)?`[${r.host}]`:r.host,l=`CONNECT ${c}:${r.port} HTTP/1.1\r +`);if(m===-1){m3e("have not received end of HTTP headers yet..."),s();return}let g=h.slice(0,m).toString("ascii").split(`\r +`),A=g.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let y=A.split(" "),E=+y[1],_=y.slice(2).join(" "),v={};for(let b of g){if(!b)continue;let I=b.indexOf(":");if(I===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${b}"`));let x=b.slice(0,I).toLowerCase(),w=b.slice(I+1).trimStart(),R=v[x];typeof R=="string"?v[x]=[R,w]:Array.isArray(R)?R.push(w):v[x]=w}m3e("got proxy server response: %o %o",A,v),c(),e({connect:{statusCode:E,statusText:_,headers:v},buffered:h})}a(d,"ondata"),t.on("error",u),t.on("end",l),s()})}a(dUi,"parseProxyResponse");Cte.parseProxyResponse=dUi});var aTt=T(nT=>{"use strict";f();var fUi=nT&&nT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pUi=nT&&nT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aLr=nT&&nT.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fUi(e,t,r);return pUi(e,t),e},cLr=nT&&nT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nT,"__esModule",{value:!0});nT.HttpsProxyAgent=void 0;var sTt=aLr(require("net")),oLr=aLr(require("tls")),hUi=cLr(require("assert")),mUi=cLr(hx()),gUi=oTt(),AUi=require("url"),yUi=iLr(),kge=(0,mUi.default)("https-proxy-agent"),g3e=class extends gUi.Agent{static{a(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new AUi.URL(e):e,this.proxyHeaders=r?.headers??{},kge("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?sLr(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;if(n.protocol==="https:"){kge("Creating `tls.Socket`: %o",this.connectOpts);let m=this.connectOpts.servername||this.connectOpts.host;o=oLr.connect({...this.connectOpts,servername:m})}else kge("Creating `net.Socket`: %o",this.connectOpts),o=sTt.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=sTt.isIPv6(r.host)?`[${r.host}]`:r.host,l=`CONNECT ${c}:${r.port} HTTP/1.1\r `;if(n.username||n.password){let m=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}s.Host=`${c}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(s))l+=`${m}: ${s[m]}\r -`;let u=(0,A9i.parseProxyResponse)(o);o.write(`${l}\r -`);let{connect:d,buffered:p}=await u;if(e.emit("proxyConnect",d),this.emit("proxyConnect",d,e),d.statusCode===200){if(e.once("socket",y9i),r.secureEndpoint){DAe("Upgrading socket connection to TLS");let m=r.servername||r.host;return a3r.connect({...c3r(r,"host","path","port"),socket:o,servername:m})}return o}o.destroy();let h=new Qbt.Socket({writable:!1});return h.readable=!0,e.once("socket",m=>{DAe("Replaying proxy buffer for failed request"),(0,p9i.default)(m.listenerCount("data")>0),m.push(p),m.push(null)}),h}};aLe.protocols=["http","https"];hT.HttpsProxyAgent=aLe;function y9i(t){t.resume()}a(y9i,"resume");function c3r(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}a(c3r,"omit")});var Gbt=T(mT=>{"use strict";f();var E9i=mT&&mT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),C9i=mT&&mT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),f3r=mT&&mT.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&E9i(e,t,r);return C9i(e,t),e},_9i=mT&&mT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mT,"__esModule",{value:!0});mT.HttpProxyAgent=void 0;var v9i=f3r(require("net")),b9i=f3r(require("tls")),T9i=_9i(Sx()),S9i=require("events"),I9i=Ubt(),d3r=require("url"),are=(0,T9i.default)("http-proxy-agent"),cLe=class extends I9i.Agent{static{a(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new d3r.URL(e):e,this.proxyHeaders=r?.headers??{},are("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?x9i(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",c=`${o}//${s}`,l=new d3r.URL(e.path,c);r.port!==80&&(l.port=String(r.port)),e.path=String(l);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(u)){let p=u[d];p&&e.setHeader(d,p)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,o;are("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(are("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r +`;let u=(0,yUi.parseProxyResponse)(o);o.write(`${l}\r +`);let{connect:d,buffered:p}=await u;if(e.emit("proxyConnect",d),this.emit("proxyConnect",d,e),d.statusCode===200){if(e.once("socket",EUi),r.secureEndpoint){kge("Upgrading socket connection to TLS");let m=r.servername||r.host;return oLr.connect({...sLr(r,"host","path","port"),socket:o,servername:m})}return o}o.destroy();let h=new sTt.Socket({writable:!1});return h.readable=!0,e.once("socket",m=>{kge("Replaying proxy buffer for failed request"),(0,hUi.default)(m.listenerCount("data")>0),m.push(p),m.push(null)}),h}};g3e.protocols=["http","https"];nT.HttpsProxyAgent=g3e;function EUi(t){t.resume()}a(EUi,"resume");function sLr(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}a(sLr,"omit")});var cTt=T(iT=>{"use strict";f();var _Ui=iT&&iT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),CUi=iT&&iT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uLr=iT&&iT.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&_Ui(e,t,r);return CUi(e,t),e},vUi=iT&&iT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iT,"__esModule",{value:!0});iT.HttpProxyAgent=void 0;var bUi=uLr(require("net")),TUi=uLr(require("tls")),SUi=vUi(hx()),IUi=require("events"),xUi=oTt(),lLr=require("url"),vte=(0,SUi.default)("http-proxy-agent"),A3e=class extends xUi.Agent{static{a(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new lLr.URL(e):e,this.proxyHeaders=r?.headers??{},vte("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?wUi(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",c=`${o}//${s}`,l=new lLr.URL(e.path,c);r.port!==80&&(l.port=String(r.port)),e.path=String(l);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(u)){let p=u[d];p&&e.setHeader(d,p)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,o;vte("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(vte("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r \r -`)+4,e.outputData[0].data=e._header+n.substring(o),are("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(are("Creating `tls.Socket`: %o",this.connectOpts),s=b9i.connect(this.connectOpts)):(are("Creating `net.Socket`: %o",this.connectOpts),s=v9i.connect(this.connectOpts)),await(0,S9i.once)(s,"connect"),s}};cLe.protocols=["http","https"];mT.HttpProxyAgent=cLe;function x9i(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}a(x9i,"omit")});var i6={};Ri(i6,{__addDisposableResource:()=>q3r,__assign:()=>hLe,__asyncDelegator:()=>M3r,__asyncGenerator:()=>MAe,__asyncValues:()=>ALe,__await:()=>N1,__awaiter:()=>w3r,__classPrivateFieldGet:()=>F3r,__classPrivateFieldIn:()=>Q3r,__classPrivateFieldSet:()=>U3r,__createBinding:()=>gLe,__decorate:()=>_3r,__disposeResources:()=>G3r,__esDecorate:()=>b3r,__exportStar:()=>P3r,__extends:()=>E3r,__generator:()=>R3r,__importDefault:()=>L3r,__importStar:()=>B3r,__makeTemplateObject:()=>O3r,__metadata:()=>x3r,__param:()=>v3r,__propKey:()=>S3r,__read:()=>zbt,__rest:()=>C3r,__rewriteRelativeImportExtension:()=>H3r,__runInitializers:()=>T3r,__setFunctionName:()=>I3r,__spread:()=>k3r,__spreadArray:()=>D3r,__spreadArrays:()=>N3r,__values:()=>mLe,default:()=>U9i});function E3r(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vbt(t,e);function r(){this.constructor=t}a(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function C3r(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function v3r(t,e){return function(r,n){e(r,n,t)}}function b3r(t,e,r,n,o,s){function c(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}a(c,"accept");for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?n.static?t:t.prototype:null,p=e||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),h,m=!1,g=r.length-1;g>=0;g--){var A={};for(var y in n)A[y]=y==="access"?{}:n[y];for(var y in n.access)A.access[y]=n.access[y];A.addInitializer=function(_){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(c(_||null))};var E=(0,r[g])(l==="accessor"?{get:p.get,set:p.set}:p[u],A);if(l==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(h=c(E.get))&&(p.get=h),(h=c(E.set))&&(p.set=h),(h=c(E.init))&&o.unshift(h)}else(h=c(E))&&(l==="field"?o.unshift(h):p[u]=h)}d&&Object.defineProperty(d,n.name,p),m=!0}function T3r(t,e,r){for(var n=arguments.length>2,o=0;o0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function zbt(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s}function k3r(){for(var t=[],e=0;e1||u(g,y)})},A&&(o[g]=A(o[g])))}function u(g,A){try{d(n[g](A))}catch(y){m(s[0][3],y)}}function d(g){g.value instanceof N1?Promise.resolve(g.value.v).then(p,h):m(s[0][2],g)}function p(g){u("next",g)}function h(g){u("throw",g)}function m(g,A){g(A),s.shift(),s.length&&u(s[0][0],s[0][1])}}function M3r(t){var e,r;return e={},n("next"),n("throw",function(o){throw o}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(o,s){e[o]=t[o]?function(c){return(r=!r)?{value:N1(t[o](c)),done:!1}:s?s(c):c}:s}}function ALe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof mLe=="function"?mLe(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(c){return new Promise(function(l,u){c=t[s](c),o(l,u,c.done,c.value)})}}function o(s,c,l,u){Promise.resolve(u).then(function(d){s({value:d,done:l})},c)}}function O3r(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function B3r(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Wbt(t),n=0;n{f();Vbt=a(function(t,e){return Vbt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Vbt(t,e)},"extendStatics");a(E3r,"__extends");hLe=a(function(){return hLe=Object.assign||a(function(e){for(var r,n=1,o=arguments.length;n{"use strict";f();Object.defineProperty(wLe,"__esModule",{value:!0});wLe.state=void 0;wLe.state={operationRequestMap:new WeakMap}});function Q7i(){try{return _Tt.default.statSync("/.dockerenv"),!0}catch{return!1}}function q7i(){try{return _Tt.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function vTt(){return CTt===void 0&&(CTt=Q7i()||q7i()),CTt}var _Tt,CTt,vLr=Pe(()=>{f();_Tt=de(require("node:fs"),1);a(Q7i,"hasDockerEnv");a(q7i,"hasDockerCGroup");a(vTt,"isDocker")});function dre(){return bTt===void 0&&(bTt=G7i()||vTt()),bTt}var bLr,bTt,G7i,TTt=Pe(()=>{f();bLr=de(require("node:fs"),1);vLr();G7i=a(()=>{try{return bLr.default.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");a(dre,"isInsideContainer")});var STt,SLr,ILr,TLr,c6,ITt=Pe(()=>{f();STt=de(require("node:process"),1),SLr=de(require("node:os"),1),ILr=de(require("node:fs"),1);TTt();TLr=a(()=>{if(STt.default.platform!=="linux")return!1;if(SLr.default.release().toLowerCase().includes("microsoft"))return!dre();try{return ILr.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!dre():!1}catch{return!1}},"isWsl"),c6=STt.default.env.__IS_WSL_TEST__?TLr:TLr()});var xTt,QAe,H7i,j7i,wTt,xLr=Pe(()=>{f();xTt=de(require("node:process"),1),QAe=de(require("node:fs/promises"),1);ITt();ITt();H7i=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await QAe.default.access(r,QAe.constants.F_OK),n=!0}catch{}if(!n)return t;let o=await QAe.default.readFile(r,{encoding:"utf8"}),s=/(?.*)/g.exec(o);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),j7i=a(async()=>`${await H7i()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,"powerShellPathFromWsl"),wTt=a(async()=>c6?j7i():`${xTt.default.env.SYSTEMROOT||xTt.default.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,"powerShellPath")});function l6(t,e,r){let n=a(o=>Object.defineProperty(t,e,{value:o,enumerable:!0,writable:!0}),"define");return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let o=r();return n(o),o},set(o){n(o)}}),t}var wLr=Pe(()=>{f();a(l6,"defineLazyProperty")});async function RTt(){if(PLr.default.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await $7i("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari"}var RLr,PLr,kLr,$7i,NLr=Pe(()=>{f();RLr=require("node:util"),PLr=de(require("node:process"),1),kLr=require("node:child_process"),$7i=(0,RLr.promisify)(kLr.execFile);a(RTt,"defaultBrowserId")});async function OLr(t,{humanReadableOutput:e=!0}={}){if(DLr.default.platform!=="darwin")throw new Error("macOS only");let r=e?[]:["-ss"],{stdout:n}=await V7i("osascript",["-e",t,r]);return n.trim()}var DLr,MLr,PTt,V7i,BLr=Pe(()=>{f();DLr=de(require("node:process"),1),MLr=require("node:util"),PTt=require("node:child_process"),V7i=(0,MLr.promisify)(PTt.execFile);a(OLr,"runAppleScript")});async function kTt(t){return OLr(`tell application "Finder" to set app_path to application file id "${t}" as string -tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var LLr=Pe(()=>{f();BLr();a(kTt,"bundleName")});async function NTt(t=W7i){let{stdout:e}=await t("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?\S+)/.exec(e);if(!r)throw new PLe(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=r.groups,o=z7i[n];if(!o)throw new PLe(`Unknown browser ID: ${n}`);return o}var FLr,ULr,W7i,z7i,PLe,QLr=Pe(()=>{f();FLr=require("node:util"),ULr=require("node:child_process"),W7i=(0,FLr.promisify)(ULr.execFile),z7i={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},PLe=class extends Error{static{a(this,"UnknownBrowserError")}};a(NTt,"defaultBrowser")});async function DTt(){if(kLe.default.platform==="darwin"){let t=await RTt();return{name:await kTt(t),id:t}}if(kLe.default.platform==="linux"){let{stdout:t}=await Y7i("xdg-mime",["query","default","x-scheme-handler/http"]),e=t.trim();return{name:K7i(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(kLe.default.platform==="win32")return NTt();throw new Error("Only macOS, Linux, and Windows are supported")}var qLr,kLe,GLr,Y7i,K7i,HLr=Pe(()=>{f();qLr=require("node:util"),kLe=de(require("node:process"),1),GLr=require("node:child_process");NLr();LLr();QLr();Y7i=(0,qLr.promisify)(GLr.execFile),K7i=a(t=>t.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),"titleize");a(DTt,"defaultBrowser")});var KLr={};Ri(KLr,{apps:()=>u6,default:()=>GAe,openApp:()=>eUi});async function X7i(){let t=await wTt(),e=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,r=BTt.Buffer.from(e,"utf16le").toString("base64"),{stdout:n}=await J7i(t,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",r],{encoding:"utf8"}),o=n.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[o]?{id:s[o]}:{}}function WLr(t){if(typeof t=="string"||Array.isArray(t))return t;let{[$Lr]:e}=t;if(!e)throw new Error(`${$Lr} is not supported`);return e}function DLe({[fre]:t},{wsl:e}){if(e&&c6)return WLr(e);if(!t)throw new Error(`${fre} is not supported`);return WLr(t)}var OTt,BTt,LTt,zLr,YLr,FTt,NLe,J7i,MTt,jLr,fre,$Lr,VLr,qAe,Z7i,eUi,u6,GAe,MLe=Pe(()=>{f();OTt=de(require("node:process"),1),BTt=require("node:buffer"),LTt=de(require("node:path"),1),zLr=require("node:url"),YLr=require("node:util"),FTt=de(require("node:child_process"),1),NLe=de(require("node:fs/promises"),1);xLr();wLr();HLr();TTt();J7i=(0,YLr.promisify)(FTt.default.execFile),MTt=LTt.default.dirname((0,zLr.fileURLToPath)(importMetaUrlShim)),jLr=LTt.default.join(MTt,"xdg-open"),{platform:fre,arch:$Lr}=OTt.default;a(X7i,"getWindowsDefaultBrowserFromWsl");VLr=a(async(t,e)=>{let r;for(let n of t)try{return await e(n)}catch(o){r=o}throw r},"pTryEach"),qAe=a(async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return VLr(t.app,l=>qAe({...t,app:l}));let{name:e,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(e))return VLr(e,l=>qAe({...t,app:{name:l,arguments:r}}));if(e==="browser"||e==="browserPrivate"){let l={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},u={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},d=c6?await X7i():await DTt();if(d.id in l){let p=l[d.id];return e==="browserPrivate"&&r.push(u[p]),qAe({...t,app:{name:u6[p],arguments:r}})}throw new Error(`${d.name} is not supported as a default browser`)}let n,o=[],s={};if(fre==="darwin")n="open",t.wait&&o.push("--wait-apps"),t.background&&o.push("--background"),t.newInstance&&o.push("--new"),e&&o.push("-a",e);else if(fre==="win32"||c6&&!dre()&&!e){n=await wTt(),o.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),c6||(s.windowsVerbatimArguments=!0);let l=["Start"];t.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`),t.target&&r.push(t.target)):t.target&&l.push(`"${t.target}"`),r.length>0&&(r=r.map(u=>`"\`"${u}\`""`),l.push("-ArgumentList",r.join(","))),t.target=BTt.Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let l=!MTt||MTt==="/",u=!1;try{await NLe.default.access(jLr,NLe.constants.X_OK),u=!0}catch{}n=OTt.default.versions.electron??(fre==="android"||l||!u)?"xdg-open":jLr}r.length>0&&o.push(...r),t.wait||(s.stdio="ignore",s.detached=!0)}fre==="darwin"&&r.length>0&&o.push("--args",...r),t.target&&o.push(t.target);let c=FTt.default.spawn(n,o,s);return t.wait?new Promise((l,u)=>{c.once("error",u),c.once("close",d=>{if(!t.allowNonzeroExitCode&&d>0){u(new Error(`Exited with code ${d}`));return}l(c)})}):(c.unref(),c)},"baseOpen"),Z7i=a((t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return qAe({...e,target:t})},"open"),eUi=a((t,e)=>{if(typeof t!="string"&&!Array.isArray(t))throw new TypeError("Expected a valid `name`");let{arguments:r=[]}=e??{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return qAe({...e,app:{name:t,arguments:r}})},"openApp");a(WLr,"detectArchBinary");a(DLe,"detectPlatformBinary");u6={};l6(u6,"chrome",()=>DLe({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));l6(u6,"brave",()=>DLe({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));l6(u6,"firefox",()=>DLe({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));l6(u6,"edge",()=>DLe({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));l6(u6,"browser",()=>"browser");l6(u6,"browserPrivate",()=>"browserPrivate");GAe=Z7i});var T8r=T(qP=>{"use strict";f();Object.defineProperty(qP,"__esModule",{value:!0});qP.bytePairEncode=qP.BinaryMap=qP.binaryMapKey=void 0;var wUi=a((t,e,r)=>{let n=r-e,o=16777215>>>Math.max(0,(3-n)*8),s=(t[e+0]|t[e+1]<<8|t[e+2]<<16)&o,c=16777215>>>Math.min(31,Math.max(0,(6-n)*8)),l=(t[e+3]|t[e+4]<<8|t[e+5]<<16)&c;return s+16777216*l},"binaryMapKey");qP.binaryMapKey=wUi;var eSt=class t{static{a(this,"BinaryMap")}constructor(){this.nested=new Map,this.final=new Map}get(e,r=0,n=e.length){let o=n<6+r,s=(0,qP.binaryMapKey)(e,r,n);return o?this.final.get(s):this.nested.get(s)?.get(e,6+r,n)}set(e,r){let n=(0,qP.binaryMapKey)(e,0,e.length);if(e.length<6){this.final.set(n,r);return}let s=this.nested.get(n);if(s instanceof t)s.set(e.subarray(6),r);else{let c=new t;c.set(e.subarray(6),r),this.nested.set(n,c)}}};qP.BinaryMap=eSt;var QP=new Int32Array(128),iy=new Int32Array(128);function RUi(t,e,r){if(r===1)return[e.get(t)];let n=2147483647,o=-1;for(;QP.length0&&(QP[iy[o-1]]=c(o-1,1));for(let u=o+1;u{"use strict";f();Object.defineProperty(YLe,"__esModule",{value:!0});YLe.makeTextEncoder=void 0;var tSt=class{static{a(this,"UniversalTextEncoder")}constructor(){this.length=0,this.encoder=new TextEncoder}encode(e){let r=this.encoder.encode(e);return this.length=r.length,r}},rSt=class{static{a(this,"NodeTextEncoder")}constructor(){this.buffer=Buffer.alloc(256),this.length=0}encode(e){for(;;){if(this.length=this.buffer.write(e,"utf8"),this.lengthtypeof Buffer<"u"?new rSt:new tSt,"makeTextEncoder");YLe.makeTextEncoder=PUi});var I8r=T(KLe=>{"use strict";f();Object.defineProperty(KLe,"__esModule",{value:!0});KLe.LRUCache=void 0;var nSt=class{static{a(this,"LRUCache")}constructor(e){this.size=e,this.nodes=new Map}get(e){let r=this.nodes.get(e);if(r)return this.moveToHead(r),r.value}set(e,r){let n=this.nodes.get(e);if(n)n.value=r,this.moveToHead(n);else{let o=new iSt(e,r);this.nodes.set(e,o),this.addNode(o),this.nodes.size>this.size&&(this.nodes.delete(this.tail.key),this.removeNode(this.tail))}}moveToHead(e){this.removeNode(e),e.next=void 0,e.prev=void 0,this.addNode(e)}addNode(e){this.head&&(this.head.prev=e,e.next=this.head),this.tail||(this.tail=e),this.head=e}removeNode(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev}};KLe.LRUCache=nSt;var iSt=class{static{a(this,"Node")}constructor(e,r){this.key=e,this.value=r}}});var sSt=T(XLe=>{"use strict";f();Object.defineProperty(XLe,"__esModule",{value:!0});XLe.TikTokenizer=void 0;var JLe=T8r(),kUi=S8r(),NUi=I8r();function DUi(t){let e=new Map;try{let o=require("fs").readFileSync(t,"utf-8");return r(o),e}catch(n){throw new Error(`Failed to load from BPE encoder file stream: ${n}`)}function r(n){for(let o of n.split(/[\r\n]+/)){if(o.trim()==="")continue;let s=o.split(" ");if(s.length!==2)throw new Error("Invalid format in the BPE encoder file stream");let c=new Uint8Array(Buffer.from(s[0],"base64")),l=parseInt(s[1]);if(!isNaN(l))e.set(c,l);else throw new Error(`Can't parse ${s[1]} to integer`)}}a(r,"processBpeRanks")}a(DUi,"loadTikTokenBpe");function MUi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(MUi,"escapeRegExp");var oSt=class{static{a(this,"TikTokenizer")}constructor(e,r,n,o=8192){this.textEncoder=(0,kUi.makeTextEncoder)(),this.textDecoder=new TextDecoder("utf-8"),this.cache=new NUi.LRUCache(o);let s=typeof e=="string"?DUi(e):e;this.init(s,r,n)}init(e,r,n){this.encoder=new JLe.BinaryMap;for(let[o,s]of e)this.encoder.set(o,s);this.regex=new RegExp(n,"gu"),this.specialTokensRegex=new RegExp(Array.from(r.keys()).map(o=>MUi(o)).join("|")),this.specialTokensEncoder=r,this.decoder=new Map;for(let[o,s]of e)this.decoder.set(s,o);if(e.size!==this.decoder.size)throw new Error("Encoder and decoder sizes do not match");this.specialTokensDecoder=new Map;for(let[o,s]of r)this.specialTokensDecoder.set(s,o)}findNextSpecialToken(e,r,n){let o=r,s=null;if(n&&this.specialTokensRegex)for(;s=e.slice(o).match(this.specialTokensRegex),!(!s||n&&n.includes(s[0]));)o+=s.index+1;let c=s?o+s.index:e.length;return[s,c]}encode(e,r){let n=[],o=0;for(;;){let s,c;if([s,c]=this.findNextSpecialToken(e,o,r),c>o&&this.encodeByIndex(e,n,o,c),s){if(o=o+this.encodeSpecialToken(n,s),o>=e.length)break}else break}return n}encodeSpecialToken(e,r){let n=this.specialTokensEncoder?.get(r[0]);return e.push(n),r.index+r[0].length}encodeByIndex(e,r,n,o){let s,c=e.substring(n,o);for(this.regex.lastIndex=0;s=this.regex.exec(c);){let l=this.cache.get(s[0]);if(l)for(let u of l)r.push(u);else{let u=this.textEncoder.encode(s[0]),d=this.encoder.get(u,0,this.textEncoder.length);if(d!==void 0)r.push(d),this.cache.set(s[0],[d]);else{let p=(0,JLe.bytePairEncode)(u,this.encoder,this.textEncoder.length);for(let h of p)r.push(h);this.cache.set(s[0],p)}}}}encodeTrimSuffixByIndex(e,r,n,o,s,c,l){let u,d=e.substring(n,o);for(this.regex.lastIndex=0;u=this.regex.exec(d);){let p=u[0],h=this.cache.get(p);if(h)if(c+h.length<=s)c+=h.length,l+=p.length,r.push(...h);else{let m=s-c;c+=m,l+=p.length,r.push(...h.slice(0,m));break}else{let m=this.textEncoder.encode(p),g=this.encoder.get(m,0,m.length);if(g!==void 0)if(this.cache.set(p,[g]),c+1<=s)c++,l+=p.length,r.push(g);else break;else{let A=(0,JLe.bytePairEncode)(m,this.encoder,this.textEncoder.length);if(this.cache.set(p,A),c+A.length<=s){c+=A.length,l+=p.length;for(let y of A)r.push(y)}else{let y=s-c;c+=y,l+=p.length;for(let E=0;E=s)break}return{tokenCount:c,encodeLength:l}}encodeTrimSuffix(e,r,n){let o=[],s=0,c=0,l=0;for(;;){let d,p;if([d,p]=this.findNextSpecialToken(e,s,n),p>s){let{tokenCount:h,encodeLength:m}=this.encodeTrimSuffixByIndex(e,o,s,p,r,c,l);if(c=h,l=m,c>=r)break}if(d!==null){if(c++,c<=r&&(s=s+this.encodeSpecialToken(o,d),l+=d[0].length,s>=e.length)||c>=r)break}else break}let u=l===e.length?e:e.slice(0,l);return{tokenIds:o,text:u}}encodeTrimPrefix(e,r,n){let o=[],s=0,c=0,l=0,u=new Map;for(u.set(c,l);;){let m,g;if([m,g]=this.findNextSpecialToken(e,s,n),g>s){let A,y=e.substring(s,g);for(this.regex.lastIndex=0;A=this.regex.exec(y);){let E=A[0],_=this.cache.get(E);if(_)c+=_.length,l+=E.length,o.push(..._),u.set(c,l);else{let v=this.textEncoder.encode(E),b=this.encoder.get(v);if(b!==void 0)this.cache.set(E,[b]),c++,l+=E.length,o.push(b),u.set(c,l);else{let I=(0,JLe.bytePairEncode)(v,this.encoder,this.textEncoder.length);this.cache.set(E,I),c+=I.length,l+=E.length;for(let x of I)o.push(x);u.set(c,l)}}}}if(m!==null){if(s=s+this.encodeSpecialToken(o,m),c++,l+=m[0].length,u.set(c,l),s>=e.length)break}else break}if(c<=r)return{tokenIds:o,text:e};let d=c-r,p=0,h=0;for(let[m,g]of u)if(m>=d){p=m,h=g;break}if(p>r){let m=this.encode(e,n),g=m.slice(m.length-r);return{tokenIds:g,text:this.decode(g)}}return{tokenIds:o.slice(p),text:e.slice(h)}}decode(e){let r=[];for(let n of e){let o=[],s=this.decoder?.get(n);if(s!==void 0)o=Array.from(s);else{let c=this.specialTokensDecoder?.get(n);if(c!==void 0){let l=this.textEncoder.encode(c);o=Array.from(l.subarray(0,this.textEncoder.length))}}r.push(...o)}return this.textDecoder.decode(new Uint8Array(r))}};XLe.TikTokenizer=oSt});var B8r=T(a0=>{"use strict";f();Object.defineProperty(a0,"__esModule",{value:!0});a0.createTokenizer=a0.createByEncoderName=a0.createByModelName=a0.getRegexByModel=a0.getRegexByEncoder=a0.getSpecialTokensByModel=a0.getSpecialTokensByEncoder=a0.MODEL_TO_ENCODING=void 0;var OUi=sSt(),BUi=new Map([["gpt-4o-","o200k_base"],["gpt-4-","cl100k_base"],["gpt-3.5-turbo-","cl100k_base"],["gpt-35-turbo-","cl100k_base"]]);a0.MODEL_TO_ENCODING=new Map([["gpt-4o","o200k_base"],["gpt-4","cl100k_base"],["gpt-3.5-turbo","cl100k_base"],["text-davinci-003","p50k_base"],["text-davinci-002","p50k_base"],["text-davinci-001","r50k_base"],["text-curie-001","r50k_base"],["text-babbage-001","r50k_base"],["text-ada-001","r50k_base"],["davinci","r50k_base"],["curie","r50k_base"],["babbage","r50k_base"],["ada","r50k_base"],["code-davinci-002","p50k_base"],["code-davinci-001","p50k_base"],["code-cushman-002","p50k_base"],["code-cushman-001","p50k_base"],["davinci-codex","p50k_base"],["cushman-codex","p50k_base"],["text-davinci-edit-001","p50k_edit"],["code-davinci-edit-001","p50k_edit"],["text-embedding-ada-002","cl100k_base"],["text-similarity-davinci-001","r50k_base"],["text-similarity-curie-001","r50k_base"],["text-similarity-babbage-001","r50k_base"],["text-similarity-ada-001","r50k_base"],["text-search-davinci-doc-001","r50k_base"],["text-search-curie-doc-001","r50k_base"],["text-search-babbage-doc-001","r50k_base"],["text-search-ada-doc-001","r50k_base"],["code-search-babbage-code-001","r50k_base"],["code-search-ada-code-001","r50k_base"],["gpt2","gpt2"]]);var ZLe="<|endoftext|>",x8r="<|fim_prefix|>",w8r="<|fim_middle|>",R8r="<|fim_suffix|>",P8r="<|endofprompt|>",rye="'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+",k8r="(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}{1,3}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",LUi=[`[^\r +`)+4,e.outputData[0].data=e._header+n.substring(o),vte("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(vte("Creating `tls.Socket`: %o",this.connectOpts),s=TUi.connect(this.connectOpts)):(vte("Creating `net.Socket`: %o",this.connectOpts),s=bUi.connect(this.connectOpts)),await(0,IUi.once)(s,"connect"),s}};A3e.protocols=["http","https"];iT.HttpProxyAgent=A3e;function wUi(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}a(wUi,"omit")});var k8={};ui(k8,{__addDisposableResource:()=>ULr,__assign:()=>b3e,__asyncDelegator:()=>DLr,__asyncGenerator:()=>Dge,__asyncValues:()=>I3e,__await:()=>E1,__awaiter:()=>ILr,__classPrivateFieldGet:()=>BLr,__classPrivateFieldIn:()=>FLr,__classPrivateFieldSet:()=>LLr,__createBinding:()=>S3e,__decorate:()=>ELr,__disposeResources:()=>QLr,__esDecorate:()=>CLr,__exportStar:()=>wLr,__extends:()=>ALr,__generator:()=>xLr,__importDefault:()=>OLr,__importStar:()=>MLr,__makeTemplateObject:()=>NLr,__metadata:()=>SLr,__param:()=>_Lr,__propKey:()=>bLr,__read:()=>hTt,__rest:()=>yLr,__rewriteRelativeImportExtension:()=>qLr,__runInitializers:()=>vLr,__setFunctionName:()=>TLr,__spread:()=>RLr,__spreadArray:()=>kLr,__spreadArrays:()=>PLr,__values:()=>T3e,default:()=>QUi});function ALr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fTt(t,e);function r(){this.constructor=t}a(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function yLr(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function _Lr(t,e){return function(r,n){e(r,n,t)}}function CLr(t,e,r,n,o,s){function c(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}a(c,"accept");for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",d=!e&&t?n.static?t:t.prototype:null,p=e||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),h,m=!1,g=r.length-1;g>=0;g--){var A={};for(var y in n)A[y]=y==="access"?{}:n[y];for(var y in n.access)A.access[y]=n.access[y];A.addInitializer=function(_){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(c(_||null))};var E=(0,r[g])(l==="accessor"?{get:p.get,set:p.set}:p[u],A);if(l==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(h=c(E.get))&&(p.get=h),(h=c(E.set))&&(p.set=h),(h=c(E.init))&&o.unshift(h)}else(h=c(E))&&(l==="field"?o.unshift(h):p[u]=h)}d&&Object.defineProperty(d,n.name,p),m=!0}function vLr(t,e,r){for(var n=arguments.length>2,o=0;o0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function hTt(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s}function RLr(){for(var t=[],e=0;e1||u(g,y)})},A&&(o[g]=A(o[g])))}function u(g,A){try{d(n[g](A))}catch(y){m(s[0][3],y)}}function d(g){g.value instanceof E1?Promise.resolve(g.value.v).then(p,h):m(s[0][2],g)}function p(g){u("next",g)}function h(g){u("throw",g)}function m(g,A){g(A),s.shift(),s.length&&u(s[0][0],s[0][1])}}function DLr(t){var e,r;return e={},n("next"),n("throw",function(o){throw o}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(o,s){e[o]=t[o]?function(c){return(r=!r)?{value:E1(t[o](c)),done:!1}:s?s(c):c}:s}}function I3e(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof T3e=="function"?T3e(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(c){return new Promise(function(l,u){c=t[s](c),o(l,u,c.done,c.value)})}}function o(s,c,l,u){Promise.resolve(u).then(function(d){s({value:d,done:l})},c)}}function NLr(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function MLr(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=pTt(t),n=0;n{f();fTt=a(function(t,e){return fTt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},fTt(t,e)},"extendStatics");a(ALr,"__extends");b3e=a(function(){return b3e=Object.assign||a(function(e){for(var r,n=1,o=arguments.length;n{"use strict";f();Object.defineProperty(L3e,"__esModule",{value:!0});L3e.state=void 0;L3e.state={operationRequestMap:new WeakMap}});function qQi(){try{return qTt.default.statSync("/.dockerenv"),!0}catch{return!1}}function GQi(){try{return qTt.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function GTt(){return QTt===void 0&&(QTt=qQi()||GQi()),QTt}var qTt,QTt,_8r=Pe(()=>{f();qTt=de(require("node:fs"),1);a(qQi,"hasDockerEnv");a(GQi,"hasDockerCGroup");a(GTt,"isDocker")});function Ite(){return HTt===void 0&&(HTt=HQi()||GTt()),HTt}var C8r,HTt,HQi,jTt=Pe(()=>{f();C8r=de(require("node:fs"),1);_8r();HQi=a(()=>{try{return C8r.default.statSync("/run/.containerenv"),!0}catch{return!1}},"hasContainerEnv");a(Ite,"isInsideContainer")});var $Tt,b8r,T8r,v8r,O8,VTt=Pe(()=>{f();$Tt=de(require("node:process"),1),b8r=de(require("node:os"),1),T8r=de(require("node:fs"),1);jTt();v8r=a(()=>{if($Tt.default.platform!=="linux")return!1;if(b8r.default.release().toLowerCase().includes("microsoft"))return!Ite();try{return T8r.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Ite():!1}catch{return!1}},"isWsl"),O8=$Tt.default.env.__IS_WSL_TEST__?v8r:v8r()});var WTt,Fge,jQi,$Qi,zTt,S8r=Pe(()=>{f();WTt=de(require("node:process"),1),Fge=de(require("node:fs/promises"),1);VTt();VTt();jQi=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await Fge.default.access(r,Fge.constants.F_OK),n=!0}catch{}if(!n)return t;let o=await Fge.default.readFile(r,{encoding:"utf8"}),s=/(?.*)/g.exec(o);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),$Qi=a(async()=>`${await jQi()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,"powerShellPathFromWsl"),zTt=a(async()=>O8?$Qi():`${WTt.default.env.SYSTEMROOT||WTt.default.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,"powerShellPath")});function B8(t,e,r){let n=a(o=>Object.defineProperty(t,e,{value:o,enumerable:!0,writable:!0}),"define");return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let o=r();return n(o),o},set(o){n(o)}}),t}var I8r=Pe(()=>{f();a(B8,"defineLazyProperty")});async function YTt(){if(w8r.default.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await VQi("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari"}var x8r,w8r,R8r,VQi,P8r=Pe(()=>{f();x8r=require("node:util"),w8r=de(require("node:process"),1),R8r=require("node:child_process"),VQi=(0,x8r.promisify)(R8r.execFile);a(YTt,"defaultBrowserId")});async function N8r(t,{humanReadableOutput:e=!0}={}){if(k8r.default.platform!=="darwin")throw new Error("macOS only");let r=e?[]:["-ss"],{stdout:n}=await WQi("osascript",["-e",t,r]);return n.trim()}var k8r,D8r,KTt,WQi,M8r=Pe(()=>{f();k8r=de(require("node:process"),1),D8r=require("node:util"),KTt=require("node:child_process"),WQi=(0,D8r.promisify)(KTt.execFile);a(N8r,"runAppleScript")});async function JTt(t){return N8r(`tell application "Finder" to set app_path to application file id "${t}" as string +tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var O8r=Pe(()=>{f();M8r();a(JTt,"bundleName")});async function XTt(t=zQi){let{stdout:e}=await t("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?\S+)/.exec(e);if(!r)throw new U3e(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=r.groups,o=YQi[n];if(!o)throw new U3e(`Unknown browser ID: ${n}`);return o}var B8r,L8r,zQi,YQi,U3e,F8r=Pe(()=>{f();B8r=require("node:util"),L8r=require("node:child_process"),zQi=(0,B8r.promisify)(L8r.execFile),YQi={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},U3e=class extends Error{static{a(this,"UnknownBrowserError")}};a(XTt,"defaultBrowser")});async function ZTt(){if(Q3e.default.platform==="darwin"){let t=await YTt();return{name:await JTt(t),id:t}}if(Q3e.default.platform==="linux"){let{stdout:t}=await KQi("xdg-mime",["query","default","x-scheme-handler/http"]),e=t.trim();return{name:JQi(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(Q3e.default.platform==="win32")return XTt();throw new Error("Only macOS, Linux, and Windows are supported")}var U8r,Q3e,Q8r,KQi,JQi,q8r=Pe(()=>{f();U8r=require("node:util"),Q3e=de(require("node:process"),1),Q8r=require("node:child_process");P8r();O8r();F8r();KQi=(0,U8r.promisify)(Q8r.execFile),JQi=a(t=>t.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),"titleize");a(ZTt,"defaultBrowser")});var z8r={};ui(z8r,{apps:()=>L8,default:()=>Qge,openApp:()=>tqi});async function ZQi(){let t=await zTt(),e=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,r=rSt.Buffer.from(e,"utf16le").toString("base64"),{stdout:n}=await XQi(t,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",r],{encoding:"utf8"}),o=n.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[o]?{id:s[o]}:{}}function $8r(t){if(typeof t=="string"||Array.isArray(t))return t;let{[H8r]:e}=t;if(!e)throw new Error(`${H8r} is not supported`);return e}function G3e({[xte]:t},{wsl:e}){if(e&&O8)return $8r(e);if(!t)throw new Error(`${xte} is not supported`);return $8r(t)}var tSt,rSt,nSt,V8r,W8r,iSt,q3e,XQi,eSt,G8r,xte,H8r,j8r,Uge,eqi,tqi,L8,Qge,H3e=Pe(()=>{f();tSt=de(require("node:process"),1),rSt=require("node:buffer"),nSt=de(require("node:path"),1),V8r=require("node:url"),W8r=require("node:util"),iSt=de(require("node:child_process"),1),q3e=de(require("node:fs/promises"),1);S8r();I8r();q8r();jTt();XQi=(0,W8r.promisify)(iSt.default.execFile),eSt=nSt.default.dirname((0,V8r.fileURLToPath)(importMetaUrlShim)),G8r=nSt.default.join(eSt,"xdg-open"),{platform:xte,arch:H8r}=tSt.default;a(ZQi,"getWindowsDefaultBrowserFromWsl");j8r=a(async(t,e)=>{let r;for(let n of t)try{return await e(n)}catch(o){r=o}throw r},"pTryEach"),Uge=a(async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return j8r(t.app,l=>Uge({...t,app:l}));let{name:e,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(e))return j8r(e,l=>Uge({...t,app:{name:l,arguments:r}}));if(e==="browser"||e==="browserPrivate"){let l={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},u={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},d=O8?await ZQi():await ZTt();if(d.id in l){let p=l[d.id];return e==="browserPrivate"&&r.push(u[p]),Uge({...t,app:{name:L8[p],arguments:r}})}throw new Error(`${d.name} is not supported as a default browser`)}let n,o=[],s={};if(xte==="darwin")n="open",t.wait&&o.push("--wait-apps"),t.background&&o.push("--background"),t.newInstance&&o.push("--new"),e&&o.push("-a",e);else if(xte==="win32"||O8&&!Ite()&&!e){n=await zTt(),o.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),O8||(s.windowsVerbatimArguments=!0);let l=["Start"];t.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`),t.target&&r.push(t.target)):t.target&&l.push(`"${t.target}"`),r.length>0&&(r=r.map(u=>`"\`"${u}\`""`),l.push("-ArgumentList",r.join(","))),t.target=rSt.Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let l=!eSt||eSt==="/",u=!1;try{await q3e.default.access(G8r,q3e.constants.X_OK),u=!0}catch{}n=tSt.default.versions.electron??(xte==="android"||l||!u)?"xdg-open":G8r}r.length>0&&o.push(...r),t.wait||(s.stdio="ignore",s.detached=!0)}xte==="darwin"&&r.length>0&&o.push("--args",...r),t.target&&o.push(t.target);let c=iSt.default.spawn(n,o,s);return t.wait?new Promise((l,u)=>{c.once("error",u),c.once("close",d=>{if(!t.allowNonzeroExitCode&&d>0){u(new Error(`Exited with code ${d}`));return}l(c)})}):(c.unref(),c)},"baseOpen"),eqi=a((t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return Uge({...e,target:t})},"open"),tqi=a((t,e)=>{if(typeof t!="string"&&!Array.isArray(t))throw new TypeError("Expected a valid `name`");let{arguments:r=[]}=e??{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return Uge({...e,app:{name:t,arguments:r}})},"openApp");a($8r,"detectArchBinary");a(G3e,"detectPlatformBinary");L8={};B8(L8,"chrome",()=>G3e({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));B8(L8,"brave",()=>G3e({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));B8(L8,"firefox",()=>G3e({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));B8(L8,"edge",()=>G3e({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));B8(L8,"browser",()=>"browser");B8(L8,"browserPrivate",()=>"browserPrivate");Qge=eqi});var b6r=T(RP=>{"use strict";f();Object.defineProperty(RP,"__esModule",{value:!0});RP.bytePairEncode=RP.BinaryMap=RP.binaryMapKey=void 0;var Rqi=a((t,e,r)=>{let n=r-e,o=16777215>>>Math.max(0,(3-n)*8),s=(t[e+0]|t[e+1]<<8|t[e+2]<<16)&o,c=16777215>>>Math.min(31,Math.max(0,(6-n)*8)),l=(t[e+3]|t[e+4]<<8|t[e+5]<<16)&c;return s+16777216*l},"binaryMapKey");RP.binaryMapKey=Rqi;var _St=class t{static{a(this,"BinaryMap")}constructor(){this.nested=new Map,this.final=new Map}get(e,r=0,n=e.length){let o=n<6+r,s=(0,RP.binaryMapKey)(e,r,n);return o?this.final.get(s):this.nested.get(s)?.get(e,6+r,n)}set(e,r){let n=(0,RP.binaryMapKey)(e,0,e.length);if(e.length<6){this.final.set(n,r);return}let s=this.nested.get(n);if(s instanceof t)s.set(e.subarray(6),r);else{let c=new t;c.set(e.subarray(6),r),this.nested.set(n,c)}}};RP.BinaryMap=_St;var wP=new Int32Array(128),YA=new Int32Array(128);function Pqi(t,e,r){if(r===1)return[e.get(t)];let n=2147483647,o=-1;for(;wP.length0&&(wP[YA[o-1]]=c(o-1,1));for(let u=o+1;u{"use strict";f();Object.defineProperty(nLe,"__esModule",{value:!0});nLe.makeTextEncoder=void 0;var CSt=class{static{a(this,"UniversalTextEncoder")}constructor(){this.length=0,this.encoder=new TextEncoder}encode(e){let r=this.encoder.encode(e);return this.length=r.length,r}},vSt=class{static{a(this,"NodeTextEncoder")}constructor(){this.buffer=Buffer.alloc(256),this.length=0}encode(e){for(;;){if(this.length=this.buffer.write(e,"utf8"),this.lengthtypeof Buffer<"u"?new vSt:new CSt,"makeTextEncoder");nLe.makeTextEncoder=kqi});var S6r=T(iLe=>{"use strict";f();Object.defineProperty(iLe,"__esModule",{value:!0});iLe.LRUCache=void 0;var bSt=class{static{a(this,"LRUCache")}constructor(e){this.size=e,this.nodes=new Map}get(e){let r=this.nodes.get(e);if(r)return this.moveToHead(r),r.value}set(e,r){let n=this.nodes.get(e);if(n)n.value=r,this.moveToHead(n);else{let o=new TSt(e,r);this.nodes.set(e,o),this.addNode(o),this.nodes.size>this.size&&(this.nodes.delete(this.tail.key),this.removeNode(this.tail))}}moveToHead(e){this.removeNode(e),e.next=void 0,e.prev=void 0,this.addNode(e)}addNode(e){this.head&&(this.head.prev=e,e.next=this.head),this.tail||(this.tail=e),this.head=e}removeNode(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev}};iLe.LRUCache=bSt;var TSt=class{static{a(this,"Node")}constructor(e,r){this.key=e,this.value=r}}});var ISt=T(sLe=>{"use strict";f();Object.defineProperty(sLe,"__esModule",{value:!0});sLe.TikTokenizer=void 0;var oLe=b6r(),Dqi=T6r(),Nqi=S6r();function Mqi(t){let e=new Map;try{let o=require("fs").readFileSync(t,"utf-8");return r(o),e}catch(n){throw new Error(`Failed to load from BPE encoder file stream: ${n}`)}function r(n){for(let o of n.split(/[\r\n]+/)){if(o.trim()==="")continue;let s=o.split(" ");if(s.length!==2)throw new Error("Invalid format in the BPE encoder file stream");let c=new Uint8Array(Buffer.from(s[0],"base64")),l=parseInt(s[1]);if(!isNaN(l))e.set(c,l);else throw new Error(`Can't parse ${s[1]} to integer`)}}a(r,"processBpeRanks")}a(Mqi,"loadTikTokenBpe");function Oqi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Oqi,"escapeRegExp");var SSt=class{static{a(this,"TikTokenizer")}constructor(e,r,n,o=8192){this.textEncoder=(0,Dqi.makeTextEncoder)(),this.textDecoder=new TextDecoder("utf-8"),this.cache=new Nqi.LRUCache(o);let s=typeof e=="string"?Mqi(e):e;this.init(s,r,n)}init(e,r,n){this.encoder=new oLe.BinaryMap;for(let[o,s]of e)this.encoder.set(o,s);this.regex=new RegExp(n,"gu"),this.specialTokensRegex=new RegExp(Array.from(r.keys()).map(o=>Oqi(o)).join("|")),this.specialTokensEncoder=r,this.decoder=new Map;for(let[o,s]of e)this.decoder.set(s,o);if(e.size!==this.decoder.size)throw new Error("Encoder and decoder sizes do not match");this.specialTokensDecoder=new Map;for(let[o,s]of r)this.specialTokensDecoder.set(s,o)}findNextSpecialToken(e,r,n){let o=r,s=null;if(n&&this.specialTokensRegex)for(;s=e.slice(o).match(this.specialTokensRegex),!(!s||n&&n.includes(s[0]));)o+=s.index+1;let c=s?o+s.index:e.length;return[s,c]}encode(e,r){let n=[],o=0;for(;;){let s,c;if([s,c]=this.findNextSpecialToken(e,o,r),c>o&&this.encodeByIndex(e,n,o,c),s){if(o=o+this.encodeSpecialToken(n,s),o>=e.length)break}else break}return n}encodeSpecialToken(e,r){let n=this.specialTokensEncoder?.get(r[0]);return e.push(n),r.index+r[0].length}encodeByIndex(e,r,n,o){let s,c=e.substring(n,o);for(this.regex.lastIndex=0;s=this.regex.exec(c);){let l=this.cache.get(s[0]);if(l)for(let u of l)r.push(u);else{let u=this.textEncoder.encode(s[0]),d=this.encoder.get(u,0,this.textEncoder.length);if(d!==void 0)r.push(d),this.cache.set(s[0],[d]);else{let p=(0,oLe.bytePairEncode)(u,this.encoder,this.textEncoder.length);for(let h of p)r.push(h);this.cache.set(s[0],p)}}}}encodeTrimSuffixByIndex(e,r,n,o,s,c,l){let u,d=e.substring(n,o);for(this.regex.lastIndex=0;u=this.regex.exec(d);){let p=u[0],h=this.cache.get(p);if(h)if(c+h.length<=s)c+=h.length,l+=p.length,r.push(...h);else{let m=s-c;c+=m,l+=p.length,r.push(...h.slice(0,m));break}else{let m=this.textEncoder.encode(p),g=this.encoder.get(m,0,m.length);if(g!==void 0)if(this.cache.set(p,[g]),c+1<=s)c++,l+=p.length,r.push(g);else break;else{let A=(0,oLe.bytePairEncode)(m,this.encoder,this.textEncoder.length);if(this.cache.set(p,A),c+A.length<=s){c+=A.length,l+=p.length;for(let y of A)r.push(y)}else{let y=s-c;c+=y,l+=p.length;for(let E=0;E=s)break}return{tokenCount:c,encodeLength:l}}encodeTrimSuffix(e,r,n){let o=[],s=0,c=0,l=0;for(;;){let d,p;if([d,p]=this.findNextSpecialToken(e,s,n),p>s){let{tokenCount:h,encodeLength:m}=this.encodeTrimSuffixByIndex(e,o,s,p,r,c,l);if(c=h,l=m,c>=r)break}if(d!==null){if(c++,c<=r&&(s=s+this.encodeSpecialToken(o,d),l+=d[0].length,s>=e.length)||c>=r)break}else break}let u=l===e.length?e:e.slice(0,l);return{tokenIds:o,text:u}}encodeTrimPrefix(e,r,n){let o=[],s=0,c=0,l=0,u=new Map;for(u.set(c,l);;){let m,g;if([m,g]=this.findNextSpecialToken(e,s,n),g>s){let A,y=e.substring(s,g);for(this.regex.lastIndex=0;A=this.regex.exec(y);){let E=A[0],_=this.cache.get(E);if(_)c+=_.length,l+=E.length,o.push(..._),u.set(c,l);else{let v=this.textEncoder.encode(E),b=this.encoder.get(v);if(b!==void 0)this.cache.set(E,[b]),c++,l+=E.length,o.push(b),u.set(c,l);else{let I=(0,oLe.bytePairEncode)(v,this.encoder,this.textEncoder.length);this.cache.set(E,I),c+=I.length,l+=E.length;for(let x of I)o.push(x);u.set(c,l)}}}}if(m!==null){if(s=s+this.encodeSpecialToken(o,m),c++,l+=m[0].length,u.set(c,l),s>=e.length)break}else break}if(c<=r)return{tokenIds:o,text:e};let d=c-r,p=0,h=0;for(let[m,g]of u)if(m>=d){p=m,h=g;break}if(p>r){let m=this.encode(e,n),g=m.slice(m.length-r);return{tokenIds:g,text:this.decode(g)}}return{tokenIds:o.slice(p),text:e.slice(h)}}decode(e){let r=[];for(let n of e){let o=[],s=this.decoder?.get(n);if(s!==void 0)o=Array.from(s);else{let c=this.specialTokensDecoder?.get(n);if(c!==void 0){let l=this.textEncoder.encode(c);o=Array.from(l.subarray(0,this.textEncoder.length))}}r.push(...o)}return this.textDecoder.decode(new Uint8Array(r))}};sLe.TikTokenizer=SSt});var O6r=T(r0=>{"use strict";f();Object.defineProperty(r0,"__esModule",{value:!0});r0.createTokenizer=r0.createByEncoderName=r0.createByModelName=r0.getRegexByModel=r0.getRegexByEncoder=r0.getSpecialTokensByModel=r0.getSpecialTokensByEncoder=r0.MODEL_TO_ENCODING=void 0;var Bqi=ISt(),Lqi=new Map([["gpt-4o-","o200k_base"],["gpt-4-","cl100k_base"],["gpt-3.5-turbo-","cl100k_base"],["gpt-35-turbo-","cl100k_base"]]);r0.MODEL_TO_ENCODING=new Map([["gpt-4o","o200k_base"],["gpt-4","cl100k_base"],["gpt-3.5-turbo","cl100k_base"],["text-davinci-003","p50k_base"],["text-davinci-002","p50k_base"],["text-davinci-001","r50k_base"],["text-curie-001","r50k_base"],["text-babbage-001","r50k_base"],["text-ada-001","r50k_base"],["davinci","r50k_base"],["curie","r50k_base"],["babbage","r50k_base"],["ada","r50k_base"],["code-davinci-002","p50k_base"],["code-davinci-001","p50k_base"],["code-cushman-002","p50k_base"],["code-cushman-001","p50k_base"],["davinci-codex","p50k_base"],["cushman-codex","p50k_base"],["text-davinci-edit-001","p50k_edit"],["code-davinci-edit-001","p50k_edit"],["text-embedding-ada-002","cl100k_base"],["text-similarity-davinci-001","r50k_base"],["text-similarity-curie-001","r50k_base"],["text-similarity-babbage-001","r50k_base"],["text-similarity-ada-001","r50k_base"],["text-search-davinci-doc-001","r50k_base"],["text-search-curie-doc-001","r50k_base"],["text-search-babbage-doc-001","r50k_base"],["text-search-ada-doc-001","r50k_base"],["code-search-babbage-code-001","r50k_base"],["code-search-ada-code-001","r50k_base"],["gpt2","gpt2"]]);var aLe="<|endoftext|>",I6r="<|fim_prefix|>",x6r="<|fim_middle|>",w6r="<|fim_suffix|>",R6r="<|endofprompt|>",eAe="'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+",P6r="(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)|[^\\r\\n\\p{L}\\p{N}]?\\p{L}+|\\p{N}{1,3}| ?[^\\s\\p{L}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",Fqi=[`[^\r \\p{L}\\p{N}]?[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}\\p{M}]*[\\p{Ll}\\p{Lm}\\p{Lo}\\p{M}]+(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)?`,`[^\r -\\p{L}\\p{N}]?[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}\\p{M}]+[\\p{Ll}\\p{Lm}\\p{Lo}\\p{M}]*(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)?`,"\\p{N}{1,3}"," ?[^\\s\\p{L}\\p{N}]+[\\r\\n/]*","\\s*[\\r\\n]+","\\s+(?!\\S)","\\s+"],N8r=LUi.join("|");function aSt(t){let e="";if(a0.MODEL_TO_ENCODING.has(t))e=a0.MODEL_TO_ENCODING.get(t);else for(let[r,n]of BUi)if(t.startsWith(r)){e=n;break}return e}a(aSt,"getEncoderFromModelName");async function FUi(t,e){let r=require("fs"),n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch file from ${t}. Status code: ${n.status}`);let o=await n.text();r.writeFileSync(e,o)}a(FUi,"fetchAndSaveFile");function cSt(t){let e=new Map([[ZLe,50256]]);switch(t){case"o200k_base":e=new Map([[ZLe,199999],[P8r,200018]]);break;case"cl100k_base":e=new Map([[ZLe,100257],[x8r,100258],[w8r,100259],[R8r,100260],[P8r,100276]]);break;case"p50k_edit":e=new Map([[ZLe,50256],[x8r,50281],[w8r,50282],[R8r,50283]]);break;default:break}return e}a(cSt,"getSpecialTokensByEncoder");a0.getSpecialTokensByEncoder=cSt;function UUi(t){let e=aSt(t);return cSt(e)}a(UUi,"getSpecialTokensByModel");a0.getSpecialTokensByModel=UUi;function D8r(t){switch(t){case"o200k_base":return N8r;case"cl100k_base":return k8r;default:break}return rye}a(D8r,"getRegexByEncoder");a0.getRegexByEncoder=D8r;function QUi(t){let e=aSt(t);return D8r(e)}a(QUi,"getRegexByModel");a0.getRegexByModel=QUi;async function qUi(t,e=null){return M8r(aSt(t),e)}a(qUi,"createByModelName");a0.createByModelName=qUi;async function M8r(t,e=null){let r,n,o=cSt(t);switch(t){case"o200k_base":r=N8r,n="https://openaipublic.blob.core.windows.net/encodings/o200k_base.tiktoken";break;case"cl100k_base":r=k8r,n="https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken";break;case"p50k_base":r=rye,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"p50k_edit":r=rye,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"r50k_base":r=rye,n="https://openaipublic.blob.core.windows.net/encodings/r50k_base.tiktoken";break;case"gpt2":r=rye,n="https://raw.githubusercontent.com/microsoft/Tokenizer/main/model/gpt2.tiktoken";break;default:throw new Error(`Doesn't support this encoder [${t}]`)}e!==null&&(o=new Map([...o,...e]));let s=require("fs"),c=require("path"),l=c.basename(n),u=c.resolve(__dirname,"..","model");s.existsSync(u)||s.mkdirSync(u,{recursive:!0});let d=c.resolve(u,l);return s.existsSync(d)||(console.log(`Downloading file from ${n}`),await FUi(n,d),console.log(`Saved file to ${d}`)),O8r(d,o,r)}a(M8r,"createByEncoderName");a0.createByEncoderName=M8r;function O8r(t,e,r,n=8192){return new OUi.TikTokenizer(t,e,r,n)}a(O8r,"createTokenizer");a0.createTokenizer=O8r});var e8e=T(c0=>{"use strict";f();Object.defineProperty(c0,"__esModule",{value:!0});c0.createTokenizer=c0.createByEncoderName=c0.createByModelName=c0.getSpecialTokensByModel=c0.getSpecialTokensByEncoder=c0.getRegexByModel=c0.getRegexByEncoder=c0.MODEL_TO_ENCODING=c0.TikTokenizer=void 0;var GUi=sSt();Object.defineProperty(c0,"TikTokenizer",{enumerable:!0,get:a(function(){return GUi.TikTokenizer},"get")});var f6=B8r();Object.defineProperty(c0,"MODEL_TO_ENCODING",{enumerable:!0,get:a(function(){return f6.MODEL_TO_ENCODING},"get")});Object.defineProperty(c0,"getRegexByEncoder",{enumerable:!0,get:a(function(){return f6.getRegexByEncoder},"get")});Object.defineProperty(c0,"getRegexByModel",{enumerable:!0,get:a(function(){return f6.getRegexByModel},"get")});Object.defineProperty(c0,"getSpecialTokensByEncoder",{enumerable:!0,get:a(function(){return f6.getSpecialTokensByEncoder},"get")});Object.defineProperty(c0,"getSpecialTokensByModel",{enumerable:!0,get:a(function(){return f6.getSpecialTokensByModel},"get")});Object.defineProperty(c0,"createByModelName",{enumerable:!0,get:a(function(){return f6.createByModelName},"get")});Object.defineProperty(c0,"createByEncoderName",{enumerable:!0,get:a(function(){return f6.createByEncoderName},"get")});Object.defineProperty(c0,"createTokenizer",{enumerable:!0,get:a(function(){return f6.createTokenizer},"get")})});var ASt=T((gol,s6r)=>{"use strict";f();s6r.exports=a(function(e,r){r===!0&&(r=0);var n="";if(typeof e=="string")try{n=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(n=e.protocol);var o=n.split(/\:|\+/).filter(Boolean);return typeof r=="number"?o[r]:o},"protocols")});var c6r=T((Eol,a6r)=>{"use strict";f();var EGi=ASt();function CGi(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=EGi(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}a(CGi,"parsePath");a6r.exports=CGi});var h6r=T((vol,p6r)=>{"use strict";f();var _Gi=c6r();function vGi(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}a(vGi,"_interopDefaultLegacy");var bGi=vGi(_Gi);function TGi(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=a(function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var s=Function.bind.apply(e,o);return new s}return e.apply(this,arguments)},"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:a(function(){return t[n]},"get")})}),r}a(TGi,"getAugmentedNamespace");var u6r={},SGi="text/plain",IGi="us-ascii",l6r=a((t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),"testParameter"),xGi=a((t,{stripHash:e})=>{let r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:o,hash:s}=r.groups,c=n.split(";");s=e?"":s;let l=!1;c[c.length-1]==="base64"&&(c.pop(),l=!0);let u=(c.shift()||"").toLowerCase(),p=[...c.map(h=>{let[m,g=""]=h.split("=").map(A=>A.trim());return m==="charset"&&(g=g.toLowerCase(),g===IGi)?"":`${m}${g?`=${g}`:""}`}).filter(Boolean)];return l&&p.push("base64"),(p.length>0||u&&u!==SGi)&&p.unshift(u),`data:${p.join(";")},${l?o.trim():o}${s?`#${s}`:""}`},"normalizeDataURL");function wGi(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return xGi(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let o=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&o.protocol==="https:"&&(o.protocol="http:"),e.forceHttps&&o.protocol==="http:"&&(o.protocol="https:"),e.stripAuthentication&&(o.username="",o.password=""),e.stripHash?o.hash="":e.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,"")),o.pathname){let c=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,l=0,u="";for(;;){let p=c.exec(o.pathname);if(!p)break;let h=p[0],m=p.index,g=o.pathname.slice(l,m);u+=g.replace(/\/{2,}/g,"/"),u+=h,l=m+h.length}let d=o.pathname.slice(l,o.pathname.length);u+=d.replace(/\/{2,}/g,"/"),o.pathname=u}if(o.pathname)try{o.pathname=decodeURI(o.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=o.pathname.split("/"),l=c[c.length-1];l6r(l,e.removeDirectoryIndex)&&(c=c.slice(0,-1),o.pathname=c.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let c of[...o.searchParams.keys()])l6r(c,e.removeQueryParameters)&&o.searchParams.delete(c);if(e.removeQueryParameters===!0&&(o.search=""),e.sortQueryParameters){o.searchParams.sort();try{o.search=decodeURIComponent(o.search)}catch{}}e.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,""));let s=t;return t=o.toString(),!e.removeSingleSlash&&o.pathname==="/"&&!s.endsWith("/")&&o.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||o.pathname==="/")&&o.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}a(wGi,"normalizeUrl");var RGi=Object.freeze({__proto__:null,default:wGi}),PGi=TGi(RGi);Object.defineProperty(u6r,"__esModule",{value:!0});var kGi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},NGi=PGi,DGi=d6r(NGi),MGi=bGi.default,OGi=d6r(MGi);function d6r(t){return t&&t.__esModule?t:{default:t}}a(d6r,"_interopRequireDefault");var f6r=a(function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=/^(?:([a-zA-Z_][a-zA-Z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:](([\~,\.\w,\-,\_,\/,\s]|%[0-9A-Fa-f]{2})+?(?:\.git|\/)?)$/,o=a(function(u){var d=new Error(u);throw d.subject_url=e,d},"throwErr");(typeof e!="string"||!e.trim())&&o("Invalid url."),e.length>t.MAX_INPUT_LENGTH&&o("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),r&&((typeof r>"u"?"undefined":kGi(r))!=="object"&&(r={stripHash:!1}),e=(0,DGi.default)(e,r));var s=(0,OGi.default)(e);if(s.parse_failed){var c=s.href.match(n);c?(s.protocols=["ssh"],s.protocol="ssh",s.resource=c[2],s.host=c[2],s.user=c[1],s.pathname="/"+c[3],s.parse_failed=!1):o("URL parsing failed.")}return s},"parseUrl");f6r.MAX_INPUT_LENGTH=2048;var BGi=u6r.default=f6r;p6r.exports=BGi});var A6r=T((Sol,g6r)=>{"use strict";f();var LGi=ASt();function m6r(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=LGi(t);if(t=t.substring(t.indexOf("://")+3),m6r(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@"){"use strict";f();var FGi=h6r(),y6r=A6r();function UGi(t){let e=FGi(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),y6r(e.protocols)||e.protocols.length===0&&y6r(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}a(UGi,"gitUp");E6r.exports=UGi});var v6r=T((kol,_6r)=>{"use strict";f();var QGi=C6r();function ySt(t,e){if(e=e||[],typeof t!="string")throw new Error("The url must be a string.");if(!e.every(function(v){return typeof v=="string"}))throw new Error("The refs should contain only strings");var r=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;r.test(t)&&(t="https://github.com/"+t);var n=QGi(t),o=n.resource.split("."),s=null;switch(n.toString=function(v){return ySt.stringify(this,v)},n.source=o.length>2?o.slice(1-o.length).join("."):n.source=n.resource,n.git_suffix=/\.git$/.test(n.pathname),n.name=decodeURIComponent((n.pathname||n.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),n.owner=decodeURIComponent(n.user),n.source){case"git.cloudforge.com":n.owner=n.user,n.organization=o[0],n.source="cloudforge.com";break;case"visualstudio.com":if(n.resource==="vs-ssh.visualstudio.com"){s=n.name.split("/"),s.length===4&&(n.organization=s[1],n.owner=s[2],n.name=s[3],n.full_name=s[2]+"/"+s[3]);break}else{s=n.name.split("/"),s.length===2?(n.owner=s[1],n.name=s[1],n.full_name="_git/"+n.name):s.length===3?(n.name=s[2],s[0]==="DefaultCollection"?(n.owner=s[2],n.organization=s[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=s[0],n.full_name=n.owner+"/_git/"+n.name)):s.length===4&&(n.organization=s[0],n.owner=s[1],n.name=s[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name);break}case"dev.azure.com":case"azure.com":if(n.resource==="ssh.dev.azure.com"){s=n.name.split("/"),s.length===4&&(n.organization=s[1],n.owner=s[2],n.name=s[3]);break}else{s=n.name.split("/"),s.length===5?(n.organization=s[0],n.owner=s[1],n.name=s[4],n.full_name="_git/"+n.name):s.length===3?(n.name=s[2],s[0]==="DefaultCollection"?(n.owner=s[2],n.organization=s[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=s[0],n.full_name=n.owner+"/_git/"+n.name)):s.length===4&&(n.organization=s[0],n.owner=s[1],n.name=s[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name),n.query&&n.query.path&&(n.filepath=n.query.path.replace(/^\/+/g,"")),n.query&&n.query.version&&(n.ref=n.query.version.replace(/^GB/,""));break}default:s=n.name.split("/");var c=s.length-1;if(s.length>=2){var l=s.indexOf("-",2),u=s.indexOf("blob",2),d=s.indexOf("tree",2),p=s.indexOf("commit",2),h=s.indexOf("issues",2),m=s.indexOf("src",2),g=s.indexOf("raw",2),A=s.indexOf("edit",2);c=l>0?l-1:u>0&&d>0?Math.min(u-1,d-1):u>0?u-1:h>0?h-1:d>0?d-1:p>0?p-1:m>0?m-1:g>0?g-1:A>0?A-1:c,n.owner=s.slice(0,c).join("/"),n.name=s[c],p&&h<0&&(n.commit=s[c+2])}n.ref="",n.filepathtype="",n.filepath="";var y=s.length>c&&s[c+1]==="-"?c+1:c;s.length>y+2&&["raw","src","blob","tree","edit"].indexOf(s[y+1])>=0&&(n.filepathtype=s[y+1],n.ref=s[y+2],s.length>y+3&&(n.filepath=s.slice(y+3).join("/"))),n.organization=n.owner;break}n.full_name||(n.full_name=n.owner,n.name&&(n.full_name&&(n.full_name+="/"),n.full_name+=n.name)),n.owner.startsWith("scm/")&&(n.source="bitbucket-server",n.owner=n.owner.replace("scm/",""),n.organization=n.owner,n.full_name=n.owner+"/"+n.name);var E=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,_=E.exec(n.pathname);return _!=null&&(n.source="bitbucket-server",_[1]==="users"?n.owner="~"+_[2]:n.owner=_[2],n.organization=n.owner,n.name=_[3],s=_[4].split("/"),s.length>1&&(["raw","browse"].indexOf(s[1])>=0?(n.filepathtype=s[1],s.length>2&&(n.filepath=s.slice(2).join("/"))):s[1]==="commits"&&s.length>2&&(n.commit=s[2])),n.full_name=n.owner+"/"+n.name,n.query.at?n.ref=n.query.at:n.ref=""),e.length!==0&&n.ref&&(n.ref=HGi(n.href,e)||n.ref,n.filepath=n.href.split(n.ref+"/")[1]),n}a(ySt,"gitUrlParse");ySt.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",n=t.user||"git",o=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+n+"@"+t.resource+r+"/"+t.full_name+o:n+"@"+t.resource+":"+t.full_name+o;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+n+"@"+t.resource+r+"/"+t.full_name+o;case"http":case"https":var s=t.token?qGi(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+s+t.resource+r+"/"+GGi(t)+o;default:return t.href}};function qGi(t){return t.source==="bitbucket.org"?"x-token-auth:"+t.token+"@":t.token+"@"}a(qGi,"buildToken");function GGi(t){if(t.source==="bitbucket-server")return"scm/"+t.full_name;var e=t.full_name.split("/").map(function(r){return encodeURIComponent(r)}).join("/");return e}a(GGi,"buildPath");function HGi(t,e){var r="";return e.forEach(function(n){t.includes(n)&&n.length>r.length&&(r=n)}),r}a(HGi,"findLongestMatchingSubstring");_6r.exports=ySt});var bre=T((exports,module)=>{f();var Module=typeof Module<"u"?Module:{},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",TreeSitter=(function(){var initPromise,document=typeof window=="object"?{currentScript:window.document.currentScript}:null;class Parser{static{a(this,"Parser")}constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise(resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=a((t,e)=>{throw e},"quit_"),scriptDirectory="";function locateFile(t){return Module.locateFile?Module.locateFile(t,scriptDirectory):scriptDirectory+t}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs"),nodePath=require("path");scriptDirectory=__dirname+"/",readBinary=a(t=>{t=isFileURI(t)?new URL(t):nodePath.normalize(t);var e=fs.readFileSync(t);return e},"readBinary"),readAsync=a((t,e=!0)=>(t=isFileURI(t)?new URL(t):nodePath.normalize(t),new Promise((r,n)=>{fs.readFile(t,e?void 0:"utf8",(o,s)=>{o?n(o):r(e?s.buffer:s)})})),"readAsync"),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),quit_=a((t,e)=>{throw process.exitCode=t,e},"quit_")}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=a(t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},"readBinary")),readAsync=a(t=>isFileURI(t)?new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{(n.status==200||n.status==0&&n.response)&&r(n.response),e(n.status)},n.onerror=e,n.send(null)}):fetch(t,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url))),"readAsync"));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var wasmMemory,ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP_DATA_VIEW;function updateMemoryViews(){var t=wasmMemory.buffer;Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(t),Module.HEAP8=HEAP8=new Int8Array(t),Module.HEAP16=HEAP16=new Int16Array(t),Module.HEAPU8=HEAPU8=new Uint8Array(t),Module.HEAPU16=HEAPU16=new Uint16Array(t),Module.HEAP32=HEAP32=new Int32Array(t),Module.HEAPU32=HEAPU32=new Uint32Array(t),Module.HEAPF32=HEAPF32=new Float32Array(t),Module.HEAPF64=HEAPF64=new Float64Array(t)}if(a(updateMemoryViews,"updateMemoryViews"),Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:2147483648/65536})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}a(initRuntime,"initRuntime");function preMain(){callRuntimeCallbacks(__ATMAIN__)}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}a(postRun,"postRun");function addOnPreRun(t){__ATPRERUN__.unshift(t)}a(addOnPreRun,"addOnPreRun");function addOnInit(t){__ATINIT__.unshift(t)}a(addOnInit,"addOnInit");function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}a(addOnPostRun,"addOnPostRun");var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}a(getUniqueRunDependency,"getUniqueRunDependency");function addRunDependency(t){runDependencies++,Module.monitorRunDependencies?.(runDependencies)}a(addRunDependency,"addRunDependency");function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}a(removeRunDependency,"removeRunDependency");function abort(t){Module.onAbort?.(t),t="Aborted("+t+")",err(t),ABORT=!0,EXITSTATUS=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw e}a(abort,"abort");var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=a(t=>t.startsWith(dataURIPrefix),"isDataURI"),isFileURI=a(t=>t.startsWith("file://"),"isFileURI");function findWasmBinary(){var t="tree-sitter.wasm";return isDataURI(t)?t:locateFile(t)}a(findWasmBinary,"findWasmBinary");var wasmBinaryFile;function getBinarySync(t){if(t==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(t);throw"both async and sync fetching of the wasm failed"}a(getBinarySync,"getBinarySync");function getBinaryPromise(t){return wasmBinary?Promise.resolve().then(()=>getBinarySync(t)):readAsync(t).then(e=>new Uint8Array(e),()=>getBinarySync(t))}a(getBinaryPromise,"getBinaryPromise");function instantiateArrayBuffer(t,e,r){return getBinaryPromise(t).then(n=>WebAssembly.instantiate(n,e)).then(r,n=>{err(`failed to asynchronously prepare wasm: ${n}`),abort(n)})}a(instantiateArrayBuffer,"instantiateArrayBuffer");function instantiateAsync(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(e)&&!isFileURI(e)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(o=>{var s=WebAssembly.instantiateStreaming(o,r);return s.then(n,function(c){return err(`wasm streaming compile failed: ${c}`),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(e,r,n)})}):instantiateArrayBuffer(e,r,n)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");function createWasm(){var t=getWasmImports();function e(n,o){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var s=getDylinkMetadata(o);return s.neededDynlibs&&(dynamicLibraries=s.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),wasmExports}a(e,"receiveInstance"),addRunDependency("wasm-instantiate");function r(n){e(n.instance,n.module)}if(a(r,"receiveInstantiationResult"),Module.instantiateWasm)try{return Module.instantiateWasm(t,e)}catch(n){return err(`Module.instantiateWasm callback failed with error: ${n}`),!1}return wasmBinaryFile||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,t,r),{}}a(createWasm,"createWasm");var ASM_CONSTS={};function ExitStatus(t){this.name="ExitStatus",this.message=`Program terminated with exit(${t})`,this.status=t}a(ExitStatus,"ExitStatus");var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(t,e){var r=GOT[e];return r||(r=GOT[e]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(e)||(r.required=!0),r}},LE_HEAP_LOAD_F32=a(t=>HEAP_DATA_VIEW.getFloat32(t,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(t=>HEAP_DATA_VIEW.getFloat64(t,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(t=>HEAP_DATA_VIEW.getInt16(t,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(t=>HEAP_DATA_VIEW.getInt32(t,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_U32=a(t=>HEAP_DATA_VIEW.getUint32(t,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((t,e)=>HEAP_DATA_VIEW.setFloat32(t,e,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((t,e)=>HEAP_DATA_VIEW.setFloat64(t,e,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((t,e)=>HEAP_DATA_VIEW.setInt16(t,e,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((t,e)=>HEAP_DATA_VIEW.setInt32(t,e,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_U32=a((t,e)=>HEAP_DATA_VIEW.setUint32(t,e,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(t=>{for(;t.length>0;)t.shift()(Module)},"callRuntimeCallbacks"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,UTF8ArrayToString=a((t,e,r)=>{for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,o));for(var s="";e>10,56320|d&1023)}}return s},"UTF8ArrayToString"),getDylinkMetadata=a(t=>{var e=0,r=0;function n(){return t[e++]}a(n,"getU8");function o(){for(var G=0,O=1;;){var N=t[e++];if(G+=(N&127)*O,O*=128,!(N&128))break}return G}a(o,"getLEB");function s(){var G=o();return e+=G,UTF8ArrayToString(t,e-G,G)}a(s,"getString");function c(G,O){if(G)throw new Error(O)}a(c,"failIf");var l="dylink.0";if(t instanceof WebAssembly.Module){var u=WebAssembly.Module.customSections(t,l);u.length===0&&(l="dylink",u=WebAssembly.Module.customSections(t,l)),c(u.length===0,"need dylink section"),t=new Uint8Array(u[0]),r=t.length}else{var d=new Uint32Array(new Uint8Array(t.subarray(0,24)).buffer),p=d[0]==1836278016||d[0]==6386541;c(!p,"need to see wasm magic number"),c(t[8]!==0,"need the dylink section to be first"),e=9;var h=o();r=e+h,l=s()}var m={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(l=="dylink"){m.memorySize=o(),m.memoryAlign=o(),m.tableSize=o(),m.tableAlign=o();for(var g=o(),A=0;A>1)*2);case"i32":return LE_HEAP_LOAD_I32((t>>2)*4);case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return LE_HEAP_LOAD_F32((t>>2)*4);case"double":return LE_HEAP_LOAD_F64((t>>3)*8);case"*":return LE_HEAP_LOAD_U32((t>>2)*4);default:abort(`invalid type for getValue: ${e}`)}}a(getValue,"getValue");var newDSO=a((t,e,r)=>{var n={refcount:1/0,name:t,exports:r,global:!0};return LDSO.loadedLibsByName[t]=n,e!=null&&(LDSO.loadedLibsByHandle[e]=n),n},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78112,zeroMemory=a((t,e)=>(HEAPU8.fill(0,t,t+e),t),"zeroMemory"),alignMemory=a((t,e)=>Math.ceil(t/e)*e,"alignMemory"),getMemory=a(t=>{if(runtimeInitialized)return zeroMemory(_malloc(t),t);var e=___heap_base,r=e+alignMemory(t,16);return ___heap_base=r,GOT.__heap_base.value=r,e},"getMemory"),isInternalSym=a(t=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(t)||t.startsWith("__em_js__"),"isInternalSym"),uleb128Encode=a((t,e)=>{t<128?e.push(t):e.push(t%128|128,t>>7)},"uleb128Encode"),sigToWasmTypes=a(t=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:t[0]=="v"?[]:[e[t[0]]]},n=1;n{var r=t.slice(0,1),n=t.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96),uleb128Encode(n.length,e);for(var s=0;s{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(e),t);var r=[1];generateFuncType(e,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n)),s=new WebAssembly.Instance(o,{e:{f:t}}),c=s.exports.f;return c},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:28,element:"anyfunc"}),getWasmTableEntry=a(t=>{var e=wasmTableMirror[t];return e||(t>=wasmTableMirror.length&&(wasmTableMirror.length=t+1),wasmTableMirror[t]=e=wasmTable.get(t)),e},"getWasmTableEntry"),updateTableMap=a((t,e)=>{if(functionsInTableMap)for(var r=t;r(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(t)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(t){throw t instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":t}return wasmTable.length-1},"getEmptyTableSlot"),setWasmTableEntry=a((t,e)=>{wasmTable.set(t,e),wasmTableMirror[t]=wasmTable.get(t)},"setWasmTableEntry"),addFunction=a((t,e)=>{var r=getFunctionAddress(t);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,t)}catch(s){if(!(s instanceof TypeError))throw s;var o=convertJsFunctionToWasm(t,e);setWasmTableEntry(n,o)}return functionsInTableMap.set(t,n),n},"addFunction"),updateGOT=a((t,e)=>{for(var r in t)if(!isInternalSym(r)){var n=t[r];r.startsWith("orig$")&&(r=r.split("$")[1],e=!0),GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(e||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},"updateGOT"),relocateExports=a((t,e,r)=>{var n={};for(var o in t){var s=t[o];typeof s=="object"&&(s=s.value),typeof s=="number"&&(s+=e),n[o]=s}return updateGOT(n,r),n},"relocateExports"),isSymbolDefined=a(t=>{var e=wasmImports[t];return!(!e||e.stub)},"isSymbolDefined"),dynCallLegacy=a((t,e,r)=>{t=t.replace(/p/g,"i");var n=Module["dynCall_"+t];return n(e,...r)},"dynCallLegacy"),dynCall=a((t,e,r=[])=>{if(t.includes("j"))return dynCallLegacy(t,e,r);var n=getWasmTableEntry(e)(...r);return n},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(t=>__emscripten_stack_restore(t),"stackRestore"),createInvokeFunction=a(t=>(e,...r)=>{var n=stackSave();try{return dynCall(t,e,r)}catch(o){if(stackRestore(n),o!==o+0)throw o;_setThrew(1,0)}},"createInvokeFunction"),resolveGlobalSymbol=a((t,e=!1)=>{var r;return e&&"orig$"+t in wasmImports&&(t="orig$"+t),isSymbolDefined(t)?r=wasmImports[t]:t.startsWith("invoke_")&&(r=wasmImports[t]=createInvokeFunction(t.split("_")[1])),{sym:r,name:t}},"resolveGlobalSymbol"),UTF8ToString=a((t,e)=>t?UTF8ArrayToString(HEAPU8,t,e):"","UTF8ToString"),loadWebAssemblyModule=a((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize))}else memoryBase=LE_HEAP_LOAD_U32((handle+12>>2)*4),tableBase=LE_HEAP_LOAD_U32((handle+20>>2)*4);var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(t){var e=resolveGlobalSymbol(t).sym;return!e&&localScope&&(e=localScope[t]),e||(e=moduleExports[t]),e}a(resolveSymbol,"resolveSymbol");var proxyHandler={get(t,e){switch(e){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(e in wasmImports&&!wasmImports[e].stub)return wasmImports[e];if(!(e in t)){var r;t[e]=(...n)=>(r||=resolveSymbol(e),r(...n))}return t[e]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(a(addEmAsm,"addEmAsm"),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ${body};`;moduleExports[name]=eval(func)}a(addEmJs,"addEmJs");for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(a(postInstantiation,"postInstantiation"),flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(t=>postInstantiation(t.module,t.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return a(loadModule,"loadModule"),flags.loadAsync?metadata.neededDynlibs.reduce((t,e)=>t.then(()=>loadDynamicLibrary(e,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(t=>loadDynamicLibrary(t,flags,localScope)),loadModule())},"loadWebAssemblyModule"),mergeLibSymbols=a((t,e)=>{for(var[r,n]of Object.entries(t)){let o=a(c=>{isSymbolDefined(c)||(wasmImports[c]=n)},"setImport");o(r);let s="__main_argc_argv";r=="main"&&o(s),r==s&&o("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=n)}},"mergeLibSymbols"),asyncLoad=a((t,e,r,n)=>{var o=n?"":`al ${t}`;readAsync(t).then(s=>{e(new Uint8Array(s)),o&&removeRunDependency(o)},s=>{if(r)r();else throw`Loading data file "${t}" failed.`}),o&&addRunDependency(o)},"asyncLoad");function loadDynamicLibrary(t,e={global:!0,nodelete:!0},r,n){var o=LDSO.loadedLibsByName[t];if(o)return e.global?o.global||(o.global=!0,mergeLibSymbols(o.exports,t)):r&&Object.assign(r,o.exports),e.nodelete&&o.refcount!==1/0&&(o.refcount=1/0),o.refcount++,n&&(LDSO.loadedLibsByHandle[n]=o),e.loadAsync?Promise.resolve(!0):!0;o=newDSO(t,n,"loading"),o.refcount=e.nodelete?1/0:1,o.global=e.global;function s(){if(n){var u=LE_HEAP_LOAD_U32((n+28>>2)*4),d=LE_HEAP_LOAD_U32((n+32>>2)*4);if(u&&d){var p=HEAP8.slice(u,u+d);return e.loadAsync?Promise.resolve(p):p}}var h=locateFile(t);if(e.loadAsync)return new Promise(function(m,g){asyncLoad(h,m,g)});if(!readBinary)throw new Error(`${h}: file not found, and synchronous loading of external files is not available`);return readBinary(h)}a(s,"loadLibData");function c(){return e.loadAsync?s().then(u=>loadWebAssemblyModule(u,e,t,r,n)):loadWebAssemblyModule(s(),e,t,r,n)}a(c,"getExports");function l(u){o.global?mergeLibSymbols(u,t):r&&Object.assign(r,u),o.exports=u}return a(l,"moduleLoaded"),e.loadAsync?c().then(u=>(l(u),!0)):(l(c()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{for(var[t,e]of Object.entries(GOT))if(e.value==0){var r=resolveGlobalSymbol(t,!0).sym;if(!r&&!e.required)continue;if(typeof r=="function")e.value=addFunction(r,r.sig);else if(typeof r=="number")e.value=r;else throw new Error(`bad export type for '${t}': ${typeof r}`)}},"reportUndefinedSymbols"),loadDylibs=a(()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs"),dynamicLibraries.reduce((t,e)=>t.then(()=>loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")})},"loadDylibs"),noExitRuntime=Module.noExitRuntime||!0;function setValue(t,e,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[t]=e;break;case"i8":HEAP8[t]=e;break;case"i16":LE_HEAP_STORE_I16((t>>1)*2,e);break;case"i32":LE_HEAP_STORE_I32((t>>2)*4,e);break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":LE_HEAP_STORE_F32((t>>2)*4,e);break;case"double":LE_HEAP_STORE_F64((t>>3)*8,e);break;case"*":LE_HEAP_STORE_U32((t>>2)*4,e);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78112),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>{abort("")},"__abort_js");__abort_js.sig="v";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=a(()=>nowIsMonotonic,"__emscripten_get_now_is_monotonic");__emscripten_get_now_is_monotonic.sig="i";var __emscripten_memcpy_js=a((t,e,r)=>HEAPU8.copyWithin(t,e,e+r),"__emscripten_memcpy_js");__emscripten_memcpy_js.sig="vppp";var _emscripten_date_now=a(()=>Date.now(),"_emscripten_date_now");_emscripten_date_now.sig="d";var _emscripten_get_now;_emscripten_get_now=a(()=>performance.now(),"_emscripten_get_now"),_emscripten_get_now.sig="d";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(t=>{var e=wasmMemory.buffer,r=(t-e.byteLength+65535)/65536;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(t=>{var e=HEAPU8.length;t>>>=0;var r=getHeapMax();if(t>r)return!1;for(var n=a((u,d)=>u+(d-u%d)%d,"alignUp"),o=1;o<=4;o*=2){var s=e*(1+.2/o);s=Math.min(s,t+100663296);var c=Math.min(r,n(Math.max(t,s),65536)),l=growMemory(c);if(l)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=a(t=>52,"_fd_close");_fd_close.sig="ii";var convertI32PairToI53Checked=a((t,e)=>e+2097152>>>0<4194305-!!t?(t>>>0)+e*4294967296:NaN,"convertI32PairToI53Checked");function _fd_seek(t,e,r,n,o){var s=convertI32PairToI53Checked(e,r);return 70}a(_fd_seek,"_fd_seek"),_fd_seek.sig="iiiiip";var printCharBuffers=[null,[],[]],printChar=a((t,e)=>{var r=printCharBuffers[t];e===0||e===10?((t===1?out:err)(UTF8ArrayToString(r,0)),r.length=0):r.push(e)},"printChar"),_fd_write=a((t,e,r,n)=>{for(var o=0,s=0;s>2)*4),l=LE_HEAP_LOAD_U32((e+4>>2)*4);e+=8;for(var u=0;u>2)*4,o),0},"_fd_write");_fd_write.sig="iippp";function _tree_sitter_log_callback(t,e){if(currentLogCallback){let r=UTF8ToString(e);currentLogCallback(r,t!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(t,e,r,n,o){let c=currentParseCallback(e,{row:r,column:n});typeof c=="string"?(setValue(o,c.length,"i32"),stringToUTF16(c,t,10240)):setValue(o,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(t=>{EXITSTATUS=t,keepRuntimeAlive()||(Module.onExit?.(t),ABORT=!0),quit_(t,new ExitStatus(t))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((t,e)=>{EXITSTATUS=t,_proc_exit(t)},"exitJS"),handleException=a(t=>{if(t instanceof ExitStatus||t=="unwind")return EXITSTATUS;quit_(1,t)},"handleException"),lengthBytesUTF8=a(t=>{for(var e=0,r=0;r=55296&&n<=57343?(e+=4,++r):e+=3}return e},"lengthBytesUTF8"),stringToUTF8Array=a((t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,s=r+n-1,c=0;c=55296&&l<=57343){var u=t.charCodeAt(++c);l=65536+((l&1023)<<10)|u&1023}if(l<=127){if(r>=s)break;e[r++]=l}else if(l<=2047){if(r+1>=s)break;e[r++]=192|l>>6,e[r++]=128|l&63}else if(l<=65535){if(r+2>=s)break;e[r++]=224|l>>12,e[r++]=128|l>>6&63,e[r++]=128|l&63}else{if(r+3>=s)break;e[r++]=240|l>>18,e[r++]=128|l>>12&63,e[r++]=128|l>>6&63,e[r++]=128|l&63}}return e[r]=0,r-o},"stringToUTF8Array"),stringToUTF8=a((t,e,r)=>stringToUTF8Array(t,HEAPU8,e,r),"stringToUTF8"),stackAlloc=a(t=>__emscripten_stack_alloc(t),"stackAlloc"),stringToUTF8OnStack=a(t=>{var e=lengthBytesUTF8(t)+1,r=stackAlloc(e);return stringToUTF8(t,r,e),r},"stringToUTF8OnStack"),stringToUTF16=a((t,e,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var n=e,o=r>1)*2,c),e+=2}return LE_HEAP_STORE_I16((e>>1)*2,0),e-n},"stringToUTF16"),AsciiToString=a(t=>{for(var e="";;){var r=HEAPU8[t++];if(!r)return e;e+=String.fromCharCode(r)}},"AsciiToString"),wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_memcpy_js:__emscripten_memcpy_js,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},wasmExports=createWasm(),___wasm_call_ctors=a(()=>(___wasm_call_ctors=wasmExports.__wasm_call_ctors)(),"___wasm_call_ctors"),___wasm_apply_data_relocs=a(()=>(___wasm_apply_data_relocs=wasmExports.__wasm_apply_data_relocs)(),"___wasm_apply_data_relocs"),_malloc=Module._malloc=t=>(_malloc=Module._malloc=wasmExports.malloc)(t),_calloc=Module._calloc=(t,e)=>(_calloc=Module._calloc=wasmExports.calloc)(t,e),_realloc=Module._realloc=(t,e)=>(_realloc=Module._realloc=wasmExports.realloc)(t,e),_free=Module._free=t=>(_free=Module._free=wasmExports.free)(t),_ts_language_symbol_count=Module._ts_language_symbol_count=t=>(_ts_language_symbol_count=Module._ts_language_symbol_count=wasmExports.ts_language_symbol_count)(t),_ts_language_state_count=Module._ts_language_state_count=t=>(_ts_language_state_count=Module._ts_language_state_count=wasmExports.ts_language_state_count)(t),_ts_language_version=Module._ts_language_version=t=>(_ts_language_version=Module._ts_language_version=wasmExports.ts_language_version)(t),_ts_language_field_count=Module._ts_language_field_count=t=>(_ts_language_field_count=Module._ts_language_field_count=wasmExports.ts_language_field_count)(t),_ts_language_next_state=Module._ts_language_next_state=(t,e,r)=>(_ts_language_next_state=Module._ts_language_next_state=wasmExports.ts_language_next_state)(t,e,r),_ts_language_symbol_name=Module._ts_language_symbol_name=(t,e)=>(_ts_language_symbol_name=Module._ts_language_symbol_name=wasmExports.ts_language_symbol_name)(t,e),_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=(t,e,r,n)=>(_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=wasmExports.ts_language_symbol_for_name)(t,e,r,n),_strncmp=Module._strncmp=(t,e,r)=>(_strncmp=Module._strncmp=wasmExports.strncmp)(t,e,r),_ts_language_symbol_type=Module._ts_language_symbol_type=(t,e)=>(_ts_language_symbol_type=Module._ts_language_symbol_type=wasmExports.ts_language_symbol_type)(t,e),_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=(t,e)=>(_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=wasmExports.ts_language_field_name_for_id)(t,e),_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=(t,e)=>(_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=wasmExports.ts_lookahead_iterator_new)(t,e),_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=t=>(_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=wasmExports.ts_lookahead_iterator_delete)(t),_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=(t,e)=>(_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=wasmExports.ts_lookahead_iterator_reset_state)(t,e),_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=(t,e,r)=>(_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=wasmExports.ts_lookahead_iterator_reset)(t,e,r),_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=t=>(_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=wasmExports.ts_lookahead_iterator_next)(t),_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=t=>(_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=wasmExports.ts_lookahead_iterator_current_symbol)(t),_memset=Module._memset=(t,e,r)=>(_memset=Module._memset=wasmExports.memset)(t,e,r),_memcpy=Module._memcpy=(t,e,r)=>(_memcpy=Module._memcpy=wasmExports.memcpy)(t,e,r),_ts_parser_delete=Module._ts_parser_delete=t=>(_ts_parser_delete=Module._ts_parser_delete=wasmExports.ts_parser_delete)(t),_ts_parser_reset=Module._ts_parser_reset=t=>(_ts_parser_reset=Module._ts_parser_reset=wasmExports.ts_parser_reset)(t),_ts_parser_set_language=Module._ts_parser_set_language=(t,e)=>(_ts_parser_set_language=Module._ts_parser_set_language=wasmExports.ts_parser_set_language)(t,e),_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=t=>(_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=wasmExports.ts_parser_timeout_micros)(t),_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=(t,e,r)=>(_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=wasmExports.ts_parser_set_timeout_micros)(t,e,r),_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=(t,e,r)=>(_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=wasmExports.ts_parser_set_included_ranges)(t,e,r),_memmove=Module._memmove=(t,e,r)=>(_memmove=Module._memmove=wasmExports.memmove)(t,e,r),_memcmp=Module._memcmp=(t,e,r)=>(_memcmp=Module._memcmp=wasmExports.memcmp)(t,e,r),_ts_query_new=Module._ts_query_new=(t,e,r,n,o)=>(_ts_query_new=Module._ts_query_new=wasmExports.ts_query_new)(t,e,r,n,o),_ts_query_delete=Module._ts_query_delete=t=>(_ts_query_delete=Module._ts_query_delete=wasmExports.ts_query_delete)(t),_iswspace=Module._iswspace=t=>(_iswspace=Module._iswspace=wasmExports.iswspace)(t),_iswalnum=Module._iswalnum=t=>(_iswalnum=Module._iswalnum=wasmExports.iswalnum)(t),_ts_query_pattern_count=Module._ts_query_pattern_count=t=>(_ts_query_pattern_count=Module._ts_query_pattern_count=wasmExports.ts_query_pattern_count)(t),_ts_query_capture_count=Module._ts_query_capture_count=t=>(_ts_query_capture_count=Module._ts_query_capture_count=wasmExports.ts_query_capture_count)(t),_ts_query_string_count=Module._ts_query_string_count=t=>(_ts_query_string_count=Module._ts_query_string_count=wasmExports.ts_query_string_count)(t),_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=(t,e,r)=>(_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=wasmExports.ts_query_capture_name_for_id)(t,e,r),_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=(t,e,r)=>(_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=wasmExports.ts_query_string_value_for_id)(t,e,r),_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=(t,e,r)=>(_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=wasmExports.ts_query_predicates_for_pattern)(t,e,r),_ts_query_disable_capture=Module._ts_query_disable_capture=(t,e,r)=>(_ts_query_disable_capture=Module._ts_query_disable_capture=wasmExports.ts_query_disable_capture)(t,e,r),_ts_tree_copy=Module._ts_tree_copy=t=>(_ts_tree_copy=Module._ts_tree_copy=wasmExports.ts_tree_copy)(t),_ts_tree_delete=Module._ts_tree_delete=t=>(_ts_tree_delete=Module._ts_tree_delete=wasmExports.ts_tree_delete)(t),_ts_init=Module._ts_init=()=>(_ts_init=Module._ts_init=wasmExports.ts_init)(),_ts_parser_new_wasm=Module._ts_parser_new_wasm=()=>(_ts_parser_new_wasm=Module._ts_parser_new_wasm=wasmExports.ts_parser_new_wasm)(),_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=(t,e)=>(_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=wasmExports.ts_parser_enable_logger_wasm)(t,e),_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=(t,e,r,n,o)=>(_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=wasmExports.ts_parser_parse_wasm)(t,e,r,n,o),_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=t=>(_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=wasmExports.ts_parser_included_ranges_wasm)(t),_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=(t,e)=>(_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=wasmExports.ts_language_type_is_named_wasm)(t,e),_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=(t,e)=>(_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=wasmExports.ts_language_type_is_visible_wasm)(t,e),_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=t=>(_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=wasmExports.ts_tree_root_node_wasm)(t),_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=t=>(_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=wasmExports.ts_tree_root_node_with_offset_wasm)(t),_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=t=>(_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=wasmExports.ts_tree_edit_wasm)(t),_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=t=>(_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=wasmExports.ts_tree_included_ranges_wasm)(t),_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=(t,e)=>(_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=wasmExports.ts_tree_get_changed_ranges_wasm)(t,e),_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=t=>(_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=wasmExports.ts_tree_cursor_new_wasm)(t),_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=t=>(_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=wasmExports.ts_tree_cursor_delete_wasm)(t),_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=t=>(_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=wasmExports.ts_tree_cursor_reset_wasm)(t),_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=(t,e)=>(_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=wasmExports.ts_tree_cursor_reset_to_wasm)(t,e),_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=t=>(_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=wasmExports.ts_tree_cursor_goto_first_child_wasm)(t),_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=t=>(_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=wasmExports.ts_tree_cursor_goto_last_child_wasm)(t),_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=t=>(_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_index_wasm)(t),_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=t=>(_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_position_wasm)(t),_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=t=>(_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=wasmExports.ts_tree_cursor_goto_next_sibling_wasm)(t),_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=t=>(_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=wasmExports.ts_tree_cursor_goto_previous_sibling_wasm)(t),_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=(t,e)=>(_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=wasmExports.ts_tree_cursor_goto_descendant_wasm)(t,e),_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=t=>(_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=wasmExports.ts_tree_cursor_goto_parent_wasm)(t),_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=t=>(_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=wasmExports.ts_tree_cursor_current_node_type_id_wasm)(t),_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=t=>(_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=wasmExports.ts_tree_cursor_current_node_state_id_wasm)(t),_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=t=>(_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=wasmExports.ts_tree_cursor_current_node_is_named_wasm)(t),_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=t=>(_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=wasmExports.ts_tree_cursor_current_node_is_missing_wasm)(t),_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=t=>(_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=wasmExports.ts_tree_cursor_current_node_id_wasm)(t),_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=t=>(_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=wasmExports.ts_tree_cursor_start_position_wasm)(t),_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=t=>(_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=wasmExports.ts_tree_cursor_end_position_wasm)(t),_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=t=>(_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=wasmExports.ts_tree_cursor_start_index_wasm)(t),_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=t=>(_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=wasmExports.ts_tree_cursor_end_index_wasm)(t),_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=t=>(_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=wasmExports.ts_tree_cursor_current_field_id_wasm)(t),_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=t=>(_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=wasmExports.ts_tree_cursor_current_depth_wasm)(t),_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=t=>(_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=wasmExports.ts_tree_cursor_current_descendant_index_wasm)(t),_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=t=>(_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=wasmExports.ts_tree_cursor_current_node_wasm)(t),_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=t=>(_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=wasmExports.ts_node_symbol_wasm)(t),_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=(t,e)=>(_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=wasmExports.ts_node_field_name_for_child_wasm)(t,e),_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=(t,e)=>(_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=wasmExports.ts_node_children_by_field_id_wasm)(t,e),_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=t=>(_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=wasmExports.ts_node_first_child_for_byte_wasm)(t),_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=t=>(_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=wasmExports.ts_node_first_named_child_for_byte_wasm)(t),_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=t=>(_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=wasmExports.ts_node_grammar_symbol_wasm)(t),_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=t=>(_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=wasmExports.ts_node_child_count_wasm)(t),_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=t=>(_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=wasmExports.ts_node_named_child_count_wasm)(t),_ts_node_child_wasm=Module._ts_node_child_wasm=(t,e)=>(_ts_node_child_wasm=Module._ts_node_child_wasm=wasmExports.ts_node_child_wasm)(t,e),_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=(t,e)=>(_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=wasmExports.ts_node_named_child_wasm)(t,e),_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=(t,e)=>(_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=wasmExports.ts_node_child_by_field_id_wasm)(t,e),_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=t=>(_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=wasmExports.ts_node_next_sibling_wasm)(t),_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=t=>(_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=wasmExports.ts_node_prev_sibling_wasm)(t),_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=t=>(_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=wasmExports.ts_node_next_named_sibling_wasm)(t),_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=t=>(_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=wasmExports.ts_node_prev_named_sibling_wasm)(t),_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=t=>(_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=wasmExports.ts_node_descendant_count_wasm)(t),_ts_node_parent_wasm=Module._ts_node_parent_wasm=t=>(_ts_node_parent_wasm=Module._ts_node_parent_wasm=wasmExports.ts_node_parent_wasm)(t),_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=t=>(_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=wasmExports.ts_node_descendant_for_index_wasm)(t),_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=t=>(_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=wasmExports.ts_node_named_descendant_for_index_wasm)(t),_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=t=>(_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=wasmExports.ts_node_descendant_for_position_wasm)(t),_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=t=>(_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=wasmExports.ts_node_named_descendant_for_position_wasm)(t),_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=t=>(_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=wasmExports.ts_node_start_point_wasm)(t),_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=t=>(_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=wasmExports.ts_node_end_point_wasm)(t),_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=t=>(_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=wasmExports.ts_node_start_index_wasm)(t),_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=t=>(_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=wasmExports.ts_node_end_index_wasm)(t),_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=t=>(_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=wasmExports.ts_node_to_string_wasm)(t),_ts_node_children_wasm=Module._ts_node_children_wasm=t=>(_ts_node_children_wasm=Module._ts_node_children_wasm=wasmExports.ts_node_children_wasm)(t),_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=t=>(_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=wasmExports.ts_node_named_children_wasm)(t),_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=(t,e,r,n,o,s,c)=>(_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=wasmExports.ts_node_descendants_of_type_wasm)(t,e,r,n,o,s,c),_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=t=>(_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=wasmExports.ts_node_is_named_wasm)(t),_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=t=>(_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=wasmExports.ts_node_has_changes_wasm)(t),_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=t=>(_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=wasmExports.ts_node_has_error_wasm)(t),_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=t=>(_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=wasmExports.ts_node_is_error_wasm)(t),_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=t=>(_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=wasmExports.ts_node_is_missing_wasm)(t),_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=t=>(_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=wasmExports.ts_node_is_extra_wasm)(t),_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=t=>(_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=wasmExports.ts_node_parse_state_wasm)(t),_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=t=>(_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=wasmExports.ts_node_next_parse_state_wasm)(t),_ts_query_matches_wasm=Module._ts_query_matches_wasm=(t,e,r,n,o,s,c,l,u,d)=>(_ts_query_matches_wasm=Module._ts_query_matches_wasm=wasmExports.ts_query_matches_wasm)(t,e,r,n,o,s,c,l,u,d),_ts_query_captures_wasm=Module._ts_query_captures_wasm=(t,e,r,n,o,s,c,l,u,d)=>(_ts_query_captures_wasm=Module._ts_query_captures_wasm=wasmExports.ts_query_captures_wasm)(t,e,r,n,o,s,c,l,u,d),_iswalpha=Module._iswalpha=t=>(_iswalpha=Module._iswalpha=wasmExports.iswalpha)(t),_iswblank=Module._iswblank=t=>(_iswblank=Module._iswblank=wasmExports.iswblank)(t),_iswdigit=Module._iswdigit=t=>(_iswdigit=Module._iswdigit=wasmExports.iswdigit)(t),_iswlower=Module._iswlower=t=>(_iswlower=Module._iswlower=wasmExports.iswlower)(t),_iswupper=Module._iswupper=t=>(_iswupper=Module._iswupper=wasmExports.iswupper)(t),_iswxdigit=Module._iswxdigit=t=>(_iswxdigit=Module._iswxdigit=wasmExports.iswxdigit)(t),_memchr=Module._memchr=(t,e,r)=>(_memchr=Module._memchr=wasmExports.memchr)(t,e,r),_strlen=Module._strlen=t=>(_strlen=Module._strlen=wasmExports.strlen)(t),_strcmp=Module._strcmp=(t,e)=>(_strcmp=Module._strcmp=wasmExports.strcmp)(t,e),_strncat=Module._strncat=(t,e,r)=>(_strncat=Module._strncat=wasmExports.strncat)(t,e,r),_strncpy=Module._strncpy=(t,e,r)=>(_strncpy=Module._strncpy=wasmExports.strncpy)(t,e,r),_towlower=Module._towlower=t=>(_towlower=Module._towlower=wasmExports.towlower)(t),_towupper=Module._towupper=t=>(_towupper=Module._towupper=wasmExports.towupper)(t),_setThrew=a((t,e)=>(_setThrew=wasmExports.setThrew)(t,e),"_setThrew"),__emscripten_stack_restore=a(t=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(t),"__emscripten_stack_restore"),__emscripten_stack_alloc=a(t=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(t),"__emscripten_stack_alloc"),_emscripten_stack_get_current=a(()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),"_emscripten_stack_get_current"),dynCall_jiji=Module.dynCall_jiji=(t,e,r,n,o)=>(dynCall_jiji=Module.dynCall_jiji=wasmExports.dynCall_jiji)(t,e,r,n,o),_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=t=>(_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=wasmExports.orig$ts_parser_timeout_micros)(t),_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=(t,e)=>(_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=wasmExports.orig$ts_parser_set_timeout_micros)(t,e);Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16;var calledRun;dependenciesFulfilled=a(function t(){calledRun||run(),calledRun||(dependenciesFulfilled=t)},"runCaller");function callMain(t=[]){var e=resolveGlobalSymbol("main").sym;if(e){t.unshift(thisProgram);var r=t.length,n=stackAlloc((r+1)*4),o=n;t.forEach(c=>{LE_HEAP_STORE_U32((o>>2)*4,stringToUTF8OnStack(c)),o+=4}),LE_HEAP_STORE_U32((o>>2)*4,0);try{var s=e(r,n);return exitJS(s,!0),s}catch(c){return handleException(c)}}}a(callMain,"callMain");function run(t=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function e(){calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),Module.onRuntimeInitialized?.(),shouldRunNow&&callMain(t),postRun()))}a(e,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}if(a(run,"run"),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();let C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/,VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static{a(this,"ParserImpl")}static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let r;if(!e)r=0,e=null;else if(e.constructor===Language){r=e[0];let n=C._ts_language_version(r);if(ne.slice(u),"currentParseCallback");else if(typeof e=="function")currentParseCallback=e;else throw new Error("Argument must be a string or a function");this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let o=0,s=0;if(n?.includedRanges){o=n.includedRanges.length,s=C._calloc(o,SIZE_OF_RANGE);let u=s;for(let d=0;d0){let o=r;for(let s=0;s0){let s=n;for(let c=0;c0){let o=r;for(let s=0;s0){let s=n;for(let c=0;c0){let n=r;for(let o=0;o0){let n=r;for(let o=0;o0){let p=u;for(let h=0;h0){if(v[0].type!=="string")throw new Error("Predicates must begin with a literal value");let w=v[0].value,P=!0,k=!0,Q;switch(w){case"any-not-eq?":case"not-eq?":P=!1;case"any-eq?":case"eq?":if(v.length!==3)throw new Error(`Wrong number of arguments to \`#${w}\` predicate. Expected 2, got ${v.length-1}`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${w}\` predicate must be a capture. Got "${v[1].value}"`);if(k=!w.startsWith("any-"),v[2].type==="capture"){let O=v[1].name,N=v[2].name;A[y].push(F=>{let U=[],L=[];for(let $ of F)$.name===O&&U.push($.node),$.name===N&&L.push($.node);let H=a(($,W,j)=>j?$.text===W.text:$.text!==W.text,"compare");return k?U.every($=>L.some(W=>H($,W,P))):U.some($=>L.some(W=>H($,W,P)))})}else{Q=v[1].name;let O=v[2].value,N=a(U=>U.text===O,"matches"),F=a(U=>U.text!==O,"doesNotMatch");A[y].push(U=>{let L=[];for(let $ of U)$.name===Q&&L.push($.node);let H=P?N:F;return k?L.every(H):L.some(H)})}break;case"any-not-match?":case"not-match?":P=!1;case"any-match?":case"match?":if(v.length!==3)throw new Error(`Wrong number of arguments to \`#${w}\` predicate. Expected 2, got ${v.length-1}.`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${w}\` predicate must be a capture. Got "${v[1].value}".`);if(v[2].type!=="string")throw new Error(`Second argument of \`#${w}\` predicate must be a string. Got @${v[2].value}.`);Q=v[1].name;let M=new RegExp(v[2].value);k=!w.startsWith("any-"),A[y].push(O=>{let N=[];for(let U of O)U.name===Q&&N.push(U.node.text);let F=a((U,L)=>L?M.test(U):!M.test(U),"test");return N.length===0?!P:k?N.every(U=>F(U,P)):N.some(U=>F(U,P))});break;case"set!":if(v.length<2||v.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${v.length-1}.`);if(v.some(O=>O.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');p[y]||(p[y]={}),p[y][v[1].value]=v[2]?v[2].value:null;break;case"is?":case"is-not?":if(v.length<2||v.length>3)throw new Error(`Wrong number of arguments to \`#${w}\` predicate. Expected 1 or 2. Got ${v.length-1}.`);if(v.some(O=>O.type!=="string"))throw new Error(`Arguments to \`#${w}\` predicate must be a strings.".`);let D=w==="is?"?h:m;D[y]||(D[y]={}),D[y][v[1].value]=v[2]?v[2].value:null;break;case"not-any-of?":P=!1;case"any-of?":if(v.length<2)throw new Error(`Wrong number of arguments to \`#${w}\` predicate. Expected at least 1. Got ${v.length-1}.`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${w}\` predicate must be a capture. Got "${v[1].value}".`);for(let O=2;OO.value);A[y].push(O=>{let N=[];for(let F of O)F.name===Q&&N.push(F.node.text);return N.length===0?!P:N.every(F=>G.includes(F))===P});break;default:g[y].push({operator:w,operands:v.slice(1)})}v.length=0}}Object.freeze(p[y]),Object.freeze(h[y]),Object.freeze(m[y])}return C._free(n),new Query(INTERNAL,o,u,A,g,Object.freeze(p),Object.freeze(h),Object.freeze(m))}static load(e){let r;if(e instanceof Uint8Array)r=Promise.resolve(e);else{let n=e;if(typeof process<"u"&&process.versions&&process.versions.node){let o=require("fs");r=Promise.resolve(o.readFileSync(n))}else r=fetch(n).then(o=>o.arrayBuffer().then(s=>{if(o.ok)return new Uint8Array(s);{let c=new TextDecoder("utf-8").decode(s);throw new Error(`Language.load failed with status ${o.status}. +\\p{L}\\p{N}]?[\\p{Lu}\\p{Lt}\\p{Lm}\\p{Lo}\\p{M}]+[\\p{Ll}\\p{Lm}\\p{Lo}\\p{M}]*(?:'s|'S|'t|'T|'re|'RE|'Re|'eR|'ve|'VE|'vE|'Ve|'m|'M|'ll|'lL|'Ll|'LL|'d|'D)?`,"\\p{N}{1,3}"," ?[^\\s\\p{L}\\p{N}]+[\\r\\n/]*","\\s*[\\r\\n]+","\\s+(?!\\S)","\\s+"],k6r=Fqi.join("|");function xSt(t){let e="";if(r0.MODEL_TO_ENCODING.has(t))e=r0.MODEL_TO_ENCODING.get(t);else for(let[r,n]of Lqi)if(t.startsWith(r)){e=n;break}return e}a(xSt,"getEncoderFromModelName");async function Uqi(t,e){let r=require("fs"),n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch file from ${t}. Status code: ${n.status}`);let o=await n.text();r.writeFileSync(e,o)}a(Uqi,"fetchAndSaveFile");function wSt(t){let e=new Map([[aLe,50256]]);switch(t){case"o200k_base":e=new Map([[aLe,199999],[R6r,200018]]);break;case"cl100k_base":e=new Map([[aLe,100257],[I6r,100258],[x6r,100259],[w6r,100260],[R6r,100276]]);break;case"p50k_edit":e=new Map([[aLe,50256],[I6r,50281],[x6r,50282],[w6r,50283]]);break;default:break}return e}a(wSt,"getSpecialTokensByEncoder");r0.getSpecialTokensByEncoder=wSt;function Qqi(t){let e=xSt(t);return wSt(e)}a(Qqi,"getSpecialTokensByModel");r0.getSpecialTokensByModel=Qqi;function D6r(t){switch(t){case"o200k_base":return k6r;case"cl100k_base":return P6r;default:break}return eAe}a(D6r,"getRegexByEncoder");r0.getRegexByEncoder=D6r;function qqi(t){let e=xSt(t);return D6r(e)}a(qqi,"getRegexByModel");r0.getRegexByModel=qqi;async function Gqi(t,e=null){return N6r(xSt(t),e)}a(Gqi,"createByModelName");r0.createByModelName=Gqi;async function N6r(t,e=null){let r,n,o=wSt(t);switch(t){case"o200k_base":r=k6r,n="https://openaipublic.blob.core.windows.net/encodings/o200k_base.tiktoken";break;case"cl100k_base":r=P6r,n="https://openaipublic.blob.core.windows.net/encodings/cl100k_base.tiktoken";break;case"p50k_base":r=eAe,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"p50k_edit":r=eAe,n="https://openaipublic.blob.core.windows.net/encodings/p50k_base.tiktoken";break;case"r50k_base":r=eAe,n="https://openaipublic.blob.core.windows.net/encodings/r50k_base.tiktoken";break;case"gpt2":r=eAe,n="https://raw.githubusercontent.com/microsoft/Tokenizer/main/model/gpt2.tiktoken";break;default:throw new Error(`Doesn't support this encoder [${t}]`)}e!==null&&(o=new Map([...o,...e]));let s=require("fs"),c=require("path"),l=c.basename(n),u=c.resolve(__dirname,"..","model");s.existsSync(u)||s.mkdirSync(u,{recursive:!0});let d=c.resolve(u,l);return s.existsSync(d)||(console.log(`Downloading file from ${n}`),await Uqi(n,d),console.log(`Saved file to ${d}`)),M6r(d,o,r)}a(N6r,"createByEncoderName");r0.createByEncoderName=N6r;function M6r(t,e,r,n=8192){return new Bqi.TikTokenizer(t,e,r,n)}a(M6r,"createTokenizer");r0.createTokenizer=M6r});var cLe=T(n0=>{"use strict";f();Object.defineProperty(n0,"__esModule",{value:!0});n0.createTokenizer=n0.createByEncoderName=n0.createByModelName=n0.getSpecialTokensByModel=n0.getSpecialTokensByEncoder=n0.getRegexByModel=n0.getRegexByEncoder=n0.MODEL_TO_ENCODING=n0.TikTokenizer=void 0;var Hqi=ISt();Object.defineProperty(n0,"TikTokenizer",{enumerable:!0,get:a(function(){return Hqi.TikTokenizer},"get")});var U8=O6r();Object.defineProperty(n0,"MODEL_TO_ENCODING",{enumerable:!0,get:a(function(){return U8.MODEL_TO_ENCODING},"get")});Object.defineProperty(n0,"getRegexByEncoder",{enumerable:!0,get:a(function(){return U8.getRegexByEncoder},"get")});Object.defineProperty(n0,"getRegexByModel",{enumerable:!0,get:a(function(){return U8.getRegexByModel},"get")});Object.defineProperty(n0,"getSpecialTokensByEncoder",{enumerable:!0,get:a(function(){return U8.getSpecialTokensByEncoder},"get")});Object.defineProperty(n0,"getSpecialTokensByModel",{enumerable:!0,get:a(function(){return U8.getSpecialTokensByModel},"get")});Object.defineProperty(n0,"createByModelName",{enumerable:!0,get:a(function(){return U8.createByModelName},"get")});Object.defineProperty(n0,"createByEncoderName",{enumerable:!0,get:a(function(){return U8.createByEncoderName},"get")});Object.defineProperty(n0,"createTokenizer",{enumerable:!0,get:a(function(){return U8.createTokenizer},"get")})});var LSt=T((kal,oFr)=>{"use strict";f();oFr.exports=a(function(e,r){r===!0&&(r=0);var n="";if(typeof e=="string")try{n=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(n=e.protocol);var o=n.split(/\:|\+/).filter(Boolean);return typeof r=="number"?o[r]:o},"protocols")});var aFr=T((Mal,sFr)=>{"use strict";f();var _ji=LSt();function Cji(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=_ji(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}a(Cji,"parsePath");sFr.exports=Cji});var pFr=T((Lal,fFr)=>{"use strict";f();var vji=aFr();function bji(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}a(bji,"_interopDefaultLegacy");var Tji=bji(vji);function Sji(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=a(function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var s=Function.bind.apply(e,o);return new s}return e.apply(this,arguments)},"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:a(function(){return t[n]},"get")})}),r}a(Sji,"getAugmentedNamespace");var lFr={},Iji="text/plain",xji="us-ascii",cFr=a((t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),"testParameter"),wji=a((t,{stripHash:e})=>{let r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:o,hash:s}=r.groups,c=n.split(";");s=e?"":s;let l=!1;c[c.length-1]==="base64"&&(c.pop(),l=!0);let u=(c.shift()||"").toLowerCase(),p=[...c.map(h=>{let[m,g=""]=h.split("=").map(A=>A.trim());return m==="charset"&&(g=g.toLowerCase(),g===xji)?"":`${m}${g?`=${g}`:""}`}).filter(Boolean)];return l&&p.push("base64"),(p.length>0||u&&u!==Iji)&&p.unshift(u),`data:${p.join(";")},${l?o.trim():o}${s?`#${s}`:""}`},"normalizeDataURL");function Rji(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return wji(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let o=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&o.protocol==="https:"&&(o.protocol="http:"),e.forceHttps&&o.protocol==="http:"&&(o.protocol="https:"),e.stripAuthentication&&(o.username="",o.password=""),e.stripHash?o.hash="":e.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,"")),o.pathname){let c=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,l=0,u="";for(;;){let p=c.exec(o.pathname);if(!p)break;let h=p[0],m=p.index,g=o.pathname.slice(l,m);u+=g.replace(/\/{2,}/g,"/"),u+=h,l=m+h.length}let d=o.pathname.slice(l,o.pathname.length);u+=d.replace(/\/{2,}/g,"/"),o.pathname=u}if(o.pathname)try{o.pathname=decodeURI(o.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=o.pathname.split("/"),l=c[c.length-1];cFr(l,e.removeDirectoryIndex)&&(c=c.slice(0,-1),o.pathname=c.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let c of[...o.searchParams.keys()])cFr(c,e.removeQueryParameters)&&o.searchParams.delete(c);if(e.removeQueryParameters===!0&&(o.search=""),e.sortQueryParameters){o.searchParams.sort();try{o.search=decodeURIComponent(o.search)}catch{}}e.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,""));let s=t;return t=o.toString(),!e.removeSingleSlash&&o.pathname==="/"&&!s.endsWith("/")&&o.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||o.pathname==="/")&&o.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}a(Rji,"normalizeUrl");var Pji=Object.freeze({__proto__:null,default:Rji}),kji=Sji(Pji);Object.defineProperty(lFr,"__esModule",{value:!0});var Dji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nji=kji,Mji=uFr(Nji),Oji=Tji.default,Bji=uFr(Oji);function uFr(t){return t&&t.__esModule?t:{default:t}}a(uFr,"_interopRequireDefault");var dFr=a(function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=/^(?:([a-zA-Z_][a-zA-Z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:](([\~,\.\w,\-,\_,\/,\s]|%[0-9A-Fa-f]{2})+?(?:\.git|\/)?)$/,o=a(function(u){var d=new Error(u);throw d.subject_url=e,d},"throwErr");(typeof e!="string"||!e.trim())&&o("Invalid url."),e.length>t.MAX_INPUT_LENGTH&&o("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),r&&((typeof r>"u"?"undefined":Dji(r))!=="object"&&(r={stripHash:!1}),e=(0,Mji.default)(e,r));var s=(0,Bji.default)(e);if(s.parse_failed){var c=s.href.match(n);c?(s.protocols=["ssh"],s.protocol="ssh",s.resource=c[2],s.host=c[2],s.user=c[1],s.pathname="/"+c[3],s.parse_failed=!1):o("URL parsing failed.")}return s},"parseUrl");dFr.MAX_INPUT_LENGTH=2048;var Lji=lFr.default=dFr;fFr.exports=Lji});var gFr=T((Qal,mFr)=>{"use strict";f();var Fji=LSt();function hFr(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=Fji(t);if(t=t.substring(t.indexOf("://")+3),hFr(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@"){"use strict";f();var Uji=pFr(),AFr=gFr();function Qji(t){let e=Uji(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),AFr(e.protocols)||e.protocols.length===0&&AFr(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}a(Qji,"gitUp");yFr.exports=Qji});var CFr=T((Val,_Fr)=>{"use strict";f();var qji=EFr();function FSt(t,e){if(e=e||[],typeof t!="string")throw new Error("The url must be a string.");if(!e.every(function(v){return typeof v=="string"}))throw new Error("The refs should contain only strings");var r=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;r.test(t)&&(t="https://github.com/"+t);var n=qji(t),o=n.resource.split("."),s=null;switch(n.toString=function(v){return FSt.stringify(this,v)},n.source=o.length>2?o.slice(1-o.length).join("."):n.source=n.resource,n.git_suffix=/\.git$/.test(n.pathname),n.name=decodeURIComponent((n.pathname||n.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),n.owner=decodeURIComponent(n.user),n.source){case"git.cloudforge.com":n.owner=n.user,n.organization=o[0],n.source="cloudforge.com";break;case"visualstudio.com":if(n.resource==="vs-ssh.visualstudio.com"){s=n.name.split("/"),s.length===4&&(n.organization=s[1],n.owner=s[2],n.name=s[3],n.full_name=s[2]+"/"+s[3]);break}else{s=n.name.split("/"),s.length===2?(n.owner=s[1],n.name=s[1],n.full_name="_git/"+n.name):s.length===3?(n.name=s[2],s[0]==="DefaultCollection"?(n.owner=s[2],n.organization=s[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=s[0],n.full_name=n.owner+"/_git/"+n.name)):s.length===4&&(n.organization=s[0],n.owner=s[1],n.name=s[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name);break}case"dev.azure.com":case"azure.com":if(n.resource==="ssh.dev.azure.com"){s=n.name.split("/"),s.length===4&&(n.organization=s[1],n.owner=s[2],n.name=s[3]);break}else{s=n.name.split("/"),s.length===5?(n.organization=s[0],n.owner=s[1],n.name=s[4],n.full_name="_git/"+n.name):s.length===3?(n.name=s[2],s[0]==="DefaultCollection"?(n.owner=s[2],n.organization=s[0],n.full_name=n.organization+"/_git/"+n.name):(n.owner=s[0],n.full_name=n.owner+"/_git/"+n.name)):s.length===4&&(n.organization=s[0],n.owner=s[1],n.name=s[3],n.full_name=n.organization+"/"+n.owner+"/_git/"+n.name),n.query&&n.query.path&&(n.filepath=n.query.path.replace(/^\/+/g,"")),n.query&&n.query.version&&(n.ref=n.query.version.replace(/^GB/,""));break}default:s=n.name.split("/");var c=s.length-1;if(s.length>=2){var l=s.indexOf("-",2),u=s.indexOf("blob",2),d=s.indexOf("tree",2),p=s.indexOf("commit",2),h=s.indexOf("issues",2),m=s.indexOf("src",2),g=s.indexOf("raw",2),A=s.indexOf("edit",2);c=l>0?l-1:u>0&&d>0?Math.min(u-1,d-1):u>0?u-1:h>0?h-1:d>0?d-1:p>0?p-1:m>0?m-1:g>0?g-1:A>0?A-1:c,n.owner=s.slice(0,c).join("/"),n.name=s[c],p&&h<0&&(n.commit=s[c+2])}n.ref="",n.filepathtype="",n.filepath="";var y=s.length>c&&s[c+1]==="-"?c+1:c;s.length>y+2&&["raw","src","blob","tree","edit"].indexOf(s[y+1])>=0&&(n.filepathtype=s[y+1],n.ref=s[y+2],s.length>y+3&&(n.filepath=s.slice(y+3).join("/"))),n.organization=n.owner;break}n.full_name||(n.full_name=n.owner,n.name&&(n.full_name&&(n.full_name+="/"),n.full_name+=n.name)),n.owner.startsWith("scm/")&&(n.source="bitbucket-server",n.owner=n.owner.replace("scm/",""),n.organization=n.owner,n.full_name=n.owner+"/"+n.name);var E=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,_=E.exec(n.pathname);return _!=null&&(n.source="bitbucket-server",_[1]==="users"?n.owner="~"+_[2]:n.owner=_[2],n.organization=n.owner,n.name=_[3],s=_[4].split("/"),s.length>1&&(["raw","browse"].indexOf(s[1])>=0?(n.filepathtype=s[1],s.length>2&&(n.filepath=s.slice(2).join("/"))):s[1]==="commits"&&s.length>2&&(n.commit=s[2])),n.full_name=n.owner+"/"+n.name,n.query.at?n.ref=n.query.at:n.ref=""),e.length!==0&&n.ref&&(n.ref=jji(n.href,e)||n.ref,n.filepath=n.href.split(n.ref+"/")[1]),n}a(FSt,"gitUrlParse");FSt.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",n=t.user||"git",o=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+n+"@"+t.resource+r+"/"+t.full_name+o:n+"@"+t.resource+":"+t.full_name+o;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+n+"@"+t.resource+r+"/"+t.full_name+o;case"http":case"https":var s=t.token?Gji(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+s+t.resource+r+"/"+Hji(t)+o;default:return t.href}};function Gji(t){return t.source==="bitbucket.org"?"x-token-auth:"+t.token+"@":t.token+"@"}a(Gji,"buildToken");function Hji(t){if(t.source==="bitbucket-server")return"scm/"+t.full_name;var e=t.full_name.split("/").map(function(r){return encodeURIComponent(r)}).join("/");return e}a(Hji,"buildPath");function jji(t,e){var r="";return e.forEach(function(n){t.includes(n)&&n.length>r.length&&(r=n)}),r}a(jji,"findLongestMatchingSubstring");_Fr.exports=FSt});var Fte=T((exports,module)=>{f();var Module=typeof Module<"u"?Module:{},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",TreeSitter=(function(){var initPromise,document=typeof window=="object"?{currentScript:window.document.currentScript}:null;class Parser{static{a(this,"Parser")}constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise(resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=a((t,e)=>{throw e},"quit_"),scriptDirectory="";function locateFile(t){return Module.locateFile?Module.locateFile(t,scriptDirectory):scriptDirectory+t}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs"),nodePath=require("path");scriptDirectory=__dirname+"/",readBinary=a(t=>{t=isFileURI(t)?new URL(t):nodePath.normalize(t);var e=fs.readFileSync(t);return e},"readBinary"),readAsync=a((t,e=!0)=>(t=isFileURI(t)?new URL(t):nodePath.normalize(t),new Promise((r,n)=>{fs.readFile(t,e?void 0:"utf8",(o,s)=>{o?n(o):r(e?s.buffer:s)})})),"readAsync"),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),quit_=a((t,e)=>{throw process.exitCode=t,e},"quit_")}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=a(t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},"readBinary")),readAsync=a(t=>isFileURI(t)?new Promise((e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{(n.status==200||n.status==0&&n.response)&&r(n.response),e(n.status)},n.onerror=e,n.send(null)}):fetch(t,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url))),"readAsync"));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var wasmMemory,ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP_DATA_VIEW;function updateMemoryViews(){var t=wasmMemory.buffer;Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(t),Module.HEAP8=HEAP8=new Int8Array(t),Module.HEAP16=HEAP16=new Int16Array(t),Module.HEAPU8=HEAPU8=new Uint8Array(t),Module.HEAPU16=HEAPU16=new Uint16Array(t),Module.HEAP32=HEAP32=new Int32Array(t),Module.HEAPU32=HEAPU32=new Uint32Array(t),Module.HEAPF32=HEAPF32=new Float32Array(t),Module.HEAPF64=HEAPF64=new Float64Array(t)}if(a(updateMemoryViews,"updateMemoryViews"),Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:2147483648/65536})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}a(initRuntime,"initRuntime");function preMain(){callRuntimeCallbacks(__ATMAIN__)}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}a(postRun,"postRun");function addOnPreRun(t){__ATPRERUN__.unshift(t)}a(addOnPreRun,"addOnPreRun");function addOnInit(t){__ATINIT__.unshift(t)}a(addOnInit,"addOnInit");function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}a(addOnPostRun,"addOnPostRun");var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}a(getUniqueRunDependency,"getUniqueRunDependency");function addRunDependency(t){runDependencies++,Module.monitorRunDependencies?.(runDependencies)}a(addRunDependency,"addRunDependency");function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}a(removeRunDependency,"removeRunDependency");function abort(t){Module.onAbort?.(t),t="Aborted("+t+")",err(t),ABORT=!0,EXITSTATUS=1,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw e}a(abort,"abort");var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=a(t=>t.startsWith(dataURIPrefix),"isDataURI"),isFileURI=a(t=>t.startsWith("file://"),"isFileURI");function findWasmBinary(){var t="tree-sitter.wasm";return isDataURI(t)?t:locateFile(t)}a(findWasmBinary,"findWasmBinary");var wasmBinaryFile;function getBinarySync(t){if(t==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(t);throw"both async and sync fetching of the wasm failed"}a(getBinarySync,"getBinarySync");function getBinaryPromise(t){return wasmBinary?Promise.resolve().then(()=>getBinarySync(t)):readAsync(t).then(e=>new Uint8Array(e),()=>getBinarySync(t))}a(getBinaryPromise,"getBinaryPromise");function instantiateArrayBuffer(t,e,r){return getBinaryPromise(t).then(n=>WebAssembly.instantiate(n,e)).then(r,n=>{err(`failed to asynchronously prepare wasm: ${n}`),abort(n)})}a(instantiateArrayBuffer,"instantiateArrayBuffer");function instantiateAsync(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(e)&&!isFileURI(e)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(o=>{var s=WebAssembly.instantiateStreaming(o,r);return s.then(n,function(c){return err(`wasm streaming compile failed: ${c}`),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(e,r,n)})}):instantiateArrayBuffer(e,r,n)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");function createWasm(){var t=getWasmImports();function e(n,o){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var s=getDylinkMetadata(o);return s.neededDynlibs&&(dynamicLibraries=s.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),wasmExports}a(e,"receiveInstance"),addRunDependency("wasm-instantiate");function r(n){e(n.instance,n.module)}if(a(r,"receiveInstantiationResult"),Module.instantiateWasm)try{return Module.instantiateWasm(t,e)}catch(n){return err(`Module.instantiateWasm callback failed with error: ${n}`),!1}return wasmBinaryFile||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,t,r),{}}a(createWasm,"createWasm");var ASM_CONSTS={};function ExitStatus(t){this.name="ExitStatus",this.message=`Program terminated with exit(${t})`,this.status=t}a(ExitStatus,"ExitStatus");var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(t,e){var r=GOT[e];return r||(r=GOT[e]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(e)||(r.required=!0),r}},LE_HEAP_LOAD_F32=a(t=>HEAP_DATA_VIEW.getFloat32(t,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(t=>HEAP_DATA_VIEW.getFloat64(t,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(t=>HEAP_DATA_VIEW.getInt16(t,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(t=>HEAP_DATA_VIEW.getInt32(t,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_U32=a(t=>HEAP_DATA_VIEW.getUint32(t,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((t,e)=>HEAP_DATA_VIEW.setFloat32(t,e,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((t,e)=>HEAP_DATA_VIEW.setFloat64(t,e,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((t,e)=>HEAP_DATA_VIEW.setInt16(t,e,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((t,e)=>HEAP_DATA_VIEW.setInt32(t,e,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_U32=a((t,e)=>HEAP_DATA_VIEW.setUint32(t,e,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(t=>{for(;t.length>0;)t.shift()(Module)},"callRuntimeCallbacks"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,UTF8ArrayToString=a((t,e,r)=>{for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,o));for(var s="";e>10,56320|d&1023)}}return s},"UTF8ArrayToString"),getDylinkMetadata=a(t=>{var e=0,r=0;function n(){return t[e++]}a(n,"getU8");function o(){for(var G=0,O=1;;){var D=t[e++];if(G+=(D&127)*O,O*=128,!(D&128))break}return G}a(o,"getLEB");function s(){var G=o();return e+=G,UTF8ArrayToString(t,e-G,G)}a(s,"getString");function c(G,O){if(G)throw new Error(O)}a(c,"failIf");var l="dylink.0";if(t instanceof WebAssembly.Module){var u=WebAssembly.Module.customSections(t,l);u.length===0&&(l="dylink",u=WebAssembly.Module.customSections(t,l)),c(u.length===0,"need dylink section"),t=new Uint8Array(u[0]),r=t.length}else{var d=new Uint32Array(new Uint8Array(t.subarray(0,24)).buffer),p=d[0]==1836278016||d[0]==6386541;c(!p,"need to see wasm magic number"),c(t[8]!==0,"need the dylink section to be first"),e=9;var h=o();r=e+h,l=s()}var m={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(l=="dylink"){m.memorySize=o(),m.memoryAlign=o(),m.tableSize=o(),m.tableAlign=o();for(var g=o(),A=0;A>1)*2);case"i32":return LE_HEAP_LOAD_I32((t>>2)*4);case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return LE_HEAP_LOAD_F32((t>>2)*4);case"double":return LE_HEAP_LOAD_F64((t>>3)*8);case"*":return LE_HEAP_LOAD_U32((t>>2)*4);default:abort(`invalid type for getValue: ${e}`)}}a(getValue,"getValue");var newDSO=a((t,e,r)=>{var n={refcount:1/0,name:t,exports:r,global:!0};return LDSO.loadedLibsByName[t]=n,e!=null&&(LDSO.loadedLibsByHandle[e]=n),n},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78112,zeroMemory=a((t,e)=>(HEAPU8.fill(0,t,t+e),t),"zeroMemory"),alignMemory=a((t,e)=>Math.ceil(t/e)*e,"alignMemory"),getMemory=a(t=>{if(runtimeInitialized)return zeroMemory(_malloc(t),t);var e=___heap_base,r=e+alignMemory(t,16);return ___heap_base=r,GOT.__heap_base.value=r,e},"getMemory"),isInternalSym=a(t=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(t)||t.startsWith("__em_js__"),"isInternalSym"),uleb128Encode=a((t,e)=>{t<128?e.push(t):e.push(t%128|128,t>>7)},"uleb128Encode"),sigToWasmTypes=a(t=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:t[0]=="v"?[]:[e[t[0]]]},n=1;n{var r=t.slice(0,1),n=t.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96),uleb128Encode(n.length,e);for(var s=0;s{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(e),t);var r=[1];generateFuncType(e,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n)),s=new WebAssembly.Instance(o,{e:{f:t}}),c=s.exports.f;return c},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:28,element:"anyfunc"}),getWasmTableEntry=a(t=>{var e=wasmTableMirror[t];return e||(t>=wasmTableMirror.length&&(wasmTableMirror.length=t+1),wasmTableMirror[t]=e=wasmTable.get(t)),e},"getWasmTableEntry"),updateTableMap=a((t,e)=>{if(functionsInTableMap)for(var r=t;r(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(t)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(t){throw t instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":t}return wasmTable.length-1},"getEmptyTableSlot"),setWasmTableEntry=a((t,e)=>{wasmTable.set(t,e),wasmTableMirror[t]=wasmTable.get(t)},"setWasmTableEntry"),addFunction=a((t,e)=>{var r=getFunctionAddress(t);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,t)}catch(s){if(!(s instanceof TypeError))throw s;var o=convertJsFunctionToWasm(t,e);setWasmTableEntry(n,o)}return functionsInTableMap.set(t,n),n},"addFunction"),updateGOT=a((t,e)=>{for(var r in t)if(!isInternalSym(r)){var n=t[r];r.startsWith("orig$")&&(r=r.split("$")[1],e=!0),GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(e||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},"updateGOT"),relocateExports=a((t,e,r)=>{var n={};for(var o in t){var s=t[o];typeof s=="object"&&(s=s.value),typeof s=="number"&&(s+=e),n[o]=s}return updateGOT(n,r),n},"relocateExports"),isSymbolDefined=a(t=>{var e=wasmImports[t];return!(!e||e.stub)},"isSymbolDefined"),dynCallLegacy=a((t,e,r)=>{t=t.replace(/p/g,"i");var n=Module["dynCall_"+t];return n(e,...r)},"dynCallLegacy"),dynCall=a((t,e,r=[])=>{if(t.includes("j"))return dynCallLegacy(t,e,r);var n=getWasmTableEntry(e)(...r);return n},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(t=>__emscripten_stack_restore(t),"stackRestore"),createInvokeFunction=a(t=>(e,...r)=>{var n=stackSave();try{return dynCall(t,e,r)}catch(o){if(stackRestore(n),o!==o+0)throw o;_setThrew(1,0)}},"createInvokeFunction"),resolveGlobalSymbol=a((t,e=!1)=>{var r;return e&&"orig$"+t in wasmImports&&(t="orig$"+t),isSymbolDefined(t)?r=wasmImports[t]:t.startsWith("invoke_")&&(r=wasmImports[t]=createInvokeFunction(t.split("_")[1])),{sym:r,name:t}},"resolveGlobalSymbol"),UTF8ToString=a((t,e)=>t?UTF8ArrayToString(HEAPU8,t,e):"","UTF8ToString"),loadWebAssemblyModule=a((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize))}else memoryBase=LE_HEAP_LOAD_U32((handle+12>>2)*4),tableBase=LE_HEAP_LOAD_U32((handle+20>>2)*4);var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(t){var e=resolveGlobalSymbol(t).sym;return!e&&localScope&&(e=localScope[t]),e||(e=moduleExports[t]),e}a(resolveSymbol,"resolveSymbol");var proxyHandler={get(t,e){switch(e){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(e in wasmImports&&!wasmImports[e].stub)return wasmImports[e];if(!(e in t)){var r;t[e]=(...n)=>(r||=resolveSymbol(e),r(...n))}return t[e]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(a(addEmAsm,"addEmAsm"),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ${body};`;moduleExports[name]=eval(func)}a(addEmJs,"addEmJs");for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(a(postInstantiation,"postInstantiation"),flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(t=>postInstantiation(t.module,t.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return a(loadModule,"loadModule"),flags.loadAsync?metadata.neededDynlibs.reduce((t,e)=>t.then(()=>loadDynamicLibrary(e,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(t=>loadDynamicLibrary(t,flags,localScope)),loadModule())},"loadWebAssemblyModule"),mergeLibSymbols=a((t,e)=>{for(var[r,n]of Object.entries(t)){let o=a(c=>{isSymbolDefined(c)||(wasmImports[c]=n)},"setImport");o(r);let s="__main_argc_argv";r=="main"&&o(s),r==s&&o("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=n)}},"mergeLibSymbols"),asyncLoad=a((t,e,r,n)=>{var o=n?"":`al ${t}`;readAsync(t).then(s=>{e(new Uint8Array(s)),o&&removeRunDependency(o)},s=>{if(r)r();else throw`Loading data file "${t}" failed.`}),o&&addRunDependency(o)},"asyncLoad");function loadDynamicLibrary(t,e={global:!0,nodelete:!0},r,n){var o=LDSO.loadedLibsByName[t];if(o)return e.global?o.global||(o.global=!0,mergeLibSymbols(o.exports,t)):r&&Object.assign(r,o.exports),e.nodelete&&o.refcount!==1/0&&(o.refcount=1/0),o.refcount++,n&&(LDSO.loadedLibsByHandle[n]=o),e.loadAsync?Promise.resolve(!0):!0;o=newDSO(t,n,"loading"),o.refcount=e.nodelete?1/0:1,o.global=e.global;function s(){if(n){var u=LE_HEAP_LOAD_U32((n+28>>2)*4),d=LE_HEAP_LOAD_U32((n+32>>2)*4);if(u&&d){var p=HEAP8.slice(u,u+d);return e.loadAsync?Promise.resolve(p):p}}var h=locateFile(t);if(e.loadAsync)return new Promise(function(m,g){asyncLoad(h,m,g)});if(!readBinary)throw new Error(`${h}: file not found, and synchronous loading of external files is not available`);return readBinary(h)}a(s,"loadLibData");function c(){return e.loadAsync?s().then(u=>loadWebAssemblyModule(u,e,t,r,n)):loadWebAssemblyModule(s(),e,t,r,n)}a(c,"getExports");function l(u){o.global?mergeLibSymbols(u,t):r&&Object.assign(r,u),o.exports=u}return a(l,"moduleLoaded"),e.loadAsync?c().then(u=>(l(u),!0)):(l(c()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{for(var[t,e]of Object.entries(GOT))if(e.value==0){var r=resolveGlobalSymbol(t,!0).sym;if(!r&&!e.required)continue;if(typeof r=="function")e.value=addFunction(r,r.sig);else if(typeof r=="number")e.value=r;else throw new Error(`bad export type for '${t}': ${typeof r}`)}},"reportUndefinedSymbols"),loadDylibs=a(()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs"),dynamicLibraries.reduce((t,e)=>t.then(()=>loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")})},"loadDylibs"),noExitRuntime=Module.noExitRuntime||!0;function setValue(t,e,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[t]=e;break;case"i8":HEAP8[t]=e;break;case"i16":LE_HEAP_STORE_I16((t>>1)*2,e);break;case"i32":LE_HEAP_STORE_I32((t>>2)*4,e);break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":LE_HEAP_STORE_F32((t>>2)*4,e);break;case"double":LE_HEAP_STORE_F64((t>>3)*8,e);break;case"*":LE_HEAP_STORE_U32((t>>2)*4,e);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78112),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>{abort("")},"__abort_js");__abort_js.sig="v";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=a(()=>nowIsMonotonic,"__emscripten_get_now_is_monotonic");__emscripten_get_now_is_monotonic.sig="i";var __emscripten_memcpy_js=a((t,e,r)=>HEAPU8.copyWithin(t,e,e+r),"__emscripten_memcpy_js");__emscripten_memcpy_js.sig="vppp";var _emscripten_date_now=a(()=>Date.now(),"_emscripten_date_now");_emscripten_date_now.sig="d";var _emscripten_get_now;_emscripten_get_now=a(()=>performance.now(),"_emscripten_get_now"),_emscripten_get_now.sig="d";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(t=>{var e=wasmMemory.buffer,r=(t-e.byteLength+65535)/65536;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(t=>{var e=HEAPU8.length;t>>>=0;var r=getHeapMax();if(t>r)return!1;for(var n=a((u,d)=>u+(d-u%d)%d,"alignUp"),o=1;o<=4;o*=2){var s=e*(1+.2/o);s=Math.min(s,t+100663296);var c=Math.min(r,n(Math.max(t,s),65536)),l=growMemory(c);if(l)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=a(t=>52,"_fd_close");_fd_close.sig="ii";var convertI32PairToI53Checked=a((t,e)=>e+2097152>>>0<4194305-!!t?(t>>>0)+e*4294967296:NaN,"convertI32PairToI53Checked");function _fd_seek(t,e,r,n,o){var s=convertI32PairToI53Checked(e,r);return 70}a(_fd_seek,"_fd_seek"),_fd_seek.sig="iiiiip";var printCharBuffers=[null,[],[]],printChar=a((t,e)=>{var r=printCharBuffers[t];e===0||e===10?((t===1?out:err)(UTF8ArrayToString(r,0)),r.length=0):r.push(e)},"printChar"),_fd_write=a((t,e,r,n)=>{for(var o=0,s=0;s>2)*4),l=LE_HEAP_LOAD_U32((e+4>>2)*4);e+=8;for(var u=0;u>2)*4,o),0},"_fd_write");_fd_write.sig="iippp";function _tree_sitter_log_callback(t,e){if(currentLogCallback){let r=UTF8ToString(e);currentLogCallback(r,t!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(t,e,r,n,o){let c=currentParseCallback(e,{row:r,column:n});typeof c=="string"?(setValue(o,c.length,"i32"),stringToUTF16(c,t,10240)):setValue(o,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(t=>{EXITSTATUS=t,keepRuntimeAlive()||(Module.onExit?.(t),ABORT=!0),quit_(t,new ExitStatus(t))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((t,e)=>{EXITSTATUS=t,_proc_exit(t)},"exitJS"),handleException=a(t=>{if(t instanceof ExitStatus||t=="unwind")return EXITSTATUS;quit_(1,t)},"handleException"),lengthBytesUTF8=a(t=>{for(var e=0,r=0;r=55296&&n<=57343?(e+=4,++r):e+=3}return e},"lengthBytesUTF8"),stringToUTF8Array=a((t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,s=r+n-1,c=0;c=55296&&l<=57343){var u=t.charCodeAt(++c);l=65536+((l&1023)<<10)|u&1023}if(l<=127){if(r>=s)break;e[r++]=l}else if(l<=2047){if(r+1>=s)break;e[r++]=192|l>>6,e[r++]=128|l&63}else if(l<=65535){if(r+2>=s)break;e[r++]=224|l>>12,e[r++]=128|l>>6&63,e[r++]=128|l&63}else{if(r+3>=s)break;e[r++]=240|l>>18,e[r++]=128|l>>12&63,e[r++]=128|l>>6&63,e[r++]=128|l&63}}return e[r]=0,r-o},"stringToUTF8Array"),stringToUTF8=a((t,e,r)=>stringToUTF8Array(t,HEAPU8,e,r),"stringToUTF8"),stackAlloc=a(t=>__emscripten_stack_alloc(t),"stackAlloc"),stringToUTF8OnStack=a(t=>{var e=lengthBytesUTF8(t)+1,r=stackAlloc(e);return stringToUTF8(t,r,e),r},"stringToUTF8OnStack"),stringToUTF16=a((t,e,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var n=e,o=r>1)*2,c),e+=2}return LE_HEAP_STORE_I16((e>>1)*2,0),e-n},"stringToUTF16"),AsciiToString=a(t=>{for(var e="";;){var r=HEAPU8[t++];if(!r)return e;e+=String.fromCharCode(r)}},"AsciiToString"),wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_memcpy_js:__emscripten_memcpy_js,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},wasmExports=createWasm(),___wasm_call_ctors=a(()=>(___wasm_call_ctors=wasmExports.__wasm_call_ctors)(),"___wasm_call_ctors"),___wasm_apply_data_relocs=a(()=>(___wasm_apply_data_relocs=wasmExports.__wasm_apply_data_relocs)(),"___wasm_apply_data_relocs"),_malloc=Module._malloc=t=>(_malloc=Module._malloc=wasmExports.malloc)(t),_calloc=Module._calloc=(t,e)=>(_calloc=Module._calloc=wasmExports.calloc)(t,e),_realloc=Module._realloc=(t,e)=>(_realloc=Module._realloc=wasmExports.realloc)(t,e),_free=Module._free=t=>(_free=Module._free=wasmExports.free)(t),_ts_language_symbol_count=Module._ts_language_symbol_count=t=>(_ts_language_symbol_count=Module._ts_language_symbol_count=wasmExports.ts_language_symbol_count)(t),_ts_language_state_count=Module._ts_language_state_count=t=>(_ts_language_state_count=Module._ts_language_state_count=wasmExports.ts_language_state_count)(t),_ts_language_version=Module._ts_language_version=t=>(_ts_language_version=Module._ts_language_version=wasmExports.ts_language_version)(t),_ts_language_field_count=Module._ts_language_field_count=t=>(_ts_language_field_count=Module._ts_language_field_count=wasmExports.ts_language_field_count)(t),_ts_language_next_state=Module._ts_language_next_state=(t,e,r)=>(_ts_language_next_state=Module._ts_language_next_state=wasmExports.ts_language_next_state)(t,e,r),_ts_language_symbol_name=Module._ts_language_symbol_name=(t,e)=>(_ts_language_symbol_name=Module._ts_language_symbol_name=wasmExports.ts_language_symbol_name)(t,e),_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=(t,e,r,n)=>(_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=wasmExports.ts_language_symbol_for_name)(t,e,r,n),_strncmp=Module._strncmp=(t,e,r)=>(_strncmp=Module._strncmp=wasmExports.strncmp)(t,e,r),_ts_language_symbol_type=Module._ts_language_symbol_type=(t,e)=>(_ts_language_symbol_type=Module._ts_language_symbol_type=wasmExports.ts_language_symbol_type)(t,e),_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=(t,e)=>(_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=wasmExports.ts_language_field_name_for_id)(t,e),_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=(t,e)=>(_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=wasmExports.ts_lookahead_iterator_new)(t,e),_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=t=>(_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=wasmExports.ts_lookahead_iterator_delete)(t),_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=(t,e)=>(_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=wasmExports.ts_lookahead_iterator_reset_state)(t,e),_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=(t,e,r)=>(_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=wasmExports.ts_lookahead_iterator_reset)(t,e,r),_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=t=>(_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=wasmExports.ts_lookahead_iterator_next)(t),_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=t=>(_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=wasmExports.ts_lookahead_iterator_current_symbol)(t),_memset=Module._memset=(t,e,r)=>(_memset=Module._memset=wasmExports.memset)(t,e,r),_memcpy=Module._memcpy=(t,e,r)=>(_memcpy=Module._memcpy=wasmExports.memcpy)(t,e,r),_ts_parser_delete=Module._ts_parser_delete=t=>(_ts_parser_delete=Module._ts_parser_delete=wasmExports.ts_parser_delete)(t),_ts_parser_reset=Module._ts_parser_reset=t=>(_ts_parser_reset=Module._ts_parser_reset=wasmExports.ts_parser_reset)(t),_ts_parser_set_language=Module._ts_parser_set_language=(t,e)=>(_ts_parser_set_language=Module._ts_parser_set_language=wasmExports.ts_parser_set_language)(t,e),_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=t=>(_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=wasmExports.ts_parser_timeout_micros)(t),_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=(t,e,r)=>(_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=wasmExports.ts_parser_set_timeout_micros)(t,e,r),_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=(t,e,r)=>(_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=wasmExports.ts_parser_set_included_ranges)(t,e,r),_memmove=Module._memmove=(t,e,r)=>(_memmove=Module._memmove=wasmExports.memmove)(t,e,r),_memcmp=Module._memcmp=(t,e,r)=>(_memcmp=Module._memcmp=wasmExports.memcmp)(t,e,r),_ts_query_new=Module._ts_query_new=(t,e,r,n,o)=>(_ts_query_new=Module._ts_query_new=wasmExports.ts_query_new)(t,e,r,n,o),_ts_query_delete=Module._ts_query_delete=t=>(_ts_query_delete=Module._ts_query_delete=wasmExports.ts_query_delete)(t),_iswspace=Module._iswspace=t=>(_iswspace=Module._iswspace=wasmExports.iswspace)(t),_iswalnum=Module._iswalnum=t=>(_iswalnum=Module._iswalnum=wasmExports.iswalnum)(t),_ts_query_pattern_count=Module._ts_query_pattern_count=t=>(_ts_query_pattern_count=Module._ts_query_pattern_count=wasmExports.ts_query_pattern_count)(t),_ts_query_capture_count=Module._ts_query_capture_count=t=>(_ts_query_capture_count=Module._ts_query_capture_count=wasmExports.ts_query_capture_count)(t),_ts_query_string_count=Module._ts_query_string_count=t=>(_ts_query_string_count=Module._ts_query_string_count=wasmExports.ts_query_string_count)(t),_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=(t,e,r)=>(_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=wasmExports.ts_query_capture_name_for_id)(t,e,r),_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=(t,e,r)=>(_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=wasmExports.ts_query_string_value_for_id)(t,e,r),_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=(t,e,r)=>(_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=wasmExports.ts_query_predicates_for_pattern)(t,e,r),_ts_query_disable_capture=Module._ts_query_disable_capture=(t,e,r)=>(_ts_query_disable_capture=Module._ts_query_disable_capture=wasmExports.ts_query_disable_capture)(t,e,r),_ts_tree_copy=Module._ts_tree_copy=t=>(_ts_tree_copy=Module._ts_tree_copy=wasmExports.ts_tree_copy)(t),_ts_tree_delete=Module._ts_tree_delete=t=>(_ts_tree_delete=Module._ts_tree_delete=wasmExports.ts_tree_delete)(t),_ts_init=Module._ts_init=()=>(_ts_init=Module._ts_init=wasmExports.ts_init)(),_ts_parser_new_wasm=Module._ts_parser_new_wasm=()=>(_ts_parser_new_wasm=Module._ts_parser_new_wasm=wasmExports.ts_parser_new_wasm)(),_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=(t,e)=>(_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=wasmExports.ts_parser_enable_logger_wasm)(t,e),_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=(t,e,r,n,o)=>(_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=wasmExports.ts_parser_parse_wasm)(t,e,r,n,o),_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=t=>(_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=wasmExports.ts_parser_included_ranges_wasm)(t),_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=(t,e)=>(_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=wasmExports.ts_language_type_is_named_wasm)(t,e),_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=(t,e)=>(_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=wasmExports.ts_language_type_is_visible_wasm)(t,e),_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=t=>(_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=wasmExports.ts_tree_root_node_wasm)(t),_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=t=>(_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=wasmExports.ts_tree_root_node_with_offset_wasm)(t),_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=t=>(_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=wasmExports.ts_tree_edit_wasm)(t),_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=t=>(_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=wasmExports.ts_tree_included_ranges_wasm)(t),_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=(t,e)=>(_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=wasmExports.ts_tree_get_changed_ranges_wasm)(t,e),_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=t=>(_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=wasmExports.ts_tree_cursor_new_wasm)(t),_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=t=>(_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=wasmExports.ts_tree_cursor_delete_wasm)(t),_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=t=>(_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=wasmExports.ts_tree_cursor_reset_wasm)(t),_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=(t,e)=>(_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=wasmExports.ts_tree_cursor_reset_to_wasm)(t,e),_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=t=>(_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=wasmExports.ts_tree_cursor_goto_first_child_wasm)(t),_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=t=>(_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=wasmExports.ts_tree_cursor_goto_last_child_wasm)(t),_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=t=>(_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_index_wasm)(t),_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=t=>(_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_position_wasm)(t),_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=t=>(_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=wasmExports.ts_tree_cursor_goto_next_sibling_wasm)(t),_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=t=>(_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=wasmExports.ts_tree_cursor_goto_previous_sibling_wasm)(t),_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=(t,e)=>(_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=wasmExports.ts_tree_cursor_goto_descendant_wasm)(t,e),_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=t=>(_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=wasmExports.ts_tree_cursor_goto_parent_wasm)(t),_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=t=>(_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=wasmExports.ts_tree_cursor_current_node_type_id_wasm)(t),_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=t=>(_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=wasmExports.ts_tree_cursor_current_node_state_id_wasm)(t),_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=t=>(_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=wasmExports.ts_tree_cursor_current_node_is_named_wasm)(t),_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=t=>(_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=wasmExports.ts_tree_cursor_current_node_is_missing_wasm)(t),_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=t=>(_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=wasmExports.ts_tree_cursor_current_node_id_wasm)(t),_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=t=>(_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=wasmExports.ts_tree_cursor_start_position_wasm)(t),_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=t=>(_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=wasmExports.ts_tree_cursor_end_position_wasm)(t),_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=t=>(_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=wasmExports.ts_tree_cursor_start_index_wasm)(t),_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=t=>(_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=wasmExports.ts_tree_cursor_end_index_wasm)(t),_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=t=>(_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=wasmExports.ts_tree_cursor_current_field_id_wasm)(t),_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=t=>(_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=wasmExports.ts_tree_cursor_current_depth_wasm)(t),_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=t=>(_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=wasmExports.ts_tree_cursor_current_descendant_index_wasm)(t),_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=t=>(_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=wasmExports.ts_tree_cursor_current_node_wasm)(t),_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=t=>(_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=wasmExports.ts_node_symbol_wasm)(t),_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=(t,e)=>(_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=wasmExports.ts_node_field_name_for_child_wasm)(t,e),_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=(t,e)=>(_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=wasmExports.ts_node_children_by_field_id_wasm)(t,e),_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=t=>(_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=wasmExports.ts_node_first_child_for_byte_wasm)(t),_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=t=>(_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=wasmExports.ts_node_first_named_child_for_byte_wasm)(t),_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=t=>(_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=wasmExports.ts_node_grammar_symbol_wasm)(t),_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=t=>(_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=wasmExports.ts_node_child_count_wasm)(t),_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=t=>(_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=wasmExports.ts_node_named_child_count_wasm)(t),_ts_node_child_wasm=Module._ts_node_child_wasm=(t,e)=>(_ts_node_child_wasm=Module._ts_node_child_wasm=wasmExports.ts_node_child_wasm)(t,e),_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=(t,e)=>(_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=wasmExports.ts_node_named_child_wasm)(t,e),_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=(t,e)=>(_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=wasmExports.ts_node_child_by_field_id_wasm)(t,e),_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=t=>(_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=wasmExports.ts_node_next_sibling_wasm)(t),_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=t=>(_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=wasmExports.ts_node_prev_sibling_wasm)(t),_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=t=>(_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=wasmExports.ts_node_next_named_sibling_wasm)(t),_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=t=>(_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=wasmExports.ts_node_prev_named_sibling_wasm)(t),_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=t=>(_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=wasmExports.ts_node_descendant_count_wasm)(t),_ts_node_parent_wasm=Module._ts_node_parent_wasm=t=>(_ts_node_parent_wasm=Module._ts_node_parent_wasm=wasmExports.ts_node_parent_wasm)(t),_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=t=>(_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=wasmExports.ts_node_descendant_for_index_wasm)(t),_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=t=>(_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=wasmExports.ts_node_named_descendant_for_index_wasm)(t),_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=t=>(_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=wasmExports.ts_node_descendant_for_position_wasm)(t),_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=t=>(_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=wasmExports.ts_node_named_descendant_for_position_wasm)(t),_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=t=>(_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=wasmExports.ts_node_start_point_wasm)(t),_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=t=>(_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=wasmExports.ts_node_end_point_wasm)(t),_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=t=>(_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=wasmExports.ts_node_start_index_wasm)(t),_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=t=>(_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=wasmExports.ts_node_end_index_wasm)(t),_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=t=>(_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=wasmExports.ts_node_to_string_wasm)(t),_ts_node_children_wasm=Module._ts_node_children_wasm=t=>(_ts_node_children_wasm=Module._ts_node_children_wasm=wasmExports.ts_node_children_wasm)(t),_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=t=>(_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=wasmExports.ts_node_named_children_wasm)(t),_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=(t,e,r,n,o,s,c)=>(_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=wasmExports.ts_node_descendants_of_type_wasm)(t,e,r,n,o,s,c),_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=t=>(_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=wasmExports.ts_node_is_named_wasm)(t),_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=t=>(_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=wasmExports.ts_node_has_changes_wasm)(t),_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=t=>(_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=wasmExports.ts_node_has_error_wasm)(t),_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=t=>(_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=wasmExports.ts_node_is_error_wasm)(t),_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=t=>(_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=wasmExports.ts_node_is_missing_wasm)(t),_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=t=>(_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=wasmExports.ts_node_is_extra_wasm)(t),_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=t=>(_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=wasmExports.ts_node_parse_state_wasm)(t),_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=t=>(_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=wasmExports.ts_node_next_parse_state_wasm)(t),_ts_query_matches_wasm=Module._ts_query_matches_wasm=(t,e,r,n,o,s,c,l,u,d)=>(_ts_query_matches_wasm=Module._ts_query_matches_wasm=wasmExports.ts_query_matches_wasm)(t,e,r,n,o,s,c,l,u,d),_ts_query_captures_wasm=Module._ts_query_captures_wasm=(t,e,r,n,o,s,c,l,u,d)=>(_ts_query_captures_wasm=Module._ts_query_captures_wasm=wasmExports.ts_query_captures_wasm)(t,e,r,n,o,s,c,l,u,d),_iswalpha=Module._iswalpha=t=>(_iswalpha=Module._iswalpha=wasmExports.iswalpha)(t),_iswblank=Module._iswblank=t=>(_iswblank=Module._iswblank=wasmExports.iswblank)(t),_iswdigit=Module._iswdigit=t=>(_iswdigit=Module._iswdigit=wasmExports.iswdigit)(t),_iswlower=Module._iswlower=t=>(_iswlower=Module._iswlower=wasmExports.iswlower)(t),_iswupper=Module._iswupper=t=>(_iswupper=Module._iswupper=wasmExports.iswupper)(t),_iswxdigit=Module._iswxdigit=t=>(_iswxdigit=Module._iswxdigit=wasmExports.iswxdigit)(t),_memchr=Module._memchr=(t,e,r)=>(_memchr=Module._memchr=wasmExports.memchr)(t,e,r),_strlen=Module._strlen=t=>(_strlen=Module._strlen=wasmExports.strlen)(t),_strcmp=Module._strcmp=(t,e)=>(_strcmp=Module._strcmp=wasmExports.strcmp)(t,e),_strncat=Module._strncat=(t,e,r)=>(_strncat=Module._strncat=wasmExports.strncat)(t,e,r),_strncpy=Module._strncpy=(t,e,r)=>(_strncpy=Module._strncpy=wasmExports.strncpy)(t,e,r),_towlower=Module._towlower=t=>(_towlower=Module._towlower=wasmExports.towlower)(t),_towupper=Module._towupper=t=>(_towupper=Module._towupper=wasmExports.towupper)(t),_setThrew=a((t,e)=>(_setThrew=wasmExports.setThrew)(t,e),"_setThrew"),__emscripten_stack_restore=a(t=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(t),"__emscripten_stack_restore"),__emscripten_stack_alloc=a(t=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(t),"__emscripten_stack_alloc"),_emscripten_stack_get_current=a(()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),"_emscripten_stack_get_current"),dynCall_jiji=Module.dynCall_jiji=(t,e,r,n,o)=>(dynCall_jiji=Module.dynCall_jiji=wasmExports.dynCall_jiji)(t,e,r,n,o),_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=t=>(_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=wasmExports.orig$ts_parser_timeout_micros)(t),_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=(t,e)=>(_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=wasmExports.orig$ts_parser_set_timeout_micros)(t,e);Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16;var calledRun;dependenciesFulfilled=a(function t(){calledRun||run(),calledRun||(dependenciesFulfilled=t)},"runCaller");function callMain(t=[]){var e=resolveGlobalSymbol("main").sym;if(e){t.unshift(thisProgram);var r=t.length,n=stackAlloc((r+1)*4),o=n;t.forEach(c=>{LE_HEAP_STORE_U32((o>>2)*4,stringToUTF8OnStack(c)),o+=4}),LE_HEAP_STORE_U32((o>>2)*4,0);try{var s=e(r,n);return exitJS(s,!0),s}catch(c){return handleException(c)}}}a(callMain,"callMain");function run(t=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function e(){calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),Module.onRuntimeInitialized?.(),shouldRunNow&&callMain(t),postRun()))}a(e,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}if(a(run,"run"),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();let C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/,VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static{a(this,"ParserImpl")}static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let r;if(!e)r=0,e=null;else if(e.constructor===Language){r=e[0];let n=C._ts_language_version(r);if(ne.slice(u),"currentParseCallback");else if(typeof e=="function")currentParseCallback=e;else throw new Error("Argument must be a string or a function");this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let o=0,s=0;if(n?.includedRanges){o=n.includedRanges.length,s=C._calloc(o,SIZE_OF_RANGE);let u=s;for(let d=0;d0){let o=r;for(let s=0;s0){let s=n;for(let c=0;c0){let o=r;for(let s=0;s0){let s=n;for(let c=0;c0){let n=r;for(let o=0;o0){let n=r;for(let o=0;o0){let p=u;for(let h=0;h0){if(v[0].type!=="string")throw new Error("Predicates must begin with a literal value");let R=v[0].value,P=!0,k=!0,Q;switch(R){case"any-not-eq?":case"not-eq?":P=!1;case"any-eq?":case"eq?":if(v.length!==3)throw new Error(`Wrong number of arguments to \`#${R}\` predicate. Expected 2, got ${v.length-1}`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${R}\` predicate must be a capture. Got "${v[1].value}"`);if(k=!R.startsWith("any-"),v[2].type==="capture"){let O=v[1].name,D=v[2].name;A[y].push(F=>{let U=[],L=[];for(let $ of F)$.name===O&&U.push($.node),$.name===D&&L.push($.node);let H=a(($,W,j)=>j?$.text===W.text:$.text!==W.text,"compare");return k?U.every($=>L.some(W=>H($,W,P))):U.some($=>L.some(W=>H($,W,P)))})}else{Q=v[1].name;let O=v[2].value,D=a(U=>U.text===O,"matches"),F=a(U=>U.text!==O,"doesNotMatch");A[y].push(U=>{let L=[];for(let $ of U)$.name===Q&&L.push($.node);let H=P?D:F;return k?L.every(H):L.some(H)})}break;case"any-not-match?":case"not-match?":P=!1;case"any-match?":case"match?":if(v.length!==3)throw new Error(`Wrong number of arguments to \`#${R}\` predicate. Expected 2, got ${v.length-1}.`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${R}\` predicate must be a capture. Got "${v[1].value}".`);if(v[2].type!=="string")throw new Error(`Second argument of \`#${R}\` predicate must be a string. Got @${v[2].value}.`);Q=v[1].name;let M=new RegExp(v[2].value);k=!R.startsWith("any-"),A[y].push(O=>{let D=[];for(let U of O)U.name===Q&&D.push(U.node.text);let F=a((U,L)=>L?M.test(U):!M.test(U),"test");return D.length===0?!P:k?D.every(U=>F(U,P)):D.some(U=>F(U,P))});break;case"set!":if(v.length<2||v.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${v.length-1}.`);if(v.some(O=>O.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');p[y]||(p[y]={}),p[y][v[1].value]=v[2]?v[2].value:null;break;case"is?":case"is-not?":if(v.length<2||v.length>3)throw new Error(`Wrong number of arguments to \`#${R}\` predicate. Expected 1 or 2. Got ${v.length-1}.`);if(v.some(O=>O.type!=="string"))throw new Error(`Arguments to \`#${R}\` predicate must be a strings.".`);let N=R==="is?"?h:m;N[y]||(N[y]={}),N[y][v[1].value]=v[2]?v[2].value:null;break;case"not-any-of?":P=!1;case"any-of?":if(v.length<2)throw new Error(`Wrong number of arguments to \`#${R}\` predicate. Expected at least 1. Got ${v.length-1}.`);if(v[1].type!=="capture")throw new Error(`First argument of \`#${R}\` predicate must be a capture. Got "${v[1].value}".`);for(let O=2;OO.value);A[y].push(O=>{let D=[];for(let F of O)F.name===Q&&D.push(F.node.text);return D.length===0?!P:D.every(F=>G.includes(F))===P});break;default:g[y].push({operator:R,operands:v.slice(1)})}v.length=0}}Object.freeze(p[y]),Object.freeze(h[y]),Object.freeze(m[y])}return C._free(n),new Query(INTERNAL,o,u,A,g,Object.freeze(p),Object.freeze(h),Object.freeze(m))}static load(e){let r;if(e instanceof Uint8Array)r=Promise.resolve(e);else{let n=e;if(typeof process<"u"&&process.versions&&process.versions.node){let o=require("fs");r=Promise.resolve(o.readFileSync(n))}else r=fetch(n).then(o=>o.arrayBuffer().then(s=>{if(o.ok)return new Uint8Array(s);{let c=new TextDecoder("utf-8").decode(s);throw new Error(`Language.load failed with status ${o.status}. ${c}`)}}))}return r.then(n=>loadWebAssemblyModule(n,{loadAsync:!0})).then(n=>{let o=Object.keys(n),s=o.find(l=>LANGUAGE_FUNCTION_REGEX.test(l)&&!l.includes("external_scanner_"));s||console.log(`Couldn't find language function in WASM file. Symbols: -${JSON.stringify(o,null,2)}`);let c=n[s]();return new Language(INTERNAL,c)})}}class LookaheadIterable{static{a(this,"LookaheadIterable")}constructor(e,r,n){assertInternal(e),this[0]=r,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(e){return C._ts_lookahead_iterator_reset_state(this[0],e)}reset(e,r){return C._ts_lookahead_iterator_reset(this[0],e[0],r)?(this.language=e,!0):!1}[Symbol.iterator](){let e=this;return{next(){return C._ts_lookahead_iterator_next(e[0])?{done:!1,value:e.currentType}:{done:!0,value:""}}}}}class Query{static{a(this,"Query")}constructor(e,r,n,o,s,c,l,u){assertInternal(e),this[0]=r,this.captureNames=n,this.textPredicates=o,this.predicates=s,this.setProperties=c,this.assertedProperties=l,this.refutedProperties=u,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:o=0,endIndex:s=0,matchLimit:c=4294967295,maxStartDepth:l=4294967295}={}){if(typeof c!="number")throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],r.row,r.column,n.row,n.column,o,s,c,l);let u=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),h=new Array(u);this.exceededMatchLimit=!!p;let m=0,g=d;for(let A=0;Av(_))){h[m]={pattern:y,captures:_};let v=this.setProperties[y];v&&(h[m].setProperties=v);let b=this.assertedProperties[y];b&&(h[m].assertedProperties=b);let I=this.refutedProperties[y];I&&(h[m].refutedProperties=I),m++}}return h.length=m,C._free(d),h}captures(e,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:o=0,endIndex:s=0,matchLimit:c=4294967295,maxStartDepth:l=4294967295}={}){if(typeof c!="number")throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],r.row,r.column,n.row,n.column,o,s,c,l);let u=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),h=[];this.exceededMatchLimit=!!p;let m=[],g=d;for(let A=0;Av(m))){let v=m[_],b=this.setProperties[y];b&&(v.setProperties=b);let I=this.assertedProperties[y];I&&(v.assertedProperties=I);let x=this.refutedProperties[y];x&&(v.refutedProperties=x),h.push(v)}}return C._free(d),h}predicatesForPattern(e){return this.predicates[e]}disableCapture(e){let r=lengthBytesUTF8(e),n=C._malloc(r+1);stringToUTF8(e,n,r+1),C._ts_query_disable_capture(this[0],n,r),C._free(n)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(t,e,r){let n=r-e,o=t.textCallback(e,null,r);for(e+=o.length;e0)e+=s.length,o+=s;else break}return e>r&&(o=o.slice(0,n)),o}a(getText,"getText");function unmarshalCaptures(t,e,r,n){for(let o=0,s=n.length;o>>0,column:getValue(t+SIZE_OF_INT,"i32")>>>0}}a(unmarshalPoint,"unmarshalPoint");function marshalRange(t,e){marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.endPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.endIndex,"i32"),t+=SIZE_OF_INT}a(marshalRange,"marshalRange");function unmarshalRange(t){let e={};return e.startPosition=unmarshalPoint(t),t+=SIZE_OF_POINT,e.endPosition=unmarshalPoint(t),t+=SIZE_OF_POINT,e.startIndex=getValue(t,"i32")>>>0,t+=SIZE_OF_INT,e.endIndex=getValue(t,"i32")>>>0,e}a(unmarshalRange,"unmarshalRange");function marshalEdit(t){let e=TRANSFER_BUFFER;marshalPoint(e,t.startPosition),e+=SIZE_OF_POINT,marshalPoint(e,t.oldEndPosition),e+=SIZE_OF_POINT,marshalPoint(e,t.newEndPosition),e+=SIZE_OF_POINT,setValue(e,t.startIndex,"i32"),e+=SIZE_OF_INT,setValue(e,t.oldEndIndex,"i32"),e+=SIZE_OF_INT,setValue(e,t.newEndIndex,"i32"),e+=SIZE_OF_INT}a(marshalEdit,"marshalEdit");for(let t of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,t,{value:ParserImpl.prototype[t],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser})();typeof exports=="object"&&(module.exports=TreeSitter)});var LFr={};Ri(LFr,{TextDocument:()=>XM});function gIt(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),o=t.slice(r);gIt(n,e),gIt(o,e);let s=0,c=0,l=0;for(;sr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function zji(t){let e=BFr(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var b6e,XM,AIt=Pe(()=>{"use strict";f();b6e=class t{static{a(this,"FullTextDocument")}constructor(e,r,n,o){this._uri=e,this._languageId=r,this._version=n,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let o=BFr(n.range),s=this.offsetAt(o.start),c=this.offsetAt(o.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(c,this._content.length);let l=Math.max(o.start.line,0),u=Math.max(o.end.line,0),d=this._lineOffsets,p=MFr(n.text,!1,s);if(u-l===p.length)for(let m=0,g=p.length;me?o=c:n=c+1}let s=n-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let o=e.line+1r&&OFr(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(o,s,c,l){return new b6e(o,s,c,l)}a(e,"create"),t.create=e;function r(o,s,c){if(o instanceof b6e)return o.update(s,c),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}a(r,"update"),t.update=r;function n(o,s){let c=o.getText(),l=gIt(s.map(zji),(p,h)=>{let m=p.range.start.line-h.range.start.line;return m===0?p.range.start.character-h.range.start.character:m}),u=0,d=[];for(let p of l){let h=o.offsetAt(p.range.start);if(hu&&d.push(c.substring(u,h)),p.newText.length&&d.push(p.newText),u=o.offsetAt(p.range.end)}return d.push(c.substr(u)),d.join("")}a(n,"applyEdits"),t.applyEdits=n})(XM||(XM={}));a(gIt,"mergeSort");a(MFr,"computeLineOffsets");a(OFr,"isEOL");a(BFr,"getWellformedRange");a(zji,"getWellformedEdit")});var P6e=T(f0=>{"use strict";f();Object.defineProperty(f0,"__esModule",{value:!0});f0.thenable=f0.typedArray=f0.stringArray=f0.array=f0.func=f0.error=f0.number=f0.string=f0.boolean=void 0;function Kji(t){return t===!0||t===!1}a(Kji,"boolean");f0.boolean=Kji;function G9r(t){return typeof t=="string"||t instanceof String}a(G9r,"string");f0.string=G9r;function Jji(t){return typeof t=="number"||t instanceof Number}a(Jji,"number");f0.number=Jji;function Xji(t){return t instanceof Error}a(Xji,"error");f0.error=Xji;function H9r(t){return typeof t=="function"}a(H9r,"func");f0.func=H9r;function j9r(t){return Array.isArray(t)}a(j9r,"array");f0.array=j9r;function Zji(t){return j9r(t)&&t.every(e=>G9r(e))}a(Zji,"stringArray");f0.stringArray=Zji;function e$i(t,e){return Array.isArray(t)&&t.every(e)}a(e$i,"typedArray");f0.typedArray=e$i;function t$i(t){return t&&H9r(t.then)}a(t$i,"thenable");f0.thenable=t$i});var OIt=T(_T=>{"use strict";f();Object.defineProperty(_T,"__esModule",{value:!0});_T.generateUuid=_T.parse=_T.isUUID=_T.v4=_T.empty=void 0;var Dye=class{static{a(this,"ValueUUID")}constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},Mye=class t extends Dye{static{a(this,"V4UUID")}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};Mye._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Mye._timeHighBits=["8","9","a","b"];_T.empty=new Dye("00000000-0000-0000-0000-000000000000");function $9r(){return new Mye}a($9r,"v4");_T.v4=$9r;var r$i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function V9r(t){return r$i.test(t)}a(V9r,"isUUID");_T.isUUID=V9r;function n$i(t){if(!V9r(t))throw new Error("invalid uuid");return new Dye(t)}a(n$i,"parse");_T.parse=n$i;function i$i(){return $9r().asHex()}a(i$i,"generateUuid");_T.generateUuid=i$i});var W9r=T(R6=>{"use strict";f();Object.defineProperty(R6,"__esModule",{value:!0});R6.attachPartialResult=R6.ProgressFeature=R6.attachWorkDone=void 0;var w6=Nn(),o$i=OIt(),mj=class t{static{a(this,"WorkDoneProgressReporterImpl")}constructor(e,r){this._connection=e,this._token=r,t.Instances.set(this._token,this)}begin(e,r,n,o){let s={kind:"begin",title:e,percentage:r,message:n,cancellable:o};this._connection.sendProgress(w6.WorkDoneProgress.type,this._token,s)}report(e,r){let n={kind:"report"};typeof e=="number"?(n.percentage=e,r!==void 0&&(n.message=r)):n.message=e,this._connection.sendProgress(w6.WorkDoneProgress.type,this._token,n)}done(){t.Instances.delete(this._token),this._connection.sendProgress(w6.WorkDoneProgress.type,this._token,{kind:"end"})}};mj.Instances=new Map;var k6e=class extends mj{static{a(this,"WorkDoneProgressServerReporterImpl")}constructor(e,r){super(e,r),this._source=new w6.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Oye=class{static{a(this,"NullProgressReporter")}constructor(){}begin(){}report(){}done(){}},N6e=class extends Oye{static{a(this,"NullProgressServerReporter")}constructor(){super(),this._source=new w6.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function s$i(t,e){if(e===void 0||e.workDoneToken===void 0)return new Oye;let r=e.workDoneToken;return delete e.workDoneToken,new mj(t,r)}a(s$i,"attachWorkDone");R6.attachWorkDone=s$i;var a$i=a(t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(w6.WorkDoneProgressCancelNotification.type,r=>{let n=mj.Instances.get(r.token);(n instanceof k6e||n instanceof N6e)&&n.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new Oye:new mj(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,o$i.generateUuid)();return this.connection.sendRequest(w6.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new k6e(this.connection,e))}else return Promise.resolve(new N6e)}},"ProgressFeature");R6.ProgressFeature=a$i;var BIt;(function(t){t.type=new w6.ProgressType})(BIt||(BIt={}));var LIt=class{static{a(this,"ResultProgressReporterImpl")}constructor(e,r){this._connection=e,this._token=r}report(e){this._connection.sendProgress(BIt.type,this._token,e)}};function c$i(t,e){if(e===void 0||e.partialResultToken===void 0)return;let r=e.partialResultToken;return delete e.partialResultToken,new LIt(t,r)}a(c$i,"attachPartialResult");R6.attachPartialResult=c$i});var z9r=T(D6e=>{"use strict";f();Object.defineProperty(D6e,"__esModule",{value:!0});D6e.ConfigurationFeature=void 0;var l$i=Nn(),u$i=P6e(),d$i=a(t=>class extends t{getConfiguration(e){return e?u$i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let r={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(l$i.ConfigurationRequest.type,r).then(n=>Array.isArray(n)?Array.isArray(e)?n:n[0]:Array.isArray(e)?[]:null)}},"ConfigurationFeature");D6e.ConfigurationFeature=d$i});var Y9r=T(O6e=>{"use strict";f();Object.defineProperty(O6e,"__esModule",{value:!0});O6e.WorkspaceFoldersFeature=void 0;var M6e=Nn(),f$i=a(t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let r=e.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new M6e.Emitter,this.connection.onNotification(M6e.DidChangeWorkspaceFoldersNotification.type,n=>{this._onDidChangeWorkspaceFolders.fire(n.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let r=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(M6e.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(M6e.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}},"WorkspaceFoldersFeature");O6e.WorkspaceFoldersFeature=f$i});var K9r=T(B6e=>{"use strict";f();Object.defineProperty(B6e,"__esModule",{value:!0});B6e.CallHierarchyFeature=void 0;var FIt=Nn(),p$i=a(t=>class extends t{get callHierarchy(){return{onPrepare:a(e=>this.connection.onRequest(FIt.CallHierarchyPrepareRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onIncomingCalls:a(e=>{let r=FIt.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onIncomingCalls"),onOutgoingCalls:a(e=>{let r=FIt.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onOutgoingCalls")}}},"CallHierarchyFeature");B6e.CallHierarchyFeature=p$i});var QIt=T(P6=>{"use strict";f();Object.defineProperty(P6,"__esModule",{value:!0});P6.SemanticTokensBuilder=P6.SemanticTokensDiff=P6.SemanticTokensFeature=void 0;var L6e=Nn(),h$i=a(t=>class extends t{get semanticTokens(){return{refresh:a(()=>this.connection.sendRequest(L6e.SemanticTokensRefreshRequest.type),"refresh"),on:a(e=>{let r=L6e.SemanticTokensRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on"),onDelta:a(e=>{let r=L6e.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onDelta"),onRange:a(e=>{let r=L6e.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onRange")}}},"SemanticTokensFeature");P6.SemanticTokensFeature=h$i;var F6e=class{static{a(this,"SemanticTokensDiff")}constructor(e,r){this.originalSequence=e,this.modifiedSequence=r}computeDiff(){let e=this.originalSequence.length,r=this.modifiedSequence.length,n=0;for(;n=n&&s>=n&&this.originalSequence[o]===this.modifiedSequence[s];)o--,s--;(o0&&(c-=this._prevLine,c===0&&(l-=this._prevChar)),this._data[this._dataLen++]=c,this._data[this._dataLen++]=l,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=r}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new F6e(this._prevData,this._data).computeDiff()}:this.build()}};P6.SemanticTokensBuilder=UIt});var J9r=T(U6e=>{"use strict";f();Object.defineProperty(U6e,"__esModule",{value:!0});U6e.ShowDocumentFeature=void 0;var m$i=Nn(),g$i=a(t=>class extends t{showDocument(e){return this.connection.sendRequest(m$i.ShowDocumentRequest.type,e)}},"ShowDocumentFeature");U6e.ShowDocumentFeature=g$i});var X9r=T(Q6e=>{"use strict";f();Object.defineProperty(Q6e,"__esModule",{value:!0});Q6e.FileOperationsFeature=void 0;var qre=Nn(),A$i=a(t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(qre.DidCreateFilesNotification.type,r=>{e(r)})}onDidRenameFiles(e){return this.connection.onNotification(qre.DidRenameFilesNotification.type,r=>{e(r)})}onDidDeleteFiles(e){return this.connection.onNotification(qre.DidDeleteFilesNotification.type,r=>{e(r)})}onWillCreateFiles(e){return this.connection.onRequest(qre.WillCreateFilesRequest.type,(r,n)=>e(r,n))}onWillRenameFiles(e){return this.connection.onRequest(qre.WillRenameFilesRequest.type,(r,n)=>e(r,n))}onWillDeleteFiles(e){return this.connection.onRequest(qre.WillDeleteFilesRequest.type,(r,n)=>e(r,n))}},"FileOperationsFeature");Q6e.FileOperationsFeature=A$i});var Z9r=T(q6e=>{"use strict";f();Object.defineProperty(q6e,"__esModule",{value:!0});q6e.LinkedEditingRangeFeature=void 0;var y$i=Nn(),E$i=a(t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(y$i.LinkedEditingRangeRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0))}},"LinkedEditingRangeFeature");q6e.LinkedEditingRangeFeature=E$i});var e7r=T(G6e=>{"use strict";f();Object.defineProperty(G6e,"__esModule",{value:!0});G6e.TypeHierarchyFeature=void 0;var qIt=Nn(),C$i=a(t=>class extends t{get typeHierarchy(){return{onPrepare:a(e=>this.connection.onRequest(qIt.TypeHierarchyPrepareRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onSupertypes:a(e=>{let r=qIt.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSupertypes"),onSubtypes:a(e=>{let r=qIt.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSubtypes")}}},"TypeHierarchyFeature");G6e.TypeHierarchyFeature=C$i});var r7r=T(H6e=>{"use strict";f();Object.defineProperty(H6e,"__esModule",{value:!0});H6e.InlineValueFeature=void 0;var t7r=Nn(),_$i=a(t=>class extends t{get inlineValue(){return{refresh:a(()=>this.connection.sendRequest(t7r.InlineValueRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(t7r.InlineValueRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineValueFeature");H6e.InlineValueFeature=_$i});var i7r=T(j6e=>{"use strict";f();Object.defineProperty(j6e,"__esModule",{value:!0});j6e.FoldingRangeFeature=void 0;var n7r=Nn(),v$i=a(t=>class extends t{get foldingRange(){return{refresh:a(()=>this.connection.sendRequest(n7r.FoldingRangeRefreshRequest.type),"refresh"),on:a(e=>{let r=n7r.FoldingRangeRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"FoldingRangeFeature");j6e.FoldingRangeFeature=v$i});var o7r=T($6e=>{"use strict";f();Object.defineProperty($6e,"__esModule",{value:!0});$6e.InlayHintFeature=void 0;var GIt=Nn(),b$i=a(t=>class extends t{get inlayHint(){return{refresh:a(()=>this.connection.sendRequest(GIt.InlayHintRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(GIt.InlayHintRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on"),resolve:a(e=>this.connection.onRequest(GIt.InlayHintResolveRequest.type,(r,n)=>e(r,n)),"resolve")}}},"InlayHintFeature");$6e.InlayHintFeature=b$i});var s7r=T(V6e=>{"use strict";f();Object.defineProperty(V6e,"__esModule",{value:!0});V6e.DiagnosticFeature=void 0;var Bye=Nn(),T$i=a(t=>class extends t{get diagnostics(){return{refresh:a(()=>this.connection.sendRequest(Bye.DiagnosticRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(Bye.DocumentDiagnosticRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(Bye.DocumentDiagnosticRequest.partialResult,r))),"on"),onWorkspace:a(e=>this.connection.onRequest(Bye.WorkspaceDiagnosticRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(Bye.WorkspaceDiagnosticRequest.partialResult,r))),"onWorkspace")}}},"DiagnosticFeature");V6e.DiagnosticFeature=T$i});var jIt=T(W6e=>{"use strict";f();Object.defineProperty(W6e,"__esModule",{value:!0});W6e.TextDocuments=void 0;var gj=Nn(),HIt=class{static{a(this,"TextDocuments")}constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new gj.Emitter,this._onDidOpen=new gj.Emitter,this._onDidClose=new gj.Emitter,this._onDidSave=new gj.Emitter,this._onWillSave=new gj.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=gj.TextDocumentSyncKind.Incremental;let r=[];return r.push(e.onDidOpenTextDocument(n=>{let o=n.textDocument,s=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,s);let c=Object.freeze({document:s});this._onDidOpen.fire(c),this._onDidChangeContent.fire(c)})),r.push(e.onDidChangeTextDocument(n=>{let o=n.textDocument,s=n.contentChanges;if(s.length===0)return;let{version:c}=o;if(c==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let l=this._syncedDocuments.get(o.uri);l!==void 0&&(l=this._configuration.update(l,s,c),this._syncedDocuments.set(o.uri,l),this._onDidChangeContent.fire(Object.freeze({document:l})))})),r.push(e.onDidCloseTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(n.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),r.push(e.onWillSaveTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:n.reason}))})),r.push(e.onWillSaveTextDocumentWaitUntil((n,o)=>{let s=this._syncedDocuments.get(n.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:n.reason}),o):[]})),r.push(e.onDidSaveTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),gj.Disposable.create(()=>{r.forEach(n=>n.dispose())})}};W6e.TextDocuments=HIt});var VIt=T(Gre=>{"use strict";f();Object.defineProperty(Gre,"__esModule",{value:!0});Gre.NotebookDocuments=Gre.NotebookSyncFeature=void 0;var vT=Nn(),a7r=jIt(),S$i=a(t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:a(e=>this.connection.onNotification(vT.DidOpenNotebookDocumentNotification.type,r=>{e(r)}),"onDidOpenNotebookDocument"),onDidChangeNotebookDocument:a(e=>this.connection.onNotification(vT.DidChangeNotebookDocumentNotification.type,r=>{e(r)}),"onDidChangeNotebookDocument"),onDidSaveNotebookDocument:a(e=>this.connection.onNotification(vT.DidSaveNotebookDocumentNotification.type,r=>{e(r)}),"onDidSaveNotebookDocument"),onDidCloseNotebookDocument:a(e=>this.connection.onNotification(vT.DidCloseNotebookDocumentNotification.type,r=>{e(r)}),"onDidCloseNotebookDocument")}}},"NotebookSyncFeature");Gre.NotebookSyncFeature=S$i;var z6e=class t{static{a(this,"CellTextDocumentConnection")}onDidOpenTextDocument(e){return this.openHandler=e,vT.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,vT.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,vT.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};z6e.NULL_DISPOSE=Object.freeze({dispose:a(()=>{},"dispose")});var $It=class{static{a(this,"NotebookDocuments")}constructor(e){e instanceof a7r.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new a7r.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new vT.Emitter,this._onDidChange=new vT.Emitter,this._onDidSave=new vT.Emitter,this._onDidClose=new vT.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let r=this.notebookCellMap.get(e);return r&&r[0]}findNotebookDocumentForCell(e){let r=typeof e=="string"?e:e.document,n=this.notebookCellMap.get(r);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let r=new z6e,n=[];return n.push(this.cellTextDocuments.listen(r)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument(o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let s of o.cellTextDocuments)r.openTextDocument({textDocument:s});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);if(s===void 0)return;s.version=o.notebookDocument.version;let c=s.metadata,l=!1,u=o.change;u.metadata!==void 0&&(l=!0,s.metadata=u.metadata);let d=[],p=[],h=[],m=[];if(u.cells!==void 0){let _=u.cells;if(_.structure!==void 0){let v=_.structure.array;if(s.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),_.structure.didOpen!==void 0)for(let b of _.structure.didOpen)r.openTextDocument({textDocument:b}),d.push(b.uri);if(_.structure.didClose)for(let b of _.structure.didClose)r.closeTextDocument({textDocument:b}),p.push(b.uri)}if(_.data!==void 0){let v=new Map(_.data.map(b=>[b.document,b]));for(let b=0;b<=s.cells.length;b++){let I=v.get(s.cells[b].document);if(I!==void 0){let x=s.cells.splice(b,1,I);if(h.push({old:x[0],new:I}),v.delete(I.document),v.size===0)break}}}if(_.textContent!==void 0)for(let v of _.textContent)r.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),m.push(v.document.uri)}this.updateCellMap(s);let g={notebookDocument:s};l&&(g.metadata={old:c,new:s.metadata});let A=[];for(let _ of d)A.push(this.getNotebookCell(_));let y=[];for(let _ of p)y.push(this.getNotebookCell(_));let E=[];for(let _ of m)E.push(this.getNotebookCell(_));(A.length>0||y.length>0||h.length>0||E.length>0)&&(g.cells={added:A,removed:y,changed:{data:h,textContent:E}}),(g.metadata!==void 0||g.cells!==void 0)&&this._onDidChange.fire(g)})),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let c of o.cellTextDocuments)r.closeTextDocument({textDocument:c});this.notebookDocuments.delete(o.notebookDocument.uri);for(let c of s.cells)this.notebookCellMap.delete(c.document)}})),vT.Disposable.create(()=>{n.forEach(o=>o.dispose())})}updateCellMap(e){for(let r of e.cells)this.notebookCellMap.set(r.document,[r,e])}};Gre.NotebookDocuments=$It});var c7r=T(Y6e=>{"use strict";f();Object.defineProperty(Y6e,"__esModule",{value:!0});Y6e.MonikerFeature=void 0;var I$i=Nn(),x$i=a(t=>class extends t{get moniker(){return{on:a(e=>{let r=I$i.MonikerRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"MonikerFeature");Y6e.MonikerFeature=x$i});var XIt=T(Ta=>{"use strict";f();Object.defineProperty(Ta,"__esModule",{value:!0});Ta.createConnection=Ta.combineFeatures=Ta.combineNotebooksFeatures=Ta.combineLanguagesFeatures=Ta.combineWorkspaceFeatures=Ta.combineWindowFeatures=Ta.combineClientFeatures=Ta.combineTracerFeatures=Ta.combineTelemetryFeatures=Ta.combineConsoleFeatures=Ta._NotebooksImpl=Ta._LanguagesImpl=Ta.BulkUnregistration=Ta.BulkRegistration=Ta.ErrorMessageTracker=void 0;var Mr=Nn(),bT=P6e(),zIt=OIt(),Ji=W9r(),w$i=z9r(),R$i=Y9r(),P$i=K9r(),k$i=QIt(),N$i=J9r(),D$i=X9r(),M$i=Z9r(),O$i=e7r(),B$i=r7r(),L$i=i7r(),F$i=o7r(),U$i=s7r(),Q$i=VIt(),q$i=c7r();function WIt(t){if(t!==null)return t}a(WIt,"null2Undefined");var YIt=class{static{a(this,"ErrorMessageTracker")}constructor(){this._messages=Object.create(null)}add(e){let r=this._messages[e];r||(r=0),r++,this._messages[e]=r}sendErrors(e){Object.keys(this._messages).forEach(r=>{e.window.showErrorMessage(r)})}};Ta.ErrorMessageTracker=YIt;var K6e=class{static{a(this,"RemoteConsoleImpl")}constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(Mr.MessageType.Error,e)}warn(e){this.send(Mr.MessageType.Warning,e)}info(e){this.send(Mr.MessageType.Info,e)}log(e){this.send(Mr.MessageType.Log,e)}debug(e){this.send(Mr.MessageType.Debug,e)}send(e,r){this._rawConnection&&this._rawConnection.sendNotification(Mr.LogMessageNotification.type,{type:e,message:r}).catch(()=>{(0,Mr.RAL)().console.error("Sending log message failed")})}},KIt=class{static{a(this,"_RemoteWindowImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...r){let n={type:Mr.MessageType.Error,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(WIt)}showWarningMessage(e,...r){let n={type:Mr.MessageType.Warning,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(WIt)}showInformationMessage(e,...r){let n={type:Mr.MessageType.Info,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(WIt)}},l7r=(0,N$i.ShowDocumentFeature)((0,Ji.ProgressFeature)(KIt)),u7r;(function(t){function e(){return new J6e}a(e,"create"),t.create=e})(u7r||(Ta.BulkRegistration=u7r={}));var J6e=class{static{a(this,"BulkRegistrationImpl")}constructor(){this._registrations=[],this._registered=new Set}add(e,r){let n=bT.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);let o=zIt.generateUuid();this._registrations.push({id:o,method:n,registerOptions:r||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}},d7r;(function(t){function e(){return new Lye(void 0,[])}a(e,"create"),t.create=e})(d7r||(Ta.BulkUnregistration=d7r={}));var Lye=class{static{a(this,"BulkUnregistrationImpl")}constructor(e,r){this._connection=e,this._unregistrations=new Map,r.forEach(n=>{this._unregistrations.set(n.method,n)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let n of this._unregistrations.values())e.push(n);let r={unregisterations:e};this._connection.sendRequest(Mr.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let r=bT.string(e)?e:e.method,n=this._unregistrations.get(r);if(!n)return!1;let o={unregisterations:[n]};return this._connection.sendRequest(Mr.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(r)},s=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)}),!0}},X6e=class{static{a(this,"RemoteClientImpl")}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,r,n){return e instanceof J6e?this.registerMany(e):e instanceof Lye?this.registerSingle1(e,r,n):this.registerSingle2(e,r)}registerSingle1(e,r,n){let o=bT.string(r)?r:r.method,s=zIt.generateUuid(),c={registrations:[{id:s,method:o,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(Mr.RegistrationRequest.type,c).then(l=>(e.add({id:s,method:o}),e),l=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(l)))}registerSingle2(e,r){let n=bT.string(e)?e:e.method,o=zIt.generateUuid(),s={registrations:[{id:o,method:n,registerOptions:r||{}}]};return this.connection.sendRequest(Mr.RegistrationRequest.type,s).then(c=>Mr.Disposable.create(()=>{this.unregisterSingle(o,n).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),c=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(c)))}unregisterSingle(e,r){let n={unregisterations:[{id:e,method:r}]};return this.connection.sendRequest(Mr.UnregistrationRequest.type,n).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let r=e.asRegistrationParams();return this.connection.sendRequest(Mr.RegistrationRequest.type,r).then(()=>new Lye(this._connection,r.registrations.map(n=>({id:n.id,method:n.method}))),n=>(this.connection.console.info("Bulk registration failed."),Promise.reject(n)))}},JIt=class{static{a(this,"_RemoteWorkspaceImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function r(o){return o&&!!o.edit}a(r,"isApplyWorkspaceEditParams");let n=r(e)?e:{edit:e};return this.connection.sendRequest(Mr.ApplyWorkspaceEditRequest.type,n)}},f7r=(0,D$i.FileOperationsFeature)((0,R$i.WorkspaceFoldersFeature)((0,w$i.ConfigurationFeature)(JIt))),Z6e=class{static{a(this,"TracerImpl")}constructor(){this._trace=Mr.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,r){this._trace!==Mr.Trace.Off&&this.connection.sendNotification(Mr.LogTraceNotification.type,{message:e,verbose:this._trace===Mr.Trace.Verbose?r:void 0}).catch(()=>{})}},eFe=class{static{a(this,"TelemetryImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(Mr.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},tFe=class{static{a(this,"_LanguagesImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Ji.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,Ji.attachPartialResult)(this.connection,r)}};Ta._LanguagesImpl=tFe;var p7r=(0,L$i.FoldingRangeFeature)((0,q$i.MonikerFeature)((0,U$i.DiagnosticFeature)((0,F$i.InlayHintFeature)((0,B$i.InlineValueFeature)((0,O$i.TypeHierarchyFeature)((0,M$i.LinkedEditingRangeFeature)((0,k$i.SemanticTokensFeature)((0,P$i.CallHierarchyFeature)(tFe))))))))),rFe=class{static{a(this,"_NotebooksImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Ji.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,Ji.attachPartialResult)(this.connection,r)}};Ta._NotebooksImpl=rFe;var h7r=(0,Q$i.NotebookSyncFeature)(rFe);function m7r(t,e){return function(r){return e(t(r))}}a(m7r,"combineConsoleFeatures");Ta.combineConsoleFeatures=m7r;function g7r(t,e){return function(r){return e(t(r))}}a(g7r,"combineTelemetryFeatures");Ta.combineTelemetryFeatures=g7r;function A7r(t,e){return function(r){return e(t(r))}}a(A7r,"combineTracerFeatures");Ta.combineTracerFeatures=A7r;function y7r(t,e){return function(r){return e(t(r))}}a(y7r,"combineClientFeatures");Ta.combineClientFeatures=y7r;function E7r(t,e){return function(r){return e(t(r))}}a(E7r,"combineWindowFeatures");Ta.combineWindowFeatures=E7r;function C7r(t,e){return function(r){return e(t(r))}}a(C7r,"combineWorkspaceFeatures");Ta.combineWorkspaceFeatures=C7r;function _7r(t,e){return function(r){return e(t(r))}}a(_7r,"combineLanguagesFeatures");Ta.combineLanguagesFeatures=_7r;function v7r(t,e){return function(r){return e(t(r))}}a(v7r,"combineNotebooksFeatures");Ta.combineNotebooksFeatures=v7r;function G$i(t,e){function r(o,s,c){return o&&s?c(o,s):o||s}return a(r,"combine"),{__brand:"features",console:r(t.console,e.console,m7r),tracer:r(t.tracer,e.tracer,A7r),telemetry:r(t.telemetry,e.telemetry,g7r),client:r(t.client,e.client,y7r),window:r(t.window,e.window,E7r),workspace:r(t.workspace,e.workspace,C7r),languages:r(t.languages,e.languages,_7r),notebooks:r(t.notebooks,e.notebooks,v7r)}}a(G$i,"combineFeatures");Ta.combineFeatures=G$i;function H$i(t,e,r){let n=r&&r.console?new(r.console(K6e)):new K6e,o=t(n);n.rawAttach(o);let s=r&&r.tracer?new(r.tracer(Z6e)):new Z6e,c=r&&r.telemetry?new(r.telemetry(eFe)):new eFe,l=r&&r.client?new(r.client(X6e)):new X6e,u=r&&r.window?new(r.window(l7r)):new l7r,d=r&&r.workspace?new(r.workspace(f7r)):new f7r,p=r&&r.languages?new(r.languages(p7r)):new p7r,h=r&&r.notebooks?new(r.notebooks(h7r)):new h7r,m=[n,s,c,l,u,d,p,h];function g(v){return v instanceof Promise?v:bT.thenable(v)?new Promise((b,I)=>{v.then(x=>b(x),x=>I(x))}):Promise.resolve(v)}a(g,"asPromise");let A,y,E,_={listen:a(()=>o.listen(),"listen"),sendRequest:a((v,...b)=>o.sendRequest(bT.string(v)?v:v.method,...b),"sendRequest"),onRequest:a((v,b)=>o.onRequest(v,b),"onRequest"),sendNotification:a((v,b)=>{let I=bT.string(v)?v:v.method;return o.sendNotification(I,b)},"sendNotification"),onNotification:a((v,b)=>o.onNotification(v,b),"onNotification"),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:a(v=>(y=v,{dispose:a(()=>{y=void 0},"dispose")}),"onInitialize"),onInitialized:a(v=>o.onNotification(Mr.InitializedNotification.type,v),"onInitialized"),onShutdown:a(v=>(A=v,{dispose:a(()=>{A=void 0},"dispose")}),"onShutdown"),onExit:a(v=>(E=v,{dispose:a(()=>{E=void 0},"dispose")}),"onExit"),get console(){return n},get telemetry(){return c},get tracer(){return s},get client(){return l},get window(){return u},get workspace(){return d},get languages(){return p},get notebooks(){return h},onDidChangeConfiguration:a(v=>o.onNotification(Mr.DidChangeConfigurationNotification.type,v),"onDidChangeConfiguration"),onDidChangeWatchedFiles:a(v=>o.onNotification(Mr.DidChangeWatchedFilesNotification.type,v),"onDidChangeWatchedFiles"),__textDocumentSync:void 0,onDidOpenTextDocument:a(v=>o.onNotification(Mr.DidOpenTextDocumentNotification.type,v),"onDidOpenTextDocument"),onDidChangeTextDocument:a(v=>o.onNotification(Mr.DidChangeTextDocumentNotification.type,v),"onDidChangeTextDocument"),onDidCloseTextDocument:a(v=>o.onNotification(Mr.DidCloseTextDocumentNotification.type,v),"onDidCloseTextDocument"),onWillSaveTextDocument:a(v=>o.onNotification(Mr.WillSaveTextDocumentNotification.type,v),"onWillSaveTextDocument"),onWillSaveTextDocumentWaitUntil:a(v=>o.onRequest(Mr.WillSaveTextDocumentWaitUntilRequest.type,v),"onWillSaveTextDocumentWaitUntil"),onDidSaveTextDocument:a(v=>o.onNotification(Mr.DidSaveTextDocumentNotification.type,v),"onDidSaveTextDocument"),sendDiagnostics:a(v=>o.sendNotification(Mr.PublishDiagnosticsNotification.type,v),"sendDiagnostics"),onHover:a(v=>o.onRequest(Mr.HoverRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onHover"),onCompletion:a(v=>o.onRequest(Mr.CompletionRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onCompletion"),onCompletionResolve:a(v=>o.onRequest(Mr.CompletionResolveRequest.type,v),"onCompletionResolve"),onSignatureHelp:a(v=>o.onRequest(Mr.SignatureHelpRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onSignatureHelp"),onDeclaration:a(v=>o.onRequest(Mr.DeclarationRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDeclaration"),onDefinition:a(v=>o.onRequest(Mr.DefinitionRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDefinition"),onTypeDefinition:a(v=>o.onRequest(Mr.TypeDefinitionRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onTypeDefinition"),onImplementation:a(v=>o.onRequest(Mr.ImplementationRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onImplementation"),onReferences:a(v=>o.onRequest(Mr.ReferencesRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onReferences"),onDocumentHighlight:a(v=>o.onRequest(Mr.DocumentHighlightRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDocumentHighlight"),onDocumentSymbol:a(v=>o.onRequest(Mr.DocumentSymbolRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDocumentSymbol"),onWorkspaceSymbol:a(v=>o.onRequest(Mr.WorkspaceSymbolRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onWorkspaceSymbol"),onWorkspaceSymbolResolve:a(v=>o.onRequest(Mr.WorkspaceSymbolResolveRequest.type,v),"onWorkspaceSymbolResolve"),onCodeAction:a(v=>o.onRequest(Mr.CodeActionRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onCodeAction"),onCodeActionResolve:a(v=>o.onRequest(Mr.CodeActionResolveRequest.type,(b,I)=>v(b,I)),"onCodeActionResolve"),onCodeLens:a(v=>o.onRequest(Mr.CodeLensRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onCodeLens"),onCodeLensResolve:a(v=>o.onRequest(Mr.CodeLensResolveRequest.type,(b,I)=>v(b,I)),"onCodeLensResolve"),onDocumentFormatting:a(v=>o.onRequest(Mr.DocumentFormattingRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onDocumentFormatting"),onDocumentRangeFormatting:a(v=>o.onRequest(Mr.DocumentRangeFormattingRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onDocumentRangeFormatting"),onDocumentOnTypeFormatting:a(v=>o.onRequest(Mr.DocumentOnTypeFormattingRequest.type,(b,I)=>v(b,I)),"onDocumentOnTypeFormatting"),onRenameRequest:a(v=>o.onRequest(Mr.RenameRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onRenameRequest"),onPrepareRename:a(v=>o.onRequest(Mr.PrepareRenameRequest.type,(b,I)=>v(b,I)),"onPrepareRename"),onDocumentLinks:a(v=>o.onRequest(Mr.DocumentLinkRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDocumentLinks"),onDocumentLinkResolve:a(v=>o.onRequest(Mr.DocumentLinkResolveRequest.type,(b,I)=>v(b,I)),"onDocumentLinkResolve"),onDocumentColor:a(v=>o.onRequest(Mr.DocumentColorRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onDocumentColor"),onColorPresentation:a(v=>o.onRequest(Mr.ColorPresentationRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onColorPresentation"),onFoldingRanges:a(v=>o.onRequest(Mr.FoldingRangeRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onFoldingRanges"),onSelectionRanges:a(v=>o.onRequest(Mr.SelectionRangeRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),(0,Ji.attachPartialResult)(o,b))),"onSelectionRanges"),onExecuteCommand:a(v=>o.onRequest(Mr.ExecuteCommandRequest.type,(b,I)=>v(b,I,(0,Ji.attachWorkDone)(o,b),void 0)),"onExecuteCommand"),dispose:a(()=>o.dispose(),"dispose")};for(let v of m)v.attach(_);return o.onRequest(Mr.InitializeRequest.type,v=>{e.initialize(v),bT.string(v.trace)&&(s.trace=Mr.Trace.fromString(v.trace));for(let b of m)b.initialize(v.capabilities);if(y){let b=y(v,new Mr.CancellationTokenSource().token,(0,Ji.attachWorkDone)(o,v),void 0);return g(b).then(I=>{if(I instanceof Mr.ResponseError)return I;let x=I;x||(x={capabilities:{}});let R=x.capabilities;R||(R={},x.capabilities=R),R.textDocumentSync===void 0||R.textDocumentSync===null?R.textDocumentSync=bT.number(_.__textDocumentSync)?_.__textDocumentSync:Mr.TextDocumentSyncKind.None:!bT.number(R.textDocumentSync)&&!bT.number(R.textDocumentSync.change)&&(R.textDocumentSync.change=bT.number(_.__textDocumentSync)?_.__textDocumentSync:Mr.TextDocumentSyncKind.None);for(let w of m)w.fillServerCapabilities(R);return x})}else{let b={capabilities:{textDocumentSync:Mr.TextDocumentSyncKind.None}};for(let I of m)I.fillServerCapabilities(b.capabilities);return b}}),o.onRequest(Mr.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,A)return A(new Mr.CancellationTokenSource().token)}),o.onNotification(Mr.ExitNotification.type,()=>{try{E&&E()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),o.onNotification(Mr.SetTraceNotification.type,v=>{s.trace=Mr.Trace.fromString(v.value)}),_}a(H$i,"createConnection");Ta.createConnection=H$i});var b7r=T(KE=>{"use strict";f();Object.defineProperty(KE,"__esModule",{value:!0});KE.resolveModulePath=KE.FileSystem=KE.resolveGlobalYarnPath=KE.resolveGlobalNodePath=KE.resolve=KE.uriToFilePath=void 0;var j$i=require("url"),Lx=require("path"),ZIt=require("fs"),nxt=require("child_process");function $$i(t){let e=j$i.parse(t);if(e.protocol!=="file:"||!e.path)return;let r=e.path.split("/");for(var n=0,o=r.length;n1){let s=r[0],c=r[1];s.length===0&&c.length>1&&c[1]===":"&&r.shift()}return Lx.normalize(r.join("/"))}a($$i,"uriToFilePath");KE.uriToFilePath=$$i;function ext(){return process.platform==="win32"}a(ext,"isWindows");function nFe(t,e,r,n){let o="NODE_PATH",s=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((c,l)=>{let u=process.env,d=Object.create(null);Object.keys(u).forEach(p=>d[p]=u[p]),e&&ZIt.existsSync(e)&&(d[o]?d[o]=e+Lx.delimiter+d[o]:d[o]=e,n&&n(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let p=(0,nxt.fork)("",[],{cwd:r,env:d,execArgv:["-e",s]});if(p.pid===void 0){l(new Error(`Starting process to resolve node module ${t} failed`));return}p.on("error",m=>{l(m)}),p.on("message",m=>{m.c==="r"&&(p.send({c:"e"}),m.s?c(m.r):l(new Error(`Failed to resolve module: ${t}`)))});let h={c:"rs",a:t};p.send(h)}catch(p){l(p)}})}a(nFe,"resolve");KE.resolve=nFe;function txt(t){let e="npm",r=Object.create(null);Object.keys(process.env).forEach(s=>r[s]=process.env[s]),r.NO_UPDATE_NOTIFIER="true";let n={encoding:"utf8",env:r};ext()&&(e="npm.cmd",n.shell=!0);let o=a(()=>{},"handler");try{process.on("SIGPIPE",o);let s=(0,nxt.spawnSync)(e,["config","get","prefix"],n).stdout;if(!s){t&&t("'npm config get prefix' didn't return a value.");return}let c=s.trim();return t&&t(`'npm config get prefix' value is: ${c}`),c.length>0?ext()?Lx.join(c,"node_modules"):Lx.join(c,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}a(txt,"resolveGlobalNodePath");KE.resolveGlobalNodePath=txt;function V$i(t){let e="yarn",r={encoding:"utf8"};ext()&&(e="yarn.cmd",r.shell=!0);let n=a(()=>{},"handler");try{process.on("SIGPIPE",n);let o=(0,nxt.spawnSync)(e,["global","dir","--json"],r),s=o.stdout;if(!s){t&&(t("'yarn global dir' didn't return a value."),o.stderr&&t(o.stderr));return}let c=s.trim().split(/\r?\n/);for(let l of c)try{let u=JSON.parse(l);if(u.type==="log")return Lx.join(u.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",n)}}a(V$i,"resolveGlobalYarnPath");KE.resolveGlobalYarnPath=V$i;var rxt;(function(t){let e;function r(){return e!==void 0||(process.platform==="win32"?e=!1:e=!ZIt.existsSync(__filename.toUpperCase())||!ZIt.existsSync(__filename.toLowerCase())),e}a(r,"isCaseSensitive"),t.isCaseSensitive=r;function n(o,s){return r()?Lx.normalize(s).indexOf(Lx.normalize(o))===0:Lx.normalize(s).toLowerCase().indexOf(Lx.normalize(o).toLowerCase())===0}a(n,"isParent"),t.isParent=n})(rxt||(KE.FileSystem=rxt={}));function W$i(t,e,r,n){return r?(Lx.isAbsolute(r)||(r=Lx.join(t,r)),nFe(e,r,r,n).then(o=>rxt.isParent(r,o)?o:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,o=>nFe(e,txt(n),t,n))):nFe(e,txt(n),t,n)}a(W$i,"resolveModulePath");KE.resolveModulePath=W$i});var ixt=T((oml,T7r)=>{"use strict";f();T7r.exports=Nn()});var S7r=T(iFe=>{"use strict";f();Object.defineProperty(iFe,"__esModule",{value:!0});iFe.InlineCompletionFeature=void 0;var z$i=Nn(),Y$i=a(t=>class extends t{get inlineCompletion(){return{on:a(e=>this.connection.onRequest(z$i.InlineCompletionRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineCompletionFeature");iFe.InlineCompletionFeature=Y$i});var w7r=T(Fg=>{"use strict";f();var K$i=Fg&&Fg.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),x7r=Fg&&Fg.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&K$i(e,t,r)};Object.defineProperty(Fg,"__esModule",{value:!0});Fg.ProposedFeatures=Fg.NotebookDocuments=Fg.TextDocuments=Fg.SemanticTokensBuilder=void 0;var J$i=QIt();Object.defineProperty(Fg,"SemanticTokensBuilder",{enumerable:!0,get:a(function(){return J$i.SemanticTokensBuilder},"get")});var X$i=S7r();x7r(Nn(),Fg);var Z$i=jIt();Object.defineProperty(Fg,"TextDocuments",{enumerable:!0,get:a(function(){return Z$i.TextDocuments},"get")});var eVi=VIt();Object.defineProperty(Fg,"NotebookDocuments",{enumerable:!0,get:a(function(){return eVi.NotebookDocuments},"get")});x7r(XIt(),Fg);var I7r;(function(t){t.all={__brand:"features",languages:X$i.InlineCompletionFeature}})(I7r||(Fg.ProposedFeatures=I7r={}))});var Su=T(TT=>{"use strict";f();var tVi=TT&&TT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N7r=TT&&TT.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tVi(e,t,r)};Object.defineProperty(TT,"__esModule",{value:!0});TT.createConnection=TT.Files=void 0;var R7r=require("node:util"),oxt=P6e(),rVi=XIt(),Fye=b7r(),Aj=ixt();N7r(ixt(),TT);N7r(w7r(),TT);var P7r;(function(t){t.uriToFilePath=Fye.uriToFilePath,t.resolveGlobalNodePath=Fye.resolveGlobalNodePath,t.resolveGlobalYarnPath=Fye.resolveGlobalYarnPath,t.resolve=Fye.resolve,t.resolveModulePath=Fye.resolveModulePath})(P7r||(TT.Files=P7r={}));var k7r;function oFe(){if(k7r!==void 0)try{k7r.end()}catch{}}a(oFe,"endProtocolConnection");var Hre=!1,D7r;function nVi(){let t="--clientProcessId";function e(r){try{let n=parseInt(r);isNaN(n)||(D7r=setInterval(()=>{try{process.kill(n,0)}catch{oFe(),process.exit(Hre?0:1)}},3e3))}catch{}}a(e,"runTimer");for(let r=2;r{let e=t.processId;oxt.number(e)&&D7r===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(Hre?0:1)}},3e3)},"initialize"),get shutdownReceived(){return Hre},set shutdownReceived(t){Hre=t},exit:a(t=>{oFe(),process.exit(t)},"exit")};function oVi(t,e,r,n){let o,s,c,l;return t!==void 0&&t.__brand==="features"&&(o=t,t=e,e=r,r=n),Aj.ConnectionStrategy.is(t)||Aj.ConnectionOptions.is(t)?l=t:(s=t,c=e,l=r),sVi(s,c,l,o)}a(oVi,"createConnection");TT.createConnection=oVi;function sVi(t,e,r,n){let o=!1;if(!t&&!e&&process.argv.length>2){let u,d,p=process.argv.slice(2);for(let h=0;h{oFe(),process.exit(Hre?0:1)}),u.on("close",()=>{oFe(),process.exit(Hre?0:1)})}let l=a(u=>{let d=(0,Aj.createProtocolConnection)(t,e,u,r);return o&&aVi(u),d},"connectionFactory");return(0,rVi.createConnection)(l,iVi,n)}a(sVi,"_createConnection");function aVi(t){function e(n){return n.map(o=>typeof o=="string"?o:(0,R7r.inspect)(o)).join(" ")}a(e,"serialize");let r=new Map;console.assert=a(function(o,...s){if(!o)if(s.length===0)t.error("Assertion failed");else{let[c,...l]=s;t.error(`Assertion failed: ${c} ${e(l)}`)}},"assert"),console.count=a(function(o="default"){let s=String(o),c=r.get(s)??0;c+=1,r.set(s,c),t.log(`${s}: ${s}`)},"count"),console.countReset=a(function(o){o===void 0?r.clear():r.delete(String(o))},"countReset"),console.debug=a(function(...o){t.log(e(o))},"debug"),console.dir=a(function(o,s){t.log((0,R7r.inspect)(o,s))},"dir"),console.log=a(function(...o){t.log(e(o))},"log"),console.error=a(function(...o){t.error(e(o))},"error"),console.trace=a(function(...o){let s=new Error().stack.replace(/(.+\n){2}/,""),c="Trace";o.length!==0&&(c+=`: ${e(o)}`),t.log(`${c} -${s}`)},"trace"),console.warn=a(function(...o){t.warn(e(o))},"warn")}a(aVi,"patchConsole")});var Fx=T((Aml,M7r)=>{"use strict";f();M7r.exports=Su()});var ZE=T(zFe=>{"use strict";f();Object.defineProperty(zFe,"__esModule",{value:!0});zFe.Position=void 0;var Awt=class t{static{a(this,"Position")}constructor(e,r){this.lineNumber=e,this.column=r}with(e=this.lineNumber,r=this.column){return e===this.lineNumber&&r===this.column?this:new t(e,r)}delta(e=0,r=0){return this.with(Math.max(1,this.lineNumber+e),Math.max(1,this.column+r))}equals(e){return t.equals(this,e)}static equals(e,r){return!e&&!r?!0:!!e&&!!r&&e.lineNumber===r.lineNumber&&e.column===r.column}isBefore(e){return t.isBefore(this,e)}static isBefore(e,r){return e.lineNumber{"use strict";f();Object.defineProperty(YFe,"__esModule",{value:!0});YFe.Range=void 0;var jQr=ZE(),ywt=class t{static{a(this,"Range")}constructor(e,r,n,o){e>n||e===n&&r>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=r):(this.startLineNumber=e,this.startColumn=r,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.columne.endColumn)}static strictContainsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.column<=e.startColumn||r.lineNumber===e.endLineNumber&&r.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumn<=e.startColumn||r.endLineNumber===e.endLineNumber&&r.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,r){let n,o,s,c;return r.startLineNumbere.endLineNumber?(s=r.endLineNumber,c=r.endColumn):r.endLineNumber===e.endLineNumber?(s=r.endLineNumber,c=Math.max(r.endColumn,e.endColumn)):(s=e.endLineNumber,c=e.endColumn),new t(n,o,s,c)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,r){let n=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,c=e.endColumn,l=r.startLineNumber,u=r.startColumn,d=r.endLineNumber,p=r.endColumn;return nd?(s=d,c=p):s===d&&(c=Math.min(c,p)),n>s||n===s&&o>c?null:new t(n,o,s,c)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,r){return!e&&!r?!0:!!e&&!!r&&e.startLineNumber===r.startLineNumber&&e.startColumn===r.startColumn&&e.endLineNumber===r.endLineNumber&&e.endColumn===r.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new jQr.Position(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new jQr.Position(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,r){return new t(this.startLineNumber,this.startColumn,e,r)}setStartPosition(e,r){return new t(e,r,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,r=e){return new t(e.lineNumber,e.column,r.lineNumber,r.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,r){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};YFe.Range=ywt});var rqr=T((S1l,tqr)=>{"use strict";f();tqr.exports=ZQr;function ZQr(t,e,r){t instanceof RegExp&&(t=XQr(t,r)),e instanceof RegExp&&(e=XQr(e,r));var n=eqr(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}a(ZQr,"balanced");function XQr(t,e){var r=e.match(t);return r?r[0]:null}a(XQr,"maybeMatch");ZQr.range=eqr;function eqr(t,e,r){var n,o,s,c,l,u=r.indexOf(t),d=r.indexOf(e,u+1),p=u;if(u>=0&&d>0){if(t===e)return[u,d];for(n=[],s=r.length;p>=0&&!l;)p==u?(n.push(p),u=r.indexOf(t,p+1)):n.length==1?l=[n.pop(),d]:(o=n.pop(),o=0?u:d;n.length&&(l=[s,c])}return l}a(eqr,"range")});var uqr=T((w1l,lqr)=>{f();var nqr=rqr();lqr.exports=tzi;var iqr="\0SLASH"+Math.random()+"\0",oqr="\0OPEN"+Math.random()+"\0",Twt="\0CLOSE"+Math.random()+"\0",sqr="\0COMMA"+Math.random()+"\0",aqr="\0PERIOD"+Math.random()+"\0";function bwt(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}a(bwt,"numeric");function ZWi(t){return t.split("\\\\").join(iqr).split("\\{").join(oqr).split("\\}").join(Twt).split("\\,").join(sqr).split("\\.").join(aqr)}a(ZWi,"escapeBraces");function ezi(t){return t.split(iqr).join("\\").split(oqr).join("{").split(Twt).join("}").split(sqr).join(",").split(aqr).join(".")}a(ezi,"unescapeBraces");function cqr(t){if(!t)return[""];var e=[],r=nqr("{","}",t);if(!r)return t.split(",");var n=r.pre,o=r.body,s=r.post,c=n.split(",");c[c.length-1]+="{"+o+"}";var l=cqr(s);return s.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),e.push.apply(e,c),e}a(cqr,"parseCommaParts");function tzi(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),nEe(ZWi(t),!0).map(ezi)):[]}a(tzi,"expandTop");function rzi(t){return"{"+t+"}"}a(rzi,"embrace");function nzi(t){return/^-?0\d/.test(t)}a(nzi,"isPadded");function izi(t,e){return t<=e}a(izi,"lte");function ozi(t,e){return t>=e}a(ozi,"gte");function nEe(t,e){var r=[],n=nqr("{","}",t);if(!n)return[t];var o=n.pre,s=n.post.length?nEe(n.post,!1):[""];if(/\$$/.test(n.pre))for(var c=0;c=0;if(!p&&!h)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+Twt+n.post,nEe(t)):[t];var m;if(p)m=n.body.split(/\.\./);else if(m=cqr(n.body),m.length===1&&(m=nEe(m[0],!1).map(rzi),m.length===1))return s.map(function(Q){return n.pre+m[0]+Q});var g;if(p){var A=bwt(m[0]),y=bwt(m[1]),E=Math.max(m[0].length,m[1].length),_=m.length==3?Math.max(Math.abs(bwt(m[2])),1):1,v=izi,b=y0){var P=new Array(w+1).join("0");x<0?R="-"+P+R.slice(1):R=P+R}}g.push(R)}}else{g=[];for(var k=0;k{"use strict";f();Object.defineProperty(kRt,"__esModule",{value:!0});kRt.assertNever=OZi;function OZi(t,e=`unexpected value ${t}`){throw new Error(`Unreachable: ${e}`)}a(OZi,"assertNever")});var FEe=T(lO=>{"use strict";f();Object.defineProperty(lO,"__esModule",{value:!0});lO.ChatCompletionContentPartOpaque=lO.ChatCompletionContentPartKind=lO.ChatRole=void 0;var BZi=KHr(),z9e;(function(t){t[t.System=0]="System",t[t.User=1]="User",t[t.Assistant=2]="Assistant",t[t.Tool=3]="Tool"})(z9e||(lO.ChatRole=z9e={}));(function(t){function e(r){switch(r){case t.System:return"system";case t.User:return"user";case t.Assistant:return"assistant";case t.Tool:return"tool";default:(0,BZi.assertNever)(r,`unknown chat role ${r}}`)}}a(e,"display"),t.display=e})(z9e||(lO.ChatRole=z9e={}));var JHr;(function(t){t[t.Image=0]="Image",t[t.Text=1]="Text",t[t.Opaque=2]="Opaque",t[t.CacheBreakpoint=3]="CacheBreakpoint",t[t.Document=4]="Document"})(JHr||(lO.ChatCompletionContentPartKind=JHr={}));var XHr;(function(t){function e(r,n){return!r.scope||(r.scope&n)!==0}a(e,"usableIn"),t.usableIn=e})(XHr||(lO.ChatCompletionContentPartOpaque=XHr={}))});var NRt=T(sk=>{"use strict";f();Object.defineProperty(sk,"__esModule",{value:!0});sk.BaseTokensPerName=sk.BaseTokensPerMessage=sk.BaseTokensPerCompletion=sk.ChatRole=void 0;var ZHr;(function(t){t.System="system",t.User="user",t.Assistant="assistant",t.Function="function",t.Tool="tool"})(ZHr||(sk.ChatRole=ZHr={}));sk.BaseTokensPerCompletion=3;sk.BaseTokensPerMessage=3;sk.BaseTokensPerName=1});var njr=T(K9e=>{"use strict";f();Object.defineProperty(K9e,"__esModule",{value:!0});K9e.toOpenAiChatMessage=rjr;K9e.toOpenAIChatMessages=FZi;var ak=FEe(),Y9e=NRt(),LZi=lF();function ejr(t){return t.filter(e=>e.type===ak.ChatCompletionContentPartKind.Text).map(e=>e.text).join("")}a(ejr,"onlyStringContent");function tjr(t){let e=t.map(r=>{if(r.type===ak.ChatCompletionContentPartKind.Text)return{type:"text",text:r.text};if(r.type===ak.ChatCompletionContentPartKind.Image)return{image_url:r.imageUrl,type:"image_url"};if(r.type===ak.ChatCompletionContentPartKind.Document)return;if(r.type===ak.ChatCompletionContentPartKind.Opaque&&ak.ChatCompletionContentPartOpaque.usableIn(r,LZi.OutputMode.OpenAI))return r.value}).filter(r=>!!r);return e.every(r=>r.type==="text")?e.map(r=>r.text).join(""):e}a(tjr,"stringAndImageContent");function rjr(t){switch(t.role){case ak.ChatRole.System:return{role:Y9e.ChatRole.System,content:ejr(t.content),name:t.name};case ak.ChatRole.User:return{role:Y9e.ChatRole.User,content:tjr(t.content),name:t.name};case ak.ChatRole.Assistant:return{role:Y9e.ChatRole.Assistant,content:ejr(t.content),name:t.name,tool_calls:t.toolCalls?.map(e=>({id:e.id,function:e.function,type:"function"}))};case ak.ChatRole.Tool:return{role:Y9e.ChatRole.Tool,content:tjr(t.content),tool_call_id:t.toolCallId};default:return}}a(rjr,"toOpenAiChatMessage");function FZi(t){return t.map(rjr).filter(e=>!!e)}a(FZi,"toOpenAIChatMessages")});var ojr=T(Z9e=>{"use strict";f();Object.defineProperty(Z9e,"__esModule",{value:!0});Z9e.toVsCodeChatMessage=ijr;Z9e.toVsCodeChatMessages=UZi;var X9e=FEe();function J9e(t){return t.filter(e=>e.type===X9e.ChatCompletionContentPartKind.Text).map(e=>e.text).join("")}a(J9e,"onlyStringContent");var uF;function ijr(t){switch(uF??=require("vscode"),t.role){case X9e.ChatRole.Assistant:let e=uF.LanguageModelChatMessage.Assistant(J9e(t.content),t.name);return t.toolCalls&&(e.content=[new uF.LanguageModelTextPart(J9e(t.content)),...t.toolCalls.map(r=>{let n;try{n=JSON.parse(r.function.arguments)}catch{throw new Error("Invalid JSON in tool call arguments for tool call: "+r.id)}return new uF.LanguageModelToolCallPart(r.id,r.function.name,n)})]),e;case X9e.ChatRole.User:return uF.LanguageModelChatMessage.User(J9e(t.content),t.name);case X9e.ChatRole.Tool:{let r=uF.LanguageModelChatMessage.User("");return r.content=[new uF.LanguageModelToolResultPart(t.toolCallId,[new uF.LanguageModelTextPart(J9e(t.content))])],r}default:return}}a(ijr,"toVsCodeChatMessage");function UZi(t){return t.map(ijr).filter(e=>!!e)}a(UZi,"toVsCodeChatMessages")});var lF=T(Kx=>{"use strict";f();Object.defineProperty(Kx,"__esModule",{value:!0});Kx.OutputMode=Kx.Raw=Kx.OpenAI=void 0;Kx.toMode=DRt;Kx.toVSCode=QZi;Kx.toOpenAI=qZi;var sjr=njr(),ajr=ojr();Kx.OpenAI=NRt();Kx.Raw=FEe();var Zj;(function(t){t[t.Raw=1]="Raw",t[t.OpenAI=2]="OpenAI",t[t.VSCode=4]="VSCode"})(Zj||(Kx.OutputMode=Zj={}));function DRt(t,e){switch(t){case Zj.Raw:return e;case Zj.VSCode:return e instanceof Array?(0,ajr.toVsCodeChatMessages)(e):(0,ajr.toVsCodeChatMessage)(e);case Zj.OpenAI:return e instanceof Array?(0,sjr.toOpenAIChatMessages)(e):(0,sjr.toOpenAiChatMessage)(e);default:throw new Error(`Unknown output mode: ${t}`)}}a(DRt,"toMode");function QZi(t){return DRt(Zj.VSCode,t)}a(QZi,"toVSCode");function qZi(t){return DRt(Zj.OpenAI,t)}a(qZi,"toOpenAI")});var MRt=T(UEe=>{"use strict";f();Object.defineProperty(UEe,"__esModule",{value:!0});UEe.jsonRetainedProps=void 0;UEe.forEachNode=cjr;UEe.jsonRetainedProps=Object.keys({flexBasis:1,flexGrow:1,flexReserve:1,passPriority:1,priority:1});function cjr(t,e){if(e(t),t.type===1)for(let r of t.children)cjr(r,e)}a(cjr,"forEachNode")});var ljr=T(ORt=>{"use strict";f();Object.defineProperty(ORt,"__esModule",{value:!0});ORt.once=GZi;function GZi(t){let e,r=!1,n=a(((...o)=>(r||(e=t(...o),r=!0),e)),"wrappedFunction");return n.clear=()=>{r=!1},n}a(GZi,"once")});var URt=T(ph=>{"use strict";f();Object.defineProperty(ph,"__esModule",{value:!0});ph.BudgetExceededError=ph.MaterializedChatMessageDocument=ph.MaterializedChatMessageImage=ph.MaterializedChatMessageBreakpoint=ph.MaterializedChatMessageOpaque=ph.MaterializedChatMessage=ph.MaterializedChatMessageTextChunk=ph.GenericMaterializedContainer=void 0;var e$=ljr(),_m=lF(),uO=class t{static{a(this,"GenericMaterializedContainer")}parent;id;name;priority;metadata;flags;children;keepWithId;constructor(e,r,n,o,s,c,l){if(this.parent=e,this.id=r,this.name=n,this.priority=o,this.metadata=c,this.flags=l,this.children=s(this),l&8){if(this.children.length!==2)throw new Error("Invalid number of children for EmptyAlternate flag");let[u,d]=this.children;d.isEmpty?this.children=[u]:this.children=[d]}}has(e){return!!(this.flags&e)}async tokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{let o=fF(n)?await n.tokenCount(e):await n.upperBoundTokenCount(e);r+=o})),r}async upperBoundTokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{let o=await n.upperBoundTokenCount(e);r+=o})),r}replaceNode(e,r){return yjr(e,this.children,r)}allMetadata(){return Ajr(this)}findById(e){return FRt(e,this)}get isEmpty(){return!this.children.some(e=>!e.isEmpty)}onChunksChange(){this.parent?.onChunksChange()}*toChatMessages(){for(let e of this.children)HZi(e),e instanceof t?yield*e.toChatMessages():!e.isEmpty&&e instanceof Xx&&(yield e.toChatMessage())}async baseMessageTokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{if(n instanceof Xx||n instanceof t){let o=await n.baseMessageTokenCount(e);r+=o}})),r}removeLowestPriorityChild(){let e=[];return LRt(this,e),e}};ph.GenericMaterializedContainer=uO;var QEe=class{static{a(this,"MaterializedChatMessageTextChunk")}parent;text;priority;metadata;lineBreakBefore;constructor(e,r,n,o=[],s){this.parent=e,this.text=r,this.priority=n,this.metadata=o,this.lineBreakBefore=s}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,e$.once)(async e=>await e.tokenLength({type:_m.Raw.ChatCompletionContentPartKind.Text,text:this.text})+(this.lineBreakBefore!==0?1:0));get isEmpty(){return!/\S/.test(this.text)}};ph.MaterializedChatMessageTextChunk=QEe;var Xx=class{static{a(this,"MaterializedChatMessage")}parent;id;role;name;toolCalls;toolCallId;priority;metadata;children;constructor(e,r,n,o,s,c,l,u,d){this.parent=e,this.id=r,this.role=n,this.name=o,this.toolCalls=s,this.toolCallId=c,this.priority=l,this.metadata=u,this.children=d(this)}async tokenCount(e){return this._tokenCount(e)}async upperBoundTokenCount(e){return this._upperBound(e)}get text(){return this._text()}get isEmpty(){return!this.toolCalls?.length&&!this.children.some(e=>!e.isEmpty)}replaceNode(e,r){let n=yjr(e,this.children,r);return n&&this.onChunksChange(),n}removeLowestPriorityChild(){let e=[];return LRt(this,e),e}onChunksChange(){this._tokenCount.clear(),this._upperBound.clear(),this._text.clear(),this.parent?.onChunksChange()}findById(e){return FRt(e,this)}_tokenCount=(0,e$.once)(async e=>{let r=this.toChatMessage();return e.countMessageTokens((0,_m.toMode)(e.mode,r))});_upperBound=(0,e$.once)(async e=>{let r=await this.baseMessageTokenCount(e);return await Promise.all(this.children.map(async n=>{let o=await n.upperBoundTokenCount(e);r+=o})),r});baseMessageTokenCount=(0,e$.once)(e=>{let r=this.toChatMessage();return r.content=r.content.map(n=>n.type===_m.Raw.ChatCompletionContentPartKind.Text?{...n,text:""}:n.type===_m.Raw.ChatCompletionContentPartKind.Image||n.type===_m.Raw.ChatCompletionContentPartKind.Document?void 0:n).filter(n=>!!n),e.countMessageTokens((0,_m.toMode)(e.mode,r))});_text=(0,e$.once)(()=>{let e=[];for(let{content:r,isTextSibling:n}of mjr(this)){if(r instanceof t$||r instanceof r$||r instanceof dF){e.push(r);continue}if(r instanceof Jx){e.at(-1)instanceof Jx?e[e.length-1]=r:e.push(r);continue}if(r.lineBreakBefore===1||r.lineBreakBefore===2&&!n){let o=e[e.length-1];typeof o=="string"&&o&&!o.endsWith(` +${JSON.stringify(o,null,2)}`);let c=n[s]();return new Language(INTERNAL,c)})}}class LookaheadIterable{static{a(this,"LookaheadIterable")}constructor(e,r,n){assertInternal(e),this[0]=r,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(e){return C._ts_lookahead_iterator_reset_state(this[0],e)}reset(e,r){return C._ts_lookahead_iterator_reset(this[0],e[0],r)?(this.language=e,!0):!1}[Symbol.iterator](){let e=this;return{next(){return C._ts_lookahead_iterator_next(e[0])?{done:!1,value:e.currentType}:{done:!0,value:""}}}}}class Query{static{a(this,"Query")}constructor(e,r,n,o,s,c,l,u){assertInternal(e),this[0]=r,this.captureNames=n,this.textPredicates=o,this.predicates=s,this.setProperties=c,this.assertedProperties=l,this.refutedProperties=u,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:o=0,endIndex:s=0,matchLimit:c=4294967295,maxStartDepth:l=4294967295}={}){if(typeof c!="number")throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],r.row,r.column,n.row,n.column,o,s,c,l);let u=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),h=new Array(u);this.exceededMatchLimit=!!p;let m=0,g=d;for(let A=0;Av(_))){h[m]={pattern:y,captures:_};let v=this.setProperties[y];v&&(h[m].setProperties=v);let b=this.assertedProperties[y];b&&(h[m].assertedProperties=b);let I=this.refutedProperties[y];I&&(h[m].refutedProperties=I),m++}}return h.length=m,C._free(d),h}captures(e,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:o=0,endIndex:s=0,matchLimit:c=4294967295,maxStartDepth:l=4294967295}={}){if(typeof c!="number")throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],r.row,r.column,n.row,n.column,o,s,c,l);let u=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),p=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),h=[];this.exceededMatchLimit=!!p;let m=[],g=d;for(let A=0;Av(m))){let v=m[_],b=this.setProperties[y];b&&(v.setProperties=b);let I=this.assertedProperties[y];I&&(v.assertedProperties=I);let x=this.refutedProperties[y];x&&(v.refutedProperties=x),h.push(v)}}return C._free(d),h}predicatesForPattern(e){return this.predicates[e]}disableCapture(e){let r=lengthBytesUTF8(e),n=C._malloc(r+1);stringToUTF8(e,n,r+1),C._ts_query_disable_capture(this[0],n,r),C._free(n)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(t,e,r){let n=r-e,o=t.textCallback(e,null,r);for(e+=o.length;e0)e+=s.length,o+=s;else break}return e>r&&(o=o.slice(0,n)),o}a(getText,"getText");function unmarshalCaptures(t,e,r,n){for(let o=0,s=n.length;o>>0,column:getValue(t+SIZE_OF_INT,"i32")>>>0}}a(unmarshalPoint,"unmarshalPoint");function marshalRange(t,e){marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.endPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.endIndex,"i32"),t+=SIZE_OF_INT}a(marshalRange,"marshalRange");function unmarshalRange(t){let e={};return e.startPosition=unmarshalPoint(t),t+=SIZE_OF_POINT,e.endPosition=unmarshalPoint(t),t+=SIZE_OF_POINT,e.startIndex=getValue(t,"i32")>>>0,t+=SIZE_OF_INT,e.endIndex=getValue(t,"i32")>>>0,e}a(unmarshalRange,"unmarshalRange");function marshalEdit(t){let e=TRANSFER_BUFFER;marshalPoint(e,t.startPosition),e+=SIZE_OF_POINT,marshalPoint(e,t.oldEndPosition),e+=SIZE_OF_POINT,marshalPoint(e,t.newEndPosition),e+=SIZE_OF_POINT,setValue(e,t.startIndex,"i32"),e+=SIZE_OF_INT,setValue(e,t.oldEndIndex,"i32"),e+=SIZE_OF_INT,setValue(e,t.newEndIndex,"i32"),e+=SIZE_OF_INT}a(marshalEdit,"marshalEdit");for(let t of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,t,{value:ParserImpl.prototype[t],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser})();typeof exports=="object"&&(module.exports=TreeSitter)});var B9r={};ui(B9r,{TextDocument:()=>MM});function BIt(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),o=t.slice(r);BIt(n,e),BIt(o,e);let s=0,c=0,l=0;for(;sr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function YVi(t){let e=O9r(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var k8e,MM,LIt=Pe(()=>{"use strict";f();k8e=class t{static{a(this,"FullTextDocument")}constructor(e,r,n,o){this._uri=e,this._languageId=r,this._version=n,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let o=O9r(n.range),s=this.offsetAt(o.start),c=this.offsetAt(o.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(c,this._content.length);let l=Math.max(o.start.line,0),u=Math.max(o.end.line,0),d=this._lineOffsets,p=N9r(n.text,!1,s);if(u-l===p.length)for(let m=0,g=p.length;me?o=c:n=c+1}let s=n-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let o=e.line+1r&&M9r(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(o,s,c,l){return new k8e(o,s,c,l)}a(e,"create"),t.create=e;function r(o,s,c){if(o instanceof k8e)return o.update(s,c),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}a(r,"update"),t.update=r;function n(o,s){let c=o.getText(),l=BIt(s.map(YVi),(p,h)=>{let m=p.range.start.line-h.range.start.line;return m===0?p.range.start.character-h.range.start.character:m}),u=0,d=[];for(let p of l){let h=o.offsetAt(p.range.start);if(hu&&d.push(c.substring(u,h)),p.newText.length&&d.push(p.newText),u=o.offsetAt(p.range.end)}return d.push(c.substr(u)),d.join("")}a(n,"applyEdits"),t.applyEdits=n})(MM||(MM={}));a(BIt,"mergeSort");a(N9r,"computeLineOffsets");a(M9r,"isEOL");a(O9r,"getWellformedRange");a(YVi,"getWellformedEdit")});var F8e=T(a0=>{"use strict";f();Object.defineProperty(a0,"__esModule",{value:!0});a0.thenable=a0.typedArray=a0.stringArray=a0.array=a0.func=a0.error=a0.number=a0.string=a0.boolean=void 0;function JVi(t){return t===!0||t===!1}a(JVi,"boolean");a0.boolean=JVi;function q7r(t){return typeof t=="string"||t instanceof String}a(q7r,"string");a0.string=q7r;function XVi(t){return typeof t=="number"||t instanceof Number}a(XVi,"number");a0.number=XVi;function ZVi(t){return t instanceof Error}a(ZVi,"error");a0.error=ZVi;function G7r(t){return typeof t=="function"}a(G7r,"func");a0.func=G7r;function H7r(t){return Array.isArray(t)}a(H7r,"array");a0.array=H7r;function eWi(t){return H7r(t)&&t.every(e=>q7r(e))}a(eWi,"stringArray");a0.stringArray=eWi;function tWi(t,e){return Array.isArray(t)&&t.every(e)}a(tWi,"typedArray");a0.typedArray=tWi;function rWi(t){return t&&G7r(t.then)}a(rWi,"thenable");a0.thenable=rWi});var txt=T(lT=>{"use strict";f();Object.defineProperty(lT,"__esModule",{value:!0});lT.generateUuid=lT.parse=lT.isUUID=lT.v4=lT.empty=void 0;var kAe=class{static{a(this,"ValueUUID")}constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},DAe=class t extends kAe{static{a(this,"V4UUID")}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};DAe._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];DAe._timeHighBits=["8","9","a","b"];lT.empty=new kAe("00000000-0000-0000-0000-000000000000");function j7r(){return new DAe}a(j7r,"v4");lT.v4=j7r;var nWi=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function $7r(t){return nWi.test(t)}a($7r,"isUUID");lT.isUUID=$7r;function iWi(t){if(!$7r(t))throw new Error("invalid uuid");return new kAe(t)}a(iWi,"parse");lT.parse=iWi;function oWi(){return j7r().asHex()}a(oWi,"generateUuid");lT.generateUuid=oWi});var V7r=T(r6=>{"use strict";f();Object.defineProperty(r6,"__esModule",{value:!0});r6.attachPartialResult=r6.ProgressFeature=r6.attachWorkDone=void 0;var t6=Dn(),sWi=txt(),vH=class t{static{a(this,"WorkDoneProgressReporterImpl")}constructor(e,r){this._connection=e,this._token=r,t.Instances.set(this._token,this)}begin(e,r,n,o){let s={kind:"begin",title:e,percentage:r,message:n,cancellable:o};this._connection.sendProgress(t6.WorkDoneProgress.type,this._token,s)}report(e,r){let n={kind:"report"};typeof e=="number"?(n.percentage=e,r!==void 0&&(n.message=r)):n.message=e,this._connection.sendProgress(t6.WorkDoneProgress.type,this._token,n)}done(){t.Instances.delete(this._token),this._connection.sendProgress(t6.WorkDoneProgress.type,this._token,{kind:"end"})}};vH.Instances=new Map;var U8e=class extends vH{static{a(this,"WorkDoneProgressServerReporterImpl")}constructor(e,r){super(e,r),this._source=new t6.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},NAe=class{static{a(this,"NullProgressReporter")}constructor(){}begin(){}report(){}done(){}},Q8e=class extends NAe{static{a(this,"NullProgressServerReporter")}constructor(){super(),this._source=new t6.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function aWi(t,e){if(e===void 0||e.workDoneToken===void 0)return new NAe;let r=e.workDoneToken;return delete e.workDoneToken,new vH(t,r)}a(aWi,"attachWorkDone");r6.attachWorkDone=aWi;var cWi=a(t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(t6.WorkDoneProgressCancelNotification.type,r=>{let n=vH.Instances.get(r.token);(n instanceof U8e||n instanceof Q8e)&&n.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new NAe:new vH(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,sWi.generateUuid)();return this.connection.sendRequest(t6.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new U8e(this.connection,e))}else return Promise.resolve(new Q8e)}},"ProgressFeature");r6.ProgressFeature=cWi;var rxt;(function(t){t.type=new t6.ProgressType})(rxt||(rxt={}));var nxt=class{static{a(this,"ResultProgressReporterImpl")}constructor(e,r){this._connection=e,this._token=r}report(e){this._connection.sendProgress(rxt.type,this._token,e)}};function lWi(t,e){if(e===void 0||e.partialResultToken===void 0)return;let r=e.partialResultToken;return delete e.partialResultToken,new nxt(t,r)}a(lWi,"attachPartialResult");r6.attachPartialResult=lWi});var W7r=T(q8e=>{"use strict";f();Object.defineProperty(q8e,"__esModule",{value:!0});q8e.ConfigurationFeature=void 0;var uWi=Dn(),dWi=F8e(),fWi=a(t=>class extends t{getConfiguration(e){return e?dWi.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let r={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(uWi.ConfigurationRequest.type,r).then(n=>Array.isArray(n)?Array.isArray(e)?n:n[0]:Array.isArray(e)?[]:null)}},"ConfigurationFeature");q8e.ConfigurationFeature=fWi});var z7r=T(H8e=>{"use strict";f();Object.defineProperty(H8e,"__esModule",{value:!0});H8e.WorkspaceFoldersFeature=void 0;var G8e=Dn(),pWi=a(t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let r=e.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new G8e.Emitter,this.connection.onNotification(G8e.DidChangeWorkspaceFoldersNotification.type,n=>{this._onDidChangeWorkspaceFolders.fire(n.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let r=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(G8e.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(G8e.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}},"WorkspaceFoldersFeature");H8e.WorkspaceFoldersFeature=pWi});var Y7r=T(j8e=>{"use strict";f();Object.defineProperty(j8e,"__esModule",{value:!0});j8e.CallHierarchyFeature=void 0;var ixt=Dn(),hWi=a(t=>class extends t{get callHierarchy(){return{onPrepare:a(e=>this.connection.onRequest(ixt.CallHierarchyPrepareRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onIncomingCalls:a(e=>{let r=ixt.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onIncomingCalls"),onOutgoingCalls:a(e=>{let r=ixt.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onOutgoingCalls")}}},"CallHierarchyFeature");j8e.CallHierarchyFeature=hWi});var sxt=T(n6=>{"use strict";f();Object.defineProperty(n6,"__esModule",{value:!0});n6.SemanticTokensBuilder=n6.SemanticTokensDiff=n6.SemanticTokensFeature=void 0;var $8e=Dn(),mWi=a(t=>class extends t{get semanticTokens(){return{refresh:a(()=>this.connection.sendRequest($8e.SemanticTokensRefreshRequest.type),"refresh"),on:a(e=>{let r=$8e.SemanticTokensRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on"),onDelta:a(e=>{let r=$8e.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onDelta"),onRange:a(e=>{let r=$8e.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onRange")}}},"SemanticTokensFeature");n6.SemanticTokensFeature=mWi;var V8e=class{static{a(this,"SemanticTokensDiff")}constructor(e,r){this.originalSequence=e,this.modifiedSequence=r}computeDiff(){let e=this.originalSequence.length,r=this.modifiedSequence.length,n=0;for(;n=n&&s>=n&&this.originalSequence[o]===this.modifiedSequence[s];)o--,s--;(o0&&(c-=this._prevLine,c===0&&(l-=this._prevChar)),this._data[this._dataLen++]=c,this._data[this._dataLen++]=l,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=r}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new V8e(this._prevData,this._data).computeDiff()}:this.build()}};n6.SemanticTokensBuilder=oxt});var K7r=T(W8e=>{"use strict";f();Object.defineProperty(W8e,"__esModule",{value:!0});W8e.ShowDocumentFeature=void 0;var gWi=Dn(),AWi=a(t=>class extends t{showDocument(e){return this.connection.sendRequest(gWi.ShowDocumentRequest.type,e)}},"ShowDocumentFeature");W8e.ShowDocumentFeature=AWi});var J7r=T(z8e=>{"use strict";f();Object.defineProperty(z8e,"__esModule",{value:!0});z8e.FileOperationsFeature=void 0;var ere=Dn(),yWi=a(t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(ere.DidCreateFilesNotification.type,r=>{e(r)})}onDidRenameFiles(e){return this.connection.onNotification(ere.DidRenameFilesNotification.type,r=>{e(r)})}onDidDeleteFiles(e){return this.connection.onNotification(ere.DidDeleteFilesNotification.type,r=>{e(r)})}onWillCreateFiles(e){return this.connection.onRequest(ere.WillCreateFilesRequest.type,(r,n)=>e(r,n))}onWillRenameFiles(e){return this.connection.onRequest(ere.WillRenameFilesRequest.type,(r,n)=>e(r,n))}onWillDeleteFiles(e){return this.connection.onRequest(ere.WillDeleteFilesRequest.type,(r,n)=>e(r,n))}},"FileOperationsFeature");z8e.FileOperationsFeature=yWi});var X7r=T(Y8e=>{"use strict";f();Object.defineProperty(Y8e,"__esModule",{value:!0});Y8e.LinkedEditingRangeFeature=void 0;var EWi=Dn(),_Wi=a(t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(EWi.LinkedEditingRangeRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0))}},"LinkedEditingRangeFeature");Y8e.LinkedEditingRangeFeature=_Wi});var Z7r=T(K8e=>{"use strict";f();Object.defineProperty(K8e,"__esModule",{value:!0});K8e.TypeHierarchyFeature=void 0;var axt=Dn(),CWi=a(t=>class extends t{get typeHierarchy(){return{onPrepare:a(e=>this.connection.onRequest(axt.TypeHierarchyPrepareRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),void 0)),"onPrepare"),onSupertypes:a(e=>{let r=axt.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSupertypes"),onSubtypes:a(e=>{let r=axt.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"onSubtypes")}}},"TypeHierarchyFeature");K8e.TypeHierarchyFeature=CWi});var tUr=T(J8e=>{"use strict";f();Object.defineProperty(J8e,"__esModule",{value:!0});J8e.InlineValueFeature=void 0;var eUr=Dn(),vWi=a(t=>class extends t{get inlineValue(){return{refresh:a(()=>this.connection.sendRequest(eUr.InlineValueRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(eUr.InlineValueRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineValueFeature");J8e.InlineValueFeature=vWi});var nUr=T(X8e=>{"use strict";f();Object.defineProperty(X8e,"__esModule",{value:!0});X8e.FoldingRangeFeature=void 0;var rUr=Dn(),bWi=a(t=>class extends t{get foldingRange(){return{refresh:a(()=>this.connection.sendRequest(rUr.FoldingRangeRefreshRequest.type),"refresh"),on:a(e=>{let r=rUr.FoldingRangeRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"FoldingRangeFeature");X8e.FoldingRangeFeature=bWi});var iUr=T(Z8e=>{"use strict";f();Object.defineProperty(Z8e,"__esModule",{value:!0});Z8e.InlayHintFeature=void 0;var cxt=Dn(),TWi=a(t=>class extends t{get inlayHint(){return{refresh:a(()=>this.connection.sendRequest(cxt.InlayHintRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(cxt.InlayHintRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on"),resolve:a(e=>this.connection.onRequest(cxt.InlayHintResolveRequest.type,(r,n)=>e(r,n)),"resolve")}}},"InlayHintFeature");Z8e.InlayHintFeature=TWi});var oUr=T(e6e=>{"use strict";f();Object.defineProperty(e6e,"__esModule",{value:!0});e6e.DiagnosticFeature=void 0;var MAe=Dn(),SWi=a(t=>class extends t{get diagnostics(){return{refresh:a(()=>this.connection.sendRequest(MAe.DiagnosticRefreshRequest.type),"refresh"),on:a(e=>this.connection.onRequest(MAe.DocumentDiagnosticRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(MAe.DocumentDiagnosticRequest.partialResult,r))),"on"),onWorkspace:a(e=>this.connection.onRequest(MAe.WorkspaceDiagnosticRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(MAe.WorkspaceDiagnosticRequest.partialResult,r))),"onWorkspace")}}},"DiagnosticFeature");e6e.DiagnosticFeature=SWi});var uxt=T(t6e=>{"use strict";f();Object.defineProperty(t6e,"__esModule",{value:!0});t6e.TextDocuments=void 0;var bH=Dn(),lxt=class{static{a(this,"TextDocuments")}constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new bH.Emitter,this._onDidOpen=new bH.Emitter,this._onDidClose=new bH.Emitter,this._onDidSave=new bH.Emitter,this._onWillSave=new bH.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=bH.TextDocumentSyncKind.Incremental;let r=[];return r.push(e.onDidOpenTextDocument(n=>{let o=n.textDocument,s=this._configuration.create(o.uri,o.languageId,o.version,o.text);this._syncedDocuments.set(o.uri,s);let c=Object.freeze({document:s});this._onDidOpen.fire(c),this._onDidChangeContent.fire(c)})),r.push(e.onDidChangeTextDocument(n=>{let o=n.textDocument,s=n.contentChanges;if(s.length===0)return;let{version:c}=o;if(c==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let l=this._syncedDocuments.get(o.uri);l!==void 0&&(l=this._configuration.update(l,s,c),this._syncedDocuments.set(o.uri,l),this._onDidChangeContent.fire(Object.freeze({document:l})))})),r.push(e.onDidCloseTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&(this._syncedDocuments.delete(n.textDocument.uri),this._onDidClose.fire(Object.freeze({document:o})))})),r.push(e.onWillSaveTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&this._onWillSave.fire(Object.freeze({document:o,reason:n.reason}))})),r.push(e.onWillSaveTextDocumentWaitUntil((n,o)=>{let s=this._syncedDocuments.get(n.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:n.reason}),o):[]})),r.push(e.onDidSaveTextDocument(n=>{let o=this._syncedDocuments.get(n.textDocument.uri);o!==void 0&&this._onDidSave.fire(Object.freeze({document:o}))})),bH.Disposable.create(()=>{r.forEach(n=>n.dispose())})}};t6e.TextDocuments=lxt});var fxt=T(tre=>{"use strict";f();Object.defineProperty(tre,"__esModule",{value:!0});tre.NotebookDocuments=tre.NotebookSyncFeature=void 0;var uT=Dn(),sUr=uxt(),IWi=a(t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:a(e=>this.connection.onNotification(uT.DidOpenNotebookDocumentNotification.type,r=>{e(r)}),"onDidOpenNotebookDocument"),onDidChangeNotebookDocument:a(e=>this.connection.onNotification(uT.DidChangeNotebookDocumentNotification.type,r=>{e(r)}),"onDidChangeNotebookDocument"),onDidSaveNotebookDocument:a(e=>this.connection.onNotification(uT.DidSaveNotebookDocumentNotification.type,r=>{e(r)}),"onDidSaveNotebookDocument"),onDidCloseNotebookDocument:a(e=>this.connection.onNotification(uT.DidCloseNotebookDocumentNotification.type,r=>{e(r)}),"onDidCloseNotebookDocument")}}},"NotebookSyncFeature");tre.NotebookSyncFeature=IWi;var r6e=class t{static{a(this,"CellTextDocumentConnection")}onDidOpenTextDocument(e){return this.openHandler=e,uT.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,uT.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,uT.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}};r6e.NULL_DISPOSE=Object.freeze({dispose:a(()=>{},"dispose")});var dxt=class{static{a(this,"NotebookDocuments")}constructor(e){e instanceof sUr.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new sUr.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new uT.Emitter,this._onDidChange=new uT.Emitter,this._onDidSave=new uT.Emitter,this._onDidClose=new uT.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let r=this.notebookCellMap.get(e);return r&&r[0]}findNotebookDocumentForCell(e){let r=typeof e=="string"?e:e.document,n=this.notebookCellMap.get(r);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let r=new r6e,n=[];return n.push(this.cellTextDocuments.listen(r)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument(o=>{this.notebookDocuments.set(o.notebookDocument.uri,o.notebookDocument);for(let s of o.cellTextDocuments)r.openTextDocument({textDocument:s});this.updateCellMap(o.notebookDocument),this._onDidOpen.fire(o.notebookDocument)})),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);if(s===void 0)return;s.version=o.notebookDocument.version;let c=s.metadata,l=!1,u=o.change;u.metadata!==void 0&&(l=!0,s.metadata=u.metadata);let d=[],p=[],h=[],m=[];if(u.cells!==void 0){let _=u.cells;if(_.structure!==void 0){let v=_.structure.array;if(s.cells.splice(v.start,v.deleteCount,...v.cells!==void 0?v.cells:[]),_.structure.didOpen!==void 0)for(let b of _.structure.didOpen)r.openTextDocument({textDocument:b}),d.push(b.uri);if(_.structure.didClose)for(let b of _.structure.didClose)r.closeTextDocument({textDocument:b}),p.push(b.uri)}if(_.data!==void 0){let v=new Map(_.data.map(b=>[b.document,b]));for(let b=0;b<=s.cells.length;b++){let I=v.get(s.cells[b].document);if(I!==void 0){let x=s.cells.splice(b,1,I);if(h.push({old:x[0],new:I}),v.delete(I.document),v.size===0)break}}}if(_.textContent!==void 0)for(let v of _.textContent)r.changeTextDocument({textDocument:v.document,contentChanges:v.changes}),m.push(v.document.uri)}this.updateCellMap(s);let g={notebookDocument:s};l&&(g.metadata={old:c,new:s.metadata});let A=[];for(let _ of d)A.push(this.getNotebookCell(_));let y=[];for(let _ of p)y.push(this.getNotebookCell(_));let E=[];for(let _ of m)E.push(this.getNotebookCell(_));(A.length>0||y.length>0||h.length>0||E.length>0)&&(g.cells={added:A,removed:y,changed:{data:h,textContent:E}}),(g.metadata!==void 0||g.cells!==void 0)&&this._onDidChange.fire(g)})),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument(o=>{let s=this.notebookDocuments.get(o.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(let c of o.cellTextDocuments)r.closeTextDocument({textDocument:c});this.notebookDocuments.delete(o.notebookDocument.uri);for(let c of s.cells)this.notebookCellMap.delete(c.document)}})),uT.Disposable.create(()=>{n.forEach(o=>o.dispose())})}updateCellMap(e){for(let r of e.cells)this.notebookCellMap.set(r.document,[r,e])}};tre.NotebookDocuments=dxt});var aUr=T(n6e=>{"use strict";f();Object.defineProperty(n6e,"__esModule",{value:!0});n6e.MonikerFeature=void 0;var xWi=Dn(),wWi=a(t=>class extends t{get moniker(){return{on:a(e=>{let r=xWi.MonikerRequest.type;return this.connection.onRequest(r,(n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},"on")}}},"MonikerFeature");n6e.MonikerFeature=wWi});var yxt=T(ya=>{"use strict";f();Object.defineProperty(ya,"__esModule",{value:!0});ya.createConnection=ya.combineFeatures=ya.combineNotebooksFeatures=ya.combineLanguagesFeatures=ya.combineWorkspaceFeatures=ya.combineWindowFeatures=ya.combineClientFeatures=ya.combineTracerFeatures=ya.combineTelemetryFeatures=ya.combineConsoleFeatures=ya._NotebooksImpl=ya._LanguagesImpl=ya.BulkUnregistration=ya.BulkRegistration=ya.ErrorMessageTracker=void 0;var Mr=Dn(),dT=F8e(),hxt=txt(),Wi=V7r(),RWi=W7r(),PWi=z7r(),kWi=Y7r(),DWi=sxt(),NWi=K7r(),MWi=J7r(),OWi=X7r(),BWi=Z7r(),LWi=tUr(),FWi=nUr(),UWi=iUr(),QWi=oUr(),qWi=fxt(),GWi=aUr();function pxt(t){if(t!==null)return t}a(pxt,"null2Undefined");var mxt=class{static{a(this,"ErrorMessageTracker")}constructor(){this._messages=Object.create(null)}add(e){let r=this._messages[e];r||(r=0),r++,this._messages[e]=r}sendErrors(e){Object.keys(this._messages).forEach(r=>{e.window.showErrorMessage(r)})}};ya.ErrorMessageTracker=mxt;var i6e=class{static{a(this,"RemoteConsoleImpl")}constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(Mr.MessageType.Error,e)}warn(e){this.send(Mr.MessageType.Warning,e)}info(e){this.send(Mr.MessageType.Info,e)}log(e){this.send(Mr.MessageType.Log,e)}debug(e){this.send(Mr.MessageType.Debug,e)}send(e,r){this._rawConnection&&this._rawConnection.sendNotification(Mr.LogMessageNotification.type,{type:e,message:r}).catch(()=>{(0,Mr.RAL)().console.error("Sending log message failed")})}},gxt=class{static{a(this,"_RemoteWindowImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...r){let n={type:Mr.MessageType.Error,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(pxt)}showWarningMessage(e,...r){let n={type:Mr.MessageType.Warning,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(pxt)}showInformationMessage(e,...r){let n={type:Mr.MessageType.Info,message:e,actions:r};return this.connection.sendRequest(Mr.ShowMessageRequest.type,n).then(pxt)}},cUr=(0,NWi.ShowDocumentFeature)((0,Wi.ProgressFeature)(gxt)),lUr;(function(t){function e(){return new o6e}a(e,"create"),t.create=e})(lUr||(ya.BulkRegistration=lUr={}));var o6e=class{static{a(this,"BulkRegistrationImpl")}constructor(){this._registrations=[],this._registered=new Set}add(e,r){let n=dT.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);let o=hxt.generateUuid();this._registrations.push({id:o,method:n,registerOptions:r||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}},uUr;(function(t){function e(){return new OAe(void 0,[])}a(e,"create"),t.create=e})(uUr||(ya.BulkUnregistration=uUr={}));var OAe=class{static{a(this,"BulkUnregistrationImpl")}constructor(e,r){this._connection=e,this._unregistrations=new Map,r.forEach(n=>{this._unregistrations.set(n.method,n)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let n of this._unregistrations.values())e.push(n);let r={unregisterations:e};this._connection.sendRequest(Mr.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let r=dT.string(e)?e:e.method,n=this._unregistrations.get(r);if(!n)return!1;let o={unregisterations:[n]};return this._connection.sendRequest(Mr.UnregistrationRequest.type,o).then(()=>{this._unregistrations.delete(r)},s=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)}),!0}},s6e=class{static{a(this,"RemoteClientImpl")}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,r,n){return e instanceof o6e?this.registerMany(e):e instanceof OAe?this.registerSingle1(e,r,n):this.registerSingle2(e,r)}registerSingle1(e,r,n){let o=dT.string(r)?r:r.method,s=hxt.generateUuid(),c={registrations:[{id:s,method:o,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(Mr.RegistrationRequest.type,c).then(l=>(e.add({id:s,method:o}),e),l=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(l)))}registerSingle2(e,r){let n=dT.string(e)?e:e.method,o=hxt.generateUuid(),s={registrations:[{id:o,method:n,registerOptions:r||{}}]};return this.connection.sendRequest(Mr.RegistrationRequest.type,s).then(c=>Mr.Disposable.create(()=>{this.unregisterSingle(o,n).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),c=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(c)))}unregisterSingle(e,r){let n={unregisterations:[{id:e,method:r}]};return this.connection.sendRequest(Mr.UnregistrationRequest.type,n).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let r=e.asRegistrationParams();return this.connection.sendRequest(Mr.RegistrationRequest.type,r).then(()=>new OAe(this._connection,r.registrations.map(n=>({id:n.id,method:n.method}))),n=>(this.connection.console.info("Bulk registration failed."),Promise.reject(n)))}},Axt=class{static{a(this,"_RemoteWorkspaceImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function r(o){return o&&!!o.edit}a(r,"isApplyWorkspaceEditParams");let n=r(e)?e:{edit:e};return this.connection.sendRequest(Mr.ApplyWorkspaceEditRequest.type,n)}},dUr=(0,MWi.FileOperationsFeature)((0,PWi.WorkspaceFoldersFeature)((0,RWi.ConfigurationFeature)(Axt))),a6e=class{static{a(this,"TracerImpl")}constructor(){this._trace=Mr.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,r){this._trace!==Mr.Trace.Off&&this.connection.sendNotification(Mr.LogTraceNotification.type,{message:e,verbose:this._trace===Mr.Trace.Verbose?r:void 0}).catch(()=>{})}},c6e=class{static{a(this,"TelemetryImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(Mr.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},l6e=class{static{a(this,"_LanguagesImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Wi.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,Wi.attachPartialResult)(this.connection,r)}};ya._LanguagesImpl=l6e;var fUr=(0,FWi.FoldingRangeFeature)((0,GWi.MonikerFeature)((0,QWi.DiagnosticFeature)((0,UWi.InlayHintFeature)((0,LWi.InlineValueFeature)((0,BWi.TypeHierarchyFeature)((0,OWi.LinkedEditingRangeFeature)((0,DWi.SemanticTokensFeature)((0,kWi.CallHierarchyFeature)(l6e))))))))),u6e=class{static{a(this,"_NotebooksImpl")}constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,Wi.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,r){return(0,Wi.attachPartialResult)(this.connection,r)}};ya._NotebooksImpl=u6e;var pUr=(0,qWi.NotebookSyncFeature)(u6e);function hUr(t,e){return function(r){return e(t(r))}}a(hUr,"combineConsoleFeatures");ya.combineConsoleFeatures=hUr;function mUr(t,e){return function(r){return e(t(r))}}a(mUr,"combineTelemetryFeatures");ya.combineTelemetryFeatures=mUr;function gUr(t,e){return function(r){return e(t(r))}}a(gUr,"combineTracerFeatures");ya.combineTracerFeatures=gUr;function AUr(t,e){return function(r){return e(t(r))}}a(AUr,"combineClientFeatures");ya.combineClientFeatures=AUr;function yUr(t,e){return function(r){return e(t(r))}}a(yUr,"combineWindowFeatures");ya.combineWindowFeatures=yUr;function EUr(t,e){return function(r){return e(t(r))}}a(EUr,"combineWorkspaceFeatures");ya.combineWorkspaceFeatures=EUr;function _Ur(t,e){return function(r){return e(t(r))}}a(_Ur,"combineLanguagesFeatures");ya.combineLanguagesFeatures=_Ur;function CUr(t,e){return function(r){return e(t(r))}}a(CUr,"combineNotebooksFeatures");ya.combineNotebooksFeatures=CUr;function HWi(t,e){function r(o,s,c){return o&&s?c(o,s):o||s}return a(r,"combine"),{__brand:"features",console:r(t.console,e.console,hUr),tracer:r(t.tracer,e.tracer,gUr),telemetry:r(t.telemetry,e.telemetry,mUr),client:r(t.client,e.client,AUr),window:r(t.window,e.window,yUr),workspace:r(t.workspace,e.workspace,EUr),languages:r(t.languages,e.languages,_Ur),notebooks:r(t.notebooks,e.notebooks,CUr)}}a(HWi,"combineFeatures");ya.combineFeatures=HWi;function jWi(t,e,r){let n=r&&r.console?new(r.console(i6e)):new i6e,o=t(n);n.rawAttach(o);let s=r&&r.tracer?new(r.tracer(a6e)):new a6e,c=r&&r.telemetry?new(r.telemetry(c6e)):new c6e,l=r&&r.client?new(r.client(s6e)):new s6e,u=r&&r.window?new(r.window(cUr)):new cUr,d=r&&r.workspace?new(r.workspace(dUr)):new dUr,p=r&&r.languages?new(r.languages(fUr)):new fUr,h=r&&r.notebooks?new(r.notebooks(pUr)):new pUr,m=[n,s,c,l,u,d,p,h];function g(v){return v instanceof Promise?v:dT.thenable(v)?new Promise((b,I)=>{v.then(x=>b(x),x=>I(x))}):Promise.resolve(v)}a(g,"asPromise");let A,y,E,_={listen:a(()=>o.listen(),"listen"),sendRequest:a((v,...b)=>o.sendRequest(dT.string(v)?v:v.method,...b),"sendRequest"),onRequest:a((v,b)=>o.onRequest(v,b),"onRequest"),sendNotification:a((v,b)=>{let I=dT.string(v)?v:v.method;return o.sendNotification(I,b)},"sendNotification"),onNotification:a((v,b)=>o.onNotification(v,b),"onNotification"),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:a(v=>(y=v,{dispose:a(()=>{y=void 0},"dispose")}),"onInitialize"),onInitialized:a(v=>o.onNotification(Mr.InitializedNotification.type,v),"onInitialized"),onShutdown:a(v=>(A=v,{dispose:a(()=>{A=void 0},"dispose")}),"onShutdown"),onExit:a(v=>(E=v,{dispose:a(()=>{E=void 0},"dispose")}),"onExit"),get console(){return n},get telemetry(){return c},get tracer(){return s},get client(){return l},get window(){return u},get workspace(){return d},get languages(){return p},get notebooks(){return h},onDidChangeConfiguration:a(v=>o.onNotification(Mr.DidChangeConfigurationNotification.type,v),"onDidChangeConfiguration"),onDidChangeWatchedFiles:a(v=>o.onNotification(Mr.DidChangeWatchedFilesNotification.type,v),"onDidChangeWatchedFiles"),__textDocumentSync:void 0,onDidOpenTextDocument:a(v=>o.onNotification(Mr.DidOpenTextDocumentNotification.type,v),"onDidOpenTextDocument"),onDidChangeTextDocument:a(v=>o.onNotification(Mr.DidChangeTextDocumentNotification.type,v),"onDidChangeTextDocument"),onDidCloseTextDocument:a(v=>o.onNotification(Mr.DidCloseTextDocumentNotification.type,v),"onDidCloseTextDocument"),onWillSaveTextDocument:a(v=>o.onNotification(Mr.WillSaveTextDocumentNotification.type,v),"onWillSaveTextDocument"),onWillSaveTextDocumentWaitUntil:a(v=>o.onRequest(Mr.WillSaveTextDocumentWaitUntilRequest.type,v),"onWillSaveTextDocumentWaitUntil"),onDidSaveTextDocument:a(v=>o.onNotification(Mr.DidSaveTextDocumentNotification.type,v),"onDidSaveTextDocument"),sendDiagnostics:a(v=>o.sendNotification(Mr.PublishDiagnosticsNotification.type,v),"sendDiagnostics"),onHover:a(v=>o.onRequest(Mr.HoverRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onHover"),onCompletion:a(v=>o.onRequest(Mr.CompletionRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onCompletion"),onCompletionResolve:a(v=>o.onRequest(Mr.CompletionResolveRequest.type,v),"onCompletionResolve"),onSignatureHelp:a(v=>o.onRequest(Mr.SignatureHelpRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onSignatureHelp"),onDeclaration:a(v=>o.onRequest(Mr.DeclarationRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDeclaration"),onDefinition:a(v=>o.onRequest(Mr.DefinitionRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDefinition"),onTypeDefinition:a(v=>o.onRequest(Mr.TypeDefinitionRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onTypeDefinition"),onImplementation:a(v=>o.onRequest(Mr.ImplementationRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onImplementation"),onReferences:a(v=>o.onRequest(Mr.ReferencesRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onReferences"),onDocumentHighlight:a(v=>o.onRequest(Mr.DocumentHighlightRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDocumentHighlight"),onDocumentSymbol:a(v=>o.onRequest(Mr.DocumentSymbolRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDocumentSymbol"),onWorkspaceSymbol:a(v=>o.onRequest(Mr.WorkspaceSymbolRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onWorkspaceSymbol"),onWorkspaceSymbolResolve:a(v=>o.onRequest(Mr.WorkspaceSymbolResolveRequest.type,v),"onWorkspaceSymbolResolve"),onCodeAction:a(v=>o.onRequest(Mr.CodeActionRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onCodeAction"),onCodeActionResolve:a(v=>o.onRequest(Mr.CodeActionResolveRequest.type,(b,I)=>v(b,I)),"onCodeActionResolve"),onCodeLens:a(v=>o.onRequest(Mr.CodeLensRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onCodeLens"),onCodeLensResolve:a(v=>o.onRequest(Mr.CodeLensResolveRequest.type,(b,I)=>v(b,I)),"onCodeLensResolve"),onDocumentFormatting:a(v=>o.onRequest(Mr.DocumentFormattingRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onDocumentFormatting"),onDocumentRangeFormatting:a(v=>o.onRequest(Mr.DocumentRangeFormattingRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onDocumentRangeFormatting"),onDocumentOnTypeFormatting:a(v=>o.onRequest(Mr.DocumentOnTypeFormattingRequest.type,(b,I)=>v(b,I)),"onDocumentOnTypeFormatting"),onRenameRequest:a(v=>o.onRequest(Mr.RenameRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onRenameRequest"),onPrepareRename:a(v=>o.onRequest(Mr.PrepareRenameRequest.type,(b,I)=>v(b,I)),"onPrepareRename"),onDocumentLinks:a(v=>o.onRequest(Mr.DocumentLinkRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDocumentLinks"),onDocumentLinkResolve:a(v=>o.onRequest(Mr.DocumentLinkResolveRequest.type,(b,I)=>v(b,I)),"onDocumentLinkResolve"),onDocumentColor:a(v=>o.onRequest(Mr.DocumentColorRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onDocumentColor"),onColorPresentation:a(v=>o.onRequest(Mr.ColorPresentationRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onColorPresentation"),onFoldingRanges:a(v=>o.onRequest(Mr.FoldingRangeRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onFoldingRanges"),onSelectionRanges:a(v=>o.onRequest(Mr.SelectionRangeRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),(0,Wi.attachPartialResult)(o,b))),"onSelectionRanges"),onExecuteCommand:a(v=>o.onRequest(Mr.ExecuteCommandRequest.type,(b,I)=>v(b,I,(0,Wi.attachWorkDone)(o,b),void 0)),"onExecuteCommand"),dispose:a(()=>o.dispose(),"dispose")};for(let v of m)v.attach(_);return o.onRequest(Mr.InitializeRequest.type,v=>{e.initialize(v),dT.string(v.trace)&&(s.trace=Mr.Trace.fromString(v.trace));for(let b of m)b.initialize(v.capabilities);if(y){let b=y(v,new Mr.CancellationTokenSource().token,(0,Wi.attachWorkDone)(o,v),void 0);return g(b).then(I=>{if(I instanceof Mr.ResponseError)return I;let x=I;x||(x={capabilities:{}});let w=x.capabilities;w||(w={},x.capabilities=w),w.textDocumentSync===void 0||w.textDocumentSync===null?w.textDocumentSync=dT.number(_.__textDocumentSync)?_.__textDocumentSync:Mr.TextDocumentSyncKind.None:!dT.number(w.textDocumentSync)&&!dT.number(w.textDocumentSync.change)&&(w.textDocumentSync.change=dT.number(_.__textDocumentSync)?_.__textDocumentSync:Mr.TextDocumentSyncKind.None);for(let R of m)R.fillServerCapabilities(w);return x})}else{let b={capabilities:{textDocumentSync:Mr.TextDocumentSyncKind.None}};for(let I of m)I.fillServerCapabilities(b.capabilities);return b}}),o.onRequest(Mr.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,A)return A(new Mr.CancellationTokenSource().token)}),o.onNotification(Mr.ExitNotification.type,()=>{try{E&&E()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),o.onNotification(Mr.SetTraceNotification.type,v=>{s.trace=Mr.Trace.fromString(v.value)}),_}a(jWi,"createConnection");ya.createConnection=jWi});var vUr=T(FE=>{"use strict";f();Object.defineProperty(FE,"__esModule",{value:!0});FE.resolveModulePath=FE.FileSystem=FE.resolveGlobalYarnPath=FE.resolveGlobalNodePath=FE.resolve=FE.uriToFilePath=void 0;var $Wi=require("url"),Ix=require("path"),Ext=require("fs"),bxt=require("child_process");function VWi(t){let e=$Wi.parse(t);if(e.protocol!=="file:"||!e.path)return;let r=e.path.split("/");for(var n=0,o=r.length;n1){let s=r[0],c=r[1];s.length===0&&c.length>1&&c[1]===":"&&r.shift()}return Ix.normalize(r.join("/"))}a(VWi,"uriToFilePath");FE.uriToFilePath=VWi;function _xt(){return process.platform==="win32"}a(_xt,"isWindows");function d6e(t,e,r,n){let o="NODE_PATH",s=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((c,l)=>{let u=process.env,d=Object.create(null);Object.keys(u).forEach(p=>d[p]=u[p]),e&&Ext.existsSync(e)&&(d[o]?d[o]=e+Ix.delimiter+d[o]:d[o]=e,n&&n(`NODE_PATH value is: ${d[o]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let p=(0,bxt.fork)("",[],{cwd:r,env:d,execArgv:["-e",s]});if(p.pid===void 0){l(new Error(`Starting process to resolve node module ${t} failed`));return}p.on("error",m=>{l(m)}),p.on("message",m=>{m.c==="r"&&(p.send({c:"e"}),m.s?c(m.r):l(new Error(`Failed to resolve module: ${t}`)))});let h={c:"rs",a:t};p.send(h)}catch(p){l(p)}})}a(d6e,"resolve");FE.resolve=d6e;function Cxt(t){let e="npm",r=Object.create(null);Object.keys(process.env).forEach(s=>r[s]=process.env[s]),r.NO_UPDATE_NOTIFIER="true";let n={encoding:"utf8",env:r};_xt()&&(e="npm.cmd",n.shell=!0);let o=a(()=>{},"handler");try{process.on("SIGPIPE",o);let s=(0,bxt.spawnSync)(e,["config","get","prefix"],n).stdout;if(!s){t&&t("'npm config get prefix' didn't return a value.");return}let c=s.trim();return t&&t(`'npm config get prefix' value is: ${c}`),c.length>0?_xt()?Ix.join(c,"node_modules"):Ix.join(c,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",o)}}a(Cxt,"resolveGlobalNodePath");FE.resolveGlobalNodePath=Cxt;function WWi(t){let e="yarn",r={encoding:"utf8"};_xt()&&(e="yarn.cmd",r.shell=!0);let n=a(()=>{},"handler");try{process.on("SIGPIPE",n);let o=(0,bxt.spawnSync)(e,["global","dir","--json"],r),s=o.stdout;if(!s){t&&(t("'yarn global dir' didn't return a value."),o.stderr&&t(o.stderr));return}let c=s.trim().split(/\r?\n/);for(let l of c)try{let u=JSON.parse(l);if(u.type==="log")return Ix.join(u.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",n)}}a(WWi,"resolveGlobalYarnPath");FE.resolveGlobalYarnPath=WWi;var vxt;(function(t){let e;function r(){return e!==void 0||(process.platform==="win32"?e=!1:e=!Ext.existsSync(__filename.toUpperCase())||!Ext.existsSync(__filename.toLowerCase())),e}a(r,"isCaseSensitive"),t.isCaseSensitive=r;function n(o,s){return r()?Ix.normalize(s).indexOf(Ix.normalize(o))===0:Ix.normalize(s).toLowerCase().indexOf(Ix.normalize(o).toLowerCase())===0}a(n,"isParent"),t.isParent=n})(vxt||(FE.FileSystem=vxt={}));function zWi(t,e,r,n){return r?(Ix.isAbsolute(r)||(r=Ix.join(t,r)),d6e(e,r,r,n).then(o=>vxt.isParent(r,o)?o:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,o=>d6e(e,Cxt(n),t,n))):d6e(e,Cxt(n),t,n)}a(zWi,"resolveModulePath");FE.resolveModulePath=zWi});var Txt=T((AAl,bUr)=>{"use strict";f();bUr.exports=Dn()});var TUr=T(f6e=>{"use strict";f();Object.defineProperty(f6e,"__esModule",{value:!0});f6e.InlineCompletionFeature=void 0;var YWi=Dn(),KWi=a(t=>class extends t{get inlineCompletion(){return{on:a(e=>this.connection.onRequest(YWi.InlineCompletionRequest.type,(r,n)=>e(r,n,this.attachWorkDoneProgress(r))),"on")}}},"InlineCompletionFeature");f6e.InlineCompletionFeature=KWi});var xUr=T(Pg=>{"use strict";f();var JWi=Pg&&Pg.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),IUr=Pg&&Pg.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&JWi(e,t,r)};Object.defineProperty(Pg,"__esModule",{value:!0});Pg.ProposedFeatures=Pg.NotebookDocuments=Pg.TextDocuments=Pg.SemanticTokensBuilder=void 0;var XWi=sxt();Object.defineProperty(Pg,"SemanticTokensBuilder",{enumerable:!0,get:a(function(){return XWi.SemanticTokensBuilder},"get")});var ZWi=TUr();IUr(Dn(),Pg);var ezi=uxt();Object.defineProperty(Pg,"TextDocuments",{enumerable:!0,get:a(function(){return ezi.TextDocuments},"get")});var tzi=fxt();Object.defineProperty(Pg,"NotebookDocuments",{enumerable:!0,get:a(function(){return tzi.NotebookDocuments},"get")});IUr(yxt(),Pg);var SUr;(function(t){t.all={__brand:"features",languages:ZWi.InlineCompletionFeature}})(SUr||(Pg.ProposedFeatures=SUr={}))});var mu=T(fT=>{"use strict";f();var rzi=fT&&fT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kUr=fT&&fT.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rzi(e,t,r)};Object.defineProperty(fT,"__esModule",{value:!0});fT.createConnection=fT.Files=void 0;var wUr=require("node:util"),Sxt=F8e(),nzi=yxt(),BAe=vUr(),TH=Txt();kUr(Txt(),fT);kUr(xUr(),fT);var RUr;(function(t){t.uriToFilePath=BAe.uriToFilePath,t.resolveGlobalNodePath=BAe.resolveGlobalNodePath,t.resolveGlobalYarnPath=BAe.resolveGlobalYarnPath,t.resolve=BAe.resolve,t.resolveModulePath=BAe.resolveModulePath})(RUr||(fT.Files=RUr={}));var PUr;function p6e(){if(PUr!==void 0)try{PUr.end()}catch{}}a(p6e,"endProtocolConnection");var rre=!1,DUr;function izi(){let t="--clientProcessId";function e(r){try{let n=parseInt(r);isNaN(n)||(DUr=setInterval(()=>{try{process.kill(n,0)}catch{p6e(),process.exit(rre?0:1)}},3e3))}catch{}}a(e,"runTimer");for(let r=2;r{let e=t.processId;Sxt.number(e)&&DUr===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(rre?0:1)}},3e3)},"initialize"),get shutdownReceived(){return rre},set shutdownReceived(t){rre=t},exit:a(t=>{p6e(),process.exit(t)},"exit")};function szi(t,e,r,n){let o,s,c,l;return t!==void 0&&t.__brand==="features"&&(o=t,t=e,e=r,r=n),TH.ConnectionStrategy.is(t)||TH.ConnectionOptions.is(t)?l=t:(s=t,c=e,l=r),azi(s,c,l,o)}a(szi,"createConnection");fT.createConnection=szi;function azi(t,e,r,n){let o=!1;if(!t&&!e&&process.argv.length>2){let u,d,p=process.argv.slice(2);for(let h=0;h{p6e(),process.exit(rre?0:1)}),u.on("close",()=>{p6e(),process.exit(rre?0:1)})}let l=a(u=>{let d=(0,TH.createProtocolConnection)(t,e,u,r);return o&&czi(u),d},"connectionFactory");return(0,nzi.createConnection)(l,ozi,n)}a(azi,"_createConnection");function czi(t){function e(n){return n.map(o=>typeof o=="string"?o:(0,wUr.inspect)(o)).join(" ")}a(e,"serialize");let r=new Map;console.assert=a(function(o,...s){if(!o)if(s.length===0)t.error("Assertion failed");else{let[c,...l]=s;t.error(`Assertion failed: ${c} ${e(l)}`)}},"assert"),console.count=a(function(o="default"){let s=String(o),c=r.get(s)??0;c+=1,r.set(s,c),t.log(`${s}: ${s}`)},"count"),console.countReset=a(function(o){o===void 0?r.clear():r.delete(String(o))},"countReset"),console.debug=a(function(...o){t.log(e(o))},"debug"),console.dir=a(function(o,s){t.log((0,wUr.inspect)(o,s))},"dir"),console.log=a(function(...o){t.log(e(o))},"log"),console.error=a(function(...o){t.error(e(o))},"error"),console.trace=a(function(...o){let s=new Error().stack.replace(/(.+\n){2}/,""),c="Trace";o.length!==0&&(c+=`: ${e(o)}`),t.log(`${c} +${s}`)},"trace"),console.warn=a(function(...o){t.warn(e(o))},"warn")}a(czi,"patchConsole")});var xx=T((RAl,NUr)=>{"use strict";f();NUr.exports=mu()});var qE=T(rFe=>{"use strict";f();Object.defineProperty(rFe,"__esModule",{value:!0});rFe.Position=void 0;var Lwt=class t{static{a(this,"Position")}constructor(e,r){this.lineNumber=e,this.column=r}with(e=this.lineNumber,r=this.column){return e===this.lineNumber&&r===this.column?this:new t(e,r)}delta(e=0,r=0){return this.with(Math.max(1,this.lineNumber+e),Math.max(1,this.column+r))}equals(e){return t.equals(this,e)}static equals(e,r){return!e&&!r?!0:!!e&&!!r&&e.lineNumber===r.lineNumber&&e.column===r.column}isBefore(e){return t.isBefore(this,e)}static isBefore(e,r){return e.lineNumber{"use strict";f();Object.defineProperty(nFe,"__esModule",{value:!0});nFe.Range=void 0;var Hqr=qE(),Fwt=class t{static{a(this,"Range")}constructor(e,r,n,o){e>n||e===n&&r>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=r):(this.startLineNumber=e,this.startColumn=r,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.columne.endColumn)}static strictContainsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.column<=e.startColumn||r.lineNumber===e.endLineNumber&&r.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumn<=e.startColumn||r.endLineNumber===e.endLineNumber&&r.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,r){let n,o,s,c;return r.startLineNumbere.endLineNumber?(s=r.endLineNumber,c=r.endColumn):r.endLineNumber===e.endLineNumber?(s=r.endLineNumber,c=Math.max(r.endColumn,e.endColumn)):(s=e.endLineNumber,c=e.endColumn),new t(n,o,s,c)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,r){let n=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,c=e.endColumn,l=r.startLineNumber,u=r.startColumn,d=r.endLineNumber,p=r.endColumn;return nd?(s=d,c=p):s===d&&(c=Math.min(c,p)),n>s||n===s&&o>c?null:new t(n,o,s,c)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,r){return!e&&!r?!0:!!e&&!!r&&e.startLineNumber===r.startLineNumber&&e.startColumn===r.startColumn&&e.endLineNumber===r.endLineNumber&&e.endColumn===r.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new Hqr.Position(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new Hqr.Position(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,r){return new t(this.startLineNumber,this.startColumn,e,r)}setStartPosition(e,r){return new t(e,r,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,r=e){return new t(e.lineNumber,e.column,r.lineNumber,r.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,r){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};nFe.Range=Fwt});var tGr=T((Lbl,eGr)=>{"use strict";f();eGr.exports=Xqr;function Xqr(t,e,r){t instanceof RegExp&&(t=Jqr(t,r)),e instanceof RegExp&&(e=Jqr(e,r));var n=Zqr(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}a(Xqr,"balanced");function Jqr(t,e){var r=e.match(t);return r?r[0]:null}a(Jqr,"maybeMatch");Xqr.range=Zqr;function Zqr(t,e,r){var n,o,s,c,l,u=r.indexOf(t),d=r.indexOf(e,u+1),p=u;if(u>=0&&d>0){if(t===e)return[u,d];for(n=[],s=r.length;p>=0&&!l;)p==u?(n.push(p),u=r.indexOf(t,p+1)):n.length==1?l=[n.pop(),d]:(o=n.pop(),o=0?u:d;n.length&&(l=[s,c])}return l}a(Zqr,"range")});var lGr=T((Qbl,cGr)=>{f();var rGr=tGr();cGr.exports=rKi;var nGr="\0SLASH"+Math.random()+"\0",iGr="\0OPEN"+Math.random()+"\0",jwt="\0CLOSE"+Math.random()+"\0",oGr="\0COMMA"+Math.random()+"\0",sGr="\0PERIOD"+Math.random()+"\0";function Hwt(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}a(Hwt,"numeric");function eKi(t){return t.split("\\\\").join(nGr).split("\\{").join(iGr).split("\\}").join(jwt).split("\\,").join(oGr).split("\\.").join(sGr)}a(eKi,"escapeBraces");function tKi(t){return t.split(nGr).join("\\").split(iGr).join("{").split(jwt).join("}").split(oGr).join(",").split(sGr).join(".")}a(tKi,"unescapeBraces");function aGr(t){if(!t)return[""];var e=[],r=rGr("{","}",t);if(!r)return t.split(",");var n=r.pre,o=r.body,s=r.post,c=n.split(",");c[c.length-1]+="{"+o+"}";var l=aGr(s);return s.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),e.push.apply(e,c),e}a(aGr,"parseCommaParts");function rKi(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),tye(eKi(t),!0).map(tKi)):[]}a(rKi,"expandTop");function nKi(t){return"{"+t+"}"}a(nKi,"embrace");function iKi(t){return/^-?0\d/.test(t)}a(iKi,"isPadded");function oKi(t,e){return t<=e}a(oKi,"lte");function sKi(t,e){return t>=e}a(sKi,"gte");function tye(t,e){var r=[],n=rGr("{","}",t);if(!n)return[t];var o=n.pre,s=n.post.length?tye(n.post,!1):[""];if(/\$$/.test(n.pre))for(var c=0;c=0;if(!p&&!h)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+jwt+n.post,tye(t)):[t];var m;if(p)m=n.body.split(/\.\./);else if(m=aGr(n.body),m.length===1&&(m=tye(m[0],!1).map(nKi),m.length===1))return s.map(function(Q){return n.pre+m[0]+Q});var g;if(p){var A=Hwt(m[0]),y=Hwt(m[1]),E=Math.max(m[0].length,m[1].length),_=m.length==3?Math.max(Math.abs(Hwt(m[2])),1):1,v=oKi,b=y0){var P=new Array(R+1).join("0");x<0?w="-"+P+w.slice(1):w=P+w}}g.push(w)}}else{g=[];for(var k=0;k{"use strict";f();Object.defineProperty(JRt,"__esModule",{value:!0});JRt.assertNever=Bto;function Bto(t,e=`unexpected value ${t}`){throw new Error(`Unreachable: ${e}`)}a(Bto,"assertNever")});var Bye=T($M=>{"use strict";f();Object.defineProperty($M,"__esModule",{value:!0});$M.ChatCompletionContentPartOpaque=$M.ChatCompletionContentPartKind=$M.ChatRole=void 0;var Lto=Yjr(),r9e;(function(t){t[t.System=0]="System",t[t.User=1]="User",t[t.Assistant=2]="Assistant",t[t.Tool=3]="Tool"})(r9e||($M.ChatRole=r9e={}));(function(t){function e(r){switch(r){case t.System:return"system";case t.User:return"user";case t.Assistant:return"assistant";case t.Tool:return"tool";default:(0,Lto.assertNever)(r,`unknown chat role ${r}}`)}}a(e,"display"),t.display=e})(r9e||($M.ChatRole=r9e={}));var Kjr;(function(t){t[t.Image=0]="Image",t[t.Text=1]="Text",t[t.Opaque=2]="Opaque",t[t.CacheBreakpoint=3]="CacheBreakpoint",t[t.Document=4]="Document"})(Kjr||($M.ChatCompletionContentPartKind=Kjr={}));var Jjr;(function(t){function e(r,n){return!r.scope||(r.scope&n)!==0}a(e,"usableIn"),t.usableIn=e})(Jjr||($M.ChatCompletionContentPartOpaque=Jjr={}))});var XRt=T(zP=>{"use strict";f();Object.defineProperty(zP,"__esModule",{value:!0});zP.BaseTokensPerName=zP.BaseTokensPerMessage=zP.BaseTokensPerCompletion=zP.ChatRole=void 0;var Xjr;(function(t){t.System="system",t.User="user",t.Assistant="assistant",t.Function="function",t.Tool="tool"})(Xjr||(zP.ChatRole=Xjr={}));zP.BaseTokensPerCompletion=3;zP.BaseTokensPerMessage=3;zP.BaseTokensPerName=1});var r$r=T(i9e=>{"use strict";f();Object.defineProperty(i9e,"__esModule",{value:!0});i9e.toOpenAiChatMessage=t$r;i9e.toOpenAIChatMessages=Uto;var YP=Bye(),n9e=XRt(),Fto=B6();function Zjr(t){return t.filter(e=>e.type===YP.ChatCompletionContentPartKind.Text).map(e=>e.text).join("")}a(Zjr,"onlyStringContent");function e$r(t){let e=t.map(r=>{if(r.type===YP.ChatCompletionContentPartKind.Text)return{type:"text",text:r.text};if(r.type===YP.ChatCompletionContentPartKind.Image)return{image_url:r.imageUrl,type:"image_url"};if(r.type===YP.ChatCompletionContentPartKind.Document)return;if(r.type===YP.ChatCompletionContentPartKind.Opaque&&YP.ChatCompletionContentPartOpaque.usableIn(r,Fto.OutputMode.OpenAI))return r.value}).filter(r=>!!r);return e.every(r=>r.type==="text")?e.map(r=>r.text).join(""):e}a(e$r,"stringAndImageContent");function t$r(t){switch(t.role){case YP.ChatRole.System:return{role:n9e.ChatRole.System,content:Zjr(t.content),name:t.name};case YP.ChatRole.User:return{role:n9e.ChatRole.User,content:e$r(t.content),name:t.name};case YP.ChatRole.Assistant:return{role:n9e.ChatRole.Assistant,content:Zjr(t.content),name:t.name,tool_calls:t.toolCalls?.map(e=>({id:e.id,function:e.function,type:"function"}))};case YP.ChatRole.Tool:return{role:n9e.ChatRole.Tool,content:e$r(t.content),tool_call_id:t.toolCallId};default:return}}a(t$r,"toOpenAiChatMessage");function Uto(t){return t.map(t$r).filter(e=>!!e)}a(Uto,"toOpenAIChatMessages")});var i$r=T(a9e=>{"use strict";f();Object.defineProperty(a9e,"__esModule",{value:!0});a9e.toVsCodeChatMessage=n$r;a9e.toVsCodeChatMessages=Qto;var s9e=Bye();function o9e(t){return t.filter(e=>e.type===s9e.ChatCompletionContentPartKind.Text).map(e=>e.text).join("")}a(o9e,"onlyStringContent");var L6;function n$r(t){switch(L6??=require("vscode"),t.role){case s9e.ChatRole.Assistant:let e=L6.LanguageModelChatMessage.Assistant(o9e(t.content),t.name);return t.toolCalls&&(e.content=[new L6.LanguageModelTextPart(o9e(t.content)),...t.toolCalls.map(r=>{let n;try{n=JSON.parse(r.function.arguments)}catch{throw new Error("Invalid JSON in tool call arguments for tool call: "+r.id)}return new L6.LanguageModelToolCallPart(r.id,r.function.name,n)})]),e;case s9e.ChatRole.User:return L6.LanguageModelChatMessage.User(o9e(t.content),t.name);case s9e.ChatRole.Tool:{let r=L6.LanguageModelChatMessage.User("");return r.content=[new L6.LanguageModelToolResultPart(t.toolCallId,[new L6.LanguageModelTextPart(o9e(t.content))])],r}default:return}}a(n$r,"toVsCodeChatMessage");function Qto(t){return t.map(n$r).filter(e=>!!e)}a(Qto,"toVsCodeChatMessages")});var B6=T(Ux=>{"use strict";f();Object.defineProperty(Ux,"__esModule",{value:!0});Ux.OutputMode=Ux.Raw=Ux.OpenAI=void 0;Ux.toMode=ZRt;Ux.toVSCode=qto;Ux.toOpenAI=Gto;var o$r=r$r(),s$r=i$r();Ux.OpenAI=XRt();Ux.Raw=Bye();var sj;(function(t){t[t.Raw=1]="Raw",t[t.OpenAI=2]="OpenAI",t[t.VSCode=4]="VSCode"})(sj||(Ux.OutputMode=sj={}));function ZRt(t,e){switch(t){case sj.Raw:return e;case sj.VSCode:return e instanceof Array?(0,s$r.toVsCodeChatMessages)(e):(0,s$r.toVsCodeChatMessage)(e);case sj.OpenAI:return e instanceof Array?(0,o$r.toOpenAIChatMessages)(e):(0,o$r.toOpenAiChatMessage)(e);default:throw new Error(`Unknown output mode: ${t}`)}}a(ZRt,"toMode");function qto(t){return ZRt(sj.VSCode,t)}a(qto,"toVSCode");function Gto(t){return ZRt(sj.OpenAI,t)}a(Gto,"toOpenAI")});var e2t=T(Lye=>{"use strict";f();Object.defineProperty(Lye,"__esModule",{value:!0});Lye.jsonRetainedProps=void 0;Lye.forEachNode=a$r;Lye.jsonRetainedProps=Object.keys({flexBasis:1,flexGrow:1,flexReserve:1,passPriority:1,priority:1});function a$r(t,e){if(e(t),t.type===1)for(let r of t.children)a$r(r,e)}a(a$r,"forEachNode")});var c$r=T(t2t=>{"use strict";f();Object.defineProperty(t2t,"__esModule",{value:!0});t2t.once=Hto;function Hto(t){let e,r=!1,n=a(((...o)=>(r||(e=t(...o),r=!0),e)),"wrappedFunction");return n.clear=()=>{r=!1},n}a(Hto,"once")});var o2t=T(sh=>{"use strict";f();Object.defineProperty(sh,"__esModule",{value:!0});sh.BudgetExceededError=sh.MaterializedChatMessageDocument=sh.MaterializedChatMessageImage=sh.MaterializedChatMessageBreakpoint=sh.MaterializedChatMessageOpaque=sh.MaterializedChatMessage=sh.MaterializedChatMessageTextChunk=sh.GenericMaterializedContainer=void 0;var aj=c$r(),dm=B6(),VM=class t{static{a(this,"GenericMaterializedContainer")}parent;id;name;priority;metadata;flags;children;keepWithId;constructor(e,r,n,o,s,c,l){if(this.parent=e,this.id=r,this.name=n,this.priority=o,this.metadata=c,this.flags=l,this.children=s(this),l&8){if(this.children.length!==2)throw new Error("Invalid number of children for EmptyAlternate flag");let[u,d]=this.children;d.isEmpty?this.children=[u]:this.children=[d]}}has(e){return!!(this.flags&e)}async tokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{let o=U6(n)?await n.tokenCount(e):await n.upperBoundTokenCount(e);r+=o})),r}async upperBoundTokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{let o=await n.upperBoundTokenCount(e);r+=o})),r}replaceNode(e,r){return A$r(e,this.children,r)}allMetadata(){return g$r(this)}findById(e){return i2t(e,this)}get isEmpty(){return!this.children.some(e=>!e.isEmpty)}onChunksChange(){this.parent?.onChunksChange()}*toChatMessages(){for(let e of this.children)jto(e),e instanceof t?yield*e.toChatMessages():!e.isEmpty&&e instanceof qx&&(yield e.toChatMessage())}async baseMessageTokenCount(e){let r=0;return await Promise.all(this.children.map(async n=>{if(n instanceof qx||n instanceof t){let o=await n.baseMessageTokenCount(e);r+=o}})),r}removeLowestPriorityChild(){let e=[];return n2t(this,e),e}};sh.GenericMaterializedContainer=VM;var Fye=class{static{a(this,"MaterializedChatMessageTextChunk")}parent;text;priority;metadata;lineBreakBefore;constructor(e,r,n,o=[],s){this.parent=e,this.text=r,this.priority=n,this.metadata=o,this.lineBreakBefore=s}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,aj.once)(async e=>await e.tokenLength({type:dm.Raw.ChatCompletionContentPartKind.Text,text:this.text})+(this.lineBreakBefore!==0?1:0));get isEmpty(){return!/\S/.test(this.text)}};sh.MaterializedChatMessageTextChunk=Fye;var qx=class{static{a(this,"MaterializedChatMessage")}parent;id;role;name;toolCalls;toolCallId;priority;metadata;children;constructor(e,r,n,o,s,c,l,u,d){this.parent=e,this.id=r,this.role=n,this.name=o,this.toolCalls=s,this.toolCallId=c,this.priority=l,this.metadata=u,this.children=d(this)}async tokenCount(e){return this._tokenCount(e)}async upperBoundTokenCount(e){return this._upperBound(e)}get text(){return this._text()}get isEmpty(){return!this.toolCalls?.length&&!this.children.some(e=>!e.isEmpty)}replaceNode(e,r){let n=A$r(e,this.children,r);return n&&this.onChunksChange(),n}removeLowestPriorityChild(){let e=[];return n2t(this,e),e}onChunksChange(){this._tokenCount.clear(),this._upperBound.clear(),this._text.clear(),this.parent?.onChunksChange()}findById(e){return i2t(e,this)}_tokenCount=(0,aj.once)(async e=>{let r=this.toChatMessage();return e.countMessageTokens((0,dm.toMode)(e.mode,r))});_upperBound=(0,aj.once)(async e=>{let r=await this.baseMessageTokenCount(e);return await Promise.all(this.children.map(async n=>{let o=await n.upperBoundTokenCount(e);r+=o})),r});baseMessageTokenCount=(0,aj.once)(e=>{let r=this.toChatMessage();return r.content=r.content.map(n=>n.type===dm.Raw.ChatCompletionContentPartKind.Text?{...n,text:""}:n.type===dm.Raw.ChatCompletionContentPartKind.Image||n.type===dm.Raw.ChatCompletionContentPartKind.Document?void 0:n).filter(n=>!!n),e.countMessageTokens((0,dm.toMode)(e.mode,r))});_text=(0,aj.once)(()=>{let e=[];for(let{content:r,isTextSibling:n}of h$r(this)){if(r instanceof cj||r instanceof lj||r instanceof F6){e.push(r);continue}if(r instanceof Qx){e.at(-1)instanceof Qx?e[e.length-1]=r:e.push(r);continue}if(r.lineBreakBefore===1||r.lineBreakBefore===2&&!n){let o=e[e.length-1];typeof o=="string"&&o&&!o.endsWith(` `)&&(e[e.length-1]=o+` -`)}typeof e[e.length-1]=="string"?e[e.length-1]+=r.text:e.push(r.text)}return e});toChatMessage(){let e=this.text.map(r=>{if(typeof r=="string")return{type:_m.Raw.ChatCompletionContentPartKind.Text,text:r};if(r instanceof t$)return{type:_m.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:Ejr(r.src),detail:r.detail,...r.mimeType?{mediaType:r.mimeType}:{}}};if(r instanceof r$)return{type:_m.Raw.ChatCompletionContentPartKind.Document,documentData:{data:r.data,mediaType:r.mediaType}};if(r instanceof dF)return{type:_m.Raw.ChatCompletionContentPartKind.Opaque,value:r.value};if(r instanceof Jx)return r.part;throw new Error("Unexpected element type")});if(this.role===_m.Raw.ChatRole.System)return{role:this.role,content:e,...this.name?{name:this.name}:{}};if(this.role===_m.Raw.ChatRole.Assistant){let r={role:this.role,content:e};return this.name&&(r.name=this.name),this.toolCalls?.length&&(r.toolCalls=this.toolCalls.map(n=>({function:n.function,id:n.id,type:n.type}))),r}else return this.role===_m.Raw.ChatRole.User?{role:this.role,content:e,...this.name?{name:this.name}:{}}:this.role===_m.Raw.ChatRole.Tool?{role:this.role,content:e,toolCallId:this.toolCallId}:{role:this.role,content:e,name:this.name}}};ph.MaterializedChatMessage=Xx;var dF=class{static{a(this,"MaterializedChatMessageOpaque")}parent;part;priority;metadata=[];get value(){return this.part.value}constructor(e,r,n=Number.MAX_SAFE_INTEGER){this.parent=e,this.part=r,this.priority=n}upperBoundTokenCount(e){return this.part.tokenUsage&&_m.Raw.ChatCompletionContentPartOpaque.usableIn(this.part,e.mode)?this.part.tokenUsage:0}isEmpty=!1};ph.MaterializedChatMessageOpaque=dF;var Jx=class{static{a(this,"MaterializedChatMessageBreakpoint")}parent;part;metadata=[];priority=Number.MAX_SAFE_INTEGER;constructor(e,r){this.parent=e,this.part=r}upperBoundTokenCount(e){return 0}isEmpty=!1};ph.MaterializedChatMessageBreakpoint=Jx;var t$=class{static{a(this,"MaterializedChatMessageImage")}parent;id;src;priority;metadata;lineBreakBefore;detail;mimeType;constructor(e,r,n,o,s=[],c,l,u){this.parent=e,this.id=r,this.src=n,this.priority=o,this.metadata=s,this.lineBreakBefore=c,this.detail=l,this.mimeType=u}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,e$.once)(async e=>e.tokenLength({type:_m.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:Ejr(this.src),detail:this.detail,mediaType:this.mimeType}}));isEmpty=!1};ph.MaterializedChatMessageImage=t$;var r$=class{static{a(this,"MaterializedChatMessageDocument")}parent;id;data;mediaType;priority;metadata;lineBreakBefore;constructor(e,r,n,o,s,c=[],l){this.parent=e,this.id=r,this.data=n,this.mediaType=o,this.priority=s,this.metadata=c,this.lineBreakBefore=l}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,e$.once)(async e=>e.tokenLength({type:_m.Raw.ChatCompletionContentPartKind.Document,documentData:{data:this.data,mediaType:this.mediaType}}));isEmpty=!1};ph.MaterializedChatMessageDocument=r$;function fF(t){return t instanceof uO||t instanceof Xx}a(fF,"isContainerType");function hjr(t){return t instanceof QEe||t instanceof t$||t instanceof r$||t instanceof dF||t instanceof Jx}a(hjr,"isContentType");function HZi(t){if(!fF(t))throw new Error(`Cannot have a text node outside a ChatMessage. Text: "${t.text}"`)}a(HZi,"assertContainerOrChatMessage");function*mjr(t,e=!1){for(let r of t.children)r instanceof QEe?(yield{content:r,isTextSibling:e},e=!0):r instanceof t$||r instanceof r$||r instanceof dF||r instanceof Jx?yield{content:r,isTextSibling:!1}:r instanceof dF?yield{content:r,isTextSibling:!0}:(r&&(yield*mjr(r,e)),e=!1)}a(mjr,"contentChunks");function jZi(t,e){let r;function n(o,s){if(hjr(o))(!r||o.priorityn instanceof Jx):t instanceof uO&&(r=t.children.some(gjr)),ujr.set(t,r),r}a(gjr,"hasCachePoint");function $Zi(t){if(t instanceof Xx)return!0;for(let e=t.parent;e;e=e.parent)if(e instanceof Xx)return!1;return!0}a($Zi,"shouldLookForCachePointInNode");function LRt(t,e){let r;if(t instanceof uO&&t.has(1)){jZi(t,e);return}let n=$Zi(t),o=t.children.map((s,c)=>({chain:[t],index:c}));for(let s=0;s({chain:d,index:h})))}else if(!r||u.priorityo instanceof Xx?o.role:o.name||"(anonymous)");super(`No lowest priority node found (path: ${n.join(" -> ")})`)}};ph.BudgetExceededError=e7e;function djr(t){if(!fF(t))return-1;let e=Number.MAX_SAFE_INTEGER;for(let r of t.children)e=Math.min(e,r.priority);return e}a(djr,"getLowestPriorityAmongChildren");function*Ajr(t){yield*t.metadata;for(let e of t.children)fF(e)?yield*Ajr(e):yield*e.metadata}a(Ajr,"allMetadata");function yjr(t,e,r){for(let n=0;n0;){let r=e.pop();yield r,fF(r)&&e.push(...r.children)}}a(fjr,"forEachNode");function VZi(t){let e=t;for(;e.parent;)e=e.parent;return e}a(VZi,"getRoot");function pjr(t){return t instanceof uO&&t.keepWithId!==void 0}a(pjr,"isKeepWith");var BRt=new Set;function WZi(t,e){let r=new Set;for(let n of fjr(t))pjr(n)&&!BRt.has(n.keepWithId)&&r.add(n.keepWithId);if(r.size===0)return!1;for(let n of r)BRt.add(n);try{let n=VZi(t);for(let o of fjr(n))pjr(o)&&r.has(o.keepWithId)?qEe(o,e):o instanceof Xx&&o.toolCalls&&(o.toolCalls=zZi(o.toolCalls,s=>!(s.keepWith&&r.has(s.keepWith.id))),o.isEmpty&&qEe(o,e))}finally{for(let n of r)BRt.delete(n)}}a(WZi,"removeOtherKeepWiths");function FRt(t,e){if(e.id===t)return e;for(let r of e.children)if(fF(r)){let n=FRt(t,r);if(n)return n}}a(FRt,"findNodeById");function qEe(t,e){let r=t.parent;if(!r)return;let n=r.children.indexOf(t);n!==-1&&(r.children.splice(n,1),e.push(t),WZi(t,e),r.isEmpty?qEe(r,e):r.onChunksChange())}a(qEe,"removeNode");function Ejr(t){let e={"/9j/":"image/jpeg",iVBOR:"image/png",R0lGOD:"image/gif",UklGR:"image/webp"};for(let r of Object.keys(e))if(t.startsWith(r))return`data:${e[r]};base64,${t}`;return t}a(Ejr,"getEncodedBase64");function zZi(t,e){for(let r=0;r{"use strict";f();function YZi(t,e,...r){return{ctor:t,props:e,children:r.flat()}}a(YZi,"_vscpp");function Cjr(){throw new Error("This should not be invoked!")}a(Cjr,"_vscppf");Cjr.isFragment=!0;globalThis.vscpp=YZi;globalThis.vscppf=Cjr});var qRt=T(t7e=>{"use strict";f();Object.defineProperty(t7e,"__esModule",{value:!0});t7e.PromptElement=void 0;_jr();var QRt=class{static{a(this,"PromptElement")}props;get priority(){return this.props.priority??Number.MAX_SAFE_INTEGER}get insertLineBreakBefore(){return!0}constructor(e){this.props=e}};t7e.PromptElement=QRt});var XRt=T(Zo=>{"use strict";f();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.LogicalWrapper=Zo.IfEmpty=Zo.AbstractKeepWith=Zo.TokenLimit=Zo.Expandable=Zo.Chunk=Zo.LegacyPrioritization=Zo.ToolResult=Zo.PrioritizedList=Zo.Document=Zo.Image=Zo.TextChunk=Zo.ToolMessage=Zo.AssistantMessage=Zo.UserMessage=Zo.SystemMessage=Zo.BaseChatMessage=void 0;Zo.isChatMessagePromptElement=KZi;Zo.useKeepWith=eeo;var HEe=po(),tv=qRt();function KZi(t){return t instanceof r7e||t instanceof n7e||t instanceof i7e}a(KZi,"isChatMessagePromptElement");var n$=class extends tv.PromptElement{static{a(this,"BaseChatMessage")}render(){return vscpp(vscppf,null,this.props.children)}};Zo.BaseChatMessage=n$;var r7e=class extends n${static{a(this,"SystemMessage")}constructor(e){e.role=HEe.Raw.ChatRole.System,super(e)}};Zo.SystemMessage=r7e;var n7e=class extends n${static{a(this,"UserMessage")}constructor(e){e.role=HEe.Raw.ChatRole.User,super(e)}};Zo.UserMessage=n7e;var i7e=class extends n${static{a(this,"AssistantMessage")}constructor(e){e.role=HEe.Raw.ChatRole.Assistant,super(e)}};Zo.AssistantMessage=i7e;var JZi=/\s+/g,GRt=class extends n${static{a(this,"ToolMessage")}constructor(e){e.role=HEe.Raw.ChatRole.Tool,super(e)}};Zo.ToolMessage=GRt;var o7e=class extends tv.PromptElement{static{a(this,"TextChunk")}async prepare(e,r,n){let o=this.props.breakOnWhitespace?JZi:this.props.breakOn;if(!o)return vscpp(vscppf,null,this.props.children);let s="",c=[];for(let u of this.props.children||[])if(u&&typeof u=="object"){if(typeof u.ctor!="string")throw new Error("TextChunk children must be text literals or intrinsic attributes.");u.ctor==="br"?s+=` -`:c.push(u)}else u!=null&&(s+=u);let l=await XZi(e,o,s,n);return vscpp(vscppf,null,c,l)}render(e){return e}};Zo.TextChunk=o7e;async function XZi(t,e,r,n){if(e instanceof RegExp){if(!e.global)throw new Error(`\`breakOn\` expression must have the global flag set (got ${e})`);e.lastIndex=0}let o="",s=-1;for(;st.tokenBudget)return o;o=l,s=c}return o}a(XZi,"getTextContentBelowBudget");var HRt=class extends tv.PromptElement{static{a(this,"Image")}constructor(e){super(e)}render(){return vscpp(vscppf,null,this.props.children)}};Zo.Image=HRt;var jRt=class extends tv.PromptElement{static{a(this,"Document")}constructor(e){super(e)}render(){return vscpp(vscppf,null,this.props.children)}};Zo.Document=jRt;var $Rt=class extends tv.PromptElement{static{a(this,"PrioritizedList")}render(){let{children:e,priority:r=0,descending:n}=this.props;if(e)return vscpp(vscppf,null,e.map((o,s)=>{if(!o)return;let c=n?r-s:r-e.length+s;return typeof o!="object"?vscpp(o7e,{priority:c},o):(o.props??={},o.props.priority=c,o)}))}};Zo.PrioritizedList=$Rt;var VRt=class extends tv.PromptElement{static{a(this,"ToolResult")}render(){return vscpp(vscppf,null,this.props.data.content.map(e=>{if(e&&typeof e.value=="string")return e.value;if(e&&e.value&&typeof e.value.node=="object")return vscpp("elementJSON",{data:e.value})}))}};Zo.ToolResult=VRt;var WRt=class extends tv.PromptElement{static{a(this,"LegacyPrioritization")}render(){return vscpp(vscppf,null,this.props.children)}};Zo.LegacyPrioritization=WRt;var zRt=class extends tv.PromptElement{static{a(this,"Chunk")}render(){return vscpp(vscppf,null,this.props.children)}};Zo.Chunk=zRt;var YRt=class extends tv.PromptElement{static{a(this,"Expandable")}async render(e,r){return vscpp(vscppf,null,await this.props.value(r))}};Zo.Expandable=YRt;var KRt=class extends tv.PromptElement{static{a(this,"TokenLimit")}render(){return vscpp(vscppf,null,this.props.children)}};Zo.TokenLimit=KRt;var s7e=class extends tv.PromptElement{static{a(this,"AbstractKeepWith")}};Zo.AbstractKeepWith=s7e;var ZZi=0;function eeo(){let t=ZZi++;return class extends s7e{static{a(this,"KeepWith")}static id=t;id=t;render(){return vscpp(vscppf,null,this.props.children)}}}a(eeo,"useKeepWith");var JRt=class extends tv.PromptElement{static{a(this,"IfEmpty")}render(){return vscpp(vscppf,null,vscpp(GEe,null,this.props.alt),vscpp(GEe,{flexGrow:1},this.props.children))}};Zo.IfEmpty=JRt;var GEe=class extends tv.PromptElement{static{a(this,"LogicalWrapper")}render(){return vscpp(vscppf,null,this.props.children)}};Zo.LogicalWrapper=GEe});var bjr=T(jEe=>{"use strict";f();Object.defineProperty(jEe,"__esModule",{value:!0});jEe.localize=teo;jEe.localize2=reo;jEe.getConfiguredDefaultLocale=neo;function vjr(t,e){let r;return e.length===0?r=t:r=t.replace(/\{(\d+)\}/g,function(n,o){let s=o[0];return typeof e[s]<"u"?e[s]:n}),r}a(vjr,"_format");function teo(t,e,...r){return vjr(e,r)}a(teo,"localize");function reo(t,e,...r){let n=vjr(e,r);return{original:n,value:n}}a(reo,"localize2");function neo(t){}a(neo,"getConfiguredDefaultLocale")});var r2t=T(lr=>{"use strict";f();Object.defineProperty(lr,"__esModule",{value:!0});lr.isAndroid=lr.isEdge=lr.isSafari=lr.isFirefox=lr.isChrome=lr.OS=lr.setTimeout0=lr.setTimeout0IsFaster=lr.translationsConfigFile=lr.platformLocale=lr.locale=lr.Language=lr.language=lr.userAgent=lr.platform=lr.isCI=lr.isMobile=lr.isIOS=lr.webWorkerOrigin=lr.isWebWorker=lr.isWeb=lr.isElectron=lr.isNative=lr.isLinuxSnap=lr.isLinux=lr.isMacintosh=lr.isWindows=lr.LANGUAGE_DEFAULT=void 0;lr.PlatformToString=oeo;lr.isLittleEndian=seo;lr.isBigSurOrNewer=aeo;var Tjr=bjr();lr.LANGUAGE_DEFAULT="en";var WEe=!1,zEe=!1,VEe=!1,wjr=!1,Rjr=!1,e2t=!1,Pjr=!1,t2t=!1,kjr=!1,Njr=!1,$Ee,a7e=lr.LANGUAGE_DEFAULT,ZRt=lr.LANGUAGE_DEFAULT,Djr,dO,fO=globalThis,rv;typeof fO.vscode<"u"&&typeof fO.vscode.process<"u"?rv=fO.vscode.process:typeof process<"u"&&(rv=process);var Mjr=typeof rv?.versions?.electron=="string",ieo=Mjr&&rv?.type==="renderer";if(typeof rv=="object"){WEe=rv.platform==="win32",zEe=rv.platform==="darwin",VEe=rv.platform==="linux",wjr=VEe&&!!rv.env.SNAP&&!!rv.env.SNAP_REVISION,Pjr=Mjr,kjr=!!rv.env.CI||!!rv.env.BUILD_ARTIFACTSTAGINGDIRECTORY,$Ee=lr.LANGUAGE_DEFAULT,a7e=lr.LANGUAGE_DEFAULT;let t=rv.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t),r=e.availableLanguages["*"];$Ee=e.locale,ZRt=e.osLocale,a7e=r||lr.LANGUAGE_DEFAULT,Djr=e._translationsConfigFile}catch{}Rjr=!0}else typeof navigator=="object"&&!ieo?(dO=navigator.userAgent,WEe=dO.indexOf("Windows")>=0,zEe=dO.indexOf("Macintosh")>=0,t2t=(dO.indexOf("Macintosh")>=0||dO.indexOf("iPad")>=0||dO.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,VEe=dO.indexOf("Linux")>=0,Njr=dO?.indexOf("Mobi")>=0,e2t=!0,$Ee=Tjr.getConfiguredDefaultLocale(Tjr.localize({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||lr.LANGUAGE_DEFAULT,a7e=$Ee,ZRt=navigator.language):console.error("Unable to resolve platform.");function oeo(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}a(oeo,"PlatformToString");var c7e=0;zEe?c7e=1:WEe?c7e=3:VEe&&(c7e=2);lr.isWindows=WEe;lr.isMacintosh=zEe;lr.isLinux=VEe;lr.isLinuxSnap=wjr;lr.isNative=Rjr;lr.isElectron=Pjr;lr.isWeb=e2t;lr.isWebWorker=e2t&&typeof fO.importScripts=="function";lr.webWorkerOrigin=lr.isWebWorker?fO.origin:void 0;lr.isIOS=t2t;lr.isMobile=Njr;lr.isCI=kjr;lr.platform=c7e;lr.userAgent=dO;lr.language=a7e;var Sjr;(function(t){function e(){return lr.language}a(e,"value"),t.value=e;function r(){return lr.language.length===2?lr.language==="en":lr.language.length>=3?lr.language[0]==="e"&&lr.language[1]==="n"&&lr.language[2]==="-":!1}a(r,"isDefaultVariant"),t.isDefaultVariant=r;function n(){return lr.language==="en"}a(n,"isDefault"),t.isDefault=n})(Sjr||(lr.Language=Sjr={}));lr.locale=$Ee;lr.platformLocale=ZRt;lr.translationsConfigFile=Djr;lr.setTimeout0IsFaster=typeof fO.postMessage=="function"&&!fO.importScripts;lr.setTimeout0=(()=>{if(lr.setTimeout0IsFaster){let t=[];fO.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),fO.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();lr.OS=zEe||t2t?2:WEe?1:3;var Ijr=!0,xjr=!1;function seo(){if(!xjr){xjr=!0;let t=new Uint8Array(2);t[0]=1,t[1]=2,Ijr=new Uint16Array(t.buffer)[0]===513}return Ijr}a(seo,"isLittleEndian");lr.isChrome=!!(lr.userAgent&&lr.userAgent.indexOf("Chrome")>=0);lr.isFirefox=!!(lr.userAgent&&lr.userAgent.indexOf("Firefox")>=0);lr.isSafari=!!(!lr.isChrome&&lr.userAgent&&lr.userAgent.indexOf("Safari")>=0);lr.isEdge=!!(lr.userAgent&&lr.userAgent.indexOf("Edg/")>=0);lr.isAndroid=!!(lr.userAgent&&lr.userAgent.indexOf("Android")>=0);function aeo(t){return parseFloat(t)>=20}a(aeo,"isBigSurOrNewer")});var Bjr=T(ck=>{"use strict";f();Object.defineProperty(ck,"__esModule",{value:!0});ck.arch=ck.platform=ck.env=ck.cwd=void 0;var Ojr=r2t(),i$,n2t=globalThis.vscode;if(typeof n2t<"u"&&typeof n2t.process<"u"){let t=n2t.process;i$={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"?i$={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:i$={get platform(){return Ojr.isWindows?"win32":Ojr.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};ck.cwd=i$.cwd;ck.env=i$.env;ck.platform=i$.platform;ck.arch=i$.arch});var Fjr=T(Jr=>{"use strict";f();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.delimiter=Jr.sep=Jr.toNamespacedPath=Jr.parse=Jr.format=Jr.extname=Jr.basename=Jr.dirname=Jr.relative=Jr.resolve=Jr.join=Jr.isAbsolute=Jr.normalize=Jr.posix=Jr.win32=void 0;var Ine=Bjr(),ceo=65,leo=97,ueo=90,deo=122,mF=46,hh=47,iC=92,pF=58,feo=63,l7e=class extends Error{static{a(this,"ErrorInvalidArgType")}code;constructor(e,r,n){let o;typeof r=="string"&&r.indexOf("not ")===0?(o="must not be",r=r.replace(/^not /,"")):o="must be";let s=e.indexOf(".")!==-1?"property":"argument",c=`The "${e}" ${s} ${o} of type ${r}`;c+=`. Received type ${typeof n}`,super(c),this.code="ERR_INVALID_ARG_TYPE"}};function peo(t,e){if(t===null||typeof t!="object")throw new l7e(e,"Object",t)}a(peo,"validateObject");function Ld(t,e){if(typeof t!="string")throw new l7e(e,"string",t)}a(Ld,"validateString");var oC=Ine.platform==="win32";function bo(t){return t===hh||t===iC}a(bo,"isPathSeparator");function i2t(t){return t===hh}a(i2t,"isPosixPathSeparator");function hF(t){return t>=ceo&&t<=ueo||t>=leo&&t<=deo}a(hF,"isWindowsDeviceRoot");function u7e(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===mF&&l!==-1?++l:l=-1}return o}a(u7e,"normalizeString");function Ljr(t,e){peo(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(Ljr,"_format");Jr.win32={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],Ld(s,"path"),s.length===0)continue}else e.length===0?s=Ine.cwd():(s=Ine.env[`=${e}`]||Ine.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===iC)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)bo(p)&&(l=1,d=!0);else if(bo(p))if(d=!0,bo(s.charCodeAt(1))){let h=2,m=h;for(;h2&&bo(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=u7e(r,!n,"\\",bo),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){Ld(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return i2t(s)?"\\":t;if(bo(s))if(o=!0,bo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&bo(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&bo(t.charCodeAt(e-1))&&(c+="\\"),n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){Ld(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return bo(r)||e>2&&hF(r)&&t.charCodeAt(1)===pF&&bo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&bo(r.charCodeAt(0))){++o;let s=r.length;s>1&&bo(r.charCodeAt(1))&&(++o,s>2&&(bo(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return Jr.win32.normalize(e)},relative(t,e){if(Ld(t,"from"),Ld(e,"to"),t===e)return"";let r=Jr.win32.resolve(t),n=Jr.win32.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";let o=0;for(;oo&&t.charCodeAt(s-1)===iC;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===iC;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===iC)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===iC?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===iC)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===iC&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=Jr.win32.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===iC){if(e.charCodeAt(1)===iC){let r=e.charCodeAt(2);if(r!==feo&&r!==mF)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(hF(e.charCodeAt(0))&&e.charCodeAt(1)===pF&&e.charCodeAt(2)===iC)return`\\\\?\\${e}`;return t},dirname(t){Ld(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return bo(o)?t:".";if(bo(o)){if(r=n=1,bo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&bo(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(bo(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&Ld(e,"ext"),Ld(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&hF(t.charCodeAt(0))&&t.charCodeAt(1)===pF&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(bo(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(bo(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Ld(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===pF&&hF(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(bo(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===mF?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:Ljr.bind(null,"\\"),parse(t){Ld(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return bo(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(bo(o)){if(n=1,bo(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),bo(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===mF?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null};var heo=(()=>{if(oC){let t=/\\/g;return()=>{let e=Ine.cwd().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Ine.cwd()})();Jr.posix={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){let o=n>=0?t[n]:heo();Ld(o,"path"),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===hh)}return e=u7e(e,!r,"/",i2t),r?`/${e}`:e.length>0?e:"."},normalize(t){if(Ld(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===hh,r=t.charCodeAt(t.length-1)===hh;return t=u7e(t,!e,"/",i2t),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Ld(t,"path"),t.length>0&&t.charCodeAt(0)===hh},join(...t){if(t.length===0)return".";let e;for(let r=0;r0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Jr.posix.normalize(e)},relative(t,e){if(Ld(t,"from"),Ld(e,"to"),t===e||(t=Jr.posix.resolve(t),e=Jr.posix.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===hh)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===hh?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===hh)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(Ld(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===hh,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===hh){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&Ld(e,"ext"),Ld(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===hh){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===hh){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Ld(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t.charCodeAt(c);if(l===hh){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l===mF?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:Ljr.bind(null,"/"),parse(t){Ld(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===hh,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===hh){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===mF?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Jr.posix.win32=Jr.win32.win32=Jr.win32;Jr.posix.posix=Jr.win32.posix=Jr.posix;Jr.normalize=oC?Jr.win32.normalize:Jr.posix.normalize;Jr.isAbsolute=oC?Jr.win32.isAbsolute:Jr.posix.isAbsolute;Jr.join=oC?Jr.win32.join:Jr.posix.join;Jr.resolve=oC?Jr.win32.resolve:Jr.posix.resolve;Jr.relative=oC?Jr.win32.relative:Jr.posix.relative;Jr.dirname=oC?Jr.win32.dirname:Jr.posix.dirname;Jr.basename=oC?Jr.win32.basename:Jr.posix.basename;Jr.extname=oC?Jr.win32.extname:Jr.posix.extname;Jr.format=oC?Jr.win32.format:Jr.posix.format;Jr.parse=oC?Jr.win32.parse:Jr.posix.parse;Jr.toNamespacedPath=oC?Jr.win32.toNamespacedPath:Jr.posix.toNamespacedPath;Jr.sep=oC?Jr.win32.sep:Jr.posix.sep;Jr.delimiter=oC?Jr.win32.delimiter:Jr.posix.delimiter});var $jr=T(xne=>{"use strict";f();Object.defineProperty(xne,"__esModule",{value:!0});xne.URI=void 0;xne.isUriComponents=veo;xne.uriToFsPath=h7e;var Ujr=Fjr(),f7e=r2t(),meo=/^\w[\w\d+.-]*$/,geo=/^\//,Aeo=/^\/\//;function yeo(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!meo.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!geo.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Aeo.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}a(yeo,"_validateUri");function Eeo(t,e){return!t&&!e?"file":t}a(Eeo,"_schemeFix");function Ceo(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==Zx&&(e=Zx+e):e=Zx;break}return e}a(Ceo,"_referenceResolution");var Hc="",Zx="/",_eo=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p7e=class t{static{a(this,"URI")}static isUri(e){return e instanceof t?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}scheme;authority;path;query;fragment;constructor(e,r,n,o,s,c=!1){typeof e=="object"?(this.scheme=e.scheme||Hc,this.authority=e.authority||Hc,this.path=e.path||Hc,this.query=e.query||Hc,this.fragment=e.fragment||Hc):(this.scheme=Eeo(e,c),this.authority=r||Hc,this.path=Ceo(this.scheme,n||Hc),this.query=o||Hc,this.fragment=s||Hc,yeo(this,c))}get fsPath(){return h7e(this,!1)}with(e){if(!e)return this;let{scheme:r,authority:n,path:o,query:s,fragment:c}=e;return r===void 0?r=this.scheme:r===null&&(r=Hc),n===void 0?n=this.authority:n===null&&(n=Hc),o===void 0?o=this.path:o===null&&(o=Hc),s===void 0?s=this.query:s===null&&(s=Hc),c===void 0?c=this.fragment:c===null&&(c=Hc),r===this.scheme&&n===this.authority&&o===this.path&&s===this.query&&c===this.fragment?this:new gF(r,n,o,s,c)}static parse(e,r=!1){let n=_eo.exec(e);return n?new gF(n[2]||Hc,d7e(n[4]||Hc),d7e(n[5]||Hc),d7e(n[7]||Hc),d7e(n[9]||Hc),r):new gF(Hc,Hc,Hc,Hc,Hc)}static file(e){let r=Hc;if(f7e.isWindows&&(e=e.replace(/\\/g,Zx)),e[0]===Zx&&e[1]===Zx){let n=e.indexOf(Zx,2);n===-1?(r=e.substring(2),e=Zx):(r=e.substring(2,n),e=e.substring(n)||Zx)}return new gF("file",r,e,Hc,Hc)}static from(e,r){return new gF(e.scheme,e.authority,e.path,e.query,e.fragment,r)}static joinPath(e,...r){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return f7e.isWindows&&e.scheme==="file"?n=t.file(Ujr.win32.join(h7e(e,!0),...r)).path:n=Ujr.posix.join(e.path,...r),e.with({path:n})}toString(e=!1){return o2t(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof t)return e;{let r=new gF(e);return r._formatted=e.external??null,r._fsPath=e._sep===Gjr?e.fsPath??null:null,r}}else return e}};xne.URI=p7e;function veo(t){return!t||typeof t!="object"?!1:typeof t.scheme=="string"&&(typeof t.authority=="string"||typeof t.authority>"u")&&(typeof t.path=="string"||typeof t.path>"u")&&(typeof t.query=="string"||typeof t.query>"u")&&(typeof t.fragment=="string"||typeof t.fragment>"u")}a(veo,"isUriComponents");var Gjr=f7e.isWindows?1:void 0,gF=class extends p7e{static{a(this,"Uri")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=h7e(this,!1)),this._fsPath}toString(e=!1){return e?o2t(this,!0):(this._formatted||(this._formatted=o2t(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Gjr),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Hjr={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Qjr(t,e,r){let n,o=-1;for(let s=0;s=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===45||c===46||c===95||c===126||e&&c===47||r&&c===91||r&&c===93||r&&c===58)o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n!==void 0&&(n+=t.charAt(s));else{n===void 0&&(n=t.substr(0,s));let l=Hjr[c];l!==void 0?(o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n+=l):o===-1&&(o=s)}}return o!==-1&&(n+=encodeURIComponent(t.substring(o))),n!==void 0?n:t}a(Qjr,"encodeURIComponentFast");function beo(t){let e;for(let r=0;r1&&t.scheme==="file"?r=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?r=t.path.substr(1):r=t.path[1].toLowerCase()+t.path.substr(2):r=t.path,f7e.isWindows&&(r=r.replace(/\//g,"\\")),r}a(h7e,"uriToFsPath");function o2t(t,e){let r=e?beo:Qjr,n="",{scheme:o,authority:s,path:c,query:l,fragment:u}=t;if(o&&(n+=o,n+=":"),(s||o==="file")&&(n+=Zx,n+=Zx),s){let d=s.indexOf("@");if(d!==-1){let p=s.substr(0,d);s=s.substr(d+1),d=p.lastIndexOf(":"),d===-1?n+=r(p,!1,!1):(n+=r(p.substr(0,d),!1,!1),n+=":",n+=r(p.substr(d+1),!1,!0)),n+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,d),!1,!0),n+=s.substr(d))}if(c){if(c.length>=3&&c.charCodeAt(0)===47&&c.charCodeAt(2)===58){let d=c.charCodeAt(1);d>=65&&d<=90&&(c=`/${String.fromCharCode(d+32)}:${c.substr(3)}`)}else if(c.length>=2&&c.charCodeAt(1)===58){let d=c.charCodeAt(0);d>=65&&d<=90&&(c=`${String.fromCharCode(d+32)}:${c.substr(2)}`)}n+=r(c,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=e?u:Qjr(u,!1,!1)),n}a(o2t,"_asFormatted");function jjr(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+jjr(t.substr(3)):t}}a(jjr,"decodeURIComponentGraceful");var qjr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function d7e(t){return t.match(qjr)?t.replace(qjr,e=>jjr(e)):t}a(d7e,"percentDecode")});var c2t=T(AF=>{"use strict";f();Object.defineProperty(AF,"__esModule",{value:!0});AF.PromptReference=AF.ChatResponseReferencePartStatusKind=AF.PromptMetadata=void 0;var YEe=$jr(),s2t=class{static{a(this,"PromptMetadata")}_marker;toString(){return Object.getPrototypeOf(this).constructor.name}};AF.PromptMetadata=s2t;var Vjr;(function(t){t[t.Complete=1]="Complete",t[t.Partial=2]="Partial",t[t.Omitted=3]="Omitted"})(Vjr||(AF.ChatResponseReferencePartStatusKind=Vjr={}));var a2t=class t{static{a(this,"PromptReference")}anchor;iconPath;options;static fromJSON(e){let r=a(n=>"scheme"in n?YEe.URI.from(n):{uri:YEe.URI.from(n.uri),range:n.range},"uriOrLocation");return new t("variableName"in e.anchor?{variableName:e.anchor.variableName,value:e.anchor.value&&r(e.anchor.value)}:r(e.anchor),e.iconPath&&("scheme"in e.iconPath?YEe.URI.from(e.iconPath):"light"in e.iconPath?{light:YEe.URI.from(e.iconPath.light),dark:YEe.URI.from(e.iconPath.dark)}:e.iconPath),e.options)}constructor(e,r,n){this.anchor=e,this.iconPath=r,this.options=n}toJSON(){return{anchor:this.anchor,iconPath:this.iconPath,options:this.options}}};AF.PromptReference=a2t});var g2t=T(wne=>{"use strict";f();Object.defineProperty(wne,"__esModule",{value:!0});wne.PromptRenderer=wne.MetadataMap=void 0;var Teo=MRt(),yF=URt(),s$=lF(),Iu=XRt(),m2t=c2t(),g7e;(function(t){t.empty={get:a(()=>{},"get"),getAll:a(()=>[],"getAll")},t.from=e=>({get:a(r=>e.find(n=>n instanceof r),"get"),getAll:a(r=>e.filter(n=>n instanceof r),"getAll")})})(g7e||(wne.MetadataMap=g7e={}));var l2t=class{static{a(this,"PromptRenderer")}_endpoint;_ctor;_props;_tokenizer;_usedContext=[];_ignoredFiles=[];_growables=[];_root=new E7e(null,0);_tokenLimits=[];tracer=void 0;constructor(e,r,n,o){this._endpoint=e,this._ctor=r,this._props=n,this._tokenizer=o}getIgnoredFiles(){return Array.from(new Set(this._ignoredFiles))}getUsedContext(){return this._usedContext}createElement(e){return new e.ctor(e.props)}async _processPromptPieces(e,r,n,o){let s=new Map;for(let[u,d]of r.entries()){if(Array.isArray(d.children)&&(d.props=d.props??{},d.props.children=d.children),!d.ctor){let A=Kjr(d.path);throw new Error(`Invalid ChatMessage child! Child must be a TSX component that extends PromptElement at ${A}`)}let p=this.createElement(d),h;p instanceof Iu.TokenLimit&&(h=d.props.max,this._tokenLimits.push({limit:h,id:d.node.id})),d.node.setObj(p);let m=d.props.flexGrow??1/0,g=s.get(m);g||(g=[],s.set(m,g)),g.push({element:d,promptElementInstance:p,tokenLimit:h})}if(s.size===0)return;let c=[...s.entries()].sort(([u],[d])=>d-u).map(([u,d])=>d),l=a(u=>{let d=0;for(let p=u+1;p{if(E.tokenLimit===void 0)return!1;let _=E.element.props.flexBasis??1,v=_/h;return Math.floor(e.remainingTokenBudget*v){let v=(E.element.props.flexBasis??1)/h;return{tokenBudget:g[_]?E.tokenLimit:Math.floor((e.remainingTokenBudget-m)*v),endpoint:e.endpoint,countTokens:a((b,I)=>this._tokenizer.tokenLength(typeof b=="string"?{type:s$.Raw.ChatCompletionContentPartKind.Text,text:b}:b,I),"countTokens")}});e.consume(-p),this.tracer?.addRenderEpoch?.({inNode:d[0].element.node.parent?.id,flexValue:d[0].element.props.flexGrow??0,tokenBudget:e.remainingTokenBudget,reservedTokens:p,elements:d.map((E,_)=>({id:E.element.node.id,tokenBudget:A[_].tokenBudget}))}),await Promise.all(d.map(async({element:E,promptElementInstance:_},v)=>{let b=await zjr(E,()=>_.prepare?.(A[v],n,o));E.node.setState(b)}));let y=await Promise.all(d.map(async({element:E,promptElementInstance:_},v)=>{let b=A[v];return await zjr(E,()=>_.render(E.node.getState(),b,n,o))}));for(let[E,{element:_,promptElementInstance:v}]of d.entries()){let b=A[E],I=y[E];if(!I)continue;let x=await this._processPromptRenderPiece(new o$(b.tokenBudget,this._endpoint),_,v,I,n,o);v instanceof Iu.Expandable&&this._growables.push({initialConsume:x,elem:_.node}),e.consume(x)}}}async _processPromptRenderPiece(e,r,n,o,s,c){let l=Yjr(o),u=new o$(e.tokenBudget,this._endpoint),{tokensConsumed:d}=await Seo(this._tokenizer,r,n,l);return u.consume(d),await this._handlePromptChildren(r,l,u,s,c),u.consumed}async renderElementJSON(e){return await this._processPromptPieces(new o$(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],void 0,e),{node:this._root.toJSON()}}async render(e,r){let n=await this.renderRaw(e,r);return{...n,messages:(0,s$.toMode)(this._tokenizer.mode,n.messages)}}async renderRaw(e,r){await this._processPromptPieces(new o$(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],e,r);let{container:n,allMetadata:o,removed:s}=await this._getFinalElementTree(this._endpoint.modelMaxPromptTokens,r);this.tracer?.didMaterializeTree?.({budget:this._endpoint.modelMaxPromptTokens,renderedTree:{container:n,removed:s,budget:this._endpoint.modelMaxPromptTokens},tokenizer:this._tokenizer,renderTree:a(m=>this._getFinalElementTree(m,void 0).then(g=>({...g,budget:m})),"renderTree")});let c=[...n.toChatMessages()],l=await n.tokenCount(this._tokenizer),u=[...n.allMetadata()],d=new Set,p=u.map(m=>{if(!(m instanceof lk))return;let g=m.reference,A="variableName"in g.anchor;if(A&&!d.has(g.anchor.variableName))return d.add(g.anchor.variableName),g;if(!A)return g}).filter(C7e),h=o.map(m=>{if(!(m instanceof lk)||u.includes(m))return;let g=m.reference,A="variableName"in g.anchor;if(A&&!d.has(g.anchor.variableName))return d.add(g.anchor.variableName),g;if(!A)return g}).filter(C7e);return{metadata:g7e.from(u),messages:c,hasIgnoredFiles:this._ignoredFiles.length>0,tokenCount:l,references:p,omittedReferences:h}}async _getFinalElementTree(e,r){let n=this._root.materialize(),o=[...n.toChatMessages()],s=[...n.allMetadata()],c=[{limit:e,id:this._root.id},...this._tokenLimits],l=0;for(let u=c.length-1;u>=0;u--){let d=c[u];if(d.limit>e)continue;let p=n.findById(d.id);if(!p)continue;let h=await p.tokenCount(this._tokenizer);if(!(hd.limit;){let g=await p.baseMessageTokenCount(this._tokenizer);do for(let A of p.removeLowestPriorityChild()){l++;let y=A.upperBoundTokenCount(this._tokenizer);m-=(typeof y=="number"?y:await y)*1.25}while(m-g>d.limit);m=await p.tokenCount(this._tokenizer)}}catch(m){throw m instanceof yF.BudgetExceededError&&(m.metadata=g7e.from([...n.allMetadata()]),m.messages=o),m}}return{container:n,allMetadata:s,removed:l}}async _grow(e,r,n,o){if(!this._growables.length)return!1;for(let s of this._growables){if(!e.findById(s.elem.id))continue;let c=s.elem.getObj();if(!(c instanceof Iu.Expandable))throw new Error("unreachable: expected growable");let l=new E7e(null,0,s.elem.id),u=new o$(n-r+s.initialConsume,this._endpoint),d=await this._processPromptRenderPiece(u,{node:l,ctor:this._ctor,props:{},children:[],path:[this._ctor]},c,await c.render(void 0,{tokenBudget:u.tokenBudget,endpoint:this._endpoint,countTokens:a((m,g)=>this._tokenizer.tokenLength(typeof m=="string"?{type:s$.Raw.ChatCompletionContentPartKind.Text,text:m}:m,g),"countTokens")}),void 0,o),p=l.materialize();if(!e.replaceNode(s.elem.id,p))throw new Error("unreachable: could not find old element to replace");if(r-=s.initialConsume,r+=d,r>=n)break}return!0}_handlePromptChildren(e,r,n,o,s){if(e.ctor===Iu.TextChunk){this._handleExtrinsicTextChunkChildren(e.node,e.node,e.props,r);return}let c=[];for(let l of r){if(l.kind==="literal"){e.node.appendStringChild(l.value,e.props.priority??Number.MAX_SAFE_INTEGER);continue}if(l.kind==="intrinsic"){this._handleIntrinsic(e.node,l.name,{priority:e.props.priority??Number.MAX_SAFE_INTEGER,...l.props},A7e(l.children));continue}let u=e.node.createChild();c.push({node:u,ctor:l.ctor,props:l.props,children:l.children,path:[...e.path,l.ctor]})}return this._processPromptPieces(n,c,o,s)}_handleIntrinsic(e,r,n,o,s){switch(r){case"meta":return this._handleIntrinsicMeta(e,n,o);case"br":return this._handleIntrinsicLineBreak(e,n,o,n.priority,s);case"usedContext":return this._handleIntrinsicUsedContext(e,n,o);case"references":return this._handleIntrinsicReferences(e,n,o);case"ignoredFiles":return this._handleIntrinsicIgnoredFiles(e,n,o);case"elementJSON":return this._handleIntrinsicElementJSON(e,n.data);case"cacheBreakpoint":return this._handleIntrinsicCacheBreakpoint(e,n,o,s);case"opaque":return this._handleIntrinsicOpaque(e,n,s)}throw new Error(`Unknown intrinsic element ${r}!`)}_handleIntrinsicCacheBreakpoint(e,r,n,o){if(n.length>0)throw new Error(" must not have children!");e.addCacheBreakpoint(r,o)}_handleIntrinsicMeta(e,r,n){if(n.length>0)throw new Error(" must not have children!");r.local?e.addMetadata(r.value):this._root.addMetadata(r.value)}_handleIntrinsicLineBreak(e,r,n,o,s){if(n.length>0)throw new Error("
must not have children!");e.appendLineBreak(o??Number.MAX_SAFE_INTEGER,s)}_handleIntrinsicOpaque(e,r,n){e.appendOpaque(r.value,r.tokenUsage,r.priority,n)}_handleIntrinsicElementJSON(e,r){let n=e.appendPieceJSON(r.node);if(this.tracer?.includeInEpoch)for(let o of n.elements())this.tracer.includeInEpoch({id:o.id,tokenBudget:0})}_handleIntrinsicUsedContext(e,r,n){if(n.length>0)throw new Error(" must not have children!");this._usedContext.push(...r.value)}_handleIntrinsicReferences(e,r,n){if(n.length>0)throw new Error(" must not have children!");for(let o of r.value)e.addMetadata(new lk(o))}_handleIntrinsicIgnoredFiles(e,r,n){if(n.length>0)throw new Error(" must not have children!");this._ignoredFiles.push(...r.value)}_handleExtrinsicTextChunkChildren(e,r,n,o){let s=[],c=[];for(let l of o){if(l.kind==="extrinsic")throw new Error("TextChunk cannot have extrinsic children!");if(l.kind==="literal"&&s.push(l.value),l.kind==="intrinsic")if(l.name==="br")s.push(` -`);else if(l.name==="references")for(let u of l.props.value)c.push(new lk(u));else this._handleIntrinsic(e,l.name,l.props,A7e(l.children),r.childIndex)}e.appendStringChild(s.join(""),n?.priority??Number.MAX_SAFE_INTEGER,c,r.childIndex,!0)}};wne.PromptRenderer=l2t;async function Seo(t,e,r,n){let o=0;if((0,Iu.isChatMessagePromptElement)(r)){let s={role:e.props.role,content:[],...e.props.name?{name:e.props.name}:void 0,...e.props.toolCalls?{toolCalls:e.props.toolCalls}:void 0,...e.props.toolCallId?{toolCallId:e.props.toolCallId}:void 0};o+=await t.countMessageTokens((0,s$.toMode)(t.mode,s))}for(let s of n)s.kind==="literal"&&(o+=await t.tokenLength({type:s$.Raw.ChatCompletionContentPartKind.Text,text:s.value}));return{tokensConsumed:o}}a(Seo,"computeTokensConsumedByLiterals");function Yjr(t,e=[]){return typeof t>"u"||typeof t=="boolean"?[]:(typeof t=="string"||typeof t=="number"?e.push(new f2t(String(t))):Ieo(t)?A7e(t.children,e):xeo(t)?A7e(t,e):typeof t.ctor=="string"?e.push(new u2t(t.ctor,t.props,t.children)):e.push(new d2t(t.ctor,t.props,t.children)),e)}a(Yjr,"flattenAndReduce");function A7e(t,e=[]){for(let r of t)Yjr(r,e);return e}a(A7e,"flattenAndReduceArr");var u2t=class{static{a(this,"IntrinsicPromptPiece")}name;props;children;kind="intrinsic";constructor(e,r,n){this.name=e,this.props=r,this.children=n}},d2t=class{static{a(this,"ExtrinsicPromptPiece")}ctor;props;children;kind="extrinsic";constructor(e,r,n){this.ctor=e,this.props=r,this.children=n}},f2t=class{static{a(this,"LiteralPromptPiece")}value;priority;kind="literal";constructor(e,r){this.value=e,this.priority=r}},y7e=class t{static{a(this,"PromptOpaque")}parent;childIndex;value;tokenUsage;priority;static fromJSON(e,r,n){return new t(e,r,n.value,n.tokenUsage,n.priority)}kind=2;constructor(e,r,n,o,s){this.parent=e,this.childIndex=r,this.value=n,this.tokenUsage=o,this.priority=s}materialize(e){return new yF.MaterializedChatMessageOpaque(e,{type:s$.Raw.ChatCompletionContentPartKind.Opaque,value:this.value,tokenUsage:this.tokenUsage},this.priority)}toJSON(){return{type:3,value:this.value,tokenUsage:this.tokenUsage,priority:this.priority}}},o$=class{static{a(this,"PromptSizingContext")}tokenBudget;endpoint;_consumed=0;constructor(e,r){this.tokenBudget=e,this.endpoint=r}get consumed(){return this._consumed>this.tokenBudget?this.tokenBudget:this._consumed}get remainingTokenBudget(){return Math.max(0,this.tokenBudget-this._consumed)}consume(e){this._consumed+=e}},E7e=class t{static{a(this,"PromptTreeElement")}parent;childIndex;id;static _nextId=0;static fromJSON(e,r,n){let o=new t(null,e);switch(o._metadata=r.references?.map(s=>new lk(m2t.PromptReference.fromJSON(s)))??[],o._children=r.children.map((s,c)=>{switch(s.type){case 1:return t.fromJSON(c,s,n);case 2:return KEe.fromJSON(o,c,s);case 3:return y7e.fromJSON(o,c,s);default:}}).filter(C7e),r.ctor){case 1:o._objFlags=r.flags??0,o._obj=new Iu.BaseChatMessage(r.props);break;case 2:{if(r.keepWithId!==void 0){let s=n.get(r.keepWithId);s||(s=(0,Iu.useKeepWith)(),n.set(r.keepWithId,s)),o._obj=new s(r.props||{})}else o._obj=new Iu.LogicalWrapper(r.props||{});o._objFlags=r.flags??0;break}case 3:o._obj=new Iu.Image(r.props);break;case 4:o._obj=new Iu.Document(r.props);break;default:}return o}kind=1;_obj=null;_state=void 0;_children=[];_metadata=[];_objFlags=0;constructor(e=null,r,n=t._nextId++){this.parent=e,this.childIndex=r,this.id=n}setObj(e){this._obj=e,this._obj instanceof Iu.LegacyPrioritization&&(this._objFlags|=1),this._obj instanceof Iu.Chunk&&(this._objFlags|=2),this._obj instanceof Iu.IfEmpty&&(this._objFlags|=8),this._obj.props.passPriority&&(this._objFlags|=4)}getObj(){return this._obj}setState(e){this._state=e}getState(){return this._state}createChild(){let e=new t(this,this._children.length);return this._children.push(e),e}appendPieceJSON(e){let r=t.fromJSON(this._children.length,e,new Map);return this._children.push(r),r}appendStringChild(e,r,n,o=this._children.length,s=!1){this._children.push(new KEe(this,o,e,r,n,s))}appendLineBreak(e,r=this._children.length){this._children.push(new KEe(this,r,` -`,e))}appendOpaque(e,r,n,o=this._children.length){this._children.push(new y7e(this,o,e,r,n))}toJSON(){let e={type:1,ctor:2,ctorName:this._obj?.constructor.name,children:this._children.slice().sort((r,n)=>r.childIndex-n.childIndex).map(r=>r.toJSON()).filter(C7e),props:{},references:this._metadata.filter(r=>r instanceof lk).map(r=>r.reference.toJSON())};if(this._obj&&(e.props=m7e(this._obj.props,Teo.jsonRetainedProps)),this._obj instanceof Iu.BaseChatMessage)e.ctor=1,Object.assign(e.props,m7e(this._obj.props,["role","name","toolCalls","toolCallId"]));else{if(this._obj instanceof Iu.Image)return{...e,ctor:3,props:{...e.props,...m7e(this._obj.props,["src","detail","mimeType"])}};if(this._obj instanceof Iu.Document)return{...e,ctor:4,props:{...e.props,...m7e(this._obj.props,["data","mediaType"])}};this._obj instanceof Iu.AbstractKeepWith&&(e.keepWithId=this._obj.id)}return this._objFlags!==0&&(e.flags=this._objFlags),e}materialize(e){if(this._children.sort((r,n)=>r.childIndex-n.childIndex),this._obj instanceof Iu.Image)return new yF.MaterializedChatMessageImage(e,this.id,this._obj.props.src,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,0,this._obj.props.detail??void 0,this._obj.props.mimeType??void 0);if(this._obj instanceof Iu.Document)return new yF.MaterializedChatMessageDocument(e,this.id,this._obj.props.data,this._obj.props.mediaType,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,0);if(this._obj instanceof Iu.BaseChatMessage){if(this._obj.props.role===void 0||typeof this._obj.props.role!="number")throw new Error("Invalid ChatMessage!");return new yF.MaterializedChatMessage(e,this.id,this._obj.props.role,this._obj.props.name,this._obj instanceof Iu.AssistantMessage?this._obj.props.toolCalls:void 0,this._obj instanceof Iu.ToolMessage?this._obj.props.toolCallId:void 0,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,r=>this._children.map(n=>n.materialize(r)))}else{let r=new yF.GenericMaterializedContainer(e,this.id,this._obj?.constructor.name,this._obj?.props.priority??(this._obj?.props.passPriority?0:Number.MAX_SAFE_INTEGER),n=>this._children.map(o=>o.materialize(n)),this._metadata,this._objFlags);return this._obj instanceof Iu.AbstractKeepWith&&(r.keepWithId=this._obj.id),r}}addMetadata(e){this._metadata.push(e)}addCacheBreakpoint(e,r=this._children.length){if(!(this._obj instanceof Iu.BaseChatMessage))throw new Error("Cache breakpoints may only be direct children of chat messages");this._children.push(new p2t({type:s$.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:e.type},r))}*elements(){yield this;for(let e of this._children)e instanceof t&&(yield*e.elements())}},p2t=class{static{a(this,"PromptCacheBreakpoint")}part;childIndex;constructor(e,r){this.part=e,this.childIndex=r}toJSON(){}materialize(e){return new yF.MaterializedChatMessageBreakpoint(e,this.part)}},KEe=class t{static{a(this,"PromptText")}parent;childIndex;text;priority;metadata;lineBreakBefore;static fromJSON(e,r,n){return new t(e,r,n.text,n.priority,n.references?.map(o=>new lk(m2t.PromptReference.fromJSON(o))),n.lineBreakBefore)}kind=2;constructor(e,r,n,o,s,c=!1){this.parent=e,this.childIndex=r,this.text=n,this.priority=o,this.metadata=s,this.lineBreakBefore=c}materialize(e){let r=this.lineBreakBefore?1:this.childIndex===0?2:0;return new yF.MaterializedChatMessageTextChunk(e,this.text,this.priority??Number.MAX_SAFE_INTEGER,this.metadata||[],r)}toJSON(){return{type:2,priority:this.priority,text:this.text,references:this.metadata?.filter(e=>e instanceof lk).map(e=>e.reference.toJSON()),lineBreakBefore:this.lineBreakBefore}}};function Ieo(t){return(typeof t.ctor=="function"&&t.ctor.isFragment)??!1}a(Ieo,"isFragmentCtor");function C7e(t){return t!==void 0}a(C7e,"isDefined");var h2t=class extends m2t.PromptMetadata{static{a(this,"InternalMetadata")}},lk=class extends h2t{static{a(this,"ReferenceMetadata")}reference;constructor(e){super(),this.reference=e}};function xeo(t){return!!t&&typeof t[Symbol.iterator]=="function"}a(xeo,"isIterable");function m7e(t,e){let r={};for(let n of e)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}a(m7e,"pickProps");function Kjr(t){return t.map(e=>typeof e=="string"?e:e?e.name||"":String(e)).join(" > ")}a(Kjr,"atPath");var Wjr=new WeakSet;async function zjr(t,e){try{return await e()}catch(r){throw r instanceof Error&&!Wjr.has(r)&&r.constructor.name!=="CancellationError"&&(Wjr.add(r),r.message+=` (at tsx element ${Kjr(t.path)})`),r}}a(zjr,"annotateError")});var Jjr=T(_7e=>{"use strict";f();Object.defineProperty(_7e,"__esModule",{value:!0});_7e.VSCodeTokenizer=void 0;var A2t=lF(),y2t=class{static{a(this,"VSCodeTokenizer")}countTokens;mode=A2t.OutputMode.VSCode;constructor(e,r){if(this.countTokens=e,r!==A2t.OutputMode.VSCode)throw new Error("`mode` must be set to vscode when using vscode.LanguageModelChat as the tokenizer")}async tokenLength(e,r){return e.type===A2t.Raw.ChatCompletionContentPartKind.Text?this.countTokens(e.text,r):Promise.resolve(0)}async countMessageTokens(e){return this.countTokens(e)}};_7e.VSCodeTokenizer=y2t});var Xjr=T(Rne=>{"use strict";f();Object.defineProperty(Rne,"__esModule",{value:!0});Rne.tracerCss=Rne.tracerSrc=void 0;Rne.tracerSrc='"use strict";(()=>{var $,m,se,Ue,w,re,le,q,X,G,K,Ae,D={},ce=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,J=Array.isArray;function E(t,e){for(var n in e)t[n]=e[n];return t}function ue(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function l(t,e,n){var o,r,_,c={};for(_ in e)_=="key"?o=e[_]:_=="ref"?r=e[_]:c[_]=e[_];if(arguments.length>2&&(c.children=arguments.length>3?$.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(_ in t.defaultProps)c[_]===void 0&&(c[_]=t.defaultProps[_]);return R(t,c,o,r,null)}function R(t,e,n,o,r){var _={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++se,__i:-1,__u:0};return r==null&&m.vnode!=null&&m.vnode(_),_}function N(t){return t.children}function B(t,e){this.props=t,this.context=e}function I(t,e){if(e==null)return t.__?I(t.__,t.__i+1):null;for(var n;ee&&w.sort(q));O.__r=0}function pe(t,e,n,o,r,_,c,a,u,s,p){var i,f,d,b,x,C=o&&o.__k||ce,h=e.length;for(n.__d=u,Be(n,e,C),u=n.__d,i=0;i0?R(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=t,r.__b=t.__b+1,_=null,(a=r.__i=Oe(r,n,c,p))!==-1&&(p--,(_=n[a])&&(_.__u|=131072)),_==null||_.__v===null?(a==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):a!==c&&(a==c-1?i--:a==c+1?i++:(a>c?i--:i++,r.__u|=65536))):r=t.__k[o]=null;if(p)for(o=0;o(u!=null&&(131072&u.__u)==0?1:0))for(;c>=0||a=0){if((u=e[c])&&(131072&u.__u)==0&&r==u.key&&_===u.type)return c;c--}if(a=n.__.length&&n.__.push({}),n.__[t]}function S(t){return V=1,Ve(Ne,t)}function Ve(t,e,n){var o=te(L++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Ne(void 0,e),function(a){var u=o.__N?o.__N[0]:o.__[0],s=o.t(u,a);u!==s&&(o.__N=[s,o.__[1]],o.__c.setState({}))}],o.__c=g,!g.u)){var r=function(a,u,s){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!_||_.call(this,a,u,s);var i=!1;return p.forEach(function(f){if(f.__N){var d=f.__[0];f.__=f.__N,f.__N=void 0,d!==f.__[0]&&(i=!0)}}),!(!i&&o.__c.props===a)&&(!_||_.call(this,a,u,s))};g.u=!0;var _=g.shouldComponentUpdate,c=g.componentWillUpdate;g.componentWillUpdate=function(a,u,s){if(this.__e){var p=_;_=void 0,r(a,u,s),_=p}c&&c.call(this,a,u,s)},g.shouldComponentUpdate=r}return o.__N||o.__}function Se(t,e){var n=te(L++,3);!y.__s&&Ie(n.__H,e)&&(n.__=t,n.i=e,g.__H.__h.push(n))}function we(t){return V=5,je(function(){return{current:t}},[])}function je(t,e){var n=te(L++,7);return Ie(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function qe(){for(var t;t=Ee.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(W),t.__H.__h.forEach(ee),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){g=null,be&&be(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Te&&Te(t,e)},y.__r=function(t){ye&&ye(t),L=0;var e=(g=t.__c).__H;e&&(Z===g?(e.__h=[],g.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(W),e.__h.forEach(ee),e.__h=[],L=0)),Z=g},y.diffed=function(t){Ce&&Ce(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ee.push(e)!==1&&ge===y.requestAnimationFrame||((ge=y.requestAnimationFrame)||Ge)(qe)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Z=g=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(W),n.__h=n.__h.filter(function(o){return!o.__||ee(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],y.__e(o,n.__v)}}),xe&&xe(t,e)},y.unmount=function(t){ke&&ke(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{W(o)}catch(r){e=r}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Me=typeof requestAnimationFrame=="function";function Ge(t){var e,n=function(){clearTimeout(o),Me&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);Me&&(e=requestAnimationFrame(n))}function W(t){var e=g,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),g=e}function ee(t){var e=g;t.__c=t.__(),g=e}function Ie(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Ne(t,e){return typeof e=="function"?e(t):e}function He(t,e){let n=we(void 0),o=(...r)=>{n.current&&clearTimeout(n.current),n.current=window.setTimeout(()=>{t(...r)},e)};return Se(()=>()=>{n.current&&clearTimeout(n.current)},[]),o}var Ke=new Intl.NumberFormat("en-US"),T=({value:t})=>l(N,null,Ke.format(t));var ne=[{bg:"#c1e7ff",fg:"#000"},{bg:"#abd2ec",fg:"#000"},{bg:"#94bed9",fg:"#000"},{bg:"#7faac6",fg:"#000"},{bg:"#6996b3",fg:"#fff"},{bg:"#5383a1",fg:"#fff"},{bg:"#3d708f",fg:"#fff"},{bg:"#255e7e",fg:"#fff"}],Xe=({scoreBy:t,nodes:e,epoch:n})=>{if(e.length===0)return null;let o=t;if(t.field!=="tokens"){let r=e[0][t.field],_=e[0][t.field];for(let c=1;cr.type===2?l(Je,{scoreBy:o,key:_,node:r}):l(Le,{scoreBy:o,key:_,node:r,epoch:n})))},Fe=({node:t})=>l("div",{className:"node-stats"},"Used Tokens: ",l(T,{value:t.tokens})," / ","Priority:"," ",t.priority===Number.MAX_SAFE_INTEGER?"MAX":l(T,{value:t.priority})),De=({scoreBy:t,node:e,children:n,...o})=>{let r=0;if(t.max!==t.min){let _=(e[t.field]-t.min)/(t.max-t.min);r=Math.round((ne.length-1)*_)}return l("div",{...o,className:`node ${o.className||""}`,style:{backgroundColor:ne[r].bg,color:ne[r].fg}},n)},Je=({scoreBy:t,node:e})=>l(De,{node:e,scoreBy:t,tabIndex:0,className:"node-text"},l(Fe,{node:e}),l("div",{className:"node-content"},e.value)),Le=({scoreBy:t,node:e,epoch:n})=>{let[o,r]=S(!1),_=EPOCHS.findIndex(i=>i.elements.some(f=>f.id===e.id));if(_===void 0)throw new Error(`epoch not found for ${e.id}`);let c=EPOCHS[_],a=EPOCHS.at(n),u=c.elements.find(i=>i.id===e.id).tokenBudget,s=e.type===1?e.name||e.role.slice(0,1).toUpperCase()+e.role.slice(1)+"Message":e.name,p=_===n?"new-in-epoch":n<_?"before-epoch":"";return l(De,{node:e,scoreBy:t,className:p},l(Fe,{node:e}),l("div",{className:"node-content node-toggler",onClick:()=>r(i=>!i)},l("span",null,a?.inNode===e.id?"\\u{1F3C3} ":"",`<${s}>`),l("span",{className:"indicator"},o?"[+]":"[-]")),n===_&&l("div",{className:"node-stats"},"Token Budget: ",l(T,{value:u})),a?.inNode===e.id&&l("div",{className:"node-stats"},"Rendering flexGrow=",a.flexValue,l("br",null),l("br",null),"Splitting"," ",a.reservedTokens?`${a.tokenBudget} - ${a.reservedTokens} (reserved) = `:"",l(T,{value:a.tokenBudget})," tokens among ",a.elements.length," ","elements"),!o&&l(Xe,{nodes:e.children,scoreBy:t,epoch:n}))},Pe=({scoreBy:t,node:e,epoch:n})=>{let o;return t==="tokens"?o={field:"tokens",max:e.tokens,min:0}:o={field:"priority",max:e.priority,min:e.priority},l(Le,{scoreBy:o,node:e,epoch:n})};var ze=({label:t,value:e,onChange:n,min:o,max:r})=>{let _=a=>{n(a.target.valueAsNumber)},c=`number-slider-${Math.random()}`;return l("div",{className:"controls-slider"},l("label",{htmlFor:c},t),l("input",{id:c,type:"range",min:o,max:r,value:e,onInput:_}),l("input",{type:"number",min:o,value:e,onInput:_,onChange:_}))},Qe=({scoreBy:t,onScoreByChange:e})=>{let n=o=>{let r=o.target.value;e(r)};return l("div",{className:"controls-scoreby"},"Visualize by",l("label",null,l("input",{type:"radio",name:"scoreBy",value:"tokens",checked:t==="tokens",onChange:n}),"Tokens"),l("label",null,l("input",{type:"radio",name:"scoreBy",value:"priority",checked:t==="priority",onChange:n}),"Priority"))},Ye=()=>{let[t,e]=S(DEFAULT_TOKENS),[n,o]=S(EPOCHS.length),[r,_]=S(DEFAULT_MODEL),[c,a]=S("tokens"),[u,s]=S("epoch"),p=He(async f=>{if(f===DEFAULT_TOKENS)return DEFAULT_MODEL;let b=await(await fetch(`${SERVER_ADDRESS}regen?n=${f}`)).json();_(b)},100),i=f=>{e(f),p(f),o(EPOCHS.length)};return l("div",{className:"app"},l("div",{className:"controls"},l("div",{className:"tabs"},l("div",{className:`tab ${u==="epoch"?"active":""}`,onClick:()=>s("epoch")},"View Order"),l("div",{className:`tab ${u==="tokens"?"active":""}`,onClick:()=>s("tokens")},"Change Token Budget")),l("div",{className:`tab-content ${u==="epoch"?"active":""}`},l(ze,{label:"Render Epoch",value:n,onChange:o,min:0,max:EPOCHS.length})),l("div",{className:`tab-content ${u==="tokens"?"active":""}`},l(ze,{label:"Token Budget",value:t,onChange:i,min:0,max:DEFAULT_TOKENS*2}))),l("div",{className:"control-description"},u==="tokens"?l("p",null,"Token changes here will prune elements and re-render Expandable ones, but the entire prompt is not being re-rendered"):l("p",null,"Changing the render epoch lets you see the order in which elements are rendered and how the token budget is allocated."),l("div",{className:"controls-stats"},l("span",null,"Used ",l(T,{value:r.container.tokens}),"/",l(T,{value:r.budget})," tokens"),l("span",null,"Removed ",l(T,{value:r.removed})," nodes"),l(Qe,{scoreBy:c,onScoreByChange:a}))),l(Pe,{node:r.container,scoreBy:c,epoch:n}))};ve(l(Ye,null),document.body);})();\n';Rne.tracerCss=`body{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,system-ui,Ubuntu,Droid Sans,sans-serif;background:#fff;margin:0}.render-pass{border-left:2px solid #ccc;&:hover{border-left-color:#000}}.literals li{white-space:pre;font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace}.render-flex,.render-element{padding-left:10px}.node{border:1px solid rgba(255,255,255,.5);margin:3px 10px;padding:3px 10px;border-radius:4px;width:fit-content;&.new-in-epoch{box-shadow:0 0 3px 2px red}&.before-epoch{pointer-events:none;filter:grayscale(1);color:#777!important;.node{color:#777!important}}&:last-child{margin-bottom:0}}.node-content{font-weight:700}.node-children{margin-left:20px;border-left:2px dashed rgba(255,255,255,.5);padding-left:10px}.node-toggler{cursor:pointer;display:flex;align-items:center;justify-content:space-between;.indicator{font-size:.7em}}.node-text{width:400px;&:focus,&:focus-within{outline:1px solid orange;.node-content{white-space:normal}}.node-content{font-weight:400;font-size:.8em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}.node-stats{font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace;font-size:.8em}.control-description{padding:10px;p{font-size:.9em;max-width:500px;margin-top:0}}.controls{display:flex;flex-direction:column;gap:10px;position:sticky;top:0;padding:10px;background:#fff;border-bottom:1px solid #ccc;z-index:1}.controls-slider{display:flex;align-items:center;gap:10px}.controls-stats{display:flex;gap:20px;list-style:none;padding:0;margin-top:0}.controls-scoreby{display:flex;gap:10px}.tabs{display:flex;border-bottom:1px solid #ccc;margin-bottom:10px}.tab{padding:10px;cursor:pointer;border:1px solid transparent;border-bottom:none}.tab.active{border-color:#ccc;border-bottom:1px solid #fff;background-color:#f9f9f9}.tab-content{display:none}.tab-content.active{display:block} -`});var n$r=T(b7e=>{"use strict";f();Object.defineProperty(b7e,"__esModule",{value:!0});b7e.HTMLTracer=void 0;var Zjr=Xjr(),EF=URt(),weo=lF(),E2t=class{static{a(this,"HTMLTracer")}traceData;epochs=[];addRenderEpoch(e){this.epochs.push(e)}includeInEpoch(e){this.epochs[this.epochs.length-1].elements.push(e)}didMaterializeTree(e){this.traceData=e}async serveHTML(){return C2t.create({epochs:this.epochs,traceData:t$r(this.traceData)})}serveRouter(e){return new v7e({baseAddress:e,epochs:this.epochs,traceData:t$r(this.traceData)})}};b7e.HTMLTracer=E2t;var v7e=class{static{a(this,"RequestRouter")}opts;serverToken=crypto.randomUUID();constructor(e){this.opts=e}route(e,r){let n=e,o=r,s=new URL(n.url||"/","http://localhost"),c=`/${this.serverToken}`;switch(s.pathname){case c:case`${c}/`:this.onRoot(s,n,o);break;case`${c}/regen`:this.onRegen(s,n,o);break;default:return!1}return!0}get address(){return this.opts.baseAddress+"/"+this.serverToken}async getHTML(){let{traceData:e,epochs:r}=this.opts;return` - +`)}typeof e[e.length-1]=="string"?e[e.length-1]+=r.text:e.push(r.text)}return e});toChatMessage(){let e=this.text.map(r=>{if(typeof r=="string")return{type:dm.Raw.ChatCompletionContentPartKind.Text,text:r};if(r instanceof cj)return{type:dm.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:y$r(r.src),detail:r.detail,...r.mimeType?{mediaType:r.mimeType}:{}}};if(r instanceof lj)return{type:dm.Raw.ChatCompletionContentPartKind.Document,documentData:{data:r.data,mediaType:r.mediaType}};if(r instanceof F6)return{type:dm.Raw.ChatCompletionContentPartKind.Opaque,value:r.value};if(r instanceof Qx)return r.part;throw new Error("Unexpected element type")});if(this.role===dm.Raw.ChatRole.System)return{role:this.role,content:e,...this.name?{name:this.name}:{}};if(this.role===dm.Raw.ChatRole.Assistant){let r={role:this.role,content:e};return this.name&&(r.name=this.name),this.toolCalls?.length&&(r.toolCalls=this.toolCalls.map(n=>({function:n.function,id:n.id,type:n.type}))),r}else return this.role===dm.Raw.ChatRole.User?{role:this.role,content:e,...this.name?{name:this.name}:{}}:this.role===dm.Raw.ChatRole.Tool?{role:this.role,content:e,toolCallId:this.toolCallId}:{role:this.role,content:e,name:this.name}}};sh.MaterializedChatMessage=qx;var F6=class{static{a(this,"MaterializedChatMessageOpaque")}parent;part;priority;metadata=[];get value(){return this.part.value}constructor(e,r,n=Number.MAX_SAFE_INTEGER){this.parent=e,this.part=r,this.priority=n}upperBoundTokenCount(e){return this.part.tokenUsage&&dm.Raw.ChatCompletionContentPartOpaque.usableIn(this.part,e.mode)?this.part.tokenUsage:0}isEmpty=!1};sh.MaterializedChatMessageOpaque=F6;var Qx=class{static{a(this,"MaterializedChatMessageBreakpoint")}parent;part;metadata=[];priority=Number.MAX_SAFE_INTEGER;constructor(e,r){this.parent=e,this.part=r}upperBoundTokenCount(e){return 0}isEmpty=!1};sh.MaterializedChatMessageBreakpoint=Qx;var cj=class{static{a(this,"MaterializedChatMessageImage")}parent;id;src;priority;metadata;lineBreakBefore;detail;mimeType;constructor(e,r,n,o,s=[],c,l,u){this.parent=e,this.id=r,this.src=n,this.priority=o,this.metadata=s,this.lineBreakBefore=c,this.detail=l,this.mimeType=u}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,aj.once)(async e=>e.tokenLength({type:dm.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:y$r(this.src),detail:this.detail,mediaType:this.mimeType}}));isEmpty=!1};sh.MaterializedChatMessageImage=cj;var lj=class{static{a(this,"MaterializedChatMessageDocument")}parent;id;data;mediaType;priority;metadata;lineBreakBefore;constructor(e,r,n,o,s,c=[],l){this.parent=e,this.id=r,this.data=n,this.mediaType=o,this.priority=s,this.metadata=c,this.lineBreakBefore=l}upperBoundTokenCount(e){return this._upperBound(e)}_upperBound=(0,aj.once)(async e=>e.tokenLength({type:dm.Raw.ChatCompletionContentPartKind.Document,documentData:{data:this.data,mediaType:this.mediaType}}));isEmpty=!1};sh.MaterializedChatMessageDocument=lj;function U6(t){return t instanceof VM||t instanceof qx}a(U6,"isContainerType");function p$r(t){return t instanceof Fye||t instanceof cj||t instanceof lj||t instanceof F6||t instanceof Qx}a(p$r,"isContentType");function jto(t){if(!U6(t))throw new Error(`Cannot have a text node outside a ChatMessage. Text: "${t.text}"`)}a(jto,"assertContainerOrChatMessage");function*h$r(t,e=!1){for(let r of t.children)r instanceof Fye?(yield{content:r,isTextSibling:e},e=!0):r instanceof cj||r instanceof lj||r instanceof F6||r instanceof Qx?yield{content:r,isTextSibling:!1}:r instanceof F6?yield{content:r,isTextSibling:!0}:(r&&(yield*h$r(r,e)),e=!1)}a(h$r,"contentChunks");function $to(t,e){let r;function n(o,s){if(p$r(o))(!r||o.priorityn instanceof Qx):t instanceof VM&&(r=t.children.some(m$r)),l$r.set(t,r),r}a(m$r,"hasCachePoint");function Vto(t){if(t instanceof qx)return!0;for(let e=t.parent;e;e=e.parent)if(e instanceof qx)return!1;return!0}a(Vto,"shouldLookForCachePointInNode");function n2t(t,e){let r;if(t instanceof VM&&t.has(1)){$to(t,e);return}let n=Vto(t),o=t.children.map((s,c)=>({chain:[t],index:c}));for(let s=0;s({chain:d,index:h})))}else if(!r||u.priorityo instanceof qx?o.role:o.name||"(anonymous)");super(`No lowest priority node found (path: ${n.join(" -> ")})`)}};sh.BudgetExceededError=c9e;function u$r(t){if(!U6(t))return-1;let e=Number.MAX_SAFE_INTEGER;for(let r of t.children)e=Math.min(e,r.priority);return e}a(u$r,"getLowestPriorityAmongChildren");function*g$r(t){yield*t.metadata;for(let e of t.children)U6(e)?yield*g$r(e):yield*e.metadata}a(g$r,"allMetadata");function A$r(t,e,r){for(let n=0;n0;){let r=e.pop();yield r,U6(r)&&e.push(...r.children)}}a(d$r,"forEachNode");function Wto(t){let e=t;for(;e.parent;)e=e.parent;return e}a(Wto,"getRoot");function f$r(t){return t instanceof VM&&t.keepWithId!==void 0}a(f$r,"isKeepWith");var r2t=new Set;function zto(t,e){let r=new Set;for(let n of d$r(t))f$r(n)&&!r2t.has(n.keepWithId)&&r.add(n.keepWithId);if(r.size===0)return!1;for(let n of r)r2t.add(n);try{let n=Wto(t);for(let o of d$r(n))f$r(o)&&r.has(o.keepWithId)?Uye(o,e):o instanceof qx&&o.toolCalls&&(o.toolCalls=Yto(o.toolCalls,s=>!(s.keepWith&&r.has(s.keepWith.id))),o.isEmpty&&Uye(o,e))}finally{for(let n of r)r2t.delete(n)}}a(zto,"removeOtherKeepWiths");function i2t(t,e){if(e.id===t)return e;for(let r of e.children)if(U6(r)){let n=i2t(t,r);if(n)return n}}a(i2t,"findNodeById");function Uye(t,e){let r=t.parent;if(!r)return;let n=r.children.indexOf(t);n!==-1&&(r.children.splice(n,1),e.push(t),zto(t,e),r.isEmpty?Uye(r,e):r.onChunksChange())}a(Uye,"removeNode");function y$r(t){let e={"/9j/":"image/jpeg",iVBOR:"image/png",R0lGOD:"image/gif",UklGR:"image/webp"};for(let r of Object.keys(e))if(t.startsWith(r))return`data:${e[r]};base64,${t}`;return t}a(y$r,"getEncodedBase64");function Yto(t,e){for(let r=0;r{"use strict";f();function Kto(t,e,...r){return{ctor:t,props:e,children:r.flat()}}a(Kto,"_vscpp");function E$r(){throw new Error("This should not be invoked!")}a(E$r,"_vscppf");E$r.isFragment=!0;globalThis.vscpp=Kto;globalThis.vscppf=E$r});var a2t=T(l9e=>{"use strict";f();Object.defineProperty(l9e,"__esModule",{value:!0});l9e.PromptElement=void 0;_$r();var s2t=class{static{a(this,"PromptElement")}props;get priority(){return this.props.priority??Number.MAX_SAFE_INTEGER}get insertLineBreakBefore(){return!0}constructor(e){this.props=e}};l9e.PromptElement=s2t});var y2t=T(Yo=>{"use strict";f();Object.defineProperty(Yo,"__esModule",{value:!0});Yo.LogicalWrapper=Yo.IfEmpty=Yo.AbstractKeepWith=Yo.TokenLimit=Yo.Expandable=Yo.Chunk=Yo.LegacyPrioritization=Yo.ToolResult=Yo.PrioritizedList=Yo.Document=Yo.Image=Yo.TextChunk=Yo.ToolMessage=Yo.AssistantMessage=Yo.UserMessage=Yo.SystemMessage=Yo.BaseChatMessage=void 0;Yo.isChatMessagePromptElement=Jto;Yo.useKeepWith=tro;var qye=co(),G1=a2t();function Jto(t){return t instanceof u9e||t instanceof d9e||t instanceof f9e}a(Jto,"isChatMessagePromptElement");var uj=class extends G1.PromptElement{static{a(this,"BaseChatMessage")}render(){return vscpp(vscppf,null,this.props.children)}};Yo.BaseChatMessage=uj;var u9e=class extends uj{static{a(this,"SystemMessage")}constructor(e){e.role=qye.Raw.ChatRole.System,super(e)}};Yo.SystemMessage=u9e;var d9e=class extends uj{static{a(this,"UserMessage")}constructor(e){e.role=qye.Raw.ChatRole.User,super(e)}};Yo.UserMessage=d9e;var f9e=class extends uj{static{a(this,"AssistantMessage")}constructor(e){e.role=qye.Raw.ChatRole.Assistant,super(e)}};Yo.AssistantMessage=f9e;var Xto=/\s+/g,c2t=class extends uj{static{a(this,"ToolMessage")}constructor(e){e.role=qye.Raw.ChatRole.Tool,super(e)}};Yo.ToolMessage=c2t;var p9e=class extends G1.PromptElement{static{a(this,"TextChunk")}async prepare(e,r,n){let o=this.props.breakOnWhitespace?Xto:this.props.breakOn;if(!o)return vscpp(vscppf,null,this.props.children);let s="",c=[];for(let u of this.props.children||[])if(u&&typeof u=="object"){if(typeof u.ctor!="string")throw new Error("TextChunk children must be text literals or intrinsic attributes.");u.ctor==="br"?s+=` +`:c.push(u)}else u!=null&&(s+=u);let l=await Zto(e,o,s,n);return vscpp(vscppf,null,c,l)}render(e){return e}};Yo.TextChunk=p9e;async function Zto(t,e,r,n){if(e instanceof RegExp){if(!e.global)throw new Error(`\`breakOn\` expression must have the global flag set (got ${e})`);e.lastIndex=0}let o="",s=-1;for(;st.tokenBudget)return o;o=l,s=c}return o}a(Zto,"getTextContentBelowBudget");var l2t=class extends G1.PromptElement{static{a(this,"Image")}constructor(e){super(e)}render(){return vscpp(vscppf,null,this.props.children)}};Yo.Image=l2t;var u2t=class extends G1.PromptElement{static{a(this,"Document")}constructor(e){super(e)}render(){return vscpp(vscppf,null,this.props.children)}};Yo.Document=u2t;var d2t=class extends G1.PromptElement{static{a(this,"PrioritizedList")}render(){let{children:e,priority:r=0,descending:n}=this.props;if(e)return vscpp(vscppf,null,e.map((o,s)=>{if(!o)return;let c=n?r-s:r-e.length+s;return typeof o!="object"?vscpp(p9e,{priority:c},o):(o.props??={},o.props.priority=c,o)}))}};Yo.PrioritizedList=d2t;var f2t=class extends G1.PromptElement{static{a(this,"ToolResult")}render(){return vscpp(vscppf,null,this.props.data.content.map(e=>{if(e&&typeof e.value=="string")return e.value;if(e&&e.value&&typeof e.value.node=="object")return vscpp("elementJSON",{data:e.value})}))}};Yo.ToolResult=f2t;var p2t=class extends G1.PromptElement{static{a(this,"LegacyPrioritization")}render(){return vscpp(vscppf,null,this.props.children)}};Yo.LegacyPrioritization=p2t;var h2t=class extends G1.PromptElement{static{a(this,"Chunk")}render(){return vscpp(vscppf,null,this.props.children)}};Yo.Chunk=h2t;var m2t=class extends G1.PromptElement{static{a(this,"Expandable")}async render(e,r){return vscpp(vscppf,null,await this.props.value(r))}};Yo.Expandable=m2t;var g2t=class extends G1.PromptElement{static{a(this,"TokenLimit")}render(){return vscpp(vscppf,null,this.props.children)}};Yo.TokenLimit=g2t;var h9e=class extends G1.PromptElement{static{a(this,"AbstractKeepWith")}};Yo.AbstractKeepWith=h9e;var ero=0;function tro(){let t=ero++;return class extends h9e{static{a(this,"KeepWith")}static id=t;id=t;render(){return vscpp(vscppf,null,this.props.children)}}}a(tro,"useKeepWith");var A2t=class extends G1.PromptElement{static{a(this,"IfEmpty")}render(){return vscpp(vscppf,null,vscpp(Qye,null,this.props.alt),vscpp(Qye,{flexGrow:1},this.props.children))}};Yo.IfEmpty=A2t;var Qye=class extends G1.PromptElement{static{a(this,"LogicalWrapper")}render(){return vscpp(vscppf,null,this.props.children)}};Yo.LogicalWrapper=Qye});var v$r=T(Gye=>{"use strict";f();Object.defineProperty(Gye,"__esModule",{value:!0});Gye.localize=rro;Gye.localize2=nro;Gye.getConfiguredDefaultLocale=iro;function C$r(t,e){let r;return e.length===0?r=t:r=t.replace(/\{(\d+)\}/g,function(n,o){let s=o[0];return typeof e[s]<"u"?e[s]:n}),r}a(C$r,"_format");function rro(t,e,...r){return C$r(e,r)}a(rro,"localize");function nro(t,e,...r){let n=C$r(e,r);return{original:n,value:n}}a(nro,"localize2");function iro(t){}a(iro,"getConfiguredDefaultLocale")});var v2t=T(lr=>{"use strict";f();Object.defineProperty(lr,"__esModule",{value:!0});lr.isAndroid=lr.isEdge=lr.isSafari=lr.isFirefox=lr.isChrome=lr.OS=lr.setTimeout0=lr.setTimeout0IsFaster=lr.translationsConfigFile=lr.platformLocale=lr.locale=lr.Language=lr.language=lr.userAgent=lr.platform=lr.isCI=lr.isMobile=lr.isIOS=lr.webWorkerOrigin=lr.isWebWorker=lr.isWeb=lr.isElectron=lr.isNative=lr.isLinuxSnap=lr.isLinux=lr.isMacintosh=lr.isWindows=lr.LANGUAGE_DEFAULT=void 0;lr.PlatformToString=sro;lr.isLittleEndian=aro;lr.isBigSurOrNewer=cro;var b$r=v$r();lr.LANGUAGE_DEFAULT="en";var $ye=!1,Vye=!1,jye=!1,x$r=!1,w$r=!1,_2t=!1,R$r=!1,C2t=!1,P$r=!1,k$r=!1,Hye,m9e=lr.LANGUAGE_DEFAULT,E2t=lr.LANGUAGE_DEFAULT,D$r,WM,zM=globalThis,H1;typeof zM.vscode<"u"&&typeof zM.vscode.process<"u"?H1=zM.vscode.process:typeof process<"u"&&(H1=process);var N$r=typeof H1?.versions?.electron=="string",oro=N$r&&H1?.type==="renderer";if(typeof H1=="object"){$ye=H1.platform==="win32",Vye=H1.platform==="darwin",jye=H1.platform==="linux",x$r=jye&&!!H1.env.SNAP&&!!H1.env.SNAP_REVISION,R$r=N$r,P$r=!!H1.env.CI||!!H1.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Hye=lr.LANGUAGE_DEFAULT,m9e=lr.LANGUAGE_DEFAULT;let t=H1.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t),r=e.availableLanguages["*"];Hye=e.locale,E2t=e.osLocale,m9e=r||lr.LANGUAGE_DEFAULT,D$r=e._translationsConfigFile}catch{}w$r=!0}else typeof navigator=="object"&&!oro?(WM=navigator.userAgent,$ye=WM.indexOf("Windows")>=0,Vye=WM.indexOf("Macintosh")>=0,C2t=(WM.indexOf("Macintosh")>=0||WM.indexOf("iPad")>=0||WM.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,jye=WM.indexOf("Linux")>=0,k$r=WM?.indexOf("Mobi")>=0,_2t=!0,Hye=b$r.getConfiguredDefaultLocale(b$r.localize({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||lr.LANGUAGE_DEFAULT,m9e=Hye,E2t=navigator.language):console.error("Unable to resolve platform.");function sro(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}a(sro,"PlatformToString");var g9e=0;Vye?g9e=1:$ye?g9e=3:jye&&(g9e=2);lr.isWindows=$ye;lr.isMacintosh=Vye;lr.isLinux=jye;lr.isLinuxSnap=x$r;lr.isNative=w$r;lr.isElectron=R$r;lr.isWeb=_2t;lr.isWebWorker=_2t&&typeof zM.importScripts=="function";lr.webWorkerOrigin=lr.isWebWorker?zM.origin:void 0;lr.isIOS=C2t;lr.isMobile=k$r;lr.isCI=P$r;lr.platform=g9e;lr.userAgent=WM;lr.language=m9e;var T$r;(function(t){function e(){return lr.language}a(e,"value"),t.value=e;function r(){return lr.language.length===2?lr.language==="en":lr.language.length>=3?lr.language[0]==="e"&&lr.language[1]==="n"&&lr.language[2]==="-":!1}a(r,"isDefaultVariant"),t.isDefaultVariant=r;function n(){return lr.language==="en"}a(n,"isDefault"),t.isDefault=n})(T$r||(lr.Language=T$r={}));lr.locale=Hye;lr.platformLocale=E2t;lr.translationsConfigFile=D$r;lr.setTimeout0IsFaster=typeof zM.postMessage=="function"&&!zM.importScripts;lr.setTimeout0=(()=>{if(lr.setTimeout0IsFaster){let t=[];zM.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),zM.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();lr.OS=Vye||C2t?2:$ye?1:3;var S$r=!0,I$r=!1;function aro(){if(!I$r){I$r=!0;let t=new Uint8Array(2);t[0]=1,t[1]=2,S$r=new Uint16Array(t.buffer)[0]===513}return S$r}a(aro,"isLittleEndian");lr.isChrome=!!(lr.userAgent&&lr.userAgent.indexOf("Chrome")>=0);lr.isFirefox=!!(lr.userAgent&&lr.userAgent.indexOf("Firefox")>=0);lr.isSafari=!!(!lr.isChrome&&lr.userAgent&&lr.userAgent.indexOf("Safari")>=0);lr.isEdge=!!(lr.userAgent&&lr.userAgent.indexOf("Edg/")>=0);lr.isAndroid=!!(lr.userAgent&&lr.userAgent.indexOf("Android")>=0);function cro(t){return parseFloat(t)>=20}a(cro,"isBigSurOrNewer")});var O$r=T(KP=>{"use strict";f();Object.defineProperty(KP,"__esModule",{value:!0});KP.arch=KP.platform=KP.env=KP.cwd=void 0;var M$r=v2t(),dj,b2t=globalThis.vscode;if(typeof b2t<"u"&&typeof b2t.process<"u"){let t=b2t.process;dj={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"?dj={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:dj={get platform(){return M$r.isWindows?"win32":M$r.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};KP.cwd=dj.cwd;KP.env=dj.env;KP.platform=dj.platform;KP.arch=dj.arch});var L$r=T(Jr=>{"use strict";f();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.delimiter=Jr.sep=Jr.toNamespacedPath=Jr.parse=Jr.format=Jr.extname=Jr.basename=Jr.dirname=Jr.relative=Jr.resolve=Jr.join=Jr.isAbsolute=Jr.normalize=Jr.posix=Jr.win32=void 0;var Ure=O$r(),lro=65,uro=97,dro=90,fro=122,G6=46,ah=47,VE=92,Q6=58,pro=63,A9e=class extends Error{static{a(this,"ErrorInvalidArgType")}code;constructor(e,r,n){let o;typeof r=="string"&&r.indexOf("not ")===0?(o="must not be",r=r.replace(/^not /,"")):o="must be";let s=e.indexOf(".")!==-1?"property":"argument",c=`The "${e}" ${s} ${o} of type ${r}`;c+=`. Received type ${typeof n}`,super(c),this.code="ERR_INVALID_ARG_TYPE"}};function hro(t,e){if(t===null||typeof t!="object")throw new A9e(e,"Object",t)}a(hro,"validateObject");function wd(t,e){if(typeof t!="string")throw new A9e(e,"string",t)}a(wd,"validateString");var WE=Ure.platform==="win32";function Eo(t){return t===ah||t===VE}a(Eo,"isPathSeparator");function T2t(t){return t===ah}a(T2t,"isPosixPathSeparator");function q6(t){return t>=lro&&t<=dro||t>=uro&&t<=fro}a(q6,"isWindowsDeviceRoot");function y9e(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===G6&&l!==-1?++l:l=-1}return o}a(y9e,"normalizeString");function B$r(t,e){hro(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(B$r,"_format");Jr.win32={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],wd(s,"path"),s.length===0)continue}else e.length===0?s=Ure.cwd():(s=Ure.env[`=${e}`]||Ure.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===VE)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)Eo(p)&&(l=1,d=!0);else if(Eo(p))if(d=!0,Eo(s.charCodeAt(1))){let h=2,m=h;for(;h2&&Eo(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=y9e(r,!n,"\\",Eo),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){wd(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return T2t(s)?"\\":t;if(Eo(s))if(o=!0,Eo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&Eo(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&Eo(t.charCodeAt(e-1))&&(c+="\\"),n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){wd(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return Eo(r)||e>2&&q6(r)&&t.charCodeAt(1)===Q6&&Eo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&Eo(r.charCodeAt(0))){++o;let s=r.length;s>1&&Eo(r.charCodeAt(1))&&(++o,s>2&&(Eo(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return Jr.win32.normalize(e)},relative(t,e){if(wd(t,"from"),wd(e,"to"),t===e)return"";let r=Jr.win32.resolve(t),n=Jr.win32.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";let o=0;for(;oo&&t.charCodeAt(s-1)===VE;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===VE;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===VE)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===VE?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===VE)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===VE&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=Jr.win32.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===VE){if(e.charCodeAt(1)===VE){let r=e.charCodeAt(2);if(r!==pro&&r!==G6)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(q6(e.charCodeAt(0))&&e.charCodeAt(1)===Q6&&e.charCodeAt(2)===VE)return`\\\\?\\${e}`;return t},dirname(t){wd(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return Eo(o)?t:".";if(Eo(o)){if(r=n=1,Eo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&Eo(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(Eo(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&wd(e,"ext"),wd(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&q6(t.charCodeAt(0))&&t.charCodeAt(1)===Q6&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(Eo(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(Eo(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){wd(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===Q6&&q6(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(Eo(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===G6?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:B$r.bind(null,"\\"),parse(t){wd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return Eo(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(Eo(o)){if(n=1,Eo(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),Eo(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===G6?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null};var mro=(()=>{if(WE){let t=/\\/g;return()=>{let e=Ure.cwd().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Ure.cwd()})();Jr.posix={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){let o=n>=0?t[n]:mro();wd(o,"path"),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===ah)}return e=y9e(e,!r,"/",T2t),r?`/${e}`:e.length>0?e:"."},normalize(t){if(wd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ah,r=t.charCodeAt(t.length-1)===ah;return t=y9e(t,!e,"/",T2t),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return wd(t,"path"),t.length>0&&t.charCodeAt(0)===ah},join(...t){if(t.length===0)return".";let e;for(let r=0;r0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Jr.posix.normalize(e)},relative(t,e){if(wd(t,"from"),wd(e,"to"),t===e||(t=Jr.posix.resolve(t),e=Jr.posix.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===ah)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===ah?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===ah)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(wd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ah,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===ah){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&wd(e,"ext"),wd(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===ah){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ah){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){wd(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t.charCodeAt(c);if(l===ah){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l===G6?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:B$r.bind(null,"/"),parse(t){wd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===ah,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===ah){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===G6?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Jr.posix.win32=Jr.win32.win32=Jr.win32;Jr.posix.posix=Jr.win32.posix=Jr.posix;Jr.normalize=WE?Jr.win32.normalize:Jr.posix.normalize;Jr.isAbsolute=WE?Jr.win32.isAbsolute:Jr.posix.isAbsolute;Jr.join=WE?Jr.win32.join:Jr.posix.join;Jr.resolve=WE?Jr.win32.resolve:Jr.posix.resolve;Jr.relative=WE?Jr.win32.relative:Jr.posix.relative;Jr.dirname=WE?Jr.win32.dirname:Jr.posix.dirname;Jr.basename=WE?Jr.win32.basename:Jr.posix.basename;Jr.extname=WE?Jr.win32.extname:Jr.posix.extname;Jr.format=WE?Jr.win32.format:Jr.posix.format;Jr.parse=WE?Jr.win32.parse:Jr.posix.parse;Jr.toNamespacedPath=WE?Jr.win32.toNamespacedPath:Jr.posix.toNamespacedPath;Jr.sep=WE?Jr.win32.sep:Jr.posix.sep;Jr.delimiter=WE?Jr.win32.delimiter:Jr.posix.delimiter});var j$r=T(Qre=>{"use strict";f();Object.defineProperty(Qre,"__esModule",{value:!0});Qre.URI=void 0;Qre.isUriComponents=bro;Qre.uriToFsPath=v9e;var F$r=L$r(),_9e=v2t(),gro=/^\w[\w\d+.-]*$/,Aro=/^\//,yro=/^\/\//;function Ero(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!gro.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Aro.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(yro.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}a(Ero,"_validateUri");function _ro(t,e){return!t&&!e?"file":t}a(_ro,"_schemeFix");function Cro(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==Gx&&(e=Gx+e):e=Gx;break}return e}a(Cro,"_referenceResolution");var Bc="",Gx="/",vro=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,C9e=class t{static{a(this,"URI")}static isUri(e){return e instanceof t?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}scheme;authority;path;query;fragment;constructor(e,r,n,o,s,c=!1){typeof e=="object"?(this.scheme=e.scheme||Bc,this.authority=e.authority||Bc,this.path=e.path||Bc,this.query=e.query||Bc,this.fragment=e.fragment||Bc):(this.scheme=_ro(e,c),this.authority=r||Bc,this.path=Cro(this.scheme,n||Bc),this.query=o||Bc,this.fragment=s||Bc,Ero(this,c))}get fsPath(){return v9e(this,!1)}with(e){if(!e)return this;let{scheme:r,authority:n,path:o,query:s,fragment:c}=e;return r===void 0?r=this.scheme:r===null&&(r=Bc),n===void 0?n=this.authority:n===null&&(n=Bc),o===void 0?o=this.path:o===null&&(o=Bc),s===void 0?s=this.query:s===null&&(s=Bc),c===void 0?c=this.fragment:c===null&&(c=Bc),r===this.scheme&&n===this.authority&&o===this.path&&s===this.query&&c===this.fragment?this:new H6(r,n,o,s,c)}static parse(e,r=!1){let n=vro.exec(e);return n?new H6(n[2]||Bc,E9e(n[4]||Bc),E9e(n[5]||Bc),E9e(n[7]||Bc),E9e(n[9]||Bc),r):new H6(Bc,Bc,Bc,Bc,Bc)}static file(e){let r=Bc;if(_9e.isWindows&&(e=e.replace(/\\/g,Gx)),e[0]===Gx&&e[1]===Gx){let n=e.indexOf(Gx,2);n===-1?(r=e.substring(2),e=Gx):(r=e.substring(2,n),e=e.substring(n)||Gx)}return new H6("file",r,e,Bc,Bc)}static from(e,r){return new H6(e.scheme,e.authority,e.path,e.query,e.fragment,r)}static joinPath(e,...r){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return _9e.isWindows&&e.scheme==="file"?n=t.file(F$r.win32.join(v9e(e,!0),...r)).path:n=F$r.posix.join(e.path,...r),e.with({path:n})}toString(e=!1){return S2t(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof t)return e;{let r=new H6(e);return r._formatted=e.external??null,r._fsPath=e._sep===q$r?e.fsPath??null:null,r}}else return e}};Qre.URI=C9e;function bro(t){return!t||typeof t!="object"?!1:typeof t.scheme=="string"&&(typeof t.authority=="string"||typeof t.authority>"u")&&(typeof t.path=="string"||typeof t.path>"u")&&(typeof t.query=="string"||typeof t.query>"u")&&(typeof t.fragment=="string"||typeof t.fragment>"u")}a(bro,"isUriComponents");var q$r=_9e.isWindows?1:void 0,H6=class extends C9e{static{a(this,"Uri")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v9e(this,!1)),this._fsPath}toString(e=!1){return e?S2t(this,!0):(this._formatted||(this._formatted=S2t(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=q$r),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},G$r={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function U$r(t,e,r){let n,o=-1;for(let s=0;s=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===45||c===46||c===95||c===126||e&&c===47||r&&c===91||r&&c===93||r&&c===58)o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n!==void 0&&(n+=t.charAt(s));else{n===void 0&&(n=t.substr(0,s));let l=G$r[c];l!==void 0?(o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n+=l):o===-1&&(o=s)}}return o!==-1&&(n+=encodeURIComponent(t.substring(o))),n!==void 0?n:t}a(U$r,"encodeURIComponentFast");function Tro(t){let e;for(let r=0;r1&&t.scheme==="file"?r=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?r=t.path.substr(1):r=t.path[1].toLowerCase()+t.path.substr(2):r=t.path,_9e.isWindows&&(r=r.replace(/\//g,"\\")),r}a(v9e,"uriToFsPath");function S2t(t,e){let r=e?Tro:U$r,n="",{scheme:o,authority:s,path:c,query:l,fragment:u}=t;if(o&&(n+=o,n+=":"),(s||o==="file")&&(n+=Gx,n+=Gx),s){let d=s.indexOf("@");if(d!==-1){let p=s.substr(0,d);s=s.substr(d+1),d=p.lastIndexOf(":"),d===-1?n+=r(p,!1,!1):(n+=r(p.substr(0,d),!1,!1),n+=":",n+=r(p.substr(d+1),!1,!0)),n+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,d),!1,!0),n+=s.substr(d))}if(c){if(c.length>=3&&c.charCodeAt(0)===47&&c.charCodeAt(2)===58){let d=c.charCodeAt(1);d>=65&&d<=90&&(c=`/${String.fromCharCode(d+32)}:${c.substr(3)}`)}else if(c.length>=2&&c.charCodeAt(1)===58){let d=c.charCodeAt(0);d>=65&&d<=90&&(c=`${String.fromCharCode(d+32)}:${c.substr(2)}`)}n+=r(c,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=e?u:U$r(u,!1,!1)),n}a(S2t,"_asFormatted");function H$r(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+H$r(t.substr(3)):t}}a(H$r,"decodeURIComponentGraceful");var Q$r=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E9e(t){return t.match(Q$r)?t.replace(Q$r,e=>H$r(e)):t}a(E9e,"percentDecode")});var w2t=T(j6=>{"use strict";f();Object.defineProperty(j6,"__esModule",{value:!0});j6.PromptReference=j6.ChatResponseReferencePartStatusKind=j6.PromptMetadata=void 0;var Wye=j$r(),I2t=class{static{a(this,"PromptMetadata")}_marker;toString(){return Object.getPrototypeOf(this).constructor.name}};j6.PromptMetadata=I2t;var $$r;(function(t){t[t.Complete=1]="Complete",t[t.Partial=2]="Partial",t[t.Omitted=3]="Omitted"})($$r||(j6.ChatResponseReferencePartStatusKind=$$r={}));var x2t=class t{static{a(this,"PromptReference")}anchor;iconPath;options;static fromJSON(e){let r=a(n=>"scheme"in n?Wye.URI.from(n):{uri:Wye.URI.from(n.uri),range:n.range},"uriOrLocation");return new t("variableName"in e.anchor?{variableName:e.anchor.variableName,value:e.anchor.value&&r(e.anchor.value)}:r(e.anchor),e.iconPath&&("scheme"in e.iconPath?Wye.URI.from(e.iconPath):"light"in e.iconPath?{light:Wye.URI.from(e.iconPath.light),dark:Wye.URI.from(e.iconPath.dark)}:e.iconPath),e.options)}constructor(e,r,n){this.anchor=e,this.iconPath=r,this.options=n}toJSON(){return{anchor:this.anchor,iconPath:this.iconPath,options:this.options}}};j6.PromptReference=x2t});var B2t=T(qre=>{"use strict";f();Object.defineProperty(qre,"__esModule",{value:!0});qre.PromptRenderer=qre.MetadataMap=void 0;var Sro=e2t(),$6=o2t(),pj=B6(),gu=y2t(),O2t=w2t(),T9e;(function(t){t.empty={get:a(()=>{},"get"),getAll:a(()=>[],"getAll")},t.from=e=>({get:a(r=>e.find(n=>n instanceof r),"get"),getAll:a(r=>e.filter(n=>n instanceof r),"getAll")})})(T9e||(qre.MetadataMap=T9e={}));var R2t=class{static{a(this,"PromptRenderer")}_endpoint;_ctor;_props;_tokenizer;_usedContext=[];_ignoredFiles=[];_growables=[];_root=new x9e(null,0);_tokenLimits=[];tracer=void 0;constructor(e,r,n,o){this._endpoint=e,this._ctor=r,this._props=n,this._tokenizer=o}getIgnoredFiles(){return Array.from(new Set(this._ignoredFiles))}getUsedContext(){return this._usedContext}createElement(e){return new e.ctor(e.props)}async _processPromptPieces(e,r,n,o){let s=new Map;for(let[u,d]of r.entries()){if(Array.isArray(d.children)&&(d.props=d.props??{},d.props.children=d.children),!d.ctor){let A=Y$r(d.path);throw new Error(`Invalid ChatMessage child! Child must be a TSX component that extends PromptElement at ${A}`)}let p=this.createElement(d),h;p instanceof gu.TokenLimit&&(h=d.props.max,this._tokenLimits.push({limit:h,id:d.node.id})),d.node.setObj(p);let m=d.props.flexGrow??1/0,g=s.get(m);g||(g=[],s.set(m,g)),g.push({element:d,promptElementInstance:p,tokenLimit:h})}if(s.size===0)return;let c=[...s.entries()].sort(([u],[d])=>d-u).map(([u,d])=>d),l=a(u=>{let d=0;for(let p=u+1;p{if(E.tokenLimit===void 0)return!1;let _=E.element.props.flexBasis??1,v=_/h;return Math.floor(e.remainingTokenBudget*v){let v=(E.element.props.flexBasis??1)/h;return{tokenBudget:g[_]?E.tokenLimit:Math.floor((e.remainingTokenBudget-m)*v),endpoint:e.endpoint,countTokens:a((b,I)=>this._tokenizer.tokenLength(typeof b=="string"?{type:pj.Raw.ChatCompletionContentPartKind.Text,text:b}:b,I),"countTokens")}});e.consume(-p),this.tracer?.addRenderEpoch?.({inNode:d[0].element.node.parent?.id,flexValue:d[0].element.props.flexGrow??0,tokenBudget:e.remainingTokenBudget,reservedTokens:p,elements:d.map((E,_)=>({id:E.element.node.id,tokenBudget:A[_].tokenBudget}))}),await Promise.all(d.map(async({element:E,promptElementInstance:_},v)=>{let b=await W$r(E,()=>_.prepare?.(A[v],n,o));E.node.setState(b)}));let y=await Promise.all(d.map(async({element:E,promptElementInstance:_},v)=>{let b=A[v];return await W$r(E,()=>_.render(E.node.getState(),b,n,o))}));for(let[E,{element:_,promptElementInstance:v}]of d.entries()){let b=A[E],I=y[E];if(!I)continue;let x=await this._processPromptRenderPiece(new fj(b.tokenBudget,this._endpoint),_,v,I,n,o);v instanceof gu.Expandable&&this._growables.push({initialConsume:x,elem:_.node}),e.consume(x)}}}async _processPromptRenderPiece(e,r,n,o,s,c){let l=z$r(o),u=new fj(e.tokenBudget,this._endpoint),{tokensConsumed:d}=await Iro(this._tokenizer,r,n,l);return u.consume(d),await this._handlePromptChildren(r,l,u,s,c),u.consumed}async renderElementJSON(e){return await this._processPromptPieces(new fj(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],void 0,e),{node:this._root.toJSON()}}async render(e,r){let n=await this.renderRaw(e,r);return{...n,messages:(0,pj.toMode)(this._tokenizer.mode,n.messages)}}async renderRaw(e,r){await this._processPromptPieces(new fj(this._endpoint.modelMaxPromptTokens,this._endpoint),[{node:this._root,ctor:this._ctor,props:this._props,children:[],path:[this._ctor]}],e,r);let{container:n,allMetadata:o,removed:s}=await this._getFinalElementTree(this._endpoint.modelMaxPromptTokens,r);this.tracer?.didMaterializeTree?.({budget:this._endpoint.modelMaxPromptTokens,renderedTree:{container:n,removed:s,budget:this._endpoint.modelMaxPromptTokens},tokenizer:this._tokenizer,renderTree:a(m=>this._getFinalElementTree(m,void 0).then(g=>({...g,budget:m})),"renderTree")});let c=[...n.toChatMessages()],l=await n.tokenCount(this._tokenizer),u=[...n.allMetadata()],d=new Set,p=u.map(m=>{if(!(m instanceof JP))return;let g=m.reference,A="variableName"in g.anchor;if(A&&!d.has(g.anchor.variableName))return d.add(g.anchor.variableName),g;if(!A)return g}).filter(w9e),h=o.map(m=>{if(!(m instanceof JP)||u.includes(m))return;let g=m.reference,A="variableName"in g.anchor;if(A&&!d.has(g.anchor.variableName))return d.add(g.anchor.variableName),g;if(!A)return g}).filter(w9e);return{metadata:T9e.from(u),messages:c,hasIgnoredFiles:this._ignoredFiles.length>0,tokenCount:l,references:p,omittedReferences:h}}async _getFinalElementTree(e,r){let n=this._root.materialize(),o=[...n.toChatMessages()],s=[...n.allMetadata()],c=[{limit:e,id:this._root.id},...this._tokenLimits],l=0;for(let u=c.length-1;u>=0;u--){let d=c[u];if(d.limit>e)continue;let p=n.findById(d.id);if(!p)continue;let h=await p.tokenCount(this._tokenizer);if(!(hd.limit;){let g=await p.baseMessageTokenCount(this._tokenizer);do for(let A of p.removeLowestPriorityChild()){l++;let y=A.upperBoundTokenCount(this._tokenizer);m-=(typeof y=="number"?y:await y)*1.25}while(m-g>d.limit);m=await p.tokenCount(this._tokenizer)}}catch(m){throw m instanceof $6.BudgetExceededError&&(m.metadata=T9e.from([...n.allMetadata()]),m.messages=o),m}}return{container:n,allMetadata:s,removed:l}}async _grow(e,r,n,o){if(!this._growables.length)return!1;for(let s of this._growables){if(!e.findById(s.elem.id))continue;let c=s.elem.getObj();if(!(c instanceof gu.Expandable))throw new Error("unreachable: expected growable");let l=new x9e(null,0,s.elem.id),u=new fj(n-r+s.initialConsume,this._endpoint),d=await this._processPromptRenderPiece(u,{node:l,ctor:this._ctor,props:{},children:[],path:[this._ctor]},c,await c.render(void 0,{tokenBudget:u.tokenBudget,endpoint:this._endpoint,countTokens:a((m,g)=>this._tokenizer.tokenLength(typeof m=="string"?{type:pj.Raw.ChatCompletionContentPartKind.Text,text:m}:m,g),"countTokens")}),void 0,o),p=l.materialize();if(!e.replaceNode(s.elem.id,p))throw new Error("unreachable: could not find old element to replace");if(r-=s.initialConsume,r+=d,r>=n)break}return!0}_handlePromptChildren(e,r,n,o,s){if(e.ctor===gu.TextChunk){this._handleExtrinsicTextChunkChildren(e.node,e.node,e.props,r);return}let c=[];for(let l of r){if(l.kind==="literal"){e.node.appendStringChild(l.value,e.props.priority??Number.MAX_SAFE_INTEGER);continue}if(l.kind==="intrinsic"){this._handleIntrinsic(e.node,l.name,{priority:e.props.priority??Number.MAX_SAFE_INTEGER,...l.props},S9e(l.children));continue}let u=e.node.createChild();c.push({node:u,ctor:l.ctor,props:l.props,children:l.children,path:[...e.path,l.ctor]})}return this._processPromptPieces(n,c,o,s)}_handleIntrinsic(e,r,n,o,s){switch(r){case"meta":return this._handleIntrinsicMeta(e,n,o);case"br":return this._handleIntrinsicLineBreak(e,n,o,n.priority,s);case"usedContext":return this._handleIntrinsicUsedContext(e,n,o);case"references":return this._handleIntrinsicReferences(e,n,o);case"ignoredFiles":return this._handleIntrinsicIgnoredFiles(e,n,o);case"elementJSON":return this._handleIntrinsicElementJSON(e,n.data);case"cacheBreakpoint":return this._handleIntrinsicCacheBreakpoint(e,n,o,s);case"opaque":return this._handleIntrinsicOpaque(e,n,s)}throw new Error(`Unknown intrinsic element ${r}!`)}_handleIntrinsicCacheBreakpoint(e,r,n,o){if(n.length>0)throw new Error(" must not have children!");e.addCacheBreakpoint(r,o)}_handleIntrinsicMeta(e,r,n){if(n.length>0)throw new Error(" must not have children!");r.local?e.addMetadata(r.value):this._root.addMetadata(r.value)}_handleIntrinsicLineBreak(e,r,n,o,s){if(n.length>0)throw new Error("
must not have children!");e.appendLineBreak(o??Number.MAX_SAFE_INTEGER,s)}_handleIntrinsicOpaque(e,r,n){e.appendOpaque(r.value,r.tokenUsage,r.priority,n)}_handleIntrinsicElementJSON(e,r){let n=e.appendPieceJSON(r.node);if(this.tracer?.includeInEpoch)for(let o of n.elements())this.tracer.includeInEpoch({id:o.id,tokenBudget:0})}_handleIntrinsicUsedContext(e,r,n){if(n.length>0)throw new Error(" must not have children!");this._usedContext.push(...r.value)}_handleIntrinsicReferences(e,r,n){if(n.length>0)throw new Error(" must not have children!");for(let o of r.value)e.addMetadata(new JP(o))}_handleIntrinsicIgnoredFiles(e,r,n){if(n.length>0)throw new Error(" must not have children!");this._ignoredFiles.push(...r.value)}_handleExtrinsicTextChunkChildren(e,r,n,o){let s=[],c=[];for(let l of o){if(l.kind==="extrinsic")throw new Error("TextChunk cannot have extrinsic children!");if(l.kind==="literal"&&s.push(l.value),l.kind==="intrinsic")if(l.name==="br")s.push(` +`);else if(l.name==="references")for(let u of l.props.value)c.push(new JP(u));else this._handleIntrinsic(e,l.name,l.props,S9e(l.children),r.childIndex)}e.appendStringChild(s.join(""),n?.priority??Number.MAX_SAFE_INTEGER,c,r.childIndex,!0)}};qre.PromptRenderer=R2t;async function Iro(t,e,r,n){let o=0;if((0,gu.isChatMessagePromptElement)(r)){let s={role:e.props.role,content:[],...e.props.name?{name:e.props.name}:void 0,...e.props.toolCalls?{toolCalls:e.props.toolCalls}:void 0,...e.props.toolCallId?{toolCallId:e.props.toolCallId}:void 0};o+=await t.countMessageTokens((0,pj.toMode)(t.mode,s))}for(let s of n)s.kind==="literal"&&(o+=await t.tokenLength({type:pj.Raw.ChatCompletionContentPartKind.Text,text:s.value}));return{tokensConsumed:o}}a(Iro,"computeTokensConsumedByLiterals");function z$r(t,e=[]){return typeof t>"u"||typeof t=="boolean"?[]:(typeof t=="string"||typeof t=="number"?e.push(new D2t(String(t))):xro(t)?S9e(t.children,e):wro(t)?S9e(t,e):typeof t.ctor=="string"?e.push(new P2t(t.ctor,t.props,t.children)):e.push(new k2t(t.ctor,t.props,t.children)),e)}a(z$r,"flattenAndReduce");function S9e(t,e=[]){for(let r of t)z$r(r,e);return e}a(S9e,"flattenAndReduceArr");var P2t=class{static{a(this,"IntrinsicPromptPiece")}name;props;children;kind="intrinsic";constructor(e,r,n){this.name=e,this.props=r,this.children=n}},k2t=class{static{a(this,"ExtrinsicPromptPiece")}ctor;props;children;kind="extrinsic";constructor(e,r,n){this.ctor=e,this.props=r,this.children=n}},D2t=class{static{a(this,"LiteralPromptPiece")}value;priority;kind="literal";constructor(e,r){this.value=e,this.priority=r}},I9e=class t{static{a(this,"PromptOpaque")}parent;childIndex;value;tokenUsage;priority;static fromJSON(e,r,n){return new t(e,r,n.value,n.tokenUsage,n.priority)}kind=2;constructor(e,r,n,o,s){this.parent=e,this.childIndex=r,this.value=n,this.tokenUsage=o,this.priority=s}materialize(e){return new $6.MaterializedChatMessageOpaque(e,{type:pj.Raw.ChatCompletionContentPartKind.Opaque,value:this.value,tokenUsage:this.tokenUsage},this.priority)}toJSON(){return{type:3,value:this.value,tokenUsage:this.tokenUsage,priority:this.priority}}},fj=class{static{a(this,"PromptSizingContext")}tokenBudget;endpoint;_consumed=0;constructor(e,r){this.tokenBudget=e,this.endpoint=r}get consumed(){return this._consumed>this.tokenBudget?this.tokenBudget:this._consumed}get remainingTokenBudget(){return Math.max(0,this.tokenBudget-this._consumed)}consume(e){this._consumed+=e}},x9e=class t{static{a(this,"PromptTreeElement")}parent;childIndex;id;static _nextId=0;static fromJSON(e,r,n){let o=new t(null,e);switch(o._metadata=r.references?.map(s=>new JP(O2t.PromptReference.fromJSON(s)))??[],o._children=r.children.map((s,c)=>{switch(s.type){case 1:return t.fromJSON(c,s,n);case 2:return zye.fromJSON(o,c,s);case 3:return I9e.fromJSON(o,c,s);default:}}).filter(w9e),r.ctor){case 1:o._objFlags=r.flags??0,o._obj=new gu.BaseChatMessage(r.props);break;case 2:{if(r.keepWithId!==void 0){let s=n.get(r.keepWithId);s||(s=(0,gu.useKeepWith)(),n.set(r.keepWithId,s)),o._obj=new s(r.props||{})}else o._obj=new gu.LogicalWrapper(r.props||{});o._objFlags=r.flags??0;break}case 3:o._obj=new gu.Image(r.props);break;case 4:o._obj=new gu.Document(r.props);break;default:}return o}kind=1;_obj=null;_state=void 0;_children=[];_metadata=[];_objFlags=0;constructor(e=null,r,n=t._nextId++){this.parent=e,this.childIndex=r,this.id=n}setObj(e){this._obj=e,this._obj instanceof gu.LegacyPrioritization&&(this._objFlags|=1),this._obj instanceof gu.Chunk&&(this._objFlags|=2),this._obj instanceof gu.IfEmpty&&(this._objFlags|=8),this._obj.props.passPriority&&(this._objFlags|=4)}getObj(){return this._obj}setState(e){this._state=e}getState(){return this._state}createChild(){let e=new t(this,this._children.length);return this._children.push(e),e}appendPieceJSON(e){let r=t.fromJSON(this._children.length,e,new Map);return this._children.push(r),r}appendStringChild(e,r,n,o=this._children.length,s=!1){this._children.push(new zye(this,o,e,r,n,s))}appendLineBreak(e,r=this._children.length){this._children.push(new zye(this,r,` +`,e))}appendOpaque(e,r,n,o=this._children.length){this._children.push(new I9e(this,o,e,r,n))}toJSON(){let e={type:1,ctor:2,ctorName:this._obj?.constructor.name,children:this._children.slice().sort((r,n)=>r.childIndex-n.childIndex).map(r=>r.toJSON()).filter(w9e),props:{},references:this._metadata.filter(r=>r instanceof JP).map(r=>r.reference.toJSON())};if(this._obj&&(e.props=b9e(this._obj.props,Sro.jsonRetainedProps)),this._obj instanceof gu.BaseChatMessage)e.ctor=1,Object.assign(e.props,b9e(this._obj.props,["role","name","toolCalls","toolCallId"]));else{if(this._obj instanceof gu.Image)return{...e,ctor:3,props:{...e.props,...b9e(this._obj.props,["src","detail","mimeType"])}};if(this._obj instanceof gu.Document)return{...e,ctor:4,props:{...e.props,...b9e(this._obj.props,["data","mediaType"])}};this._obj instanceof gu.AbstractKeepWith&&(e.keepWithId=this._obj.id)}return this._objFlags!==0&&(e.flags=this._objFlags),e}materialize(e){if(this._children.sort((r,n)=>r.childIndex-n.childIndex),this._obj instanceof gu.Image)return new $6.MaterializedChatMessageImage(e,this.id,this._obj.props.src,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,0,this._obj.props.detail??void 0,this._obj.props.mimeType??void 0);if(this._obj instanceof gu.Document)return new $6.MaterializedChatMessageDocument(e,this.id,this._obj.props.data,this._obj.props.mediaType,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,0);if(this._obj instanceof gu.BaseChatMessage){if(this._obj.props.role===void 0||typeof this._obj.props.role!="number")throw new Error("Invalid ChatMessage!");return new $6.MaterializedChatMessage(e,this.id,this._obj.props.role,this._obj.props.name,this._obj instanceof gu.AssistantMessage?this._obj.props.toolCalls:void 0,this._obj instanceof gu.ToolMessage?this._obj.props.toolCallId:void 0,this._obj.props.priority??Number.MAX_SAFE_INTEGER,this._metadata,r=>this._children.map(n=>n.materialize(r)))}else{let r=new $6.GenericMaterializedContainer(e,this.id,this._obj?.constructor.name,this._obj?.props.priority??(this._obj?.props.passPriority?0:Number.MAX_SAFE_INTEGER),n=>this._children.map(o=>o.materialize(n)),this._metadata,this._objFlags);return this._obj instanceof gu.AbstractKeepWith&&(r.keepWithId=this._obj.id),r}}addMetadata(e){this._metadata.push(e)}addCacheBreakpoint(e,r=this._children.length){if(!(this._obj instanceof gu.BaseChatMessage))throw new Error("Cache breakpoints may only be direct children of chat messages");this._children.push(new N2t({type:pj.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:e.type},r))}*elements(){yield this;for(let e of this._children)e instanceof t&&(yield*e.elements())}},N2t=class{static{a(this,"PromptCacheBreakpoint")}part;childIndex;constructor(e,r){this.part=e,this.childIndex=r}toJSON(){}materialize(e){return new $6.MaterializedChatMessageBreakpoint(e,this.part)}},zye=class t{static{a(this,"PromptText")}parent;childIndex;text;priority;metadata;lineBreakBefore;static fromJSON(e,r,n){return new t(e,r,n.text,n.priority,n.references?.map(o=>new JP(O2t.PromptReference.fromJSON(o))),n.lineBreakBefore)}kind=2;constructor(e,r,n,o,s,c=!1){this.parent=e,this.childIndex=r,this.text=n,this.priority=o,this.metadata=s,this.lineBreakBefore=c}materialize(e){let r=this.lineBreakBefore?1:this.childIndex===0?2:0;return new $6.MaterializedChatMessageTextChunk(e,this.text,this.priority??Number.MAX_SAFE_INTEGER,this.metadata||[],r)}toJSON(){return{type:2,priority:this.priority,text:this.text,references:this.metadata?.filter(e=>e instanceof JP).map(e=>e.reference.toJSON()),lineBreakBefore:this.lineBreakBefore}}};function xro(t){return(typeof t.ctor=="function"&&t.ctor.isFragment)??!1}a(xro,"isFragmentCtor");function w9e(t){return t!==void 0}a(w9e,"isDefined");var M2t=class extends O2t.PromptMetadata{static{a(this,"InternalMetadata")}},JP=class extends M2t{static{a(this,"ReferenceMetadata")}reference;constructor(e){super(),this.reference=e}};function wro(t){return!!t&&typeof t[Symbol.iterator]=="function"}a(wro,"isIterable");function b9e(t,e){let r={};for(let n of e)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}a(b9e,"pickProps");function Y$r(t){return t.map(e=>typeof e=="string"?e:e?e.name||"":String(e)).join(" > ")}a(Y$r,"atPath");var V$r=new WeakSet;async function W$r(t,e){try{return await e()}catch(r){throw r instanceof Error&&!V$r.has(r)&&r.constructor.name!=="CancellationError"&&(V$r.add(r),r.message+=` (at tsx element ${Y$r(t.path)})`),r}}a(W$r,"annotateError")});var K$r=T(R9e=>{"use strict";f();Object.defineProperty(R9e,"__esModule",{value:!0});R9e.VSCodeTokenizer=void 0;var L2t=B6(),F2t=class{static{a(this,"VSCodeTokenizer")}countTokens;mode=L2t.OutputMode.VSCode;constructor(e,r){if(this.countTokens=e,r!==L2t.OutputMode.VSCode)throw new Error("`mode` must be set to vscode when using vscode.LanguageModelChat as the tokenizer")}async tokenLength(e,r){return e.type===L2t.Raw.ChatCompletionContentPartKind.Text?this.countTokens(e.text,r):Promise.resolve(0)}async countMessageTokens(e){return this.countTokens(e)}};R9e.VSCodeTokenizer=F2t});var J$r=T(Gre=>{"use strict";f();Object.defineProperty(Gre,"__esModule",{value:!0});Gre.tracerCss=Gre.tracerSrc=void 0;Gre.tracerSrc='"use strict";(()=>{var $,m,se,Ue,w,re,le,q,X,G,K,Ae,D={},ce=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,J=Array.isArray;function E(t,e){for(var n in e)t[n]=e[n];return t}function ue(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function l(t,e,n){var o,r,_,c={};for(_ in e)_=="key"?o=e[_]:_=="ref"?r=e[_]:c[_]=e[_];if(arguments.length>2&&(c.children=arguments.length>3?$.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(_ in t.defaultProps)c[_]===void 0&&(c[_]=t.defaultProps[_]);return R(t,c,o,r,null)}function R(t,e,n,o,r){var _={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++se,__i:-1,__u:0};return r==null&&m.vnode!=null&&m.vnode(_),_}function N(t){return t.children}function B(t,e){this.props=t,this.context=e}function I(t,e){if(e==null)return t.__?I(t.__,t.__i+1):null;for(var n;ee&&w.sort(q));O.__r=0}function pe(t,e,n,o,r,_,c,a,u,s,p){var i,f,d,b,x,C=o&&o.__k||ce,h=e.length;for(n.__d=u,Be(n,e,C),u=n.__d,i=0;i0?R(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=t,r.__b=t.__b+1,_=null,(a=r.__i=Oe(r,n,c,p))!==-1&&(p--,(_=n[a])&&(_.__u|=131072)),_==null||_.__v===null?(a==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):a!==c&&(a==c-1?i--:a==c+1?i++:(a>c?i--:i++,r.__u|=65536))):r=t.__k[o]=null;if(p)for(o=0;o(u!=null&&(131072&u.__u)==0?1:0))for(;c>=0||a=0){if((u=e[c])&&(131072&u.__u)==0&&r==u.key&&_===u.type)return c;c--}if(a=n.__.length&&n.__.push({}),n.__[t]}function S(t){return V=1,Ve(Ne,t)}function Ve(t,e,n){var o=te(L++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Ne(void 0,e),function(a){var u=o.__N?o.__N[0]:o.__[0],s=o.t(u,a);u!==s&&(o.__N=[s,o.__[1]],o.__c.setState({}))}],o.__c=g,!g.u)){var r=function(a,u,s){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!_||_.call(this,a,u,s);var i=!1;return p.forEach(function(f){if(f.__N){var d=f.__[0];f.__=f.__N,f.__N=void 0,d!==f.__[0]&&(i=!0)}}),!(!i&&o.__c.props===a)&&(!_||_.call(this,a,u,s))};g.u=!0;var _=g.shouldComponentUpdate,c=g.componentWillUpdate;g.componentWillUpdate=function(a,u,s){if(this.__e){var p=_;_=void 0,r(a,u,s),_=p}c&&c.call(this,a,u,s)},g.shouldComponentUpdate=r}return o.__N||o.__}function Se(t,e){var n=te(L++,3);!y.__s&&Ie(n.__H,e)&&(n.__=t,n.i=e,g.__H.__h.push(n))}function we(t){return V=5,je(function(){return{current:t}},[])}function je(t,e){var n=te(L++,7);return Ie(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function qe(){for(var t;t=Ee.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(W),t.__H.__h.forEach(ee),t.__H.__h=[]}catch(e){t.__H.__h=[],y.__e(e,t.__v)}}y.__b=function(t){g=null,be&&be(t)},y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Te&&Te(t,e)},y.__r=function(t){ye&&ye(t),L=0;var e=(g=t.__c).__H;e&&(Z===g?(e.__h=[],g.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(W),e.__h.forEach(ee),e.__h=[],L=0)),Z=g},y.diffed=function(t){Ce&&Ce(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ee.push(e)!==1&&ge===y.requestAnimationFrame||((ge=y.requestAnimationFrame)||Ge)(qe)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Z=g=null},y.__c=function(t,e){e.some(function(n){try{n.__h.forEach(W),n.__h=n.__h.filter(function(o){return!o.__||ee(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],y.__e(o,n.__v)}}),xe&&xe(t,e)},y.unmount=function(t){ke&&ke(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{W(o)}catch(r){e=r}}),n.__H=void 0,e&&y.__e(e,n.__v))};var Me=typeof requestAnimationFrame=="function";function Ge(t){var e,n=function(){clearTimeout(o),Me&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);Me&&(e=requestAnimationFrame(n))}function W(t){var e=g,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),g=e}function ee(t){var e=g;t.__c=t.__(),g=e}function Ie(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Ne(t,e){return typeof e=="function"?e(t):e}function He(t,e){let n=we(void 0),o=(...r)=>{n.current&&clearTimeout(n.current),n.current=window.setTimeout(()=>{t(...r)},e)};return Se(()=>()=>{n.current&&clearTimeout(n.current)},[]),o}var Ke=new Intl.NumberFormat("en-US"),T=({value:t})=>l(N,null,Ke.format(t));var ne=[{bg:"#c1e7ff",fg:"#000"},{bg:"#abd2ec",fg:"#000"},{bg:"#94bed9",fg:"#000"},{bg:"#7faac6",fg:"#000"},{bg:"#6996b3",fg:"#fff"},{bg:"#5383a1",fg:"#fff"},{bg:"#3d708f",fg:"#fff"},{bg:"#255e7e",fg:"#fff"}],Xe=({scoreBy:t,nodes:e,epoch:n})=>{if(e.length===0)return null;let o=t;if(t.field!=="tokens"){let r=e[0][t.field],_=e[0][t.field];for(let c=1;cr.type===2?l(Je,{scoreBy:o,key:_,node:r}):l(Le,{scoreBy:o,key:_,node:r,epoch:n})))},Fe=({node:t})=>l("div",{className:"node-stats"},"Used Tokens: ",l(T,{value:t.tokens})," / ","Priority:"," ",t.priority===Number.MAX_SAFE_INTEGER?"MAX":l(T,{value:t.priority})),De=({scoreBy:t,node:e,children:n,...o})=>{let r=0;if(t.max!==t.min){let _=(e[t.field]-t.min)/(t.max-t.min);r=Math.round((ne.length-1)*_)}return l("div",{...o,className:`node ${o.className||""}`,style:{backgroundColor:ne[r].bg,color:ne[r].fg}},n)},Je=({scoreBy:t,node:e})=>l(De,{node:e,scoreBy:t,tabIndex:0,className:"node-text"},l(Fe,{node:e}),l("div",{className:"node-content"},e.value)),Le=({scoreBy:t,node:e,epoch:n})=>{let[o,r]=S(!1),_=EPOCHS.findIndex(i=>i.elements.some(f=>f.id===e.id));if(_===void 0)throw new Error(`epoch not found for ${e.id}`);let c=EPOCHS[_],a=EPOCHS.at(n),u=c.elements.find(i=>i.id===e.id).tokenBudget,s=e.type===1?e.name||e.role.slice(0,1).toUpperCase()+e.role.slice(1)+"Message":e.name,p=_===n?"new-in-epoch":n<_?"before-epoch":"";return l(De,{node:e,scoreBy:t,className:p},l(Fe,{node:e}),l("div",{className:"node-content node-toggler",onClick:()=>r(i=>!i)},l("span",null,a?.inNode===e.id?"\\u{1F3C3} ":"",`<${s}>`),l("span",{className:"indicator"},o?"[+]":"[-]")),n===_&&l("div",{className:"node-stats"},"Token Budget: ",l(T,{value:u})),a?.inNode===e.id&&l("div",{className:"node-stats"},"Rendering flexGrow=",a.flexValue,l("br",null),l("br",null),"Splitting"," ",a.reservedTokens?`${a.tokenBudget} - ${a.reservedTokens} (reserved) = `:"",l(T,{value:a.tokenBudget})," tokens among ",a.elements.length," ","elements"),!o&&l(Xe,{nodes:e.children,scoreBy:t,epoch:n}))},Pe=({scoreBy:t,node:e,epoch:n})=>{let o;return t==="tokens"?o={field:"tokens",max:e.tokens,min:0}:o={field:"priority",max:e.priority,min:e.priority},l(Le,{scoreBy:o,node:e,epoch:n})};var ze=({label:t,value:e,onChange:n,min:o,max:r})=>{let _=a=>{n(a.target.valueAsNumber)},c=`number-slider-${Math.random()}`;return l("div",{className:"controls-slider"},l("label",{htmlFor:c},t),l("input",{id:c,type:"range",min:o,max:r,value:e,onInput:_}),l("input",{type:"number",min:o,value:e,onInput:_,onChange:_}))},Qe=({scoreBy:t,onScoreByChange:e})=>{let n=o=>{let r=o.target.value;e(r)};return l("div",{className:"controls-scoreby"},"Visualize by",l("label",null,l("input",{type:"radio",name:"scoreBy",value:"tokens",checked:t==="tokens",onChange:n}),"Tokens"),l("label",null,l("input",{type:"radio",name:"scoreBy",value:"priority",checked:t==="priority",onChange:n}),"Priority"))},Ye=()=>{let[t,e]=S(DEFAULT_TOKENS),[n,o]=S(EPOCHS.length),[r,_]=S(DEFAULT_MODEL),[c,a]=S("tokens"),[u,s]=S("epoch"),p=He(async f=>{if(f===DEFAULT_TOKENS)return DEFAULT_MODEL;let b=await(await fetch(`${SERVER_ADDRESS}regen?n=${f}`)).json();_(b)},100),i=f=>{e(f),p(f),o(EPOCHS.length)};return l("div",{className:"app"},l("div",{className:"controls"},l("div",{className:"tabs"},l("div",{className:`tab ${u==="epoch"?"active":""}`,onClick:()=>s("epoch")},"View Order"),l("div",{className:`tab ${u==="tokens"?"active":""}`,onClick:()=>s("tokens")},"Change Token Budget")),l("div",{className:`tab-content ${u==="epoch"?"active":""}`},l(ze,{label:"Render Epoch",value:n,onChange:o,min:0,max:EPOCHS.length})),l("div",{className:`tab-content ${u==="tokens"?"active":""}`},l(ze,{label:"Token Budget",value:t,onChange:i,min:0,max:DEFAULT_TOKENS*2}))),l("div",{className:"control-description"},u==="tokens"?l("p",null,"Token changes here will prune elements and re-render Expandable ones, but the entire prompt is not being re-rendered"):l("p",null,"Changing the render epoch lets you see the order in which elements are rendered and how the token budget is allocated."),l("div",{className:"controls-stats"},l("span",null,"Used ",l(T,{value:r.container.tokens}),"/",l(T,{value:r.budget})," tokens"),l("span",null,"Removed ",l(T,{value:r.removed})," nodes"),l(Qe,{scoreBy:c,onScoreByChange:a}))),l(Pe,{node:r.container,scoreBy:c,epoch:n}))};ve(l(Ye,null),document.body);})();\n';Gre.tracerCss=`body{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,system-ui,Ubuntu,Droid Sans,sans-serif;background:#fff;margin:0}.render-pass{border-left:2px solid #ccc;&:hover{border-left-color:#000}}.literals li{white-space:pre;font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace}.render-flex,.render-element{padding-left:10px}.node{border:1px solid rgba(255,255,255,.5);margin:3px 10px;padding:3px 10px;border-radius:4px;width:fit-content;&.new-in-epoch{box-shadow:0 0 3px 2px red}&.before-epoch{pointer-events:none;filter:grayscale(1);color:#777!important;.node{color:#777!important}}&:last-child{margin-bottom:0}}.node-content{font-weight:700}.node-children{margin-left:20px;border-left:2px dashed rgba(255,255,255,.5);padding-left:10px}.node-toggler{cursor:pointer;display:flex;align-items:center;justify-content:space-between;.indicator{font-size:.7em}}.node-text{width:400px;&:focus,&:focus-within{outline:1px solid orange;.node-content{white-space:normal}}.node-content{font-weight:400;font-size:.8em;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}.node-stats{font-family:SF Mono,Monaco,Menlo,Consolas,Ubuntu Mono,Liberation Mono,DejaVu Sans Mono,Courier New,monospace;font-size:.8em}.control-description{padding:10px;p{font-size:.9em;max-width:500px;margin-top:0}}.controls{display:flex;flex-direction:column;gap:10px;position:sticky;top:0;padding:10px;background:#fff;border-bottom:1px solid #ccc;z-index:1}.controls-slider{display:flex;align-items:center;gap:10px}.controls-stats{display:flex;gap:20px;list-style:none;padding:0;margin-top:0}.controls-scoreby{display:flex;gap:10px}.tabs{display:flex;border-bottom:1px solid #ccc;margin-bottom:10px}.tab{padding:10px;cursor:pointer;border:1px solid transparent;border-bottom:none}.tab.active{border-color:#ccc;border-bottom:1px solid #fff;background-color:#f9f9f9}.tab-content{display:none}.tab-content.active{display:block} +`});var rVr=T(k9e=>{"use strict";f();Object.defineProperty(k9e,"__esModule",{value:!0});k9e.HTMLTracer=void 0;var X$r=J$r(),V6=o2t(),Rro=B6(),U2t=class{static{a(this,"HTMLTracer")}traceData;epochs=[];addRenderEpoch(e){this.epochs.push(e)}includeInEpoch(e){this.epochs[this.epochs.length-1].elements.push(e)}didMaterializeTree(e){this.traceData=e}async serveHTML(){return Q2t.create({epochs:this.epochs,traceData:eVr(this.traceData)})}serveRouter(e){return new P9e({baseAddress:e,epochs:this.epochs,traceData:eVr(this.traceData)})}};k9e.HTMLTracer=U2t;var P9e=class{static{a(this,"RequestRouter")}opts;serverToken=crypto.randomUUID();constructor(e){this.opts=e}route(e,r){let n=e,o=r,s=new URL(n.url||"/","http://localhost"),c=`/${this.serverToken}`;switch(s.pathname){case c:case`${c}/`:this.onRoot(s,n,o);break;case`${c}/regen`:this.onRegen(s,n,o);break;default:return!1}return!0}get address(){return this.opts.baseAddress+"/"+this.serverToken}async getHTML(){let{traceData:e,epochs:r}=this.opts;return` + - `}async onRegen(e,r,n){let{traceData:o}=this.opts,s=Number(e.searchParams.get("n")||o.budget),c=await o.renderTree(s),l=await e$r(o.tokenizer,c),u=JSON.stringify(l);n.setHeader("Content-Type","application/json"),n.setHeader("Content-Length",Buffer.byteLength(u)),n.end(u)}onRoot(e,r,n){this.getHTML().then(o=>{n.setHeader("Content-Type","text/html"),n.setHeader("Content-Length",Buffer.byteLength(o)),n.end(o)})}},C2t=class t extends v7e{static{a(this,"RequestServer")}server;static async create(e){let{createServer:r}=await Promise.resolve().then(()=>require("http")),n=r((c,l)=>{try{s.route(c,l)||(l.statusCode=404,l.end("Not Found"))}catch(u){l.statusCode=500,l.end(String(u))}}),o=await new Promise((c,l)=>{n.listen(0,"127.0.0.1",()=>c(n.address().port)).on("error",l)}),s=new t({...e,baseAddress:`http://127.0.0.1:${o}`},n);return s}constructor(e,r){super(e),this.server=r}dispose(){this.server.closeAllConnections(),this.server.close()}};async function e$r(t,e){return{container:await r$r(t,e.container,!1),removed:e.removed,budget:e.budget}}a(e$r,"serializeRenderData");async function r$r(t,e,r){let n={metadata:e.metadata.map(Peo),priority:e.priority};if(e instanceof EF.MaterializedChatMessageTextChunk)return{...n,type:2,value:e.text,tokens:await e.upperBoundTokenCount(t)};if(e instanceof EF.MaterializedChatMessageImage)return{...n,name:e.id.toString(),id:e.id,type:3,value:e.src,tokens:await e.upperBoundTokenCount(t)};if(e instanceof EF.MaterializedChatMessageOpaque||e instanceof EF.MaterializedChatMessageBreakpoint||e instanceof EF.MaterializedChatMessageDocument)return;{let o={...n,id:e.id,name:e.name,children:(await Promise.all(e.children.map(s=>r$r(t,s,r||e instanceof EF.MaterializedChatMessage)))).filter(s=>!!s),tokens:r?await e.upperBoundTokenCount(t):await e.tokenCount(t)};if(e instanceof EF.GenericMaterializedContainer)return{...o,type:0};if(e instanceof EF.MaterializedChatMessage){let s=e.text.filter(c=>typeof c=="string").join("").trim();return{...o,type:1,role:weo.Raw.ChatRole.display(e.role),text:s}}}Reo(e)}a(r$r,"serializeMaterialized");function Reo(t){throw new Error("unreachable")}a(Reo,"assertNever");function Peo(t){return{name:t.constructor.name,value:JSON.stringify(t)}}a(Peo,"serializeMetadata");var t$r=a(t=>{if(t===void 0)throw new Error("Prompt must be rendered before calling HTMLTRacer.serveHTML");return t},"mustGet")});var o$r=T(i$r=>{"use strict";f();Object.defineProperty(i$r,"__esModule",{value:!0})});var a$r=T(s$r=>{"use strict";f();Object.defineProperty(s$r,"__esModule",{value:!0})});var l$r=T(c$r=>{"use strict";f();Object.defineProperty(c$r,"__esModule",{value:!0})});var po=T(Yl=>{"use strict";f();var keo=Yl&&Yl.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),a$=Yl&&Yl.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&keo(e,t,r)};Object.defineProperty(Yl,"__esModule",{value:!0});Yl.contentType=Yl.PromptRenderer=Yl.MetadataMap=Yl.PromptElement=Yl.JSONTree=void 0;Yl.renderPrompt=Meo;Yl.renderElementJSON=Oeo;var _2t=lF(),u$r=g2t(),Neo=Jjr();a$(n$r(),Yl);Yl.JSONTree=MRt();a$(lF(),Yl);a$(XRt(),Yl);a$(c2t(),Yl);a$(o$r(),Yl);a$(a$r(),Yl);a$(l$r(),Yl);var Deo=qRt();Object.defineProperty(Yl,"PromptElement",{enumerable:!0,get:a(function(){return Deo.PromptElement},"get")});var d$r=g2t();Object.defineProperty(Yl,"MetadataMap",{enumerable:!0,get:a(function(){return d$r.MetadataMap},"get")});Object.defineProperty(Yl,"PromptRenderer",{enumerable:!0,get:a(function(){return d$r.PromptRenderer},"get")});async function Meo(t,e,r,n,o,s,c=_2t.OutputMode.VSCode){let l="countTokens"in n?new Neo.VSCodeTokenizer((h,m)=>n.countTokens(h,m),c):n,u=new u$r.PromptRenderer(r,t,e,l),d=await u.render(o,s),p=u.getUsedContext();return{...d,usedContext:p}}a(Meo,"renderPrompt");Yl.contentType="application/vnd.codechat.prompt+json.1";function Oeo(t,e,r,n){return new u$r.PromptRenderer({modelMaxPromptTokens:r?.tokenBudget??Number.MAX_SAFE_INTEGER},t,e,{mode:_2t.OutputMode.Raw,countMessageTokens(s){throw new Error("Tools may only return text, not messages.")},tokenLength(s,c){return s.type===_2t.Raw.ChatCompletionContentPartKind.Text?Promise.resolve(r?.countTokens(s.text,c)??Promise.resolve(1)):Promise.resolve(1)}}).renderElementJSON(n)}a(Oeo,"renderElementJSON")});var LVr=T((D3l,iCe)=>{"use strict";f();var _Ue=a(function(){},"NullObject");_Ue.prototype=Object.create(null);var EUe=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,CUe=/\\([\v\u0020-\u00ff])/gu,MVr=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,p$={type:"",parameters:new _Ue};Object.freeze(p$.parameters);Object.freeze(p$);function OVr(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(MVr.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new _Ue};if(e===-1)return n;let o,s,c;for(EUe.lastIndex=e;s=EUe.exec(t);){if(s.index!==e)throw new TypeError("invalid parameter format");e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),CUe.test(c)&&(c=c.replace(CUe,"$1"))),n.parameters[o]=c}if(e!==t.length)throw new TypeError("invalid parameter format");return n}a(OVr,"parse");function BVr(t){if(typeof t!="string")return p$;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(MVr.test(r)===!1)return p$;let n={type:r.toLowerCase(),parameters:new _Ue};if(e===-1)return n;let o,s,c;for(EUe.lastIndex=e;s=EUe.exec(t);){if(s.index!==e)return p$;e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),CUe.test(c)&&(c=c.replace(CUe,"$1"))),n.parameters[o]=c}return e!==t.length?p$:n}a(BVr,"safeParse");iCe.exports.default={parse:OVr,safeParse:BVr};iCe.exports.parse=OVr;iCe.exports.safeParse=BVr;iCe.exports.defaultContentType=p$});var bWr=T(wPt=>{"use strict";f();Object.defineProperty(wPt,"__esModule",{value:!0});wPt.workerFile=` + `}async onRegen(e,r,n){let{traceData:o}=this.opts,s=Number(e.searchParams.get("n")||o.budget),c=await o.renderTree(s),l=await Z$r(o.tokenizer,c),u=JSON.stringify(l);n.setHeader("Content-Type","application/json"),n.setHeader("Content-Length",Buffer.byteLength(u)),n.end(u)}onRoot(e,r,n){this.getHTML().then(o=>{n.setHeader("Content-Type","text/html"),n.setHeader("Content-Length",Buffer.byteLength(o)),n.end(o)})}},Q2t=class t extends P9e{static{a(this,"RequestServer")}server;static async create(e){let{createServer:r}=await Promise.resolve().then(()=>require("http")),n=r((c,l)=>{try{s.route(c,l)||(l.statusCode=404,l.end("Not Found"))}catch(u){l.statusCode=500,l.end(String(u))}}),o=await new Promise((c,l)=>{n.listen(0,"127.0.0.1",()=>c(n.address().port)).on("error",l)}),s=new t({...e,baseAddress:`http://127.0.0.1:${o}`},n);return s}constructor(e,r){super(e),this.server=r}dispose(){this.server.closeAllConnections(),this.server.close()}};async function Z$r(t,e){return{container:await tVr(t,e.container,!1),removed:e.removed,budget:e.budget}}a(Z$r,"serializeRenderData");async function tVr(t,e,r){let n={metadata:e.metadata.map(kro),priority:e.priority};if(e instanceof V6.MaterializedChatMessageTextChunk)return{...n,type:2,value:e.text,tokens:await e.upperBoundTokenCount(t)};if(e instanceof V6.MaterializedChatMessageImage)return{...n,name:e.id.toString(),id:e.id,type:3,value:e.src,tokens:await e.upperBoundTokenCount(t)};if(e instanceof V6.MaterializedChatMessageOpaque||e instanceof V6.MaterializedChatMessageBreakpoint||e instanceof V6.MaterializedChatMessageDocument)return;{let o={...n,id:e.id,name:e.name,children:(await Promise.all(e.children.map(s=>tVr(t,s,r||e instanceof V6.MaterializedChatMessage)))).filter(s=>!!s),tokens:r?await e.upperBoundTokenCount(t):await e.tokenCount(t)};if(e instanceof V6.GenericMaterializedContainer)return{...o,type:0};if(e instanceof V6.MaterializedChatMessage){let s=e.text.filter(c=>typeof c=="string").join("").trim();return{...o,type:1,role:Rro.Raw.ChatRole.display(e.role),text:s}}}Pro(e)}a(tVr,"serializeMaterialized");function Pro(t){throw new Error("unreachable")}a(Pro,"assertNever");function kro(t){return{name:t.constructor.name,value:JSON.stringify(t)}}a(kro,"serializeMetadata");var eVr=a(t=>{if(t===void 0)throw new Error("Prompt must be rendered before calling HTMLTRacer.serveHTML");return t},"mustGet")});var iVr=T(nVr=>{"use strict";f();Object.defineProperty(nVr,"__esModule",{value:!0})});var sVr=T(oVr=>{"use strict";f();Object.defineProperty(oVr,"__esModule",{value:!0})});var cVr=T(aVr=>{"use strict";f();Object.defineProperty(aVr,"__esModule",{value:!0})});var co=T(ql=>{"use strict";f();var Dro=ql&&ql.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hj=ql&&ql.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Dro(e,t,r)};Object.defineProperty(ql,"__esModule",{value:!0});ql.contentType=ql.PromptRenderer=ql.MetadataMap=ql.PromptElement=ql.JSONTree=void 0;ql.renderPrompt=Oro;ql.renderElementJSON=Bro;var q2t=B6(),lVr=B2t(),Nro=K$r();hj(rVr(),ql);ql.JSONTree=e2t();hj(B6(),ql);hj(y2t(),ql);hj(w2t(),ql);hj(iVr(),ql);hj(sVr(),ql);hj(cVr(),ql);var Mro=a2t();Object.defineProperty(ql,"PromptElement",{enumerable:!0,get:a(function(){return Mro.PromptElement},"get")});var uVr=B2t();Object.defineProperty(ql,"MetadataMap",{enumerable:!0,get:a(function(){return uVr.MetadataMap},"get")});Object.defineProperty(ql,"PromptRenderer",{enumerable:!0,get:a(function(){return uVr.PromptRenderer},"get")});async function Oro(t,e,r,n,o,s,c=q2t.OutputMode.VSCode){let l="countTokens"in n?new Nro.VSCodeTokenizer((h,m)=>n.countTokens(h,m),c):n,u=new lVr.PromptRenderer(r,t,e,l),d=await u.render(o,s),p=u.getUsedContext();return{...d,usedContext:p}}a(Oro,"renderPrompt");ql.contentType="application/vnd.codechat.prompt+json.1";function Bro(t,e,r,n){return new lVr.PromptRenderer({modelMaxPromptTokens:r?.tokenBudget??Number.MAX_SAFE_INTEGER},t,e,{mode:q2t.OutputMode.Raw,countMessageTokens(s){throw new Error("Tools may only return text, not messages.")},tokenLength(s,c){return s.type===q2t.Raw.ChatCompletionContentPartKind.Text?Promise.resolve(r?.countTokens(s.text,c)??Promise.resolve(1)):Promise.resolve(1)}}).renderElementJSON(n)}a(Bro,"renderElementJSON")});var BWr=T(($8l,rEe)=>{"use strict";f();var R7e=a(function(){},"NullObject");R7e.prototype=Object.create(null);var x7e=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,w7e=/\\([\v\u0020-\u00ff])/gu,NWr=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,_j={type:"",parameters:new R7e};Object.freeze(_j.parameters);Object.freeze(_j);function MWr(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(NWr.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new R7e};if(e===-1)return n;let o,s,c;for(x7e.lastIndex=e;s=x7e.exec(t);){if(s.index!==e)throw new TypeError("invalid parameter format");e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),w7e.test(c)&&(c=c.replace(w7e,"$1"))),n.parameters[o]=c}if(e!==t.length)throw new TypeError("invalid parameter format");return n}a(MWr,"parse");function OWr(t){if(typeof t!="string")return _j;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(NWr.test(r)===!1)return _j;let n={type:r.toLowerCase(),parameters:new R7e};if(e===-1)return n;let o,s,c;for(x7e.lastIndex=e;s=x7e.exec(t);){if(s.index!==e)return _j;e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),w7e.test(c)&&(c=c.replace(w7e,"$1"))),n.parameters[o]=c}return e!==t.length?_j:n}a(OWr,"safeParse");rEe.exports.default={parse:MWr,safeParse:OWr};rEe.exports.parse=MWr;rEe.exports.safeParse=OWr;rEe.exports.defaultContentType=_j});var vzr=T(zPt=>{"use strict";f();Object.defineProperty(zPt,"__esModule",{value:!0});zPt.workerFile=` const { parentPort } = require('worker_threads') parentPort.on('message', async worker => { @@ -101,8 +101,8 @@ parentPort.on('message', async worker => { } } }) -`});var RWr=T(PPt=>{"use strict";f();Object.defineProperty(PPt,"__esModule",{value:!0});var TWr=require("worker_threads"),Zro=require("v8"),eno=require("os"),SWr=bWr(),LUe="ready",IWr="spawning",tno="busy",FUe="off",xWr=eno.cpus().length,wWr=process.version.replace("v","").split("."),rno=parseInt(wWr[0]),nno=parseInt(wWr[1]),RPt=class{static{a(this,"WorkerPool")}constructor(){this.maxWorkers=xWr,this.taskQueue=[],this.workers=[]}resurrect(e){let r=new TWr.Worker(SWr.workerFile,{eval:!0});e.status=IWr,e.worker=r,r.once("online",()=>process.nextTick(()=>{e.status=LUe,r.removeAllListeners(),this.tick()})),r.once("error",n=>{console.error(n),e.status=FUe,r.removeAllListeners(),this.tick()})}tick(){if(this.workers.filter(({status:u})=>u===FUe).forEach(u=>this.resurrect(u)),this.taskQueue.length===0)return;let e;for(let u=0;u"u")return;let r=this.taskQueue.shift();e.status=tno;let{worker:n}=e,{handler:o,config:s,resolve:c,reject:l}=r;try{let u="";for(let m in s.ctx){if(!s.ctx.hasOwnProperty(m))continue;let g;switch(typeof s.ctx[m]){case"string":g=`'${s.ctx[m]}'`;break;case"object":g=JSON.stringify(s.ctx[m]);break;default:g=s.ctx[m]}u+=`let ${m} = ${g} -`}let d=Zro.serialize(s.data),p=JSON.stringify(d),h=` +`});var wzr=T(KPt=>{"use strict";f();Object.defineProperty(KPt,"__esModule",{value:!0});var bzr=require("worker_threads"),eoo=require("v8"),too=require("os"),Tzr=vzr(),$7e="ready",Szr="spawning",roo="busy",V7e="off",Izr=too.cpus().length,xzr=process.version.replace("v","").split("."),noo=parseInt(xzr[0]),ioo=parseInt(xzr[1]),YPt=class{static{a(this,"WorkerPool")}constructor(){this.maxWorkers=Izr,this.taskQueue=[],this.workers=[]}resurrect(e){let r=new bzr.Worker(Tzr.workerFile,{eval:!0});e.status=Szr,e.worker=r,r.once("online",()=>process.nextTick(()=>{e.status=$7e,r.removeAllListeners(),this.tick()})),r.once("error",n=>{console.error(n),e.status=V7e,r.removeAllListeners(),this.tick()})}tick(){if(this.workers.filter(({status:u})=>u===V7e).forEach(u=>this.resurrect(u)),this.taskQueue.length===0)return;let e;for(let u=0;u"u")return;let r=this.taskQueue.shift();e.status=roo;let{worker:n}=e,{handler:o,config:s,resolve:c,reject:l}=r;try{let u="";for(let m in s.ctx){if(!s.ctx.hasOwnProperty(m))continue;let g;switch(typeof s.ctx[m]){case"string":g=`'${s.ctx[m]}'`;break;case"object":g=JSON.stringify(s.ctx[m]);break;default:g=s.ctx[m]}u+=`let ${m} = ${g} +`}let d=eoo.serialize(s.data),p=JSON.stringify(d),h=` async function __executor__() { const v8 = require('v8') ${u} @@ -111,24 +111,24 @@ parentPort.on('message', async worker => { const dataDeserialized = v8.deserialize(dataBuffer) return await (${o.toString()})(dataDeserialized) } - `;n.once("message",m=>{if(this.free(n),typeof m.error>"u"||m.error===null)return c(m.data);let g=new Error(m.error.message);g.stack=m.error.stack,l(g)}),n.once("error",m=>{e.status=FUe,l(m),this.tick()}),n.postMessage(h)}catch(u){this.free(n),l(u)}}enqueue({handler:e,config:r,resolve:n,reject:o}){this.taskQueue.push({handler:e,config:r,resolve:n,reject:o}),this.tick()}free(e){for(let r=0;r0?e.maxWorkers:xWr,this.maxWorkers>10&&console.warn(`Worker pool has more than 10 workers. + `;n.once("message",m=>{if(this.free(n),typeof m.error>"u"||m.error===null)return c(m.data);let g=new Error(m.error.message);g.stack=m.error.stack,l(g)}),n.once("error",m=>{e.status=V7e,l(m),this.tick()}),n.postMessage(h)}catch(u){this.free(n),l(u)}}enqueue({handler:e,config:r,resolve:n,reject:o}){this.taskQueue.push({handler:e,config:r,resolve:n,reject:o}),this.tick()}free(e){for(let r=0;r0?e.maxWorkers:Izr,this.maxWorkers>10&&console.warn(`Worker pool has more than 10 workers. You should also increase the Max Listeners of Node.js (https://nodejs.org/docs/latest/api/events.html#events_emitter_setmaxlisteners_n) -Otherwise, limit them with start({maxWorkers: 10})`),new Promise((r,n)=>{let o=0,s=0;for(let c=0;c()=>{process.nextTick(()=>{this.workers[u].status=LUe,this.workers[u].worker.removeAllListeners(),o++,o>0&&o+s===this.maxWorkers&&r()})})(c)),l.once("error",(u=>d=>{this.workers[u].status=FUe,this.workers[u].worker.removeAllListeners(),s++,s===this.maxWorkers&&n(d)})(c))}})}async teardown(){if(rno>=12&&nno>=5){let e=[];for(let{worker:r}of this.workers)e.push(r.terminate());await Promise.all(e),this.workers=[]}else await new Promise(r=>{let n=0;for(let o=0;o{n++,n===this.workers.length&&(this.workers=[],r())})})}};PPt.default=new RPt});var UUe=T(g$=>{"use strict";f();var ino=g$&&g$.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g$,"__esModule",{value:!0});var cCe=ino(RWr()),ono=`job needs a function. +Otherwise, limit them with start({maxWorkers: 10})`),new Promise((r,n)=>{let o=0,s=0;for(let c=0;c()=>{process.nextTick(()=>{this.workers[u].status=$7e,this.workers[u].worker.removeAllListeners(),o++,o>0&&o+s===this.maxWorkers&&r()})})(c)),l.once("error",(u=>d=>{this.workers[u].status=V7e,this.workers[u].worker.removeAllListeners(),s++,s===this.maxWorkers&&n(d)})(c))}})}async teardown(){if(noo>=12&&ioo>=5){let e=[];for(let{worker:r}of this.workers)e.push(r.terminate());await Promise.all(e),this.workers=[]}else await new Promise(r=>{let n=0;for(let o=0;o{n++,n===this.workers.length&&(this.workers=[],r())})})}};KPt.default=new YPt});var W7e=T(bj=>{"use strict";f();var ooo=bj&&bj.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bj,"__esModule",{value:!0});var sEe=ooo(wzr()),soo=`job needs a function. Try with: -> job(() => {...}, config)`,sno=`job needs an object as ctx. +> job(() => {...}, config)`,aoo=`job needs an object as ctx. Try with: -> job(() => {...}, {ctx: {...}})`;function ano(t,e={ctx:{},data:{}}){return new Promise((r,n)=>{if(typeof t!="function")return n(new Error(ono));if(e.ctx=e.ctx||{},e.data=e.data||{},typeof e.ctx!="object")return n(new Error(sno));cCe.default.enqueue({handler:t,config:e,resolve:r,reject:n})})}a(ano,"job");g$.job=ano;g$.stop=cCe.default.teardown.bind(cCe.default);g$.start=cCe.default.setup.bind(cCe.default)});var wF=T(Eh=>{"use strict";f();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.MonotonousArray=void 0;Eh.findLast=Bno;Eh.findLastIdx=WWr;Eh.findFirst=Lno;Eh.findFirstIdx=zWr;Eh.findLastMonotonous=Fno;Eh.findLastIdxMonotonous=$Pt;Eh.findFirstMonotonous=Uno;Eh.findFirstIdxMonotonousOrArrLen=VPt;Eh.findFirstIdxMonotonous=Qno;Eh.findFirstMax=YWr;Eh.findLastMax=qno;Eh.findFirstMin=Gno;Eh.findMaxIdx=Hno;Eh.mapFindFirst=jno;function Bno(t,e,r=t.length-1){let n=WWr(t,e,r);if(n!==-1)return t[n]}a(Bno,"findLast");function WWr(t,e,r=t.length-1){for(let n=r;n>=0;n--){let o=t[n];if(e(o,n))return n}return-1}a(WWr,"findLastIdx");function Lno(t,e,r=0){let n=zWr(t,e,r);if(n!==-1)return t[n]}a(Lno,"findFirst");function zWr(t,e,r=0){for(let n=r;n0&&(r=o)}return r}a(YWr,"findFirstMax");function qno(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n=0&&(r=o)}return r}a(qno,"findLastMax");function Gno(t,e){return YWr(t,(r,n)=>-e(r,n))}a(Gno,"findFirstMin");function Hno(t,e){if(t.length===0)return-1;let r=0;for(let n=1;n0&&(r=n)}return r}a(Hno,"findMaxIdx");function jno(t,e){for(let r of t){let n=e(r);if(n!==void 0)return n}}a(jno,"mapFindFirst")});var es=T(Xi=>{"use strict";f();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.BugIndicatingError=Xi.ErrorNoTelemetry=Xi.ExpectedError=Xi.NotSupportedError=Xi.NotImplementedError=Xi.ReadonlyError=Xi.PendingMigrationError=Xi.CancellationError=Xi.canceledName=Xi.errorHandler=Xi.ErrorHandler=void 0;Xi.setUnexpectedErrorHandler=$no;Xi.isSigPipeError=Vno;Xi.onBugIndicatingError=Wno;Xi.onUnexpectedError=zno;Xi.onUnexpectedExternalError=Yno;Xi.transformErrorForSerialization=KWr;Xi.transformErrorFromSerialization=JWr;Xi.isCancellationError=ZPt;Xi.canceled=Kno;Xi.illegalArgument=Jno;Xi.illegalState=Xno;Xi.getErrorMessage=Zno;var iQe=class{static{a(this,"ErrorHandler")}constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?y$.isErrorNoTelemetry(e)?new y$(e.message+` +> job(() => {...}, {ctx: {...}})`;function coo(t,e={ctx:{},data:{}}){return new Promise((r,n)=>{if(typeof t!="function")return n(new Error(soo));if(e.ctx=e.ctx||{},e.data=e.data||{},typeof e.ctx!="object")return n(new Error(aoo));sEe.default.enqueue({handler:t,config:e,resolve:r,reject:n})})}a(coo,"job");bj.job=coo;bj.stop=sEe.default.teardown.bind(sEe.default);bj.start=sEe.default.setup.bind(sEe.default)});var tF=T(fh=>{"use strict";f();Object.defineProperty(fh,"__esModule",{value:!0});fh.MonotonousArray=void 0;fh.findLast=Loo;fh.findLastIdx=Vzr;fh.findFirst=Foo;fh.findFirstIdx=Wzr;fh.findLastMonotonous=Uoo;fh.findLastIdxMonotonous=dkt;fh.findFirstMonotonous=Qoo;fh.findFirstIdxMonotonousOrArrLen=fkt;fh.findFirstIdxMonotonous=qoo;fh.findFirstMax=zzr;fh.findLastMax=Goo;fh.findFirstMin=Hoo;fh.findMaxIdx=joo;fh.mapFindFirst=$oo;function Loo(t,e,r=t.length-1){let n=Vzr(t,e,r);if(n!==-1)return t[n]}a(Loo,"findLast");function Vzr(t,e,r=t.length-1){for(let n=r;n>=0;n--){let o=t[n];if(e(o,n))return n}return-1}a(Vzr,"findLastIdx");function Foo(t,e,r=0){let n=Wzr(t,e,r);if(n!==-1)return t[n]}a(Foo,"findFirst");function Wzr(t,e,r=0){for(let n=r;n0&&(r=o)}return r}a(zzr,"findFirstMax");function Goo(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n=0&&(r=o)}return r}a(Goo,"findLastMax");function Hoo(t,e){return zzr(t,(r,n)=>-e(r,n))}a(Hoo,"findFirstMin");function joo(t,e){if(t.length===0)return-1;let r=0;for(let n=1;n0&&(r=n)}return r}a(joo,"findMaxIdx");function $oo(t,e){for(let r of t){let n=e(r);if(n!==void 0)return n}}a($oo,"mapFindFirst")});var Ko=T(zi=>{"use strict";f();Object.defineProperty(zi,"__esModule",{value:!0});zi.BugIndicatingError=zi.ErrorNoTelemetry=zi.ExpectedError=zi.NotSupportedError=zi.NotImplementedError=zi.ReadonlyError=zi.PendingMigrationError=zi.CancellationError=zi.canceledName=zi.errorHandler=zi.ErrorHandler=void 0;zi.setUnexpectedErrorHandler=Voo;zi.isSigPipeError=Woo;zi.onBugIndicatingError=zoo;zi.onUnexpectedError=Yoo;zi.onUnexpectedExternalError=Koo;zi.transformErrorForSerialization=Yzr;zi.transformErrorFromSerialization=Kzr;zi.isCancellationError=Ekt;zi.canceled=Joo;zi.illegalArgument=Xoo;zi.illegalState=Zoo;zi.getErrorMessage=eso;var fUe=class{static{a(this,"ErrorHandler")}constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Sj.isErrorNoTelemetry(e)?new Sj(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(r=>{r(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};Xi.ErrorHandler=iQe;Xi.errorHandler=new iQe;function $no(t){Xi.errorHandler.setUnexpectedErrorHandler(t)}a($no,"setUnexpectedErrorHandler");function Vno(t){if(!t||typeof t!="object")return!1;let e=t;return e.code==="EPIPE"&&e.syscall?.toUpperCase()==="WRITE"}a(Vno,"isSigPipeError");function Wno(t){Xi.errorHandler.onUnexpectedError(t)}a(Wno,"onBugIndicatingError");function zno(t){ZPt(t)||Xi.errorHandler.onUnexpectedError(t)}a(zno,"onUnexpectedError");function Yno(t){ZPt(t)||Xi.errorHandler.onUnexpectedExternalError(t)}a(Yno,"onUnexpectedExternalError");function KWr(t){if(t instanceof Error){let{name:e,message:r,cause:n}=t,o=t.stacktrace||t.stack;return{$isError:!0,name:e,message:r,stack:o,noTelemetry:y$.isErrorNoTelemetry(t),cause:n?KWr(n):void 0,code:t.code}}return t}a(KWr,"transformErrorForSerialization");function JWr(t){let e;return t.noTelemetry?e=new y$:(e=new Error,e.name=t.name),e.message=t.message,e.stack=t.stack,t.code&&(e.code=t.code),t.cause&&(e.cause=JWr(t.cause)),e}a(JWr,"transformErrorFromSerialization");Xi.canceledName="Canceled";function ZPt(t){return t instanceof oQe?!0:t instanceof Error&&t.name===Xi.canceledName&&t.message===Xi.canceledName}a(ZPt,"isCancellationError");var oQe=class extends Error{static{a(this,"CancellationError")}constructor(){super(Xi.canceledName),this.name=this.message}};Xi.CancellationError=oQe;var WPt=class t extends Error{static{a(this,"PendingMigrationError")}static{this._name="PendingMigrationError"}static is(e){return e instanceof t||e instanceof Error&&e.name===t._name}constructor(e){super(e),this.name=t._name}};Xi.PendingMigrationError=WPt;function Kno(){let t=new Error(Xi.canceledName);return t.name=t.message,t}a(Kno,"canceled");function Jno(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}a(Jno,"illegalArgument");function Xno(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}a(Xno,"illegalState");var zPt=class extends TypeError{static{a(this,"ReadonlyError")}constructor(e){super(e?`${e} is read-only and cannot be changed`:"Cannot change read-only property")}};Xi.ReadonlyError=zPt;function Zno(t){return t?t.message?t.message:t.stack?t.stack.split(` -`)[0]:String(t):"Error"}a(Zno,"getErrorMessage");var YPt=class extends Error{static{a(this,"NotImplementedError")}constructor(e){super("NotImplemented"),e&&(this.message=e)}};Xi.NotImplementedError=YPt;var KPt=class extends Error{static{a(this,"NotSupportedError")}constructor(e){super("NotSupported"),e&&(this.message=e)}};Xi.NotSupportedError=KPt;var JPt=class extends Error{static{a(this,"ExpectedError")}constructor(){super(...arguments),this.isExpected=!0}};Xi.ExpectedError=JPt;var y$=class t extends Error{static{a(this,"ErrorNoTelemetry")}constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let r=new t;return r.message=e.message,r.stack=e.stack,r}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}};Xi.ErrorNoTelemetry=y$;var XPt=class t extends Error{static{a(this,"BugIndicatingError")}constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};Xi.BugIndicatingError=XPt});var jc=T(bn=>{"use strict";f();Object.defineProperty(bn,"__esModule",{value:!0});bn.Permutation=bn.CallbackIterable=bn.ArrayQueue=bn.booleanComparator=bn.numberComparator=bn.CompareResult=void 0;bn.tail=rio;bn.equals=nio;bn.removeFastWithoutKeepingOrder=iio;bn.binarySearch=oio;bn.binarySearch2=XWr;bn.quickSelect=ekt;bn.groupBy=sio;bn.groupAdjacentBy=aio;bn.forEachAdjacent=cio;bn.forEachWithNeighbors=lio;bn.concatArrays=uio;bn.sortedDiff=ZWr;bn.delta=dio;bn.top=fio;bn.topAsync=pio;bn.coalesce=hio;bn.coalesceInPlace=mio;bn.move=gio;bn.isFalsyOrEmpty=Aio;bn.isNonEmptyArray=yio;bn.distinct=Eio;bn.uniqueFilter=Cio;bn.commonPrefixLength=_io;bn.range=vio;bn.index=bio;bn.insert=Tio;bn.remove=tzr;bn.arrayInsert=Sio;bn.shuffle=Iio;bn.pushToStart=xio;bn.pushToEnd=wio;bn.pushMany=Rio;bn.mapArrayOrNot=Pio;bn.mapFilter=kio;bn.withoutDuplicates=Nio;bn.asArray=Dio;bn.getRandomElement=Mio;bn.insertInto=rzr;bn.splice=Oio;bn.compareBy=Bio;bn.tieBreakComparators=Lio;bn.reverseOrder=Qio;bn.compareUndefinedSmallest=qio;bn.findAsync=Gio;bn.sum=Hio;bn.sumBy=jio;var eio=wF(),tio=es();function rio(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}a(rio,"tail");function nio(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;nr(t[n],e))}a(oio,"binarySearch");function XWr(t,e){let r=0,n=t-1;for(;r<=n;){let o=(r+n)/2|0,s=e(o);if(s<0)r=o+1;else if(s>0)n=o-1;else return o}return-(r+1)}a(XWr,"binarySearch2");function ekt(t,e,r){if(t=t|0,t>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],o=[],s=[],c=[];for(let l of e){let u=r(l,n);u<0?o.push(l):u>0?s.push(l):c.push(l)}return t0&&(o(s,0,[u]),c+=1)}return n}a(ZWr,"sortedDiff");function dio(t,e,r){let n=ZWr(t,e,r),o=[],s=[];for(let c of n)o.push(...t.slice(c.start,c.start+c.deleteCount)),s.push(...c.toInsert);return{removed:o,added:s}}a(dio,"delta");function fio(t,e,r){if(r===0)return[];let n=t.slice(0,r).sort(e);return ezr(t,e,n,r,t.length),n}a(fio,"top");function pio(t,e,r,n,o){return r===0?Promise.resolve([]):new Promise((s,c)=>{(async()=>{let l=t.length,u=t.slice(0,r).sort(e);for(let d=r,p=Math.min(r+n,l);dr&&await new Promise(h=>setTimeout(h)),o&&o.isCancellationRequested)throw new tio.CancellationError;ezr(t,e,u,d,p)}return u})().then(s,c)})}a(pio,"topAsync");function ezr(t,e,r,n,o){for(let s=r.length;ne(c,u)<0);r.splice(l,0,c)}}}a(ezr,"topStep");function hio(t){return t.filter(e=>!!e)}a(hio,"coalesce");function mio(t){let e=0;for(let r=0;r0}a(yio,"isNonEmptyArray");function Eio(t,e=r=>r){let r=new Set;return t.filter(n=>{let o=e(n);return r.has(o)?!1:(r.add(o),!0)})}a(Eio,"distinct");function Cio(t){let e=new Set;return r=>{let n=t(r);return e.has(n)?!1:(e.add(n),!0)}}a(Cio,"uniqueFilter");function _io(t,e,r=(n,o)=>n===o){let n=0;for(let o=0,s=Math.min(t.length,e.length);oe;o--)n.push(o);return n}a(vio,"range");function bio(t,e,r){return t.reduce((n,o)=>(n[e(o)]=r?r(o):o,n),Object.create(null))}a(bio,"index");function Tio(t,e){return t.push(e),()=>tzr(t,e)}a(Tio,"insert");function tzr(t,e){let r=t.indexOf(e);if(r>-1)return t.splice(r,1),e}a(tzr,"remove");function Sio(t,e,r){let n=t.slice(0,e),o=t.slice(e);return n.concat(r,o)}a(Sio,"arrayInsert");function Iio(t,e){let r;if(typeof e=="number"){let n=e;r=a(()=>{let o=Math.sin(n++)*179426549;return o-Math.floor(o)},"rand")}else r=Math.random;for(let n=t.length-1;n>0;n-=1){let o=Math.floor(r()*(n+1)),s=t[n];t[n]=t[o],t[o]=s}}a(Iio,"shuffle");function xio(t,e){let r=t.indexOf(e);r>-1&&(t.splice(r,1),t.unshift(e))}a(xio,"pushToStart");function wio(t,e){let r=t.indexOf(e);r>-1&&(t.splice(r,1),t.push(e))}a(wio,"pushToEnd");function Rio(t,e){for(let r of e)t.push(r)}a(Rio,"pushMany");function Pio(t,e){return Array.isArray(t)?t.map(e):e(t)}a(Pio,"mapArrayOrNot");function kio(t,e){let r=[];for(let n of t){let o=e(n);o!==void 0&&r.push(o)}return r}a(kio,"mapFilter");function Nio(t){let e=new Set(t);return Array.from(e)}a(Nio,"withoutDuplicates");function Dio(t){return Array.isArray(t)?t:[t]}a(Dio,"asArray");function Mio(t){return t[Math.floor(Math.random()*t.length)]}a(Mio,"getRandomElement");function rzr(t,e,r){let n=nzr(t,e),o=t.length,s=r.length;t.length=o+s;for(let c=o-1;c>=n;c--)t[c+s]=t[c];for(let c=0;c0}a(n,"isGreaterThan"),t.isGreaterThan=n;function o(s){return s===0}a(o,"isNeitherLessOrGreaterThan"),t.isNeitherLessOrGreaterThan=o,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(RF||(bn.CompareResult=RF={}));function Bio(t,e){return(r,n)=>e(t(r),t(n))}a(Bio,"compareBy");function Lio(...t){return(e,r)=>{for(let n of t){let o=n(e,r);if(!RF.isNeitherLessOrGreaterThan(o))return o}return RF.neitherLessOrGreaterThan}}a(Lio,"tieBreakComparators");var Fio=a((t,e)=>t-e,"numberComparator");bn.numberComparator=Fio;var Uio=a((t,e)=>(0,bn.numberComparator)(t?1:0,e?1:0),"booleanComparator");bn.booleanComparator=Uio;function Qio(t){return(e,r)=>-t(e,r)}a(Qio,"reverseOrder");function qio(t){return(e,r)=>e===void 0?r===void 0?RF.neitherLessOrGreaterThan:RF.lessThan:r===void 0?RF.greaterThan:t(e,r)}a(qio,"compareUndefinedSmallest");var tkt=class{static{a(this,"ArrayQueue")}constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let r=this.firstIdx;for(;r=0&&e(this.items[r]);)r--;let n=r===this.lastIdx?null:this.items.slice(r+1,this.lastIdx+1);return this.lastIdx=r,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}removeLast(){let e=this.items[this.lastIdx];return this.lastIdx--,e}takeCount(e){let r=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,r}};bn.ArrayQueue=tkt;var rkt=class t{static{a(this,"CallbackIterable")}static{this.empty=new t(e=>{})}constructor(e){this.iterate=e}forEach(e){this.iterate(r=>(e(r),!0))}toArray(){let e=[];return this.iterate(r=>(e.push(r),!0)),e}filter(e){return new t(r=>this.iterate(n=>e(n)?r(n):!0))}map(e){return new t(r=>this.iterate(n=>r(e(n))))}some(e){let r=!1;return this.iterate(n=>(r=e(n),!r)),r}findFirst(e){let r;return this.iterate(n=>e(n)?(r=n,!1):!0),r}findLast(e){let r;return this.iterate(n=>(e(n)&&(r=n),!0)),r}findLastMaxBy(e){let r,n=!0;return this.iterate(o=>((n||RF.isGreaterThan(e(o,r)))&&(n=!1,r=o),!0)),r}};bn.CallbackIterable=rkt;var nkt=class t{static{a(this,"Permutation")}constructor(e){this._indexMap=e}static createSortPermutation(e,r){let n=Array.from(e.keys()).sort((o,s)=>r(e[o],e[s]));return new t(n)}apply(e){return e.map((r,n)=>e[this._indexMap[n]])}inverse(){let e=this._indexMap.slice();for(let r=0;r({element:n,ok:await e(n,o)})))).find(n=>n.ok)?.element}a(Gio,"findAsync");function Hio(t){return t.reduce((e,r)=>e+r,0)}a(Hio,"sum");function jio(t,e){return t.reduce((r,n)=>r+e(n),0)}a(jio,"sumBy")});var skt=T(yO=>{"use strict";f();var ozr;Object.defineProperty(yO,"__esModule",{value:!0});yO.SetWithKey=void 0;yO.groupBy=Wio;yO.groupByMap=zio;yO.diffSets=Yio;yO.diffMaps=Kio;yO.intersection=Jio;function Wio(t,e){let r=Object.create(null);for(let n of t){let o=e(n),s=r[o];s||(s=r[o]=[]),s.push(n)}return r}a(Wio,"groupBy");function zio(t,e){let r=new Map;for(let n of t){let o=e(n),s=r.get(o);s||(s=[],r.set(o,s)),s.push(n)}return r}a(zio,"groupByMap");function Yio(t,e){let r=[],n=[];for(let o of t)e.has(o)||r.push(o);for(let o of e)t.has(o)||n.push(o);return{removed:r,added:n}}a(Yio,"diffSets");function Kio(t,e){let r=[],n=[];for(let[o,s]of t)e.has(o)||r.push(s);for(let[o,s]of e)t.has(o)||n.push(s);return{removed:r,added:n}}a(Kio,"diffMaps");function Jio(t,e){let r=new Set;for(let n of e)t.has(n)&&r.add(n);return r}a(Jio,"intersection");var okt=class{static{a(this,"SetWithKey")}static{ozr=Symbol.toStringTag}constructor(e,r){this.toKey=r,this._map=new Map,this[ozr]="SetWithKey";for(let n of e)this.add(n)}get size(){return this._map.size}add(e){let r=this.toKey(e);return this._map.set(r,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,r){this._map.forEach(n=>e.call(r,n,n,this))}[Symbol.iterator](){return this.values()}};yO.SetWithKey=okt});var ckt=T(akt=>{"use strict";f();Object.defineProperty(akt,"__esModule",{value:!0});akt.createSingleCallFunction=Xio;function Xio(t,e){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=t.apply(r,arguments)}finally{e()}else o=t.apply(r,arguments);return o}}a(Xio,"createSingleCallFunction")});var iw=T(wu=>{"use strict";f();var szr,azr,czr;Object.defineProperty(wu,"__esModule",{value:!0});wu.NKeyMap=wu.SetMap=wu.BidirectionalMap=wu.CounterSet=wu.MRUCache=wu.LRUCache=wu.LinkedMap=wu.ResourceSet=wu.ResourceMap=void 0;wu.getOrSet=Zio;wu.mapToString=eoo;wu.setToString=too;wu.mapsStrictEqualIgnoreOrder=noo;function Zio(t,e,r){let n=t.get(e);return n===void 0&&(n=r,t.set(e,n)),n}a(Zio,"getOrSet");function eoo(t){let e=[];return t.forEach((r,n)=>{e.push(`${n} => ${r}`)}),`Map(${t.size}) {${e.join(", ")}}`}a(eoo,"mapToString");function too(t){let e=[];return t.forEach(r=>{e.push(r)}),`Set(${t.size}) {${e.join(", ")}}`}a(too,"setToString");var lkt=class{static{a(this,"ResourceMapEntry")}constructor(e,r){this.uri=e,this.value=r}};function roo(t){return Array.isArray(t)}a(roo,"isEntries");var ACe=class t{static{a(this,"ResourceMap")}static{this.defaultToKey=e=>e.toString()}constructor(e,r){if(this[szr]="ResourceMap",e instanceof t)this.map=new Map(e.map),this.toKey=r??t.defaultToKey;else if(roo(e)){this.map=new Map,this.toKey=r??t.defaultToKey;for(let[n,o]of e)this.set(n,o)}else this.map=new Map,this.toKey=e??t.defaultToKey}set(e,r){return this.map.set(this.toKey(e),new lkt(e,r)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,r){typeof r<"u"&&(e=e.bind(r));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(szr=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};wu.ResourceMap=ACe;var ukt=class{static{a(this,"ResourceSet")}constructor(e,r){this[azr]="ResourceSet",!e||typeof e=="function"?this._map=new ACe(e):(this._map=new ACe(r),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,r){this._map.forEach((n,o)=>e.call(r,o,o,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(azr=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};wu.ResourceSet=ukt;var sQe=class{static{a(this,"LinkedMap")}constructor(){this[czr]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=0){let n=this._map.get(e);if(n)return r!==0&&this.touch(n,r),n.value}set(e,r,n=0){let o=this._map.get(e);if(o)o.value=r,n!==0&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}values(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}entries(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}[(czr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._tail,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.previous,n--;this._tail=r,this._size=n,r&&(r.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}};wu.LinkedMap=sQe;var aQe=class extends sQe{static{a(this,"Cache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=2){return super.get(e,r)}peek(e){return super.get(e,0)}set(e,r){return super.set(e,r,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},dkt=class extends aQe{static{a(this,"LRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimOld(e)}set(e,r){return super.set(e,r),this.checkTrim(),this}};wu.LRUCache=dkt;var fkt=class extends aQe{static{a(this,"MRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimNew(e)}set(e,r){return this._limit<=this.size&&!this.has(e)&&this.trim(Math.round(this._limit*this._ratio)-1),super.set(e,r),this}};wu.MRUCache=fkt;var pkt=class{static{a(this,"CounterSet")}constructor(){this.map=new Map}add(e){return this.map.set(e,(this.map.get(e)||0)+1),this}delete(e){let r=this.map.get(e)||0;return r===0?!1:(r--,r===0?this.map.delete(e):this.map.set(e,r),!0)}has(e){return this.map.has(e)}};wu.CounterSet=pkt;var hkt=class{static{a(this,"BidirectionalMap")}constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,r){this._m1.set(e,r),this._m2.set(r,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let r=this._m1.get(e);return r===void 0?!1:(this._m1.delete(e),this._m2.delete(r),!0)}forEach(e,r){this._m1.forEach((n,o)=>{e.call(r,n,o,this)})}keys(){return this._m1.keys()}values(){return this._m1.values()}};wu.BidirectionalMap=hkt;var mkt=class{static{a(this,"SetMap")}constructor(){this.map=new Map}add(e,r){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(r)}delete(e,r){let n=this.map.get(e);n&&(n.delete(r),n.size===0&&this.map.delete(e))}forEach(e,r){let n=this.map.get(e);n&&n.forEach(r)}get(e){let r=this.map.get(e);return r||new Set}};wu.SetMap=mkt;function noo(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(let[r,n]of t)if(!e.has(r)||e.get(r)!==n)return!1;for(let[r]of e)if(!t.has(r))return!1;return!0}a(noo,"mapsStrictEqualIgnoreOrder");var gkt=class{static{a(this,"NKeyMap")}constructor(){this._data=new Map}set(e,...r){let n=this._data;for(let o=0;o{let o="";for(let[s,c]of r)o+=`${" ".repeat(n)}${s}: `,c instanceof Map?o+=` +`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(r=>{r(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};zi.ErrorHandler=fUe;zi.errorHandler=new fUe;function Voo(t){zi.errorHandler.setUnexpectedErrorHandler(t)}a(Voo,"setUnexpectedErrorHandler");function Woo(t){if(!t||typeof t!="object")return!1;let e=t;return e.code==="EPIPE"&&e.syscall?.toUpperCase()==="WRITE"}a(Woo,"isSigPipeError");function zoo(t){zi.errorHandler.onUnexpectedError(t)}a(zoo,"onBugIndicatingError");function Yoo(t){Ekt(t)||zi.errorHandler.onUnexpectedError(t)}a(Yoo,"onUnexpectedError");function Koo(t){Ekt(t)||zi.errorHandler.onUnexpectedExternalError(t)}a(Koo,"onUnexpectedExternalError");function Yzr(t){if(t instanceof Error){let{name:e,message:r,cause:n}=t,o=t.stacktrace||t.stack;return{$isError:!0,name:e,message:r,stack:o,noTelemetry:Sj.isErrorNoTelemetry(t),cause:n?Yzr(n):void 0,code:t.code}}return t}a(Yzr,"transformErrorForSerialization");function Kzr(t){let e;return t.noTelemetry?e=new Sj:(e=new Error,e.name=t.name),e.message=t.message,e.stack=t.stack,t.code&&(e.code=t.code),t.cause&&(e.cause=Kzr(t.cause)),e}a(Kzr,"transformErrorFromSerialization");zi.canceledName="Canceled";function Ekt(t){return t instanceof pUe?!0:t instanceof Error&&t.name===zi.canceledName&&t.message===zi.canceledName}a(Ekt,"isCancellationError");var pUe=class extends Error{static{a(this,"CancellationError")}constructor(){super(zi.canceledName),this.name=this.message}};zi.CancellationError=pUe;var pkt=class t extends Error{static{a(this,"PendingMigrationError")}static{this._name="PendingMigrationError"}static is(e){return e instanceof t||e instanceof Error&&e.name===t._name}constructor(e){super(e),this.name=t._name}};zi.PendingMigrationError=pkt;function Joo(){let t=new Error(zi.canceledName);return t.name=t.message,t}a(Joo,"canceled");function Xoo(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}a(Xoo,"illegalArgument");function Zoo(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}a(Zoo,"illegalState");var hkt=class extends TypeError{static{a(this,"ReadonlyError")}constructor(e){super(e?`${e} is read-only and cannot be changed`:"Cannot change read-only property")}};zi.ReadonlyError=hkt;function eso(t){return t?t.message?t.message:t.stack?t.stack.split(` +`)[0]:String(t):"Error"}a(eso,"getErrorMessage");var mkt=class extends Error{static{a(this,"NotImplementedError")}constructor(e){super("NotImplemented"),e&&(this.message=e)}};zi.NotImplementedError=mkt;var gkt=class extends Error{static{a(this,"NotSupportedError")}constructor(e){super("NotSupported"),e&&(this.message=e)}};zi.NotSupportedError=gkt;var Akt=class extends Error{static{a(this,"ExpectedError")}constructor(){super(...arguments),this.isExpected=!0}};zi.ExpectedError=Akt;var Sj=class t extends Error{static{a(this,"ErrorNoTelemetry")}constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let r=new t;return r.message=e.message,r.stack=e.stack,r}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}};zi.ErrorNoTelemetry=Sj;var ykt=class t extends Error{static{a(this,"BugIndicatingError")}constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};zi.BugIndicatingError=ykt});var Lc=T(bn=>{"use strict";f();Object.defineProperty(bn,"__esModule",{value:!0});bn.Permutation=bn.CallbackIterable=bn.ArrayQueue=bn.booleanComparator=bn.numberComparator=bn.CompareResult=void 0;bn.tail=nso;bn.equals=iso;bn.removeFastWithoutKeepingOrder=oso;bn.binarySearch=sso;bn.binarySearch2=Jzr;bn.quickSelect=_kt;bn.groupBy=aso;bn.groupAdjacentBy=cso;bn.forEachAdjacent=lso;bn.forEachWithNeighbors=uso;bn.concatArrays=dso;bn.sortedDiff=Xzr;bn.delta=fso;bn.top=pso;bn.topAsync=hso;bn.coalesce=mso;bn.coalesceInPlace=gso;bn.move=Aso;bn.isFalsyOrEmpty=yso;bn.isNonEmptyArray=Eso;bn.distinct=_so;bn.uniqueFilter=Cso;bn.commonPrefixLength=vso;bn.range=bso;bn.index=Tso;bn.insert=Sso;bn.remove=eYr;bn.arrayInsert=Iso;bn.shuffle=xso;bn.pushToStart=wso;bn.pushToEnd=Rso;bn.pushMany=Pso;bn.mapArrayOrNot=kso;bn.mapFilter=Dso;bn.withoutDuplicates=Nso;bn.asArray=Mso;bn.getRandomElement=Oso;bn.insertInto=tYr;bn.splice=Bso;bn.compareBy=Lso;bn.tieBreakComparators=Fso;bn.reverseOrder=qso;bn.compareUndefinedSmallest=Gso;bn.findAsync=Hso;bn.sum=jso;bn.sumBy=$so;var tso=tF(),rso=Ko();function nso(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}a(nso,"tail");function iso(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;nr(t[n],e))}a(sso,"binarySearch");function Jzr(t,e){let r=0,n=t-1;for(;r<=n;){let o=(r+n)/2|0,s=e(o);if(s<0)r=o+1;else if(s>0)n=o-1;else return o}return-(r+1)}a(Jzr,"binarySearch2");function _kt(t,e,r){if(t=t|0,t>=e.length)throw new TypeError("invalid index");let n=e[Math.floor(e.length*Math.random())],o=[],s=[],c=[];for(let l of e){let u=r(l,n);u<0?o.push(l):u>0?s.push(l):c.push(l)}return t0&&(o(s,0,[u]),c+=1)}return n}a(Xzr,"sortedDiff");function fso(t,e,r){let n=Xzr(t,e,r),o=[],s=[];for(let c of n)o.push(...t.slice(c.start,c.start+c.deleteCount)),s.push(...c.toInsert);return{removed:o,added:s}}a(fso,"delta");function pso(t,e,r){if(r===0)return[];let n=t.slice(0,r).sort(e);return Zzr(t,e,n,r,t.length),n}a(pso,"top");function hso(t,e,r,n,o){return r===0?Promise.resolve([]):new Promise((s,c)=>{(async()=>{let l=t.length,u=t.slice(0,r).sort(e);for(let d=r,p=Math.min(r+n,l);dr&&await new Promise(h=>setTimeout(h)),o&&o.isCancellationRequested)throw new rso.CancellationError;Zzr(t,e,u,d,p)}return u})().then(s,c)})}a(hso,"topAsync");function Zzr(t,e,r,n,o){for(let s=r.length;ne(c,u)<0);r.splice(l,0,c)}}}a(Zzr,"topStep");function mso(t){return t.filter(e=>!!e)}a(mso,"coalesce");function gso(t){let e=0;for(let r=0;r0}a(Eso,"isNonEmptyArray");function _so(t,e=r=>r){let r=new Set;return t.filter(n=>{let o=e(n);return r.has(o)?!1:(r.add(o),!0)})}a(_so,"distinct");function Cso(t){let e=new Set;return r=>{let n=t(r);return e.has(n)?!1:(e.add(n),!0)}}a(Cso,"uniqueFilter");function vso(t,e,r=(n,o)=>n===o){let n=0;for(let o=0,s=Math.min(t.length,e.length);oe;o--)n.push(o);return n}a(bso,"range");function Tso(t,e,r){return t.reduce((n,o)=>(n[e(o)]=r?r(o):o,n),Object.create(null))}a(Tso,"index");function Sso(t,e){return t.push(e),()=>eYr(t,e)}a(Sso,"insert");function eYr(t,e){let r=t.indexOf(e);if(r>-1)return t.splice(r,1),e}a(eYr,"remove");function Iso(t,e,r){let n=t.slice(0,e),o=t.slice(e);return n.concat(r,o)}a(Iso,"arrayInsert");function xso(t,e){let r;if(typeof e=="number"){let n=e;r=a(()=>{let o=Math.sin(n++)*179426549;return o-Math.floor(o)},"rand")}else r=Math.random;for(let n=t.length-1;n>0;n-=1){let o=Math.floor(r()*(n+1)),s=t[n];t[n]=t[o],t[o]=s}}a(xso,"shuffle");function wso(t,e){let r=t.indexOf(e);r>-1&&(t.splice(r,1),t.unshift(e))}a(wso,"pushToStart");function Rso(t,e){let r=t.indexOf(e);r>-1&&(t.splice(r,1),t.push(e))}a(Rso,"pushToEnd");function Pso(t,e){for(let r of e)t.push(r)}a(Pso,"pushMany");function kso(t,e){return Array.isArray(t)?t.map(e):e(t)}a(kso,"mapArrayOrNot");function Dso(t,e){let r=[];for(let n of t){let o=e(n);o!==void 0&&r.push(o)}return r}a(Dso,"mapFilter");function Nso(t){let e=new Set(t);return Array.from(e)}a(Nso,"withoutDuplicates");function Mso(t){return Array.isArray(t)?t:[t]}a(Mso,"asArray");function Oso(t){return t[Math.floor(Math.random()*t.length)]}a(Oso,"getRandomElement");function tYr(t,e,r){let n=rYr(t,e),o=t.length,s=r.length;t.length=o+s;for(let c=o-1;c>=n;c--)t[c+s]=t[c];for(let c=0;c0}a(n,"isGreaterThan"),t.isGreaterThan=n;function o(s){return s===0}a(o,"isNeitherLessOrGreaterThan"),t.isNeitherLessOrGreaterThan=o,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(rF||(bn.CompareResult=rF={}));function Lso(t,e){return(r,n)=>e(t(r),t(n))}a(Lso,"compareBy");function Fso(...t){return(e,r)=>{for(let n of t){let o=n(e,r);if(!rF.isNeitherLessOrGreaterThan(o))return o}return rF.neitherLessOrGreaterThan}}a(Fso,"tieBreakComparators");var Uso=a((t,e)=>t-e,"numberComparator");bn.numberComparator=Uso;var Qso=a((t,e)=>(0,bn.numberComparator)(t?1:0,e?1:0),"booleanComparator");bn.booleanComparator=Qso;function qso(t){return(e,r)=>-t(e,r)}a(qso,"reverseOrder");function Gso(t){return(e,r)=>e===void 0?r===void 0?rF.neitherLessOrGreaterThan:rF.lessThan:r===void 0?rF.greaterThan:t(e,r)}a(Gso,"compareUndefinedSmallest");var Ckt=class{static{a(this,"ArrayQueue")}constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let r=this.firstIdx;for(;r=0&&e(this.items[r]);)r--;let n=r===this.lastIdx?null:this.items.slice(r+1,this.lastIdx+1);return this.lastIdx=r,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}removeLast(){let e=this.items[this.lastIdx];return this.lastIdx--,e}takeCount(e){let r=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,r}};bn.ArrayQueue=Ckt;var vkt=class t{static{a(this,"CallbackIterable")}static{this.empty=new t(e=>{})}constructor(e){this.iterate=e}forEach(e){this.iterate(r=>(e(r),!0))}toArray(){let e=[];return this.iterate(r=>(e.push(r),!0)),e}filter(e){return new t(r=>this.iterate(n=>e(n)?r(n):!0))}map(e){return new t(r=>this.iterate(n=>r(e(n))))}some(e){let r=!1;return this.iterate(n=>(r=e(n),!r)),r}findFirst(e){let r;return this.iterate(n=>e(n)?(r=n,!1):!0),r}findLast(e){let r;return this.iterate(n=>(e(n)&&(r=n),!0)),r}findLastMaxBy(e){let r,n=!0;return this.iterate(o=>((n||rF.isGreaterThan(e(o,r)))&&(n=!1,r=o),!0)),r}};bn.CallbackIterable=vkt;var bkt=class t{static{a(this,"Permutation")}constructor(e){this._indexMap=e}static createSortPermutation(e,r){let n=Array.from(e.keys()).sort((o,s)=>r(e[o],e[s]));return new t(n)}apply(e){return e.map((r,n)=>e[this._indexMap[n]])}inverse(){let e=this._indexMap.slice();for(let r=0;r({element:n,ok:await e(n,o)})))).find(n=>n.ok)?.element}a(Hso,"findAsync");function jso(t){return t.reduce((e,r)=>e+r,0)}a(jso,"sum");function $so(t,e){return t.reduce((r,n)=>r+e(n),0)}a($so,"sumBy")});var Ikt=T(e4=>{"use strict";f();var iYr;Object.defineProperty(e4,"__esModule",{value:!0});e4.SetWithKey=void 0;e4.groupBy=zso;e4.groupByMap=Yso;e4.diffSets=Kso;e4.diffMaps=Jso;e4.intersection=Xso;function zso(t,e){let r=Object.create(null);for(let n of t){let o=e(n),s=r[o];s||(s=r[o]=[]),s.push(n)}return r}a(zso,"groupBy");function Yso(t,e){let r=new Map;for(let n of t){let o=e(n),s=r.get(o);s||(s=[],r.set(o,s)),s.push(n)}return r}a(Yso,"groupByMap");function Kso(t,e){let r=[],n=[];for(let o of t)e.has(o)||r.push(o);for(let o of e)t.has(o)||n.push(o);return{removed:r,added:n}}a(Kso,"diffSets");function Jso(t,e){let r=[],n=[];for(let[o,s]of t)e.has(o)||r.push(s);for(let[o,s]of e)t.has(o)||n.push(s);return{removed:r,added:n}}a(Jso,"diffMaps");function Xso(t,e){let r=new Set;for(let n of e)t.has(n)&&r.add(n);return r}a(Xso,"intersection");var Skt=class{static{a(this,"SetWithKey")}static{iYr=Symbol.toStringTag}constructor(e,r){this.toKey=r,this._map=new Map,this[iYr]="SetWithKey";for(let n of e)this.add(n)}get size(){return this._map.size}add(e){let r=this.toKey(e);return this._map.set(r,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,r){this._map.forEach(n=>e.call(r,n,n,this))}[Symbol.iterator](){return this.values()}};e4.SetWithKey=Skt});var wkt=T(xkt=>{"use strict";f();Object.defineProperty(xkt,"__esModule",{value:!0});xkt.createSingleCallFunction=Zso;function Zso(t,e){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=t.apply(r,arguments)}finally{e()}else o=t.apply(r,arguments);return o}}a(Zso,"createSingleCallFunction")});var Wx=T(yu=>{"use strict";f();var oYr,sYr,aYr;Object.defineProperty(yu,"__esModule",{value:!0});yu.NKeyMap=yu.SetMap=yu.BidirectionalMap=yu.CounterSet=yu.MRUCache=yu.LRUCache=yu.LinkedMap=yu.ResourceSet=yu.ResourceMap=void 0;yu.getOrSet=eao;yu.mapToString=tao;yu.setToString=rao;yu.mapsStrictEqualIgnoreOrder=iao;function eao(t,e,r){let n=t.get(e);return n===void 0&&(n=r,t.set(e,n)),n}a(eao,"getOrSet");function tao(t){let e=[];return t.forEach((r,n)=>{e.push(`${n} => ${r}`)}),`Map(${t.size}) {${e.join(", ")}}`}a(tao,"mapToString");function rao(t){let e=[];return t.forEach(r=>{e.push(r)}),`Set(${t.size}) {${e.join(", ")}}`}a(rao,"setToString");var Rkt=class{static{a(this,"ResourceMapEntry")}constructor(e,r){this.uri=e,this.value=r}};function nao(t){return Array.isArray(t)}a(nao,"isEntries");var mEe=class t{static{a(this,"ResourceMap")}static{this.defaultToKey=e=>e.toString()}constructor(e,r){if(this[oYr]="ResourceMap",e instanceof t)this.map=new Map(e.map),this.toKey=r??t.defaultToKey;else if(nao(e)){this.map=new Map,this.toKey=r??t.defaultToKey;for(let[n,o]of e)this.set(n,o)}else this.map=new Map,this.toKey=e??t.defaultToKey}set(e,r){return this.map.set(this.toKey(e),new Rkt(e,r)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,r){typeof r<"u"&&(e=e.bind(r));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(oYr=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};yu.ResourceMap=mEe;var Pkt=class{static{a(this,"ResourceSet")}constructor(e,r){this[sYr]="ResourceSet",!e||typeof e=="function"?this._map=new mEe(e):(this._map=new mEe(r),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,r){this._map.forEach((n,o)=>e.call(r,o,o,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(sYr=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};yu.ResourceSet=Pkt;var hUe=class{static{a(this,"LinkedMap")}constructor(){this[aYr]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=0){let n=this._map.get(e);if(n)return r!==0&&this.touch(n,r),n.value}set(e,r,n=0){let o=this._map.get(e);if(o)o.value=r,n!==0&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}values(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}entries(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}[(aYr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._tail,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.previous,n--;this._tail=r,this._size=n,r&&(r.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}};yu.LinkedMap=hUe;var mUe=class extends hUe{static{a(this,"Cache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=2){return super.get(e,r)}peek(e){return super.get(e,0)}set(e,r){return super.set(e,r,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},kkt=class extends mUe{static{a(this,"LRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimOld(e)}set(e,r){return super.set(e,r),this.checkTrim(),this}};yu.LRUCache=kkt;var Dkt=class extends mUe{static{a(this,"MRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimNew(e)}set(e,r){return this._limit<=this.size&&!this.has(e)&&this.trim(Math.round(this._limit*this._ratio)-1),super.set(e,r),this}};yu.MRUCache=Dkt;var Nkt=class{static{a(this,"CounterSet")}constructor(){this.map=new Map}add(e){return this.map.set(e,(this.map.get(e)||0)+1),this}delete(e){let r=this.map.get(e)||0;return r===0?!1:(r--,r===0?this.map.delete(e):this.map.set(e,r),!0)}has(e){return this.map.has(e)}};yu.CounterSet=Nkt;var Mkt=class{static{a(this,"BidirectionalMap")}constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,r){this._m1.set(e,r),this._m2.set(r,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let r=this._m1.get(e);return r===void 0?!1:(this._m1.delete(e),this._m2.delete(r),!0)}forEach(e,r){this._m1.forEach((n,o)=>{e.call(r,n,o,this)})}keys(){return this._m1.keys()}values(){return this._m1.values()}};yu.BidirectionalMap=Mkt;var Okt=class{static{a(this,"SetMap")}constructor(){this.map=new Map}add(e,r){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(r)}delete(e,r){let n=this.map.get(e);n&&(n.delete(r),n.size===0&&this.map.delete(e))}forEach(e,r){let n=this.map.get(e);n&&n.forEach(r)}get(e){let r=this.map.get(e);return r||new Set}};yu.SetMap=Okt;function iao(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(let[r,n]of t)if(!e.has(r)||e.get(r)!==n)return!1;for(let[r]of e)if(!t.has(r))return!1;return!0}a(iao,"mapsStrictEqualIgnoreOrder");var Bkt=class{static{a(this,"NKeyMap")}constructor(){this._data=new Map}set(e,...r){let n=this._data;for(let o=0;o{let o="";for(let[s,c]of r)o+=`${" ".repeat(n)}${s}: `,c instanceof Map?o+=` `+e(c,n+1):o+=`${c} -`;return o},"printMap");return e(this._data,0)}};wu.NKeyMap=gkt});var Jl=T(EO=>{"use strict";f();Object.defineProperty(EO,"__esModule",{value:!0});EO.ok=ioo;EO.assertNever=ooo;EO.softAssertNever=soo;EO.assert=aoo;EO.softAssert=coo;EO.assertFn=loo;EO.checkAdjacentItems=uoo;var yCe=es();function ioo(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}a(ioo,"ok");function ooo(t,e="Unreachable"){throw new Error(e)}a(ooo,"assertNever");function soo(t){}a(soo,"softAssertNever");function aoo(t,e="unexpected state"){if(!t)throw typeof e=="string"?new yCe.BugIndicatingError(`Assertion Failed: ${e}`):e}a(aoo,"assert");function coo(t,e="Soft Assertion Failed"){t||(0,yCe.onUnexpectedError)(new yCe.BugIndicatingError(e))}a(coo,"softAssert");function loo(t){if(!t()){debugger;t(),(0,yCe.onUnexpectedError)(new yCe.BugIndicatingError("Assertion Failed"))}}a(loo,"assertFn");function uoo(t,e){let r=0;for(;r{"use strict";f();Object.defineProperty(xc,"__esModule",{value:!0});xc.isOneOf=void 0;xc.isString=Akt;xc.isStringArray=foo;xc.isArrayOf=lzr;xc.isObject=uzr;xc.isTypedArray=poo;xc.isNumber=hoo;xc.isIterable=moo;xc.isAsyncIterable=goo;xc.isBoolean=Aoo;xc.isUndefined=dzr;xc.isDefined=yoo;xc.isUndefinedOrNull=cQe;xc.assertType=Eoo;xc.assertReturnsDefined=Coo;xc.assertDefined=_oo;xc.assertReturnsAllDefined=voo;xc.typeCheck=Too;xc.isEmptyObject=Ioo;xc.isFunction=ykt;xc.areFunctions=xoo;xc.validateConstraints=woo;xc.validateConstraint=fzr;xc.upcast=Roo;xc.hasKey=Poo;var doo=Jl();function Akt(t){return typeof t=="string"}a(Akt,"isString");function foo(t){return lzr(t,Akt)}a(foo,"isStringArray");function lzr(t,e){return Array.isArray(t)&&t.every(e)}a(lzr,"isArrayOf");function uzr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(uzr,"isObject");function poo(t){let e=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof e}a(poo,"isTypedArray");function hoo(t){return typeof t=="number"&&!isNaN(t)}a(hoo,"isNumber");function moo(t){return!!t&&typeof t[Symbol.iterator]=="function"}a(moo,"isIterable");function goo(t){return!!t&&typeof t[Symbol.asyncIterator]=="function"}a(goo,"isAsyncIterable");function Aoo(t){return t===!0||t===!1}a(Aoo,"isBoolean");function dzr(t){return typeof t>"u"}a(dzr,"isUndefined");function yoo(t){return!cQe(t)}a(yoo,"isDefined");function cQe(t){return dzr(t)||t===null}a(cQe,"isUndefinedOrNull");function Eoo(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}a(Eoo,"assertType");function Coo(t){return(0,doo.assert)(t!=null,"Argument is `undefined` or `null`."),t}a(Coo,"assertReturnsDefined");function _oo(t,e){if(t==null)throw typeof e=="string"?new Error(e):e}a(_oo,"assertDefined");function voo(...t){let e=[];for(let r=0;re.includes(t),"isOneOf");xc.isOneOf=boo;function Too(t){}a(Too,"typeCheck");var Soo=Object.prototype.hasOwnProperty;function Ioo(t){if(!uzr(t))return!1;for(let e in t)if(Soo.call(t,e))return!1;return!0}a(Ioo,"isEmptyObject");function ykt(t){return typeof t=="function"}a(ykt,"isFunction");function xoo(...t){return t.length>0&&t.every(ykt)}a(xoo,"areFunctions");function woo(t,e){let r=Math.min(t.length,e.length);for(let n=0;n{"use strict";f();Object.defineProperty(lQe,"__esModule",{value:!0});lQe.Iterable=void 0;var koo=sv(),pzr;(function(t){function e(w){return!!w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}a(e,"is"),t.is=e;let r=Object.freeze([]);function n(){return r}a(n,"empty"),t.empty=n;function*o(w){yield w}a(o,"single"),t.single=o;function s(w){return e(w)?w:o(w)}a(s,"wrap"),t.wrap=s;function c(w){return w??r}a(c,"from"),t.from=c;function*l(w){for(let P=w.length-1;P>=0;P--)yield w[P]}a(l,"reverse"),t.reverse=l;function u(w){return!w||w[Symbol.iterator]().next().done===!0}a(u,"isEmpty"),t.isEmpty=u;function d(w){return w[Symbol.iterator]().next().value}a(d,"first"),t.first=d;function p(w,P){let k=0;for(let Q of w)if(P(Q,k++))return!0;return!1}a(p,"some"),t.some=p;function h(w,P){let k=0;for(let Q of w)if(!P(Q,k++))return!1;return!0}a(h,"every"),t.every=h;function m(w,P){for(let k of w)if(P(k))return k}a(m,"find"),t.find=m;function*g(w,P){for(let k of w)P(k)&&(yield k)}a(g,"filter"),t.filter=g;function*A(w,P){let k=0;for(let Q of w)yield P(Q,k++)}a(A,"map"),t.map=A;function*y(w,P){let k=0;for(let Q of w)yield*P(Q,k++)}a(y,"flatMap"),t.flatMap=y;function*E(...w){for(let P of w)(0,koo.isIterable)(P)?yield*P:yield P}a(E,"concat"),t.concat=E;function _(w,P,k){let Q=k;for(let M of w)Q=P(Q,M);return Q}a(_,"reduce"),t.reduce=_;function v(w){let P=0;for(let k of w)P++;return P}a(v,"length"),t.length=v;function*b(w,P,k=w.length){for(P<-w.length&&(P=0),P<0&&(P+=w.length),k<0?k+=w.length:k>w.length&&(k=w.length);P{"use strict";f();Object.defineProperty(ts,"__esModule",{value:!0});ts.DisposableResourceMap=ts.DisposableMap=ts.ImmortalReference=ts.AsyncReferenceCollection=ts.ReferenceCollection=ts.RefCountedDisposable=ts.MandatoryMutableDisposable=ts.MutableDisposable=ts.Disposable=ts.DisposableStore=ts.DisposableTracker=ts.GCBasedDisposableTracker=void 0;ts.setDisposableTracker=Azr;ts.trackDisposable=Zne;ts.markAsDisposed=eie;ts.markAsSingleton=Loo;ts.isDisposable=yzr;ts.dispose=fQe;ts.disposeIfDisposable=Foo;ts.combinedDisposable=Uoo;ts.toDisposable=Rkt;ts.disposeOnReturn=Qoo;ts.thenIfNotDisposed=qoo;ts.thenRegisterOrDispose=Goo;var hzr=jc(),Noo=skt(),gzr=iw(),Doo=ckt(),Moo=Ekt(),mzr=es(),Ooo=!1,E$=null,Ckt=class{static{a(this,"GCBasedDisposableTracker")}constructor(){this._registry=new FinalizationRegistry(e=>{console.warn(`[LEAKED DISPOSABLE] ${e}`)})}trackDisposable(e){let r=new Error("CREATED via:").stack;this._registry.register(e,r,e)}setParent(e,r){r?this._registry.unregister(e):this.trackDisposable(e)}markAsDisposed(e){this._registry.unregister(e)}markAsSingleton(e){this._registry.unregister(e)}};ts.GCBasedDisposableTracker=Ckt;var _kt=class t{static{a(this,"DisposableTracker")}constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(e){let r=this.livingDisposables.get(e);return r||(r={parent:null,source:null,isSingleton:!1,value:e,idx:t.idx++},this.livingDisposables.set(e,r)),r}trackDisposable(e){let r=this.getDisposableData(e);r.source||(r.source=new Error().stack)}setParent(e,r){let n=this.getDisposableData(e);n.parent=r}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,r){let n=r.get(e);if(n)return n;let o=e.parent?this.getRootParent(this.getDisposableData(e.parent),r):e;return r.set(e,o),o}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,r){let n;if(r)n=r;else{let u=new Map,d=[...this.livingDisposables.values()].filter(h=>h.source!==null&&!this.getRootParent(h,u).isSingleton);if(d.length===0)return;let p=new Set(d.map(h=>h.value));if(n=d.filter(h=>!(h.parent&&p.has(h.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(u){function d(h,m){for(;h.length>0&&m.some(g=>typeof g=="string"?g===h[0]:h[0].match(g));)h.shift()}a(d,"removePrefix");let p=u.source.split(` -`).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return d(p,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),p.reverse()}a(o,"getStackTracePath");let s=new gzr.SetMap;for(let u of n){let d=o(u);for(let p=0;p<=d.length;p++)s.add(d.slice(0,p).join(` -`),u)}n.sort((0,hzr.compareBy)(u=>u.idx,hzr.numberComparator));let c="",l=0;for(let u of n.slice(0,e)){l++;let d=o(u),p=[];for(let h=0;h{"use strict";f();Object.defineProperty(t4,"__esModule",{value:!0});t4.ok=oao;t4.assertNever=sao;t4.softAssertNever=aao;t4.assert=cao;t4.softAssert=lao;t4.assertFn=uao;t4.checkAdjacentItems=dao;var gEe=Ko();function oao(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}a(oao,"ok");function sao(t,e="Unreachable"){throw new Error(e)}a(sao,"assertNever");function aao(t){}a(aao,"softAssertNever");function cao(t,e="unexpected state"){if(!t)throw typeof e=="string"?new gEe.BugIndicatingError(`Assertion Failed: ${e}`):e}a(cao,"assert");function lao(t,e="Soft Assertion Failed"){t||(0,gEe.onUnexpectedError)(new gEe.BugIndicatingError(e))}a(lao,"softAssert");function uao(t){if(!t()){debugger;t(),(0,gEe.onUnexpectedError)(new gEe.BugIndicatingError("Assertion Failed"))}}a(uao,"assertFn");function dao(t,e){let r=0;for(;r{"use strict";f();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.isOneOf=void 0;Cc.isString=Lkt;Cc.isStringArray=pao;Cc.isArrayOf=cYr;Cc.isObject=lYr;Cc.isTypedArray=hao;Cc.isNumber=mao;Cc.isIterable=gao;Cc.isAsyncIterable=Aao;Cc.isBoolean=yao;Cc.isUndefined=uYr;Cc.isDefined=Eao;Cc.isUndefinedOrNull=gUe;Cc.assertType=_ao;Cc.assertReturnsDefined=Cao;Cc.assertDefined=vao;Cc.assertReturnsAllDefined=bao;Cc.typeCheck=Sao;Cc.isEmptyObject=xao;Cc.isFunction=Fkt;Cc.areFunctions=wao;Cc.validateConstraints=Rao;Cc.validateConstraint=dYr;Cc.upcast=Pao;Cc.hasKey=kao;var fao=Hl();function Lkt(t){return typeof t=="string"}a(Lkt,"isString");function pao(t){return cYr(t,Lkt)}a(pao,"isStringArray");function cYr(t,e){return Array.isArray(t)&&t.every(e)}a(cYr,"isArrayOf");function lYr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(lYr,"isObject");function hao(t){let e=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof e}a(hao,"isTypedArray");function mao(t){return typeof t=="number"&&!isNaN(t)}a(mao,"isNumber");function gao(t){return!!t&&typeof t[Symbol.iterator]=="function"}a(gao,"isIterable");function Aao(t){return!!t&&typeof t[Symbol.asyncIterator]=="function"}a(Aao,"isAsyncIterable");function yao(t){return t===!0||t===!1}a(yao,"isBoolean");function uYr(t){return typeof t>"u"}a(uYr,"isUndefined");function Eao(t){return!gUe(t)}a(Eao,"isDefined");function gUe(t){return uYr(t)||t===null}a(gUe,"isUndefinedOrNull");function _ao(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}a(_ao,"assertType");function Cao(t){return(0,fao.assert)(t!=null,"Argument is `undefined` or `null`."),t}a(Cao,"assertReturnsDefined");function vao(t,e){if(t==null)throw typeof e=="string"?new Error(e):e}a(vao,"assertDefined");function bao(...t){let e=[];for(let r=0;re.includes(t),"isOneOf");Cc.isOneOf=Tao;function Sao(t){}a(Sao,"typeCheck");var Iao=Object.prototype.hasOwnProperty;function xao(t){if(!lYr(t))return!1;for(let e in t)if(Iao.call(t,e))return!1;return!0}a(xao,"isEmptyObject");function Fkt(t){return typeof t=="function"}a(Fkt,"isFunction");function wao(...t){return t.length>0&&t.every(Fkt)}a(wao,"areFunctions");function Rao(t,e){let r=Math.min(t.length,e.length);for(let n=0;n{"use strict";f();Object.defineProperty(AUe,"__esModule",{value:!0});AUe.Iterable=void 0;var Dao=W1(),fYr;(function(t){function e(R){return!!R&&typeof R=="object"&&typeof R[Symbol.iterator]=="function"}a(e,"is"),t.is=e;let r=Object.freeze([]);function n(){return r}a(n,"empty"),t.empty=n;function*o(R){yield R}a(o,"single"),t.single=o;function s(R){return e(R)?R:o(R)}a(s,"wrap"),t.wrap=s;function c(R){return R??r}a(c,"from"),t.from=c;function*l(R){for(let P=R.length-1;P>=0;P--)yield R[P]}a(l,"reverse"),t.reverse=l;function u(R){return!R||R[Symbol.iterator]().next().done===!0}a(u,"isEmpty"),t.isEmpty=u;function d(R){return R[Symbol.iterator]().next().value}a(d,"first"),t.first=d;function p(R,P){let k=0;for(let Q of R)if(P(Q,k++))return!0;return!1}a(p,"some"),t.some=p;function h(R,P){let k=0;for(let Q of R)if(!P(Q,k++))return!1;return!0}a(h,"every"),t.every=h;function m(R,P){for(let k of R)if(P(k))return k}a(m,"find"),t.find=m;function*g(R,P){for(let k of R)P(k)&&(yield k)}a(g,"filter"),t.filter=g;function*A(R,P){let k=0;for(let Q of R)yield P(Q,k++)}a(A,"map"),t.map=A;function*y(R,P){let k=0;for(let Q of R)yield*P(Q,k++)}a(y,"flatMap"),t.flatMap=y;function*E(...R){for(let P of R)(0,Dao.isIterable)(P)?yield*P:yield P}a(E,"concat"),t.concat=E;function _(R,P,k){let Q=k;for(let M of R)Q=P(Q,M);return Q}a(_,"reduce"),t.reduce=_;function v(R){let P=0;for(let k of R)P++;return P}a(v,"length"),t.length=v;function*b(R,P,k=R.length){for(P<-R.length&&(P=0),P<0&&(P+=R.length),k<0?k+=R.length:k>R.length&&(k=R.length);P{"use strict";f();Object.defineProperty(Jo,"__esModule",{value:!0});Jo.DisposableResourceMap=Jo.DisposableMap=Jo.ImmortalReference=Jo.AsyncReferenceCollection=Jo.ReferenceCollection=Jo.RefCountedDisposable=Jo.MandatoryMutableDisposable=Jo.MutableDisposable=Jo.Disposable=Jo.DisposableStore=Jo.DisposableTracker=Jo.GCBasedDisposableTracker=void 0;Jo.setDisposableTracker=gYr;Jo.trackDisposable=fne;Jo.markAsDisposed=pne;Jo.markAsSingleton=Fao;Jo.isDisposable=AYr;Jo.dispose=_Ue;Jo.disposeIfDisposable=Uao;Jo.combinedDisposable=Qao;Jo.toDisposable=Ykt;Jo.disposeOnReturn=qao;Jo.thenIfNotDisposed=Gao;Jo.thenRegisterOrDispose=Hao;var pYr=Lc(),Nao=Ikt(),mYr=Wx(),Mao=wkt(),Oao=Ukt(),hYr=Ko(),Bao=!1,Ij=null,Qkt=class{static{a(this,"GCBasedDisposableTracker")}constructor(){this._registry=new FinalizationRegistry(e=>{console.warn(`[LEAKED DISPOSABLE] ${e}`)})}trackDisposable(e){let r=new Error("CREATED via:").stack;this._registry.register(e,r,e)}setParent(e,r){r?this._registry.unregister(e):this.trackDisposable(e)}markAsDisposed(e){this._registry.unregister(e)}markAsSingleton(e){this._registry.unregister(e)}};Jo.GCBasedDisposableTracker=Qkt;var qkt=class t{static{a(this,"DisposableTracker")}constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(e){let r=this.livingDisposables.get(e);return r||(r={parent:null,source:null,isSingleton:!1,value:e,idx:t.idx++},this.livingDisposables.set(e,r)),r}trackDisposable(e){let r=this.getDisposableData(e);r.source||(r.source=new Error().stack)}setParent(e,r){let n=this.getDisposableData(e);n.parent=r}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,r){let n=r.get(e);if(n)return n;let o=e.parent?this.getRootParent(this.getDisposableData(e.parent),r):e;return r.set(e,o),o}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,r){let n;if(r)n=r;else{let u=new Map,d=[...this.livingDisposables.values()].filter(h=>h.source!==null&&!this.getRootParent(h,u).isSingleton);if(d.length===0)return;let p=new Set(d.map(h=>h.value));if(n=d.filter(h=>!(h.parent&&p.has(h.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(u){function d(h,m){for(;h.length>0&&m.some(g=>typeof g=="string"?g===h[0]:h[0].match(g));)h.shift()}a(d,"removePrefix");let p=u.source.split(` +`).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return d(p,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),p.reverse()}a(o,"getStackTracePath");let s=new mYr.SetMap;for(let u of n){let d=o(u);for(let p=0;p<=d.length;p++)s.add(d.slice(0,p).join(` +`),u)}n.sort((0,pYr.compareBy)(u=>u.idx,pYr.numberComparator));let c="",l=0;for(let u of n.slice(0,e)){l++;let d=o(u),p=[];for(let h=0;ho(E)[h]),E=>E);delete y[d[h]];for(let[E,_]of Object.entries(y))_&&p.unshift(` - stacktraces of ${_.length} other leaks continue with ${E}`);p.unshift(m)}c+=` +`)),y=(0,Nao.groupBy)([...A].map(E=>o(E)[h]),E=>E);delete y[d[h]];for(let[E,_]of Object.entries(y))_&&p.unshift(` - stacktraces of ${_.length} other leaks continue with ${E}`);p.unshift(m)}c+=` ==================== Leaking disposable ${l}/${n.length}: ${u.value.constructor.name} ==================== @@ -141,129 +141,129 @@ ${p.join(` ... and ${n.length-e} more leaking disposables -`),{leaks:n,details:c}}};ts.DisposableTracker=_kt;function Azr(t){E$=t}a(Azr,"setDisposableTracker");if(Ooo){let t="__is_disposable_tracked__";Azr(new class{trackDisposable(e){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[t]||console.log(r)},3e3)}setParent(e,r){if(e&&e!==Xne.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==Xne.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}function Zne(t){return E$?.trackDisposable(t),t}a(Zne,"trackDisposable");function eie(t){E$?.markAsDisposed(t)}a(eie,"markAsDisposed");function C$(t,e){E$?.setParent(t,e)}a(C$,"setParentOfDisposable");function Boo(t,e){if(E$)for(let r of t)E$.setParent(r,e)}a(Boo,"setParentOfDisposables");function Loo(t){return E$?.markAsSingleton(t),t}a(Loo,"markAsSingleton");function yzr(t){return typeof t=="object"&&t!==null&&typeof t.dispose=="function"&&t.dispose.length===0}a(yzr,"isDisposable");function fQe(t){if(Moo.Iterable.is(t)){let e=[];for(let r of t)if(r)try{r.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}a(fQe,"dispose");function Foo(t){for(let e of t)yzr(e)&&e.dispose();return[]}a(Foo,"disposeIfDisposable");function Uoo(...t){let e=Rkt(()=>fQe(t));return Boo(t,e),e}a(Uoo,"combinedDisposable");var vkt=class{static{a(this,"FunctionDisposable")}constructor(e){this._isDisposed=!1,this._fn=e,Zne(this)}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,eie(this),this._fn()}}};function Rkt(t){return new vkt(t)}a(Rkt,"toDisposable");var ECe=class t{static{a(this,"DisposableStore")}static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,Zne(this)}dispose(){this._isDisposed||(eie(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{fQe(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===Xne.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return C$(e,this),this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.delete(e)&&C$(e,null)}assertNotDisposed(){this._isDisposed&&(0,mzr.onUnexpectedError)(new mzr.BugIndicatingError("Object disposed"))}};ts.DisposableStore=ECe;var Xne=class{static{a(this,"Disposable")}static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new ECe,Zne(this),C$(this._store,this)}dispose(){eie(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ts.Disposable=Xne;var uQe=class{static{a(this,"MutableDisposable")}constructor(){this._isDisposed=!1,Zne(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&C$(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,eie(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&C$(e,null),e}};ts.MutableDisposable=uQe;var bkt=class{static{a(this,"MandatoryMutableDisposable")}constructor(e){this._disposable=new uQe,this._isDisposed=!1,this._disposable.value=e}get value(){return this._disposable.value}set value(e){this._isDisposed||e===this._disposable.value||(this._disposable.value=e)}dispose(){this._isDisposed=!0,this._disposable.dispose()}};ts.MandatoryMutableDisposable=bkt;var Tkt=class{static{a(this,"RefCountedDisposable")}constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}};ts.RefCountedDisposable=Tkt;var Skt=class{static{a(this,"ReferenceCollection")}constructor(){this.references=new Map}acquire(e,...r){let n=this.references.get(e);n||(n={counter:0,object:this.createReferencedObject(e,...r)},this.references.set(e,n));let{object:o}=n,s=(0,Doo.createSingleCallFunction)(()=>{--n.counter===0&&(this.destroyReferencedObject(e,n.object),this.references.delete(e))});return n.counter++,{object:o,dispose:s}}};ts.ReferenceCollection=Skt;var Ikt=class{static{a(this,"AsyncReferenceCollection")}constructor(e){this.referenceCollection=e}async acquire(e,...r){let n=this.referenceCollection.acquire(e,...r);try{return{object:await n.object,dispose:a(()=>n.dispose(),"dispose")}}catch(o){throw n.dispose(),o}}};ts.AsyncReferenceCollection=Ikt;var xkt=class{static{a(this,"ImmortalReference")}constructor(e){this.object=e}dispose(){}};ts.ImmortalReference=xkt;function Qoo(t){let e=new ECe;try{t(e)}finally{e.dispose()}}a(Qoo,"disposeOnReturn");var dQe=class{static{a(this,"DisposableMap")}constructor(e=new Map){this._isDisposed=!1,this._store=e,Zne(this)}dispose(){eie(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{fQe(this._store.values())}finally{this._store.clear()}}has(e){return this._store.has(e)}get size(){return this._store.size}get(e){return this._store.get(e)}set(e,r,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,r),C$(r,this)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}deleteAndLeak(e){let r=this._store.get(e);return r&&C$(r,null),this._store.delete(e),r}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}};ts.DisposableMap=dQe;function qoo(t,e){let r=!1;return t.then(n=>{r||e(n)}),Rkt(()=>{r=!0})}a(qoo,"thenIfNotDisposed");function Goo(t,e){return t.then(r=>(e.isDisposed?r.dispose():e.add(r),r))}a(Goo,"thenRegisterOrDispose");var wkt=class extends dQe{static{a(this,"DisposableResourceMap")}constructor(){super(new gzr.ResourceMap)}};ts.DisposableResourceMap=wkt});var tie=T(pQe=>{"use strict";f();Object.defineProperty(pQe,"__esModule",{value:!0});pQe.LinkedList=void 0;var dl=class t{static{a(this,"Node")}static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},Pkt=class{static{a(this,"LinkedList")}constructor(){this._first=dl.Undefined,this._last=dl.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===dl.Undefined}clear(){let e=this._first;for(;e!==dl.Undefined;){let r=e.next;e.prev=dl.Undefined,e.next=dl.Undefined,e=r}this._first=dl.Undefined,this._last=dl.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let n=new dl(e);if(this._first===dl.Undefined)this._first=n,this._last=n;else if(r){let s=this._last;this._last=n,n.prev=s,s.next=n}else{let s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==dl.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==dl.Undefined){let e=this._last.element;return this._remove(this._last),e}}peek(){if(this._last!==dl.Undefined)return this._last.element}_remove(e){if(e.prev!==dl.Undefined&&e.next!==dl.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===dl.Undefined&&e.next===dl.Undefined?(this._first=dl.Undefined,this._last=dl.Undefined):e.next===dl.Undefined?(this._last=this._last.prev,this._last.next=dl.Undefined):e.prev===dl.Undefined&&(this._first=this._first.next,this._first.prev=dl.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==dl.Undefined;)yield e.element,e=e.next}};pQe.LinkedList=Pkt});var Ck=T(hQe=>{"use strict";f();Object.defineProperty(hQe,"__esModule",{value:!0});hQe.StopWatch=void 0;var Hoo=globalThis.performance.now.bind(globalThis.performance),kkt=class t{static{a(this,"StopWatch")}static create(e){return new t(e)}constructor(e){this._now=e===!1?Date.now:Hoo,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};hQe.StopWatch=kkt});var nc=T(ra=>{"use strict";f();Object.defineProperty(ra,"__esModule",{value:!0});ra.ValueWithChangeEvent=ra.Relay=ra.EventBufferer=ra.DynamicListEventMultiplexer=ra.EventMultiplexer=ra.MicrotaskEmitter=ra.DebounceEmitter=ra.PauseableEmitter=ra.AsyncEmitter=ra.createEventDeliveryQueue=ra.Emitter=ra.ListenerRefusalError=ra.ListenerLeakError=ra.EventProfiling=ra.Event=void 0;ra.setGlobalLeakWarningThreshold=zoo;ra.trackSetChanges=Xoo;var joo=skt(),CCe=es(),$oo=ckt(),av=so(),_zr=tie(),Voo=Ck(),Ezr=!1,Woo=!1,mQe;(function(t){t.None=()=>av.Disposable.None;function e(O){if(Woo){let{onDidAddListener:N}=O,F=vCe.create(),U=0;O.onDidAddListener=()=>{++U===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),F.print()),N?.()}}}a(e,"_addLeakageTraceLogic");function r(O,N,F){return g(O,()=>{},0,void 0,N??!0,void 0,F)}a(r,"defer"),t.defer=r;function n(O){return(N,F=null,U)=>{let L=!1,H;return H=O($=>{if(!L)return H?H.dispose():L=!0,N.call(F,$)},null,U),L&&H.dispose(),H}}a(n,"once"),t.once=n;function o(O,N){return t.once(t.filter(O,N))}a(o,"onceIf"),t.onceIf=o;function s(O,N,F){return h((U,L=null,H)=>O($=>U.call(L,N($)),null,H),F)}a(s,"map"),t.map=s;function c(O,N,F){return h((U,L=null,H)=>O($=>{N($),U.call(L,$)},null,H),F)}a(c,"forEach"),t.forEach=c;function l(O,N,F){return h((U,L=null,H)=>O($=>N($)&&U.call(L,$),null,H),F)}a(l,"filter"),t.filter=l;function u(O){return O}a(u,"signal"),t.signal=u;function d(...O){return(N,F=null,U)=>{let L=(0,av.combinedDisposable)(...O.map(H=>H($=>N.call(F,$))));return m(L,U)}}a(d,"any"),t.any=d;function p(O,N,F,U){let L=F;return s(O,H=>(L=N(L,H),L),U)}a(p,"reduce"),t.reduce=p;function h(O,N){let F,U={onWillAddFirstListener(){F=O(L.fire,L)},onDidRemoveLastListener(){F?.dispose()}};N||e(U);let L=new zg(U);return N?.add(L),L.event}a(h,"snapshot");function m(O,N){return N instanceof Array?N.push(O):N&&N.add(O),O}a(m,"addAndReturnDisposable");function g(O,N,F=100,U=!1,L=!1,H,$){let W,j,ce,J=0,Te,fe={leakWarningThreshold:H,onWillAddFirstListener(){W=O(Ve=>{J++,j=N(j,Ve),U&&!ce&&(De.fire(j),j=void 0),Te=a(()=>{let Ue=j;j=void 0,ce=void 0,(!U||J>1)&&De.fire(Ue),J=0},"doFire"),typeof F=="number"?(ce&&clearTimeout(ce),ce=setTimeout(Te,F)):ce===void 0&&(ce=null,queueMicrotask(Te))})},onWillRemoveListener(){L&&J>0&&Te?.()},onDidRemoveLastListener(){Te=void 0,W.dispose()}};$||e(fe);let De=new zg(fe);return $?.add(De),De.event}a(g,"debounce"),t.debounce=g;function A(O,N=0,F,U){return t.debounce(O,(L,H)=>L?(L.push(H),L):[H],N,void 0,F??!0,void 0,U)}a(A,"accumulate"),t.accumulate=A;function y(O,N,F=100,U=!0,L=!0,H,$){let W,j,ce,J=0,Te={leakWarningThreshold:H,onWillAddFirstListener(){W=O(De=>{J++,j=N(j,De),ce===void 0&&(U&&(fe.fire(j),j=void 0,J=0),typeof F=="number"?ce=setTimeout(()=>{L&&J>0&&fe.fire(j),j=void 0,ce=void 0,J=0},F):(ce=0,queueMicrotask(()=>{L&&J>0&&fe.fire(j),j=void 0,ce=void 0,J=0})))})},onDidRemoveLastListener(){W.dispose()}};$||e(Te);let fe=new zg(Te);return $?.add(fe),fe.event}a(y,"throttle"),t.throttle=y;function E(O,N=(U,L)=>U===L,F){let U=!0,L;return l(O,H=>{let $=U||!N(H,L);return U=!1,L=H,$},F)}a(E,"latch"),t.latch=E;function _(O,N,F){return[t.filter(O,N,F),t.filter(O,U=>!N(U),F)]}a(_,"split"),t.split=_;function v(O,N=!1,F=[],U){let L=F.slice(),H=O(j=>{L?L.push(j):W.fire(j)});U&&U.add(H);let $=a(()=>{L?.forEach(j=>W.fire(j)),L=null},"flush"),W=new zg({onWillAddFirstListener(){H||(H=O(j=>W.fire(j)),U&&U.add(H))},onDidAddFirstListener(){L&&(N?setTimeout($):$())},onDidRemoveLastListener(){H&&H.dispose(),H=null}});return U&&U.add(W),W.event}a(v,"buffer"),t.buffer=v;function b(O,N){return a((U,L,H)=>{let $=N(new x);return O(function(W){let j=$.evaluate(W);j!==I&&U.call(L,j)},void 0,H)},"fn")}a(b,"chain"),t.chain=b;let I=Symbol("HaltChainable");class x{static{a(this,"ChainableSynthesis")}constructor(){this.steps=[]}map(N){return this.steps.push(N),this}forEach(N){return this.steps.push(F=>(N(F),F)),this}filter(N){return this.steps.push(F=>N(F)?F:I),this}reduce(N,F){let U=F;return this.steps.push(L=>(U=N(U,L),U)),this}latch(N=(F,U)=>F===U){let F=!0,U;return this.steps.push(L=>{let H=F||!N(L,U);return F=!1,U=L,H?L:I}),this}evaluate(N){for(let F of this.steps)if(N=F(N),N===I)break;return N}}function R(O,N,F=U=>U){let U=a((...W)=>$.fire(F(...W)),"fn"),L=a(()=>O.on(N,U),"onFirstListenerAdd"),H=a(()=>O.removeListener(N,U),"onLastListenerRemove"),$=new zg({onWillAddFirstListener:L,onDidRemoveLastListener:H});return $.event}a(R,"fromNodeEventEmitter"),t.fromNodeEventEmitter=R;function w(O,N,F=U=>U){let U=a((...W)=>$.fire(F(...W)),"fn"),L=a(()=>O.addEventListener(N,U),"onFirstListenerAdd"),H=a(()=>O.removeEventListener(N,U),"onLastListenerRemove"),$=new zg({onWillAddFirstListener:L,onDidRemoveLastListener:H});return $.event}a(w,"fromDOMEventEmitter"),t.fromDOMEventEmitter=w;function P(O,N){let F,U,L=new Promise(H=>{U=n(O)(H),qkt(U,N),F=a(()=>{Czr(U,N)},"cancelRef")});return L.cancel=F,N&&L.finally(()=>Czr(U,N)),L}a(P,"toPromise"),t.toPromise=P;function k(O,N){return O(F=>N.fire(F))}a(k,"forward"),t.forward=k;function Q(O,N,F){return N(F),O(U=>N(U))}a(Q,"runAndSubscribe"),t.runAndSubscribe=Q;class M{static{a(this,"EmitterObserver")}constructor(N,F){this._observable=N,this._counter=0,this._hasChanged=!1;let U={onWillAddFirstListener:a(()=>{N.addObserver(this),this._observable.reportChanges()},"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>{N.removeObserver(this)},"onDidRemoveLastListener")};F||e(U),this.emitter=new zg(U),F&&F.add(this.emitter)}beginUpdate(N){this._counter++}handlePossibleChange(N){}handleChange(N,F){this._hasChanged=!0}endUpdate(N){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(O,N){return new M(O,N).emitter.event}a(D,"fromObservable"),t.fromObservable=D;function G(O){return(N,F,U)=>{let L=0,H=!1,$={beginUpdate(){L++},endUpdate(){L--,L===0&&(O.reportChanges(),H&&(H=!1,N.call(F)))},handlePossibleChange(){},handleChange(){H=!0}};O.addObserver($),O.reportChanges();let W={dispose(){O.removeObserver($)}};return qkt(W,U),W}}a(G,"fromObservableLight"),t.fromObservableLight=G})(mQe||(ra.Event=mQe={}));var gQe=class t{static{a(this,"EventProfiling")}static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${t._idPool++}`,t.all.add(this)}start(e){this._stopWatch=new Voo.StopWatch,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};ra.EventProfiling=gQe;var _Ce=-1;function zoo(t){let e=_Ce;return _Ce=t,{dispose(){_Ce=e}}}a(zoo,"setGlobalLeakWarningThreshold");var Nkt=class t{static{a(this,"LeakageMonitor")}static{this._idPool=1}constructor(e,r,n=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,r){let n=this.threshold;if(n<=0||r{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,r=0;for(let[n,o]of this._stacks)(!e||r{e[t]||console.log(r)},3e3)}setParent(e,r){if(e&&e!==dne.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==dne.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}function fne(t){return Ij?.trackDisposable(t),t}a(fne,"trackDisposable");function pne(t){Ij?.markAsDisposed(t)}a(pne,"markAsDisposed");function xj(t,e){Ij?.setParent(t,e)}a(xj,"setParentOfDisposable");function Lao(t,e){if(Ij)for(let r of t)Ij.setParent(r,e)}a(Lao,"setParentOfDisposables");function Fao(t){return Ij?.markAsSingleton(t),t}a(Fao,"markAsSingleton");function AYr(t){return typeof t=="object"&&t!==null&&typeof t.dispose=="function"&&t.dispose.length===0}a(AYr,"isDisposable");function _Ue(t){if(Oao.Iterable.is(t)){let e=[];for(let r of t)if(r)try{r.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}a(_Ue,"dispose");function Uao(t){for(let e of t)AYr(e)&&e.dispose();return[]}a(Uao,"disposeIfDisposable");function Qao(...t){let e=Ykt(()=>_Ue(t));return Lao(t,e),e}a(Qao,"combinedDisposable");var Gkt=class{static{a(this,"FunctionDisposable")}constructor(e){this._isDisposed=!1,this._fn=e,fne(this)}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,pne(this),this._fn()}}};function Ykt(t){return new Gkt(t)}a(Ykt,"toDisposable");var AEe=class t{static{a(this,"DisposableStore")}static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,fne(this)}dispose(){this._isDisposed||(pne(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{_Ue(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===dne.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return xj(e,this),this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.delete(e)&&xj(e,null)}assertNotDisposed(){this._isDisposed&&(0,hYr.onUnexpectedError)(new hYr.BugIndicatingError("Object disposed"))}};Jo.DisposableStore=AEe;var dne=class{static{a(this,"Disposable")}static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new AEe,fne(this),xj(this._store,this)}dispose(){pne(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Jo.Disposable=dne;var yUe=class{static{a(this,"MutableDisposable")}constructor(){this._isDisposed=!1,fne(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&xj(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,pne(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&xj(e,null),e}};Jo.MutableDisposable=yUe;var Hkt=class{static{a(this,"MandatoryMutableDisposable")}constructor(e){this._disposable=new yUe,this._isDisposed=!1,this._disposable.value=e}get value(){return this._disposable.value}set value(e){this._isDisposed||e===this._disposable.value||(this._disposable.value=e)}dispose(){this._isDisposed=!0,this._disposable.dispose()}};Jo.MandatoryMutableDisposable=Hkt;var jkt=class{static{a(this,"RefCountedDisposable")}constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}};Jo.RefCountedDisposable=jkt;var $kt=class{static{a(this,"ReferenceCollection")}constructor(){this.references=new Map}acquire(e,...r){let n=this.references.get(e);n||(n={counter:0,object:this.createReferencedObject(e,...r)},this.references.set(e,n));let{object:o}=n,s=(0,Mao.createSingleCallFunction)(()=>{--n.counter===0&&(this.destroyReferencedObject(e,n.object),this.references.delete(e))});return n.counter++,{object:o,dispose:s}}};Jo.ReferenceCollection=$kt;var Vkt=class{static{a(this,"AsyncReferenceCollection")}constructor(e){this.referenceCollection=e}async acquire(e,...r){let n=this.referenceCollection.acquire(e,...r);try{return{object:await n.object,dispose:a(()=>n.dispose(),"dispose")}}catch(o){throw n.dispose(),o}}};Jo.AsyncReferenceCollection=Vkt;var Wkt=class{static{a(this,"ImmortalReference")}constructor(e){this.object=e}dispose(){}};Jo.ImmortalReference=Wkt;function qao(t){let e=new AEe;try{t(e)}finally{e.dispose()}}a(qao,"disposeOnReturn");var EUe=class{static{a(this,"DisposableMap")}constructor(e=new Map){this._isDisposed=!1,this._store=e,fne(this)}dispose(){pne(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{_Ue(this._store.values())}finally{this._store.clear()}}has(e){return this._store.has(e)}get size(){return this._store.size}get(e){return this._store.get(e)}set(e,r,n=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||this._store.get(e)?.dispose(),this._store.set(e,r),xj(r,this)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}deleteAndLeak(e){let r=this._store.get(e);return r&&xj(r,null),this._store.delete(e),r}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}};Jo.DisposableMap=EUe;function Gao(t,e){let r=!1;return t.then(n=>{r||e(n)}),Ykt(()=>{r=!0})}a(Gao,"thenIfNotDisposed");function Hao(t,e){return t.then(r=>(e.isDisposed?r.dispose():e.add(r),r))}a(Hao,"thenRegisterOrDispose");var zkt=class extends EUe{static{a(this,"DisposableResourceMap")}constructor(){super(new mYr.ResourceMap)}};Jo.DisposableResourceMap=zkt});var hne=T(CUe=>{"use strict";f();Object.defineProperty(CUe,"__esModule",{value:!0});CUe.LinkedList=void 0;var il=class t{static{a(this,"Node")}static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},Kkt=class{static{a(this,"LinkedList")}constructor(){this._first=il.Undefined,this._last=il.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===il.Undefined}clear(){let e=this._first;for(;e!==il.Undefined;){let r=e.next;e.prev=il.Undefined,e.next=il.Undefined,e=r}this._first=il.Undefined,this._last=il.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let n=new il(e);if(this._first===il.Undefined)this._first=n,this._last=n;else if(r){let s=this._last;this._last=n,n.prev=s,s.next=n}else{let s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(n))}}shift(){if(this._first!==il.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==il.Undefined){let e=this._last.element;return this._remove(this._last),e}}peek(){if(this._last!==il.Undefined)return this._last.element}_remove(e){if(e.prev!==il.Undefined&&e.next!==il.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===il.Undefined&&e.next===il.Undefined?(this._first=il.Undefined,this._last=il.Undefined):e.next===il.Undefined?(this._last=this._last.prev,this._last.next=il.Undefined):e.prev===il.Undefined&&(this._first=this._first.next,this._first.prev=il.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==il.Undefined;)yield e.element,e=e.next}};CUe.LinkedList=Kkt});var ck=T(vUe=>{"use strict";f();Object.defineProperty(vUe,"__esModule",{value:!0});vUe.StopWatch=void 0;var jao=globalThis.performance.now.bind(globalThis.performance),Jkt=class t{static{a(this,"StopWatch")}static create(e){return new t(e)}constructor(e){this._now=e===!1?Date.now:jao,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};vUe.StopWatch=Jkt});var Xa=T(Ks=>{"use strict";f();Object.defineProperty(Ks,"__esModule",{value:!0});Ks.ValueWithChangeEvent=Ks.Relay=Ks.EventBufferer=Ks.DynamicListEventMultiplexer=Ks.EventMultiplexer=Ks.MicrotaskEmitter=Ks.DebounceEmitter=Ks.PauseableEmitter=Ks.AsyncEmitter=Ks.createEventDeliveryQueue=Ks.Emitter=Ks.ListenerRefusalError=Ks.ListenerLeakError=Ks.EventProfiling=Ks.Event=void 0;Ks.setGlobalLeakWarningThreshold=Yao;Ks.trackSetChanges=Zao;var $ao=Ikt(),yEe=Ko(),Vao=wkt(),z1=ro(),_Yr=hne(),Wao=ck(),yYr=!1,zao=!1,bUe;(function(t){t.None=()=>z1.Disposable.None;function e(O){if(zao){let{onDidAddListener:D}=O,F=_Ee.create(),U=0;O.onDidAddListener=()=>{++U===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),F.print()),D?.()}}}a(e,"_addLeakageTraceLogic");function r(O,D,F){return g(O,()=>{},0,void 0,D??!0,void 0,F)}a(r,"defer"),t.defer=r;function n(O){return(D,F=null,U)=>{let L=!1,H;return H=O($=>{if(!L)return H?H.dispose():L=!0,D.call(F,$)},null,U),L&&H.dispose(),H}}a(n,"once"),t.once=n;function o(O,D){return t.once(t.filter(O,D))}a(o,"onceIf"),t.onceIf=o;function s(O,D,F){return h((U,L=null,H)=>O($=>U.call(L,D($)),null,H),F)}a(s,"map"),t.map=s;function c(O,D,F){return h((U,L=null,H)=>O($=>{D($),U.call(L,$)},null,H),F)}a(c,"forEach"),t.forEach=c;function l(O,D,F){return h((U,L=null,H)=>O($=>D($)&&U.call(L,$),null,H),F)}a(l,"filter"),t.filter=l;function u(O){return O}a(u,"signal"),t.signal=u;function d(...O){return(D,F=null,U)=>{let L=(0,z1.combinedDisposable)(...O.map(H=>H($=>D.call(F,$))));return m(L,U)}}a(d,"any"),t.any=d;function p(O,D,F,U){let L=F;return s(O,H=>(L=D(L,H),L),U)}a(p,"reduce"),t.reduce=p;function h(O,D){let F,U={onWillAddFirstListener(){F=O(L.fire,L)},onDidRemoveLastListener(){F?.dispose()}};D||e(U);let L=new Qg(U);return D?.add(L),L.event}a(h,"snapshot");function m(O,D){return D instanceof Array?D.push(O):D&&D.add(O),O}a(m,"addAndReturnDisposable");function g(O,D,F=100,U=!1,L=!1,H,$){let W,j,ce,J=0,Te,fe={leakWarningThreshold:H,onWillAddFirstListener(){W=O(Ve=>{J++,j=D(j,Ve),U&&!ce&&(Ne.fire(j),j=void 0),Te=a(()=>{let Ue=j;j=void 0,ce=void 0,(!U||J>1)&&Ne.fire(Ue),J=0},"doFire"),typeof F=="number"?(ce&&clearTimeout(ce),ce=setTimeout(Te,F)):ce===void 0&&(ce=null,queueMicrotask(Te))})},onWillRemoveListener(){L&&J>0&&Te?.()},onDidRemoveLastListener(){Te=void 0,W.dispose()}};$||e(fe);let Ne=new Qg(fe);return $?.add(Ne),Ne.event}a(g,"debounce"),t.debounce=g;function A(O,D=0,F,U){return t.debounce(O,(L,H)=>L?(L.push(H),L):[H],D,void 0,F??!0,void 0,U)}a(A,"accumulate"),t.accumulate=A;function y(O,D,F=100,U=!0,L=!0,H,$){let W,j,ce,J=0,Te={leakWarningThreshold:H,onWillAddFirstListener(){W=O(Ne=>{J++,j=D(j,Ne),ce===void 0&&(U&&(fe.fire(j),j=void 0,J=0),typeof F=="number"?ce=setTimeout(()=>{L&&J>0&&fe.fire(j),j=void 0,ce=void 0,J=0},F):(ce=0,queueMicrotask(()=>{L&&J>0&&fe.fire(j),j=void 0,ce=void 0,J=0})))})},onDidRemoveLastListener(){W.dispose()}};$||e(Te);let fe=new Qg(Te);return $?.add(fe),fe.event}a(y,"throttle"),t.throttle=y;function E(O,D=(U,L)=>U===L,F){let U=!0,L;return l(O,H=>{let $=U||!D(H,L);return U=!1,L=H,$},F)}a(E,"latch"),t.latch=E;function _(O,D,F){return[t.filter(O,D,F),t.filter(O,U=>!D(U),F)]}a(_,"split"),t.split=_;function v(O,D=!1,F=[],U){let L=F.slice(),H=O(j=>{L?L.push(j):W.fire(j)});U&&U.add(H);let $=a(()=>{L?.forEach(j=>W.fire(j)),L=null},"flush"),W=new Qg({onWillAddFirstListener(){H||(H=O(j=>W.fire(j)),U&&U.add(H))},onDidAddFirstListener(){L&&(D?setTimeout($):$())},onDidRemoveLastListener(){H&&H.dispose(),H=null}});return U&&U.add(W),W.event}a(v,"buffer"),t.buffer=v;function b(O,D){return a((U,L,H)=>{let $=D(new x);return O(function(W){let j=$.evaluate(W);j!==I&&U.call(L,j)},void 0,H)},"fn")}a(b,"chain"),t.chain=b;let I=Symbol("HaltChainable");class x{static{a(this,"ChainableSynthesis")}constructor(){this.steps=[]}map(D){return this.steps.push(D),this}forEach(D){return this.steps.push(F=>(D(F),F)),this}filter(D){return this.steps.push(F=>D(F)?F:I),this}reduce(D,F){let U=F;return this.steps.push(L=>(U=D(U,L),U)),this}latch(D=(F,U)=>F===U){let F=!0,U;return this.steps.push(L=>{let H=F||!D(L,U);return F=!1,U=L,H?L:I}),this}evaluate(D){for(let F of this.steps)if(D=F(D),D===I)break;return D}}function w(O,D,F=U=>U){let U=a((...W)=>$.fire(F(...W)),"fn"),L=a(()=>O.on(D,U),"onFirstListenerAdd"),H=a(()=>O.removeListener(D,U),"onLastListenerRemove"),$=new Qg({onWillAddFirstListener:L,onDidRemoveLastListener:H});return $.event}a(w,"fromNodeEventEmitter"),t.fromNodeEventEmitter=w;function R(O,D,F=U=>U){let U=a((...W)=>$.fire(F(...W)),"fn"),L=a(()=>O.addEventListener(D,U),"onFirstListenerAdd"),H=a(()=>O.removeEventListener(D,U),"onLastListenerRemove"),$=new Qg({onWillAddFirstListener:L,onDidRemoveLastListener:H});return $.event}a(R,"fromDOMEventEmitter"),t.fromDOMEventEmitter=R;function P(O,D){let F,U,L=new Promise(H=>{U=n(O)(H),a5t(U,D),F=a(()=>{EYr(U,D)},"cancelRef")});return L.cancel=F,D&&L.finally(()=>EYr(U,D)),L}a(P,"toPromise"),t.toPromise=P;function k(O,D){return O(F=>D.fire(F))}a(k,"forward"),t.forward=k;function Q(O,D,F){return D(F),O(U=>D(U))}a(Q,"runAndSubscribe"),t.runAndSubscribe=Q;class M{static{a(this,"EmitterObserver")}constructor(D,F){this._observable=D,this._counter=0,this._hasChanged=!1;let U={onWillAddFirstListener:a(()=>{D.addObserver(this),this._observable.reportChanges()},"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>{D.removeObserver(this)},"onDidRemoveLastListener")};F||e(U),this.emitter=new Qg(U),F&&F.add(this.emitter)}beginUpdate(D){this._counter++}handlePossibleChange(D){}handleChange(D,F){this._hasChanged=!0}endUpdate(D){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function N(O,D){return new M(O,D).emitter.event}a(N,"fromObservable"),t.fromObservable=N;function G(O){return(D,F,U)=>{let L=0,H=!1,$={beginUpdate(){L++},endUpdate(){L--,L===0&&(O.reportChanges(),H&&(H=!1,D.call(F)))},handlePossibleChange(){},handleChange(){H=!0}};O.addObserver($),O.reportChanges();let W={dispose(){O.removeObserver($)}};return a5t(W,U),W}}a(G,"fromObservableLight"),t.fromObservableLight=G})(bUe||(Ks.Event=bUe={}));var TUe=class t{static{a(this,"EventProfiling")}static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${t._idPool++}`,t.all.add(this)}start(e){this._stopWatch=new Wao.StopWatch,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};Ks.EventProfiling=TUe;var EEe=-1;function Yao(t){let e=EEe;return EEe=t,{dispose(){EEe=e}}}a(Yao,"setGlobalLeakWarningThreshold");var Xkt=class t{static{a(this,"LeakageMonitor")}static{this._idPool=1}constructor(e,r,n=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,r){let n=this.threshold;if(n<=0||r{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,r=0;for(let[n,o]of this._stacks)(!e||r{if(t instanceof rie)e(t);else for(let r=0;r0||this._options?.leakWarningThreshold?new Nkt(e?.onListenerError??CCe.onUnexpectedError,this._options?.leakWarningThreshold??_Ce):void 0,this._perfMon=this._options?._profName?new gQe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Ezr){let e=this._listeners;queueMicrotask(()=>{vzr(e,r=>r.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,r,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let d=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],p=new yQe(`${u}. HINT: Stack shows most frequent listener (${d[1]}-times)`,d[0]);return(this._options?.onListenerError||CCe.onUnexpectedError)(p),av.Disposable.None}if(this._disposed)return av.Disposable.None;r&&(e=e.bind(r));let o=new rie(e),s,c;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=vCe.create(),s=this._leakageMon.check(o.stack,this._size+1)),Ezr&&(o.stack=c??vCe.create()),this._listeners?this._listeners instanceof rie?(this._deliveryQueue??=new EQe,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let l=(0,av.toDisposable)(()=>{s?.(),this._removeListener(o)});return qkt(l,n),l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let r=this._listeners,n=r.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*Koo<=r.length){let s=0;for(let c=0;c0}};ra.Emitter=zg;var Joo=a(()=>new EQe,"createEventDeliveryQueue");ra.createEventDeliveryQueue=Joo;var EQe=class{static{a(this,"EventDeliveryQueuePrivate")}constructor(){this.i=-1,this.end=0}enqueue(e,r,n){this.i=0,this.end=n,this.current=e,this.value=r}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Dkt=class extends zg{static{a(this,"AsyncEmitter")}async fireAsync(e,r,n){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new _zr.LinkedList),vzr(this._listeners,o=>this._asyncDeliveryQueue.push([o.value,e]));this._asyncDeliveryQueue.size>0&&!r.isCancellationRequested;){let[o,s]=this._asyncDeliveryQueue.shift(),c=[],l={...s,token:r,waitUntil:a(u=>{if(Object.isFrozen(c))throw new Error("waitUntil can NOT be called asynchronous");n&&(u=n(u,o)),c.push(u)},"waitUntil")};try{o(l)}catch(u){(0,CCe.onUnexpectedError)(u);continue}Object.freeze(c),await Promise.allSettled(c).then(u=>{for(let d of u)d.status==="rejected"&&(0,CCe.onUnexpectedError)(d.reason)})}}};ra.AsyncEmitter=Dkt;var CQe=class extends zg{static{a(this,"PauseableEmitter")}get isPaused(){return this._isPaused!==0}constructor(e){super(e),this._isPaused=0,this._eventQueue=new _zr.LinkedList,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}};ra.PauseableEmitter=CQe;var Mkt=class extends CQe{static{a(this,"DebounceEmitter")}constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}};ra.DebounceEmitter=Mkt;var Okt=class extends zg{static{a(this,"MicrotaskEmitter")}constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(r=>super.fire(r)),this._queuedEvents=[]}))}};ra.MicrotaskEmitter=Okt;var _Qe=class{static{a(this,"EventMultiplexer")}constructor(){this.hasListeners=!1,this.events=[],this.emitter=new zg({onWillAddFirstListener:a(()=>this.onFirstListenerAdd(),"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>this.onLastListenerRemove(),"onDidRemoveLastListener")})}get event(){return this.emitter.event}add(e){let r={event:e,listener:null};this.events.push(r),this.hasListeners&&this.hook(r);let n=a(()=>{this.hasListeners&&this.unhook(r);let o=this.events.indexOf(r);this.events.splice(o,1)},"dispose");return(0,av.toDisposable)((0,$oo.createSingleCallFunction)(n))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(r=>this.emitter.fire(r))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}};ra.EventMultiplexer=_Qe;var Bkt=class{static{a(this,"DynamicListEventMultiplexer")}constructor(e,r,n,o){this._store=new av.DisposableStore;let s=this._store.add(new _Qe),c=this._store.add(new av.DisposableMap);function l(u){c.set(u,s.add(o(u)))}a(l,"addItem");for(let u of e)l(u);this._store.add(r(u=>{l(u)})),this._store.add(n(u=>{c.deleteAndDispose(u)})),this.event=s.event}dispose(){this._store.dispose()}};ra.DynamicListEventMultiplexer=Bkt;var Lkt=class{static{a(this,"EventBufferer")}constructor(){this.data=[]}wrapEvent(e,r,n){return(o,s,c)=>e(l=>{let u=this.data[this.data.length-1];if(!r){u?u.buffers.push(()=>o.call(s,l)):o.call(s,l);return}let d=u;if(!d){o.call(s,r(n,l));return}d.items??=[],d.items.push(l),d.buffers.length===0&&u.buffers.push(()=>{d.reducedResult??=n?d.items.reduce(r,n):d.items.reduce(r),o.call(s,d.reducedResult)})},void 0,c)}bufferEvents(e){let r={buffers:new Array};this.data.push(r);let n=e();return this.data.pop(),r.buffers.forEach(o=>o()),n}};ra.EventBufferer=Lkt;var Fkt=class{static{a(this,"Relay")}constructor(){this.listening=!1,this.inputEvent=mQe.None,this.inputEventListener=av.Disposable.None,this.emitter=new zg({onDidAddFirstListener:a(()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},"onDidAddFirstListener"),onDidRemoveLastListener:a(()=>{this.listening=!1,this.inputEventListener.dispose()},"onDidRemoveLastListener")}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}};ra.Relay=Fkt;var Ukt=class{static{a(this,"ValueWithChangeEvent")}static const(e){return new Qkt(e)}constructor(e){this._value=e,this._onDidChange=new zg,this.onDidChange=this._onDidChange.event}get value(){return this._value}set value(e){e!==this._value&&(this._value=e,this._onDidChange.fire(void 0))}};ra.ValueWithChangeEvent=Ukt;var Qkt=class{static{a(this,"ConstValueWithChangeEvent")}constructor(e){this.value=e,this.onDidChange=mQe.None}};function Xoo(t,e,r){let n=new av.DisposableMap,o=new Set(t());for(let c of o)n.set(c,r(c));let s=new av.DisposableStore;return s.add(e(()=>{let c=t(),l=(0,joo.diffSets)(o,c);for(let u of l.removed)n.deleteAndDispose(u);for(let u of l.added)n.set(u,r(u));o=new Set(c)})),s.add(n),s}a(Xoo,"trackSetChanges");function qkt(t,e){e instanceof av.DisposableStore?e.add(t):Array.isArray(e)&&e.push(t)}a(qkt,"addToDisposables");function Czr(t,e){if(e instanceof av.DisposableStore)e.delete(t);else if(Array.isArray(e)){let r=e.indexOf(t);r!==-1&&e.splice(r,1)}t.dispose()}a(Czr,"disposeAndRemove")});var _O=T(CO=>{"use strict";f();Object.defineProperty(CO,"__esModule",{value:!0});CO.CancellationTokenPool=CO.CancellationTokenSource=CO.CancellationToken=void 0;CO.cancelOnDispose=eso;var bzr=nc(),Zoo=so(),Tzr=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),vQe;(function(t){function e(r){return r===t.None||r===t.Cancelled||r instanceof nie?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}a(e,"isCancellationToken"),t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:bzr.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Tzr})})(vQe||(CO.CancellationToken=vQe={}));var nie=class{static{a(this,"MutableToken")}constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Tzr:(this._emitter||(this._emitter=new bzr.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},bCe=class{static{a(this,"CancellationTokenSource")}constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new nie),this._token}cancel(){this._token?this._token instanceof nie&&this._token.cancel():this._token=vQe.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof nie&&this._token.dispose():this._token=vQe.None}};CO.CancellationTokenSource=bCe;function eso(t){let e=new bCe;return t.add({dispose(){e.cancel()}}),e.token}a(eso,"cancelOnDispose");var Gkt=class{static{a(this,"CancellationTokenPool")}constructor(){this._source=new bCe,this._listeners=new Zoo.DisposableStore,this._total=0,this._cancelled=0,this._isDone=!1}get token(){return this._source.token}add(e){if(this._isDone)return;if(this._total++,e.isCancellationRequested){this._cancelled++,this._check();return}let r=e.onCancellationRequested(()=>{r.dispose(),this._cancelled++,this._check()});this._listeners.add(r)}_check(){!this._isDone&&this._total>0&&this._total===this._cancelled&&(this._isDone=!0,this._listeners.dispose(),this._source.cancel())}dispose(){this._listeners.dispose(),this._source.dispose()}};CO.CancellationTokenPool=Gkt});var wzr=T(iie=>{"use strict";f();Object.defineProperty(iie,"__esModule",{value:!0});iie.getNLSMessages=Szr;iie.getNLSLanguage=Izr;iie.localize=rso;iie.localize2=nso;function Szr(){return globalThis._VSCODE_NLS_MESSAGES}a(Szr,"getNLSMessages");function Izr(){return globalThis._VSCODE_NLS_LANGUAGE}a(Izr,"getNLSLanguage");var tso=Izr()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function bQe(t,e){let r;return e.length===0?r=t:r=t.replace(/\{(\d+)\}/g,(n,o)=>{let s=o[0],c=e[s],l=n;return typeof c=="string"?l=c:(typeof c=="number"||typeof c=="boolean"||c===void 0||c===null)&&(l=String(c)),l}),tso&&(r="\uFF3B"+r.replace(/[aouei]/g,"$&$&")+"\uFF3D"),r}a(bQe,"_format");function rso(t,e,...r){return bQe(typeof t=="number"?xzr(t,e):e,r)}a(rso,"localize");function xzr(t,e){let r=Szr()?.[t];if(typeof r!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return r}a(xzr,"lookupMessage");function nso(t,e,...r){let n;typeof t=="number"?n=xzr(t,e):n=e;let o=bQe(n,r);return{value:o,original:e===n?o:bQe(e,r)}}a(nso,"localize2")});var PF=T(tr=>{"use strict";f();var iso=tr&&tr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oso=tr&&tr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sso=tr&&tr.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=0,xCe=vO.indexOf("Macintosh")>=0,$kt=(vO.indexOf("Macintosh")>=0||vO.indexOf("iPad")>=0||vO.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,SCe=vO.indexOf("Linux")>=0,Bzr=vO?.indexOf("Mobi")>=0,jkt=!0,TQe=aso.getNLSLanguage()||tr.LANGUAGE_DEFAULT,TCe=navigator.language.toLowerCase(),Hkt=TCe):console.error("Unable to resolve platform.");function lso(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}a(lso,"PlatformToString");var SQe=0;xCe?SQe=1:ICe?SQe=3:SCe&&(SQe=2);tr.isWindows=ICe;tr.isMacintosh=xCe;tr.isLinux=SCe;tr.isLinuxSnap=Nzr;tr.isNative=Dzr;tr.isElectron=Mzr;tr.isWeb=jkt;tr.isWebWorker=jkt&&typeof bO.importScripts=="function";tr.webWorkerOrigin=tr.isWebWorker?bO.origin:void 0;tr.isIOS=$kt;tr.isMobile=Bzr;tr.isCI=Ozr;tr.platform=SQe;tr.userAgent=vO;tr.language=TQe;var Rzr;(function(t){function e(){return tr.language}a(e,"value"),t.value=e;function r(){return tr.language.length===2?tr.language==="en":tr.language.length>=3?tr.language[0]==="e"&&tr.language[1]==="n"&&tr.language[2]==="-":!1}a(r,"isDefaultVariant"),t.isDefaultVariant=r;function n(){return tr.language==="en"}a(n,"isDefault"),t.isDefault=n})(Rzr||(tr.Language=Rzr={}));tr.locale=TCe;tr.platformLocale=Hkt;tr.translationsConfigFile=Lzr;tr.setTimeout0IsFaster=typeof bO.postMessage=="function"&&!bO.importScripts;tr.setTimeout0=(()=>{if(tr.setTimeout0IsFaster){let t=[];bO.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),bO.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();tr.OS=xCe||$kt?2:ICe?1:3;var Pzr=!0,kzr=!1;function uso(){if(!kzr){kzr=!0;let t=new Uint8Array(2);t[0]=1,t[1]=2,Pzr=new Uint16Array(t.buffer)[0]===513}return Pzr}a(uso,"isLittleEndian");tr.isChrome=!!(tr.userAgent&&tr.userAgent.indexOf("Chrome")>=0);tr.isFirefox=!!(tr.userAgent&&tr.userAgent.indexOf("Firefox")>=0);tr.isSafari=!!(!tr.isChrome&&tr.userAgent&&tr.userAgent.indexOf("Safari")>=0);tr.isEdge=!!(tr.userAgent&&tr.userAgent.indexOf("Edg/")>=0);tr.isAndroid=!!(tr.userAgent&&tr.userAgent.indexOf("Android")>=0);function dso(t){return parseFloat(t)>=25}a(dso,"isTahoeOrNewer")});var IQe=T(_k=>{"use strict";f();Object.defineProperty(_k,"__esModule",{value:!0});_k.arch=_k.platform=_k.env=_k.cwd=void 0;var Uzr=PF(),_$,Vkt=globalThis.vscode;if(typeof Vkt<"u"&&typeof Vkt.process<"u"){let t=Vkt.process;_$={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?_$={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:_$={get platform(){return Uzr.isWindows?"win32":Uzr.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};_k.cwd=_$.cwd;_k.env=_$.env;_k.platform=_$.platform;_k.arch=_$.arch});var Im=T(Or=>{"use strict";f();var fso=Or&&Or.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pso=Or&&Or.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hso=Or&&Or.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=mso&&t<=Aso||t>=gso&&t<=yso}a(SO,"isWindowsDeviceRoot");function wQe(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===v$&&l!==-1?++l:l=-1}return o}a(wQe,"normalizeString");function _so(t){return t?`${t[0]==="."?"":"."}${t}`:""}a(_so,"formatExt");function Qzr(t,e){Cso(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${_so(e.ext)}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(Qzr,"_format");Or.win32={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],Ud(s,`paths[${o}]`),s.length===0)continue}else e.length===0?s=oie.cwd():(s=oie.env[`=${e}`]||oie.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===fC)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)go(p)&&(l=1,d=!0);else if(go(p))if(d=!0,go(s.charCodeAt(1))){let h=2,m=h;for(;h2&&go(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=wQe(r,!n,"\\",go),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){Ud(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return Wkt(s)?"\\":t;if(go(s))if(o=!0,go(t.charCodeAt(1))){let l=2,u=l;for(;l2&&go(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&go(t.charCodeAt(e-1))&&(c+="\\"),!o&&n===void 0&&t.includes(":")){if(c.length>=2&&SO(c.charCodeAt(0))&&c.charCodeAt(1)===TO)return`.\\${c}`;let l=t.indexOf(":");do if(l===e-1||go(t.charCodeAt(l+1)))return`.\\${c}`;while((l=t.indexOf(":",l+1))!==-1)}return n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){Ud(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return go(r)||e>2&&SO(r)&&t.charCodeAt(1)===TO&&go(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&go(r.charCodeAt(0))){++o;let s=r.length;s>1&&go(r.charCodeAt(1))&&(++o,s>2&&(go(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return Or.win32.normalize(e)},relative(t,e){if(Ud(t,"from"),Ud(e,"to"),t===e)return"";let r=Or.win32.resolve(t),n=Or.win32.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";if(r.length!==t.length||n.length!==e.length){let A=r.split("\\"),y=n.split("\\");A[A.length-1]===""&&A.pop(),y[y.length-1]===""&&y.pop();let E=A.length,_=y.length,v=E<_?E:_,b;for(b=0;bv?y.slice(b).join("\\"):E>v?"..\\".repeat(E-1-b)+"..":"":"..\\".repeat(E-b)+y.slice(b).join("\\")}let o=0;for(;oo&&t.charCodeAt(s-1)===fC;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===fC;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===fC)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===fC?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===fC)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===fC&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=Or.win32.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===fC){if(e.charCodeAt(1)===fC){let r=e.charCodeAt(2);if(r!==Eso&&r!==v$)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(SO(e.charCodeAt(0))&&e.charCodeAt(1)===TO&&e.charCodeAt(2)===fC)return`\\\\?\\${e}`;return e},dirname(t){Ud(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return go(o)?t:".";if(go(o)){if(r=n=1,go(t.charCodeAt(1))){let l=2,u=l;for(;l2&&go(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(go(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&Ud(e,"suffix"),Ud(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&SO(t.charCodeAt(0))&&t.charCodeAt(1)===TO&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(go(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(go(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Ud(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===TO&&SO(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(go(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===v$?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:Qzr.bind(null,"\\"),parse(t){Ud(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return go(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(go(o)){if(n=1,go(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),go(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===v$?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null};var vso=(()=>{if(pC){let t=/\\/g;return()=>{let e=oie.cwd().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>oie.cwd()})();Or.posix={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=0&&!r;n--){let o=t[n];Ud(o,`paths[${n}]`),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===Ch)}if(!r){let n=vso();e=`${n}/${e}`,r=n.charCodeAt(0)===Ch}return e=wQe(e,!r,"/",Wkt),r?`/${e}`:e.length>0?e:"."},normalize(t){if(Ud(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Ch,r=t.charCodeAt(t.length-1)===Ch;return t=wQe(t,!e,"/",Wkt),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Ud(t,"path"),t.length>0&&t.charCodeAt(0)===Ch},join(...t){if(t.length===0)return".";let e=[];for(let r=0;r0&&e.push(n)}return e.length===0?".":Or.posix.normalize(e.join("/"))},relative(t,e){if(Ud(t,"from"),Ud(e,"to"),t===e||(t=Or.posix.resolve(t),e=Or.posix.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===Ch)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===Ch?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===Ch)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(Ud(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Ch,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===Ch){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&Ud(e,"suffix"),Ud(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===Ch){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===Ch){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Ud(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t[c];if(l==="/"){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l==="."?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:Qzr.bind(null,"/"),parse(t){Ud(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===Ch,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===Ch){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===v$?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Or.posix.win32=Or.win32.win32=Or.win32;Or.posix.posix=Or.win32.posix=Or.posix;Or.normalize=pC?Or.win32.normalize:Or.posix.normalize;Or.isAbsolute=pC?Or.win32.isAbsolute:Or.posix.isAbsolute;Or.join=pC?Or.win32.join:Or.posix.join;Or.resolve=pC?Or.win32.resolve:Or.posix.resolve;Or.relative=pC?Or.win32.relative:Or.posix.relative;Or.dirname=pC?Or.win32.dirname:Or.posix.dirname;Or.basename=pC?Or.win32.basename:Or.posix.basename;Or.extname=pC?Or.win32.extname:Or.posix.extname;Or.format=pC?Or.win32.format:Or.posix.format;Or.parse=pC?Or.win32.parse:Or.posix.parse;Or.toNamespacedPath=pC?Or.win32.toNamespacedPath:Or.posix.toNamespacedPath;Or.sep=pC?Or.win32.sep:Or.posix.sep;Or.delimiter=pC?Or.win32.delimiter:Or.posix.delimiter});var PQe=T(ow=>{"use strict";f();Object.defineProperty(ow,"__esModule",{value:!0});ow.WeakCachedFunction=ow.CachedFunction=ow.LRUCachedFunction=ow.Cache=void 0;ow.identity=RQe;var bso=_O(),zkt=class{static{a(this,"Cache")}constructor(e){this.task=e,this.result=null}get(){if(this.result)return this.result;let e=new bso.CancellationTokenSource,r=this.task(e.token);return this.result={promise:r,dispose:a(()=>{this.result=null,e.cancel(),e.dispose()},"dispose")},this.result}};ow.Cache=zkt;function RQe(t){return t}a(RQe,"identity");var Ykt=class{static{a(this,"LRUCachedFunction")}constructor(e,r){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=RQe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);return this.lastArgKey!==r&&(this.lastArgKey=r,this.lastCache=this._fn(e)),this.lastCache}};ow.LRUCachedFunction=Ykt;var Kkt=class{static{a(this,"CachedFunction")}get cachedValues(){return this._map}constructor(e,r){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=RQe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);if(this._map2.has(r))return this._map2.get(r);let n=this._fn(e);return this._map.set(e,n),this._map2.set(r,n),n}};ow.CachedFunction=Kkt;var Jkt=class{static{a(this,"WeakCachedFunction")}constructor(e,r){this._map=new WeakMap,typeof e=="function"?(this._fn=e,this._computeKey=RQe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);if(this._map.has(r))return this._map.get(r);let n=this._fn(e);return this._map.set(r,n),n}};ow.WeakCachedFunction=Jkt});var IO=T(kQe=>{"use strict";f();Object.defineProperty(kQe,"__esModule",{value:!0});kQe.Lazy=void 0;var kF;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(kF||(kF={}));var Xkt=class{static{a(this,"Lazy")}constructor(e){this.executor=e,this._state=kF.Uninitialized}get hasValue(){return this._state===kF.Completed}get value(){if(this._state===kF.Uninitialized){this._state=kF.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=kF.Completed}}else if(this._state===kF.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};kQe.Lazy=Xkt});var C0=T(pr=>{"use strict";f();Object.defineProperty(pr,"__esModule",{value:!0});pr.Ellipsis=pr.InvisibleCharacters=pr.AmbiguousCharacters=pr.noBreakWhitespace=pr.UTF8_BOM_CHARACTER=pr.UNUSUAL_LINE_TERMINATORS=pr.GraphemeIterator=pr.CodePointIterator=void 0;pr.isFalsyOrWhitespace=Sso;pr.format=xso;pr.format2=Rso;pr.htmlAttributeEncodeValue=Pso;pr.escape=kso;pr.escapeRegExpCharacters=Hzr;pr.count=Nso;pr.truncate=Dso;pr.truncateMiddle=Mso;pr.trim=Oso;pr.ltrim=jzr;pr.rtrim=$zr;pr.convertSimple2RegExpPattern=Bso;pr.createRegExp=Lso;pr.regExpLeadsToEndlessLoop=Fso;pr.joinStrings=Uso;pr.splitLines=Qso;pr.splitLinesIncludeSeparators=qso;pr.indexOfPattern=Gso;pr.firstNonWhitespaceIndex=Vzr;pr.getLeadingWhitespace=Hso;pr.lastNonWhitespaceIndex=jso;pr.getIndentationLength=$so;pr.replaceAsync=Vso;pr.compare=Wso;pr.compareSubstring=Wzr;pr.compareIgnoreCase=zso;pr.compareSubstringIgnoreCase=RCe;pr.isAsciiDigit=Yso;pr.isLowerAsciiLetter=eNt;pr.isUpperAsciiLetter=Kso;pr.equalsIgnoreCase=zzr;pr.equals=Jso;pr.startsWithIgnoreCase=Xso;pr.endsWithIgnoreCase=Zso;pr.commonPrefixLength=eao;pr.commonSuffixLength=tao;pr.isHighSurrogate=nNt;pr.isLowSurrogate=NQe;pr.computeCodePoint=iNt;pr.getNextCodePoint=Yzr;pr.nextCharLength=Kzr;pr.prevCharLength=Jzr;pr.getCharContainingOffset=nao;pr.charCount=iao;pr.containsRTL=sao;pr.isBasicASCII=cao;pr.containsUnusualLineTerminators=lao;pr.isFullWidthCharacter=uao;pr.isEmojiImprecise=Xzr;pr.lcut=dao;pr.rcut=fao;pr.forAnsiStringParts=gao;pr.removeAnsiEscapeCodes=eYr;pr.removeAnsiEscapeCodesFromPrompt=yao;pr.startsWithUTF8BOM=tYr;pr.stripUTF8BOM=Eao;pr.fuzzyContains=Cao;pr.containsUppercaseCharacter=_ao;pr.uppercaseFirstLetter=vao;pr.getNLines=bao;pr.singleLetterHash=Tao;pr.getGraphemeBreakType=Sao;pr.getLeftDeleteOffset=xao;pr.multibyteAwareBtoa=kao;var Tso=PQe(),qzr=IO();function Sso(t){return!t||typeof t!="string"?!0:t.trim().length===0}a(Sso,"isFalsyOrWhitespace");var Iso=/{(\d+)}/g;function xso(t,...e){return e.length===0?t:t.replace(Iso,function(r,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=e.length?r:e[o]})}a(xso,"format");var wso=/{([^}]+)}/g;function Rso(t,e){return Object.keys(e).length===0?t:t.replace(wso,(r,n)=>e[n]??r)}a(Rso,"format2");function Pso(t){return t.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}a(Pso,"htmlAttributeEncodeValue");function kso(t){return t.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}a(kso,"escape");function Hzr(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}a(Hzr,"escapeRegExpCharacters");function Nso(t,e){let r=0,n=t.indexOf(e);for(;n!==-1;)r++,n=t.indexOf(e,n+e.length);return r}a(Nso,"count");function Dso(t,e,r=pr.Ellipsis){return t.length<=e?t:`${t.substr(0,e)}${r}`}a(Dso,"truncate");function Mso(t,e,r=pr.Ellipsis){if(t.length<=e)return t;let n=Math.ceil(e/2)-r.length/2,o=Math.floor(e/2)-r.length/2;return`${t.substr(0,n)}${r}${t.substr(t.length-o)}`}a(Mso,"truncateMiddle");function Oso(t,e=" "){let r=jzr(t,e);return $zr(r,e)}a(Oso,"trim");function jzr(t,e){if(!t||!e)return t;let r=e.length,n=0;if(r===1){let o=e.charCodeAt(0);for(;n0&&t.charCodeAt(s-1)===c;)s--;return t.substring(0,s)}let o=n;for(;o>0&&t.endsWith(e,o);)o-=r;return t.substring(0,o)}a($zr,"rtrim");function Bso(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}a(Bso,"convertSimple2RegExpPattern");function Lso(t,e,r={}){if(!t)throw new Error("Cannot create regex from empty string");e||(t=Hzr(t)),r.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"));let n="";return r.global&&(n+="g"),r.matchCase||(n+="i"),r.multiline&&(n+="m"),r.unicode&&(n+="u"),new RegExp(t,n)}a(Lso,"createRegExp");function Fso(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}a(Fso,"regExpLeadsToEndlessLoop");function Uso(t,e){return t.filter(r=>r!=null&&r!==!1).join(e)}a(Uso,"joinStrings");function Qso(t){return t.split(/\r\n|\r|\n/)}a(Qso,"splitLines");function qso(t){let e=[],r=t.split(/(\r\n|\r|\n)/);for(let n=0;n=0;r--){let n=t.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}a(jso,"lastNonWhitespaceIndex");function $so(t){let e=Vzr(t);return e===-1?t.length:e}a($so,"getIndentationLength");function Vso(t,e,r){let n=[],o=0;for(let s of t.matchAll(e)){if(n.push(t.slice(o,s.index)),s.index===void 0)throw new Error("match.index should be defined");o=s.index+s[0].length,n.push(r(s[0],...s.slice(1),s.index,t,s.groups))}return n.push(t.slice(o)),Promise.all(n).then(s=>s.join(""))}a(Vso,"replaceAsync");function Wso(t,e){return te?1:0}a(Wso,"compare");function Wzr(t,e,r=0,n=t.length,o=0,s=e.length){for(;rd)return 1}let c=n-r,l=s-o;return cl?1:0}a(Wzr,"compareSubstring");function zso(t,e){return RCe(t,e,0,t.length,0,e.length)}a(zso,"compareIgnoreCase");function RCe(t,e,r=0,n=t.length,o=0,s=e.length){for(;r=128||d>=128)return Wzr(t.toLowerCase(),e.toLowerCase(),r,n,o,s);eNt(u)&&(u-=32),eNt(d)&&(d-=32);let p=u-d;if(p!==0)return p}let c=n-r,l=s-o;return cl?1:0}a(RCe,"compareSubstringIgnoreCase");function Yso(t){return t>=48&&t<=57}a(Yso,"isAsciiDigit");function eNt(t){return t>=97&&t<=122}a(eNt,"isLowerAsciiLetter");function Kso(t){return t>=65&&t<=90}a(Kso,"isUpperAsciiLetter");function zzr(t,e){return t.length===e.length&&RCe(t,e)===0}a(zzr,"equalsIgnoreCase");function Jso(t,e,r){return t===e||!!r&&t!==void 0&&e!==void 0&&zzr(t,e)}a(Jso,"equals");function Xso(t,e){let r=e.length;return r<=t.length&&RCe(t,e,0,r)===0}a(Xso,"startsWithIgnoreCase");function Zso(t,e){let r=t.length,n=r-e.length;return n>=0&&RCe(t,e,n,r)===0}a(Zso,"endsWithIgnoreCase");function eao(t,e){let r=Math.min(t.length,e.length),n;for(n=0;n1){let n=t.charCodeAt(e-2);if(nNt(n))return iNt(n,r)}return r}a(rao,"getPrevCodePoint");var sie=class{static{a(this,"CodePointIterator")}get offset(){return this._offset}constructor(e,r=0){this._str=e,this._len=e.length,this._offset=r}setOffset(e){this._offset=e}prevCodePoint(){let e=rao(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=Yzr(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}};pr.CodePointIterator=sie;var aie=class{static{a(this,"GraphemeIterator")}get offset(){return this._iterator.offset}constructor(e,r=0){this._iterator=new sie(e,r)}nextGraphemeLength(){let e=wCe.getInstance(),r=this._iterator,n=r.offset,o=e.getGraphemeBreakType(r.nextCodePoint());for(;!r.eol();){let s=r.offset,c=e.getGraphemeBreakType(r.nextCodePoint());if(Gzr(o,c)){r.setOffset(s);break}o=c}return r.offset-n}prevGraphemeLength(){let e=wCe.getInstance(),r=this._iterator,n=r.offset,o=e.getGraphemeBreakType(r.prevCodePoint());for(;r.offset>0;){let s=r.offset,c=e.getGraphemeBreakType(r.prevCodePoint());if(Gzr(c,o)){r.setOffset(s);break}o=c}return n-r.offset}eol(){return this._iterator.eol()}};pr.GraphemeIterator=aie;function Kzr(t,e){return new aie(t,e).nextGraphemeLength()}a(Kzr,"nextCharLength");function Jzr(t,e){return new aie(t,e).prevGraphemeLength()}a(Jzr,"prevCharLength");function nao(t,e){e>0&&NQe(t.charCodeAt(e))&&e--;let r=e+Kzr(t,e);return[r-Jzr(t,r),r]}a(nao,"getCharContainingOffset");function iao(t){let e=new aie(t),r=0;for(;!e.eol();)r++,e.nextGraphemeLength();return r}a(iao,"charCount");var Zkt;function oao(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}a(oao,"makeContainsRtl");function sao(t){return Zkt||(Zkt=oao()),Zkt.test(t)}a(sao,"containsRTL");var aao=/^[\t\n\r\x20-\x7E]*$/;function cao(t){return aao.test(t)}a(cao,"isBasicASCII");pr.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function lao(t){return pr.UNUSUAL_LINE_TERMINATORS.test(t)}a(lao,"containsUnusualLineTerminators");function uao(t){return t>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374||t>=65504&&t<=65510}a(uao,"isFullWidthCharacter");function Xzr(t){return t>=127462&&t<=127487||t===8986||t===8987||t===9200||t===9203||t>=9728&&t<=10175||t===11088||t===11093||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129008||t>=129280&&t<=129535||t>=129648&&t<=129782}a(Xzr,"isEmojiImprecise");function dao(t,e,r=""){let n=t.trimStart();if(n.lengthe){c=!0;break}s=o.lastIndex,o.lastIndex+=1}if(!c)return n;if(s===0)return r;let l=n.substring(0,s).trimEnd();return l.length!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,hao=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,mao=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,Zzr=new RegExp("(?:"+[pao.source,hao.source,mao.source].join("|")+")","g");function*gao(t){let e=0;for(let r of t.matchAll(Zzr))e!==r.index&&(yield{isCode:!1,str:t.substring(e,r.index)}),yield{isCode:!0,str:r[0]},e=r.index+r[0].length;e!==t.length&&(yield{isCode:!1,str:t.substring(e)})}a(gao,"forAnsiStringParts");function eYr(t){return t&&(t=t.replace(Zzr,"")),t}a(eYr,"removeAnsiEscapeCodes");var Aao=/\\\[.*?\\\]/g;function yao(t){return eYr(t).replace(Aao,"")}a(yao,"removeAnsiEscapeCodesFromPrompt");pr.UTF8_BOM_CHARACTER="\uFEFF";function tYr(t){return!!(t&&t.length>0&&t.charCodeAt(0)===65279)}a(tYr,"startsWithUTF8BOM");function Eao(t){return tYr(t)?t.substr(1):t}a(Eao,"stripUTF8BOM");function Cao(t,e){if(!t||!e||t.length0&&r>=0);return r===-1?t:(t[r-1]==="\r"&&r--,t.substr(0,r))}a(bao,"getNLines");function Tao(t){return t=t%52,t<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}a(Tao,"singleLetterHash");function Sao(t){return wCe.getInstance().getGraphemeBreakType(t)}a(Sao,"getGraphemeBreakType");function Gzr(t,e){return t===0?e!==5&&e!==7:t===2&&e===3?!1:t===4||t===2||t===3||e===4||e===2||e===3?!0:!(t===8&&(e===8||e===9||e===11||e===12)||(t===11||t===9)&&(e===9||e===10)||(t===12||t===10)&&e===10||e===5||e===13||e===7||t===1||t===13&&e===14||t===6&&e===6)}a(Gzr,"breakBetweenGraphemeBreakType");var wCe=class t{static{a(this,"GraphemeBreakTree")}static{this._INSTANCE=null}static getInstance(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE}constructor(){this._data=Iao()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let r=this._data,n=r.length/3,o=1;for(;o<=n;)if(er[3*o+1])o=2*o+1;else return r[3*o+2];return 0}};function Iao(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}a(Iao,"getGraphemeBreakRawData");function xao(t,e){if(t===0)return 0;let r=wao(t,e);if(r!==void 0)return r;let n=new sie(e,t);return n.prevCodePoint(),n.offset}a(xao,"getLeftDeleteOffset");function wao(t,e){let r=new sie(e,t),n=r.prevCodePoint();for(;Rao(n)||n===65039||n===8419;){if(r.offset===0)return;n=r.prevCodePoint()}if(!Xzr(n))return;let o=r.offset;return o>0&&r.prevCodePoint()===8205&&(o=r.offset),o}a(wao,"getOffsetBeforeLastEmojiComponent");function Rao(t){return 127995<=t&&t<=127999}a(Rao,"isEmojiModifier");pr.noBreakWhitespace="\xA0";var tNt=class t{static{a(this,"AmbiguousCharacters")}static{this.ambiguousCharacterData=new qzr.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new Tso.LRUCachedFunction(e=>{let r=e.split(",");function n(h){let m=new Map;for(let g=0;g!h.startsWith("_")&&Object.hasOwn(c,h));l.length===0&&(l=["_default"]);let u;for(let h of l){let m=n(c[h]);u=s(u,m)}let d=n(c._common),p=o(d,u);return new t(p)})}static getInstance(e){return t.cache.get(Array.from(e).join(","))}static{this._locales=new qzr.Lazy(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}containsAmbiguousCharacter(e){for(let r=0;r{"use strict";f();Object.defineProperty(Ep,"__esModule",{value:!0});Ep.isPathSeparator=xO;Ep.toSlashes=rYr;Ep.toPosixPath=Dao;Ep.getRoot=Mao;Ep.isUNC=Oao;Ep.isValidBasename=Uao;Ep.isEqual=Qao;Ep.isEqualOrParent=qao;Ep.isWindowsDriveLetter=oNt;Ep.sanitizeFilePath=Gao;Ep.removeTrailingPathSeparator=nYr;Ep.isRootOrDriveLetter=Hao;Ep.hasDriveLetter=sNt;Ep.getDriveLetter=jao;Ep.indexOfPath=$ao;Ep.parseLineAndColumnAware=Vao;Ep.randomPath=Yao;var hC=Im(),NF=PF(),DQe=C0(),Nao=sv();function xO(t){return t===47||t===92}a(xO,"isPathSeparator");function rYr(t){return t.replace(/[\\/]/g,hC.posix.sep)}a(rYr,"toSlashes");function Dao(t){return t.indexOf("/")===-1&&(t=rYr(t)),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t),t}a(Dao,"toPosixPath");function Mao(t,e=hC.posix.sep){if(!t)return"";let r=t.length,n=t.charCodeAt(0);if(xO(n)){if(xO(t.charCodeAt(1))&&!xO(t.charCodeAt(2))){let s=3,c=s;for(;s\|]/g,Lao=/[/]/g,Fao=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function Uao(t,e=NF.isWindows){let r=e?Bao:Lao;return!(!t||t.length===0||/^\s+$/.test(t)||(r.lastIndex=0,r.test(t))||e&&Fao.test(t)||t==="."||t===".."||e&&t[t.length-1]==="."||e&&t.length!==t.trim().length||t.length>255)}a(Uao,"isValidBasename");function Qao(t,e,r){let n=t===e;return!r||n?n:!t||!e?!1:(0,DQe.equalsIgnoreCase)(t,e)}a(Qao,"isEqual");function qao(t,e,r,n=hC.sep){if(t===e)return!0;if(!t||!e||e.length>t.length)return!1;if(r){if(!(0,DQe.startsWithIgnoreCase)(t,e))return!1;if(e.length===t.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,t.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),t.indexOf(e)===0}a(qao,"isEqualOrParent");function oNt(t){return t>=65&&t<=90||t>=97&&t<=122}a(oNt,"isWindowsDriveLetter");function Gao(t,e){return NF.isWindows&&t.endsWith(":")&&(t+=hC.sep),(0,hC.isAbsolute)(t)||(t=(0,hC.join)(e,t)),t=(0,hC.normalize)(t),nYr(t)}a(Gao,"sanitizeFilePath");function nYr(t){return NF.isWindows?(t=(0,DQe.rtrim)(t,hC.sep),t.endsWith(":")&&(t+=hC.sep)):(t=(0,DQe.rtrim)(t,hC.sep),t||(t=hC.sep)),t}a(nYr,"removeTrailingPathSeparator");function Hao(t){let e=(0,hC.normalize)(t);return NF.isWindows?t.length>3?!1:sNt(e)&&(t.length===2||e.charCodeAt(2)===92):e===hC.posix.sep}a(Hao,"isRootOrDriveLetter");function sNt(t,e=NF.isWindows){return e?oNt(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}a(sNt,"hasDriveLetter");function jao(t,e=NF.isWindows){return sNt(t,e)?t[0]:void 0}a(jao,"getDriveLetter");function $ao(t,e,r){return e.length>t.length?-1:t===e?0:(r&&(t=t.toLowerCase(),e=e.toLowerCase()),t.indexOf(e))}a($ao,"indexOfPath");function Vao(t){let e=t.split(":"),r,n,o;for(let s of e){let c=Number(s);(0,Nao.isNumber)(c)?n===void 0?n=c:o===void 0&&(o=c):r=r?[r,s].join(":"):s}if(!r)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:r,line:n!==void 0?n:void 0,column:o!==void 0?o:n!==void 0?1:void 0}}a(Vao,"parseLineAndColumnAware");var Wao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",zao="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function Yao(t,e,r=8){let n="";for(let s=0;s{"use strict";f();var Kao=HT&&HT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jao=HT&&HT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xao=HT&&HT.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o"u")&&(typeof t.path=="string"||typeof t.path>"u")&&(typeof t.query=="string"||typeof t.query>"u")&&(typeof t.fragment=="string"||typeof t.fragment>"u")}a(sco,"isUriComponents");var aYr=OQe.isWindows?1:void 0,DF=class extends BQe{static{a(this,"Uri")}constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=LQe(this,!1)),this._fsPath}toString(e=!1){return e?cNt(this,!0):(this._formatted||(this._formatted=cNt(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=aYr),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},cYr={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function oYr(t,e,r){let n,o=-1;for(let s=0;s=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===45||c===46||c===95||c===126||e&&c===47||r&&c===91||r&&c===93||r&&c===58)o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n!==void 0&&(n+=t.charAt(s));else{n===void 0&&(n=t.substr(0,s));let l=cYr[c];l!==void 0?(o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n+=l):o===-1&&(o=s)}}return o!==-1&&(n+=encodeURIComponent(t.substring(o))),n!==void 0?n:t}a(oYr,"encodeURIComponentFast");function aco(t){let e;for(let r=0;r1&&t.scheme==="file"?r=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?r=t.path.substr(1):r=t.path[1].toLowerCase()+t.path.substr(2):r=t.path,OQe.isWindows&&(r=r.replace(/\//g,"\\")),r}a(LQe,"uriToFsPath");function cNt(t,e){let r=e?aco:oYr,n="",{scheme:o,authority:s,path:c,query:l,fragment:u}=t;if(o&&(n+=o,n+=":"),(s||o==="file")&&(n+=sw,n+=sw),s){let d=s.indexOf("@");if(d!==-1){let p=s.substr(0,d);s=s.substr(d+1),d=p.lastIndexOf(":"),d===-1?n+=r(p,!1,!1):(n+=r(p.substr(0,d),!1,!1),n+=":",n+=r(p.substr(d+1),!1,!0)),n+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,d),!1,!0),n+=s.substr(d))}if(c){if(c.length>=3&&c.charCodeAt(0)===47&&c.charCodeAt(2)===58){let d=c.charCodeAt(1);d>=65&&d<=90&&(c=`/${String.fromCharCode(d+32)}:${c.substr(3)}`)}else if(c.length>=2&&c.charCodeAt(1)===58){let d=c.charCodeAt(0);d>=65&&d<=90&&(c=`${String.fromCharCode(d+32)}:${c.substr(2)}`)}n+=r(c,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=e?u:oYr(u,!1,!1)),n}a(cNt,"_asFormatted");function lYr(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+lYr(t.substr(3)):t}}a(lYr,"decodeURIComponentGraceful");var sYr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function MQe(t){return t.match(sYr)?t.replace(sYr,e=>lYr(e)):t}a(MQe,"percentDecode")});var T$=T(Ro=>{"use strict";f();var cco=Ro&&Ro.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lco=Ro&&Ro.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pNt=Ro&&Ro.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ofYr(t,r))}a(dco,"matchesSomeScheme");Ro.connectionTokenCookieName="vscode-tkn";Ro.connectionTokenQueryName="tkn";var dNt=class{static{a(this,"RemoteAuthoritiesImpl")}constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}setDelegate(e){this._delegate=e}setServerRootPath(e,r){this._serverRootPath=uNt.posix.join(r??"/",pYr(e))}getServerRootPath(){return this._serverRootPath}get _remoteResourcesPath(){return uNt.posix.join(this._serverRootPath,vk.vscodeRemoteResource)}set(e,r,n){this._hosts[e]=r,this._ports[e]=n}setConnectionToken(e,r){this._connectionTokens[e]=r}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(l){return uco.onUnexpectedError(l),e}let r=e.authority,n=this._hosts[r];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[r],s=this._connectionTokens[r],c=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(c+=`&${Ro.connectionTokenQueryName}=${encodeURIComponent(s)}`),b$.URI.from({scheme:lNt.isWeb?this._preferredWebSchema:vk.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:c})}};Ro.RemoteAuthorities=new dNt;function pYr(t){return`${t.quality??"oss"}-${t.commit??"dev"}`}a(pYr,"getServerProductSegment");Ro.builtinExtensionsPath="vs/../../extensions";Ro.nodeModulesPath="vs/../../node_modules";Ro.nodeModulesAsarPath="vs/../../node_modules.asar";Ro.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";Ro.VSCODE_AUTHORITY="vscode-app";var fNt=class t{static{a(this,"FileAccessImpl")}static{this.FALLBACK_AUTHORITY=Ro.VSCODE_AUTHORITY}asBrowserUri(e){let r=this.toUri(e);return this.uriToBrowserUri(r)}uriToBrowserUri(e){return e.scheme===vk.vscodeRemote?Ro.RemoteAuthorities.rewrite(e):e.scheme===vk.file&&(lNt.isNative||lNt.webWorkerOrigin===`${vk.vscodeFileResource}://${t.FALLBACK_AUTHORITY}`)?e.with({scheme:vk.vscodeFileResource,authority:e.authority||t.FALLBACK_AUTHORITY,query:null,fragment:null}):e}asFileUri(e){let r=this.toUri(e);return this.uriToFileUri(r)}uriToFileUri(e){return e.scheme===vk.vscodeFileResource?e.with({scheme:vk.file,authority:e.authority!==t.FALLBACK_AUTHORITY?e.authority:null,query:null,fragment:null}):e}toUri(e){if(b$.URI.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return b$.URI.joinPath(b$.URI.parse(r,!0),e);let n=uNt.join(r,e);return b$.URI.file(n)}throw new Error("Cannot determine URI for module id!")}};Ro.FileAccess=new fNt;Ro.CacheControlheaders=Object.freeze({"Cache-Control":"no-cache, no-store"});Ro.DocumentPolicyheaders=Object.freeze({"Document-Policy":"include-js-call-stacks-in-crash-reports"});var dYr;(function(t){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));let r="vscode-coi";function n(s){let c;typeof s=="string"?c=new URL(s).searchParams:s instanceof URL?c=s.searchParams:b$.URI.isUri(s)&&(c=new URL(s.toString(!0)).searchParams);let l=c?.get(r);if(l)return e.get(l)}a(n,"getHeadersFromQuery"),t.getHeadersFromQuery=n;function o(s,c,l){if(!globalThis.crossOriginIsolated)return;let u=c&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(r,u):s[r]=u}a(o,"addSearchParam"),t.addSearchParam=o})(dYr||(Ro.COI=dYr={}))});var Tk=T(ir=>{"use strict";f();var fco=ir&&ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pco=ir&&ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gYr=ir&&ir.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ocie.getRoot(n).length&&n[n.length-1]===r}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,r=hy.sep){return(0,ir.hasTrailingPathSeparator)(e,r)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,r=hy.sep){let n=!1;if(e.scheme===MF.Schemas.file){let o=bk(e);n=o!==void 0&&o.length===cie.getRoot(o).length&&o[o.length-1]===r}else{r="/";let o=e.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!(0,ir.hasTrailingPathSeparator)(e,r)?e.with({path:e.path+"/"}):e}};ir.ExtUri=lie;ir.extUri=new lie(()=>!1);ir.extUriBiasedIgnorePathCase=new lie(t=>t.scheme===MF.Schemas.file?!AYr.isLinux:!0);ir.extUriIgnorePathCase=new lie(t=>!0);ir.isEqual=ir.extUri.isEqual.bind(ir.extUri);ir.isEqualOrParent=ir.extUri.isEqualOrParent.bind(ir.extUri);ir.getComparisonKey=ir.extUri.getComparisonKey.bind(ir.extUri);ir.basenameOrAuthority=ir.extUri.basenameOrAuthority.bind(ir.extUri);ir.basename=ir.extUri.basename.bind(ir.extUri);ir.extname=ir.extUri.extname.bind(ir.extUri);ir.dirname=ir.extUri.dirname.bind(ir.extUri);ir.joinPath=ir.extUri.joinPath.bind(ir.extUri);ir.normalizePath=ir.extUri.normalizePath.bind(ir.extUri);ir.relativePath=ir.extUri.relativePath.bind(ir.extUri);ir.resolvePath=ir.extUri.resolvePath.bind(ir.extUri);ir.isAbsolutePath=ir.extUri.isAbsolutePath.bind(ir.extUri);ir.isEqualAuthority=ir.extUri.isEqualAuthority.bind(ir.extUri);ir.hasTrailingPathSeparator=ir.extUri.hasTrailingPathSeparator.bind(ir.extUri);ir.removeTrailingPathSeparator=ir.extUri.removeTrailingPathSeparator.bind(ir.extUri);ir.addTrailingPathSeparator=ir.extUri.addTrailingPathSeparator.bind(ir.extUri);function hco(t,e){let r=[];for(let n=0;nc===n?!1:(0,ir.isEqualOrParent)(o,e(s)))||r.push(t[n])}return r}a(hco,"distinctParents");var mYr;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function e(r){let n=new Map;r.path.substring(r.path.indexOf(";")+1,r.path.lastIndexOf(";")).split(";").forEach(c=>{let[l,u]=c.split(":");l&&u&&n.set(l,u)});let s=r.path.substring(0,r.path.indexOf(";"));return s&&n.set(t.META_DATA_MIME,s),n}a(e,"parseMetaData"),t.parseMetaData=e})(mYr||(ir.DataUri=mYr={}));function mco(t,e,r){if(e){let n=t.path;return n&&n[0]!==hy.posix.sep&&(n=hy.posix.sep+n),t.with({scheme:r,authority:e,path:n})}return t.with({scheme:r})}a(mco,"toLocalResource")});var yYr=T(FQe=>{"use strict";f();Object.defineProperty(FQe,"__esModule",{value:!0});FQe.MicrotaskDelay=void 0;FQe.MicrotaskDelay=Symbol("MicrotaskDelay")});var wc=T(er=>{"use strict";f();Object.defineProperty(er,"__esModule",{value:!0});er.AsyncReader=er.AsyncReaderEndOfStream=er.CancelableAsyncIterableProducer=er.AsyncIterableProducer=er.AsyncIterableSource=er.AsyncIterableObject=er.LazyStatefulPromise=er.StatefulPromise=er.Promises=er.DeferredPromise=er.IntervalCounter=er.TaskSequentializer=er.GlobalIdleValue=er.AbstractIdleValue=er._runWhenIdle=er.runWhenGlobalIdle=er.ThrottledWorker=er.RunOnceWorker=er.ProcessTimeRunOnceScheduler=er.RunOnceScheduler=er.IntervalTimer=er.TimeoutTimer=er.TaskQueue=er.ResourceQueue=er.LimitedQueue=er.Queue=er.Limiter=er.AutoOpenBarrier=er.Barrier=er.ThrottledDelayer=er.Delayer=er.SequencerByKey=er.Sequencer=er.Throttler=void 0;er.isThenable=_Yr;er.createCancelablePromise=vYr;er.raceCancellation=bYr;er.raceCancellationError=Eco;er.notCancellablePromise=Cco;er.raceCancellablePromises=_co;er.raceTimeout=TYr;er.asPromise=vco;er.promiseWithResolvers=SYr;er.timeout=DNt;er.disposableTimeout=Sco;er.sequence=Ico;er.first=xco;er.firstParallel=wco;er.retry=Rco;er.createCancelableAsyncIterableProducer=Pco;er.cancellableIterable=kco;var NNt=_O(),mC=es(),kCe=nc(),uie=so(),EYr=Tk(),gco=PF(),Aco=yYr(),yco=IO();function _Yr(t){return!!t&&typeof t.then=="function"}a(_Yr,"isThenable");function vYr(t){let e=new NNt.CancellationTokenSource,r=t(e.token),n=!1,o=new Promise((s,c)=>{let l=e.token.onCancellationRequested(()=>{n=!0,l.dispose(),c(new mC.CancellationError)});Promise.resolve(r).then(u=>{l.dispose(),e.dispose(),n?(0,uie.isDisposable)(u)&&u.dispose():s(u)},u=>{l.dispose(),e.dispose(),c(u)})});return new class{cancel(){e.cancel(),e.dispose()}then(s,c){return o.then(s,c)}catch(s){return this.then(void 0,s)}finally(s){return o.finally(s)}}}a(vYr,"createCancelablePromise");function bYr(t,e,r){return new Promise((n,o)=>{let s=e.onCancellationRequested(()=>{s.dispose(),n(r)});t.then(n,o).finally(()=>s.dispose())})}a(bYr,"raceCancellation");function Eco(t,e){return new Promise((r,n)=>{let o=e.onCancellationRequested(()=>{o.dispose(),n(new mC.CancellationError)});t.then(r,n).finally(()=>o.dispose())})}a(Eco,"raceCancellationError");function Cco(t){return new Promise((e,r)=>{t.then(e,r)})}a(Cco,"notCancellablePromise");function _co(t){let e=-1,r=t.map((o,s)=>o.then(c=>(e=s,c))),n=Promise.race(r);return n.cancel=()=>{t.forEach((o,s)=>{s!==e&&o.cancel&&o.cancel()})},n.finally(()=>{n.cancel()}),n}a(_co,"raceCancellablePromises");function TYr(t,e,r){let n,o=setTimeout(()=>{n?.(void 0),r?.()},e);return Promise.race([t.finally(()=>clearTimeout(o)),new Promise(s=>n=s)])}a(TYr,"raceTimeout");function vco(t){return new Promise((e,r)=>{let n=t();_Yr(n)?n.then(e,r):e(n)})}a(vco,"asPromise");function SYr(){let t,e;return{promise:new Promise((n,o)=>{t=n,e=o}),resolve:t,reject:e}}a(SYr,"promiseWithResolvers");var UQe=class{static{a(this,"Throttler")}constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null,this.cancellationTokenSource=new NNt.CancellationTokenSource}queue(e){if(this.cancellationTokenSource.token.isCancellationRequested)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let r=a(()=>{if(this.queuedPromise=null,this.cancellationTokenSource.token.isCancellationRequested)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n},"onComplete");this.queuedPromise=new Promise(n=>{this.activePromise.then(r,r).then(n)})}return new Promise((r,n)=>{this.queuedPromise.then(r,n)})}return this.activePromise=e(this.cancellationTokenSource.token),new Promise((r,n)=>{this.activePromise.then(o=>{this.activePromise=null,r(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.cancellationTokenSource.cancel()}};er.Throttler=UQe;var hNt=class{static{a(this,"Sequencer")}constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e(),()=>e())}};er.Sequencer=hNt;var mNt=class{static{a(this,"SequencerByKey")}constructor(){this.promiseMap=new Map}queue(e,r){let o=(this.promiseMap.get(e)??Promise.resolve()).catch(()=>{}).then(r).finally(()=>{this.promiseMap.get(e)===o&&this.promiseMap.delete(e)});return this.promiseMap.set(e,o),o}peek(e){return this.promiseMap.get(e)||void 0}keys(){return this.promiseMap.keys()}};er.SequencerByKey=mNt;var bco=a((t,e)=>{let r=!0,n=setTimeout(()=>{r=!1,e()},t);return{isTriggered:a(()=>r,"isTriggered"),dispose:a(()=>{clearTimeout(n),r=!1},"dispose")}},"timeoutDeferred"),Tco=a(t=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,t())}),{isTriggered:a(()=>e,"isTriggered"),dispose:a(()=>{e=!1},"dispose")}},"microtaskDeferred"),QQe=class{static{a(this,"Delayer")}constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,r=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((o,s)=>{this.doResolve=o,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=a(()=>{this.deferred=null,this.doResolve?.(null)},"fn");return this.deferred=r===Aco.MicrotaskDelay?Tco(n):bco(r,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new mC.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}};er.Delayer=QQe;var gNt=class{static{a(this,"ThrottledDelayer")}constructor(e){this.delayer=new QQe(e),this.throttler=new UQe}trigger(e,r){return this.delayer.trigger(()=>this.throttler.queue(e),r)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};er.ThrottledDelayer=gNt;var qQe=class{static{a(this,"Barrier")}constructor(){this._isOpen=!1,this._promise=new Promise((e,r)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}};er.Barrier=qQe;var ANt=class extends qQe{static{a(this,"AutoOpenBarrier")}constructor(e){super(),this._timeout=setTimeout(()=>this.open(),e)}open(){clearTimeout(this._timeout),super.open()}};er.AutoOpenBarrier=ANt;function DNt(t,e){return e?new Promise((r,n)=>{let o=setTimeout(()=>{s.dispose(),r()},t),s=e.onCancellationRequested(()=>{clearTimeout(o),s.dispose(),n(new mC.CancellationError)})}):vYr(r=>DNt(t,r))}a(DNt,"timeout");function Sco(t,e=0,r){let n=setTimeout(()=>{t(),r&&o.dispose()},e),o=(0,uie.toDisposable)(()=>{clearTimeout(n),r?.delete(o)});return r?.add(o),o}a(Sco,"disposableTimeout");function Ico(t){let e=[],r=0,n=t.length;function o(){return r!!n,r=null){let n=0,o=t.length,s=a(()=>{if(n>=o)return Promise.resolve(r);let c=t[n++];return Promise.resolve(c()).then(u=>e(u)?Promise.resolve(u):s())},"loop");return s()}a(xco,"first");function wco(t,e=n=>!!n,r=null){if(t.length===0)return Promise.resolve(r);let n=t.length,o=a(()=>{n=-1;for(let s of t)s.cancel?.()},"finish");return new Promise((s,c)=>{for(let l of t)l.then(u=>{--n>=0&&e(u)?(o(),s(u)):n===0&&s(r)}).catch(u=>{--n>=0&&(o(),c(u))})})}a(wco,"firstParallel");var GQe=class{static{a(this,"Limiter")}constructor(e){this._size=0,this._isDisposed=!1,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new kCe.Emitter}whenIdle(){return this.size>0?kCe.Event.toPromise(this.onDrained):Promise.resolve()}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(e){if(this._isDisposed)throw new Error("Object has been disposed");return this._size++,new Promise((r,n)=>{this.outstandingPromises.push({factory:e,c:r,e:n}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this._isDisposed||(this.runningPromises--,--this._size===0&&this._onDrained.fire(),this.outstandingPromises.length>0&&this.consume())}clear(){if(this._isDisposed)throw new Error("Object has been disposed");this.outstandingPromises.length=0,this._size=this.runningPromises}dispose(){this._isDisposed=!0,this.outstandingPromises.length=0,this._size=0,this._onDrained.dispose()}};er.Limiter=GQe;var HQe=class extends GQe{static{a(this,"Queue")}constructor(){super(1)}};er.Queue=HQe;var yNt=class{static{a(this,"LimitedQueue")}constructor(){this.sequentializer=new $Qe,this.tasks=0}queue(e){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,e())):this.sequentializer.run(this.tasks++,e())}};er.LimitedQueue=yNt;var ENt=class{static{a(this,"ResourceQueue")}constructor(){this.queues=new Map,this.drainers=new Set,this.drainListeners=void 0,this.drainListenerCount=0}async whenDrained(){if(this.isDrained())return;let e=new wO;return this.drainers.add(e),e.p}isDrained(){for(let[,e]of this.queues)if(e.size>0)return!1;return!0}queueSize(e,r=EYr.extUri){let n=r.getComparisonKey(e);return this.queues.get(n)?.size??0}queueFor(e,r,n=EYr.extUri){let o=n.getComparisonKey(e),s=this.queues.get(o);if(!s){s=new HQe;let c=this.drainListenerCount++,l=kCe.Event.once(s.onDrained)(()=>{s?.dispose(),this.queues.delete(o),this.onDidQueueDrain(),this.drainListeners?.deleteAndDispose(c),this.drainListeners?.size===0&&(this.drainListeners.dispose(),this.drainListeners=void 0)});this.drainListeners||(this.drainListeners=new uie.DisposableMap),this.drainListeners.set(c,l),this.queues.set(o,s)}return s.queue(r)}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(let e of this.drainers)e.complete();this.drainers.clear()}dispose(){for(let[,e]of this.queues)e.dispose();this.queues.clear(),this.releaseDrainers(),this.drainListeners?.dispose()}};er.ResourceQueue=ENt;var CNt=class{static{a(this,"TaskQueue")}constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){let r=new wO;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),r.p}scheduleSkipIfCleared(e){let r=new wO;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!0}),this._runIfNotRunning(),r.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingTasks.length===0)return;let e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new mC.BugIndicatingError;this._runningTask=e.task;try{let r=await e.task();e.deferred.complete(r)}catch(r){e.deferred.error(r)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){let e=this._pendingTasks;this._pendingTasks=[];for(let r of e)r.setUndefinedWhenCleared?r.deferred.complete(void 0):r.deferred.error(new mC.CancellationError)}};er.TaskQueue=CNt;var _Nt=class{static{a(this,"TimeoutTimer")}constructor(e,r){this._isDisposed=!1,this._token=void 0,typeof e=="function"&&typeof r=="number"&&this.setIfNotSet(e,r)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==void 0&&(clearTimeout(this._token),this._token=void 0)}cancelAndSet(e,r){if(this._isDisposed)throw new mC.BugIndicatingError("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=void 0,e()},r)}setIfNotSet(e,r){if(this._isDisposed)throw new mC.BugIndicatingError("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===void 0&&(this._token=setTimeout(()=>{this._token=void 0,e()},r))}};er.TimeoutTimer=_Nt;var vNt=class{static{a(this,"IntervalTimer")}constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,r,n=globalThis){if(this.isDisposed)throw new mC.BugIndicatingError("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let o=n.setInterval(()=>{e()},r);this.disposable=(0,uie.toDisposable)(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};er.IntervalTimer=vNt;var NCe=class{static{a(this,"RunOnceScheduler")}constructor(e,r){this.timeoutToken=void 0,this.runner=e,this.timeout=r,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=void 0)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==void 0}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=void 0,this.runner&&this.doRun()}doRun(){this.runner?.()}};er.RunOnceScheduler=NCe;var bNt=class{static{a(this,"ProcessTimeRunOnceScheduler")}constructor(e,r){r%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${r}ms is not a multiple of 1000ms.`),this.runner=e,this.timeout=r,this.counter=0,this.intervalToken=void 0,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=void 0)}schedule(e=this.timeout){e%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${e}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(e/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==void 0}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=void 0,this.runner?.())}};er.ProcessTimeRunOnceScheduler=bNt;var TNt=class extends NCe{static{a(this,"RunOnceWorker")}constructor(e,r){super(e,r),this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){let e=this.units;this.units=[],this.runner?.(e)}dispose(){this.units=[],super.dispose()}};er.RunOnceWorker=TNt;var SNt=class extends uie.Disposable{static{a(this,"ThrottledWorker")}constructor(e,r){super(),this.options=e,this.handler=r,this.pendingWork=[],this.throttler=this._register(new uie.MutableDisposable),this.disposed=!1,this.lastExecutionTime=0}get pending(){return this.pendingWork.length}work(e){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+e.length>this.options.maxBufferedWork)return!1}else if(this.pending+e.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(let n of e)this.pendingWork.push(n);let r=Date.now()-this.lastExecutionTime;return!this.throttler.value&&(!this.options.waitThrottleDelayBetweenWorkUnits||r>=this.options.throttleDelay)?this.doWork():!this.throttler.value&&this.options.waitThrottleDelayBetweenWorkUnits&&this.scheduleThrottler(Math.max(this.options.throttleDelay-r,0)),!0}doWork(){this.lastExecutionTime=Date.now(),this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&this.scheduleThrottler()}scheduleThrottler(e=this.options.throttleDelay){this.throttler.value=new NCe(()=>{this.throttler.clear(),this.doWork()},e),this.throttler.value.schedule()}dispose(){super.dispose(),this.pendingWork.length=0,this.disposed=!0}};er.ThrottledWorker=SNt;(function(){let t=globalThis;typeof t.requestIdleCallback!="function"||typeof t.cancelIdleCallback!="function"?er._runWhenIdle=(e,r,n)=>{(0,gco.setTimeout0)(()=>{if(o)return;let s=Date.now()+15;r(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let o=!1;return{dispose(){o||(o=!0)}}}:er._runWhenIdle=(e,r,n)=>{let o=e.requestIdleCallback(r,typeof n=="number"?{timeout:n}:void 0),s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(o))}}},er.runWhenGlobalIdle=(e,r)=>(0,er._runWhenIdle)(globalThis,e,r)})();var jQe=class{static{a(this,"AbstractIdleValue")}constructor(e,r){this._didRun=!1,this._executor=()=>{try{this._value=r()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=(0,er._runWhenIdle)(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}};er.AbstractIdleValue=jQe;var INt=class extends jQe{static{a(this,"GlobalIdleValue")}constructor(e){super(globalThis,e)}};er.GlobalIdleValue=INt;async function Rco(t,e,r){let n;for(let o=0;on?.(),"cancel"),promise:r},r.then(()=>this.doneRunning(e),()=>this.doneRunning(e)),r}doneRunning(e){this._running&&e===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){let e=this._queued;this._queued=void 0,e.run().then(e.promiseResolve,e.promiseReject)}}queue(e){if(this._queued)this._queued.run=e;else{let{promise:r,resolve:n,reject:o}=SYr();this._queued={run:e,promise:r,promiseResolve:n,promiseReject:o}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}};er.TaskSequentializer=$Qe;var xNt=class{static{a(this,"IntervalCounter")}constructor(e,r=()=>Date.now()){this.interval=e,this.nowFn=r,this.lastIncrementTime=0,this.value=0}increment(){let e=this.nowFn();return e-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=e,this.value=0),this.value++,this.value}};er.IntervalCounter=xNt;var wO=class t{static{a(this,"DeferredPromise")}static fromPromise(e){let r=new t;return r.settleWith(e),r}get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((e,r)=>{this.completeCallback=e,this.errorCallback=r})}complete(e){return this.isSettled?Promise.resolve():new Promise(r=>{this.completeCallback(e),this.outcome={outcome:0,value:e},r()})}error(e){return this.isSettled?Promise.resolve():new Promise(r=>{this.errorCallback(e),this.outcome={outcome:1,value:e},r()})}settleWith(e){return e.then(r=>this.complete(r),r=>this.error(r))}cancel(){return this.error(new mC.CancellationError)}};er.DeferredPromise=wO;var CYr;(function(t){async function e(n){let o,s=await Promise.all(n.map(c=>c.then(l=>l,l=>{o||(o=l)})));if(typeof o<"u")throw o;return s}a(e,"settled"),t.settled=e;function r(n){return new Promise(async(o,s)=>{try{await n(o,s)}catch(c){s(c)}})}a(r,"withAsyncBody"),t.withAsyncBody=r})(CYr||(er.Promises=CYr={}));var VQe=class{static{a(this,"StatefulPromise")}get value(){return this._value}get error(){return this._error}get isResolved(){return this._isResolved}constructor(e){this._value=void 0,this._error=void 0,this._isResolved=!1,this.promise=e.then(r=>(this._value=r,this._isResolved=!0,r),r=>{throw this._error=r,this._isResolved=!0,r})}requireValue(){if(!this._isResolved)throw new mC.BugIndicatingError("Promise is not resolved yet");if(this._error)throw this._error;return this._value}};er.StatefulPromise=VQe;var wNt=class{static{a(this,"LazyStatefulPromise")}constructor(e){this._compute=e,this._promise=new yco.Lazy(()=>new VQe(this._compute()))}requireValue(){return this._promise.value.requireValue()}getPromise(){return this._promise.value.promise}get currentValue(){return this._promise.rawValue?.value}};er.LazyStatefulPromise=wNt;var WQe=class t{static{a(this,"AsyncIterableObject")}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}constructor(e,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new kCe.Emitter,queueMicrotask(async()=>{let n={emitOne:a(o=>this.emitOne(o),"emitOne"),emitMany:a(o=>this.emitMany(o),"emitMany"),reject:a(o=>this.reject(o),"reject")};try{await Promise.resolve(e(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:a(async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0}),"return")}}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}map(e){return t.map(this,e)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static async toPromise(e){let r=[];for await(let n of e)r.push(n);return r}toPromise(){return t.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};er.AsyncIterableObject=WQe;function Pco(t){let e=new NNt.CancellationTokenSource,r=t(e.token);return new YQe(e,async n=>{let o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new mC.CancellationError)});try{for await(let s of r){if(e.token.isCancellationRequested)return;n.emitOne(s)}o.dispose(),e.dispose()}catch(s){o.dispose(),e.dispose(),n.reject(s)}})}a(Pco,"createCancelableAsyncIterableProducer");var RNt=class{static{a(this,"AsyncIterableSource")}constructor(e){this._deferred=new wO,this._asyncIterable=new WQe(o=>{if(r){o.reject(r);return}return n&&o.emitMany(n),this._errorFn=s=>o.reject(s),this._emitOneFn=s=>o.emitOne(s),this._emitManyFn=s=>o.emitMany(s),this._deferred.p},e);let r,n;this._errorFn=o=>{r||(r=o)},this._emitOneFn=o=>{n||(n=[]),n.push(o)},this._emitManyFn=o=>{n?o.forEach(s=>n.push(s)):n=o.slice()}}get asyncIterable(){return this._asyncIterable}resolve(){this._deferred.complete()}reject(e){this._errorFn(e),this._deferred.complete()}emitOne(e){this._emitOneFn(e)}emitMany(e){this._emitManyFn(e)}};er.AsyncIterableSource=RNt;function kco(t,e){let r=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t;return{async next(){return e.isCancellationRequested?{done:!0,value:void 0}:await bYr(r.next(),e)||{done:!0,value:void 0}},throw:r.throw?.bind(r),return:r.return?.bind(r),[Symbol.asyncIterator](){return this}}}a(kco,"cancellableIterable");var PNt=class{static{a(this,"ProducerConsumer")}constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let r=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(r,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let r of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(r,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new mC.BugIndicatingError("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,r){r.ok?e.complete(r.value):e.error(r.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new wO;return this._unsatisfiedConsumers.push(e),e.p}}},zQe=class t{static{a(this,"AsyncIterableProducer")}constructor(e,r){this._onReturn=r,this._producerConsumer=new PNt,this._iterator={next:a(()=>this._producerConsumer.consume(),"next"),return:a(()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),"return"),throw:a(async n=>(this._finishError(n),{done:!0,value:void 0}),"throw")},queueMicrotask(async()=>{let n=e({emitOne:a(o=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:o}}),"emitOne"),emitMany:a(o=>{for(let s of o)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},"emitMany"),reject:a(o=>this._finishError(o),"reject")});if(!this._producerConsumer.hasFinalValue)try{await n,this._finishOk()}catch(o){this._finishError(o)}})}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}static tee(e){let r,n,o=new wO,s=a(async()=>{if(!(!r||!n))try{for await(let u of e)r.emitOne(u),n.emitOne(u)}catch(u){r.reject(u),n.reject(u)}finally{o.complete()}},"start"),c=new t(async u=>(r=u,s(),o.p)),l=new t(async u=>(n=u,s(),o.p));return[c,l]}map(e){return t.map(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};er.AsyncIterableProducer=zQe;var YQe=class extends zQe{static{a(this,"CancelableAsyncIterableProducer")}constructor(e,r){super(r),this._source=e}cancel(){this._source.cancel()}};er.CancelableAsyncIterableProducer=YQe;er.AsyncReaderEndOfStream=Symbol("AsyncReaderEndOfStream");var kNt=class{static{a(this,"AsyncReader")}get endOfStream(){return this._buffer.length===0&&this._atEnd}constructor(e){this._source=e,this._buffer=[],this._atEnd=!1}async read(){return this._buffer.length===0&&!this._atEnd&&await this._extendBuffer(),this._buffer.length===0?er.AsyncReaderEndOfStream:this._buffer.shift()}async readWhile(e,r){do{let n=await this.peek();if(n===er.AsyncReaderEndOfStream||!e(n))break;await this.read(),await r(n)}while(!0)}readBufferedOrThrow(){let e=this.peekBufferedOrThrow();return this._buffer.shift(),e}async consumeToEnd(){for(;!this.endOfStream;)await this.read()}async peek(){return this._buffer.length===0&&!this._atEnd&&await this._extendBuffer(),this._buffer.length===0?er.AsyncReaderEndOfStream:this._buffer[0]}peekBufferedOrThrow(){if(this._buffer.length===0){if(this._atEnd)return er.AsyncReaderEndOfStream;throw new mC.BugIndicatingError("No buffered elements")}return this._buffer[0]}async peekTimeout(e){if(this._buffer.length===0&&!this._atEnd&&await TYr(this._extendBuffer(),e),this._atEnd)return er.AsyncReaderEndOfStream;if(this._buffer.length!==0)return this._buffer[0]}_extendBuffer(){return this._atEnd?Promise.resolve():(this._extendBufferPromise||(this._extendBufferPromise=(async()=>{let{value:e,done:r}=await this._source.next();this._extendBufferPromise=void 0,r?this._atEnd=!0:this._buffer.push(e)})()),this._extendBufferPromise)}};er.AsyncReader=kNt});var DYr=T(cv=>{"use strict";f();var Bco=cv&&cv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cv,"__esModule",{value:!0});var Lco=require("fs"),Fco=Bco(Sx()),fie=Fco.default("@kwsites/file-exists");function Uco(t,e,r){fie("checking %s",t);try{let n=Lco.statSync(t);return n.isFile()&&e?(fie("[OK] path represents a file"),!0):n.isDirectory()&&r?(fie("[OK] path represents a directory"),!0):(fie("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return fie("[FAIL] path is not accessible: %o",n),!1;throw fie("[FATAL] %o",n),n}}a(Uco,"check");function Qco(t,e=cv.READABLE){return Uco(t,(e&cv.FILE)>0,(e&cv.FOLDER)>0)}a(Qco,"exists");cv.exists=Qco;cv.FILE=1;cv.FOLDER=2;cv.READABLE=cv.FILE+cv.FOLDER});var MYr=T(tqe=>{"use strict";f();function qco(t){for(var e in t)tqe.hasOwnProperty(e)||(tqe[e]=t[e])}a(qco,"__export");Object.defineProperty(tqe,"__esModule",{value:!0});qco(DYr())});var BYr=T((f$l,OYr)=>{f();var pie=1e3,hie=pie*60,mie=hie*60,S$=mie*24,Gco=S$*7,Hco=S$*365.25;OYr.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return jco(t);if(r==="number"&&isFinite(t))return e.long?Vco(t):$co(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function jco(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Hco;case"weeks":case"week":case"w":return r*Gco;case"days":case"day":case"d":return r*S$;case"hours":case"hour":case"hrs":case"hr":case"h":return r*mie;case"minutes":case"minute":case"mins":case"min":case"m":return r*hie;case"seconds":case"second":case"secs":case"sec":case"s":return r*pie;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(jco,"parse");function $co(t){var e=Math.abs(t);return e>=S$?Math.round(t/S$)+"d":e>=mie?Math.round(t/mie)+"h":e>=hie?Math.round(t/hie)+"m":e>=pie?Math.round(t/pie)+"s":t+"ms"}a($co,"fmtShort");function Vco(t){var e=Math.abs(t);return e>=S$?rqe(t,e,S$,"day"):e>=mie?rqe(t,e,mie,"hour"):e>=hie?rqe(t,e,hie,"minute"):e>=pie?rqe(t,e,pie,"second"):t+" ms"}a(Vco,"fmtLong");function rqe(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(rqe,"plural")});var BNt=T((m$l,LYr)=>{f();function Wco(t){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=o,r.enabled=l,r.humanize=BYr(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(R==="%%")return"%";I++;let P=r.formatters[w];if(typeof P=="function"){let k=E[I];R=P.call(_,k),E.splice(I,1),I--}return R}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h=(typeof p=="string"?p:"").trim().replace(" ",",").split(",").filter(Boolean);for(let m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}a(o,"enable");function s(p,h){let m=0,g=0,A=-1,y=0;for(;m"-"+h)].join(",");return r.enable(""),p}a(c,"disable");function l(p){for(let h of r.skips)if(s(p,h))return!1;for(let h of r.names)if(s(p,h))return!0;return!1}a(l,"enabled");function u(p){return p instanceof Error?p.stack||p.message:p}a(u,"coerce");function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(d,"destroy"),r.enable(r.load()),r}a(Wco,"setup");LYr.exports=Wco});var FYr=T((lv,nqe)=>{f();lv.formatArgs=Yco;lv.save=Kco;lv.load=Jco;lv.useColors=zco;lv.storage=Xco();lv.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();lv.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zco(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(zco,"useColors");function Yco(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+nqe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(Yco,"formatArgs");lv.log=console.debug||console.log||(()=>{});function Kco(t){try{t?lv.storage.setItem("debug",t):lv.storage.removeItem("debug")}catch{}}a(Kco,"save");function Jco(){let t;try{t=lv.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(Jco,"load");function Xco(){try{return localStorage}catch{}}a(Xco,"localstorage");nqe.exports=BNt()(lv);var{formatters:Zco}=nqe.exports;Zco.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var QYr=T((_h,oqe)=>{f();var elo=require("tty"),iqe=require("util");_h.init=alo;_h.log=ilo;_h.formatArgs=rlo;_h.save=olo;_h.load=slo;_h.useColors=tlo;_h.destroy=iqe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");_h.colors=[6,2,3,4,5,1];try{let t=nLe();t&&(t.stderr||t).level>=2&&(_h.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}_h.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function tlo(){return"colors"in _h.inspectOpts?!!_h.inspectOpts.colors:elo.isatty(process.stderr.fd)}a(tlo,"useColors");function rlo(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` +`))}},SUe=class extends Error{static{a(this,"ListenerLeakError")}constructor(e,r){super(e),this.name="ListenerLeakError",this.stack=r}};Ks.ListenerLeakError=SUe;var IUe=class extends Error{static{a(this,"ListenerRefusalError")}constructor(e,r){super(e),this.name="ListenerRefusalError",this.stack=r}};Ks.ListenerRefusalError=IUe;var Kao=0,mne=class{static{a(this,"UniqueContainer")}constructor(e){this.value=e,this.id=Kao++}},Jao=2,CYr=a((t,e)=>{if(t instanceof mne)e(t);else for(let r=0;r0||this._options?.leakWarningThreshold?new Xkt(e?.onListenerError??yEe.onUnexpectedError,this._options?.leakWarningThreshold??EEe):void 0,this._perfMon=this._options?._profName?new TUe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(yYr){let e=this._listeners;queueMicrotask(()=>{CYr(e,r=>r.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,r,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let d=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],p=new IUe(`${u}. HINT: Stack shows most frequent listener (${d[1]}-times)`,d[0]);return(this._options?.onListenerError||yEe.onUnexpectedError)(p),z1.Disposable.None}if(this._disposed)return z1.Disposable.None;r&&(e=e.bind(r));let o=new mne(e),s,c;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=_Ee.create(),s=this._leakageMon.check(o.stack,this._size+1)),yYr&&(o.stack=c??_Ee.create()),this._listeners?this._listeners instanceof mne?(this._deliveryQueue??=new xUe,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let l=(0,z1.toDisposable)(()=>{s?.(),this._removeListener(o)});return a5t(l,n),l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let r=this._listeners,n=r.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*Jao<=r.length){let s=0;for(let c=0;c0}};Ks.Emitter=Qg;var Xao=a(()=>new xUe,"createEventDeliveryQueue");Ks.createEventDeliveryQueue=Xao;var xUe=class{static{a(this,"EventDeliveryQueuePrivate")}constructor(){this.i=-1,this.end=0}enqueue(e,r,n){this.i=0,this.end=n,this.current=e,this.value=r}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Zkt=class extends Qg{static{a(this,"AsyncEmitter")}async fireAsync(e,r,n){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new _Yr.LinkedList),CYr(this._listeners,o=>this._asyncDeliveryQueue.push([o.value,e]));this._asyncDeliveryQueue.size>0&&!r.isCancellationRequested;){let[o,s]=this._asyncDeliveryQueue.shift(),c=[],l={...s,token:r,waitUntil:a(u=>{if(Object.isFrozen(c))throw new Error("waitUntil can NOT be called asynchronous");n&&(u=n(u,o)),c.push(u)},"waitUntil")};try{o(l)}catch(u){(0,yEe.onUnexpectedError)(u);continue}Object.freeze(c),await Promise.allSettled(c).then(u=>{for(let d of u)d.status==="rejected"&&(0,yEe.onUnexpectedError)(d.reason)})}}};Ks.AsyncEmitter=Zkt;var wUe=class extends Qg{static{a(this,"PauseableEmitter")}get isPaused(){return this._isPaused!==0}constructor(e){super(e),this._isPaused=0,this._eventQueue=new _Yr.LinkedList,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}};Ks.PauseableEmitter=wUe;var e5t=class extends wUe{static{a(this,"DebounceEmitter")}constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}};Ks.DebounceEmitter=e5t;var t5t=class extends Qg{static{a(this,"MicrotaskEmitter")}constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(r=>super.fire(r)),this._queuedEvents=[]}))}};Ks.MicrotaskEmitter=t5t;var RUe=class{static{a(this,"EventMultiplexer")}constructor(){this.hasListeners=!1,this.events=[],this.emitter=new Qg({onWillAddFirstListener:a(()=>this.onFirstListenerAdd(),"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>this.onLastListenerRemove(),"onDidRemoveLastListener")})}get event(){return this.emitter.event}add(e){let r={event:e,listener:null};this.events.push(r),this.hasListeners&&this.hook(r);let n=a(()=>{this.hasListeners&&this.unhook(r);let o=this.events.indexOf(r);this.events.splice(o,1)},"dispose");return(0,z1.toDisposable)((0,Vao.createSingleCallFunction)(n))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(r=>this.emitter.fire(r))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(let e of this.events)e.listener?.dispose();this.events=[]}};Ks.EventMultiplexer=RUe;var r5t=class{static{a(this,"DynamicListEventMultiplexer")}constructor(e,r,n,o){this._store=new z1.DisposableStore;let s=this._store.add(new RUe),c=this._store.add(new z1.DisposableMap);function l(u){c.set(u,s.add(o(u)))}a(l,"addItem");for(let u of e)l(u);this._store.add(r(u=>{l(u)})),this._store.add(n(u=>{c.deleteAndDispose(u)})),this.event=s.event}dispose(){this._store.dispose()}};Ks.DynamicListEventMultiplexer=r5t;var n5t=class{static{a(this,"EventBufferer")}constructor(){this.data=[]}wrapEvent(e,r,n){return(o,s,c)=>e(l=>{let u=this.data[this.data.length-1];if(!r){u?u.buffers.push(()=>o.call(s,l)):o.call(s,l);return}let d=u;if(!d){o.call(s,r(n,l));return}d.items??=[],d.items.push(l),d.buffers.length===0&&u.buffers.push(()=>{d.reducedResult??=n?d.items.reduce(r,n):d.items.reduce(r),o.call(s,d.reducedResult)})},void 0,c)}bufferEvents(e){let r={buffers:new Array};this.data.push(r);let n=e();return this.data.pop(),r.buffers.forEach(o=>o()),n}};Ks.EventBufferer=n5t;var i5t=class{static{a(this,"Relay")}constructor(){this.listening=!1,this.inputEvent=bUe.None,this.inputEventListener=z1.Disposable.None,this.emitter=new Qg({onDidAddFirstListener:a(()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},"onDidAddFirstListener"),onDidRemoveLastListener:a(()=>{this.listening=!1,this.inputEventListener.dispose()},"onDidRemoveLastListener")}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}};Ks.Relay=i5t;var o5t=class{static{a(this,"ValueWithChangeEvent")}static const(e){return new s5t(e)}constructor(e){this._value=e,this._onDidChange=new Qg,this.onDidChange=this._onDidChange.event}get value(){return this._value}set value(e){e!==this._value&&(this._value=e,this._onDidChange.fire(void 0))}};Ks.ValueWithChangeEvent=o5t;var s5t=class{static{a(this,"ConstValueWithChangeEvent")}constructor(e){this.value=e,this.onDidChange=bUe.None}};function Zao(t,e,r){let n=new z1.DisposableMap,o=new Set(t());for(let c of o)n.set(c,r(c));let s=new z1.DisposableStore;return s.add(e(()=>{let c=t(),l=(0,$ao.diffSets)(o,c);for(let u of l.removed)n.deleteAndDispose(u);for(let u of l.added)n.set(u,r(u));o=new Set(c)})),s.add(n),s}a(Zao,"trackSetChanges");function a5t(t,e){e instanceof z1.DisposableStore?e.add(t):Array.isArray(e)&&e.push(t)}a(a5t,"addToDisposables");function EYr(t,e){if(e instanceof z1.DisposableStore)e.delete(t);else if(Array.isArray(e)){let r=e.indexOf(t);r!==-1&&e.splice(r,1)}t.dispose()}a(EYr,"disposeAndRemove")});var n4=T(r4=>{"use strict";f();Object.defineProperty(r4,"__esModule",{value:!0});r4.CancellationTokenPool=r4.CancellationTokenSource=r4.CancellationToken=void 0;r4.cancelOnDispose=tco;var vYr=Xa(),eco=ro(),bYr=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),PUe;(function(t){function e(r){return r===t.None||r===t.Cancelled||r instanceof gne?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}a(e,"isCancellationToken"),t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:vYr.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:bYr})})(PUe||(r4.CancellationToken=PUe={}));var gne=class{static{a(this,"MutableToken")}constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?bYr:(this._emitter||(this._emitter=new vYr.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},CEe=class{static{a(this,"CancellationTokenSource")}constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new gne),this._token}cancel(){this._token?this._token instanceof gne&&this._token.cancel():this._token=PUe.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof gne&&this._token.dispose():this._token=PUe.None}};r4.CancellationTokenSource=CEe;function tco(t){let e=new CEe;return t.add({dispose(){e.cancel()}}),e.token}a(tco,"cancelOnDispose");var c5t=class{static{a(this,"CancellationTokenPool")}constructor(){this._source=new CEe,this._listeners=new eco.DisposableStore,this._total=0,this._cancelled=0,this._isDone=!1}get token(){return this._source.token}add(e){if(this._isDone)return;if(this._total++,e.isCancellationRequested){this._cancelled++,this._check();return}let r=e.onCancellationRequested(()=>{r.dispose(),this._cancelled++,this._check()});this._listeners.add(r)}_check(){!this._isDone&&this._total>0&&this._total===this._cancelled&&(this._isDone=!0,this._listeners.dispose(),this._source.cancel())}dispose(){this._listeners.dispose(),this._source.dispose()}};r4.CancellationTokenPool=c5t});var xYr=T(Ane=>{"use strict";f();Object.defineProperty(Ane,"__esModule",{value:!0});Ane.getNLSMessages=TYr;Ane.getNLSLanguage=SYr;Ane.localize=nco;Ane.localize2=ico;function TYr(){return globalThis._VSCODE_NLS_MESSAGES}a(TYr,"getNLSMessages");function SYr(){return globalThis._VSCODE_NLS_LANGUAGE}a(SYr,"getNLSLanguage");var rco=SYr()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function kUe(t,e){let r;return e.length===0?r=t:r=t.replace(/\{(\d+)\}/g,(n,o)=>{let s=o[0],c=e[s],l=n;return typeof c=="string"?l=c:(typeof c=="number"||typeof c=="boolean"||c===void 0||c===null)&&(l=String(c)),l}),rco&&(r="\uFF3B"+r.replace(/[aouei]/g,"$&$&")+"\uFF3D"),r}a(kUe,"_format");function nco(t,e,...r){return kUe(typeof t=="number"?IYr(t,e):e,r)}a(nco,"localize");function IYr(t,e){let r=TYr()?.[t];if(typeof r!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return r}a(IYr,"lookupMessage");function ico(t,e,...r){let n;typeof t=="number"?n=IYr(t,e):n=e;let o=kUe(n,r);return{value:o,original:e===n?o:kUe(e,r)}}a(ico,"localize2")});var nF=T(er=>{"use strict";f();var oco=er&&er.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sco=er&&er.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aco=er&&er.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=0,SEe=i4.indexOf("Macintosh")>=0,d5t=(i4.indexOf("Macintosh")>=0||i4.indexOf("iPad")>=0||i4.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,bEe=i4.indexOf("Linux")>=0,OYr=i4?.indexOf("Mobi")>=0,u5t=!0,DUe=cco.getNLSLanguage()||er.LANGUAGE_DEFAULT,vEe=navigator.language.toLowerCase(),l5t=vEe):console.error("Unable to resolve platform.");function uco(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}a(uco,"PlatformToString");var NUe=0;SEe?NUe=1:TEe?NUe=3:bEe&&(NUe=2);er.isWindows=TEe;er.isMacintosh=SEe;er.isLinux=bEe;er.isLinuxSnap=kYr;er.isNative=DYr;er.isElectron=NYr;er.isWeb=u5t;er.isWebWorker=u5t&&typeof o4.importScripts=="function";er.webWorkerOrigin=er.isWebWorker?o4.origin:void 0;er.isIOS=d5t;er.isMobile=OYr;er.isCI=MYr;er.platform=NUe;er.userAgent=i4;er.language=DUe;var wYr;(function(t){function e(){return er.language}a(e,"value"),t.value=e;function r(){return er.language.length===2?er.language==="en":er.language.length>=3?er.language[0]==="e"&&er.language[1]==="n"&&er.language[2]==="-":!1}a(r,"isDefaultVariant"),t.isDefaultVariant=r;function n(){return er.language==="en"}a(n,"isDefault"),t.isDefault=n})(wYr||(er.Language=wYr={}));er.locale=vEe;er.platformLocale=l5t;er.translationsConfigFile=BYr;er.setTimeout0IsFaster=typeof o4.postMessage=="function"&&!o4.importScripts;er.setTimeout0=(()=>{if(er.setTimeout0IsFaster){let t=[];o4.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),o4.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();er.OS=SEe||d5t?2:TEe?1:3;var RYr=!0,PYr=!1;function dco(){if(!PYr){PYr=!0;let t=new Uint8Array(2);t[0]=1,t[1]=2,RYr=new Uint16Array(t.buffer)[0]===513}return RYr}a(dco,"isLittleEndian");er.isChrome=!!(er.userAgent&&er.userAgent.indexOf("Chrome")>=0);er.isFirefox=!!(er.userAgent&&er.userAgent.indexOf("Firefox")>=0);er.isSafari=!!(!er.isChrome&&er.userAgent&&er.userAgent.indexOf("Safari")>=0);er.isEdge=!!(er.userAgent&&er.userAgent.indexOf("Edg/")>=0);er.isAndroid=!!(er.userAgent&&er.userAgent.indexOf("Android")>=0);function fco(t){return parseFloat(t)>=25}a(fco,"isTahoeOrNewer")});var MUe=T(lk=>{"use strict";f();Object.defineProperty(lk,"__esModule",{value:!0});lk.arch=lk.platform=lk.env=lk.cwd=void 0;var FYr=nF(),wj,f5t=globalThis.vscode;if(typeof f5t<"u"&&typeof f5t.process<"u"){let t=f5t.process;wj={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?wj={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:wj={get platform(){return FYr.isWindows?"win32":FYr.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};lk.cwd=wj.cwd;lk.env=wj.env;lk.platform=wj.platform;lk.arch=wj.arch});var gm=T(Or=>{"use strict";f();var pco=Or&&Or.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hco=Or&&Or.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mco=Or&&Or.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=gco&&t<=yco||t>=Aco&&t<=Eco}a(a4,"isWindowsDeviceRoot");function BUe(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===Rj&&l!==-1?++l:l=-1}return o}a(BUe,"normalizeString");function vco(t){return t?`${t[0]==="."?"":"."}${t}`:""}a(vco,"formatExt");function UYr(t,e){Cco(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${vco(e.ext)}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(UYr,"_format");Or.win32={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],Pd(s,`paths[${o}]`),s.length===0)continue}else e.length===0?s=yne.cwd():(s=yne.env[`=${e}`]||yne.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===e_)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)fo(p)&&(l=1,d=!0);else if(fo(p))if(d=!0,fo(s.charCodeAt(1))){let h=2,m=h;for(;h2&&fo(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=BUe(r,!n,"\\",fo),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){Pd(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return p5t(s)?"\\":t;if(fo(s))if(o=!0,fo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&fo(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&fo(t.charCodeAt(e-1))&&(c+="\\"),!o&&n===void 0&&t.includes(":")){if(c.length>=2&&a4(c.charCodeAt(0))&&c.charCodeAt(1)===s4)return`.\\${c}`;let l=t.indexOf(":");do if(l===e-1||fo(t.charCodeAt(l+1)))return`.\\${c}`;while((l=t.indexOf(":",l+1))!==-1)}return n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){Pd(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return fo(r)||e>2&&a4(r)&&t.charCodeAt(1)===s4&&fo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&fo(r.charCodeAt(0))){++o;let s=r.length;s>1&&fo(r.charCodeAt(1))&&(++o,s>2&&(fo(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return Or.win32.normalize(e)},relative(t,e){if(Pd(t,"from"),Pd(e,"to"),t===e)return"";let r=Or.win32.resolve(t),n=Or.win32.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";if(r.length!==t.length||n.length!==e.length){let A=r.split("\\"),y=n.split("\\");A[A.length-1]===""&&A.pop(),y[y.length-1]===""&&y.pop();let E=A.length,_=y.length,v=E<_?E:_,b;for(b=0;bv?y.slice(b).join("\\"):E>v?"..\\".repeat(E-1-b)+"..":"":"..\\".repeat(E-b)+y.slice(b).join("\\")}let o=0;for(;oo&&t.charCodeAt(s-1)===e_;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===e_;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===e_)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===e_?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===e_)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===e_&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=Or.win32.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===e_){if(e.charCodeAt(1)===e_){let r=e.charCodeAt(2);if(r!==_co&&r!==Rj)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(a4(e.charCodeAt(0))&&e.charCodeAt(1)===s4&&e.charCodeAt(2)===e_)return`\\\\?\\${e}`;return e},dirname(t){Pd(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return fo(o)?t:".";if(fo(o)){if(r=n=1,fo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&fo(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(fo(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&Pd(e,"suffix"),Pd(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&a4(t.charCodeAt(0))&&t.charCodeAt(1)===s4&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(fo(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(fo(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Pd(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===s4&&a4(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(fo(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===Rj?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:UYr.bind(null,"\\"),parse(t){Pd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return fo(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(fo(o)){if(n=1,fo(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),fo(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===Rj?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null};var bco=(()=>{if(t_){let t=/\\/g;return()=>{let e=yne.cwd().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>yne.cwd()})();Or.posix={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=0&&!r;n--){let o=t[n];Pd(o,`paths[${n}]`),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===ph)}if(!r){let n=bco();e=`${n}/${e}`,r=n.charCodeAt(0)===ph}return e=BUe(e,!r,"/",p5t),r?`/${e}`:e.length>0?e:"."},normalize(t){if(Pd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ph,r=t.charCodeAt(t.length-1)===ph;return t=BUe(t,!e,"/",p5t),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Pd(t,"path"),t.length>0&&t.charCodeAt(0)===ph},join(...t){if(t.length===0)return".";let e=[];for(let r=0;r0&&e.push(n)}return e.length===0?".":Or.posix.normalize(e.join("/"))},relative(t,e){if(Pd(t,"from"),Pd(e,"to"),t===e||(t=Or.posix.resolve(t),e=Or.posix.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===ph)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===ph?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===ph)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(Pd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ph,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===ph){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&Pd(e,"suffix"),Pd(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===ph){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ph){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Pd(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t[c];if(l==="/"){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l==="."?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:UYr.bind(null,"/"),parse(t){Pd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===ph,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===ph){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===Rj?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Or.posix.win32=Or.win32.win32=Or.win32;Or.posix.posix=Or.win32.posix=Or.posix;Or.normalize=t_?Or.win32.normalize:Or.posix.normalize;Or.isAbsolute=t_?Or.win32.isAbsolute:Or.posix.isAbsolute;Or.join=t_?Or.win32.join:Or.posix.join;Or.resolve=t_?Or.win32.resolve:Or.posix.resolve;Or.relative=t_?Or.win32.relative:Or.posix.relative;Or.dirname=t_?Or.win32.dirname:Or.posix.dirname;Or.basename=t_?Or.win32.basename:Or.posix.basename;Or.extname=t_?Or.win32.extname:Or.posix.extname;Or.format=t_?Or.win32.format:Or.posix.format;Or.parse=t_?Or.win32.parse:Or.posix.parse;Or.toNamespacedPath=t_?Or.win32.toNamespacedPath:Or.posix.toNamespacedPath;Or.sep=t_?Or.win32.sep:Or.posix.sep;Or.delimiter=t_?Or.win32.delimiter:Or.posix.delimiter});var FUe=T(zx=>{"use strict";f();Object.defineProperty(zx,"__esModule",{value:!0});zx.WeakCachedFunction=zx.CachedFunction=zx.LRUCachedFunction=zx.Cache=void 0;zx.identity=LUe;var Tco=n4(),h5t=class{static{a(this,"Cache")}constructor(e){this.task=e,this.result=null}get(){if(this.result)return this.result;let e=new Tco.CancellationTokenSource,r=this.task(e.token);return this.result={promise:r,dispose:a(()=>{this.result=null,e.cancel(),e.dispose()},"dispose")},this.result}};zx.Cache=h5t;function LUe(t){return t}a(LUe,"identity");var m5t=class{static{a(this,"LRUCachedFunction")}constructor(e,r){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=LUe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);return this.lastArgKey!==r&&(this.lastArgKey=r,this.lastCache=this._fn(e)),this.lastCache}};zx.LRUCachedFunction=m5t;var g5t=class{static{a(this,"CachedFunction")}get cachedValues(){return this._map}constructor(e,r){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=LUe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);if(this._map2.has(r))return this._map2.get(r);let n=this._fn(e);return this._map.set(e,n),this._map2.set(r,n),n}};zx.CachedFunction=g5t;var A5t=class{static{a(this,"WeakCachedFunction")}constructor(e,r){this._map=new WeakMap,typeof e=="function"?(this._fn=e,this._computeKey=LUe):(this._fn=r,this._computeKey=e.getCacheKey)}get(e){let r=this._computeKey(e);if(this._map.has(r))return this._map.get(r);let n=this._fn(e);return this._map.set(r,n),n}};zx.WeakCachedFunction=A5t});var c4=T(UUe=>{"use strict";f();Object.defineProperty(UUe,"__esModule",{value:!0});UUe.Lazy=void 0;var iF;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(iF||(iF={}));var y5t=class{static{a(this,"Lazy")}constructor(e){this.executor=e,this._state=iF.Uninitialized}get hasValue(){return this._state===iF.Completed}get value(){if(this._state===iF.Uninitialized){this._state=iF.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=iF.Completed}}else if(this._state===iF.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};UUe.Lazy=y5t});var m0=T(pr=>{"use strict";f();Object.defineProperty(pr,"__esModule",{value:!0});pr.Ellipsis=pr.InvisibleCharacters=pr.AmbiguousCharacters=pr.noBreakWhitespace=pr.UTF8_BOM_CHARACTER=pr.UNUSUAL_LINE_TERMINATORS=pr.GraphemeIterator=pr.CodePointIterator=void 0;pr.isFalsyOrWhitespace=Ico;pr.format=wco;pr.format2=Pco;pr.htmlAttributeEncodeValue=kco;pr.escape=Dco;pr.escapeRegExpCharacters=GYr;pr.count=Nco;pr.truncate=Mco;pr.truncateMiddle=Oco;pr.trim=Bco;pr.ltrim=HYr;pr.rtrim=jYr;pr.convertSimple2RegExpPattern=Lco;pr.createRegExp=Fco;pr.regExpLeadsToEndlessLoop=Uco;pr.joinStrings=Qco;pr.splitLines=qco;pr.splitLinesIncludeSeparators=Gco;pr.indexOfPattern=Hco;pr.firstNonWhitespaceIndex=$Yr;pr.getLeadingWhitespace=jco;pr.lastNonWhitespaceIndex=$co;pr.getIndentationLength=Vco;pr.replaceAsync=Wco;pr.compare=zco;pr.compareSubstring=VYr;pr.compareIgnoreCase=Yco;pr.compareSubstringIgnoreCase=xEe;pr.isAsciiDigit=Kco;pr.isLowerAsciiLetter=_5t;pr.isUpperAsciiLetter=Jco;pr.equalsIgnoreCase=WYr;pr.equals=Xco;pr.startsWithIgnoreCase=Zco;pr.endsWithIgnoreCase=elo;pr.commonPrefixLength=tlo;pr.commonSuffixLength=rlo;pr.isHighSurrogate=b5t;pr.isLowSurrogate=QUe;pr.computeCodePoint=T5t;pr.getNextCodePoint=zYr;pr.nextCharLength=YYr;pr.prevCharLength=KYr;pr.getCharContainingOffset=ilo;pr.charCount=olo;pr.containsRTL=alo;pr.isBasicASCII=llo;pr.containsUnusualLineTerminators=ulo;pr.isFullWidthCharacter=dlo;pr.isEmojiImprecise=JYr;pr.lcut=flo;pr.rcut=plo;pr.forAnsiStringParts=Alo;pr.removeAnsiEscapeCodes=ZYr;pr.removeAnsiEscapeCodesFromPrompt=Elo;pr.startsWithUTF8BOM=eKr;pr.stripUTF8BOM=_lo;pr.fuzzyContains=Clo;pr.containsUppercaseCharacter=vlo;pr.uppercaseFirstLetter=blo;pr.getNLines=Tlo;pr.singleLetterHash=Slo;pr.getGraphemeBreakType=Ilo;pr.getLeftDeleteOffset=wlo;pr.multibyteAwareBtoa=Dlo;var Sco=FUe(),QYr=c4();function Ico(t){return!t||typeof t!="string"?!0:t.trim().length===0}a(Ico,"isFalsyOrWhitespace");var xco=/{(\d+)}/g;function wco(t,...e){return e.length===0?t:t.replace(xco,function(r,n){let o=parseInt(n,10);return isNaN(o)||o<0||o>=e.length?r:e[o]})}a(wco,"format");var Rco=/{([^}]+)}/g;function Pco(t,e){return Object.keys(e).length===0?t:t.replace(Rco,(r,n)=>e[n]??r)}a(Pco,"format2");function kco(t){return t.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}a(kco,"htmlAttributeEncodeValue");function Dco(t){return t.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}a(Dco,"escape");function GYr(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}a(GYr,"escapeRegExpCharacters");function Nco(t,e){let r=0,n=t.indexOf(e);for(;n!==-1;)r++,n=t.indexOf(e,n+e.length);return r}a(Nco,"count");function Mco(t,e,r=pr.Ellipsis){return t.length<=e?t:`${t.substr(0,e)}${r}`}a(Mco,"truncate");function Oco(t,e,r=pr.Ellipsis){if(t.length<=e)return t;let n=Math.ceil(e/2)-r.length/2,o=Math.floor(e/2)-r.length/2;return`${t.substr(0,n)}${r}${t.substr(t.length-o)}`}a(Oco,"truncateMiddle");function Bco(t,e=" "){let r=HYr(t,e);return jYr(r,e)}a(Bco,"trim");function HYr(t,e){if(!t||!e)return t;let r=e.length,n=0;if(r===1){let o=e.charCodeAt(0);for(;n0&&t.charCodeAt(s-1)===c;)s--;return t.substring(0,s)}let o=n;for(;o>0&&t.endsWith(e,o);)o-=r;return t.substring(0,o)}a(jYr,"rtrim");function Lco(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}a(Lco,"convertSimple2RegExpPattern");function Fco(t,e,r={}){if(!t)throw new Error("Cannot create regex from empty string");e||(t=GYr(t)),r.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"));let n="";return r.global&&(n+="g"),r.matchCase||(n+="i"),r.multiline&&(n+="m"),r.unicode&&(n+="u"),new RegExp(t,n)}a(Fco,"createRegExp");function Uco(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}a(Uco,"regExpLeadsToEndlessLoop");function Qco(t,e){return t.filter(r=>r!=null&&r!==!1).join(e)}a(Qco,"joinStrings");function qco(t){return t.split(/\r\n|\r|\n/)}a(qco,"splitLines");function Gco(t){let e=[],r=t.split(/(\r\n|\r|\n)/);for(let n=0;n=0;r--){let n=t.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}a($co,"lastNonWhitespaceIndex");function Vco(t){let e=$Yr(t);return e===-1?t.length:e}a(Vco,"getIndentationLength");function Wco(t,e,r){let n=[],o=0;for(let s of t.matchAll(e)){if(n.push(t.slice(o,s.index)),s.index===void 0)throw new Error("match.index should be defined");o=s.index+s[0].length,n.push(r(s[0],...s.slice(1),s.index,t,s.groups))}return n.push(t.slice(o)),Promise.all(n).then(s=>s.join(""))}a(Wco,"replaceAsync");function zco(t,e){return te?1:0}a(zco,"compare");function VYr(t,e,r=0,n=t.length,o=0,s=e.length){for(;rd)return 1}let c=n-r,l=s-o;return cl?1:0}a(VYr,"compareSubstring");function Yco(t,e){return xEe(t,e,0,t.length,0,e.length)}a(Yco,"compareIgnoreCase");function xEe(t,e,r=0,n=t.length,o=0,s=e.length){for(;r=128||d>=128)return VYr(t.toLowerCase(),e.toLowerCase(),r,n,o,s);_5t(u)&&(u-=32),_5t(d)&&(d-=32);let p=u-d;if(p!==0)return p}let c=n-r,l=s-o;return cl?1:0}a(xEe,"compareSubstringIgnoreCase");function Kco(t){return t>=48&&t<=57}a(Kco,"isAsciiDigit");function _5t(t){return t>=97&&t<=122}a(_5t,"isLowerAsciiLetter");function Jco(t){return t>=65&&t<=90}a(Jco,"isUpperAsciiLetter");function WYr(t,e){return t.length===e.length&&xEe(t,e)===0}a(WYr,"equalsIgnoreCase");function Xco(t,e,r){return t===e||!!r&&t!==void 0&&e!==void 0&&WYr(t,e)}a(Xco,"equals");function Zco(t,e){let r=e.length;return r<=t.length&&xEe(t,e,0,r)===0}a(Zco,"startsWithIgnoreCase");function elo(t,e){let r=t.length,n=r-e.length;return n>=0&&xEe(t,e,n,r)===0}a(elo,"endsWithIgnoreCase");function tlo(t,e){let r=Math.min(t.length,e.length),n;for(n=0;n1){let n=t.charCodeAt(e-2);if(b5t(n))return T5t(n,r)}return r}a(nlo,"getPrevCodePoint");var Ene=class{static{a(this,"CodePointIterator")}get offset(){return this._offset}constructor(e,r=0){this._str=e,this._len=e.length,this._offset=r}setOffset(e){this._offset=e}prevCodePoint(){let e=nlo(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=zYr(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}};pr.CodePointIterator=Ene;var _ne=class{static{a(this,"GraphemeIterator")}get offset(){return this._iterator.offset}constructor(e,r=0){this._iterator=new Ene(e,r)}nextGraphemeLength(){let e=IEe.getInstance(),r=this._iterator,n=r.offset,o=e.getGraphemeBreakType(r.nextCodePoint());for(;!r.eol();){let s=r.offset,c=e.getGraphemeBreakType(r.nextCodePoint());if(qYr(o,c)){r.setOffset(s);break}o=c}return r.offset-n}prevGraphemeLength(){let e=IEe.getInstance(),r=this._iterator,n=r.offset,o=e.getGraphemeBreakType(r.prevCodePoint());for(;r.offset>0;){let s=r.offset,c=e.getGraphemeBreakType(r.prevCodePoint());if(qYr(c,o)){r.setOffset(s);break}o=c}return n-r.offset}eol(){return this._iterator.eol()}};pr.GraphemeIterator=_ne;function YYr(t,e){return new _ne(t,e).nextGraphemeLength()}a(YYr,"nextCharLength");function KYr(t,e){return new _ne(t,e).prevGraphemeLength()}a(KYr,"prevCharLength");function ilo(t,e){e>0&&QUe(t.charCodeAt(e))&&e--;let r=e+YYr(t,e);return[r-KYr(t,r),r]}a(ilo,"getCharContainingOffset");function olo(t){let e=new _ne(t),r=0;for(;!e.eol();)r++,e.nextGraphemeLength();return r}a(olo,"charCount");var E5t;function slo(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}a(slo,"makeContainsRtl");function alo(t){return E5t||(E5t=slo()),E5t.test(t)}a(alo,"containsRTL");var clo=/^[\t\n\r\x20-\x7E]*$/;function llo(t){return clo.test(t)}a(llo,"isBasicASCII");pr.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function ulo(t){return pr.UNUSUAL_LINE_TERMINATORS.test(t)}a(ulo,"containsUnusualLineTerminators");function dlo(t){return t>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374||t>=65504&&t<=65510}a(dlo,"isFullWidthCharacter");function JYr(t){return t>=127462&&t<=127487||t===8986||t===8987||t===9200||t===9203||t>=9728&&t<=10175||t===11088||t===11093||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129008||t>=129280&&t<=129535||t>=129648&&t<=129782}a(JYr,"isEmojiImprecise");function flo(t,e,r=""){let n=t.trimStart();if(n.lengthe){c=!0;break}s=o.lastIndex,o.lastIndex+=1}if(!c)return n;if(s===0)return r;let l=n.substring(0,s).trimEnd();return l.length!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,mlo=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,glo=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,XYr=new RegExp("(?:"+[hlo.source,mlo.source,glo.source].join("|")+")","g");function*Alo(t){let e=0;for(let r of t.matchAll(XYr))e!==r.index&&(yield{isCode:!1,str:t.substring(e,r.index)}),yield{isCode:!0,str:r[0]},e=r.index+r[0].length;e!==t.length&&(yield{isCode:!1,str:t.substring(e)})}a(Alo,"forAnsiStringParts");function ZYr(t){return t&&(t=t.replace(XYr,"")),t}a(ZYr,"removeAnsiEscapeCodes");var ylo=/\\\[.*?\\\]/g;function Elo(t){return ZYr(t).replace(ylo,"")}a(Elo,"removeAnsiEscapeCodesFromPrompt");pr.UTF8_BOM_CHARACTER="\uFEFF";function eKr(t){return!!(t&&t.length>0&&t.charCodeAt(0)===65279)}a(eKr,"startsWithUTF8BOM");function _lo(t){return eKr(t)?t.substr(1):t}a(_lo,"stripUTF8BOM");function Clo(t,e){if(!t||!e||t.length0&&r>=0);return r===-1?t:(t[r-1]==="\r"&&r--,t.substr(0,r))}a(Tlo,"getNLines");function Slo(t){return t=t%52,t<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}a(Slo,"singleLetterHash");function Ilo(t){return IEe.getInstance().getGraphemeBreakType(t)}a(Ilo,"getGraphemeBreakType");function qYr(t,e){return t===0?e!==5&&e!==7:t===2&&e===3?!1:t===4||t===2||t===3||e===4||e===2||e===3?!0:!(t===8&&(e===8||e===9||e===11||e===12)||(t===11||t===9)&&(e===9||e===10)||(t===12||t===10)&&e===10||e===5||e===13||e===7||t===1||t===13&&e===14||t===6&&e===6)}a(qYr,"breakBetweenGraphemeBreakType");var IEe=class t{static{a(this,"GraphemeBreakTree")}static{this._INSTANCE=null}static getInstance(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE}constructor(){this._data=xlo()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let r=this._data,n=r.length/3,o=1;for(;o<=n;)if(er[3*o+1])o=2*o+1;else return r[3*o+2];return 0}};function xlo(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}a(xlo,"getGraphemeBreakRawData");function wlo(t,e){if(t===0)return 0;let r=Rlo(t,e);if(r!==void 0)return r;let n=new Ene(e,t);return n.prevCodePoint(),n.offset}a(wlo,"getLeftDeleteOffset");function Rlo(t,e){let r=new Ene(e,t),n=r.prevCodePoint();for(;Plo(n)||n===65039||n===8419;){if(r.offset===0)return;n=r.prevCodePoint()}if(!JYr(n))return;let o=r.offset;return o>0&&r.prevCodePoint()===8205&&(o=r.offset),o}a(Rlo,"getOffsetBeforeLastEmojiComponent");function Plo(t){return 127995<=t&&t<=127999}a(Plo,"isEmojiModifier");pr.noBreakWhitespace="\xA0";var C5t=class t{static{a(this,"AmbiguousCharacters")}static{this.ambiguousCharacterData=new QYr.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new Sco.LRUCachedFunction(e=>{let r=e.split(",");function n(h){let m=new Map;for(let g=0;g!h.startsWith("_")&&Object.hasOwn(c,h));l.length===0&&(l=["_default"]);let u;for(let h of l){let m=n(c[h]);u=s(u,m)}let d=n(c._common),p=o(d,u);return new t(p)})}static getInstance(e){return t.cache.get(Array.from(e).join(","))}static{this._locales=new QYr.Lazy(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}containsAmbiguousCharacter(e){for(let r=0;r{"use strict";f();Object.defineProperty(pp,"__esModule",{value:!0});pp.isPathSeparator=l4;pp.toSlashes=tKr;pp.toPosixPath=Mlo;pp.getRoot=Olo;pp.isUNC=Blo;pp.isValidBasename=Qlo;pp.isEqual=qlo;pp.isEqualOrParent=Glo;pp.isWindowsDriveLetter=S5t;pp.sanitizeFilePath=Hlo;pp.removeTrailingPathSeparator=rKr;pp.isRootOrDriveLetter=jlo;pp.hasDriveLetter=I5t;pp.getDriveLetter=$lo;pp.indexOfPath=Vlo;pp.parseLineAndColumnAware=Wlo;pp.randomPath=Klo;var r_=gm(),oF=nF(),qUe=m0(),Nlo=W1();function l4(t){return t===47||t===92}a(l4,"isPathSeparator");function tKr(t){return t.replace(/[\\/]/g,r_.posix.sep)}a(tKr,"toSlashes");function Mlo(t){return t.indexOf("/")===-1&&(t=tKr(t)),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t),t}a(Mlo,"toPosixPath");function Olo(t,e=r_.posix.sep){if(!t)return"";let r=t.length,n=t.charCodeAt(0);if(l4(n)){if(l4(t.charCodeAt(1))&&!l4(t.charCodeAt(2))){let s=3,c=s;for(;s\|]/g,Flo=/[/]/g,Ulo=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function Qlo(t,e=oF.isWindows){let r=e?Llo:Flo;return!(!t||t.length===0||/^\s+$/.test(t)||(r.lastIndex=0,r.test(t))||e&&Ulo.test(t)||t==="."||t===".."||e&&t[t.length-1]==="."||e&&t.length!==t.trim().length||t.length>255)}a(Qlo,"isValidBasename");function qlo(t,e,r){let n=t===e;return!r||n?n:!t||!e?!1:(0,qUe.equalsIgnoreCase)(t,e)}a(qlo,"isEqual");function Glo(t,e,r,n=r_.sep){if(t===e)return!0;if(!t||!e||e.length>t.length)return!1;if(r){if(!(0,qUe.startsWithIgnoreCase)(t,e))return!1;if(e.length===t.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,t.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),t.indexOf(e)===0}a(Glo,"isEqualOrParent");function S5t(t){return t>=65&&t<=90||t>=97&&t<=122}a(S5t,"isWindowsDriveLetter");function Hlo(t,e){return oF.isWindows&&t.endsWith(":")&&(t+=r_.sep),(0,r_.isAbsolute)(t)||(t=(0,r_.join)(e,t)),t=(0,r_.normalize)(t),rKr(t)}a(Hlo,"sanitizeFilePath");function rKr(t){return oF.isWindows?(t=(0,qUe.rtrim)(t,r_.sep),t.endsWith(":")&&(t+=r_.sep)):(t=(0,qUe.rtrim)(t,r_.sep),t||(t=r_.sep)),t}a(rKr,"removeTrailingPathSeparator");function jlo(t){let e=(0,r_.normalize)(t);return oF.isWindows?t.length>3?!1:I5t(e)&&(t.length===2||e.charCodeAt(2)===92):e===r_.posix.sep}a(jlo,"isRootOrDriveLetter");function I5t(t,e=oF.isWindows){return e?S5t(t.charCodeAt(0))&&t.charCodeAt(1)===58:!1}a(I5t,"hasDriveLetter");function $lo(t,e=oF.isWindows){return I5t(t,e)?t[0]:void 0}a($lo,"getDriveLetter");function Vlo(t,e,r){return e.length>t.length?-1:t===e?0:(r&&(t=t.toLowerCase(),e=e.toLowerCase()),t.indexOf(e))}a(Vlo,"indexOfPath");function Wlo(t){let e=t.split(":"),r,n,o;for(let s of e){let c=Number(s);(0,Nlo.isNumber)(c)?n===void 0?n=c:o===void 0&&(o=c):r=r?[r,s].join(":"):s}if(!r)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:r,line:n!==void 0?n:void 0,column:o!==void 0?o:n!==void 0?1:void 0}}a(Wlo,"parseLineAndColumnAware");var zlo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Ylo="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function Klo(t,e,r=8){let n="";for(let s=0;s{"use strict";f();var Jlo=kT&&kT.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Xlo=kT&&kT.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Zlo=kT&&kT.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o"u")&&(typeof t.path=="string"||typeof t.path>"u")&&(typeof t.query=="string"||typeof t.query>"u")&&(typeof t.fragment=="string"||typeof t.fragment>"u")}a(auo,"isUriComponents");var sKr=HUe.isWindows?1:void 0,sF=class extends jUe{static{a(this,"Uri")}constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=$Ue(this,!1)),this._fsPath}toString(e=!1){return e?w5t(this,!0):(this._formatted||(this._formatted=w5t(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=sKr),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},aKr={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function iKr(t,e,r){let n,o=-1;for(let s=0;s=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===45||c===46||c===95||c===126||e&&c===47||r&&c===91||r&&c===93||r&&c===58)o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n!==void 0&&(n+=t.charAt(s));else{n===void 0&&(n=t.substr(0,s));let l=aKr[c];l!==void 0?(o!==-1&&(n+=encodeURIComponent(t.substring(o,s)),o=-1),n+=l):o===-1&&(o=s)}}return o!==-1&&(n+=encodeURIComponent(t.substring(o))),n!==void 0?n:t}a(iKr,"encodeURIComponentFast");function cuo(t){let e;for(let r=0;r1&&t.scheme==="file"?r=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?r=t.path.substr(1):r=t.path[1].toLowerCase()+t.path.substr(2):r=t.path,HUe.isWindows&&(r=r.replace(/\//g,"\\")),r}a($Ue,"uriToFsPath");function w5t(t,e){let r=e?cuo:iKr,n="",{scheme:o,authority:s,path:c,query:l,fragment:u}=t;if(o&&(n+=o,n+=":"),(s||o==="file")&&(n+=Yx,n+=Yx),s){let d=s.indexOf("@");if(d!==-1){let p=s.substr(0,d);s=s.substr(d+1),d=p.lastIndexOf(":"),d===-1?n+=r(p,!1,!1):(n+=r(p.substr(0,d),!1,!1),n+=":",n+=r(p.substr(d+1),!1,!0)),n+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,d),!1,!0),n+=s.substr(d))}if(c){if(c.length>=3&&c.charCodeAt(0)===47&&c.charCodeAt(2)===58){let d=c.charCodeAt(1);d>=65&&d<=90&&(c=`/${String.fromCharCode(d+32)}:${c.substr(3)}`)}else if(c.length>=2&&c.charCodeAt(1)===58){let d=c.charCodeAt(0);d>=65&&d<=90&&(c=`${String.fromCharCode(d+32)}:${c.substr(2)}`)}n+=r(c,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=e?u:iKr(u,!1,!1)),n}a(w5t,"_asFormatted");function cKr(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+cKr(t.substr(3)):t}}a(cKr,"decodeURIComponentGraceful");var oKr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function GUe(t){return t.match(oKr)?t.replace(oKr,e=>cKr(e)):t}a(GUe,"percentDecode")});var kj=T(So=>{"use strict";f();var luo=So&&So.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),uuo=So&&So.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),N5t=So&&So.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;odKr(t,r))}a(fuo,"matchesSomeScheme");So.connectionTokenCookieName="vscode-tkn";So.connectionTokenQueryName="tkn";var k5t=class{static{a(this,"RemoteAuthoritiesImpl")}constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}setDelegate(e){this._delegate=e}setServerRootPath(e,r){this._serverRootPath=P5t.posix.join(r??"/",fKr(e))}getServerRootPath(){return this._serverRootPath}get _remoteResourcesPath(){return P5t.posix.join(this._serverRootPath,uk.vscodeRemoteResource)}set(e,r,n){this._hosts[e]=r,this._ports[e]=n}setConnectionToken(e,r){this._connectionTokens[e]=r}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(l){return duo.onUnexpectedError(l),e}let r=e.authority,n=this._hosts[r];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let o=this._ports[r],s=this._connectionTokens[r],c=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(c+=`&${So.connectionTokenQueryName}=${encodeURIComponent(s)}`),Pj.URI.from({scheme:R5t.isWeb?this._preferredWebSchema:uk.vscodeRemoteResource,authority:`${n}:${o}`,path:this._remoteResourcesPath,query:c})}};So.RemoteAuthorities=new k5t;function fKr(t){return`${t.quality??"oss"}-${t.commit??"dev"}`}a(fKr,"getServerProductSegment");So.builtinExtensionsPath="vs/../../extensions";So.nodeModulesPath="vs/../../node_modules";So.nodeModulesAsarPath="vs/../../node_modules.asar";So.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";So.VSCODE_AUTHORITY="vscode-app";var D5t=class t{static{a(this,"FileAccessImpl")}static{this.FALLBACK_AUTHORITY=So.VSCODE_AUTHORITY}asBrowserUri(e){let r=this.toUri(e);return this.uriToBrowserUri(r)}uriToBrowserUri(e){return e.scheme===uk.vscodeRemote?So.RemoteAuthorities.rewrite(e):e.scheme===uk.file&&(R5t.isNative||R5t.webWorkerOrigin===`${uk.vscodeFileResource}://${t.FALLBACK_AUTHORITY}`)?e.with({scheme:uk.vscodeFileResource,authority:e.authority||t.FALLBACK_AUTHORITY,query:null,fragment:null}):e}asFileUri(e){let r=this.toUri(e);return this.uriToFileUri(r)}uriToFileUri(e){return e.scheme===uk.vscodeFileResource?e.with({scheme:uk.file,authority:e.authority!==t.FALLBACK_AUTHORITY?e.authority:null,query:null,fragment:null}):e}toUri(e){if(Pj.URI.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return Pj.URI.joinPath(Pj.URI.parse(r,!0),e);let n=P5t.join(r,e);return Pj.URI.file(n)}throw new Error("Cannot determine URI for module id!")}};So.FileAccess=new D5t;So.CacheControlheaders=Object.freeze({"Cache-Control":"no-cache, no-store"});So.DocumentPolicyheaders=Object.freeze({"Document-Policy":"include-js-call-stacks-in-crash-reports"});var uKr;(function(t){let e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));let r="vscode-coi";function n(s){let c;typeof s=="string"?c=new URL(s).searchParams:s instanceof URL?c=s.searchParams:Pj.URI.isUri(s)&&(c=new URL(s.toString(!0)).searchParams);let l=c?.get(r);if(l)return e.get(l)}a(n,"getHeadersFromQuery"),t.getHeadersFromQuery=n;function o(s,c,l){if(!globalThis.crossOriginIsolated)return;let u=c&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(r,u):s[r]=u}a(o,"addSearchParam"),t.addSearchParam=o})(uKr||(So.COI=uKr={}))});var fk=T(ir=>{"use strict";f();var puo=ir&&ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),huo=ir&&ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mKr=ir&&ir.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oCne.getRoot(n).length&&n[n.length-1]===r}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,r=oy.sep){return(0,ir.hasTrailingPathSeparator)(e,r)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,r=oy.sep){let n=!1;if(e.scheme===aF.Schemas.file){let o=dk(e);n=o!==void 0&&o.length===Cne.getRoot(o).length&&o[o.length-1]===r}else{r="/";let o=e.path;n=o.length===1&&o.charCodeAt(o.length-1)===47}return!n&&!(0,ir.hasTrailingPathSeparator)(e,r)?e.with({path:e.path+"/"}):e}};ir.ExtUri=vne;ir.extUri=new vne(()=>!1);ir.extUriBiasedIgnorePathCase=new vne(t=>t.scheme===aF.Schemas.file?!gKr.isLinux:!0);ir.extUriIgnorePathCase=new vne(t=>!0);ir.isEqual=ir.extUri.isEqual.bind(ir.extUri);ir.isEqualOrParent=ir.extUri.isEqualOrParent.bind(ir.extUri);ir.getComparisonKey=ir.extUri.getComparisonKey.bind(ir.extUri);ir.basenameOrAuthority=ir.extUri.basenameOrAuthority.bind(ir.extUri);ir.basename=ir.extUri.basename.bind(ir.extUri);ir.extname=ir.extUri.extname.bind(ir.extUri);ir.dirname=ir.extUri.dirname.bind(ir.extUri);ir.joinPath=ir.extUri.joinPath.bind(ir.extUri);ir.normalizePath=ir.extUri.normalizePath.bind(ir.extUri);ir.relativePath=ir.extUri.relativePath.bind(ir.extUri);ir.resolvePath=ir.extUri.resolvePath.bind(ir.extUri);ir.isAbsolutePath=ir.extUri.isAbsolutePath.bind(ir.extUri);ir.isEqualAuthority=ir.extUri.isEqualAuthority.bind(ir.extUri);ir.hasTrailingPathSeparator=ir.extUri.hasTrailingPathSeparator.bind(ir.extUri);ir.removeTrailingPathSeparator=ir.extUri.removeTrailingPathSeparator.bind(ir.extUri);ir.addTrailingPathSeparator=ir.extUri.addTrailingPathSeparator.bind(ir.extUri);function muo(t,e){let r=[];for(let n=0;nc===n?!1:(0,ir.isEqualOrParent)(o,e(s)))||r.push(t[n])}return r}a(muo,"distinctParents");var hKr;(function(t){t.META_DATA_LABEL="label",t.META_DATA_DESCRIPTION="description",t.META_DATA_SIZE="size",t.META_DATA_MIME="mime";function e(r){let n=new Map;r.path.substring(r.path.indexOf(";")+1,r.path.lastIndexOf(";")).split(";").forEach(c=>{let[l,u]=c.split(":");l&&u&&n.set(l,u)});let s=r.path.substring(0,r.path.indexOf(";"));return s&&n.set(t.META_DATA_MIME,s),n}a(e,"parseMetaData"),t.parseMetaData=e})(hKr||(ir.DataUri=hKr={}));function guo(t,e,r){if(e){let n=t.path;return n&&n[0]!==oy.posix.sep&&(n=oy.posix.sep+n),t.with({scheme:r,authority:e,path:n})}return t.with({scheme:r})}a(guo,"toLocalResource")});var AKr=T(VUe=>{"use strict";f();Object.defineProperty(VUe,"__esModule",{value:!0});VUe.MicrotaskDelay=void 0;VUe.MicrotaskDelay=Symbol("MicrotaskDelay")});var vc=T(Zt=>{"use strict";f();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.AsyncReader=Zt.AsyncReaderEndOfStream=Zt.CancelableAsyncIterableProducer=Zt.AsyncIterableProducer=Zt.AsyncIterableSource=Zt.AsyncIterableObject=Zt.LazyStatefulPromise=Zt.StatefulPromise=Zt.Promises=Zt.DeferredPromise=Zt.IntervalCounter=Zt.TaskSequentializer=Zt.GlobalIdleValue=Zt.AbstractIdleValue=Zt._runWhenIdle=Zt.runWhenGlobalIdle=Zt.ThrottledWorker=Zt.RunOnceWorker=Zt.ProcessTimeRunOnceScheduler=Zt.RunOnceScheduler=Zt.IntervalTimer=Zt.TimeoutTimer=Zt.TaskQueue=Zt.ResourceQueue=Zt.LimitedQueue=Zt.Queue=Zt.Limiter=Zt.AutoOpenBarrier=Zt.Barrier=Zt.ThrottledDelayer=Zt.Delayer=Zt.SequencerByKey=Zt.Sequencer=Zt.Throttler=void 0;Zt.isThenable=_Kr;Zt.createCancelablePromise=CKr;Zt.raceCancellation=vKr;Zt.raceCancellationError=_uo;Zt.notCancellablePromise=Cuo;Zt.raceCancellablePromises=vuo;Zt.raceTimeout=bKr;Zt.asPromise=buo;Zt.promiseWithResolvers=TKr;Zt.timeout=Z5t;Zt.disposableTimeout=Iuo;Zt.sequence=xuo;Zt.first=wuo;Zt.firstParallel=Ruo;Zt.retry=Puo;Zt.createCancelableAsyncIterableProducer=kuo;Zt.cancellableIterable=Duo;var X5t=n4(),n_=Ko(),REe=Xa(),bne=ro(),yKr=fk(),Auo=nF(),yuo=AKr(),Euo=c4();function _Kr(t){return!!t&&typeof t.then=="function"}a(_Kr,"isThenable");function CKr(t){let e=new X5t.CancellationTokenSource,r=t(e.token),n=!1,o=new Promise((s,c)=>{let l=e.token.onCancellationRequested(()=>{n=!0,l.dispose(),c(new n_.CancellationError)});Promise.resolve(r).then(u=>{l.dispose(),e.dispose(),n?(0,bne.isDisposable)(u)&&u.dispose():s(u)},u=>{l.dispose(),e.dispose(),c(u)})});return new class{cancel(){e.cancel(),e.dispose()}then(s,c){return o.then(s,c)}catch(s){return this.then(void 0,s)}finally(s){return o.finally(s)}}}a(CKr,"createCancelablePromise");function vKr(t,e,r){return new Promise((n,o)=>{let s=e.onCancellationRequested(()=>{s.dispose(),n(r)});t.then(n,o).finally(()=>s.dispose())})}a(vKr,"raceCancellation");function _uo(t,e){return new Promise((r,n)=>{let o=e.onCancellationRequested(()=>{o.dispose(),n(new n_.CancellationError)});t.then(r,n).finally(()=>o.dispose())})}a(_uo,"raceCancellationError");function Cuo(t){return new Promise((e,r)=>{t.then(e,r)})}a(Cuo,"notCancellablePromise");function vuo(t){let e=-1,r=t.map((o,s)=>o.then(c=>(e=s,c))),n=Promise.race(r);return n.cancel=()=>{t.forEach((o,s)=>{s!==e&&o.cancel&&o.cancel()})},n.finally(()=>{n.cancel()}),n}a(vuo,"raceCancellablePromises");function bKr(t,e,r){let n,o=setTimeout(()=>{n?.(void 0),r?.()},e);return Promise.race([t.finally(()=>clearTimeout(o)),new Promise(s=>n=s)])}a(bKr,"raceTimeout");function buo(t){return new Promise((e,r)=>{let n=t();_Kr(n)?n.then(e,r):e(n)})}a(buo,"asPromise");function TKr(){let t,e;return{promise:new Promise((n,o)=>{t=n,e=o}),resolve:t,reject:e}}a(TKr,"promiseWithResolvers");var WUe=class{static{a(this,"Throttler")}constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null,this.cancellationTokenSource=new X5t.CancellationTokenSource}queue(e){if(this.cancellationTokenSource.token.isCancellationRequested)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let r=a(()=>{if(this.queuedPromise=null,this.cancellationTokenSource.token.isCancellationRequested)return;let n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n},"onComplete");this.queuedPromise=new Promise(n=>{this.activePromise.then(r,r).then(n)})}return new Promise((r,n)=>{this.queuedPromise.then(r,n)})}return this.activePromise=e(this.cancellationTokenSource.token),new Promise((r,n)=>{this.activePromise.then(o=>{this.activePromise=null,r(o)},o=>{this.activePromise=null,n(o)})})}dispose(){this.cancellationTokenSource.cancel()}};Zt.Throttler=WUe;var M5t=class{static{a(this,"Sequencer")}constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e(),()=>e())}};Zt.Sequencer=M5t;var O5t=class{static{a(this,"SequencerByKey")}constructor(){this.promiseMap=new Map}queue(e,r){let o=(this.promiseMap.get(e)??Promise.resolve()).catch(()=>{}).then(r).finally(()=>{this.promiseMap.get(e)===o&&this.promiseMap.delete(e)});return this.promiseMap.set(e,o),o}peek(e){return this.promiseMap.get(e)||void 0}keys(){return this.promiseMap.keys()}};Zt.SequencerByKey=O5t;var Tuo=a((t,e)=>{let r=!0,n=setTimeout(()=>{r=!1,e()},t);return{isTriggered:a(()=>r,"isTriggered"),dispose:a(()=>{clearTimeout(n),r=!1},"dispose")}},"timeoutDeferred"),Suo=a(t=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,t())}),{isTriggered:a(()=>e,"isTriggered"),dispose:a(()=>{e=!1},"dispose")}},"microtaskDeferred"),zUe=class{static{a(this,"Delayer")}constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,r=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((o,s)=>{this.doResolve=o,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let o=this.task;return this.task=null,o()}}));let n=a(()=>{this.deferred=null,this.doResolve?.(null)},"fn");return this.deferred=r===yuo.MicrotaskDelay?Suo(n):Tuo(r,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new n_.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}};Zt.Delayer=zUe;var B5t=class{static{a(this,"ThrottledDelayer")}constructor(e){this.delayer=new zUe(e),this.throttler=new WUe}trigger(e,r){return this.delayer.trigger(()=>this.throttler.queue(e),r)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}};Zt.ThrottledDelayer=B5t;var YUe=class{static{a(this,"Barrier")}constructor(){this._isOpen=!1,this._promise=new Promise((e,r)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}};Zt.Barrier=YUe;var L5t=class extends YUe{static{a(this,"AutoOpenBarrier")}constructor(e){super(),this._timeout=setTimeout(()=>this.open(),e)}open(){clearTimeout(this._timeout),super.open()}};Zt.AutoOpenBarrier=L5t;function Z5t(t,e){return e?new Promise((r,n)=>{let o=setTimeout(()=>{s.dispose(),r()},t),s=e.onCancellationRequested(()=>{clearTimeout(o),s.dispose(),n(new n_.CancellationError)})}):CKr(r=>Z5t(t,r))}a(Z5t,"timeout");function Iuo(t,e=0,r){let n=setTimeout(()=>{t(),r&&o.dispose()},e),o=(0,bne.toDisposable)(()=>{clearTimeout(n),r?.delete(o)});return r?.add(o),o}a(Iuo,"disposableTimeout");function xuo(t){let e=[],r=0,n=t.length;function o(){return r!!n,r=null){let n=0,o=t.length,s=a(()=>{if(n>=o)return Promise.resolve(r);let c=t[n++];return Promise.resolve(c()).then(u=>e(u)?Promise.resolve(u):s())},"loop");return s()}a(wuo,"first");function Ruo(t,e=n=>!!n,r=null){if(t.length===0)return Promise.resolve(r);let n=t.length,o=a(()=>{n=-1;for(let s of t)s.cancel?.()},"finish");return new Promise((s,c)=>{for(let l of t)l.then(u=>{--n>=0&&e(u)?(o(),s(u)):n===0&&s(r)}).catch(u=>{--n>=0&&(o(),c(u))})})}a(Ruo,"firstParallel");var KUe=class{static{a(this,"Limiter")}constructor(e){this._size=0,this._isDisposed=!1,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new REe.Emitter}whenIdle(){return this.size>0?REe.Event.toPromise(this.onDrained):Promise.resolve()}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(e){if(this._isDisposed)throw new Error("Object has been disposed");return this._size++,new Promise((r,n)=>{this.outstandingPromises.push({factory:e,c:r,e:n}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this._isDisposed||(this.runningPromises--,--this._size===0&&this._onDrained.fire(),this.outstandingPromises.length>0&&this.consume())}clear(){if(this._isDisposed)throw new Error("Object has been disposed");this.outstandingPromises.length=0,this._size=this.runningPromises}dispose(){this._isDisposed=!0,this.outstandingPromises.length=0,this._size=0,this._onDrained.dispose()}};Zt.Limiter=KUe;var JUe=class extends KUe{static{a(this,"Queue")}constructor(){super(1)}};Zt.Queue=JUe;var F5t=class{static{a(this,"LimitedQueue")}constructor(){this.sequentializer=new ZUe,this.tasks=0}queue(e){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,e())):this.sequentializer.run(this.tasks++,e())}};Zt.LimitedQueue=F5t;var U5t=class{static{a(this,"ResourceQueue")}constructor(){this.queues=new Map,this.drainers=new Set,this.drainListeners=void 0,this.drainListenerCount=0}async whenDrained(){if(this.isDrained())return;let e=new u4;return this.drainers.add(e),e.p}isDrained(){for(let[,e]of this.queues)if(e.size>0)return!1;return!0}queueSize(e,r=yKr.extUri){let n=r.getComparisonKey(e);return this.queues.get(n)?.size??0}queueFor(e,r,n=yKr.extUri){let o=n.getComparisonKey(e),s=this.queues.get(o);if(!s){s=new JUe;let c=this.drainListenerCount++,l=REe.Event.once(s.onDrained)(()=>{s?.dispose(),this.queues.delete(o),this.onDidQueueDrain(),this.drainListeners?.deleteAndDispose(c),this.drainListeners?.size===0&&(this.drainListeners.dispose(),this.drainListeners=void 0)});this.drainListeners||(this.drainListeners=new bne.DisposableMap),this.drainListeners.set(c,l),this.queues.set(o,s)}return s.queue(r)}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(let e of this.drainers)e.complete();this.drainers.clear()}dispose(){for(let[,e]of this.queues)e.dispose();this.queues.clear(),this.releaseDrainers(),this.drainListeners?.dispose()}};Zt.ResourceQueue=U5t;var Q5t=class{static{a(this,"TaskQueue")}constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){let r=new u4;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),r.p}scheduleSkipIfCleared(e){let r=new u4;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!0}),this._runIfNotRunning(),r.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingTasks.length===0)return;let e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new n_.BugIndicatingError;this._runningTask=e.task;try{let r=await e.task();e.deferred.complete(r)}catch(r){e.deferred.error(r)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){let e=this._pendingTasks;this._pendingTasks=[];for(let r of e)r.setUndefinedWhenCleared?r.deferred.complete(void 0):r.deferred.error(new n_.CancellationError)}};Zt.TaskQueue=Q5t;var q5t=class{static{a(this,"TimeoutTimer")}constructor(e,r){this._isDisposed=!1,this._token=void 0,typeof e=="function"&&typeof r=="number"&&this.setIfNotSet(e,r)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==void 0&&(clearTimeout(this._token),this._token=void 0)}cancelAndSet(e,r){if(this._isDisposed)throw new n_.BugIndicatingError("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=void 0,e()},r)}setIfNotSet(e,r){if(this._isDisposed)throw new n_.BugIndicatingError("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===void 0&&(this._token=setTimeout(()=>{this._token=void 0,e()},r))}};Zt.TimeoutTimer=q5t;var G5t=class{static{a(this,"IntervalTimer")}constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,r,n=globalThis){if(this.isDisposed)throw new n_.BugIndicatingError("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let o=n.setInterval(()=>{e()},r);this.disposable=(0,bne.toDisposable)(()=>{n.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};Zt.IntervalTimer=G5t;var PEe=class{static{a(this,"RunOnceScheduler")}constructor(e,r){this.timeoutToken=void 0,this.runner=e,this.timeout=r,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=void 0)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==void 0}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=void 0,this.runner&&this.doRun()}doRun(){this.runner?.()}};Zt.RunOnceScheduler=PEe;var H5t=class{static{a(this,"ProcessTimeRunOnceScheduler")}constructor(e,r){r%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${r}ms is not a multiple of 1000ms.`),this.runner=e,this.timeout=r,this.counter=0,this.intervalToken=void 0,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=void 0)}schedule(e=this.timeout){e%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${e}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(e/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==void 0}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=void 0,this.runner?.())}};Zt.ProcessTimeRunOnceScheduler=H5t;var j5t=class extends PEe{static{a(this,"RunOnceWorker")}constructor(e,r){super(e,r),this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){let e=this.units;this.units=[],this.runner?.(e)}dispose(){this.units=[],super.dispose()}};Zt.RunOnceWorker=j5t;var $5t=class extends bne.Disposable{static{a(this,"ThrottledWorker")}constructor(e,r){super(),this.options=e,this.handler=r,this.pendingWork=[],this.throttler=this._register(new bne.MutableDisposable),this.disposed=!1,this.lastExecutionTime=0}get pending(){return this.pendingWork.length}work(e){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+e.length>this.options.maxBufferedWork)return!1}else if(this.pending+e.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(let n of e)this.pendingWork.push(n);let r=Date.now()-this.lastExecutionTime;return!this.throttler.value&&(!this.options.waitThrottleDelayBetweenWorkUnits||r>=this.options.throttleDelay)?this.doWork():!this.throttler.value&&this.options.waitThrottleDelayBetweenWorkUnits&&this.scheduleThrottler(Math.max(this.options.throttleDelay-r,0)),!0}doWork(){this.lastExecutionTime=Date.now(),this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&this.scheduleThrottler()}scheduleThrottler(e=this.options.throttleDelay){this.throttler.value=new PEe(()=>{this.throttler.clear(),this.doWork()},e),this.throttler.value.schedule()}dispose(){super.dispose(),this.pendingWork.length=0,this.disposed=!0}};Zt.ThrottledWorker=$5t;(function(){let t=globalThis;typeof t.requestIdleCallback!="function"||typeof t.cancelIdleCallback!="function"?Zt._runWhenIdle=(e,r,n)=>{(0,Auo.setTimeout0)(()=>{if(o)return;let s=Date.now()+15;r(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let o=!1;return{dispose(){o||(o=!0)}}}:Zt._runWhenIdle=(e,r,n)=>{let o=e.requestIdleCallback(r,typeof n=="number"?{timeout:n}:void 0),s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(o))}}},Zt.runWhenGlobalIdle=(e,r)=>(0,Zt._runWhenIdle)(globalThis,e,r)})();var XUe=class{static{a(this,"AbstractIdleValue")}constructor(e,r){this._didRun=!1,this._executor=()=>{try{this._value=r()}catch(n){this._error=n}finally{this._didRun=!0}},this._handle=(0,Zt._runWhenIdle)(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}};Zt.AbstractIdleValue=XUe;var V5t=class extends XUe{static{a(this,"GlobalIdleValue")}constructor(e){super(globalThis,e)}};Zt.GlobalIdleValue=V5t;async function Puo(t,e,r){let n;for(let o=0;on?.(),"cancel"),promise:r},r.then(()=>this.doneRunning(e),()=>this.doneRunning(e)),r}doneRunning(e){this._running&&e===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){let e=this._queued;this._queued=void 0,e.run().then(e.promiseResolve,e.promiseReject)}}queue(e){if(this._queued)this._queued.run=e;else{let{promise:r,resolve:n,reject:o}=TKr();this._queued={run:e,promise:r,promiseResolve:n,promiseReject:o}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}};Zt.TaskSequentializer=ZUe;var W5t=class{static{a(this,"IntervalCounter")}constructor(e,r=()=>Date.now()){this.interval=e,this.nowFn=r,this.lastIncrementTime=0,this.value=0}increment(){let e=this.nowFn();return e-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=e,this.value=0),this.value++,this.value}};Zt.IntervalCounter=W5t;var u4=class t{static{a(this,"DeferredPromise")}static fromPromise(e){let r=new t;return r.settleWith(e),r}get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((e,r)=>{this.completeCallback=e,this.errorCallback=r})}complete(e){return this.isSettled?Promise.resolve():new Promise(r=>{this.completeCallback(e),this.outcome={outcome:0,value:e},r()})}error(e){return this.isSettled?Promise.resolve():new Promise(r=>{this.errorCallback(e),this.outcome={outcome:1,value:e},r()})}settleWith(e){return e.then(r=>this.complete(r),r=>this.error(r))}cancel(){return this.error(new n_.CancellationError)}};Zt.DeferredPromise=u4;var EKr;(function(t){async function e(n){let o,s=await Promise.all(n.map(c=>c.then(l=>l,l=>{o||(o=l)})));if(typeof o<"u")throw o;return s}a(e,"settled"),t.settled=e;function r(n){return new Promise(async(o,s)=>{try{await n(o,s)}catch(c){s(c)}})}a(r,"withAsyncBody"),t.withAsyncBody=r})(EKr||(Zt.Promises=EKr={}));var eQe=class{static{a(this,"StatefulPromise")}get value(){return this._value}get error(){return this._error}get isResolved(){return this._isResolved}constructor(e){this._value=void 0,this._error=void 0,this._isResolved=!1,this.promise=e.then(r=>(this._value=r,this._isResolved=!0,r),r=>{throw this._error=r,this._isResolved=!0,r})}requireValue(){if(!this._isResolved)throw new n_.BugIndicatingError("Promise is not resolved yet");if(this._error)throw this._error;return this._value}};Zt.StatefulPromise=eQe;var z5t=class{static{a(this,"LazyStatefulPromise")}constructor(e){this._compute=e,this._promise=new Euo.Lazy(()=>new eQe(this._compute()))}requireValue(){return this._promise.value.requireValue()}getPromise(){return this._promise.value.promise}get currentValue(){return this._promise.rawValue?.value}};Zt.LazyStatefulPromise=z5t;var tQe=class t{static{a(this,"AsyncIterableObject")}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}constructor(e,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new REe.Emitter,queueMicrotask(async()=>{let n={emitOne:a(o=>this.emitOne(o),"emitOne"),emitMany:a(o=>this.emitMany(o),"emitMany"),reject:a(o=>this.reject(o),"reject")};try{await Promise.resolve(e(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:a(async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0}),"return")}}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}map(e){return t.map(this,e)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static async toPromise(e){let r=[];for await(let n of e)r.push(n);return r}toPromise(){return t.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Zt.AsyncIterableObject=tQe;function kuo(t){let e=new X5t.CancellationTokenSource,r=t(e.token);return new nQe(e,async n=>{let o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),n.reject(new n_.CancellationError)});try{for await(let s of r){if(e.token.isCancellationRequested)return;n.emitOne(s)}o.dispose(),e.dispose()}catch(s){o.dispose(),e.dispose(),n.reject(s)}})}a(kuo,"createCancelableAsyncIterableProducer");var Y5t=class{static{a(this,"AsyncIterableSource")}constructor(e){this._deferred=new u4,this._asyncIterable=new tQe(o=>{if(r){o.reject(r);return}return n&&o.emitMany(n),this._errorFn=s=>o.reject(s),this._emitOneFn=s=>o.emitOne(s),this._emitManyFn=s=>o.emitMany(s),this._deferred.p},e);let r,n;this._errorFn=o=>{r||(r=o)},this._emitOneFn=o=>{n||(n=[]),n.push(o)},this._emitManyFn=o=>{n?o.forEach(s=>n.push(s)):n=o.slice()}}get asyncIterable(){return this._asyncIterable}resolve(){this._deferred.complete()}reject(e){this._errorFn(e),this._deferred.complete()}emitOne(e){this._emitOneFn(e)}emitMany(e){this._emitManyFn(e)}};Zt.AsyncIterableSource=Y5t;function Duo(t,e){let r=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t;return{async next(){return e.isCancellationRequested?{done:!0,value:void 0}:await vKr(r.next(),e)||{done:!0,value:void 0}},throw:r.throw?.bind(r),return:r.return?.bind(r),[Symbol.asyncIterator](){return this}}}a(Duo,"cancellableIterable");var K5t=class{static{a(this,"ProducerConsumer")}constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let r=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(r,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let r of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(r,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new n_.BugIndicatingError("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,r){r.ok?e.complete(r.value):e.error(r.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new u4;return this._unsatisfiedConsumers.push(e),e.p}}},rQe=class t{static{a(this,"AsyncIterableProducer")}constructor(e,r){this._onReturn=r,this._producerConsumer=new K5t,this._iterator={next:a(()=>this._producerConsumer.consume(),"next"),return:a(()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),"return"),throw:a(async n=>(this._finishError(n),{done:!0,value:void 0}),"throw")},queueMicrotask(async()=>{let n=e({emitOne:a(o=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:o}}),"emitOne"),emitMany:a(o=>{for(let s of o)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},"emitMany"),reject:a(o=>this._finishError(o),"reject")});if(!this._producerConsumer.hasFinalValue)try{await n,this._finishOk()}catch(o){this._finishError(o)}})}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}static tee(e){let r,n,o=new u4,s=a(async()=>{if(!(!r||!n))try{for await(let u of e)r.emitOne(u),n.emitOne(u)}catch(u){r.reject(u),n.reject(u)}finally{o.complete()}},"start"),c=new t(async u=>(r=u,s(),o.p)),l=new t(async u=>(n=u,s(),o.p));return[c,l]}map(e){return t.map(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};Zt.AsyncIterableProducer=rQe;var nQe=class extends rQe{static{a(this,"CancelableAsyncIterableProducer")}constructor(e,r){super(r),this._source=e}cancel(){this._source.cancel()}};Zt.CancelableAsyncIterableProducer=nQe;Zt.AsyncReaderEndOfStream=Symbol("AsyncReaderEndOfStream");var J5t=class{static{a(this,"AsyncReader")}get endOfStream(){return this._buffer.length===0&&this._atEnd}constructor(e){this._source=e,this._buffer=[],this._atEnd=!1}async read(){return this._buffer.length===0&&!this._atEnd&&await this._extendBuffer(),this._buffer.length===0?Zt.AsyncReaderEndOfStream:this._buffer.shift()}async readWhile(e,r){do{let n=await this.peek();if(n===Zt.AsyncReaderEndOfStream||!e(n))break;await this.read(),await r(n)}while(!0)}readBufferedOrThrow(){let e=this.peekBufferedOrThrow();return this._buffer.shift(),e}async consumeToEnd(){for(;!this.endOfStream;)await this.read()}async peek(){return this._buffer.length===0&&!this._atEnd&&await this._extendBuffer(),this._buffer.length===0?Zt.AsyncReaderEndOfStream:this._buffer[0]}peekBufferedOrThrow(){if(this._buffer.length===0){if(this._atEnd)return Zt.AsyncReaderEndOfStream;throw new n_.BugIndicatingError("No buffered elements")}return this._buffer[0]}async peekTimeout(e){if(this._buffer.length===0&&!this._atEnd&&await bKr(this._extendBuffer(),e),this._atEnd)return Zt.AsyncReaderEndOfStream;if(this._buffer.length!==0)return this._buffer[0]}_extendBuffer(){return this._atEnd?Promise.resolve():(this._extendBufferPromise||(this._extendBufferPromise=(async()=>{let{value:e,done:r}=await this._source.next();this._extendBufferPromise=void 0,r?this._atEnd=!0:this._buffer.push(e)})()),this._extendBufferPromise)}};Zt.AsyncReader=J5t});var DKr=T(Y1=>{"use strict";f();var Luo=Y1&&Y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Y1,"__esModule",{value:!0});var Fuo=require("fs"),Uuo=Luo(hx()),Sne=Uuo.default("@kwsites/file-exists");function Quo(t,e,r){Sne("checking %s",t);try{let n=Fuo.statSync(t);return n.isFile()&&e?(Sne("[OK] path represents a file"),!0):n.isDirectory()&&r?(Sne("[OK] path represents a directory"),!0):(Sne("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Sne("[FAIL] path is not accessible: %o",n),!1;throw Sne("[FATAL] %o",n),n}}a(Quo,"check");function quo(t,e=Y1.READABLE){return Quo(t,(e&Y1.FILE)>0,(e&Y1.FOLDER)>0)}a(quo,"exists");Y1.exists=quo;Y1.FILE=1;Y1.FOLDER=2;Y1.READABLE=Y1.FILE+Y1.FOLDER});var NKr=T(lQe=>{"use strict";f();function Guo(t){for(var e in t)lQe.hasOwnProperty(e)||(lQe[e]=t[e])}a(Guo,"__export");Object.defineProperty(lQe,"__esModule",{value:!0});Guo(DKr())});var OKr=T((TWl,MKr)=>{f();var Ine=1e3,xne=Ine*60,wne=xne*60,Dj=wne*24,Huo=Dj*7,juo=Dj*365.25;MKr.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return $uo(t);if(r==="number"&&isFinite(t))return e.long?Wuo(t):Vuo(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function $uo(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*juo;case"weeks":case"week":case"w":return r*Huo;case"days":case"day":case"d":return r*Dj;case"hours":case"hour":case"hrs":case"hr":case"h":return r*wne;case"minutes":case"minute":case"mins":case"min":case"m":return r*xne;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ine;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a($uo,"parse");function Vuo(t){var e=Math.abs(t);return e>=Dj?Math.round(t/Dj)+"d":e>=wne?Math.round(t/wne)+"h":e>=xne?Math.round(t/xne)+"m":e>=Ine?Math.round(t/Ine)+"s":t+"ms"}a(Vuo,"fmtShort");function Wuo(t){var e=Math.abs(t);return e>=Dj?uQe(t,e,Dj,"day"):e>=wne?uQe(t,e,wne,"hour"):e>=xne?uQe(t,e,xne,"minute"):e>=Ine?uQe(t,e,Ine,"second"):t+" ms"}a(Wuo,"fmtLong");function uQe(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(uQe,"plural")});var rDt=T((xWl,BKr)=>{f();function zuo(t){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=o,r.enabled=l,r.humanize=OKr(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(w==="%%")return"%";I++;let P=r.formatters[R];if(typeof P=="function"){let k=E[I];w=P.call(_,k),E.splice(I,1),I--}return w}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h=(typeof p=="string"?p:"").trim().replace(" ",",").split(",").filter(Boolean);for(let m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}a(o,"enable");function s(p,h){let m=0,g=0,A=-1,y=0;for(;m"-"+h)].join(",");return r.enable(""),p}a(c,"disable");function l(p){for(let h of r.skips)if(s(p,h))return!1;for(let h of r.names)if(s(p,h))return!0;return!1}a(l,"enabled");function u(p){return p instanceof Error?p.stack||p.message:p}a(u,"coerce");function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(d,"destroy"),r.enable(r.load()),r}a(zuo,"setup");BKr.exports=zuo});var LKr=T((K1,dQe)=>{f();K1.formatArgs=Kuo;K1.save=Juo;K1.load=Xuo;K1.useColors=Yuo;K1.storage=Zuo();K1.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();K1.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Yuo(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(Yuo,"useColors");function Kuo(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+dQe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(Kuo,"formatArgs");K1.log=console.debug||console.log||(()=>{});function Juo(t){try{t?K1.storage.setItem("debug",t):K1.storage.removeItem("debug")}catch{}}a(Juo,"save");function Xuo(){let t;try{t=K1.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(Xuo,"load");function Zuo(){try{return localStorage}catch{}}a(Zuo,"localstorage");dQe.exports=rDt()(K1);var{formatters:edo}=dQe.exports;edo.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var UKr=T((hh,pQe)=>{f();var tdo=require("tty"),fQe=require("util");hh.init=cdo;hh.log=odo;hh.formatArgs=ndo;hh.save=sdo;hh.load=ado;hh.useColors=rdo;hh.destroy=fQe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");hh.colors=[6,2,3,4,5,1];try{let t=f3e();t&&(t.stderr||t).level>=2&&(hh.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}hh.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function rdo(){return"colors"in hh.inspectOpts?!!hh.inspectOpts.colors:tdo.isatty(process.stderr.fd)}a(rdo,"useColors");function ndo(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` `).join(` -`+s),t.push(o+"m+"+oqe.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=nlo()+e+" "+t[0]}a(rlo,"formatArgs");function nlo(){return _h.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(nlo,"getDate");function ilo(...t){return process.stderr.write(iqe.formatWithOptions(_h.inspectOpts,...t)+` -`)}a(ilo,"log");function olo(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(olo,"save");function slo(){return process.env.DEBUG}a(slo,"load");function alo(t){t.inspectOpts={};let e=Object.keys(_h.inspectOpts);for(let r=0;re.trim()).join(" ")};UYr.O=function(t){return this.inspectOpts.colors=this.useColors,iqe.inspect(t,this.inspectOpts)}});var qYr=T((v$l,LNt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?LNt.exports=FYr():LNt.exports=QYr()});var UNt=T(I$=>{"use strict";f();Object.defineProperty(I$,"__esModule",{value:!0});I$.createDeferred=I$.deferred=void 0;function FNt(){let t,e,r="pending";return{promise:new Promise((o,s)=>{t=o,e=s}),done(o){r==="pending"&&(r="resolved",t(o))},fail(o){r==="pending"&&(r="rejected",e(o))},get fulfilled(){return r!=="pending"},get status(){return r}}}a(FNt,"deferred");I$.deferred=FNt;I$.createDeferred=FNt;I$.default=FNt});var Dqe=T($T=>{"use strict";f();Object.defineProperty($T,"__esModule",{value:!0});$T.deepClone=FXr;$T.deepFreeze=yfo;$T.cloneAndChange=Efo;$T.mixin=QXr;$T.equals=VCe;$T.safeStringify=Cfo;$T.distinct=_fo;$T.getCaseInsensitive=vfo;$T.filter=bfo;$T.mapValues=Tfo;var UF=sv();function FXr(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;let e=Array.isArray(t)?[]:{};return Object.entries(t).forEach(([r,n])=>{e[r]=n&&typeof n=="object"?FXr(n):n}),e}a(FXr,"deepClone");function yfo(t){if(!t||typeof t!="object")return t;let e=[t];for(;e.length>0;){let r=e.shift();Object.freeze(r);for(let n in r)if(UXr.call(r,n)){let o=r[n];typeof o=="object"&&!Object.isFrozen(o)&&!(0,UF.isTypedArray)(o)&&e.push(o)}}return t}a(yfo,"deepFreeze");var UXr=Object.prototype.hasOwnProperty;function Efo(t,e){return QDt(t,e,new Set)}a(Efo,"cloneAndChange");function QDt(t,e,r){if((0,UF.isUndefinedOrNull)(t))return t;let n=e(t);if(typeof n<"u")return n;if(Array.isArray(t)){let o=[];for(let s of t)o.push(QDt(s,e,r));return o}if((0,UF.isObject)(t)){if(r.has(t))throw new Error("Cannot clone recursive data-structure");r.add(t);let o={};for(let s in t)UXr.call(t,s)&&(o[s]=QDt(t[s],e,r));return r.delete(t),o}return t}a(QDt,"_cloneAndChange");function QXr(t,e,r=!0){return(0,UF.isObject)(t)?((0,UF.isObject)(e)&&Object.keys(e).forEach(n=>{n in t?r&&((0,UF.isObject)(t[n])&&(0,UF.isObject)(e[n])?QXr(t[n],e[n],r):t[n]=e[n]):t[n]=e[n]}),t):e}a(QXr,"mixin");function VCe(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r,n;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(r=0;r{if((0,UF.isObject)(n)||Array.isArray(n)){if(e.has(n))return"[Circular]";e.add(n)}return typeof n=="bigint"?`[BigInt ${n.toString()}]`:n})}a(Cfo,"safeStringify");function _fo(t,e){let r=Object.create(null);return!t||!e||Object.keys(e).forEach(o=>{let s=t[o],c=e[o];VCe(s,c)||(r[o]=c)}),r}a(_fo,"distinct");function vfo(t,e){let r=e.toLowerCase(),n=Object.keys(t).find(o=>o.toLowerCase()===r);return n?t[n]:t[e]}a(vfo,"getCaseInsensitive");function bfo(t,e){let r=Object.create(null);for(let[n,o]of Object.entries(t))e(n,o)&&(r[n]=o);return r}a(bfo,"filter");function Tfo(t,e){let r={};for(let[n,o]of Object.entries(t))r[n]=e(o,n);return r}a(Tfo,"mapValues")});var Ay=T(Mqe=>{"use strict";f();Object.defineProperty(Mqe,"__esModule",{value:!0});Mqe.ErrorUtils=void 0;var Sfo=Dqe(),qXr;(function(t){function e(n){return n instanceof Error?n:typeof n=="string"?new Error(n):new Error(`An unexpected error occurred: ${(0,Sfo.safeStringify)(n)}`)}a(e,"fromUnknown"),t.fromUnknown=e;function r(n){return n.stack?n.stack:n.message}a(r,"toString"),t.toString=r})(qXr||(Mqe.ErrorUtils=qXr={}))});var VT=T(Oqe=>{"use strict";f();Object.defineProperty(Oqe,"__esModule",{value:!0});Oqe.Result=void 0;var qDt=Ay(),GXr;(function(t){function e(c){return new GDt(c)}a(e,"ok"),t.ok=e;function r(c){return new HDt(c)}a(r,"error"),t.error=r;function n(c){return t.error(new Error(c))}a(n,"fromString"),t.fromString=n;function o(c){try{return t.ok(c())}catch(l){return t.error(qDt.ErrorUtils.fromUnknown(l))}}a(o,"tryWith"),t.tryWith=o;async function s(c){try{return t.ok(await c())}catch(l){return t.error(qDt.ErrorUtils.fromUnknown(l))}}a(s,"tryWithAsync"),t.tryWithAsync=s})(GXr||(Oqe.Result=GXr={}));var GDt=class t{static{a(this,"ResultOk")}constructor(e){this.val=e}map(e){return new t(e(this.val))}mapError(e){return this}flatMap(e){return e(this.val)}unwrap(){return this.val}unwrapOr(e){return this.val}isOk(){return!0}isError(){return!1}},HDt=class t{static{a(this,"ResultError")}constructor(e){this.err=e}map(e){return this}mapError(e){return new t(e(this.err))}flatMap(e){return this}unwrap(){throw this.err instanceof Error?this.err:qDt.ErrorUtils.fromUnknown(this.err)}unwrapOr(e){return e}isOk(){return!1}isError(){return!0}}});var tZr=T(P$=>{"use strict";f();var Rk=P$&&P$.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},XDt=P$&&P$.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},MO,GF;Object.defineProperty(P$,"__esModule",{value:!0});var ZDt=class{static{a(this,"AwaitLock")}constructor(){MO.set(this,!1),GF.set(this,new Set)}get acquired(){return Rk(this,MO,"f")}acquireAsync({timeout:e}={}){if(!Rk(this,MO,"f"))return XDt(this,MO,!0,"f"),Promise.resolve();if(e==null)return new Promise(o=>{Rk(this,GF,"f").add(o)});let r,n;return Promise.race([new Promise(o=>{r=a(()=>{clearTimeout(n),o()},"resolver"),Rk(this,GF,"f").add(r)}),new Promise((o,s)=>{n=setTimeout(()=>{Rk(this,GF,"f").delete(r),s(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return Rk(this,MO,"f")?!1:(XDt(this,MO,!0,"f"),!0)}release(){if(!Rk(this,MO,"f"))throw new Error("Cannot release an unacquired lock");if(Rk(this,GF,"f").size>0){let[e]=Rk(this,GF,"f");Rk(this,GF,"f").delete(e),e()}else XDt(this,MO,!1,"f")}};P$.default=ZDt;MO=new WeakMap,GF=new WeakMap});var Du=T((iNu,Hnn)=>{f();Hnn.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var xa=T((sNu,hin)=>{"use strict";f();var jnn=Symbol.for("undici.error.UND_ERR"),Mu=class extends Error{static{a(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[jnn]===!0}[jnn]=!0},$nn=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),m8t=class extends Mu{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[$nn]===!0}[$nn]=!0},Vnn=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),g8t=class extends Mu{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Vnn]===!0}[Vnn]=!0},Wnn=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),A8t=class extends Mu{static{a(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Wnn]===!0}[Wnn]=!0},znn=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),y8t=class extends Mu{static{a(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[znn]===!0}[znn]=!0},Ynn=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),E8t=class extends Mu{static{a(this,"ResponseStatusCodeError")}constructor(e,r,n,o){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=o,this.status=r,this.statusCode=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[Ynn]===!0}[Ynn]=!0},Knn=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),C8t=class extends Mu{static{a(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[Knn]===!0}[Knn]=!0},Jnn=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),_8t=class extends Mu{static{a(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[Jnn]===!0}[Jnn]=!0},Xnn=Symbol.for("undici.error.UND_ERR_ABORT"),f$e=class extends Mu{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[Xnn]===!0}[Xnn]=!0},Znn=Symbol.for("undici.error.UND_ERR_ABORTED"),v8t=class extends f$e{static{a(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[Znn]===!0}[Znn]=!0},ein=Symbol.for("undici.error.UND_ERR_INFO"),b8t=class extends Mu{static{a(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[ein]===!0}[ein]=!0},tin=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),T8t=class extends Mu{static{a(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[tin]===!0}[tin]=!0},rin=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),S8t=class extends Mu{static{a(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[rin]===!0}[rin]=!0},nin=Symbol.for("undici.error.UND_ERR_DESTROYED"),I8t=class extends Mu{static{a(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[nin]===!0}[nin]=!0},iin=Symbol.for("undici.error.UND_ERR_CLOSED"),x8t=class extends Mu{static{a(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[iin]===!0}[iin]=!0},oin=Symbol.for("undici.error.UND_ERR_SOCKET"),w8t=class extends Mu{static{a(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[oin]===!0}[oin]=!0},sin=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),R8t=class extends Mu{static{a(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[sin]===!0}[sin]=!0},ain=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),P8t=class extends Mu{static{a(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[ain]===!0}[ain]=!0},cin=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),k8t=class extends Error{static{a(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[cin]===!0}[cin]=!0},lin=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),N8t=class extends Mu{static{a(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[lin]===!0}[lin]=!0},uin=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),D8t=class extends Mu{static{a(this,"RequestRetryError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[uin]===!0}[uin]=!0},din=Symbol.for("undici.error.UND_ERR_RESPONSE"),M8t=class extends Mu{static{a(this,"ResponseError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[din]===!0}[din]=!0},fin=Symbol.for("undici.error.UND_ERR_PRX_TLS"),O8t=class extends Mu{static{a(this,"SecureProxyConnectionError")}constructor(e,r,n){super(r,{cause:e,...n??{}}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[fin]===!0}[fin]=!0},pin=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),B8t=class extends Mu{static{a(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[pin]===!0}get[pin](){return!0}};hin.exports={AbortError:f$e,HTTPParserError:k8t,UndiciError:Mu,HeadersTimeoutError:g8t,HeadersOverflowError:A8t,BodyTimeoutError:y8t,RequestContentLengthMismatchError:T8t,ConnectTimeoutError:m8t,ResponseStatusCodeError:E8t,InvalidArgumentError:C8t,InvalidReturnValueError:_8t,RequestAbortedError:v8t,ClientDestroyedError:I8t,ClientClosedError:x8t,InformationalError:b8t,SocketError:w8t,NotSupportedError:R8t,ResponseContentLengthMismatchError:S8t,BalancedPoolMissingUpstreamError:P8t,ResponseExceededMaxSizeError:N8t,RequestRetryError:D8t,ResponseError:M8t,SecureProxyConnectionError:O8t,MessageSizeExceededError:B8t}});var h$e=T((lNu,min)=>{"use strict";f();var p$e={},L8t=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let t=0;t{"use strict";f();var{wellknownHeaderNames:gin,headerNameLowerCasedRecord:C_o}=h$e(),F8t=class t{static{a(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let o=0,s=this;for(;;){let c=e.charCodeAt(o);if(c>127)throw new TypeError("key must be ascii string");if(s.code===c)if(n===++o){s.value=r;break}else if(s.middle!==null)s=s.middle;else{s.middle=new t(e,r,o);break}else if(s.code=65&&(s|=32);o!==null;){if(s===o.code){if(r===++n)return o;o=o.middle;break}o=o.code{"use strict";f();var _1e=require("node:assert"),{kDestroyed:_in,kBodyUsed:Soe,kListeners:U8t,kBody:Cin}=Du(),{IncomingMessage:__o}=require("node:http"),y$e=require("node:stream"),v_o=require("node:net"),{Blob:b_o}=require("node:buffer"),T_o=require("node:util"),{stringify:S_o}=require("node:querystring"),{EventEmitter:I_o}=require("node:events"),{InvalidArgumentError:xh}=xa(),{headerNameLowerCasedRecord:x_o}=h$e(),{tree:vin}=Ein(),[w_o,R_o]=process.versions.node.split(".").map(t=>Number(t)),A$e=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[Cin]=e,this[Soe]=!1}async*[Symbol.asyncIterator](){_1e(!this[Soe],"disturbed"),this[Soe]=!0,yield*this[Cin]}};function P_o(t){return E$e(t)?(xin(t)===0&&t.on("data",function(){_1e(!1)}),typeof t.readableDidRead!="boolean"&&(t[Soe]=!1,I_o.prototype.on.call(t,"data",function(){this[Soe]=!0})),t):t&&typeof t.pipeTo=="function"?new A$e(t):t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&Iin(t)?new A$e(t):t}a(P_o,"wrapRequestBody");function k_o(){}a(k_o,"nop");function E$e(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}a(E$e,"isStream");function bin(t){if(t===null)return!1;if(t instanceof b_o)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}a(bin,"isBlobLike");function N_o(t,e){if(t.includes("?")||t.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=S_o(e);return r&&(t+="?"+r),t}a(N_o,"buildURL");function Tin(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}a(Tin,"isValidPort");function g$e(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}a(g$e,"isHttpOrHttpsPrefixed");function Sin(t){if(typeof t=="string"){if(t=new URL(t),!g$e(t.origin||t.protocol))throw new xh("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new xh("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&Tin(t.port)===!1)throw new xh("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new xh("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new xh("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new xh("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new xh("Invalid URL origin: the origin must be a string or null/undefined.");if(!g$e(t.origin||t.protocol))throw new xh("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!g$e(t.origin||t.protocol))throw new xh("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}a(Sin,"parseURL");function D_o(t){if(t=Sin(t),t.pathname!=="/"||t.search||t.hash)throw new xh("invalid url");return t}a(D_o,"parseOrigin");function M_o(t){if(t[0]==="["){let r=t.indexOf("]");return _1e(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}a(M_o,"getHostname");function O_o(t){if(!t)return null;_1e(typeof t=="string");let e=M_o(t);return v_o.isIP(e)?"":e}a(O_o,"getServerName");function B_o(t){return JSON.parse(JSON.stringify(t))}a(B_o,"deepClone");function L_o(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}a(L_o,"isAsyncIterable");function Iin(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}a(Iin,"isIterable");function xin(t){if(t==null)return 0;if(E$e(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(bin(t))return t.size!=null?t.size:null;if(Pin(t))return t.byteLength}return null}a(xin,"bodyLength");function win(t){return t&&!!(t.destroyed||t[_in]||y$e.isDestroyed?.(t))}a(win,"isDestroyed");function F_o(t,e){t==null||!E$e(t)||win(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===__o&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[_in]=!0))}a(F_o,"destroy");var U_o=/timeout=(\d+)/;function Q_o(t){let e=t.toString().match(U_o);return e?parseInt(e[1],10)*1e3:null}a(Q_o,"parseKeepAliveTimeout");function Rin(t){return typeof t=="string"?x_o[t]??t.toLowerCase():vin.lookup(t)??t.toString("latin1").toLowerCase()}a(Rin,"headerNameToString");function q_o(t){return vin.lookup(t)??t.toString("latin1").toLowerCase()}a(q_o,"bufferToLowerCasedHeaderName");function G_o(t,e){e===void 0&&(e={});for(let r=0;rc.toString("utf8")):s.toString("utf8")}}return"content-length"in e&&"content-disposition"in e&&(e["content-disposition"]=Buffer.from(e["content-disposition"]).toString("latin1")),e}a(G_o,"parseHeaders");function H_o(t){let e=t.length,r=new Array(e),n=!1,o=-1,s,c,l=0;for(let u=0;u{r.close(),r.byobRequest?.respond(0)});else{let s=Buffer.isBuffer(o)?o:Buffer.from(o);s.byteLength&&r.enqueue(new Uint8Array(s))}return r.desiredSize>0},async cancel(r){await e.return()},type:"bytes"})}a(Y_o,"ReadableStreamFrom");function K_o(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}a(K_o,"isFormDataLike");function J_o(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.addListener("abort",e),()=>t.removeListener("abort",e))}a(J_o,"addAbortListener");var X_o=typeof String.prototype.toWellFormed=="function",Z_o=typeof String.prototype.isWellFormed=="function";function kin(t){return X_o?`${t}`.toWellFormed():T_o.toUSVString(t)}a(kin,"toUSVString");function e1o(t){return Z_o?`${t}`.isWellFormed():kin(t)===`${t}`}a(e1o,"isUSVString");function Nin(t){switch(t){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return t>=33&&t<=126}}a(Nin,"isTokenCharCode");function t1o(t){if(t.length===0)return!1;for(let e=0;e{"use strict";f();var Ha=require("node:diagnostics_channel"),G8t=require("node:util"),C$e=G8t.debuglog("undici"),q8t=G8t.debuglog("fetch"),IV=G8t.debuglog("websocket"),Bin=!1,c1o={beforeConnect:Ha.channel("undici:client:beforeConnect"),connected:Ha.channel("undici:client:connected"),connectError:Ha.channel("undici:client:connectError"),sendHeaders:Ha.channel("undici:client:sendHeaders"),create:Ha.channel("undici:request:create"),bodySent:Ha.channel("undici:request:bodySent"),headers:Ha.channel("undici:request:headers"),trailers:Ha.channel("undici:request:trailers"),error:Ha.channel("undici:request:error"),open:Ha.channel("undici:websocket:open"),close:Ha.channel("undici:websocket:close"),socketError:Ha.channel("undici:websocket:socket_error"),ping:Ha.channel("undici:websocket:ping"),pong:Ha.channel("undici:websocket:pong")};if(C$e.enabled||q8t.enabled){let t=q8t.enabled?q8t:C$e;Ha.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s using %s%s",`${s}${o?`:${o}`:""}`,n,r)}),Ha.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s using %s%s",`${s}${o?`:${o}`:""}`,n,r)}),Ha.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s using %s%s errored - %s",`${s}${o?`:${o}`:""}`,n,r,c.message)}),Ha.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s/%s",r,o,n)}),Ha.channel("undici:request:headers").subscribe(e=>{let{request:{method:r,path:n,origin:o},response:{statusCode:s}}=e;t("received response to %s %s/%s - HTTP %d",r,o,n,s)}),Ha.channel("undici:request:trailers").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("trailers received from %s %s/%s",r,o,n)}),Ha.channel("undici:request:error").subscribe(e=>{let{request:{method:r,path:n,origin:o},error:s}=e;t("request to %s %s/%s errored - %s",r,o,n,s.message)}),Bin=!0}if(IV.enabled){if(!Bin){let t=C$e.enabled?C$e:IV;Ha.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),Ha.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),Ha.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s%s using %s%s errored - %s",s,o?`:${o}`:"",n,r,c.message)}),Ha.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s/%s",r,o,n)})}Ha.channel("undici:websocket:open").subscribe(t=>{let{address:{address:e,port:r}}=t;IV("connection opened %s%s",e,r?`:${r}`:"")}),Ha.channel("undici:websocket:close").subscribe(t=>{let{websocket:e,code:r,reason:n}=t;IV("closed connection to %s - %s %s",e.url,r,n)}),Ha.channel("undici:websocket:socket_error").subscribe(t=>{IV("connection errored - %s",t.message)}),Ha.channel("undici:websocket:ping").subscribe(t=>{IV("ping received")}),Ha.channel("undici:websocket:pong").subscribe(t=>{IV("pong received")})}Lin.exports={channels:c1o}});var qin=T((ENu,Qin)=>{"use strict";f();var{InvalidArgumentError:gl,NotSupportedError:l1o}=xa(),t4=require("node:assert"),{isValidHTTPToken:Uin,isValidHeaderValue:H8t,isStream:u1o,destroy:d1o,isBuffer:f1o,isFormDataLike:p1o,isIterable:h1o,isBlobLike:m1o,buildURL:g1o,validateHandler:A1o,getServerName:y1o,normalizedMethodRecords:E1o}=rs(),{channels:Xk}=Ioe(),{headerNameLowerCasedRecord:Fin}=h$e(),C1o=/[^\u0021-\u00ff]/,nS=Symbol("handler"),j8t=class{static{a(this,"Request")}constructor(e,{path:r,method:n,body:o,headers:s,query:c,idempotent:l,blocking:u,upgrade:d,headersTimeout:p,bodyTimeout:h,reset:m,throwOnError:g,expectContinue:A,servername:y},E){if(typeof r!="string")throw new gl("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new gl("path must be an absolute URL or start with a slash");if(C1o.test(r))throw new gl("invalid request path");if(typeof n!="string")throw new gl("method must be a string");if(E1o[n]===void 0&&!Uin(n))throw new gl("invalid request method");if(d&&typeof d!="string")throw new gl("upgrade must be a string");if(d&&!H8t(d))throw new gl("invalid upgrade header");if(p!=null&&(!Number.isFinite(p)||p<0))throw new gl("invalid headersTimeout");if(h!=null&&(!Number.isFinite(h)||h<0))throw new gl("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new gl("invalid reset");if(A!=null&&typeof A!="boolean")throw new gl("invalid expectContinue");if(this.headersTimeout=p,this.bodyTimeout=h,this.throwOnError=g===!0,this.method=n,this.abort=null,o==null)this.body=null;else if(u1o(o)){this.body=o;let _=this.body._readableState;(!_||!_.autoDestroy)&&(this.endHandler=a(function(){d1o(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=v=>{this.abort?this.abort(v):this.error=v},this.body.on("error",this.errorHandler)}else if(f1o(o))this.body=o.byteLength?o:null;else if(ArrayBuffer.isView(o))this.body=o.buffer.byteLength?Buffer.from(o.buffer,o.byteOffset,o.byteLength):null;else if(o instanceof ArrayBuffer)this.body=o.byteLength?Buffer.from(o):null;else if(typeof o=="string")this.body=o.length?Buffer.from(o):null;else if(p1o(o)||h1o(o)||m1o(o))this.body=o;else throw new gl("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=d||null,this.path=c?g1o(r,c):r,this.origin=e,this.idempotent=l??(n==="HEAD"||n==="GET"),this.blocking=u??!1,this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=A??!1,Array.isArray(s)){if(s.length%2!==0)throw new gl("headers array must be even");for(let _=0;_{"use strict";f();var _1o=require("node:events"),v$e=class extends _1o{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let o of r)if(o!=null){if(typeof o!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof o}`);if(n=o(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new $8t(this,n)}},$8t=class extends v$e{static{a(this,"ComposedDispatcher")}#e=null;#t=null;constructor(e,r){super(),this.#e=e,this.#t=r}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};Gin.exports=v$e});var Poe=T((SNu,Hin)=>{"use strict";f();var v1o=v1e(),{ClientDestroyedError:V8t,ClientClosedError:b1o,InvalidArgumentError:xoe}=xa(),{kDestroy:T1o,kClose:S1o,kClosed:b1e,kDestroyed:woe,kDispatch:W8t,kInterceptors:xV}=Du(),r4=Symbol("onDestroyed"),Roe=Symbol("onClosed"),b$e=Symbol("Intercepted Dispatch"),z8t=class extends v1o{static{a(this,"DispatcherBase")}constructor(){super(),this[woe]=!1,this[r4]=null,this[b1e]=!1,this[Roe]=[]}get destroyed(){return this[woe]}get closed(){return this[b1e]}get interceptors(){return this[xV]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[xV][r]!="function")throw new xoe("interceptor must be an function")}this[xV]=e}close(e){if(e===void 0)return new Promise((n,o)=>{this.close((s,c)=>s?o(s):n(c))});if(typeof e!="function")throw new xoe("invalid callback");if(this[woe]){queueMicrotask(()=>e(new V8t,null));return}if(this[b1e]){this[Roe]?this[Roe].push(e):queueMicrotask(()=>e(null,null));return}this[b1e]=!0,this[Roe].push(e);let r=a(()=>{let n=this[Roe];this[Roe]=null;for(let o=0;othis.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((o,s)=>{this.destroy(e,(c,l)=>c?s(c):o(l))});if(typeof r!="function")throw new xoe("invalid callback");if(this[woe]){this[r4]?this[r4].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new V8t),this[woe]=!0,this[r4]=this[r4]||[],this[r4].push(r);let n=a(()=>{let o=this[r4];this[r4]=null;for(let s=0;s{queueMicrotask(n)})}[b$e](e,r){if(!this[xV]||this[xV].length===0)return this[b$e]=this[W8t],this[W8t](e,r);let n=this[W8t].bind(this);for(let o=this[xV].length-1;o>=0;o--)n=this[xV][o](n);return this[b$e]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new xoe("handler must be an object");try{if(!e||typeof e!="object")throw new xoe("opts must be an object.");if(this[woe]||this[r4])throw new V8t;if(this[b1e])throw new b1o;return this[b$e](e,r)}catch(n){if(typeof r.onError!="function")throw new xoe("invalid onError method");return r.onError(n),!1}}};Hin.exports=z8t});var t6t=T((wNu,Win)=>{"use strict";f();var koe=0,Y8t=1e3,K8t=(Y8t>>1)-1,n4,J8t=Symbol("kFastTimer"),i4=[],X8t=-2,Z8t=-1,$in=0,jin=1;function e6t(){koe+=K8t;let t=0,e=i4.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=Z8t,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===Z8t?(r._state=X8t,--e!==0&&(i4[t]=i4[e])):++t}i4.length=e,i4.length!==0&&Vin()}a(e6t,"onTick");function Vin(){n4?n4.refresh():(clearTimeout(n4),n4=setTimeout(e6t,K8t),n4.unref&&n4.unref())}a(Vin,"refreshTimeout");var T$e=class{static{a(this,"FastTimer")}[J8t]=!0;_state=X8t;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===X8t&&i4.push(this),(!n4||i4.length===1)&&Vin(),this._state=$in}clear(){this._state=Z8t,this._idleStart=-1}};Win.exports={setTimeout(t,e,r){return e<=Y8t?setTimeout(t,e,r):new T$e(t,e,r)},clearTimeout(t){t[J8t]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new T$e(t,e,r)},clearFastTimeout(t){t.clear()},now(){return koe},tick(t=0){koe+=t-Y8t+1,e6t(),e6t()},reset(){koe=0,i4.length=0,clearTimeout(n4),n4=null},kFastTimer:J8t}});var T1e=T((DNu,Xin)=>{"use strict";f();var I1o=require("node:net"),zin=require("node:assert"),Jin=rs(),{InvalidArgumentError:x1o,ConnectTimeoutError:w1o}=xa(),S$e=t6t();function Yin(){}a(Yin,"noop");var r6t,n6t;global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?n6t=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function R1o({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,session:o,...s}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new x1o("maxCachedSessions must be a positive integer or zero");let c={path:r,...s},l=new n6t(e??100);return n=n??1e4,t=t??!1,a(function({hostname:d,host:p,protocol:h,port:m,servername:g,localAddress:A,httpSocket:y},E){let _;if(h==="https:"){r6t||(r6t=require("node:tls")),g=g||c.servername||Jin.getServerName(p)||null;let b=g||d;zin(b);let I=o||l.get(b)||null;m=m||443,_=r6t.connect({highWaterMark:16384,...c,servername:g,session:I,localAddress:A,ALPNProtocols:t?["http/1.1","h2"]:["http/1.1"],socket:y,port:m,host:d}),_.on("session",function(x){l.set(b,x)})}else zin(!y,"httpSocket can only be sent on TLS update"),m=m||80,_=I1o.connect({highWaterMark:64*1024,...c,localAddress:A,port:m,host:d});if(c.keepAlive==null||c.keepAlive){let b=c.keepAliveInitialDelay===void 0?6e4:c.keepAliveInitialDelay;_.setKeepAlive(!0,b)}let v=P1o(new WeakRef(_),{timeout:n,hostname:d,port:m});return _.setNoDelay(!0).once(h==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(v),E){let b=E;E=null,b(null,this)}}).on("error",function(b){if(queueMicrotask(v),E){let I=E;E=null,I(b)}}),_},"connect")}a(R1o,"buildConnector");var P1o=process.platform==="win32"?(t,e)=>{if(!e.timeout)return Yin;let r=null,n=null,o=S$e.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>Kin(t.deref(),e))})},e.timeout);return()=>{S$e.clearFastTimeout(o),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return Yin;let r=null,n=S$e.setFastTimeout(()=>{r=setImmediate(()=>{Kin(t.deref(),e)})},e.timeout);return()=>{S$e.clearFastTimeout(n),clearImmediate(r)}};function Kin(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,Jin.destroy(t,new w1o(r))}a(Kin,"onConnectTimeout");Xin.exports=R1o});var Zin=T(I$e=>{"use strict";f();Object.defineProperty(I$e,"__esModule",{value:!0});I$e.enumToMap=void 0;function k1o(t){let e={};return Object.keys(t).forEach(r=>{let n=t[r];typeof n=="number"&&(e[r]=n)}),e}a(k1o,"enumToMap");I$e.enumToMap=k1o});var eon=T(hr=>{"use strict";f();Object.defineProperty(hr,"__esModule",{value:!0});hr.SPECIAL_HEADERS=hr.HEADER_STATE=hr.MINOR=hr.MAJOR=hr.CONNECTION_TOKEN_CHARS=hr.HEADER_CHARS=hr.TOKEN=hr.STRICT_TOKEN=hr.HEX=hr.URL_CHAR=hr.STRICT_URL_CHAR=hr.USERINFO_CHARS=hr.MARK=hr.ALPHANUM=hr.NUM=hr.HEX_MAP=hr.NUM_MAP=hr.ALPHA=hr.FINISH=hr.H_METHOD_MAP=hr.METHOD_MAP=hr.METHODS_RTSP=hr.METHODS_ICE=hr.METHODS_HTTP=hr.METHODS=hr.LENIENT_FLAGS=hr.FLAGS=hr.TYPE=hr.ERROR=void 0;var N1o=Zin(),D1o;(function(t){t[t.OK=0]="OK",t[t.INTERNAL=1]="INTERNAL",t[t.STRICT=2]="STRICT",t[t.LF_EXPECTED=3]="LF_EXPECTED",t[t.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",t[t.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",t[t.INVALID_METHOD=6]="INVALID_METHOD",t[t.INVALID_URL=7]="INVALID_URL",t[t.INVALID_CONSTANT=8]="INVALID_CONSTANT",t[t.INVALID_VERSION=9]="INVALID_VERSION",t[t.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",t[t.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",t[t.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",t[t.INVALID_STATUS=13]="INVALID_STATUS",t[t.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",t[t.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",t[t.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",t[t.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",t[t.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",t[t.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",t[t.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",t[t.PAUSED=21]="PAUSED",t[t.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",t[t.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",t[t.USER=24]="USER"})(D1o=hr.ERROR||(hr.ERROR={}));var M1o;(function(t){t[t.BOTH=0]="BOTH",t[t.REQUEST=1]="REQUEST",t[t.RESPONSE=2]="RESPONSE"})(M1o=hr.TYPE||(hr.TYPE={}));var O1o;(function(t){t[t.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",t[t.CHUNKED=8]="CHUNKED",t[t.UPGRADE=16]="UPGRADE",t[t.CONTENT_LENGTH=32]="CONTENT_LENGTH",t[t.SKIPBODY=64]="SKIPBODY",t[t.TRAILING=128]="TRAILING",t[t.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(O1o=hr.FLAGS||(hr.FLAGS={}));var B1o;(function(t){t[t.HEADERS=1]="HEADERS",t[t.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",t[t.KEEP_ALIVE=4]="KEEP_ALIVE"})(B1o=hr.LENIENT_FLAGS||(hr.LENIENT_FLAGS={}));var ii;(function(t){t[t.DELETE=0]="DELETE",t[t.GET=1]="GET",t[t.HEAD=2]="HEAD",t[t.POST=3]="POST",t[t.PUT=4]="PUT",t[t.CONNECT=5]="CONNECT",t[t.OPTIONS=6]="OPTIONS",t[t.TRACE=7]="TRACE",t[t.COPY=8]="COPY",t[t.LOCK=9]="LOCK",t[t.MKCOL=10]="MKCOL",t[t.MOVE=11]="MOVE",t[t.PROPFIND=12]="PROPFIND",t[t.PROPPATCH=13]="PROPPATCH",t[t.SEARCH=14]="SEARCH",t[t.UNLOCK=15]="UNLOCK",t[t.BIND=16]="BIND",t[t.REBIND=17]="REBIND",t[t.UNBIND=18]="UNBIND",t[t.ACL=19]="ACL",t[t.REPORT=20]="REPORT",t[t.MKACTIVITY=21]="MKACTIVITY",t[t.CHECKOUT=22]="CHECKOUT",t[t.MERGE=23]="MERGE",t[t["M-SEARCH"]=24]="M-SEARCH",t[t.NOTIFY=25]="NOTIFY",t[t.SUBSCRIBE=26]="SUBSCRIBE",t[t.UNSUBSCRIBE=27]="UNSUBSCRIBE",t[t.PATCH=28]="PATCH",t[t.PURGE=29]="PURGE",t[t.MKCALENDAR=30]="MKCALENDAR",t[t.LINK=31]="LINK",t[t.UNLINK=32]="UNLINK",t[t.SOURCE=33]="SOURCE",t[t.PRI=34]="PRI",t[t.DESCRIBE=35]="DESCRIBE",t[t.ANNOUNCE=36]="ANNOUNCE",t[t.SETUP=37]="SETUP",t[t.PLAY=38]="PLAY",t[t.PAUSE=39]="PAUSE",t[t.TEARDOWN=40]="TEARDOWN",t[t.GET_PARAMETER=41]="GET_PARAMETER",t[t.SET_PARAMETER=42]="SET_PARAMETER",t[t.REDIRECT=43]="REDIRECT",t[t.RECORD=44]="RECORD",t[t.FLUSH=45]="FLUSH"})(ii=hr.METHODS||(hr.METHODS={}));hr.METHODS_HTTP=[ii.DELETE,ii.GET,ii.HEAD,ii.POST,ii.PUT,ii.CONNECT,ii.OPTIONS,ii.TRACE,ii.COPY,ii.LOCK,ii.MKCOL,ii.MOVE,ii.PROPFIND,ii.PROPPATCH,ii.SEARCH,ii.UNLOCK,ii.BIND,ii.REBIND,ii.UNBIND,ii.ACL,ii.REPORT,ii.MKACTIVITY,ii.CHECKOUT,ii.MERGE,ii["M-SEARCH"],ii.NOTIFY,ii.SUBSCRIBE,ii.UNSUBSCRIBE,ii.PATCH,ii.PURGE,ii.MKCALENDAR,ii.LINK,ii.UNLINK,ii.PRI,ii.SOURCE];hr.METHODS_ICE=[ii.SOURCE];hr.METHODS_RTSP=[ii.OPTIONS,ii.DESCRIBE,ii.ANNOUNCE,ii.SETUP,ii.PLAY,ii.PAUSE,ii.TEARDOWN,ii.GET_PARAMETER,ii.SET_PARAMETER,ii.REDIRECT,ii.RECORD,ii.FLUSH,ii.GET,ii.POST];hr.METHOD_MAP=N1o.enumToMap(ii);hr.H_METHOD_MAP={};Object.keys(hr.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(hr.H_METHOD_MAP[t]=hr.METHOD_MAP[t])});var L1o;(function(t){t[t.SAFE=0]="SAFE",t[t.SAFE_WITH_CB=1]="SAFE_WITH_CB",t[t.UNSAFE=2]="UNSAFE"})(L1o=hr.FINISH||(hr.FINISH={}));hr.ALPHA=[];for(let t=65;t<=90;t++)hr.ALPHA.push(String.fromCharCode(t)),hr.ALPHA.push(String.fromCharCode(t+32));hr.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};hr.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};hr.NUM=["0","1","2","3","4","5","6","7","8","9"];hr.ALPHANUM=hr.ALPHA.concat(hr.NUM);hr.MARK=["-","_",".","!","~","*","'","(",")"];hr.USERINFO_CHARS=hr.ALPHANUM.concat(hr.MARK).concat(["%",";",":","&","=","+","$",","]);hr.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(hr.ALPHANUM);hr.URL_CHAR=hr.STRICT_URL_CHAR.concat([" ","\f"]);for(let t=128;t<=255;t++)hr.URL_CHAR.push(t);hr.HEX=hr.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);hr.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(hr.ALPHANUM);hr.TOKEN=hr.STRICT_TOKEN.concat([" "]);hr.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&hr.HEADER_CHARS.push(t);hr.CONNECTION_TOKEN_CHARS=hr.HEADER_CHARS.filter(t=>t!==44);hr.MAJOR=hr.NUM_MAP;hr.MINOR=hr.MAJOR;var Noe;(function(t){t[t.GENERAL=0]="GENERAL",t[t.CONNECTION=1]="CONNECTION",t[t.CONTENT_LENGTH=2]="CONTENT_LENGTH",t[t.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",t[t.UPGRADE=4]="UPGRADE",t[t.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",t[t.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(Noe=hr.HEADER_STATE||(hr.HEADER_STATE={}));hr.SPECIAL_HEADERS={connection:Noe.CONNECTION,"content-length":Noe.CONTENT_LENGTH,"proxy-connection":Noe.CONNECTION,"transfer-encoding":Noe.TRANSFER_ENCODING,upgrade:Noe.UPGRADE}});var i6t=T((qNu,ton)=>{"use strict";f();var{Buffer:F1o}=require("node:buffer");ton.exports=F1o.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK07MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtXACAAQRhqQgA3AwAgAEIANwMAIABBOGpCADcDACAAQTBqQgA3AwAgAEEoakIANwMAIABBIGpCADcDACAAQRBqQgA3AwAgAEEIakIANwMAIABB3QE2AhwLBgAgABAyC5otAQt/IwBBEGsiCiQAQaTQACgCACIJRQRAQeTTACgCACIFRQRAQfDTAEJ/NwIAQejTAEKAgISAgIDAADcCAEHk0wAgCkEIakFwcUHYqtWqBXMiBTYCAEH40wBBADYCAEHI0wBBADYCAAtBzNMAQYDUBDYCAEGc0ABBgNQENgIAQbDQACAFNgIAQazQAEF/NgIAQdDTAEGArAM2AgADQCABQcjQAGogAUG80ABqIgI2AgAgAiABQbTQAGoiAzYCACABQcDQAGogAzYCACABQdDQAGogAUHE0ABqIgM2AgAgAyACNgIAIAFB2NAAaiABQczQAGoiAjYCACACIAM2AgAgAUHU0ABqIAI2AgAgAUEgaiIBQYACRw0AC0GM1ARBwasDNgIAQajQAEH00wAoAgA2AgBBmNAAQcCrAzYCAEGk0ABBiNQENgIAQcz/B0E4NgIAQYjUBCEJCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFNBEBBjNAAKAIAIgZBECAAQRNqQXBxIABBC0kbIgRBA3YiAHYiAUEDcQRAAkAgAUEBcSAAckEBcyICQQN0IgBBtNAAaiIBIABBvNAAaigCACIAKAIIIgNGBEBBjNAAIAZBfiACd3E2AgAMAQsgASADNgIIIAMgATYCDAsgAEEIaiEBIAAgAkEDdCICQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDBELQZTQACgCACIIIARPDQEgAQRAAkBBAiAAdCICQQAgAmtyIAEgAHRxaCIAQQN0IgJBtNAAaiIBIAJBvNAAaigCACICKAIIIgNGBEBBjNAAIAZBfiAAd3EiBjYCAAwBCyABIAM2AgggAyABNgIMCyACIARBA3I2AgQgAEEDdCIAIARrIQUgACACaiAFNgIAIAIgBGoiBCAFQQFyNgIEIAgEQCAIQXhxQbTQAGohAEGg0AAoAgAhAwJ/QQEgCEEDdnQiASAGcUUEQEGM0AAgASAGcjYCACAADAELIAAoAggLIgEgAzYCDCAAIAM2AgggAyAANgIMIAMgATYCCAsgAkEIaiEBQaDQACAENgIAQZTQACAFNgIADBELQZDQACgCACILRQ0BIAtoQQJ0QbzSAGooAgAiACgCBEF4cSAEayEFIAAhAgNAAkAgAigCECIBRQRAIAJBFGooAgAiAUUNAQsgASgCBEF4cSAEayIDIAVJIQIgAyAFIAIbIQUgASAAIAIbIQAgASECDAELCyAAKAIYIQkgACgCDCIDIABHBEBBnNAAKAIAGiADIAAoAggiATYCCCABIAM2AgwMEAsgAEEUaiICKAIAIgFFBEAgACgCECIBRQ0DIABBEGohAgsDQCACIQcgASIDQRRqIgIoAgAiAQ0AIANBEGohAiADKAIQIgENAAsgB0EANgIADA8LQX8hBCAAQb9/Sw0AIABBE2oiAUFwcSEEQZDQACgCACIIRQ0AQQAgBGshBQJAAkACQAJ/QQAgBEGAAkkNABpBHyAEQf///wdLDQAaIARBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgZBAnRBvNIAaigCACICRQRAQQAhAUEAIQMMAQtBACEBIARBGSAGQQF2a0EAIAZBH0cbdCEAQQAhAwNAAkAgAigCBEF4cSAEayIHIAVPDQAgAiEDIAciBQ0AQQAhBSACIQEMAwsgASACQRRqKAIAIgcgByACIABBHXZBBHFqQRBqKAIAIgJGGyABIAcbIQEgAEEBdCEAIAINAAsLIAEgA3JFBEBBACEDQQIgBnQiAEEAIABrciAIcSIARQ0DIABoQQJ0QbzSAGooAgAhAQsgAUUNAQsDQCABKAIEQXhxIARrIgIgBUkhACACIAUgABshBSABIAMgABshAyABKAIQIgAEfyAABSABQRRqKAIACyIBDQALCyADRQ0AIAVBlNAAKAIAIARrTw0AIAMoAhghByADIAMoAgwiAEcEQEGc0AAoAgAaIAAgAygCCCIBNgIIIAEgADYCDAwOCyADQRRqIgIoAgAiAUUEQCADKAIQIgFFDQMgA0EQaiECCwNAIAIhBiABIgBBFGoiAigCACIBDQAgAEEQaiECIAAoAhAiAQ0ACyAGQQA2AgAMDQtBlNAAKAIAIgMgBE8EQEGg0AAoAgAhAQJAIAMgBGsiAkEQTwRAIAEgBGoiACACQQFyNgIEIAEgA2ogAjYCACABIARBA3I2AgQMAQsgASADQQNyNgIEIAEgA2oiACAAKAIEQQFyNgIEQQAhAEEAIQILQZTQACACNgIAQaDQACAANgIAIAFBCGohAQwPC0GY0AAoAgAiAyAESwRAIAQgCWoiACADIARrIgFBAXI2AgRBpNAAIAA2AgBBmNAAIAE2AgAgCSAEQQNyNgIEIAlBCGohAQwPC0EAIQEgBAJ/QeTTACgCAARAQezTACgCAAwBC0Hw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBDGpBcHFB2KrVqgVzNgIAQfjTAEEANgIAQcjTAEEANgIAQYCABAsiACAEQccAaiIFaiIGQQAgAGsiB3EiAk8EQEH80wBBMDYCAAwPCwJAQcTTACgCACIBRQ0AQbzTACgCACIIIAJqIQAgACABTSAAIAhLcQ0AQQAhAUH80wBBMDYCAAwPC0HI0wAtAABBBHENBAJAAkAgCQRAQczTACEBA0AgASgCACIAIAlNBEAgACABKAIEaiAJSw0DCyABKAIIIgENAAsLQQAQMyIAQX9GDQUgAiEGQejTACgCACIBQQFrIgMgAHEEQCACIABrIAAgA2pBACABa3FqIQYLIAQgBk8NBSAGQf7///8HSw0FQcTTACgCACIDBEBBvNMAKAIAIgcgBmohASABIAdNDQYgASADSw0GCyAGEDMiASAARw0BDAcLIAYgA2sgB3EiBkH+////B0sNBCAGEDMhACAAIAEoAgAgASgCBGpGDQMgACEBCwJAIAYgBEHIAGpPDQAgAUF/Rg0AQezTACgCACIAIAUgBmtqQQAgAGtxIgBB/v///wdLBEAgASEADAcLIAAQM0F/RwRAIAAgBmohBiABIQAMBwtBACAGaxAzGgwECyABIgBBf0cNBQwDC0EAIQMMDAtBACEADAoLIABBf0cNAgtByNMAQcjTACgCAEEEcjYCAAsgAkH+////B0sNASACEDMhAEEAEDMhASAAQX9GDQEgAUF/Rg0BIAAgAU8NASABIABrIgYgBEE4ak0NAQtBvNMAQbzTACgCACAGaiIBNgIAQcDTACgCACABSQRAQcDTACABNgIACwJAAkACQEGk0AAoAgAiAgRAQczTACEBA0AgACABKAIAIgMgASgCBCIFakYNAiABKAIIIgENAAsMAgtBnNAAKAIAIgFBAEcgACABT3FFBEBBnNAAIAA2AgALQQAhAUHQ0wAgBjYCAEHM0wAgADYCAEGs0ABBfzYCAEGw0ABB5NMAKAIANgIAQdjTAEEANgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBeCAAa0EPcSIBIABqIgIgBkE4ayIDIAFrIgFBAXI2AgRBqNAAQfTTACgCADYCAEGY0AAgATYCAEGk0AAgAjYCACAAIANqQTg2AgQMAgsgACACTQ0AIAIgA0kNACABKAIMQQhxDQBBeCACa0EPcSIAIAJqIgNBmNAAKAIAIAZqIgcgAGsiAEEBcjYCBCABIAUgBmo2AgRBqNAAQfTTACgCADYCAEGY0AAgADYCAEGk0AAgAzYCACACIAdqQTg2AgQMAQsgAEGc0AAoAgBJBEBBnNAAIAA2AgALIAAgBmohA0HM0wAhAQJAAkACQANAIAMgASgCAEcEQCABKAIIIgENAQwCCwsgAS0ADEEIcUUNAQtBzNMAIQEDQCABKAIAIgMgAk0EQCADIAEoAgRqIgUgAksNAwsgASgCCCEBDAALAAsgASAANgIAIAEgASgCBCAGajYCBCAAQXggAGtBD3FqIgkgBEEDcjYCBCADQXggA2tBD3FqIgYgBCAJaiIEayEBIAIgBkYEQEGk0AAgBDYCAEGY0ABBmNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEDAgLQaDQACgCACAGRgRAQaDQACAENgIAQZTQAEGU0AAoAgAgAWoiADYCACAEIABBAXI2AgQgACAEaiAANgIADAgLIAYoAgQiBUEDcUEBRw0GIAVBeHEhCCAFQf8BTQRAIAVBA3YhAyAGKAIIIgAgBigCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBwsgAiAANgIIIAAgAjYCDAwGCyAGKAIYIQcgBiAGKAIMIgBHBEAgACAGKAIIIgI2AgggAiAANgIMDAULIAZBFGoiAigCACIFRQRAIAYoAhAiBUUNBCAGQRBqIQILA0AgAiEDIAUiAEEUaiICKAIAIgUNACAAQRBqIQIgACgCECIFDQALIANBADYCAAwEC0F4IABrQQ9xIgEgAGoiByAGQThrIgMgAWsiAUEBcjYCBCAAIANqQTg2AgQgAiAFQTcgBWtBD3FqQT9rIgMgAyACQRBqSRsiA0EjNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAc2AgAgA0EQakHU0wApAgA3AgAgA0HM0wApAgA3AghB1NMAIANBCGo2AgBB0NMAIAY2AgBBzNMAIAA2AgBB2NMAQQA2AgAgA0EkaiEBA0AgAUEHNgIAIAUgAUEEaiIBSw0ACyACIANGDQAgAyADKAIEQX5xNgIEIAMgAyACayIFNgIAIAIgBUEBcjYCBCAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIDcUUEQEGM0AAgASADcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEGQ0AAoAgAiA0EBIAF0IgZxRQRAIAAgAjYCAEGQ0AAgAyAGcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQMCQANAIAMiACgCBEF4cSAFRg0BIAFBHXYhAyABQQF0IQEgACADQQRxakEQaiIGKAIAIgMNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAtBmNAAKAIAIgEgBE0NAEGk0AAoAgAiACAEaiICIAEgBGsiAUEBcjYCBEGY0AAgATYCAEGk0AAgAjYCACAAIARBA3I2AgQgAEEIaiEBDAgLQQAhAUH80wBBMDYCAAwHC0EAIQALIAdFDQACQCAGKAIcIgJBAnRBvNIAaiIDKAIAIAZGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAdBEEEUIAcoAhAgBkYbaiAANgIAIABFDQELIAAgBzYCGCAGKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAGQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAIaiEBIAYgCGoiBigCBCEFCyAGIAVBfnE2AgQgASAEaiABNgIAIAQgAUEBcjYCBCABQf8BTQRAIAFBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASABQQN2dCIBcUUEQEGM0AAgASACcjYCACAADAELIAAoAggLIgEgBDYCDCAAIAQ2AgggBCAANgIMIAQgATYCCAwBC0EfIQUgAUH///8HTQRAIAFBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmohBQsgBCAFNgIcIARCADcCECAFQQJ0QbzSAGohAEGQ0AAoAgAiAkEBIAV0IgNxRQRAIAAgBDYCAEGQ0AAgAiADcjYCACAEIAA2AhggBCAENgIIIAQgBDYCDAwBCyABQRkgBUEBdmtBACAFQR9HG3QhBSAAKAIAIQACQANAIAAiAigCBEF4cSABRg0BIAVBHXYhACAFQQF0IQUgAiAAQQRxakEQaiIDKAIAIgANAAsgAyAENgIAIAQgAjYCGCAEIAQ2AgwgBCAENgIIDAELIAIoAggiACAENgIMIAIgBDYCCCAEQQA2AhggBCACNgIMIAQgADYCCAsgCUEIaiEBDAILAkAgB0UNAAJAIAMoAhwiAUECdEG80gBqIgIoAgAgA0YEQCACIAA2AgAgAA0BQZDQACAIQX4gAXdxIgg2AgAMAgsgB0EQQRQgBygCECADRhtqIAA2AgAgAEUNAQsgACAHNgIYIAMoAhAiAQRAIAAgATYCECABIAA2AhgLIANBFGooAgAiAUUNACAAQRRqIAE2AgAgASAANgIYCwJAIAVBD00EQCADIAQgBWoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAwBCyADIARqIgIgBUEBcjYCBCADIARBA3I2AgQgAiAFaiAFNgIAIAVB/wFNBEAgBUF4cUG00ABqIQACf0GM0AAoAgAiAUEBIAVBA3Z0IgVxRQRAQYzQACABIAVyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRBvNIAaiEAQQEgAXQiBCAIcUUEQCAAIAI2AgBBkNAAIAQgCHI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEEAkADQCAEIgAoAgRBeHEgBUYNASABQR12IQQgAUEBdCEBIAAgBEEEcWpBEGoiBigCACIEDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLIANBCGohAQwBCwJAIAlFDQACQCAAKAIcIgFBAnRBvNIAaiICKAIAIABGBEAgAiADNgIAIAMNAUGQ0AAgC0F+IAF3cTYCAAwCCyAJQRBBFCAJKAIQIABGG2ogAzYCACADRQ0BCyADIAk2AhggACgCECIBBEAgAyABNgIQIAEgAzYCGAsgAEEUaigCACIBRQ0AIANBFGogATYCACABIAM2AhgLAkAgBUEPTQRAIAAgBCAFaiIBQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAELIAAgBGoiByAFQQFyNgIEIAAgBEEDcjYCBCAFIAdqIAU2AgAgCARAIAhBeHFBtNAAaiEBQaDQACgCACEDAn9BASAIQQN2dCICIAZxRQRAQYzQACACIAZyNgIAIAEMAQsgASgCCAsiAiADNgIMIAEgAzYCCCADIAE2AgwgAyACNgIIC0Gg0AAgBzYCAEGU0AAgBTYCAAsgAEEIaiEBCyAKQRBqJAAgAQtDACAARQRAPwBBEHQPCwJAIABB//8DcQ0AIABBAEgNACAAQRB2QAAiAEF/RgRAQfzTAEEwNgIAQX8PCyAAQRB0DwsACwvcPyIAQYAICwkBAAAAAgAAAAMAQZQICwUEAAAABQBBpAgLCQYAAAAHAAAACABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv","base64")});var non=T((HNu,ron)=>{"use strict";f();var{Buffer:U1o}=require("node:buffer");ron.exports=U1o.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK77MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtzACAAQRBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAA/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQTBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQSBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQd0BNgIcCwYAIAAQMguaLQELfyMAQRBrIgokAEGk0AAoAgAiCUUEQEHk0wAoAgAiBUUEQEHw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBCGpBcHFB2KrVqgVzIgU2AgBB+NMAQQA2AgBByNMAQQA2AgALQczTAEGA1AQ2AgBBnNAAQYDUBDYCAEGw0AAgBTYCAEGs0ABBfzYCAEHQ0wBBgKwDNgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBjNQEQcGrAzYCAEGo0ABB9NMAKAIANgIAQZjQAEHAqwM2AgBBpNAAQYjUBDYCAEHM/wdBODYCAEGI1AQhCQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQewBTQRAQYzQACgCACIGQRAgAEETakFwcSAAQQtJGyIEQQN2IgB2IgFBA3EEQAJAIAFBAXEgAHJBAXMiAkEDdCIAQbTQAGoiASAAQbzQAGooAgAiACgCCCIDRgRAQYzQACAGQX4gAndxNgIADAELIAEgAzYCCCADIAE2AgwLIABBCGohASAAIAJBA3QiAkEDcjYCBCAAIAJqIgAgACgCBEEBcjYCBAwRC0GU0AAoAgAiCCAETw0BIAEEQAJAQQIgAHQiAkEAIAJrciABIAB0cWgiAEEDdCICQbTQAGoiASACQbzQAGooAgAiAigCCCIDRgRAQYzQACAGQX4gAHdxIgY2AgAMAQsgASADNgIIIAMgATYCDAsgAiAEQQNyNgIEIABBA3QiACAEayEFIAAgAmogBTYCACACIARqIgQgBUEBcjYCBCAIBEAgCEF4cUG00ABqIQBBoNAAKAIAIQMCf0EBIAhBA3Z0IgEgBnFFBEBBjNAAIAEgBnI2AgAgAAwBCyAAKAIICyIBIAM2AgwgACADNgIIIAMgADYCDCADIAE2AggLIAJBCGohAUGg0AAgBDYCAEGU0AAgBTYCAAwRC0GQ0AAoAgAiC0UNASALaEECdEG80gBqKAIAIgAoAgRBeHEgBGshBSAAIQIDQAJAIAIoAhAiAUUEQCACQRRqKAIAIgFFDQELIAEoAgRBeHEgBGsiAyAFSSECIAMgBSACGyEFIAEgACACGyEAIAEhAgwBCwsgACgCGCEJIAAoAgwiAyAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAIAkgBEEDcjYCBCAJQQhqIQEMDwtBACEBIAQCf0Hk0wAoAgAEQEHs0wAoAgAMAQtB8NMAQn83AgBB6NMAQoCAhICAgMAANwIAQeTTACAKQQxqQXBxQdiq1aoFczYCAEH40wBBADYCAEHI0wBBADYCAEGAgAQLIgAgBEHHAGoiBWoiBkEAIABrIgdxIgJPBEBB/NMAQTA2AgAMDwsCQEHE0wAoAgAiAUUNAEG80wAoAgAiCCACaiEAIAAgAU0gACAIS3ENAEEAIQFB/NMAQTA2AgAMDwtByNMALQAAQQRxDQQCQAJAIAkEQEHM0wAhAQNAIAEoAgAiACAJTQRAIAAgASgCBGogCUsNAwsgASgCCCIBDQALC0EAEDMiAEF/Rg0FIAIhBkHo0wAoAgAiAUEBayIDIABxBEAgAiAAayAAIANqQQAgAWtxaiEGCyAEIAZPDQUgBkH+////B0sNBUHE0wAoAgAiAwRAQbzTACgCACIHIAZqIQEgASAHTQ0GIAEgA0sNBgsgBhAzIgEgAEcNAQwHCyAGIANrIAdxIgZB/v///wdLDQQgBhAzIQAgACABKAIAIAEoAgRqRg0DIAAhAQsCQCAGIARByABqTw0AIAFBf0YNAEHs0wAoAgAiACAFIAZrakEAIABrcSIAQf7///8HSwRAIAEhAAwHCyAAEDNBf0cEQCAAIAZqIQYgASEADAcLQQAgBmsQMxoMBAsgASIAQX9HDQUMAwtBACEDDAwLQQAhAAwKCyAAQX9HDQILQcjTAEHI0wAoAgBBBHI2AgALIAJB/v///wdLDQEgAhAzIQBBABAzIQEgAEF/Rg0BIAFBf0YNASAAIAFPDQEgASAAayIGIARBOGpNDQELQbzTAEG80wAoAgAgBmoiATYCAEHA0wAoAgAgAUkEQEHA0wAgATYCAAsCQAJAAkBBpNAAKAIAIgIEQEHM0wAhAQNAIAAgASgCACIDIAEoAgQiBWpGDQIgASgCCCIBDQALDAILQZzQACgCACIBQQBHIAAgAU9xRQRAQZzQACAANgIAC0EAIQFB0NMAIAY2AgBBzNMAIAA2AgBBrNAAQX82AgBBsNAAQeTTACgCADYCAEHY0wBBADYCAANAIAFByNAAaiABQbzQAGoiAjYCACACIAFBtNAAaiIDNgIAIAFBwNAAaiADNgIAIAFB0NAAaiABQcTQAGoiAzYCACADIAI2AgAgAUHY0ABqIAFBzNAAaiICNgIAIAIgAzYCACABQdTQAGogAjYCACABQSBqIgFBgAJHDQALQXggAGtBD3EiASAAaiICIAZBOGsiAyABayIBQQFyNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAI2AgAgACADakE4NgIEDAILIAAgAk0NACACIANJDQAgASgCDEEIcQ0AQXggAmtBD3EiACACaiIDQZjQACgCACAGaiIHIABrIgBBAXI2AgQgASAFIAZqNgIEQajQAEH00wAoAgA2AgBBmNAAIAA2AgBBpNAAIAM2AgAgAiAHakE4NgIEDAELIABBnNAAKAIASQRAQZzQACAANgIACyAAIAZqIQNBzNMAIQECQAJAAkADQCADIAEoAgBHBEAgASgCCCIBDQEMAgsLIAEtAAxBCHFFDQELQczTACEBA0AgASgCACIDIAJNBEAgAyABKAIEaiIFIAJLDQMLIAEoAgghAQwACwALIAEgADYCACABIAEoAgQgBmo2AgQgAEF4IABrQQ9xaiIJIARBA3I2AgQgA0F4IANrQQ9xaiIGIAQgCWoiBGshASACIAZGBEBBpNAAIAQ2AgBBmNAAQZjQACgCACABaiIANgIAIAQgAEEBcjYCBAwIC0Gg0AAoAgAgBkYEQEGg0AAgBDYCAEGU0ABBlNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEIAAgBGogADYCAAwICyAGKAIEIgVBA3FBAUcNBiAFQXhxIQggBUH/AU0EQCAFQQN2IQMgBigCCCIAIAYoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAcLIAIgADYCCCAAIAI2AgwMBgsgBigCGCEHIAYgBigCDCIARwRAIAAgBigCCCICNgIIIAIgADYCDAwFCyAGQRRqIgIoAgAiBUUEQCAGKAIQIgVFDQQgBkEQaiECCwNAIAIhAyAFIgBBFGoiAigCACIFDQAgAEEQaiECIAAoAhAiBQ0ACyADQQA2AgAMBAtBeCAAa0EPcSIBIABqIgcgBkE4ayIDIAFrIgFBAXI2AgQgACADakE4NgIEIAIgBUE3IAVrQQ9xakE/ayIDIAMgAkEQakkbIgNBIzYCBEGo0ABB9NMAKAIANgIAQZjQACABNgIAQaTQACAHNgIAIANBEGpB1NMAKQIANwIAIANBzNMAKQIANwIIQdTTACADQQhqNgIAQdDTACAGNgIAQczTACAANgIAQdjTAEEANgIAIANBJGohAQNAIAFBBzYCACAFIAFBBGoiAUsNAAsgAiADRg0AIAMgAygCBEF+cTYCBCADIAMgAmsiBTYCACACIAVBAXI2AgQgBUH/AU0EQCAFQXhxQbTQAGohAAJ/QYzQACgCACIBQQEgBUEDdnQiA3FFBEBBjNAAIAEgA3I2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEG80gBqIQBBkNAAKAIAIgNBASABdCIGcUUEQCAAIAI2AgBBkNAAIAMgBnI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEDAkADQCADIgAoAgRBeHEgBUYNASABQR12IQMgAUEBdCEBIAAgA0EEcWpBEGoiBigCACIDDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLQZjQACgCACIBIARNDQBBpNAAKAIAIgAgBGoiAiABIARrIgFBAXI2AgRBmNAAIAE2AgBBpNAAIAI2AgAgACAEQQNyNgIEIABBCGohAQwIC0EAIQFB/NMAQTA2AgAMBwtBACEACyAHRQ0AAkAgBigCHCICQQJ0QbzSAGoiAygCACAGRgRAIAMgADYCACAADQFBkNAAQZDQACgCAEF+IAJ3cTYCAAwCCyAHQRBBFCAHKAIQIAZGG2ogADYCACAARQ0BCyAAIAc2AhggBigCECICBEAgACACNgIQIAIgADYCGAsgBkEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgCGohASAGIAhqIgYoAgQhBQsgBiAFQX5xNgIEIAEgBGogATYCACAEIAFBAXI2AgQgAUH/AU0EQCABQXhxQbTQAGohAAJ/QYzQACgCACICQQEgAUEDdnQiAXFFBEBBjNAAIAEgAnI2AgAgAAwBCyAAKAIICyIBIAQ2AgwgACAENgIIIAQgADYCDCAEIAE2AggMAQtBHyEFIAFB////B00EQCABQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qIQULIAQgBTYCHCAEQgA3AhAgBUECdEG80gBqIQBBkNAAKAIAIgJBASAFdCIDcUUEQCAAIAQ2AgBBkNAAIAIgA3I2AgAgBCAANgIYIAQgBDYCCCAEIAQ2AgwMAQsgAUEZIAVBAXZrQQAgBUEfRxt0IQUgACgCACEAAkADQCAAIgIoAgRBeHEgAUYNASAFQR12IQAgBUEBdCEFIAIgAEEEcWpBEGoiAygCACIADQALIAMgBDYCACAEIAI2AhggBCAENgIMIAQgBDYCCAwBCyACKAIIIgAgBDYCDCACIAQ2AgggBEEANgIYIAQgAjYCDCAEIAA2AggLIAlBCGohAQwCCwJAIAdFDQACQCADKAIcIgFBAnRBvNIAaiICKAIAIANGBEAgAiAANgIAIAANAUGQ0AAgCEF+IAF3cSIINgIADAILIAdBEEEUIAcoAhAgA0YbaiAANgIAIABFDQELIAAgBzYCGCADKAIQIgEEQCAAIAE2AhAgASAANgIYCyADQRRqKAIAIgFFDQAgAEEUaiABNgIAIAEgADYCGAsCQCAFQQ9NBEAgAyAEIAVqIgBBA3I2AgQgACADaiIAIAAoAgRBAXI2AgQMAQsgAyAEaiICIAVBAXI2AgQgAyAEQQNyNgIEIAIgBWogBTYCACAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIFcUUEQEGM0AAgASAFcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEEBIAF0IgQgCHFFBEAgACACNgIAQZDQACAEIAhyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhBAJAA0AgBCIAKAIEQXhxIAVGDQEgAUEddiEEIAFBAXQhASAAIARBBHFqQRBqIgYoAgAiBA0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIICyADQQhqIQEMAQsCQCAJRQ0AAkAgACgCHCIBQQJ0QbzSAGoiAigCACAARgRAIAIgAzYCACADDQFBkNAAIAtBfiABd3E2AgAMAgsgCUEQQRQgCSgCECAARhtqIAM2AgAgA0UNAQsgAyAJNgIYIAAoAhAiAQRAIAMgATYCECABIAM2AhgLIABBFGooAgAiAUUNACADQRRqIAE2AgAgASADNgIYCwJAIAVBD00EQCAAIAQgBWoiAUEDcjYCBCAAIAFqIgEgASgCBEEBcjYCBAwBCyAAIARqIgcgBUEBcjYCBCAAIARBA3I2AgQgBSAHaiAFNgIAIAgEQCAIQXhxQbTQAGohAUGg0AAoAgAhAwJ/QQEgCEEDdnQiAiAGcUUEQEGM0AAgAiAGcjYCACABDAELIAEoAggLIgIgAzYCDCABIAM2AgggAyABNgIMIAMgAjYCCAtBoNAAIAc2AgBBlNAAIAU2AgALIABBCGohAQsgCkEQaiQAIAELQwAgAEUEQD8AQRB0DwsCQCAAQf//A3ENACAAQQBIDQAgAEEQdkAAIgBBf0YEQEH80wBBMDYCAEF/DwsgAEEQdA8LAAsL3D8iAEGACAsJAQAAAAIAAAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==","base64")});var S1e=T(($Nu,don)=>{"use strict";f();var ion=["GET","HEAD","POST"],Q1o=new Set(ion),q1o=[101,204,205,304],oon=[301,302,303,307,308],G1o=new Set(oon),son=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],H1o=new Set(son),aon=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],j1o=new Set(aon),$1o=["follow","manual","error"],con=["GET","HEAD","OPTIONS","TRACE"],V1o=new Set(con),W1o=["navigate","same-origin","no-cors","cors"],z1o=["omit","same-origin","include"],Y1o=["default","no-store","reload","no-cache","force-cache","only-if-cached"],K1o=["content-encoding","content-language","content-location","content-type","content-length"],J1o=["half"],lon=["CONNECT","TRACE","TRACK"],X1o=new Set(lon),uon=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],Z1o=new Set(uon);don.exports={subresource:uon,forbiddenMethods:lon,requestBodyHeader:K1o,referrerPolicy:aon,requestRedirect:$1o,requestMode:W1o,requestCredentials:z1o,requestCache:Y1o,redirectStatus:oon,corsSafeListedMethods:ion,nullBodyStatus:q1o,safeMethods:con,badPorts:son,requestDuplex:J1o,subresourceSet:Z1o,badPortsSet:H1o,redirectStatusSet:G1o,corsSafeListedMethodsSet:Q1o,safeMethodsSet:V1o,forbiddenMethodsSet:X1o,referrerPolicySet:j1o}});var s6t=T((WNu,fon)=>{"use strict";f();var o6t=Symbol.for("undici.globalOrigin.1");function evo(){return globalThis[o6t]}a(evo,"getGlobalOrigin");function tvo(t){if(t===void 0){Object.defineProperty(globalThis,o6t,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,o6t,{value:e,writable:!0,enumerable:!1,configurable:!1})}a(tvo,"setGlobalOrigin");fon.exports={getGlobalOrigin:evo,setGlobalOrigin:tvo}});var SC=T((KNu,Eon)=>{"use strict";f();var w$e=require("node:assert"),rvo=new TextEncoder,I1e=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,nvo=/[\u000A\u000D\u0009\u0020]/,ivo=/[\u0009\u000A\u000C\u000D\u0020]/g,ovo=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function svo(t){w$e(t.protocol==="data:");let e=mon(t,!0);e=e.slice(5);let r={position:0},n=Doe(",",e,r),o=n.length;if(n=fvo(n,!0,!0),r.position>=e.length)return"failure";r.position++;let s=e.slice(o+1),c=gon(s);if(/;(\u0020){0,}base64$/i.test(n)){let u=yon(c);if(c=cvo(u),c==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020)+$/,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let l=a6t(n);return l==="failure"&&(l=a6t("text/plain;charset=US-ASCII")),{mimeType:l,body:c}}a(svo,"dataURLProcessor");function mon(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,o=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?o.slice(0,-1):o}a(mon,"URLSerializer");function R$e(t,e,r){let n="";for(;r.position=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}a(pon,"isHexCharByte");function hon(t){return t>=48&&t<=57?t-48:(t&223)-55}a(hon,"hexByteToNumber");function avo(t){let e=t.length,r=new Uint8Array(e),n=0;for(let o=0;ot.length)return"failure";e.position++;let n=Doe(";",t,e);if(n=x$e(n,!1,!0),n.length===0||!I1e.test(n))return"failure";let o=r.toLowerCase(),s=n.toLowerCase(),c={type:o,subtype:s,parameters:new Map,essence:`${o}/${s}`};for(;e.positionnvo.test(d),t,e);let l=R$e(d=>d!==";"&&d!=="=",t,e);if(l=l.toLowerCase(),e.positiont.length)break;let u=null;if(t[e.position]==='"')u=Aon(t,e,!0),Doe(";",t,e);else if(u=Doe(";",t,e),u=x$e(u,!1,!0),u.length===0)continue;l.length!==0&&I1e.test(l)&&(u.length===0||ovo.test(u))&&!c.parameters.has(l)&&c.parameters.set(l,u)}return c}a(a6t,"parseMIMEType");function cvo(t){t=t.replace(ivo,"");let e=t.length;if(e%4===0&&t.charCodeAt(e-1)===61&&(--e,t.charCodeAt(e-1)===61&&--e),e%4===1||/[^+/0-9A-Za-z]/.test(t.length===e?t:t.substring(0,e)))return"failure";let r=Buffer.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}a(cvo,"forgivingBase64");function Aon(t,e,r){let n=e.position,o="";for(w$e(t[e.position]==='"'),e.position++;o+=R$e(c=>c!=='"'&&c!=="\\",t,e),!(e.position>=t.length);){let s=t[e.position];if(e.position++,s==="\\"){if(e.position>=t.length){o+="\\";break}o+=t[e.position],e.position++}else{w$e(s==='"');break}}return r?o:t.slice(n,e.position)}a(Aon,"collectAnHTTPQuotedString");function lvo(t){w$e(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[o,s]of e.entries())n+=";",n+=o,n+="=",I1e.test(s)||(s=s.replace(/(\\|")/g,"\\$1"),s='"'+s,s+='"'),n+=s;return n}a(lvo,"serializeAMimeType");function uvo(t){return t===13||t===10||t===9||t===32}a(uvo,"isHTTPWhiteSpace");function x$e(t,e=!0,r=!0){return c6t(t,e,r,uvo)}a(x$e,"removeHTTPWhitespace");function dvo(t){return t===13||t===10||t===9||t===12||t===32}a(dvo,"isASCIIWhitespace");function fvo(t,e=!0,r=!0){return c6t(t,e,r,dvo)}a(fvo,"removeASCIIWhitespace");function c6t(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o0&&n(t.charCodeAt(s));)s--;return o===0&&s===t.length-1?t:t.slice(o,s+1)}a(c6t,"removeChars");function yon(t){let e=t.length;if(65535>e)return String.fromCharCode.apply(null,t);let r="",n=0,o=65535;for(;ne&&(o=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=o));return r}a(yon,"isomorphicDecode");function pvo(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}a(pvo,"minimizeSupportedMimeType");Eon.exports={dataURLProcessor:svo,URLSerializer:mon,collectASequenceOfCodePoints:R$e,collectASequenceOfCodePointsFast:Doe,stringPercentDecode:gon,parseMIMEType:a6t,collectAnHTTPQuotedString:Aon,serializeAMimeType:lvo,removeChars:c6t,removeHTTPWhitespace:x$e,minimizeSupportedMimeType:pvo,HTTP_TOKEN_CODEPOINTS:I1e,isomorphicDecode:yon}});var Bm=T((ZNu,Con)=>{"use strict";f();var{types:Zk,inspect:hvo}=require("node:util"),{markAsUncloneable:mvo}=require("node:worker_threads"),{toUSVString:gvo}=rs(),or={};or.converters={};or.util={};or.errors={};or.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};or.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return or.errors.exception({header:t.prefix,message:r})};or.errors.invalidArgument=function(t){return or.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};or.brandCheck=function(t,e,r){if(r?.strict!==!1){if(!(t instanceof e)){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}else if(t?.[Symbol.toStringTag]!==e.prototype[Symbol.toStringTag]){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}};or.argumentLengthCheck=function({length:t},e,r){if(t{});or.util.ConvertToInt=function(t,e,r,n){let o,s;e===64?(o=Math.pow(2,53)-1,r==="unsigned"?s=0:s=Math.pow(-2,53)+1):r==="unsigned"?(s=0,o=Math.pow(2,e)-1):(s=Math.pow(-2,e)-1,o=Math.pow(2,e-1)-1);let c=Number(t);if(c===0&&(c=0),n?.enforceRange===!0){if(Number.isNaN(c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY)throw or.errors.exception({header:"Integer conversion",message:`Could not convert ${or.util.Stringify(t)} to an integer.`});if(c=or.util.IntegerPart(c),co)throw or.errors.exception({header:"Integer conversion",message:`Value must be between ${s}-${o}, got ${c}.`});return c}return!Number.isNaN(c)&&n?.clamp===!0?(c=Math.min(Math.max(c,s),o),Math.floor(c)%2===0?c=Math.floor(c):c=Math.ceil(c),c):Number.isNaN(c)||c===0&&Object.is(0,c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY?0:(c=or.util.IntegerPart(c),c=c%Math.pow(2,e),r==="signed"&&c>=Math.pow(2,e)-1?c-Math.pow(2,e):c)};or.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};or.util.Stringify=function(t){switch(or.util.Type(t)){case"Symbol":return`Symbol(${t.description})`;case"Object":return hvo(t);case"String":return`"${t}"`;default:return`${t}`}};or.sequenceConverter=function(t){return(e,r,n,o)=>{if(or.util.Type(e)!=="Object")throw or.errors.exception({header:r,message:`${n} (${or.util.Stringify(e)}) is not iterable.`});let s=typeof o=="function"?o():e?.[Symbol.iterator]?.(),c=[],l=0;if(s===void 0||typeof s.next!="function")throw or.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:u,value:d}=s.next();if(u)break;c.push(t(d,r,`${n}[${l++}]`))}return c}};or.recordConverter=function(t,e){return(r,n,o)=>{if(or.util.Type(r)!=="Object")throw or.errors.exception({header:n,message:`${o} ("${or.util.Type(r)}") is not an Object.`});let s={};if(!Zk.isProxy(r)){let l=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let u of l){let d=t(u,n,o),p=e(r[u],n,o);s[d]=p}return s}let c=Reflect.ownKeys(r);for(let l of c)if(Reflect.getOwnPropertyDescriptor(r,l)?.enumerable){let d=t(l,n,o),p=e(r[l],n,o);s[d]=p}return s}};or.interfaceConverter=function(t){return(e,r,n,o)=>{if(o?.strict!==!1&&!(e instanceof t))throw or.errors.exception({header:r,message:`Expected ${n} ("${or.util.Stringify(e)}") to be an instance of ${t.name}.`});return e}};or.dictionaryConverter=function(t){return(e,r,n)=>{let o=or.util.Type(e),s={};if(o==="Null"||o==="Undefined")return s;if(o!=="Object")throw or.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let c of t){let{key:l,defaultValue:u,required:d,converter:p}=c;if(d===!0&&!Object.hasOwn(e,l))throw or.errors.exception({header:r,message:`Missing required key "${l}".`});let h=e[l],m=Object.hasOwn(c,"defaultValue");if(m&&h!==null&&(h??=u()),d||m||h!==void 0){if(h=p(h,r,`${n}.${l}`),c.allowedValues&&!c.allowedValues.includes(h))throw or.errors.exception({header:r,message:`${h} is not an accepted type. Expected one of ${c.allowedValues.join(", ")}.`});s[l]=h}}return s}};or.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};or.converters.DOMString=function(t,e,r,n){if(t===null&&n?.legacyNullToEmptyString)return"";if(typeof t=="symbol")throw or.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};or.converters.ByteString=function(t,e,r){let n=or.converters.DOMString(t,e,r);for(let o=0;o255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${o} has a value of ${n.charCodeAt(o)} which is greater than 255.`);return n};or.converters.USVString=gvo;or.converters.boolean=function(t){return!!t};or.converters.any=function(t){return t};or.converters["long long"]=function(t,e,r){return or.util.ConvertToInt(t,64,"signed",void 0,e,r)};or.converters["unsigned long long"]=function(t,e,r){return or.util.ConvertToInt(t,64,"unsigned",void 0,e,r)};or.converters["unsigned long"]=function(t,e,r){return or.util.ConvertToInt(t,32,"unsigned",void 0,e,r)};or.converters["unsigned short"]=function(t,e,r,n){return or.util.ConvertToInt(t,16,"unsigned",n,e,r)};or.converters.ArrayBuffer=function(t,e,r,n){if(or.util.Type(t)!=="Object"||!Zk.isAnyArrayBuffer(t))throw or.errors.conversionFailed({prefix:e,argument:`${r} ("${or.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(n?.allowShared===!1&&Zk.isSharedArrayBuffer(t))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.resizable||t.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.TypedArray=function(t,e,r,n,o){if(or.util.Type(t)!=="Object"||!Zk.isTypedArray(t)||t.constructor.name!==e.name)throw or.errors.conversionFailed({prefix:r,argument:`${n} ("${or.util.Stringify(t)}")`,types:[e.name]});if(o?.allowShared===!1&&Zk.isSharedArrayBuffer(t.buffer))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.DataView=function(t,e,r,n){if(or.util.Type(t)!=="Object"||!Zk.isDataView(t))throw or.errors.exception({header:e,message:`${r} is not a DataView.`});if(n?.allowShared===!1&&Zk.isSharedArrayBuffer(t.buffer))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.BufferSource=function(t,e,r,n){if(Zk.isAnyArrayBuffer(t))return or.converters.ArrayBuffer(t,e,r,{...n,allowShared:!1});if(Zk.isTypedArray(t))return or.converters.TypedArray(t,t.constructor,e,r,{...n,allowShared:!1});if(Zk.isDataView(t))return or.converters.DataView(t,e,r,{...n,allowShared:!1});throw or.errors.conversionFailed({prefix:e,argument:`${r} ("${or.util.Stringify(t)}")`,types:["BufferSource"]})};or.converters["sequence"]=or.sequenceConverter(or.converters.ByteString);or.converters["sequence>"]=or.sequenceConverter(or.converters["sequence"]);or.converters["record"]=or.recordConverter(or.converters.ByteString,or.converters.ByteString);Con.exports={webidl:or}});var mv=T((tDu,Mon)=>{"use strict";f();var{Transform:Avo}=require("node:stream"),_on=require("node:zlib"),{redirectStatusSet:yvo,referrerPolicySet:Evo,badPortsSet:Cvo}=S1e(),{getGlobalOrigin:von}=s6t(),{collectASequenceOfCodePoints:wV,collectAnHTTPQuotedString:_vo,removeChars:vvo,parseMIMEType:bvo}=SC(),{performance:Tvo}=require("node:perf_hooks"),{isBlobLike:Svo,ReadableStreamFrom:Ivo,isValidHTTPToken:bon,normalizedMethodRecordsBase:xvo}=rs(),RV=require("node:assert"),{isUint8Array:wvo}=require("node:util/types"),{webidl:x1e}=Bm(),Ton=[],k$e;try{k$e=require("node:crypto");let t=["sha256","sha384","sha512"];Ton=k$e.getHashes().filter(e=>t.includes(e))}catch{}function Son(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}a(Son,"responseURL");function Rvo(t,e){if(!yvo.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&xon(r)&&(Ion(r)||(r=Pvo(r)),r=new URL(r,Son(t))),r&&!r.hash&&(r.hash=e),r}a(Rvo,"responseLocationURL");function Ion(t){for(let e=0;e126||r<32)return!1}return!0}a(Ion,"isValidEncodedURL");function Pvo(t){return Buffer.from(t,"binary").toString("utf8")}a(Pvo,"normalizeBinaryStringToUtf8");function R1e(t){return t.urlList[t.urlList.length-1]}a(R1e,"requestCurrentURL");function kvo(t){let e=R1e(t);return Non(e)&&Cvo.has(e.port)?"blocked":"allowed"}a(kvo,"requestBadPort");function Nvo(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}a(Nvo,"isErrorLike");function Dvo(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}a(Dvo,"isValidReasonPhrase");var Mvo=bon;function xon(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` -`)||t.includes("\r")||t.includes("\0"))===!1}a(xon,"isValidHeaderValue");function Ovo(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),o="";if(n.length>0)for(let s=n.length;s!==0;s--){let c=n[s-1].trim();if(Evo.has(c)){o=c;break}}o!==""&&(t.referrerPolicy=o)}a(Ovo,"setRequestReferrerPolicyOnRedirect");function Bvo(){return"allowed"}a(Bvo,"crossOriginResourcePolicyCheck");function Lvo(){return"success"}a(Lvo,"corsCheck");function Fvo(){return"success"}a(Fvo,"TAOCheck");function Uvo(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}a(Uvo,"appendFetchMetadata");function Qvo(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&u6t(t.origin)&&!u6t(R1e(t))&&(e=null);break;case"same-origin":N$e(t,R1e(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}a(Qvo,"appendRequestOriginHeader");function Moe(t,e){return t}a(Moe,"coarsenTime");function qvo(t,e,r){return!t?.startTime||t.startTime4096&&(n=o);let s=N$e(t,n),c=w1e(n)&&!w1e(t.url);switch(e){case"origin":return o??l6t(r,!0);case"unsafe-url":return n;case"same-origin":return s?o:"no-referrer";case"origin-when-cross-origin":return s?n:o;case"strict-origin-when-cross-origin":{let l=R1e(t);return N$e(n,l)?n:w1e(n)&&!w1e(l)?"no-referrer":o}default:return c?"no-referrer":o}}a($vo,"determineRequestsReferrer");function l6t(t,e){return RV(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(l6t,"stripURLForReferrer");function w1e(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}a(w1e,"isURLPotentiallyTrustworthy");function Vvo(t,e){if(k$e===void 0)return!0;let r=Ron(e);if(r==="no metadata"||r.length===0)return!0;let n=zvo(r),o=Yvo(r,n);for(let s of o){let c=s.algo,l=s.hash,u=k$e.createHash(c).update(t).digest("base64");if(u[u.length-1]==="="&&(u[u.length-2]==="="?u=u.slice(0,-2):u=u.slice(0,-1)),Kvo(u,l))return!0}return!1}a(Vvo,"bytesMatch");var Wvo=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function Ron(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let o=Wvo.exec(n);if(o===null||o.groups===void 0||o.groups.algo===void 0)continue;let s=o.groups.algo.toLowerCase();Ton.includes(s)&&e.push(o.groups)}return r===!0?"no metadata":e}a(Ron,"parseMetadata");function zvo(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r{t=n,e=o}),resolve:t,reject:e}}a(Xvo,"createDeferredPromise");function Zvo(t){return t.controller.state==="aborted"}a(Zvo,"isAborted");function ebo(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(ebo,"isCancelled");function tbo(t){return xvo[t.toLowerCase()]??t}a(tbo,"normalizeMethod");function rbo(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return RV(typeof e=="string"),e}a(rbo,"serializeJavascriptValueToJSONString");var nbo=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Pon(t,e,r=0,n=1){class o{static{a(this,"FastIterableIterator")}#e;#t;#n;constructor(c,l){this.#e=c,this.#t=l,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let c=this.#n,l=this.#e[e],u=l.length;if(c>=u)return{value:void 0,done:!0};let{[r]:d,[n]:p}=l[c];this.#n=c+1;let h;switch(this.#t){case"key":h=d;break;case"value":h=p;break;case"key+value":h=[d,p];break}return{value:h,done:!1}}}return delete o.prototype.constructor,Object.setPrototypeOf(o.prototype,nbo),Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(s,c){return new o(s,c)}}a(Pon,"createIterator");function ibo(t,e,r,n=0,o=1){let s=Pon(t,r,n,o),c={keys:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return x1e.brandCheck(this,e),s(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return x1e.brandCheck(this,e),s(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return x1e.brandCheck(this,e),s(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:a(function(u,d=globalThis){if(x1e.brandCheck(this,e),x1e.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof u!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:p,1:h}of s(this,"key+value"))u.call(d,h,p,this)},"forEach")}};return Object.defineProperties(e.prototype,{...c,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:c.entries.value}})}a(ibo,"iteratorMixin");async function obo(t,e,r){let n=e,o=r,s;try{s=t.stream.getReader()}catch(c){o(c);return}try{n(await kon(s))}catch(c){o(c)}}a(obo,"fullyReadBody");function sbo(t){return t instanceof ReadableStream||t[Symbol.toStringTag]==="ReadableStream"&&typeof t.tee=="function"}a(sbo,"isReadableStreamLike");function abo(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}a(abo,"readableStreamClose");var cbo=/[^\x00-\xFF]/;function P$e(t){return RV(!cbo.test(t)),t}a(P$e,"isomorphicEncode");async function kon(t){let e=[],r=0;for(;;){let{done:n,value:o}=await t.read();if(n)return Buffer.concat(e,r);if(!wvo(o))throw new TypeError("Received non-Uint8Array chunk");e.push(o),r+=o.length}}a(kon,"readAllBytes");function lbo(t){RV("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}a(lbo,"urlIsLocal");function u6t(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}a(u6t,"urlHasHttpsScheme");function Non(t){RV("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}a(Non,"urlIsHttpHttpsScheme");function ubo(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&wV(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&wV(u=>u===" "||u===" ",r,n);let o=wV(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),s=o.length?Number(o):null;if(e&&wV(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&wV(u=>u===" "||u===" ",r,n);let c=wV(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),l=c.length?Number(c):null;return n.positionl?"failure":{rangeStartValue:s,rangeEndValue:l}}a(ubo,"simpleRangeHeaderValue");function dbo(t,e,r){let n="bytes ";return n+=P$e(`${t}`),n+="-",n+=P$e(`${e}`),n+="/",n+=P$e(`${r}`),n}a(dbo,"buildContentRange");var d6t=class extends Avo{static{a(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?_on.createInflate(this.#e):_on.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",o=>this.destroy(o))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function fbo(t){return new d6t(t)}a(fbo,"createInflate");function pbo(t){let e=null,r=null,n=null,o=Don("content-type",t);if(o===null)return"failure";for(let s of o){let c=bvo(s);c==="failure"||c.essence==="*/*"||(n=c,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}a(pbo,"extractMimeType");function hbo(t){let e=t,r={position:0},n=[],o="";for(;r.positions!=='"'&&s!==",",e,r),r.positions===9||s===32),n.push(o),o=""}return n}a(hbo,"gettingDecodingSplitting");function Don(t,e){let r=e.get(t,!0);return r===null?null:hbo(r)}a(Don,"getDecodeSplit");var mbo=new TextDecoder;function gbo(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),mbo.decode(t))}a(gbo,"utf8DecodeBytes");var f6t=class{static{a(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return von()}get origin(){return this.baseUrl?.origin}policyContainer=won()},p6t=class{static{a(this,"EnvironmentSettingsObject")}settingsObject=new f6t},Abo=new p6t;Mon.exports={isAborted:Zvo,isCancelled:ebo,isValidEncodedURL:Ion,createDeferredPromise:Xvo,ReadableStreamFrom:Ivo,tryUpgradeRequestToAPotentiallyTrustworthyURL:Jvo,clampAndCoarsenConnectionTimingInfo:qvo,coarsenedSharedCurrentTime:Gvo,determineRequestsReferrer:$vo,makePolicyContainer:won,clonePolicyContainer:jvo,appendFetchMetadata:Uvo,appendRequestOriginHeader:Qvo,TAOCheck:Fvo,corsCheck:Lvo,crossOriginResourcePolicyCheck:Bvo,createOpaqueTimingInfo:Hvo,setRequestReferrerPolicyOnRedirect:Ovo,isValidHTTPToken:bon,requestBadPort:kvo,requestCurrentURL:R1e,responseURL:Son,responseLocationURL:Rvo,isBlobLike:Svo,isURLPotentiallyTrustworthy:w1e,isValidReasonPhrase:Dvo,sameOrigin:N$e,normalizeMethod:tbo,serializeJavascriptValueToJSONString:rbo,iteratorMixin:ibo,createIterator:Pon,isValidHeaderName:Mvo,isValidHeaderValue:xon,isErrorLike:Nvo,fullyReadBody:obo,bytesMatch:Vvo,isReadableStreamLike:sbo,readableStreamClose:abo,isomorphicEncode:P$e,urlIsLocal:lbo,urlHasHttpsScheme:u6t,urlIsHttpHttpsScheme:Non,readAllBytes:kon,simpleRangeHeaderValue:ubo,buildContentRange:dbo,parseMetadata:Ron,createInflate:fbo,extractMimeType:pbo,getDecodeSplit:Don,utf8DecodeBytes:gbo,environmentSettingsObject:Abo}});var a9=T((iDu,Oon)=>{"use strict";f();Oon.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var m6t=T((sDu,Bon)=>{"use strict";f();var{Blob:ybo,File:Ebo}=require("node:buffer"),{kState:o4}=a9(),{webidl:eN}=Bm(),h6t=class t{static{a(this,"FileLike")}constructor(e,r,n={}){let o=r,s=n.type,c=n.lastModified??Date.now();this[o4]={blobLike:e,name:o,type:s,lastModified:c}}stream(...e){return eN.brandCheck(this,t),this[o4].blobLike.stream(...e)}arrayBuffer(...e){return eN.brandCheck(this,t),this[o4].blobLike.arrayBuffer(...e)}slice(...e){return eN.brandCheck(this,t),this[o4].blobLike.slice(...e)}text(...e){return eN.brandCheck(this,t),this[o4].blobLike.text(...e)}get size(){return eN.brandCheck(this,t),this[o4].blobLike.size}get type(){return eN.brandCheck(this,t),this[o4].blobLike.type}get name(){return eN.brandCheck(this,t),this[o4].name}get lastModified(){return eN.brandCheck(this,t),this[o4].lastModified}get[Symbol.toStringTag](){return"File"}};eN.converters.Blob=eN.interfaceConverter(ybo);function Cbo(t){return t instanceof Ebo||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(Cbo,"isFileLike");Bon.exports={FileLike:h6t,isFileLike:Cbo}});var k1e=T((lDu,qon)=>{"use strict";f();var{isBlobLike:D$e,iteratorMixin:_bo}=mv(),{kState:_y}=a9(),{kEnumerableProperty:Ooe}=rs(),{FileLike:Lon,isFileLike:vbo}=m6t(),{webidl:Al}=Bm(),{File:Qon}=require("node:buffer"),Fon=require("node:util"),Uon=globalThis.File??Qon,P1e=class t{static{a(this,"FormData")}constructor(e){if(Al.util.markAsUncloneable(this),e!==void 0)throw Al.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[_y]=[]}append(e,r,n=void 0){Al.brandCheck(this,t);let o="FormData.append";if(Al.argumentLengthCheck(arguments,2,o),arguments.length===3&&!D$e(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Al.converters.USVString(e,o,"name"),r=D$e(r)?Al.converters.Blob(r,o,"value",{strict:!1}):Al.converters.USVString(r,o,"value"),n=arguments.length===3?Al.converters.USVString(n,o,"filename"):void 0;let s=g6t(e,r,n);this[_y].push(s)}delete(e){Al.brandCheck(this,t);let r="FormData.delete";Al.argumentLengthCheck(arguments,1,r),e=Al.converters.USVString(e,r,"name"),this[_y]=this[_y].filter(n=>n.name!==e)}get(e){Al.brandCheck(this,t);let r="FormData.get";Al.argumentLengthCheck(arguments,1,r),e=Al.converters.USVString(e,r,"name");let n=this[_y].findIndex(o=>o.name===e);return n===-1?null:this[_y][n].value}getAll(e){Al.brandCheck(this,t);let r="FormData.getAll";return Al.argumentLengthCheck(arguments,1,r),e=Al.converters.USVString(e,r,"name"),this[_y].filter(n=>n.name===e).map(n=>n.value)}has(e){Al.brandCheck(this,t);let r="FormData.has";return Al.argumentLengthCheck(arguments,1,r),e=Al.converters.USVString(e,r,"name"),this[_y].findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){Al.brandCheck(this,t);let o="FormData.set";if(Al.argumentLengthCheck(arguments,2,o),arguments.length===3&&!D$e(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Al.converters.USVString(e,o,"name"),r=D$e(r)?Al.converters.Blob(r,o,"name",{strict:!1}):Al.converters.USVString(r,o,"name"),n=arguments.length===3?Al.converters.USVString(n,o,"name"):void 0;let s=g6t(e,r,n),c=this[_y].findIndex(l=>l.name===e);c!==-1?this[_y]=[...this[_y].slice(0,c),s,...this[_y].slice(c+1).filter(l=>l.name!==e)]:this[_y].push(s)}[Fon.inspect.custom](e,r){let n=this[_y].reduce((s,c)=>(s[c.name]?Array.isArray(s[c.name])?s[c.name].push(c.value):s[c.name]=[s[c.name],c.value]:s[c.name]=c.value,s),{__proto__:null});r.depth??=e,r.colors??=!0;let o=Fon.formatWithOptions(r,n);return`FormData ${o.slice(o.indexOf("]")+2)}`}};_bo("FormData",P1e,_y,"name","value");Object.defineProperties(P1e.prototype,{append:Ooe,delete:Ooe,get:Ooe,getAll:Ooe,has:Ooe,set:Ooe,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function g6t(t,e,r){if(typeof e!="string"){if(vbo(e)||(e=e instanceof Blob?new Uon([e],"blob",{type:e.type}):new Lon(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=e instanceof Qon?new Uon([e],r,n):new Lon(e,r,n)}}return{name:t,value:e}}a(g6t,"makeEntry");qon.exports={FormData:P1e,makeEntry:g6t}});var Won=T((fDu,Von)=>{"use strict";f();var{isUSVString:Gon,bufferToLowerCasedHeaderName:bbo}=rs(),{utf8DecodeBytes:Tbo}=mv(),{HTTP_TOKEN_CODEPOINTS:Sbo,isomorphicDecode:Hon}=SC(),{isFileLike:Ibo}=m6t(),{makeEntry:xbo}=k1e(),M$e=require("node:assert"),{File:wbo}=require("node:buffer"),Rbo=globalThis.File??wbo,Pbo=Buffer.from('form-data; name="'),jon=Buffer.from("; filename"),kbo=Buffer.from("--"),Nbo=Buffer.from(`--\r -`);function Dbo(t){for(let e=0;e70)return!1;for(let r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}a(Mbo,"validateBoundary");function Obo(t,e){M$e(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let c=t.length;for(;t[c-1]===10&&t[c-2]===13;)c-=2;for(c!==t.length&&(t=t.subarray(0,c));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&O$e(t,kbo,s)||s.position===t.length-4&&O$e(t,Nbo,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let l=Bbo(t,s);if(l==="failure")return"failure";let{name:u,filename:d,contentType:p,encoding:h}=l;s.position+=2;let m;{let A=t.indexOf(n.subarray(2),s.position);if(A===-1)return"failure";m=t.subarray(s.position,A-4),s.position+=m.length,h==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let g;d!==null?(p??="text/plain",Dbo(p)||(p=""),g=new Rbo([m],d,{type:p})):g=Tbo(Buffer.from(m)),M$e(Gon(u)),M$e(typeof g=="string"&&Gon(g)||Ibo(g)),o.push(xbo(u,g,d))}}a(Obo,"multipartFormDataParser");function Bbo(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:o,encoding:s};let c=Boe(l=>l!==10&&l!==13&&l!==58,t,e);if(c=A6t(c,!0,!0,l=>l===9||l===32),!Sbo.test(c.toString())||t[e.position]!==58)return"failure";switch(e.position++,Boe(l=>l===32||l===9,t,e),bbo(c)){case"content-disposition":{if(r=n=null,!O$e(t,Pbo,e)||(e.position+=17,r=$on(t,e),r===null))return"failure";if(O$e(t,jon,e)){let l=e.position+jon.length;if(t[l]===42&&(e.position+=1,l+=1),t[l]!==61||t[l+1]!==34||(e.position+=12,n=$on(t,e),n===null))return"failure"}break}case"content-type":{let l=Boe(u=>u!==10&&u!==13,t,e);l=A6t(l,!1,!0,u=>u===9||u===32),o=Hon(l);break}case"content-transfer-encoding":{let l=Boe(u=>u!==10&&u!==13,t,e);l=A6t(l,!1,!0,u=>u===9||u===32),s=Hon(l);break}default:Boe(l=>l!==10&&l!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}a(Bbo,"parseMultipartFormDataHeaders");function $on(t,e){M$e(t[e.position-1]===34);let r=Boe(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,` -`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}a($on,"parseMultipartFormDataName");function Boe(t,e,r){let n=r.position;for(;n0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}a(A6t,"removeChars");function O$e(t,e,r){if(t.length{"use strict";f();var N1e=rs(),{ReadableStreamFrom:Lbo,isBlobLike:zon,isReadableStreamLike:Fbo,readableStreamClose:Ubo,createDeferredPromise:Qbo,fullyReadBody:qbo,extractMimeType:Gbo,utf8DecodeBytes:Jon}=mv(),{FormData:Yon}=k1e(),{kState:Foe}=a9(),{webidl:Hbo}=Bm(),{Blob:jbo}=require("node:buffer"),y6t=require("node:assert"),{isErrored:Xon,isDisturbed:$bo}=require("node:stream"),{isArrayBuffer:Vbo}=require("node:util/types"),{serializeAMimeType:Wbo}=SC(),{multipartFormDataParser:zbo}=Won(),E6t;try{let t=require("node:crypto");E6t=a(e=>t.randomInt(0,e),"random")}catch{E6t=a(t=>Math.floor(Math.random(t)),"random")}var B$e=new TextEncoder;function Ybo(){}a(Ybo,"noop");var Zon=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,esn;Zon&&(esn=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!$bo(e)&&!Xon(e)&&e.cancel("Response object has been garbage collected").catch(Ybo)}));function tsn(t,e=!1){let r=null;t instanceof ReadableStream?r=t:zon(t)?r=t.stream():r=new ReadableStream({async pull(u){let d=typeof o=="string"?B$e.encode(o):o;d.byteLength&&u.enqueue(d),queueMicrotask(()=>Ubo(u))},start(){},type:"bytes"}),y6t(Fbo(r));let n=null,o=null,s=null,c=null;if(typeof t=="string")o=t,c="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)o=t.toString(),c="application/x-www-form-urlencoded;charset=UTF-8";else if(Vbo(t))o=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(N1e.isFormDataLike(t)){let u=`----formdata-undici-0${`${E6t(1e11)}`.padStart(11,"0")}`,d=`--${u}\r +`+s),t.push(o+"m+"+pQe.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=ido()+e+" "+t[0]}a(ndo,"formatArgs");function ido(){return hh.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(ido,"getDate");function odo(...t){return process.stderr.write(fQe.formatWithOptions(hh.inspectOpts,...t)+` +`)}a(odo,"log");function sdo(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(sdo,"save");function ado(){return process.env.DEBUG}a(ado,"load");function cdo(t){t.inspectOpts={};let e=Object.keys(hh.inspectOpts);for(let r=0;re.trim()).join(" ")};FKr.O=function(t){return this.inspectOpts.colors=this.useColors,fQe.inspect(t,this.inspectOpts)}});var QKr=T((MWl,nDt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nDt.exports=LKr():nDt.exports=UKr()});var oDt=T(Nj=>{"use strict";f();Object.defineProperty(Nj,"__esModule",{value:!0});Nj.createDeferred=Nj.deferred=void 0;function iDt(){let t,e,r="pending";return{promise:new Promise((o,s)=>{t=o,e=s}),done(o){r==="pending"&&(r="resolved",t(o))},fail(o){r==="pending"&&(r="rejected",e(o))},get fulfilled(){return r!=="pending"},get status(){return r}}}a(iDt,"deferred");Nj.deferred=iDt;Nj.createDeferred=iDt;Nj.default=iDt});var qQe=T(NT=>{"use strict";f();Object.defineProperty(NT,"__esModule",{value:!0});NT.deepClone=LZr;NT.deepFreeze=Epo;NT.cloneAndChange=_po;NT.mixin=UZr;NT.equals=jEe;NT.safeStringify=Cpo;NT.distinct=vpo;NT.getCaseInsensitive=bpo;NT.filter=Tpo;NT.mapValues=Spo;var fF=W1();function LZr(t){if(!t||typeof t!="object"||t instanceof RegExp)return t;let e=Array.isArray(t)?[]:{};return Object.entries(t).forEach(([r,n])=>{e[r]=n&&typeof n=="object"?LZr(n):n}),e}a(LZr,"deepClone");function Epo(t){if(!t||typeof t!="object")return t;let e=[t];for(;e.length>0;){let r=e.shift();Object.freeze(r);for(let n in r)if(FZr.call(r,n)){let o=r[n];typeof o=="object"&&!Object.isFrozen(o)&&!(0,fF.isTypedArray)(o)&&e.push(o)}}return t}a(Epo,"deepFreeze");var FZr=Object.prototype.hasOwnProperty;function _po(t,e){return sNt(t,e,new Set)}a(_po,"cloneAndChange");function sNt(t,e,r){if((0,fF.isUndefinedOrNull)(t))return t;let n=e(t);if(typeof n<"u")return n;if(Array.isArray(t)){let o=[];for(let s of t)o.push(sNt(s,e,r));return o}if((0,fF.isObject)(t)){if(r.has(t))throw new Error("Cannot clone recursive data-structure");r.add(t);let o={};for(let s in t)FZr.call(t,s)&&(o[s]=sNt(t[s],e,r));return r.delete(t),o}return t}a(sNt,"_cloneAndChange");function UZr(t,e,r=!0){return(0,fF.isObject)(t)?((0,fF.isObject)(e)&&Object.keys(e).forEach(n=>{n in t?r&&((0,fF.isObject)(t[n])&&(0,fF.isObject)(e[n])?UZr(t[n],e[n],r):t[n]=e[n]):t[n]=e[n]}),t):e}a(UZr,"mixin");function jEe(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r,n;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(r=0;r{if((0,fF.isObject)(n)||Array.isArray(n)){if(e.has(n))return"[Circular]";e.add(n)}return typeof n=="bigint"?`[BigInt ${n.toString()}]`:n})}a(Cpo,"safeStringify");function vpo(t,e){let r=Object.create(null);return!t||!e||Object.keys(e).forEach(o=>{let s=t[o],c=e[o];jEe(s,c)||(r[o]=c)}),r}a(vpo,"distinct");function bpo(t,e){let r=e.toLowerCase(),n=Object.keys(t).find(o=>o.toLowerCase()===r);return n?t[n]:t[e]}a(bpo,"getCaseInsensitive");function Tpo(t,e){let r=Object.create(null);for(let[n,o]of Object.entries(t))e(n,o)&&(r[n]=o);return r}a(Tpo,"filter");function Spo(t,e){let r={};for(let[n,o]of Object.entries(t))r[n]=e(o,n);return r}a(Spo,"mapValues")});var cy=T(GQe=>{"use strict";f();Object.defineProperty(GQe,"__esModule",{value:!0});GQe.ErrorUtils=void 0;var Ipo=qQe(),QZr;(function(t){function e(n){return n instanceof Error?n:typeof n=="string"?new Error(n):new Error(`An unexpected error occurred: ${(0,Ipo.safeStringify)(n)}`)}a(e,"fromUnknown"),t.fromUnknown=e;function r(n){return n.stack?n.stack:n.message}a(r,"toString"),t.toString=r})(QZr||(GQe.ErrorUtils=QZr={}))});var MT=T(HQe=>{"use strict";f();Object.defineProperty(HQe,"__esModule",{value:!0});HQe.Result=void 0;var aNt=cy(),qZr;(function(t){function e(c){return new cNt(c)}a(e,"ok"),t.ok=e;function r(c){return new lNt(c)}a(r,"error"),t.error=r;function n(c){return t.error(new Error(c))}a(n,"fromString"),t.fromString=n;function o(c){try{return t.ok(c())}catch(l){return t.error(aNt.ErrorUtils.fromUnknown(l))}}a(o,"tryWith"),t.tryWith=o;async function s(c){try{return t.ok(await c())}catch(l){return t.error(aNt.ErrorUtils.fromUnknown(l))}}a(s,"tryWithAsync"),t.tryWithAsync=s})(qZr||(HQe.Result=qZr={}));var cNt=class t{static{a(this,"ResultOk")}constructor(e){this.val=e}map(e){return new t(e(this.val))}mapError(e){return this}flatMap(e){return e(this.val)}unwrap(){return this.val}unwrapOr(e){return this.val}isOk(){return!0}isError(){return!1}},lNt=class t{static{a(this,"ResultError")}constructor(e){this.err=e}map(e){return this}mapError(e){return new t(e(this.err))}flatMap(e){return this}unwrap(){throw this.err instanceof Error?this.err:aNt.ErrorUtils.fromUnknown(this.err)}unwrapOr(e){return e}isOk(){return!1}isError(){return!0}}});var een=T(Lj=>{"use strict";f();var Ak=Lj&&Lj.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},yNt=Lj&&Lj.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},g4,mF;Object.defineProperty(Lj,"__esModule",{value:!0});var ENt=class{static{a(this,"AwaitLock")}constructor(){g4.set(this,!1),mF.set(this,new Set)}get acquired(){return Ak(this,g4,"f")}acquireAsync({timeout:e}={}){if(!Ak(this,g4,"f"))return yNt(this,g4,!0,"f"),Promise.resolve();if(e==null)return new Promise(o=>{Ak(this,mF,"f").add(o)});let r,n;return Promise.race([new Promise(o=>{r=a(()=>{clearTimeout(n),o()},"resolver"),Ak(this,mF,"f").add(r)}),new Promise((o,s)=>{n=setTimeout(()=>{Ak(this,mF,"f").delete(r),s(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return Ak(this,g4,"f")?!1:(yNt(this,g4,!0,"f"),!0)}release(){if(!Ak(this,g4,"f"))throw new Error("Cannot release an unacquired lock");if(Ak(this,mF,"f").size>0){let[e]=Ak(this,mF,"f");Ak(this,mF,"f").delete(e),e()}else yNt(this,g4,!1,"f")}};Lj.default=ENt;g4=new WeakMap,mF=new WeakMap});var bu=T((mNu,Gin)=>{f();Gin.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Ca=T((ANu,pon)=>{"use strict";f();var Hin=Symbol.for("undici.error.UND_ERR"),Tu=class extends Error{static{a(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[Hin]===!0}[Hin]=!0},jin=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),O8t=class extends Tu{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[jin]===!0}[jin]=!0},$in=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),B8t=class extends Tu{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[$in]===!0}[$in]=!0},Vin=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),L8t=class extends Tu{static{a(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Vin]===!0}[Vin]=!0},Win=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),F8t=class extends Tu{static{a(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Win]===!0}[Win]=!0},zin=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),U8t=class extends Tu{static{a(this,"ResponseStatusCodeError")}constructor(e,r,n,o){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=o,this.status=r,this.statusCode=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[zin]===!0}[zin]=!0},Yin=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),Q8t=class extends Tu{static{a(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[Yin]===!0}[Yin]=!0},Kin=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),q8t=class extends Tu{static{a(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[Kin]===!0}[Kin]=!0},Jin=Symbol.for("undici.error.UND_ERR_ABORT"),_je=class extends Tu{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[Jin]===!0}[Jin]=!0},Xin=Symbol.for("undici.error.UND_ERR_ABORTED"),G8t=class extends _je{static{a(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[Xin]===!0}[Xin]=!0},Zin=Symbol.for("undici.error.UND_ERR_INFO"),H8t=class extends Tu{static{a(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[Zin]===!0}[Zin]=!0},eon=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),j8t=class extends Tu{static{a(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[eon]===!0}[eon]=!0},ton=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),$8t=class extends Tu{static{a(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[ton]===!0}[ton]=!0},ron=Symbol.for("undici.error.UND_ERR_DESTROYED"),V8t=class extends Tu{static{a(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[ron]===!0}[ron]=!0},non=Symbol.for("undici.error.UND_ERR_CLOSED"),W8t=class extends Tu{static{a(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[non]===!0}[non]=!0},ion=Symbol.for("undici.error.UND_ERR_SOCKET"),z8t=class extends Tu{static{a(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[ion]===!0}[ion]=!0},oon=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),Y8t=class extends Tu{static{a(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[oon]===!0}[oon]=!0},son=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),K8t=class extends Tu{static{a(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[son]===!0}[son]=!0},aon=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),J8t=class extends Error{static{a(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[aon]===!0}[aon]=!0},con=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),X8t=class extends Tu{static{a(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[con]===!0}[con]=!0},lon=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),Z8t=class extends Tu{static{a(this,"RequestRetryError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[lon]===!0}[lon]=!0},uon=Symbol.for("undici.error.UND_ERR_RESPONSE"),e6t=class extends Tu{static{a(this,"ResponseError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[uon]===!0}[uon]=!0},don=Symbol.for("undici.error.UND_ERR_PRX_TLS"),t6t=class extends Tu{static{a(this,"SecureProxyConnectionError")}constructor(e,r,n){super(r,{cause:e,...n??{}}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[don]===!0}[don]=!0},fon=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),r6t=class extends Tu{static{a(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[fon]===!0}get[fon](){return!0}};pon.exports={AbortError:_je,HTTPParserError:J8t,UndiciError:Tu,HeadersTimeoutError:B8t,HeadersOverflowError:L8t,BodyTimeoutError:F8t,RequestContentLengthMismatchError:j8t,ConnectTimeoutError:O8t,ResponseStatusCodeError:U8t,InvalidArgumentError:Q8t,InvalidReturnValueError:q8t,RequestAbortedError:G8t,ClientDestroyedError:V8t,ClientClosedError:W8t,InformationalError:H8t,SocketError:z8t,NotSupportedError:Y8t,ResponseContentLengthMismatchError:$8t,BalancedPoolMissingUpstreamError:K8t,ResponseExceededMaxSizeError:X8t,RequestRetryError:Z8t,ResponseError:e6t,SecureProxyConnectionError:t6t,MessageSizeExceededError:r6t}});var vje=T((_Nu,hon)=>{"use strict";f();var Cje={},n6t=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let t=0;t{"use strict";f();var{wellknownHeaderNames:mon,headerNameLowerCasedRecord:Cvo}=vje(),i6t=class t{static{a(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let o=0,s=this;for(;;){let c=e.charCodeAt(o);if(c>127)throw new TypeError("key must be ascii string");if(s.code===c)if(n===++o){s.value=r;break}else if(s.middle!==null)s=s.middle;else{s.middle=new t(e,r,o);break}else if(s.code=65&&(s|=32);o!==null;){if(s===o.code){if(r===++n)return o;o=o.middle;break}o=o.code{"use strict";f();var yCe=require("node:assert"),{kDestroyed:_on,kBodyUsed:Uie,kListeners:o6t,kBody:Eon}=bu(),{IncomingMessage:vvo}=require("node:http"),Ije=require("node:stream"),bvo=require("node:net"),{Blob:Tvo}=require("node:buffer"),Svo=require("node:util"),{stringify:Ivo}=require("node:querystring"),{EventEmitter:xvo}=require("node:events"),{InvalidArgumentError:_h}=Ca(),{headerNameLowerCasedRecord:wvo}=vje(),{tree:Con}=yon(),[Rvo,Pvo]=process.versions.node.split(".").map(t=>Number(t)),Sje=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[Eon]=e,this[Uie]=!1}async*[Symbol.asyncIterator](){yCe(!this[Uie],"disturbed"),this[Uie]=!0,yield*this[Eon]}};function kvo(t){return xje(t)?(Ion(t)===0&&t.on("data",function(){yCe(!1)}),typeof t.readableDidRead!="boolean"&&(t[Uie]=!1,xvo.prototype.on.call(t,"data",function(){this[Uie]=!0})),t):t&&typeof t.pipeTo=="function"?new Sje(t):t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&Son(t)?new Sje(t):t}a(kvo,"wrapRequestBody");function Dvo(){}a(Dvo,"nop");function xje(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}a(xje,"isStream");function von(t){if(t===null)return!1;if(t instanceof Tvo)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}a(von,"isBlobLike");function Nvo(t,e){if(t.includes("?")||t.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=Ivo(e);return r&&(t+="?"+r),t}a(Nvo,"buildURL");function bon(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}a(bon,"isValidPort");function Tje(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}a(Tje,"isHttpOrHttpsPrefixed");function Ton(t){if(typeof t=="string"){if(t=new URL(t),!Tje(t.origin||t.protocol))throw new _h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new _h("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&bon(t.port)===!1)throw new _h("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new _h("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new _h("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new _h("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new _h("Invalid URL origin: the origin must be a string or null/undefined.");if(!Tje(t.origin||t.protocol))throw new _h("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!Tje(t.origin||t.protocol))throw new _h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}a(Ton,"parseURL");function Mvo(t){if(t=Ton(t),t.pathname!=="/"||t.search||t.hash)throw new _h("invalid url");return t}a(Mvo,"parseOrigin");function Ovo(t){if(t[0]==="["){let r=t.indexOf("]");return yCe(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}a(Ovo,"getHostname");function Bvo(t){if(!t)return null;yCe(typeof t=="string");let e=Ovo(t);return bvo.isIP(e)?"":e}a(Bvo,"getServerName");function Lvo(t){return JSON.parse(JSON.stringify(t))}a(Lvo,"deepClone");function Fvo(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}a(Fvo,"isAsyncIterable");function Son(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}a(Son,"isIterable");function Ion(t){if(t==null)return 0;if(xje(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(von(t))return t.size!=null?t.size:null;if(Ron(t))return t.byteLength}return null}a(Ion,"bodyLength");function xon(t){return t&&!!(t.destroyed||t[_on]||Ije.isDestroyed?.(t))}a(xon,"isDestroyed");function Uvo(t,e){t==null||!xje(t)||xon(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===vvo&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[_on]=!0))}a(Uvo,"destroy");var Qvo=/timeout=(\d+)/;function qvo(t){let e=t.toString().match(Qvo);return e?parseInt(e[1],10)*1e3:null}a(qvo,"parseKeepAliveTimeout");function won(t){return typeof t=="string"?wvo[t]??t.toLowerCase():Con.lookup(t)??t.toString("latin1").toLowerCase()}a(won,"headerNameToString");function Gvo(t){return Con.lookup(t)??t.toString("latin1").toLowerCase()}a(Gvo,"bufferToLowerCasedHeaderName");function Hvo(t,e){e===void 0&&(e={});for(let r=0;rc.toString("utf8")):s.toString("utf8")}}return"content-length"in e&&"content-disposition"in e&&(e["content-disposition"]=Buffer.from(e["content-disposition"]).toString("latin1")),e}a(Hvo,"parseHeaders");function jvo(t){let e=t.length,r=new Array(e),n=!1,o=-1,s,c,l=0;for(let u=0;u{r.close(),r.byobRequest?.respond(0)});else{let s=Buffer.isBuffer(o)?o:Buffer.from(o);s.byteLength&&r.enqueue(new Uint8Array(s))}return r.desiredSize>0},async cancel(r){await e.return()},type:"bytes"})}a(Kvo,"ReadableStreamFrom");function Jvo(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}a(Jvo,"isFormDataLike");function Xvo(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.addListener("abort",e),()=>t.removeListener("abort",e))}a(Xvo,"addAbortListener");var Zvo=typeof String.prototype.toWellFormed=="function",ebo=typeof String.prototype.isWellFormed=="function";function Pon(t){return Zvo?`${t}`.toWellFormed():Svo.toUSVString(t)}a(Pon,"toUSVString");function tbo(t){return ebo?`${t}`.isWellFormed():Pon(t)===`${t}`}a(tbo,"isUSVString");function kon(t){switch(t){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return t>=33&&t<=126}}a(kon,"isTokenCharCode");function rbo(t){if(t.length===0)return!1;for(let e=0;e{"use strict";f();var Fa=require("node:diagnostics_channel"),c6t=require("node:util"),wje=c6t.debuglog("undici"),a6t=c6t.debuglog("fetch"),N$=c6t.debuglog("websocket"),Oon=!1,lbo={beforeConnect:Fa.channel("undici:client:beforeConnect"),connected:Fa.channel("undici:client:connected"),connectError:Fa.channel("undici:client:connectError"),sendHeaders:Fa.channel("undici:client:sendHeaders"),create:Fa.channel("undici:request:create"),bodySent:Fa.channel("undici:request:bodySent"),headers:Fa.channel("undici:request:headers"),trailers:Fa.channel("undici:request:trailers"),error:Fa.channel("undici:request:error"),open:Fa.channel("undici:websocket:open"),close:Fa.channel("undici:websocket:close"),socketError:Fa.channel("undici:websocket:socket_error"),ping:Fa.channel("undici:websocket:ping"),pong:Fa.channel("undici:websocket:pong")};if(wje.enabled||a6t.enabled){let t=a6t.enabled?a6t:wje;Fa.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s using %s%s",`${s}${o?`:${o}`:""}`,n,r)}),Fa.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s using %s%s",`${s}${o?`:${o}`:""}`,n,r)}),Fa.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s using %s%s errored - %s",`${s}${o?`:${o}`:""}`,n,r,c.message)}),Fa.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s/%s",r,o,n)}),Fa.channel("undici:request:headers").subscribe(e=>{let{request:{method:r,path:n,origin:o},response:{statusCode:s}}=e;t("received response to %s %s/%s - HTTP %d",r,o,n,s)}),Fa.channel("undici:request:trailers").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("trailers received from %s %s/%s",r,o,n)}),Fa.channel("undici:request:error").subscribe(e=>{let{request:{method:r,path:n,origin:o},error:s}=e;t("request to %s %s/%s errored - %s",r,o,n,s.message)}),Oon=!0}if(N$.enabled){if(!Oon){let t=wje.enabled?wje:N$;Fa.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),Fa.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),Fa.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s%s using %s%s errored - %s",s,o?`:${o}`:"",n,r,c.message)}),Fa.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s/%s",r,o,n)})}Fa.channel("undici:websocket:open").subscribe(t=>{let{address:{address:e,port:r}}=t;N$("connection opened %s%s",e,r?`:${r}`:"")}),Fa.channel("undici:websocket:close").subscribe(t=>{let{websocket:e,code:r,reason:n}=t;N$("closed connection to %s - %s %s",e.url,r,n)}),Fa.channel("undici:websocket:socket_error").subscribe(t=>{N$("connection errored - %s",t.message)}),Fa.channel("undici:websocket:ping").subscribe(t=>{N$("ping received")}),Fa.channel("undici:websocket:pong").subscribe(t=>{N$("pong received")})}Bon.exports={channels:lbo}});var Qon=T((PNu,Uon)=>{"use strict";f();var{InvalidArgumentError:ll,NotSupportedError:ubo}=Ca(),L4=require("node:assert"),{isValidHTTPToken:Fon,isValidHeaderValue:l6t,isStream:dbo,destroy:fbo,isBuffer:pbo,isFormDataLike:hbo,isIterable:mbo,isBlobLike:gbo,buildURL:Abo,validateHandler:ybo,getServerName:Ebo,normalizedMethodRecords:_bo}=Xo(),{channels:Qk}=Qie(),{headerNameLowerCasedRecord:Lon}=vje(),Cbo=/[^\u0021-\u00ff]/,$T=Symbol("handler"),u6t=class{static{a(this,"Request")}constructor(e,{path:r,method:n,body:o,headers:s,query:c,idempotent:l,blocking:u,upgrade:d,headersTimeout:p,bodyTimeout:h,reset:m,throwOnError:g,expectContinue:A,servername:y},E){if(typeof r!="string")throw new ll("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new ll("path must be an absolute URL or start with a slash");if(Cbo.test(r))throw new ll("invalid request path");if(typeof n!="string")throw new ll("method must be a string");if(_bo[n]===void 0&&!Fon(n))throw new ll("invalid request method");if(d&&typeof d!="string")throw new ll("upgrade must be a string");if(d&&!l6t(d))throw new ll("invalid upgrade header");if(p!=null&&(!Number.isFinite(p)||p<0))throw new ll("invalid headersTimeout");if(h!=null&&(!Number.isFinite(h)||h<0))throw new ll("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new ll("invalid reset");if(A!=null&&typeof A!="boolean")throw new ll("invalid expectContinue");if(this.headersTimeout=p,this.bodyTimeout=h,this.throwOnError=g===!0,this.method=n,this.abort=null,o==null)this.body=null;else if(dbo(o)){this.body=o;let _=this.body._readableState;(!_||!_.autoDestroy)&&(this.endHandler=a(function(){fbo(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=v=>{this.abort?this.abort(v):this.error=v},this.body.on("error",this.errorHandler)}else if(pbo(o))this.body=o.byteLength?o:null;else if(ArrayBuffer.isView(o))this.body=o.buffer.byteLength?Buffer.from(o.buffer,o.byteOffset,o.byteLength):null;else if(o instanceof ArrayBuffer)this.body=o.byteLength?Buffer.from(o):null;else if(typeof o=="string")this.body=o.length?Buffer.from(o):null;else if(hbo(o)||mbo(o)||gbo(o))this.body=o;else throw new ll("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=d||null,this.path=c?Abo(r,c):r,this.origin=e,this.idempotent=l??(n==="HEAD"||n==="GET"),this.blocking=u??!1,this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=A??!1,Array.isArray(s)){if(s.length%2!==0)throw new ll("headers array must be even");for(let _=0;_{"use strict";f();var vbo=require("node:events"),Pje=class extends vbo{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let o of r)if(o!=null){if(typeof o!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof o}`);if(n=o(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new d6t(this,n)}},d6t=class extends Pje{static{a(this,"ComposedDispatcher")}#e=null;#t=null;constructor(e,r){super(),this.#e=e,this.#t=r}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};qon.exports=Pje});var jie=T((BNu,Gon)=>{"use strict";f();var bbo=ECe(),{ClientDestroyedError:f6t,ClientClosedError:Tbo,InvalidArgumentError:qie}=Ca(),{kDestroy:Sbo,kClose:Ibo,kClosed:_Ce,kDestroyed:Gie,kDispatch:p6t,kInterceptors:M$}=bu(),F4=Symbol("onDestroyed"),Hie=Symbol("onClosed"),kje=Symbol("Intercepted Dispatch"),h6t=class extends bbo{static{a(this,"DispatcherBase")}constructor(){super(),this[Gie]=!1,this[F4]=null,this[_Ce]=!1,this[Hie]=[]}get destroyed(){return this[Gie]}get closed(){return this[_Ce]}get interceptors(){return this[M$]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[M$][r]!="function")throw new qie("interceptor must be an function")}this[M$]=e}close(e){if(e===void 0)return new Promise((n,o)=>{this.close((s,c)=>s?o(s):n(c))});if(typeof e!="function")throw new qie("invalid callback");if(this[Gie]){queueMicrotask(()=>e(new f6t,null));return}if(this[_Ce]){this[Hie]?this[Hie].push(e):queueMicrotask(()=>e(null,null));return}this[_Ce]=!0,this[Hie].push(e);let r=a(()=>{let n=this[Hie];this[Hie]=null;for(let o=0;othis.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((o,s)=>{this.destroy(e,(c,l)=>c?s(c):o(l))});if(typeof r!="function")throw new qie("invalid callback");if(this[Gie]){this[F4]?this[F4].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new f6t),this[Gie]=!0,this[F4]=this[F4]||[],this[F4].push(r);let n=a(()=>{let o=this[F4];this[F4]=null;for(let s=0;s{queueMicrotask(n)})}[kje](e,r){if(!this[M$]||this[M$].length===0)return this[kje]=this[p6t],this[p6t](e,r);let n=this[p6t].bind(this);for(let o=this[M$].length-1;o>=0;o--)n=this[M$][o](n);return this[kje]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new qie("handler must be an object");try{if(!e||typeof e!="object")throw new qie("opts must be an object.");if(this[Gie]||this[F4])throw new f6t;if(this[_Ce])throw new Tbo;return this[kje](e,r)}catch(n){if(typeof r.onError!="function")throw new qie("invalid onError method");return r.onError(n),!1}}};Gon.exports=h6t});var C6t=T((UNu,Von)=>{"use strict";f();var $ie=0,m6t=1e3,g6t=(m6t>>1)-1,U4,A6t=Symbol("kFastTimer"),Q4=[],y6t=-2,E6t=-1,jon=0,Hon=1;function _6t(){$ie+=g6t;let t=0,e=Q4.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=E6t,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===E6t?(r._state=y6t,--e!==0&&(Q4[t]=Q4[e])):++t}Q4.length=e,Q4.length!==0&&$on()}a(_6t,"onTick");function $on(){U4?U4.refresh():(clearTimeout(U4),U4=setTimeout(_6t,g6t),U4.unref&&U4.unref())}a($on,"refreshTimeout");var Dje=class{static{a(this,"FastTimer")}[A6t]=!0;_state=y6t;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===y6t&&Q4.push(this),(!U4||Q4.length===1)&&$on(),this._state=jon}clear(){this._state=E6t,this._idleStart=-1}};Von.exports={setTimeout(t,e,r){return e<=m6t?setTimeout(t,e,r):new Dje(t,e,r)},clearTimeout(t){t[A6t]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new Dje(t,e,r)},clearFastTimeout(t){t.clear()},now(){return $ie},tick(t=0){$ie+=t-m6t+1,_6t(),_6t()},reset(){$ie=0,Q4.length=0,clearTimeout(U4),U4=null},kFastTimer:A6t}});var CCe=T((jNu,Jon)=>{"use strict";f();var xbo=require("node:net"),Won=require("node:assert"),Kon=Xo(),{InvalidArgumentError:wbo,ConnectTimeoutError:Rbo}=Ca(),Nje=C6t();function zon(){}a(zon,"noop");var v6t,b6t;global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?b6t=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function Pbo({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,session:o,...s}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new wbo("maxCachedSessions must be a positive integer or zero");let c={path:r,...s},l=new b6t(e??100);return n=n??1e4,t=t??!1,a(function({hostname:d,host:p,protocol:h,port:m,servername:g,localAddress:A,httpSocket:y},E){let _;if(h==="https:"){v6t||(v6t=require("node:tls")),g=g||c.servername||Kon.getServerName(p)||null;let b=g||d;Won(b);let I=o||l.get(b)||null;m=m||443,_=v6t.connect({highWaterMark:16384,...c,servername:g,session:I,localAddress:A,ALPNProtocols:t?["http/1.1","h2"]:["http/1.1"],socket:y,port:m,host:d}),_.on("session",function(x){l.set(b,x)})}else Won(!y,"httpSocket can only be sent on TLS update"),m=m||80,_=xbo.connect({highWaterMark:64*1024,...c,localAddress:A,port:m,host:d});if(c.keepAlive==null||c.keepAlive){let b=c.keepAliveInitialDelay===void 0?6e4:c.keepAliveInitialDelay;_.setKeepAlive(!0,b)}let v=kbo(new WeakRef(_),{timeout:n,hostname:d,port:m});return _.setNoDelay(!0).once(h==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(v),E){let b=E;E=null,b(null,this)}}).on("error",function(b){if(queueMicrotask(v),E){let I=E;E=null,I(b)}}),_},"connect")}a(Pbo,"buildConnector");var kbo=process.platform==="win32"?(t,e)=>{if(!e.timeout)return zon;let r=null,n=null,o=Nje.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>Yon(t.deref(),e))})},e.timeout);return()=>{Nje.clearFastTimeout(o),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return zon;let r=null,n=Nje.setFastTimeout(()=>{r=setImmediate(()=>{Yon(t.deref(),e)})},e.timeout);return()=>{Nje.clearFastTimeout(n),clearImmediate(r)}};function Yon(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,Kon.destroy(t,new Rbo(r))}a(Yon,"onConnectTimeout");Jon.exports=Pbo});var Xon=T(Mje=>{"use strict";f();Object.defineProperty(Mje,"__esModule",{value:!0});Mje.enumToMap=void 0;function Dbo(t){let e={};return Object.keys(t).forEach(r=>{let n=t[r];typeof n=="number"&&(e[r]=n)}),e}a(Dbo,"enumToMap");Mje.enumToMap=Dbo});var Zon=T(hr=>{"use strict";f();Object.defineProperty(hr,"__esModule",{value:!0});hr.SPECIAL_HEADERS=hr.HEADER_STATE=hr.MINOR=hr.MAJOR=hr.CONNECTION_TOKEN_CHARS=hr.HEADER_CHARS=hr.TOKEN=hr.STRICT_TOKEN=hr.HEX=hr.URL_CHAR=hr.STRICT_URL_CHAR=hr.USERINFO_CHARS=hr.MARK=hr.ALPHANUM=hr.NUM=hr.HEX_MAP=hr.NUM_MAP=hr.ALPHA=hr.FINISH=hr.H_METHOD_MAP=hr.METHOD_MAP=hr.METHODS_RTSP=hr.METHODS_ICE=hr.METHODS_HTTP=hr.METHODS=hr.LENIENT_FLAGS=hr.FLAGS=hr.TYPE=hr.ERROR=void 0;var Nbo=Xon(),Mbo;(function(t){t[t.OK=0]="OK",t[t.INTERNAL=1]="INTERNAL",t[t.STRICT=2]="STRICT",t[t.LF_EXPECTED=3]="LF_EXPECTED",t[t.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",t[t.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",t[t.INVALID_METHOD=6]="INVALID_METHOD",t[t.INVALID_URL=7]="INVALID_URL",t[t.INVALID_CONSTANT=8]="INVALID_CONSTANT",t[t.INVALID_VERSION=9]="INVALID_VERSION",t[t.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",t[t.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",t[t.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",t[t.INVALID_STATUS=13]="INVALID_STATUS",t[t.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",t[t.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",t[t.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",t[t.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",t[t.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",t[t.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",t[t.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",t[t.PAUSED=21]="PAUSED",t[t.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",t[t.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",t[t.USER=24]="USER"})(Mbo=hr.ERROR||(hr.ERROR={}));var Obo;(function(t){t[t.BOTH=0]="BOTH",t[t.REQUEST=1]="REQUEST",t[t.RESPONSE=2]="RESPONSE"})(Obo=hr.TYPE||(hr.TYPE={}));var Bbo;(function(t){t[t.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",t[t.CHUNKED=8]="CHUNKED",t[t.UPGRADE=16]="UPGRADE",t[t.CONTENT_LENGTH=32]="CONTENT_LENGTH",t[t.SKIPBODY=64]="SKIPBODY",t[t.TRAILING=128]="TRAILING",t[t.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(Bbo=hr.FLAGS||(hr.FLAGS={}));var Lbo;(function(t){t[t.HEADERS=1]="HEADERS",t[t.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",t[t.KEEP_ALIVE=4]="KEEP_ALIVE"})(Lbo=hr.LENIENT_FLAGS||(hr.LENIENT_FLAGS={}));var ni;(function(t){t[t.DELETE=0]="DELETE",t[t.GET=1]="GET",t[t.HEAD=2]="HEAD",t[t.POST=3]="POST",t[t.PUT=4]="PUT",t[t.CONNECT=5]="CONNECT",t[t.OPTIONS=6]="OPTIONS",t[t.TRACE=7]="TRACE",t[t.COPY=8]="COPY",t[t.LOCK=9]="LOCK",t[t.MKCOL=10]="MKCOL",t[t.MOVE=11]="MOVE",t[t.PROPFIND=12]="PROPFIND",t[t.PROPPATCH=13]="PROPPATCH",t[t.SEARCH=14]="SEARCH",t[t.UNLOCK=15]="UNLOCK",t[t.BIND=16]="BIND",t[t.REBIND=17]="REBIND",t[t.UNBIND=18]="UNBIND",t[t.ACL=19]="ACL",t[t.REPORT=20]="REPORT",t[t.MKACTIVITY=21]="MKACTIVITY",t[t.CHECKOUT=22]="CHECKOUT",t[t.MERGE=23]="MERGE",t[t["M-SEARCH"]=24]="M-SEARCH",t[t.NOTIFY=25]="NOTIFY",t[t.SUBSCRIBE=26]="SUBSCRIBE",t[t.UNSUBSCRIBE=27]="UNSUBSCRIBE",t[t.PATCH=28]="PATCH",t[t.PURGE=29]="PURGE",t[t.MKCALENDAR=30]="MKCALENDAR",t[t.LINK=31]="LINK",t[t.UNLINK=32]="UNLINK",t[t.SOURCE=33]="SOURCE",t[t.PRI=34]="PRI",t[t.DESCRIBE=35]="DESCRIBE",t[t.ANNOUNCE=36]="ANNOUNCE",t[t.SETUP=37]="SETUP",t[t.PLAY=38]="PLAY",t[t.PAUSE=39]="PAUSE",t[t.TEARDOWN=40]="TEARDOWN",t[t.GET_PARAMETER=41]="GET_PARAMETER",t[t.SET_PARAMETER=42]="SET_PARAMETER",t[t.REDIRECT=43]="REDIRECT",t[t.RECORD=44]="RECORD",t[t.FLUSH=45]="FLUSH"})(ni=hr.METHODS||(hr.METHODS={}));hr.METHODS_HTTP=[ni.DELETE,ni.GET,ni.HEAD,ni.POST,ni.PUT,ni.CONNECT,ni.OPTIONS,ni.TRACE,ni.COPY,ni.LOCK,ni.MKCOL,ni.MOVE,ni.PROPFIND,ni.PROPPATCH,ni.SEARCH,ni.UNLOCK,ni.BIND,ni.REBIND,ni.UNBIND,ni.ACL,ni.REPORT,ni.MKACTIVITY,ni.CHECKOUT,ni.MERGE,ni["M-SEARCH"],ni.NOTIFY,ni.SUBSCRIBE,ni.UNSUBSCRIBE,ni.PATCH,ni.PURGE,ni.MKCALENDAR,ni.LINK,ni.UNLINK,ni.PRI,ni.SOURCE];hr.METHODS_ICE=[ni.SOURCE];hr.METHODS_RTSP=[ni.OPTIONS,ni.DESCRIBE,ni.ANNOUNCE,ni.SETUP,ni.PLAY,ni.PAUSE,ni.TEARDOWN,ni.GET_PARAMETER,ni.SET_PARAMETER,ni.REDIRECT,ni.RECORD,ni.FLUSH,ni.GET,ni.POST];hr.METHOD_MAP=Nbo.enumToMap(ni);hr.H_METHOD_MAP={};Object.keys(hr.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(hr.H_METHOD_MAP[t]=hr.METHOD_MAP[t])});var Fbo;(function(t){t[t.SAFE=0]="SAFE",t[t.SAFE_WITH_CB=1]="SAFE_WITH_CB",t[t.UNSAFE=2]="UNSAFE"})(Fbo=hr.FINISH||(hr.FINISH={}));hr.ALPHA=[];for(let t=65;t<=90;t++)hr.ALPHA.push(String.fromCharCode(t)),hr.ALPHA.push(String.fromCharCode(t+32));hr.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};hr.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};hr.NUM=["0","1","2","3","4","5","6","7","8","9"];hr.ALPHANUM=hr.ALPHA.concat(hr.NUM);hr.MARK=["-","_",".","!","~","*","'","(",")"];hr.USERINFO_CHARS=hr.ALPHANUM.concat(hr.MARK).concat(["%",";",":","&","=","+","$",","]);hr.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(hr.ALPHANUM);hr.URL_CHAR=hr.STRICT_URL_CHAR.concat([" ","\f"]);for(let t=128;t<=255;t++)hr.URL_CHAR.push(t);hr.HEX=hr.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);hr.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(hr.ALPHANUM);hr.TOKEN=hr.STRICT_TOKEN.concat([" "]);hr.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&hr.HEADER_CHARS.push(t);hr.CONNECTION_TOKEN_CHARS=hr.HEADER_CHARS.filter(t=>t!==44);hr.MAJOR=hr.NUM_MAP;hr.MINOR=hr.MAJOR;var Vie;(function(t){t[t.GENERAL=0]="GENERAL",t[t.CONNECTION=1]="CONNECTION",t[t.CONTENT_LENGTH=2]="CONTENT_LENGTH",t[t.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",t[t.UPGRADE=4]="UPGRADE",t[t.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",t[t.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(Vie=hr.HEADER_STATE||(hr.HEADER_STATE={}));hr.SPECIAL_HEADERS={connection:Vie.CONNECTION,"content-length":Vie.CONTENT_LENGTH,"proxy-connection":Vie.CONNECTION,"transfer-encoding":Vie.TRANSFER_ENCODING,upgrade:Vie.UPGRADE}});var T6t=T((XNu,esn)=>{"use strict";f();var{Buffer:Ubo}=require("node:buffer");esn.exports=Ubo.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK07MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtXACAAQRhqQgA3AwAgAEIANwMAIABBOGpCADcDACAAQTBqQgA3AwAgAEEoakIANwMAIABBIGpCADcDACAAQRBqQgA3AwAgAEEIakIANwMAIABB3QE2AhwLBgAgABAyC5otAQt/IwBBEGsiCiQAQaTQACgCACIJRQRAQeTTACgCACIFRQRAQfDTAEJ/NwIAQejTAEKAgISAgIDAADcCAEHk0wAgCkEIakFwcUHYqtWqBXMiBTYCAEH40wBBADYCAEHI0wBBADYCAAtBzNMAQYDUBDYCAEGc0ABBgNQENgIAQbDQACAFNgIAQazQAEF/NgIAQdDTAEGArAM2AgADQCABQcjQAGogAUG80ABqIgI2AgAgAiABQbTQAGoiAzYCACABQcDQAGogAzYCACABQdDQAGogAUHE0ABqIgM2AgAgAyACNgIAIAFB2NAAaiABQczQAGoiAjYCACACIAM2AgAgAUHU0ABqIAI2AgAgAUEgaiIBQYACRw0AC0GM1ARBwasDNgIAQajQAEH00wAoAgA2AgBBmNAAQcCrAzYCAEGk0ABBiNQENgIAQcz/B0E4NgIAQYjUBCEJCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFNBEBBjNAAKAIAIgZBECAAQRNqQXBxIABBC0kbIgRBA3YiAHYiAUEDcQRAAkAgAUEBcSAAckEBcyICQQN0IgBBtNAAaiIBIABBvNAAaigCACIAKAIIIgNGBEBBjNAAIAZBfiACd3E2AgAMAQsgASADNgIIIAMgATYCDAsgAEEIaiEBIAAgAkEDdCICQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDBELQZTQACgCACIIIARPDQEgAQRAAkBBAiAAdCICQQAgAmtyIAEgAHRxaCIAQQN0IgJBtNAAaiIBIAJBvNAAaigCACICKAIIIgNGBEBBjNAAIAZBfiAAd3EiBjYCAAwBCyABIAM2AgggAyABNgIMCyACIARBA3I2AgQgAEEDdCIAIARrIQUgACACaiAFNgIAIAIgBGoiBCAFQQFyNgIEIAgEQCAIQXhxQbTQAGohAEGg0AAoAgAhAwJ/QQEgCEEDdnQiASAGcUUEQEGM0AAgASAGcjYCACAADAELIAAoAggLIgEgAzYCDCAAIAM2AgggAyAANgIMIAMgATYCCAsgAkEIaiEBQaDQACAENgIAQZTQACAFNgIADBELQZDQACgCACILRQ0BIAtoQQJ0QbzSAGooAgAiACgCBEF4cSAEayEFIAAhAgNAAkAgAigCECIBRQRAIAJBFGooAgAiAUUNAQsgASgCBEF4cSAEayIDIAVJIQIgAyAFIAIbIQUgASAAIAIbIQAgASECDAELCyAAKAIYIQkgACgCDCIDIABHBEBBnNAAKAIAGiADIAAoAggiATYCCCABIAM2AgwMEAsgAEEUaiICKAIAIgFFBEAgACgCECIBRQ0DIABBEGohAgsDQCACIQcgASIDQRRqIgIoAgAiAQ0AIANBEGohAiADKAIQIgENAAsgB0EANgIADA8LQX8hBCAAQb9/Sw0AIABBE2oiAUFwcSEEQZDQACgCACIIRQ0AQQAgBGshBQJAAkACQAJ/QQAgBEGAAkkNABpBHyAEQf///wdLDQAaIARBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgZBAnRBvNIAaigCACICRQRAQQAhAUEAIQMMAQtBACEBIARBGSAGQQF2a0EAIAZBH0cbdCEAQQAhAwNAAkAgAigCBEF4cSAEayIHIAVPDQAgAiEDIAciBQ0AQQAhBSACIQEMAwsgASACQRRqKAIAIgcgByACIABBHXZBBHFqQRBqKAIAIgJGGyABIAcbIQEgAEEBdCEAIAINAAsLIAEgA3JFBEBBACEDQQIgBnQiAEEAIABrciAIcSIARQ0DIABoQQJ0QbzSAGooAgAhAQsgAUUNAQsDQCABKAIEQXhxIARrIgIgBUkhACACIAUgABshBSABIAMgABshAyABKAIQIgAEfyAABSABQRRqKAIACyIBDQALCyADRQ0AIAVBlNAAKAIAIARrTw0AIAMoAhghByADIAMoAgwiAEcEQEGc0AAoAgAaIAAgAygCCCIBNgIIIAEgADYCDAwOCyADQRRqIgIoAgAiAUUEQCADKAIQIgFFDQMgA0EQaiECCwNAIAIhBiABIgBBFGoiAigCACIBDQAgAEEQaiECIAAoAhAiAQ0ACyAGQQA2AgAMDQtBlNAAKAIAIgMgBE8EQEGg0AAoAgAhAQJAIAMgBGsiAkEQTwRAIAEgBGoiACACQQFyNgIEIAEgA2ogAjYCACABIARBA3I2AgQMAQsgASADQQNyNgIEIAEgA2oiACAAKAIEQQFyNgIEQQAhAEEAIQILQZTQACACNgIAQaDQACAANgIAIAFBCGohAQwPC0GY0AAoAgAiAyAESwRAIAQgCWoiACADIARrIgFBAXI2AgRBpNAAIAA2AgBBmNAAIAE2AgAgCSAEQQNyNgIEIAlBCGohAQwPC0EAIQEgBAJ/QeTTACgCAARAQezTACgCAAwBC0Hw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBDGpBcHFB2KrVqgVzNgIAQfjTAEEANgIAQcjTAEEANgIAQYCABAsiACAEQccAaiIFaiIGQQAgAGsiB3EiAk8EQEH80wBBMDYCAAwPCwJAQcTTACgCACIBRQ0AQbzTACgCACIIIAJqIQAgACABTSAAIAhLcQ0AQQAhAUH80wBBMDYCAAwPC0HI0wAtAABBBHENBAJAAkAgCQRAQczTACEBA0AgASgCACIAIAlNBEAgACABKAIEaiAJSw0DCyABKAIIIgENAAsLQQAQMyIAQX9GDQUgAiEGQejTACgCACIBQQFrIgMgAHEEQCACIABrIAAgA2pBACABa3FqIQYLIAQgBk8NBSAGQf7///8HSw0FQcTTACgCACIDBEBBvNMAKAIAIgcgBmohASABIAdNDQYgASADSw0GCyAGEDMiASAARw0BDAcLIAYgA2sgB3EiBkH+////B0sNBCAGEDMhACAAIAEoAgAgASgCBGpGDQMgACEBCwJAIAYgBEHIAGpPDQAgAUF/Rg0AQezTACgCACIAIAUgBmtqQQAgAGtxIgBB/v///wdLBEAgASEADAcLIAAQM0F/RwRAIAAgBmohBiABIQAMBwtBACAGaxAzGgwECyABIgBBf0cNBQwDC0EAIQMMDAtBACEADAoLIABBf0cNAgtByNMAQcjTACgCAEEEcjYCAAsgAkH+////B0sNASACEDMhAEEAEDMhASAAQX9GDQEgAUF/Rg0BIAAgAU8NASABIABrIgYgBEE4ak0NAQtBvNMAQbzTACgCACAGaiIBNgIAQcDTACgCACABSQRAQcDTACABNgIACwJAAkACQEGk0AAoAgAiAgRAQczTACEBA0AgACABKAIAIgMgASgCBCIFakYNAiABKAIIIgENAAsMAgtBnNAAKAIAIgFBAEcgACABT3FFBEBBnNAAIAA2AgALQQAhAUHQ0wAgBjYCAEHM0wAgADYCAEGs0ABBfzYCAEGw0ABB5NMAKAIANgIAQdjTAEEANgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBeCAAa0EPcSIBIABqIgIgBkE4ayIDIAFrIgFBAXI2AgRBqNAAQfTTACgCADYCAEGY0AAgATYCAEGk0AAgAjYCACAAIANqQTg2AgQMAgsgACACTQ0AIAIgA0kNACABKAIMQQhxDQBBeCACa0EPcSIAIAJqIgNBmNAAKAIAIAZqIgcgAGsiAEEBcjYCBCABIAUgBmo2AgRBqNAAQfTTACgCADYCAEGY0AAgADYCAEGk0AAgAzYCACACIAdqQTg2AgQMAQsgAEGc0AAoAgBJBEBBnNAAIAA2AgALIAAgBmohA0HM0wAhAQJAAkACQANAIAMgASgCAEcEQCABKAIIIgENAQwCCwsgAS0ADEEIcUUNAQtBzNMAIQEDQCABKAIAIgMgAk0EQCADIAEoAgRqIgUgAksNAwsgASgCCCEBDAALAAsgASAANgIAIAEgASgCBCAGajYCBCAAQXggAGtBD3FqIgkgBEEDcjYCBCADQXggA2tBD3FqIgYgBCAJaiIEayEBIAIgBkYEQEGk0AAgBDYCAEGY0ABBmNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEDAgLQaDQACgCACAGRgRAQaDQACAENgIAQZTQAEGU0AAoAgAgAWoiADYCACAEIABBAXI2AgQgACAEaiAANgIADAgLIAYoAgQiBUEDcUEBRw0GIAVBeHEhCCAFQf8BTQRAIAVBA3YhAyAGKAIIIgAgBigCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBwsgAiAANgIIIAAgAjYCDAwGCyAGKAIYIQcgBiAGKAIMIgBHBEAgACAGKAIIIgI2AgggAiAANgIMDAULIAZBFGoiAigCACIFRQRAIAYoAhAiBUUNBCAGQRBqIQILA0AgAiEDIAUiAEEUaiICKAIAIgUNACAAQRBqIQIgACgCECIFDQALIANBADYCAAwEC0F4IABrQQ9xIgEgAGoiByAGQThrIgMgAWsiAUEBcjYCBCAAIANqQTg2AgQgAiAFQTcgBWtBD3FqQT9rIgMgAyACQRBqSRsiA0EjNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAc2AgAgA0EQakHU0wApAgA3AgAgA0HM0wApAgA3AghB1NMAIANBCGo2AgBB0NMAIAY2AgBBzNMAIAA2AgBB2NMAQQA2AgAgA0EkaiEBA0AgAUEHNgIAIAUgAUEEaiIBSw0ACyACIANGDQAgAyADKAIEQX5xNgIEIAMgAyACayIFNgIAIAIgBUEBcjYCBCAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIDcUUEQEGM0AAgASADcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEGQ0AAoAgAiA0EBIAF0IgZxRQRAIAAgAjYCAEGQ0AAgAyAGcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQMCQANAIAMiACgCBEF4cSAFRg0BIAFBHXYhAyABQQF0IQEgACADQQRxakEQaiIGKAIAIgMNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAtBmNAAKAIAIgEgBE0NAEGk0AAoAgAiACAEaiICIAEgBGsiAUEBcjYCBEGY0AAgATYCAEGk0AAgAjYCACAAIARBA3I2AgQgAEEIaiEBDAgLQQAhAUH80wBBMDYCAAwHC0EAIQALIAdFDQACQCAGKAIcIgJBAnRBvNIAaiIDKAIAIAZGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAdBEEEUIAcoAhAgBkYbaiAANgIAIABFDQELIAAgBzYCGCAGKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAGQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAIaiEBIAYgCGoiBigCBCEFCyAGIAVBfnE2AgQgASAEaiABNgIAIAQgAUEBcjYCBCABQf8BTQRAIAFBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASABQQN2dCIBcUUEQEGM0AAgASACcjYCACAADAELIAAoAggLIgEgBDYCDCAAIAQ2AgggBCAANgIMIAQgATYCCAwBC0EfIQUgAUH///8HTQRAIAFBJiABQQh2ZyIAa3ZBAXEgAEEBdGtBPmohBQsgBCAFNgIcIARCADcCECAFQQJ0QbzSAGohAEGQ0AAoAgAiAkEBIAV0IgNxRQRAIAAgBDYCAEGQ0AAgAiADcjYCACAEIAA2AhggBCAENgIIIAQgBDYCDAwBCyABQRkgBUEBdmtBACAFQR9HG3QhBSAAKAIAIQACQANAIAAiAigCBEF4cSABRg0BIAVBHXYhACAFQQF0IQUgAiAAQQRxakEQaiIDKAIAIgANAAsgAyAENgIAIAQgAjYCGCAEIAQ2AgwgBCAENgIIDAELIAIoAggiACAENgIMIAIgBDYCCCAEQQA2AhggBCACNgIMIAQgADYCCAsgCUEIaiEBDAILAkAgB0UNAAJAIAMoAhwiAUECdEG80gBqIgIoAgAgA0YEQCACIAA2AgAgAA0BQZDQACAIQX4gAXdxIgg2AgAMAgsgB0EQQRQgBygCECADRhtqIAA2AgAgAEUNAQsgACAHNgIYIAMoAhAiAQRAIAAgATYCECABIAA2AhgLIANBFGooAgAiAUUNACAAQRRqIAE2AgAgASAANgIYCwJAIAVBD00EQCADIAQgBWoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAwBCyADIARqIgIgBUEBcjYCBCADIARBA3I2AgQgAiAFaiAFNgIAIAVB/wFNBEAgBUF4cUG00ABqIQACf0GM0AAoAgAiAUEBIAVBA3Z0IgVxRQRAQYzQACABIAVyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRBvNIAaiEAQQEgAXQiBCAIcUUEQCAAIAI2AgBBkNAAIAQgCHI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEEAkADQCAEIgAoAgRBeHEgBUYNASABQR12IQQgAUEBdCEBIAAgBEEEcWpBEGoiBigCACIEDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLIANBCGohAQwBCwJAIAlFDQACQCAAKAIcIgFBAnRBvNIAaiICKAIAIABGBEAgAiADNgIAIAMNAUGQ0AAgC0F+IAF3cTYCAAwCCyAJQRBBFCAJKAIQIABGG2ogAzYCACADRQ0BCyADIAk2AhggACgCECIBBEAgAyABNgIQIAEgAzYCGAsgAEEUaigCACIBRQ0AIANBFGogATYCACABIAM2AhgLAkAgBUEPTQRAIAAgBCAFaiIBQQNyNgIEIAAgAWoiASABKAIEQQFyNgIEDAELIAAgBGoiByAFQQFyNgIEIAAgBEEDcjYCBCAFIAdqIAU2AgAgCARAIAhBeHFBtNAAaiEBQaDQACgCACEDAn9BASAIQQN2dCICIAZxRQRAQYzQACACIAZyNgIAIAEMAQsgASgCCAsiAiADNgIMIAEgAzYCCCADIAE2AgwgAyACNgIIC0Gg0AAgBzYCAEGU0AAgBTYCAAsgAEEIaiEBCyAKQRBqJAAgAQtDACAARQRAPwBBEHQPCwJAIABB//8DcQ0AIABBAEgNACAAQRB2QAAiAEF/RgRAQfzTAEEwNgIAQX8PCyAAQRB0DwsACwvcPyIAQYAICwkBAAAAAgAAAAMAQZQICwUEAAAABQBBpAgLCQYAAAAHAAAACABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv","base64")});var rsn=T((eMu,tsn)=>{"use strict";f();var{Buffer:Qbo}=require("node:buffer");tsn.exports=Qbo.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK77MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcsBzAHNAc4BzwGKA4kDiAOHA4QDgwOAA/sC+gL5AvgC9wL0AvMC8gLLAsECsALZAQsgASAERw3wAkHdASEDDLMDCyABIARHDcgBQcMBIQMMsgMLIAEgBEcNe0H3ACEDDLEDCyABIARHDXBB7wAhAwywAwsgASAERw1pQeoAIQMMrwMLIAEgBEcNZUHoACEDDK4DCyABIARHDWJB5gAhAwytAwsgASAERw0aQRghAwysAwsgASAERw0VQRIhAwyrAwsgASAERw1CQcUAIQMMqgMLIAEgBEcNNEE/IQMMqQMLIAEgBEcNMkE8IQMMqAMLIAEgBEcNK0ExIQMMpwMLIAItAC5BAUYNnwMMwQILQQAhAAJAAkACQCACLQAqRQ0AIAItACtFDQAgAi8BMCIDQQJxRQ0BDAILIAIvATAiA0EBcUUNAQtBASEAIAItAChBAUYNACACLwEyIgVB5ABrQeQASQ0AIAVBzAFGDQAgBUGwAkYNACADQcAAcQ0AQQAhACADQYgEcUGABEYNACADQShxQQBHIQALIAJBADsBMCACQQA6AC8gAEUN3wIgAkIANwMgDOACC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAARQ3MASAAQRVHDd0CIAJBBDYCHCACIAE2AhQgAkGwGDYCECACQRU2AgxBACEDDKQDCyABIARGBEBBBiEDDKQDCyABQQFqIQFBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAA3ZAgwcCyACQgA3AyBBEiEDDIkDCyABIARHDRZBHSEDDKEDCyABIARHBEAgAUEBaiEBQRAhAwyIAwtBByEDDKADCyACIAIpAyAiCiAEIAFrrSILfSIMQgAgCiAMWhs3AyAgCiALWA3UAkEIIQMMnwMLIAEgBEcEQCACQQk2AgggAiABNgIEQRQhAwyGAwtBCSEDDJ4DCyACKQMgQgBSDccBIAIgAi8BMEGAAXI7ATAMQgsgASAERw0/QdAAIQMMnAMLIAEgBEYEQEELIQMMnAMLIAFBAWohAUEAIQACQCACKAI4IgNFDQAgAygCUCIDRQ0AIAIgAxEAACEACyAADc8CDMYBC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ3GASAAQRVHDc0CIAJBCzYCHCACIAE2AhQgAkGCGTYCECACQRU2AgxBACEDDJoDC0EAIQACQCACKAI4IgNFDQAgAygCSCIDRQ0AIAIgAxEAACEACyAARQ0MIABBFUcNygIgAkEaNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMmQMLQQAhAAJAIAIoAjgiA0UNACADKAJMIgNFDQAgAiADEQAAIQALIABFDcQBIABBFUcNxwIgAkELNgIcIAIgATYCFCACQZEXNgIQIAJBFTYCDEEAIQMMmAMLIAEgBEYEQEEPIQMMmAMLIAEtAAAiAEE7Rg0HIABBDUcNxAIgAUEBaiEBDMMBC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3DASAAQRVHDcICIAJBDzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJYDCwNAIAEtAABB8DVqLQAAIgBBAUcEQCAAQQJHDcECIAIoAgQhAEEAIQMgAkEANgIEIAIgACABQQFqIgEQLSIADcICDMUBCyAEIAFBAWoiAUcNAAtBEiEDDJUDC0EAIQACQCACKAI4IgNFDQAgAygCTCIDRQ0AIAIgAxEAACEACyAARQ3FASAAQRVHDb0CIAJBGzYCHCACIAE2AhQgAkGRFzYCECACQRU2AgxBACEDDJQDCyABIARGBEBBFiEDDJQDCyACQQo2AgggAiABNgIEQQAhAAJAIAIoAjgiA0UNACADKAJIIgNFDQAgAiADEQAAIQALIABFDcIBIABBFUcNuQIgAkEVNgIcIAIgATYCFCACQYIZNgIQIAJBFTYCDEEAIQMMkwMLIAEgBEcEQANAIAEtAABB8DdqLQAAIgBBAkcEQAJAIABBAWsOBMQCvQIAvgK9AgsgAUEBaiEBQQghAwz8AgsgBCABQQFqIgFHDQALQRUhAwyTAwtBFSEDDJIDCwNAIAEtAABB8DlqLQAAIgBBAkcEQCAAQQFrDgTFArcCwwK4ArcCCyAEIAFBAWoiAUcNAAtBGCEDDJEDCyABIARHBEAgAkELNgIIIAIgATYCBEEHIQMM+AILQRkhAwyQAwsgAUEBaiEBDAILIAEgBEYEQEEaIQMMjwMLAkAgAS0AAEENaw4UtQG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwG/Ab8BvwEAvwELQQAhAyACQQA2AhwgAkGvCzYCECACQQI2AgwgAiABQQFqNgIUDI4DCyABIARGBEBBGyEDDI4DCyABLQAAIgBBO0cEQCAAQQ1HDbECIAFBAWohAQy6AQsgAUEBaiEBC0EiIQMM8wILIAEgBEYEQEEcIQMMjAMLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43wQLAAgABAgMEBQYH0AHQAdAB0AHQAdAB0AEICQoLDA3QAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdABDg8QERIT0AELQgIhCgzAAgtCAyEKDL8CC0IEIQoMvgILQgUhCgy9AgtCBiEKDLwCC0IHIQoMuwILQgghCgy6AgtCCSEKDLkCC0IKIQoMuAILQgshCgy3AgtCDCEKDLYCC0INIQoMtQILQg4hCgy0AgtCDyEKDLMCC0IKIQoMsgILQgshCgyxAgtCDCEKDLACC0INIQoMrwILQg4hCgyuAgtCDyEKDK0CC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsON8ACvwIAAQIDBAUGB74CvgK+Ar4CvgK+Ar4CCAkKCwwNvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ar4CvgK+Ag4PEBESE74CC0ICIQoMvwILQgMhCgy+AgtCBCEKDL0CC0IFIQoMvAILQgYhCgy7AgtCByEKDLoCC0IIIQoMuQILQgkhCgy4AgtCCiEKDLcCC0ILIQoMtgILQgwhCgy1AgtCDSEKDLQCC0IOIQoMswILQg8hCgyyAgtCCiEKDLECC0ILIQoMsAILQgwhCgyvAgtCDSEKDK4CC0IOIQoMrQILQg8hCgysAgsgAiACKQMgIgogBCABa60iC30iDEIAIAogDFobNwMgIAogC1gNpwJBHyEDDIkDCyABIARHBEAgAkEJNgIIIAIgATYCBEElIQMM8AILQSAhAwyIAwtBASEFIAIvATAiA0EIcUUEQCACKQMgQgBSIQULAkAgAi0ALgRAQQEhACACLQApQQVGDQEgA0HAAHFFIAVxRQ0BC0EAIQAgA0HAAHENAEECIQAgA0EIcQ0AIANBgARxBEACQCACLQAoQQFHDQAgAi0ALUEKcQ0AQQUhAAwCC0EEIQAMAQsgA0EgcUUEQAJAIAItAChBAUYNACACLwEyIgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNAEEEIQAgA0EocUUNAiADQYgEcUGABEYNAgtBACEADAELQQBBAyACKQMgUBshAAsgAEEBaw4FvgIAsAEBpAKhAgtBESEDDO0CCyACQQE6AC8MhAMLIAEgBEcNnQJBJCEDDIQDCyABIARHDRxBxgAhAwyDAwtBACEAAkAgAigCOCIDRQ0AIAMoAkQiA0UNACACIAMRAAAhAAsgAEUNJyAAQRVHDZgCIAJB0AA2AhwgAiABNgIUIAJBkRg2AhAgAkEVNgIMQQAhAwyCAwsgASAERgRAQSghAwyCAwtBACEDIAJBADYCBCACQQw2AgggAiABIAEQKiIARQ2UAiACQSc2AhwgAiABNgIUIAIgADYCDAyBAwsgASAERgRAQSkhAwyBAwsgAS0AACIAQSBGDRMgAEEJRw2VAiABQQFqIQEMFAsgASAERwRAIAFBAWohAQwWC0EqIQMM/wILIAEgBEYEQEErIQMM/wILIAEtAAAiAEEJRyAAQSBHcQ2QAiACLQAsQQhHDd0CIAJBADoALAzdAgsgASAERgRAQSwhAwz+AgsgAS0AAEEKRw2OAiABQQFqIQEMsAELIAEgBEcNigJBLyEDDPwCCwNAIAEtAAAiAEEgRwRAIABBCmsOBIQCiAKIAoQChgILIAQgAUEBaiIBRw0AC0ExIQMM+wILQTIhAyABIARGDfoCIAIoAgAiACAEIAFraiEHIAEgAGtBA2ohBgJAA0AgAEHwO2otAAAgAS0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAEEDRgRAQQYhAQziAgsgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAc2AgAM+wILIAJBADYCAAyGAgtBMyEDIAQgASIARg35AiAEIAFrIAIoAgAiAWohByAAIAFrQQhqIQYCQANAIAFB9DtqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBCEYEQEEFIQEM4QILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPoCCyACQQA2AgAgACEBDIUCC0E0IQMgBCABIgBGDfgCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgJAA0AgAUHQwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEM4AILIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADPkCCyACQQA2AgAgACEBDIQCCyABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRg0JDIECCyAEIAFBAWoiAUcNAAtBMCEDDPgCC0EwIQMM9wILIAEgBEcEQANAIAEtAAAiAEEgRwRAIABBCmsOBP8B/gH+Af8B/gELIAQgAUEBaiIBRw0AC0E4IQMM9wILQTghAwz2AgsDQCABLQAAIgBBIEcgAEEJR3EN9gEgBCABQQFqIgFHDQALQTwhAwz1AgsDQCABLQAAIgBBIEcEQAJAIABBCmsOBPkBBAT5AQALIABBLEYN9QEMAwsgBCABQQFqIgFHDQALQT8hAwz0AgtBwAAhAyABIARGDfMCIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAEGAQGstAAAgAS0AAEEgckcNASAAQQZGDdsCIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPQCCyACQQA2AgALQTYhAwzZAgsgASAERgRAQcEAIQMM8gILIAJBDDYCCCACIAE2AgQgAi0ALEEBaw4E+wHuAewB6wHUAgsgAUEBaiEBDPoBCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIQMM3AILIAFBAWohAUEyIQMM2wILIAFBAWohAUEzIQMM2gILDP4BCyAEIAFBAWoiAUcNAAtBNSEDDPACC0E1IQMM7wILIAEgBEcEQANAIAEtAABBgDxqLQAAQQFHDfcBIAQgAUEBaiIBRw0AC0E9IQMM7wILQT0hAwzuAgtBACEAAkAgAigCOCIDRQ0AIAMoAkAiA0UNACACIAMRAAAhAAsgAEUNASAAQRVHDeYBIAJBwgA2AhwgAiABNgIUIAJB4xg2AhAgAkEVNgIMQQAhAwztAgsgAUEBaiEBC0E8IQMM0gILIAEgBEYEQEHCACEDDOsCCwJAA0ACQCABLQAAQQlrDhgAAswCzALRAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAswCzALMAgDMAgsgBCABQQFqIgFHDQALQcIAIQMM6wILIAFBAWohASACLQAtQQFxRQ3+AQtBLCEDDNACCyABIARHDd4BQcQAIQMM6AILA0AgAS0AAEGQwABqLQAAQQFHDZwBIAQgAUEBaiIBRw0AC0HFACEDDOcCCyABLQAAIgBBIEYN/gEgAEE6Rw3AAiACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgAN3gEM3QELQccAIQMgBCABIgBGDeUCIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFBkMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvwIgAUEFRg3CAiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzlAgtByAAhAyAEIAEiAEYN5AIgBCABayACKAIAIgFqIQcgACABa0EJaiEGA0AgAUGWwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw2+AkECIAFBCUYNwgIaIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOQCCyABIARGBEBByQAhAwzkAgsCQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQe4Aaw4HAL8CvwK/Ar8CvwIBvwILIAFBAWohAUE+IQMMywILIAFBAWohAUE/IQMMygILQcoAIQMgBCABIgBGDeICIAQgAWsgAigCACIBaiEGIAAgAWtBAWohBwNAIAFBoMIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNvAIgAUEBRg2+AiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBjYCAAziAgtBywAhAyAEIAEiAEYN4QIgBCABayACKAIAIgFqIQcgACABa0EOaiEGA0AgAUGiwgBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw27AiABQQ5GDb4CIAFBAWohASAEIABBAWoiAEcNAAsgAiAHNgIADOECC0HMACEDIAQgASIARg3gAiAEIAFrIAIoAgAiAWohByAAIAFrQQ9qIQYDQCABQcDCAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDboCQQMgAUEPRg2+AhogAUEBaiEBIAQgAEEBaiIARw0ACyACIAc2AgAM4AILQc0AIQMgBCABIgBGDd8CIAQgAWsgAigCACIBaiEHIAAgAWtBBWohBgNAIAFB0MIAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNuQJBBCABQQVGDb0CGiABQQFqIQEgBCAAQQFqIgBHDQALIAIgBzYCAAzfAgsgASAERgRAQc4AIQMM3wILAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAvAK8ArwCvAK8ArwCvAK8ArwCvAK8ArwCAbwCvAK8AgIDvAILIAFBAWohAUHBACEDDMgCCyABQQFqIQFBwgAhAwzHAgsgAUEBaiEBQcMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAzOAgtB4wAhAyABIARGDc0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgNAIAEtAAAgAEHpwgBqLQAARw2vASAAQQNGDa0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADM0CCyABIARGBEBB5QAhAwzNAgsgAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANqgFB1gAhAwyzAgsgASAERwRAA0AgAS0AACIAQSBHBEACQAJAAkAgAEHIAGsOCwABswGzAbMBswGzAbMBswGzAQKzAQsgAUEBaiEBQdIAIQMMtwILIAFBAWohAUHTACEDDLYCCyABQQFqIQFB1AAhAwy1AgsgBCABQQFqIgFHDQALQeQAIQMMzAILQeQAIQMMywILA0AgAS0AAEHwwgBqLQAAIgBBAUcEQCAAQQJrDgOnAaYBpQGkAQsgBCABQQFqIgFHDQALQeYAIQMMygILIAFBAWogASAERw0CGkHnACEDDMkCCwNAIAEtAABB8MQAai0AACIAQQFHBEACQCAAQQJrDgSiAaEBoAEAnwELQdcAIQMMsQILIAQgAUEBaiIBRw0AC0HoACEDDMgCCyABIARGBEBB6QAhAwzIAgsCQCABLQAAIgBBCmsOGrcBmwGbAbQBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBmwGbAZsBpAGbAZsBAJkBCyABQQFqCyEBQQYhAwytAgsDQCABLQAAQfDGAGotAABBAUcNfSAEIAFBAWoiAUcNAAtB6gAhAwzFAgsgAUEBaiABIARHDQIaQesAIQMMxAILIAEgBEYEQEHsACEDDMQCCyABQQFqDAELIAEgBEYEQEHtACEDDMMCCyABQQFqCyEBQQQhAwyoAgsgASAERgRAQe4AIQMMwQILAkACQAJAIAEtAABB8MgAai0AAEEBaw4HkAGPAY4BAHwBAo0BCyABQQFqIQEMCwsgAUEBagyTAQtBACEDIAJBADYCHCACQZsSNgIQIAJBBzYCDCACIAFBAWo2AhQMwAILAkADQCABLQAAQfDIAGotAAAiAEEERwRAAkACQCAAQQFrDgeUAZMBkgGNAQAEAY0BC0HaACEDDKoCCyABQQFqIQFB3AAhAwypAgsgBCABQQFqIgFHDQALQe8AIQMMwAILIAFBAWoMkQELIAQgASIARgRAQfAAIQMMvwILIAAtAABBL0cNASAAQQFqIQEMBwsgBCABIgBGBEBB8QAhAwy+AgsgAC0AACIBQS9GBEAgAEEBaiEBQd0AIQMMpQILIAFBCmsiA0EWSw0AIAAhAUEBIAN0QYmAgAJxDfkBC0EAIQMgAkEANgIcIAIgADYCFCACQYwcNgIQIAJBBzYCDAy8AgsgASAERwRAIAFBAWohAUHeACEDDKMCC0HyACEDDLsCCyABIARGBEBB9AAhAwy7AgsCQCABLQAAQfDMAGotAABBAWsOA/cBcwCCAQtB4QAhAwyhAgsgASAERwRAA0AgAS0AAEHwygBqLQAAIgBBA0cEQAJAIABBAWsOAvkBAIUBC0HfACEDDKMCCyAEIAFBAWoiAUcNAAtB8wAhAwy6AgtB8wAhAwy5AgsgASAERwRAIAJBDzYCCCACIAE2AgRB4AAhAwygAgtB9QAhAwy4AgsgASAERgRAQfYAIQMMuAILIAJBDzYCCCACIAE2AgQLQQMhAwydAgsDQCABLQAAQSBHDY4CIAQgAUEBaiIBRw0AC0H3ACEDDLUCCyABIARGBEBB+AAhAwy1AgsgAS0AAEEgRw16IAFBAWohAQxbC0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAADXgMgAILIAEgBEYEQEH6ACEDDLMCCyABLQAAQcwARw10IAFBAWohAUETDHYLQfsAIQMgASAERg2xAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYDQCABLQAAIABB8M4Aai0AAEcNcyAAQQVGDXUgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMsQILIAEgBEYEQEH8ACEDDLECCwJAAkAgAS0AAEHDAGsODAB0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB9ysPC0GQMQ8LQdcxDwtBoi0PC0HUJw8LQeArDwtBnywPC0HrMQ8LQdUfDwtByjEPC0HeJQ8LQdQeDwtB9BwPC0GnMg8LQbEdDwtBoB0PC0G5MQ8LQbwwDwtBkiEPC0GzJg8LQeksDwtBrB4PC0HUKw8LQfcmDwtBgCYPC0GwIQ8LQf4eDwtBjSMPC0GJLQ8LQfciDwtBoDEPC0GuHw8LQcYlDwtB6B4PC0GTIg8LQcIvDwtBwx0PC0GLLA8LQeEdDwtBjS8PC0HqIQ8LQbQtDwtB0i8PC0HfMg8LQdIyDwtB8DAPC0GpIg8LQfkjDwtBmR4PC0G1LA8LQZswDwtBkjIPC0G2Kw8LQcIiDwtB+DIPC0GeJQ8LQdAiDwtBuh4PC0GBHg8LAAtB1iEhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCz4BAn8CQCAAKAI4IgNFDQAgAygCBCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBxhE2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCCCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9go2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCDCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7Ro2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCECIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlRA2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCFCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBqhs2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCGCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB7RM2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCKCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABB9gg2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCHCIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBwhk2AhBBGCEECyAECz4BAn8CQCAAKAI4IgNFDQAgAygCICIDRQ0AIAAgASACIAFrIAMRAQAiBEF/Rw0AIABBlBQ2AhBBGCEECyAEC1kBAn8CQCAALQAoQQFGDQAgAC8BMiIBQeQAa0HkAEkNACABQcwBRg0AIAFBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhAiAAQYgEcUGABEYNACAAQShxRSECCyACC4wBAQJ/AkACQAJAIAAtACpFDQAgAC0AK0UNACAALwEwIgFBAnFFDQEMAgsgAC8BMCIBQQFxRQ0BC0EBIQIgAC0AKEEBRg0AIAAvATIiAEHkAGtB5ABJDQAgAEHMAUYNACAAQbACRg0AIAFBwABxDQBBACECIAFBiARxQYAERg0AIAFBKHFBAEchAgsgAgtzACAAQRBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAA/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQTBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQSBq/QwAAAAAAAAAAAAAAAAAAAAA/QsDACAAQd0BNgIcCwYAIAAQMguaLQELfyMAQRBrIgokAEGk0AAoAgAiCUUEQEHk0wAoAgAiBUUEQEHw0wBCfzcCAEHo0wBCgICEgICAwAA3AgBB5NMAIApBCGpBcHFB2KrVqgVzIgU2AgBB+NMAQQA2AgBByNMAQQA2AgALQczTAEGA1AQ2AgBBnNAAQYDUBDYCAEGw0AAgBTYCAEGs0ABBfzYCAEHQ0wBBgKwDNgIAA0AgAUHI0ABqIAFBvNAAaiICNgIAIAIgAUG00ABqIgM2AgAgAUHA0ABqIAM2AgAgAUHQ0ABqIAFBxNAAaiIDNgIAIAMgAjYCACABQdjQAGogAUHM0ABqIgI2AgAgAiADNgIAIAFB1NAAaiACNgIAIAFBIGoiAUGAAkcNAAtBjNQEQcGrAzYCAEGo0ABB9NMAKAIANgIAQZjQAEHAqwM2AgBBpNAAQYjUBDYCAEHM/wdBODYCAEGI1AQhCQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQewBTQRAQYzQACgCACIGQRAgAEETakFwcSAAQQtJGyIEQQN2IgB2IgFBA3EEQAJAIAFBAXEgAHJBAXMiAkEDdCIAQbTQAGoiASAAQbzQAGooAgAiACgCCCIDRgRAQYzQACAGQX4gAndxNgIADAELIAEgAzYCCCADIAE2AgwLIABBCGohASAAIAJBA3QiAkEDcjYCBCAAIAJqIgAgACgCBEEBcjYCBAwRC0GU0AAoAgAiCCAETw0BIAEEQAJAQQIgAHQiAkEAIAJrciABIAB0cWgiAEEDdCICQbTQAGoiASACQbzQAGooAgAiAigCCCIDRgRAQYzQACAGQX4gAHdxIgY2AgAMAQsgASADNgIIIAMgATYCDAsgAiAEQQNyNgIEIABBA3QiACAEayEFIAAgAmogBTYCACACIARqIgQgBUEBcjYCBCAIBEAgCEF4cUG00ABqIQBBoNAAKAIAIQMCf0EBIAhBA3Z0IgEgBnFFBEBBjNAAIAEgBnI2AgAgAAwBCyAAKAIICyIBIAM2AgwgACADNgIIIAMgADYCDCADIAE2AggLIAJBCGohAUGg0AAgBDYCAEGU0AAgBTYCAAwRC0GQ0AAoAgAiC0UNASALaEECdEG80gBqKAIAIgAoAgRBeHEgBGshBSAAIQIDQAJAIAIoAhAiAUUEQCACQRRqKAIAIgFFDQELIAEoAgRBeHEgBGsiAyAFSSECIAMgBSACGyEFIAEgACACGyEAIAEhAgwBCwsgACgCGCEJIAAoAgwiAyAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAIAkgBEEDcjYCBCAJQQhqIQEMDwtBACEBIAQCf0Hk0wAoAgAEQEHs0wAoAgAMAQtB8NMAQn83AgBB6NMAQoCAhICAgMAANwIAQeTTACAKQQxqQXBxQdiq1aoFczYCAEH40wBBADYCAEHI0wBBADYCAEGAgAQLIgAgBEHHAGoiBWoiBkEAIABrIgdxIgJPBEBB/NMAQTA2AgAMDwsCQEHE0wAoAgAiAUUNAEG80wAoAgAiCCACaiEAIAAgAU0gACAIS3ENAEEAIQFB/NMAQTA2AgAMDwtByNMALQAAQQRxDQQCQAJAIAkEQEHM0wAhAQNAIAEoAgAiACAJTQRAIAAgASgCBGogCUsNAwsgASgCCCIBDQALC0EAEDMiAEF/Rg0FIAIhBkHo0wAoAgAiAUEBayIDIABxBEAgAiAAayAAIANqQQAgAWtxaiEGCyAEIAZPDQUgBkH+////B0sNBUHE0wAoAgAiAwRAQbzTACgCACIHIAZqIQEgASAHTQ0GIAEgA0sNBgsgBhAzIgEgAEcNAQwHCyAGIANrIAdxIgZB/v///wdLDQQgBhAzIQAgACABKAIAIAEoAgRqRg0DIAAhAQsCQCAGIARByABqTw0AIAFBf0YNAEHs0wAoAgAiACAFIAZrakEAIABrcSIAQf7///8HSwRAIAEhAAwHCyAAEDNBf0cEQCAAIAZqIQYgASEADAcLQQAgBmsQMxoMBAsgASIAQX9HDQUMAwtBACEDDAwLQQAhAAwKCyAAQX9HDQILQcjTAEHI0wAoAgBBBHI2AgALIAJB/v///wdLDQEgAhAzIQBBABAzIQEgAEF/Rg0BIAFBf0YNASAAIAFPDQEgASAAayIGIARBOGpNDQELQbzTAEG80wAoAgAgBmoiATYCAEHA0wAoAgAgAUkEQEHA0wAgATYCAAsCQAJAAkBBpNAAKAIAIgIEQEHM0wAhAQNAIAAgASgCACIDIAEoAgQiBWpGDQIgASgCCCIBDQALDAILQZzQACgCACIBQQBHIAAgAU9xRQRAQZzQACAANgIAC0EAIQFB0NMAIAY2AgBBzNMAIAA2AgBBrNAAQX82AgBBsNAAQeTTACgCADYCAEHY0wBBADYCAANAIAFByNAAaiABQbzQAGoiAjYCACACIAFBtNAAaiIDNgIAIAFBwNAAaiADNgIAIAFB0NAAaiABQcTQAGoiAzYCACADIAI2AgAgAUHY0ABqIAFBzNAAaiICNgIAIAIgAzYCACABQdTQAGogAjYCACABQSBqIgFBgAJHDQALQXggAGtBD3EiASAAaiICIAZBOGsiAyABayIBQQFyNgIEQajQAEH00wAoAgA2AgBBmNAAIAE2AgBBpNAAIAI2AgAgACADakE4NgIEDAILIAAgAk0NACACIANJDQAgASgCDEEIcQ0AQXggAmtBD3EiACACaiIDQZjQACgCACAGaiIHIABrIgBBAXI2AgQgASAFIAZqNgIEQajQAEH00wAoAgA2AgBBmNAAIAA2AgBBpNAAIAM2AgAgAiAHakE4NgIEDAELIABBnNAAKAIASQRAQZzQACAANgIACyAAIAZqIQNBzNMAIQECQAJAAkADQCADIAEoAgBHBEAgASgCCCIBDQEMAgsLIAEtAAxBCHFFDQELQczTACEBA0AgASgCACIDIAJNBEAgAyABKAIEaiIFIAJLDQMLIAEoAgghAQwACwALIAEgADYCACABIAEoAgQgBmo2AgQgAEF4IABrQQ9xaiIJIARBA3I2AgQgA0F4IANrQQ9xaiIGIAQgCWoiBGshASACIAZGBEBBpNAAIAQ2AgBBmNAAQZjQACgCACABaiIANgIAIAQgAEEBcjYCBAwIC0Gg0AAoAgAgBkYEQEGg0AAgBDYCAEGU0ABBlNAAKAIAIAFqIgA2AgAgBCAAQQFyNgIEIAAgBGogADYCAAwICyAGKAIEIgVBA3FBAUcNBiAFQXhxIQggBUH/AU0EQCAFQQN2IQMgBigCCCIAIAYoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAcLIAIgADYCCCAAIAI2AgwMBgsgBigCGCEHIAYgBigCDCIARwRAIAAgBigCCCICNgIIIAIgADYCDAwFCyAGQRRqIgIoAgAiBUUEQCAGKAIQIgVFDQQgBkEQaiECCwNAIAIhAyAFIgBBFGoiAigCACIFDQAgAEEQaiECIAAoAhAiBQ0ACyADQQA2AgAMBAtBeCAAa0EPcSIBIABqIgcgBkE4ayIDIAFrIgFBAXI2AgQgACADakE4NgIEIAIgBUE3IAVrQQ9xakE/ayIDIAMgAkEQakkbIgNBIzYCBEGo0ABB9NMAKAIANgIAQZjQACABNgIAQaTQACAHNgIAIANBEGpB1NMAKQIANwIAIANBzNMAKQIANwIIQdTTACADQQhqNgIAQdDTACAGNgIAQczTACAANgIAQdjTAEEANgIAIANBJGohAQNAIAFBBzYCACAFIAFBBGoiAUsNAAsgAiADRg0AIAMgAygCBEF+cTYCBCADIAMgAmsiBTYCACACIAVBAXI2AgQgBUH/AU0EQCAFQXhxQbTQAGohAAJ/QYzQACgCACIBQQEgBUEDdnQiA3FFBEBBjNAAIAEgA3I2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEG80gBqIQBBkNAAKAIAIgNBASABdCIGcUUEQCAAIAI2AgBBkNAAIAMgBnI2AgAgAiAANgIYIAIgAjYCCCACIAI2AgwMAQsgBUEZIAFBAXZrQQAgAUEfRxt0IQEgACgCACEDAkADQCADIgAoAgRBeHEgBUYNASABQR12IQMgAUEBdCEBIAAgA0EEcWpBEGoiBigCACIDDQALIAYgAjYCACACIAA2AhggAiACNgIMIAIgAjYCCAwBCyAAKAIIIgEgAjYCDCAAIAI2AgggAkEANgIYIAIgADYCDCACIAE2AggLQZjQACgCACIBIARNDQBBpNAAKAIAIgAgBGoiAiABIARrIgFBAXI2AgRBmNAAIAE2AgBBpNAAIAI2AgAgACAEQQNyNgIEIABBCGohAQwIC0EAIQFB/NMAQTA2AgAMBwtBACEACyAHRQ0AAkAgBigCHCICQQJ0QbzSAGoiAygCACAGRgRAIAMgADYCACAADQFBkNAAQZDQACgCAEF+IAJ3cTYCAAwCCyAHQRBBFCAHKAIQIAZGG2ogADYCACAARQ0BCyAAIAc2AhggBigCECICBEAgACACNgIQIAIgADYCGAsgBkEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgCGohASAGIAhqIgYoAgQhBQsgBiAFQX5xNgIEIAEgBGogATYCACAEIAFBAXI2AgQgAUH/AU0EQCABQXhxQbTQAGohAAJ/QYzQACgCACICQQEgAUEDdnQiAXFFBEBBjNAAIAEgAnI2AgAgAAwBCyAAKAIICyIBIAQ2AgwgACAENgIIIAQgADYCDCAEIAE2AggMAQtBHyEFIAFB////B00EQCABQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qIQULIAQgBTYCHCAEQgA3AhAgBUECdEG80gBqIQBBkNAAKAIAIgJBASAFdCIDcUUEQCAAIAQ2AgBBkNAAIAIgA3I2AgAgBCAANgIYIAQgBDYCCCAEIAQ2AgwMAQsgAUEZIAVBAXZrQQAgBUEfRxt0IQUgACgCACEAAkADQCAAIgIoAgRBeHEgAUYNASAFQR12IQAgBUEBdCEFIAIgAEEEcWpBEGoiAygCACIADQALIAMgBDYCACAEIAI2AhggBCAENgIMIAQgBDYCCAwBCyACKAIIIgAgBDYCDCACIAQ2AgggBEEANgIYIAQgAjYCDCAEIAA2AggLIAlBCGohAQwCCwJAIAdFDQACQCADKAIcIgFBAnRBvNIAaiICKAIAIANGBEAgAiAANgIAIAANAUGQ0AAgCEF+IAF3cSIINgIADAILIAdBEEEUIAcoAhAgA0YbaiAANgIAIABFDQELIAAgBzYCGCADKAIQIgEEQCAAIAE2AhAgASAANgIYCyADQRRqKAIAIgFFDQAgAEEUaiABNgIAIAEgADYCGAsCQCAFQQ9NBEAgAyAEIAVqIgBBA3I2AgQgACADaiIAIAAoAgRBAXI2AgQMAQsgAyAEaiICIAVBAXI2AgQgAyAEQQNyNgIEIAIgBWogBTYCACAFQf8BTQRAIAVBeHFBtNAAaiEAAn9BjNAAKAIAIgFBASAFQQN2dCIFcUUEQEGM0AAgASAFcjYCACAADAELIAAoAggLIgEgAjYCDCAAIAI2AgggAiAANgIMIAIgATYCCAwBC0EfIQEgBUH///8HTQRAIAVBJiAFQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAQsgAiABNgIcIAJCADcCECABQQJ0QbzSAGohAEEBIAF0IgQgCHFFBEAgACACNgIAQZDQACAEIAhyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhBAJAA0AgBCIAKAIEQXhxIAVGDQEgAUEddiEEIAFBAXQhASAAIARBBHFqQRBqIgYoAgAiBA0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIICyADQQhqIQEMAQsCQCAJRQ0AAkAgACgCHCIBQQJ0QbzSAGoiAigCACAARgRAIAIgAzYCACADDQFBkNAAIAtBfiABd3E2AgAMAgsgCUEQQRQgCSgCECAARhtqIAM2AgAgA0UNAQsgAyAJNgIYIAAoAhAiAQRAIAMgATYCECABIAM2AhgLIABBFGooAgAiAUUNACADQRRqIAE2AgAgASADNgIYCwJAIAVBD00EQCAAIAQgBWoiAUEDcjYCBCAAIAFqIgEgASgCBEEBcjYCBAwBCyAAIARqIgcgBUEBcjYCBCAAIARBA3I2AgQgBSAHaiAFNgIAIAgEQCAIQXhxQbTQAGohAUGg0AAoAgAhAwJ/QQEgCEEDdnQiAiAGcUUEQEGM0AAgAiAGcjYCACABDAELIAEoAggLIgIgAzYCDCABIAM2AgggAyABNgIMIAMgAjYCCAtBoNAAIAc2AgBBlNAAIAU2AgALIABBCGohAQsgCkEQaiQAIAELQwAgAEUEQD8AQRB0DwsCQCAAQf//A3ENACAAQQBIDQAgAEEQdkAAIgBBf0YEQEH80wBBMDYCAEF/DwsgAEEQdA8LAAsL3D8iAEGACAsJAQAAAAIAAAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==","base64")});var vCe=T((rMu,usn)=>{"use strict";f();var nsn=["GET","HEAD","POST"],qbo=new Set(nsn),Gbo=[101,204,205,304],isn=[301,302,303,307,308],Hbo=new Set(isn),osn=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],jbo=new Set(osn),ssn=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],$bo=new Set(ssn),Vbo=["follow","manual","error"],asn=["GET","HEAD","OPTIONS","TRACE"],Wbo=new Set(asn),zbo=["navigate","same-origin","no-cors","cors"],Ybo=["omit","same-origin","include"],Kbo=["default","no-store","reload","no-cache","force-cache","only-if-cached"],Jbo=["content-encoding","content-language","content-location","content-type","content-length"],Xbo=["half"],csn=["CONNECT","TRACE","TRACK"],Zbo=new Set(csn),lsn=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],eTo=new Set(lsn);usn.exports={subresource:lsn,forbiddenMethods:csn,requestBodyHeader:Jbo,referrerPolicy:ssn,requestRedirect:Vbo,requestMode:zbo,requestCredentials:Ybo,requestCache:Kbo,redirectStatus:isn,corsSafeListedMethods:nsn,nullBodyStatus:Gbo,safeMethods:asn,badPorts:osn,requestDuplex:Xbo,subresourceSet:eTo,badPortsSet:jbo,redirectStatusSet:Hbo,corsSafeListedMethodsSet:qbo,safeMethodsSet:Wbo,forbiddenMethodsSet:Zbo,referrerPolicySet:$bo}});var I6t=T((iMu,dsn)=>{"use strict";f();var S6t=Symbol.for("undici.globalOrigin.1");function tTo(){return globalThis[S6t]}a(tTo,"getGlobalOrigin");function rTo(t){if(t===void 0){Object.defineProperty(globalThis,S6t,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,S6t,{value:e,writable:!0,enumerable:!1,configurable:!1})}a(rTo,"setGlobalOrigin");dsn.exports={getGlobalOrigin:tTo,setGlobalOrigin:rTo}});var p_=T((aMu,ysn)=>{"use strict";f();var Bje=require("node:assert"),nTo=new TextEncoder,bCe=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,iTo=/[\u000A\u000D\u0009\u0020]/,oTo=/[\u0009\u000A\u000C\u000D\u0020]/g,sTo=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function aTo(t){Bje(t.protocol==="data:");let e=hsn(t,!0);e=e.slice(5);let r={position:0},n=Wie(",",e,r),o=n.length;if(n=pTo(n,!0,!0),r.position>=e.length)return"failure";r.position++;let s=e.slice(o+1),c=msn(s);if(/;(\u0020){0,}base64$/i.test(n)){let u=Asn(c);if(c=lTo(u),c==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020)+$/,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let l=x6t(n);return l==="failure"&&(l=x6t("text/plain;charset=US-ASCII")),{mimeType:l,body:c}}a(aTo,"dataURLProcessor");function hsn(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,o=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?o.slice(0,-1):o}a(hsn,"URLSerializer");function Lje(t,e,r){let n="";for(;r.position=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}a(fsn,"isHexCharByte");function psn(t){return t>=48&&t<=57?t-48:(t&223)-55}a(psn,"hexByteToNumber");function cTo(t){let e=t.length,r=new Uint8Array(e),n=0;for(let o=0;ot.length)return"failure";e.position++;let n=Wie(";",t,e);if(n=Oje(n,!1,!0),n.length===0||!bCe.test(n))return"failure";let o=r.toLowerCase(),s=n.toLowerCase(),c={type:o,subtype:s,parameters:new Map,essence:`${o}/${s}`};for(;e.positioniTo.test(d),t,e);let l=Lje(d=>d!==";"&&d!=="=",t,e);if(l=l.toLowerCase(),e.positiont.length)break;let u=null;if(t[e.position]==='"')u=gsn(t,e,!0),Wie(";",t,e);else if(u=Wie(";",t,e),u=Oje(u,!1,!0),u.length===0)continue;l.length!==0&&bCe.test(l)&&(u.length===0||sTo.test(u))&&!c.parameters.has(l)&&c.parameters.set(l,u)}return c}a(x6t,"parseMIMEType");function lTo(t){t=t.replace(oTo,"");let e=t.length;if(e%4===0&&t.charCodeAt(e-1)===61&&(--e,t.charCodeAt(e-1)===61&&--e),e%4===1||/[^+/0-9A-Za-z]/.test(t.length===e?t:t.substring(0,e)))return"failure";let r=Buffer.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}a(lTo,"forgivingBase64");function gsn(t,e,r){let n=e.position,o="";for(Bje(t[e.position]==='"'),e.position++;o+=Lje(c=>c!=='"'&&c!=="\\",t,e),!(e.position>=t.length);){let s=t[e.position];if(e.position++,s==="\\"){if(e.position>=t.length){o+="\\";break}o+=t[e.position],e.position++}else{Bje(s==='"');break}}return r?o:t.slice(n,e.position)}a(gsn,"collectAnHTTPQuotedString");function uTo(t){Bje(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[o,s]of e.entries())n+=";",n+=o,n+="=",bCe.test(s)||(s=s.replace(/(\\|")/g,"\\$1"),s='"'+s,s+='"'),n+=s;return n}a(uTo,"serializeAMimeType");function dTo(t){return t===13||t===10||t===9||t===32}a(dTo,"isHTTPWhiteSpace");function Oje(t,e=!0,r=!0){return w6t(t,e,r,dTo)}a(Oje,"removeHTTPWhitespace");function fTo(t){return t===13||t===10||t===9||t===12||t===32}a(fTo,"isASCIIWhitespace");function pTo(t,e=!0,r=!0){return w6t(t,e,r,fTo)}a(pTo,"removeASCIIWhitespace");function w6t(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o0&&n(t.charCodeAt(s));)s--;return o===0&&s===t.length-1?t:t.slice(o,s+1)}a(w6t,"removeChars");function Asn(t){let e=t.length;if(65535>e)return String.fromCharCode.apply(null,t);let r="",n=0,o=65535;for(;ne&&(o=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=o));return r}a(Asn,"isomorphicDecode");function hTo(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}a(hTo,"minimizeSupportedMimeType");ysn.exports={dataURLProcessor:aTo,URLSerializer:hsn,collectASequenceOfCodePoints:Lje,collectASequenceOfCodePointsFast:Wie,stringPercentDecode:msn,parseMIMEType:x6t,collectAnHTTPQuotedString:gsn,serializeAMimeType:uTo,removeChars:w6t,removeHTTPWhitespace:Oje,minimizeSupportedMimeType:hTo,HTTP_TOKEN_CODEPOINTS:bCe,isomorphicDecode:Asn}});var Im=T((uMu,Esn)=>{"use strict";f();var{types:qk,inspect:mTo}=require("node:util"),{markAsUncloneable:gTo}=require("node:worker_threads"),{toUSVString:ATo}=Xo(),or={};or.converters={};or.util={};or.errors={};or.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};or.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return or.errors.exception({header:t.prefix,message:r})};or.errors.invalidArgument=function(t){return or.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};or.brandCheck=function(t,e,r){if(r?.strict!==!1){if(!(t instanceof e)){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}else if(t?.[Symbol.toStringTag]!==e.prototype[Symbol.toStringTag]){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}};or.argumentLengthCheck=function({length:t},e,r){if(t{});or.util.ConvertToInt=function(t,e,r,n){let o,s;e===64?(o=Math.pow(2,53)-1,r==="unsigned"?s=0:s=Math.pow(-2,53)+1):r==="unsigned"?(s=0,o=Math.pow(2,e)-1):(s=Math.pow(-2,e)-1,o=Math.pow(2,e-1)-1);let c=Number(t);if(c===0&&(c=0),n?.enforceRange===!0){if(Number.isNaN(c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY)throw or.errors.exception({header:"Integer conversion",message:`Could not convert ${or.util.Stringify(t)} to an integer.`});if(c=or.util.IntegerPart(c),co)throw or.errors.exception({header:"Integer conversion",message:`Value must be between ${s}-${o}, got ${c}.`});return c}return!Number.isNaN(c)&&n?.clamp===!0?(c=Math.min(Math.max(c,s),o),Math.floor(c)%2===0?c=Math.floor(c):c=Math.ceil(c),c):Number.isNaN(c)||c===0&&Object.is(0,c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY?0:(c=or.util.IntegerPart(c),c=c%Math.pow(2,e),r==="signed"&&c>=Math.pow(2,e)-1?c-Math.pow(2,e):c)};or.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};or.util.Stringify=function(t){switch(or.util.Type(t)){case"Symbol":return`Symbol(${t.description})`;case"Object":return mTo(t);case"String":return`"${t}"`;default:return`${t}`}};or.sequenceConverter=function(t){return(e,r,n,o)=>{if(or.util.Type(e)!=="Object")throw or.errors.exception({header:r,message:`${n} (${or.util.Stringify(e)}) is not iterable.`});let s=typeof o=="function"?o():e?.[Symbol.iterator]?.(),c=[],l=0;if(s===void 0||typeof s.next!="function")throw or.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:u,value:d}=s.next();if(u)break;c.push(t(d,r,`${n}[${l++}]`))}return c}};or.recordConverter=function(t,e){return(r,n,o)=>{if(or.util.Type(r)!=="Object")throw or.errors.exception({header:n,message:`${o} ("${or.util.Type(r)}") is not an Object.`});let s={};if(!qk.isProxy(r)){let l=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let u of l){let d=t(u,n,o),p=e(r[u],n,o);s[d]=p}return s}let c=Reflect.ownKeys(r);for(let l of c)if(Reflect.getOwnPropertyDescriptor(r,l)?.enumerable){let d=t(l,n,o),p=e(r[l],n,o);s[d]=p}return s}};or.interfaceConverter=function(t){return(e,r,n,o)=>{if(o?.strict!==!1&&!(e instanceof t))throw or.errors.exception({header:r,message:`Expected ${n} ("${or.util.Stringify(e)}") to be an instance of ${t.name}.`});return e}};or.dictionaryConverter=function(t){return(e,r,n)=>{let o=or.util.Type(e),s={};if(o==="Null"||o==="Undefined")return s;if(o!=="Object")throw or.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let c of t){let{key:l,defaultValue:u,required:d,converter:p}=c;if(d===!0&&!Object.hasOwn(e,l))throw or.errors.exception({header:r,message:`Missing required key "${l}".`});let h=e[l],m=Object.hasOwn(c,"defaultValue");if(m&&h!==null&&(h??=u()),d||m||h!==void 0){if(h=p(h,r,`${n}.${l}`),c.allowedValues&&!c.allowedValues.includes(h))throw or.errors.exception({header:r,message:`${h} is not an accepted type. Expected one of ${c.allowedValues.join(", ")}.`});s[l]=h}}return s}};or.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};or.converters.DOMString=function(t,e,r,n){if(t===null&&n?.legacyNullToEmptyString)return"";if(typeof t=="symbol")throw or.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};or.converters.ByteString=function(t,e,r){let n=or.converters.DOMString(t,e,r);for(let o=0;o255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${o} has a value of ${n.charCodeAt(o)} which is greater than 255.`);return n};or.converters.USVString=ATo;or.converters.boolean=function(t){return!!t};or.converters.any=function(t){return t};or.converters["long long"]=function(t,e,r){return or.util.ConvertToInt(t,64,"signed",void 0,e,r)};or.converters["unsigned long long"]=function(t,e,r){return or.util.ConvertToInt(t,64,"unsigned",void 0,e,r)};or.converters["unsigned long"]=function(t,e,r){return or.util.ConvertToInt(t,32,"unsigned",void 0,e,r)};or.converters["unsigned short"]=function(t,e,r,n){return or.util.ConvertToInt(t,16,"unsigned",n,e,r)};or.converters.ArrayBuffer=function(t,e,r,n){if(or.util.Type(t)!=="Object"||!qk.isAnyArrayBuffer(t))throw or.errors.conversionFailed({prefix:e,argument:`${r} ("${or.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(n?.allowShared===!1&&qk.isSharedArrayBuffer(t))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.resizable||t.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.TypedArray=function(t,e,r,n,o){if(or.util.Type(t)!=="Object"||!qk.isTypedArray(t)||t.constructor.name!==e.name)throw or.errors.conversionFailed({prefix:r,argument:`${n} ("${or.util.Stringify(t)}")`,types:[e.name]});if(o?.allowShared===!1&&qk.isSharedArrayBuffer(t.buffer))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.DataView=function(t,e,r,n){if(or.util.Type(t)!=="Object"||!qk.isDataView(t))throw or.errors.exception({header:e,message:`${r} is not a DataView.`});if(n?.allowShared===!1&&qk.isSharedArrayBuffer(t.buffer))throw or.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw or.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};or.converters.BufferSource=function(t,e,r,n){if(qk.isAnyArrayBuffer(t))return or.converters.ArrayBuffer(t,e,r,{...n,allowShared:!1});if(qk.isTypedArray(t))return or.converters.TypedArray(t,t.constructor,e,r,{...n,allowShared:!1});if(qk.isDataView(t))return or.converters.DataView(t,e,r,{...n,allowShared:!1});throw or.errors.conversionFailed({prefix:e,argument:`${r} ("${or.util.Stringify(t)}")`,types:["BufferSource"]})};or.converters["sequence"]=or.sequenceConverter(or.converters.ByteString);or.converters["sequence>"]=or.sequenceConverter(or.converters["sequence"]);or.converters["record"]=or.recordConverter(or.converters.ByteString,or.converters.ByteString);Esn.exports={webidl:or}});var rv=T((fMu,Nsn)=>{"use strict";f();var{Transform:yTo}=require("node:stream"),_sn=require("node:zlib"),{redirectStatusSet:ETo,referrerPolicySet:_To,badPortsSet:CTo}=vCe(),{getGlobalOrigin:Csn}=I6t(),{collectASequenceOfCodePoints:O$,collectAnHTTPQuotedString:vTo,removeChars:bTo,parseMIMEType:TTo}=p_(),{performance:STo}=require("node:perf_hooks"),{isBlobLike:ITo,ReadableStreamFrom:xTo,isValidHTTPToken:vsn,normalizedMethodRecordsBase:wTo}=Xo(),B$=require("node:assert"),{isUint8Array:RTo}=require("node:util/types"),{webidl:TCe}=Im(),bsn=[],Uje;try{Uje=require("node:crypto");let t=["sha256","sha384","sha512"];bsn=Uje.getHashes().filter(e=>t.includes(e))}catch{}function Tsn(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}a(Tsn,"responseURL");function PTo(t,e){if(!ETo.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&Isn(r)&&(Ssn(r)||(r=kTo(r)),r=new URL(r,Tsn(t))),r&&!r.hash&&(r.hash=e),r}a(PTo,"responseLocationURL");function Ssn(t){for(let e=0;e126||r<32)return!1}return!0}a(Ssn,"isValidEncodedURL");function kTo(t){return Buffer.from(t,"binary").toString("utf8")}a(kTo,"normalizeBinaryStringToUtf8");function ICe(t){return t.urlList[t.urlList.length-1]}a(ICe,"requestCurrentURL");function DTo(t){let e=ICe(t);return ksn(e)&&CTo.has(e.port)?"blocked":"allowed"}a(DTo,"requestBadPort");function NTo(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}a(NTo,"isErrorLike");function MTo(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}a(MTo,"isValidReasonPhrase");var OTo=vsn;function Isn(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` +`)||t.includes("\r")||t.includes("\0"))===!1}a(Isn,"isValidHeaderValue");function BTo(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),o="";if(n.length>0)for(let s=n.length;s!==0;s--){let c=n[s-1].trim();if(_To.has(c)){o=c;break}}o!==""&&(t.referrerPolicy=o)}a(BTo,"setRequestReferrerPolicyOnRedirect");function LTo(){return"allowed"}a(LTo,"crossOriginResourcePolicyCheck");function FTo(){return"success"}a(FTo,"corsCheck");function UTo(){return"success"}a(UTo,"TAOCheck");function QTo(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}a(QTo,"appendFetchMetadata");function qTo(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&P6t(t.origin)&&!P6t(ICe(t))&&(e=null);break;case"same-origin":Qje(t,ICe(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}a(qTo,"appendRequestOriginHeader");function zie(t,e){return t}a(zie,"coarsenTime");function GTo(t,e,r){return!t?.startTime||t.startTime4096&&(n=o);let s=Qje(t,n),c=SCe(n)&&!SCe(t.url);switch(e){case"origin":return o??R6t(r,!0);case"unsafe-url":return n;case"same-origin":return s?o:"no-referrer";case"origin-when-cross-origin":return s?n:o;case"strict-origin-when-cross-origin":{let l=ICe(t);return Qje(n,l)?n:SCe(n)&&!SCe(l)?"no-referrer":o}default:return c?"no-referrer":o}}a(VTo,"determineRequestsReferrer");function R6t(t,e){return B$(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(R6t,"stripURLForReferrer");function SCe(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}a(SCe,"isURLPotentiallyTrustworthy");function WTo(t,e){if(Uje===void 0)return!0;let r=wsn(e);if(r==="no metadata"||r.length===0)return!0;let n=YTo(r),o=KTo(r,n);for(let s of o){let c=s.algo,l=s.hash,u=Uje.createHash(c).update(t).digest("base64");if(u[u.length-1]==="="&&(u[u.length-2]==="="?u=u.slice(0,-2):u=u.slice(0,-1)),JTo(u,l))return!0}return!1}a(WTo,"bytesMatch");var zTo=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function wsn(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let o=zTo.exec(n);if(o===null||o.groups===void 0||o.groups.algo===void 0)continue;let s=o.groups.algo.toLowerCase();bsn.includes(s)&&e.push(o.groups)}return r===!0?"no metadata":e}a(wsn,"parseMetadata");function YTo(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r{t=n,e=o}),resolve:t,reject:e}}a(ZTo,"createDeferredPromise");function eSo(t){return t.controller.state==="aborted"}a(eSo,"isAborted");function tSo(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(tSo,"isCancelled");function rSo(t){return wTo[t.toLowerCase()]??t}a(rSo,"normalizeMethod");function nSo(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return B$(typeof e=="string"),e}a(nSo,"serializeJavascriptValueToJSONString");var iSo=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Rsn(t,e,r=0,n=1){class o{static{a(this,"FastIterableIterator")}#e;#t;#n;constructor(c,l){this.#e=c,this.#t=l,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let c=this.#n,l=this.#e[e],u=l.length;if(c>=u)return{value:void 0,done:!0};let{[r]:d,[n]:p}=l[c];this.#n=c+1;let h;switch(this.#t){case"key":h=d;break;case"value":h=p;break;case"key+value":h=[d,p];break}return{value:h,done:!1}}}return delete o.prototype.constructor,Object.setPrototypeOf(o.prototype,iSo),Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(s,c){return new o(s,c)}}a(Rsn,"createIterator");function oSo(t,e,r,n=0,o=1){let s=Rsn(t,r,n,o),c={keys:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return TCe.brandCheck(this,e),s(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return TCe.brandCheck(this,e),s(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return TCe.brandCheck(this,e),s(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:a(function(u,d=globalThis){if(TCe.brandCheck(this,e),TCe.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof u!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:p,1:h}of s(this,"key+value"))u.call(d,h,p,this)},"forEach")}};return Object.defineProperties(e.prototype,{...c,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:c.entries.value}})}a(oSo,"iteratorMixin");async function sSo(t,e,r){let n=e,o=r,s;try{s=t.stream.getReader()}catch(c){o(c);return}try{n(await Psn(s))}catch(c){o(c)}}a(sSo,"fullyReadBody");function aSo(t){return t instanceof ReadableStream||t[Symbol.toStringTag]==="ReadableStream"&&typeof t.tee=="function"}a(aSo,"isReadableStreamLike");function cSo(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}a(cSo,"readableStreamClose");var lSo=/[^\x00-\xFF]/;function Fje(t){return B$(!lSo.test(t)),t}a(Fje,"isomorphicEncode");async function Psn(t){let e=[],r=0;for(;;){let{done:n,value:o}=await t.read();if(n)return Buffer.concat(e,r);if(!RTo(o))throw new TypeError("Received non-Uint8Array chunk");e.push(o),r+=o.length}}a(Psn,"readAllBytes");function uSo(t){B$("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}a(uSo,"urlIsLocal");function P6t(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}a(P6t,"urlHasHttpsScheme");function ksn(t){B$("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}a(ksn,"urlIsHttpHttpsScheme");function dSo(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&O$(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&O$(u=>u===" "||u===" ",r,n);let o=O$(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),s=o.length?Number(o):null;if(e&&O$(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&O$(u=>u===" "||u===" ",r,n);let c=O$(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),l=c.length?Number(c):null;return n.positionl?"failure":{rangeStartValue:s,rangeEndValue:l}}a(dSo,"simpleRangeHeaderValue");function fSo(t,e,r){let n="bytes ";return n+=Fje(`${t}`),n+="-",n+=Fje(`${e}`),n+="/",n+=Fje(`${r}`),n}a(fSo,"buildContentRange");var k6t=class extends yTo{static{a(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?_sn.createInflate(this.#e):_sn.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",o=>this.destroy(o))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function pSo(t){return new k6t(t)}a(pSo,"createInflate");function hSo(t){let e=null,r=null,n=null,o=Dsn("content-type",t);if(o===null)return"failure";for(let s of o){let c=TTo(s);c==="failure"||c.essence==="*/*"||(n=c,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}a(hSo,"extractMimeType");function mSo(t){let e=t,r={position:0},n=[],o="";for(;r.positions!=='"'&&s!==",",e,r),r.positions===9||s===32),n.push(o),o=""}return n}a(mSo,"gettingDecodingSplitting");function Dsn(t,e){let r=e.get(t,!0);return r===null?null:mSo(r)}a(Dsn,"getDecodeSplit");var gSo=new TextDecoder;function ASo(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),gSo.decode(t))}a(ASo,"utf8DecodeBytes");var D6t=class{static{a(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return Csn()}get origin(){return this.baseUrl?.origin}policyContainer=xsn()},N6t=class{static{a(this,"EnvironmentSettingsObject")}settingsObject=new D6t},ySo=new N6t;Nsn.exports={isAborted:eSo,isCancelled:tSo,isValidEncodedURL:Ssn,createDeferredPromise:ZTo,ReadableStreamFrom:xTo,tryUpgradeRequestToAPotentiallyTrustworthyURL:XTo,clampAndCoarsenConnectionTimingInfo:GTo,coarsenedSharedCurrentTime:HTo,determineRequestsReferrer:VTo,makePolicyContainer:xsn,clonePolicyContainer:$To,appendFetchMetadata:QTo,appendRequestOriginHeader:qTo,TAOCheck:UTo,corsCheck:FTo,crossOriginResourcePolicyCheck:LTo,createOpaqueTimingInfo:jTo,setRequestReferrerPolicyOnRedirect:BTo,isValidHTTPToken:vsn,requestBadPort:DTo,requestCurrentURL:ICe,responseURL:Tsn,responseLocationURL:PTo,isBlobLike:ITo,isURLPotentiallyTrustworthy:SCe,isValidReasonPhrase:MTo,sameOrigin:Qje,normalizeMethod:rSo,serializeJavascriptValueToJSONString:nSo,iteratorMixin:oSo,createIterator:Rsn,isValidHeaderName:OTo,isValidHeaderValue:Isn,isErrorLike:NTo,fullyReadBody:sSo,bytesMatch:WTo,isReadableStreamLike:aSo,readableStreamClose:cSo,isomorphicEncode:Fje,urlIsLocal:uSo,urlHasHttpsScheme:P6t,urlIsHttpHttpsScheme:ksn,readAllBytes:Psn,simpleRangeHeaderValue:dSo,buildContentRange:fSo,parseMetadata:wsn,createInflate:pSo,extractMimeType:hSo,getDecodeSplit:Dsn,utf8DecodeBytes:ASo,environmentSettingsObject:ySo}});var MF=T((mMu,Msn)=>{"use strict";f();Msn.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var O6t=T((AMu,Osn)=>{"use strict";f();var{Blob:ESo,File:_So}=require("node:buffer"),{kState:q4}=MF(),{webidl:Gk}=Im(),M6t=class t{static{a(this,"FileLike")}constructor(e,r,n={}){let o=r,s=n.type,c=n.lastModified??Date.now();this[q4]={blobLike:e,name:o,type:s,lastModified:c}}stream(...e){return Gk.brandCheck(this,t),this[q4].blobLike.stream(...e)}arrayBuffer(...e){return Gk.brandCheck(this,t),this[q4].blobLike.arrayBuffer(...e)}slice(...e){return Gk.brandCheck(this,t),this[q4].blobLike.slice(...e)}text(...e){return Gk.brandCheck(this,t),this[q4].blobLike.text(...e)}get size(){return Gk.brandCheck(this,t),this[q4].blobLike.size}get type(){return Gk.brandCheck(this,t),this[q4].blobLike.type}get name(){return Gk.brandCheck(this,t),this[q4].name}get lastModified(){return Gk.brandCheck(this,t),this[q4].lastModified}get[Symbol.toStringTag](){return"File"}};Gk.converters.Blob=Gk.interfaceConverter(ESo);function CSo(t){return t instanceof _So||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(CSo,"isFileLike");Osn.exports={FileLike:M6t,isFileLike:CSo}});var wCe=T((_Mu,Qsn)=>{"use strict";f();var{isBlobLike:qje,iteratorMixin:vSo}=rv(),{kState:fy}=MF(),{kEnumerableProperty:Yie}=Xo(),{FileLike:Bsn,isFileLike:bSo}=O6t(),{webidl:ul}=Im(),{File:Usn}=require("node:buffer"),Lsn=require("node:util"),Fsn=globalThis.File??Usn,xCe=class t{static{a(this,"FormData")}constructor(e){if(ul.util.markAsUncloneable(this),e!==void 0)throw ul.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[fy]=[]}append(e,r,n=void 0){ul.brandCheck(this,t);let o="FormData.append";if(ul.argumentLengthCheck(arguments,2,o),arguments.length===3&&!qje(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=ul.converters.USVString(e,o,"name"),r=qje(r)?ul.converters.Blob(r,o,"value",{strict:!1}):ul.converters.USVString(r,o,"value"),n=arguments.length===3?ul.converters.USVString(n,o,"filename"):void 0;let s=B6t(e,r,n);this[fy].push(s)}delete(e){ul.brandCheck(this,t);let r="FormData.delete";ul.argumentLengthCheck(arguments,1,r),e=ul.converters.USVString(e,r,"name"),this[fy]=this[fy].filter(n=>n.name!==e)}get(e){ul.brandCheck(this,t);let r="FormData.get";ul.argumentLengthCheck(arguments,1,r),e=ul.converters.USVString(e,r,"name");let n=this[fy].findIndex(o=>o.name===e);return n===-1?null:this[fy][n].value}getAll(e){ul.brandCheck(this,t);let r="FormData.getAll";return ul.argumentLengthCheck(arguments,1,r),e=ul.converters.USVString(e,r,"name"),this[fy].filter(n=>n.name===e).map(n=>n.value)}has(e){ul.brandCheck(this,t);let r="FormData.has";return ul.argumentLengthCheck(arguments,1,r),e=ul.converters.USVString(e,r,"name"),this[fy].findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){ul.brandCheck(this,t);let o="FormData.set";if(ul.argumentLengthCheck(arguments,2,o),arguments.length===3&&!qje(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=ul.converters.USVString(e,o,"name"),r=qje(r)?ul.converters.Blob(r,o,"name",{strict:!1}):ul.converters.USVString(r,o,"name"),n=arguments.length===3?ul.converters.USVString(n,o,"name"):void 0;let s=B6t(e,r,n),c=this[fy].findIndex(l=>l.name===e);c!==-1?this[fy]=[...this[fy].slice(0,c),s,...this[fy].slice(c+1).filter(l=>l.name!==e)]:this[fy].push(s)}[Lsn.inspect.custom](e,r){let n=this[fy].reduce((s,c)=>(s[c.name]?Array.isArray(s[c.name])?s[c.name].push(c.value):s[c.name]=[s[c.name],c.value]:s[c.name]=c.value,s),{__proto__:null});r.depth??=e,r.colors??=!0;let o=Lsn.formatWithOptions(r,n);return`FormData ${o.slice(o.indexOf("]")+2)}`}};vSo("FormData",xCe,fy,"name","value");Object.defineProperties(xCe.prototype,{append:Yie,delete:Yie,get:Yie,getAll:Yie,has:Yie,set:Yie,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function B6t(t,e,r){if(typeof e!="string"){if(bSo(e)||(e=e instanceof Blob?new Fsn([e],"blob",{type:e.type}):new Bsn(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=e instanceof Usn?new Fsn([e],r,n):new Bsn(e,r,n)}}return{name:t,value:e}}a(B6t,"makeEntry");Qsn.exports={FormData:xCe,makeEntry:B6t}});var Vsn=T((bMu,$sn)=>{"use strict";f();var{isUSVString:qsn,bufferToLowerCasedHeaderName:TSo}=Xo(),{utf8DecodeBytes:SSo}=rv(),{HTTP_TOKEN_CODEPOINTS:ISo,isomorphicDecode:Gsn}=p_(),{isFileLike:xSo}=O6t(),{makeEntry:wSo}=wCe(),Gje=require("node:assert"),{File:RSo}=require("node:buffer"),PSo=globalThis.File??RSo,kSo=Buffer.from('form-data; name="'),Hsn=Buffer.from("; filename"),DSo=Buffer.from("--"),NSo=Buffer.from(`--\r +`);function MSo(t){for(let e=0;e70)return!1;for(let r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}a(OSo,"validateBoundary");function BSo(t,e){Gje(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let c=t.length;for(;t[c-1]===10&&t[c-2]===13;)c-=2;for(c!==t.length&&(t=t.subarray(0,c));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&Hje(t,DSo,s)||s.position===t.length-4&&Hje(t,NSo,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let l=LSo(t,s);if(l==="failure")return"failure";let{name:u,filename:d,contentType:p,encoding:h}=l;s.position+=2;let m;{let A=t.indexOf(n.subarray(2),s.position);if(A===-1)return"failure";m=t.subarray(s.position,A-4),s.position+=m.length,h==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let g;d!==null?(p??="text/plain",MSo(p)||(p=""),g=new PSo([m],d,{type:p})):g=SSo(Buffer.from(m)),Gje(qsn(u)),Gje(typeof g=="string"&&qsn(g)||xSo(g)),o.push(wSo(u,g,d))}}a(BSo,"multipartFormDataParser");function LSo(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:o,encoding:s};let c=Kie(l=>l!==10&&l!==13&&l!==58,t,e);if(c=L6t(c,!0,!0,l=>l===9||l===32),!ISo.test(c.toString())||t[e.position]!==58)return"failure";switch(e.position++,Kie(l=>l===32||l===9,t,e),TSo(c)){case"content-disposition":{if(r=n=null,!Hje(t,kSo,e)||(e.position+=17,r=jsn(t,e),r===null))return"failure";if(Hje(t,Hsn,e)){let l=e.position+Hsn.length;if(t[l]===42&&(e.position+=1,l+=1),t[l]!==61||t[l+1]!==34||(e.position+=12,n=jsn(t,e),n===null))return"failure"}break}case"content-type":{let l=Kie(u=>u!==10&&u!==13,t,e);l=L6t(l,!1,!0,u=>u===9||u===32),o=Gsn(l);break}case"content-transfer-encoding":{let l=Kie(u=>u!==10&&u!==13,t,e);l=L6t(l,!1,!0,u=>u===9||u===32),s=Gsn(l);break}default:Kie(l=>l!==10&&l!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}a(LSo,"parseMultipartFormDataHeaders");function jsn(t,e){Gje(t[e.position-1]===34);let r=Kie(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,` +`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}a(jsn,"parseMultipartFormDataName");function Kie(t,e,r){let n=r.position;for(;n0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}a(L6t,"removeChars");function Hje(t,e,r){if(t.length{"use strict";f();var RCe=Xo(),{ReadableStreamFrom:FSo,isBlobLike:Wsn,isReadableStreamLike:USo,readableStreamClose:QSo,createDeferredPromise:qSo,fullyReadBody:GSo,extractMimeType:HSo,utf8DecodeBytes:Ksn}=rv(),{FormData:zsn}=wCe(),{kState:Xie}=MF(),{webidl:jSo}=Im(),{Blob:$So}=require("node:buffer"),F6t=require("node:assert"),{isErrored:Jsn,isDisturbed:VSo}=require("node:stream"),{isArrayBuffer:WSo}=require("node:util/types"),{serializeAMimeType:zSo}=p_(),{multipartFormDataParser:YSo}=Vsn(),U6t;try{let t=require("node:crypto");U6t=a(e=>t.randomInt(0,e),"random")}catch{U6t=a(t=>Math.floor(Math.random(t)),"random")}var jje=new TextEncoder;function KSo(){}a(KSo,"noop");var Xsn=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Zsn;Xsn&&(Zsn=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!VSo(e)&&!Jsn(e)&&e.cancel("Response object has been garbage collected").catch(KSo)}));function ean(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Wsn(t)?r=t.stream():r=new ReadableStream({async pull(u){let d=typeof o=="string"?jje.encode(o):o;d.byteLength&&u.enqueue(d),queueMicrotask(()=>QSo(u))},start(){},type:"bytes"}),F6t(USo(r));let n=null,o=null,s=null,c=null;if(typeof t=="string")o=t,c="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)o=t.toString(),c="application/x-www-form-urlencoded;charset=UTF-8";else if(WSo(t))o=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(RCe.isFormDataLike(t)){let u=`----formdata-undici-0${`${U6t(1e11)}`.padStart(11,"0")}`,d=`--${u}\r Content-Disposition: form-data`;let p=a(E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),h=a(E=>E.replace(/\r?\n|\r/g,`\r -`),"normalizeLinefeeds"),m=[],g=new Uint8Array([13,10]);s=0;let A=!1;for(let[E,_]of t)if(typeof _=="string"){let v=B$e.encode(d+`; name="${p(h(E))}"\r +`),"normalizeLinefeeds"),m=[],g=new Uint8Array([13,10]);s=0;let A=!1;for(let[E,_]of t)if(typeof _=="string"){let v=jje.encode(d+`; name="${p(h(E))}"\r \r ${h(_)}\r -`);m.push(v),s+=v.byteLength}else{let v=B$e.encode(`${d}; name="${p(h(E))}"`+(_.name?`; filename="${p(_.name)}"`:"")+`\r +`);m.push(v),s+=v.byteLength}else{let v=jje.encode(`${d}; name="${p(h(E))}"`+(_.name?`; filename="${p(_.name)}"`:"")+`\r Content-Type: ${_.type||"application/octet-stream"}\r \r -`);m.push(v,_,g),typeof _.size=="number"?s+=v.byteLength+_.size+g.byteLength:A=!0}let y=B$e.encode(`--${u}--\r -`);m.push(y),s+=y.byteLength,A&&(s=null),o=t,n=a(async function*(){for(let E of m)E.stream?yield*E.stream():yield E},"action"),c=`multipart/form-data; boundary=${u}`}else if(zon(t))o=t,s=t.size,t.type&&(c=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(N1e.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Lbo(t)}if((typeof o=="string"||N1e.isBuffer(o))&&(s=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(d){let{value:p,done:h}=await u.next();if(h)queueMicrotask(()=>{d.close(),d.byobRequest?.respond(0)});else if(!Xon(r)){let m=new Uint8Array(p);m.byteLength&&d.enqueue(m)}return d.desiredSize>0},async cancel(d){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:s},c]}a(tsn,"extractBody");function Kbo(t,e=!1){return t instanceof ReadableStream&&(y6t(!N1e.isDisturbed(t),"The body has already been consumed."),y6t(!t.locked,"The stream is locked.")),tsn(t,e)}a(Kbo,"safelyExtractBody");function Jbo(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}a(Jbo,"cloneBody");function Xbo(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}a(Xbo,"throwIfAborted");function Zbo(t){return{blob(){return Loe(this,r=>{let n=Kon(this);return n===null?n="":n&&(n=Wbo(n)),new jbo([r],{type:n})},t)},arrayBuffer(){return Loe(this,r=>new Uint8Array(r).buffer,t)},text(){return Loe(this,Jon,t)},json(){return Loe(this,tTo,t)},formData(){return Loe(this,r=>{let n=Kon(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=zbo(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new Yon;return s[Foe]=o,s}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),s=new Yon;for(let[c,l]of o)s.append(c,l);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Loe(this,r=>new Uint8Array(r),t)}}}a(Zbo,"bodyMixinMethods");function eTo(t){Object.assign(t.prototype,Zbo(t))}a(eTo,"mixinBody");async function Loe(t,e,r){if(Hbo.brandCheck(t,r),rsn(t))throw new TypeError("Body is unusable: Body has already been read");Xbo(t[Foe]);let n=Qbo(),o=a(c=>n.reject(c),"errorSteps"),s=a(c=>{try{n.resolve(e(c))}catch(l){o(l)}},"successSteps");return t[Foe].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await qbo(t[Foe].body,s,o),n.promise)}a(Loe,"consumeBody");function rsn(t){let e=t[Foe].body;return e!=null&&(e.stream.locked||N1e.isDisturbed(e.stream))}a(rsn,"bodyUnusable");function tTo(t){return JSON.parse(Jon(t))}a(tTo,"parseJSONFromBytes");function Kon(t){let e=t[Foe].headersList,r=Gbo(e);return r==="failure"?null:r}a(Kon,"bodyMimeType");nsn.exports={extractBody:tsn,safelyExtractBody:Kbo,cloneBody:Jbo,mixinBody:eTo,streamRegistry:esn,hasFinalizationRegistry:Zon,bodyUnusable:rsn}});var hsn=T((yDu,psn)=>{"use strict";f();var hi=require("node:assert"),Vi=rs(),{channels:isn}=Ioe(),C6t=t6t(),{RequestContentLengthMismatchError:PV,ResponseContentLengthMismatchError:rTo,RequestAbortedError:usn,HeadersTimeoutError:nTo,HeadersOverflowError:iTo,SocketError:G$e,InformationalError:Qoe,BodyTimeoutError:oTo,HTTPParserError:sTo,ResponseExceededMaxSizeError:aTo}=xa(),{kUrl:dsn,kReset:IC,kClient:T6t,kParser:Gd,kBlocking:O1e,kRunning:rA,kPending:cTo,kSize:osn,kWriting:l9,kQueue:gw,kNoRef:D1e,kKeepAliveDefaultTimeout:lTo,kHostHeader:uTo,kPendingIdx:dTo,kRunningIdx:iS,kError:oS,kPipelining:Q$e,kSocket:qoe,kKeepAliveTimeoutValue:H$e,kMaxHeadersSize:_6t,kKeepAliveMaxTimeout:fTo,kKeepAliveTimeoutThreshold:pTo,kHeadersTimeout:hTo,kBodyTimeout:mTo,kStrictContentLength:S6t,kMaxRequests:ssn,kCounter:gTo,kMaxResponseSize:ATo,kOnError:yTo,kResume:c9,kHTTPContext:fsn}=Du(),tN=eon(),ETo=Buffer.alloc(0),L$e=Buffer[Symbol.species],F$e=Vi.addListener,CTo=Vi.removeAllListeners,v6t;async function _To(){let t=process.env.JEST_WORKER_ID?i6t():void 0,e;try{e=await WebAssembly.compile(non())}catch{e=await WebAssembly.compile(t||i6t())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:a((r,n,o)=>0,"wasm_on_url"),wasm_on_status:a((r,n,o)=>{hi(Tp.ptr===r);let s=n-nN+rN.byteOffset;return Tp.onStatus(new L$e(rN.buffer,s,o))||0},"wasm_on_status"),wasm_on_message_begin:a(r=>(hi(Tp.ptr===r),Tp.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:a((r,n,o)=>{hi(Tp.ptr===r);let s=n-nN+rN.byteOffset;return Tp.onHeaderField(new L$e(rN.buffer,s,o))||0},"wasm_on_header_field"),wasm_on_header_value:a((r,n,o)=>{hi(Tp.ptr===r);let s=n-nN+rN.byteOffset;return Tp.onHeaderValue(new L$e(rN.buffer,s,o))||0},"wasm_on_header_value"),wasm_on_headers_complete:a((r,n,o,s)=>(hi(Tp.ptr===r),Tp.onHeadersComplete(n,!!o,!!s)||0),"wasm_on_headers_complete"),wasm_on_body:a((r,n,o)=>{hi(Tp.ptr===r);let s=n-nN+rN.byteOffset;return Tp.onBody(new L$e(rN.buffer,s,o))||0},"wasm_on_body"),wasm_on_message_complete:a(r=>(hi(Tp.ptr===r),Tp.onMessageComplete()||0),"wasm_on_message_complete")}})}a(_To,"lazyllhttp");var b6t=null,I6t=_To();I6t.catch();var Tp=null,rN=null,U$e=0,nN=null,vTo=0,M1e=1,Goe=2|M1e,q$e=4|M1e,x6t=8|vTo,w6t=class{static{a(this,"Parser")}constructor(e,r,{exports:n}){hi(Number.isFinite(e[_6t])&&e[_6t]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(tN.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[_6t],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[ATo]}setTimeout(e,r){e!==this.timeoutValue||r&M1e^this.timeoutType&M1e?(this.timeout&&(C6t.clearTimeout(this.timeout),this.timeout=null),e&&(r&M1e?this.timeout=C6t.setFastTimeout(asn,e,new WeakRef(this)):(this.timeout=setTimeout(asn,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(hi(this.ptr!=null),hi(Tp==null),this.llhttp.llhttp_resume(this.ptr),hi(this.timeoutType===q$e),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||ETo),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){hi(this.ptr!=null),hi(Tp==null),hi(!this.paused);let{socket:r,llhttp:n}=this;e.length>U$e&&(nN&&n.free(nN),U$e=Math.ceil(e.length/4096)*4096,nN=n.malloc(U$e)),new Uint8Array(n.memory.buffer,nN,U$e).set(e);try{let o;try{rN=e,Tp=this,o=n.llhttp_execute(this.ptr,nN,e.length)}catch(c){throw c}finally{Tp=null,rN=null}let s=n.llhttp_get_error_pos(this.ptr)-nN;if(o===tN.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(o===tN.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(o!==tN.ERROR.OK){let c=n.llhttp_get_error_reason(this.ptr),l="";if(c){let u=new Uint8Array(n.memory.buffer,c).indexOf(0);l="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,c,u).toString()+")"}throw new sTo(l,tN.ERROR[o],e.slice(s))}}catch(o){Vi.destroy(r,o)}}destroy(){hi(this.ptr!=null),hi(Tp==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&C6t.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;let n=r[gw][r[iS]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let r=this.headers.length;(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length)}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let o=Vi.bufferToLowerCasedHeaderName(n);o==="keep-alive"?this.keepAlive+=e.toString():o==="connection"&&(this.connection+=e.toString())}else n.length===14&&Vi.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&Vi.destroy(this.socket,new iTo)}onUpgrade(e){let{upgrade:r,client:n,socket:o,headers:s,statusCode:c}=this;hi(r),hi(n[qoe]===o),hi(!o.destroyed),hi(!this.paused),hi((s.length&1)===0);let l=n[gw][n[iS]];hi(l),hi(l.upgrade||l.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,o.unshift(e),o[Gd].destroy(),o[Gd]=null,o[T6t]=null,o[oS]=null,CTo(o),n[qoe]=null,n[fsn]=null,n[gw][n[iS]++]=null,n.emit("disconnect",n[dsn],[n],new Qoe("upgrade"));try{l.onUpgrade(c,s,o)}catch(u){Vi.destroy(o,u)}n[c9]()}onHeadersComplete(e,r,n){let{client:o,socket:s,headers:c,statusText:l}=this;if(s.destroyed)return-1;let u=o[gw][o[iS]];if(!u)return-1;if(hi(!this.upgrade),hi(this.statusCode<200),e===100)return Vi.destroy(s,new G$e("bad response",Vi.getSocketInfo(s))),-1;if(r&&!u.upgrade)return Vi.destroy(s,new G$e("bad upgrade",Vi.getSocketInfo(s))),-1;if(hi(this.timeoutType===Goe),this.statusCode=e,this.shouldKeepAlive=n||u.method==="HEAD"&&!s[IC]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let p=u.bodyTimeout!=null?u.bodyTimeout:o[mTo];this.setTimeout(p,q$e)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(u.method==="CONNECT")return hi(o[rA]===1),this.upgrade=!0,2;if(r)return hi(o[rA]===1),this.upgrade=!0,2;if(hi((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&o[Q$e]){let p=this.keepAlive?Vi.parseKeepAliveTimeout(this.keepAlive):null;if(p!=null){let h=Math.min(p-o[pTo],o[fTo]);h<=0?s[IC]=!0:o[H$e]=h}else o[H$e]=o[lTo]}else s[IC]=!0;let d=u.onHeaders(e,c,this.resume,l)===!1;return u.aborted?-1:u.method==="HEAD"||e<200?1:(s[O1e]&&(s[O1e]=!1,o[c9]()),d?tN.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:o,maxResponseSize:s}=this;if(n.destroyed)return-1;let c=r[gw][r[iS]];if(hi(c),hi(this.timeoutType===q$e),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),hi(o>=200),s>-1&&this.bytesRead+e.length>s)return Vi.destroy(n,new aTo),-1;if(this.bytesRead+=e.length,c.onData(e)===!1)return tN.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:o,headers:s,contentLength:c,bytesRead:l,shouldKeepAlive:u}=this;if(r.destroyed&&(!n||u))return-1;if(o)return;hi(n>=100),hi((this.headers.length&1)===0);let d=e[gw][e[iS]];if(hi(d),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,!(n<200)){if(d.method!=="HEAD"&&c&&l!==parseInt(c,10))return Vi.destroy(r,new rTo),-1;if(d.onComplete(s),e[gw][e[iS]++]=null,r[l9])return hi(e[rA]===0),Vi.destroy(r,new Qoe("reset")),tN.ERROR.PAUSED;if(u){if(r[IC]&&e[rA]===0)return Vi.destroy(r,new Qoe("reset")),tN.ERROR.PAUSED;e[Q$e]==null||e[Q$e]===1?setImmediate(()=>e[c9]()):e[c9]()}else return Vi.destroy(r,new Qoe("reset")),tN.ERROR.PAUSED}}};function asn(t){let{socket:e,timeoutType:r,client:n,paused:o}=t.deref();r===Goe?(!e[l9]||e.writableNeedDrain||n[rA]>1)&&(hi(!o,"cannot be paused while waiting for headers"),Vi.destroy(e,new nTo)):r===q$e?o||Vi.destroy(e,new oTo):r===x6t&&(hi(n[rA]===0&&n[H$e]),Vi.destroy(e,new Qoe("socket idle timeout")))}a(asn,"onParserTimeout");async function bTo(t,e){t[qoe]=e,b6t||(b6t=await I6t,I6t=null),e[D1e]=!1,e[l9]=!1,e[IC]=!1,e[O1e]=!1,e[Gd]=new w6t(t,e,b6t),F$e(e,"error",function(n){hi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let o=this[Gd];if(n.code==="ECONNRESET"&&o.statusCode&&!o.shouldKeepAlive){o.onMessageComplete();return}this[oS]=n,this[T6t][yTo](n)}),F$e(e,"readable",function(){let n=this[Gd];n&&n.readMore()}),F$e(e,"end",function(){let n=this[Gd];if(n.statusCode&&!n.shouldKeepAlive){n.onMessageComplete();return}Vi.destroy(this,new G$e("other side closed",Vi.getSocketInfo(this)))}),F$e(e,"close",function(){let n=this[T6t],o=this[Gd];o&&(!this[oS]&&o.statusCode&&!o.shouldKeepAlive&&o.onMessageComplete(),this[Gd].destroy(),this[Gd]=null);let s=this[oS]||new G$e("closed",Vi.getSocketInfo(this));if(n[qoe]=null,n[fsn]=null,n.destroyed){hi(n[cTo]===0);let c=n[gw].splice(n[iS]);for(let l=0;l0&&s.code!=="UND_ERR_INFO"){let c=n[gw][n[iS]];n[gw][n[iS]++]=null,Vi.errorRequest(n,c,s)}n[dTo]=n[iS],hi(n[rA]===0),n.emit("disconnect",n[dsn],[n],s),n[c9]()});let r=!1;return e.on("close",()=>{r=!0}),{version:"h1",defaultPipelining:1,write(...n){return ITo(t,...n)},resume(){TTo(t)},destroy(n,o){r?queueMicrotask(o):e.destroy(n).on("close",o)},get destroyed(){return e.destroyed},busy(n){return!!(e[l9]||e[IC]||e[O1e]||n&&(t[rA]>0&&!n.idempotent||t[rA]>0&&(n.upgrade||n.method==="CONNECT")||t[rA]>0&&Vi.bodyLength(n.body)!==0&&(Vi.isStream(n.body)||Vi.isAsyncIterable(n.body)||Vi.isFormDataLike(n.body))))}}}a(bTo,"connectH1");function TTo(t){let e=t[qoe];if(e&&!e.destroyed){if(t[osn]===0?!e[D1e]&&e.unref&&(e.unref(),e[D1e]=!0):e[D1e]&&e.ref&&(e.ref(),e[D1e]=!1),t[osn]===0)e[Gd].timeoutType!==x6t&&e[Gd].setTimeout(t[H$e],x6t);else if(t[rA]>0&&e[Gd].statusCode<200&&e[Gd].timeoutType!==Goe){let r=t[gw][t[iS]],n=r.headersTimeout!=null?r.headersTimeout:t[hTo];e[Gd].setTimeout(n,Goe)}}}a(TTo,"resumeH1");function STo(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}a(STo,"shouldSendContentLength");function ITo(t,e){let{method:r,path:n,host:o,upgrade:s,blocking:c,reset:l}=e,{body:u,headers:d,contentLength:p}=e,h=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(Vi.isFormDataLike(u)){v6t||(v6t=Uoe().extractBody);let[E,_]=v6t(u);e.contentType==null&&d.push("content-type",_),u=E.stream,p=E.length}else Vi.isBlobLike(u)&&e.contentType==null&&u.type&&d.push("content-type",u.type);u&&typeof u.read=="function"&&u.read(0);let m=Vi.bodyLength(u);if(p=m??p,p===null&&(p=e.contentLength),p===0&&!h&&(p=null),STo(r)&&p>0&&e.contentLength!==null&&e.contentLength!==p){if(t[S6t])return Vi.errorRequest(t,e,new PV),!1;process.emitWarning(new PV)}let g=t[qoe],A=a(E=>{e.aborted||e.completed||(Vi.errorRequest(t,e,E||new usn),Vi.destroy(u),Vi.destroy(g,new Qoe("aborted")))},"abort");try{e.onConnect(A)}catch(E){Vi.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(g[IC]=!0),(s||r==="CONNECT")&&(g[IC]=!0),l!=null&&(g[IC]=l),t[ssn]&&g[gTo]++>=t[ssn]&&(g[IC]=!0),c&&(g[O1e]=!0);let y=`${r} ${n} HTTP/1.1\r +`);m.push(v,_,g),typeof _.size=="number"?s+=v.byteLength+_.size+g.byteLength:A=!0}let y=jje.encode(`--${u}--\r +`);m.push(y),s+=y.byteLength,A&&(s=null),o=t,n=a(async function*(){for(let E of m)E.stream?yield*E.stream():yield E},"action"),c=`multipart/form-data; boundary=${u}`}else if(Wsn(t))o=t,s=t.size,t.type&&(c=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(RCe.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:FSo(t)}if((typeof o=="string"||RCe.isBuffer(o))&&(s=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(d){let{value:p,done:h}=await u.next();if(h)queueMicrotask(()=>{d.close(),d.byobRequest?.respond(0)});else if(!Jsn(r)){let m=new Uint8Array(p);m.byteLength&&d.enqueue(m)}return d.desiredSize>0},async cancel(d){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:s},c]}a(ean,"extractBody");function JSo(t,e=!1){return t instanceof ReadableStream&&(F6t(!RCe.isDisturbed(t),"The body has already been consumed."),F6t(!t.locked,"The stream is locked.")),ean(t,e)}a(JSo,"safelyExtractBody");function XSo(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}a(XSo,"cloneBody");function ZSo(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}a(ZSo,"throwIfAborted");function eIo(t){return{blob(){return Jie(this,r=>{let n=Ysn(this);return n===null?n="":n&&(n=zSo(n)),new $So([r],{type:n})},t)},arrayBuffer(){return Jie(this,r=>new Uint8Array(r).buffer,t)},text(){return Jie(this,Ksn,t)},json(){return Jie(this,rIo,t)},formData(){return Jie(this,r=>{let n=Ysn(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=YSo(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new zsn;return s[Xie]=o,s}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),s=new zsn;for(let[c,l]of o)s.append(c,l);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Jie(this,r=>new Uint8Array(r),t)}}}a(eIo,"bodyMixinMethods");function tIo(t){Object.assign(t.prototype,eIo(t))}a(tIo,"mixinBody");async function Jie(t,e,r){if(jSo.brandCheck(t,r),tan(t))throw new TypeError("Body is unusable: Body has already been read");ZSo(t[Xie]);let n=qSo(),o=a(c=>n.reject(c),"errorSteps"),s=a(c=>{try{n.resolve(e(c))}catch(l){o(l)}},"successSteps");return t[Xie].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await GSo(t[Xie].body,s,o),n.promise)}a(Jie,"consumeBody");function tan(t){let e=t[Xie].body;return e!=null&&(e.stream.locked||RCe.isDisturbed(e.stream))}a(tan,"bodyUnusable");function rIo(t){return JSON.parse(Ksn(t))}a(rIo,"parseJSONFromBytes");function Ysn(t){let e=t[Xie].headersList,r=HSo(e);return r==="failure"?null:r}a(Ysn,"bodyMimeType");ran.exports={extractBody:ean,safelyExtractBody:JSo,cloneBody:XSo,mixinBody:tIo,streamRegistry:Zsn,hasFinalizationRegistry:Xsn,bodyUnusable:tan}});var pan=T((RMu,fan)=>{"use strict";f();var hi=require("node:assert"),qi=Xo(),{channels:nan}=Qie(),Q6t=C6t(),{RequestContentLengthMismatchError:L$,ResponseContentLengthMismatchError:nIo,RequestAbortedError:lan,HeadersTimeoutError:iIo,HeadersOverflowError:oIo,SocketError:Kje,InformationalError:eoe,BodyTimeoutError:sIo,HTTPParserError:aIo,ResponseExceededMaxSizeError:cIo}=Ca(),{kUrl:uan,kReset:h_,kClient:j6t,kParser:Nd,kBlocking:DCe,kRunning:zg,kPending:lIo,kSize:ian,kWriting:BF,kQueue:ow,kNoRef:PCe,kKeepAliveDefaultTimeout:uIo,kHostHeader:dIo,kPendingIdx:fIo,kRunningIdx:VT,kError:WT,kPipelining:zje,kSocket:toe,kKeepAliveTimeoutValue:Jje,kMaxHeadersSize:q6t,kKeepAliveMaxTimeout:pIo,kKeepAliveTimeoutThreshold:hIo,kHeadersTimeout:mIo,kBodyTimeout:gIo,kStrictContentLength:$6t,kMaxRequests:oan,kCounter:AIo,kMaxResponseSize:yIo,kOnError:EIo,kResume:OF,kHTTPContext:dan}=bu(),Hk=Zon(),_Io=Buffer.alloc(0),$je=Buffer[Symbol.species],Vje=qi.addListener,CIo=qi.removeAllListeners,G6t;async function vIo(){let t=process.env.JEST_WORKER_ID?T6t():void 0,e;try{e=await WebAssembly.compile(rsn())}catch{e=await WebAssembly.compile(t||T6t())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:a((r,n,o)=>0,"wasm_on_url"),wasm_on_status:a((r,n,o)=>{hi(yp.ptr===r);let s=n-$k+jk.byteOffset;return yp.onStatus(new $je(jk.buffer,s,o))||0},"wasm_on_status"),wasm_on_message_begin:a(r=>(hi(yp.ptr===r),yp.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:a((r,n,o)=>{hi(yp.ptr===r);let s=n-$k+jk.byteOffset;return yp.onHeaderField(new $je(jk.buffer,s,o))||0},"wasm_on_header_field"),wasm_on_header_value:a((r,n,o)=>{hi(yp.ptr===r);let s=n-$k+jk.byteOffset;return yp.onHeaderValue(new $je(jk.buffer,s,o))||0},"wasm_on_header_value"),wasm_on_headers_complete:a((r,n,o,s)=>(hi(yp.ptr===r),yp.onHeadersComplete(n,!!o,!!s)||0),"wasm_on_headers_complete"),wasm_on_body:a((r,n,o)=>{hi(yp.ptr===r);let s=n-$k+jk.byteOffset;return yp.onBody(new $je(jk.buffer,s,o))||0},"wasm_on_body"),wasm_on_message_complete:a(r=>(hi(yp.ptr===r),yp.onMessageComplete()||0),"wasm_on_message_complete")}})}a(vIo,"lazyllhttp");var H6t=null,V6t=vIo();V6t.catch();var yp=null,jk=null,Wje=0,$k=null,bIo=0,kCe=1,roe=2|kCe,Yje=4|kCe,W6t=8|bIo,z6t=class{static{a(this,"Parser")}constructor(e,r,{exports:n}){hi(Number.isFinite(e[q6t])&&e[q6t]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Hk.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[q6t],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[yIo]}setTimeout(e,r){e!==this.timeoutValue||r&kCe^this.timeoutType&kCe?(this.timeout&&(Q6t.clearTimeout(this.timeout),this.timeout=null),e&&(r&kCe?this.timeout=Q6t.setFastTimeout(san,e,new WeakRef(this)):(this.timeout=setTimeout(san,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(hi(this.ptr!=null),hi(yp==null),this.llhttp.llhttp_resume(this.ptr),hi(this.timeoutType===Yje),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||_Io),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){hi(this.ptr!=null),hi(yp==null),hi(!this.paused);let{socket:r,llhttp:n}=this;e.length>Wje&&($k&&n.free($k),Wje=Math.ceil(e.length/4096)*4096,$k=n.malloc(Wje)),new Uint8Array(n.memory.buffer,$k,Wje).set(e);try{let o;try{jk=e,yp=this,o=n.llhttp_execute(this.ptr,$k,e.length)}catch(c){throw c}finally{yp=null,jk=null}let s=n.llhttp_get_error_pos(this.ptr)-$k;if(o===Hk.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(o===Hk.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(o!==Hk.ERROR.OK){let c=n.llhttp_get_error_reason(this.ptr),l="";if(c){let u=new Uint8Array(n.memory.buffer,c).indexOf(0);l="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,c,u).toString()+")"}throw new aIo(l,Hk.ERROR[o],e.slice(s))}}catch(o){qi.destroy(r,o)}}destroy(){hi(this.ptr!=null),hi(yp==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&Q6t.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;let n=r[ow][r[VT]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let r=this.headers.length;(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length)}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let o=qi.bufferToLowerCasedHeaderName(n);o==="keep-alive"?this.keepAlive+=e.toString():o==="connection"&&(this.connection+=e.toString())}else n.length===14&&qi.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&qi.destroy(this.socket,new oIo)}onUpgrade(e){let{upgrade:r,client:n,socket:o,headers:s,statusCode:c}=this;hi(r),hi(n[toe]===o),hi(!o.destroyed),hi(!this.paused),hi((s.length&1)===0);let l=n[ow][n[VT]];hi(l),hi(l.upgrade||l.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,o.unshift(e),o[Nd].destroy(),o[Nd]=null,o[j6t]=null,o[WT]=null,CIo(o),n[toe]=null,n[dan]=null,n[ow][n[VT]++]=null,n.emit("disconnect",n[uan],[n],new eoe("upgrade"));try{l.onUpgrade(c,s,o)}catch(u){qi.destroy(o,u)}n[OF]()}onHeadersComplete(e,r,n){let{client:o,socket:s,headers:c,statusText:l}=this;if(s.destroyed)return-1;let u=o[ow][o[VT]];if(!u)return-1;if(hi(!this.upgrade),hi(this.statusCode<200),e===100)return qi.destroy(s,new Kje("bad response",qi.getSocketInfo(s))),-1;if(r&&!u.upgrade)return qi.destroy(s,new Kje("bad upgrade",qi.getSocketInfo(s))),-1;if(hi(this.timeoutType===roe),this.statusCode=e,this.shouldKeepAlive=n||u.method==="HEAD"&&!s[h_]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let p=u.bodyTimeout!=null?u.bodyTimeout:o[gIo];this.setTimeout(p,Yje)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(u.method==="CONNECT")return hi(o[zg]===1),this.upgrade=!0,2;if(r)return hi(o[zg]===1),this.upgrade=!0,2;if(hi((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&o[zje]){let p=this.keepAlive?qi.parseKeepAliveTimeout(this.keepAlive):null;if(p!=null){let h=Math.min(p-o[hIo],o[pIo]);h<=0?s[h_]=!0:o[Jje]=h}else o[Jje]=o[uIo]}else s[h_]=!0;let d=u.onHeaders(e,c,this.resume,l)===!1;return u.aborted?-1:u.method==="HEAD"||e<200?1:(s[DCe]&&(s[DCe]=!1,o[OF]()),d?Hk.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:o,maxResponseSize:s}=this;if(n.destroyed)return-1;let c=r[ow][r[VT]];if(hi(c),hi(this.timeoutType===Yje),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),hi(o>=200),s>-1&&this.bytesRead+e.length>s)return qi.destroy(n,new cIo),-1;if(this.bytesRead+=e.length,c.onData(e)===!1)return Hk.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:o,headers:s,contentLength:c,bytesRead:l,shouldKeepAlive:u}=this;if(r.destroyed&&(!n||u))return-1;if(o)return;hi(n>=100),hi((this.headers.length&1)===0);let d=e[ow][e[VT]];if(hi(d),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,!(n<200)){if(d.method!=="HEAD"&&c&&l!==parseInt(c,10))return qi.destroy(r,new nIo),-1;if(d.onComplete(s),e[ow][e[VT]++]=null,r[BF])return hi(e[zg]===0),qi.destroy(r,new eoe("reset")),Hk.ERROR.PAUSED;if(u){if(r[h_]&&e[zg]===0)return qi.destroy(r,new eoe("reset")),Hk.ERROR.PAUSED;e[zje]==null||e[zje]===1?setImmediate(()=>e[OF]()):e[OF]()}else return qi.destroy(r,new eoe("reset")),Hk.ERROR.PAUSED}}};function san(t){let{socket:e,timeoutType:r,client:n,paused:o}=t.deref();r===roe?(!e[BF]||e.writableNeedDrain||n[zg]>1)&&(hi(!o,"cannot be paused while waiting for headers"),qi.destroy(e,new iIo)):r===Yje?o||qi.destroy(e,new sIo):r===W6t&&(hi(n[zg]===0&&n[Jje]),qi.destroy(e,new eoe("socket idle timeout")))}a(san,"onParserTimeout");async function TIo(t,e){t[toe]=e,H6t||(H6t=await V6t,V6t=null),e[PCe]=!1,e[BF]=!1,e[h_]=!1,e[DCe]=!1,e[Nd]=new z6t(t,e,H6t),Vje(e,"error",function(n){hi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let o=this[Nd];if(n.code==="ECONNRESET"&&o.statusCode&&!o.shouldKeepAlive){o.onMessageComplete();return}this[WT]=n,this[j6t][EIo](n)}),Vje(e,"readable",function(){let n=this[Nd];n&&n.readMore()}),Vje(e,"end",function(){let n=this[Nd];if(n.statusCode&&!n.shouldKeepAlive){n.onMessageComplete();return}qi.destroy(this,new Kje("other side closed",qi.getSocketInfo(this)))}),Vje(e,"close",function(){let n=this[j6t],o=this[Nd];o&&(!this[WT]&&o.statusCode&&!o.shouldKeepAlive&&o.onMessageComplete(),this[Nd].destroy(),this[Nd]=null);let s=this[WT]||new Kje("closed",qi.getSocketInfo(this));if(n[toe]=null,n[dan]=null,n.destroyed){hi(n[lIo]===0);let c=n[ow].splice(n[VT]);for(let l=0;l0&&s.code!=="UND_ERR_INFO"){let c=n[ow][n[VT]];n[ow][n[VT]++]=null,qi.errorRequest(n,c,s)}n[fIo]=n[VT],hi(n[zg]===0),n.emit("disconnect",n[uan],[n],s),n[OF]()});let r=!1;return e.on("close",()=>{r=!0}),{version:"h1",defaultPipelining:1,write(...n){return xIo(t,...n)},resume(){SIo(t)},destroy(n,o){r?queueMicrotask(o):e.destroy(n).on("close",o)},get destroyed(){return e.destroyed},busy(n){return!!(e[BF]||e[h_]||e[DCe]||n&&(t[zg]>0&&!n.idempotent||t[zg]>0&&(n.upgrade||n.method==="CONNECT")||t[zg]>0&&qi.bodyLength(n.body)!==0&&(qi.isStream(n.body)||qi.isAsyncIterable(n.body)||qi.isFormDataLike(n.body))))}}}a(TIo,"connectH1");function SIo(t){let e=t[toe];if(e&&!e.destroyed){if(t[ian]===0?!e[PCe]&&e.unref&&(e.unref(),e[PCe]=!0):e[PCe]&&e.ref&&(e.ref(),e[PCe]=!1),t[ian]===0)e[Nd].timeoutType!==W6t&&e[Nd].setTimeout(t[Jje],W6t);else if(t[zg]>0&&e[Nd].statusCode<200&&e[Nd].timeoutType!==roe){let r=t[ow][t[VT]],n=r.headersTimeout!=null?r.headersTimeout:t[mIo];e[Nd].setTimeout(n,roe)}}}a(SIo,"resumeH1");function IIo(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}a(IIo,"shouldSendContentLength");function xIo(t,e){let{method:r,path:n,host:o,upgrade:s,blocking:c,reset:l}=e,{body:u,headers:d,contentLength:p}=e,h=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(qi.isFormDataLike(u)){G6t||(G6t=Zie().extractBody);let[E,_]=G6t(u);e.contentType==null&&d.push("content-type",_),u=E.stream,p=E.length}else qi.isBlobLike(u)&&e.contentType==null&&u.type&&d.push("content-type",u.type);u&&typeof u.read=="function"&&u.read(0);let m=qi.bodyLength(u);if(p=m??p,p===null&&(p=e.contentLength),p===0&&!h&&(p=null),IIo(r)&&p>0&&e.contentLength!==null&&e.contentLength!==p){if(t[$6t])return qi.errorRequest(t,e,new L$),!1;process.emitWarning(new L$)}let g=t[toe],A=a(E=>{e.aborted||e.completed||(qi.errorRequest(t,e,E||new lan),qi.destroy(u),qi.destroy(g,new eoe("aborted")))},"abort");try{e.onConnect(A)}catch(E){qi.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(g[h_]=!0),(s||r==="CONNECT")&&(g[h_]=!0),l!=null&&(g[h_]=l),t[oan]&&g[AIo]++>=t[oan]&&(g[h_]=!0),c&&(g[DCe]=!0);let y=`${r} ${n} HTTP/1.1\r `;if(typeof o=="string"?y+=`host: ${o}\r -`:y+=t[uTo],s?y+=`connection: upgrade\r +`:y+=t[dIo],s?y+=`connection: upgrade\r upgrade: ${s}\r -`:t[Q$e]&&!g[IC]?y+=`connection: keep-alive\r +`:t[zje]&&!g[h_]?y+=`connection: keep-alive\r `:y+=`connection: close\r `,Array.isArray(d))for(let E=0;E{e.removeListener("error",g)}),!u){let A=new usn;queueMicrotask(()=>g(A))}},"onClose"),g=a(function(A){if(!u){if(u=!0,hi(o.destroyed||o[l9]&&r[rA]<=1),o.off("drain",h).off("error",g),e.removeListener("data",p).removeListener("end",g).removeListener("close",m),!A)try{d.end()}catch(y){A=y}d.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?Vi.destroy(e,A):Vi.destroy(e)}},"onFinished");e.on("data",p).on("end",g).on("error",g).on("close",m),e.resume&&e.resume(),o.on("drain",h).on("error",g),e.errorEmitted??e.errored?setImmediate(()=>g(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>g(null)),(e.closeEmitted??e.closed)&&setImmediate(m)}a(xTo,"writeStream");function csn(t,e,r,n,o,s,c,l){try{e?Vi.isBuffer(e)&&(hi(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${c}content-length: ${s}\r +`}return nan.sendHeaders.hasSubscribers&&nan.sendHeaders.publish({request:e,headers:y,socket:g}),!u||m===0?aan(A,null,t,e,g,p,y,h):qi.isBuffer(u)?aan(A,u,t,e,g,p,y,h):qi.isBlobLike(u)?typeof u.stream=="function"?can(A,u.stream(),t,e,g,p,y,h):RIo(A,u,t,e,g,p,y,h):qi.isStream(u)?wIo(A,u,t,e,g,p,y,h):qi.isIterable(u)?can(A,u,t,e,g,p,y,h):hi(!1),!0}a(xIo,"writeH1");function wIo(t,e,r,n,o,s,c,l){hi(s!==0||r[zg]===0,"stream body cannot be pipelined");let u=!1,d=new Xje({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c}),p=a(function(A){if(!u)try{!d.write(A)&&this.pause&&this.pause()}catch(y){qi.destroy(this,y)}},"onData"),h=a(function(){u||e.resume&&e.resume()},"onDrain"),m=a(function(){if(queueMicrotask(()=>{e.removeListener("error",g)}),!u){let A=new lan;queueMicrotask(()=>g(A))}},"onClose"),g=a(function(A){if(!u){if(u=!0,hi(o.destroyed||o[BF]&&r[zg]<=1),o.off("drain",h).off("error",g),e.removeListener("data",p).removeListener("end",g).removeListener("close",m),!A)try{d.end()}catch(y){A=y}d.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?qi.destroy(e,A):qi.destroy(e)}},"onFinished");e.on("data",p).on("end",g).on("error",g).on("close",m),e.resume&&e.resume(),o.on("drain",h).on("error",g),e.errorEmitted??e.errored?setImmediate(()=>g(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>g(null)),(e.closeEmitted??e.closed)&&setImmediate(m)}a(wIo,"writeStream");function aan(t,e,r,n,o,s,c,l){try{e?qi.isBuffer(e)&&(hi(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${c}content-length: ${s}\r \r -`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!l&&n.reset!==!1&&(o[IC]=!0)):s===0?o.write(`${c}content-length: 0\r +`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!l&&n.reset!==!1&&(o[h_]=!0)):s===0?o.write(`${c}content-length: 0\r \r `,"latin1"):(hi(s===null,"no body must not have content length"),o.write(`${c}\r -`,"latin1")),n.onRequestSent(),r[c9]()}catch(u){t(u)}}a(csn,"writeBuffer");async function wTo(t,e,r,n,o,s,c,l){hi(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new PV;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${c}content-length: ${s}\r +`,"latin1")),n.onRequestSent(),r[OF]()}catch(u){t(u)}}a(aan,"writeBuffer");async function RIo(t,e,r,n,o,s,c,l){hi(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new L$;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${c}content-length: ${s}\r \r -`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!l&&n.reset!==!1&&(o[IC]=!0),r[c9]()}catch(u){t(u)}}a(wTo,"writeBlob");async function lsn(t,e,r,n,o,s,c,l){hi(s!==0||r[rA]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let m=u;u=null,m()}}a(d,"onDrain");let p=a(()=>new Promise((m,g)=>{hi(u===null),o[oS]?g(o[oS]):u=m}),"waitForDrain");o.on("close",d).on("drain",d);let h=new j$e({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c});try{for await(let m of e){if(o[oS])throw o[oS];h.write(m)||await p()}h.end()}catch(m){h.destroy(m)}finally{o.off("close",d).off("drain",d)}}a(lsn,"writeIterable");var j$e=class{static{a(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:c,header:l}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=c,this.header=l,this.abort=e,r[l9]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:c,expectsPayload:l,header:u}=this;if(r[oS])throw r[oS];if(r.destroyed)return!1;let d=Buffer.byteLength(e);if(!d)return!0;if(o!==null&&c+d>o){if(s[S6t])throw new PV;process.emitWarning(new PV)}r.cork(),c===0&&(!l&&n.reset!==!1&&(r[IC]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r +`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!l&&n.reset!==!1&&(o[h_]=!0),r[OF]()}catch(u){t(u)}}a(RIo,"writeBlob");async function can(t,e,r,n,o,s,c,l){hi(s!==0||r[zg]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let m=u;u=null,m()}}a(d,"onDrain");let p=a(()=>new Promise((m,g)=>{hi(u===null),o[WT]?g(o[WT]):u=m}),"waitForDrain");o.on("close",d).on("drain",d);let h=new Xje({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c});try{for await(let m of e){if(o[WT])throw o[WT];h.write(m)||await p()}h.end()}catch(m){h.destroy(m)}finally{o.off("close",d).off("drain",d)}}a(can,"writeIterable");var Xje=class{static{a(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:c,header:l}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=c,this.header=l,this.abort=e,r[BF]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:c,expectsPayload:l,header:u}=this;if(r[WT])throw r[WT];if(r.destroyed)return!1;let d=Buffer.byteLength(e);if(!d)return!0;if(o!==null&&c+d>o){if(s[$6t])throw new L$;process.emitWarning(new L$)}r.cork(),c===0&&(!l&&n.reset!==!1&&(r[h_]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r `,"latin1"):r.write(`${u}content-length: ${o}\r \r `,"latin1")),o===null&&r.write(`\r ${d.toString(16)}\r -`,"latin1"),this.bytesWritten+=d;let p=r.write(e);return r.uncork(),n.onBodySent(e),p||r[Gd].timeout&&r[Gd].timeoutType===Goe&&r[Gd].timeout.refresh&&r[Gd].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:c,request:l}=this;if(l.onRequestSent(),e[l9]=!1,e[oS])throw e[oS];if(!e.destroyed){if(o===0?s?e.write(`${c}content-length: 0\r +`,"latin1"),this.bytesWritten+=d;let p=r.write(e);return r.uncork(),n.onBodySent(e),p||r[Nd].timeout&&r[Nd].timeoutType===roe&&r[Nd].timeout.refresh&&r[Nd].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:c,request:l}=this;if(l.onRequestSent(),e[BF]=!1,e[WT])throw e[WT];if(!e.destroyed){if(o===0?s?e.write(`${c}content-length: 0\r \r `,"latin1"):e.write(`${c}\r `,"latin1"):r===null&&e.write(`\r 0\r \r -`,"latin1"),r!==null&&o!==r){if(n[S6t])throw new PV;process.emitWarning(new PV)}e[Gd].timeout&&e[Gd].timeoutType===Goe&&e[Gd].timeout.refresh&&e[Gd].timeout.refresh(),n[c9]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[l9]=!1,e&&(hi(n[rA]<=1,"pipeline should only contain this request"),o(e))}};psn.exports=bTo});var vsn=T((_Du,_sn)=>{"use strict";f();var sS=require("node:assert"),{pipeline:RTo}=require("node:stream"),xs=rs(),{RequestContentLengthMismatchError:R6t,RequestAbortedError:msn,SocketError:B1e,InformationalError:P6t}=xa(),{kUrl:$$e,kReset:W$e,kClient:Hoe,kRunning:z$e,kPending:PTo,kQueue:u9,kPendingIdx:k6t,kRunningIdx:Aw,kError:Ew,kSocket:wh,kStrictContentLength:kTo,kOnError:N6t,kMaxConcurrentStreams:Csn,kHTTP2Session:yw,kResume:d9,kSize:NTo,kHTTPContext:DTo}=Du(),s4=Symbol("open streams"),gsn,Asn=!1,V$e;try{V$e=require("node:http2")}catch{V$e={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:MTo,HTTP2_HEADER_METHOD:OTo,HTTP2_HEADER_PATH:BTo,HTTP2_HEADER_SCHEME:LTo,HTTP2_HEADER_CONTENT_LENGTH:FTo,HTTP2_HEADER_EXPECT:UTo,HTTP2_HEADER_STATUS:QTo}}=V$e;function qTo(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}a(qTo,"parseH2Headers");async function GTo(t,e){t[wh]=e,Asn||(Asn=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=V$e.connect(t[$$e],{createConnection:a(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Csn]});r[s4]=0,r[Hoe]=t,r[wh]=e,xs.addListener(r,"error",jTo),xs.addListener(r,"frameError",$To),xs.addListener(r,"end",VTo),xs.addListener(r,"goaway",WTo),xs.addListener(r,"close",function(){let{[Hoe]:o}=this,{[wh]:s}=o,c=this[wh][Ew]||this[Ew]||new B1e("closed",xs.getSocketInfo(s));if(o[yw]=null,o.destroyed){sS(o[PTo]===0);let l=o[u9].splice(o[Aw]);for(let u=0;u{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return YTo(t,...o)},resume(){HTo(t)},destroy(o,s){n?queueMicrotask(s):e.destroy(o).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}a(GTo,"connectH2");function HTo(t){let e=t[wh];e?.destroyed===!1&&(t[NTo]===0&&t[Csn]===0?(e.unref(),t[yw].unref()):(e.ref(),t[yw].ref()))}a(HTo,"resumeH2");function jTo(t){sS(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[wh][Ew]=t,this[Hoe][N6t](t)}a(jTo,"onHttp2SessionError");function $To(t,e,r){if(r===0){let n=new P6t(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[wh][Ew]=n,this[Hoe][N6t](n)}}a($To,"onHttp2FrameError");function VTo(){let t=new B1e("other side closed",xs.getSocketInfo(this[wh]));this.destroy(t),xs.destroy(this[wh],t)}a(VTo,"onHttp2SessionEnd");function WTo(t){let e=this[Ew]||new B1e(`HTTP/2: "GOAWAY" frame received with code ${t}`,xs.getSocketInfo(this)),r=this[Hoe];if(r[wh]=null,r[DTo]=null,this[yw]!=null&&(this[yw].destroy(e),this[yw]=null),xs.destroy(this[wh],e),r[Aw]{e.aborted||e.completed||(I=I||new msn,xs.errorRequest(t,e,I),m!=null&&xs.destroy(m,I),xs.destroy(p,I),t[u9][t[Aw]++]=null,t[d9]())},"abort");try{e.onConnect(y)}catch(I){xs.errorRequest(t,e,I)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),m=r.request(h,{endStream:!1,signal:u}),m.id&&!m.pending?(e.onUpgrade(null,null,m),++r[s4],t[u9][t[Aw]++]=null):m.once("ready",()=>{e.onUpgrade(null,null,m),++r[s4],t[u9][t[Aw]++]=null}),m.once("close",()=>{r[s4]-=1,r[s4]===0&&r.unref()}),!0;h[BTo]=o,h[LTo]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";p&&typeof p.read=="function"&&p.read(0);let _=xs.bodyLength(p);if(xs.isFormDataLike(p)){gsn??=Uoe().extractBody;let[I,x]=gsn(p);h["content-type"]=x,p=I.stream,_=I.length}if(_==null&&(_=e.contentLength),(_===0||!E)&&(_=null),zTo(n)&&_>0&&e.contentLength!=null&&e.contentLength!==_){if(t[kTo])return xs.errorRequest(t,e,new R6t),!1;process.emitWarning(new R6t)}_!=null&&(sS(p,"no body must not have content length"),h[FTo]=`${_}`),r.ref();let v=n==="GET"||n==="HEAD"||p===null;return l?(h[UTo]="100-continue",m=r.request(h,{endStream:v,signal:u}),m.once("continue",b)):(m=r.request(h,{endStream:v,signal:u}),b()),++r[s4],m.once("response",I=>{let{[QTo]:x,...R}=I;if(e.onResponseStarted(),e.aborted){let w=new msn;xs.errorRequest(t,e,w),xs.destroy(m,w);return}e.onHeaders(Number(x),qTo(R),m.resume.bind(m),"")===!1&&m.pause(),m.on("data",w=>{e.onData(w)===!1&&m.pause()})}),m.once("end",()=>{(m.state?.state==null||m.state.state<6)&&e.onComplete([]),r[s4]===0&&r.unref(),y(new P6t("HTTP/2: stream half-closed (remote)")),t[u9][t[Aw]++]=null,t[k6t]=t[Aw],t[d9]()}),m.once("close",()=>{r[s4]-=1,r[s4]===0&&r.unref()}),m.once("error",function(I){y(I)}),m.once("frameError",(I,x)=>{y(new P6t(`HTTP/2: "frameError" received - type ${I}, code ${x}`))}),!0;function b(){!p||_===0?ysn(y,m,null,t,e,t[wh],_,E):xs.isBuffer(p)?ysn(y,m,p,t,e,t[wh],_,E):xs.isBlobLike(p)?typeof p.stream=="function"?Esn(y,m,p.stream(),t,e,t[wh],_,E):JTo(y,m,p,t,e,t[wh],_,E):xs.isStream(p)?KTo(y,t[wh],E,m,p,t,e,_):xs.isIterable(p)?Esn(y,m,p,t,e,t[wh],_,E):sS(!1)}a(b,"writeBodyH2")}a(YTo,"writeH2");function ysn(t,e,r,n,o,s,c,l){try{r!=null&&xs.isBuffer(r)&&(sS(c===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),o.onBodySent(r)),l||(s[W$e]=!0),o.onRequestSent(),n[d9]()}catch(u){t(u)}}a(ysn,"writeBuffer");function KTo(t,e,r,n,o,s,c,l){sS(l!==0||s[z$e]===0,"stream body cannot be pipelined");let u=RTo(o,n,p=>{p?(xs.destroy(u,p),t(p)):(xs.removeAllListeners(u),c.onRequestSent(),r||(e[W$e]=!0),s[d9]())});xs.addListener(u,"data",d);function d(p){c.onBodySent(p)}a(d,"onPipeData")}a(KTo,"writeStream");async function JTo(t,e,r,n,o,s,c,l){sS(c===r.size,"blob body must have content length");try{if(c!=null&&c!==r.size)throw new R6t;let u=Buffer.from(await r.arrayBuffer());e.cork(),e.write(u),e.uncork(),e.end(),o.onBodySent(u),o.onRequestSent(),l||(s[W$e]=!0),n[d9]()}catch(u){t(u)}}a(JTo,"writeBlob");async function Esn(t,e,r,n,o,s,c,l){sS(c!==0||n[z$e]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let h=u;u=null,h()}}a(d,"onDrain");let p=a(()=>new Promise((h,m)=>{sS(u===null),s[Ew]?m(s[Ew]):u=h}),"waitForDrain");e.on("close",d).on("drain",d);try{for await(let h of r){if(s[Ew])throw s[Ew];let m=e.write(h);o.onBodySent(h),m||await p()}e.end(),o.onRequestSent(),l||(s[W$e]=!0),n[d9]()}catch(h){t(h)}finally{e.off("close",d).off("drain",d)}}a(Esn,"writeIterable");_sn.exports=GTo});var K$e=T((TDu,Ssn)=>{"use strict";f();var iN=rs(),{kBodyUsed:L1e}=Du(),M6t=require("node:assert"),{InvalidArgumentError:XTo}=xa(),ZTo=require("node:events"),eSo=[300,301,302,303,307,308],bsn=Symbol("body"),Y$e=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[bsn]=e,this[L1e]=!1}async*[Symbol.asyncIterator](){M6t(!this[L1e],"disturbed"),this[L1e]=!0,yield*this[bsn]}},D6t=class{static{a(this,"RedirectHandler")}constructor(e,r,n,o){if(r!=null&&(!Number.isInteger(r)||r<0))throw new XTo("maxRedirections must be a positive number");iN.validateHandler(o,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=r,this.handler=o,this.history=[],this.redirectionLimitReached=!1,iN.isStream(this.opts.body)?(iN.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){M6t(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[L1e]=!1,ZTo.prototype.on.call(this.opts.body,"data",function(){this[L1e]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new Y$e(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&iN.isIterable(this.opts.body)&&(this.opts.body=new Y$e(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,r,n){this.handler.onUpgrade(e,r,n)}onError(e){this.handler.onError(e)}onHeaders(e,r,n,o){if(this.location=this.history.length>=this.maxRedirections||iN.isDisturbed(this.opts.body)?null:tSo(e,r),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(new Error("max redirects")),this.redirectionLimitReached=!0,this.abort(new Error("max redirects"));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,r,n,o);let{origin:s,pathname:c,search:l}=iN.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),u=l?`${c}${l}`:c;this.opts.headers=rSo(this.opts.headers,e===303,this.opts.origin!==s),this.opts.path=u,this.opts.origin=s,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function tSo(t,e){if(eSo.indexOf(t)===-1)return null;for(let r=0;r{"use strict";f();var nSo=K$e();function iSo({maxRedirections:t}){return e=>a(function(n,o){let{maxRedirections:s=t}=n;if(!s)return e(n,o);let c=new nSo(e,s,n,o);return n={...n,maxRedirections:0},e(n,c)},"Intercept")}a(iSo,"createRedirectInterceptor");Isn.exports=iSo});var Voe=T((PDu,Bsn)=>{"use strict";f();var a4=require("node:assert"),Nsn=require("node:net"),oSo=require("node:http"),kV=rs(),{channels:joe}=Ioe(),sSo=qin(),aSo=Poe(),{InvalidArgumentError:wf,InformationalError:cSo,ClientDestroyedError:lSo}=xa(),uSo=T1e(),{kUrl:oN,kServerName:f9,kClient:dSo,kBusy:O6t,kConnect:fSo,kResuming:NV,kRunning:G1e,kPending:H1e,kSize:q1e,kQueue:Cw,kConnected:pSo,kConnecting:$oe,kNeedDrain:h9,kKeepAliveDefaultTimeout:xsn,kHostHeader:hSo,kPendingIdx:_w,kRunningIdx:c4,kError:mSo,kPipelining:X$e,kKeepAliveTimeoutValue:gSo,kMaxHeadersSize:ASo,kKeepAliveMaxTimeout:ySo,kKeepAliveTimeoutThreshold:ESo,kHeadersTimeout:CSo,kBodyTimeout:_So,kStrictContentLength:vSo,kConnector:F1e,kMaxRedirections:bSo,kMaxRequests:B6t,kCounter:TSo,kClose:SSo,kDestroy:ISo,kDispatch:xSo,kInterceptors:wsn,kLocalAddress:U1e,kMaxResponseSize:wSo,kOnError:RSo,kHTTPContext:Rf,kMaxConcurrentStreams:PSo,kResume:Q1e}=Du(),kSo=hsn(),NSo=vsn(),Rsn=!1,p9=Symbol("kClosedResolve"),Psn=a(()=>{},"noop");function Dsn(t){return t[X$e]??t[Rf]?.defaultPipelining??1}a(Dsn,"getPipelining");var L6t=class extends aSo{static{a(this,"Client")}constructor(e,{interceptors:r,maxHeaderSize:n,headersTimeout:o,socketTimeout:s,requestTimeout:c,connectTimeout:l,bodyTimeout:u,idleTimeout:d,keepAlive:p,keepAliveTimeout:h,maxKeepAliveTimeout:m,keepAliveMaxTimeout:g,keepAliveTimeoutThreshold:A,socketPath:y,pipelining:E,tls:_,strictContentLength:v,maxCachedSessions:b,maxRedirections:I,connect:x,maxRequestsPerClient:R,localAddress:w,maxResponseSize:P,autoSelectFamily:k,autoSelectFamilyAttemptTimeout:Q,maxConcurrentStreams:M,allowH2:D}={}){if(super(),p!==void 0)throw new wf("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new wf("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new wf("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(d!==void 0)throw new wf("unsupported idleTimeout, use keepAliveTimeout instead");if(m!==void 0)throw new wf("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(n!=null&&!Number.isFinite(n))throw new wf("invalid maxHeaderSize");if(y!=null&&typeof y!="string")throw new wf("invalid socketPath");if(l!=null&&(!Number.isFinite(l)||l<0))throw new wf("invalid connectTimeout");if(h!=null&&(!Number.isFinite(h)||h<=0))throw new wf("invalid keepAliveTimeout");if(g!=null&&(!Number.isFinite(g)||g<=0))throw new wf("invalid keepAliveMaxTimeout");if(A!=null&&!Number.isFinite(A))throw new wf("invalid keepAliveTimeoutThreshold");if(o!=null&&(!Number.isInteger(o)||o<0))throw new wf("headersTimeout must be a positive integer or zero");if(u!=null&&(!Number.isInteger(u)||u<0))throw new wf("bodyTimeout must be a positive integer or zero");if(x!=null&&typeof x!="function"&&typeof x!="object")throw new wf("connect must be a function or an object");if(I!=null&&(!Number.isInteger(I)||I<0))throw new wf("maxRedirections must be a positive number");if(R!=null&&(!Number.isInteger(R)||R<0))throw new wf("maxRequestsPerClient must be a positive number");if(w!=null&&(typeof w!="string"||Nsn.isIP(w)===0))throw new wf("localAddress must be valid string IP address");if(P!=null&&(!Number.isInteger(P)||P<-1))throw new wf("maxResponseSize must be a positive number");if(Q!=null&&(!Number.isInteger(Q)||Q<-1))throw new wf("autoSelectFamilyAttemptTimeout must be a positive number");if(D!=null&&typeof D!="boolean")throw new wf("allowH2 must be a valid boolean value");if(M!=null&&(typeof M!="number"||M<1))throw new wf("maxConcurrentStreams must be a positive integer, greater than 0");typeof x!="function"&&(x=uSo({..._,maxCachedSessions:b,allowH2:D,socketPath:y,timeout:l,...k?{autoSelectFamily:k,autoSelectFamilyAttemptTimeout:Q}:void 0,...x})),r?.Client&&Array.isArray(r.Client)?(this[wsn]=r.Client,Rsn||(Rsn=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"}))):this[wsn]=[DSo({maxRedirections:I})],this[oN]=kV.parseOrigin(e),this[F1e]=x,this[X$e]=E??1,this[ASo]=n||oSo.maxHeaderSize,this[xsn]=h??4e3,this[ySo]=g??6e5,this[ESo]=A??2e3,this[gSo]=this[xsn],this[f9]=null,this[U1e]=w??null,this[NV]=0,this[h9]=0,this[hSo]=`host: ${this[oN].hostname}${this[oN].port?`:${this[oN].port}`:""}\r -`,this[_So]=u??3e5,this[CSo]=o??3e5,this[vSo]=v??!0,this[bSo]=I,this[B6t]=R,this[p9]=null,this[wSo]=P>-1?P:-1,this[PSo]=M??100,this[Rf]=null,this[Cw]=[],this[c4]=0,this[_w]=0,this[Q1e]=G=>F6t(this,G),this[RSo]=G=>Msn(this,G)}get pipelining(){return this[X$e]}set pipelining(e){this[X$e]=e,this[Q1e](!0)}get[H1e](){return this[Cw].length-this[_w]}get[G1e](){return this[_w]-this[c4]}get[q1e](){return this[Cw].length-this[c4]}get[pSo](){return!!this[Rf]&&!this[$oe]&&!this[Rf].destroyed}get[O6t](){return!!(this[Rf]?.busy(null)||this[q1e]>=(Dsn(this)||1)||this[H1e]>0)}[fSo](e){Osn(this),this.once("connect",e)}[xSo](e,r){let n=e.origin||this[oN].origin,o=new sSo(n,e,r);return this[Cw].push(o),this[NV]||(kV.bodyLength(o.body)==null&&kV.isIterable(o.body)?(this[NV]=1,queueMicrotask(()=>F6t(this))):this[Q1e](!0)),this[NV]&&this[h9]!==2&&this[O6t]&&(this[h9]=2),this[h9]<2}async[SSo](){return new Promise(e=>{this[q1e]?this[p9]=e:e(null)})}async[ISo](e){return new Promise(r=>{let n=this[Cw].splice(this[_w]);for(let s=0;s{this[p9]&&(this[p9](),this[p9]=null),r(null)},"callback");this[Rf]?(this[Rf].destroy(e,o),this[Rf]=null):queueMicrotask(o),this[Q1e]()})}},DSo=J$e();function Msn(t,e){if(t[G1e]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){a4(t[_w]===t[c4]);let r=t[Cw].splice(t[c4]);for(let n=0;n{t[F1e]({host:e,hostname:r,protocol:n,port:o,servername:t[f9],localAddress:t[U1e]},(u,d)=>{u?l(u):c(d)})});if(t.destroyed){kV.destroy(s.on("error",Psn),new lSo);return}a4(s);try{t[Rf]=s.alpnProtocol==="h2"?await NSo(t,s):await kSo(t,s)}catch(c){throw s.destroy().on("error",Psn),c}t[$oe]=!1,s[TSo]=0,s[B6t]=t[B6t],s[dSo]=t,s[mSo]=null,joe.connected.hasSubscribers&&joe.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[Rf]?.version,servername:t[f9],localAddress:t[U1e]},connector:t[F1e],socket:s}),t.emit("connect",t[oN],[t])}catch(s){if(t.destroyed)return;if(t[$oe]=!1,joe.connectError.hasSubscribers&&joe.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[Rf]?.version,servername:t[f9],localAddress:t[U1e]},connector:t[F1e],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(a4(t[G1e]===0);t[H1e]>0&&t[Cw][t[_w]].servername===t[f9];){let c=t[Cw][t[_w]++];kV.errorRequest(t,c,s)}else Msn(t,s);t.emit("connectionError",t[oN],[t],s)}t[Q1e]()}a(Osn,"connect");function ksn(t){t[h9]=0,t.emit("drain",t[oN],[t])}a(ksn,"emitDrain");function F6t(t,e){t[NV]!==2&&(t[NV]=2,MSo(t,e),t[NV]=0,t[c4]>256&&(t[Cw].splice(0,t[c4]),t[_w]-=t[c4],t[c4]=0))}a(F6t,"resume");function MSo(t,e){for(;;){if(t.destroyed){a4(t[H1e]===0);return}if(t[p9]&&!t[q1e]){t[p9](),t[p9]=null;return}if(t[Rf]&&t[Rf].resume(),t[O6t])t[h9]=2;else if(t[h9]===2){e?(t[h9]=1,queueMicrotask(()=>ksn(t))):ksn(t);continue}if(t[H1e]===0||t[G1e]>=(Dsn(t)||1))return;let r=t[Cw][t[_w]];if(t[oN].protocol==="https:"&&t[f9]!==r.servername){if(t[G1e]>0)return;t[f9]=r.servername,t[Rf]?.destroy(new cSo("servername changed"),()=>{t[Rf]=null,F6t(t)})}if(t[$oe])return;if(!t[Rf]){Osn(t);return}if(t[Rf].destroyed||t[Rf].busy(r))return;!r.aborted&&t[Rf].write(r)?t[_w]++:t[Cw].splice(t[_w],1)}}a(MSo,"_resume");Bsn.exports=L6t});var U6t=T((MDu,Lsn)=>{"use strict";f();var Z$e=class{static{a(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Lsn.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new Z$e}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Z$e),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Usn=T((LDu,Fsn)=>{f();var{kFree:OSo,kConnected:BSo,kPending:LSo,kQueued:FSo,kRunning:USo,kSize:QSo}=Du(),DV=Symbol("pool"),Q6t=class{static{a(this,"PoolStats")}constructor(e){this[DV]=e}get connected(){return this[DV][BSo]}get free(){return this[DV][OSo]}get pending(){return this[DV][LSo]}get queued(){return this[DV][FSo]}get running(){return this[DV][USo]}get size(){return this[DV][QSo]}};Fsn.exports=Q6t});var V6t=T((QDu,Ysn)=>{"use strict";f();var qSo=Poe(),GSo=U6t(),{kConnected:q6t,kSize:Qsn,kRunning:qsn,kPending:Gsn,kQueued:j1e,kBusy:HSo,kFree:jSo,kUrl:$So,kClose:VSo,kDestroy:WSo,kDispatch:zSo}=Du(),YSo=Usn(),xC=Symbol("clients"),vy=Symbol("needDrain"),$1e=Symbol("queue"),G6t=Symbol("closed resolve"),H6t=Symbol("onDrain"),Hsn=Symbol("onConnect"),jsn=Symbol("onDisconnect"),$sn=Symbol("onConnectionError"),j6t=Symbol("get dispatcher"),Wsn=Symbol("add client"),zsn=Symbol("remove client"),Vsn=Symbol("stats"),$6t=class extends qSo{static{a(this,"PoolBase")}constructor(){super(),this[$1e]=new GSo,this[xC]=[],this[j1e]=0;let e=this;this[H6t]=a(function(n,o){let s=e[$1e],c=!1;for(;!c;){let l=s.shift();if(!l)break;e[j1e]--,c=!this.dispatch(l.opts,l.handler)}this[vy]=c,!this[vy]&&e[vy]&&(e[vy]=!1,e.emit("drain",n,[e,...o])),e[G6t]&&s.isEmpty()&&Promise.all(e[xC].map(l=>l.close())).then(e[G6t])},"onDrain"),this[Hsn]=(r,n)=>{e.emit("connect",r,[e,...n])},this[jsn]=(r,n,o)=>{e.emit("disconnect",r,[e,...n],o)},this[$sn]=(r,n,o)=>{e.emit("connectionError",r,[e,...n],o)},this[Vsn]=new YSo(this)}get[HSo](){return this[vy]}get[q6t](){return this[xC].filter(e=>e[q6t]).length}get[jSo](){return this[xC].filter(e=>e[q6t]&&!e[vy]).length}get[Gsn](){let e=this[j1e];for(let{[Gsn]:r}of this[xC])e+=r;return e}get[qsn](){let e=0;for(let{[qsn]:r}of this[xC])e+=r;return e}get[Qsn](){let e=this[j1e];for(let{[Qsn]:r}of this[xC])e+=r;return e}get stats(){return this[Vsn]}async[VSo](){this[$1e].isEmpty()?await Promise.all(this[xC].map(e=>e.close())):await new Promise(e=>{this[G6t]=e})}async[WSo](e){for(;;){let r=this[$1e].shift();if(!r)break;r.handler.onError(e)}await Promise.all(this[xC].map(r=>r.destroy(e)))}[zSo](e,r){let n=this[j6t]();return n?n.dispatch(e,r)||(n[vy]=!0,this[vy]=!this[j6t]()):(this[vy]=!0,this[$1e].push({opts:e,handler:r}),this[j1e]++),!this[vy]}[Wsn](e){return e.on("drain",this[H6t]).on("connect",this[Hsn]).on("disconnect",this[jsn]).on("connectionError",this[$sn]),this[xC].push(e),this[vy]&&queueMicrotask(()=>{this[vy]&&this[H6t](e[$So],[this,e])}),this}[zsn](e){e.close(()=>{let r=this[xC].indexOf(e);r!==-1&&this[xC].splice(r,1)}),this[vy]=this[xC].some(r=>!r[vy]&&r.closed!==!0&&r.destroyed!==!0)}};Ysn.exports={PoolBase:$6t,kClients:xC,kNeedDrain:vy,kAddClient:Wsn,kRemoveClient:zsn,kGetDispatcher:j6t}});var Woe=T((HDu,Zsn)=>{"use strict";f();var{PoolBase:KSo,kClients:eVe,kNeedDrain:JSo,kAddClient:XSo,kGetDispatcher:ZSo}=V6t(),eIo=Voe(),{InvalidArgumentError:W6t}=xa(),Ksn=rs(),{kUrl:Jsn,kInterceptors:tIo}=Du(),rIo=T1e(),z6t=Symbol("options"),Y6t=Symbol("connections"),Xsn=Symbol("factory");function nIo(t,e){return new eIo(t,e)}a(nIo,"defaultFactory");var K6t=class extends KSo{static{a(this,"Pool")}constructor(e,{connections:r,factory:n=nIo,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,...m}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new W6t("invalid connections");if(typeof n!="function")throw new W6t("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new W6t("connect must be a function or an object");typeof o!="function"&&(o=rIo({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...d?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),this[tIo]=m.interceptors?.Pool&&Array.isArray(m.interceptors.Pool)?m.interceptors.Pool:[],this[Y6t]=r||null,this[Jsn]=Ksn.parseOrigin(e),this[z6t]={...Ksn.deepClone(m),connect:o,allowH2:h},this[z6t].interceptors=m.interceptors?{...m.interceptors}:void 0,this[Xsn]=n,this.on("connectionError",(g,A,y)=>{for(let E of A){let _=this[eVe].indexOf(E);_!==-1&&this[eVe].splice(_,1)}})}[ZSo](){for(let e of this[eVe])if(!e[JSo])return e;if(!this[Y6t]||this[eVe].length{"use strict";f();var{BalancedPoolMissingUpstreamError:iIo,InvalidArgumentError:oIo}=xa(),{PoolBase:sIo,kClients:nA,kNeedDrain:V1e,kAddClient:aIo,kRemoveClient:cIo,kGetDispatcher:lIo}=V6t(),uIo=Woe(),{kUrl:J6t,kInterceptors:dIo}=Du(),{parseOrigin:ean}=rs(),tan=Symbol("factory"),tVe=Symbol("options"),ran=Symbol("kGreatestCommonDivisor"),MV=Symbol("kCurrentWeight"),OV=Symbol("kIndex"),aS=Symbol("kWeight"),rVe=Symbol("kMaxWeightPerServer"),nVe=Symbol("kErrorPenalty");function fIo(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}a(fIo,"getGreatestCommonDivisor");function pIo(t,e){return new uIo(t,e)}a(pIo,"defaultFactory");var X6t=class extends sIo{static{a(this,"BalancedPool")}constructor(e=[],{factory:r=pIo,...n}={}){if(super(),this[tVe]=n,this[OV]=-1,this[MV]=0,this[rVe]=this[tVe].maxWeightPerServer||100,this[nVe]=this[tVe].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof r!="function")throw new oIo("factory must be a function.");this[dIo]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[tan]=r;for(let o of e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let r=ean(e).origin;if(this[nA].find(o=>o[J6t].origin===r&&o.closed!==!0&&o.destroyed!==!0))return this;let n=this[tan](r,Object.assign({},this[tVe]));this[aIo](n),n.on("connect",()=>{n[aS]=Math.min(this[rVe],n[aS]+this[nVe])}),n.on("connectionError",()=>{n[aS]=Math.max(1,n[aS]-this[nVe]),this._updateBalancedPoolStats()}),n.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(n[aS]=Math.max(1,n[aS]-this[nVe]),this._updateBalancedPoolStats())});for(let o of this[nA])o[aS]=this[rVe];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;ro[J6t].origin===r&&o.closed!==!0&&o.destroyed!==!0);return n&&this[cIo](n),this}get upstreams(){return this[nA].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[J6t].origin)}[lIo](){if(this[nA].length===0)throw new iIo;if(!this[nA].find(s=>!s[V1e]&&s.closed!==!0&&s.destroyed!==!0)||this[nA].map(s=>s[V1e]).reduce((s,c)=>s&&c,!0))return;let n=0,o=this[nA].findIndex(s=>!s[V1e]);for(;n++this[nA][o][aS]&&!s[V1e]&&(o=this[OV]),this[OV]===0&&(this[MV]=this[MV]-this[ran],this[MV]<=0&&(this[MV]=this[rVe])),s[aS]>=this[MV]&&!s[V1e])return s}return this[MV]=this[nA][o][aS],this[OV]=o,this[nA][o]}};nan.exports=X6t});var zoe=T((YDu,dan)=>{"use strict";f();var{InvalidArgumentError:iVe}=xa(),{kClients:m9,kRunning:oan,kClose:hIo,kDestroy:mIo,kDispatch:gIo,kInterceptors:AIo}=Du(),yIo=Poe(),EIo=Woe(),CIo=Voe(),_Io=rs(),vIo=J$e(),san=Symbol("onConnect"),aan=Symbol("onDisconnect"),can=Symbol("onConnectionError"),bIo=Symbol("maxRedirections"),lan=Symbol("onDrain"),uan=Symbol("factory"),Z6t=Symbol("options");function TIo(t,e){return e&&e.connections===1?new CIo(t,e):new EIo(t,e)}a(TIo,"defaultFactory");var eFt=class extends yIo{static{a(this,"Agent")}constructor({factory:e=TIo,maxRedirections:r=0,connect:n,...o}={}){if(super(),typeof e!="function")throw new iVe("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new iVe("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new iVe("maxRedirections must be a positive number");n&&typeof n!="function"&&(n={...n}),this[AIo]=o.interceptors?.Agent&&Array.isArray(o.interceptors.Agent)?o.interceptors.Agent:[vIo({maxRedirections:r})],this[Z6t]={..._Io.deepClone(o),connect:n},this[Z6t].interceptors=o.interceptors?{...o.interceptors}:void 0,this[bIo]=r,this[uan]=e,this[m9]=new Map,this[lan]=(s,c)=>{this.emit("drain",s,[this,...c])},this[san]=(s,c)=>{this.emit("connect",s,[this,...c])},this[aan]=(s,c,l)=>{this.emit("disconnect",s,[this,...c],l)},this[can]=(s,c,l)=>{this.emit("connectionError",s,[this,...c],l)}}get[oan](){let e=0;for(let r of this[m9].values())e+=r[oan];return e}[gIo](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new iVe("opts.origin must be a non-empty string or URL.");let o=this[m9].get(n);return o||(o=this[uan](e.origin,this[Z6t]).on("drain",this[lan]).on("connect",this[san]).on("disconnect",this[aan]).on("connectionError",this[can]),this[m9].set(n,o)),o.dispatch(e,r)}async[hIo](){let e=[];for(let r of this[m9].values())e.push(r.close());this[m9].clear(),await Promise.all(e)}async[mIo](e){let r=[];for(let n of this[m9].values())r.push(n.destroy(e));this[m9].clear(),await Promise.all(r)}};dan.exports=eFt});var oFt=T((XDu,van)=>{"use strict";f();var{kProxy:tFt,kClose:Aan,kDestroy:yan,kDispatch:fan,kInterceptors:SIo}=Du(),{URL:BV}=require("node:url"),IIo=zoe(),Ean=Woe(),Can=Poe(),{InvalidArgumentError:Yoe,RequestAbortedError:xIo,SecureProxyConnectionError:wIo}=xa(),pan=T1e(),_an=Voe(),oVe=Symbol("proxy agent"),sVe=Symbol("proxy client"),g9=Symbol("proxy headers"),rFt=Symbol("request tls settings"),han=Symbol("proxy tls settings"),man=Symbol("connect endpoint function"),gan=Symbol("tunnel proxy");function RIo(t){return t==="https:"?443:80}a(RIo,"defaultProtocolPort");function PIo(t,e){return new Ean(t,e)}a(PIo,"defaultFactory");var kIo=a(()=>{},"noop");function NIo(t,e){return e.connections===1?new _an(t,e):new Ean(t,e)}a(NIo,"defaultAgentFactory");var nFt=class extends Can{static{a(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:o}){if(super(),!e)throw new Yoe("Proxy URL is mandatory");this[g9]=r,o?this.#e=o(e,{connect:n}):this.#e=new _an(e,{connect:n})}[fan](e,r){let n=r.onHeaders;r.onHeaders=function(l,u,d){if(l===407){typeof r.onError=="function"&&r.onError(new Yoe("Proxy Authentication Required (407)"));return}n&&n.call(this,l,u,d)};let{origin:o,path:s="/",headers:c={}}=e;if(e.path=o+s,!("host"in c)&&!("Host"in c)){let{host:l}=new BV(o);c.host=l}return e.headers={...this[g9],...c},this.#e[fan](e,r)}async[Aan](){return this.#e.close()}async[yan](e){return this.#e.destroy(e)}},iFt=class extends Can{static{a(this,"ProxyAgent")}constructor(e){if(super(),!e||typeof e=="object"&&!(e instanceof BV)&&!e.uri)throw new Yoe("Proxy uri is mandatory");let{clientFactory:r=PIo}=e;if(typeof r!="function")throw new Yoe("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e,o=this.#e(e),{href:s,origin:c,port:l,protocol:u,username:d,password:p,hostname:h}=o;if(this[tFt]={uri:s,protocol:u},this[SIo]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[rFt]=e.requestTls,this[han]=e.proxyTls,this[g9]=e.headers||{},this[gan]=n,e.auth&&e.token)throw new Yoe("opts.auth cannot be used in combination with opts.token");e.auth?this[g9]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[g9]["proxy-authorization"]=e.token:d&&p&&(this[g9]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(d)}:${decodeURIComponent(p)}`).toString("base64")}`);let m=pan({...e.proxyTls});this[man]=pan({...e.requestTls});let g=e.factory||NIo,A=a((y,E)=>{let{protocol:_}=new BV(y);return!this[gan]&&_==="http:"&&this[tFt].protocol==="http:"?new nFt(this[tFt].uri,{headers:this[g9],connect:m,factory:g}):g(y,E)},"factory");this[sVe]=r(o,{connect:m}),this[oVe]=new IIo({...e,factory:A,connect:a(async(y,E)=>{let _=y.host;y.port||(_+=`:${RIo(y.protocol)}`);try{let{socket:v,statusCode:b}=await this[sVe].connect({origin:c,port:l,path:_,signal:y.signal,headers:{...this[g9],host:y.host},servername:this[han]?.servername||h});if(b!==200&&(v.on("error",kIo).destroy(),E(new xIo(`Proxy response (${b}) !== 200 when HTTP Tunneling`))),y.protocol!=="https:"){E(null,v);return}let I;this[rFt]?I=this[rFt].servername:I=y.servername,this[man]({...y,servername:I,httpSocket:v},E)}catch(v){v.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new wIo(v)):E(v)}},"connect")})}dispatch(e,r){let n=DIo(e.headers);if(MIo(n),n&&!("host"in n)&&!("Host"in n)){let{host:o}=new BV(e.origin);n.host=o}return this[oVe].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new BV(e):e instanceof BV?e:new BV(e.uri)}async[Aan](){await this[oVe].close(),await this[sVe].close()}async[yan](){await this[oVe].destroy(),await this[sVe].destroy()}};function DIo(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new Yoe("Proxy-Authorization should be sent in ProxyAgent constructor")}a(MIo,"throwIfProxyAuthIsSent");van.exports=iFt});var wan=T((t5u,xan)=>{"use strict";f();var OIo=Poe(),{kClose:BIo,kDestroy:LIo,kClosed:ban,kDestroyed:Tan,kDispatch:FIo,kNoProxyAgent:W1e,kHttpProxyAgent:A9,kHttpsProxyAgent:LV}=Du(),San=oFt(),UIo=zoe(),QIo={"http:":80,"https:":443},Ian=!1,sFt=class extends OIo{static{a(this,"EnvHttpProxyAgent")}#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e,Ian||(Ian=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"}));let{httpProxy:r,httpsProxy:n,noProxy:o,...s}=e;this[W1e]=new UIo(s);let c=r??process.env.http_proxy??process.env.HTTP_PROXY;c?this[A9]=new San({...s,uri:c}):this[A9]=this[W1e];let l=n??process.env.https_proxy??process.env.HTTPS_PROXY;l?this[LV]=new San({...s,uri:l}):this[LV]=this[A9],this.#o()}[FIo](e,r){let n=new URL(e.origin);return this.#r(n).dispatch(e,r)}async[BIo](){await this[W1e].close(),this[A9][ban]||await this[A9].close(),this[LV][ban]||await this[LV].close()}async[LIo](e){await this[W1e].destroy(e),this[A9][Tan]||await this[A9].destroy(e),this[LV][Tan]||await this[LV].destroy(e)}#r(e){let{protocol:r,host:n,port:o}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),o=Number.parseInt(o,10)||QIo[r]||0,this.#i(n,o)?r==="https:"?this[LV]:this[A9]:this[W1e]}#i(e,r){if(this.#a&&this.#o(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";f();var Koe=require("node:assert"),{kRetryHandlerDefaultRetry:Ran}=Du(),{RequestRetryError:z1e}=xa(),{isDisturbed:Pan,parseHeaders:qIo,parseRangeHeader:kan,wrapRequestBody:GIo}=rs();function HIo(t){let e=Date.now();return new Date(t).getTime()-e}a(HIo,"calculateRetryAfterHeader");var aFt=class t{static{a(this,"RetryHandler")}constructor(e,r){let{retryOptions:n,...o}=e,{retry:s,maxRetries:c,maxTimeout:l,minTimeout:u,timeoutFactor:d,methods:p,errorCodes:h,retryAfter:m,statusCodes:g}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts={...o,body:GIo(e.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[Ran],retryAfter:m??!0,maxTimeout:l??30*1e3,minTimeout:u??500,timeoutFactor:d??2,maxRetries:c??5,methods:p??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:g??[500,502,503,504,429],errorCodes:h??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(A=>{this.aborted=!0,this.abort?this.abort(A):this.reason=A})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[Ran](e,{state:r,opts:n},o){let{statusCode:s,code:c,headers:l}=e,{method:u,retryOptions:d}=n,{maxRetries:p,minTimeout:h,maxTimeout:m,timeoutFactor:g,statusCodes:A,errorCodes:y,methods:E}=d,{counter:_}=r;if(c&&c!=="UND_ERR_REQ_RETRY"&&!y.includes(c)){o(e);return}if(Array.isArray(E)&&!E.includes(u)){o(e);return}if(s!=null&&Array.isArray(A)&&!A.includes(s)){o(e);return}if(_>p){o(e);return}let v=l?.["retry-after"];v&&(v=Number(v),v=Number.isNaN(v)?HIo(v):v*1e3);let b=v>0?Math.min(v,m):Math.min(h*g**(_-1),m);setTimeout(()=>o(null),b)}onHeaders(e,r,n,o){let s=qIo(r);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,r,n,o):(this.abort(new z1e("Request failed",e,{headers:s,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new z1e("server does not support the range header and the payload was partially consumed",e,{headers:s,data:{count:this.retryCount}})),!1;let l=kan(s["content-range"]);if(!l)return this.abort(new z1e("Content-Range mismatch",e,{headers:s,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new z1e("ETag mismatch",e,{headers:s,data:{count:this.retryCount}})),!1;let{start:u,size:d,end:p=d-1}=l;return Koe(this.start===u,"content-range mismatch"),Koe(this.end==null||this.end===p,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(e===206){let l=kan(s["content-range"]);if(l==null)return this.handler.onHeaders(e,r,n,o);let{start:u,size:d,end:p=d-1}=l;Koe(u!=null&&Number.isFinite(u),"content-range mismatch"),Koe(p!=null&&Number.isFinite(p),"invalid content-length"),this.start=u,this.end=p}if(this.end==null){let l=s["content-length"];this.end=l!=null?Number(l)-1:null}return Koe(Number.isFinite(this.start)),Koe(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=s.etag!=null?s.etag:null,this.etag!=null&&this.etag.startsWith("W/")&&(this.etag=null),this.handler.onHeaders(e,r,n,o)}let c=new z1e("Request failed",e,{headers:s,data:{count:this.retryCount}});return this.abort(c),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||Pan(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||Pan(this.opts.body))return this.handler.onError(n);if(this.start!==0){let o={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(o["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...o}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(o){this.handler.onError(o)}}a(r,"onRetry")}};Nan.exports=aFt});var Man=T((a5u,Dan)=>{"use strict";f();var jIo=v1e(),$Io=aVe(),cFt=class extends jIo{static{a(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new $Io({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};Dan.exports=cFt});var hFt=T((u5u,Han)=>{"use strict";f();var Uan=require("node:assert"),{Readable:VIo}=require("node:stream"),{RequestAbortedError:Qan,NotSupportedError:WIo,InvalidArgumentError:zIo,AbortError:lFt}=xa(),qan=rs(),{ReadableStreamFrom:YIo}=rs(),gv=Symbol("kConsume"),Y1e=Symbol("kReading"),y9=Symbol("kBody"),Oan=Symbol("kAbort"),Gan=Symbol("kContentType"),Ban=Symbol("kContentLength"),KIo=a(()=>{},"noop"),uFt=class extends VIo{static{a(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:o,highWaterMark:s=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:s}),this._readableState.dataEmitted=!1,this[Oan]=r,this[gv]=null,this[y9]=null,this[Gan]=n,this[Ban]=o,this[Y1e]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new Qan),e&&this[Oan](),super.destroy(e)}_destroy(e,r){this[Y1e]?r(e):setImmediate(()=>{r(e)})}on(e,...r){return(e==="data"||e==="readable")&&(this[Y1e]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let n=super.off(e,...r);return(e==="data"||e==="readable")&&(this[Y1e]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,...r){return this.off(e,...r)}push(e){return this[gv]&&e!==null?(fFt(this[gv],e),this[Y1e]?super.push(e):!0):super.push(e)}async text(){return K1e(this,"text")}async json(){return K1e(this,"json")}async blob(){return K1e(this,"blob")}async bytes(){return K1e(this,"bytes")}async arrayBuffer(){return K1e(this,"arrayBuffer")}async formData(){throw new WIo}get bodyUsed(){return qan.isDisturbed(this)}get body(){return this[y9]||(this[y9]=YIo(this),this[gv]&&(this[y9].getReader(),Uan(this[y9].locked))),this[y9]}async dump(e){let r=Number.isFinite(e?.limit)?e.limit:131072,n=e?.signal;if(n!=null&&(typeof n!="object"||!("aborted"in n)))throw new zIo("signal must be an AbortSignal");return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((o,s)=>{this[Ban]>r&&this.destroy(new lFt);let c=a(()=>{this.destroy(n.reason??new lFt)},"onAbort");n?.addEventListener("abort",c),this.on("close",function(){n?.removeEventListener("abort",c),n?.aborted?s(n.reason??new lFt):o(null)}).on("error",KIo).on("data",function(l){r-=l.length,r<=0&&this.destroy()}).resume()})}};function JIo(t){return t[y9]&&t[y9].locked===!0||t[gv]}a(JIo,"isLocked");function XIo(t){return qan.isDisturbed(t)||JIo(t)}a(XIo,"isUnusable");async function K1e(t,e){return Uan(!t[gv]),new Promise((r,n)=>{if(XIo(t)){let o=t._readableState;o.destroyed&&o.closeEmitted===!1?t.on("error",s=>{n(s)}).on("close",()=>{n(new TypeError("unusable"))}):n(o.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[gv]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(o){pFt(this[gv],o)}).on("close",function(){this[gv].body!==null&&pFt(this[gv],new Qan)}),ZIo(t[gv])})})}a(K1e,"consume");function ZIo(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let o=r;o2&&r[0]===239&&r[1]===187&&r[2]===191?3:0;return r.utf8Slice(o,n)}a(dFt,"chunksDecode");function Lan(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let o=0;o{f();var exo=require("node:assert"),{ResponseStatusCodeError:jan}=xa(),{chunksDecode:$an}=hFt(),txo=128*1024;async function rxo({callback:t,body:e,contentType:r,statusCode:n,statusMessage:o,headers:s}){exo(e);let c=[],l=0;try{for await(let h of e)if(c.push(h),l+=h.length,l>txo){c=[],l=0;break}}catch{c=[],l=0}let u=`Response status code ${n}${o?`: ${o}`:""}`;if(n===204||!r||!l){queueMicrotask(()=>t(new jan(u,n,s)));return}let d=Error.stackTraceLimit;Error.stackTraceLimit=0;let p;try{Van(r)?p=JSON.parse($an(c,l)):Wan(r)&&(p=$an(c,l))}catch{}finally{Error.stackTraceLimit=d}queueMicrotask(()=>t(new jan(u,n,s,p)))}a(rxo,"getResolveErrorBodyCallback");var Van=a(t=>t.length>15&&t[11]==="/"&&t[0]==="a"&&t[1]==="p"&&t[2]==="p"&&t[3]==="l"&&t[4]==="i"&&t[5]==="c"&&t[6]==="a"&&t[7]==="t"&&t[8]==="i"&&t[9]==="o"&&t[10]==="n"&&t[12]==="j"&&t[13]==="s"&&t[14]==="o"&&t[15]==="n","isContentTypeApplicationJson"),Wan=a(t=>t.length>4&&t[4]==="/"&&t[0]==="t"&&t[1]==="e"&&t[2]==="x"&&t[3]==="t","isContentTypeText");zan.exports={getResolveErrorBodyCallback:rxo,isContentTypeApplicationJson:Van,isContentTypeText:Wan}});var Jan=T((g5u,gFt)=>{"use strict";f();var nxo=require("node:assert"),{Readable:ixo}=hFt(),{InvalidArgumentError:Joe,RequestAbortedError:Yan}=xa(),Av=rs(),{getResolveErrorBodyCallback:oxo}=mFt(),{AsyncResource:sxo}=require("node:async_hooks"),cVe=class extends sxo{static{a(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new Joe("invalid opts");let{signal:n,method:o,opaque:s,body:c,onInfo:l,responseHeaders:u,throwOnError:d,highWaterMark:p}=e;try{if(typeof r!="function")throw new Joe("invalid callback");if(p&&(typeof p!="number"||p<0))throw new Joe("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Joe("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new Joe("invalid method");if(l&&typeof l!="function")throw new Joe("invalid onInfo callback");super("UNDICI_REQUEST")}catch(h){throw Av.isStream(c)&&Av.destroy(c.on("error",Av.nop),h),h}this.method=o,this.responseHeaders=u||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.throwOnError=d,this.highWaterMark=p,this.signal=n,this.reason=null,this.removeAbortListener=null,Av.isStream(c)&&c.on("error",h=>{this.onError(h)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new Yan:this.removeAbortListener=Av.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new Yan,this.res?Av.destroy(this.res.on("error",Av.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&(this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}))}onConnect(e,r){if(this.reason){e(this.reason);return}nxo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{callback:s,opaque:c,abort:l,context:u,responseHeaders:d,highWaterMark:p}=this,h=d==="raw"?Av.parseRawHeaders(r):Av.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:h});return}let m=d==="raw"?Av.parseHeaders(r):h,g=m["content-type"],A=m["content-length"],y=new ixo({resume:n,abort:l,contentType:g,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:p});this.removeAbortListener&&y.on("close",this.removeAbortListener),this.callback=null,this.res=y,s!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(oxo,null,{callback:s,body:y,contentType:g,statusCode:e,statusMessage:o,headers:h}):this.runInAsyncScope(s,null,null,{statusCode:e,headers:h,trailers:this.trailers,opaque:c,body:y,context:u}))}onData(e){return this.res.push(e)}onComplete(e){Av.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:o,opaque:s}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{Av.destroy(r,e)})),o&&(this.body=null,Av.destroy(o,e)),this.removeAbortListener&&(r?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}};function Kan(t,e){if(e===void 0)return new Promise((r,n)=>{Kan.call(this,t,(o,s)=>o?n(o):r(s))});try{this.dispatch(t,new cVe(t,e))}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(Kan,"request");gFt.exports=Kan;gFt.exports.RequestHandler=cVe});var J1e=T((E5u,ecn)=>{f();var{addAbortListener:axo}=rs(),{RequestAbortedError:cxo}=xa(),Xoe=Symbol("kListener"),sN=Symbol("kSignal");function Xan(t){t.abort?t.abort(t[sN]?.reason):t.reason=t[sN]?.reason??new cxo,Zan(t)}a(Xan,"abort");function lxo(t,e){if(t.reason=null,t[sN]=null,t[Xoe]=null,!!e){if(e.aborted){Xan(t);return}t[sN]=e,t[Xoe]=()=>{Xan(t)},axo(t[sN],t[Xoe])}}a(lxo,"addSignal");function Zan(t){t[sN]&&("removeEventListener"in t[sN]?t[sN].removeEventListener("abort",t[Xoe]):t[sN].removeListener("abort",t[Xoe]),t[sN]=null,t[Xoe]=null)}a(Zan,"removeSignal");ecn.exports={addSignal:lxo,removeSignal:Zan}});var icn=T((v5u,ncn)=>{"use strict";f();var uxo=require("node:assert"),{finished:dxo,PassThrough:fxo}=require("node:stream"),{InvalidArgumentError:Zoe,InvalidReturnValueError:pxo}=xa(),vw=rs(),{getResolveErrorBodyCallback:hxo}=mFt(),{AsyncResource:mxo}=require("node:async_hooks"),{addSignal:gxo,removeSignal:tcn}=J1e(),AFt=class extends mxo{static{a(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new Zoe("invalid opts");let{signal:o,method:s,opaque:c,body:l,onInfo:u,responseHeaders:d,throwOnError:p}=e;try{if(typeof n!="function")throw new Zoe("invalid callback");if(typeof r!="function")throw new Zoe("invalid factory");if(o&&typeof o.on!="function"&&typeof o.addEventListener!="function")throw new Zoe("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new Zoe("invalid method");if(u&&typeof u!="function")throw new Zoe("invalid onInfo callback");super("UNDICI_STREAM")}catch(h){throw vw.isStream(l)&&vw.destroy(l.on("error",vw.nop),h),h}this.responseHeaders=d||null,this.opaque=c||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=l,this.onInfo=u||null,this.throwOnError=p||!1,vw.isStream(l)&&l.on("error",h=>{this.onError(h)}),gxo(this,o)}onConnect(e,r){if(this.reason){e(this.reason);return}uxo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{factory:s,opaque:c,context:l,callback:u,responseHeaders:d}=this,p=d==="raw"?vw.parseRawHeaders(r):vw.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}this.factory=null;let h;if(this.throwOnError&&e>=400){let A=(d==="raw"?vw.parseHeaders(r):p)["content-type"];h=new fxo,this.callback=null,this.runInAsyncScope(hxo,null,{callback:u,body:h,contentType:A,statusCode:e,statusMessage:o,headers:p})}else{if(s===null)return;if(h=this.runInAsyncScope(s,null,{statusCode:e,headers:p,opaque:c,context:l}),!h||typeof h.write!="function"||typeof h.end!="function"||typeof h.on!="function")throw new pxo("expected Writable");dxo(h,{readable:!1},g=>{let{callback:A,res:y,opaque:E,trailers:_,abort:v}=this;this.res=null,(g||!y.readable)&&vw.destroy(y,g),this.callback=null,this.runInAsyncScope(A,null,g||null,{opaque:E,trailers:_}),g&&v()})}return h.on("drain",n),this.res=h,(h.writableNeedDrain!==void 0?h.writableNeedDrain:h._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;tcn(this),r&&(this.trailers=vw.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:o,body:s}=this;tcn(this),this.factory=null,r?(this.res=null,vw.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),s&&(this.body=null,vw.destroy(s,e))}};function rcn(t,e,r){if(r===void 0)return new Promise((n,o)=>{rcn.call(this,t,e,(s,c)=>s?o(s):n(c))});try{this.dispatch(t,new AFt(t,e,r))}catch(n){if(typeof r!="function")throw n;let o=t?.opaque;queueMicrotask(()=>r(n,{opaque:o}))}}a(rcn,"stream");ncn.exports=rcn});var ccn=T((S5u,acn)=>{"use strict";f();var{Readable:scn,Duplex:Axo,PassThrough:yxo}=require("node:stream"),{InvalidArgumentError:X1e,InvalidReturnValueError:Exo,RequestAbortedError:yFt}=xa(),cS=rs(),{AsyncResource:Cxo}=require("node:async_hooks"),{addSignal:_xo,removeSignal:vxo}=J1e(),ocn=require("node:assert"),ese=Symbol("resume"),EFt=class extends scn{static{a(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[ese]=null}_read(){let{[ese]:e}=this;e&&(this[ese]=null,e())}_destroy(e,r){this._read(),r(e)}},CFt=class extends scn{static{a(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[ese]=e}_read(){this[ese]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new yFt),r(e)}},_Ft=class extends Cxo{static{a(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new X1e("invalid opts");if(typeof r!="function")throw new X1e("invalid handler");let{signal:n,method:o,opaque:s,onInfo:c,responseHeaders:l}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new X1e("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new X1e("invalid method");if(c&&typeof c!="function")throw new X1e("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=l||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=c||null,this.req=new EFt().on("error",cS.nop),this.ret=new Axo({readableObjectMode:e.objectMode,autoDestroy:!0,read:a(()=>{let{body:u}=this;u?.resume&&u.resume()},"read"),write:a((u,d,p)=>{let{req:h}=this;h.push(u,d)||h._readableState.destroyed?p():h[ese]=p},"write"),destroy:a((u,d)=>{let{body:p,req:h,res:m,ret:g,abort:A}=this;!u&&!g._readableState.endEmitted&&(u=new yFt),A&&u&&A(),cS.destroy(p,u),cS.destroy(h,u),cS.destroy(m,u),vxo(this),d(u)},"destroy")}).on("prefinish",()=>{let{req:u}=this;u.push(null)}),this.res=null,_xo(this,n)}onConnect(e,r){let{ret:n,res:o}=this;if(this.reason){e(this.reason);return}ocn(!o,"pipeline cannot be retried"),ocn(!n.destroyed),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:o,handler:s,context:c}=this;if(e<200){if(this.onInfo){let u=this.responseHeaders==="raw"?cS.parseRawHeaders(r):cS.parseHeaders(r);this.onInfo({statusCode:e,headers:u})}return}this.res=new CFt(n);let l;try{this.handler=null;let u=this.responseHeaders==="raw"?cS.parseRawHeaders(r):cS.parseHeaders(r);l=this.runInAsyncScope(s,null,{statusCode:e,headers:u,opaque:o,body:this.res,context:c})}catch(u){throw this.res.on("error",cS.nop),u}if(!l||typeof l.on!="function")throw new Exo("expected Readable");l.on("data",u=>{let{ret:d,body:p}=this;!d.push(u)&&p.pause&&p.pause()}).on("error",u=>{let{ret:d}=this;cS.destroy(d,u)}).on("end",()=>{let{ret:u}=this;u.push(null)}).on("close",()=>{let{ret:u}=this;u._readableState.ended||cS.destroy(u,new yFt)}),this.body=l}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,cS.destroy(r,e)}};function bxo(t,e){try{let r=new _Ft(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new yxo().destroy(r)}}a(bxo,"pipeline");acn.exports=bxo});var hcn=T((w5u,pcn)=>{"use strict";f();var{InvalidArgumentError:vFt,SocketError:Txo}=xa(),{AsyncResource:Sxo}=require("node:async_hooks"),lcn=rs(),{addSignal:Ixo,removeSignal:ucn}=J1e(),dcn=require("node:assert"),bFt=class extends Sxo{static{a(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new vFt("invalid opts");if(typeof r!="function")throw new vFt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new vFt("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=o||null,this.callback=r,this.abort=null,this.context=null,Ixo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}dcn(this.callback),this.abort=e,this.context=null}onHeaders(){throw new Txo("bad upgrade",null)}onUpgrade(e,r,n){dcn(e===101);let{callback:o,opaque:s,context:c}=this;ucn(this),this.callback=null;let l=this.responseHeaders==="raw"?lcn.parseRawHeaders(r):lcn.parseHeaders(r);this.runInAsyncScope(o,null,null,{headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;ucn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function fcn(t,e){if(e===void 0)return new Promise((r,n)=>{fcn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new bFt(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(fcn,"upgrade");pcn.exports=fcn});var Ecn=T((k5u,ycn)=>{"use strict";f();var xxo=require("node:assert"),{AsyncResource:wxo}=require("node:async_hooks"),{InvalidArgumentError:TFt,SocketError:Rxo}=xa(),mcn=rs(),{addSignal:Pxo,removeSignal:gcn}=J1e(),SFt=class extends wxo{static{a(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new TFt("invalid opts");if(typeof r!="function")throw new TFt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new TFt("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=o||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,Pxo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}xxo(this.callback),this.abort=e,this.context=r}onHeaders(){throw new Rxo("bad connect",null)}onUpgrade(e,r,n){let{callback:o,opaque:s,context:c}=this;gcn(this),this.callback=null;let l=r;l!=null&&(l=this.responseHeaders==="raw"?mcn.parseRawHeaders(r):mcn.parseHeaders(r)),this.runInAsyncScope(o,null,null,{statusCode:e,headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;gcn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function Acn(t,e){if(e===void 0)return new Promise((r,n)=>{Acn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new SFt(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(Acn,"connect");ycn.exports=Acn});var Ccn=T((M5u,tse)=>{"use strict";f();tse.exports.request=Jan();tse.exports.stream=icn();tse.exports.pipeline=ccn();tse.exports.upgrade=hcn();tse.exports.connect=Ecn()});var xFt=T((B5u,vcn)=>{"use strict";f();var{UndiciError:kxo}=xa(),_cn=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),IFt=class t extends kxo{static{a(this,"MockNotMatchedError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[_cn]===!0}[_cn]=!0};vcn.exports={MockNotMatchedError:IFt}});var rse=T((U5u,bcn)=>{"use strict";f();bcn.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var Z1e=T((q5u,Mcn)=>{"use strict";f();var{MockNotMatchedError:FV}=xFt(),{kDispatches:lVe,kMockAgent:Nxo,kOriginalDispatch:Dxo,kOrigin:Mxo,kGetNetConnect:Oxo}=rse(),{buildURL:Bxo}=rs(),{STATUS_CODES:Lxo}=require("node:http"),{types:{isPromise:Fxo}}=require("node:util");function l4(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}a(l4,"matchValue");function Scn(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}a(Scn,"lowerCaseEntries");function Icn(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let o=Icn(e,r);if(!l4(n,o))return!1}return!0}a(xcn,"matchHeaders");function Tcn(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}a(Tcn,"safeUrl");function Uxo(t,{path:e,method:r,body:n,headers:o}){let s=l4(t.path,e),c=l4(t.method,r),l=typeof t.body<"u"?l4(t.body,n):!0,u=xcn(t,o);return s&&c&&l&&u}a(Uxo,"matchKey");function wcn(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t.toString()}a(wcn,"getResponseData");function Rcn(t,e){let r=e.query?Bxo(e.path,e.query):e.path,n=typeof r=="string"?Tcn(r):r,o=t.filter(({consumed:s})=>!s).filter(({path:s})=>l4(Tcn(s),n));if(o.length===0)throw new FV(`Mock dispatch not matched for path '${n}'`);if(o=o.filter(({method:s})=>l4(s,e.method)),o.length===0)throw new FV(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(o=o.filter(({body:s})=>typeof s<"u"?l4(s,e.body):!0),o.length===0)throw new FV(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(o=o.filter(s=>xcn(s,e.headers)),o.length===0){let s=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new FV(`Mock dispatch not matched for headers '${s}' on path '${n}'`)}return o[0]}a(Rcn,"getMockDispatch");function Qxo(t,e,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},o=typeof r=="function"?{callback:r}:{...r},s={...n,...e,pending:!0,data:{error:null,...o}};return t.push(s),s}a(Qxo,"addMockDispatch");function wFt(t,e){let r=t.findIndex(n=>n.consumed?Uxo(n,e):!1);r!==-1&&t.splice(r,1)}a(wFt,"deleteMockDispatch");function Pcn(t){let{path:e,method:r,body:n,headers:o,query:s}=t;return{path:e,method:r,body:n,headers:o,query:s}}a(Pcn,"buildKey");function RFt(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=h0?setTimeout(()=>{g(this[lVe])},d):g(this[lVe]);function g(y,E=s){let _=Array.isArray(t.headers)?PFt(t.headers):t.headers,v=typeof E=="function"?E({...t,headers:_}):E;if(Fxo(v)){v.then(R=>g(y,R));return}let b=wcn(v),I=RFt(c),x=RFt(l);e.onConnect?.(R=>e.onError(R),null),e.onHeaders?.(o,I,A,kcn(o)),e.onData?.(Buffer.from(b)),e.onComplete?.(x),wFt(y,r)}a(g,"handleReply");function A(){}return a(A,"resume"),!0}a(Ncn,"mockDispatch");function Gxo(){let t=this[Nxo],e=this[Mxo],r=this[Dxo];return a(function(o,s){if(t.isMockActive)try{Ncn.call(this,o,s)}catch(c){if(c instanceof FV){let l=t[Oxo]();if(l===!1)throw new FV(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(Dcn(l,e))r.call(this,o,s);else throw new FV(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw c}else r.call(this,o,s)},"dispatch")}a(Gxo,"buildMockDispatch");function Dcn(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>l4(n,r.host)))}a(Dcn,"checkNetConnect");function Hxo(t){if(t){let{agent:e,...r}=t;return r}}a(Hxo,"buildMockOptions");Mcn.exports={getResponseData:wcn,getMockDispatch:Rcn,addMockDispatch:Qxo,deleteMockDispatch:wFt,buildKey:Pcn,generateKeyValues:RFt,matchValue:l4,getResponse:qxo,getStatusText:kcn,mockDispatch:Ncn,buildMockDispatch:Gxo,checkNetConnect:Dcn,buildMockOptions:Hxo,getHeaderByName:Icn,buildHeadersFromArray:PFt}});var LFt=T((j5u,BFt)=>{"use strict";f();var{getResponseData:jxo,buildKey:$xo,addMockDispatch:kFt}=Z1e(),{kDispatches:uVe,kDispatchKey:dVe,kDefaultHeaders:NFt,kDefaultTrailers:DFt,kContentLength:MFt,kMockDispatch:fVe}=rse(),{InvalidArgumentError:aN}=xa(),{buildURL:Vxo}=rs(),nse=class{static{a(this,"MockScope")}constructor(e){this[fVe]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new aN("waitInMs must be a valid integer > 0");return this[fVe].delay=e,this}persist(){return this[fVe].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new aN("repeatTimes must be a valid integer > 0");return this[fVe].times=e,this}},OFt=class{static{a(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new aN("opts must be an object");if(typeof e.path>"u")throw new aN("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=Vxo(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[dVe]=$xo(e),this[uVe]=r,this[NFt]={},this[DFt]={},this[MFt]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let o=jxo(r),s=this[MFt]?{"content-length":o.length}:{},c={...this[NFt],...s,...n.headers},l={...this[DFt],...n.trailers};return{statusCode:e,data:r,headers:c,trailers:l}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new aN("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new aN("responseOptions must be an object")}reply(e){if(typeof e=="function"){let s=a(l=>{let u=e(l);if(typeof u!="object"||u===null)throw new aN("reply options callback must return an object");let d={data:"",responseOptions:{},...u};return this.validateReplyParameters(d),{...this.createMockScopeDispatchData(d)}},"wrappedDefaultsCallback"),c=kFt(this[uVe],this[dVe],s);return new nse(c)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),o=kFt(this[uVe],this[dVe],n);return new nse(o)}replyWithError(e){if(typeof e>"u")throw new aN("error must be defined");let r=kFt(this[uVe],this[dVe],{error:e});return new nse(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new aN("headers must be defined");return this[NFt]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new aN("trailers must be defined");return this[DFt]=e,this}replyContentLength(){return this[MFt]=!0,this}};BFt.exports.MockInterceptor=OFt;BFt.exports.MockScope=nse});var QFt=T((W5u,qcn)=>{"use strict";f();var{promisify:Wxo}=require("node:util"),zxo=Voe(),{buildMockDispatch:Yxo}=Z1e(),{kDispatches:Ocn,kMockAgent:Bcn,kClose:Lcn,kOriginalClose:Fcn,kOrigin:Ucn,kOriginalDispatch:Kxo,kConnected:FFt}=rse(),{MockInterceptor:Jxo}=LFt(),Qcn=Du(),{InvalidArgumentError:Xxo}=xa(),UFt=class extends zxo{static{a(this,"MockClient")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new Xxo("Argument opts.agent must implement Agent");this[Bcn]=r.agent,this[Ucn]=e,this[Ocn]=[],this[FFt]=1,this[Kxo]=this.dispatch,this[Fcn]=this.close.bind(this),this.dispatch=Yxo.call(this),this.close=this[Lcn]}get[Qcn.kConnected](){return this[FFt]}intercept(e){return new Jxo(e,this[Ocn])}async[Lcn](){await Wxo(this[Fcn])(),this[FFt]=0,this[Bcn][Qcn.kClients].delete(this[Ucn])}};qcn.exports=UFt});var HFt=T((K5u,zcn)=>{"use strict";f();var{promisify:Zxo}=require("node:util"),ewo=Woe(),{buildMockDispatch:two}=Z1e(),{kDispatches:Gcn,kMockAgent:Hcn,kClose:jcn,kOriginalClose:$cn,kOrigin:Vcn,kOriginalDispatch:rwo,kConnected:qFt}=rse(),{MockInterceptor:nwo}=LFt(),Wcn=Du(),{InvalidArgumentError:iwo}=xa(),GFt=class extends ewo{static{a(this,"MockPool")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new iwo("Argument opts.agent must implement Agent");this[Hcn]=r.agent,this[Vcn]=e,this[Gcn]=[],this[qFt]=1,this[rwo]=this.dispatch,this[$cn]=this.close.bind(this),this.dispatch=two.call(this),this.close=this[jcn]}get[Wcn.kConnected](){return this[qFt]}intercept(e){return new nwo(e,this[Gcn])}async[jcn](){await Zxo(this[$cn])(),this[qFt]=0,this[Hcn][Wcn.kClients].delete(this[Vcn])}};zcn.exports=GFt});var Kcn=T((eMu,Ycn)=>{"use strict";f();var owo={pronoun:"it",is:"is",was:"was",this:"this"},swo={pronoun:"they",is:"are",was:"were",this:"these"};Ycn.exports=class{static{a(this,"Pluralizer")}constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,n=r?owo:swo,o=r?this.singular:this.plural;return{...n,count:e,noun:o}}}});var Xcn=T((iMu,Jcn)=>{"use strict";f();var{Transform:awo}=require("node:stream"),{Console:cwo}=require("node:console"),lwo=process.versions.icu?"\u2705":"Y ",uwo=process.versions.icu?"\u274C":"N ";Jcn.exports=class{static{a(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new awo({transform(r,n,o){o(null,r)}}),this.logger=new cwo({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:o,data:{statusCode:s},persist:c,times:l,timesInvoked:u,origin:d})=>({Method:n,Origin:d,Path:o,"Status code":s,Persistent:c?lwo:uwo,Invocations:u,Remaining:c?1/0:l-u}));return this.logger.table(r),this.transform.read().toString()}}});var rln=T((aMu,tln)=>{"use strict";f();var{kClients:UV}=Du(),dwo=zoe(),{kAgent:jFt,kMockAgentSet:pVe,kMockAgentGet:Zcn,kDispatches:$Ft,kIsMockActive:hVe,kNetConnect:QV,kGetNetConnect:fwo,kOptions:mVe,kFactory:gVe}=rse(),pwo=QFt(),hwo=HFt(),{matchValue:mwo,buildMockOptions:gwo}=Z1e(),{InvalidArgumentError:eln,UndiciError:Awo}=xa(),ywo=v1e(),Ewo=Kcn(),Cwo=Xcn(),VFt=class extends ywo{static{a(this,"MockAgent")}constructor(e){if(super(e),this[QV]=!0,this[hVe]=!0,e?.agent&&typeof e.agent.dispatch!="function")throw new eln("Argument opts.agent must implement Agent");let r=e?.agent?e.agent:new dwo(e);this[jFt]=r,this[UV]=r[UV],this[mVe]=gwo(e)}get(e){let r=this[Zcn](e);return r||(r=this[gVe](e),this[pVe](e,r)),r}dispatch(e,r){return this.get(e.origin),this[jFt].dispatch(e,r)}async close(){await this[jFt].close(),this[UV].clear()}deactivate(){this[hVe]=!1}activate(){this[hVe]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[QV])?this[QV].push(e):this[QV]=[e];else if(typeof e>"u")this[QV]=!0;else throw new eln("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[QV]=!1}get isMockActive(){return this[hVe]}[pVe](e,r){this[UV].set(e,r)}[gVe](e){let r=Object.assign({agent:this},this[mVe]);return this[mVe]&&this[mVe].connections===1?new pwo(e,r):new hwo(e,r)}[Zcn](e){let r=this[UV].get(e);if(r)return r;if(typeof e!="string"){let n=this[gVe]("http://localhost:9999");return this[pVe](e,n),n}for(let[n,o]of Array.from(this[UV]))if(o&&typeof n!="string"&&mwo(n,e)){let s=this[gVe](e);return this[pVe](e,s),s[$Ft]=o[$Ft],s}}[fwo](){return this[QV]}pendingInterceptors(){let e=this[UV];return Array.from(e.entries()).flatMap(([r,n])=>n[$Ft].map(o=>({...o,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new Cwo}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new Ewo("interceptor","interceptors").pluralize(r.length);throw new Awo(` +`,"latin1"),r!==null&&o!==r){if(n[$6t])throw new L$;process.emitWarning(new L$)}e[Nd].timeout&&e[Nd].timeoutType===roe&&e[Nd].timeout.refresh&&e[Nd].timeout.refresh(),n[OF]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[BF]=!1,e&&(hi(n[zg]<=1,"pipeline should only contain this request"),o(e))}};fan.exports=TIo});var Can=T((DMu,_an)=>{"use strict";f();var zT=require("node:assert"),{pipeline:PIo}=require("node:stream"),Cs=Xo(),{RequestContentLengthMismatchError:Y6t,RequestAbortedError:han,SocketError:NCe,InformationalError:K6t}=Ca(),{kUrl:Zje,kReset:t$e,kClient:noe,kRunning:r$e,kPending:kIo,kQueue:LF,kPendingIdx:J6t,kRunningIdx:sw,kError:cw,kSocket:Ch,kStrictContentLength:DIo,kOnError:X6t,kMaxConcurrentStreams:Ean,kHTTP2Session:aw,kResume:FF,kSize:NIo,kHTTPContext:MIo}=bu(),G4=Symbol("open streams"),man,gan=!1,e$e;try{e$e=require("node:http2")}catch{e$e={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:OIo,HTTP2_HEADER_METHOD:BIo,HTTP2_HEADER_PATH:LIo,HTTP2_HEADER_SCHEME:FIo,HTTP2_HEADER_CONTENT_LENGTH:UIo,HTTP2_HEADER_EXPECT:QIo,HTTP2_HEADER_STATUS:qIo}}=e$e;function GIo(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}a(GIo,"parseH2Headers");async function HIo(t,e){t[Ch]=e,gan||(gan=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=e$e.connect(t[Zje],{createConnection:a(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Ean]});r[G4]=0,r[noe]=t,r[Ch]=e,Cs.addListener(r,"error",$Io),Cs.addListener(r,"frameError",VIo),Cs.addListener(r,"end",WIo),Cs.addListener(r,"goaway",zIo),Cs.addListener(r,"close",function(){let{[noe]:o}=this,{[Ch]:s}=o,c=this[Ch][cw]||this[cw]||new NCe("closed",Cs.getSocketInfo(s));if(o[aw]=null,o.destroyed){zT(o[kIo]===0);let l=o[LF].splice(o[sw]);for(let u=0;u{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return KIo(t,...o)},resume(){jIo(t)},destroy(o,s){n?queueMicrotask(s):e.destroy(o).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}a(HIo,"connectH2");function jIo(t){let e=t[Ch];e?.destroyed===!1&&(t[NIo]===0&&t[Ean]===0?(e.unref(),t[aw].unref()):(e.ref(),t[aw].ref()))}a(jIo,"resumeH2");function $Io(t){zT(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ch][cw]=t,this[noe][X6t](t)}a($Io,"onHttp2SessionError");function VIo(t,e,r){if(r===0){let n=new K6t(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Ch][cw]=n,this[noe][X6t](n)}}a(VIo,"onHttp2FrameError");function WIo(){let t=new NCe("other side closed",Cs.getSocketInfo(this[Ch]));this.destroy(t),Cs.destroy(this[Ch],t)}a(WIo,"onHttp2SessionEnd");function zIo(t){let e=this[cw]||new NCe(`HTTP/2: "GOAWAY" frame received with code ${t}`,Cs.getSocketInfo(this)),r=this[noe];if(r[Ch]=null,r[MIo]=null,this[aw]!=null&&(this[aw].destroy(e),this[aw]=null),Cs.destroy(this[Ch],e),r[sw]{e.aborted||e.completed||(I=I||new han,Cs.errorRequest(t,e,I),m!=null&&Cs.destroy(m,I),Cs.destroy(p,I),t[LF][t[sw]++]=null,t[FF]())},"abort");try{e.onConnect(y)}catch(I){Cs.errorRequest(t,e,I)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),m=r.request(h,{endStream:!1,signal:u}),m.id&&!m.pending?(e.onUpgrade(null,null,m),++r[G4],t[LF][t[sw]++]=null):m.once("ready",()=>{e.onUpgrade(null,null,m),++r[G4],t[LF][t[sw]++]=null}),m.once("close",()=>{r[G4]-=1,r[G4]===0&&r.unref()}),!0;h[LIo]=o,h[FIo]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";p&&typeof p.read=="function"&&p.read(0);let _=Cs.bodyLength(p);if(Cs.isFormDataLike(p)){man??=Zie().extractBody;let[I,x]=man(p);h["content-type"]=x,p=I.stream,_=I.length}if(_==null&&(_=e.contentLength),(_===0||!E)&&(_=null),YIo(n)&&_>0&&e.contentLength!=null&&e.contentLength!==_){if(t[DIo])return Cs.errorRequest(t,e,new Y6t),!1;process.emitWarning(new Y6t)}_!=null&&(zT(p,"no body must not have content length"),h[UIo]=`${_}`),r.ref();let v=n==="GET"||n==="HEAD"||p===null;return l?(h[QIo]="100-continue",m=r.request(h,{endStream:v,signal:u}),m.once("continue",b)):(m=r.request(h,{endStream:v,signal:u}),b()),++r[G4],m.once("response",I=>{let{[qIo]:x,...w}=I;if(e.onResponseStarted(),e.aborted){let R=new han;Cs.errorRequest(t,e,R),Cs.destroy(m,R);return}e.onHeaders(Number(x),GIo(w),m.resume.bind(m),"")===!1&&m.pause(),m.on("data",R=>{e.onData(R)===!1&&m.pause()})}),m.once("end",()=>{(m.state?.state==null||m.state.state<6)&&e.onComplete([]),r[G4]===0&&r.unref(),y(new K6t("HTTP/2: stream half-closed (remote)")),t[LF][t[sw]++]=null,t[J6t]=t[sw],t[FF]()}),m.once("close",()=>{r[G4]-=1,r[G4]===0&&r.unref()}),m.once("error",function(I){y(I)}),m.once("frameError",(I,x)=>{y(new K6t(`HTTP/2: "frameError" received - type ${I}, code ${x}`))}),!0;function b(){!p||_===0?Aan(y,m,null,t,e,t[Ch],_,E):Cs.isBuffer(p)?Aan(y,m,p,t,e,t[Ch],_,E):Cs.isBlobLike(p)?typeof p.stream=="function"?yan(y,m,p.stream(),t,e,t[Ch],_,E):XIo(y,m,p,t,e,t[Ch],_,E):Cs.isStream(p)?JIo(y,t[Ch],E,m,p,t,e,_):Cs.isIterable(p)?yan(y,m,p,t,e,t[Ch],_,E):zT(!1)}a(b,"writeBodyH2")}a(KIo,"writeH2");function Aan(t,e,r,n,o,s,c,l){try{r!=null&&Cs.isBuffer(r)&&(zT(c===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),o.onBodySent(r)),l||(s[t$e]=!0),o.onRequestSent(),n[FF]()}catch(u){t(u)}}a(Aan,"writeBuffer");function JIo(t,e,r,n,o,s,c,l){zT(l!==0||s[r$e]===0,"stream body cannot be pipelined");let u=PIo(o,n,p=>{p?(Cs.destroy(u,p),t(p)):(Cs.removeAllListeners(u),c.onRequestSent(),r||(e[t$e]=!0),s[FF]())});Cs.addListener(u,"data",d);function d(p){c.onBodySent(p)}a(d,"onPipeData")}a(JIo,"writeStream");async function XIo(t,e,r,n,o,s,c,l){zT(c===r.size,"blob body must have content length");try{if(c!=null&&c!==r.size)throw new Y6t;let u=Buffer.from(await r.arrayBuffer());e.cork(),e.write(u),e.uncork(),e.end(),o.onBodySent(u),o.onRequestSent(),l||(s[t$e]=!0),n[FF]()}catch(u){t(u)}}a(XIo,"writeBlob");async function yan(t,e,r,n,o,s,c,l){zT(c!==0||n[r$e]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let h=u;u=null,h()}}a(d,"onDrain");let p=a(()=>new Promise((h,m)=>{zT(u===null),s[cw]?m(s[cw]):u=h}),"waitForDrain");e.on("close",d).on("drain",d);try{for await(let h of r){if(s[cw])throw s[cw];let m=e.write(h);o.onBodySent(h),m||await p()}e.end(),o.onRequestSent(),l||(s[t$e]=!0),n[FF]()}catch(h){t(h)}finally{e.off("close",d).off("drain",d)}}a(yan,"writeIterable");_an.exports=HIo});var i$e=T((OMu,Tan)=>{"use strict";f();var Vk=Xo(),{kBodyUsed:MCe}=bu(),eFt=require("node:assert"),{InvalidArgumentError:ZIo}=Ca(),exo=require("node:events"),txo=[300,301,302,303,307,308],van=Symbol("body"),n$e=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[van]=e,this[MCe]=!1}async*[Symbol.asyncIterator](){eFt(!this[MCe],"disturbed"),this[MCe]=!0,yield*this[van]}},Z6t=class{static{a(this,"RedirectHandler")}constructor(e,r,n,o){if(r!=null&&(!Number.isInteger(r)||r<0))throw new ZIo("maxRedirections must be a positive number");Vk.validateHandler(o,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=r,this.handler=o,this.history=[],this.redirectionLimitReached=!1,Vk.isStream(this.opts.body)?(Vk.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){eFt(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[MCe]=!1,exo.prototype.on.call(this.opts.body,"data",function(){this[MCe]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new n$e(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&Vk.isIterable(this.opts.body)&&(this.opts.body=new n$e(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,r,n){this.handler.onUpgrade(e,r,n)}onError(e){this.handler.onError(e)}onHeaders(e,r,n,o){if(this.location=this.history.length>=this.maxRedirections||Vk.isDisturbed(this.opts.body)?null:rxo(e,r),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(new Error("max redirects")),this.redirectionLimitReached=!0,this.abort(new Error("max redirects"));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,r,n,o);let{origin:s,pathname:c,search:l}=Vk.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),u=l?`${c}${l}`:c;this.opts.headers=nxo(this.opts.headers,e===303,this.opts.origin!==s),this.opts.path=u,this.opts.origin=s,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function rxo(t,e){if(txo.indexOf(t)===-1)return null;for(let r=0;r{"use strict";f();var ixo=i$e();function oxo({maxRedirections:t}){return e=>a(function(n,o){let{maxRedirections:s=t}=n;if(!s)return e(n,o);let c=new ixo(e,s,n,o);return n={...n,maxRedirections:0},e(n,c)},"Intercept")}a(oxo,"createRedirectInterceptor");San.exports=oxo});var soe=T((qMu,Oan)=>{"use strict";f();var H4=require("node:assert"),kan=require("node:net"),sxo=require("node:http"),F$=Xo(),{channels:ioe}=Qie(),axo=Qon(),cxo=jie(),{InvalidArgumentError:Cf,InformationalError:lxo,ClientDestroyedError:uxo}=Ca(),dxo=CCe(),{kUrl:Wk,kServerName:UF,kClient:fxo,kBusy:tFt,kConnect:pxo,kResuming:U$,kRunning:UCe,kPending:QCe,kSize:FCe,kQueue:lw,kConnected:hxo,kConnecting:ooe,kNeedDrain:qF,kKeepAliveDefaultTimeout:Ian,kHostHeader:mxo,kPendingIdx:uw,kRunningIdx:j4,kError:gxo,kPipelining:s$e,kKeepAliveTimeoutValue:Axo,kMaxHeadersSize:yxo,kKeepAliveMaxTimeout:Exo,kKeepAliveTimeoutThreshold:_xo,kHeadersTimeout:Cxo,kBodyTimeout:vxo,kStrictContentLength:bxo,kConnector:OCe,kMaxRedirections:Txo,kMaxRequests:rFt,kCounter:Sxo,kClose:Ixo,kDestroy:xxo,kDispatch:wxo,kInterceptors:xan,kLocalAddress:BCe,kMaxResponseSize:Rxo,kOnError:Pxo,kHTTPContext:vf,kMaxConcurrentStreams:kxo,kResume:LCe}=bu(),Dxo=pan(),Nxo=Can(),wan=!1,QF=Symbol("kClosedResolve"),Ran=a(()=>{},"noop");function Dan(t){return t[s$e]??t[vf]?.defaultPipelining??1}a(Dan,"getPipelining");var nFt=class extends cxo{static{a(this,"Client")}constructor(e,{interceptors:r,maxHeaderSize:n,headersTimeout:o,socketTimeout:s,requestTimeout:c,connectTimeout:l,bodyTimeout:u,idleTimeout:d,keepAlive:p,keepAliveTimeout:h,maxKeepAliveTimeout:m,keepAliveMaxTimeout:g,keepAliveTimeoutThreshold:A,socketPath:y,pipelining:E,tls:_,strictContentLength:v,maxCachedSessions:b,maxRedirections:I,connect:x,maxRequestsPerClient:w,localAddress:R,maxResponseSize:P,autoSelectFamily:k,autoSelectFamilyAttemptTimeout:Q,maxConcurrentStreams:M,allowH2:N}={}){if(super(),p!==void 0)throw new Cf("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new Cf("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new Cf("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(d!==void 0)throw new Cf("unsupported idleTimeout, use keepAliveTimeout instead");if(m!==void 0)throw new Cf("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(n!=null&&!Number.isFinite(n))throw new Cf("invalid maxHeaderSize");if(y!=null&&typeof y!="string")throw new Cf("invalid socketPath");if(l!=null&&(!Number.isFinite(l)||l<0))throw new Cf("invalid connectTimeout");if(h!=null&&(!Number.isFinite(h)||h<=0))throw new Cf("invalid keepAliveTimeout");if(g!=null&&(!Number.isFinite(g)||g<=0))throw new Cf("invalid keepAliveMaxTimeout");if(A!=null&&!Number.isFinite(A))throw new Cf("invalid keepAliveTimeoutThreshold");if(o!=null&&(!Number.isInteger(o)||o<0))throw new Cf("headersTimeout must be a positive integer or zero");if(u!=null&&(!Number.isInteger(u)||u<0))throw new Cf("bodyTimeout must be a positive integer or zero");if(x!=null&&typeof x!="function"&&typeof x!="object")throw new Cf("connect must be a function or an object");if(I!=null&&(!Number.isInteger(I)||I<0))throw new Cf("maxRedirections must be a positive number");if(w!=null&&(!Number.isInteger(w)||w<0))throw new Cf("maxRequestsPerClient must be a positive number");if(R!=null&&(typeof R!="string"||kan.isIP(R)===0))throw new Cf("localAddress must be valid string IP address");if(P!=null&&(!Number.isInteger(P)||P<-1))throw new Cf("maxResponseSize must be a positive number");if(Q!=null&&(!Number.isInteger(Q)||Q<-1))throw new Cf("autoSelectFamilyAttemptTimeout must be a positive number");if(N!=null&&typeof N!="boolean")throw new Cf("allowH2 must be a valid boolean value");if(M!=null&&(typeof M!="number"||M<1))throw new Cf("maxConcurrentStreams must be a positive integer, greater than 0");typeof x!="function"&&(x=dxo({..._,maxCachedSessions:b,allowH2:N,socketPath:y,timeout:l,...k?{autoSelectFamily:k,autoSelectFamilyAttemptTimeout:Q}:void 0,...x})),r?.Client&&Array.isArray(r.Client)?(this[xan]=r.Client,wan||(wan=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"}))):this[xan]=[Mxo({maxRedirections:I})],this[Wk]=F$.parseOrigin(e),this[OCe]=x,this[s$e]=E??1,this[yxo]=n||sxo.maxHeaderSize,this[Ian]=h??4e3,this[Exo]=g??6e5,this[_xo]=A??2e3,this[Axo]=this[Ian],this[UF]=null,this[BCe]=R??null,this[U$]=0,this[qF]=0,this[mxo]=`host: ${this[Wk].hostname}${this[Wk].port?`:${this[Wk].port}`:""}\r +`,this[vxo]=u??3e5,this[Cxo]=o??3e5,this[bxo]=v??!0,this[Txo]=I,this[rFt]=w,this[QF]=null,this[Rxo]=P>-1?P:-1,this[kxo]=M??100,this[vf]=null,this[lw]=[],this[j4]=0,this[uw]=0,this[LCe]=G=>iFt(this,G),this[Pxo]=G=>Nan(this,G)}get pipelining(){return this[s$e]}set pipelining(e){this[s$e]=e,this[LCe](!0)}get[QCe](){return this[lw].length-this[uw]}get[UCe](){return this[uw]-this[j4]}get[FCe](){return this[lw].length-this[j4]}get[hxo](){return!!this[vf]&&!this[ooe]&&!this[vf].destroyed}get[tFt](){return!!(this[vf]?.busy(null)||this[FCe]>=(Dan(this)||1)||this[QCe]>0)}[pxo](e){Man(this),this.once("connect",e)}[wxo](e,r){let n=e.origin||this[Wk].origin,o=new axo(n,e,r);return this[lw].push(o),this[U$]||(F$.bodyLength(o.body)==null&&F$.isIterable(o.body)?(this[U$]=1,queueMicrotask(()=>iFt(this))):this[LCe](!0)),this[U$]&&this[qF]!==2&&this[tFt]&&(this[qF]=2),this[qF]<2}async[Ixo](){return new Promise(e=>{this[FCe]?this[QF]=e:e(null)})}async[xxo](e){return new Promise(r=>{let n=this[lw].splice(this[uw]);for(let s=0;s{this[QF]&&(this[QF](),this[QF]=null),r(null)},"callback");this[vf]?(this[vf].destroy(e,o),this[vf]=null):queueMicrotask(o),this[LCe]()})}},Mxo=o$e();function Nan(t,e){if(t[UCe]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){H4(t[uw]===t[j4]);let r=t[lw].splice(t[j4]);for(let n=0;n{t[OCe]({host:e,hostname:r,protocol:n,port:o,servername:t[UF],localAddress:t[BCe]},(u,d)=>{u?l(u):c(d)})});if(t.destroyed){F$.destroy(s.on("error",Ran),new uxo);return}H4(s);try{t[vf]=s.alpnProtocol==="h2"?await Nxo(t,s):await Dxo(t,s)}catch(c){throw s.destroy().on("error",Ran),c}t[ooe]=!1,s[Sxo]=0,s[rFt]=t[rFt],s[fxo]=t,s[gxo]=null,ioe.connected.hasSubscribers&&ioe.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[vf]?.version,servername:t[UF],localAddress:t[BCe]},connector:t[OCe],socket:s}),t.emit("connect",t[Wk],[t])}catch(s){if(t.destroyed)return;if(t[ooe]=!1,ioe.connectError.hasSubscribers&&ioe.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[vf]?.version,servername:t[UF],localAddress:t[BCe]},connector:t[OCe],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(H4(t[UCe]===0);t[QCe]>0&&t[lw][t[uw]].servername===t[UF];){let c=t[lw][t[uw]++];F$.errorRequest(t,c,s)}else Nan(t,s);t.emit("connectionError",t[Wk],[t],s)}t[LCe]()}a(Man,"connect");function Pan(t){t[qF]=0,t.emit("drain",t[Wk],[t])}a(Pan,"emitDrain");function iFt(t,e){t[U$]!==2&&(t[U$]=2,Oxo(t,e),t[U$]=0,t[j4]>256&&(t[lw].splice(0,t[j4]),t[uw]-=t[j4],t[j4]=0))}a(iFt,"resume");function Oxo(t,e){for(;;){if(t.destroyed){H4(t[QCe]===0);return}if(t[QF]&&!t[FCe]){t[QF](),t[QF]=null;return}if(t[vf]&&t[vf].resume(),t[tFt])t[qF]=2;else if(t[qF]===2){e?(t[qF]=1,queueMicrotask(()=>Pan(t))):Pan(t);continue}if(t[QCe]===0||t[UCe]>=(Dan(t)||1))return;let r=t[lw][t[uw]];if(t[Wk].protocol==="https:"&&t[UF]!==r.servername){if(t[UCe]>0)return;t[UF]=r.servername,t[vf]?.destroy(new lxo("servername changed"),()=>{t[vf]=null,iFt(t)})}if(t[ooe])return;if(!t[vf]){Man(t);return}if(t[vf].destroyed||t[vf].busy(r))return;!r.aborted&&t[vf].write(r)?t[uw]++:t[lw].splice(t[uw],1)}}a(Oxo,"_resume");Oan.exports=nFt});var oFt=T(($Mu,Ban)=>{"use strict";f();var a$e=class{static{a(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Ban.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new a$e}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new a$e),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Fan=T((zMu,Lan)=>{f();var{kFree:Bxo,kConnected:Lxo,kPending:Fxo,kQueued:Uxo,kRunning:Qxo,kSize:qxo}=bu(),Q$=Symbol("pool"),sFt=class{static{a(this,"PoolStats")}constructor(e){this[Q$]=e}get connected(){return this[Q$][Lxo]}get free(){return this[Q$][Bxo]}get pending(){return this[Q$][Fxo]}get queued(){return this[Q$][Uxo]}get running(){return this[Q$][Qxo]}get size(){return this[Q$][qxo]}};Lan.exports=sFt});var fFt=T((JMu,zan)=>{"use strict";f();var Gxo=jie(),Hxo=oFt(),{kConnected:aFt,kSize:Uan,kRunning:Qan,kPending:qan,kQueued:qCe,kBusy:jxo,kFree:$xo,kUrl:Vxo,kClose:Wxo,kDestroy:zxo,kDispatch:Yxo}=bu(),Kxo=Fan(),m_=Symbol("clients"),py=Symbol("needDrain"),GCe=Symbol("queue"),cFt=Symbol("closed resolve"),lFt=Symbol("onDrain"),Gan=Symbol("onConnect"),Han=Symbol("onDisconnect"),jan=Symbol("onConnectionError"),uFt=Symbol("get dispatcher"),Van=Symbol("add client"),Wan=Symbol("remove client"),$an=Symbol("stats"),dFt=class extends Gxo{static{a(this,"PoolBase")}constructor(){super(),this[GCe]=new Hxo,this[m_]=[],this[qCe]=0;let e=this;this[lFt]=a(function(n,o){let s=e[GCe],c=!1;for(;!c;){let l=s.shift();if(!l)break;e[qCe]--,c=!this.dispatch(l.opts,l.handler)}this[py]=c,!this[py]&&e[py]&&(e[py]=!1,e.emit("drain",n,[e,...o])),e[cFt]&&s.isEmpty()&&Promise.all(e[m_].map(l=>l.close())).then(e[cFt])},"onDrain"),this[Gan]=(r,n)=>{e.emit("connect",r,[e,...n])},this[Han]=(r,n,o)=>{e.emit("disconnect",r,[e,...n],o)},this[jan]=(r,n,o)=>{e.emit("connectionError",r,[e,...n],o)},this[$an]=new Kxo(this)}get[jxo](){return this[py]}get[aFt](){return this[m_].filter(e=>e[aFt]).length}get[$xo](){return this[m_].filter(e=>e[aFt]&&!e[py]).length}get[qan](){let e=this[qCe];for(let{[qan]:r}of this[m_])e+=r;return e}get[Qan](){let e=0;for(let{[Qan]:r}of this[m_])e+=r;return e}get[Uan](){let e=this[qCe];for(let{[Uan]:r}of this[m_])e+=r;return e}get stats(){return this[$an]}async[Wxo](){this[GCe].isEmpty()?await Promise.all(this[m_].map(e=>e.close())):await new Promise(e=>{this[cFt]=e})}async[zxo](e){for(;;){let r=this[GCe].shift();if(!r)break;r.handler.onError(e)}await Promise.all(this[m_].map(r=>r.destroy(e)))}[Yxo](e,r){let n=this[uFt]();return n?n.dispatch(e,r)||(n[py]=!0,this[py]=!this[uFt]()):(this[py]=!0,this[GCe].push({opts:e,handler:r}),this[qCe]++),!this[py]}[Van](e){return e.on("drain",this[lFt]).on("connect",this[Gan]).on("disconnect",this[Han]).on("connectionError",this[jan]),this[m_].push(e),this[py]&&queueMicrotask(()=>{this[py]&&this[lFt](e[Vxo],[this,e])}),this}[Wan](e){e.close(()=>{let r=this[m_].indexOf(e);r!==-1&&this[m_].splice(r,1)}),this[py]=this[m_].some(r=>!r[py]&&r.closed!==!0&&r.destroyed!==!0)}};zan.exports={PoolBase:dFt,kClients:m_,kNeedDrain:py,kAddClient:Van,kRemoveClient:Wan,kGetDispatcher:uFt}});var aoe=T((e4u,Xan)=>{"use strict";f();var{PoolBase:Jxo,kClients:c$e,kNeedDrain:Xxo,kAddClient:Zxo,kGetDispatcher:ewo}=fFt(),two=soe(),{InvalidArgumentError:pFt}=Ca(),Yan=Xo(),{kUrl:Kan,kInterceptors:rwo}=bu(),nwo=CCe(),hFt=Symbol("options"),mFt=Symbol("connections"),Jan=Symbol("factory");function iwo(t,e){return new two(t,e)}a(iwo,"defaultFactory");var gFt=class extends Jxo{static{a(this,"Pool")}constructor(e,{connections:r,factory:n=iwo,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,...m}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new pFt("invalid connections");if(typeof n!="function")throw new pFt("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new pFt("connect must be a function or an object");typeof o!="function"&&(o=nwo({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...d?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),this[rwo]=m.interceptors?.Pool&&Array.isArray(m.interceptors.Pool)?m.interceptors.Pool:[],this[mFt]=r||null,this[Kan]=Yan.parseOrigin(e),this[hFt]={...Yan.deepClone(m),connect:o,allowH2:h},this[hFt].interceptors=m.interceptors?{...m.interceptors}:void 0,this[Jan]=n,this.on("connectionError",(g,A,y)=>{for(let E of A){let _=this[c$e].indexOf(E);_!==-1&&this[c$e].splice(_,1)}})}[ewo](){for(let e of this[c$e])if(!e[Xxo])return e;if(!this[mFt]||this[c$e].length{"use strict";f();var{BalancedPoolMissingUpstreamError:owo,InvalidArgumentError:swo}=Ca(),{PoolBase:awo,kClients:Yg,kNeedDrain:HCe,kAddClient:cwo,kRemoveClient:lwo,kGetDispatcher:uwo}=fFt(),dwo=aoe(),{kUrl:AFt,kInterceptors:fwo}=bu(),{parseOrigin:Zan}=Xo(),ecn=Symbol("factory"),l$e=Symbol("options"),tcn=Symbol("kGreatestCommonDivisor"),q$=Symbol("kCurrentWeight"),G$=Symbol("kIndex"),YT=Symbol("kWeight"),u$e=Symbol("kMaxWeightPerServer"),d$e=Symbol("kErrorPenalty");function pwo(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}a(pwo,"getGreatestCommonDivisor");function hwo(t,e){return new dwo(t,e)}a(hwo,"defaultFactory");var yFt=class extends awo{static{a(this,"BalancedPool")}constructor(e=[],{factory:r=hwo,...n}={}){if(super(),this[l$e]=n,this[G$]=-1,this[q$]=0,this[u$e]=this[l$e].maxWeightPerServer||100,this[d$e]=this[l$e].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof r!="function")throw new swo("factory must be a function.");this[fwo]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[ecn]=r;for(let o of e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let r=Zan(e).origin;if(this[Yg].find(o=>o[AFt].origin===r&&o.closed!==!0&&o.destroyed!==!0))return this;let n=this[ecn](r,Object.assign({},this[l$e]));this[cwo](n),n.on("connect",()=>{n[YT]=Math.min(this[u$e],n[YT]+this[d$e])}),n.on("connectionError",()=>{n[YT]=Math.max(1,n[YT]-this[d$e]),this._updateBalancedPoolStats()}),n.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(n[YT]=Math.max(1,n[YT]-this[d$e]),this._updateBalancedPoolStats())});for(let o of this[Yg])o[YT]=this[u$e];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;ro[AFt].origin===r&&o.closed!==!0&&o.destroyed!==!0);return n&&this[lwo](n),this}get upstreams(){return this[Yg].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[AFt].origin)}[uwo](){if(this[Yg].length===0)throw new owo;if(!this[Yg].find(s=>!s[HCe]&&s.closed!==!0&&s.destroyed!==!0)||this[Yg].map(s=>s[HCe]).reduce((s,c)=>s&&c,!0))return;let n=0,o=this[Yg].findIndex(s=>!s[HCe]);for(;n++this[Yg][o][YT]&&!s[HCe]&&(o=this[G$]),this[G$]===0&&(this[q$]=this[q$]-this[tcn],this[q$]<=0&&(this[q$]=this[u$e])),s[YT]>=this[q$]&&!s[HCe])return s}return this[q$]=this[Yg][o][YT],this[G$]=o,this[Yg][o]}};rcn.exports=yFt});var coe=T((s4u,ucn)=>{"use strict";f();var{InvalidArgumentError:f$e}=Ca(),{kClients:GF,kRunning:icn,kClose:mwo,kDestroy:gwo,kDispatch:Awo,kInterceptors:ywo}=bu(),Ewo=jie(),_wo=aoe(),Cwo=soe(),vwo=Xo(),bwo=o$e(),ocn=Symbol("onConnect"),scn=Symbol("onDisconnect"),acn=Symbol("onConnectionError"),Two=Symbol("maxRedirections"),ccn=Symbol("onDrain"),lcn=Symbol("factory"),EFt=Symbol("options");function Swo(t,e){return e&&e.connections===1?new Cwo(t,e):new _wo(t,e)}a(Swo,"defaultFactory");var _Ft=class extends Ewo{static{a(this,"Agent")}constructor({factory:e=Swo,maxRedirections:r=0,connect:n,...o}={}){if(super(),typeof e!="function")throw new f$e("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new f$e("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new f$e("maxRedirections must be a positive number");n&&typeof n!="function"&&(n={...n}),this[ywo]=o.interceptors?.Agent&&Array.isArray(o.interceptors.Agent)?o.interceptors.Agent:[bwo({maxRedirections:r})],this[EFt]={...vwo.deepClone(o),connect:n},this[EFt].interceptors=o.interceptors?{...o.interceptors}:void 0,this[Two]=r,this[lcn]=e,this[GF]=new Map,this[ccn]=(s,c)=>{this.emit("drain",s,[this,...c])},this[ocn]=(s,c)=>{this.emit("connect",s,[this,...c])},this[scn]=(s,c,l)=>{this.emit("disconnect",s,[this,...c],l)},this[acn]=(s,c,l)=>{this.emit("connectionError",s,[this,...c],l)}}get[icn](){let e=0;for(let r of this[GF].values())e+=r[icn];return e}[Awo](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new f$e("opts.origin must be a non-empty string or URL.");let o=this[GF].get(n);return o||(o=this[lcn](e.origin,this[EFt]).on("drain",this[ccn]).on("connect",this[ocn]).on("disconnect",this[scn]).on("connectionError",this[acn]),this[GF].set(n,o)),o.dispatch(e,r)}async[mwo](){let e=[];for(let r of this[GF].values())e.push(r.close());this[GF].clear(),await Promise.all(e)}async[gwo](e){let r=[];for(let n of this[GF].values())r.push(n.destroy(e));this[GF].clear(),await Promise.all(r)}};ucn.exports=_Ft});var SFt=T((l4u,Ccn)=>{"use strict";f();var{kProxy:CFt,kClose:gcn,kDestroy:Acn,kDispatch:dcn,kInterceptors:Iwo}=bu(),{URL:H$}=require("node:url"),xwo=coe(),ycn=aoe(),Ecn=jie(),{InvalidArgumentError:loe,RequestAbortedError:wwo,SecureProxyConnectionError:Rwo}=Ca(),fcn=CCe(),_cn=soe(),p$e=Symbol("proxy agent"),h$e=Symbol("proxy client"),HF=Symbol("proxy headers"),vFt=Symbol("request tls settings"),pcn=Symbol("proxy tls settings"),hcn=Symbol("connect endpoint function"),mcn=Symbol("tunnel proxy");function Pwo(t){return t==="https:"?443:80}a(Pwo,"defaultProtocolPort");function kwo(t,e){return new ycn(t,e)}a(kwo,"defaultFactory");var Dwo=a(()=>{},"noop");function Nwo(t,e){return e.connections===1?new _cn(t,e):new ycn(t,e)}a(Nwo,"defaultAgentFactory");var bFt=class extends Ecn{static{a(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:o}){if(super(),!e)throw new loe("Proxy URL is mandatory");this[HF]=r,o?this.#e=o(e,{connect:n}):this.#e=new _cn(e,{connect:n})}[dcn](e,r){let n=r.onHeaders;r.onHeaders=function(l,u,d){if(l===407){typeof r.onError=="function"&&r.onError(new loe("Proxy Authentication Required (407)"));return}n&&n.call(this,l,u,d)};let{origin:o,path:s="/",headers:c={}}=e;if(e.path=o+s,!("host"in c)&&!("Host"in c)){let{host:l}=new H$(o);c.host=l}return e.headers={...this[HF],...c},this.#e[dcn](e,r)}async[gcn](){return this.#e.close()}async[Acn](e){return this.#e.destroy(e)}},TFt=class extends Ecn{static{a(this,"ProxyAgent")}constructor(e){if(super(),!e||typeof e=="object"&&!(e instanceof H$)&&!e.uri)throw new loe("Proxy uri is mandatory");let{clientFactory:r=kwo}=e;if(typeof r!="function")throw new loe("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e,o=this.#e(e),{href:s,origin:c,port:l,protocol:u,username:d,password:p,hostname:h}=o;if(this[CFt]={uri:s,protocol:u},this[Iwo]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[vFt]=e.requestTls,this[pcn]=e.proxyTls,this[HF]=e.headers||{},this[mcn]=n,e.auth&&e.token)throw new loe("opts.auth cannot be used in combination with opts.token");e.auth?this[HF]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[HF]["proxy-authorization"]=e.token:d&&p&&(this[HF]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(d)}:${decodeURIComponent(p)}`).toString("base64")}`);let m=fcn({...e.proxyTls});this[hcn]=fcn({...e.requestTls});let g=e.factory||Nwo,A=a((y,E)=>{let{protocol:_}=new H$(y);return!this[mcn]&&_==="http:"&&this[CFt].protocol==="http:"?new bFt(this[CFt].uri,{headers:this[HF],connect:m,factory:g}):g(y,E)},"factory");this[h$e]=r(o,{connect:m}),this[p$e]=new xwo({...e,factory:A,connect:a(async(y,E)=>{let _=y.host;y.port||(_+=`:${Pwo(y.protocol)}`);try{let{socket:v,statusCode:b}=await this[h$e].connect({origin:c,port:l,path:_,signal:y.signal,headers:{...this[HF],host:y.host},servername:this[pcn]?.servername||h});if(b!==200&&(v.on("error",Dwo).destroy(),E(new wwo(`Proxy response (${b}) !== 200 when HTTP Tunneling`))),y.protocol!=="https:"){E(null,v);return}let I;this[vFt]?I=this[vFt].servername:I=y.servername,this[hcn]({...y,servername:I,httpSocket:v},E)}catch(v){v.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new Rwo(v)):E(v)}},"connect")})}dispatch(e,r){let n=Mwo(e.headers);if(Owo(n),n&&!("host"in n)&&!("Host"in n)){let{host:o}=new H$(e.origin);n.host=o}return this[p$e].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new H$(e):e instanceof H$?e:new H$(e.uri)}async[gcn](){await this[p$e].close(),await this[h$e].close()}async[Acn](){await this[p$e].destroy(),await this[h$e].destroy()}};function Mwo(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new loe("Proxy-Authorization should be sent in ProxyAgent constructor")}a(Owo,"throwIfProxyAuthIsSent");Ccn.exports=TFt});var xcn=T((f4u,Icn)=>{"use strict";f();var Bwo=jie(),{kClose:Lwo,kDestroy:Fwo,kClosed:vcn,kDestroyed:bcn,kDispatch:Uwo,kNoProxyAgent:jCe,kHttpProxyAgent:jF,kHttpsProxyAgent:j$}=bu(),Tcn=SFt(),Qwo=coe(),qwo={"http:":80,"https:":443},Scn=!1,IFt=class extends Bwo{static{a(this,"EnvHttpProxyAgent")}#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e,Scn||(Scn=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"}));let{httpProxy:r,httpsProxy:n,noProxy:o,...s}=e;this[jCe]=new Qwo(s);let c=r??process.env.http_proxy??process.env.HTTP_PROXY;c?this[jF]=new Tcn({...s,uri:c}):this[jF]=this[jCe];let l=n??process.env.https_proxy??process.env.HTTPS_PROXY;l?this[j$]=new Tcn({...s,uri:l}):this[j$]=this[jF],this.#o()}[Uwo](e,r){let n=new URL(e.origin);return this.#r(n).dispatch(e,r)}async[Lwo](){await this[jCe].close(),this[jF][vcn]||await this[jF].close(),this[j$][vcn]||await this[j$].close()}async[Fwo](e){await this[jCe].destroy(e),this[jF][bcn]||await this[jF].destroy(e),this[j$][bcn]||await this[j$].destroy(e)}#r(e){let{protocol:r,host:n,port:o}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),o=Number.parseInt(o,10)||qwo[r]||0,this.#i(n,o)?r==="https:"?this[j$]:this[jF]:this[jCe]}#i(e,r){if(this.#a&&this.#o(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";f();var uoe=require("node:assert"),{kRetryHandlerDefaultRetry:wcn}=bu(),{RequestRetryError:$Ce}=Ca(),{isDisturbed:Rcn,parseHeaders:Gwo,parseRangeHeader:Pcn,wrapRequestBody:Hwo}=Xo();function jwo(t){let e=Date.now();return new Date(t).getTime()-e}a(jwo,"calculateRetryAfterHeader");var xFt=class t{static{a(this,"RetryHandler")}constructor(e,r){let{retryOptions:n,...o}=e,{retry:s,maxRetries:c,maxTimeout:l,minTimeout:u,timeoutFactor:d,methods:p,errorCodes:h,retryAfter:m,statusCodes:g}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts={...o,body:Hwo(e.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[wcn],retryAfter:m??!0,maxTimeout:l??30*1e3,minTimeout:u??500,timeoutFactor:d??2,maxRetries:c??5,methods:p??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:g??[500,502,503,504,429],errorCodes:h??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(A=>{this.aborted=!0,this.abort?this.abort(A):this.reason=A})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[wcn](e,{state:r,opts:n},o){let{statusCode:s,code:c,headers:l}=e,{method:u,retryOptions:d}=n,{maxRetries:p,minTimeout:h,maxTimeout:m,timeoutFactor:g,statusCodes:A,errorCodes:y,methods:E}=d,{counter:_}=r;if(c&&c!=="UND_ERR_REQ_RETRY"&&!y.includes(c)){o(e);return}if(Array.isArray(E)&&!E.includes(u)){o(e);return}if(s!=null&&Array.isArray(A)&&!A.includes(s)){o(e);return}if(_>p){o(e);return}let v=l?.["retry-after"];v&&(v=Number(v),v=Number.isNaN(v)?jwo(v):v*1e3);let b=v>0?Math.min(v,m):Math.min(h*g**(_-1),m);setTimeout(()=>o(null),b)}onHeaders(e,r,n,o){let s=Gwo(r);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,r,n,o):(this.abort(new $Ce("Request failed",e,{headers:s,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new $Ce("server does not support the range header and the payload was partially consumed",e,{headers:s,data:{count:this.retryCount}})),!1;let l=Pcn(s["content-range"]);if(!l)return this.abort(new $Ce("Content-Range mismatch",e,{headers:s,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new $Ce("ETag mismatch",e,{headers:s,data:{count:this.retryCount}})),!1;let{start:u,size:d,end:p=d-1}=l;return uoe(this.start===u,"content-range mismatch"),uoe(this.end==null||this.end===p,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(e===206){let l=Pcn(s["content-range"]);if(l==null)return this.handler.onHeaders(e,r,n,o);let{start:u,size:d,end:p=d-1}=l;uoe(u!=null&&Number.isFinite(u),"content-range mismatch"),uoe(p!=null&&Number.isFinite(p),"invalid content-length"),this.start=u,this.end=p}if(this.end==null){let l=s["content-length"];this.end=l!=null?Number(l)-1:null}return uoe(Number.isFinite(this.start)),uoe(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=s.etag!=null?s.etag:null,this.etag!=null&&this.etag.startsWith("W/")&&(this.etag=null),this.handler.onHeaders(e,r,n,o)}let c=new $Ce("Request failed",e,{headers:s,data:{count:this.retryCount}});return this.abort(c),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||Rcn(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||Rcn(this.opts.body))return this.handler.onError(n);if(this.start!==0){let o={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(o["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...o}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(o){this.handler.onError(o)}}a(r,"onRetry")}};kcn.exports=xFt});var Ncn=T((y4u,Dcn)=>{"use strict";f();var $wo=ECe(),Vwo=m$e(),wFt=class extends $wo{static{a(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new Vwo({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};Dcn.exports=wFt});var MFt=T((C4u,Gcn)=>{"use strict";f();var Fcn=require("node:assert"),{Readable:Wwo}=require("node:stream"),{RequestAbortedError:Ucn,NotSupportedError:zwo,InvalidArgumentError:Ywo,AbortError:RFt}=Ca(),Qcn=Xo(),{ReadableStreamFrom:Kwo}=Xo(),nv=Symbol("kConsume"),VCe=Symbol("kReading"),$F=Symbol("kBody"),Mcn=Symbol("kAbort"),qcn=Symbol("kContentType"),Ocn=Symbol("kContentLength"),Jwo=a(()=>{},"noop"),PFt=class extends Wwo{static{a(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:o,highWaterMark:s=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:s}),this._readableState.dataEmitted=!1,this[Mcn]=r,this[nv]=null,this[$F]=null,this[qcn]=n,this[Ocn]=o,this[VCe]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new Ucn),e&&this[Mcn](),super.destroy(e)}_destroy(e,r){this[VCe]?r(e):setImmediate(()=>{r(e)})}on(e,...r){return(e==="data"||e==="readable")&&(this[VCe]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let n=super.off(e,...r);return(e==="data"||e==="readable")&&(this[VCe]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,...r){return this.off(e,...r)}push(e){return this[nv]&&e!==null?(DFt(this[nv],e),this[VCe]?super.push(e):!0):super.push(e)}async text(){return WCe(this,"text")}async json(){return WCe(this,"json")}async blob(){return WCe(this,"blob")}async bytes(){return WCe(this,"bytes")}async arrayBuffer(){return WCe(this,"arrayBuffer")}async formData(){throw new zwo}get bodyUsed(){return Qcn.isDisturbed(this)}get body(){return this[$F]||(this[$F]=Kwo(this),this[nv]&&(this[$F].getReader(),Fcn(this[$F].locked))),this[$F]}async dump(e){let r=Number.isFinite(e?.limit)?e.limit:131072,n=e?.signal;if(n!=null&&(typeof n!="object"||!("aborted"in n)))throw new Ywo("signal must be an AbortSignal");return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((o,s)=>{this[Ocn]>r&&this.destroy(new RFt);let c=a(()=>{this.destroy(n.reason??new RFt)},"onAbort");n?.addEventListener("abort",c),this.on("close",function(){n?.removeEventListener("abort",c),n?.aborted?s(n.reason??new RFt):o(null)}).on("error",Jwo).on("data",function(l){r-=l.length,r<=0&&this.destroy()}).resume()})}};function Xwo(t){return t[$F]&&t[$F].locked===!0||t[nv]}a(Xwo,"isLocked");function Zwo(t){return Qcn.isDisturbed(t)||Xwo(t)}a(Zwo,"isUnusable");async function WCe(t,e){return Fcn(!t[nv]),new Promise((r,n)=>{if(Zwo(t)){let o=t._readableState;o.destroyed&&o.closeEmitted===!1?t.on("error",s=>{n(s)}).on("close",()=>{n(new TypeError("unusable"))}):n(o.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[nv]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(o){NFt(this[nv],o)}).on("close",function(){this[nv].body!==null&&NFt(this[nv],new Ucn)}),eRo(t[nv])})})}a(WCe,"consume");function eRo(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let o=r;o2&&r[0]===239&&r[1]===187&&r[2]===191?3:0;return r.utf8Slice(o,n)}a(kFt,"chunksDecode");function Bcn(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let o=0;o{f();var tRo=require("node:assert"),{ResponseStatusCodeError:Hcn}=Ca(),{chunksDecode:jcn}=MFt(),rRo=128*1024;async function nRo({callback:t,body:e,contentType:r,statusCode:n,statusMessage:o,headers:s}){tRo(e);let c=[],l=0;try{for await(let h of e)if(c.push(h),l+=h.length,l>rRo){c=[],l=0;break}}catch{c=[],l=0}let u=`Response status code ${n}${o?`: ${o}`:""}`;if(n===204||!r||!l){queueMicrotask(()=>t(new Hcn(u,n,s)));return}let d=Error.stackTraceLimit;Error.stackTraceLimit=0;let p;try{$cn(r)?p=JSON.parse(jcn(c,l)):Vcn(r)&&(p=jcn(c,l))}catch{}finally{Error.stackTraceLimit=d}queueMicrotask(()=>t(new Hcn(u,n,s,p)))}a(nRo,"getResolveErrorBodyCallback");var $cn=a(t=>t.length>15&&t[11]==="/"&&t[0]==="a"&&t[1]==="p"&&t[2]==="p"&&t[3]==="l"&&t[4]==="i"&&t[5]==="c"&&t[6]==="a"&&t[7]==="t"&&t[8]==="i"&&t[9]==="o"&&t[10]==="n"&&t[12]==="j"&&t[13]==="s"&&t[14]==="o"&&t[15]==="n","isContentTypeApplicationJson"),Vcn=a(t=>t.length>4&&t[4]==="/"&&t[0]==="t"&&t[1]==="e"&&t[2]==="x"&&t[3]==="t","isContentTypeText");Wcn.exports={getResolveErrorBodyCallback:nRo,isContentTypeApplicationJson:$cn,isContentTypeText:Vcn}});var Kcn=T((x4u,BFt)=>{"use strict";f();var iRo=require("node:assert"),{Readable:oRo}=MFt(),{InvalidArgumentError:doe,RequestAbortedError:zcn}=Ca(),iv=Xo(),{getResolveErrorBodyCallback:sRo}=OFt(),{AsyncResource:aRo}=require("node:async_hooks"),g$e=class extends aRo{static{a(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new doe("invalid opts");let{signal:n,method:o,opaque:s,body:c,onInfo:l,responseHeaders:u,throwOnError:d,highWaterMark:p}=e;try{if(typeof r!="function")throw new doe("invalid callback");if(p&&(typeof p!="number"||p<0))throw new doe("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new doe("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new doe("invalid method");if(l&&typeof l!="function")throw new doe("invalid onInfo callback");super("UNDICI_REQUEST")}catch(h){throw iv.isStream(c)&&iv.destroy(c.on("error",iv.nop),h),h}this.method=o,this.responseHeaders=u||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.throwOnError=d,this.highWaterMark=p,this.signal=n,this.reason=null,this.removeAbortListener=null,iv.isStream(c)&&c.on("error",h=>{this.onError(h)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new zcn:this.removeAbortListener=iv.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new zcn,this.res?iv.destroy(this.res.on("error",iv.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&(this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}))}onConnect(e,r){if(this.reason){e(this.reason);return}iRo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{callback:s,opaque:c,abort:l,context:u,responseHeaders:d,highWaterMark:p}=this,h=d==="raw"?iv.parseRawHeaders(r):iv.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:h});return}let m=d==="raw"?iv.parseHeaders(r):h,g=m["content-type"],A=m["content-length"],y=new oRo({resume:n,abort:l,contentType:g,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:p});this.removeAbortListener&&y.on("close",this.removeAbortListener),this.callback=null,this.res=y,s!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(sRo,null,{callback:s,body:y,contentType:g,statusCode:e,statusMessage:o,headers:h}):this.runInAsyncScope(s,null,null,{statusCode:e,headers:h,trailers:this.trailers,opaque:c,body:y,context:u}))}onData(e){return this.res.push(e)}onComplete(e){iv.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:o,opaque:s}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{iv.destroy(r,e)})),o&&(this.body=null,iv.destroy(o,e)),this.removeAbortListener&&(r?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}};function Ycn(t,e){if(e===void 0)return new Promise((r,n)=>{Ycn.call(this,t,(o,s)=>o?n(o):r(s))});try{this.dispatch(t,new g$e(t,e))}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(Ycn,"request");BFt.exports=Ycn;BFt.exports.RequestHandler=g$e});var zCe=T((P4u,Zcn)=>{f();var{addAbortListener:cRo}=Xo(),{RequestAbortedError:lRo}=Ca(),foe=Symbol("kListener"),zk=Symbol("kSignal");function Jcn(t){t.abort?t.abort(t[zk]?.reason):t.reason=t[zk]?.reason??new lRo,Xcn(t)}a(Jcn,"abort");function uRo(t,e){if(t.reason=null,t[zk]=null,t[foe]=null,!!e){if(e.aborted){Jcn(t);return}t[zk]=e,t[foe]=()=>{Jcn(t)},cRo(t[zk],t[foe])}}a(uRo,"addSignal");function Xcn(t){t[zk]&&("removeEventListener"in t[zk]?t[zk].removeEventListener("abort",t[foe]):t[zk].removeListener("abort",t[foe]),t[zk]=null,t[foe]=null)}a(Xcn,"removeSignal");Zcn.exports={addSignal:uRo,removeSignal:Xcn}});var nln=T((N4u,rln)=>{"use strict";f();var dRo=require("node:assert"),{finished:fRo,PassThrough:pRo}=require("node:stream"),{InvalidArgumentError:poe,InvalidReturnValueError:hRo}=Ca(),dw=Xo(),{getResolveErrorBodyCallback:mRo}=OFt(),{AsyncResource:gRo}=require("node:async_hooks"),{addSignal:ARo,removeSignal:eln}=zCe(),LFt=class extends gRo{static{a(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new poe("invalid opts");let{signal:o,method:s,opaque:c,body:l,onInfo:u,responseHeaders:d,throwOnError:p}=e;try{if(typeof n!="function")throw new poe("invalid callback");if(typeof r!="function")throw new poe("invalid factory");if(o&&typeof o.on!="function"&&typeof o.addEventListener!="function")throw new poe("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new poe("invalid method");if(u&&typeof u!="function")throw new poe("invalid onInfo callback");super("UNDICI_STREAM")}catch(h){throw dw.isStream(l)&&dw.destroy(l.on("error",dw.nop),h),h}this.responseHeaders=d||null,this.opaque=c||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=l,this.onInfo=u||null,this.throwOnError=p||!1,dw.isStream(l)&&l.on("error",h=>{this.onError(h)}),ARo(this,o)}onConnect(e,r){if(this.reason){e(this.reason);return}dRo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{factory:s,opaque:c,context:l,callback:u,responseHeaders:d}=this,p=d==="raw"?dw.parseRawHeaders(r):dw.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}this.factory=null;let h;if(this.throwOnError&&e>=400){let A=(d==="raw"?dw.parseHeaders(r):p)["content-type"];h=new pRo,this.callback=null,this.runInAsyncScope(mRo,null,{callback:u,body:h,contentType:A,statusCode:e,statusMessage:o,headers:p})}else{if(s===null)return;if(h=this.runInAsyncScope(s,null,{statusCode:e,headers:p,opaque:c,context:l}),!h||typeof h.write!="function"||typeof h.end!="function"||typeof h.on!="function")throw new hRo("expected Writable");fRo(h,{readable:!1},g=>{let{callback:A,res:y,opaque:E,trailers:_,abort:v}=this;this.res=null,(g||!y.readable)&&dw.destroy(y,g),this.callback=null,this.runInAsyncScope(A,null,g||null,{opaque:E,trailers:_}),g&&v()})}return h.on("drain",n),this.res=h,(h.writableNeedDrain!==void 0?h.writableNeedDrain:h._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;eln(this),r&&(this.trailers=dw.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:o,body:s}=this;eln(this),this.factory=null,r?(this.res=null,dw.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),s&&(this.body=null,dw.destroy(s,e))}};function tln(t,e,r){if(r===void 0)return new Promise((n,o)=>{tln.call(this,t,e,(s,c)=>s?o(s):n(c))});try{this.dispatch(t,new LFt(t,e,r))}catch(n){if(typeof r!="function")throw n;let o=t?.opaque;queueMicrotask(()=>r(n,{opaque:o}))}}a(tln,"stream");rln.exports=tln});var aln=T((B4u,sln)=>{"use strict";f();var{Readable:oln,Duplex:yRo,PassThrough:ERo}=require("node:stream"),{InvalidArgumentError:YCe,InvalidReturnValueError:_Ro,RequestAbortedError:FFt}=Ca(),KT=Xo(),{AsyncResource:CRo}=require("node:async_hooks"),{addSignal:vRo,removeSignal:bRo}=zCe(),iln=require("node:assert"),hoe=Symbol("resume"),UFt=class extends oln{static{a(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[hoe]=null}_read(){let{[hoe]:e}=this;e&&(this[hoe]=null,e())}_destroy(e,r){this._read(),r(e)}},QFt=class extends oln{static{a(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[hoe]=e}_read(){this[hoe]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new FFt),r(e)}},qFt=class extends CRo{static{a(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new YCe("invalid opts");if(typeof r!="function")throw new YCe("invalid handler");let{signal:n,method:o,opaque:s,onInfo:c,responseHeaders:l}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new YCe("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new YCe("invalid method");if(c&&typeof c!="function")throw new YCe("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=l||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=c||null,this.req=new UFt().on("error",KT.nop),this.ret=new yRo({readableObjectMode:e.objectMode,autoDestroy:!0,read:a(()=>{let{body:u}=this;u?.resume&&u.resume()},"read"),write:a((u,d,p)=>{let{req:h}=this;h.push(u,d)||h._readableState.destroyed?p():h[hoe]=p},"write"),destroy:a((u,d)=>{let{body:p,req:h,res:m,ret:g,abort:A}=this;!u&&!g._readableState.endEmitted&&(u=new FFt),A&&u&&A(),KT.destroy(p,u),KT.destroy(h,u),KT.destroy(m,u),bRo(this),d(u)},"destroy")}).on("prefinish",()=>{let{req:u}=this;u.push(null)}),this.res=null,vRo(this,n)}onConnect(e,r){let{ret:n,res:o}=this;if(this.reason){e(this.reason);return}iln(!o,"pipeline cannot be retried"),iln(!n.destroyed),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:o,handler:s,context:c}=this;if(e<200){if(this.onInfo){let u=this.responseHeaders==="raw"?KT.parseRawHeaders(r):KT.parseHeaders(r);this.onInfo({statusCode:e,headers:u})}return}this.res=new QFt(n);let l;try{this.handler=null;let u=this.responseHeaders==="raw"?KT.parseRawHeaders(r):KT.parseHeaders(r);l=this.runInAsyncScope(s,null,{statusCode:e,headers:u,opaque:o,body:this.res,context:c})}catch(u){throw this.res.on("error",KT.nop),u}if(!l||typeof l.on!="function")throw new _Ro("expected Readable");l.on("data",u=>{let{ret:d,body:p}=this;!d.push(u)&&p.pause&&p.pause()}).on("error",u=>{let{ret:d}=this;KT.destroy(d,u)}).on("end",()=>{let{ret:u}=this;u.push(null)}).on("close",()=>{let{ret:u}=this;u._readableState.ended||KT.destroy(u,new FFt)}),this.body=l}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,KT.destroy(r,e)}};function TRo(t,e){try{let r=new qFt(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new ERo().destroy(r)}}a(TRo,"pipeline");sln.exports=TRo});var pln=T((U4u,fln)=>{"use strict";f();var{InvalidArgumentError:GFt,SocketError:SRo}=Ca(),{AsyncResource:IRo}=require("node:async_hooks"),cln=Xo(),{addSignal:xRo,removeSignal:lln}=zCe(),uln=require("node:assert"),HFt=class extends IRo{static{a(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new GFt("invalid opts");if(typeof r!="function")throw new GFt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new GFt("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=o||null,this.callback=r,this.abort=null,this.context=null,xRo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}uln(this.callback),this.abort=e,this.context=null}onHeaders(){throw new SRo("bad upgrade",null)}onUpgrade(e,r,n){uln(e===101);let{callback:o,opaque:s,context:c}=this;lln(this),this.callback=null;let l=this.responseHeaders==="raw"?cln.parseRawHeaders(r):cln.parseHeaders(r);this.runInAsyncScope(o,null,null,{headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;lln(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function dln(t,e){if(e===void 0)return new Promise((r,n)=>{dln.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new HFt(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(dln,"upgrade");fln.exports=dln});var yln=T((G4u,Aln)=>{"use strict";f();var wRo=require("node:assert"),{AsyncResource:RRo}=require("node:async_hooks"),{InvalidArgumentError:jFt,SocketError:PRo}=Ca(),hln=Xo(),{addSignal:kRo,removeSignal:mln}=zCe(),$Ft=class extends RRo{static{a(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new jFt("invalid opts");if(typeof r!="function")throw new jFt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new jFt("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=o||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,kRo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}wRo(this.callback),this.abort=e,this.context=r}onHeaders(){throw new PRo("bad connect",null)}onUpgrade(e,r,n){let{callback:o,opaque:s,context:c}=this;mln(this),this.callback=null;let l=r;l!=null&&(l=this.responseHeaders==="raw"?hln.parseRawHeaders(r):hln.parseHeaders(r)),this.runInAsyncScope(o,null,null,{statusCode:e,headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;mln(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function gln(t,e){if(e===void 0)return new Promise((r,n)=>{gln.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new $Ft(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(gln,"connect");Aln.exports=gln});var Eln=T(($4u,moe)=>{"use strict";f();moe.exports.request=Kcn();moe.exports.stream=nln();moe.exports.pipeline=aln();moe.exports.upgrade=pln();moe.exports.connect=yln()});var WFt=T((W4u,Cln)=>{"use strict";f();var{UndiciError:DRo}=Ca(),_ln=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),VFt=class t extends DRo{static{a(this,"MockNotMatchedError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[_ln]===!0}[_ln]=!0};Cln.exports={MockNotMatchedError:VFt}});var goe=T((K4u,vln)=>{"use strict";f();vln.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var KCe=T((X4u,Nln)=>{"use strict";f();var{MockNotMatchedError:$$}=WFt(),{kDispatches:A$e,kMockAgent:NRo,kOriginalDispatch:MRo,kOrigin:ORo,kGetNetConnect:BRo}=goe(),{buildURL:LRo}=Xo(),{STATUS_CODES:FRo}=require("node:http"),{types:{isPromise:URo}}=require("node:util");function $4(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}a($4,"matchValue");function Tln(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}a(Tln,"lowerCaseEntries");function Sln(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let o=Sln(e,r);if(!$4(n,o))return!1}return!0}a(Iln,"matchHeaders");function bln(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}a(bln,"safeUrl");function QRo(t,{path:e,method:r,body:n,headers:o}){let s=$4(t.path,e),c=$4(t.method,r),l=typeof t.body<"u"?$4(t.body,n):!0,u=Iln(t,o);return s&&c&&l&&u}a(QRo,"matchKey");function xln(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t.toString()}a(xln,"getResponseData");function wln(t,e){let r=e.query?LRo(e.path,e.query):e.path,n=typeof r=="string"?bln(r):r,o=t.filter(({consumed:s})=>!s).filter(({path:s})=>$4(bln(s),n));if(o.length===0)throw new $$(`Mock dispatch not matched for path '${n}'`);if(o=o.filter(({method:s})=>$4(s,e.method)),o.length===0)throw new $$(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(o=o.filter(({body:s})=>typeof s<"u"?$4(s,e.body):!0),o.length===0)throw new $$(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(o=o.filter(s=>Iln(s,e.headers)),o.length===0){let s=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new $$(`Mock dispatch not matched for headers '${s}' on path '${n}'`)}return o[0]}a(wln,"getMockDispatch");function qRo(t,e,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},o=typeof r=="function"?{callback:r}:{...r},s={...n,...e,pending:!0,data:{error:null,...o}};return t.push(s),s}a(qRo,"addMockDispatch");function zFt(t,e){let r=t.findIndex(n=>n.consumed?QRo(n,e):!1);r!==-1&&t.splice(r,1)}a(zFt,"deleteMockDispatch");function Rln(t){let{path:e,method:r,body:n,headers:o,query:s}=t;return{path:e,method:r,body:n,headers:o,query:s}}a(Rln,"buildKey");function YFt(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=h0?setTimeout(()=>{g(this[A$e])},d):g(this[A$e]);function g(y,E=s){let _=Array.isArray(t.headers)?KFt(t.headers):t.headers,v=typeof E=="function"?E({...t,headers:_}):E;if(URo(v)){v.then(w=>g(y,w));return}let b=xln(v),I=YFt(c),x=YFt(l);e.onConnect?.(w=>e.onError(w),null),e.onHeaders?.(o,I,A,Pln(o)),e.onData?.(Buffer.from(b)),e.onComplete?.(x),zFt(y,r)}a(g,"handleReply");function A(){}return a(A,"resume"),!0}a(kln,"mockDispatch");function HRo(){let t=this[NRo],e=this[ORo],r=this[MRo];return a(function(o,s){if(t.isMockActive)try{kln.call(this,o,s)}catch(c){if(c instanceof $$){let l=t[BRo]();if(l===!1)throw new $$(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(Dln(l,e))r.call(this,o,s);else throw new $$(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw c}else r.call(this,o,s)},"dispatch")}a(HRo,"buildMockDispatch");function Dln(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>$4(n,r.host)))}a(Dln,"checkNetConnect");function jRo(t){if(t){let{agent:e,...r}=t;return r}}a(jRo,"buildMockOptions");Nln.exports={getResponseData:xln,getMockDispatch:wln,addMockDispatch:qRo,deleteMockDispatch:zFt,buildKey:Rln,generateKeyValues:YFt,matchValue:$4,getResponse:GRo,getStatusText:Pln,mockDispatch:kln,buildMockDispatch:HRo,checkNetConnect:Dln,buildMockOptions:jRo,getHeaderByName:Sln,buildHeadersFromArray:KFt}});var n9t=T((tOu,r9t)=>{"use strict";f();var{getResponseData:$Ro,buildKey:VRo,addMockDispatch:JFt}=KCe(),{kDispatches:y$e,kDispatchKey:E$e,kDefaultHeaders:XFt,kDefaultTrailers:ZFt,kContentLength:e9t,kMockDispatch:_$e}=goe(),{InvalidArgumentError:Yk}=Ca(),{buildURL:WRo}=Xo(),Aoe=class{static{a(this,"MockScope")}constructor(e){this[_$e]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Yk("waitInMs must be a valid integer > 0");return this[_$e].delay=e,this}persist(){return this[_$e].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Yk("repeatTimes must be a valid integer > 0");return this[_$e].times=e,this}},t9t=class{static{a(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new Yk("opts must be an object");if(typeof e.path>"u")throw new Yk("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=WRo(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[E$e]=VRo(e),this[y$e]=r,this[XFt]={},this[ZFt]={},this[e9t]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let o=$Ro(r),s=this[e9t]?{"content-length":o.length}:{},c={...this[XFt],...s,...n.headers},l={...this[ZFt],...n.trailers};return{statusCode:e,data:r,headers:c,trailers:l}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new Yk("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new Yk("responseOptions must be an object")}reply(e){if(typeof e=="function"){let s=a(l=>{let u=e(l);if(typeof u!="object"||u===null)throw new Yk("reply options callback must return an object");let d={data:"",responseOptions:{},...u};return this.validateReplyParameters(d),{...this.createMockScopeDispatchData(d)}},"wrappedDefaultsCallback"),c=JFt(this[y$e],this[E$e],s);return new Aoe(c)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),o=JFt(this[y$e],this[E$e],n);return new Aoe(o)}replyWithError(e){if(typeof e>"u")throw new Yk("error must be defined");let r=JFt(this[y$e],this[E$e],{error:e});return new Aoe(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Yk("headers must be defined");return this[XFt]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Yk("trailers must be defined");return this[ZFt]=e,this}replyContentLength(){return this[e9t]=!0,this}};r9t.exports.MockInterceptor=t9t;r9t.exports.MockScope=Aoe});var s9t=T((iOu,Qln)=>{"use strict";f();var{promisify:zRo}=require("node:util"),YRo=soe(),{buildMockDispatch:KRo}=KCe(),{kDispatches:Mln,kMockAgent:Oln,kClose:Bln,kOriginalClose:Lln,kOrigin:Fln,kOriginalDispatch:JRo,kConnected:i9t}=goe(),{MockInterceptor:XRo}=n9t(),Uln=bu(),{InvalidArgumentError:ZRo}=Ca(),o9t=class extends YRo{static{a(this,"MockClient")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new ZRo("Argument opts.agent must implement Agent");this[Oln]=r.agent,this[Fln]=e,this[Mln]=[],this[i9t]=1,this[JRo]=this.dispatch,this[Lln]=this.close.bind(this),this.dispatch=KRo.call(this),this.close=this[Bln]}get[Uln.kConnected](){return this[i9t]}intercept(e){return new XRo(e,this[Mln])}async[Bln](){await zRo(this[Lln])(),this[i9t]=0,this[Oln][Uln.kClients].delete(this[Fln])}};Qln.exports=o9t});var l9t=T((aOu,Wln)=>{"use strict";f();var{promisify:e2o}=require("node:util"),t2o=aoe(),{buildMockDispatch:r2o}=KCe(),{kDispatches:qln,kMockAgent:Gln,kClose:Hln,kOriginalClose:jln,kOrigin:$ln,kOriginalDispatch:n2o,kConnected:a9t}=goe(),{MockInterceptor:i2o}=n9t(),Vln=bu(),{InvalidArgumentError:o2o}=Ca(),c9t=class extends t2o{static{a(this,"MockPool")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new o2o("Argument opts.agent must implement Agent");this[Gln]=r.agent,this[$ln]=e,this[qln]=[],this[a9t]=1,this[n2o]=this.dispatch,this[jln]=this.close.bind(this),this.dispatch=r2o.call(this),this.close=this[Hln]}get[Vln.kConnected](){return this[a9t]}intercept(e){return new i2o(e,this[qln])}async[Hln](){await e2o(this[jln])(),this[a9t]=0,this[Gln][Vln.kClients].delete(this[$ln])}};Wln.exports=c9t});var Yln=T((dOu,zln)=>{"use strict";f();var s2o={pronoun:"it",is:"is",was:"was",this:"this"},a2o={pronoun:"they",is:"are",was:"were",this:"these"};zln.exports=class{static{a(this,"Pluralizer")}constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,n=r?s2o:a2o,o=r?this.singular:this.plural;return{...n,count:e,noun:o}}}});var Jln=T((mOu,Kln)=>{"use strict";f();var{Transform:c2o}=require("node:stream"),{Console:l2o}=require("node:console"),u2o=process.versions.icu?"\u2705":"Y ",d2o=process.versions.icu?"\u274C":"N ";Kln.exports=class{static{a(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new c2o({transform(r,n,o){o(null,r)}}),this.logger=new l2o({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:o,data:{statusCode:s},persist:c,times:l,timesInvoked:u,origin:d})=>({Method:n,Origin:d,Path:o,"Status code":s,Persistent:c?u2o:d2o,Invocations:u,Remaining:c?1/0:l-u}));return this.logger.table(r),this.transform.read().toString()}}});var tun=T((yOu,eun)=>{"use strict";f();var{kClients:V$}=bu(),f2o=coe(),{kAgent:u9t,kMockAgentSet:C$e,kMockAgentGet:Xln,kDispatches:d9t,kIsMockActive:v$e,kNetConnect:W$,kGetNetConnect:p2o,kOptions:b$e,kFactory:T$e}=goe(),h2o=s9t(),m2o=l9t(),{matchValue:g2o,buildMockOptions:A2o}=KCe(),{InvalidArgumentError:Zln,UndiciError:y2o}=Ca(),E2o=ECe(),_2o=Yln(),C2o=Jln(),f9t=class extends E2o{static{a(this,"MockAgent")}constructor(e){if(super(e),this[W$]=!0,this[v$e]=!0,e?.agent&&typeof e.agent.dispatch!="function")throw new Zln("Argument opts.agent must implement Agent");let r=e?.agent?e.agent:new f2o(e);this[u9t]=r,this[V$]=r[V$],this[b$e]=A2o(e)}get(e){let r=this[Xln](e);return r||(r=this[T$e](e),this[C$e](e,r)),r}dispatch(e,r){return this.get(e.origin),this[u9t].dispatch(e,r)}async close(){await this[u9t].close(),this[V$].clear()}deactivate(){this[v$e]=!1}activate(){this[v$e]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[W$])?this[W$].push(e):this[W$]=[e];else if(typeof e>"u")this[W$]=!0;else throw new Zln("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[W$]=!1}get isMockActive(){return this[v$e]}[C$e](e,r){this[V$].set(e,r)}[T$e](e){let r=Object.assign({agent:this},this[b$e]);return this[b$e]&&this[b$e].connections===1?new h2o(e,r):new m2o(e,r)}[Xln](e){let r=this[V$].get(e);if(r)return r;if(typeof e!="string"){let n=this[T$e]("http://localhost:9999");return this[C$e](e,n),n}for(let[n,o]of Array.from(this[V$]))if(o&&typeof n!="string"&&g2o(n,e)){let s=this[T$e](e);return this[C$e](e,s),s[d9t]=o[d9t],s}}[p2o](){return this[W$]}pendingInterceptors(){let e=this[V$];return Array.from(e.entries()).flatMap(([r,n])=>n[d9t].map(o=>({...o,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new C2o}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new _2o("interceptor","interceptors").pluralize(r.length);throw new y2o(` ${n.count} ${n.noun} ${n.is} pending: ${e.format(r)} -`.trim())}};tln.exports=VFt});var AVe=T((uMu,sln)=>{"use strict";f();var nln=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:_wo}=xa(),vwo=zoe();oln()===void 0&&iln(new vwo);function iln(t){if(!t||typeof t.dispatch!="function")throw new _wo("Argument agent must implement Agent");Object.defineProperty(globalThis,nln,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(iln,"setGlobalDispatcher");function oln(){return globalThis[nln]}a(oln,"getGlobalDispatcher");sln.exports={setGlobalDispatcher:iln,getGlobalDispatcher:oln}});var yVe=T((hMu,aln)=>{"use strict";f();aln.exports=class{static{a(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var lln=T((AMu,cln)=>{"use strict";f();var bwo=K$e();cln.exports=t=>{let e=t?.maxRedirections;return r=>a(function(o,s){let{maxRedirections:c=e,...l}=o;if(!c)return r(o,s);let u=new bwo(r,c,o,s);return r(l,u)},"redirectInterceptor")}});var dln=T((CMu,uln)=>{"use strict";f();var Two=aVe();uln.exports=t=>e=>a(function(n,o){return e(n,new Two({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var pln=T((bMu,fln)=>{"use strict";f();var Swo=rs(),{InvalidArgumentError:Iwo,RequestAbortedError:xwo}=xa(),wwo=yVe(),WFt=class extends wwo{static{a(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#i=0;#o=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new Iwo("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#o=e}onHeaders(e,r,n,o){let c=Swo.parseHeaders(r)["content-length"];if(c!=null&&c>this.#e)throw new xwo(`Response size (${c}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#o??e,this.#a.onError(e))}onData(e){return this.#i=this.#i+e.length,this.#i>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#o):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function Rwo({maxSize:t}={maxSize:1024*1024}){return e=>a(function(n,o){let{dumpMaxSize:s=t}=n,c=new WFt({maxSize:s},o);return e(n,c)},"Intercept")}a(Rwo,"createDumpInterceptor");fln.exports=Rwo});var gln=T((IMu,mln)=>{"use strict";f();var{isIP:Pwo}=require("node:net"),{lookup:kwo}=require("node:dns"),Nwo=yVe(),{InvalidArgumentError:ise,InformationalError:Dwo}=xa(),hln=Math.pow(2,31)-1,zFt=class{static{a(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#i}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let o=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(c,l)=>{if(c||l==null||l.length===0){n(c??new Dwo("No DNS entries found"));return}this.setRecords(e,l);let u=this.#n.get(e.hostname),d=this.pick(e,u,s.affinity),p;typeof d.port=="number"?p=`:${d.port}`:e.port!==""?p=`:${e.port}`:p="",n(null,`${e.protocol}//${d.family===6?`[${d.address}]`:d.address}${p}`)});else{let c=this.pick(e,o,s.affinity);if(c==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let l;typeof c.port=="number"?l=`:${c.port}`:e.port!==""?l=`:${e.port}`:l="",n(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${l}`)}}#r(e,r,n){kwo(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let c=new Map;for(let l of s)c.set(`${l.address}:${l.family}`,l);n(null,c.values())})}#i(e,r,n){let o=null,{records:s,offset:c}=r,l;if(this.dualStack?(n==null&&(c==null||c===hln?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?l=s[n]:l=s[n===4?6:4]):l=s[n],l==null||l.ips.length===0)return o;l.offset==null||l.offset===hln?l.offset=0:l.offset++;let u=l.offset%l.ips.length;return o=l.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(l.ips.splice(u,1),this.pick(e,r,n)):o}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let c=o.records[s.family]??{ips:[]};c.ips.push(s),o.records[s.family]=c}this.#n.set(e.hostname,o)}getHandler(e,r){return new YFt(this,e,r)}},YFt=class extends Nwo{static{a(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null;#r=null;#i=null;constructor(e,{origin:r,handler:n,dispatch:o},s){super(n),this.#i=r,this.#r=n,this.#t={...s},this.#e=e,this.#n=o}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#i,this.#t,(r,n)=>{if(r)return this.#r.onError(r);let o={...this.#t,origin:n};this.#n(o,this)});return}this.#r.onError(e);return}case"ENOTFOUND":this.#e.deleteRecord(this.#i);default:this.#r.onError(e);break}}};mln.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new ise("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new ise("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new ise("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new ise("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new ise("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new ise("Invalid pick. Must be a function");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0},o=new zFt(n);return s=>a(function(l,u){let d=l.origin.constructor===URL?l.origin:new URL(l.origin);return Pwo(d.hostname)!==0?s(l,u):(o.runLookup(d,l,(p,h)=>{if(p)return u.onError(p);let m=null;m={...l,servername:d.hostname,origin:h,headers:{host:d.hostname,...l.headers}},s(m,o.getHandler({origin:d,dispatch:s,handler:u},l))}),!0)},"dnsInterceptor")}});var qV=T((RMu,bln)=>{"use strict";f();var{kConstruct:Mwo}=Du(),{kEnumerableProperty:ose}=rs(),{iteratorMixin:Owo,isValidHeaderName:eve,isValidHeaderValue:yln}=mv(),{webidl:ia}=Bm(),KFt=require("node:assert"),EVe=require("node:util"),I0=Symbol("headers map"),yv=Symbol("headers map sorted");function Aln(t){return t===10||t===13||t===9||t===32}a(Aln,"isHTTPWhiteSpaceCharCode");function Eln(t){let e=0,r=t.length;for(;r>e&&Aln(t.charCodeAt(r-1));)--r;for(;r>e&&Aln(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}a(Eln,"headerValueNormalize");function Cln(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}a(Cln,"fill");function JFt(t,e,r){if(r=Eln(r),eve(e)){if(!yln(r))throw ia.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw ia.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(vln(t)==="immutable")throw new TypeError("immutable");return XFt(t).append(e,r,!1)}a(JFt,"appendHeader");function _ln(t,e){return t[0]>1),r[d][0]<=p[0]?u=d+1:l=d;if(s!==d){for(c=s;c>u;)r[c]=r[--c];r[u]=p}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:o,1:{value:s}}of this[I0])r[n++]=[o,s],KFt(s!==null);return r.sort(_ln)}}},bw=class t{static{a(this,"Headers")}#e;#t;constructor(e=void 0){ia.util.markAsUncloneable(this),e!==Mwo&&(this.#t=new CVe,this.#e="none",e!==void 0&&(e=ia.converters.HeadersInit(e,"Headers contructor","init"),Cln(this,e)))}append(e,r){ia.brandCheck(this,t),ia.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=ia.converters.ByteString(e,n,"name"),r=ia.converters.ByteString(r,n,"value"),JFt(this,e,r)}delete(e){if(ia.brandCheck(this,t),ia.argumentLengthCheck(arguments,1,"Headers.delete"),e=ia.converters.ByteString(e,"Headers.delete","name"),!eve(e))throw ia.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){ia.brandCheck(this,t),ia.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=ia.converters.ByteString(e,r,"name"),!eve(e))throw ia.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){ia.brandCheck(this,t),ia.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=ia.converters.ByteString(e,r,"name"),!eve(e))throw ia.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){ia.brandCheck(this,t),ia.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=ia.converters.ByteString(e,n,"name"),r=ia.converters.ByteString(r,n,"value"),r=Eln(r),eve(e)){if(!yln(r))throw ia.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw ia.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){ia.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}get[yv](){if(this.#t[yv])return this.#t[yv];let e=[],r=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[yv]=r;for(let o=0;o>"](t,e,r,n.bind(t)):ia.converters["record"](t,e,r)}throw ia.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};bln.exports={fill:Cln,compareHeaderName:_ln,Headers:bw,HeadersList:CVe,getHeadersGuard:vln,setHeadersGuard:Bwo,setHeadersList:Lwo,getHeadersList:XFt}});var rve=T((NMu,Oln)=>{"use strict";f();var{Headers:Rln,HeadersList:Tln,fill:Fwo,getHeadersGuard:Uwo,setHeadersGuard:Pln,setHeadersList:kln}=qV(),{extractBody:Sln,cloneBody:Qwo,mixinBody:qwo,hasFinalizationRegistry:Nln,streamRegistry:Dln,bodyUnusable:Gwo}=Uoe(),ZFt=rs(),Iln=require("node:util"),{kEnumerableProperty:Ev}=ZFt,{isValidReasonPhrase:Hwo,isCancelled:jwo,isAborted:$wo,isBlobLike:Vwo,serializeJavascriptValueToJSONString:Wwo,isErrorLike:zwo,isomorphicEncode:Ywo,environmentSettingsObject:Kwo}=mv(),{redirectStatusSet:Jwo,nullBodyStatus:Xwo}=S1e(),{kState:Ou,kHeaders:u4}=a9(),{webidl:To}=Bm(),{FormData:Zwo}=k1e(),{URLSerializer:xln}=SC(),{kConstruct:vVe}=Du(),e9t=require("node:assert"),{types:eRo}=require("node:util"),tRo=new TextEncoder("utf-8"),GV=class t{static{a(this,"Response")}static error(){return tve(bVe(),"immutable")}static json(e,r={}){To.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=To.converters.ResponseInit(r));let n=tRo.encode(Wwo(e)),o=Sln(n),s=tve(sse({}),"response");return wln(s,r,{body:o[0],type:"application/json"}),s}static redirect(e,r=302){To.argumentLengthCheck(arguments,1,"Response.redirect"),e=To.converters.USVString(e),r=To.converters["unsigned short"](r);let n;try{n=new URL(e,Kwo.settingsObject.baseUrl)}catch(c){throw new TypeError(`Failed to parse URL from ${e}`,{cause:c})}if(!Jwo.has(r))throw new RangeError(`Invalid status code ${r}`);let o=tve(sse({}),"immutable");o[Ou].status=r;let s=Ywo(xln(n));return o[Ou].headersList.append("location",s,!0),o}constructor(e=null,r={}){if(To.util.markAsUncloneable(this),e===vVe)return;e!==null&&(e=To.converters.BodyInit(e)),r=To.converters.ResponseInit(r),this[Ou]=sse({}),this[u4]=new Rln(vVe),Pln(this[u4],"response"),kln(this[u4],this[Ou].headersList);let n=null;if(e!=null){let[o,s]=Sln(e);n={body:o,type:s}}wln(this,r,n)}get type(){return To.brandCheck(this,t),this[Ou].type}get url(){To.brandCheck(this,t);let e=this[Ou].urlList,r=e[e.length-1]??null;return r===null?"":xln(r,!0)}get redirected(){return To.brandCheck(this,t),this[Ou].urlList.length>1}get status(){return To.brandCheck(this,t),this[Ou].status}get ok(){return To.brandCheck(this,t),this[Ou].status>=200&&this[Ou].status<=299}get statusText(){return To.brandCheck(this,t),this[Ou].statusText}get headers(){return To.brandCheck(this,t),this[u4]}get body(){return To.brandCheck(this,t),this[Ou].body?this[Ou].body.stream:null}get bodyUsed(){return To.brandCheck(this,t),!!this[Ou].body&&ZFt.isDisturbed(this[Ou].body.stream)}clone(){if(To.brandCheck(this,t),Gwo(this))throw To.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=t9t(this[Ou]);return Nln&&this[Ou].body?.stream&&Dln.register(this,new WeakRef(this[Ou].body.stream)),tve(e,Uwo(this[u4]))}[Iln.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${Iln.formatWithOptions(r,n)}`}};qwo(GV);Object.defineProperties(GV.prototype,{type:Ev,url:Ev,status:Ev,ok:Ev,redirected:Ev,statusText:Ev,headers:Ev,clone:Ev,body:Ev,bodyUsed:Ev,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(GV,{json:Ev,redirect:Ev,error:Ev});function t9t(t){if(t.internalResponse)return Mln(t9t(t.internalResponse),t.type);let e=sse({...t,body:null});return t.body!=null&&(e.body=Qwo(e,t.body)),e}a(t9t,"cloneResponse");function sse(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new Tln(t?.headersList):new Tln,urlList:t?.urlList?[...t.urlList]:[]}}a(sse,"makeResponse");function bVe(t){let e=zwo(t);return sse({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}a(bVe,"makeNetworkError");function rRo(t){return t.type==="error"&&t.status===0}a(rRo,"isNetworkError");function _Ve(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,o){return e9t(!(n in e)),r[n]=o,!0}})}a(_Ve,"makeFilteredResponse");function Mln(t,e){if(e==="basic")return _Ve(t,{type:"basic",headersList:t.headersList});if(e==="cors")return _Ve(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return _Ve(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return _Ve(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});e9t(!1)}a(Mln,"filterResponse");function nRo(t,e=null){return e9t(jwo(t)),$wo(t)?bVe(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):bVe(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}a(nRo,"makeAppropriateNetworkError");function wln(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!Hwo(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[Ou].status=e.status),"statusText"in e&&e.statusText!=null&&(t[Ou].statusText=e.statusText),"headers"in e&&e.headers!=null&&Fwo(t[u4],e.headers),r){if(Xwo.includes(t.status))throw To.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});t[Ou].body=r.body,r.type!=null&&!t[Ou].headersList.contains("content-type",!0)&&t[Ou].headersList.append("content-type",r.type,!0)}}a(wln,"initializeResponse");function tve(t,e){let r=new GV(vVe);return r[Ou]=t,r[u4]=new Rln(vVe),kln(r[u4],t.headersList),Pln(r[u4],e),Nln&&t.body?.stream&&Dln.register(r,new WeakRef(t.body.stream)),r}a(tve,"fromInnerResponse");To.converters.ReadableStream=To.interfaceConverter(ReadableStream);To.converters.FormData=To.interfaceConverter(Zwo);To.converters.URLSearchParams=To.interfaceConverter(URLSearchParams);To.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?To.converters.USVString(t,e,r):Vwo(t)?To.converters.Blob(t,e,r,{strict:!1}):ArrayBuffer.isView(t)||eRo.isArrayBuffer(t)?To.converters.BufferSource(t,e,r):ZFt.isFormDataLike(t)?To.converters.FormData(t,e,r,{strict:!1}):t instanceof URLSearchParams?To.converters.URLSearchParams(t,e,r):To.converters.DOMString(t,e,r)};To.converters.BodyInit=function(t,e,r){return t instanceof ReadableStream?To.converters.ReadableStream(t,e,r):t?.[Symbol.asyncIterator]?t:To.converters.XMLHttpRequestBodyInit(t,e,r)};To.converters.ResponseInit=To.dictionaryConverter([{key:"status",converter:To.converters["unsigned short"],defaultValue:a(()=>200,"defaultValue")},{key:"statusText",converter:To.converters.ByteString,defaultValue:a(()=>"","defaultValue")},{key:"headers",converter:To.converters.HeadersInit}]);Oln.exports={isNetworkError:rRo,makeNetworkError:bVe,makeResponse:sse,makeAppropriateNetworkError:nRo,filterResponse:Mln,Response:GV,cloneResponse:t9t,fromInnerResponse:tve}});var Uln=T((OMu,Fln)=>{"use strict";f();var{kConnected:Bln,kSize:Lln}=Du(),r9t=class{static{a(this,"CompatWeakRef")}constructor(e){this.value=e}deref(){return this.value[Bln]===0&&this.value[Lln]===0?void 0:this.value}},n9t=class{static{a(this,"CompatFinalizer")}constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[Bln]===0&&e[Lln]===0&&this.finalizer(r)})}unregister(e){}};Fln.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18")?(process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:r9t,FinalizationRegistry:n9t}):{WeakRef,FinalizationRegistry}}});var ase=T((FMu,eun)=>{"use strict";f();var{extractBody:iRo,mixinBody:oRo,cloneBody:sRo,bodyUnusable:Qln}=Uoe(),{Headers:Yln,fill:aRo,HeadersList:xVe,setHeadersGuard:o9t,getHeadersGuard:cRo,setHeadersList:Kln,getHeadersList:qln}=qV(),{FinalizationRegistry:lRo}=Uln()(),SVe=rs(),Gln=require("node:util"),{isValidHTTPToken:uRo,sameOrigin:Hln,environmentSettingsObject:TVe}=mv(),{forbiddenMethodsSet:dRo,corsSafeListedMethodsSet:fRo,referrerPolicy:pRo,requestRedirect:hRo,requestMode:mRo,requestCredentials:gRo,requestCache:ARo,requestDuplex:yRo}=S1e(),{kEnumerableProperty:x0,normalizedMethodRecordsBase:ERo,normalizedMethodRecords:CRo}=SVe,{kHeaders:Cv,kSignal:IVe,kState:tu,kDispatcher:i9t}=a9(),{webidl:mi}=Bm(),{URLSerializer:_Ro}=SC(),{kConstruct:wVe}=Du(),vRo=require("node:assert"),{getMaxListeners:jln,setMaxListeners:$ln,getEventListeners:bRo,defaultMaxListeners:Vln}=require("node:events"),TRo=Symbol("abortController"),Jln=new lRo(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),RVe=new WeakMap;function Wln(t){return e;function e(){let r=t.deref();if(r!==void 0){Jln.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=RVe.get(r.signal);if(n!==void 0){if(n.size!==0){for(let o of n){let s=o.deref();s!==void 0&&s.abort(this.reason)}n.clear()}RVe.delete(r.signal)}}}}a(Wln,"buildAbort");var zln=!1,E9=class t{static{a(this,"Request")}constructor(e,r={}){if(mi.util.markAsUncloneable(this),e===wVe)return;let n="Request constructor";mi.argumentLengthCheck(arguments,1,n),e=mi.converters.RequestInfo(e,n,"input"),r=mi.converters.RequestInit(r,n,"init");let o=null,s=null,c=TVe.settingsObject.baseUrl,l=null;if(typeof e=="string"){this[i9t]=r.dispatcher;let _;try{_=new URL(e,c)}catch(v){throw new TypeError("Failed to parse URL from "+e,{cause:v})}if(_.username||_.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);o=PVe({urlList:[_]}),s="cors"}else this[i9t]=r.dispatcher||e[i9t],vRo(e instanceof t),o=e[tu],l=e[IVe];let u=TVe.settingsObject.origin,d="client";if(o.window?.constructor?.name==="EnvironmentSettingsObject"&&Hln(o.window,u)&&(d=o.window),r.window!=null)throw new TypeError(`'window' option '${d}' must be null`);"window"in r&&(d="no-window"),o=PVe({method:o.method,headersList:o.headersList,unsafeRequest:o.unsafeRequest,client:TVe.settingsObject,window:d,priority:o.priority,origin:o.origin,referrer:o.referrer,referrerPolicy:o.referrerPolicy,mode:o.mode,credentials:o.credentials,cache:o.cache,redirect:o.redirect,integrity:o.integrity,keepalive:o.keepalive,reloadNavigation:o.reloadNavigation,historyNavigation:o.historyNavigation,urlList:[...o.urlList]});let p=Object.keys(r).length!==0;if(p&&(o.mode==="navigate"&&(o.mode="same-origin"),o.reloadNavigation=!1,o.historyNavigation=!1,o.origin="client",o.referrer="client",o.referrerPolicy="",o.url=o.urlList[o.urlList.length-1],o.urlList=[o.url]),r.referrer!==void 0){let _=r.referrer;if(_==="")o.referrer="no-referrer";else{let v;try{v=new URL(_,c)}catch(b){throw new TypeError(`Referrer "${_}" is not a valid URL.`,{cause:b})}v.protocol==="about:"&&v.hostname==="client"||u&&!Hln(v,TVe.settingsObject.baseUrl)?o.referrer="client":o.referrer=v}}r.referrerPolicy!==void 0&&(o.referrerPolicy=r.referrerPolicy);let h;if(r.mode!==void 0?h=r.mode:h=s,h==="navigate")throw mi.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(h!=null&&(o.mode=h),r.credentials!==void 0&&(o.credentials=r.credentials),r.cache!==void 0&&(o.cache=r.cache),o.cache==="only-if-cached"&&o.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(o.redirect=r.redirect),r.integrity!=null&&(o.integrity=String(r.integrity)),r.keepalive!==void 0&&(o.keepalive=!!r.keepalive),r.method!==void 0){let _=r.method,v=CRo[_];if(v!==void 0)o.method=v;else{if(!uRo(_))throw new TypeError(`'${_}' is not a valid HTTP method.`);let b=_.toUpperCase();if(dRo.has(b))throw new TypeError(`'${_}' HTTP method is unsupported.`);_=ERo[b]??_,o.method=_}!zln&&o.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),zln=!0)}r.signal!==void 0&&(l=r.signal),this[tu]=o;let m=new AbortController;if(this[IVe]=m.signal,l!=null){if(!l||typeof l.aborted!="boolean"||typeof l.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(l.aborted)m.abort(l.reason);else{this[TRo]=m;let _=new WeakRef(m),v=Wln(_);try{(typeof jln=="function"&&jln(l)===Vln||bRo(l,"abort").length>=Vln)&&$ln(1500,l)}catch{}SVe.addAbortListener(l,v),Jln.register(m,{signal:l,abort:v},v)}}if(this[Cv]=new Yln(wVe),Kln(this[Cv],o.headersList),o9t(this[Cv],"request"),h==="no-cors"){if(!fRo.has(o.method))throw new TypeError(`'${o.method} is unsupported in no-cors mode.`);o9t(this[Cv],"request-no-cors")}if(p){let _=qln(this[Cv]),v=r.headers!==void 0?r.headers:new xVe(_);if(_.clear(),v instanceof xVe){for(let{name:b,value:I}of v.rawValues())_.append(b,I,!1);_.cookies=v.cookies}else aRo(this[Cv],v)}let g=e instanceof t?e[tu].body:null;if((r.body!=null||g!=null)&&(o.method==="GET"||o.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[_,v]=iRo(r.body,o.keepalive);A=_,v&&!qln(this[Cv]).contains("content-type",!0)&&this[Cv].append("content-type",v)}let y=A??g;if(y!=null&&y.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(o.mode!=="same-origin"&&o.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');o.useCORSPreflightFlag=!0}let E=y;if(A==null&&g!=null){if(Qln(e))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let _=new TransformStream;g.stream.pipeThrough(_),E={source:g.source,length:g.length,stream:_.readable}}this[tu].body=E}get method(){return mi.brandCheck(this,t),this[tu].method}get url(){return mi.brandCheck(this,t),_Ro(this[tu].url)}get headers(){return mi.brandCheck(this,t),this[Cv]}get destination(){return mi.brandCheck(this,t),this[tu].destination}get referrer(){return mi.brandCheck(this,t),this[tu].referrer==="no-referrer"?"":this[tu].referrer==="client"?"about:client":this[tu].referrer.toString()}get referrerPolicy(){return mi.brandCheck(this,t),this[tu].referrerPolicy}get mode(){return mi.brandCheck(this,t),this[tu].mode}get credentials(){return this[tu].credentials}get cache(){return mi.brandCheck(this,t),this[tu].cache}get redirect(){return mi.brandCheck(this,t),this[tu].redirect}get integrity(){return mi.brandCheck(this,t),this[tu].integrity}get keepalive(){return mi.brandCheck(this,t),this[tu].keepalive}get isReloadNavigation(){return mi.brandCheck(this,t),this[tu].reloadNavigation}get isHistoryNavigation(){return mi.brandCheck(this,t),this[tu].historyNavigation}get signal(){return mi.brandCheck(this,t),this[IVe]}get body(){return mi.brandCheck(this,t),this[tu].body?this[tu].body.stream:null}get bodyUsed(){return mi.brandCheck(this,t),!!this[tu].body&&SVe.isDisturbed(this[tu].body.stream)}get duplex(){return mi.brandCheck(this,t),"half"}clone(){if(mi.brandCheck(this,t),Qln(this))throw new TypeError("unusable");let e=Xln(this[tu]),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=RVe.get(this.signal);n===void 0&&(n=new Set,RVe.set(this.signal,n));let o=new WeakRef(r);n.add(o),SVe.addAbortListener(r.signal,Wln(o))}return Zln(e,r.signal,cRo(this[Cv]))}[Gln.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${Gln.formatWithOptions(r,n)}`}};oRo(E9);function PVe(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new xVe(t.headersList):new xVe}}a(PVe,"makeRequest");function Xln(t){let e=PVe({...t,body:null});return t.body!=null&&(e.body=sRo(e,t.body)),e}a(Xln,"cloneRequest");function Zln(t,e,r){let n=new E9(wVe);return n[tu]=t,n[IVe]=e,n[Cv]=new Yln(wVe),Kln(n[Cv],t.headersList),o9t(n[Cv],r),n}a(Zln,"fromInnerRequest");Object.defineProperties(E9.prototype,{method:x0,url:x0,headers:x0,redirect:x0,clone:x0,signal:x0,duplex:x0,destination:x0,body:x0,bodyUsed:x0,isHistoryNavigation:x0,isReloadNavigation:x0,keepalive:x0,integrity:x0,cache:x0,credentials:x0,attribute:x0,referrerPolicy:x0,referrer:x0,mode:x0,[Symbol.toStringTag]:{value:"Request",configurable:!0}});mi.converters.Request=mi.interfaceConverter(E9);mi.converters.RequestInfo=function(t,e,r){return typeof t=="string"?mi.converters.USVString(t,e,r):t instanceof E9?mi.converters.Request(t,e,r):mi.converters.USVString(t,e,r)};mi.converters.AbortSignal=mi.interfaceConverter(AbortSignal);mi.converters.RequestInit=mi.dictionaryConverter([{key:"method",converter:mi.converters.ByteString},{key:"headers",converter:mi.converters.HeadersInit},{key:"body",converter:mi.nullableConverter(mi.converters.BodyInit)},{key:"referrer",converter:mi.converters.USVString},{key:"referrerPolicy",converter:mi.converters.DOMString,allowedValues:pRo},{key:"mode",converter:mi.converters.DOMString,allowedValues:mRo},{key:"credentials",converter:mi.converters.DOMString,allowedValues:gRo},{key:"cache",converter:mi.converters.DOMString,allowedValues:ARo},{key:"redirect",converter:mi.converters.DOMString,allowedValues:hRo},{key:"integrity",converter:mi.converters.DOMString},{key:"keepalive",converter:mi.converters.boolean},{key:"signal",converter:mi.nullableConverter(t=>mi.converters.AbortSignal(t,"RequestInit","signal",{strict:!1}))},{key:"window",converter:mi.converters.any},{key:"duplex",converter:mi.converters.DOMString,allowedValues:yRo},{key:"dispatcher",converter:mi.converters.any}]);eun.exports={Request:E9,makeRequest:PVe,fromInnerRequest:Zln,cloneRequest:Xln}});var ive=T((qMu,gun)=>{"use strict";f();var{makeNetworkError:sc,makeAppropriateNetworkError:kVe,filterResponse:s9t,makeResponse:NVe,fromInnerResponse:SRo}=rve(),{HeadersList:tun}=qV(),{Request:IRo,cloneRequest:xRo}=ase(),C9=require("node:zlib"),{bytesMatch:wRo,makePolicyContainer:RRo,clonePolicyContainer:PRo,requestBadPort:kRo,TAOCheck:NRo,appendRequestOriginHeader:DRo,responseLocationURL:MRo,requestCurrentURL:cN,setRequestReferrerPolicyOnRedirect:ORo,tryUpgradeRequestToAPotentiallyTrustworthyURL:BRo,createOpaqueTimingInfo:d9t,appendFetchMetadata:LRo,corsCheck:FRo,crossOriginResourcePolicyCheck:URo,determineRequestsReferrer:QRo,coarsenedSharedCurrentTime:nve,createDeferredPromise:qRo,isBlobLike:GRo,sameOrigin:u9t,isCancelled:HV,isAborted:nun,isErrorLike:HRo,fullyReadBody:jRo,readableStreamClose:$Ro,isomorphicEncode:DVe,urlIsLocal:VRo,urlIsHttpHttpsScheme:f9t,urlHasHttpsScheme:WRo,clampAndCoarsenConnectionTimingInfo:zRo,simpleRangeHeaderValue:YRo,buildContentRange:KRo,createInflate:JRo,extractMimeType:XRo}=mv(),{kState:aun,kDispatcher:ZRo}=a9(),jV=require("node:assert"),{safelyExtractBody:p9t,extractBody:iun}=Uoe(),{redirectStatusSet:cun,nullBodyStatus:lun,safeMethodsSet:e2o,requestBodyHeader:t2o,subresourceSet:r2o}=S1e(),n2o=require("node:events"),{Readable:i2o,pipeline:o2o,finished:s2o}=require("node:stream"),{addAbortListener:a2o,isErrored:c2o,isReadable:MVe,bufferToLowerCasedHeaderName:oun}=rs(),{dataURLProcessor:l2o,serializeAMimeType:u2o,minimizeSupportedMimeType:d2o}=SC(),{getGlobalDispatcher:f2o}=AVe(),{webidl:p2o}=Bm(),{STATUS_CODES:h2o}=require("node:http"),m2o=["GET","HEAD"],g2o=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",a9t,OVe=class extends n2o{static{a(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function A2o(t){uun(t,"fetch")}a(A2o,"handleFetchDone");function y2o(t,e=void 0){p2o.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=qRo(),n;try{n=new IRo(t,e)}catch(p){return r.reject(p),r.promise}let o=n[aun];if(n.signal.aborted)return c9t(r,o,null,n.signal.reason),r.promise;o.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(o.serviceWorkers="none");let c=null,l=!1,u=null;return a2o(n.signal,()=>{l=!0,jV(u!=null),u.abort(n.signal.reason);let p=c?.deref();c9t(r,o,p,n.signal.reason)}),u=fun({request:o,processResponseEndOfBody:A2o,processResponse:a(p=>{if(!l){if(p.aborted){c9t(r,o,c,u.serializedAbortReason);return}if(p.type==="error"){r.reject(new TypeError("fetch failed",{cause:p.error}));return}c=new WeakRef(SRo(p,"immutable")),r.resolve(c.deref()),r=null}},"processResponse"),dispatcher:n[ZRo]}),r.promise}a(y2o,"fetch");function uun(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,o=t.cacheState;f9t(r)&&n!==null&&(t.timingAllowPassed||(n=d9t({startTime:n.startTime}),o=""),n.endTime=nve(),t.timingInfo=n,dun(n,r.href,e,globalThis,o))}a(uun,"finalizeAndReportTiming");var dun=performance.markResourceTiming;function c9t(t,e,r,n){if(t&&t.reject(n),e.body!=null&&MVe(e.body?.stream)&&e.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s}),r==null)return;let o=r[aun];o.body!=null&&MVe(o.body?.stream)&&o.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s})}a(c9t,"abortFetch");function fun({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:o,processResponseConsumeBody:s,useParallelQueue:c=!1,dispatcher:l=f2o()}){jV(l);let u=null,d=!1;t.client!=null&&(u=t.client.globalObject,d=t.client.crossOriginIsolatedCapability);let p=nve(d),h=d9t({startTime:p}),m={controller:new OVe(l),request:t,timingInfo:h,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:s,processResponseEndOfBody:o,taskDestination:u,crossOriginIsolatedCapability:d};return jV(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=PRo(t.client.policyContainer):t.policyContainer=RRo()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,r2o.has(t.destination),pun(m).catch(g=>{m.controller.terminate(g)}),m.controller}a(fun,"fetching");async function pun(t,e=!1){let r=t.request,n=null;if(r.localURLsOnly&&!VRo(cN(r))&&(n=sc("local URLs only")),BRo(r),kRo(r)==="blocked"&&(n=sc("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=QRo(r)),n===null&&(n=await(async()=>{let s=cN(r);return u9t(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await sun(t)):r.mode==="same-origin"?sc('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?sc('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await sun(t)):f9t(cN(r))?(r.responseTainting="cors",await hun(t)):sc("URL scheme must be a HTTP(S) scheme")})()),e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=s9t(n,"basic"):r.responseTainting==="cors"?n=s9t(n,"cors"):r.responseTainting==="opaque"?n=s9t(n,"opaque"):jV(!1));let o=n.status===0?n:n.internalResponse;if(o.urlList.length===0&&o.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&o.status===206&&o.rangeRequested&&!r.headers.contains("range",!0)&&(n=o=sc()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||lun.includes(o.status))&&(o.body=null,t.controller.dump=!0),r.integrity){let s=a(l=>l9t(t,sc(l)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){s(n.error);return}let c=a(l=>{if(!wRo(l,r.integrity)){s("integrity mismatch");return}n.body=p9t(l)[0],l9t(t,n)},"processBody");await jRo(n.body,c,s)}else l9t(t,n)}a(pun,"mainFetch");function sun(t){if(HV(t)&&t.request.redirectCount===0)return Promise.resolve(kVe(t));let{request:e}=t,{protocol:r}=cN(e);switch(r){case"about:":return Promise.resolve(sc("about scheme is not supported"));case"blob:":{a9t||(a9t=require("node:buffer").resolveObjectURL);let n=cN(e);if(n.search.length!==0)return Promise.resolve(sc("NetworkError when attempting to fetch resource."));let o=a9t(n.toString());if(e.method!=="GET"||!GRo(o))return Promise.resolve(sc("invalid method"));let s=NVe(),c=o.size,l=DVe(`${c}`),u=o.type;if(e.headersList.contains("range",!0)){s.rangeRequested=!0;let d=e.headersList.get("range",!0),p=YRo(d,!0);if(p==="failure")return Promise.resolve(sc("failed to fetch the data URL"));let{rangeStartValue:h,rangeEndValue:m}=p;if(h===null)h=c-m,m=h+m-1;else{if(h>=c)return Promise.resolve(sc("Range start is greater than the blob's size."));(m===null||m>=c)&&(m=c-1)}let g=o.slice(h,m,u),A=iun(g);s.body=A[0];let y=DVe(`${g.size}`),E=KRo(h,m,c);s.status=206,s.statusText="Partial Content",s.headersList.set("content-length",y,!0),s.headersList.set("content-type",u,!0),s.headersList.set("content-range",E,!0)}else{let d=iun(o);s.statusText="OK",s.body=d[0],s.headersList.set("content-length",l,!0),s.headersList.set("content-type",u,!0)}return Promise.resolve(s)}case"data:":{let n=cN(e),o=l2o(n);if(o==="failure")return Promise.resolve(sc("failed to fetch the data URL"));let s=u2o(o.mimeType);return Promise.resolve(NVe({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:p9t(o.body)[0]}))}case"file:":return Promise.resolve(sc("not implemented... yet..."));case"http:":case"https:":return hun(t).catch(n=>sc(n));default:return Promise.resolve(sc("unknown scheme"))}}a(sun,"schemeFetch");function E2o(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}a(E2o,"finalizeResponse");function l9t(t,e){let r=t.timingInfo,n=a(()=>{let s=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(t.request.url.protocol!=="https:")return;r.endTime=s;let l=e.cacheState,u=e.bodyInfo;e.timingAllowPassed||(r=d9t(r),l="");let d=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){d=e.status;let p=XRo(e.headersList);p!=="failure"&&(u.contentType=d2o(p))}t.request.initiatorType!=null&&dun(r,t.request.url.href,t.request.initiatorType,globalThis,l,u,d)};let c=a(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>c())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let o=e.type==="error"?e:e.internalResponse??e;o.body==null?n():s2o(o.body.stream,()=>{n()})}a(l9t,"fetchFinale");async function hun(t){let e=t.request,r=null,n=null,o=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await mun(t),e.responseTainting==="cors"&&FRo(e,r)==="failure")return sc("cors failure");NRo(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&URo(e.origin,e.client,e.destination,n)==="blocked"?sc("blocked"):(cun.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=sc("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await C2o(t,r):jV(!1)),r.timingInfo=o,r)}a(hun,"httpFetch");function C2o(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,o;try{if(o=MRo(n,cN(r).hash),o==null)return e}catch(c){return Promise.resolve(sc(c))}if(!f9t(o))return Promise.resolve(sc("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(sc("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(o.username||o.password)&&!u9t(r,o))return Promise.resolve(sc('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(o.username||o.password))return Promise.resolve(sc('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(sc());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!m2o.includes(r.method)){r.method="GET",r.body=null;for(let c of t2o)r.headersList.delete(c)}u9t(cN(r),o)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(jV(r.body.source!=null),r.body=p9t(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=nve(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(o),ORo(r,n),pun(t,!0)}a(C2o,"httpRedirectFetch");async function mun(t,e=!1,r=!1){let n=t.request,o=null,s=null,c=null,l=null,u=!1;n.window==="no-window"&&n.redirect==="error"?(o=t,s=n):(s=xRo(n),o={...t},o.request=s);let d=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",p=s.body?s.body.length:null,h=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(h="0"),p!=null&&(h=DVe(`${p}`)),h!=null&&s.headersList.append("content-length",h,!0),p!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append("referer",DVe(s.referrer.href),!0),DRo(s),LRo(s),s.headersList.contains("user-agent",!0)||s.headersList.append("user-agent",g2o),s.cache==="default"&&(s.headersList.contains("if-modified-since",!0)||s.headersList.contains("if-none-match",!0)||s.headersList.contains("if-unmodified-since",!0)||s.headersList.contains("if-match",!0)||s.headersList.contains("if-range",!0))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control",!0)&&s.headersList.append("cache-control","max-age=0",!0),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma",!0)||s.headersList.append("pragma","no-cache",!0),s.headersList.contains("cache-control",!0)||s.headersList.append("cache-control","no-cache",!0)),s.headersList.contains("range",!0)&&s.headersList.append("accept-encoding","identity",!0),s.headersList.contains("accept-encoding",!0)||(WRo(cN(s))?s.headersList.append("accept-encoding","br, gzip, deflate",!0):s.headersList.append("accept-encoding","gzip, deflate",!0)),s.headersList.delete("host",!0),l==null&&(s.cache="no-store"),s.cache!=="no-store"&&s.cache,c==null){if(s.cache==="only-if-cached")return sc("only if cached");let m=await _2o(o,d,r);!e2o.has(s.method)&&m.status>=200&&m.status<=399,u&&m.status,c==null&&(c=m)}if(c.urlList=[...s.urlList],s.headersList.contains("range",!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=d,c.status===407)return n.window==="no-window"?sc():HV(t)?kVe(t):sc("proxy authentication required");if(c.status===421&&!r&&(n.body==null||n.body.source!=null)){if(HV(t))return kVe(t);t.controller.connection.destroy(),c=await mun(t,e,!0)}return c}a(mun,"httpNetworkOrCacheFetch");async function _2o(t,e=!1,r=!1){jV(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,y=!0){this.destroyed||(this.destroyed=!0,y&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,o=null,s=t.timingInfo;null==null&&(n.cache="no-store");let l=r?"yes":"no";n.mode;let u=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=a(async function*(_){HV(t)||(yield _,t.processRequestBodyChunkLength?.(_.byteLength))},"processBodyChunk"),y=a(()=>{HV(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=a(_=>{HV(t)||(_.name==="AbortError"?t.controller.abort():t.controller.terminate(_))},"processBodyError");u=(async function*(){try{for await(let _ of n.body.stream)yield*A(_);y()}catch(_){E(_)}})()}try{let{body:A,status:y,statusText:E,headersList:_,socket:v}=await g({body:u});if(v)o=NVe({status:y,statusText:E,headersList:_,socket:v});else{let b=A[Symbol.asyncIterator]();t.controller.next=()=>b.next(),o=NVe({status:y,statusText:E,headersList:_})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),kVe(t,A)):sc(A)}let d=a(async()=>{await t.controller.resume()},"pullAlgorithm"),p=a(A=>{HV(t)||t.controller.abort(A)},"cancelAlgorithm"),h=new ReadableStream({async start(A){t.controller.controller=A},async pull(A){await d(A)},async cancel(A){await p(A)},type:"bytes"});o.body={stream:h,source:null,length:null},t.controller.onAborted=m,t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,y;try{let{done:_,value:v}=await t.controller.next();if(nun(t))break;A=_?void 0:v}catch(_){t.controller.ended&&!s.encodedBodySize?A=void 0:(A=_,y=!0)}if(A===void 0){$Ro(t.controller.controller),E2o(t,o);return}if(s.decodedBodySize+=A?.byteLength??0,y){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),c2o(h)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){nun(t)?(o.aborted=!0,MVe(h)&&t.controller.controller.error(t.controller.serializedAbortReason)):MVe(h)&&t.controller.controller.error(new TypeError("terminated",{cause:HRo(A)?A:void 0})),t.controller.connection.destroy()}return a(m,"onAborted"),o;function g({body:A}){let y=cN(n),E=t.controller.dispatcher;return new Promise((_,v)=>E.dispatch({path:y.pathname+y.search,origin:y.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(b){let{connection:I}=t.controller;s.finalConnectionTimingInfo=zRo(void 0,s.postRedirectStartTime,t.crossOriginIsolatedCapability),I.destroyed?b(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",b),this.abort=I.abort=b),s.finalNetworkRequestStartTime=nve(t.crossOriginIsolatedCapability)},onResponseStarted(){s.finalNetworkResponseStartTime=nve(t.crossOriginIsolatedCapability)},onHeaders(b,I,x,R){if(b<200)return;let w="",P=new tun;for(let D=0;DO)return v(new Error(`too many content-encodings in response: ${G.length}, maximum allowed is ${O}`)),!0;for(let N=G.length-1;N>=0;--N){let F=G[N].trim();if(F==="x-gzip"||F==="gzip")k.push(C9.createGunzip({flush:C9.constants.Z_SYNC_FLUSH,finishFlush:C9.constants.Z_SYNC_FLUSH}));else if(F==="deflate")k.push(JRo({flush:C9.constants.Z_SYNC_FLUSH,finishFlush:C9.constants.Z_SYNC_FLUSH}));else if(F==="br")k.push(C9.createBrotliDecompress({flush:C9.constants.BROTLI_OPERATION_FLUSH,finishFlush:C9.constants.BROTLI_OPERATION_FLUSH}));else{k.length=0;break}}}let M=this.onError.bind(this);return _({status:b,statusText:R,headersList:P,body:k.length?o2o(this.body,...k,D=>{D&&this.onError(D)}).on("error",M):this.body.on("error",M)}),!0},onData(b){if(t.controller.dump)return;let I=b;return s.encodedBodySize+=I.byteLength,this.body.push(I)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.onAborted&&t.controller.off("terminated",t.controller.onAborted),t.controller.ended=!0,this.body.push(null)},onError(b){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(b),t.controller.terminate(b),v(b)},onUpgrade(b,I,x){if(b!==101)return;let R=new tun;for(let w=0;w{"use strict";f();Aun.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var Eun=T((VMu,yun)=>{"use strict";f();var{webidl:_v}=Bm(),BVe=Symbol("ProgressEvent state"),m9t=class t extends Event{static{a(this,"ProgressEvent")}constructor(e,r={}){e=_v.converters.DOMString(e,"ProgressEvent constructor","type"),r=_v.converters.ProgressEventInit(r??{}),super(e,r),this[BVe]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return _v.brandCheck(this,t),this[BVe].lengthComputable}get loaded(){return _v.brandCheck(this,t),this[BVe].loaded}get total(){return _v.brandCheck(this,t),this[BVe].total}};_v.converters.ProgressEventInit=_v.dictionaryConverter([{key:"lengthComputable",converter:_v.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"loaded",converter:_v.converters["unsigned long long"],defaultValue:a(()=>0,"defaultValue")},{key:"total",converter:_v.converters["unsigned long long"],defaultValue:a(()=>0,"defaultValue")},{key:"bubbles",converter:_v.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:_v.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:_v.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}]);yun.exports={ProgressEvent:m9t}});var _un=T((YMu,Cun)=>{"use strict";f();function v2o(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}a(v2o,"getEncoding");Cun.exports={getEncoding:v2o}});var Run=T((XMu,wun)=>{"use strict";f();var{kState:cse,kError:g9t,kResult:vun,kAborted:ove,kLastProgressEventFired:A9t}=h9t(),{ProgressEvent:b2o}=Eun(),{getEncoding:bun}=_un(),{serializeAMimeType:T2o,parseMIMEType:Tun}=SC(),{types:S2o}=require("node:util"),{StringDecoder:Sun}=require("string_decoder"),{btoa:Iun}=require("node:buffer"),I2o={enumerable:!0,writable:!1,configurable:!1};function x2o(t,e,r,n){if(t[cse]==="loading")throw new DOMException("Invalid state","InvalidStateError");t[cse]="loading",t[vun]=null,t[g9t]=null;let s=e.stream().getReader(),c=[],l=s.read(),u=!0;(async()=>{for(;!t[ove];)try{let{done:d,value:p}=await l;if(u&&!t[ove]&&queueMicrotask(()=>{_9("loadstart",t)}),u=!1,!d&&S2o.isUint8Array(p))c.push(p),(t[A9t]===void 0||Date.now()-t[A9t]>=50)&&!t[ove]&&(t[A9t]=Date.now(),queueMicrotask(()=>{_9("progress",t)})),l=s.read();else if(d){queueMicrotask(()=>{t[cse]="done";try{let h=w2o(c,r,e.type,n);if(t[ove])return;t[vun]=h,_9("load",t)}catch(h){t[g9t]=h,_9("error",t)}t[cse]!=="loading"&&_9("loadend",t)});break}}catch(d){if(t[ove])return;queueMicrotask(()=>{t[cse]="done",t[g9t]=d,_9("error",t),t[cse]!=="loading"&&_9("loadend",t)});break}})()}a(x2o,"readOperation");function _9(t,e){let r=new b2o(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}a(_9,"fireAProgressEvent");function w2o(t,e,r,n){switch(e){case"DataURL":{let o="data:",s=Tun(r||"application/octet-stream");s!=="failure"&&(o+=T2o(s)),o+=";base64,";let c=new Sun("latin1");for(let l of t)o+=Iun(c.write(l));return o+=Iun(c.end()),o}case"Text":{let o="failure";if(n&&(o=bun(n)),o==="failure"&&r){let s=Tun(r);s!=="failure"&&(o=bun(s.parameters.get("charset")))}return o==="failure"&&(o="UTF-8"),R2o(t,o)}case"ArrayBuffer":return xun(t).buffer;case"BinaryString":{let o="",s=new Sun("latin1");for(let c of t)o+=s.write(c);return o+=s.end(),o}}}a(w2o,"packageData");function R2o(t,e){let r=xun(t),n=P2o(r),o=0;n!==null&&(e=n,o=n==="UTF-8"?3:2);let s=r.slice(o);return new TextDecoder(e).decode(s)}a(R2o,"decode");function P2o(t){let[e,r,n]=t;return e===239&&r===187&&n===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}a(P2o,"BOMSniffing");function xun(t){let e=t.reduce((n,o)=>n+o.byteLength,0),r=0;return t.reduce((n,o)=>(n.set(o,r),r+=o.byteLength,n),new Uint8Array(e))}a(xun,"combineByteSequences");wun.exports={staticPropertyDescriptors:I2o,readOperation:x2o,fireAProgressEvent:_9}});var Dun=T((tOu,Nun)=>{"use strict";f();var{staticPropertyDescriptors:lse,readOperation:LVe,fireAProgressEvent:Pun}=Run(),{kState:$V,kError:kun,kResult:FVe,kEvents:Ba,kAborted:k2o}=h9t(),{webidl:Rc}=Bm(),{kEnumerableProperty:wC}=rs(),Tw=class t extends EventTarget{static{a(this,"FileReader")}constructor(){super(),this[$V]="empty",this[FVe]=null,this[kun]=null,this[Ba]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){Rc.brandCheck(this,t),Rc.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),e=Rc.converters.Blob(e,{strict:!1}),LVe(this,e,"ArrayBuffer")}readAsBinaryString(e){Rc.brandCheck(this,t),Rc.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),e=Rc.converters.Blob(e,{strict:!1}),LVe(this,e,"BinaryString")}readAsText(e,r=void 0){Rc.brandCheck(this,t),Rc.argumentLengthCheck(arguments,1,"FileReader.readAsText"),e=Rc.converters.Blob(e,{strict:!1}),r!==void 0&&(r=Rc.converters.DOMString(r,"FileReader.readAsText","encoding")),LVe(this,e,"Text",r)}readAsDataURL(e){Rc.brandCheck(this,t),Rc.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),e=Rc.converters.Blob(e,{strict:!1}),LVe(this,e,"DataURL")}abort(){if(this[$V]==="empty"||this[$V]==="done"){this[FVe]=null;return}this[$V]==="loading"&&(this[$V]="done",this[FVe]=null),this[k2o]=!0,Pun("abort",this),this[$V]!=="loading"&&Pun("loadend",this)}get readyState(){switch(Rc.brandCheck(this,t),this[$V]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return Rc.brandCheck(this,t),this[FVe]}get error(){return Rc.brandCheck(this,t),this[kun]}get onloadend(){return Rc.brandCheck(this,t),this[Ba].loadend}set onloadend(e){Rc.brandCheck(this,t),this[Ba].loadend&&this.removeEventListener("loadend",this[Ba].loadend),typeof e=="function"?(this[Ba].loadend=e,this.addEventListener("loadend",e)):this[Ba].loadend=null}get onerror(){return Rc.brandCheck(this,t),this[Ba].error}set onerror(e){Rc.brandCheck(this,t),this[Ba].error&&this.removeEventListener("error",this[Ba].error),typeof e=="function"?(this[Ba].error=e,this.addEventListener("error",e)):this[Ba].error=null}get onloadstart(){return Rc.brandCheck(this,t),this[Ba].loadstart}set onloadstart(e){Rc.brandCheck(this,t),this[Ba].loadstart&&this.removeEventListener("loadstart",this[Ba].loadstart),typeof e=="function"?(this[Ba].loadstart=e,this.addEventListener("loadstart",e)):this[Ba].loadstart=null}get onprogress(){return Rc.brandCheck(this,t),this[Ba].progress}set onprogress(e){Rc.brandCheck(this,t),this[Ba].progress&&this.removeEventListener("progress",this[Ba].progress),typeof e=="function"?(this[Ba].progress=e,this.addEventListener("progress",e)):this[Ba].progress=null}get onload(){return Rc.brandCheck(this,t),this[Ba].load}set onload(e){Rc.brandCheck(this,t),this[Ba].load&&this.removeEventListener("load",this[Ba].load),typeof e=="function"?(this[Ba].load=e,this.addEventListener("load",e)):this[Ba].load=null}get onabort(){return Rc.brandCheck(this,t),this[Ba].abort}set onabort(e){Rc.brandCheck(this,t),this[Ba].abort&&this.removeEventListener("abort",this[Ba].abort),typeof e=="function"?(this[Ba].abort=e,this.addEventListener("abort",e)):this[Ba].abort=null}};Tw.EMPTY=Tw.prototype.EMPTY=0;Tw.LOADING=Tw.prototype.LOADING=1;Tw.DONE=Tw.prototype.DONE=2;Object.defineProperties(Tw.prototype,{EMPTY:lse,LOADING:lse,DONE:lse,readAsArrayBuffer:wC,readAsBinaryString:wC,readAsText:wC,readAsDataURL:wC,abort:wC,readyState:wC,result:wC,error:wC,onloadstart:wC,onprogress:wC,onload:wC,onabort:wC,onerror:wC,onloadend:wC,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Tw,{EMPTY:lse,LOADING:lse,DONE:lse});Nun.exports={FileReader:Tw}});var UVe=T((iOu,Mun)=>{"use strict";f();Mun.exports={kConstruct:Du().kConstruct}});var Fun=T((sOu,Lun)=>{"use strict";f();var N2o=require("node:assert"),{URLSerializer:Oun}=SC(),{isValidHeaderName:D2o}=mv();function M2o(t,e,r=!1){let n=Oun(t,r),o=Oun(e,r);return n===o}a(M2o,"urlEquals");function O2o(t){N2o(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),D2o(r)&&e.push(r);return e}a(O2o,"getFieldValues");Lun.exports={urlEquals:M2o,getFieldValues:O2o}});var qun=T((lOu,Qun)=>{"use strict";f();var{kConstruct:B2o}=UVe(),{urlEquals:L2o,getFieldValues:y9t}=Fun(),{kEnumerableProperty:VV,isDisturbed:F2o}=rs(),{webidl:Wn}=Bm(),{Response:U2o,cloneResponse:Q2o,fromInnerResponse:q2o}=rve(),{Request:d4,fromInnerRequest:G2o}=ase(),{kState:Sw}=a9(),{fetching:H2o}=ive(),{urlIsHttpHttpsScheme:QVe,createDeferredPromise:use,readAllBytes:j2o}=mv(),E9t=require("node:assert"),qVe=class t{static{a(this,"Cache")}#e;constructor(){arguments[0]!==B2o&&Wn.illegalConstructor(),Wn.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){Wn.brandCheck(this,t);let n="Cache.match";Wn.argumentLengthCheck(arguments,1,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=this.#i(e,r,1);if(o.length!==0)return o[0]}async matchAll(e=void 0,r={}){Wn.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=Wn.converters.RequestInfo(e,n,"request")),r=Wn.converters.CacheQueryOptions(r,n,"options"),this.#i(e,r)}async add(e){Wn.brandCheck(this,t);let r="Cache.add";Wn.argumentLengthCheck(arguments,1,r),e=Wn.converters.RequestInfo(e,r,"request");let n=[e];return await this.addAll(n)}async addAll(e){Wn.brandCheck(this,t);let r="Cache.addAll";Wn.argumentLengthCheck(arguments,1,r);let n=[],o=[];for(let m of e){if(m===void 0)throw Wn.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=Wn.converters.RequestInfo(m),typeof m=="string")continue;let g=m[Sw];if(!QVe(g.url)||g.method!=="GET")throw Wn.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let s=[];for(let m of e){let g=new d4(m)[Sw];if(!QVe(g.url))throw Wn.errors.exception({header:r,message:"Expected http/s scheme."});g.initiator="fetch",g.destination="subresource",o.push(g);let A=use();s.push(H2o({request:g,processResponse(y){if(y.type==="error"||y.status===206||y.status<200||y.status>299)A.reject(Wn.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(y.headersList.contains("vary")){let E=y9t(y.headersList.get("vary"));for(let _ of E)if(_==="*"){A.reject(Wn.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let v of s)v.abort();return}}},processResponseEndOfBody(y){if(y.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(y)}})),n.push(A.promise)}let l=await Promise.all(n),u=[],d=0;for(let m of l){let g={type:"put",request:o[d],response:m};u.push(g),d++}let p=use(),h=null;try{this.#t(u)}catch(m){h=m}return queueMicrotask(()=>{h===null?p.resolve(void 0):p.reject(h)}),p.promise}async put(e,r){Wn.brandCheck(this,t);let n="Cache.put";Wn.argumentLengthCheck(arguments,2,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.Response(r,n,"response");let o=null;if(e instanceof d4?o=e[Sw]:o=new d4(e)[Sw],!QVe(o.url)||o.method!=="GET")throw Wn.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let s=r[Sw];if(s.status===206)throw Wn.errors.exception({header:n,message:"Got 206 status"});if(s.headersList.contains("vary")){let g=y9t(s.headersList.get("vary"));for(let A of g)if(A==="*")throw Wn.errors.exception({header:n,message:"Got * vary field value"})}if(s.body&&(F2o(s.body.stream)||s.body.stream.locked))throw Wn.errors.exception({header:n,message:"Response body is locked or disturbed"});let c=Q2o(s),l=use();if(s.body!=null){let A=s.body.stream.getReader();j2o(A).then(l.resolve,l.reject)}else l.resolve(void 0);let u=[],d={type:"put",request:o,response:c};u.push(d);let p=await l.promise;c.body!=null&&(c.body.source=p);let h=use(),m=null;try{this.#t(u)}catch(g){m=g}return queueMicrotask(()=>{m===null?h.resolve():h.reject(m)}),h.promise}async delete(e,r={}){Wn.brandCheck(this,t);let n="Cache.delete";Wn.argumentLengthCheck(arguments,1,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e instanceof d4){if(o=e[Sw],o.method!=="GET"&&!r.ignoreMethod)return!1}else E9t(typeof e=="string"),o=new d4(e)[Sw];let s=[],c={type:"delete",request:o,options:r};s.push(c);let l=use(),u=null,d;try{d=this.#t(s)}catch(p){u=p}return queueMicrotask(()=>{u===null?l.resolve(!!d?.length):l.reject(u)}),l.promise}async keys(e=void 0,r={}){Wn.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=Wn.converters.RequestInfo(e,n,"request")),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e!==void 0)if(e instanceof d4){if(o=e[Sw],o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=new d4(e)[Sw]);let s=use(),c=[];if(e===void 0)for(let l of this.#e)c.push(l[0]);else{let l=this.#n(o,r);for(let u of l)c.push(u[0])}return queueMicrotask(()=>{let l=[];for(let u of c){let d=G2o(u,new AbortController().signal,"immutable");l.push(d)}s.resolve(Object.freeze(l))}),s.promise}#t(e){let r=this.#e,n=[...r],o=[],s=[];try{for(let c of e){if(c.type!=="delete"&&c.type!=="put")throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(c.type==="delete"&&c.response!=null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#n(c.request,c.options,o).length)throw new DOMException("???","InvalidStateError");let l;if(c.type==="delete"){if(l=this.#n(c.request,c.options),l.length===0)return[];for(let u of l){let d=r.indexOf(u);E9t(d!==-1),r.splice(d,1)}}else if(c.type==="put"){if(c.response==null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let u=c.request;if(!QVe(u.url))throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(u.method!=="GET")throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(c.options!=null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});l=this.#n(c.request);for(let d of l){let p=r.indexOf(d);E9t(p!==-1),r.splice(p,1)}r.push([c.request,c.response]),o.push([c.request,c.response])}s.push([c.request,c.response])}return s}catch(c){throw this.#e.length=0,this.#e=n,c}}#n(e,r,n){let o=[],s=n??this.#e;for(let c of s){let[l,u]=c;this.#r(e,l,u,r)&&o.push(c)}return o}#r(e,r,n=null,o){let s=new URL(e.url),c=new URL(r.url);if(o?.ignoreSearch&&(c.search="",s.search=""),!L2o(s,c,!0))return!1;if(n==null||o?.ignoreVary||!n.headersList.contains("vary"))return!0;let l=y9t(n.headersList.get("vary"));for(let u of l){if(u==="*")return!1;let d=r.headersList.get(u),p=e.headersList.get(u);if(d!==p)return!1}return!0}#i(e,r,n=1/0){let o=null;if(e!==void 0)if(e instanceof d4){if(o=e[Sw],o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=new d4(e)[Sw]);let s=[];if(e===void 0)for(let l of this.#e)s.push(l[1]);else{let l=this.#n(o,r);for(let u of l)s.push(u[1])}let c=[];for(let l of s){let u=q2o(l,"immutable");if(c.push(u.clone()),c.length>=n)break}return Object.freeze(c)}};Object.defineProperties(qVe.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:VV,matchAll:VV,add:VV,addAll:VV,put:VV,delete:VV,keys:VV});var Uun=[{key:"ignoreSearch",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreVary",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Wn.converters.CacheQueryOptions=Wn.dictionaryConverter(Uun);Wn.converters.MultiCacheQueryOptions=Wn.dictionaryConverter([...Uun,{key:"cacheName",converter:Wn.converters.DOMString}]);Wn.converters.Response=Wn.interfaceConverter(U2o);Wn.converters["sequence"]=Wn.sequenceConverter(Wn.converters.RequestInfo);Qun.exports={Cache:qVe}});var Hun=T((fOu,Gun)=>{"use strict";f();var{kConstruct:sve}=UVe(),{Cache:GVe}=qun(),{webidl:iA}=Bm(),{kEnumerableProperty:ave}=rs(),HVe=class t{static{a(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==sve&&iA.illegalConstructor(),iA.util.markAsUncloneable(this)}async match(e,r={}){if(iA.brandCheck(this,t),iA.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=iA.converters.RequestInfo(e),r=iA.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new GVe(sve,n).match(e,r)}}else for(let n of this.#e.values()){let s=await new GVe(sve,n).match(e,r);if(s!==void 0)return s}}async has(e){iA.brandCheck(this,t);let r="CacheStorage.has";return iA.argumentLengthCheck(arguments,1,r),e=iA.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){iA.brandCheck(this,t);let r="CacheStorage.open";if(iA.argumentLengthCheck(arguments,1,r),e=iA.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let o=this.#e.get(e);return new GVe(sve,o)}let n=[];return this.#e.set(e,n),new GVe(sve,n)}async delete(e){iA.brandCheck(this,t);let r="CacheStorage.delete";return iA.argumentLengthCheck(arguments,1,r),e=iA.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return iA.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(HVe.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:ave,has:ave,open:ave,delete:ave,keys:ave});Gun.exports={CacheStorage:HVe}});var $un=T((mOu,jun)=>{"use strict";f();jun.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var C9t=T((AOu,Kun)=>{"use strict";f();function $2o(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}a($2o,"isCTLExcludingHtab");function Vun(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}a(Vun,"validateCookieName");function Wun(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}a(Wun,"validateCookieValue");function zun(t){for(let e=0;ee.toString().padStart(2,"0"));function Yun(t){return typeof t=="number"&&(t=new Date(t)),`${W2o[t.getUTCDay()]}, ${jVe[t.getUTCDate()]} ${z2o[t.getUTCMonth()]} ${t.getUTCFullYear()} ${jVe[t.getUTCHours()]}:${jVe[t.getUTCMinutes()]}:${jVe[t.getUTCSeconds()]} GMT`}a(Yun,"toIMFDate");function Y2o(t){if(t<0)throw new Error("Invalid cookie max-age")}a(Y2o,"validateCookieMaxAge");function K2o(t){if(t.name.length===0)return null;Vun(t.name),Wun(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(Y2o(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(V2o(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(zun(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${Yun(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...o]=r.split("=");e.push(`${n.trim()}=${o.join("=")}`)}return e.join("; ")}a(K2o,"stringify");Kun.exports={isCTLExcludingHtab:$2o,validateCookieName:Vun,validateCookiePath:zun,validateCookieValue:Wun,toIMFDate:Yun,stringify:K2o}});var Xun=T((COu,Jun)=>{"use strict";f();var{maxNameValuePairSize:J2o,maxAttributeValueSize:X2o}=$un(),{isCTLExcludingHtab:Z2o}=C9t(),{collectASequenceOfCodePointsFast:$Ve}=SC(),ePo=require("node:assert");function tPo(t){if(Z2o(t))return null;let e="",r="",n="",o="";if(t.includes(";")){let s={position:0};e=$Ve(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))o=e;else{let s={position:0};n=$Ve("=",e,s),o=e.slice(s.position+1)}return n=n.trim(),o=o.trim(),n.length+o.length>J2o?null:{name:n,value:o,...dse(r)}}a(tPo,"parseSetCookie");function dse(t,e={}){if(t.length===0)return e;ePo(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=$Ve(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",o="";if(r.includes("=")){let c={position:0};n=$Ve("=",r,c),o=r.slice(c.position+1)}else n=r;if(n=n.trim(),o=o.trim(),o.length>X2o)return dse(t,e);let s=n.toLowerCase();if(s==="expires"){let c=new Date(o);e.expires=c}else if(s==="max-age"){let c=o.charCodeAt(0);if((c<48||c>57)&&o[0]!=="-"||!/^\d+$/.test(o))return dse(t,e);let l=Number(o);e.maxAge=l}else if(s==="domain"){let c=o;c[0]==="."&&(c=c.slice(1)),c=c.toLowerCase(),e.domain=c}else if(s==="path"){let c="";o.length===0||o[0]!=="/"?c="/":c=o,e.path=c}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let c="Default",l=o.toLowerCase();l.includes("none")&&(c="None"),l.includes("strict")&&(c="Strict"),l.includes("lax")&&(c="Lax"),e.sameSite=c}else e.unparsed??=[],e.unparsed.push(`${n}=${o}`);return dse(t,e)}a(dse,"parseUnparsedAttributes");Jun.exports={parseSetCookie:tPo,parseUnparsedAttributes:dse}});var tdn=T((bOu,edn)=>{"use strict";f();var{parseSetCookie:rPo}=Xun(),{stringify:nPo}=C9t(),{webidl:ws}=Bm(),{Headers:VVe}=qV();function iPo(t){ws.argumentLengthCheck(arguments,1,"getCookies"),ws.brandCheck(t,VVe,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[o,...s]=n.split("=");r[o.trim()]=s.join("=")}return r}a(iPo,"getCookies");function oPo(t,e,r){ws.brandCheck(t,VVe,{strict:!1});let n="deleteCookie";ws.argumentLengthCheck(arguments,2,n),e=ws.converters.DOMString(e,n,"name"),r=ws.converters.DeleteCookieAttributes(r),Zun(t,{name:e,value:"",expires:new Date(0),...r})}a(oPo,"deleteCookie");function sPo(t){ws.argumentLengthCheck(arguments,1,"getSetCookies"),ws.brandCheck(t,VVe,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>rPo(r)):[]}a(sPo,"getSetCookies");function Zun(t,e){ws.argumentLengthCheck(arguments,2,"setCookie"),ws.brandCheck(t,VVe,{strict:!1}),e=ws.converters.Cookie(e);let r=nPo(e);r&&t.append("Set-Cookie",r)}a(Zun,"setCookie");ws.converters.DeleteCookieAttributes=ws.dictionaryConverter([{converter:ws.nullableConverter(ws.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")}]);ws.converters.Cookie=ws.dictionaryConverter([{converter:ws.converters.DOMString,key:"name"},{converter:ws.converters.DOMString,key:"value"},{converter:ws.nullableConverter(t=>typeof t=="number"?ws.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters["long long"]),key:"maxAge",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters.boolean),key:"secure",defaultValue:a(()=>null,"defaultValue")},{converter:ws.nullableConverter(ws.converters.boolean),key:"httpOnly",defaultValue:a(()=>null,"defaultValue")},{converter:ws.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:ws.sequenceConverter(ws.converters.DOMString),key:"unparsed",defaultValue:a(()=>new Array(0),"defaultValue")}]);edn.exports={getCookies:iPo,deleteCookie:oPo,getSetCookies:sPo,setCookie:Zun}});var pse=T((IOu,ndn)=>{"use strict";f();var{webidl:Hn}=Bm(),{kEnumerableProperty:RC}=rs(),{kConstruct:rdn}=Du(),{MessagePort:aPo}=require("node:worker_threads"),fse=class t extends Event{static{a(this,"MessageEvent")}#e;constructor(e,r={}){if(e===rdn){super(arguments[1],arguments[2]),Hn.util.markAsUncloneable(this);return}let n="MessageEvent constructor";Hn.argumentLengthCheck(arguments,1,n),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,Hn.util.markAsUncloneable(this)}get data(){return Hn.brandCheck(this,t),this.#e.data}get origin(){return Hn.brandCheck(this,t),this.#e.origin}get lastEventId(){return Hn.brandCheck(this,t),this.#e.lastEventId}get source(){return Hn.brandCheck(this,t),this.#e.source}get ports(){return Hn.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,o=null,s="",c="",l=null,u=[]){return Hn.brandCheck(this,t),Hn.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:o,origin:s,lastEventId:c,source:l,ports:u})}static createFastMessageEvent(e,r){let n=new t(rdn,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:cPo}=fse;delete fse.createFastMessageEvent;var WVe=class t extends Event{static{a(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";Hn.argumentLengthCheck(arguments,1,n),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.CloseEventInit(r),super(e,r),this.#e=r,Hn.util.markAsUncloneable(this)}get wasClean(){return Hn.brandCheck(this,t),this.#e.wasClean}get code(){return Hn.brandCheck(this,t),this.#e.code}get reason(){return Hn.brandCheck(this,t),this.#e.reason}},zVe=class t extends Event{static{a(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";Hn.argumentLengthCheck(arguments,1,n),super(e,r),Hn.util.markAsUncloneable(this),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Hn.brandCheck(this,t),this.#e.message}get filename(){return Hn.brandCheck(this,t),this.#e.filename}get lineno(){return Hn.brandCheck(this,t),this.#e.lineno}get colno(){return Hn.brandCheck(this,t),this.#e.colno}get error(){return Hn.brandCheck(this,t),this.#e.error}};Object.defineProperties(fse.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:RC,origin:RC,lastEventId:RC,source:RC,ports:RC,initMessageEvent:RC});Object.defineProperties(WVe.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:RC,code:RC,wasClean:RC});Object.defineProperties(zVe.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:RC,filename:RC,lineno:RC,colno:RC,error:RC});Hn.converters.MessagePort=Hn.interfaceConverter(aPo);Hn.converters["sequence"]=Hn.sequenceConverter(Hn.converters.MessagePort);var _9t=[{key:"bubbles",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Hn.converters.MessageEventInit=Hn.dictionaryConverter([..._9t,{key:"data",converter:Hn.converters.any,defaultValue:a(()=>null,"defaultValue")},{key:"origin",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lastEventId",converter:Hn.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"source",converter:Hn.nullableConverter(Hn.converters.MessagePort),defaultValue:a(()=>null,"defaultValue")},{key:"ports",converter:Hn.converters["sequence"],defaultValue:a(()=>new Array(0),"defaultValue")}]);Hn.converters.CloseEventInit=Hn.dictionaryConverter([..._9t,{key:"wasClean",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"code",converter:Hn.converters["unsigned short"],defaultValue:a(()=>0,"defaultValue")},{key:"reason",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Hn.converters.ErrorEventInit=Hn.dictionaryConverter([..._9t,{key:"message",converter:Hn.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"filename",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lineno",converter:Hn.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"colno",converter:Hn.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"error",converter:Hn.converters.any}]);ndn.exports={MessageEvent:fse,CloseEvent:WVe,ErrorEvent:zVe,createFastMessageEvent:cPo}});var WV=T((ROu,idn)=>{"use strict";f();var lPo="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",uPo={enumerable:!0,writable:!1,configurable:!1},dPo={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},fPo={NOT_SENT:0,PROCESSING:1,SENT:2},pPo={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},hPo=2**16-1,mPo={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},gPo=Buffer.allocUnsafe(0),APo={string:1,typedArray:2,arrayBuffer:3,blob:4};idn.exports={uid:lPo,sentCloseFrameState:fPo,staticPropertyDescriptors:uPo,states:dPo,opcodes:pPo,maxUnsigned16Bit:hPo,parserStates:mPo,emptyBuffer:gPo,sendHints:APo}});var cve=T((kOu,odn)=>{"use strict";f();odn.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var dve=T((DOu,hdn)=>{"use strict";f();var{kReadyState:lve,kController:yPo,kResponse:EPo,kBinaryType:CPo,kWebSocketURL:_Po}=cve(),{states:uve,opcodes:v9}=WV(),{ErrorEvent:vPo,createFastMessageEvent:bPo}=pse(),{isUtf8:TPo}=require("node:buffer"),{collectASequenceOfCodePointsFast:SPo,removeHTTPWhitespace:sdn}=SC();function IPo(t){return t[lve]===uve.CONNECTING}a(IPo,"isConnecting");function xPo(t){return t[lve]===uve.OPEN}a(xPo,"isEstablished");function wPo(t){return t[lve]===uve.CLOSING}a(wPo,"isClosing");function RPo(t){return t[lve]===uve.CLOSED}a(RPo,"isClosed");function v9t(t,e,r=(o,s)=>new Event(o,s),n={}){let o=r(t,n);e.dispatchEvent(o)}a(v9t,"fireEvent");function PPo(t,e,r){if(t[lve]!==uve.OPEN)return;let n;if(e===v9.TEXT)try{n=pdn(r)}catch{cdn(t,"Received invalid UTF-8 in text frame.");return}else e===v9.BINARY&&(t[CPo]==="blob"?n=new Blob([r]):n=kPo(r));v9t("message",t,bPo,{origin:t[_Po].origin,data:n})}a(PPo,"websocketMessageReceived");function kPo(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}a(kPo,"toArrayBuffer");function NPo(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}a(NPo,"isValidSubprotocol");function DPo(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}a(DPo,"isValidStatusCode");function cdn(t,e){let{[yPo]:r,[EPo]:n}=t;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),e&&v9t("error",t,(o,s)=>new vPo(o,s),{error:new Error(e),message:e})}a(cdn,"failWebsocketConnection");function ldn(t){return t===v9.CLOSE||t===v9.PING||t===v9.PONG}a(ldn,"isControlFrame");function udn(t){return t===v9.CONTINUATION}a(udn,"isContinuationFrame");function ddn(t){return t===v9.TEXT||t===v9.BINARY}a(ddn,"isTextBinaryFrame");function MPo(t){return ddn(t)||udn(t)||ldn(t)}a(MPo,"isValidOpcode");function OPo(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}a(BPo,"isValidClientWindowBits");var fdn=typeof process.versions.icu=="string",adn=fdn?new TextDecoder("utf-8",{fatal:!0}):void 0,pdn=fdn?adn.decode.bind(adn):function(t){if(TPo(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")};hdn.exports={isConnecting:IPo,isEstablished:xPo,isClosing:wPo,isClosed:RPo,fireEvent:v9t,isValidSubprotocol:NPo,isValidStatusCode:DPo,failWebsocketConnection:cdn,websocketMessageReceived:PPo,utf8Decode:pdn,isControlFrame:ldn,isContinuationFrame:udn,isTextBinaryFrame:ddn,isValidOpcode:MPo,parseExtensions:OPo,isValidClientWindowBits:BPo}});var KVe=T((BOu,mdn)=>{"use strict";f();var{maxUnsigned16Bit:LPo}=WV(),YVe=16386,b9t,fve=null,hse=YVe;try{b9t=require("node:crypto")}catch{b9t={randomFillSync:a(function(e,r,n){for(let o=0;oLPo?(c+=8,s=127):o>125&&(c+=2,s=126);let l=Buffer.allocUnsafe(o+c);l[0]=l[1]=0,l[0]|=128,l[0]=(l[0]&240)+e;l[c-4]=n[0],l[c-3]=n[1],l[c-2]=n[2],l[c-1]=n[3],l[1]=s,s===126?l.writeUInt16BE(o,2):s===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),l[1]|=128;for(let u=0;u{"use strict";f();var{uid:UPo,states:pve,sentCloseFrameState:JVe,emptyBuffer:QPo,opcodes:qPo}=WV(),{kReadyState:hve,kSentClose:XVe,kByteParser:Adn,kReceivedClose:gdn,kResponse:ydn}=cve(),{fireEvent:GPo,failWebsocketConnection:b9,isClosing:HPo,isClosed:jPo,isEstablished:$Po,parseExtensions:VPo}=dve(),{channels:mse}=Ioe(),{CloseEvent:WPo}=pse(),{makeRequest:zPo}=ase(),{fetching:YPo}=ive(),{Headers:KPo,getHeadersList:JPo}=qV(),{getDecodeSplit:XPo}=mv(),{WebsocketFrameSend:ZPo}=KVe(),S9t;try{S9t=require("node:crypto")}catch{}function eko(t,e,r,n,o,s){let c=t;c.protocol=t.protocol==="ws:"?"http:":"https:";let l=zPo({urlList:[c],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(s.headers){let h=JPo(new KPo(s.headers));l.headersList=h}let u=S9t.randomBytes(16).toString("base64");l.headersList.append("sec-websocket-key",u),l.headersList.append("sec-websocket-version","13");for(let h of e)l.headersList.append("sec-websocket-protocol",h);return l.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits"),YPo({request:l,useParallelQueue:!0,dispatcher:s.dispatcher,processResponse(h){if(h.type==="error"||h.status!==101){b9(n,"Received network error or non-101 status code.");return}if(e.length!==0&&!h.headersList.get("Sec-WebSocket-Protocol")){b9(n,"Server did not respond with sent protocols.");return}if(h.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){b9(n,'Server did not set Upgrade header to "websocket".');return}if(h.headersList.get("Connection")?.toLowerCase()!=="upgrade"){b9(n,'Server did not set Connection header to "upgrade".');return}let m=h.headersList.get("Sec-WebSocket-Accept"),g=S9t.createHash("sha1").update(u+UPo).digest("base64");if(m!==g){b9(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let A=h.headersList.get("Sec-WebSocket-Extensions"),y;if(A!==null&&(y=VPo(A),!y.has("permessage-deflate"))){b9(n,"Sec-WebSocket-Extensions header does not match.");return}let E=h.headersList.get("Sec-WebSocket-Protocol");if(E!==null&&!XPo("sec-websocket-protocol",l.headersList).includes(E)){b9(n,"Protocol was not set in the opening handshake.");return}h.socket.on("data",Edn),h.socket.on("close",Cdn),h.socket.on("error",_dn),mse.open.hasSubscribers&&mse.open.publish({address:h.socket.address(),protocol:E,extensions:A}),o(h,y)}})}a(eko,"establishWebSocketConnection");function tko(t,e,r,n){if(!(HPo(t)||jPo(t)))if(!$Po(t))b9(t,"Connection was closed before it was established."),t[hve]=pve.CLOSING;else if(t[XVe]===JVe.NOT_SENT){t[XVe]=JVe.PROCESSING;let o=new ZPo;e!==void 0&&r===void 0?(o.frameData=Buffer.allocUnsafe(2),o.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(o.frameData=Buffer.allocUnsafe(2+n),o.frameData.writeUInt16BE(e,0),o.frameData.write(r,2,"utf-8")):o.frameData=QPo,t[ydn].socket.write(o.createFrame(qPo.CLOSE)),t[XVe]=JVe.SENT,t[hve]=pve.CLOSING}else t[hve]=pve.CLOSING}a(tko,"closeWebSocketConnection");function Edn(t){this.ws[Adn].write(t)||this.pause()}a(Edn,"onSocketData");function Cdn(){let{ws:t}=this,{[ydn]:e}=t;e.socket.off("data",Edn),e.socket.off("close",Cdn),e.socket.off("error",_dn);let r=t[XVe]===JVe.SENT&&t[gdn],n=1005,o="",s=t[Adn].closingInfo;s&&!s.error?(n=s.code??1005,o=s.reason):t[gdn]||(n=1006),t[hve]=pve.CLOSED,GPo("close",t,(c,l)=>new WPo(c,l),{wasClean:r,code:n,reason:o}),mse.close.hasSubscribers&&mse.close.publish({websocket:t,code:n,reason:o})}a(Cdn,"onSocketClose");function _dn(t){let{ws:e}=this;e[hve]=pve.CLOSING,mse.socketError.hasSubscribers&&mse.socketError.publish(t),this.destroy()}a(_dn,"onSocketError");vdn.exports={establishWebSocketConnection:eko,closeWebSocketConnection:tko}});var Sdn=T((GOu,Tdn)=>{"use strict";f();var{createInflateRaw:rko,Z_DEFAULT_WINDOWBITS:nko}=require("node:zlib"),{isValidClientWindowBits:iko}=dve(),{MessageSizeExceededError:bdn}=xa(),oko=Buffer.from([0,0,255,255]),ZVe=Symbol("kBuffer"),mve=Symbol("kLength"),sko=4*1024*1024,x9t=class{static{a(this,"PerMessageDeflate")}#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,r,n){if(this.#n){n(new bdn);return}if(!this.#e){let o=nko;if(this.#t.serverMaxWindowBits){if(!iko(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}o=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=rko({windowBits:o})}catch(s){n(s);return}this.#e[ZVe]=[],this.#e[mve]=0,this.#e.on("data",s=>{if(!this.#n){if(this.#e[mve]+=s.length,this.#e[mve]>sko){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let c=this.#r;this.#r=null,c(new bdn)}return}this.#e[ZVe].push(s)}}),this.#e.on("error",s=>{this.#e=null,n(s)})}this.#r=n,this.#e.write(e),r&&this.#e.write(oko),this.#e.flush(()=>{if(this.#n||!this.#e)return;let o=Buffer.concat(this.#e[ZVe],this.#e[mve]);this.#e[ZVe].length=0,this.#e[mve]=0,this.#r=null,n(null,o)})}};Tdn.exports={PerMessageDeflate:x9t}});var Odn=T(($Ou,Mdn)=>{"use strict";f();var{Writable:ako}=require("node:stream"),cko=require("node:assert"),{parserStates:PC,opcodes:gse,states:lko,emptyBuffer:Idn,sentCloseFrameState:xdn}=WV(),{kReadyState:uko,kSentClose:wdn,kResponse:Rdn,kReceivedClose:Pdn}=cve(),{channels:eWe}=Ioe(),{isValidStatusCode:dko,isValidOpcode:fko,failWebsocketConnection:vv,websocketMessageReceived:kdn,utf8Decode:pko,isControlFrame:Ndn,isTextBinaryFrame:w9t,isContinuationFrame:hko}=dve(),{WebsocketFrameSend:Ddn}=KVe(),{closeWebSocketConnection:mko}=I9t(),{PerMessageDeflate:gko}=Sdn(),R9t=class extends ako{static{a(this,"ByteParser")}#e=[];#t=0;#n=!1;#r=PC.INFO;#i={};#o=[];#a;constructor(e,r){super(),this.ws=e,this.#a=r??new Map,this.#a.has("permessage-deflate")&&this.#a.set("permessage-deflate",new gko(r))}_write(e,r,n){this.#e.push(e),this.#t+=e.length,this.#n=!0,this.run(n)}run(e){for(;this.#n;)if(this.#r===PC.INFO){if(this.#t<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,o=r[0]&15,s=(r[1]&128)===128,c=!n&&o!==gse.CONTINUATION,l=r[1]&127,u=r[0]&64,d=r[0]&32,p=r[0]&16;if(!fko(o))return vv(this.ws,"Invalid opcode received"),e();if(s)return vv(this.ws,"Frame cannot be masked"),e();if(u!==0&&!this.#a.has("permessage-deflate")){vv(this.ws,"Expected RSV1 to be clear.");return}if(d!==0||p!==0){vv(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(c&&!w9t(o)){vv(this.ws,"Invalid frame type was fragmented.");return}if(w9t(o)&&this.#o.length>0){vv(this.ws,"Expected continuation frame");return}if(this.#i.fragmented&&c){vv(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((l>125||c)&&Ndn(o)){vv(this.ws,"Control frame either too large or fragmented");return}if(hko(o)&&this.#o.length===0&&!this.#i.compressed){vv(this.ws,"Unexpected continuation frame");return}l<=125?(this.#i.payloadLength=l,this.#r=PC.READ_DATA):l===126?this.#r=PC.PAYLOADLENGTH_16:l===127&&(this.#r=PC.PAYLOADLENGTH_64),w9t(o)&&(this.#i.binaryType=o,this.#i.compressed=u!==0),this.#i.opcode=o,this.#i.masked=s,this.#i.fin=n,this.#i.fragmented=c}else if(this.#r===PC.PAYLOADLENGTH_16){if(this.#t<2)return e();let r=this.consume(2);this.#i.payloadLength=r.readUInt16BE(0),this.#r=PC.READ_DATA}else if(this.#r===PC.PAYLOADLENGTH_64){if(this.#t<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),o=r.readUInt32BE(4);if(n!==0||o>2**31-1){vv(this.ws,"Received payload length > 2^31 bytes.");return}this.#i.payloadLength=o,this.#r=PC.READ_DATA}else if(this.#r===PC.READ_DATA){if(this.#t{if(n){vv(this.ws,n.message);return}if(this.#o.push(o),!this.#i.fin){this.#r=PC.INFO,this.#n=!0,this.run(e);return}kdn(this.ws,this.#i.binaryType,Buffer.concat(this.#o)),this.#n=!0,this.#r=PC.INFO,this.#o.length=0,this.run(e)}),this.#n=!1;break}else{if(this.#o.push(r),!this.#i.fragmented&&this.#i.fin){let n=Buffer.concat(this.#o);kdn(this.ws,this.#i.binaryType,n),this.#o.length=0}this.#r=PC.INFO}}}consume(e){if(e>this.#t)throw new Error("Called consume() before buffers satiated.");if(e===0)return Idn;if(this.#e[0].length===e)return this.#t-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let o=this.#e[0],{length:s}=o;if(s+n===e){r.set(this.#e.shift(),n);break}else if(s+n>e){r.set(o.subarray(0,e-n),n),this.#e[0]=o.subarray(e-n);break}else r.set(this.#e.shift(),n),n+=o.length}return this.#t-=e,r}parseCloseBody(e){cko(e.length!==1);let r;if(e.length>=2&&(r=e.readUInt16BE(0)),r!==void 0&&!dko(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=pko(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#i;if(r===gse.CLOSE){if(n===1)return vv(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#i.closeInfo=this.parseCloseBody(e),this.#i.closeInfo.error){let{code:o,reason:s}=this.#i.closeInfo;return mko(this.ws,o,s,s.length),vv(this.ws,s),!1}if(this.ws[wdn]!==xdn.SENT){let o=Idn;this.#i.closeInfo.code&&(o=Buffer.allocUnsafe(2),o.writeUInt16BE(this.#i.closeInfo.code,0));let s=new Ddn(o);this.ws[Rdn].socket.write(s.createFrame(gse.CLOSE),c=>{c||(this.ws[wdn]=xdn.SENT)})}return this.ws[uko]=lko.CLOSING,this.ws[Pdn]=!0,!1}else if(r===gse.PING){if(!this.ws[Pdn]){let o=new Ddn(e);this.ws[Rdn].socket.write(o.createFrame(gse.PONG)),eWe.ping.hasSubscribers&&eWe.ping.publish({payload:e})}}else r===gse.PONG&&eWe.pong.hasSubscribers&&eWe.pong.publish({payload:e});return!0}get closingInfo(){return this.#i.closeInfo}};Mdn.exports={ByteParser:R9t}});var Qdn=T((zOu,Udn)=>{"use strict";f();var{WebsocketFrameSend:Ako}=KVe(),{opcodes:Bdn,sendHints:Ase}=WV(),yko=U6t(),Ldn=Buffer[Symbol.species],P9t=class{static{a(this,"SendQueue")}#e=new yko;#t=!1;#n;constructor(e){this.#n=e}add(e,r,n){if(n!==Ase.blob){let s=Fdn(e,n);if(!this.#t)this.#n.write(s,r);else{let c={promise:null,callback:r,frame:s};this.#e.push(c)}return}let o={promise:e.arrayBuffer().then(s=>{o.promise=null,o.frame=Fdn(s,n)}),callback:r,frame:null};this.#e.push(o),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#n.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function Fdn(t,e){return new Ako(Eko(t,e)).createFrame(e===Ase.string?Bdn.TEXT:Bdn.BINARY)}a(Fdn,"createFrame");function Eko(t,e){switch(e){case Ase.string:return Buffer.from(t);case Ase.arrayBuffer:case Ase.blob:return new Ldn(t);case Ase.typedArray:return new Ldn(t.buffer,t.byteOffset,t.byteLength)}}a(Eko,"toBuffer");Udn.exports={SendQueue:P9t}});var Ydn=T((JOu,zdn)=>{"use strict";f();var{webidl:Mi}=Bm(),{URLSerializer:Cko}=SC(),{environmentSettingsObject:qdn}=mv(),{staticPropertyDescriptors:T9,states:gve,sentCloseFrameState:_ko,sendHints:tWe}=WV(),{kWebSocketURL:Gdn,kReadyState:k9t,kController:vko,kBinaryType:rWe,kResponse:Hdn,kSentClose:bko,kByteParser:Tko}=cve(),{isConnecting:Sko,isEstablished:Iko,isClosing:xko,isValidSubprotocol:wko,fireEvent:jdn}=dve(),{establishWebSocketConnection:Rko,closeWebSocketConnection:$dn}=I9t(),{ByteParser:Pko}=Odn(),{kEnumerableProperty:lS,isBlobLike:Vdn}=rs(),{getGlobalDispatcher:kko}=AVe(),{types:Wdn}=require("node:util"),{ErrorEvent:Nko,CloseEvent:Dko}=pse(),{SendQueue:Mko}=Qdn(),bv=class t extends EventTarget{static{a(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#n="";#r="";#i;constructor(e,r=[]){super(),Mi.util.markAsUncloneable(this);let n="WebSocket constructor";Mi.argumentLengthCheck(arguments,1,n);let o=Mi.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=Mi.converters.USVString(e,n,"url"),r=o.protocols;let s=qdn.settingsObject.baseUrl,c;try{c=new URL(e,s)}catch(u){throw new DOMException(u,"SyntaxError")}if(c.protocol==="http:"?c.protocol="ws:":c.protocol==="https:"&&(c.protocol="wss:"),c.protocol!=="ws:"&&c.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${c.protocol}`,"SyntaxError");if(c.hash||c.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(u=>u.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(u=>wko(u)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[Gdn]=new URL(c.href);let l=qdn.settingsObject;this[vko]=Rko(c,r,l,this,(u,d)=>this.#o(u,d),o),this[k9t]=t.CONNECTING,this[bko]=_ko.NOT_SENT,this[rWe]="blob"}close(e=void 0,r=void 0){Mi.brandCheck(this,t);let n="WebSocket.close";if(e!==void 0&&(e=Mi.converters["unsigned short"](e,n,"code",{clamp:!0})),r!==void 0&&(r=Mi.converters.USVString(r,n,"reason")),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new DOMException("invalid code","InvalidAccessError");let o=0;if(r!==void 0&&(o=Buffer.byteLength(r),o>123))throw new DOMException(`Reason must be less than 123 bytes; received ${o}`,"SyntaxError");$dn(this,e,r,o)}send(e){Mi.brandCheck(this,t);let r="WebSocket.send";if(Mi.argumentLengthCheck(arguments,1,r),e=Mi.converters.WebSocketSendData(e,r,"data"),Sko(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!Iko(this)||xko(this)))if(typeof e=="string"){let n=Buffer.byteLength(e);this.#t+=n,this.#i.add(e,()=>{this.#t-=n},tWe.string)}else Wdn.isArrayBuffer(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},tWe.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},tWe.typedArray)):Vdn(e)&&(this.#t+=e.size,this.#i.add(e,()=>{this.#t-=e.size},tWe.blob))}get readyState(){return Mi.brandCheck(this,t),this[k9t]}get bufferedAmount(){return Mi.brandCheck(this,t),this.#t}get url(){return Mi.brandCheck(this,t),Cko(this[Gdn])}get extensions(){return Mi.brandCheck(this,t),this.#r}get protocol(){return Mi.brandCheck(this,t),this.#n}get onopen(){return Mi.brandCheck(this,t),this.#e.open}set onopen(e){Mi.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return Mi.brandCheck(this,t),this.#e.error}set onerror(e){Mi.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return Mi.brandCheck(this,t),this.#e.close}set onclose(e){Mi.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return Mi.brandCheck(this,t),this.#e.message}set onmessage(e){Mi.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return Mi.brandCheck(this,t),this[rWe]}set binaryType(e){Mi.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[rWe]="blob":this[rWe]=e}#o(e,r){this[Hdn]=e;let n=new Pko(this,r);n.on("drain",Oko),n.on("error",Bko.bind(this)),e.socket.ws=this,this[Tko]=n,this.#i=new Mko(e.socket),this[k9t]=gve.OPEN;let o=e.headersList.get("sec-websocket-extensions");o!==null&&(this.#r=o);let s=e.headersList.get("sec-websocket-protocol");s!==null&&(this.#n=s),jdn("open",this)}};bv.CONNECTING=bv.prototype.CONNECTING=gve.CONNECTING;bv.OPEN=bv.prototype.OPEN=gve.OPEN;bv.CLOSING=bv.prototype.CLOSING=gve.CLOSING;bv.CLOSED=bv.prototype.CLOSED=gve.CLOSED;Object.defineProperties(bv.prototype,{CONNECTING:T9,OPEN:T9,CLOSING:T9,CLOSED:T9,url:lS,readyState:lS,bufferedAmount:lS,onopen:lS,onerror:lS,onclose:lS,close:lS,onmessage:lS,binaryType:lS,send:lS,extensions:lS,protocol:lS,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(bv,{CONNECTING:T9,OPEN:T9,CLOSING:T9,CLOSED:T9});Mi.converters["sequence"]=Mi.sequenceConverter(Mi.converters.DOMString);Mi.converters["DOMString or sequence"]=function(t,e,r){return Mi.util.Type(t)==="Object"&&Symbol.iterator in t?Mi.converters["sequence"](t):Mi.converters.DOMString(t,e,r)};Mi.converters.WebSocketInit=Mi.dictionaryConverter([{key:"protocols",converter:Mi.converters["DOMString or sequence"],defaultValue:a(()=>new Array(0),"defaultValue")},{key:"dispatcher",converter:Mi.converters.any,defaultValue:a(()=>kko(),"defaultValue")},{key:"headers",converter:Mi.nullableConverter(Mi.converters.HeadersInit)}]);Mi.converters["DOMString or sequence or WebSocketInit"]=function(t){return Mi.util.Type(t)==="Object"&&!(Symbol.iterator in t)?Mi.converters.WebSocketInit(t):{protocols:Mi.converters["DOMString or sequence"](t)}};Mi.converters.WebSocketSendData=function(t){if(Mi.util.Type(t)==="Object"){if(Vdn(t))return Mi.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||Wdn.isArrayBuffer(t))return Mi.converters.BufferSource(t)}return Mi.converters.USVString(t)};function Oko(){this.ws[Hdn].socket.resume()}a(Oko,"onParserDrain");function Bko(t){let e,r;t instanceof Dko?(e=t.reason,r=t.code):e=t.message,jdn("error",this,()=>new Nko("error",{error:t,message:e})),$dn(this,r)}a(Bko,"onParserError");zdn.exports={WebSocket:bv}});var N9t=T((e4u,Kdn)=>{"use strict";f();function Lko(t){return t.indexOf("\0")===-1}a(Lko,"isValidLastEventId");function Fko(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}a(Fko,"isASCIINumber");function Uko(t){return new Promise(e=>{setTimeout(e,t).unref()})}a(Uko,"delay");Kdn.exports={isValidLastEventId:Lko,isASCIINumber:Fko,delay:Uko}});var efn=T((n4u,Zdn)=>{"use strict";f();var{Transform:Qko}=require("node:stream"),{isASCIINumber:Jdn,isValidLastEventId:Xdn}=N9t(),f4=[239,187,191],D9t=10,nWe=13,qko=58,Gko=32,M9t=class extends Qko{static{a(this,"EventSourceStream")}state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===f4[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===f4[0]&&this.buffer[1]===f4[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===f4[0]&&this.buffer[1]===f4[1]&&this.buffer[2]===f4[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===f4[0]&&this.buffer[1]===f4[1]&&this.buffer[2]===f4[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[o]=s);break}}processEvent(e){e.retry&&Jdn(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Xdn(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Zdn.exports={EventSourceStream:M9t}});var cfn=T((s4u,afn)=>{"use strict";f();var{pipeline:Hko}=require("node:stream"),{fetching:jko}=ive(),{makeRequest:$ko}=ase(),{webidl:p4}=Bm(),{EventSourceStream:Vko}=efn(),{parseMIMEType:Wko}=SC(),{createFastMessageEvent:zko}=pse(),{isNetworkError:tfn}=rve(),{delay:Yko}=N9t(),{kEnumerableProperty:zV}=rs(),{environmentSettingsObject:rfn}=mv(),nfn=!1,ifn=3e3,Ave=0,ofn=1,yve=2,Kko="anonymous",Jko="use-credentials",yse=class t extends EventTarget{static{a(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=Ave;#i=null;#o=null;#a;#s;constructor(e,r={}){super(),p4.util.markAsUncloneable(this);let n="EventSource constructor";p4.argumentLengthCheck(arguments,1,n),nfn||(nfn=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=p4.converters.USVString(e,n,"url"),r=p4.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#s={lastEventId:"",reconnectionTime:ifn};let o=rfn,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#s.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let c=Kko;r.withCredentials&&(c=Jko,this.#n=!0);let l={redirect:"follow",keepalive:!0,mode:"cors",credentials:c==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};l.client=rfn.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#t)],this.#i=$ko(l),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===yve)return;this.#r=Ave;let e={request:this.#i,dispatcher:this.#a},r=a(n=>{tfn(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(tfn(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let o=n.headersList.get("content-type",!0),s=o!==null?Wko(o):"failure",c=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||c===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=ofn,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let l=new Vko({eventSourceSettings:this.#s,push:a(u=>{this.dispatchEvent(zko(u.type,u.options))},"push")});Hko(n.body.stream,l,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=jko(e)}async#l(){this.#r!==yve&&(this.#r=Ave,this.dispatchEvent(new Event("error")),await Yko(this.#s.reconnectionTime),this.#r===Ave&&(this.#s.lastEventId.length&&this.#i.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#c()))}close(){p4.brandCheck(this,t),this.#r!==yve&&(this.#r=yve,this.#o.abort(),this.#i=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},sfn={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Ave,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:ofn,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:yve,writable:!1}};Object.defineProperties(yse,sfn);Object.defineProperties(yse.prototype,sfn);Object.defineProperties(yse.prototype,{close:zV,onerror:zV,onmessage:zV,onopen:zV,readyState:zV,url:zV,withCredentials:zV});p4.converters.EventSourceInitDict=p4.dictionaryConverter([{key:"withCredentials",converter:p4.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"dispatcher",converter:p4.converters.any}]);afn.exports={EventSource:yse,defaultReconnectionTime:ifn}});var ffn=T((l4u,_i)=>{"use strict";f();var Xko=Voe(),lfn=v1e(),Zko=Woe(),eNo=ian(),tNo=zoe(),rNo=oFt(),nNo=wan(),iNo=Man(),ufn=xa(),oWe=rs(),{InvalidArgumentError:iWe}=ufn,Ese=Ccn(),oNo=T1e(),sNo=QFt(),aNo=rln(),cNo=HFt(),lNo=xFt(),uNo=aVe(),{getGlobalDispatcher:dfn,setGlobalDispatcher:dNo}=AVe(),fNo=yVe(),pNo=K$e(),hNo=J$e();Object.assign(lfn.prototype,Ese);_i.exports.Dispatcher=lfn;_i.exports.Client=Xko;_i.exports.Pool=Zko;_i.exports.BalancedPool=eNo;_i.exports.Agent=tNo;_i.exports.ProxyAgent=rNo;_i.exports.EnvHttpProxyAgent=nNo;_i.exports.RetryAgent=iNo;_i.exports.RetryHandler=uNo;_i.exports.DecoratorHandler=fNo;_i.exports.RedirectHandler=pNo;_i.exports.createRedirectInterceptor=hNo;_i.exports.interceptors={redirect:lln(),retry:dln(),dump:pln(),dns:gln()};_i.exports.buildConnector=oNo;_i.exports.errors=ufn;_i.exports.util={parseHeaders:oWe.parseHeaders,headerNameToString:oWe.headerNameToString};function Eve(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new iWe("invalid url");if(r!=null&&typeof r!="object")throw new iWe("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new iWe("invalid opts.path");let c=r.path;r.path.startsWith("/")||(c=`/${c}`),e=new URL(oWe.parseOrigin(e).origin+c)}else r||(r=typeof e=="object"?e:{}),e=oWe.parseURL(e);let{agent:o,dispatcher:s=dfn()}=r;if(o)throw new iWe("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}a(Eve,"makeDispatcher");_i.exports.setGlobalDispatcher=dNo;_i.exports.getGlobalDispatcher=dfn;var mNo=ive().fetch;_i.exports.fetch=a(async function(e,r=void 0){try{return await mNo(e,r)}catch(n){throw n&&typeof n=="object"&&Error.captureStackTrace(n),n}},"fetch");_i.exports.Headers=qV().Headers;_i.exports.Response=rve().Response;_i.exports.Request=ase().Request;_i.exports.FormData=k1e().FormData;_i.exports.File=globalThis.File??require("node:buffer").File;_i.exports.FileReader=Dun().FileReader;var{setGlobalOrigin:gNo,getGlobalOrigin:ANo}=s6t();_i.exports.setGlobalOrigin=gNo;_i.exports.getGlobalOrigin=ANo;var{CacheStorage:yNo}=Hun(),{kConstruct:ENo}=UVe();_i.exports.caches=new yNo(ENo);var{deleteCookie:CNo,getCookies:_No,getSetCookies:vNo,setCookie:bNo}=tdn();_i.exports.deleteCookie=CNo;_i.exports.getCookies=_No;_i.exports.getSetCookies=vNo;_i.exports.setCookie=bNo;var{parseMIMEType:TNo,serializeAMimeType:SNo}=SC();_i.exports.parseMIMEType=TNo;_i.exports.serializeAMimeType=SNo;var{CloseEvent:INo,ErrorEvent:xNo,MessageEvent:wNo}=pse();_i.exports.WebSocket=Ydn().WebSocket;_i.exports.CloseEvent=INo;_i.exports.ErrorEvent=xNo;_i.exports.MessageEvent=wNo;_i.exports.request=Eve(Ese.request);_i.exports.stream=Eve(Ese.stream);_i.exports.pipeline=Eve(Ese.pipeline);_i.exports.connect=Eve(Ese.connect);_i.exports.upgrade=Eve(Ese.upgrade);_i.exports.MockClient=sNo;_i.exports.MockPool=cNo;_i.exports.MockAgent=aNo;_i.exports.mockErrors=lNo;var{EventSource:RNo}=cfn();_i.exports.EventSource=RNo});var No=T((f4u,pfn)=>{f();pfn.exports={options:{usePureJavaScript:!1}}});var gfn=T((h4u,mfn)=>{f();var O9t={};mfn.exports=O9t;var hfn={};O9t.encode=function(t,e,r){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(t instanceof Uint8Array))n=PNo(t,e);else{var o=0,s=e.length,c=e.charAt(0),l=[0];for(o=0;o0;)l.push(d%s),d=d/s|0}for(o=0;t[o]===0&&o=0;--o)n+=e[l[o]]}if(r){var p=new RegExp(".{1,"+r+"}","g");n=n.match(p).join(`\r -`)}return n};O9t.decode=function(t,e){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var r=hfn[e];if(!r){r=hfn[e]=[];for(var n=0;n>=8;for(;d>0;)c.push(d&255),d>>=8}for(var p=0;t[p]===s&&p0;)s.push(l%n),l=l/n|0}var u="";for(r=0;t.at(r)===0&&r=0;--r)u+=e[s[r]];return u}a(PNo,"_encodeWithByteBuffer")});var Ea=T((A4u,Cfn)=>{f();var Afn=No(),yfn=gfn(),Qe=Cfn.exports=Afn.util=Afn.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){Qe.nextTick=process.nextTick,typeof setImmediate=="function"?Qe.setImmediate=setImmediate:Qe.setImmediate=Qe.nextTick;return}if(typeof setImmediate=="function"){Qe.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Qe.nextTick=function(l){return setImmediate(l)};return}if(Qe.setImmediate=function(l){setTimeout(l,0)},typeof window<"u"&&typeof window.postMessage=="function"){let l=function(u){if(u.source===window&&u.data===t){u.stopPropagation();var d=e.slice();e.length=0,d.forEach(function(p){p()})}};var c=l;a(l,"handler");var t="forge.setImmediate",e=[];Qe.setImmediate=function(u){e.push(u),e.length===1&&window.postMessage(t,"*")},window.addEventListener("message",l,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,o=document.createElement("div"),e=[];new MutationObserver(function(){var u=e.slice();e.length=0,u.forEach(function(d){d()})}).observe(o,{attributes:!0});var s=Qe.setImmediate;Qe.setImmediate=function(u){Date.now()-r>15?(r=Date.now(),s(u)):(e.push(u),e.length===1&&o.setAttribute("a",n=!n))}}Qe.nextTick=Qe.setImmediate})();Qe.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Qe.globalScope=(function(){return Qe.isNodejs?global:typeof self>"u"?window:self})();Qe.isArray=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};Qe.isArrayBuffer=function(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer};Qe.isArrayBufferView=function(t){return t&&Qe.isArrayBuffer(t.buffer)&&t.byteLength!==void 0};function Cve(t){if(!(t===8||t===16||t===24||t===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}a(Cve,"_checkBitsParam");Qe.ByteBuffer=B9t;function B9t(t){if(this.data="",this.read=0,typeof t=="string")this.data=t;else if(Qe.isArrayBuffer(t)||Qe.isArrayBufferView(t))if(typeof Buffer<"u"&&t instanceof Buffer)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var r=0;rkNo&&(this.data.substr(0,1),this._constructedStringLength=0)};Qe.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Qe.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Qe.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))};Qe.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this};Qe.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this};Qe.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(Qe.encodeUtf8(t))};Qe.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255))};Qe.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))};Qe.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))};Qe.ByteStringBuffer.prototype.putInt=function(t,e){Cve(e);var r="";do e-=8,r+=String.fromCharCode(t>>e&255);while(e>0);return this.putBytes(r)};Qe.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e};Qe.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};Qe.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};Qe.ByteStringBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};Qe.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)};Qe.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this};Qe.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Qe.ByteStringBuffer.prototype.copy=function(){var t=Qe.createBuffer(this.data);return t.read=this.read,t};Qe.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};Qe.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Qe.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this};Qe.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this};Qe.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this};Qe.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this};Qe.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this};Qe.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this};Qe.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this};Qe.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this};Qe.DataBuffer.prototype.putInt=function(t,e){Cve(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,t>>e&255);while(e>0);return this};Qe.DataBuffer.prototype.putSignedInt=function(t,e){return Cve(e),this.accommodate(e/8),t<0&&(t+=2<0);return e};Qe.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};Qe.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};Qe.DataBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};Qe.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)};Qe.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this};Qe.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Qe.DataBuffer.prototype.copy=function(){return new Qe.DataBuffer(this)};Qe.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};Qe.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Qe.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this};Qe.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return r};Qe.xorBytes=function(t,e,r){for(var n="",o="",s="",c=0,l=0;r>0;--r,++c)o=t.charCodeAt(c)^e.charCodeAt(c),l>=10&&(n+=s,s="",l=0),s+=String.fromCharCode(o),++l;return n+=s,n};Qe.hexToBytes=function(t){var e="",r=0;for(t.length&!0&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255)};var S9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",I9=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Efn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Qe.encode64=function(t,e){for(var r="",n="",o,s,c,l=0;l>2),r+=S9.charAt((o&3)<<4|s>>4),isNaN(s)?r+="==":(r+=S9.charAt((s&15)<<2|c>>6),r+=isNaN(c)?"=":S9.charAt(c&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r -`,r=r.substr(e));return n+=r,n};Qe.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",r,n,o,s,c=0;c>4),o!==64&&(e+=String.fromCharCode((n&15)<<4|o>>2),s!==64&&(e+=String.fromCharCode((o&3)<<6|s)));return e};Qe.encodeUtf8=function(t){return unescape(encodeURIComponent(t))};Qe.decodeUtf8=function(t){return decodeURIComponent(escape(t))};Qe.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:yfn.encode,decode:yfn.decode}};Qe.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)};Qe.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var o=r,s=0;s>2),r+=S9.charAt((o&3)<<4|s>>4),isNaN(s)?r+="==":(r+=S9.charAt((s&15)<<2|c>>6),r+=isNaN(c)?"=":S9.charAt(c&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r -`,r=r.substr(e));return n+=r,n};Qe.binary.base64.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(Math.ceil(t.length/4)*3)),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var o,s,c,l,u=0,d=r;u>4,c!==64&&(n[d++]=(s&15)<<4|c>>2,l!==64&&(n[d++]=(c&3)<<6|l));return e?d-r:n.subarray(0,d)};Qe.binary.base58.encode=function(t,e){return Qe.binary.baseN.encode(t,Efn,e)};Qe.binary.base58.decode=function(t,e){return Qe.binary.baseN.decode(t,Efn,e)};Qe.text={utf8:{},utf16:{}};Qe.text.utf8.encode=function(t,e,r){t=Qe.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var o=r,s=0;s"u"&&(r=["web","flash"]);var o,s=!1,c=null;for(var l in r){o=r[l];try{if(o==="flash"||o==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=t.apply(this,e),s=o==="flash"}(o==="web"||o==="both")&&(e[0]=localStorage,n=t.apply(this,e),s=!0)}catch(u){c=u}if(s)break}if(!s)throw c;return n},"_callStorageFunction");Qe.setItem=function(t,e,r,n,o){sWe(DNo,arguments,o)};Qe.getItem=function(t,e,r,n){return sWe(MNo,arguments,n)};Qe.removeItem=function(t,e,r,n){sWe(ONo,arguments,n)};Qe.clearItems=function(t,e,r){sWe(BNo,arguments,r)};Qe.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0};Qe.format=function(t){for(var e=/%./g,r,n,o=0,s=[],c=0;r=e.exec(t);){n=t.substring(c,e.lastIndex-2),n.length>0&&s.push(n),c=e.lastIndex;var l=r[0][1];switch(l){case"s":case"o":o");break;case"%":s.push("%");break;default:s.push("<%"+l+"?>")}}return s.push(t.substring(c)),s.join("")};Qe.formatNumber=function(t,e,r,n){var o=t,s=isNaN(e=Math.abs(e))?2:e,c=r===void 0?",":r,l=n===void 0?".":n,u=o<0?"-":"",d=parseInt(o=Math.abs(+o||0).toFixed(s),10)+"",p=d.length>3?d.length%3:0;return u+(p?d.substr(0,p)+l:"")+d.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+l)+(s?c+Math.abs(o-d).toFixed(s).slice(2):"")};Qe.formatSize=function(t){return t>=1073741824?t=Qe.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?t=Qe.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?t=Qe.formatNumber(t/1024,0)+" KiB":t=Qe.formatNumber(t,0)+" bytes",t};Qe.bytesFromIP=function(t){return t.indexOf(".")!==-1?Qe.bytesFromIPv4(t):t.indexOf(":")!==-1?Qe.bytesFromIPv6(t):null};Qe.bytesFromIPv4=function(t){if(t=t.split("."),t.length!==4)return null;for(var e=Qe.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1))}e.push(s)}if(r.length>0){var u=r[n];u.end-u.start>0&&(e.splice(u.start,u.end-u.start+1,""),u.start===0&&e.unshift(""),u.end===7&&e.push(""))}return e.join(":")};Qe.estimateCores=function(t,e){if(typeof t=="function"&&(e=t,t={}),t=t||{},"cores"in Qe&&!t.update)return e(null,Qe.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Qe.cores=navigator.hardwareConcurrency,e(null,Qe.cores);if(typeof Worker>"u")return Qe.cores=1,e(null,Qe.cores);if(typeof Blob>"u")return Qe.cores=2,e(null,Qe.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(c){for(var l=Date.now(),u=l+4;Date.now()g.st&&p.stp.st&&g.st{f();var Rh=No();Ea();_fn.exports=Rh.cipher=Rh.cipher||{};Rh.cipher.algorithms=Rh.cipher.algorithms||{};Rh.cipher.createCipher=function(t,e){var r=t;if(typeof r=="string"&&(r=Rh.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new Rh.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})};Rh.cipher.createDecipher=function(t,e){var r=t;if(typeof r=="string"&&(r=Rh.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new Rh.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})};Rh.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),Rh.cipher.algorithms[t]=e};Rh.cipher.getAlgorithm=function(t){return t=t.toUpperCase(),t in Rh.cipher.algorithms?Rh.cipher.algorithms[t]:null};var U9t=Rh.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};U9t.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=Rh.util.createBuffer(),this.output=t.output||Rh.util.createBuffer(),this.mode.start(e)};U9t.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};U9t.prototype.finish=function(t){t&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return t(this.blockSize,r,!1)},this.mode.unpad=function(r){return t(this.blockSize,r,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var q9t=T((v4u,vfn)=>{f();var Ph=No();Ea();Ph.cipher=Ph.cipher||{};var ds=vfn.exports=Ph.cipher.modes=Ph.cipher.modes||{};ds.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ds.ecb.prototype.start=function(t){};ds.ecb.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};ds.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ds.cbc.prototype.start=function(t){if(t.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in t)this._iv=cWe(t.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};ds.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};ds.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ph.util.createBuffer(),this._partialBytes=0};ds.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=cWe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ds.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ds.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ds.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ph.util.createBuffer(),this._partialBytes=0};ds.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=cWe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ds.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(t.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ds.ofb.prototype.decrypt=ds.ofb.prototype.encrypt;ds.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ph.util.createBuffer(),this._partialBytes=0};ds.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=cWe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ds.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}lWe(this._inBlock)};ds.ctr.prototype.decrypt=ds.ctr.prototype.encrypt;ds.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ph.util.createBuffer(),this._partialBytes=0,this._R=3774873600};ds.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e=Ph.util.createBuffer(t.iv);this._cipherLength=0;var r;if("additionalData"in t?r=Ph.util.createBuffer(t.additionalData):r=Ph.util.createBuffer(),"tagLength"in t?this._tagLength=t.tagLength:this._tagLength=128,this._tag=null,t.decrypt&&(this._tag=Ph.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Q9t(n*8)))}this._inBlock=this._j0.slice(0),lWe(this._inBlock),this._partialBytes=0,r=Ph.util.createBuffer(r),this._aDataLength=Q9t(r.length()*8);var o=r.length()%this.blockSize;for(o&&r.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};ds.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),lWe(this._inBlock)};ds.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),lWe(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var o=0;o0;--n)e[n]=t[n]>>>1|(t[n-1]&1)<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)};ds.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,o=t[n]>>>(7-r%8)*4&15,s=this._m[r][o];e[0]^=s[0],e[1]^=s[1],e[2]^=s[2],e[3]^=s[3]}return e};ds.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)};ds.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,o=16*r,s=new Array(o),c=0;c>>1,o=new Array(r);o[n]=t.slice(0);for(var s=n>>>1;s>0;)this.pow(o[2*s],o[s]=[]),s>>=1;for(s=2;s4){var r=t;t=Ph.util.createBuffer();for(var n=0;n{f();var yl=No();aWe();q9t();Ea();Ifn.exports=yl.aes=yl.aes||{};yl.aes.startEncrypting=function(t,e,r,n){var o=uWe({key:t,output:r,decrypt:!1,mode:n});return o.start(e),o};yl.aes.createEncryptionCipher=function(t,e){return uWe({key:t,output:null,decrypt:!1,mode:e})};yl.aes.startDecrypting=function(t,e,r,n){var o=uWe({key:t,output:r,decrypt:!0,mode:n});return o.start(e),o};yl.aes.createDecryptionCipher=function(t,e){return uWe({key:t,output:null,decrypt:!0,mode:e})};yl.aes.Algorithm=function(t,e){j9t||Tfn();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:a(function(n,o){return H9t(r._w,n,o,!1)},"encrypt"),decrypt:a(function(n,o){return H9t(r._w,n,o,!0)},"decrypt")}}),r._init=!1};yl.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e=t.key,r;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=yl.util.createBuffer(e);else if(yl.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){r=e,e=yl.util.createBuffer();for(var n=0;n>>2;for(var n=0;n>8^l&255^99,by[r]=l,G9t[l]=r,u=t[l],o=t[r],s=t[o],c=t[s],d=u<<24^l<<16^l<<8^(l^u),p=(o^s^c)<<24^(r^c)<<16^(r^s^c)<<8^(r^o^c);for(var h=0;h<4;++h)YV[h][r]=d,Iw[h][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;r===0?r=n=1:(r=o^t[t[t[o^c]]],n^=t[t[n]])}}a(Tfn,"initialize");function Sfn(t,e){for(var r=t.slice(0),n,o=1,s=r.length,c=s+6+1,l=Cse*c,u=s;u>>16&255]<<24^by[n>>>8&255]<<16^by[n&255]<<8^by[n>>>24]^bfn[o]<<24,o++):s>6&&u%s===4&&(n=by[n>>>24]<<24^by[n>>>16&255]<<16^by[n>>>8&255]<<8^by[n&255]),r[u]=r[u-s]^n;if(e){var d,p=Iw[0],h=Iw[1],m=Iw[2],g=Iw[3],A=r.slice(0);l=r.length;for(var u=0,y=l-Cse;u>>24]]^h[by[d>>>16&255]]^m[by[d>>>8&255]]^g[by[d&255]];r=A}return r}a(Sfn,"_expandKey");function H9t(t,e,r,n){var o=t.length/4-1,s,c,l,u,d;n?(s=Iw[0],c=Iw[1],l=Iw[2],u=Iw[3],d=G9t):(s=YV[0],c=YV[1],l=YV[2],u=YV[3],d=by);var p,h,m,g,A,y,E;p=e[0]^t[0],h=e[n?3:1]^t[1],m=e[2]^t[2],g=e[n?1:3]^t[3];for(var _=3,v=1;v>>24]^c[h>>>16&255]^l[m>>>8&255]^u[g&255]^t[++_],y=s[h>>>24]^c[m>>>16&255]^l[g>>>8&255]^u[p&255]^t[++_],E=s[m>>>24]^c[g>>>16&255]^l[p>>>8&255]^u[h&255]^t[++_],g=s[g>>>24]^c[p>>>16&255]^l[h>>>8&255]^u[m&255]^t[++_],p=A,h=y,m=E;r[0]=d[p>>>24]<<24^d[h>>>16&255]<<16^d[m>>>8&255]<<8^d[g&255]^t[++_],r[n?3:1]=d[h>>>24]<<24^d[m>>>16&255]<<16^d[g>>>8&255]<<8^d[p&255]^t[++_],r[2]=d[m>>>24]<<24^d[g>>>16&255]<<16^d[p>>>8&255]<<8^d[h&255]^t[++_],r[n?1:3]=d[g>>>24]<<24^d[p>>>16&255]<<16^d[h>>>8&255]<<8^d[m&255]^t[++_]}a(H9t,"_updateBlock");function uWe(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="AES-"+e,n;t.decrypt?n=yl.cipher.createDecipher(r,t.key):n=yl.cipher.createCipher(r,t.key);var o=n.start;return n.start=function(s,c){var l=null;c instanceof yl.util.ByteBuffer&&(l=c,c={}),c=c||{},c.output=l,c.iv=s,o.call(n,c)},n}a(uWe,"_createCipher")});var w9=T((w4u,xfn)=>{f();var _ve=No();_ve.pki=_ve.pki||{};var $9t=xfn.exports=_ve.pki.oids=_ve.oids=_ve.oids||{};function Wt(t,e){$9t[t]=e,$9t[e]=t}a(Wt,"_IN");function ja(t,e){$9t[t]=e}a(ja,"_I_");Wt("1.2.840.113549.1.1.1","rsaEncryption");Wt("1.2.840.113549.1.1.4","md5WithRSAEncryption");Wt("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Wt("1.2.840.113549.1.1.7","RSAES-OAEP");Wt("1.2.840.113549.1.1.8","mgf1");Wt("1.2.840.113549.1.1.9","pSpecified");Wt("1.2.840.113549.1.1.10","RSASSA-PSS");Wt("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Wt("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Wt("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Wt("1.3.101.112","EdDSA25519");Wt("1.2.840.10040.4.3","dsa-with-sha1");Wt("1.3.14.3.2.7","desCBC");Wt("1.3.14.3.2.26","sha1");Wt("1.3.14.3.2.29","sha1WithRSASignature");Wt("2.16.840.1.101.3.4.2.1","sha256");Wt("2.16.840.1.101.3.4.2.2","sha384");Wt("2.16.840.1.101.3.4.2.3","sha512");Wt("2.16.840.1.101.3.4.2.4","sha224");Wt("2.16.840.1.101.3.4.2.5","sha512-224");Wt("2.16.840.1.101.3.4.2.6","sha512-256");Wt("1.2.840.113549.2.2","md2");Wt("1.2.840.113549.2.5","md5");Wt("1.2.840.113549.1.7.1","data");Wt("1.2.840.113549.1.7.2","signedData");Wt("1.2.840.113549.1.7.3","envelopedData");Wt("1.2.840.113549.1.7.4","signedAndEnvelopedData");Wt("1.2.840.113549.1.7.5","digestedData");Wt("1.2.840.113549.1.7.6","encryptedData");Wt("1.2.840.113549.1.9.1","emailAddress");Wt("1.2.840.113549.1.9.2","unstructuredName");Wt("1.2.840.113549.1.9.3","contentType");Wt("1.2.840.113549.1.9.4","messageDigest");Wt("1.2.840.113549.1.9.5","signingTime");Wt("1.2.840.113549.1.9.6","counterSignature");Wt("1.2.840.113549.1.9.7","challengePassword");Wt("1.2.840.113549.1.9.8","unstructuredAddress");Wt("1.2.840.113549.1.9.14","extensionRequest");Wt("1.2.840.113549.1.9.20","friendlyName");Wt("1.2.840.113549.1.9.21","localKeyId");Wt("1.2.840.113549.1.9.22.1","x509Certificate");Wt("1.2.840.113549.1.12.10.1.1","keyBag");Wt("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Wt("1.2.840.113549.1.12.10.1.3","certBag");Wt("1.2.840.113549.1.12.10.1.4","crlBag");Wt("1.2.840.113549.1.12.10.1.5","secretBag");Wt("1.2.840.113549.1.12.10.1.6","safeContentsBag");Wt("1.2.840.113549.1.5.13","pkcs5PBES2");Wt("1.2.840.113549.1.5.12","pkcs5PBKDF2");Wt("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Wt("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Wt("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Wt("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Wt("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Wt("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Wt("1.2.840.113549.2.7","hmacWithSHA1");Wt("1.2.840.113549.2.8","hmacWithSHA224");Wt("1.2.840.113549.2.9","hmacWithSHA256");Wt("1.2.840.113549.2.10","hmacWithSHA384");Wt("1.2.840.113549.2.11","hmacWithSHA512");Wt("1.2.840.113549.3.7","des-EDE3-CBC");Wt("2.16.840.1.101.3.4.1.2","aes128-CBC");Wt("2.16.840.1.101.3.4.1.22","aes192-CBC");Wt("2.16.840.1.101.3.4.1.42","aes256-CBC");Wt("2.5.4.3","commonName");Wt("2.5.4.4","surname");Wt("2.5.4.5","serialNumber");Wt("2.5.4.6","countryName");Wt("2.5.4.7","localityName");Wt("2.5.4.8","stateOrProvinceName");Wt("2.5.4.9","streetAddress");Wt("2.5.4.10","organizationName");Wt("2.5.4.11","organizationalUnitName");Wt("2.5.4.12","title");Wt("2.5.4.13","description");Wt("2.5.4.15","businessCategory");Wt("2.5.4.17","postalCode");Wt("2.5.4.42","givenName");Wt("2.5.4.65","pseudonym");Wt("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Wt("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Wt("2.16.840.1.113730.1.1","nsCertType");Wt("2.16.840.1.113730.1.13","nsComment");ja("2.5.29.1","authorityKeyIdentifier");ja("2.5.29.2","keyAttributes");ja("2.5.29.3","certificatePolicies");ja("2.5.29.4","keyUsageRestriction");ja("2.5.29.5","policyMapping");ja("2.5.29.6","subtreesConstraint");ja("2.5.29.7","subjectAltName");ja("2.5.29.8","issuerAltName");ja("2.5.29.9","subjectDirectoryAttributes");ja("2.5.29.10","basicConstraints");ja("2.5.29.11","nameConstraints");ja("2.5.29.12","policyConstraints");ja("2.5.29.13","basicConstraints");Wt("2.5.29.14","subjectKeyIdentifier");Wt("2.5.29.15","keyUsage");ja("2.5.29.16","privateKeyUsagePeriod");Wt("2.5.29.17","subjectAltName");Wt("2.5.29.18","issuerAltName");Wt("2.5.29.19","basicConstraints");ja("2.5.29.20","cRLNumber");ja("2.5.29.21","cRLReason");ja("2.5.29.22","expirationDate");ja("2.5.29.23","instructionCode");ja("2.5.29.24","invalidityDate");ja("2.5.29.25","cRLDistributionPoints");ja("2.5.29.26","issuingDistributionPoint");ja("2.5.29.27","deltaCRLIndicator");ja("2.5.29.28","issuingDistributionPoint");ja("2.5.29.29","certificateIssuer");ja("2.5.29.30","nameConstraints");Wt("2.5.29.31","cRLDistributionPoints");Wt("2.5.29.32","certificatePolicies");ja("2.5.29.33","policyMappings");ja("2.5.29.34","policyConstraints");Wt("2.5.29.35","authorityKeyIdentifier");ja("2.5.29.36","policyConstraints");Wt("2.5.29.37","extKeyUsage");ja("2.5.29.46","freshestCRL");ja("2.5.29.54","inhibitAnyPolicy");Wt("1.3.6.1.4.1.11129.2.4.2","timestampList");Wt("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Wt("1.3.6.1.5.5.7.3.1","serverAuth");Wt("1.3.6.1.5.5.7.3.2","clientAuth");Wt("1.3.6.1.5.5.7.3.3","codeSigning");Wt("1.3.6.1.5.5.7.3.4","emailProtection");Wt("1.3.6.1.5.5.7.3.8","timeStamping")});var xw=T((k4u,Rfn)=>{f();var ru=No();Ea();w9();var Qr=Rfn.exports=ru.asn1=ru.asn1||{};Qr.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Qr.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Qr.maxDepth=256;Qr.create=function(t,e,r,n,o){if(ru.util.isArray(n)){for(var s=[],c=0;ce){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}a(vve,"_checkBufferLength");var LNo=a(function(t,e){var r=t.getByte();if(e--,r!==128){var n,o=r&128;if(!o)n=r;else{var s=r&127;vve(t,e,s),n=t.getInt(s<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");Qr.fromDer=function(t,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"maxDepth"in e||(e.maxDepth=Qr.maxDepth),typeof t=="string"&&(t=ru.util.createBuffer(t));var r=t.length(),n=dWe(t,t.length(),0,e);if(e.parseAllBytes&&t.length()!==0){var o=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw o.byteCount=r,o.remaining=t.length(),o}return n};function dWe(t,e,r,n){if(r>=n.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var o;vve(t,e,2);var s=t.getByte();e--;var c=s&192,l=s&31;o=t.length();var u=LNo(t,e);if(e-=o-t.length(),u!==void 0&&u>e){if(n.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=e,d.requested=u,d}u=e}var p,h,m=(s&32)===32;if(m)if(p=[],u===void 0)for(;;){if(vve(t,e,2),t.bytes(2)==="\0\0"){t.getBytes(2),e-=2;break}o=t.length(),p.push(dWe(t,e,r+1,n)),e-=o-t.length()}else for(;u>0;)o=t.length(),p.push(dWe(t,u,r+1,n)),e-=o-t.length(),u-=o-t.length();if(p===void 0&&c===Qr.Class.UNIVERSAL&&l===Qr.Type.BITSTRING&&(h=t.bytes(u)),p===void 0&&n.decodeBitStrings&&c===Qr.Class.UNIVERSAL&&l===Qr.Type.BITSTRING&&u>1){var g=t.read,A=e,y=0;if(l===Qr.Type.BITSTRING&&(vve(t,e,1),y=t.getByte(),e--),y===0)try{o=t.length();var E={strict:!0,decodeBitStrings:!0},_=dWe(t,e,r+1,E),v=o-t.length();e-=v,l==Qr.Type.BITSTRING&&v++;var b=_.tagClass;v===u&&(b===Qr.Class.UNIVERSAL||b===Qr.Class.CONTEXT_SPECIFIC)&&(p=[_])}catch{}p===void 0&&(t.read=g,e=A)}if(p===void 0){if(u===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");u=e}if(l===Qr.Type.BMPSTRING)for(p="";u>0;u-=2)vve(t,e,2),p+=String.fromCharCode(t.getInt16()),e-=2;else p=t.getBytes(u),e-=u}var I=h===void 0?null:{bitStringContents:h};return Qr.create(c,l,m,p,I)}a(dWe,"_fromDer");Qr.toDer=function(t){var e=ru.util.createBuffer(),r=t.tagClass|t.type,n=ru.util.createBuffer(),o=!1;if("bitStringContents"in t&&(o=!0,t.original&&(o=Qr.equals(t,t.original))),o)n.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:n.putByte(0);for(var s=0;s1&&(t.value.charCodeAt(0)===0&&(t.value.charCodeAt(1)&128)===0||t.value.charCodeAt(0)===255&&(t.value.charCodeAt(1)&128)===128)?n.putBytes(t.value.substr(1)):n.putBytes(t.value);if(e.putByte(r),n.length()<=127)e.putByte(n.length()&127);else{var c=n.length(),l="";do l+=String.fromCharCode(c&255),c=c>>>8;while(c>0);e.putByte(l.length|128);for(var s=l.length-1;s>=0;--s)e.putByte(l.charCodeAt(s))}return e.putBuffer(n),e};Qr.oidToDer=function(t){var e=t.split("."),r=ru.util.createBuffer();r.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,o,s,c,l=2;l4294967295)throw new Error("OID value too large; max is 32-bits.");do c=s&127,s=s>>>7,n||(c|=128),o.push(c),n=!1;while(s>0);for(var u=o.length-1;u>=0;--u)r.putByte(o[u])}return r};Qr.derToOid=function(t){var e;typeof t=="string"&&(t=ru.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;){if(n>70368744177663)throw new Error("OID value too large; max is 53-bits.");r=t.getByte(),n=n*128,r&128?n+=r&127:(e+="."+(n+r),n=0)}return e};Qr.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,o=parseInt(t.substr(4,2),10),s=parseInt(t.substr(6,2),10),c=parseInt(t.substr(8,2),10),l=0;if(t.length>11){var u=t.charAt(10),d=10;u!=="+"&&u!=="-"&&(l=parseInt(t.substr(10,2),10),d+=2)}if(e.setUTCFullYear(r,n,o),e.setUTCHours(s,c,l,0),d&&(u=t.charAt(d),u==="+"||u==="-")){var p=parseInt(t.substr(d+1,2),10),h=parseInt(t.substr(d+4,2),10),m=p*60+h;m*=6e4,u==="+"?e.setTime(+e-m):e.setTime(+e+m)}return e};Qr.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,o=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),c=parseInt(t.substr(10,2),10),l=parseInt(t.substr(12,2),10),u=0,d=0,p=!1;t.charAt(t.length-1)==="Z"&&(p=!0);var h=t.length-5,m=t.charAt(h);if(m==="+"||m==="-"){var g=parseInt(t.substr(h+1,2),10),A=parseInt(t.substr(h+4,2),10);d=g*60+A,d*=6e4,m==="+"&&(d*=-1),p=!0}return t.charAt(14)==="."&&(u=parseFloat(t.substr(14),10)*1e3),p?(e.setUTCFullYear(r,n,o),e.setUTCHours(s,c,l,u),e.setTime(+e+d)):(e.setFullYear(r,n,o),e.setHours(s,c,l,u)),e};Qr.dateToUtcTime=function(t){if(typeof t=="string")return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r};Qr.derToInteger=function(t){typeof t=="string"&&(t=ru.util.createBuffer(t));var e=t.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)};Qr.validate=function(t,e,r,n){var o=!1;if((t.tagClass===e.tagClass||typeof e.tagClass>"u")&&(t.type===e.type||typeof e.type>"u"))if(t.constructed===e.constructed||typeof e.constructed>"u"){if(o=!0,e.value&&ru.util.isArray(e.value))for(var s=0,c=0;o&&c0&&(n+=` +`.trim())}};eun.exports=f9t});var S$e=T((COu,sun)=>{"use strict";f();var nun=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:v2o}=Ca(),b2o=coe();oun()===void 0&&iun(new b2o);function iun(t){if(!t||typeof t.dispatch!="function")throw new v2o("Argument agent must implement Agent");Object.defineProperty(globalThis,nun,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(iun,"setGlobalDispatcher");function oun(){return globalThis[nun]}a(oun,"getGlobalDispatcher");sun.exports={setGlobalDispatcher:iun,getGlobalDispatcher:oun}});var I$e=T((SOu,aun)=>{"use strict";f();aun.exports=class{static{a(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var lun=T((wOu,cun)=>{"use strict";f();var T2o=i$e();cun.exports=t=>{let e=t?.maxRedirections;return r=>a(function(o,s){let{maxRedirections:c=e,...l}=o;if(!c)return r(o,s);let u=new T2o(r,c,o,s);return r(l,u)},"redirectInterceptor")}});var dun=T((kOu,uun)=>{"use strict";f();var S2o=m$e();uun.exports=t=>e=>a(function(n,o){return e(n,new S2o({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var pun=T((MOu,fun)=>{"use strict";f();var I2o=Xo(),{InvalidArgumentError:x2o,RequestAbortedError:w2o}=Ca(),R2o=I$e(),p9t=class extends R2o{static{a(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#i=0;#o=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new x2o("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#o=e}onHeaders(e,r,n,o){let c=I2o.parseHeaders(r)["content-length"];if(c!=null&&c>this.#e)throw new w2o(`Response size (${c}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#o??e,this.#a.onError(e))}onData(e){return this.#i=this.#i+e.length,this.#i>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#o):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function P2o({maxSize:t}={maxSize:1024*1024}){return e=>a(function(n,o){let{dumpMaxSize:s=t}=n,c=new p9t({maxSize:s},o);return e(n,c)},"Intercept")}a(P2o,"createDumpInterceptor");fun.exports=P2o});var gun=T((LOu,mun)=>{"use strict";f();var{isIP:k2o}=require("node:net"),{lookup:D2o}=require("node:dns"),N2o=I$e(),{InvalidArgumentError:yoe,InformationalError:M2o}=Ca(),hun=Math.pow(2,31)-1,h9t=class{static{a(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#i}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let o=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(c,l)=>{if(c||l==null||l.length===0){n(c??new M2o("No DNS entries found"));return}this.setRecords(e,l);let u=this.#n.get(e.hostname),d=this.pick(e,u,s.affinity),p;typeof d.port=="number"?p=`:${d.port}`:e.port!==""?p=`:${e.port}`:p="",n(null,`${e.protocol}//${d.family===6?`[${d.address}]`:d.address}${p}`)});else{let c=this.pick(e,o,s.affinity);if(c==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let l;typeof c.port=="number"?l=`:${c.port}`:e.port!==""?l=`:${e.port}`:l="",n(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${l}`)}}#r(e,r,n){D2o(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let c=new Map;for(let l of s)c.set(`${l.address}:${l.family}`,l);n(null,c.values())})}#i(e,r,n){let o=null,{records:s,offset:c}=r,l;if(this.dualStack?(n==null&&(c==null||c===hun?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?l=s[n]:l=s[n===4?6:4]):l=s[n],l==null||l.ips.length===0)return o;l.offset==null||l.offset===hun?l.offset=0:l.offset++;let u=l.offset%l.ips.length;return o=l.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(l.ips.splice(u,1),this.pick(e,r,n)):o}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let c=o.records[s.family]??{ips:[]};c.ips.push(s),o.records[s.family]=c}this.#n.set(e.hostname,o)}getHandler(e,r){return new m9t(this,e,r)}},m9t=class extends N2o{static{a(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null;#r=null;#i=null;constructor(e,{origin:r,handler:n,dispatch:o},s){super(n),this.#i=r,this.#r=n,this.#t={...s},this.#e=e,this.#n=o}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#i,this.#t,(r,n)=>{if(r)return this.#r.onError(r);let o={...this.#t,origin:n};this.#n(o,this)});return}this.#r.onError(e);return}case"ENOTFOUND":this.#e.deleteRecord(this.#i);default:this.#r.onError(e);break}}};mun.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new yoe("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new yoe("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new yoe("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new yoe("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new yoe("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new yoe("Invalid pick. Must be a function");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0},o=new h9t(n);return s=>a(function(l,u){let d=l.origin.constructor===URL?l.origin:new URL(l.origin);return k2o(d.hostname)!==0?s(l,u):(o.runLookup(d,l,(p,h)=>{if(p)return u.onError(p);let m=null;m={...l,servername:d.hostname,origin:h,headers:{host:d.hostname,...l.headers}},s(m,o.getHandler({origin:d,dispatch:s,handler:u},l))}),!0)},"dnsInterceptor")}});var z$=T((QOu,bun)=>{"use strict";f();var{kConstruct:O2o}=bu(),{kEnumerableProperty:Eoe}=Xo(),{iteratorMixin:B2o,isValidHeaderName:JCe,isValidHeaderValue:yun}=rv(),{webidl:Xs}=Im(),g9t=require("node:assert"),x$e=require("node:util"),C0=Symbol("headers map"),ov=Symbol("headers map sorted");function Aun(t){return t===10||t===13||t===9||t===32}a(Aun,"isHTTPWhiteSpaceCharCode");function Eun(t){let e=0,r=t.length;for(;r>e&&Aun(t.charCodeAt(r-1));)--r;for(;r>e&&Aun(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}a(Eun,"headerValueNormalize");function _un(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}a(_un,"fill");function A9t(t,e,r){if(r=Eun(r),JCe(e)){if(!yun(r))throw Xs.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Xs.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(vun(t)==="immutable")throw new TypeError("immutable");return y9t(t).append(e,r,!1)}a(A9t,"appendHeader");function Cun(t,e){return t[0]>1),r[d][0]<=p[0]?u=d+1:l=d;if(s!==d){for(c=s;c>u;)r[c]=r[--c];r[u]=p}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:o,1:{value:s}}of this[C0])r[n++]=[o,s],g9t(s!==null);return r.sort(Cun)}}},fw=class t{static{a(this,"Headers")}#e;#t;constructor(e=void 0){Xs.util.markAsUncloneable(this),e!==O2o&&(this.#t=new w$e,this.#e="none",e!==void 0&&(e=Xs.converters.HeadersInit(e,"Headers contructor","init"),_un(this,e)))}append(e,r){Xs.brandCheck(this,t),Xs.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=Xs.converters.ByteString(e,n,"name"),r=Xs.converters.ByteString(r,n,"value"),A9t(this,e,r)}delete(e){if(Xs.brandCheck(this,t),Xs.argumentLengthCheck(arguments,1,"Headers.delete"),e=Xs.converters.ByteString(e,"Headers.delete","name"),!JCe(e))throw Xs.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){Xs.brandCheck(this,t),Xs.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=Xs.converters.ByteString(e,r,"name"),!JCe(e))throw Xs.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){Xs.brandCheck(this,t),Xs.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=Xs.converters.ByteString(e,r,"name"),!JCe(e))throw Xs.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){Xs.brandCheck(this,t),Xs.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=Xs.converters.ByteString(e,n,"name"),r=Xs.converters.ByteString(r,n,"value"),r=Eun(r),JCe(e)){if(!yun(r))throw Xs.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw Xs.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){Xs.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}get[ov](){if(this.#t[ov])return this.#t[ov];let e=[],r=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[ov]=r;for(let o=0;o>"](t,e,r,n.bind(t)):Xs.converters["record"](t,e,r)}throw Xs.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};bun.exports={fill:_un,compareHeaderName:Cun,Headers:fw,HeadersList:w$e,getHeadersGuard:vun,setHeadersGuard:L2o,setHeadersList:F2o,getHeadersList:y9t}});var ZCe=T((HOu,Oun)=>{"use strict";f();var{Headers:Run,HeadersList:Tun,fill:U2o,getHeadersGuard:Q2o,setHeadersGuard:Pun,setHeadersList:kun}=z$(),{extractBody:Sun,cloneBody:q2o,mixinBody:G2o,hasFinalizationRegistry:Dun,streamRegistry:Nun,bodyUnusable:H2o}=Zie(),E9t=Xo(),Iun=require("node:util"),{kEnumerableProperty:sv}=E9t,{isValidReasonPhrase:j2o,isCancelled:$2o,isAborted:V2o,isBlobLike:W2o,serializeJavascriptValueToJSONString:z2o,isErrorLike:Y2o,isomorphicEncode:K2o,environmentSettingsObject:J2o}=rv(),{redirectStatusSet:X2o,nullBodyStatus:Z2o}=vCe(),{kState:Su,kHeaders:V4}=MF(),{webidl:_o}=Im(),{FormData:ePo}=wCe(),{URLSerializer:xun}=p_(),{kConstruct:P$e}=bu(),_9t=require("node:assert"),{types:tPo}=require("node:util"),rPo=new TextEncoder("utf-8"),Y$=class t{static{a(this,"Response")}static error(){return XCe(k$e(),"immutable")}static json(e,r={}){_o.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=_o.converters.ResponseInit(r));let n=rPo.encode(z2o(e)),o=Sun(n),s=XCe(_oe({}),"response");return wun(s,r,{body:o[0],type:"application/json"}),s}static redirect(e,r=302){_o.argumentLengthCheck(arguments,1,"Response.redirect"),e=_o.converters.USVString(e),r=_o.converters["unsigned short"](r);let n;try{n=new URL(e,J2o.settingsObject.baseUrl)}catch(c){throw new TypeError(`Failed to parse URL from ${e}`,{cause:c})}if(!X2o.has(r))throw new RangeError(`Invalid status code ${r}`);let o=XCe(_oe({}),"immutable");o[Su].status=r;let s=K2o(xun(n));return o[Su].headersList.append("location",s,!0),o}constructor(e=null,r={}){if(_o.util.markAsUncloneable(this),e===P$e)return;e!==null&&(e=_o.converters.BodyInit(e)),r=_o.converters.ResponseInit(r),this[Su]=_oe({}),this[V4]=new Run(P$e),Pun(this[V4],"response"),kun(this[V4],this[Su].headersList);let n=null;if(e!=null){let[o,s]=Sun(e);n={body:o,type:s}}wun(this,r,n)}get type(){return _o.brandCheck(this,t),this[Su].type}get url(){_o.brandCheck(this,t);let e=this[Su].urlList,r=e[e.length-1]??null;return r===null?"":xun(r,!0)}get redirected(){return _o.brandCheck(this,t),this[Su].urlList.length>1}get status(){return _o.brandCheck(this,t),this[Su].status}get ok(){return _o.brandCheck(this,t),this[Su].status>=200&&this[Su].status<=299}get statusText(){return _o.brandCheck(this,t),this[Su].statusText}get headers(){return _o.brandCheck(this,t),this[V4]}get body(){return _o.brandCheck(this,t),this[Su].body?this[Su].body.stream:null}get bodyUsed(){return _o.brandCheck(this,t),!!this[Su].body&&E9t.isDisturbed(this[Su].body.stream)}clone(){if(_o.brandCheck(this,t),H2o(this))throw _o.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=C9t(this[Su]);return Dun&&this[Su].body?.stream&&Nun.register(this,new WeakRef(this[Su].body.stream)),XCe(e,Q2o(this[V4]))}[Iun.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${Iun.formatWithOptions(r,n)}`}};G2o(Y$);Object.defineProperties(Y$.prototype,{type:sv,url:sv,status:sv,ok:sv,redirected:sv,statusText:sv,headers:sv,clone:sv,body:sv,bodyUsed:sv,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(Y$,{json:sv,redirect:sv,error:sv});function C9t(t){if(t.internalResponse)return Mun(C9t(t.internalResponse),t.type);let e=_oe({...t,body:null});return t.body!=null&&(e.body=q2o(e,t.body)),e}a(C9t,"cloneResponse");function _oe(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new Tun(t?.headersList):new Tun,urlList:t?.urlList?[...t.urlList]:[]}}a(_oe,"makeResponse");function k$e(t){let e=Y2o(t);return _oe({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}a(k$e,"makeNetworkError");function nPo(t){return t.type==="error"&&t.status===0}a(nPo,"isNetworkError");function R$e(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,o){return _9t(!(n in e)),r[n]=o,!0}})}a(R$e,"makeFilteredResponse");function Mun(t,e){if(e==="basic")return R$e(t,{type:"basic",headersList:t.headersList});if(e==="cors")return R$e(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return R$e(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return R$e(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});_9t(!1)}a(Mun,"filterResponse");function iPo(t,e=null){return _9t($2o(t)),V2o(t)?k$e(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):k$e(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}a(iPo,"makeAppropriateNetworkError");function wun(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!j2o(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[Su].status=e.status),"statusText"in e&&e.statusText!=null&&(t[Su].statusText=e.statusText),"headers"in e&&e.headers!=null&&U2o(t[V4],e.headers),r){if(Z2o.includes(t.status))throw _o.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});t[Su].body=r.body,r.type!=null&&!t[Su].headersList.contains("content-type",!0)&&t[Su].headersList.append("content-type",r.type,!0)}}a(wun,"initializeResponse");function XCe(t,e){let r=new Y$(P$e);return r[Su]=t,r[V4]=new Run(P$e),kun(r[V4],t.headersList),Pun(r[V4],e),Dun&&t.body?.stream&&Nun.register(r,new WeakRef(t.body.stream)),r}a(XCe,"fromInnerResponse");_o.converters.ReadableStream=_o.interfaceConverter(ReadableStream);_o.converters.FormData=_o.interfaceConverter(ePo);_o.converters.URLSearchParams=_o.interfaceConverter(URLSearchParams);_o.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?_o.converters.USVString(t,e,r):W2o(t)?_o.converters.Blob(t,e,r,{strict:!1}):ArrayBuffer.isView(t)||tPo.isArrayBuffer(t)?_o.converters.BufferSource(t,e,r):E9t.isFormDataLike(t)?_o.converters.FormData(t,e,r,{strict:!1}):t instanceof URLSearchParams?_o.converters.URLSearchParams(t,e,r):_o.converters.DOMString(t,e,r)};_o.converters.BodyInit=function(t,e,r){return t instanceof ReadableStream?_o.converters.ReadableStream(t,e,r):t?.[Symbol.asyncIterator]?t:_o.converters.XMLHttpRequestBodyInit(t,e,r)};_o.converters.ResponseInit=_o.dictionaryConverter([{key:"status",converter:_o.converters["unsigned short"],defaultValue:a(()=>200,"defaultValue")},{key:"statusText",converter:_o.converters.ByteString,defaultValue:a(()=>"","defaultValue")},{key:"headers",converter:_o.converters.HeadersInit}]);Oun.exports={isNetworkError:nPo,makeNetworkError:k$e,makeResponse:_oe,makeAppropriateNetworkError:iPo,filterResponse:Mun,Response:Y$,cloneResponse:C9t,fromInnerResponse:XCe}});var Qun=T((VOu,Uun)=>{"use strict";f();var{kConnected:Lun,kSize:Fun}=bu(),v9t=class{static{a(this,"CompatWeakRef")}constructor(e){this.value=e}deref(){return this.value[Lun]===0&&this.value[Fun]===0?void 0:this.value}},b9t=class{static{a(this,"CompatFinalizer")}constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[Lun]===0&&e[Fun]===0&&this.finalizer(r)})}unregister(e){}};Uun.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18")?(process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:v9t,FinalizationRegistry:b9t}):{WeakRef,FinalizationRegistry}}});var Coe=T((YOu,tdn)=>{"use strict";f();var{extractBody:oPo,mixinBody:sPo,cloneBody:aPo,bodyUnusable:qun}=Zie(),{Headers:Kun,fill:cPo,HeadersList:O$e,setHeadersGuard:S9t,getHeadersGuard:lPo,setHeadersList:Jun,getHeadersList:Gun}=z$(),{FinalizationRegistry:uPo}=Qun()(),N$e=Xo(),Hun=require("node:util"),{isValidHTTPToken:dPo,sameOrigin:jun,environmentSettingsObject:D$e}=rv(),{forbiddenMethodsSet:fPo,corsSafeListedMethodsSet:pPo,referrerPolicy:hPo,requestRedirect:mPo,requestMode:gPo,requestCredentials:APo,requestCache:yPo,requestDuplex:EPo}=vCe(),{kEnumerableProperty:v0,normalizedMethodRecordsBase:_Po,normalizedMethodRecords:CPo}=N$e,{kHeaders:av,kSignal:M$e,kState:Wl,kDispatcher:T9t}=MF(),{webidl:mi}=Im(),{URLSerializer:vPo}=p_(),{kConstruct:B$e}=bu(),bPo=require("node:assert"),{getMaxListeners:$un,setMaxListeners:Vun,getEventListeners:TPo,defaultMaxListeners:Wun}=require("node:events"),SPo=Symbol("abortController"),Xun=new uPo(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),L$e=new WeakMap;function zun(t){return e;function e(){let r=t.deref();if(r!==void 0){Xun.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=L$e.get(r.signal);if(n!==void 0){if(n.size!==0){for(let o of n){let s=o.deref();s!==void 0&&s.abort(this.reason)}n.clear()}L$e.delete(r.signal)}}}}a(zun,"buildAbort");var Yun=!1,VF=class t{static{a(this,"Request")}constructor(e,r={}){if(mi.util.markAsUncloneable(this),e===B$e)return;let n="Request constructor";mi.argumentLengthCheck(arguments,1,n),e=mi.converters.RequestInfo(e,n,"input"),r=mi.converters.RequestInit(r,n,"init");let o=null,s=null,c=D$e.settingsObject.baseUrl,l=null;if(typeof e=="string"){this[T9t]=r.dispatcher;let _;try{_=new URL(e,c)}catch(v){throw new TypeError("Failed to parse URL from "+e,{cause:v})}if(_.username||_.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);o=F$e({urlList:[_]}),s="cors"}else this[T9t]=r.dispatcher||e[T9t],bPo(e instanceof t),o=e[Wl],l=e[M$e];let u=D$e.settingsObject.origin,d="client";if(o.window?.constructor?.name==="EnvironmentSettingsObject"&&jun(o.window,u)&&(d=o.window),r.window!=null)throw new TypeError(`'window' option '${d}' must be null`);"window"in r&&(d="no-window"),o=F$e({method:o.method,headersList:o.headersList,unsafeRequest:o.unsafeRequest,client:D$e.settingsObject,window:d,priority:o.priority,origin:o.origin,referrer:o.referrer,referrerPolicy:o.referrerPolicy,mode:o.mode,credentials:o.credentials,cache:o.cache,redirect:o.redirect,integrity:o.integrity,keepalive:o.keepalive,reloadNavigation:o.reloadNavigation,historyNavigation:o.historyNavigation,urlList:[...o.urlList]});let p=Object.keys(r).length!==0;if(p&&(o.mode==="navigate"&&(o.mode="same-origin"),o.reloadNavigation=!1,o.historyNavigation=!1,o.origin="client",o.referrer="client",o.referrerPolicy="",o.url=o.urlList[o.urlList.length-1],o.urlList=[o.url]),r.referrer!==void 0){let _=r.referrer;if(_==="")o.referrer="no-referrer";else{let v;try{v=new URL(_,c)}catch(b){throw new TypeError(`Referrer "${_}" is not a valid URL.`,{cause:b})}v.protocol==="about:"&&v.hostname==="client"||u&&!jun(v,D$e.settingsObject.baseUrl)?o.referrer="client":o.referrer=v}}r.referrerPolicy!==void 0&&(o.referrerPolicy=r.referrerPolicy);let h;if(r.mode!==void 0?h=r.mode:h=s,h==="navigate")throw mi.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(h!=null&&(o.mode=h),r.credentials!==void 0&&(o.credentials=r.credentials),r.cache!==void 0&&(o.cache=r.cache),o.cache==="only-if-cached"&&o.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(o.redirect=r.redirect),r.integrity!=null&&(o.integrity=String(r.integrity)),r.keepalive!==void 0&&(o.keepalive=!!r.keepalive),r.method!==void 0){let _=r.method,v=CPo[_];if(v!==void 0)o.method=v;else{if(!dPo(_))throw new TypeError(`'${_}' is not a valid HTTP method.`);let b=_.toUpperCase();if(fPo.has(b))throw new TypeError(`'${_}' HTTP method is unsupported.`);_=_Po[b]??_,o.method=_}!Yun&&o.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),Yun=!0)}r.signal!==void 0&&(l=r.signal),this[Wl]=o;let m=new AbortController;if(this[M$e]=m.signal,l!=null){if(!l||typeof l.aborted!="boolean"||typeof l.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(l.aborted)m.abort(l.reason);else{this[SPo]=m;let _=new WeakRef(m),v=zun(_);try{(typeof $un=="function"&&$un(l)===Wun||TPo(l,"abort").length>=Wun)&&Vun(1500,l)}catch{}N$e.addAbortListener(l,v),Xun.register(m,{signal:l,abort:v},v)}}if(this[av]=new Kun(B$e),Jun(this[av],o.headersList),S9t(this[av],"request"),h==="no-cors"){if(!pPo.has(o.method))throw new TypeError(`'${o.method} is unsupported in no-cors mode.`);S9t(this[av],"request-no-cors")}if(p){let _=Gun(this[av]),v=r.headers!==void 0?r.headers:new O$e(_);if(_.clear(),v instanceof O$e){for(let{name:b,value:I}of v.rawValues())_.append(b,I,!1);_.cookies=v.cookies}else cPo(this[av],v)}let g=e instanceof t?e[Wl].body:null;if((r.body!=null||g!=null)&&(o.method==="GET"||o.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[_,v]=oPo(r.body,o.keepalive);A=_,v&&!Gun(this[av]).contains("content-type",!0)&&this[av].append("content-type",v)}let y=A??g;if(y!=null&&y.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(o.mode!=="same-origin"&&o.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');o.useCORSPreflightFlag=!0}let E=y;if(A==null&&g!=null){if(qun(e))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let _=new TransformStream;g.stream.pipeThrough(_),E={source:g.source,length:g.length,stream:_.readable}}this[Wl].body=E}get method(){return mi.brandCheck(this,t),this[Wl].method}get url(){return mi.brandCheck(this,t),vPo(this[Wl].url)}get headers(){return mi.brandCheck(this,t),this[av]}get destination(){return mi.brandCheck(this,t),this[Wl].destination}get referrer(){return mi.brandCheck(this,t),this[Wl].referrer==="no-referrer"?"":this[Wl].referrer==="client"?"about:client":this[Wl].referrer.toString()}get referrerPolicy(){return mi.brandCheck(this,t),this[Wl].referrerPolicy}get mode(){return mi.brandCheck(this,t),this[Wl].mode}get credentials(){return this[Wl].credentials}get cache(){return mi.brandCheck(this,t),this[Wl].cache}get redirect(){return mi.brandCheck(this,t),this[Wl].redirect}get integrity(){return mi.brandCheck(this,t),this[Wl].integrity}get keepalive(){return mi.brandCheck(this,t),this[Wl].keepalive}get isReloadNavigation(){return mi.brandCheck(this,t),this[Wl].reloadNavigation}get isHistoryNavigation(){return mi.brandCheck(this,t),this[Wl].historyNavigation}get signal(){return mi.brandCheck(this,t),this[M$e]}get body(){return mi.brandCheck(this,t),this[Wl].body?this[Wl].body.stream:null}get bodyUsed(){return mi.brandCheck(this,t),!!this[Wl].body&&N$e.isDisturbed(this[Wl].body.stream)}get duplex(){return mi.brandCheck(this,t),"half"}clone(){if(mi.brandCheck(this,t),qun(this))throw new TypeError("unusable");let e=Zun(this[Wl]),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=L$e.get(this.signal);n===void 0&&(n=new Set,L$e.set(this.signal,n));let o=new WeakRef(r);n.add(o),N$e.addAbortListener(r.signal,zun(o))}return edn(e,r.signal,lPo(this[av]))}[Hun.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${Hun.formatWithOptions(r,n)}`}};sPo(VF);function F$e(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new O$e(t.headersList):new O$e}}a(F$e,"makeRequest");function Zun(t){let e=F$e({...t,body:null});return t.body!=null&&(e.body=aPo(e,t.body)),e}a(Zun,"cloneRequest");function edn(t,e,r){let n=new VF(B$e);return n[Wl]=t,n[M$e]=e,n[av]=new Kun(B$e),Jun(n[av],t.headersList),S9t(n[av],r),n}a(edn,"fromInnerRequest");Object.defineProperties(VF.prototype,{method:v0,url:v0,headers:v0,redirect:v0,clone:v0,signal:v0,duplex:v0,destination:v0,body:v0,bodyUsed:v0,isHistoryNavigation:v0,isReloadNavigation:v0,keepalive:v0,integrity:v0,cache:v0,credentials:v0,attribute:v0,referrerPolicy:v0,referrer:v0,mode:v0,[Symbol.toStringTag]:{value:"Request",configurable:!0}});mi.converters.Request=mi.interfaceConverter(VF);mi.converters.RequestInfo=function(t,e,r){return typeof t=="string"?mi.converters.USVString(t,e,r):t instanceof VF?mi.converters.Request(t,e,r):mi.converters.USVString(t,e,r)};mi.converters.AbortSignal=mi.interfaceConverter(AbortSignal);mi.converters.RequestInit=mi.dictionaryConverter([{key:"method",converter:mi.converters.ByteString},{key:"headers",converter:mi.converters.HeadersInit},{key:"body",converter:mi.nullableConverter(mi.converters.BodyInit)},{key:"referrer",converter:mi.converters.USVString},{key:"referrerPolicy",converter:mi.converters.DOMString,allowedValues:hPo},{key:"mode",converter:mi.converters.DOMString,allowedValues:gPo},{key:"credentials",converter:mi.converters.DOMString,allowedValues:APo},{key:"cache",converter:mi.converters.DOMString,allowedValues:yPo},{key:"redirect",converter:mi.converters.DOMString,allowedValues:mPo},{key:"integrity",converter:mi.converters.DOMString},{key:"keepalive",converter:mi.converters.boolean},{key:"signal",converter:mi.nullableConverter(t=>mi.converters.AbortSignal(t,"RequestInit","signal",{strict:!1}))},{key:"window",converter:mi.converters.any},{key:"duplex",converter:mi.converters.DOMString,allowedValues:EPo},{key:"dispatcher",converter:mi.converters.any}]);tdn.exports={Request:VF,makeRequest:F$e,fromInnerRequest:edn,cloneRequest:Zun}});var t1e=T((XOu,gdn)=>{"use strict";f();var{makeNetworkError:tc,makeAppropriateNetworkError:U$e,filterResponse:I9t,makeResponse:Q$e,fromInnerResponse:IPo}=ZCe(),{HeadersList:rdn}=z$(),{Request:xPo,cloneRequest:wPo}=Coe(),WF=require("node:zlib"),{bytesMatch:RPo,makePolicyContainer:PPo,clonePolicyContainer:kPo,requestBadPort:DPo,TAOCheck:NPo,appendRequestOriginHeader:MPo,responseLocationURL:OPo,requestCurrentURL:Kk,setRequestReferrerPolicyOnRedirect:BPo,tryUpgradeRequestToAPotentiallyTrustworthyURL:LPo,createOpaqueTimingInfo:k9t,appendFetchMetadata:FPo,corsCheck:UPo,crossOriginResourcePolicyCheck:QPo,determineRequestsReferrer:qPo,coarsenedSharedCurrentTime:e1e,createDeferredPromise:GPo,isBlobLike:HPo,sameOrigin:P9t,isCancelled:K$,isAborted:ndn,isErrorLike:jPo,fullyReadBody:$Po,readableStreamClose:VPo,isomorphicEncode:q$e,urlIsLocal:WPo,urlIsHttpHttpsScheme:D9t,urlHasHttpsScheme:zPo,clampAndCoarsenConnectionTimingInfo:YPo,simpleRangeHeaderValue:KPo,buildContentRange:JPo,createInflate:XPo,extractMimeType:ZPo}=rv(),{kState:adn,kDispatcher:eko}=MF(),J$=require("node:assert"),{safelyExtractBody:N9t,extractBody:idn}=Zie(),{redirectStatusSet:cdn,nullBodyStatus:ldn,safeMethodsSet:tko,requestBodyHeader:rko,subresourceSet:nko}=vCe(),iko=require("node:events"),{Readable:oko,pipeline:sko,finished:ako}=require("node:stream"),{addAbortListener:cko,isErrored:lko,isReadable:G$e,bufferToLowerCasedHeaderName:odn}=Xo(),{dataURLProcessor:uko,serializeAMimeType:dko,minimizeSupportedMimeType:fko}=p_(),{getGlobalDispatcher:pko}=S$e(),{webidl:hko}=Im(),{STATUS_CODES:mko}=require("node:http"),gko=["GET","HEAD"],Ako=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",x9t,H$e=class extends iko{static{a(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function yko(t){udn(t,"fetch")}a(yko,"handleFetchDone");function Eko(t,e=void 0){hko.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=GPo(),n;try{n=new xPo(t,e)}catch(p){return r.reject(p),r.promise}let o=n[adn];if(n.signal.aborted)return w9t(r,o,null,n.signal.reason),r.promise;o.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(o.serviceWorkers="none");let c=null,l=!1,u=null;return cko(n.signal,()=>{l=!0,J$(u!=null),u.abort(n.signal.reason);let p=c?.deref();w9t(r,o,p,n.signal.reason)}),u=fdn({request:o,processResponseEndOfBody:yko,processResponse:a(p=>{if(!l){if(p.aborted){w9t(r,o,c,u.serializedAbortReason);return}if(p.type==="error"){r.reject(new TypeError("fetch failed",{cause:p.error}));return}c=new WeakRef(IPo(p,"immutable")),r.resolve(c.deref()),r=null}},"processResponse"),dispatcher:n[eko]}),r.promise}a(Eko,"fetch");function udn(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,o=t.cacheState;D9t(r)&&n!==null&&(t.timingAllowPassed||(n=k9t({startTime:n.startTime}),o=""),n.endTime=e1e(),t.timingInfo=n,ddn(n,r.href,e,globalThis,o))}a(udn,"finalizeAndReportTiming");var ddn=performance.markResourceTiming;function w9t(t,e,r,n){if(t&&t.reject(n),e.body!=null&&G$e(e.body?.stream)&&e.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s}),r==null)return;let o=r[adn];o.body!=null&&G$e(o.body?.stream)&&o.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s})}a(w9t,"abortFetch");function fdn({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:o,processResponseConsumeBody:s,useParallelQueue:c=!1,dispatcher:l=pko()}){J$(l);let u=null,d=!1;t.client!=null&&(u=t.client.globalObject,d=t.client.crossOriginIsolatedCapability);let p=e1e(d),h=k9t({startTime:p}),m={controller:new H$e(l),request:t,timingInfo:h,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:s,processResponseEndOfBody:o,taskDestination:u,crossOriginIsolatedCapability:d};return J$(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=kPo(t.client.policyContainer):t.policyContainer=PPo()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,nko.has(t.destination),pdn(m).catch(g=>{m.controller.terminate(g)}),m.controller}a(fdn,"fetching");async function pdn(t,e=!1){let r=t.request,n=null;if(r.localURLsOnly&&!WPo(Kk(r))&&(n=tc("local URLs only")),LPo(r),DPo(r)==="blocked"&&(n=tc("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=qPo(r)),n===null&&(n=await(async()=>{let s=Kk(r);return P9t(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await sdn(t)):r.mode==="same-origin"?tc('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?tc('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await sdn(t)):D9t(Kk(r))?(r.responseTainting="cors",await hdn(t)):tc("URL scheme must be a HTTP(S) scheme")})()),e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=I9t(n,"basic"):r.responseTainting==="cors"?n=I9t(n,"cors"):r.responseTainting==="opaque"?n=I9t(n,"opaque"):J$(!1));let o=n.status===0?n:n.internalResponse;if(o.urlList.length===0&&o.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&o.status===206&&o.rangeRequested&&!r.headers.contains("range",!0)&&(n=o=tc()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||ldn.includes(o.status))&&(o.body=null,t.controller.dump=!0),r.integrity){let s=a(l=>R9t(t,tc(l)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){s(n.error);return}let c=a(l=>{if(!RPo(l,r.integrity)){s("integrity mismatch");return}n.body=N9t(l)[0],R9t(t,n)},"processBody");await $Po(n.body,c,s)}else R9t(t,n)}a(pdn,"mainFetch");function sdn(t){if(K$(t)&&t.request.redirectCount===0)return Promise.resolve(U$e(t));let{request:e}=t,{protocol:r}=Kk(e);switch(r){case"about:":return Promise.resolve(tc("about scheme is not supported"));case"blob:":{x9t||(x9t=require("node:buffer").resolveObjectURL);let n=Kk(e);if(n.search.length!==0)return Promise.resolve(tc("NetworkError when attempting to fetch resource."));let o=x9t(n.toString());if(e.method!=="GET"||!HPo(o))return Promise.resolve(tc("invalid method"));let s=Q$e(),c=o.size,l=q$e(`${c}`),u=o.type;if(e.headersList.contains("range",!0)){s.rangeRequested=!0;let d=e.headersList.get("range",!0),p=KPo(d,!0);if(p==="failure")return Promise.resolve(tc("failed to fetch the data URL"));let{rangeStartValue:h,rangeEndValue:m}=p;if(h===null)h=c-m,m=h+m-1;else{if(h>=c)return Promise.resolve(tc("Range start is greater than the blob's size."));(m===null||m>=c)&&(m=c-1)}let g=o.slice(h,m,u),A=idn(g);s.body=A[0];let y=q$e(`${g.size}`),E=JPo(h,m,c);s.status=206,s.statusText="Partial Content",s.headersList.set("content-length",y,!0),s.headersList.set("content-type",u,!0),s.headersList.set("content-range",E,!0)}else{let d=idn(o);s.statusText="OK",s.body=d[0],s.headersList.set("content-length",l,!0),s.headersList.set("content-type",u,!0)}return Promise.resolve(s)}case"data:":{let n=Kk(e),o=uko(n);if(o==="failure")return Promise.resolve(tc("failed to fetch the data URL"));let s=dko(o.mimeType);return Promise.resolve(Q$e({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:N9t(o.body)[0]}))}case"file:":return Promise.resolve(tc("not implemented... yet..."));case"http:":case"https:":return hdn(t).catch(n=>tc(n));default:return Promise.resolve(tc("unknown scheme"))}}a(sdn,"schemeFetch");function _ko(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}a(_ko,"finalizeResponse");function R9t(t,e){let r=t.timingInfo,n=a(()=>{let s=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(t.request.url.protocol!=="https:")return;r.endTime=s;let l=e.cacheState,u=e.bodyInfo;e.timingAllowPassed||(r=k9t(r),l="");let d=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){d=e.status;let p=ZPo(e.headersList);p!=="failure"&&(u.contentType=fko(p))}t.request.initiatorType!=null&&ddn(r,t.request.url.href,t.request.initiatorType,globalThis,l,u,d)};let c=a(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>c())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let o=e.type==="error"?e:e.internalResponse??e;o.body==null?n():ako(o.body.stream,()=>{n()})}a(R9t,"fetchFinale");async function hdn(t){let e=t.request,r=null,n=null,o=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await mdn(t),e.responseTainting==="cors"&&UPo(e,r)==="failure")return tc("cors failure");NPo(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&QPo(e.origin,e.client,e.destination,n)==="blocked"?tc("blocked"):(cdn.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=tc("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await Cko(t,r):J$(!1)),r.timingInfo=o,r)}a(hdn,"httpFetch");function Cko(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,o;try{if(o=OPo(n,Kk(r).hash),o==null)return e}catch(c){return Promise.resolve(tc(c))}if(!D9t(o))return Promise.resolve(tc("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(tc("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(o.username||o.password)&&!P9t(r,o))return Promise.resolve(tc('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(o.username||o.password))return Promise.resolve(tc('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(tc());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!gko.includes(r.method)){r.method="GET",r.body=null;for(let c of rko)r.headersList.delete(c)}P9t(Kk(r),o)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(J$(r.body.source!=null),r.body=N9t(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=e1e(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(o),BPo(r,n),pdn(t,!0)}a(Cko,"httpRedirectFetch");async function mdn(t,e=!1,r=!1){let n=t.request,o=null,s=null,c=null,l=null,u=!1;n.window==="no-window"&&n.redirect==="error"?(o=t,s=n):(s=wPo(n),o={...t},o.request=s);let d=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",p=s.body?s.body.length:null,h=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(h="0"),p!=null&&(h=q$e(`${p}`)),h!=null&&s.headersList.append("content-length",h,!0),p!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append("referer",q$e(s.referrer.href),!0),MPo(s),FPo(s),s.headersList.contains("user-agent",!0)||s.headersList.append("user-agent",Ako),s.cache==="default"&&(s.headersList.contains("if-modified-since",!0)||s.headersList.contains("if-none-match",!0)||s.headersList.contains("if-unmodified-since",!0)||s.headersList.contains("if-match",!0)||s.headersList.contains("if-range",!0))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control",!0)&&s.headersList.append("cache-control","max-age=0",!0),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma",!0)||s.headersList.append("pragma","no-cache",!0),s.headersList.contains("cache-control",!0)||s.headersList.append("cache-control","no-cache",!0)),s.headersList.contains("range",!0)&&s.headersList.append("accept-encoding","identity",!0),s.headersList.contains("accept-encoding",!0)||(zPo(Kk(s))?s.headersList.append("accept-encoding","br, gzip, deflate",!0):s.headersList.append("accept-encoding","gzip, deflate",!0)),s.headersList.delete("host",!0),l==null&&(s.cache="no-store"),s.cache!=="no-store"&&s.cache,c==null){if(s.cache==="only-if-cached")return tc("only if cached");let m=await vko(o,d,r);!tko.has(s.method)&&m.status>=200&&m.status<=399,u&&m.status,c==null&&(c=m)}if(c.urlList=[...s.urlList],s.headersList.contains("range",!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=d,c.status===407)return n.window==="no-window"?tc():K$(t)?U$e(t):tc("proxy authentication required");if(c.status===421&&!r&&(n.body==null||n.body.source!=null)){if(K$(t))return U$e(t);t.controller.connection.destroy(),c=await mdn(t,e,!0)}return c}a(mdn,"httpNetworkOrCacheFetch");async function vko(t,e=!1,r=!1){J$(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,y=!0){this.destroyed||(this.destroyed=!0,y&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,o=null,s=t.timingInfo;null==null&&(n.cache="no-store");let l=r?"yes":"no";n.mode;let u=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=a(async function*(_){K$(t)||(yield _,t.processRequestBodyChunkLength?.(_.byteLength))},"processBodyChunk"),y=a(()=>{K$(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=a(_=>{K$(t)||(_.name==="AbortError"?t.controller.abort():t.controller.terminate(_))},"processBodyError");u=(async function*(){try{for await(let _ of n.body.stream)yield*A(_);y()}catch(_){E(_)}})()}try{let{body:A,status:y,statusText:E,headersList:_,socket:v}=await g({body:u});if(v)o=Q$e({status:y,statusText:E,headersList:_,socket:v});else{let b=A[Symbol.asyncIterator]();t.controller.next=()=>b.next(),o=Q$e({status:y,statusText:E,headersList:_})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),U$e(t,A)):tc(A)}let d=a(async()=>{await t.controller.resume()},"pullAlgorithm"),p=a(A=>{K$(t)||t.controller.abort(A)},"cancelAlgorithm"),h=new ReadableStream({async start(A){t.controller.controller=A},async pull(A){await d(A)},async cancel(A){await p(A)},type:"bytes"});o.body={stream:h,source:null,length:null},t.controller.onAborted=m,t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,y;try{let{done:_,value:v}=await t.controller.next();if(ndn(t))break;A=_?void 0:v}catch(_){t.controller.ended&&!s.encodedBodySize?A=void 0:(A=_,y=!0)}if(A===void 0){VPo(t.controller.controller),_ko(t,o);return}if(s.decodedBodySize+=A?.byteLength??0,y){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),lko(h)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){ndn(t)?(o.aborted=!0,G$e(h)&&t.controller.controller.error(t.controller.serializedAbortReason)):G$e(h)&&t.controller.controller.error(new TypeError("terminated",{cause:jPo(A)?A:void 0})),t.controller.connection.destroy()}return a(m,"onAborted"),o;function g({body:A}){let y=Kk(n),E=t.controller.dispatcher;return new Promise((_,v)=>E.dispatch({path:y.pathname+y.search,origin:y.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(b){let{connection:I}=t.controller;s.finalConnectionTimingInfo=YPo(void 0,s.postRedirectStartTime,t.crossOriginIsolatedCapability),I.destroyed?b(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",b),this.abort=I.abort=b),s.finalNetworkRequestStartTime=e1e(t.crossOriginIsolatedCapability)},onResponseStarted(){s.finalNetworkResponseStartTime=e1e(t.crossOriginIsolatedCapability)},onHeaders(b,I,x,w){if(b<200)return;let R="",P=new rdn;for(let N=0;NO)return v(new Error(`too many content-encodings in response: ${G.length}, maximum allowed is ${O}`)),!0;for(let D=G.length-1;D>=0;--D){let F=G[D].trim();if(F==="x-gzip"||F==="gzip")k.push(WF.createGunzip({flush:WF.constants.Z_SYNC_FLUSH,finishFlush:WF.constants.Z_SYNC_FLUSH}));else if(F==="deflate")k.push(XPo({flush:WF.constants.Z_SYNC_FLUSH,finishFlush:WF.constants.Z_SYNC_FLUSH}));else if(F==="br")k.push(WF.createBrotliDecompress({flush:WF.constants.BROTLI_OPERATION_FLUSH,finishFlush:WF.constants.BROTLI_OPERATION_FLUSH}));else{k.length=0;break}}}let M=this.onError.bind(this);return _({status:b,statusText:w,headersList:P,body:k.length?sko(this.body,...k,N=>{N&&this.onError(N)}).on("error",M):this.body.on("error",M)}),!0},onData(b){if(t.controller.dump)return;let I=b;return s.encodedBodySize+=I.byteLength,this.body.push(I)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.onAborted&&t.controller.off("terminated",t.controller.onAborted),t.controller.ended=!0,this.body.push(null)},onError(b){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(b),t.controller.terminate(b),v(b)},onUpgrade(b,I,x){if(b!==101)return;let w=new rdn;for(let R=0;R{"use strict";f();Adn.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var Edn=T((nBu,ydn)=>{"use strict";f();var{webidl:cv}=Im(),j$e=Symbol("ProgressEvent state"),O9t=class t extends Event{static{a(this,"ProgressEvent")}constructor(e,r={}){e=cv.converters.DOMString(e,"ProgressEvent constructor","type"),r=cv.converters.ProgressEventInit(r??{}),super(e,r),this[j$e]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return cv.brandCheck(this,t),this[j$e].lengthComputable}get loaded(){return cv.brandCheck(this,t),this[j$e].loaded}get total(){return cv.brandCheck(this,t),this[j$e].total}};cv.converters.ProgressEventInit=cv.dictionaryConverter([{key:"lengthComputable",converter:cv.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"loaded",converter:cv.converters["unsigned long long"],defaultValue:a(()=>0,"defaultValue")},{key:"total",converter:cv.converters["unsigned long long"],defaultValue:a(()=>0,"defaultValue")},{key:"bubbles",converter:cv.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:cv.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:cv.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}]);ydn.exports={ProgressEvent:O9t}});var Cdn=T((sBu,_dn)=>{"use strict";f();function bko(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}a(bko,"getEncoding");_dn.exports={getEncoding:bko}});var Rdn=T((lBu,wdn)=>{"use strict";f();var{kState:voe,kError:B9t,kResult:vdn,kAborted:r1e,kLastProgressEventFired:L9t}=M9t(),{ProgressEvent:Tko}=Edn(),{getEncoding:bdn}=Cdn(),{serializeAMimeType:Sko,parseMIMEType:Tdn}=p_(),{types:Iko}=require("node:util"),{StringDecoder:Sdn}=require("string_decoder"),{btoa:Idn}=require("node:buffer"),xko={enumerable:!0,writable:!1,configurable:!1};function wko(t,e,r,n){if(t[voe]==="loading")throw new DOMException("Invalid state","InvalidStateError");t[voe]="loading",t[vdn]=null,t[B9t]=null;let s=e.stream().getReader(),c=[],l=s.read(),u=!0;(async()=>{for(;!t[r1e];)try{let{done:d,value:p}=await l;if(u&&!t[r1e]&&queueMicrotask(()=>{zF("loadstart",t)}),u=!1,!d&&Iko.isUint8Array(p))c.push(p),(t[L9t]===void 0||Date.now()-t[L9t]>=50)&&!t[r1e]&&(t[L9t]=Date.now(),queueMicrotask(()=>{zF("progress",t)})),l=s.read();else if(d){queueMicrotask(()=>{t[voe]="done";try{let h=Rko(c,r,e.type,n);if(t[r1e])return;t[vdn]=h,zF("load",t)}catch(h){t[B9t]=h,zF("error",t)}t[voe]!=="loading"&&zF("loadend",t)});break}}catch(d){if(t[r1e])return;queueMicrotask(()=>{t[voe]="done",t[B9t]=d,zF("error",t),t[voe]!=="loading"&&zF("loadend",t)});break}})()}a(wko,"readOperation");function zF(t,e){let r=new Tko(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}a(zF,"fireAProgressEvent");function Rko(t,e,r,n){switch(e){case"DataURL":{let o="data:",s=Tdn(r||"application/octet-stream");s!=="failure"&&(o+=Sko(s)),o+=";base64,";let c=new Sdn("latin1");for(let l of t)o+=Idn(c.write(l));return o+=Idn(c.end()),o}case"Text":{let o="failure";if(n&&(o=bdn(n)),o==="failure"&&r){let s=Tdn(r);s!=="failure"&&(o=bdn(s.parameters.get("charset")))}return o==="failure"&&(o="UTF-8"),Pko(t,o)}case"ArrayBuffer":return xdn(t).buffer;case"BinaryString":{let o="",s=new Sdn("latin1");for(let c of t)o+=s.write(c);return o+=s.end(),o}}}a(Rko,"packageData");function Pko(t,e){let r=xdn(t),n=kko(r),o=0;n!==null&&(e=n,o=n==="UTF-8"?3:2);let s=r.slice(o);return new TextDecoder(e).decode(s)}a(Pko,"decode");function kko(t){let[e,r,n]=t;return e===239&&r===187&&n===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}a(kko,"BOMSniffing");function xdn(t){let e=t.reduce((n,o)=>n+o.byteLength,0),r=0;return t.reduce((n,o)=>(n.set(o,r),r+=o.byteLength,n),new Uint8Array(e))}a(xdn,"combineByteSequences");wdn.exports={staticPropertyDescriptors:xko,readOperation:wko,fireAProgressEvent:zF}});var Ndn=T((fBu,Ddn)=>{"use strict";f();var{staticPropertyDescriptors:boe,readOperation:$$e,fireAProgressEvent:Pdn}=Rdn(),{kState:X$,kError:kdn,kResult:V$e,kEvents:ka,kAborted:Dko}=M9t(),{webidl:bc}=Im(),{kEnumerableProperty:g_}=Xo(),pw=class t extends EventTarget{static{a(this,"FileReader")}constructor(){super(),this[X$]="empty",this[V$e]=null,this[kdn]=null,this[ka]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){bc.brandCheck(this,t),bc.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),e=bc.converters.Blob(e,{strict:!1}),$$e(this,e,"ArrayBuffer")}readAsBinaryString(e){bc.brandCheck(this,t),bc.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),e=bc.converters.Blob(e,{strict:!1}),$$e(this,e,"BinaryString")}readAsText(e,r=void 0){bc.brandCheck(this,t),bc.argumentLengthCheck(arguments,1,"FileReader.readAsText"),e=bc.converters.Blob(e,{strict:!1}),r!==void 0&&(r=bc.converters.DOMString(r,"FileReader.readAsText","encoding")),$$e(this,e,"Text",r)}readAsDataURL(e){bc.brandCheck(this,t),bc.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),e=bc.converters.Blob(e,{strict:!1}),$$e(this,e,"DataURL")}abort(){if(this[X$]==="empty"||this[X$]==="done"){this[V$e]=null;return}this[X$]==="loading"&&(this[X$]="done",this[V$e]=null),this[Dko]=!0,Pdn("abort",this),this[X$]!=="loading"&&Pdn("loadend",this)}get readyState(){switch(bc.brandCheck(this,t),this[X$]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return bc.brandCheck(this,t),this[V$e]}get error(){return bc.brandCheck(this,t),this[kdn]}get onloadend(){return bc.brandCheck(this,t),this[ka].loadend}set onloadend(e){bc.brandCheck(this,t),this[ka].loadend&&this.removeEventListener("loadend",this[ka].loadend),typeof e=="function"?(this[ka].loadend=e,this.addEventListener("loadend",e)):this[ka].loadend=null}get onerror(){return bc.brandCheck(this,t),this[ka].error}set onerror(e){bc.brandCheck(this,t),this[ka].error&&this.removeEventListener("error",this[ka].error),typeof e=="function"?(this[ka].error=e,this.addEventListener("error",e)):this[ka].error=null}get onloadstart(){return bc.brandCheck(this,t),this[ka].loadstart}set onloadstart(e){bc.brandCheck(this,t),this[ka].loadstart&&this.removeEventListener("loadstart",this[ka].loadstart),typeof e=="function"?(this[ka].loadstart=e,this.addEventListener("loadstart",e)):this[ka].loadstart=null}get onprogress(){return bc.brandCheck(this,t),this[ka].progress}set onprogress(e){bc.brandCheck(this,t),this[ka].progress&&this.removeEventListener("progress",this[ka].progress),typeof e=="function"?(this[ka].progress=e,this.addEventListener("progress",e)):this[ka].progress=null}get onload(){return bc.brandCheck(this,t),this[ka].load}set onload(e){bc.brandCheck(this,t),this[ka].load&&this.removeEventListener("load",this[ka].load),typeof e=="function"?(this[ka].load=e,this.addEventListener("load",e)):this[ka].load=null}get onabort(){return bc.brandCheck(this,t),this[ka].abort}set onabort(e){bc.brandCheck(this,t),this[ka].abort&&this.removeEventListener("abort",this[ka].abort),typeof e=="function"?(this[ka].abort=e,this.addEventListener("abort",e)):this[ka].abort=null}};pw.EMPTY=pw.prototype.EMPTY=0;pw.LOADING=pw.prototype.LOADING=1;pw.DONE=pw.prototype.DONE=2;Object.defineProperties(pw.prototype,{EMPTY:boe,LOADING:boe,DONE:boe,readAsArrayBuffer:g_,readAsBinaryString:g_,readAsText:g_,readAsDataURL:g_,abort:g_,readyState:g_,result:g_,error:g_,onloadstart:g_,onprogress:g_,onload:g_,onabort:g_,onerror:g_,onloadend:g_,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(pw,{EMPTY:boe,LOADING:boe,DONE:boe});Ddn.exports={FileReader:pw}});var W$e=T((mBu,Mdn)=>{"use strict";f();Mdn.exports={kConstruct:bu().kConstruct}});var Ldn=T((ABu,Bdn)=>{"use strict";f();var Nko=require("node:assert"),{URLSerializer:Odn}=p_(),{isValidHeaderName:Mko}=rv();function Oko(t,e,r=!1){let n=Odn(t,r),o=Odn(e,r);return n===o}a(Oko,"urlEquals");function Bko(t){Nko(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),Mko(r)&&e.push(r);return e}a(Bko,"getFieldValues");Bdn.exports={urlEquals:Oko,getFieldValues:Bko}});var Qdn=T((_Bu,Udn)=>{"use strict";f();var{kConstruct:Lko}=W$e(),{urlEquals:Fko,getFieldValues:F9t}=Ldn(),{kEnumerableProperty:Z$,isDisturbed:Uko}=Xo(),{webidl:Wn}=Im(),{Response:Qko,cloneResponse:qko,fromInnerResponse:Gko}=ZCe(),{Request:W4,fromInnerRequest:Hko}=Coe(),{kState:hw}=MF(),{fetching:jko}=t1e(),{urlIsHttpHttpsScheme:z$e,createDeferredPromise:Toe,readAllBytes:$ko}=rv(),U9t=require("node:assert"),Y$e=class t{static{a(this,"Cache")}#e;constructor(){arguments[0]!==Lko&&Wn.illegalConstructor(),Wn.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){Wn.brandCheck(this,t);let n="Cache.match";Wn.argumentLengthCheck(arguments,1,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=this.#i(e,r,1);if(o.length!==0)return o[0]}async matchAll(e=void 0,r={}){Wn.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=Wn.converters.RequestInfo(e,n,"request")),r=Wn.converters.CacheQueryOptions(r,n,"options"),this.#i(e,r)}async add(e){Wn.brandCheck(this,t);let r="Cache.add";Wn.argumentLengthCheck(arguments,1,r),e=Wn.converters.RequestInfo(e,r,"request");let n=[e];return await this.addAll(n)}async addAll(e){Wn.brandCheck(this,t);let r="Cache.addAll";Wn.argumentLengthCheck(arguments,1,r);let n=[],o=[];for(let m of e){if(m===void 0)throw Wn.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=Wn.converters.RequestInfo(m),typeof m=="string")continue;let g=m[hw];if(!z$e(g.url)||g.method!=="GET")throw Wn.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let s=[];for(let m of e){let g=new W4(m)[hw];if(!z$e(g.url))throw Wn.errors.exception({header:r,message:"Expected http/s scheme."});g.initiator="fetch",g.destination="subresource",o.push(g);let A=Toe();s.push(jko({request:g,processResponse(y){if(y.type==="error"||y.status===206||y.status<200||y.status>299)A.reject(Wn.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(y.headersList.contains("vary")){let E=F9t(y.headersList.get("vary"));for(let _ of E)if(_==="*"){A.reject(Wn.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let v of s)v.abort();return}}},processResponseEndOfBody(y){if(y.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(y)}})),n.push(A.promise)}let l=await Promise.all(n),u=[],d=0;for(let m of l){let g={type:"put",request:o[d],response:m};u.push(g),d++}let p=Toe(),h=null;try{this.#t(u)}catch(m){h=m}return queueMicrotask(()=>{h===null?p.resolve(void 0):p.reject(h)}),p.promise}async put(e,r){Wn.brandCheck(this,t);let n="Cache.put";Wn.argumentLengthCheck(arguments,2,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.Response(r,n,"response");let o=null;if(e instanceof W4?o=e[hw]:o=new W4(e)[hw],!z$e(o.url)||o.method!=="GET")throw Wn.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let s=r[hw];if(s.status===206)throw Wn.errors.exception({header:n,message:"Got 206 status"});if(s.headersList.contains("vary")){let g=F9t(s.headersList.get("vary"));for(let A of g)if(A==="*")throw Wn.errors.exception({header:n,message:"Got * vary field value"})}if(s.body&&(Uko(s.body.stream)||s.body.stream.locked))throw Wn.errors.exception({header:n,message:"Response body is locked or disturbed"});let c=qko(s),l=Toe();if(s.body!=null){let A=s.body.stream.getReader();$ko(A).then(l.resolve,l.reject)}else l.resolve(void 0);let u=[],d={type:"put",request:o,response:c};u.push(d);let p=await l.promise;c.body!=null&&(c.body.source=p);let h=Toe(),m=null;try{this.#t(u)}catch(g){m=g}return queueMicrotask(()=>{m===null?h.resolve():h.reject(m)}),h.promise}async delete(e,r={}){Wn.brandCheck(this,t);let n="Cache.delete";Wn.argumentLengthCheck(arguments,1,n),e=Wn.converters.RequestInfo(e,n,"request"),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e instanceof W4){if(o=e[hw],o.method!=="GET"&&!r.ignoreMethod)return!1}else U9t(typeof e=="string"),o=new W4(e)[hw];let s=[],c={type:"delete",request:o,options:r};s.push(c);let l=Toe(),u=null,d;try{d=this.#t(s)}catch(p){u=p}return queueMicrotask(()=>{u===null?l.resolve(!!d?.length):l.reject(u)}),l.promise}async keys(e=void 0,r={}){Wn.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=Wn.converters.RequestInfo(e,n,"request")),r=Wn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e!==void 0)if(e instanceof W4){if(o=e[hw],o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=new W4(e)[hw]);let s=Toe(),c=[];if(e===void 0)for(let l of this.#e)c.push(l[0]);else{let l=this.#n(o,r);for(let u of l)c.push(u[0])}return queueMicrotask(()=>{let l=[];for(let u of c){let d=Hko(u,new AbortController().signal,"immutable");l.push(d)}s.resolve(Object.freeze(l))}),s.promise}#t(e){let r=this.#e,n=[...r],o=[],s=[];try{for(let c of e){if(c.type!=="delete"&&c.type!=="put")throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(c.type==="delete"&&c.response!=null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#n(c.request,c.options,o).length)throw new DOMException("???","InvalidStateError");let l;if(c.type==="delete"){if(l=this.#n(c.request,c.options),l.length===0)return[];for(let u of l){let d=r.indexOf(u);U9t(d!==-1),r.splice(d,1)}}else if(c.type==="put"){if(c.response==null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let u=c.request;if(!z$e(u.url))throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(u.method!=="GET")throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(c.options!=null)throw Wn.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});l=this.#n(c.request);for(let d of l){let p=r.indexOf(d);U9t(p!==-1),r.splice(p,1)}r.push([c.request,c.response]),o.push([c.request,c.response])}s.push([c.request,c.response])}return s}catch(c){throw this.#e.length=0,this.#e=n,c}}#n(e,r,n){let o=[],s=n??this.#e;for(let c of s){let[l,u]=c;this.#r(e,l,u,r)&&o.push(c)}return o}#r(e,r,n=null,o){let s=new URL(e.url),c=new URL(r.url);if(o?.ignoreSearch&&(c.search="",s.search=""),!Fko(s,c,!0))return!1;if(n==null||o?.ignoreVary||!n.headersList.contains("vary"))return!0;let l=F9t(n.headersList.get("vary"));for(let u of l){if(u==="*")return!1;let d=r.headersList.get(u),p=e.headersList.get(u);if(d!==p)return!1}return!0}#i(e,r,n=1/0){let o=null;if(e!==void 0)if(e instanceof W4){if(o=e[hw],o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=new W4(e)[hw]);let s=[];if(e===void 0)for(let l of this.#e)s.push(l[1]);else{let l=this.#n(o,r);for(let u of l)s.push(u[1])}let c=[];for(let l of s){let u=Gko(l,"immutable");if(c.push(u.clone()),c.length>=n)break}return Object.freeze(c)}};Object.defineProperties(Y$e.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:Z$,matchAll:Z$,add:Z$,addAll:Z$,put:Z$,delete:Z$,keys:Z$});var Fdn=[{key:"ignoreSearch",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreVary",converter:Wn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Wn.converters.CacheQueryOptions=Wn.dictionaryConverter(Fdn);Wn.converters.MultiCacheQueryOptions=Wn.dictionaryConverter([...Fdn,{key:"cacheName",converter:Wn.converters.DOMString}]);Wn.converters.Response=Wn.interfaceConverter(Qko);Wn.converters["sequence"]=Wn.sequenceConverter(Wn.converters.RequestInfo);Udn.exports={Cache:Y$e}});var Gdn=T((bBu,qdn)=>{"use strict";f();var{kConstruct:n1e}=W$e(),{Cache:K$e}=Qdn(),{webidl:Kg}=Im(),{kEnumerableProperty:i1e}=Xo(),J$e=class t{static{a(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==n1e&&Kg.illegalConstructor(),Kg.util.markAsUncloneable(this)}async match(e,r={}){if(Kg.brandCheck(this,t),Kg.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=Kg.converters.RequestInfo(e),r=Kg.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new K$e(n1e,n).match(e,r)}}else for(let n of this.#e.values()){let s=await new K$e(n1e,n).match(e,r);if(s!==void 0)return s}}async has(e){Kg.brandCheck(this,t);let r="CacheStorage.has";return Kg.argumentLengthCheck(arguments,1,r),e=Kg.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){Kg.brandCheck(this,t);let r="CacheStorage.open";if(Kg.argumentLengthCheck(arguments,1,r),e=Kg.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let o=this.#e.get(e);return new K$e(n1e,o)}let n=[];return this.#e.set(e,n),new K$e(n1e,n)}async delete(e){Kg.brandCheck(this,t);let r="CacheStorage.delete";return Kg.argumentLengthCheck(arguments,1,r),e=Kg.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return Kg.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(J$e.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:i1e,has:i1e,open:i1e,delete:i1e,keys:i1e});qdn.exports={CacheStorage:J$e}});var jdn=T((IBu,Hdn)=>{"use strict";f();Hdn.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var Q9t=T((wBu,Ydn)=>{"use strict";f();function Vko(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}a(Vko,"isCTLExcludingHtab");function $dn(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}a($dn,"validateCookieName");function Vdn(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}a(Vdn,"validateCookieValue");function Wdn(t){for(let e=0;ee.toString().padStart(2,"0"));function zdn(t){return typeof t=="number"&&(t=new Date(t)),`${zko[t.getUTCDay()]}, ${X$e[t.getUTCDate()]} ${Yko[t.getUTCMonth()]} ${t.getUTCFullYear()} ${X$e[t.getUTCHours()]}:${X$e[t.getUTCMinutes()]}:${X$e[t.getUTCSeconds()]} GMT`}a(zdn,"toIMFDate");function Kko(t){if(t<0)throw new Error("Invalid cookie max-age")}a(Kko,"validateCookieMaxAge");function Jko(t){if(t.name.length===0)return null;$dn(t.name),Vdn(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(Kko(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(Wko(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(Wdn(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${zdn(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...o]=r.split("=");e.push(`${n.trim()}=${o.join("=")}`)}return e.join("; ")}a(Jko,"stringify");Ydn.exports={isCTLExcludingHtab:Vko,validateCookieName:$dn,validateCookiePath:Wdn,validateCookieValue:Vdn,toIMFDate:zdn,stringify:Jko}});var Jdn=T((kBu,Kdn)=>{"use strict";f();var{maxNameValuePairSize:Xko,maxAttributeValueSize:Zko}=jdn(),{isCTLExcludingHtab:e5o}=Q9t(),{collectASequenceOfCodePointsFast:Z$e}=p_(),t5o=require("node:assert");function r5o(t){if(e5o(t))return null;let e="",r="",n="",o="";if(t.includes(";")){let s={position:0};e=Z$e(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))o=e;else{let s={position:0};n=Z$e("=",e,s),o=e.slice(s.position+1)}return n=n.trim(),o=o.trim(),n.length+o.length>Xko?null:{name:n,value:o,...Soe(r)}}a(r5o,"parseSetCookie");function Soe(t,e={}){if(t.length===0)return e;t5o(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=Z$e(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",o="";if(r.includes("=")){let c={position:0};n=Z$e("=",r,c),o=r.slice(c.position+1)}else n=r;if(n=n.trim(),o=o.trim(),o.length>Zko)return Soe(t,e);let s=n.toLowerCase();if(s==="expires"){let c=new Date(o);e.expires=c}else if(s==="max-age"){let c=o.charCodeAt(0);if((c<48||c>57)&&o[0]!=="-"||!/^\d+$/.test(o))return Soe(t,e);let l=Number(o);e.maxAge=l}else if(s==="domain"){let c=o;c[0]==="."&&(c=c.slice(1)),c=c.toLowerCase(),e.domain=c}else if(s==="path"){let c="";o.length===0||o[0]!=="/"?c="/":c=o,e.path=c}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let c="Default",l=o.toLowerCase();l.includes("none")&&(c="None"),l.includes("strict")&&(c="Strict"),l.includes("lax")&&(c="Lax"),e.sameSite=c}else e.unparsed??=[],e.unparsed.push(`${n}=${o}`);return Soe(t,e)}a(Soe,"parseUnparsedAttributes");Kdn.exports={parseSetCookie:r5o,parseUnparsedAttributes:Soe}});var efn=T((MBu,Zdn)=>{"use strict";f();var{parseSetCookie:n5o}=Jdn(),{stringify:i5o}=Q9t(),{webidl:vs}=Im(),{Headers:eVe}=z$();function o5o(t){vs.argumentLengthCheck(arguments,1,"getCookies"),vs.brandCheck(t,eVe,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[o,...s]=n.split("=");r[o.trim()]=s.join("=")}return r}a(o5o,"getCookies");function s5o(t,e,r){vs.brandCheck(t,eVe,{strict:!1});let n="deleteCookie";vs.argumentLengthCheck(arguments,2,n),e=vs.converters.DOMString(e,n,"name"),r=vs.converters.DeleteCookieAttributes(r),Xdn(t,{name:e,value:"",expires:new Date(0),...r})}a(s5o,"deleteCookie");function a5o(t){vs.argumentLengthCheck(arguments,1,"getSetCookies"),vs.brandCheck(t,eVe,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>n5o(r)):[]}a(a5o,"getSetCookies");function Xdn(t,e){vs.argumentLengthCheck(arguments,2,"setCookie"),vs.brandCheck(t,eVe,{strict:!1}),e=vs.converters.Cookie(e);let r=i5o(e);r&&t.append("Set-Cookie",r)}a(Xdn,"setCookie");vs.converters.DeleteCookieAttributes=vs.dictionaryConverter([{converter:vs.nullableConverter(vs.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")}]);vs.converters.Cookie=vs.dictionaryConverter([{converter:vs.converters.DOMString,key:"name"},{converter:vs.converters.DOMString,key:"value"},{converter:vs.nullableConverter(t=>typeof t=="number"?vs.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters["long long"]),key:"maxAge",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters.boolean),key:"secure",defaultValue:a(()=>null,"defaultValue")},{converter:vs.nullableConverter(vs.converters.boolean),key:"httpOnly",defaultValue:a(()=>null,"defaultValue")},{converter:vs.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:vs.sequenceConverter(vs.converters.DOMString),key:"unparsed",defaultValue:a(()=>new Array(0),"defaultValue")}]);Zdn.exports={getCookies:o5o,deleteCookie:s5o,getSetCookies:a5o,setCookie:Xdn}});var xoe=T((LBu,rfn)=>{"use strict";f();var{webidl:Hn}=Im(),{kEnumerableProperty:A_}=Xo(),{kConstruct:tfn}=bu(),{MessagePort:c5o}=require("node:worker_threads"),Ioe=class t extends Event{static{a(this,"MessageEvent")}#e;constructor(e,r={}){if(e===tfn){super(arguments[1],arguments[2]),Hn.util.markAsUncloneable(this);return}let n="MessageEvent constructor";Hn.argumentLengthCheck(arguments,1,n),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,Hn.util.markAsUncloneable(this)}get data(){return Hn.brandCheck(this,t),this.#e.data}get origin(){return Hn.brandCheck(this,t),this.#e.origin}get lastEventId(){return Hn.brandCheck(this,t),this.#e.lastEventId}get source(){return Hn.brandCheck(this,t),this.#e.source}get ports(){return Hn.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,o=null,s="",c="",l=null,u=[]){return Hn.brandCheck(this,t),Hn.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:o,origin:s,lastEventId:c,source:l,ports:u})}static createFastMessageEvent(e,r){let n=new t(tfn,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:l5o}=Ioe;delete Ioe.createFastMessageEvent;var tVe=class t extends Event{static{a(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";Hn.argumentLengthCheck(arguments,1,n),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.CloseEventInit(r),super(e,r),this.#e=r,Hn.util.markAsUncloneable(this)}get wasClean(){return Hn.brandCheck(this,t),this.#e.wasClean}get code(){return Hn.brandCheck(this,t),this.#e.code}get reason(){return Hn.brandCheck(this,t),this.#e.reason}},rVe=class t extends Event{static{a(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";Hn.argumentLengthCheck(arguments,1,n),super(e,r),Hn.util.markAsUncloneable(this),e=Hn.converters.DOMString(e,n,"type"),r=Hn.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Hn.brandCheck(this,t),this.#e.message}get filename(){return Hn.brandCheck(this,t),this.#e.filename}get lineno(){return Hn.brandCheck(this,t),this.#e.lineno}get colno(){return Hn.brandCheck(this,t),this.#e.colno}get error(){return Hn.brandCheck(this,t),this.#e.error}};Object.defineProperties(Ioe.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:A_,origin:A_,lastEventId:A_,source:A_,ports:A_,initMessageEvent:A_});Object.defineProperties(tVe.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:A_,code:A_,wasClean:A_});Object.defineProperties(rVe.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:A_,filename:A_,lineno:A_,colno:A_,error:A_});Hn.converters.MessagePort=Hn.interfaceConverter(c5o);Hn.converters["sequence"]=Hn.sequenceConverter(Hn.converters.MessagePort);var q9t=[{key:"bubbles",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Hn.converters.MessageEventInit=Hn.dictionaryConverter([...q9t,{key:"data",converter:Hn.converters.any,defaultValue:a(()=>null,"defaultValue")},{key:"origin",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lastEventId",converter:Hn.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"source",converter:Hn.nullableConverter(Hn.converters.MessagePort),defaultValue:a(()=>null,"defaultValue")},{key:"ports",converter:Hn.converters["sequence"],defaultValue:a(()=>new Array(0),"defaultValue")}]);Hn.converters.CloseEventInit=Hn.dictionaryConverter([...q9t,{key:"wasClean",converter:Hn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"code",converter:Hn.converters["unsigned short"],defaultValue:a(()=>0,"defaultValue")},{key:"reason",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Hn.converters.ErrorEventInit=Hn.dictionaryConverter([...q9t,{key:"message",converter:Hn.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"filename",converter:Hn.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lineno",converter:Hn.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"colno",converter:Hn.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"error",converter:Hn.converters.any}]);rfn.exports={MessageEvent:Ioe,CloseEvent:tVe,ErrorEvent:rVe,createFastMessageEvent:l5o}});var eV=T((QBu,nfn)=>{"use strict";f();var u5o="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",d5o={enumerable:!0,writable:!1,configurable:!1},f5o={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},p5o={NOT_SENT:0,PROCESSING:1,SENT:2},h5o={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},m5o=2**16-1,g5o={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},A5o=Buffer.allocUnsafe(0),y5o={string:1,typedArray:2,arrayBuffer:3,blob:4};nfn.exports={uid:u5o,sentCloseFrameState:p5o,staticPropertyDescriptors:d5o,states:f5o,opcodes:h5o,maxUnsigned16Bit:m5o,parserStates:g5o,emptyBuffer:A5o,sendHints:y5o}});var o1e=T((GBu,ifn)=>{"use strict";f();ifn.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var c1e=T((jBu,pfn)=>{"use strict";f();var{kReadyState:s1e,kController:E5o,kResponse:_5o,kBinaryType:C5o,kWebSocketURL:v5o}=o1e(),{states:a1e,opcodes:YF}=eV(),{ErrorEvent:b5o,createFastMessageEvent:T5o}=xoe(),{isUtf8:S5o}=require("node:buffer"),{collectASequenceOfCodePointsFast:I5o,removeHTTPWhitespace:ofn}=p_();function x5o(t){return t[s1e]===a1e.CONNECTING}a(x5o,"isConnecting");function w5o(t){return t[s1e]===a1e.OPEN}a(w5o,"isEstablished");function R5o(t){return t[s1e]===a1e.CLOSING}a(R5o,"isClosing");function P5o(t){return t[s1e]===a1e.CLOSED}a(P5o,"isClosed");function G9t(t,e,r=(o,s)=>new Event(o,s),n={}){let o=r(t,n);e.dispatchEvent(o)}a(G9t,"fireEvent");function k5o(t,e,r){if(t[s1e]!==a1e.OPEN)return;let n;if(e===YF.TEXT)try{n=ffn(r)}catch{afn(t,"Received invalid UTF-8 in text frame.");return}else e===YF.BINARY&&(t[C5o]==="blob"?n=new Blob([r]):n=D5o(r));G9t("message",t,T5o,{origin:t[v5o].origin,data:n})}a(k5o,"websocketMessageReceived");function D5o(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}a(D5o,"toArrayBuffer");function N5o(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}a(N5o,"isValidSubprotocol");function M5o(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}a(M5o,"isValidStatusCode");function afn(t,e){let{[E5o]:r,[_5o]:n}=t;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),e&&G9t("error",t,(o,s)=>new b5o(o,s),{error:new Error(e),message:e})}a(afn,"failWebsocketConnection");function cfn(t){return t===YF.CLOSE||t===YF.PING||t===YF.PONG}a(cfn,"isControlFrame");function lfn(t){return t===YF.CONTINUATION}a(lfn,"isContinuationFrame");function ufn(t){return t===YF.TEXT||t===YF.BINARY}a(ufn,"isTextBinaryFrame");function O5o(t){return ufn(t)||lfn(t)||cfn(t)}a(O5o,"isValidOpcode");function B5o(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}a(L5o,"isValidClientWindowBits");var dfn=typeof process.versions.icu=="string",sfn=dfn?new TextDecoder("utf-8",{fatal:!0}):void 0,ffn=dfn?sfn.decode.bind(sfn):function(t){if(S5o(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")};pfn.exports={isConnecting:x5o,isEstablished:w5o,isClosing:R5o,isClosed:P5o,fireEvent:G9t,isValidSubprotocol:N5o,isValidStatusCode:M5o,failWebsocketConnection:afn,websocketMessageReceived:k5o,utf8Decode:ffn,isControlFrame:cfn,isContinuationFrame:lfn,isTextBinaryFrame:ufn,isValidOpcode:O5o,parseExtensions:B5o,isValidClientWindowBits:L5o}});var iVe=T((WBu,hfn)=>{"use strict";f();var{maxUnsigned16Bit:F5o}=eV(),nVe=16386,H9t,l1e=null,woe=nVe;try{H9t=require("node:crypto")}catch{H9t={randomFillSync:a(function(e,r,n){for(let o=0;oF5o?(c+=8,s=127):o>125&&(c+=2,s=126);let l=Buffer.allocUnsafe(o+c);l[0]=l[1]=0,l[0]|=128,l[0]=(l[0]&240)+e;l[c-4]=n[0],l[c-3]=n[1],l[c-2]=n[2],l[c-1]=n[3],l[1]=s,s===126?l.writeUInt16BE(o,2):s===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),l[1]|=128;for(let u=0;u{"use strict";f();var{uid:Q5o,states:u1e,sentCloseFrameState:oVe,emptyBuffer:q5o,opcodes:G5o}=eV(),{kReadyState:d1e,kSentClose:sVe,kByteParser:gfn,kReceivedClose:mfn,kResponse:Afn}=o1e(),{fireEvent:H5o,failWebsocketConnection:KF,isClosing:j5o,isClosed:$5o,isEstablished:V5o,parseExtensions:W5o}=c1e(),{channels:Roe}=Qie(),{CloseEvent:z5o}=xoe(),{makeRequest:Y5o}=Coe(),{fetching:K5o}=t1e(),{Headers:J5o,getHeadersList:X5o}=z$(),{getDecodeSplit:Z5o}=rv(),{WebsocketFrameSend:eDo}=iVe(),$9t;try{$9t=require("node:crypto")}catch{}function tDo(t,e,r,n,o,s){let c=t;c.protocol=t.protocol==="ws:"?"http:":"https:";let l=Y5o({urlList:[c],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(s.headers){let h=X5o(new J5o(s.headers));l.headersList=h}let u=$9t.randomBytes(16).toString("base64");l.headersList.append("sec-websocket-key",u),l.headersList.append("sec-websocket-version","13");for(let h of e)l.headersList.append("sec-websocket-protocol",h);return l.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits"),K5o({request:l,useParallelQueue:!0,dispatcher:s.dispatcher,processResponse(h){if(h.type==="error"||h.status!==101){KF(n,"Received network error or non-101 status code.");return}if(e.length!==0&&!h.headersList.get("Sec-WebSocket-Protocol")){KF(n,"Server did not respond with sent protocols.");return}if(h.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){KF(n,'Server did not set Upgrade header to "websocket".');return}if(h.headersList.get("Connection")?.toLowerCase()!=="upgrade"){KF(n,'Server did not set Connection header to "upgrade".');return}let m=h.headersList.get("Sec-WebSocket-Accept"),g=$9t.createHash("sha1").update(u+Q5o).digest("base64");if(m!==g){KF(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let A=h.headersList.get("Sec-WebSocket-Extensions"),y;if(A!==null&&(y=W5o(A),!y.has("permessage-deflate"))){KF(n,"Sec-WebSocket-Extensions header does not match.");return}let E=h.headersList.get("Sec-WebSocket-Protocol");if(E!==null&&!Z5o("sec-websocket-protocol",l.headersList).includes(E)){KF(n,"Protocol was not set in the opening handshake.");return}h.socket.on("data",yfn),h.socket.on("close",Efn),h.socket.on("error",_fn),Roe.open.hasSubscribers&&Roe.open.publish({address:h.socket.address(),protocol:E,extensions:A}),o(h,y)}})}a(tDo,"establishWebSocketConnection");function rDo(t,e,r,n){if(!(j5o(t)||$5o(t)))if(!V5o(t))KF(t,"Connection was closed before it was established."),t[d1e]=u1e.CLOSING;else if(t[sVe]===oVe.NOT_SENT){t[sVe]=oVe.PROCESSING;let o=new eDo;e!==void 0&&r===void 0?(o.frameData=Buffer.allocUnsafe(2),o.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(o.frameData=Buffer.allocUnsafe(2+n),o.frameData.writeUInt16BE(e,0),o.frameData.write(r,2,"utf-8")):o.frameData=q5o,t[Afn].socket.write(o.createFrame(G5o.CLOSE)),t[sVe]=oVe.SENT,t[d1e]=u1e.CLOSING}else t[d1e]=u1e.CLOSING}a(rDo,"closeWebSocketConnection");function yfn(t){this.ws[gfn].write(t)||this.pause()}a(yfn,"onSocketData");function Efn(){let{ws:t}=this,{[Afn]:e}=t;e.socket.off("data",yfn),e.socket.off("close",Efn),e.socket.off("error",_fn);let r=t[sVe]===oVe.SENT&&t[mfn],n=1005,o="",s=t[gfn].closingInfo;s&&!s.error?(n=s.code??1005,o=s.reason):t[mfn]||(n=1006),t[d1e]=u1e.CLOSED,H5o("close",t,(c,l)=>new z5o(c,l),{wasClean:r,code:n,reason:o}),Roe.close.hasSubscribers&&Roe.close.publish({websocket:t,code:n,reason:o})}a(Efn,"onSocketClose");function _fn(t){let{ws:e}=this;e[d1e]=u1e.CLOSING,Roe.socketError.hasSubscribers&&Roe.socketError.publish(t),this.destroy()}a(_fn,"onSocketError");Cfn.exports={establishWebSocketConnection:tDo,closeWebSocketConnection:rDo}});var Tfn=T((ZBu,bfn)=>{"use strict";f();var{createInflateRaw:nDo,Z_DEFAULT_WINDOWBITS:iDo}=require("node:zlib"),{isValidClientWindowBits:oDo}=c1e(),{MessageSizeExceededError:vfn}=Ca(),sDo=Buffer.from([0,0,255,255]),aVe=Symbol("kBuffer"),f1e=Symbol("kLength"),aDo=4*1024*1024,W9t=class{static{a(this,"PerMessageDeflate")}#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,r,n){if(this.#n){n(new vfn);return}if(!this.#e){let o=iDo;if(this.#t.serverMaxWindowBits){if(!oDo(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}o=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=nDo({windowBits:o})}catch(s){n(s);return}this.#e[aVe]=[],this.#e[f1e]=0,this.#e.on("data",s=>{if(!this.#n){if(this.#e[f1e]+=s.length,this.#e[f1e]>aDo){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let c=this.#r;this.#r=null,c(new vfn)}return}this.#e[aVe].push(s)}}),this.#e.on("error",s=>{this.#e=null,n(s)})}this.#r=n,this.#e.write(e),r&&this.#e.write(sDo),this.#e.flush(()=>{if(this.#n||!this.#e)return;let o=Buffer.concat(this.#e[aVe],this.#e[f1e]);this.#e[aVe].length=0,this.#e[f1e]=0,this.#r=null,n(null,o)})}};bfn.exports={PerMessageDeflate:W9t}});var Mfn=T((r3u,Nfn)=>{"use strict";f();var{Writable:cDo}=require("node:stream"),lDo=require("node:assert"),{parserStates:y_,opcodes:Poe,states:uDo,emptyBuffer:Sfn,sentCloseFrameState:Ifn}=eV(),{kReadyState:dDo,kSentClose:xfn,kResponse:wfn,kReceivedClose:Rfn}=o1e(),{channels:cVe}=Qie(),{isValidStatusCode:fDo,isValidOpcode:pDo,failWebsocketConnection:lv,websocketMessageReceived:Pfn,utf8Decode:hDo,isControlFrame:kfn,isTextBinaryFrame:z9t,isContinuationFrame:mDo}=c1e(),{WebsocketFrameSend:Dfn}=iVe(),{closeWebSocketConnection:gDo}=V9t(),{PerMessageDeflate:ADo}=Tfn(),Y9t=class extends cDo{static{a(this,"ByteParser")}#e=[];#t=0;#n=!1;#r=y_.INFO;#i={};#o=[];#a;constructor(e,r){super(),this.ws=e,this.#a=r??new Map,this.#a.has("permessage-deflate")&&this.#a.set("permessage-deflate",new ADo(r))}_write(e,r,n){this.#e.push(e),this.#t+=e.length,this.#n=!0,this.run(n)}run(e){for(;this.#n;)if(this.#r===y_.INFO){if(this.#t<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,o=r[0]&15,s=(r[1]&128)===128,c=!n&&o!==Poe.CONTINUATION,l=r[1]&127,u=r[0]&64,d=r[0]&32,p=r[0]&16;if(!pDo(o))return lv(this.ws,"Invalid opcode received"),e();if(s)return lv(this.ws,"Frame cannot be masked"),e();if(u!==0&&!this.#a.has("permessage-deflate")){lv(this.ws,"Expected RSV1 to be clear.");return}if(d!==0||p!==0){lv(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(c&&!z9t(o)){lv(this.ws,"Invalid frame type was fragmented.");return}if(z9t(o)&&this.#o.length>0){lv(this.ws,"Expected continuation frame");return}if(this.#i.fragmented&&c){lv(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((l>125||c)&&kfn(o)){lv(this.ws,"Control frame either too large or fragmented");return}if(mDo(o)&&this.#o.length===0&&!this.#i.compressed){lv(this.ws,"Unexpected continuation frame");return}l<=125?(this.#i.payloadLength=l,this.#r=y_.READ_DATA):l===126?this.#r=y_.PAYLOADLENGTH_16:l===127&&(this.#r=y_.PAYLOADLENGTH_64),z9t(o)&&(this.#i.binaryType=o,this.#i.compressed=u!==0),this.#i.opcode=o,this.#i.masked=s,this.#i.fin=n,this.#i.fragmented=c}else if(this.#r===y_.PAYLOADLENGTH_16){if(this.#t<2)return e();let r=this.consume(2);this.#i.payloadLength=r.readUInt16BE(0),this.#r=y_.READ_DATA}else if(this.#r===y_.PAYLOADLENGTH_64){if(this.#t<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),o=r.readUInt32BE(4);if(n!==0||o>2**31-1){lv(this.ws,"Received payload length > 2^31 bytes.");return}this.#i.payloadLength=o,this.#r=y_.READ_DATA}else if(this.#r===y_.READ_DATA){if(this.#t{if(n){lv(this.ws,n.message);return}if(this.#o.push(o),!this.#i.fin){this.#r=y_.INFO,this.#n=!0,this.run(e);return}Pfn(this.ws,this.#i.binaryType,Buffer.concat(this.#o)),this.#n=!0,this.#r=y_.INFO,this.#o.length=0,this.run(e)}),this.#n=!1;break}else{if(this.#o.push(r),!this.#i.fragmented&&this.#i.fin){let n=Buffer.concat(this.#o);Pfn(this.ws,this.#i.binaryType,n),this.#o.length=0}this.#r=y_.INFO}}}consume(e){if(e>this.#t)throw new Error("Called consume() before buffers satiated.");if(e===0)return Sfn;if(this.#e[0].length===e)return this.#t-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let o=this.#e[0],{length:s}=o;if(s+n===e){r.set(this.#e.shift(),n);break}else if(s+n>e){r.set(o.subarray(0,e-n),n),this.#e[0]=o.subarray(e-n);break}else r.set(this.#e.shift(),n),n+=o.length}return this.#t-=e,r}parseCloseBody(e){lDo(e.length!==1);let r;if(e.length>=2&&(r=e.readUInt16BE(0)),r!==void 0&&!fDo(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=hDo(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#i;if(r===Poe.CLOSE){if(n===1)return lv(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#i.closeInfo=this.parseCloseBody(e),this.#i.closeInfo.error){let{code:o,reason:s}=this.#i.closeInfo;return gDo(this.ws,o,s,s.length),lv(this.ws,s),!1}if(this.ws[xfn]!==Ifn.SENT){let o=Sfn;this.#i.closeInfo.code&&(o=Buffer.allocUnsafe(2),o.writeUInt16BE(this.#i.closeInfo.code,0));let s=new Dfn(o);this.ws[wfn].socket.write(s.createFrame(Poe.CLOSE),c=>{c||(this.ws[xfn]=Ifn.SENT)})}return this.ws[dDo]=uDo.CLOSING,this.ws[Rfn]=!0,!1}else if(r===Poe.PING){if(!this.ws[Rfn]){let o=new Dfn(e);this.ws[wfn].socket.write(o.createFrame(Poe.PONG)),cVe.ping.hasSubscribers&&cVe.ping.publish({payload:e})}}else r===Poe.PONG&&cVe.pong.hasSubscribers&&cVe.pong.publish({payload:e});return!0}get closingInfo(){return this.#i.closeInfo}};Nfn.exports={ByteParser:Y9t}});var Ufn=T((o3u,Ffn)=>{"use strict";f();var{WebsocketFrameSend:yDo}=iVe(),{opcodes:Ofn,sendHints:koe}=eV(),EDo=oFt(),Bfn=Buffer[Symbol.species],K9t=class{static{a(this,"SendQueue")}#e=new EDo;#t=!1;#n;constructor(e){this.#n=e}add(e,r,n){if(n!==koe.blob){let s=Lfn(e,n);if(!this.#t)this.#n.write(s,r);else{let c={promise:null,callback:r,frame:s};this.#e.push(c)}return}let o={promise:e.arrayBuffer().then(s=>{o.promise=null,o.frame=Lfn(s,n)}),callback:r,frame:null};this.#e.push(o),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#n.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function Lfn(t,e){return new yDo(_Do(t,e)).createFrame(e===koe.string?Ofn.TEXT:Ofn.BINARY)}a(Lfn,"createFrame");function _Do(t,e){switch(e){case koe.string:return Buffer.from(t);case koe.arrayBuffer:case koe.blob:return new Bfn(t);case koe.typedArray:return new Bfn(t.buffer,t.byteOffset,t.byteLength)}}a(_Do,"toBuffer");Ffn.exports={SendQueue:K9t}});var zfn=T((c3u,Wfn)=>{"use strict";f();var{webidl:Di}=Im(),{URLSerializer:CDo}=p_(),{environmentSettingsObject:Qfn}=rv(),{staticPropertyDescriptors:JF,states:p1e,sentCloseFrameState:vDo,sendHints:lVe}=eV(),{kWebSocketURL:qfn,kReadyState:J9t,kController:bDo,kBinaryType:uVe,kResponse:Gfn,kSentClose:TDo,kByteParser:SDo}=o1e(),{isConnecting:IDo,isEstablished:xDo,isClosing:wDo,isValidSubprotocol:RDo,fireEvent:Hfn}=c1e(),{establishWebSocketConnection:PDo,closeWebSocketConnection:jfn}=V9t(),{ByteParser:kDo}=Mfn(),{kEnumerableProperty:JT,isBlobLike:$fn}=Xo(),{getGlobalDispatcher:DDo}=S$e(),{types:Vfn}=require("node:util"),{ErrorEvent:NDo,CloseEvent:MDo}=xoe(),{SendQueue:ODo}=Ufn(),uv=class t extends EventTarget{static{a(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#n="";#r="";#i;constructor(e,r=[]){super(),Di.util.markAsUncloneable(this);let n="WebSocket constructor";Di.argumentLengthCheck(arguments,1,n);let o=Di.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=Di.converters.USVString(e,n,"url"),r=o.protocols;let s=Qfn.settingsObject.baseUrl,c;try{c=new URL(e,s)}catch(u){throw new DOMException(u,"SyntaxError")}if(c.protocol==="http:"?c.protocol="ws:":c.protocol==="https:"&&(c.protocol="wss:"),c.protocol!=="ws:"&&c.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${c.protocol}`,"SyntaxError");if(c.hash||c.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(u=>u.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(u=>RDo(u)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[qfn]=new URL(c.href);let l=Qfn.settingsObject;this[bDo]=PDo(c,r,l,this,(u,d)=>this.#o(u,d),o),this[J9t]=t.CONNECTING,this[TDo]=vDo.NOT_SENT,this[uVe]="blob"}close(e=void 0,r=void 0){Di.brandCheck(this,t);let n="WebSocket.close";if(e!==void 0&&(e=Di.converters["unsigned short"](e,n,"code",{clamp:!0})),r!==void 0&&(r=Di.converters.USVString(r,n,"reason")),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new DOMException("invalid code","InvalidAccessError");let o=0;if(r!==void 0&&(o=Buffer.byteLength(r),o>123))throw new DOMException(`Reason must be less than 123 bytes; received ${o}`,"SyntaxError");jfn(this,e,r,o)}send(e){Di.brandCheck(this,t);let r="WebSocket.send";if(Di.argumentLengthCheck(arguments,1,r),e=Di.converters.WebSocketSendData(e,r,"data"),IDo(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!xDo(this)||wDo(this)))if(typeof e=="string"){let n=Buffer.byteLength(e);this.#t+=n,this.#i.add(e,()=>{this.#t-=n},lVe.string)}else Vfn.isArrayBuffer(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},lVe.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},lVe.typedArray)):$fn(e)&&(this.#t+=e.size,this.#i.add(e,()=>{this.#t-=e.size},lVe.blob))}get readyState(){return Di.brandCheck(this,t),this[J9t]}get bufferedAmount(){return Di.brandCheck(this,t),this.#t}get url(){return Di.brandCheck(this,t),CDo(this[qfn])}get extensions(){return Di.brandCheck(this,t),this.#r}get protocol(){return Di.brandCheck(this,t),this.#n}get onopen(){return Di.brandCheck(this,t),this.#e.open}set onopen(e){Di.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return Di.brandCheck(this,t),this.#e.error}set onerror(e){Di.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return Di.brandCheck(this,t),this.#e.close}set onclose(e){Di.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return Di.brandCheck(this,t),this.#e.message}set onmessage(e){Di.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return Di.brandCheck(this,t),this[uVe]}set binaryType(e){Di.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[uVe]="blob":this[uVe]=e}#o(e,r){this[Gfn]=e;let n=new kDo(this,r);n.on("drain",BDo),n.on("error",LDo.bind(this)),e.socket.ws=this,this[SDo]=n,this.#i=new ODo(e.socket),this[J9t]=p1e.OPEN;let o=e.headersList.get("sec-websocket-extensions");o!==null&&(this.#r=o);let s=e.headersList.get("sec-websocket-protocol");s!==null&&(this.#n=s),Hfn("open",this)}};uv.CONNECTING=uv.prototype.CONNECTING=p1e.CONNECTING;uv.OPEN=uv.prototype.OPEN=p1e.OPEN;uv.CLOSING=uv.prototype.CLOSING=p1e.CLOSING;uv.CLOSED=uv.prototype.CLOSED=p1e.CLOSED;Object.defineProperties(uv.prototype,{CONNECTING:JF,OPEN:JF,CLOSING:JF,CLOSED:JF,url:JT,readyState:JT,bufferedAmount:JT,onopen:JT,onerror:JT,onclose:JT,close:JT,onmessage:JT,binaryType:JT,send:JT,extensions:JT,protocol:JT,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(uv,{CONNECTING:JF,OPEN:JF,CLOSING:JF,CLOSED:JF});Di.converters["sequence"]=Di.sequenceConverter(Di.converters.DOMString);Di.converters["DOMString or sequence"]=function(t,e,r){return Di.util.Type(t)==="Object"&&Symbol.iterator in t?Di.converters["sequence"](t):Di.converters.DOMString(t,e,r)};Di.converters.WebSocketInit=Di.dictionaryConverter([{key:"protocols",converter:Di.converters["DOMString or sequence"],defaultValue:a(()=>new Array(0),"defaultValue")},{key:"dispatcher",converter:Di.converters.any,defaultValue:a(()=>DDo(),"defaultValue")},{key:"headers",converter:Di.nullableConverter(Di.converters.HeadersInit)}]);Di.converters["DOMString or sequence or WebSocketInit"]=function(t){return Di.util.Type(t)==="Object"&&!(Symbol.iterator in t)?Di.converters.WebSocketInit(t):{protocols:Di.converters["DOMString or sequence"](t)}};Di.converters.WebSocketSendData=function(t){if(Di.util.Type(t)==="Object"){if($fn(t))return Di.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||Vfn.isArrayBuffer(t))return Di.converters.BufferSource(t)}return Di.converters.USVString(t)};function BDo(){this.ws[Gfn].socket.resume()}a(BDo,"onParserDrain");function LDo(t){let e,r;t instanceof MDo?(e=t.reason,r=t.code):e=t.message,Hfn("error",this,()=>new NDo("error",{error:t,message:e})),jfn(this,r)}a(LDo,"onParserError");Wfn.exports={WebSocket:uv}});var X9t=T((d3u,Yfn)=>{"use strict";f();function FDo(t){return t.indexOf("\0")===-1}a(FDo,"isValidLastEventId");function UDo(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}a(UDo,"isASCIINumber");function QDo(t){return new Promise(e=>{setTimeout(e,t).unref()})}a(QDo,"delay");Yfn.exports={isValidLastEventId:FDo,isASCIINumber:UDo,delay:QDo}});var Zfn=T((h3u,Xfn)=>{"use strict";f();var{Transform:qDo}=require("node:stream"),{isASCIINumber:Kfn,isValidLastEventId:Jfn}=X9t(),z4=[239,187,191],Z9t=10,dVe=13,GDo=58,HDo=32,e7t=class extends qDo{static{a(this,"EventSourceStream")}state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===z4[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===z4[0]&&this.buffer[1]===z4[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===z4[0]&&this.buffer[1]===z4[1]&&this.buffer[2]===z4[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===z4[0]&&this.buffer[1]===z4[1]&&this.buffer[2]===z4[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[o]=s);break}}processEvent(e){e.retry&&Kfn(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Jfn(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Xfn.exports={EventSourceStream:e7t}});var a0n=T((A3u,s0n)=>{"use strict";f();var{pipeline:jDo}=require("node:stream"),{fetching:$Do}=t1e(),{makeRequest:VDo}=Coe(),{webidl:Y4}=Im(),{EventSourceStream:WDo}=Zfn(),{parseMIMEType:zDo}=p_(),{createFastMessageEvent:YDo}=xoe(),{isNetworkError:e0n}=ZCe(),{delay:KDo}=X9t(),{kEnumerableProperty:tV}=Xo(),{environmentSettingsObject:t0n}=rv(),r0n=!1,n0n=3e3,h1e=0,i0n=1,m1e=2,JDo="anonymous",XDo="use-credentials",Doe=class t extends EventTarget{static{a(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=h1e;#i=null;#o=null;#a;#s;constructor(e,r={}){super(),Y4.util.markAsUncloneable(this);let n="EventSource constructor";Y4.argumentLengthCheck(arguments,1,n),r0n||(r0n=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Y4.converters.USVString(e,n,"url"),r=Y4.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#s={lastEventId:"",reconnectionTime:n0n};let o=t0n,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#s.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let c=JDo;r.withCredentials&&(c=XDo,this.#n=!0);let l={redirect:"follow",keepalive:!0,mode:"cors",credentials:c==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};l.client=t0n.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#t)],this.#i=VDo(l),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===m1e)return;this.#r=h1e;let e={request:this.#i,dispatcher:this.#a},r=a(n=>{e0n(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(e0n(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let o=n.headersList.get("content-type",!0),s=o!==null?zDo(o):"failure",c=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||c===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=i0n,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let l=new WDo({eventSourceSettings:this.#s,push:a(u=>{this.dispatchEvent(YDo(u.type,u.options))},"push")});jDo(n.body.stream,l,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=$Do(e)}async#l(){this.#r!==m1e&&(this.#r=h1e,this.dispatchEvent(new Event("error")),await KDo(this.#s.reconnectionTime),this.#r===h1e&&(this.#s.lastEventId.length&&this.#i.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#c()))}close(){Y4.brandCheck(this,t),this.#r!==m1e&&(this.#r=m1e,this.#o.abort(),this.#i=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},o0n={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:h1e,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:i0n,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:m1e,writable:!1}};Object.defineProperties(Doe,o0n);Object.defineProperties(Doe.prototype,o0n);Object.defineProperties(Doe.prototype,{close:tV,onerror:tV,onmessage:tV,onopen:tV,readyState:tV,url:tV,withCredentials:tV});Y4.converters.EventSourceInitDict=Y4.dictionaryConverter([{key:"withCredentials",converter:Y4.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"dispatcher",converter:Y4.converters.any}]);s0n.exports={EventSource:Doe,defaultReconnectionTime:n0n}});var d0n=T((_3u,_i)=>{"use strict";f();var ZDo=soe(),c0n=ECe(),eNo=aoe(),tNo=ncn(),rNo=coe(),nNo=SFt(),iNo=xcn(),oNo=Ncn(),l0n=Ca(),pVe=Xo(),{InvalidArgumentError:fVe}=l0n,Noe=Eln(),sNo=CCe(),aNo=s9t(),cNo=tun(),lNo=l9t(),uNo=WFt(),dNo=m$e(),{getGlobalDispatcher:u0n,setGlobalDispatcher:fNo}=S$e(),pNo=I$e(),hNo=i$e(),mNo=o$e();Object.assign(c0n.prototype,Noe);_i.exports.Dispatcher=c0n;_i.exports.Client=ZDo;_i.exports.Pool=eNo;_i.exports.BalancedPool=tNo;_i.exports.Agent=rNo;_i.exports.ProxyAgent=nNo;_i.exports.EnvHttpProxyAgent=iNo;_i.exports.RetryAgent=oNo;_i.exports.RetryHandler=dNo;_i.exports.DecoratorHandler=pNo;_i.exports.RedirectHandler=hNo;_i.exports.createRedirectInterceptor=mNo;_i.exports.interceptors={redirect:lun(),retry:dun(),dump:pun(),dns:gun()};_i.exports.buildConnector=sNo;_i.exports.errors=l0n;_i.exports.util={parseHeaders:pVe.parseHeaders,headerNameToString:pVe.headerNameToString};function g1e(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new fVe("invalid url");if(r!=null&&typeof r!="object")throw new fVe("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new fVe("invalid opts.path");let c=r.path;r.path.startsWith("/")||(c=`/${c}`),e=new URL(pVe.parseOrigin(e).origin+c)}else r||(r=typeof e=="object"?e:{}),e=pVe.parseURL(e);let{agent:o,dispatcher:s=u0n()}=r;if(o)throw new fVe("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}a(g1e,"makeDispatcher");_i.exports.setGlobalDispatcher=fNo;_i.exports.getGlobalDispatcher=u0n;var gNo=t1e().fetch;_i.exports.fetch=a(async function(e,r=void 0){try{return await gNo(e,r)}catch(n){throw n&&typeof n=="object"&&Error.captureStackTrace(n),n}},"fetch");_i.exports.Headers=z$().Headers;_i.exports.Response=ZCe().Response;_i.exports.Request=Coe().Request;_i.exports.FormData=wCe().FormData;_i.exports.File=globalThis.File??require("node:buffer").File;_i.exports.FileReader=Ndn().FileReader;var{setGlobalOrigin:ANo,getGlobalOrigin:yNo}=I6t();_i.exports.setGlobalOrigin=ANo;_i.exports.getGlobalOrigin=yNo;var{CacheStorage:ENo}=Gdn(),{kConstruct:_No}=W$e();_i.exports.caches=new ENo(_No);var{deleteCookie:CNo,getCookies:vNo,getSetCookies:bNo,setCookie:TNo}=efn();_i.exports.deleteCookie=CNo;_i.exports.getCookies=vNo;_i.exports.getSetCookies=bNo;_i.exports.setCookie=TNo;var{parseMIMEType:SNo,serializeAMimeType:INo}=p_();_i.exports.parseMIMEType=SNo;_i.exports.serializeAMimeType=INo;var{CloseEvent:xNo,ErrorEvent:wNo,MessageEvent:RNo}=xoe();_i.exports.WebSocket=zfn().WebSocket;_i.exports.CloseEvent=xNo;_i.exports.ErrorEvent=wNo;_i.exports.MessageEvent=RNo;_i.exports.request=g1e(Noe.request);_i.exports.stream=g1e(Noe.stream);_i.exports.pipeline=g1e(Noe.pipeline);_i.exports.connect=g1e(Noe.connect);_i.exports.upgrade=g1e(Noe.upgrade);_i.exports.MockClient=aNo;_i.exports.MockPool=lNo;_i.exports.MockAgent=cNo;_i.exports.mockErrors=uNo;var{EventSource:PNo}=a0n();_i.exports.EventSource=PNo});var wo=T((b3u,f0n)=>{f();f0n.exports={options:{usePureJavaScript:!1}}});var m0n=T((S3u,h0n)=>{f();var t7t={};h0n.exports=t7t;var p0n={};t7t.encode=function(t,e,r){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(t instanceof Uint8Array))n=kNo(t,e);else{var o=0,s=e.length,c=e.charAt(0),l=[0];for(o=0;o0;)l.push(d%s),d=d/s|0}for(o=0;t[o]===0&&o=0;--o)n+=e[l[o]]}if(r){var p=new RegExp(".{1,"+r+"}","g");n=n.match(p).join(`\r +`)}return n};t7t.decode=function(t,e){if(typeof t!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var r=p0n[e];if(!r){r=p0n[e]=[];for(var n=0;n>=8;for(;d>0;)c.push(d&255),d>>=8}for(var p=0;t[p]===s&&p0;)s.push(l%n),l=l/n|0}var u="";for(r=0;t.at(r)===0&&r=0;--r)u+=e[s[r]];return u}a(kNo,"_encodeWithByteBuffer")});var pa=T((w3u,E0n)=>{f();var g0n=wo(),A0n=m0n(),Qe=E0n.exports=g0n.util=g0n.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){Qe.nextTick=process.nextTick,typeof setImmediate=="function"?Qe.setImmediate=setImmediate:Qe.setImmediate=Qe.nextTick;return}if(typeof setImmediate=="function"){Qe.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Qe.nextTick=function(l){return setImmediate(l)};return}if(Qe.setImmediate=function(l){setTimeout(l,0)},typeof window<"u"&&typeof window.postMessage=="function"){let l=function(u){if(u.source===window&&u.data===t){u.stopPropagation();var d=e.slice();e.length=0,d.forEach(function(p){p()})}};var c=l;a(l,"handler");var t="forge.setImmediate",e=[];Qe.setImmediate=function(u){e.push(u),e.length===1&&window.postMessage(t,"*")},window.addEventListener("message",l,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,o=document.createElement("div"),e=[];new MutationObserver(function(){var u=e.slice();e.length=0,u.forEach(function(d){d()})}).observe(o,{attributes:!0});var s=Qe.setImmediate;Qe.setImmediate=function(u){Date.now()-r>15?(r=Date.now(),s(u)):(e.push(u),e.length===1&&o.setAttribute("a",n=!n))}}Qe.nextTick=Qe.setImmediate})();Qe.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Qe.globalScope=(function(){return Qe.isNodejs?global:typeof self>"u"?window:self})();Qe.isArray=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};Qe.isArrayBuffer=function(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer};Qe.isArrayBufferView=function(t){return t&&Qe.isArrayBuffer(t.buffer)&&t.byteLength!==void 0};function A1e(t){if(!(t===8||t===16||t===24||t===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}a(A1e,"_checkBitsParam");Qe.ByteBuffer=r7t;function r7t(t){if(this.data="",this.read=0,typeof t=="string")this.data=t;else if(Qe.isArrayBuffer(t)||Qe.isArrayBufferView(t))if(typeof Buffer<"u"&&t instanceof Buffer)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var r=0;rDNo&&(this.data.substr(0,1),this._constructedStringLength=0)};Qe.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Qe.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Qe.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))};Qe.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this};Qe.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this};Qe.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(Qe.encodeUtf8(t))};Qe.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255))};Qe.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255))};Qe.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))};Qe.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(t&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))};Qe.ByteStringBuffer.prototype.putInt=function(t,e){A1e(e);var r="";do e-=8,r+=String.fromCharCode(t>>e&255);while(e>0);return this.putBytes(r)};Qe.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e};Qe.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};Qe.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};Qe.ByteStringBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};Qe.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)};Qe.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this};Qe.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Qe.ByteStringBuffer.prototype.copy=function(){var t=Qe.createBuffer(this.data);return t.read=this.read,t};Qe.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};Qe.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Qe.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this};Qe.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this};Qe.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this};Qe.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this};Qe.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this};Qe.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this};Qe.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this};Qe.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this};Qe.DataBuffer.prototype.putInt=function(t,e){A1e(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,t>>e&255);while(e>0);return this};Qe.DataBuffer.prototype.putSignedInt=function(t,e){return A1e(e),this.accommodate(e/8),t<0&&(t+=2<0);return e};Qe.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e};Qe.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):t===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};Qe.DataBuffer.prototype.bytes=function(t){return typeof t>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+t)};Qe.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)};Qe.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this};Qe.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Qe.DataBuffer.prototype.copy=function(){return new Qe.DataBuffer(this)};Qe.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};Qe.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Qe.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this};Qe.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)e&1&&(r+=t),e>>>=1,e>0&&(t+=t);return r};Qe.xorBytes=function(t,e,r){for(var n="",o="",s="",c=0,l=0;r>0;--r,++c)o=t.charCodeAt(c)^e.charCodeAt(c),l>=10&&(n+=s,s="",l=0),s+=String.fromCharCode(o),++l;return n+=s,n};Qe.hexToBytes=function(t){var e="",r=0;for(t.length&!0&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(t&255)};var XF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ZF=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],y0n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Qe.encode64=function(t,e){for(var r="",n="",o,s,c,l=0;l>2),r+=XF.charAt((o&3)<<4|s>>4),isNaN(s)?r+="==":(r+=XF.charAt((s&15)<<2|c>>6),r+=isNaN(c)?"=":XF.charAt(c&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r +`,r=r.substr(e));return n+=r,n};Qe.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",r,n,o,s,c=0;c>4),o!==64&&(e+=String.fromCharCode((n&15)<<4|o>>2),s!==64&&(e+=String.fromCharCode((o&3)<<6|s)));return e};Qe.encodeUtf8=function(t){return unescape(encodeURIComponent(t))};Qe.decodeUtf8=function(t){return decodeURIComponent(escape(t))};Qe.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:A0n.encode,decode:A0n.decode}};Qe.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)};Qe.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var o=r,s=0;s>2),r+=XF.charAt((o&3)<<4|s>>4),isNaN(s)?r+="==":(r+=XF.charAt((s&15)<<2|c>>6),r+=isNaN(c)?"=":XF.charAt(c&63)),e&&r.length>e&&(n+=r.substr(0,e)+`\r +`,r=r.substr(e));return n+=r,n};Qe.binary.base64.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(Math.ceil(t.length/4)*3)),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var o,s,c,l,u=0,d=r;u>4,c!==64&&(n[d++]=(s&15)<<4|c>>2,l!==64&&(n[d++]=(c&3)<<6|l));return e?d-r:n.subarray(0,d)};Qe.binary.base58.encode=function(t,e){return Qe.binary.baseN.encode(t,y0n,e)};Qe.binary.base58.decode=function(t,e){return Qe.binary.baseN.decode(t,y0n,e)};Qe.text={utf8:{},utf16:{}};Qe.text.utf8.encode=function(t,e,r){t=Qe.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length)),r=r||0;for(var o=r,s=0;s"u"&&(r=["web","flash"]);var o,s=!1,c=null;for(var l in r){o=r[l];try{if(o==="flash"||o==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=t.apply(this,e),s=o==="flash"}(o==="web"||o==="both")&&(e[0]=localStorage,n=t.apply(this,e),s=!0)}catch(u){c=u}if(s)break}if(!s)throw c;return n},"_callStorageFunction");Qe.setItem=function(t,e,r,n,o){hVe(MNo,arguments,o)};Qe.getItem=function(t,e,r,n){return hVe(ONo,arguments,n)};Qe.removeItem=function(t,e,r,n){hVe(BNo,arguments,n)};Qe.clearItems=function(t,e,r){hVe(LNo,arguments,r)};Qe.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0};Qe.format=function(t){for(var e=/%./g,r,n,o=0,s=[],c=0;r=e.exec(t);){n=t.substring(c,e.lastIndex-2),n.length>0&&s.push(n),c=e.lastIndex;var l=r[0][1];switch(l){case"s":case"o":o");break;case"%":s.push("%");break;default:s.push("<%"+l+"?>")}}return s.push(t.substring(c)),s.join("")};Qe.formatNumber=function(t,e,r,n){var o=t,s=isNaN(e=Math.abs(e))?2:e,c=r===void 0?",":r,l=n===void 0?".":n,u=o<0?"-":"",d=parseInt(o=Math.abs(+o||0).toFixed(s),10)+"",p=d.length>3?d.length%3:0;return u+(p?d.substr(0,p)+l:"")+d.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+l)+(s?c+Math.abs(o-d).toFixed(s).slice(2):"")};Qe.formatSize=function(t){return t>=1073741824?t=Qe.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?t=Qe.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?t=Qe.formatNumber(t/1024,0)+" KiB":t=Qe.formatNumber(t,0)+" bytes",t};Qe.bytesFromIP=function(t){return t.indexOf(".")!==-1?Qe.bytesFromIPv4(t):t.indexOf(":")!==-1?Qe.bytesFromIPv6(t):null};Qe.bytesFromIPv4=function(t){if(t=t.split("."),t.length!==4)return null;for(var e=Qe.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1))}e.push(s)}if(r.length>0){var u=r[n];u.end-u.start>0&&(e.splice(u.start,u.end-u.start+1,""),u.start===0&&e.unshift(""),u.end===7&&e.push(""))}return e.join(":")};Qe.estimateCores=function(t,e){if(typeof t=="function"&&(e=t,t={}),t=t||{},"cores"in Qe&&!t.update)return e(null,Qe.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Qe.cores=navigator.hardwareConcurrency,e(null,Qe.cores);if(typeof Worker>"u")return Qe.cores=1,e(null,Qe.cores);if(typeof Blob>"u")return Qe.cores=2,e(null,Qe.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(c){for(var l=Date.now(),u=l+4;Date.now()g.st&&p.stp.st&&g.st{f();var vh=wo();pa();_0n.exports=vh.cipher=vh.cipher||{};vh.cipher.algorithms=vh.cipher.algorithms||{};vh.cipher.createCipher=function(t,e){var r=t;if(typeof r=="string"&&(r=vh.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new vh.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})};vh.cipher.createDecipher=function(t,e){var r=t;if(typeof r=="string"&&(r=vh.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+t);return new vh.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})};vh.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),vh.cipher.algorithms[t]=e};vh.cipher.getAlgorithm=function(t){return t=t.toUpperCase(),t in vh.cipher.algorithms?vh.cipher.algorithms[t]:null};var o7t=vh.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};o7t.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=vh.util.createBuffer(),this.output=t.output||vh.util.createBuffer(),this.mode.start(e)};o7t.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};o7t.prototype.finish=function(t){t&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return t(this.blockSize,r,!1)},this.mode.unpad=function(r){return t(this.blockSize,r,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var a7t=T((N3u,C0n)=>{f();var bh=wo();pa();bh.cipher=bh.cipher||{};var as=C0n.exports=bh.cipher.modes=bh.cipher.modes||{};as.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};as.ecb.prototype.start=function(t){};as.ecb.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};as.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};as.cbc.prototype.start=function(t){if(t.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in t)this._iv=gVe(t.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};as.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return n>this.blockSize<<2?!1:(t.truncate(n),!0)};as.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=bh.util.createBuffer(),this._partialBytes=0};as.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=gVe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};as.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};as.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};as.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=bh.util.createBuffer(),this._partialBytes=0};as.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=gVe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};as.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(t.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0)t.read-=this.blockSize;else for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};as.ofb.prototype.decrypt=as.ofb.prototype.encrypt;as.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=bh.util.createBuffer(),this._partialBytes=0};as.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=gVe(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};as.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}AVe(this._inBlock)};as.ctr.prototype.decrypt=as.ctr.prototype.encrypt;as.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=bh.util.createBuffer(),this._partialBytes=0,this._R=3774873600};as.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e=bh.util.createBuffer(t.iv);this._cipherLength=0;var r;if("additionalData"in t?r=bh.util.createBuffer(t.additionalData):r=bh.util.createBuffer(),"tagLength"in t?this._tagLength=t.tagLength:this._tagLength=128,this._tag=null,t.decrypt&&(this._tag=bh.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s7t(n*8)))}this._inBlock=this._j0.slice(0),AVe(this._inBlock),this._partialBytes=0,r=bh.util.createBuffer(r),this._aDataLength=s7t(r.length()*8);var o=r.length()%this.blockSize;for(o&&r.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};as.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var o=0;o0&&(s=this.blockSize-s),this._partialOutput.clear();for(var o=0;o0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),AVe(this._inBlock)};as.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),AVe(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var o=0;o0;--n)e[n]=t[n]>>>1|(t[n-1]&1)<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)};as.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,o=t[n]>>>(7-r%8)*4&15,s=this._m[r][o];e[0]^=s[0],e[1]^=s[1],e[2]^=s[2],e[3]^=s[3]}return e};as.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)};as.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,o=16*r,s=new Array(o),c=0;c>>1,o=new Array(r);o[n]=t.slice(0);for(var s=n>>>1;s>0;)this.pow(o[2*s],o[s]=[]),s>>=1;for(s=2;s4){var r=t;t=bh.util.createBuffer();for(var n=0;n{f();var dl=wo();mVe();a7t();pa();S0n.exports=dl.aes=dl.aes||{};dl.aes.startEncrypting=function(t,e,r,n){var o=yVe({key:t,output:r,decrypt:!1,mode:n});return o.start(e),o};dl.aes.createEncryptionCipher=function(t,e){return yVe({key:t,output:null,decrypt:!1,mode:e})};dl.aes.startDecrypting=function(t,e,r,n){var o=yVe({key:t,output:r,decrypt:!0,mode:n});return o.start(e),o};dl.aes.createDecryptionCipher=function(t,e){return yVe({key:t,output:null,decrypt:!0,mode:e})};dl.aes.Algorithm=function(t,e){u7t||b0n();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:a(function(n,o){return l7t(r._w,n,o,!1)},"encrypt"),decrypt:a(function(n,o){return l7t(r._w,n,o,!0)},"decrypt")}}),r._init=!1};dl.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e=t.key,r;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=dl.util.createBuffer(e);else if(dl.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){r=e,e=dl.util.createBuffer();for(var n=0;n>>2;for(var n=0;n>8^l&255^99,hy[r]=l,c7t[l]=r,u=t[l],o=t[r],s=t[o],c=t[s],d=u<<24^l<<16^l<<8^(l^u),p=(o^s^c)<<24^(r^c)<<16^(r^s^c)<<8^(r^o^c);for(var h=0;h<4;++h)rV[h][r]=d,mw[h][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;r===0?r=n=1:(r=o^t[t[t[o^c]]],n^=t[t[n]])}}a(b0n,"initialize");function T0n(t,e){for(var r=t.slice(0),n,o=1,s=r.length,c=s+6+1,l=Moe*c,u=s;u>>16&255]<<24^hy[n>>>8&255]<<16^hy[n&255]<<8^hy[n>>>24]^v0n[o]<<24,o++):s>6&&u%s===4&&(n=hy[n>>>24]<<24^hy[n>>>16&255]<<16^hy[n>>>8&255]<<8^hy[n&255]),r[u]=r[u-s]^n;if(e){var d,p=mw[0],h=mw[1],m=mw[2],g=mw[3],A=r.slice(0);l=r.length;for(var u=0,y=l-Moe;u>>24]]^h[hy[d>>>16&255]]^m[hy[d>>>8&255]]^g[hy[d&255]];r=A}return r}a(T0n,"_expandKey");function l7t(t,e,r,n){var o=t.length/4-1,s,c,l,u,d;n?(s=mw[0],c=mw[1],l=mw[2],u=mw[3],d=c7t):(s=rV[0],c=rV[1],l=rV[2],u=rV[3],d=hy);var p,h,m,g,A,y,E;p=e[0]^t[0],h=e[n?3:1]^t[1],m=e[2]^t[2],g=e[n?1:3]^t[3];for(var _=3,v=1;v>>24]^c[h>>>16&255]^l[m>>>8&255]^u[g&255]^t[++_],y=s[h>>>24]^c[m>>>16&255]^l[g>>>8&255]^u[p&255]^t[++_],E=s[m>>>24]^c[g>>>16&255]^l[p>>>8&255]^u[h&255]^t[++_],g=s[g>>>24]^c[p>>>16&255]^l[h>>>8&255]^u[m&255]^t[++_],p=A,h=y,m=E;r[0]=d[p>>>24]<<24^d[h>>>16&255]<<16^d[m>>>8&255]<<8^d[g&255]^t[++_],r[n?3:1]=d[h>>>24]<<24^d[m>>>16&255]<<16^d[g>>>8&255]<<8^d[p&255]^t[++_],r[2]=d[m>>>24]<<24^d[g>>>16&255]<<16^d[p>>>8&255]<<8^d[h&255]^t[++_],r[n?1:3]=d[g>>>24]<<24^d[p>>>16&255]<<16^d[h>>>8&255]<<8^d[m&255]^t[++_]}a(l7t,"_updateBlock");function yVe(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="AES-"+e,n;t.decrypt?n=dl.cipher.createDecipher(r,t.key):n=dl.cipher.createCipher(r,t.key);var o=n.start;return n.start=function(s,c){var l=null;c instanceof dl.util.ByteBuffer&&(l=c,c={}),c=c||{},c.output=l,c.iv=s,o.call(n,c)},n}a(yVe,"_createCipher")});var t9=T((U3u,I0n)=>{f();var y1e=wo();y1e.pki=y1e.pki||{};var d7t=I0n.exports=y1e.pki.oids=y1e.oids=y1e.oids||{};function Vt(t,e){d7t[t]=e,d7t[e]=t}a(Vt,"_IN");function Ua(t,e){d7t[t]=e}a(Ua,"_I_");Vt("1.2.840.113549.1.1.1","rsaEncryption");Vt("1.2.840.113549.1.1.4","md5WithRSAEncryption");Vt("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Vt("1.2.840.113549.1.1.7","RSAES-OAEP");Vt("1.2.840.113549.1.1.8","mgf1");Vt("1.2.840.113549.1.1.9","pSpecified");Vt("1.2.840.113549.1.1.10","RSASSA-PSS");Vt("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Vt("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Vt("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Vt("1.3.101.112","EdDSA25519");Vt("1.2.840.10040.4.3","dsa-with-sha1");Vt("1.3.14.3.2.7","desCBC");Vt("1.3.14.3.2.26","sha1");Vt("1.3.14.3.2.29","sha1WithRSASignature");Vt("2.16.840.1.101.3.4.2.1","sha256");Vt("2.16.840.1.101.3.4.2.2","sha384");Vt("2.16.840.1.101.3.4.2.3","sha512");Vt("2.16.840.1.101.3.4.2.4","sha224");Vt("2.16.840.1.101.3.4.2.5","sha512-224");Vt("2.16.840.1.101.3.4.2.6","sha512-256");Vt("1.2.840.113549.2.2","md2");Vt("1.2.840.113549.2.5","md5");Vt("1.2.840.113549.1.7.1","data");Vt("1.2.840.113549.1.7.2","signedData");Vt("1.2.840.113549.1.7.3","envelopedData");Vt("1.2.840.113549.1.7.4","signedAndEnvelopedData");Vt("1.2.840.113549.1.7.5","digestedData");Vt("1.2.840.113549.1.7.6","encryptedData");Vt("1.2.840.113549.1.9.1","emailAddress");Vt("1.2.840.113549.1.9.2","unstructuredName");Vt("1.2.840.113549.1.9.3","contentType");Vt("1.2.840.113549.1.9.4","messageDigest");Vt("1.2.840.113549.1.9.5","signingTime");Vt("1.2.840.113549.1.9.6","counterSignature");Vt("1.2.840.113549.1.9.7","challengePassword");Vt("1.2.840.113549.1.9.8","unstructuredAddress");Vt("1.2.840.113549.1.9.14","extensionRequest");Vt("1.2.840.113549.1.9.20","friendlyName");Vt("1.2.840.113549.1.9.21","localKeyId");Vt("1.2.840.113549.1.9.22.1","x509Certificate");Vt("1.2.840.113549.1.12.10.1.1","keyBag");Vt("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Vt("1.2.840.113549.1.12.10.1.3","certBag");Vt("1.2.840.113549.1.12.10.1.4","crlBag");Vt("1.2.840.113549.1.12.10.1.5","secretBag");Vt("1.2.840.113549.1.12.10.1.6","safeContentsBag");Vt("1.2.840.113549.1.5.13","pkcs5PBES2");Vt("1.2.840.113549.1.5.12","pkcs5PBKDF2");Vt("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Vt("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Vt("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Vt("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Vt("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Vt("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Vt("1.2.840.113549.2.7","hmacWithSHA1");Vt("1.2.840.113549.2.8","hmacWithSHA224");Vt("1.2.840.113549.2.9","hmacWithSHA256");Vt("1.2.840.113549.2.10","hmacWithSHA384");Vt("1.2.840.113549.2.11","hmacWithSHA512");Vt("1.2.840.113549.3.7","des-EDE3-CBC");Vt("2.16.840.1.101.3.4.1.2","aes128-CBC");Vt("2.16.840.1.101.3.4.1.22","aes192-CBC");Vt("2.16.840.1.101.3.4.1.42","aes256-CBC");Vt("2.5.4.3","commonName");Vt("2.5.4.4","surname");Vt("2.5.4.5","serialNumber");Vt("2.5.4.6","countryName");Vt("2.5.4.7","localityName");Vt("2.5.4.8","stateOrProvinceName");Vt("2.5.4.9","streetAddress");Vt("2.5.4.10","organizationName");Vt("2.5.4.11","organizationalUnitName");Vt("2.5.4.12","title");Vt("2.5.4.13","description");Vt("2.5.4.15","businessCategory");Vt("2.5.4.17","postalCode");Vt("2.5.4.42","givenName");Vt("2.5.4.65","pseudonym");Vt("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Vt("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Vt("2.16.840.1.113730.1.1","nsCertType");Vt("2.16.840.1.113730.1.13","nsComment");Ua("2.5.29.1","authorityKeyIdentifier");Ua("2.5.29.2","keyAttributes");Ua("2.5.29.3","certificatePolicies");Ua("2.5.29.4","keyUsageRestriction");Ua("2.5.29.5","policyMapping");Ua("2.5.29.6","subtreesConstraint");Ua("2.5.29.7","subjectAltName");Ua("2.5.29.8","issuerAltName");Ua("2.5.29.9","subjectDirectoryAttributes");Ua("2.5.29.10","basicConstraints");Ua("2.5.29.11","nameConstraints");Ua("2.5.29.12","policyConstraints");Ua("2.5.29.13","basicConstraints");Vt("2.5.29.14","subjectKeyIdentifier");Vt("2.5.29.15","keyUsage");Ua("2.5.29.16","privateKeyUsagePeriod");Vt("2.5.29.17","subjectAltName");Vt("2.5.29.18","issuerAltName");Vt("2.5.29.19","basicConstraints");Ua("2.5.29.20","cRLNumber");Ua("2.5.29.21","cRLReason");Ua("2.5.29.22","expirationDate");Ua("2.5.29.23","instructionCode");Ua("2.5.29.24","invalidityDate");Ua("2.5.29.25","cRLDistributionPoints");Ua("2.5.29.26","issuingDistributionPoint");Ua("2.5.29.27","deltaCRLIndicator");Ua("2.5.29.28","issuingDistributionPoint");Ua("2.5.29.29","certificateIssuer");Ua("2.5.29.30","nameConstraints");Vt("2.5.29.31","cRLDistributionPoints");Vt("2.5.29.32","certificatePolicies");Ua("2.5.29.33","policyMappings");Ua("2.5.29.34","policyConstraints");Vt("2.5.29.35","authorityKeyIdentifier");Ua("2.5.29.36","policyConstraints");Vt("2.5.29.37","extKeyUsage");Ua("2.5.29.46","freshestCRL");Ua("2.5.29.54","inhibitAnyPolicy");Vt("1.3.6.1.4.1.11129.2.4.2","timestampList");Vt("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Vt("1.3.6.1.5.5.7.3.1","serverAuth");Vt("1.3.6.1.5.5.7.3.2","clientAuth");Vt("1.3.6.1.5.5.7.3.3","codeSigning");Vt("1.3.6.1.5.5.7.3.4","emailProtection");Vt("1.3.6.1.5.5.7.3.8","timeStamping")});var gw=T((G3u,w0n)=>{f();var zl=wo();pa();t9();var Qr=w0n.exports=zl.asn1=zl.asn1||{};Qr.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Qr.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Qr.maxDepth=256;Qr.create=function(t,e,r,n,o){if(zl.util.isArray(n)){for(var s=[],c=0;ce){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}a(E1e,"_checkBufferLength");var FNo=a(function(t,e){var r=t.getByte();if(e--,r!==128){var n,o=r&128;if(!o)n=r;else{var s=r&127;E1e(t,e,s),n=t.getInt(s<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");Qr.fromDer=function(t,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"maxDepth"in e||(e.maxDepth=Qr.maxDepth),typeof t=="string"&&(t=zl.util.createBuffer(t));var r=t.length(),n=EVe(t,t.length(),0,e);if(e.parseAllBytes&&t.length()!==0){var o=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw o.byteCount=r,o.remaining=t.length(),o}return n};function EVe(t,e,r,n){if(r>=n.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var o;E1e(t,e,2);var s=t.getByte();e--;var c=s&192,l=s&31;o=t.length();var u=FNo(t,e);if(e-=o-t.length(),u!==void 0&&u>e){if(n.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=e,d.requested=u,d}u=e}var p,h,m=(s&32)===32;if(m)if(p=[],u===void 0)for(;;){if(E1e(t,e,2),t.bytes(2)==="\0\0"){t.getBytes(2),e-=2;break}o=t.length(),p.push(EVe(t,e,r+1,n)),e-=o-t.length()}else for(;u>0;)o=t.length(),p.push(EVe(t,u,r+1,n)),e-=o-t.length(),u-=o-t.length();if(p===void 0&&c===Qr.Class.UNIVERSAL&&l===Qr.Type.BITSTRING&&(h=t.bytes(u)),p===void 0&&n.decodeBitStrings&&c===Qr.Class.UNIVERSAL&&l===Qr.Type.BITSTRING&&u>1){var g=t.read,A=e,y=0;if(l===Qr.Type.BITSTRING&&(E1e(t,e,1),y=t.getByte(),e--),y===0)try{o=t.length();var E={strict:!0,decodeBitStrings:!0},_=EVe(t,e,r+1,E),v=o-t.length();e-=v,l==Qr.Type.BITSTRING&&v++;var b=_.tagClass;v===u&&(b===Qr.Class.UNIVERSAL||b===Qr.Class.CONTEXT_SPECIFIC)&&(p=[_])}catch{}p===void 0&&(t.read=g,e=A)}if(p===void 0){if(u===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");u=e}if(l===Qr.Type.BMPSTRING)for(p="";u>0;u-=2)E1e(t,e,2),p+=String.fromCharCode(t.getInt16()),e-=2;else p=t.getBytes(u),e-=u}var I=h===void 0?null:{bitStringContents:h};return Qr.create(c,l,m,p,I)}a(EVe,"_fromDer");Qr.toDer=function(t){var e=zl.util.createBuffer(),r=t.tagClass|t.type,n=zl.util.createBuffer(),o=!1;if("bitStringContents"in t&&(o=!0,t.original&&(o=Qr.equals(t,t.original))),o)n.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:n.putByte(0);for(var s=0;s1&&(t.value.charCodeAt(0)===0&&(t.value.charCodeAt(1)&128)===0||t.value.charCodeAt(0)===255&&(t.value.charCodeAt(1)&128)===128)?n.putBytes(t.value.substr(1)):n.putBytes(t.value);if(e.putByte(r),n.length()<=127)e.putByte(n.length()&127);else{var c=n.length(),l="";do l+=String.fromCharCode(c&255),c=c>>>8;while(c>0);e.putByte(l.length|128);for(var s=l.length-1;s>=0;--s)e.putByte(l.charCodeAt(s))}return e.putBuffer(n),e};Qr.oidToDer=function(t){var e=t.split("."),r=zl.util.createBuffer();r.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,o,s,c,l=2;l4294967295)throw new Error("OID value too large; max is 32-bits.");do c=s&127,s=s>>>7,n||(c|=128),o.push(c),n=!1;while(s>0);for(var u=o.length-1;u>=0;--u)r.putByte(o[u])}return r};Qr.derToOid=function(t){var e;typeof t=="string"&&(t=zl.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;){if(n>70368744177663)throw new Error("OID value too large; max is 53-bits.");r=t.getByte(),n=n*128,r&128?n+=r&127:(e+="."+(n+r),n=0)}return e};Qr.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,o=parseInt(t.substr(4,2),10),s=parseInt(t.substr(6,2),10),c=parseInt(t.substr(8,2),10),l=0;if(t.length>11){var u=t.charAt(10),d=10;u!=="+"&&u!=="-"&&(l=parseInt(t.substr(10,2),10),d+=2)}if(e.setUTCFullYear(r,n,o),e.setUTCHours(s,c,l,0),d&&(u=t.charAt(d),u==="+"||u==="-")){var p=parseInt(t.substr(d+1,2),10),h=parseInt(t.substr(d+4,2),10),m=p*60+h;m*=6e4,u==="+"?e.setTime(+e-m):e.setTime(+e+m)}return e};Qr.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,o=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),c=parseInt(t.substr(10,2),10),l=parseInt(t.substr(12,2),10),u=0,d=0,p=!1;t.charAt(t.length-1)==="Z"&&(p=!0);var h=t.length-5,m=t.charAt(h);if(m==="+"||m==="-"){var g=parseInt(t.substr(h+1,2),10),A=parseInt(t.substr(h+4,2),10);d=g*60+A,d*=6e4,m==="+"&&(d*=-1),p=!0}return t.charAt(14)==="."&&(u=parseFloat(t.substr(14),10)*1e3),p?(e.setUTCFullYear(r,n,o),e.setUTCHours(s,c,l,u),e.setTime(+e+d)):(e.setFullYear(r,n,o),e.setHours(s,c,l,u)),e};Qr.dateToUtcTime=function(t){if(typeof t=="string")return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r};Qr.derToInteger=function(t){typeof t=="string"&&(t=zl.util.createBuffer(t));var e=t.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)};Qr.validate=function(t,e,r,n){var o=!1;if((t.tagClass===e.tagClass||typeof e.tagClass>"u")&&(t.type===e.type||typeof e.type>"u"))if(t.constructed===e.constructed||typeof e.constructed>"u"){if(o=!0,e.value&&zl.util.isArray(e.value))for(var s=0,c=0;o&&c0&&(n+=` `);for(var o="",s=0;s1?n+="0x"+ru.util.bytesToHex(t.value.slice(1)):n+="(none)",t.value.length>0){var d=t.value.charCodeAt(0);d==1?n+=" (1 unused bit shown)":d>1&&(n+=" ("+d+" unused bits shown)")}}else if(t.type===Qr.Type.OCTETSTRING)wfn.test(t.value)||(n+="("+t.value+") "),n+="0x"+ru.util.bytesToHex(t.value);else if(t.type===Qr.Type.UTF8)try{n+=ru.util.decodeUtf8(t.value)}catch(p){if(p.message==="URI malformed")n+="0x"+ru.util.bytesToHex(t.value)+" (malformed UTF8)";else throw p}else t.type===Qr.Type.PRINTABLESTRING||t.type===Qr.Type.IA5String?n+=t.value:wfn.test(t.value)?n+="0x"+ru.util.bytesToHex(t.value):t.value.length===0?n+="[null]":n+=t.value}return n}});var lN=T((M4u,Pfn)=>{f();var fWe=No();Pfn.exports=fWe.md=fWe.md||{};fWe.md.algorithms=fWe.md.algorithms||{}});var vse=T((B4u,kfn)=>{f();var h4=No();lN();Ea();var FNo=kfn.exports=h4.hmac=h4.hmac||{};FNo.create=function(){var t=null,e=null,r=null,n=null,o={};return o.start=function(s,c){if(s!==null)if(typeof s=="string")if(s=s.toLowerCase(),s in h4.md.algorithms)e=h4.md.algorithms[s].create();else throw new Error('Unknown hash algorithm "'+s+'"');else e=s;if(c===null)c=t;else{if(typeof c=="string")c=h4.util.createBuffer(c);else if(h4.util.isArray(c)){var l=c;c=h4.util.createBuffer();for(var u=0;ue.blockLength&&(e.start(),e.update(c.bytes()),c=e.digest()),r=h4.util.createBuffer(),n=h4.util.createBuffer(),d=c.length();for(var u=0;u{f();var uN=No();lN();Ea();var Dfn=Ofn.exports=uN.md5=uN.md5||{};uN.md.md5=uN.md.algorithms.md5=Dfn;Dfn.create=function(){Mfn||UNo();var t=null,e=uN.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),Nfn(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=uN.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(V9t.substr(0,n.blockLength-c));for(var l,u=0,d=n.fullMessageLength.length-1;d>=0;--d)l=n.fullMessageLength[d]*8+u,u=l/4294967296>>>0,o.putInt32Le(l>>>0);var p={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};Nfn(p,r,o);var h=uN.util.createBuffer();return h.putInt32Le(p.h0),h.putInt32Le(p.h1),h.putInt32Le(p.h2),h.putInt32Le(p.h3),h},n};var V9t=null,pWe=null,bve=null,bse=null,Mfn=!1;function UNo(){V9t="\x80",V9t+=uN.util.fillString("\0",64),pWe=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],bve=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],bse=new Array(64);for(var t=0;t<64;++t)bse[t]=Math.floor(Math.abs(Math.sin(t+1))*4294967296);Mfn=!0}a(UNo,"_init");function Nfn(t,e,r){for(var n,o,s,c,l,u,d,p,h=r.length();h>=64;){for(o=t.h0,s=t.h1,c=t.h2,l=t.h3,p=0;p<16;++p)e[p]=r.getInt32Le(),u=l^s&(c^l),n=o+u+bse[p]+e[p],d=bve[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<32;++p)u=c^l&(s^c),n=o+u+bse[p]+e[pWe[p]],d=bve[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<48;++p)u=s^c^l,n=o+u+bse[p]+e[pWe[p]],d=bve[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<64;++p)u=c^(s|~l),n=o+u+bse[p]+e[pWe[p]],d=bve[p],o=l,l=c,c=s,s+=n<>>32-d;t.h0=t.h0+o|0,t.h1=t.h1+s|0,t.h2=t.h2+c|0,t.h3=t.h3+l|0,h-=64}}a(Nfn,"_update")});var KV=T((q4u,Lfn)=>{f();var gWe=No();Ea();var Bfn=Lfn.exports=gWe.pem=gWe.pem||{};Bfn.encode=function(t,e){e=e||{};var r="-----BEGIN "+t.type+`-----\r -`,n;if(t.procType&&(n={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]},r+=mWe(n)),t.contentDomain&&(n={name:"Content-Domain",values:[t.contentDomain]},r+=mWe(n)),t.dekInfo&&(n={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&n.values.push(t.dekInfo.parameters),r+=mWe(n)),t.headers)for(var o=0;o1?n+="0x"+zl.util.bytesToHex(t.value.slice(1)):n+="(none)",t.value.length>0){var d=t.value.charCodeAt(0);d==1?n+=" (1 unused bit shown)":d>1&&(n+=" ("+d+" unused bits shown)")}}else if(t.type===Qr.Type.OCTETSTRING)x0n.test(t.value)||(n+="("+t.value+") "),n+="0x"+zl.util.bytesToHex(t.value);else if(t.type===Qr.Type.UTF8)try{n+=zl.util.decodeUtf8(t.value)}catch(p){if(p.message==="URI malformed")n+="0x"+zl.util.bytesToHex(t.value)+" (malformed UTF8)";else throw p}else t.type===Qr.Type.PRINTABLESTRING||t.type===Qr.Type.IA5String?n+=t.value:x0n.test(t.value)?n+="0x"+zl.util.bytesToHex(t.value):t.value.length===0?n+="[null]":n+=t.value}return n}});var Jk=T(($3u,R0n)=>{f();var _Ve=wo();R0n.exports=_Ve.md=_Ve.md||{};_Ve.md.algorithms=_Ve.md.algorithms||{}});var Boe=T((W3u,P0n)=>{f();var K4=wo();Jk();pa();var UNo=P0n.exports=K4.hmac=K4.hmac||{};UNo.create=function(){var t=null,e=null,r=null,n=null,o={};return o.start=function(s,c){if(s!==null)if(typeof s=="string")if(s=s.toLowerCase(),s in K4.md.algorithms)e=K4.md.algorithms[s].create();else throw new Error('Unknown hash algorithm "'+s+'"');else e=s;if(c===null)c=t;else{if(typeof c=="string")c=K4.util.createBuffer(c);else if(K4.util.isArray(c)){var l=c;c=K4.util.createBuffer();for(var u=0;ue.blockLength&&(e.start(),e.update(c.bytes()),c=e.digest()),r=K4.util.createBuffer(),n=K4.util.createBuffer(),d=c.length();for(var u=0;u{f();var Xk=wo();Jk();pa();var D0n=M0n.exports=Xk.md5=Xk.md5||{};Xk.md.md5=Xk.md.algorithms.md5=D0n;D0n.create=function(){N0n||QNo();var t=null,e=Xk.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),k0n(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=Xk.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(f7t.substr(0,n.blockLength-c));for(var l,u=0,d=n.fullMessageLength.length-1;d>=0;--d)l=n.fullMessageLength[d]*8+u,u=l/4294967296>>>0,o.putInt32Le(l>>>0);var p={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};k0n(p,r,o);var h=Xk.util.createBuffer();return h.putInt32Le(p.h0),h.putInt32Le(p.h1),h.putInt32Le(p.h2),h.putInt32Le(p.h3),h},n};var f7t=null,CVe=null,_1e=null,Loe=null,N0n=!1;function QNo(){f7t="\x80",f7t+=Xk.util.fillString("\0",64),CVe=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],_1e=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],Loe=new Array(64);for(var t=0;t<64;++t)Loe[t]=Math.floor(Math.abs(Math.sin(t+1))*4294967296);N0n=!0}a(QNo,"_init");function k0n(t,e,r){for(var n,o,s,c,l,u,d,p,h=r.length();h>=64;){for(o=t.h0,s=t.h1,c=t.h2,l=t.h3,p=0;p<16;++p)e[p]=r.getInt32Le(),u=l^s&(c^l),n=o+u+Loe[p]+e[p],d=_1e[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<32;++p)u=c^l&(s^c),n=o+u+Loe[p]+e[CVe[p]],d=_1e[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<48;++p)u=s^c^l,n=o+u+Loe[p]+e[CVe[p]],d=_1e[p],o=l,l=c,c=s,s+=n<>>32-d;for(;p<64;++p)u=c^(s|~l),n=o+u+Loe[p]+e[CVe[p]],d=_1e[p],o=l,l=c,c=s,s+=n<>>32-d;t.h0=t.h0+o|0,t.h1=t.h1+s|0,t.h2=t.h2+c|0,t.h3=t.h3+l|0,h-=64}}a(k0n,"_update")});var nV=T((X3u,B0n)=>{f();var TVe=wo();pa();var O0n=B0n.exports=TVe.pem=TVe.pem||{};O0n.encode=function(t,e){e=e||{};var r="-----BEGIN "+t.type+`-----\r +`,n;if(t.procType&&(n={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]},r+=bVe(n)),t.contentDomain&&(n={name:"Content-Domain",values:[t.contentDomain]},r+=bVe(n)),t.dekInfo&&(n={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&n.values.push(t.dekInfo.parameters),r+=bVe(n)),t.headers)for(var o=0;o65&&c!==-1){var l=e[c];l===","?(++c,e=e.substr(0,c)+`\r `+e.substr(c)):e=e.substr(0,c)+`\r -`+l+e.substr(c+1),s=o-c-1,c=-1,++o}else(e[o]===" "||e[o]===" "||e[o]===",")&&(c=o);return e}a(mWe,"foldHeader");function QNo(t){return t.replace(/^\s+/,"")}a(QNo,"ltrim")});var Tve=T((j4u,Ufn)=>{f();var Bu=No();aWe();q9t();Ea();Ufn.exports=Bu.des=Bu.des||{};Bu.des.startEncrypting=function(t,e,r,n){var o=AWe({key:t,output:r,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return o.start(e),o};Bu.des.createEncryptionCipher=function(t,e){return AWe({key:t,output:null,decrypt:!1,mode:e})};Bu.des.startDecrypting=function(t,e,r,n){var o=AWe({key:t,output:r,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return o.start(e),o};Bu.des.createDecryptionCipher=function(t,e){return AWe({key:t,output:null,decrypt:!0,mode:e})};Bu.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:a(function(n,o){return Ffn(r._keys,n,o,!1)},"encrypt"),decrypt:a(function(n,o){return Ffn(r._keys,n,o,!0)},"decrypt")}}),r._init=!1};Bu.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=Bu.util.createBuffer(t.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=YNo(e),this._init=!0}};dN("DES-ECB",Bu.cipher.modes.ecb);dN("DES-CBC",Bu.cipher.modes.cbc);dN("DES-CFB",Bu.cipher.modes.cfb);dN("DES-OFB",Bu.cipher.modes.ofb);dN("DES-CTR",Bu.cipher.modes.ctr);dN("3DES-ECB",Bu.cipher.modes.ecb);dN("3DES-CBC",Bu.cipher.modes.cbc);dN("3DES-CFB",Bu.cipher.modes.cfb);dN("3DES-OFB",Bu.cipher.modes.ofb);dN("3DES-CTR",Bu.cipher.modes.ctr);function dN(t,e){var r=a(function(){return new Bu.des.Algorithm(t,e)},"factory");Bu.cipher.registerAlgorithm(t,r)}a(dN,"registerAlgorithm");var qNo=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],GNo=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],HNo=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],jNo=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],$No=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],VNo=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],WNo=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],zNo=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function YNo(t){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],c=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],d=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],p=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],m=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],g=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],A=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=t.length()>8?3:1,E=[],_=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,b,I=0;I>>4^R)&252645135,R^=b,x^=b<<4,b=(R>>>-16^x)&65535,x^=b,R^=b<<-16,b=(x>>>2^R)&858993459,R^=b,x^=b<<2,b=(R>>>-16^x)&65535,x^=b,R^=b<<-16,b=(x>>>1^R)&1431655765,R^=b,x^=b<<1,b=(R>>>8^x)&16711935,x^=b,R^=b<<8,b=(x>>>1^R)&1431655765,R^=b,x^=b<<1,b=x<<8|R>>>20&240,x=R<<24|R<<8&16711680|R>>>8&65280|R>>>24&240,R=b;for(var w=0;w<_.length;++w){_[w]?(x=x<<2|x>>>26,R=R<<2|R>>>26):(x=x<<1|x>>>27,R=R<<1|R>>>27),x&=-15,R&=-15;var P=e[x>>>28]|r[x>>>24&15]|n[x>>>20&15]|o[x>>>16&15]|s[x>>>12&15]|c[x>>>8&15]|l[x>>>4&15],k=u[R>>>28]|d[R>>>24&15]|p[R>>>20&15]|h[R>>>16&15]|m[R>>>12&15]|g[R>>>8&15]|A[R>>>4&15];b=(k>>>16^P)&65535,E[v++]=P^b,E[v++]=k^b<<16}}return E}a(YNo,"_createKeys");function Ffn(t,e,r,n){var o=t.length===32?3:9,s;o===3?s=n?[30,-2,-2]:[0,32,2]:s=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var c,l=e[0],u=e[1];c=(l>>>4^u)&252645135,u^=c,l^=c<<4,c=(l>>>16^u)&65535,u^=c,l^=c<<16,c=(u>>>2^l)&858993459,l^=c,u^=c<<2,c=(u>>>8^l)&16711935,l^=c,u^=c<<8,c=(l>>>1^u)&1431655765,u^=c,l^=c<<1,l=l<<1|l>>>31,u=u<<1|u>>>31;for(var d=0;d>>4|u<<28)^t[m+1];c=l,l=u,u=c^(GNo[g>>>24&63]|jNo[g>>>16&63]|VNo[g>>>8&63]|zNo[g&63]|qNo[A>>>24&63]|HNo[A>>>16&63]|$No[A>>>8&63]|WNo[A&63])}c=l,l=u,u=c}l=l>>>1|l<<31,u=u>>>1|u<<31,c=(l>>>1^u)&1431655765,u^=c,l^=c<<1,c=(u>>>8^l)&16711935,l^=c,u^=c<<8,c=(u>>>2^l)&858993459,l^=c,u^=c<<2,c=(l>>>16^u)&65535,u^=c,l^=c<<16,c=(l>>>4^u)&252645135,u^=c,l^=c<<4,r[0]=l,r[1]=u}a(Ffn,"_updateBlock");function AWe(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="DES-"+e,n;t.decrypt?n=Bu.cipher.createDecipher(r,t.key):n=Bu.cipher.createCipher(r,t.key);var o=n.start;return n.start=function(s,c){var l=null;c instanceof Bu.util.ByteBuffer&&(l=c,c={}),c=c||{},c.output=l,c.iv=s,o.call(n,c)},n}a(AWe,"_createCipher")});var yWe=T((W4u,Qfn)=>{f();var Ty=No();vse();lN();Ea();var KNo=Ty.pkcs5=Ty.pkcs5||{},m4;Ty.util.isNodejs&&!Ty.options.usePureJavaScript&&(m4=require("crypto"));Qfn.exports=Ty.pbkdf2=KNo.pbkdf2=function(t,e,r,n,o,s){if(typeof o=="function"&&(s=o,o=null),Ty.util.isNodejs&&!Ty.options.usePureJavaScript&&m4.pbkdf2&&(o===null||typeof o!="object")&&(m4.pbkdf2Sync.length>4||!o||o==="sha1"))return typeof o!="string"&&(o="sha1"),t=Buffer.from(t,"binary"),e=Buffer.from(e,"binary"),s?m4.pbkdf2Sync.length===4?m4.pbkdf2(t,e,r,n,function(b,I){if(b)return s(b);s(null,I.toString("binary"))}):m4.pbkdf2(t,e,r,n,o,function(b,I){if(b)return s(b);s(null,I.toString("binary"))}):m4.pbkdf2Sync.length===4?m4.pbkdf2Sync(t,e,r,n).toString("binary"):m4.pbkdf2Sync(t,e,r,n,o).toString("binary");if((typeof o>"u"||o===null)&&(o="sha1"),typeof o=="string"){if(!(o in Ty.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=Ty.md[o].create()}var c=o.digestLength;if(n>4294967295*c){var l=new Error("Derived key is too long.");if(s)return s(l);throw l}var u=Math.ceil(n/c),d=n-(u-1)*c,p=Ty.hmac.create();p.start(o,t);var h="",m,g,A;if(!s){for(var y=1;y<=u;++y){p.start(null,null),p.update(e),p.update(Ty.util.int32ToBytes(y)),m=A=p.digest().getBytes();for(var E=2;E<=r;++E)p.start(null,null),p.update(A),g=p.digest().getBytes(),m=Ty.util.xorBytes(m,g,c),A=g;h+=yu)return s(null,h);p.start(null,null),p.update(e),p.update(Ty.util.int32ToBytes(y)),m=A=p.digest().getBytes(),E=2,v()}a(_,"outer");function v(){if(E<=r)return p.start(null,null),p.update(A),g=p.digest().getBytes(),m=Ty.util.xorBytes(m,g,c),A=g,++E,Ty.util.setImmediate(v);h+=y{f();var fN=No();lN();Ea();var Gfn=$fn.exports=fN.sha256=fN.sha256||{};fN.md.sha256=fN.md.algorithms.sha256=Gfn;Gfn.create=function(){Hfn||JNo();var t=null,e=fN.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),qfn(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=fN.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(W9t.substr(0,n.blockLength-c));for(var l,u,d=n.fullMessageLength[0]*8,p=0;p>>0,d+=u,o.putInt32(d>>>0),d=l>>>0;o.putInt32(d);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};qfn(h,r,o);var m=fN.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m.putInt32(h.h5),m.putInt32(h.h6),m.putInt32(h.h7),m},n};var W9t=null,Hfn=!1,jfn=null;function JNo(){W9t="\x80",W9t+=fN.util.fillString("\0",64),jfn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Hfn=!0}a(JNo,"_init");function qfn(t,e,r){for(var n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v=r.length();v>=64;){for(d=0;d<16;++d)e[d]=r.getInt32();for(;d<64;++d)n=e[d-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,o=e[d-15],o=(o>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,e[d]=n+e[d-7]+o+e[d-16]|0;for(p=t.h0,h=t.h1,m=t.h2,g=t.h3,A=t.h4,y=t.h5,E=t.h6,_=t.h7,d=0;d<64;++d)c=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),l=E^A&(y^E),s=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),u=p&h|m&(p^h),n=_+c+l+jfn[d]+e[d],o=s+u,_=E,E=y,y=A,A=g+n>>>0,g=m,m=h,h=p,p=n+o>>>0;t.h0=t.h0+p|0,t.h1=t.h1+h|0,t.h2=t.h2+m|0,t.h3=t.h3+g|0,t.h4=t.h4+A|0,t.h5=t.h5+y|0,t.h6=t.h6+E|0,t.h7=t.h7+_|0,v-=64}}a(qfn,"_update")});var Y9t=T((Z4u,Vfn)=>{f();var pN=No();Ea();var EWe=null;pN.util.isNodejs&&!pN.options.usePureJavaScript&&!process.versions["node-webkit"]&&(EWe=require("crypto"));var XNo=Vfn.exports=pN.prng=pN.prng||{};XNo.create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,n=new Array(32),o=0;o<32;++o)n[o]=r.create();e.pools=n,e.pool=0,e.generate=function(d,p){if(!p)return e.generateSync(d);var h=e.plugin.cipher,m=e.plugin.increment,g=e.plugin.formatKey,A=e.plugin.formatSeed,y=pN.util.createBuffer();e.key=null,E();function E(_){if(_)return p(_);if(y.length()>=d)return p(null,y.getBytes(d));if(e.generated>1048575&&(e.key=null),e.key===null)return pN.util.nextTick(function(){s(E)});var v=h(e.key,e.seed);e.generated+=v.length,y.putBytes(v),e.key=g(h(e.key,m(e.seed))),e.seed=A(h(e.key,e.seed)),pN.util.setImmediate(E)}a(E,"generate")},e.generateSync=function(d){var p=e.plugin.cipher,h=e.plugin.increment,m=e.plugin.formatKey,g=e.plugin.formatSeed;e.key=null;for(var A=pN.util.createBuffer();A.length()1048575&&(e.key=null),e.key===null&&c();var y=p(e.key,e.seed);e.generated+=y.length,A.putBytes(y),e.key=m(p(e.key,h(e.seed))),e.seed=g(p(e.key,e.seed))}return A.getBytes(d)};function s(d){if(e.pools[0].messageLength>=32)return l(),d();var p=32-e.pools[0].messageLength<<5;e.seedFile(p,function(h,m){if(h)return d(h);e.collect(m),l(),d()})}a(s,"_reseed");function c(){if(e.pools[0].messageLength>=32)return l();var d=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(d)),l()}a(c,"_reseedSync");function l(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var d=e.plugin.md.create();d.update(e.keyBytes);for(var p=1,h=0;h<32;++h)e.reseeds%p===0&&(d.update(e.pools[h].digest().getBytes()),e.pools[h].start()),p=p<<1;e.keyBytes=d.digest().getBytes(),d.start(),d.update(e.keyBytes);var m=d.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(m),e.generated=0}a(l,"_seed");function u(d){var p=null,h=pN.util.globalScope,m=h.crypto||h.msCrypto;m&&m.getRandomValues&&(p=a(function(x){return m.getRandomValues(x)},"getRandomValues"));var g=pN.util.createBuffer();if(p)for(;g.length()>16),v+=(_&32767)<<16,v+=_>>15,v=(v&2147483647)+(v>>31),I=v&4294967295;for(var E=0;E<3;++E)b=I>>>(E<<3),b^=Math.floor(Math.random()*256),g.putByte(b&255)}return g.getBytes(d)}return a(u,"defaultSeedFile"),EWe?(e.seedFile=function(d,p){EWe.randomBytes(d,function(h,m){if(h)return p(h);p(null,m.toString())})},e.seedFileSync=function(d){return EWe.randomBytes(d).toString()}):(e.seedFile=function(d,p){try{p(null,u(d))}catch(h){p(h)}},e.seedFileSync=u),e.collect=function(d){for(var p=d.length,h=0;h>m&255);e.collect(h)},e.registerWorker=function(d){if(d===self)e.seedFile=function(h,m){function g(A){var y=A.data;y.forge&&y.forge.prng&&(self.removeEventListener("message",g),m(y.forge.prng.err,y.forge.prng.bytes))}a(g,"listener"),self.addEventListener("message",g),self.postMessage({forge:{prng:{needed:h}}})};else{var p=a(function(h){var m=h.data;m.forge&&m.forge.prng&&e.seedFile(m.forge.prng.needed,function(g,A){d.postMessage({forge:{prng:{err:g,bytes:A}}})})},"listener");d.addEventListener("message",p)}},e}});var uS=T((rBu,K9t)=>{f();var kh=No();x9();z9t();Y9t();Ea();(function(){if(kh.random&&kh.random.getBytes){K9t.exports=kh.random;return}(function(t){var e={},r=new Array(4),n=kh.util.createBuffer();e.formatKey=function(h){var m=kh.util.createBuffer(h);return h=new Array(4),h[0]=m.getInt32(),h[1]=m.getInt32(),h[2]=m.getInt32(),h[3]=m.getInt32(),kh.aes._expandKey(h,!1)},e.formatSeed=function(h){var m=kh.util.createBuffer(h);return h=new Array(4),h[0]=m.getInt32(),h[1]=m.getInt32(),h[2]=m.getInt32(),h[3]=m.getInt32(),h},e.cipher=function(h,m){return kh.aes._updateBlock(h,m,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},e.increment=function(h){return++h[3],h},e.md=kh.md.sha256;function o(){var h=kh.prng.create(e);return h.getBytes=function(m,g){return h.generate(m,g)},h.getBytesSync=function(m){return h.generate(m)},h}a(o,"spawnPrng");var s=o(),c=null,l=kh.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(c=a(function(h){return u.getRandomValues(h)},"getRandomValues")),kh.options.usePureJavaScript||!kh.util.isNodejs&&!c){if(typeof window>"u"||window.document,s.collectInt(+new Date,32),typeof navigator<"u"){var d="";for(var p in navigator)try{typeof navigator[p]=="string"&&(d+=navigator[p])}catch{}s.collect(d),d=null}t&&(t().mousemove(function(h){s.collectInt(h.clientX,16),s.collectInt(h.clientY,16)}),t().keypress(function(h){s.collectInt(h.charCode,8)}))}if(!kh.random)kh.random=s;else for(var p in s)kh.random[p]=s[p];kh.random.createInstance=o,K9t.exports=kh.random})(typeof jQuery<"u"?jQuery:null)})()});var X9t=T((oBu,Yfn)=>{f();var kC=No();Ea();var J9t=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],Wfn=[1,2,3,5],ZNo=a(function(t,e){return t<>16-e},"rol"),eDo=a(function(t,e){return(t&65535)>>e|t<<16-e&65535},"ror");Yfn.exports=kC.rc2=kC.rc2||{};kC.rc2.expandKey=function(t,e){typeof t=="string"&&(t=kC.util.createBuffer(t)),e=e||128;var r=t,n=t.length(),o=e,s=Math.ceil(o/8),c=255>>(o&7),l;for(l=n;l<128;l++)r.putByte(J9t[r.at(l-1)+r.at(l-n)&255]);for(r.setAt(128-s,J9t[r.at(128-s)&c]),l=127-s;l>=0;l--)r.setAt(l,J9t[r.at(l+1)^r.at(l+s)]);return r};var zfn=a(function(t,e,r){var n=!1,o=null,s=null,c=null,l,u,d,p,h=[];for(t=kC.rc2.expandKey(t,e),d=0;d<64;d++)h.push(t.getInt16Le());r?(l=a(function(A){for(d=0;d<4;d++)A[d]+=h[p]+(A[(d+3)%4]&A[(d+2)%4])+(~A[(d+3)%4]&A[(d+1)%4]),A[d]=ZNo(A[d],Wfn[d]),p++},"mixRound"),u=a(function(A){for(d=0;d<4;d++)A[d]+=h[A[(d+3)%4]&63]},"mashRound")):(l=a(function(A){for(d=3;d>=0;d--)A[d]=eDo(A[d],Wfn[d]),A[d]-=h[p]+(A[(d+3)%4]&A[(d+2)%4])+(~A[(d+3)%4]&A[(d+1)%4]),p--},"mixRound"),u=a(function(A){for(d=3;d>=0;d--)A[d]-=h[A[(d+3)%4]&63]},"mashRound"));var m=a(function(A){var y=[];for(d=0;d<4;d++){var E=o.getInt16Le();c!==null&&(r?E^=c.getInt16Le():c.putInt16Le(E)),y.push(E&65535)}p=r?0:63;for(var _=0;_=8;)m([[5,l],[1,u],[6,l],[1,u],[5,l]])},"update"),finish:a(function(A){var y=!0;if(r)if(A)y=A(8,o,!r);else{var E=o.length()===8?8:8-o.length();o.fillWithByte(E,E)}if(y&&(n=!0,g.update()),!r&&(y=o.length()===0,y))if(A)y=A(8,s,!r);else{var _=s.length(),v=s.at(_-1);v>_?y=!1:s.truncate(v)}return y},"finish")},g},"createCipher");kC.rc2.startEncrypting=function(t,e,r){var n=kC.rc2.createEncryptionCipher(t,128);return n.start(e,r),n};kC.rc2.createEncryptionCipher=function(t,e){return zfn(t,e,!0)};kC.rc2.startDecrypting=function(t,e,r){var n=kC.rc2.createDecryptionCipher(t,128);return n.start(e,r),n};kC.rc2.createDecryptionCipher=function(t,e){return zfn(t,e,!1)}});var Ive=T((cBu,n0n)=>{f();var Z9t=No();n0n.exports=Z9t.jsbn=Z9t.jsbn||{};var g4,tDo=0xdeadbeefcafe,Kfn=(tDo&16777215)==15715070;function Ft(t,e,r){this.data=[],t!=null&&(typeof t=="number"?this.fromNumber(t,e,r):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}a(Ft,"BigInteger");Z9t.jsbn.BigInteger=Ft;function oa(){return new Ft(null)}a(oa,"nbi");function rDo(t,e,r,n,o,s){for(;--s>=0;){var c=e*this.data[t++]+r.data[n]+o;o=Math.floor(c/67108864),r.data[n++]=c&67108863}return o}a(rDo,"am1");function nDo(t,e,r,n,o,s){for(var c=e&32767,l=e>>15;--s>=0;){var u=this.data[t]&32767,d=this.data[t++]>>15,p=l*u+d*c;u=c*u+((p&32767)<<15)+r.data[n]+(o&1073741823),o=(u>>>30)+(p>>>15)+l*d+(o>>>30),r.data[n++]=u&1073741823}return o}a(nDo,"am2");function Jfn(t,e,r,n,o,s){for(var c=e&16383,l=e>>14;--s>=0;){var u=this.data[t]&16383,d=this.data[t++]>>14,p=l*u+d*c;u=c*u+((p&16383)<<14)+r.data[n]+o,o=(u>>28)+(p>>14)+l*d,r.data[n++]=u&268435455}return o}a(Jfn,"am3");typeof navigator>"u"?(Ft.prototype.am=Jfn,g4=28):Kfn&&navigator.appName=="Microsoft Internet Explorer"?(Ft.prototype.am=nDo,g4=30):Kfn&&navigator.appName!="Netscape"?(Ft.prototype.am=rDo,g4=26):(Ft.prototype.am=Jfn,g4=28);Ft.prototype.DB=g4;Ft.prototype.DM=(1<=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s}a(oDo,"bnpCopyTo");function sDo(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0}a(sDo,"bnpFromInt");function R9(t){var e=oa();return e.fromInt(t),e}a(R9,"nbv");function aDo(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==256)r=8;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else{this.fromRadix(t,e);return}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var c=r==8?t[n]&255:Zfn(t,n);if(c<0){t.charAt(n)=="-"&&(o=!0);continue}o=!1,s==0?this.data[this.t++]=c:s+r>this.DB?(this.data[this.t-1]|=(c&(1<>this.DB-s):this.data[this.t-1]|=c<=this.DB&&(s-=this.DB)}r==8&&(t[0]&128)!=0&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t}a(cDo,"bnpClamp");function lDo(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var r=(1<0)for(l>l)>0&&(o=!0,s=Xfn(n));c>=0;)l>(l+=this.DB-e)):(n=this.data[c]>>(l-=e)&r,l<=0&&(l+=this.DB,--c)),n>0&&(o=!0),o&&(s+=Xfn(n));return o?s:"0"}a(lDo,"bnToString");function uDo(){var t=oa();return Ft.ZERO.subTo(this,t),t}a(uDo,"bnNegate");function dDo(){return this.s<0?this.negate():this}a(dDo,"bnAbs");function fDo(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this.data[r]-t.data[r])!=0)return e;return 0}a(fDo,"bnCompareTo");function _We(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}a(_We,"nbits");function pDo(){return this.t<=0?0:this.DB*(this.t-1)+_We(this.data[this.t-1]^this.s&this.DM)}a(pDo,"bnBitLength");function hDo(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s}a(hDo,"bnpDLShiftTo");function mDo(t,e){for(var r=t;r=0;--l)e.data[l+s+1]=this.data[l]>>n|c,c=(this.data[l]&o)<=0;--l)e.data[l]=0;e.data[s]=c,e.t=this.t+s+1,e.s=this.s,e.clamp()}a(gDo,"bnpLShiftTo");function ADo(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,o=this.DB-n,s=(1<>n;for(var c=r+1;c>n;n>0&&(e.data[this.t-r-1]|=(this.s&s)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()}a(yDo,"bnpSubTo");function EDo(t,e){var r=this.abs(),n=t.abs(),o=r.t;for(e.t=o+n.t;--o>=0;)e.data[o]=0;for(o=0;o=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()}a(CDo,"bnpSquareTo");function _Do(t,e,r){var n=t.abs();if(!(n.t<=0)){var o=this.abs();if(o.t0?(n.lShiftTo(u,s),o.lShiftTo(u,r)):(n.copyTo(s),o.copyTo(r));var d=s.t,p=s.data[d-1];if(p!=0){var h=p*(1<1?s.data[d-2]>>this.F2:0),m=this.FV/h,g=(1<=0&&(r.data[r.t++]=1,r.subTo(_,r)),Ft.ONE.dlShiftTo(d,_),_.subTo(s,s);s.t=0;){var v=r.data[--y]==p?this.DM:Math.floor(r.data[y]*m+(r.data[y-1]+A)*g);if((r.data[y]+=s.am(0,v,r,E,0,d))0&&r.rShiftTo(u,r),c<0&&Ft.ZERO.subTo(r,r)}}}a(_Do,"bnpDivRemTo");function vDo(t){var e=oa();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ft.ZERO)>0&&t.subTo(e,e),e}a(vDo,"bnMod");function JV(t){this.m=t}a(JV,"Classic");function bDo(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}a(bDo,"cConvert");function TDo(t){return t}a(TDo,"cRevert");function SDo(t){t.divRemTo(this.m,null,t)}a(SDo,"cReduce");function IDo(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(IDo,"cMulTo");function xDo(t,e){t.squareTo(e),this.reduce(e)}a(xDo,"cSqrTo");JV.prototype.convert=bDo;JV.prototype.revert=TDo;JV.prototype.reduce=SDo;JV.prototype.mulTo=IDo;JV.prototype.sqrTo=xDo;function wDo(){if(this.t<1)return 0;var t=this.data[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}a(wDo,"bnpInvDigit");function XV(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}a(RDo,"montConvert");function PDo(t){var e=oa();return t.copyTo(e),this.reduce(e),e}a(PDo,"montRevert");function kDo(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}a(kDo,"montReduce");function NDo(t,e){t.squareTo(e),this.reduce(e)}a(NDo,"montSqrTo");function DDo(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(DDo,"montMulTo");XV.prototype.convert=RDo;XV.prototype.revert=PDo;XV.prototype.reduce=kDo;XV.prototype.mulTo=DDo;XV.prototype.sqrTo=NDo;function MDo(){return(this.t>0?this.data[0]&1:this.s)==0}a(MDo,"bnpIsEven");function ODo(t,e){if(t>4294967295||t<1)return Ft.ONE;var r=oa(),n=oa(),o=e.convert(this),s=_We(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,o,r);else{var c=r;r=n,n=c}return e.revert(r)}a(ODo,"bnpExp");function BDo(t,e){var r;return t<256||e.isEven()?r=new JV(e):r=new XV(e),this.exp(t,r)}a(BDo,"bnModPowInt");Ft.prototype.copyTo=oDo;Ft.prototype.fromInt=sDo;Ft.prototype.fromString=aDo;Ft.prototype.clamp=cDo;Ft.prototype.dlShiftTo=hDo;Ft.prototype.drShiftTo=mDo;Ft.prototype.lShiftTo=gDo;Ft.prototype.rShiftTo=ADo;Ft.prototype.subTo=yDo;Ft.prototype.multiplyTo=EDo;Ft.prototype.squareTo=CDo;Ft.prototype.divRemTo=_Do;Ft.prototype.invDigit=wDo;Ft.prototype.isEven=MDo;Ft.prototype.exp=ODo;Ft.prototype.toString=lDo;Ft.prototype.negate=uDo;Ft.prototype.abs=dDo;Ft.prototype.compareTo=fDo;Ft.prototype.bitLength=pDo;Ft.prototype.mod=vDo;Ft.prototype.modPowInt=BDo;Ft.ZERO=R9(0);Ft.ONE=R9(1);function LDo(){var t=oa();return this.copyTo(t),t}a(LDo,"bnClone");function FDo(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<>24}a(UDo,"bnByteValue");function QDo(){return this.t==0?this.s:this.data[0]<<16>>16}a(QDo,"bnShortValue");function qDo(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}a(qDo,"bnpChunkSize");function GDo(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}a(GDo,"bnSigNum");function HDo(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=R9(r),o=oa(),s=oa(),c="";for(this.divRemTo(n,o,s);o.signum()>0;)c=(r+s.intValue()).toString(t).substr(1)+c,o.divRemTo(n,o,s);return s.intValue().toString(t)+c}a(HDo,"bnpToRadix");function jDo(t,e){this.fromInt(0),e==null&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),o=!1,s=0,c=0,l=0;l=r&&(this.dMultiply(n),this.dAddOffset(c,0),s=0,c=0)}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(c,0)),o&&Ft.ZERO.subTo(this,this)}a(jDo,"bnpFromRadix");function $Do(t,e,r){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(Ft.ONE.shiftLeft(t-1),t7t,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Ft.ONE.shiftLeft(t-1),this);else{var n=new Array,o=t&7;n.length=(t>>3)+1,e.nextBytes(n),o>0?n[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(e[o++]=n|this.s<=0;)r<8?(n=(this.data[t]&(1<>(r+=this.DB-8)):(n=this.data[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),(n&128)!=0&&(n|=-256),o==0&&(this.s&128)!=(n&128)&&++o,(o>0||n!=this.s)&&(e[o++]=n);return e}a(VDo,"bnToByteArray");function WDo(t){return this.compareTo(t)==0}a(WDo,"bnEquals");function zDo(t){return this.compareTo(t)<0?this:t}a(zDo,"bnMin");function YDo(t){return this.compareTo(t)>0?this:t}a(YDo,"bnMax");function KDo(t,e,r){var n,o,s=Math.min(t.t,this.t);for(n=0;n>=16,e+=16),(t&255)==0&&(t>>=8,e+=8),(t&15)==0&&(t>>=4,e+=4),(t&3)==0&&(t>>=2,e+=2),(t&1)==0&&++e,e}a(o5o,"lbit");function s5o(){for(var t=0;t=this.t?this.s!=0:(this.data[e]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()}a(h5o,"bnpAddTo");function m5o(t){var e=oa();return this.addTo(t,e),e}a(m5o,"bnAdd");function g5o(t){var e=oa();return this.subTo(t,e),e}a(g5o,"bnSubtract");function A5o(t){var e=oa();return this.multiplyTo(t,e),e}a(A5o,"bnMultiply");function y5o(){var t=oa();return this.squareTo(t),t}a(y5o,"bnSquare");function E5o(t){var e=oa();return this.divRemTo(t,e,null),e}a(E5o,"bnDivide");function C5o(t){var e=oa();return this.divRemTo(t,null,e),e}a(C5o,"bnRemainder");function _5o(t){var e=oa(),r=oa();return this.divRemTo(t,e,r),new Array(e,r)}a(_5o,"bnDivideAndRemainder");function v5o(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}a(v5o,"bnpDMultiply");function b5o(t,e){if(t!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}a(b5o,"bnpDAddOffset");function Sve(){}a(Sve,"NullExp");function r0n(t){return t}a(r0n,"nNop");function T5o(t,e,r){t.multiplyTo(e,r)}a(T5o,"nMulTo");function S5o(t,e){t.squareTo(e)}a(S5o,"nSqrTo");Sve.prototype.convert=r0n;Sve.prototype.revert=r0n;Sve.prototype.mulTo=T5o;Sve.prototype.sqrTo=S5o;function I5o(t){return this.exp(t,new Sve)}a(I5o,"bnPow");function x5o(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var o;for(o=r.t-this.t;n=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=oa();return t.copyTo(e),this.reduce(e),e}a(R5o,"barrettConvert");function P5o(t){return t}a(P5o,"barrettRevert");function k5o(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}a(k5o,"barrettReduce");function N5o(t,e){t.squareTo(e),this.reduce(e)}a(N5o,"barrettSqrTo");function D5o(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(D5o,"barrettMulTo");Sse.prototype.convert=R5o;Sse.prototype.revert=P5o;Sse.prototype.reduce=k5o;Sse.prototype.mulTo=D5o;Sse.prototype.sqrTo=N5o;function M5o(t,e){var r=t.bitLength(),n,o=R9(1),s;if(r<=0)return o;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?s=new JV(e):e.isEven()?s=new Sse(e):s=new XV(e);var c=new Array,l=3,u=n-1,d=(1<1){var p=oa();for(s.sqrTo(c[1],p);l<=d;)c[l]=oa(),s.mulTo(p,c[l-2],c[l]),l+=2}var h=t.t-1,m,g=!0,A=oa(),y;for(r=_We(t.data[h])-1;h>=0;){for(r>=u?m=t.data[h]>>r-u&d:(m=(t.data[h]&(1<0&&(m|=t.data[h-1]>>this.DB+r-u)),l=n;(m&1)==0;)m>>=1,--l;if((r-=l)<0&&(r+=this.DB,--h),g)c[m].copyTo(o),g=!1;else{for(;l>1;)s.sqrTo(o,A),s.sqrTo(A,o),l-=2;l>0?s.sqrTo(o,A):(y=o,o=A,A=y),s.mulTo(A,c[m],o)}for(;h>=0&&(t.data[h]&1<0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r}a(O5o,"bnGCD");function B5o(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(e==0)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r}a(B5o,"bnpModInt");function L5o(t){if(this.signum()==0)return Ft.ZERO;var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return Ft.ZERO;for(var r=t.clone(),n=this.clone(),o=R9(1),s=R9(0),c=R9(0),l=R9(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),e?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),e?((!c.isEven()||!l.isEven())&&(c.addTo(this,c),l.subTo(t,l)),c.rShiftTo(1,c)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);r.compareTo(n)>=0?(r.subTo(n,r),e&&o.subTo(c,o),s.subTo(l,s)):(n.subTo(r,n),e&&c.subTo(o,c),l.subTo(s,l))}if(n.compareTo(Ft.ONE)!=0)return Ft.ZERO;if(l.compareTo(t)>=0)return l.subtract(t);if(l.signum()<0)l.addTo(t,l);else return l;return l.signum()<0?l.add(t):l}a(L5o,"bnModInverse");var ww=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],F5o=(1<<26)/ww[ww.length-1];function U5o(t){var e,r=this.abs();if(r.t==1&&r.data[0]<=ww[ww.length-1]){for(e=0;e=0);var l=s.modPow(n,this);if(l.compareTo(Ft.ONE)!=0&&l.compareTo(e)!=0){for(var u=1;u++{f();var hN=No();lN();Ea();var o0n=a0n.exports=hN.sha1=hN.sha1||{};hN.md.sha1=hN.md.algorithms.sha1=o0n;o0n.create=function(){s0n||G5o();var t=null,e=hN.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),i0n(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=hN.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(r7t.substr(0,n.blockLength-c));for(var l,u,d=n.fullMessageLength[0]*8,p=0;p>>0,d+=u,o.putInt32(d>>>0),d=l>>>0;o.putInt32(d);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};i0n(h,r,o);var m=hN.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m},n};var r7t=null,s0n=!1;function G5o(){r7t="\x80",r7t+=hN.util.fillString("\0",64),s0n=!0}a(G5o,"_init");function i0n(t,e,r){for(var n,o,s,c,l,u,d,p,h=r.length();h>=64;){for(o=t.h0,s=t.h1,c=t.h2,l=t.h3,u=t.h4,p=0;p<16;++p)n=r.getInt32(),e[p]=n,d=l^s&(c^l),n=(o<<5|o>>>27)+d+u+1518500249+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<20;++p)n=e[p-3]^e[p-8]^e[p-14]^e[p-16],n=n<<1|n>>>31,e[p]=n,d=l^s&(c^l),n=(o<<5|o>>>27)+d+u+1518500249+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<32;++p)n=e[p-3]^e[p-8]^e[p-14]^e[p-16],n=n<<1|n>>>31,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+1859775393+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<40;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+1859775393+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<60;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s&c|l&(s^c),n=(o<<5|o>>>27)+d+u+2400959708+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<80;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+3395469782+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;t.h0=t.h0+o|0,t.h1=t.h1+s|0,t.h2=t.h2+c|0,t.h3=t.h3+l|0,t.h4=t.h4+u|0,h-=64}}a(i0n,"_update")});var n7t=T((hBu,l0n)=>{f();var mN=No();Ea();uS();Ise();var c0n=l0n.exports=mN.pkcs1=mN.pkcs1||{};c0n.encode_rsa_oaep=function(t,e,r){var n,o,s,c;typeof r=="string"?(n=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(n=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),s?s.start():s=mN.md.sha1.create(),c||(c=s);var l=Math.ceil(t.n.bitLength()/8),u=l-2*s.digestLength-2;if(e.length>u){var d=new Error("RSAES-OAEP input message length is too long.");throw d.length=e.length,d.maxLength=u,d}n||(n=""),s.update(n,"raw");for(var p=s.digest(),h="",m=u-e.length,g=0;g>24&255,s>>16&255,s>>8&255,s&255);r.start(),r.update(t+c),n+=r.digest().getBytes()}return n.substring(0,e)}a(vWe,"rsa_mgf1")});var o7t=T((ABu,i7t)=>{f();var P9=No();Ea();Ive();uS();(function(){if(P9.prime){i7t.exports=P9.prime;return}var t=i7t.exports=P9.prime=P9.prime||{},e=P9.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var o=a(function(h,m){return h|m},"op_or");t.generateProbablePrime=function(h,m,g){typeof m=="function"&&(g=m,m={}),m=m||{};var A=m.algorithm||"PRIMEINC";typeof A=="string"&&(A={name:A}),A.options=A.options||{};var y=m.prng||P9.random,E={nextBytes:a(function(_){for(var v=y.getBytesSync(_.length),b=0;b<_.length;++b)_[b]=v.charCodeAt(b)},"nextBytes")};if(A.name==="PRIMEINC")return s(h,E,A.options,g);throw new Error("Invalid prime generation algorithm: "+A.name)};function s(h,m,g,A){return"workers"in g?u(h,m,g,A):c(h,m,g,A)}a(s,"primeincFindPrime");function c(h,m,g,A){var y=d(h,m),E=0,_=p(y.bitLength());"millerRabinTests"in g&&(_=g.millerRabinTests);var v=10;"maxBlockTime"in g&&(v=g.maxBlockTime),l(y,h,m,E,_,v,A)}a(c,"primeincFindPrimeWithoutWorkers");function l(h,m,g,A,y,E,_){var v=+new Date;do{if(h.bitLength()>m&&(h=d(m,g)),h.isProbablePrime(y))return _(null,h);h.dAddOffset(r[A++%8],0)}while(E<0||+new Date-v"u")return c(h,m,g,A);var y=d(h,m),E=g.workers,_=g.workLoad||100,v=_*30/8,b=g.workerScript||"forge/prime.worker.js";if(E===-1)return P9.util.estimateCores(function(x,R){x&&(R=2),E=R-1,I()});I();function I(){E=Math.max(1,E);for(var x=[],R=0;Rh&&(y=d(h,m));var G=y.toString(16);Q.target.postMessage({hex:G,workLoad:_}),y.dAddOffset(v,0)}}a(k,"workerMessage")}a(I,"generate")}a(u,"primeincFindPrimeWithWorkers");function d(h,m){var g=new e(h,m),A=h-1;return g.testBit(A)||g.bitwiseTo(e.ONE.shiftLeft(A),o,g),g.dAddOffset(31-g.mod(n).byteValue(),0),g}a(d,"generateRandom");function p(h){return h<=100?27:h<=150?18:h<=200?15:h<=250?12:h<=300?9:h<=350?8:h<=400?7:h<=500?6:h<=600?5:h<=800?4:h<=1250?3:2}a(p,"getMillerRabinTests")})()});var xve=T((CBu,g0n)=>{f();var zn=No();xw();Ive();w9();n7t();o7t();uS();Ea();typeof sa>"u"&&(sa=zn.jsbn.BigInteger);var sa,s7t=zn.util.isNodejs?require("crypto"):null,nt=zn.asn1,fS=zn.util;zn.pki=zn.pki||{};g0n.exports=zn.pki.rsa=zn.rsa=zn.rsa||{};var ao=zn.pki,H5o=[6,4,2,4,2,4,6,2],j5o={name:"PrivateKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},$5o={name:"RSAPrivateKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},V5o={name:"RSAPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},W5o=zn.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},z5o={name:"DigestInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:nt.Class.UNIVERSAL,type:nt.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},Y5o=a(function(t){var e;if(t.algorithm in ao.oids)e=ao.oids[t.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}var n=nt.oidToDer(e).getBytes(),o=nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[]),s=nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[]);s.value.push(nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,n)),s.value.push(nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,""));var c=nt.create(nt.Class.UNIVERSAL,nt.Type.OCTETSTRING,!1,t.digest().getBytes());return o.value.push(s),o.value.push(c),nt.toDer(o).getBytes()},"emsaPkcs1v15encode"),h0n=a(function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(sa.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(sa.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new sa(zn.util.bytesToHex(zn.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(sa.ONE));t=t.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var o=t.mod(e.p).modPow(e.dP,e.p),s=t.mod(e.q).modPow(e.dQ,e.q);o.compareTo(s)<0;)o=o.add(e.p);var c=o.subtract(s).multiply(e.qInv).mod(e.p).multiply(e.q).add(s);return c=c.multiply(n.modInverse(e.n)).mod(e.n),c},"_modPow");ao.rsa.encrypt=function(t,e,r){var n=r,o,s=Math.ceil(e.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,o=m0n(t,e,r)):(o=zn.util.createBuffer(),o.putBytes(t));for(var c=new sa(o.toHex(),16),l=h0n(c,e,n),u=l.toString(16),d=zn.util.createBuffer(),p=s-Math.ceil(u.length/2);p>0;)d.putByte(0),--p;return d.putBytes(zn.util.hexToBytes(u)),d.getBytes()};ao.rsa.decrypt=function(t,e,r,n){var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=t.length,s.expected=o,s}var c=new sa(zn.util.createBuffer(t).toHex(),16);if(c.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=h0n(c,e,r),u=l.toString(16),d=zn.util.createBuffer(),p=o-Math.ceil(u.length/2);p>0;)d.putByte(0),--p;return d.putBytes(zn.util.hexToBytes(u)),n!==!1?bWe(d.getBytes(),e,r):d.getBytes()};ao.rsa.createKeyPairGenerationState=function(t,e,r){typeof t=="string"&&(t=parseInt(t,10)),t=t||2048,r=r||{};var n=r.prng||zn.random,o={nextBytes:a(function(l){for(var u=n.getBytesSync(l.length),d=0;d>1,pBits:t-(t>>1),pqState:0,num:null,keys:null},c.e.fromInt(c.eInt);else throw new Error("Invalid key generation algorithm: "+s);return c};ao.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new sa(null);r.fromInt(30);for(var n=0,o=a(function(h,m){return h|m},"op_or"),s=+new Date,c,l=0;t.keys===null&&(e<=0||lu?t.pqState=0:t.num.isProbablePrime(J5o(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(H5o[n++%8],0):t.pqState===2?t.pqState=t.num.subtract(sa.ONE).gcd(t.e).compareTo(sa.ONE)===0?3:0:t.pqState===3&&(t.pqState=0,t.p===null?t.p=t.num:t.q=t.num,t.p!==null&&t.q!==null&&++t.state,t.num=null)}else if(t.state===1)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(t.state===2)t.p1=t.p.subtract(sa.ONE),t.q1=t.q.subtract(sa.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(t.state===3)t.phi.gcd(t.e).compareTo(sa.ONE)===0?++t.state:(t.p=null,t.q=null,t.state=0);else if(t.state===4)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(t.state===5){var p=t.e.modInverse(t.phi);t.keys={privateKey:ao.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:ao.rsa.setPublicKey(t.n,t.e)}}c=+new Date,l+=c-s,s=c}return t.keys!==null};ao.rsa.generateKeyPair=function(t,e,r,n){if(arguments.length===1?typeof t=="object"?(r=t,t=void 0):typeof t=="function"&&(n=t,t=void 0):arguments.length===2?typeof t=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(r=e,e=void 0):(r=t,n=e,t=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=e,e=void 0)),r=r||{},t===void 0&&(t=r.bits||2048),e===void 0&&(e=r.e||65537),!zn.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(e===65537||e===3)){if(n){if(u0n("generateKeyPair"))return s7t.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(l,u,d){if(l)return n(l);n(null,{privateKey:ao.privateKeyFromPem(d),publicKey:ao.publicKeyFromPem(u)})});if(d0n("generateKey")&&d0n("exportKey"))return fS.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:p0n(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(l){return fS.globalScope.crypto.subtle.exportKey("pkcs8",l.privateKey)}).then(void 0,function(l){n(l)}).then(function(l){if(l){var u=ao.privateKeyFromAsn1(nt.fromDer(zn.util.createBuffer(l)));n(null,{privateKey:u,publicKey:ao.setRsaPublicKey(u.n,u.e)})}});if(f0n("generateKey")&&f0n("exportKey")){var o=fS.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:p0n(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);o.oncomplete=function(l){var u=l.target.result,d=fS.globalScope.msCrypto.subtle.exportKey("pkcs8",u.privateKey);d.oncomplete=function(p){var h=p.target.result,m=ao.privateKeyFromAsn1(nt.fromDer(zn.util.createBuffer(h)));n(null,{privateKey:m,publicKey:ao.setRsaPublicKey(m.n,m.e)})},d.onerror=function(p){n(p)}},o.onerror=function(l){n(l)};return}}else if(u0n("generateKeyPairSync")){var s=s7t.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:ao.privateKeyFromPem(s.privateKey),publicKey:ao.publicKeyFromPem(s.publicKey)}}}var c=ao.rsa.createKeyPairGenerationState(t,e,r);if(!n)return ao.rsa.stepKeyPairGenerationState(c,0),c.keys;K5o(c,r,n)};ao.setRsaPublicKey=ao.rsa.setPublicKey=function(t,e){var r={n:t,e};return r.encrypt=function(n,o,s){if(typeof o=="string"?o=o.toUpperCase():o===void 0&&(o="RSAES-PKCS1-V1_5"),o==="RSAES-PKCS1-V1_5")o={encode:a(function(l,u,d){return m0n(l,u,2).getBytes()},"encode")};else if(o==="RSA-OAEP"||o==="RSAES-OAEP")o={encode:a(function(l,u){return zn.pkcs1.encode_rsa_oaep(u,l,s)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(o)!==-1)o={encode:a(function(l){return l},"encode")};else if(typeof o=="string")throw new Error('Unsupported encryption scheme: "'+o+'".');var c=o.encode(n,r,!0);return ao.rsa.encrypt(c,r,!0)},r.verify=function(n,o,s,c){typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSASSA-PKCS1-V1_5"),c===void 0&&(c={_parseAllDigestBytes:!0,_skipPaddingChecks:!1}),"_parseAllDigestBytes"in c||(c._parseAllDigestBytes=!0),"_skipPaddingChecks"in c||(c._skipPaddingChecks=!1),s==="RSASSA-PKCS1-V1_5"?s={verify:a(function(u,d){d=bWe(d,r,!0,void 0,c);var p=nt.fromDer(d,{parseAllBytes:c._parseAllDigestBytes}),h={},m=[];if(!nt.validate(p,z5o,h,m)||p.value.length!==2){var g=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw g.errors=m,g}var A=nt.derToOid(h.algorithmIdentifier);if(!(A===zn.oids.md2||A===zn.oids.md5||A===zn.oids.sha1||A===zn.oids.sha224||A===zn.oids.sha256||A===zn.oids.sha384||A===zn.oids.sha512||A===zn.oids["sha512-224"]||A===zn.oids["sha512-256"])){var g=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw g.oid=A,g}if((A===zn.oids.md2||A===zn.oids.md5)&&!("parameters"in h))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return u===h.digest},"verify")}:(s==="NONE"||s==="NULL"||s===null)&&(s={verify:a(function(u,d){return d=bWe(d,r,!0,void 0,c),u===d},"verify")});var l=ao.rsa.decrypt(o,r,!0,!1);return s.verify(n,l,r.n.bitLength())},r};ao.setRsaPrivateKey=ao.rsa.setPrivateKey=function(t,e,r,n,o,s,c,l){var u={n:t,e,d:r,p:n,q:o,dP:s,dQ:c,qInv:l};return u.decrypt=function(d,p,h){typeof p=="string"?p=p.toUpperCase():p===void 0&&(p="RSAES-PKCS1-V1_5");var m=ao.rsa.decrypt(d,u,!1,!1);if(p==="RSAES-PKCS1-V1_5")p={decode:bWe};else if(p==="RSA-OAEP"||p==="RSAES-OAEP")p={decode:a(function(g,A){return zn.pkcs1.decode_rsa_oaep(A,g,h)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(p)!==-1)p={decode:a(function(g){return g},"decode")};else throw new Error('Unsupported encryption scheme: "'+p+'".');return p.decode(m,u,!1)},u.sign=function(d,p){var h=!1;typeof p=="string"&&(p=p.toUpperCase()),p===void 0||p==="RSASSA-PKCS1-V1_5"?(p={encode:Y5o},h=1):(p==="NONE"||p==="NULL"||p===null)&&(p={encode:a(function(){return d},"encode")},h=1);var m=p.encode(d,u.n.bitLength());return ao.rsa.encrypt(m,u,h)},u};ao.wrapRsaPrivateKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,nt.integerToDer(0).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,nt.oidToDer(ao.oids.rsaEncryption).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,"")]),nt.create(nt.Class.UNIVERSAL,nt.Type.OCTETSTRING,!1,nt.toDer(t).getBytes())])};ao.privateKeyFromAsn1=function(t){var e={},r=[];if(nt.validate(t,j5o,e,r)&&(t=nt.fromDer(zn.util.createBuffer(e.privateKey))),e={},r=[],!nt.validate(t,$5o,e,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var o,s,c,l,u,d,p,h;return o=zn.util.createBuffer(e.privateKeyModulus).toHex(),s=zn.util.createBuffer(e.privateKeyPublicExponent).toHex(),c=zn.util.createBuffer(e.privateKeyPrivateExponent).toHex(),l=zn.util.createBuffer(e.privateKeyPrime1).toHex(),u=zn.util.createBuffer(e.privateKeyPrime2).toHex(),d=zn.util.createBuffer(e.privateKeyExponent1).toHex(),p=zn.util.createBuffer(e.privateKeyExponent2).toHex(),h=zn.util.createBuffer(e.privateKeyCoefficient).toHex(),ao.setRsaPrivateKey(new sa(o,16),new sa(s,16),new sa(c,16),new sa(l,16),new sa(u,16),new sa(d,16),new sa(p,16),new sa(h,16))};ao.privateKeyToAsn1=ao.privateKeyToRSAPrivateKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,nt.integerToDer(0).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.n)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.e)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.d)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.p)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.q)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.dP)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.dQ)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.qInv))])};ao.publicKeyFromAsn1=function(t){var e={},r=[];if(nt.validate(t,W5o,e,r)){var n=nt.derToOid(e.publicKeyOid);if(n!==ao.oids.rsaEncryption){var o=new Error("Cannot read public key. Unknown OID.");throw o.oid=n,o}t=e.rsaPublicKey}if(r=[],!nt.validate(t,V5o,e,r)){var o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw o.errors=r,o}var s=zn.util.createBuffer(e.publicKeyModulus).toHex(),c=zn.util.createBuffer(e.publicKeyExponent).toHex();return ao.setRsaPublicKey(new sa(s,16),new sa(c,16))};ao.publicKeyToAsn1=ao.publicKeyToSubjectPublicKeyInfo=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,nt.oidToDer(ao.oids.rsaEncryption).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,"")]),nt.create(nt.Class.UNIVERSAL,nt.Type.BITSTRING,!1,[ao.publicKeyToRSAPublicKey(t)])])};ao.publicKeyToRSAPublicKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.n)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,gN(t.e))])};function m0n(t,e,r){var n=zn.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=o-11,s}n.putByte(0),n.putByte(r);var c=o-3-t.length,l;if(r===0||r===1){l=r===0?0:255;for(var u=0;u0;){for(var d=0,p=zn.random.getBytes(c),u=0;u"u")throw new Error("Encryption block is invalid.");var d=0;if(u===0){d=s-3-n;for(var p=0;p1;){if(c.getByte()!==255){--c.read;break}++d}if(d<8&&!(o&&o._skipPaddingChecks))throw new Error("Encryption block is invalid.")}else if(u===2){for(d=0;c.length()>1;){if(c.getByte()===0){--c.read;break}++d}if(d<8&&!(o&&o._skipPaddingChecks))throw new Error("Encryption block is invalid.")}var h=c.getByte();if(h!==0||d!==s-3-c.length())throw new Error("Encryption block is invalid.");return c.getBytes()}a(bWe,"_decodePkcs1_v1_5");function K5o(t,e,r){typeof e=="function"&&(r=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),o();function o(){s(t.pBits,function(l,u){if(l)return r(l);if(t.p=u,t.q!==null)return c(l,t.q);s(t.qBits,c)})}a(o,"generate");function s(l,u){zn.prime.generateProbablePrime(l,n,u)}a(s,"getPrime");function c(l,u){if(l)return r(l);if(t.q=u,t.p.compareTo(t.q)<0){var d=t.p;t.p=t.q,t.q=d}if(t.p.subtract(sa.ONE).gcd(t.e).compareTo(sa.ONE)!==0){t.p=null,o();return}if(t.q.subtract(sa.ONE).gcd(t.e).compareTo(sa.ONE)!==0){t.q=null,s(t.qBits,c);return}if(t.p1=t.p.subtract(sa.ONE),t.q1=t.q.subtract(sa.ONE),t.phi=t.p1.multiply(t.q1),t.phi.gcd(t.e).compareTo(sa.ONE)!==0){t.p=t.q=null,o();return}if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits){t.q=null,s(t.qBits,c);return}var p=t.e.modInverse(t.phi);t.keys={privateKey:ao.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:ao.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}a(c,"finish")}a(K5o,"_generateKeyPair");function gN(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=zn.util.hexToBytes(e);return r.length>1&&(r.charCodeAt(0)===0&&(r.charCodeAt(1)&128)===0||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}a(gN,"_bnToBytes");function J5o(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}a(J5o,"_getMillerRabinTests");function u0n(t){return zn.util.isNodejs&&typeof s7t[t]=="function"}a(u0n,"_detectNodeCrypto");function d0n(t){return typeof fS.globalScope<"u"&&typeof fS.globalScope.crypto=="object"&&typeof fS.globalScope.crypto.subtle=="object"&&typeof fS.globalScope.crypto.subtle[t]=="function"}a(d0n,"_detectSubtleCrypto");function f0n(t){return typeof fS.globalScope<"u"&&typeof fS.globalScope.msCrypto=="object"&&typeof fS.globalScope.msCrypto.subtle=="object"&&typeof fS.globalScope.msCrypto.subtle[t]=="function"}a(f0n,"_detectSubtleMsCrypto");function p0n(t){for(var e=zn.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n{f();var tn=No();x9();xw();Tve();lN();w9();yWe();KV();uS();X9t();xve();Ea();typeof A0n>"u"&&(A0n=tn.jsbn.BigInteger);var A0n,Tt=tn.asn1,So=tn.pki=tn.pki||{};_0n.exports=So.pbe=tn.pbe=tn.pbe||{};var ZV=So.oids,X5o={name:"EncryptedPrivateKeyInfo",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Z5o={name:"PBES2Algorithms",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},eMo={name:"pkcs-12PbeParams",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Tt.Class.UNIVERSAL,type:Tt.Type.INTEGER,constructed:!1,capture:"iterations"}]};So.encryptPrivateKeyInfo=function(t,e,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=tn.random.getBytesSync(r.saltSize),o=r.count,s=Tt.integerToDer(o),c,l,u;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var d,p,h;switch(r.algorithm){case"aes128":c=16,d=16,p=ZV["aes128-CBC"],h=tn.aes.createEncryptionCipher;break;case"aes192":c=24,d=16,p=ZV["aes192-CBC"],h=tn.aes.createEncryptionCipher;break;case"aes256":c=32,d=16,p=ZV["aes256-CBC"],h=tn.aes.createEncryptionCipher;break;case"des":c=8,d=8,p=ZV.desCBC,h=tn.des.createEncryptionCipher;break;default:var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=r.algorithm,m}var g="hmacWith"+r.prfAlgorithm.toUpperCase(),A=C0n(g),y=tn.pkcs5.pbkdf2(e,n,o,c,A),E=tn.random.getBytesSync(d),_=h(y);_.start(E),_.update(Tt.toDer(t)),_.finish(),u=_.output.getBytes();var v=tMo(n,s,c,g);l=Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OID,!1,Tt.oidToDer(ZV.pkcs5PBES2).getBytes()),Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OID,!1,Tt.oidToDer(ZV.pkcs5PBKDF2).getBytes()),v]),Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OID,!1,Tt.oidToDer(p).getBytes()),Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OCTETSTRING,!1,E)])])])}else if(r.algorithm==="3des"){c=24;var b=new tn.util.ByteBuffer(n),y=So.pbe.generatePkcs12Key(e,b,1,o,c),E=So.pbe.generatePkcs12Key(e,b,2,o,c),_=tn.des.createEncryptionCipher(y);_.start(E),_.update(Tt.toDer(t)),_.finish(),u=_.output.getBytes(),l=Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OID,!1,Tt.oidToDer(ZV["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OCTETSTRING,!1,n),Tt.create(Tt.Class.UNIVERSAL,Tt.Type.INTEGER,!1,s.getBytes())])])}else{var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=r.algorithm,m}var I=Tt.create(Tt.Class.UNIVERSAL,Tt.Type.SEQUENCE,!0,[l,Tt.create(Tt.Class.UNIVERSAL,Tt.Type.OCTETSTRING,!1,u)]);return I};So.decryptPrivateKeyInfo=function(t,e){var r=null,n={},o=[];if(!Tt.validate(t,X5o,n,o)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}var c=Tt.derToOid(n.encryptionOid),l=So.pbe.getCipher(c,n.encryptionParams,e),u=tn.util.createBuffer(n.encryptedData);return l.update(u),l.finish()&&(r=Tt.fromDer(l.output)),r};So.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:Tt.toDer(t).getBytes()};return tn.pem.encode(r,{maxline:e})};So.encryptedPrivateKeyFromPem=function(t){var e=tn.pem.decode(t)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Tt.fromDer(e.body)};So.encryptRsaPrivateKey=function(t,e,r){if(r=r||{},!r.legacy){var n=So.wrapRsaPrivateKey(So.privateKeyToAsn1(t));return n=So.encryptPrivateKeyInfo(n,e,r),So.encryptedPrivateKeyToPem(n)}var o,s,c,l;switch(r.algorithm){case"aes128":o="AES-128-CBC",c=16,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,s=tn.random.getBytesSync(8),l=tn.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,s=tn.random.getBytesSync(8),l=tn.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw u.algorithm=r.algorithm,u}var d=tn.pbe.opensslDeriveBytes(e,s.substr(0,8),c),p=l(d);p.start(s),p.update(Tt.toDer(So.privateKeyToAsn1(t))),p.finish();var h={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:tn.util.bytesToHex(s).toUpperCase()},body:p.output.getBytes()};return tn.pem.encode(h)};So.decryptRsaPrivateKey=function(t,e){var r=null,n=tn.pem.decode(t)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var o=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw o.headerType=o,o}if(n.procType&&n.procType.type==="ENCRYPTED"){var s,c;switch(n.dekInfo.algorithm){case"DES-CBC":s=8,c=tn.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,c=tn.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,c=tn.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,c=tn.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,c=tn.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,c=a(function(h){return tn.rc2.createDecryptionCipher(h,40)},"cipherFn");break;case"RC2-64-CBC":s=8,c=a(function(h){return tn.rc2.createDecryptionCipher(h,64)},"cipherFn");break;case"RC2-128-CBC":s=16,c=a(function(h){return tn.rc2.createDecryptionCipher(h,128)},"cipherFn");break;default:var o=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw o.algorithm=n.dekInfo.algorithm,o}var l=tn.util.hexToBytes(n.dekInfo.parameters),u=tn.pbe.opensslDeriveBytes(e,l.substr(0,8),s),d=c(u);if(d.start(l),d.update(tn.util.createBuffer(n.body)),d.finish())r=d.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=So.decryptPrivateKeyInfo(Tt.fromDer(r),e):r=Tt.fromDer(r),r!==null&&(r=So.privateKeyFromAsn1(r)),r};So.pbe.generatePkcs12Key=function(t,e,r,n,o,s){var c,l;if(typeof s>"u"||s===null){if(!("sha1"in tn.md))throw new Error('"sha1" hash algorithm unavailable.');s=tn.md.sha1.create()}var u=s.digestLength,d=s.blockLength,p=new tn.util.ByteBuffer,h=new tn.util.ByteBuffer;if(t!=null){for(l=0;l=0;l--)D=D>>8,D+=P.at(l)+M.at(l),M.setAt(l,D&255);Q.putBuffer(M)}b=Q,p.putBuffer(R)}return p.truncate(p.length()-o),p};So.pbe.getCipher=function(t,e,r){switch(t){case So.oids.pkcs5PBES2:return So.pbe.getCipherForPBES2(t,e,r);case So.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case So.oids["pbewithSHAAnd40BitRC2-CBC"]:return So.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};So.pbe.getCipherForPBES2=function(t,e,r){var n={},o=[];if(!Tt.validate(e,Z5o,n,o)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}if(t=Tt.derToOid(n.kdfOid),t!==So.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=t,s.supportedOids=["pkcs5PBKDF2"],s}if(t=Tt.derToOid(n.encOid),t!==So.oids["aes128-CBC"]&&t!==So.oids["aes192-CBC"]&&t!==So.oids["aes256-CBC"]&&t!==So.oids["des-EDE3-CBC"]&&t!==So.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=t,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var c=n.kdfSalt,l=tn.util.createBuffer(n.kdfIterationCount);l=l.getInt(l.length()<<3);var u,d;switch(So.oids[t]){case"aes128-CBC":u=16,d=tn.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,d=tn.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,d=tn.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,d=tn.des.createDecryptionCipher;break;case"desCBC":u=8,d=tn.des.createDecryptionCipher;break}var p=E0n(n.prfOid),h=tn.pkcs5.pbkdf2(r,c,l,u,p),m=n.encIv,g=d(h);return g.start(m),g};So.pbe.getCipherForPKCS12PBE=function(t,e,r){var n={},o=[];if(!Tt.validate(e,eMo,n,o)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}var c=tn.util.createBuffer(n.salt),l=tn.util.createBuffer(n.iterations);l=l.getInt(l.length()<<3);var u,d,p;switch(t){case So.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,d=8,p=tn.des.startDecrypting;break;case So.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,d=8,p=a(function(y,E){var _=tn.rc2.createDecryptionCipher(y,40);return _.start(E,null),_},"cipherFn");break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=t,s}var h=E0n(n.prfOid),m=So.pbe.generatePkcs12Key(r,c,1,l,u,h);h.start();var g=So.pbe.generatePkcs12Key(r,c,2,l,d,h);return p(m,g)};So.pbe.opensslDeriveBytes=function(t,e,r,n){if(typeof n>"u"||n===null){if(!("md5"in tn.md))throw new Error('"md5" hash algorithm unavailable.');n=tn.md.md5.create()}e===null&&(e="");for(var o=[y0n(n,t+e)],s=16,c=1;s{f();var xse=No();xw();Ea();var Wr=xse.asn1,wse=T0n.exports=xse.pkcs7asn1=xse.pkcs7asn1||{};xse.pkcs7=xse.pkcs7||{};xse.pkcs7.asn1=wse;var v0n={name:"ContentInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};wse.contentInfoValidator=v0n;var b0n={name:"EncryptedContentInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};wse.envelopedDataValidator={name:"EnvelopedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(b0n)};wse.encryptedDataValidator={name:"EncryptedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"}].concat(b0n)};var rMo={name:"SignerInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};wse.signedDataValidator={name:"SignedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},v0n,{name:"SignedData.Certificates",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,capture:"signerInfos",optional:!0,value:[rMo]}]};wse.recipientInfoValidator={name:"RecipientInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var l7t=T((wBu,S0n)=>{f();var eW=No();Ea();eW.mgf=eW.mgf||{};var nMo=S0n.exports=eW.mgf.mgf1=eW.mgf1=eW.mgf1||{};nMo.create=function(t){var e={generate:a(function(r,n){for(var o=new eW.util.ByteBuffer,s=Math.ceil(n/t.digestLength),c=0;c{f();var TWe=No();l7t();I0n.exports=TWe.mgf=TWe.mgf||{};TWe.mgf.mgf1=TWe.mgf1});var SWe=T((DBu,w0n)=>{f();var tW=No();uS();Ea();var iMo=w0n.exports=tW.pss=tW.pss||{};iMo.create=function(t){arguments.length===3&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=t.md,r=t.mgf,n=e.digestLength,o=t.salt||null;typeof o=="string"&&(o=tW.util.createBuffer(o));var s;if("saltLength"in t)s=t.saltLength;else if(o!==null)s=o.length();else throw new Error("Salt length not specified or specific salt not given.");if(o!==null&&o.length()!==s)throw new Error("Given salt length does not match length of given salt.");var c=t.prng||tW.random,l={};return l.encode=function(u,d){var p,h=d-1,m=Math.ceil(h/8),g=u.digest().getBytes();if(m>8*m-h&255;return x=String.fromCharCode(x.charCodeAt(0)&~R)+x.substr(1),x+E+"\xBC"},l.verify=function(u,d,p){var h,m=p-1,g=Math.ceil(m/8);if(d=d.substr(-g),g>8*g-m&255;if((y.charCodeAt(0)&_)!==0)throw new Error("Bits beyond keysize not zero as expected.");var v=r.generate(E,A),b="";for(h=0;h{f();var Yn=No();x9();xw();Tve();lN();x0n();w9();KV();SWe();xve();Ea();var re=Yn.asn1,mr=D0n.exports=Yn.pki=Yn.pki||{},aa=mr.oids,Hd={};Hd.CN=aa.commonName;Hd.commonName="CN";Hd.C=aa.countryName;Hd.countryName="C";Hd.L=aa.localityName;Hd.localityName="L";Hd.ST=aa.stateOrProvinceName;Hd.stateOrProvinceName="ST";Hd.O=aa.organizationName;Hd.organizationName="O";Hd.OU=aa.organizationalUnitName;Hd.organizationalUnitName="OU";Hd.E=aa.emailAddress;Hd.emailAddress="E";var P0n=Yn.pki.rsa.publicKeyValidator,oMo={name:"Certificate",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:re.Class.UNIVERSAL,type:re.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:re.Class.UNIVERSAL,type:re.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:re.Class.UNIVERSAL,type:re.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:re.Class.UNIVERSAL,type:re.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},P0n,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:re.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:re.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:re.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},sMo={name:"rsapss",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:re.Class.UNIVERSAL,type:re.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:re.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:re.Class.UNIVERSAL,type:re.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:re.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:re.Class.UNIVERSAL,type:re.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:re.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:re.Class.UNIVERSAL,type:re.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},aMo={name:"CertificationRequestInfo",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},P0n,{name:"CertificationRequestInfo.attributes",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:re.Class.UNIVERSAL,type:re.Type.SET,constructed:!0}]}]}]},cMo={name:"CertificationRequest",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[aMo,{name:"CertificationRequest.signatureAlgorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};mr.RDNAttributesAsArray=function(t,e){for(var r=[],n,o,s,c=0;c2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=u[0],c.validity.notAfter=u[1],c.tbsCertificate=r.tbsCertificate,e){c.md=xWe({signatureOid:c.signatureOid,type:"certificate"});var d=re.toDer(c.tbsCertificate);c.md.update(d.getBytes())}var p=Yn.md.sha1.create(),h=re.toDer(r.certIssuer);p.update(h.getBytes()),c.issuer.getField=function(A){return k9(c.issuer,A)},c.issuer.addField=function(A){pS([A]),c.issuer.attributes.push(A)},c.issuer.attributes=mr.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=p.digest().toHex();var m=Yn.md.sha1.create(),g=re.toDer(r.certSubject);return m.update(g.getBytes()),c.subject.getField=function(A){return k9(c.subject,A)},c.subject.addField=function(A){pS([A]),c.subject.attributes.push(A)},c.subject.attributes=mr.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=m.digest().toHex(),r.certExtensions?c.extensions=mr.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=mr.publicKeyFromAsn1(r.subjectPublicKeyInfo),c};mr.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r1&&(n=r.value.charCodeAt(1),o=r.value.length>2?r.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(o&128)===128}else if(e.name==="basicConstraints"){var r=re.fromDer(e.value);r.value.length>0&&r.value[0].type===re.Type.BOOLEAN?e.cA=r.value[0].value.charCodeAt(0)!==0:e.cA=!1;var s=null;r.value.length>0&&r.value[0].type===re.Type.INTEGER?s=r.value[0].value:r.value.length>1&&(s=r.value[1].value),s!==null&&(e.pathLenConstraint=re.derToInteger(s))}else if(e.name==="extKeyUsage")for(var r=re.fromDer(e.value),c=0;c1&&(n=r.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var u,r=re.fromDer(e.value),d=0;d"u"&&(e.type&&e.type in mr.oids?e.name=mr.oids[e.type]:e.shortName&&e.shortName in Hd&&(e.name=mr.oids[Hd[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in mr.oids)e.type=mr.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in Hd&&(e.shortName=Hd[e.name]),e.type===aa.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=re.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var o=0;o"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}a(pS,"_fillMissingFields");function N0n(t,e){if(e=e||{},typeof t.name>"u"&&t.id&&t.id in mr.oids&&(t.name=mr.oids[t.id]),typeof t.id>"u")if(t.name&&t.name in mr.oids)t.id=mr.oids[t.name];else{var r=new Error("Extension ID not specified.");throw r.extension=t,r}if(typeof t.value<"u")return t;if(t.name==="keyUsage"){var n=0,o=0,s=0;t.digitalSignature&&(o|=128,n=7),t.nonRepudiation&&(o|=64,n=6),t.keyEncipherment&&(o|=32,n=5),t.dataEncipherment&&(o|=16,n=4),t.keyAgreement&&(o|=8,n=3),t.keyCertSign&&(o|=4,n=2),t.cRLSign&&(o|=2,n=1),t.encipherOnly&&(o|=1,n=0),t.decipherOnly&&(s|=128,n=7);var c=String.fromCharCode(n);s!==0?c+=String.fromCharCode(o)+String.fromCharCode(s):o!==0&&(c+=String.fromCharCode(o)),t.value=re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,c)}else if(t.name==="basicConstraints")t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(re.create(re.Class.UNIVERSAL,re.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in t&&t.value.value.push(re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(t.pathLenConstraint).getBytes()));else if(t.name==="extKeyUsage"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);var l=t.value.value;for(var u in t)t[u]===!0&&(u in aa?l.push(re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(aa[u]).getBytes())):u.indexOf(".")!==-1&&l.push(re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(u).getBytes())))}else if(t.name==="nsCertType"){var n=0,o=0;t.client&&(o|=128,n=7),t.server&&(o|=64,n=6),t.email&&(o|=32,n=5),t.objsign&&(o|=16,n=4),t.reserved&&(o|=8,n=3),t.sslCA&&(o|=4,n=2),t.emailCA&&(o|=2,n=1),t.objCA&&(o|=1,n=0);var c=String.fromCharCode(n);o!==0&&(c+=String.fromCharCode(o)),t.value=re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,c)}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);for(var d,p=0;p128)throw new Error('Invalid "nsComment" content.');t.value=re.create(re.Class.UNIVERSAL,re.Type.IA5STRING,!1,t.comment)}else if(t.name==="subjectKeyIdentifier"&&e.cert){var h=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=h.toHex(),t.value=re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,h.getBytes())}else if(t.name==="authorityKeyIdentifier"&&e.cert){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);var l=t.value.value;if(t.keyIdentifier){var m=t.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;l.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!1,m))}if(t.authorityCertIssuer){var g=[re.create(re.Class.CONTEXT_SPECIFIC,4,!0,[Rse(t.authorityCertIssuer===!0?e.cert.issuer:t.authorityCertIssuer)])];l.push(re.create(re.Class.CONTEXT_SPECIFIC,1,!0,g))}if(t.serialNumber){var A=Yn.util.hexToBytes(t.serialNumber===!0?e.cert.serialNumber:t.serialNumber);l.push(re.create(re.Class.CONTEXT_SPECIFIC,2,!1,A))}}else if(t.name==="cRLDistributionPoints"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);for(var l=t.value.value,y=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]),E=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[]),d,p=0;p"u"){var r=new Error("Extension value not specified.");throw r.extension=t,r}return t}a(N0n,"_fillMissingExtensionFields");function u7t(t,e){if(t===aa["RSASSA-PSS"]){var r=[];return e.hash.algorithmOid!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.hash.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,1,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.mgf.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.mgf.hash.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,2,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(e.saltLength).getBytes())])),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,r)}else return re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")}a(u7t,"_signatureParametersToAsn1");function lMo(t){var e=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[]);if(t.attributes.length===0)return e;for(var r=t.attributes,n=0;n=uMo&&t0&&n.value.push(mr.certificateExtensionsToAsn1(t.extensions)),n};mr.getCertificationRequestInfo=function(t){var e=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(t.version).getBytes()),Rse(t.subject),mr.publicKeyToAsn1(t.publicKey),lMo(t)]);return e};mr.distinguishedNameToAsn1=function(t){return Rse(t)};mr.certificateToAsn1=function(t){var e=t.tbsCertificate||mr.getTBSCertificate(t);return re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[e,re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(t.signatureOid).getBytes()),u7t(t.signatureOid,t.signatureParameters)]),re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,"\0"+t.signature)])};mr.certificateExtensionsToAsn1=function(t){var e=re.create(re.Class.CONTEXT_SPECIFIC,3,!0,[]),r=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;n"u"&&(o=new Date);var s=!0,c=null,l=0;do{var u=e.shift(),d=null,p=!1;if(o&&(ou.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:mr.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:o}),c===null){if(d=e[0]||t.getIssuer(u),d===null&&u.isIssuer(u)&&(p=!0,d=u),d){var h=d;Yn.util.isArray(h)||(h=[h]);for(var m=!1;!m&&h.length>0;){d=h.shift();try{m=d.verify(u)}catch{}}m||(c={message:"Certificate signature is invalid.",error:mr.certificateError.bad_certificate})}c===null&&(!d||p)&&!t.hasCertificate(u)&&(c={message:"Certificate is not trusted.",error:mr.certificateError.unknown_ca})}if(c===null&&d&&!u.isIssuer(d)&&(c={message:"Certificate issuer is invalid.",error:mr.certificateError.bad_certificate}),c===null)for(var g={keyUsage:!0,basicConstraints:!0},A=0;c===null&&AE.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:mr.certificateError.bad_certificate})}}var b=c===null?!0:c.error,I=r.verify?r.verify(b,l,n):b;if(I===!0)c=null;else throw b===!0&&(c={message:"The application rejected the certificate.",error:mr.certificateError.bad_certificate}),(I||I===0)&&(typeof I=="object"&&!Yn.util.isArray(I)?(I.message&&(c.message=I.message),I.error&&(c.error=I.error)):typeof I=="string"&&(c.error=I)),c;s=!1,++l}while(e.length>0);return!0}});var f7t=T((FBu,O0n)=>{f();var El=No();xw();vse();w9();c7t();a7t();uS();xve();Ise();Ea();wWe();var ke=El.asn1,ps=El.pki,Rve=O0n.exports=El.pkcs12=El.pkcs12||{},M0n={name:"ContentInfo",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},fMo={name:"PFX",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:ke.Class.UNIVERSAL,type:ke.Type.INTEGER,constructed:!1,capture:"version"},M0n,{name:"PFX.macData",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:ke.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:ke.Class.UNIVERSAL,type:ke.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},pMo={name:"SafeBag",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},hMo={name:"Attribute",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SET,constructed:!0,capture:"values"}]},mMo={name:"CertBag",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:ke.Class.UNIVERSAL,type:ke.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function wve(t,e,r,n){for(var o=[],s=0;s=0&&o.push(l)}}return o}a(wve,"_getBagsByAttribute");Rve.pkcs12FromAsn1=function(t,e,r){typeof e=="string"?(r=e,e=!0):e===void 0&&(e=!0);var n={},o=[];if(!ke.validate(t,fMo,n,o)){var s=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw s.errors=s,s}var c={version:n.version.charCodeAt(0),safeContents:[],getBags:a(function(E){var _={},v;return"localKeyId"in E?v=E.localKeyId:"localKeyIdHex"in E&&(v=El.util.hexToBytes(E.localKeyIdHex)),v===void 0&&!("friendlyName"in E)&&"bagType"in E&&(_[E.bagType]=wve(c.safeContents,null,null,E.bagType)),v!==void 0&&(_.localKeyId=wve(c.safeContents,"localKeyId",v,E.bagType)),"friendlyName"in E&&(_.friendlyName=wve(c.safeContents,"friendlyName",E.friendlyName,E.bagType)),_},"getBags"),getBagsByFriendlyName:a(function(E,_){return wve(c.safeContents,"friendlyName",E,_)},"getBagsByFriendlyName"),getBagsByLocalKeyId:a(function(E,_){return wve(c.safeContents,"localKeyId",E,_)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var s=new Error("PKCS#12 PFX of version other than 3 not supported.");throw s.version=n.version.charCodeAt(0),s}if(ke.derToOid(n.contentType)!==ps.oids.data){var s=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw s.oid=ke.derToOid(n.contentType),s}var l=n.content.value[0];if(l.tagClass!==ke.Class.UNIVERSAL||l.type!==ke.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(l=d7t(l),n.mac){var u=null,d=0,p=ke.derToOid(n.macAlgorithm);switch(p){case ps.oids.sha1:u=El.md.sha1.create(),d=20;break;case ps.oids.sha256:u=El.md.sha256.create(),d=32;break;case ps.oids.sha384:u=El.md.sha384.create(),d=48;break;case ps.oids.sha512:u=El.md.sha512.create(),d=64;break;case ps.oids.md5:u=El.md.md5.create(),d=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+p);var h=new El.util.ByteBuffer(n.macSalt),m="macIterations"in n?parseInt(El.util.bytesToHex(n.macIterations),16):1,g=Rve.generateKey(r,h,3,m,d,u),A=El.hmac.create();A.start(u,g),A.update(l.value);var y=A.getMac();if(y.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(t.value)&&t.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return gMo(c,l.value,e,r),c};function d7t(t){if(t.composed||t.constructed){for(var e=El.util.createBuffer(),r=0;r0&&(s=ke.create(ke.Class.UNIVERSAL,ke.Type.SET,!0,u));var d=[],p=[];e!==null&&(El.util.isArray(e)?p=e:p=[e]);for(var h=[],m=0;m0){var E=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,h),_=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(E).getBytes())])]);d.push(_)}var v=null;if(t!==null){var b=ps.wrapRsaPrivateKey(ps.privateKeyToAsn1(t));r===null?v=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.keyBag).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[b]),s]):v=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.pkcs8ShroudedKeyBag).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ps.encryptPrivateKeyInfo(b,r,n)]),s]);var I=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[v]),x=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(I).getBytes())])]);d.push(x)}var R=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,d),w;if(n.useMac){var l=El.md.sha1.create(),P=new El.util.ByteBuffer(El.random.getBytes(n.saltSize)),k=n.count,t=Rve.generateKey(r,P,3,k,20),Q=El.hmac.create();Q.start(l,t),Q.update(ke.toDer(R).getBytes());var M=Q.getMac();w=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.sha1).getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.NULL,!1,"")]),ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,M.getBytes())]),ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,P.getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.INTEGER,!1,ke.integerToDer(k).getBytes())])}return ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.INTEGER,!1,ke.integerToDer(3).getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(ps.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(R).getBytes())])]),w])};Rve.generateKey=El.pbe.generatePkcs12Key});var h7t=T((qBu,B0n)=>{f();var N9=No();xw();w9();a7t();KV();yWe();f7t();SWe();xve();Ea();wWe();var p7t=N9.asn1,Pse=B0n.exports=N9.pki=N9.pki||{};Pse.pemToDer=function(t){var e=N9.pem.decode(t)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return N9.util.createBuffer(e.body)};Pse.privateKeyFromPem=function(t){var e=N9.pem.decode(t)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=p7t.fromDer(e.body);return Pse.privateKeyFromAsn1(n)};Pse.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:p7t.toDer(Pse.privateKeyToAsn1(t)).getBytes()};return N9.pem.encode(r,{maxline:e})};Pse.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:p7t.toDer(t).getBytes()};return N9.pem.encode(r,{maxline:e})}});var C7t=T((HBu,j0n)=>{f();var qt=No();xw();vse();hWe();KV();h7t();uS();Ise();Ea();var NWe=a(function(t,e,r,n){var o=qt.util.createBuffer(),s=t.length>>1,c=s+(t.length&1),l=t.substr(0,c),u=t.substr(s,c),d=qt.util.createBuffer(),p=qt.hmac.create();r=e+r;var h=Math.ceil(n/16),m=Math.ceil(n/20);p.start("MD5",l);var g=qt.util.createBuffer();d.putBytes(r);for(var A=0;A0&&(oe.queue(t,oe.createAlert(t,{level:oe.Alert.Level.warning,description:oe.Alert.Description.no_renegotiation})),oe.flush(t)),t.process()};oe.parseHelloMessage=function(t,e,r){var n=null,o=t.entity===oe.ConnectionEnd.client;if(r<38)t.error(t,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});else{var s=e.fragment,c=s.length();if(n={version:{major:s.getByte(),minor:s.getByte()},random:qt.util.createBuffer(s.getBytes(32)),session_id:Tv(s,1),extensions:[]},o?(n.cipher_suite=s.getBytes(2),n.compression_method=s.getByte()):(n.cipher_suites=Tv(s,2),n.compression_methods=Tv(s,1)),c=r-(c-s.length()),c>0){for(var l=Tv(s,2);l.length()>0;)n.extensions.push({type:[l.getByte(),l.getByte()],data:Tv(l,2)});if(!o)for(var u=0;u0;){var h=p.getByte();if(h!==0)break;t.session.extensions.server_name.serverNameList.push(Tv(p,2).getBytes())}}}if(t.session.version&&(n.version.major!==t.session.version.major||n.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}});if(o)t.session.cipherSuite=oe.getCipherSuite(n.cipher_suite);else for(var m=qt.util.createBuffer(n.cipher_suites.bytes());m.length()>0&&(t.session.cipherSuite=oe.getCipherSuite(m.getBytes(2)),t.session.cipherSuite===null););if(t.session.cipherSuite===null)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.handshake_failure},cipherSuite:qt.util.bytesToHex(n.cipher_suite)});o?t.session.compressionMethod=n.compression_method:t.session.compressionMethod=oe.CompressionMethod.none}return n};oe.createSecurityParameters=function(t,e){var r=t.entity===oe.ConnectionEnd.client,n=e.random.bytes(),o=r?t.session.sp.client_random:n,s=r?n:oe.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:oe.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:o,server_random:s}};oe.handleServerHello=function(t,e,r){var n=oe.parseHelloMessage(t,e,r);if(!t.fail){if(n.version.minor<=t.version.minor)t.version.minor=n.version.minor;else return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}});t.session.version=t.version;var o=n.session_id.bytes();o.length>0&&o===t.session.id?(t.expect=U0n,t.session.resuming=!0,t.session.sp.server_random=n.random.bytes()):(t.expect=TMo,t.session.resuming=!1,oe.createSecurityParameters(t,n)),t.session.id=o,t.process()}};oe.handleClientHello=function(t,e,r){var n=oe.parseHelloMessage(t,e,r);if(!t.fail){var o=n.session_id.bytes(),s=null;if(t.sessionCache&&(s=t.sessionCache.getSession(o),s===null?o="":(s.version.major!==n.version.major||s.version.minor>n.version.minor)&&(s=null,o="")),o.length===0&&(o=qt.random.getBytes(32)),t.session.id=o,t.session.clientHelloVersion=n.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var c,l=1;l0;)s=Tv(o.certificate_list,3),c=qt.asn1.fromDer(s),s=qt.pki.certificateFromAsn1(c,!0),l.push(s)}catch(d){return t.error(t,{message:"Could not parse certificate list.",cause:d,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.bad_certificate}})}var u=t.entity===oe.ConnectionEnd.client;(u||t.verifyClient===!0)&&l.length===0?t.error(t,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}}):l.length===0?t.expect=u?L0n:A7t:(u?t.session.serverCertificate=l[0]:t.session.clientCertificate=l[0],oe.verifyCertificateChain(t,l)&&(t.expect=u?L0n:A7t)),t.process()};oe.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.unsupported_certificate}});t.expect=SMo,t.process()};oe.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.unsupported_certificate}});var n=e.fragment,o={enc_pre_master_secret:Tv(n,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=qt.pki.privateKeyFromPem(s)}catch(u){t.error(t,{message:"Could not get private key.",cause:u,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}})}if(s===null)return t.error(t,{message:"No private key set.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}});try{var c=t.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var l=t.session.clientHelloVersion;if(l.major!==c.pre_master_secret.charCodeAt(0)||l.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{c.pre_master_secret=qt.random.getBytes(48)}t.expect=y7t,t.session.clientCertificate!==null&&(t.expect=NMo),t.process()};oe.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var n=e.fragment,o={certificate_types:Tv(n,1),certificate_authorities:Tv(n,2)};t.session.certificateRequest=o,t.expect=IMo,t.process()};oe.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var o=n.bytes();n.read+=4;var s={signature:Tv(n,2).getBytes()},c=qt.util.createBuffer();c.putBuffer(t.session.md5.digest()),c.putBuffer(t.session.sha1.digest()),c=c.getBytes();try{var l=t.session.clientCertificate;if(!l.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(o),t.session.sha1.update(o)}catch{return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.handshake_failure}})}t.expect=y7t,t.process()};oe.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.record_overflow}});if(t.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.insufficient_security}},o=0,s=t.verify(t,n.alert.description,o,[]);if(s!==!0)return(s||s===0)&&(typeof s=="object"&&!qt.util.isArray(s)?(s.message&&(n.message=s.message),s.alert&&(n.alert.description=s.alert)):typeof s=="number"&&(n.alert.description=s)),t.error(t,n)}t.session.certificateRequest!==null&&(e=oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createCertificate(t)}),oe.queue(t,e)),e=oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createClientKeyExchange(t)}),oe.queue(t,e),t.expect=RMo;var c=a(function(l,u){l.session.certificateRequest!==null&&l.session.clientCertificate!==null&&oe.queue(l,oe.createRecord(l,{type:oe.ContentType.handshake,data:oe.createCertificateVerify(l,u)})),oe.queue(l,oe.createRecord(l,{type:oe.ContentType.change_cipher_spec,data:oe.createChangeCipherSpec()})),l.state.pending=oe.createConnectionState(l),l.state.current.write=l.state.pending.write,oe.queue(l,oe.createRecord(l,{type:oe.ContentType.handshake,data:oe.createFinished(l)})),l.expect=U0n,oe.flush(l),l.process()},"callback");if(t.session.certificateRequest===null||t.session.clientCertificate===null)return c(t,null);oe.getClientSignature(t,c)};oe.handleChangeCipherSpec=function(t,e){if(e.fragment.getByte()!==1)return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var r=t.entity===oe.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=oe.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?xMo:DMo,t.process()};oe.handleFinished=function(t,e,r){var n=e.fragment;n.read-=4;var o=n.bytes();n.read+=4;var s=e.fragment.getBytes();n=qt.util.createBuffer(),n.putBuffer(t.session.md5.digest()),n.putBuffer(t.session.sha1.digest());var c=t.entity===oe.ConnectionEnd.client,l=c?"server finished":"client finished",u=t.session.sp,d=12,p=NWe;if(n=p(u.master_secret,l,n.getBytes(),d),n.getBytes()!==s)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.decrypt_error}});t.session.md5.update(o),t.session.sha1.update(o),(t.session.resuming&&c||!t.session.resuming&&!c)&&(oe.queue(t,oe.createRecord(t,{type:oe.ContentType.change_cipher_spec,data:oe.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,oe.queue(t,oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createFinished(t)}))),t.expect=c?wMo:MMo,t.handshaking=!1,++t.handshakes,t.peerCertificate=c?t.session.serverCertificate:t.session.clientCertificate,oe.flush(t),t.isConnected=!0,t.connected(t),t.process()};oe.handleAlert=function(t,e){var r=e.fragment,n={level:r.getByte(),description:r.getByte()},o;switch(n.description){case oe.Alert.Description.close_notify:o="Connection closed.";break;case oe.Alert.Description.unexpected_message:o="Unexpected message.";break;case oe.Alert.Description.bad_record_mac:o="Bad record MAC.";break;case oe.Alert.Description.decryption_failed:o="Decryption failed.";break;case oe.Alert.Description.record_overflow:o="Record overflow.";break;case oe.Alert.Description.decompression_failure:o="Decompression failed.";break;case oe.Alert.Description.handshake_failure:o="Handshake failure.";break;case oe.Alert.Description.bad_certificate:o="Bad certificate.";break;case oe.Alert.Description.unsupported_certificate:o="Unsupported certificate.";break;case oe.Alert.Description.certificate_revoked:o="Certificate revoked.";break;case oe.Alert.Description.certificate_expired:o="Certificate expired.";break;case oe.Alert.Description.certificate_unknown:o="Certificate unknown.";break;case oe.Alert.Description.illegal_parameter:o="Illegal parameter.";break;case oe.Alert.Description.unknown_ca:o="Unknown certificate authority.";break;case oe.Alert.Description.access_denied:o="Access denied.";break;case oe.Alert.Description.decode_error:o="Decode error.";break;case oe.Alert.Description.decrypt_error:o="Decrypt error.";break;case oe.Alert.Description.export_restriction:o="Export restriction.";break;case oe.Alert.Description.protocol_version:o="Unsupported protocol version.";break;case oe.Alert.Description.insufficient_security:o="Insufficient security.";break;case oe.Alert.Description.internal_error:o="Internal error.";break;case oe.Alert.Description.user_canceled:o="User canceled.";break;case oe.Alert.Description.no_renegotiation:o="Renegotiation not supported.";break;default:o="Unknown error.";break}if(n.description===oe.Alert.Description.close_notify)return t.close();t.error(t,{message:o,send:!1,origin:t.entity===oe.ConnectionEnd.client?"server":"client",alert:n}),t.process()};oe.handleHandshake=function(t,e){var r=e.fragment,n=r.getByte(),o=r.getInt24();if(o>r.length())return t.fragmented=e,e.fragment=qt.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,n in kWe[t.entity][t.expect]?(t.entity===oe.ConnectionEnd.server&&!t.open&&!t.fail&&(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:qt.md.md5.create(),sha1:qt.md.sha1.create()}),n!==oe.HandshakeType.hello_request&&n!==oe.HandshakeType.certificate_verify&&n!==oe.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),kWe[t.entity][t.expect][n](t,e,o)):oe.handleUnexpected(t,e)};oe.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()};oe.handleHeartbeat=function(t,e){var r=e.fragment,n=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(n===oe.HeartbeatMessageType.heartbeat_request){if(t.handshaking||o>s.length)return t.process();oe.queue(t,oe.createRecord(t,{type:oe.ContentType.heartbeat,data:oe.createHeartbeat(oe.HeartbeatMessageType.heartbeat_response,s)})),oe.flush(t)}else if(n===oe.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,qt.util.createBuffer(s))}t.process()};var bMo=0,TMo=1,L0n=2,SMo=3,IMo=4,U0n=5,xMo=6,wMo=7,RMo=8,PMo=0,kMo=1,A7t=2,NMo=3,y7t=4,DMo=5,MMo=6,ie=oe.handleUnexpected,Q0n=oe.handleChangeCipherSpec,Lm=oe.handleAlert,Sy=oe.handleHandshake,q0n=oe.handleApplicationData,Fm=oe.handleHeartbeat,E7t=[];E7t[oe.ConnectionEnd.client]=[[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[Q0n,Lm,ie,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,q0n,Fm],[ie,Lm,Sy,ie,Fm]];E7t[oe.ConnectionEnd.server]=[[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,ie,Fm],[Q0n,Lm,ie,ie,Fm],[ie,Lm,Sy,ie,Fm],[ie,Lm,Sy,q0n,Fm],[ie,Lm,Sy,ie,Fm]];var D9=oe.handleHelloRequest,OMo=oe.handleServerHello,G0n=oe.handleCertificate,F0n=oe.handleServerKeyExchange,m7t=oe.handleCertificateRequest,RWe=oe.handleServerHelloDone,H0n=oe.handleFinished,kWe=[];kWe[oe.ConnectionEnd.client]=[[ie,ie,OMo,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,G0n,F0n,m7t,RWe,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,F0n,m7t,RWe,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,m7t,RWe,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,RWe,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,H0n],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[D9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie]];var BMo=oe.handleClientHello,LMo=oe.handleClientKeyExchange,FMo=oe.handleCertificateVerify;kWe[oe.ConnectionEnd.server]=[[ie,BMo,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,G0n,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,LMo,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,FMo,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,H0n],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie]];oe.generateKeys=function(t,e){var r=NWe,n=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var o=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===oe.Versions.TLS_1_0.major&&t.version.minor===oe.Versions.TLS_1_0.minor;s&&(o+=2*e.fixed_iv_length);var c=r(e.master_secret,"key expansion",n,o),l={client_write_MAC_key:c.getBytes(e.mac_key_length),server_write_MAC_key:c.getBytes(e.mac_key_length),client_write_key:c.getBytes(e.enc_key_length),server_write_key:c.getBytes(e.enc_key_length)};return s&&(l.client_write_IV=c.getBytes(e.fixed_iv_length),l.server_write_IV=c.getBytes(e.fixed_iv_length)),l};oe.createConnectionState=function(t){var e=t.entity===oe.ConnectionEnd.client,r=a(function(){var s={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:a(function(c){return!0},"cipherFunction"),compressionState:null,compressFunction:a(function(c){return!0},"compressFunction"),updateSequenceNumber:a(function(){s.sequenceNumber[1]===4294967295?(s.sequenceNumber[1]=0,++s.sequenceNumber[0]):++s.sequenceNumber[1]},"updateSequenceNumber")};return s},"createMode"),n={read:r(),write:r()};if(n.read.update=function(s,c){return n.read.cipherFunction(c,n.read)?n.read.compressFunction(s,c,n.read)||s.error(s,{message:"Could not decompress record.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.decompression_failure}}):s.error(s,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.bad_record_mac}}),!s.fail},n.write.update=function(s,c){return n.write.compressFunction(s,c,n.write)?n.write.cipherFunction(c,n.write)||s.error(s,{message:"Could not encrypt record.",send:!1,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}):s.error(s,{message:"Could not compress record.",send:!1,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}),!s.fail},t.session){var o=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(o),o.keys=oe.generateKeys(t,o),n.read.macKey=e?o.keys.server_write_MAC_key:o.keys.client_write_MAC_key,n.write.macKey=e?o.keys.client_write_MAC_key:o.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(n,t,o),o.compression_algorithm){case oe.CompressionMethod.none:break;case oe.CompressionMethod.deflate:n.read.compressFunction=vMo,n.write.compressFunction=_Mo;break;default:throw new Error("Unsupported compression algorithm.")}}return n};oe.createRandom=function(){var t=new Date,e=+t+t.getTimezoneOffset()*6e4,r=qt.util.createBuffer();return r.putInt32(e),r.putBytes(qt.random.getBytes(28)),r};oe.createRecord=function(t,e){if(!e.data)return null;var r={type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data};return r};oe.createAlert=function(t,e){var r=qt.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),oe.createRecord(t,{type:oe.ContentType.alert,data:r})};oe.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=qt.util.createBuffer(),r=0;r0&&(h+=2);var m=t.session.id,g=m.length+1+2+4+28+2+o+1+c+h,A=qt.util.createBuffer();return A.putByte(oe.HandshakeType.client_hello),A.putInt24(g),A.putByte(t.version.major),A.putByte(t.version.minor),A.putBytes(t.session.sp.client_random),hS(A,1,qt.util.createBuffer(m)),hS(A,2,e),hS(A,1,s),h>0&&hS(A,2,l),A};oe.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,n=qt.util.createBuffer();return n.putByte(oe.HandshakeType.server_hello),n.putInt24(r),n.putByte(t.version.major),n.putByte(t.version.minor),n.putBytes(t.session.sp.server_random),hS(n,1,qt.util.createBuffer(e)),n.putByte(t.session.cipherSuite.id[0]),n.putByte(t.session.cipherSuite.id[1]),n.putByte(t.session.compressionMethod),n};oe.createCertificate=function(t){var e=t.entity===oe.ConnectionEnd.client,r=null;if(t.getCertificate){var n;e?n=t.session.certificateRequest:n=t.session.extensions.server_name.serverNameList,r=t.getCertificate(t,n)}var o=qt.util.createBuffer();if(r!==null)try{qt.util.isArray(r)||(r=[r]);for(var s=null,c=0;c0&&(r.putByte(oe.HandshakeType.server_key_exchange),r.putInt24(e)),r};oe.getClientSignature=function(t,e){var r=qt.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(n,o,s){var c=null;if(n.getPrivateKey)try{c=n.getPrivateKey(n,n.session.clientCertificate),c=qt.pki.privateKeyFromPem(c)}catch(l){n.error(n,{message:"Could not get private key.",cause:l,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}})}c===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}):o=c.sign(o,null),s(n,o)},t.getSignature(t,r,e)};oe.createCertificateVerify=function(t,e){var r=e.length+2,n=qt.util.createBuffer();return n.putByte(oe.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(e.length),n.putBytes(e),n};oe.createCertificateRequest=function(t){var e=qt.util.createBuffer();e.putByte(1);var r=qt.util.createBuffer();for(var n in t.caStore.certs){var o=t.caStore.certs[n],s=qt.pki.distinguishedNameToAsn1(o.subject),c=qt.asn1.toDer(s);r.putInt16(c.length()),r.putBuffer(c)}var l=1+e.length()+2+r.length(),u=qt.util.createBuffer();return u.putByte(oe.HandshakeType.certificate_request),u.putInt24(l),hS(u,1,e),hS(u,2,r),u};oe.createServerHelloDone=function(t){var e=qt.util.createBuffer();return e.putByte(oe.HandshakeType.server_hello_done),e.putInt24(0),e};oe.createChangeCipherSpec=function(){var t=qt.util.createBuffer();return t.putByte(1),t};oe.createFinished=function(t){var e=qt.util.createBuffer();e.putBuffer(t.session.md5.digest()),e.putBuffer(t.session.sha1.digest());var r=t.entity===oe.ConnectionEnd.client,n=t.session.sp,o=12,s=NWe,c=r?"client finished":"server finished";e=s(n.master_secret,c,e.getBytes(),o);var l=qt.util.createBuffer();return l.putByte(oe.HandshakeType.finished),l.putInt24(e.length()),l.putBuffer(e),l};oe.createHeartbeat=function(t,e,r){typeof r>"u"&&(r=e.length);var n=qt.util.createBuffer();n.putByte(t),n.putInt16(r),n.putBytes(e);var o=n.length(),s=Math.max(16,o-r-3);return n.putBytes(qt.random.getBytes(s)),n};oe.queue=function(t,e){if(e&&!(e.fragment.length()===0&&(e.type===oe.ContentType.handshake||e.type===oe.ContentType.alert||e.type===oe.ContentType.change_cipher_spec))){if(e.type===oe.ContentType.handshake){var r=e.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var n;if(e.fragment.length()<=oe.MaxFragment)n=[e];else{n=[];for(var o=e.fragment.bytes();o.length>oe.MaxFragment;)n.push(oe.createRecord(t,{type:e.type,data:qt.util.createBuffer(o.slice(0,oe.MaxFragment))})),o=o.slice(oe.MaxFragment);o.length>0&&n.push(oe.createRecord(t,{type:e.type,data:qt.util.createBuffer(o)}))}for(var s=0;s0&&(c=r.order[0]),c!==null&&c in r.cache){s=r.cache[c],delete r.cache[c];for(var l in r.order)if(r.order[l]===c){r.order.splice(l,1);break}}return s},r.setSession=function(o,s){if(r.order.length===r.capacity){var c=r.order.shift();delete r.cache[c]}var c=qt.util.bytesToHex(o);r.order.push(c),r.cache[c]=s}}return r};oe.createConnection=function(t){var e=null;t.caStore?qt.util.isArray(t.caStore)?e=qt.pki.createCaStore(t.caStore):e=t.caStore:e=qt.pki.createCaStore();var r=t.cipherSuites||null;if(r===null){r=[];for(var n in oe.CipherSuites)r.push(oe.CipherSuites[n])}var o=t.server?oe.ConnectionEnd.server:oe.ConnectionEnd.client,s=t.sessionCache?oe.createSessionCache(t.sessionCache):null,c={version:{major:oe.Version.major,minor:oe.Version.minor},entity:o,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(p,h,m,g){return h},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:qt.util.createBuffer(),tlsData:qt.util.createBuffer(),data:qt.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:a(function(p,h){h.origin=h.origin||(p.entity===oe.ConnectionEnd.client?"client":"server"),h.send&&(oe.queue(p,oe.createAlert(p,h.alert)),oe.flush(p));var m=h.fatal!==!1;m&&(p.fail=!0),t.error(p,h),m&&p.close(!1)},"error"),deflate:t.deflate||null,inflate:t.inflate||null};c.reset=function(p){c.version={major:oe.Version.major,minor:oe.Version.minor},c.record=null,c.session=null,c.peerCertificate=null,c.state={pending:null,current:null},c.expect=c.entity===oe.ConnectionEnd.client?bMo:PMo,c.fragmented=null,c.records=[],c.open=!1,c.handshakes=0,c.handshaking=!1,c.isConnected=!1,c.fail=!(p||typeof p>"u"),c.input.clear(),c.tlsData.clear(),c.data.clear(),c.state.current=oe.createConnectionState(c)},c.reset();var l=a(function(p,h){var m=h.type-oe.ContentType.change_cipher_spec,g=E7t[p.entity][p.expect];m in g?g[m](p,h):oe.handleUnexpected(p,h)},"_update"),u=a(function(p){var h=0,m=p.input,g=m.length();if(g<5)h=5-g;else{p.record={type:m.getByte(),version:{major:m.getByte(),minor:m.getByte()},length:m.getInt16(),fragment:qt.util.createBuffer(),ready:!1};var A=p.record.version.major===p.version.major;A&&p.session&&p.session.version&&(A=p.record.version.minor===p.version.minor),A||p.error(p,{message:"Incompatible TLS version.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}})}return h},"_readRecordHeader"),d=a(function(p){var h=0,m=p.input,g=m.length();if(g0&&(c.sessionCache&&(h=c.sessionCache.getSession(p)),h===null&&(p="")),p.length===0&&c.sessionCache&&(h=c.sessionCache.getSession(),h!==null&&(p=h.id)),c.session={id:p,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:qt.md.md5.create(),sha1:qt.md.sha1.create()},h&&(c.version=h.version,c.session.sp=h.sp),c.session.sp.client_random=oe.createRandom().getBytes(),c.open=!0,oe.queue(c,oe.createRecord(c,{type:oe.ContentType.handshake,data:oe.createClientHello(c)})),oe.flush(c)}},c.process=function(p){var h=0;return p&&c.input.putBytes(p),c.fail||(c.record!==null&&c.record.ready&&c.record.fragment.isEmpty()&&(c.record=null),c.record===null&&(h=u(c)),!c.fail&&c.record!==null&&!c.record.ready&&(h=d(c)),!c.fail&&c.record!==null&&c.record.ready&&l(c,c.record)),h},c.prepare=function(p){return oe.queue(c,oe.createRecord(c,{type:oe.ContentType.application_data,data:qt.util.createBuffer(p)})),oe.flush(c)},c.prepareHeartbeatRequest=function(p,h){return p instanceof qt.util.ByteBuffer&&(p=p.bytes()),typeof h>"u"&&(h=p.length),c.expectedHeartbeatPayload=p,oe.queue(c,oe.createRecord(c,{type:oe.ContentType.heartbeat,data:oe.createHeartbeat(oe.HeartbeatMessageType.heartbeat_request,p,h)})),oe.flush(c)},c.close=function(p){if(!c.fail&&c.sessionCache&&c.session){var h={id:c.session.id,version:c.session.version,sp:c.session.sp};h.sp.keys=null,c.sessionCache.setSession(h.id,h)}c.open&&(c.open=!1,c.input.clear(),(c.isConnected||c.handshaking)&&(c.isConnected=c.handshaking=!1,oe.queue(c,oe.createAlert(c,{level:oe.Alert.Level.warning,description:oe.Alert.Description.close_notify})),oe.flush(c)),c.closed(c)),c.reset(p)},c};j0n.exports=qt.tls=qt.tls||{};for(PWe in oe)typeof oe[PWe]!="function"&&(qt.tls[PWe]=oe[PWe]);var PWe;qt.tls.prf_tls1=NWe;qt.tls.hmac_sha1=CMo;qt.tls.createSessionCache=oe.createSessionCache;qt.tls.createConnection=oe.createConnection});var W0n=T((VBu,V0n)=>{f();var M9=No();x9();C7t();var mS=V0n.exports=M9.tls;mS.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:a(function(t){t.bulk_cipher_algorithm=mS.BulkCipherAlgorithm.aes,t.cipher_type=mS.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=mS.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},"initSecurityParameters"),initConnectionState:$0n};mS.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:a(function(t){t.bulk_cipher_algorithm=mS.BulkCipherAlgorithm.aes,t.cipher_type=mS.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=mS.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},"initSecurityParameters"),initConnectionState:$0n};function $0n(t,e,r){var n=e.entity===M9.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:M9.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:M9.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=HMo,t.write.cipherFunction=QMo,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=mS.hmac_sha1}a($0n,"initConnectionState");function QMo(t,e){var r=!1,n=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(n),e.updateSequenceNumber();var o;t.version.minor===mS.Versions.TLS_1_0.minor?o=e.cipherState.init?null:e.cipherState.iv:o=M9.random.getBytesSync(16),e.cipherState.init=!0;var s=e.cipherState.cipher;return s.start({iv:o}),t.version.minor>=mS.Versions.TLS_1_1.minor&&s.output.putBytes(o),s.update(t.fragment),s.finish(qMo)&&(t.fragment=s.output,t.length=t.fragment.length(),r=!0),r}a(QMo,"encrypt_aes_cbc_sha1");function qMo(t,e,r){if(!r){var n=t-e.length()%t;e.fillWithByte(n-1,n)}return!0}a(qMo,"encrypt_aes_cbc_sha1_padding");function GMo(t,e,r){var n=!0;if(r){for(var o=e.length(),s=e.last(),c=o-1-s;c=s?(t.fragment=o.output.getBytes(l-s),c=o.output.getBytes(s)):t.fragment=o.output.getBytes(),t.fragment=M9.util.createBuffer(t.fragment),t.length=t.fragment.length();var u=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),r=jMo(e.macKey,c,u)&&r,r}a(HMo,"decrypt_aes_cbc_sha1");function jMo(t,e,r){var n=M9.hmac.create();return n.start("SHA1",t),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),e===r}a(jMo,"compareMacs")});var b7t=T((YBu,J0n)=>{f();var nu=No();lN();Ea();var Pve=J0n.exports=nu.sha512=nu.sha512||{};nu.md.sha512=nu.md.algorithms.sha512=Pve;var Y0n=nu.sha384=nu.sha512.sha384=nu.sha512.sha384||{};Y0n.create=function(){return Pve.create("SHA-384")};nu.md.sha384=nu.md.algorithms.sha384=Y0n;nu.sha512.sha256=nu.sha512.sha256||{create:a(function(){return Pve.create("SHA-512/256")},"create")};nu.md["sha512/256"]=nu.md.algorithms["sha512/256"]=nu.sha512.sha256;nu.sha512.sha224=nu.sha512.sha224||{create:a(function(){return Pve.create("SHA-512/224")},"create")};nu.md["sha512/224"]=nu.md.algorithms["sha512/224"]=nu.sha512.sha224;Pve.create=function(t){if(K0n||$Mo(),typeof t>"u"&&(t="SHA-512"),!(t in rW))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=rW[t],r=null,n=nu.util.createBuffer(),o=new Array(80),s=0;s<80;++s)o[s]=new Array(2);var c=64;switch(t){case"SHA-384":c=48;break;case"SHA-512/256":c=32;break;case"SHA-512/224":c=28;break}var l={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:c,messageLength:0,fullMessageLength:null,messageLengthSize:16};return l.start=function(){l.messageLength=0,l.fullMessageLength=l.messageLength128=[];for(var u=l.messageLengthSize/4,d=0;d>>0,p>>>0];for(var h=l.fullMessageLength.length-1;h>=0;--h)l.fullMessageLength[h]+=p[1],p[1]=p[0]+(l.fullMessageLength[h]/4294967296>>>0),l.fullMessageLength[h]=l.fullMessageLength[h]>>>0,p[0]=p[1]/4294967296>>>0;return n.putBytes(u),z0n(r,o,n),(n.read>2048||n.length()===0)&&n.compact(),l},l.digest=function(){var u=nu.util.createBuffer();u.putBytes(n.bytes());var d=l.fullMessageLength[l.fullMessageLength.length-1]+l.messageLengthSize,p=d&l.blockLength-1;u.putBytes(_7t.substr(0,l.blockLength-p));for(var h,m,g=l.fullMessageLength[0]*8,A=0;A>>0,g+=m,u.putInt32(g>>>0),g=h>>>0;u.putInt32(g);for(var y=new Array(r.length),A=0;A=128;){for(N=0;N<16;++N)e[N][0]=r.getInt32()>>>0,e[N][1]=r.getInt32()>>>0;for(;N<80;++N)L=e[N-2],F=L[0],U=L[1],n=((F>>>19|U<<13)^(U>>>29|F<<3)^F>>>6)>>>0,o=((F<<13|U>>>19)^(U<<3|F>>>29)^(F<<26|U>>>6))>>>0,$=e[N-15],F=$[0],U=$[1],s=((F>>>1|U<<31)^(F>>>8|U<<24)^F>>>7)>>>0,c=((F<<31|U>>>1)^(F<<24|U>>>8)^(F<<25|U>>>7))>>>0,H=e[N-7],W=e[N-16],U=o+H[1]+c+W[1],e[N][0]=n+H[0]+s+W[0]+(U/4294967296>>>0)>>>0,e[N][1]=U>>>0;for(y=t[0][0],E=t[0][1],_=t[1][0],v=t[1][1],b=t[2][0],I=t[2][1],x=t[3][0],R=t[3][1],w=t[4][0],P=t[4][1],k=t[5][0],Q=t[5][1],M=t[6][0],D=t[6][1],G=t[7][0],O=t[7][1],N=0;N<80;++N)d=((w>>>14|P<<18)^(w>>>18|P<<14)^(P>>>9|w<<23))>>>0,p=((w<<18|P>>>14)^(w<<14|P>>>18)^(P<<23|w>>>9))>>>0,h=(M^w&(k^M))>>>0,m=(D^P&(Q^D))>>>0,l=((y>>>28|E<<4)^(E>>>2|y<<30)^(E>>>7|y<<25))>>>0,u=((y<<4|E>>>28)^(E<<30|y>>>2)^(E<<25|y>>>7))>>>0,g=(y&_|b&(y^_))>>>0,A=(E&v|I&(E^v))>>>0,U=O+p+m+v7t[N][1]+e[N][1],n=G+d+h+v7t[N][0]+e[N][0]+(U/4294967296>>>0)>>>0,o=U>>>0,U=u+A,s=l+g+(U/4294967296>>>0)>>>0,c=U>>>0,G=M,O=D,M=k,D=Q,k=w,Q=P,U=R+o,w=x+n+(U/4294967296>>>0)>>>0,P=U>>>0,x=b,R=I,b=_,I=v,_=y,v=E,U=o+c,y=n+s+(U/4294967296>>>0)>>>0,E=U>>>0;U=t[0][1]+E,t[0][0]=t[0][0]+y+(U/4294967296>>>0)>>>0,t[0][1]=U>>>0,U=t[1][1]+v,t[1][0]=t[1][0]+_+(U/4294967296>>>0)>>>0,t[1][1]=U>>>0,U=t[2][1]+I,t[2][0]=t[2][0]+b+(U/4294967296>>>0)>>>0,t[2][1]=U>>>0,U=t[3][1]+R,t[3][0]=t[3][0]+x+(U/4294967296>>>0)>>>0,t[3][1]=U>>>0,U=t[4][1]+P,t[4][0]=t[4][0]+w+(U/4294967296>>>0)>>>0,t[4][1]=U>>>0,U=t[5][1]+Q,t[5][0]=t[5][0]+k+(U/4294967296>>>0)>>>0,t[5][1]=U>>>0,U=t[6][1]+D,t[6][0]=t[6][0]+M+(U/4294967296>>>0)>>>0,t[6][1]=U>>>0,U=t[7][1]+O,t[7][0]=t[7][0]+G+(U/4294967296>>>0)>>>0,t[7][1]=U>>>0,j-=128}}a(z0n,"_update")});var X0n=T(T7t=>{f();var VMo=No();xw();var Nh=VMo.asn1;T7t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};T7t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Nh.Class.UNIVERSAL,type:Nh.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var dpn=T((e3u,upn)=>{f();var Um=No();Ive();uS();b7t();Ea();var ipn=X0n(),WMo=ipn.publicKeyValidator,zMo=ipn.privateKeyValidator;typeof Z0n>"u"&&(Z0n=Um.jsbn.BigInteger);var Z0n,I7t=Um.util.ByteBuffer,NC=typeof Buffer>"u"?Uint8Array:Buffer;Um.pki=Um.pki||{};upn.exports=Um.pki.ed25519=Um.ed25519=Um.ed25519||{};var hs=Um.ed25519;hs.constants={};hs.constants.PUBLIC_KEY_BYTE_LENGTH=32;hs.constants.PRIVATE_KEY_BYTE_LENGTH=64;hs.constants.SEED_BYTE_LENGTH=32;hs.constants.SIGN_BYTE_LENGTH=64;hs.constants.HASH_BYTE_LENGTH=64;hs.generateKeyPair=function(t){t=t||{};var e=t.seed;if(e===void 0)e=Um.random.getBytesSync(hs.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==hs.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+hs.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=A4({message:e,encoding:"binary"});for(var r=new NC(hs.constants.PUBLIC_KEY_BYTE_LENGTH),n=new NC(hs.constants.PRIVATE_KEY_BYTE_LENGTH),o=0;o<32;++o)n[o]=e[o];return XMo(r,n),{publicKey:r,privateKey:n}};hs.privateKeyFromAsn1=function(t){var e={},r=[],n=Um.asn1.validate(t,zMo,e,r);if(!n){var o=new Error("Invalid Key.");throw o.errors=r,o}var s=Um.asn1.derToOid(e.privateKeyOid),c=Um.oids.EdDSA25519;if(s!==c)throw new Error('Invalid OID "'+s+'"; OID must be "'+c+'".');var l=e.privateKey,u=A4({message:Um.asn1.fromDer(l).value,encoding:"binary"});return{privateKeyBytes:u}};hs.publicKeyFromAsn1=function(t){var e={},r=[],n=Um.asn1.validate(t,WMo,e,r);if(!n){var o=new Error("Invalid Key.");throw o.errors=r,o}var s=Um.asn1.derToOid(e.publicKeyOid),c=Um.oids.EdDSA25519;if(s!==c)throw new Error('Invalid OID "'+s+'"; OID must be "'+c+'".');var l=e.ed25519PublicKey;if(l.length!==hs.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return A4({message:l,encoding:"binary"})};hs.publicKeyFromPrivateKey=function(t){t=t||{};var e=A4({message:t.privateKey,encoding:"binary"});if(e.length!==hs.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+hs.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new NC(hs.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n=0};function A4(t){var e=t.message;if(e instanceof Uint8Array||e instanceof NC)return e;var r=t.encoding;if(e===void 0)if(t.md)e=t.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,r);e=new I7t(e,r)}else if(!(e instanceof I7t))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new NC(e.length()),o=0;o=0;--r){if(t[e+r]kve[r])return!1}return!1}a(tOo,"_isCanonicalSignatureScalar");function opn(t,e){var r,n,o,s;for(n=63;n>=32;--n){for(r=0,o=n-32,s=n-12;o>8,e[o]-=r*256;e[o]+=r,e[n]=0}for(r=0,o=0;o<32;++o)e[o]+=r-(e[31]>>4)*kve[o],r=e[o]>>8,e[o]&=255;for(o=0;o<32;++o)e[o]-=r*kve[o];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,t[n]=e[n]&255}a(opn,"modL");function w7t(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;opn(t,e)}a(w7t,"reduce");function R7t(t,e){var r=gi(),n=gi(),o=gi(),s=gi(),c=gi(),l=gi(),u=gi(),d=gi(),p=gi();Nse(r,t[1],t[0]),Nse(p,e[1],e[0]),Yc(r,r,p),kse(n,t[0],t[1]),kse(p,e[0],e[1]),Yc(n,n,p),Yc(o,t[3],e[3]),Yc(o,o,KMo),Yc(s,t[2],e[2]),kse(s,s,s),Nse(c,n,r),Nse(l,s,o),kse(u,s,o),kse(d,n,r),Yc(t[0],c,l),Yc(t[1],d,u),Yc(t[2],u,l),Yc(t[3],c,d)}a(R7t,"add");function rpn(t,e,r){for(var n=0;n<4;++n)lpn(t[n],e[n],r)}a(rpn,"cswap");function P7t(t,e){var r=gi(),n=gi(),o=gi();sOo(o,e[2]),Yc(r,e[0],o),Yc(n,e[1],o),MWe(t,n),t[31]^=apn(r)<<7}a(P7t,"pack");function MWe(t,e){var r,n,o,s=gi(),c=gi();for(r=0;r<16;++r)c[r]=e[r];for(S7t(c),S7t(c),S7t(c),n=0;n<2;++n){for(s[0]=c[0]-65517,r=1;r<15;++r)s[r]=c[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=c[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,lpn(c,s,1-o)}for(r=0;r<16;r++)t[2*r]=c[r]&255,t[2*r+1]=c[r]>>8}a(MWe,"pack25519");function rOo(t,e){var r=gi(),n=gi(),o=gi(),s=gi(),c=gi(),l=gi(),u=gi();return O9(t[2],DWe),nOo(t[1],e),nW(o,t[1]),Yc(s,o,YMo),Nse(o,o,t[2]),kse(s,t[2],s),nW(c,s),nW(l,c),Yc(u,l,c),Yc(r,u,o),Yc(r,r,s),iOo(r,r),Yc(r,r,o),Yc(r,r,s),Yc(r,r,s),Yc(t[0],r,s),nW(n,t[0]),Yc(n,n,s),npn(n,o)&&Yc(t[0],t[0],JMo),nW(n,t[0]),Yc(n,n,s),npn(n,o)?-1:(apn(t[0])===e[31]>>7&&Nse(t[0],x7t,t[0]),Yc(t[3],t[0],t[1]),0)}a(rOo,"unpackneg");function nOo(t,e){var r;for(r=0;r<16;++r)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}a(nOo,"unpack25519");function iOo(t,e){var r=gi(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=250;n>=0;--n)nW(r,r),n!==1&&Yc(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}a(iOo,"pow2523");function npn(t,e){var r=new NC(32),n=new NC(32);return MWe(r,t),MWe(n,e),spn(r,0,n,0)}a(npn,"neq25519");function spn(t,e,r,n){return oOo(t,e,r,n,32)}a(spn,"crypto_verify_32");function oOo(t,e,r,n,o){var s,c=0;for(s=0;s>>8)-1}a(oOo,"vn");function apn(t){var e=new NC(32);return MWe(e,t),e[0]&1}a(apn,"par25519");function cpn(t,e,r){var n,o;for(O9(t[0],x7t),O9(t[1],DWe),O9(t[2],DWe),O9(t[3],x7t),o=255;o>=0;--o)n=r[o/8|0]>>(o&7)&1,rpn(t,e,n),R7t(e,t),R7t(t,t),rpn(t,e,n)}a(cpn,"scalarmult");function k7t(t,e){var r=[gi(),gi(),gi(),gi()];O9(r[0],epn),O9(r[1],tpn),O9(r[2],DWe),Yc(r[3],epn,tpn),cpn(t,r,e)}a(k7t,"scalarbase");function O9(t,e){var r;for(r=0;r<16;r++)t[r]=e[r]|0}a(O9,"set25519");function sOo(t,e){var r=gi(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=253;n>=0;--n)nW(r,r),n!==2&&n!==4&&Yc(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}a(sOo,"inv25519");function S7t(t){var e,r,n=1;for(e=0;e<16;++e)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-n*65536;t[0]+=n-1+37*(n-1)}a(S7t,"car25519");function lpn(t,e,r){for(var n,o=~(r-1),s=0;s<16;++s)n=o&(t[s]^e[s]),t[s]^=n,e[s]^=n}a(lpn,"sel25519");function gi(t){var e,r=new Float64Array(16);if(t)for(e=0;e{f();var Sv=No();Ea();uS();Ive();hpn.exports=Sv.kem=Sv.kem||{};var fpn=Sv.jsbn.BigInteger;Sv.kem.rsa={};Sv.kem.rsa.create=function(t,e){e=e||{};var r=e.prng||Sv.random,n={};return n.encrypt=function(o,s){var c=Math.ceil(o.n.bitLength()/8),l;do l=new fpn(Sv.util.bytesToHex(r.getBytesSync(c)),16).mod(o.n);while(l.compareTo(fpn.ONE)<=0);l=Sv.util.hexToBytes(l.toString(16));var u=c-l.length;u>0&&(l=Sv.util.fillString("\0",u)+l);var d=o.encrypt(l,"NONE"),p=t.generate(l,s);return{encapsulation:d,key:p}},n.decrypt=function(o,s,c){var l=o.decrypt(s,"NONE");return t.generate(l,c)},n};Sv.kem.kdf1=function(t,e){ppn(this,t,0,e||t.digestLength)};Sv.kem.kdf2=function(t,e){ppn(this,t,1,e||t.digestLength)};function ppn(t,e,r,n){t.generate=function(o,s){for(var c=new Sv.util.ByteBuffer,l=Math.ceil(s/n)+r,u=new Sv.util.ByteBuffer,d=r;d{f();var Rs=No();Ea();ypn.exports=Rs.log=Rs.log||{};Rs.log.levels=["none","error","warning","info","debug","verbose","max"];var OWe={},M7t=[],Mve=null;Rs.log.LEVEL_LOCKED=2;Rs.log.NO_LEVEL_CHECK=4;Rs.log.INTERPOLATE=8;for(AN=0;AN"u"||e?t.flags|=Rs.log.LEVEL_LOCKED:t.flags&=~Rs.log.LEVEL_LOCKED};Rs.log.addLogger=function(t){M7t.push(t)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(gpn={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Ove=a(function(t,e){Rs.log.prepareStandard(e);var r=gpn[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),r.apply(console,n)},"f"),Dse=Rs.log.makeLogger(Ove)):(Ove=a(function(e,r){Rs.log.prepareStandardFull(r),console.log(r.standardFull)},"f"),Dse=Rs.log.makeLogger(Ove)),Rs.log.setLevel(Dse,"debug"),Rs.log.addLogger(Dse),Mve=Dse):console={log:a(function(){},"log")};var Dse,gpn,Ove;Mve!==null&&typeof window<"u"&&window.location&&(Dve=new URL(window.location.href).searchParams,Dve.has("console.level")&&Rs.log.setLevel(Mve,Dve.get("console.level").slice(-1)[0]),Dve.has("console.lock")&&(Apn=Dve.get("console.lock").slice(-1)[0],Apn=="true"&&Rs.log.lock(Mve)));var Dve,Apn;Rs.log.consoleLogger=Mve});var _pn=T((l3u,Cpn)=>{f();Cpn.exports=lN();hWe();Ise();z9t();b7t()});var Tpn=T((d3u,bpn)=>{f();var Br=No();x9();xw();Tve();w9();KV();c7t();uS();Ea();wWe();var Oe=Br.asn1,Iy=bpn.exports=Br.pkcs7=Br.pkcs7||{};Iy.messageFromPem=function(t){var e=Br.pem.decode(t)[0];if(e.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=Oe.fromDer(e.body);return Iy.messageFromAsn1(n)};Iy.messageToPem=function(t,e){var r={type:"PKCS7",body:Oe.toDer(t.toAsn1()).getBytes()};return Br.pem.encode(r,{maxline:e})};Iy.messageFromAsn1=function(t){var e={},r=[];if(!Oe.validate(t,Iy.asn1.contentInfoValidator,e,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var o=Oe.derToOid(e.contentType),s;switch(o){case Br.pki.oids.envelopedData:s=Iy.createEnvelopedData();break;case Br.pki.oids.encryptedData:s=Iy.createEncryptedData();break;case Br.pki.oids.signedData:s=Iy.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+o+" is not (yet) supported.")}return s.fromAsn1(e.content.value[0]),s};Iy.createSignedData=function(){var t=null;return t={type:Br.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:a(function(n){if(B7t(t,n,Iy.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var o=t.rawCapture.certificates.value,s=0;s0&&c.value[0].value.push(Oe.create(Oe.Class.CONTEXT_SPECIFIC,0,!0,n)),s.length>0&&c.value[0].value.push(Oe.create(Oe.Class.CONTEXT_SPECIFIC,1,!0,s)),c.value[0].value.push(Oe.create(Oe.Class.UNIVERSAL,Oe.Type.SET,!0,t.signerInfos)),Oe.create(Oe.Class.UNIVERSAL,Oe.Type.SEQUENCE,!0,[Oe.create(Oe.Class.UNIVERSAL,Oe.Type.OID,!1,Oe.oidToDer(t.type).getBytes()),c])},"toAsn1"),addSigner:a(function(n){var o=n.issuer,s=n.serialNumber;if(n.certificate){var c=n.certificate;typeof c=="string"&&(c=Br.pki.certificateFromPem(c)),o=c.issuer.attributes,s=c.serialNumber}var l=n.key;if(!l)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof l=="string"&&(l=Br.pki.privateKeyFromPem(l));var u=n.digestAlgorithm||Br.pki.oids.sha1;switch(u){case Br.pki.oids.sha1:case Br.pki.oids.sha256:case Br.pki.oids.sha384:case Br.pki.oids.sha512:case Br.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var d=n.authenticatedAttributes||[];if(d.length>0){for(var p=!1,h=!1,m=0;m0){for(var r=Oe.create(Oe.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=r&&o{f();var w0=No();x9();vse();hWe();Ise();Ea();var LWe=Spn.exports=w0.ssh=w0.ssh||{};LWe.privateKeyToPutty=function(t,e,r){r=r||"",e=e||"";var n="ssh-rsa",o=e===""?"none":"aes256-cbc",s="PuTTY-User-Key-File-2: "+n+`\r +`+l+e.substr(c+1),s=o-c-1,c=-1,++o}else(e[o]===" "||e[o]===" "||e[o]===",")&&(c=o);return e}a(bVe,"foldHeader");function qNo(t){return t.replace(/^\s+/,"")}a(qNo,"ltrim")});var C1e=T((tLu,F0n)=>{f();var Iu=wo();mVe();a7t();pa();F0n.exports=Iu.des=Iu.des||{};Iu.des.startEncrypting=function(t,e,r,n){var o=SVe({key:t,output:r,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return o.start(e),o};Iu.des.createEncryptionCipher=function(t,e){return SVe({key:t,output:null,decrypt:!1,mode:e})};Iu.des.startDecrypting=function(t,e,r,n){var o=SVe({key:t,output:r,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return o.start(e),o};Iu.des.createDecryptionCipher=function(t,e){return SVe({key:t,output:null,decrypt:!0,mode:e})};Iu.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:a(function(n,o){return L0n(r._keys,n,o,!1)},"encrypt"),decrypt:a(function(n,o){return L0n(r._keys,n,o,!0)},"decrypt")}}),r._init=!1};Iu.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=Iu.util.createBuffer(t.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=KNo(e),this._init=!0}};Zk("DES-ECB",Iu.cipher.modes.ecb);Zk("DES-CBC",Iu.cipher.modes.cbc);Zk("DES-CFB",Iu.cipher.modes.cfb);Zk("DES-OFB",Iu.cipher.modes.ofb);Zk("DES-CTR",Iu.cipher.modes.ctr);Zk("3DES-ECB",Iu.cipher.modes.ecb);Zk("3DES-CBC",Iu.cipher.modes.cbc);Zk("3DES-CFB",Iu.cipher.modes.cfb);Zk("3DES-OFB",Iu.cipher.modes.ofb);Zk("3DES-CTR",Iu.cipher.modes.ctr);function Zk(t,e){var r=a(function(){return new Iu.des.Algorithm(t,e)},"factory");Iu.cipher.registerAlgorithm(t,r)}a(Zk,"registerAlgorithm");var GNo=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],HNo=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],jNo=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],$No=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],VNo=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],WNo=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],zNo=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],YNo=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function KNo(t){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],c=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],l=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],d=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],p=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],m=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],g=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],A=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=t.length()>8?3:1,E=[],_=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,b,I=0;I>>4^w)&252645135,w^=b,x^=b<<4,b=(w>>>-16^x)&65535,x^=b,w^=b<<-16,b=(x>>>2^w)&858993459,w^=b,x^=b<<2,b=(w>>>-16^x)&65535,x^=b,w^=b<<-16,b=(x>>>1^w)&1431655765,w^=b,x^=b<<1,b=(w>>>8^x)&16711935,x^=b,w^=b<<8,b=(x>>>1^w)&1431655765,w^=b,x^=b<<1,b=x<<8|w>>>20&240,x=w<<24|w<<8&16711680|w>>>8&65280|w>>>24&240,w=b;for(var R=0;R<_.length;++R){_[R]?(x=x<<2|x>>>26,w=w<<2|w>>>26):(x=x<<1|x>>>27,w=w<<1|w>>>27),x&=-15,w&=-15;var P=e[x>>>28]|r[x>>>24&15]|n[x>>>20&15]|o[x>>>16&15]|s[x>>>12&15]|c[x>>>8&15]|l[x>>>4&15],k=u[w>>>28]|d[w>>>24&15]|p[w>>>20&15]|h[w>>>16&15]|m[w>>>12&15]|g[w>>>8&15]|A[w>>>4&15];b=(k>>>16^P)&65535,E[v++]=P^b,E[v++]=k^b<<16}}return E}a(KNo,"_createKeys");function L0n(t,e,r,n){var o=t.length===32?3:9,s;o===3?s=n?[30,-2,-2]:[0,32,2]:s=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var c,l=e[0],u=e[1];c=(l>>>4^u)&252645135,u^=c,l^=c<<4,c=(l>>>16^u)&65535,u^=c,l^=c<<16,c=(u>>>2^l)&858993459,l^=c,u^=c<<2,c=(u>>>8^l)&16711935,l^=c,u^=c<<8,c=(l>>>1^u)&1431655765,u^=c,l^=c<<1,l=l<<1|l>>>31,u=u<<1|u>>>31;for(var d=0;d>>4|u<<28)^t[m+1];c=l,l=u,u=c^(HNo[g>>>24&63]|$No[g>>>16&63]|WNo[g>>>8&63]|YNo[g&63]|GNo[A>>>24&63]|jNo[A>>>16&63]|VNo[A>>>8&63]|zNo[A&63])}c=l,l=u,u=c}l=l>>>1|l<<31,u=u>>>1|u<<31,c=(l>>>1^u)&1431655765,u^=c,l^=c<<1,c=(u>>>8^l)&16711935,l^=c,u^=c<<8,c=(u>>>2^l)&858993459,l^=c,u^=c<<2,c=(l>>>16^u)&65535,u^=c,l^=c<<16,c=(l>>>4^u)&252645135,u^=c,l^=c<<4,r[0]=l,r[1]=u}a(L0n,"_updateBlock");function SVe(t){t=t||{};var e=(t.mode||"CBC").toUpperCase(),r="DES-"+e,n;t.decrypt?n=Iu.cipher.createDecipher(r,t.key):n=Iu.cipher.createCipher(r,t.key);var o=n.start;return n.start=function(s,c){var l=null;c instanceof Iu.util.ByteBuffer&&(l=c,c={}),c=c||{},c.output=l,c.iv=s,o.call(n,c)},n}a(SVe,"_createCipher")});var IVe=T((iLu,U0n)=>{f();var my=wo();Boe();Jk();pa();var JNo=my.pkcs5=my.pkcs5||{},J4;my.util.isNodejs&&!my.options.usePureJavaScript&&(J4=require("crypto"));U0n.exports=my.pbkdf2=JNo.pbkdf2=function(t,e,r,n,o,s){if(typeof o=="function"&&(s=o,o=null),my.util.isNodejs&&!my.options.usePureJavaScript&&J4.pbkdf2&&(o===null||typeof o!="object")&&(J4.pbkdf2Sync.length>4||!o||o==="sha1"))return typeof o!="string"&&(o="sha1"),t=Buffer.from(t,"binary"),e=Buffer.from(e,"binary"),s?J4.pbkdf2Sync.length===4?J4.pbkdf2(t,e,r,n,function(b,I){if(b)return s(b);s(null,I.toString("binary"))}):J4.pbkdf2(t,e,r,n,o,function(b,I){if(b)return s(b);s(null,I.toString("binary"))}):J4.pbkdf2Sync.length===4?J4.pbkdf2Sync(t,e,r,n).toString("binary"):J4.pbkdf2Sync(t,e,r,n,o).toString("binary");if((typeof o>"u"||o===null)&&(o="sha1"),typeof o=="string"){if(!(o in my.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=my.md[o].create()}var c=o.digestLength;if(n>4294967295*c){var l=new Error("Derived key is too long.");if(s)return s(l);throw l}var u=Math.ceil(n/c),d=n-(u-1)*c,p=my.hmac.create();p.start(o,t);var h="",m,g,A;if(!s){for(var y=1;y<=u;++y){p.start(null,null),p.update(e),p.update(my.util.int32ToBytes(y)),m=A=p.digest().getBytes();for(var E=2;E<=r;++E)p.start(null,null),p.update(A),g=p.digest().getBytes(),m=my.util.xorBytes(m,g,c),A=g;h+=yu)return s(null,h);p.start(null,null),p.update(e),p.update(my.util.int32ToBytes(y)),m=A=p.digest().getBytes(),E=2,v()}a(_,"outer");function v(){if(E<=r)return p.start(null,null),p.update(A),g=p.digest().getBytes(),m=my.util.xorBytes(m,g,c),A=g,++E,my.util.setImmediate(v);h+=y{f();var e5=wo();Jk();pa();var q0n=j0n.exports=e5.sha256=e5.sha256||{};e5.md.sha256=e5.md.algorithms.sha256=q0n;q0n.create=function(){G0n||XNo();var t=null,e=e5.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),Q0n(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=e5.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(p7t.substr(0,n.blockLength-c));for(var l,u,d=n.fullMessageLength[0]*8,p=0;p>>0,d+=u,o.putInt32(d>>>0),d=l>>>0;o.putInt32(d);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};Q0n(h,r,o);var m=e5.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m.putInt32(h.h5),m.putInt32(h.h6),m.putInt32(h.h7),m},n};var p7t=null,G0n=!1,H0n=null;function XNo(){p7t="\x80",p7t+=e5.util.fillString("\0",64),H0n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],G0n=!0}a(XNo,"_init");function Q0n(t,e,r){for(var n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v=r.length();v>=64;){for(d=0;d<16;++d)e[d]=r.getInt32();for(;d<64;++d)n=e[d-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,o=e[d-15],o=(o>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,e[d]=n+e[d-7]+o+e[d-16]|0;for(p=t.h0,h=t.h1,m=t.h2,g=t.h3,A=t.h4,y=t.h5,E=t.h6,_=t.h7,d=0;d<64;++d)c=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),l=E^A&(y^E),s=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),u=p&h|m&(p^h),n=_+c+l+H0n[d]+e[d],o=s+u,_=E,E=y,y=A,A=g+n>>>0,g=m,m=h,h=p,p=n+o>>>0;t.h0=t.h0+p|0,t.h1=t.h1+h|0,t.h2=t.h2+m|0,t.h3=t.h3+g|0,t.h4=t.h4+A|0,t.h5=t.h5+y|0,t.h6=t.h6+E|0,t.h7=t.h7+_|0,v-=64}}a(Q0n,"_update")});var m7t=T((uLu,$0n)=>{f();var t5=wo();pa();var xVe=null;t5.util.isNodejs&&!t5.options.usePureJavaScript&&!process.versions["node-webkit"]&&(xVe=require("crypto"));var ZNo=$0n.exports=t5.prng=t5.prng||{};ZNo.create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,n=new Array(32),o=0;o<32;++o)n[o]=r.create();e.pools=n,e.pool=0,e.generate=function(d,p){if(!p)return e.generateSync(d);var h=e.plugin.cipher,m=e.plugin.increment,g=e.plugin.formatKey,A=e.plugin.formatSeed,y=t5.util.createBuffer();e.key=null,E();function E(_){if(_)return p(_);if(y.length()>=d)return p(null,y.getBytes(d));if(e.generated>1048575&&(e.key=null),e.key===null)return t5.util.nextTick(function(){s(E)});var v=h(e.key,e.seed);e.generated+=v.length,y.putBytes(v),e.key=g(h(e.key,m(e.seed))),e.seed=A(h(e.key,e.seed)),t5.util.setImmediate(E)}a(E,"generate")},e.generateSync=function(d){var p=e.plugin.cipher,h=e.plugin.increment,m=e.plugin.formatKey,g=e.plugin.formatSeed;e.key=null;for(var A=t5.util.createBuffer();A.length()1048575&&(e.key=null),e.key===null&&c();var y=p(e.key,e.seed);e.generated+=y.length,A.putBytes(y),e.key=m(p(e.key,h(e.seed))),e.seed=g(p(e.key,e.seed))}return A.getBytes(d)};function s(d){if(e.pools[0].messageLength>=32)return l(),d();var p=32-e.pools[0].messageLength<<5;e.seedFile(p,function(h,m){if(h)return d(h);e.collect(m),l(),d()})}a(s,"_reseed");function c(){if(e.pools[0].messageLength>=32)return l();var d=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(d)),l()}a(c,"_reseedSync");function l(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var d=e.plugin.md.create();d.update(e.keyBytes);for(var p=1,h=0;h<32;++h)e.reseeds%p===0&&(d.update(e.pools[h].digest().getBytes()),e.pools[h].start()),p=p<<1;e.keyBytes=d.digest().getBytes(),d.start(),d.update(e.keyBytes);var m=d.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(m),e.generated=0}a(l,"_seed");function u(d){var p=null,h=t5.util.globalScope,m=h.crypto||h.msCrypto;m&&m.getRandomValues&&(p=a(function(x){return m.getRandomValues(x)},"getRandomValues"));var g=t5.util.createBuffer();if(p)for(;g.length()>16),v+=(_&32767)<<16,v+=_>>15,v=(v&2147483647)+(v>>31),I=v&4294967295;for(var E=0;E<3;++E)b=I>>>(E<<3),b^=Math.floor(Math.random()*256),g.putByte(b&255)}return g.getBytes(d)}return a(u,"defaultSeedFile"),xVe?(e.seedFile=function(d,p){xVe.randomBytes(d,function(h,m){if(h)return p(h);p(null,m.toString())})},e.seedFileSync=function(d){return xVe.randomBytes(d).toString()}):(e.seedFile=function(d,p){try{p(null,u(d))}catch(h){p(h)}},e.seedFileSync=u),e.collect=function(d){for(var p=d.length,h=0;h>m&255);e.collect(h)},e.registerWorker=function(d){if(d===self)e.seedFile=function(h,m){function g(A){var y=A.data;y.forge&&y.forge.prng&&(self.removeEventListener("message",g),m(y.forge.prng.err,y.forge.prng.bytes))}a(g,"listener"),self.addEventListener("message",g),self.postMessage({forge:{prng:{needed:h}}})};else{var p=a(function(h){var m=h.data;m.forge&&m.forge.prng&&e.seedFile(m.forge.prng.needed,function(g,A){d.postMessage({forge:{prng:{err:g,bytes:A}}})})},"listener");d.addEventListener("message",p)}},e}});var XT=T((pLu,g7t)=>{f();var Th=wo();e9();h7t();m7t();pa();(function(){if(Th.random&&Th.random.getBytes){g7t.exports=Th.random;return}(function(t){var e={},r=new Array(4),n=Th.util.createBuffer();e.formatKey=function(h){var m=Th.util.createBuffer(h);return h=new Array(4),h[0]=m.getInt32(),h[1]=m.getInt32(),h[2]=m.getInt32(),h[3]=m.getInt32(),Th.aes._expandKey(h,!1)},e.formatSeed=function(h){var m=Th.util.createBuffer(h);return h=new Array(4),h[0]=m.getInt32(),h[1]=m.getInt32(),h[2]=m.getInt32(),h[3]=m.getInt32(),h},e.cipher=function(h,m){return Th.aes._updateBlock(h,m,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},e.increment=function(h){return++h[3],h},e.md=Th.md.sha256;function o(){var h=Th.prng.create(e);return h.getBytes=function(m,g){return h.generate(m,g)},h.getBytesSync=function(m){return h.generate(m)},h}a(o,"spawnPrng");var s=o(),c=null,l=Th.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(c=a(function(h){return u.getRandomValues(h)},"getRandomValues")),Th.options.usePureJavaScript||!Th.util.isNodejs&&!c){if(typeof window>"u"||window.document,s.collectInt(+new Date,32),typeof navigator<"u"){var d="";for(var p in navigator)try{typeof navigator[p]=="string"&&(d+=navigator[p])}catch{}s.collect(d),d=null}t&&(t().mousemove(function(h){s.collectInt(h.clientX,16),s.collectInt(h.clientY,16)}),t().keypress(function(h){s.collectInt(h.charCode,8)}))}if(!Th.random)Th.random=s;else for(var p in s)Th.random[p]=s[p];Th.random.createInstance=o,g7t.exports=Th.random})(typeof jQuery<"u"?jQuery:null)})()});var y7t=T((gLu,z0n)=>{f();var E_=wo();pa();var A7t=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],V0n=[1,2,3,5],eMo=a(function(t,e){return t<>16-e},"rol"),tMo=a(function(t,e){return(t&65535)>>e|t<<16-e&65535},"ror");z0n.exports=E_.rc2=E_.rc2||{};E_.rc2.expandKey=function(t,e){typeof t=="string"&&(t=E_.util.createBuffer(t)),e=e||128;var r=t,n=t.length(),o=e,s=Math.ceil(o/8),c=255>>(o&7),l;for(l=n;l<128;l++)r.putByte(A7t[r.at(l-1)+r.at(l-n)&255]);for(r.setAt(128-s,A7t[r.at(128-s)&c]),l=127-s;l>=0;l--)r.setAt(l,A7t[r.at(l+1)^r.at(l+s)]);return r};var W0n=a(function(t,e,r){var n=!1,o=null,s=null,c=null,l,u,d,p,h=[];for(t=E_.rc2.expandKey(t,e),d=0;d<64;d++)h.push(t.getInt16Le());r?(l=a(function(A){for(d=0;d<4;d++)A[d]+=h[p]+(A[(d+3)%4]&A[(d+2)%4])+(~A[(d+3)%4]&A[(d+1)%4]),A[d]=eMo(A[d],V0n[d]),p++},"mixRound"),u=a(function(A){for(d=0;d<4;d++)A[d]+=h[A[(d+3)%4]&63]},"mashRound")):(l=a(function(A){for(d=3;d>=0;d--)A[d]=tMo(A[d],V0n[d]),A[d]-=h[p]+(A[(d+3)%4]&A[(d+2)%4])+(~A[(d+3)%4]&A[(d+1)%4]),p--},"mixRound"),u=a(function(A){for(d=3;d>=0;d--)A[d]-=h[A[(d+3)%4]&63]},"mashRound"));var m=a(function(A){var y=[];for(d=0;d<4;d++){var E=o.getInt16Le();c!==null&&(r?E^=c.getInt16Le():c.putInt16Le(E)),y.push(E&65535)}p=r?0:63;for(var _=0;_=8;)m([[5,l],[1,u],[6,l],[1,u],[5,l]])},"update"),finish:a(function(A){var y=!0;if(r)if(A)y=A(8,o,!r);else{var E=o.length()===8?8:8-o.length();o.fillWithByte(E,E)}if(y&&(n=!0,g.update()),!r&&(y=o.length()===0,y))if(A)y=A(8,s,!r);else{var _=s.length(),v=s.at(_-1);v>_?y=!1:s.truncate(v)}return y},"finish")},g},"createCipher");E_.rc2.startEncrypting=function(t,e,r){var n=E_.rc2.createEncryptionCipher(t,128);return n.start(e,r),n};E_.rc2.createEncryptionCipher=function(t,e){return W0n(t,e,!0)};E_.rc2.startDecrypting=function(t,e,r){var n=E_.rc2.createDecryptionCipher(t,128);return n.start(e,r),n};E_.rc2.createDecryptionCipher=function(t,e){return W0n(t,e,!1)}});var b1e=T((ELu,rpn)=>{f();var E7t=wo();rpn.exports=E7t.jsbn=E7t.jsbn||{};var X4,rMo=0xdeadbeefcafe,Y0n=(rMo&16777215)==15715070;function Bt(t,e,r){this.data=[],t!=null&&(typeof t=="number"?this.fromNumber(t,e,r):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}a(Bt,"BigInteger");E7t.jsbn.BigInteger=Bt;function Zs(){return new Bt(null)}a(Zs,"nbi");function nMo(t,e,r,n,o,s){for(;--s>=0;){var c=e*this.data[t++]+r.data[n]+o;o=Math.floor(c/67108864),r.data[n++]=c&67108863}return o}a(nMo,"am1");function iMo(t,e,r,n,o,s){for(var c=e&32767,l=e>>15;--s>=0;){var u=this.data[t]&32767,d=this.data[t++]>>15,p=l*u+d*c;u=c*u+((p&32767)<<15)+r.data[n]+(o&1073741823),o=(u>>>30)+(p>>>15)+l*d+(o>>>30),r.data[n++]=u&1073741823}return o}a(iMo,"am2");function K0n(t,e,r,n,o,s){for(var c=e&16383,l=e>>14;--s>=0;){var u=this.data[t]&16383,d=this.data[t++]>>14,p=l*u+d*c;u=c*u+((p&16383)<<14)+r.data[n]+o,o=(u>>28)+(p>>14)+l*d,r.data[n++]=u&268435455}return o}a(K0n,"am3");typeof navigator>"u"?(Bt.prototype.am=K0n,X4=28):Y0n&&navigator.appName=="Microsoft Internet Explorer"?(Bt.prototype.am=iMo,X4=30):Y0n&&navigator.appName!="Netscape"?(Bt.prototype.am=nMo,X4=26):(Bt.prototype.am=K0n,X4=28);Bt.prototype.DB=X4;Bt.prototype.DM=(1<=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s}a(sMo,"bnpCopyTo");function aMo(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0}a(aMo,"bnpFromInt");function r9(t){var e=Zs();return e.fromInt(t),e}a(r9,"nbv");function cMo(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==256)r=8;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else{this.fromRadix(t,e);return}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var c=r==8?t[n]&255:X0n(t,n);if(c<0){t.charAt(n)=="-"&&(o=!0);continue}o=!1,s==0?this.data[this.t++]=c:s+r>this.DB?(this.data[this.t-1]|=(c&(1<>this.DB-s):this.data[this.t-1]|=c<=this.DB&&(s-=this.DB)}r==8&&(t[0]&128)!=0&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t}a(lMo,"bnpClamp");function uMo(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var r=(1<0)for(l>l)>0&&(o=!0,s=J0n(n));c>=0;)l>(l+=this.DB-e)):(n=this.data[c]>>(l-=e)&r,l<=0&&(l+=this.DB,--c)),n>0&&(o=!0),o&&(s+=J0n(n));return o?s:"0"}a(uMo,"bnToString");function dMo(){var t=Zs();return Bt.ZERO.subTo(this,t),t}a(dMo,"bnNegate");function fMo(){return this.s<0?this.negate():this}a(fMo,"bnAbs");function pMo(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this.data[r]-t.data[r])!=0)return e;return 0}a(pMo,"bnCompareTo");function RVe(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}a(RVe,"nbits");function hMo(){return this.t<=0?0:this.DB*(this.t-1)+RVe(this.data[this.t-1]^this.s&this.DM)}a(hMo,"bnBitLength");function mMo(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s}a(mMo,"bnpDLShiftTo");function gMo(t,e){for(var r=t;r=0;--l)e.data[l+s+1]=this.data[l]>>n|c,c=(this.data[l]&o)<=0;--l)e.data[l]=0;e.data[s]=c,e.t=this.t+s+1,e.s=this.s,e.clamp()}a(AMo,"bnpLShiftTo");function yMo(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,o=this.DB-n,s=(1<>n;for(var c=r+1;c>n;n>0&&(e.data[this.t-r-1]|=(this.s&s)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()}a(EMo,"bnpSubTo");function _Mo(t,e){var r=this.abs(),n=t.abs(),o=r.t;for(e.t=o+n.t;--o>=0;)e.data[o]=0;for(o=0;o=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()}a(CMo,"bnpSquareTo");function vMo(t,e,r){var n=t.abs();if(!(n.t<=0)){var o=this.abs();if(o.t0?(n.lShiftTo(u,s),o.lShiftTo(u,r)):(n.copyTo(s),o.copyTo(r));var d=s.t,p=s.data[d-1];if(p!=0){var h=p*(1<1?s.data[d-2]>>this.F2:0),m=this.FV/h,g=(1<=0&&(r.data[r.t++]=1,r.subTo(_,r)),Bt.ONE.dlShiftTo(d,_),_.subTo(s,s);s.t=0;){var v=r.data[--y]==p?this.DM:Math.floor(r.data[y]*m+(r.data[y-1]+A)*g);if((r.data[y]+=s.am(0,v,r,E,0,d))0&&r.rShiftTo(u,r),c<0&&Bt.ZERO.subTo(r,r)}}}a(vMo,"bnpDivRemTo");function bMo(t){var e=Zs();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Bt.ZERO)>0&&t.subTo(e,e),e}a(bMo,"bnMod");function iV(t){this.m=t}a(iV,"Classic");function TMo(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}a(TMo,"cConvert");function SMo(t){return t}a(SMo,"cRevert");function IMo(t){t.divRemTo(this.m,null,t)}a(IMo,"cReduce");function xMo(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(xMo,"cMulTo");function wMo(t,e){t.squareTo(e),this.reduce(e)}a(wMo,"cSqrTo");iV.prototype.convert=TMo;iV.prototype.revert=SMo;iV.prototype.reduce=IMo;iV.prototype.mulTo=xMo;iV.prototype.sqrTo=wMo;function RMo(){if(this.t<1)return 0;var t=this.data[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}a(RMo,"bnpInvDigit");function oV(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}a(PMo,"montConvert");function kMo(t){var e=Zs();return t.copyTo(e),this.reduce(e),e}a(kMo,"montRevert");function DMo(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}a(DMo,"montReduce");function NMo(t,e){t.squareTo(e),this.reduce(e)}a(NMo,"montSqrTo");function MMo(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(MMo,"montMulTo");oV.prototype.convert=PMo;oV.prototype.revert=kMo;oV.prototype.reduce=DMo;oV.prototype.mulTo=MMo;oV.prototype.sqrTo=NMo;function OMo(){return(this.t>0?this.data[0]&1:this.s)==0}a(OMo,"bnpIsEven");function BMo(t,e){if(t>4294967295||t<1)return Bt.ONE;var r=Zs(),n=Zs(),o=e.convert(this),s=RVe(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,o,r);else{var c=r;r=n,n=c}return e.revert(r)}a(BMo,"bnpExp");function LMo(t,e){var r;return t<256||e.isEven()?r=new iV(e):r=new oV(e),this.exp(t,r)}a(LMo,"bnModPowInt");Bt.prototype.copyTo=sMo;Bt.prototype.fromInt=aMo;Bt.prototype.fromString=cMo;Bt.prototype.clamp=lMo;Bt.prototype.dlShiftTo=mMo;Bt.prototype.drShiftTo=gMo;Bt.prototype.lShiftTo=AMo;Bt.prototype.rShiftTo=yMo;Bt.prototype.subTo=EMo;Bt.prototype.multiplyTo=_Mo;Bt.prototype.squareTo=CMo;Bt.prototype.divRemTo=vMo;Bt.prototype.invDigit=RMo;Bt.prototype.isEven=OMo;Bt.prototype.exp=BMo;Bt.prototype.toString=uMo;Bt.prototype.negate=dMo;Bt.prototype.abs=fMo;Bt.prototype.compareTo=pMo;Bt.prototype.bitLength=hMo;Bt.prototype.mod=bMo;Bt.prototype.modPowInt=LMo;Bt.ZERO=r9(0);Bt.ONE=r9(1);function FMo(){var t=Zs();return this.copyTo(t),t}a(FMo,"bnClone");function UMo(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<>24}a(QMo,"bnByteValue");function qMo(){return this.t==0?this.s:this.data[0]<<16>>16}a(qMo,"bnShortValue");function GMo(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}a(GMo,"bnpChunkSize");function HMo(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}a(HMo,"bnSigNum");function jMo(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=r9(r),o=Zs(),s=Zs(),c="";for(this.divRemTo(n,o,s);o.signum()>0;)c=(r+s.intValue()).toString(t).substr(1)+c,o.divRemTo(n,o,s);return s.intValue().toString(t)+c}a(jMo,"bnpToRadix");function $Mo(t,e){this.fromInt(0),e==null&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),o=!1,s=0,c=0,l=0;l=r&&(this.dMultiply(n),this.dAddOffset(c,0),s=0,c=0)}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(c,0)),o&&Bt.ZERO.subTo(this,this)}a($Mo,"bnpFromRadix");function VMo(t,e,r){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(Bt.ONE.shiftLeft(t-1),C7t,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Bt.ONE.shiftLeft(t-1),this);else{var n=new Array,o=t&7;n.length=(t>>3)+1,e.nextBytes(n),o>0?n[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(e[o++]=n|this.s<=0;)r<8?(n=(this.data[t]&(1<>(r+=this.DB-8)):(n=this.data[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),(n&128)!=0&&(n|=-256),o==0&&(this.s&128)!=(n&128)&&++o,(o>0||n!=this.s)&&(e[o++]=n);return e}a(WMo,"bnToByteArray");function zMo(t){return this.compareTo(t)==0}a(zMo,"bnEquals");function YMo(t){return this.compareTo(t)<0?this:t}a(YMo,"bnMin");function KMo(t){return this.compareTo(t)>0?this:t}a(KMo,"bnMax");function JMo(t,e,r){var n,o,s=Math.min(t.t,this.t);for(n=0;n>=16,e+=16),(t&255)==0&&(t>>=8,e+=8),(t&15)==0&&(t>>=4,e+=4),(t&3)==0&&(t>>=2,e+=2),(t&1)==0&&++e,e}a(s4o,"lbit");function a4o(){for(var t=0;t=this.t?this.s!=0:(this.data[e]&1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()}a(m4o,"bnpAddTo");function g4o(t){var e=Zs();return this.addTo(t,e),e}a(g4o,"bnAdd");function A4o(t){var e=Zs();return this.subTo(t,e),e}a(A4o,"bnSubtract");function y4o(t){var e=Zs();return this.multiplyTo(t,e),e}a(y4o,"bnMultiply");function E4o(){var t=Zs();return this.squareTo(t),t}a(E4o,"bnSquare");function _4o(t){var e=Zs();return this.divRemTo(t,e,null),e}a(_4o,"bnDivide");function C4o(t){var e=Zs();return this.divRemTo(t,null,e),e}a(C4o,"bnRemainder");function v4o(t){var e=Zs(),r=Zs();return this.divRemTo(t,e,r),new Array(e,r)}a(v4o,"bnDivideAndRemainder");function b4o(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}a(b4o,"bnpDMultiply");function T4o(t,e){if(t!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}a(T4o,"bnpDAddOffset");function v1e(){}a(v1e,"NullExp");function tpn(t){return t}a(tpn,"nNop");function S4o(t,e,r){t.multiplyTo(e,r)}a(S4o,"nMulTo");function I4o(t,e){t.squareTo(e)}a(I4o,"nSqrTo");v1e.prototype.convert=tpn;v1e.prototype.revert=tpn;v1e.prototype.mulTo=S4o;v1e.prototype.sqrTo=I4o;function x4o(t){return this.exp(t,new v1e)}a(x4o,"bnPow");function w4o(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var o;for(o=r.t-this.t;n=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Zs();return t.copyTo(e),this.reduce(e),e}a(P4o,"barrettConvert");function k4o(t){return t}a(k4o,"barrettRevert");function D4o(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}a(D4o,"barrettReduce");function N4o(t,e){t.squareTo(e),this.reduce(e)}a(N4o,"barrettSqrTo");function M4o(t,e,r){t.multiplyTo(e,r),this.reduce(r)}a(M4o,"barrettMulTo");Uoe.prototype.convert=P4o;Uoe.prototype.revert=k4o;Uoe.prototype.reduce=D4o;Uoe.prototype.mulTo=M4o;Uoe.prototype.sqrTo=N4o;function O4o(t,e){var r=t.bitLength(),n,o=r9(1),s;if(r<=0)return o;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?s=new iV(e):e.isEven()?s=new Uoe(e):s=new oV(e);var c=new Array,l=3,u=n-1,d=(1<1){var p=Zs();for(s.sqrTo(c[1],p);l<=d;)c[l]=Zs(),s.mulTo(p,c[l-2],c[l]),l+=2}var h=t.t-1,m,g=!0,A=Zs(),y;for(r=RVe(t.data[h])-1;h>=0;){for(r>=u?m=t.data[h]>>r-u&d:(m=(t.data[h]&(1<0&&(m|=t.data[h-1]>>this.DB+r-u)),l=n;(m&1)==0;)m>>=1,--l;if((r-=l)<0&&(r+=this.DB,--h),g)c[m].copyTo(o),g=!1;else{for(;l>1;)s.sqrTo(o,A),s.sqrTo(A,o),l-=2;l>0?s.sqrTo(o,A):(y=o,o=A,A=y),s.mulTo(A,c[m],o)}for(;h>=0&&(t.data[h]&1<0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r}a(B4o,"bnGCD");function L4o(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(e==0)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r}a(L4o,"bnpModInt");function F4o(t){if(this.signum()==0)return Bt.ZERO;var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return Bt.ZERO;for(var r=t.clone(),n=this.clone(),o=r9(1),s=r9(0),c=r9(0),l=r9(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),e?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),e?((!c.isEven()||!l.isEven())&&(c.addTo(this,c),l.subTo(t,l)),c.rShiftTo(1,c)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);r.compareTo(n)>=0?(r.subTo(n,r),e&&o.subTo(c,o),s.subTo(l,s)):(n.subTo(r,n),e&&c.subTo(o,c),l.subTo(s,l))}if(n.compareTo(Bt.ONE)!=0)return Bt.ZERO;if(l.compareTo(t)>=0)return l.subtract(t);if(l.signum()<0)l.addTo(t,l);else return l;return l.signum()<0?l.add(t):l}a(F4o,"bnModInverse");var Aw=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],U4o=(1<<26)/Aw[Aw.length-1];function Q4o(t){var e,r=this.abs();if(r.t==1&&r.data[0]<=Aw[Aw.length-1]){for(e=0;e=0);var l=s.modPow(n,this);if(l.compareTo(Bt.ONE)!=0&&l.compareTo(e)!=0){for(var u=1;u++{f();var r5=wo();Jk();pa();var ipn=spn.exports=r5.sha1=r5.sha1||{};r5.md.sha1=r5.md.algorithms.sha1=ipn;ipn.create=function(){opn||H4o();var t=null,e=r5.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var o=n.messageLengthSize/4,s=0;s>>0,c>>>0];for(var l=n.fullMessageLength.length-1;l>=0;--l)n.fullMessageLength[l]+=c[1],c[1]=c[0]+(n.fullMessageLength[l]/4294967296>>>0),n.fullMessageLength[l]=n.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return e.putBytes(o),npn(t,r,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var o=r5.util.createBuffer();o.putBytes(e.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,c=s&n.blockLength-1;o.putBytes(v7t.substr(0,n.blockLength-c));for(var l,u,d=n.fullMessageLength[0]*8,p=0;p>>0,d+=u,o.putInt32(d>>>0),d=l>>>0;o.putInt32(d);var h={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};npn(h,r,o);var m=r5.util.createBuffer();return m.putInt32(h.h0),m.putInt32(h.h1),m.putInt32(h.h2),m.putInt32(h.h3),m.putInt32(h.h4),m},n};var v7t=null,opn=!1;function H4o(){v7t="\x80",v7t+=r5.util.fillString("\0",64),opn=!0}a(H4o,"_init");function npn(t,e,r){for(var n,o,s,c,l,u,d,p,h=r.length();h>=64;){for(o=t.h0,s=t.h1,c=t.h2,l=t.h3,u=t.h4,p=0;p<16;++p)n=r.getInt32(),e[p]=n,d=l^s&(c^l),n=(o<<5|o>>>27)+d+u+1518500249+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<20;++p)n=e[p-3]^e[p-8]^e[p-14]^e[p-16],n=n<<1|n>>>31,e[p]=n,d=l^s&(c^l),n=(o<<5|o>>>27)+d+u+1518500249+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<32;++p)n=e[p-3]^e[p-8]^e[p-14]^e[p-16],n=n<<1|n>>>31,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+1859775393+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<40;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+1859775393+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<60;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s&c|l&(s^c),n=(o<<5|o>>>27)+d+u+2400959708+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;for(;p<80;++p)n=e[p-6]^e[p-16]^e[p-28]^e[p-32],n=n<<2|n>>>30,e[p]=n,d=s^c^l,n=(o<<5|o>>>27)+d+u+3395469782+n,u=l,l=c,c=(s<<30|s>>>2)>>>0,s=o,o=n;t.h0=t.h0+o|0,t.h1=t.h1+s|0,t.h2=t.h2+c|0,t.h3=t.h3+l|0,t.h4=t.h4+u|0,h-=64}}a(npn,"_update")});var b7t=T((SLu,cpn)=>{f();var n5=wo();pa();XT();Qoe();var apn=cpn.exports=n5.pkcs1=n5.pkcs1||{};apn.encode_rsa_oaep=function(t,e,r){var n,o,s,c;typeof r=="string"?(n=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(n=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),s?s.start():s=n5.md.sha1.create(),c||(c=s);var l=Math.ceil(t.n.bitLength()/8),u=l-2*s.digestLength-2;if(e.length>u){var d=new Error("RSAES-OAEP input message length is too long.");throw d.length=e.length,d.maxLength=u,d}n||(n=""),s.update(n,"raw");for(var p=s.digest(),h="",m=u-e.length,g=0;g>24&255,s>>16&255,s>>8&255,s&255);r.start(),r.update(t+c),n+=r.digest().getBytes()}return n.substring(0,e)}a(PVe,"rsa_mgf1")});var S7t=T((wLu,T7t)=>{f();var n9=wo();pa();b1e();XT();(function(){if(n9.prime){T7t.exports=n9.prime;return}var t=T7t.exports=n9.prime=n9.prime||{},e=n9.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var o=a(function(h,m){return h|m},"op_or");t.generateProbablePrime=function(h,m,g){typeof m=="function"&&(g=m,m={}),m=m||{};var A=m.algorithm||"PRIMEINC";typeof A=="string"&&(A={name:A}),A.options=A.options||{};var y=m.prng||n9.random,E={nextBytes:a(function(_){for(var v=y.getBytesSync(_.length),b=0;b<_.length;++b)_[b]=v.charCodeAt(b)},"nextBytes")};if(A.name==="PRIMEINC")return s(h,E,A.options,g);throw new Error("Invalid prime generation algorithm: "+A.name)};function s(h,m,g,A){return"workers"in g?u(h,m,g,A):c(h,m,g,A)}a(s,"primeincFindPrime");function c(h,m,g,A){var y=d(h,m),E=0,_=p(y.bitLength());"millerRabinTests"in g&&(_=g.millerRabinTests);var v=10;"maxBlockTime"in g&&(v=g.maxBlockTime),l(y,h,m,E,_,v,A)}a(c,"primeincFindPrimeWithoutWorkers");function l(h,m,g,A,y,E,_){var v=+new Date;do{if(h.bitLength()>m&&(h=d(m,g)),h.isProbablePrime(y))return _(null,h);h.dAddOffset(r[A++%8],0)}while(E<0||+new Date-v"u")return c(h,m,g,A);var y=d(h,m),E=g.workers,_=g.workLoad||100,v=_*30/8,b=g.workerScript||"forge/prime.worker.js";if(E===-1)return n9.util.estimateCores(function(x,w){x&&(w=2),E=w-1,I()});I();function I(){E=Math.max(1,E);for(var x=[],w=0;wh&&(y=d(h,m));var G=y.toString(16);Q.target.postMessage({hex:G,workLoad:_}),y.dAddOffset(v,0)}}a(k,"workerMessage")}a(I,"generate")}a(u,"primeincFindPrimeWithWorkers");function d(h,m){var g=new e(h,m),A=h-1;return g.testBit(A)||g.bitwiseTo(e.ONE.shiftLeft(A),o,g),g.dAddOffset(31-g.mod(n).byteValue(),0),g}a(d,"generateRandom");function p(h){return h<=100?27:h<=150?18:h<=200?15:h<=250?12:h<=300?9:h<=350?8:h<=400?7:h<=500?6:h<=600?5:h<=800?4:h<=1250?3:2}a(p,"getMillerRabinTests")})()});var T1e=T((kLu,mpn)=>{f();var zn=wo();gw();b1e();t9();b7t();S7t();XT();pa();typeof ea>"u"&&(ea=zn.jsbn.BigInteger);var ea,I7t=zn.util.isNodejs?require("crypto"):null,nt=zn.asn1,eS=zn.util;zn.pki=zn.pki||{};mpn.exports=zn.pki.rsa=zn.rsa=zn.rsa||{};var no=zn.pki,j4o=[6,4,2,4,2,4,6,2],$4o={name:"PrivateKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},V4o={name:"RSAPrivateKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},W4o={name:"RSAPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z4o=zn.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Y4o={name:"DigestInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:nt.Class.UNIVERSAL,type:nt.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},K4o=a(function(t){var e;if(t.algorithm in no.oids)e=no.oids[t.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}var n=nt.oidToDer(e).getBytes(),o=nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[]),s=nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[]);s.value.push(nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,n)),s.value.push(nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,""));var c=nt.create(nt.Class.UNIVERSAL,nt.Type.OCTETSTRING,!1,t.digest().getBytes());return o.value.push(s),o.value.push(c),nt.toDer(o).getBytes()},"emsaPkcs1v15encode"),ppn=a(function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(ea.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(ea.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new ea(zn.util.bytesToHex(zn.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(ea.ONE));t=t.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var o=t.mod(e.p).modPow(e.dP,e.p),s=t.mod(e.q).modPow(e.dQ,e.q);o.compareTo(s)<0;)o=o.add(e.p);var c=o.subtract(s).multiply(e.qInv).mod(e.p).multiply(e.q).add(s);return c=c.multiply(n.modInverse(e.n)).mod(e.n),c},"_modPow");no.rsa.encrypt=function(t,e,r){var n=r,o,s=Math.ceil(e.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,o=hpn(t,e,r)):(o=zn.util.createBuffer(),o.putBytes(t));for(var c=new ea(o.toHex(),16),l=ppn(c,e,n),u=l.toString(16),d=zn.util.createBuffer(),p=s-Math.ceil(u.length/2);p>0;)d.putByte(0),--p;return d.putBytes(zn.util.hexToBytes(u)),d.getBytes()};no.rsa.decrypt=function(t,e,r,n){var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=t.length,s.expected=o,s}var c=new ea(zn.util.createBuffer(t).toHex(),16);if(c.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=ppn(c,e,r),u=l.toString(16),d=zn.util.createBuffer(),p=o-Math.ceil(u.length/2);p>0;)d.putByte(0),--p;return d.putBytes(zn.util.hexToBytes(u)),n!==!1?kVe(d.getBytes(),e,r):d.getBytes()};no.rsa.createKeyPairGenerationState=function(t,e,r){typeof t=="string"&&(t=parseInt(t,10)),t=t||2048,r=r||{};var n=r.prng||zn.random,o={nextBytes:a(function(l){for(var u=n.getBytesSync(l.length),d=0;d>1,pBits:t-(t>>1),pqState:0,num:null,keys:null},c.e.fromInt(c.eInt);else throw new Error("Invalid key generation algorithm: "+s);return c};no.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new ea(null);r.fromInt(30);for(var n=0,o=a(function(h,m){return h|m},"op_or"),s=+new Date,c,l=0;t.keys===null&&(e<=0||lu?t.pqState=0:t.num.isProbablePrime(X4o(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(j4o[n++%8],0):t.pqState===2?t.pqState=t.num.subtract(ea.ONE).gcd(t.e).compareTo(ea.ONE)===0?3:0:t.pqState===3&&(t.pqState=0,t.p===null?t.p=t.num:t.q=t.num,t.p!==null&&t.q!==null&&++t.state,t.num=null)}else if(t.state===1)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(t.state===2)t.p1=t.p.subtract(ea.ONE),t.q1=t.q.subtract(ea.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(t.state===3)t.phi.gcd(t.e).compareTo(ea.ONE)===0?++t.state:(t.p=null,t.q=null,t.state=0);else if(t.state===4)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(t.state===5){var p=t.e.modInverse(t.phi);t.keys={privateKey:no.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:no.rsa.setPublicKey(t.n,t.e)}}c=+new Date,l+=c-s,s=c}return t.keys!==null};no.rsa.generateKeyPair=function(t,e,r,n){if(arguments.length===1?typeof t=="object"?(r=t,t=void 0):typeof t=="function"&&(n=t,t=void 0):arguments.length===2?typeof t=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(r=e,e=void 0):(r=t,n=e,t=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=e,e=void 0)),r=r||{},t===void 0&&(t=r.bits||2048),e===void 0&&(e=r.e||65537),!zn.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(e===65537||e===3)){if(n){if(lpn("generateKeyPair"))return I7t.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(l,u,d){if(l)return n(l);n(null,{privateKey:no.privateKeyFromPem(d),publicKey:no.publicKeyFromPem(u)})});if(upn("generateKey")&&upn("exportKey"))return eS.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:fpn(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(l){return eS.globalScope.crypto.subtle.exportKey("pkcs8",l.privateKey)}).then(void 0,function(l){n(l)}).then(function(l){if(l){var u=no.privateKeyFromAsn1(nt.fromDer(zn.util.createBuffer(l)));n(null,{privateKey:u,publicKey:no.setRsaPublicKey(u.n,u.e)})}});if(dpn("generateKey")&&dpn("exportKey")){var o=eS.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:fpn(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);o.oncomplete=function(l){var u=l.target.result,d=eS.globalScope.msCrypto.subtle.exportKey("pkcs8",u.privateKey);d.oncomplete=function(p){var h=p.target.result,m=no.privateKeyFromAsn1(nt.fromDer(zn.util.createBuffer(h)));n(null,{privateKey:m,publicKey:no.setRsaPublicKey(m.n,m.e)})},d.onerror=function(p){n(p)}},o.onerror=function(l){n(l)};return}}else if(lpn("generateKeyPairSync")){var s=I7t.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:no.privateKeyFromPem(s.privateKey),publicKey:no.publicKeyFromPem(s.publicKey)}}}var c=no.rsa.createKeyPairGenerationState(t,e,r);if(!n)return no.rsa.stepKeyPairGenerationState(c,0),c.keys;J4o(c,r,n)};no.setRsaPublicKey=no.rsa.setPublicKey=function(t,e){var r={n:t,e};return r.encrypt=function(n,o,s){if(typeof o=="string"?o=o.toUpperCase():o===void 0&&(o="RSAES-PKCS1-V1_5"),o==="RSAES-PKCS1-V1_5")o={encode:a(function(l,u,d){return hpn(l,u,2).getBytes()},"encode")};else if(o==="RSA-OAEP"||o==="RSAES-OAEP")o={encode:a(function(l,u){return zn.pkcs1.encode_rsa_oaep(u,l,s)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(o)!==-1)o={encode:a(function(l){return l},"encode")};else if(typeof o=="string")throw new Error('Unsupported encryption scheme: "'+o+'".');var c=o.encode(n,r,!0);return no.rsa.encrypt(c,r,!0)},r.verify=function(n,o,s,c){typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSASSA-PKCS1-V1_5"),c===void 0&&(c={_parseAllDigestBytes:!0,_skipPaddingChecks:!1}),"_parseAllDigestBytes"in c||(c._parseAllDigestBytes=!0),"_skipPaddingChecks"in c||(c._skipPaddingChecks=!1),s==="RSASSA-PKCS1-V1_5"?s={verify:a(function(u,d){d=kVe(d,r,!0,void 0,c);var p=nt.fromDer(d,{parseAllBytes:c._parseAllDigestBytes}),h={},m=[];if(!nt.validate(p,Y4o,h,m)||p.value.length!==2){var g=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw g.errors=m,g}var A=nt.derToOid(h.algorithmIdentifier);if(!(A===zn.oids.md2||A===zn.oids.md5||A===zn.oids.sha1||A===zn.oids.sha224||A===zn.oids.sha256||A===zn.oids.sha384||A===zn.oids.sha512||A===zn.oids["sha512-224"]||A===zn.oids["sha512-256"])){var g=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw g.oid=A,g}if((A===zn.oids.md2||A===zn.oids.md5)&&!("parameters"in h))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return u===h.digest},"verify")}:(s==="NONE"||s==="NULL"||s===null)&&(s={verify:a(function(u,d){return d=kVe(d,r,!0,void 0,c),u===d},"verify")});var l=no.rsa.decrypt(o,r,!0,!1);return s.verify(n,l,r.n.bitLength())},r};no.setRsaPrivateKey=no.rsa.setPrivateKey=function(t,e,r,n,o,s,c,l){var u={n:t,e,d:r,p:n,q:o,dP:s,dQ:c,qInv:l};return u.decrypt=function(d,p,h){typeof p=="string"?p=p.toUpperCase():p===void 0&&(p="RSAES-PKCS1-V1_5");var m=no.rsa.decrypt(d,u,!1,!1);if(p==="RSAES-PKCS1-V1_5")p={decode:kVe};else if(p==="RSA-OAEP"||p==="RSAES-OAEP")p={decode:a(function(g,A){return zn.pkcs1.decode_rsa_oaep(A,g,h)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(p)!==-1)p={decode:a(function(g){return g},"decode")};else throw new Error('Unsupported encryption scheme: "'+p+'".');return p.decode(m,u,!1)},u.sign=function(d,p){var h=!1;typeof p=="string"&&(p=p.toUpperCase()),p===void 0||p==="RSASSA-PKCS1-V1_5"?(p={encode:K4o},h=1):(p==="NONE"||p==="NULL"||p===null)&&(p={encode:a(function(){return d},"encode")},h=1);var m=p.encode(d,u.n.bitLength());return no.rsa.encrypt(m,u,h)},u};no.wrapRsaPrivateKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,nt.integerToDer(0).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,nt.oidToDer(no.oids.rsaEncryption).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,"")]),nt.create(nt.Class.UNIVERSAL,nt.Type.OCTETSTRING,!1,nt.toDer(t).getBytes())])};no.privateKeyFromAsn1=function(t){var e={},r=[];if(nt.validate(t,$4o,e,r)&&(t=nt.fromDer(zn.util.createBuffer(e.privateKey))),e={},r=[],!nt.validate(t,V4o,e,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var o,s,c,l,u,d,p,h;return o=zn.util.createBuffer(e.privateKeyModulus).toHex(),s=zn.util.createBuffer(e.privateKeyPublicExponent).toHex(),c=zn.util.createBuffer(e.privateKeyPrivateExponent).toHex(),l=zn.util.createBuffer(e.privateKeyPrime1).toHex(),u=zn.util.createBuffer(e.privateKeyPrime2).toHex(),d=zn.util.createBuffer(e.privateKeyExponent1).toHex(),p=zn.util.createBuffer(e.privateKeyExponent2).toHex(),h=zn.util.createBuffer(e.privateKeyCoefficient).toHex(),no.setRsaPrivateKey(new ea(o,16),new ea(s,16),new ea(c,16),new ea(l,16),new ea(u,16),new ea(d,16),new ea(p,16),new ea(h,16))};no.privateKeyToAsn1=no.privateKeyToRSAPrivateKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,nt.integerToDer(0).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.n)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.e)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.d)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.p)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.q)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.dP)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.dQ)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.qInv))])};no.publicKeyFromAsn1=function(t){var e={},r=[];if(nt.validate(t,z4o,e,r)){var n=nt.derToOid(e.publicKeyOid);if(n!==no.oids.rsaEncryption){var o=new Error("Cannot read public key. Unknown OID.");throw o.oid=n,o}t=e.rsaPublicKey}if(r=[],!nt.validate(t,W4o,e,r)){var o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw o.errors=r,o}var s=zn.util.createBuffer(e.publicKeyModulus).toHex(),c=zn.util.createBuffer(e.publicKeyExponent).toHex();return no.setRsaPublicKey(new ea(s,16),new ea(c,16))};no.publicKeyToAsn1=no.publicKeyToSubjectPublicKeyInfo=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.OID,!1,nt.oidToDer(no.oids.rsaEncryption).getBytes()),nt.create(nt.Class.UNIVERSAL,nt.Type.NULL,!1,"")]),nt.create(nt.Class.UNIVERSAL,nt.Type.BITSTRING,!1,[no.publicKeyToRSAPublicKey(t)])])};no.publicKeyToRSAPublicKey=function(t){return nt.create(nt.Class.UNIVERSAL,nt.Type.SEQUENCE,!0,[nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.n)),nt.create(nt.Class.UNIVERSAL,nt.Type.INTEGER,!1,i5(t.e))])};function hpn(t,e,r){var n=zn.util.createBuffer(),o=Math.ceil(e.n.bitLength()/8);if(t.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=o-11,s}n.putByte(0),n.putByte(r);var c=o-3-t.length,l;if(r===0||r===1){l=r===0?0:255;for(var u=0;u0;){for(var d=0,p=zn.random.getBytes(c),u=0;u"u")throw new Error("Encryption block is invalid.");var d=0;if(u===0){d=s-3-n;for(var p=0;p1;){if(c.getByte()!==255){--c.read;break}++d}if(d<8&&!(o&&o._skipPaddingChecks))throw new Error("Encryption block is invalid.")}else if(u===2){for(d=0;c.length()>1;){if(c.getByte()===0){--c.read;break}++d}if(d<8&&!(o&&o._skipPaddingChecks))throw new Error("Encryption block is invalid.")}var h=c.getByte();if(h!==0||d!==s-3-c.length())throw new Error("Encryption block is invalid.");return c.getBytes()}a(kVe,"_decodePkcs1_v1_5");function J4o(t,e,r){typeof e=="function"&&(r=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),o();function o(){s(t.pBits,function(l,u){if(l)return r(l);if(t.p=u,t.q!==null)return c(l,t.q);s(t.qBits,c)})}a(o,"generate");function s(l,u){zn.prime.generateProbablePrime(l,n,u)}a(s,"getPrime");function c(l,u){if(l)return r(l);if(t.q=u,t.p.compareTo(t.q)<0){var d=t.p;t.p=t.q,t.q=d}if(t.p.subtract(ea.ONE).gcd(t.e).compareTo(ea.ONE)!==0){t.p=null,o();return}if(t.q.subtract(ea.ONE).gcd(t.e).compareTo(ea.ONE)!==0){t.q=null,s(t.qBits,c);return}if(t.p1=t.p.subtract(ea.ONE),t.q1=t.q.subtract(ea.ONE),t.phi=t.p1.multiply(t.q1),t.phi.gcd(t.e).compareTo(ea.ONE)!==0){t.p=t.q=null,o();return}if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits){t.q=null,s(t.qBits,c);return}var p=t.e.modInverse(t.phi);t.keys={privateKey:no.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:no.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}a(c,"finish")}a(J4o,"_generateKeyPair");function i5(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=zn.util.hexToBytes(e);return r.length>1&&(r.charCodeAt(0)===0&&(r.charCodeAt(1)&128)===0||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}a(i5,"_bnToBytes");function X4o(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}a(X4o,"_getMillerRabinTests");function lpn(t){return zn.util.isNodejs&&typeof I7t[t]=="function"}a(lpn,"_detectNodeCrypto");function upn(t){return typeof eS.globalScope<"u"&&typeof eS.globalScope.crypto=="object"&&typeof eS.globalScope.crypto.subtle=="object"&&typeof eS.globalScope.crypto.subtle[t]=="function"}a(upn,"_detectSubtleCrypto");function dpn(t){return typeof eS.globalScope<"u"&&typeof eS.globalScope.msCrypto=="object"&&typeof eS.globalScope.msCrypto.subtle=="object"&&typeof eS.globalScope.msCrypto.subtle[t]=="function"}a(dpn,"_detectSubtleMsCrypto");function fpn(t){for(var e=zn.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n{f();var tn=wo();e9();gw();C1e();Jk();t9();IVe();nV();XT();y7t();T1e();pa();typeof gpn>"u"&&(gpn=tn.jsbn.BigInteger);var gpn,vt=tn.asn1,Co=tn.pki=tn.pki||{};_pn.exports=Co.pbe=tn.pbe=tn.pbe||{};var sV=Co.oids,Z4o={name:"EncryptedPrivateKeyInfo",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},eOo={name:"PBES2Algorithms",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:vt.Class.UNIVERSAL,type:vt.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:vt.Class.UNIVERSAL,type:vt.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},tOo={name:"pkcs-12PbeParams",tagClass:vt.Class.UNIVERSAL,type:vt.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:vt.Class.UNIVERSAL,type:vt.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:vt.Class.UNIVERSAL,type:vt.Type.INTEGER,constructed:!1,capture:"iterations"}]};Co.encryptPrivateKeyInfo=function(t,e,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=tn.random.getBytesSync(r.saltSize),o=r.count,s=vt.integerToDer(o),c,l,u;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var d,p,h;switch(r.algorithm){case"aes128":c=16,d=16,p=sV["aes128-CBC"],h=tn.aes.createEncryptionCipher;break;case"aes192":c=24,d=16,p=sV["aes192-CBC"],h=tn.aes.createEncryptionCipher;break;case"aes256":c=32,d=16,p=sV["aes256-CBC"],h=tn.aes.createEncryptionCipher;break;case"des":c=8,d=8,p=sV.desCBC,h=tn.des.createEncryptionCipher;break;default:var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=r.algorithm,m}var g="hmacWith"+r.prfAlgorithm.toUpperCase(),A=Epn(g),y=tn.pkcs5.pbkdf2(e,n,o,c,A),E=tn.random.getBytesSync(d),_=h(y);_.start(E),_.update(vt.toDer(t)),_.finish(),u=_.output.getBytes();var v=rOo(n,s,c,g);l=vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.OID,!1,vt.oidToDer(sV.pkcs5PBES2).getBytes()),vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.OID,!1,vt.oidToDer(sV.pkcs5PBKDF2).getBytes()),v]),vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.OID,!1,vt.oidToDer(p).getBytes()),vt.create(vt.Class.UNIVERSAL,vt.Type.OCTETSTRING,!1,E)])])])}else if(r.algorithm==="3des"){c=24;var b=new tn.util.ByteBuffer(n),y=Co.pbe.generatePkcs12Key(e,b,1,o,c),E=Co.pbe.generatePkcs12Key(e,b,2,o,c),_=tn.des.createEncryptionCipher(y);_.start(E),_.update(vt.toDer(t)),_.finish(),u=_.output.getBytes(),l=vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.OID,!1,vt.oidToDer(sV["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[vt.create(vt.Class.UNIVERSAL,vt.Type.OCTETSTRING,!1,n),vt.create(vt.Class.UNIVERSAL,vt.Type.INTEGER,!1,s.getBytes())])])}else{var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=r.algorithm,m}var I=vt.create(vt.Class.UNIVERSAL,vt.Type.SEQUENCE,!0,[l,vt.create(vt.Class.UNIVERSAL,vt.Type.OCTETSTRING,!1,u)]);return I};Co.decryptPrivateKeyInfo=function(t,e){var r=null,n={},o=[];if(!vt.validate(t,Z4o,n,o)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}var c=vt.derToOid(n.encryptionOid),l=Co.pbe.getCipher(c,n.encryptionParams,e),u=tn.util.createBuffer(n.encryptedData);return l.update(u),l.finish()&&(r=vt.fromDer(l.output)),r};Co.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:vt.toDer(t).getBytes()};return tn.pem.encode(r,{maxline:e})};Co.encryptedPrivateKeyFromPem=function(t){var e=tn.pem.decode(t)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return vt.fromDer(e.body)};Co.encryptRsaPrivateKey=function(t,e,r){if(r=r||{},!r.legacy){var n=Co.wrapRsaPrivateKey(Co.privateKeyToAsn1(t));return n=Co.encryptPrivateKeyInfo(n,e,r),Co.encryptedPrivateKeyToPem(n)}var o,s,c,l;switch(r.algorithm){case"aes128":o="AES-128-CBC",c=16,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",c=24,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",c=32,s=tn.random.getBytesSync(16),l=tn.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",c=24,s=tn.random.getBytesSync(8),l=tn.des.createEncryptionCipher;break;case"des":o="DES-CBC",c=8,s=tn.random.getBytesSync(8),l=tn.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw u.algorithm=r.algorithm,u}var d=tn.pbe.opensslDeriveBytes(e,s.substr(0,8),c),p=l(d);p.start(s),p.update(vt.toDer(Co.privateKeyToAsn1(t))),p.finish();var h={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:tn.util.bytesToHex(s).toUpperCase()},body:p.output.getBytes()};return tn.pem.encode(h)};Co.decryptRsaPrivateKey=function(t,e){var r=null,n=tn.pem.decode(t)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var o=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw o.headerType=o,o}if(n.procType&&n.procType.type==="ENCRYPTED"){var s,c;switch(n.dekInfo.algorithm){case"DES-CBC":s=8,c=tn.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,c=tn.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,c=tn.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,c=tn.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,c=tn.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,c=a(function(h){return tn.rc2.createDecryptionCipher(h,40)},"cipherFn");break;case"RC2-64-CBC":s=8,c=a(function(h){return tn.rc2.createDecryptionCipher(h,64)},"cipherFn");break;case"RC2-128-CBC":s=16,c=a(function(h){return tn.rc2.createDecryptionCipher(h,128)},"cipherFn");break;default:var o=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw o.algorithm=n.dekInfo.algorithm,o}var l=tn.util.hexToBytes(n.dekInfo.parameters),u=tn.pbe.opensslDeriveBytes(e,l.substr(0,8),s),d=c(u);if(d.start(l),d.update(tn.util.createBuffer(n.body)),d.finish())r=d.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=Co.decryptPrivateKeyInfo(vt.fromDer(r),e):r=vt.fromDer(r),r!==null&&(r=Co.privateKeyFromAsn1(r)),r};Co.pbe.generatePkcs12Key=function(t,e,r,n,o,s){var c,l;if(typeof s>"u"||s===null){if(!("sha1"in tn.md))throw new Error('"sha1" hash algorithm unavailable.');s=tn.md.sha1.create()}var u=s.digestLength,d=s.blockLength,p=new tn.util.ByteBuffer,h=new tn.util.ByteBuffer;if(t!=null){for(l=0;l=0;l--)N=N>>8,N+=P.at(l)+M.at(l),M.setAt(l,N&255);Q.putBuffer(M)}b=Q,p.putBuffer(w)}return p.truncate(p.length()-o),p};Co.pbe.getCipher=function(t,e,r){switch(t){case Co.oids.pkcs5PBES2:return Co.pbe.getCipherForPBES2(t,e,r);case Co.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Co.oids["pbewithSHAAnd40BitRC2-CBC"]:return Co.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};Co.pbe.getCipherForPBES2=function(t,e,r){var n={},o=[];if(!vt.validate(e,eOo,n,o)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}if(t=vt.derToOid(n.kdfOid),t!==Co.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=t,s.supportedOids=["pkcs5PBKDF2"],s}if(t=vt.derToOid(n.encOid),t!==Co.oids["aes128-CBC"]&&t!==Co.oids["aes192-CBC"]&&t!==Co.oids["aes256-CBC"]&&t!==Co.oids["des-EDE3-CBC"]&&t!==Co.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=t,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var c=n.kdfSalt,l=tn.util.createBuffer(n.kdfIterationCount);l=l.getInt(l.length()<<3);var u,d;switch(Co.oids[t]){case"aes128-CBC":u=16,d=tn.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,d=tn.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,d=tn.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,d=tn.des.createDecryptionCipher;break;case"desCBC":u=8,d=tn.des.createDecryptionCipher;break}var p=ypn(n.prfOid),h=tn.pkcs5.pbkdf2(r,c,l,u,p),m=n.encIv,g=d(h);return g.start(m),g};Co.pbe.getCipherForPKCS12PBE=function(t,e,r){var n={},o=[];if(!vt.validate(e,tOo,n,o)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=o,s}var c=tn.util.createBuffer(n.salt),l=tn.util.createBuffer(n.iterations);l=l.getInt(l.length()<<3);var u,d,p;switch(t){case Co.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,d=8,p=tn.des.startDecrypting;break;case Co.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,d=8,p=a(function(y,E){var _=tn.rc2.createDecryptionCipher(y,40);return _.start(E,null),_},"cipherFn");break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=t,s}var h=ypn(n.prfOid),m=Co.pbe.generatePkcs12Key(r,c,1,l,u,h);h.start();var g=Co.pbe.generatePkcs12Key(r,c,2,l,d,h);return p(m,g)};Co.pbe.opensslDeriveBytes=function(t,e,r,n){if(typeof n>"u"||n===null){if(!("md5"in tn.md))throw new Error('"md5" hash algorithm unavailable.');n=tn.md.md5.create()}e===null&&(e="");for(var o=[Apn(n,t+e)],s=16,c=1;s{f();var qoe=wo();gw();pa();var Wr=qoe.asn1,Goe=bpn.exports=qoe.pkcs7asn1=qoe.pkcs7asn1||{};qoe.pkcs7=qoe.pkcs7||{};qoe.pkcs7.asn1=Goe;var Cpn={name:"ContentInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Goe.contentInfoValidator=Cpn;var vpn={name:"EncryptedContentInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Goe.envelopedDataValidator={name:"EnvelopedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(vpn)};Goe.encryptedDataValidator={name:"EncryptedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"}].concat(vpn)};var nOo={name:"SignerInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Goe.signedDataValidator={name:"SignedData",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},Cpn,{name:"SignedData.Certificates",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:Wr.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SET,capture:"signerInfos",optional:!0,value:[nOo]}]};Goe.recipientInfoValidator={name:"RecipientInfo",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:Wr.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:Wr.Class.UNIVERSAL,type:Wr.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var R7t=T((ULu,Tpn)=>{f();var aV=wo();pa();aV.mgf=aV.mgf||{};var iOo=Tpn.exports=aV.mgf.mgf1=aV.mgf1=aV.mgf1||{};iOo.create=function(t){var e={generate:a(function(r,n){for(var o=new aV.util.ByteBuffer,s=Math.ceil(n/t.digestLength),c=0;c{f();var DVe=wo();R7t();Spn.exports=DVe.mgf=DVe.mgf||{};DVe.mgf.mgf1=DVe.mgf1});var NVe=T((jLu,xpn)=>{f();var cV=wo();XT();pa();var oOo=xpn.exports=cV.pss=cV.pss||{};oOo.create=function(t){arguments.length===3&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=t.md,r=t.mgf,n=e.digestLength,o=t.salt||null;typeof o=="string"&&(o=cV.util.createBuffer(o));var s;if("saltLength"in t)s=t.saltLength;else if(o!==null)s=o.length();else throw new Error("Salt length not specified or specific salt not given.");if(o!==null&&o.length()!==s)throw new Error("Given salt length does not match length of given salt.");var c=t.prng||cV.random,l={};return l.encode=function(u,d){var p,h=d-1,m=Math.ceil(h/8),g=u.digest().getBytes();if(m>8*m-h&255;return x=String.fromCharCode(x.charCodeAt(0)&~w)+x.substr(1),x+E+"\xBC"},l.verify=function(u,d,p){var h,m=p-1,g=Math.ceil(m/8);if(d=d.substr(-g),g>8*g-m&255;if((y.charCodeAt(0)&_)!==0)throw new Error("Bits beyond keysize not zero as expected.");var v=r.generate(E,A),b="";for(h=0;h{f();var Yn=wo();e9();gw();C1e();Jk();Ipn();t9();nV();NVe();T1e();pa();var re=Yn.asn1,mr=Dpn.exports=Yn.pki=Yn.pki||{},ta=mr.oids,Md={};Md.CN=ta.commonName;Md.commonName="CN";Md.C=ta.countryName;Md.countryName="C";Md.L=ta.localityName;Md.localityName="L";Md.ST=ta.stateOrProvinceName;Md.stateOrProvinceName="ST";Md.O=ta.organizationName;Md.organizationName="O";Md.OU=ta.organizationalUnitName;Md.organizationalUnitName="OU";Md.E=ta.emailAddress;Md.emailAddress="E";var Rpn=Yn.pki.rsa.publicKeyValidator,sOo={name:"Certificate",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:re.Class.UNIVERSAL,type:re.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:re.Class.UNIVERSAL,type:re.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:re.Class.UNIVERSAL,type:re.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:re.Class.UNIVERSAL,type:re.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Rpn,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:re.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:re.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:re.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},aOo={name:"rsapss",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:re.Class.UNIVERSAL,type:re.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:re.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:re.Class.UNIVERSAL,type:re.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:re.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:re.Class.UNIVERSAL,type:re.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:re.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:re.Class.UNIVERSAL,type:re.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},cOo={name:"CertificationRequestInfo",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:re.Class.UNIVERSAL,type:re.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Rpn,{name:"CertificationRequestInfo.attributes",tagClass:re.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:re.Class.UNIVERSAL,type:re.Type.SET,constructed:!0}]}]}]},lOo={name:"CertificationRequest",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[cOo,{name:"CertificationRequest.signatureAlgorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:re.Class.UNIVERSAL,type:re.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:re.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:re.Class.UNIVERSAL,type:re.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};mr.RDNAttributesAsArray=function(t,e){for(var r=[],n,o,s,c=0;c2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=u[0],c.validity.notAfter=u[1],c.tbsCertificate=r.tbsCertificate,e){c.md=OVe({signatureOid:c.signatureOid,type:"certificate"});var d=re.toDer(c.tbsCertificate);c.md.update(d.getBytes())}var p=Yn.md.sha1.create(),h=re.toDer(r.certIssuer);p.update(h.getBytes()),c.issuer.getField=function(A){return i9(c.issuer,A)},c.issuer.addField=function(A){tS([A]),c.issuer.attributes.push(A)},c.issuer.attributes=mr.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=p.digest().toHex();var m=Yn.md.sha1.create(),g=re.toDer(r.certSubject);return m.update(g.getBytes()),c.subject.getField=function(A){return i9(c.subject,A)},c.subject.addField=function(A){tS([A]),c.subject.attributes.push(A)},c.subject.attributes=mr.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=m.digest().toHex(),r.certExtensions?c.extensions=mr.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=mr.publicKeyFromAsn1(r.subjectPublicKeyInfo),c};mr.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r1&&(n=r.value.charCodeAt(1),o=r.value.length>2?r.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(o&128)===128}else if(e.name==="basicConstraints"){var r=re.fromDer(e.value);r.value.length>0&&r.value[0].type===re.Type.BOOLEAN?e.cA=r.value[0].value.charCodeAt(0)!==0:e.cA=!1;var s=null;r.value.length>0&&r.value[0].type===re.Type.INTEGER?s=r.value[0].value:r.value.length>1&&(s=r.value[1].value),s!==null&&(e.pathLenConstraint=re.derToInteger(s))}else if(e.name==="extKeyUsage")for(var r=re.fromDer(e.value),c=0;c1&&(n=r.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var u,r=re.fromDer(e.value),d=0;d"u"&&(e.type&&e.type in mr.oids?e.name=mr.oids[e.type]:e.shortName&&e.shortName in Md&&(e.name=mr.oids[Md[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in mr.oids)e.type=mr.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in Md&&(e.shortName=Md[e.name]),e.type===ta.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=re.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var o=0;o"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}a(tS,"_fillMissingFields");function kpn(t,e){if(e=e||{},typeof t.name>"u"&&t.id&&t.id in mr.oids&&(t.name=mr.oids[t.id]),typeof t.id>"u")if(t.name&&t.name in mr.oids)t.id=mr.oids[t.name];else{var r=new Error("Extension ID not specified.");throw r.extension=t,r}if(typeof t.value<"u")return t;if(t.name==="keyUsage"){var n=0,o=0,s=0;t.digitalSignature&&(o|=128,n=7),t.nonRepudiation&&(o|=64,n=6),t.keyEncipherment&&(o|=32,n=5),t.dataEncipherment&&(o|=16,n=4),t.keyAgreement&&(o|=8,n=3),t.keyCertSign&&(o|=4,n=2),t.cRLSign&&(o|=2,n=1),t.encipherOnly&&(o|=1,n=0),t.decipherOnly&&(s|=128,n=7);var c=String.fromCharCode(n);s!==0?c+=String.fromCharCode(o)+String.fromCharCode(s):o!==0&&(c+=String.fromCharCode(o)),t.value=re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,c)}else if(t.name==="basicConstraints")t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(re.create(re.Class.UNIVERSAL,re.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in t&&t.value.value.push(re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(t.pathLenConstraint).getBytes()));else if(t.name==="extKeyUsage"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);var l=t.value.value;for(var u in t)t[u]===!0&&(u in ta?l.push(re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(ta[u]).getBytes())):u.indexOf(".")!==-1&&l.push(re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(u).getBytes())))}else if(t.name==="nsCertType"){var n=0,o=0;t.client&&(o|=128,n=7),t.server&&(o|=64,n=6),t.email&&(o|=32,n=5),t.objsign&&(o|=16,n=4),t.reserved&&(o|=8,n=3),t.sslCA&&(o|=4,n=2),t.emailCA&&(o|=2,n=1),t.objCA&&(o|=1,n=0);var c=String.fromCharCode(n);o!==0&&(c+=String.fromCharCode(o)),t.value=re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,c)}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);for(var d,p=0;p128)throw new Error('Invalid "nsComment" content.');t.value=re.create(re.Class.UNIVERSAL,re.Type.IA5STRING,!1,t.comment)}else if(t.name==="subjectKeyIdentifier"&&e.cert){var h=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=h.toHex(),t.value=re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,h.getBytes())}else if(t.name==="authorityKeyIdentifier"&&e.cert){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);var l=t.value.value;if(t.keyIdentifier){var m=t.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;l.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!1,m))}if(t.authorityCertIssuer){var g=[re.create(re.Class.CONTEXT_SPECIFIC,4,!0,[Hoe(t.authorityCertIssuer===!0?e.cert.issuer:t.authorityCertIssuer)])];l.push(re.create(re.Class.CONTEXT_SPECIFIC,1,!0,g))}if(t.serialNumber){var A=Yn.util.hexToBytes(t.serialNumber===!0?e.cert.serialNumber:t.serialNumber);l.push(re.create(re.Class.CONTEXT_SPECIFIC,2,!1,A))}}else if(t.name==="cRLDistributionPoints"){t.value=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);for(var l=t.value.value,y=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]),E=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[]),d,p=0;p"u"){var r=new Error("Extension value not specified.");throw r.extension=t,r}return t}a(kpn,"_fillMissingExtensionFields");function P7t(t,e){if(t===ta["RSASSA-PSS"]){var r=[];return e.hash.algorithmOid!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.hash.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,1,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.mgf.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(e.mgf.hash.algorithmOid).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&r.push(re.create(re.Class.CONTEXT_SPECIFIC,2,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(e.saltLength).getBytes())])),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,r)}else return re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")}a(P7t,"_signatureParametersToAsn1");function uOo(t){var e=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[]);if(t.attributes.length===0)return e;for(var r=t.attributes,n=0;n=dOo&&t0&&n.value.push(mr.certificateExtensionsToAsn1(t.extensions)),n};mr.getCertificationRequestInfo=function(t){var e=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(t.version).getBytes()),Hoe(t.subject),mr.publicKeyToAsn1(t.publicKey),uOo(t)]);return e};mr.distinguishedNameToAsn1=function(t){return Hoe(t)};mr.certificateToAsn1=function(t){var e=t.tbsCertificate||mr.getTBSCertificate(t);return re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[e,re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(t.signatureOid).getBytes()),P7t(t.signatureOid,t.signatureParameters)]),re.create(re.Class.UNIVERSAL,re.Type.BITSTRING,!1,"\0"+t.signature)])};mr.certificateExtensionsToAsn1=function(t){var e=re.create(re.Class.CONTEXT_SPECIFIC,3,!0,[]),r=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;n"u"&&(o=new Date);var s=!0,c=null,l=0;do{var u=e.shift(),d=null,p=!1;if(o&&(ou.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:mr.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:o}),c===null){if(d=e[0]||t.getIssuer(u),d===null&&u.isIssuer(u)&&(p=!0,d=u),d){var h=d;Yn.util.isArray(h)||(h=[h]);for(var m=!1;!m&&h.length>0;){d=h.shift();try{m=d.verify(u)}catch{}}m||(c={message:"Certificate signature is invalid.",error:mr.certificateError.bad_certificate})}c===null&&(!d||p)&&!t.hasCertificate(u)&&(c={message:"Certificate is not trusted.",error:mr.certificateError.unknown_ca})}if(c===null&&d&&!u.isIssuer(d)&&(c={message:"Certificate issuer is invalid.",error:mr.certificateError.bad_certificate}),c===null)for(var g={keyUsage:!0,basicConstraints:!0},A=0;c===null&&AE.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:mr.certificateError.bad_certificate})}}var b=c===null?!0:c.error,I=r.verify?r.verify(b,l,n):b;if(I===!0)c=null;else throw b===!0&&(c={message:"The application rejected the certificate.",error:mr.certificateError.bad_certificate}),(I||I===0)&&(typeof I=="object"&&!Yn.util.isArray(I)?(I.message&&(c.message=I.message),I.error&&(c.error=I.error)):typeof I=="string"&&(c.error=I)),c;s=!1,++l}while(e.length>0);return!0}});var D7t=T((YLu,Mpn)=>{f();var fl=wo();gw();Boe();t9();w7t();x7t();XT();T1e();Qoe();pa();BVe();var ke=fl.asn1,cs=fl.pki,I1e=Mpn.exports=fl.pkcs12=fl.pkcs12||{},Npn={name:"ContentInfo",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},pOo={name:"PFX",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:ke.Class.UNIVERSAL,type:ke.Type.INTEGER,constructed:!1,capture:"version"},Npn,{name:"PFX.macData",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:ke.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:ke.Class.UNIVERSAL,type:ke.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},hOo={name:"SafeBag",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},mOo={name:"Attribute",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SET,constructed:!0,capture:"values"}]},gOo={name:"CertBag",tagClass:ke.Class.UNIVERSAL,type:ke.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:ke.Class.UNIVERSAL,type:ke.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:ke.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:ke.Class.UNIVERSAL,type:ke.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function S1e(t,e,r,n){for(var o=[],s=0;s=0&&o.push(l)}}return o}a(S1e,"_getBagsByAttribute");I1e.pkcs12FromAsn1=function(t,e,r){typeof e=="string"?(r=e,e=!0):e===void 0&&(e=!0);var n={},o=[];if(!ke.validate(t,pOo,n,o)){var s=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw s.errors=s,s}var c={version:n.version.charCodeAt(0),safeContents:[],getBags:a(function(E){var _={},v;return"localKeyId"in E?v=E.localKeyId:"localKeyIdHex"in E&&(v=fl.util.hexToBytes(E.localKeyIdHex)),v===void 0&&!("friendlyName"in E)&&"bagType"in E&&(_[E.bagType]=S1e(c.safeContents,null,null,E.bagType)),v!==void 0&&(_.localKeyId=S1e(c.safeContents,"localKeyId",v,E.bagType)),"friendlyName"in E&&(_.friendlyName=S1e(c.safeContents,"friendlyName",E.friendlyName,E.bagType)),_},"getBags"),getBagsByFriendlyName:a(function(E,_){return S1e(c.safeContents,"friendlyName",E,_)},"getBagsByFriendlyName"),getBagsByLocalKeyId:a(function(E,_){return S1e(c.safeContents,"localKeyId",E,_)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var s=new Error("PKCS#12 PFX of version other than 3 not supported.");throw s.version=n.version.charCodeAt(0),s}if(ke.derToOid(n.contentType)!==cs.oids.data){var s=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw s.oid=ke.derToOid(n.contentType),s}var l=n.content.value[0];if(l.tagClass!==ke.Class.UNIVERSAL||l.type!==ke.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(l=k7t(l),n.mac){var u=null,d=0,p=ke.derToOid(n.macAlgorithm);switch(p){case cs.oids.sha1:u=fl.md.sha1.create(),d=20;break;case cs.oids.sha256:u=fl.md.sha256.create(),d=32;break;case cs.oids.sha384:u=fl.md.sha384.create(),d=48;break;case cs.oids.sha512:u=fl.md.sha512.create(),d=64;break;case cs.oids.md5:u=fl.md.md5.create(),d=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+p);var h=new fl.util.ByteBuffer(n.macSalt),m="macIterations"in n?parseInt(fl.util.bytesToHex(n.macIterations),16):1,g=I1e.generateKey(r,h,3,m,d,u),A=fl.hmac.create();A.start(u,g),A.update(l.value);var y=A.getMac();if(y.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(t.value)&&t.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return AOo(c,l.value,e,r),c};function k7t(t){if(t.composed||t.constructed){for(var e=fl.util.createBuffer(),r=0;r0&&(s=ke.create(ke.Class.UNIVERSAL,ke.Type.SET,!0,u));var d=[],p=[];e!==null&&(fl.util.isArray(e)?p=e:p=[e]);for(var h=[],m=0;m0){var E=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,h),_=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(E).getBytes())])]);d.push(_)}var v=null;if(t!==null){var b=cs.wrapRsaPrivateKey(cs.privateKeyToAsn1(t));r===null?v=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.keyBag).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[b]),s]):v=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.pkcs8ShroudedKeyBag).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[cs.encryptPrivateKeyInfo(b,r,n)]),s]);var I=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[v]),x=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(I).getBytes())])]);d.push(x)}var w=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,d),R;if(n.useMac){var l=fl.md.sha1.create(),P=new fl.util.ByteBuffer(fl.random.getBytes(n.saltSize)),k=n.count,t=I1e.generateKey(r,P,3,k,20),Q=fl.hmac.create();Q.start(l,t),Q.update(ke.toDer(w).getBytes());var M=Q.getMac();R=ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.sha1).getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.NULL,!1,"")]),ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,M.getBytes())]),ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,P.getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.INTEGER,!1,ke.integerToDer(k).getBytes())])}return ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.INTEGER,!1,ke.integerToDer(3).getBytes()),ke.create(ke.Class.UNIVERSAL,ke.Type.SEQUENCE,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OID,!1,ke.oidToDer(cs.oids.data).getBytes()),ke.create(ke.Class.CONTEXT_SPECIFIC,0,!0,[ke.create(ke.Class.UNIVERSAL,ke.Type.OCTETSTRING,!1,ke.toDer(w).getBytes())])]),R])};I1e.generateKey=fl.pbe.generatePkcs12Key});var M7t=T((XLu,Opn)=>{f();var o9=wo();gw();t9();x7t();nV();IVe();D7t();NVe();T1e();pa();BVe();var N7t=o9.asn1,joe=Opn.exports=o9.pki=o9.pki||{};joe.pemToDer=function(t){var e=o9.pem.decode(t)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return o9.util.createBuffer(e.body)};joe.privateKeyFromPem=function(t){var e=o9.pem.decode(t)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=N7t.fromDer(e.body);return joe.privateKeyFromAsn1(n)};joe.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:N7t.toDer(joe.privateKeyToAsn1(t)).getBytes()};return o9.pem.encode(r,{maxline:e})};joe.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:N7t.toDer(t).getBytes()};return o9.pem.encode(r,{maxline:e})}});var Q7t=T((e8u,Hpn)=>{f();var Ut=wo();gw();Boe();vVe();nV();M7t();XT();Qoe();pa();var QVe=a(function(t,e,r,n){var o=Ut.util.createBuffer(),s=t.length>>1,c=s+(t.length&1),l=t.substr(0,c),u=t.substr(s,c),d=Ut.util.createBuffer(),p=Ut.hmac.create();r=e+r;var h=Math.ceil(n/16),m=Math.ceil(n/20);p.start("MD5",l);var g=Ut.util.createBuffer();d.putBytes(r);for(var A=0;A0&&(oe.queue(t,oe.createAlert(t,{level:oe.Alert.Level.warning,description:oe.Alert.Description.no_renegotiation})),oe.flush(t)),t.process()};oe.parseHelloMessage=function(t,e,r){var n=null,o=t.entity===oe.ConnectionEnd.client;if(r<38)t.error(t,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});else{var s=e.fragment,c=s.length();if(n={version:{major:s.getByte(),minor:s.getByte()},random:Ut.util.createBuffer(s.getBytes(32)),session_id:dv(s,1),extensions:[]},o?(n.cipher_suite=s.getBytes(2),n.compression_method=s.getByte()):(n.cipher_suites=dv(s,2),n.compression_methods=dv(s,1)),c=r-(c-s.length()),c>0){for(var l=dv(s,2);l.length()>0;)n.extensions.push({type:[l.getByte(),l.getByte()],data:dv(l,2)});if(!o)for(var u=0;u0;){var h=p.getByte();if(h!==0)break;t.session.extensions.server_name.serverNameList.push(dv(p,2).getBytes())}}}if(t.session.version&&(n.version.major!==t.session.version.major||n.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}});if(o)t.session.cipherSuite=oe.getCipherSuite(n.cipher_suite);else for(var m=Ut.util.createBuffer(n.cipher_suites.bytes());m.length()>0&&(t.session.cipherSuite=oe.getCipherSuite(m.getBytes(2)),t.session.cipherSuite===null););if(t.session.cipherSuite===null)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.handshake_failure},cipherSuite:Ut.util.bytesToHex(n.cipher_suite)});o?t.session.compressionMethod=n.compression_method:t.session.compressionMethod=oe.CompressionMethod.none}return n};oe.createSecurityParameters=function(t,e){var r=t.entity===oe.ConnectionEnd.client,n=e.random.bytes(),o=r?t.session.sp.client_random:n,s=r?n:oe.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:oe.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:o,server_random:s}};oe.handleServerHello=function(t,e,r){var n=oe.parseHelloMessage(t,e,r);if(!t.fail){if(n.version.minor<=t.version.minor)t.version.minor=n.version.minor;else return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}});t.session.version=t.version;var o=n.session_id.bytes();o.length>0&&o===t.session.id?(t.expect=Fpn,t.session.resuming=!0,t.session.sp.server_random=n.random.bytes()):(t.expect=SOo,t.session.resuming=!1,oe.createSecurityParameters(t,n)),t.session.id=o,t.process()}};oe.handleClientHello=function(t,e,r){var n=oe.parseHelloMessage(t,e,r);if(!t.fail){var o=n.session_id.bytes(),s=null;if(t.sessionCache&&(s=t.sessionCache.getSession(o),s===null?o="":(s.version.major!==n.version.major||s.version.minor>n.version.minor)&&(s=null,o="")),o.length===0&&(o=Ut.random.getBytes(32)),t.session.id=o,t.session.clientHelloVersion=n.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var c,l=1;l0;)s=dv(o.certificate_list,3),c=Ut.asn1.fromDer(s),s=Ut.pki.certificateFromAsn1(c,!0),l.push(s)}catch(d){return t.error(t,{message:"Could not parse certificate list.",cause:d,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.bad_certificate}})}var u=t.entity===oe.ConnectionEnd.client;(u||t.verifyClient===!0)&&l.length===0?t.error(t,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}}):l.length===0?t.expect=u?Bpn:L7t:(u?t.session.serverCertificate=l[0]:t.session.clientCertificate=l[0],oe.verifyCertificateChain(t,l)&&(t.expect=u?Bpn:L7t)),t.process()};oe.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.unsupported_certificate}});t.expect=IOo,t.process()};oe.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.unsupported_certificate}});var n=e.fragment,o={enc_pre_master_secret:dv(n,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=Ut.pki.privateKeyFromPem(s)}catch(u){t.error(t,{message:"Could not get private key.",cause:u,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}})}if(s===null)return t.error(t,{message:"No private key set.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}});try{var c=t.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var l=t.session.clientHelloVersion;if(l.major!==c.pre_master_secret.charCodeAt(0)||l.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{c.pre_master_secret=Ut.random.getBytes(48)}t.expect=F7t,t.session.clientCertificate!==null&&(t.expect=NOo),t.process()};oe.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var n=e.fragment,o={certificate_types:dv(n,1),certificate_authorities:dv(n,2)};t.session.certificateRequest=o,t.expect=xOo,t.process()};oe.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var o=n.bytes();n.read+=4;var s={signature:dv(n,2).getBytes()},c=Ut.util.createBuffer();c.putBuffer(t.session.md5.digest()),c.putBuffer(t.session.sha1.digest()),c=c.getBytes();try{var l=t.session.clientCertificate;if(!l.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(o),t.session.sha1.update(o)}catch{return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.handshake_failure}})}t.expect=F7t,t.process()};oe.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.record_overflow}});if(t.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.insufficient_security}},o=0,s=t.verify(t,n.alert.description,o,[]);if(s!==!0)return(s||s===0)&&(typeof s=="object"&&!Ut.util.isArray(s)?(s.message&&(n.message=s.message),s.alert&&(n.alert.description=s.alert)):typeof s=="number"&&(n.alert.description=s)),t.error(t,n)}t.session.certificateRequest!==null&&(e=oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createCertificate(t)}),oe.queue(t,e)),e=oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createClientKeyExchange(t)}),oe.queue(t,e),t.expect=POo;var c=a(function(l,u){l.session.certificateRequest!==null&&l.session.clientCertificate!==null&&oe.queue(l,oe.createRecord(l,{type:oe.ContentType.handshake,data:oe.createCertificateVerify(l,u)})),oe.queue(l,oe.createRecord(l,{type:oe.ContentType.change_cipher_spec,data:oe.createChangeCipherSpec()})),l.state.pending=oe.createConnectionState(l),l.state.current.write=l.state.pending.write,oe.queue(l,oe.createRecord(l,{type:oe.ContentType.handshake,data:oe.createFinished(l)})),l.expect=Fpn,oe.flush(l),l.process()},"callback");if(t.session.certificateRequest===null||t.session.clientCertificate===null)return c(t,null);oe.getClientSignature(t,c)};oe.handleChangeCipherSpec=function(t,e){if(e.fragment.getByte()!==1)return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.illegal_parameter}});var r=t.entity===oe.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=oe.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?wOo:MOo,t.process()};oe.handleFinished=function(t,e,r){var n=e.fragment;n.read-=4;var o=n.bytes();n.read+=4;var s=e.fragment.getBytes();n=Ut.util.createBuffer(),n.putBuffer(t.session.md5.digest()),n.putBuffer(t.session.sha1.digest());var c=t.entity===oe.ConnectionEnd.client,l=c?"server finished":"client finished",u=t.session.sp,d=12,p=QVe;if(n=p(u.master_secret,l,n.getBytes(),d),n.getBytes()!==s)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.decrypt_error}});t.session.md5.update(o),t.session.sha1.update(o),(t.session.resuming&&c||!t.session.resuming&&!c)&&(oe.queue(t,oe.createRecord(t,{type:oe.ContentType.change_cipher_spec,data:oe.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,oe.queue(t,oe.createRecord(t,{type:oe.ContentType.handshake,data:oe.createFinished(t)}))),t.expect=c?ROo:OOo,t.handshaking=!1,++t.handshakes,t.peerCertificate=c?t.session.serverCertificate:t.session.clientCertificate,oe.flush(t),t.isConnected=!0,t.connected(t),t.process()};oe.handleAlert=function(t,e){var r=e.fragment,n={level:r.getByte(),description:r.getByte()},o;switch(n.description){case oe.Alert.Description.close_notify:o="Connection closed.";break;case oe.Alert.Description.unexpected_message:o="Unexpected message.";break;case oe.Alert.Description.bad_record_mac:o="Bad record MAC.";break;case oe.Alert.Description.decryption_failed:o="Decryption failed.";break;case oe.Alert.Description.record_overflow:o="Record overflow.";break;case oe.Alert.Description.decompression_failure:o="Decompression failed.";break;case oe.Alert.Description.handshake_failure:o="Handshake failure.";break;case oe.Alert.Description.bad_certificate:o="Bad certificate.";break;case oe.Alert.Description.unsupported_certificate:o="Unsupported certificate.";break;case oe.Alert.Description.certificate_revoked:o="Certificate revoked.";break;case oe.Alert.Description.certificate_expired:o="Certificate expired.";break;case oe.Alert.Description.certificate_unknown:o="Certificate unknown.";break;case oe.Alert.Description.illegal_parameter:o="Illegal parameter.";break;case oe.Alert.Description.unknown_ca:o="Unknown certificate authority.";break;case oe.Alert.Description.access_denied:o="Access denied.";break;case oe.Alert.Description.decode_error:o="Decode error.";break;case oe.Alert.Description.decrypt_error:o="Decrypt error.";break;case oe.Alert.Description.export_restriction:o="Export restriction.";break;case oe.Alert.Description.protocol_version:o="Unsupported protocol version.";break;case oe.Alert.Description.insufficient_security:o="Insufficient security.";break;case oe.Alert.Description.internal_error:o="Internal error.";break;case oe.Alert.Description.user_canceled:o="User canceled.";break;case oe.Alert.Description.no_renegotiation:o="Renegotiation not supported.";break;default:o="Unknown error.";break}if(n.description===oe.Alert.Description.close_notify)return t.close();t.error(t,{message:o,send:!1,origin:t.entity===oe.ConnectionEnd.client?"server":"client",alert:n}),t.process()};oe.handleHandshake=function(t,e){var r=e.fragment,n=r.getByte(),o=r.getInt24();if(o>r.length())return t.fragmented=e,e.fragment=Ut.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,n in UVe[t.entity][t.expect]?(t.entity===oe.ConnectionEnd.server&&!t.open&&!t.fail&&(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:Ut.md.md5.create(),sha1:Ut.md.sha1.create()}),n!==oe.HandshakeType.hello_request&&n!==oe.HandshakeType.certificate_verify&&n!==oe.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),UVe[t.entity][t.expect][n](t,e,o)):oe.handleUnexpected(t,e)};oe.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()};oe.handleHeartbeat=function(t,e){var r=e.fragment,n=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(n===oe.HeartbeatMessageType.heartbeat_request){if(t.handshaking||o>s.length)return t.process();oe.queue(t,oe.createRecord(t,{type:oe.ContentType.heartbeat,data:oe.createHeartbeat(oe.HeartbeatMessageType.heartbeat_response,s)})),oe.flush(t)}else if(n===oe.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,Ut.util.createBuffer(s))}t.process()};var TOo=0,SOo=1,Bpn=2,IOo=3,xOo=4,Fpn=5,wOo=6,ROo=7,POo=8,kOo=0,DOo=1,L7t=2,NOo=3,F7t=4,MOo=5,OOo=6,ie=oe.handleUnexpected,Upn=oe.handleChangeCipherSpec,xm=oe.handleAlert,gy=oe.handleHandshake,Qpn=oe.handleApplicationData,wm=oe.handleHeartbeat,U7t=[];U7t[oe.ConnectionEnd.client]=[[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[Upn,xm,ie,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,Qpn,wm],[ie,xm,gy,ie,wm]];U7t[oe.ConnectionEnd.server]=[[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,ie,wm],[Upn,xm,ie,ie,wm],[ie,xm,gy,ie,wm],[ie,xm,gy,Qpn,wm],[ie,xm,gy,ie,wm]];var s9=oe.handleHelloRequest,BOo=oe.handleServerHello,qpn=oe.handleCertificate,Lpn=oe.handleServerKeyExchange,O7t=oe.handleCertificateRequest,LVe=oe.handleServerHelloDone,Gpn=oe.handleFinished,UVe=[];UVe[oe.ConnectionEnd.client]=[[ie,ie,BOo,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,qpn,Lpn,O7t,LVe,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,Lpn,O7t,LVe,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,O7t,LVe,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,LVe,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,Gpn],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[s9,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie]];var LOo=oe.handleClientHello,FOo=oe.handleClientKeyExchange,UOo=oe.handleCertificateVerify;UVe[oe.ConnectionEnd.server]=[[ie,LOo,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,qpn,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,FOo,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,UOo,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,Gpn],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie],[ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie,ie]];oe.generateKeys=function(t,e){var r=QVe,n=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var o=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===oe.Versions.TLS_1_0.major&&t.version.minor===oe.Versions.TLS_1_0.minor;s&&(o+=2*e.fixed_iv_length);var c=r(e.master_secret,"key expansion",n,o),l={client_write_MAC_key:c.getBytes(e.mac_key_length),server_write_MAC_key:c.getBytes(e.mac_key_length),client_write_key:c.getBytes(e.enc_key_length),server_write_key:c.getBytes(e.enc_key_length)};return s&&(l.client_write_IV=c.getBytes(e.fixed_iv_length),l.server_write_IV=c.getBytes(e.fixed_iv_length)),l};oe.createConnectionState=function(t){var e=t.entity===oe.ConnectionEnd.client,r=a(function(){var s={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:a(function(c){return!0},"cipherFunction"),compressionState:null,compressFunction:a(function(c){return!0},"compressFunction"),updateSequenceNumber:a(function(){s.sequenceNumber[1]===4294967295?(s.sequenceNumber[1]=0,++s.sequenceNumber[0]):++s.sequenceNumber[1]},"updateSequenceNumber")};return s},"createMode"),n={read:r(),write:r()};if(n.read.update=function(s,c){return n.read.cipherFunction(c,n.read)?n.read.compressFunction(s,c,n.read)||s.error(s,{message:"Could not decompress record.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.decompression_failure}}):s.error(s,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.bad_record_mac}}),!s.fail},n.write.update=function(s,c){return n.write.compressFunction(s,c,n.write)?n.write.cipherFunction(c,n.write)||s.error(s,{message:"Could not encrypt record.",send:!1,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}):s.error(s,{message:"Could not compress record.",send:!1,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}),!s.fail},t.session){var o=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(o),o.keys=oe.generateKeys(t,o),n.read.macKey=e?o.keys.server_write_MAC_key:o.keys.client_write_MAC_key,n.write.macKey=e?o.keys.client_write_MAC_key:o.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(n,t,o),o.compression_algorithm){case oe.CompressionMethod.none:break;case oe.CompressionMethod.deflate:n.read.compressFunction=bOo,n.write.compressFunction=vOo;break;default:throw new Error("Unsupported compression algorithm.")}}return n};oe.createRandom=function(){var t=new Date,e=+t+t.getTimezoneOffset()*6e4,r=Ut.util.createBuffer();return r.putInt32(e),r.putBytes(Ut.random.getBytes(28)),r};oe.createRecord=function(t,e){if(!e.data)return null;var r={type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data};return r};oe.createAlert=function(t,e){var r=Ut.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),oe.createRecord(t,{type:oe.ContentType.alert,data:r})};oe.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=Ut.util.createBuffer(),r=0;r0&&(h+=2);var m=t.session.id,g=m.length+1+2+4+28+2+o+1+c+h,A=Ut.util.createBuffer();return A.putByte(oe.HandshakeType.client_hello),A.putInt24(g),A.putByte(t.version.major),A.putByte(t.version.minor),A.putBytes(t.session.sp.client_random),rS(A,1,Ut.util.createBuffer(m)),rS(A,2,e),rS(A,1,s),h>0&&rS(A,2,l),A};oe.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,n=Ut.util.createBuffer();return n.putByte(oe.HandshakeType.server_hello),n.putInt24(r),n.putByte(t.version.major),n.putByte(t.version.minor),n.putBytes(t.session.sp.server_random),rS(n,1,Ut.util.createBuffer(e)),n.putByte(t.session.cipherSuite.id[0]),n.putByte(t.session.cipherSuite.id[1]),n.putByte(t.session.compressionMethod),n};oe.createCertificate=function(t){var e=t.entity===oe.ConnectionEnd.client,r=null;if(t.getCertificate){var n;e?n=t.session.certificateRequest:n=t.session.extensions.server_name.serverNameList,r=t.getCertificate(t,n)}var o=Ut.util.createBuffer();if(r!==null)try{Ut.util.isArray(r)||(r=[r]);for(var s=null,c=0;c0&&(r.putByte(oe.HandshakeType.server_key_exchange),r.putInt24(e)),r};oe.getClientSignature=function(t,e){var r=Ut.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(n,o,s){var c=null;if(n.getPrivateKey)try{c=n.getPrivateKey(n,n.session.clientCertificate),c=Ut.pki.privateKeyFromPem(c)}catch(l){n.error(n,{message:"Could not get private key.",cause:l,send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}})}c===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.internal_error}}):o=c.sign(o,null),s(n,o)},t.getSignature(t,r,e)};oe.createCertificateVerify=function(t,e){var r=e.length+2,n=Ut.util.createBuffer();return n.putByte(oe.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(e.length),n.putBytes(e),n};oe.createCertificateRequest=function(t){var e=Ut.util.createBuffer();e.putByte(1);var r=Ut.util.createBuffer();for(var n in t.caStore.certs){var o=t.caStore.certs[n],s=Ut.pki.distinguishedNameToAsn1(o.subject),c=Ut.asn1.toDer(s);r.putInt16(c.length()),r.putBuffer(c)}var l=1+e.length()+2+r.length(),u=Ut.util.createBuffer();return u.putByte(oe.HandshakeType.certificate_request),u.putInt24(l),rS(u,1,e),rS(u,2,r),u};oe.createServerHelloDone=function(t){var e=Ut.util.createBuffer();return e.putByte(oe.HandshakeType.server_hello_done),e.putInt24(0),e};oe.createChangeCipherSpec=function(){var t=Ut.util.createBuffer();return t.putByte(1),t};oe.createFinished=function(t){var e=Ut.util.createBuffer();e.putBuffer(t.session.md5.digest()),e.putBuffer(t.session.sha1.digest());var r=t.entity===oe.ConnectionEnd.client,n=t.session.sp,o=12,s=QVe,c=r?"client finished":"server finished";e=s(n.master_secret,c,e.getBytes(),o);var l=Ut.util.createBuffer();return l.putByte(oe.HandshakeType.finished),l.putInt24(e.length()),l.putBuffer(e),l};oe.createHeartbeat=function(t,e,r){typeof r>"u"&&(r=e.length);var n=Ut.util.createBuffer();n.putByte(t),n.putInt16(r),n.putBytes(e);var o=n.length(),s=Math.max(16,o-r-3);return n.putBytes(Ut.random.getBytes(s)),n};oe.queue=function(t,e){if(e&&!(e.fragment.length()===0&&(e.type===oe.ContentType.handshake||e.type===oe.ContentType.alert||e.type===oe.ContentType.change_cipher_spec))){if(e.type===oe.ContentType.handshake){var r=e.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var n;if(e.fragment.length()<=oe.MaxFragment)n=[e];else{n=[];for(var o=e.fragment.bytes();o.length>oe.MaxFragment;)n.push(oe.createRecord(t,{type:e.type,data:Ut.util.createBuffer(o.slice(0,oe.MaxFragment))})),o=o.slice(oe.MaxFragment);o.length>0&&n.push(oe.createRecord(t,{type:e.type,data:Ut.util.createBuffer(o)}))}for(var s=0;s0&&(c=r.order[0]),c!==null&&c in r.cache){s=r.cache[c],delete r.cache[c];for(var l in r.order)if(r.order[l]===c){r.order.splice(l,1);break}}return s},r.setSession=function(o,s){if(r.order.length===r.capacity){var c=r.order.shift();delete r.cache[c]}var c=Ut.util.bytesToHex(o);r.order.push(c),r.cache[c]=s}}return r};oe.createConnection=function(t){var e=null;t.caStore?Ut.util.isArray(t.caStore)?e=Ut.pki.createCaStore(t.caStore):e=t.caStore:e=Ut.pki.createCaStore();var r=t.cipherSuites||null;if(r===null){r=[];for(var n in oe.CipherSuites)r.push(oe.CipherSuites[n])}var o=t.server?oe.ConnectionEnd.server:oe.ConnectionEnd.client,s=t.sessionCache?oe.createSessionCache(t.sessionCache):null,c={version:{major:oe.Version.major,minor:oe.Version.minor},entity:o,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(p,h,m,g){return h},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:Ut.util.createBuffer(),tlsData:Ut.util.createBuffer(),data:Ut.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:a(function(p,h){h.origin=h.origin||(p.entity===oe.ConnectionEnd.client?"client":"server"),h.send&&(oe.queue(p,oe.createAlert(p,h.alert)),oe.flush(p));var m=h.fatal!==!1;m&&(p.fail=!0),t.error(p,h),m&&p.close(!1)},"error"),deflate:t.deflate||null,inflate:t.inflate||null};c.reset=function(p){c.version={major:oe.Version.major,minor:oe.Version.minor},c.record=null,c.session=null,c.peerCertificate=null,c.state={pending:null,current:null},c.expect=c.entity===oe.ConnectionEnd.client?TOo:kOo,c.fragmented=null,c.records=[],c.open=!1,c.handshakes=0,c.handshaking=!1,c.isConnected=!1,c.fail=!(p||typeof p>"u"),c.input.clear(),c.tlsData.clear(),c.data.clear(),c.state.current=oe.createConnectionState(c)},c.reset();var l=a(function(p,h){var m=h.type-oe.ContentType.change_cipher_spec,g=U7t[p.entity][p.expect];m in g?g[m](p,h):oe.handleUnexpected(p,h)},"_update"),u=a(function(p){var h=0,m=p.input,g=m.length();if(g<5)h=5-g;else{p.record={type:m.getByte(),version:{major:m.getByte(),minor:m.getByte()},length:m.getInt16(),fragment:Ut.util.createBuffer(),ready:!1};var A=p.record.version.major===p.version.major;A&&p.session&&p.session.version&&(A=p.record.version.minor===p.version.minor),A||p.error(p,{message:"Incompatible TLS version.",send:!0,alert:{level:oe.Alert.Level.fatal,description:oe.Alert.Description.protocol_version}})}return h},"_readRecordHeader"),d=a(function(p){var h=0,m=p.input,g=m.length();if(g0&&(c.sessionCache&&(h=c.sessionCache.getSession(p)),h===null&&(p="")),p.length===0&&c.sessionCache&&(h=c.sessionCache.getSession(),h!==null&&(p=h.id)),c.session={id:p,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:Ut.md.md5.create(),sha1:Ut.md.sha1.create()},h&&(c.version=h.version,c.session.sp=h.sp),c.session.sp.client_random=oe.createRandom().getBytes(),c.open=!0,oe.queue(c,oe.createRecord(c,{type:oe.ContentType.handshake,data:oe.createClientHello(c)})),oe.flush(c)}},c.process=function(p){var h=0;return p&&c.input.putBytes(p),c.fail||(c.record!==null&&c.record.ready&&c.record.fragment.isEmpty()&&(c.record=null),c.record===null&&(h=u(c)),!c.fail&&c.record!==null&&!c.record.ready&&(h=d(c)),!c.fail&&c.record!==null&&c.record.ready&&l(c,c.record)),h},c.prepare=function(p){return oe.queue(c,oe.createRecord(c,{type:oe.ContentType.application_data,data:Ut.util.createBuffer(p)})),oe.flush(c)},c.prepareHeartbeatRequest=function(p,h){return p instanceof Ut.util.ByteBuffer&&(p=p.bytes()),typeof h>"u"&&(h=p.length),c.expectedHeartbeatPayload=p,oe.queue(c,oe.createRecord(c,{type:oe.ContentType.heartbeat,data:oe.createHeartbeat(oe.HeartbeatMessageType.heartbeat_request,p,h)})),oe.flush(c)},c.close=function(p){if(!c.fail&&c.sessionCache&&c.session){var h={id:c.session.id,version:c.session.version,sp:c.session.sp};h.sp.keys=null,c.sessionCache.setSession(h.id,h)}c.open&&(c.open=!1,c.input.clear(),(c.isConnected||c.handshaking)&&(c.isConnected=c.handshaking=!1,oe.queue(c,oe.createAlert(c,{level:oe.Alert.Level.warning,description:oe.Alert.Description.close_notify})),oe.flush(c)),c.closed(c)),c.reset(p)},c};Hpn.exports=Ut.tls=Ut.tls||{};for(FVe in oe)typeof oe[FVe]!="function"&&(Ut.tls[FVe]=oe[FVe]);var FVe;Ut.tls.prf_tls1=QVe;Ut.tls.hmac_sha1=COo;Ut.tls.createSessionCache=oe.createSessionCache;Ut.tls.createConnection=oe.createConnection});var Vpn=T((n8u,$pn)=>{f();var a9=wo();e9();Q7t();var nS=$pn.exports=a9.tls;nS.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:a(function(t){t.bulk_cipher_algorithm=nS.BulkCipherAlgorithm.aes,t.cipher_type=nS.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=nS.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},"initSecurityParameters"),initConnectionState:jpn};nS.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:a(function(t){t.bulk_cipher_algorithm=nS.BulkCipherAlgorithm.aes,t.cipher_type=nS.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=nS.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},"initSecurityParameters"),initConnectionState:jpn};function jpn(t,e,r){var n=e.entity===a9.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:a9.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:a9.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=jOo,t.write.cipherFunction=qOo,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=nS.hmac_sha1}a(jpn,"initConnectionState");function qOo(t,e){var r=!1,n=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(n),e.updateSequenceNumber();var o;t.version.minor===nS.Versions.TLS_1_0.minor?o=e.cipherState.init?null:e.cipherState.iv:o=a9.random.getBytesSync(16),e.cipherState.init=!0;var s=e.cipherState.cipher;return s.start({iv:o}),t.version.minor>=nS.Versions.TLS_1_1.minor&&s.output.putBytes(o),s.update(t.fragment),s.finish(GOo)&&(t.fragment=s.output,t.length=t.fragment.length(),r=!0),r}a(qOo,"encrypt_aes_cbc_sha1");function GOo(t,e,r){if(!r){var n=t-e.length()%t;e.fillWithByte(n-1,n)}return!0}a(GOo,"encrypt_aes_cbc_sha1_padding");function HOo(t,e,r){var n=!0;if(r){for(var o=e.length(),s=e.last(),c=o-1-s;c=s?(t.fragment=o.output.getBytes(l-s),c=o.output.getBytes(s)):t.fragment=o.output.getBytes(),t.fragment=a9.util.createBuffer(t.fragment),t.length=t.fragment.length();var u=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),r=$Oo(e.macKey,c,u)&&r,r}a(jOo,"decrypt_aes_cbc_sha1");function $Oo(t,e,r){var n=a9.hmac.create();return n.start("SHA1",t),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),e===r}a($Oo,"compareMacs")});var H7t=T((s8u,Kpn)=>{f();var Yl=wo();Jk();pa();var x1e=Kpn.exports=Yl.sha512=Yl.sha512||{};Yl.md.sha512=Yl.md.algorithms.sha512=x1e;var zpn=Yl.sha384=Yl.sha512.sha384=Yl.sha512.sha384||{};zpn.create=function(){return x1e.create("SHA-384")};Yl.md.sha384=Yl.md.algorithms.sha384=zpn;Yl.sha512.sha256=Yl.sha512.sha256||{create:a(function(){return x1e.create("SHA-512/256")},"create")};Yl.md["sha512/256"]=Yl.md.algorithms["sha512/256"]=Yl.sha512.sha256;Yl.sha512.sha224=Yl.sha512.sha224||{create:a(function(){return x1e.create("SHA-512/224")},"create")};Yl.md["sha512/224"]=Yl.md.algorithms["sha512/224"]=Yl.sha512.sha224;x1e.create=function(t){if(Ypn||VOo(),typeof t>"u"&&(t="SHA-512"),!(t in lV))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=lV[t],r=null,n=Yl.util.createBuffer(),o=new Array(80),s=0;s<80;++s)o[s]=new Array(2);var c=64;switch(t){case"SHA-384":c=48;break;case"SHA-512/256":c=32;break;case"SHA-512/224":c=28;break}var l={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:c,messageLength:0,fullMessageLength:null,messageLengthSize:16};return l.start=function(){l.messageLength=0,l.fullMessageLength=l.messageLength128=[];for(var u=l.messageLengthSize/4,d=0;d>>0,p>>>0];for(var h=l.fullMessageLength.length-1;h>=0;--h)l.fullMessageLength[h]+=p[1],p[1]=p[0]+(l.fullMessageLength[h]/4294967296>>>0),l.fullMessageLength[h]=l.fullMessageLength[h]>>>0,p[0]=p[1]/4294967296>>>0;return n.putBytes(u),Wpn(r,o,n),(n.read>2048||n.length()===0)&&n.compact(),l},l.digest=function(){var u=Yl.util.createBuffer();u.putBytes(n.bytes());var d=l.fullMessageLength[l.fullMessageLength.length-1]+l.messageLengthSize,p=d&l.blockLength-1;u.putBytes(q7t.substr(0,l.blockLength-p));for(var h,m,g=l.fullMessageLength[0]*8,A=0;A>>0,g+=m,u.putInt32(g>>>0),g=h>>>0;u.putInt32(g);for(var y=new Array(r.length),A=0;A=128;){for(D=0;D<16;++D)e[D][0]=r.getInt32()>>>0,e[D][1]=r.getInt32()>>>0;for(;D<80;++D)L=e[D-2],F=L[0],U=L[1],n=((F>>>19|U<<13)^(U>>>29|F<<3)^F>>>6)>>>0,o=((F<<13|U>>>19)^(U<<3|F>>>29)^(F<<26|U>>>6))>>>0,$=e[D-15],F=$[0],U=$[1],s=((F>>>1|U<<31)^(F>>>8|U<<24)^F>>>7)>>>0,c=((F<<31|U>>>1)^(F<<24|U>>>8)^(F<<25|U>>>7))>>>0,H=e[D-7],W=e[D-16],U=o+H[1]+c+W[1],e[D][0]=n+H[0]+s+W[0]+(U/4294967296>>>0)>>>0,e[D][1]=U>>>0;for(y=t[0][0],E=t[0][1],_=t[1][0],v=t[1][1],b=t[2][0],I=t[2][1],x=t[3][0],w=t[3][1],R=t[4][0],P=t[4][1],k=t[5][0],Q=t[5][1],M=t[6][0],N=t[6][1],G=t[7][0],O=t[7][1],D=0;D<80;++D)d=((R>>>14|P<<18)^(R>>>18|P<<14)^(P>>>9|R<<23))>>>0,p=((R<<18|P>>>14)^(R<<14|P>>>18)^(P<<23|R>>>9))>>>0,h=(M^R&(k^M))>>>0,m=(N^P&(Q^N))>>>0,l=((y>>>28|E<<4)^(E>>>2|y<<30)^(E>>>7|y<<25))>>>0,u=((y<<4|E>>>28)^(E<<30|y>>>2)^(E<<25|y>>>7))>>>0,g=(y&_|b&(y^_))>>>0,A=(E&v|I&(E^v))>>>0,U=O+p+m+G7t[D][1]+e[D][1],n=G+d+h+G7t[D][0]+e[D][0]+(U/4294967296>>>0)>>>0,o=U>>>0,U=u+A,s=l+g+(U/4294967296>>>0)>>>0,c=U>>>0,G=M,O=N,M=k,N=Q,k=R,Q=P,U=w+o,R=x+n+(U/4294967296>>>0)>>>0,P=U>>>0,x=b,w=I,b=_,I=v,_=y,v=E,U=o+c,y=n+s+(U/4294967296>>>0)>>>0,E=U>>>0;U=t[0][1]+E,t[0][0]=t[0][0]+y+(U/4294967296>>>0)>>>0,t[0][1]=U>>>0,U=t[1][1]+v,t[1][0]=t[1][0]+_+(U/4294967296>>>0)>>>0,t[1][1]=U>>>0,U=t[2][1]+I,t[2][0]=t[2][0]+b+(U/4294967296>>>0)>>>0,t[2][1]=U>>>0,U=t[3][1]+w,t[3][0]=t[3][0]+x+(U/4294967296>>>0)>>>0,t[3][1]=U>>>0,U=t[4][1]+P,t[4][0]=t[4][0]+R+(U/4294967296>>>0)>>>0,t[4][1]=U>>>0,U=t[5][1]+Q,t[5][0]=t[5][0]+k+(U/4294967296>>>0)>>>0,t[5][1]=U>>>0,U=t[6][1]+N,t[6][0]=t[6][0]+M+(U/4294967296>>>0)>>>0,t[6][1]=U>>>0,U=t[7][1]+O,t[7][0]=t[7][0]+G+(U/4294967296>>>0)>>>0,t[7][1]=U>>>0,j-=128}}a(Wpn,"_update")});var Jpn=T(j7t=>{f();var WOo=wo();gw();var Sh=WOo.asn1;j7t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};j7t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Sh.Class.UNIVERSAL,type:Sh.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var uhn=T((d8u,lhn)=>{f();var Rm=wo();b1e();XT();H7t();pa();var nhn=Jpn(),zOo=nhn.publicKeyValidator,YOo=nhn.privateKeyValidator;typeof Xpn>"u"&&(Xpn=Rm.jsbn.BigInteger);var Xpn,V7t=Rm.util.ByteBuffer,__=typeof Buffer>"u"?Uint8Array:Buffer;Rm.pki=Rm.pki||{};lhn.exports=Rm.pki.ed25519=Rm.ed25519=Rm.ed25519||{};var ls=Rm.ed25519;ls.constants={};ls.constants.PUBLIC_KEY_BYTE_LENGTH=32;ls.constants.PRIVATE_KEY_BYTE_LENGTH=64;ls.constants.SEED_BYTE_LENGTH=32;ls.constants.SIGN_BYTE_LENGTH=64;ls.constants.HASH_BYTE_LENGTH=64;ls.generateKeyPair=function(t){t=t||{};var e=t.seed;if(e===void 0)e=Rm.random.getBytesSync(ls.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==ls.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+ls.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=Z4({message:e,encoding:"binary"});for(var r=new __(ls.constants.PUBLIC_KEY_BYTE_LENGTH),n=new __(ls.constants.PRIVATE_KEY_BYTE_LENGTH),o=0;o<32;++o)n[o]=e[o];return ZOo(r,n),{publicKey:r,privateKey:n}};ls.privateKeyFromAsn1=function(t){var e={},r=[],n=Rm.asn1.validate(t,YOo,e,r);if(!n){var o=new Error("Invalid Key.");throw o.errors=r,o}var s=Rm.asn1.derToOid(e.privateKeyOid),c=Rm.oids.EdDSA25519;if(s!==c)throw new Error('Invalid OID "'+s+'"; OID must be "'+c+'".');var l=e.privateKey,u=Z4({message:Rm.asn1.fromDer(l).value,encoding:"binary"});return{privateKeyBytes:u}};ls.publicKeyFromAsn1=function(t){var e={},r=[],n=Rm.asn1.validate(t,zOo,e,r);if(!n){var o=new Error("Invalid Key.");throw o.errors=r,o}var s=Rm.asn1.derToOid(e.publicKeyOid),c=Rm.oids.EdDSA25519;if(s!==c)throw new Error('Invalid OID "'+s+'"; OID must be "'+c+'".');var l=e.ed25519PublicKey;if(l.length!==ls.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Z4({message:l,encoding:"binary"})};ls.publicKeyFromPrivateKey=function(t){t=t||{};var e=Z4({message:t.privateKey,encoding:"binary"});if(e.length!==ls.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+ls.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new __(ls.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n=0};function Z4(t){var e=t.message;if(e instanceof Uint8Array||e instanceof __)return e;var r=t.encoding;if(e===void 0)if(t.md)e=t.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,r);e=new V7t(e,r)}else if(!(e instanceof V7t))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new __(e.length()),o=0;o=0;--r){if(t[e+r]w1e[r])return!1}return!1}a(rBo,"_isCanonicalSignatureScalar");function ihn(t,e){var r,n,o,s;for(n=63;n>=32;--n){for(r=0,o=n-32,s=n-12;o>8,e[o]-=r*256;e[o]+=r,e[n]=0}for(r=0,o=0;o<32;++o)e[o]+=r-(e[31]>>4)*w1e[o],r=e[o]>>8,e[o]&=255;for(o=0;o<32;++o)e[o]-=r*w1e[o];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,t[n]=e[n]&255}a(ihn,"modL");function z7t(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;ihn(t,e)}a(z7t,"reduce");function Y7t(t,e){var r=gi(),n=gi(),o=gi(),s=gi(),c=gi(),l=gi(),u=gi(),d=gi(),p=gi();Voe(r,t[1],t[0]),Voe(p,e[1],e[0]),Gc(r,r,p),$oe(n,t[0],t[1]),$oe(p,e[0],e[1]),Gc(n,n,p),Gc(o,t[3],e[3]),Gc(o,o,JOo),Gc(s,t[2],e[2]),$oe(s,s,s),Voe(c,n,r),Voe(l,s,o),$oe(u,s,o),$oe(d,n,r),Gc(t[0],c,l),Gc(t[1],d,u),Gc(t[2],u,l),Gc(t[3],c,d)}a(Y7t,"add");function thn(t,e,r){for(var n=0;n<4;++n)chn(t[n],e[n],r)}a(thn,"cswap");function K7t(t,e){var r=gi(),n=gi(),o=gi();aBo(o,e[2]),Gc(r,e[0],o),Gc(n,e[1],o),GVe(t,n),t[31]^=shn(r)<<7}a(K7t,"pack");function GVe(t,e){var r,n,o,s=gi(),c=gi();for(r=0;r<16;++r)c[r]=e[r];for($7t(c),$7t(c),$7t(c),n=0;n<2;++n){for(s[0]=c[0]-65517,r=1;r<15;++r)s[r]=c[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=c[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,chn(c,s,1-o)}for(r=0;r<16;r++)t[2*r]=c[r]&255,t[2*r+1]=c[r]>>8}a(GVe,"pack25519");function nBo(t,e){var r=gi(),n=gi(),o=gi(),s=gi(),c=gi(),l=gi(),u=gi();return c9(t[2],qVe),iBo(t[1],e),uV(o,t[1]),Gc(s,o,KOo),Voe(o,o,t[2]),$oe(s,t[2],s),uV(c,s),uV(l,c),Gc(u,l,c),Gc(r,u,o),Gc(r,r,s),oBo(r,r),Gc(r,r,o),Gc(r,r,s),Gc(r,r,s),Gc(t[0],r,s),uV(n,t[0]),Gc(n,n,s),rhn(n,o)&&Gc(t[0],t[0],XOo),uV(n,t[0]),Gc(n,n,s),rhn(n,o)?-1:(shn(t[0])===e[31]>>7&&Voe(t[0],W7t,t[0]),Gc(t[3],t[0],t[1]),0)}a(nBo,"unpackneg");function iBo(t,e){var r;for(r=0;r<16;++r)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}a(iBo,"unpack25519");function oBo(t,e){var r=gi(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=250;n>=0;--n)uV(r,r),n!==1&&Gc(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}a(oBo,"pow2523");function rhn(t,e){var r=new __(32),n=new __(32);return GVe(r,t),GVe(n,e),ohn(r,0,n,0)}a(rhn,"neq25519");function ohn(t,e,r,n){return sBo(t,e,r,n,32)}a(ohn,"crypto_verify_32");function sBo(t,e,r,n,o){var s,c=0;for(s=0;s>>8)-1}a(sBo,"vn");function shn(t){var e=new __(32);return GVe(e,t),e[0]&1}a(shn,"par25519");function ahn(t,e,r){var n,o;for(c9(t[0],W7t),c9(t[1],qVe),c9(t[2],qVe),c9(t[3],W7t),o=255;o>=0;--o)n=r[o/8|0]>>(o&7)&1,thn(t,e,n),Y7t(e,t),Y7t(t,t),thn(t,e,n)}a(ahn,"scalarmult");function J7t(t,e){var r=[gi(),gi(),gi(),gi()];c9(r[0],Zpn),c9(r[1],ehn),c9(r[2],qVe),Gc(r[3],Zpn,ehn),ahn(t,r,e)}a(J7t,"scalarbase");function c9(t,e){var r;for(r=0;r<16;r++)t[r]=e[r]|0}a(c9,"set25519");function aBo(t,e){var r=gi(),n;for(n=0;n<16;++n)r[n]=e[n];for(n=253;n>=0;--n)uV(r,r),n!==2&&n!==4&&Gc(r,r,e);for(n=0;n<16;++n)t[n]=r[n]}a(aBo,"inv25519");function $7t(t){var e,r,n=1;for(e=0;e<16;++e)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-n*65536;t[0]+=n-1+37*(n-1)}a($7t,"car25519");function chn(t,e,r){for(var n,o=~(r-1),s=0;s<16;++s)n=o&(t[s]^e[s]),t[s]^=n,e[s]^=n}a(chn,"sel25519");function gi(t){var e,r=new Float64Array(16);if(t)for(e=0;e{f();var fv=wo();pa();XT();b1e();phn.exports=fv.kem=fv.kem||{};var dhn=fv.jsbn.BigInteger;fv.kem.rsa={};fv.kem.rsa.create=function(t,e){e=e||{};var r=e.prng||fv.random,n={};return n.encrypt=function(o,s){var c=Math.ceil(o.n.bitLength()/8),l;do l=new dhn(fv.util.bytesToHex(r.getBytesSync(c)),16).mod(o.n);while(l.compareTo(dhn.ONE)<=0);l=fv.util.hexToBytes(l.toString(16));var u=c-l.length;u>0&&(l=fv.util.fillString("\0",u)+l);var d=o.encrypt(l,"NONE"),p=t.generate(l,s);return{encapsulation:d,key:p}},n.decrypt=function(o,s,c){var l=o.decrypt(s,"NONE");return t.generate(l,c)},n};fv.kem.kdf1=function(t,e){fhn(this,t,0,e||t.digestLength)};fv.kem.kdf2=function(t,e){fhn(this,t,1,e||t.digestLength)};function fhn(t,e,r,n){t.generate=function(o,s){for(var c=new fv.util.ByteBuffer,l=Math.ceil(s/n)+r,u=new fv.util.ByteBuffer,d=r;d{f();var bs=wo();pa();Ahn.exports=bs.log=bs.log||{};bs.log.levels=["none","error","warning","info","debug","verbose","max"];var HVe={},eUt=[],k1e=null;bs.log.LEVEL_LOCKED=2;bs.log.NO_LEVEL_CHECK=4;bs.log.INTERPOLATE=8;for(o5=0;o5"u"||e?t.flags|=bs.log.LEVEL_LOCKED:t.flags&=~bs.log.LEVEL_LOCKED};bs.log.addLogger=function(t){eUt.push(t)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(mhn={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},D1e=a(function(t,e){bs.log.prepareStandard(e);var r=mhn[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),r.apply(console,n)},"f"),Woe=bs.log.makeLogger(D1e)):(D1e=a(function(e,r){bs.log.prepareStandardFull(r),console.log(r.standardFull)},"f"),Woe=bs.log.makeLogger(D1e)),bs.log.setLevel(Woe,"debug"),bs.log.addLogger(Woe),k1e=Woe):console={log:a(function(){},"log")};var Woe,mhn,D1e;k1e!==null&&typeof window<"u"&&window.location&&(P1e=new URL(window.location.href).searchParams,P1e.has("console.level")&&bs.log.setLevel(k1e,P1e.get("console.level").slice(-1)[0]),P1e.has("console.lock")&&(ghn=P1e.get("console.lock").slice(-1)[0],ghn=="true"&&bs.log.lock(k1e)));var P1e,ghn;bs.log.consoleLogger=k1e});var _hn=T((_8u,Ehn)=>{f();Ehn.exports=Jk();vVe();Qoe();h7t();H7t()});var bhn=T((v8u,vhn)=>{f();var Br=wo();e9();gw();C1e();t9();nV();w7t();XT();pa();BVe();var Oe=Br.asn1,Ay=vhn.exports=Br.pkcs7=Br.pkcs7||{};Ay.messageFromPem=function(t){var e=Br.pem.decode(t)[0];if(e.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=Oe.fromDer(e.body);return Ay.messageFromAsn1(n)};Ay.messageToPem=function(t,e){var r={type:"PKCS7",body:Oe.toDer(t.toAsn1()).getBytes()};return Br.pem.encode(r,{maxline:e})};Ay.messageFromAsn1=function(t){var e={},r=[];if(!Oe.validate(t,Ay.asn1.contentInfoValidator,e,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var o=Oe.derToOid(e.contentType),s;switch(o){case Br.pki.oids.envelopedData:s=Ay.createEnvelopedData();break;case Br.pki.oids.encryptedData:s=Ay.createEncryptedData();break;case Br.pki.oids.signedData:s=Ay.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+o+" is not (yet) supported.")}return s.fromAsn1(e.content.value[0]),s};Ay.createSignedData=function(){var t=null;return t={type:Br.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:a(function(n){if(rUt(t,n,Ay.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var o=t.rawCapture.certificates.value,s=0;s0&&c.value[0].value.push(Oe.create(Oe.Class.CONTEXT_SPECIFIC,0,!0,n)),s.length>0&&c.value[0].value.push(Oe.create(Oe.Class.CONTEXT_SPECIFIC,1,!0,s)),c.value[0].value.push(Oe.create(Oe.Class.UNIVERSAL,Oe.Type.SET,!0,t.signerInfos)),Oe.create(Oe.Class.UNIVERSAL,Oe.Type.SEQUENCE,!0,[Oe.create(Oe.Class.UNIVERSAL,Oe.Type.OID,!1,Oe.oidToDer(t.type).getBytes()),c])},"toAsn1"),addSigner:a(function(n){var o=n.issuer,s=n.serialNumber;if(n.certificate){var c=n.certificate;typeof c=="string"&&(c=Br.pki.certificateFromPem(c)),o=c.issuer.attributes,s=c.serialNumber}var l=n.key;if(!l)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof l=="string"&&(l=Br.pki.privateKeyFromPem(l));var u=n.digestAlgorithm||Br.pki.oids.sha1;switch(u){case Br.pki.oids.sha1:case Br.pki.oids.sha256:case Br.pki.oids.sha384:case Br.pki.oids.sha512:case Br.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var d=n.authenticatedAttributes||[];if(d.length>0){for(var p=!1,h=!1,m=0;m0){for(var r=Oe.create(Oe.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=r&&o{f();var b0=wo();e9();Boe();vVe();Qoe();pa();var $Ve=Thn.exports=b0.ssh=b0.ssh||{};$Ve.privateKeyToPutty=function(t,e,r){r=r||"",e=e||"";var n="ssh-rsa",o=e===""?"none":"aes256-cbc",s="PuTTY-User-Key-File-2: "+n+`\r `;s+="Encryption: "+o+`\r `,s+="Comment: "+r+`\r -`;var c=w0.util.createBuffer();Mse(c,n),yN(c,t.e),yN(c,t.n);var l=w0.util.encode64(c.bytes(),64),u=Math.floor(l.length/66)+1;s+="Public-Lines: "+u+`\r -`,s+=l;var d=w0.util.createBuffer();yN(d,t.d),yN(d,t.p),yN(d,t.q),yN(d,t.qInv);var p;if(!e)p=w0.util.encode64(d.bytes(),64);else{var h=d.length()+16-1;h-=h%16;var m=BWe(d.bytes());m.truncate(m.length()-h+d.length()),d.putBuffer(m);var g=w0.util.createBuffer();g.putBuffer(BWe("\0\0\0\0",e)),g.putBuffer(BWe("\0\0\0",e));var A=w0.aes.createEncryptionCipher(g.truncate(8),"CBC");A.start(w0.util.createBuffer().fillWithByte(0,16)),A.update(d.copy()),A.finish();var y=A.output;y.truncate(16),p=w0.util.encode64(y.bytes(),64)}u=Math.floor(p.length/66)+1,s+=`\r +`;var c=b0.util.createBuffer();zoe(c,n),s5(c,t.e),s5(c,t.n);var l=b0.util.encode64(c.bytes(),64),u=Math.floor(l.length/66)+1;s+="Public-Lines: "+u+`\r +`,s+=l;var d=b0.util.createBuffer();s5(d,t.d),s5(d,t.p),s5(d,t.q),s5(d,t.qInv);var p;if(!e)p=b0.util.encode64(d.bytes(),64);else{var h=d.length()+16-1;h-=h%16;var m=jVe(d.bytes());m.truncate(m.length()-h+d.length()),d.putBuffer(m);var g=b0.util.createBuffer();g.putBuffer(jVe("\0\0\0\0",e)),g.putBuffer(jVe("\0\0\0",e));var A=b0.aes.createEncryptionCipher(g.truncate(8),"CBC");A.start(b0.util.createBuffer().fillWithByte(0,16)),A.update(d.copy()),A.finish();var y=A.output;y.truncate(16),p=b0.util.encode64(y.bytes(),64)}u=Math.floor(p.length/66)+1,s+=`\r Private-Lines: `+u+`\r -`,s+=p;var E=BWe("putty-private-key-file-mac-key",e),_=w0.util.createBuffer();Mse(_,n),Mse(_,o),Mse(_,r),_.putInt32(c.length()),_.putBuffer(c),_.putInt32(d.length()),_.putBuffer(d);var v=w0.hmac.create();return v.start("sha1",E),v.update(_.bytes()),s+=`\r +`,s+=p;var E=jVe("putty-private-key-file-mac-key",e),_=b0.util.createBuffer();zoe(_,n),zoe(_,o),zoe(_,r),_.putInt32(c.length()),_.putBuffer(c),_.putInt32(d.length()),_.putBuffer(d);var v=b0.hmac.create();return v.start("sha1",E),v.update(_.bytes()),s+=`\r Private-MAC: `+v.digest().toHex()+`\r -`,s};LWe.publicKeyToOpenSSH=function(t,e){var r="ssh-rsa";e=e||"";var n=w0.util.createBuffer();return Mse(n,r),yN(n,t.e),yN(n,t.n),r+" "+w0.util.encode64(n.bytes())+" "+e};LWe.privateKeyToOpenSSH=function(t,e){return e?w0.pki.encryptRsaPrivateKey(t,e,{legacy:!0,algorithm:"aes128"}):w0.pki.privateKeyToPem(t)};LWe.getPublicKeyFingerprint=function(t,e){e=e||{};var r=e.md||w0.md.md5.create(),n="ssh-rsa",o=w0.util.createBuffer();Mse(o,n),yN(o,t.e),yN(o,t.n),r.start(),r.update(o.getBytes());var s=r.digest();if(e.encoding==="hex"){var c=s.toHex();return e.delimiter?c.match(/.{2}/g).join(e.delimiter):c}else{if(e.encoding==="binary")return s.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return s};function yN(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var n=w0.util.hexToBytes(r);t.putInt32(n.length),t.putBytes(n)}a(yN,"_addBigIntegerToBuffer");function Mse(t,e){t.putInt32(e.length),t.putString(e)}a(Mse,"_addStringToBuffer");function BWe(){for(var t=w0.md.sha1.create(),e=arguments.length,r=0;r{f();xpn.exports=No();x9();W0n();xw();aWe();Tve();dpn();vse();mpn();Epn();_pn();l7t();yWe();KV();n7t();f7t();Tpn();h7t();o7t();Y9t();SWe();uS();X9t();Ipn();C7t();Ea()});var kpn=T(iW=>{"use strict";f();Object.defineProperty(iW,"__esModule",{value:!0});iW.convert=iW.Format=void 0;var Bve=wpn(),B9;(function(t){t.der="der",t.pem="pem",t.txt="txt",t.asn1="asn1",t.x509="x509",t.fingerprint="fingerprint"})(B9=iW.Format||(iW.Format={}));function Rpn(t){var e=Bve.pki.pemToDer(t),r=Bve.asn1,n=r.fromDer(e.data.toString("binary")).value[0].value,o=n[0],s=o.tagClass===r.Class.CONTEXT_SPECIFIC&&o.type===0&&o.constructed,c=n.slice(s);return{serial:c[0],issuer:c[2],valid:c[3],subject:c[4]}}a(Rpn,"myASN");function hOo(t){var e=Rpn(t),r=e.subject.value.map(function(o){return o.value[0].value[1].value}).join("/"),n=e.valid.value.map(function(o){return o.value}).join(" - ");return["Subject ".concat(r),"Valid ".concat(n),String(t)].join(` -`)}a(hOo,"txtFormat");function Ppn(t,e){switch(e){case B9.der:return Bve.pki.pemToDer(t);case B9.pem:return t;case B9.txt:return hOo(t);case B9.asn1:return Rpn(t);case B9.fingerprint:var r=Bve.md.sha1.create(),n=Ppn(t,B9.der);return r.update(n.getBytes()),r.digest().toHex();case B9.x509:return Bve.pki.certificateFromPem(t);default:throw new Error("unknown format ".concat(e))}}a(Ppn,"convert");iW.convert=Ppn});var Lpn=T(DC=>{"use strict";f();var L9=DC&&DC.__assign||function(){return L9=Object.assign||function(t){for(var e,r=1,n=arguments.length;r"u"&&(s.ca=e),r.call(this,s)},"newAgent");return n.prototype=r.prototype,n})(L7t.Agent),(0,Dpn.setGlobalDispatcher)(new Dpn.Agent({connect:{ca:e}}))}},"addToGlobalAgent");DC.addToGlobalAgent=gOo});var Fpn=T((S3u,F7t)=>{f();function AOo(){let{X509Certificate:t}=require("crypto"),{join:e}=require("path");var r=typeof __webpack_require__=="function"?__non_webpack_require__:require;let n=process.arch==="arm64"?"crypt32-arm64.node":"crypt32.node",o=r(e(__dirname,n)),s=[],c=new o.Crypt32;try{let l;for(;l=c.next();){let u=new t(l);s.push(u.toString())}}finally{c.done()}return Array.from(new Set(s))}a(AOo,"all");process.platform!=="win32"?F7t.exports.all=()=>[]:F7t.exports.all=AOo});var ac=T((N3u,jpn)=>{"use strict";f();jpn.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kHTTP2InitialWindowSize:Symbol("http2 initial window size"),kHTTP2ConnectionWindowSize:Symbol("http2 connection window size"),kEnableConnectProtocol:Symbol("http2session connect protocol"),kRemoteSettings:Symbol("http2session remote settings"),kHTTP2Stream:Symbol("http2session client stream"),kPingInterval:Symbol("ping interval"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent"),kSocks5ProxyAgent:Symbol("socks5 proxy agent")}});var Z7t=T((M3u,zpn)=>{"use strict";f();var Bse=0,W7t=1e3,z7t=(W7t>>1)-1,F9,Y7t=Symbol("kFastTimer"),E4=[],K7t=-2,J7t=-1,Vpn=0,$pn=1;function X7t(){Bse+=z7t;let t=0,e=E4.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=J7t,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===J7t?(r._state=K7t,--e!==0&&(E4[t]=E4[e])):++t}E4.length=e,E4.length!==0&&Wpn()}a(X7t,"onTick");function Wpn(){F9?.refresh?F9.refresh():(clearTimeout(F9),F9=setTimeout(X7t,z7t),F9?.unref())}a(Wpn,"refreshTimeout");var HWe=class{static{a(this,"FastTimer")}[Y7t]=!0;_state=K7t;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===K7t&&E4.push(this),(!F9||E4.length===1)&&Wpn(),this._state=Vpn}clear(){this._state=J7t,this._idleStart=-1}};zpn.exports={setTimeout(t,e,r){return e<=W7t?setTimeout(t,e,r):new HWe(t,e,r)},clearTimeout(t){t[Y7t]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new HWe(t,e,r)},clearFastTimeout(t){t.clear()},now(){return Bse},tick(t=0){Bse+=t-W7t+1,X7t(),X7t()},reset(){Bse=0,E4.length=0,clearTimeout(F9),F9=null},kFastTimer:Y7t}});var Oi=T((L3u,Ehn)=>{"use strict";f();var Ypn=Symbol.for("undici.error.UND_ERR"),iu=class extends Error{static{a(this,"UndiciError")}constructor(e,r){super(e,r),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[Ypn]===!0}get[Ypn](){return!0}},Kpn=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),eUt=class extends iu{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Kpn]===!0}get[Kpn](){return!0}},Jpn=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),tUt=class extends iu{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Jpn]===!0}get[Jpn](){return!0}},Xpn=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),rUt=class extends iu{static{a(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Xpn]===!0}get[Xpn](){return!0}},Zpn=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),nUt=class extends iu{static{a(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Zpn]===!0}get[Zpn](){return!0}},ehn=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),iUt=class extends iu{static{a(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[ehn]===!0}get[ehn](){return!0}},thn=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),oUt=class extends iu{static{a(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[thn]===!0}get[thn](){return!0}},rhn=Symbol.for("undici.error.UND_ERR_ABORT"),jWe=class extends iu{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[rhn]===!0}get[rhn](){return!0}},nhn=Symbol.for("undici.error.UND_ERR_ABORTED"),sUt=class extends jWe{static{a(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[nhn]===!0}get[nhn](){return!0}},ihn=Symbol.for("undici.error.UND_ERR_INFO"),aUt=class extends iu{static{a(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[ihn]===!0}get[ihn](){return!0}},ohn=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),cUt=class extends iu{static{a(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[ohn]===!0}get[ohn](){return!0}},shn=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),lUt=class extends iu{static{a(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[shn]===!0}get[shn](){return!0}},ahn=Symbol.for("undici.error.UND_ERR_DESTROYED"),uUt=class extends iu{static{a(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[ahn]===!0}get[ahn](){return!0}},chn=Symbol.for("undici.error.UND_ERR_CLOSED"),dUt=class extends iu{static{a(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[chn]===!0}get[chn](){return!0}},lhn=Symbol.for("undici.error.UND_ERR_SOCKET"),fUt=class extends iu{static{a(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[lhn]===!0}get[lhn](){return!0}},uhn=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),pUt=class extends iu{static{a(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[uhn]===!0}get[uhn](){return!0}},dhn=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),hUt=class extends iu{static{a(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[dhn]===!0}get[dhn](){return!0}},fhn=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),mUt=class extends Error{static{a(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[fhn]===!0}get[fhn](){return!0}},phn=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),gUt=class extends iu{static{a(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[phn]===!0}get[phn](){return!0}},hhn=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),AUt=class extends iu{static{a(this,"RequestRetryError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[hhn]===!0}get[hhn](){return!0}},mhn=Symbol.for("undici.error.UND_ERR_RESPONSE"),yUt=class extends iu{static{a(this,"ResponseError")}constructor(e,r,{headers:n,body:o}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.body=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[mhn]===!0}get[mhn](){return!0}},ghn=Symbol.for("undici.error.UND_ERR_PRX_TLS"),EUt=class extends iu{static{a(this,"SecureProxyConnectionError")}constructor(e,r,n={}){super(r,{cause:e,...n}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[ghn]===!0}get[ghn](){return!0}},Ahn=Symbol.for("undici.error.UND_ERR_MAX_ORIGINS_REACHED"),CUt=class extends iu{static{a(this,"MaxOriginsReachedError")}constructor(e){super(e),this.name="MaxOriginsReachedError",this.message=e||"Maximum allowed origins reached",this.code="UND_ERR_MAX_ORIGINS_REACHED"}static[Symbol.hasInstance](e){return e&&e[Ahn]===!0}get[Ahn](){return!0}},_Ut=class extends iu{static{a(this,"Socks5ProxyError")}constructor(e,r){super(e),this.name="Socks5ProxyError",this.message=e||"SOCKS5 proxy error",this.code=r||"UND_ERR_SOCKS5"}},yhn=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),vUt=class extends iu{static{a(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[yhn]===!0}get[yhn](){return!0}};Ehn.exports={AbortError:jWe,HTTPParserError:mUt,UndiciError:iu,HeadersTimeoutError:tUt,HeadersOverflowError:rUt,BodyTimeoutError:nUt,RequestContentLengthMismatchError:cUt,ConnectTimeoutError:eUt,InvalidArgumentError:iUt,InvalidReturnValueError:oUt,RequestAbortedError:sUt,ClientDestroyedError:uUt,ClientClosedError:dUt,InformationalError:aUt,SocketError:fUt,NotSupportedError:pUt,ResponseContentLengthMismatchError:lUt,BalancedPoolMissingUpstreamError:hUt,ResponseExceededMaxSizeError:gUt,RequestRetryError:AUt,ResponseError:yUt,SecureProxyConnectionError:EUt,MaxOriginsReachedError:CUt,Socks5ProxyError:_Ut,MessageSizeExceededError:vUt}});var VWe=T((Q3u,_hn)=>{"use strict";f();var bUt=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"],$We={};Object.setPrototypeOf($We,null);var Chn={};Object.setPrototypeOf(Chn,null);function EOo(t){let e=Chn[t];return e===void 0&&(e=Buffer.from(t)),e}a(EOo,"getHeaderNameAsBuffer");for(let t=0;t{"use strict";f();var{wellknownHeaderNames:vhn,headerNameLowerCasedRecord:COo}=VWe(),TUt=class t{static{a(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let o=0,s=this;for(;;){let c=e.charCodeAt(o);if(c>127)throw new TypeError("key must be ascii string");if(s.code===c)if(n===++o){s.value=r;break}else if(s.middle!==null)s=s.middle;else{s.middle=new t(e,r,o);break}else if(s.code=65&&(s|=32);o!==null;){if(s===o.code){if(r===++n)return o;o=o.middle;break}o=o.code{"use strict";f();var Lve=require("node:assert"),{kDestroyed:Rhn,kBodyUsed:Lse,kListeners:YWe,kBody:Ihn}=ac(),{IncomingMessage:_Oo}=require("node:http"),Phn=require("node:stream"),vOo=require("node:net"),{stringify:bOo}=require("node:querystring"),{EventEmitter:TOo}=require("node:events"),zWe=Z7t(),{InvalidArgumentError:Dh,ConnectTimeoutError:SOo}=Oi(),{headerNameLowerCasedRecord:IOo}=VWe(),{tree:khn}=Shn(),[xOo,wOo]=process.versions.node.split(".",2).map(t=>Number(t)),JWe=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[Ihn]=e,this[Lse]=!1}async*[Symbol.asyncIterator](){Lve(!this[Lse],"disturbed"),this[Lse]=!0,yield*this[Ihn]}};function xhn(){}a(xhn,"noop");function ROo(t){return XWe(t)?(Lhn(t)===0&&t.on("data",function(){Lve(!1)}),typeof t.readableDidRead!="boolean"&&(t[Lse]=!1,TOo.prototype.on.call(t,"data",function(){this[Lse]=!0})),t):t&&typeof t.pipeTo=="function"?new JWe(t):t&&Ghn(t)?t:t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&Bhn(t)?new JWe(t):t}a(ROo,"wrapRequestBody");function XWe(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}a(XWe,"isStream");function Nhn(t){if(t===null)return!1;if(t instanceof Blob)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}a(Nhn,"isBlobLike");function Dhn(t){return t.includes("?")||t.includes("#")}a(Dhn,"pathHasQueryOrFragment");function POo(t,e){if(Dhn(t))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=bOo(e);return r&&(t+="?"+r),t}a(POo,"serializePathWithQuery");function Mhn(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}a(Mhn,"isValidPort");function KWe(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}a(KWe,"isHttpOrHttpsPrefixed");function Ohn(t){if(typeof t=="string"){if(t=new URL(t),!KWe(t.origin||t.protocol))throw new Dh("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new Dh("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&Mhn(t.port)===!1)throw new Dh("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new Dh("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new Dh("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new Dh("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new Dh("Invalid URL origin: the origin must be a string or null/undefined.");if(!KWe(t.origin||t.protocol))throw new Dh("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!KWe(t.origin||t.protocol))throw new Dh("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}a(Ohn,"parseURL");function kOo(t){if(t=Ohn(t),t.pathname!=="/"||t.search||t.hash)throw new Dh("invalid url");return t}a(kOo,"parseOrigin");function NOo(t){if(t[0]==="["){let r=t.indexOf("]");return Lve(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}a(NOo,"getHostname");function DOo(t){if(!t)return null;Lve(typeof t=="string");let e=NOo(t);return vOo.isIP(e)?"":e}a(DOo,"getServerName");function MOo(t){return JSON.parse(JSON.stringify(t))}a(MOo,"deepClone");function OOo(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}a(OOo,"isAsyncIterable");function Bhn(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}a(Bhn,"isIterable");function BOo(t){let e=Object.getPrototypeOf(t);return Object.prototype.hasOwnProperty.call(t,Symbol.iterator)||e!=null&&e!==Object.prototype&&typeof t[Symbol.iterator]=="function"}a(BOo,"hasSafeIterator");function Lhn(t){if(t==null)return 0;if(XWe(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(Nhn(t))return t.size!=null?t.size:null;if(qhn(t))return t.byteLength}return null}a(Lhn,"bodyLength");function Fhn(t){return t&&!!(t.destroyed||t[Rhn]||Phn.isDestroyed?.(t))}a(Fhn,"isDestroyed");function Uhn(t,e){t==null||!XWe(t)||Fhn(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===_Oo&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[Rhn]=!0))}a(Uhn,"destroy");var LOo=/timeout=(\d+)/;function FOo(t){let e=t.match(LOo);return e?parseInt(e[1],10)*1e3:null}a(FOo,"parseKeepAliveTimeout");function Qhn(t){return typeof t=="string"?IOo[t]??t.toLowerCase():khn.lookup(t)??t.toString("latin1").toLowerCase()}a(Qhn,"headerNameToString");function UOo(t){return khn.lookup(t)??t.toString("latin1").toLowerCase()}a(UOo,"bufferToLowerCasedHeaderName");function QOo(t,e){e===void 0&&(e={});for(let r=0;rc.toString("latin1")):t[r+1].toString("latin1");n==="__proto__"?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s}else{let s=typeof t[r+1]=="string"?t[r+1]:Array.isArray(t[r+1])?t[r+1].map(c=>c.toString("latin1")):t[r+1].toString("latin1");e[n]=s}}return e}a(QOo,"parseHeaders");function qOo(t){let e=t.length,r=new Array(e),n,o;for(let s=0;sBuffer.from(e))}a(GOo,"encodeRawHeaders");function qhn(t){return t instanceof Uint8Array||Buffer.isBuffer(t)}a(qhn,"isBuffer");function HOo(t,e,r){if(!t||typeof t!="object")throw new Dh("handler must be an object");if(typeof t.onRequestStart!="function"){if(typeof t.onConnect!="function")throw new Dh("invalid onConnect method");if(typeof t.onError!="function")throw new Dh("invalid onError method");if(typeof t.onBodySent!="function"&&t.onBodySent!==void 0)throw new Dh("invalid onBodySent method");if(r||e==="CONNECT"){if(typeof t.onUpgrade!="function")throw new Dh("invalid onUpgrade method")}else{if(typeof t.onHeaders!="function")throw new Dh("invalid onHeaders method");if(typeof t.onData!="function")throw new Dh("invalid onData method");if(typeof t.onComplete!="function")throw new Dh("invalid onComplete method")}}}a(HOo,"assertRequestHandler");function jOo(t){return!!(t&&(Phn.isDisturbed(t)||t[Lse]))}a(jOo,"isDisturbed");function $Oo(t){return{localAddress:t.localAddress,localPort:t.localPort,remoteAddress:t.remoteAddress,remotePort:t.remotePort,remoteFamily:t.remoteFamily,timeout:t.timeout,bytesWritten:t.bytesWritten,bytesRead:t.bytesRead}}a($Oo,"getSocketInfo");function VOo(t){let e;return new ReadableStream({start(){e=t[Symbol.asyncIterator]()},pull(r){return e.next().then(({done:n,value:o})=>{if(n)return queueMicrotask(()=>{r.close(),r.byobRequest?.respond(0)});{let s=Buffer.isBuffer(o)?o:Buffer.from(o);return s.byteLength?r.enqueue(new Uint8Array(s)):this.pull(r)}})},cancel(){return e.return()},type:"bytes"})}a(VOo,"ReadableStreamFrom");function Ghn(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}a(Ghn,"isFormDataLike");function WOo(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.once("abort",e),()=>t.removeListener("abort",e))}a(WOo,"addAbortListener");var Hhn=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function zOo(t){return Hhn[t]===1}a(zOo,"isTokenCharCode");var YOo=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;function KOo(t){if(t.length>=12)return YOo.test(t);if(t.length===0)return!1;for(let e=0;e{if(!e.timeout)return xhn;let r=null,n=null,o=zWe.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>whn(t.deref(),e))})},e.timeout);return()=>{zWe.clearFastTimeout(o),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return xhn;let r=null,n=zWe.setFastTimeout(()=>{r=setImmediate(()=>{whn(t.deref(),e)})},e.timeout);return()=>{zWe.clearFastTimeout(n),clearImmediate(r)}};function whn(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,Uhn(t,new SOo(r))}a(whn,"onConnectTimeout");function o4o(t){if(t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p")switch(t[4]){case":":return"http:";case"s":if(t[5]===":")return"https:"}return t.slice(0,t.indexOf(":")+1)}a(o4o,"getProtocolFromUrlString");var jhn=Object.create(null);jhn.enumerable=!0;var SUt={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},$hn={...SUt,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(SUt,null);Object.setPrototypeOf($hn,null);Vhn.exports={kEnumerableProperty:jhn,isDisturbed:jOo,isBlobLike:Nhn,parseOrigin:kOo,parseURL:Ohn,getServerName:DOo,isStream:XWe,isIterable:Bhn,hasSafeIterator:BOo,isAsyncIterable:OOo,isDestroyed:Fhn,headerNameToString:Qhn,bufferToLowerCasedHeaderName:UOo,addListener:t4o,removeAllListeners:r4o,errorRequest:n4o,parseRawHeaders:qOo,encodeRawHeaders:GOo,parseHeaders:QOo,parseKeepAliveTimeout:FOo,destroy:Uhn,bodyLength:Lhn,deepClone:MOo,ReadableStreamFrom:VOo,isBuffer:qhn,assertRequestHandler:HOo,getSocketInfo:$Oo,isFormDataLike:Ghn,pathHasQueryOrFragment:Dhn,serializePathWithQuery:POo,addAbortListener:WOo,isValidHTTPToken:KOo,isValidHeaderValue:XOo,isTokenCharCode:zOo,parseRangeHeader:e4o,normalizedMethodRecordsBase:SUt,normalizedMethodRecords:$hn,isValidPort:Mhn,isHttpOrHttpsPrefixed:KWe,nodeMajor:xOo,nodeMinor:wOo,safeHTTPMethods:Object.freeze(["GET","HEAD","OPTIONS","TRACE"]),wrapRequestBody:ROo,setupConnectTimeout:i4o,getProtocolFromUrlString:o4o}});var wUt=T((Y3u,Jhn)=>{"use strict";f();var{kConnected:Whn,kPending:zhn,kRunning:Yhn,kSize:Khn,kFree:s4o,kQueued:a4o}=ac(),IUt=class{static{a(this,"ClientStats")}constructor(e){this.connected=e[Whn],this.pending=e[zhn],this.running=e[Yhn],this.size=e[Khn]}},xUt=class{static{a(this,"PoolStats")}constructor(e){this.connected=e[Whn],this.free=e[s4o],this.pending=e[zhn],this.queued=e[a4o],this.running=e[Yhn],this.size=e[Khn]}};Jhn.exports={ClientStats:IUt,PoolStats:xUt}});var U9=T((X3u,Zhn)=>{"use strict";f();var cc=require("node:diagnostics_channel"),NUt=require("node:util"),oW=NUt.debuglog("undici"),Fve=NUt.debuglog("fetch"),ZWe=NUt.debuglog("websocket"),Iv={beforeConnect:cc.channel("undici:client:beforeConnect"),connected:cc.channel("undici:client:connected"),connectError:cc.channel("undici:client:connectError"),sendHeaders:cc.channel("undici:client:sendHeaders"),create:cc.channel("undici:request:create"),bodySent:cc.channel("undici:request:bodySent"),bodyChunkSent:cc.channel("undici:request:bodyChunkSent"),bodyChunkReceived:cc.channel("undici:request:bodyChunkReceived"),headers:cc.channel("undici:request:headers"),trailers:cc.channel("undici:request:trailers"),error:cc.channel("undici:request:error"),open:cc.channel("undici:websocket:open"),close:cc.channel("undici:websocket:close"),socketError:cc.channel("undici:websocket:socket_error"),ping:cc.channel("undici:websocket:ping"),pong:cc.channel("undici:websocket:pong"),proxyConnected:cc.channel("undici:proxy:connected")},RUt=!1;function Xhn(t=oW){if(!RUt){if(Iv.beforeConnect.hasSubscribers||Iv.connected.hasSubscribers||Iv.connectError.hasSubscribers||Iv.sendHeaders.hasSubscribers){RUt=!0;return}RUt=!0,cc.subscribe("undici:client:beforeConnect",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),cc.subscribe("undici:client:connected",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),cc.subscribe("undici:client:connectError",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s%s using %s%s errored - %s",s,o?`:${o}`:"",n,r,c.message)}),cc.subscribe("undici:client:sendHeaders",e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s%s",r,o,n)})}}a(Xhn,"trackClientEvents");var PUt=!1;function c4o(t=oW){if(!PUt){if(Iv.headers.hasSubscribers||Iv.trailers.hasSubscribers||Iv.error.hasSubscribers){PUt=!0;return}PUt=!0,cc.subscribe("undici:request:headers",e=>{let{request:{method:r,path:n,origin:o},response:{statusCode:s}}=e;t("received response to %s %s%s - HTTP %d",r,o,n,s)}),cc.subscribe("undici:request:trailers",e=>{let{request:{method:r,path:n,origin:o}}=e;t("trailers received from %s %s%s",r,o,n)}),cc.subscribe("undici:request:error",e=>{let{request:{method:r,path:n,origin:o},error:s}=e;t("request to %s %s%s errored - %s",r,o,n,s.message)})}}a(c4o,"trackRequestEvents");var kUt=!1;function l4o(t=ZWe){if(!kUt){if(Iv.open.hasSubscribers||Iv.close.hasSubscribers||Iv.socketError.hasSubscribers||Iv.ping.hasSubscribers||Iv.pong.hasSubscribers){kUt=!0;return}kUt=!0,cc.subscribe("undici:websocket:open",e=>{if(e.address!=null){let{address:r,port:n}=e.address;t("connection opened %s%s",r,n?`:${n}`:"")}else t("connection opened")}),cc.subscribe("undici:websocket:close",e=>{let{websocket:r,code:n,reason:o}=e;t("closed connection to %s - %s %s",r.url,n,o)}),cc.subscribe("undici:websocket:socket_error",e=>{t("connection errored - %s",e.message)}),cc.subscribe("undici:websocket:ping",e=>{t("ping received")}),cc.subscribe("undici:websocket:pong",e=>{t("pong received")})}}a(l4o,"trackWebSocketEvents");(oW.enabled||Fve.enabled)&&(Xhn(Fve.enabled?Fve:oW),c4o(Fve.enabled?Fve:oW));ZWe.enabled&&(Xhn(oW.enabled?oW:ZWe),l4o(ZWe));Zhn.exports={channels:Iv}});var rmn=T((tLu,tmn)=>{"use strict";f();var{InvalidArgumentError:$a,NotSupportedError:u4o}=Oi(),EN=require("node:assert"),{isValidHTTPToken:DUt,isValidHeaderValue:MUt,isStream:d4o,destroy:f4o,isBuffer:p4o,isFormDataLike:h4o,isIterable:m4o,hasSafeIterator:g4o,isBlobLike:A4o,serializePathWithQuery:y4o,assertRequestHandler:E4o,getServerName:C4o,normalizedMethodRecords:_4o,getProtocolFromUrlString:v4o}=eo(),{channels:MC}=U9(),{headerNameLowerCasedRecord:emn}=VWe(),b4o=/[^\u0021-\u00ff]/,gS=Symbol("handler"),OUt=class{static{a(this,"Request")}constructor(e,{path:r,method:n,body:o,headers:s,query:c,idempotent:l,blocking:u,upgrade:d,headersTimeout:p,bodyTimeout:h,reset:m,expectContinue:g,servername:A,throwOnError:y,maxRedirections:E,typeOfService:_},v){if(typeof r!="string")throw new $a("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new $a("path must be an absolute URL or start with a slash");if(b4o.test(r))throw new $a("invalid request path");if(typeof n!="string")throw new $a("method must be a string");if(_4o[n]===void 0&&!DUt(n))throw new $a("invalid request method");if(d&&typeof d!="string")throw new $a("upgrade must be a string");if(d&&!MUt(d))throw new $a("invalid upgrade header");if(p!=null&&(!Number.isFinite(p)||p<0))throw new $a("invalid headersTimeout");if(h!=null&&(!Number.isFinite(h)||h<0))throw new $a("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new $a("invalid reset");if(g!=null&&typeof g!="boolean")throw new $a("invalid expectContinue");if(y!=null)throw new $a("invalid throwOnError");if(E!=null&&E!==0)throw new $a("maxRedirections is not supported, use the redirect interceptor");if(_!=null&&(!Number.isInteger(_)||_<0||_>255))throw new $a("typeOfService must be an integer between 0 and 255");if(this.headersTimeout=p,this.bodyTimeout=h,this.method=n,this.typeOfService=_??0,this.abort=null,o==null)this.body=null;else if(d4o(o)){this.body=o;let b=this.body._readableState;(!b||!b.autoDestroy)&&(this.endHandler=a(function(){f4o(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=I=>{this.abort?this.abort(I):this.error=I},this.body.on("error",this.errorHandler)}else if(p4o(o))this.body=o.byteLength?o:null;else if(ArrayBuffer.isView(o))this.body=o.buffer.byteLength?Buffer.from(o.buffer,o.byteOffset,o.byteLength):null;else if(o instanceof ArrayBuffer)this.body=o.byteLength?Buffer.from(o):null;else if(typeof o=="string")this.body=o.length?Buffer.from(o):null;else if(h4o(o)||m4o(o)||A4o(o))this.body=o;else throw new $a("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=d||null,this.path=c?y4o(r,c):r,this.origin=e,this.protocol=v4o(e),this.idempotent=l??(n==="HEAD"||n==="GET"),this.blocking=u??this.method!=="HEAD",this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=g??!1,Array.isArray(s)){if(s.length%2!==0)throw new $a("headers array must be even");for(let b=0;b{"use strict";f();var{InvalidArgumentError:T4o}=Oi();imn.exports=class nmn{static{a(this,"WrapHandler")}#e;constructor(e){this.#e=e}static wrap(e){return e.onRequestStart?e:new nmn(e)}onConnect(e,r){return this.#e.onConnect?.(e,r)}onResponseStarted(){return this.#e.onResponseStarted?.()}onHeaders(e,r,n,o){return this.#e.onHeaders?.(e,r,n,o)}onUpgrade(e,r,n){return this.#e.onUpgrade?.(e,r,n)}onData(e){return this.#e.onData?.(e)}onComplete(e){return this.#e.onComplete?.(e)}onError(e){if(!this.#e.onError)throw e;return this.#e.onError?.(e)}onRequestStart(e,r){this.#e.onConnect?.(n=>e.abort(n),r)}onRequestUpgrade(e,r,n,o){let s=[];for(let[c,l]of Object.entries(n))s.push(Buffer.from(c,"latin1"),BUt(l));this.#e.onUpgrade?.(r,s,o)}onResponseStart(e,r,n,o){let s=[];for(let[c,l]of Object.entries(n))s.push(Buffer.from(c,"latin1"),BUt(l));this.#e.onHeaders?.(r,s,()=>e.resume(),o)===!1&&e.pause()}onResponseData(e,r){this.#e.onData?.(r)===!1&&e.pause()}onResponseEnd(e,r){let n=[];for(let[o,s]of Object.entries(r))n.push(Buffer.from(o,"latin1"),BUt(s));this.#e.onComplete?.(n)}onResponseError(e,r){if(!this.#e.onError)throw new T4o("invalid onError method");this.#e.onError?.(r)}};function BUt(t){return Array.isArray(t)?t.map(e=>Buffer.from(e,"latin1")):Buffer.from(t,"latin1")}a(BUt,"toRawHeaderValue")});var Qve=T((aLu,omn)=>{"use strict";f();var S4o=require("node:events"),I4o=Uve(),x4o=a(t=>(e,r)=>t(e,I4o.wrap(r)),"wrapInterceptor"),LUt=class extends S4o{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let o of r)if(o!=null){if(typeof o!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof o}`);if(n=o(n),n=x4o(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new Proxy(this,{get:a((o,s)=>s==="dispatch"?n:o[s],"get")})}};omn.exports=LUt});var cmn=T((uLu,amn)=>{"use strict";f();var{parseHeaders:FUt}=eo(),{InvalidArgumentError:w4o}=Oi(),UUt=Symbol("resume"),QUt=class{static{a(this,"UnwrapController")}#e=!1;#t=null;#n=!1;#r;[UUt]=null;constructor(e){this.#r=e}pause(){this.#e=!0}resume(){this.#e&&(this.#e=!1,this[UUt]?.())}abort(e){this.#n||(this.#n=!0,this.#t=e,this.#r(e))}get aborted(){return this.#n}get reason(){return this.#t}get paused(){return this.#e}};amn.exports=class smn{static{a(this,"UnwrapHandler")}#e;#t;constructor(e){this.#e=e}static unwrap(e){return e.onRequestStart?new smn(e):e}onConnect(e,r){this.#t=new QUt(e),this.#e.onRequestStart?.(this.#t,r)}onResponseStarted(){return this.#e.onResponseStarted?.()}onUpgrade(e,r,n){this.#e.onRequestUpgrade?.(this.#t,e,FUt(r),n)}onHeaders(e,r,n,o){return this.#t[UUt]=n,this.#e.onResponseStart?.(this.#t,e,FUt(r),o),!this.#t.paused}onData(e){return this.#e.onResponseData?.(this.#t,e),!this.#t.paused}onComplete(e){this.#e.onResponseEnd?.(this.#t,FUt(e))}onError(e){if(!this.#e.onResponseError)throw new w4o("invalid onError method");this.#e.onResponseError?.(this.#t,e)}}});var aW=T((pLu,lmn)=>{"use strict";f();var R4o=Qve(),P4o=cmn(),{ClientDestroyedError:qUt,ClientClosedError:k4o,InvalidArgumentError:tze}=Oi(),{kDestroy:N4o,kClose:D4o,kClosed:qve,kDestroyed:Fse,kDispatch:M4o}=ac(),Q9=Symbol("onDestroyed"),sW=Symbol("onClosed"),GUt=class extends R4o{static{a(this,"DispatcherBase")}[Fse]=!1;[Q9]=null;[qve]=!1;[sW]=null;get destroyed(){return this[Fse]}get closed(){return this[qve]}close(e){if(e===void 0)return new Promise((n,o)=>{this.close((s,c)=>s?o(s):n(c))});if(typeof e!="function")throw new tze("invalid callback");if(this[Fse]){let n=new qUt;queueMicrotask(()=>e(n,null));return}if(this[qve]){this[sW]?this[sW].push(e):queueMicrotask(()=>e(null,null));return}this[qve]=!0,this[sW]??=[],this[sW].push(e);let r=a(()=>{let n=this[sW];this[sW]=null;for(let o=0;othis.destroy()).then(()=>queueMicrotask(r))}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((o,s)=>{this.destroy(e,(c,l)=>c?s(c):o(l))});if(typeof r!="function")throw new tze("invalid callback");if(this[Fse]){this[Q9]?this[Q9].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new qUt),this[Fse]=!0,this[Q9]??=[],this[Q9].push(r);let n=a(()=>{let o=this[Q9];this[Q9]=null;for(let s=0;squeueMicrotask(n))}dispatch(e,r){if(!r||typeof r!="object")throw new tze("handler must be an object");r=P4o.unwrap(r);try{if(!e||typeof e!="object")throw new tze("opts must be an object.");if(this[Fse]||this[Q9])throw new qUt;if(this[qve])throw new k4o;return this[M4o](e,r)}catch(n){if(typeof r.onError!="function")throw n;return r.onError(n),!1}}};lmn.exports=GUt});var cW=T((ALu,fmn)=>{"use strict";f();var O4o=require("node:net"),umn=require("node:assert"),dmn=eo(),{InvalidArgumentError:B4o}=Oi(),HUt,L4o=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new FinalizationRegistry(r=>{if(this._sessionCache.size{"use strict";f();Object.defineProperty(jUt,"__esModule",{value:!0});jUt.enumToMap=U4o;function U4o(t,e=[],r=[]){let n=(e?.length??0)===0,o=(r?.length??0)===0;return Object.fromEntries(Object.entries(t).filter(([,s])=>typeof s=="number"&&(n||e.includes(s))&&(o||!r.includes(s))))}a(U4o,"enumToMap")});var hmn=T(_e=>{"use strict";f();Object.defineProperty(_e,"__esModule",{value:!0});_e.SPECIAL_HEADERS=_e.MINOR=_e.MAJOR=_e.HTAB_SP_VCHAR_OBS_TEXT=_e.QUOTED_STRING=_e.CONNECTION_TOKEN_CHARS=_e.HEADER_CHARS=_e.TOKEN=_e.HEX=_e.URL_CHAR=_e.USERINFO_CHARS=_e.MARK=_e.ALPHANUM=_e.NUM=_e.HEX_MAP=_e.NUM_MAP=_e.ALPHA=_e.STATUSES_HTTP=_e.H_METHOD_MAP=_e.METHOD_MAP=_e.METHODS_RTSP=_e.METHODS_ICE=_e.METHODS_HTTP=_e.HEADER_STATE=_e.FINISH=_e.STATUSES=_e.METHODS=_e.LENIENT_FLAGS=_e.FLAGS=_e.TYPE=_e.ERROR=void 0;var Q4o=pmn();_e.ERROR={OK:0,INTERNAL:1,STRICT:2,CR_EXPECTED:25,LF_EXPECTED:3,UNEXPECTED_CONTENT_LENGTH:4,UNEXPECTED_SPACE:30,CLOSED_CONNECTION:5,INVALID_METHOD:6,INVALID_URL:7,INVALID_CONSTANT:8,INVALID_VERSION:9,INVALID_HEADER_TOKEN:10,INVALID_CONTENT_LENGTH:11,INVALID_CHUNK_SIZE:12,INVALID_STATUS:13,INVALID_EOF_STATE:14,INVALID_TRANSFER_ENCODING:15,CB_MESSAGE_BEGIN:16,CB_HEADERS_COMPLETE:17,CB_MESSAGE_COMPLETE:18,CB_CHUNK_HEADER:19,CB_CHUNK_COMPLETE:20,PAUSED:21,PAUSED_UPGRADE:22,PAUSED_H2_UPGRADE:23,USER:24,CB_URL_COMPLETE:26,CB_STATUS_COMPLETE:27,CB_METHOD_COMPLETE:32,CB_VERSION_COMPLETE:33,CB_HEADER_FIELD_COMPLETE:28,CB_HEADER_VALUE_COMPLETE:29,CB_CHUNK_EXTENSION_NAME_COMPLETE:34,CB_CHUNK_EXTENSION_VALUE_COMPLETE:35,CB_RESET:31,CB_PROTOCOL_COMPLETE:38};_e.TYPE={BOTH:0,REQUEST:1,RESPONSE:2};_e.FLAGS={CONNECTION_KEEP_ALIVE:1,CONNECTION_CLOSE:2,CONNECTION_UPGRADE:4,CHUNKED:8,UPGRADE:16,CONTENT_LENGTH:32,SKIPBODY:64,TRAILING:128,TRANSFER_ENCODING:512};_e.LENIENT_FLAGS={HEADERS:1,CHUNKED_LENGTH:2,KEEP_ALIVE:4,TRANSFER_ENCODING:8,VERSION:16,DATA_AFTER_CLOSE:32,OPTIONAL_LF_AFTER_CR:64,OPTIONAL_CRLF_AFTER_CHUNK:128,OPTIONAL_CR_BEFORE_LF:256,SPACES_AFTER_CHUNK_SIZE:512};_e.METHODS={DELETE:0,GET:1,HEAD:2,POST:3,PUT:4,CONNECT:5,OPTIONS:6,TRACE:7,COPY:8,LOCK:9,MKCOL:10,MOVE:11,PROPFIND:12,PROPPATCH:13,SEARCH:14,UNLOCK:15,BIND:16,REBIND:17,UNBIND:18,ACL:19,REPORT:20,MKACTIVITY:21,CHECKOUT:22,MERGE:23,"M-SEARCH":24,NOTIFY:25,SUBSCRIBE:26,UNSUBSCRIBE:27,PATCH:28,PURGE:29,MKCALENDAR:30,LINK:31,UNLINK:32,SOURCE:33,PRI:34,DESCRIBE:35,ANNOUNCE:36,SETUP:37,PLAY:38,PAUSE:39,TEARDOWN:40,GET_PARAMETER:41,SET_PARAMETER:42,REDIRECT:43,RECORD:44,FLUSH:45,QUERY:46};_e.STATUSES={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,RESPONSE_IS_STALE:110,REVALIDATION_FAILED:111,DISCONNECTED_OPERATION:112,HEURISTIC_EXPIRATION:113,MISCELLANEOUS_WARNING:199,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,TRANSFORMATION_APPLIED:214,IM_USED:226,MISCELLANEOUS_PERSISTENT_WARNING:299,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,SWITCH_PROXY:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,PAGE_EXPIRED:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,LOGIN_TIMEOUT:440,NO_RESPONSE:444,RETRY_WITH:449,BLOCKED_BY_PARENTAL_CONTROL:450,UNAVAILABLE_FOR_LEGAL_REASONS:451,CLIENT_CLOSED_LOAD_BALANCED_REQUEST:460,INVALID_X_FORWARDED_FOR:463,REQUEST_HEADER_TOO_LARGE:494,SSL_CERTIFICATE_ERROR:495,SSL_CERTIFICATE_REQUIRED:496,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,INVALID_TOKEN:498,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511,WEB_SERVER_UNKNOWN_ERROR:520,WEB_SERVER_IS_DOWN:521,CONNECTION_TIMEOUT:522,ORIGIN_IS_UNREACHABLE:523,TIMEOUT_OCCURED:524,SSL_HANDSHAKE_FAILED:525,INVALID_SSL_CERTIFICATE:526,RAILGUN_ERROR:527,SITE_IS_OVERLOADED:529,SITE_IS_FROZEN:530,IDENTITY_PROVIDER_AUTHENTICATION_ERROR:561,NETWORK_READ_TIMEOUT:598,NETWORK_CONNECT_TIMEOUT:599};_e.FINISH={SAFE:0,SAFE_WITH_CB:1,UNSAFE:2};_e.HEADER_STATE={GENERAL:0,CONNECTION:1,CONTENT_LENGTH:2,TRANSFER_ENCODING:3,UPGRADE:4,CONNECTION_KEEP_ALIVE:5,CONNECTION_CLOSE:6,CONNECTION_UPGRADE:7,TRANSFER_ENCODING_CHUNKED:8};_e.METHODS_HTTP=[_e.METHODS.DELETE,_e.METHODS.GET,_e.METHODS.HEAD,_e.METHODS.POST,_e.METHODS.PUT,_e.METHODS.CONNECT,_e.METHODS.OPTIONS,_e.METHODS.TRACE,_e.METHODS.COPY,_e.METHODS.LOCK,_e.METHODS.MKCOL,_e.METHODS.MOVE,_e.METHODS.PROPFIND,_e.METHODS.PROPPATCH,_e.METHODS.SEARCH,_e.METHODS.UNLOCK,_e.METHODS.BIND,_e.METHODS.REBIND,_e.METHODS.UNBIND,_e.METHODS.ACL,_e.METHODS.REPORT,_e.METHODS.MKACTIVITY,_e.METHODS.CHECKOUT,_e.METHODS.MERGE,_e.METHODS["M-SEARCH"],_e.METHODS.NOTIFY,_e.METHODS.SUBSCRIBE,_e.METHODS.UNSUBSCRIBE,_e.METHODS.PATCH,_e.METHODS.PURGE,_e.METHODS.MKCALENDAR,_e.METHODS.LINK,_e.METHODS.UNLINK,_e.METHODS.PRI,_e.METHODS.SOURCE,_e.METHODS.QUERY];_e.METHODS_ICE=[_e.METHODS.SOURCE];_e.METHODS_RTSP=[_e.METHODS.OPTIONS,_e.METHODS.DESCRIBE,_e.METHODS.ANNOUNCE,_e.METHODS.SETUP,_e.METHODS.PLAY,_e.METHODS.PAUSE,_e.METHODS.TEARDOWN,_e.METHODS.GET_PARAMETER,_e.METHODS.SET_PARAMETER,_e.METHODS.REDIRECT,_e.METHODS.RECORD,_e.METHODS.FLUSH,_e.METHODS.GET,_e.METHODS.POST];_e.METHOD_MAP=(0,Q4o.enumToMap)(_e.METHODS);_e.H_METHOD_MAP=Object.fromEntries(Object.entries(_e.METHODS).filter(([t])=>t.startsWith("H")));_e.STATUSES_HTTP=[_e.STATUSES.CONTINUE,_e.STATUSES.SWITCHING_PROTOCOLS,_e.STATUSES.PROCESSING,_e.STATUSES.EARLY_HINTS,_e.STATUSES.RESPONSE_IS_STALE,_e.STATUSES.REVALIDATION_FAILED,_e.STATUSES.DISCONNECTED_OPERATION,_e.STATUSES.HEURISTIC_EXPIRATION,_e.STATUSES.MISCELLANEOUS_WARNING,_e.STATUSES.OK,_e.STATUSES.CREATED,_e.STATUSES.ACCEPTED,_e.STATUSES.NON_AUTHORITATIVE_INFORMATION,_e.STATUSES.NO_CONTENT,_e.STATUSES.RESET_CONTENT,_e.STATUSES.PARTIAL_CONTENT,_e.STATUSES.MULTI_STATUS,_e.STATUSES.ALREADY_REPORTED,_e.STATUSES.TRANSFORMATION_APPLIED,_e.STATUSES.IM_USED,_e.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,_e.STATUSES.MULTIPLE_CHOICES,_e.STATUSES.MOVED_PERMANENTLY,_e.STATUSES.FOUND,_e.STATUSES.SEE_OTHER,_e.STATUSES.NOT_MODIFIED,_e.STATUSES.USE_PROXY,_e.STATUSES.SWITCH_PROXY,_e.STATUSES.TEMPORARY_REDIRECT,_e.STATUSES.PERMANENT_REDIRECT,_e.STATUSES.BAD_REQUEST,_e.STATUSES.UNAUTHORIZED,_e.STATUSES.PAYMENT_REQUIRED,_e.STATUSES.FORBIDDEN,_e.STATUSES.NOT_FOUND,_e.STATUSES.METHOD_NOT_ALLOWED,_e.STATUSES.NOT_ACCEPTABLE,_e.STATUSES.PROXY_AUTHENTICATION_REQUIRED,_e.STATUSES.REQUEST_TIMEOUT,_e.STATUSES.CONFLICT,_e.STATUSES.GONE,_e.STATUSES.LENGTH_REQUIRED,_e.STATUSES.PRECONDITION_FAILED,_e.STATUSES.PAYLOAD_TOO_LARGE,_e.STATUSES.URI_TOO_LONG,_e.STATUSES.UNSUPPORTED_MEDIA_TYPE,_e.STATUSES.RANGE_NOT_SATISFIABLE,_e.STATUSES.EXPECTATION_FAILED,_e.STATUSES.IM_A_TEAPOT,_e.STATUSES.PAGE_EXPIRED,_e.STATUSES.ENHANCE_YOUR_CALM,_e.STATUSES.MISDIRECTED_REQUEST,_e.STATUSES.UNPROCESSABLE_ENTITY,_e.STATUSES.LOCKED,_e.STATUSES.FAILED_DEPENDENCY,_e.STATUSES.TOO_EARLY,_e.STATUSES.UPGRADE_REQUIRED,_e.STATUSES.PRECONDITION_REQUIRED,_e.STATUSES.TOO_MANY_REQUESTS,_e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,_e.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,_e.STATUSES.LOGIN_TIMEOUT,_e.STATUSES.NO_RESPONSE,_e.STATUSES.RETRY_WITH,_e.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,_e.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,_e.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,_e.STATUSES.INVALID_X_FORWARDED_FOR,_e.STATUSES.REQUEST_HEADER_TOO_LARGE,_e.STATUSES.SSL_CERTIFICATE_ERROR,_e.STATUSES.SSL_CERTIFICATE_REQUIRED,_e.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,_e.STATUSES.INVALID_TOKEN,_e.STATUSES.CLIENT_CLOSED_REQUEST,_e.STATUSES.INTERNAL_SERVER_ERROR,_e.STATUSES.NOT_IMPLEMENTED,_e.STATUSES.BAD_GATEWAY,_e.STATUSES.SERVICE_UNAVAILABLE,_e.STATUSES.GATEWAY_TIMEOUT,_e.STATUSES.HTTP_VERSION_NOT_SUPPORTED,_e.STATUSES.VARIANT_ALSO_NEGOTIATES,_e.STATUSES.INSUFFICIENT_STORAGE,_e.STATUSES.LOOP_DETECTED,_e.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,_e.STATUSES.NOT_EXTENDED,_e.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,_e.STATUSES.WEB_SERVER_UNKNOWN_ERROR,_e.STATUSES.WEB_SERVER_IS_DOWN,_e.STATUSES.CONNECTION_TIMEOUT,_e.STATUSES.ORIGIN_IS_UNREACHABLE,_e.STATUSES.TIMEOUT_OCCURED,_e.STATUSES.SSL_HANDSHAKE_FAILED,_e.STATUSES.INVALID_SSL_CERTIFICATE,_e.STATUSES.RAILGUN_ERROR,_e.STATUSES.SITE_IS_OVERLOADED,_e.STATUSES.SITE_IS_FROZEN,_e.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,_e.STATUSES.NETWORK_READ_TIMEOUT,_e.STATUSES.NETWORK_CONNECT_TIMEOUT];_e.ALPHA=[];for(let t=65;t<=90;t++)_e.ALPHA.push(String.fromCharCode(t)),_e.ALPHA.push(String.fromCharCode(t+32));_e.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};_e.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};_e.NUM=["0","1","2","3","4","5","6","7","8","9"];_e.ALPHANUM=_e.ALPHA.concat(_e.NUM);_e.MARK=["-","_",".","!","~","*","'","(",")"];_e.USERINFO_CHARS=_e.ALPHANUM.concat(_e.MARK).concat(["%",";",":","&","=","+","$",","]);_e.URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(_e.ALPHANUM);_e.HEX=_e.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);_e.TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(_e.ALPHANUM);_e.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&_e.HEADER_CHARS.push(t);_e.CONNECTION_TOKEN_CHARS=_e.HEADER_CHARS.filter(t=>t!==44);_e.QUOTED_STRING=[" "," "];for(let t=33;t<=255;t++)t!==34&&t!==92&&_e.QUOTED_STRING.push(t);_e.HTAB_SP_VCHAR_OBS_TEXT=[" "," "];for(let t=33;t<=126;t++)_e.HTAB_SP_VCHAR_OBS_TEXT.push(t);for(let t=128;t<=255;t++)_e.HTAB_SP_VCHAR_OBS_TEXT.push(t);_e.MAJOR=_e.NUM_MAP;_e.MINOR=_e.MAJOR;_e.SPECIAL_HEADERS={connection:_e.HEADER_STATE.CONNECTION,"content-length":_e.HEADER_STATE.CONTENT_LENGTH,"proxy-connection":_e.HEADER_STATE.CONNECTION,"transfer-encoding":_e.HEADER_STATE.TRANSFER_ENCODING,upgrade:_e.HEADER_STATE.UPGRADE};_e.default={ERROR:_e.ERROR,TYPE:_e.TYPE,FLAGS:_e.FLAGS,LENIENT_FLAGS:_e.LENIENT_FLAGS,METHODS:_e.METHODS,STATUSES:_e.STATUSES,FINISH:_e.FINISH,HEADER_STATE:_e.HEADER_STATE,ALPHA:_e.ALPHA,NUM_MAP:_e.NUM_MAP,HEX_MAP:_e.HEX_MAP,NUM:_e.NUM,ALPHANUM:_e.ALPHANUM,MARK:_e.MARK,USERINFO_CHARS:_e.USERINFO_CHARS,URL_CHAR:_e.URL_CHAR,HEX:_e.HEX,TOKEN:_e.TOKEN,HEADER_CHARS:_e.HEADER_CHARS,CONNECTION_TOKEN_CHARS:_e.CONNECTION_TOKEN_CHARS,QUOTED_STRING:_e.QUOTED_STRING,HTAB_SP_VCHAR_OBS_TEXT:_e.HTAB_SP_VCHAR_OBS_TEXT,MAJOR:_e.MAJOR,MINOR:_e.MINOR,SPECIAL_HEADERS:_e.SPECIAL_HEADERS,METHODS_HTTP:_e.METHODS_HTTP,METHODS_ICE:_e.METHODS_ICE,METHODS_RTSP:_e.METHODS_RTSP,METHOD_MAP:_e.METHOD_MAP,H_METHOD_MAP:_e.H_METHOD_MAP,STATUSES_HTTP:_e.STATUSES_HTTP}});var VUt=T((SLu,mmn)=>{"use strict";f();var{Buffer:q4o}=require("node:buffer"),G4o="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCq/ZAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5P+gFQUVJT7gHtAVTsAVXrAVZXWFla6gFbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHpAegBzwHnAdAB5gHRAdIB0wHUAeUB1QHWAdcB2AHZAdoB2wHcAd0B3gHfAeAB4QHiAeMBAPwBC0EADOMBC0EODOIBC0ENDOEBC0EPDOABC0EQDN8BC0ETDN4BC0EUDN0BC0EVDNwBC0EWDNsBC0EXDNoBC0EYDNkBC0EZDNgBC0EaDNcBC0EbDNYBC0EcDNUBC0EdDNQBC0EeDNMBC0EfDNIBC0EgDNEBC0EhDNABC0EIDM8BC0EiDM4BC0EkDM0BC0EjDMwBC0EHDMsBC0ElDMoBC0EmDMkBC0EnDMgBC0EoDMcBC0ESDMYBC0ERDMUBC0EpDMQBC0EqDMMBC0ErDMIBC0EsDMEBC0HeAQzAAQtBLgy/AQtBLwy+AQtBMAy9AQtBMQy8AQtBMgy7AQtBMwy6AQtBNAy5AQtB3wEMuAELQTUMtwELQTkMtgELQQwMtQELQTYMtAELQTcMswELQTgMsgELQT4MsQELQToMsAELQeABDK8BC0ELDK4BC0E/DK0BC0E7DKwBC0EKDKsBC0E8DKoBC0E9DKkBC0HhAQyoAQtBwQAMpwELQcAADKYBC0HCAAylAQtBCQykAQtBLQyjAQtBwwAMogELQcQADKEBC0HFAAygAQtBxgAMnwELQccADJ4BC0HIAAydAQtByQAMnAELQcoADJsBC0HLAAyaAQtBzAAMmQELQc0ADJgBC0HOAAyXAQtBzwAMlgELQdAADJUBC0HRAAyUAQtB0gAMkwELQdMADJIBC0HVAAyRAQtB1AAMkAELQdYADI8BC0HXAAyOAQtB2AAMjQELQdkADIwBC0HaAAyLAQtB2wAMigELQdwADIkBC0HdAAyIAQtB3gAMhwELQd8ADIYBC0HgAAyFAQtB4QAMhAELQeIADIMBC0HjAAyCAQtB5AAMgQELQeUADIABC0HiAQx/C0HmAAx+C0HnAAx9C0EGDHwLQegADHsLQQUMegtB6QAMeQtBBAx4C0HqAAx3C0HrAAx2C0HsAAx1C0HtAAx0C0EDDHMLQe4ADHILQe8ADHELQfAADHALQfIADG8LQfEADG4LQfMADG0LQfQADGwLQfUADGsLQfYADGoLQQIMaQtB9wAMaAtB+AAMZwtB+QAMZgtB+gAMZQtB+wAMZAtB/AAMYwtB/QAMYgtB/gAMYQtB/wAMYAtBgAEMXwtBgQEMXgtBggEMXQtBgwEMXAtBhAEMWwtBhQEMWgtBhgEMWQtBhwEMWAtBiAEMVwtBiQEMVgtBigEMVQtBiwEMVAtBjAEMUwtBjQEMUgtBjgEMUQtBjwEMUAtBkAEMTwtBkQEMTgtBkgEMTQtBkwEMTAtBlAEMSwtBlQEMSgtBlgEMSQtBlwEMSAtBmAEMRwtBmQEMRgtBmgEMRQtBmwEMRAtBnAEMQwtBnQEMQgtBngEMQQtBnwEMQAtBoAEMPwtBoQEMPgtBogEMPQtBowEMPAtBpAEMOwtBpQEMOgtBpgEMOQtBpwEMOAtBqAEMNwtBqQEMNgtBqgEMNQtBqwEMNAtBrAEMMwtBrQEMMgtBrgEMMQtBrwEMMAtBsAEMLwtBsQEMLgtBsgEMLQtBswEMLAtBtAEMKwtBtQEMKgtBtgEMKQtBtwEMKAtBuAEMJwtBuQEMJgtBugEMJQtBuwEMJAtBvAEMIwtBvQEMIgtBvgEMIQtBvwEMIAtBwAEMHwtBwQEMHgtBwgEMHQtBAQwcC0HDAQwbC0HEAQwaC0HFAQwZC0HGAQwYC0HHAQwXC0HIAQwWC0HJAQwVC0HKAQwUC0HLAQwTC0HMAQwSC0HNAQwRC0HOAQwQC0HPAQwPC0HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAg7jAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEjJCUnKCmeA5sDmgORA4oDgwOAA/0C+wL4AvIC8QLvAu0C6ALnAuYC5QLkAtwC2wLaAtkC2ALXAtYC1QLPAs4CzALLAsoCyQLIAscCxgLEAsMCvgK8AroCuQK4ArcCtgK1ArQCswKyArECsAKuAq0CqQKoAqcCpgKlAqQCowKiAqECoAKfApgCkAKMAosCigKBAv4B/QH8AfsB+gH5AfgB9wH1AfMB8AHrAekB6AHnAeYB5QHkAeMB4gHhAeAB3wHeAd0B3AHaAdkB2AHXAdYB1QHUAdMB0gHRAdABzwHOAc0BzAHLAcoByQHIAccBxgHFAcQBwwHCAcEBwAG/Ab4BvQG8AbsBugG5AbgBtwG2AbUBtAGzAbIBsQGwAa8BrgGtAawBqwGqAakBqAGnAaYBpQGkAaMBogGfAZ4BmQGYAZcBlgGVAZQBkwGSAZEBkAGPAY0BjAGHAYYBhQGEAYMBggF9fHt6eXZ1dFBRUlNUVQsgASAERw1yQf0BIQIMvgMLIAEgBEcNmAFB2wEhAgy9AwsgASAERw3xAUGOASECDLwDCyABIARHDfwBQYQBIQIMuwMLIAEgBEcNigJB/wAhAgy6AwsgASAERw2RAkH9ACECDLkDCyABIARHDZQCQfsAIQIMuAMLIAEgBEcNHkEeIQIMtwMLIAEgBEcNGUEYIQIMtgMLIAEgBEcNygJBzQAhAgy1AwsgASAERw3VAkHGACECDLQDCyABIARHDdYCQcMAIQIMswMLIAEgBEcN3AJBOCECDLIDCyADLQAwQQFGDa0DDIkDC0EAIQACQAJAAkAgAy0AKkUNACADLQArRQ0AIAMvATIiAkECcUUNAQwCCyADLwEyIgJBAXFFDQELQQEhACADLQAoQQFGDQAgAy8BNCIGQeQAa0HkAEkNACAGQcwBRg0AIAZBsAJGDQAgAkHAAHENAEEAIQAgAkGIBHFBgARGDQAgAkEocUEARyEACyADQQA7ATIgA0EAOgAxAkAgAEUEQCADQQA6ADEgAy0ALkEEcQ0BDLEDCyADQgA3AyALIANBADoAMSADQQE6ADYMSAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNSCAAQRVHDWIgA0EENgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMrwMLIAEgBEYEQEEGIQIMrwMLIAEtAABBCkcNGSABQQFqIQEMGgsgA0IANwMgQRIhAgyUAwsgASAERw2KA0EjIQIMrAMLIAEgBEYEQEEHIQIMrAMLAkACQCABLQAAQQprDgQBGBgAGAsgAUEBaiEBQRAhAgyTAwsgAUEBaiEBIANBL2otAABBAXENF0EAIQIgA0EANgIcIAMgATYCFCADQZkgNgIQIANBGTYCDAyrAwsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFoNGEEIIQIMqgMLIAEgBEcEQCADQQk2AgggAyABNgIEQRQhAgyRAwtBCSECDKkDCyADKQMgUA2uAgxDCyABIARGBEBBCyECDKgDCyABLQAAQQpHDRYgAUEBaiEBDBcLIANBL2otAABBAXFFDRkMJgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0ZDEILQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGgwkC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRsMMgsgA0Evai0AAEEBcUUNHAwiC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADRwMQgtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0dDCALIAEgBEYEQEETIQIMoAMLAkAgAS0AACIAQQprDgQfIyMAIgsgAUEBaiEBDB8LQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIgxCCyABIARGBEBBFiECDJ4DCyABLQAAQcDBAGotAABBAUcNIwyDAwsCQANAIAEtAABBsDtqLQAAIgBBAUcEQAJAIABBAmsOAgMAJwsgAUEBaiEBQSEhAgyGAwsgBCABQQFqIgFHDQALQRghAgydAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAFBAWoiARA0IgANIQxBC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADSMMKgsgASAERgRAQRwhAgybAwsgA0EKNgIIIAMgATYCBEEAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADSVBJCECDIEDCyABIARHBEADQCABLQAAQbA9ai0AACIAQQNHBEAgAEEBaw4FGBomggMlJgsgBCABQQFqIgFHDQALQRshAgyaAwtBGyECDJkDCwNAIAEtAABBsD9qLQAAIgBBA0cEQCAAQQFrDgUPEScTJicLIAQgAUEBaiIBRw0AC0EeIQIMmAMLIAEgBEcEQCADQQs2AgggAyABNgIEQQchAgz/AgtBHyECDJcDCyABIARGBEBBICECDJcDCwJAIAEtAABBDWsOFC4/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8APwtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQMlgMLIANBL2ohAgNAIAEgBEYEQEEhIQIMlwMLAkACQAJAIAEtAAAiAEEJaw4YAgApKQEpKSkpKSkpKSkpKSkpKSkpKSkCJwsgAUEBaiEBIANBL2otAABBAXFFDQoMGAsgAUEBaiEBDBcLIAFBAWohASACLQAAQQJxDQALQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDJUDCyADLQAuQYABcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUN5gIgAEEVRgRAIANBJDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwlCyADQRI2AhwgAyAANgIMIAMgAUEBajYCFAyBAwsgA0Evai0AAEEBcUUNAQtBFyECDOYCC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAz+AgsgAEE7Rw0AIAFBAWohAQwMC0EAIQIgA0EANgIcIAMgATYCFCADQZIYNgIQIANBAjYCDAz8AgsgAEEVRg0oQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDPsCCyADQRQ2AhwgAyABNgIUIAMgADYCDAz6AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQz1AgsgA0EVNgIcIAMgADYCDCADIAFBAWo2AhQM+QILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM8wILIANBFzYCHCADIAA2AgwgAyABQQFqNgIUDPgCCyAAQRVGDSNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM9wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEMHQsgA0EZNgIcIAMgADYCDCADIAFBAWo2AhQM9gILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM7wILIANBGjYCHCADIAA2AgwgAyABQQFqNgIUDPUCCyAAQRVGDR9BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwM9AILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwbCyADQRw2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8wILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQzrAgsgA0EdNgIcIAMgADYCDCADIAFBAWo2AhRBACECDPICCyAAQTtHDQEgAUEBaiEBC0EmIQIM1wILQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDO8CCyABIARHBEADQCABLQAAQSBHDYQCIAQgAUEBaiIBRw0AC0EsIQIM7wILQSwhAgzuAgsgASAERgRAQTQhAgzuAgsCQAJAA0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyABIARHBEAgA0EMNgIIIAMgATYCBEG/ASECDIQCC0HYASECDJwCCyABIARGBEBB1wEhAgycAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBwQBrDhUAAQIDWgQFBlpaWgcICQoLDA0ODxBaCyABQQFqIQFB+wAhAgySAgsgAUEBaiEBQfwAIQIMkQILIAFBAWohAUGBASECDJACCyABQQFqIQFBhQEhAgyPAgsgAUEBaiEBQYYBIQIMjgILIAFBAWohAUGJASECDI0CCyABQQFqIQFBigEhAgyMAgsgAUEBaiEBQY0BIQIMiwILIAFBAWohAUGWASECDIoCCyABQQFqIQFBlwEhAgyJAgsgAUEBaiEBQZgBIQIMiAILIAFBAWohAUGlASECDIcCCyABQQFqIQFBpgEhAgyGAgsgAUEBaiEBQawBIQIMhQILIAFBAWohAUG0ASECDIQCCyABQQFqIQFBtwEhAgyDAgsgAUEBaiEBQb4BIQIMggILIAEgBEYEQEHWASECDJsCCyABLQAAQc4ARw1IIAFBAWohAUG9ASECDIECCyABIARGBEBB1QEhAgyaAgsCQAJAAkAgAS0AAEHCAGsOEgBKSkpKSkpKSkoBSkpKSkpKAkoLIAFBAWohAUG4ASECDIICCyABQQFqIQFBuwEhAgyBAgsgAUEBaiEBQbwBIQIMgAILQdQBIQIgASAERg2YAiADKAIAIgAgBCABa2ohBSABIABrQQdqIQYCQANAIAEtAAAgAEGo1QBqLQAARw1FIABBB0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAgsgA0EANgIAIAZBAWohAUEbDEULIAEgBEYEQEHTASECDJgCCwJAAkAgAS0AAEHJAGsOBwBHR0dHRwFHCyABQQFqIQFBuQEhAgz/AQsgAUEBaiEBQboBIQIM/gELQdIBIQIgASAERg2WAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw1DIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyXAgsgA0EANgIAIAZBAWohAUEPDEMLQdEBIQIgASAERg2VAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw1CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyWAgsgA0EANgIAIAZBAWohAUEgDEILQdABIQIgASAERg2UAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw1BIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyVAgsgA0EANgIAIAZBAWohAUESDEELIAEgBEYEQEHPASECDJQCCwJAAkAgAS0AAEHFAGsODgBDQ0NDQ0NDQ0NDQ0MBQwsgAUEBaiEBQbUBIQIM+wELIAFBAWohAUG2ASECDPoBC0HOASECIAEgBEYNkgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBntUAai0AAEcNPyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkwILIANBADYCACAGQQFqIQFBBww/C0HNASECIAEgBEYNkQIgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBmNUAai0AAEcNPiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkgILIANBADYCACAGQQFqIQFBKAw+CyABIARGBEBBzAEhAgyRAgsCQAJAAkAgAS0AAEHFAGsOEQBBQUFBQUFBQUEBQUFBQUECQQsgAUEBaiEBQbEBIQIM+QELIAFBAWohAUGyASECDPgBCyABQQFqIQFBswEhAgz3AQtBywEhAiABIARGDY8CIAMoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQZHVAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJACCyADQQA2AgAgBkEBaiEBQRoMPAtBygEhAiABIARGDY4CIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQY3VAGotAABHDTsgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADI8CCyADQQA2AgAgBkEBaiEBQSEMOwsgASAERgRAQckBIQIMjgILAkACQCABLQAAQcEAaw4UAD09PT09PT09PT09PT09PT09PQE9CyABQQFqIQFBrQEhAgz1AQsgAUEBaiEBQbABIQIM9AELIAEgBEYEQEHIASECDI0CCwJAAkAgAS0AAEHVAGsOCwA8PDw8PDw8PDwBPAsgAUEBaiEBQa4BIQIM9AELIAFBAWohAUGvASECDPMBC0HHASECIAEgBEYNiwIgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNOCAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjAILIANBADYCACAGQQFqIQFBKgw4CyABIARGBEBBxgEhAgyLAgsgAS0AAEHQAEcNOCABQQFqIQFBJQw3C0HFASECIAEgBEYNiQIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBgdUAai0AAEcNNiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMigILIANBADYCACAGQQFqIQFBDgw2CyABIARGBEBBxAEhAgyJAgsgAS0AAEHFAEcNNiABQQFqIQFBqwEhAgzvAQsgASAERgRAQcMBIQIMiAILAkACQAJAAkAgAS0AAEHCAGsODwABAjk5OTk5OTk5OTk5AzkLIAFBAWohAUGnASECDPEBCyABQQFqIQFBqAEhAgzwAQsgAUEBaiEBQakBIQIM7wELIAFBAWohAUGqASECDO4BC0HCASECIAEgBEYNhgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB/tQAai0AAEcNMyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhwILIANBADYCACAGQQFqIQFBFAwzC0HBASECIAEgBEYNhQIgAygCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABB+dQAai0AAEcNMiAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhgILIANBADYCACAGQQFqIQFBKwwyC0HAASECIAEgBEYNhAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB9tQAai0AAEcNMSAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhQILIANBADYCACAGQQFqIQFBLAwxC0G/ASECIAEgBEYNgwIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNMCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhAILIANBADYCACAGQQFqIQFBEQwwC0G+ASECIAEgBEYNggIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB8tQAai0AAEcNLyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgwILIANBADYCACAGQQFqIQFBLgwvCyABIARGBEBBvQEhAgyCAgsCQAJAAkACQAJAIAEtAABBwQBrDhUANDQ0NDQ0NDQ0NAE0NAI0NAM0NAQ0CyABQQFqIQFBmwEhAgzsAQsgAUEBaiEBQZwBIQIM6wELIAFBAWohAUGdASECDOoBCyABQQFqIQFBogEhAgzpAQsgAUEBaiEBQaQBIQIM6AELIAEgBEYEQEG8ASECDIECCwJAAkAgAS0AAEHSAGsOAwAwATALIAFBAWohAUGjASECDOgBCyABQQFqIQFBBAwtC0G7ASECIAEgBEYN/wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8NQAai0AAEcNLCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgAILIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBugEhAgz/AQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQaEBIQIM5gELIAFBAWohAUEiDCsLIAEgBEYEQEG5ASECDP4BCyABLQAAQdAARw0rIAFBAWohAUGgASECDOQBCyABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANgIAIAZBAWohAUEcDCILQbABIQIgASAERg30ASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHe1ABqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz1AQsgA0EANgIAIAZBAWohAUEGDCELQa8BIQIgASAERg3zASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHZ1ABqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz0AQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGuASECDPMBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQY4BIQIM3AELIAFBAWohAUGPASECDNsBCyABQQFqIQFBlAEhAgzaAQsgAUEBaiEBQZUBIQIM2QELQa0BIQIgASAERg3xASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHX1ABqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzyAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGsASECDPEBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGQASECDNgBCyABQQFqIQFBkwEhAgzXAQsgASAERgRAQasBIQIM8AELAkACQCABLQAAQcEAaw4PAB8fHx8fHx8fHx8fHx8BHwsgAUEBaiEBQZEBIQIM1wELIAFBAWohAUGSASECDNYBCyABIARGBEBBqgEhAgzvAQsgAS0AAEHMAEcNHCABQQFqIQFBCgwbC0GpASECIAEgBEYN7QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABB0dQAai0AAEcNGiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIAIAZBAWohAUGIASECDMoBC0GfASECIAEgBEYN4gEgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNDyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4wELIANBADYCACAGQQFqIQFBKQwPC0GeASECIAEgBEYN4QEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBuNQAai0AAEcNDiAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4gELIANBADYCACAGQQFqIQFBLQwOCyABIARGBEBBnQEhAgzhAQsgAS0AAEHFAEcNDiABQQFqIQFBhAEhAgzHAQsgASAERgRAQZwBIQIM4AELAkACQCABLQAAQcwAaw4IAA8PDw8PDwEPCyABQQFqIQFBggEhAgzHAQsgAUEBaiEBQYMBIQIMxgELQZsBIQIgASAERg3eASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGz1ABqLQAARw0LIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzfAQsgA0EANgIAIAZBAWohAUEjDAsLQZoBIQIgASAERg3dASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGw1ABqLQAARw0KIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzeAQsgA0EANgIAIAZBAWohAUEADAoLIAEgBEYEQEGZASECDN0BCwJAAkAgAS0AAEHIAGsOCAAMDAwMDAwBDAsgAUEBaiEBQf0AIQIMxAELIAFBAWohAUGAASECDMMBCyABIARGBEBBmAEhAgzcAQsCQAJAIAEtAABBzgBrDgMACwELCyABQQFqIQFB/gAhAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIMsgELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GOASECDMoBCyABIARGBEBBjQEhAgzKAQsCQCABLQAAQQlrDgRKAABKAAtB9QAhAgywAQsgAy0AKUEFRgRAQfYAIQIMsAELQfQAIQIMrwELIAEgBEYEQEGMASECDMgBCyADQRA2AgggAyABNgIEDAoLIAEgBEYEQEGLASECDMcBCwJAIAEtAABBCWsOBEcAAEcAC0HzACECDK0BCyABIARHBEAgA0EQNgIIIAMgATYCBEHxACECDK0BC0GKASECDMUBCwJAIAEgBEcEQANAIAEtAABBoNAAai0AACIAQQNHBEACQCAAQQFrDgJJAAQLQfAAIQIMrwELIAQgAUEBaiIBRw0AC0GIASECDMYBC0GIASECDMUBCyADQQA2AhwgAyABNgIUIANB2yA2AhAgA0EHNgIMQQAhAgzEAQsgASAERgRAQYkBIQIMxAELAkACQAJAIAEtAABBoNIAai0AAEEBaw4DRgIAAQtB8gAhAgysAQsgA0EANgIcIAMgATYCFCADQbQSNgIQIANBBzYCDEEAIQIMxAELQeoAIQIMqgELIAEgBEcEQCABQQFqIQFB7wAhAgyqAQtBhwEhAgzCAQsgBCABIgBGBEBBhgEhAgzCAQsgAC0AACIBQS9GBEAgAEEBaiEBQe4AIQIMqQELIAFBCWsiAkEXSw0BIAAhAUEBIAJ0QZuAgARxDUEMAQsgBCABIgBGBEBBhQEhAgzBAQsgAC0AAEEvRw0AIABBAWohAQwDC0EAIQIgA0EANgIcIAMgADYCFCADQdsgNgIQIANBBzYCDAy/AQsCQAJAAkACQAJAA0AgAS0AAEGgzgBqLQAAIgBBBUcEQAJAAkAgAEEBaw4IRwUGBwgABAEIC0HrACECDK0BCyABQQFqIQFB7QAhAgysAQsgBCABQQFqIgFHDQALQYQBIQIMwwELIAFBAWoMFAsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgzBAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgzAAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy/AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMvgELIAEgBEYEQEGDASECDL4BCwJAIAEtAABBoM4Aai0AAEEBaw4IPgQFBgAIAgMHCyABQQFqIQELQQMhAgyjAQsgAUEBagwNC0EAIQIgA0EANgIcIANB0RI2AhAgA0EHNgIMIAMgAUEBajYCFAy6AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgy5AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgy4AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy3AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMtgELQewAIQIMnAELIAEgBEYEQEGCASECDLUBCyABQQFqDAILIAEgBEYEQEGBASECDLQBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyYAQtBgAEhAgywAQsDQCABLQAAQaDMAGotAAAiAEECRwRAIABBAUcEQEHpACECDJkBCwwxCyAEIAFBAWoiAUcNAAtB/wAhAgyvAQsgASAERgRAQf4AIQIMrwELAkAgAS0AAEEJaw43LwMGLwQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgELIABBFUcEQCADQQA2AhwgAyABNgIUIANByQ02AhAgA0EaNgIMQQAhAgyfAQsgA0H4ADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDJ4BCyABIARHBEAgA0ENNgIIIAMgATYCBEHkACECDIUBC0H3ACECDJ0BCyABIARGBEBB9gAhAgydAQsCQAJAAkAgAS0AAEHIAGsOCwABCwsLCwsLCwsCCwsgAUEBaiEBQd0AIQIMhQELIAFBAWohAUHgACECDIQBCyABQQFqIQFB4wAhAgyDAQtB9QAhAiABIARGDZsBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbXVAGotAABHDQggAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJwBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIABEAgA0H0ADYCHCADIAE2AhQgAyAANgIMQQAhAgycAQtB4gAhAgyCAQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJwBC0HhACECDIIBCyADQfMANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMmgELIAMtACkiAEEja0ELSQ0JAkAgAEEGSw0AQQEgAHRBygBxRQ0ADAoLQQAhAiADQQA2AhwgAyABNgIUIANB7Qk2AhAgA0EINgIMDJkBC0HyACECIAEgBEYNmAEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBs9UAai0AAEcNBSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMmQELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBEcEQCADQRE2AgggAyABNgIEQcoAIQIMYAtB1wAhAgx4CyABIARGBEBB1gAhAgx4CwJAAkACQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQeMAaw4TAEBAQEBAQEBAQEBAQAFAQEACA0ALIAFBAWohAUHGACECDGELIAFBAWohAUHHACECDGALIAFBAWohAUHIACECDF8LIAFBAWohAUHJACECDF4LQdUAIQIgBCABIgBGDXYgBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0IQQQgAUEFRg0KGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx2C0HUACECIAQgASIARg11IAQgAWsgAygCACIBaiEGIAAgAWtBD2ohBwNAIAFBgMgAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNB0EDIAFBD0YNCRogAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdQtB0wAhAiAEIAEiAEYNdCAEIAFrIAMoAgAiAWohBiAAIAFrQQ5qIQcDQCABQeLHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQYgAUEORg0HIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHQLQdIAIQIgBCABIgBGDXMgBCABayADKAIAIgFqIQUgACABa0EBaiEGA0AgAUHgxwBqLQAAIAAtAAAiB0EgciAHIAdBwQBrQf8BcUEaSRtB/wFxRw0FIAFBAUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAxzCyABIARGBEBB0QAhAgxzCwJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB7gBrDgcAOTk5OTkBOQsgAUEBaiEBQcMAIQIMWgsgAUEBaiEBQcQAIQIMWQsgA0EANgIAIAZBAWohAUHFACECDFgLQdAAIQIgBCABIgBGDXAgBCABayADKAIAIgFqIQYgACABa0EJaiEHA0AgAUHWxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0CQQIgAUEJRg0EGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxwC0HPACECIAQgASIARg1vIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwNAIAFB0McAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQVGDQIgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMbwsgACEBIANBADYCAAwzC0EBCzoALCADQQA2AgAgB0EBaiEBC0EtIQIMUgsCQANAIAEtAABB0MUAai0AAEEBRw0BIAQgAUEBaiIBRw0AC0HNACECDGsLQcIAIQIMUQsgASAERgRAQcwAIQIMagsgAS0AAEE6RgRAIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0zIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMagsgA0EANgIcIAMgATYCFCADQecRNgIQIANBCjYCDEEAIQIMaQsCQAJAIAMtACxBAmsOAgABJwsgA0Ezai0AAEECcUUNJiADLQAuQQJxDSYgA0EANgIcIAMgATYCFCADQaYUNgIQIANBCzYCDEEAIQIMaQsgAy0AMkEgcUUNJSADLQAuQQJxDSUgA0EANgIcIAMgATYCFCADQb0TNgIQIANBDzYCDEEAIQIMaAtBACEAAkAgAygCOCICRQ0AIAIoAkgiAkUNACADIAIRAAAhAAsgAEUEQEHBACECDE8LIABBFUcEQCADQQA2AhwgAyABNgIUIANBpg82AhAgA0EcNgIMQQAhAgxoCyADQcoANgIcIAMgATYCFCADQYUcNgIQIANBFTYCDEEAIQIMZwsgASAERwRAA0AgAS0AAEHAwQBqLQAAQQFHDRcgBCABQQFqIgFHDQALQcQAIQIMZwtBxAAhAgxmCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUE2IQIMUgsgAUEBaiEBQTchAgxRCyABQQFqIQFBOCECDFALDBULIAQgAUEBaiIBRw0AC0E8IQIMZgtBPCECDGULIAEgBEYEQEHIACECDGULIANBEjYCCCADIAE2AgQCQAJAAkACQAJAIAMtACxBAWsOBBQAAQIJCyADLQAyQSBxDQNB4AEhAgxPCwJAIAMvATIiAEEIcUUNACADLQAoQQFHDQAgAy0ALkEIcUUNAgsgAyAAQff7A3FBgARyOwEyDAsLIAMgAy8BMkEQcjsBMgwECyADQQA2AgQgAyABIAEQMSIABEAgA0HBADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxmCyABQQFqIQEMWAsgA0EANgIcIAMgATYCFCADQfQTNgIQIANBBDYCDEEAIQIMZAtBxwAhAiABIARGDWMgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCAAQcDFAGotAAAgAS0AAEEgckcNASAAQQZGDUogAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMZAsgA0EANgIADAULAkAgASAERwRAA0AgAS0AAEHAwwBqLQAAIgBBAUcEQCAAQQJHDQMgAUEBaiEBDAULIAQgAUEBaiIBRw0AC0HFACECDGQLQcUAIQIMYwsLIANBADoALAwBC0ELIQIMRwtBPyECDEYLAkACQANAIAEtAAAiAEEgRwRAAkAgAEEKaw4EAwUFAwALIABBLEYNAwwECyAEIAFBAWoiAUcNAAtBxgAhAgxgCyADQQg6ACwMDgsgAy0AKEEBRw0CIAMtAC5BCHENAiADKAIEIQAgA0EANgIEIAMgACABEDEiAARAIANBwgA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMXwsgAUEBaiEBDFALQTshAgxECwJAA0AgAS0AACIAQSBHIABBCUdxDQEgBCABQQFqIgFHDQALQcMAIQIMXQsLQTwhAgxCCwJAAkAgASAERwRAA0AgAS0AACIAQSBHBEAgAEEKaw4EAwQEAwQLIAQgAUEBaiIBRw0AC0E/IQIMXQtBPyECDFwLIAMgAy8BMkEgcjsBMgwKCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNTiADQT42AhwgAyABNgIUIAMgADYCDEEAIQIMWgsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkYNAwwMCyAEIAFBAWoiAUcNAAtBNyECDFsLQTchAgxaCyABQQFqIQEMBAtBOyECIAQgASIARg1YIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwJAA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEMPwsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMWQsgA0EANgIAIAAhAQwFC0E6IQIgBCABIgBGDVcgBCABayADKAIAIgFqIQYgACABa0EIaiEHAkADQCABQbTBAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEIRgRAQQUhAQw+CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxYCyADQQA2AgAgACEBDAQLQTkhAiAEIAEiAEYNViAEIAFrIAMoAgAiAWohBiAAIAFrQQNqIQcCQANAIAFBsMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQNGBEBBBiEBDD0LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFcLIANBADYCACAAIQEMAwsCQANAIAEtAAAiAEEgRwRAIABBCmsOBAcEBAcCCyAEIAFBAWoiAUcNAAtBOCECDFYLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCADLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIANBAToALCADIAMvATIgAXI7ATIgACEBDAELIAMgAy8BMkEIcjsBMiAAIQELQT4hAgw7CyADQQA6ACwLQTkhAgw5CyABIARGBEBBNiECDFILAkACQAJAAkACQCABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLyECDCsLIANBADYCHCADIAE2AhQgA0GEEzYCECADQQs2AgxBACECDEMLQeEBIQIMKQsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ESNgIIIAMgASABEDEiAA0BC0EuIQIMJwsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJMIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBsxs2AhAgA0EVNgIMQQAhAgw+C0HMACECDCQLIANBADYCHCADIAE2AhQgA0GzDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwhCyADKAIEIQAgA0EANgIEIAMgACABEDAiAA0BDAILIAMtAC5BAXEEQEHeASECDCALIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUHAACECDB0LIAFBAWohAQwsCyABIARGBEBBKyECDDULAkAgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQcAAcUUNBgsgAy0AMkGAAXEEQEEAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ0SIABBFUYEQCADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgw2CyADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMQQAhAgw1CyADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyADQQE6ADALIAIgAi8BAEHAAHI7AQALQSshAgwYCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgwwCyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgwvCyADQQA2AhwgAyABNgIUIANBpQs2AhAgA0ECNgIMQQAhAgwuC0EBIQcgAy8BMiIFQQhxRQRAIAMpAyBCAFIhBwsCQCADLQAwBEBBASEAIAMtAClBBUYNASAFQcAAcUUgB3FFDQELAkAgAy0AKCICQQJGBEBBASEAIAMvATQiBkHlAEYNAkEAIQAgBUHAAHENAiAGQeQARg0CIAZB5gBrQQJJDQIgBkHMAUYNAiAGQbACRg0CDAELQQAhACAFQcAAcQ0BC0ECIQAgBUEIcQ0AIAVBgARxBEACQCACQQFHDQAgAy0ALkEKcQ0AQQUhAAwCC0EEIQAMAQsgBUEgcUUEQCADEDZBAEdBAnQhAAwBC0EAQQMgAykDIFAbIQALIABBAWsOBQIABwEDBAtBESECDBMLIANBAToAMQwpC0EAIQICQCADKAI4IgBFDQAgACgCMCIARQ0AIAMgABEAACECCyACRQ0mIAJBFUYEQCADQQM2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwrC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAwqCyADQQA2AhwgAyABNgIUIANB+SA2AhAgA0EPNgIMQQAhAgwpC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAADQELQQ4hAgwOCyAAQRVGBEAgA0ECNgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMJwsgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDEEAIQIMJgtBKiECDAwLIAEgBEcEQCADQQk2AgggAyABNgIEQSkhAgwMC0EmIQIMJAsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFQEQEElIQIMJAsgAygCBCEAIANBADYCBCADIAAgASAMp2oiARAyIgBFDQAgA0EFNgIcIAMgATYCFCADIAA2AgxBACECDCMLQQ8hAgwJC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FxYAAQIDBAUGBxQUFBQUFBQICQoLDA0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFA4PEBESExQLQgIhCgwWC0IDIQoMFQtCBCEKDBQLQgUhCgwTC0IGIQoMEgtCByEKDBELQgghCgwQC0IJIQoMDwtCCiEKDA4LQgshCgwNC0IMIQoMDAtCDSEKDAsLQg4hCgwKC0IPIQoMCQtCCiEKDAgLQgshCgwHC0IMIQoMBgtCDSEKDAULQg4hCgwEC0IPIQoMAwsgA0EANgIcIAMgATYCFCADQZ8VNgIQIANBDDYCDEEAIQIMIQsgASAERgRAQSIhAgwhC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsONxUUAAECAwQFBgcWFhYWFhYWCAkKCwwNFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYODxAREhMWC0ICIQoMFAtCAyEKDBMLQgQhCgwSC0IFIQoMEQtCBiEKDBALQgchCgwPC0IIIQoMDgtCCSEKDA0LQgohCgwMC0ILIQoMCwtCDCEKDAoLQg0hCgwJC0IOIQoMCAtCDyEKDAcLQgohCgwGC0ILIQoMBQtCDCEKDAQLQg0hCgwDC0IOIQoMAgtCDyEKDAELQgEhCgsgAUEBaiEBIAMpAyAiC0L//////////w9YBEAgAyALQgSGIAqENwMgDAILIANBADYCHCADIAE2AhQgA0G1CTYCECADQQw2AgxBACECDB4LQSchAgwEC0EoIQIMAwsgAyABOgAsIANBADYCACAHQQFqIQFBDCECDAILIANBADYCACAGQQFqIQFBCiECDAELIAFBAWohAUEIIQIMAAsAC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwXC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwWC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwVC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwUC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwTC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwSC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwRC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwQC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwPC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwOC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwNC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwMC0EAIQIgA0EANgIcIAMgATYCFCADQZkTNgIQIANBCzYCDAwLC0EAIQIgA0EANgIcIAMgATYCFCADQZ0JNgIQIANBCzYCDAwKC0EAIQIgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDAwJC0EAIQIgA0EANgIcIAMgATYCFCADQbEQNgIQIANBCjYCDAwIC0EAIQIgA0EANgIcIAMgATYCFCADQbsdNgIQIANBAjYCDAwHC0EAIQIgA0EANgIcIAMgATYCFCADQZYWNgIQIANBAjYCDAwGC0EAIQIgA0EANgIcIAMgATYCFCADQfkYNgIQIANBAjYCDAwFC0EAIQIgA0EANgIcIAMgATYCFCADQcQYNgIQIANBAjYCDAwECyADQQI2AhwgAyABNgIUIANBqR42AhAgA0EWNgIMQQAhAgwDC0HeACECIAEgBEYNAiAJQQhqIQcgAygCACEFAkACQCABIARHBEAgBUGWyABqIQggBCAFaiABayEGIAVBf3NBCmoiBSABaiEAA0AgAS0AACAILQAARwRAQQIhCAwDCyAFRQRAQQAhCCAAIQEMAwsgBUEBayEFIAhBAWohCCAEIAFBAWoiAUcNAAsgBiEFIAQhAQsgB0EBNgIAIAMgBTYCAAwBCyADQQA2AgAgByAINgIACyAHIAE2AgQgCSgCDCEAAkACQCAJKAIIQQFrDgIEAQALIANBADYCHCADQcIeNgIQIANBFzYCDCADIABBAWo2AhRBACECDAMLIANBADYCHCADIAA2AhQgA0HXHjYCECADQQk2AgxBACECDAILIAEgBEYEQEEoIQIMAgsgA0EJNgIIIAMgATYCBEEnIQIMAQsgASAERgRAQQEhAgwBCwNAAkACQAJAIAEtAABBCmsOBAABAQABCyABQQFqIQEMAQsgAUEBaiEBIAMtAC5BIHENAEEAIQIgA0EANgIcIAMgATYCFCADQaEhNgIQIANBBTYCDAwCC0EBIQIgASAERw0ACwsgCUEQaiQAIAJFBEAgAygCDCEADAELIAMgAjYCHEEAIQAgAygCBCIBRQ0AIAMgASAEIAMoAggRAQAiAUUNACADIAQ2AhQgAyABNgIMIAEhAAsgAAu+AgECfyAAQQA6AAAgAEHkAGoiAUEBa0EAOgAAIABBADoAAiAAQQA6AAEgAUEDa0EAOgAAIAFBAmtBADoAACAAQQA6AAMgAUEEa0EAOgAAQQAgAGtBA3EiASAAaiIAQQA2AgBB5AAgAWtBfHEiAiAAaiIBQQRrQQA2AgACQCACQQlJDQAgAEEANgIIIABBADYCBCABQQhrQQA2AgAgAUEMa0EANgIAIAJBGUkNACAAQQA2AhggAEEANgIUIABBADYCECAAQQA2AgwgAUEQa0EANgIAIAFBFGtBADYCACABQRhrQQA2AgAgAUEca0EANgIAIAIgAEEEcUEYciICayIBQSBJDQAgACACaiEAA0AgAEIANwMYIABCADcDECAAQgA3AwggAEIANwMAIABBIGohACABQSBrIgFBH0sNAAsLC1YBAX8CQCAAKAIMDQACQAJAAkACQCAALQAxDgMBAAMCCyAAKAI4IgFFDQAgASgCMCIBRQ0AIAAgAREAACIBDQMLQQAPCwALIABByhk2AhBBDiEBCyABCxoAIAAoAgxFBEAgAEHeHzYCECAAQRU2AgwLCxQAIAAoAgxBFUYEQCAAQQA2AgwLCxQAIAAoAgxBFkYEQCAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsrAAJAIABBJ08NAEL//////wkgAK2IQgGDUA0AIABBAnRB0DhqKAIADwsACxcAIABBL08EQAALIABBAnRB7DlqKAIAC78JAQF/QfQtIQECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQeQAaw70A2NiAAFhYWFhYWECAwQFYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQYHCAkKCwwNDg9hYWFhYRBhYWFhYWFhYWFhYRFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWESExQVFhcYGRobYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1NmE3ODk6YWFhYWFhYWE7YWFhPGFhYWE9Pj9hYWFhYWFhYUBhYUFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFCQ0RFRkdISUpLTE1OT1BRUlNhYWFhYWFhYVRVVldYWVpbYVxdYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhXmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYV9gYQtB6iwPC0GYJg8LQe0xDwtBoDcPC0HJKQ8LQbQpDwtBli0PC0HrKw8LQaI1DwtB2zQPC0HgKQ8LQeMkDwtB1SQPC0HuJA8LQeYlDwtByjQPC0HQNw8LQao1DwtB9SwPC0H2Jg8LQYIiDwtB8jMPC0G+KA8LQec3DwtBzSEPC0HAIQ8LQbglDwtByyUPC0GWJA8LQY80DwtBzTUPC0HdKg8LQe4zDwtBnDQPC0GeMQ8LQfQ1DwtB5SIPC0GvJQ8LQZkxDwtBsjYPC0H5Ng8LQcQyDwtB3SwPC0GCMQ8LQcExDwtBjTcPC0HJJA8LQew2DwtB5yoPC0HIIw8LQeIhDwtByTcPC0GlIg8LQZQiDwtB2zYPC0HeNQ8LQYYmDwtBvCsPC0GLMg8LQaAjDwtB9jAPC0GALA8LQYkrDwtBpCYPC0HyIw8LQYEoDwtBqzIPC0HrJw8LQcI2DwtBoiQPC0HPKg8LQdwjDwtBhycPC0HkNA8LQbciDwtBrTEPC0HVIg8LQa80DwtB3iYPC0HWMg8LQfQ0DwtBgTgPC0H0Nw8LQZI2DwtBnScPC0GCKQ8LQY0jDwtB1zEPC0G9NQ8LQbQ3DwtB2DAPC0G2Jw8LQZo4DwtBpyoPC0HEJw8LQa4jDwtB9SIPCwALQcomIQELIAELFwAgACAALwEuQf7/A3EgAUEAR3I7AS4LGgAgACAALwEuQf3/A3EgAUEAR0EBdHI7AS4LGgAgACAALwEuQfv/A3EgAUEAR0ECdHI7AS4LGgAgACAALwEuQff/A3EgAUEAR0EDdHI7AS4LGgAgACAALwEuQe//A3EgAUEAR0EEdHI7AS4LGgAgACAALwEuQd//A3EgAUEAR0EFdHI7AS4LGgAgACAALwEuQb//A3EgAUEAR0EGdHI7AS4LGgAgACAALwEuQf/+A3EgAUEAR0EHdHI7AS4LGgAgACAALwEuQf/9A3EgAUEAR0EIdHI7AS4LGgAgACAALwEuQf/7A3EgAUEAR0EJdHI7AS4LPgECfwJAIAAoAjgiA0UNACADKAIEIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHhEjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIIIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH8ETYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIMIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHsCjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIQIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH6HjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIUIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHLEDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIYIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG3HzYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIcIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG/FTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIsIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH+CDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIgIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEGMHTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIkIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHmFTYCEEEYIQQLIAQLOAAgAAJ/IAAvATJBFHFBFEYEQEEBIAAtAChBAUYNARogAC8BNEHlAEYMAQsgAC0AKUEFRgs6ADALWQECfwJAIAAtAChBAUYNACAALwE0IgFB5ABrQeQASQ0AIAFBzAFGDQAgAUGwAkYNACAALwEyIgBBwABxDQBBASECIABBiARxQYAERg0AIABBKHFFIQILIAILjAEBAn8CQAJAAkAgAC0AKkUNACAALQArRQ0AIAAvATIiAUECcUUNAQwCCyAALwEyIgFBAXFFDQELQQEhAiAALQAoQQFGDQAgAC8BNCIAQeQAa0HkAEkNACAAQcwBRg0AIABBsAJGDQAgAUHAAHENAEEAIQIgAUGIBHFBgARGDQAgAUEocUEARyECCyACC1cAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==",$Ut;Object.defineProperty(mmn,"exports",{get:a(()=>$Ut||($Ut=q4o.from(G4o,"base64")),"get")})});var Amn=T((wLu,gmn)=>{"use strict";f();var{Buffer:H4o}=require("node:buffer"),j4o="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCuzaAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADKAIcIgJBAmsO/AEB+QECAwQFBgcICQoLDA0ODxAREvgBE/cBFBX2ARYX9QEYGRobHB0eHyD9AfsBIfQBIiMkJSYnKCkqK/MBLC0uLzAxMvIB8QEzNPAB7wE1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk/6AVBRUlPuAe0BVOwBVesBVldYWVrqAVtcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAekB6AHPAecB0AHmAdEB0gHTAdQB5QHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wEA/AELQQAM4wELQQ4M4gELQQ0M4QELQQ8M4AELQRAM3wELQRMM3gELQRQM3QELQRUM3AELQRYM2wELQRcM2gELQRgM2QELQRkM2AELQRoM1wELQRsM1gELQRwM1QELQR0M1AELQR4M0wELQR8M0gELQSAM0QELQSEM0AELQQgMzwELQSIMzgELQSQMzQELQSMMzAELQQcMywELQSUMygELQSYMyQELQScMyAELQSgMxwELQRIMxgELQREMxQELQSkMxAELQSoMwwELQSsMwgELQSwMwQELQd4BDMABC0EuDL8BC0EvDL4BC0EwDL0BC0ExDLwBC0EyDLsBC0EzDLoBC0E0DLkBC0HfAQy4AQtBNQy3AQtBOQy2AQtBDAy1AQtBNgy0AQtBNwyzAQtBOAyyAQtBPgyxAQtBOgywAQtB4AEMrwELQQsMrgELQT8MrQELQTsMrAELQQoMqwELQTwMqgELQT0MqQELQeEBDKgBC0HBAAynAQtBwAAMpgELQcIADKUBC0EJDKQBC0EtDKMBC0HDAAyiAQtBxAAMoQELQcUADKABC0HGAAyfAQtBxwAMngELQcgADJ0BC0HJAAycAQtBygAMmwELQcsADJoBC0HMAAyZAQtBzQAMmAELQc4ADJcBC0HPAAyWAQtB0AAMlQELQdEADJQBC0HSAAyTAQtB0wAMkgELQdUADJEBC0HUAAyQAQtB1gAMjwELQdcADI4BC0HYAAyNAQtB2QAMjAELQdoADIsBC0HbAAyKAQtB3AAMiQELQd0ADIgBC0HeAAyHAQtB3wAMhgELQeAADIUBC0HhAAyEAQtB4gAMgwELQeMADIIBC0HkAAyBAQtB5QAMgAELQeIBDH8LQeYADH4LQecADH0LQQYMfAtB6AAMewtBBQx6C0HpAAx5C0EEDHgLQeoADHcLQesADHYLQewADHULQe0ADHQLQQMMcwtB7gAMcgtB7wAMcQtB8AAMcAtB8gAMbwtB8QAMbgtB8wAMbQtB9AAMbAtB9QAMawtB9gAMagtBAgxpC0H3AAxoC0H4AAxnC0H5AAxmC0H6AAxlC0H7AAxkC0H8AAxjC0H9AAxiC0H+AAxhC0H/AAxgC0GAAQxfC0GBAQxeC0GCAQxdC0GDAQxcC0GEAQxbC0GFAQxaC0GGAQxZC0GHAQxYC0GIAQxXC0GJAQxWC0GKAQxVC0GLAQxUC0GMAQxTC0GNAQxSC0GOAQxRC0GPAQxQC0GQAQxPC0GRAQxOC0GSAQxNC0GTAQxMC0GUAQxLC0GVAQxKC0GWAQxJC0GXAQxIC0GYAQxHC0GZAQxGC0GaAQxFC0GbAQxEC0GcAQxDC0GdAQxCC0GeAQxBC0GfAQxAC0GgAQw/C0GhAQw+C0GiAQw9C0GjAQw8C0GkAQw7C0GlAQw6C0GmAQw5C0GnAQw4C0GoAQw3C0GpAQw2C0GqAQw1C0GrAQw0C0GsAQwzC0GtAQwyC0GuAQwxC0GvAQwwC0GwAQwvC0GxAQwuC0GyAQwtC0GzAQwsC0G0AQwrC0G1AQwqC0G2AQwpC0G3AQwoC0G4AQwnC0G5AQwmC0G6AQwlC0G7AQwkC0G8AQwjC0G9AQwiC0G+AQwhC0G/AQwgC0HAAQwfC0HBAQweC0HCAQwdC0EBDBwLQcMBDBsLQcQBDBoLQcUBDBkLQcYBDBgLQccBDBcLQcgBDBYLQckBDBULQcoBDBQLQcsBDBMLQcwBDBILQc0BDBELQc4BDBALQc8BDA8LQdABDA4LQdEBDA0LQdIBDAwLQdMBDAsLQdQBDAoLQdUBDAkLQdYBDAgLQeMBDAcLQdcBDAYLQdgBDAULQdkBDAQLQdoBDAMLQdsBDAILQd0BDAELQdwBCyECA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDuMBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISMkJScoKZ4DmwOaA5EDigODA4AD/QL7AvgC8gLxAu8C7QLoAucC5gLlAuQC3ALbAtoC2QLYAtcC1gLVAs8CzgLMAssCygLJAsgCxwLGAsQCwwK+ArwCugK5ArgCtwK2ArUCtAKzArICsQKwAq4CrQKpAqgCpwKmAqUCpAKjAqICoQKgAp8CmAKQAowCiwKKAoEC/gH9AfwB+wH6AfkB+AH3AfUB8wHwAesB6QHoAecB5gHlAeQB4wHiAeEB4AHfAd4B3QHcAdoB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygHJAcgBxwHGAcUBxAHDAcIBwQHAAb8BvgG9AbwBuwG6AbkBuAG3AbYBtQG0AbMBsgGxAbABrwGuAa0BrAGrAaoBqQGoAacBpgGlAaQBowGiAZ8BngGZAZgBlwGWAZUBlAGTAZIBkQGQAY8BjQGMAYcBhgGFAYQBgwGCAX18e3p5dnV0UFFSU1RVCyABIARHDXJB/QEhAgy+AwsgASAERw2YAUHbASECDL0DCyABIARHDfEBQY4BIQIMvAMLIAEgBEcN/AFBhAEhAgy7AwsgASAERw2KAkH/ACECDLoDCyABIARHDZECQf0AIQIMuQMLIAEgBEcNlAJB+wAhAgy4AwsgASAERw0eQR4hAgy3AwsgASAERw0ZQRghAgy2AwsgASAERw3KAkHNACECDLUDCyABIARHDdUCQcYAIQIMtAMLIAEgBEcN1gJBwwAhAgyzAwsgASAERw3cAkE4IQIMsgMLIAMtADBBAUYNrQMMiQMLQQAhAAJAAkACQCADLQAqRQ0AIAMtACtFDQAgAy8BMiICQQJxRQ0BDAILIAMvATIiAkEBcUUNAQtBASEAIAMtAChBAUYNACADLwE0IgZB5ABrQeQASQ0AIAZBzAFGDQAgBkGwAkYNACACQcAAcQ0AQQAhACACQYgEcUGABEYNACACQShxQQBHIQALIANBADsBMiADQQA6ADECQCAARQRAIANBADoAMSADLQAuQQRxDQEMsQMLIANCADcDIAsgA0EAOgAxIANBAToANgxIC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAARQ1IIABBFUcNYiADQQQ2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgyvAwsgASAERgRAQQYhAgyvAwsgAS0AAEEKRw0ZIAFBAWohAQwaCyADQgA3AyBBEiECDJQDCyABIARHDYoDQSMhAgysAwsgASAERgRAQQchAgysAwsCQAJAIAEtAABBCmsOBAEYGAAYCyABQQFqIQFBECECDJMDCyABQQFqIQEgA0Evai0AAEEBcQ0XQQAhAiADQQA2AhwgAyABNgIUIANBmSA2AhAgA0EZNgIMDKsDCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMWg0YQQghAgyqAwsgASAERwRAIANBCTYCCCADIAE2AgRBFCECDJEDC0EJIQIMqQMLIAMpAyBQDa4CDEMLIAEgBEYEQEELIQIMqAMLIAEtAABBCkcNFiABQQFqIQEMFwsgA0Evai0AAEEBcUUNGQwmC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRkMQgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0aDCQLQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGwwyCyADQS9qLQAAQQFxRQ0cDCILQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANHAxCC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADR0MIAsgASAERgRAQRMhAgygAwsCQCABLQAAIgBBCmsOBB8jIwAiCyABQQFqIQEMHwtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0iDEILIAEgBEYEQEEWIQIMngMLIAEtAABBwMEAai0AAEEBRw0jDIMDCwJAA0AgAS0AAEGwO2otAAAiAEEBRwRAAkAgAEECaw4CAwAnCyABQQFqIQFBISECDIYDCyAEIAFBAWoiAUcNAAtBGCECDJ0DCyADKAIEIQBBACECIANBADYCBCADIAAgAUEBaiIBEDQiAA0hDEELQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIwwqCyABIARGBEBBHCECDJsDCyADQQo2AgggAyABNgIEQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANJUEkIQIMgQMLIAEgBEcEQANAIAEtAABBsD1qLQAAIgBBA0cEQCAAQQFrDgUYGiaCAyUmCyAEIAFBAWoiAUcNAAtBGyECDJoDC0EbIQIMmQMLA0AgAS0AAEGwP2otAAAiAEEDRwRAIABBAWsOBQ8RJxMmJwsgBCABQQFqIgFHDQALQR4hAgyYAwsgASAERwRAIANBCzYCCCADIAE2AgRBByECDP8CC0EfIQIMlwMLIAEgBEYEQEEgIQIMlwMLAkAgAS0AAEENaw4ULj8/Pz8/Pz8/Pz8/Pz8/Pz8/PwA/C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAyWAwsgA0EvaiECA0AgASAERgRAQSEhAgyXAwsCQAJAAkAgAS0AACIAQQlrDhgCACkpASkpKSkpKSkpKSkpKSkpKSkpKQInCyABQQFqIQEgA0Evai0AAEEBcUUNCgwYCyABQQFqIQEMFwsgAUEBaiEBIAItAABBAnENAAtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwMlQMLIAMtAC5BgAFxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ3mAiAAQRVGBEAgA0EkNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMlAMLQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDJMDC0EAIQIgA0EANgIcIAMgATYCFCADQb4gNgIQIANBAjYCDAySAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEgDKdqIgEQMiIARQ0rIANBBzYCHCADIAE2AhQgAyAANgIMDJEDCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlgiAkUNACADIAIRAAAhAAsgAEUNKyAAQRVGBEAgA0EKNgIcIAMgATYCFCADQesZNgIQIANBFTYCDEEAIQIMkAMLQQAhAiADQQA2AhwgAyABNgIUIANBkww2AhAgA0ETNgIMDI8DC0EAIQIgA0EANgIcIAMgATYCFCADQYIVNgIQIANBAjYCDAyOAwtBACECIANBADYCHCADIAE2AhQgA0HdFDYCECADQRk2AgwMjQMLQQAhAiADQQA2AhwgAyABNgIUIANB5h02AhAgA0EZNgIMDIwDCyAAQRVGDT1BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMiwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUNKCADQQ02AhwgAyABNgIUIAMgADYCDAyKAwsgAEEVRg06QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIkDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCgLIANBDjYCHCADIAA2AgwgAyABQQFqNgIUDIgDCyAAQRVGDTdBACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMhwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJwsgA0EPNgIcIAMgADYCDCADIAFBAWo2AhQMhgMLQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDIUDCyAAQRVGDTNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwMhAMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUNJSADQRE2AhwgAyABNgIUIAMgADYCDAyDAwsgAEEVRg0wQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIIDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDCULIANBEjYCHCADIAA2AgwgAyABQQFqNgIUDIEDCyADQS9qLQAAQQFxRQ0BC0EXIQIM5gILQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDP4CCyAAQTtHDQAgAUEBaiEBDAwLQQAhAiADQQA2AhwgAyABNgIUIANBkhg2AhAgA0ECNgIMDPwCCyAAQRVGDShBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM+wILIANBFDYCHCADIAE2AhQgAyAANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIM1AILIANBIDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNMCCyADQRM2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzSAgsgA0ELNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0QILIANBEDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNACCyADQSA2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzPAgsgA0ELNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzgILIANBDDYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM0CC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAzMAgsCQANAAkAgAS0AAEEKaw4EAAICAAILIAQgAUEBaiIBRw0AC0H9ASECDMwCCwJAAkAgAy0ANkEBRw0AQQAhAAJAIAMoAjgiAkUNACACKAJgIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB/AE2AhwgAyABNgIUIANB3Bk2AhAgA0EVNgIMQQAhAgzNAgtB3AEhAgyzAgsgA0EANgIcIAMgATYCFCADQfkLNgIQIANBHzYCDEEAIQIMywILAkACQCADLQAoQQFrDgIEAQALQdsBIQIMsgILQdQBIQIMsQILIANBAjoAMUEAIQACQCADKAI4IgJFDQAgAigCACICRQ0AIAMgAhEAACEACyAARQRAQd0BIQIMsQILIABBFUcEQCADQQA2AhwgAyABNgIUIANBtAw2AhAgA0EQNgIMQQAhAgzKAgsgA0H7ATYCHCADIAE2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQIMkAILIAFBAWohAUGFASECDI8CCyABQQFqIQFBhgEhAgyOAgsgAUEBaiEBQYkBIQIMjQILIAFBAWohAUGKASECDIwCCyABQQFqIQFBjQEhAgyLAgsgAUEBaiEBQZYBIQIMigILIAFBAWohAUGXASECDIkCCyABQQFqIQFBmAEhAgyIAgsgAUEBaiEBQaUBIQIMhwILIAFBAWohAUGmASECDIYCCyABQQFqIQFBrAEhAgyFAgsgAUEBaiEBQbQBIQIMhAILIAFBAWohAUG3ASECDIMCCyABQQFqIQFBvgEhAgyCAgsgASAERgRAQdYBIQIMmwILIAEtAABBzgBHDUggAUEBaiEBQb0BIQIMgQILIAEgBEYEQEHVASECDJoCCwJAAkACQCABLQAAQcIAaw4SAEpKSkpKSkpKSgFKSkpKSkoCSgsgAUEBaiEBQbgBIQIMggILIAFBAWohAUG7ASECDIECCyABQQFqIQFBvAEhAgyAAgtB1AEhAiABIARGDZgCIAMoAgAiACAEIAFraiEFIAEgAGtBB2ohBgJAA0AgAS0AACAAQajVAGotAABHDUUgAEEHRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJkCCyADQQA2AgAgBkEBaiEBQRsMRQsgASAERgRAQdMBIQIMmAILAkACQCABLQAAQckAaw4HAEdHR0dHAUcLIAFBAWohAUG5ASECDP8BCyABQQFqIQFBugEhAgz+AQtB0gEhAiABIARGDZYCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQabVAGotAABHDUMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJcCCyADQQA2AgAgBkEBaiEBQQ8MQwtB0QEhAiABIARGDZUCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQaTVAGotAABHDUIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYCCyADQQA2AgAgBkEBaiEBQSAMQgtB0AEhAiABIARGDZQCIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDUEgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJUCCyADQQA2AgAgBkEBaiEBQRIMQQsgASAERgRAQc8BIQIMlAILAkACQCABLQAAQcUAaw4OAENDQ0NDQ0NDQ0NDQwFDCyABQQFqIQFBtQEhAgz7AQsgAUEBaiEBQbYBIQIM+gELQc4BIQIgASAERg2SAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGe1QBqLQAARw0/IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyTAgsgA0EANgIAIAZBAWohAUEHDD8LQc0BIQIgASAERg2RAiADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGY1QBqLQAARw0+IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAySAgsgA0EANgIAIAZBAWohAUEoDD4LIAEgBEYEQEHMASECDJECCwJAAkACQCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEH51ABqLQAARw0yIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyGAgsgA0EANgIAIAZBAWohAUErDDILQcABIQIgASAERg2EAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH21ABqLQAARw0xIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyFAgsgA0EANgIAIAZBAWohAUEsDDELQb8BIQIgASAERg2DAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0wIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyEAgsgA0EANgIAIAZBAWohAUERDDALQb4BIQIgASAERg2CAiADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHy1ABqLQAARw0vIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyDAgsgA0EANgIAIAZBAWohAUEuDC8LIAEgBEYEQEG9ASECDIICCwJAAkACQAJAAkAgAS0AAEHBAGsOFQA0NDQ0NDQ0NDQ0ATQ0AjQ0AzQ0BDQLIAFBAWohAUGbASECDOwBCyABQQFqIQFBnAEhAgzrAQsgAUEBaiEBQZ0BIQIM6gELIAFBAWohAUGiASECDOkBCyABQQFqIQFBpAEhAgzoAQsgASAERgRAQbwBIQIMgQILAkACQCABLQAAQdIAaw4DADABMAsgAUEBaiEBQaMBIQIM6AELIAFBAWohAUEEDC0LQbsBIQIgASAERg3/ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHw1ABqLQAARw0sIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyAAgsgA0EANgIAIAZBAWohAUEdDCwLIAEgBEYEQEG6ASECDP8BCwJAAkAgAS0AAEHJAGsOBwEuLi4uLgAuCyABQQFqIQFBoQEhAgzmAQsgAUEBaiEBQSIMKwsgASAERgRAQbkBIQIM/gELIAEtAABB0ABHDSsgAUEBaiEBQaABIQIM5AELIAEgBEYEQEG4ASECDP0BCwJAAkAgAS0AAEHGAGsOCwAsLCwsLCwsLCwBLAsgAUEBaiEBQZ4BIQIM5AELIAFBAWohAUGfASECDOMBC0G3ASECIAEgBEYN+wEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB7NQAai0AAEcNKCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM/AELIANBADYCACAGQQFqIQFBDQwoC0G2ASECIAEgBEYN+gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNJyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+wELIANBADYCACAGQQFqIQFBDAwnC0G1ASECIAEgBEYN+QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6tQAai0AAEcNJiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+gELIANBADYCACAGQQFqIQFBAwwmC0G0ASECIAEgBEYN+AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6NQAai0AAEcNJSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+QELIANBADYCACAGQQFqIQFBJgwlCyABIARGBEBBswEhAgz4AQsCQAJAIAEtAABB1ABrDgIAAScLIAFBAWohAUGZASECDN8BCyABQQFqIQFBmgEhAgzeAQtBsgEhAiABIARGDfYBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQebUAGotAABHDSMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPcBCyADQQA2AgAgBkEBaiEBQScMIwtBsQEhAiABIARGDfUBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQeTUAGotAABHDSIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPYBCyADQQA2AgAgBkEBaiEBQRwMIgtBsAEhAiABIARGDfQBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQd7UAGotAABHDSEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPUBCyADQQA2AgAgBkEBaiEBQQYMIQtBrwEhAiABIARGDfMBIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQdnUAGotAABHDSAgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPQBCyADQQA2AgAgBkEBaiEBQRkMIAsgASAERgRAQa4BIQIM8wELAkACQAJAAkAgAS0AAEEtaw4jACQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkASQkJCQkAiQkJAMkCyABQQFqIQFBjgEhAgzcAQsgAUEBaiEBQY8BIQIM2wELIAFBAWohAUGUASECDNoBCyABQQFqIQFBlQEhAgzZAQtBrQEhAiABIARGDfEBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQdfUAGotAABHDR4gAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPIBCyADQQA2AgAgBkEBaiEBQQsMHgsgASAERgRAQawBIQIM8QELAkACQCABLQAAQcEAaw4DACABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiEBQQAMCgsgASAERgRAQZkBIQIM3QELAkACQCABLQAAQcgAaw4IAAwMDAwMDAEMCyABQQFqIQFB/QAhAgzEAQsgAUEBaiEBQYABIQIMwwELIAEgBEYEQEGYASECDNwBCwJAAkAgAS0AAEHOAGsOAwALAQsLIAFBAWohAUH+ACECDMMBCyABQQFqIQFB/wAhAgzCAQsgASAERgRAQZcBIQIM2wELIAEtAABB2QBHDQggAUEBaiEBQQgMBwtBlgEhAiABIARGDdkBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazUAGotAABHDQYgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNoBCyADQQA2AgAgBkEBaiEBQQUMBgtBlQEhAiABIARGDdgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQabUAGotAABHDQUgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNkBCyADQQA2AgAgBkEBaiEBQRYMBQtBlAEhAiABIARGDdcBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHXACECDHQLIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ16IANB6AA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAEgBEYEQEHnACECDIwBCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDXsgA0HmADYCHCADIAE2AhQgAyAANgIMQQAhAgyMAQtB1gAhAgxyCyABIARGBEBB5QAhAgyLAQtBACEAQQEhBUEBIQdBACECAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkAgAS0AAEEwaw4KCgkAAQIDBAUGCAsLQQIMBgtBAwwFC0EEDAQLQQUMAwtBBgwCC0EHDAELQQgLIQJBACEFQQAhBwwCC0EJIQJBASEAQQAhBUEAIQcMAQtBACEFQQEhAgsgAyACOgArIAFBAWohAQJAAkAgAy0ALkEQcQ0AAkACQAJAIAMtACoOAwEAAgQLIAdFDQMMAgsgAA0BDAILIAVFDQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANB4gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ19IANB4wA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5AA2AhwgAyABNgIUIAMgADYCDAyLAQtB1AAhAgxxCyADLQApQSJGDYYBQdMAIQIMcAtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsgAEUEQEHVACECDHALIABBFUcEQCADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgyJAQsgA0HhADYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDIgBCyABIARGBEBB4AAhAgyIAQsCQAJAAkACQAJAIAEtAABBCmsOBAEEBAAECyABQQFqIQEMAQsgAUEBaiEBIANBL2otAABBAXFFDQELQdIAIQIMcAsgA0EANgIcIAMgATYCFCADQbYRNgIQIANBCTYCDEEAIQIMiAELIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIcBCyABIARGBEBB3wAhAgyHAQsgAS0AAEEKRgRAIAFBAWohAQwJCyADLQAuQcAAcQ0IIANBADYCHCADIAE2AhQgA0G2ETYCECADQQI2AgxBACECDIYBCyABIARGBEBB3QAhAgyGAQsgAS0AACICQQ1GBEAgAUEBaiEBQdAAIQIMbQsgASEAIAJBCWsOBAUBAQUBCyAEIAEiAEYEQEHcACECDIUBCyAALQAAQQpHDQAgAEEBagwCC0EAIQIgA0EANgIcIAMgADYCFCADQcotNgIQIANBBzYCDAyDAQsgASAERgRAQdsAIQIMgwELAkAgAS0AAEEJaw4EAwAAAwALIAFBAWoLIQFBzgAhAgxoCyABIARGBEBB2gAhAgyBAQsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0GaEjYCECADQQc2AgwgAyABQQFqNgIUDH8LIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjgiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDH4LQc0AIQIMZAsgA0EANgIcIAMgATYCFCADQckNNgIQIANBGjYCDEEAIQIMfAsgASAERgRAQdkAIQIMfAsgAS0AAEEgRw09IAFBAWohASADLQAuQQFxDT0gA0EANgIcIAMgATYCFCADQcIcNgIQIANBHjYCDEEAIQIMewsgASAERgRAQdgAIQIMewsCQAJAAkACQAJAIAEtAAAiAEEKaw4EAgMDAAELIAFBAWohAUEsIQIMZQsgAEE6Rw0BIANBADYCHCADIAE2AhQgA0HnETYCECADQQo2AgxBACECDH0LIAFBAWohASADQS9qLQAAQQFxRQ1zIAMtADJBgAFxRQRAIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsCQAJAIAAOFk1MSwEBAQEBAQEBAQEBAQEBAQEBAQABCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgx+CyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgx9C0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ1ZIABBFUcNASADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgx8C0HLACECDGILQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDHoLIAMgAy8BMkGAAXI7ATIMOwsgASAERwRAIANBETYCCCADIAE2AgRBygAhAgxgC0HXACECDHgLIAEgBEYEQEHWACECDHgLAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAQEBAQEBAQEBAQEBAAUBAQAIDQAsgAUEBaiEBQcYAIQIMYQsgAUEBaiEBQccAIQIMYAsgAUEBaiEBQcgAIQIMXwsgAUEBaiEBQckAIQIMXgtB1QAhAiAEIAEiAEYNdiAEIAFrIAMoAgAiAWohBiAAIAFrQQVqIQcDQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQhBBCABQQVGDQoaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHYLQdQAIQIgBCABIgBGDXUgBCABayADKAIAIgFqIQYgACABa0EPaiEHA0AgAUGAyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0HQQMgAUEPRg0JGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx1C0HTACECIAQgASIARg10IAQgAWsgAygCACIBaiEGIAAgAWtBDmohBwNAIAFB4scAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNBiABQQ5GDQcgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdAtB0gAhAiAEIAEiAEYNcyAEIAFrIAMoAgAiAWohBSAAIAFrQQFqIQYDQCABQeDHAGotAAAgAC0AACIHQSByIAcgB0HBAGtB/wFxQRpJG0H/AXFHDQUgAUEBRg0CIAFBAWohASAEIABBAWoiAEcNAAsgAyAFNgIADHMLIAEgBEYEQEHRACECDHMLAkACQCABLQAAIgBBIHIgACAAQcEAa0H/AXFBGkkbQf8BcUHuAGsOBwA5OTk5OQE5CyABQQFqIQFBwwAhAgxaCyABQQFqIQFBxAAhAgxZCyADQQA2AgAgBkEBaiEBQcUAIQIMWAtB0AAhAiAEIAEiAEYNcCAEIAFrIAMoAgAiAWohBiAAIAFrQQlqIQcDQCABQdbHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQJBAiABQQlGDQQaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHALQc8AIQIgBCABIgBGDW8gBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUHQxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxvCyAAIQEgA0EANgIADDMLQQELOgAsIANBADYCACAHQQFqIQELQS0hAgxSCwJAA0AgAS0AAEHQxQBqLQAAQQFHDQEgBCABQQFqIgFHDQALQc0AIQIMawtBwgAhAgxRCyABIARGBEBBzAAhAgxqCyABLQAAQTpGBEAgAygCBCEAIANBADYCBCADIAAgARAwIgBFDTMgA0HLADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxqCyADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgxpCwJAAkAgAy0ALEECaw4CAAEnCyADQTNqLQAAQQJxRQ0mIAMtAC5BAnENJiADQQA2AhwgAyABNgIUIANBphQ2AhAgA0ELNgIMQQAhAgxpCyADLQAyQSBxRQ0lIAMtAC5BAnENJSADQQA2AhwgAyABNgIUIANBvRM2AhAgA0EPNgIMQQAhAgxoC0EAIQACQCADKAI4IgJFDQAgAigCSCICRQ0AIAMgAhEAACEACyAARQRAQcEAIQIMTwsgAEEVRwRAIANBADYCHCADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAxkCyADQQA2AgAMBQsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkcNAyABQQFqIQEMBQsgBCABQQFqIgFHDQALQcUAIQIMZAtBxQAhAgxjCwsgA0EAOgAsDAELQQshAgxHC0E/IQIMRgsCQAJAA0AgAS0AACIAQSBHBEACQCAAQQprDgQDBQUDAAsgAEEsRg0DDAQLIAQgAUEBaiIBRw0AC0HGACECDGALIANBCDoALAwOCyADLQAoQQFHDQIgAy0ALkEIcQ0CIAMoAgQhACADQQA2AgQgAyAAIAEQMSIABEAgA0HCADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxfCyABQQFqIQEMUAtBOyECDEQLAkADQCABLQAAIgBBIEcgAEEJR3ENASAEIAFBAWoiAUcNAAtBwwAhAgxdCwtBPCECDEILAkACQCABIARHBEADQCABLQAAIgBBIEcEQCAAQQprDgQDBAQDBAsgBCABQQFqIgFHDQALQT8hAgxdC0E/IQIMXAsgAyADLwEyQSByOwEyDAoLIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQ1OIANBPjYCHCADIAE2AhQgAyAANgIMQQAhAgxaCwJAIAEgBEcEQANAIAEtAABBwMMAai0AACIAQQFHBEAgAEECRg0DDAwLIAQgAUEBaiIBRw0AC0E3IQIMWwtBNyECDFoLIAFBAWohAQwEC0E7IQIgBCABIgBGDVggBCABayADKAIAIgFqIQYgACABa0EFaiEHAkADQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEFRgRAQQchAQw/CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxZCyADQQA2AgAgACEBDAULQTohAiAEIAEiAEYNVyAEIAFrIAMoAgAiAWohBiAAIAFrQQhqIQcCQANAIAFBtMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQhGBEBBBSEBDD4LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFgLIANBADYCACAAIQEMBAtBOSECIAQgASIARg1WIAQgAWsgAygCACIBaiEGIAAgAWtBA2ohBwJAA0AgAUGwwQBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBA0YEQEEGIQEMPQsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMVwsgA0EANgIAIAAhAQwDCwJAA0AgAS0AACIAQSBHBEAgAEEKaw4EBwQEBwILIAQgAUEBaiIBRw0AC0E4IQIMVgsgAEEsRw0BIAFBAWohAEEBIQECQAJAAkACQAJAIAMtACxBBWsOBAMBAgQACyAAIQEMBAtBAiEBDAELQQQhAQsgA0EBOgAsIAMgAy8BMiABcjsBMiAAIQEMAQsgAyADLwEyQQhyOwEyIAAhAQtBPiECDDsLIANBADoALAtBOSECDDkLIAEgBEYEQEE2IQIMUgsCQAJAAkACQAJAIAEtAABBCmsOBAACAgECCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNAiADQTM2AhwgAyABNgIUIAMgADYCDEEAIQIMVQsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDAYLIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxUCyADLQAuQQFxBEBB3wEhAgw7CyADKAIEIQAgA0EANgIEIAMgACABEDEiAA0BDEkLQTQhAgw5CyADQTU2AhwgAyABNgIUIAMgADYCDEEAIQIMUQtBNSECDDcLIANBL2otAABBAXENACADQQA2AhwgAyABNgIUIANB6xY2AhAgA0EZNgIMQQAhAgxPC0EzIQIMNQsgASAERgRAQTIhAgxOCwJAIAEtAABBCkYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZIXNgIQIANBAzYCDEEAIQIMTgtBMiECDDQLIAEgBEYEQEExIQIMTQsCQCABLQAAIgBBCUYNACAAQSBGDQBBASECAkAgAy0ALEEFaw4EBgQFAA0LIAMgAy8BMkEIcjsBMgwMCyADLQAuQQFxRQ0BIAMtACxBCEcNACADQQA6ACwLQT0hAgwyCyADQQA2AhwgAyABNgIUIANBwhY2AhAgA0EKNgIMQQAhAgxKC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyDAYLIAEgBEYEQEEwIQIMRwsgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQQFxDQAgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMRgtBMCECDCwLIAFBAWohAUExIQIMKwsgASAERgRAQS8hAgxECyABLQAAIgBBCUcgAEEgR3FFBEAgAUEBaiEBIAMtAC5BAXENASADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgxEC0EBIQICQAJAAkACQAJAAkAgAy0ALEECaw4HBQQEAwECAAQLIAMgAy8BMkEIcjsBMgwDC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyC0EvIQIMKwsgA0EANgIcIAMgATYCFCADQYQTNgIQIANBCzYCDEEAIQIMQwtB4QEhAgwpCyABIARGBEBBLiECDEILIANBADYCBCADQRI2AgggAyABIAEQMSIADQELQS4hAgwnCyADQS02AhwgAyABNgIUIAMgADYCDEEAIQIMPwtBACEAAkAgAygCOCICRQ0AIAIoAkwiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HYADYCHCADIAE2AhQgA0GzGzYCECADQRU2AgxBACECDD4LQcwAIQIMJAsgA0EANgIcIAMgATYCFCADQbMONgIQIANBHTYCDEEAIQIMPAsgASAERgRAQc4AIQIMPAsgAS0AACIAQSBGDQIgAEE6Rg0BCyADQQA6ACxBCSECDCELIAMoAgQhACADQQA2AgQgAyAAIAEQMCIADQEMAgsgAy0ALkEBcQRAQd4BIQIMIAsgAygCBCEAIANBADYCBCADIAAgARAwIgBFDQIgA0EqNgIcIAMgADYCDCADIAFBAWo2AhRBACECDDgLIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMNwsgAUEBaiEBQcAAIQIMHQsgAUEBaiEBDCwLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJcIgJFDQAgAyACEQAAIQALIABFDRIgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0GQDjYCECADQRQ2AgxBACECDDULIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsgAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIANBAToAMAsgAiACLwEAQcAAcjsBAAtBKyECDBgLIANBKTYCHCADIAE2AhQgA0GsGTYCECADQRU2AgxBACECDDALIANBADYCHCADIAE2AhQgA0HlCzYCECADQRE2AgxBACECDC8LIANBADYCHCADIAE2AhQgA0GlCzYCECADQQI2AgxBACECDC4LQQEhByADLwEyIgVBCHFFBEAgAykDIEIAUiEHCwJAIAMtADAEQEEBIQAgAy0AKUEFRg0BIAVBwABxRSAHcUUNAQsCQCADLQAoIgJBAkYEQEEBIQAgAy8BNCIGQeUARg0CQQAhACAFQcAAcQ0CIAZB5ABGDQIgBkHmAGtBAkkNAiAGQcwBRg0CIAZBsAJGDQIMAQtBACEAIAVBwABxDQELQQIhACAFQQhxDQAgBUGABHEEQAJAIAJBAUcNACADLQAuQQpxDQBBBSEADAILQQQhAAwBCyAFQSBxRQRAIAMQNkEAR0ECdCEADAELQQBBAyADKQMgUBshAAsgAEEBaw4FAgAHAQMEC0ERIQIMEwsgA0EBOgAxDCkLQQAhAgJAIAMoAjgiAEUNACAAKAIwIgBFDQAgAyAAEQAAIQILIAJFDSYgAkEVRgRAIANBAzYCHCADIAE2AhQgA0HSGzYCECADQRU2AgxBACECDCsLQQAhAiADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMDCoLIANBADYCHCADIAE2AhQgA0H5IDYCECADQQ82AgxBACECDCkLQQAhAAJAIAMoAjgiAkUNACACKAIwIgJFDQAgAyACEQAAIQALIAANAQtBDiECDA4LIABBFUYEQCADQQI2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwnCyADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMQQAhAgwmC0EqIQIMDAsgASAERwRAIANBCTYCCCADIAE2AgRBKSECDAwLQSYhAgwkCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMVARAQSUhAgwkCyADKAIEIQAgA0EANgIEIAMgACABIAynaiIBEDIiAEUNACADQQU2AhwgAyABNgIUIAMgADYCDEEAIQIMIwtBDyECDAkLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQTBrDjcXFgABAgMEBQYHFBQUFBQUFAgJCgsMDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUDg8QERITFAtCAiEKDBYLQgMhCgwVC0IEIQoMFAtCBSEKDBMLQgYhCgwSC0IHIQoMEQtCCCEKDBALQgkhCgwPC0IKIQoMDgtCCyEKDA0LQgwhCgwMC0INIQoMCwtCDiEKDAoLQg8hCgwJC0IKIQoMCAtCCyEKDAcLQgwhCgwGC0INIQoMBQtCDiEKDAQLQg8hCgwDCyADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMQQAhAgwhCyABIARGBEBBIiECDCELQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FRQAAQIDBAUGBxYWFhYWFhYICQoLDA0WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFg4PEBESExYLQgIhCgwUC0IDIQoMEwtCBCEKDBILQgUhCgwRC0IGIQoMEAtCByEKDA8LQgghCgwOC0IJIQoMDQtCCiEKDAwLQgshCgwLC0IMIQoMCgtCDSEKDAkLQg4hCgwIC0IPIQoMBwtCCiEKDAYLQgshCgwFC0IMIQoMBAtCDSEKDAMLQg4hCgwCC0IPIQoMAQtCASEKCyABQQFqIQEgAykDICILQv//////////D1gEQCADIAtCBIYgCoQ3AyAMAgsgA0EANgIcIAMgATYCFCADQbUJNgIQIANBDDYCDEEAIQIMHgtBJyECDAQLQSghAgwDCyADIAE6ACwgA0EANgIAIAdBAWohAUEMIQIMAgsgA0EANgIAIAZBAWohAUEKIQIMAQsgAUEBaiEBQQghAgwACwALQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBcLQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBYLQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBULQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDBQLQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDBMLQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBILQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBELQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBALQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDA8LQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDA4LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDA0LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDAwLQQAhAiADQQA2AhwgAyABNgIUIANBmRM2AhAgA0ELNgIMDAsLQQAhAiADQQA2AhwgAyABNgIUIANBnQk2AhAgA0ELNgIMDAoLQQAhAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMDAkLQQAhAiADQQA2AhwgAyABNgIUIANBsRA2AhAgA0EKNgIMDAgLQQAhAiADQQA2AhwgAyABNgIUIANBux02AhAgA0ECNgIMDAcLQQAhAiADQQA2AhwgAyABNgIUIANBlhY2AhAgA0ECNgIMDAYLQQAhAiADQQA2AhwgAyABNgIUIANB+Rg2AhAgA0ECNgIMDAULQQAhAiADQQA2AhwgAyABNgIUIANBxBg2AhAgA0ECNgIMDAQLIANBAjYCHCADIAE2AhQgA0GpHjYCECADQRY2AgxBACECDAMLQd4AIQIgASAERg0CIAlBCGohByADKAIAIQUCQAJAIAEgBEcEQCAFQZbIAGohCCAEIAVqIAFrIQYgBUF/c0EKaiIFIAFqIQADQCABLQAAIAgtAABHBEBBAiEIDAMLIAVFBEBBACEIIAAhAQwDCyAFQQFrIQUgCEEBaiEIIAQgAUEBaiIBRw0ACyAGIQUgBCEBCyAHQQE2AgAgAyAFNgIADAELIANBADYCACAHIAg2AgALIAcgATYCBCAJKAIMIQACQAJAIAkoAghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArYhCAYNQDQAgAEECdEHQOGooAgAPCwALFwAgAEEvTwRAAAsgAEECdEHsOWooAgALvwkBAX9B9C0hAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HqLA8LQZgmDwtB7TEPC0GgNw8LQckpDwtBtCkPC0GWLQ8LQesrDwtBojUPC0HbNA8LQeApDwtB4yQPC0HVJA8LQe4kDwtB5iUPC0HKNA8LQdA3DwtBqjUPC0H1LA8LQfYmDwtBgiIPC0HyMw8LQb4oDwtB5zcPC0HNIQ8LQcAhDwtBuCUPC0HLJQ8LQZYkDwtBjzQPC0HNNQ8LQd0qDwtB7jMPC0GcNA8LQZ4xDwtB9DUPC0HlIg8LQa8lDwtBmTEPC0GyNg8LQfk2DwtBxDIPC0HdLA8LQYIxDwtBwTEPC0GNNw8LQckkDwtB7DYPC0HnKg8LQcgjDwtB4iEPC0HJNw8LQaUiDwtBlCIPC0HbNg8LQd41DwtBhiYPC0G8Kw8LQYsyDwtBoCMPC0H2MA8LQYAsDwtBiSsPC0GkJg8LQfIjDwtBgSgPC0GrMg8LQesnDwtBwjYPC0GiJA8LQc8qDwtB3CMPC0GHJw8LQeQ0DwtBtyIPC0GtMQ8LQdUiDwtBrzQPC0HeJg8LQdYyDwtB9DQPC0GBOA8LQfQ3DwtBkjYPC0GdJw8LQYIpDwtBjSMPC0HXMQ8LQb01DwtBtDcPC0HYMA8LQbYnDwtBmjgPC0GnKg8LQcQnDwtBriMPC0H1Ig8LAAtByiYhAQsgAQsXACAAIAAvAS5B/v8DcSABQQBHcjsBLgsaACAAIAAvAS5B/f8DcSABQQBHQQF0cjsBLgsaACAAIAAvAS5B+/8DcSABQQBHQQJ0cjsBLgsaACAAIAAvAS5B9/8DcSABQQBHQQN0cjsBLgsaACAAIAAvAS5B7/8DcSABQQBHQQR0cjsBLgsaACAAIAAvAS5B3/8DcSABQQBHQQV0cjsBLgsaACAAIAAvAS5Bv/8DcSABQQBHQQZ0cjsBLgsaACAAIAAvAS5B//4DcSABQQBHQQd0cjsBLgsaACAAIAAvAS5B//0DcSABQQBHQQh0cjsBLgsaACAAIAAvAS5B//sDcSABQQBHQQl0cjsBLgs+AQJ/AkAgACgCOCIDRQ0AIAMoAgQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeESNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAggiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfwRNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAgwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQewKNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfoeNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQcsQNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhgiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQbcfNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQb8VNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQf4INgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQYwdNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeYVNgIQQRghBAsgBAs4ACAAAn8gAC8BMkEUcUEURgRAQQEgAC0AKEEBRg0BGiAALwE0QeUARgwBCyAALQApQQVGCzoAMAtZAQJ/AkAgAC0AKEEBRg0AIAAvATQiAUHkAGtB5ABJDQAgAUHMAUYNACABQbACRg0AIAAvATIiAEHAAHENAEEBIQIgAEGIBHFBgARGDQAgAEEocUUhAgsgAguMAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQAgAC8BMiIBQQJxRQ0BDAILIAAvATIiAUEBcUUNAQtBASECIAAtAChBAUYNACAALwE0IgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNACABQcAAcQ0AQQAhAiABQYgEcUGABEYNACABQShxQQBHIQILIAILcwAgAEEQav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAP0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEwav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEgav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==",WUt;Object.defineProperty(gmn,"exports",{get:a(()=>WUt||(WUt=H4o.from(j4o,"base64")),"get")})});var Gve=T((kLu,Smn)=>{"use strict";f();var ymn=["GET","HEAD","POST"],$4o=new Set(ymn),V4o=[101,204,205,304],Emn=[301,302,303,307,308],W4o=new Set(Emn),Cmn=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],z4o=new Set(Cmn),_mn=["no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],Y4o=["",..._mn],K4o=new Set(_mn),J4o=["follow","manual","error"],vmn=["GET","HEAD","OPTIONS","TRACE"],X4o=new Set(vmn),Z4o=["navigate","same-origin","no-cors","cors"],eBo=["omit","same-origin","include"],tBo=["default","no-store","reload","no-cache","force-cache","only-if-cached"],rBo=["content-encoding","content-language","content-location","content-type","content-length"],nBo=["half"],bmn=["CONNECT","TRACE","TRACK"],iBo=new Set(bmn),Tmn=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],oBo=new Set(Tmn);Smn.exports={subresource:Tmn,forbiddenMethods:bmn,requestBodyHeader:rBo,referrerPolicy:Y4o,requestRedirect:J4o,requestMode:Z4o,requestCredentials:eBo,requestCache:tBo,redirectStatus:Emn,corsSafeListedMethods:ymn,nullBodyStatus:V4o,safeMethods:vmn,badPorts:Cmn,requestDuplex:nBo,subresourceSet:oBo,badPortsSet:z4o,redirectStatusSet:W4o,corsSafeListedMethodsSet:$4o,safeMethodsSet:X4o,forbiddenMethodsSet:iBo,referrerPolicyTokens:K4o}});var YUt=T((DLu,Imn)=>{"use strict";f();var zUt=Symbol.for("undici.globalOrigin.1");function sBo(){return globalThis[zUt]}a(sBo,"getGlobalOrigin");function aBo(t){if(t===void 0){Object.defineProperty(globalThis,zUt,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,zUt,{value:e,writable:!0,enumerable:!1,configurable:!1})}a(aBo,"setGlobalOrigin");Imn.exports={getGlobalOrigin:sBo,setGlobalOrigin:aBo}});var rze=T((BLu,xmn)=>{"use strict";f();var cBo=new TextDecoder;function lBo(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),cBo.decode(t))}a(lBo,"utf8DecodeBytes");xmn.exports={utf8DecodeBytes:lBo}});var C4=T((ULu,kmn)=>{"use strict";f();var wmn=require("node:assert"),{utf8DecodeBytes:uBo}=rze();function dBo(t,e,r){let n="";for(;r.positione)return String.fromCharCode.apply(null,t);let r="",n=0,o=65535;for(;ne&&(o=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=o));return r}a(mBo,"isomorphicDecode");var gBo=/[^\x00-\xFF]/;function ABo(t){return wmn(!gBo.test(t)),t}a(ABo,"isomorphicEncode");function yBo(t){return JSON.parse(uBo(t))}a(yBo,"parseJSONFromBytes");function EBo(t,e=!0,r=!0){return Pmn(t,e,r,Rmn)}a(EBo,"removeASCIIWhitespace");function Pmn(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o0&&n(t.charCodeAt(s));)s--;return o===0&&s===t.length-1?t:t.slice(o,s+1)}a(Pmn,"removeChars");function CBo(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return wmn(typeof e=="string"),e}a(CBo,"serializeJavascriptValueToJSONString");kmn.exports={collectASequenceOfCodePoints:dBo,collectASequenceOfCodePointsFast:fBo,forgivingBase64:hBo,isASCIIWhitespace:Rmn,isomorphicDecode:mBo,isomorphicEncode:ABo,parseJSONFromBytes:yBo,removeASCIIWhitespace:EBo,removeChars:Pmn,serializeJavascriptValueToJSONString:CBo}});var AS=T((GLu,Lmn)=>{"use strict";f();var ize=require("node:assert"),{forgivingBase64:_Bo,collectASequenceOfCodePoints:KUt,collectASequenceOfCodePointsFast:Hve,isomorphicDecode:vBo,removeASCIIWhitespace:bBo,removeChars:TBo}=C4(),SBo=new TextEncoder,jve=/^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u,IBo=/[\u000A\u000D\u0009\u0020]/u,xBo=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;function wBo(t){ize(t.protocol==="data:");let e=Mmn(t,!0);e=e.slice(5);let r={position:0},n=Hve(",",e,r),o=n.length;if(n=bBo(n,!0,!0),r.position>=e.length)return"failure";r.position++;let s=e.slice(o+1),c=Omn(s);if(/;(?:\u0020*)base64$/ui.test(n)){let u=vBo(c);if(c=_Bo(u),c==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020+)$/u,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let l=JUt(n);return l==="failure"&&(l=JUt("text/plain;charset=US-ASCII")),{mimeType:l,body:c}}a(wBo,"dataURLProcessor");function Mmn(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,o=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?o.slice(0,-1):o}a(Mmn,"URLSerializer");function Omn(t){let e=SBo.encode(t);return RBo(e)}a(Omn,"stringPercentDecode");function Nmn(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}a(Nmn,"isHexCharByte");function Dmn(t){return t>=48&&t<=57?t-48:(t&223)-55}a(Dmn,"hexByteToNumber");function RBo(t){let e=t.length,r=new Uint8Array(e),n=0,o=0;for(;o=t.length)return"failure";e.position++;let n=Hve(";",t,e);if(n=nze(n,!1,!0),n.length===0||!jve.test(n))return"failure";let o=r.toLowerCase(),s=n.toLowerCase(),c={type:o,subtype:s,parameters:new Map,essence:`${o}/${s}`};for(;e.positionIBo.test(d),t,e);let l=KUt(d=>d!==";"&&d!=="=",t,e);if(l=l.toLowerCase(),e.position=t.length)break;let u=null;if(t[e.position]==='"')u=Bmn(t,e,!0),Hve(";",t,e);else if(u=Hve(";",t,e),u=nze(u,!1,!0),u.length===0)continue;l.length!==0&&jve.test(l)&&(u.length===0||xBo.test(u))&&!c.parameters.has(l)&&c.parameters.set(l,u)}return c}a(JUt,"parseMIMEType");function Bmn(t,e,r=!1){let n=e.position,o="";for(ize(t[e.position]==='"'),e.position++;o+=KUt(c=>c!=='"'&&c!=="\\",t,e),!(e.position>=t.length);){let s=t[e.position];if(e.position++,s==="\\"){if(e.position>=t.length){o+="\\";break}o+=t[e.position],e.position++}else{ize(s==='"');break}}return r?o:t.slice(n,e.position)}a(Bmn,"collectAnHTTPQuotedString");function PBo(t){ize(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[o,s]of e.entries())n+=";",n+=o,n+="=",jve.test(s)||(s=s.replace(/[\\"]/ug,"\\$&"),s='"'+s,s+='"'),n+=s;return n}a(PBo,"serializeAMimeType");function kBo(t){return t===13||t===10||t===9||t===32}a(kBo,"isHTTPWhiteSpace");function nze(t,e=!0,r=!0){return TBo(t,e,r,kBo)}a(nze,"removeHTTPWhitespace");function NBo(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}a(NBo,"minimizeSupportedMimeType");Lmn.exports={dataURLProcessor:wBo,URLSerializer:Mmn,stringPercentDecode:Omn,parseMIMEType:JUt,collectAnHTTPQuotedString:Bmn,serializeAMimeType:PBo,removeHTTPWhitespace:nze,minimizeSupportedMimeType:NBo,HTTP_TOKEN_CODEPOINTS:jve}});var _4=T(($Lu,ZUt)=>{"use strict";f();var Fmn={__proto__:null,"node:crypto":a(()=>require("node:crypto"),"node:crypto"),"node:sqlite":a(()=>require("node:sqlite"),"node:sqlite"),"node:worker_threads":a(()=>require("node:worker_threads"),"node:worker_threads"),"node:zlib":a(()=>require("node:zlib"),"node:zlib")};function DBo(t){try{return Fmn[t](),!0}catch(e){if(e.code!=="ERR_UNKNOWN_BUILTIN_MODULE"&&e.code!=="ERR_NO_CRYPTO")throw e;return!1}}a(DBo,"detectRuntimeFeatureByNodeModule");function MBo(t,e){return typeof Fmn[t]()[e]<"u"}a(MBo,"detectRuntimeFeatureByExportedProperty");var Umn=["markAsUncloneable","zstd"],OBo={markAsUncloneable:["node:worker_threads","markAsUncloneable"],zstd:["node:zlib","createZstdDecompress"]},Qmn=["crypto","sqlite"],BBo=[...Qmn,...Umn];function LBo(t){if(Qmn.includes(t))return DBo(`node:${t}`);if(Umn.includes(t)){let[e,r]=OBo[t];return MBo(e,r)}throw new TypeError(`unknown feature: ${t}`)}a(LBo,"detectRuntimeFeature");var XUt=class{static{a(this,"RuntimeFeatures")}#e=new Map;clear(){this.#e.clear()}has(e){return this.#e.get(e)??this.#t(e)}set(e,r){if(BBo.includes(e)===!1)throw new TypeError(`unknown feature: ${e}`);this.#e.set(e,r)}#t(e){let r=LBo(e);return this.#e.set(e,r),r}},qmn=new XUt;ZUt.exports.runtimeFeatures=qmn;ZUt.exports.default=qmn});var Qm=T((zLu,Hmn)=>{"use strict";f();var FBo=require("node:assert"),{types:$d,inspect:UBo}=require("node:util"),{runtimeFeatures:QBo}=_4(),eQt=1,tQt=2,oze=3,sze=4,rQt=5,aze=6,nQt=7,xv=8,Gmn=Function.call.bind(Function.prototype[Symbol.hasInstance]),Je={converters:{},util:{},errors:{},is:{}};Je.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};Je.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return Je.errors.exception({header:t.prefix,message:r})};Je.errors.invalidArgument=function(t){return Je.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};Je.brandCheck=function(t,e){if(!Gmn(e,t)){let r=new TypeError("Illegal invocation");throw r.code="ERR_INVALID_THIS",r}};Je.brandCheckMultiple=function(t){let e=t.map(r=>Je.util.MakeTypeAssertion(r));return r=>{if(e.every(n=>!n(r))){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}};Je.argumentLengthCheck=function({length:t},e,r){if(tGmn(t,e)};Je.util.Type=function(t){switch(typeof t){case"undefined":return eQt;case"boolean":return tQt;case"string":return oze;case"symbol":return sze;case"number":return rQt;case"bigint":return aze;case"function":case"object":return t===null?nQt:xv}};Je.util.Types={UNDEFINED:eQt,BOOLEAN:tQt,STRING:oze,SYMBOL:sze,NUMBER:rQt,BIGINT:aze,NULL:nQt,OBJECT:xv};Je.util.TypeValueToString=function(t){switch(Je.util.Type(t)){case eQt:return"Undefined";case tQt:return"Boolean";case oze:return"String";case sze:return"Symbol";case rQt:return"Number";case aze:return"BigInt";case nQt:return"Null";case xv:return"Object"}};Je.util.markAsUncloneable=QBo.has("markAsUncloneable")?require("node:worker_threads").markAsUncloneable:()=>{};Je.util.ConvertToInt=function(t,e,r,n){let o,s;e===64?(o=Math.pow(2,53)-1,r==="unsigned"?s=0:s=Math.pow(-2,53)+1):r==="unsigned"?(s=0,o=Math.pow(2,e)-1):(s=Math.pow(-2,e)-1,o=Math.pow(2,e-1)-1);let c=Number(t);if(c===0&&(c=0),Je.util.HasFlag(n,Je.attributes.EnforceRange)){if(Number.isNaN(c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY)throw Je.errors.exception({header:"Integer conversion",message:`Could not convert ${Je.util.Stringify(t)} to an integer.`});if(c=Je.util.IntegerPart(c),co)throw Je.errors.exception({header:"Integer conversion",message:`Value must be between ${s}-${o}, got ${c}.`});return c}return!Number.isNaN(c)&&Je.util.HasFlag(n,Je.attributes.Clamp)?(c=Math.min(Math.max(c,s),o),Math.floor(c)%2===0?c=Math.floor(c):c=Math.ceil(c),c):Number.isNaN(c)||c===0&&Object.is(0,c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY?0:(c=Je.util.IntegerPart(c),c=c%Math.pow(2,e),r==="signed"&&c>=Math.pow(2,e)-1?c-Math.pow(2,e):c)};Je.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};Je.util.Stringify=function(t){switch(Je.util.Type(t)){case sze:return`Symbol(${t.description})`;case xv:return UBo(t);case oze:return`"${t}"`;case aze:return`${t}n`;default:return`${t}`}};Je.util.IsResizableArrayBuffer=function(t){if($d.isArrayBuffer(t))return t.resizable;if($d.isSharedArrayBuffer(t))return t.growable;throw Je.errors.exception({header:"IsResizableArrayBuffer",message:`"${Je.util.Stringify(t)}" is not an array buffer.`})};Je.util.HasFlag=function(t,e){return typeof t=="number"&&(t&e)===e};Je.sequenceConverter=function(t){return(e,r,n,o)=>{if(Je.util.Type(e)!==xv)throw Je.errors.exception({header:r,message:`${n} (${Je.util.Stringify(e)}) is not iterable.`});let s=typeof o=="function"?o():e?.[Symbol.iterator]?.(),c=[],l=0;if(s===void 0||typeof s.next!="function")throw Je.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:u,value:d}=s.next();if(u)break;c.push(t(d,r,`${n}[${l++}]`))}return c}};Je.recordConverter=function(t,e){return(r,n,o)=>{if(Je.util.Type(r)!==xv)throw Je.errors.exception({header:n,message:`${o} ("${Je.util.TypeValueToString(r)}") is not an Object.`});let s={};if(!$d.isProxy(r)){let l=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let u of l){let d=Je.util.Stringify(u),p=t(u,n,`Key ${d} in ${o}`),h=e(r[u],n,`${o}[${d}]`);s[p]=h}return s}let c=Reflect.ownKeys(r);for(let l of c)if(Reflect.getOwnPropertyDescriptor(r,l)?.enumerable){let d=t(l,n,o),p=e(r[l],n,o);s[d]=p}return s}};Je.interfaceConverter=function(t,e){return(r,n,o)=>{if(!t(r))throw Je.errors.exception({header:n,message:`Expected ${o} ("${Je.util.Stringify(r)}") to be an instance of ${e}.`});return r}};Je.dictionaryConverter=function(t){return t.sort((e,r)=>(e.key>r.key)-(e.key{let o={};if(e!=null&&Je.util.Type(e)!==xv)throw Je.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let s of t){let{key:c,defaultValue:l,required:u,converter:d}=s;if(u===!0&&(e==null||!Object.hasOwn(e,c)))throw Je.errors.exception({header:r,message:`Missing required key "${c}".`});let p=e?.[c],h=l!==void 0;if(h&&p===void 0&&(p=l()),u||h||p!==void 0){if(p=d(p,r,`${n}.${c}`),s.allowedValues&&!s.allowedValues.includes(p))throw Je.errors.exception({header:r,message:`${p} is not an accepted type. Expected one of ${s.allowedValues.join(", ")}.`});o[c]=p}}return o}};Je.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};Je.is.USVString=function(t){return typeof t=="string"&&t.isWellFormed()};Je.is.ReadableStream=Je.util.MakeTypeAssertion(ReadableStream);Je.is.Blob=Je.util.MakeTypeAssertion(Blob);Je.is.URLSearchParams=Je.util.MakeTypeAssertion(URLSearchParams);Je.is.File=Je.util.MakeTypeAssertion(File);Je.is.URL=Je.util.MakeTypeAssertion(URL);Je.is.AbortSignal=Je.util.MakeTypeAssertion(AbortSignal);Je.is.MessagePort=Je.util.MakeTypeAssertion(MessagePort);Je.is.BufferSource=function(t){return $d.isArrayBuffer(t)||ArrayBuffer.isView(t)&&$d.isArrayBuffer(t.buffer)};Je.util.getCopyOfBytesHeldByBufferSource=function(t){let e=t,r=e,n=0,o=0;if($d.isTypedArray(e)||$d.isDataView(e)?(r=e.buffer,n=e.byteOffset,o=e.byteLength):(FBo($d.isAnyArrayBuffer(e)),o=e.byteLength),r.detached)return new Uint8Array(0);let s=new Uint8Array(o),c=new Uint8Array(r,n,o);return s.set(c),s};Je.converters.DOMString=function(t,e,r,n){if(t===null&&Je.util.HasFlag(n,Je.attributes.LegacyNullToEmptyString))return"";if(typeof t=="symbol")throw Je.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};Je.converters.ByteString=function(t,e,r){if(typeof t=="symbol")throw Je.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a ByteString.`});let n=String(t);for(let o=0;o255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${o} has a value of ${n.charCodeAt(o)} which is greater than 255.`);return n};Je.converters.USVString=function(t){return typeof t=="string"?t.toWellFormed():`${t}`.toWellFormed()};Je.converters.boolean=function(t){return!!t};Je.converters.any=function(t){return t};Je.converters["long long"]=function(t,e,r){return Je.util.ConvertToInt(t,64,"signed",0,e,r)};Je.converters["unsigned long long"]=function(t,e,r){return Je.util.ConvertToInt(t,64,"unsigned",0,e,r)};Je.converters["unsigned long"]=function(t,e,r){return Je.util.ConvertToInt(t,32,"unsigned",0,e,r)};Je.converters["unsigned short"]=function(t,e,r,n){return Je.util.ConvertToInt(t,16,"unsigned",n,e,r)};Je.converters.ArrayBuffer=function(t,e,r,n){if(Je.util.Type(t)!==xv||!$d.isArrayBuffer(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t))throw Je.errors.exception({header:e,message:`${r} cannot be a resizable ArrayBuffer.`});return t};Je.converters.SharedArrayBuffer=function(t,e,r,n){if(Je.util.Type(t)!==xv||!$d.isSharedArrayBuffer(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["SharedArrayBuffer"]});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t))throw Je.errors.exception({header:e,message:`${r} cannot be a resizable SharedArrayBuffer.`});return t};Je.converters.TypedArray=function(t,e,r,n,o){if(Je.util.Type(t)!==xv||!$d.isTypedArray(t)||t.constructor.name!==e.name)throw Je.errors.conversionFailed({prefix:r,argument:`${n} ("${Je.util.Stringify(t)}")`,types:[e.name]});if(!Je.util.HasFlag(o,Je.attributes.AllowShared)&&$d.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:r,message:`${n} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(o,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:r,message:`${n} cannot be a view on a resizable array buffer.`});return t};Je.converters.DataView=function(t,e,r,n){if(Je.util.Type(t)!==xv||!$d.isDataView(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["DataView"]});if(!Je.util.HasFlag(n,Je.attributes.AllowShared)&&$d.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a resizable array buffer.`});return t};Je.converters.ArrayBufferView=function(t,e,r,n){if(Je.util.Type(t)!==xv||!$d.isArrayBufferView(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBufferView"]});if(!Je.util.HasFlag(n,Je.attributes.AllowShared)&&$d.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a resizable array buffer.`});return t};Je.converters.BufferSource=function(t,e,r,n){if($d.isArrayBuffer(t))return Je.converters.ArrayBuffer(t,e,r,n);if($d.isArrayBufferView(t))return n&=~Je.attributes.AllowShared,Je.converters.ArrayBufferView(t,e,r,n);throw $d.isSharedArrayBuffer(t)?Je.errors.exception({header:e,message:`${r} cannot be a SharedArrayBuffer.`}):Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer","ArrayBufferView"]})};Je.converters.AllowSharedBufferSource=function(t,e,r,n){if($d.isArrayBuffer(t))return Je.converters.ArrayBuffer(t,e,r,n);if($d.isSharedArrayBuffer(t))return Je.converters.SharedArrayBuffer(t,e,r,n);if($d.isArrayBufferView(t))return n|=Je.attributes.AllowShared,Je.converters.ArrayBufferView(t,e,r,n);throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer","SharedArrayBuffer","ArrayBufferView"]})};Je.converters["sequence"]=Je.sequenceConverter(Je.converters.ByteString);Je.converters["sequence>"]=Je.sequenceConverter(Je.converters["sequence"]);Je.converters["record"]=Je.recordConverter(Je.converters.ByteString,Je.converters.ByteString);Je.converters.Blob=Je.interfaceConverter(Je.is.Blob,"Blob");Je.converters.AbortSignal=Je.interfaceConverter(Je.is.AbortSignal,"AbortSignal");Je.converters.EventHandlerNonNull=function(t){return Je.util.Type(t)!==xv?null:typeof t=="function"?t:()=>{}};Je.attributes={Clamp:1,EnforceRange:2,AllowShared:4,AllowResizable:8,LegacyNullToEmptyString:16};Hmn.exports={webidl:Je}});var wv=T((KLu,ngn)=>{"use strict";f();var{Transform:qBo}=require("node:stream"),jmn=require("node:zlib"),{redirectStatusSet:GBo,referrerPolicyTokens:HBo,badPortsSet:jBo}=Gve(),{getGlobalOrigin:$mn}=YUt(),{collectAnHTTPQuotedString:$Bo,parseMIMEType:VBo}=AS(),{performance:WBo}=require("node:perf_hooks"),{ReadableStreamFrom:zBo,isValidHTTPToken:Vmn,normalizedMethodRecordsBase:YBo}=eo(),Vve=require("node:assert"),{isUint8Array:KBo}=require("node:util/types"),{webidl:q9}=Qm(),{isomorphicEncode:iQt,collectASequenceOfCodePoints:lW,removeChars:JBo}=C4();function Wmn(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}a(Wmn,"responseURL");function XBo(t,e){if(!GBo.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&Ymn(r)&&(zmn(r)||(r=ZBo(r)),r=new URL(r,Wmn(t))),r&&!r.hash&&(r.hash=e),r}a(XBo,"responseLocationURL");function zmn(t){for(let e=0;e126||r<32)return!1}return!0}a(zmn,"isValidEncodedURL");function ZBo(t){return Buffer.from(t,"binary").toString("utf8")}a(ZBo,"normalizeBinaryStringToUtf8");function dW(t){return t.urlList[t.urlList.length-1]}a(dW,"requestCurrentURL");function e3o(t){let e=dW(t);return tgn(e)&&jBo.has(e.port)?"blocked":"allowed"}a(e3o,"requestBadPort");function t3o(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}a(t3o,"isErrorLike");function r3o(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}a(r3o,"isValidReasonPhrase");var n3o=Vmn;function Ymn(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` -`)||t.includes("\r")||t.includes("\0"))===!1}a(Ymn,"isValidHeaderValue");function i3o(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let n=e.length;n!==0;n--){let o=e[n-1].trim();if(HBo.has(o)){r=o;break}}return r}a(i3o,"parseReferrerPolicy");function o3o(t,e){let r=i3o(e);r!==""&&(t.referrerPolicy=r)}a(o3o,"setRequestReferrerPolicyOnRedirect");function s3o(){return"allowed"}a(s3o,"crossOriginResourcePolicyCheck");function a3o(){return"success"}a(a3o,"corsCheck");function c3o(){return"success"}a(c3o,"TAOCheck");function l3o(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}a(l3o,"appendFetchMetadata");function u3o(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&sQt(t.origin)&&!sQt(dW(t))&&(e=null);break;case"same-origin":$ve(t,dW(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}a(u3o,"appendRequestOriginHeader");function Use(t,e){return t}a(Use,"coarsenTime");function d3o(t,e,r){return!t?.startTime||t.startTime4096&&(n=o),e){case"no-referrer":return"no-referrer";case"origin":return o??oQt(r,!0);case"unsafe-url":return n;case"strict-origin":{let s=dW(t);return uW(n)&&!uW(s)?"no-referrer":o}case"strict-origin-when-cross-origin":{let s=dW(t);return $ve(n,s)?n:uW(n)&&!uW(s)?"no-referrer":o}case"same-origin":return $ve(t,n)?n:"no-referrer";case"origin-when-cross-origin":return $ve(t,n)?n:o;case"no-referrer-when-downgrade":{let s=dW(t);return uW(n)&&!uW(s)?"no-referrer":n}}}a(m3o,"determineRequestsReferrer");function oQt(t,e=!1){return Vve(q9.is.URL(t)),t=new URL(t),egn(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}a(oQt,"stripURLForReferrer");var g3o=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),A3o=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function Jmn(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),A3o(t)):g3o(t)}a(Jmn,"isOriginIPPotentiallyTrustworthy");function y3o(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||Jmn(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}a(y3o,"isOriginPotentiallyTrustworthy");function uW(t){return q9.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:y3o(t.origin):!1}a(uW,"isURLPotentiallyTrustworthy");function E3o(t){}a(E3o,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function $ve(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a($ve,"sameOrigin");function C3o(t){return t.controller.state==="aborted"}a(C3o,"isAborted");function _3o(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(_3o,"isCancelled");function v3o(t){return YBo[t.toLowerCase()]??t}a(v3o,"normalizeMethod");var b3o=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Xmn(t,e,r=0,n=1){class o{static{a(this,"FastIterableIterator")}#e;#t;#n;constructor(c,l){this.#e=c,this.#t=l,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let c=this.#n,l=e(this.#e),u=l.length;if(c>=u)return{value:void 0,done:!0};let{[r]:d,[n]:p}=l[c];this.#n=c+1;let h;switch(this.#t){case"key":h=d;break;case"value":h=p;break;case"key+value":h=[d,p];break}return{value:h,done:!1}}}return delete o.prototype.constructor,Object.setPrototypeOf(o.prototype,b3o),Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(s,c){return new o(s,c)}}a(Xmn,"createIterator");function T3o(t,e,r,n=0,o=1){let s=Xmn(t,r,n,o),c={keys:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return q9.brandCheck(this,e),s(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return q9.brandCheck(this,e),s(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return q9.brandCheck(this,e),s(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:a(function(u,d=globalThis){if(q9.brandCheck(this,e),q9.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof u!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:p,1:h}of s(this,"key+value"))u.call(d,h,p,this)},"forEach")}};return Object.defineProperties(e.prototype,{...c,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:c.entries.value}})}a(T3o,"iteratorMixin");function S3o(t,e,r){let n=e,o=r;try{let s=t.stream.getReader();Zmn(s,n,o)}catch(s){o(s)}}a(S3o,"fullyReadBody");function I3o(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}a(I3o,"readableStreamClose");async function Zmn(t,e,r){try{let n=[],o=0;do{let{done:s,value:c}=await t.read();if(s){e(Buffer.concat(n,o));return}if(!KBo(c)){r(new TypeError("Received non-Uint8Array chunk"));return}n.push(c),o+=c.length}while(!0)}catch(n){r(n)}}a(Zmn,"readAllBytes");function egn(t){Vve("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}a(egn,"urlIsLocal");function sQt(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}a(sQt,"urlHasHttpsScheme");function tgn(t){Vve("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}a(tgn,"urlIsHttpHttpsScheme");function x3o(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&lW(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&lW(u=>u===" "||u===" ",r,n);let o=lW(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),s=o.length?Number(o):null;if(e&&lW(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&lW(u=>u===" "||u===" ",r,n);let c=lW(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),l=c.length?Number(c):null;return n.positionl?"failure":{rangeStartValue:s,rangeEndValue:l}}a(x3o,"simpleRangeHeaderValue");function w3o(t,e,r){let n="bytes ";return n+=iQt(`${t}`),n+="-",n+=iQt(`${e}`),n+="/",n+=iQt(`${r}`),n}a(w3o,"buildContentRange");var aQt=class extends qBo{static{a(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?jmn.createInflate(this.#e):jmn.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",o=>this.destroy(o))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function R3o(t){return new aQt(t)}a(R3o,"createInflate");function P3o(t){let e=null,r=null,n=null,o=rgn("content-type",t);if(o===null)return"failure";for(let s of o){let c=VBo(s);c==="failure"||c.essence==="*/*"||(n=c,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}a(P3o,"extractMimeType");function k3o(t){let e=t,r={position:0},n=[],o="";for(;r.positions!=='"'&&s!==",",e,r),r.positions===9||s===32),n.push(o),o=""}return n}a(k3o,"gettingDecodingSplitting");function rgn(t,e){let r=e.get(t,!0);return r===null?null:k3o(r)}a(rgn,"getDecodeSplit");function N3o(t){return!1}a(N3o,"hasAuthenticationEntry");function D3o(t){return!!(t.username||t.password)}a(D3o,"includesCredentials");function M3o(t){return!0}a(M3o,"isTraversableNavigable");var cQt=class{static{a(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return $mn()}get origin(){return this.baseUrl?.origin}policyContainer=Kmn()},lQt=class{static{a(this,"EnvironmentSettingsObject")}settingsObject=new cQt},O3o=new lQt;ngn.exports={isAborted:C3o,isCancelled:_3o,isValidEncodedURL:zmn,ReadableStreamFrom:zBo,tryUpgradeRequestToAPotentiallyTrustworthyURL:E3o,clampAndCoarsenConnectionTimingInfo:d3o,coarsenedSharedCurrentTime:f3o,determineRequestsReferrer:m3o,makePolicyContainer:Kmn,clonePolicyContainer:h3o,appendFetchMetadata:l3o,appendRequestOriginHeader:u3o,TAOCheck:c3o,corsCheck:a3o,crossOriginResourcePolicyCheck:s3o,createOpaqueTimingInfo:p3o,setRequestReferrerPolicyOnRedirect:o3o,isValidHTTPToken:Vmn,requestBadPort:e3o,requestCurrentURL:dW,responseURL:Wmn,responseLocationURL:XBo,isURLPotentiallyTrustworthy:uW,isValidReasonPhrase:r3o,sameOrigin:$ve,normalizeMethod:v3o,iteratorMixin:T3o,createIterator:Xmn,isValidHeaderName:n3o,isValidHeaderValue:Ymn,isErrorLike:t3o,fullyReadBody:S3o,readableStreamClose:I3o,urlIsLocal:egn,urlHasHttpsScheme:sQt,urlIsHttpHttpsScheme:tgn,readAllBytes:Zmn,simpleRangeHeaderValue:x3o,buildContentRange:w3o,createInflate:R3o,extractMimeType:P3o,getDecodeSplit:rgn,environmentSettingsObject:O3o,isOriginIPPotentiallyTrustworthy:Jmn,hasAuthenticationEntry:N3o,includesCredentials:D3o,isTraversableNavigable:M3o}});var cze=T((ZLu,ogn)=>{"use strict";f();var{iteratorMixin:B3o}=wv(),{kEnumerableProperty:Qse}=eo(),{webidl:La}=Qm(),ign=require("node:util"),v4=class t{static{a(this,"FormData")}#e=[];constructor(e=void 0){if(La.util.markAsUncloneable(this),e!==void 0)throw La.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]})}append(e,r,n=void 0){La.brandCheck(this,t);let o="FormData.append";La.argumentLengthCheck(arguments,2,o),e=La.converters.USVString(e),arguments.length===3||La.is.Blob(r)?(r=La.converters.Blob(r,o,"value"),n!==void 0&&(n=La.converters.USVString(n))):r=La.converters.USVString(r);let s=uQt(e,r,n);this.#e.push(s)}delete(e){La.brandCheck(this,t),La.argumentLengthCheck(arguments,1,"FormData.delete"),e=La.converters.USVString(e),this.#e=this.#e.filter(n=>n.name!==e)}get(e){La.brandCheck(this,t),La.argumentLengthCheck(arguments,1,"FormData.get"),e=La.converters.USVString(e);let n=this.#e.findIndex(o=>o.name===e);return n===-1?null:this.#e[n].value}getAll(e){return La.brandCheck(this,t),La.argumentLengthCheck(arguments,1,"FormData.getAll"),e=La.converters.USVString(e),this.#e.filter(n=>n.name===e).map(n=>n.value)}has(e){return La.brandCheck(this,t),La.argumentLengthCheck(arguments,1,"FormData.has"),e=La.converters.USVString(e),this.#e.findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){La.brandCheck(this,t);let o="FormData.set";La.argumentLengthCheck(arguments,2,o),e=La.converters.USVString(e),arguments.length===3||La.is.Blob(r)?(r=La.converters.Blob(r,o,"value"),n!==void 0&&(n=La.converters.USVString(n))):r=La.converters.USVString(r);let s=uQt(e,r,n),c=this.#e.findIndex(l=>l.name===e);c!==-1?this.#e=[...this.#e.slice(0,c),s,...this.#e.slice(c+1).filter(l=>l.name!==e)]:this.#e.push(s)}[ign.inspect.custom](e,r){let n=this.#e.reduce((s,c)=>(s[c.name]?Array.isArray(s[c.name])?s[c.name].push(c.value):s[c.name]=[s[c.name],c.value]:s[c.name]=c.value,s),{__proto__:null});r.depth??=e,r.colors??=!0;let o=ign.formatWithOptions(r,n);return`FormData ${o.slice(o.indexOf("]")+2)}`}static getFormDataState(e){return e.#e}static setFormDataState(e,r){e.#e=r}},{getFormDataState:L3o,setFormDataState:F3o}=v4;Reflect.deleteProperty(v4,"getFormDataState");Reflect.deleteProperty(v4,"setFormDataState");B3o("FormData",v4,L3o,"name","value");Object.defineProperties(v4.prototype,{append:Qse,delete:Qse,get:Qse,getAll:Qse,has:Qse,set:Qse,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function uQt(t,e,r){if(typeof e!="string"){if(La.is.File(e)||(e=new File([e],"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=new File([e],r,n)}}return{name:t,value:e}}a(uQt,"makeEntry");La.is.FormData=La.util.MakeTypeAssertion(v4);ogn.exports={FormData:v4,makeEntry:uQt,setFormDataState:F3o}});var cgn=T((r8u,agn)=>{"use strict";f();var{bufferToLowerCasedHeaderName:U3o}=eo(),{HTTP_TOKEN_CODEPOINTS:Q3o}=AS(),{makeEntry:q3o}=cze(),{webidl:dQt}=Qm(),fQt=require("node:assert"),{isomorphicDecode:sgn}=C4(),G3o=Buffer.from("--"),pQt=new TextDecoder,H3o=new TextDecoder("utf-8",{ignoreBOM:!0});function j3o(t){for(let e=0;e70)return!1;for(let r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}a($3o,"validateBoundary");function V3o(t,e){fQt(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)throw OC("missing boundary in content-type header");let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0},c=t.indexOf(n);if(c===-1)throw OC("no boundary found in multipart body");for(s.position=c;;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else throw OC("expected a value starting with -- and the boundary");if(Y3o(t,G3o,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)throw OC("expected CRLF");s.position+=2;let l=z3o(t,s),{name:u,filename:d,contentType:p,encoding:h}=l;s.position+=2;let m;{let A=t.indexOf(n.subarray(2),s.position);if(A===-1)throw OC("expected boundary after body");m=t.subarray(s.position,A-4),s.position+=m.length,h==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)throw OC("expected CRLF");s.position+=2;let g;d!==null?(p??="text/plain",j3o(p)||(p=""),g=new File([m],d,{type:p})):g=H3o.decode(Buffer.from(m)),fQt(dQt.is.USVString(u)),fQt(typeof g=="string"&&dQt.is.USVString(g)||dQt.is.File(g)),o.push(q3o(u,g,d))}}a(V3o,"multipartFormDataParser");function W3o(t,e){t[e.position]===59&&e.position++,yS(c=>c===32||c===9,t,e);let r=yS(c=>mQt(c)&&c!==61&&c!==42,t,e);if(r.length===0)return null;let n=r.toString("ascii").toLowerCase(),o=t[e.position]===42;if(o&&e.position++,t[e.position]!==61)return null;e.position++,yS(c=>c===32||c===9,t,e);let s;if(o){let c=yS(l=>l!==32&&l!==13&&l!==10&&l!==59,t,e);if(c[0]!==117&&c[0]!==85||c[1]!==116&&c[1]!==84||c[2]!==102&&c[2]!==70||c[3]!==45||c[4]!==56)throw OC("unknown encoding, expected utf-8''");s=decodeURIComponent(pQt.decode(c.subarray(7)))}else if(t[e.position]===34){e.position++;let c=yS(l=>l!==10&&l!==13&&l!==34,t,e);if(t[e.position]!==34)throw OC("Closing quote not found");e.position++,s=pQt.decode(c).replace(/%0A/ig,` -`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let c=yS(l=>mQt(l)&&l!==59,t,e);s=pQt.decode(c)}return{name:n,value:s}}a(W3o,"parseContentDispositionAttribute");function z3o(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw OC("header name is null");return{name:r,filename:n,contentType:o,encoding:s}}let c=yS(l=>l!==10&&l!==13&&l!==58,t,e);if(c=hQt(c,!0,!0,l=>l===9||l===32),!Q3o.test(c.toString()))throw OC("header name does not match the field-name token production");if(t[e.position]!==58)throw OC("expected :");switch(e.position++,yS(l=>l===32||l===9,t,e),U3o(c)){case"content-disposition":{if(r=n=null,yS(u=>mQt(u),t,e).toString("ascii").toLowerCase()!=="form-data")throw OC("expected form-data for content-disposition header");for(;e.positionu!==10&&u!==13,t,e);l=hQt(l,!1,!0,u=>u===9||u===32),o=sgn(l);break}case"content-transfer-encoding":{let l=yS(u=>u!==10&&u!==13,t,e);l=hQt(l,!1,!0,u=>u===9||u===32),s=sgn(l);break}default:yS(l=>l!==10&&l!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw OC("expected CRLF");e.position+=2}}a(z3o,"parseMultipartFormDataHeaders");function yS(t,e,r){let n=r.position;for(;n0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}a(hQt,"removeChars");function Y3o(t,e,r){if(t.length{"use strict";f();function X3o(){let t,e;return{promise:new Promise((n,o)=>{t=n,e=o}),resolve:t,reject:e}}a(X3o,"createDeferredPromise");lgn.exports={createDeferredPromise:X3o}});var Gse=T((c8u,hgn)=>{"use strict";f();var yQt=eo(),{ReadableStreamFrom:Z3o,readableStreamClose:eLo,fullyReadBody:tLo,extractMimeType:rLo}=wv(),{FormData:ugn,setFormDataState:nLo}=cze(),{webidl:Rw}=Qm(),gQt=require("node:assert"),{isErrored:AQt,isDisturbed:iLo}=require("node:stream"),{isUint8Array:oLo}=require("node:util/types"),{serializeAMimeType:sLo}=AS(),{multipartFormDataParser:aLo}=cgn(),{createDeferredPromise:cLo}=Wve(),{parseJSONFromBytes:lLo}=C4(),{utf8DecodeBytes:uLo}=rze(),{runtimeFeatures:dLo}=_4(),fLo=dLo.has("crypto")?require("node:crypto").randomInt:t=>Math.floor(Math.random()*t),lze=new TextEncoder;function pLo(){}a(pLo,"noop");var hLo=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!iLo(e)&&!AQt(e)&&e.cancel("Response object has been garbage collected").catch(pLo)});function fgn(t,e=!1){let r=null,n=null;Rw.is.ReadableStream(t)?r=t:Rw.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(d){n=d},cancel(){},type:"bytes"}),gQt(Rw.is.ReadableStream(r));let o=null,s=null,c=null,l=null;if(typeof t=="string")s=t,l="text/plain;charset=UTF-8";else if(Rw.is.URLSearchParams(t))s=t.toString(),l="application/x-www-form-urlencoded;charset=UTF-8";else if(Rw.is.BufferSource(t))s=Rw.util.getCopyOfBytesHeldByBufferSource(t);else if(Rw.is.FormData(t)){let d=`----formdata-undici-0${`${fLo(1e11)}`.padStart(11,"0")}`,p=`--${d}\r +`,s};$Ve.publicKeyToOpenSSH=function(t,e){var r="ssh-rsa";e=e||"";var n=b0.util.createBuffer();return zoe(n,r),s5(n,t.e),s5(n,t.n),r+" "+b0.util.encode64(n.bytes())+" "+e};$Ve.privateKeyToOpenSSH=function(t,e){return e?b0.pki.encryptRsaPrivateKey(t,e,{legacy:!0,algorithm:"aes128"}):b0.pki.privateKeyToPem(t)};$Ve.getPublicKeyFingerprint=function(t,e){e=e||{};var r=e.md||b0.md.md5.create(),n="ssh-rsa",o=b0.util.createBuffer();zoe(o,n),s5(o,t.e),s5(o,t.n),r.start(),r.update(o.getBytes());var s=r.digest();if(e.encoding==="hex"){var c=s.toHex();return e.delimiter?c.match(/.{2}/g).join(e.delimiter):c}else{if(e.encoding==="binary")return s.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return s};function s5(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var n=b0.util.hexToBytes(r);t.putInt32(n.length),t.putBytes(n)}a(s5,"_addBigIntegerToBuffer");function zoe(t,e){t.putInt32(e.length),t.putString(e)}a(zoe,"_addStringToBuffer");function jVe(){for(var t=b0.md.sha1.create(),e=arguments.length,r=0;r{f();Ihn.exports=wo();e9();Vpn();gw();mVe();C1e();uhn();Boe();hhn();yhn();_hn();R7t();IVe();nV();b7t();D7t();bhn();M7t();S7t();m7t();NVe();XT();y7t();Shn();Q7t();pa()});var Phn=T(dV=>{"use strict";f();Object.defineProperty(dV,"__esModule",{value:!0});dV.convert=dV.Format=void 0;var N1e=xhn(),l9;(function(t){t.der="der",t.pem="pem",t.txt="txt",t.asn1="asn1",t.x509="x509",t.fingerprint="fingerprint"})(l9=dV.Format||(dV.Format={}));function whn(t){var e=N1e.pki.pemToDer(t),r=N1e.asn1,n=r.fromDer(e.data.toString("binary")).value[0].value,o=n[0],s=o.tagClass===r.Class.CONTEXT_SPECIFIC&&o.type===0&&o.constructed,c=n.slice(s);return{serial:c[0],issuer:c[2],valid:c[3],subject:c[4]}}a(whn,"myASN");function mBo(t){var e=whn(t),r=e.subject.value.map(function(o){return o.value[0].value[1].value}).join("/"),n=e.valid.value.map(function(o){return o.value}).join(" - ");return["Subject ".concat(r),"Valid ".concat(n),String(t)].join(` +`)}a(mBo,"txtFormat");function Rhn(t,e){switch(e){case l9.der:return N1e.pki.pemToDer(t);case l9.pem:return t;case l9.txt:return mBo(t);case l9.asn1:return whn(t);case l9.fingerprint:var r=N1e.md.sha1.create(),n=Rhn(t,l9.der);return r.update(n.getBytes()),r.digest().toHex();case l9.x509:return N1e.pki.certificateFromPem(t);default:throw new Error("unknown format ".concat(e))}}a(Rhn,"convert");dV.convert=Rhn});var Bhn=T(C_=>{"use strict";f();var u9=C_&&C_.__assign||function(){return u9=Object.assign||function(t){for(var e,r=1,n=arguments.length;r"u"&&(s.ca=e),r.call(this,s)},"newAgent");return n.prototype=r.prototype,n})(nUt.Agent),(0,Dhn.setGlobalDispatcher)(new Dhn.Agent({connect:{ca:e}}))}},"addToGlobalAgent");C_.addToGlobalAgent=ABo});var Lhn=T((B8u,iUt)=>{f();function yBo(){let{X509Certificate:t}=require("crypto"),{join:e}=require("path");var r=typeof __webpack_require__=="function"?__non_webpack_require__:require;let n=process.arch==="arm64"?"crypt32-arm64.node":"crypt32.node",o=r(e(__dirname,n)),s=[],c=new o.Crypt32;try{let l;for(;l=c.next();){let u=new t(l);s.push(u.toString())}}finally{c.done()}return Array.from(new Set(s))}a(yBo,"all");process.platform!=="win32"?iUt.exports.all=()=>[]:iUt.exports.all=yBo});var rc=T((H8u,Hhn)=>{"use strict";f();Hhn.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kHTTP2InitialWindowSize:Symbol("http2 initial window size"),kHTTP2ConnectionWindowSize:Symbol("http2 connection window size"),kEnableConnectProtocol:Symbol("http2session connect protocol"),kRemoteSettings:Symbol("http2session remote settings"),kHTTP2Stream:Symbol("http2session client stream"),kPingInterval:Symbol("ping interval"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent"),kSocks5ProxyAgent:Symbol("socks5 proxy agent")}});var EUt=T(($8u,Whn)=>{"use strict";f();var Koe=0,pUt=1e3,hUt=(pUt>>1)-1,d9,mUt=Symbol("kFastTimer"),tO=[],gUt=-2,AUt=-1,$hn=0,jhn=1;function yUt(){Koe+=hUt;let t=0,e=tO.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=AUt,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===AUt?(r._state=gUt,--e!==0&&(tO[t]=tO[e])):++t}tO.length=e,tO.length!==0&&Vhn()}a(yUt,"onTick");function Vhn(){d9?.refresh?d9.refresh():(clearTimeout(d9),d9=setTimeout(yUt,hUt),d9?.unref())}a(Vhn,"refreshTimeout");var JVe=class{static{a(this,"FastTimer")}[mUt]=!0;_state=gUt;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===gUt&&tO.push(this),(!d9||tO.length===1)&&Vhn(),this._state=$hn}clear(){this._state=AUt,this._idleStart=-1}};Whn.exports={setTimeout(t,e,r){return e<=pUt?setTimeout(t,e,r):new JVe(t,e,r)},clearTimeout(t){t[mUt]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new JVe(t,e,r)},clearFastTimeout(t){t.clear()},now(){return Koe},tick(t=0){Koe+=t-pUt+1,yUt(),yUt()},reset(){Koe=0,tO.length=0,clearTimeout(d9),d9=null},kFastTimer:mUt}});var Ni=T((z8u,ymn)=>{"use strict";f();var zhn=Symbol.for("undici.error.UND_ERR"),Kl=class extends Error{static{a(this,"UndiciError")}constructor(e,r){super(e,r),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[zhn]===!0}get[zhn](){return!0}},Yhn=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),_Ut=class extends Kl{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Yhn]===!0}get[Yhn](){return!0}},Khn=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),CUt=class extends Kl{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Khn]===!0}get[Khn](){return!0}},Jhn=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),vUt=class extends Kl{static{a(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Jhn]===!0}get[Jhn](){return!0}},Xhn=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),bUt=class extends Kl{static{a(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Xhn]===!0}get[Xhn](){return!0}},Zhn=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),TUt=class extends Kl{static{a(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[Zhn]===!0}get[Zhn](){return!0}},emn=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),SUt=class extends Kl{static{a(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[emn]===!0}get[emn](){return!0}},tmn=Symbol.for("undici.error.UND_ERR_ABORT"),XVe=class extends Kl{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[tmn]===!0}get[tmn](){return!0}},rmn=Symbol.for("undici.error.UND_ERR_ABORTED"),IUt=class extends XVe{static{a(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[rmn]===!0}get[rmn](){return!0}},nmn=Symbol.for("undici.error.UND_ERR_INFO"),xUt=class extends Kl{static{a(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[nmn]===!0}get[nmn](){return!0}},imn=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),wUt=class extends Kl{static{a(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[imn]===!0}get[imn](){return!0}},omn=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),RUt=class extends Kl{static{a(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[omn]===!0}get[omn](){return!0}},smn=Symbol.for("undici.error.UND_ERR_DESTROYED"),PUt=class extends Kl{static{a(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[smn]===!0}get[smn](){return!0}},amn=Symbol.for("undici.error.UND_ERR_CLOSED"),kUt=class extends Kl{static{a(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[amn]===!0}get[amn](){return!0}},cmn=Symbol.for("undici.error.UND_ERR_SOCKET"),DUt=class extends Kl{static{a(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[cmn]===!0}get[cmn](){return!0}},lmn=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),NUt=class extends Kl{static{a(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[lmn]===!0}get[lmn](){return!0}},umn=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),MUt=class extends Kl{static{a(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[umn]===!0}get[umn](){return!0}},dmn=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),OUt=class extends Error{static{a(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[dmn]===!0}get[dmn](){return!0}},fmn=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),BUt=class extends Kl{static{a(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[fmn]===!0}get[fmn](){return!0}},pmn=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),LUt=class extends Kl{static{a(this,"RequestRetryError")}constructor(e,r,{headers:n,data:o}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[pmn]===!0}get[pmn](){return!0}},hmn=Symbol.for("undici.error.UND_ERR_RESPONSE"),FUt=class extends Kl{static{a(this,"ResponseError")}constructor(e,r,{headers:n,body:o}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.body=o,this.headers=n}static[Symbol.hasInstance](e){return e&&e[hmn]===!0}get[hmn](){return!0}},mmn=Symbol.for("undici.error.UND_ERR_PRX_TLS"),UUt=class extends Kl{static{a(this,"SecureProxyConnectionError")}constructor(e,r,n={}){super(r,{cause:e,...n}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[mmn]===!0}get[mmn](){return!0}},gmn=Symbol.for("undici.error.UND_ERR_MAX_ORIGINS_REACHED"),QUt=class extends Kl{static{a(this,"MaxOriginsReachedError")}constructor(e){super(e),this.name="MaxOriginsReachedError",this.message=e||"Maximum allowed origins reached",this.code="UND_ERR_MAX_ORIGINS_REACHED"}static[Symbol.hasInstance](e){return e&&e[gmn]===!0}get[gmn](){return!0}},qUt=class extends Kl{static{a(this,"Socks5ProxyError")}constructor(e,r){super(e),this.name="Socks5ProxyError",this.message=e||"SOCKS5 proxy error",this.code=r||"UND_ERR_SOCKS5"}},Amn=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),GUt=class extends Kl{static{a(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[Amn]===!0}get[Amn](){return!0}};ymn.exports={AbortError:XVe,HTTPParserError:OUt,UndiciError:Kl,HeadersTimeoutError:CUt,HeadersOverflowError:vUt,BodyTimeoutError:bUt,RequestContentLengthMismatchError:wUt,ConnectTimeoutError:_Ut,InvalidArgumentError:TUt,InvalidReturnValueError:SUt,RequestAbortedError:IUt,ClientDestroyedError:PUt,ClientClosedError:kUt,InformationalError:xUt,SocketError:DUt,NotSupportedError:NUt,ResponseContentLengthMismatchError:RUt,BalancedPoolMissingUpstreamError:MUt,ResponseExceededMaxSizeError:BUt,RequestRetryError:LUt,ResponseError:FUt,SecureProxyConnectionError:UUt,MaxOriginsReachedError:QUt,Socks5ProxyError:qUt,MessageSizeExceededError:GUt}});var eWe=T((J8u,_mn)=>{"use strict";f();var HUt=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"],ZVe={};Object.setPrototypeOf(ZVe,null);var Emn={};Object.setPrototypeOf(Emn,null);function _Bo(t){let e=Emn[t];return e===void 0&&(e=Buffer.from(t)),e}a(_Bo,"getHeaderNameAsBuffer");for(let t=0;t{"use strict";f();var{wellknownHeaderNames:Cmn,headerNameLowerCasedRecord:CBo}=eWe(),jUt=class t{static{a(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let o=0,s=this;for(;;){let c=e.charCodeAt(o);if(c>127)throw new TypeError("key must be ascii string");if(s.code===c)if(n===++o){s.value=r;break}else if(s.middle!==null)s=s.middle;else{s.middle=new t(e,r,o);break}else if(s.code=65&&(s|=32);o!==null;){if(s===o.code){if(r===++n)return o;o=o.middle;break}o=o.code{"use strict";f();var M1e=require("node:assert"),{kDestroyed:wmn,kBodyUsed:Joe,kListeners:nWe,kBody:Smn}=rc(),{IncomingMessage:vBo}=require("node:http"),Rmn=require("node:stream"),bBo=require("node:net"),{stringify:TBo}=require("node:querystring"),{EventEmitter:SBo}=require("node:events"),rWe=EUt(),{InvalidArgumentError:Ih,ConnectTimeoutError:IBo}=Ni(),{headerNameLowerCasedRecord:xBo}=eWe(),{tree:Pmn}=Tmn(),[wBo,RBo]=process.versions.node.split(".",2).map(t=>Number(t)),oWe=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[Smn]=e,this[Joe]=!1}async*[Symbol.asyncIterator](){M1e(!this[Joe],"disturbed"),this[Joe]=!0,yield*this[Smn]}};function Imn(){}a(Imn,"noop");function PBo(t){return sWe(t)?(Bmn(t)===0&&t.on("data",function(){M1e(!1)}),typeof t.readableDidRead!="boolean"&&(t[Joe]=!1,SBo.prototype.on.call(t,"data",function(){this[Joe]=!0})),t):t&&typeof t.pipeTo=="function"?new oWe(t):t&&qmn(t)?t:t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&Omn(t)?new oWe(t):t}a(PBo,"wrapRequestBody");function sWe(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}a(sWe,"isStream");function kmn(t){if(t===null)return!1;if(t instanceof Blob)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}a(kmn,"isBlobLike");function Dmn(t){return t.includes("?")||t.includes("#")}a(Dmn,"pathHasQueryOrFragment");function kBo(t,e){if(Dmn(t))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=TBo(e);return r&&(t+="?"+r),t}a(kBo,"serializePathWithQuery");function Nmn(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}a(Nmn,"isValidPort");function iWe(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}a(iWe,"isHttpOrHttpsPrefixed");function Mmn(t){if(typeof t=="string"){if(t=new URL(t),!iWe(t.origin||t.protocol))throw new Ih("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new Ih("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&Nmn(t.port)===!1)throw new Ih("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new Ih("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new Ih("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new Ih("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new Ih("Invalid URL origin: the origin must be a string or null/undefined.");if(!iWe(t.origin||t.protocol))throw new Ih("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!iWe(t.origin||t.protocol))throw new Ih("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}a(Mmn,"parseURL");function DBo(t){if(t=Mmn(t),t.pathname!=="/"||t.search||t.hash)throw new Ih("invalid url");return t}a(DBo,"parseOrigin");function NBo(t){if(t[0]==="["){let r=t.indexOf("]");return M1e(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}a(NBo,"getHostname");function MBo(t){if(!t)return null;M1e(typeof t=="string");let e=NBo(t);return bBo.isIP(e)?"":e}a(MBo,"getServerName");function OBo(t){return JSON.parse(JSON.stringify(t))}a(OBo,"deepClone");function BBo(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}a(BBo,"isAsyncIterable");function Omn(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}a(Omn,"isIterable");function LBo(t){let e=Object.getPrototypeOf(t);return Object.prototype.hasOwnProperty.call(t,Symbol.iterator)||e!=null&&e!==Object.prototype&&typeof t[Symbol.iterator]=="function"}a(LBo,"hasSafeIterator");function Bmn(t){if(t==null)return 0;if(sWe(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(kmn(t))return t.size!=null?t.size:null;if(Qmn(t))return t.byteLength}return null}a(Bmn,"bodyLength");function Lmn(t){return t&&!!(t.destroyed||t[wmn]||Rmn.isDestroyed?.(t))}a(Lmn,"isDestroyed");function Fmn(t,e){t==null||!sWe(t)||Lmn(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===vBo&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[wmn]=!0))}a(Fmn,"destroy");var FBo=/timeout=(\d+)/;function UBo(t){let e=t.match(FBo);return e?parseInt(e[1],10)*1e3:null}a(UBo,"parseKeepAliveTimeout");function Umn(t){return typeof t=="string"?xBo[t]??t.toLowerCase():Pmn.lookup(t)??t.toString("latin1").toLowerCase()}a(Umn,"headerNameToString");function QBo(t){return Pmn.lookup(t)??t.toString("latin1").toLowerCase()}a(QBo,"bufferToLowerCasedHeaderName");function qBo(t,e){e===void 0&&(e={});for(let r=0;rc.toString("latin1")):t[r+1].toString("latin1");n==="__proto__"?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s}else{let s=typeof t[r+1]=="string"?t[r+1]:Array.isArray(t[r+1])?t[r+1].map(c=>c.toString("latin1")):t[r+1].toString("latin1");e[n]=s}}return e}a(qBo,"parseHeaders");function GBo(t){let e=t.length,r=new Array(e),n,o;for(let s=0;sBuffer.from(e))}a(HBo,"encodeRawHeaders");function Qmn(t){return t instanceof Uint8Array||Buffer.isBuffer(t)}a(Qmn,"isBuffer");function jBo(t,e,r){if(!t||typeof t!="object")throw new Ih("handler must be an object");if(typeof t.onRequestStart!="function"){if(typeof t.onConnect!="function")throw new Ih("invalid onConnect method");if(typeof t.onError!="function")throw new Ih("invalid onError method");if(typeof t.onBodySent!="function"&&t.onBodySent!==void 0)throw new Ih("invalid onBodySent method");if(r||e==="CONNECT"){if(typeof t.onUpgrade!="function")throw new Ih("invalid onUpgrade method")}else{if(typeof t.onHeaders!="function")throw new Ih("invalid onHeaders method");if(typeof t.onData!="function")throw new Ih("invalid onData method");if(typeof t.onComplete!="function")throw new Ih("invalid onComplete method")}}}a(jBo,"assertRequestHandler");function $Bo(t){return!!(t&&(Rmn.isDisturbed(t)||t[Joe]))}a($Bo,"isDisturbed");function VBo(t){return{localAddress:t.localAddress,localPort:t.localPort,remoteAddress:t.remoteAddress,remotePort:t.remotePort,remoteFamily:t.remoteFamily,timeout:t.timeout,bytesWritten:t.bytesWritten,bytesRead:t.bytesRead}}a(VBo,"getSocketInfo");function WBo(t){let e;return new ReadableStream({start(){e=t[Symbol.asyncIterator]()},pull(r){return e.next().then(({done:n,value:o})=>{if(n)return queueMicrotask(()=>{r.close(),r.byobRequest?.respond(0)});{let s=Buffer.isBuffer(o)?o:Buffer.from(o);return s.byteLength?r.enqueue(new Uint8Array(s)):this.pull(r)}})},cancel(){return e.return()},type:"bytes"})}a(WBo,"ReadableStreamFrom");function qmn(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}a(qmn,"isFormDataLike");function zBo(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.once("abort",e),()=>t.removeListener("abort",e))}a(zBo,"addAbortListener");var Gmn=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function YBo(t){return Gmn[t]===1}a(YBo,"isTokenCharCode");var KBo=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;function JBo(t){if(t.length>=12)return KBo.test(t);if(t.length===0)return!1;for(let e=0;e{if(!e.timeout)return Imn;let r=null,n=null,o=rWe.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>xmn(t.deref(),e))})},e.timeout);return()=>{rWe.clearFastTimeout(o),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return Imn;let r=null,n=rWe.setFastTimeout(()=>{r=setImmediate(()=>{xmn(t.deref(),e)})},e.timeout);return()=>{rWe.clearFastTimeout(n),clearImmediate(r)}};function xmn(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,Fmn(t,new IBo(r))}a(xmn,"onConnectTimeout");function s3o(t){if(t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p")switch(t[4]){case":":return"http:";case"s":if(t[5]===":")return"https:"}return t.slice(0,t.indexOf(":")+1)}a(s3o,"getProtocolFromUrlString");var Hmn=Object.create(null);Hmn.enumerable=!0;var $Ut={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},jmn={...$Ut,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf($Ut,null);Object.setPrototypeOf(jmn,null);$mn.exports={kEnumerableProperty:Hmn,isDisturbed:$Bo,isBlobLike:kmn,parseOrigin:DBo,parseURL:Mmn,getServerName:MBo,isStream:sWe,isIterable:Omn,hasSafeIterator:LBo,isAsyncIterable:BBo,isDestroyed:Lmn,headerNameToString:Umn,bufferToLowerCasedHeaderName:QBo,addListener:r3o,removeAllListeners:n3o,errorRequest:i3o,parseRawHeaders:GBo,encodeRawHeaders:HBo,parseHeaders:qBo,parseKeepAliveTimeout:UBo,destroy:Fmn,bodyLength:Bmn,deepClone:OBo,ReadableStreamFrom:WBo,isBuffer:Qmn,assertRequestHandler:jBo,getSocketInfo:VBo,isFormDataLike:qmn,pathHasQueryOrFragment:Dmn,serializePathWithQuery:kBo,addAbortListener:zBo,isValidHTTPToken:JBo,isValidHeaderValue:ZBo,isTokenCharCode:YBo,parseRangeHeader:t3o,normalizedMethodRecordsBase:$Ut,normalizedMethodRecords:jmn,isValidPort:Nmn,isHttpOrHttpsPrefixed:iWe,nodeMajor:wBo,nodeMinor:RBo,safeHTTPMethods:Object.freeze(["GET","HEAD","OPTIONS","TRACE"]),wrapRequestBody:PBo,setupConnectTimeout:o3o,getProtocolFromUrlString:s3o}});var zUt=T((s6u,Kmn)=>{"use strict";f();var{kConnected:Vmn,kPending:Wmn,kRunning:zmn,kSize:Ymn,kFree:a3o,kQueued:c3o}=rc(),VUt=class{static{a(this,"ClientStats")}constructor(e){this.connected=e[Vmn],this.pending=e[Wmn],this.running=e[zmn],this.size=e[Ymn]}},WUt=class{static{a(this,"PoolStats")}constructor(e){this.connected=e[Vmn],this.free=e[a3o],this.pending=e[Wmn],this.queued=e[c3o],this.running=e[zmn],this.size=e[Ymn]}};Kmn.exports={ClientStats:VUt,PoolStats:WUt}});var f9=T((l6u,Xmn)=>{"use strict";f();var nc=require("node:diagnostics_channel"),XUt=require("node:util"),fV=XUt.debuglog("undici"),O1e=XUt.debuglog("fetch"),aWe=XUt.debuglog("websocket"),pv={beforeConnect:nc.channel("undici:client:beforeConnect"),connected:nc.channel("undici:client:connected"),connectError:nc.channel("undici:client:connectError"),sendHeaders:nc.channel("undici:client:sendHeaders"),create:nc.channel("undici:request:create"),bodySent:nc.channel("undici:request:bodySent"),bodyChunkSent:nc.channel("undici:request:bodyChunkSent"),bodyChunkReceived:nc.channel("undici:request:bodyChunkReceived"),headers:nc.channel("undici:request:headers"),trailers:nc.channel("undici:request:trailers"),error:nc.channel("undici:request:error"),open:nc.channel("undici:websocket:open"),close:nc.channel("undici:websocket:close"),socketError:nc.channel("undici:websocket:socket_error"),ping:nc.channel("undici:websocket:ping"),pong:nc.channel("undici:websocket:pong"),proxyConnected:nc.channel("undici:proxy:connected")},YUt=!1;function Jmn(t=fV){if(!YUt){if(pv.beforeConnect.hasSubscribers||pv.connected.hasSubscribers||pv.connectError.hasSubscribers||pv.sendHeaders.hasSubscribers){YUt=!0;return}YUt=!0,nc.subscribe("undici:client:beforeConnect",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connecting to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),nc.subscribe("undici:client:connected",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s}}=e;t("connected to %s%s using %s%s",s,o?`:${o}`:"",n,r)}),nc.subscribe("undici:client:connectError",e=>{let{connectParams:{version:r,protocol:n,port:o,host:s},error:c}=e;t("connection to %s%s using %s%s errored - %s",s,o?`:${o}`:"",n,r,c.message)}),nc.subscribe("undici:client:sendHeaders",e=>{let{request:{method:r,path:n,origin:o}}=e;t("sending request to %s %s%s",r,o,n)})}}a(Jmn,"trackClientEvents");var KUt=!1;function l3o(t=fV){if(!KUt){if(pv.headers.hasSubscribers||pv.trailers.hasSubscribers||pv.error.hasSubscribers){KUt=!0;return}KUt=!0,nc.subscribe("undici:request:headers",e=>{let{request:{method:r,path:n,origin:o},response:{statusCode:s}}=e;t("received response to %s %s%s - HTTP %d",r,o,n,s)}),nc.subscribe("undici:request:trailers",e=>{let{request:{method:r,path:n,origin:o}}=e;t("trailers received from %s %s%s",r,o,n)}),nc.subscribe("undici:request:error",e=>{let{request:{method:r,path:n,origin:o},error:s}=e;t("request to %s %s%s errored - %s",r,o,n,s.message)})}}a(l3o,"trackRequestEvents");var JUt=!1;function u3o(t=aWe){if(!JUt){if(pv.open.hasSubscribers||pv.close.hasSubscribers||pv.socketError.hasSubscribers||pv.ping.hasSubscribers||pv.pong.hasSubscribers){JUt=!0;return}JUt=!0,nc.subscribe("undici:websocket:open",e=>{if(e.address!=null){let{address:r,port:n}=e.address;t("connection opened %s%s",r,n?`:${n}`:"")}else t("connection opened")}),nc.subscribe("undici:websocket:close",e=>{let{websocket:r,code:n,reason:o}=e;t("closed connection to %s - %s %s",r.url,n,o)}),nc.subscribe("undici:websocket:socket_error",e=>{t("connection errored - %s",e.message)}),nc.subscribe("undici:websocket:ping",e=>{t("ping received")}),nc.subscribe("undici:websocket:pong",e=>{t("pong received")})}}a(u3o,"trackWebSocketEvents");(fV.enabled||O1e.enabled)&&(Jmn(O1e.enabled?O1e:fV),l3o(O1e.enabled?O1e:fV));aWe.enabled&&(Jmn(fV.enabled?fV:aWe),u3o(aWe));Xmn.exports={channels:pv}});var tgn=T((f6u,egn)=>{"use strict";f();var{InvalidArgumentError:Qa,NotSupportedError:d3o}=Ni(),a5=require("node:assert"),{isValidHTTPToken:ZUt,isValidHeaderValue:eQt,isStream:f3o,destroy:p3o,isBuffer:h3o,isFormDataLike:m3o,isIterable:g3o,hasSafeIterator:A3o,isBlobLike:y3o,serializePathWithQuery:E3o,assertRequestHandler:_3o,getServerName:C3o,normalizedMethodRecords:v3o,getProtocolFromUrlString:b3o}=Ki(),{channels:v_}=f9(),{headerNameLowerCasedRecord:Zmn}=eWe(),T3o=/[^\u0021-\u00ff]/,iS=Symbol("handler"),tQt=class{static{a(this,"Request")}constructor(e,{path:r,method:n,body:o,headers:s,query:c,idempotent:l,blocking:u,upgrade:d,headersTimeout:p,bodyTimeout:h,reset:m,expectContinue:g,servername:A,throwOnError:y,maxRedirections:E,typeOfService:_},v){if(typeof r!="string")throw new Qa("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new Qa("path must be an absolute URL or start with a slash");if(T3o.test(r))throw new Qa("invalid request path");if(typeof n!="string")throw new Qa("method must be a string");if(v3o[n]===void 0&&!ZUt(n))throw new Qa("invalid request method");if(d&&typeof d!="string")throw new Qa("upgrade must be a string");if(d&&!eQt(d))throw new Qa("invalid upgrade header");if(p!=null&&(!Number.isFinite(p)||p<0))throw new Qa("invalid headersTimeout");if(h!=null&&(!Number.isFinite(h)||h<0))throw new Qa("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new Qa("invalid reset");if(g!=null&&typeof g!="boolean")throw new Qa("invalid expectContinue");if(y!=null)throw new Qa("invalid throwOnError");if(E!=null&&E!==0)throw new Qa("maxRedirections is not supported, use the redirect interceptor");if(_!=null&&(!Number.isInteger(_)||_<0||_>255))throw new Qa("typeOfService must be an integer between 0 and 255");if(this.headersTimeout=p,this.bodyTimeout=h,this.method=n,this.typeOfService=_??0,this.abort=null,o==null)this.body=null;else if(f3o(o)){this.body=o;let b=this.body._readableState;(!b||!b.autoDestroy)&&(this.endHandler=a(function(){p3o(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=I=>{this.abort?this.abort(I):this.error=I},this.body.on("error",this.errorHandler)}else if(h3o(o))this.body=o.byteLength?o:null;else if(ArrayBuffer.isView(o))this.body=o.buffer.byteLength?Buffer.from(o.buffer,o.byteOffset,o.byteLength):null;else if(o instanceof ArrayBuffer)this.body=o.byteLength?Buffer.from(o):null;else if(typeof o=="string")this.body=o.length?Buffer.from(o):null;else if(m3o(o)||g3o(o)||y3o(o))this.body=o;else throw new Qa("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=d||null,this.path=c?E3o(r,c):r,this.origin=e,this.protocol=b3o(e),this.idempotent=l??(n==="HEAD"||n==="GET"),this.blocking=u??this.method!=="HEAD",this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=g??!1,Array.isArray(s)){if(s.length%2!==0)throw new Qa("headers array must be even");for(let b=0;b{"use strict";f();var{InvalidArgumentError:S3o}=Ni();ngn.exports=class rgn{static{a(this,"WrapHandler")}#e;constructor(e){this.#e=e}static wrap(e){return e.onRequestStart?e:new rgn(e)}onConnect(e,r){return this.#e.onConnect?.(e,r)}onResponseStarted(){return this.#e.onResponseStarted?.()}onHeaders(e,r,n,o){return this.#e.onHeaders?.(e,r,n,o)}onUpgrade(e,r,n){return this.#e.onUpgrade?.(e,r,n)}onData(e){return this.#e.onData?.(e)}onComplete(e){return this.#e.onComplete?.(e)}onError(e){if(!this.#e.onError)throw e;return this.#e.onError?.(e)}onRequestStart(e,r){this.#e.onConnect?.(n=>e.abort(n),r)}onRequestUpgrade(e,r,n,o){let s=[];for(let[c,l]of Object.entries(n))s.push(Buffer.from(c,"latin1"),rQt(l));this.#e.onUpgrade?.(r,s,o)}onResponseStart(e,r,n,o){let s=[];for(let[c,l]of Object.entries(n))s.push(Buffer.from(c,"latin1"),rQt(l));this.#e.onHeaders?.(r,s,()=>e.resume(),o)===!1&&e.pause()}onResponseData(e,r){this.#e.onData?.(r)===!1&&e.pause()}onResponseEnd(e,r){let n=[];for(let[o,s]of Object.entries(r))n.push(Buffer.from(o,"latin1"),rQt(s));this.#e.onComplete?.(n)}onResponseError(e,r){if(!this.#e.onError)throw new S3o("invalid onError method");this.#e.onError?.(r)}};function rQt(t){return Array.isArray(t)?t.map(e=>Buffer.from(e,"latin1")):Buffer.from(t,"latin1")}a(rQt,"toRawHeaderValue")});var L1e=T((y6u,ign)=>{"use strict";f();var I3o=require("node:events"),x3o=B1e(),w3o=a(t=>(e,r)=>t(e,x3o.wrap(r)),"wrapInterceptor"),nQt=class extends I3o{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let o of r)if(o!=null){if(typeof o!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof o}`);if(n=o(n),n=w3o(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new Proxy(this,{get:a((o,s)=>s==="dispatch"?n:o[s],"get")})}};ign.exports=nQt});var agn=T((C6u,sgn)=>{"use strict";f();var{parseHeaders:iQt}=Ki(),{InvalidArgumentError:R3o}=Ni(),oQt=Symbol("resume"),sQt=class{static{a(this,"UnwrapController")}#e=!1;#t=null;#n=!1;#r;[oQt]=null;constructor(e){this.#r=e}pause(){this.#e=!0}resume(){this.#e&&(this.#e=!1,this[oQt]?.())}abort(e){this.#n||(this.#n=!0,this.#t=e,this.#r(e))}get aborted(){return this.#n}get reason(){return this.#t}get paused(){return this.#e}};sgn.exports=class ogn{static{a(this,"UnwrapHandler")}#e;#t;constructor(e){this.#e=e}static unwrap(e){return e.onRequestStart?new ogn(e):e}onConnect(e,r){this.#t=new sQt(e),this.#e.onRequestStart?.(this.#t,r)}onResponseStarted(){return this.#e.onResponseStarted?.()}onUpgrade(e,r,n){this.#e.onRequestUpgrade?.(this.#t,e,iQt(r),n)}onHeaders(e,r,n,o){return this.#t[oQt]=n,this.#e.onResponseStart?.(this.#t,e,iQt(r),o),!this.#t.paused}onData(e){return this.#e.onResponseData?.(this.#t,e),!this.#t.paused}onComplete(e){this.#e.onResponseEnd?.(this.#t,iQt(e))}onError(e){if(!this.#e.onResponseError)throw new R3o("invalid onError method");this.#e.onResponseError?.(this.#t,e)}}});var hV=T((T6u,cgn)=>{"use strict";f();var P3o=L1e(),k3o=agn(),{ClientDestroyedError:aQt,ClientClosedError:D3o,InvalidArgumentError:lWe}=Ni(),{kDestroy:N3o,kClose:M3o,kClosed:F1e,kDestroyed:Xoe,kDispatch:O3o}=rc(),p9=Symbol("onDestroyed"),pV=Symbol("onClosed"),cQt=class extends P3o{static{a(this,"DispatcherBase")}[Xoe]=!1;[p9]=null;[F1e]=!1;[pV]=null;get destroyed(){return this[Xoe]}get closed(){return this[F1e]}close(e){if(e===void 0)return new Promise((n,o)=>{this.close((s,c)=>s?o(s):n(c))});if(typeof e!="function")throw new lWe("invalid callback");if(this[Xoe]){let n=new aQt;queueMicrotask(()=>e(n,null));return}if(this[F1e]){this[pV]?this[pV].push(e):queueMicrotask(()=>e(null,null));return}this[F1e]=!0,this[pV]??=[],this[pV].push(e);let r=a(()=>{let n=this[pV];this[pV]=null;for(let o=0;othis.destroy()).then(()=>queueMicrotask(r))}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((o,s)=>{this.destroy(e,(c,l)=>c?s(c):o(l))});if(typeof r!="function")throw new lWe("invalid callback");if(this[Xoe]){this[p9]?this[p9].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new aQt),this[Xoe]=!0,this[p9]??=[],this[p9].push(r);let n=a(()=>{let o=this[p9];this[p9]=null;for(let s=0;squeueMicrotask(n))}dispatch(e,r){if(!r||typeof r!="object")throw new lWe("handler must be an object");r=k3o.unwrap(r);try{if(!e||typeof e!="object")throw new lWe("opts must be an object.");if(this[Xoe]||this[p9])throw new aQt;if(this[F1e])throw new D3o;return this[O3o](e,r)}catch(n){if(typeof r.onError!="function")throw n;return r.onError(n),!1}}};cgn.exports=cQt});var mV=T((w6u,dgn)=>{"use strict";f();var B3o=require("node:net"),lgn=require("node:assert"),ugn=Ki(),{InvalidArgumentError:L3o}=Ni(),lQt,F3o=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new FinalizationRegistry(r=>{if(this._sessionCache.size{"use strict";f();Object.defineProperty(uQt,"__esModule",{value:!0});uQt.enumToMap=Q3o;function Q3o(t,e=[],r=[]){let n=(e?.length??0)===0,o=(r?.length??0)===0;return Object.fromEntries(Object.entries(t).filter(([,s])=>typeof s=="number"&&(n||e.includes(s))&&(o||!r.includes(s))))}a(Q3o,"enumToMap")});var pgn=T(Ce=>{"use strict";f();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SPECIAL_HEADERS=Ce.MINOR=Ce.MAJOR=Ce.HTAB_SP_VCHAR_OBS_TEXT=Ce.QUOTED_STRING=Ce.CONNECTION_TOKEN_CHARS=Ce.HEADER_CHARS=Ce.TOKEN=Ce.HEX=Ce.URL_CHAR=Ce.USERINFO_CHARS=Ce.MARK=Ce.ALPHANUM=Ce.NUM=Ce.HEX_MAP=Ce.NUM_MAP=Ce.ALPHA=Ce.STATUSES_HTTP=Ce.H_METHOD_MAP=Ce.METHOD_MAP=Ce.METHODS_RTSP=Ce.METHODS_ICE=Ce.METHODS_HTTP=Ce.HEADER_STATE=Ce.FINISH=Ce.STATUSES=Ce.METHODS=Ce.LENIENT_FLAGS=Ce.FLAGS=Ce.TYPE=Ce.ERROR=void 0;var q3o=fgn();Ce.ERROR={OK:0,INTERNAL:1,STRICT:2,CR_EXPECTED:25,LF_EXPECTED:3,UNEXPECTED_CONTENT_LENGTH:4,UNEXPECTED_SPACE:30,CLOSED_CONNECTION:5,INVALID_METHOD:6,INVALID_URL:7,INVALID_CONSTANT:8,INVALID_VERSION:9,INVALID_HEADER_TOKEN:10,INVALID_CONTENT_LENGTH:11,INVALID_CHUNK_SIZE:12,INVALID_STATUS:13,INVALID_EOF_STATE:14,INVALID_TRANSFER_ENCODING:15,CB_MESSAGE_BEGIN:16,CB_HEADERS_COMPLETE:17,CB_MESSAGE_COMPLETE:18,CB_CHUNK_HEADER:19,CB_CHUNK_COMPLETE:20,PAUSED:21,PAUSED_UPGRADE:22,PAUSED_H2_UPGRADE:23,USER:24,CB_URL_COMPLETE:26,CB_STATUS_COMPLETE:27,CB_METHOD_COMPLETE:32,CB_VERSION_COMPLETE:33,CB_HEADER_FIELD_COMPLETE:28,CB_HEADER_VALUE_COMPLETE:29,CB_CHUNK_EXTENSION_NAME_COMPLETE:34,CB_CHUNK_EXTENSION_VALUE_COMPLETE:35,CB_RESET:31,CB_PROTOCOL_COMPLETE:38};Ce.TYPE={BOTH:0,REQUEST:1,RESPONSE:2};Ce.FLAGS={CONNECTION_KEEP_ALIVE:1,CONNECTION_CLOSE:2,CONNECTION_UPGRADE:4,CHUNKED:8,UPGRADE:16,CONTENT_LENGTH:32,SKIPBODY:64,TRAILING:128,TRANSFER_ENCODING:512};Ce.LENIENT_FLAGS={HEADERS:1,CHUNKED_LENGTH:2,KEEP_ALIVE:4,TRANSFER_ENCODING:8,VERSION:16,DATA_AFTER_CLOSE:32,OPTIONAL_LF_AFTER_CR:64,OPTIONAL_CRLF_AFTER_CHUNK:128,OPTIONAL_CR_BEFORE_LF:256,SPACES_AFTER_CHUNK_SIZE:512};Ce.METHODS={DELETE:0,GET:1,HEAD:2,POST:3,PUT:4,CONNECT:5,OPTIONS:6,TRACE:7,COPY:8,LOCK:9,MKCOL:10,MOVE:11,PROPFIND:12,PROPPATCH:13,SEARCH:14,UNLOCK:15,BIND:16,REBIND:17,UNBIND:18,ACL:19,REPORT:20,MKACTIVITY:21,CHECKOUT:22,MERGE:23,"M-SEARCH":24,NOTIFY:25,SUBSCRIBE:26,UNSUBSCRIBE:27,PATCH:28,PURGE:29,MKCALENDAR:30,LINK:31,UNLINK:32,SOURCE:33,PRI:34,DESCRIBE:35,ANNOUNCE:36,SETUP:37,PLAY:38,PAUSE:39,TEARDOWN:40,GET_PARAMETER:41,SET_PARAMETER:42,REDIRECT:43,RECORD:44,FLUSH:45,QUERY:46};Ce.STATUSES={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,RESPONSE_IS_STALE:110,REVALIDATION_FAILED:111,DISCONNECTED_OPERATION:112,HEURISTIC_EXPIRATION:113,MISCELLANEOUS_WARNING:199,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,TRANSFORMATION_APPLIED:214,IM_USED:226,MISCELLANEOUS_PERSISTENT_WARNING:299,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,SWITCH_PROXY:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,PAGE_EXPIRED:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,LOGIN_TIMEOUT:440,NO_RESPONSE:444,RETRY_WITH:449,BLOCKED_BY_PARENTAL_CONTROL:450,UNAVAILABLE_FOR_LEGAL_REASONS:451,CLIENT_CLOSED_LOAD_BALANCED_REQUEST:460,INVALID_X_FORWARDED_FOR:463,REQUEST_HEADER_TOO_LARGE:494,SSL_CERTIFICATE_ERROR:495,SSL_CERTIFICATE_REQUIRED:496,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,INVALID_TOKEN:498,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511,WEB_SERVER_UNKNOWN_ERROR:520,WEB_SERVER_IS_DOWN:521,CONNECTION_TIMEOUT:522,ORIGIN_IS_UNREACHABLE:523,TIMEOUT_OCCURED:524,SSL_HANDSHAKE_FAILED:525,INVALID_SSL_CERTIFICATE:526,RAILGUN_ERROR:527,SITE_IS_OVERLOADED:529,SITE_IS_FROZEN:530,IDENTITY_PROVIDER_AUTHENTICATION_ERROR:561,NETWORK_READ_TIMEOUT:598,NETWORK_CONNECT_TIMEOUT:599};Ce.FINISH={SAFE:0,SAFE_WITH_CB:1,UNSAFE:2};Ce.HEADER_STATE={GENERAL:0,CONNECTION:1,CONTENT_LENGTH:2,TRANSFER_ENCODING:3,UPGRADE:4,CONNECTION_KEEP_ALIVE:5,CONNECTION_CLOSE:6,CONNECTION_UPGRADE:7,TRANSFER_ENCODING_CHUNKED:8};Ce.METHODS_HTTP=[Ce.METHODS.DELETE,Ce.METHODS.GET,Ce.METHODS.HEAD,Ce.METHODS.POST,Ce.METHODS.PUT,Ce.METHODS.CONNECT,Ce.METHODS.OPTIONS,Ce.METHODS.TRACE,Ce.METHODS.COPY,Ce.METHODS.LOCK,Ce.METHODS.MKCOL,Ce.METHODS.MOVE,Ce.METHODS.PROPFIND,Ce.METHODS.PROPPATCH,Ce.METHODS.SEARCH,Ce.METHODS.UNLOCK,Ce.METHODS.BIND,Ce.METHODS.REBIND,Ce.METHODS.UNBIND,Ce.METHODS.ACL,Ce.METHODS.REPORT,Ce.METHODS.MKACTIVITY,Ce.METHODS.CHECKOUT,Ce.METHODS.MERGE,Ce.METHODS["M-SEARCH"],Ce.METHODS.NOTIFY,Ce.METHODS.SUBSCRIBE,Ce.METHODS.UNSUBSCRIBE,Ce.METHODS.PATCH,Ce.METHODS.PURGE,Ce.METHODS.MKCALENDAR,Ce.METHODS.LINK,Ce.METHODS.UNLINK,Ce.METHODS.PRI,Ce.METHODS.SOURCE,Ce.METHODS.QUERY];Ce.METHODS_ICE=[Ce.METHODS.SOURCE];Ce.METHODS_RTSP=[Ce.METHODS.OPTIONS,Ce.METHODS.DESCRIBE,Ce.METHODS.ANNOUNCE,Ce.METHODS.SETUP,Ce.METHODS.PLAY,Ce.METHODS.PAUSE,Ce.METHODS.TEARDOWN,Ce.METHODS.GET_PARAMETER,Ce.METHODS.SET_PARAMETER,Ce.METHODS.REDIRECT,Ce.METHODS.RECORD,Ce.METHODS.FLUSH,Ce.METHODS.GET,Ce.METHODS.POST];Ce.METHOD_MAP=(0,q3o.enumToMap)(Ce.METHODS);Ce.H_METHOD_MAP=Object.fromEntries(Object.entries(Ce.METHODS).filter(([t])=>t.startsWith("H")));Ce.STATUSES_HTTP=[Ce.STATUSES.CONTINUE,Ce.STATUSES.SWITCHING_PROTOCOLS,Ce.STATUSES.PROCESSING,Ce.STATUSES.EARLY_HINTS,Ce.STATUSES.RESPONSE_IS_STALE,Ce.STATUSES.REVALIDATION_FAILED,Ce.STATUSES.DISCONNECTED_OPERATION,Ce.STATUSES.HEURISTIC_EXPIRATION,Ce.STATUSES.MISCELLANEOUS_WARNING,Ce.STATUSES.OK,Ce.STATUSES.CREATED,Ce.STATUSES.ACCEPTED,Ce.STATUSES.NON_AUTHORITATIVE_INFORMATION,Ce.STATUSES.NO_CONTENT,Ce.STATUSES.RESET_CONTENT,Ce.STATUSES.PARTIAL_CONTENT,Ce.STATUSES.MULTI_STATUS,Ce.STATUSES.ALREADY_REPORTED,Ce.STATUSES.TRANSFORMATION_APPLIED,Ce.STATUSES.IM_USED,Ce.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,Ce.STATUSES.MULTIPLE_CHOICES,Ce.STATUSES.MOVED_PERMANENTLY,Ce.STATUSES.FOUND,Ce.STATUSES.SEE_OTHER,Ce.STATUSES.NOT_MODIFIED,Ce.STATUSES.USE_PROXY,Ce.STATUSES.SWITCH_PROXY,Ce.STATUSES.TEMPORARY_REDIRECT,Ce.STATUSES.PERMANENT_REDIRECT,Ce.STATUSES.BAD_REQUEST,Ce.STATUSES.UNAUTHORIZED,Ce.STATUSES.PAYMENT_REQUIRED,Ce.STATUSES.FORBIDDEN,Ce.STATUSES.NOT_FOUND,Ce.STATUSES.METHOD_NOT_ALLOWED,Ce.STATUSES.NOT_ACCEPTABLE,Ce.STATUSES.PROXY_AUTHENTICATION_REQUIRED,Ce.STATUSES.REQUEST_TIMEOUT,Ce.STATUSES.CONFLICT,Ce.STATUSES.GONE,Ce.STATUSES.LENGTH_REQUIRED,Ce.STATUSES.PRECONDITION_FAILED,Ce.STATUSES.PAYLOAD_TOO_LARGE,Ce.STATUSES.URI_TOO_LONG,Ce.STATUSES.UNSUPPORTED_MEDIA_TYPE,Ce.STATUSES.RANGE_NOT_SATISFIABLE,Ce.STATUSES.EXPECTATION_FAILED,Ce.STATUSES.IM_A_TEAPOT,Ce.STATUSES.PAGE_EXPIRED,Ce.STATUSES.ENHANCE_YOUR_CALM,Ce.STATUSES.MISDIRECTED_REQUEST,Ce.STATUSES.UNPROCESSABLE_ENTITY,Ce.STATUSES.LOCKED,Ce.STATUSES.FAILED_DEPENDENCY,Ce.STATUSES.TOO_EARLY,Ce.STATUSES.UPGRADE_REQUIRED,Ce.STATUSES.PRECONDITION_REQUIRED,Ce.STATUSES.TOO_MANY_REQUESTS,Ce.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,Ce.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,Ce.STATUSES.LOGIN_TIMEOUT,Ce.STATUSES.NO_RESPONSE,Ce.STATUSES.RETRY_WITH,Ce.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,Ce.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,Ce.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,Ce.STATUSES.INVALID_X_FORWARDED_FOR,Ce.STATUSES.REQUEST_HEADER_TOO_LARGE,Ce.STATUSES.SSL_CERTIFICATE_ERROR,Ce.STATUSES.SSL_CERTIFICATE_REQUIRED,Ce.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,Ce.STATUSES.INVALID_TOKEN,Ce.STATUSES.CLIENT_CLOSED_REQUEST,Ce.STATUSES.INTERNAL_SERVER_ERROR,Ce.STATUSES.NOT_IMPLEMENTED,Ce.STATUSES.BAD_GATEWAY,Ce.STATUSES.SERVICE_UNAVAILABLE,Ce.STATUSES.GATEWAY_TIMEOUT,Ce.STATUSES.HTTP_VERSION_NOT_SUPPORTED,Ce.STATUSES.VARIANT_ALSO_NEGOTIATES,Ce.STATUSES.INSUFFICIENT_STORAGE,Ce.STATUSES.LOOP_DETECTED,Ce.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,Ce.STATUSES.NOT_EXTENDED,Ce.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,Ce.STATUSES.WEB_SERVER_UNKNOWN_ERROR,Ce.STATUSES.WEB_SERVER_IS_DOWN,Ce.STATUSES.CONNECTION_TIMEOUT,Ce.STATUSES.ORIGIN_IS_UNREACHABLE,Ce.STATUSES.TIMEOUT_OCCURED,Ce.STATUSES.SSL_HANDSHAKE_FAILED,Ce.STATUSES.INVALID_SSL_CERTIFICATE,Ce.STATUSES.RAILGUN_ERROR,Ce.STATUSES.SITE_IS_OVERLOADED,Ce.STATUSES.SITE_IS_FROZEN,Ce.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,Ce.STATUSES.NETWORK_READ_TIMEOUT,Ce.STATUSES.NETWORK_CONNECT_TIMEOUT];Ce.ALPHA=[];for(let t=65;t<=90;t++)Ce.ALPHA.push(String.fromCharCode(t)),Ce.ALPHA.push(String.fromCharCode(t+32));Ce.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};Ce.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};Ce.NUM=["0","1","2","3","4","5","6","7","8","9"];Ce.ALPHANUM=Ce.ALPHA.concat(Ce.NUM);Ce.MARK=["-","_",".","!","~","*","'","(",")"];Ce.USERINFO_CHARS=Ce.ALPHANUM.concat(Ce.MARK).concat(["%",";",":","&","=","+","$",","]);Ce.URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(Ce.ALPHANUM);Ce.HEX=Ce.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);Ce.TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(Ce.ALPHANUM);Ce.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&Ce.HEADER_CHARS.push(t);Ce.CONNECTION_TOKEN_CHARS=Ce.HEADER_CHARS.filter(t=>t!==44);Ce.QUOTED_STRING=[" "," "];for(let t=33;t<=255;t++)t!==34&&t!==92&&Ce.QUOTED_STRING.push(t);Ce.HTAB_SP_VCHAR_OBS_TEXT=[" "," "];for(let t=33;t<=126;t++)Ce.HTAB_SP_VCHAR_OBS_TEXT.push(t);for(let t=128;t<=255;t++)Ce.HTAB_SP_VCHAR_OBS_TEXT.push(t);Ce.MAJOR=Ce.NUM_MAP;Ce.MINOR=Ce.MAJOR;Ce.SPECIAL_HEADERS={connection:Ce.HEADER_STATE.CONNECTION,"content-length":Ce.HEADER_STATE.CONTENT_LENGTH,"proxy-connection":Ce.HEADER_STATE.CONNECTION,"transfer-encoding":Ce.HEADER_STATE.TRANSFER_ENCODING,upgrade:Ce.HEADER_STATE.UPGRADE};Ce.default={ERROR:Ce.ERROR,TYPE:Ce.TYPE,FLAGS:Ce.FLAGS,LENIENT_FLAGS:Ce.LENIENT_FLAGS,METHODS:Ce.METHODS,STATUSES:Ce.STATUSES,FINISH:Ce.FINISH,HEADER_STATE:Ce.HEADER_STATE,ALPHA:Ce.ALPHA,NUM_MAP:Ce.NUM_MAP,HEX_MAP:Ce.HEX_MAP,NUM:Ce.NUM,ALPHANUM:Ce.ALPHANUM,MARK:Ce.MARK,USERINFO_CHARS:Ce.USERINFO_CHARS,URL_CHAR:Ce.URL_CHAR,HEX:Ce.HEX,TOKEN:Ce.TOKEN,HEADER_CHARS:Ce.HEADER_CHARS,CONNECTION_TOKEN_CHARS:Ce.CONNECTION_TOKEN_CHARS,QUOTED_STRING:Ce.QUOTED_STRING,HTAB_SP_VCHAR_OBS_TEXT:Ce.HTAB_SP_VCHAR_OBS_TEXT,MAJOR:Ce.MAJOR,MINOR:Ce.MINOR,SPECIAL_HEADERS:Ce.SPECIAL_HEADERS,METHODS_HTTP:Ce.METHODS_HTTP,METHODS_ICE:Ce.METHODS_ICE,METHODS_RTSP:Ce.METHODS_RTSP,METHOD_MAP:Ce.METHOD_MAP,H_METHOD_MAP:Ce.H_METHOD_MAP,STATUSES_HTTP:Ce.STATUSES_HTTP}});var fQt=T((B6u,hgn)=>{"use strict";f();var{Buffer:G3o}=require("node:buffer"),H3o="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCq/ZAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5P+gFQUVJT7gHtAVTsAVXrAVZXWFla6gFbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHpAegBzwHnAdAB5gHRAdIB0wHUAeUB1QHWAdcB2AHZAdoB2wHcAd0B3gHfAeAB4QHiAeMBAPwBC0EADOMBC0EODOIBC0ENDOEBC0EPDOABC0EQDN8BC0ETDN4BC0EUDN0BC0EVDNwBC0EWDNsBC0EXDNoBC0EYDNkBC0EZDNgBC0EaDNcBC0EbDNYBC0EcDNUBC0EdDNQBC0EeDNMBC0EfDNIBC0EgDNEBC0EhDNABC0EIDM8BC0EiDM4BC0EkDM0BC0EjDMwBC0EHDMsBC0ElDMoBC0EmDMkBC0EnDMgBC0EoDMcBC0ESDMYBC0ERDMUBC0EpDMQBC0EqDMMBC0ErDMIBC0EsDMEBC0HeAQzAAQtBLgy/AQtBLwy+AQtBMAy9AQtBMQy8AQtBMgy7AQtBMwy6AQtBNAy5AQtB3wEMuAELQTUMtwELQTkMtgELQQwMtQELQTYMtAELQTcMswELQTgMsgELQT4MsQELQToMsAELQeABDK8BC0ELDK4BC0E/DK0BC0E7DKwBC0EKDKsBC0E8DKoBC0E9DKkBC0HhAQyoAQtBwQAMpwELQcAADKYBC0HCAAylAQtBCQykAQtBLQyjAQtBwwAMogELQcQADKEBC0HFAAygAQtBxgAMnwELQccADJ4BC0HIAAydAQtByQAMnAELQcoADJsBC0HLAAyaAQtBzAAMmQELQc0ADJgBC0HOAAyXAQtBzwAMlgELQdAADJUBC0HRAAyUAQtB0gAMkwELQdMADJIBC0HVAAyRAQtB1AAMkAELQdYADI8BC0HXAAyOAQtB2AAMjQELQdkADIwBC0HaAAyLAQtB2wAMigELQdwADIkBC0HdAAyIAQtB3gAMhwELQd8ADIYBC0HgAAyFAQtB4QAMhAELQeIADIMBC0HjAAyCAQtB5AAMgQELQeUADIABC0HiAQx/C0HmAAx+C0HnAAx9C0EGDHwLQegADHsLQQUMegtB6QAMeQtBBAx4C0HqAAx3C0HrAAx2C0HsAAx1C0HtAAx0C0EDDHMLQe4ADHILQe8ADHELQfAADHALQfIADG8LQfEADG4LQfMADG0LQfQADGwLQfUADGsLQfYADGoLQQIMaQtB9wAMaAtB+AAMZwtB+QAMZgtB+gAMZQtB+wAMZAtB/AAMYwtB/QAMYgtB/gAMYQtB/wAMYAtBgAEMXwtBgQEMXgtBggEMXQtBgwEMXAtBhAEMWwtBhQEMWgtBhgEMWQtBhwEMWAtBiAEMVwtBiQEMVgtBigEMVQtBiwEMVAtBjAEMUwtBjQEMUgtBjgEMUQtBjwEMUAtBkAEMTwtBkQEMTgtBkgEMTQtBkwEMTAtBlAEMSwtBlQEMSgtBlgEMSQtBlwEMSAtBmAEMRwtBmQEMRgtBmgEMRQtBmwEMRAtBnAEMQwtBnQEMQgtBngEMQQtBnwEMQAtBoAEMPwtBoQEMPgtBogEMPQtBowEMPAtBpAEMOwtBpQEMOgtBpgEMOQtBpwEMOAtBqAEMNwtBqQEMNgtBqgEMNQtBqwEMNAtBrAEMMwtBrQEMMgtBrgEMMQtBrwEMMAtBsAEMLwtBsQEMLgtBsgEMLQtBswEMLAtBtAEMKwtBtQEMKgtBtgEMKQtBtwEMKAtBuAEMJwtBuQEMJgtBugEMJQtBuwEMJAtBvAEMIwtBvQEMIgtBvgEMIQtBvwEMIAtBwAEMHwtBwQEMHgtBwgEMHQtBAQwcC0HDAQwbC0HEAQwaC0HFAQwZC0HGAQwYC0HHAQwXC0HIAQwWC0HJAQwVC0HKAQwUC0HLAQwTC0HMAQwSC0HNAQwRC0HOAQwQC0HPAQwPC0HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAg7jAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEjJCUnKCmeA5sDmgORA4oDgwOAA/0C+wL4AvIC8QLvAu0C6ALnAuYC5QLkAtwC2wLaAtkC2ALXAtYC1QLPAs4CzALLAsoCyQLIAscCxgLEAsMCvgK8AroCuQK4ArcCtgK1ArQCswKyArECsAKuAq0CqQKoAqcCpgKlAqQCowKiAqECoAKfApgCkAKMAosCigKBAv4B/QH8AfsB+gH5AfgB9wH1AfMB8AHrAekB6AHnAeYB5QHkAeMB4gHhAeAB3wHeAd0B3AHaAdkB2AHXAdYB1QHUAdMB0gHRAdABzwHOAc0BzAHLAcoByQHIAccBxgHFAcQBwwHCAcEBwAG/Ab4BvQG8AbsBugG5AbgBtwG2AbUBtAGzAbIBsQGwAa8BrgGtAawBqwGqAakBqAGnAaYBpQGkAaMBogGfAZ4BmQGYAZcBlgGVAZQBkwGSAZEBkAGPAY0BjAGHAYYBhQGEAYMBggF9fHt6eXZ1dFBRUlNUVQsgASAERw1yQf0BIQIMvgMLIAEgBEcNmAFB2wEhAgy9AwsgASAERw3xAUGOASECDLwDCyABIARHDfwBQYQBIQIMuwMLIAEgBEcNigJB/wAhAgy6AwsgASAERw2RAkH9ACECDLkDCyABIARHDZQCQfsAIQIMuAMLIAEgBEcNHkEeIQIMtwMLIAEgBEcNGUEYIQIMtgMLIAEgBEcNygJBzQAhAgy1AwsgASAERw3VAkHGACECDLQDCyABIARHDdYCQcMAIQIMswMLIAEgBEcN3AJBOCECDLIDCyADLQAwQQFGDa0DDIkDC0EAIQACQAJAAkAgAy0AKkUNACADLQArRQ0AIAMvATIiAkECcUUNAQwCCyADLwEyIgJBAXFFDQELQQEhACADLQAoQQFGDQAgAy8BNCIGQeQAa0HkAEkNACAGQcwBRg0AIAZBsAJGDQAgAkHAAHENAEEAIQAgAkGIBHFBgARGDQAgAkEocUEARyEACyADQQA7ATIgA0EAOgAxAkAgAEUEQCADQQA6ADEgAy0ALkEEcQ0BDLEDCyADQgA3AyALIANBADoAMSADQQE6ADYMSAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNSCAAQRVHDWIgA0EENgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMrwMLIAEgBEYEQEEGIQIMrwMLIAEtAABBCkcNGSABQQFqIQEMGgsgA0IANwMgQRIhAgyUAwsgASAERw2KA0EjIQIMrAMLIAEgBEYEQEEHIQIMrAMLAkACQCABLQAAQQprDgQBGBgAGAsgAUEBaiEBQRAhAgyTAwsgAUEBaiEBIANBL2otAABBAXENF0EAIQIgA0EANgIcIAMgATYCFCADQZkgNgIQIANBGTYCDAyrAwsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFoNGEEIIQIMqgMLIAEgBEcEQCADQQk2AgggAyABNgIEQRQhAgyRAwtBCSECDKkDCyADKQMgUA2uAgxDCyABIARGBEBBCyECDKgDCyABLQAAQQpHDRYgAUEBaiEBDBcLIANBL2otAABBAXFFDRkMJgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0ZDEILQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGgwkC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRsMMgsgA0Evai0AAEEBcUUNHAwiC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADRwMQgtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0dDCALIAEgBEYEQEETIQIMoAMLAkAgAS0AACIAQQprDgQfIyMAIgsgAUEBaiEBDB8LQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIgxCCyABIARGBEBBFiECDJ4DCyABLQAAQcDBAGotAABBAUcNIwyDAwsCQANAIAEtAABBsDtqLQAAIgBBAUcEQAJAIABBAmsOAgMAJwsgAUEBaiEBQSEhAgyGAwsgBCABQQFqIgFHDQALQRghAgydAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAFBAWoiARA0IgANIQxBC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADSMMKgsgASAERgRAQRwhAgybAwsgA0EKNgIIIAMgATYCBEEAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADSVBJCECDIEDCyABIARHBEADQCABLQAAQbA9ai0AACIAQQNHBEAgAEEBaw4FGBomggMlJgsgBCABQQFqIgFHDQALQRshAgyaAwtBGyECDJkDCwNAIAEtAABBsD9qLQAAIgBBA0cEQCAAQQFrDgUPEScTJicLIAQgAUEBaiIBRw0AC0EeIQIMmAMLIAEgBEcEQCADQQs2AgggAyABNgIEQQchAgz/AgtBHyECDJcDCyABIARGBEBBICECDJcDCwJAIAEtAABBDWsOFC4/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8APwtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQMlgMLIANBL2ohAgNAIAEgBEYEQEEhIQIMlwMLAkACQAJAIAEtAAAiAEEJaw4YAgApKQEpKSkpKSkpKSkpKSkpKSkpKSkCJwsgAUEBaiEBIANBL2otAABBAXFFDQoMGAsgAUEBaiEBDBcLIAFBAWohASACLQAAQQJxDQALQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDJUDCyADLQAuQYABcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUN5gIgAEEVRgRAIANBJDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwlCyADQRI2AhwgAyAANgIMIAMgAUEBajYCFAyBAwsgA0Evai0AAEEBcUUNAQtBFyECDOYCC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAz+AgsgAEE7Rw0AIAFBAWohAQwMC0EAIQIgA0EANgIcIAMgATYCFCADQZIYNgIQIANBAjYCDAz8AgsgAEEVRg0oQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDPsCCyADQRQ2AhwgAyABNgIUIAMgADYCDAz6AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQz1AgsgA0EVNgIcIAMgADYCDCADIAFBAWo2AhQM+QILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM8wILIANBFzYCHCADIAA2AgwgAyABQQFqNgIUDPgCCyAAQRVGDSNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM9wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEMHQsgA0EZNgIcIAMgADYCDCADIAFBAWo2AhQM9gILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM7wILIANBGjYCHCADIAA2AgwgAyABQQFqNgIUDPUCCyAAQRVGDR9BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwM9AILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwbCyADQRw2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8wILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQzrAgsgA0EdNgIcIAMgADYCDCADIAFBAWo2AhRBACECDPICCyAAQTtHDQEgAUEBaiEBC0EmIQIM1wILQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDO8CCyABIARHBEADQCABLQAAQSBHDYQCIAQgAUEBaiIBRw0AC0EsIQIM7wILQSwhAgzuAgsgASAERgRAQTQhAgzuAgsCQAJAA0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyABIARHBEAgA0EMNgIIIAMgATYCBEG/ASECDIQCC0HYASECDJwCCyABIARGBEBB1wEhAgycAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBwQBrDhUAAQIDWgQFBlpaWgcICQoLDA0ODxBaCyABQQFqIQFB+wAhAgySAgsgAUEBaiEBQfwAIQIMkQILIAFBAWohAUGBASECDJACCyABQQFqIQFBhQEhAgyPAgsgAUEBaiEBQYYBIQIMjgILIAFBAWohAUGJASECDI0CCyABQQFqIQFBigEhAgyMAgsgAUEBaiEBQY0BIQIMiwILIAFBAWohAUGWASECDIoCCyABQQFqIQFBlwEhAgyJAgsgAUEBaiEBQZgBIQIMiAILIAFBAWohAUGlASECDIcCCyABQQFqIQFBpgEhAgyGAgsgAUEBaiEBQawBIQIMhQILIAFBAWohAUG0ASECDIQCCyABQQFqIQFBtwEhAgyDAgsgAUEBaiEBQb4BIQIMggILIAEgBEYEQEHWASECDJsCCyABLQAAQc4ARw1IIAFBAWohAUG9ASECDIECCyABIARGBEBB1QEhAgyaAgsCQAJAAkAgAS0AAEHCAGsOEgBKSkpKSkpKSkoBSkpKSkpKAkoLIAFBAWohAUG4ASECDIICCyABQQFqIQFBuwEhAgyBAgsgAUEBaiEBQbwBIQIMgAILQdQBIQIgASAERg2YAiADKAIAIgAgBCABa2ohBSABIABrQQdqIQYCQANAIAEtAAAgAEGo1QBqLQAARw1FIABBB0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAgsgA0EANgIAIAZBAWohAUEbDEULIAEgBEYEQEHTASECDJgCCwJAAkAgAS0AAEHJAGsOBwBHR0dHRwFHCyABQQFqIQFBuQEhAgz/AQsgAUEBaiEBQboBIQIM/gELQdIBIQIgASAERg2WAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw1DIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyXAgsgA0EANgIAIAZBAWohAUEPDEMLQdEBIQIgASAERg2VAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw1CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyWAgsgA0EANgIAIAZBAWohAUEgDEILQdABIQIgASAERg2UAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw1BIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyVAgsgA0EANgIAIAZBAWohAUESDEELIAEgBEYEQEHPASECDJQCCwJAAkAgAS0AAEHFAGsODgBDQ0NDQ0NDQ0NDQ0MBQwsgAUEBaiEBQbUBIQIM+wELIAFBAWohAUG2ASECDPoBC0HOASECIAEgBEYNkgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBntUAai0AAEcNPyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkwILIANBADYCACAGQQFqIQFBBww/C0HNASECIAEgBEYNkQIgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBmNUAai0AAEcNPiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkgILIANBADYCACAGQQFqIQFBKAw+CyABIARGBEBBzAEhAgyRAgsCQAJAAkAgAS0AAEHFAGsOEQBBQUFBQUFBQUEBQUFBQUECQQsgAUEBaiEBQbEBIQIM+QELIAFBAWohAUGyASECDPgBCyABQQFqIQFBswEhAgz3AQtBywEhAiABIARGDY8CIAMoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQZHVAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJACCyADQQA2AgAgBkEBaiEBQRoMPAtBygEhAiABIARGDY4CIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQY3VAGotAABHDTsgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADI8CCyADQQA2AgAgBkEBaiEBQSEMOwsgASAERgRAQckBIQIMjgILAkACQCABLQAAQcEAaw4UAD09PT09PT09PT09PT09PT09PQE9CyABQQFqIQFBrQEhAgz1AQsgAUEBaiEBQbABIQIM9AELIAEgBEYEQEHIASECDI0CCwJAAkAgAS0AAEHVAGsOCwA8PDw8PDw8PDwBPAsgAUEBaiEBQa4BIQIM9AELIAFBAWohAUGvASECDPMBC0HHASECIAEgBEYNiwIgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNOCAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjAILIANBADYCACAGQQFqIQFBKgw4CyABIARGBEBBxgEhAgyLAgsgAS0AAEHQAEcNOCABQQFqIQFBJQw3C0HFASECIAEgBEYNiQIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBgdUAai0AAEcNNiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMigILIANBADYCACAGQQFqIQFBDgw2CyABIARGBEBBxAEhAgyJAgsgAS0AAEHFAEcNNiABQQFqIQFBqwEhAgzvAQsgASAERgRAQcMBIQIMiAILAkACQAJAAkAgAS0AAEHCAGsODwABAjk5OTk5OTk5OTk5AzkLIAFBAWohAUGnASECDPEBCyABQQFqIQFBqAEhAgzwAQsgAUEBaiEBQakBIQIM7wELIAFBAWohAUGqASECDO4BC0HCASECIAEgBEYNhgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB/tQAai0AAEcNMyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhwILIANBADYCACAGQQFqIQFBFAwzC0HBASECIAEgBEYNhQIgAygCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABB+dQAai0AAEcNMiAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhgILIANBADYCACAGQQFqIQFBKwwyC0HAASECIAEgBEYNhAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB9tQAai0AAEcNMSAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhQILIANBADYCACAGQQFqIQFBLAwxC0G/ASECIAEgBEYNgwIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNMCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhAILIANBADYCACAGQQFqIQFBEQwwC0G+ASECIAEgBEYNggIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB8tQAai0AAEcNLyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgwILIANBADYCACAGQQFqIQFBLgwvCyABIARGBEBBvQEhAgyCAgsCQAJAAkACQAJAIAEtAABBwQBrDhUANDQ0NDQ0NDQ0NAE0NAI0NAM0NAQ0CyABQQFqIQFBmwEhAgzsAQsgAUEBaiEBQZwBIQIM6wELIAFBAWohAUGdASECDOoBCyABQQFqIQFBogEhAgzpAQsgAUEBaiEBQaQBIQIM6AELIAEgBEYEQEG8ASECDIECCwJAAkAgAS0AAEHSAGsOAwAwATALIAFBAWohAUGjASECDOgBCyABQQFqIQFBBAwtC0G7ASECIAEgBEYN/wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8NQAai0AAEcNLCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgAILIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBugEhAgz/AQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQaEBIQIM5gELIAFBAWohAUEiDCsLIAEgBEYEQEG5ASECDP4BCyABLQAAQdAARw0rIAFBAWohAUGgASECDOQBCyABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANgIAIAZBAWohAUEcDCILQbABIQIgASAERg30ASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHe1ABqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz1AQsgA0EANgIAIAZBAWohAUEGDCELQa8BIQIgASAERg3zASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHZ1ABqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz0AQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGuASECDPMBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQY4BIQIM3AELIAFBAWohAUGPASECDNsBCyABQQFqIQFBlAEhAgzaAQsgAUEBaiEBQZUBIQIM2QELQa0BIQIgASAERg3xASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHX1ABqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzyAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGsASECDPEBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGQASECDNgBCyABQQFqIQFBkwEhAgzXAQsgASAERgRAQasBIQIM8AELAkACQCABLQAAQcEAaw4PAB8fHx8fHx8fHx8fHx8BHwsgAUEBaiEBQZEBIQIM1wELIAFBAWohAUGSASECDNYBCyABIARGBEBBqgEhAgzvAQsgAS0AAEHMAEcNHCABQQFqIQFBCgwbC0GpASECIAEgBEYN7QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABB0dQAai0AAEcNGiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIAIAZBAWohAUGIASECDMoBC0GfASECIAEgBEYN4gEgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNDyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4wELIANBADYCACAGQQFqIQFBKQwPC0GeASECIAEgBEYN4QEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBuNQAai0AAEcNDiAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4gELIANBADYCACAGQQFqIQFBLQwOCyABIARGBEBBnQEhAgzhAQsgAS0AAEHFAEcNDiABQQFqIQFBhAEhAgzHAQsgASAERgRAQZwBIQIM4AELAkACQCABLQAAQcwAaw4IAA8PDw8PDwEPCyABQQFqIQFBggEhAgzHAQsgAUEBaiEBQYMBIQIMxgELQZsBIQIgASAERg3eASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGz1ABqLQAARw0LIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzfAQsgA0EANgIAIAZBAWohAUEjDAsLQZoBIQIgASAERg3dASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGw1ABqLQAARw0KIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzeAQsgA0EANgIAIAZBAWohAUEADAoLIAEgBEYEQEGZASECDN0BCwJAAkAgAS0AAEHIAGsOCAAMDAwMDAwBDAsgAUEBaiEBQf0AIQIMxAELIAFBAWohAUGAASECDMMBCyABIARGBEBBmAEhAgzcAQsCQAJAIAEtAABBzgBrDgMACwELCyABQQFqIQFB/gAhAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIMsgELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GOASECDMoBCyABIARGBEBBjQEhAgzKAQsCQCABLQAAQQlrDgRKAABKAAtB9QAhAgywAQsgAy0AKUEFRgRAQfYAIQIMsAELQfQAIQIMrwELIAEgBEYEQEGMASECDMgBCyADQRA2AgggAyABNgIEDAoLIAEgBEYEQEGLASECDMcBCwJAIAEtAABBCWsOBEcAAEcAC0HzACECDK0BCyABIARHBEAgA0EQNgIIIAMgATYCBEHxACECDK0BC0GKASECDMUBCwJAIAEgBEcEQANAIAEtAABBoNAAai0AACIAQQNHBEACQCAAQQFrDgJJAAQLQfAAIQIMrwELIAQgAUEBaiIBRw0AC0GIASECDMYBC0GIASECDMUBCyADQQA2AhwgAyABNgIUIANB2yA2AhAgA0EHNgIMQQAhAgzEAQsgASAERgRAQYkBIQIMxAELAkACQAJAIAEtAABBoNIAai0AAEEBaw4DRgIAAQtB8gAhAgysAQsgA0EANgIcIAMgATYCFCADQbQSNgIQIANBBzYCDEEAIQIMxAELQeoAIQIMqgELIAEgBEcEQCABQQFqIQFB7wAhAgyqAQtBhwEhAgzCAQsgBCABIgBGBEBBhgEhAgzCAQsgAC0AACIBQS9GBEAgAEEBaiEBQe4AIQIMqQELIAFBCWsiAkEXSw0BIAAhAUEBIAJ0QZuAgARxDUEMAQsgBCABIgBGBEBBhQEhAgzBAQsgAC0AAEEvRw0AIABBAWohAQwDC0EAIQIgA0EANgIcIAMgADYCFCADQdsgNgIQIANBBzYCDAy/AQsCQAJAAkACQAJAA0AgAS0AAEGgzgBqLQAAIgBBBUcEQAJAAkAgAEEBaw4IRwUGBwgABAEIC0HrACECDK0BCyABQQFqIQFB7QAhAgysAQsgBCABQQFqIgFHDQALQYQBIQIMwwELIAFBAWoMFAsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgzBAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgzAAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy/AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMvgELIAEgBEYEQEGDASECDL4BCwJAIAEtAABBoM4Aai0AAEEBaw4IPgQFBgAIAgMHCyABQQFqIQELQQMhAgyjAQsgAUEBagwNC0EAIQIgA0EANgIcIANB0RI2AhAgA0EHNgIMIAMgAUEBajYCFAy6AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgy5AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgy4AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy3AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMtgELQewAIQIMnAELIAEgBEYEQEGCASECDLUBCyABQQFqDAILIAEgBEYEQEGBASECDLQBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyYAQtBgAEhAgywAQsDQCABLQAAQaDMAGotAAAiAEECRwRAIABBAUcEQEHpACECDJkBCwwxCyAEIAFBAWoiAUcNAAtB/wAhAgyvAQsgASAERgRAQf4AIQIMrwELAkAgAS0AAEEJaw43LwMGLwQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgELIABBFUcEQCADQQA2AhwgAyABNgIUIANByQ02AhAgA0EaNgIMQQAhAgyfAQsgA0H4ADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDJ4BCyABIARHBEAgA0ENNgIIIAMgATYCBEHkACECDIUBC0H3ACECDJ0BCyABIARGBEBB9gAhAgydAQsCQAJAAkAgAS0AAEHIAGsOCwABCwsLCwsLCwsCCwsgAUEBaiEBQd0AIQIMhQELIAFBAWohAUHgACECDIQBCyABQQFqIQFB4wAhAgyDAQtB9QAhAiABIARGDZsBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbXVAGotAABHDQggAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJwBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIABEAgA0H0ADYCHCADIAE2AhQgAyAANgIMQQAhAgycAQtB4gAhAgyCAQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJwBC0HhACECDIIBCyADQfMANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMmgELIAMtACkiAEEja0ELSQ0JAkAgAEEGSw0AQQEgAHRBygBxRQ0ADAoLQQAhAiADQQA2AhwgAyABNgIUIANB7Qk2AhAgA0EINgIMDJkBC0HyACECIAEgBEYNmAEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBs9UAai0AAEcNBSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMmQELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBEcEQCADQRE2AgggAyABNgIEQcoAIQIMYAtB1wAhAgx4CyABIARGBEBB1gAhAgx4CwJAAkACQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQeMAaw4TAEBAQEBAQEBAQEBAQAFAQEACA0ALIAFBAWohAUHGACECDGELIAFBAWohAUHHACECDGALIAFBAWohAUHIACECDF8LIAFBAWohAUHJACECDF4LQdUAIQIgBCABIgBGDXYgBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0IQQQgAUEFRg0KGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx2C0HUACECIAQgASIARg11IAQgAWsgAygCACIBaiEGIAAgAWtBD2ohBwNAIAFBgMgAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNB0EDIAFBD0YNCRogAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdQtB0wAhAiAEIAEiAEYNdCAEIAFrIAMoAgAiAWohBiAAIAFrQQ5qIQcDQCABQeLHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQYgAUEORg0HIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHQLQdIAIQIgBCABIgBGDXMgBCABayADKAIAIgFqIQUgACABa0EBaiEGA0AgAUHgxwBqLQAAIAAtAAAiB0EgciAHIAdBwQBrQf8BcUEaSRtB/wFxRw0FIAFBAUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAxzCyABIARGBEBB0QAhAgxzCwJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB7gBrDgcAOTk5OTkBOQsgAUEBaiEBQcMAIQIMWgsgAUEBaiEBQcQAIQIMWQsgA0EANgIAIAZBAWohAUHFACECDFgLQdAAIQIgBCABIgBGDXAgBCABayADKAIAIgFqIQYgACABa0EJaiEHA0AgAUHWxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0CQQIgAUEJRg0EGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxwC0HPACECIAQgASIARg1vIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwNAIAFB0McAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQVGDQIgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMbwsgACEBIANBADYCAAwzC0EBCzoALCADQQA2AgAgB0EBaiEBC0EtIQIMUgsCQANAIAEtAABB0MUAai0AAEEBRw0BIAQgAUEBaiIBRw0AC0HNACECDGsLQcIAIQIMUQsgASAERgRAQcwAIQIMagsgAS0AAEE6RgRAIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0zIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMagsgA0EANgIcIAMgATYCFCADQecRNgIQIANBCjYCDEEAIQIMaQsCQAJAIAMtACxBAmsOAgABJwsgA0Ezai0AAEECcUUNJiADLQAuQQJxDSYgA0EANgIcIAMgATYCFCADQaYUNgIQIANBCzYCDEEAIQIMaQsgAy0AMkEgcUUNJSADLQAuQQJxDSUgA0EANgIcIAMgATYCFCADQb0TNgIQIANBDzYCDEEAIQIMaAtBACEAAkAgAygCOCICRQ0AIAIoAkgiAkUNACADIAIRAAAhAAsgAEUEQEHBACECDE8LIABBFUcEQCADQQA2AhwgAyABNgIUIANBpg82AhAgA0EcNgIMQQAhAgxoCyADQcoANgIcIAMgATYCFCADQYUcNgIQIANBFTYCDEEAIQIMZwsgASAERwRAA0AgAS0AAEHAwQBqLQAAQQFHDRcgBCABQQFqIgFHDQALQcQAIQIMZwtBxAAhAgxmCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUE2IQIMUgsgAUEBaiEBQTchAgxRCyABQQFqIQFBOCECDFALDBULIAQgAUEBaiIBRw0AC0E8IQIMZgtBPCECDGULIAEgBEYEQEHIACECDGULIANBEjYCCCADIAE2AgQCQAJAAkACQAJAIAMtACxBAWsOBBQAAQIJCyADLQAyQSBxDQNB4AEhAgxPCwJAIAMvATIiAEEIcUUNACADLQAoQQFHDQAgAy0ALkEIcUUNAgsgAyAAQff7A3FBgARyOwEyDAsLIAMgAy8BMkEQcjsBMgwECyADQQA2AgQgAyABIAEQMSIABEAgA0HBADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxmCyABQQFqIQEMWAsgA0EANgIcIAMgATYCFCADQfQTNgIQIANBBDYCDEEAIQIMZAtBxwAhAiABIARGDWMgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCAAQcDFAGotAAAgAS0AAEEgckcNASAAQQZGDUogAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMZAsgA0EANgIADAULAkAgASAERwRAA0AgAS0AAEHAwwBqLQAAIgBBAUcEQCAAQQJHDQMgAUEBaiEBDAULIAQgAUEBaiIBRw0AC0HFACECDGQLQcUAIQIMYwsLIANBADoALAwBC0ELIQIMRwtBPyECDEYLAkACQANAIAEtAAAiAEEgRwRAAkAgAEEKaw4EAwUFAwALIABBLEYNAwwECyAEIAFBAWoiAUcNAAtBxgAhAgxgCyADQQg6ACwMDgsgAy0AKEEBRw0CIAMtAC5BCHENAiADKAIEIQAgA0EANgIEIAMgACABEDEiAARAIANBwgA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMXwsgAUEBaiEBDFALQTshAgxECwJAA0AgAS0AACIAQSBHIABBCUdxDQEgBCABQQFqIgFHDQALQcMAIQIMXQsLQTwhAgxCCwJAAkAgASAERwRAA0AgAS0AACIAQSBHBEAgAEEKaw4EAwQEAwQLIAQgAUEBaiIBRw0AC0E/IQIMXQtBPyECDFwLIAMgAy8BMkEgcjsBMgwKCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNTiADQT42AhwgAyABNgIUIAMgADYCDEEAIQIMWgsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkYNAwwMCyAEIAFBAWoiAUcNAAtBNyECDFsLQTchAgxaCyABQQFqIQEMBAtBOyECIAQgASIARg1YIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwJAA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEMPwsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMWQsgA0EANgIAIAAhAQwFC0E6IQIgBCABIgBGDVcgBCABayADKAIAIgFqIQYgACABa0EIaiEHAkADQCABQbTBAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEIRgRAQQUhAQw+CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxYCyADQQA2AgAgACEBDAQLQTkhAiAEIAEiAEYNViAEIAFrIAMoAgAiAWohBiAAIAFrQQNqIQcCQANAIAFBsMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQNGBEBBBiEBDD0LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFcLIANBADYCACAAIQEMAwsCQANAIAEtAAAiAEEgRwRAIABBCmsOBAcEBAcCCyAEIAFBAWoiAUcNAAtBOCECDFYLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCADLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIANBAToALCADIAMvATIgAXI7ATIgACEBDAELIAMgAy8BMkEIcjsBMiAAIQELQT4hAgw7CyADQQA6ACwLQTkhAgw5CyABIARGBEBBNiECDFILAkACQAJAAkACQCABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLyECDCsLIANBADYCHCADIAE2AhQgA0GEEzYCECADQQs2AgxBACECDEMLQeEBIQIMKQsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ESNgIIIAMgASABEDEiAA0BC0EuIQIMJwsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJMIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBsxs2AhAgA0EVNgIMQQAhAgw+C0HMACECDCQLIANBADYCHCADIAE2AhQgA0GzDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwhCyADKAIEIQAgA0EANgIEIAMgACABEDAiAA0BDAILIAMtAC5BAXEEQEHeASECDCALIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUHAACECDB0LIAFBAWohAQwsCyABIARGBEBBKyECDDULAkAgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQcAAcUUNBgsgAy0AMkGAAXEEQEEAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ0SIABBFUYEQCADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgw2CyADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMQQAhAgw1CyADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyADQQE6ADALIAIgAi8BAEHAAHI7AQALQSshAgwYCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgwwCyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgwvCyADQQA2AhwgAyABNgIUIANBpQs2AhAgA0ECNgIMQQAhAgwuC0EBIQcgAy8BMiIFQQhxRQRAIAMpAyBCAFIhBwsCQCADLQAwBEBBASEAIAMtAClBBUYNASAFQcAAcUUgB3FFDQELAkAgAy0AKCICQQJGBEBBASEAIAMvATQiBkHlAEYNAkEAIQAgBUHAAHENAiAGQeQARg0CIAZB5gBrQQJJDQIgBkHMAUYNAiAGQbACRg0CDAELQQAhACAFQcAAcQ0BC0ECIQAgBUEIcQ0AIAVBgARxBEACQCACQQFHDQAgAy0ALkEKcQ0AQQUhAAwCC0EEIQAMAQsgBUEgcUUEQCADEDZBAEdBAnQhAAwBC0EAQQMgAykDIFAbIQALIABBAWsOBQIABwEDBAtBESECDBMLIANBAToAMQwpC0EAIQICQCADKAI4IgBFDQAgACgCMCIARQ0AIAMgABEAACECCyACRQ0mIAJBFUYEQCADQQM2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwrC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAwqCyADQQA2AhwgAyABNgIUIANB+SA2AhAgA0EPNgIMQQAhAgwpC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAADQELQQ4hAgwOCyAAQRVGBEAgA0ECNgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMJwsgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDEEAIQIMJgtBKiECDAwLIAEgBEcEQCADQQk2AgggAyABNgIEQSkhAgwMC0EmIQIMJAsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFQEQEElIQIMJAsgAygCBCEAIANBADYCBCADIAAgASAMp2oiARAyIgBFDQAgA0EFNgIcIAMgATYCFCADIAA2AgxBACECDCMLQQ8hAgwJC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FxYAAQIDBAUGBxQUFBQUFBQICQoLDA0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFA4PEBESExQLQgIhCgwWC0IDIQoMFQtCBCEKDBQLQgUhCgwTC0IGIQoMEgtCByEKDBELQgghCgwQC0IJIQoMDwtCCiEKDA4LQgshCgwNC0IMIQoMDAtCDSEKDAsLQg4hCgwKC0IPIQoMCQtCCiEKDAgLQgshCgwHC0IMIQoMBgtCDSEKDAULQg4hCgwEC0IPIQoMAwsgA0EANgIcIAMgATYCFCADQZ8VNgIQIANBDDYCDEEAIQIMIQsgASAERgRAQSIhAgwhC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsONxUUAAECAwQFBgcWFhYWFhYWCAkKCwwNFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYODxAREhMWC0ICIQoMFAtCAyEKDBMLQgQhCgwSC0IFIQoMEQtCBiEKDBALQgchCgwPC0IIIQoMDgtCCSEKDA0LQgohCgwMC0ILIQoMCwtCDCEKDAoLQg0hCgwJC0IOIQoMCAtCDyEKDAcLQgohCgwGC0ILIQoMBQtCDCEKDAQLQg0hCgwDC0IOIQoMAgtCDyEKDAELQgEhCgsgAUEBaiEBIAMpAyAiC0L//////////w9YBEAgAyALQgSGIAqENwMgDAILIANBADYCHCADIAE2AhQgA0G1CTYCECADQQw2AgxBACECDB4LQSchAgwEC0EoIQIMAwsgAyABOgAsIANBADYCACAHQQFqIQFBDCECDAILIANBADYCACAGQQFqIQFBCiECDAELIAFBAWohAUEIIQIMAAsAC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwXC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwWC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwVC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwUC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwTC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwSC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwRC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwQC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwPC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwOC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwNC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwMC0EAIQIgA0EANgIcIAMgATYCFCADQZkTNgIQIANBCzYCDAwLC0EAIQIgA0EANgIcIAMgATYCFCADQZ0JNgIQIANBCzYCDAwKC0EAIQIgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDAwJC0EAIQIgA0EANgIcIAMgATYCFCADQbEQNgIQIANBCjYCDAwIC0EAIQIgA0EANgIcIAMgATYCFCADQbsdNgIQIANBAjYCDAwHC0EAIQIgA0EANgIcIAMgATYCFCADQZYWNgIQIANBAjYCDAwGC0EAIQIgA0EANgIcIAMgATYCFCADQfkYNgIQIANBAjYCDAwFC0EAIQIgA0EANgIcIAMgATYCFCADQcQYNgIQIANBAjYCDAwECyADQQI2AhwgAyABNgIUIANBqR42AhAgA0EWNgIMQQAhAgwDC0HeACECIAEgBEYNAiAJQQhqIQcgAygCACEFAkACQCABIARHBEAgBUGWyABqIQggBCAFaiABayEGIAVBf3NBCmoiBSABaiEAA0AgAS0AACAILQAARwRAQQIhCAwDCyAFRQRAQQAhCCAAIQEMAwsgBUEBayEFIAhBAWohCCAEIAFBAWoiAUcNAAsgBiEFIAQhAQsgB0EBNgIAIAMgBTYCAAwBCyADQQA2AgAgByAINgIACyAHIAE2AgQgCSgCDCEAAkACQCAJKAIIQQFrDgIEAQALIANBADYCHCADQcIeNgIQIANBFzYCDCADIABBAWo2AhRBACECDAMLIANBADYCHCADIAA2AhQgA0HXHjYCECADQQk2AgxBACECDAILIAEgBEYEQEEoIQIMAgsgA0EJNgIIIAMgATYCBEEnIQIMAQsgASAERgRAQQEhAgwBCwNAAkACQAJAIAEtAABBCmsOBAABAQABCyABQQFqIQEMAQsgAUEBaiEBIAMtAC5BIHENAEEAIQIgA0EANgIcIAMgATYCFCADQaEhNgIQIANBBTYCDAwCC0EBIQIgASAERw0ACwsgCUEQaiQAIAJFBEAgAygCDCEADAELIAMgAjYCHEEAIQAgAygCBCIBRQ0AIAMgASAEIAMoAggRAQAiAUUNACADIAQ2AhQgAyABNgIMIAEhAAsgAAu+AgECfyAAQQA6AAAgAEHkAGoiAUEBa0EAOgAAIABBADoAAiAAQQA6AAEgAUEDa0EAOgAAIAFBAmtBADoAACAAQQA6AAMgAUEEa0EAOgAAQQAgAGtBA3EiASAAaiIAQQA2AgBB5AAgAWtBfHEiAiAAaiIBQQRrQQA2AgACQCACQQlJDQAgAEEANgIIIABBADYCBCABQQhrQQA2AgAgAUEMa0EANgIAIAJBGUkNACAAQQA2AhggAEEANgIUIABBADYCECAAQQA2AgwgAUEQa0EANgIAIAFBFGtBADYCACABQRhrQQA2AgAgAUEca0EANgIAIAIgAEEEcUEYciICayIBQSBJDQAgACACaiEAA0AgAEIANwMYIABCADcDECAAQgA3AwggAEIANwMAIABBIGohACABQSBrIgFBH0sNAAsLC1YBAX8CQCAAKAIMDQACQAJAAkACQCAALQAxDgMBAAMCCyAAKAI4IgFFDQAgASgCMCIBRQ0AIAAgAREAACIBDQMLQQAPCwALIABByhk2AhBBDiEBCyABCxoAIAAoAgxFBEAgAEHeHzYCECAAQRU2AgwLCxQAIAAoAgxBFUYEQCAAQQA2AgwLCxQAIAAoAgxBFkYEQCAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsrAAJAIABBJ08NAEL//////wkgAK2IQgGDUA0AIABBAnRB0DhqKAIADwsACxcAIABBL08EQAALIABBAnRB7DlqKAIAC78JAQF/QfQtIQECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQeQAaw70A2NiAAFhYWFhYWECAwQFYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQYHCAkKCwwNDg9hYWFhYRBhYWFhYWFhYWFhYRFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWESExQVFhcYGRobYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1NmE3ODk6YWFhYWFhYWE7YWFhPGFhYWE9Pj9hYWFhYWFhYUBhYUFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFCQ0RFRkdISUpLTE1OT1BRUlNhYWFhYWFhYVRVVldYWVpbYVxdYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhXmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYV9gYQtB6iwPC0GYJg8LQe0xDwtBoDcPC0HJKQ8LQbQpDwtBli0PC0HrKw8LQaI1DwtB2zQPC0HgKQ8LQeMkDwtB1SQPC0HuJA8LQeYlDwtByjQPC0HQNw8LQao1DwtB9SwPC0H2Jg8LQYIiDwtB8jMPC0G+KA8LQec3DwtBzSEPC0HAIQ8LQbglDwtByyUPC0GWJA8LQY80DwtBzTUPC0HdKg8LQe4zDwtBnDQPC0GeMQ8LQfQ1DwtB5SIPC0GvJQ8LQZkxDwtBsjYPC0H5Ng8LQcQyDwtB3SwPC0GCMQ8LQcExDwtBjTcPC0HJJA8LQew2DwtB5yoPC0HIIw8LQeIhDwtByTcPC0GlIg8LQZQiDwtB2zYPC0HeNQ8LQYYmDwtBvCsPC0GLMg8LQaAjDwtB9jAPC0GALA8LQYkrDwtBpCYPC0HyIw8LQYEoDwtBqzIPC0HrJw8LQcI2DwtBoiQPC0HPKg8LQdwjDwtBhycPC0HkNA8LQbciDwtBrTEPC0HVIg8LQa80DwtB3iYPC0HWMg8LQfQ0DwtBgTgPC0H0Nw8LQZI2DwtBnScPC0GCKQ8LQY0jDwtB1zEPC0G9NQ8LQbQ3DwtB2DAPC0G2Jw8LQZo4DwtBpyoPC0HEJw8LQa4jDwtB9SIPCwALQcomIQELIAELFwAgACAALwEuQf7/A3EgAUEAR3I7AS4LGgAgACAALwEuQf3/A3EgAUEAR0EBdHI7AS4LGgAgACAALwEuQfv/A3EgAUEAR0ECdHI7AS4LGgAgACAALwEuQff/A3EgAUEAR0EDdHI7AS4LGgAgACAALwEuQe//A3EgAUEAR0EEdHI7AS4LGgAgACAALwEuQd//A3EgAUEAR0EFdHI7AS4LGgAgACAALwEuQb//A3EgAUEAR0EGdHI7AS4LGgAgACAALwEuQf/+A3EgAUEAR0EHdHI7AS4LGgAgACAALwEuQf/9A3EgAUEAR0EIdHI7AS4LGgAgACAALwEuQf/7A3EgAUEAR0EJdHI7AS4LPgECfwJAIAAoAjgiA0UNACADKAIEIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHhEjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIIIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH8ETYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIMIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHsCjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIQIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH6HjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIUIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHLEDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIYIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG3HzYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIcIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG/FTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIsIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH+CDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIgIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEGMHTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIkIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHmFTYCEEEYIQQLIAQLOAAgAAJ/IAAvATJBFHFBFEYEQEEBIAAtAChBAUYNARogAC8BNEHlAEYMAQsgAC0AKUEFRgs6ADALWQECfwJAIAAtAChBAUYNACAALwE0IgFB5ABrQeQASQ0AIAFBzAFGDQAgAUGwAkYNACAALwEyIgBBwABxDQBBASECIABBiARxQYAERg0AIABBKHFFIQILIAILjAEBAn8CQAJAAkAgAC0AKkUNACAALQArRQ0AIAAvATIiAUECcUUNAQwCCyAALwEyIgFBAXFFDQELQQEhAiAALQAoQQFGDQAgAC8BNCIAQeQAa0HkAEkNACAAQcwBRg0AIABBsAJGDQAgAUHAAHENAEEAIQIgAUGIBHFBgARGDQAgAUEocUEARyECCyACC1cAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==",dQt;Object.defineProperty(hgn,"exports",{get:a(()=>dQt||(dQt=G3o.from(H3o,"base64")),"get")})});var ggn=T((U6u,mgn)=>{"use strict";f();var{Buffer:j3o}=require("node:buffer"),$3o="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCuzaAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADKAIcIgJBAmsO/AEB+QECAwQFBgcICQoLDA0ODxAREvgBE/cBFBX2ARYX9QEYGRobHB0eHyD9AfsBIfQBIiMkJSYnKCkqK/MBLC0uLzAxMvIB8QEzNPAB7wE1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk/6AVBRUlPuAe0BVOwBVesBVldYWVrqAVtcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAekB6AHPAecB0AHmAdEB0gHTAdQB5QHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wEA/AELQQAM4wELQQ4M4gELQQ0M4QELQQ8M4AELQRAM3wELQRMM3gELQRQM3QELQRUM3AELQRYM2wELQRcM2gELQRgM2QELQRkM2AELQRoM1wELQRsM1gELQRwM1QELQR0M1AELQR4M0wELQR8M0gELQSAM0QELQSEM0AELQQgMzwELQSIMzgELQSQMzQELQSMMzAELQQcMywELQSUMygELQSYMyQELQScMyAELQSgMxwELQRIMxgELQREMxQELQSkMxAELQSoMwwELQSsMwgELQSwMwQELQd4BDMABC0EuDL8BC0EvDL4BC0EwDL0BC0ExDLwBC0EyDLsBC0EzDLoBC0E0DLkBC0HfAQy4AQtBNQy3AQtBOQy2AQtBDAy1AQtBNgy0AQtBNwyzAQtBOAyyAQtBPgyxAQtBOgywAQtB4AEMrwELQQsMrgELQT8MrQELQTsMrAELQQoMqwELQTwMqgELQT0MqQELQeEBDKgBC0HBAAynAQtBwAAMpgELQcIADKUBC0EJDKQBC0EtDKMBC0HDAAyiAQtBxAAMoQELQcUADKABC0HGAAyfAQtBxwAMngELQcgADJ0BC0HJAAycAQtBygAMmwELQcsADJoBC0HMAAyZAQtBzQAMmAELQc4ADJcBC0HPAAyWAQtB0AAMlQELQdEADJQBC0HSAAyTAQtB0wAMkgELQdUADJEBC0HUAAyQAQtB1gAMjwELQdcADI4BC0HYAAyNAQtB2QAMjAELQdoADIsBC0HbAAyKAQtB3AAMiQELQd0ADIgBC0HeAAyHAQtB3wAMhgELQeAADIUBC0HhAAyEAQtB4gAMgwELQeMADIIBC0HkAAyBAQtB5QAMgAELQeIBDH8LQeYADH4LQecADH0LQQYMfAtB6AAMewtBBQx6C0HpAAx5C0EEDHgLQeoADHcLQesADHYLQewADHULQe0ADHQLQQMMcwtB7gAMcgtB7wAMcQtB8AAMcAtB8gAMbwtB8QAMbgtB8wAMbQtB9AAMbAtB9QAMawtB9gAMagtBAgxpC0H3AAxoC0H4AAxnC0H5AAxmC0H6AAxlC0H7AAxkC0H8AAxjC0H9AAxiC0H+AAxhC0H/AAxgC0GAAQxfC0GBAQxeC0GCAQxdC0GDAQxcC0GEAQxbC0GFAQxaC0GGAQxZC0GHAQxYC0GIAQxXC0GJAQxWC0GKAQxVC0GLAQxUC0GMAQxTC0GNAQxSC0GOAQxRC0GPAQxQC0GQAQxPC0GRAQxOC0GSAQxNC0GTAQxMC0GUAQxLC0GVAQxKC0GWAQxJC0GXAQxIC0GYAQxHC0GZAQxGC0GaAQxFC0GbAQxEC0GcAQxDC0GdAQxCC0GeAQxBC0GfAQxAC0GgAQw/C0GhAQw+C0GiAQw9C0GjAQw8C0GkAQw7C0GlAQw6C0GmAQw5C0GnAQw4C0GoAQw3C0GpAQw2C0GqAQw1C0GrAQw0C0GsAQwzC0GtAQwyC0GuAQwxC0GvAQwwC0GwAQwvC0GxAQwuC0GyAQwtC0GzAQwsC0G0AQwrC0G1AQwqC0G2AQwpC0G3AQwoC0G4AQwnC0G5AQwmC0G6AQwlC0G7AQwkC0G8AQwjC0G9AQwiC0G+AQwhC0G/AQwgC0HAAQwfC0HBAQweC0HCAQwdC0EBDBwLQcMBDBsLQcQBDBoLQcUBDBkLQcYBDBgLQccBDBcLQcgBDBYLQckBDBULQcoBDBQLQcsBDBMLQcwBDBILQc0BDBELQc4BDBALQc8BDA8LQdABDA4LQdEBDA0LQdIBDAwLQdMBDAsLQdQBDAoLQdUBDAkLQdYBDAgLQeMBDAcLQdcBDAYLQdgBDAULQdkBDAQLQdoBDAMLQdsBDAILQd0BDAELQdwBCyECA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDuMBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISMkJScoKZ4DmwOaA5EDigODA4AD/QL7AvgC8gLxAu8C7QLoAucC5gLlAuQC3ALbAtoC2QLYAtcC1gLVAs8CzgLMAssCygLJAsgCxwLGAsQCwwK+ArwCugK5ArgCtwK2ArUCtAKzArICsQKwAq4CrQKpAqgCpwKmAqUCpAKjAqICoQKgAp8CmAKQAowCiwKKAoEC/gH9AfwB+wH6AfkB+AH3AfUB8wHwAesB6QHoAecB5gHlAeQB4wHiAeEB4AHfAd4B3QHcAdoB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygHJAcgBxwHGAcUBxAHDAcIBwQHAAb8BvgG9AbwBuwG6AbkBuAG3AbYBtQG0AbMBsgGxAbABrwGuAa0BrAGrAaoBqQGoAacBpgGlAaQBowGiAZ8BngGZAZgBlwGWAZUBlAGTAZIBkQGQAY8BjQGMAYcBhgGFAYQBgwGCAX18e3p5dnV0UFFSU1RVCyABIARHDXJB/QEhAgy+AwsgASAERw2YAUHbASECDL0DCyABIARHDfEBQY4BIQIMvAMLIAEgBEcN/AFBhAEhAgy7AwsgASAERw2KAkH/ACECDLoDCyABIARHDZECQf0AIQIMuQMLIAEgBEcNlAJB+wAhAgy4AwsgASAERw0eQR4hAgy3AwsgASAERw0ZQRghAgy2AwsgASAERw3KAkHNACECDLUDCyABIARHDdUCQcYAIQIMtAMLIAEgBEcN1gJBwwAhAgyzAwsgASAERw3cAkE4IQIMsgMLIAMtADBBAUYNrQMMiQMLQQAhAAJAAkACQCADLQAqRQ0AIAMtACtFDQAgAy8BMiICQQJxRQ0BDAILIAMvATIiAkEBcUUNAQtBASEAIAMtAChBAUYNACADLwE0IgZB5ABrQeQASQ0AIAZBzAFGDQAgBkGwAkYNACACQcAAcQ0AQQAhACACQYgEcUGABEYNACACQShxQQBHIQALIANBADsBMiADQQA6ADECQCAARQRAIANBADoAMSADLQAuQQRxDQEMsQMLIANCADcDIAsgA0EAOgAxIANBAToANgxIC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAARQ1IIABBFUcNYiADQQQ2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgyvAwsgASAERgRAQQYhAgyvAwsgAS0AAEEKRw0ZIAFBAWohAQwaCyADQgA3AyBBEiECDJQDCyABIARHDYoDQSMhAgysAwsgASAERgRAQQchAgysAwsCQAJAIAEtAABBCmsOBAEYGAAYCyABQQFqIQFBECECDJMDCyABQQFqIQEgA0Evai0AAEEBcQ0XQQAhAiADQQA2AhwgAyABNgIUIANBmSA2AhAgA0EZNgIMDKsDCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMWg0YQQghAgyqAwsgASAERwRAIANBCTYCCCADIAE2AgRBFCECDJEDC0EJIQIMqQMLIAMpAyBQDa4CDEMLIAEgBEYEQEELIQIMqAMLIAEtAABBCkcNFiABQQFqIQEMFwsgA0Evai0AAEEBcUUNGQwmC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRkMQgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0aDCQLQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGwwyCyADQS9qLQAAQQFxRQ0cDCILQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANHAxCC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADR0MIAsgASAERgRAQRMhAgygAwsCQCABLQAAIgBBCmsOBB8jIwAiCyABQQFqIQEMHwtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0iDEILIAEgBEYEQEEWIQIMngMLIAEtAABBwMEAai0AAEEBRw0jDIMDCwJAA0AgAS0AAEGwO2otAAAiAEEBRwRAAkAgAEECaw4CAwAnCyABQQFqIQFBISECDIYDCyAEIAFBAWoiAUcNAAtBGCECDJ0DCyADKAIEIQBBACECIANBADYCBCADIAAgAUEBaiIBEDQiAA0hDEELQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIwwqCyABIARGBEBBHCECDJsDCyADQQo2AgggAyABNgIEQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANJUEkIQIMgQMLIAEgBEcEQANAIAEtAABBsD1qLQAAIgBBA0cEQCAAQQFrDgUYGiaCAyUmCyAEIAFBAWoiAUcNAAtBGyECDJoDC0EbIQIMmQMLA0AgAS0AAEGwP2otAAAiAEEDRwRAIABBAWsOBQ8RJxMmJwsgBCABQQFqIgFHDQALQR4hAgyYAwsgASAERwRAIANBCzYCCCADIAE2AgRBByECDP8CC0EfIQIMlwMLIAEgBEYEQEEgIQIMlwMLAkAgAS0AAEENaw4ULj8/Pz8/Pz8/Pz8/Pz8/Pz8/PwA/C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAyWAwsgA0EvaiECA0AgASAERgRAQSEhAgyXAwsCQAJAAkAgAS0AACIAQQlrDhgCACkpASkpKSkpKSkpKSkpKSkpKSkpKQInCyABQQFqIQEgA0Evai0AAEEBcUUNCgwYCyABQQFqIQEMFwsgAUEBaiEBIAItAABBAnENAAtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwMlQMLIAMtAC5BgAFxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ3mAiAAQRVGBEAgA0EkNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMlAMLQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDJMDC0EAIQIgA0EANgIcIAMgATYCFCADQb4gNgIQIANBAjYCDAySAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEgDKdqIgEQMiIARQ0rIANBBzYCHCADIAE2AhQgAyAANgIMDJEDCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlgiAkUNACADIAIRAAAhAAsgAEUNKyAAQRVGBEAgA0EKNgIcIAMgATYCFCADQesZNgIQIANBFTYCDEEAIQIMkAMLQQAhAiADQQA2AhwgAyABNgIUIANBkww2AhAgA0ETNgIMDI8DC0EAIQIgA0EANgIcIAMgATYCFCADQYIVNgIQIANBAjYCDAyOAwtBACECIANBADYCHCADIAE2AhQgA0HdFDYCECADQRk2AgwMjQMLQQAhAiADQQA2AhwgAyABNgIUIANB5h02AhAgA0EZNgIMDIwDCyAAQRVGDT1BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMiwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUNKCADQQ02AhwgAyABNgIUIAMgADYCDAyKAwsgAEEVRg06QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIkDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCgLIANBDjYCHCADIAA2AgwgAyABQQFqNgIUDIgDCyAAQRVGDTdBACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMhwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJwsgA0EPNgIcIAMgADYCDCADIAFBAWo2AhQMhgMLQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDIUDCyAAQRVGDTNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwMhAMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUNJSADQRE2AhwgAyABNgIUIAMgADYCDAyDAwsgAEEVRg0wQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIIDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDCULIANBEjYCHCADIAA2AgwgAyABQQFqNgIUDIEDCyADQS9qLQAAQQFxRQ0BC0EXIQIM5gILQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDP4CCyAAQTtHDQAgAUEBaiEBDAwLQQAhAiADQQA2AhwgAyABNgIUIANBkhg2AhAgA0ECNgIMDPwCCyAAQRVGDShBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM+wILIANBFDYCHCADIAE2AhQgAyAANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIM1AILIANBIDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNMCCyADQRM2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzSAgsgA0ELNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0QILIANBEDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNACCyADQSA2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzPAgsgA0ELNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzgILIANBDDYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM0CC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAzMAgsCQANAAkAgAS0AAEEKaw4EAAICAAILIAQgAUEBaiIBRw0AC0H9ASECDMwCCwJAAkAgAy0ANkEBRw0AQQAhAAJAIAMoAjgiAkUNACACKAJgIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB/AE2AhwgAyABNgIUIANB3Bk2AhAgA0EVNgIMQQAhAgzNAgtB3AEhAgyzAgsgA0EANgIcIAMgATYCFCADQfkLNgIQIANBHzYCDEEAIQIMywILAkACQCADLQAoQQFrDgIEAQALQdsBIQIMsgILQdQBIQIMsQILIANBAjoAMUEAIQACQCADKAI4IgJFDQAgAigCACICRQ0AIAMgAhEAACEACyAARQRAQd0BIQIMsQILIABBFUcEQCADQQA2AhwgAyABNgIUIANBtAw2AhAgA0EQNgIMQQAhAgzKAgsgA0H7ATYCHCADIAE2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQIMkAILIAFBAWohAUGFASECDI8CCyABQQFqIQFBhgEhAgyOAgsgAUEBaiEBQYkBIQIMjQILIAFBAWohAUGKASECDIwCCyABQQFqIQFBjQEhAgyLAgsgAUEBaiEBQZYBIQIMigILIAFBAWohAUGXASECDIkCCyABQQFqIQFBmAEhAgyIAgsgAUEBaiEBQaUBIQIMhwILIAFBAWohAUGmASECDIYCCyABQQFqIQFBrAEhAgyFAgsgAUEBaiEBQbQBIQIMhAILIAFBAWohAUG3ASECDIMCCyABQQFqIQFBvgEhAgyCAgsgASAERgRAQdYBIQIMmwILIAEtAABBzgBHDUggAUEBaiEBQb0BIQIMgQILIAEgBEYEQEHVASECDJoCCwJAAkACQCABLQAAQcIAaw4SAEpKSkpKSkpKSgFKSkpKSkoCSgsgAUEBaiEBQbgBIQIMggILIAFBAWohAUG7ASECDIECCyABQQFqIQFBvAEhAgyAAgtB1AEhAiABIARGDZgCIAMoAgAiACAEIAFraiEFIAEgAGtBB2ohBgJAA0AgAS0AACAAQajVAGotAABHDUUgAEEHRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJkCCyADQQA2AgAgBkEBaiEBQRsMRQsgASAERgRAQdMBIQIMmAILAkACQCABLQAAQckAaw4HAEdHR0dHAUcLIAFBAWohAUG5ASECDP8BCyABQQFqIQFBugEhAgz+AQtB0gEhAiABIARGDZYCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQabVAGotAABHDUMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJcCCyADQQA2AgAgBkEBaiEBQQ8MQwtB0QEhAiABIARGDZUCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQaTVAGotAABHDUIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYCCyADQQA2AgAgBkEBaiEBQSAMQgtB0AEhAiABIARGDZQCIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDUEgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJUCCyADQQA2AgAgBkEBaiEBQRIMQQsgASAERgRAQc8BIQIMlAILAkACQCABLQAAQcUAaw4OAENDQ0NDQ0NDQ0NDQwFDCyABQQFqIQFBtQEhAgz7AQsgAUEBaiEBQbYBIQIM+gELQc4BIQIgASAERg2SAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGe1QBqLQAARw0/IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyTAgsgA0EANgIAIAZBAWohAUEHDD8LQc0BIQIgASAERg2RAiADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGY1QBqLQAARw0+IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAySAgsgA0EANgIAIAZBAWohAUEoDD4LIAEgBEYEQEHMASECDJECCwJAAkACQCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEH51ABqLQAARw0yIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyGAgsgA0EANgIAIAZBAWohAUErDDILQcABIQIgASAERg2EAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH21ABqLQAARw0xIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyFAgsgA0EANgIAIAZBAWohAUEsDDELQb8BIQIgASAERg2DAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0wIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyEAgsgA0EANgIAIAZBAWohAUERDDALQb4BIQIgASAERg2CAiADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHy1ABqLQAARw0vIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyDAgsgA0EANgIAIAZBAWohAUEuDC8LIAEgBEYEQEG9ASECDIICCwJAAkACQAJAAkAgAS0AAEHBAGsOFQA0NDQ0NDQ0NDQ0ATQ0AjQ0AzQ0BDQLIAFBAWohAUGbASECDOwBCyABQQFqIQFBnAEhAgzrAQsgAUEBaiEBQZ0BIQIM6gELIAFBAWohAUGiASECDOkBCyABQQFqIQFBpAEhAgzoAQsgASAERgRAQbwBIQIMgQILAkACQCABLQAAQdIAaw4DADABMAsgAUEBaiEBQaMBIQIM6AELIAFBAWohAUEEDC0LQbsBIQIgASAERg3/ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHw1ABqLQAARw0sIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyAAgsgA0EANgIAIAZBAWohAUEdDCwLIAEgBEYEQEG6ASECDP8BCwJAAkAgAS0AAEHJAGsOBwEuLi4uLgAuCyABQQFqIQFBoQEhAgzmAQsgAUEBaiEBQSIMKwsgASAERgRAQbkBIQIM/gELIAEtAABB0ABHDSsgAUEBaiEBQaABIQIM5AELIAEgBEYEQEG4ASECDP0BCwJAAkAgAS0AAEHGAGsOCwAsLCwsLCwsLCwBLAsgAUEBaiEBQZ4BIQIM5AELIAFBAWohAUGfASECDOMBC0G3ASECIAEgBEYN+wEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB7NQAai0AAEcNKCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM/AELIANBADYCACAGQQFqIQFBDQwoC0G2ASECIAEgBEYN+gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNJyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+wELIANBADYCACAGQQFqIQFBDAwnC0G1ASECIAEgBEYN+QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6tQAai0AAEcNJiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+gELIANBADYCACAGQQFqIQFBAwwmC0G0ASECIAEgBEYN+AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6NQAai0AAEcNJSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+QELIANBADYCACAGQQFqIQFBJgwlCyABIARGBEBBswEhAgz4AQsCQAJAIAEtAABB1ABrDgIAAScLIAFBAWohAUGZASECDN8BCyABQQFqIQFBmgEhAgzeAQtBsgEhAiABIARGDfYBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQebUAGotAABHDSMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPcBCyADQQA2AgAgBkEBaiEBQScMIwtBsQEhAiABIARGDfUBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQeTUAGotAABHDSIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPYBCyADQQA2AgAgBkEBaiEBQRwMIgtBsAEhAiABIARGDfQBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQd7UAGotAABHDSEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPUBCyADQQA2AgAgBkEBaiEBQQYMIQtBrwEhAiABIARGDfMBIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQdnUAGotAABHDSAgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPQBCyADQQA2AgAgBkEBaiEBQRkMIAsgASAERgRAQa4BIQIM8wELAkACQAJAAkAgAS0AAEEtaw4jACQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkASQkJCQkAiQkJAMkCyABQQFqIQFBjgEhAgzcAQsgAUEBaiEBQY8BIQIM2wELIAFBAWohAUGUASECDNoBCyABQQFqIQFBlQEhAgzZAQtBrQEhAiABIARGDfEBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQdfUAGotAABHDR4gAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPIBCyADQQA2AgAgBkEBaiEBQQsMHgsgASAERgRAQawBIQIM8QELAkACQCABLQAAQcEAaw4DACABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiEBQQAMCgsgASAERgRAQZkBIQIM3QELAkACQCABLQAAQcgAaw4IAAwMDAwMDAEMCyABQQFqIQFB/QAhAgzEAQsgAUEBaiEBQYABIQIMwwELIAEgBEYEQEGYASECDNwBCwJAAkAgAS0AAEHOAGsOAwALAQsLIAFBAWohAUH+ACECDMMBCyABQQFqIQFB/wAhAgzCAQsgASAERgRAQZcBIQIM2wELIAEtAABB2QBHDQggAUEBaiEBQQgMBwtBlgEhAiABIARGDdkBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazUAGotAABHDQYgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNoBCyADQQA2AgAgBkEBaiEBQQUMBgtBlQEhAiABIARGDdgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQabUAGotAABHDQUgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNkBCyADQQA2AgAgBkEBaiEBQRYMBQtBlAEhAiABIARGDdcBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHXACECDHQLIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ16IANB6AA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAEgBEYEQEHnACECDIwBCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDXsgA0HmADYCHCADIAE2AhQgAyAANgIMQQAhAgyMAQtB1gAhAgxyCyABIARGBEBB5QAhAgyLAQtBACEAQQEhBUEBIQdBACECAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkAgAS0AAEEwaw4KCgkAAQIDBAUGCAsLQQIMBgtBAwwFC0EEDAQLQQUMAwtBBgwCC0EHDAELQQgLIQJBACEFQQAhBwwCC0EJIQJBASEAQQAhBUEAIQcMAQtBACEFQQEhAgsgAyACOgArIAFBAWohAQJAAkAgAy0ALkEQcQ0AAkACQAJAIAMtACoOAwEAAgQLIAdFDQMMAgsgAA0BDAILIAVFDQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANB4gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ19IANB4wA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5AA2AhwgAyABNgIUIAMgADYCDAyLAQtB1AAhAgxxCyADLQApQSJGDYYBQdMAIQIMcAtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsgAEUEQEHVACECDHALIABBFUcEQCADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgyJAQsgA0HhADYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDIgBCyABIARGBEBB4AAhAgyIAQsCQAJAAkACQAJAIAEtAABBCmsOBAEEBAAECyABQQFqIQEMAQsgAUEBaiEBIANBL2otAABBAXFFDQELQdIAIQIMcAsgA0EANgIcIAMgATYCFCADQbYRNgIQIANBCTYCDEEAIQIMiAELIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIcBCyABIARGBEBB3wAhAgyHAQsgAS0AAEEKRgRAIAFBAWohAQwJCyADLQAuQcAAcQ0IIANBADYCHCADIAE2AhQgA0G2ETYCECADQQI2AgxBACECDIYBCyABIARGBEBB3QAhAgyGAQsgAS0AACICQQ1GBEAgAUEBaiEBQdAAIQIMbQsgASEAIAJBCWsOBAUBAQUBCyAEIAEiAEYEQEHcACECDIUBCyAALQAAQQpHDQAgAEEBagwCC0EAIQIgA0EANgIcIAMgADYCFCADQcotNgIQIANBBzYCDAyDAQsgASAERgRAQdsAIQIMgwELAkAgAS0AAEEJaw4EAwAAAwALIAFBAWoLIQFBzgAhAgxoCyABIARGBEBB2gAhAgyBAQsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0GaEjYCECADQQc2AgwgAyABQQFqNgIUDH8LIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjgiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDH4LQc0AIQIMZAsgA0EANgIcIAMgATYCFCADQckNNgIQIANBGjYCDEEAIQIMfAsgASAERgRAQdkAIQIMfAsgAS0AAEEgRw09IAFBAWohASADLQAuQQFxDT0gA0EANgIcIAMgATYCFCADQcIcNgIQIANBHjYCDEEAIQIMewsgASAERgRAQdgAIQIMewsCQAJAAkACQAJAIAEtAAAiAEEKaw4EAgMDAAELIAFBAWohAUEsIQIMZQsgAEE6Rw0BIANBADYCHCADIAE2AhQgA0HnETYCECADQQo2AgxBACECDH0LIAFBAWohASADQS9qLQAAQQFxRQ1zIAMtADJBgAFxRQRAIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsCQAJAIAAOFk1MSwEBAQEBAQEBAQEBAQEBAQEBAQABCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgx+CyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgx9C0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ1ZIABBFUcNASADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgx8C0HLACECDGILQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDHoLIAMgAy8BMkGAAXI7ATIMOwsgASAERwRAIANBETYCCCADIAE2AgRBygAhAgxgC0HXACECDHgLIAEgBEYEQEHWACECDHgLAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAQEBAQEBAQEBAQEBAAUBAQAIDQAsgAUEBaiEBQcYAIQIMYQsgAUEBaiEBQccAIQIMYAsgAUEBaiEBQcgAIQIMXwsgAUEBaiEBQckAIQIMXgtB1QAhAiAEIAEiAEYNdiAEIAFrIAMoAgAiAWohBiAAIAFrQQVqIQcDQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQhBBCABQQVGDQoaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHYLQdQAIQIgBCABIgBGDXUgBCABayADKAIAIgFqIQYgACABa0EPaiEHA0AgAUGAyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0HQQMgAUEPRg0JGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx1C0HTACECIAQgASIARg10IAQgAWsgAygCACIBaiEGIAAgAWtBDmohBwNAIAFB4scAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNBiABQQ5GDQcgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdAtB0gAhAiAEIAEiAEYNcyAEIAFrIAMoAgAiAWohBSAAIAFrQQFqIQYDQCABQeDHAGotAAAgAC0AACIHQSByIAcgB0HBAGtB/wFxQRpJG0H/AXFHDQUgAUEBRg0CIAFBAWohASAEIABBAWoiAEcNAAsgAyAFNgIADHMLIAEgBEYEQEHRACECDHMLAkACQCABLQAAIgBBIHIgACAAQcEAa0H/AXFBGkkbQf8BcUHuAGsOBwA5OTk5OQE5CyABQQFqIQFBwwAhAgxaCyABQQFqIQFBxAAhAgxZCyADQQA2AgAgBkEBaiEBQcUAIQIMWAtB0AAhAiAEIAEiAEYNcCAEIAFrIAMoAgAiAWohBiAAIAFrQQlqIQcDQCABQdbHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQJBAiABQQlGDQQaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHALQc8AIQIgBCABIgBGDW8gBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUHQxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxvCyAAIQEgA0EANgIADDMLQQELOgAsIANBADYCACAHQQFqIQELQS0hAgxSCwJAA0AgAS0AAEHQxQBqLQAAQQFHDQEgBCABQQFqIgFHDQALQc0AIQIMawtBwgAhAgxRCyABIARGBEBBzAAhAgxqCyABLQAAQTpGBEAgAygCBCEAIANBADYCBCADIAAgARAwIgBFDTMgA0HLADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxqCyADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgxpCwJAAkAgAy0ALEECaw4CAAEnCyADQTNqLQAAQQJxRQ0mIAMtAC5BAnENJiADQQA2AhwgAyABNgIUIANBphQ2AhAgA0ELNgIMQQAhAgxpCyADLQAyQSBxRQ0lIAMtAC5BAnENJSADQQA2AhwgAyABNgIUIANBvRM2AhAgA0EPNgIMQQAhAgxoC0EAIQACQCADKAI4IgJFDQAgAigCSCICRQ0AIAMgAhEAACEACyAARQRAQcEAIQIMTwsgAEEVRwRAIANBADYCHCADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAxkCyADQQA2AgAMBQsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkcNAyABQQFqIQEMBQsgBCABQQFqIgFHDQALQcUAIQIMZAtBxQAhAgxjCwsgA0EAOgAsDAELQQshAgxHC0E/IQIMRgsCQAJAA0AgAS0AACIAQSBHBEACQCAAQQprDgQDBQUDAAsgAEEsRg0DDAQLIAQgAUEBaiIBRw0AC0HGACECDGALIANBCDoALAwOCyADLQAoQQFHDQIgAy0ALkEIcQ0CIAMoAgQhACADQQA2AgQgAyAAIAEQMSIABEAgA0HCADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxfCyABQQFqIQEMUAtBOyECDEQLAkADQCABLQAAIgBBIEcgAEEJR3ENASAEIAFBAWoiAUcNAAtBwwAhAgxdCwtBPCECDEILAkACQCABIARHBEADQCABLQAAIgBBIEcEQCAAQQprDgQDBAQDBAsgBCABQQFqIgFHDQALQT8hAgxdC0E/IQIMXAsgAyADLwEyQSByOwEyDAoLIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQ1OIANBPjYCHCADIAE2AhQgAyAANgIMQQAhAgxaCwJAIAEgBEcEQANAIAEtAABBwMMAai0AACIAQQFHBEAgAEECRg0DDAwLIAQgAUEBaiIBRw0AC0E3IQIMWwtBNyECDFoLIAFBAWohAQwEC0E7IQIgBCABIgBGDVggBCABayADKAIAIgFqIQYgACABa0EFaiEHAkADQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEFRgRAQQchAQw/CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxZCyADQQA2AgAgACEBDAULQTohAiAEIAEiAEYNVyAEIAFrIAMoAgAiAWohBiAAIAFrQQhqIQcCQANAIAFBtMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQhGBEBBBSEBDD4LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFgLIANBADYCACAAIQEMBAtBOSECIAQgASIARg1WIAQgAWsgAygCACIBaiEGIAAgAWtBA2ohBwJAA0AgAUGwwQBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBA0YEQEEGIQEMPQsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMVwsgA0EANgIAIAAhAQwDCwJAA0AgAS0AACIAQSBHBEAgAEEKaw4EBwQEBwILIAQgAUEBaiIBRw0AC0E4IQIMVgsgAEEsRw0BIAFBAWohAEEBIQECQAJAAkACQAJAIAMtACxBBWsOBAMBAgQACyAAIQEMBAtBAiEBDAELQQQhAQsgA0EBOgAsIAMgAy8BMiABcjsBMiAAIQEMAQsgAyADLwEyQQhyOwEyIAAhAQtBPiECDDsLIANBADoALAtBOSECDDkLIAEgBEYEQEE2IQIMUgsCQAJAAkACQAJAIAEtAABBCmsOBAACAgECCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNAiADQTM2AhwgAyABNgIUIAMgADYCDEEAIQIMVQsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDAYLIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxUCyADLQAuQQFxBEBB3wEhAgw7CyADKAIEIQAgA0EANgIEIAMgACABEDEiAA0BDEkLQTQhAgw5CyADQTU2AhwgAyABNgIUIAMgADYCDEEAIQIMUQtBNSECDDcLIANBL2otAABBAXENACADQQA2AhwgAyABNgIUIANB6xY2AhAgA0EZNgIMQQAhAgxPC0EzIQIMNQsgASAERgRAQTIhAgxOCwJAIAEtAABBCkYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZIXNgIQIANBAzYCDEEAIQIMTgtBMiECDDQLIAEgBEYEQEExIQIMTQsCQCABLQAAIgBBCUYNACAAQSBGDQBBASECAkAgAy0ALEEFaw4EBgQFAA0LIAMgAy8BMkEIcjsBMgwMCyADLQAuQQFxRQ0BIAMtACxBCEcNACADQQA6ACwLQT0hAgwyCyADQQA2AhwgAyABNgIUIANBwhY2AhAgA0EKNgIMQQAhAgxKC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyDAYLIAEgBEYEQEEwIQIMRwsgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQQFxDQAgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMRgtBMCECDCwLIAFBAWohAUExIQIMKwsgASAERgRAQS8hAgxECyABLQAAIgBBCUcgAEEgR3FFBEAgAUEBaiEBIAMtAC5BAXENASADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgxEC0EBIQICQAJAAkACQAJAAkAgAy0ALEECaw4HBQQEAwECAAQLIAMgAy8BMkEIcjsBMgwDC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyC0EvIQIMKwsgA0EANgIcIAMgATYCFCADQYQTNgIQIANBCzYCDEEAIQIMQwtB4QEhAgwpCyABIARGBEBBLiECDEILIANBADYCBCADQRI2AgggAyABIAEQMSIADQELQS4hAgwnCyADQS02AhwgAyABNgIUIAMgADYCDEEAIQIMPwtBACEAAkAgAygCOCICRQ0AIAIoAkwiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HYADYCHCADIAE2AhQgA0GzGzYCECADQRU2AgxBACECDD4LQcwAIQIMJAsgA0EANgIcIAMgATYCFCADQbMONgIQIANBHTYCDEEAIQIMPAsgASAERgRAQc4AIQIMPAsgAS0AACIAQSBGDQIgAEE6Rg0BCyADQQA6ACxBCSECDCELIAMoAgQhACADQQA2AgQgAyAAIAEQMCIADQEMAgsgAy0ALkEBcQRAQd4BIQIMIAsgAygCBCEAIANBADYCBCADIAAgARAwIgBFDQIgA0EqNgIcIAMgADYCDCADIAFBAWo2AhRBACECDDgLIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMNwsgAUEBaiEBQcAAIQIMHQsgAUEBaiEBDCwLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJcIgJFDQAgAyACEQAAIQALIABFDRIgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0GQDjYCECADQRQ2AgxBACECDDULIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsgAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIANBAToAMAsgAiACLwEAQcAAcjsBAAtBKyECDBgLIANBKTYCHCADIAE2AhQgA0GsGTYCECADQRU2AgxBACECDDALIANBADYCHCADIAE2AhQgA0HlCzYCECADQRE2AgxBACECDC8LIANBADYCHCADIAE2AhQgA0GlCzYCECADQQI2AgxBACECDC4LQQEhByADLwEyIgVBCHFFBEAgAykDIEIAUiEHCwJAIAMtADAEQEEBIQAgAy0AKUEFRg0BIAVBwABxRSAHcUUNAQsCQCADLQAoIgJBAkYEQEEBIQAgAy8BNCIGQeUARg0CQQAhACAFQcAAcQ0CIAZB5ABGDQIgBkHmAGtBAkkNAiAGQcwBRg0CIAZBsAJGDQIMAQtBACEAIAVBwABxDQELQQIhACAFQQhxDQAgBUGABHEEQAJAIAJBAUcNACADLQAuQQpxDQBBBSEADAILQQQhAAwBCyAFQSBxRQRAIAMQNkEAR0ECdCEADAELQQBBAyADKQMgUBshAAsgAEEBaw4FAgAHAQMEC0ERIQIMEwsgA0EBOgAxDCkLQQAhAgJAIAMoAjgiAEUNACAAKAIwIgBFDQAgAyAAEQAAIQILIAJFDSYgAkEVRgRAIANBAzYCHCADIAE2AhQgA0HSGzYCECADQRU2AgxBACECDCsLQQAhAiADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMDCoLIANBADYCHCADIAE2AhQgA0H5IDYCECADQQ82AgxBACECDCkLQQAhAAJAIAMoAjgiAkUNACACKAIwIgJFDQAgAyACEQAAIQALIAANAQtBDiECDA4LIABBFUYEQCADQQI2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwnCyADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMQQAhAgwmC0EqIQIMDAsgASAERwRAIANBCTYCCCADIAE2AgRBKSECDAwLQSYhAgwkCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMVARAQSUhAgwkCyADKAIEIQAgA0EANgIEIAMgACABIAynaiIBEDIiAEUNACADQQU2AhwgAyABNgIUIAMgADYCDEEAIQIMIwtBDyECDAkLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQTBrDjcXFgABAgMEBQYHFBQUFBQUFAgJCgsMDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUDg8QERITFAtCAiEKDBYLQgMhCgwVC0IEIQoMFAtCBSEKDBMLQgYhCgwSC0IHIQoMEQtCCCEKDBALQgkhCgwPC0IKIQoMDgtCCyEKDA0LQgwhCgwMC0INIQoMCwtCDiEKDAoLQg8hCgwJC0IKIQoMCAtCCyEKDAcLQgwhCgwGC0INIQoMBQtCDiEKDAQLQg8hCgwDCyADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMQQAhAgwhCyABIARGBEBBIiECDCELQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FRQAAQIDBAUGBxYWFhYWFhYICQoLDA0WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFg4PEBESExYLQgIhCgwUC0IDIQoMEwtCBCEKDBILQgUhCgwRC0IGIQoMEAtCByEKDA8LQgghCgwOC0IJIQoMDQtCCiEKDAwLQgshCgwLC0IMIQoMCgtCDSEKDAkLQg4hCgwIC0IPIQoMBwtCCiEKDAYLQgshCgwFC0IMIQoMBAtCDSEKDAMLQg4hCgwCC0IPIQoMAQtCASEKCyABQQFqIQEgAykDICILQv//////////D1gEQCADIAtCBIYgCoQ3AyAMAgsgA0EANgIcIAMgATYCFCADQbUJNgIQIANBDDYCDEEAIQIMHgtBJyECDAQLQSghAgwDCyADIAE6ACwgA0EANgIAIAdBAWohAUEMIQIMAgsgA0EANgIAIAZBAWohAUEKIQIMAQsgAUEBaiEBQQghAgwACwALQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBcLQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBYLQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBULQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDBQLQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDBMLQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBILQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBELQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBALQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDA8LQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDA4LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDA0LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDAwLQQAhAiADQQA2AhwgAyABNgIUIANBmRM2AhAgA0ELNgIMDAsLQQAhAiADQQA2AhwgAyABNgIUIANBnQk2AhAgA0ELNgIMDAoLQQAhAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMDAkLQQAhAiADQQA2AhwgAyABNgIUIANBsRA2AhAgA0EKNgIMDAgLQQAhAiADQQA2AhwgAyABNgIUIANBux02AhAgA0ECNgIMDAcLQQAhAiADQQA2AhwgAyABNgIUIANBlhY2AhAgA0ECNgIMDAYLQQAhAiADQQA2AhwgAyABNgIUIANB+Rg2AhAgA0ECNgIMDAULQQAhAiADQQA2AhwgAyABNgIUIANBxBg2AhAgA0ECNgIMDAQLIANBAjYCHCADIAE2AhQgA0GpHjYCECADQRY2AgxBACECDAMLQd4AIQIgASAERg0CIAlBCGohByADKAIAIQUCQAJAIAEgBEcEQCAFQZbIAGohCCAEIAVqIAFrIQYgBUF/c0EKaiIFIAFqIQADQCABLQAAIAgtAABHBEBBAiEIDAMLIAVFBEBBACEIIAAhAQwDCyAFQQFrIQUgCEEBaiEIIAQgAUEBaiIBRw0ACyAGIQUgBCEBCyAHQQE2AgAgAyAFNgIADAELIANBADYCACAHIAg2AgALIAcgATYCBCAJKAIMIQACQAJAIAkoAghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArYhCAYNQDQAgAEECdEHQOGooAgAPCwALFwAgAEEvTwRAAAsgAEECdEHsOWooAgALvwkBAX9B9C0hAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HqLA8LQZgmDwtB7TEPC0GgNw8LQckpDwtBtCkPC0GWLQ8LQesrDwtBojUPC0HbNA8LQeApDwtB4yQPC0HVJA8LQe4kDwtB5iUPC0HKNA8LQdA3DwtBqjUPC0H1LA8LQfYmDwtBgiIPC0HyMw8LQb4oDwtB5zcPC0HNIQ8LQcAhDwtBuCUPC0HLJQ8LQZYkDwtBjzQPC0HNNQ8LQd0qDwtB7jMPC0GcNA8LQZ4xDwtB9DUPC0HlIg8LQa8lDwtBmTEPC0GyNg8LQfk2DwtBxDIPC0HdLA8LQYIxDwtBwTEPC0GNNw8LQckkDwtB7DYPC0HnKg8LQcgjDwtB4iEPC0HJNw8LQaUiDwtBlCIPC0HbNg8LQd41DwtBhiYPC0G8Kw8LQYsyDwtBoCMPC0H2MA8LQYAsDwtBiSsPC0GkJg8LQfIjDwtBgSgPC0GrMg8LQesnDwtBwjYPC0GiJA8LQc8qDwtB3CMPC0GHJw8LQeQ0DwtBtyIPC0GtMQ8LQdUiDwtBrzQPC0HeJg8LQdYyDwtB9DQPC0GBOA8LQfQ3DwtBkjYPC0GdJw8LQYIpDwtBjSMPC0HXMQ8LQb01DwtBtDcPC0HYMA8LQbYnDwtBmjgPC0GnKg8LQcQnDwtBriMPC0H1Ig8LAAtByiYhAQsgAQsXACAAIAAvAS5B/v8DcSABQQBHcjsBLgsaACAAIAAvAS5B/f8DcSABQQBHQQF0cjsBLgsaACAAIAAvAS5B+/8DcSABQQBHQQJ0cjsBLgsaACAAIAAvAS5B9/8DcSABQQBHQQN0cjsBLgsaACAAIAAvAS5B7/8DcSABQQBHQQR0cjsBLgsaACAAIAAvAS5B3/8DcSABQQBHQQV0cjsBLgsaACAAIAAvAS5Bv/8DcSABQQBHQQZ0cjsBLgsaACAAIAAvAS5B//4DcSABQQBHQQd0cjsBLgsaACAAIAAvAS5B//0DcSABQQBHQQh0cjsBLgsaACAAIAAvAS5B//sDcSABQQBHQQl0cjsBLgs+AQJ/AkAgACgCOCIDRQ0AIAMoAgQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeESNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAggiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfwRNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAgwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQewKNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfoeNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQcsQNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhgiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQbcfNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQb8VNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQf4INgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQYwdNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeYVNgIQQRghBAsgBAs4ACAAAn8gAC8BMkEUcUEURgRAQQEgAC0AKEEBRg0BGiAALwE0QeUARgwBCyAALQApQQVGCzoAMAtZAQJ/AkAgAC0AKEEBRg0AIAAvATQiAUHkAGtB5ABJDQAgAUHMAUYNACABQbACRg0AIAAvATIiAEHAAHENAEEBIQIgAEGIBHFBgARGDQAgAEEocUUhAgsgAguMAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQAgAC8BMiIBQQJxRQ0BDAILIAAvATIiAUEBcUUNAQtBASECIAAtAChBAUYNACAALwE0IgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNACABQcAAcQ0AQQAhAiABQYgEcUGABEYNACABQShxQQBHIQILIAILcwAgAEEQav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAP0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEwav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEgav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==",pQt;Object.defineProperty(mgn,"exports",{get:a(()=>pQt||(pQt=j3o.from($3o,"base64")),"get")})});var U1e=T((G6u,Tgn)=>{"use strict";f();var Agn=["GET","HEAD","POST"],V3o=new Set(Agn),W3o=[101,204,205,304],ygn=[301,302,303,307,308],z3o=new Set(ygn),Egn=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],Y3o=new Set(Egn),_gn=["no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],K3o=["",..._gn],J3o=new Set(_gn),X3o=["follow","manual","error"],Cgn=["GET","HEAD","OPTIONS","TRACE"],Z3o=new Set(Cgn),eLo=["navigate","same-origin","no-cors","cors"],tLo=["omit","same-origin","include"],rLo=["default","no-store","reload","no-cache","force-cache","only-if-cached"],nLo=["content-encoding","content-language","content-location","content-type","content-length"],iLo=["half"],vgn=["CONNECT","TRACE","TRACK"],oLo=new Set(vgn),bgn=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],sLo=new Set(bgn);Tgn.exports={subresource:bgn,forbiddenMethods:vgn,requestBodyHeader:nLo,referrerPolicy:K3o,requestRedirect:X3o,requestMode:eLo,requestCredentials:tLo,requestCache:rLo,redirectStatus:ygn,corsSafeListedMethods:Agn,nullBodyStatus:W3o,safeMethods:Cgn,badPorts:Egn,requestDuplex:iLo,subresourceSet:sLo,badPortsSet:Y3o,redirectStatusSet:z3o,corsSafeListedMethodsSet:V3o,safeMethodsSet:Z3o,forbiddenMethodsSet:oLo,referrerPolicyTokens:J3o}});var mQt=T((j6u,Sgn)=>{"use strict";f();var hQt=Symbol.for("undici.globalOrigin.1");function aLo(){return globalThis[hQt]}a(aLo,"getGlobalOrigin");function cLo(t){if(t===void 0){Object.defineProperty(globalThis,hQt,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,hQt,{value:e,writable:!0,enumerable:!1,configurable:!1})}a(cLo,"setGlobalOrigin");Sgn.exports={getGlobalOrigin:aLo,setGlobalOrigin:cLo}});var uWe=T((W6u,Ign)=>{"use strict";f();var lLo=new TextDecoder;function uLo(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),lLo.decode(t))}a(uLo,"utf8DecodeBytes");Ign.exports={utf8DecodeBytes:uLo}});var rO=T((K6u,Pgn)=>{"use strict";f();var xgn=require("node:assert"),{utf8DecodeBytes:dLo}=uWe();function fLo(t,e,r){let n="";for(;r.positione)return String.fromCharCode.apply(null,t);let r="",n=0,o=65535;for(;ne&&(o=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=o));return r}a(gLo,"isomorphicDecode");var ALo=/[^\x00-\xFF]/;function yLo(t){return xgn(!ALo.test(t)),t}a(yLo,"isomorphicEncode");function ELo(t){return JSON.parse(dLo(t))}a(ELo,"parseJSONFromBytes");function _Lo(t,e=!0,r=!0){return Rgn(t,e,r,wgn)}a(_Lo,"removeASCIIWhitespace");function Rgn(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o0&&n(t.charCodeAt(s));)s--;return o===0&&s===t.length-1?t:t.slice(o,s+1)}a(Rgn,"removeChars");function CLo(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return xgn(typeof e=="string"),e}a(CLo,"serializeJavascriptValueToJSONString");Pgn.exports={collectASequenceOfCodePoints:fLo,collectASequenceOfCodePointsFast:pLo,forgivingBase64:mLo,isASCIIWhitespace:wgn,isomorphicDecode:gLo,isomorphicEncode:yLo,parseJSONFromBytes:ELo,removeASCIIWhitespace:_Lo,removeChars:Rgn,serializeJavascriptValueToJSONString:CLo}});var oS=T((Z6u,Bgn)=>{"use strict";f();var fWe=require("node:assert"),{forgivingBase64:vLo,collectASequenceOfCodePoints:gQt,collectASequenceOfCodePointsFast:Q1e,isomorphicDecode:bLo,removeASCIIWhitespace:TLo,removeChars:SLo}=rO(),ILo=new TextEncoder,q1e=/^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u,xLo=/[\u000A\u000D\u0009\u0020]/u,wLo=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;function RLo(t){fWe(t.protocol==="data:");let e=Ngn(t,!0);e=e.slice(5);let r={position:0},n=Q1e(",",e,r),o=n.length;if(n=TLo(n,!0,!0),r.position>=e.length)return"failure";r.position++;let s=e.slice(o+1),c=Mgn(s);if(/;(?:\u0020*)base64$/ui.test(n)){let u=bLo(c);if(c=vLo(u),c==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020+)$/u,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let l=AQt(n);return l==="failure"&&(l=AQt("text/plain;charset=US-ASCII")),{mimeType:l,body:c}}a(RLo,"dataURLProcessor");function Ngn(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,o=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?o.slice(0,-1):o}a(Ngn,"URLSerializer");function Mgn(t){let e=ILo.encode(t);return PLo(e)}a(Mgn,"stringPercentDecode");function kgn(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}a(kgn,"isHexCharByte");function Dgn(t){return t>=48&&t<=57?t-48:(t&223)-55}a(Dgn,"hexByteToNumber");function PLo(t){let e=t.length,r=new Uint8Array(e),n=0,o=0;for(;o=t.length)return"failure";e.position++;let n=Q1e(";",t,e);if(n=dWe(n,!1,!0),n.length===0||!q1e.test(n))return"failure";let o=r.toLowerCase(),s=n.toLowerCase(),c={type:o,subtype:s,parameters:new Map,essence:`${o}/${s}`};for(;e.positionxLo.test(d),t,e);let l=gQt(d=>d!==";"&&d!=="=",t,e);if(l=l.toLowerCase(),e.position=t.length)break;let u=null;if(t[e.position]==='"')u=Ogn(t,e,!0),Q1e(";",t,e);else if(u=Q1e(";",t,e),u=dWe(u,!1,!0),u.length===0)continue;l.length!==0&&q1e.test(l)&&(u.length===0||wLo.test(u))&&!c.parameters.has(l)&&c.parameters.set(l,u)}return c}a(AQt,"parseMIMEType");function Ogn(t,e,r=!1){let n=e.position,o="";for(fWe(t[e.position]==='"'),e.position++;o+=gQt(c=>c!=='"'&&c!=="\\",t,e),!(e.position>=t.length);){let s=t[e.position];if(e.position++,s==="\\"){if(e.position>=t.length){o+="\\";break}o+=t[e.position],e.position++}else{fWe(s==='"');break}}return r?o:t.slice(n,e.position)}a(Ogn,"collectAnHTTPQuotedString");function kLo(t){fWe(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[o,s]of e.entries())n+=";",n+=o,n+="=",q1e.test(s)||(s=s.replace(/[\\"]/ug,"\\$&"),s='"'+s,s+='"'),n+=s;return n}a(kLo,"serializeAMimeType");function DLo(t){return t===13||t===10||t===9||t===32}a(DLo,"isHTTPWhiteSpace");function dWe(t,e=!0,r=!0){return SLo(t,e,r,DLo)}a(dWe,"removeHTTPWhitespace");function NLo(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}a(NLo,"minimizeSupportedMimeType");Bgn.exports={dataURLProcessor:RLo,URLSerializer:Ngn,stringPercentDecode:Mgn,parseMIMEType:AQt,collectAnHTTPQuotedString:Ogn,serializeAMimeType:kLo,removeHTTPWhitespace:dWe,minimizeSupportedMimeType:NLo,HTTP_TOKEN_CODEPOINTS:q1e}});var nO=T((rFu,EQt)=>{"use strict";f();var Lgn={__proto__:null,"node:crypto":a(()=>require("node:crypto"),"node:crypto"),"node:sqlite":a(()=>require("node:sqlite"),"node:sqlite"),"node:worker_threads":a(()=>require("node:worker_threads"),"node:worker_threads"),"node:zlib":a(()=>require("node:zlib"),"node:zlib")};function MLo(t){try{return Lgn[t](),!0}catch(e){if(e.code!=="ERR_UNKNOWN_BUILTIN_MODULE"&&e.code!=="ERR_NO_CRYPTO")throw e;return!1}}a(MLo,"detectRuntimeFeatureByNodeModule");function OLo(t,e){return typeof Lgn[t]()[e]<"u"}a(OLo,"detectRuntimeFeatureByExportedProperty");var Fgn=["markAsUncloneable","zstd"],BLo={markAsUncloneable:["node:worker_threads","markAsUncloneable"],zstd:["node:zlib","createZstdDecompress"]},Ugn=["crypto","sqlite"],LLo=[...Ugn,...Fgn];function FLo(t){if(Ugn.includes(t))return MLo(`node:${t}`);if(Fgn.includes(t)){let[e,r]=BLo[t];return OLo(e,r)}throw new TypeError(`unknown feature: ${t}`)}a(FLo,"detectRuntimeFeature");var yQt=class{static{a(this,"RuntimeFeatures")}#e=new Map;clear(){this.#e.clear()}has(e){return this.#e.get(e)??this.#t(e)}set(e,r){if(LLo.includes(e)===!1)throw new TypeError(`unknown feature: ${e}`);this.#e.set(e,r)}#t(e){let r=FLo(e);return this.#e.set(e,r),r}},Qgn=new yQt;EQt.exports.runtimeFeatures=Qgn;EQt.exports.default=Qgn});var Pm=T((oFu,Ggn)=>{"use strict";f();var ULo=require("node:assert"),{types:Bd,inspect:QLo}=require("node:util"),{runtimeFeatures:qLo}=nO(),_Qt=1,CQt=2,pWe=3,hWe=4,vQt=5,mWe=6,bQt=7,hv=8,qgn=Function.call.bind(Function.prototype[Symbol.hasInstance]),Je={converters:{},util:{},errors:{},is:{}};Je.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};Je.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return Je.errors.exception({header:t.prefix,message:r})};Je.errors.invalidArgument=function(t){return Je.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};Je.brandCheck=function(t,e){if(!qgn(e,t)){let r=new TypeError("Illegal invocation");throw r.code="ERR_INVALID_THIS",r}};Je.brandCheckMultiple=function(t){let e=t.map(r=>Je.util.MakeTypeAssertion(r));return r=>{if(e.every(n=>!n(r))){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}};Je.argumentLengthCheck=function({length:t},e,r){if(tqgn(t,e)};Je.util.Type=function(t){switch(typeof t){case"undefined":return _Qt;case"boolean":return CQt;case"string":return pWe;case"symbol":return hWe;case"number":return vQt;case"bigint":return mWe;case"function":case"object":return t===null?bQt:hv}};Je.util.Types={UNDEFINED:_Qt,BOOLEAN:CQt,STRING:pWe,SYMBOL:hWe,NUMBER:vQt,BIGINT:mWe,NULL:bQt,OBJECT:hv};Je.util.TypeValueToString=function(t){switch(Je.util.Type(t)){case _Qt:return"Undefined";case CQt:return"Boolean";case pWe:return"String";case hWe:return"Symbol";case vQt:return"Number";case mWe:return"BigInt";case bQt:return"Null";case hv:return"Object"}};Je.util.markAsUncloneable=qLo.has("markAsUncloneable")?require("node:worker_threads").markAsUncloneable:()=>{};Je.util.ConvertToInt=function(t,e,r,n){let o,s;e===64?(o=Math.pow(2,53)-1,r==="unsigned"?s=0:s=Math.pow(-2,53)+1):r==="unsigned"?(s=0,o=Math.pow(2,e)-1):(s=Math.pow(-2,e)-1,o=Math.pow(2,e-1)-1);let c=Number(t);if(c===0&&(c=0),Je.util.HasFlag(n,Je.attributes.EnforceRange)){if(Number.isNaN(c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY)throw Je.errors.exception({header:"Integer conversion",message:`Could not convert ${Je.util.Stringify(t)} to an integer.`});if(c=Je.util.IntegerPart(c),co)throw Je.errors.exception({header:"Integer conversion",message:`Value must be between ${s}-${o}, got ${c}.`});return c}return!Number.isNaN(c)&&Je.util.HasFlag(n,Je.attributes.Clamp)?(c=Math.min(Math.max(c,s),o),Math.floor(c)%2===0?c=Math.floor(c):c=Math.ceil(c),c):Number.isNaN(c)||c===0&&Object.is(0,c)||c===Number.POSITIVE_INFINITY||c===Number.NEGATIVE_INFINITY?0:(c=Je.util.IntegerPart(c),c=c%Math.pow(2,e),r==="signed"&&c>=Math.pow(2,e)-1?c-Math.pow(2,e):c)};Je.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};Je.util.Stringify=function(t){switch(Je.util.Type(t)){case hWe:return`Symbol(${t.description})`;case hv:return QLo(t);case pWe:return`"${t}"`;case mWe:return`${t}n`;default:return`${t}`}};Je.util.IsResizableArrayBuffer=function(t){if(Bd.isArrayBuffer(t))return t.resizable;if(Bd.isSharedArrayBuffer(t))return t.growable;throw Je.errors.exception({header:"IsResizableArrayBuffer",message:`"${Je.util.Stringify(t)}" is not an array buffer.`})};Je.util.HasFlag=function(t,e){return typeof t=="number"&&(t&e)===e};Je.sequenceConverter=function(t){return(e,r,n,o)=>{if(Je.util.Type(e)!==hv)throw Je.errors.exception({header:r,message:`${n} (${Je.util.Stringify(e)}) is not iterable.`});let s=typeof o=="function"?o():e?.[Symbol.iterator]?.(),c=[],l=0;if(s===void 0||typeof s.next!="function")throw Je.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:u,value:d}=s.next();if(u)break;c.push(t(d,r,`${n}[${l++}]`))}return c}};Je.recordConverter=function(t,e){return(r,n,o)=>{if(Je.util.Type(r)!==hv)throw Je.errors.exception({header:n,message:`${o} ("${Je.util.TypeValueToString(r)}") is not an Object.`});let s={};if(!Bd.isProxy(r)){let l=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let u of l){let d=Je.util.Stringify(u),p=t(u,n,`Key ${d} in ${o}`),h=e(r[u],n,`${o}[${d}]`);s[p]=h}return s}let c=Reflect.ownKeys(r);for(let l of c)if(Reflect.getOwnPropertyDescriptor(r,l)?.enumerable){let d=t(l,n,o),p=e(r[l],n,o);s[d]=p}return s}};Je.interfaceConverter=function(t,e){return(r,n,o)=>{if(!t(r))throw Je.errors.exception({header:n,message:`Expected ${o} ("${Je.util.Stringify(r)}") to be an instance of ${e}.`});return r}};Je.dictionaryConverter=function(t){return t.sort((e,r)=>(e.key>r.key)-(e.key{let o={};if(e!=null&&Je.util.Type(e)!==hv)throw Je.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let s of t){let{key:c,defaultValue:l,required:u,converter:d}=s;if(u===!0&&(e==null||!Object.hasOwn(e,c)))throw Je.errors.exception({header:r,message:`Missing required key "${c}".`});let p=e?.[c],h=l!==void 0;if(h&&p===void 0&&(p=l()),u||h||p!==void 0){if(p=d(p,r,`${n}.${c}`),s.allowedValues&&!s.allowedValues.includes(p))throw Je.errors.exception({header:r,message:`${p} is not an accepted type. Expected one of ${s.allowedValues.join(", ")}.`});o[c]=p}}return o}};Je.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};Je.is.USVString=function(t){return typeof t=="string"&&t.isWellFormed()};Je.is.ReadableStream=Je.util.MakeTypeAssertion(ReadableStream);Je.is.Blob=Je.util.MakeTypeAssertion(Blob);Je.is.URLSearchParams=Je.util.MakeTypeAssertion(URLSearchParams);Je.is.File=Je.util.MakeTypeAssertion(File);Je.is.URL=Je.util.MakeTypeAssertion(URL);Je.is.AbortSignal=Je.util.MakeTypeAssertion(AbortSignal);Je.is.MessagePort=Je.util.MakeTypeAssertion(MessagePort);Je.is.BufferSource=function(t){return Bd.isArrayBuffer(t)||ArrayBuffer.isView(t)&&Bd.isArrayBuffer(t.buffer)};Je.util.getCopyOfBytesHeldByBufferSource=function(t){let e=t,r=e,n=0,o=0;if(Bd.isTypedArray(e)||Bd.isDataView(e)?(r=e.buffer,n=e.byteOffset,o=e.byteLength):(ULo(Bd.isAnyArrayBuffer(e)),o=e.byteLength),r.detached)return new Uint8Array(0);let s=new Uint8Array(o),c=new Uint8Array(r,n,o);return s.set(c),s};Je.converters.DOMString=function(t,e,r,n){if(t===null&&Je.util.HasFlag(n,Je.attributes.LegacyNullToEmptyString))return"";if(typeof t=="symbol")throw Je.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};Je.converters.ByteString=function(t,e,r){if(typeof t=="symbol")throw Je.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a ByteString.`});let n=String(t);for(let o=0;o255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${o} has a value of ${n.charCodeAt(o)} which is greater than 255.`);return n};Je.converters.USVString=function(t){return typeof t=="string"?t.toWellFormed():`${t}`.toWellFormed()};Je.converters.boolean=function(t){return!!t};Je.converters.any=function(t){return t};Je.converters["long long"]=function(t,e,r){return Je.util.ConvertToInt(t,64,"signed",0,e,r)};Je.converters["unsigned long long"]=function(t,e,r){return Je.util.ConvertToInt(t,64,"unsigned",0,e,r)};Je.converters["unsigned long"]=function(t,e,r){return Je.util.ConvertToInt(t,32,"unsigned",0,e,r)};Je.converters["unsigned short"]=function(t,e,r,n){return Je.util.ConvertToInt(t,16,"unsigned",n,e,r)};Je.converters.ArrayBuffer=function(t,e,r,n){if(Je.util.Type(t)!==hv||!Bd.isArrayBuffer(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t))throw Je.errors.exception({header:e,message:`${r} cannot be a resizable ArrayBuffer.`});return t};Je.converters.SharedArrayBuffer=function(t,e,r,n){if(Je.util.Type(t)!==hv||!Bd.isSharedArrayBuffer(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["SharedArrayBuffer"]});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t))throw Je.errors.exception({header:e,message:`${r} cannot be a resizable SharedArrayBuffer.`});return t};Je.converters.TypedArray=function(t,e,r,n,o){if(Je.util.Type(t)!==hv||!Bd.isTypedArray(t)||t.constructor.name!==e.name)throw Je.errors.conversionFailed({prefix:r,argument:`${n} ("${Je.util.Stringify(t)}")`,types:[e.name]});if(!Je.util.HasFlag(o,Je.attributes.AllowShared)&&Bd.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:r,message:`${n} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(o,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:r,message:`${n} cannot be a view on a resizable array buffer.`});return t};Je.converters.DataView=function(t,e,r,n){if(Je.util.Type(t)!==hv||!Bd.isDataView(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["DataView"]});if(!Je.util.HasFlag(n,Je.attributes.AllowShared)&&Bd.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a resizable array buffer.`});return t};Je.converters.ArrayBufferView=function(t,e,r,n){if(Je.util.Type(t)!==hv||!Bd.isArrayBufferView(t))throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBufferView"]});if(!Je.util.HasFlag(n,Je.attributes.AllowShared)&&Bd.isSharedArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a shared array buffer.`});if(!Je.util.HasFlag(n,Je.attributes.AllowResizable)&&Je.util.IsResizableArrayBuffer(t.buffer))throw Je.errors.exception({header:e,message:`${r} cannot be a view on a resizable array buffer.`});return t};Je.converters.BufferSource=function(t,e,r,n){if(Bd.isArrayBuffer(t))return Je.converters.ArrayBuffer(t,e,r,n);if(Bd.isArrayBufferView(t))return n&=~Je.attributes.AllowShared,Je.converters.ArrayBufferView(t,e,r,n);throw Bd.isSharedArrayBuffer(t)?Je.errors.exception({header:e,message:`${r} cannot be a SharedArrayBuffer.`}):Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer","ArrayBufferView"]})};Je.converters.AllowSharedBufferSource=function(t,e,r,n){if(Bd.isArrayBuffer(t))return Je.converters.ArrayBuffer(t,e,r,n);if(Bd.isSharedArrayBuffer(t))return Je.converters.SharedArrayBuffer(t,e,r,n);if(Bd.isArrayBufferView(t))return n|=Je.attributes.AllowShared,Je.converters.ArrayBufferView(t,e,r,n);throw Je.errors.conversionFailed({prefix:e,argument:`${r} ("${Je.util.Stringify(t)}")`,types:["ArrayBuffer","SharedArrayBuffer","ArrayBufferView"]})};Je.converters["sequence"]=Je.sequenceConverter(Je.converters.ByteString);Je.converters["sequence>"]=Je.sequenceConverter(Je.converters["sequence"]);Je.converters["record"]=Je.recordConverter(Je.converters.ByteString,Je.converters.ByteString);Je.converters.Blob=Je.interfaceConverter(Je.is.Blob,"Blob");Je.converters.AbortSignal=Je.interfaceConverter(Je.is.AbortSignal,"AbortSignal");Je.converters.EventHandlerNonNull=function(t){return Je.util.Type(t)!==hv?null:typeof t=="function"?t:()=>{}};Je.attributes={Clamp:1,EnforceRange:2,AllowShared:4,AllowResizable:8,LegacyNullToEmptyString:16};Ggn.exports={webidl:Je}});var mv=T((aFu,rAn)=>{"use strict";f();var{Transform:GLo}=require("node:stream"),Hgn=require("node:zlib"),{redirectStatusSet:HLo,referrerPolicyTokens:jLo,badPortsSet:$Lo}=U1e(),{getGlobalOrigin:jgn}=mQt(),{collectAnHTTPQuotedString:VLo,parseMIMEType:WLo}=oS(),{performance:zLo}=require("node:perf_hooks"),{ReadableStreamFrom:YLo,isValidHTTPToken:$gn,normalizedMethodRecordsBase:KLo}=Ki(),H1e=require("node:assert"),{isUint8Array:JLo}=require("node:util/types"),{webidl:h9}=Pm(),{isomorphicEncode:TQt,collectASequenceOfCodePoints:gV,removeChars:XLo}=rO();function Vgn(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}a(Vgn,"responseURL");function ZLo(t,e){if(!HLo.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&zgn(r)&&(Wgn(r)||(r=e8o(r)),r=new URL(r,Vgn(t))),r&&!r.hash&&(r.hash=e),r}a(ZLo,"responseLocationURL");function Wgn(t){for(let e=0;e126||r<32)return!1}return!0}a(Wgn,"isValidEncodedURL");function e8o(t){return Buffer.from(t,"binary").toString("utf8")}a(e8o,"normalizeBinaryStringToUtf8");function yV(t){return t.urlList[t.urlList.length-1]}a(yV,"requestCurrentURL");function t8o(t){let e=yV(t);return eAn(e)&&$Lo.has(e.port)?"blocked":"allowed"}a(t8o,"requestBadPort");function r8o(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}a(r8o,"isErrorLike");function n8o(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}a(n8o,"isValidReasonPhrase");var i8o=$gn;function zgn(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` +`)||t.includes("\r")||t.includes("\0"))===!1}a(zgn,"isValidHeaderValue");function o8o(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let n=e.length;n!==0;n--){let o=e[n-1].trim();if(jLo.has(o)){r=o;break}}return r}a(o8o,"parseReferrerPolicy");function s8o(t,e){let r=o8o(e);r!==""&&(t.referrerPolicy=r)}a(s8o,"setRequestReferrerPolicyOnRedirect");function a8o(){return"allowed"}a(a8o,"crossOriginResourcePolicyCheck");function c8o(){return"success"}a(c8o,"corsCheck");function l8o(){return"success"}a(l8o,"TAOCheck");function u8o(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}a(u8o,"appendFetchMetadata");function d8o(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&IQt(t.origin)&&!IQt(yV(t))&&(e=null);break;case"same-origin":G1e(t,yV(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}a(d8o,"appendRequestOriginHeader");function Zoe(t,e){return t}a(Zoe,"coarsenTime");function f8o(t,e,r){return!t?.startTime||t.startTime4096&&(n=o),e){case"no-referrer":return"no-referrer";case"origin":return o??SQt(r,!0);case"unsafe-url":return n;case"strict-origin":{let s=yV(t);return AV(n)&&!AV(s)?"no-referrer":o}case"strict-origin-when-cross-origin":{let s=yV(t);return G1e(n,s)?n:AV(n)&&!AV(s)?"no-referrer":o}case"same-origin":return G1e(t,n)?n:"no-referrer";case"origin-when-cross-origin":return G1e(t,n)?n:o;case"no-referrer-when-downgrade":{let s=yV(t);return AV(n)&&!AV(s)?"no-referrer":n}}}a(g8o,"determineRequestsReferrer");function SQt(t,e=!1){return H1e(h9.is.URL(t)),t=new URL(t),Zgn(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}a(SQt,"stripURLForReferrer");var A8o=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),y8o=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function Kgn(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),y8o(t)):A8o(t)}a(Kgn,"isOriginIPPotentiallyTrustworthy");function E8o(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||Kgn(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}a(E8o,"isOriginPotentiallyTrustworthy");function AV(t){return h9.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:E8o(t.origin):!1}a(AV,"isURLPotentiallyTrustworthy");function _8o(t){}a(_8o,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function G1e(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(G1e,"sameOrigin");function C8o(t){return t.controller.state==="aborted"}a(C8o,"isAborted");function v8o(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(v8o,"isCancelled");function b8o(t){return KLo[t.toLowerCase()]??t}a(b8o,"normalizeMethod");var T8o=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Jgn(t,e,r=0,n=1){class o{static{a(this,"FastIterableIterator")}#e;#t;#n;constructor(c,l){this.#e=c,this.#t=l,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let c=this.#n,l=e(this.#e),u=l.length;if(c>=u)return{value:void 0,done:!0};let{[r]:d,[n]:p}=l[c];this.#n=c+1;let h;switch(this.#t){case"key":h=d;break;case"value":h=p;break;case"key+value":h=[d,p];break}return{value:h,done:!1}}}return delete o.prototype.constructor,Object.setPrototypeOf(o.prototype,T8o),Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(s,c){return new o(s,c)}}a(Jgn,"createIterator");function S8o(t,e,r,n=0,o=1){let s=Jgn(t,r,n,o),c={keys:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return h9.brandCheck(this,e),s(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return h9.brandCheck(this,e),s(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:a(function(){return h9.brandCheck(this,e),s(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:a(function(u,d=globalThis){if(h9.brandCheck(this,e),h9.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof u!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:p,1:h}of s(this,"key+value"))u.call(d,h,p,this)},"forEach")}};return Object.defineProperties(e.prototype,{...c,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:c.entries.value}})}a(S8o,"iteratorMixin");function I8o(t,e,r){let n=e,o=r;try{let s=t.stream.getReader();Xgn(s,n,o)}catch(s){o(s)}}a(I8o,"fullyReadBody");function x8o(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}a(x8o,"readableStreamClose");async function Xgn(t,e,r){try{let n=[],o=0;do{let{done:s,value:c}=await t.read();if(s){e(Buffer.concat(n,o));return}if(!JLo(c)){r(new TypeError("Received non-Uint8Array chunk"));return}n.push(c),o+=c.length}while(!0)}catch(n){r(n)}}a(Xgn,"readAllBytes");function Zgn(t){H1e("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}a(Zgn,"urlIsLocal");function IQt(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}a(IQt,"urlHasHttpsScheme");function eAn(t){H1e("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}a(eAn,"urlIsHttpHttpsScheme");function w8o(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&gV(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&gV(u=>u===" "||u===" ",r,n);let o=gV(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),s=o.length?Number(o):null;if(e&&gV(u=>u===" "||u===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&gV(u=>u===" "||u===" ",r,n);let c=gV(u=>{let d=u.charCodeAt(0);return d>=48&&d<=57},r,n),l=c.length?Number(c):null;return n.positionl?"failure":{rangeStartValue:s,rangeEndValue:l}}a(w8o,"simpleRangeHeaderValue");function R8o(t,e,r){let n="bytes ";return n+=TQt(`${t}`),n+="-",n+=TQt(`${e}`),n+="/",n+=TQt(`${r}`),n}a(R8o,"buildContentRange");var xQt=class extends GLo{static{a(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?Hgn.createInflate(this.#e):Hgn.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",o=>this.destroy(o))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function P8o(t){return new xQt(t)}a(P8o,"createInflate");function k8o(t){let e=null,r=null,n=null,o=tAn("content-type",t);if(o===null)return"failure";for(let s of o){let c=WLo(s);c==="failure"||c.essence==="*/*"||(n=c,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}a(k8o,"extractMimeType");function D8o(t){let e=t,r={position:0},n=[],o="";for(;r.positions!=='"'&&s!==",",e,r),r.positions===9||s===32),n.push(o),o=""}return n}a(D8o,"gettingDecodingSplitting");function tAn(t,e){let r=e.get(t,!0);return r===null?null:D8o(r)}a(tAn,"getDecodeSplit");function N8o(t){return!1}a(N8o,"hasAuthenticationEntry");function M8o(t){return!!(t.username||t.password)}a(M8o,"includesCredentials");function O8o(t){return!0}a(O8o,"isTraversableNavigable");var wQt=class{static{a(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return jgn()}get origin(){return this.baseUrl?.origin}policyContainer=Ygn()},RQt=class{static{a(this,"EnvironmentSettingsObject")}settingsObject=new wQt},B8o=new RQt;rAn.exports={isAborted:C8o,isCancelled:v8o,isValidEncodedURL:Wgn,ReadableStreamFrom:YLo,tryUpgradeRequestToAPotentiallyTrustworthyURL:_8o,clampAndCoarsenConnectionTimingInfo:f8o,coarsenedSharedCurrentTime:p8o,determineRequestsReferrer:g8o,makePolicyContainer:Ygn,clonePolicyContainer:m8o,appendFetchMetadata:u8o,appendRequestOriginHeader:d8o,TAOCheck:l8o,corsCheck:c8o,crossOriginResourcePolicyCheck:a8o,createOpaqueTimingInfo:h8o,setRequestReferrerPolicyOnRedirect:s8o,isValidHTTPToken:$gn,requestBadPort:t8o,requestCurrentURL:yV,responseURL:Vgn,responseLocationURL:ZLo,isURLPotentiallyTrustworthy:AV,isValidReasonPhrase:n8o,sameOrigin:G1e,normalizeMethod:b8o,iteratorMixin:S8o,createIterator:Jgn,isValidHeaderName:i8o,isValidHeaderValue:zgn,isErrorLike:r8o,fullyReadBody:I8o,readableStreamClose:x8o,urlIsLocal:Zgn,urlHasHttpsScheme:IQt,urlIsHttpHttpsScheme:eAn,readAllBytes:Xgn,simpleRangeHeaderValue:w8o,buildContentRange:R8o,createInflate:P8o,extractMimeType:k8o,getDecodeSplit:tAn,environmentSettingsObject:B8o,isOriginIPPotentiallyTrustworthy:Kgn,hasAuthenticationEntry:N8o,includesCredentials:M8o,isTraversableNavigable:O8o}});var gWe=T((uFu,iAn)=>{"use strict";f();var{iteratorMixin:L8o}=mv(),{kEnumerableProperty:ese}=Ki(),{webidl:Da}=Pm(),nAn=require("node:util"),iO=class t{static{a(this,"FormData")}#e=[];constructor(e=void 0){if(Da.util.markAsUncloneable(this),e!==void 0)throw Da.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]})}append(e,r,n=void 0){Da.brandCheck(this,t);let o="FormData.append";Da.argumentLengthCheck(arguments,2,o),e=Da.converters.USVString(e),arguments.length===3||Da.is.Blob(r)?(r=Da.converters.Blob(r,o,"value"),n!==void 0&&(n=Da.converters.USVString(n))):r=Da.converters.USVString(r);let s=PQt(e,r,n);this.#e.push(s)}delete(e){Da.brandCheck(this,t),Da.argumentLengthCheck(arguments,1,"FormData.delete"),e=Da.converters.USVString(e),this.#e=this.#e.filter(n=>n.name!==e)}get(e){Da.brandCheck(this,t),Da.argumentLengthCheck(arguments,1,"FormData.get"),e=Da.converters.USVString(e);let n=this.#e.findIndex(o=>o.name===e);return n===-1?null:this.#e[n].value}getAll(e){return Da.brandCheck(this,t),Da.argumentLengthCheck(arguments,1,"FormData.getAll"),e=Da.converters.USVString(e),this.#e.filter(n=>n.name===e).map(n=>n.value)}has(e){return Da.brandCheck(this,t),Da.argumentLengthCheck(arguments,1,"FormData.has"),e=Da.converters.USVString(e),this.#e.findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){Da.brandCheck(this,t);let o="FormData.set";Da.argumentLengthCheck(arguments,2,o),e=Da.converters.USVString(e),arguments.length===3||Da.is.Blob(r)?(r=Da.converters.Blob(r,o,"value"),n!==void 0&&(n=Da.converters.USVString(n))):r=Da.converters.USVString(r);let s=PQt(e,r,n),c=this.#e.findIndex(l=>l.name===e);c!==-1?this.#e=[...this.#e.slice(0,c),s,...this.#e.slice(c+1).filter(l=>l.name!==e)]:this.#e.push(s)}[nAn.inspect.custom](e,r){let n=this.#e.reduce((s,c)=>(s[c.name]?Array.isArray(s[c.name])?s[c.name].push(c.value):s[c.name]=[s[c.name],c.value]:s[c.name]=c.value,s),{__proto__:null});r.depth??=e,r.colors??=!0;let o=nAn.formatWithOptions(r,n);return`FormData ${o.slice(o.indexOf("]")+2)}`}static getFormDataState(e){return e.#e}static setFormDataState(e,r){e.#e=r}},{getFormDataState:F8o,setFormDataState:U8o}=iO;Reflect.deleteProperty(iO,"getFormDataState");Reflect.deleteProperty(iO,"setFormDataState");L8o("FormData",iO,F8o,"name","value");Object.defineProperties(iO.prototype,{append:ese,delete:ese,get:ese,getAll:ese,has:ese,set:ese,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function PQt(t,e,r){if(typeof e!="string"){if(Da.is.File(e)||(e=new File([e],"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=new File([e],r,n)}}return{name:t,value:e}}a(PQt,"makeEntry");Da.is.FormData=Da.util.MakeTypeAssertion(iO);iAn.exports={FormData:iO,makeEntry:PQt,setFormDataState:U8o}});var aAn=T((pFu,sAn)=>{"use strict";f();var{bufferToLowerCasedHeaderName:Q8o}=Ki(),{HTTP_TOKEN_CODEPOINTS:q8o}=oS(),{makeEntry:G8o}=gWe(),{webidl:kQt}=Pm(),DQt=require("node:assert"),{isomorphicDecode:oAn}=rO(),H8o=Buffer.from("--"),NQt=new TextDecoder,j8o=new TextDecoder("utf-8",{ignoreBOM:!0});function $8o(t){for(let e=0;e70)return!1;for(let r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}a(V8o,"validateBoundary");function W8o(t,e){DQt(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)throw b_("missing boundary in content-type header");let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0},c=t.indexOf(n);if(c===-1)throw b_("no boundary found in multipart body");for(s.position=c;;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else throw b_("expected a value starting with -- and the boundary");if(K8o(t,H8o,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)throw b_("expected CRLF");s.position+=2;let l=Y8o(t,s),{name:u,filename:d,contentType:p,encoding:h}=l;s.position+=2;let m;{let A=t.indexOf(n.subarray(2),s.position);if(A===-1)throw b_("expected boundary after body");m=t.subarray(s.position,A-4),s.position+=m.length,h==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)throw b_("expected CRLF");s.position+=2;let g;d!==null?(p??="text/plain",$8o(p)||(p=""),g=new File([m],d,{type:p})):g=j8o.decode(Buffer.from(m)),DQt(kQt.is.USVString(u)),DQt(typeof g=="string"&&kQt.is.USVString(g)||kQt.is.File(g)),o.push(G8o(u,g,d))}}a(W8o,"multipartFormDataParser");function z8o(t,e){t[e.position]===59&&e.position++,sS(c=>c===32||c===9,t,e);let r=sS(c=>OQt(c)&&c!==61&&c!==42,t,e);if(r.length===0)return null;let n=r.toString("ascii").toLowerCase(),o=t[e.position]===42;if(o&&e.position++,t[e.position]!==61)return null;e.position++,sS(c=>c===32||c===9,t,e);let s;if(o){let c=sS(l=>l!==32&&l!==13&&l!==10&&l!==59,t,e);if(c[0]!==117&&c[0]!==85||c[1]!==116&&c[1]!==84||c[2]!==102&&c[2]!==70||c[3]!==45||c[4]!==56)throw b_("unknown encoding, expected utf-8''");s=decodeURIComponent(NQt.decode(c.subarray(7)))}else if(t[e.position]===34){e.position++;let c=sS(l=>l!==10&&l!==13&&l!==34,t,e);if(t[e.position]!==34)throw b_("Closing quote not found");e.position++,s=NQt.decode(c).replace(/%0A/ig,` +`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let c=sS(l=>OQt(l)&&l!==59,t,e);s=NQt.decode(c)}return{name:n,value:s}}a(z8o,"parseContentDispositionAttribute");function Y8o(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw b_("header name is null");return{name:r,filename:n,contentType:o,encoding:s}}let c=sS(l=>l!==10&&l!==13&&l!==58,t,e);if(c=MQt(c,!0,!0,l=>l===9||l===32),!q8o.test(c.toString()))throw b_("header name does not match the field-name token production");if(t[e.position]!==58)throw b_("expected :");switch(e.position++,sS(l=>l===32||l===9,t,e),Q8o(c)){case"content-disposition":{if(r=n=null,sS(u=>OQt(u),t,e).toString("ascii").toLowerCase()!=="form-data")throw b_("expected form-data for content-disposition header");for(;e.positionu!==10&&u!==13,t,e);l=MQt(l,!1,!0,u=>u===9||u===32),o=oAn(l);break}case"content-transfer-encoding":{let l=sS(u=>u!==10&&u!==13,t,e);l=MQt(l,!1,!0,u=>u===9||u===32),s=oAn(l);break}default:sS(l=>l!==10&&l!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw b_("expected CRLF");e.position+=2}}a(Y8o,"parseMultipartFormDataHeaders");function sS(t,e,r){let n=r.position;for(;n0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}a(MQt,"removeChars");function K8o(t,e,r){if(t.length{"use strict";f();function Z8o(){let t,e;return{promise:new Promise((n,o)=>{t=n,e=o}),resolve:t,reject:e}}a(Z8o,"createDeferredPromise");cAn.exports={createDeferredPromise:Z8o}});var rse=T((EFu,pAn)=>{"use strict";f();var FQt=Ki(),{ReadableStreamFrom:e6o,readableStreamClose:t6o,fullyReadBody:r6o,extractMimeType:n6o}=mv(),{FormData:lAn,setFormDataState:i6o}=gWe(),{webidl:yw}=Pm(),BQt=require("node:assert"),{isErrored:LQt,isDisturbed:o6o}=require("node:stream"),{isUint8Array:s6o}=require("node:util/types"),{serializeAMimeType:a6o}=oS(),{multipartFormDataParser:c6o}=aAn(),{createDeferredPromise:l6o}=j1e(),{parseJSONFromBytes:u6o}=rO(),{utf8DecodeBytes:d6o}=uWe(),{runtimeFeatures:f6o}=nO(),p6o=f6o.has("crypto")?require("node:crypto").randomInt:t=>Math.floor(Math.random()*t),AWe=new TextEncoder;function h6o(){}a(h6o,"noop");var m6o=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!o6o(e)&&!LQt(e)&&e.cancel("Response object has been garbage collected").catch(h6o)});function dAn(t,e=!1){let r=null,n=null;yw.is.ReadableStream(t)?r=t:yw.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(d){n=d},cancel(){},type:"bytes"}),BQt(yw.is.ReadableStream(r));let o=null,s=null,c=null,l=null;if(typeof t=="string")s=t,l="text/plain;charset=UTF-8";else if(yw.is.URLSearchParams(t))s=t.toString(),l="application/x-www-form-urlencoded;charset=UTF-8";else if(yw.is.BufferSource(t))s=yw.util.getCopyOfBytesHeldByBufferSource(t);else if(yw.is.FormData(t)){let d=`----formdata-undici-0${`${p6o(1e11)}`.padStart(11,"0")}`,p=`--${d}\r Content-Disposition: form-data`;let h=a(_=>_.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"formdataEscape"),m=a(_=>_.replace(/\r?\n|\r/g,`\r -`),"normalizeLinefeeds"),g=[],A=new Uint8Array([13,10]);c=0;let y=!1;for(let[_,v]of t)if(typeof v=="string"){let b=lze.encode(p+`; name="${h(m(_))}"\r +`),"normalizeLinefeeds"),g=[],A=new Uint8Array([13,10]);c=0;let y=!1;for(let[_,v]of t)if(typeof v=="string"){let b=AWe.encode(p+`; name="${h(m(_))}"\r \r ${m(v)}\r -`);g.push(b),c+=b.byteLength}else{let b=lze.encode(`${p}; name="${h(m(_))}"`+(v.name?`; filename="${h(v.name)}"`:"")+`\r +`);g.push(b),c+=b.byteLength}else{let b=AWe.encode(`${p}; name="${h(m(_))}"`+(v.name?`; filename="${h(v.name)}"`:"")+`\r Content-Type: ${v.type||"application/octet-stream"}\r \r -`);g.push(b,v,A),typeof v.size=="number"?c+=b.byteLength+v.size+A.byteLength:y=!0}let E=lze.encode(`--${d}--\r -`);g.push(E),c+=E.byteLength,y&&(c=null),s=t,o=a(async function*(){for(let _ of g)_.stream?yield*_.stream():yield _},"action"),l=`multipart/form-data; boundary=${d}`}else if(Rw.is.Blob(t))s=t,c=t.size,t.type&&(l=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(yQt.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=Rw.is.ReadableStream(t)?t:Z3o(t)}return(typeof s=="string"||oLo(s))&&(o=a(()=>(c=typeof s=="string"?Buffer.byteLength(s):s.length,s),"action")),o!=null&&(async()=>{let d=o(),p=d?.[Symbol.asyncIterator]?.();if(p)for await(let h of p){if(AQt(r))break;h.length&&n.enqueue(new Uint8Array(h))}else d?.length&&!AQt(r)&&n.enqueue(typeof d=="string"?lze.encode(d):new Uint8Array(d));queueMicrotask(()=>eLo(n))})(),[{stream:r,source:s,length:c},l]}a(fgn,"extractBody");function mLo(t,e=!1){return Rw.is.ReadableStream(t)&&(gQt(!yQt.isDisturbed(t),"The body has already been consumed."),gQt(!t.locked,"The stream is locked.")),fgn(t,e)}a(mLo,"safelyExtractBody");function gLo(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}a(gLo,"cloneBody");function ALo(t,e){return{blob(){return qse(this,n=>{let o=dgn(e(this));return o===null?o="":o&&(o=sLo(o)),new Blob([n],{type:o})},t,e)},arrayBuffer(){return qse(this,n=>new Uint8Array(n).buffer,t,e)},text(){return qse(this,uLo,t,e)},json(){return qse(this,lLo,t,e)},formData(){return qse(this,n=>{let o=dgn(e(this));if(o!==null)switch(o.essence){case"multipart/form-data":{let s=aLo(n,o),c=new ugn;return nLo(c,s),c}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(n.toString()),c=new ugn;for(let[l,u]of s)c.append(l,u);return c}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return qse(this,n=>new Uint8Array(n),t,e)}}}a(ALo,"bodyMixinMethods");function yLo(t,e){Object.assign(t.prototype,ALo(t,e))}a(yLo,"mixinBody");function qse(t,e,r,n){try{Rw.brandCheck(t,r)}catch(l){return Promise.reject(l)}if(t=n(t),pgn(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let o=cLo(),s=o.reject,c=a(l=>{try{o.resolve(e(l))}catch(u){s(u)}},"successSteps");return t.body==null?(c(Buffer.allocUnsafe(0)),o.promise):(tLo(t.body,c,s),o.promise)}a(qse,"consumeBody");function pgn(t){let e=t.body;return e!=null&&(e.stream.locked||yQt.isDisturbed(e.stream))}a(pgn,"bodyUnusable");function dgn(t){let e=t.headersList,r=rLo(e);return r==="failure"?null:r}a(dgn,"bodyMimeType");hgn.exports={extractBody:fgn,safelyExtractBody:mLo,cloneBody:gLo,mixinBody:yLo,streamRegistry:hLo,bodyUnusable:pgn}});var Sgn=T((d8u,Tgn)=>{"use strict";f();var vi=require("node:assert"),xi=eo(),{channels:mgn}=U9(),EQt=Z7t(),{RequestContentLengthMismatchError:fW,ResponseContentLengthMismatchError:ELo,RequestAbortedError:_gn,HeadersTimeoutError:CLo,HeadersOverflowError:_Lo,SocketError:Kve,InformationalError:Hse,BodyTimeoutError:vLo,HTTPParserError:bLo,ResponseExceededMaxSizeError:TLo}=Oi(),{kUrl:vgn,kReset:BC,kClient:IQt,kParser:Vd,kBlocking:Jve,kRunning:oA,kPending:SLo,kSize:ggn,kWriting:H9,kQueue:Pw,kNoRef:zve,kKeepAliveDefaultTimeout:ILo,kHostHeader:xLo,kPendingIdx:wLo,kRunningIdx:ES,kError:CS,kPipelining:fze,kSocket:jse,kKeepAliveTimeoutValue:hze,kMaxHeadersSize:RLo,kKeepAliveMaxTimeout:PLo,kKeepAliveTimeoutThreshold:kLo,kHeadersTimeout:NLo,kBodyTimeout:DLo,kStrictContentLength:vQt,kMaxRequests:Agn,kCounter:MLo,kMaxResponseSize:OLo,kOnError:BLo,kResume:G9,kHTTPContext:bgn,kClosed:bQt}=ac(),CN=hmn(),LLo=Buffer.alloc(0),uze=Buffer[Symbol.species],FLo=xi.removeAllListeners,CQt;function ULo(){let t=process.env.JEST_WORKER_ID?VUt():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module(Amn())}catch{}return e||(e=new WebAssembly.Module(t||VUt())),new WebAssembly.Instance(e,{env:{wasm_on_url:a((n,o,s)=>0,"wasm_on_url"),wasm_on_status:a((n,o,s)=>{vi(Sp.ptr===n);let c=o-vN+_N.byteOffset;return Sp.onStatus(new uze(_N.buffer,c,s))},"wasm_on_status"),wasm_on_message_begin:a(n=>(vi(Sp.ptr===n),Sp.onMessageBegin()),"wasm_on_message_begin"),wasm_on_header_field:a((n,o,s)=>{vi(Sp.ptr===n);let c=o-vN+_N.byteOffset;return Sp.onHeaderField(new uze(_N.buffer,c,s))},"wasm_on_header_field"),wasm_on_header_value:a((n,o,s)=>{vi(Sp.ptr===n);let c=o-vN+_N.byteOffset;return Sp.onHeaderValue(new uze(_N.buffer,c,s))},"wasm_on_header_value"),wasm_on_headers_complete:a((n,o,s,c)=>(vi(Sp.ptr===n),Sp.onHeadersComplete(o,s===1,c===1)),"wasm_on_headers_complete"),wasm_on_body:a((n,o,s)=>{vi(Sp.ptr===n);let c=o-vN+_N.byteOffset;return Sp.onBody(new uze(_N.buffer,c,s))},"wasm_on_body"),wasm_on_message_complete:a(n=>(vi(Sp.ptr===n),Sp.onMessageComplete()),"wasm_on_message_complete")}})}a(ULo,"lazyllhttp");var _Qt=null,Sp=null,_N=null,dze=0,vN=null,QLo=0,Yve=1,$se=2|Yve,pze=4|Yve,TQt=8|QLo,SQt=class{static{a(this,"Parser")}constructor(e,r,{exports:n}){this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(CN.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[RLo],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[OLo]}setTimeout(e,r){e!==this.timeoutValue||r&Yve^this.timeoutType&Yve?(this.timeout&&(EQt.clearTimeout(this.timeout),this.timeout=null),e&&(r&Yve?this.timeout=EQt.setFastTimeout(ygn,e,new WeakRef(this)):(this.timeout=setTimeout(ygn,e,new WeakRef(this)),this.timeout?.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(vi(this.ptr!=null),vi(Sp===null),this.llhttp.llhttp_resume(this.ptr),vi(this.timeoutType===pze),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||LLo),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){vi(Sp===null),vi(this.ptr!=null),vi(!this.paused);let{socket:r,llhttp:n}=this;e.length>dze&&(vN&&n.free(vN),dze=Math.ceil(e.length/4096)*4096,vN=n.malloc(dze)),new Uint8Array(n.memory.buffer,vN,dze).set(e);try{let o;try{_N=e,Sp=this,o=n.llhttp_execute(this.ptr,vN,e.length)}finally{Sp=null,_N=null}if(o!==CN.ERROR.OK){let s=e.subarray(n.llhttp_get_error_pos(this.ptr)-vN);if(o===CN.ERROR.PAUSED_UPGRADE)this.onUpgrade(s);else if(o===CN.ERROR.PAUSED)this.paused=!0,r.unshift(s);else{let c=n.llhttp_get_error_reason(this.ptr),l="";if(c){let u=new Uint8Array(n.memory.buffer,c).indexOf(0);l="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,c,u).toString()+")"}throw new bLo(l,CN.ERROR[o],s)}}}catch(o){xi.destroy(r,o)}}destroy(){vi(Sp===null),vi(this.ptr!=null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&EQt.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){return this.statusText=e.toString(),0}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;let n=r[Pw][r[ES]];return n?(n.onResponseStarted(),0):-1}onHeaderField(e){let r=this.headers.length;return(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length),0}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let o=xi.bufferToLowerCasedHeaderName(n);o==="keep-alive"?this.keepAlive+=e.toString():o==="connection"&&(this.connection+=e.toString())}else n.length===14&&xi.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());return this.trackHeader(e.length),0}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&xi.destroy(this.socket,new _Lo)}onUpgrade(e){let{upgrade:r,client:n,socket:o,headers:s,statusCode:c}=this;vi(r),vi(n[jse]===o),vi(!o.destroyed),vi(!this.paused),vi((s.length&1)===0);let l=n[Pw][n[ES]];vi(l),vi(l.upgrade||l.method==="CONNECT"),this.statusCode=0,this.statusText="",this.shouldKeepAlive=!1,this.headers=[],this.headersSize=0,o.unshift(e),o[Vd].destroy(),o[Vd]=null,o[IQt]=null,o[CS]=null,FLo(o),n[jse]=null,n[bgn]=null,n[Pw][n[ES]++]=null,n.emit("disconnect",n[vgn],[n],new Hse("upgrade"));try{l.onUpgrade(c,s,o)}catch(u){xi.destroy(o,u)}n[G9]()}onHeadersComplete(e,r,n){let{client:o,socket:s,headers:c,statusText:l}=this;if(s.destroyed)return-1;let u=o[Pw][o[ES]];if(!u)return-1;if(vi(!this.upgrade),vi(this.statusCode<200),e===100)return xi.destroy(s,new Kve("bad response",xi.getSocketInfo(s))),-1;if(r&&!u.upgrade)return xi.destroy(s,new Kve("bad upgrade",xi.getSocketInfo(s))),-1;if(vi(this.timeoutType===$se),this.statusCode=e,this.shouldKeepAlive=n||u.method==="HEAD"&&!s[BC]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let p=u.bodyTimeout!=null?u.bodyTimeout:o[DLo];this.setTimeout(p,pze)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(u.method==="CONNECT")return vi(o[oA]===1),this.upgrade=!0,2;if(r)return vi(o[oA]===1),this.upgrade=!0,2;if(vi((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&o[fze]){let p=this.keepAlive?xi.parseKeepAliveTimeout(this.keepAlive):null;if(p!=null){let h=Math.min(p-o[kLo],o[PLo]);h<=0?s[BC]=!0:o[hze]=h}else o[hze]=o[ILo]}else s[BC]=!0;let d=u.onHeaders(e,c,this.resume,l)===!1;return u.aborted?-1:u.method==="HEAD"||e<200?1:(s[Jve]&&(s[Jve]=!1,o[G9]()),d?CN.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:o,maxResponseSize:s}=this;if(n.destroyed)return-1;let c=r[Pw][r[ES]];return vi(c),vi(this.timeoutType===pze),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),vi(o>=200),s>-1&&this.bytesRead+e.length>s?(xi.destroy(n,new TLo),-1):(this.bytesRead+=e.length,c.onData(e)===!1?CN.ERROR.PAUSED:0)}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:o,headers:s,contentLength:c,bytesRead:l,shouldKeepAlive:u}=this;if(r.destroyed&&(!n||u))return-1;if(o)return 0;vi(n>=100),vi((this.headers.length&1)===0);let d=e[Pw][e[ES]];if(vi(d),this.statusCode=0,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,n<200)return 0;if(d.method!=="HEAD"&&c&&l!==parseInt(c,10))return xi.destroy(r,new ELo),-1;if(d.onComplete(s),e[Pw][e[ES]++]=null,r[H9])return vi(e[oA]===0),xi.destroy(r,new Hse("reset")),CN.ERROR.PAUSED;if(u){if(r[BC]&&e[oA]===0)return xi.destroy(r,new Hse("reset")),CN.ERROR.PAUSED;e[fze]==null||e[fze]===1?setImmediate(e[G9]):e[G9]()}else return xi.destroy(r,new Hse("reset")),CN.ERROR.PAUSED;return 0}};function ygn(t){let e=t.deref();if(!e)return;let{socket:r,timeoutType:n,client:o,paused:s}=e;n===$se?(!r[H9]||r.writableNeedDrain||o[oA]>1)&&(vi(!s,"cannot be paused while waiting for headers"),xi.destroy(r,new CLo)):n===pze?s||xi.destroy(r,new vLo):n===TQt&&(vi(o[oA]===0&&o[hze]),xi.destroy(r,new Hse("socket idle timeout")))}a(ygn,"onParserTimeout");function qLo(t,e){if(t[jse]=e,_Qt||(_Qt=ULo()),e.errored)throw e.errored;if(e.destroyed)throw new Kve("destroyed");return e[zve]=!1,e[H9]=!1,e[BC]=!1,e[Jve]=!1,e[Vd]=new SQt(t,e,_Qt),xi.addListener(e,"error",GLo),xi.addListener(e,"readable",HLo),xi.addListener(e,"end",jLo),xi.addListener(e,"close",$Lo),e[bQt]=!1,e.on("close",VLo),{version:"h1",defaultPipelining:1,write(r){return YLo(t,r)},resume(){WLo(t)},destroy(r,n){e[bQt]?queueMicrotask(n):(e.on("close",n),e.destroy(r))},get destroyed(){return e.destroyed},busy(r){return!!(e[H9]||e[BC]||e[Jve]||r&&(t[oA]>0&&!r.idempotent||t[oA]>0&&(r.upgrade||r.method==="CONNECT")||t[oA]>0&&xi.bodyLength(r.body)!==0&&(xi.isStream(r.body)||xi.isAsyncIterable(r.body)||xi.isFormDataLike(r.body))))}}}a(qLo,"connectH1");function GLo(t){vi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let e=this[Vd];if(t.code==="ECONNRESET"&&e.statusCode&&!e.shouldKeepAlive){e.onMessageComplete();return}this[CS]=t,this[IQt][BLo](t)}a(GLo,"onHttpSocketError");function HLo(){this[Vd]?.readMore()}a(HLo,"onHttpSocketReadable");function jLo(){let t=this[Vd];if(t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}xi.destroy(this,new Kve("other side closed",xi.getSocketInfo(this)))}a(jLo,"onHttpSocketEnd");function $Lo(){let t=this[Vd];t&&(!this[CS]&&t.statusCode&&!t.shouldKeepAlive&&t.onMessageComplete(),this[Vd].destroy(),this[Vd]=null);let e=this[CS]||new Kve("closed",xi.getSocketInfo(this)),r=this[IQt];if(r[jse]=null,r[bgn]=null,r.destroyed){vi(r[SLo]===0);let n=r[Pw].splice(r[ES]);for(let o=0;o0&&e.code!=="UND_ERR_INFO"){let n=r[Pw][r[ES]];r[Pw][r[ES]++]=null,xi.errorRequest(r,n,e)}r[wLo]=r[ES],vi(r[oA]===0),r.emit("disconnect",r[vgn],[r],e),r[G9]()}a($Lo,"onHttpSocketClose");function VLo(){this[bQt]=!0}a(VLo,"onSocketClose");function WLo(t){let e=t[jse];if(e&&!e.destroyed){if(t[ggn]===0?!e[zve]&&e.unref&&(e.unref(),e[zve]=!0):e[zve]&&e.ref&&(e.ref(),e[zve]=!1),t[ggn]===0)e[Vd].timeoutType!==TQt&&e[Vd].setTimeout(t[hze],TQt);else if(t[oA]>0&&e[Vd].statusCode<200&&e[Vd].timeoutType!==$se){let r=t[Pw][t[ES]],n=r.headersTimeout!=null?r.headersTimeout:t[NLo];e[Vd].setTimeout(n,$se)}}}a(WLo,"resumeH1");function zLo(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}a(zLo,"shouldSendContentLength");function YLo(t,e){let{method:r,path:n,host:o,upgrade:s,blocking:c,reset:l}=e,{body:u,headers:d,contentLength:p}=e,h=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(xi.isFormDataLike(u)){CQt||(CQt=Gse().extractBody);let[E,_]=CQt(u);e.contentType==null&&d.push("content-type",_),u=E.stream,p=E.length}else xi.isBlobLike(u)&&e.contentType==null&&u.type&&d.push("content-type",u.type);u&&typeof u.read=="function"&&u.read(0);let m=xi.bodyLength(u);if(p=m??p,p===null&&(p=e.contentLength),p===0&&!h&&(p=null),zLo(r)&&p>0&&e.contentLength!==null&&e.contentLength!==p){if(t[vQt])return xi.errorRequest(t,e,new fW),!1;process.emitWarning(new fW)}let g=t[jse],A=a(E=>{e.aborted||e.completed||(xi.errorRequest(t,e,E||new _gn),xi.destroy(u),xi.destroy(g,new Hse("aborted")))},"abort");try{e.onConnect(A)}catch(E){xi.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(g[BC]=!0),(s||r==="CONNECT")&&(g[BC]=!0),l!=null&&(g[BC]=l),t[Agn]&&g[MLo]++>=t[Agn]&&(g[BC]=!0),c&&(g[Jve]=!0),g.setTypeOfService&&g.setTypeOfService(e.typeOfService);let y=`${r} ${n} HTTP/1.1\r +`);g.push(b,v,A),typeof v.size=="number"?c+=b.byteLength+v.size+A.byteLength:y=!0}let E=AWe.encode(`--${d}--\r +`);g.push(E),c+=E.byteLength,y&&(c=null),s=t,o=a(async function*(){for(let _ of g)_.stream?yield*_.stream():yield _},"action"),l=`multipart/form-data; boundary=${d}`}else if(yw.is.Blob(t))s=t,c=t.size,t.type&&(l=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(FQt.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=yw.is.ReadableStream(t)?t:e6o(t)}return(typeof s=="string"||s6o(s))&&(o=a(()=>(c=typeof s=="string"?Buffer.byteLength(s):s.length,s),"action")),o!=null&&(async()=>{let d=o(),p=d?.[Symbol.asyncIterator]?.();if(p)for await(let h of p){if(LQt(r))break;h.length&&n.enqueue(new Uint8Array(h))}else d?.length&&!LQt(r)&&n.enqueue(typeof d=="string"?AWe.encode(d):new Uint8Array(d));queueMicrotask(()=>t6o(n))})(),[{stream:r,source:s,length:c},l]}a(dAn,"extractBody");function g6o(t,e=!1){return yw.is.ReadableStream(t)&&(BQt(!FQt.isDisturbed(t),"The body has already been consumed."),BQt(!t.locked,"The stream is locked.")),dAn(t,e)}a(g6o,"safelyExtractBody");function A6o(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}a(A6o,"cloneBody");function y6o(t,e){return{blob(){return tse(this,n=>{let o=uAn(e(this));return o===null?o="":o&&(o=a6o(o)),new Blob([n],{type:o})},t,e)},arrayBuffer(){return tse(this,n=>new Uint8Array(n).buffer,t,e)},text(){return tse(this,d6o,t,e)},json(){return tse(this,u6o,t,e)},formData(){return tse(this,n=>{let o=uAn(e(this));if(o!==null)switch(o.essence){case"multipart/form-data":{let s=c6o(n,o),c=new lAn;return i6o(c,s),c}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(n.toString()),c=new lAn;for(let[l,u]of s)c.append(l,u);return c}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return tse(this,n=>new Uint8Array(n),t,e)}}}a(y6o,"bodyMixinMethods");function E6o(t,e){Object.assign(t.prototype,y6o(t,e))}a(E6o,"mixinBody");function tse(t,e,r,n){try{yw.brandCheck(t,r)}catch(l){return Promise.reject(l)}if(t=n(t),fAn(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let o=l6o(),s=o.reject,c=a(l=>{try{o.resolve(e(l))}catch(u){s(u)}},"successSteps");return t.body==null?(c(Buffer.allocUnsafe(0)),o.promise):(r6o(t.body,c,s),o.promise)}a(tse,"consumeBody");function fAn(t){let e=t.body;return e!=null&&(e.stream.locked||FQt.isDisturbed(e.stream))}a(fAn,"bodyUnusable");function uAn(t){let e=t.headersList,r=n6o(e);return r==="failure"?null:r}a(uAn,"bodyMimeType");pAn.exports={extractBody:dAn,safelyExtractBody:g6o,cloneBody:A6o,mixinBody:E6o,streamRegistry:m6o,bodyUnusable:fAn}});var TAn=T((vFu,bAn)=>{"use strict";f();var Ci=require("node:assert"),Ii=Ki(),{channels:hAn}=f9(),UQt=EUt(),{RequestContentLengthMismatchError:EV,ResponseContentLengthMismatchError:_6o,RequestAbortedError:_An,HeadersTimeoutError:C6o,HeadersOverflowError:v6o,SocketError:W1e,InformationalError:nse,BodyTimeoutError:b6o,HTTPParserError:T6o,ResponseExceededMaxSizeError:S6o}=Ni(),{kUrl:CAn,kReset:T_,kClient:VQt,kParser:Ld,kBlocking:z1e,kRunning:Jg,kPending:I6o,kSize:mAn,kWriting:g9,kQueue:Ew,kNoRef:$1e,kKeepAliveDefaultTimeout:x6o,kHostHeader:w6o,kPendingIdx:R6o,kRunningIdx:aS,kError:cS,kPipelining:_We,kSocket:ise,kKeepAliveTimeoutValue:vWe,kMaxHeadersSize:P6o,kKeepAliveMaxTimeout:k6o,kKeepAliveTimeoutThreshold:D6o,kHeadersTimeout:N6o,kBodyTimeout:M6o,kStrictContentLength:GQt,kMaxRequests:gAn,kCounter:O6o,kMaxResponseSize:B6o,kOnError:L6o,kResume:m9,kHTTPContext:vAn,kClosed:HQt}=rc(),c5=pgn(),F6o=Buffer.alloc(0),yWe=Buffer[Symbol.species],U6o=Ii.removeAllListeners,QQt;function Q6o(){let t=process.env.JEST_WORKER_ID?fQt():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module(ggn())}catch{}return e||(e=new WebAssembly.Module(t||fQt())),new WebAssembly.Instance(e,{env:{wasm_on_url:a((n,o,s)=>0,"wasm_on_url"),wasm_on_status:a((n,o,s)=>{Ci(Ep.ptr===n);let c=o-u5+l5.byteOffset;return Ep.onStatus(new yWe(l5.buffer,c,s))},"wasm_on_status"),wasm_on_message_begin:a(n=>(Ci(Ep.ptr===n),Ep.onMessageBegin()),"wasm_on_message_begin"),wasm_on_header_field:a((n,o,s)=>{Ci(Ep.ptr===n);let c=o-u5+l5.byteOffset;return Ep.onHeaderField(new yWe(l5.buffer,c,s))},"wasm_on_header_field"),wasm_on_header_value:a((n,o,s)=>{Ci(Ep.ptr===n);let c=o-u5+l5.byteOffset;return Ep.onHeaderValue(new yWe(l5.buffer,c,s))},"wasm_on_header_value"),wasm_on_headers_complete:a((n,o,s,c)=>(Ci(Ep.ptr===n),Ep.onHeadersComplete(o,s===1,c===1)),"wasm_on_headers_complete"),wasm_on_body:a((n,o,s)=>{Ci(Ep.ptr===n);let c=o-u5+l5.byteOffset;return Ep.onBody(new yWe(l5.buffer,c,s))},"wasm_on_body"),wasm_on_message_complete:a(n=>(Ci(Ep.ptr===n),Ep.onMessageComplete()),"wasm_on_message_complete")}})}a(Q6o,"lazyllhttp");var qQt=null,Ep=null,l5=null,EWe=0,u5=null,q6o=0,V1e=1,ose=2|V1e,CWe=4|V1e,jQt=8|q6o,$Qt=class{static{a(this,"Parser")}constructor(e,r,{exports:n}){this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(c5.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[P6o],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[B6o]}setTimeout(e,r){e!==this.timeoutValue||r&V1e^this.timeoutType&V1e?(this.timeout&&(UQt.clearTimeout(this.timeout),this.timeout=null),e&&(r&V1e?this.timeout=UQt.setFastTimeout(AAn,e,new WeakRef(this)):(this.timeout=setTimeout(AAn,e,new WeakRef(this)),this.timeout?.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(Ci(this.ptr!=null),Ci(Ep===null),this.llhttp.llhttp_resume(this.ptr),Ci(this.timeoutType===CWe),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||F6o),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){Ci(Ep===null),Ci(this.ptr!=null),Ci(!this.paused);let{socket:r,llhttp:n}=this;e.length>EWe&&(u5&&n.free(u5),EWe=Math.ceil(e.length/4096)*4096,u5=n.malloc(EWe)),new Uint8Array(n.memory.buffer,u5,EWe).set(e);try{let o;try{l5=e,Ep=this,o=n.llhttp_execute(this.ptr,u5,e.length)}finally{Ep=null,l5=null}if(o!==c5.ERROR.OK){let s=e.subarray(n.llhttp_get_error_pos(this.ptr)-u5);if(o===c5.ERROR.PAUSED_UPGRADE)this.onUpgrade(s);else if(o===c5.ERROR.PAUSED)this.paused=!0,r.unshift(s);else{let c=n.llhttp_get_error_reason(this.ptr),l="";if(c){let u=new Uint8Array(n.memory.buffer,c).indexOf(0);l="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,c,u).toString()+")"}throw new T6o(l,c5.ERROR[o],s)}}}catch(o){Ii.destroy(r,o)}}destroy(){Ci(Ep===null),Ci(this.ptr!=null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&UQt.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){return this.statusText=e.toString(),0}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;let n=r[Ew][r[aS]];return n?(n.onResponseStarted(),0):-1}onHeaderField(e){let r=this.headers.length;return(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length),0}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let o=Ii.bufferToLowerCasedHeaderName(n);o==="keep-alive"?this.keepAlive+=e.toString():o==="connection"&&(this.connection+=e.toString())}else n.length===14&&Ii.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());return this.trackHeader(e.length),0}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&Ii.destroy(this.socket,new v6o)}onUpgrade(e){let{upgrade:r,client:n,socket:o,headers:s,statusCode:c}=this;Ci(r),Ci(n[ise]===o),Ci(!o.destroyed),Ci(!this.paused),Ci((s.length&1)===0);let l=n[Ew][n[aS]];Ci(l),Ci(l.upgrade||l.method==="CONNECT"),this.statusCode=0,this.statusText="",this.shouldKeepAlive=!1,this.headers=[],this.headersSize=0,o.unshift(e),o[Ld].destroy(),o[Ld]=null,o[VQt]=null,o[cS]=null,U6o(o),n[ise]=null,n[vAn]=null,n[Ew][n[aS]++]=null,n.emit("disconnect",n[CAn],[n],new nse("upgrade"));try{l.onUpgrade(c,s,o)}catch(u){Ii.destroy(o,u)}n[m9]()}onHeadersComplete(e,r,n){let{client:o,socket:s,headers:c,statusText:l}=this;if(s.destroyed)return-1;let u=o[Ew][o[aS]];if(!u)return-1;if(Ci(!this.upgrade),Ci(this.statusCode<200),e===100)return Ii.destroy(s,new W1e("bad response",Ii.getSocketInfo(s))),-1;if(r&&!u.upgrade)return Ii.destroy(s,new W1e("bad upgrade",Ii.getSocketInfo(s))),-1;if(Ci(this.timeoutType===ose),this.statusCode=e,this.shouldKeepAlive=n||u.method==="HEAD"&&!s[T_]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let p=u.bodyTimeout!=null?u.bodyTimeout:o[M6o];this.setTimeout(p,CWe)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(u.method==="CONNECT")return Ci(o[Jg]===1),this.upgrade=!0,2;if(r)return Ci(o[Jg]===1),this.upgrade=!0,2;if(Ci((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&o[_We]){let p=this.keepAlive?Ii.parseKeepAliveTimeout(this.keepAlive):null;if(p!=null){let h=Math.min(p-o[D6o],o[k6o]);h<=0?s[T_]=!0:o[vWe]=h}else o[vWe]=o[x6o]}else s[T_]=!0;let d=u.onHeaders(e,c,this.resume,l)===!1;return u.aborted?-1:u.method==="HEAD"||e<200?1:(s[z1e]&&(s[z1e]=!1,o[m9]()),d?c5.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:o,maxResponseSize:s}=this;if(n.destroyed)return-1;let c=r[Ew][r[aS]];return Ci(c),Ci(this.timeoutType===CWe),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),Ci(o>=200),s>-1&&this.bytesRead+e.length>s?(Ii.destroy(n,new S6o),-1):(this.bytesRead+=e.length,c.onData(e)===!1?c5.ERROR.PAUSED:0)}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:o,headers:s,contentLength:c,bytesRead:l,shouldKeepAlive:u}=this;if(r.destroyed&&(!n||u))return-1;if(o)return 0;Ci(n>=100),Ci((this.headers.length&1)===0);let d=e[Ew][e[aS]];if(Ci(d),this.statusCode=0,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,n<200)return 0;if(d.method!=="HEAD"&&c&&l!==parseInt(c,10))return Ii.destroy(r,new _6o),-1;if(d.onComplete(s),e[Ew][e[aS]++]=null,r[g9])return Ci(e[Jg]===0),Ii.destroy(r,new nse("reset")),c5.ERROR.PAUSED;if(u){if(r[T_]&&e[Jg]===0)return Ii.destroy(r,new nse("reset")),c5.ERROR.PAUSED;e[_We]==null||e[_We]===1?setImmediate(e[m9]):e[m9]()}else return Ii.destroy(r,new nse("reset")),c5.ERROR.PAUSED;return 0}};function AAn(t){let e=t.deref();if(!e)return;let{socket:r,timeoutType:n,client:o,paused:s}=e;n===ose?(!r[g9]||r.writableNeedDrain||o[Jg]>1)&&(Ci(!s,"cannot be paused while waiting for headers"),Ii.destroy(r,new C6o)):n===CWe?s||Ii.destroy(r,new b6o):n===jQt&&(Ci(o[Jg]===0&&o[vWe]),Ii.destroy(r,new nse("socket idle timeout")))}a(AAn,"onParserTimeout");function G6o(t,e){if(t[ise]=e,qQt||(qQt=Q6o()),e.errored)throw e.errored;if(e.destroyed)throw new W1e("destroyed");return e[$1e]=!1,e[g9]=!1,e[T_]=!1,e[z1e]=!1,e[Ld]=new $Qt(t,e,qQt),Ii.addListener(e,"error",H6o),Ii.addListener(e,"readable",j6o),Ii.addListener(e,"end",$6o),Ii.addListener(e,"close",V6o),e[HQt]=!1,e.on("close",W6o),{version:"h1",defaultPipelining:1,write(r){return K6o(t,r)},resume(){z6o(t)},destroy(r,n){e[HQt]?queueMicrotask(n):(e.on("close",n),e.destroy(r))},get destroyed(){return e.destroyed},busy(r){return!!(e[g9]||e[T_]||e[z1e]||r&&(t[Jg]>0&&!r.idempotent||t[Jg]>0&&(r.upgrade||r.method==="CONNECT")||t[Jg]>0&&Ii.bodyLength(r.body)!==0&&(Ii.isStream(r.body)||Ii.isAsyncIterable(r.body)||Ii.isFormDataLike(r.body))))}}}a(G6o,"connectH1");function H6o(t){Ci(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let e=this[Ld];if(t.code==="ECONNRESET"&&e.statusCode&&!e.shouldKeepAlive){e.onMessageComplete();return}this[cS]=t,this[VQt][L6o](t)}a(H6o,"onHttpSocketError");function j6o(){this[Ld]?.readMore()}a(j6o,"onHttpSocketReadable");function $6o(){let t=this[Ld];if(t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}Ii.destroy(this,new W1e("other side closed",Ii.getSocketInfo(this)))}a($6o,"onHttpSocketEnd");function V6o(){let t=this[Ld];t&&(!this[cS]&&t.statusCode&&!t.shouldKeepAlive&&t.onMessageComplete(),this[Ld].destroy(),this[Ld]=null);let e=this[cS]||new W1e("closed",Ii.getSocketInfo(this)),r=this[VQt];if(r[ise]=null,r[vAn]=null,r.destroyed){Ci(r[I6o]===0);let n=r[Ew].splice(r[aS]);for(let o=0;o0&&e.code!=="UND_ERR_INFO"){let n=r[Ew][r[aS]];r[Ew][r[aS]++]=null,Ii.errorRequest(r,n,e)}r[R6o]=r[aS],Ci(r[Jg]===0),r.emit("disconnect",r[CAn],[r],e),r[m9]()}a(V6o,"onHttpSocketClose");function W6o(){this[HQt]=!0}a(W6o,"onSocketClose");function z6o(t){let e=t[ise];if(e&&!e.destroyed){if(t[mAn]===0?!e[$1e]&&e.unref&&(e.unref(),e[$1e]=!0):e[$1e]&&e.ref&&(e.ref(),e[$1e]=!1),t[mAn]===0)e[Ld].timeoutType!==jQt&&e[Ld].setTimeout(t[vWe],jQt);else if(t[Jg]>0&&e[Ld].statusCode<200&&e[Ld].timeoutType!==ose){let r=t[Ew][t[aS]],n=r.headersTimeout!=null?r.headersTimeout:t[N6o];e[Ld].setTimeout(n,ose)}}}a(z6o,"resumeH1");function Y6o(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}a(Y6o,"shouldSendContentLength");function K6o(t,e){let{method:r,path:n,host:o,upgrade:s,blocking:c,reset:l}=e,{body:u,headers:d,contentLength:p}=e,h=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(Ii.isFormDataLike(u)){QQt||(QQt=rse().extractBody);let[E,_]=QQt(u);e.contentType==null&&d.push("content-type",_),u=E.stream,p=E.length}else Ii.isBlobLike(u)&&e.contentType==null&&u.type&&d.push("content-type",u.type);u&&typeof u.read=="function"&&u.read(0);let m=Ii.bodyLength(u);if(p=m??p,p===null&&(p=e.contentLength),p===0&&!h&&(p=null),Y6o(r)&&p>0&&e.contentLength!==null&&e.contentLength!==p){if(t[GQt])return Ii.errorRequest(t,e,new EV),!1;process.emitWarning(new EV)}let g=t[ise],A=a(E=>{e.aborted||e.completed||(Ii.errorRequest(t,e,E||new _An),Ii.destroy(u),Ii.destroy(g,new nse("aborted")))},"abort");try{e.onConnect(A)}catch(E){Ii.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(g[T_]=!0),(s||r==="CONNECT")&&(g[T_]=!0),l!=null&&(g[T_]=l),t[gAn]&&g[O6o]++>=t[gAn]&&(g[T_]=!0),c&&(g[z1e]=!0),g.setTypeOfService&&g.setTypeOfService(e.typeOfService);let y=`${r} ${n} HTTP/1.1\r `;if(typeof o=="string"?y+=`host: ${o}\r -`:y+=t[xLo],s?y+=`connection: upgrade\r +`:y+=t[w6o],s?y+=`connection: upgrade\r upgrade: ${s}\r -`:t[fze]&&!g[BC]?y+=`connection: keep-alive\r +`:t[_We]&&!g[T_]?y+=`connection: keep-alive\r `:y+=`connection: close\r `,Array.isArray(d))for(let E=0;E{e.removeListener("error",g)}),!u){let A=new _gn;queueMicrotask(()=>g(A))}},"onClose"),g=a(function(A){if(!u){if(u=!0,vi(o.destroyed||o[H9]&&r[oA]<=1),o.off("drain",h).off("error",g),e.removeListener("data",p).removeListener("end",g).removeListener("close",m),!A)try{d.end()}catch(y){A=y}d.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?xi.destroy(e,A):xi.destroy(e)}},"onFinished");e.on("data",p).on("end",g).on("error",g).on("close",m),e.resume&&e.resume(),o.on("drain",h).on("error",g),e.errorEmitted??e.errored?setImmediate(g,e.errored):(e.endEmitted??e.readableEnded)&&setImmediate(g,null),(e.closeEmitted??e.closed)&&setImmediate(m)}a(KLo,"writeStream");function Egn(t,e,r,n,o,s,c,l){try{e?xi.isBuffer(e)&&(vi(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${c}content-length: ${s}\r +`}return hAn.sendHeaders.hasSubscribers&&hAn.sendHeaders.publish({request:e,headers:y,socket:g}),!u||m===0?yAn(A,null,t,e,g,p,y,h):Ii.isBuffer(u)?yAn(A,u,t,e,g,p,y,h):Ii.isBlobLike(u)?typeof u.stream=="function"?EAn(A,u.stream(),t,e,g,p,y,h):X6o(A,u,t,e,g,p,y,h):Ii.isStream(u)?J6o(A,u,t,e,g,p,y,h):Ii.isIterable(u)?EAn(A,u,t,e,g,p,y,h):Ci(!1),!0}a(K6o,"writeH1");function J6o(t,e,r,n,o,s,c,l){Ci(s!==0||r[Jg]===0,"stream body cannot be pipelined");let u=!1,d=new bWe({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c}),p=a(function(A){if(!u)try{!d.write(A)&&this.pause&&this.pause()}catch(y){Ii.destroy(this,y)}},"onData"),h=a(function(){u||e.resume&&e.resume()},"onDrain"),m=a(function(){if(queueMicrotask(()=>{e.removeListener("error",g)}),!u){let A=new _An;queueMicrotask(()=>g(A))}},"onClose"),g=a(function(A){if(!u){if(u=!0,Ci(o.destroyed||o[g9]&&r[Jg]<=1),o.off("drain",h).off("error",g),e.removeListener("data",p).removeListener("end",g).removeListener("close",m),!A)try{d.end()}catch(y){A=y}d.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?Ii.destroy(e,A):Ii.destroy(e)}},"onFinished");e.on("data",p).on("end",g).on("error",g).on("close",m),e.resume&&e.resume(),o.on("drain",h).on("error",g),e.errorEmitted??e.errored?setImmediate(g,e.errored):(e.endEmitted??e.readableEnded)&&setImmediate(g,null),(e.closeEmitted??e.closed)&&setImmediate(m)}a(J6o,"writeStream");function yAn(t,e,r,n,o,s,c,l){try{e?Ii.isBuffer(e)&&(Ci(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${c}content-length: ${s}\r \r -`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!l&&n.reset!==!1&&(o[BC]=!0)):s===0?o.write(`${c}content-length: 0\r +`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!l&&n.reset!==!1&&(o[T_]=!0)):s===0?o.write(`${c}content-length: 0\r \r -`,"latin1"):(vi(s===null,"no body must not have content length"),o.write(`${c}\r -`,"latin1")),n.onRequestSent(),r[G9]()}catch(u){t(u)}}a(Egn,"writeBuffer");async function JLo(t,e,r,n,o,s,c,l){vi(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new fW;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${c}content-length: ${s}\r +`,"latin1"):(Ci(s===null,"no body must not have content length"),o.write(`${c}\r +`,"latin1")),n.onRequestSent(),r[m9]()}catch(u){t(u)}}a(yAn,"writeBuffer");async function X6o(t,e,r,n,o,s,c,l){Ci(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new EV;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${c}content-length: ${s}\r \r -`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!l&&n.reset!==!1&&(o[BC]=!0),r[G9]()}catch(u){t(u)}}a(JLo,"writeBlob");async function Cgn(t,e,r,n,o,s,c,l){vi(s!==0||r[oA]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let m=u;u=null,m()}}a(d,"onDrain");let p=a(()=>new Promise((m,g)=>{vi(u===null),o[CS]?g(o[CS]):u=m}),"waitForDrain");o.on("close",d).on("drain",d);let h=new mze({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c});try{for await(let m of e){if(o[CS])throw o[CS];h.write(m)||await p()}h.end()}catch(m){h.destroy(m)}finally{o.off("close",d).off("drain",d)}}a(Cgn,"writeIterable");var mze=class{static{a(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:c,header:l}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=c,this.header=l,this.abort=e,r[H9]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:c,expectsPayload:l,header:u}=this;if(r[CS])throw r[CS];if(r.destroyed)return!1;let d=Buffer.byteLength(e);if(!d)return!0;if(o!==null&&c+d>o){if(s[vQt])throw new fW;process.emitWarning(new fW)}r.cork(),c===0&&(!l&&n.reset!==!1&&(r[BC]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r +`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!l&&n.reset!==!1&&(o[T_]=!0),r[m9]()}catch(u){t(u)}}a(X6o,"writeBlob");async function EAn(t,e,r,n,o,s,c,l){Ci(s!==0||r[Jg]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let m=u;u=null,m()}}a(d,"onDrain");let p=a(()=>new Promise((m,g)=>{Ci(u===null),o[cS]?g(o[cS]):u=m}),"waitForDrain");o.on("close",d).on("drain",d);let h=new bWe({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:l,header:c});try{for await(let m of e){if(o[cS])throw o[cS];h.write(m)||await p()}h.end()}catch(m){h.destroy(m)}finally{o.off("close",d).off("drain",d)}}a(EAn,"writeIterable");var bWe=class{static{a(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:c,header:l}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=c,this.header=l,this.abort=e,r[g9]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:c,expectsPayload:l,header:u}=this;if(r[cS])throw r[cS];if(r.destroyed)return!1;let d=Buffer.byteLength(e);if(!d)return!0;if(o!==null&&c+d>o){if(s[GQt])throw new EV;process.emitWarning(new EV)}r.cork(),c===0&&(!l&&n.reset!==!1&&(r[T_]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r `,"latin1"):r.write(`${u}content-length: ${o}\r \r `,"latin1")),o===null&&r.write(`\r ${d.toString(16)}\r -`,"latin1"),this.bytesWritten+=d;let p=r.write(e);return r.uncork(),n.onBodySent(e),p||r[Vd].timeout&&r[Vd].timeoutType===$se&&r[Vd].timeout.refresh&&r[Vd].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:c,request:l}=this;if(l.onRequestSent(),e[H9]=!1,e[CS])throw e[CS];if(!e.destroyed){if(o===0?s?e.write(`${c}content-length: 0\r +`,"latin1"),this.bytesWritten+=d;let p=r.write(e);return r.uncork(),n.onBodySent(e),p||r[Ld].timeout&&r[Ld].timeoutType===ose&&r[Ld].timeout.refresh&&r[Ld].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:c,request:l}=this;if(l.onRequestSent(),e[g9]=!1,e[cS])throw e[cS];if(!e.destroyed){if(o===0?s?e.write(`${c}content-length: 0\r \r `,"latin1"):e.write(`${c}\r `,"latin1"):r===null&&e.write(`\r 0\r \r -`,"latin1"),r!==null&&o!==r){if(n[vQt])throw new fW;process.emitWarning(new fW)}e[Vd].timeout&&e[Vd].timeoutType===$se&&e[Vd].timeout.refresh&&e[Vd].timeout.refresh(),n[G9]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[H9]=!1,e&&(vi(n[oA]<=1,"pipeline should only contain this request"),o(e))}};Tgn.exports=qLo});var Mgn=T((h8u,Dgn)=>{"use strict";f();var vS=require("node:assert"),{pipeline:XLo}=require("node:stream"),Do=eo(),{RequestContentLengthMismatchError:PQt,RequestAbortedError:ZLo,SocketError:tbe,InformationalError:j9,InvalidArgumentError:e8o}=Oi(),{kUrl:ebe,kReset:Eze,kClient:Rv,kRunning:rbe,kPending:t8o,kQueue:$9,kPendingIdx:NQt,kRunningIdx:kw,kError:Pv,kSocket:ad,kStrictContentLength:r8o,kOnError:Vse,kMaxConcurrentStreams:Aze,kPingInterval:Ign,kHTTP2Session:b4,kHTTP2InitialWindowSize:n8o,kHTTP2ConnectionWindowSize:i8o,kResume:bN,kSize:o8o,kHTTPContext:DQt,kClosed:kQt,kBodyTimeout:s8o,kEnableConnectProtocol:Xve,kRemoteSettings:Zve,kHTTP2Stream:gze,kHTTP2SessionState:MQt}=ac(),{channels:xgn}=U9(),_S=Symbol("open streams"),wgn,yze;try{yze=require("node:http2")}catch{yze={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:a8o,HTTP2_HEADER_METHOD:Rgn,HTTP2_HEADER_PATH:Pgn,HTTP2_HEADER_SCHEME:xQt,HTTP2_HEADER_CONTENT_LENGTH:c8o,HTTP2_HEADER_EXPECT:l8o,HTTP2_HEADER_STATUS:wQt,HTTP2_HEADER_PROTOCOL:u8o,NGHTTP2_REFUSED_STREAM:d8o,NGHTTP2_CANCEL:f8o}}=yze;function RQt(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}a(RQt,"parseH2Headers");function p8o(t,e){t[ad]=e;let r=t[n8o],n=t[i8o],o=yze.connect(t[ebe],{createConnection:a(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Aze],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[ad]=e,o[_S]=0,o[Rv]=t,o[ad]=e,o[MQt]={ping:{interval:t[Ign]===0?null:setInterval(A8o,t[Ign],o).unref()}},o[Xve]=!1,o[Zve]=!1,n&&Do.addListener(o,"connect",m8o.bind(o,n)),Do.addListener(o,"error",y8o),Do.addListener(o,"frameError",E8o),Do.addListener(o,"end",C8o),Do.addListener(o,"goaway",_8o),Do.addListener(o,"close",v8o),Do.addListener(o,"remoteSettings",g8o),o.unref(),t[b4]=o,e[b4]=o,Do.addListener(e,"error",T8o),Do.addListener(e,"end",S8o),Do.addListener(e,"close",b8o),e[kQt]=!1,e.on("close",I8o),{version:"h2",defaultPipelining:1/0,write(s){return w8o(t,s)},resume(){h8o(t)},destroy(s,c){e[kQt]?queueMicrotask(c):e.destroy(s).on("close",c)},get destroyed(){return e.destroyed},busy(s){if(s!=null)if(t[rbe]>0){if(s.idempotent===!1||(s.upgrade==="websocket"||s.method==="CONNECT")&&o[Zve]===!1||Do.bodyLength(s.body)!==0&&(Do.isStream(s.body)||Do.isAsyncIterable(s.body)||Do.isFormDataLike(s.body)))return!0}else return(s.upgrade==="websocket"||s.method==="CONNECT")&&o[Zve]===!1;return!1}}}a(p8o,"connectH2");function h8o(t){let e=t[ad];e?.destroyed===!1&&(t[o8o]===0||t[Aze]===0?(e.unref(),t[b4].unref()):(e.ref(),t[b4].ref()))}a(h8o,"resumeH2");function m8o(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}a(m8o,"applyConnectionWindowSize");function g8o(t){if(this[Rv][Aze]=t.maxConcurrentStreams??this[Rv][Aze],this[Zve]===!0&&this[Xve]===!0&&t.enableConnectProtocol===!1){let e=new j9("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[ad][Pv]=e,this[Rv][Vse](e);return}this[Xve]=t.enableConnectProtocol??this[Xve],this[Zve]=!0,this[Rv][bN]()}a(g8o,"onHttp2RemoteSettings");function A8o(t){let e=t[MQt];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,o){let s=this[Rv],c=this[Rv];if(n!=null){let l=new j9(`HTTP/2: "PING" errored - type ${n.message}`);c[Pv]=l,s[Vse](l)}else s.emit("ping",o)}a(r,"onPing")}a(A8o,"onHttp2SendPing");function y8o(t){vS(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[ad][Pv]=t,this[Rv][Vse](t)}a(y8o,"onHttp2SessionError");function E8o(t,e,r){if(r===0){let n=new j9(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[ad][Pv]=n,this[Rv][Vse](n)}}a(E8o,"onHttp2FrameError");function C8o(){let t=new tbe("other side closed",Do.getSocketInfo(this[ad]));this.destroy(t),Do.destroy(this[ad],t)}a(C8o,"onHttp2SessionEnd");function _8o(t){let e=this[Pv]||new tbe(`HTTP/2: "GOAWAY" frame received with code ${t}`,Do.getSocketInfo(this[ad])),r=this[Rv];if(r[ad]=null,r[DQt]=null,this.close(),this[b4]=null,Do.destroy(this[ad],e),r[kw]{e.aborted||e.completed||(w=w||new ZLo,Do.errorRequest(t,e,w),A!=null&&(A.removeAllListeners("data"),A.close(),t[Vse](w),t[bN]()),Do.destroy(m,w))},"abort");try{e.onConnect(_)}catch(w){Do.errorRequest(t,e,w)}if(e.aborted)return!1;if(l||o==="CONNECT")return n.ref(),l==="websocket"?n[Xve]===!1?(Do.errorRequest(t,e,new j9("HTTP/2: Extended CONNECT protocol not supported by server")),n.unref(),!1):(g[Rgn]="CONNECT",g[u8o]="websocket",g[Pgn]=s,p==="ws:"||p==="wss:"?g[xQt]=p==="ws:"?"http":"https":g[xQt]=p==="http:"?"http":"https",A=n.request(g,{endStream:!1,signal:d}),A[gze]=!0,A.once("response",(w,P)=>{let{[wQt]:k,...Q}=w;e.onUpgrade(k,RQt(Q),A),++n[_S],t[$9][t[kw]++]=null}),A.on("error",()=>{(A.rstCode===d8o||A.rstCode===f8o)&&_(new j9(`HTTP/2: "stream error" received - code ${A.rstCode}`))}),A.once("close",()=>{n[_S]-=1,n[_S]===0&&n.unref()}),A.setTimeout(r),!0):(A=n.request(g,{endStream:!1,signal:d}),A[gze]=!0,A.on("response",w=>{let{[wQt]:P,...k}=w;e.onUpgrade(P,RQt(k),A),++n[_S],t[$9][t[kw]++]=null}),A.once("close",()=>{n[_S]-=1,n[_S]===0&&n.unref()}),A.setTimeout(r),!0);g[Pgn]=s,g[xQt]=p==="http:"?"http":"https";let v=o==="PUT"||o==="POST"||o==="PATCH";m&&typeof m.read=="function"&&m.read(0);let b=Do.bodyLength(m);if(Do.isFormDataLike(m)){wgn??=Gse().extractBody;let[w,P]=wgn(m);g["content-type"]=P,m=w.stream,b=w.length}if(b==null&&(b=e.contentLength),v||(b=null),x8o(o)&&b>0&&e.contentLength!=null&&e.contentLength!==b){if(t[r8o])return Do.errorRequest(t,e,new PQt),!1;process.emitWarning(new PQt)}if(b!=null&&(vS(m||b===0,"no body must not have content length"),g[c8o]=`${b}`),n.ref(),xgn.sendHeaders.hasSubscribers){let w="";for(let P in g)w+=`${P}: ${g[P]}\r -`;xgn.sendHeaders.publish({request:e,headers:w,socket:n[ad]})}let I=o==="GET"||o==="HEAD"||m===null;u?(g[l8o]="100-continue",A=n.request(g,{endStream:I,signal:d}),A[gze]=!0,A.once("continue",R)):(A=n.request(g,{endStream:I,signal:d}),A[gze]=!0,R()),++n[_S],A.setTimeout(r);let x=!1;return A.once("response",w=>{let{[wQt]:P,...k}=w;if(e.onResponseStarted(),x=!0,e.aborted){A.removeAllListeners("data");return}e.onHeaders(Number(P),RQt(k),A.resume.bind(A),"")===!1&&A.pause(),A.on("data",Q=>{e.aborted||e.completed||e.onData(Q)===!1&&A.pause()})}),A.once("end",()=>{A.removeAllListeners("data"),x?(!e.aborted&&!e.completed&&e.onComplete({}),t[$9][t[kw]++]=null,t[bN]()):(_(new j9("HTTP/2: stream half-closed (remote)")),t[$9][t[kw]++]=null,t[NQt]=t[kw],t[bN]())}),A.once("close",()=>{A.removeAllListeners("data"),n[_S]-=1,n[_S]===0&&n.unref()}),A.once("error",function(w){A.removeAllListeners("data"),_(w)}),A.once("frameError",(w,P)=>{A.removeAllListeners("data"),_(new j9(`HTTP/2: "frameError" received - type ${w}, code ${P}`))}),A.on("aborted",()=>{A.removeAllListeners("data")}),A.on("timeout",()=>{let w=new j9(`HTTP/2: "stream timeout after ${r}"`);A.removeAllListeners("data"),n[_S]-=1,n[_S]===0&&n.unref(),_(w)}),A.once("trailers",w=>{e.aborted||e.completed||(A.removeAllListeners("data"),e.onComplete(w))}),!0;function R(){!m||b===0?kgn(_,A,null,t,e,t[ad],b,v):Do.isBuffer(m)?kgn(_,A,m,t,e,t[ad],b,v):Do.isBlobLike(m)?typeof m.stream=="function"?Ngn(_,A,m.stream(),t,e,t[ad],b,v):P8o(_,A,m,t,e,t[ad],b,v):Do.isStream(m)?R8o(_,t[ad],v,A,m,t,e,b):Do.isIterable(m)?Ngn(_,A,m,t,e,t[ad],b,v):vS(!1)}a(R,"writeBodyH2")}a(w8o,"writeH2");function kgn(t,e,r,n,o,s,c,l){try{r!=null&&Do.isBuffer(r)&&(vS(c===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),o.onBodySent(r)),l||(s[Eze]=!0),o.onRequestSent(),n[bN]()}catch(u){t(u)}}a(kgn,"writeBuffer");function R8o(t,e,r,n,o,s,c,l){vS(l!==0||s[rbe]===0,"stream body cannot be pipelined");let u=XLo(o,n,p=>{p?(Do.destroy(u,p),t(p)):(Do.removeAllListeners(u),c.onRequestSent(),r||(e[Eze]=!0),s[bN]())});Do.addListener(u,"data",d);function d(p){c.onBodySent(p)}a(d,"onPipeData")}a(R8o,"writeStream");async function P8o(t,e,r,n,o,s,c,l){vS(c===r.size,"blob body must have content length");try{if(c!=null&&c!==r.size)throw new PQt;let u=Buffer.from(await r.arrayBuffer());e.cork(),e.write(u),e.uncork(),e.end(),o.onBodySent(u),o.onRequestSent(),l||(s[Eze]=!0),n[bN]()}catch(u){t(u)}}a(P8o,"writeBlob");async function Ngn(t,e,r,n,o,s,c,l){vS(c!==0||n[rbe]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let h=u;u=null,h()}}a(d,"onDrain");let p=a(()=>new Promise((h,m)=>{vS(u===null),s[Pv]?m(s[Pv]):u=h}),"waitForDrain");e.on("close",d).on("drain",d);try{for await(let h of r){if(s[Pv])throw s[Pv];let m=e.write(h);o.onBodySent(h),m||await p()}e.end(),o.onRequestSent(),l||(s[Eze]=!0),n[bN]()}catch(h){t(h)}finally{e.off("close",d).off("drain",d)}}a(Ngn,"writeIterable");Dgn.exports=p8o});var Y9=T((A8u,Ggn)=>{"use strict";f();var T4=require("node:assert"),Fgn=require("node:net"),nbe=require("node:http"),pW=eo(),{ClientStats:k8o}=wUt(),{channels:Wse}=U9(),N8o=rmn(),D8o=aW(),{InvalidArgumentError:ou,InformationalError:M8o,ClientDestroyedError:O8o}=Oi(),B8o=cW(),{kUrl:TN,kServerName:z9,kClient:L8o,kBusy:BQt,kConnect:F8o,kResuming:hW,kRunning:abe,kPending:cbe,kSize:ibe,kQueue:Nw,kConnected:U8o,kConnecting:zse,kNeedDrain:W9,kKeepAliveDefaultTimeout:Ogn,kHostHeader:Q8o,kPendingIdx:Dw,kRunningIdx:I4,kError:q8o,kPipelining:Cze,kKeepAliveTimeoutValue:G8o,kMaxHeadersSize:H8o,kKeepAliveMaxTimeout:j8o,kKeepAliveTimeoutThreshold:$8o,kHeadersTimeout:V8o,kBodyTimeout:W8o,kStrictContentLength:z8o,kConnector:obe,kMaxRequests:LQt,kCounter:Y8o,kClose:K8o,kDestroy:J8o,kDispatch:X8o,kLocalAddress:sbe,kMaxResponseSize:Z8o,kOnError:e6o,kHTTPContext:Pf,kMaxConcurrentStreams:t6o,kHTTP2InitialWindowSize:r6o,kHTTP2ConnectionWindowSize:n6o,kResume:S4,kPingInterval:i6o}=ac(),o6o=Sgn(),s6o=Mgn(),V9=Symbol("kClosedResolve"),a6o=nbe&&nbe.maxHeaderSize&&Number.isInteger(nbe.maxHeaderSize)&&nbe.maxHeaderSize>0?()=>nbe.maxHeaderSize:()=>{throw new ou("http module not available or http.maxHeaderSize invalid")},Bgn=a(()=>{},"noop");function Ugn(t){return t[Cze]??t[Pf]?.defaultPipelining??1}a(Ugn,"getPipelining");var FQt=class extends D8o{static{a(this,"Client")}constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:o,requestTimeout:s,connectTimeout:c,bodyTimeout:l,idleTimeout:u,keepAlive:d,keepAliveTimeout:p,maxKeepAliveTimeout:h,keepAliveMaxTimeout:m,keepAliveTimeoutThreshold:g,socketPath:A,pipelining:y,tls:E,strictContentLength:_,maxCachedSessions:v,connect:b,maxRequestsPerClient:I,localAddress:x,maxResponseSize:R,autoSelectFamily:w,autoSelectFamilyAttemptTimeout:P,maxConcurrentStreams:k,allowH2:Q,useH2c:M,initialWindowSize:D,connectionWindowSize:G,pingInterval:O}={}){if(d!==void 0)throw new ou("unsupported keepAlive, use pipelining=0 instead");if(o!==void 0)throw new ou("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(s!==void 0)throw new ou("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(u!==void 0)throw new ou("unsupported idleTimeout, use keepAliveTimeout instead");if(h!==void 0)throw new ou("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null){if(!Number.isInteger(r)||r<1)throw new ou("invalid maxHeaderSize")}else r=a6o();if(A!=null&&typeof A!="string")throw new ou("invalid socketPath");if(c!=null&&(!Number.isFinite(c)||c<0))throw new ou("invalid connectTimeout");if(p!=null&&(!Number.isFinite(p)||p<=0))throw new ou("invalid keepAliveTimeout");if(m!=null&&(!Number.isFinite(m)||m<=0))throw new ou("invalid keepAliveMaxTimeout");if(g!=null&&!Number.isFinite(g))throw new ou("invalid keepAliveTimeoutThreshold");if(n!=null&&(!Number.isInteger(n)||n<0))throw new ou("headersTimeout must be a positive integer or zero");if(l!=null&&(!Number.isInteger(l)||l<0))throw new ou("bodyTimeout must be a positive integer or zero");if(b!=null&&typeof b!="function"&&typeof b!="object")throw new ou("connect must be a function or an object");if(I!=null&&(!Number.isInteger(I)||I<0))throw new ou("maxRequestsPerClient must be a positive number");if(x!=null&&(typeof x!="string"||Fgn.isIP(x)===0))throw new ou("localAddress must be valid string IP address");if(R!=null&&(!Number.isInteger(R)||R<-1))throw new ou("maxResponseSize must be a positive number");if(P!=null&&(!Number.isInteger(P)||P<-1))throw new ou("autoSelectFamilyAttemptTimeout must be a positive number");if(Q!=null&&typeof Q!="boolean")throw new ou("allowH2 must be a valid boolean value");if(k!=null&&(typeof k!="number"||k<1))throw new ou("maxConcurrentStreams must be a positive integer, greater than 0");if(M!=null&&typeof M!="boolean")throw new ou("useH2c must be a valid boolean value");if(D!=null&&(!Number.isInteger(D)||D<1))throw new ou("initialWindowSize must be a positive integer, greater than 0");if(G!=null&&(!Number.isInteger(G)||G<1))throw new ou("connectionWindowSize must be a positive integer, greater than 0");if(O!=null&&(typeof O!="number"||!Number.isInteger(O)||O<0))throw new ou("pingInterval must be a positive integer, greater or equal to 0");if(super(),typeof b!="function")b=B8o({...E,maxCachedSessions:v,allowH2:Q,useH2c:M,socketPath:A,timeout:c,...typeof w=="boolean"?{autoSelectFamily:w,autoSelectFamilyAttemptTimeout:P}:void 0,...b});else if(A!=null){let N=b;b=a((F,U)=>N({...F,socketPath:A},U),"connect")}this[TN]=pW.parseOrigin(e),this[obe]=b,this[Cze]=y??1,this[H8o]=r,this[Ogn]=p??4e3,this[j8o]=m??6e5,this[$8o]=g??2e3,this[G8o]=this[Ogn],this[z9]=null,this[sbe]=x??null,this[hW]=0,this[W9]=0,this[Q8o]=`host: ${this[TN].hostname}${this[TN].port?`:${this[TN].port}`:""}\r -`,this[W8o]=l??3e5,this[V8o]=n??3e5,this[z8o]=_??!0,this[LQt]=I,this[V9]=null,this[Z8o]=R>-1?R:-1,this[Pf]=null,this[t6o]=k??100,this[r6o]=D??262144,this[n6o]=G??524288,this[i6o]=O??6e4,this[Nw]=[],this[I4]=0,this[Dw]=0,this[S4]=N=>UQt(this,N),this[e6o]=N=>Qgn(this,N)}get pipelining(){return this[Cze]}set pipelining(e){this[Cze]=e,this[S4](!0)}get stats(){return new k8o(this)}get[cbe](){return this[Nw].length-this[Dw]}get[abe](){return this[Dw]-this[I4]}get[ibe](){return this[Nw].length-this[I4]}get[U8o](){return!!this[Pf]&&!this[zse]&&!this[Pf].destroyed}get[BQt](){return!!(this[Pf]?.busy(null)||this[ibe]>=(Ugn(this)||1)||this[cbe]>0)}[F8o](e){qgn(this),this.once("connect",e)}[X8o](e,r){let n=new N8o(this[TN].origin,e,r);return this[Nw].push(n),this[hW]||(pW.bodyLength(n.body)==null&&pW.isIterable(n.body)?(this[hW]=1,queueMicrotask(()=>UQt(this))):this[S4](!0)),this[hW]&&this[W9]!==2&&this[BQt]&&(this[W9]=2),this[W9]<2}[K8o](){return new Promise(e=>{this[ibe]?this[V9]=e:e(null)})}[J8o](e){return new Promise(r=>{let n=this[Nw].splice(this[Dw]);for(let s=0;s{this[V9]&&(this[V9](),this[V9]=null),r(null)},"callback");this[Pf]?(this[Pf].destroy(e,o),this[Pf]=null):queueMicrotask(o),this[S4]()})}};function Qgn(t,e){if(t[abe]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){T4(t[Dw]===t[I4]);let r=t[Nw].splice(t[I4]);for(let n=0;n{if(s){OQt(t,s,{host:e,hostname:r,protocol:n,port:o}),t[S4]();return}if(t.destroyed){pW.destroy(c.on("error",Bgn),new O8o),t[S4]();return}T4(c);try{t[Pf]=c.alpnProtocol==="h2"?s6o(t,c):o6o(t,c)}catch(l){c.destroy().on("error",Bgn),OQt(t,l,{host:e,hostname:r,protocol:n,port:o}),t[S4]();return}t[zse]=!1,c[Y8o]=0,c[LQt]=t[LQt],c[L8o]=t,c[q8o]=null,Wse.connected.hasSubscribers&&Wse.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[Pf]?.version,servername:t[z9],localAddress:t[sbe]},connector:t[obe],socket:c}),t.emit("connect",t[TN],[t]),t[S4]()})}catch(s){OQt(t,s,{host:e,hostname:r,protocol:n,port:o}),t[S4]()}}a(qgn,"connect");function OQt(t,e,{host:r,hostname:n,protocol:o,port:s}){if(!t.destroyed){if(t[zse]=!1,Wse.connectError.hasSubscribers&&Wse.connectError.publish({connectParams:{host:r,hostname:n,protocol:o,port:s,version:t[Pf]?.version,servername:t[z9],localAddress:t[sbe]},connector:t[obe],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(T4(t[abe]===0);t[cbe]>0&&t[Nw][t[Dw]].servername===t[z9];){let c=t[Nw][t[Dw]++];pW.errorRequest(t,c,e)}else Qgn(t,e);t.emit("connectionError",t[TN],[t],e)}}a(OQt,"handleConnectError");function Lgn(t){t[W9]=0,t.emit("drain",t[TN],[t])}a(Lgn,"emitDrain");function UQt(t,e){t[hW]!==2&&(t[hW]=2,c6o(t,e),t[hW]=0,t[I4]>256&&(t[Nw].splice(0,t[I4]),t[Dw]-=t[I4],t[I4]=0))}a(UQt,"resume");function c6o(t,e){for(;;){if(t.destroyed){T4(t[cbe]===0);return}if(t[V9]&&!t[ibe]){t[V9](),t[V9]=null;return}if(t[Pf]&&t[Pf].resume(),t[BQt])t[W9]=2;else if(t[W9]===2){e?(t[W9]=1,queueMicrotask(()=>Lgn(t))):Lgn(t);continue}if(t[cbe]===0||t[abe]>=(Ugn(t)||1))return;let r=t[Nw][t[Dw]];if(r===null)return;if(t[TN].protocol==="https:"&&t[z9]!==r.servername){if(t[abe]>0)return;t[z9]=r.servername,t[Pf]?.destroy(new M8o("servername changed"),()=>{t[Pf]=null,UQt(t)})}if(t[zse])return;if(!t[Pf]){qgn(t);return}if(t[Pf].destroyed||t[Pf].busy(r))return;!r.aborted&&t[Pf].write(r)?t[Dw]++:t[Nw].splice(t[Dw],1)}}a(c6o,"_resume");Ggn.exports=FQt});var QQt=T((_8u,Hgn)=>{"use strict";f();var _ze=class{static{a(this,"FixedCircularBuffer")}bottom=0;top=0;list=new Array(2048).fill(void 0);next=null;isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Hgn.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new _ze}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new _ze),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var vze=T((T8u,Xgn)=>{"use strict";f();var{PoolStats:l6o}=wUt(),u6o=aW(),d6o=QQt(),{kConnected:qQt,kSize:jgn,kRunning:$gn,kPending:Vgn,kQueued:lbe,kBusy:f6o,kFree:p6o,kUrl:h6o,kClose:m6o,kDestroy:g6o,kDispatch:A6o}=ac(),Mh=Symbol("clients"),xy=Symbol("needDrain"),ube=Symbol("queue"),GQt=Symbol("closed resolve"),HQt=Symbol("onDrain"),Wgn=Symbol("onConnect"),zgn=Symbol("onDisconnect"),Ygn=Symbol("onConnectionError"),jQt=Symbol("get dispatcher"),Kgn=Symbol("add client"),Jgn=Symbol("remove client"),$Qt=class extends u6o{static{a(this,"PoolBase")}[ube]=new d6o;[lbe]=0;[Mh]=[];[xy]=!1;[HQt](e,r,n){let o=this[ube],s=!1;for(;!s;){let c=o.shift();if(!c)break;this[lbe]--,s=!e.dispatch(c.opts,c.handler)}if(e[xy]=s,!s&&this[xy]&&(this[xy]=!1,this.emit("drain",r,[this,...n])),this[GQt]&&o.isEmpty()){let c=[];for(let l=0;l{this.emit("connect",e,[this,...r])};[zgn]=(e,r,n)=>{this.emit("disconnect",e,[this,...r],n)};[Ygn]=(e,r,n)=>{this.emit("connectionError",e,[this,...r],n)};get[f6o](){return this[xy]}get[qQt](){let e=0;for(let{[qQt]:r}of this[Mh])e+=r;return e}get[p6o](){let e=0;for(let{[qQt]:r,[xy]:n}of this[Mh])e+=r&&!n;return e}get[Vgn](){let e=this[lbe];for(let{[Vgn]:r}of this[Mh])e+=r;return e}get[$gn](){let e=0;for(let{[$gn]:r}of this[Mh])e+=r;return e}get[jgn](){let e=this[lbe];for(let{[jgn]:r}of this[Mh])e+=r;return e}get stats(){return new l6o(this)}[m6o](){if(this[ube].isEmpty()){let e=[];for(let r=0;r{this[GQt]=e})}[g6o](e){for(;;){let n=this[ube].shift();if(!n)break;n.handler.onError(e)}let r=new Array(this[Mh].length);for(let n=0;n{this[xy]&&this[HQt](e,e[h6o],[e,this])}),this}[Jgn](e){e.close(()=>{let r=this[Mh].indexOf(e);r!==-1&&this[Mh].splice(r,1)}),this[xy]=this[Mh].some(r=>!r[xy]&&r.closed!==!0&&r.destroyed!==!0)}};Xgn.exports={PoolBase:$Qt,kClients:Mh,kNeedDrain:xy,kAddClient:Kgn,kRemoveClient:Jgn,kGetDispatcher:jQt}});var mW=T((x8u,rAn)=>{"use strict";f();var{PoolBase:y6o,kClients:bze,kNeedDrain:E6o,kAddClient:C6o,kGetDispatcher:_6o,kRemoveClient:v6o}=vze(),b6o=Y9(),{InvalidArgumentError:VQt}=Oi(),Zgn=eo(),{kUrl:eAn}=ac(),T6o=cW(),Tze=Symbol("options"),WQt=Symbol("connections"),tAn=Symbol("factory");function S6o(t,e){return new b6o(t,e)}a(S6o,"defaultFactory");var zQt=class extends y6o{static{a(this,"Pool")}constructor(e,{connections:r,factory:n=S6o,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,clientTtl:m,...g}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new VQt("invalid connections");if(typeof n!="function")throw new VQt("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new VQt("connect must be a function or an object");typeof o!="function"&&(o=T6o({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...typeof d=="boolean"?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),super(),this[WQt]=r||null,this[eAn]=Zgn.parseOrigin(e),this[Tze]={...Zgn.deepClone(g),connect:o,allowH2:h,clientTtl:m,socketPath:u},this[Tze].interceptors=g.interceptors?{...g.interceptors}:void 0,this[tAn]=n,this.on("connect",(A,y)=>{if(m!=null&&m>0)for(let E of y)Object.assign(E,{ttl:Date.now()})}),this.on("connectionError",(A,y,E)=>{for(let _ of y){let v=this[bze].indexOf(_);v!==-1&&this[bze].splice(v,1)}})}[_6o](){let e=this[Tze].clientTtl;for(let r of this[bze])if(e!=null&&e>0&&r.ttl&&Date.now()-r.ttl>e)this[v6o](r);else if(!r[E6o])return r;if(!this[WQt]||this[bze].length{"use strict";f();var{BalancedPoolMissingUpstreamError:I6o,InvalidArgumentError:x6o}=Oi(),{PoolBase:w6o,kClients:qm,kNeedDrain:dbe,kAddClient:R6o,kRemoveClient:P6o,kGetDispatcher:k6o}=vze(),N6o=mW(),{kUrl:Sze}=ac(),Ize=eo(),nAn=Symbol("factory"),fbe=Symbol("options"),iAn=Symbol("kGreatestCommonDivisor"),gW=Symbol("kCurrentWeight"),AW=Symbol("kIndex"),bS=Symbol("kWeight"),xze=Symbol("kMaxWeightPerServer"),wze=Symbol("kErrorPenalty");function D6o(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}a(D6o,"getGreatestCommonDivisor");function M6o(t,e){return new N6o(t,e)}a(M6o,"defaultFactory");var YQt=class extends w6o{static{a(this,"BalancedPool")}constructor(e=[],{factory:r=M6o,...n}={}){if(typeof r!="function")throw new x6o("factory must be a function.");super(),this[fbe]={...Ize.deepClone(n)},this[fbe].interceptors=n.interceptors?{...n.interceptors}:void 0,this[AW]=-1,this[gW]=0,this[xze]=this[fbe].maxWeightPerServer||100,this[wze]=this[fbe].errorPenalty||15,Array.isArray(e)||(e=[e]),this[nAn]=r;for(let o of e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let r=Ize.parseOrigin(e).origin;if(this[qm].find(o=>o[Sze].origin===r&&o.closed!==!0&&o.destroyed!==!0))return this;let n=this[nAn](r,this[fbe]);this[R6o](n),n.on("connect",()=>{n[bS]=Math.min(this[xze],n[bS]+this[wze])}),n.on("connectionError",()=>{n[bS]=Math.max(1,n[bS]-this[wze]),this._updateBalancedPoolStats()}),n.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(n[bS]=Math.max(1,n[bS]-this[wze]),this._updateBalancedPoolStats())});for(let o of this[qm])o[bS]=this[xze];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;ro[Sze].origin===r&&o.closed!==!0&&o.destroyed!==!0);return n&&this[P6o](n),this}getUpstream(e){let r=Ize.parseOrigin(e).origin;return this[qm].find(n=>n[Sze].origin===r&&n.closed!==!0&&n.destroyed!==!0)}get upstreams(){return this[qm].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[Sze].origin)}[k6o](){if(this[qm].length===0)throw new I6o;if(!this[qm].find(s=>!s[dbe]&&s.closed!==!0&&s.destroyed!==!0)||this[qm].map(s=>s[dbe]).reduce((s,c)=>s&&c,!0))return;let n=0,o=this[qm].findIndex(s=>!s[dbe]);for(;n++this[qm][o][bS]&&!s[dbe]&&(o=this[AW]),this[AW]===0&&(this[gW]=this[gW]-this[iAn],this[gW]<=0&&(this[gW]=this[xze])),s[bS]>=this[gW]&&!s[dbe])return s}return this[gW]=this[qm][o][bS],this[AW]=o,this[qm][o]}};oAn.exports=YQt});var uAn=T((D8u,lAn)=>{"use strict";f();var{PoolBase:O6o,kClients:Rze,kNeedDrain:B6o,kAddClient:aAn,kGetDispatcher:L6o,kRemoveClient:F6o}=vze(),U6o=Y9(),{InvalidArgumentError:KQt}=Oi(),cAn=eo(),{kUrl:JQt}=ac(),Q6o=cW(),pbe=Symbol("options"),XQt=Symbol("connections"),ZQt=Symbol("factory"),Pze=Symbol("index");function q6o(t,e){return new U6o(t,e)}a(q6o,"defaultFactory");var eqt=class extends O6o{static{a(this,"RoundRobinPool")}constructor(e,{connections:r,factory:n=q6o,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,clientTtl:m,...g}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new KQt("invalid connections");if(typeof n!="function")throw new KQt("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new KQt("connect must be a function or an object");typeof o!="function"&&(o=Q6o({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...typeof d=="boolean"?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),super(),this[XQt]=r||null,this[JQt]=cAn.parseOrigin(e),this[pbe]={...cAn.deepClone(g),connect:o,allowH2:h,clientTtl:m,socketPath:u},this[pbe].interceptors=g.interceptors?{...g.interceptors}:void 0,this[ZQt]=n,this[Pze]=-1,this.on("connect",(A,y)=>{if(m!=null&&m>0)for(let E of y)Object.assign(E,{ttl:Date.now()})}),this.on("connectionError",(A,y,E)=>{for(let _ of y){let v=this[Rze].indexOf(_);v!==-1&&this[Rze].splice(v,1)}})}[L6o](){let e=this[pbe].clientTtl,r=this[Rze].length;if(r===0){let o=this[ZQt](this[JQt],this[pbe]);return this[aAn](o),o}let n=0;for(;n0&&o.ttl&&Date.now()-o.ttl>e){this[F6o](o),n++;continue}if(!o[B6o])return o;n++}if(!this[XQt]||r{"use strict";f();var{InvalidArgumentError:kze,MaxOriginsReachedError:G6o}=Oi(),{kClients:TS,kRunning:dAn,kClose:H6o,kDestroy:j6o,kDispatch:$6o,kUrl:V6o}=ac(),W6o=aW(),z6o=mW(),Y6o=Y9(),K6o=eo(),fAn=Symbol("onConnect"),pAn=Symbol("onDisconnect"),hAn=Symbol("onConnectionError"),mAn=Symbol("onDrain"),gAn=Symbol("factory"),tqt=Symbol("options"),hbe=Symbol("origins");function J6o(t,e){return e&&e.connections===1?new Y6o(t,e):new z6o(t,e)}a(J6o,"defaultFactory");var rqt=class extends W6o{static{a(this,"Agent")}constructor({factory:e=J6o,maxOrigins:r=1/0,connect:n,...o}={}){if(typeof e!="function")throw new kze("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new kze("connect must be a function or an object");if(typeof r!="number"||Number.isNaN(r)||r<=0)throw new kze("maxOrigins must be a number greater than 0");super(),n&&typeof n!="function"&&(n={...n}),this[tqt]={...K6o.deepClone(o),maxOrigins:r,connect:n},this[gAn]=e,this[TS]=new Map,this[hbe]=new Set,this[mAn]=(s,c)=>{this.emit("drain",s,[this,...c])},this[fAn]=(s,c)=>{this.emit("connect",s,[this,...c])},this[pAn]=(s,c,l)=>{this.emit("disconnect",s,[this,...c],l)},this[hAn]=(s,c,l)=>{this.emit("connectionError",s,[this,...c],l)}}get[dAn](){let e=0;for(let{dispatcher:r}of this[TS].values())e+=r[dAn];return e}[$6o](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new kze("opts.origin must be a non-empty string or URL.");if(this[hbe].size>=this[tqt].maxOrigins&&!this[hbe].has(n))throw new G6o;let o=this[TS].get(n),s=o&&o.dispatcher;if(!s){let c=a(l=>{let u=this[TS].get(n);u&&(l&&(u.count-=1),u.count<=0&&(this[TS].delete(n),u.dispatcher.destroyed||u.dispatcher.close()),this[hbe].delete(n))},"closeClientIfUnused");s=this[gAn](e.origin,this[tqt]).on("drain",this[mAn]).on("connect",(l,u)=>{let d=this[TS].get(n);d&&(d.count+=1),this[fAn](l,u)}).on("disconnect",(l,u,d)=>{c(!0),this[pAn](l,u,d)}).on("connectionError",(l,u,d)=>{c(!1),this[hAn](l,u,d)}),this[TS].set(n,{count:0,dispatcher:s}),this[hbe].add(n)}return s.dispatch(e,r)}[H6o](){let e=[];for(let{dispatcher:r}of this[TS].values())e.push(r.close());return this[TS].clear(),Promise.all(e)}[j6o](e){let r=[];for(let{dispatcher:n}of this[TS].values())r.push(n.destroy(e));return this[TS].clear(),Promise.all(r)}get stats(){let e={};for(let{dispatcher:r}of this[TS].values())r.stats&&(e[r[V6o].origin]=r.stats);return e}};AAn.exports=rqt});var _An=T((U8u,CAn)=>{"use strict";f();var{Buffer:J9}=require("node:buffer"),yAn=require("node:net"),{InvalidArgumentError:K9}=Oi();function X6o(t){if(yAn.isIPv4(t)){let r=t.split(".").map(Number);return{type:1,buffer:J9.from(r)}}if(yAn.isIPv6(t))return{type:4,buffer:EAn(t)};let e=J9.from(t,"utf8");if(e.length>255)throw new K9("Domain name too long (max 255 bytes)");return{type:3,buffer:J9.concat([J9.from([e.length]),e])}}a(X6o,"parseAddress");function EAn(t){let e=J9.alloc(16),r=t.split(":"),n=0,o=0,s=t.indexOf("::");if(s!==-1){let l=8-r.filter(u=>u.length>0).length;for(let u=0;u{"use strict";f();var{EventEmitter:rFo}=require("node:events"),{Buffer:EW}=require("node:buffer"),{InvalidArgumentError:mbe,Socks5ProxyError:X9}=Oi(),{debuglog:nFo}=require("node:util"),{parseAddress:iFo}=_An(),x4=nFo("undici:socks5"),Nze=5,Yse={NO_AUTH:0,GSSAPI:1,USERNAME_PASSWORD:2,NO_ACCEPTABLE:255},vAn={CONNECT:1,BIND:2,UDP_ASSOCIATE:3},CW={IPV4:1,DOMAIN:3,IPV6:4},SN={SUCCEEDED:0,GENERAL_FAILURE:1,CONNECTION_NOT_ALLOWED:2,NETWORK_UNREACHABLE:3,HOST_UNREACHABLE:4,CONNECTION_REFUSED:5,TTL_EXPIRED:6,COMMAND_NOT_SUPPORTED:7,ADDRESS_TYPE_NOT_SUPPORTED:8},kv={INITIAL:"initial",HANDSHAKING:"handshaking",AUTHENTICATING:"authenticating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error",CLOSED:"closed"},nqt=class extends rFo{static{a(this,"Socks5Client")}constructor(e,r={}){if(super(),!e)throw new mbe("socket is required");this.socket=e,this.options=r,this.state=kv.INITIAL,this.buffer=EW.alloc(0),this.authMethods=[],r.username&&r.password&&this.authMethods.push(Yse.USERNAME_PASSWORD),this.authMethods.push(Yse.NO_AUTH),this.socket.on("data",this.onData.bind(this)),this.socket.on("error",this.onError.bind(this)),this.socket.on("close",this.onClose.bind(this))}onData(e){x4("received data",e.length,"bytes in state",this.state),this.buffer=EW.concat([this.buffer,e]);try{switch(this.state){case kv.HANDSHAKING:this.handleHandshakeResponse();break;case kv.AUTHENTICATING:this.handleAuthResponse();break;case kv.CONNECTING:this.handleConnectResponse();break}}catch(r){this.onError(r)}}onError(e){x4("socket error",e),this.state=kv.ERROR,this.emit("error",e),this.destroy()}onClose(){x4("socket closed"),this.state=kv.CLOSED,this.emit("close")}destroy(){this.socket&&!this.socket.destroyed&&this.socket.destroy()}handshake(){if(this.state!==kv.INITIAL)throw new mbe("Handshake already started");x4("starting handshake with",this.authMethods.length,"auth methods"),this.state=kv.HANDSHAKING;let e=EW.alloc(2+this.authMethods.length);e[0]=Nze,e[1]=this.authMethods.length,this.authMethods.forEach((r,n)=>{e[2+n]=r}),this.socket.write(e)}handleHandshakeResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==Nze)throw new X9(`Invalid SOCKS version: ${e}`,"UND_ERR_SOCKS5_VERSION");if(r===Yse.NO_ACCEPTABLE)throw new X9("No acceptable authentication method","UND_ERR_SOCKS5_AUTH_REJECTED");if(this.buffer=this.buffer.subarray(2),x4("server selected auth method",r),r===Yse.NO_AUTH)this.emit("authenticated");else if(r===Yse.USERNAME_PASSWORD)this.state=kv.AUTHENTICATING,this.sendAuthRequest();else throw new X9(`Unsupported authentication method: ${r}`,"UND_ERR_SOCKS5_AUTH_METHOD")}sendAuthRequest(){let{username:e,password:r}=this.options;if(!e||!r)throw new mbe("Username and password required for authentication");x4("sending username/password auth");let n=EW.from(e),o=EW.from(r);if(n.length>255||o.length>255)throw new mbe("Username or password too long");let s=EW.alloc(3+n.length+o.length);s[0]=1,s[1]=n.length,n.copy(s,2),s[2+n.length]=o.length,o.copy(s,3+n.length),this.socket.write(s)}handleAuthResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==1)throw new X9(`Invalid auth sub-negotiation version: ${e}`,"UND_ERR_SOCKS5_AUTH_VERSION");if(r!==0)throw new X9("Authentication failed","UND_ERR_SOCKS5_AUTH_FAILED");this.buffer=this.buffer.subarray(2),x4("authentication successful"),this.emit("authenticated")}connect(e,r){if(this.state===kv.CONNECTED)throw new mbe("Already connected");x4("connecting to",e,r),this.state=kv.CONNECTING;let n=this.buildConnectRequest(vAn.CONNECT,e,r);this.socket.write(n)}buildConnectRequest(e,r,n){let{type:o,buffer:s}=iFo(r),c=EW.alloc(4+s.length+2);return c[0]=Nze,c[1]=e,c[2]=0,c[3]=o,s.copy(c,4),c.writeUInt16BE(n,4+s.length),c}handleConnectResponse(){if(this.buffer.length<4)return;let e=this.buffer[0],r=this.buffer[1],n=this.buffer[3];if(e!==Nze)throw new X9(`Invalid SOCKS version in reply: ${e}`,"UND_ERR_SOCKS5_REPLY_VERSION");let o=4;if(n===CW.IPV4)o+=6;else if(n===CW.DOMAIN){if(this.buffer.length<5)return;o+=1+this.buffer[4]+2}else if(n===CW.IPV6)o+=18;else throw new X9(`Invalid address type in reply: ${n}`,"UND_ERR_SOCKS5_ADDR_TYPE");if(this.buffer.length{"use strict";f();var oFo=require("node:net"),{URL:SAn}=require("node:url"),iqt,sFo=aW(),{InvalidArgumentError:IAn}=Oi(),{Socks5Client:aFo}=TAn(),{kDispatch:xAn,kClose:cFo,kDestroy:lFo}=ac(),uFo=mW(),dFo=cW(),{debuglog:fFo}=require("node:util"),Z9=fFo("undici:socks5-proxy"),oqt=Symbol("proxy url"),pFo=Symbol("proxy headers"),wAn=Symbol("proxy auth"),IN=Symbol("pool"),hFo=Symbol("connector"),RAn=!1,sqt=class extends sFo{static{a(this,"Socks5ProxyAgent")}constructor(e,r={}){if(super(),RAn||(process.emitWarning("SOCKS5 proxy support is experimental and subject to change","ExperimentalWarning"),RAn=!0),!e)throw new IAn("Proxy URL is mandatory");let n=typeof e=="string"?new SAn(e):e;if(n.protocol!=="socks5:"&&n.protocol!=="socks:")throw new IAn("Proxy URL must use socks5:// or socks:// protocol");this[oqt]=n,this[pFo]=r.headers||{},this[wAn]={username:r.username||(n.username?decodeURIComponent(n.username):null),password:r.password||(n.password?decodeURIComponent(n.password):null)},this[hFo]=r.connect||dFo({...r.proxyTls,servername:r.proxyTls?.servername||n.hostname}),this[IN]=null}async createSocks5Connection(e,r){let n=this[oqt].hostname,o=parseInt(this[oqt].port)||1080;Z9("creating SOCKS5 connection to",n,o);let s=await new Promise((l,u)=>{let d=a(()=>{h.removeListener("error",p),l(h)},"onConnect"),p=a(m=>{h.removeListener("connect",d),u(m)},"onError"),h=oFo.connect({host:n,port:o});h.once("connect",d),h.once("error",p)}),c=new aFo(s,this[wAn]);return c.on("error",l=>{Z9("SOCKS5 error:",l),s.destroy()}),await c.handshake(),await new Promise((l,u)=>{let d=setTimeout(()=>{u(new Error("SOCKS5 authentication timeout"))},5e3),p=a(()=>{clearTimeout(d),c.removeListener("error",h),l()},"onAuthenticated"),h=a(m=>{clearTimeout(d),c.removeListener("authenticated",p),u(m)},"onError");c.state==="authenticated"?(clearTimeout(d),l()):(c.once("authenticated",p),c.once("error",h))}),await c.connect(e,r),await new Promise((l,u)=>{let d=setTimeout(()=>{u(new Error("SOCKS5 connection timeout"))},5e3),p=a(m=>{Z9("SOCKS5 tunnel established to",e,r,"via",m),clearTimeout(d),c.removeListener("error",h),l()},"onConnected"),h=a(m=>{clearTimeout(d),c.removeListener("connected",p),u(m)},"onError");c.once("connected",p),c.once("error",h)}),s}async[xAn](e,r){let{origin:n}=e;Z9("dispatching request to",n,"via SOCKS5");try{return(!this[IN]||this[IN].destroyed||this[IN].closed)&&(this[IN]=new uFo(n,{pipelining:e.pipelining,connections:e.connections,connect:a(async(o,s)=>{try{let c=new SAn(n),l=c.hostname,u=parseInt(c.port)||(c.protocol==="https:"?443:80);Z9("establishing SOCKS5 connection to",l,u);let d=await this.createSocks5Connection(l,u),p=d;c.protocol==="https:"&&(iqt||(iqt=require("node:tls")),Z9("upgrading to TLS"),p=iqt.connect({socket:d,servername:l,...o.tls||{}}),await new Promise((h,m)=>{p.once("secureConnect",h),p.once("error",m)})),s(null,p)}catch(c){Z9("SOCKS5 connection error:",c),s(c)}},"connect")})),this[IN][xAn](e,r)}catch(o){if(Z9("dispatch error:",o),typeof r.onError=="function")r.onError(o);else throw o}}async[cFo](){this[IN]&&await this[IN].close()}async[lFo](e){this[IN]&&await this[IN].destroy(e)}};PAn.exports=sqt});var dqt=T((z8u,GAn)=>{"use strict";f();var{kProxy:Kse,kClose:LAn,kDestroy:FAn,kDispatch:kAn}=ac(),mFo=yW(),UAn=mW(),QAn=aW(),{InvalidArgumentError:_W,RequestAbortedError:gFo,SecureProxyConnectionError:AFo}=Oi(),NAn=cW(),qAn=Y9(),{channels:DAn}=U9(),yFo=aqt(),Dze=Symbol("proxy agent"),e7=Symbol("proxy client"),w4=Symbol("proxy headers"),cqt=Symbol("request tls settings"),MAn=Symbol("proxy tls settings"),OAn=Symbol("connect endpoint function"),BAn=Symbol("tunnel proxy");function EFo(t){return t==="https:"?443:80}a(EFo,"defaultProtocolPort");function CFo(t,e){return new UAn(t,e)}a(CFo,"defaultFactory");var _Fo=a(()=>{},"noop");function vFo(t,e){return e.connections===1?new qAn(t,e):new UAn(t,e)}a(vFo,"defaultAgentFactory");var lqt=class extends QAn{static{a(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:o}){if(!e)throw new _W("Proxy URL is mandatory");super(),this[w4]=r,o?this.#e=o(e,{connect:n}):this.#e=new qAn(e,{connect:n})}[kAn](e,r){let n=r.onHeaders;r.onHeaders=function(l,u,d){if(l===407){typeof r.onError=="function"&&r.onError(new _W("Proxy Authentication Required (407)"));return}n&&n.call(this,l,u,d)};let{origin:o,path:s="/",headers:c={}}=e;if(e.path=o+s,!("host"in c)&&!("Host"in c)){let{host:l}=new URL(o);c.host=l}return e.headers={...this[w4],...c},this.#e[kAn](e,r)}[LAn](){return this.#e.close()}[FAn](e){return this.#e.destroy(e)}},uqt=class extends QAn{static{a(this,"ProxyAgent")}constructor(e){if(!e||typeof e=="object"&&!(e instanceof URL)&&!e.uri)throw new _W("Proxy uri is mandatory");let{clientFactory:r=CFo}=e;if(typeof r!="function")throw new _W("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e;super();let o=this.#e(e),{href:s,origin:c,port:l,protocol:u,username:d,password:p,hostname:h}=o;if(this[Kse]={uri:s,protocol:u},this[cqt]=e.requestTls,this[MAn]=e.proxyTls,this[w4]=e.headers||{},this[BAn]=n,e.auth&&e.token)throw new _W("opts.auth cannot be used in combination with opts.token");e.auth?this[w4]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[w4]["proxy-authorization"]=e.token:d&&p&&(this[w4]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(d)}:${decodeURIComponent(p)}`).toString("base64")}`);let m=NAn({...e.proxyTls});this[OAn]=NAn({...e.requestTls});let g=e.factory||vFo,A=a((y,E)=>{let{protocol:_}=new URL(y);return this[Kse].protocol==="socks5:"||this[Kse].protocol==="socks:"?new yFo(this[Kse].uri,{headers:this[w4],connect:m,factory:g,username:e.username||d,password:e.password||p,proxyTls:e.proxyTls}):!this[BAn]&&_==="http:"&&this[Kse].protocol==="http:"?new lqt(this[Kse].uri,{headers:this[w4],connect:m,factory:g}):g(y,E)},"factory");u==="socks5:"||u==="socks:"?this[e7]=null:this[e7]=r(o,{connect:m}),this[Dze]=new mFo({...e,factory:A,connect:a(async(y,E)=>{if(!this[e7]){E(new _W("Cannot establish tunnel connection without a proxy client"));return}let _=y.host;y.port||(_+=`:${EFo(y.protocol)}`);try{let v={origin:c,port:l,path:_,signal:y.signal,headers:{...this[w4],host:y.host,...y.connections==null||y.connections>0?{"proxy-connection":"keep-alive"}:{}},servername:this[MAn]?.servername||h},{socket:b,statusCode:I}=await this[e7].connect(v);if(I!==200){b.on("error",_Fo).destroy(),E(new gFo(`Proxy response (${I}) !== 200 when HTTP Tunneling`));return}if(DAn.proxyConnected.hasSubscribers&&DAn.proxyConnected.publish({socket:b,connectParams:v}),y.protocol!=="https:"){E(null,b);return}let x;this[cqt]?x=this[cqt].servername:x=y.servername,this[OAn]({...y,servername:x,httpSocket:b},E)}catch(v){v.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new AFo(v)):E(v)}},"connect")})}dispatch(e,r){let n=bFo(e.headers);if(TFo(n),n&&!("host"in n)&&!("Host"in n)){let{host:o}=new URL(e.origin);n.host=o}return this[Dze].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new URL(e):e instanceof URL?e:new URL(e.uri)}[LAn](){let e=[this[Dze].close()];return this[e7]&&e.push(this[e7].close()),Promise.all(e)}[FAn](){let e=[this[Dze].destroy()];return this[e7]&&e.push(this[e7].destroy()),Promise.all(e)}};function bFo(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new _W("Proxy-Authorization should be sent in ProxyAgent constructor")}a(TFo,"throwIfProxyAuthIsSent");GAn.exports=uqt});var WAn=T((J8u,VAn)=>{"use strict";f();var SFo=aW(),{kClose:IFo,kDestroy:xFo,kClosed:HAn,kDestroyed:jAn,kDispatch:wFo,kNoProxyAgent:gbe,kHttpProxyAgent:t7,kHttpsProxyAgent:vW}=ac(),$An=dqt(),RFo=yW(),PFo={"http:":80,"https:":443},fqt=class extends SFo{static{a(this,"EnvHttpProxyAgent")}#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e;let{httpProxy:r,httpsProxy:n,noProxy:o,...s}=e;this[gbe]=new RFo(s);let c=r??process.env.http_proxy??process.env.HTTP_PROXY;c?this[t7]=new $An({...s,uri:c}):this[t7]=this[gbe];let l=n??process.env.https_proxy??process.env.HTTPS_PROXY;l?this[vW]=new $An({...s,uri:l}):this[vW]=this[t7],this.#o()}[wFo](e,r){let n=new URL(e.origin);return this.#r(n).dispatch(e,r)}[IFo](){return Promise.all([this[gbe].close(),!this[t7][HAn]&&this[t7].close(),!this[vW][HAn]&&this[vW].close()])}[xFo](e){return Promise.all([this[gbe].destroy(e),!this[t7][jAn]&&this[t7].destroy(e),!this[vW][jAn]&&this[vW].destroy(e)])}#r(e){let{protocol:r,host:n,port:o}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),o=Number.parseInt(o,10)||PFo[r]||0,this.#i(n,o)?r==="https:"?this[vW]:this[t7]:this[gbe]}#i(e,r){if(this.#a&&this.#o(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";f();var Jse=require("node:assert"),{kRetryHandlerDefaultRetry:zAn}=ac(),{RequestRetryError:Abe}=Oi(),kFo=Uve(),{isDisturbed:YAn,parseRangeHeader:KAn,wrapRequestBody:NFo}=eo();function DFo(t){let e=new Date(t).getTime();return isNaN(e)?0:e-Date.now()}a(DFo,"calculateRetryAfterHeader");var pqt=class t{static{a(this,"RetryHandler")}constructor(e,{dispatch:r,handler:n}){let{retryOptions:o,...s}=e,{retry:c,maxRetries:l,maxTimeout:u,minTimeout:d,timeoutFactor:p,methods:h,errorCodes:m,retryAfter:g,statusCodes:A,throwOnError:y}=o??{};this.error=null,this.dispatch=r,this.handler=kFo.wrap(n),this.opts={...s,body:NFo(e.body)},this.retryOpts={throwOnError:y??!0,retry:c??t[zAn],retryAfter:g??!0,maxTimeout:u??30*1e3,minTimeout:d??500,timeoutFactor:p??2,maxRetries:l??5,methods:h??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:A??[500,502,503,504,429],errorCodes:m??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.headersSent=!1,this.start=0,this.end=null,this.etag=null}onResponseStartWithRetry(e,r,n,o,s){if(this.retryOpts.throwOnError){this.retryOpts.statusCodes.includes(r)===!1?(this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o)):this.error=s;return}if(YAn(this.opts.body)){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o);return}function c(l){if(l){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o),e.resume();return}this.error=s,e.resume()}a(c,"shouldRetry"),e.pause(),this.retryOpts.retry(s,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},c.bind(this))}onRequestStart(e,r){this.headersSent||this.handler.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.handler.onRequestUpgrade?.(e,r,n,o)}static[zAn](e,{state:r,opts:n},o){let{statusCode:s,code:c,headers:l}=e,{method:u,retryOptions:d}=n,{maxRetries:p,minTimeout:h,maxTimeout:m,timeoutFactor:g,statusCodes:A,errorCodes:y,methods:E}=d,{counter:_}=r;if(c&&c!=="UND_ERR_REQ_RETRY"&&!y.includes(c)){o(e);return}if(Array.isArray(E)&&!E.includes(u)){o(e);return}if(s!=null&&Array.isArray(A)&&!A.includes(s)){o(e);return}if(_>p){o(e);return}let v=l?.["retry-after"];v&&(v=Number(v),v=Number.isNaN(v)?DFo(l["retry-after"]):v*1e3);let b=v>0?Math.min(v,m):Math.min(h*g**(_-1),m);setTimeout(()=>o(null),b)}onResponseStart(e,r,n,o){if(this.error=null,this.retryCount+=1,r>=300){let s=new Abe("Request failed",r,{headers:n,data:{count:this.retryCount}});this.onResponseStartWithRetry(e,r,n,o,s);return}if(this.headersSent){if(r!==206&&(this.start>0||r!==200))throw new Abe("server does not support the range header and the payload was partially consumed",r,{headers:n,data:{count:this.retryCount}});let s=KAn(n["content-range"]);if(!s)throw new Abe("Content-Range mismatch",r,{headers:n,data:{count:this.retryCount}});if(this.etag!=null&&this.etag!==n.etag)throw new Abe("ETag mismatch",r,{headers:n,data:{count:this.retryCount}});let{start:c,size:l,end:u=l?l-1:null}=s;Jse(this.start===c,"content-range mismatch"),Jse(this.end==null||this.end===u,"content-range mismatch");return}if(this.end==null){if(r===206){let s=KAn(n["content-range"]);if(s==null){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o);return}let{start:c,size:l,end:u=l?l-1:null}=s;Jse(c!=null&&Number.isFinite(c),"content-range mismatch"),Jse(u!=null&&Number.isFinite(u),"invalid content-length"),this.start=c,this.end=u}if(this.end==null){let s=n["content-length"];this.end=s!=null?Number(s)-1:null}Jse(Number.isFinite(this.start)),Jse(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=!0,this.etag=n.etag!=null?n.etag:null,this.etag!=null&&this.etag[0]==="W"&&this.etag[1]==="/"&&(this.etag=null),this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o)}else throw new Abe("Request failed",r,{headers:n,data:{count:this.retryCount}})}onResponseData(e,r){this.error||(this.start+=r.length,this.handler.onResponseData?.(e,r))}onResponseEnd(e,r){if(this.error&&this.retryOpts.throwOnError)throw this.error;if(!this.error)return this.retryCount=0,this.handler.onResponseEnd?.(e,r);this.retry(e)}retry(e){if(this.start!==0){let r={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(r["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...r}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(r){this.handler.onResponseError?.(e,r)}}onResponseError(e,r){if(e?.aborted||YAn(this.opts.body)){this.handler.onResponseError?.(e,r);return}function n(o){if(!o){this.retry(e);return}this.handler?.onResponseError?.(e,o)}a(n,"shouldRetry"),this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(r,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},n.bind(this))}};JAn.exports=pqt});var ZAn=T((n6u,XAn)=>{"use strict";f();var MFo=Qve(),OFo=Mze(),hqt=class extends MFo{static{a(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new OFo({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};XAn.exports=hqt});var ryn=T((s6u,tyn)=>{"use strict";f();var{InvalidArgumentError:eyn}=Oi(),BFo=Y9(),mqt=class extends BFo{static{a(this,"H2CClient")}constructor(e,r){if(typeof e=="string"&&(e=new URL(e)),e.protocol!=="http:")throw new eyn("h2c-client: Only h2c protocol is supported");let{connect:n,maxConcurrentStreams:o,pipelining:s,...c}=r??{},l=100,u=100;if(o!=null&&Number.isInteger(o)&&o>0&&(l=o),s!=null&&Number.isInteger(s)&&s>0&&(u=s),u>l)throw new eyn("h2c-client: pipelining cannot be greater than maxConcurrentStreams");super(e,{...c,maxConcurrentStreams:l,pipelining:u,allowH2:!0,useH2c:!0})}};tyn.exports=mqt});var dyn=T((l6u,uyn)=>{"use strict";f();var syn=require("node:assert"),{Readable:LFo}=require("node:stream"),{RequestAbortedError:ayn,NotSupportedError:FFo,InvalidArgumentError:UFo,AbortError:Oze}=Oi(),cyn=eo(),{ReadableStreamFrom:QFo}=eo(),Nv=Symbol("kConsume"),Bze=Symbol("kReading"),bW=Symbol("kBody"),nyn=Symbol("kAbort"),lyn=Symbol("kContentType"),gqt=Symbol("kContentLength"),Aqt=Symbol("kUsed"),Lze=Symbol("kBytesRead"),qFo=a(()=>{},"noop"),yqt=class extends LFo{static{a(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:o,highWaterMark:s=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:s}),this._readableState.dataEmitted=!1,this[nyn]=r,this[Nv]=null,this[Lze]=0,this[bW]=null,this[Aqt]=!1,this[lyn]=n,this[gqt]=Number.isFinite(o)?o:null,this[Bze]=!1}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new ayn),e&&this[nyn](),this[Aqt]?r(e):setImmediate(r,e)}on(e,r){return(e==="data"||e==="readable")&&(this[Bze]=!0,this[Aqt]=!0),super.on(e,r)}addListener(e,r){return this.on(e,r)}off(e,r){let n=super.off(e,r);return(e==="data"||e==="readable")&&(this[Bze]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,r){return this.off(e,r)}push(e){return e&&(this[Lze]+=e.length,this[Nv])?(Cqt(this[Nv],e),this[Bze]?super.push(e):!0):super.push(e)}text(){return ybe(this,"text")}json(){return ybe(this,"json")}blob(){return ybe(this,"blob")}bytes(){return ybe(this,"bytes")}arrayBuffer(){return ybe(this,"arrayBuffer")}async formData(){throw new FFo}get bodyUsed(){return cyn.isDisturbed(this)}get body(){return this[bW]||(this[bW]=QFo(this),this[Nv]&&(this[bW].getReader(),syn(this[bW].locked))),this[bW]}dump(e){let r=e?.signal;if(r!=null&&(typeof r!="object"||!("aborted"in r)))return Promise.reject(new UFo("signal must be an AbortSignal"));let n=e?.limit&&Number.isFinite(e.limit)?e.limit:128*1024;return r?.aborted?Promise.reject(r.reason??new Oze):this._readableState.closeEmitted?Promise.resolve(null):new Promise((o,s)=>{if((this[gqt]&&this[gqt]>n||this[Lze]>n)&&this.destroy(new Oze),r){let c=a(()=>{this.destroy(r.reason??new Oze)},"onAbort");r.addEventListener("abort",c),this.on("close",function(){r.removeEventListener("abort",c),r.aborted?s(r.reason??new Oze):o(null)})}else this.on("close",o);this.on("error",qFo).on("data",()=>{this[Lze]>n&&this.destroy()}).resume()})}setEncoding(e){return Buffer.isEncoding(e)&&(this._readableState.encoding=e),this}};function GFo(t){return t[bW]?.locked===!0||t[Nv]!==null}a(GFo,"isLocked");function HFo(t){return cyn.isDisturbed(t)||GFo(t)}a(HFo,"isUnusable");function ybe(t,e){return syn(!t[Nv]),new Promise((r,n)=>{if(HFo(t)){let o=t._readableState;o.destroyed&&o.closeEmitted===!1?t.on("error",n).on("close",()=>{n(new TypeError("unusable"))}):n(o.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[Nv]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(o){_qt(this[Nv],o)}).on("close",function(){this[Nv].body!==null&&_qt(this[Nv],new ayn)}),jFo(t[Nv])})})}a(ybe,"consume");function jFo(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let o=r;o2&&n[0]===239&&n[1]===187&&n[2]===191?3:0;return!r||r==="utf8"||r==="utf-8"?n.utf8Slice(s,o):n.subarray(s,o).toString(r)}a(Eqt,"chunksDecode");function iyn(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let o=0;o{"use strict";f();var $Fo=require("node:assert"),{AsyncResource:VFo}=require("node:async_hooks"),{Readable:WFo}=dyn(),{InvalidArgumentError:Xse,RequestAbortedError:fyn}=Oi(),SS=eo();function Ebe(){}a(Ebe,"noop");var Fze=class extends VFo{static{a(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new Xse("invalid opts");let{signal:n,method:o,opaque:s,body:c,onInfo:l,responseHeaders:u,highWaterMark:d}=e;try{if(typeof r!="function")throw new Xse("invalid callback");if(d&&(typeof d!="number"||d<0))throw new Xse("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Xse("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new Xse("invalid method");if(l&&typeof l!="function")throw new Xse("invalid onInfo callback");super("UNDICI_REQUEST")}catch(p){throw SS.isStream(c)&&SS.destroy(c.on("error",Ebe),p),p}this.method=o,this.responseHeaders=u||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.highWaterMark=d,this.reason=null,this.removeAbortListener=null,n?.aborted?this.reason=n.reason??new fyn:n&&(this.removeAbortListener=SS.addAbortListener(n,()=>{this.reason=n.reason??new fyn,this.res?SS.destroy(this.res.on("error",Ebe),this.reason):this.abort&&this.abort(this.reason)}))}onConnect(e,r){if(this.reason){e(this.reason);return}$Fo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{callback:s,opaque:c,abort:l,context:u,responseHeaders:d,highWaterMark:p}=this,h=d==="raw"?SS.parseRawHeaders(r):SS.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:h});return}let m=d==="raw"?SS.parseHeaders(r):h,g=m["content-type"],A=m["content-length"],y=new WFo({resume:n,abort:l,contentType:g,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:p});if(this.removeAbortListener&&(y.on("close",this.removeAbortListener),this.removeAbortListener=null),this.callback=null,this.res=y,s!==null)try{this.runInAsyncScope(s,null,null,{statusCode:e,statusText:o,headers:h,trailers:this.trailers,opaque:c,body:y,context:u})}catch(E){this.res=null,SS.destroy(y.on("error",Ebe),E),queueMicrotask(()=>{throw E})}}onData(e){return this.res.push(e)}onComplete(e){SS.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:o,opaque:s}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{SS.destroy(r.on("error",Ebe),e)})),o&&(this.body=null,SS.isStream(o)&&(o.on("error",Ebe),SS.destroy(o,e))),this.removeAbortListener&&(this.removeAbortListener(),this.removeAbortListener=null)}};function pyn(t,e){if(e===void 0)return new Promise((r,n)=>{pyn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new Fze(t,e);this.dispatch(t,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(pyn,"request");vqt.exports=pyn;vqt.exports.RequestHandler=Fze});var Cbe=T((m6u,Ayn)=>{"use strict";f();var{addAbortListener:zFo}=eo(),{RequestAbortedError:YFo}=Oi(),Zse=Symbol("kListener"),xN=Symbol("kSignal");function myn(t){t.abort?t.abort(t[xN]?.reason):t.reason=t[xN]?.reason??new YFo,gyn(t)}a(myn,"abort");function KFo(t,e){if(t.reason=null,t[xN]=null,t[Zse]=null,!!e){if(e.aborted){myn(t);return}t[xN]=e,t[Zse]=()=>{myn(t)},zFo(t[xN],t[Zse])}}a(KFo,"addSignal");function gyn(t){t[xN]&&("removeEventListener"in t[xN]?t[xN].removeEventListener("abort",t[Zse]):t[xN].removeListener("abort",t[Zse]),t[xN]=null,t[Zse]=null)}a(gyn,"removeSignal");Ayn.exports={addSignal:KFo,removeSignal:gyn}});var _yn=T((y6u,Cyn)=>{"use strict";f();var JFo=require("node:assert"),{finished:XFo}=require("node:stream"),{AsyncResource:ZFo}=require("node:async_hooks"),{InvalidArgumentError:eae,InvalidReturnValueError:e9o}=Oi(),R4=eo(),{addSignal:t9o,removeSignal:yyn}=Cbe();function r9o(){}a(r9o,"noop");var bqt=class extends ZFo{static{a(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new eae("invalid opts");let{signal:o,method:s,opaque:c,body:l,onInfo:u,responseHeaders:d}=e;try{if(typeof n!="function")throw new eae("invalid callback");if(typeof r!="function")throw new eae("invalid factory");if(o&&typeof o.on!="function"&&typeof o.addEventListener!="function")throw new eae("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new eae("invalid method");if(u&&typeof u!="function")throw new eae("invalid onInfo callback");super("UNDICI_STREAM")}catch(p){throw R4.isStream(l)&&R4.destroy(l.on("error",r9o),p),p}this.responseHeaders=d||null,this.opaque=c||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=l,this.onInfo=u||null,R4.isStream(l)&&l.on("error",p=>{this.onError(p)}),t9o(this,o)}onConnect(e,r){if(this.reason){e(this.reason);return}JFo(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{factory:s,opaque:c,context:l,responseHeaders:u}=this,d=u==="raw"?R4.parseRawHeaders(r):R4.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:d});return}if(this.factory=null,s===null)return;let p=this.runInAsyncScope(s,null,{statusCode:e,headers:d,opaque:c,context:l});if(!p||typeof p.write!="function"||typeof p.end!="function"||typeof p.on!="function")throw new e9o("expected Writable");return XFo(p,{readable:!1},m=>{let{callback:g,res:A,opaque:y,trailers:E,abort:_}=this;this.res=null,(m||!A?.readable)&&R4.destroy(A,m),this.callback=null,this.runInAsyncScope(g,null,m||null,{opaque:y,trailers:E}),m&&_()}),p.on("drain",n),this.res=p,(p.writableNeedDrain!==void 0?p.writableNeedDrain:p._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;yyn(this),r&&(this.trailers=R4.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:o,body:s}=this;yyn(this),this.factory=null,r?(this.res=null,R4.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),s&&(this.body=null,R4.destroy(s,e))}};function Eyn(t,e,r){if(r===void 0)return new Promise((n,o)=>{Eyn.call(this,t,e,(s,c)=>s?o(s):n(c))});try{let n=new bqt(t,e,r);this.dispatch(t,n)}catch(n){if(typeof r!="function")throw n;let o=t?.opaque;queueMicrotask(()=>r(n,{opaque:o}))}}a(Eyn,"stream");Cyn.exports=Eyn});var Syn=T((_6u,Tyn)=>{"use strict";f();var{Readable:byn,Duplex:n9o,PassThrough:i9o}=require("node:stream"),o9o=require("node:assert"),{AsyncResource:s9o}=require("node:async_hooks"),{InvalidArgumentError:_be,InvalidReturnValueError:a9o,RequestAbortedError:Tqt}=Oi(),wN=eo(),{addSignal:c9o,removeSignal:l9o}=Cbe();function vyn(){}a(vyn,"noop");var tae=Symbol("resume"),Sqt=class extends byn{static{a(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[tae]=null}_read(){let{[tae]:e}=this;e&&(this[tae]=null,e())}_destroy(e,r){this._read(),r(e)}},Iqt=class extends byn{static{a(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[tae]=e}_read(){this[tae]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new Tqt),r(e)}},xqt=class extends s9o{static{a(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new _be("invalid opts");if(typeof r!="function")throw new _be("invalid handler");let{signal:n,method:o,opaque:s,onInfo:c,responseHeaders:l}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new _be("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new _be("invalid method");if(c&&typeof c!="function")throw new _be("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=l||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=c||null,this.req=new Sqt().on("error",vyn),this.ret=new n9o({readableObjectMode:e.objectMode,autoDestroy:!0,read:a(()=>{let{body:u}=this;u?.resume&&u.resume()},"read"),write:a((u,d,p)=>{let{req:h}=this;h.push(u,d)||h._readableState.destroyed?p():h[tae]=p},"write"),destroy:a((u,d)=>{let{body:p,req:h,res:m,ret:g,abort:A}=this;!u&&!g._readableState.endEmitted&&(u=new Tqt),A&&u&&A(),wN.destroy(p,u),wN.destroy(h,u),wN.destroy(m,u),l9o(this),d(u)},"destroy")}).on("prefinish",()=>{let{req:u}=this;u.push(null)}),this.res=null,c9o(this,n)}onConnect(e,r){let{res:n}=this;if(this.reason){e(this.reason);return}o9o(!n,"pipeline cannot be retried"),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:o,handler:s,context:c}=this;if(e<200){if(this.onInfo){let u=this.responseHeaders==="raw"?wN.parseRawHeaders(r):wN.parseHeaders(r);this.onInfo({statusCode:e,headers:u})}return}this.res=new Iqt(n);let l;try{this.handler=null;let u=this.responseHeaders==="raw"?wN.parseRawHeaders(r):wN.parseHeaders(r);l=this.runInAsyncScope(s,null,{statusCode:e,headers:u,opaque:o,body:this.res,context:c})}catch(u){throw this.res.on("error",vyn),u}if(!l||typeof l.on!="function")throw new a9o("expected Readable");l.on("data",u=>{let{ret:d,body:p}=this;!d.push(u)&&p.pause&&p.pause()}).on("error",u=>{let{ret:d}=this;wN.destroy(d,u)}).on("end",()=>{let{ret:u}=this;u.push(null)}).on("close",()=>{let{ret:u}=this;u._readableState.ended||wN.destroy(u,new Tqt)}),this.body=l}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,wN.destroy(r,e)}};function u9o(t,e){try{let r=new xqt(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new i9o().destroy(r)}}a(u9o,"pipeline");Tyn.exports=u9o});var kyn=T((T6u,Pyn)=>{"use strict";f();var{InvalidArgumentError:wqt,SocketError:d9o}=Oi(),{AsyncResource:f9o}=require("node:async_hooks"),Iyn=require("node:assert"),xyn=eo(),{kHTTP2Stream:p9o}=ac(),{addSignal:h9o,removeSignal:wyn}=Cbe(),Rqt=class extends f9o{static{a(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new wqt("invalid opts");if(typeof r!="function")throw new wqt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new wqt("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=o||null,this.callback=r,this.abort=null,this.context=null,h9o(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}Iyn(this.callback),this.abort=e,this.context=null}onHeaders(){throw new d9o("bad upgrade",null)}onUpgrade(e,r,n){Iyn(n[p9o]===!0?e===200:e===101);let{callback:o,opaque:s,context:c}=this;wyn(this),this.callback=null;let l=this.responseHeaders==="raw"?xyn.parseRawHeaders(r):xyn.parseHeaders(r);this.runInAsyncScope(o,null,null,{headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;wyn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function Ryn(t,e){if(e===void 0)return new Promise((r,n)=>{Ryn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new Rqt(t,e),n={...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(Ryn,"upgrade");Pyn.exports=Ryn});var Byn=T((x6u,Oyn)=>{"use strict";f();var m9o=require("node:assert"),{AsyncResource:g9o}=require("node:async_hooks"),{InvalidArgumentError:Pqt,SocketError:A9o}=Oi(),Nyn=eo(),{addSignal:y9o,removeSignal:Dyn}=Cbe(),kqt=class extends g9o{static{a(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new Pqt("invalid opts");if(typeof r!="function")throw new Pqt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Pqt("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=o||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,y9o(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}m9o(this.callback),this.abort=e,this.context=r}onHeaders(){throw new A9o("bad connect",null)}onUpgrade(e,r,n){let{callback:o,opaque:s,context:c}=this;Dyn(this),this.callback=null;let l=r;l!=null&&(l=this.responseHeaders==="raw"?Nyn.parseRawHeaders(r):Nyn.parseHeaders(r)),this.runInAsyncScope(o,null,null,{statusCode:e,headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;Dyn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function Myn(t,e){if(e===void 0)return new Promise((r,n)=>{Myn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new kqt(t,e),n={...t,method:"CONNECT"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(Myn,"connect");Oyn.exports=Myn});var Lyn=T((P6u,rae)=>{"use strict";f();rae.exports.request=hyn();rae.exports.stream=_yn();rae.exports.pipeline=Syn();rae.exports.upgrade=kyn();rae.exports.connect=Byn()});var Dqt=T((N6u,Uyn)=>{"use strict";f();var{UndiciError:E9o}=Oi(),Fyn=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),Nqt=class extends E9o{static{a(this,"MockNotMatchedError")}constructor(e){super(e),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[Fyn]===!0}get[Fyn](){return!0}};Uyn.exports={MockNotMatchedError:Nqt}});var TW=T((O6u,Qyn)=>{"use strict";f();Qyn.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOriginalDispatch:Symbol("original dispatch"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected"),kIgnoreTrailingSlash:Symbol("ignore trailing slash"),kMockAgentMockCallHistoryInstance:Symbol("mock agent mock call history name"),kMockAgentRegisterCallHistory:Symbol("mock agent register mock call history"),kMockAgentAddCallHistoryLog:Symbol("mock agent add call history log"),kMockAgentIsCallHistoryEnabled:Symbol("mock agent is call history enabled"),kMockAgentAcceptsNonStandardSearchParameters:Symbol("mock agent accepts non standard search parameters"),kMockCallHistoryAddLog:Symbol("mock call history add log"),kTotalDispatchCount:Symbol("total dispatch count")}});var vbe=T((L6u,Jyn)=>{"use strict";f();var{MockNotMatchedError:nae}=Dqt(),{kDispatches:SW,kMockAgent:C9o,kOriginalDispatch:_9o,kOrigin:v9o,kGetNetConnect:b9o,kTotalDispatchCount:Bqt}=TW(),{serializePathWithQuery:T9o}=eo(),{STATUS_CODES:S9o}=require("node:http"),{types:{isPromise:I9o}}=require("node:util"),{InvalidArgumentError:Mqt}=Oi();function RN(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}a(RN,"matchValue");function Gyn(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}a(Gyn,"lowerCaseEntries");function Hyn(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let o=Hyn(e,r);if(!RN(n,o))return!1}return!0}a(jyn,"matchHeaders");function x9o(t){if(typeof t!="string")return t;let e=new URLSearchParams(t),r=new URLSearchParams;for(let[n,o]of e.entries()){if(n=n.replace("[]",""),/^(['"]).*\1$/.test(o)){r.append(n,o);continue}if(o.includes(",")){let c=o.split(",");for(let l of c)r.append(n,l);continue}r.append(n,o)}return r}a(x9o,"normalizeSearchParams");function Oqt(t){if(typeof t!="string")return t;let e=t.split("?",3);if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}a(Oqt,"safeUrl");function w9o(t,{path:e,method:r,body:n,headers:o}){let s=RN(t.path,e),c=RN(t.method,r),l=typeof t.body<"u"?RN(t.body,n):!0,u=jyn(t,o);return s&&c&&l&&u}a(w9o,"matchKey");function $yn(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t?t.toString():""}a($yn,"getResponseData");function Vyn(t,e){let r=e.query?T9o(e.path,e.query):e.path,n=typeof r=="string"?Oqt(r):r,o=qyn(n),s=t.filter(({consumed:c})=>!c).filter(({path:c,ignoreTrailingSlash:l})=>l?RN(qyn(Oqt(c)),o):RN(Oqt(c),n));if(s.length===0)throw new nae(`Mock dispatch not matched for path '${n}'`);if(s=s.filter(({method:c})=>RN(c,e.method)),s.length===0)throw new nae(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(s=s.filter(({body:c})=>typeof c<"u"?RN(c,e.body):!0),s.length===0)throw new nae(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(s=s.filter(c=>jyn(c,e.headers)),s.length===0){let c=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new nae(`Mock dispatch not matched for headers '${c}' on path '${n}'`)}return s[0]}a(Vyn,"getMockDispatch");function R9o(t,e,r,n){let o={timesInvoked:0,times:1,persist:!1,consumed:!1,...n},s=typeof r=="function"?{callback:r}:{...r},c={...o,...e,pending:!0,data:{error:null,...s}};return t.push(c),t[Bqt]=(t[Bqt]||0)+1,c}a(R9o,"addMockDispatch");function Lqt(t,e){let r=t.findIndex(n=>n.consumed?w9o(n,e):!1);r!==-1&&t.splice(r,1)}a(Lqt,"deleteMockDispatch");function qyn(t){for(;t.endsWith("/");)t=t.slice(0,-1);return t.length===0&&(t="/"),t}a(qyn,"removeTrailingSlash");function Wyn(t){let{path:e,method:r,body:n,headers:o,query:s}=t;return{path:e,method:r,body:n,headers:o,query:s}}a(Wyn,"buildKey");function Fqt(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=h0?A=setTimeout(()=>{A=null,E(this[SW])},d):E(this[SW]);function E(v,b=s){if(g)return;let I=Array.isArray(t.headers)?Uqt(t.headers):t.headers,x=typeof b=="function"?b({...t,headers:I}):b;if(I9o(x))return x.then(k=>E(v,k));if(g)return;let R=$yn(x),w=Fqt(c),P=Fqt(l);e.onHeaders?.(o,w,_,zyn(o)),e.onData?.(Buffer.from(R)),e.onComplete?.(P),Lqt(v,r)}a(E,"handleReply");function _(){}return a(_,"resume"),!0}a(Yyn,"mockDispatch");function k9o(){let t=this[C9o],e=this[v9o],r=this[_9o];return a(function(o,s){if(t.isMockActive)try{Yyn.call(this,o,s)}catch(c){if(c.code==="UND_MOCK_ERR_MOCK_NOT_MATCHED"){let l=t[b9o](),u=this[SW][Bqt]||this[SW].length,p=`, ${this[SW].filter(({consumed:h})=>!h).length} interceptor(s) remaining out of ${u} defined`;if(l===!1)throw new nae(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)${p}`);if(Kyn(l,e))r.call(this,o,s);else throw new nae(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)${p}`)}else throw c}else r.call(this,o,s)},"dispatch")}a(k9o,"buildMockDispatch");function Kyn(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>RN(n,r.host)))}a(Kyn,"checkNetConnect");function N9o(t){return typeof t!="string"&&!(t instanceof URL)?t:t instanceof URL?t.origin:t.toLowerCase()}a(N9o,"normalizeOrigin");function D9o(t){let{agent:e,...r}=t;if("enableCallHistory"in r&&typeof r.enableCallHistory!="boolean")throw new Mqt("options.enableCallHistory must to be a boolean");if("acceptNonStandardSearchParameters"in r&&typeof r.acceptNonStandardSearchParameters!="boolean")throw new Mqt("options.acceptNonStandardSearchParameters must to be a boolean");if("ignoreTrailingSlash"in r&&typeof r.ignoreTrailingSlash!="boolean")throw new Mqt("options.ignoreTrailingSlash must to be a boolean");return r}a(D9o,"buildAndValidateMockOptions");Jyn.exports={getResponseData:$yn,getMockDispatch:Vyn,addMockDispatch:R9o,deleteMockDispatch:Lqt,buildKey:Wyn,generateKeyValues:Fqt,matchValue:RN,getResponse:P9o,getStatusText:zyn,mockDispatch:Yyn,buildMockDispatch:k9o,checkNetConnect:Kyn,buildAndValidateMockOptions:D9o,getHeaderByName:Hyn,buildHeadersFromArray:Uqt,normalizeSearchParams:x9o,normalizeOrigin:N9o}});var Vqt=T((Q6u,$qt)=>{"use strict";f();var{getResponseData:M9o,buildKey:O9o,addMockDispatch:Qqt}=vbe(),{kDispatches:Uze,kDispatchKey:Qze,kDefaultHeaders:qqt,kDefaultTrailers:Gqt,kContentLength:Hqt,kMockDispatch:qze,kIgnoreTrailingSlash:Gze}=TW(),{InvalidArgumentError:PN}=Oi(),{serializePathWithQuery:B9o}=eo(),iae=class{static{a(this,"MockScope")}constructor(e){this[qze]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new PN("waitInMs must be a valid integer > 0");return this[qze].delay=e,this}persist(){return this[qze].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new PN("repeatTimes must be a valid integer > 0");return this[qze].times=e,this}},jqt=class{static{a(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new PN("opts must be an object");if(typeof e.path>"u")throw new PN("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=B9o(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[Qze]=O9o(e),this[Uze]=r,this[Gze]=e.ignoreTrailingSlash??!1,this[qqt]={},this[Gqt]={},this[Hqt]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let o=M9o(r),s=this[Hqt]?{"content-length":o.length}:{},c={...this[qqt],...s,...n.headers},l={...this[Gqt],...n.trailers};return{statusCode:e,data:r,headers:c,trailers:l}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new PN("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new PN("responseOptions must be an object")}reply(e){if(typeof e=="function"){let s=a(l=>{let u=e(l);if(typeof u!="object"||u===null)throw new PN("reply options callback must return an object");let d={data:"",responseOptions:{},...u};return this.validateReplyParameters(d),{...this.createMockScopeDispatchData(d)}},"wrappedDefaultsCallback"),c=Qqt(this[Uze],this[Qze],s,{ignoreTrailingSlash:this[Gze]});return new iae(c)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),o=Qqt(this[Uze],this[Qze],n,{ignoreTrailingSlash:this[Gze]});return new iae(o)}replyWithError(e){if(typeof e>"u")throw new PN("error must be defined");let r=Qqt(this[Uze],this[Qze],{error:e},{ignoreTrailingSlash:this[Gze]});return new iae(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new PN("headers must be defined");return this[qqt]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new PN("trailers must be defined");return this[Gqt]=e,this}replyContentLength(){return this[Hqt]=!0,this}};$qt.exports.MockInterceptor=jqt;$qt.exports.MockScope=iae});var Kqt=T((H6u,iEn)=>{"use strict";f();var{promisify:L9o}=require("node:util"),F9o=Y9(),{buildMockDispatch:U9o}=vbe(),{kDispatches:Wqt,kMockAgent:Xyn,kClose:Zyn,kOriginalClose:eEn,kOrigin:tEn,kOriginalDispatch:Q9o,kConnected:zqt,kIgnoreTrailingSlash:rEn}=TW(),{MockInterceptor:q9o}=Vqt(),nEn=ac(),{InvalidArgumentError:G9o}=Oi(),Yqt=class extends F9o{static{a(this,"MockClient")}constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new G9o("Argument opts.agent must implement Agent");super(e,r),this[Xyn]=r.agent,this[tEn]=e,this[rEn]=r.ignoreTrailingSlash??!1,this[Wqt]=[],this[zqt]=1,this[Q9o]=this.dispatch,this[eEn]=this.close.bind(this),this.dispatch=U9o.call(this),this.close=this[Zyn]}get[nEn.kConnected](){return this[zqt]}intercept(e){return new q9o(e&&{ignoreTrailingSlash:this[rEn],...e},this[Wqt])}cleanMocks(){this[Wqt]=[]}async[Zyn](){await L9o(this[eEn])(),this[zqt]=0,this[Xyn][nEn.kClients].delete(this[tEn])}};iEn.exports=Yqt});var Zqt=T((V6u,Xqt)=>{"use strict";f();var{kMockCallHistoryAddLog:H9o}=TW(),{InvalidArgumentError:i7}=Oi();function r7(t,e,r,n){switch(e.operator){case"OR":return n.push(...r(t)),n;case"AND":return r.call({logs:n},t);default:throw new i7("options.operator must to be a case insensitive string equal to 'OR' or 'AND'")}}a(r7,"handleFilterCallsWithOptions");function j9o(t={}){let e={};if("operator"in t){if(typeof t.operator!="string"||t.operator.toUpperCase()!=="OR"&&t.operator.toUpperCase()!=="AND")throw new i7("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");return{...e,operator:t.operator.toUpperCase()}}return e}a(j9o,"buildAndValidateFilterCallsOptions");function n7(t){return e=>{if(typeof e=="string"||e==null)return this.logs.filter(r=>r[t]===e);if(e instanceof RegExp)return this.logs.filter(r=>e.test(r[t]));throw new i7(`${t} parameter should be one of string, regexp, undefined or null`)}}a(n7,"makeFilterCalls");function $9o(t){try{let e=new URL(t.path,t.origin);return e.search.length!==0||(e.search=new URLSearchParams(t.query).toString()),e}catch(e){throw new i7("An error occurred when computing MockCallHistoryLog.url",{cause:e})}}a($9o,"computeUrlWithMaybeSearchParameters");var Hze=class{static{a(this,"MockCallHistoryLog")}constructor(e={}){this.body=e.body,this.headers=e.headers,this.method=e.method;let r=$9o(e);this.fullUrl=r.toString(),this.origin=r.origin,this.path=r.pathname,this.searchParams=Object.fromEntries(r.searchParams),this.protocol=r.protocol,this.host=r.host,this.port=r.port,this.hash=r.hash}toMap(){return new Map([["protocol",this.protocol],["host",this.host],["port",this.port],["origin",this.origin],["path",this.path],["hash",this.hash],["searchParams",this.searchParams],["fullUrl",this.fullUrl],["method",this.method],["body",this.body],["headers",this.headers]])}toString(){let e={betweenKeyValueSeparator:"->",betweenPairSeparator:"|"},r="";return this.toMap().forEach((n,o)=>{(typeof n=="string"||n===void 0||n===null)&&(r=`${r}${o}${e.betweenKeyValueSeparator}${n}${e.betweenPairSeparator}`),(typeof n=="object"&&n!==null||Array.isArray(n))&&(r=`${r}${o}${e.betweenKeyValueSeparator}${JSON.stringify(n)}${e.betweenPairSeparator}`)}),r.slice(0,-1)}},Jqt=class{static{a(this,"MockCallHistory")}logs=[];calls(){return this.logs}firstCall(){return this.logs.at(0)}lastCall(){return this.logs.at(-1)}nthCall(e){if(typeof e!="number")throw new i7("nthCall must be called with a number");if(!Number.isInteger(e))throw new i7("nthCall must be called with an integer");if(Math.sign(e)!==1)throw new i7("nthCall must be called with a positive value. use firstCall or lastCall instead");return this.logs.at(e-1)}filterCalls(e,r){if(this.logs.length===0)return this.logs;if(typeof e=="function")return this.logs.filter(e);if(e instanceof RegExp)return this.logs.filter(n=>e.test(n.toString()));if(typeof e=="object"&&e!==null){if(Object.keys(e).length===0)return this.logs;let n={operator:"OR",...j9o(r)},o=[];return"protocol"in e&&(o=r7(e.protocol,n,this.filterCallsByProtocol,o)),"host"in e&&(o=r7(e.host,n,this.filterCallsByHost,o)),"port"in e&&(o=r7(e.port,n,this.filterCallsByPort,o)),"origin"in e&&(o=r7(e.origin,n,this.filterCallsByOrigin,o)),"path"in e&&(o=r7(e.path,n,this.filterCallsByPath,o)),"hash"in e&&(o=r7(e.hash,n,this.filterCallsByHash,o)),"fullUrl"in e&&(o=r7(e.fullUrl,n,this.filterCallsByFullUrl,o)),"method"in e&&(o=r7(e.method,n,this.filterCallsByMethod,o)),[...new Set(o)]}throw new i7("criteria parameter should be one of function, regexp, or object")}filterCallsByProtocol=n7.call(this,"protocol");filterCallsByHost=n7.call(this,"host");filterCallsByPort=n7.call(this,"port");filterCallsByOrigin=n7.call(this,"origin");filterCallsByPath=n7.call(this,"path");filterCallsByHash=n7.call(this,"hash");filterCallsByFullUrl=n7.call(this,"fullUrl");filterCallsByMethod=n7.call(this,"method");clear(){this.logs=[]}[H9o](e){let r=new Hze(e);return this.logs.push(r),r}*[Symbol.iterator](){for(let e of this.calls())yield e}};Xqt.exports.MockCallHistory=Jqt;Xqt.exports.MockCallHistoryLog=Hze});var nGt=T((Y6u,dEn)=>{"use strict";f();var{promisify:V9o}=require("node:util"),W9o=mW(),{buildMockDispatch:z9o}=vbe(),{kDispatches:eGt,kMockAgent:oEn,kClose:sEn,kOriginalClose:aEn,kOrigin:cEn,kOriginalDispatch:Y9o,kConnected:tGt,kIgnoreTrailingSlash:lEn}=TW(),{MockInterceptor:K9o}=Vqt(),uEn=ac(),{InvalidArgumentError:J9o}=Oi(),rGt=class extends W9o{static{a(this,"MockPool")}constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new J9o("Argument opts.agent must implement Agent");super(e,r),this[oEn]=r.agent,this[cEn]=e,this[lEn]=r.ignoreTrailingSlash??!1,this[eGt]=[],this[tGt]=1,this[Y9o]=this.dispatch,this[aEn]=this.close.bind(this),this.dispatch=z9o.call(this),this.close=this[sEn]}get[uEn.kConnected](){return this[tGt]}intercept(e){return new K9o(e&&{ignoreTrailingSlash:this[lEn],...e},this[eGt])}cleanMocks(){this[eGt]=[]}async[sEn](){await V9o(this[aEn])(),this[tGt]=0,this[oEn][uEn.kClients].delete(this[cEn])}};dEn.exports=rGt});var pEn=T((Z6u,fEn)=>{"use strict";f();var{Transform:X9o}=require("node:stream"),{Console:Z9o}=require("node:console"),e7o=process.versions.icu?"\u2705":"Y ",t7o=process.versions.icu?"\u274C":"N ";fEn.exports=class{static{a(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new X9o({transform(r,n,o){o(null,r)}}),this.logger=new Z9o({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:o,data:{statusCode:s},persist:c,times:l,timesInvoked:u,origin:d})=>({Method:n,Origin:d,Path:o,"Status code":s,Persistent:c?e7o:t7o,Invocations:u,Remaining:c?1/0:l-u}));return this.logger.table(r),this.transform.read().toString()}}});var cGt=T((rFu,CEn)=>{"use strict";f();var{kClients:IW}=ac(),r7o=yW(),{kAgent:iGt,kMockAgentSet:jze,kMockAgentGet:hEn,kDispatches:oGt,kIsMockActive:$ze,kNetConnect:xW,kGetNetConnect:n7o,kOptions:Vze,kFactory:Wze,kMockAgentRegisterCallHistory:sGt,kMockAgentIsCallHistoryEnabled:bbe,kMockAgentAddCallHistoryLog:mEn,kMockAgentMockCallHistoryInstance:oae,kMockAgentAcceptsNonStandardSearchParameters:gEn,kMockCallHistoryAddLog:i7o,kIgnoreTrailingSlash:AEn}=TW(),o7o=Kqt(),s7o=nGt(),{matchValue:a7o,normalizeSearchParams:c7o,buildAndValidateMockOptions:l7o,normalizeOrigin:yEn}=vbe(),{InvalidArgumentError:EEn,UndiciError:u7o}=Oi(),d7o=Qve(),f7o=pEn(),{MockCallHistory:p7o}=Zqt(),aGt=class extends d7o{static{a(this,"MockAgent")}constructor(e={}){super(e);let r=l7o(e);if(this[xW]=!0,this[$ze]=!0,this[bbe]=r.enableCallHistory??!1,this[gEn]=r.acceptNonStandardSearchParameters??!1,this[AEn]=r.ignoreTrailingSlash??!1,e?.agent&&typeof e.agent.dispatch!="function")throw new EEn("Argument opts.agent must implement Agent");let n=e?.agent?e.agent:new r7o(e);this[iGt]=n,this[IW]=n[IW],this[Vze]=r,this[bbe]&&this[sGt]()}get(e){let r=yEn(e),n=this[AEn]?r.replace(/\/$/,""):r,o=this[hEn](n);return o||(o=this[Wze](n),this[jze](n,o)),o}dispatch(e,r){e.origin=yEn(e.origin),this.get(e.origin),this[mEn](e);let n=this[gEn],o={...e};if(n&&o.path){let[s,c]=o.path.split("?"),l=c7o(c,n);o.path=`${s}?${l}`}return this[iGt].dispatch(o,r)}async close(){this.clearCallHistory(),await this[iGt].close(),this[IW].clear()}deactivate(){this[$ze]=!1}activate(){this[$ze]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[xW])?this[xW].push(e):this[xW]=[e];else if(typeof e>"u")this[xW]=!0;else throw new EEn("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[xW]=!1}enableCallHistory(){return this[bbe]=!0,this}disableCallHistory(){return this[bbe]=!1,this}getCallHistory(){return this[oae]}clearCallHistory(){this[oae]!==void 0&&this[oae].clear()}get isMockActive(){return this[$ze]}[sGt](){this[oae]===void 0&&(this[oae]=new p7o)}[mEn](e){this[bbe]&&(this[sGt](),this[oae][i7o](e))}[jze](e,r){this[IW].set(e,{count:0,dispatcher:r})}[Wze](e){let r=Object.assign({agent:this},this[Vze]);return this[Vze]&&this[Vze].connections===1?new o7o(e,r):new s7o(e,r)}[hEn](e){let r=this[IW].get(e);if(r?.dispatcher)return r.dispatcher;if(typeof e!="string"){let n=this[Wze]("http://localhost:9999");return this[jze](e,n),n}for(let[n,o]of Array.from(this[IW]))if(o&&typeof n!="string"&&a7o(n,e)){let s=this[Wze](e);return this[jze](e,s),s[oGt]=o.dispatcher[oGt],s}}[n7o](){return this[xW]}pendingInterceptors(){let e=this[IW];return Array.from(e.entries()).flatMap(([r,n])=>n.dispatcher[oGt].map(o=>({...o,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new f7o}={}){let r=this.pendingInterceptors();if(r.length!==0)throw new u7o(r.length===1?`1 interceptor is pending: +`,"latin1"),r!==null&&o!==r){if(n[GQt])throw new EV;process.emitWarning(new EV)}e[Ld].timeout&&e[Ld].timeoutType===ose&&e[Ld].timeout.refresh&&e[Ld].timeout.refresh(),n[m9]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[g9]=!1,e&&(Ci(n[Jg]<=1,"pipeline should only contain this request"),o(e))}};bAn.exports=G6o});var NAn=T((SFu,DAn)=>{"use strict";f();var uS=require("node:assert"),{pipeline:Z6o}=require("node:stream"),Ro=Ki(),{RequestContentLengthMismatchError:KQt,RequestAbortedError:eFo,SocketError:X1e,InformationalError:A9,InvalidArgumentError:tFo}=Ni(),{kUrl:J1e,kReset:xWe,kClient:gv,kRunning:Z1e,kPending:rFo,kQueue:y9,kPendingIdx:XQt,kRunningIdx:_w,kError:Av,kSocket:Zu,kStrictContentLength:nFo,kOnError:sse,kMaxConcurrentStreams:SWe,kPingInterval:SAn,kHTTP2Session:oO,kHTTP2InitialWindowSize:iFo,kHTTP2ConnectionWindowSize:oFo,kResume:d5,kSize:sFo,kHTTPContext:ZQt,kClosed:JQt,kBodyTimeout:aFo,kEnableConnectProtocol:Y1e,kRemoteSettings:K1e,kHTTP2Stream:TWe,kHTTP2SessionState:eqt}=rc(),{channels:IAn}=f9(),lS=Symbol("open streams"),xAn,IWe;try{IWe=require("node:http2")}catch{IWe={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:cFo,HTTP2_HEADER_METHOD:wAn,HTTP2_HEADER_PATH:RAn,HTTP2_HEADER_SCHEME:WQt,HTTP2_HEADER_CONTENT_LENGTH:lFo,HTTP2_HEADER_EXPECT:uFo,HTTP2_HEADER_STATUS:zQt,HTTP2_HEADER_PROTOCOL:dFo,NGHTTP2_REFUSED_STREAM:fFo,NGHTTP2_CANCEL:pFo}}=IWe;function YQt(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}a(YQt,"parseH2Headers");function hFo(t,e){t[Zu]=e;let r=t[iFo],n=t[oFo],o=IWe.connect(t[J1e],{createConnection:a(()=>e,"createConnection"),peerMaxConcurrentStreams:t[SWe],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[Zu]=e,o[lS]=0,o[gv]=t,o[Zu]=e,o[eqt]={ping:{interval:t[SAn]===0?null:setInterval(yFo,t[SAn],o).unref()}},o[Y1e]=!1,o[K1e]=!1,n&&Ro.addListener(o,"connect",gFo.bind(o,n)),Ro.addListener(o,"error",EFo),Ro.addListener(o,"frameError",_Fo),Ro.addListener(o,"end",CFo),Ro.addListener(o,"goaway",vFo),Ro.addListener(o,"close",bFo),Ro.addListener(o,"remoteSettings",AFo),o.unref(),t[oO]=o,e[oO]=o,Ro.addListener(e,"error",SFo),Ro.addListener(e,"end",IFo),Ro.addListener(e,"close",TFo),e[JQt]=!1,e.on("close",xFo),{version:"h2",defaultPipelining:1/0,write(s){return RFo(t,s)},resume(){mFo(t)},destroy(s,c){e[JQt]?queueMicrotask(c):e.destroy(s).on("close",c)},get destroyed(){return e.destroyed},busy(s){if(s!=null)if(t[Z1e]>0){if(s.idempotent===!1||(s.upgrade==="websocket"||s.method==="CONNECT")&&o[K1e]===!1||Ro.bodyLength(s.body)!==0&&(Ro.isStream(s.body)||Ro.isAsyncIterable(s.body)||Ro.isFormDataLike(s.body)))return!0}else return(s.upgrade==="websocket"||s.method==="CONNECT")&&o[K1e]===!1;return!1}}}a(hFo,"connectH2");function mFo(t){let e=t[Zu];e?.destroyed===!1&&(t[sFo]===0||t[SWe]===0?(e.unref(),t[oO].unref()):(e.ref(),t[oO].ref()))}a(mFo,"resumeH2");function gFo(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}a(gFo,"applyConnectionWindowSize");function AFo(t){if(this[gv][SWe]=t.maxConcurrentStreams??this[gv][SWe],this[K1e]===!0&&this[Y1e]===!0&&t.enableConnectProtocol===!1){let e=new A9("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[Zu][Av]=e,this[gv][sse](e);return}this[Y1e]=t.enableConnectProtocol??this[Y1e],this[K1e]=!0,this[gv][d5]()}a(AFo,"onHttp2RemoteSettings");function yFo(t){let e=t[eqt];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,o){let s=this[gv],c=this[gv];if(n!=null){let l=new A9(`HTTP/2: "PING" errored - type ${n.message}`);c[Av]=l,s[sse](l)}else s.emit("ping",o)}a(r,"onPing")}a(yFo,"onHttp2SendPing");function EFo(t){uS(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Zu][Av]=t,this[gv][sse](t)}a(EFo,"onHttp2SessionError");function _Fo(t,e,r){if(r===0){let n=new A9(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Zu][Av]=n,this[gv][sse](n)}}a(_Fo,"onHttp2FrameError");function CFo(){let t=new X1e("other side closed",Ro.getSocketInfo(this[Zu]));this.destroy(t),Ro.destroy(this[Zu],t)}a(CFo,"onHttp2SessionEnd");function vFo(t){let e=this[Av]||new X1e(`HTTP/2: "GOAWAY" frame received with code ${t}`,Ro.getSocketInfo(this[Zu])),r=this[gv];if(r[Zu]=null,r[ZQt]=null,this.close(),this[oO]=null,Ro.destroy(this[Zu],e),r[_w]{e.aborted||e.completed||(R=R||new eFo,Ro.errorRequest(t,e,R),A!=null&&(A.removeAllListeners("data"),A.close(),t[sse](R),t[d5]()),Ro.destroy(m,R))},"abort");try{e.onConnect(_)}catch(R){Ro.errorRequest(t,e,R)}if(e.aborted)return!1;if(l||o==="CONNECT")return n.ref(),l==="websocket"?n[Y1e]===!1?(Ro.errorRequest(t,e,new A9("HTTP/2: Extended CONNECT protocol not supported by server")),n.unref(),!1):(g[wAn]="CONNECT",g[dFo]="websocket",g[RAn]=s,p==="ws:"||p==="wss:"?g[WQt]=p==="ws:"?"http":"https":g[WQt]=p==="http:"?"http":"https",A=n.request(g,{endStream:!1,signal:d}),A[TWe]=!0,A.once("response",(R,P)=>{let{[zQt]:k,...Q}=R;e.onUpgrade(k,YQt(Q),A),++n[lS],t[y9][t[_w]++]=null}),A.on("error",()=>{(A.rstCode===fFo||A.rstCode===pFo)&&_(new A9(`HTTP/2: "stream error" received - code ${A.rstCode}`))}),A.once("close",()=>{n[lS]-=1,n[lS]===0&&n.unref()}),A.setTimeout(r),!0):(A=n.request(g,{endStream:!1,signal:d}),A[TWe]=!0,A.on("response",R=>{let{[zQt]:P,...k}=R;e.onUpgrade(P,YQt(k),A),++n[lS],t[y9][t[_w]++]=null}),A.once("close",()=>{n[lS]-=1,n[lS]===0&&n.unref()}),A.setTimeout(r),!0);g[RAn]=s,g[WQt]=p==="http:"?"http":"https";let v=o==="PUT"||o==="POST"||o==="PATCH";m&&typeof m.read=="function"&&m.read(0);let b=Ro.bodyLength(m);if(Ro.isFormDataLike(m)){xAn??=rse().extractBody;let[R,P]=xAn(m);g["content-type"]=P,m=R.stream,b=R.length}if(b==null&&(b=e.contentLength),v||(b=null),wFo(o)&&b>0&&e.contentLength!=null&&e.contentLength!==b){if(t[nFo])return Ro.errorRequest(t,e,new KQt),!1;process.emitWarning(new KQt)}if(b!=null&&(uS(m||b===0,"no body must not have content length"),g[lFo]=`${b}`),n.ref(),IAn.sendHeaders.hasSubscribers){let R="";for(let P in g)R+=`${P}: ${g[P]}\r +`;IAn.sendHeaders.publish({request:e,headers:R,socket:n[Zu]})}let I=o==="GET"||o==="HEAD"||m===null;u?(g[uFo]="100-continue",A=n.request(g,{endStream:I,signal:d}),A[TWe]=!0,A.once("continue",w)):(A=n.request(g,{endStream:I,signal:d}),A[TWe]=!0,w()),++n[lS],A.setTimeout(r);let x=!1;return A.once("response",R=>{let{[zQt]:P,...k}=R;if(e.onResponseStarted(),x=!0,e.aborted){A.removeAllListeners("data");return}e.onHeaders(Number(P),YQt(k),A.resume.bind(A),"")===!1&&A.pause(),A.on("data",Q=>{e.aborted||e.completed||e.onData(Q)===!1&&A.pause()})}),A.once("end",()=>{A.removeAllListeners("data"),x?(!e.aborted&&!e.completed&&e.onComplete({}),t[y9][t[_w]++]=null,t[d5]()):(_(new A9("HTTP/2: stream half-closed (remote)")),t[y9][t[_w]++]=null,t[XQt]=t[_w],t[d5]())}),A.once("close",()=>{A.removeAllListeners("data"),n[lS]-=1,n[lS]===0&&n.unref()}),A.once("error",function(R){A.removeAllListeners("data"),_(R)}),A.once("frameError",(R,P)=>{A.removeAllListeners("data"),_(new A9(`HTTP/2: "frameError" received - type ${R}, code ${P}`))}),A.on("aborted",()=>{A.removeAllListeners("data")}),A.on("timeout",()=>{let R=new A9(`HTTP/2: "stream timeout after ${r}"`);A.removeAllListeners("data"),n[lS]-=1,n[lS]===0&&n.unref(),_(R)}),A.once("trailers",R=>{e.aborted||e.completed||(A.removeAllListeners("data"),e.onComplete(R))}),!0;function w(){!m||b===0?PAn(_,A,null,t,e,t[Zu],b,v):Ro.isBuffer(m)?PAn(_,A,m,t,e,t[Zu],b,v):Ro.isBlobLike(m)?typeof m.stream=="function"?kAn(_,A,m.stream(),t,e,t[Zu],b,v):kFo(_,A,m,t,e,t[Zu],b,v):Ro.isStream(m)?PFo(_,t[Zu],v,A,m,t,e,b):Ro.isIterable(m)?kAn(_,A,m,t,e,t[Zu],b,v):uS(!1)}a(w,"writeBodyH2")}a(RFo,"writeH2");function PAn(t,e,r,n,o,s,c,l){try{r!=null&&Ro.isBuffer(r)&&(uS(c===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),o.onBodySent(r)),l||(s[xWe]=!0),o.onRequestSent(),n[d5]()}catch(u){t(u)}}a(PAn,"writeBuffer");function PFo(t,e,r,n,o,s,c,l){uS(l!==0||s[Z1e]===0,"stream body cannot be pipelined");let u=Z6o(o,n,p=>{p?(Ro.destroy(u,p),t(p)):(Ro.removeAllListeners(u),c.onRequestSent(),r||(e[xWe]=!0),s[d5]())});Ro.addListener(u,"data",d);function d(p){c.onBodySent(p)}a(d,"onPipeData")}a(PFo,"writeStream");async function kFo(t,e,r,n,o,s,c,l){uS(c===r.size,"blob body must have content length");try{if(c!=null&&c!==r.size)throw new KQt;let u=Buffer.from(await r.arrayBuffer());e.cork(),e.write(u),e.uncork(),e.end(),o.onBodySent(u),o.onRequestSent(),l||(s[xWe]=!0),n[d5]()}catch(u){t(u)}}a(kFo,"writeBlob");async function kAn(t,e,r,n,o,s,c,l){uS(c!==0||n[Z1e]===0,"iterator body cannot be pipelined");let u=null;function d(){if(u){let h=u;u=null,h()}}a(d,"onDrain");let p=a(()=>new Promise((h,m)=>{uS(u===null),s[Av]?m(s[Av]):u=h}),"waitForDrain");e.on("close",d).on("drain",d);try{for await(let h of r){if(s[Av])throw s[Av];let m=e.write(h);o.onBodySent(h),m||await p()}e.end(),o.onRequestSent(),l||(s[xWe]=!0),n[d5]()}catch(h){t(h)}finally{e.off("close",d).off("drain",d)}}a(kAn,"writeIterable");DAn.exports=hFo});var v9=T((wFu,qAn)=>{"use strict";f();var sO=require("node:assert"),LAn=require("node:net"),eve=require("node:http"),_V=Ki(),{ClientStats:DFo}=zUt(),{channels:ase}=f9(),NFo=tgn(),MFo=hV(),{InvalidArgumentError:Jl,InformationalError:OFo,ClientDestroyedError:BFo}=Ni(),LFo=mV(),{kUrl:f5,kServerName:C9,kClient:FFo,kBusy:rqt,kConnect:UFo,kResuming:CV,kRunning:ive,kPending:ove,kSize:tve,kQueue:Cw,kConnected:QFo,kConnecting:cse,kNeedDrain:_9,kKeepAliveDefaultTimeout:MAn,kHostHeader:qFo,kPendingIdx:vw,kRunningIdx:cO,kError:GFo,kPipelining:wWe,kKeepAliveTimeoutValue:HFo,kMaxHeadersSize:jFo,kKeepAliveMaxTimeout:$Fo,kKeepAliveTimeoutThreshold:VFo,kHeadersTimeout:WFo,kBodyTimeout:zFo,kStrictContentLength:YFo,kConnector:rve,kMaxRequests:nqt,kCounter:KFo,kClose:JFo,kDestroy:XFo,kDispatch:ZFo,kLocalAddress:nve,kMaxResponseSize:e9o,kOnError:t9o,kHTTPContext:bf,kMaxConcurrentStreams:r9o,kHTTP2InitialWindowSize:n9o,kHTTP2ConnectionWindowSize:i9o,kResume:aO,kPingInterval:o9o}=rc(),s9o=TAn(),a9o=NAn(),E9=Symbol("kClosedResolve"),c9o=eve&&eve.maxHeaderSize&&Number.isInteger(eve.maxHeaderSize)&&eve.maxHeaderSize>0?()=>eve.maxHeaderSize:()=>{throw new Jl("http module not available or http.maxHeaderSize invalid")},OAn=a(()=>{},"noop");function FAn(t){return t[wWe]??t[bf]?.defaultPipelining??1}a(FAn,"getPipelining");var iqt=class extends MFo{static{a(this,"Client")}constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:o,requestTimeout:s,connectTimeout:c,bodyTimeout:l,idleTimeout:u,keepAlive:d,keepAliveTimeout:p,maxKeepAliveTimeout:h,keepAliveMaxTimeout:m,keepAliveTimeoutThreshold:g,socketPath:A,pipelining:y,tls:E,strictContentLength:_,maxCachedSessions:v,connect:b,maxRequestsPerClient:I,localAddress:x,maxResponseSize:w,autoSelectFamily:R,autoSelectFamilyAttemptTimeout:P,maxConcurrentStreams:k,allowH2:Q,useH2c:M,initialWindowSize:N,connectionWindowSize:G,pingInterval:O}={}){if(d!==void 0)throw new Jl("unsupported keepAlive, use pipelining=0 instead");if(o!==void 0)throw new Jl("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(s!==void 0)throw new Jl("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(u!==void 0)throw new Jl("unsupported idleTimeout, use keepAliveTimeout instead");if(h!==void 0)throw new Jl("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null){if(!Number.isInteger(r)||r<1)throw new Jl("invalid maxHeaderSize")}else r=c9o();if(A!=null&&typeof A!="string")throw new Jl("invalid socketPath");if(c!=null&&(!Number.isFinite(c)||c<0))throw new Jl("invalid connectTimeout");if(p!=null&&(!Number.isFinite(p)||p<=0))throw new Jl("invalid keepAliveTimeout");if(m!=null&&(!Number.isFinite(m)||m<=0))throw new Jl("invalid keepAliveMaxTimeout");if(g!=null&&!Number.isFinite(g))throw new Jl("invalid keepAliveTimeoutThreshold");if(n!=null&&(!Number.isInteger(n)||n<0))throw new Jl("headersTimeout must be a positive integer or zero");if(l!=null&&(!Number.isInteger(l)||l<0))throw new Jl("bodyTimeout must be a positive integer or zero");if(b!=null&&typeof b!="function"&&typeof b!="object")throw new Jl("connect must be a function or an object");if(I!=null&&(!Number.isInteger(I)||I<0))throw new Jl("maxRequestsPerClient must be a positive number");if(x!=null&&(typeof x!="string"||LAn.isIP(x)===0))throw new Jl("localAddress must be valid string IP address");if(w!=null&&(!Number.isInteger(w)||w<-1))throw new Jl("maxResponseSize must be a positive number");if(P!=null&&(!Number.isInteger(P)||P<-1))throw new Jl("autoSelectFamilyAttemptTimeout must be a positive number");if(Q!=null&&typeof Q!="boolean")throw new Jl("allowH2 must be a valid boolean value");if(k!=null&&(typeof k!="number"||k<1))throw new Jl("maxConcurrentStreams must be a positive integer, greater than 0");if(M!=null&&typeof M!="boolean")throw new Jl("useH2c must be a valid boolean value");if(N!=null&&(!Number.isInteger(N)||N<1))throw new Jl("initialWindowSize must be a positive integer, greater than 0");if(G!=null&&(!Number.isInteger(G)||G<1))throw new Jl("connectionWindowSize must be a positive integer, greater than 0");if(O!=null&&(typeof O!="number"||!Number.isInteger(O)||O<0))throw new Jl("pingInterval must be a positive integer, greater or equal to 0");if(super(),typeof b!="function")b=LFo({...E,maxCachedSessions:v,allowH2:Q,useH2c:M,socketPath:A,timeout:c,...typeof R=="boolean"?{autoSelectFamily:R,autoSelectFamilyAttemptTimeout:P}:void 0,...b});else if(A!=null){let D=b;b=a((F,U)=>D({...F,socketPath:A},U),"connect")}this[f5]=_V.parseOrigin(e),this[rve]=b,this[wWe]=y??1,this[jFo]=r,this[MAn]=p??4e3,this[$Fo]=m??6e5,this[VFo]=g??2e3,this[HFo]=this[MAn],this[C9]=null,this[nve]=x??null,this[CV]=0,this[_9]=0,this[qFo]=`host: ${this[f5].hostname}${this[f5].port?`:${this[f5].port}`:""}\r +`,this[zFo]=l??3e5,this[WFo]=n??3e5,this[YFo]=_??!0,this[nqt]=I,this[E9]=null,this[e9o]=w>-1?w:-1,this[bf]=null,this[r9o]=k??100,this[n9o]=N??262144,this[i9o]=G??524288,this[o9o]=O??6e4,this[Cw]=[],this[cO]=0,this[vw]=0,this[aO]=D=>oqt(this,D),this[t9o]=D=>UAn(this,D)}get pipelining(){return this[wWe]}set pipelining(e){this[wWe]=e,this[aO](!0)}get stats(){return new DFo(this)}get[ove](){return this[Cw].length-this[vw]}get[ive](){return this[vw]-this[cO]}get[tve](){return this[Cw].length-this[cO]}get[QFo](){return!!this[bf]&&!this[cse]&&!this[bf].destroyed}get[rqt](){return!!(this[bf]?.busy(null)||this[tve]>=(FAn(this)||1)||this[ove]>0)}[UFo](e){QAn(this),this.once("connect",e)}[ZFo](e,r){let n=new NFo(this[f5].origin,e,r);return this[Cw].push(n),this[CV]||(_V.bodyLength(n.body)==null&&_V.isIterable(n.body)?(this[CV]=1,queueMicrotask(()=>oqt(this))):this[aO](!0)),this[CV]&&this[_9]!==2&&this[rqt]&&(this[_9]=2),this[_9]<2}[JFo](){return new Promise(e=>{this[tve]?this[E9]=e:e(null)})}[XFo](e){return new Promise(r=>{let n=this[Cw].splice(this[vw]);for(let s=0;s{this[E9]&&(this[E9](),this[E9]=null),r(null)},"callback");this[bf]?(this[bf].destroy(e,o),this[bf]=null):queueMicrotask(o),this[aO]()})}};function UAn(t,e){if(t[ive]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){sO(t[vw]===t[cO]);let r=t[Cw].splice(t[cO]);for(let n=0;n{if(s){tqt(t,s,{host:e,hostname:r,protocol:n,port:o}),t[aO]();return}if(t.destroyed){_V.destroy(c.on("error",OAn),new BFo),t[aO]();return}sO(c);try{t[bf]=c.alpnProtocol==="h2"?a9o(t,c):s9o(t,c)}catch(l){c.destroy().on("error",OAn),tqt(t,l,{host:e,hostname:r,protocol:n,port:o}),t[aO]();return}t[cse]=!1,c[KFo]=0,c[nqt]=t[nqt],c[FFo]=t,c[GFo]=null,ase.connected.hasSubscribers&&ase.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[bf]?.version,servername:t[C9],localAddress:t[nve]},connector:t[rve],socket:c}),t.emit("connect",t[f5],[t]),t[aO]()})}catch(s){tqt(t,s,{host:e,hostname:r,protocol:n,port:o}),t[aO]()}}a(QAn,"connect");function tqt(t,e,{host:r,hostname:n,protocol:o,port:s}){if(!t.destroyed){if(t[cse]=!1,ase.connectError.hasSubscribers&&ase.connectError.publish({connectParams:{host:r,hostname:n,protocol:o,port:s,version:t[bf]?.version,servername:t[C9],localAddress:t[nve]},connector:t[rve],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(sO(t[ive]===0);t[ove]>0&&t[Cw][t[vw]].servername===t[C9];){let c=t[Cw][t[vw]++];_V.errorRequest(t,c,e)}else UAn(t,e);t.emit("connectionError",t[f5],[t],e)}}a(tqt,"handleConnectError");function BAn(t){t[_9]=0,t.emit("drain",t[f5],[t])}a(BAn,"emitDrain");function oqt(t,e){t[CV]!==2&&(t[CV]=2,l9o(t,e),t[CV]=0,t[cO]>256&&(t[Cw].splice(0,t[cO]),t[vw]-=t[cO],t[cO]=0))}a(oqt,"resume");function l9o(t,e){for(;;){if(t.destroyed){sO(t[ove]===0);return}if(t[E9]&&!t[tve]){t[E9](),t[E9]=null;return}if(t[bf]&&t[bf].resume(),t[rqt])t[_9]=2;else if(t[_9]===2){e?(t[_9]=1,queueMicrotask(()=>BAn(t))):BAn(t);continue}if(t[ove]===0||t[ive]>=(FAn(t)||1))return;let r=t[Cw][t[vw]];if(r===null)return;if(t[f5].protocol==="https:"&&t[C9]!==r.servername){if(t[ive]>0)return;t[C9]=r.servername,t[bf]?.destroy(new OFo("servername changed"),()=>{t[bf]=null,oqt(t)})}if(t[cse])return;if(!t[bf]){QAn(t);return}if(t[bf].destroyed||t[bf].busy(r))return;!r.aborted&&t[bf].write(r)?t[vw]++:t[Cw].splice(t[vw],1)}}a(l9o,"_resume");qAn.exports=iqt});var sqt=T((DFu,GAn)=>{"use strict";f();var RWe=class{static{a(this,"FixedCircularBuffer")}bottom=0;top=0;list=new Array(2048).fill(void 0);next=null;isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};GAn.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new RWe}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new RWe),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var PWe=T((OFu,JAn)=>{"use strict";f();var{PoolStats:u9o}=zUt(),d9o=hV(),f9o=sqt(),{kConnected:aqt,kSize:HAn,kRunning:jAn,kPending:$An,kQueued:sve,kBusy:p9o,kFree:h9o,kUrl:m9o,kClose:g9o,kDestroy:A9o,kDispatch:y9o}=rc(),xh=Symbol("clients"),yy=Symbol("needDrain"),ave=Symbol("queue"),cqt=Symbol("closed resolve"),lqt=Symbol("onDrain"),VAn=Symbol("onConnect"),WAn=Symbol("onDisconnect"),zAn=Symbol("onConnectionError"),uqt=Symbol("get dispatcher"),YAn=Symbol("add client"),KAn=Symbol("remove client"),dqt=class extends d9o{static{a(this,"PoolBase")}[ave]=new f9o;[sve]=0;[xh]=[];[yy]=!1;[lqt](e,r,n){let o=this[ave],s=!1;for(;!s;){let c=o.shift();if(!c)break;this[sve]--,s=!e.dispatch(c.opts,c.handler)}if(e[yy]=s,!s&&this[yy]&&(this[yy]=!1,this.emit("drain",r,[this,...n])),this[cqt]&&o.isEmpty()){let c=[];for(let l=0;l{this.emit("connect",e,[this,...r])};[WAn]=(e,r,n)=>{this.emit("disconnect",e,[this,...r],n)};[zAn]=(e,r,n)=>{this.emit("connectionError",e,[this,...r],n)};get[p9o](){return this[yy]}get[aqt](){let e=0;for(let{[aqt]:r}of this[xh])e+=r;return e}get[h9o](){let e=0;for(let{[aqt]:r,[yy]:n}of this[xh])e+=r&&!n;return e}get[$An](){let e=this[sve];for(let{[$An]:r}of this[xh])e+=r;return e}get[jAn](){let e=0;for(let{[jAn]:r}of this[xh])e+=r;return e}get[HAn](){let e=this[sve];for(let{[HAn]:r}of this[xh])e+=r;return e}get stats(){return new u9o(this)}[g9o](){if(this[ave].isEmpty()){let e=[];for(let r=0;r{this[cqt]=e})}[A9o](e){for(;;){let n=this[ave].shift();if(!n)break;n.handler.onError(e)}let r=new Array(this[xh].length);for(let n=0;n{this[yy]&&this[lqt](e,e[m9o],[e,this])}),this}[KAn](e){e.close(()=>{let r=this[xh].indexOf(e);r!==-1&&this[xh].splice(r,1)}),this[yy]=this[xh].some(r=>!r[yy]&&r.closed!==!0&&r.destroyed!==!0)}};JAn.exports={PoolBase:dqt,kClients:xh,kNeedDrain:yy,kAddClient:YAn,kRemoveClient:KAn,kGetDispatcher:uqt}});var vV=T((FFu,tyn)=>{"use strict";f();var{PoolBase:E9o,kClients:kWe,kNeedDrain:_9o,kAddClient:C9o,kGetDispatcher:v9o,kRemoveClient:b9o}=PWe(),T9o=v9(),{InvalidArgumentError:fqt}=Ni(),XAn=Ki(),{kUrl:ZAn}=rc(),S9o=mV(),DWe=Symbol("options"),pqt=Symbol("connections"),eyn=Symbol("factory");function I9o(t,e){return new T9o(t,e)}a(I9o,"defaultFactory");var hqt=class extends E9o{static{a(this,"Pool")}constructor(e,{connections:r,factory:n=I9o,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,clientTtl:m,...g}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new fqt("invalid connections");if(typeof n!="function")throw new fqt("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new fqt("connect must be a function or an object");typeof o!="function"&&(o=S9o({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...typeof d=="boolean"?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),super(),this[pqt]=r||null,this[ZAn]=XAn.parseOrigin(e),this[DWe]={...XAn.deepClone(g),connect:o,allowH2:h,clientTtl:m,socketPath:u},this[DWe].interceptors=g.interceptors?{...g.interceptors}:void 0,this[eyn]=n,this.on("connect",(A,y)=>{if(m!=null&&m>0)for(let E of y)Object.assign(E,{ttl:Date.now()})}),this.on("connectionError",(A,y,E)=>{for(let _ of y){let v=this[kWe].indexOf(_);v!==-1&&this[kWe].splice(v,1)}})}[v9o](){let e=this[DWe].clientTtl;for(let r of this[kWe])if(e!=null&&e>0&&r.ttl&&Date.now()-r.ttl>e)this[b9o](r);else if(!r[_9o])return r;if(!this[pqt]||this[kWe].length{"use strict";f();var{BalancedPoolMissingUpstreamError:x9o,InvalidArgumentError:w9o}=Ni(),{PoolBase:R9o,kClients:km,kNeedDrain:cve,kAddClient:P9o,kRemoveClient:k9o,kGetDispatcher:D9o}=PWe(),N9o=vV(),{kUrl:NWe}=rc(),MWe=Ki(),ryn=Symbol("factory"),lve=Symbol("options"),nyn=Symbol("kGreatestCommonDivisor"),bV=Symbol("kCurrentWeight"),TV=Symbol("kIndex"),dS=Symbol("kWeight"),OWe=Symbol("kMaxWeightPerServer"),BWe=Symbol("kErrorPenalty");function M9o(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}a(M9o,"getGreatestCommonDivisor");function O9o(t,e){return new N9o(t,e)}a(O9o,"defaultFactory");var mqt=class extends R9o{static{a(this,"BalancedPool")}constructor(e=[],{factory:r=O9o,...n}={}){if(typeof r!="function")throw new w9o("factory must be a function.");super(),this[lve]={...MWe.deepClone(n)},this[lve].interceptors=n.interceptors?{...n.interceptors}:void 0,this[TV]=-1,this[bV]=0,this[OWe]=this[lve].maxWeightPerServer||100,this[BWe]=this[lve].errorPenalty||15,Array.isArray(e)||(e=[e]),this[ryn]=r;for(let o of e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let r=MWe.parseOrigin(e).origin;if(this[km].find(o=>o[NWe].origin===r&&o.closed!==!0&&o.destroyed!==!0))return this;let n=this[ryn](r,this[lve]);this[P9o](n),n.on("connect",()=>{n[dS]=Math.min(this[OWe],n[dS]+this[BWe])}),n.on("connectionError",()=>{n[dS]=Math.max(1,n[dS]-this[BWe]),this._updateBalancedPoolStats()}),n.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(n[dS]=Math.max(1,n[dS]-this[BWe]),this._updateBalancedPoolStats())});for(let o of this[km])o[dS]=this[OWe];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;ro[NWe].origin===r&&o.closed!==!0&&o.destroyed!==!0);return n&&this[k9o](n),this}getUpstream(e){let r=MWe.parseOrigin(e).origin;return this[km].find(n=>n[NWe].origin===r&&n.closed!==!0&&n.destroyed!==!0)}get upstreams(){return this[km].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[NWe].origin)}[D9o](){if(this[km].length===0)throw new x9o;if(!this[km].find(s=>!s[cve]&&s.closed!==!0&&s.destroyed!==!0)||this[km].map(s=>s[cve]).reduce((s,c)=>s&&c,!0))return;let n=0,o=this[km].findIndex(s=>!s[cve]);for(;n++this[km][o][dS]&&!s[cve]&&(o=this[TV]),this[TV]===0&&(this[bV]=this[bV]-this[nyn],this[bV]<=0&&(this[bV]=this[OWe])),s[dS]>=this[bV]&&!s[cve])return s}return this[bV]=this[km][o][dS],this[TV]=o,this[km][o]}};iyn.exports=mqt});var lyn=T((jFu,cyn)=>{"use strict";f();var{PoolBase:B9o,kClients:LWe,kNeedDrain:L9o,kAddClient:syn,kGetDispatcher:F9o,kRemoveClient:U9o}=PWe(),Q9o=v9(),{InvalidArgumentError:gqt}=Ni(),ayn=Ki(),{kUrl:Aqt}=rc(),q9o=mV(),uve=Symbol("options"),yqt=Symbol("connections"),Eqt=Symbol("factory"),FWe=Symbol("index");function G9o(t,e){return new Q9o(t,e)}a(G9o,"defaultFactory");var _qt=class extends B9o{static{a(this,"RoundRobinPool")}constructor(e,{connections:r,factory:n=G9o,connect:o,connectTimeout:s,tls:c,maxCachedSessions:l,socketPath:u,autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p,allowH2:h,clientTtl:m,...g}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new gqt("invalid connections");if(typeof n!="function")throw new gqt("factory must be a function.");if(o!=null&&typeof o!="function"&&typeof o!="object")throw new gqt("connect must be a function or an object");typeof o!="function"&&(o=q9o({...c,maxCachedSessions:l,allowH2:h,socketPath:u,timeout:s,...typeof d=="boolean"?{autoSelectFamily:d,autoSelectFamilyAttemptTimeout:p}:void 0,...o})),super(),this[yqt]=r||null,this[Aqt]=ayn.parseOrigin(e),this[uve]={...ayn.deepClone(g),connect:o,allowH2:h,clientTtl:m,socketPath:u},this[uve].interceptors=g.interceptors?{...g.interceptors}:void 0,this[Eqt]=n,this[FWe]=-1,this.on("connect",(A,y)=>{if(m!=null&&m>0)for(let E of y)Object.assign(E,{ttl:Date.now()})}),this.on("connectionError",(A,y,E)=>{for(let _ of y){let v=this[LWe].indexOf(_);v!==-1&&this[LWe].splice(v,1)}})}[F9o](){let e=this[uve].clientTtl,r=this[LWe].length;if(r===0){let o=this[Eqt](this[Aqt],this[uve]);return this[syn](o),o}let n=0;for(;n0&&o.ttl&&Date.now()-o.ttl>e){this[U9o](o),n++;continue}if(!o[L9o])return o;n++}if(!this[yqt]||r{"use strict";f();var{InvalidArgumentError:UWe,MaxOriginsReachedError:H9o}=Ni(),{kClients:fS,kRunning:uyn,kClose:j9o,kDestroy:$9o,kDispatch:V9o,kUrl:W9o}=rc(),z9o=hV(),Y9o=vV(),K9o=v9(),J9o=Ki(),dyn=Symbol("onConnect"),fyn=Symbol("onDisconnect"),pyn=Symbol("onConnectionError"),hyn=Symbol("onDrain"),myn=Symbol("factory"),Cqt=Symbol("options"),dve=Symbol("origins");function X9o(t,e){return e&&e.connections===1?new K9o(t,e):new Y9o(t,e)}a(X9o,"defaultFactory");var vqt=class extends z9o{static{a(this,"Agent")}constructor({factory:e=X9o,maxOrigins:r=1/0,connect:n,...o}={}){if(typeof e!="function")throw new UWe("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new UWe("connect must be a function or an object");if(typeof r!="number"||Number.isNaN(r)||r<=0)throw new UWe("maxOrigins must be a number greater than 0");super(),n&&typeof n!="function"&&(n={...n}),this[Cqt]={...J9o.deepClone(o),maxOrigins:r,connect:n},this[myn]=e,this[fS]=new Map,this[dve]=new Set,this[hyn]=(s,c)=>{this.emit("drain",s,[this,...c])},this[dyn]=(s,c)=>{this.emit("connect",s,[this,...c])},this[fyn]=(s,c,l)=>{this.emit("disconnect",s,[this,...c],l)},this[pyn]=(s,c,l)=>{this.emit("connectionError",s,[this,...c],l)}}get[uyn](){let e=0;for(let{dispatcher:r}of this[fS].values())e+=r[uyn];return e}[V9o](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new UWe("opts.origin must be a non-empty string or URL.");if(this[dve].size>=this[Cqt].maxOrigins&&!this[dve].has(n))throw new H9o;let o=this[fS].get(n),s=o&&o.dispatcher;if(!s){let c=a(l=>{let u=this[fS].get(n);u&&(l&&(u.count-=1),u.count<=0&&(this[fS].delete(n),u.dispatcher.destroyed||u.dispatcher.close()),this[dve].delete(n))},"closeClientIfUnused");s=this[myn](e.origin,this[Cqt]).on("drain",this[hyn]).on("connect",(l,u)=>{let d=this[fS].get(n);d&&(d.count+=1),this[dyn](l,u)}).on("disconnect",(l,u,d)=>{c(!0),this[fyn](l,u,d)}).on("connectionError",(l,u,d)=>{c(!1),this[pyn](l,u,d)}),this[fS].set(n,{count:0,dispatcher:s}),this[dve].add(n)}return s.dispatch(e,r)}[j9o](){let e=[];for(let{dispatcher:r}of this[fS].values())e.push(r.close());return this[fS].clear(),Promise.all(e)}[$9o](e){let r=[];for(let{dispatcher:n}of this[fS].values())r.push(n.destroy(e));return this[fS].clear(),Promise.all(r)}get stats(){let e={};for(let{dispatcher:r}of this[fS].values())r.stats&&(e[r[W9o].origin]=r.stats);return e}};gyn.exports=vqt});var _yn=T((KFu,Eyn)=>{"use strict";f();var{Buffer:T9}=require("node:buffer"),Ayn=require("node:net"),{InvalidArgumentError:b9}=Ni();function Z9o(t){if(Ayn.isIPv4(t)){let r=t.split(".").map(Number);return{type:1,buffer:T9.from(r)}}if(Ayn.isIPv6(t))return{type:4,buffer:yyn(t)};let e=T9.from(t,"utf8");if(e.length>255)throw new b9("Domain name too long (max 255 bytes)");return{type:3,buffer:T9.concat([T9.from([e.length]),e])}}a(Z9o,"parseAddress");function yyn(t){let e=T9.alloc(16),r=t.split(":"),n=0,o=0,s=t.indexOf("::");if(s!==-1){let l=8-r.filter(u=>u.length>0).length;for(let u=0;u{"use strict";f();var{EventEmitter:n7o}=require("node:events"),{Buffer:IV}=require("node:buffer"),{InvalidArgumentError:fve,Socks5ProxyError:S9}=Ni(),{debuglog:i7o}=require("node:util"),{parseAddress:o7o}=_yn(),lO=i7o("undici:socks5"),QWe=5,lse={NO_AUTH:0,GSSAPI:1,USERNAME_PASSWORD:2,NO_ACCEPTABLE:255},Cyn={CONNECT:1,BIND:2,UDP_ASSOCIATE:3},xV={IPV4:1,DOMAIN:3,IPV6:4},p5={SUCCEEDED:0,GENERAL_FAILURE:1,CONNECTION_NOT_ALLOWED:2,NETWORK_UNREACHABLE:3,HOST_UNREACHABLE:4,CONNECTION_REFUSED:5,TTL_EXPIRED:6,COMMAND_NOT_SUPPORTED:7,ADDRESS_TYPE_NOT_SUPPORTED:8},yv={INITIAL:"initial",HANDSHAKING:"handshaking",AUTHENTICATING:"authenticating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error",CLOSED:"closed"},bqt=class extends n7o{static{a(this,"Socks5Client")}constructor(e,r={}){if(super(),!e)throw new fve("socket is required");this.socket=e,this.options=r,this.state=yv.INITIAL,this.buffer=IV.alloc(0),this.authMethods=[],r.username&&r.password&&this.authMethods.push(lse.USERNAME_PASSWORD),this.authMethods.push(lse.NO_AUTH),this.socket.on("data",this.onData.bind(this)),this.socket.on("error",this.onError.bind(this)),this.socket.on("close",this.onClose.bind(this))}onData(e){lO("received data",e.length,"bytes in state",this.state),this.buffer=IV.concat([this.buffer,e]);try{switch(this.state){case yv.HANDSHAKING:this.handleHandshakeResponse();break;case yv.AUTHENTICATING:this.handleAuthResponse();break;case yv.CONNECTING:this.handleConnectResponse();break}}catch(r){this.onError(r)}}onError(e){lO("socket error",e),this.state=yv.ERROR,this.emit("error",e),this.destroy()}onClose(){lO("socket closed"),this.state=yv.CLOSED,this.emit("close")}destroy(){this.socket&&!this.socket.destroyed&&this.socket.destroy()}handshake(){if(this.state!==yv.INITIAL)throw new fve("Handshake already started");lO("starting handshake with",this.authMethods.length,"auth methods"),this.state=yv.HANDSHAKING;let e=IV.alloc(2+this.authMethods.length);e[0]=QWe,e[1]=this.authMethods.length,this.authMethods.forEach((r,n)=>{e[2+n]=r}),this.socket.write(e)}handleHandshakeResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==QWe)throw new S9(`Invalid SOCKS version: ${e}`,"UND_ERR_SOCKS5_VERSION");if(r===lse.NO_ACCEPTABLE)throw new S9("No acceptable authentication method","UND_ERR_SOCKS5_AUTH_REJECTED");if(this.buffer=this.buffer.subarray(2),lO("server selected auth method",r),r===lse.NO_AUTH)this.emit("authenticated");else if(r===lse.USERNAME_PASSWORD)this.state=yv.AUTHENTICATING,this.sendAuthRequest();else throw new S9(`Unsupported authentication method: ${r}`,"UND_ERR_SOCKS5_AUTH_METHOD")}sendAuthRequest(){let{username:e,password:r}=this.options;if(!e||!r)throw new fve("Username and password required for authentication");lO("sending username/password auth");let n=IV.from(e),o=IV.from(r);if(n.length>255||o.length>255)throw new fve("Username or password too long");let s=IV.alloc(3+n.length+o.length);s[0]=1,s[1]=n.length,n.copy(s,2),s[2+n.length]=o.length,o.copy(s,3+n.length),this.socket.write(s)}handleAuthResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],r=this.buffer[1];if(e!==1)throw new S9(`Invalid auth sub-negotiation version: ${e}`,"UND_ERR_SOCKS5_AUTH_VERSION");if(r!==0)throw new S9("Authentication failed","UND_ERR_SOCKS5_AUTH_FAILED");this.buffer=this.buffer.subarray(2),lO("authentication successful"),this.emit("authenticated")}connect(e,r){if(this.state===yv.CONNECTED)throw new fve("Already connected");lO("connecting to",e,r),this.state=yv.CONNECTING;let n=this.buildConnectRequest(Cyn.CONNECT,e,r);this.socket.write(n)}buildConnectRequest(e,r,n){let{type:o,buffer:s}=o7o(r),c=IV.alloc(4+s.length+2);return c[0]=QWe,c[1]=e,c[2]=0,c[3]=o,s.copy(c,4),c.writeUInt16BE(n,4+s.length),c}handleConnectResponse(){if(this.buffer.length<4)return;let e=this.buffer[0],r=this.buffer[1],n=this.buffer[3];if(e!==QWe)throw new S9(`Invalid SOCKS version in reply: ${e}`,"UND_ERR_SOCKS5_REPLY_VERSION");let o=4;if(n===xV.IPV4)o+=6;else if(n===xV.DOMAIN){if(this.buffer.length<5)return;o+=1+this.buffer[4]+2}else if(n===xV.IPV6)o+=18;else throw new S9(`Invalid address type in reply: ${n}`,"UND_ERR_SOCKS5_ADDR_TYPE");if(this.buffer.length{"use strict";f();var s7o=require("node:net"),{URL:Tyn}=require("node:url"),Tqt,a7o=hV(),{InvalidArgumentError:Syn}=Ni(),{Socks5Client:c7o}=byn(),{kDispatch:Iyn,kClose:l7o,kDestroy:u7o}=rc(),d7o=vV(),f7o=mV(),{debuglog:p7o}=require("node:util"),I9=p7o("undici:socks5-proxy"),Sqt=Symbol("proxy url"),h7o=Symbol("proxy headers"),xyn=Symbol("proxy auth"),h5=Symbol("pool"),m7o=Symbol("connector"),wyn=!1,Iqt=class extends a7o{static{a(this,"Socks5ProxyAgent")}constructor(e,r={}){if(super(),wyn||(process.emitWarning("SOCKS5 proxy support is experimental and subject to change","ExperimentalWarning"),wyn=!0),!e)throw new Syn("Proxy URL is mandatory");let n=typeof e=="string"?new Tyn(e):e;if(n.protocol!=="socks5:"&&n.protocol!=="socks:")throw new Syn("Proxy URL must use socks5:// or socks:// protocol");this[Sqt]=n,this[h7o]=r.headers||{},this[xyn]={username:r.username||(n.username?decodeURIComponent(n.username):null),password:r.password||(n.password?decodeURIComponent(n.password):null)},this[m7o]=r.connect||f7o({...r.proxyTls,servername:r.proxyTls?.servername||n.hostname}),this[h5]=null}async createSocks5Connection(e,r){let n=this[Sqt].hostname,o=parseInt(this[Sqt].port)||1080;I9("creating SOCKS5 connection to",n,o);let s=await new Promise((l,u)=>{let d=a(()=>{h.removeListener("error",p),l(h)},"onConnect"),p=a(m=>{h.removeListener("connect",d),u(m)},"onError"),h=s7o.connect({host:n,port:o});h.once("connect",d),h.once("error",p)}),c=new c7o(s,this[xyn]);return c.on("error",l=>{I9("SOCKS5 error:",l),s.destroy()}),await c.handshake(),await new Promise((l,u)=>{let d=setTimeout(()=>{u(new Error("SOCKS5 authentication timeout"))},5e3),p=a(()=>{clearTimeout(d),c.removeListener("error",h),l()},"onAuthenticated"),h=a(m=>{clearTimeout(d),c.removeListener("authenticated",p),u(m)},"onError");c.state==="authenticated"?(clearTimeout(d),l()):(c.once("authenticated",p),c.once("error",h))}),await c.connect(e,r),await new Promise((l,u)=>{let d=setTimeout(()=>{u(new Error("SOCKS5 connection timeout"))},5e3),p=a(m=>{I9("SOCKS5 tunnel established to",e,r,"via",m),clearTimeout(d),c.removeListener("error",h),l()},"onConnected"),h=a(m=>{clearTimeout(d),c.removeListener("connected",p),u(m)},"onError");c.once("connected",p),c.once("error",h)}),s}async[Iyn](e,r){let{origin:n}=e;I9("dispatching request to",n,"via SOCKS5");try{return(!this[h5]||this[h5].destroyed||this[h5].closed)&&(this[h5]=new d7o(n,{pipelining:e.pipelining,connections:e.connections,connect:a(async(o,s)=>{try{let c=new Tyn(n),l=c.hostname,u=parseInt(c.port)||(c.protocol==="https:"?443:80);I9("establishing SOCKS5 connection to",l,u);let d=await this.createSocks5Connection(l,u),p=d;c.protocol==="https:"&&(Tqt||(Tqt=require("node:tls")),I9("upgrading to TLS"),p=Tqt.connect({socket:d,servername:l,...o.tls||{}}),await new Promise((h,m)=>{p.once("secureConnect",h),p.once("error",m)})),s(null,p)}catch(c){I9("SOCKS5 connection error:",c),s(c)}},"connect")})),this[h5][Iyn](e,r)}catch(o){if(I9("dispatch error:",o),typeof r.onError=="function")r.onError(o);else throw o}}async[l7o](){this[h5]&&await this[h5].close()}async[u7o](e){this[h5]&&await this[h5].destroy(e)}};Ryn.exports=Iqt});var kqt=T((o9u,qyn)=>{"use strict";f();var{kProxy:use,kClose:Byn,kDestroy:Lyn,kDispatch:Pyn}=rc(),g7o=SV(),Fyn=vV(),Uyn=hV(),{InvalidArgumentError:wV,RequestAbortedError:A7o,SecureProxyConnectionError:y7o}=Ni(),kyn=mV(),Qyn=v9(),{channels:Dyn}=f9(),E7o=xqt(),qWe=Symbol("proxy agent"),x9=Symbol("proxy client"),uO=Symbol("proxy headers"),wqt=Symbol("request tls settings"),Nyn=Symbol("proxy tls settings"),Myn=Symbol("connect endpoint function"),Oyn=Symbol("tunnel proxy");function _7o(t){return t==="https:"?443:80}a(_7o,"defaultProtocolPort");function C7o(t,e){return new Fyn(t,e)}a(C7o,"defaultFactory");var v7o=a(()=>{},"noop");function b7o(t,e){return e.connections===1?new Qyn(t,e):new Fyn(t,e)}a(b7o,"defaultAgentFactory");var Rqt=class extends Uyn{static{a(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:o}){if(!e)throw new wV("Proxy URL is mandatory");super(),this[uO]=r,o?this.#e=o(e,{connect:n}):this.#e=new Qyn(e,{connect:n})}[Pyn](e,r){let n=r.onHeaders;r.onHeaders=function(l,u,d){if(l===407){typeof r.onError=="function"&&r.onError(new wV("Proxy Authentication Required (407)"));return}n&&n.call(this,l,u,d)};let{origin:o,path:s="/",headers:c={}}=e;if(e.path=o+s,!("host"in c)&&!("Host"in c)){let{host:l}=new URL(o);c.host=l}return e.headers={...this[uO],...c},this.#e[Pyn](e,r)}[Byn](){return this.#e.close()}[Lyn](e){return this.#e.destroy(e)}},Pqt=class extends Uyn{static{a(this,"ProxyAgent")}constructor(e){if(!e||typeof e=="object"&&!(e instanceof URL)&&!e.uri)throw new wV("Proxy uri is mandatory");let{clientFactory:r=C7o}=e;if(typeof r!="function")throw new wV("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e;super();let o=this.#e(e),{href:s,origin:c,port:l,protocol:u,username:d,password:p,hostname:h}=o;if(this[use]={uri:s,protocol:u},this[wqt]=e.requestTls,this[Nyn]=e.proxyTls,this[uO]=e.headers||{},this[Oyn]=n,e.auth&&e.token)throw new wV("opts.auth cannot be used in combination with opts.token");e.auth?this[uO]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[uO]["proxy-authorization"]=e.token:d&&p&&(this[uO]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(d)}:${decodeURIComponent(p)}`).toString("base64")}`);let m=kyn({...e.proxyTls});this[Myn]=kyn({...e.requestTls});let g=e.factory||b7o,A=a((y,E)=>{let{protocol:_}=new URL(y);return this[use].protocol==="socks5:"||this[use].protocol==="socks:"?new E7o(this[use].uri,{headers:this[uO],connect:m,factory:g,username:e.username||d,password:e.password||p,proxyTls:e.proxyTls}):!this[Oyn]&&_==="http:"&&this[use].protocol==="http:"?new Rqt(this[use].uri,{headers:this[uO],connect:m,factory:g}):g(y,E)},"factory");u==="socks5:"||u==="socks:"?this[x9]=null:this[x9]=r(o,{connect:m}),this[qWe]=new g7o({...e,factory:A,connect:a(async(y,E)=>{if(!this[x9]){E(new wV("Cannot establish tunnel connection without a proxy client"));return}let _=y.host;y.port||(_+=`:${_7o(y.protocol)}`);try{let v={origin:c,port:l,path:_,signal:y.signal,headers:{...this[uO],host:y.host,...y.connections==null||y.connections>0?{"proxy-connection":"keep-alive"}:{}},servername:this[Nyn]?.servername||h},{socket:b,statusCode:I}=await this[x9].connect(v);if(I!==200){b.on("error",v7o).destroy(),E(new A7o(`Proxy response (${I}) !== 200 when HTTP Tunneling`));return}if(Dyn.proxyConnected.hasSubscribers&&Dyn.proxyConnected.publish({socket:b,connectParams:v}),y.protocol!=="https:"){E(null,b);return}let x;this[wqt]?x=this[wqt].servername:x=y.servername,this[Myn]({...y,servername:x,httpSocket:b},E)}catch(v){v.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new y7o(v)):E(v)}},"connect")})}dispatch(e,r){let n=T7o(e.headers);if(S7o(n),n&&!("host"in n)&&!("Host"in n)){let{host:o}=new URL(e.origin);n.host=o}return this[qWe].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new URL(e):e instanceof URL?e:new URL(e.uri)}[Byn](){let e=[this[qWe].close()];return this[x9]&&e.push(this[x9].close()),Promise.all(e)}[Lyn](){let e=[this[qWe].destroy()];return this[x9]&&e.push(this[x9].destroy()),Promise.all(e)}};function T7o(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new wV("Proxy-Authorization should be sent in ProxyAgent constructor")}a(S7o,"throwIfProxyAuthIsSent");qyn.exports=Pqt});var Vyn=T((c9u,$yn)=>{"use strict";f();var I7o=hV(),{kClose:x7o,kDestroy:w7o,kClosed:Gyn,kDestroyed:Hyn,kDispatch:R7o,kNoProxyAgent:pve,kHttpProxyAgent:w9,kHttpsProxyAgent:RV}=rc(),jyn=kqt(),P7o=SV(),k7o={"http:":80,"https:":443},Dqt=class extends I7o{static{a(this,"EnvHttpProxyAgent")}#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e;let{httpProxy:r,httpsProxy:n,noProxy:o,...s}=e;this[pve]=new P7o(s);let c=r??process.env.http_proxy??process.env.HTTP_PROXY;c?this[w9]=new jyn({...s,uri:c}):this[w9]=this[pve];let l=n??process.env.https_proxy??process.env.HTTPS_PROXY;l?this[RV]=new jyn({...s,uri:l}):this[RV]=this[w9],this.#o()}[R7o](e,r){let n=new URL(e.origin);return this.#r(n).dispatch(e,r)}[x7o](){return Promise.all([this[pve].close(),!this[w9][Gyn]&&this[w9].close(),!this[RV][Gyn]&&this[RV].close()])}[w7o](e){return Promise.all([this[pve].destroy(e),!this[w9][Hyn]&&this[w9].destroy(e),!this[RV][Hyn]&&this[RV].destroy(e)])}#r(e){let{protocol:r,host:n,port:o}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),o=Number.parseInt(o,10)||k7o[r]||0,this.#i(n,o)?r==="https:"?this[RV]:this[w9]:this[pve]}#i(e,r){if(this.#a&&this.#o(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";f();var dse=require("node:assert"),{kRetryHandlerDefaultRetry:Wyn}=rc(),{RequestRetryError:hve}=Ni(),D7o=B1e(),{isDisturbed:zyn,parseRangeHeader:Yyn,wrapRequestBody:N7o}=Ki();function M7o(t){let e=new Date(t).getTime();return isNaN(e)?0:e-Date.now()}a(M7o,"calculateRetryAfterHeader");var Nqt=class t{static{a(this,"RetryHandler")}constructor(e,{dispatch:r,handler:n}){let{retryOptions:o,...s}=e,{retry:c,maxRetries:l,maxTimeout:u,minTimeout:d,timeoutFactor:p,methods:h,errorCodes:m,retryAfter:g,statusCodes:A,throwOnError:y}=o??{};this.error=null,this.dispatch=r,this.handler=D7o.wrap(n),this.opts={...s,body:N7o(e.body)},this.retryOpts={throwOnError:y??!0,retry:c??t[Wyn],retryAfter:g??!0,maxTimeout:u??30*1e3,minTimeout:d??500,timeoutFactor:p??2,maxRetries:l??5,methods:h??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:A??[500,502,503,504,429],errorCodes:m??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.headersSent=!1,this.start=0,this.end=null,this.etag=null}onResponseStartWithRetry(e,r,n,o,s){if(this.retryOpts.throwOnError){this.retryOpts.statusCodes.includes(r)===!1?(this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o)):this.error=s;return}if(zyn(this.opts.body)){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o);return}function c(l){if(l){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o),e.resume();return}this.error=s,e.resume()}a(c,"shouldRetry"),e.pause(),this.retryOpts.retry(s,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},c.bind(this))}onRequestStart(e,r){this.headersSent||this.handler.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.handler.onRequestUpgrade?.(e,r,n,o)}static[Wyn](e,{state:r,opts:n},o){let{statusCode:s,code:c,headers:l}=e,{method:u,retryOptions:d}=n,{maxRetries:p,minTimeout:h,maxTimeout:m,timeoutFactor:g,statusCodes:A,errorCodes:y,methods:E}=d,{counter:_}=r;if(c&&c!=="UND_ERR_REQ_RETRY"&&!y.includes(c)){o(e);return}if(Array.isArray(E)&&!E.includes(u)){o(e);return}if(s!=null&&Array.isArray(A)&&!A.includes(s)){o(e);return}if(_>p){o(e);return}let v=l?.["retry-after"];v&&(v=Number(v),v=Number.isNaN(v)?M7o(l["retry-after"]):v*1e3);let b=v>0?Math.min(v,m):Math.min(h*g**(_-1),m);setTimeout(()=>o(null),b)}onResponseStart(e,r,n,o){if(this.error=null,this.retryCount+=1,r>=300){let s=new hve("Request failed",r,{headers:n,data:{count:this.retryCount}});this.onResponseStartWithRetry(e,r,n,o,s);return}if(this.headersSent){if(r!==206&&(this.start>0||r!==200))throw new hve("server does not support the range header and the payload was partially consumed",r,{headers:n,data:{count:this.retryCount}});let s=Yyn(n["content-range"]);if(!s)throw new hve("Content-Range mismatch",r,{headers:n,data:{count:this.retryCount}});if(this.etag!=null&&this.etag!==n.etag)throw new hve("ETag mismatch",r,{headers:n,data:{count:this.retryCount}});let{start:c,size:l,end:u=l?l-1:null}=s;dse(this.start===c,"content-range mismatch"),dse(this.end==null||this.end===u,"content-range mismatch");return}if(this.end==null){if(r===206){let s=Yyn(n["content-range"]);if(s==null){this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o);return}let{start:c,size:l,end:u=l?l-1:null}=s;dse(c!=null&&Number.isFinite(c),"content-range mismatch"),dse(u!=null&&Number.isFinite(u),"invalid content-length"),this.start=c,this.end=u}if(this.end==null){let s=n["content-length"];this.end=s!=null?Number(s)-1:null}dse(Number.isFinite(this.start)),dse(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=!0,this.etag=n.etag!=null?n.etag:null,this.etag!=null&&this.etag[0]==="W"&&this.etag[1]==="/"&&(this.etag=null),this.headersSent=!0,this.handler.onResponseStart?.(e,r,n,o)}else throw new hve("Request failed",r,{headers:n,data:{count:this.retryCount}})}onResponseData(e,r){this.error||(this.start+=r.length,this.handler.onResponseData?.(e,r))}onResponseEnd(e,r){if(this.error&&this.retryOpts.throwOnError)throw this.error;if(!this.error)return this.retryCount=0,this.handler.onResponseEnd?.(e,r);this.retry(e)}retry(e){if(this.start!==0){let r={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(r["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...r}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(r){this.handler.onResponseError?.(e,r)}}onResponseError(e,r){if(e?.aborted||zyn(this.opts.body)){this.handler.onResponseError?.(e,r);return}function n(o){if(!o){this.retry(e);return}this.handler?.onResponseError?.(e,o)}a(n,"shouldRetry"),this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(r,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},n.bind(this))}};Kyn.exports=Nqt});var Xyn=T((h9u,Jyn)=>{"use strict";f();var O7o=L1e(),B7o=GWe(),Mqt=class extends O7o{static{a(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new B7o({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};Jyn.exports=Mqt});var tEn=T((A9u,eEn)=>{"use strict";f();var{InvalidArgumentError:Zyn}=Ni(),L7o=v9(),Oqt=class extends L7o{static{a(this,"H2CClient")}constructor(e,r){if(typeof e=="string"&&(e=new URL(e)),e.protocol!=="http:")throw new Zyn("h2c-client: Only h2c protocol is supported");let{connect:n,maxConcurrentStreams:o,pipelining:s,...c}=r??{},l=100,u=100;if(o!=null&&Number.isInteger(o)&&o>0&&(l=o),s!=null&&Number.isInteger(s)&&s>0&&(u=s),u>l)throw new Zyn("h2c-client: pipelining cannot be greater than maxConcurrentStreams");super(e,{...c,maxConcurrentStreams:l,pipelining:u,allowH2:!0,useH2c:!0})}};eEn.exports=Oqt});var uEn=T((_9u,lEn)=>{"use strict";f();var oEn=require("node:assert"),{Readable:F7o}=require("node:stream"),{RequestAbortedError:sEn,NotSupportedError:U7o,InvalidArgumentError:Q7o,AbortError:HWe}=Ni(),aEn=Ki(),{ReadableStreamFrom:q7o}=Ki(),Ev=Symbol("kConsume"),jWe=Symbol("kReading"),PV=Symbol("kBody"),rEn=Symbol("kAbort"),cEn=Symbol("kContentType"),Bqt=Symbol("kContentLength"),Lqt=Symbol("kUsed"),$We=Symbol("kBytesRead"),G7o=a(()=>{},"noop"),Fqt=class extends F7o{static{a(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:o,highWaterMark:s=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:s}),this._readableState.dataEmitted=!1,this[rEn]=r,this[Ev]=null,this[$We]=0,this[PV]=null,this[Lqt]=!1,this[cEn]=n,this[Bqt]=Number.isFinite(o)?o:null,this[jWe]=!1}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new sEn),e&&this[rEn](),this[Lqt]?r(e):setImmediate(r,e)}on(e,r){return(e==="data"||e==="readable")&&(this[jWe]=!0,this[Lqt]=!0),super.on(e,r)}addListener(e,r){return this.on(e,r)}off(e,r){let n=super.off(e,r);return(e==="data"||e==="readable")&&(this[jWe]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,r){return this.off(e,r)}push(e){return e&&(this[$We]+=e.length,this[Ev])?(Qqt(this[Ev],e),this[jWe]?super.push(e):!0):super.push(e)}text(){return mve(this,"text")}json(){return mve(this,"json")}blob(){return mve(this,"blob")}bytes(){return mve(this,"bytes")}arrayBuffer(){return mve(this,"arrayBuffer")}async formData(){throw new U7o}get bodyUsed(){return aEn.isDisturbed(this)}get body(){return this[PV]||(this[PV]=q7o(this),this[Ev]&&(this[PV].getReader(),oEn(this[PV].locked))),this[PV]}dump(e){let r=e?.signal;if(r!=null&&(typeof r!="object"||!("aborted"in r)))return Promise.reject(new Q7o("signal must be an AbortSignal"));let n=e?.limit&&Number.isFinite(e.limit)?e.limit:128*1024;return r?.aborted?Promise.reject(r.reason??new HWe):this._readableState.closeEmitted?Promise.resolve(null):new Promise((o,s)=>{if((this[Bqt]&&this[Bqt]>n||this[$We]>n)&&this.destroy(new HWe),r){let c=a(()=>{this.destroy(r.reason??new HWe)},"onAbort");r.addEventListener("abort",c),this.on("close",function(){r.removeEventListener("abort",c),r.aborted?s(r.reason??new HWe):o(null)})}else this.on("close",o);this.on("error",G7o).on("data",()=>{this[$We]>n&&this.destroy()}).resume()})}setEncoding(e){return Buffer.isEncoding(e)&&(this._readableState.encoding=e),this}};function H7o(t){return t[PV]?.locked===!0||t[Ev]!==null}a(H7o,"isLocked");function j7o(t){return aEn.isDisturbed(t)||H7o(t)}a(j7o,"isUnusable");function mve(t,e){return oEn(!t[Ev]),new Promise((r,n)=>{if(j7o(t)){let o=t._readableState;o.destroyed&&o.closeEmitted===!1?t.on("error",n).on("close",()=>{n(new TypeError("unusable"))}):n(o.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[Ev]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(o){qqt(this[Ev],o)}).on("close",function(){this[Ev].body!==null&&qqt(this[Ev],new sEn)}),$7o(t[Ev])})})}a(mve,"consume");function $7o(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let o=r;o2&&n[0]===239&&n[1]===187&&n[2]===191?3:0;return!r||r==="utf8"||r==="utf-8"?n.utf8Slice(s,o):n.subarray(s,o).toString(r)}a(Uqt,"chunksDecode");function nEn(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let o=0;o{"use strict";f();var V7o=require("node:assert"),{AsyncResource:W7o}=require("node:async_hooks"),{Readable:z7o}=uEn(),{InvalidArgumentError:fse,RequestAbortedError:dEn}=Ni(),pS=Ki();function gve(){}a(gve,"noop");var VWe=class extends W7o{static{a(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new fse("invalid opts");let{signal:n,method:o,opaque:s,body:c,onInfo:l,responseHeaders:u,highWaterMark:d}=e;try{if(typeof r!="function")throw new fse("invalid callback");if(d&&(typeof d!="number"||d<0))throw new fse("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new fse("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new fse("invalid method");if(l&&typeof l!="function")throw new fse("invalid onInfo callback");super("UNDICI_REQUEST")}catch(p){throw pS.isStream(c)&&pS.destroy(c.on("error",gve),p),p}this.method=o,this.responseHeaders=u||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.highWaterMark=d,this.reason=null,this.removeAbortListener=null,n?.aborted?this.reason=n.reason??new dEn:n&&(this.removeAbortListener=pS.addAbortListener(n,()=>{this.reason=n.reason??new dEn,this.res?pS.destroy(this.res.on("error",gve),this.reason):this.abort&&this.abort(this.reason)}))}onConnect(e,r){if(this.reason){e(this.reason);return}V7o(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{callback:s,opaque:c,abort:l,context:u,responseHeaders:d,highWaterMark:p}=this,h=d==="raw"?pS.parseRawHeaders(r):pS.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:h});return}let m=d==="raw"?pS.parseHeaders(r):h,g=m["content-type"],A=m["content-length"],y=new z7o({resume:n,abort:l,contentType:g,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:p});if(this.removeAbortListener&&(y.on("close",this.removeAbortListener),this.removeAbortListener=null),this.callback=null,this.res=y,s!==null)try{this.runInAsyncScope(s,null,null,{statusCode:e,statusText:o,headers:h,trailers:this.trailers,opaque:c,body:y,context:u})}catch(E){this.res=null,pS.destroy(y.on("error",gve),E),queueMicrotask(()=>{throw E})}}onData(e){return this.res.push(e)}onComplete(e){pS.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:o,opaque:s}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{pS.destroy(r.on("error",gve),e)})),o&&(this.body=null,pS.isStream(o)&&(o.on("error",gve),pS.destroy(o,e))),this.removeAbortListener&&(this.removeAbortListener(),this.removeAbortListener=null)}};function fEn(t,e){if(e===void 0)return new Promise((r,n)=>{fEn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new VWe(t,e);this.dispatch(t,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(fEn,"request");Gqt.exports=fEn;Gqt.exports.RequestHandler=VWe});var Ave=T((I9u,gEn)=>{"use strict";f();var{addAbortListener:Y7o}=Ki(),{RequestAbortedError:K7o}=Ni(),pse=Symbol("kListener"),m5=Symbol("kSignal");function hEn(t){t.abort?t.abort(t[m5]?.reason):t.reason=t[m5]?.reason??new K7o,mEn(t)}a(hEn,"abort");function J7o(t,e){if(t.reason=null,t[m5]=null,t[pse]=null,!!e){if(e.aborted){hEn(t);return}t[m5]=e,t[pse]=()=>{hEn(t)},Y7o(t[m5],t[pse])}}a(J7o,"addSignal");function mEn(t){t[m5]&&("removeEventListener"in t[m5]?t[m5].removeEventListener("abort",t[pse]):t[m5].removeListener("abort",t[pse]),t[m5]=null,t[pse]=null)}a(mEn,"removeSignal");gEn.exports={addSignal:J7o,removeSignal:mEn}});var _En=T((R9u,EEn)=>{"use strict";f();var X7o=require("node:assert"),{finished:Z7o}=require("node:stream"),{AsyncResource:eUo}=require("node:async_hooks"),{InvalidArgumentError:hse,InvalidReturnValueError:tUo}=Ni(),dO=Ki(),{addSignal:rUo,removeSignal:AEn}=Ave();function nUo(){}a(nUo,"noop");var Hqt=class extends eUo{static{a(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new hse("invalid opts");let{signal:o,method:s,opaque:c,body:l,onInfo:u,responseHeaders:d}=e;try{if(typeof n!="function")throw new hse("invalid callback");if(typeof r!="function")throw new hse("invalid factory");if(o&&typeof o.on!="function"&&typeof o.addEventListener!="function")throw new hse("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new hse("invalid method");if(u&&typeof u!="function")throw new hse("invalid onInfo callback");super("UNDICI_STREAM")}catch(p){throw dO.isStream(l)&&dO.destroy(l.on("error",nUo),p),p}this.responseHeaders=d||null,this.opaque=c||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=l,this.onInfo=u||null,dO.isStream(l)&&l.on("error",p=>{this.onError(p)}),rUo(this,o)}onConnect(e,r){if(this.reason){e(this.reason);return}X7o(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,o){let{factory:s,opaque:c,context:l,responseHeaders:u}=this,d=u==="raw"?dO.parseRawHeaders(r):dO.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:d});return}if(this.factory=null,s===null)return;let p=this.runInAsyncScope(s,null,{statusCode:e,headers:d,opaque:c,context:l});if(!p||typeof p.write!="function"||typeof p.end!="function"||typeof p.on!="function")throw new tUo("expected Writable");return Z7o(p,{readable:!1},m=>{let{callback:g,res:A,opaque:y,trailers:E,abort:_}=this;this.res=null,(m||!A?.readable)&&dO.destroy(A,m),this.callback=null,this.runInAsyncScope(g,null,m||null,{opaque:y,trailers:E}),m&&_()}),p.on("drain",n),this.res=p,(p.writableNeedDrain!==void 0?p.writableNeedDrain:p._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;AEn(this),r&&(this.trailers=dO.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:o,body:s}=this;AEn(this),this.factory=null,r?(this.res=null,dO.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),s&&(this.body=null,dO.destroy(s,e))}};function yEn(t,e,r){if(r===void 0)return new Promise((n,o)=>{yEn.call(this,t,e,(s,c)=>s?o(s):n(c))});try{let n=new Hqt(t,e,r);this.dispatch(t,n)}catch(n){if(typeof r!="function")throw n;let o=t?.opaque;queueMicrotask(()=>r(n,{opaque:o}))}}a(yEn,"stream");EEn.exports=yEn});var TEn=T((D9u,bEn)=>{"use strict";f();var{Readable:vEn,Duplex:iUo,PassThrough:oUo}=require("node:stream"),sUo=require("node:assert"),{AsyncResource:aUo}=require("node:async_hooks"),{InvalidArgumentError:yve,InvalidReturnValueError:cUo,RequestAbortedError:jqt}=Ni(),g5=Ki(),{addSignal:lUo,removeSignal:uUo}=Ave();function CEn(){}a(CEn,"noop");var mse=Symbol("resume"),$qt=class extends vEn{static{a(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[mse]=null}_read(){let{[mse]:e}=this;e&&(this[mse]=null,e())}_destroy(e,r){this._read(),r(e)}},Vqt=class extends vEn{static{a(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[mse]=e}_read(){this[mse]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new jqt),r(e)}},Wqt=class extends aUo{static{a(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new yve("invalid opts");if(typeof r!="function")throw new yve("invalid handler");let{signal:n,method:o,opaque:s,onInfo:c,responseHeaders:l}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new yve("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new yve("invalid method");if(c&&typeof c!="function")throw new yve("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=l||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=c||null,this.req=new $qt().on("error",CEn),this.ret=new iUo({readableObjectMode:e.objectMode,autoDestroy:!0,read:a(()=>{let{body:u}=this;u?.resume&&u.resume()},"read"),write:a((u,d,p)=>{let{req:h}=this;h.push(u,d)||h._readableState.destroyed?p():h[mse]=p},"write"),destroy:a((u,d)=>{let{body:p,req:h,res:m,ret:g,abort:A}=this;!u&&!g._readableState.endEmitted&&(u=new jqt),A&&u&&A(),g5.destroy(p,u),g5.destroy(h,u),g5.destroy(m,u),uUo(this),d(u)},"destroy")}).on("prefinish",()=>{let{req:u}=this;u.push(null)}),this.res=null,lUo(this,n)}onConnect(e,r){let{res:n}=this;if(this.reason){e(this.reason);return}sUo(!n,"pipeline cannot be retried"),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:o,handler:s,context:c}=this;if(e<200){if(this.onInfo){let u=this.responseHeaders==="raw"?g5.parseRawHeaders(r):g5.parseHeaders(r);this.onInfo({statusCode:e,headers:u})}return}this.res=new Vqt(n);let l;try{this.handler=null;let u=this.responseHeaders==="raw"?g5.parseRawHeaders(r):g5.parseHeaders(r);l=this.runInAsyncScope(s,null,{statusCode:e,headers:u,opaque:o,body:this.res,context:c})}catch(u){throw this.res.on("error",CEn),u}if(!l||typeof l.on!="function")throw new cUo("expected Readable");l.on("data",u=>{let{ret:d,body:p}=this;!d.push(u)&&p.pause&&p.pause()}).on("error",u=>{let{ret:d}=this;g5.destroy(d,u)}).on("end",()=>{let{ret:u}=this;u.push(null)}).on("close",()=>{let{ret:u}=this;u._readableState.ended||g5.destroy(u,new jqt)}),this.body=l}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,g5.destroy(r,e)}};function dUo(t,e){try{let r=new Wqt(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new oUo().destroy(r)}}a(dUo,"pipeline");bEn.exports=dUo});var PEn=T((O9u,REn)=>{"use strict";f();var{InvalidArgumentError:zqt,SocketError:fUo}=Ni(),{AsyncResource:pUo}=require("node:async_hooks"),SEn=require("node:assert"),IEn=Ki(),{kHTTP2Stream:hUo}=rc(),{addSignal:mUo,removeSignal:xEn}=Ave(),Yqt=class extends pUo{static{a(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new zqt("invalid opts");if(typeof r!="function")throw new zqt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new zqt("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=o||null,this.callback=r,this.abort=null,this.context=null,mUo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}SEn(this.callback),this.abort=e,this.context=null}onHeaders(){throw new fUo("bad upgrade",null)}onUpgrade(e,r,n){SEn(n[hUo]===!0?e===200:e===101);let{callback:o,opaque:s,context:c}=this;xEn(this),this.callback=null;let l=this.responseHeaders==="raw"?IEn.parseRawHeaders(r):IEn.parseHeaders(r);this.runInAsyncScope(o,null,null,{headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;xEn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function wEn(t,e){if(e===void 0)return new Promise((r,n)=>{wEn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new Yqt(t,e),n={...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(wEn,"upgrade");REn.exports=wEn});var OEn=T((F9u,MEn)=>{"use strict";f();var gUo=require("node:assert"),{AsyncResource:AUo}=require("node:async_hooks"),{InvalidArgumentError:Kqt,SocketError:yUo}=Ni(),kEn=Ki(),{addSignal:EUo,removeSignal:DEn}=Ave(),Jqt=class extends AUo{static{a(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new Kqt("invalid opts");if(typeof r!="function")throw new Kqt("invalid callback");let{signal:n,opaque:o,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Kqt("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=o||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,EUo(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}gUo(this.callback),this.abort=e,this.context=r}onHeaders(){throw new yUo("bad connect",null)}onUpgrade(e,r,n){let{callback:o,opaque:s,context:c}=this;DEn(this),this.callback=null;let l=r;l!=null&&(l=this.responseHeaders==="raw"?kEn.parseRawHeaders(r):kEn.parseHeaders(r)),this.runInAsyncScope(o,null,null,{statusCode:e,headers:l,socket:n,opaque:s,context:c})}onError(e){let{callback:r,opaque:n}=this;DEn(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function NEn(t,e){if(e===void 0)return new Promise((r,n)=>{NEn.call(this,t,(o,s)=>o?n(o):r(s))});try{let r=new Jqt(t,e),n={...t,method:"CONNECT"};this.dispatch(n,r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}a(NEn,"connect");MEn.exports=NEn});var BEn=T((q9u,gse)=>{"use strict";f();gse.exports.request=pEn();gse.exports.stream=_En();gse.exports.pipeline=TEn();gse.exports.upgrade=PEn();gse.exports.connect=OEn()});var Zqt=T((H9u,FEn)=>{"use strict";f();var{UndiciError:_Uo}=Ni(),LEn=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),Xqt=class extends _Uo{static{a(this,"MockNotMatchedError")}constructor(e){super(e),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[LEn]===!0}get[LEn](){return!0}};FEn.exports={MockNotMatchedError:Xqt}});var kV=T((V9u,UEn)=>{"use strict";f();UEn.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOriginalDispatch:Symbol("original dispatch"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected"),kIgnoreTrailingSlash:Symbol("ignore trailing slash"),kMockAgentMockCallHistoryInstance:Symbol("mock agent mock call history name"),kMockAgentRegisterCallHistory:Symbol("mock agent register mock call history"),kMockAgentAddCallHistoryLog:Symbol("mock agent add call history log"),kMockAgentIsCallHistoryEnabled:Symbol("mock agent is call history enabled"),kMockAgentAcceptsNonStandardSearchParameters:Symbol("mock agent accepts non standard search parameters"),kMockCallHistoryAddLog:Symbol("mock call history add log"),kTotalDispatchCount:Symbol("total dispatch count")}});var Eve=T((z9u,KEn)=>{"use strict";f();var{MockNotMatchedError:Ase}=Zqt(),{kDispatches:DV,kMockAgent:CUo,kOriginalDispatch:vUo,kOrigin:bUo,kGetNetConnect:TUo,kTotalDispatchCount:rGt}=kV(),{serializePathWithQuery:SUo}=Ki(),{STATUS_CODES:IUo}=require("node:http"),{types:{isPromise:xUo}}=require("node:util"),{InvalidArgumentError:eGt}=Ni();function A5(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}a(A5,"matchValue");function qEn(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}a(qEn,"lowerCaseEntries");function GEn(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let o=GEn(e,r);if(!A5(n,o))return!1}return!0}a(HEn,"matchHeaders");function wUo(t){if(typeof t!="string")return t;let e=new URLSearchParams(t),r=new URLSearchParams;for(let[n,o]of e.entries()){if(n=n.replace("[]",""),/^(['"]).*\1$/.test(o)){r.append(n,o);continue}if(o.includes(",")){let c=o.split(",");for(let l of c)r.append(n,l);continue}r.append(n,o)}return r}a(wUo,"normalizeSearchParams");function tGt(t){if(typeof t!="string")return t;let e=t.split("?",3);if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}a(tGt,"safeUrl");function RUo(t,{path:e,method:r,body:n,headers:o}){let s=A5(t.path,e),c=A5(t.method,r),l=typeof t.body<"u"?A5(t.body,n):!0,u=HEn(t,o);return s&&c&&l&&u}a(RUo,"matchKey");function jEn(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t?t.toString():""}a(jEn,"getResponseData");function $En(t,e){let r=e.query?SUo(e.path,e.query):e.path,n=typeof r=="string"?tGt(r):r,o=QEn(n),s=t.filter(({consumed:c})=>!c).filter(({path:c,ignoreTrailingSlash:l})=>l?A5(QEn(tGt(c)),o):A5(tGt(c),n));if(s.length===0)throw new Ase(`Mock dispatch not matched for path '${n}'`);if(s=s.filter(({method:c})=>A5(c,e.method)),s.length===0)throw new Ase(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(s=s.filter(({body:c})=>typeof c<"u"?A5(c,e.body):!0),s.length===0)throw new Ase(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(s=s.filter(c=>HEn(c,e.headers)),s.length===0){let c=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new Ase(`Mock dispatch not matched for headers '${c}' on path '${n}'`)}return s[0]}a($En,"getMockDispatch");function PUo(t,e,r,n){let o={timesInvoked:0,times:1,persist:!1,consumed:!1,...n},s=typeof r=="function"?{callback:r}:{...r},c={...o,...e,pending:!0,data:{error:null,...s}};return t.push(c),t[rGt]=(t[rGt]||0)+1,c}a(PUo,"addMockDispatch");function nGt(t,e){let r=t.findIndex(n=>n.consumed?RUo(n,e):!1);r!==-1&&t.splice(r,1)}a(nGt,"deleteMockDispatch");function QEn(t){for(;t.endsWith("/");)t=t.slice(0,-1);return t.length===0&&(t="/"),t}a(QEn,"removeTrailingSlash");function VEn(t){let{path:e,method:r,body:n,headers:o,query:s}=t;return{path:e,method:r,body:n,headers:o,query:s}}a(VEn,"buildKey");function iGt(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=h0?A=setTimeout(()=>{A=null,E(this[DV])},d):E(this[DV]);function E(v,b=s){if(g)return;let I=Array.isArray(t.headers)?oGt(t.headers):t.headers,x=typeof b=="function"?b({...t,headers:I}):b;if(xUo(x))return x.then(k=>E(v,k));if(g)return;let w=jEn(x),R=iGt(c),P=iGt(l);e.onHeaders?.(o,R,_,WEn(o)),e.onData?.(Buffer.from(w)),e.onComplete?.(P),nGt(v,r)}a(E,"handleReply");function _(){}return a(_,"resume"),!0}a(zEn,"mockDispatch");function DUo(){let t=this[CUo],e=this[bUo],r=this[vUo];return a(function(o,s){if(t.isMockActive)try{zEn.call(this,o,s)}catch(c){if(c.code==="UND_MOCK_ERR_MOCK_NOT_MATCHED"){let l=t[TUo](),u=this[DV][rGt]||this[DV].length,p=`, ${this[DV].filter(({consumed:h})=>!h).length} interceptor(s) remaining out of ${u} defined`;if(l===!1)throw new Ase(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)${p}`);if(YEn(l,e))r.call(this,o,s);else throw new Ase(`${c.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)${p}`)}else throw c}else r.call(this,o,s)},"dispatch")}a(DUo,"buildMockDispatch");function YEn(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>A5(n,r.host)))}a(YEn,"checkNetConnect");function NUo(t){return typeof t!="string"&&!(t instanceof URL)?t:t instanceof URL?t.origin:t.toLowerCase()}a(NUo,"normalizeOrigin");function MUo(t){let{agent:e,...r}=t;if("enableCallHistory"in r&&typeof r.enableCallHistory!="boolean")throw new eGt("options.enableCallHistory must to be a boolean");if("acceptNonStandardSearchParameters"in r&&typeof r.acceptNonStandardSearchParameters!="boolean")throw new eGt("options.acceptNonStandardSearchParameters must to be a boolean");if("ignoreTrailingSlash"in r&&typeof r.ignoreTrailingSlash!="boolean")throw new eGt("options.ignoreTrailingSlash must to be a boolean");return r}a(MUo,"buildAndValidateMockOptions");KEn.exports={getResponseData:jEn,getMockDispatch:$En,addMockDispatch:PUo,deleteMockDispatch:nGt,buildKey:VEn,generateKeyValues:iGt,matchValue:A5,getResponse:kUo,getStatusText:WEn,mockDispatch:zEn,buildMockDispatch:DUo,checkNetConnect:YEn,buildAndValidateMockOptions:MUo,getHeaderByName:GEn,buildHeadersFromArray:oGt,normalizeSearchParams:wUo,normalizeOrigin:NUo}});var fGt=T((J9u,dGt)=>{"use strict";f();var{getResponseData:OUo,buildKey:BUo,addMockDispatch:sGt}=Eve(),{kDispatches:WWe,kDispatchKey:zWe,kDefaultHeaders:aGt,kDefaultTrailers:cGt,kContentLength:lGt,kMockDispatch:YWe,kIgnoreTrailingSlash:KWe}=kV(),{InvalidArgumentError:y5}=Ni(),{serializePathWithQuery:LUo}=Ki(),yse=class{static{a(this,"MockScope")}constructor(e){this[YWe]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new y5("waitInMs must be a valid integer > 0");return this[YWe].delay=e,this}persist(){return this[YWe].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new y5("repeatTimes must be a valid integer > 0");return this[YWe].times=e,this}},uGt=class{static{a(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new y5("opts must be an object");if(typeof e.path>"u")throw new y5("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=LUo(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[zWe]=BUo(e),this[WWe]=r,this[KWe]=e.ignoreTrailingSlash??!1,this[aGt]={},this[cGt]={},this[lGt]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let o=OUo(r),s=this[lGt]?{"content-length":o.length}:{},c={...this[aGt],...s,...n.headers},l={...this[cGt],...n.trailers};return{statusCode:e,data:r,headers:c,trailers:l}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new y5("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new y5("responseOptions must be an object")}reply(e){if(typeof e=="function"){let s=a(l=>{let u=e(l);if(typeof u!="object"||u===null)throw new y5("reply options callback must return an object");let d={data:"",responseOptions:{},...u};return this.validateReplyParameters(d),{...this.createMockScopeDispatchData(d)}},"wrappedDefaultsCallback"),c=sGt(this[WWe],this[zWe],s,{ignoreTrailingSlash:this[KWe]});return new yse(c)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),o=sGt(this[WWe],this[zWe],n,{ignoreTrailingSlash:this[KWe]});return new yse(o)}replyWithError(e){if(typeof e>"u")throw new y5("error must be defined");let r=sGt(this[WWe],this[zWe],{error:e},{ignoreTrailingSlash:this[KWe]});return new yse(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new y5("headers must be defined");return this[aGt]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new y5("trailers must be defined");return this[cGt]=e,this}replyContentLength(){return this[lGt]=!0,this}};dGt.exports.MockInterceptor=uGt;dGt.exports.MockScope=yse});var gGt=T((e7u,n_n)=>{"use strict";f();var{promisify:FUo}=require("node:util"),UUo=v9(),{buildMockDispatch:QUo}=Eve(),{kDispatches:pGt,kMockAgent:JEn,kClose:XEn,kOriginalClose:ZEn,kOrigin:e_n,kOriginalDispatch:qUo,kConnected:hGt,kIgnoreTrailingSlash:t_n}=kV(),{MockInterceptor:GUo}=fGt(),r_n=rc(),{InvalidArgumentError:HUo}=Ni(),mGt=class extends UUo{static{a(this,"MockClient")}constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new HUo("Argument opts.agent must implement Agent");super(e,r),this[JEn]=r.agent,this[e_n]=e,this[t_n]=r.ignoreTrailingSlash??!1,this[pGt]=[],this[hGt]=1,this[qUo]=this.dispatch,this[ZEn]=this.close.bind(this),this.dispatch=QUo.call(this),this.close=this[XEn]}get[r_n.kConnected](){return this[hGt]}intercept(e){return new GUo(e&&{ignoreTrailingSlash:this[t_n],...e},this[pGt])}cleanMocks(){this[pGt]=[]}async[XEn](){await FUo(this[ZEn])(),this[hGt]=0,this[JEn][r_n.kClients].delete(this[e_n])}};n_n.exports=mGt});var EGt=T((n7u,yGt)=>{"use strict";f();var{kMockCallHistoryAddLog:jUo}=kV(),{InvalidArgumentError:k9}=Ni();function R9(t,e,r,n){switch(e.operator){case"OR":return n.push(...r(t)),n;case"AND":return r.call({logs:n},t);default:throw new k9("options.operator must to be a case insensitive string equal to 'OR' or 'AND'")}}a(R9,"handleFilterCallsWithOptions");function $Uo(t={}){let e={};if("operator"in t){if(typeof t.operator!="string"||t.operator.toUpperCase()!=="OR"&&t.operator.toUpperCase()!=="AND")throw new k9("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");return{...e,operator:t.operator.toUpperCase()}}return e}a($Uo,"buildAndValidateFilterCallsOptions");function P9(t){return e=>{if(typeof e=="string"||e==null)return this.logs.filter(r=>r[t]===e);if(e instanceof RegExp)return this.logs.filter(r=>e.test(r[t]));throw new k9(`${t} parameter should be one of string, regexp, undefined or null`)}}a(P9,"makeFilterCalls");function VUo(t){try{let e=new URL(t.path,t.origin);return e.search.length!==0||(e.search=new URLSearchParams(t.query).toString()),e}catch(e){throw new k9("An error occurred when computing MockCallHistoryLog.url",{cause:e})}}a(VUo,"computeUrlWithMaybeSearchParameters");var JWe=class{static{a(this,"MockCallHistoryLog")}constructor(e={}){this.body=e.body,this.headers=e.headers,this.method=e.method;let r=VUo(e);this.fullUrl=r.toString(),this.origin=r.origin,this.path=r.pathname,this.searchParams=Object.fromEntries(r.searchParams),this.protocol=r.protocol,this.host=r.host,this.port=r.port,this.hash=r.hash}toMap(){return new Map([["protocol",this.protocol],["host",this.host],["port",this.port],["origin",this.origin],["path",this.path],["hash",this.hash],["searchParams",this.searchParams],["fullUrl",this.fullUrl],["method",this.method],["body",this.body],["headers",this.headers]])}toString(){let e={betweenKeyValueSeparator:"->",betweenPairSeparator:"|"},r="";return this.toMap().forEach((n,o)=>{(typeof n=="string"||n===void 0||n===null)&&(r=`${r}${o}${e.betweenKeyValueSeparator}${n}${e.betweenPairSeparator}`),(typeof n=="object"&&n!==null||Array.isArray(n))&&(r=`${r}${o}${e.betweenKeyValueSeparator}${JSON.stringify(n)}${e.betweenPairSeparator}`)}),r.slice(0,-1)}},AGt=class{static{a(this,"MockCallHistory")}logs=[];calls(){return this.logs}firstCall(){return this.logs.at(0)}lastCall(){return this.logs.at(-1)}nthCall(e){if(typeof e!="number")throw new k9("nthCall must be called with a number");if(!Number.isInteger(e))throw new k9("nthCall must be called with an integer");if(Math.sign(e)!==1)throw new k9("nthCall must be called with a positive value. use firstCall or lastCall instead");return this.logs.at(e-1)}filterCalls(e,r){if(this.logs.length===0)return this.logs;if(typeof e=="function")return this.logs.filter(e);if(e instanceof RegExp)return this.logs.filter(n=>e.test(n.toString()));if(typeof e=="object"&&e!==null){if(Object.keys(e).length===0)return this.logs;let n={operator:"OR",...$Uo(r)},o=[];return"protocol"in e&&(o=R9(e.protocol,n,this.filterCallsByProtocol,o)),"host"in e&&(o=R9(e.host,n,this.filterCallsByHost,o)),"port"in e&&(o=R9(e.port,n,this.filterCallsByPort,o)),"origin"in e&&(o=R9(e.origin,n,this.filterCallsByOrigin,o)),"path"in e&&(o=R9(e.path,n,this.filterCallsByPath,o)),"hash"in e&&(o=R9(e.hash,n,this.filterCallsByHash,o)),"fullUrl"in e&&(o=R9(e.fullUrl,n,this.filterCallsByFullUrl,o)),"method"in e&&(o=R9(e.method,n,this.filterCallsByMethod,o)),[...new Set(o)]}throw new k9("criteria parameter should be one of function, regexp, or object")}filterCallsByProtocol=P9.call(this,"protocol");filterCallsByHost=P9.call(this,"host");filterCallsByPort=P9.call(this,"port");filterCallsByOrigin=P9.call(this,"origin");filterCallsByPath=P9.call(this,"path");filterCallsByHash=P9.call(this,"hash");filterCallsByFullUrl=P9.call(this,"fullUrl");filterCallsByMethod=P9.call(this,"method");clear(){this.logs=[]}[jUo](e){let r=new JWe(e);return this.logs.push(r),r}*[Symbol.iterator](){for(let e of this.calls())yield e}};yGt.exports.MockCallHistory=AGt;yGt.exports.MockCallHistoryLog=JWe});var bGt=T((s7u,u_n)=>{"use strict";f();var{promisify:WUo}=require("node:util"),zUo=vV(),{buildMockDispatch:YUo}=Eve(),{kDispatches:_Gt,kMockAgent:i_n,kClose:o_n,kOriginalClose:s_n,kOrigin:a_n,kOriginalDispatch:KUo,kConnected:CGt,kIgnoreTrailingSlash:c_n}=kV(),{MockInterceptor:JUo}=fGt(),l_n=rc(),{InvalidArgumentError:XUo}=Ni(),vGt=class extends zUo{static{a(this,"MockPool")}constructor(e,r){if(!r||!r.agent||typeof r.agent.dispatch!="function")throw new XUo("Argument opts.agent must implement Agent");super(e,r),this[i_n]=r.agent,this[a_n]=e,this[c_n]=r.ignoreTrailingSlash??!1,this[_Gt]=[],this[CGt]=1,this[KUo]=this.dispatch,this[s_n]=this.close.bind(this),this.dispatch=YUo.call(this),this.close=this[o_n]}get[l_n.kConnected](){return this[CGt]}intercept(e){return new JUo(e&&{ignoreTrailingSlash:this[c_n],...e},this[_Gt])}cleanMocks(){this[_Gt]=[]}async[o_n](){await WUo(this[s_n])(),this[CGt]=0,this[i_n][l_n.kClients].delete(this[a_n])}};u_n.exports=vGt});var f_n=T((u7u,d_n)=>{"use strict";f();var{Transform:ZUo}=require("node:stream"),{Console:eQo}=require("node:console"),tQo=process.versions.icu?"\u2705":"Y ",rQo=process.versions.icu?"\u274C":"N ";d_n.exports=class{static{a(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new ZUo({transform(r,n,o){o(null,r)}}),this.logger=new eQo({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:o,data:{statusCode:s},persist:c,times:l,timesInvoked:u,origin:d})=>({Method:n,Origin:d,Path:o,"Status code":s,Persistent:c?tQo:rQo,Invocations:u,Remaining:c?1/0:l-u}));return this.logger.table(r),this.transform.read().toString()}}});var wGt=T((p7u,E_n)=>{"use strict";f();var{kClients:NV}=rc(),nQo=SV(),{kAgent:TGt,kMockAgentSet:XWe,kMockAgentGet:p_n,kDispatches:SGt,kIsMockActive:ZWe,kNetConnect:MV,kGetNetConnect:iQo,kOptions:eze,kFactory:tze,kMockAgentRegisterCallHistory:IGt,kMockAgentIsCallHistoryEnabled:_ve,kMockAgentAddCallHistoryLog:h_n,kMockAgentMockCallHistoryInstance:Ese,kMockAgentAcceptsNonStandardSearchParameters:m_n,kMockCallHistoryAddLog:oQo,kIgnoreTrailingSlash:g_n}=kV(),sQo=gGt(),aQo=bGt(),{matchValue:cQo,normalizeSearchParams:lQo,buildAndValidateMockOptions:uQo,normalizeOrigin:A_n}=Eve(),{InvalidArgumentError:y_n,UndiciError:dQo}=Ni(),fQo=L1e(),pQo=f_n(),{MockCallHistory:hQo}=EGt(),xGt=class extends fQo{static{a(this,"MockAgent")}constructor(e={}){super(e);let r=uQo(e);if(this[MV]=!0,this[ZWe]=!0,this[_ve]=r.enableCallHistory??!1,this[m_n]=r.acceptNonStandardSearchParameters??!1,this[g_n]=r.ignoreTrailingSlash??!1,e?.agent&&typeof e.agent.dispatch!="function")throw new y_n("Argument opts.agent must implement Agent");let n=e?.agent?e.agent:new nQo(e);this[TGt]=n,this[NV]=n[NV],this[eze]=r,this[_ve]&&this[IGt]()}get(e){let r=A_n(e),n=this[g_n]?r.replace(/\/$/,""):r,o=this[p_n](n);return o||(o=this[tze](n),this[XWe](n,o)),o}dispatch(e,r){e.origin=A_n(e.origin),this.get(e.origin),this[h_n](e);let n=this[m_n],o={...e};if(n&&o.path){let[s,c]=o.path.split("?"),l=lQo(c,n);o.path=`${s}?${l}`}return this[TGt].dispatch(o,r)}async close(){this.clearCallHistory(),await this[TGt].close(),this[NV].clear()}deactivate(){this[ZWe]=!1}activate(){this[ZWe]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[MV])?this[MV].push(e):this[MV]=[e];else if(typeof e>"u")this[MV]=!0;else throw new y_n("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[MV]=!1}enableCallHistory(){return this[_ve]=!0,this}disableCallHistory(){return this[_ve]=!1,this}getCallHistory(){return this[Ese]}clearCallHistory(){this[Ese]!==void 0&&this[Ese].clear()}get isMockActive(){return this[ZWe]}[IGt](){this[Ese]===void 0&&(this[Ese]=new hQo)}[h_n](e){this[_ve]&&(this[IGt](),this[Ese][oQo](e))}[XWe](e,r){this[NV].set(e,{count:0,dispatcher:r})}[tze](e){let r=Object.assign({agent:this},this[eze]);return this[eze]&&this[eze].connections===1?new sQo(e,r):new aQo(e,r)}[p_n](e){let r=this[NV].get(e);if(r?.dispatcher)return r.dispatcher;if(typeof e!="string"){let n=this[tze]("http://localhost:9999");return this[XWe](e,n),n}for(let[n,o]of Array.from(this[NV]))if(o&&typeof n!="string"&&cQo(n,e)){let s=this[tze](e);return this[XWe](e,s),s[SGt]=o.dispatcher[SGt],s}}[iQo](){return this[MV]}pendingInterceptors(){let e=this[NV];return Array.from(e.entries()).flatMap(([r,n])=>n.dispatcher[SGt].map(o=>({...o,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new pQo}={}){let r=this.pendingInterceptors();if(r.length!==0)throw new dQo(r.length===1?`1 interceptor is pending: ${e.format(r)}`.trim():`${r.length} interceptors are pending: -${e.format(r)}`.trim())}};CEn.exports=aGt});var lGt=T((oFu,TEn)=>{"use strict";f();var{InvalidArgumentError:h7o}=Oi(),{runtimeFeatures:m7o}=_4();function g7o(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:n=[],caseSensitive:o=!1}=t;return{ignore:new Set(e.map(s=>o?s:s.toLowerCase())),exclude:new Set(r.map(s=>o?s:s.toLowerCase())),match:new Set(n.map(s=>o?s:s.toLowerCase()))}}a(g7o,"createHeaderFilters");var _En=m7o.has("crypto")?require("node:crypto"):null,A7o=_En?.hash?t=>_En.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function bEn(t){return Array.isArray(t)&&(t.length&1)===0}a(bEn,"isUndiciHeaders");function y7o(t=[]){return t.length===0?()=>!1:a(function(r){let n;for(let o of t)if(typeof o=="string"){if(n||(n=r.toLowerCase()),n.includes(o.toLowerCase()))return!0}else if(o instanceof RegExp&&o.test(r))return!0;return!1},"isUrlExcluded")}a(y7o,"isUrlExcludedFactory");function E7o(t){let e={};if(!t)return e;if(bEn(t)){for(let r=0;r{"use strict";f();var{writeFile:_7o,readFile:v7o,mkdir:b7o}=require("node:fs/promises"),{dirname:T7o,resolve:SEn}=require("node:path"),{setTimeout:S7o,clearTimeout:IEn}=require("node:timers"),{InvalidArgumentError:xEn,UndiciError:I7o}=Oi(),{hashId:x7o,isUrlExcludedFactory:w7o,normalizeHeaders:wEn,createHeaderFilters:REn}=lGt();function Tbe(t,e,r={}){let n=new URL(t.path,t.origin),o=t._normalizedHeaders||wEn(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=o),{method:t.method||"GET",url:r.matchQuery!==!1?n.toString():`${n.origin}${n.pathname}`,headers:PEn(o,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}a(Tbe,"formatRequestKey");function PEn(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,o={},{ignore:s,exclude:c,match:l}=e;for(let[u,d]of Object.entries(t)){let p=n?u:u.toLowerCase();c.has(p)||s.has(p)||l.size!==0&&!l.has(p)||(o[p]=d)}return o}a(PEn,"filterHeadersForMatching");function kEn(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,o={},{exclude:s}=e;for(let[c,l]of Object.entries(t)){let u=n?c:c.toLowerCase();s.has(u)||(o[u]=l)}return o}a(kEn,"filterHeadersForStorage");function Sbe(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let n=Object.keys(t.headers).sort();for(let o of n){let s=Array.isArray(t.headers[o])?t.headers[o]:[t.headers[o]];e.push(o);for(let c of s.sort())e.push(String(c))}}e.push(t.body);let r=e.join("|");return x7o(r)}a(Sbe,"createRequestHash");var uGt=class{static{a(this,"SnapshotRecorder")}#e;#t;#n=new Map;#r;#i=1/0;#o=!1;#a;constructor(e={}){this.#r=e.snapshotPath,this.#i=e.maxSnapshots||1/0,this.#o=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=REn(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=w7o(e.excludeUrls),this.#o&&this.#r&&this.#s()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let n=Tbe(e,this.#a,this.matchOptions),o=Sbe(n),s=wEn(r.headers),c={statusCode:r.statusCode,headers:kEn(s,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#n.size>=this.#i&&!this.#n.has(o)){let u=this.#n.keys().next().value;this.#n.delete(u)}let l=this.#n.get(o);l&&l.responses?(l.responses.push(c),l.timestamp=new Date().toISOString()):this.#n.set(o,{request:n,responses:[c],callCount:0,timestamp:new Date().toISOString()}),this.#o&&this.#r&&this.#l()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=Tbe(e,this.#a,this.matchOptions),n=Sbe(r),o=this.#n.get(n);if(!o)return;let s=o.callCount||0,c=Math.min(s,o.responses.length-1);return o.callCount=s+1,{...o,response:o.responses[c]}}async loadSnapshots(e){let r=e||this.#r;if(!r)throw new xEn("Snapshot path is required");try{let n=await v7o(SEn(r),"utf8"),o=JSON.parse(n);if(Array.isArray(o)){this.#n.clear();for(let{hash:s,snapshot:c}of o)this.#n.set(s,c)}else this.#n=new Map(Object.entries(o))}catch(n){if(n.code==="ENOENT")this.#n.clear();else throw new I7o(`Failed to load snapshots from ${r}`,{cause:n})}}async saveSnapshots(e){let r=e||this.#r;if(!r)throw new xEn("Snapshot path is required");let n=SEn(r);await b7o(T7o(n),{recursive:!0});let o=Array.from(this.#n.entries()).map(([s,c])=>({hash:s,snapshot:c}));await _7o(n,JSON.stringify(o,null,2),{flush:!0})}clear(){this.#n.clear()}getSnapshots(){return Array.from(this.#n.values())}size(){return this.#n.size}resetCallCounts(){for(let e of this.#n.values())e.callCount=0}deleteSnapshot(e){let r=Tbe(e,this.#a,this.matchOptions),n=Sbe(r);return this.#n.delete(n)}getSnapshotInfo(e){let r=Tbe(e,this.#a,this.matchOptions),n=Sbe(r),o=this.#n.get(n);return o?{hash:n,request:o.request,responseCount:o.responses?o.responses.length:o.response?1:0,callCount:o.callCount||0,timestamp:o.timestamp}:null}replaceSnapshots(e){if(this.#n.clear(),Array.isArray(e))for(let{hash:r,snapshot:n}of e)this.#n.set(r,n);else e&&typeof e=="object"&&(this.#n=new Map(Object.entries(e)))}#s(){return this.#l()}#c(){this.#e&&(IEn(this.#e),this.saveSnapshots().catch(()=>{}),this.#e=null)}#l(){this.#e=S7o(()=>{this.saveSnapshots().catch(()=>{}),this.#o?this.#e?.refresh():this.#e=null},1e3)}destroy(){this.#c(),this.#e&&(IEn(this.#e),this.#e=null)}async close(){this.#r&&this.#n.size!==0&&await this.saveSnapshots(),this.destroy()}};NEn.exports={SnapshotRecorder:uGt,formatRequestKey:Tbe,createRequestHash:Sbe,filterHeadersForMatching:PEn,filterHeadersForStorage:kEn,createHeaderFilters:REn}});var BEn=T((dFu,OEn)=>{"use strict";f();var R7o=yW(),P7o=cGt(),{SnapshotRecorder:k7o}=DEn(),N7o=Uve(),{InvalidArgumentError:D7o,UndiciError:M7o}=Oi(),{validateSnapshotMode:O7o}=lGt(),LC=Symbol("kSnapshotRecorder"),kN=Symbol("kSnapshotMode"),Ibe=Symbol("kSnapshotPath"),dGt=Symbol("kSnapshotLoaded"),zze=Symbol("kRealAgent"),MEn=!1,fGt=class extends P7o{static{a(this,"SnapshotAgent")}constructor(e={}){MEn||(process.emitWarning("SnapshotAgent is experimental and subject to change","ExperimentalWarning"),MEn=!0);let{mode:r="record",snapshotPath:n=null,...o}=e;if(super(o),O7o(r),(r==="playback"||r==="update")&&!n)throw new D7o(`snapshotPath is required when mode is '${r}'`);this[kN]=r,this[Ibe]=n,this[LC]=new k7o({snapshotPath:this[Ibe],mode:this[kN],maxSnapshots:e.maxSnapshots,autoFlush:e.autoFlush,flushInterval:e.flushInterval,matchHeaders:e.matchHeaders,ignoreHeaders:e.ignoreHeaders,excludeHeaders:e.excludeHeaders,matchBody:e.matchBody,matchQuery:e.matchQuery,caseSensitive:e.caseSensitive,shouldRecord:e.shouldRecord,shouldPlayback:e.shouldPlayback,excludeUrls:e.excludeUrls}),this[dGt]=!1,(this[kN]==="record"||this[kN]==="update"||this[kN]==="playback"&&e.excludeUrls&&e.excludeUrls.length>0)&&(this[zze]=new R7o(e)),(this[kN]==="playback"||this[kN]==="update")&&this[Ibe]&&this.loadSnapshots().catch(()=>{})}dispatch(e,r){r=N7o.wrap(r);let n=this[kN];if(this[LC].isUrlExcluded(e))return this[zze].dispatch(e,r);if(n==="playback"||n==="update"){if(!this[dGt])return this.#e(e,r);let o=this[LC].findSnapshot(e);if(o)return this.#n(o,r);if(n==="update")return this.#t(e,r);{let s=new M7o(`No snapshot found for ${e.method||"GET"} ${e.path}`);if(r.onError){r.onError(s);return}throw s}}else if(n==="record")return this.#t(e,r)}async#e(e,r){return await this.loadSnapshots(),this.dispatch(e,r)}#t(e,r){let n={statusCode:null,headers:{},trailers:{},body:[]},o=this,s={onRequestStart(l,u){return r.onRequestStart(l,{...u,history:this.history})},onRequestUpgrade(l,u,d,p){return r.onRequestUpgrade(l,u,d,p)},onResponseStart(l,u,d,p){return n.statusCode=u,n.headers=d,r.onResponseStart(l,u,d,p)},onResponseData(l,u){return n.body.push(u),r.onResponseData(l,u)},onResponseEnd(l,u){n.trailers=u;let d=Buffer.concat(n.body);o[LC].record(e,{statusCode:n.statusCode,headers:n.headers,body:d,trailers:n.trailers}).then(()=>r.onResponseEnd(l,u)).catch(p=>r.onResponseError(l,p))}};return this[zze].dispatch(e,s)}#n(e,r){try{let{response:n}=e,o={pause(){},resume(){},abort(c){this.aborted=!0,this.reason=c},aborted:!1,paused:!1};r.onRequestStart(o),r.onResponseStart(o,n.statusCode,n.headers);let s=Buffer.from(n.body,"base64");r.onResponseData(o,s),r.onResponseEnd(o,n.trailers)}catch(n){r.onError?.(n)}}async loadSnapshots(e){await this[LC].loadSnapshots(e||this[Ibe]),this[dGt]=!0,this[kN]==="playback"&&this.#r()}async saveSnapshots(e){return this[LC].saveSnapshots(e||this[Ibe])}#r(){for(let e of this[LC].getSnapshots()){let{request:r,responses:n,response:o}=e,s=new URL(r.url),c=this.get(s.origin),l=n?n[0]:o;l&&c.intercept({path:s.pathname+s.search,method:r.method,headers:r.headers,body:r.body}).reply(l.statusCode,l.body,{headers:l.headers,trailers:l.trailers}).persist()}}getRecorder(){return this[LC]}getMode(){return this[kN]}clearSnapshots(){this[LC].clear()}resetCallCounts(){this[LC].resetCallCounts()}deleteSnapshot(e){return this[LC].deleteSnapshot(e)}getSnapshotInfo(e){return this[LC].getSnapshotInfo(e)}replaceSnapshots(e){this[LC].replaceSnapshots(e)}async close(){await this[LC].close(),await this[zze]?.close(),await super.close()}};OEn.exports=fGt});var Yze=T((hFu,QEn)=>{"use strict";f();var LEn=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:B7o}=Oi(),L7o=yW();UEn()===void 0&&FEn(new L7o);function FEn(t){if(!t||typeof t.dispatch!="function")throw new B7o("Argument agent must implement Agent");Object.defineProperty(globalThis,LEn,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(FEn,"setGlobalDispatcher");function UEn(){return globalThis[LEn]}a(UEn,"getGlobalDispatcher");var F7o=["fetch","Headers","Response","Request","FormData","WebSocket","CloseEvent","ErrorEvent","MessageEvent","EventSource"];QEn.exports={setGlobalDispatcher:FEn,getGlobalDispatcher:UEn,installedExports:F7o}});var sae=T((yFu,qEn)=>{"use strict";f();var P4=require("node:assert"),U7o=Uve();qEn.exports=class{static{a(this,"DecoratorHandler")}#e;#t=!1;#n=!1;#r=!1;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=U7o.wrap(e)}onRequestStart(...e){this.#e.onRequestStart?.(...e)}onRequestUpgrade(...e){return P4(!this.#t),P4(!this.#n),this.#e.onRequestUpgrade?.(...e)}onResponseStart(...e){return P4(!this.#t),P4(!this.#n),P4(!this.#r),this.#r=!0,this.#e.onResponseStart?.(...e)}onResponseData(...e){return P4(!this.#t),P4(!this.#n),this.#e.onResponseData?.(...e)}onResponseEnd(...e){return P4(!this.#t),P4(!this.#n),this.#t=!0,this.#e.onResponseEnd?.(...e)}onResponseError(...e){return this.#n=!0,this.#e.onResponseError?.(...e)}onBodySent(){}}});var gGt=T((_Fu,$En)=>{"use strict";f();var FC=eo(),{kBodyUsed:xbe}=ac(),mGt=require("node:assert"),{InvalidArgumentError:pGt}=Oi(),Q7o=require("node:events"),q7o=[300,301,302,303,307,308],GEn=Symbol("body"),HEn=a(()=>{},"noop"),Kze=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[GEn]=e,this[xbe]=!1}async*[Symbol.asyncIterator](){mGt(!this[xbe],"disturbed"),this[xbe]=!0,yield*this[GEn]}},hGt=class t{static{a(this,"RedirectHandler")}static buildDispatch(e,r){if(r!=null&&(!Number.isInteger(r)||r<0))throw new pGt("maxRedirections must be a positive number");let n=e.dispatch.bind(e);return(o,s)=>n(o,new t(n,r,o,s))}constructor(e,r,n,o){if(r!=null&&(!Number.isInteger(r)||r<0))throw new pGt("maxRedirections must be a positive number");this.dispatch=e,this.location=null;let{maxRedirections:s,...c}=n;this.opts=c,this.maxRedirections=r,this.handler=o,this.history=[],FC.isStream(this.opts.body)?(FC.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){mGt(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[xbe]=!1,Q7o.prototype.on.call(this.opts.body,"data",function(){this[xbe]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new Kze(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&FC.isIterable(this.opts.body)&&!FC.isFormDataLike(this.opts.body)&&(this.opts.body=new Kze(this.opts.body))}onRequestStart(e,r){this.handler.onRequestStart?.(e,{...r,history:this.history})}onRequestUpgrade(e,r,n,o){this.handler.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){if(this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections)throw new Error("max redirects");if((r===301||r===302)&&this.opts.method==="POST"&&(this.opts.method="GET",FC.isStream(this.opts.body)&&FC.destroy(this.opts.body.on("error",HEn)),this.opts.body=null),r===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",FC.isStream(this.opts.body)&&FC.destroy(this.opts.body.on("error",HEn)),this.opts.body=null),this.location=this.history.length>=this.maxRedirections||FC.isDisturbed(this.opts.body)||q7o.indexOf(r)===-1?null:n.location,this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location){this.handler.onResponseStart?.(e,r,n,o);return}let{origin:s,pathname:c,search:l}=FC.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),u=l?`${c}${l}`:c,d=`${s}${u}`;for(let p of this.history)if(p.toString()===d)throw new pGt(`Redirect loop detected. Cannot redirect to ${s}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);this.opts.headers=G7o(this.opts.headers,r===303,this.opts.origin!==s),this.opts.path=u,this.opts.origin=s,this.opts.query=null}onResponseData(e,r){this.location||this.handler.onResponseData?.(e,r)}onResponseEnd(e,r){this.location?this.dispatch(this.opts,this):this.handler.onResponseEnd(e,r)}onResponseError(e,r){this.handler.onResponseError?.(e,r)}};function jEn(t,e,r){if(t.length===4)return FC.headerNameToString(t)==="host";if(e&&FC.headerNameToString(t).startsWith("content-"))return!0;if(r&&(t.length===13||t.length===6||t.length===19)){let n=FC.headerNameToString(t);return n==="authorization"||n==="cookie"||n==="proxy-authorization"}return!1}a(jEn,"shouldRemoveHeader");function G7o(t,e,r){let n=[];if(Array.isArray(t))for(let o=0;o{"use strict";f();var H7o=gGt();function j7o({maxRedirections:t}={}){return e=>a(function(n,o){let{maxRedirections:s=t,...c}=n;if(s==null||s===0)return e(n,o);let l={...c},u=new H7o(e,s,l,o);return e(l,u)},"Intercept")}a(j7o,"createRedirectInterceptor");VEn.exports=j7o});var YEn=T((xFu,zEn)=>{"use strict";f();var $7o=sae(),{ResponseError:V7o}=Oi(),AGt=class extends $7o{static{a(this,"ResponseErrorHandler")}#e;#t;#n;#r;#i;constructor(e,{handler:r}){super(r)}#o(e){return(this.#t??"").indexOf(e)===0}onRequestStart(e,r){return this.#e=0,this.#t=null,this.#n=null,this.#r=null,this.#i="",super.onRequestStart(e,r)}onResponseStart(e,r,n,o){if(this.#e=r,this.#r=n,this.#t=n["content-type"],this.#e<400)return super.onResponseStart(e,r,n,o);(this.#o("application/json")||this.#o("text/plain"))&&(this.#n=new TextDecoder("utf-8"))}onResponseData(e,r){if(this.#e<400)return super.onResponseData(e,r);this.#i+=this.#n?.decode(r,{stream:!0})??""}onResponseEnd(e,r){if(this.#e>=400){if(this.#i+=this.#n?.decode(void 0,{stream:!1})??"",this.#o("application/json"))try{this.#i=JSON.parse(this.#i)}catch{}let n,o=Error.stackTraceLimit;Error.stackTraceLimit=0;try{n=new V7o("Response Error",this.#e,{body:this.#i,headers:this.#r})}finally{Error.stackTraceLimit=o}super.onResponseError(e,n)}else super.onResponseEnd(e,r)}onResponseError(e,r){super.onResponseError(e,r)}};zEn.exports=()=>t=>a(function(r,n){return t(r,new AGt(r,{handler:n}))},"Intercept")});var JEn=T((PFu,KEn)=>{"use strict";f();var W7o=Mze();KEn.exports=t=>e=>a(function(n,o){return e(n,new W7o({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var ZEn=T((DFu,XEn)=>{"use strict";f();var{InvalidArgumentError:z7o,RequestAbortedError:Y7o}=Oi(),K7o=sae(),yGt=class extends K7o{static{a(this,"DumpHandler")}#e=1024*1024;#t=!1;#n=0;#r=null;aborted=!1;reason=!1;constructor({maxSize:e,signal:r},n){if(e!=null&&(!Number.isFinite(e)||e<1))throw new z7o("maxSize must be a number greater than 0");super(n),this.#e=e??this.#e}#i(e){this.aborted=!0,this.reason=e}onRequestStart(e,r){return e.abort=this.#i.bind(this),this.#r=e,super.onRequestStart(e,r)}onResponseStart(e,r,n,o){let s=n["content-length"];if(s!=null&&s>this.#e)throw new Y7o(`Response size (${s}) larger than maxSize (${this.#e})`);return this.aborted===!0?!0:super.onResponseStart(e,r,n,o)}onResponseError(e,r){this.#t||(r=this.#r?.reason??r,super.onResponseError(e,r))}onResponseData(e,r){return this.#n=this.#n+r.length,this.#n>=this.#e&&(this.#t=!0,this.aborted===!0?super.onResponseError(e,this.reason):super.onResponseEnd(e,{})),!0}onResponseEnd(e,r){if(!this.#t){if(this.#r.aborted===!0){super.onResponseError(e,this.reason);return}super.onResponseEnd(e,r)}}};function J7o({maxSize:t}={maxSize:1024*1024}){return e=>a(function(n,o){let{dumpMaxSize:s=t}=n,c=new yGt({maxSize:s,signal:n.signal},o);return e(n,c)},"Intercept")}a(J7o,"createDumpInterceptor");XEn.exports=J7o});var nCn=T((BFu,rCn)=>{"use strict";f();var{isIP:X7o}=require("node:net"),{lookup:Z7o}=require("node:dns"),eUo=sae(),{InvalidArgumentError:wW,InformationalError:tUo}=Oi(),EGt=Math.pow(2,31)-1;function rUo(t){let e=Object.getPrototypeOf(t);return Object.prototype.hasOwnProperty.call(t,Symbol.iterator)||e!=null&&e!==Object.prototype&&typeof t[Symbol.iterator]=="function"}a(rUo,"hasSafeIterator");function eCn(t){return typeof t=="string"&&t.toLowerCase()==="host"}a(eCn,"isHostHeader");function nUo(t){if(t==null)return null;if(Array.isArray(t)){if(t.length===0||!Array.isArray(t[0]))return t;let e=[];for(let r of t)Array.isArray(r)&&r.length===2?e.push(r[0],r[1]):e.push(r);return e}if(typeof t=="object"&&rUo(t)){let e=[];for(let r of t)Array.isArray(r)&&r.length===2?e.push(r[0],r[1]):e.push(r);return e}return t}a(nUo,"normalizeHeaders");function iUo(t){if(t==null)return!1;if(Array.isArray(t)){if(t.length===0)return!1;for(let e=0;e=this.#e}},_Gt=class{static{a(this,"DNSInstance")}#e=0;#t=0;dualStack=!0;affinity=null;lookup=null;pick=null;storage=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#n,this.pick=e.pick??this.#r,this.storage=e.storage??new CGt(e)}runLookup(e,r,n){let o=this.storage.get(e.hostname);if(o==null&&this.storage.full()){n(null,e);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(c,l)=>{if(c||l==null||l.length===0){n(c??new tUo("No DNS entries found"));return}this.setRecords(e,l);let u=this.storage.get(e.hostname),d=this.pick(e,u,s.affinity),p;typeof d.port=="number"?p=`:${d.port}`:e.port!==""?p=`:${e.port}`:p="",n(null,new URL(`${e.protocol}//${d.family===6?`[${d.address}]`:d.address}${p}`))});else{let c=this.pick(e,o,s.affinity);if(c==null){this.storage.delete(e.hostname),this.runLookup(e,r,n);return}let l;typeof c.port=="number"?l=`:${c.port}`:e.port!==""?l=`:${e.port}`:l="",n(null,new URL(`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${l}`))}}#n(e,r,n){Z7o(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let c=new Map;for(let l of s)c.set(`${l.address}:${l.family}`,l);n(null,c.values())})}#r(e,r,n){let o=null,{records:s,offset:c}=r,l;if(this.dualStack?(n==null&&(c==null||c===EGt?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?l=s[n]:l=s[n===4?6:4]):l=s[n],l==null||l.ips.length===0)return o;l.offset==null||l.offset===EGt?l.offset=0:l.offset++;let u=l.offset%l.ips.length;return o=l.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(l.ips.splice(u,1),this.pick(e,r,n)):o}pickFamily(e,r){let n=this.storage.get(e.hostname)?.records;if(!n)return null;let o=n[r];if(!o)return null;o.offset==null||o.offset===EGt?o.offset=0:o.offset++;let s=o.offset%o.ips.length,c=o.ips[s]??null;return c==null||Date.now()-c.timestamp>c.ttl&&o.ips.splice(s,1),c}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}},s=this.#e;for(let c of r){c.timestamp=n,typeof c.ttl=="number"?(c.ttl=Math.min(c.ttl,this.#e),s=Math.min(s,c.ttl)):c.ttl=this.#e;let l=o.records[c.family]??{ips:[]};l.ips.push(c),o.records[c.family]=l}this.storage.set(e.hostname,o,{ttl:s})}deleteRecords(e){this.storage.delete(e.hostname)}getHandler(e,r){return new vGt(this,e,r)}},vGt=class extends eUo{static{a(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null;#r=null;#i=null;#o=null;#a=!0;constructor(e,{origin:r,handler:n,dispatch:o,newOrigin:s},c){super(n),this.#r=r,this.#o=s,this.#t={...c},this.#e=e,this.#n=o}onResponseError(e,r){switch(r.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){if(!this.#a){super.onResponseError(e,r);return}this.#a=!1;let n=this.#o.hostname[0]==="["?4:6,o=this.#e.pickFamily(this.#r,n);if(o==null){super.onResponseError(e,r);return}let s;typeof o.port=="number"?s=`:${o.port}`:this.#r.port!==""?s=`:${this.#r.port}`:s="";let c={...this.#t,origin:`${this.#r.protocol}//${o.family===6?`[${o.address}]`:o.address}${s}`,headers:tCn(this.#r.host,this.#t.headers)};this.#n(c,this);return}super.onResponseError(e,r);break}case"ENOTFOUND":this.#e.deleteRecords(this.#r),super.onResponseError(e,r);break;default:super.onResponseError(e,r);break}}};rCn.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new wW("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new wW("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new wW("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new wW("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new wW("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new wW("Invalid pick. Must be a function");if(t?.storage!=null&&(typeof t?.storage?.get!="function"||typeof t?.storage?.set!="function"||typeof t?.storage?.full!="function"||typeof t?.storage?.delete!="function"))throw new wW("Invalid storage. Must be a object with methods: { get, set, full, delete }");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0,storage:t?.storage},o=new _Gt(n);return s=>a(function(l,u){let d=l.origin.constructor===URL?l.origin:new URL(l.origin);return X7o(d.hostname)!==0?s(l,u):(o.runLookup(d,l,(p,h)=>{if(p)return u.onResponseError(null,p);let m={...l,servername:d.hostname,origin:h.origin,headers:tCn(d.host,l.headers)};s(m,o.getHandler({origin:d,dispatch:s,handler:u,newOrigin:h},l))}),!0)},"dnsInterceptor")}});var aae=T((UFu,oCn)=>{"use strict";f();var{safeHTTPMethods:iCn,pathHasQueryOrFragment:oUo,hasSafeIterator:sUo}=eo(),{serializePathWithQuery:aUo}=eo();function cUo(t){if(!t.origin)throw new Error("opts.origin is undefined");let e=t.path||"/";return t.query&&!oUo(t.path)&&(e=aUo(e,t.query)),{origin:t.origin.toString(),method:t.method,path:e,headers:t.headers}}a(cUo,"makeCacheKey");function lUo(t){let e;if(t.headers==null)e={};else if(typeof t.headers=="object")if(e={},sUo(t.headers))for(let r of t.headers){if(!Array.isArray(r))throw new Error("opts.headers is not a valid header map");let[n,o]=r;if(typeof n!="string"||typeof o!="string")throw new Error("opts.headers is not a valid header map");e[n.toLowerCase()]=o}else for(let r of Object.keys(t.headers))e[r.toLowerCase()]=t.headers[r];else throw new Error("opts.headers is not an object");return e}a(lUo,"normalizeHeaders");function uUo(t){if(typeof t!="object")throw new TypeError(`expected key to be object, got ${typeof t}`);for(let e of["origin","method","path"])if(typeof t[e]!="string")throw new TypeError(`expected key.${e} to be string, got ${typeof t[e]}`);if(t.headers!==void 0&&typeof t.headers!="object")throw new TypeError(`expected headers to be object, got ${typeof t}`)}a(uUo,"assertCacheKey");function dUo(t){if(typeof t!="object")throw new TypeError(`expected value to be object, got ${typeof t}`);for(let e of["statusCode","cachedAt","staleAt","deleteAt"])if(typeof t[e]!="number")throw new TypeError(`expected value.${e} to be number, got ${typeof t[e]}`);if(typeof t.statusMessage!="string")throw new TypeError(`expected value.statusMessage to be string, got ${typeof t.statusMessage}`);if(t.headers!=null&&typeof t.headers!="object")throw new TypeError(`expected value.rawHeaders to be object, got ${typeof t.headers}`);if(t.vary!==void 0&&typeof t.vary!="object")throw new TypeError(`expected value.vary to be object, got ${typeof t.vary}`);if(t.etag!==void 0&&typeof t.etag!="string")throw new TypeError(`expected value.etag to be string, got ${typeof t.etag}`)}a(dUo,"assertCacheValue");function fUo(t){let e={},r;if(Array.isArray(t)){r=[];for(let n of t)r.push(...n.split(","))}else r=t.split(",");for(let n=0;n=2&&l[0]==='"'&&l[l.length-1]==='"'&&(l=l.substring(1,l.length-1));let u=parseInt(l,10);if(u!==u||c==="max-age"&&c in e&&e[c]>=u)continue;e[c]=u;break}case"private":case"no-cache":if(l){if(l[0]==='"'){let u=[l.substring(1)],d=l[l.length-1]==='"';if(!d)for(let p=n+1;p{"use strict";f();function yUo(t){switch(t[3]){case",":return EUo(t);case" ":return CUo(t);default:return _Uo(t)}}a(yUo,"parseHttpDate");function EUo(t){if(t.length!==29||t[4]!==" "||t[7]!==" "||t[11]!==" "||t[16]!==" "||t[19]!==":"||t[22]!==":"||t[25]!==" "||t[26]!=="G"||t[27]!=="M"||t[28]!=="T")return;let e=-1;if(t[0]==="S"&&t[1]==="u"&&t[2]==="n")e=0;else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n")e=1;else if(t[0]==="T"&&t[1]==="u"&&t[2]==="e")e=2;else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d")e=3;else if(t[0]==="T"&&t[1]==="h"&&t[2]==="u")e=4;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i")e=5;else if(t[0]==="S"&&t[1]==="a"&&t[2]==="t")e=6;else return;let r=0;if(t[5]==="0"){let g=t.charCodeAt(6);if(g<49||g>57)return;r=g-48}else{let g=t.charCodeAt(5);if(g<49||g>51)return;let A=t.charCodeAt(6);if(A<48||A>57)return;r=(g-48)*10+(A-48)}let n=-1;if(t[8]==="J"&&t[9]==="a"&&t[10]==="n")n=0;else if(t[8]==="F"&&t[9]==="e"&&t[10]==="b")n=1;else if(t[8]==="M"&&t[9]==="a")if(t[10]==="r")n=2;else if(t[10]==="y")n=4;else return;else if(t[8]==="J")if(t[9]==="a"&&t[10]==="n")n=0;else if(t[9]==="u")if(t[10]==="n")n=5;else if(t[10]==="l")n=6;else return;else return;else if(t[8]==="A")if(t[9]==="p"&&t[10]==="r")n=3;else if(t[9]==="u"&&t[10]==="g")n=7;else return;else if(t[8]==="S"&&t[9]==="e"&&t[10]==="p")n=8;else if(t[8]==="O"&&t[9]==="c"&&t[10]==="t")n=9;else if(t[8]==="N"&&t[9]==="o"&&t[10]==="v")n=10;else if(t[8]==="D"&&t[9]==="e"&&t[10]==="c")n=11;else return;let o=t.charCodeAt(12);if(o<48||o>57)return;let s=t.charCodeAt(13);if(s<48||s>57)return;let c=t.charCodeAt(14);if(c<48||c>57)return;let l=t.charCodeAt(15);if(l<48||l>57)return;let u=(o-48)*1e3+(s-48)*100+(c-48)*10+(l-48),d=0;if(t[17]==="0"){let g=t.charCodeAt(18);if(g<48||g>57)return;d=g-48}else{let g=t.charCodeAt(17);if(g<48||g>50)return;let A=t.charCodeAt(18);if(A<48||A>57||g===50&&A>51)return;d=(g-48)*10+(A-48)}let p=0;if(t[20]==="0"){let g=t.charCodeAt(21);if(g<48||g>57)return;p=g-48}else{let g=t.charCodeAt(20);if(g<48||g>53)return;let A=t.charCodeAt(21);if(A<48||A>57)return;p=(g-48)*10+(A-48)}let h=0;if(t[23]==="0"){let g=t.charCodeAt(24);if(g<48||g>57)return;h=g-48}else{let g=t.charCodeAt(23);if(g<48||g>53)return;let A=t.charCodeAt(24);if(A<48||A>57)return;h=(g-48)*10+(A-48)}let m=new Date(Date.UTC(u,n,r,d,p,h));return m.getUTCDay()===e?m:void 0}a(EUo,"parseImfDate");function CUo(t){if(t.length!==24||t[7]!==" "||t[10]!==" "||t[19]!==" ")return;let e=-1;if(t[0]==="S"&&t[1]==="u"&&t[2]==="n")e=0;else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n")e=1;else if(t[0]==="T"&&t[1]==="u"&&t[2]==="e")e=2;else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d")e=3;else if(t[0]==="T"&&t[1]==="h"&&t[2]==="u")e=4;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i")e=5;else if(t[0]==="S"&&t[1]==="a"&&t[2]==="t")e=6;else return;let r=-1;if(t[4]==="J"&&t[5]==="a"&&t[6]==="n")r=0;else if(t[4]==="F"&&t[5]==="e"&&t[6]==="b")r=1;else if(t[4]==="M"&&t[5]==="a")if(t[6]==="r")r=2;else if(t[6]==="y")r=4;else return;else if(t[4]==="J")if(t[5]==="a"&&t[6]==="n")r=0;else if(t[5]==="u")if(t[6]==="n")r=5;else if(t[6]==="l")r=6;else return;else return;else if(t[4]==="A")if(t[5]==="p"&&t[6]==="r")r=3;else if(t[5]==="u"&&t[6]==="g")r=7;else return;else if(t[4]==="S"&&t[5]==="e"&&t[6]==="p")r=8;else if(t[4]==="O"&&t[5]==="c"&&t[6]==="t")r=9;else if(t[4]==="N"&&t[5]==="o"&&t[6]==="v")r=10;else if(t[4]==="D"&&t[5]==="e"&&t[6]==="c")r=11;else return;let n=0;if(t[8]===" "){let g=t.charCodeAt(9);if(g<49||g>57)return;n=g-48}else{let g=t.charCodeAt(8);if(g<49||g>51)return;let A=t.charCodeAt(9);if(A<48||A>57)return;n=(g-48)*10+(A-48)}let o=0;if(t[11]==="0"){let g=t.charCodeAt(12);if(g<48||g>57)return;o=g-48}else{let g=t.charCodeAt(11);if(g<48||g>50)return;let A=t.charCodeAt(12);if(A<48||A>57||g===50&&A>51)return;o=(g-48)*10+(A-48)}let s=0;if(t[14]==="0"){let g=t.charCodeAt(15);if(g<48||g>57)return;s=g-48}else{let g=t.charCodeAt(14);if(g<48||g>53)return;let A=t.charCodeAt(15);if(A<48||A>57)return;s=(g-48)*10+(A-48)}let c=0;if(t[17]==="0"){let g=t.charCodeAt(18);if(g<48||g>57)return;c=g-48}else{let g=t.charCodeAt(17);if(g<48||g>53)return;let A=t.charCodeAt(18);if(A<48||A>57)return;c=(g-48)*10+(A-48)}let l=t.charCodeAt(20);if(l<48||l>57)return;let u=t.charCodeAt(21);if(u<48||u>57)return;let d=t.charCodeAt(22);if(d<48||d>57)return;let p=t.charCodeAt(23);if(p<48||p>57)return;let h=(l-48)*1e3+(u-48)*100+(d-48)*10+(p-48),m=new Date(Date.UTC(h,r,n,o,s,c));return m.getUTCDay()===e?m:void 0}a(CUo,"parseAscTimeDate");function _Uo(t){let e=-1,r=-1;if(t[0]==="S")t[1]==="u"&&t[2]==="n"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y"?(r=0,e=6):t[1]==="a"&&t[2]==="t"&&t[3]==="u"&&t[4]==="r"&&t[5]==="d"&&t[6]==="a"&&t[7]==="y"&&(r=6,e=8);else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y")r=1,e=6;else if(t[0]==="T")t[1]==="u"&&t[2]==="e"&&t[3]==="s"&&t[4]==="d"&&t[5]==="a"&&t[6]==="y"?(r=2,e=7):t[1]==="h"&&t[2]==="u"&&t[3]==="r"&&t[4]==="s"&&t[5]==="d"&&t[6]==="a"&&t[7]==="y"&&(r=4,e=8);else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d"&&t[3]==="n"&&t[4]==="e"&&t[5]==="s"&&t[6]==="d"&&t[7]==="a"&&t[8]==="y")r=3,e=9;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y")r=5,e=6;else return;if(t[e]!==","||t.length-e-1!==23||t[e+1]!==" "||t[e+4]!=="-"||t[e+8]!=="-"||t[e+11]!==" "||t[e+14]!==":"||t[e+17]!==":"||t[e+20]!==" "||t[e+21]!=="G"||t[e+22]!=="M"||t[e+23]!=="T")return;let n=0;if(t[e+2]==="0"){let m=t.charCodeAt(e+3);if(m<49||m>57)return;n=m-48}else{let m=t.charCodeAt(e+2);if(m<49||m>51)return;let g=t.charCodeAt(e+3);if(g<48||g>57)return;n=(m-48)*10+(g-48)}let o=-1;if(t[e+5]==="J"&&t[e+6]==="a"&&t[e+7]==="n")o=0;else if(t[e+5]==="F"&&t[e+6]==="e"&&t[e+7]==="b")o=1;else if(t[e+5]==="M"&&t[e+6]==="a"&&t[e+7]==="r")o=2;else if(t[e+5]==="A"&&t[e+6]==="p"&&t[e+7]==="r")o=3;else if(t[e+5]==="M"&&t[e+6]==="a"&&t[e+7]==="y")o=4;else if(t[e+5]==="J"&&t[e+6]==="u"&&t[e+7]==="n")o=5;else if(t[e+5]==="J"&&t[e+6]==="u"&&t[e+7]==="l")o=6;else if(t[e+5]==="A"&&t[e+6]==="u"&&t[e+7]==="g")o=7;else if(t[e+5]==="S"&&t[e+6]==="e"&&t[e+7]==="p")o=8;else if(t[e+5]==="O"&&t[e+6]==="c"&&t[e+7]==="t")o=9;else if(t[e+5]==="N"&&t[e+6]==="o"&&t[e+7]==="v")o=10;else if(t[e+5]==="D"&&t[e+6]==="e"&&t[e+7]==="c")o=11;else return;let s=t.charCodeAt(e+9);if(s<48||s>57)return;let c=t.charCodeAt(e+10);if(c<48||c>57)return;let l=(s-48)*10+(c-48);l+=l<70?2e3:1900;let u=0;if(t[e+12]==="0"){let m=t.charCodeAt(e+13);if(m<48||m>57)return;u=m-48}else{let m=t.charCodeAt(e+12);if(m<48||m>50)return;let g=t.charCodeAt(e+13);if(g<48||g>57||m===50&&g>51)return;u=(m-48)*10+(g-48)}let d=0;if(t[e+15]==="0"){let m=t.charCodeAt(e+16);if(m<48||m>57)return;d=m-48}else{let m=t.charCodeAt(e+15);if(m<48||m>53)return;let g=t.charCodeAt(e+16);if(g<48||g>57)return;d=(m-48)*10+(g-48)}let p=0;if(t[e+18]==="0"){let m=t.charCodeAt(e+19);if(m<48||m>57)return;p=m-48}else{let m=t.charCodeAt(e+18);if(m<48||m>53)return;let g=t.charCodeAt(e+19);if(g<48||g>57)return;p=(m-48)*10+(g-48)}let h=new Date(Date.UTC(l,o,n,u,d,p));return h.getUTCDay()===r?h:void 0}a(_Uo,"parseRfc850Date");sCn.exports={parseHttpDate:yUo}});var dCn=T(($Fu,uCn)=>{"use strict";f();var vUo=eo(),{parseCacheControlHeader:bUo,parseVaryHeader:TUo,isEtagUsable:SUo}=aae(),{parseHttpDate:cCn}=aCn();function IUo(){}a(IUo,"noop");var lCn=[200,203,204,206,300,301,308,404,405,410,414,501],xUo=[206],wUo=2147483647e3,bGt=class{static{a(this,"CacheHandler")}#e;#t;#n;#r;#i;#o;constructor({store:e,type:r,cacheByDefault:n},o,s){this.#r=e,this.#t=r,this.#n=n,this.#e=o,this.#i=s}onRequestStart(e,r){this.#o?.destroy(),this.#o=void 0,this.#i.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.#i.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){let s=a(()=>this.#i.onResponseStart?.(e,r,n,o),"downstreamOnHeaders"),c=this;if(!vUo.safeHTTPMethods.includes(this.#e.method)&&r>=200&&r<=399){try{this.#r.delete(this.#e)?.catch?.(IUo)}catch{}return s()}let l=n["cache-control"],u=n["last-modified"]&&lCn.includes(r);if(!l&&!n.expires&&!u&&!this.#n)return s();let d=l?bUo(l):{};if(!RUo(this.#t,r,n,d,this.#e.headers))return s();let p=Date.now(),h=n.age?PUo(n.age):void 0;if(h&&h>=wUo)return s();let m=typeof n.date=="string"?cCn(n.date):void 0,g=kUo(this.#t,p,h,n,m,d)??this.#n;if(g===void 0||h&&h>g)return s();let A=m?m.getTime():p,y=g+A;if(p>=y)return s();let E;if(this.#e.headers&&n.vary&&(E=TUo(n.vary,this.#e.headers),!E))return s();let _=NUo(A,d,y),v=DUo(n,d),b={statusCode:r,statusMessage:o,headers:v,vary:E,cacheControlDirectives:d,cachedAt:h?p-h:p,staleAt:y,deleteAt:_};if(r===304){let I=a(R=>{if(!R)return s();if(b.statusCode=R.statusCode,b.statusMessage=R.statusMessage,b.etag=R.etag,b.headers={...R.headers,...v},s(),this.#o=this.#r.createWriteStream(this.#e,b),!(!this.#o||!R?.body))if(typeof R.body.values=="function"){let w=R.body.values(),P=a(()=>{for(let k of w){let Q=this.#o.write(k)===!1;if(this.#i.onResponseData?.(e,k),Q)break}},"streamCachedBody");this.#o.on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("drain",()=>{P()}).on("close",function(){c.#o===this&&(c.#o=void 0)}),P()}else typeof R.body.on=="function"&&(R.body.on("data",w=>{this.#o.write(w),this.#i.onResponseData?.(e,w)}).on("end",()=>{this.#o.end()}).on("error",()=>{this.#o=void 0,this.#r.delete(this.#e)}),this.#o.on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("close",function(){c.#o===this&&(c.#o=void 0)}))},"handle304"),x=this.#r.get(this.#e);x&&typeof x.then=="function"?x.then(I):I(x)}else{if(typeof n.etag=="string"&&SUo(n.etag)&&(b.etag=n.etag),this.#o=this.#r.createWriteStream(this.#e,b),!this.#o)return s();this.#o.on("drain",()=>e.resume()).on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("close",function(){c.#o===this&&(c.#o=void 0),e.resume()}),s()}}onResponseData(e,r){this.#o?.write(r)===!1&&e.pause(),this.#i.onResponseData?.(e,r)}onResponseEnd(e,r){this.#o?.end(),this.#i.onResponseEnd?.(e,r)}onResponseError(e,r){this.#o?.destroy(r),this.#o=void 0,this.#i.onResponseError?.(e,r)}};function RUo(t,e,r,n,o){return!(e<200||xUo.includes(e)||!lCn.includes(e)&&!r.expires&&!n.public&&n["max-age"]===void 0&&!(n.private&&t==="private")&&!(n["s-maxage"]!==void 0&&t==="shared")||n["no-store"]||t==="shared"&&n.private===!0||r.vary?.includes("*")||o?.authorization&&(!n.public&&!n["s-maxage"]&&!n["must-revalidate"]||typeof o.authorization!="string"||Array.isArray(n["no-cache"])&&n["no-cache"].includes("authorization")||Array.isArray(n.private)&&n.private.includes("authorization")))}a(RUo,"canCacheResponse");function PUo(t){let e=parseInt(Array.isArray(t)?t[0]:t);return isNaN(e)?void 0:e*1e3}a(PUo,"getAge");function kUo(t,e,r,n,o,s){if(t==="shared"){let l=s["s-maxage"];if(l!==void 0)return l>0?l*1e3:void 0}let c=s["max-age"];if(c!==void 0)return c>0?c*1e3:void 0;if(typeof n.expires=="string"){let l=cCn(n.expires);if(l)return e>=l.getTime()||o&&(o>=l||r!==void 0&&r>l-o)?void 0:l.getTime()-e}if(typeof n["last-modified"]=="string"){let l=new Date(n["last-modified"]);if(MUo(l))return l.getTime()>=e?void 0:(e-l.getTime())*.1}if(s.immutable)return 31536e3}a(kUo,"determineStaleAt");function NUo(t,e,r){let n=-1/0,o=-1/0,s=-1/0;if(e["stale-while-revalidate"]&&(n=r+e["stale-while-revalidate"]*1e3),e["stale-if-error"]&&(o=r+e["stale-if-error"]*1e3),e.immutable&&n===-1/0&&o===-1/0&&(s=t+31536e6),n===-1/0&&o===-1/0&&s===-1/0){let c=r-t;return r+c}return Math.max(r,n,o,s)}a(NUo,"determineDeleteAt");function DUo(t,e){let r=["connection","proxy-authenticate","proxy-authentication-info","proxy-authorization","proxy-connection","te","transfer-encoding","upgrade","age"];t.connection&&(Array.isArray(t.connection)?r.push(...t.connection.map(o=>o.trim())):r.push(...t.connection.split(",").map(o=>o.trim()))),Array.isArray(e["no-cache"])&&r.push(...e["no-cache"]),Array.isArray(e.private)&&r.push(...e.private);let n;for(let o of r)t[o]&&(n??={...t},delete n[o]);return n??t}a(DUo,"stripNecessaryHeaders");function MUo(t){return t instanceof Date&&Number.isFinite(t.valueOf())}a(MUo,"isValidDate");uCn.exports=bGt});var SGt=T((zFu,hCn)=>{"use strict";f();var{Writable:OUo}=require("node:stream"),{EventEmitter:BUo}=require("node:events"),{assertCacheKey:fCn,assertCacheValue:LUo}=aae(),TGt=class extends BUo{static{a(this,"MemoryCacheStore")}#e=1024;#t=104857600;#n=5242880;#r=0;#i=0;#o=new Map;#a=!1;constructor(e){if(super(),e){if(typeof e!="object")throw new TypeError("MemoryCacheStore options must be an object");if(e.maxCount!==void 0){if(typeof e.maxCount!="number"||!Number.isInteger(e.maxCount)||e.maxCount<0)throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer");this.#e=e.maxCount}if(e.maxSize!==void 0){if(typeof e.maxSize!="number"||!Number.isInteger(e.maxSize)||e.maxSize<0)throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer");this.#t=e.maxSize}if(e.maxEntrySize!==void 0){if(typeof e.maxEntrySize!="number"||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer");this.#n=e.maxEntrySize}}}get size(){return this.#r}isFull(){return this.#r>=this.#t||this.#i>=this.#e}get(e){fCn(e);let r=`${e.origin}:${e.path}`,n=Date.now(),o=this.#o.get(r),s=o?pCn(e,o,n):null;return s==null?void 0:{statusMessage:s.statusMessage,statusCode:s.statusCode,headers:s.headers,body:s.body,vary:s.vary?s.vary:void 0,etag:s.etag,cacheControlDirectives:s.cacheControlDirectives,cachedAt:s.cachedAt,staleAt:s.staleAt,deleteAt:s.deleteAt}}createWriteStream(e,r){fCn(e),LUo(r);let n=`${e.origin}:${e.path}`,o=this,s={...e,...r,body:[],size:0};return new OUo({write(c,l,u){typeof c=="string"&&(c=Buffer.from(c,l)),s.size+=c.byteLength,s.size>=o.#n?this.destroy():s.body.push(c),u(null)},final(c){let l=o.#o.get(n);l||(l=[],o.#o.set(n,l));let u=pCn(e,l,Date.now());if(u){let d=l.indexOf(u);l.splice(d,1,s),o.#r-=u.size}else l.push(s),o.#i+=1;if(o.#r+=s.size,o.#r>o.#t||o.#i>o.#e){o.#a||(o.emit("maxSizeExceeded",{size:o.#r,maxSize:o.#t,count:o.#i,maxCount:o.#e}),o.#a=!0);for(let[d,p]of o.#o){for(let h of p.splice(0,p.length/2))o.#r-=h.size,o.#i-=1;p.length===0&&o.#o.delete(d)}o.#rn.deleteAt>r&&n.method===t.method&&(n.vary==null||Object.keys(n.vary).every(o=>n.vary[o]===null?t.headers[o]===void 0:n.vary[o]===t.headers[o])))}a(pCn,"findEntry");hCn.exports=TGt});var gCn=T((JFu,mCn)=>{"use strict";f();var FUo=require("node:assert"),IGt=class{static{a(this,"CacheRevalidationHandler")}#e=!1;#t;#n;#r;#i;constructor(e,r,n){if(typeof e!="function")throw new TypeError("callback must be a function");this.#t=e,this.#n=r,this.#i=n}onRequestStart(e,r){this.#e=!1,this.#r=r}onRequestUpgrade(e,r,n,o){this.#n.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){if(FUo(this.#t!=null),this.#e=r===304||this.#i&&r>=500&&r<=504,this.#t(this.#e,this.#r),this.#t=null,this.#e)return!0;this.#n.onRequestStart?.(e,this.#r),this.#n.onResponseStart?.(e,r,n,o)}onResponseData(e,r){if(!this.#e)return this.#n.onResponseData?.(e,r)}onResponseEnd(e,r){this.#e||this.#n.onResponseEnd?.(e,r)}onResponseError(e,r){if(!this.#e)if(this.#t&&(this.#t(!1),this.#t=null),typeof this.#n.onResponseError=="function")this.#n.onResponseError(e,r);else throw r}};mCn.exports=IGt});var CCn=T((e9u,ECn)=>{"use strict";f();var ACn=require("node:assert"),{Readable:UUo}=require("node:stream"),cae=eo(),wbe=dCn(),QUo=SGt(),qUo=gCn(),{assertCacheStore:GUo,assertCacheMethods:HUo,makeCacheKey:jUo,normalizeHeaders:$Uo,parseCacheControlHeader:VUo}=aae(),{AbortError:WUo}=Oi();function zUo(t,e){if(t!==void 0){if(!Array.isArray(t))throw new TypeError(`expected ${e} to be an array or undefined, got ${typeof t}`);for(let r=0;r{},"nop");function YUo(t,e,{headers:r={}}){return!!(e?.["no-cache"]||t.cacheControlDirectives?.["no-cache"]&&!Array.isArray(t.cacheControlDirectives["no-cache"])||r["if-modified-since"]||r["if-none-match"])}a(YUo,"needsRevalidation");function KUo(t,e){let r=Date.now();if(r>t.staleAt){if(e?.["max-stale"]){let n=t.staleAt+e["max-stale"]*1e3;return r>n}return!0}if(e?.["min-fresh"]){let n=t.staleAt-r,o=e["min-fresh"]*1e3;return n<=o}return!1}a(KUo,"isStale");function JUo(t){let e=t.cacheControlDirectives?.["stale-while-revalidate"];if(!e)return!1;let r=Date.now(),n=t.staleAt+e*1e3;return r<=n}a(JUo,"withinStaleWhileRevalidateWindow");function XUo(t,e,r,n,o,s){if(s?.["only-if-cached"]){let c=!1;try{if(typeof n.onConnect=="function"&&(n.onConnect(()=>{c=!0}),c)||typeof n.onHeaders=="function"&&(n.onHeaders(504,[],wGt,"Gateway Timeout"),c))return;typeof n.onComplete=="function"&&n.onComplete([])}catch(l){typeof n.onError=="function"&&n.onError(l)}return!0}return t(o,new wbe(e,r,n))}a(XUo,"handleUncachedResponse");function xGt(t,e,r,n,o,s){let c=cae.isStream(r.body)?r.body:UUo.from(r.body??[]);ACn(!c.destroyed,"stream should not be destroyed"),ACn(!c.readableDidRead,"stream should not be readableDidRead");let l={resume(){c.resume()},pause(){c.pause()},get paused(){return c.isPaused()},get aborted(){return c.destroyed},get reason(){return c.errored},abort(d){c.destroy(d??new WUo)}};if(c.on("error",function(d){if(!this.readableEnded)if(typeof t.onResponseError=="function")t.onResponseError(l,d);else throw d}).on("close",function(){this.errored||t.onResponseEnd?.(l,{})}),t.onRequestStart?.(l,o),c.destroyed)return;let u={...r.headers,age:String(n)};s&&(u.warning='110 - "response is stale"'),t.onResponseStart?.(l,r.statusCode,u,r.statusMessage),e.method==="HEAD"?c.destroy():c.on("data",function(d){t.onResponseData?.(l,d)})}a(xGt,"sendCachedValue");function yCn(t,e,r,n,o,s,c){if(!c)return XUo(t,e,r,n,o,s);let l=Date.now();if(l>c.deleteAt)return t(o,new wbe(e,r,n));let u=Math.round((l-c.cachedAt)/1e3);if(s?.["max-age"]&&u>=s["max-age"])return t(o,n);let d=KUo(c,s),p=YUo(c,s,o);if(d||p){if(cae.isStream(o.body)&&cae.bodyLength(o.body)!==0)return t(o,new wbe(e,r,n));if(!p&&JUo(c))return xGt(n,o,c,u,null,!0),queueMicrotask(()=>{let A={...o.headers,"if-modified-since":new Date(c.cachedAt).toUTCString()};if(c.etag&&(A["if-none-match"]=c.etag),c.vary)for(let y in c.vary)c.vary[y]!=null&&(A[y]=c.vary[y]);t({...o,headers:A},new wbe(e,r,{onRequestStart(){},onRequestUpgrade(){},onResponseStart(){},onResponseData(){},onResponseEnd(){},onResponseError(){}}))}),!0;let h=!1,m=c.cacheControlDirectives["stale-if-error"]??s?.["stale-if-error"];m&&(h=l{A?xGt(n,o,c,u,y,d):cae.isStream(c.body)&&c.body.on("error",wGt).destroy()},new wbe(e,r,n),h))}cae.isStream(o.body)&&o.body.on("error",wGt).destroy(),xGt(n,o,c,u,null,!1)}a(yCn,"handleResult");ECn.exports=(t={})=>{let{store:e=new QUo,methods:r=["GET"],cacheByDefault:n=void 0,type:o="shared",origins:s=void 0}=t;if(typeof t!="object"||t===null)throw new TypeError(`expected type of opts to be an Object, got ${t===null?"null":typeof t}`);if(GUo(e,"opts.store"),HUo(r,"opts.methods"),zUo(s,"opts.origins"),typeof n<"u"&&typeof n!="number")throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof n}`);if(typeof o<"u"&&o!=="shared"&&o!=="private")throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof o}`);let c={store:e,methods:r,cacheByDefault:n,type:o},l=cae.safeHTTPMethods.filter(u=>r.includes(u)===!1);return u=>(d,p)=>{if(!d.origin||l.includes(d.method))return u(d,p);if(s!==void 0){let A=d.origin.toString().toLowerCase(),y=!1;for(let E=0;EyCn(u,c,m,p,d,h,A)):yCn(u,c,m,p,d,h,g)}}});var SCn=T((n9u,TCn)=>{"use strict";f();var{createInflate:RGt,createGunzip:_Cn,createBrotliDecompress:ZUo,createZstdDecompress:eQo}=require("node:zlib"),{pipeline:tQo}=require("node:stream"),rQo=sae(),{runtimeFeatures:nQo}=_4(),vCn={gzip:_Cn,"x-gzip":_Cn,br:ZUo,deflate:RGt,compress:RGt,"x-compress":RGt,...nQo.has("zstd")?{zstd:eQo}:{}},iQo=[204,304],bCn=!1,PGt=class extends rQo{static{a(this,"DecompressHandler")}#e=[];#t;#n;constructor(e,{skipStatusCodes:r=iQo,skipErrorResponses:n=!0}={}){super(e),this.#t=r,this.#n=n}#r(e,r){return!!(!e||r<200||this.#t.includes(r)||this.#n&&r>=400)}#i(e){let r=e.split(","),n=5;if(r.length>n)throw new Error(`too many content-encodings in response: ${r.length}, maximum allowed is ${n}`);let o=[];for(let s=r.length-1;s>=0;s--){let c=r[s].trim();if(c){if(!vCn[c])return o.length=0,o;o.push(vCn[c]())}}return o}#o(e,r){e.on("readable",()=>{let n;for(;(n=e.read())!==null&&super.onResponseData(r,n)!==!1;);}),e.on("error",n=>{super.onResponseError(r,n)})}#a(e){let r=this.#e[0];this.#o(r,e),r.on("end",()=>{super.onResponseEnd(e,{})})}#s(e){let r=this.#e[this.#e.length-1];this.#o(r,e),tQo(this.#e,n=>{if(n){super.onResponseError(e,n);return}super.onResponseEnd(e,{})})}#c(){this.#e.length=0}onResponseStart(e,r,n,o){let s=n["content-encoding"];if(this.#r(s,r))return super.onResponseStart(e,r,n,o);let c=this.#i(s.toLowerCase());if(c.length===0)return this.#c(),super.onResponseStart(e,r,n,o);this.#e=c;let{"content-encoding":l,"content-length":u,...d}=n;return this.#e.length===1?this.#a(e):this.#s(e),super.onResponseStart(e,r,d,o)}onResponseData(e,r){if(this.#e.length>0){this.#e[0].write(r);return}super.onResponseData(e,r)}onResponseEnd(e,r){if(this.#e.length>0){this.#e[0].end(),this.#c();return}super.onResponseEnd(e,r)}onResponseError(e,r){if(this.#e.length>0){for(let n of this.#e)n.destroy(r);this.#c()}super.onResponseError(e,r)}};function oQo(t={}){return bCn||(process.emitWarning("DecompressInterceptor is experimental and subject to change","ExperimentalWarning"),bCn=!0),e=>(r,n)=>{let o=new PGt(n,t);return e(r,o)}}a(oQo,"createDecompressInterceptor");TCn.exports=oQo});var wCn=T((s9u,xCn)=>{"use strict";f();var{RequestAbortedError:sQo}=Oi(),ICn=5*1024*1024,kGt=class{static{a(this,"DeduplicationHandler")}#e;#t=[];#n=ICn;#r=0;#i={};#o="";#a=!1;#s=!1;#c=!1;#l=!1;#u=null;#f=null;constructor(e,r,n=ICn){this.#e=e,this.#f=r,this.#n=n}addWaitingHandler(e){if(this.#l||this.#c)return!1;let r=this.#p(e),n=r.controller;try{if(e.onRequestStart?.(n,null),n.aborted)return r.done=!0,!0;this.#s&&e.onResponseStart?.(n,this.#r,this.#i,this.#o)}catch{return r.done=!0,!0}return n.aborted||this.#t.push(r),!0}onRequestStart(e,r){this.#u=e,this.#e.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.#e.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){this.#s=!0,this.#r=r,this.#i=n,this.#o=o,this.#e.onResponseStart?.(e,r,n,o);for(let s of this.#t){let{handler:c,controller:l}=s;if(s.done||l.aborted){s.done=!0;continue}try{c.onResponseStart?.(l,r,n,o)}catch{}l.aborted&&(s.done=!0)}this.#g()}onResponseData(e,r){if(!(this.#a||this.#l)){this.#c=!0,this.#e.onResponseData?.(e,r);for(let n of this.#t){let{handler:o,controller:s}=n;if(n.done||s.aborted){n.done=!0;continue}if(s.paused){this.#h(n,r);continue}try{o.onResponseData?.(s,r)}catch{}s.aborted&&(n.done=!0,n.bufferedChunks=[],n.bufferedBytes=0)}this.#g()}}onResponseEnd(e,r){if(!(this.#a||this.#l)){this.#l=!0,this.#e.onResponseEnd?.(e,r);for(let n of this.#t){if(n.done||n.controller.aborted){n.done=!0;continue}if(this.#m(n),n.done||n.controller.aborted){n.done=!0;continue}if(n.controller.paused&&n.bufferedChunks.length>0){n.pendingTrailers=r;continue}try{n.handler.onResponseEnd?.(n.controller,r)}catch{}n.done=!0}this.#g(),this.#f?.()}}onResponseError(e,r){if(!this.#l){this.#a=!0,this.#l=!0,this.#e.onResponseError?.(e,r);for(let n of this.#t)this.#E(n,r);this.#t=[],this.#f?.()}}#p(e){let r={handler:e,controller:null,bufferedChunks:[],bufferedBytes:0,pendingTrailers:null,done:!1},n={aborted:!1,paused:!1,reason:null};return r.controller={resume:a(()=>{if(!n.aborted){if(n.paused=!1,this.#m(r),this.#l&&r.pendingTrailers&&r.bufferedChunks.length===0&&!n.paused&&!n.aborted){try{r.handler.onResponseEnd?.(r.controller,r.pendingTrailers)}catch{}r.pendingTrailers=null,r.done=!0}this.#g()}},"resume"),pause:a(()=>{n.aborted||(n.paused=!0)},"pause"),get paused(){return n.paused},get aborted(){return n.aborted},get reason(){return n.reason},abort:a(o=>{n.aborted=!0,n.reason=o??null,r.done=!0,r.pendingTrailers=null,r.bufferedChunks=[],r.bufferedBytes=0},"abort")},r}#h(e,r){if(e.done||e.controller.aborted){e.done=!0,e.bufferedChunks=[],e.bufferedBytes=0;return}let n=Buffer.from(r);if(e.bufferedChunks.push(n),e.bufferedBytes+=n.length,e.bufferedBytes>this.#n){let o=new sQo(`Deduplicated waiting handler exceeded maxBufferSize (${this.#n} bytes) while paused`);this.#E(e,o)}}#m(e){let{handler:r,controller:n}=e;for(;!e.done&&!n.aborted&&!n.paused&&e.bufferedChunks.length>0;){let o=e.bufferedChunks.shift();e.bufferedBytes-=o.length;try{r.onResponseData?.(n,o)}catch{}if(n.aborted){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;break}}}#E(e,r){if(!e.done){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;try{e.controller.abort(r),e.handler.onResponseError?.(e.controller,r)}catch{}}}#g(){this.#t=this.#t.filter(e=>e.done===!1)}};xCn.exports=kGt});var PCn=T((l9u,RCn)=>{"use strict";f();var aQo=require("node:diagnostics_channel"),cQo=eo(),lQo=wCn(),{normalizeHeaders:uQo,makeCacheKey:dQo,makeDeduplicationKey:fQo}=aae(),Jze=aQo.channel("undici:request:pending-requests");RCn.exports=(t={})=>{let{methods:e=["GET"],skipHeaderNames:r=[],excludeHeaderNames:n=[],maxBufferSize:o=5*1024*1024}=t;if(typeof t!="object"||t===null)throw new TypeError(`expected type of opts to be an Object, got ${t===null?"null":typeof t}`);if(!Array.isArray(e))throw new TypeError(`expected opts.methods to be an array, got ${typeof e}`);for(let u of e)if(!cQo.safeHTTPMethods.includes(u))throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${u}`);if(!Array.isArray(r))throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof r}`);if(!Array.isArray(n))throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof n}`);if(!Number.isFinite(o)||o<=0)throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${o}`);let s=new Set(r.map(u=>u.toLowerCase())),c=new Set(n.map(u=>u.toLowerCase())),l=new Map;return u=>(d,p)=>{if(!d.origin||e.includes(d.method)===!1)return u(d,p);if(d={...d,headers:uQo(d)},s.size>0){for(let y of Object.keys(d.headers))if(s.has(y.toLowerCase()))return u(d,p)}let h=dQo(d),m=fQo(h,c),g=l.get(m);if(g)return g.addWaitingHandler(p)?!0:u(d,p);let A=new lQo(p,()=>{l.delete(m),Jze.hasSubscribers&&Jze.publish({size:l.size,key:m,type:"removed"})},o);return l.set(m,A),Jze.hasSubscribers&&Jze.publish({size:l.size,key:m,type:"added"}),u(d,A)}}});var DCn=T((f9u,NCn)=>{"use strict";f();var{Writable:pQo}=require("node:stream"),{assertCacheKey:NGt,assertCacheValue:hQo}=aae(),DGt,Dv=3,kCn=2*1e3*1e3*1e3;NCn.exports=class{static{a(this,"SqliteCacheStore")}#e=kCn;#t=1/0;#n;#r;#i;#o;#a;#s;#c;#l;constructor(e){if(e){if(typeof e!="object")throw new TypeError("SqliteCacheStore options must be an object");if(e.maxEntrySize!==void 0){if(typeof e.maxEntrySize!="number"||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer");if(e.maxEntrySize>kCn)throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb");this.#e=e.maxEntrySize}if(e.maxCount!==void 0){if(typeof e.maxCount!="number"||!Number.isInteger(e.maxCount)||e.maxCount<0)throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer");this.#t=e.maxCount}}DGt||(DGt=require("node:sqlite").DatabaseSync),this.#n=new DGt(e?.location??":memory:"),this.#n.exec(` +${e.format(r)}`.trim())}};E_n.exports=xGt});var RGt=T((g7u,b_n)=>{"use strict";f();var{InvalidArgumentError:mQo}=Ni(),{runtimeFeatures:gQo}=nO();function AQo(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:n=[],caseSensitive:o=!1}=t;return{ignore:new Set(e.map(s=>o?s:s.toLowerCase())),exclude:new Set(r.map(s=>o?s:s.toLowerCase())),match:new Set(n.map(s=>o?s:s.toLowerCase()))}}a(AQo,"createHeaderFilters");var __n=gQo.has("crypto")?require("node:crypto"):null,yQo=__n?.hash?t=>__n.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function v_n(t){return Array.isArray(t)&&(t.length&1)===0}a(v_n,"isUndiciHeaders");function EQo(t=[]){return t.length===0?()=>!1:a(function(r){let n;for(let o of t)if(typeof o=="string"){if(n||(n=r.toLowerCase()),n.includes(o.toLowerCase()))return!0}else if(o instanceof RegExp&&o.test(r))return!0;return!1},"isUrlExcluded")}a(EQo,"isUrlExcludedFactory");function _Qo(t){let e={};if(!t)return e;if(v_n(t)){for(let r=0;r{"use strict";f();var{writeFile:vQo,readFile:bQo,mkdir:TQo}=require("node:fs/promises"),{dirname:SQo,resolve:T_n}=require("node:path"),{setTimeout:IQo,clearTimeout:S_n}=require("node:timers"),{InvalidArgumentError:I_n,UndiciError:xQo}=Ni(),{hashId:wQo,isUrlExcludedFactory:RQo,normalizeHeaders:x_n,createHeaderFilters:w_n}=RGt();function Cve(t,e,r={}){let n=new URL(t.path,t.origin),o=t._normalizedHeaders||x_n(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=o),{method:t.method||"GET",url:r.matchQuery!==!1?n.toString():`${n.origin}${n.pathname}`,headers:R_n(o,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}a(Cve,"formatRequestKey");function R_n(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,o={},{ignore:s,exclude:c,match:l}=e;for(let[u,d]of Object.entries(t)){let p=n?u:u.toLowerCase();c.has(p)||s.has(p)||l.size!==0&&!l.has(p)||(o[p]=d)}return o}a(R_n,"filterHeadersForMatching");function P_n(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,o={},{exclude:s}=e;for(let[c,l]of Object.entries(t)){let u=n?c:c.toLowerCase();s.has(u)||(o[u]=l)}return o}a(P_n,"filterHeadersForStorage");function vve(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let n=Object.keys(t.headers).sort();for(let o of n){let s=Array.isArray(t.headers[o])?t.headers[o]:[t.headers[o]];e.push(o);for(let c of s.sort())e.push(String(c))}}e.push(t.body);let r=e.join("|");return wQo(r)}a(vve,"createRequestHash");var PGt=class{static{a(this,"SnapshotRecorder")}#e;#t;#n=new Map;#r;#i=1/0;#o=!1;#a;constructor(e={}){this.#r=e.snapshotPath,this.#i=e.maxSnapshots||1/0,this.#o=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=w_n(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=RQo(e.excludeUrls),this.#o&&this.#r&&this.#s()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let n=Cve(e,this.#a,this.matchOptions),o=vve(n),s=x_n(r.headers),c={statusCode:r.statusCode,headers:P_n(s,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#n.size>=this.#i&&!this.#n.has(o)){let u=this.#n.keys().next().value;this.#n.delete(u)}let l=this.#n.get(o);l&&l.responses?(l.responses.push(c),l.timestamp=new Date().toISOString()):this.#n.set(o,{request:n,responses:[c],callCount:0,timestamp:new Date().toISOString()}),this.#o&&this.#r&&this.#l()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=Cve(e,this.#a,this.matchOptions),n=vve(r),o=this.#n.get(n);if(!o)return;let s=o.callCount||0,c=Math.min(s,o.responses.length-1);return o.callCount=s+1,{...o,response:o.responses[c]}}async loadSnapshots(e){let r=e||this.#r;if(!r)throw new I_n("Snapshot path is required");try{let n=await bQo(T_n(r),"utf8"),o=JSON.parse(n);if(Array.isArray(o)){this.#n.clear();for(let{hash:s,snapshot:c}of o)this.#n.set(s,c)}else this.#n=new Map(Object.entries(o))}catch(n){if(n.code==="ENOENT")this.#n.clear();else throw new xQo(`Failed to load snapshots from ${r}`,{cause:n})}}async saveSnapshots(e){let r=e||this.#r;if(!r)throw new I_n("Snapshot path is required");let n=T_n(r);await TQo(SQo(n),{recursive:!0});let o=Array.from(this.#n.entries()).map(([s,c])=>({hash:s,snapshot:c}));await vQo(n,JSON.stringify(o,null,2),{flush:!0})}clear(){this.#n.clear()}getSnapshots(){return Array.from(this.#n.values())}size(){return this.#n.size}resetCallCounts(){for(let e of this.#n.values())e.callCount=0}deleteSnapshot(e){let r=Cve(e,this.#a,this.matchOptions),n=vve(r);return this.#n.delete(n)}getSnapshotInfo(e){let r=Cve(e,this.#a,this.matchOptions),n=vve(r),o=this.#n.get(n);return o?{hash:n,request:o.request,responseCount:o.responses?o.responses.length:o.response?1:0,callCount:o.callCount||0,timestamp:o.timestamp}:null}replaceSnapshots(e){if(this.#n.clear(),Array.isArray(e))for(let{hash:r,snapshot:n}of e)this.#n.set(r,n);else e&&typeof e=="object"&&(this.#n=new Map(Object.entries(e)))}#s(){return this.#l()}#c(){this.#e&&(S_n(this.#e),this.saveSnapshots().catch(()=>{}),this.#e=null)}#l(){this.#e=IQo(()=>{this.saveSnapshots().catch(()=>{}),this.#o?this.#e?.refresh():this.#e=null},1e3)}destroy(){this.#c(),this.#e&&(S_n(this.#e),this.#e=null)}async close(){this.#r&&this.#n.size!==0&&await this.saveSnapshots(),this.destroy()}};k_n.exports={SnapshotRecorder:PGt,formatRequestKey:Cve,createRequestHash:vve,filterHeadersForMatching:R_n,filterHeadersForStorage:P_n,createHeaderFilters:w_n}});var O_n=T((v7u,M_n)=>{"use strict";f();var PQo=SV(),kQo=wGt(),{SnapshotRecorder:DQo}=D_n(),NQo=B1e(),{InvalidArgumentError:MQo,UndiciError:OQo}=Ni(),{validateSnapshotMode:BQo}=RGt(),S_=Symbol("kSnapshotRecorder"),E5=Symbol("kSnapshotMode"),bve=Symbol("kSnapshotPath"),kGt=Symbol("kSnapshotLoaded"),rze=Symbol("kRealAgent"),N_n=!1,DGt=class extends kQo{static{a(this,"SnapshotAgent")}constructor(e={}){N_n||(process.emitWarning("SnapshotAgent is experimental and subject to change","ExperimentalWarning"),N_n=!0);let{mode:r="record",snapshotPath:n=null,...o}=e;if(super(o),BQo(r),(r==="playback"||r==="update")&&!n)throw new MQo(`snapshotPath is required when mode is '${r}'`);this[E5]=r,this[bve]=n,this[S_]=new DQo({snapshotPath:this[bve],mode:this[E5],maxSnapshots:e.maxSnapshots,autoFlush:e.autoFlush,flushInterval:e.flushInterval,matchHeaders:e.matchHeaders,ignoreHeaders:e.ignoreHeaders,excludeHeaders:e.excludeHeaders,matchBody:e.matchBody,matchQuery:e.matchQuery,caseSensitive:e.caseSensitive,shouldRecord:e.shouldRecord,shouldPlayback:e.shouldPlayback,excludeUrls:e.excludeUrls}),this[kGt]=!1,(this[E5]==="record"||this[E5]==="update"||this[E5]==="playback"&&e.excludeUrls&&e.excludeUrls.length>0)&&(this[rze]=new PQo(e)),(this[E5]==="playback"||this[E5]==="update")&&this[bve]&&this.loadSnapshots().catch(()=>{})}dispatch(e,r){r=NQo.wrap(r);let n=this[E5];if(this[S_].isUrlExcluded(e))return this[rze].dispatch(e,r);if(n==="playback"||n==="update"){if(!this[kGt])return this.#e(e,r);let o=this[S_].findSnapshot(e);if(o)return this.#n(o,r);if(n==="update")return this.#t(e,r);{let s=new OQo(`No snapshot found for ${e.method||"GET"} ${e.path}`);if(r.onError){r.onError(s);return}throw s}}else if(n==="record")return this.#t(e,r)}async#e(e,r){return await this.loadSnapshots(),this.dispatch(e,r)}#t(e,r){let n={statusCode:null,headers:{},trailers:{},body:[]},o=this,s={onRequestStart(l,u){return r.onRequestStart(l,{...u,history:this.history})},onRequestUpgrade(l,u,d,p){return r.onRequestUpgrade(l,u,d,p)},onResponseStart(l,u,d,p){return n.statusCode=u,n.headers=d,r.onResponseStart(l,u,d,p)},onResponseData(l,u){return n.body.push(u),r.onResponseData(l,u)},onResponseEnd(l,u){n.trailers=u;let d=Buffer.concat(n.body);o[S_].record(e,{statusCode:n.statusCode,headers:n.headers,body:d,trailers:n.trailers}).then(()=>r.onResponseEnd(l,u)).catch(p=>r.onResponseError(l,p))}};return this[rze].dispatch(e,s)}#n(e,r){try{let{response:n}=e,o={pause(){},resume(){},abort(c){this.aborted=!0,this.reason=c},aborted:!1,paused:!1};r.onRequestStart(o),r.onResponseStart(o,n.statusCode,n.headers);let s=Buffer.from(n.body,"base64");r.onResponseData(o,s),r.onResponseEnd(o,n.trailers)}catch(n){r.onError?.(n)}}async loadSnapshots(e){await this[S_].loadSnapshots(e||this[bve]),this[kGt]=!0,this[E5]==="playback"&&this.#r()}async saveSnapshots(e){return this[S_].saveSnapshots(e||this[bve])}#r(){for(let e of this[S_].getSnapshots()){let{request:r,responses:n,response:o}=e,s=new URL(r.url),c=this.get(s.origin),l=n?n[0]:o;l&&c.intercept({path:s.pathname+s.search,method:r.method,headers:r.headers,body:r.body}).reply(l.statusCode,l.body,{headers:l.headers,trailers:l.trailers}).persist()}}getRecorder(){return this[S_]}getMode(){return this[E5]}clearSnapshots(){this[S_].clear()}resetCallCounts(){this[S_].resetCallCounts()}deleteSnapshot(e){return this[S_].deleteSnapshot(e)}getSnapshotInfo(e){return this[S_].getSnapshotInfo(e)}replaceSnapshots(e){this[S_].replaceSnapshots(e)}async close(){await this[S_].close(),await this[rze]?.close(),await super.close()}};M_n.exports=DGt});var nze=T((S7u,U_n)=>{"use strict";f();var B_n=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:LQo}=Ni(),FQo=SV();F_n()===void 0&&L_n(new FQo);function L_n(t){if(!t||typeof t.dispatch!="function")throw new LQo("Argument agent must implement Agent");Object.defineProperty(globalThis,B_n,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(L_n,"setGlobalDispatcher");function F_n(){return globalThis[B_n]}a(F_n,"getGlobalDispatcher");var UQo=["fetch","Headers","Response","Request","FormData","WebSocket","CloseEvent","ErrorEvent","MessageEvent","EventSource"];U_n.exports={setGlobalDispatcher:L_n,getGlobalDispatcher:F_n,installedExports:UQo}});var _se=T((R7u,Q_n)=>{"use strict";f();var fO=require("node:assert"),QQo=B1e();Q_n.exports=class{static{a(this,"DecoratorHandler")}#e;#t=!1;#n=!1;#r=!1;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=QQo.wrap(e)}onRequestStart(...e){this.#e.onRequestStart?.(...e)}onRequestUpgrade(...e){return fO(!this.#t),fO(!this.#n),this.#e.onRequestUpgrade?.(...e)}onResponseStart(...e){return fO(!this.#t),fO(!this.#n),fO(!this.#r),this.#r=!0,this.#e.onResponseStart?.(...e)}onResponseData(...e){return fO(!this.#t),fO(!this.#n),this.#e.onResponseData?.(...e)}onResponseEnd(...e){return fO(!this.#t),fO(!this.#n),this.#t=!0,this.#e.onResponseEnd?.(...e)}onResponseError(...e){return this.#n=!0,this.#e.onResponseError?.(...e)}onBodySent(){}}});var BGt=T((D7u,j_n)=>{"use strict";f();var I_=Ki(),{kBodyUsed:Tve}=rc(),OGt=require("node:assert"),{InvalidArgumentError:NGt}=Ni(),qQo=require("node:events"),GQo=[300,301,302,303,307,308],q_n=Symbol("body"),G_n=a(()=>{},"noop"),ize=class{static{a(this,"BodyAsyncIterable")}constructor(e){this[q_n]=e,this[Tve]=!1}async*[Symbol.asyncIterator](){OGt(!this[Tve],"disturbed"),this[Tve]=!0,yield*this[q_n]}},MGt=class t{static{a(this,"RedirectHandler")}static buildDispatch(e,r){if(r!=null&&(!Number.isInteger(r)||r<0))throw new NGt("maxRedirections must be a positive number");let n=e.dispatch.bind(e);return(o,s)=>n(o,new t(n,r,o,s))}constructor(e,r,n,o){if(r!=null&&(!Number.isInteger(r)||r<0))throw new NGt("maxRedirections must be a positive number");this.dispatch=e,this.location=null;let{maxRedirections:s,...c}=n;this.opts=c,this.maxRedirections=r,this.handler=o,this.history=[],I_.isStream(this.opts.body)?(I_.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){OGt(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[Tve]=!1,qQo.prototype.on.call(this.opts.body,"data",function(){this[Tve]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new ize(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&I_.isIterable(this.opts.body)&&!I_.isFormDataLike(this.opts.body)&&(this.opts.body=new ize(this.opts.body))}onRequestStart(e,r){this.handler.onRequestStart?.(e,{...r,history:this.history})}onRequestUpgrade(e,r,n,o){this.handler.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){if(this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections)throw new Error("max redirects");if((r===301||r===302)&&this.opts.method==="POST"&&(this.opts.method="GET",I_.isStream(this.opts.body)&&I_.destroy(this.opts.body.on("error",G_n)),this.opts.body=null),r===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",I_.isStream(this.opts.body)&&I_.destroy(this.opts.body.on("error",G_n)),this.opts.body=null),this.location=this.history.length>=this.maxRedirections||I_.isDisturbed(this.opts.body)||GQo.indexOf(r)===-1?null:n.location,this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location){this.handler.onResponseStart?.(e,r,n,o);return}let{origin:s,pathname:c,search:l}=I_.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),u=l?`${c}${l}`:c,d=`${s}${u}`;for(let p of this.history)if(p.toString()===d)throw new NGt(`Redirect loop detected. Cannot redirect to ${s}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);this.opts.headers=HQo(this.opts.headers,r===303,this.opts.origin!==s),this.opts.path=u,this.opts.origin=s,this.opts.query=null}onResponseData(e,r){this.location||this.handler.onResponseData?.(e,r)}onResponseEnd(e,r){this.location?this.dispatch(this.opts,this):this.handler.onResponseEnd(e,r)}onResponseError(e,r){this.handler.onResponseError?.(e,r)}};function H_n(t,e,r){if(t.length===4)return I_.headerNameToString(t)==="host";if(e&&I_.headerNameToString(t).startsWith("content-"))return!0;if(r&&(t.length===13||t.length===6||t.length===19)){let n=I_.headerNameToString(t);return n==="authorization"||n==="cookie"||n==="proxy-authorization"}return!1}a(H_n,"shouldRemoveHeader");function HQo(t,e,r){let n=[];if(Array.isArray(t))for(let o=0;o{"use strict";f();var jQo=BGt();function $Qo({maxRedirections:t}={}){return e=>a(function(n,o){let{maxRedirections:s=t,...c}=n;if(s==null||s===0)return e(n,o);let l={...c},u=new jQo(e,s,l,o);return e(l,u)},"Intercept")}a($Qo,"createRedirectInterceptor");$_n.exports=$Qo});var z_n=T((F7u,W_n)=>{"use strict";f();var VQo=_se(),{ResponseError:WQo}=Ni(),LGt=class extends VQo{static{a(this,"ResponseErrorHandler")}#e;#t;#n;#r;#i;constructor(e,{handler:r}){super(r)}#o(e){return(this.#t??"").indexOf(e)===0}onRequestStart(e,r){return this.#e=0,this.#t=null,this.#n=null,this.#r=null,this.#i="",super.onRequestStart(e,r)}onResponseStart(e,r,n,o){if(this.#e=r,this.#r=n,this.#t=n["content-type"],this.#e<400)return super.onResponseStart(e,r,n,o);(this.#o("application/json")||this.#o("text/plain"))&&(this.#n=new TextDecoder("utf-8"))}onResponseData(e,r){if(this.#e<400)return super.onResponseData(e,r);this.#i+=this.#n?.decode(r,{stream:!0})??""}onResponseEnd(e,r){if(this.#e>=400){if(this.#i+=this.#n?.decode(void 0,{stream:!1})??"",this.#o("application/json"))try{this.#i=JSON.parse(this.#i)}catch{}let n,o=Error.stackTraceLimit;Error.stackTraceLimit=0;try{n=new WQo("Response Error",this.#e,{body:this.#i,headers:this.#r})}finally{Error.stackTraceLimit=o}super.onResponseError(e,n)}else super.onResponseEnd(e,r)}onResponseError(e,r){super.onResponseError(e,r)}};W_n.exports=()=>t=>a(function(r,n){return t(r,new LGt(r,{handler:n}))},"Intercept")});var K_n=T((q7u,Y_n)=>{"use strict";f();var zQo=GWe();Y_n.exports=t=>e=>a(function(n,o){return e(n,new zQo({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var X_n=T((j7u,J_n)=>{"use strict";f();var{InvalidArgumentError:YQo,RequestAbortedError:KQo}=Ni(),JQo=_se(),FGt=class extends JQo{static{a(this,"DumpHandler")}#e=1024*1024;#t=!1;#n=0;#r=null;aborted=!1;reason=!1;constructor({maxSize:e,signal:r},n){if(e!=null&&(!Number.isFinite(e)||e<1))throw new YQo("maxSize must be a number greater than 0");super(n),this.#e=e??this.#e}#i(e){this.aborted=!0,this.reason=e}onRequestStart(e,r){return e.abort=this.#i.bind(this),this.#r=e,super.onRequestStart(e,r)}onResponseStart(e,r,n,o){let s=n["content-length"];if(s!=null&&s>this.#e)throw new KQo(`Response size (${s}) larger than maxSize (${this.#e})`);return this.aborted===!0?!0:super.onResponseStart(e,r,n,o)}onResponseError(e,r){this.#t||(r=this.#r?.reason??r,super.onResponseError(e,r))}onResponseData(e,r){return this.#n=this.#n+r.length,this.#n>=this.#e&&(this.#t=!0,this.aborted===!0?super.onResponseError(e,this.reason):super.onResponseEnd(e,{})),!0}onResponseEnd(e,r){if(!this.#t){if(this.#r.aborted===!0){super.onResponseError(e,this.reason);return}super.onResponseEnd(e,r)}}};function XQo({maxSize:t}={maxSize:1024*1024}){return e=>a(function(n,o){let{dumpMaxSize:s=t}=n,c=new FGt({maxSize:s,signal:n.signal},o);return e(n,c)},"Intercept")}a(XQo,"createDumpInterceptor");J_n.exports=XQo});var rCn=T((W7u,tCn)=>{"use strict";f();var{isIP:ZQo}=require("node:net"),{lookup:eqo}=require("node:dns"),tqo=_se(),{InvalidArgumentError:OV,InformationalError:rqo}=Ni(),UGt=Math.pow(2,31)-1;function nqo(t){let e=Object.getPrototypeOf(t);return Object.prototype.hasOwnProperty.call(t,Symbol.iterator)||e!=null&&e!==Object.prototype&&typeof t[Symbol.iterator]=="function"}a(nqo,"hasSafeIterator");function Z_n(t){return typeof t=="string"&&t.toLowerCase()==="host"}a(Z_n,"isHostHeader");function iqo(t){if(t==null)return null;if(Array.isArray(t)){if(t.length===0||!Array.isArray(t[0]))return t;let e=[];for(let r of t)Array.isArray(r)&&r.length===2?e.push(r[0],r[1]):e.push(r);return e}if(typeof t=="object"&&nqo(t)){let e=[];for(let r of t)Array.isArray(r)&&r.length===2?e.push(r[0],r[1]):e.push(r);return e}return t}a(iqo,"normalizeHeaders");function oqo(t){if(t==null)return!1;if(Array.isArray(t)){if(t.length===0)return!1;for(let e=0;e=this.#e}},qGt=class{static{a(this,"DNSInstance")}#e=0;#t=0;dualStack=!0;affinity=null;lookup=null;pick=null;storage=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#n,this.pick=e.pick??this.#r,this.storage=e.storage??new QGt(e)}runLookup(e,r,n){let o=this.storage.get(e.hostname);if(o==null&&this.storage.full()){n(null,e);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(c,l)=>{if(c||l==null||l.length===0){n(c??new rqo("No DNS entries found"));return}this.setRecords(e,l);let u=this.storage.get(e.hostname),d=this.pick(e,u,s.affinity),p;typeof d.port=="number"?p=`:${d.port}`:e.port!==""?p=`:${e.port}`:p="",n(null,new URL(`${e.protocol}//${d.family===6?`[${d.address}]`:d.address}${p}`))});else{let c=this.pick(e,o,s.affinity);if(c==null){this.storage.delete(e.hostname),this.runLookup(e,r,n);return}let l;typeof c.port=="number"?l=`:${c.port}`:e.port!==""?l=`:${e.port}`:l="",n(null,new URL(`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${l}`))}}#n(e,r,n){eqo(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let c=new Map;for(let l of s)c.set(`${l.address}:${l.family}`,l);n(null,c.values())})}#r(e,r,n){let o=null,{records:s,offset:c}=r,l;if(this.dualStack?(n==null&&(c==null||c===UGt?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?l=s[n]:l=s[n===4?6:4]):l=s[n],l==null||l.ips.length===0)return o;l.offset==null||l.offset===UGt?l.offset=0:l.offset++;let u=l.offset%l.ips.length;return o=l.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(l.ips.splice(u,1),this.pick(e,r,n)):o}pickFamily(e,r){let n=this.storage.get(e.hostname)?.records;if(!n)return null;let o=n[r];if(!o)return null;o.offset==null||o.offset===UGt?o.offset=0:o.offset++;let s=o.offset%o.ips.length,c=o.ips[s]??null;return c==null||Date.now()-c.timestamp>c.ttl&&o.ips.splice(s,1),c}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}},s=this.#e;for(let c of r){c.timestamp=n,typeof c.ttl=="number"?(c.ttl=Math.min(c.ttl,this.#e),s=Math.min(s,c.ttl)):c.ttl=this.#e;let l=o.records[c.family]??{ips:[]};l.ips.push(c),o.records[c.family]=l}this.storage.set(e.hostname,o,{ttl:s})}deleteRecords(e){this.storage.delete(e.hostname)}getHandler(e,r){return new GGt(this,e,r)}},GGt=class extends tqo{static{a(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null;#r=null;#i=null;#o=null;#a=!0;constructor(e,{origin:r,handler:n,dispatch:o,newOrigin:s},c){super(n),this.#r=r,this.#o=s,this.#t={...c},this.#e=e,this.#n=o}onResponseError(e,r){switch(r.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){if(!this.#a){super.onResponseError(e,r);return}this.#a=!1;let n=this.#o.hostname[0]==="["?4:6,o=this.#e.pickFamily(this.#r,n);if(o==null){super.onResponseError(e,r);return}let s;typeof o.port=="number"?s=`:${o.port}`:this.#r.port!==""?s=`:${this.#r.port}`:s="";let c={...this.#t,origin:`${this.#r.protocol}//${o.family===6?`[${o.address}]`:o.address}${s}`,headers:eCn(this.#r.host,this.#t.headers)};this.#n(c,this);return}super.onResponseError(e,r);break}case"ENOTFOUND":this.#e.deleteRecords(this.#r),super.onResponseError(e,r);break;default:super.onResponseError(e,r);break}}};tCn.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new OV("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new OV("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new OV("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new OV("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new OV("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new OV("Invalid pick. Must be a function");if(t?.storage!=null&&(typeof t?.storage?.get!="function"||typeof t?.storage?.set!="function"||typeof t?.storage?.full!="function"||typeof t?.storage?.delete!="function"))throw new OV("Invalid storage. Must be a object with methods: { get, set, full, delete }");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0,storage:t?.storage},o=new qGt(n);return s=>a(function(l,u){let d=l.origin.constructor===URL?l.origin:new URL(l.origin);return ZQo(d.hostname)!==0?s(l,u):(o.runLookup(d,l,(p,h)=>{if(p)return u.onResponseError(null,p);let m={...l,servername:d.hostname,origin:h.origin,headers:eCn(d.host,l.headers)};s(m,o.getHandler({origin:d,dispatch:s,handler:u,newOrigin:h},l))}),!0)},"dnsInterceptor")}});var Cse=T((K7u,iCn)=>{"use strict";f();var{safeHTTPMethods:nCn,pathHasQueryOrFragment:sqo,hasSafeIterator:aqo}=Ki(),{serializePathWithQuery:cqo}=Ki();function lqo(t){if(!t.origin)throw new Error("opts.origin is undefined");let e=t.path||"/";return t.query&&!sqo(t.path)&&(e=cqo(e,t.query)),{origin:t.origin.toString(),method:t.method,path:e,headers:t.headers}}a(lqo,"makeCacheKey");function uqo(t){let e;if(t.headers==null)e={};else if(typeof t.headers=="object")if(e={},aqo(t.headers))for(let r of t.headers){if(!Array.isArray(r))throw new Error("opts.headers is not a valid header map");let[n,o]=r;if(typeof n!="string"||typeof o!="string")throw new Error("opts.headers is not a valid header map");e[n.toLowerCase()]=o}else for(let r of Object.keys(t.headers))e[r.toLowerCase()]=t.headers[r];else throw new Error("opts.headers is not an object");return e}a(uqo,"normalizeHeaders");function dqo(t){if(typeof t!="object")throw new TypeError(`expected key to be object, got ${typeof t}`);for(let e of["origin","method","path"])if(typeof t[e]!="string")throw new TypeError(`expected key.${e} to be string, got ${typeof t[e]}`);if(t.headers!==void 0&&typeof t.headers!="object")throw new TypeError(`expected headers to be object, got ${typeof t}`)}a(dqo,"assertCacheKey");function fqo(t){if(typeof t!="object")throw new TypeError(`expected value to be object, got ${typeof t}`);for(let e of["statusCode","cachedAt","staleAt","deleteAt"])if(typeof t[e]!="number")throw new TypeError(`expected value.${e} to be number, got ${typeof t[e]}`);if(typeof t.statusMessage!="string")throw new TypeError(`expected value.statusMessage to be string, got ${typeof t.statusMessage}`);if(t.headers!=null&&typeof t.headers!="object")throw new TypeError(`expected value.rawHeaders to be object, got ${typeof t.headers}`);if(t.vary!==void 0&&typeof t.vary!="object")throw new TypeError(`expected value.vary to be object, got ${typeof t.vary}`);if(t.etag!==void 0&&typeof t.etag!="string")throw new TypeError(`expected value.etag to be string, got ${typeof t.etag}`)}a(fqo,"assertCacheValue");function pqo(t){let e={},r;if(Array.isArray(t)){r=[];for(let n of t)r.push(...n.split(","))}else r=t.split(",");for(let n=0;n=2&&l[0]==='"'&&l[l.length-1]==='"'&&(l=l.substring(1,l.length-1));let u=parseInt(l,10);if(u!==u||c==="max-age"&&c in e&&e[c]>=u)continue;e[c]=u;break}case"private":case"no-cache":if(l){if(l[0]==='"'){let u=[l.substring(1)],d=l[l.length-1]==='"';if(!d)for(let p=n+1;p{"use strict";f();function Eqo(t){switch(t[3]){case",":return _qo(t);case" ":return Cqo(t);default:return vqo(t)}}a(Eqo,"parseHttpDate");function _qo(t){if(t.length!==29||t[4]!==" "||t[7]!==" "||t[11]!==" "||t[16]!==" "||t[19]!==":"||t[22]!==":"||t[25]!==" "||t[26]!=="G"||t[27]!=="M"||t[28]!=="T")return;let e=-1;if(t[0]==="S"&&t[1]==="u"&&t[2]==="n")e=0;else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n")e=1;else if(t[0]==="T"&&t[1]==="u"&&t[2]==="e")e=2;else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d")e=3;else if(t[0]==="T"&&t[1]==="h"&&t[2]==="u")e=4;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i")e=5;else if(t[0]==="S"&&t[1]==="a"&&t[2]==="t")e=6;else return;let r=0;if(t[5]==="0"){let g=t.charCodeAt(6);if(g<49||g>57)return;r=g-48}else{let g=t.charCodeAt(5);if(g<49||g>51)return;let A=t.charCodeAt(6);if(A<48||A>57)return;r=(g-48)*10+(A-48)}let n=-1;if(t[8]==="J"&&t[9]==="a"&&t[10]==="n")n=0;else if(t[8]==="F"&&t[9]==="e"&&t[10]==="b")n=1;else if(t[8]==="M"&&t[9]==="a")if(t[10]==="r")n=2;else if(t[10]==="y")n=4;else return;else if(t[8]==="J")if(t[9]==="a"&&t[10]==="n")n=0;else if(t[9]==="u")if(t[10]==="n")n=5;else if(t[10]==="l")n=6;else return;else return;else if(t[8]==="A")if(t[9]==="p"&&t[10]==="r")n=3;else if(t[9]==="u"&&t[10]==="g")n=7;else return;else if(t[8]==="S"&&t[9]==="e"&&t[10]==="p")n=8;else if(t[8]==="O"&&t[9]==="c"&&t[10]==="t")n=9;else if(t[8]==="N"&&t[9]==="o"&&t[10]==="v")n=10;else if(t[8]==="D"&&t[9]==="e"&&t[10]==="c")n=11;else return;let o=t.charCodeAt(12);if(o<48||o>57)return;let s=t.charCodeAt(13);if(s<48||s>57)return;let c=t.charCodeAt(14);if(c<48||c>57)return;let l=t.charCodeAt(15);if(l<48||l>57)return;let u=(o-48)*1e3+(s-48)*100+(c-48)*10+(l-48),d=0;if(t[17]==="0"){let g=t.charCodeAt(18);if(g<48||g>57)return;d=g-48}else{let g=t.charCodeAt(17);if(g<48||g>50)return;let A=t.charCodeAt(18);if(A<48||A>57||g===50&&A>51)return;d=(g-48)*10+(A-48)}let p=0;if(t[20]==="0"){let g=t.charCodeAt(21);if(g<48||g>57)return;p=g-48}else{let g=t.charCodeAt(20);if(g<48||g>53)return;let A=t.charCodeAt(21);if(A<48||A>57)return;p=(g-48)*10+(A-48)}let h=0;if(t[23]==="0"){let g=t.charCodeAt(24);if(g<48||g>57)return;h=g-48}else{let g=t.charCodeAt(23);if(g<48||g>53)return;let A=t.charCodeAt(24);if(A<48||A>57)return;h=(g-48)*10+(A-48)}let m=new Date(Date.UTC(u,n,r,d,p,h));return m.getUTCDay()===e?m:void 0}a(_qo,"parseImfDate");function Cqo(t){if(t.length!==24||t[7]!==" "||t[10]!==" "||t[19]!==" ")return;let e=-1;if(t[0]==="S"&&t[1]==="u"&&t[2]==="n")e=0;else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n")e=1;else if(t[0]==="T"&&t[1]==="u"&&t[2]==="e")e=2;else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d")e=3;else if(t[0]==="T"&&t[1]==="h"&&t[2]==="u")e=4;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i")e=5;else if(t[0]==="S"&&t[1]==="a"&&t[2]==="t")e=6;else return;let r=-1;if(t[4]==="J"&&t[5]==="a"&&t[6]==="n")r=0;else if(t[4]==="F"&&t[5]==="e"&&t[6]==="b")r=1;else if(t[4]==="M"&&t[5]==="a")if(t[6]==="r")r=2;else if(t[6]==="y")r=4;else return;else if(t[4]==="J")if(t[5]==="a"&&t[6]==="n")r=0;else if(t[5]==="u")if(t[6]==="n")r=5;else if(t[6]==="l")r=6;else return;else return;else if(t[4]==="A")if(t[5]==="p"&&t[6]==="r")r=3;else if(t[5]==="u"&&t[6]==="g")r=7;else return;else if(t[4]==="S"&&t[5]==="e"&&t[6]==="p")r=8;else if(t[4]==="O"&&t[5]==="c"&&t[6]==="t")r=9;else if(t[4]==="N"&&t[5]==="o"&&t[6]==="v")r=10;else if(t[4]==="D"&&t[5]==="e"&&t[6]==="c")r=11;else return;let n=0;if(t[8]===" "){let g=t.charCodeAt(9);if(g<49||g>57)return;n=g-48}else{let g=t.charCodeAt(8);if(g<49||g>51)return;let A=t.charCodeAt(9);if(A<48||A>57)return;n=(g-48)*10+(A-48)}let o=0;if(t[11]==="0"){let g=t.charCodeAt(12);if(g<48||g>57)return;o=g-48}else{let g=t.charCodeAt(11);if(g<48||g>50)return;let A=t.charCodeAt(12);if(A<48||A>57||g===50&&A>51)return;o=(g-48)*10+(A-48)}let s=0;if(t[14]==="0"){let g=t.charCodeAt(15);if(g<48||g>57)return;s=g-48}else{let g=t.charCodeAt(14);if(g<48||g>53)return;let A=t.charCodeAt(15);if(A<48||A>57)return;s=(g-48)*10+(A-48)}let c=0;if(t[17]==="0"){let g=t.charCodeAt(18);if(g<48||g>57)return;c=g-48}else{let g=t.charCodeAt(17);if(g<48||g>53)return;let A=t.charCodeAt(18);if(A<48||A>57)return;c=(g-48)*10+(A-48)}let l=t.charCodeAt(20);if(l<48||l>57)return;let u=t.charCodeAt(21);if(u<48||u>57)return;let d=t.charCodeAt(22);if(d<48||d>57)return;let p=t.charCodeAt(23);if(p<48||p>57)return;let h=(l-48)*1e3+(u-48)*100+(d-48)*10+(p-48),m=new Date(Date.UTC(h,r,n,o,s,c));return m.getUTCDay()===e?m:void 0}a(Cqo,"parseAscTimeDate");function vqo(t){let e=-1,r=-1;if(t[0]==="S")t[1]==="u"&&t[2]==="n"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y"?(r=0,e=6):t[1]==="a"&&t[2]==="t"&&t[3]==="u"&&t[4]==="r"&&t[5]==="d"&&t[6]==="a"&&t[7]==="y"&&(r=6,e=8);else if(t[0]==="M"&&t[1]==="o"&&t[2]==="n"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y")r=1,e=6;else if(t[0]==="T")t[1]==="u"&&t[2]==="e"&&t[3]==="s"&&t[4]==="d"&&t[5]==="a"&&t[6]==="y"?(r=2,e=7):t[1]==="h"&&t[2]==="u"&&t[3]==="r"&&t[4]==="s"&&t[5]==="d"&&t[6]==="a"&&t[7]==="y"&&(r=4,e=8);else if(t[0]==="W"&&t[1]==="e"&&t[2]==="d"&&t[3]==="n"&&t[4]==="e"&&t[5]==="s"&&t[6]==="d"&&t[7]==="a"&&t[8]==="y")r=3,e=9;else if(t[0]==="F"&&t[1]==="r"&&t[2]==="i"&&t[3]==="d"&&t[4]==="a"&&t[5]==="y")r=5,e=6;else return;if(t[e]!==","||t.length-e-1!==23||t[e+1]!==" "||t[e+4]!=="-"||t[e+8]!=="-"||t[e+11]!==" "||t[e+14]!==":"||t[e+17]!==":"||t[e+20]!==" "||t[e+21]!=="G"||t[e+22]!=="M"||t[e+23]!=="T")return;let n=0;if(t[e+2]==="0"){let m=t.charCodeAt(e+3);if(m<49||m>57)return;n=m-48}else{let m=t.charCodeAt(e+2);if(m<49||m>51)return;let g=t.charCodeAt(e+3);if(g<48||g>57)return;n=(m-48)*10+(g-48)}let o=-1;if(t[e+5]==="J"&&t[e+6]==="a"&&t[e+7]==="n")o=0;else if(t[e+5]==="F"&&t[e+6]==="e"&&t[e+7]==="b")o=1;else if(t[e+5]==="M"&&t[e+6]==="a"&&t[e+7]==="r")o=2;else if(t[e+5]==="A"&&t[e+6]==="p"&&t[e+7]==="r")o=3;else if(t[e+5]==="M"&&t[e+6]==="a"&&t[e+7]==="y")o=4;else if(t[e+5]==="J"&&t[e+6]==="u"&&t[e+7]==="n")o=5;else if(t[e+5]==="J"&&t[e+6]==="u"&&t[e+7]==="l")o=6;else if(t[e+5]==="A"&&t[e+6]==="u"&&t[e+7]==="g")o=7;else if(t[e+5]==="S"&&t[e+6]==="e"&&t[e+7]==="p")o=8;else if(t[e+5]==="O"&&t[e+6]==="c"&&t[e+7]==="t")o=9;else if(t[e+5]==="N"&&t[e+6]==="o"&&t[e+7]==="v")o=10;else if(t[e+5]==="D"&&t[e+6]==="e"&&t[e+7]==="c")o=11;else return;let s=t.charCodeAt(e+9);if(s<48||s>57)return;let c=t.charCodeAt(e+10);if(c<48||c>57)return;let l=(s-48)*10+(c-48);l+=l<70?2e3:1900;let u=0;if(t[e+12]==="0"){let m=t.charCodeAt(e+13);if(m<48||m>57)return;u=m-48}else{let m=t.charCodeAt(e+12);if(m<48||m>50)return;let g=t.charCodeAt(e+13);if(g<48||g>57||m===50&&g>51)return;u=(m-48)*10+(g-48)}let d=0;if(t[e+15]==="0"){let m=t.charCodeAt(e+16);if(m<48||m>57)return;d=m-48}else{let m=t.charCodeAt(e+15);if(m<48||m>53)return;let g=t.charCodeAt(e+16);if(g<48||g>57)return;d=(m-48)*10+(g-48)}let p=0;if(t[e+18]==="0"){let m=t.charCodeAt(e+19);if(m<48||m>57)return;p=m-48}else{let m=t.charCodeAt(e+18);if(m<48||m>53)return;let g=t.charCodeAt(e+19);if(g<48||g>57)return;p=(m-48)*10+(g-48)}let h=new Date(Date.UTC(l,o,n,u,d,p));return h.getUTCDay()===r?h:void 0}a(vqo,"parseRfc850Date");oCn.exports={parseHttpDate:Eqo}});var uCn=T((rUu,lCn)=>{"use strict";f();var bqo=Ki(),{parseCacheControlHeader:Tqo,parseVaryHeader:Sqo,isEtagUsable:Iqo}=Cse(),{parseHttpDate:aCn}=sCn();function xqo(){}a(xqo,"noop");var cCn=[200,203,204,206,300,301,308,404,405,410,414,501],wqo=[206],Rqo=2147483647e3,HGt=class{static{a(this,"CacheHandler")}#e;#t;#n;#r;#i;#o;constructor({store:e,type:r,cacheByDefault:n},o,s){this.#r=e,this.#t=r,this.#n=n,this.#e=o,this.#i=s}onRequestStart(e,r){this.#o?.destroy(),this.#o=void 0,this.#i.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.#i.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){let s=a(()=>this.#i.onResponseStart?.(e,r,n,o),"downstreamOnHeaders"),c=this;if(!bqo.safeHTTPMethods.includes(this.#e.method)&&r>=200&&r<=399){try{this.#r.delete(this.#e)?.catch?.(xqo)}catch{}return s()}let l=n["cache-control"],u=n["last-modified"]&&cCn.includes(r);if(!l&&!n.expires&&!u&&!this.#n)return s();let d=l?Tqo(l):{};if(!Pqo(this.#t,r,n,d,this.#e.headers))return s();let p=Date.now(),h=n.age?kqo(n.age):void 0;if(h&&h>=Rqo)return s();let m=typeof n.date=="string"?aCn(n.date):void 0,g=Dqo(this.#t,p,h,n,m,d)??this.#n;if(g===void 0||h&&h>g)return s();let A=m?m.getTime():p,y=g+A;if(p>=y)return s();let E;if(this.#e.headers&&n.vary&&(E=Sqo(n.vary,this.#e.headers),!E))return s();let _=Nqo(A,d,y),v=Mqo(n,d),b={statusCode:r,statusMessage:o,headers:v,vary:E,cacheControlDirectives:d,cachedAt:h?p-h:p,staleAt:y,deleteAt:_};if(r===304){let I=a(w=>{if(!w)return s();if(b.statusCode=w.statusCode,b.statusMessage=w.statusMessage,b.etag=w.etag,b.headers={...w.headers,...v},s(),this.#o=this.#r.createWriteStream(this.#e,b),!(!this.#o||!w?.body))if(typeof w.body.values=="function"){let R=w.body.values(),P=a(()=>{for(let k of R){let Q=this.#o.write(k)===!1;if(this.#i.onResponseData?.(e,k),Q)break}},"streamCachedBody");this.#o.on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("drain",()=>{P()}).on("close",function(){c.#o===this&&(c.#o=void 0)}),P()}else typeof w.body.on=="function"&&(w.body.on("data",R=>{this.#o.write(R),this.#i.onResponseData?.(e,R)}).on("end",()=>{this.#o.end()}).on("error",()=>{this.#o=void 0,this.#r.delete(this.#e)}),this.#o.on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("close",function(){c.#o===this&&(c.#o=void 0)}))},"handle304"),x=this.#r.get(this.#e);x&&typeof x.then=="function"?x.then(I):I(x)}else{if(typeof n.etag=="string"&&Iqo(n.etag)&&(b.etag=n.etag),this.#o=this.#r.createWriteStream(this.#e,b),!this.#o)return s();this.#o.on("drain",()=>e.resume()).on("error",function(){c.#o=void 0,c.#r.delete(c.#e)}).on("close",function(){c.#o===this&&(c.#o=void 0),e.resume()}),s()}}onResponseData(e,r){this.#o?.write(r)===!1&&e.pause(),this.#i.onResponseData?.(e,r)}onResponseEnd(e,r){this.#o?.end(),this.#i.onResponseEnd?.(e,r)}onResponseError(e,r){this.#o?.destroy(r),this.#o=void 0,this.#i.onResponseError?.(e,r)}};function Pqo(t,e,r,n,o){return!(e<200||wqo.includes(e)||!cCn.includes(e)&&!r.expires&&!n.public&&n["max-age"]===void 0&&!(n.private&&t==="private")&&!(n["s-maxage"]!==void 0&&t==="shared")||n["no-store"]||t==="shared"&&n.private===!0||r.vary?.includes("*")||o?.authorization&&(!n.public&&!n["s-maxage"]&&!n["must-revalidate"]||typeof o.authorization!="string"||Array.isArray(n["no-cache"])&&n["no-cache"].includes("authorization")||Array.isArray(n.private)&&n.private.includes("authorization")))}a(Pqo,"canCacheResponse");function kqo(t){let e=parseInt(Array.isArray(t)?t[0]:t);return isNaN(e)?void 0:e*1e3}a(kqo,"getAge");function Dqo(t,e,r,n,o,s){if(t==="shared"){let l=s["s-maxage"];if(l!==void 0)return l>0?l*1e3:void 0}let c=s["max-age"];if(c!==void 0)return c>0?c*1e3:void 0;if(typeof n.expires=="string"){let l=aCn(n.expires);if(l)return e>=l.getTime()||o&&(o>=l||r!==void 0&&r>l-o)?void 0:l.getTime()-e}if(typeof n["last-modified"]=="string"){let l=new Date(n["last-modified"]);if(Oqo(l))return l.getTime()>=e?void 0:(e-l.getTime())*.1}if(s.immutable)return 31536e3}a(Dqo,"determineStaleAt");function Nqo(t,e,r){let n=-1/0,o=-1/0,s=-1/0;if(e["stale-while-revalidate"]&&(n=r+e["stale-while-revalidate"]*1e3),e["stale-if-error"]&&(o=r+e["stale-if-error"]*1e3),e.immutable&&n===-1/0&&o===-1/0&&(s=t+31536e6),n===-1/0&&o===-1/0&&s===-1/0){let c=r-t;return r+c}return Math.max(r,n,o,s)}a(Nqo,"determineDeleteAt");function Mqo(t,e){let r=["connection","proxy-authenticate","proxy-authentication-info","proxy-authorization","proxy-connection","te","transfer-encoding","upgrade","age"];t.connection&&(Array.isArray(t.connection)?r.push(...t.connection.map(o=>o.trim())):r.push(...t.connection.split(",").map(o=>o.trim()))),Array.isArray(e["no-cache"])&&r.push(...e["no-cache"]),Array.isArray(e.private)&&r.push(...e.private);let n;for(let o of r)t[o]&&(n??={...t},delete n[o]);return n??t}a(Mqo,"stripNecessaryHeaders");function Oqo(t){return t instanceof Date&&Number.isFinite(t.valueOf())}a(Oqo,"isValidDate");lCn.exports=HGt});var $Gt=T((oUu,pCn)=>{"use strict";f();var{Writable:Bqo}=require("node:stream"),{EventEmitter:Lqo}=require("node:events"),{assertCacheKey:dCn,assertCacheValue:Fqo}=Cse(),jGt=class extends Lqo{static{a(this,"MemoryCacheStore")}#e=1024;#t=104857600;#n=5242880;#r=0;#i=0;#o=new Map;#a=!1;constructor(e){if(super(),e){if(typeof e!="object")throw new TypeError("MemoryCacheStore options must be an object");if(e.maxCount!==void 0){if(typeof e.maxCount!="number"||!Number.isInteger(e.maxCount)||e.maxCount<0)throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer");this.#e=e.maxCount}if(e.maxSize!==void 0){if(typeof e.maxSize!="number"||!Number.isInteger(e.maxSize)||e.maxSize<0)throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer");this.#t=e.maxSize}if(e.maxEntrySize!==void 0){if(typeof e.maxEntrySize!="number"||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer");this.#n=e.maxEntrySize}}}get size(){return this.#r}isFull(){return this.#r>=this.#t||this.#i>=this.#e}get(e){dCn(e);let r=`${e.origin}:${e.path}`,n=Date.now(),o=this.#o.get(r),s=o?fCn(e,o,n):null;return s==null?void 0:{statusMessage:s.statusMessage,statusCode:s.statusCode,headers:s.headers,body:s.body,vary:s.vary?s.vary:void 0,etag:s.etag,cacheControlDirectives:s.cacheControlDirectives,cachedAt:s.cachedAt,staleAt:s.staleAt,deleteAt:s.deleteAt}}createWriteStream(e,r){dCn(e),Fqo(r);let n=`${e.origin}:${e.path}`,o=this,s={...e,...r,body:[],size:0};return new Bqo({write(c,l,u){typeof c=="string"&&(c=Buffer.from(c,l)),s.size+=c.byteLength,s.size>=o.#n?this.destroy():s.body.push(c),u(null)},final(c){let l=o.#o.get(n);l||(l=[],o.#o.set(n,l));let u=fCn(e,l,Date.now());if(u){let d=l.indexOf(u);l.splice(d,1,s),o.#r-=u.size}else l.push(s),o.#i+=1;if(o.#r+=s.size,o.#r>o.#t||o.#i>o.#e){o.#a||(o.emit("maxSizeExceeded",{size:o.#r,maxSize:o.#t,count:o.#i,maxCount:o.#e}),o.#a=!0);for(let[d,p]of o.#o){for(let h of p.splice(0,p.length/2))o.#r-=h.size,o.#i-=1;p.length===0&&o.#o.delete(d)}o.#rn.deleteAt>r&&n.method===t.method&&(n.vary==null||Object.keys(n.vary).every(o=>n.vary[o]===null?t.headers[o]===void 0:n.vary[o]===t.headers[o])))}a(fCn,"findEntry");pCn.exports=jGt});var mCn=T((cUu,hCn)=>{"use strict";f();var Uqo=require("node:assert"),VGt=class{static{a(this,"CacheRevalidationHandler")}#e=!1;#t;#n;#r;#i;constructor(e,r,n){if(typeof e!="function")throw new TypeError("callback must be a function");this.#t=e,this.#n=r,this.#i=n}onRequestStart(e,r){this.#e=!1,this.#r=r}onRequestUpgrade(e,r,n,o){this.#n.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){if(Uqo(this.#t!=null),this.#e=r===304||this.#i&&r>=500&&r<=504,this.#t(this.#e,this.#r),this.#t=null,this.#e)return!0;this.#n.onRequestStart?.(e,this.#r),this.#n.onResponseStart?.(e,r,n,o)}onResponseData(e,r){if(!this.#e)return this.#n.onResponseData?.(e,r)}onResponseEnd(e,r){this.#e||this.#n.onResponseEnd?.(e,r)}onResponseError(e,r){if(!this.#e)if(this.#t&&(this.#t(!1),this.#t=null),typeof this.#n.onResponseError=="function")this.#n.onResponseError(e,r);else throw r}};hCn.exports=VGt});var ECn=T((dUu,yCn)=>{"use strict";f();var gCn=require("node:assert"),{Readable:Qqo}=require("node:stream"),vse=Ki(),Sve=uCn(),qqo=$Gt(),Gqo=mCn(),{assertCacheStore:Hqo,assertCacheMethods:jqo,makeCacheKey:$qo,normalizeHeaders:Vqo,parseCacheControlHeader:Wqo}=Cse(),{AbortError:zqo}=Ni();function Yqo(t,e){if(t!==void 0){if(!Array.isArray(t))throw new TypeError(`expected ${e} to be an array or undefined, got ${typeof t}`);for(let r=0;r{},"nop");function Kqo(t,e,{headers:r={}}){return!!(e?.["no-cache"]||t.cacheControlDirectives?.["no-cache"]&&!Array.isArray(t.cacheControlDirectives["no-cache"])||r["if-modified-since"]||r["if-none-match"])}a(Kqo,"needsRevalidation");function Jqo(t,e){let r=Date.now();if(r>t.staleAt){if(e?.["max-stale"]){let n=t.staleAt+e["max-stale"]*1e3;return r>n}return!0}if(e?.["min-fresh"]){let n=t.staleAt-r,o=e["min-fresh"]*1e3;return n<=o}return!1}a(Jqo,"isStale");function Xqo(t){let e=t.cacheControlDirectives?.["stale-while-revalidate"];if(!e)return!1;let r=Date.now(),n=t.staleAt+e*1e3;return r<=n}a(Xqo,"withinStaleWhileRevalidateWindow");function Zqo(t,e,r,n,o,s){if(s?.["only-if-cached"]){let c=!1;try{if(typeof n.onConnect=="function"&&(n.onConnect(()=>{c=!0}),c)||typeof n.onHeaders=="function"&&(n.onHeaders(504,[],zGt,"Gateway Timeout"),c))return;typeof n.onComplete=="function"&&n.onComplete([])}catch(l){typeof n.onError=="function"&&n.onError(l)}return!0}return t(o,new Sve(e,r,n))}a(Zqo,"handleUncachedResponse");function WGt(t,e,r,n,o,s){let c=vse.isStream(r.body)?r.body:Qqo.from(r.body??[]);gCn(!c.destroyed,"stream should not be destroyed"),gCn(!c.readableDidRead,"stream should not be readableDidRead");let l={resume(){c.resume()},pause(){c.pause()},get paused(){return c.isPaused()},get aborted(){return c.destroyed},get reason(){return c.errored},abort(d){c.destroy(d??new zqo)}};if(c.on("error",function(d){if(!this.readableEnded)if(typeof t.onResponseError=="function")t.onResponseError(l,d);else throw d}).on("close",function(){this.errored||t.onResponseEnd?.(l,{})}),t.onRequestStart?.(l,o),c.destroyed)return;let u={...r.headers,age:String(n)};s&&(u.warning='110 - "response is stale"'),t.onResponseStart?.(l,r.statusCode,u,r.statusMessage),e.method==="HEAD"?c.destroy():c.on("data",function(d){t.onResponseData?.(l,d)})}a(WGt,"sendCachedValue");function ACn(t,e,r,n,o,s,c){if(!c)return Zqo(t,e,r,n,o,s);let l=Date.now();if(l>c.deleteAt)return t(o,new Sve(e,r,n));let u=Math.round((l-c.cachedAt)/1e3);if(s?.["max-age"]&&u>=s["max-age"])return t(o,n);let d=Jqo(c,s),p=Kqo(c,s,o);if(d||p){if(vse.isStream(o.body)&&vse.bodyLength(o.body)!==0)return t(o,new Sve(e,r,n));if(!p&&Xqo(c))return WGt(n,o,c,u,null,!0),queueMicrotask(()=>{let A={...o.headers,"if-modified-since":new Date(c.cachedAt).toUTCString()};if(c.etag&&(A["if-none-match"]=c.etag),c.vary)for(let y in c.vary)c.vary[y]!=null&&(A[y]=c.vary[y]);t({...o,headers:A},new Sve(e,r,{onRequestStart(){},onRequestUpgrade(){},onResponseStart(){},onResponseData(){},onResponseEnd(){},onResponseError(){}}))}),!0;let h=!1,m=c.cacheControlDirectives["stale-if-error"]??s?.["stale-if-error"];m&&(h=l{A?WGt(n,o,c,u,y,d):vse.isStream(c.body)&&c.body.on("error",zGt).destroy()},new Sve(e,r,n),h))}vse.isStream(o.body)&&o.body.on("error",zGt).destroy(),WGt(n,o,c,u,null,!1)}a(ACn,"handleResult");yCn.exports=(t={})=>{let{store:e=new qqo,methods:r=["GET"],cacheByDefault:n=void 0,type:o="shared",origins:s=void 0}=t;if(typeof t!="object"||t===null)throw new TypeError(`expected type of opts to be an Object, got ${t===null?"null":typeof t}`);if(Hqo(e,"opts.store"),jqo(r,"opts.methods"),Yqo(s,"opts.origins"),typeof n<"u"&&typeof n!="number")throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof n}`);if(typeof o<"u"&&o!=="shared"&&o!=="private")throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof o}`);let c={store:e,methods:r,cacheByDefault:n,type:o},l=vse.safeHTTPMethods.filter(u=>r.includes(u)===!1);return u=>(d,p)=>{if(!d.origin||l.includes(d.method))return u(d,p);if(s!==void 0){let A=d.origin.toString().toLowerCase(),y=!1;for(let E=0;EACn(u,c,m,p,d,h,A)):ACn(u,c,m,p,d,h,g)}}});var TCn=T((hUu,bCn)=>{"use strict";f();var{createInflate:YGt,createGunzip:_Cn,createBrotliDecompress:eGo,createZstdDecompress:tGo}=require("node:zlib"),{pipeline:rGo}=require("node:stream"),nGo=_se(),{runtimeFeatures:iGo}=nO(),CCn={gzip:_Cn,"x-gzip":_Cn,br:eGo,deflate:YGt,compress:YGt,"x-compress":YGt,...iGo.has("zstd")?{zstd:tGo}:{}},oGo=[204,304],vCn=!1,KGt=class extends nGo{static{a(this,"DecompressHandler")}#e=[];#t;#n;constructor(e,{skipStatusCodes:r=oGo,skipErrorResponses:n=!0}={}){super(e),this.#t=r,this.#n=n}#r(e,r){return!!(!e||r<200||this.#t.includes(r)||this.#n&&r>=400)}#i(e){let r=e.split(","),n=5;if(r.length>n)throw new Error(`too many content-encodings in response: ${r.length}, maximum allowed is ${n}`);let o=[];for(let s=r.length-1;s>=0;s--){let c=r[s].trim();if(c){if(!CCn[c])return o.length=0,o;o.push(CCn[c]())}}return o}#o(e,r){e.on("readable",()=>{let n;for(;(n=e.read())!==null&&super.onResponseData(r,n)!==!1;);}),e.on("error",n=>{super.onResponseError(r,n)})}#a(e){let r=this.#e[0];this.#o(r,e),r.on("end",()=>{super.onResponseEnd(e,{})})}#s(e){let r=this.#e[this.#e.length-1];this.#o(r,e),rGo(this.#e,n=>{if(n){super.onResponseError(e,n);return}super.onResponseEnd(e,{})})}#c(){this.#e.length=0}onResponseStart(e,r,n,o){let s=n["content-encoding"];if(this.#r(s,r))return super.onResponseStart(e,r,n,o);let c=this.#i(s.toLowerCase());if(c.length===0)return this.#c(),super.onResponseStart(e,r,n,o);this.#e=c;let{"content-encoding":l,"content-length":u,...d}=n;return this.#e.length===1?this.#a(e):this.#s(e),super.onResponseStart(e,r,d,o)}onResponseData(e,r){if(this.#e.length>0){this.#e[0].write(r);return}super.onResponseData(e,r)}onResponseEnd(e,r){if(this.#e.length>0){this.#e[0].end(),this.#c();return}super.onResponseEnd(e,r)}onResponseError(e,r){if(this.#e.length>0){for(let n of this.#e)n.destroy(r);this.#c()}super.onResponseError(e,r)}};function sGo(t={}){return vCn||(process.emitWarning("DecompressInterceptor is experimental and subject to change","ExperimentalWarning"),vCn=!0),e=>(r,n)=>{let o=new KGt(n,t);return e(r,o)}}a(sGo,"createDecompressInterceptor");bCn.exports=sGo});var xCn=T((AUu,ICn)=>{"use strict";f();var{RequestAbortedError:aGo}=Ni(),SCn=5*1024*1024,JGt=class{static{a(this,"DeduplicationHandler")}#e;#t=[];#n=SCn;#r=0;#i={};#o="";#a=!1;#s=!1;#c=!1;#l=!1;#u=null;#f=null;constructor(e,r,n=SCn){this.#e=e,this.#f=r,this.#n=n}addWaitingHandler(e){if(this.#l||this.#c)return!1;let r=this.#p(e),n=r.controller;try{if(e.onRequestStart?.(n,null),n.aborted)return r.done=!0,!0;this.#s&&e.onResponseStart?.(n,this.#r,this.#i,this.#o)}catch{return r.done=!0,!0}return n.aborted||this.#t.push(r),!0}onRequestStart(e,r){this.#u=e,this.#e.onRequestStart?.(e,r)}onRequestUpgrade(e,r,n,o){this.#e.onRequestUpgrade?.(e,r,n,o)}onResponseStart(e,r,n,o){this.#s=!0,this.#r=r,this.#i=n,this.#o=o,this.#e.onResponseStart?.(e,r,n,o);for(let s of this.#t){let{handler:c,controller:l}=s;if(s.done||l.aborted){s.done=!0;continue}try{c.onResponseStart?.(l,r,n,o)}catch{}l.aborted&&(s.done=!0)}this.#g()}onResponseData(e,r){if(!(this.#a||this.#l)){this.#c=!0,this.#e.onResponseData?.(e,r);for(let n of this.#t){let{handler:o,controller:s}=n;if(n.done||s.aborted){n.done=!0;continue}if(s.paused){this.#h(n,r);continue}try{o.onResponseData?.(s,r)}catch{}s.aborted&&(n.done=!0,n.bufferedChunks=[],n.bufferedBytes=0)}this.#g()}}onResponseEnd(e,r){if(!(this.#a||this.#l)){this.#l=!0,this.#e.onResponseEnd?.(e,r);for(let n of this.#t){if(n.done||n.controller.aborted){n.done=!0;continue}if(this.#m(n),n.done||n.controller.aborted){n.done=!0;continue}if(n.controller.paused&&n.bufferedChunks.length>0){n.pendingTrailers=r;continue}try{n.handler.onResponseEnd?.(n.controller,r)}catch{}n.done=!0}this.#g(),this.#f?.()}}onResponseError(e,r){if(!this.#l){this.#a=!0,this.#l=!0,this.#e.onResponseError?.(e,r);for(let n of this.#t)this.#E(n,r);this.#t=[],this.#f?.()}}#p(e){let r={handler:e,controller:null,bufferedChunks:[],bufferedBytes:0,pendingTrailers:null,done:!1},n={aborted:!1,paused:!1,reason:null};return r.controller={resume:a(()=>{if(!n.aborted){if(n.paused=!1,this.#m(r),this.#l&&r.pendingTrailers&&r.bufferedChunks.length===0&&!n.paused&&!n.aborted){try{r.handler.onResponseEnd?.(r.controller,r.pendingTrailers)}catch{}r.pendingTrailers=null,r.done=!0}this.#g()}},"resume"),pause:a(()=>{n.aborted||(n.paused=!0)},"pause"),get paused(){return n.paused},get aborted(){return n.aborted},get reason(){return n.reason},abort:a(o=>{n.aborted=!0,n.reason=o??null,r.done=!0,r.pendingTrailers=null,r.bufferedChunks=[],r.bufferedBytes=0},"abort")},r}#h(e,r){if(e.done||e.controller.aborted){e.done=!0,e.bufferedChunks=[],e.bufferedBytes=0;return}let n=Buffer.from(r);if(e.bufferedChunks.push(n),e.bufferedBytes+=n.length,e.bufferedBytes>this.#n){let o=new aGo(`Deduplicated waiting handler exceeded maxBufferSize (${this.#n} bytes) while paused`);this.#E(e,o)}}#m(e){let{handler:r,controller:n}=e;for(;!e.done&&!n.aborted&&!n.paused&&e.bufferedChunks.length>0;){let o=e.bufferedChunks.shift();e.bufferedBytes-=o.length;try{r.onResponseData?.(n,o)}catch{}if(n.aborted){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;break}}}#E(e,r){if(!e.done){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;try{e.controller.abort(r),e.handler.onResponseError?.(e.controller,r)}catch{}}}#g(){this.#t=this.#t.filter(e=>e.done===!1)}};ICn.exports=JGt});var RCn=T((_Uu,wCn)=>{"use strict";f();var cGo=require("node:diagnostics_channel"),lGo=Ki(),uGo=xCn(),{normalizeHeaders:dGo,makeCacheKey:fGo,makeDeduplicationKey:pGo}=Cse(),oze=cGo.channel("undici:request:pending-requests");wCn.exports=(t={})=>{let{methods:e=["GET"],skipHeaderNames:r=[],excludeHeaderNames:n=[],maxBufferSize:o=5*1024*1024}=t;if(typeof t!="object"||t===null)throw new TypeError(`expected type of opts to be an Object, got ${t===null?"null":typeof t}`);if(!Array.isArray(e))throw new TypeError(`expected opts.methods to be an array, got ${typeof e}`);for(let u of e)if(!lGo.safeHTTPMethods.includes(u))throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${u}`);if(!Array.isArray(r))throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof r}`);if(!Array.isArray(n))throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof n}`);if(!Number.isFinite(o)||o<=0)throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${o}`);let s=new Set(r.map(u=>u.toLowerCase())),c=new Set(n.map(u=>u.toLowerCase())),l=new Map;return u=>(d,p)=>{if(!d.origin||e.includes(d.method)===!1)return u(d,p);if(d={...d,headers:dGo(d)},s.size>0){for(let y of Object.keys(d.headers))if(s.has(y.toLowerCase()))return u(d,p)}let h=fGo(d),m=pGo(h,c),g=l.get(m);if(g)return g.addWaitingHandler(p)?!0:u(d,p);let A=new uGo(p,()=>{l.delete(m),oze.hasSubscribers&&oze.publish({size:l.size,key:m,type:"removed"})},o);return l.set(m,A),oze.hasSubscribers&&oze.publish({size:l.size,key:m,type:"added"}),u(d,A)}}});var DCn=T((bUu,kCn)=>{"use strict";f();var{Writable:hGo}=require("node:stream"),{assertCacheKey:XGt,assertCacheValue:mGo}=Cse(),ZGt,_v=3,PCn=2*1e3*1e3*1e3;kCn.exports=class{static{a(this,"SqliteCacheStore")}#e=PCn;#t=1/0;#n;#r;#i;#o;#a;#s;#c;#l;constructor(e){if(e){if(typeof e!="object")throw new TypeError("SqliteCacheStore options must be an object");if(e.maxEntrySize!==void 0){if(typeof e.maxEntrySize!="number"||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer");if(e.maxEntrySize>PCn)throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb");this.#e=e.maxEntrySize}if(e.maxCount!==void 0){if(typeof e.maxCount!="number"||!Number.isInteger(e.maxCount)||e.maxCount<0)throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer");this.#t=e.maxCount}}ZGt||(ZGt=require("node:sqlite").DatabaseSync),this.#n=new ZGt(e?.location??":memory:"),this.#n.exec(` PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL; PRAGMA temp_store = memory; PRAGMA optimize; - CREATE TABLE IF NOT EXISTS cacheInterceptorV${Dv} ( + CREATE TABLE IF NOT EXISTS cacheInterceptorV${_v} ( -- Data specific to us id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT NOT NULL, @@ -282,8 +282,8 @@ ${e.format(r)}`.trim())}};CEn.exports=aGt});var lGt=T((oFu,TEn)=>{"use strict";f staleAt INTEGER NOT NULL ); - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${Dv}_getValuesQuery ON cacheInterceptorV${Dv}(url, method, deleteAt); - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${Dv}_deleteByUrlQuery ON cacheInterceptorV${Dv}(deleteAt); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${_v}_getValuesQuery ON cacheInterceptorV${_v}(url, method, deleteAt); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${_v}_deleteByUrlQuery ON cacheInterceptorV${_v}(deleteAt); `),this.#r=this.#n.prepare(` SELECT id, @@ -297,14 +297,14 @@ ${e.format(r)}`.trim())}};CEn.exports=aGt});var lGt=T((oFu,TEn)=>{"use strict";f vary, cachedAt, staleAt - FROM cacheInterceptorV${Dv} + FROM cacheInterceptorV${_v} WHERE url = ? AND method = ? ORDER BY deleteAt ASC `),this.#i=this.#n.prepare(` - UPDATE cacheInterceptorV${Dv} SET + UPDATE cacheInterceptorV${_v} SET body = ?, deleteAt = ?, statusCode = ?, @@ -317,7 +317,7 @@ ${e.format(r)}`.trim())}};CEn.exports=aGt});var lGt=T((oFu,TEn)=>{"use strict";f WHERE id = ? `),this.#o=this.#n.prepare(` - INSERT INTO cacheInterceptorV${Dv} ( + INSERT INTO cacheInterceptorV${_v} ( url, method, body, @@ -331,100 +331,100 @@ ${e.format(r)}`.trim())}};CEn.exports=aGt});var lGt=T((oFu,TEn)=>{"use strict";f cachedAt, staleAt ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - `),this.#s=this.#n.prepare(`DELETE FROM cacheInterceptorV${Dv} WHERE url = ?`),this.#c=this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${Dv}`),this.#a=this.#n.prepare(`DELETE FROM cacheInterceptorV${Dv} WHERE deleteAt <= ?`),this.#l=this.#t===1/0?null:this.#n.prepare(` - DELETE FROM cacheInterceptorV${Dv} + `),this.#s=this.#n.prepare(`DELETE FROM cacheInterceptorV${_v} WHERE url = ?`),this.#c=this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${_v}`),this.#a=this.#n.prepare(`DELETE FROM cacheInterceptorV${_v} WHERE deleteAt <= ?`),this.#l=this.#t===1/0?null:this.#n.prepare(` + DELETE FROM cacheInterceptorV${_v} WHERE id IN ( SELECT id - FROM cacheInterceptorV${Dv} + FROM cacheInterceptorV${_v} ORDER BY cachedAt DESC LIMIT ? ) - `)}close(){this.#n.close()}get(e){NGt(e);let r=this.#p(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){NGt(e);let n=this.#f(e),o=Array.isArray(r.body)?Buffer.concat(r.body):r.body,s=o?.byteLength;if(s&&s>this.#e)return;let c=this.#p(e,!0);c?this.#i.run(o,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,c.id):(this.#u(),this.#o.run(n,e.method,o,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){NGt(e),hQo(r);let n=0,o=[],s=this;return new pQo({decodeStrings:!0,write(c,l,u){n+=c.byteLength,n=u.deleteAt&&!r)return;let d=!0;if(u.vary){let p=JSON.parse(u.vary);for(let h in p)if(!mQo(o[h],p[h])){d=!1;break}}if(d)return u}}};function mQo(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,n)=>r===e[n]):t===e}a(mQo,"headerValueEquals")});var RW=T((m9u,QCn)=>{"use strict";f();var{kConstruct:gQo}=ac(),{kEnumerableProperty:lae}=eo(),{iteratorMixin:AQo,isValidHeaderName:Rbe,isValidHeaderValue:OCn}=wv(),{webidl:qs}=Qm(),MGt=require("node:assert"),Xze=require("node:util");function MCn(t){return t===10||t===13||t===9||t===32}a(MCn,"isHTTPWhiteSpaceCharCode");function BCn(t){let e=0,r=t.length;for(;r>e&&MCn(t.charCodeAt(r-1));)--r;for(;r>e&&MCn(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}a(BCn,"headerValueNormalize");function LCn(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}a(LCn,"fill");function OGt(t,e,r){if(r=BCn(r),Rbe(e)){if(!OCn(r))throw qs.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw qs.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(UCn(t)==="immutable")throw new TypeError("immutable");return eYe(t).append(e,r,!1)}a(OGt,"appendHeader");function yQo(t){let e=eYe(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],n=e.toSortedArray(),o=e.cookies;if(o===null||o.length===1)return e.sortedMap=n;for(let s=0;s>1),r[d][0]<=p[0]?u=d+1:l=d;if(s!==d){for(c=s;c>u;)r[c]=r[--c];r[u]=p}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:o,1:{value:s}}of this.headersMap)r[n++]=[o,s],MGt(s!==null);return r.sort(FCn)}}},Mw=class t{static{a(this,"Headers")}#e;#t;constructor(e=void 0){qs.util.markAsUncloneable(this),e!==gQo&&(this.#t=new Zze,this.#e="none",e!==void 0&&(e=qs.converters.HeadersInit(e,"Headers constructor","init"),LCn(this,e)))}append(e,r){qs.brandCheck(this,t),qs.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=qs.converters.ByteString(e,n,"name"),r=qs.converters.ByteString(r,n,"value"),OGt(this,e,r)}delete(e){if(qs.brandCheck(this,t),qs.argumentLengthCheck(arguments,1,"Headers.delete"),e=qs.converters.ByteString(e,"Headers.delete","name"),!Rbe(e))throw qs.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){qs.brandCheck(this,t),qs.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=qs.converters.ByteString(e,r,"name"),!Rbe(e))throw qs.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){qs.brandCheck(this,t),qs.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=qs.converters.ByteString(e,r,"name"),!Rbe(e))throw qs.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){qs.brandCheck(this,t),qs.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=qs.converters.ByteString(e,n,"name"),r=qs.converters.ByteString(r,n,"value"),r=BCn(r),Rbe(e)){if(!OCn(r))throw qs.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw qs.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){qs.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}[Xze.inspect.custom](e,r){return r.depth??=e,`Headers ${Xze.formatWithOptions(r,this.#t.entries)}`}static getHeadersGuard(e){return e.#e}static setHeadersGuard(e,r){e.#e=r}static getHeadersList(e){return e.#t}static setHeadersList(e,r){e.#t=r}},{getHeadersGuard:UCn,setHeadersGuard:EQo,getHeadersList:eYe,setHeadersList:CQo}=Mw;Reflect.deleteProperty(Mw,"getHeadersGuard");Reflect.deleteProperty(Mw,"setHeadersGuard");Reflect.deleteProperty(Mw,"getHeadersList");Reflect.deleteProperty(Mw,"setHeadersList");AQo("Headers",Mw,yQo,0,1);Object.defineProperties(Mw.prototype,{append:lae,delete:lae,get:lae,has:lae,set:lae,getSetCookie:lae,[Symbol.toStringTag]:{value:"Headers",configurable:!0},[Xze.inspect.custom]:{enumerable:!1}});qs.converters.HeadersInit=function(t,e,r){if(qs.util.Type(t)===qs.util.Types.OBJECT){let n=Reflect.get(t,Symbol.iterator);if(!Xze.types.isProxy(t)&&n===Mw.prototype.entries)try{return eYe(t).entriesList}catch{}return typeof n=="function"?qs.converters["sequence>"](t,e,r,n.bind(t)):qs.converters["record"](t,e,r)}throw qs.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};QCn.exports={fill:LCn,compareHeaderName:FCn,Headers:Mw,HeadersList:Zze,getHeadersGuard:UCn,setHeadersGuard:EQo,setHeadersList:CQo,getHeadersList:eYe}});var kbe=T((y9u,XCn)=>{"use strict";f();var{Headers:VCn,HeadersList:qCn,fill:_Qo,getHeadersGuard:vQo,setHeadersGuard:WCn,setHeadersList:zCn}=RW(),{extractBody:GCn,cloneBody:bQo,mixinBody:TQo,streamRegistry:YCn,bodyUnusable:SQo}=Gse(),KCn=eo(),HCn=require("node:util"),{kEnumerableProperty:Mv}=KCn,{isValidReasonPhrase:IQo,isCancelled:xQo,isAborted:wQo,isErrorLike:RQo,environmentSettingsObject:PQo}=wv(),{redirectStatusSet:kQo,nullBodyStatus:NQo}=Gve(),{webidl:ms}=Qm(),{URLSerializer:jCn}=AS(),{kConstruct:rYe}=ac(),BGt=require("node:assert"),{isomorphicEncode:DQo,serializeJavascriptValueToJSONString:MQo}=C4(),OQo=new TextEncoder("utf-8"),Ov=class t{static{a(this,"Response")}#e;#t;static error(){return Pbe(nYe(),"immutable")}static json(e,r=void 0){ms.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=ms.converters.ResponseInit(r));let n=OQo.encode(MQo(e)),o=GCn(n),s=Pbe(uae({}),"response");return $Cn(s,r,{body:o[0],type:"application/json"}),s}static redirect(e,r=302){ms.argumentLengthCheck(arguments,1,"Response.redirect"),e=ms.converters.USVString(e),r=ms.converters["unsigned short"](r);let n;try{n=new URL(e,PQo.settingsObject.baseUrl)}catch(c){throw new TypeError(`Failed to parse URL from ${e}`,{cause:c})}if(!kQo.has(r))throw new RangeError(`Invalid status code ${r}`);let o=Pbe(uae({}),"immutable");o.#t.status=r;let s=DQo(jCn(n));return o.#t.headersList.append("location",s,!0),o}constructor(e=null,r=void 0){if(ms.util.markAsUncloneable(this),e===rYe)return;e!==null&&(e=ms.converters.BodyInit(e,"Response","body")),r=ms.converters.ResponseInit(r),this.#t=uae({}),this.#e=new VCn(rYe),WCn(this.#e,"response"),zCn(this.#e,this.#t.headersList);let n=null;if(e!=null){let[o,s]=GCn(e);n={body:o,type:s}}$Cn(this,r,n)}get type(){return ms.brandCheck(this,t),this.#t.type}get url(){ms.brandCheck(this,t);let e=this.#t.urlList,r=e[e.length-1]??null;return r===null?"":jCn(r,!0)}get redirected(){return ms.brandCheck(this,t),this.#t.urlList.length>1}get status(){return ms.brandCheck(this,t),this.#t.status}get ok(){return ms.brandCheck(this,t),this.#t.status>=200&&this.#t.status<=299}get statusText(){return ms.brandCheck(this,t),this.#t.statusText}get headers(){return ms.brandCheck(this,t),this.#e}get body(){return ms.brandCheck(this,t),this.#t.body?this.#t.body.stream:null}get bodyUsed(){return ms.brandCheck(this,t),!!this.#t.body&&KCn.isDisturbed(this.#t.body.stream)}clone(){if(ms.brandCheck(this,t),SQo(this.#t))throw ms.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=LGt(this.#t);return this.#t.urlList.length!==0&&this.#t.body?.stream&&YCn.register(this,new WeakRef(this.#t.body.stream)),Pbe(e,vQo(this.#e))}[HCn.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${HCn.formatWithOptions(r,n)}`}static getResponseHeaders(e){return e.#e}static setResponseHeaders(e,r){e.#e=r}static getResponseState(e){return e.#t}static setResponseState(e,r){e.#t=r}},{getResponseHeaders:BQo,setResponseHeaders:LQo,getResponseState:PW,setResponseState:FQo}=Ov;Reflect.deleteProperty(Ov,"getResponseHeaders");Reflect.deleteProperty(Ov,"setResponseHeaders");Reflect.deleteProperty(Ov,"getResponseState");Reflect.deleteProperty(Ov,"setResponseState");TQo(Ov,PW);Object.defineProperties(Ov.prototype,{type:Mv,url:Mv,status:Mv,ok:Mv,redirected:Mv,statusText:Mv,headers:Mv,clone:Mv,body:Mv,bodyUsed:Mv,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(Ov,{json:Mv,redirect:Mv,error:Mv});function LGt(t){if(t.internalResponse)return JCn(LGt(t.internalResponse),t.type);let e=uae({...t,body:null});return t.body!=null&&(e.body=bQo(t.body)),e}a(LGt,"cloneResponse");function uae(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new qCn(t?.headersList):new qCn,urlList:t?.urlList?[...t.urlList]:[]}}a(uae,"makeResponse");function nYe(t){let e=RQo(t);return uae({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}a(nYe,"makeNetworkError");function UQo(t){return t.type==="error"&&t.status===0}a(UQo,"isNetworkError");function tYe(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,o){return BGt(!(n in e)),r[n]=o,!0}})}a(tYe,"makeFilteredResponse");function JCn(t,e){if(e==="basic")return tYe(t,{type:"basic",headersList:t.headersList});if(e==="cors")return tYe(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return tYe(t,{type:"opaque",urlList:[],status:0,statusText:"",body:null});if(e==="opaqueredirect")return tYe(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});BGt(!1)}a(JCn,"filterResponse");function QQo(t,e=null){return BGt(xQo(t)),wQo(t)?nYe(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):nYe(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}a(QQo,"makeAppropriateNetworkError");function $Cn(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!IQo(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(PW(t).status=e.status),"statusText"in e&&e.statusText!=null&&(PW(t).statusText=e.statusText),"headers"in e&&e.headers!=null&&_Qo(BQo(t),e.headers),r){if(NQo.includes(t.status))throw ms.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});PW(t).body=r.body,r.type!=null&&!PW(t).headersList.contains("content-type",!0)&&PW(t).headersList.append("content-type",r.type,!0)}}a($Cn,"initializeResponse");function Pbe(t,e){let r=new Ov(rYe);FQo(r,t);let n=new VCn(rYe);return LQo(r,n),zCn(n,t.headersList),WCn(n,e),t.urlList.length!==0&&t.body?.stream&&YCn.register(r,new WeakRef(t.body.stream)),r}a(Pbe,"fromInnerResponse");ms.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?ms.converters.USVString(t,e,r):ms.is.Blob(t)||ms.is.BufferSource(t)||ms.is.FormData(t)||ms.is.URLSearchParams(t)?t:ms.converters.DOMString(t,e,r)};ms.converters.BodyInit=function(t,e,r){return ms.is.ReadableStream(t)||t?.[Symbol.asyncIterator]?t:ms.converters.XMLHttpRequestBodyInit(t,e,r)};ms.converters.ResponseInit=ms.dictionaryConverter([{key:"status",converter:ms.converters["unsigned short"],defaultValue:a(()=>200,"defaultValue")},{key:"statusText",converter:ms.converters.ByteString,defaultValue:a(()=>"","defaultValue")},{key:"headers",converter:ms.converters.HeadersInit}]);ms.is.Response=ms.util.MakeTypeAssertion(Ov);XCn.exports={isNetworkError:UQo,makeNetworkError:nYe,makeResponse:uae,makeAppropriateNetworkError:QQo,filterResponse:JCn,Response:Ov,cloneResponse:LGt,fromInnerResponse:Pbe,getResponseState:PW}});var dae=T((_9u,f_n)=>{"use strict";f();var{extractBody:qQo,mixinBody:GQo,cloneBody:HQo,bodyUnusable:ZCn}=Gse(),{Headers:o_n,fill:jQo,HeadersList:sYe,setHeadersGuard:FGt,getHeadersGuard:$Qo,setHeadersList:s_n,getHeadersList:e_n}=RW(),oYe=eo(),t_n=require("node:util"),{isValidHTTPToken:VQo,sameOrigin:r_n,environmentSettingsObject:iYe}=wv(),{forbiddenMethodsSet:WQo,corsSafeListedMethodsSet:zQo,referrerPolicy:YQo,requestRedirect:KQo,requestMode:JQo,requestCredentials:XQo,requestCache:ZQo,requestDuplex:eqo}=Gve(),{kEnumerableProperty:R0,normalizedMethodRecordsBase:tqo,normalizedMethodRecords:rqo}=oYe,{webidl:oi}=Qm(),{URLSerializer:nqo}=AS(),{kConstruct:aYe}=ac(),iqo=require("node:assert"),{getMaxListeners:a_n,setMaxListeners:oqo,defaultMaxListeners:sqo}=require("node:events"),aqo=Symbol("abortController"),c_n=new FinalizationRegistry(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),cYe=new WeakMap,UGt;try{UGt=a_n(new AbortController().signal)>0}catch{UGt=!1}function n_n(t){return e;function e(){let r=t.deref();if(r!==void 0){c_n.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=cYe.get(r.signal);if(n!==void 0){if(n.size!==0){for(let o of n){let s=o.deref();s!==void 0&&s.abort(this.reason)}n.clear()}cYe.delete(r.signal)}}}}a(n_n,"buildAbort");var i_n=!1,UC=class t{static{a(this,"Request")}#e;#t;#n;#r;constructor(e,r=void 0){if(oi.util.markAsUncloneable(this),e===aYe)return;oi.argumentLengthCheck(arguments,1,"Request constructor"),e=oi.converters.RequestInfo(e),r=oi.converters.RequestInit(r);let o=null,s=null,c=iYe.settingsObject.baseUrl,l=null;if(typeof e=="string"){this.#t=r.dispatcher;let _;try{_=new URL(e,c)}catch(v){throw new TypeError("Failed to parse URL from "+e,{cause:v})}if(_.username||_.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);o=lYe({urlList:[_]}),s="cors"}else iqo(oi.is.Request(e)),o=e.#r,l=e.#e,this.#t=r.dispatcher||e.#t;let u=iYe.settingsObject.origin,d="client";if(o.window?.constructor?.name==="EnvironmentSettingsObject"&&r_n(o.window,u)&&(d=o.window),r.window!=null)throw new TypeError(`'window' option '${d}' must be null`);"window"in r&&(d="no-window"),o=lYe({method:o.method,headersList:o.headersList,unsafeRequest:o.unsafeRequest,client:iYe.settingsObject,window:d,priority:o.priority,origin:o.origin,referrer:o.referrer,referrerPolicy:o.referrerPolicy,mode:o.mode,credentials:o.credentials,cache:o.cache,redirect:o.redirect,integrity:o.integrity,keepalive:o.keepalive,reloadNavigation:o.reloadNavigation,historyNavigation:o.historyNavigation,urlList:[...o.urlList]});let p=Object.keys(r).length!==0;if(p&&(o.mode==="navigate"&&(o.mode="same-origin"),o.reloadNavigation=!1,o.historyNavigation=!1,o.origin="client",o.referrer="client",o.referrerPolicy="",o.url=o.urlList[o.urlList.length-1],o.urlList=[o.url]),r.referrer!==void 0){let _=r.referrer;if(_==="")o.referrer="no-referrer";else{let v;try{v=new URL(_,c)}catch(b){throw new TypeError(`Referrer "${_}" is not a valid URL.`,{cause:b})}v.protocol==="about:"&&v.hostname==="client"||u&&!r_n(v,iYe.settingsObject.baseUrl)?o.referrer="client":o.referrer=v}}r.referrerPolicy!==void 0&&(o.referrerPolicy=r.referrerPolicy);let h;if(r.mode!==void 0?h=r.mode:h=s,h==="navigate")throw oi.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(h!=null&&(o.mode=h),r.credentials!==void 0&&(o.credentials=r.credentials),r.cache!==void 0&&(o.cache=r.cache),o.cache==="only-if-cached"&&o.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(o.redirect=r.redirect),r.integrity!=null&&(o.integrity=String(r.integrity)),r.keepalive!==void 0&&(o.keepalive=!!r.keepalive),r.method!==void 0){let _=r.method,v=rqo[_];if(v!==void 0)o.method=v;else{if(!VQo(_))throw new TypeError(`'${_}' is not a valid HTTP method.`);let b=_.toUpperCase();if(WQo.has(b))throw new TypeError(`'${_}' HTTP method is unsupported.`);_=tqo[b]??_,o.method=_}!i_n&&o.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),i_n=!0)}r.signal!==void 0&&(l=r.signal),this.#r=o;let m=new AbortController;if(this.#e=m.signal,l!=null)if(l.aborted)m.abort(l.reason);else{this[aqo]=m;let _=new WeakRef(m),v=n_n(_);UGt&&a_n(l)===sqo&&oqo(1500,l),oYe.addAbortListener(l,v),c_n.register(m,{signal:l,abort:v},v)}if(this.#n=new o_n(aYe),s_n(this.#n,o.headersList),FGt(this.#n,"request"),h==="no-cors"){if(!zQo.has(o.method))throw new TypeError(`'${o.method} is unsupported in no-cors mode.`);FGt(this.#n,"request-no-cors")}if(p){let _=e_n(this.#n),v=r.headers!==void 0?r.headers:new sYe(_);if(_.clear(),v instanceof sYe){for(let{name:b,value:I}of v.rawValues())_.append(b,I,!1);_.cookies=v.cookies}else jQo(this.#n,v)}let g=oi.is.Request(e)?e.#r.body:null;if((r.body!=null||g!=null)&&(o.method==="GET"||o.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[_,v]=qQo(r.body,o.keepalive);A=_,v&&!e_n(this.#n).contains("content-type",!0)&&this.#n.append("content-type",v,!0)}let y=A??g;if(y!=null&&y.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(o.mode!=="same-origin"&&o.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');o.useCORSPreflightFlag=!0}let E=y;if(A==null&&g!=null){if(ZCn(e.#r))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let _=new TransformStream;g.stream.pipeThrough(_),E={source:g.source,length:g.length,stream:_.readable}}this.#r.body=E}get method(){return oi.brandCheck(this,t),this.#r.method}get url(){return oi.brandCheck(this,t),nqo(this.#r.url)}get headers(){return oi.brandCheck(this,t),this.#n}get destination(){return oi.brandCheck(this,t),this.#r.destination}get referrer(){return oi.brandCheck(this,t),this.#r.referrer==="no-referrer"?"":this.#r.referrer==="client"?"about:client":this.#r.referrer.toString()}get referrerPolicy(){return oi.brandCheck(this,t),this.#r.referrerPolicy}get mode(){return oi.brandCheck(this,t),this.#r.mode}get credentials(){return oi.brandCheck(this,t),this.#r.credentials}get cache(){return oi.brandCheck(this,t),this.#r.cache}get redirect(){return oi.brandCheck(this,t),this.#r.redirect}get integrity(){return oi.brandCheck(this,t),this.#r.integrity}get keepalive(){return oi.brandCheck(this,t),this.#r.keepalive}get isReloadNavigation(){return oi.brandCheck(this,t),this.#r.reloadNavigation}get isHistoryNavigation(){return oi.brandCheck(this,t),this.#r.historyNavigation}get signal(){return oi.brandCheck(this,t),this.#e}get body(){return oi.brandCheck(this,t),this.#r.body?this.#r.body.stream:null}get bodyUsed(){return oi.brandCheck(this,t),!!this.#r.body&&oYe.isDisturbed(this.#r.body.stream)}get duplex(){return oi.brandCheck(this,t),"half"}clone(){if(oi.brandCheck(this,t),ZCn(this.#r))throw new TypeError("unusable");let e=u_n(this.#r),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=cYe.get(this.signal);n===void 0&&(n=new Set,cYe.set(this.signal,n));let o=new WeakRef(r);n.add(o),oYe.addAbortListener(r.signal,n_n(o))}return d_n(e,this.#t,r.signal,$Qo(this.#n))}[t_n.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${t_n.formatWithOptions(r,n)}`}static setRequestSignal(e,r){return e.#e=r,e}static getRequestDispatcher(e){return e.#t}static setRequestDispatcher(e,r){e.#t=r}static setRequestHeaders(e,r){e.#n=r}static getRequestState(e){return e.#r}static setRequestState(e,r){e.#r=r}},{setRequestSignal:cqo,getRequestDispatcher:lqo,setRequestDispatcher:uqo,setRequestHeaders:dqo,getRequestState:l_n,setRequestState:fqo}=UC;Reflect.deleteProperty(UC,"setRequestSignal");Reflect.deleteProperty(UC,"getRequestDispatcher");Reflect.deleteProperty(UC,"setRequestDispatcher");Reflect.deleteProperty(UC,"setRequestHeaders");Reflect.deleteProperty(UC,"getRequestState");Reflect.deleteProperty(UC,"setRequestState");GQo(UC,l_n);function lYe(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,useURLCredentials:t.useURLCredentials??void 0,traversableForUserPrompts:t.traversableForUserPrompts??"client",urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new sYe(t.headersList):new sYe}}a(lYe,"makeRequest");function u_n(t){let e=lYe({...t,body:null});return t.body!=null&&(e.body=HQo(t.body)),e}a(u_n,"cloneRequest");function d_n(t,e,r,n){let o=new UC(aYe);fqo(o,t),uqo(o,e),cqo(o,r);let s=new o_n(aYe);return dqo(o,s),s_n(s,t.headersList),FGt(s,n),o}a(d_n,"fromInnerRequest");Object.defineProperties(UC.prototype,{method:R0,url:R0,headers:R0,redirect:R0,clone:R0,signal:R0,duplex:R0,destination:R0,body:R0,bodyUsed:R0,isHistoryNavigation:R0,isReloadNavigation:R0,keepalive:R0,integrity:R0,cache:R0,credentials:R0,attribute:R0,referrerPolicy:R0,referrer:R0,mode:R0,[Symbol.toStringTag]:{value:"Request",configurable:!0}});oi.is.Request=oi.util.MakeTypeAssertion(UC);oi.converters.RequestInfo=function(t){return typeof t=="string"?oi.converters.USVString(t):oi.is.Request(t)?t:oi.converters.USVString(t)};oi.converters.RequestInit=oi.dictionaryConverter([{key:"method",converter:oi.converters.ByteString},{key:"headers",converter:oi.converters.HeadersInit},{key:"body",converter:oi.nullableConverter(oi.converters.BodyInit)},{key:"referrer",converter:oi.converters.USVString},{key:"referrerPolicy",converter:oi.converters.DOMString,allowedValues:YQo},{key:"mode",converter:oi.converters.DOMString,allowedValues:JQo},{key:"credentials",converter:oi.converters.DOMString,allowedValues:XQo},{key:"cache",converter:oi.converters.DOMString,allowedValues:ZQo},{key:"redirect",converter:oi.converters.DOMString,allowedValues:KQo},{key:"integrity",converter:oi.converters.DOMString},{key:"keepalive",converter:oi.converters.boolean},{key:"signal",converter:oi.nullableConverter(t=>oi.converters.AbortSignal(t,"RequestInit","signal"))},{key:"window",converter:oi.converters.any},{key:"duplex",converter:oi.converters.DOMString,allowedValues:eqo},{key:"dispatcher",converter:oi.converters.any},{key:"priority",converter:oi.converters.DOMString,allowedValues:["high","low","auto"],defaultValue:a(()=>"auto","defaultValue")}]);f_n.exports={Request:UC,makeRequest:lYe,fromInnerRequest:d_n,cloneRequest:u_n,getRequestDispatcher:lqo,getRequestState:l_n}});var C_n=T((T9u,E_n)=>{"use strict";f();var pqo=require("node:assert"),{runtimeFeatures:h_n}=_4(),kW=new Map([["sha256",0],["sha384",1],["sha512",2]]),QGt;if(h_n.has("crypto")){QGt=require("node:crypto");let t=QGt.getHashes();t.length===0&&kW.clear();for(let e of kW.keys())t.includes(e)===!1&&kW.delete(e)}else kW.clear();var p_n=Map.prototype.get.bind(kW),qGt=Map.prototype.has.bind(kW),hqo=h_n.has("crypto")===!1||kW.size===0?()=>!0:(t,e)=>{let r=g_n(e);if(r.length===0)return!0;let n=m_n(r);for(let o of n){let s=o.alg,c=o.val,l=A_n(s,t);if(y_n(l,c))return!0}return!1};function m_n(t){let e=[],r=null;for(let n of t){if(pqo(qGt(n.alg),"Invalid SRI hash algorithm token"),e.length===0){e.push(n),r=n;continue}let o=r.alg,s=p_n(o),c=n.alg,l=p_n(c);ls?(r=n,e[0]=n,e.length=1):e.push(n))}return e}a(m_n,"getStrongestMetadata");function g_n(t){let e=[];for(let r of t.split(" ")){let o=r.split("?",1)[0],s="",c=[o.slice(0,6),o.slice(7)],l=c[0];if(!qGt(l))continue;c[1]&&(s=c[1]);let u={alg:l,val:s};e.push(u)}return e}a(g_n,"parseMetadata");var A_n=a((t,e)=>QGt.hash(t,e,"base64"),"applyAlgorithmToBytes");function y_n(t,e){let r=t.length;r!==0&&t[r-1]==="="&&(r-=1),r!==0&&t[r-1]==="="&&(r-=1);let n=e.length;if(n!==0&&e[n-1]==="="&&(n-=1),n!==0&&e[n-1]==="="&&(n-=1),r!==n)return!1;for(let o=0;o{"use strict";f();var{makeNetworkError:Va,makeAppropriateNetworkError:Nbe,filterResponse:GGt,makeResponse:uYe,fromInnerResponse:mqo,getResponseState:gqo}=kbe(),{HeadersList:HGt}=RW(),{Request:Aqo,cloneRequest:yqo,getRequestDispatcher:Eqo,getRequestState:Cqo}=dae(),Ow=require("node:zlib"),{makePolicyContainer:_qo,clonePolicyContainer:vqo,requestBadPort:bqo,TAOCheck:Tqo,appendRequestOriginHeader:Sqo,responseLocationURL:Iqo,requestCurrentURL:Bv,setRequestReferrerPolicyOnRedirect:xqo,tryUpgradeRequestToAPotentiallyTrustworthyURL:wqo,createOpaqueTimingInfo:YGt,appendFetchMetadata:Rqo,corsCheck:Pqo,crossOriginResourcePolicyCheck:kqo,determineRequestsReferrer:Nqo,coarsenedSharedCurrentTime:Dbe,sameOrigin:WGt,isCancelled:o7,isAborted:__n,isErrorLike:Dqo,fullyReadBody:Mqo,readableStreamClose:Oqo,urlIsLocal:Bqo,urlIsHttpHttpsScheme:hYe,urlHasHttpsScheme:Lqo,clampAndCoarsenConnectionTimingInfo:Fqo,simpleRangeHeaderValue:Uqo,buildContentRange:Qqo,createInflate:qqo,extractMimeType:Gqo,hasAuthenticationEntry:Hqo,includesCredentials:v_n,isTraversableNavigable:jqo}=wv(),NW=require("node:assert"),{safelyExtractBody:mYe,extractBody:b_n}=Gse(),{redirectStatusSet:x_n,nullBodyStatus:w_n,safeMethodsSet:$qo,requestBodyHeader:Vqo,subresourceSet:Wqo}=Gve(),zqo=require("node:events"),{Readable:Yqo,pipeline:Kqo,finished:Jqo,isErrored:Xqo,isReadable:dYe}=require("node:stream"),{addAbortListener:Zqo,bufferToLowerCasedHeaderName:T_n}=eo(),{dataURLProcessor:eGo,serializeAMimeType:tGo,minimizeSupportedMimeType:rGo}=AS(),{getGlobalDispatcher:nGo}=Yze(),{webidl:KGt}=Qm(),{STATUS_CODES:S_n}=require("node:http"),{bytesMatch:iGo}=C_n(),{createDeferredPromise:oGo}=Wve(),{isomorphicEncode:fYe}=C4(),{runtimeFeatures:sGo}=_4(),aGo=sGo.has("zstd"),cGo=["GET","HEAD"],lGo=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",jGt,pYe=class extends zqo{static{a(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function uGo(t){R_n(t,"fetch")}a(uGo,"handleFetchDone");function dGo(t,e=void 0){KGt.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=oGo(),n;try{n=new Aqo(t,e)}catch(p){return r.reject(p),r.promise}let o=Cqo(n);if(n.signal.aborted)return $Gt(r,o,null,n.signal.reason,null),r.promise;o.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(o.serviceWorkers="none");let c=null,l=!1,u=null;return Zqo(n.signal,()=>{l=!0,NW(u!=null),u.abort(n.signal.reason);let p=c?.deref();$Gt(r,o,p,n.signal.reason,u.controller)}),u=k_n({request:o,processResponseEndOfBody:uGo,processResponse:a(p=>{if(!l){if(p.aborted){$Gt(r,o,c,u.serializedAbortReason,u.controller);return}if(p.type==="error"){r.reject(new TypeError("fetch failed",{cause:p.error}));return}c=new WeakRef(mqo(p,"immutable")),r.resolve(c.deref()),r=null}},"processResponse"),dispatcher:Eqo(n),requestObject:n}),r.promise}a(dGo,"fetch");function R_n(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,o=t.cacheState;hYe(r)&&n!==null&&(t.timingAllowPassed||(n=YGt({startTime:n.startTime}),o=""),n.endTime=Dbe(),t.timingInfo=n,P_n(n,r.href,e,globalThis,o,"",t.status))}a(R_n,"finalizeAndReportTiming");var P_n=performance.markResourceTiming;function $Gt(t,e,r,n,o){if(t&&t.reject(n),e.body?.stream!=null&&dYe(e.body.stream)&&e.body.stream.cancel(n).catch(c=>{if(c.code!=="ERR_INVALID_STATE")throw c}),r==null)return;let s=gqo(r);s.body?.stream!=null&&dYe(s.body.stream)&&o.error(n)}a($Gt,"abortFetch");function k_n({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:o,processResponseConsumeBody:s,useParallelQueue:c=!1,dispatcher:l=nGo(),requestObject:u=null}){NW(l);let d=null,p=!1;t.client!=null&&(d=t.client.globalObject,p=t.client.crossOriginIsolatedCapability);let h=Dbe(p),m=YGt({startTime:h}),g={controller:new pYe(l),request:t,timingInfo:m,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:s,processResponseEndOfBody:o,taskDestination:d,crossOriginIsolatedCapability:p,requestObject:u};return NW(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=vqo(t.client.policyContainer):t.policyContainer=_qo()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,Wqo.has(t.destination),N_n(g,!1),g.controller}a(k_n,"fetching");async function N_n(t,e){try{let r=t.request,n=null;if(r.localURLsOnly&&!Bqo(Bv(r))&&(n=Va("local URLs only")),wqo(r),bqo(r)==="blocked"&&(n=Va("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=Nqo(r)),n===null){let s=Bv(r);WGt(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",n=await I_n(t)):r.mode==="same-origin"?n=Va('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?n=Va('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",n=await I_n(t)):hYe(Bv(r))?(r.responseTainting="cors",n=await D_n(t)):n=Va("URL scheme must be a HTTP(S) scheme")}if(e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=GGt(n,"basic"):r.responseTainting==="cors"?n=GGt(n,"cors"):r.responseTainting==="opaque"?n=GGt(n,"opaque"):NW(!1));let o=n.status===0?n:n.internalResponse;if(o.urlList.length===0&&o.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&o.status===206&&o.rangeRequested&&!r.headers.contains("range",!0)&&(n=o=Va()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||w_n.includes(o.status))&&(o.body=null,t.controller.dump=!0),r.integrity){let s=a(l=>VGt(t,Va(l)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){s(n.error);return}let c=a(l=>{if(!iGo(l,r.integrity)){s("integrity mismatch");return}n.body=mYe(l)[0],VGt(t,n)},"processBody");Mqo(n.body,c,s)}else VGt(t,n)}catch(r){t.controller.terminate(r)}}a(N_n,"mainFetch");function I_n(t){if(o7(t)&&t.request.redirectCount===0)return Promise.resolve(Nbe(t));let{request:e}=t,{protocol:r}=Bv(e);switch(r){case"about:":return Promise.resolve(Va("about scheme is not supported"));case"blob:":{jGt||(jGt=require("node:buffer").resolveObjectURL);let n=Bv(e);if(n.search.length!==0)return Promise.resolve(Va("NetworkError when attempting to fetch resource."));let o=jGt(n.toString());if(e.method!=="GET"||!KGt.is.Blob(o))return Promise.resolve(Va("invalid method"));let s=uYe(),c=o.size,l=fYe(`${c}`),u=o.type;if(e.headersList.contains("range",!0)){s.rangeRequested=!0;let d=e.headersList.get("range",!0),p=Uqo(d,!0);if(p==="failure")return Promise.resolve(Va("failed to fetch the data URL"));let{rangeStartValue:h,rangeEndValue:m}=p;if(h===null)h=c-m,m=h+m-1;else{if(h>=c)return Promise.resolve(Va("Range start is greater than the blob's size."));(m===null||m>=c)&&(m=c-1)}let g=o.slice(h,m+1,u),A=b_n(g);s.body=A[0];let y=fYe(`${g.size}`),E=Qqo(h,m,c);s.status=206,s.statusText="Partial Content",s.headersList.set("content-length",y,!0),s.headersList.set("content-type",u,!0),s.headersList.set("content-range",E,!0)}else{let d=b_n(o);s.statusText="OK",s.body=d[0],s.headersList.set("content-length",l,!0),s.headersList.set("content-type",u,!0)}return Promise.resolve(s)}case"data:":{let n=Bv(e),o=eGo(n);if(o==="failure")return Promise.resolve(Va("failed to fetch the data URL"));let s=tGo(o.mimeType);return Promise.resolve(uYe({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:mYe(o.body)[0]}))}case"file:":return Promise.resolve(Va("not implemented... yet..."));case"http:":case"https:":return D_n(t).catch(n=>Va(n));default:return Promise.resolve(Va("unknown scheme"))}}a(I_n,"schemeFetch");function fGo(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}a(fGo,"finalizeResponse");function VGt(t,e){let r=t.timingInfo,n=a(()=>{let s=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(!hYe(t.request.url))return;r.endTime=s;let l=e.cacheState,u=e.bodyInfo;e.timingAllowPassed||(r=YGt(r),l="");let d=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){d=e.status;let p=Gqo(e.headersList);p!=="failure"&&(u.contentType=rGo(p))}t.request.initiatorType!=null&&P_n(r,t.request.url.href,t.request.initiatorType,globalThis,l,u,d)};let c=a(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>c())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let o=e.type==="error"?e:e.internalResponse??e;o.body==null?n():Jqo(o.body.stream,()=>{n()})}a(VGt,"fetchFinale");async function D_n(t){let e=t.request,r=null,n=null,o=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await zGt(t),e.responseTainting==="cors"&&Pqo(e,r)==="failure")return Va("cors failure");Tqo(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&kqo(e.origin,e.client,e.destination,n)==="blocked"?Va("blocked"):(x_n.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=Va("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await pGo(t,r):NW(!1)),r.timingInfo=o,r)}a(D_n,"httpFetch");function pGo(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,o;try{if(o=Iqo(n,Bv(r).hash),o==null)return e}catch(c){return Promise.resolve(Va(c))}if(!hYe(o))return Promise.resolve(Va("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(Va("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(o.username||o.password)&&!WGt(r,o))return Promise.resolve(Va('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(o.username||o.password))return Promise.resolve(Va('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(Va());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!cGo.includes(r.method)){r.method="GET",r.body=null;for(let c of Vqo)r.headersList.delete(c)}WGt(Bv(r),o)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(NW(r.body.source!=null),r.body=mYe(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=Dbe(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(o),xqo(r,n),N_n(t,!0)}a(pGo,"httpRedirectFetch");async function zGt(t,e=!1,r=!1){let n=t.request,o=null,s=null,c=null,l=null,u=!1;n.window==="no-window"&&n.redirect==="error"?(o=t,s=n):(s=yqo(n),o={...t},o.request=s);let d=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",p=s.body?s.body.length:null,h=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(h="0"),p!=null&&(h=fYe(`${p}`)),h!=null&&s.headersList.append("content-length",h,!0),p!=null&&s.keepalive,KGt.is.URL(s.referrer)&&s.headersList.append("referer",fYe(s.referrer.href),!0),Sqo(s),Rqo(s),s.headersList.contains("user-agent",!0)||s.headersList.append("user-agent",lGo,!0),s.cache==="default"&&(s.headersList.contains("if-modified-since",!0)||s.headersList.contains("if-none-match",!0)||s.headersList.contains("if-unmodified-since",!0)||s.headersList.contains("if-match",!0)||s.headersList.contains("if-range",!0))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control",!0)&&s.headersList.append("cache-control","max-age=0",!0),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma",!0)||s.headersList.append("pragma","no-cache",!0),s.headersList.contains("cache-control",!0)||s.headersList.append("cache-control","no-cache",!0)),s.headersList.contains("range",!0)&&s.headersList.append("accept-encoding","identity",!0),s.headersList.contains("accept-encoding",!0)||(Lqo(Bv(s))?s.headersList.append("accept-encoding","br, gzip, deflate",!0):s.headersList.append("accept-encoding","gzip, deflate",!0)),s.headersList.delete("host",!0),d&&!s.headersList.contains("authorization",!0)){let m=null;if(!(Hqo(s)&&(s.useURLCredentials===void 0||!v_n(Bv(s))))){if(v_n(Bv(s))&&e){let{username:g,password:A}=Bv(s);m=`Basic ${Buffer.from(`${g}:${A}`).toString("base64")}`}}m!==null&&s.headersList.append("Authorization",m,!1)}if(l==null&&(s.cache="no-store"),s.cache!=="no-store"&&s.cache,c==null){if(s.cache==="only-if-cached")return Va("only if cached");let m=await hGo(o,d,r);!$qo.has(s.method)&&m.status>=200&&m.status<=399,u&&m.status,c==null&&(c=m)}if(c.urlList=[...s.urlList],s.headersList.contains("range",!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=d,c.status===401&&s.responseTainting!=="cors"&&d&&jqo(n.traversableForUserPrompts)){if(n.body!=null){if(n.body.source==null)return Va("expected non-null body source");n.body=mYe(n.body.source)[0]}if(n.useURLCredentials===void 0||e)return o7(t)?Nbe(t):c;t.controller.connection.destroy(),c=await zGt(t,!0)}if(c.status===407)return n.window==="no-window"?Va():o7(t)?Nbe(t):Va("proxy authentication required");if(c.status===421&&!r&&(n.body==null||n.body.source!=null)){if(o7(t))return Nbe(t);t.controller.connection.destroy(),c=await zGt(t,e,!0)}return c}a(zGt,"httpNetworkOrCacheFetch");async function hGo(t,e=!1,r=!1){NW(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,y=!0){this.destroyed||(this.destroyed=!0,y&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,o=null,s=t.timingInfo;null==null&&(n.cache="no-store");let l=r?"yes":"no";n.mode;let u=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=a(async function*(_){o7(t)||(yield _,t.processRequestBodyChunkLength?.(_.byteLength))},"processBodyChunk"),y=a(()=>{o7(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=a(_=>{o7(t)||(_.name==="AbortError"?t.controller.abort():t.controller.terminate(_))},"processBodyError");u=(async function*(){try{for await(let _ of n.body.stream)yield*A(_);y()}catch(_){E(_)}})()}try{let{body:A,status:y,statusText:E,headersList:_,socket:v}=await g({body:u});if(v)o=uYe({status:y,statusText:E,headersList:_,socket:v});else{let b=A[Symbol.asyncIterator]();t.controller.next=()=>b.next(),o=uYe({status:y,statusText:E,headersList:_})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),Nbe(t,A)):Va(A)}let d=a(()=>t.controller.resume(),"pullAlgorithm"),p=a(A=>{o7(t)||t.controller.abort(A)},"cancelAlgorithm"),h=new ReadableStream({start(A){t.controller.controller=A},pull:d,cancel:p,type:"bytes"});o.body={stream:h,source:null,length:null},t.controller.resume||t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,y;try{let{done:_,value:v}=await t.controller.next();if(__n(t))break;A=_?void 0:v}catch(_){t.controller.ended&&!s.encodedBodySize?A=void 0:(A=_,y=!0)}if(A===void 0){Oqo(t.controller.controller),fGo(t,o);return}if(s.decodedBodySize+=A?.byteLength??0,y){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),Xqo(h)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){__n(t)?(o.aborted=!0,dYe(h)&&t.controller.controller.error(t.controller.serializedAbortReason)):dYe(h)&&t.controller.controller.error(new TypeError("terminated",{cause:Dqo(A)?A:void 0})),t.controller.connection.destroy()}return a(m,"onAborted"),o;function g({body:A}){let y=Bv(n),E=t.controller.dispatcher,_=y.pathname+y.search,v=y.search.length===0&&y.href[y.href.length-y.hash.length-1]==="?";return new Promise((b,I)=>E.dispatch({path:v?`${_}?`:_,origin:y.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(x){let{connection:R}=t.controller;s.finalConnectionTimingInfo=Fqo(void 0,s.postRedirectStartTime,t.crossOriginIsolatedCapability),R.destroyed?x(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",x),this.abort=R.abort=x),s.finalNetworkRequestStartTime=Dbe(t.crossOriginIsolatedCapability)},onResponseStarted(){s.finalNetworkResponseStartTime=Dbe(t.crossOriginIsolatedCapability)},onHeaders(x,R,w,P){if(x<200)return!1;let k=new HGt;for(let O=0;OF)return I(new Error(`too many content-encodings in response: ${N.length}, maximum allowed is ${F}`)),!0;for(let U=N.length-1;U>=0;--U){let L=N[U].trim();if(L==="x-gzip"||L==="gzip")D.push(Ow.createGunzip({flush:Ow.constants.Z_SYNC_FLUSH,finishFlush:Ow.constants.Z_SYNC_FLUSH}));else if(L==="deflate")D.push(qqo({flush:Ow.constants.Z_SYNC_FLUSH,finishFlush:Ow.constants.Z_SYNC_FLUSH}));else if(L==="br")D.push(Ow.createBrotliDecompress({flush:Ow.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ow.constants.BROTLI_OPERATION_FLUSH}));else if(L==="zstd"&&aGo)D.push(Ow.createZstdDecompress({flush:Ow.constants.ZSTD_e_continue,finishFlush:Ow.constants.ZSTD_e_end}));else{D.length=0;break}}}let G=this.onError.bind(this);return b({status:x,statusText:P,headersList:k,body:D.length?Kqo(this.body,...D,O=>{O&&this.onError(O)}).on("error",G):this.body.on("error",G)}),!0},onData(x){if(t.controller.dump)return;let R=x;return s.encodedBodySize+=R.byteLength,this.body.push(R)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.ended=!0,this.body.push(null)},onError(x){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(x),t.controller.terminate(x),I(x)},onRequestUpgrade(x,R,w,P){if(P.session!=null&&R!==200||P.session==null&&R!==101)return!1;let k=new HGt;for(let[Q,M]of Object.entries(w)){if(M==null)continue;let D=Q.toLowerCase();if(Array.isArray(M))for(let G of M)k.append(D,String(G),!0);else k.append(D,String(M),!0)}return b({status:R,statusText:S_n[R],headersList:k,socket:P}),!0},onUpgrade(x,R,w){if(w.session!=null&&x!==200||w.session==null&&x!==101)return!1;let P=new HGt;for(let k=0;k{"use strict";f();var mGo=require("node:assert"),{URLSerializer:O_n}=AS(),{isValidHeaderName:gGo}=wv();function AGo(t,e,r=!1){let n=O_n(t,r),o=O_n(e,r);return n===o}a(AGo,"urlEquals");function yGo(t){mGo(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),gGo(r)&&e.push(r);return e}a(yGo,"getFieldValues");B_n.exports={urlEquals:AGo,getFieldValues:yGo}});var q_n=T((D9u,Q_n)=>{"use strict";f();var JGt=require("node:assert"),{kConstruct:EGo}=ac(),{urlEquals:CGo,getFieldValues:XGt}=L_n(),{kEnumerableProperty:DW,isDisturbed:_Go}=eo(),{webidl:Pn}=Qm(),{cloneResponse:F_n,fromInnerResponse:vGo,getResponseState:bGo}=kbe(),{Request:Obe,fromInnerRequest:TGo,getRequestState:NN}=dae(),{fetching:SGo}=Mbe(),{urlIsHttpHttpsScheme:gYe,readAllBytes:IGo}=wv(),{createDeferredPromise:fae}=Wve(),AYe=class t{static{a(this,"Cache")}#e;constructor(){arguments[0]!==EGo&&Pn.illegalConstructor(),Pn.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){Pn.brandCheck(this,t);let n="Cache.match";Pn.argumentLengthCheck(arguments,1,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=this.#i(e,r,1);if(o.length!==0)return o[0]}async matchAll(e=void 0,r={}){Pn.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=Pn.converters.RequestInfo(e)),r=Pn.converters.CacheQueryOptions(r,n,"options"),this.#i(e,r)}async add(e){Pn.brandCheck(this,t),Pn.argumentLengthCheck(arguments,1,"Cache.add"),e=Pn.converters.RequestInfo(e);let n=[e];return await this.addAll(n)}async addAll(e){Pn.brandCheck(this,t);let r="Cache.addAll";Pn.argumentLengthCheck(arguments,1,r);let n=[],o=[];for(let m of e){if(m===void 0)throw Pn.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=Pn.converters.RequestInfo(m),typeof m=="string")continue;let g=NN(m);if(!gYe(g.url)||g.method!=="GET")throw Pn.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let s=[];for(let m of e){let g=NN(new Obe(m));if(!gYe(g.url))throw Pn.errors.exception({header:r,message:"Expected http/s scheme."});g.initiator="fetch",g.destination="subresource",o.push(g);let A=fae();s.push(SGo({request:g,processResponse(y){if(y.type==="error"||y.status===206||y.status<200||y.status>299)A.reject(Pn.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(y.headersList.contains("vary")){let E=XGt(y.headersList.get("vary"));for(let _ of E)if(_==="*"){A.reject(Pn.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let v of s)v.abort();return}}},processResponseEndOfBody(y){if(y.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(y)}})),n.push(A.promise)}let l=await Promise.all(n),u=[],d=0;for(let m of l){let g={type:"put",request:o[d],response:m};u.push(g),d++}let p=fae(),h=null;try{this.#t(u)}catch(m){h=m}return queueMicrotask(()=>{h===null?p.resolve(void 0):p.reject(h)}),p.promise}async put(e,r){Pn.brandCheck(this,t);let n="Cache.put";Pn.argumentLengthCheck(arguments,2,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.Response(r,n,"response");let o=null;if(Pn.is.Request(e)?o=NN(e):o=NN(new Obe(e)),!gYe(o.url)||o.method!=="GET")throw Pn.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let s=bGo(r);if(s.status===206)throw Pn.errors.exception({header:n,message:"Got 206 status"});if(s.headersList.contains("vary")){let g=XGt(s.headersList.get("vary"));for(let A of g)if(A==="*")throw Pn.errors.exception({header:n,message:"Got * vary field value"})}if(s.body&&(_Go(s.body.stream)||s.body.stream.locked))throw Pn.errors.exception({header:n,message:"Response body is locked or disturbed"});let c=F_n(s),l=fae();if(s.body!=null){let A=s.body.stream.getReader();IGo(A,l.resolve,l.reject)}else l.resolve(void 0);let u=[],d={type:"put",request:o,response:c};u.push(d);let p=await l.promise;c.body!=null&&(c.body.source=p);let h=fae(),m=null;try{this.#t(u)}catch(g){m=g}return queueMicrotask(()=>{m===null?h.resolve():h.reject(m)}),h.promise}async delete(e,r={}){Pn.brandCheck(this,t);let n="Cache.delete";Pn.argumentLengthCheck(arguments,1,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=null;if(Pn.is.Request(e)){if(o=NN(e),o.method!=="GET"&&!r.ignoreMethod)return!1}else JGt(typeof e=="string"),o=NN(new Obe(e));let s=[],c={type:"delete",request:o,options:r};s.push(c);let l=fae(),u=null,d;try{d=this.#t(s)}catch(p){u=p}return queueMicrotask(()=>{u===null?l.resolve(!!d?.length):l.reject(u)}),l.promise}async keys(e=void 0,r={}){Pn.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=Pn.converters.RequestInfo(e)),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e!==void 0)if(Pn.is.Request(e)){if(o=NN(e),o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=NN(new Obe(e)));let s=fae(),c=[];if(e===void 0)for(let l of this.#e)c.push(l[0]);else{let l=this.#n(o,r);for(let u of l)c.push(u[0])}return queueMicrotask(()=>{let l=[];for(let u of c){let d=TGo(u,void 0,new AbortController().signal,"immutable");l.push(d)}s.resolve(Object.freeze(l))}),s.promise}#t(e){let r=this.#e,n=[...r],o=[],s=[];try{for(let c of e){if(c.type!=="delete"&&c.type!=="put")throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(c.type==="delete"&&c.response!=null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#n(c.request,c.options,o).length)throw new DOMException("???","InvalidStateError");let l;if(c.type==="delete"){if(l=this.#n(c.request,c.options),l.length===0)return[];for(let u of l){let d=r.indexOf(u);JGt(d!==-1),r.splice(d,1)}}else if(c.type==="put"){if(c.response==null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let u=c.request;if(!gYe(u.url))throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(u.method!=="GET")throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(c.options!=null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});l=this.#n(c.request);for(let d of l){let p=r.indexOf(d);JGt(p!==-1),r.splice(p,1)}r.push([c.request,c.response]),o.push([c.request,c.response])}s.push([c.request,c.response])}return s}catch(c){throw this.#e.length=0,this.#e=n,c}}#n(e,r,n){let o=[],s=n??this.#e;for(let c of s){let[l,u]=c;this.#r(e,l,u,r)&&o.push(c)}return o}#r(e,r,n=null,o){let s=new URL(e.url),c=new URL(r.url);if(o?.ignoreSearch&&(c.search="",s.search=""),!CGo(s,c,!0))return!1;if(n==null||o?.ignoreVary||!n.headersList.contains("vary"))return!0;let l=XGt(n.headersList.get("vary"));for(let u of l){if(u==="*")return!1;let d=r.headersList.get(u),p=e.headersList.get(u);if(d!==p)return!1}return!0}#i(e,r,n=1/0){let o=null;if(e!==void 0)if(Pn.is.Request(e)){if(o=NN(e),o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=NN(new Obe(e)));let s=[];if(e===void 0)for(let l of this.#e)s.push(l[1]);else{let l=this.#n(o,r);for(let u of l)s.push(u[1])}let c=[];for(let l of s){let u=vGo(F_n(l),"immutable");if(c.push(u),c.length>=n)break}return Object.freeze(c)}};Object.defineProperties(AYe.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:DW,matchAll:DW,add:DW,addAll:DW,put:DW,delete:DW,keys:DW});var U_n=[{key:"ignoreSearch",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreVary",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Pn.converters.CacheQueryOptions=Pn.dictionaryConverter(U_n);Pn.converters.MultiCacheQueryOptions=Pn.dictionaryConverter([...U_n,{key:"cacheName",converter:Pn.converters.DOMString}]);Pn.converters.Response=Pn.interfaceConverter(Pn.is.Response,"Response");Pn.converters["sequence"]=Pn.sequenceConverter(Pn.converters.RequestInfo);Q_n.exports={Cache:AYe}});var H_n=T((B9u,G_n)=>{"use strict";f();var{Cache:yYe}=q_n(),{webidl:sA}=Qm(),{kEnumerableProperty:Bbe}=eo(),{kConstruct:Lbe}=ac(),EYe=class t{static{a(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==Lbe&&sA.illegalConstructor(),sA.util.markAsUncloneable(this)}async match(e,r={}){if(sA.brandCheck(this,t),sA.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=sA.converters.RequestInfo(e),r=sA.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new yYe(Lbe,n).match(e,r)}}else for(let n of this.#e.values()){let s=await new yYe(Lbe,n).match(e,r);if(s!==void 0)return s}}async has(e){sA.brandCheck(this,t);let r="CacheStorage.has";return sA.argumentLengthCheck(arguments,1,r),e=sA.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){sA.brandCheck(this,t);let r="CacheStorage.open";if(sA.argumentLengthCheck(arguments,1,r),e=sA.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let o=this.#e.get(e);return new yYe(Lbe,o)}let n=[];return this.#e.set(e,n),new yYe(Lbe,n)}async delete(e){sA.brandCheck(this,t);let r="CacheStorage.delete";return sA.argumentLengthCheck(arguments,1,r),e=sA.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return sA.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(EYe.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:Bbe,has:Bbe,open:Bbe,delete:Bbe,keys:Bbe});G_n.exports={CacheStorage:EYe}});var $_n=T((U9u,j_n)=>{"use strict";f();j_n.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var ZGt=T((q9u,K_n)=>{"use strict";f();function xGo(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}a(xGo,"isCTLExcludingHtab");function V_n(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}a(V_n,"validateCookieName");function W_n(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}a(W_n,"validateCookieValue");function z_n(t){for(let e=0;ee.toString().padStart(2,"0"));function Y_n(t){return typeof t=="number"&&(t=new Date(t)),`${RGo[t.getUTCDay()]}, ${CYe[t.getUTCDate()]} ${PGo[t.getUTCMonth()]} ${t.getUTCFullYear()} ${CYe[t.getUTCHours()]}:${CYe[t.getUTCMinutes()]}:${CYe[t.getUTCSeconds()]} GMT`}a(Y_n,"toIMFDate");function kGo(t){if(t<0)throw new Error("Invalid cookie max-age")}a(kGo,"validateCookieMaxAge");function NGo(t){if(t.name.length===0)return null;V_n(t.name),W_n(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(kGo(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(wGo(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(z_n(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${Y_n(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...o]=r.split("=");e.push(`${n.trim()}=${o.join("=")}`)}return e.join("; ")}a(NGo,"stringify");K_n.exports={isCTLExcludingHtab:xGo,validateCookieName:V_n,validateCookiePath:z_n,validateCookieValue:W_n,toIMFDate:Y_n,stringify:NGo}});var X_n=T((j9u,J_n)=>{"use strict";f();var{collectASequenceOfCodePointsFast:_Ye}=C4(),{maxNameValuePairSize:DGo,maxAttributeValueSize:MGo}=$_n(),{isCTLExcludingHtab:OGo}=ZGt(),BGo=require("node:assert"),{unescape:LGo}=require("node:querystring");function FGo(t){if(OGo(t))return null;let e="",r="",n="",o="";if(t.includes(";")){let s={position:0};e=_Ye(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))o=e;else{let s={position:0};n=_Ye("=",e,s),o=e.slice(s.position+1)}return n=n.trim(),o=o.trim(),n.length+o.length>DGo?null:{name:n,value:LGo(o),...pae(r)}}a(FGo,"parseSetCookie");function pae(t,e={}){if(t.length===0)return e;BGo(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=_Ye(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",o="";if(r.includes("=")){let c={position:0};n=_Ye("=",r,c),o=r.slice(c.position+1)}else n=r;if(n=n.trim(),o=o.trim(),o.length>MGo)return pae(t,e);let s=n.toLowerCase();if(s==="expires"){let c=new Date(o);e.expires=c}else if(s==="max-age"){let c=o.charCodeAt(0);if((c<48||c>57)&&o[0]!=="-"||!/^\d+$/.test(o))return pae(t,e);let l=Number(o);e.maxAge=l}else if(s==="domain"){let c=o;c[0]==="."&&(c=c.slice(1)),c=c.toLowerCase(),e.domain=c}else if(s==="path"){let c="";o.length===0||o[0]!=="/"?c="/":c=o,e.path=c}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let c="Default",l=o.toLowerCase();l.includes("none")&&(c="None"),l.includes("strict")&&(c="Strict"),l.includes("lax")&&(c="Lax"),e.sameSite=c}else e.unparsed??=[],e.unparsed.push(`${n}=${o}`);return pae(t,e)}a(pae,"parseUnparsedAttributes");J_n.exports={parseSetCookie:FGo,parseUnparsedAttributes:pae}});var r1n=T((W9u,t1n)=>{"use strict";f();var{parseSetCookie:Z_n}=X_n(),{stringify:UGo}=ZGt(),{webidl:ca}=Qm(),{Headers:QGo}=RW(),vYe=ca.brandCheckMultiple([QGo,globalThis.Headers].filter(Boolean));function qGo(t){ca.argumentLengthCheck(arguments,1,"getCookies"),vYe(t);let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[o,...s]=n.split("=");r[o.trim()]=s.join("=")}return r}a(qGo,"getCookies");function GGo(t,e,r){vYe(t);let n="deleteCookie";ca.argumentLengthCheck(arguments,2,n),e=ca.converters.DOMString(e,n,"name"),r=ca.converters.DeleteCookieAttributes(r),e1n(t,{name:e,value:"",expires:new Date(0),...r})}a(GGo,"deleteCookie");function HGo(t){ca.argumentLengthCheck(arguments,1,"getSetCookies"),vYe(t);let e=t.getSetCookie();return e?e.map(r=>Z_n(r)):[]}a(HGo,"getSetCookies");function jGo(t){return t=ca.converters.DOMString(t),Z_n(t)}a(jGo,"parseCookie");function e1n(t,e){ca.argumentLengthCheck(arguments,2,"setCookie"),vYe(t),e=ca.converters.Cookie(e);let r=UGo(e);r&&t.append("set-cookie",r,!0)}a(e1n,"setCookie");ca.converters.DeleteCookieAttributes=ca.dictionaryConverter([{converter:ca.nullableConverter(ca.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")}]);ca.converters.Cookie=ca.dictionaryConverter([{converter:ca.converters.DOMString,key:"name"},{converter:ca.converters.DOMString,key:"value"},{converter:ca.nullableConverter(t=>typeof t=="number"?ca.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters["long long"]),key:"maxAge",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters.boolean),key:"secure",defaultValue:a(()=>null,"defaultValue")},{converter:ca.nullableConverter(ca.converters.boolean),key:"httpOnly",defaultValue:a(()=>null,"defaultValue")},{converter:ca.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:ca.sequenceConverter(ca.converters.DOMString),key:"unparsed",defaultValue:a(()=>[],"defaultValue")}]);t1n.exports={getCookies:qGo,deleteCookie:GGo,getSetCookies:HGo,setCookie:e1n,parseCookie:jGo}});var SYe=T((K9u,i1n)=>{"use strict";f();var{webidl:Un}=Qm(),{kEnumerableProperty:QC}=eo(),{kConstruct:n1n}=ac(),hae=class t extends Event{static{a(this,"MessageEvent")}#e;constructor(e,r={}){if(e===n1n){super(arguments[1],arguments[2]),Un.util.markAsUncloneable(this);return}let n="MessageEvent constructor";Un.argumentLengthCheck(arguments,1,n),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,Un.util.markAsUncloneable(this)}get data(){return Un.brandCheck(this,t),this.#e.data}get origin(){return Un.brandCheck(this,t),this.#e.origin}get lastEventId(){return Un.brandCheck(this,t),this.#e.lastEventId}get source(){return Un.brandCheck(this,t),this.#e.source}get ports(){return Un.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,o=null,s="",c="",l=null,u=[]){return Un.brandCheck(this,t),Un.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:o,origin:s,lastEventId:c,source:l,ports:u})}static createFastMessageEvent(e,r){let n=new t(n1n,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:$Go}=hae;delete hae.createFastMessageEvent;var bYe=class t extends Event{static{a(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";Un.argumentLengthCheck(arguments,1,n),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.CloseEventInit(r),super(e,r),this.#e=r,Un.util.markAsUncloneable(this)}get wasClean(){return Un.brandCheck(this,t),this.#e.wasClean}get code(){return Un.brandCheck(this,t),this.#e.code}get reason(){return Un.brandCheck(this,t),this.#e.reason}},TYe=class t extends Event{static{a(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";Un.argumentLengthCheck(arguments,1,n),super(e,r),Un.util.markAsUncloneable(this),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Un.brandCheck(this,t),this.#e.message}get filename(){return Un.brandCheck(this,t),this.#e.filename}get lineno(){return Un.brandCheck(this,t),this.#e.lineno}get colno(){return Un.brandCheck(this,t),this.#e.colno}get error(){return Un.brandCheck(this,t),this.#e.error}};Object.defineProperties(hae.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:QC,origin:QC,lastEventId:QC,source:QC,ports:QC,initMessageEvent:QC});Object.defineProperties(bYe.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:QC,code:QC,wasClean:QC});Object.defineProperties(TYe.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:QC,filename:QC,lineno:QC,colno:QC,error:QC});Un.converters.MessagePort=Un.interfaceConverter(Un.is.MessagePort,"MessagePort");Un.converters["sequence"]=Un.sequenceConverter(Un.converters.MessagePort);var eHt=[{key:"bubbles",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Un.converters.MessageEventInit=Un.dictionaryConverter([...eHt,{key:"data",converter:Un.converters.any,defaultValue:a(()=>null,"defaultValue")},{key:"origin",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lastEventId",converter:Un.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"source",converter:Un.nullableConverter(Un.converters.MessagePort),defaultValue:a(()=>null,"defaultValue")},{key:"ports",converter:Un.converters["sequence"],defaultValue:a(()=>[],"defaultValue")}]);Un.converters.CloseEventInit=Un.dictionaryConverter([...eHt,{key:"wasClean",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"code",converter:Un.converters["unsigned short"],defaultValue:a(()=>0,"defaultValue")},{key:"reason",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Un.converters.ErrorEventInit=Un.dictionaryConverter([...eHt,{key:"message",converter:Un.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"filename",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lineno",converter:Un.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"colno",converter:Un.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"error",converter:Un.converters.any}]);i1n.exports={MessageEvent:hae,CloseEvent:bYe,ErrorEvent:TYe,createFastMessageEvent:$Go}});var s7=T((Z9u,o1n)=>{"use strict";f();var VGo="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",WGo={enumerable:!0,writable:!1,configurable:!1},zGo={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},YGo={SENT:1,RECEIVED:2},KGo={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},JGo=65535,XGo={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},ZGo=Buffer.allocUnsafe(0),eHo={text:1,typedArray:2,arrayBuffer:3,blob:4};o1n.exports={uid:VGo,sentCloseFrameState:YGo,staticPropertyDescriptors:WGo,states:zGo,opcodes:KGo,maxUnsigned16Bit:JGo,parserStates:XGo,emptyBuffer:ZGo,sendHints:eHo}});var MW=T((t7u,u1n)=>{"use strict";f();var{states:IYe,opcodes:mae}=s7(),{isUtf8:tHo}=require("node:buffer"),{removeHTTPWhitespace:s1n}=AS(),{collectASequenceOfCodePointsFast:rHo}=C4();function nHo(t){return t===IYe.CONNECTING}a(nHo,"isConnecting");function iHo(t){return t===IYe.OPEN}a(iHo,"isEstablished");function oHo(t){return t===IYe.CLOSING}a(oHo,"isClosing");function sHo(t){return t===IYe.CLOSED}a(sHo,"isClosed");function aHo(t,e,r=(o,s)=>new Event(o,s),n={}){let o=r(t,n);e.dispatchEvent(o)}a(aHo,"fireEvent");function cHo(t,e,r){t.onMessage(e,r)}a(cHo,"websocketMessageReceived");function lHo(t){return t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer}a(lHo,"toArrayBuffer");function uHo(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}a(uHo,"isValidSubprotocol");function dHo(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}a(dHo,"isValidStatusCode");function a1n(t){return t===mae.CLOSE||t===mae.PING||t===mae.PONG}a(a1n,"isControlFrame");function c1n(t){return t===mae.CONTINUATION}a(c1n,"isContinuationFrame");function l1n(t){return t===mae.TEXT||t===mae.BINARY}a(l1n,"isTextBinaryFrame");function fHo(t){return l1n(t)||c1n(t)||a1n(t)}a(fHo,"isValidOpcode");function pHo(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}a(hHo,"isValidClientWindowBits");function mHo(t,e){let r;try{r=new URL(t,e)}catch(n){throw new DOMException(n,"SyntaxError")}if(r.protocol==="http:"?r.protocol="ws:":r.protocol==="https:"&&(r.protocol="wss:"),r.protocol!=="ws:"&&r.protocol!=="wss:")throw new DOMException("expected a ws: or wss: url","SyntaxError");if(r.hash.length||r.href.endsWith("#"))throw new DOMException("hash","SyntaxError");return r}a(mHo,"getURLRecord");function gHo(t,e){if(t!==null&&t!==1e3&&(t<3e3||t>4999))throw new DOMException("invalid code","InvalidAccessError");if(e!==null){let r=Buffer.byteLength(e);if(r>123)throw new DOMException(`Reason must be less than 123 bytes; received ${r}`,"SyntaxError")}}a(gHo,"validateCloseCodeAndReason");var AHo=(()=>{if(typeof process.versions.icu=="string"){let t=new TextDecoder("utf-8",{fatal:!0});return t.decode.bind(t)}return function(t){if(tHo(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")}})();u1n.exports={isConnecting:nHo,isEstablished:iHo,isClosing:oHo,isClosed:sHo,fireEvent:aHo,isValidSubprotocol:uHo,isValidStatusCode:dHo,websocketMessageReceived:cHo,utf8Decode:AHo,isControlFrame:a1n,isContinuationFrame:c1n,isTextBinaryFrame:l1n,isValidOpcode:fHo,parseExtensions:pHo,isValidClientWindowBits:hHo,toArrayBuffer:lHo,getURLRecord:mHo,validateCloseCodeAndReason:gHo}});var Aae=T((i7u,f1n)=>{"use strict";f();var{runtimeFeatures:yHo}=_4(),{maxUnsigned16Bit:d1n,opcodes:EHo}=s7(),xYe=8*1024,Fbe=null,gae=xYe,CHo=yHo.has("crypto")?require("node:crypto").randomFillSync:a(function(e,r,n){for(let o=0;od1n?(c+=8,s=127):o>125&&(c+=2,s=126);let l=Buffer.allocUnsafe(o+c);l[0]=l[1]=0,l[0]|=128,l[0]=(l[0]&240)+e;l[c-4]=n[0],l[c-3]=n[1],l[c-2]=n[2],l[c-1]=n[3],l[1]=s,s===126?l.writeUInt16BE(o,2):s===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),l[1]|=128;for(let u=0;ud1n?(s+=8,o=127):n>125&&(s+=2,o=126);let c=Buffer.allocUnsafeSlow(s);return c[0]=128|EHo.TEXT,c[1]=o|128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o===126?c.writeUInt16BE(n,2):o===127&&(c[2]=c[3]=0,c.writeUIntBE(n,4,6)),[c,e]}};f1n.exports={WebsocketFrameSend:rHt,generateMask:tHt}});var wYe=T((a7u,y1n)=>{"use strict";f();var{uid:_Ho,states:nHt,sentCloseFrameState:iHt,emptyBuffer:p1n,opcodes:vHo}=s7(),{parseExtensions:bHo,isClosed:THo,isClosing:SHo,isEstablished:g1n,isConnecting:IHo,validateCloseCodeAndReason:xHo}=MW(),{makeRequest:wHo}=dae(),{fetching:RHo}=Mbe(),{Headers:PHo,getHeadersList:kHo}=RW(),{getDecodeSplit:NHo}=wv(),{WebsocketFrameSend:DHo}=Aae(),MHo=require("node:assert"),{runtimeFeatures:OHo}=_4(),h1n=OHo.has("crypto")?require("node:crypto"):null,m1n=!1;function BHo(t,e,r,n,o){let s=t;s.protocol=t.protocol==="ws:"?"http:":"https:";let c=wHo({urlList:[s],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error",useURLCredentials:!0});if(o.headers){let p=kHo(new PHo(o.headers));c.headersList=p}let l=h1n.randomBytes(16).toString("base64");c.headersList.append("sec-websocket-key",l,!0),c.headersList.append("sec-websocket-version","13",!0);for(let p of e)c.headersList.append("sec-websocket-protocol",p,!0);return c.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits",!0),RHo({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(p){if(p.type==="error"||p.status!==101){if(p.socket?.session==null){DN(n,1002,"Received network error or non-101 status code.",p.error);return}if(p.status!==200){DN(n,1002,"Received network error or non-200 status code.",p.error);return}}if(m1n===!1&&p.socket?.session!=null&&(process.emitWarning("WebSocket over HTTP2 is experimental, and subject to change.","ExperimentalWarning"),m1n=!0),e.length!==0&&!p.headersList.get("Sec-WebSocket-Protocol")){DN(n,1002,"Server did not respond with sent protocols.");return}if(p.socket.session==null&&p.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){DN(n,1002,'Server did not set Upgrade header to "websocket".');return}if(p.socket.session==null&&p.headersList.get("Connection")?.toLowerCase()!=="upgrade"){DN(n,1002,'Server did not set Connection header to "upgrade".');return}let h=p.headersList.get("Sec-WebSocket-Accept"),m=h1n.hash("sha1",l+_Ho,"base64");if(h!==m){DN(n,1002,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let g=p.headersList.get("Sec-WebSocket-Extensions"),A;if(g!==null&&(A=bHo(g),!A.has("permessage-deflate"))){DN(n,1002,"Sec-WebSocket-Extensions header does not match.");return}let y=p.headersList.get("Sec-WebSocket-Protocol");if(y!==null&&!NHo("sec-websocket-protocol",c.headersList).includes(y)){DN(n,1002,"Protocol was not set in the opening handshake.");return}p.socket.on("data",n.onSocketData),p.socket.on("close",n.onSocketClose),p.socket.on("error",n.onSocketError),n.wasEverConnected=!0,n.onConnectionEstablished(p,A)}})}a(BHo,"establishWebSocketConnection");function A1n(t,e,r,n=!1){if(e??=null,r??="",n&&xHo(e,r),!(THo(t.readyState)||SHo(t.readyState)))if(!g1n(t.readyState))DN(t),t.readyState=nHt.CLOSING;else if(!t.closeState.has(iHt.SENT)&&!t.closeState.has(iHt.RECEIVED)){let o=new DHo;r.length!==0&&e===null&&(e=1e3),MHo(e===null||Number.isInteger(e)),e===null&&r.length===0?o.frameData=p1n:e!==null&&r===null?(o.frameData=Buffer.allocUnsafe(2),o.frameData.writeUInt16BE(e,0)):e!==null&&r!==null?(o.frameData=Buffer.allocUnsafe(2+Buffer.byteLength(r)),o.frameData.writeUInt16BE(e,0),o.frameData.write(r,2,"utf-8")):o.frameData=p1n,t.socket.write(o.createFrame(vHo.CLOSE)),t.closeState.add(iHt.SENT),t.readyState=nHt.CLOSING}else t.readyState=nHt.CLOSING}a(A1n,"closeWebSocketConnection");function DN(t,e,r,n){g1n(t.readyState)&&A1n(t,e,r,!1),t.controller.abort(),IHo(t.readyState)?t.onSocketClose():t.socket?.destroyed===!1&&t.socket.destroy()}a(DN,"failWebsocketConnection");y1n.exports={establishWebSocketConnection:BHo,failWebsocketConnection:DN,closeWebSocketConnection:A1n}});var _1n=T((u7u,C1n)=>{"use strict";f();var{createInflateRaw:LHo,Z_DEFAULT_WINDOWBITS:FHo}=require("node:zlib"),{isValidClientWindowBits:UHo}=MW(),{MessageSizeExceededError:E1n}=Oi(),QHo=Buffer.from([0,0,255,255]),RYe=Symbol("kBuffer"),Ube=Symbol("kLength"),qHo=4*1024*1024,oHt=class{static{a(this,"PerMessageDeflate")}#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,r,n){if(this.#n){n(new E1n);return}if(!this.#e){let o=FHo;if(this.#t.serverMaxWindowBits){if(!UHo(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}o=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=LHo({windowBits:o})}catch(s){n(s);return}this.#e[RYe]=[],this.#e[Ube]=0,this.#e.on("data",s=>{if(!this.#n){if(this.#e[Ube]+=s.length,this.#e[Ube]>qHo){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let c=this.#r;this.#r=null,c(new E1n)}return}this.#e[RYe].push(s)}}),this.#e.on("error",s=>{this.#e=null,n(s)})}this.#r=n,this.#e.write(e),r&&this.#e.write(QHo),this.#e.flush(()=>{if(this.#n||!this.#e)return;let o=Buffer.concat(this.#e[RYe],this.#e[Ube]);this.#e[RYe].length=0,this.#e[Ube]=0,this.#r=null,n(null,o)})}};C1n.exports={PerMessageDeflate:oHt}});var cHt=T((p7u,I1n)=>{"use strict";f();var{Writable:GHo}=require("node:stream"),HHo=require("node:assert"),{parserStates:qC,opcodes:yae,states:jHo,emptyBuffer:v1n,sentCloseFrameState:Qbe}=s7(),{isValidStatusCode:$Ho,isValidOpcode:VHo,websocketMessageReceived:b1n,utf8Decode:WHo,isControlFrame:T1n,isTextBinaryFrame:sHt,isContinuationFrame:zHo}=MW(),{failWebsocketConnection:Lv}=wYe(),{WebsocketFrameSend:S1n}=Aae(),{PerMessageDeflate:YHo}=_1n(),{MessageSizeExceededError:KHo}=Oi(),aHt=class extends GHo{static{a(this,"ByteParser")}#e=[];#t=0;#n=0;#r=!1;#i=qC.INFO;#o={};#a=[];#s;#c;constructor(e,r){super(),this.#c=e,this.#s=r??new Map,this.#s.has("permessage-deflate")&&this.#s.set("permessage-deflate",new YHo(r))}_write(e,r,n){this.#e.push(e),this.#n+=e.length,this.#r=!0,this.run(n)}run(e){for(;this.#r;)if(this.#i===qC.INFO){if(this.#n<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,o=r[0]&15,s=(r[1]&128)===128,c=!n&&o!==yae.CONTINUATION,l=r[1]&127,u=r[0]&64,d=r[0]&32,p=r[0]&16;if(!VHo(o))return Lv(this.#c,1002,"Invalid opcode received"),e();if(s)return Lv(this.#c,1002,"Frame cannot be masked"),e();if(u!==0&&!this.#s.has("permessage-deflate")){Lv(this.#c,1002,"Expected RSV1 to be clear.");return}if(d!==0||p!==0){Lv(this.#c,1002,"RSV1, RSV2, RSV3 must be clear");return}if(c&&!sHt(o)){Lv(this.#c,1002,"Invalid frame type was fragmented.");return}if(sHt(o)&&this.#a.length>0){Lv(this.#c,1002,"Expected continuation frame");return}if(this.#o.fragmented&&c){Lv(this.#c,1002,"Fragmented frame exceeded 125 bytes.");return}if((l>125||c)&&T1n(o)){Lv(this.#c,1002,"Control frame either too large or fragmented");return}if(zHo(o)&&this.#a.length===0&&!this.#o.compressed){Lv(this.#c,1002,"Unexpected continuation frame");return}l<=125?(this.#o.payloadLength=l,this.#i=qC.READ_DATA):l===126?this.#i=qC.PAYLOADLENGTH_16:l===127&&(this.#i=qC.PAYLOADLENGTH_64),sHt(o)&&(this.#o.binaryType=o,this.#o.compressed=u!==0),this.#o.opcode=o,this.#o.masked=s,this.#o.fin=n,this.#o.fragmented=c}else if(this.#i===qC.PAYLOADLENGTH_16){if(this.#n<2)return e();let r=this.consume(2);this.#o.payloadLength=r.readUInt16BE(0),this.#i=qC.READ_DATA}else if(this.#i===qC.PAYLOADLENGTH_64){if(this.#n<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),o=r.readUInt32BE(4);if(n!==0||o>2**31-1){Lv(this.#c,1009,"Received payload length > 2^31 bytes.");return}this.#o.payloadLength=o,this.#i=qC.READ_DATA}else if(this.#i===qC.READ_DATA){if(this.#n{if(n){let s=n instanceof KHo?1009:1007;Lv(this.#c,s,n.message);return}if(this.writeFragments(o),!this.#o.fin){this.#i=qC.INFO,this.#r=!0,this.run(e);return}b1n(this.#c,this.#o.binaryType,this.consumeFragments()),this.#r=!0,this.#i=qC.INFO,this.run(e)}),this.#r=!1;break}}}consume(e){if(e>this.#n)throw new Error("Called consume() before buffers satiated.");if(e===0)return v1n;this.#n-=e;let r=this.#e[0];if(r.length>e)return this.#e[0]=r.subarray(e,r.length),r.subarray(0,e);if(r.length===e)return this.#e.shift();{let n=0,o=Buffer.allocUnsafeSlow(e);for(;n!==e;){let s=this.#e[0],c=s.length;if(c+n===e){o.set(this.#e.shift(),n);break}else if(c+n>e){o.set(s.subarray(0,e-n),n),this.#e[0]=s.subarray(e-n);break}else o.set(this.#e.shift(),n),n+=c}return o}}writeFragments(e){this.#t+=e.length,this.#a.push(e)}consumeFragments(){let e=this.#a;if(e.length===1)return this.#t=0,e.shift();let r=0,n=Buffer.allocUnsafeSlow(this.#t);for(let o=0;o=2&&(r=e.readUInt16BE(0)),r!==void 0&&!$Ho(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=WHo(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#o;if(r===yae.CLOSE){if(n===1)return Lv(this.#c,1002,"Received close frame with a 1-byte body."),!1;if(this.#o.closeInfo=this.parseCloseBody(e),this.#o.closeInfo.error){let{code:o,reason:s}=this.#o.closeInfo;return Lv(this.#c,o,s),!1}if(!this.#c.closeState.has(Qbe.SENT)&&!this.#c.closeState.has(Qbe.RECEIVED)){let o=v1n;this.#o.closeInfo.code&&(o=Buffer.allocUnsafe(2),o.writeUInt16BE(this.#o.closeInfo.code,0));let s=new S1n(o);this.#c.socket.write(s.createFrame(yae.CLOSE)),this.#c.closeState.add(Qbe.SENT)}return this.#c.readyState=jHo.CLOSING,this.#c.closeState.add(Qbe.RECEIVED),!1}else if(r===yae.PING){if(!this.#c.closeState.has(Qbe.RECEIVED)){let o=new S1n(e);this.#c.socket.write(o.createFrame(yae.PONG)),this.#c.onPing(e)}}else r===yae.PONG&&this.#c.onPong(e);return!0}get closingInfo(){return this.#o.closeInfo}};I1n.exports={ByteParser:aHt}});var P1n=T((g7u,R1n)=>{"use strict";f();var{WebsocketFrameSend:w1n}=Aae(),{opcodes:x1n,sendHints:OW}=s7(),JHo=QQt(),uHt=class{static{a(this,"SendQueue")}#e=new JHo;#t=!1;#n;constructor(e){this.#n=e}add(e,r,n){if(n!==OW.blob){if(this.#t){let s={promise:null,callback:r,frame:lHt(e,n)};this.#e.push(s)}else if(n===OW.text){let{0:s,1:c}=w1n.createFastTextFrame(e);this.#n.cork(),this.#n.write(s),this.#n.write(c,r),this.#n.uncork()}else this.#n.write(lHt(e,n),r);return}let o={promise:e.arrayBuffer().then(s=>{o.promise=null,o.frame=lHt(s,n)}),callback:r,frame:null};this.#e.push(o),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#n.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function lHt(t,e){return new w1n(XHo(t,e)).createFrame(e===OW.text?x1n.TEXT:x1n.BINARY)}a(lHt,"createFrame");function XHo(t,e){switch(e){case OW.text:case OW.typedArray:return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);case OW.arrayBuffer:case OW.blob:return new Uint8Array(t)}}a(XHo,"toBuffer");R1n.exports={SendQueue:uHt}});var B1n=T((E7u,O1n)=>{"use strict";f();var{isArrayBuffer:ZHo}=require("node:util/types"),{webidl:jn}=Qm(),{URLSerializer:ejo}=AS(),{environmentSettingsObject:k1n}=wv(),{staticPropertyDescriptors:a7,states:k4,sentCloseFrameState:dHt,sendHints:PYe,opcodes:fHt}=s7(),{isConnecting:tjo,isEstablished:N1n,isClosing:D1n,isClosed:rjo,isValidSubprotocol:njo,fireEvent:kYe,utf8Decode:ijo,toArrayBuffer:ojo,getURLRecord:sjo}=MW(),{establishWebSocketConnection:ajo,closeWebSocketConnection:cjo,failWebsocketConnection:M1n}=wYe(),{ByteParser:ljo}=cHt(),{kEnumerableProperty:IS}=eo(),{getGlobalDispatcher:ujo}=Yze(),{ErrorEvent:djo,CloseEvent:fjo,createFastMessageEvent:pjo}=SYe(),{SendQueue:hjo}=P1n(),{WebsocketFrameSend:mjo}=Aae(),{channels:MN}=U9();function gjo(t){return typeof t?.address=="function"?t.address():typeof t?.session?.socket?.address=="function"?t.session.socket.address():null}a(gjo,"getSocketAddress");var wy=class t extends EventTarget{static{a(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#n="";#r="";#i;#o={onConnectionEstablished:a((e,r)=>this.#l(e,r),"onConnectionEstablished"),onMessage:a((e,r)=>this.#u(e,r),"onMessage"),onParserError:a(e=>M1n(this.#o,null,e.message),"onParserError"),onParserDrain:a(()=>this.#f(),"onParserDrain"),onSocketData:a(e=>{this.#c.write(e)||this.#o.socket.pause()},"onSocketData"),onSocketError:a(e=>{this.#o.readyState=k4.CLOSING,MN.socketError.hasSubscribers&&MN.socketError.publish(e),this.#o.socket.destroy()},"onSocketError"),onSocketClose:a(()=>this.#p(),"onSocketClose"),onPing:a(e=>{MN.ping.hasSubscribers&&MN.ping.publish({payload:e,websocket:this})},"onPing"),onPong:a(e=>{MN.pong.hasSubscribers&&MN.pong.publish({payload:e,websocket:this})},"onPong"),readyState:k4.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#a;#s;#c;constructor(e,r=[]){super(),jn.util.markAsUncloneable(this);let n="WebSocket constructor";jn.argumentLengthCheck(arguments,1,n);let o=jn.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=jn.converters.USVString(e),r=o.protocols;let s=k1n.settingsObject.baseUrl,c=sjo(e,s);if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(u=>u.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(u=>njo(u)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this.#a=new URL(c.href);let l=k1n.settingsObject;this.#o.controller=ajo(c,r,l,this.#o,o),this.#o.readyState=t.CONNECTING,this.#s="blob"}close(e=void 0,r=void 0){jn.brandCheck(this,t),e!==void 0&&(e=jn.converters["unsigned short"](e,"WebSocket.close","code",jn.attributes.Clamp)),r!==void 0&&(r=jn.converters.USVString(r)),e??=null,r??="",cjo(this.#o,e,r,!0)}send(e){jn.brandCheck(this,t);let r="WebSocket.send";if(jn.argumentLengthCheck(arguments,1,r),e=jn.converters.WebSocketSendData(e,r,"data"),tjo(this.#o.readyState))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!N1n(this.#o.readyState)||D1n(this.#o.readyState)))if(typeof e=="string"){let n=Buffer.from(e);this.#t+=n.byteLength,this.#i.add(n,()=>{this.#t-=n.byteLength},PYe.text)}else ZHo(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},PYe.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},PYe.typedArray)):jn.is.Blob(e)&&(this.#t+=e.size,this.#i.add(e,()=>{this.#t-=e.size},PYe.blob))}get readyState(){return jn.brandCheck(this,t),this.#o.readyState}get bufferedAmount(){return jn.brandCheck(this,t),this.#t}get url(){return jn.brandCheck(this,t),ejo(this.#a)}get extensions(){return jn.brandCheck(this,t),this.#r}get protocol(){return jn.brandCheck(this,t),this.#n}get onopen(){return jn.brandCheck(this,t),this.#e.open}set onopen(e){jn.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onerror(){return jn.brandCheck(this,t),this.#e.error}set onerror(e){jn.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}get onclose(){return jn.brandCheck(this,t),this.#e.close}set onclose(e){jn.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("close",r),this.#e.close=e):this.#e.close=null}get onmessage(){return jn.brandCheck(this,t),this.#e.message}set onmessage(e){jn.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get binaryType(){return jn.brandCheck(this,t),this.#s}set binaryType(e){jn.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this.#s="blob":this.#s=e}#l(e,r){this.#o.socket=e.socket;let n=new ljo(this.#o,r);n.on("drain",()=>this.#o.onParserDrain()),n.on("error",c=>this.#o.onParserError(c)),this.#c=n,this.#i=new hjo(e.socket),this.#o.readyState=k4.OPEN;let o=e.headersList.get("sec-websocket-extensions");o!==null&&(this.#r=o);let s=e.headersList.get("sec-websocket-protocol");if(s!==null&&(this.#n=s),kYe("open",this),MN.open.hasSubscribers){let c=e.headersList.entries;MN.open.publish({address:gjo(e.socket),protocol:this.#n,extensions:this.#r,websocket:this,handshakeResponse:{status:e.status,statusText:e.statusText,headers:c}})}}#u(e,r){if(this.#o.readyState!==k4.OPEN)return;let n;if(e===fHt.TEXT)try{n=ijo(r)}catch{M1n(this.#o,1007,"Received invalid UTF-8 in text frame.");return}else e===fHt.BINARY&&(this.#s==="blob"?n=new Blob([r]):n=ojo(r));kYe("message",this,pjo,{origin:this.#a.origin,data:n})}#f(){this.#o.socket.resume()}#p(){let e=this.#o.closeState.has(dHt.SENT)&&this.#o.closeState.has(dHt.RECEIVED),r=1005,n="",o=this.#c?.closingInfo;o&&!o.error&&(r=o.code??1005,n=o.reason),this.#o.readyState=k4.CLOSED,this.#o.closeState.has(dHt.RECEIVED)||(r=1006,kYe("error",this,(s,c)=>new djo(s,c),{error:new TypeError(n)})),kYe("close",this,(s,c)=>new fjo(s,c),{wasClean:e,code:r,reason:n}),MN.close.hasSubscribers&&MN.close.publish({websocket:this,code:r,reason:n})}static ping(e,r){if(Buffer.isBuffer(r)){if(r.length>125)throw new TypeError("A PING frame cannot have a body larger than 125 bytes.")}else if(r!==void 0)throw new TypeError("Expected buffer payload");let n=e.#o.readyState;if(N1n(n)&&!D1n(n)&&!rjo(n)){let o=new mjo(r);e.#o.socket.write(o.createFrame(fHt.PING))}}},{ping:Ajo}=wy;Reflect.deleteProperty(wy,"ping");wy.CONNECTING=wy.prototype.CONNECTING=k4.CONNECTING;wy.OPEN=wy.prototype.OPEN=k4.OPEN;wy.CLOSING=wy.prototype.CLOSING=k4.CLOSING;wy.CLOSED=wy.prototype.CLOSED=k4.CLOSED;Object.defineProperties(wy.prototype,{CONNECTING:a7,OPEN:a7,CLOSING:a7,CLOSED:a7,url:IS,readyState:IS,bufferedAmount:IS,onopen:IS,onerror:IS,onclose:IS,close:IS,onmessage:IS,binaryType:IS,send:IS,extensions:IS,protocol:IS,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(wy,{CONNECTING:a7,OPEN:a7,CLOSING:a7,CLOSED:a7});jn.converters["sequence"]=jn.sequenceConverter(jn.converters.DOMString);jn.converters["DOMString or sequence"]=function(t,e,r){return jn.util.Type(t)===jn.util.Types.OBJECT&&Symbol.iterator in t?jn.converters["sequence"](t):jn.converters.DOMString(t,e,r)};jn.converters.WebSocketInit=jn.dictionaryConverter([{key:"protocols",converter:jn.converters["DOMString or sequence"],defaultValue:a(()=>[],"defaultValue")},{key:"dispatcher",converter:jn.converters.any,defaultValue:a(()=>ujo(),"defaultValue")},{key:"headers",converter:jn.nullableConverter(jn.converters.HeadersInit)}]);jn.converters["DOMString or sequence or WebSocketInit"]=function(t){return jn.util.Type(t)===jn.util.Types.OBJECT&&!(Symbol.iterator in t)?jn.converters.WebSocketInit(t):{protocols:jn.converters["DOMString or sequence"](t)}};jn.converters.WebSocketSendData=function(t){return jn.util.Type(t)===jn.util.Types.OBJECT&&(jn.is.Blob(t)||jn.is.BufferSource(t))?t:jn.converters.USVString(t)};O1n.exports={WebSocket:wy,ping:Ajo}});var pHt=T((v7u,U1n)=>{"use strict";f();var{webidl:NYe}=Qm(),{validateCloseCodeAndReason:yjo}=MW(),{kConstruct:L1n}=ac(),{kEnumerableProperty:F1n}=eo();function Ejo(){class t extends DOMException{static{a(this,"Test")}get reason(){return""}}return new t().reason!==void 0?DOMException:new Proxy(DOMException,{construct(e,r,n){let o=Reflect.construct(e,r,e);return Object.setPrototypeOf(o,n.prototype),o}})}a(Ejo,"createInheritableDOMException");var BW=class t extends Ejo(){static{a(this,"WebSocketError")}#e;#t;constructor(e="",r=void 0){if(e=NYe.converters.DOMString(e,"WebSocketError","message"),super(e,"WebSocketError"),r===L1n)return;r!==null&&(r=NYe.converters.WebSocketCloseInfo(r));let n=r.closeCode??null,o=r.reason??"";yjo(n,o),o.length!==0&&n===null&&(n=1e3),this.#e=n,this.#t=o}get closeCode(){return this.#e}get reason(){return this.#t}static createUnvalidatedWebSocketError(e,r,n){let o=new t(e,L1n);return o.#e=r,o.#t=n,o}},{createUnvalidatedWebSocketError:Cjo}=BW;delete BW.createUnvalidatedWebSocketError;Object.defineProperties(BW.prototype,{closeCode:F1n,reason:F1n,[Symbol.toStringTag]:{value:"WebSocketError",writable:!1,enumerable:!1,configurable:!0}});NYe.is.WebSocketError=NYe.util.MakeTypeAssertion(BW);U1n.exports={WebSocketError:BW,createUnvalidatedWebSocketError:Cjo}});var j1n=T((S7u,H1n)=>{"use strict";f();var{createDeferredPromise:hHt}=Wve(),{environmentSettingsObject:Q1n}=wv(),{states:Eae,opcodes:DYe,sentCloseFrameState:Cae}=s7(),{webidl:Wd}=Qm(),{getURLRecord:_jo,isValidSubprotocol:vjo,isEstablished:bjo,utf8Decode:Tjo}=MW(),{establishWebSocketConnection:Sjo,failWebsocketConnection:mHt,closeWebSocketConnection:gHt}=wYe(),{channels:q1n}=U9(),{WebsocketFrameSend:Ijo}=Aae(),{ByteParser:xjo}=cHt(),{WebSocketError:wjo,createUnvalidatedWebSocketError:Rjo}=pHt(),{kEnumerableProperty:MYe}=eo(),{utf8DecodeBytes:Pjo}=rze(),G1n=!1,OYe=class{static{a(this,"WebSocketStream")}#e;#t;#n;#r;#i;#o;#a=!1;#s={onConnectionEstablished:a((e,r)=>this.#u(e,r),"onConnectionEstablished"),onMessage:a((e,r)=>this.#f(e,r),"onMessage"),onParserError:a(e=>mHt(this.#s,null,e.message),"onParserError"),onParserDrain:a(()=>this.#s.socket.resume(),"onParserDrain"),onSocketData:a(e=>{this.#c.write(e)||this.#s.socket.pause()},"onSocketData"),onSocketError:a(e=>{this.#s.readyState=Eae.CLOSING,q1n.socketError.hasSubscribers&&q1n.socketError.publish(e),this.#s.socket.destroy()},"onSocketError"),onSocketClose:a(()=>this.#p(),"onSocketClose"),onPing:a(()=>{},"onPing"),onPong:a(()=>{},"onPong"),readyState:Eae.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#c;constructor(e,r=void 0){G1n||(process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.",{code:"UNDICI-WSS"}),G1n=!0),Wd.argumentLengthCheck(arguments,1,"WebSocket"),e=Wd.converters.USVString(e),r!==null&&(r=Wd.converters.WebSocketStreamOptions(r));let n=Q1n.settingsObject.baseUrl,o=_jo(e,n),s=r.protocols;if(s.length!==new Set(s.map(l=>l.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(s.length>0&&!s.every(l=>vjo(l)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(this.#e=o.toString(),this.#t=hHt(),this.#n=hHt(),r.signal!=null){let l=r.signal;if(l.aborted){this.#t.reject(l.reason),this.#n.reject(l.reason);return}l.addEventListener("abort",()=>{bjo(this.#s.readyState)||(mHt(this.#s),this.#s.readyState=Eae.CLOSING,this.#t.reject(l.reason),this.#n.reject(l.reason),this.#a=!0)},{once:!0})}let c=Q1n.settingsObject;this.#s.controller=Sjo(o,s,c,this.#s,r)}get url(){return this.#e.toString()}get opened(){return this.#t.promise}get closed(){return this.#n.promise}close(e=void 0){e!==null&&(e=Wd.converters.WebSocketCloseInfo(e));let r=e.closeCode??null,n=e.reason;gHt(this.#s,r,n,!0)}#l(e){e=Wd.converters.WebSocketStreamWrite(e);let r=hHt(),n=null,o=null;if(Wd.is.BufferSource(e))n=new Uint8Array(ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e.slice()),o=DYe.BINARY;else{let s;try{s=Wd.converters.DOMString(e)}catch(c){return r.reject(c),r.promise}n=new TextEncoder().encode(s),o=DYe.TEXT}if(!this.#s.closeState.has(Cae.SENT)&&!this.#s.closeState.has(Cae.RECEIVED)){let s=new Ijo(n);this.#s.socket.write(s.createFrame(o),()=>{r.resolve(void 0)})}return r.promise}#u(e,r){this.#s.socket=e.socket;let n=new xjo(this.#s,r);n.on("drain",()=>this.#s.onParserDrain()),n.on("error",u=>this.#s.onParserError(u)),this.#c=n,this.#s.readyState=Eae.OPEN;let o=r??"",s=e.headersList.get("sec-websocket-protocol")??"",c=new ReadableStream({start:a(u=>{this.#i=u},"start"),pull(u){let d;for(;u.desiredSize>0&&(d=e.socket.read())!==null;)u.enqueue(d)},cancel:a(u=>this.#m(u),"cancel")}),l=new WritableStream({write:a(u=>this.#l(u),"write"),close:a(()=>gHt(this.#s,null,null),"close"),abort:a(u=>this.#h(u),"abort")});this.#r=c,this.#o=l,this.#t.resolve({extensions:o,protocol:s,readable:c,writable:l})}#f(e,r){if(this.#s.readyState!==Eae.OPEN)return;let n;if(e===DYe.TEXT)try{n=Tjo(r)}catch{mHt(this.#s,"Received invalid UTF-8 in text frame.");return}else e===DYe.BINARY&&(n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength));this.#i.enqueue(n)}#p(){let e=this.#s.closeState.has(Cae.SENT)&&this.#s.closeState.has(Cae.RECEIVED);if(this.#s.readyState=Eae.CLOSED,this.#a)return;this.#s.wasEverConnected||this.#t.reject(new wjo("Socket never opened"));let r=this.#c?.closingInfo,n=r?.code??1005;!this.#s.closeState.has(Cae.SENT)&&!this.#s.closeState.has(Cae.RECEIVED)&&(n=1006);let o=r?.reason==null?"":Pjo(Buffer.from(r.reason));if(e)this.#i.close(),this.#o.locked||this.#o.abort(new DOMException("A closed WebSocketStream cannot be written to","InvalidStateError")),this.#n.resolve({closeCode:n,reason:o});else{let s=Rjo("unclean close",n,o);this.#i?.error(s),this.#o?.abort(s),this.#n.reject(s)}}#h(e){let r=null,n="";Wd.is.WebSocketError(e)&&(r=e.closeCode,n=e.reason),gHt(this.#s,r,n)}#m(e){this.#h(e)}};Object.defineProperties(OYe.prototype,{url:MYe,opened:MYe,closed:MYe,close:MYe,[Symbol.toStringTag]:{value:"WebSocketStream",writable:!1,enumerable:!1,configurable:!0}});Wd.converters.WebSocketStreamOptions=Wd.dictionaryConverter([{key:"protocols",converter:Wd.sequenceConverter(Wd.converters.USVString),defaultValue:a(()=>[],"defaultValue")},{key:"signal",converter:Wd.nullableConverter(Wd.converters.AbortSignal),defaultValue:a(()=>null,"defaultValue")}]);Wd.converters.WebSocketCloseInfo=Wd.dictionaryConverter([{key:"closeCode",converter:a(t=>Wd.converters["unsigned short"](t,Wd.attributes.EnforceRange),"converter")},{key:"reason",converter:Wd.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Wd.converters.WebSocketStreamWrite=function(t){return typeof t=="string"?Wd.converters.USVString(t):Wd.converters.BufferSource(t)};H1n.exports={WebSocketStream:OYe}});var V1n=T((w7u,$1n)=>{"use strict";f();function kjo(t){return t.indexOf("\0")===-1}a(kjo,"isValidLastEventId");function Njo(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}a(Njo,"isASCIINumber");$1n.exports={isValidLastEventId:kjo,isASCIINumber:Njo}});var K1n=T((k7u,Y1n)=>{"use strict";f();var{Transform:Djo}=require("node:stream"),{isASCIINumber:W1n,isValidLastEventId:z1n}=V1n(),N4=[239,187,191],AHt=10,BYe=13,Mjo=58,Ojo=32,yHt=class extends Djo{static{a(this,"EventSourceStream")}state;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===N4[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===N4[0]&&this.buffer[1]===N4[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===N4[0]&&this.buffer[1]===N4[1]&&this.buffer[2]===N4[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===N4[0]&&this.buffer[1]===N4[1]&&this.buffer[2]===N4[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[o]=s);break}}processEvent(e){e.retry&&W1n(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&z1n(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Y1n.exports={EventSourceStream:yHt}});var ivn=T((M7u,nvn)=>{"use strict";f();var{pipeline:Bjo}=require("node:stream"),{fetching:Ljo}=Mbe(),{makeRequest:Fjo}=dae(),{webidl:Ry}=Qm(),{EventSourceStream:Ujo}=K1n(),{parseMIMEType:Qjo}=AS(),{createFastMessageEvent:qjo}=SYe(),{isNetworkError:J1n}=kbe(),{kEnumerableProperty:LW}=eo(),{environmentSettingsObject:X1n}=wv(),Z1n=!1,evn=3e3,qbe=0,tvn=1,Gbe=2,Gjo="anonymous",Hjo="use-credentials",_ae=class t extends EventTarget{static{a(this,"EventSource")}#e={open:null,error:null,message:null};#t;#n=!1;#r=qbe;#i=null;#o=null;#a;#s;constructor(e,r={}){super(),Ry.util.markAsUncloneable(this);let n="EventSource constructor";Ry.argumentLengthCheck(arguments,1,n),Z1n||(Z1n=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ry.converters.USVString(e),r=Ry.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#s={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let o=X1n,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#s.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let c=Gjo;r.withCredentials===!0&&(c=Hjo,this.#n=!0);let l={redirect:"follow",keepalive:!0,mode:"cors",credentials:c==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};l.client=X1n.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#t)],this.#i=Fjo(l),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===Gbe)return;this.#r=qbe;let e={request:this.#i,dispatcher:this.#a},r=a(n=>{if(!J1n(n))return this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(J1n(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let o=n.headersList.get("content-type",!0),s=o!==null?Qjo(o):"failure",c=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||c===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=tvn,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let l=new Ujo({eventSourceSettings:this.#s,push:a(u=>{this.dispatchEvent(qjo(u.type,u.options))},"push")});Bjo(n.body.stream,l,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=Ljo(e)}#l(){this.#r!==Gbe&&(this.#r=qbe,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#r===qbe&&(this.#s.lastEventId.length&&this.#i.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#c())},this.#s.reconnectionTime)?.unref())}close(){Ry.brandCheck(this,t),this.#r!==Gbe&&(this.#r=Gbe,this.#o.abort(),this.#i=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=Ry.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=Ry.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=Ry.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},rvn={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:qbe,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:tvn,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Gbe,writable:!1}};Object.defineProperties(_ae,rvn);Object.defineProperties(_ae.prototype,rvn);Object.defineProperties(_ae.prototype,{close:LW,onerror:LW,onmessage:LW,onopen:LW,readyState:LW,url:LW,withCredentials:LW});Ry.converters.EventSourceInitDict=Ry.dictionaryConverter([{key:"withCredentials",converter:Ry.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"dispatcher",converter:Ry.converters.any},{key:"node",converter:Ry.dictionaryConverter([{key:"reconnectionTime",converter:Ry.converters["unsigned long"],defaultValue:a(()=>evn,"defaultValue")},{key:"dispatcher",converter:Ry.converters.any}]),defaultValue:a(()=>({}),"defaultValue")}]);nvn.exports={EventSource:_ae,defaultReconnectionTime:evn}});var uvn=T((L7u,rn)=>{"use strict";f();var jjo=Y9(),svn=Qve(),$jo=mW(),Vjo=sAn(),Wjo=uAn(),zjo=yW(),Yjo=dqt(),Kjo=aqt(),Jjo=WAn(),Xjo=ZAn(),Zjo=ryn(),avn=Oi(),FYe=eo(),{InvalidArgumentError:LYe}=avn,vae=Lyn(),e$o=cW(),t$o=Kqt(),{MockCallHistory:r$o,MockCallHistoryLog:n$o}=Zqt(),i$o=cGt(),o$o=nGt(),s$o=BEn(),a$o=Dqt(),c$o=Mze(),{getGlobalDispatcher:cvn,setGlobalDispatcher:l$o}=Yze(),u$o=sae(),d$o=gGt();Object.assign(svn.prototype,vae);rn.exports.Dispatcher=svn;rn.exports.Client=jjo;rn.exports.Pool=$jo;rn.exports.BalancedPool=Vjo;rn.exports.RoundRobinPool=Wjo;rn.exports.Agent=zjo;rn.exports.ProxyAgent=Yjo;rn.exports.Socks5ProxyAgent=Kjo;rn.exports.EnvHttpProxyAgent=Jjo;rn.exports.RetryAgent=Xjo;rn.exports.H2CClient=Zjo;rn.exports.RetryHandler=c$o;rn.exports.DecoratorHandler=u$o;rn.exports.RedirectHandler=d$o;rn.exports.interceptors={redirect:WEn(),responseError:YEn(),retry:JEn(),dump:ZEn(),dns:nCn(),cache:CCn(),decompress:SCn(),deduplicate:PCn()};rn.exports.cacheStores={MemoryCacheStore:SGt()};var f$o=DCn();rn.exports.cacheStores.SqliteCacheStore=f$o;rn.exports.buildConnector=e$o;rn.exports.errors=avn;rn.exports.util={parseHeaders:FYe.parseHeaders,headerNameToString:FYe.headerNameToString};function Hbe(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new LYe("invalid url");if(r!=null&&typeof r!="object")throw new LYe("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new LYe("invalid opts.path");let c=r.path;r.path.startsWith("/")||(c=`/${c}`),e=new URL(FYe.parseOrigin(e).origin+c)}else r||(r=typeof e=="object"?e:{}),e=FYe.parseURL(e);let{agent:o,dispatcher:s=cvn()}=r;if(o)throw new LYe("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}a(Hbe,"makeDispatcher");rn.exports.setGlobalDispatcher=l$o;rn.exports.getGlobalDispatcher=cvn;var p$o=Mbe().fetch,ovn=typeof __filename<"u"?__filename:void 0;function lvn(t,e){if(!t||typeof t!="object")return;let r=typeof t.stack=="string"?t.stack:"",n=e.replace(/\\/g,"/");if(r&&(r.includes(e)||r.includes(n)))return;let o={};if(Error.captureStackTrace(o,lvn),!o.stack)return;let s=o.stack.split(` + `)}close(){this.#n.close()}get(e){XGt(e);let r=this.#p(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){XGt(e);let n=this.#f(e),o=Array.isArray(r.body)?Buffer.concat(r.body):r.body,s=o?.byteLength;if(s&&s>this.#e)return;let c=this.#p(e,!0);c?this.#i.run(o,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,c.id):(this.#u(),this.#o.run(n,e.method,o,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){XGt(e),mGo(r);let n=0,o=[],s=this;return new hGo({decodeStrings:!0,write(c,l,u){n+=c.byteLength,n=u.deleteAt&&!r)return;let d=!0;if(u.vary){let p=JSON.parse(u.vary);for(let h in p)if(!gGo(o[h],p[h])){d=!1;break}}if(d)return u}}};function gGo(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,n)=>r===e[n]):t===e}a(gGo,"headerValueEquals")});var BV=T((IUu,UCn)=>{"use strict";f();var{kConstruct:AGo}=rc(),{kEnumerableProperty:bse}=Ki(),{iteratorMixin:yGo,isValidHeaderName:Ive,isValidHeaderValue:MCn}=mv(),{webidl:Ls}=Pm(),eHt=require("node:assert"),sze=require("node:util");function NCn(t){return t===10||t===13||t===9||t===32}a(NCn,"isHTTPWhiteSpaceCharCode");function OCn(t){let e=0,r=t.length;for(;r>e&&NCn(t.charCodeAt(r-1));)--r;for(;r>e&&NCn(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}a(OCn,"headerValueNormalize");function BCn(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}a(BCn,"fill");function tHt(t,e,r){if(r=OCn(r),Ive(e)){if(!MCn(r))throw Ls.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Ls.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(FCn(t)==="immutable")throw new TypeError("immutable");return cze(t).append(e,r,!1)}a(tHt,"appendHeader");function EGo(t){let e=cze(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],n=e.toSortedArray(),o=e.cookies;if(o===null||o.length===1)return e.sortedMap=n;for(let s=0;s>1),r[d][0]<=p[0]?u=d+1:l=d;if(s!==d){for(c=s;c>u;)r[c]=r[--c];r[u]=p}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:o,1:{value:s}}of this.headersMap)r[n++]=[o,s],eHt(s!==null);return r.sort(LCn)}}},bw=class t{static{a(this,"Headers")}#e;#t;constructor(e=void 0){Ls.util.markAsUncloneable(this),e!==AGo&&(this.#t=new aze,this.#e="none",e!==void 0&&(e=Ls.converters.HeadersInit(e,"Headers constructor","init"),BCn(this,e)))}append(e,r){Ls.brandCheck(this,t),Ls.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=Ls.converters.ByteString(e,n,"name"),r=Ls.converters.ByteString(r,n,"value"),tHt(this,e,r)}delete(e){if(Ls.brandCheck(this,t),Ls.argumentLengthCheck(arguments,1,"Headers.delete"),e=Ls.converters.ByteString(e,"Headers.delete","name"),!Ive(e))throw Ls.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){Ls.brandCheck(this,t),Ls.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=Ls.converters.ByteString(e,r,"name"),!Ive(e))throw Ls.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){Ls.brandCheck(this,t),Ls.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=Ls.converters.ByteString(e,r,"name"),!Ive(e))throw Ls.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){Ls.brandCheck(this,t),Ls.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=Ls.converters.ByteString(e,n,"name"),r=Ls.converters.ByteString(r,n,"value"),r=OCn(r),Ive(e)){if(!MCn(r))throw Ls.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw Ls.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){Ls.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}[sze.inspect.custom](e,r){return r.depth??=e,`Headers ${sze.formatWithOptions(r,this.#t.entries)}`}static getHeadersGuard(e){return e.#e}static setHeadersGuard(e,r){e.#e=r}static getHeadersList(e){return e.#t}static setHeadersList(e,r){e.#t=r}},{getHeadersGuard:FCn,setHeadersGuard:_Go,getHeadersList:cze,setHeadersList:CGo}=bw;Reflect.deleteProperty(bw,"getHeadersGuard");Reflect.deleteProperty(bw,"setHeadersGuard");Reflect.deleteProperty(bw,"getHeadersList");Reflect.deleteProperty(bw,"setHeadersList");yGo("Headers",bw,EGo,0,1);Object.defineProperties(bw.prototype,{append:bse,delete:bse,get:bse,has:bse,set:bse,getSetCookie:bse,[Symbol.toStringTag]:{value:"Headers",configurable:!0},[sze.inspect.custom]:{enumerable:!1}});Ls.converters.HeadersInit=function(t,e,r){if(Ls.util.Type(t)===Ls.util.Types.OBJECT){let n=Reflect.get(t,Symbol.iterator);if(!sze.types.isProxy(t)&&n===bw.prototype.entries)try{return cze(t).entriesList}catch{}return typeof n=="function"?Ls.converters["sequence>"](t,e,r,n.bind(t)):Ls.converters["record"](t,e,r)}throw Ls.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};UCn.exports={fill:BCn,compareHeaderName:LCn,Headers:bw,HeadersList:aze,getHeadersGuard:FCn,setHeadersGuard:_Go,setHeadersList:CGo,getHeadersList:cze}});var wve=T((RUu,JCn)=>{"use strict";f();var{Headers:$Cn,HeadersList:QCn,fill:vGo,getHeadersGuard:bGo,setHeadersGuard:VCn,setHeadersList:WCn}=BV(),{extractBody:qCn,cloneBody:TGo,mixinBody:SGo,streamRegistry:zCn,bodyUnusable:IGo}=rse(),YCn=Ki(),GCn=require("node:util"),{kEnumerableProperty:Cv}=YCn,{isValidReasonPhrase:xGo,isCancelled:wGo,isAborted:RGo,isErrorLike:PGo,environmentSettingsObject:kGo}=mv(),{redirectStatusSet:DGo,nullBodyStatus:NGo}=U1e(),{webidl:us}=Pm(),{URLSerializer:HCn}=oS(),{kConstruct:uze}=rc(),rHt=require("node:assert"),{isomorphicEncode:MGo,serializeJavascriptValueToJSONString:OGo}=rO(),BGo=new TextEncoder("utf-8"),vv=class t{static{a(this,"Response")}#e;#t;static error(){return xve(dze(),"immutable")}static json(e,r=void 0){us.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=us.converters.ResponseInit(r));let n=BGo.encode(OGo(e)),o=qCn(n),s=xve(Tse({}),"response");return jCn(s,r,{body:o[0],type:"application/json"}),s}static redirect(e,r=302){us.argumentLengthCheck(arguments,1,"Response.redirect"),e=us.converters.USVString(e),r=us.converters["unsigned short"](r);let n;try{n=new URL(e,kGo.settingsObject.baseUrl)}catch(c){throw new TypeError(`Failed to parse URL from ${e}`,{cause:c})}if(!DGo.has(r))throw new RangeError(`Invalid status code ${r}`);let o=xve(Tse({}),"immutable");o.#t.status=r;let s=MGo(HCn(n));return o.#t.headersList.append("location",s,!0),o}constructor(e=null,r=void 0){if(us.util.markAsUncloneable(this),e===uze)return;e!==null&&(e=us.converters.BodyInit(e,"Response","body")),r=us.converters.ResponseInit(r),this.#t=Tse({}),this.#e=new $Cn(uze),VCn(this.#e,"response"),WCn(this.#e,this.#t.headersList);let n=null;if(e!=null){let[o,s]=qCn(e);n={body:o,type:s}}jCn(this,r,n)}get type(){return us.brandCheck(this,t),this.#t.type}get url(){us.brandCheck(this,t);let e=this.#t.urlList,r=e[e.length-1]??null;return r===null?"":HCn(r,!0)}get redirected(){return us.brandCheck(this,t),this.#t.urlList.length>1}get status(){return us.brandCheck(this,t),this.#t.status}get ok(){return us.brandCheck(this,t),this.#t.status>=200&&this.#t.status<=299}get statusText(){return us.brandCheck(this,t),this.#t.statusText}get headers(){return us.brandCheck(this,t),this.#e}get body(){return us.brandCheck(this,t),this.#t.body?this.#t.body.stream:null}get bodyUsed(){return us.brandCheck(this,t),!!this.#t.body&&YCn.isDisturbed(this.#t.body.stream)}clone(){if(us.brandCheck(this,t),IGo(this.#t))throw us.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=nHt(this.#t);return this.#t.urlList.length!==0&&this.#t.body?.stream&&zCn.register(this,new WeakRef(this.#t.body.stream)),xve(e,bGo(this.#e))}[GCn.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${GCn.formatWithOptions(r,n)}`}static getResponseHeaders(e){return e.#e}static setResponseHeaders(e,r){e.#e=r}static getResponseState(e){return e.#t}static setResponseState(e,r){e.#t=r}},{getResponseHeaders:LGo,setResponseHeaders:FGo,getResponseState:LV,setResponseState:UGo}=vv;Reflect.deleteProperty(vv,"getResponseHeaders");Reflect.deleteProperty(vv,"setResponseHeaders");Reflect.deleteProperty(vv,"getResponseState");Reflect.deleteProperty(vv,"setResponseState");SGo(vv,LV);Object.defineProperties(vv.prototype,{type:Cv,url:Cv,status:Cv,ok:Cv,redirected:Cv,statusText:Cv,headers:Cv,clone:Cv,body:Cv,bodyUsed:Cv,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(vv,{json:Cv,redirect:Cv,error:Cv});function nHt(t){if(t.internalResponse)return KCn(nHt(t.internalResponse),t.type);let e=Tse({...t,body:null});return t.body!=null&&(e.body=TGo(t.body)),e}a(nHt,"cloneResponse");function Tse(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new QCn(t?.headersList):new QCn,urlList:t?.urlList?[...t.urlList]:[]}}a(Tse,"makeResponse");function dze(t){let e=PGo(t);return Tse({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}a(dze,"makeNetworkError");function QGo(t){return t.type==="error"&&t.status===0}a(QGo,"isNetworkError");function lze(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,o){return rHt(!(n in e)),r[n]=o,!0}})}a(lze,"makeFilteredResponse");function KCn(t,e){if(e==="basic")return lze(t,{type:"basic",headersList:t.headersList});if(e==="cors")return lze(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return lze(t,{type:"opaque",urlList:[],status:0,statusText:"",body:null});if(e==="opaqueredirect")return lze(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});rHt(!1)}a(KCn,"filterResponse");function qGo(t,e=null){return rHt(wGo(t)),RGo(t)?dze(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):dze(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}a(qGo,"makeAppropriateNetworkError");function jCn(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!xGo(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(LV(t).status=e.status),"statusText"in e&&e.statusText!=null&&(LV(t).statusText=e.statusText),"headers"in e&&e.headers!=null&&vGo(LGo(t),e.headers),r){if(NGo.includes(t.status))throw us.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});LV(t).body=r.body,r.type!=null&&!LV(t).headersList.contains("content-type",!0)&&LV(t).headersList.append("content-type",r.type,!0)}}a(jCn,"initializeResponse");function xve(t,e){let r=new vv(uze);UGo(r,t);let n=new $Cn(uze);return FGo(r,n),WCn(n,t.headersList),VCn(n,e),t.urlList.length!==0&&t.body?.stream&&zCn.register(r,new WeakRef(t.body.stream)),r}a(xve,"fromInnerResponse");us.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?us.converters.USVString(t,e,r):us.is.Blob(t)||us.is.BufferSource(t)||us.is.FormData(t)||us.is.URLSearchParams(t)?t:us.converters.DOMString(t,e,r)};us.converters.BodyInit=function(t,e,r){return us.is.ReadableStream(t)||t?.[Symbol.asyncIterator]?t:us.converters.XMLHttpRequestBodyInit(t,e,r)};us.converters.ResponseInit=us.dictionaryConverter([{key:"status",converter:us.converters["unsigned short"],defaultValue:a(()=>200,"defaultValue")},{key:"statusText",converter:us.converters.ByteString,defaultValue:a(()=>"","defaultValue")},{key:"headers",converter:us.converters.HeadersInit}]);us.is.Response=us.util.MakeTypeAssertion(vv);JCn.exports={isNetworkError:QGo,makeNetworkError:dze,makeResponse:Tse,makeAppropriateNetworkError:qGo,filterResponse:KCn,Response:vv,cloneResponse:nHt,fromInnerResponse:xve,getResponseState:LV}});var Sse=T((DUu,d1n)=>{"use strict";f();var{extractBody:GGo,mixinBody:HGo,cloneBody:jGo,bodyUnusable:XCn}=rse(),{Headers:i1n,fill:$Go,HeadersList:hze,setHeadersGuard:iHt,getHeadersGuard:VGo,setHeadersList:o1n,getHeadersList:ZCn}=BV(),pze=Ki(),e1n=require("node:util"),{isValidHTTPToken:WGo,sameOrigin:t1n,environmentSettingsObject:fze}=mv(),{forbiddenMethodsSet:zGo,corsSafeListedMethodsSet:YGo,referrerPolicy:KGo,requestRedirect:JGo,requestMode:XGo,requestCredentials:ZGo,requestCache:eHo,requestDuplex:tHo}=U1e(),{kEnumerableProperty:T0,normalizedMethodRecordsBase:rHo,normalizedMethodRecords:nHo}=pze,{webidl:ii}=Pm(),{URLSerializer:iHo}=oS(),{kConstruct:mze}=rc(),oHo=require("node:assert"),{getMaxListeners:s1n,setMaxListeners:sHo,defaultMaxListeners:aHo}=require("node:events"),cHo=Symbol("abortController"),a1n=new FinalizationRegistry(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),gze=new WeakMap,oHt;try{oHt=s1n(new AbortController().signal)>0}catch{oHt=!1}function r1n(t){return e;function e(){let r=t.deref();if(r!==void 0){a1n.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=gze.get(r.signal);if(n!==void 0){if(n.size!==0){for(let o of n){let s=o.deref();s!==void 0&&s.abort(this.reason)}n.clear()}gze.delete(r.signal)}}}}a(r1n,"buildAbort");var n1n=!1,x_=class t{static{a(this,"Request")}#e;#t;#n;#r;constructor(e,r=void 0){if(ii.util.markAsUncloneable(this),e===mze)return;ii.argumentLengthCheck(arguments,1,"Request constructor"),e=ii.converters.RequestInfo(e),r=ii.converters.RequestInit(r);let o=null,s=null,c=fze.settingsObject.baseUrl,l=null;if(typeof e=="string"){this.#t=r.dispatcher;let _;try{_=new URL(e,c)}catch(v){throw new TypeError("Failed to parse URL from "+e,{cause:v})}if(_.username||_.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);o=Aze({urlList:[_]}),s="cors"}else oHo(ii.is.Request(e)),o=e.#r,l=e.#e,this.#t=r.dispatcher||e.#t;let u=fze.settingsObject.origin,d="client";if(o.window?.constructor?.name==="EnvironmentSettingsObject"&&t1n(o.window,u)&&(d=o.window),r.window!=null)throw new TypeError(`'window' option '${d}' must be null`);"window"in r&&(d="no-window"),o=Aze({method:o.method,headersList:o.headersList,unsafeRequest:o.unsafeRequest,client:fze.settingsObject,window:d,priority:o.priority,origin:o.origin,referrer:o.referrer,referrerPolicy:o.referrerPolicy,mode:o.mode,credentials:o.credentials,cache:o.cache,redirect:o.redirect,integrity:o.integrity,keepalive:o.keepalive,reloadNavigation:o.reloadNavigation,historyNavigation:o.historyNavigation,urlList:[...o.urlList]});let p=Object.keys(r).length!==0;if(p&&(o.mode==="navigate"&&(o.mode="same-origin"),o.reloadNavigation=!1,o.historyNavigation=!1,o.origin="client",o.referrer="client",o.referrerPolicy="",o.url=o.urlList[o.urlList.length-1],o.urlList=[o.url]),r.referrer!==void 0){let _=r.referrer;if(_==="")o.referrer="no-referrer";else{let v;try{v=new URL(_,c)}catch(b){throw new TypeError(`Referrer "${_}" is not a valid URL.`,{cause:b})}v.protocol==="about:"&&v.hostname==="client"||u&&!t1n(v,fze.settingsObject.baseUrl)?o.referrer="client":o.referrer=v}}r.referrerPolicy!==void 0&&(o.referrerPolicy=r.referrerPolicy);let h;if(r.mode!==void 0?h=r.mode:h=s,h==="navigate")throw ii.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(h!=null&&(o.mode=h),r.credentials!==void 0&&(o.credentials=r.credentials),r.cache!==void 0&&(o.cache=r.cache),o.cache==="only-if-cached"&&o.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(o.redirect=r.redirect),r.integrity!=null&&(o.integrity=String(r.integrity)),r.keepalive!==void 0&&(o.keepalive=!!r.keepalive),r.method!==void 0){let _=r.method,v=nHo[_];if(v!==void 0)o.method=v;else{if(!WGo(_))throw new TypeError(`'${_}' is not a valid HTTP method.`);let b=_.toUpperCase();if(zGo.has(b))throw new TypeError(`'${_}' HTTP method is unsupported.`);_=rHo[b]??_,o.method=_}!n1n&&o.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),n1n=!0)}r.signal!==void 0&&(l=r.signal),this.#r=o;let m=new AbortController;if(this.#e=m.signal,l!=null)if(l.aborted)m.abort(l.reason);else{this[cHo]=m;let _=new WeakRef(m),v=r1n(_);oHt&&s1n(l)===aHo&&sHo(1500,l),pze.addAbortListener(l,v),a1n.register(m,{signal:l,abort:v},v)}if(this.#n=new i1n(mze),o1n(this.#n,o.headersList),iHt(this.#n,"request"),h==="no-cors"){if(!YGo.has(o.method))throw new TypeError(`'${o.method} is unsupported in no-cors mode.`);iHt(this.#n,"request-no-cors")}if(p){let _=ZCn(this.#n),v=r.headers!==void 0?r.headers:new hze(_);if(_.clear(),v instanceof hze){for(let{name:b,value:I}of v.rawValues())_.append(b,I,!1);_.cookies=v.cookies}else $Go(this.#n,v)}let g=ii.is.Request(e)?e.#r.body:null;if((r.body!=null||g!=null)&&(o.method==="GET"||o.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[_,v]=GGo(r.body,o.keepalive);A=_,v&&!ZCn(this.#n).contains("content-type",!0)&&this.#n.append("content-type",v,!0)}let y=A??g;if(y!=null&&y.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(o.mode!=="same-origin"&&o.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');o.useCORSPreflightFlag=!0}let E=y;if(A==null&&g!=null){if(XCn(e.#r))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let _=new TransformStream;g.stream.pipeThrough(_),E={source:g.source,length:g.length,stream:_.readable}}this.#r.body=E}get method(){return ii.brandCheck(this,t),this.#r.method}get url(){return ii.brandCheck(this,t),iHo(this.#r.url)}get headers(){return ii.brandCheck(this,t),this.#n}get destination(){return ii.brandCheck(this,t),this.#r.destination}get referrer(){return ii.brandCheck(this,t),this.#r.referrer==="no-referrer"?"":this.#r.referrer==="client"?"about:client":this.#r.referrer.toString()}get referrerPolicy(){return ii.brandCheck(this,t),this.#r.referrerPolicy}get mode(){return ii.brandCheck(this,t),this.#r.mode}get credentials(){return ii.brandCheck(this,t),this.#r.credentials}get cache(){return ii.brandCheck(this,t),this.#r.cache}get redirect(){return ii.brandCheck(this,t),this.#r.redirect}get integrity(){return ii.brandCheck(this,t),this.#r.integrity}get keepalive(){return ii.brandCheck(this,t),this.#r.keepalive}get isReloadNavigation(){return ii.brandCheck(this,t),this.#r.reloadNavigation}get isHistoryNavigation(){return ii.brandCheck(this,t),this.#r.historyNavigation}get signal(){return ii.brandCheck(this,t),this.#e}get body(){return ii.brandCheck(this,t),this.#r.body?this.#r.body.stream:null}get bodyUsed(){return ii.brandCheck(this,t),!!this.#r.body&&pze.isDisturbed(this.#r.body.stream)}get duplex(){return ii.brandCheck(this,t),"half"}clone(){if(ii.brandCheck(this,t),XCn(this.#r))throw new TypeError("unusable");let e=l1n(this.#r),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=gze.get(this.signal);n===void 0&&(n=new Set,gze.set(this.signal,n));let o=new WeakRef(r);n.add(o),pze.addAbortListener(r.signal,r1n(o))}return u1n(e,this.#t,r.signal,VGo(this.#n))}[e1n.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${e1n.formatWithOptions(r,n)}`}static setRequestSignal(e,r){return e.#e=r,e}static getRequestDispatcher(e){return e.#t}static setRequestDispatcher(e,r){e.#t=r}static setRequestHeaders(e,r){e.#n=r}static getRequestState(e){return e.#r}static setRequestState(e,r){e.#r=r}},{setRequestSignal:lHo,getRequestDispatcher:uHo,setRequestDispatcher:dHo,setRequestHeaders:fHo,getRequestState:c1n,setRequestState:pHo}=x_;Reflect.deleteProperty(x_,"setRequestSignal");Reflect.deleteProperty(x_,"getRequestDispatcher");Reflect.deleteProperty(x_,"setRequestDispatcher");Reflect.deleteProperty(x_,"setRequestHeaders");Reflect.deleteProperty(x_,"getRequestState");Reflect.deleteProperty(x_,"setRequestState");HGo(x_,c1n);function Aze(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,useURLCredentials:t.useURLCredentials??void 0,traversableForUserPrompts:t.traversableForUserPrompts??"client",urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new hze(t.headersList):new hze}}a(Aze,"makeRequest");function l1n(t){let e=Aze({...t,body:null});return t.body!=null&&(e.body=jGo(t.body)),e}a(l1n,"cloneRequest");function u1n(t,e,r,n){let o=new x_(mze);pHo(o,t),dHo(o,e),lHo(o,r);let s=new i1n(mze);return fHo(o,s),o1n(s,t.headersList),iHt(s,n),o}a(u1n,"fromInnerRequest");Object.defineProperties(x_.prototype,{method:T0,url:T0,headers:T0,redirect:T0,clone:T0,signal:T0,duplex:T0,destination:T0,body:T0,bodyUsed:T0,isHistoryNavigation:T0,isReloadNavigation:T0,keepalive:T0,integrity:T0,cache:T0,credentials:T0,attribute:T0,referrerPolicy:T0,referrer:T0,mode:T0,[Symbol.toStringTag]:{value:"Request",configurable:!0}});ii.is.Request=ii.util.MakeTypeAssertion(x_);ii.converters.RequestInfo=function(t){return typeof t=="string"?ii.converters.USVString(t):ii.is.Request(t)?t:ii.converters.USVString(t)};ii.converters.RequestInit=ii.dictionaryConverter([{key:"method",converter:ii.converters.ByteString},{key:"headers",converter:ii.converters.HeadersInit},{key:"body",converter:ii.nullableConverter(ii.converters.BodyInit)},{key:"referrer",converter:ii.converters.USVString},{key:"referrerPolicy",converter:ii.converters.DOMString,allowedValues:KGo},{key:"mode",converter:ii.converters.DOMString,allowedValues:XGo},{key:"credentials",converter:ii.converters.DOMString,allowedValues:ZGo},{key:"cache",converter:ii.converters.DOMString,allowedValues:eHo},{key:"redirect",converter:ii.converters.DOMString,allowedValues:JGo},{key:"integrity",converter:ii.converters.DOMString},{key:"keepalive",converter:ii.converters.boolean},{key:"signal",converter:ii.nullableConverter(t=>ii.converters.AbortSignal(t,"RequestInit","signal"))},{key:"window",converter:ii.converters.any},{key:"duplex",converter:ii.converters.DOMString,allowedValues:tHo},{key:"dispatcher",converter:ii.converters.any},{key:"priority",converter:ii.converters.DOMString,allowedValues:["high","low","auto"],defaultValue:a(()=>"auto","defaultValue")}]);d1n.exports={Request:x_,makeRequest:Aze,fromInnerRequest:u1n,cloneRequest:l1n,getRequestDispatcher:uHo,getRequestState:c1n}});var E1n=T((OUu,y1n)=>{"use strict";f();var hHo=require("node:assert"),{runtimeFeatures:p1n}=nO(),FV=new Map([["sha256",0],["sha384",1],["sha512",2]]),sHt;if(p1n.has("crypto")){sHt=require("node:crypto");let t=sHt.getHashes();t.length===0&&FV.clear();for(let e of FV.keys())t.includes(e)===!1&&FV.delete(e)}else FV.clear();var f1n=Map.prototype.get.bind(FV),aHt=Map.prototype.has.bind(FV),mHo=p1n.has("crypto")===!1||FV.size===0?()=>!0:(t,e)=>{let r=m1n(e);if(r.length===0)return!0;let n=h1n(r);for(let o of n){let s=o.alg,c=o.val,l=g1n(s,t);if(A1n(l,c))return!0}return!1};function h1n(t){let e=[],r=null;for(let n of t){if(hHo(aHt(n.alg),"Invalid SRI hash algorithm token"),e.length===0){e.push(n),r=n;continue}let o=r.alg,s=f1n(o),c=n.alg,l=f1n(c);ls?(r=n,e[0]=n,e.length=1):e.push(n))}return e}a(h1n,"getStrongestMetadata");function m1n(t){let e=[];for(let r of t.split(" ")){let o=r.split("?",1)[0],s="",c=[o.slice(0,6),o.slice(7)],l=c[0];if(!aHt(l))continue;c[1]&&(s=c[1]);let u={alg:l,val:s};e.push(u)}return e}a(m1n,"parseMetadata");var g1n=a((t,e)=>sHt.hash(t,e,"base64"),"applyAlgorithmToBytes");function A1n(t,e){let r=t.length;r!==0&&t[r-1]==="="&&(r-=1),r!==0&&t[r-1]==="="&&(r-=1);let n=e.length;if(n!==0&&e[n-1]==="="&&(n-=1),n!==0&&e[n-1]==="="&&(n-=1),r!==n)return!1;for(let o=0;o{"use strict";f();var{makeNetworkError:qa,makeAppropriateNetworkError:Rve,filterResponse:cHt,makeResponse:yze,fromInnerResponse:gHo,getResponseState:AHo}=wve(),{HeadersList:lHt}=BV(),{Request:yHo,cloneRequest:EHo,getRequestDispatcher:_Ho,getRequestState:CHo}=Sse(),Tw=require("node:zlib"),{makePolicyContainer:vHo,clonePolicyContainer:bHo,requestBadPort:THo,TAOCheck:SHo,appendRequestOriginHeader:IHo,responseLocationURL:xHo,requestCurrentURL:bv,setRequestReferrerPolicyOnRedirect:wHo,tryUpgradeRequestToAPotentiallyTrustworthyURL:RHo,createOpaqueTimingInfo:mHt,appendFetchMetadata:PHo,corsCheck:kHo,crossOriginResourcePolicyCheck:DHo,determineRequestsReferrer:NHo,coarsenedSharedCurrentTime:Pve,sameOrigin:pHt,isCancelled:D9,isAborted:_1n,isErrorLike:MHo,fullyReadBody:OHo,readableStreamClose:BHo,urlIsLocal:LHo,urlIsHttpHttpsScheme:vze,urlHasHttpsScheme:FHo,clampAndCoarsenConnectionTimingInfo:UHo,simpleRangeHeaderValue:QHo,buildContentRange:qHo,createInflate:GHo,extractMimeType:HHo,hasAuthenticationEntry:jHo,includesCredentials:C1n,isTraversableNavigable:$Ho}=mv(),UV=require("node:assert"),{safelyExtractBody:bze,extractBody:v1n}=rse(),{redirectStatusSet:I1n,nullBodyStatus:x1n,safeMethodsSet:VHo,requestBodyHeader:WHo,subresourceSet:zHo}=U1e(),YHo=require("node:events"),{Readable:KHo,pipeline:JHo,finished:XHo,isErrored:ZHo,isReadable:Eze}=require("node:stream"),{addAbortListener:ejo,bufferToLowerCasedHeaderName:b1n}=Ki(),{dataURLProcessor:tjo,serializeAMimeType:rjo,minimizeSupportedMimeType:njo}=oS(),{getGlobalDispatcher:ijo}=nze(),{webidl:gHt}=Pm(),{STATUS_CODES:T1n}=require("node:http"),{bytesMatch:ojo}=E1n(),{createDeferredPromise:sjo}=j1e(),{isomorphicEncode:_ze}=rO(),{runtimeFeatures:ajo}=nO(),cjo=ajo.has("zstd"),ljo=["GET","HEAD"],ujo=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",uHt,Cze=class extends YHo{static{a(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function djo(t){w1n(t,"fetch")}a(djo,"handleFetchDone");function fjo(t,e=void 0){gHt.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=sjo(),n;try{n=new yHo(t,e)}catch(p){return r.reject(p),r.promise}let o=CHo(n);if(n.signal.aborted)return dHt(r,o,null,n.signal.reason,null),r.promise;o.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(o.serviceWorkers="none");let c=null,l=!1,u=null;return ejo(n.signal,()=>{l=!0,UV(u!=null),u.abort(n.signal.reason);let p=c?.deref();dHt(r,o,p,n.signal.reason,u.controller)}),u=P1n({request:o,processResponseEndOfBody:djo,processResponse:a(p=>{if(!l){if(p.aborted){dHt(r,o,c,u.serializedAbortReason,u.controller);return}if(p.type==="error"){r.reject(new TypeError("fetch failed",{cause:p.error}));return}c=new WeakRef(gHo(p,"immutable")),r.resolve(c.deref()),r=null}},"processResponse"),dispatcher:_Ho(n),requestObject:n}),r.promise}a(fjo,"fetch");function w1n(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,o=t.cacheState;vze(r)&&n!==null&&(t.timingAllowPassed||(n=mHt({startTime:n.startTime}),o=""),n.endTime=Pve(),t.timingInfo=n,R1n(n,r.href,e,globalThis,o,"",t.status))}a(w1n,"finalizeAndReportTiming");var R1n=performance.markResourceTiming;function dHt(t,e,r,n,o){if(t&&t.reject(n),e.body?.stream!=null&&Eze(e.body.stream)&&e.body.stream.cancel(n).catch(c=>{if(c.code!=="ERR_INVALID_STATE")throw c}),r==null)return;let s=AHo(r);s.body?.stream!=null&&Eze(s.body.stream)&&o.error(n)}a(dHt,"abortFetch");function P1n({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:o,processResponseConsumeBody:s,useParallelQueue:c=!1,dispatcher:l=ijo(),requestObject:u=null}){UV(l);let d=null,p=!1;t.client!=null&&(d=t.client.globalObject,p=t.client.crossOriginIsolatedCapability);let h=Pve(p),m=mHt({startTime:h}),g={controller:new Cze(l),request:t,timingInfo:m,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:s,processResponseEndOfBody:o,taskDestination:d,crossOriginIsolatedCapability:p,requestObject:u};return UV(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=bHo(t.client.policyContainer):t.policyContainer=vHo()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,zHo.has(t.destination),k1n(g,!1),g.controller}a(P1n,"fetching");async function k1n(t,e){try{let r=t.request,n=null;if(r.localURLsOnly&&!LHo(bv(r))&&(n=qa("local URLs only")),RHo(r),THo(r)==="blocked"&&(n=qa("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=NHo(r)),n===null){let s=bv(r);pHt(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",n=await S1n(t)):r.mode==="same-origin"?n=qa('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?n=qa('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",n=await S1n(t)):vze(bv(r))?(r.responseTainting="cors",n=await D1n(t)):n=qa("URL scheme must be a HTTP(S) scheme")}if(e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=cHt(n,"basic"):r.responseTainting==="cors"?n=cHt(n,"cors"):r.responseTainting==="opaque"?n=cHt(n,"opaque"):UV(!1));let o=n.status===0?n:n.internalResponse;if(o.urlList.length===0&&o.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&o.status===206&&o.rangeRequested&&!r.headers.contains("range",!0)&&(n=o=qa()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||x1n.includes(o.status))&&(o.body=null,t.controller.dump=!0),r.integrity){let s=a(l=>fHt(t,qa(l)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){s(n.error);return}let c=a(l=>{if(!ojo(l,r.integrity)){s("integrity mismatch");return}n.body=bze(l)[0],fHt(t,n)},"processBody");OHo(n.body,c,s)}else fHt(t,n)}catch(r){t.controller.terminate(r)}}a(k1n,"mainFetch");function S1n(t){if(D9(t)&&t.request.redirectCount===0)return Promise.resolve(Rve(t));let{request:e}=t,{protocol:r}=bv(e);switch(r){case"about:":return Promise.resolve(qa("about scheme is not supported"));case"blob:":{uHt||(uHt=require("node:buffer").resolveObjectURL);let n=bv(e);if(n.search.length!==0)return Promise.resolve(qa("NetworkError when attempting to fetch resource."));let o=uHt(n.toString());if(e.method!=="GET"||!gHt.is.Blob(o))return Promise.resolve(qa("invalid method"));let s=yze(),c=o.size,l=_ze(`${c}`),u=o.type;if(e.headersList.contains("range",!0)){s.rangeRequested=!0;let d=e.headersList.get("range",!0),p=QHo(d,!0);if(p==="failure")return Promise.resolve(qa("failed to fetch the data URL"));let{rangeStartValue:h,rangeEndValue:m}=p;if(h===null)h=c-m,m=h+m-1;else{if(h>=c)return Promise.resolve(qa("Range start is greater than the blob's size."));(m===null||m>=c)&&(m=c-1)}let g=o.slice(h,m+1,u),A=v1n(g);s.body=A[0];let y=_ze(`${g.size}`),E=qHo(h,m,c);s.status=206,s.statusText="Partial Content",s.headersList.set("content-length",y,!0),s.headersList.set("content-type",u,!0),s.headersList.set("content-range",E,!0)}else{let d=v1n(o);s.statusText="OK",s.body=d[0],s.headersList.set("content-length",l,!0),s.headersList.set("content-type",u,!0)}return Promise.resolve(s)}case"data:":{let n=bv(e),o=tjo(n);if(o==="failure")return Promise.resolve(qa("failed to fetch the data URL"));let s=rjo(o.mimeType);return Promise.resolve(yze({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:bze(o.body)[0]}))}case"file:":return Promise.resolve(qa("not implemented... yet..."));case"http:":case"https:":return D1n(t).catch(n=>qa(n));default:return Promise.resolve(qa("unknown scheme"))}}a(S1n,"schemeFetch");function pjo(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}a(pjo,"finalizeResponse");function fHt(t,e){let r=t.timingInfo,n=a(()=>{let s=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(!vze(t.request.url))return;r.endTime=s;let l=e.cacheState,u=e.bodyInfo;e.timingAllowPassed||(r=mHt(r),l="");let d=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){d=e.status;let p=HHo(e.headersList);p!=="failure"&&(u.contentType=njo(p))}t.request.initiatorType!=null&&R1n(r,t.request.url.href,t.request.initiatorType,globalThis,l,u,d)};let c=a(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>c())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let o=e.type==="error"?e:e.internalResponse??e;o.body==null?n():XHo(o.body.stream,()=>{n()})}a(fHt,"fetchFinale");async function D1n(t){let e=t.request,r=null,n=null,o=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await hHt(t),e.responseTainting==="cors"&&kHo(e,r)==="failure")return qa("cors failure");SHo(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&DHo(e.origin,e.client,e.destination,n)==="blocked"?qa("blocked"):(I1n.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=qa("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await hjo(t,r):UV(!1)),r.timingInfo=o,r)}a(D1n,"httpFetch");function hjo(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,o;try{if(o=xHo(n,bv(r).hash),o==null)return e}catch(c){return Promise.resolve(qa(c))}if(!vze(o))return Promise.resolve(qa("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(qa("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(o.username||o.password)&&!pHt(r,o))return Promise.resolve(qa('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(o.username||o.password))return Promise.resolve(qa('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(qa());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!ljo.includes(r.method)){r.method="GET",r.body=null;for(let c of WHo)r.headersList.delete(c)}pHt(bv(r),o)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(UV(r.body.source!=null),r.body=bze(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=Pve(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(o),wHo(r,n),k1n(t,!0)}a(hjo,"httpRedirectFetch");async function hHt(t,e=!1,r=!1){let n=t.request,o=null,s=null,c=null,l=null,u=!1;n.window==="no-window"&&n.redirect==="error"?(o=t,s=n):(s=EHo(n),o={...t},o.request=s);let d=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",p=s.body?s.body.length:null,h=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(h="0"),p!=null&&(h=_ze(`${p}`)),h!=null&&s.headersList.append("content-length",h,!0),p!=null&&s.keepalive,gHt.is.URL(s.referrer)&&s.headersList.append("referer",_ze(s.referrer.href),!0),IHo(s),PHo(s),s.headersList.contains("user-agent",!0)||s.headersList.append("user-agent",ujo,!0),s.cache==="default"&&(s.headersList.contains("if-modified-since",!0)||s.headersList.contains("if-none-match",!0)||s.headersList.contains("if-unmodified-since",!0)||s.headersList.contains("if-match",!0)||s.headersList.contains("if-range",!0))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control",!0)&&s.headersList.append("cache-control","max-age=0",!0),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma",!0)||s.headersList.append("pragma","no-cache",!0),s.headersList.contains("cache-control",!0)||s.headersList.append("cache-control","no-cache",!0)),s.headersList.contains("range",!0)&&s.headersList.append("accept-encoding","identity",!0),s.headersList.contains("accept-encoding",!0)||(FHo(bv(s))?s.headersList.append("accept-encoding","br, gzip, deflate",!0):s.headersList.append("accept-encoding","gzip, deflate",!0)),s.headersList.delete("host",!0),d&&!s.headersList.contains("authorization",!0)){let m=null;if(!(jHo(s)&&(s.useURLCredentials===void 0||!C1n(bv(s))))){if(C1n(bv(s))&&e){let{username:g,password:A}=bv(s);m=`Basic ${Buffer.from(`${g}:${A}`).toString("base64")}`}}m!==null&&s.headersList.append("Authorization",m,!1)}if(l==null&&(s.cache="no-store"),s.cache!=="no-store"&&s.cache,c==null){if(s.cache==="only-if-cached")return qa("only if cached");let m=await mjo(o,d,r);!VHo.has(s.method)&&m.status>=200&&m.status<=399,u&&m.status,c==null&&(c=m)}if(c.urlList=[...s.urlList],s.headersList.contains("range",!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=d,c.status===401&&s.responseTainting!=="cors"&&d&&$Ho(n.traversableForUserPrompts)){if(n.body!=null){if(n.body.source==null)return qa("expected non-null body source");n.body=bze(n.body.source)[0]}if(n.useURLCredentials===void 0||e)return D9(t)?Rve(t):c;t.controller.connection.destroy(),c=await hHt(t,!0)}if(c.status===407)return n.window==="no-window"?qa():D9(t)?Rve(t):qa("proxy authentication required");if(c.status===421&&!r&&(n.body==null||n.body.source!=null)){if(D9(t))return Rve(t);t.controller.connection.destroy(),c=await hHt(t,e,!0)}return c}a(hHt,"httpNetworkOrCacheFetch");async function mjo(t,e=!1,r=!1){UV(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,y=!0){this.destroyed||(this.destroyed=!0,y&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,o=null,s=t.timingInfo;null==null&&(n.cache="no-store");let l=r?"yes":"no";n.mode;let u=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=a(async function*(_){D9(t)||(yield _,t.processRequestBodyChunkLength?.(_.byteLength))},"processBodyChunk"),y=a(()=>{D9(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=a(_=>{D9(t)||(_.name==="AbortError"?t.controller.abort():t.controller.terminate(_))},"processBodyError");u=(async function*(){try{for await(let _ of n.body.stream)yield*A(_);y()}catch(_){E(_)}})()}try{let{body:A,status:y,statusText:E,headersList:_,socket:v}=await g({body:u});if(v)o=yze({status:y,statusText:E,headersList:_,socket:v});else{let b=A[Symbol.asyncIterator]();t.controller.next=()=>b.next(),o=yze({status:y,statusText:E,headersList:_})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),Rve(t,A)):qa(A)}let d=a(()=>t.controller.resume(),"pullAlgorithm"),p=a(A=>{D9(t)||t.controller.abort(A)},"cancelAlgorithm"),h=new ReadableStream({start(A){t.controller.controller=A},pull:d,cancel:p,type:"bytes"});o.body={stream:h,source:null,length:null},t.controller.resume||t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,y;try{let{done:_,value:v}=await t.controller.next();if(_1n(t))break;A=_?void 0:v}catch(_){t.controller.ended&&!s.encodedBodySize?A=void 0:(A=_,y=!0)}if(A===void 0){BHo(t.controller.controller),pjo(t,o);return}if(s.decodedBodySize+=A?.byteLength??0,y){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),ZHo(h)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){_1n(t)?(o.aborted=!0,Eze(h)&&t.controller.controller.error(t.controller.serializedAbortReason)):Eze(h)&&t.controller.controller.error(new TypeError("terminated",{cause:MHo(A)?A:void 0})),t.controller.connection.destroy()}return a(m,"onAborted"),o;function g({body:A}){let y=bv(n),E=t.controller.dispatcher,_=y.pathname+y.search,v=y.search.length===0&&y.href[y.href.length-y.hash.length-1]==="?";return new Promise((b,I)=>E.dispatch({path:v?`${_}?`:_,origin:y.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(x){let{connection:w}=t.controller;s.finalConnectionTimingInfo=UHo(void 0,s.postRedirectStartTime,t.crossOriginIsolatedCapability),w.destroyed?x(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",x),this.abort=w.abort=x),s.finalNetworkRequestStartTime=Pve(t.crossOriginIsolatedCapability)},onResponseStarted(){s.finalNetworkResponseStartTime=Pve(t.crossOriginIsolatedCapability)},onHeaders(x,w,R,P){if(x<200)return!1;let k=new lHt;for(let O=0;OF)return I(new Error(`too many content-encodings in response: ${D.length}, maximum allowed is ${F}`)),!0;for(let U=D.length-1;U>=0;--U){let L=D[U].trim();if(L==="x-gzip"||L==="gzip")N.push(Tw.createGunzip({flush:Tw.constants.Z_SYNC_FLUSH,finishFlush:Tw.constants.Z_SYNC_FLUSH}));else if(L==="deflate")N.push(GHo({flush:Tw.constants.Z_SYNC_FLUSH,finishFlush:Tw.constants.Z_SYNC_FLUSH}));else if(L==="br")N.push(Tw.createBrotliDecompress({flush:Tw.constants.BROTLI_OPERATION_FLUSH,finishFlush:Tw.constants.BROTLI_OPERATION_FLUSH}));else if(L==="zstd"&&cjo)N.push(Tw.createZstdDecompress({flush:Tw.constants.ZSTD_e_continue,finishFlush:Tw.constants.ZSTD_e_end}));else{N.length=0;break}}}let G=this.onError.bind(this);return b({status:x,statusText:P,headersList:k,body:N.length?JHo(this.body,...N,O=>{O&&this.onError(O)}).on("error",G):this.body.on("error",G)}),!0},onData(x){if(t.controller.dump)return;let w=x;return s.encodedBodySize+=w.byteLength,this.body.push(w)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.ended=!0,this.body.push(null)},onError(x){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(x),t.controller.terminate(x),I(x)},onRequestUpgrade(x,w,R,P){if(P.session!=null&&w!==200||P.session==null&&w!==101)return!1;let k=new lHt;for(let[Q,M]of Object.entries(R)){if(M==null)continue;let N=Q.toLowerCase();if(Array.isArray(M))for(let G of M)k.append(N,String(G),!0);else k.append(N,String(M),!0)}return b({status:w,statusText:T1n[w],headersList:k,socket:P}),!0},onUpgrade(x,w,R){if(R.session!=null&&x!==200||R.session==null&&x!==101)return!1;let P=new lHt;for(let k=0;k{"use strict";f();var gjo=require("node:assert"),{URLSerializer:M1n}=oS(),{isValidHeaderName:Ajo}=mv();function yjo(t,e,r=!1){let n=M1n(t,r),o=M1n(e,r);return n===o}a(yjo,"urlEquals");function Ejo(t){gjo(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),Ajo(r)&&e.push(r);return e}a(Ejo,"getFieldValues");O1n.exports={urlEquals:yjo,getFieldValues:Ejo}});var Q1n=T((jUu,U1n)=>{"use strict";f();var AHt=require("node:assert"),{kConstruct:_jo}=rc(),{urlEquals:Cjo,getFieldValues:yHt}=B1n(),{kEnumerableProperty:QV,isDisturbed:vjo}=Ki(),{webidl:Pn}=Pm(),{cloneResponse:L1n,fromInnerResponse:bjo,getResponseState:Tjo}=wve(),{Request:Dve,fromInnerRequest:Sjo,getRequestState:_5}=Sse(),{fetching:Ijo}=kve(),{urlIsHttpHttpsScheme:Tze,readAllBytes:xjo}=mv(),{createDeferredPromise:Ise}=j1e(),Sze=class t{static{a(this,"Cache")}#e;constructor(){arguments[0]!==_jo&&Pn.illegalConstructor(),Pn.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){Pn.brandCheck(this,t);let n="Cache.match";Pn.argumentLengthCheck(arguments,1,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=this.#i(e,r,1);if(o.length!==0)return o[0]}async matchAll(e=void 0,r={}){Pn.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=Pn.converters.RequestInfo(e)),r=Pn.converters.CacheQueryOptions(r,n,"options"),this.#i(e,r)}async add(e){Pn.brandCheck(this,t),Pn.argumentLengthCheck(arguments,1,"Cache.add"),e=Pn.converters.RequestInfo(e);let n=[e];return await this.addAll(n)}async addAll(e){Pn.brandCheck(this,t);let r="Cache.addAll";Pn.argumentLengthCheck(arguments,1,r);let n=[],o=[];for(let m of e){if(m===void 0)throw Pn.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=Pn.converters.RequestInfo(m),typeof m=="string")continue;let g=_5(m);if(!Tze(g.url)||g.method!=="GET")throw Pn.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let s=[];for(let m of e){let g=_5(new Dve(m));if(!Tze(g.url))throw Pn.errors.exception({header:r,message:"Expected http/s scheme."});g.initiator="fetch",g.destination="subresource",o.push(g);let A=Ise();s.push(Ijo({request:g,processResponse(y){if(y.type==="error"||y.status===206||y.status<200||y.status>299)A.reject(Pn.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(y.headersList.contains("vary")){let E=yHt(y.headersList.get("vary"));for(let _ of E)if(_==="*"){A.reject(Pn.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let v of s)v.abort();return}}},processResponseEndOfBody(y){if(y.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(y)}})),n.push(A.promise)}let l=await Promise.all(n),u=[],d=0;for(let m of l){let g={type:"put",request:o[d],response:m};u.push(g),d++}let p=Ise(),h=null;try{this.#t(u)}catch(m){h=m}return queueMicrotask(()=>{h===null?p.resolve(void 0):p.reject(h)}),p.promise}async put(e,r){Pn.brandCheck(this,t);let n="Cache.put";Pn.argumentLengthCheck(arguments,2,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.Response(r,n,"response");let o=null;if(Pn.is.Request(e)?o=_5(e):o=_5(new Dve(e)),!Tze(o.url)||o.method!=="GET")throw Pn.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let s=Tjo(r);if(s.status===206)throw Pn.errors.exception({header:n,message:"Got 206 status"});if(s.headersList.contains("vary")){let g=yHt(s.headersList.get("vary"));for(let A of g)if(A==="*")throw Pn.errors.exception({header:n,message:"Got * vary field value"})}if(s.body&&(vjo(s.body.stream)||s.body.stream.locked))throw Pn.errors.exception({header:n,message:"Response body is locked or disturbed"});let c=L1n(s),l=Ise();if(s.body!=null){let A=s.body.stream.getReader();xjo(A,l.resolve,l.reject)}else l.resolve(void 0);let u=[],d={type:"put",request:o,response:c};u.push(d);let p=await l.promise;c.body!=null&&(c.body.source=p);let h=Ise(),m=null;try{this.#t(u)}catch(g){m=g}return queueMicrotask(()=>{m===null?h.resolve():h.reject(m)}),h.promise}async delete(e,r={}){Pn.brandCheck(this,t);let n="Cache.delete";Pn.argumentLengthCheck(arguments,1,n),e=Pn.converters.RequestInfo(e),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=null;if(Pn.is.Request(e)){if(o=_5(e),o.method!=="GET"&&!r.ignoreMethod)return!1}else AHt(typeof e=="string"),o=_5(new Dve(e));let s=[],c={type:"delete",request:o,options:r};s.push(c);let l=Ise(),u=null,d;try{d=this.#t(s)}catch(p){u=p}return queueMicrotask(()=>{u===null?l.resolve(!!d?.length):l.reject(u)}),l.promise}async keys(e=void 0,r={}){Pn.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=Pn.converters.RequestInfo(e)),r=Pn.converters.CacheQueryOptions(r,n,"options");let o=null;if(e!==void 0)if(Pn.is.Request(e)){if(o=_5(e),o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=_5(new Dve(e)));let s=Ise(),c=[];if(e===void 0)for(let l of this.#e)c.push(l[0]);else{let l=this.#n(o,r);for(let u of l)c.push(u[0])}return queueMicrotask(()=>{let l=[];for(let u of c){let d=Sjo(u,void 0,new AbortController().signal,"immutable");l.push(d)}s.resolve(Object.freeze(l))}),s.promise}#t(e){let r=this.#e,n=[...r],o=[],s=[];try{for(let c of e){if(c.type!=="delete"&&c.type!=="put")throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(c.type==="delete"&&c.response!=null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#n(c.request,c.options,o).length)throw new DOMException("???","InvalidStateError");let l;if(c.type==="delete"){if(l=this.#n(c.request,c.options),l.length===0)return[];for(let u of l){let d=r.indexOf(u);AHt(d!==-1),r.splice(d,1)}}else if(c.type==="put"){if(c.response==null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let u=c.request;if(!Tze(u.url))throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(u.method!=="GET")throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(c.options!=null)throw Pn.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});l=this.#n(c.request);for(let d of l){let p=r.indexOf(d);AHt(p!==-1),r.splice(p,1)}r.push([c.request,c.response]),o.push([c.request,c.response])}s.push([c.request,c.response])}return s}catch(c){throw this.#e.length=0,this.#e=n,c}}#n(e,r,n){let o=[],s=n??this.#e;for(let c of s){let[l,u]=c;this.#r(e,l,u,r)&&o.push(c)}return o}#r(e,r,n=null,o){let s=new URL(e.url),c=new URL(r.url);if(o?.ignoreSearch&&(c.search="",s.search=""),!Cjo(s,c,!0))return!1;if(n==null||o?.ignoreVary||!n.headersList.contains("vary"))return!0;let l=yHt(n.headersList.get("vary"));for(let u of l){if(u==="*")return!1;let d=r.headersList.get(u),p=e.headersList.get(u);if(d!==p)return!1}return!0}#i(e,r,n=1/0){let o=null;if(e!==void 0)if(Pn.is.Request(e)){if(o=_5(e),o.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(o=_5(new Dve(e)));let s=[];if(e===void 0)for(let l of this.#e)s.push(l[1]);else{let l=this.#n(o,r);for(let u of l)s.push(u[1])}let c=[];for(let l of s){let u=bjo(L1n(l),"immutable");if(c.push(u),c.length>=n)break}return Object.freeze(c)}};Object.defineProperties(Sze.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:QV,matchAll:QV,add:QV,addAll:QV,put:QV,delete:QV,keys:QV});var F1n=[{key:"ignoreSearch",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"ignoreVary",converter:Pn.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Pn.converters.CacheQueryOptions=Pn.dictionaryConverter(F1n);Pn.converters.MultiCacheQueryOptions=Pn.dictionaryConverter([...F1n,{key:"cacheName",converter:Pn.converters.DOMString}]);Pn.converters.Response=Pn.interfaceConverter(Pn.is.Response,"Response");Pn.converters["sequence"]=Pn.sequenceConverter(Pn.converters.RequestInfo);U1n.exports={Cache:Sze}});var G1n=T((WUu,q1n)=>{"use strict";f();var{Cache:Ize}=Q1n(),{webidl:Xg}=Pm(),{kEnumerableProperty:Nve}=Ki(),{kConstruct:Mve}=rc(),xze=class t{static{a(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==Mve&&Xg.illegalConstructor(),Xg.util.markAsUncloneable(this)}async match(e,r={}){if(Xg.brandCheck(this,t),Xg.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=Xg.converters.RequestInfo(e),r=Xg.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new Ize(Mve,n).match(e,r)}}else for(let n of this.#e.values()){let s=await new Ize(Mve,n).match(e,r);if(s!==void 0)return s}}async has(e){Xg.brandCheck(this,t);let r="CacheStorage.has";return Xg.argumentLengthCheck(arguments,1,r),e=Xg.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){Xg.brandCheck(this,t);let r="CacheStorage.open";if(Xg.argumentLengthCheck(arguments,1,r),e=Xg.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let o=this.#e.get(e);return new Ize(Mve,o)}let n=[];return this.#e.set(e,n),new Ize(Mve,n)}async delete(e){Xg.brandCheck(this,t);let r="CacheStorage.delete";return Xg.argumentLengthCheck(arguments,1,r),e=Xg.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return Xg.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(xze.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:Nve,has:Nve,open:Nve,delete:Nve,keys:Nve});q1n.exports={CacheStorage:xze}});var j1n=T((KUu,H1n)=>{"use strict";f();H1n.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var EHt=T((XUu,Y1n)=>{"use strict";f();function wjo(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}a(wjo,"isCTLExcludingHtab");function $1n(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}a($1n,"validateCookieName");function V1n(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}a(V1n,"validateCookieValue");function W1n(t){for(let e=0;ee.toString().padStart(2,"0"));function z1n(t){return typeof t=="number"&&(t=new Date(t)),`${Pjo[t.getUTCDay()]}, ${wze[t.getUTCDate()]} ${kjo[t.getUTCMonth()]} ${t.getUTCFullYear()} ${wze[t.getUTCHours()]}:${wze[t.getUTCMinutes()]}:${wze[t.getUTCSeconds()]} GMT`}a(z1n,"toIMFDate");function Djo(t){if(t<0)throw new Error("Invalid cookie max-age")}a(Djo,"validateCookieMaxAge");function Njo(t){if(t.name.length===0)return null;$1n(t.name),V1n(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(Djo(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(Rjo(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(W1n(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${z1n(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...o]=r.split("=");e.push(`${n.trim()}=${o.join("=")}`)}return e.join("; ")}a(Njo,"stringify");Y1n.exports={isCTLExcludingHtab:wjo,validateCookieName:$1n,validateCookiePath:W1n,validateCookieValue:V1n,toIMFDate:z1n,stringify:Njo}});var J1n=T((tQu,K1n)=>{"use strict";f();var{collectASequenceOfCodePointsFast:Rze}=rO(),{maxNameValuePairSize:Mjo,maxAttributeValueSize:Ojo}=j1n(),{isCTLExcludingHtab:Bjo}=EHt(),Ljo=require("node:assert"),{unescape:Fjo}=require("node:querystring");function Ujo(t){if(Bjo(t))return null;let e="",r="",n="",o="";if(t.includes(";")){let s={position:0};e=Rze(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))o=e;else{let s={position:0};n=Rze("=",e,s),o=e.slice(s.position+1)}return n=n.trim(),o=o.trim(),n.length+o.length>Mjo?null:{name:n,value:Fjo(o),...xse(r)}}a(Ujo,"parseSetCookie");function xse(t,e={}){if(t.length===0)return e;Ljo(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=Rze(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",o="";if(r.includes("=")){let c={position:0};n=Rze("=",r,c),o=r.slice(c.position+1)}else n=r;if(n=n.trim(),o=o.trim(),o.length>Ojo)return xse(t,e);let s=n.toLowerCase();if(s==="expires"){let c=new Date(o);e.expires=c}else if(s==="max-age"){let c=o.charCodeAt(0);if((c<48||c>57)&&o[0]!=="-"||!/^\d+$/.test(o))return xse(t,e);let l=Number(o);e.maxAge=l}else if(s==="domain"){let c=o;c[0]==="."&&(c=c.slice(1)),c=c.toLowerCase(),e.domain=c}else if(s==="path"){let c="";o.length===0||o[0]!=="/"?c="/":c=o,e.path=c}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let c="Default",l=o.toLowerCase();l.includes("none")&&(c="None"),l.includes("strict")&&(c="Strict"),l.includes("lax")&&(c="Lax"),e.sameSite=c}else e.unparsed??=[],e.unparsed.push(`${n}=${o}`);return xse(t,e)}a(xse,"parseUnparsedAttributes");K1n.exports={parseSetCookie:Ujo,parseUnparsedAttributes:xse}});var tvn=T((iQu,evn)=>{"use strict";f();var{parseSetCookie:X1n}=J1n(),{stringify:Qjo}=EHt(),{webidl:ra}=Pm(),{Headers:qjo}=BV(),Pze=ra.brandCheckMultiple([qjo,globalThis.Headers].filter(Boolean));function Gjo(t){ra.argumentLengthCheck(arguments,1,"getCookies"),Pze(t);let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[o,...s]=n.split("=");r[o.trim()]=s.join("=")}return r}a(Gjo,"getCookies");function Hjo(t,e,r){Pze(t);let n="deleteCookie";ra.argumentLengthCheck(arguments,2,n),e=ra.converters.DOMString(e,n,"name"),r=ra.converters.DeleteCookieAttributes(r),Z1n(t,{name:e,value:"",expires:new Date(0),...r})}a(Hjo,"deleteCookie");function jjo(t){ra.argumentLengthCheck(arguments,1,"getSetCookies"),Pze(t);let e=t.getSetCookie();return e?e.map(r=>X1n(r)):[]}a(jjo,"getSetCookies");function $jo(t){return t=ra.converters.DOMString(t),X1n(t)}a($jo,"parseCookie");function Z1n(t,e){ra.argumentLengthCheck(arguments,2,"setCookie"),Pze(t),e=ra.converters.Cookie(e);let r=Qjo(e);r&&t.append("set-cookie",r,!0)}a(Z1n,"setCookie");ra.converters.DeleteCookieAttributes=ra.dictionaryConverter([{converter:ra.nullableConverter(ra.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")}]);ra.converters.Cookie=ra.dictionaryConverter([{converter:ra.converters.DOMString,key:"name"},{converter:ra.converters.DOMString,key:"value"},{converter:ra.nullableConverter(t=>typeof t=="number"?ra.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters["long long"]),key:"maxAge",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters.DOMString),key:"domain",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters.DOMString),key:"path",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters.boolean),key:"secure",defaultValue:a(()=>null,"defaultValue")},{converter:ra.nullableConverter(ra.converters.boolean),key:"httpOnly",defaultValue:a(()=>null,"defaultValue")},{converter:ra.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:ra.sequenceConverter(ra.converters.DOMString),key:"unparsed",defaultValue:a(()=>[],"defaultValue")}]);evn.exports={getCookies:Gjo,deleteCookie:Hjo,getSetCookies:jjo,setCookie:Z1n,parseCookie:$jo}});var Nze=T((aQu,nvn)=>{"use strict";f();var{webidl:Un}=Pm(),{kEnumerableProperty:w_}=Ki(),{kConstruct:rvn}=rc(),wse=class t extends Event{static{a(this,"MessageEvent")}#e;constructor(e,r={}){if(e===rvn){super(arguments[1],arguments[2]),Un.util.markAsUncloneable(this);return}let n="MessageEvent constructor";Un.argumentLengthCheck(arguments,1,n),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,Un.util.markAsUncloneable(this)}get data(){return Un.brandCheck(this,t),this.#e.data}get origin(){return Un.brandCheck(this,t),this.#e.origin}get lastEventId(){return Un.brandCheck(this,t),this.#e.lastEventId}get source(){return Un.brandCheck(this,t),this.#e.source}get ports(){return Un.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,o=null,s="",c="",l=null,u=[]){return Un.brandCheck(this,t),Un.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:o,origin:s,lastEventId:c,source:l,ports:u})}static createFastMessageEvent(e,r){let n=new t(rvn,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:Vjo}=wse;delete wse.createFastMessageEvent;var kze=class t extends Event{static{a(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";Un.argumentLengthCheck(arguments,1,n),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.CloseEventInit(r),super(e,r),this.#e=r,Un.util.markAsUncloneable(this)}get wasClean(){return Un.brandCheck(this,t),this.#e.wasClean}get code(){return Un.brandCheck(this,t),this.#e.code}get reason(){return Un.brandCheck(this,t),this.#e.reason}},Dze=class t extends Event{static{a(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";Un.argumentLengthCheck(arguments,1,n),super(e,r),Un.util.markAsUncloneable(this),e=Un.converters.DOMString(e,n,"type"),r=Un.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Un.brandCheck(this,t),this.#e.message}get filename(){return Un.brandCheck(this,t),this.#e.filename}get lineno(){return Un.brandCheck(this,t),this.#e.lineno}get colno(){return Un.brandCheck(this,t),this.#e.colno}get error(){return Un.brandCheck(this,t),this.#e.error}};Object.defineProperties(wse.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:w_,origin:w_,lastEventId:w_,source:w_,ports:w_,initMessageEvent:w_});Object.defineProperties(kze.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:w_,code:w_,wasClean:w_});Object.defineProperties(Dze.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:w_,filename:w_,lineno:w_,colno:w_,error:w_});Un.converters.MessagePort=Un.interfaceConverter(Un.is.MessagePort,"MessagePort");Un.converters["sequence"]=Un.sequenceConverter(Un.converters.MessagePort);var _Ht=[{key:"bubbles",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"cancelable",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"composed",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")}];Un.converters.MessageEventInit=Un.dictionaryConverter([..._Ht,{key:"data",converter:Un.converters.any,defaultValue:a(()=>null,"defaultValue")},{key:"origin",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lastEventId",converter:Un.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"source",converter:Un.nullableConverter(Un.converters.MessagePort),defaultValue:a(()=>null,"defaultValue")},{key:"ports",converter:Un.converters["sequence"],defaultValue:a(()=>[],"defaultValue")}]);Un.converters.CloseEventInit=Un.dictionaryConverter([..._Ht,{key:"wasClean",converter:Un.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"code",converter:Un.converters["unsigned short"],defaultValue:a(()=>0,"defaultValue")},{key:"reason",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Un.converters.ErrorEventInit=Un.dictionaryConverter([..._Ht,{key:"message",converter:Un.converters.DOMString,defaultValue:a(()=>"","defaultValue")},{key:"filename",converter:Un.converters.USVString,defaultValue:a(()=>"","defaultValue")},{key:"lineno",converter:Un.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"colno",converter:Un.converters["unsigned long"],defaultValue:a(()=>0,"defaultValue")},{key:"error",converter:Un.converters.any}]);nvn.exports={MessageEvent:wse,CloseEvent:kze,ErrorEvent:Dze,createFastMessageEvent:Vjo}});var N9=T((uQu,ivn)=>{"use strict";f();var Wjo="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",zjo={enumerable:!0,writable:!1,configurable:!1},Yjo={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},Kjo={SENT:1,RECEIVED:2},Jjo={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},Xjo=65535,Zjo={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},e$o=Buffer.allocUnsafe(0),t$o={text:1,typedArray:2,arrayBuffer:3,blob:4};ivn.exports={uid:Wjo,sentCloseFrameState:Kjo,staticPropertyDescriptors:zjo,states:Yjo,opcodes:Jjo,maxUnsigned16Bit:Xjo,parserStates:Zjo,emptyBuffer:e$o,sendHints:t$o}});var qV=T((fQu,lvn)=>{"use strict";f();var{states:Mze,opcodes:Rse}=N9(),{isUtf8:r$o}=require("node:buffer"),{removeHTTPWhitespace:ovn}=oS(),{collectASequenceOfCodePointsFast:n$o}=rO();function i$o(t){return t===Mze.CONNECTING}a(i$o,"isConnecting");function o$o(t){return t===Mze.OPEN}a(o$o,"isEstablished");function s$o(t){return t===Mze.CLOSING}a(s$o,"isClosing");function a$o(t){return t===Mze.CLOSED}a(a$o,"isClosed");function c$o(t,e,r=(o,s)=>new Event(o,s),n={}){let o=r(t,n);e.dispatchEvent(o)}a(c$o,"fireEvent");function l$o(t,e,r){t.onMessage(e,r)}a(l$o,"websocketMessageReceived");function u$o(t){return t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer}a(u$o,"toArrayBuffer");function d$o(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}a(d$o,"isValidSubprotocol");function f$o(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}a(f$o,"isValidStatusCode");function svn(t){return t===Rse.CLOSE||t===Rse.PING||t===Rse.PONG}a(svn,"isControlFrame");function avn(t){return t===Rse.CONTINUATION}a(avn,"isContinuationFrame");function cvn(t){return t===Rse.TEXT||t===Rse.BINARY}a(cvn,"isTextBinaryFrame");function p$o(t){return cvn(t)||avn(t)||svn(t)}a(p$o,"isValidOpcode");function h$o(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}a(m$o,"isValidClientWindowBits");function g$o(t,e){let r;try{r=new URL(t,e)}catch(n){throw new DOMException(n,"SyntaxError")}if(r.protocol==="http:"?r.protocol="ws:":r.protocol==="https:"&&(r.protocol="wss:"),r.protocol!=="ws:"&&r.protocol!=="wss:")throw new DOMException("expected a ws: or wss: url","SyntaxError");if(r.hash.length||r.href.endsWith("#"))throw new DOMException("hash","SyntaxError");return r}a(g$o,"getURLRecord");function A$o(t,e){if(t!==null&&t!==1e3&&(t<3e3||t>4999))throw new DOMException("invalid code","InvalidAccessError");if(e!==null){let r=Buffer.byteLength(e);if(r>123)throw new DOMException(`Reason must be less than 123 bytes; received ${r}`,"SyntaxError")}}a(A$o,"validateCloseCodeAndReason");var y$o=(()=>{if(typeof process.versions.icu=="string"){let t=new TextDecoder("utf-8",{fatal:!0});return t.decode.bind(t)}return function(t){if(r$o(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")}})();lvn.exports={isConnecting:i$o,isEstablished:o$o,isClosing:s$o,isClosed:a$o,fireEvent:c$o,isValidSubprotocol:d$o,isValidStatusCode:f$o,websocketMessageReceived:l$o,utf8Decode:y$o,isControlFrame:svn,isContinuationFrame:avn,isTextBinaryFrame:cvn,isValidOpcode:p$o,parseExtensions:h$o,isValidClientWindowBits:m$o,toArrayBuffer:u$o,getURLRecord:g$o,validateCloseCodeAndReason:A$o}});var kse=T((mQu,dvn)=>{"use strict";f();var{runtimeFeatures:E$o}=nO(),{maxUnsigned16Bit:uvn,opcodes:_$o}=N9(),Oze=8*1024,Ove=null,Pse=Oze,C$o=E$o.has("crypto")?require("node:crypto").randomFillSync:a(function(e,r,n){for(let o=0;ouvn?(c+=8,s=127):o>125&&(c+=2,s=126);let l=Buffer.allocUnsafe(o+c);l[0]=l[1]=0,l[0]|=128,l[0]=(l[0]&240)+e;l[c-4]=n[0],l[c-3]=n[1],l[c-2]=n[2],l[c-1]=n[3],l[1]=s,s===126?l.writeUInt16BE(o,2):s===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),l[1]|=128;for(let u=0;uuvn?(s+=8,o=127):n>125&&(s+=2,o=126);let c=Buffer.allocUnsafeSlow(s);return c[0]=128|_$o.TEXT,c[1]=o|128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o===126?c.writeUInt16BE(n,2):o===127&&(c[2]=c[3]=0,c.writeUIntBE(n,4,6)),[c,e]}};dvn.exports={WebsocketFrameSend:vHt,generateMask:CHt}});var Bze=T((yQu,Avn)=>{"use strict";f();var{uid:v$o,states:bHt,sentCloseFrameState:THt,emptyBuffer:fvn,opcodes:b$o}=N9(),{parseExtensions:T$o,isClosed:S$o,isClosing:I$o,isEstablished:mvn,isConnecting:x$o,validateCloseCodeAndReason:w$o}=qV(),{makeRequest:R$o}=Sse(),{fetching:P$o}=kve(),{Headers:k$o,getHeadersList:D$o}=BV(),{getDecodeSplit:N$o}=mv(),{WebsocketFrameSend:M$o}=kse(),O$o=require("node:assert"),{runtimeFeatures:B$o}=nO(),pvn=B$o.has("crypto")?require("node:crypto"):null,hvn=!1;function L$o(t,e,r,n,o){let s=t;s.protocol=t.protocol==="ws:"?"http:":"https:";let c=R$o({urlList:[s],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error",useURLCredentials:!0});if(o.headers){let p=D$o(new k$o(o.headers));c.headersList=p}let l=pvn.randomBytes(16).toString("base64");c.headersList.append("sec-websocket-key",l,!0),c.headersList.append("sec-websocket-version","13",!0);for(let p of e)c.headersList.append("sec-websocket-protocol",p,!0);return c.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits",!0),P$o({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(p){if(p.type==="error"||p.status!==101){if(p.socket?.session==null){C5(n,1002,"Received network error or non-101 status code.",p.error);return}if(p.status!==200){C5(n,1002,"Received network error or non-200 status code.",p.error);return}}if(hvn===!1&&p.socket?.session!=null&&(process.emitWarning("WebSocket over HTTP2 is experimental, and subject to change.","ExperimentalWarning"),hvn=!0),e.length!==0&&!p.headersList.get("Sec-WebSocket-Protocol")){C5(n,1002,"Server did not respond with sent protocols.");return}if(p.socket.session==null&&p.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){C5(n,1002,'Server did not set Upgrade header to "websocket".');return}if(p.socket.session==null&&p.headersList.get("Connection")?.toLowerCase()!=="upgrade"){C5(n,1002,'Server did not set Connection header to "upgrade".');return}let h=p.headersList.get("Sec-WebSocket-Accept"),m=pvn.hash("sha1",l+v$o,"base64");if(h!==m){C5(n,1002,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let g=p.headersList.get("Sec-WebSocket-Extensions"),A;if(g!==null&&(A=T$o(g),!A.has("permessage-deflate"))){C5(n,1002,"Sec-WebSocket-Extensions header does not match.");return}let y=p.headersList.get("Sec-WebSocket-Protocol");if(y!==null&&!N$o("sec-websocket-protocol",c.headersList).includes(y)){C5(n,1002,"Protocol was not set in the opening handshake.");return}p.socket.on("data",n.onSocketData),p.socket.on("close",n.onSocketClose),p.socket.on("error",n.onSocketError),n.wasEverConnected=!0,n.onConnectionEstablished(p,A)}})}a(L$o,"establishWebSocketConnection");function gvn(t,e,r,n=!1){if(e??=null,r??="",n&&w$o(e,r),!(S$o(t.readyState)||I$o(t.readyState)))if(!mvn(t.readyState))C5(t),t.readyState=bHt.CLOSING;else if(!t.closeState.has(THt.SENT)&&!t.closeState.has(THt.RECEIVED)){let o=new M$o;r.length!==0&&e===null&&(e=1e3),O$o(e===null||Number.isInteger(e)),e===null&&r.length===0?o.frameData=fvn:e!==null&&r===null?(o.frameData=Buffer.allocUnsafe(2),o.frameData.writeUInt16BE(e,0)):e!==null&&r!==null?(o.frameData=Buffer.allocUnsafe(2+Buffer.byteLength(r)),o.frameData.writeUInt16BE(e,0),o.frameData.write(r,2,"utf-8")):o.frameData=fvn,t.socket.write(o.createFrame(b$o.CLOSE)),t.closeState.add(THt.SENT),t.readyState=bHt.CLOSING}else t.readyState=bHt.CLOSING}a(gvn,"closeWebSocketConnection");function C5(t,e,r,n){mvn(t.readyState)&&gvn(t,e,r,!1),t.controller.abort(),x$o(t.readyState)?t.onSocketClose():t.socket?.destroyed===!1&&t.socket.destroy()}a(C5,"failWebsocketConnection");Avn.exports={establishWebSocketConnection:L$o,failWebsocketConnection:C5,closeWebSocketConnection:gvn}});var _vn=T((CQu,Evn)=>{"use strict";f();var{createInflateRaw:F$o,Z_DEFAULT_WINDOWBITS:U$o}=require("node:zlib"),{isValidClientWindowBits:Q$o}=qV(),{MessageSizeExceededError:yvn}=Ni(),q$o=Buffer.from([0,0,255,255]),Lze=Symbol("kBuffer"),Bve=Symbol("kLength"),G$o=4*1024*1024,SHt=class{static{a(this,"PerMessageDeflate")}#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,r,n){if(this.#n){n(new yvn);return}if(!this.#e){let o=U$o;if(this.#t.serverMaxWindowBits){if(!Q$o(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}o=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=F$o({windowBits:o})}catch(s){n(s);return}this.#e[Lze]=[],this.#e[Bve]=0,this.#e.on("data",s=>{if(!this.#n){if(this.#e[Bve]+=s.length,this.#e[Bve]>G$o){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let c=this.#r;this.#r=null,c(new yvn)}return}this.#e[Lze].push(s)}}),this.#e.on("error",s=>{this.#e=null,n(s)})}this.#r=n,this.#e.write(e),r&&this.#e.write(q$o),this.#e.flush(()=>{if(this.#n||!this.#e)return;let o=Buffer.concat(this.#e[Lze],this.#e[Bve]);this.#e[Lze].length=0,this.#e[Bve]=0,this.#r=null,n(null,o)})}};Evn.exports={PerMessageDeflate:SHt}});var wHt=T((TQu,Svn)=>{"use strict";f();var{Writable:H$o}=require("node:stream"),j$o=require("node:assert"),{parserStates:R_,opcodes:Dse,states:$$o,emptyBuffer:Cvn,sentCloseFrameState:Lve}=N9(),{isValidStatusCode:V$o,isValidOpcode:W$o,websocketMessageReceived:vvn,utf8Decode:z$o,isControlFrame:bvn,isTextBinaryFrame:IHt,isContinuationFrame:Y$o}=qV(),{failWebsocketConnection:Tv}=Bze(),{WebsocketFrameSend:Tvn}=kse(),{PerMessageDeflate:K$o}=_vn(),{MessageSizeExceededError:J$o}=Ni(),xHt=class extends H$o{static{a(this,"ByteParser")}#e=[];#t=0;#n=0;#r=!1;#i=R_.INFO;#o={};#a=[];#s;#c;constructor(e,r){super(),this.#c=e,this.#s=r??new Map,this.#s.has("permessage-deflate")&&this.#s.set("permessage-deflate",new K$o(r))}_write(e,r,n){this.#e.push(e),this.#n+=e.length,this.#r=!0,this.run(n)}run(e){for(;this.#r;)if(this.#i===R_.INFO){if(this.#n<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,o=r[0]&15,s=(r[1]&128)===128,c=!n&&o!==Dse.CONTINUATION,l=r[1]&127,u=r[0]&64,d=r[0]&32,p=r[0]&16;if(!W$o(o))return Tv(this.#c,1002,"Invalid opcode received"),e();if(s)return Tv(this.#c,1002,"Frame cannot be masked"),e();if(u!==0&&!this.#s.has("permessage-deflate")){Tv(this.#c,1002,"Expected RSV1 to be clear.");return}if(d!==0||p!==0){Tv(this.#c,1002,"RSV1, RSV2, RSV3 must be clear");return}if(c&&!IHt(o)){Tv(this.#c,1002,"Invalid frame type was fragmented.");return}if(IHt(o)&&this.#a.length>0){Tv(this.#c,1002,"Expected continuation frame");return}if(this.#o.fragmented&&c){Tv(this.#c,1002,"Fragmented frame exceeded 125 bytes.");return}if((l>125||c)&&bvn(o)){Tv(this.#c,1002,"Control frame either too large or fragmented");return}if(Y$o(o)&&this.#a.length===0&&!this.#o.compressed){Tv(this.#c,1002,"Unexpected continuation frame");return}l<=125?(this.#o.payloadLength=l,this.#i=R_.READ_DATA):l===126?this.#i=R_.PAYLOADLENGTH_16:l===127&&(this.#i=R_.PAYLOADLENGTH_64),IHt(o)&&(this.#o.binaryType=o,this.#o.compressed=u!==0),this.#o.opcode=o,this.#o.masked=s,this.#o.fin=n,this.#o.fragmented=c}else if(this.#i===R_.PAYLOADLENGTH_16){if(this.#n<2)return e();let r=this.consume(2);this.#o.payloadLength=r.readUInt16BE(0),this.#i=R_.READ_DATA}else if(this.#i===R_.PAYLOADLENGTH_64){if(this.#n<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),o=r.readUInt32BE(4);if(n!==0||o>2**31-1){Tv(this.#c,1009,"Received payload length > 2^31 bytes.");return}this.#o.payloadLength=o,this.#i=R_.READ_DATA}else if(this.#i===R_.READ_DATA){if(this.#n{if(n){let s=n instanceof J$o?1009:1007;Tv(this.#c,s,n.message);return}if(this.writeFragments(o),!this.#o.fin){this.#i=R_.INFO,this.#r=!0,this.run(e);return}vvn(this.#c,this.#o.binaryType,this.consumeFragments()),this.#r=!0,this.#i=R_.INFO,this.run(e)}),this.#r=!1;break}}}consume(e){if(e>this.#n)throw new Error("Called consume() before buffers satiated.");if(e===0)return Cvn;this.#n-=e;let r=this.#e[0];if(r.length>e)return this.#e[0]=r.subarray(e,r.length),r.subarray(0,e);if(r.length===e)return this.#e.shift();{let n=0,o=Buffer.allocUnsafeSlow(e);for(;n!==e;){let s=this.#e[0],c=s.length;if(c+n===e){o.set(this.#e.shift(),n);break}else if(c+n>e){o.set(s.subarray(0,e-n),n),this.#e[0]=s.subarray(e-n);break}else o.set(this.#e.shift(),n),n+=c}return o}}writeFragments(e){this.#t+=e.length,this.#a.push(e)}consumeFragments(){let e=this.#a;if(e.length===1)return this.#t=0,e.shift();let r=0,n=Buffer.allocUnsafeSlow(this.#t);for(let o=0;o=2&&(r=e.readUInt16BE(0)),r!==void 0&&!V$o(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=z$o(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#o;if(r===Dse.CLOSE){if(n===1)return Tv(this.#c,1002,"Received close frame with a 1-byte body."),!1;if(this.#o.closeInfo=this.parseCloseBody(e),this.#o.closeInfo.error){let{code:o,reason:s}=this.#o.closeInfo;return Tv(this.#c,o,s),!1}if(!this.#c.closeState.has(Lve.SENT)&&!this.#c.closeState.has(Lve.RECEIVED)){let o=Cvn;this.#o.closeInfo.code&&(o=Buffer.allocUnsafe(2),o.writeUInt16BE(this.#o.closeInfo.code,0));let s=new Tvn(o);this.#c.socket.write(s.createFrame(Dse.CLOSE)),this.#c.closeState.add(Lve.SENT)}return this.#c.readyState=$$o.CLOSING,this.#c.closeState.add(Lve.RECEIVED),!1}else if(r===Dse.PING){if(!this.#c.closeState.has(Lve.RECEIVED)){let o=new Tvn(e);this.#c.socket.write(o.createFrame(Dse.PONG)),this.#c.onPing(e)}}else r===Dse.PONG&&this.#c.onPong(e);return!0}get closingInfo(){return this.#o.closeInfo}};Svn.exports={ByteParser:xHt}});var Rvn=T((xQu,wvn)=>{"use strict";f();var{WebsocketFrameSend:xvn}=kse(),{opcodes:Ivn,sendHints:GV}=N9(),X$o=sqt(),PHt=class{static{a(this,"SendQueue")}#e=new X$o;#t=!1;#n;constructor(e){this.#n=e}add(e,r,n){if(n!==GV.blob){if(this.#t){let s={promise:null,callback:r,frame:RHt(e,n)};this.#e.push(s)}else if(n===GV.text){let{0:s,1:c}=xvn.createFastTextFrame(e);this.#n.cork(),this.#n.write(s),this.#n.write(c,r),this.#n.uncork()}else this.#n.write(RHt(e,n),r);return}let o={promise:e.arrayBuffer().then(s=>{o.promise=null,o.frame=RHt(s,n)}),callback:r,frame:null};this.#e.push(o),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#n.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function RHt(t,e){return new xvn(Z$o(t,e)).createFrame(e===GV.text?Ivn.TEXT:Ivn.BINARY)}a(RHt,"createFrame");function Z$o(t,e){switch(e){case GV.text:case GV.typedArray:return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);case GV.arrayBuffer:case GV.blob:return new Uint8Array(t)}}a(Z$o,"toBuffer");wvn.exports={SendQueue:PHt}});var Ovn=T((PQu,Mvn)=>{"use strict";f();var{isArrayBuffer:eVo}=require("node:util/types"),{webidl:jn}=Pm(),{URLSerializer:tVo}=oS(),{environmentSettingsObject:Pvn}=mv(),{staticPropertyDescriptors:M9,states:pO,sentCloseFrameState:kHt,sendHints:Fze,opcodes:DHt}=N9(),{isConnecting:rVo,isEstablished:kvn,isClosing:Dvn,isClosed:nVo,isValidSubprotocol:iVo,fireEvent:Uze,utf8Decode:oVo,toArrayBuffer:sVo,getURLRecord:aVo}=qV(),{establishWebSocketConnection:cVo,closeWebSocketConnection:lVo,failWebsocketConnection:Nvn}=Bze(),{ByteParser:uVo}=wHt(),{kEnumerableProperty:hS}=Ki(),{getGlobalDispatcher:dVo}=nze(),{ErrorEvent:fVo,CloseEvent:pVo,createFastMessageEvent:hVo}=Nze(),{SendQueue:mVo}=Rvn(),{WebsocketFrameSend:gVo}=kse(),{channels:v5}=f9();function AVo(t){return typeof t?.address=="function"?t.address():typeof t?.session?.socket?.address=="function"?t.session.socket.address():null}a(AVo,"getSocketAddress");var Ey=class t extends EventTarget{static{a(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#n="";#r="";#i;#o={onConnectionEstablished:a((e,r)=>this.#l(e,r),"onConnectionEstablished"),onMessage:a((e,r)=>this.#u(e,r),"onMessage"),onParserError:a(e=>Nvn(this.#o,null,e.message),"onParserError"),onParserDrain:a(()=>this.#f(),"onParserDrain"),onSocketData:a(e=>{this.#c.write(e)||this.#o.socket.pause()},"onSocketData"),onSocketError:a(e=>{this.#o.readyState=pO.CLOSING,v5.socketError.hasSubscribers&&v5.socketError.publish(e),this.#o.socket.destroy()},"onSocketError"),onSocketClose:a(()=>this.#p(),"onSocketClose"),onPing:a(e=>{v5.ping.hasSubscribers&&v5.ping.publish({payload:e,websocket:this})},"onPing"),onPong:a(e=>{v5.pong.hasSubscribers&&v5.pong.publish({payload:e,websocket:this})},"onPong"),readyState:pO.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#a;#s;#c;constructor(e,r=[]){super(),jn.util.markAsUncloneable(this);let n="WebSocket constructor";jn.argumentLengthCheck(arguments,1,n);let o=jn.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=jn.converters.USVString(e),r=o.protocols;let s=Pvn.settingsObject.baseUrl,c=aVo(e,s);if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(u=>u.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(u=>iVo(u)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this.#a=new URL(c.href);let l=Pvn.settingsObject;this.#o.controller=cVo(c,r,l,this.#o,o),this.#o.readyState=t.CONNECTING,this.#s="blob"}close(e=void 0,r=void 0){jn.brandCheck(this,t),e!==void 0&&(e=jn.converters["unsigned short"](e,"WebSocket.close","code",jn.attributes.Clamp)),r!==void 0&&(r=jn.converters.USVString(r)),e??=null,r??="",lVo(this.#o,e,r,!0)}send(e){jn.brandCheck(this,t);let r="WebSocket.send";if(jn.argumentLengthCheck(arguments,1,r),e=jn.converters.WebSocketSendData(e,r,"data"),rVo(this.#o.readyState))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!kvn(this.#o.readyState)||Dvn(this.#o.readyState)))if(typeof e=="string"){let n=Buffer.from(e);this.#t+=n.byteLength,this.#i.add(n,()=>{this.#t-=n.byteLength},Fze.text)}else eVo(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},Fze.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#i.add(e,()=>{this.#t-=e.byteLength},Fze.typedArray)):jn.is.Blob(e)&&(this.#t+=e.size,this.#i.add(e,()=>{this.#t-=e.size},Fze.blob))}get readyState(){return jn.brandCheck(this,t),this.#o.readyState}get bufferedAmount(){return jn.brandCheck(this,t),this.#t}get url(){return jn.brandCheck(this,t),tVo(this.#a)}get extensions(){return jn.brandCheck(this,t),this.#r}get protocol(){return jn.brandCheck(this,t),this.#n}get onopen(){return jn.brandCheck(this,t),this.#e.open}set onopen(e){jn.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onerror(){return jn.brandCheck(this,t),this.#e.error}set onerror(e){jn.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}get onclose(){return jn.brandCheck(this,t),this.#e.close}set onclose(e){jn.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("close",r),this.#e.close=e):this.#e.close=null}get onmessage(){return jn.brandCheck(this,t),this.#e.message}set onmessage(e){jn.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message);let r=jn.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get binaryType(){return jn.brandCheck(this,t),this.#s}set binaryType(e){jn.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this.#s="blob":this.#s=e}#l(e,r){this.#o.socket=e.socket;let n=new uVo(this.#o,r);n.on("drain",()=>this.#o.onParserDrain()),n.on("error",c=>this.#o.onParserError(c)),this.#c=n,this.#i=new mVo(e.socket),this.#o.readyState=pO.OPEN;let o=e.headersList.get("sec-websocket-extensions");o!==null&&(this.#r=o);let s=e.headersList.get("sec-websocket-protocol");if(s!==null&&(this.#n=s),Uze("open",this),v5.open.hasSubscribers){let c=e.headersList.entries;v5.open.publish({address:AVo(e.socket),protocol:this.#n,extensions:this.#r,websocket:this,handshakeResponse:{status:e.status,statusText:e.statusText,headers:c}})}}#u(e,r){if(this.#o.readyState!==pO.OPEN)return;let n;if(e===DHt.TEXT)try{n=oVo(r)}catch{Nvn(this.#o,1007,"Received invalid UTF-8 in text frame.");return}else e===DHt.BINARY&&(this.#s==="blob"?n=new Blob([r]):n=sVo(r));Uze("message",this,hVo,{origin:this.#a.origin,data:n})}#f(){this.#o.socket.resume()}#p(){let e=this.#o.closeState.has(kHt.SENT)&&this.#o.closeState.has(kHt.RECEIVED),r=1005,n="",o=this.#c?.closingInfo;o&&!o.error&&(r=o.code??1005,n=o.reason),this.#o.readyState=pO.CLOSED,this.#o.closeState.has(kHt.RECEIVED)||(r=1006,Uze("error",this,(s,c)=>new fVo(s,c),{error:new TypeError(n)})),Uze("close",this,(s,c)=>new pVo(s,c),{wasClean:e,code:r,reason:n}),v5.close.hasSubscribers&&v5.close.publish({websocket:this,code:r,reason:n})}static ping(e,r){if(Buffer.isBuffer(r)){if(r.length>125)throw new TypeError("A PING frame cannot have a body larger than 125 bytes.")}else if(r!==void 0)throw new TypeError("Expected buffer payload");let n=e.#o.readyState;if(kvn(n)&&!Dvn(n)&&!nVo(n)){let o=new gVo(r);e.#o.socket.write(o.createFrame(DHt.PING))}}},{ping:yVo}=Ey;Reflect.deleteProperty(Ey,"ping");Ey.CONNECTING=Ey.prototype.CONNECTING=pO.CONNECTING;Ey.OPEN=Ey.prototype.OPEN=pO.OPEN;Ey.CLOSING=Ey.prototype.CLOSING=pO.CLOSING;Ey.CLOSED=Ey.prototype.CLOSED=pO.CLOSED;Object.defineProperties(Ey.prototype,{CONNECTING:M9,OPEN:M9,CLOSING:M9,CLOSED:M9,url:hS,readyState:hS,bufferedAmount:hS,onopen:hS,onerror:hS,onclose:hS,close:hS,onmessage:hS,binaryType:hS,send:hS,extensions:hS,protocol:hS,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Ey,{CONNECTING:M9,OPEN:M9,CLOSING:M9,CLOSED:M9});jn.converters["sequence"]=jn.sequenceConverter(jn.converters.DOMString);jn.converters["DOMString or sequence"]=function(t,e,r){return jn.util.Type(t)===jn.util.Types.OBJECT&&Symbol.iterator in t?jn.converters["sequence"](t):jn.converters.DOMString(t,e,r)};jn.converters.WebSocketInit=jn.dictionaryConverter([{key:"protocols",converter:jn.converters["DOMString or sequence"],defaultValue:a(()=>[],"defaultValue")},{key:"dispatcher",converter:jn.converters.any,defaultValue:a(()=>dVo(),"defaultValue")},{key:"headers",converter:jn.nullableConverter(jn.converters.HeadersInit)}]);jn.converters["DOMString or sequence or WebSocketInit"]=function(t){return jn.util.Type(t)===jn.util.Types.OBJECT&&!(Symbol.iterator in t)?jn.converters.WebSocketInit(t):{protocols:jn.converters["DOMString or sequence"](t)}};jn.converters.WebSocketSendData=function(t){return jn.util.Type(t)===jn.util.Types.OBJECT&&(jn.is.Blob(t)||jn.is.BufferSource(t))?t:jn.converters.USVString(t)};Mvn.exports={WebSocket:Ey,ping:yVo}});var NHt=T((NQu,Fvn)=>{"use strict";f();var{webidl:Qze}=Pm(),{validateCloseCodeAndReason:EVo}=qV(),{kConstruct:Bvn}=rc(),{kEnumerableProperty:Lvn}=Ki();function _Vo(){class t extends DOMException{static{a(this,"Test")}get reason(){return""}}return new t().reason!==void 0?DOMException:new Proxy(DOMException,{construct(e,r,n){let o=Reflect.construct(e,r,e);return Object.setPrototypeOf(o,n.prototype),o}})}a(_Vo,"createInheritableDOMException");var HV=class t extends _Vo(){static{a(this,"WebSocketError")}#e;#t;constructor(e="",r=void 0){if(e=Qze.converters.DOMString(e,"WebSocketError","message"),super(e,"WebSocketError"),r===Bvn)return;r!==null&&(r=Qze.converters.WebSocketCloseInfo(r));let n=r.closeCode??null,o=r.reason??"";EVo(n,o),o.length!==0&&n===null&&(n=1e3),this.#e=n,this.#t=o}get closeCode(){return this.#e}get reason(){return this.#t}static createUnvalidatedWebSocketError(e,r,n){let o=new t(e,Bvn);return o.#e=r,o.#t=n,o}},{createUnvalidatedWebSocketError:CVo}=HV;delete HV.createUnvalidatedWebSocketError;Object.defineProperties(HV.prototype,{closeCode:Lvn,reason:Lvn,[Symbol.toStringTag]:{value:"WebSocketError",writable:!1,enumerable:!1,configurable:!0}});Qze.is.WebSocketError=Qze.util.MakeTypeAssertion(HV);Fvn.exports={WebSocketError:HV,createUnvalidatedWebSocketError:CVo}});var Hvn=T((BQu,Gvn)=>{"use strict";f();var{createDeferredPromise:MHt}=j1e(),{environmentSettingsObject:Uvn}=mv(),{states:Nse,opcodes:qze,sentCloseFrameState:Mse}=N9(),{webidl:Fd}=Pm(),{getURLRecord:vVo,isValidSubprotocol:bVo,isEstablished:TVo,utf8Decode:SVo}=qV(),{establishWebSocketConnection:IVo,failWebsocketConnection:OHt,closeWebSocketConnection:BHt}=Bze(),{channels:Qvn}=f9(),{WebsocketFrameSend:xVo}=kse(),{ByteParser:wVo}=wHt(),{WebSocketError:RVo,createUnvalidatedWebSocketError:PVo}=NHt(),{kEnumerableProperty:Gze}=Ki(),{utf8DecodeBytes:kVo}=uWe(),qvn=!1,Hze=class{static{a(this,"WebSocketStream")}#e;#t;#n;#r;#i;#o;#a=!1;#s={onConnectionEstablished:a((e,r)=>this.#u(e,r),"onConnectionEstablished"),onMessage:a((e,r)=>this.#f(e,r),"onMessage"),onParserError:a(e=>OHt(this.#s,null,e.message),"onParserError"),onParserDrain:a(()=>this.#s.socket.resume(),"onParserDrain"),onSocketData:a(e=>{this.#c.write(e)||this.#s.socket.pause()},"onSocketData"),onSocketError:a(e=>{this.#s.readyState=Nse.CLOSING,Qvn.socketError.hasSubscribers&&Qvn.socketError.publish(e),this.#s.socket.destroy()},"onSocketError"),onSocketClose:a(()=>this.#p(),"onSocketClose"),onPing:a(()=>{},"onPing"),onPong:a(()=>{},"onPong"),readyState:Nse.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#c;constructor(e,r=void 0){qvn||(process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.",{code:"UNDICI-WSS"}),qvn=!0),Fd.argumentLengthCheck(arguments,1,"WebSocket"),e=Fd.converters.USVString(e),r!==null&&(r=Fd.converters.WebSocketStreamOptions(r));let n=Uvn.settingsObject.baseUrl,o=vVo(e,n),s=r.protocols;if(s.length!==new Set(s.map(l=>l.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(s.length>0&&!s.every(l=>bVo(l)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(this.#e=o.toString(),this.#t=MHt(),this.#n=MHt(),r.signal!=null){let l=r.signal;if(l.aborted){this.#t.reject(l.reason),this.#n.reject(l.reason);return}l.addEventListener("abort",()=>{TVo(this.#s.readyState)||(OHt(this.#s),this.#s.readyState=Nse.CLOSING,this.#t.reject(l.reason),this.#n.reject(l.reason),this.#a=!0)},{once:!0})}let c=Uvn.settingsObject;this.#s.controller=IVo(o,s,c,this.#s,r)}get url(){return this.#e.toString()}get opened(){return this.#t.promise}get closed(){return this.#n.promise}close(e=void 0){e!==null&&(e=Fd.converters.WebSocketCloseInfo(e));let r=e.closeCode??null,n=e.reason;BHt(this.#s,r,n,!0)}#l(e){e=Fd.converters.WebSocketStreamWrite(e);let r=MHt(),n=null,o=null;if(Fd.is.BufferSource(e))n=new Uint8Array(ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e.slice()),o=qze.BINARY;else{let s;try{s=Fd.converters.DOMString(e)}catch(c){return r.reject(c),r.promise}n=new TextEncoder().encode(s),o=qze.TEXT}if(!this.#s.closeState.has(Mse.SENT)&&!this.#s.closeState.has(Mse.RECEIVED)){let s=new xVo(n);this.#s.socket.write(s.createFrame(o),()=>{r.resolve(void 0)})}return r.promise}#u(e,r){this.#s.socket=e.socket;let n=new wVo(this.#s,r);n.on("drain",()=>this.#s.onParserDrain()),n.on("error",u=>this.#s.onParserError(u)),this.#c=n,this.#s.readyState=Nse.OPEN;let o=r??"",s=e.headersList.get("sec-websocket-protocol")??"",c=new ReadableStream({start:a(u=>{this.#i=u},"start"),pull(u){let d;for(;u.desiredSize>0&&(d=e.socket.read())!==null;)u.enqueue(d)},cancel:a(u=>this.#m(u),"cancel")}),l=new WritableStream({write:a(u=>this.#l(u),"write"),close:a(()=>BHt(this.#s,null,null),"close"),abort:a(u=>this.#h(u),"abort")});this.#r=c,this.#o=l,this.#t.resolve({extensions:o,protocol:s,readable:c,writable:l})}#f(e,r){if(this.#s.readyState!==Nse.OPEN)return;let n;if(e===qze.TEXT)try{n=SVo(r)}catch{OHt(this.#s,"Received invalid UTF-8 in text frame.");return}else e===qze.BINARY&&(n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength));this.#i.enqueue(n)}#p(){let e=this.#s.closeState.has(Mse.SENT)&&this.#s.closeState.has(Mse.RECEIVED);if(this.#s.readyState=Nse.CLOSED,this.#a)return;this.#s.wasEverConnected||this.#t.reject(new RVo("Socket never opened"));let r=this.#c?.closingInfo,n=r?.code??1005;!this.#s.closeState.has(Mse.SENT)&&!this.#s.closeState.has(Mse.RECEIVED)&&(n=1006);let o=r?.reason==null?"":kVo(Buffer.from(r.reason));if(e)this.#i.close(),this.#o.locked||this.#o.abort(new DOMException("A closed WebSocketStream cannot be written to","InvalidStateError")),this.#n.resolve({closeCode:n,reason:o});else{let s=PVo("unclean close",n,o);this.#i?.error(s),this.#o?.abort(s),this.#n.reject(s)}}#h(e){let r=null,n="";Fd.is.WebSocketError(e)&&(r=e.closeCode,n=e.reason),BHt(this.#s,r,n)}#m(e){this.#h(e)}};Object.defineProperties(Hze.prototype,{url:Gze,opened:Gze,closed:Gze,close:Gze,[Symbol.toStringTag]:{value:"WebSocketStream",writable:!1,enumerable:!1,configurable:!0}});Fd.converters.WebSocketStreamOptions=Fd.dictionaryConverter([{key:"protocols",converter:Fd.sequenceConverter(Fd.converters.USVString),defaultValue:a(()=>[],"defaultValue")},{key:"signal",converter:Fd.nullableConverter(Fd.converters.AbortSignal),defaultValue:a(()=>null,"defaultValue")}]);Fd.converters.WebSocketCloseInfo=Fd.dictionaryConverter([{key:"closeCode",converter:a(t=>Fd.converters["unsigned short"](t,Fd.attributes.EnforceRange),"converter")},{key:"reason",converter:Fd.converters.USVString,defaultValue:a(()=>"","defaultValue")}]);Fd.converters.WebSocketStreamWrite=function(t){return typeof t=="string"?Fd.converters.USVString(t):Fd.converters.BufferSource(t)};Gvn.exports={WebSocketStream:Hze}});var $vn=T((UQu,jvn)=>{"use strict";f();function DVo(t){return t.indexOf("\0")===-1}a(DVo,"isValidLastEventId");function NVo(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}a(NVo,"isASCIINumber");jvn.exports={isValidLastEventId:DVo,isASCIINumber:NVo}});var Yvn=T((GQu,zvn)=>{"use strict";f();var{Transform:MVo}=require("node:stream"),{isASCIINumber:Vvn,isValidLastEventId:Wvn}=$vn(),hO=[239,187,191],LHt=10,jze=13,OVo=58,BVo=32,FHt=class extends MVo{static{a(this,"EventSourceStream")}state;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===hO[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===hO[0]&&this.buffer[1]===hO[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===hO[0]&&this.buffer[1]===hO[1]&&this.buffer[2]===hO[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===hO[0]&&this.buffer[1]===hO[1]&&this.buffer[2]===hO[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[o]=s);break}}processEvent(e){e.retry&&Vvn(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&Wvn(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};zvn.exports={EventSourceStream:FHt}});var nbn=T(($Qu,rbn)=>{"use strict";f();var{pipeline:LVo}=require("node:stream"),{fetching:FVo}=kve(),{makeRequest:UVo}=Sse(),{webidl:_y}=Pm(),{EventSourceStream:QVo}=Yvn(),{parseMIMEType:qVo}=oS(),{createFastMessageEvent:GVo}=Nze(),{isNetworkError:Kvn}=wve(),{kEnumerableProperty:jV}=Ki(),{environmentSettingsObject:Jvn}=mv(),Xvn=!1,Zvn=3e3,Fve=0,ebn=1,Uve=2,HVo="anonymous",jVo="use-credentials",Ose=class t extends EventTarget{static{a(this,"EventSource")}#e={open:null,error:null,message:null};#t;#n=!1;#r=Fve;#i=null;#o=null;#a;#s;constructor(e,r={}){super(),_y.util.markAsUncloneable(this);let n="EventSource constructor";_y.argumentLengthCheck(arguments,1,n),Xvn||(Xvn=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=_y.converters.USVString(e),r=_y.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#s={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let o=Jvn,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#s.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let c=HVo;r.withCredentials===!0&&(c=jVo,this.#n=!0);let l={redirect:"follow",keepalive:!0,mode:"cors",credentials:c==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};l.client=Jvn.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#t)],this.#i=UVo(l),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===Uve)return;this.#r=Fve;let e={request:this.#i,dispatcher:this.#a},r=a(n=>{if(!Kvn(n))return this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(Kvn(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let o=n.headersList.get("content-type",!0),s=o!==null?qVo(o):"failure",c=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||c===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=ebn,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let l=new QVo({eventSourceSettings:this.#s,push:a(u=>{this.dispatchEvent(GVo(u.type,u.options))},"push")});LVo(n.body.stream,l,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=FVo(e)}#l(){this.#r!==Uve&&(this.#r=Fve,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#r===Fve&&(this.#s.lastEventId.length&&this.#i.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#c())},this.#s.reconnectionTime)?.unref())}close(){_y.brandCheck(this,t),this.#r!==Uve&&(this.#r=Uve,this.#o.abort(),this.#i=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=_y.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=_y.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=_y.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},tbn={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Fve,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:ebn,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Uve,writable:!1}};Object.defineProperties(Ose,tbn);Object.defineProperties(Ose.prototype,tbn);Object.defineProperties(Ose.prototype,{close:jV,onerror:jV,onmessage:jV,onopen:jV,readyState:jV,url:jV,withCredentials:jV});_y.converters.EventSourceInitDict=_y.dictionaryConverter([{key:"withCredentials",converter:_y.converters.boolean,defaultValue:a(()=>!1,"defaultValue")},{key:"dispatcher",converter:_y.converters.any},{key:"node",converter:_y.dictionaryConverter([{key:"reconnectionTime",converter:_y.converters["unsigned long"],defaultValue:a(()=>Zvn,"defaultValue")},{key:"dispatcher",converter:_y.converters.any}]),defaultValue:a(()=>({}),"defaultValue")}]);rbn.exports={EventSource:Ose,defaultReconnectionTime:Zvn}});var lbn=T((zQu,rn)=>{"use strict";f();var $Vo=v9(),obn=L1e(),VVo=vV(),WVo=oyn(),zVo=lyn(),YVo=SV(),KVo=kqt(),JVo=xqt(),XVo=Vyn(),ZVo=Xyn(),eWo=tEn(),sbn=Ni(),Vze=Ki(),{InvalidArgumentError:$ze}=sbn,Bse=BEn(),tWo=mV(),rWo=gGt(),{MockCallHistory:nWo,MockCallHistoryLog:iWo}=EGt(),oWo=wGt(),sWo=bGt(),aWo=O_n(),cWo=Zqt(),lWo=GWe(),{getGlobalDispatcher:abn,setGlobalDispatcher:uWo}=nze(),dWo=_se(),fWo=BGt();Object.assign(obn.prototype,Bse);rn.exports.Dispatcher=obn;rn.exports.Client=$Vo;rn.exports.Pool=VVo;rn.exports.BalancedPool=WVo;rn.exports.RoundRobinPool=zVo;rn.exports.Agent=YVo;rn.exports.ProxyAgent=KVo;rn.exports.Socks5ProxyAgent=JVo;rn.exports.EnvHttpProxyAgent=XVo;rn.exports.RetryAgent=ZVo;rn.exports.H2CClient=eWo;rn.exports.RetryHandler=lWo;rn.exports.DecoratorHandler=dWo;rn.exports.RedirectHandler=fWo;rn.exports.interceptors={redirect:V_n(),responseError:z_n(),retry:K_n(),dump:X_n(),dns:rCn(),cache:ECn(),decompress:TCn(),deduplicate:RCn()};rn.exports.cacheStores={MemoryCacheStore:$Gt()};var pWo=DCn();rn.exports.cacheStores.SqliteCacheStore=pWo;rn.exports.buildConnector=tWo;rn.exports.errors=sbn;rn.exports.util={parseHeaders:Vze.parseHeaders,headerNameToString:Vze.headerNameToString};function Qve(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new $ze("invalid url");if(r!=null&&typeof r!="object")throw new $ze("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new $ze("invalid opts.path");let c=r.path;r.path.startsWith("/")||(c=`/${c}`),e=new URL(Vze.parseOrigin(e).origin+c)}else r||(r=typeof e=="object"?e:{}),e=Vze.parseURL(e);let{agent:o,dispatcher:s=abn()}=r;if(o)throw new $ze("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}a(Qve,"makeDispatcher");rn.exports.setGlobalDispatcher=uWo;rn.exports.getGlobalDispatcher=abn;var hWo=kve().fetch,ibn=typeof __filename<"u"?__filename:void 0;function cbn(t,e){if(!t||typeof t!="object")return;let r=typeof t.stack=="string"?t.stack:"",n=e.replace(/\\/g,"/");if(r&&(r.includes(e)||r.includes(n)))return;let o={};if(Error.captureStackTrace(o,cbn),!o.stack)return;let s=o.stack.split(` `).slice(1).join(` `);t.stack=r?`${r} -${s}`:o.stack}a(lvn,"appendFetchStackTrace");rn.exports.fetch=a(function(e,r=void 0){return p$o(e,r).catch(n=>{throw ovn?lvn(n,ovn):n&&typeof n=="object"&&Error.captureStackTrace(n,rn.exports.fetch),n})},"fetch");rn.exports.Headers=RW().Headers;rn.exports.Response=kbe().Response;rn.exports.Request=dae().Request;rn.exports.FormData=cze().FormData;var{setGlobalOrigin:h$o,getGlobalOrigin:m$o}=YUt();rn.exports.setGlobalOrigin=h$o;rn.exports.getGlobalOrigin=m$o;var{CacheStorage:g$o}=H_n(),{kConstruct:A$o}=ac();rn.exports.caches=new g$o(A$o);var{deleteCookie:y$o,getCookies:E$o,getSetCookies:C$o,setCookie:_$o,parseCookie:v$o}=r1n();rn.exports.deleteCookie=y$o;rn.exports.getCookies=E$o;rn.exports.getSetCookies=C$o;rn.exports.setCookie=_$o;rn.exports.parseCookie=v$o;var{parseMIMEType:b$o,serializeAMimeType:T$o}=AS();rn.exports.parseMIMEType=b$o;rn.exports.serializeAMimeType=T$o;var{CloseEvent:S$o,ErrorEvent:I$o,MessageEvent:x$o}=SYe(),{WebSocket:w$o,ping:R$o}=B1n();rn.exports.WebSocket=w$o;rn.exports.CloseEvent=S$o;rn.exports.ErrorEvent=I$o;rn.exports.MessageEvent=x$o;rn.exports.ping=R$o;rn.exports.WebSocketStream=j1n().WebSocketStream;rn.exports.WebSocketError=pHt().WebSocketError;rn.exports.request=Hbe(vae.request);rn.exports.stream=Hbe(vae.stream);rn.exports.pipeline=Hbe(vae.pipeline);rn.exports.connect=Hbe(vae.connect);rn.exports.upgrade=Hbe(vae.upgrade);rn.exports.MockClient=t$o;rn.exports.MockCallHistory=r$o;rn.exports.MockCallHistoryLog=n$o;rn.exports.MockPool=o$o;rn.exports.MockAgent=i$o;rn.exports.SnapshotAgent=s$o;rn.exports.mockErrors=a$o;var{EventSource:P$o}=ivn();rn.exports.EventSource=P$o;function k$o(){globalThis.fetch=rn.exports.fetch,globalThis.Headers=rn.exports.Headers,globalThis.Response=rn.exports.Response,globalThis.Request=rn.exports.Request,globalThis.FormData=rn.exports.FormData,globalThis.WebSocket=rn.exports.WebSocket,globalThis.CloseEvent=rn.exports.CloseEvent,globalThis.ErrorEvent=rn.exports.ErrorEvent,globalThis.MessageEvent=rn.exports.MessageEvent,globalThis.EventSource=rn.exports.EventSource}a(k$o,"install");rn.exports.install=k$o});var Fv=T(UW=>{"use strict";f();Object.defineProperty(UW,"__esModule",{value:!0});UW.DebugNameData=void 0;UW.getDebugName=lbn;UW.getClassName=ubn;UW.getFunctionName=dbn;var XHt=class{static{a(this,"DebugNameData")}constructor(e,r,n){this.owner=e,this.debugNameSource=r,this.referenceFn=n}getDebugName(e){return lbn(e,this)}};UW.DebugNameData=XHt;var sbn=new Map,ZHt=new WeakMap;function lbn(t,e){let r=ZHt.get(t);if(r)return r;let n=LVo(t,e);if(n){let o=sbn.get(n)??0;o++,sbn.set(n,o);let s=o===1?n:`${n}#${o}`;return ZHt.set(t,s),s}}a(lbn,"getDebugName");function LVo(t,e){let r=ZHt.get(t);if(r)return r;let n=e.owner?UVo(e.owner)+".":"",o,s=e.debugNameSource;if(s!==void 0)if(typeof s=="function"){if(o=s(),o!==void 0)return n+o}else return n+s;let c=e.referenceFn;if(c!==void 0&&(o=dbn(c),o!==void 0))return n+o;if(e.owner!==void 0){let l=FVo(e.owner,t);if(l!==void 0)return n+l}}a(LVo,"computeDebugName");function FVo(t,e){for(let r in t)if(t[r]===e)return r}a(FVo,"findKey");var abn=new Map,cbn=new WeakMap;function UVo(t){let e=cbn.get(t);if(e)return e;let r=ubn(t)??"Object",n=abn.get(r)??0;n++,abn.set(r,n);let o=n===1?r:`${r}#${n}`;return cbn.set(t,o),o}a(UVo,"formatOwner");function ubn(t){let e=t.constructor;if(e)return e.name==="Object"?void 0:e.name}a(ubn,"getClassName");function dbn(t){let e=t.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e);return(n?n[1]:void 0)?.trim()}a(dbn,"getFunctionName")});var Tbn=T(Kd=>{"use strict";f();var QVo=Kd&&Kd.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qVo=Kd&&Kd.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GVo=Kd&&Kd.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ot===e}a(mbn,"strictEqualsC");function gbn(t,e,r){return hbn.equals(t,e,r??mKe)}a(gbn,"arrayEquals");function Abn(t){return(e,r)=>hbn.equals(e,r,t??mKe)}a(Abn,"arrayEqualsC");function tTe(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0;rtTe(t,e)}a(ybn,"structuralEqualsC");function HVo(t){return JSON.stringify(ejt(t))}a(HVo,"getStructuralKey");var jVo=0,fbn=new WeakMap;function ejt(t){if(Array.isArray(t))return t.map(ejt);if(t&&typeof t=="object")if(Object.getPrototypeOf(t)===Object.prototype){let e=t,r=Object.create(null);for(let n of Object.keys(e).sort())r[n]=ejt(e[n]);return r}else{let e=fbn.get(t);return e===void 0&&(e=jVo++,fbn.set(t,e)),e+"----2b76a038c20c4bcc"}return t}a(ejt,"toNormalizedJsonStructure");function Ebn(t,e){return JSON.stringify(t)===JSON.stringify(e)}a(Ebn,"jsonStringifyEquals");function Cbn(){return(t,e)=>JSON.stringify(t)===JSON.stringify(e)}a(Cbn,"jsonStringifyEqualsC");function _bn(){return(t,e)=>t.equals(e)}a(_bn,"thisEqualsC");function vbn(t,e,r){return t==null||e===void 0||e===null?e===t:r(t,e)}a(vbn,"equalsIfDefined");function bbn(t){return(e,r)=>e==null||r===void 0||r===null?r===e:t(e,r)}a(bbn,"equalsIfDefinedC");var pbn;(function(t){t.strict=mKe,t.strictC=mbn,t.array=gbn,t.arrayC=Abn,t.structural=tTe,t.structuralC=ybn,t.jsonStringify=Ebn,t.jsonStringifyC=Cbn,t.thisC=_bn,t.ifDefined=vbn,t.ifDefinedC=bbn})(pbn||(Kd.equals=pbn={}))});var Py=T(Jd=>{"use strict";f();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.trackDisposable=Jd.toDisposable=Jd.markAsDisposed=Jd.DisposableStore=Jd.Event=Jd.onUnexpectedError=Jd.onBugIndicatingError=Jd.BugIndicatingError=Jd.strictEquals=Jd.assertFn=void 0;var $Vo=Jl();Object.defineProperty(Jd,"assertFn",{enumerable:!0,get:a(function(){return $Vo.assertFn},"get")});var VVo=Tbn();Object.defineProperty(Jd,"strictEquals",{enumerable:!0,get:a(function(){return VVo.strictEquals},"get")});var tjt=es();Object.defineProperty(Jd,"BugIndicatingError",{enumerable:!0,get:a(function(){return tjt.BugIndicatingError},"get")});Object.defineProperty(Jd,"onBugIndicatingError",{enumerable:!0,get:a(function(){return tjt.onBugIndicatingError},"get")});Object.defineProperty(Jd,"onUnexpectedError",{enumerable:!0,get:a(function(){return tjt.onUnexpectedError},"get")});var WVo=nc();Object.defineProperty(Jd,"Event",{enumerable:!0,get:a(function(){return WVo.Event},"get")});var gKe=so();Object.defineProperty(Jd,"DisposableStore",{enumerable:!0,get:a(function(){return gKe.DisposableStore},"get")});Object.defineProperty(Jd,"markAsDisposed",{enumerable:!0,get:a(function(){return gKe.markAsDisposed},"get")});Object.defineProperty(Jd,"toDisposable",{enumerable:!0,get:a(function(){return gKe.toDisposable},"get")});Object.defineProperty(Jd,"trackDisposable",{enumerable:!0,get:a(function(){return gKe.trackDisposable},"get")})});var Sbn=T(rjt=>{"use strict";f();Object.defineProperty(rjt,"__esModule",{value:!0});rjt.handleBugIndicatingErrorRecovery=YVo;var zVo=Py();function YVo(t){let e=new Error("BugIndicatingErrorRecovery: "+t);(0,zVo.onUnexpectedError)(e),console.error("recovered from an error that indicates a bug",e)}a(YVo,"handleBugIndicatingErrorRecovery")});var UN=T(Pae=>{"use strict";f();Object.defineProperty(Pae,"__esModule",{value:!0});Pae.addLogger=KVo;Pae.getLogger=JVo;Pae.setLogObservableFn=XVo;Pae.logObservable=ZVo;var QW;function KVo(t){QW?QW instanceof AKe?QW.loggers.push(t):QW=new AKe([QW,t]):QW=t}a(KVo,"addLogger");function JVo(){return QW}a(JVo,"getLogger");var njt;function XVo(t){njt=t}a(XVo,"setLogObservableFn");function ZVo(t){njt&&njt(t)}a(ZVo,"logObservable");var AKe=class{static{a(this,"ComposedLogger")}constructor(e){this.loggers=e}handleObservableCreated(e,r){for(let n of this.loggers)n.handleObservableCreated(e,r)}handleOnListenerCountChanged(e,r){for(let n of this.loggers)n.handleOnListenerCountChanged(e,r)}handleObservableUpdated(e,r){for(let n of this.loggers)n.handleObservableUpdated(e,r)}handleAutorunCreated(e,r){for(let n of this.loggers)n.handleAutorunCreated(e,r)}handleAutorunDisposed(e){for(let r of this.loggers)r.handleAutorunDisposed(e)}handleAutorunDependencyChanged(e,r,n){for(let o of this.loggers)o.handleAutorunDependencyChanged(e,r,n)}handleAutorunStarted(e){for(let r of this.loggers)r.handleAutorunStarted(e)}handleAutorunFinished(e){for(let r of this.loggers)r.handleAutorunFinished(e)}handleDerivedDependencyChanged(e,r,n){for(let o of this.loggers)o.handleDerivedDependencyChanged(e,r,n)}handleDerivedCleared(e){for(let r of this.loggers)r.handleDerivedCleared(e)}handleBeginTransaction(e){for(let r of this.loggers)r.handleBeginTransaction(e)}handleEndTransaction(e){for(let r of this.loggers)r.handleEndTransaction(e)}}});var f7=T(d7=>{"use strict";f();Object.defineProperty(d7,"__esModule",{value:!0});d7.TransactionImpl=void 0;d7.transaction=ijt;d7.globalTransaction=tWo;d7.asyncTransaction=rWo;d7.subtransaction=nWo;var Ibn=Sbn(),eWo=Fv(),xbn=UN();function ijt(t,e){let r=new kae(t,e);try{t(r)}finally{r.finish()}}a(ijt,"transaction");var yKe;function tWo(t){if(yKe)t(yKe);else{let e=new kae(t,void 0);yKe=e;try{t(e)}finally{e.finish(),yKe=void 0}}}a(tWo,"globalTransaction");async function rWo(t,e){let r=new kae(t,e);try{await t(r)}finally{r.finish()}}a(rWo,"asyncTransaction");function nWo(t,e,r){t?e(t):ijt(e,r)}a(nWo,"subtransaction");var kae=class{static{a(this,"TransactionImpl")}constructor(e,r){this._fn=e,this._getDebugName=r,this._updatingObservers=[],(0,xbn.getLogger)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,eWo.getFunctionName)(this._fn)}updateObserver(e,r){if(!this._updatingObservers){(0,Ibn.handleBugIndicatingErrorRecovery)("Transaction already finished!"),ijt(n=>{n.updateObserver(e,r)});return}this._updatingObservers.push({observer:e,observable:r}),e.beginUpdate(r)}finish(){let e=this._updatingObservers;if(!e){(0,Ibn.handleBugIndicatingErrorRecovery)("transaction.finish() has already been called!");return}for(let r=0;r{"use strict";f();Object.defineProperty(EKe,"__esModule",{value:!0});EKe.DebugLocation=void 0;var wbn;(function(t){let e=!1;function r(){e=!0}a(r,"enable"),t.enable=r;function n(){if(!e)return;let o=Error,s=o.stackTraceLimit;o.stackTraceLimit=3;let c=new Error().stack;return o.stackTraceLimit=s,ojt.fromStack(c,2)}a(n,"ofCaller"),t.ofCaller=n})(wbn||(EKe.DebugLocation=wbn={}));var ojt=class t{static{a(this,"DebugLocationImpl")}static fromStack(e,r){let n=e.split(` -`),o=iWo(n[r+1]);if(o)return new t(o.fileName,o.line,o.column,o.id)}constructor(e,r,n,o){this.fileName=e,this.line=r,this.column=n,this.id=o}};function iWo(t){let e=t.match(/\((.*):(\d+):(\d+)\)/);if(e)return{fileName:e[1],line:parseInt(e[2]),column:parseInt(e[3]),id:t};let r=t.match(/at ([^\(\)]*):(\d+):(\d+)/);if(r)return{fileName:r[1],line:parseInt(r[2]),column:parseInt(r[3]),id:t}}a(iWo,"parseLine")});var Fw=T(QN=>{"use strict";f();Object.defineProperty(QN,"__esModule",{value:!0});QN.BaseObservable=QN.ConvenientObservable=void 0;QN._setDerivedOpts=sWo;QN._setRecomputeInitiallyAndOnChange=aWo;QN._setKeepObserved=cWo;QN._setDebugGetObservableGraph=lWo;var Rbn=Uv(),oWo=Fv(),Nae=UN(),sjt;function sWo(t){sjt=t}a(sWo,"_setDerivedOpts");var Pbn;function aWo(t){Pbn=t}a(aWo,"_setRecomputeInitiallyAndOnChange");var kbn;function cWo(t){kbn=t}a(cWo,"_setKeepObserved");var ajt;function lWo(t){ajt=t}a(lWo,"_setDebugGetObservableGraph");var CKe=class{static{a(this,"ConvenientObservable")}get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,r,n=Rbn.DebugLocation.ofCaller()){let o=r===void 0?void 0:e,s=r===void 0?e:r;return sjt({owner:o,debugName:a(()=>{let c=(0,oWo.getFunctionName)(s);if(c!==void 0)return c;let u=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(u)return`${this.debugName}.${u[2]}`;if(!o)return`${this.debugName} (mapped)`},"debugName"),debugReferenceFn:s},c=>s(this.read(c),c),n)}flatten(){return sjt({owner:void 0,debugName:a(()=>`${this.debugName} (flattened)`,"debugName")},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,r){return e.add(Pbn(this,r)),this}keepObserved(e){return e.add(kbn(this)),this}get debugValue(){return this.get()}get debug(){return new cjt(this)}};QN.ConvenientObservable=CKe;var cjt=class{static{a(this,"DebugHelper")}constructor(e){this.observable=e}getDependencyGraph(){return ajt(this.observable,{type:"dependencies"})}getObserverGraph(){return ajt(this.observable,{type:"observers"})}},ljt=class extends CKe{static{a(this,"BaseObservable")}constructor(e){super(),this._observers=new Set,(0,Nae.getLogger)()?.handleObservableCreated(this,e)}addObserver(e){let r=this._observers.size;this._observers.add(e),r===0&&this.onFirstObserverAdded(),r!==this._observers.size&&(0,Nae.getLogger)()?.handleOnListenerCountChanged(this,this._observers.size)}removeObserver(e){let r=this._observers.delete(e);r&&this._observers.size===0&&this.onLastObserverRemoved(),r&&(0,Nae.getLogger)()?.handleOnListenerCountChanged(this,this._observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}log(){let e=!!(0,Nae.getLogger)();return(0,Nae.logObservable)(this),e||(0,Nae.getLogger)()?.handleObservableCreated(this,Rbn.DebugLocation.ofCaller()),this}debugGetObservers(){return this._observers}};QN.BaseObservable=ljt});var h7=T(p7=>{"use strict";f();Object.defineProperty(p7,"__esModule",{value:!0});p7.DisposableObservableValue=p7.ObservableValue=void 0;p7.observableValue=fWo;p7.disposableObservableValue=pWo;var uWo=f7(),dWo=Fw(),Dbn=Py(),_Ke=Fv(),Nbn=UN(),Mbn=Uv();function fWo(t,e,r=Mbn.DebugLocation.ofCaller()){let n;return typeof t=="string"?n=new _Ke.DebugNameData(void 0,t,void 0):n=new _Ke.DebugNameData(t,void 0,void 0),new rTe(n,e,Dbn.strictEquals,r)}a(fWo,"observableValue");var rTe=class extends dWo.BaseObservable{static{a(this,"ObservableValue")}get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,r,n,o){super(o),this._debugNameData=e,this._equalityComparator=n,this._value=r,(0,Nbn.getLogger)()?.handleObservableUpdated(this,{hadValue:!1,newValue:r,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,r,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let o;r||(r=o=new uWo.TransactionImpl(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(0,Nbn.getLogger)()?.handleObservableUpdated(this,{oldValue:s,newValue:e,change:n,didChange:!0,hadValue:!0});for(let c of this._observers)r.updateObserver(c,this),c.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}};p7.ObservableValue=rTe;function pWo(t,e,r=Mbn.DebugLocation.ofCaller()){let n;return typeof t=="string"?n=new _Ke.DebugNameData(void 0,t,void 0):n=new _Ke.DebugNameData(t,void 0,void 0),new vKe(n,e,Dbn.strictEquals,r)}a(pWo,"disposableObservableValue");var vKe=class extends rTe{static{a(this,"DisposableObservableValue")}_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}};p7.DisposableObservableValue=vKe});var Bbn=T(bKe=>{"use strict";f();Object.defineProperty(bKe,"__esModule",{value:!0});bKe.LazyObservableValue=void 0;var hWo=f7(),Obn=UN(),mWo=Fw(),ujt=class extends mWo.BaseObservable{static{a(this,"LazyObservableValue")}get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,r,n,o){super(o),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=r}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas){(0,Obn.getLogger)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let r of this._observers)r.handleChange(this,e)}this._deltas.length=0}else{(0,Obn.getLogger)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let e of this._observers)e.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();let e=[...this._observers];for(let r of e)r.endUpdate(this)}}addObserver(e){let r=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),r&&e.beginUpdate(this)}removeObserver(e){let r=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),r&&e.endUpdate(this)}set(e,r,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let o;r||(r=o=new hWo.TransactionImpl(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),r.updateObserver({beginUpdate:a(()=>this._beginUpdate(),"beginUpdate"),endUpdate:a(()=>this._endUpdate(),"endUpdate"),handleChange:a((s,c)=>{},"handleChange"),handlePossibleChange:a(s=>{},"handlePossibleChange")},this),this._updateCounter>1)for(let s of this._observers)s.handlePossibleChange(this)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};bKe.LazyObservableValue=ujt});var TKe=T(djt=>{"use strict";f();Object.defineProperty(djt,"__esModule",{value:!0});djt.observableValueOpts=EWo;var Lbn=Fv(),Fbn=Py(),gWo=h7(),AWo=Bbn(),yWo=Uv();function EWo(t,e,r=yWo.DebugLocation.ofCaller()){return t.lazy?new AWo.LazyObservableValue(new Lbn.DebugNameData(t.owner,t.debugName,void 0),e,t.equalsFn??Fbn.strictEquals,r):new gWo.ObservableValue(new Lbn.DebugNameData(t.owner,t.debugName,void 0),e,t.equalsFn??Fbn.strictEquals,r)}a(EWo,"observableValueOpts")});var IKe=T(SKe=>{"use strict";f();Object.defineProperty(SKe,"__esModule",{value:!0});SKe.AutorunObserver=void 0;var xS=Py(),nTe=UN();function CWo(t){switch(t){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return""}}a(CWo,"autorunStateToString");var fjt=class{static{a(this,"AutorunObserver")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,r,n,o){this._debugNameData=e,this._runFn=r,this._changeTracker=n,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._iteration=0,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,nTe.getLogger)()?.handleAutorunCreated(this,o),this._run(),(0,xS.trackDisposable)(this)}dispose(){if(!this._disposed){this._disposed=!0;for(let e of this._dependencies)e.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&this._store.dispose(),this._delayedStore!==void 0&&this._delayedStore.dispose(),(0,nTe.getLogger)()?.handleAutorunDisposed(this),(0,xS.markAsDisposed)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,nTe.getLogger)()?.handleAutorunStarted(this);let r=this._changeSummary,n=this._delayedStore;n!==void 0&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,r),this._changeSummary=this._changeTracker.createChangeSummary(r)),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._runFn(this,r)}catch(o){(0,xS.onBugIndicatingError)(o)}finally{this._isRunning=!1,n!==void 0&&n.dispose()}}}finally{this._disposed||(0,nTe.getLogger)()?.handleAutorunFinished(this);for(let r of this._dependenciesToBeRemoved)r.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){this._state===3&&(this._checkIterations(),this._state=1),this._updateCount++}endUpdate(e){try{if(this._updateCount===1){this._iteration=1;do{if(this._checkIterations())return;if(this._state===1){this._state=3;for(let r of this._dependencies)if(r.reportChanges(),this._state===2)break}this._iteration++,this._state!==3&&this._run()}while(this._state!==3)}}finally{this._updateCount--}(0,xS.assertFn)(()=>this._updateCount>=0)}handlePossibleChange(e){this._state===3&&this._isDependency(e)&&(this._checkIterations(),this._state=1)}handleChange(e,r){if(this._isDependency(e)){(0,nTe.getLogger)()?.handleAutorunDependencyChanged(this,e,r);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:r,didChange:a(o=>o===e,"didChange")},this._changeSummary))&&(this._checkIterations(),this._state=2)}catch(n){(0,xS.onBugIndicatingError)(n)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new xS.BugIndicatingError("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let r=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),r}get store(){if(this._ensureNoRunning(),this._disposed)throw new xS.BugIndicatingError("Cannot access store after dispose");return this._store===void 0&&(this._store=new xS.DisposableStore),this._store}get delayedStore(){if(this._ensureNoRunning(),this._disposed)throw new xS.BugIndicatingError("Cannot access store after dispose");return this._delayedStore===void 0&&(this._delayedStore=new xS.DisposableStore),this._delayedStore}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:CWo(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}_checkIterations(){return this._iteration>100?((0,xS.onBugIndicatingError)(new xS.BugIndicatingError(`Autorun '${this.debugName}' is stuck in an infinite update loop.`)),!0):!1}};SKe.AutorunObserver=fjt});var Dae=T(qN=>{"use strict";f();Object.defineProperty(qN,"__esModule",{value:!0});qN.autorun=Ubn;qN.autorunOpts=RKe;qN.autorunHandleChanges=Qbn;qN.autorunWithStoreHandleChanges=_Wo;qN.autorunWithStore=vWo;qN.autorunDelta=bWo;qN.autorunIterableDelta=TWo;qN.autorunSelfDisposable=SWo;var xKe=Py(),pjt=Fv(),hjt=IKe(),wKe=Uv();function Ubn(t,e=wKe.DebugLocation.ofCaller()){return new hjt.AutorunObserver(new pjt.DebugNameData(void 0,void 0,t),t,void 0,e)}a(Ubn,"autorun");function RKe(t,e,r=wKe.DebugLocation.ofCaller()){return new hjt.AutorunObserver(new pjt.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??e),e,void 0,r)}a(RKe,"autorunOpts");function Qbn(t,e,r=wKe.DebugLocation.ofCaller()){return new hjt.AutorunObserver(new pjt.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??e),e,t.changeTracker,r)}a(Qbn,"autorunHandleChanges");function _Wo(t,e){let r=new xKe.DisposableStore,n=Qbn({owner:t.owner,debugName:t.debugName,debugReferenceFn:t.debugReferenceFn??e,changeTracker:t.changeTracker},(o,s)=>{r.clear(),e(o,s,r)});return(0,xKe.toDisposable)(()=>{n.dispose(),r.dispose()})}a(_Wo,"autorunWithStoreHandleChanges");function vWo(t){let e=new xKe.DisposableStore,r=RKe({owner:void 0,debugName:void 0,debugReferenceFn:t},n=>{e.clear(),t(n,e)});return(0,xKe.toDisposable)(()=>{r.dispose(),e.dispose()})}a(vWo,"autorunWithStore");function bWo(t,e){let r;return RKe({debugReferenceFn:e},n=>{let o=t.read(n),s=r;r=o,e({lastValue:s,newValue:o})})}a(bWo,"autorunDelta");function TWo(t,e,r=n=>n){let n=new Map;return RKe({debugReferenceFn:t},o=>{let s=new Map,c=new Map(n);for(let l of t(o)){let u=r(l);n.has(u)?c.delete(u):(s.set(u,l),n.set(u,l))}for(let l of c.keys())n.delete(l);(s.size||c.size)&&e({addedValues:[...s.values()],removedValues:[...c.values()]})})}a(TWo,"autorunIterableDelta");function SWo(t,e=wKe.DebugLocation.ofCaller()){let r,n=!1;return r=Ubn(o=>{t({delayedStore:o.delayedStore,store:o.store,readObservable:o.readObservable.bind(o),dispose:a(()=>{r?.dispose(),n=!0},"dispose")})},e),n&&r.dispose(),r}a(SWo,"autorunSelfDisposable")});var Oae=T(Mae=>{"use strict";f();Object.defineProperty(Mae,"__esModule",{value:!0});Mae.DerivedWithSetter=Mae.Derived=void 0;var IWo=Fw(),qW=Py(),mjt=UN();function xWo(t){switch(t){case 0:return"initial";case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return""}}a(xWo,"derivedStateToString");var PKe=class extends IWo.BaseObservable{static{a(this,"Derived")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,r,n,o=void 0,s,c){super(c),this._debugNameData=e,this._computeFn=r,this._changeTracker=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this._state=0,this._value=void 0,this._updateCount=0,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._changeSummary=void 0,this._isUpdating=!1,this._isComputing=!1,this._didReportChange=!1,this._isInBeforeUpdate=!1,this._isReaderValid=!1,this._store=void 0,this._delayedStore=void 0,this._removedObserverToCallEndUpdateOn=null,this._changeSummary=this._changeTracker?.createChangeSummary(void 0)}onLastObserverRemoved(){this._state=0,this._value=void 0,(0,mjt.getLogger)()?.handleDerivedCleared(this);for(let e of this._dependencies)e.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._delayedStore!==void 0&&(this._delayedStore.dispose(),this._delayedStore=void 0),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,this._observers.size===0){let r;try{this._isReaderValid=!0;let n;this._changeTracker&&(n=this._changeTracker.createChangeSummary(void 0),this._changeTracker.beforeUpdate?.(this,n)),r=this._computeFn(this,n)}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),r}else{do{if(this._state===1){for(let r of this._dependencies)if(r.reportChanges(),this._state===2)break}this._state===1&&(this._state=3),this._state!==3&&this._recompute()}while(this._state!==3);return this._value}}_recompute(){let e=!1;this._isComputing=!0,this._didReportChange=!1;let r=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=r;try{let n=this._changeSummary;this._isReaderValid=!0,this._changeTracker&&(this._isInBeforeUpdate=!0,this._changeTracker.beforeUpdate?.(this,n),this._isInBeforeUpdate=!1,this._changeSummary=this._changeTracker?.createChangeSummary(n));let o=this._state!==0,s=this._value;this._state=3;let c=this._delayedStore;c!==void 0&&(this._delayedStore=void 0);try{this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._value=this._computeFn(this,n)}finally{this._isReaderValid=!1;for(let l of this._dependenciesToBeRemoved)l.removeObserver(this);this._dependenciesToBeRemoved.clear(),c!==void 0&&c.dispose()}e=this._didReportChange||o&&!this._equalityComparator(s,this._value),(0,mjt.getLogger)()?.handleObservableUpdated(this,{oldValue:s,newValue:this._value,change:void 0,didChange:e,hadValue:o})}catch(n){(0,qW.onBugIndicatingError)(n)}if(this._isComputing=!1,!this._didReportChange&&e)for(let n of this._observers)n.handleChange(this,void 0);else this._didReportChange=!1}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){if(this._isUpdating)throw new qW.BugIndicatingError("Cyclic deriveds are not supported yet!");this._updateCount++,this._isUpdating=!0;try{let r=this._updateCount===1;if(this._state===3&&(this._state=1,!r))for(let n of this._observers)n.handlePossibleChange(this);if(r)for(let n of this._observers)n.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(e){if(this._updateCount--,this._updateCount===0){let r=[...this._observers];for(let n of r)n.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let n=[...this._removedObserverToCallEndUpdateOn];this._removedObserverToCallEndUpdateOn=null;for(let o of n)o.endUpdate(this)}}(0,qW.assertFn)(()=>this._updateCount>=0)}handlePossibleChange(e){if(this._state===3&&this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)){this._state=1;for(let r of this._observers)r.handlePossibleChange(this)}}handleChange(e,r){if(this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)||this._isInBeforeUpdate){(0,mjt.getLogger)()?.handleDerivedDependencyChanged(this,e,r);let n=!1;try{n=this._changeTracker?this._changeTracker.handleChange({changedObservable:e,change:r,didChange:a(s=>s===e,"didChange")},this._changeSummary):!0}catch(s){(0,qW.onBugIndicatingError)(s)}let o=this._state===3;if(n&&(this._state===1||o)&&(this._state=2,o))for(let s of this._observers)s.handlePossibleChange(this)}}_ensureReaderValid(){if(!this._isReaderValid)throw new qW.BugIndicatingError("The reader object cannot be used outside its compute function!")}readObservable(e){this._ensureReaderValid(),e.addObserver(this);let r=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),r}reportChange(e){this._ensureReaderValid(),this._didReportChange=!0;for(let r of this._observers)r.handleChange(this,e)}get store(){return this._ensureReaderValid(),this._store===void 0&&(this._store=new qW.DisposableStore),this._store}get delayedStore(){return this._ensureReaderValid(),this._delayedStore===void 0&&(this._delayedStore=new qW.DisposableStore),this._delayedStore}addObserver(e){let r=!this._observers.has(e)&&this._updateCount>0;super.addObserver(e),r&&(this._removedObserverToCallEndUpdateOn?.delete(e)||e.beginUpdate(this))}removeObserver(e){this._observers.has(e)&&this._updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(e)),super.removeObserver(e)}debugGetState(){return{state:this._state,stateStr:xWo(this._state),updateCount:this._updateCount,isComputing:this._isComputing,dependencies:this._dependencies,value:this._value}}debugSetValue(e){this._value=e}debugRecompute(){this.beginUpdate(this);try{this._isComputing?this._state=2:this._recompute()}finally{this.endUpdate(this)}}setValue(e,r,n){this._value=e;let o=this._observers;r.updateObserver(this,this);for(let s of o)s.handleChange(this,n)}};Mae.Derived=PKe;var gjt=class extends PKe{static{a(this,"DerivedWithSetter")}constructor(e,r,n,o=void 0,s,c,l){super(e,r,n,o,s,l),this.set=c}};Mae.DerivedWithSetter=gjt});var kKe=T(m7=>{"use strict";f();Object.defineProperty(m7,"__esModule",{value:!0});m7.derived=RWo;m7.derivedWithSetter=PWo;m7.derivedOpts=qbn;m7.derivedHandleChanges=kWo;m7.derivedWithStore=NWo;m7.derivedDisposable=DWo;var GN=Py(),Bae=Uv(),GW=Fv(),wWo=Fw(),HW=Oae();function RWo(t,e,r=Bae.DebugLocation.ofCaller()){return e!==void 0?new HW.Derived(new GW.DebugNameData(t,void 0,e),e,void 0,void 0,GN.strictEquals,r):new HW.Derived(new GW.DebugNameData(void 0,void 0,t),t,void 0,void 0,GN.strictEquals,r)}a(RWo,"derived");function PWo(t,e,r,n=Bae.DebugLocation.ofCaller()){return new HW.DerivedWithSetter(new GW.DebugNameData(t,void 0,e),e,void 0,void 0,GN.strictEquals,r,n)}a(PWo,"derivedWithSetter");function qbn(t,e,r=Bae.DebugLocation.ofCaller()){return new HW.Derived(new GW.DebugNameData(t.owner,t.debugName,t.debugReferenceFn),e,void 0,t.onLastObserverRemoved,t.equalsFn??GN.strictEquals,r)}a(qbn,"derivedOpts");(0,wWo._setDerivedOpts)(qbn);function kWo(t,e,r=Bae.DebugLocation.ofCaller()){return new HW.Derived(new GW.DebugNameData(t.owner,t.debugName,void 0),e,t.changeTracker,void 0,t.equalityComparer??GN.strictEquals,r)}a(kWo,"derivedHandleChanges");function NWo(t,e,r=Bae.DebugLocation.ofCaller()){let n,o;e===void 0?(n=t,o=void 0):(o=t,n=e);let s=new GN.DisposableStore;return new HW.Derived(new GW.DebugNameData(o,void 0,n),c=>(s.isDisposed?s=new GN.DisposableStore:s.clear(),n(c,s)),void 0,()=>s.dispose(),GN.strictEquals,r)}a(NWo,"derivedWithStore");function DWo(t,e,r=Bae.DebugLocation.ofCaller()){let n,o;e===void 0?(n=t,o=void 0):(o=t,n=e);let s;return new HW.Derived(new GW.DebugNameData(o,void 0,n),c=>{s?s.clear():s=new GN.DisposableStore;let l=n(c);return l&&s.add(l),l},void 0,()=>{s&&(s.dispose(),s=void 0)},GN.strictEquals,r)}a(DWo,"derivedDisposable")});var $bn=T(HN=>{"use strict";f();Object.defineProperty(HN,"__esModule",{value:!0});HN.ObservableLazyPromise=HN.PromiseResult=HN.ObservablePromise=HN.ObservableLazy=void 0;var Gbn=f7(),Hbn=kKe(),jbn=h7(),NKe=class{static{a(this,"ObservableLazy")}get cachedValue(){return this._value}constructor(e){this._computeValue=e,this._value=(0,jbn.observableValue)(this,void 0)}getValue(){let e=this._value.get();return e||(e=this._computeValue(),this._value.set(e,void 0)),e}};HN.ObservableLazy=NKe;var DKe=class t{static{a(this,"ObservablePromise")}static fromFn(e){return new t(e())}static resolved(e){return new t(Promise.resolve(e))}constructor(e){this._value=(0,jbn.observableValue)(this,void 0),this.promiseResult=this._value,this.resolvedValue=(0,Hbn.derived)(this,r=>{let n=this.promiseResult.read(r);if(n)return n.getDataOrThrow()}),this.promise=e.then(r=>((0,Gbn.transaction)(n=>{this._value.set(new iTe(r,void 0),n)}),r),r=>{throw(0,Gbn.transaction)(n=>{this._value.set(new iTe(void 0,r),n)}),r})}};HN.ObservablePromise=DKe;var iTe=class{static{a(this,"PromiseResult")}constructor(e,r){this.data=e,this.error=r}getDataOrThrow(){if(this.error)throw this.error;return this.data}};HN.PromiseResult=iTe;var Ajt=class{static{a(this,"ObservableLazyPromise")}constructor(e){this._computePromise=e,this._lazyValue=new NKe(()=>new DKe(this._computePromise())),this.cachedPromiseResult=(0,Hbn.derived)(this,r=>this._lazyValue.cachedValue.read(r)?.promiseResult.read(r))}getPromise(){return this._lazyValue.getValue().promise}};HN.ObservableLazyPromise=Ajt});var Ejt=T(jN=>{"use strict";f();Object.defineProperty(jN,"__esModule",{value:!0});jN.cancelOnDispose=jN.CancellationTokenSource=jN.CancellationToken=jN.CancellationError=void 0;var MWo=es();Object.defineProperty(jN,"CancellationError",{enumerable:!0,get:a(function(){return MWo.CancellationError},"get")});var yjt=_O();Object.defineProperty(jN,"CancellationToken",{enumerable:!0,get:a(function(){return yjt.CancellationToken},"get")});Object.defineProperty(jN,"CancellationTokenSource",{enumerable:!0,get:a(function(){return yjt.CancellationTokenSource},"get")});Object.defineProperty(jN,"cancelOnDispose",{enumerable:!0,get:a(function(){return yjt.cancelOnDispose},"get")})});var Vbn=T(MKe=>{"use strict";f();Object.defineProperty(MKe,"__esModule",{value:!0});MKe.waitForState=QWo;MKe.derivedWithCancellationToken=qWo;var OWo=Fv(),Cjt=Ejt(),BWo=Py(),LWo=Dae(),FWo=Oae(),UWo=Uv();function QWo(t,e,r,n){return e||(e=a(o=>o!=null,"predicate")),new Promise((o,s)=>{let c=!0,l=!1,u=t.map(p=>({isFinished:e(p),error:r?r(p):!1,state:p})),d=(0,LWo.autorun)(p=>{let{isFinished:h,error:m,state:g}=u.read(p);(h||m)&&(c?l=!0:d.dispose(),m?s(m===!0?g:m):o(g))});if(n){let p=n.onCancellationRequested(()=>{d.dispose(),p.dispose(),s(new Cjt.CancellationError)});if(n.isCancellationRequested){d.dispose(),p.dispose(),s(new Cjt.CancellationError);return}}c=!1,l&&d.dispose()})}a(QWo,"waitForState");function qWo(t,e){let r,n;e===void 0?(r=t,n=void 0):(n=t,r=e);let o;return new FWo.Derived(new OWo.DebugNameData(n,void 0,r),s=>(o&&o.dispose(!0),o=new Cjt.CancellationTokenSource,r(s,o.token)),void 0,()=>o?.dispose(),BWo.strictEquals,UWo.DebugLocation.ofCaller())}a(qWo,"derivedWithCancellationToken")});var g7=T(jW=>{"use strict";f();Object.defineProperty(jW,"__esModule",{value:!0});jW.FromEventObservable=void 0;jW.observableFromEvent=_jt;jW.observableFromEventOpts=jWo;var GWo=f7(),zbn=Py(),Ybn=Fv(),Wbn=UN(),HWo=Fw(),Kbn=Uv();function _jt(...t){let e,r,n,o;return t.length===2?[r,n]=t:[e,r,n,o]=t,new Uw(new Ybn.DebugNameData(e,void 0,n),r,n,()=>Uw.globalTransaction,zbn.strictEquals,o??Kbn.DebugLocation.ofCaller())}a(_jt,"observableFromEvent");function jWo(t,e,r,n=Kbn.DebugLocation.ofCaller()){return new Uw(new Ybn.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??r),e,r,()=>t.getTransaction?.()??Uw.globalTransaction,t.equalsFn??zbn.strictEquals,n)}a(jWo,"observableFromEventOpts");var Uw=class extends HWo.BaseObservable{static{a(this,"FromEventObservable")}constructor(e,r,n,o,s,c){super(c),this._debugNameData=e,this.event=r,this._getValue=n,this._getTransaction=o,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=l=>{let u=this._getValue(l),d=this._value,p=!this._hasValue||!this._equalityComparator(d,u),h=!1;p&&(this._value=u,this._hasValue&&(h=!0,(0,GWo.subtransaction)(this._getTransaction(),m=>{(0,Wbn.getLogger)()?.handleObservableUpdated(this,{oldValue:d,newValue:u,change:void 0,didChange:p,hadValue:this._hasValue});for(let g of this._observers)m.updateObserver(g,this),g.handleChange(this,void 0)},()=>{let m=this.getDebugName();return"Event fired"+(m?`: ${m}`:"")})),this._hasValue=!0),h||(0,Wbn.getLogger)()?.handleObservableUpdated(this,{oldValue:d,newValue:u,change:void 0,didChange:p,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}};jW.FromEventObservable=Uw;(function(t){t.Observer=Uw;function e(r,n){let o=!1;Uw.globalTransaction===void 0&&(Uw.globalTransaction=r,o=!0);try{n()}finally{o&&(Uw.globalTransaction=void 0)}}a(e,"batchEventsGlobally"),t.batchEventsGlobally=e})(_jt||(jW.observableFromEvent=_jt={}))});var bjt=T(vjt=>{"use strict";f();Object.defineProperty(vjt,"__esModule",{value:!0});vjt.observableSignal=YWo;var $Wo=f7(),VWo=Fv(),WWo=Fw(),zWo=Uv();function YWo(t,e=zWo.DebugLocation.ofCaller()){return typeof t=="string"?new OKe(t,void 0,e):new OKe(void 0,t,e)}a(YWo,"observableSignal");var OKe=class extends WWo.BaseObservable{static{a(this,"ObservableSignal")}get debugName(){return new VWo.DebugNameData(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,r,n){super(n),this._debugName=e,this._owner=r}trigger(e,r){if(!e){(0,$Wo.transaction)(n=>{this.trigger(n,r)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this._observers)e.updateObserver(n,this),n.handleChange(this,r)}get(){}}});var LKe=T(ky=>{"use strict";f();Object.defineProperty(ky,"__esModule",{value:!0});ky.KeepAliveObserver=void 0;ky.observableFromPromise=XWo;ky.signalFromObservable=ZWo;ky.debouncedObservable=ezo;ky.debouncedObservable2=tzo;ky.wasEventTriggeredRecently=rzo;ky.keepObserved=tTn;ky.recomputeInitiallyAndOnChange=rTn;ky.derivedObservableWithCache=nzo;ky.derivedObservableWithWritableCache=izo;ky.mapObservableArrayCached=ozo;ky.isObservable=szo;var KWo=Dae(),Jbn=h7(),Tjt=Py(),sTe=kKe(),JWo=g7(),Xbn=bjt(),Zbn=Fw(),eTn=Uv();function XWo(t){let e=(0,Jbn.observableValue)("promiseValue",{});return t.then(r=>{e.set({value:r},void 0)}),e}a(XWo,"observableFromPromise");function ZWo(t,e){return(0,sTe.derivedOpts)({owner:t,equalsFn:a(()=>!1,"equalsFn")},r=>{e.read(r)})}a(ZWo,"signalFromObservable");function ezo(t,e,r=eTn.DebugLocation.ofCaller()){let n=!1,o,s;return(0,JWo.observableFromEvent)(void 0,c=>{let l=(0,KWo.autorun)(u=>{let d=t.read(u);if(!n)n=!0,o=d;else{s&&clearTimeout(s);let p=typeof e=="number"?e:e(o,d);if(p===0){o=d,c();return}s=setTimeout(()=>{o=d,c()},p)}});return{dispose(){l.dispose(),n=!1,o=void 0}}},()=>n?o:t.get(),r)}a(ezo,"debouncedObservable");function tzo(t,e,r=eTn.DebugLocation.ofCaller()){let n=(0,Xbn.observableSignal)("handleTimeout"),o,s;return(0,sTe.derivedOpts)({owner:void 0,onLastObserverRemoved:a(()=>{o=void 0},"onLastObserverRemoved")},l=>{let u=t.read(l);if(n.read(l),u!==o){let d=typeof e=="number"?e:e(o,u);if(d===0)return o=u,u;s&&clearTimeout(s),s=setTimeout(()=>{o=u,n.trigger(void 0)},d)}return o},r)}a(tzo,"debouncedObservable2");function rzo(t,e,r){let n=(0,Jbn.observableValue)("triggeredRecently",!1),o;return r.add(t(()=>{n.set(!0,void 0),o&&clearTimeout(o),o=setTimeout(()=>{n.set(!1,void 0)},e)})),n}a(rzo,"wasEventTriggeredRecently");function tTn(t){let e=new oTe(!1,void 0);return t.addObserver(e),(0,Tjt.toDisposable)(()=>{t.removeObserver(e)})}a(tTn,"keepObserved");(0,Zbn._setKeepObserved)(tTn);function rTn(t,e){let r=new oTe(!0,e);t.addObserver(r);try{r.beginUpdate(t)}finally{r.endUpdate(t)}return(0,Tjt.toDisposable)(()=>{t.removeObserver(r)})}a(rTn,"recomputeInitiallyAndOnChange");(0,Zbn._setRecomputeInitiallyAndOnChange)(rTn);var oTe=class{static{a(this,"KeepAliveObserver")}constructor(e,r){this._forceRecompute=e,this._handleValue=r,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter===1&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,r){}};ky.KeepAliveObserver=oTe;function nzo(t,e){let r;return(0,sTe.derivedOpts)({owner:t,debugReferenceFn:e},o=>(r=e(o,r),r))}a(nzo,"derivedObservableWithCache");function izo(t,e){let r,n=(0,Xbn.observableSignal)("derivedObservableWithWritableCache"),o=(0,sTe.derived)(t,s=>(n.read(s),r=e(s,r),r));return Object.assign(o,{clearCache:a(s=>{r=void 0,n.trigger(s)},"clearCache"),setCache:a((s,c)=>{r=s,n.trigger(c)},"setCache")})}a(izo,"derivedObservableWithWritableCache");function ozo(t,e,r,n){let o=new BKe(r,n);return(0,sTe.derivedOpts)({debugReferenceFn:r,owner:t,onLastObserverRemoved:a(()=>{o.dispose(),o=new BKe(r)},"onLastObserverRemoved")},c=>{let l=e.read(c);return o.setItems(l),o.getItems()})}a(ozo,"mapObservableArrayCached");var BKe=class{static{a(this,"ArrayMap")}constructor(e,r){this._map=e,this._keySelector=r,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let r=[],n=new Set(this._cache.keys());for(let o of e){let s=this._keySelector?this._keySelector(o):o,c=this._cache.get(s);if(c)n.delete(s);else{let l=new Tjt.DisposableStore;c={out:this._map(o,l),store:l},this._cache.set(s,c)}r.push(c.out)}for(let o of n)this._cache.get(o).store.dispose(),this._cache.delete(o);this._items=r}getItems(){return this._items}};function szo(t){return!!t&&t.read!==void 0&&t.reportChanges!==void 0}a(szo,"isObservable")});var iTn=T(FKe=>{"use strict";f();Object.defineProperty(FKe,"__esModule",{value:!0});FKe.recordChanges=azo;FKe.recordChangesLazy=czo;var nTn=Py();function azo(t){return{createChangeSummary:a(e=>({changes:[]}),"createChangeSummary"),handleChange(e,r){for(let n in t)e.didChange(t[n])&&r.changes.push({key:n,change:e.change});return!0},beforeUpdate(e,r){for(let n in t){if(n==="changes")throw new nTn.BugIndicatingError('property name "changes" is reserved for change tracking');r[n]=t[n].read(e)}}}}a(azo,"recordChanges");function czo(t){let e;return{createChangeSummary:a(r=>({changes:[]}),"createChangeSummary"),handleChange(r,n){e||(e=t());for(let o in e)r.didChange(e[o])&&n.changes.push({key:o,change:r.change});return!0},beforeUpdate(r,n){e||(e=t());for(let o in e){if(o==="changes")throw new nTn.BugIndicatingError('property name "changes" is reserved for change tracking');n[o]=e[o].read(r)}}}}a(czo,"recordChangesLazy")});var oTn=T(Ijt=>{"use strict";f();Object.defineProperty(Ijt,"__esModule",{value:!0});Ijt.constObservable=uzo;var lzo=Fw();function uzo(t){return new Sjt(t)}a(uzo,"constObservable");var Sjt=class extends lzo.ConvenientObservable{static{a(this,"ConstObservable")}constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}log(){return this}toString(){return`Const: ${this.value}`}}});var sTn=T(wjt=>{"use strict";f();Object.defineProperty(wjt,"__esModule",{value:!0});wjt.observableSignalFromEvent=mzo;var dzo=f7(),fzo=Fv(),pzo=Fw(),hzo=Uv();function mzo(t,e,r=hzo.DebugLocation.ofCaller()){return new xjt(typeof t=="string"?t:new fzo.DebugNameData(t,void 0,void 0),e,r)}a(mzo,"observableSignalFromEvent");var xjt=class extends pzo.BaseObservable{static{a(this,"FromEventObservableSignal")}constructor(e,r,n){super(n),this.event=r,this.handleEvent=()=>{(0,dzo.transaction)(o=>{for(let s of this._observers)o.updateObserver(s,this),s.handleChange(this,void 0)},()=>this.debugName)},this.debugName=typeof e=="string"?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}});var aTn=T(aTe=>{"use strict";f();Object.defineProperty(aTe,"__esModule",{value:!0});aTe.ValueWithChangeEventFromObservable=void 0;aTe.observableFromValueWithChangeEvent=yzo;var gzo=Py(),Azo=g7(),UKe=class{static{a(this,"ValueWithChangeEventFromObservable")}constructor(e){this.observable=e}get onDidChange(){return gzo.Event.fromObservableLight(this.observable)}get value(){return this.observable.get()}};aTe.ValueWithChangeEventFromObservable=UKe;function yzo(t,e){return e instanceof UKe?e.observable:(0,Azo.observableFromEvent)(t,e.onDidChange,()=>e.value)}a(yzo,"observableFromValueWithChangeEvent")});var uTn=T(cTe=>{"use strict";f();Object.defineProperty(cTe,"__esModule",{value:!0});cTe.runOnChange=cTn;cTe.runOnChangeWithStore=lTn;cTe.runOnChangeWithCancellationToken=vzo;var Ezo=Ejt(),Czo=Py(),_zo=Dae();function cTn(t,e){let r,n=!0;return(0,_zo.autorunWithStoreHandleChanges)({changeTracker:{createChangeSummary:a(()=>({deltas:[],didChange:!1}),"createChangeSummary"),handleChange:a((o,s)=>{if(o.didChange(t)){let c=o.change;c!==void 0&&s.deltas.push(c),s.didChange=!0}return!0},"handleChange")}},(o,s)=>{let c=t.read(o),l=r;s.didChange&&(r=c,e(c,l,s.deltas)),n&&(n=!1,r=c)})}a(cTn,"runOnChange");function lTn(t,e){let r=new Czo.DisposableStore,n=cTn(t,(o,s,c)=>{r.clear(),e(o,s,c,r)});return{dispose(){n.dispose(),r.dispose()}}}a(lTn,"runOnChangeWithStore");function vzo(t,e){return lTn(t,(r,n,o,s)=>{e(r,n,o,(0,Ezo.cancelOnDispose)(s))})}a(vzo,"runOnChangeWithCancellationToken")});var pTn=T(QKe=>{"use strict";f();Object.defineProperty(QKe,"__esModule",{value:!0});QKe.latestChangedValue=Izo;QKe.derivedConstOnceDefined=xzo;var dTn=Py(),fTn=Fv(),bzo=g7(),Tzo=Dae(),Szo=LKe();function Izo(t,e){if(e.length===0)throw new dTn.BugIndicatingError;let r=!1,n,o=(0,bzo.observableFromEvent)(t,s=>{let c=new dTn.DisposableStore;for(let l of e)c.add((0,Tzo.autorunOpts)({debugName:a(()=>(0,fTn.getDebugName)(o,new fTn.DebugNameData(t,void 0,void 0))+".updateLastChangedValue","debugName")},u=>{r=!0,n=l.read(u),s()}));return c.add({dispose(){r=!1,n=void 0}}),c},()=>r?n:e[e.length-1].get());return o}a(Izo,"latestChangedValue");function xzo(t,e){return(0,Szo.derivedObservableWithCache)(t,(r,n)=>n??e(r))}a(xzo,"derivedConstOnceDefined")});var hTn=T(qKe=>{"use strict";f();Object.defineProperty(qKe,"__esModule",{value:!0});qKe.ObservableSet=void 0;var wzo=TKe(),Rjt=class{static{a(this,"ObservableSet")}constructor(){this._data=new Set,this._obs=(0,wzo.observableValueOpts)({equalsFn:a(()=>!1,"equalsFn")},this),this.observable=this._obs}get size(){return this._data.size}has(e){return this._data.has(e)}add(e,r){return this._data.has(e)||(this._data.add(e),this._obs.set(this,r)),this}delete(e,r){let n=this._data.delete(e);return n&&this._obs.set(this,r),n}clear(e){this._data.size>0&&(this._data.clear(),this._obs.set(this,e))}forEach(e,r){this._data.forEach((n,o,s)=>{e.call(r,n,o,this)})}*entries(){for(let e of this._data)yield[e,e]}*keys(){yield*this._data.keys()}*values(){yield*this._data.values()}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"ObservableSet"}};qKe.ObservableSet=Rjt});var mTn=T(GKe=>{"use strict";f();Object.defineProperty(GKe,"__esModule",{value:!0});GKe.ObservableMap=void 0;var Rzo=TKe(),Pjt=class{static{a(this,"ObservableMap")}constructor(){this._data=new Map,this._obs=(0,Rzo.observableValueOpts)({equalsFn:a(()=>!1,"equalsFn")},this),this.observable=this._obs}get size(){return this._data.size}has(e){return this._data.has(e)}get(e){return this._data.get(e)}set(e,r,n){let o=this._data.has(e),s=this._data.get(e);return(!o||s!==r)&&(this._data.set(e,r),this._obs.set(this,n)),this}delete(e,r){let n=this._data.delete(e);return n&&this._obs.set(this,r),n}clear(e){this._data.size>0&&(this._data.clear(),this._obs.set(this,e))}forEach(e,r){this._data.forEach((n,o,s)=>{e.call(r,n,o,this)})}*entries(){yield*this._data.entries()}*keys(){yield*this._data.keys()}*values(){yield*this._data.values()}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return"ObservableMap"}};GKe.ObservableMap=Pjt});var $Ke=T(Qae=>{"use strict";f();Object.defineProperty(Qae,"__esModule",{value:!0});Qae.ConsoleObservableLogger=void 0;Qae.logObservableToConsole=Nzo;Qae.formatValue=Uae;var Pzo=UN(),kzo=Fv(),gTn=Oae(),HKe;function Nzo(t){HKe||(HKe=new jKe,(0,Pzo.addLogger)(HKe)),HKe.addFilteredObj(t)}a(Nzo,"logObservableToConsole");var jKe=class{static{a(this,"ConsoleObservableLogger")}constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){return Dzo([Lae(Bzo("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[Lae(" "),wS(Uae(e.oldValue,70),{color:"red",strikeThrough:!0}),Lae(" "),wS(Uae(e.newValue,60),{color:"green"})]:[Lae(" (unchanged)")]:[Lae(" "),wS(Uae(e.newValue,60),{color:"green"}),Lae(" (initial)")]}handleObservableCreated(e){if(e instanceof gTn.Derived){let r=e;if(this.changedObservablesSets.set(r,new Set),!1){let o=[];r.__debugUpdating=o;let s=r.beginUpdate;r.beginUpdate=l=>(o.push(l),s.apply(r,[l]));let c=r.endUpdate;r.endUpdate=l=>{let u=o.indexOf(l);return u===-1&&console.error("endUpdate called without beginUpdate",r.debugName,l.debugName),o.splice(u,1),c.apply(r,[l])}}}}handleOnListenerCountChanged(e,r){}handleObservableUpdated(e,r){if(this._isIncluded(e)){if(e instanceof gTn.Derived){this._handleDerivedRecomputed(e,r);return}console.log(...this.textToConsoleArgs([Fae("observable value changed"),wS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r)]))}}formatChanges(e){if(e.size!==0)return wS(" (changed deps: "+[...e].map(r=>r.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,r,n){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(r)}_handleDerivedRecomputed(e,r){if(!this._isIncluded(e))return;let n=this.changedObservablesSets.get(e);n&&(console.log(...this.textToConsoleArgs([Fae("derived recomputed"),wS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Fae("derived cleared"),wS(e.debugName,{color:"BlueViolet"})]))}handleFromEventObservableTriggered(e,r){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Fae("observable from event triggered"),wS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,r,n){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(r)}handleAutorunStarted(e){let r=this.changedObservablesSets.get(e);r&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Fae("autorun"),wS(e.debugName,{color:"BlueViolet"}),this.formatChanges(r),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),r.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let r=e.getDebugName();r===void 0&&(r=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Fae("transaction"),wS(r,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}};Qae.ConsoleObservableLogger=jKe;function Dzo(t){let e=new Array,r=[],n="";function o(c){if("length"in c)for(let l of c)l&&o(l);else"text"in c?(n+=`%c${c.text}`,e.push(c.style),c.data&&r.push(...c.data)):"data"in c&&r.push(...c.data)}a(o,"process"),o(t);let s=[n,...e];return s.push(...r),s}a(Dzo,"consoleTextToArgs");function Lae(t){return wS(t,{color:"black"})}a(Lae,"normalText");function Fae(t){return wS(Lzo(`${t}: `,10),{color:"black",bold:!0})}a(Fae,"formatKind");function wS(t,e={color:"black"}){function r(o){return Object.entries(o).reduce((s,[c,l])=>`${s}${c}:${l};`,"")}a(r,"objToCss");let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:t,style:r(n)}}a(wS,"styled");function Uae(t,e){switch(typeof t){case"number":return""+t;case"string":return t.length+2<=e?`"${t}"`:`"${t.substr(0,e-7)}"+...`;case"boolean":return t?"true":"false";case"undefined":return"undefined";case"object":return t===null?"null":Array.isArray(t)?Mzo(t,e):Ozo(t,e);case"symbol":return t.toString();case"function":return`[[Function${t.name?" "+t.name:""}]]`;default:return""+t}}a(Uae,"formatValue");function Mzo(t,e){let r="[ ",n=!0;for(let o of t){if(n||(r+=", "),r.length-5>e){r+="...";break}n=!1,r+=`${Uae(o,e-r.length)}`}return r+=" ]",r}a(Mzo,"formatArray");function Ozo(t,e){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString){let s=t.toString();return s.length<=e?s:s.substring(0,e-3)+"..."}let r=(0,kzo.getClassName)(t),n=r?r+"(":"{ ",o=!0;for(let[s,c]of Object.entries(t)){if(o||(n+=", "),n.length-5>e){n+="...";break}o=!1,n+=`${s}: ${Uae(c,e-n.length)}`}return n+=r?")":" }",n}a(Ozo,"formatObject");function Bzo(t,e){let r="";for(let n=1;n<=e;n++)r+=t;return r}a(Bzo,"repeat");function Lzo(t,e){for(;t.length{"use strict";f();Object.defineProperty(VKe,"__esModule",{value:!0});VKe.SimpleTypedRpcConnection=void 0;var kjt=class t{static{a(this,"SimpleTypedRpcConnection")}static createHost(e,r){return new t(e,r)}static createClient(e,r){return new t(e,r)}constructor(e,r){this._channelFactory=e,this._getHandler=r,this._channel=this._channelFactory({handleNotification:a(s=>{let c=s,l=this._getHandler().notifications[c[0]];if(!l)throw new Error(`Unknown notification "${c[0]}"!`);l(...c[1])},"handleNotification"),handleRequest:a(s=>{let c=s;try{return{type:"result",value:this._getHandler().requests[c[0]](...c[1])}}catch(l){return{type:"error",value:l}}},"handleRequest")});let n=new Proxy({},{get:a((s,c)=>async(...l)=>{let u=await this._channel.sendRequest([c,l]);if(u.type==="error")throw u.value;return u.value},"get")}),o=new Proxy({},{get:a((s,c)=>(...l)=>{this._channel.sendNotification([c,l])},"get")});this.api={notifications:o,requests:n}}};VKe.SimpleTypedRpcConnection=kjt});var yTn=T(Njt=>{"use strict";f();Object.defineProperty(Njt,"__esModule",{value:!0});Njt.registerDebugChannel=Uzo;var Fzo=ATn();function Uzo(t,e){let r=globalThis,n=[],o,{channel:s,handler:c}=Qzo({sendNotification:a(u=>{o?o.sendNotification(u):n.push(u)},"sendNotification")}),l;return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[t]=u=>{l=e(),o=u;for(let d of n)u.sendNotification(d);return n=[],c},Fzo.SimpleTypedRpcConnection.createClient(s,()=>{if(!l)throw new Error("Not supported");return l})}a(Uzo,"registerDebugChannel");function Qzo(t){let e;return{channel:a(n=>(e=n,{sendNotification:a(o=>{t.sendNotification(o)},"sendNotification"),sendRequest:a(o=>{throw new Error("not supported")},"sendRequest")}),"channel"),handler:{handleRequest:a(n=>n.type==="notification"?e?.handleNotification(n.data):e?.handleRequest(n.data),"handleRequest")}}}a(Qzo,"createChannelFactoryFromDebugChannel")});var _Tn=T(A7=>{"use strict";f();Object.defineProperty(A7,"__esModule",{value:!0});A7.Throttler=A7.Debouncer=void 0;A7.deepAssign=ETn;A7.deepAssignDeleteNulls=CTn;var Djt=class{static{a(this,"Debouncer")}constructor(){this._timeout=void 0}debounce(e,r){this._timeout!==void 0&&clearTimeout(this._timeout),this._timeout=setTimeout(()=>{this._timeout=void 0,e()},r)}dispose(){this._timeout!==void 0&&clearTimeout(this._timeout)}};A7.Debouncer=Djt;var Mjt=class{static{a(this,"Throttler")}constructor(){this._timeout=void 0}throttle(e,r){this._timeout===void 0&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},r))}dispose(){this._timeout!==void 0&&clearTimeout(this._timeout)}};A7.Throttler=Mjt;function ETn(t,e){for(let r in e)t[r]&&typeof t[r]=="object"&&e[r]&&typeof e[r]=="object"?ETn(t[r],e[r]):t[r]=e[r]}a(ETn,"deepAssign");function CTn(t,e){for(let r in e)e[r]===null?delete t[r]:t[r]&&typeof t[r]=="object"&&e[r]&&typeof e[r]=="object"?CTn(t[r],e[r]):t[r]=e[r]}a(CTn,"deepAssignDeleteNulls")});var TTn=T(zKe=>{"use strict";f();Object.defineProperty(zKe,"__esModule",{value:!0});zKe.DevToolsLogger=void 0;var vTn=IKe(),WKe=$Ke(),qzo=yTn(),Ojt=_Tn(),lTe=sv(),Gzo=g7(),$W=es(),VW=Oae(),bTn=h7(),Hzo=Uv(),Bjt=class t{static{a(this,"DevToolsLogger")}static{this._instance=void 0}static getInstance(){return t._instance===void 0&&(t._instance=new t),t._instance}getTransactionState(){let e=[],r=[...this._activeTransactions];if(r.length===0)return;let n=r.flatMap(s=>s.debugGetUpdatingObservers()??[]).map(s=>s.observer),o=new Set;for(;n.length>0;){let s=n.shift();if(o.has(s))continue;o.add(s);let c=this._getInfo(s,l=>{o.has(l)||n.push(l)});c&&e.push(c)}return{names:r.map(s=>s.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let r=this._instanceInfos.get(e);if(!r){(0,$W.onUnexpectedError)(new $W.BugIndicatingError("No info found"));return}return r}_getAutorunInfo(e){let r=this._instanceInfos.get(e);if(!r){(0,$W.onUnexpectedError)(new $W.BugIndicatingError("No info found"));return}return r}_getInfo(e,r){if(e instanceof VW.Derived){let n=[...e.debugGetObservers()];for(let u of n)r(u);let o=this._getObservableInfo(e);if(!o)return;let s=e.debugGetState(),c={name:e.debugName,instanceId:o.instanceId,updateCount:s.updateCount},l=[...o.changedObservables].map(u=>this._instanceInfos.get(u)?.instanceId).filter(lTe.isDefined);if(s.isComputing)return{...c,type:"observable/derived",state:"updating",changedDependencies:l,initialComputation:!1};switch(s.state){case 0:return{...c,type:"observable/derived",state:"noValue"};case 3:return{...c,type:"observable/derived",state:"upToDate"};case 2:return{...c,type:"observable/derived",state:"stale",changedDependencies:l};case 1:return{...c,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof vTn.AutorunObserver){let n=this._getAutorunInfo(e);if(!n)return;let o={name:e.debugName,instanceId:n.instanceId,updateCount:n.updateCount},s=[...n.changedObservables].map(c=>this._instanceInfos.get(c).instanceId);if(e.debugGetState().isRunning)return{...o,type:"autorun",state:"updating",changedDependencies:s};switch(e.debugGetState().state){case 3:return{...o,type:"autorun",state:"upToDate"};case 2:return{...o,type:"autorun",state:"stale",changedDependencies:s};case 1:return{...o,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let r=this._getObservableInfo(e);if(r)return{name:e.debugName,instanceId:r.instanceId}}_formatObserver(e){if(e instanceof VW.Derived)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let r=this._getAutorunInfo(e);if(r)return{name:e.toString(),instanceId:r.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=(0,qzo.registerDebugChannel)("observableDevTools",()=>({notifications:{setDeclarationIdFilter:a(e=>{},"setDeclarationIdFilter"),logObservableValue:a(e=>{console.log("logObservableValue",e)},"logObservableValue"),flushUpdates:a(()=>{this._flushUpdates()},"flushUpdates"),resetUpdates:a(()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)},"resetUpdates")},requests:{getDeclarations:a(()=>{let e={};for(let r of this._declarations.values())e[r.id]=r;return{decls:e}},"getDeclarations"),getSummarizedInstances:a(()=>null,"getSummarizedInstances"),getObservableValueInfo:a(e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(n=>this._formatObserver(n)).filter(lTe.isDefined)}),"getObservableValueInfo"),getDerivedInfo:a(e=>{let r=this._aliveInstances.get(e);return{dependencies:[...r.debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(lTe.isDefined),observers:[...r.debugGetObservers()].map(n=>this._formatObserver(n)).filter(lTe.isDefined)}},"getDerivedInfo"),getAutorunInfo:a(e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(lTe.isDefined)}),"getAutorunInfo"),getTransactionState:a(()=>this.getTransactionState(),"getTransactionState"),setValue:a((e,r)=>{let n=this._aliveInstances.get(e);if(n instanceof VW.Derived)n.debugSetValue(r);else if(n instanceof bTn.ObservableValue)n.debugSetValue(r);else if(n instanceof Gzo.FromEventObservable)n.debugSetValue(r);else throw new $W.BugIndicatingError("Observable is not supported");let o=[...n.debugGetObservers()];for(let s of o)s.beginUpdate(n);for(let s of o)s.handleChange(n,void 0);for(let s of o)s.endUpdate(n)},"setValue"),getValue:a(e=>{let r=this._aliveInstances.get(e);if(r instanceof VW.Derived)return(0,WKe.formatValue)(r.debugGetState().value,200);if(r instanceof bTn.ObservableValue)return(0,WKe.formatValue)(r.debugGetState().value,200)},"getValue"),logValue:a(e=>{let r=this._aliveInstances.get(e);if(r&&"get"in r)console.log("Logged Value:",r.get());else throw new $W.BugIndicatingError("Observable is not supported")},"logValue"),rerun:a(e=>{let r=this._aliveInstances.get(e);if(r instanceof VW.Derived)r.debugRecompute();else if(r instanceof vTn.AutorunObserver)r.debugRerun();else throw new $W.BugIndicatingError("Observable is not supported")},"rerun")}})),this._pendingChanges=null,this._changeThrottler=new Ojt.Throttler,this._fullState={},this._flushUpdates=()=>{this._pendingChanges!==null&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},Hzo.DebugLocation.enable()}_handleChange(e){(0,Ojt.deepAssignDeleteNulls)(this._fullState,e),this._pendingChanges===null?this._pendingChanges=e:(0,Ojt.deepAssign)(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,r){if(!r)return-1;let n=this._declarations.get(r.id);return n===void 0&&(n={id:this._declarationId++,type:e,url:r.fileName,line:r.line,column:r.column},this._declarations.set(r.id,n),this._handleChange({decls:{[n.id]:n}})),n.id}handleObservableCreated(e,r){let o={declarationId:this._getDeclarationId("observable/value",r),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,o)}handleOnListenerCountChanged(e,r){let n=this._getObservableInfo(e);if(n){if(n.listenerCount===0&&r>0){let o=e instanceof VW.Derived?"observable/derived":"observable/value";this._aliveInstances.set(n.instanceId,e),this._handleChange({instances:{[n.instanceId]:{instanceId:n.instanceId,declarationId:n.declarationId,formattedValue:n.lastValue,type:o,name:e.debugName}}})}else n.listenerCount>0&&r===0&&(this._handleChange({instances:{[n.instanceId]:null}}),this._aliveInstances.delete(n.instanceId));n.listenerCount=r}}handleObservableUpdated(e,r){if(e instanceof VW.Derived){this._handleDerivedRecomputed(e,r);return}let n=this._getObservableInfo(e);n&&r.didChange&&(n.lastValue=(0,WKe.formatValue)(r.newValue,30),n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:n.lastValue}}}))}handleAutorunCreated(e,r){let o={declarationId:this._getDeclarationId("autorun",r),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,o),this._aliveInstances.set(o.instanceId,e),o&&this._handleChange({instances:{[o.instanceId]:{instanceId:o.instanceId,declarationId:o.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let r=this._getAutorunInfo(e);r&&(this._handleChange({instances:{[r.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(r.instanceId))}handleAutorunDependencyChanged(e,r,n){let o=this._getAutorunInfo(e);o&&o.changedObservables.add(r)}handleAutorunStarted(e){}handleAutorunFinished(e){let r=this._getAutorunInfo(e);r&&(r.changedObservables.clear(),r.updateCount++,this._handleChange({instances:{[r.instanceId]:{runCount:r.updateCount}}}))}handleDerivedDependencyChanged(e,r,n){let o=this._getObservableInfo(e);o&&o.changedObservables.add(r)}_handleDerivedRecomputed(e,r){let n=this._getObservableInfo(e);if(!n)return;let o=(0,WKe.formatValue)(r.newValue,30);n.updateCount++,n.changedObservables.clear(),n.lastValue=o,n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:o,recomputationCount:n.updateCount}}})}handleDerivedCleared(e){let r=this._getObservableInfo(e);r&&(r.lastValue=void 0,r.changedObservables.clear(),r.listenerCount>0&&this._handleChange({instances:{[r.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}};zKe.DevToolsLogger=Bjt});var wTn=T(Ljt=>{"use strict";f();Object.defineProperty(Ljt,"__esModule",{value:!0});Ljt.debugGetObservableGraph=zzo;var jzo=Oae(),$zo=g7(),Vzo=h7(),Wzo=IKe(),STn=$Ke();function zzo(t,e){let r=e?.debugNamePostProcessor??(s=>s),n=WW.from(t,r);if(!n)return"";let o=new Set;return e.type==="observers"?xTn(n,0,o,e).trim():ITn(n,0,o,e).trim()}a(zzo,"debugGetObservableGraph");function ITn(t,e,r,n){let o=" ".repeat(e),s=[];if(r.has(t.sourceObj))return s.push(`${o}* ${t.type} ${t.name} (already listed)`),s.join(` -`);if(r.add(t.sourceObj),s.push(`${o}* ${t.type} ${t.name}:`),s.push(`${o} value: ${(0,STn.formatValue)(t.value,50)}`),s.push(`${o} state: ${t.state}`),t.dependencies.length>0){s.push(`${o} dependencies:`);for(let l of t.dependencies){let u=WW.from(l,n.debugNamePostProcessor??(d=>d))??WW.unknown(l);s.push(ITn(u,e+1,r,n))}}return s.join(` -`)}a(ITn,"formatObservableInfoWithDependencies");function xTn(t,e,r,n){let o=" ".repeat(e),s=[];if(r.has(t.sourceObj))return s.push(`${o}* ${t.type} ${t.name} (already listed)`),s.join(` -`);if(r.add(t.sourceObj),s.push(`${o}* ${t.type} ${t.name}:`),s.push(`${o} value: ${(0,STn.formatValue)(t.value,50)}`),s.push(`${o} state: ${t.state}`),t.observers.length>0){s.push(`${o} observers:`);for(let l of t.observers){let u=WW.from(l,n.debugNamePostProcessor??(d=>d))??WW.unknown(l);s.push(xTn(u,e+1,r,n))}}return s.join(` -`)}a(xTn,"formatObservableInfoWithObservers");var WW=class t{static{a(this,"Info")}static from(e,r){if(e instanceof Wzo.AutorunObserver){let n=e.debugGetState();return new t(e,r(e.debugName),"autorun",void 0,n.stateStr,Array.from(n.dependencies),[])}else if(e instanceof jzo.Derived){let n=e.debugGetState();return new t(e,r(e.debugName),"derived",n.value,n.stateStr,Array.from(n.dependencies),Array.from(e.debugGetObservers()))}else if(e instanceof Vzo.ObservableValue){let n=e.debugGetState();return new t(e,r(e.debugName),"observableValue",n.value,"upToDate",[],Array.from(e.debugGetObservers()))}else if(e instanceof $zo.FromEventObservable){let n=e.debugGetState();return new t(e,r(e.debugName),"fromEvent",n.value,n.hasValue?"upToDate":"initial",[],Array.from(e.debugGetObservers()))}}static unknown(e){return new t(e,"(unknown)","unknown",void 0,"unknown",[],[])}constructor(e,r,n,o,s,c,l){this.sourceObj=e,this.name=r,this.type=n,this.value=o,this.state=s,this.dependencies=c,this.observers=l}}});var M4=T(Dt=>{"use strict";f();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.derivedConstOnceDefined=Dt.runOnChangeWithStore=Dt.runOnChangeWithCancellationToken=Dt.runOnChange=Dt.ValueWithChangeEventFromObservable=Dt.observableFromValueWithChangeEvent=Dt.TransactionImpl=Dt.transaction=Dt.subtransaction=Dt.globalTransaction=Dt.asyncTransaction=Dt.observableSignalFromEvent=Dt.observableFromEventOpts=Dt.observableSignal=Dt.constObservable=Dt.recordChangesLazy=Dt.recordChanges=Dt.isObservable=Dt.wasEventTriggeredRecently=Dt.signalFromObservable=Dt.recomputeInitiallyAndOnChange=Dt.observableFromPromise=Dt.mapObservableArrayCached=Dt.keepObserved=Dt.derivedObservableWithWritableCache=Dt.derivedObservableWithCache=Dt.debouncedObservable2=Dt.debouncedObservable=Dt.waitForState=Dt.derivedWithCancellationToken=Dt.PromiseResult=Dt.ObservablePromise=Dt.ObservableLazyPromise=Dt.ObservableLazy=Dt.derivedWithStore=Dt.derivedWithSetter=Dt.derivedOpts=Dt.derivedHandleChanges=Dt.derivedDisposable=Dt.derived=Dt.disposableObservableValue=Dt.autorunSelfDisposable=Dt.autorunIterableDelta=Dt.autorunWithStoreHandleChanges=Dt.autorunWithStore=Dt.autorunOpts=Dt.autorunHandleChanges=Dt.autorunDelta=Dt.autorun=Dt.observableValueOpts=void 0;Dt.DebugLocation=Dt.ObservableMap=Dt.ObservableSet=Dt.observableValue=Dt.observableFromEvent=Dt.latestChangedValue=void 0;var Yzo=TKe();Object.defineProperty(Dt,"observableValueOpts",{enumerable:!0,get:a(function(){return Yzo.observableValueOpts},"get")});var y7=Dae();Object.defineProperty(Dt,"autorun",{enumerable:!0,get:a(function(){return y7.autorun},"get")});Object.defineProperty(Dt,"autorunDelta",{enumerable:!0,get:a(function(){return y7.autorunDelta},"get")});Object.defineProperty(Dt,"autorunHandleChanges",{enumerable:!0,get:a(function(){return y7.autorunHandleChanges},"get")});Object.defineProperty(Dt,"autorunOpts",{enumerable:!0,get:a(function(){return y7.autorunOpts},"get")});Object.defineProperty(Dt,"autorunWithStore",{enumerable:!0,get:a(function(){return y7.autorunWithStore},"get")});Object.defineProperty(Dt,"autorunWithStoreHandleChanges",{enumerable:!0,get:a(function(){return y7.autorunWithStoreHandleChanges},"get")});Object.defineProperty(Dt,"autorunIterableDelta",{enumerable:!0,get:a(function(){return y7.autorunIterableDelta},"get")});Object.defineProperty(Dt,"autorunSelfDisposable",{enumerable:!0,get:a(function(){return y7.autorunSelfDisposable},"get")});var Kzo=h7();Object.defineProperty(Dt,"disposableObservableValue",{enumerable:!0,get:a(function(){return Kzo.disposableObservableValue},"get")});var qae=kKe();Object.defineProperty(Dt,"derived",{enumerable:!0,get:a(function(){return qae.derived},"get")});Object.defineProperty(Dt,"derivedDisposable",{enumerable:!0,get:a(function(){return qae.derivedDisposable},"get")});Object.defineProperty(Dt,"derivedHandleChanges",{enumerable:!0,get:a(function(){return qae.derivedHandleChanges},"get")});Object.defineProperty(Dt,"derivedOpts",{enumerable:!0,get:a(function(){return qae.derivedOpts},"get")});Object.defineProperty(Dt,"derivedWithSetter",{enumerable:!0,get:a(function(){return qae.derivedWithSetter},"get")});Object.defineProperty(Dt,"derivedWithStore",{enumerable:!0,get:a(function(){return qae.derivedWithStore},"get")});var YKe=$bn();Object.defineProperty(Dt,"ObservableLazy",{enumerable:!0,get:a(function(){return YKe.ObservableLazy},"get")});Object.defineProperty(Dt,"ObservableLazyPromise",{enumerable:!0,get:a(function(){return YKe.ObservableLazyPromise},"get")});Object.defineProperty(Dt,"ObservablePromise",{enumerable:!0,get:a(function(){return YKe.ObservablePromise},"get")});Object.defineProperty(Dt,"PromiseResult",{enumerable:!0,get:a(function(){return YKe.PromiseResult},"get")});var PTn=Vbn();Object.defineProperty(Dt,"derivedWithCancellationToken",{enumerable:!0,get:a(function(){return PTn.derivedWithCancellationToken},"get")});Object.defineProperty(Dt,"waitForState",{enumerable:!0,get:a(function(){return PTn.waitForState},"get")});var Qw=LKe();Object.defineProperty(Dt,"debouncedObservable",{enumerable:!0,get:a(function(){return Qw.debouncedObservable},"get")});Object.defineProperty(Dt,"debouncedObservable2",{enumerable:!0,get:a(function(){return Qw.debouncedObservable2},"get")});Object.defineProperty(Dt,"derivedObservableWithCache",{enumerable:!0,get:a(function(){return Qw.derivedObservableWithCache},"get")});Object.defineProperty(Dt,"derivedObservableWithWritableCache",{enumerable:!0,get:a(function(){return Qw.derivedObservableWithWritableCache},"get")});Object.defineProperty(Dt,"keepObserved",{enumerable:!0,get:a(function(){return Qw.keepObserved},"get")});Object.defineProperty(Dt,"mapObservableArrayCached",{enumerable:!0,get:a(function(){return Qw.mapObservableArrayCached},"get")});Object.defineProperty(Dt,"observableFromPromise",{enumerable:!0,get:a(function(){return Qw.observableFromPromise},"get")});Object.defineProperty(Dt,"recomputeInitiallyAndOnChange",{enumerable:!0,get:a(function(){return Qw.recomputeInitiallyAndOnChange},"get")});Object.defineProperty(Dt,"signalFromObservable",{enumerable:!0,get:a(function(){return Qw.signalFromObservable},"get")});Object.defineProperty(Dt,"wasEventTriggeredRecently",{enumerable:!0,get:a(function(){return Qw.wasEventTriggeredRecently},"get")});Object.defineProperty(Dt,"isObservable",{enumerable:!0,get:a(function(){return Qw.isObservable},"get")});var kTn=iTn();Object.defineProperty(Dt,"recordChanges",{enumerable:!0,get:a(function(){return kTn.recordChanges},"get")});Object.defineProperty(Dt,"recordChangesLazy",{enumerable:!0,get:a(function(){return kTn.recordChangesLazy},"get")});var Jzo=oTn();Object.defineProperty(Dt,"constObservable",{enumerable:!0,get:a(function(){return Jzo.constObservable},"get")});var Xzo=bjt();Object.defineProperty(Dt,"observableSignal",{enumerable:!0,get:a(function(){return Xzo.observableSignal},"get")});var Zzo=g7();Object.defineProperty(Dt,"observableFromEventOpts",{enumerable:!0,get:a(function(){return Zzo.observableFromEventOpts},"get")});var eYo=sTn();Object.defineProperty(Dt,"observableSignalFromEvent",{enumerable:!0,get:a(function(){return eYo.observableSignalFromEvent},"get")});var uTe=f7();Object.defineProperty(Dt,"asyncTransaction",{enumerable:!0,get:a(function(){return uTe.asyncTransaction},"get")});Object.defineProperty(Dt,"globalTransaction",{enumerable:!0,get:a(function(){return uTe.globalTransaction},"get")});Object.defineProperty(Dt,"subtransaction",{enumerable:!0,get:a(function(){return uTe.subtransaction},"get")});Object.defineProperty(Dt,"transaction",{enumerable:!0,get:a(function(){return uTe.transaction},"get")});Object.defineProperty(Dt,"TransactionImpl",{enumerable:!0,get:a(function(){return uTe.TransactionImpl},"get")});var NTn=aTn();Object.defineProperty(Dt,"observableFromValueWithChangeEvent",{enumerable:!0,get:a(function(){return NTn.observableFromValueWithChangeEvent},"get")});Object.defineProperty(Dt,"ValueWithChangeEventFromObservable",{enumerable:!0,get:a(function(){return NTn.ValueWithChangeEventFromObservable},"get")});var Fjt=uTn();Object.defineProperty(Dt,"runOnChange",{enumerable:!0,get:a(function(){return Fjt.runOnChange},"get")});Object.defineProperty(Dt,"runOnChangeWithCancellationToken",{enumerable:!0,get:a(function(){return Fjt.runOnChangeWithCancellationToken},"get")});Object.defineProperty(Dt,"runOnChangeWithStore",{enumerable:!0,get:a(function(){return Fjt.runOnChangeWithStore},"get")});var DTn=pTn();Object.defineProperty(Dt,"derivedConstOnceDefined",{enumerable:!0,get:a(function(){return DTn.derivedConstOnceDefined},"get")});Object.defineProperty(Dt,"latestChangedValue",{enumerable:!0,get:a(function(){return DTn.latestChangedValue},"get")});var tYo=g7();Object.defineProperty(Dt,"observableFromEvent",{enumerable:!0,get:a(function(){return tYo.observableFromEvent},"get")});var rYo=h7();Object.defineProperty(Dt,"observableValue",{enumerable:!0,get:a(function(){return rYo.observableValue},"get")});var nYo=hTn();Object.defineProperty(Dt,"ObservableSet",{enumerable:!0,get:a(function(){return nYo.ObservableSet},"get")});var iYo=mTn();Object.defineProperty(Dt,"ObservableMap",{enumerable:!0,get:a(function(){return iYo.ObservableMap},"get")});var oYo=Uv();Object.defineProperty(Dt,"DebugLocation",{enumerable:!0,get:a(function(){return oYo.DebugLocation},"get")});var Ujt=UN(),MTn=$Ke(),sYo=TTn(),RTn=IQe(),aYo=Fw(),cYo=wTn();(0,aYo._setDebugGetObservableGraph)(cYo.debugGetObservableGraph);(0,Ujt.setLogObservableFn)(MTn.logObservableToConsole);var lYo=!1;lYo&&(0,Ujt.addLogger)(new MTn.ConsoleObservableLogger);RTn.env&&RTn.env.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,Ujt.addLogger)(sYo.DevToolsLogger.getInstance())});var Fu=T(Gae=>{"use strict";f();Object.defineProperty(Gae,"__esModule",{value:!0});Gae.OffsetRangeSet=Gae.OffsetRange=void 0;var KKe=es(),JKe=class t{static{a(this,"OffsetRange")}static fromTo(e,r){return new t(e,r)}static equals(e,r){return e.start===r.start&&e.endExclusive===r.endExclusive}static addRange(e,r){let n=0;for(;nr))return new t(e,r)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,r){return new t(e,e+r)}static emptyAt(e){return new t(e,e)}constructor(e,r){if(this.start=e,this.endExclusive=r,e>r)throw new KKe.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new KKe.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new KKe.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}map(e){let r=[];for(let n=this.start;ne.toString()).join(", ")}intersectsStrict(e){let r=0;for(;re+r.length,0)}};Gae.OffsetRangeSet=Qjt});var $N=T($ae=>{"use strict";f();Object.defineProperty($ae,"__esModule",{value:!0});$ae.LineRangeSet=$ae.LineRange=void 0;var OTn=es(),uYo=Fu(),BTn=Ef(),Hae=wF(),LTn=jc(),jae=class t{static{a(this,"LineRange")}static ofLength(e,r){return new t(e,e+r)}static fromRange(e){return new t(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new t(e.startLineNumber,e.endLineNumber+1)}static{this.compareByStart=(0,LTn.compareBy)(e=>e.startLineNumber,LTn.numberComparator)}static subtract(e,r){return r?e.startLineNumberr)throw new OTn.BugIndicatingError(`startLineNumber ${e} cannot be after endLineNumberExclusive ${r}`);this.startLineNumber=e,this.endLineNumberExclusive=r}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=(0,Hae.findLastIdxMonotonous)(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)this._normalizedRanges.splice(r,0,e);else if(r===n-1){let o=this._normalizedRanges[r];this._normalizedRanges[r]=o.join(e)}else{let o=this._normalizedRanges[r].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(r,n-r,o)}}contains(e){let r=(0,Hae.findLastMonotonous)(this._normalizedRanges,n=>n.startLineNumber<=e);return!!r&&r.endLineNumberExclusive>e}intersects(e){let r=(0,Hae.findLastMonotonous)(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let r=[],n=0,o=0,s=null;for(;n=c.startLineNumber?s=new jae(s.startLineNumber,Math.max(s.endLineNumberExclusive,c.endLineNumberExclusive)):(r.push(s),s=c)}return s!==null&&r.push(s),new t(r)}subtractFrom(e){let r=(0,Hae.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,c=>c.endLineNumberExclusive>=e.startLineNumber),n=(0,Hae.findLastIdxMonotonous)(this._normalizedRanges,c=>c.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)return new t([e]);let o=[],s=e.startLineNumber;for(let c=r;cs&&o.push(new jae(s,l.startLineNumber)),s=l.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let r=[],n=0,o=0;for(;nr.delta(e)))}};$ae.LineRangeSet=dTe});var Vae=T(ZKe=>{"use strict";f();Object.defineProperty(ZKe,"__esModule",{value:!0});ZKe.TextLength=void 0;var dYo=$N(),FTn=ZE(),XKe=Ef(),qjt=class t{static{a(this,"TextLength")}static{this.zero=new t(0,0)}static lengthDiffNonNegative(e,r){return r.isLessThan(e)?t.zero:e.lineCount===r.lineCount?new t(0,r.columnCount-e.columnCount):new t(r.lineCount-e.lineCount,r.columnCount)}static betweenPositions(e,r){return e.lineNumber===r.lineNumber?new t(0,r.column-e.column):new t(r.lineNumber-e.lineNumber,r.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let r=0,n=0;for(let o of e)o===` -`?(r++,n=0):n++;return new t(r,n)}static ofSubstr(e,r){return t.ofText(r.substring(e))}static sum(e,r){return e.reduce((n,o)=>n.add(r(o)),t.zero)}constructor(e,r){this.lineCount=e,this.columnCount=r}isZero(){return this.lineCount===0&&this.columnCount===0}isLessThan(e){return this.lineCount!==e.lineCount?this.lineCounte.lineCount:this.columnCount>e.columnCount}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}equals(e){return this.lineCount===e.lineCount&&this.columnCount===e.columnCount}compare(e){return this.lineCount!==e.lineCount?this.lineCount-e.lineCount:this.columnCount-e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new XKe.Range(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new XKe.Range(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new XKe.Range(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return dYo.LineRange.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new FTn.Position(e.lineNumber,e.column+this.columnCount):new FTn.Position(e.lineNumber+this.lineCount,this.columnCount+1)}addToRange(e){return XKe.Range.fromPositions(this.addToPosition(e.getStartPosition()),this.addToPosition(e.getEndPosition()))}toString(){return`${this.lineCount},${this.columnCount}`}};ZKe.TextLength=qjt});var tJe=T(zW=>{"use strict";f();Object.defineProperty(zW,"__esModule",{value:!0});zW.PositionOffsetTransformer=zW.PositionOffsetTransformerBase=void 0;zW._setPositionOffsetTransformerDependencies=mYo;var fYo=wF(),pYo=Fu(),fTe=ZE(),hYo=Ef(),eJe=class{static{a(this,"PositionOffsetTransformerBase")}getOffsetRange(e){return new pYo.OffsetRange(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return hYo.Range.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringEdit(e){let r=e.replacements.map(n=>this.getStringReplacement(n));return new O4.deps.StringEdit(r)}getStringReplacement(e){return new O4.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new O4.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let r=e.replacements.map(n=>this.getTextReplacement(n));return new O4.deps.TextEdit(r)}};zW.PositionOffsetTransformerBase=eJe;var O4=class{static{a(this,"Deps")}static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};function mYo(t){O4._deps=t}a(mYo,"_setPositionOffsetTransformerDependencies");var Gjt=class extends eJe{static{a(this,"PositionOffsetTransformer")}constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){let r=this._validatePosition(e);return this.lineStartOffsetByLineIdx[r.lineNumber-1]+r.column-1}_validatePosition(e){if(e.lineNumber<1)return new fTe.Position(1,1);let r=this.textLength.lineCount+1;if(e.lineNumber>r){let o=this.getLineLength(r);return new fTe.Position(r,o+1)}if(e.column<1)return new fTe.Position(e.lineNumber,1);let n=this.getLineLength(e.lineNumber);return e.column-1>n?new fTe.Position(e.lineNumber,n+1):e}getPosition(e){let r=(0,fYo.findLastIdxMonotonous)(this.lineStartOffsetByLineIdx,s=>s<=e),n=r+1,o=e-this.lineStartOffsetByLineIdx[r]+1;return new fTe.Position(n,o)}getTextLength(e){return O4.deps.TextLength.ofRange(this.getRange(e))}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new O4.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};zW.PositionOffsetTransformer=Gjt});var Qv=T(VN=>{"use strict";f();Object.defineProperty(VN,"__esModule",{value:!0});VN.StringText=VN.ArrayText=VN.LineBasedText=VN.AbstractText=void 0;var gYo=Jl(),AYo=C0(),yYo=ZE(),UTn=Ef(),EYo=Vae(),QTn=tJe(),pTe=class{static{a(this,"AbstractText")}constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new yYo.Position(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new UTn.Range(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new QTn.PositionOffsetTransformer(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new UTn.Range(e,1,e,Number.MAX_SAFE_INTEGER))}getLines(){let e=this.getValue();return(0,AYo.splitLines)(e)}getLinesOfRange(e){return e.mapToLineArray(r=>this.getLineAt(r))}equals(e){return this===e?!0:this.getValue()===e.getValue()}};VN.AbstractText=pTe;var rJe=class extends pTe{static{a(this,"LineBasedText")}constructor(e,r){(0,gYo.assert)(r>=1),super(),this._getLineContent=e,this._lineCount=r}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let r=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let n=e.startLineNumber+1;n{throw ibn?cbn(n,ibn):n&&typeof n=="object"&&Error.captureStackTrace(n,rn.exports.fetch),n})},"fetch");rn.exports.Headers=BV().Headers;rn.exports.Response=wve().Response;rn.exports.Request=Sse().Request;rn.exports.FormData=gWe().FormData;var{setGlobalOrigin:mWo,getGlobalOrigin:gWo}=mQt();rn.exports.setGlobalOrigin=mWo;rn.exports.getGlobalOrigin=gWo;var{CacheStorage:AWo}=G1n(),{kConstruct:yWo}=rc();rn.exports.caches=new AWo(yWo);var{deleteCookie:EWo,getCookies:_Wo,getSetCookies:CWo,setCookie:vWo,parseCookie:bWo}=tvn();rn.exports.deleteCookie=EWo;rn.exports.getCookies=_Wo;rn.exports.getSetCookies=CWo;rn.exports.setCookie=vWo;rn.exports.parseCookie=bWo;var{parseMIMEType:TWo,serializeAMimeType:SWo}=oS();rn.exports.parseMIMEType=TWo;rn.exports.serializeAMimeType=SWo;var{CloseEvent:IWo,ErrorEvent:xWo,MessageEvent:wWo}=Nze(),{WebSocket:RWo,ping:PWo}=Ovn();rn.exports.WebSocket=RWo;rn.exports.CloseEvent=IWo;rn.exports.ErrorEvent=xWo;rn.exports.MessageEvent=wWo;rn.exports.ping=PWo;rn.exports.WebSocketStream=Hvn().WebSocketStream;rn.exports.WebSocketError=NHt().WebSocketError;rn.exports.request=Qve(Bse.request);rn.exports.stream=Qve(Bse.stream);rn.exports.pipeline=Qve(Bse.pipeline);rn.exports.connect=Qve(Bse.connect);rn.exports.upgrade=Qve(Bse.upgrade);rn.exports.MockClient=rWo;rn.exports.MockCallHistory=nWo;rn.exports.MockCallHistoryLog=iWo;rn.exports.MockPool=sWo;rn.exports.MockAgent=oWo;rn.exports.SnapshotAgent=aWo;rn.exports.mockErrors=cWo;var{EventSource:kWo}=nbn();rn.exports.EventSource=kWo;function DWo(){globalThis.fetch=rn.exports.fetch,globalThis.Headers=rn.exports.Headers,globalThis.Response=rn.exports.Response,globalThis.Request=rn.exports.Request,globalThis.FormData=rn.exports.FormData,globalThis.WebSocket=rn.exports.WebSocket,globalThis.CloseEvent=rn.exports.CloseEvent,globalThis.ErrorEvent=rn.exports.ErrorEvent,globalThis.MessageEvent=rn.exports.MessageEvent,globalThis.EventSource=rn.exports.EventSource}a(DWo,"install");rn.exports.install=DWo});var Sv=T(VV=>{"use strict";f();Object.defineProperty(VV,"__esModule",{value:!0});VV.DebugNameData=void 0;VV.getDebugName=cTn;VV.getClassName=lTn;VV.getFunctionName=uTn;var yjt=class{static{a(this,"DebugNameData")}constructor(e,r,n){this.owner=e,this.debugNameSource=r,this.referenceFn=n}getDebugName(e){return cTn(e,this)}};VV.DebugNameData=yjt;var oTn=new Map,Ejt=new WeakMap;function cTn(t,e){let r=Ejt.get(t);if(r)return r;let n=Fzo(t,e);if(n){let o=oTn.get(n)??0;o++,oTn.set(n,o);let s=o===1?n:`${n}#${o}`;return Ejt.set(t,s),s}}a(cTn,"getDebugName");function Fzo(t,e){let r=Ejt.get(t);if(r)return r;let n=e.owner?Qzo(e.owner)+".":"",o,s=e.debugNameSource;if(s!==void 0)if(typeof s=="function"){if(o=s(),o!==void 0)return n+o}else return n+s;let c=e.referenceFn;if(c!==void 0&&(o=uTn(c),o!==void 0))return n+o;if(e.owner!==void 0){let l=Uzo(e.owner,t);if(l!==void 0)return n+l}}a(Fzo,"computeDebugName");function Uzo(t,e){for(let r in t)if(t[r]===e)return r}a(Uzo,"findKey");var sTn=new Map,aTn=new WeakMap;function Qzo(t){let e=aTn.get(t);if(e)return e;let r=lTn(t)??"Object",n=sTn.get(r)??0;n++,sTn.set(r,n);let o=n===1?r:`${r}#${n}`;return aTn.set(t,o),o}a(Qzo,"formatOwner");function lTn(t){let e=t.constructor;if(e)return e.name==="Object"?void 0:e.name}a(lTn,"getClassName");function uTn(t){let e=t.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e);return(n?n[1]:void 0)?.trim()}a(uTn,"getFunctionName")});var bTn=T(qd=>{"use strict";f();var qzo=qd&&qd.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gzo=qd&&qd.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hzo=qd&&qd.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ot===e}a(hTn,"strictEqualsC");function mTn(t,e,r){return pTn.equals(t,e,r??bYe)}a(mTn,"arrayEquals");function gTn(t){return(e,r)=>pTn.equals(e,r,t??bYe)}a(gTn,"arrayEqualsC");function Xve(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0;rXve(t,e)}a(ATn,"structuralEqualsC");function jzo(t){return JSON.stringify(_jt(t))}a(jzo,"getStructuralKey");var $zo=0,dTn=new WeakMap;function _jt(t){if(Array.isArray(t))return t.map(_jt);if(t&&typeof t=="object")if(Object.getPrototypeOf(t)===Object.prototype){let e=t,r=Object.create(null);for(let n of Object.keys(e).sort())r[n]=_jt(e[n]);return r}else{let e=dTn.get(t);return e===void 0&&(e=$zo++,dTn.set(t,e)),e+"----2b76a038c20c4bcc"}return t}a(_jt,"toNormalizedJsonStructure");function yTn(t,e){return JSON.stringify(t)===JSON.stringify(e)}a(yTn,"jsonStringifyEquals");function ETn(){return(t,e)=>JSON.stringify(t)===JSON.stringify(e)}a(ETn,"jsonStringifyEqualsC");function _Tn(){return(t,e)=>t.equals(e)}a(_Tn,"thisEqualsC");function CTn(t,e,r){return t==null||e===void 0||e===null?e===t:r(t,e)}a(CTn,"equalsIfDefined");function vTn(t){return(e,r)=>e==null||r===void 0||r===null?r===e:t(e,r)}a(vTn,"equalsIfDefinedC");var fTn;(function(t){t.strict=bYe,t.strictC=hTn,t.array=mTn,t.arrayC=gTn,t.structural=Xve,t.structuralC=ATn,t.jsonStringify=yTn,t.jsonStringifyC=ETn,t.thisC=_Tn,t.ifDefined=CTn,t.ifDefinedC=vTn})(fTn||(qd.equals=fTn={}))});var Cy=T(Gd=>{"use strict";f();Object.defineProperty(Gd,"__esModule",{value:!0});Gd.trackDisposable=Gd.toDisposable=Gd.markAsDisposed=Gd.DisposableStore=Gd.Event=Gd.onUnexpectedError=Gd.onBugIndicatingError=Gd.BugIndicatingError=Gd.strictEquals=Gd.assertFn=void 0;var Vzo=Hl();Object.defineProperty(Gd,"assertFn",{enumerable:!0,get:a(function(){return Vzo.assertFn},"get")});var Wzo=bTn();Object.defineProperty(Gd,"strictEquals",{enumerable:!0,get:a(function(){return Wzo.strictEquals},"get")});var Cjt=Ko();Object.defineProperty(Gd,"BugIndicatingError",{enumerable:!0,get:a(function(){return Cjt.BugIndicatingError},"get")});Object.defineProperty(Gd,"onBugIndicatingError",{enumerable:!0,get:a(function(){return Cjt.onBugIndicatingError},"get")});Object.defineProperty(Gd,"onUnexpectedError",{enumerable:!0,get:a(function(){return Cjt.onUnexpectedError},"get")});var zzo=Xa();Object.defineProperty(Gd,"Event",{enumerable:!0,get:a(function(){return zzo.Event},"get")});var TYe=ro();Object.defineProperty(Gd,"DisposableStore",{enumerable:!0,get:a(function(){return TYe.DisposableStore},"get")});Object.defineProperty(Gd,"markAsDisposed",{enumerable:!0,get:a(function(){return TYe.markAsDisposed},"get")});Object.defineProperty(Gd,"toDisposable",{enumerable:!0,get:a(function(){return TYe.toDisposable},"get")});Object.defineProperty(Gd,"trackDisposable",{enumerable:!0,get:a(function(){return TYe.trackDisposable},"get")})});var TTn=T(vjt=>{"use strict";f();Object.defineProperty(vjt,"__esModule",{value:!0});vjt.handleBugIndicatingErrorRecovery=Kzo;var Yzo=Cy();function Kzo(t){let e=new Error("BugIndicatingErrorRecovery: "+t);(0,Yzo.onUnexpectedError)(e),console.error("recovered from an error that indicates a bug",e)}a(Kzo,"handleBugIndicatingErrorRecovery")});var x5=T(jse=>{"use strict";f();Object.defineProperty(jse,"__esModule",{value:!0});jse.addLogger=Jzo;jse.getLogger=Xzo;jse.setLogObservableFn=Zzo;jse.logObservable=eYo;var WV;function Jzo(t){WV?WV instanceof SYe?WV.loggers.push(t):WV=new SYe([WV,t]):WV=t}a(Jzo,"addLogger");function Xzo(){return WV}a(Xzo,"getLogger");var bjt;function Zzo(t){bjt=t}a(Zzo,"setLogObservableFn");function eYo(t){bjt&&bjt(t)}a(eYo,"logObservable");var SYe=class{static{a(this,"ComposedLogger")}constructor(e){this.loggers=e}handleObservableCreated(e,r){for(let n of this.loggers)n.handleObservableCreated(e,r)}handleOnListenerCountChanged(e,r){for(let n of this.loggers)n.handleOnListenerCountChanged(e,r)}handleObservableUpdated(e,r){for(let n of this.loggers)n.handleObservableUpdated(e,r)}handleAutorunCreated(e,r){for(let n of this.loggers)n.handleAutorunCreated(e,r)}handleAutorunDisposed(e){for(let r of this.loggers)r.handleAutorunDisposed(e)}handleAutorunDependencyChanged(e,r,n){for(let o of this.loggers)o.handleAutorunDependencyChanged(e,r,n)}handleAutorunStarted(e){for(let r of this.loggers)r.handleAutorunStarted(e)}handleAutorunFinished(e){for(let r of this.loggers)r.handleAutorunFinished(e)}handleDerivedDependencyChanged(e,r,n){for(let o of this.loggers)o.handleDerivedDependencyChanged(e,r,n)}handleDerivedCleared(e){for(let r of this.loggers)r.handleDerivedCleared(e)}handleBeginTransaction(e){for(let r of this.loggers)r.handleBeginTransaction(e)}handleEndTransaction(e){for(let r of this.loggers)r.handleEndTransaction(e)}}});var U9=T(F9=>{"use strict";f();Object.defineProperty(F9,"__esModule",{value:!0});F9.TransactionImpl=void 0;F9.transaction=Tjt;F9.globalTransaction=rYo;F9.asyncTransaction=nYo;F9.subtransaction=iYo;var STn=TTn(),tYo=Sv(),ITn=x5();function Tjt(t,e){let r=new $se(t,e);try{t(r)}finally{r.finish()}}a(Tjt,"transaction");var IYe;function rYo(t){if(IYe)t(IYe);else{let e=new $se(t,void 0);IYe=e;try{t(e)}finally{e.finish(),IYe=void 0}}}a(rYo,"globalTransaction");async function nYo(t,e){let r=new $se(t,e);try{await t(r)}finally{r.finish()}}a(nYo,"asyncTransaction");function iYo(t,e,r){t?e(t):Tjt(e,r)}a(iYo,"subtransaction");var $se=class{static{a(this,"TransactionImpl")}constructor(e,r){this._fn=e,this._getDebugName=r,this._updatingObservers=[],(0,ITn.getLogger)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,tYo.getFunctionName)(this._fn)}updateObserver(e,r){if(!this._updatingObservers){(0,STn.handleBugIndicatingErrorRecovery)("Transaction already finished!"),Tjt(n=>{n.updateObserver(e,r)});return}this._updatingObservers.push({observer:e,observable:r}),e.beginUpdate(r)}finish(){let e=this._updatingObservers;if(!e){(0,STn.handleBugIndicatingErrorRecovery)("transaction.finish() has already been called!");return}for(let r=0;r{"use strict";f();Object.defineProperty(xYe,"__esModule",{value:!0});xYe.DebugLocation=void 0;var xTn;(function(t){let e=!1;function r(){e=!0}a(r,"enable"),t.enable=r;function n(){if(!e)return;let o=Error,s=o.stackTraceLimit;o.stackTraceLimit=3;let c=new Error().stack;return o.stackTraceLimit=s,Sjt.fromStack(c,2)}a(n,"ofCaller"),t.ofCaller=n})(xTn||(xYe.DebugLocation=xTn={}));var Sjt=class t{static{a(this,"DebugLocationImpl")}static fromStack(e,r){let n=e.split(` +`),o=oYo(n[r+1]);if(o)return new t(o.fileName,o.line,o.column,o.id)}constructor(e,r,n,o){this.fileName=e,this.line=r,this.column=n,this.id=o}};function oYo(t){let e=t.match(/\((.*):(\d+):(\d+)\)/);if(e)return{fileName:e[1],line:parseInt(e[2]),column:parseInt(e[3]),id:t};let r=t.match(/at ([^\(\)]*):(\d+):(\d+)/);if(r)return{fileName:r[1],line:parseInt(r[2]),column:parseInt(r[3]),id:t}}a(oYo,"parseLine")});var xw=T(w5=>{"use strict";f();Object.defineProperty(w5,"__esModule",{value:!0});w5.BaseObservable=w5.ConvenientObservable=void 0;w5._setDerivedOpts=aYo;w5._setRecomputeInitiallyAndOnChange=cYo;w5._setKeepObserved=lYo;w5._setDebugGetObservableGraph=uYo;var wTn=Iv(),sYo=Sv(),Vse=x5(),Ijt;function aYo(t){Ijt=t}a(aYo,"_setDerivedOpts");var RTn;function cYo(t){RTn=t}a(cYo,"_setRecomputeInitiallyAndOnChange");var PTn;function lYo(t){PTn=t}a(lYo,"_setKeepObserved");var xjt;function uYo(t){xjt=t}a(uYo,"_setDebugGetObservableGraph");var wYe=class{static{a(this,"ConvenientObservable")}get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,r,n=wTn.DebugLocation.ofCaller()){let o=r===void 0?void 0:e,s=r===void 0?e:r;return Ijt({owner:o,debugName:a(()=>{let c=(0,sYo.getFunctionName)(s);if(c!==void 0)return c;let u=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(s.toString());if(u)return`${this.debugName}.${u[2]}`;if(!o)return`${this.debugName} (mapped)`},"debugName"),debugReferenceFn:s},c=>s(this.read(c),c),n)}flatten(){return Ijt({owner:void 0,debugName:a(()=>`${this.debugName} (flattened)`,"debugName")},e=>this.read(e).read(e))}recomputeInitiallyAndOnChange(e,r){return e.add(RTn(this,r)),this}keepObserved(e){return e.add(PTn(this)),this}get debugValue(){return this.get()}get debug(){return new wjt(this)}};w5.ConvenientObservable=wYe;var wjt=class{static{a(this,"DebugHelper")}constructor(e){this.observable=e}getDependencyGraph(){return xjt(this.observable,{type:"dependencies"})}getObserverGraph(){return xjt(this.observable,{type:"observers"})}},Rjt=class extends wYe{static{a(this,"BaseObservable")}constructor(e){super(),this._observers=new Set,(0,Vse.getLogger)()?.handleObservableCreated(this,e)}addObserver(e){let r=this._observers.size;this._observers.add(e),r===0&&this.onFirstObserverAdded(),r!==this._observers.size&&(0,Vse.getLogger)()?.handleOnListenerCountChanged(this,this._observers.size)}removeObserver(e){let r=this._observers.delete(e);r&&this._observers.size===0&&this.onLastObserverRemoved(),r&&(0,Vse.getLogger)()?.handleOnListenerCountChanged(this,this._observers.size)}onFirstObserverAdded(){}onLastObserverRemoved(){}log(){let e=!!(0,Vse.getLogger)();return(0,Vse.logObservable)(this),e||(0,Vse.getLogger)()?.handleObservableCreated(this,wTn.DebugLocation.ofCaller()),this}debugGetObservers(){return this._observers}};w5.BaseObservable=Rjt});var q9=T(Q9=>{"use strict";f();Object.defineProperty(Q9,"__esModule",{value:!0});Q9.DisposableObservableValue=Q9.ObservableValue=void 0;Q9.observableValue=pYo;Q9.disposableObservableValue=hYo;var dYo=U9(),fYo=xw(),DTn=Cy(),RYe=Sv(),kTn=x5(),NTn=Iv();function pYo(t,e,r=NTn.DebugLocation.ofCaller()){let n;return typeof t=="string"?n=new RYe.DebugNameData(void 0,t,void 0):n=new RYe.DebugNameData(t,void 0,void 0),new Zve(n,e,DTn.strictEquals,r)}a(pYo,"observableValue");var Zve=class extends fYo.BaseObservable{static{a(this,"ObservableValue")}get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,r,n,o){super(o),this._debugNameData=e,this._equalityComparator=n,this._value=r,(0,kTn.getLogger)()?.handleObservableUpdated(this,{hadValue:!1,newValue:r,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,r,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let o;r||(r=o=new dYo.TransactionImpl(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(0,kTn.getLogger)()?.handleObservableUpdated(this,{oldValue:s,newValue:e,change:n,didChange:!0,hadValue:!0});for(let c of this._observers)r.updateObserver(c,this),c.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}};Q9.ObservableValue=Zve;function hYo(t,e,r=NTn.DebugLocation.ofCaller()){let n;return typeof t=="string"?n=new RYe.DebugNameData(void 0,t,void 0):n=new RYe.DebugNameData(t,void 0,void 0),new PYe(n,e,DTn.strictEquals,r)}a(hYo,"disposableObservableValue");var PYe=class extends Zve{static{a(this,"DisposableObservableValue")}_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}};Q9.DisposableObservableValue=PYe});var OTn=T(kYe=>{"use strict";f();Object.defineProperty(kYe,"__esModule",{value:!0});kYe.LazyObservableValue=void 0;var mYo=U9(),MTn=x5(),gYo=xw(),Pjt=class extends gYo.BaseObservable{static{a(this,"LazyObservableValue")}get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,r,n,o){super(o),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=r}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas){(0,MTn.getLogger)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let r of this._observers)r.handleChange(this,e)}this._deltas.length=0}else{(0,MTn.getLogger)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(let e of this._observers)e.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();let e=[...this._observers];for(let r of e)r.endUpdate(this)}}addObserver(e){let r=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),r&&e.beginUpdate(this)}removeObserver(e){let r=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),r&&e.endUpdate(this)}set(e,r,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let o;r||(r=o=new mYo.TransactionImpl(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),r.updateObserver({beginUpdate:a(()=>this._beginUpdate(),"beginUpdate"),endUpdate:a(()=>this._endUpdate(),"endUpdate"),handleChange:a((s,c)=>{},"handleChange"),handlePossibleChange:a(s=>{},"handlePossibleChange")},this),this._updateCounter>1)for(let s of this._observers)s.handlePossibleChange(this)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};kYe.LazyObservableValue=Pjt});var DYe=T(kjt=>{"use strict";f();Object.defineProperty(kjt,"__esModule",{value:!0});kjt.observableValueOpts=_Yo;var BTn=Sv(),LTn=Cy(),AYo=q9(),yYo=OTn(),EYo=Iv();function _Yo(t,e,r=EYo.DebugLocation.ofCaller()){return t.lazy?new yYo.LazyObservableValue(new BTn.DebugNameData(t.owner,t.debugName,void 0),e,t.equalsFn??LTn.strictEquals,r):new AYo.ObservableValue(new BTn.DebugNameData(t.owner,t.debugName,void 0),e,t.equalsFn??LTn.strictEquals,r)}a(_Yo,"observableValueOpts")});var MYe=T(NYe=>{"use strict";f();Object.defineProperty(NYe,"__esModule",{value:!0});NYe.AutorunObserver=void 0;var mS=Cy(),ebe=x5();function CYo(t){switch(t){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return""}}a(CYo,"autorunStateToString");var Djt=class{static{a(this,"AutorunObserver")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,r,n,o){this._debugNameData=e,this._runFn=r,this._changeTracker=n,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._iteration=0,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,ebe.getLogger)()?.handleAutorunCreated(this,o),this._run(),(0,mS.trackDisposable)(this)}dispose(){if(!this._disposed){this._disposed=!0;for(let e of this._dependencies)e.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&this._store.dispose(),this._delayedStore!==void 0&&this._delayedStore.dispose(),(0,ebe.getLogger)()?.handleAutorunDisposed(this),(0,mS.markAsDisposed)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,ebe.getLogger)()?.handleAutorunStarted(this);let r=this._changeSummary,n=this._delayedStore;n!==void 0&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,r),this._changeSummary=this._changeTracker.createChangeSummary(r)),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._runFn(this,r)}catch(o){(0,mS.onBugIndicatingError)(o)}finally{this._isRunning=!1,n!==void 0&&n.dispose()}}}finally{this._disposed||(0,ebe.getLogger)()?.handleAutorunFinished(this);for(let r of this._dependenciesToBeRemoved)r.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){this._state===3&&(this._checkIterations(),this._state=1),this._updateCount++}endUpdate(e){try{if(this._updateCount===1){this._iteration=1;do{if(this._checkIterations())return;if(this._state===1){this._state=3;for(let r of this._dependencies)if(r.reportChanges(),this._state===2)break}this._iteration++,this._state!==3&&this._run()}while(this._state!==3)}}finally{this._updateCount--}(0,mS.assertFn)(()=>this._updateCount>=0)}handlePossibleChange(e){this._state===3&&this._isDependency(e)&&(this._checkIterations(),this._state=1)}handleChange(e,r){if(this._isDependency(e)){(0,ebe.getLogger)()?.handleAutorunDependencyChanged(this,e,r);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:r,didChange:a(o=>o===e,"didChange")},this._changeSummary))&&(this._checkIterations(),this._state=2)}catch(n){(0,mS.onBugIndicatingError)(n)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new mS.BugIndicatingError("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let r=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),r}get store(){if(this._ensureNoRunning(),this._disposed)throw new mS.BugIndicatingError("Cannot access store after dispose");return this._store===void 0&&(this._store=new mS.DisposableStore),this._store}get delayedStore(){if(this._ensureNoRunning(),this._disposed)throw new mS.BugIndicatingError("Cannot access store after dispose");return this._delayedStore===void 0&&(this._delayedStore=new mS.DisposableStore),this._delayedStore}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:CYo(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}_checkIterations(){return this._iteration>100?((0,mS.onBugIndicatingError)(new mS.BugIndicatingError(`Autorun '${this.debugName}' is stuck in an infinite update loop.`)),!0):!1}};NYe.AutorunObserver=Djt});var Wse=T(R5=>{"use strict";f();Object.defineProperty(R5,"__esModule",{value:!0});R5.autorun=FTn;R5.autorunOpts=LYe;R5.autorunHandleChanges=UTn;R5.autorunWithStoreHandleChanges=vYo;R5.autorunWithStore=bYo;R5.autorunDelta=TYo;R5.autorunIterableDelta=SYo;R5.autorunSelfDisposable=IYo;var OYe=Cy(),Njt=Sv(),Mjt=MYe(),BYe=Iv();function FTn(t,e=BYe.DebugLocation.ofCaller()){return new Mjt.AutorunObserver(new Njt.DebugNameData(void 0,void 0,t),t,void 0,e)}a(FTn,"autorun");function LYe(t,e,r=BYe.DebugLocation.ofCaller()){return new Mjt.AutorunObserver(new Njt.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??e),e,void 0,r)}a(LYe,"autorunOpts");function UTn(t,e,r=BYe.DebugLocation.ofCaller()){return new Mjt.AutorunObserver(new Njt.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??e),e,t.changeTracker,r)}a(UTn,"autorunHandleChanges");function vYo(t,e){let r=new OYe.DisposableStore,n=UTn({owner:t.owner,debugName:t.debugName,debugReferenceFn:t.debugReferenceFn??e,changeTracker:t.changeTracker},(o,s)=>{r.clear(),e(o,s,r)});return(0,OYe.toDisposable)(()=>{n.dispose(),r.dispose()})}a(vYo,"autorunWithStoreHandleChanges");function bYo(t){let e=new OYe.DisposableStore,r=LYe({owner:void 0,debugName:void 0,debugReferenceFn:t},n=>{e.clear(),t(n,e)});return(0,OYe.toDisposable)(()=>{r.dispose(),e.dispose()})}a(bYo,"autorunWithStore");function TYo(t,e){let r;return LYe({debugReferenceFn:e},n=>{let o=t.read(n),s=r;r=o,e({lastValue:s,newValue:o})})}a(TYo,"autorunDelta");function SYo(t,e,r=n=>n){let n=new Map;return LYe({debugReferenceFn:t},o=>{let s=new Map,c=new Map(n);for(let l of t(o)){let u=r(l);n.has(u)?c.delete(u):(s.set(u,l),n.set(u,l))}for(let l of c.keys())n.delete(l);(s.size||c.size)&&e({addedValues:[...s.values()],removedValues:[...c.values()]})})}a(SYo,"autorunIterableDelta");function IYo(t,e=BYe.DebugLocation.ofCaller()){let r,n=!1;return r=FTn(o=>{t({delayedStore:o.delayedStore,store:o.store,readObservable:o.readObservable.bind(o),dispose:a(()=>{r?.dispose(),n=!0},"dispose")})},e),n&&r.dispose(),r}a(IYo,"autorunSelfDisposable")});var Yse=T(zse=>{"use strict";f();Object.defineProperty(zse,"__esModule",{value:!0});zse.DerivedWithSetter=zse.Derived=void 0;var xYo=xw(),zV=Cy(),Ojt=x5();function wYo(t){switch(t){case 0:return"initial";case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return""}}a(wYo,"derivedStateToString");var FYe=class extends xYo.BaseObservable{static{a(this,"Derived")}get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,r,n,o=void 0,s,c){super(c),this._debugNameData=e,this._computeFn=r,this._changeTracker=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this._state=0,this._value=void 0,this._updateCount=0,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._changeSummary=void 0,this._isUpdating=!1,this._isComputing=!1,this._didReportChange=!1,this._isInBeforeUpdate=!1,this._isReaderValid=!1,this._store=void 0,this._delayedStore=void 0,this._removedObserverToCallEndUpdateOn=null,this._changeSummary=this._changeTracker?.createChangeSummary(void 0)}onLastObserverRemoved(){this._state=0,this._value=void 0,(0,Ojt.getLogger)()?.handleDerivedCleared(this);for(let e of this._dependencies)e.removeObserver(this);this._dependencies.clear(),this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._delayedStore!==void 0&&(this._delayedStore.dispose(),this._delayedStore=void 0),this._handleLastObserverRemoved?.()}get(){if(this._isComputing,this._observers.size===0){let r;try{this._isReaderValid=!0;let n;this._changeTracker&&(n=this._changeTracker.createChangeSummary(void 0),this._changeTracker.beforeUpdate?.(this,n)),r=this._computeFn(this,n)}finally{this._isReaderValid=!1}return this.onLastObserverRemoved(),r}else{do{if(this._state===1){for(let r of this._dependencies)if(r.reportChanges(),this._state===2)break}this._state===1&&(this._state=3),this._state!==3&&this._recompute()}while(this._state!==3);return this._value}}_recompute(){let e=!1;this._isComputing=!0,this._didReportChange=!1;let r=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=r;try{let n=this._changeSummary;this._isReaderValid=!0,this._changeTracker&&(this._isInBeforeUpdate=!0,this._changeTracker.beforeUpdate?.(this,n),this._isInBeforeUpdate=!1,this._changeSummary=this._changeTracker?.createChangeSummary(n));let o=this._state!==0,s=this._value;this._state=3;let c=this._delayedStore;c!==void 0&&(this._delayedStore=void 0);try{this._store!==void 0&&(this._store.dispose(),this._store=void 0),this._value=this._computeFn(this,n)}finally{this._isReaderValid=!1;for(let l of this._dependenciesToBeRemoved)l.removeObserver(this);this._dependenciesToBeRemoved.clear(),c!==void 0&&c.dispose()}e=this._didReportChange||o&&!this._equalityComparator(s,this._value),(0,Ojt.getLogger)()?.handleObservableUpdated(this,{oldValue:s,newValue:this._value,change:void 0,didChange:e,hadValue:o})}catch(n){(0,zV.onBugIndicatingError)(n)}if(this._isComputing=!1,!this._didReportChange&&e)for(let n of this._observers)n.handleChange(this,void 0);else this._didReportChange=!1}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){if(this._isUpdating)throw new zV.BugIndicatingError("Cyclic deriveds are not supported yet!");this._updateCount++,this._isUpdating=!0;try{let r=this._updateCount===1;if(this._state===3&&(this._state=1,!r))for(let n of this._observers)n.handlePossibleChange(this);if(r)for(let n of this._observers)n.beginUpdate(this)}finally{this._isUpdating=!1}}endUpdate(e){if(this._updateCount--,this._updateCount===0){let r=[...this._observers];for(let n of r)n.endUpdate(this);if(this._removedObserverToCallEndUpdateOn){let n=[...this._removedObserverToCallEndUpdateOn];this._removedObserverToCallEndUpdateOn=null;for(let o of n)o.endUpdate(this)}}(0,zV.assertFn)(()=>this._updateCount>=0)}handlePossibleChange(e){if(this._state===3&&this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)){this._state=1;for(let r of this._observers)r.handlePossibleChange(this)}}handleChange(e,r){if(this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)||this._isInBeforeUpdate){(0,Ojt.getLogger)()?.handleDerivedDependencyChanged(this,e,r);let n=!1;try{n=this._changeTracker?this._changeTracker.handleChange({changedObservable:e,change:r,didChange:a(s=>s===e,"didChange")},this._changeSummary):!0}catch(s){(0,zV.onBugIndicatingError)(s)}let o=this._state===3;if(n&&(this._state===1||o)&&(this._state=2,o))for(let s of this._observers)s.handlePossibleChange(this)}}_ensureReaderValid(){if(!this._isReaderValid)throw new zV.BugIndicatingError("The reader object cannot be used outside its compute function!")}readObservable(e){this._ensureReaderValid(),e.addObserver(this);let r=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),r}reportChange(e){this._ensureReaderValid(),this._didReportChange=!0;for(let r of this._observers)r.handleChange(this,e)}get store(){return this._ensureReaderValid(),this._store===void 0&&(this._store=new zV.DisposableStore),this._store}get delayedStore(){return this._ensureReaderValid(),this._delayedStore===void 0&&(this._delayedStore=new zV.DisposableStore),this._delayedStore}addObserver(e){let r=!this._observers.has(e)&&this._updateCount>0;super.addObserver(e),r&&(this._removedObserverToCallEndUpdateOn?.delete(e)||e.beginUpdate(this))}removeObserver(e){this._observers.has(e)&&this._updateCount>0&&(this._removedObserverToCallEndUpdateOn||(this._removedObserverToCallEndUpdateOn=new Set),this._removedObserverToCallEndUpdateOn.add(e)),super.removeObserver(e)}debugGetState(){return{state:this._state,stateStr:wYo(this._state),updateCount:this._updateCount,isComputing:this._isComputing,dependencies:this._dependencies,value:this._value}}debugSetValue(e){this._value=e}debugRecompute(){this.beginUpdate(this);try{this._isComputing?this._state=2:this._recompute()}finally{this.endUpdate(this)}}setValue(e,r,n){this._value=e;let o=this._observers;r.updateObserver(this,this);for(let s of o)s.handleChange(this,n)}};zse.Derived=FYe;var Bjt=class extends FYe{static{a(this,"DerivedWithSetter")}constructor(e,r,n,o=void 0,s,c,l){super(e,r,n,o,s,l),this.set=c}};zse.DerivedWithSetter=Bjt});var UYe=T(G9=>{"use strict";f();Object.defineProperty(G9,"__esModule",{value:!0});G9.derived=PYo;G9.derivedWithSetter=kYo;G9.derivedOpts=QTn;G9.derivedHandleChanges=DYo;G9.derivedWithStore=NYo;G9.derivedDisposable=MYo;var P5=Cy(),Kse=Iv(),YV=Sv(),RYo=xw(),KV=Yse();function PYo(t,e,r=Kse.DebugLocation.ofCaller()){return e!==void 0?new KV.Derived(new YV.DebugNameData(t,void 0,e),e,void 0,void 0,P5.strictEquals,r):new KV.Derived(new YV.DebugNameData(void 0,void 0,t),t,void 0,void 0,P5.strictEquals,r)}a(PYo,"derived");function kYo(t,e,r,n=Kse.DebugLocation.ofCaller()){return new KV.DerivedWithSetter(new YV.DebugNameData(t,void 0,e),e,void 0,void 0,P5.strictEquals,r,n)}a(kYo,"derivedWithSetter");function QTn(t,e,r=Kse.DebugLocation.ofCaller()){return new KV.Derived(new YV.DebugNameData(t.owner,t.debugName,t.debugReferenceFn),e,void 0,t.onLastObserverRemoved,t.equalsFn??P5.strictEquals,r)}a(QTn,"derivedOpts");(0,RYo._setDerivedOpts)(QTn);function DYo(t,e,r=Kse.DebugLocation.ofCaller()){return new KV.Derived(new YV.DebugNameData(t.owner,t.debugName,void 0),e,t.changeTracker,void 0,t.equalityComparer??P5.strictEquals,r)}a(DYo,"derivedHandleChanges");function NYo(t,e,r=Kse.DebugLocation.ofCaller()){let n,o;e===void 0?(n=t,o=void 0):(o=t,n=e);let s=new P5.DisposableStore;return new KV.Derived(new YV.DebugNameData(o,void 0,n),c=>(s.isDisposed?s=new P5.DisposableStore:s.clear(),n(c,s)),void 0,()=>s.dispose(),P5.strictEquals,r)}a(NYo,"derivedWithStore");function MYo(t,e,r=Kse.DebugLocation.ofCaller()){let n,o;e===void 0?(n=t,o=void 0):(o=t,n=e);let s;return new KV.Derived(new YV.DebugNameData(o,void 0,n),c=>{s?s.clear():s=new P5.DisposableStore;let l=n(c);return l&&s.add(l),l},void 0,()=>{s&&(s.dispose(),s=void 0)},P5.strictEquals,r)}a(MYo,"derivedDisposable")});var jTn=T(k5=>{"use strict";f();Object.defineProperty(k5,"__esModule",{value:!0});k5.ObservableLazyPromise=k5.PromiseResult=k5.ObservablePromise=k5.ObservableLazy=void 0;var qTn=U9(),GTn=UYe(),HTn=q9(),QYe=class{static{a(this,"ObservableLazy")}get cachedValue(){return this._value}constructor(e){this._computeValue=e,this._value=(0,HTn.observableValue)(this,void 0)}getValue(){let e=this._value.get();return e||(e=this._computeValue(),this._value.set(e,void 0)),e}};k5.ObservableLazy=QYe;var qYe=class t{static{a(this,"ObservablePromise")}static fromFn(e){return new t(e())}static resolved(e){return new t(Promise.resolve(e))}constructor(e){this._value=(0,HTn.observableValue)(this,void 0),this.promiseResult=this._value,this.resolvedValue=(0,GTn.derived)(this,r=>{let n=this.promiseResult.read(r);if(n)return n.getDataOrThrow()}),this.promise=e.then(r=>((0,qTn.transaction)(n=>{this._value.set(new tbe(r,void 0),n)}),r),r=>{throw(0,qTn.transaction)(n=>{this._value.set(new tbe(void 0,r),n)}),r})}};k5.ObservablePromise=qYe;var tbe=class{static{a(this,"PromiseResult")}constructor(e,r){this.data=e,this.error=r}getDataOrThrow(){if(this.error)throw this.error;return this.data}};k5.PromiseResult=tbe;var Ljt=class{static{a(this,"ObservableLazyPromise")}constructor(e){this._computePromise=e,this._lazyValue=new QYe(()=>new qYe(this._computePromise())),this.cachedPromiseResult=(0,GTn.derived)(this,r=>this._lazyValue.cachedValue.read(r)?.promiseResult.read(r))}getPromise(){return this._lazyValue.getValue().promise}};k5.ObservableLazyPromise=Ljt});var Ujt=T(D5=>{"use strict";f();Object.defineProperty(D5,"__esModule",{value:!0});D5.cancelOnDispose=D5.CancellationTokenSource=D5.CancellationToken=D5.CancellationError=void 0;var OYo=Ko();Object.defineProperty(D5,"CancellationError",{enumerable:!0,get:a(function(){return OYo.CancellationError},"get")});var Fjt=n4();Object.defineProperty(D5,"CancellationToken",{enumerable:!0,get:a(function(){return Fjt.CancellationToken},"get")});Object.defineProperty(D5,"CancellationTokenSource",{enumerable:!0,get:a(function(){return Fjt.CancellationTokenSource},"get")});Object.defineProperty(D5,"cancelOnDispose",{enumerable:!0,get:a(function(){return Fjt.cancelOnDispose},"get")})});var $Tn=T(GYe=>{"use strict";f();Object.defineProperty(GYe,"__esModule",{value:!0});GYe.waitForState=qYo;GYe.derivedWithCancellationToken=GYo;var BYo=Sv(),Qjt=Ujt(),LYo=Cy(),FYo=Wse(),UYo=Yse(),QYo=Iv();function qYo(t,e,r,n){return e||(e=a(o=>o!=null,"predicate")),new Promise((o,s)=>{let c=!0,l=!1,u=t.map(p=>({isFinished:e(p),error:r?r(p):!1,state:p})),d=(0,FYo.autorun)(p=>{let{isFinished:h,error:m,state:g}=u.read(p);(h||m)&&(c?l=!0:d.dispose(),m?s(m===!0?g:m):o(g))});if(n){let p=n.onCancellationRequested(()=>{d.dispose(),p.dispose(),s(new Qjt.CancellationError)});if(n.isCancellationRequested){d.dispose(),p.dispose(),s(new Qjt.CancellationError);return}}c=!1,l&&d.dispose()})}a(qYo,"waitForState");function GYo(t,e){let r,n;e===void 0?(r=t,n=void 0):(n=t,r=e);let o;return new UYo.Derived(new BYo.DebugNameData(n,void 0,r),s=>(o&&o.dispose(!0),o=new Qjt.CancellationTokenSource,r(s,o.token)),void 0,()=>o?.dispose(),LYo.strictEquals,QYo.DebugLocation.ofCaller())}a(GYo,"derivedWithCancellationToken")});var H9=T(JV=>{"use strict";f();Object.defineProperty(JV,"__esModule",{value:!0});JV.FromEventObservable=void 0;JV.observableFromEvent=qjt;JV.observableFromEventOpts=$Yo;var HYo=U9(),WTn=Cy(),zTn=Sv(),VTn=x5(),jYo=xw(),YTn=Iv();function qjt(...t){let e,r,n,o;return t.length===2?[r,n]=t:[e,r,n,o]=t,new ww(new zTn.DebugNameData(e,void 0,n),r,n,()=>ww.globalTransaction,WTn.strictEquals,o??YTn.DebugLocation.ofCaller())}a(qjt,"observableFromEvent");function $Yo(t,e,r,n=YTn.DebugLocation.ofCaller()){return new ww(new zTn.DebugNameData(t.owner,t.debugName,t.debugReferenceFn??r),e,r,()=>t.getTransaction?.()??ww.globalTransaction,t.equalsFn??WTn.strictEquals,n)}a($Yo,"observableFromEventOpts");var ww=class extends jYo.BaseObservable{static{a(this,"FromEventObservable")}constructor(e,r,n,o,s,c){super(c),this._debugNameData=e,this.event=r,this._getValue=n,this._getTransaction=o,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=l=>{let u=this._getValue(l),d=this._value,p=!this._hasValue||!this._equalityComparator(d,u),h=!1;p&&(this._value=u,this._hasValue&&(h=!0,(0,HYo.subtransaction)(this._getTransaction(),m=>{(0,VTn.getLogger)()?.handleObservableUpdated(this,{oldValue:d,newValue:u,change:void 0,didChange:p,hadValue:this._hasValue});for(let g of this._observers)m.updateObserver(g,this),g.handleChange(this,void 0)},()=>{let m=this.getDebugName();return"Event fired"+(m?`: ${m}`:"")})),this._hasValue=!0),h||(0,VTn.getLogger)()?.handleObservableUpdated(this,{oldValue:d,newValue:u,change:void 0,didChange:p,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}};JV.FromEventObservable=ww;(function(t){t.Observer=ww;function e(r,n){let o=!1;ww.globalTransaction===void 0&&(ww.globalTransaction=r,o=!0);try{n()}finally{o&&(ww.globalTransaction=void 0)}}a(e,"batchEventsGlobally"),t.batchEventsGlobally=e})(qjt||(JV.observableFromEvent=qjt={}))});var Hjt=T(Gjt=>{"use strict";f();Object.defineProperty(Gjt,"__esModule",{value:!0});Gjt.observableSignal=KYo;var VYo=U9(),WYo=Sv(),zYo=xw(),YYo=Iv();function KYo(t,e=YYo.DebugLocation.ofCaller()){return typeof t=="string"?new HYe(t,void 0,e):new HYe(void 0,t,e)}a(KYo,"observableSignal");var HYe=class extends zYo.BaseObservable{static{a(this,"ObservableSignal")}get debugName(){return new WYo.DebugNameData(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,r,n){super(n),this._debugName=e,this._owner=r}trigger(e,r){if(!e){(0,VYo.transaction)(n=>{this.trigger(n,r)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this._observers)e.updateObserver(n,this),n.handleChange(this,r)}get(){}}});var $Ye=T(vy=>{"use strict";f();Object.defineProperty(vy,"__esModule",{value:!0});vy.KeepAliveObserver=void 0;vy.observableFromPromise=ZYo;vy.signalFromObservable=eKo;vy.debouncedObservable=tKo;vy.debouncedObservable2=rKo;vy.wasEventTriggeredRecently=nKo;vy.keepObserved=eSn;vy.recomputeInitiallyAndOnChange=tSn;vy.derivedObservableWithCache=iKo;vy.derivedObservableWithWritableCache=oKo;vy.mapObservableArrayCached=sKo;vy.isObservable=aKo;var JYo=Wse(),KTn=q9(),jjt=Cy(),nbe=UYe(),XYo=H9(),JTn=Hjt(),XTn=xw(),ZTn=Iv();function ZYo(t){let e=(0,KTn.observableValue)("promiseValue",{});return t.then(r=>{e.set({value:r},void 0)}),e}a(ZYo,"observableFromPromise");function eKo(t,e){return(0,nbe.derivedOpts)({owner:t,equalsFn:a(()=>!1,"equalsFn")},r=>{e.read(r)})}a(eKo,"signalFromObservable");function tKo(t,e,r=ZTn.DebugLocation.ofCaller()){let n=!1,o,s;return(0,XYo.observableFromEvent)(void 0,c=>{let l=(0,JYo.autorun)(u=>{let d=t.read(u);if(!n)n=!0,o=d;else{s&&clearTimeout(s);let p=typeof e=="number"?e:e(o,d);if(p===0){o=d,c();return}s=setTimeout(()=>{o=d,c()},p)}});return{dispose(){l.dispose(),n=!1,o=void 0}}},()=>n?o:t.get(),r)}a(tKo,"debouncedObservable");function rKo(t,e,r=ZTn.DebugLocation.ofCaller()){let n=(0,JTn.observableSignal)("handleTimeout"),o,s;return(0,nbe.derivedOpts)({owner:void 0,onLastObserverRemoved:a(()=>{o=void 0},"onLastObserverRemoved")},l=>{let u=t.read(l);if(n.read(l),u!==o){let d=typeof e=="number"?e:e(o,u);if(d===0)return o=u,u;s&&clearTimeout(s),s=setTimeout(()=>{o=u,n.trigger(void 0)},d)}return o},r)}a(rKo,"debouncedObservable2");function nKo(t,e,r){let n=(0,KTn.observableValue)("triggeredRecently",!1),o;return r.add(t(()=>{n.set(!0,void 0),o&&clearTimeout(o),o=setTimeout(()=>{n.set(!1,void 0)},e)})),n}a(nKo,"wasEventTriggeredRecently");function eSn(t){let e=new rbe(!1,void 0);return t.addObserver(e),(0,jjt.toDisposable)(()=>{t.removeObserver(e)})}a(eSn,"keepObserved");(0,XTn._setKeepObserved)(eSn);function tSn(t,e){let r=new rbe(!0,e);t.addObserver(r);try{r.beginUpdate(t)}finally{r.endUpdate(t)}return(0,jjt.toDisposable)(()=>{t.removeObserver(r)})}a(tSn,"recomputeInitiallyAndOnChange");(0,XTn._setRecomputeInitiallyAndOnChange)(tSn);var rbe=class{static{a(this,"KeepAliveObserver")}constructor(e,r){this._forceRecompute=e,this._handleValue=r,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter===1&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,r){}};vy.KeepAliveObserver=rbe;function iKo(t,e){let r;return(0,nbe.derivedOpts)({owner:t,debugReferenceFn:e},o=>(r=e(o,r),r))}a(iKo,"derivedObservableWithCache");function oKo(t,e){let r,n=(0,JTn.observableSignal)("derivedObservableWithWritableCache"),o=(0,nbe.derived)(t,s=>(n.read(s),r=e(s,r),r));return Object.assign(o,{clearCache:a(s=>{r=void 0,n.trigger(s)},"clearCache"),setCache:a((s,c)=>{r=s,n.trigger(c)},"setCache")})}a(oKo,"derivedObservableWithWritableCache");function sKo(t,e,r,n){let o=new jYe(r,n);return(0,nbe.derivedOpts)({debugReferenceFn:r,owner:t,onLastObserverRemoved:a(()=>{o.dispose(),o=new jYe(r)},"onLastObserverRemoved")},c=>{let l=e.read(c);return o.setItems(l),o.getItems()})}a(sKo,"mapObservableArrayCached");var jYe=class{static{a(this,"ArrayMap")}constructor(e,r){this._map=e,this._keySelector=r,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let r=[],n=new Set(this._cache.keys());for(let o of e){let s=this._keySelector?this._keySelector(o):o,c=this._cache.get(s);if(c)n.delete(s);else{let l=new jjt.DisposableStore;c={out:this._map(o,l),store:l},this._cache.set(s,c)}r.push(c.out)}for(let o of n)this._cache.get(o).store.dispose(),this._cache.delete(o);this._items=r}getItems(){return this._items}};function aKo(t){return!!t&&t.read!==void 0&&t.reportChanges!==void 0}a(aKo,"isObservable")});var nSn=T(VYe=>{"use strict";f();Object.defineProperty(VYe,"__esModule",{value:!0});VYe.recordChanges=cKo;VYe.recordChangesLazy=lKo;var rSn=Cy();function cKo(t){return{createChangeSummary:a(e=>({changes:[]}),"createChangeSummary"),handleChange(e,r){for(let n in t)e.didChange(t[n])&&r.changes.push({key:n,change:e.change});return!0},beforeUpdate(e,r){for(let n in t){if(n==="changes")throw new rSn.BugIndicatingError('property name "changes" is reserved for change tracking');r[n]=t[n].read(e)}}}}a(cKo,"recordChanges");function lKo(t){let e;return{createChangeSummary:a(r=>({changes:[]}),"createChangeSummary"),handleChange(r,n){e||(e=t());for(let o in e)r.didChange(e[o])&&n.changes.push({key:o,change:r.change});return!0},beforeUpdate(r,n){e||(e=t());for(let o in e){if(o==="changes")throw new rSn.BugIndicatingError('property name "changes" is reserved for change tracking');n[o]=e[o].read(r)}}}}a(lKo,"recordChangesLazy")});var iSn=T(Vjt=>{"use strict";f();Object.defineProperty(Vjt,"__esModule",{value:!0});Vjt.constObservable=dKo;var uKo=xw();function dKo(t){return new $jt(t)}a(dKo,"constObservable");var $jt=class extends uKo.ConvenientObservable{static{a(this,"ConstObservable")}constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}log(){return this}toString(){return`Const: ${this.value}`}}});var oSn=T(zjt=>{"use strict";f();Object.defineProperty(zjt,"__esModule",{value:!0});zjt.observableSignalFromEvent=gKo;var fKo=U9(),pKo=Sv(),hKo=xw(),mKo=Iv();function gKo(t,e,r=mKo.DebugLocation.ofCaller()){return new Wjt(typeof t=="string"?t:new pKo.DebugNameData(t,void 0,void 0),e,r)}a(gKo,"observableSignalFromEvent");var Wjt=class extends hKo.BaseObservable{static{a(this,"FromEventObservableSignal")}constructor(e,r,n){super(n),this.event=r,this.handleEvent=()=>{(0,fKo.transaction)(o=>{for(let s of this._observers)o.updateObserver(s,this),s.handleChange(this,void 0)},()=>this.debugName)},this.debugName=typeof e=="string"?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}});var sSn=T(ibe=>{"use strict";f();Object.defineProperty(ibe,"__esModule",{value:!0});ibe.ValueWithChangeEventFromObservable=void 0;ibe.observableFromValueWithChangeEvent=EKo;var AKo=Cy(),yKo=H9(),WYe=class{static{a(this,"ValueWithChangeEventFromObservable")}constructor(e){this.observable=e}get onDidChange(){return AKo.Event.fromObservableLight(this.observable)}get value(){return this.observable.get()}};ibe.ValueWithChangeEventFromObservable=WYe;function EKo(t,e){return e instanceof WYe?e.observable:(0,yKo.observableFromEvent)(t,e.onDidChange,()=>e.value)}a(EKo,"observableFromValueWithChangeEvent")});var lSn=T(obe=>{"use strict";f();Object.defineProperty(obe,"__esModule",{value:!0});obe.runOnChange=aSn;obe.runOnChangeWithStore=cSn;obe.runOnChangeWithCancellationToken=bKo;var _Ko=Ujt(),CKo=Cy(),vKo=Wse();function aSn(t,e){let r,n=!0;return(0,vKo.autorunWithStoreHandleChanges)({changeTracker:{createChangeSummary:a(()=>({deltas:[],didChange:!1}),"createChangeSummary"),handleChange:a((o,s)=>{if(o.didChange(t)){let c=o.change;c!==void 0&&s.deltas.push(c),s.didChange=!0}return!0},"handleChange")}},(o,s)=>{let c=t.read(o),l=r;s.didChange&&(r=c,e(c,l,s.deltas)),n&&(n=!1,r=c)})}a(aSn,"runOnChange");function cSn(t,e){let r=new CKo.DisposableStore,n=aSn(t,(o,s,c)=>{r.clear(),e(o,s,c,r)});return{dispose(){n.dispose(),r.dispose()}}}a(cSn,"runOnChangeWithStore");function bKo(t,e){return cSn(t,(r,n,o,s)=>{e(r,n,o,(0,_Ko.cancelOnDispose)(s))})}a(bKo,"runOnChangeWithCancellationToken")});var fSn=T(zYe=>{"use strict";f();Object.defineProperty(zYe,"__esModule",{value:!0});zYe.latestChangedValue=xKo;zYe.derivedConstOnceDefined=wKo;var uSn=Cy(),dSn=Sv(),TKo=H9(),SKo=Wse(),IKo=$Ye();function xKo(t,e){if(e.length===0)throw new uSn.BugIndicatingError;let r=!1,n,o=(0,TKo.observableFromEvent)(t,s=>{let c=new uSn.DisposableStore;for(let l of e)c.add((0,SKo.autorunOpts)({debugName:a(()=>(0,dSn.getDebugName)(o,new dSn.DebugNameData(t,void 0,void 0))+".updateLastChangedValue","debugName")},u=>{r=!0,n=l.read(u),s()}));return c.add({dispose(){r=!1,n=void 0}}),c},()=>r?n:e[e.length-1].get());return o}a(xKo,"latestChangedValue");function wKo(t,e){return(0,IKo.derivedObservableWithCache)(t,(r,n)=>n??e(r))}a(wKo,"derivedConstOnceDefined")});var pSn=T(YYe=>{"use strict";f();Object.defineProperty(YYe,"__esModule",{value:!0});YYe.ObservableSet=void 0;var RKo=DYe(),Yjt=class{static{a(this,"ObservableSet")}constructor(){this._data=new Set,this._obs=(0,RKo.observableValueOpts)({equalsFn:a(()=>!1,"equalsFn")},this),this.observable=this._obs}get size(){return this._data.size}has(e){return this._data.has(e)}add(e,r){return this._data.has(e)||(this._data.add(e),this._obs.set(this,r)),this}delete(e,r){let n=this._data.delete(e);return n&&this._obs.set(this,r),n}clear(e){this._data.size>0&&(this._data.clear(),this._obs.set(this,e))}forEach(e,r){this._data.forEach((n,o,s)=>{e.call(r,n,o,this)})}*entries(){for(let e of this._data)yield[e,e]}*keys(){yield*this._data.keys()}*values(){yield*this._data.values()}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"ObservableSet"}};YYe.ObservableSet=Yjt});var hSn=T(KYe=>{"use strict";f();Object.defineProperty(KYe,"__esModule",{value:!0});KYe.ObservableMap=void 0;var PKo=DYe(),Kjt=class{static{a(this,"ObservableMap")}constructor(){this._data=new Map,this._obs=(0,PKo.observableValueOpts)({equalsFn:a(()=>!1,"equalsFn")},this),this.observable=this._obs}get size(){return this._data.size}has(e){return this._data.has(e)}get(e){return this._data.get(e)}set(e,r,n){let o=this._data.has(e),s=this._data.get(e);return(!o||s!==r)&&(this._data.set(e,r),this._obs.set(this,n)),this}delete(e,r){let n=this._data.delete(e);return n&&this._obs.set(this,r),n}clear(e){this._data.size>0&&(this._data.clear(),this._obs.set(this,e))}forEach(e,r){this._data.forEach((n,o,s)=>{e.call(r,n,o,this)})}*entries(){yield*this._data.entries()}*keys(){yield*this._data.keys()}*values(){yield*this._data.values()}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return"ObservableMap"}};KYe.ObservableMap=Kjt});var ZYe=T(eae=>{"use strict";f();Object.defineProperty(eae,"__esModule",{value:!0});eae.ConsoleObservableLogger=void 0;eae.logObservableToConsole=NKo;eae.formatValue=Zse;var kKo=x5(),DKo=Sv(),mSn=Yse(),JYe;function NKo(t){JYe||(JYe=new XYe,(0,kKo.addLogger)(JYe)),JYe.addFilteredObj(t)}a(NKo,"logObservableToConsole");var XYe=class{static{a(this,"ConsoleObservableLogger")}constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){return MKo([Jse(LKo("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[Jse(" "),gS(Zse(e.oldValue,70),{color:"red",strikeThrough:!0}),Jse(" "),gS(Zse(e.newValue,60),{color:"green"})]:[Jse(" (unchanged)")]:[Jse(" "),gS(Zse(e.newValue,60),{color:"green"}),Jse(" (initial)")]}handleObservableCreated(e){if(e instanceof mSn.Derived){let r=e;if(this.changedObservablesSets.set(r,new Set),!1){let o=[];r.__debugUpdating=o;let s=r.beginUpdate;r.beginUpdate=l=>(o.push(l),s.apply(r,[l]));let c=r.endUpdate;r.endUpdate=l=>{let u=o.indexOf(l);return u===-1&&console.error("endUpdate called without beginUpdate",r.debugName,l.debugName),o.splice(u,1),c.apply(r,[l])}}}}handleOnListenerCountChanged(e,r){}handleObservableUpdated(e,r){if(this._isIncluded(e)){if(e instanceof mSn.Derived){this._handleDerivedRecomputed(e,r);return}console.log(...this.textToConsoleArgs([Xse("observable value changed"),gS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r)]))}}formatChanges(e){if(e.size!==0)return gS(" (changed deps: "+[...e].map(r=>r.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,r,n){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(r)}_handleDerivedRecomputed(e,r){if(!this._isIncluded(e))return;let n=this.changedObservablesSets.get(e);n&&(console.log(...this.textToConsoleArgs([Xse("derived recomputed"),gS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r),this.formatChanges(n),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),n.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Xse("derived cleared"),gS(e.debugName,{color:"BlueViolet"})]))}handleFromEventObservableTriggered(e,r){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Xse("observable from event triggered"),gS(e.debugName,{color:"BlueViolet"}),...this.formatInfo(r),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,r,n){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(r)}handleAutorunStarted(e){let r=this.changedObservablesSets.get(e);r&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Xse("autorun"),gS(e.debugName,{color:"BlueViolet"}),this.formatChanges(r),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),r.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let r=e.getDebugName();r===void 0&&(r=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([Xse("transaction"),gS(r,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}};eae.ConsoleObservableLogger=XYe;function MKo(t){let e=new Array,r=[],n="";function o(c){if("length"in c)for(let l of c)l&&o(l);else"text"in c?(n+=`%c${c.text}`,e.push(c.style),c.data&&r.push(...c.data)):"data"in c&&r.push(...c.data)}a(o,"process"),o(t);let s=[n,...e];return s.push(...r),s}a(MKo,"consoleTextToArgs");function Jse(t){return gS(t,{color:"black"})}a(Jse,"normalText");function Xse(t){return gS(FKo(`${t}: `,10),{color:"black",bold:!0})}a(Xse,"formatKind");function gS(t,e={color:"black"}){function r(o){return Object.entries(o).reduce((s,[c,l])=>`${s}${c}:${l};`,"")}a(r,"objToCss");let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:t,style:r(n)}}a(gS,"styled");function Zse(t,e){switch(typeof t){case"number":return""+t;case"string":return t.length+2<=e?`"${t}"`:`"${t.substr(0,e-7)}"+...`;case"boolean":return t?"true":"false";case"undefined":return"undefined";case"object":return t===null?"null":Array.isArray(t)?OKo(t,e):BKo(t,e);case"symbol":return t.toString();case"function":return`[[Function${t.name?" "+t.name:""}]]`;default:return""+t}}a(Zse,"formatValue");function OKo(t,e){let r="[ ",n=!0;for(let o of t){if(n||(r+=", "),r.length-5>e){r+="...";break}n=!1,r+=`${Zse(o,e-r.length)}`}return r+=" ]",r}a(OKo,"formatArray");function BKo(t,e){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString){let s=t.toString();return s.length<=e?s:s.substring(0,e-3)+"..."}let r=(0,DKo.getClassName)(t),n=r?r+"(":"{ ",o=!0;for(let[s,c]of Object.entries(t)){if(o||(n+=", "),n.length-5>e){n+="...";break}o=!1,n+=`${s}: ${Zse(c,e-n.length)}`}return n+=r?")":" }",n}a(BKo,"formatObject");function LKo(t,e){let r="";for(let n=1;n<=e;n++)r+=t;return r}a(LKo,"repeat");function FKo(t,e){for(;t.length{"use strict";f();Object.defineProperty(eKe,"__esModule",{value:!0});eKe.SimpleTypedRpcConnection=void 0;var Jjt=class t{static{a(this,"SimpleTypedRpcConnection")}static createHost(e,r){return new t(e,r)}static createClient(e,r){return new t(e,r)}constructor(e,r){this._channelFactory=e,this._getHandler=r,this._channel=this._channelFactory({handleNotification:a(s=>{let c=s,l=this._getHandler().notifications[c[0]];if(!l)throw new Error(`Unknown notification "${c[0]}"!`);l(...c[1])},"handleNotification"),handleRequest:a(s=>{let c=s;try{return{type:"result",value:this._getHandler().requests[c[0]](...c[1])}}catch(l){return{type:"error",value:l}}},"handleRequest")});let n=new Proxy({},{get:a((s,c)=>async(...l)=>{let u=await this._channel.sendRequest([c,l]);if(u.type==="error")throw u.value;return u.value},"get")}),o=new Proxy({},{get:a((s,c)=>(...l)=>{this._channel.sendNotification([c,l])},"get")});this.api={notifications:o,requests:n}}};eKe.SimpleTypedRpcConnection=Jjt});var ASn=T(Xjt=>{"use strict";f();Object.defineProperty(Xjt,"__esModule",{value:!0});Xjt.registerDebugChannel=QKo;var UKo=gSn();function QKo(t,e){let r=globalThis,n=[],o,{channel:s,handler:c}=qKo({sendNotification:a(u=>{o?o.sendNotification(u):n.push(u)},"sendNotification")}),l;return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[t]=u=>{l=e(),o=u;for(let d of n)u.sendNotification(d);return n=[],c},UKo.SimpleTypedRpcConnection.createClient(s,()=>{if(!l)throw new Error("Not supported");return l})}a(QKo,"registerDebugChannel");function qKo(t){let e;return{channel:a(n=>(e=n,{sendNotification:a(o=>{t.sendNotification(o)},"sendNotification"),sendRequest:a(o=>{throw new Error("not supported")},"sendRequest")}),"channel"),handler:{handleRequest:a(n=>n.type==="notification"?e?.handleNotification(n.data):e?.handleRequest(n.data),"handleRequest")}}}a(qKo,"createChannelFactoryFromDebugChannel")});var _Sn=T(j9=>{"use strict";f();Object.defineProperty(j9,"__esModule",{value:!0});j9.Throttler=j9.Debouncer=void 0;j9.deepAssign=ySn;j9.deepAssignDeleteNulls=ESn;var Zjt=class{static{a(this,"Debouncer")}constructor(){this._timeout=void 0}debounce(e,r){this._timeout!==void 0&&clearTimeout(this._timeout),this._timeout=setTimeout(()=>{this._timeout=void 0,e()},r)}dispose(){this._timeout!==void 0&&clearTimeout(this._timeout)}};j9.Debouncer=Zjt;var e$t=class{static{a(this,"Throttler")}constructor(){this._timeout=void 0}throttle(e,r){this._timeout===void 0&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},r))}dispose(){this._timeout!==void 0&&clearTimeout(this._timeout)}};j9.Throttler=e$t;function ySn(t,e){for(let r in e)t[r]&&typeof t[r]=="object"&&e[r]&&typeof e[r]=="object"?ySn(t[r],e[r]):t[r]=e[r]}a(ySn,"deepAssign");function ESn(t,e){for(let r in e)e[r]===null?delete t[r]:t[r]&&typeof t[r]=="object"&&e[r]&&typeof e[r]=="object"?ESn(t[r],e[r]):t[r]=e[r]}a(ESn,"deepAssignDeleteNulls")});var bSn=T(rKe=>{"use strict";f();Object.defineProperty(rKe,"__esModule",{value:!0});rKe.DevToolsLogger=void 0;var CSn=MYe(),tKe=ZYe(),GKo=ASn(),t$t=_Sn(),sbe=W1(),HKo=H9(),XV=Ko(),ZV=Yse(),vSn=q9(),jKo=Iv(),r$t=class t{static{a(this,"DevToolsLogger")}static{this._instance=void 0}static getInstance(){return t._instance===void 0&&(t._instance=new t),t._instance}getTransactionState(){let e=[],r=[...this._activeTransactions];if(r.length===0)return;let n=r.flatMap(s=>s.debugGetUpdatingObservers()??[]).map(s=>s.observer),o=new Set;for(;n.length>0;){let s=n.shift();if(o.has(s))continue;o.add(s);let c=this._getInfo(s,l=>{o.has(l)||n.push(l)});c&&e.push(c)}return{names:r.map(s=>s.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let r=this._instanceInfos.get(e);if(!r){(0,XV.onUnexpectedError)(new XV.BugIndicatingError("No info found"));return}return r}_getAutorunInfo(e){let r=this._instanceInfos.get(e);if(!r){(0,XV.onUnexpectedError)(new XV.BugIndicatingError("No info found"));return}return r}_getInfo(e,r){if(e instanceof ZV.Derived){let n=[...e.debugGetObservers()];for(let u of n)r(u);let o=this._getObservableInfo(e);if(!o)return;let s=e.debugGetState(),c={name:e.debugName,instanceId:o.instanceId,updateCount:s.updateCount},l=[...o.changedObservables].map(u=>this._instanceInfos.get(u)?.instanceId).filter(sbe.isDefined);if(s.isComputing)return{...c,type:"observable/derived",state:"updating",changedDependencies:l,initialComputation:!1};switch(s.state){case 0:return{...c,type:"observable/derived",state:"noValue"};case 3:return{...c,type:"observable/derived",state:"upToDate"};case 2:return{...c,type:"observable/derived",state:"stale",changedDependencies:l};case 1:return{...c,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof CSn.AutorunObserver){let n=this._getAutorunInfo(e);if(!n)return;let o={name:e.debugName,instanceId:n.instanceId,updateCount:n.updateCount},s=[...n.changedObservables].map(c=>this._instanceInfos.get(c).instanceId);if(e.debugGetState().isRunning)return{...o,type:"autorun",state:"updating",changedDependencies:s};switch(e.debugGetState().state){case 3:return{...o,type:"autorun",state:"upToDate"};case 2:return{...o,type:"autorun",state:"stale",changedDependencies:s};case 1:return{...o,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let r=this._getObservableInfo(e);if(r)return{name:e.debugName,instanceId:r.instanceId}}_formatObserver(e){if(e instanceof ZV.Derived)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let r=this._getAutorunInfo(e);if(r)return{name:e.toString(),instanceId:r.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=(0,GKo.registerDebugChannel)("observableDevTools",()=>({notifications:{setDeclarationIdFilter:a(e=>{},"setDeclarationIdFilter"),logObservableValue:a(e=>{console.log("logObservableValue",e)},"logObservableValue"),flushUpdates:a(()=>{this._flushUpdates()},"flushUpdates"),resetUpdates:a(()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)},"resetUpdates")},requests:{getDeclarations:a(()=>{let e={};for(let r of this._declarations.values())e[r.id]=r;return{decls:e}},"getDeclarations"),getSummarizedInstances:a(()=>null,"getSummarizedInstances"),getObservableValueInfo:a(e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(n=>this._formatObserver(n)).filter(sbe.isDefined)}),"getObservableValueInfo"),getDerivedInfo:a(e=>{let r=this._aliveInstances.get(e);return{dependencies:[...r.debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(sbe.isDefined),observers:[...r.debugGetObservers()].map(n=>this._formatObserver(n)).filter(sbe.isDefined)}},"getDerivedInfo"),getAutorunInfo:a(e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(n=>this._formatObservable(n)).filter(sbe.isDefined)}),"getAutorunInfo"),getTransactionState:a(()=>this.getTransactionState(),"getTransactionState"),setValue:a((e,r)=>{let n=this._aliveInstances.get(e);if(n instanceof ZV.Derived)n.debugSetValue(r);else if(n instanceof vSn.ObservableValue)n.debugSetValue(r);else if(n instanceof HKo.FromEventObservable)n.debugSetValue(r);else throw new XV.BugIndicatingError("Observable is not supported");let o=[...n.debugGetObservers()];for(let s of o)s.beginUpdate(n);for(let s of o)s.handleChange(n,void 0);for(let s of o)s.endUpdate(n)},"setValue"),getValue:a(e=>{let r=this._aliveInstances.get(e);if(r instanceof ZV.Derived)return(0,tKe.formatValue)(r.debugGetState().value,200);if(r instanceof vSn.ObservableValue)return(0,tKe.formatValue)(r.debugGetState().value,200)},"getValue"),logValue:a(e=>{let r=this._aliveInstances.get(e);if(r&&"get"in r)console.log("Logged Value:",r.get());else throw new XV.BugIndicatingError("Observable is not supported")},"logValue"),rerun:a(e=>{let r=this._aliveInstances.get(e);if(r instanceof ZV.Derived)r.debugRecompute();else if(r instanceof CSn.AutorunObserver)r.debugRerun();else throw new XV.BugIndicatingError("Observable is not supported")},"rerun")}})),this._pendingChanges=null,this._changeThrottler=new t$t.Throttler,this._fullState={},this._flushUpdates=()=>{this._pendingChanges!==null&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},jKo.DebugLocation.enable()}_handleChange(e){(0,t$t.deepAssignDeleteNulls)(this._fullState,e),this._pendingChanges===null?this._pendingChanges=e:(0,t$t.deepAssign)(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,r){if(!r)return-1;let n=this._declarations.get(r.id);return n===void 0&&(n={id:this._declarationId++,type:e,url:r.fileName,line:r.line,column:r.column},this._declarations.set(r.id,n),this._handleChange({decls:{[n.id]:n}})),n.id}handleObservableCreated(e,r){let o={declarationId:this._getDeclarationId("observable/value",r),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,o)}handleOnListenerCountChanged(e,r){let n=this._getObservableInfo(e);if(n){if(n.listenerCount===0&&r>0){let o=e instanceof ZV.Derived?"observable/derived":"observable/value";this._aliveInstances.set(n.instanceId,e),this._handleChange({instances:{[n.instanceId]:{instanceId:n.instanceId,declarationId:n.declarationId,formattedValue:n.lastValue,type:o,name:e.debugName}}})}else n.listenerCount>0&&r===0&&(this._handleChange({instances:{[n.instanceId]:null}}),this._aliveInstances.delete(n.instanceId));n.listenerCount=r}}handleObservableUpdated(e,r){if(e instanceof ZV.Derived){this._handleDerivedRecomputed(e,r);return}let n=this._getObservableInfo(e);n&&r.didChange&&(n.lastValue=(0,tKe.formatValue)(r.newValue,30),n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:n.lastValue}}}))}handleAutorunCreated(e,r){let o={declarationId:this._getDeclarationId("autorun",r),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,o),this._aliveInstances.set(o.instanceId,e),o&&this._handleChange({instances:{[o.instanceId]:{instanceId:o.instanceId,declarationId:o.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let r=this._getAutorunInfo(e);r&&(this._handleChange({instances:{[r.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(r.instanceId))}handleAutorunDependencyChanged(e,r,n){let o=this._getAutorunInfo(e);o&&o.changedObservables.add(r)}handleAutorunStarted(e){}handleAutorunFinished(e){let r=this._getAutorunInfo(e);r&&(r.changedObservables.clear(),r.updateCount++,this._handleChange({instances:{[r.instanceId]:{runCount:r.updateCount}}}))}handleDerivedDependencyChanged(e,r,n){let o=this._getObservableInfo(e);o&&o.changedObservables.add(r)}_handleDerivedRecomputed(e,r){let n=this._getObservableInfo(e);if(!n)return;let o=(0,tKe.formatValue)(r.newValue,30);n.updateCount++,n.changedObservables.clear(),n.lastValue=o,n.listenerCount>0&&this._handleChange({instances:{[n.instanceId]:{formattedValue:o,recomputationCount:n.updateCount}}})}handleDerivedCleared(e){let r=this._getObservableInfo(e);r&&(r.lastValue=void 0,r.changedObservables.clear(),r.listenerCount>0&&this._handleChange({instances:{[r.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}};rKe.DevToolsLogger=r$t});var xSn=T(n$t=>{"use strict";f();Object.defineProperty(n$t,"__esModule",{value:!0});n$t.debugGetObservableGraph=YKo;var $Ko=Yse(),VKo=H9(),WKo=q9(),zKo=MYe(),TSn=ZYe();function YKo(t,e){let r=e?.debugNamePostProcessor??(s=>s),n=eW.from(t,r);if(!n)return"";let o=new Set;return e.type==="observers"?ISn(n,0,o,e).trim():SSn(n,0,o,e).trim()}a(YKo,"debugGetObservableGraph");function SSn(t,e,r,n){let o=" ".repeat(e),s=[];if(r.has(t.sourceObj))return s.push(`${o}* ${t.type} ${t.name} (already listed)`),s.join(` +`);if(r.add(t.sourceObj),s.push(`${o}* ${t.type} ${t.name}:`),s.push(`${o} value: ${(0,TSn.formatValue)(t.value,50)}`),s.push(`${o} state: ${t.state}`),t.dependencies.length>0){s.push(`${o} dependencies:`);for(let l of t.dependencies){let u=eW.from(l,n.debugNamePostProcessor??(d=>d))??eW.unknown(l);s.push(SSn(u,e+1,r,n))}}return s.join(` +`)}a(SSn,"formatObservableInfoWithDependencies");function ISn(t,e,r,n){let o=" ".repeat(e),s=[];if(r.has(t.sourceObj))return s.push(`${o}* ${t.type} ${t.name} (already listed)`),s.join(` +`);if(r.add(t.sourceObj),s.push(`${o}* ${t.type} ${t.name}:`),s.push(`${o} value: ${(0,TSn.formatValue)(t.value,50)}`),s.push(`${o} state: ${t.state}`),t.observers.length>0){s.push(`${o} observers:`);for(let l of t.observers){let u=eW.from(l,n.debugNamePostProcessor??(d=>d))??eW.unknown(l);s.push(ISn(u,e+1,r,n))}}return s.join(` +`)}a(ISn,"formatObservableInfoWithObservers");var eW=class t{static{a(this,"Info")}static from(e,r){if(e instanceof zKo.AutorunObserver){let n=e.debugGetState();return new t(e,r(e.debugName),"autorun",void 0,n.stateStr,Array.from(n.dependencies),[])}else if(e instanceof $Ko.Derived){let n=e.debugGetState();return new t(e,r(e.debugName),"derived",n.value,n.stateStr,Array.from(n.dependencies),Array.from(e.debugGetObservers()))}else if(e instanceof WKo.ObservableValue){let n=e.debugGetState();return new t(e,r(e.debugName),"observableValue",n.value,"upToDate",[],Array.from(e.debugGetObservers()))}else if(e instanceof VKo.FromEventObservable){let n=e.debugGetState();return new t(e,r(e.debugName),"fromEvent",n.value,n.hasValue?"upToDate":"initial",[],Array.from(e.debugGetObservers()))}}static unknown(e){return new t(e,"(unknown)","unknown",void 0,"unknown",[],[])}constructor(e,r,n,o,s,c,l){this.sourceObj=e,this.name=r,this.type=n,this.value=o,this.state=s,this.dependencies=c,this.observers=l}}});var gO=T(kt=>{"use strict";f();Object.defineProperty(kt,"__esModule",{value:!0});kt.derivedConstOnceDefined=kt.runOnChangeWithStore=kt.runOnChangeWithCancellationToken=kt.runOnChange=kt.ValueWithChangeEventFromObservable=kt.observableFromValueWithChangeEvent=kt.TransactionImpl=kt.transaction=kt.subtransaction=kt.globalTransaction=kt.asyncTransaction=kt.observableSignalFromEvent=kt.observableFromEventOpts=kt.observableSignal=kt.constObservable=kt.recordChangesLazy=kt.recordChanges=kt.isObservable=kt.wasEventTriggeredRecently=kt.signalFromObservable=kt.recomputeInitiallyAndOnChange=kt.observableFromPromise=kt.mapObservableArrayCached=kt.keepObserved=kt.derivedObservableWithWritableCache=kt.derivedObservableWithCache=kt.debouncedObservable2=kt.debouncedObservable=kt.waitForState=kt.derivedWithCancellationToken=kt.PromiseResult=kt.ObservablePromise=kt.ObservableLazyPromise=kt.ObservableLazy=kt.derivedWithStore=kt.derivedWithSetter=kt.derivedOpts=kt.derivedHandleChanges=kt.derivedDisposable=kt.derived=kt.disposableObservableValue=kt.autorunSelfDisposable=kt.autorunIterableDelta=kt.autorunWithStoreHandleChanges=kt.autorunWithStore=kt.autorunOpts=kt.autorunHandleChanges=kt.autorunDelta=kt.autorun=kt.observableValueOpts=void 0;kt.DebugLocation=kt.ObservableMap=kt.ObservableSet=kt.observableValue=kt.observableFromEvent=kt.latestChangedValue=void 0;var KKo=DYe();Object.defineProperty(kt,"observableValueOpts",{enumerable:!0,get:a(function(){return KKo.observableValueOpts},"get")});var $9=Wse();Object.defineProperty(kt,"autorun",{enumerable:!0,get:a(function(){return $9.autorun},"get")});Object.defineProperty(kt,"autorunDelta",{enumerable:!0,get:a(function(){return $9.autorunDelta},"get")});Object.defineProperty(kt,"autorunHandleChanges",{enumerable:!0,get:a(function(){return $9.autorunHandleChanges},"get")});Object.defineProperty(kt,"autorunOpts",{enumerable:!0,get:a(function(){return $9.autorunOpts},"get")});Object.defineProperty(kt,"autorunWithStore",{enumerable:!0,get:a(function(){return $9.autorunWithStore},"get")});Object.defineProperty(kt,"autorunWithStoreHandleChanges",{enumerable:!0,get:a(function(){return $9.autorunWithStoreHandleChanges},"get")});Object.defineProperty(kt,"autorunIterableDelta",{enumerable:!0,get:a(function(){return $9.autorunIterableDelta},"get")});Object.defineProperty(kt,"autorunSelfDisposable",{enumerable:!0,get:a(function(){return $9.autorunSelfDisposable},"get")});var JKo=q9();Object.defineProperty(kt,"disposableObservableValue",{enumerable:!0,get:a(function(){return JKo.disposableObservableValue},"get")});var tae=UYe();Object.defineProperty(kt,"derived",{enumerable:!0,get:a(function(){return tae.derived},"get")});Object.defineProperty(kt,"derivedDisposable",{enumerable:!0,get:a(function(){return tae.derivedDisposable},"get")});Object.defineProperty(kt,"derivedHandleChanges",{enumerable:!0,get:a(function(){return tae.derivedHandleChanges},"get")});Object.defineProperty(kt,"derivedOpts",{enumerable:!0,get:a(function(){return tae.derivedOpts},"get")});Object.defineProperty(kt,"derivedWithSetter",{enumerable:!0,get:a(function(){return tae.derivedWithSetter},"get")});Object.defineProperty(kt,"derivedWithStore",{enumerable:!0,get:a(function(){return tae.derivedWithStore},"get")});var nKe=jTn();Object.defineProperty(kt,"ObservableLazy",{enumerable:!0,get:a(function(){return nKe.ObservableLazy},"get")});Object.defineProperty(kt,"ObservableLazyPromise",{enumerable:!0,get:a(function(){return nKe.ObservableLazyPromise},"get")});Object.defineProperty(kt,"ObservablePromise",{enumerable:!0,get:a(function(){return nKe.ObservablePromise},"get")});Object.defineProperty(kt,"PromiseResult",{enumerable:!0,get:a(function(){return nKe.PromiseResult},"get")});var RSn=$Tn();Object.defineProperty(kt,"derivedWithCancellationToken",{enumerable:!0,get:a(function(){return RSn.derivedWithCancellationToken},"get")});Object.defineProperty(kt,"waitForState",{enumerable:!0,get:a(function(){return RSn.waitForState},"get")});var Rw=$Ye();Object.defineProperty(kt,"debouncedObservable",{enumerable:!0,get:a(function(){return Rw.debouncedObservable},"get")});Object.defineProperty(kt,"debouncedObservable2",{enumerable:!0,get:a(function(){return Rw.debouncedObservable2},"get")});Object.defineProperty(kt,"derivedObservableWithCache",{enumerable:!0,get:a(function(){return Rw.derivedObservableWithCache},"get")});Object.defineProperty(kt,"derivedObservableWithWritableCache",{enumerable:!0,get:a(function(){return Rw.derivedObservableWithWritableCache},"get")});Object.defineProperty(kt,"keepObserved",{enumerable:!0,get:a(function(){return Rw.keepObserved},"get")});Object.defineProperty(kt,"mapObservableArrayCached",{enumerable:!0,get:a(function(){return Rw.mapObservableArrayCached},"get")});Object.defineProperty(kt,"observableFromPromise",{enumerable:!0,get:a(function(){return Rw.observableFromPromise},"get")});Object.defineProperty(kt,"recomputeInitiallyAndOnChange",{enumerable:!0,get:a(function(){return Rw.recomputeInitiallyAndOnChange},"get")});Object.defineProperty(kt,"signalFromObservable",{enumerable:!0,get:a(function(){return Rw.signalFromObservable},"get")});Object.defineProperty(kt,"wasEventTriggeredRecently",{enumerable:!0,get:a(function(){return Rw.wasEventTriggeredRecently},"get")});Object.defineProperty(kt,"isObservable",{enumerable:!0,get:a(function(){return Rw.isObservable},"get")});var PSn=nSn();Object.defineProperty(kt,"recordChanges",{enumerable:!0,get:a(function(){return PSn.recordChanges},"get")});Object.defineProperty(kt,"recordChangesLazy",{enumerable:!0,get:a(function(){return PSn.recordChangesLazy},"get")});var XKo=iSn();Object.defineProperty(kt,"constObservable",{enumerable:!0,get:a(function(){return XKo.constObservable},"get")});var ZKo=Hjt();Object.defineProperty(kt,"observableSignal",{enumerable:!0,get:a(function(){return ZKo.observableSignal},"get")});var eJo=H9();Object.defineProperty(kt,"observableFromEventOpts",{enumerable:!0,get:a(function(){return eJo.observableFromEventOpts},"get")});var tJo=oSn();Object.defineProperty(kt,"observableSignalFromEvent",{enumerable:!0,get:a(function(){return tJo.observableSignalFromEvent},"get")});var abe=U9();Object.defineProperty(kt,"asyncTransaction",{enumerable:!0,get:a(function(){return abe.asyncTransaction},"get")});Object.defineProperty(kt,"globalTransaction",{enumerable:!0,get:a(function(){return abe.globalTransaction},"get")});Object.defineProperty(kt,"subtransaction",{enumerable:!0,get:a(function(){return abe.subtransaction},"get")});Object.defineProperty(kt,"transaction",{enumerable:!0,get:a(function(){return abe.transaction},"get")});Object.defineProperty(kt,"TransactionImpl",{enumerable:!0,get:a(function(){return abe.TransactionImpl},"get")});var kSn=sSn();Object.defineProperty(kt,"observableFromValueWithChangeEvent",{enumerable:!0,get:a(function(){return kSn.observableFromValueWithChangeEvent},"get")});Object.defineProperty(kt,"ValueWithChangeEventFromObservable",{enumerable:!0,get:a(function(){return kSn.ValueWithChangeEventFromObservable},"get")});var i$t=lSn();Object.defineProperty(kt,"runOnChange",{enumerable:!0,get:a(function(){return i$t.runOnChange},"get")});Object.defineProperty(kt,"runOnChangeWithCancellationToken",{enumerable:!0,get:a(function(){return i$t.runOnChangeWithCancellationToken},"get")});Object.defineProperty(kt,"runOnChangeWithStore",{enumerable:!0,get:a(function(){return i$t.runOnChangeWithStore},"get")});var DSn=fSn();Object.defineProperty(kt,"derivedConstOnceDefined",{enumerable:!0,get:a(function(){return DSn.derivedConstOnceDefined},"get")});Object.defineProperty(kt,"latestChangedValue",{enumerable:!0,get:a(function(){return DSn.latestChangedValue},"get")});var rJo=H9();Object.defineProperty(kt,"observableFromEvent",{enumerable:!0,get:a(function(){return rJo.observableFromEvent},"get")});var nJo=q9();Object.defineProperty(kt,"observableValue",{enumerable:!0,get:a(function(){return nJo.observableValue},"get")});var iJo=pSn();Object.defineProperty(kt,"ObservableSet",{enumerable:!0,get:a(function(){return iJo.ObservableSet},"get")});var oJo=hSn();Object.defineProperty(kt,"ObservableMap",{enumerable:!0,get:a(function(){return oJo.ObservableMap},"get")});var sJo=Iv();Object.defineProperty(kt,"DebugLocation",{enumerable:!0,get:a(function(){return sJo.DebugLocation},"get")});var o$t=x5(),NSn=ZYe(),aJo=bSn(),wSn=MUe(),cJo=xw(),lJo=xSn();(0,cJo._setDebugGetObservableGraph)(lJo.debugGetObservableGraph);(0,o$t.setLogObservableFn)(NSn.logObservableToConsole);var uJo=!1;uJo&&(0,o$t.addLogger)(new NSn.ConsoleObservableLogger);wSn.env&&wSn.env.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,o$t.addLogger)(aJo.DevToolsLogger.getInstance())});var wu=T(rae=>{"use strict";f();Object.defineProperty(rae,"__esModule",{value:!0});rae.OffsetRangeSet=rae.OffsetRange=void 0;var iKe=Ko(),oKe=class t{static{a(this,"OffsetRange")}static fromTo(e,r){return new t(e,r)}static equals(e,r){return e.start===r.start&&e.endExclusive===r.endExclusive}static addRange(e,r){let n=0;for(;nr))return new t(e,r)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,r){return new t(e,e+r)}static emptyAt(e){return new t(e,e)}constructor(e,r){if(this.start=e,this.endExclusive=r,e>r)throw new iKe.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new iKe.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new iKe.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}map(e){let r=[];for(let n=this.start;ne.toString()).join(", ")}intersectsStrict(e){let r=0;for(;re+r.length,0)}};rae.OffsetRangeSet=s$t});var N5=T(oae=>{"use strict";f();Object.defineProperty(oae,"__esModule",{value:!0});oae.LineRangeSet=oae.LineRange=void 0;var MSn=Ko(),dJo=wu(),OSn=ff(),nae=tF(),BSn=Lc(),iae=class t{static{a(this,"LineRange")}static ofLength(e,r){return new t(e,e+r)}static fromRange(e){return new t(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new t(e.startLineNumber,e.endLineNumber+1)}static{this.compareByStart=(0,BSn.compareBy)(e=>e.startLineNumber,BSn.numberComparator)}static subtract(e,r){return r?e.startLineNumberr)throw new MSn.BugIndicatingError(`startLineNumber ${e} cannot be after endLineNumberExclusive ${r}`);this.startLineNumber=e,this.endLineNumberExclusive=r}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=(0,nae.findLastIdxMonotonous)(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)this._normalizedRanges.splice(r,0,e);else if(r===n-1){let o=this._normalizedRanges[r];this._normalizedRanges[r]=o.join(e)}else{let o=this._normalizedRanges[r].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(r,n-r,o)}}contains(e){let r=(0,nae.findLastMonotonous)(this._normalizedRanges,n=>n.startLineNumber<=e);return!!r&&r.endLineNumberExclusive>e}intersects(e){let r=(0,nae.findLastMonotonous)(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let r=[],n=0,o=0,s=null;for(;n=c.startLineNumber?s=new iae(s.startLineNumber,Math.max(s.endLineNumberExclusive,c.endLineNumberExclusive)):(r.push(s),s=c)}return s!==null&&r.push(s),new t(r)}subtractFrom(e){let r=(0,nae.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,c=>c.endLineNumberExclusive>=e.startLineNumber),n=(0,nae.findLastIdxMonotonous)(this._normalizedRanges,c=>c.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)return new t([e]);let o=[],s=e.startLineNumber;for(let c=r;cs&&o.push(new iae(s,l.startLineNumber)),s=l.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let r=[],n=0,o=0;for(;nr.delta(e)))}};oae.LineRangeSet=cbe});var sae=T(aKe=>{"use strict";f();Object.defineProperty(aKe,"__esModule",{value:!0});aKe.TextLength=void 0;var fJo=N5(),LSn=qE(),sKe=ff(),a$t=class t{static{a(this,"TextLength")}static{this.zero=new t(0,0)}static lengthDiffNonNegative(e,r){return r.isLessThan(e)?t.zero:e.lineCount===r.lineCount?new t(0,r.columnCount-e.columnCount):new t(r.lineCount-e.lineCount,r.columnCount)}static betweenPositions(e,r){return e.lineNumber===r.lineNumber?new t(0,r.column-e.column):new t(r.lineNumber-e.lineNumber,r.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let r=0,n=0;for(let o of e)o===` +`?(r++,n=0):n++;return new t(r,n)}static ofSubstr(e,r){return t.ofText(r.substring(e))}static sum(e,r){return e.reduce((n,o)=>n.add(r(o)),t.zero)}constructor(e,r){this.lineCount=e,this.columnCount=r}isZero(){return this.lineCount===0&&this.columnCount===0}isLessThan(e){return this.lineCount!==e.lineCount?this.lineCounte.lineCount:this.columnCount>e.columnCount}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}equals(e){return this.lineCount===e.lineCount&&this.columnCount===e.columnCount}compare(e){return this.lineCount!==e.lineCount?this.lineCount-e.lineCount:this.columnCount-e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new sKe.Range(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new sKe.Range(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new sKe.Range(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return fJo.LineRange.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new LSn.Position(e.lineNumber,e.column+this.columnCount):new LSn.Position(e.lineNumber+this.lineCount,this.columnCount+1)}addToRange(e){return sKe.Range.fromPositions(this.addToPosition(e.getStartPosition()),this.addToPosition(e.getEndPosition()))}toString(){return`${this.lineCount},${this.columnCount}`}};aKe.TextLength=a$t});var lKe=T(tW=>{"use strict";f();Object.defineProperty(tW,"__esModule",{value:!0});tW.PositionOffsetTransformer=tW.PositionOffsetTransformerBase=void 0;tW._setPositionOffsetTransformerDependencies=gJo;var pJo=tF(),hJo=wu(),lbe=qE(),mJo=ff(),cKe=class{static{a(this,"PositionOffsetTransformerBase")}getOffsetRange(e){return new hJo.OffsetRange(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return mJo.Range.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringEdit(e){let r=e.replacements.map(n=>this.getStringReplacement(n));return new AO.deps.StringEdit(r)}getStringReplacement(e){return new AO.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new AO.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let r=e.replacements.map(n=>this.getTextReplacement(n));return new AO.deps.TextEdit(r)}};tW.PositionOffsetTransformerBase=cKe;var AO=class{static{a(this,"Deps")}static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};function gJo(t){AO._deps=t}a(gJo,"_setPositionOffsetTransformerDependencies");var c$t=class extends cKe{static{a(this,"PositionOffsetTransformer")}constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){let r=this._validatePosition(e);return this.lineStartOffsetByLineIdx[r.lineNumber-1]+r.column-1}_validatePosition(e){if(e.lineNumber<1)return new lbe.Position(1,1);let r=this.textLength.lineCount+1;if(e.lineNumber>r){let o=this.getLineLength(r);return new lbe.Position(r,o+1)}if(e.column<1)return new lbe.Position(e.lineNumber,1);let n=this.getLineLength(e.lineNumber);return e.column-1>n?new lbe.Position(e.lineNumber,n+1):e}getPosition(e){let r=(0,pJo.findLastIdxMonotonous)(this.lineStartOffsetByLineIdx,s=>s<=e),n=r+1,o=e-this.lineStartOffsetByLineIdx[r]+1;return new lbe.Position(n,o)}getTextLength(e){return AO.deps.TextLength.ofRange(this.getRange(e))}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new AO.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};tW.PositionOffsetTransformer=c$t});var xv=T(M5=>{"use strict";f();Object.defineProperty(M5,"__esModule",{value:!0});M5.StringText=M5.ArrayText=M5.LineBasedText=M5.AbstractText=void 0;var AJo=Hl(),yJo=m0(),EJo=qE(),FSn=ff(),_Jo=sae(),USn=lKe(),ube=class{static{a(this,"AbstractText")}constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new EJo.Position(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new FSn.Range(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new USn.PositionOffsetTransformer(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new FSn.Range(e,1,e,Number.MAX_SAFE_INTEGER))}getLines(){let e=this.getValue();return(0,yJo.splitLines)(e)}getLinesOfRange(e){return e.mapToLineArray(r=>this.getLineAt(r))}equals(e){return this===e?!0:this.getValue()===e.getValue()}};M5.AbstractText=ube;var uKe=class extends ube{static{a(this,"LineBasedText")}constructor(e,r){(0,AJo.assert)(r>=1),super(),this._getLineContent=e,this._lineCount=r}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let r=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let n=e.startLineNumber+1;ne[r-1],e.length)}};VN.ArrayText=Hjt;var jjt=class extends pTe{static{a(this,"StringText")}constructor(e){super(),this.value=e,this._t=new QTn.PositionOffsetTransformer(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}};VN.StringText=jjt});var GTn=T(WN=>{"use strict";f();Object.defineProperty(WN,"__esModule",{value:!0});WN.AnnotationReplacement=WN.Edit=WN.BaseReplacement=WN.BaseEdit=void 0;var CYo=jc(),qTn=es(),RS=Fu(),nJe=class{static{a(this,"BaseEdit")}constructor(e){this.replacements=e;let r=-1;for(let n of e){if(!(n.replaceRange.start>=r))throw new qTn.BugIndicatingError(`Edits must be disjoint and sorted. Found ${n} after ${r}`);r=n.replaceRange.endExclusive}}equals(e){if(this.replacements.length!==e.replacements.length)return!1;for(let r=0;rr.toString()).join(", ")}]`}normalize(){let e=[],r;for(let n of this.replacements)if(!(n.getNewLength()===0&&n.replaceRange.length===0)){if(r&&r.replaceRange.endExclusive===n.replaceRange.start){let o=r.tryJoinTouching(n);if(o){r=o;continue}}r&&e.push(r),r=n}return r&&e.push(r),this._createNew(e)}compose(e){let r=this.normalize(),n=e.normalize();if(r.isEmpty())return n;if(n.isEmpty())return r;let o=[...r.replacements],s=[],c=0;for(let l of n.replacements){for(;;){let h=o[0];if(!h||h.replaceRange.start+c+h.getNewLength()>=l.replaceRange.start)break;o.shift(),s.push(h),c+=h.getNewLength()-h.replaceRange.length}let u=c,d,p;for(;;){let h=o[0];if(!h||h.replaceRange.start+c>l.replaceRange.endExclusive)break;d||(d=h),p=h,o.shift(),c+=h.getNewLength()-h.replaceRange.length}if(!d)s.push(l.delta(-c));else{let h=Math.min(d.replaceRange.start,l.replaceRange.start-u),m=l.replaceRange.start-(d.replaceRange.start+u);if(m>0){let E=d.slice(RS.OffsetRange.emptyAt(h),new RS.OffsetRange(0,m));s.push(E)}if(!p)throw new qTn.BugIndicatingError("Invariant violation: lastIntersecting is undefined");let g=p.replaceRange.endExclusive+c-l.replaceRange.endExclusive;if(g>0){let E=p.slice(RS.OffsetRange.ofStartAndLength(p.replaceRange.endExclusive,0),new RS.OffsetRange(p.getNewLength()-g,p.getNewLength()));o.unshift(E),c-=E.getNewLength()-E.replaceRange.length}let A=new RS.OffsetRange(h,l.replaceRange.endExclusive-c),y=l.slice(A,new RS.OffsetRange(0,l.getNewLength()));s.push(y)}}for(;;){let l=o.shift();if(!l)break;s.push(l)}return this._createNew(s).normalize()}decomposeSplit(e){let r=[],n=[],o=0;for(let s of this.replacements)e(s)?(r.push(s),o+=s.getNewLength()-s.replaceRange.length):n.push(s.slice(s.replaceRange.delta(o),new RS.OffsetRange(0,s.getNewLength())));return{e1:this._createNew(r),e2:this._createNew(n)}}getNewRanges(){let e=[],r=0;for(let n of this.replacements)e.push(RS.OffsetRange.ofStartAndLength(n.replaceRange.start+r,n.getNewLength())),r+=n.getLengthDelta();return e}getJoinedReplaceRange(){if(this.replacements.length!==0)return this.replacements[0].replaceRange.join(this.replacements.at(-1).replaceRange)}isEmpty(){return this.replacements.length===0}getLengthDelta(){return(0,CYo.sumBy)(this.replacements,e=>e.getLengthDelta())}getNewDataLength(e){return e+this.getLengthDelta()}applyToOffset(e){let r=0;for(let n of this.replacements)if(n.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new RS.OffsetRange(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}};WN.BaseReplacement=iJe;var $jt=class t extends nJe{static{a(this,"Edit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}_createNew(e){return new t(e)}};WN.Edit=$jt;var Vjt=class t extends iJe{static{a(this,"AnnotationReplacement")}constructor(e,r,n){super(e),this.newLength=r,this.annotation=n}equals(e){return this.replaceRange.equals(e.replaceRange)&&this.newLength===e.newLength&&this.annotation===e.annotation}getNewLength(){return this.newLength}tryJoinTouching(e){if(this.annotation===e.annotation)return new t(this.replaceRange.joinRightTouching(e.replaceRange),this.newLength+e.newLength,this.annotation)}slice(e,r){return new t(e,r?r.length:this.newLength,this.annotation)}};WN.AnnotationReplacement=Vjt});var aA=T(Hm=>{"use strict";f();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.AnnotatedStringReplacement=Hm.AnnotatedStringEdit=Hm.VoidEditData=Hm.StringReplacement=Hm.StringEdit=Hm.BaseStringReplacement=Hm.BaseStringEdit=void 0;Hm.applyEditsToRanges=vYo;var oJe=C0(),qw=Fu(),_Yo=Qv(),jTn=GTn(),hTe=class extends jTn.BaseEdit{static{a(this,"BaseStringEdit")}get TReplacement(){throw new Error("TReplacement is not defined for BaseStringEdit")}static composeOrUndefined(e){if(e.length===0)return;let r=e[0];for(let n=1;n" ".repeat(l-c)),o=r.tryRebase(n);if(!o)return;let s=e.tryRebase(o);if(s)return{e1:o,e2:s}}apply(e){let r=[],n=0;for(let o of this.replacements)r.push(e.substring(n,o.replaceRange.start)),r.push(o.newText),n=o.replaceRange.endExclusive;return r.push(e.substring(n)),r.join("")}inverseOnSlice(e){let r=[],n=0;for(let o of this.replacements)r.push(Ny.replace(qw.OffsetRange.ofStartAndLength(o.replaceRange.start+n,o.newText.length),e(o.replaceRange.start,o.replaceRange.endExclusive))),n+=o.newText.length-o.replaceRange.length;return new zN(r)}inverse(e){return this.inverseOnSlice((r,n)=>e.substring(r,n))}rebaseSkipConflicting(e){return this._tryRebase(e,!1)}tryRebase(e){return this._tryRebase(e,!0)}_tryRebase(e,r){let n=[],o=0,s=0,c=0;for(;se.toJson())}isNeutralOn(e){return this.replacements.every(r=>r.isNeutralOn(e))}removeCommonSuffixPrefix(e){let r=[];for(let n of this.replacements){let o=n.removeCommonSuffixPrefix(e);o.isEmpty||r.push(o)}return new zN(r)}normalizeEOL(e){return new zN(this.replacements.map(r=>r.normalizeEOL(e)))}normalizeOnSource(e){let r=this.apply(e),o=Ny.replace(qw.OffsetRange.ofLength(e.length),r).removeCommonSuffixAndPrefix(e);return o.isEmpty?zN.empty:o.toEdit()}removeCommonSuffixAndPrefix(e){return this._createNew(this.replacements.map(r=>r.removeCommonSuffixAndPrefix(e))).normalize()}applyOnText(e){return new _Yo.StringText(this.apply(e.value))}mapData(e){return new sJe(this.replacements.map(r=>new YW(r.replaceRange,r.newText,e(r))))}};Hm.BaseStringEdit=hTe;var mTe=class extends jTn.BaseReplacement{static{a(this,"BaseStringReplacement")}constructor(e,r){super(e),this.newText=r}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}isNeutralOn(e){return this.newText===e.substring(this.replaceRange.start,this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let r=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),n=(0,oJe.commonPrefixLength)(r,this.newText),o=Math.min(r.length-n,this.newText.length-n,(0,oJe.commonSuffixLength)(r,this.newText)),s=new qw.OffsetRange(this.replaceRange.start+n,this.replaceRange.endExclusive-o),c=this.newText.substring(n,this.newText.length-o);return new Ny(s,c)}normalizeEOL(e){let r=this.newText.replace(/\r\n|\n/g,e);return new Ny(this.replaceRange,r)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let r=this.replaceRange.substring(e),n=(0,oJe.commonPrefixLength)(r,this.newText);return n===0?this:this.slice(this.replaceRange.deltaStart(n),new qw.OffsetRange(n,this.newText.length))}removeCommonSuffix(e){let r=this.replaceRange.substring(e),n=(0,oJe.commonSuffixLength)(r,this.newText);return n===0?this:this.slice(this.replaceRange.deltaEnd(-n),new qw.OffsetRange(0,this.newText.length-n))}toEdit(){return new zN([this])}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}};Hm.BaseStringReplacement=mTe;var zN=class t extends hTe{static{a(this,"StringEdit")}static parse(e){let r=[],n=/\[(\d+),\s*(\d+)\)\s*->\s*"([^"]*)"/g,o;for(;(o=n.exec(e))!==null;){let s=parseInt(o[1],10),c=parseInt(o[2],10),l=o[3].replace(/\\n/g,` -`).replace(/\\r/g,"\r").replace(/\\\\/g,"\\");r.push(new Ny(new qw.OffsetRange(s,c),l))}return new t(r)}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r){return new t([new Ny(e,r)])}static insert(e,r){return new t([new Ny(qw.OffsetRange.emptyAt(e),r)])}static delete(e){return new t([new Ny(e,"")])}static fromJson(e){return new t(e.map(Ny.fromJson))}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;n=o.replaceRange.start)break;t.shift(),r.push(c.delta(n))}let s=[];for(;;){let c=t[0];if(!c||!c.intersectsOrTouches(o.replaceRange))break;t.shift(),s.push(c)}for(let c=s.length-1;c>=0;c--){let l=s[c],u=l.intersect(o.replaceRange).length;l=l.deltaEnd(-u+(c===0?o.newText.length:0));let d=l.start-o.replaceRange.start;d>0&&(l=l.delta(-d)),c!==0&&(l=l.delta(o.newText.length)),l=l.delta(-(o.newText.length-o.replaceRange.length)),t.unshift(l)}n+=o.newText.length-o.replaceRange.length}for(;;){let o=t[0];if(!o)break;t.shift(),r.push(o.delta(n))}return r}a(vYo,"applyEditsToRanges");var Wjt=class{static{a(this,"VoidEditData")}join(e){return this}};Hm.VoidEditData=Wjt;var sJe=class t extends hTe{static{a(this,"AnnotatedStringEdit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r,n){return new t([new YW(e,r,n)])}static insert(e,r,n){return new t([new YW(qw.OffsetRange.emptyAt(e),r,n)])}static delete(e,r){return new t([new YW(e,"",r)])}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;n{"use strict";f();Object.defineProperty(aJe,"__esModule",{value:!0});aJe.LanguageId=void 0;var $Tn;(function(t){t.PlainText="plaintext";function e(r){return r}a(e,"create"),t.create=e})($Tn||(aJe.LanguageId=$Tn={}))});var WTn=T(E7=>{"use strict";f();Object.defineProperty(E7,"__esModule",{value:!0});E7.EditReasons=E7.TextModelEditReason=E7.EditReason=void 0;var zjt=class t{static{a(this,"EditReason")}static create(e){return e?new t(e):t.unknown}constructor(e){this.metadata=e}static{this.unknown=new t({source:"unknown",name:void 0})}toKey(e){return new gTe(this.metadata,VTn).toKey(e)}};E7.EditReason=zjt;var VTn=Symbol("TextModelEditReason"),gTe=class{static{a(this,"TextModelEditReason")}constructor(e,r){this.metadata=e}toString(){return`${this.metadata.source}`}getType(){let e=this.metadata;switch(e.source){case"cursor":return e.kind;case"inlineCompletionAccept":return e.source+(e.$nes?":nes":"");case"unknown":return e.name||"unknown";default:return e.source}}toKey(e){let r=this.metadata;return Object.entries(r).filter(([o,s])=>(o.match(/\$/g)||[]).length<=e&&s!==void 0&&s!==null&&s!=="").map(([o,s])=>`${o}:${s}`).join("-")}};E7.TextModelEditReason=gTe;function PS(t){return new gTe(t,VTn)}a(PS,"createEditReason");E7.EditReasons={unknown(t){return PS({source:"unknown",name:t.name})},chatApplyEdits(t){return PS({source:"Chat.applyEdits",$modelId:t.modelId})},inlineCompletionAccept(t){return PS({source:"inlineCompletionAccept",$nes:t.nes,$extensionId:t.extensionId,$$requestUuid:t.requestUuid})},inlineCompletionPartialAccept(t){return PS({source:"inlineCompletionPartialAccept",type:t.type,$extensionId:t.extensionId,$$requestUuid:t.requestUuid})},inlineChatApplyEdit(t){return PS({source:"inlineChat.applyEdits",$modelId:t.modelId})},reloadFromDisk:a(()=>PS({source:"reloadFromDisk"}),"reloadFromDisk"),cursor(t){return PS({source:"cursor",kind:t.kind,detailedSource:t.detailedSource})},setValue:a(()=>PS({source:"setValue"}),"setValue"),eolChange:a(()=>PS({source:"eolChange"}),"eolChange"),applyEdits:a(()=>PS({source:"applyEdits"}),"applyEdits"),snippet:a(()=>PS({source:"snippet"}),"snippet"),suggest:a(t=>PS({source:"suggest",$extensionId:t.extensionId}),"suggest")}});var KW=T(YN=>{"use strict";f();Object.defineProperty(YN,"__esModule",{value:!0});YN.MutableObservableDocument=YN.MutableObservableWorkspace=YN.StringEditWithReason=YN.ObservableWorkspace=void 0;var TYo=Jl(),zTn=so(),Dy=M4(),KTn=aA(),SYo=Fu(),IYo=Qv(),xYo=cJe(),YTn=WTn(),lJe=class{static{a(this,"ObservableWorkspace")}constructor(){this._version=0,this.onDidOpenDocumentChange=(0,Dy.derivedHandleChanges)({owner:this,changeTracker:{createChangeSummary:a(()=>({didChange:!1}),"createChangeSummary"),handleChange:a((e,r)=>(e.didChange(this.openDocuments)||(r.didChange=!0),!0),"handleChange")}},(e,r)=>{let n=this.openDocuments.read(e);for(let o of n)o.value.read(e);return r.didChange&&this._version++,this._version}),this.lastActiveDocument=(0,Dy.derivedWithStore)((e,r)=>{let n=(0,Dy.observableValue)("lastActiveDocument",void 0);return r.add((0,Dy.autorunWithStore)((o,s)=>{let c=this.openDocuments.read(o);for(let l of c)s.add((0,Dy.runOnChange)(l.value,()=>{n.set(l,void 0)}))})),n}).flatten()}getFirstOpenDocument(){return this.openDocuments.get()[0]}getDocument(e){return this.openDocuments.get().find(r=>r.id===e)}};YN.ObservableWorkspace=lJe;var Wae=class extends KTn.StringEdit{static{a(this,"StringEditWithReason")}constructor(e,r){super(e),this.reason=r}};YN.StringEditWithReason=Wae;var Yjt=class extends lJe{static{a(this,"MutableObservableWorkspace")}constructor(){super(...arguments),this._openDocuments=(0,Dy.observableValue)(this,[]),this.openDocuments=this._openDocuments,this._documents=new Map}addDocument(e,r=void 0){(0,TYo.assert)(!this._documents.has(e.id));let n=new uJe(e.id,new IYo.StringText(e.initialValue??""),[],e.languageId??xYo.LanguageId.PlainText,()=>{this._documents.delete(e.id);let o=this._openDocuments.get(),s=o.filter(c=>c.id!==n.id);s.length!==o.length&&this._openDocuments.set(s,r,{added:[],removed:[n]})},e.initialVersionId??0,e.workspaceRoot);return this._documents.set(e.id,n),this._openDocuments.set([...this._openDocuments.get(),n],r,{added:[n],removed:[]}),n}getDocument(e){return this._documents.get(e)}clear(){this._openDocuments.set([],void 0,{added:[],removed:this._openDocuments.get()});for(let e of this._documents.values())e.dispose();this._documents.clear()}getWorkspaceRoot(e){return this._documents.get(e)?.workspaceRoot}};YN.MutableObservableWorkspace=Yjt;var uJe=class extends zTn.Disposable{static{a(this,"MutableObservableDocument")}get value(){return this._value}get selection(){return this._selection}get primarySelectionLine(){return this._primarySelectionLine}get visibleRanges(){return this._visibleRanges}get languageId(){return this._languageId}get version(){return this._version}get diagnostics(){return this._diagnostics}constructor(e,r,n,o,s,c,l){super(),this.id=e,this.workspaceRoot=l,this._value=(0,Dy.observableValue)(this,r),this._selection=(0,Dy.observableValue)(this,n),this._primarySelectionLine=(0,Dy.observableValue)(this,void 0),this._visibleRanges=(0,Dy.observableValue)(this,[]),this._languageId=(0,Dy.observableValue)(this,o),this._version=(0,Dy.observableValue)(this,c),this._diagnostics=(0,Dy.observableValue)(this,[]),this._register((0,zTn.toDisposable)(s))}setSelection(e,r=void 0,n){this._selection.set(e,r),this._primarySelectionLine.set(n,r)}setVisibleRange(e,r=void 0){this._visibleRanges.set(e,r)}applyEdit(e,r=void 0,n=void 0){let o=e.applyOnText(this.value.get()),s=e instanceof Wae?e:new Wae(e.replacements,YTn.EditReason.unknown);(0,Dy.subtransaction)(r,c=>{this._value.set(o,c,s),this._version.set(n??this._version.get()+1,c)})}updateSelection(e,r=void 0,n){this._selection.set(e,r),this._primarySelectionLine.set(n,r)}setValue(e,r=void 0,n=void 0){let o=YTn.EditReason.unknown,s=new Wae([KTn.StringReplacement.replace(new SYo.OffsetRange(0,this.value.get().value.length),e.value)],o);(0,Dy.subtransaction)(r,c=>{this._value.set(e,c,s),this._version.set(n??this._version.get()+1,c)})}updateDiagnostics(e,r=void 0){this._diagnostics.set(e,r)}};YN.MutableObservableDocument=uJe});var Gw=T(JW=>{"use strict";f();var wYo=JW&&JW.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),RYo=JW&&JW.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&wYo(e,t,r)};Object.defineProperty(JW,"__esModule",{value:!0});RYo(M4(),JW)});var KN=T(Kjt=>{"use strict";f();Object.defineProperty(Kjt,"__esModule",{value:!0});Kjt.autorunWithChanges=kYo;var PYo=Gw();function kYo(t,e,r){let n=new Map(Object.entries(e).map(([s,c])=>[c,s])),o=new Map(Object.keys(e).map(s=>[s,void 0]));return(0,PYo.autorunHandleChanges)({owner:t,changeTracker:{createChangeSummary:a(()=>({}),"createChangeSummary"),handleChange:a((s,c)=>{let l=n.get(s.changedObservable);return c[l]===void 0&&(c[l]={value:void 0,changes:[]}),c[l].changes.push(s.change),!0},"handleChange")}},(s,c)=>{for(let[l,u]of Object.entries(e)){let d=u.read(s);c[l]===void 0&&(c[l]={value:d,changes:[],previous:o.get(l)}),c[l].value=d,c[l].previous=o.get(l)===void 0?void 0:o.get(l),o.set(l,d)}r(c)})}a(kYo,"autorunWithChanges")});var la=T($m=>{"use strict";f();var I$t=Symbol.for("yaml.alias"),aIn=Symbol.for("yaml.document"),KJe=Symbol.for("yaml.map"),cIn=Symbol.for("yaml.pair"),x$t=Symbol.for("yaml.scalar"),JJe=Symbol.for("yaml.seq"),U4=Symbol.for("yaml.node.type"),fJo=a(t=>!!t&&typeof t=="object"&&t[U4]===I$t,"isAlias"),pJo=a(t=>!!t&&typeof t=="object"&&t[U4]===aIn,"isDocument"),hJo=a(t=>!!t&&typeof t=="object"&&t[U4]===KJe,"isMap"),mJo=a(t=>!!t&&typeof t=="object"&&t[U4]===cIn,"isPair"),lIn=a(t=>!!t&&typeof t=="object"&&t[U4]===x$t,"isScalar"),gJo=a(t=>!!t&&typeof t=="object"&&t[U4]===JJe,"isSeq");function uIn(t){if(t&&typeof t=="object")switch(t[U4]){case KJe:case JJe:return!0}return!1}a(uIn,"isCollection");function AJo(t){if(t&&typeof t=="object")switch(t[U4]){case I$t:case KJe:case x$t:case JJe:return!0}return!1}a(AJo,"isNode");var yJo=a(t=>(lIn(t)||uIn(t))&&!!t.anchor,"hasAnchor");$m.ALIAS=I$t;$m.DOC=aIn;$m.MAP=KJe;$m.NODE_TYPE=U4;$m.PAIR=cIn;$m.SCALAR=x$t;$m.SEQ=JJe;$m.hasAnchor=yJo;$m.isAlias=fJo;$m.isCollection=uIn;$m.isDocument=pJo;$m.isMap=hJo;$m.isNode=AJo;$m.isPair=mJo;$m.isScalar=lIn;$m.isSeq=gJo});var ITe=T(w$t=>{"use strict";f();var wp=la(),WC=Symbol("break visit"),dIn=Symbol("skip children"),eD=Symbol("remove node");function XJe(t,e){let r=fIn(e);wp.isDocument(t)?tce(null,t.contents,r,Object.freeze([t]))===eD&&(t.contents=null):tce(null,t,r,Object.freeze([]))}a(XJe,"visit");XJe.BREAK=WC;XJe.SKIP=dIn;XJe.REMOVE=eD;function tce(t,e,r,n){let o=pIn(t,e,r,n);if(wp.isNode(o)||wp.isPair(o))return hIn(t,n,o),tce(t,o,r,n);if(typeof o!="symbol"){if(wp.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s{"use strict";f();var mIn=la(),EJo=ITe(),CJo={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_Jo=a(t=>t.replace(/[!,[\]{}]/g,e=>CJo[e]),"escapeTagName"),xTe=class t{static{a(this,"Directives")}constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,c]=n;return this.tags[s]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let c=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,c),!1}}default:return r(0,`Unknown directive ${o}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let c=e.slice(2,-1);return c==="!"||c==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),c)}let[,n,o]=e.match(/^(.*!)([^!]*)$/s);o||r(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(o)}catch(c){return r(String(c)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+_Jo(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),o;if(e&&n.length>0&&mIn.isNode(e.contents)){let s={};EJo.visit(e.contents,(c,l)=>{mIn.isNode(l)&&l.tag&&(s[l.tag]=!0)}),o=Object.keys(s)}else o=[];for(let[s,c]of n)s==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(l=>l.startsWith(c)))&&r.push(`%TAG ${s} ${c}`);return r.join(` -`)}};xTe.defaultYaml={explicit:!1,version:"1.2"};xTe.defaultTags={"!!":"tag:yaml.org,2002:"};gIn.Directives=xTe});var eXe=T(wTe=>{"use strict";f();var AIn=la(),vJo=ITe();function bJo(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}a(bJo,"anchorIsValid");function yIn(t){let e=new Set;return vJo.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}a(yIn,"anchorNames");function EIn(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}a(EIn,"findNewAnchor");function TJo(t,e){let r=[],n=new Map,o=null;return{onAnchor:a(s=>{r.push(s),o??(o=yIn(t));let c=EIn(e,o);return o.add(c),c},"onAnchor"),setAnchors:a(()=>{for(let s of r){let c=n.get(s);if(typeof c=="object"&&c.anchor&&(AIn.isScalar(c.node)||AIn.isCollection(c.node)))c.node.anchor=c.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},"setAnchors"),sourceObjects:n}}a(TJo,"createNodeAnchors");wTe.anchorIsValid=bJo;wTe.anchorNames=yIn;wTe.createNodeAnchors=TJo;wTe.findNewAnchor=EIn});var P$t=T(CIn=>{"use strict";f();function RTe(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o{"use strict";f();var SJo=la();function _In(t,e,r){if(Array.isArray(t))return t.map((n,o)=>_In(n,String(o),r));if(t&&typeof t.toJSON=="function"){if(!r||!SJo.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let o=t.toJSON(e,r);return r.onCreate&&r.onCreate(o),o}return typeof t=="bigint"&&!r?.keep?Number(t):t}a(_In,"toJS");vIn.toJS=_In});var tXe=T(TIn=>{"use strict";f();var IJo=P$t(),bIn=la(),xJo=b7(),k$t=class{static{a(this,"NodeBase")}constructor(e){Object.defineProperty(this,bIn.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!bIn.isDocument(e))throw new TypeError("A document argument is required");let c={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=xJo.toJS(this,"",c);if(typeof o=="function")for(let{count:u,res:d}of c.anchors.values())o(d,u);return typeof s=="function"?IJo.applyReviver(s,{"":l},"",l):l}};TIn.NodeBase=k$t});var PTe=T(SIn=>{"use strict";f();var wJo=eXe(),RJo=ITe(),nce=la(),PJo=tXe(),kJo=b7(),N$t=class extends PJo.NodeBase{static{a(this,"Alias")}constructor(e){super(nce.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],RJo.visit(e,{Node:a((s,c)=>{(nce.isAlias(c)||nce.hasAnchor(c))&&n.push(c)},"Node")}),r&&(r.aliasResolveCache=n));let o;for(let s of n){if(s===this)break;s.anchor===this.source&&(o=s)}return o}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:o,maxAliasCount:s}=r,c=this.resolve(o,r);if(!c){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let l=n.get(c);if(l||(kJo.toJS(c,null,r),l=n.get(c)),l?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=rXe(o,c,n)),l.count*l.aliasCount>s)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return l.res}toString(e,r,n){let o=`*${this.source}`;if(e){if(wJo.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}};function rXe(t,e,r){if(nce.isAlias(e)){let n=e.resolve(t),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}else if(nce.isCollection(e)){let n=0;for(let o of e.items){let s=rXe(t,o,r);s>n&&(n=s)}return n}else if(nce.isPair(e)){let n=rXe(t,e.key,r),o=rXe(t,e.value,r);return Math.max(n,o)}return 1}a(rXe,"getAliasCount");SIn.Alias=N$t});var N0=T(D$t=>{"use strict";f();var NJo=la(),DJo=tXe(),MJo=b7(),OJo=a(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),T7=class extends DJo.NodeBase{static{a(this,"Scalar")}constructor(e){super(NJo.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:MJo.toJS(this.value,e,r)}toString(){return String(this.value)}};T7.BLOCK_FOLDED="BLOCK_FOLDED";T7.BLOCK_LITERAL="BLOCK_LITERAL";T7.PLAIN="PLAIN";T7.QUOTE_DOUBLE="QUOTE_DOUBLE";T7.QUOTE_SINGLE="QUOTE_SINGLE";D$t.Scalar=T7;D$t.isScalarValue=OJo});var kTe=T(xIn=>{"use strict";f();var BJo=PTe(),nz=la(),IIn=N0(),LJo="tag:yaml.org,2002:";function FJo(t,e,r){if(e){let n=r.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return r.find(n=>n.identify?.(t)&&!n.format)}a(FJo,"findTagObject");function UJo(t,e,r){if(nz.isDocument(t)&&(t=t.contents),nz.isNode(t))return t;if(nz.isPair(t)){let h=r.schema[nz.MAP].createNode?.(r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:c,sourceObjects:l}=r,u;if(n&&t&&typeof t=="object"){if(u=l.get(t),u)return u.anchor??(u.anchor=o(t)),new BJo.Alias(u.anchor);u={anchor:null,node:null},l.set(t,u)}e?.startsWith("!!")&&(e=LJo+e.slice(2));let d=FJo(t,e,c.tags);if(!d){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let h=new IIn.Scalar(t);return u&&(u.node=h),h}d=t instanceof Map?c[nz.MAP]:Symbol.iterator in Object(t)?c[nz.SEQ]:c[nz.MAP]}s&&(s(d),delete r.onTagObj);let p=d?.createNode?d.createNode(r.schema,t,r):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(r.schema,t,r):new IIn.Scalar(t);return e?p.tag=e:d.default||(p.tag=d.tag),u&&(u.node=p),p}a(UJo,"createNode");xIn.createNode=UJo});var iXe=T(nXe=>{"use strict";f();var QJo=kTe(),tD=la(),qJo=tXe();function M$t(t,e,r){let n=r;for(let o=e.length-1;o>=0;--o){let s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let c=[];c[s]=n,n=c}else n=new Map([[s,n]])}return QJo.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:a(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:t,sourceObjects:new Map})}a(M$t,"collectionFromPath");var wIn=a(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),O$t=class extends qJo.NodeBase{static{a(this,"Collection")}constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>tD.isNode(n)||tD.isPair(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(wIn(e))this.add(r);else{let[n,...o]=e,s=this.get(n,!0);if(tD.isCollection(s))s.addIn(o,r);else if(s===void 0&&this.schema)this.set(n,M$t(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let o=this.get(r,!0);if(tD.isCollection(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...o]=e,s=this.get(n,!0);return o.length===0?!r&&tD.isScalar(s)?s.value:s:tD.isCollection(s)?s.getIn(o,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!tD.isPair(r))return!1;let n=r.value;return n==null||e&&tD.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let o=this.get(r,!0);return tD.isCollection(o)?o.hasIn(n):!1}setIn(e,r){let[n,...o]=e;if(o.length===0)this.set(n,r);else{let s=this.get(n,!0);if(tD.isCollection(s))s.setIn(o,r);else if(s===void 0&&this.schema)this.set(n,M$t(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}};nXe.Collection=O$t;nXe.collectionFromPath=M$t;nXe.isEmptyPath=wIn});var NTe=T(oXe=>{"use strict";f();var GJo=a(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function B$t(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}a(B$t,"indentComment");var HJo=a((t,e,r)=>t.endsWith(` -`)?B$t(r,e):r.includes(` +`+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1),r}getLineLength(e){return this._getLineContent(e).length}get length(){let e=this._getLineContent(this._lineCount);return new _Jo.TextLength(this._lineCount-1,e.length)}};M5.LineBasedText=uKe;var l$t=class extends uKe{static{a(this,"ArrayText")}constructor(e){super(r=>e[r-1],e.length)}};M5.ArrayText=l$t;var u$t=class extends ube{static{a(this,"StringText")}constructor(e){super(),this.value=e,this._t=new USn.PositionOffsetTransformer(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}};M5.StringText=u$t});var qSn=T(O5=>{"use strict";f();Object.defineProperty(O5,"__esModule",{value:!0});O5.AnnotationReplacement=O5.Edit=O5.BaseReplacement=O5.BaseEdit=void 0;var CJo=Lc(),QSn=Ko(),AS=wu(),dKe=class{static{a(this,"BaseEdit")}constructor(e){this.replacements=e;let r=-1;for(let n of e){if(!(n.replaceRange.start>=r))throw new QSn.BugIndicatingError(`Edits must be disjoint and sorted. Found ${n} after ${r}`);r=n.replaceRange.endExclusive}}equals(e){if(this.replacements.length!==e.replacements.length)return!1;for(let r=0;rr.toString()).join(", ")}]`}normalize(){let e=[],r;for(let n of this.replacements)if(!(n.getNewLength()===0&&n.replaceRange.length===0)){if(r&&r.replaceRange.endExclusive===n.replaceRange.start){let o=r.tryJoinTouching(n);if(o){r=o;continue}}r&&e.push(r),r=n}return r&&e.push(r),this._createNew(e)}compose(e){let r=this.normalize(),n=e.normalize();if(r.isEmpty())return n;if(n.isEmpty())return r;let o=[...r.replacements],s=[],c=0;for(let l of n.replacements){for(;;){let h=o[0];if(!h||h.replaceRange.start+c+h.getNewLength()>=l.replaceRange.start)break;o.shift(),s.push(h),c+=h.getNewLength()-h.replaceRange.length}let u=c,d,p;for(;;){let h=o[0];if(!h||h.replaceRange.start+c>l.replaceRange.endExclusive)break;d||(d=h),p=h,o.shift(),c+=h.getNewLength()-h.replaceRange.length}if(!d)s.push(l.delta(-c));else{let h=Math.min(d.replaceRange.start,l.replaceRange.start-u),m=l.replaceRange.start-(d.replaceRange.start+u);if(m>0){let E=d.slice(AS.OffsetRange.emptyAt(h),new AS.OffsetRange(0,m));s.push(E)}if(!p)throw new QSn.BugIndicatingError("Invariant violation: lastIntersecting is undefined");let g=p.replaceRange.endExclusive+c-l.replaceRange.endExclusive;if(g>0){let E=p.slice(AS.OffsetRange.ofStartAndLength(p.replaceRange.endExclusive,0),new AS.OffsetRange(p.getNewLength()-g,p.getNewLength()));o.unshift(E),c-=E.getNewLength()-E.replaceRange.length}let A=new AS.OffsetRange(h,l.replaceRange.endExclusive-c),y=l.slice(A,new AS.OffsetRange(0,l.getNewLength()));s.push(y)}}for(;;){let l=o.shift();if(!l)break;s.push(l)}return this._createNew(s).normalize()}decomposeSplit(e){let r=[],n=[],o=0;for(let s of this.replacements)e(s)?(r.push(s),o+=s.getNewLength()-s.replaceRange.length):n.push(s.slice(s.replaceRange.delta(o),new AS.OffsetRange(0,s.getNewLength())));return{e1:this._createNew(r),e2:this._createNew(n)}}getNewRanges(){let e=[],r=0;for(let n of this.replacements)e.push(AS.OffsetRange.ofStartAndLength(n.replaceRange.start+r,n.getNewLength())),r+=n.getLengthDelta();return e}getJoinedReplaceRange(){if(this.replacements.length!==0)return this.replacements[0].replaceRange.join(this.replacements.at(-1).replaceRange)}isEmpty(){return this.replacements.length===0}getLengthDelta(){return(0,CJo.sumBy)(this.replacements,e=>e.getLengthDelta())}getNewDataLength(e){return e+this.getLengthDelta()}applyToOffset(e){let r=0;for(let n of this.replacements)if(n.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new AS.OffsetRange(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}};O5.BaseReplacement=fKe;var d$t=class t extends dKe{static{a(this,"Edit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}_createNew(e){return new t(e)}};O5.Edit=d$t;var f$t=class t extends fKe{static{a(this,"AnnotationReplacement")}constructor(e,r,n){super(e),this.newLength=r,this.annotation=n}equals(e){return this.replaceRange.equals(e.replaceRange)&&this.newLength===e.newLength&&this.annotation===e.annotation}getNewLength(){return this.newLength}tryJoinTouching(e){if(this.annotation===e.annotation)return new t(this.replaceRange.joinRightTouching(e.replaceRange),this.newLength+e.newLength,this.annotation)}slice(e,r){return new t(e,r?r.length:this.newLength,this.annotation)}};O5.AnnotationReplacement=f$t});var Zg=T(Nm=>{"use strict";f();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.AnnotatedStringReplacement=Nm.AnnotatedStringEdit=Nm.VoidEditData=Nm.StringReplacement=Nm.StringEdit=Nm.BaseStringReplacement=Nm.BaseStringEdit=void 0;Nm.applyEditsToRanges=bJo;var pKe=m0(),Pw=wu(),vJo=xv(),HSn=qSn(),dbe=class extends HSn.BaseEdit{static{a(this,"BaseStringEdit")}get TReplacement(){throw new Error("TReplacement is not defined for BaseStringEdit")}static composeOrUndefined(e){if(e.length===0)return;let r=e[0];for(let n=1;n" ".repeat(l-c)),o=r.tryRebase(n);if(!o)return;let s=e.tryRebase(o);if(s)return{e1:o,e2:s}}apply(e){let r=[],n=0;for(let o of this.replacements)r.push(e.substring(n,o.replaceRange.start)),r.push(o.newText),n=o.replaceRange.endExclusive;return r.push(e.substring(n)),r.join("")}inverseOnSlice(e){let r=[],n=0;for(let o of this.replacements)r.push(by.replace(Pw.OffsetRange.ofStartAndLength(o.replaceRange.start+n,o.newText.length),e(o.replaceRange.start,o.replaceRange.endExclusive))),n+=o.newText.length-o.replaceRange.length;return new B5(r)}inverse(e){return this.inverseOnSlice((r,n)=>e.substring(r,n))}rebaseSkipConflicting(e){return this._tryRebase(e,!1)}tryRebase(e){return this._tryRebase(e,!0)}_tryRebase(e,r){let n=[],o=0,s=0,c=0;for(;se.toJson())}isNeutralOn(e){return this.replacements.every(r=>r.isNeutralOn(e))}removeCommonSuffixPrefix(e){let r=[];for(let n of this.replacements){let o=n.removeCommonSuffixPrefix(e);o.isEmpty||r.push(o)}return new B5(r)}normalizeEOL(e){return new B5(this.replacements.map(r=>r.normalizeEOL(e)))}normalizeOnSource(e){let r=this.apply(e),o=by.replace(Pw.OffsetRange.ofLength(e.length),r).removeCommonSuffixAndPrefix(e);return o.isEmpty?B5.empty:o.toEdit()}removeCommonSuffixAndPrefix(e){return this._createNew(this.replacements.map(r=>r.removeCommonSuffixAndPrefix(e))).normalize()}applyOnText(e){return new vJo.StringText(this.apply(e.value))}mapData(e){return new hKe(this.replacements.map(r=>new rW(r.replaceRange,r.newText,e(r))))}};Nm.BaseStringEdit=dbe;var fbe=class extends HSn.BaseReplacement{static{a(this,"BaseStringReplacement")}constructor(e,r){super(e),this.newText=r}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}isNeutralOn(e){return this.newText===e.substring(this.replaceRange.start,this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let r=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),n=(0,pKe.commonPrefixLength)(r,this.newText),o=Math.min(r.length-n,this.newText.length-n,(0,pKe.commonSuffixLength)(r,this.newText)),s=new Pw.OffsetRange(this.replaceRange.start+n,this.replaceRange.endExclusive-o),c=this.newText.substring(n,this.newText.length-o);return new by(s,c)}normalizeEOL(e){let r=this.newText.replace(/\r\n|\n/g,e);return new by(this.replaceRange,r)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let r=this.replaceRange.substring(e),n=(0,pKe.commonPrefixLength)(r,this.newText);return n===0?this:this.slice(this.replaceRange.deltaStart(n),new Pw.OffsetRange(n,this.newText.length))}removeCommonSuffix(e){let r=this.replaceRange.substring(e),n=(0,pKe.commonSuffixLength)(r,this.newText);return n===0?this:this.slice(this.replaceRange.deltaEnd(-n),new Pw.OffsetRange(0,this.newText.length-n))}toEdit(){return new B5([this])}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}};Nm.BaseStringReplacement=fbe;var B5=class t extends dbe{static{a(this,"StringEdit")}static parse(e){let r=[],n=/\[(\d+),\s*(\d+)\)\s*->\s*"([^"]*)"/g,o;for(;(o=n.exec(e))!==null;){let s=parseInt(o[1],10),c=parseInt(o[2],10),l=o[3].replace(/\\n/g,` +`).replace(/\\r/g,"\r").replace(/\\\\/g,"\\");r.push(new by(new Pw.OffsetRange(s,c),l))}return new t(r)}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r){return new t([new by(e,r)])}static insert(e,r){return new t([new by(Pw.OffsetRange.emptyAt(e),r)])}static delete(e){return new t([new by(e,"")])}static fromJson(e){return new t(e.map(by.fromJson))}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;n=o.replaceRange.start)break;t.shift(),r.push(c.delta(n))}let s=[];for(;;){let c=t[0];if(!c||!c.intersectsOrTouches(o.replaceRange))break;t.shift(),s.push(c)}for(let c=s.length-1;c>=0;c--){let l=s[c],u=l.intersect(o.replaceRange).length;l=l.deltaEnd(-u+(c===0?o.newText.length:0));let d=l.start-o.replaceRange.start;d>0&&(l=l.delta(-d)),c!==0&&(l=l.delta(o.newText.length)),l=l.delta(-(o.newText.length-o.replaceRange.length)),t.unshift(l)}n+=o.newText.length-o.replaceRange.length}for(;;){let o=t[0];if(!o)break;t.shift(),r.push(o.delta(n))}return r}a(bJo,"applyEditsToRanges");var p$t=class{static{a(this,"VoidEditData")}join(e){return this}};Nm.VoidEditData=p$t;var hKe=class t extends dbe{static{a(this,"AnnotatedStringEdit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r,n){return new t([new rW(e,r,n)])}static insert(e,r,n){return new t([new rW(Pw.OffsetRange.emptyAt(e),r,n)])}static delete(e,r){return new t([new rW(e,"",r)])}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;n{"use strict";f();Object.defineProperty(mKe,"__esModule",{value:!0});mKe.LanguageId=void 0;var jSn;(function(t){t.PlainText="plaintext";function e(r){return r}a(e,"create"),t.create=e})(jSn||(mKe.LanguageId=jSn={}))});var VSn=T(V9=>{"use strict";f();Object.defineProperty(V9,"__esModule",{value:!0});V9.EditReasons=V9.TextModelEditReason=V9.EditReason=void 0;var h$t=class t{static{a(this,"EditReason")}static create(e){return e?new t(e):t.unknown}constructor(e){this.metadata=e}static{this.unknown=new t({source:"unknown",name:void 0})}toKey(e){return new pbe(this.metadata,$Sn).toKey(e)}};V9.EditReason=h$t;var $Sn=Symbol("TextModelEditReason"),pbe=class{static{a(this,"TextModelEditReason")}constructor(e,r){this.metadata=e}toString(){return`${this.metadata.source}`}getType(){let e=this.metadata;switch(e.source){case"cursor":return e.kind;case"inlineCompletionAccept":return e.source+(e.$nes?":nes":"");case"unknown":return e.name||"unknown";default:return e.source}}toKey(e){let r=this.metadata;return Object.entries(r).filter(([o,s])=>(o.match(/\$/g)||[]).length<=e&&s!==void 0&&s!==null&&s!=="").map(([o,s])=>`${o}:${s}`).join("-")}};V9.TextModelEditReason=pbe;function yS(t){return new pbe(t,$Sn)}a(yS,"createEditReason");V9.EditReasons={unknown(t){return yS({source:"unknown",name:t.name})},chatApplyEdits(t){return yS({source:"Chat.applyEdits",$modelId:t.modelId})},inlineCompletionAccept(t){return yS({source:"inlineCompletionAccept",$nes:t.nes,$extensionId:t.extensionId,$$requestUuid:t.requestUuid})},inlineCompletionPartialAccept(t){return yS({source:"inlineCompletionPartialAccept",type:t.type,$extensionId:t.extensionId,$$requestUuid:t.requestUuid})},inlineChatApplyEdit(t){return yS({source:"inlineChat.applyEdits",$modelId:t.modelId})},reloadFromDisk:a(()=>yS({source:"reloadFromDisk"}),"reloadFromDisk"),cursor(t){return yS({source:"cursor",kind:t.kind,detailedSource:t.detailedSource})},setValue:a(()=>yS({source:"setValue"}),"setValue"),eolChange:a(()=>yS({source:"eolChange"}),"eolChange"),applyEdits:a(()=>yS({source:"applyEdits"}),"applyEdits"),snippet:a(()=>yS({source:"snippet"}),"snippet"),suggest:a(t=>yS({source:"suggest",$extensionId:t.extensionId}),"suggest")}});var nW=T(L5=>{"use strict";f();Object.defineProperty(L5,"__esModule",{value:!0});L5.MutableObservableDocument=L5.MutableObservableWorkspace=L5.StringEditWithReason=L5.ObservableWorkspace=void 0;var SJo=Hl(),WSn=ro(),Ty=gO(),YSn=Zg(),IJo=wu(),xJo=xv(),wJo=gKe(),zSn=VSn(),AKe=class{static{a(this,"ObservableWorkspace")}constructor(){this._version=0,this.onDidOpenDocumentChange=(0,Ty.derivedHandleChanges)({owner:this,changeTracker:{createChangeSummary:a(()=>({didChange:!1}),"createChangeSummary"),handleChange:a((e,r)=>(e.didChange(this.openDocuments)||(r.didChange=!0),!0),"handleChange")}},(e,r)=>{let n=this.openDocuments.read(e);for(let o of n)o.value.read(e);return r.didChange&&this._version++,this._version}),this.lastActiveDocument=(0,Ty.derivedWithStore)((e,r)=>{let n=(0,Ty.observableValue)("lastActiveDocument",void 0);return r.add((0,Ty.autorunWithStore)((o,s)=>{let c=this.openDocuments.read(o);for(let l of c)s.add((0,Ty.runOnChange)(l.value,()=>{n.set(l,void 0)}))})),n}).flatten()}getFirstOpenDocument(){return this.openDocuments.get()[0]}getDocument(e){return this.openDocuments.get().find(r=>r.id===e)}};L5.ObservableWorkspace=AKe;var aae=class extends YSn.StringEdit{static{a(this,"StringEditWithReason")}constructor(e,r){super(e),this.reason=r}};L5.StringEditWithReason=aae;var m$t=class extends AKe{static{a(this,"MutableObservableWorkspace")}constructor(){super(...arguments),this._openDocuments=(0,Ty.observableValue)(this,[]),this.openDocuments=this._openDocuments,this._documents=new Map}addDocument(e,r=void 0){(0,SJo.assert)(!this._documents.has(e.id));let n=new yKe(e.id,new xJo.StringText(e.initialValue??""),[],e.languageId??wJo.LanguageId.PlainText,()=>{this._documents.delete(e.id);let o=this._openDocuments.get(),s=o.filter(c=>c.id!==n.id);s.length!==o.length&&this._openDocuments.set(s,r,{added:[],removed:[n]})},e.initialVersionId??0,e.workspaceRoot);return this._documents.set(e.id,n),this._openDocuments.set([...this._openDocuments.get(),n],r,{added:[n],removed:[]}),n}getDocument(e){return this._documents.get(e)}clear(){this._openDocuments.set([],void 0,{added:[],removed:this._openDocuments.get()});for(let e of this._documents.values())e.dispose();this._documents.clear()}getWorkspaceRoot(e){return this._documents.get(e)?.workspaceRoot}};L5.MutableObservableWorkspace=m$t;var yKe=class extends WSn.Disposable{static{a(this,"MutableObservableDocument")}get value(){return this._value}get selection(){return this._selection}get primarySelectionLine(){return this._primarySelectionLine}get visibleRanges(){return this._visibleRanges}get languageId(){return this._languageId}get version(){return this._version}get diagnostics(){return this._diagnostics}constructor(e,r,n,o,s,c,l){super(),this.id=e,this.workspaceRoot=l,this._value=(0,Ty.observableValue)(this,r),this._selection=(0,Ty.observableValue)(this,n),this._primarySelectionLine=(0,Ty.observableValue)(this,void 0),this._visibleRanges=(0,Ty.observableValue)(this,[]),this._languageId=(0,Ty.observableValue)(this,o),this._version=(0,Ty.observableValue)(this,c),this._diagnostics=(0,Ty.observableValue)(this,[]),this._register((0,WSn.toDisposable)(s))}setSelection(e,r=void 0,n){this._selection.set(e,r),this._primarySelectionLine.set(n,r)}setVisibleRange(e,r=void 0){this._visibleRanges.set(e,r)}applyEdit(e,r=void 0,n=void 0){let o=e.applyOnText(this.value.get()),s=e instanceof aae?e:new aae(e.replacements,zSn.EditReason.unknown);(0,Ty.subtransaction)(r,c=>{this._value.set(o,c,s),this._version.set(n??this._version.get()+1,c)})}updateSelection(e,r=void 0,n){this._selection.set(e,r),this._primarySelectionLine.set(n,r)}setValue(e,r=void 0,n=void 0){let o=zSn.EditReason.unknown,s=new aae([YSn.StringReplacement.replace(new IJo.OffsetRange(0,this.value.get().value.length),e.value)],o);(0,Ty.subtransaction)(r,c=>{this._value.set(e,c,s),this._version.set(n??this._version.get()+1,c)})}updateDiagnostics(e,r=void 0){this._diagnostics.set(e,r)}};L5.MutableObservableDocument=yKe});var kw=T(iW=>{"use strict";f();var RJo=iW&&iW.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PJo=iW&&iW.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&RJo(e,t,r)};Object.defineProperty(iW,"__esModule",{value:!0});PJo(gO(),iW)});var F5=T(g$t=>{"use strict";f();Object.defineProperty(g$t,"__esModule",{value:!0});g$t.autorunWithChanges=DJo;var kJo=kw();function DJo(t,e,r){let n=new Map(Object.entries(e).map(([s,c])=>[c,s])),o=new Map(Object.keys(e).map(s=>[s,void 0]));return(0,kJo.autorunHandleChanges)({owner:t,changeTracker:{createChangeSummary:a(()=>({}),"createChangeSummary"),handleChange:a((s,c)=>{let l=n.get(s.changedObservable);return c[l]===void 0&&(c[l]={value:void 0,changes:[]}),c[l].changes.push(s.change),!0},"handleChange")}},(s,c)=>{for(let[l,u]of Object.entries(e)){let d=u.read(s);c[l]===void 0&&(c[l]={value:d,changes:[],previous:o.get(l)}),c[l].value=d,c[l].previous=o.get(l)===void 0?void 0:o.get(l),o.set(l,d)}r(c)})}a(DJo,"autorunWithChanges")});var na=T(Om=>{"use strict";f();var V$t=Symbol.for("yaml.alias"),sxn=Symbol.for("yaml.document"),iJe=Symbol.for("yaml.map"),axn=Symbol.for("yaml.pair"),W$t=Symbol.for("yaml.scalar"),oJe=Symbol.for("yaml.seq"),CO=Symbol.for("yaml.node.type"),pZo=a(t=>!!t&&typeof t=="object"&&t[CO]===V$t,"isAlias"),hZo=a(t=>!!t&&typeof t=="object"&&t[CO]===sxn,"isDocument"),mZo=a(t=>!!t&&typeof t=="object"&&t[CO]===iJe,"isMap"),gZo=a(t=>!!t&&typeof t=="object"&&t[CO]===axn,"isPair"),cxn=a(t=>!!t&&typeof t=="object"&&t[CO]===W$t,"isScalar"),AZo=a(t=>!!t&&typeof t=="object"&&t[CO]===oJe,"isSeq");function lxn(t){if(t&&typeof t=="object")switch(t[CO]){case iJe:case oJe:return!0}return!1}a(lxn,"isCollection");function yZo(t){if(t&&typeof t=="object")switch(t[CO]){case V$t:case iJe:case W$t:case oJe:return!0}return!1}a(yZo,"isNode");var EZo=a(t=>(cxn(t)||lxn(t))&&!!t.anchor,"hasAnchor");Om.ALIAS=V$t;Om.DOC=sxn;Om.MAP=iJe;Om.NODE_TYPE=CO;Om.PAIR=axn;Om.SCALAR=W$t;Om.SEQ=oJe;Om.hasAnchor=EZo;Om.isAlias=pZo;Om.isCollection=lxn;Om.isDocument=hZo;Om.isMap=mZo;Om.isNode=yZo;Om.isPair=gZo;Om.isScalar=cxn;Om.isSeq=AZo});var bbe=T(z$t=>{"use strict";f();var vp=na(),O_=Symbol("break visit"),uxn=Symbol("skip children"),G5=Symbol("remove node");function sJe(t,e){let r=dxn(e);vp.isDocument(t)?mae(null,t.contents,r,Object.freeze([t]))===G5&&(t.contents=null):mae(null,t,r,Object.freeze([]))}a(sJe,"visit");sJe.BREAK=O_;sJe.SKIP=uxn;sJe.REMOVE=G5;function mae(t,e,r,n){let o=fxn(t,e,r,n);if(vp.isNode(o)||vp.isPair(o))return pxn(t,n,o),mae(t,o,r,n);if(typeof o!="symbol"){if(vp.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s{"use strict";f();var hxn=na(),_Zo=bbe(),CZo={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},vZo=a(t=>t.replace(/[!,[\]{}]/g,e=>CZo[e]),"escapeTagName"),Tbe=class t{static{a(this,"Directives")}constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,c]=n;return this.tags[s]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let c=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,c),!1}}default:return r(0,`Unknown directive ${o}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let c=e.slice(2,-1);return c==="!"||c==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),c)}let[,n,o]=e.match(/^(.*!)([^!]*)$/s);o||r(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(o)}catch(c){return r(String(c)),null}return n==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,n]of Object.entries(this.tags))if(e.startsWith(n))return r+vZo(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),o;if(e&&n.length>0&&hxn.isNode(e.contents)){let s={};_Zo.visit(e.contents,(c,l)=>{hxn.isNode(l)&&l.tag&&(s[l.tag]=!0)}),o=Object.keys(s)}else o=[];for(let[s,c]of n)s==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(l=>l.startsWith(c)))&&r.push(`%TAG ${s} ${c}`);return r.join(` +`)}};Tbe.defaultYaml={explicit:!1,version:"1.2"};Tbe.defaultTags={"!!":"tag:yaml.org,2002:"};mxn.Directives=Tbe});var cJe=T(Sbe=>{"use strict";f();var gxn=na(),bZo=bbe();function TZo(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}a(TZo,"anchorIsValid");function Axn(t){let e=new Set;return bZo.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}a(Axn,"anchorNames");function yxn(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}a(yxn,"findNewAnchor");function SZo(t,e){let r=[],n=new Map,o=null;return{onAnchor:a(s=>{r.push(s),o??(o=Axn(t));let c=yxn(e,o);return o.add(c),c},"onAnchor"),setAnchors:a(()=>{for(let s of r){let c=n.get(s);if(typeof c=="object"&&c.anchor&&(gxn.isScalar(c.node)||gxn.isCollection(c.node)))c.node.anchor=c.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},"setAnchors"),sourceObjects:n}}a(SZo,"createNodeAnchors");Sbe.anchorIsValid=TZo;Sbe.anchorNames=Axn;Sbe.createNodeAnchors=SZo;Sbe.findNewAnchor=yxn});var K$t=T(Exn=>{"use strict";f();function Ibe(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,s=n.length;o{"use strict";f();var IZo=na();function _xn(t,e,r){if(Array.isArray(t))return t.map((n,o)=>_xn(n,String(o),r));if(t&&typeof t.toJSON=="function"){if(!r||!IZo.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let o=t.toJSON(e,r);return r.onCreate&&r.onCreate(o),o}return typeof t=="bigint"&&!r?.keep?Number(t):t}a(_xn,"toJS");Cxn.toJS=_xn});var lJe=T(bxn=>{"use strict";f();var xZo=K$t(),vxn=na(),wZo=K9(),J$t=class{static{a(this,"NodeBase")}constructor(e){Object.defineProperty(this,vxn.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:o,reviver:s}={}){if(!vxn.isDocument(e))throw new TypeError("A document argument is required");let c={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=wZo.toJS(this,"",c);if(typeof o=="function")for(let{count:u,res:d}of c.anchors.values())o(d,u);return typeof s=="function"?xZo.applyReviver(s,{"":l},"",l):l}};bxn.NodeBase=J$t});var xbe=T(Txn=>{"use strict";f();var RZo=cJe(),PZo=bbe(),Aae=na(),kZo=lJe(),DZo=K9(),X$t=class extends kZo.NodeBase{static{a(this,"Alias")}constructor(e){super(Aae.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],PZo.visit(e,{Node:a((s,c)=>{(Aae.isAlias(c)||Aae.hasAnchor(c))&&n.push(c)},"Node")}),r&&(r.aliasResolveCache=n));let o;for(let s of n){if(s===this)break;s.anchor===this.source&&(o=s)}return o}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:o,maxAliasCount:s}=r,c=this.resolve(o,r);if(!c){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let l=n.get(c);if(l||(DZo.toJS(c,null,r),l=n.get(c)),l?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=uJe(o,c,n)),l.count*l.aliasCount>s)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return l.res}toString(e,r,n){let o=`*${this.source}`;if(e){if(RZo.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${o} `}return o}};function uJe(t,e,r){if(Aae.isAlias(e)){let n=e.resolve(t),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}else if(Aae.isCollection(e)){let n=0;for(let o of e.items){let s=uJe(t,o,r);s>n&&(n=s)}return n}else if(Aae.isPair(e)){let n=uJe(t,e.key,r),o=uJe(t,e.value,r);return Math.max(n,o)}return 1}a(uJe,"getAliasCount");Txn.Alias=X$t});var x0=T(Z$t=>{"use strict";f();var NZo=na(),MZo=lJe(),OZo=K9(),BZo=a(t=>!t||typeof t!="function"&&typeof t!="object","isScalarValue"),J9=class extends MZo.NodeBase{static{a(this,"Scalar")}constructor(e){super(NZo.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:OZo.toJS(this.value,e,r)}toString(){return String(this.value)}};J9.BLOCK_FOLDED="BLOCK_FOLDED";J9.BLOCK_LITERAL="BLOCK_LITERAL";J9.PLAIN="PLAIN";J9.QUOTE_DOUBLE="QUOTE_DOUBLE";J9.QUOTE_SINGLE="QUOTE_SINGLE";Z$t.Scalar=J9;Z$t.isScalarValue=BZo});var wbe=T(Ixn=>{"use strict";f();var LZo=xbe(),uW=na(),Sxn=x0(),FZo="tag:yaml.org,2002:";function UZo(t,e,r){if(e){let n=r.filter(s=>s.tag===e),o=n.find(s=>!s.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return r.find(n=>n.identify?.(t)&&!n.format)}a(UZo,"findTagObject");function QZo(t,e,r){if(uW.isDocument(t)&&(t=t.contents),uW.isNode(t))return t;if(uW.isPair(t)){let h=r.schema[uW.MAP].createNode?.(r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:n,onAnchor:o,onTagObj:s,schema:c,sourceObjects:l}=r,u;if(n&&t&&typeof t=="object"){if(u=l.get(t),u)return u.anchor??(u.anchor=o(t)),new LZo.Alias(u.anchor);u={anchor:null,node:null},l.set(t,u)}e?.startsWith("!!")&&(e=FZo+e.slice(2));let d=UZo(t,e,c.tags);if(!d){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let h=new Sxn.Scalar(t);return u&&(u.node=h),h}d=t instanceof Map?c[uW.MAP]:Symbol.iterator in Object(t)?c[uW.SEQ]:c[uW.MAP]}s&&(s(d),delete r.onTagObj);let p=d?.createNode?d.createNode(r.schema,t,r):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(r.schema,t,r):new Sxn.Scalar(t);return e?p.tag=e:d.default||(p.tag=d.tag),u&&(u.node=p),p}a(QZo,"createNode");Ixn.createNode=QZo});var fJe=T(dJe=>{"use strict";f();var qZo=wbe(),H5=na(),GZo=lJe();function eVt(t,e,r){let n=r;for(let o=e.length-1;o>=0;--o){let s=e[o];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let c=[];c[s]=n,n=c}else n=new Map([[s,n]])}return qZo.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:a(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:t,sourceObjects:new Map})}a(eVt,"collectionFromPath");var xxn=a(t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath"),tVt=class extends GZo.NodeBase{static{a(this,"Collection")}constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(n=>H5.isNode(n)||H5.isPair(n)?n.clone(e):n),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(xxn(e))this.add(r);else{let[n,...o]=e,s=this.get(n,!0);if(H5.isCollection(s))s.addIn(o,r);else if(s===void 0&&this.schema)this.set(n,eVt(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){let[r,...n]=e;if(n.length===0)return this.delete(r);let o=this.get(r,!0);if(H5.isCollection(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){let[n,...o]=e,s=this.get(n,!0);return o.length===0?!r&&H5.isScalar(s)?s.value:s:H5.isCollection(s)?s.getIn(o,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!H5.isPair(r))return!1;let n=r.value;return n==null||e&&H5.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[r,...n]=e;if(n.length===0)return this.has(r);let o=this.get(r,!0);return H5.isCollection(o)?o.hasIn(n):!1}setIn(e,r){let[n,...o]=e;if(o.length===0)this.set(n,r);else{let s=this.get(n,!0);if(H5.isCollection(s))s.setIn(o,r);else if(s===void 0&&this.schema)this.set(n,eVt(this.schema,o,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}};dJe.Collection=tVt;dJe.collectionFromPath=eVt;dJe.isEmptyPath=xxn});var Rbe=T(pJe=>{"use strict";f();var HZo=a(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function rVt(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}a(rVt,"indentComment");var jZo=a((t,e,r)=>t.endsWith(` +`)?rVt(r,e):r.includes(` `)?` -`+B$t(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");oXe.indentComment=B$t;oXe.lineComment=HJo;oXe.stringifyComment=GJo});var PIn=T(DTe=>{"use strict";f();var jJo="flow",L$t="block",sXe="quoted";function $Jo(t,e,r="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:c,onOverflow:l}={}){if(!o||o<0)return t;oo-Math.max(2,s)?d.push(0):h=o-n);let m,g,A=!1,y=-1,E=-1,_=-1;r===L$t&&(y=RIn(t,y,e.length),y!==-1&&(h=y+u));for(let b;b=t[y+=1];){if(r===sXe&&b==="\\"){switch(E=y,t[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}_=y}if(b===` -`)r===L$t&&(y=RIn(t,y,e.length)),h=y+e.length+u,m=void 0;else{if(b===" "&&g&&g!==" "&&g!==` +`+rVt(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");pJe.indentComment=rVt;pJe.lineComment=jZo;pJe.stringifyComment=HZo});var Rxn=T(Pbe=>{"use strict";f();var $Zo="flow",nVt="block",hJe="quoted";function VZo(t,e,r="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:s=20,onFold:c,onOverflow:l}={}){if(!o||o<0)return t;oo-Math.max(2,s)?d.push(0):h=o-n);let m,g,A=!1,y=-1,E=-1,_=-1;r===nVt&&(y=wxn(t,y,e.length),y!==-1&&(h=y+u));for(let b;b=t[y+=1];){if(r===hJe&&b==="\\"){switch(E=y,t[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}_=y}if(b===` +`)r===nVt&&(y=wxn(t,y,e.length)),h=y+e.length+u,m=void 0;else{if(b===" "&&g&&g!==" "&&g!==` `&&g!==" "){let I=t[y+1];I&&I!==" "&&I!==` -`&&I!==" "&&(m=y)}if(y>=h)if(m)d.push(m),h=m+u,m=void 0;else if(r===sXe){for(;g===" "||g===" ";)g=b,b=t[y+=1],A=!0;let I=y>_+1?y-2:E-1;if(p[I])return t;d.push(I),p[I]=!0,h=I+u,m=void 0}else A=!0}g=b}if(A&&l&&l(),d.length===0)return t;c&&c();let v=t.slice(0,d[0]);for(let b=0;b{"use strict";f();var Ww=N0(),S7=PIn(),cXe=a((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),lXe=a(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function VJo(t,e,r){if(!e||e<0)return!1;let n=e-r,o=t.length;if(o<=n)return!1;for(let s=0,c=0;sn)return!0;if(c=s+1,o-c<=n)return!1}return!0}a(VJo,"lineLengthOverLimit");function MTe(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(lXe(t)?" ":""),c="",l=0;for(let u=0,d=r[u];d;d=r[++u])if(d===" "&&r[u+1]==="\\"&&r[u+2]==="n"&&(c+=r.slice(l,u)+"\\ ",u+=1,l=u,d="\\"),d==="\\")switch(r[u+1]){case"u":{c+=r.slice(l,u);let p=r.substr(u+2,4);switch(p){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:p.substr(0,2)==="00"?c+="\\x"+p.substr(2):c+=r.substr(u,6)}u+=5,l=u+1}break;case"n":if(n||r[u+2]==='"'||r.length=h)if(m)d.push(m),h=m+u,m=void 0;else if(r===hJe){for(;g===" "||g===" ";)g=b,b=t[y+=1],A=!0;let I=y>_+1?y-2:E-1;if(p[I])return t;d.push(I),p[I]=!0,h=I+u,m=void 0}else A=!0}g=b}if(A&&l&&l(),d.length===0)return t;c&&c();let v=t.slice(0,d[0]);for(let b=0;b{"use strict";f();var Bw=x0(),X9=Rxn(),gJe=a((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions"),AJe=a(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function WZo(t,e,r){if(!e||e<0)return!1;let n=e-r,o=t.length;if(o<=n)return!1;for(let s=0,c=0;sn)return!0;if(c=s+1,o-c<=n)return!1}return!0}a(WZo,"lineLengthOverLimit");function kbe(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(AJe(t)?" ":""),c="",l=0;for(let u=0,d=r[u];d;d=r[++u])if(d===" "&&r[u+1]==="\\"&&r[u+2]==="n"&&(c+=r.slice(l,u)+"\\ ",u+=1,l=u,d="\\"),d==="\\")switch(r[u+1]){case"u":{c+=r.slice(l,u);let p=r.substr(u+2,4);switch(p){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:p.substr(0,2)==="00"?c+="\\x"+p.substr(2):c+=r.substr(u,6)}u+=5,l=u+1}break;case"n":if(n||r[u+2]==='"'||r.length `;let h,m;for(m=r.length;m>0;--m){let x=r[m-1];if(x!==` `&&x!==" "&&x!==" ")break}let g=r.substring(m),A=g.indexOf(` `);A===-1?h="-":r===g||A!==g.length-1?(h="+",s&&s()):h="",g&&(r=r.slice(0,-g.length),g[g.length-1]===` -`&&(g=g.slice(0,-1)),g=g.replace(U$t,`$&${d}`));let y=!1,E,_=-1;for(E=0;E{R=!0});let P=S7.foldFlowLines(`${v}${x}${g}`,d,S7.FOLD_BLOCK,w);if(!R)return`>${I} +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`),w=!1,R=gJe(n,!0);c!=="folded"&&e!==Bw.Scalar.BLOCK_FOLDED&&(R.onOverflow=()=>{w=!0});let P=X9.foldFlowLines(`${v}${x}${g}`,d,X9.FOLD_BLOCK,R);if(!w)return`>${I} ${d}${P}`}return r=r.replace(/\n+/g,`$&${d}`),`|${I} -${d}${v}${r}${g}`}a(aXe,"blockString");function WJo(t,e,r,n){let{type:o,value:s}=t,{actualString:c,implicitKey:l,indent:u,indentStep:d,inFlow:p}=e;if(l&&s.includes(` -`)||p&&/[[\]{},]/.test(s))return ice(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||p||!s.includes(` -`)?ice(s,e):aXe(t,e,r,n);if(!l&&!p&&o!==Ww.Scalar.PLAIN&&s.includes(` -`))return aXe(t,e,r,n);if(lXe(s)){if(u==="")return e.forceBlockIndent=!0,aXe(t,e,r,n);if(l&&u===d)return ice(s,e)}let h=s.replace(/\n+/g,`$& -${u}`);if(c){let m=a(y=>y.default&&y.tag!=="tag:yaml.org,2002:str"&&y.test?.test(h),"test"),{compat:g,tags:A}=e.doc.schema;if(A.some(m)||g?.some(m))return ice(s,e)}return l?h:S7.foldFlowLines(h,u,S7.FOLD_FLOW,cXe(e,!1))}a(WJo,"plainString");function zJo(t,e,r,n){let{implicitKey:o,inFlow:s}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:l}=t;l!==Ww.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(l=Ww.Scalar.QUOTE_DOUBLE);let u=a(p=>{switch(p){case Ww.Scalar.BLOCK_FOLDED:case Ww.Scalar.BLOCK_LITERAL:return o||s?ice(c.value,e):aXe(c,e,r,n);case Ww.Scalar.QUOTE_DOUBLE:return MTe(c.value,e);case Ww.Scalar.QUOTE_SINGLE:return F$t(c.value,e);case Ww.Scalar.PLAIN:return WJo(c,e,r,n);default:return null}},"_stringify"),d=u(l);if(d===null){let{defaultKeyType:p,defaultStringType:h}=e.options,m=o&&p||h;if(d=u(m),d===null)throw new Error(`Unsupported default string type ${m}`)}return d}a(zJo,"stringifyString");kIn.stringifyString=zJo});var BTe=T(Q$t=>{"use strict";f();var YJo=eXe(),I7=la(),KJo=NTe(),JJo=OTe();function XJo(t,e){let r=Object.assign({blockQuote:!0,commentString:KJo.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}a(XJo,"createStringifyContext");function ZJo(t,e){if(e.tag){let o=t.filter(s=>s.tag===e.tag);if(o.length>0)return o.find(s=>s.format===e.format)??o[0]}let r,n;if(I7.isScalar(e)){n=e.value;let o=t.filter(s=>s.identify?.(n));if(o.length>1){let s=o.filter(c=>c.test);s.length>0&&(o=s)}r=o.find(s=>s.format===e.format)??o.find(s=>!s.format)}else n=e,r=t.find(o=>o.nodeClass&&n instanceof o.nodeClass);if(!r){let o=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${o} value`)}return r}a(ZJo,"getTagObject");function eXo(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let o=[],s=(I7.isScalar(t)||I7.isCollection(t))&&t.anchor;s&&YJo.anchorIsValid(s)&&(r.add(s),o.push(`&${s}`));let c=t.tag??(e.default?null:e.tag);return c&&o.push(n.directives.tagString(c)),o.join(" ")}a(eXo,"stringifyProps");function tXo(t,e,r,n){if(I7.isPair(t))return t.toString(e,r,n);if(I7.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o,s=I7.isNode(t)?t:e.doc.createNode(t,{onTagObj:a(u=>o=u,"onTagObj")});o??(o=ZJo(e.doc.schema.tags,s));let c=eXo(s,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);let l=typeof o.stringify=="function"?o.stringify(s,e,r,n):I7.isScalar(s)?JJo.stringifyString(s,e,r,n):s.toString(e,r,n);return c?I7.isScalar(s)||l[0]==="{"||l[0]==="["?`${c} ${l}`:`${c} -${e.indent}${l}`:l}a(tXo,"stringify");Q$t.createStringifyContext=XJo;Q$t.stringify=tXo});var OIn=T(MIn=>{"use strict";f();var Q4=la(),NIn=N0(),DIn=BTe(),LTe=NTe();function rXo({key:t,value:e},r,n,o){let{allNullValues:s,doc:c,indent:l,indentStep:u,options:{commentString:d,indentSeq:p,simpleKeys:h}}=r,m=Q4.isNode(t)&&t.comment||null;if(h){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(Q4.isCollection(t)||!Q4.isNode(t)&&typeof t=="object"){let w="With simple keys, collection cannot be used as a key value";throw new Error(w)}}let g=!h&&(!t||m&&e==null&&!r.inFlow||Q4.isCollection(t)||(Q4.isScalar(t)?t.type===NIn.Scalar.BLOCK_FOLDED||t.type===NIn.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!g&&(h||!s),indent:l+u});let A=!1,y=!1,E=DIn.stringify(t,r,()=>A=!0,()=>y=!0);if(!g&&!r.inFlow&&E.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(r.inFlow){if(s||e==null)return A&&n&&n(),E===""?"?":g?`? ${E}`:E}else if(s&&!h||e==null&&g)return E=`? ${E}`,m&&!A?E+=LTe.lineComment(E,r.indent,d(m)):y&&o&&o(),E;A&&(m=null),g?(m&&(E+=LTe.lineComment(E,r.indent,d(m))),E=`? ${E} -${l}:`):(E=`${E}:`,m&&(E+=LTe.lineComment(E,r.indent,d(m))));let _,v,b;Q4.isNode(e)?(_=!!e.spaceBefore,v=e.commentBefore,b=e.comment):(_=!1,v=null,b=null,e&&typeof e=="object"&&(e=c.createNode(e))),r.implicitKey=!1,!g&&!m&&Q4.isScalar(e)&&(r.indentAtStart=E.length+1),y=!1,!p&&u.length>=2&&!r.inFlow&&!g&&Q4.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let I=!1,x=DIn.stringify(e,r,()=>I=!0,()=>y=!0),R=" ";if(m||_||v){if(R=_?` -`:"",v){let w=d(v);R+=` -${LTe.indentComment(w,r.indent)}`}x===""&&!r.inFlow?R===` -`&&b&&(R=` - -`):R+=` -${r.indent}`}else if(!g&&Q4.isCollection(e)){let w=x[0],P=x.indexOf(` -`),k=P!==-1,Q=r.inFlow??e.flow??e.items.length===0;if(k||!Q){let M=!1;if(k&&(w==="&"||w==="!")){let D=x.indexOf(" ");w==="&"&&D!==-1&&D'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||p||!s.includes(` +`)?yae(s,e):mJe(t,e,r,n);if(!l&&!p&&o!==Bw.Scalar.PLAIN&&s.includes(` +`))return mJe(t,e,r,n);if(AJe(s)){if(u==="")return e.forceBlockIndent=!0,mJe(t,e,r,n);if(l&&u===d)return yae(s,e)}let h=s.replace(/\n+/g,`$& +${u}`);if(c){let m=a(y=>y.default&&y.tag!=="tag:yaml.org,2002:str"&&y.test?.test(h),"test"),{compat:g,tags:A}=e.doc.schema;if(A.some(m)||g?.some(m))return yae(s,e)}return l?h:X9.foldFlowLines(h,u,X9.FOLD_FLOW,gJe(e,!1))}a(zZo,"plainString");function YZo(t,e,r,n){let{implicitKey:o,inFlow:s}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:l}=t;l!==Bw.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(l=Bw.Scalar.QUOTE_DOUBLE);let u=a(p=>{switch(p){case Bw.Scalar.BLOCK_FOLDED:case Bw.Scalar.BLOCK_LITERAL:return o||s?yae(c.value,e):mJe(c,e,r,n);case Bw.Scalar.QUOTE_DOUBLE:return kbe(c.value,e);case Bw.Scalar.QUOTE_SINGLE:return iVt(c.value,e);case Bw.Scalar.PLAIN:return zZo(c,e,r,n);default:return null}},"_stringify"),d=u(l);if(d===null){let{defaultKeyType:p,defaultStringType:h}=e.options,m=o&&p||h;if(d=u(m),d===null)throw new Error(`Unsupported default string type ${m}`)}return d}a(YZo,"stringifyString");Pxn.stringifyString=YZo});var Nbe=T(sVt=>{"use strict";f();var KZo=cJe(),Z9=na(),JZo=Rbe(),XZo=Dbe();function ZZo(t,e){let r=Object.assign({blockQuote:!0,commentString:JZo.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}a(ZZo,"createStringifyContext");function ees(t,e){if(e.tag){let o=t.filter(s=>s.tag===e.tag);if(o.length>0)return o.find(s=>s.format===e.format)??o[0]}let r,n;if(Z9.isScalar(e)){n=e.value;let o=t.filter(s=>s.identify?.(n));if(o.length>1){let s=o.filter(c=>c.test);s.length>0&&(o=s)}r=o.find(s=>s.format===e.format)??o.find(s=>!s.format)}else n=e,r=t.find(o=>o.nodeClass&&n instanceof o.nodeClass);if(!r){let o=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${o} value`)}return r}a(ees,"getTagObject");function tes(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let o=[],s=(Z9.isScalar(t)||Z9.isCollection(t))&&t.anchor;s&&KZo.anchorIsValid(s)&&(r.add(s),o.push(`&${s}`));let c=t.tag??(e.default?null:e.tag);return c&&o.push(n.directives.tagString(c)),o.join(" ")}a(tes,"stringifyProps");function res(t,e,r,n){if(Z9.isPair(t))return t.toString(e,r,n);if(Z9.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o,s=Z9.isNode(t)?t:e.doc.createNode(t,{onTagObj:a(u=>o=u,"onTagObj")});o??(o=ees(e.doc.schema.tags,s));let c=tes(s,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);let l=typeof o.stringify=="function"?o.stringify(s,e,r,n):Z9.isScalar(s)?XZo.stringifyString(s,e,r,n):s.toString(e,r,n);return c?Z9.isScalar(s)||l[0]==="{"||l[0]==="["?`${c} ${l}`:`${c} +${e.indent}${l}`:l}a(res,"stringify");sVt.createStringifyContext=ZZo;sVt.stringify=res});var Mxn=T(Nxn=>{"use strict";f();var vO=na(),kxn=x0(),Dxn=Nbe(),Mbe=Rbe();function nes({key:t,value:e},r,n,o){let{allNullValues:s,doc:c,indent:l,indentStep:u,options:{commentString:d,indentSeq:p,simpleKeys:h}}=r,m=vO.isNode(t)&&t.comment||null;if(h){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(vO.isCollection(t)||!vO.isNode(t)&&typeof t=="object"){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let g=!h&&(!t||m&&e==null&&!r.inFlow||vO.isCollection(t)||(vO.isScalar(t)?t.type===kxn.Scalar.BLOCK_FOLDED||t.type===kxn.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!g&&(h||!s),indent:l+u});let A=!1,y=!1,E=Dxn.stringify(t,r,()=>A=!0,()=>y=!0);if(!g&&!r.inFlow&&E.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(r.inFlow){if(s||e==null)return A&&n&&n(),E===""?"?":g?`? ${E}`:E}else if(s&&!h||e==null&&g)return E=`? ${E}`,m&&!A?E+=Mbe.lineComment(E,r.indent,d(m)):y&&o&&o(),E;A&&(m=null),g?(m&&(E+=Mbe.lineComment(E,r.indent,d(m))),E=`? ${E} +${l}:`):(E=`${E}:`,m&&(E+=Mbe.lineComment(E,r.indent,d(m))));let _,v,b;vO.isNode(e)?(_=!!e.spaceBefore,v=e.commentBefore,b=e.comment):(_=!1,v=null,b=null,e&&typeof e=="object"&&(e=c.createNode(e))),r.implicitKey=!1,!g&&!m&&vO.isScalar(e)&&(r.indentAtStart=E.length+1),y=!1,!p&&u.length>=2&&!r.inFlow&&!g&&vO.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let I=!1,x=Dxn.stringify(e,r,()=>I=!0,()=>y=!0),w=" ";if(m||_||v){if(w=_?` +`:"",v){let R=d(v);w+=` +${Mbe.indentComment(R,r.indent)}`}x===""&&!r.inFlow?w===` +`&&b&&(w=` + +`):w+=` +${r.indent}`}else if(!g&&vO.isCollection(e)){let R=x[0],P=x.indexOf(` +`),k=P!==-1,Q=r.inFlow??e.flow??e.items.length===0;if(k||!Q){let M=!1;if(k&&(R==="&"||R==="!")){let N=x.indexOf(" ");R==="&"&&N!==-1&&N{"use strict";f();var BIn=require("process");function nXo(t,...e){t==="debug"&&console.log(...e)}a(nXo,"debug");function iXo(t,e){(t==="debug"||t==="warn")&&(typeof BIn.emitWarning=="function"?BIn.emitWarning(e):console.warn(e))}a(iXo,"warn");q$t.debug=nXo;q$t.warn=iXo});var pXe=T(fXe=>{"use strict";f();var FTe=la(),LIn=N0(),uXe="<<",dXe={identify:a(t=>t===uXe||typeof t=="symbol"&&t.description===uXe,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:a(()=>Object.assign(new LIn.Scalar(Symbol(uXe)),{addToJSMap:FIn}),"resolve"),stringify:a(()=>uXe,"stringify")},oXo=a((t,e)=>(dXe.identify(e)||FTe.isScalar(e)&&(!e.type||e.type===LIn.Scalar.PLAIN)&&dXe.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===dXe.tag&&r.default),"isMergeKey");function FIn(t,e,r){if(r=t&&FTe.isAlias(r)?r.resolve(t.doc):r,FTe.isSeq(r))for(let n of r.items)H$t(t,e,n);else if(Array.isArray(r))for(let n of r)H$t(t,e,n);else H$t(t,e,r)}a(FIn,"addMergeToJSMap");function H$t(t,e,r){let n=t&&FTe.isAlias(r)?r.resolve(t.doc):r;if(!FTe.isMap(n))throw new Error("Merge sources must be maps or map aliases");let o=n.toJSON(null,t,Map);for(let[s,c]of o)e instanceof Map?e.has(s)||e.set(s,c):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}a(H$t,"mergeValue");fXe.addMergeToJSMap=FIn;fXe.isMergeKey=oXo;fXe.merge=dXe});var $$t=T(qIn=>{"use strict";f();var sXo=G$t(),UIn=pXe(),aXo=BTe(),QIn=la(),j$t=b7();function cXo(t,e,{key:r,value:n}){if(QIn.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(UIn.isMergeKey(t,r))UIn.addMergeToJSMap(t,e,n);else{let o=j$t.toJS(r,"",t);if(e instanceof Map)e.set(o,j$t.toJS(n,o,t));else if(e instanceof Set)e.add(o);else{let s=lXo(r,o,t),c=j$t.toJS(n,s,t);s in e?Object.defineProperty(e,s,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[s]=c}}return e}a(cXo,"addPairToJSMap");function lXo(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(QIn.isNode(t)&&r?.doc){let n=aXo.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let o=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),sXo.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return o}return JSON.stringify(e)}a(lXo,"stringifyKey");qIn.addPairToJSMap=cXo});var x7=T(V$t=>{"use strict";f();var GIn=kTe(),uXo=OIn(),dXo=$$t(),hXe=la();function fXo(t,e,r){let n=GIn.createNode(t,void 0,r),o=GIn.createNode(e,void 0,r);return new mXe(n,o)}a(fXo,"createPair");var mXe=class t{static{a(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,hXe.NODE_TYPE,{value:hXe.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return hXe.isNode(r)&&(r=r.clone(e)),hXe.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return dXo.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?uXo.stringifyPair(this,e,r,n):JSON.stringify(this)}};V$t.Pair=mXe;V$t.createPair=fXo});var W$t=T(jIn=>{"use strict";f();var iz=la(),HIn=BTe(),gXe=NTe();function pXo(t,e,r){return(e.inFlow??t.flow?mXo:hXo)(t,e,r)}a(pXo,"stringifyCollection");function hXo({comment:t,items:e},r,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:c,onComment:l}){let{indent:u,options:{commentString:d}}=r,p=Object.assign({},r,{indent:s,type:null}),h=!1,m=[];for(let A=0;AE=null,()=>h=!0);E&&(_+=gXe.lineComment(_,s,d(E))),h&&E&&(h=!1),m.push(n+_)}let g;if(m.length===0)g=o.start+o.end;else{g=m[0];for(let A=1;A{"use strict";f();var Oxn=require("process");function ies(t,...e){t==="debug"&&console.log(...e)}a(ies,"debug");function oes(t,e){(t==="debug"||t==="warn")&&(typeof Oxn.emitWarning=="function"?Oxn.emitWarning(e):console.warn(e))}a(oes,"warn");aVt.debug=ies;aVt.warn=oes});var CJe=T(_Je=>{"use strict";f();var Obe=na(),Bxn=x0(),yJe="<<",EJe={identify:a(t=>t===yJe||typeof t=="symbol"&&t.description===yJe,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:a(()=>Object.assign(new Bxn.Scalar(Symbol(yJe)),{addToJSMap:Lxn}),"resolve"),stringify:a(()=>yJe,"stringify")},ses=a((t,e)=>(EJe.identify(e)||Obe.isScalar(e)&&(!e.type||e.type===Bxn.Scalar.PLAIN)&&EJe.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===EJe.tag&&r.default),"isMergeKey");function Lxn(t,e,r){if(r=t&&Obe.isAlias(r)?r.resolve(t.doc):r,Obe.isSeq(r))for(let n of r.items)lVt(t,e,n);else if(Array.isArray(r))for(let n of r)lVt(t,e,n);else lVt(t,e,r)}a(Lxn,"addMergeToJSMap");function lVt(t,e,r){let n=t&&Obe.isAlias(r)?r.resolve(t.doc):r;if(!Obe.isMap(n))throw new Error("Merge sources must be maps or map aliases");let o=n.toJSON(null,t,Map);for(let[s,c]of o)e instanceof Map?e.has(s)||e.set(s,c):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}a(lVt,"mergeValue");_Je.addMergeToJSMap=Lxn;_Je.isMergeKey=ses;_Je.merge=EJe});var dVt=T(Qxn=>{"use strict";f();var aes=cVt(),Fxn=CJe(),ces=Nbe(),Uxn=na(),uVt=K9();function les(t,e,{key:r,value:n}){if(Uxn.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(Fxn.isMergeKey(t,r))Fxn.addMergeToJSMap(t,e,n);else{let o=uVt.toJS(r,"",t);if(e instanceof Map)e.set(o,uVt.toJS(n,o,t));else if(e instanceof Set)e.add(o);else{let s=ues(r,o,t),c=uVt.toJS(n,s,t);s in e?Object.defineProperty(e,s,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[s]=c}}return e}a(les,"addPairToJSMap");function ues(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(Uxn.isNode(t)&&r?.doc){let n=ces.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let o=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(o);s.length>40&&(s=s.substring(0,36)+'..."'),aes.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return o}return JSON.stringify(e)}a(ues,"stringifyKey");Qxn.addPairToJSMap=les});var e7=T(fVt=>{"use strict";f();var qxn=wbe(),des=Mxn(),fes=dVt(),vJe=na();function pes(t,e,r){let n=qxn.createNode(t,void 0,r),o=qxn.createNode(e,void 0,r);return new bJe(n,o)}a(pes,"createPair");var bJe=class t{static{a(this,"Pair")}constructor(e,r=null){Object.defineProperty(this,vJe.NODE_TYPE,{value:vJe.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return vJe.isNode(r)&&(r=r.clone(e)),vJe.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return fes.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?des.stringifyPair(this,e,r,n):JSON.stringify(this)}};fVt.Pair=bJe;fVt.createPair=pes});var pVt=T(Hxn=>{"use strict";f();var dW=na(),Gxn=Nbe(),TJe=Rbe();function hes(t,e,r){return(e.inFlow??t.flow?ges:mes)(t,e,r)}a(hes,"stringifyCollection");function mes({comment:t,items:e},r,{blockItemPrefix:n,flowChars:o,itemIndent:s,onChompKeep:c,onComment:l}){let{indent:u,options:{commentString:d}}=r,p=Object.assign({},r,{indent:s,type:null}),h=!1,m=[];for(let A=0;AE=null,()=>h=!0);E&&(_+=TJe.lineComment(_,s,d(E))),h&&E&&(h=!1),m.push(n+_)}let g;if(m.length===0)g=o.start+o.end;else{g=m[0];for(let A=1;AE=null);d||(d=h.length>p||_.includes(` -`)),A0&&(d||(d=h.reduce((v,b)=>v+b.length+2,2)+(_.length+2)>e.options.lineWidth)),d&&(_+=",")),E&&(_+=gXe.lineComment(_,n,l(E))),h.push(_),p=h.length}let{start:m,end:g}=r;if(h.length===0)return m+g;if(!d){let A=h.reduce((y,E)=>y+E.length+2,2);d=e.options.lineWidth>0&&A>e.options.lineWidth}if(d){let A=m;for(let y of h)A+=y?` +`+TJe.indentComment(d(t),u),l&&l()):h&&c&&c(),g}a(mes,"stringifyBlockCollection");function ges({items:t},e,{flowChars:r,itemIndent:n}){let{indent:o,indentStep:s,flowCollectionPadding:c,options:{commentString:l}}=e;n+=s;let u=Object.assign({},e,{indent:n,inFlow:!0,type:null}),d=!1,p=0,h=[];for(let A=0;AE=null);d||(d=h.length>p||_.includes(` +`)),A0&&(d||(d=h.reduce((v,b)=>v+b.length+2,2)+(_.length+2)>e.options.lineWidth)),d&&(_+=",")),E&&(_+=TJe.lineComment(_,n,l(E))),h.push(_),p=h.length}let{start:m,end:g}=r;if(h.length===0)return m+g;if(!d){let A=h.reduce((y,E)=>y+E.length+2,2);d=e.options.lineWidth>0&&A>e.options.lineWidth}if(d){let A=m;for(let y of h)A+=y?` ${s}${o}${y}`:` `;return`${A} -${o}${g}`}else return`${m}${c}${h.join(" ")}${c}${g}`}a(mXo,"stringifyFlowCollection");function AXe({indent:t,options:{commentString:e}},r,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){let s=gXe.indentComment(e(n),t);r.push(s.trimStart())}}a(AXe,"addCommentBefore");jIn.stringifyCollection=pXo});var R7=T(Y$t=>{"use strict";f();var gXo=W$t(),AXo=$$t(),yXo=iXe(),w7=la(),yXe=x7(),EXo=N0();function UTe(t,e){let r=w7.isScalar(e)?e.value:e;for(let n of t)if(w7.isPair(n)&&(n.key===e||n.key===r||w7.isScalar(n.key)&&n.key.value===r))return n}a(UTe,"findPair");var z$t=class extends yXo.Collection{static{a(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(w7.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:o,replacer:s}=n,c=new this(e),l=a((u,d)=>{if(typeof s=="function")d=s.call(r,u,d);else if(Array.isArray(s)&&!s.includes(u))return;(d!==void 0||o)&&c.items.push(yXe.createPair(u,d,n))},"add");if(r instanceof Map)for(let[u,d]of r)l(u,d);else if(r&&typeof r=="object")for(let u of Object.keys(r))l(u,r[u]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,r){let n;w7.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new yXe.Pair(e,e?.value):n=new yXe.Pair(e.key,e.value);let o=UTe(this.items,n.key),s=this.schema?.sortMapEntries;if(o){if(!r)throw new Error(`Key ${n.key} already set`);w7.isScalar(o.value)&&EXo.isScalarValue(n.value)?o.value.value=n.value:o.value=n.value}else if(s){let c=this.items.findIndex(l=>s(n,l)<0);c===-1?this.items.push(n):this.items.splice(c,0,n)}else this.items.push(n)}delete(e){let r=UTe(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let o=UTe(this.items,e)?.value;return(!r&&w7.isScalar(o)?o.value:o)??void 0}has(e){return!!UTe(this.items,e)}set(e,r){this.add(new yXe.Pair(e,r),!0)}toJSON(e,r,n){let o=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(o);for(let s of this.items)AXo.addPairToJSMap(r,o,s);return o}toString(e,r,n){if(!e)return JSON.stringify(this);for(let o of this.items)if(!w7.isPair(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),gXo.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};Y$t.YAMLMap=z$t;Y$t.findPair=UTe});var oce=T(VIn=>{"use strict";f();var CXo=la(),$In=R7(),_Xo={collection:"map",default:!0,nodeClass:$In.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return CXo.isMap(t)||e("Expected a mapping for this tag"),t},createNode:a((t,e,r)=>$In.YAMLMap.from(t,e,r),"createNode")};VIn.map=_Xo});var P7=T(WIn=>{"use strict";f();var vXo=kTe(),bXo=W$t(),TXo=iXe(),CXe=la(),SXo=N0(),IXo=b7(),K$t=class extends TXo.Collection{static{a(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(CXe.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=EXe(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=EXe(e);if(typeof n!="number")return;let o=this.items[n];return!r&&CXe.isScalar(o)?o.value:o}has(e){let r=EXe(e);return typeof r=="number"&&r=0?e:null}a(EXe,"asItemIndex");WIn.YAMLSeq=K$t});var sce=T(YIn=>{"use strict";f();var xXo=la(),zIn=P7(),wXo={collection:"seq",default:!0,nodeClass:zIn.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return xXo.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:a((t,e,r)=>zIn.YAMLSeq.from(t,e,r),"createNode")};YIn.seq=wXo});var QTe=T(KIn=>{"use strict";f();var RXo=OTe(),PXo={identify:a(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(t=>t,"resolve"),stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),RXo.stringifyString(t,e,r,n)}};KIn.string=PXo});var _Xe=T(ZIn=>{"use strict";f();var JIn=N0(),XIn={identify:a(t=>t==null,"identify"),createNode:a(()=>new JIn.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:a(()=>new JIn.Scalar(null),"resolve"),stringify:a(({source:t},e)=>typeof t=="string"&&XIn.test.test(t)?t:e.options.nullStr,"stringify")};ZIn.nullTag=XIn});var J$t=T(txn=>{"use strict";f();var kXo=N0(),exn={identify:a(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:a(t=>new kXo.Scalar(t[0]==="t"||t[0]==="T"),"resolve"),stringify({source:t,value:e},r){if(t&&exn.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};txn.boolTag=exn});var ace=T(rxn=>{"use strict";f();function NXo({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let c=s.indexOf(".");c<0&&(c=s.length,s+=".");let l=e-(s.length-c-1);for(;l-- >0;)s+="0"}return s}a(NXo,"stringifyNumber");rxn.stringifyNumber=NXo});var Z$t=T(vXe=>{"use strict";f();var DXo=N0(),X$t=ace(),MXo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:X$t.stringifyNumber},OXo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:a(t=>parseFloat(t),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():X$t.stringifyNumber(t)}},BXo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new DXo.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:X$t.stringifyNumber};vXe.float=BXo;vXe.floatExp=OXo;vXe.floatNaN=MXo});var tVt=T(TXe=>{"use strict";f();var nxn=ace(),bXe=a(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),eVt=a((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function ixn(t,e,r){let{value:n}=t;return bXe(n)&&n>=0?r+n.toString(e):nxn.stringifyNumber(t)}a(ixn,"intStringify");var LXo={identify:a(t=>bXe(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:a((t,e,r)=>eVt(t,2,8,r),"resolve"),stringify:a(t=>ixn(t,8,"0o"),"stringify")},FXo={identify:bXe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:a((t,e,r)=>eVt(t,0,10,r),"resolve"),stringify:nxn.stringifyNumber},UXo={identify:a(t=>bXe(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:a((t,e,r)=>eVt(t,2,16,r),"resolve"),stringify:a(t=>ixn(t,16,"0x"),"stringify")};TXe.int=FXo;TXe.intHex=UXo;TXe.intOct=LXo});var sxn=T(oxn=>{"use strict";f();var QXo=oce(),qXo=_Xe(),GXo=sce(),HXo=QTe(),jXo=J$t(),rVt=Z$t(),nVt=tVt(),$Xo=[QXo.map,GXo.seq,HXo.string,qXo.nullTag,jXo.boolTag,nVt.intOct,nVt.int,nVt.intHex,rVt.floatNaN,rVt.floatExp,rVt.float];oxn.schema=$Xo});var lxn=T(cxn=>{"use strict";f();var VXo=N0(),WXo=oce(),zXo=sce();function axn(t){return typeof t=="bigint"||Number.isInteger(t)}a(axn,"intIdentify");var SXe=a(({value:t})=>JSON.stringify(t),"stringifyJSON"),YXo=[{identify:a(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(t=>t,"resolve"),stringify:SXe},{identify:a(t=>t==null,"identify"),createNode:a(()=>new VXo.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:a(()=>null,"resolve"),stringify:SXe},{identify:a(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a(t=>t==="true","resolve"),stringify:SXe},{identify:axn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:a((t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),"resolve"),stringify:a(({value:t})=>axn(t)?t.toString():JSON.stringify(t),"stringify")},{identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:a(t=>parseFloat(t),"resolve"),stringify:SXe}],KXo={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},JXo=[WXo.map,zXo.seq].concat(YXo,KXo);cxn.schema=JXo});var oVt=T(uxn=>{"use strict";f();var qTe=require("buffer"),iVt=N0(),XXo=OTe(),ZXo={identify:a(t=>t instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof qTe.Buffer=="function")return qTe.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let o=0;o{"use strict";f();var IXe=la(),sVt=x7(),eZo=N0(),tZo=P7();function dxn(t,e){if(IXe.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let o=n.items[0]||new sVt.Pair(new eZo.Scalar(null));if(n.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${n.commentBefore} +${o}${g}`}else return`${m}${c}${h.join(" ")}${c}${g}`}a(ges,"stringifyFlowCollection");function SJe({indent:t,options:{commentString:e}},r,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){let s=TJe.indentComment(e(n),t);r.push(s.trimStart())}}a(SJe,"addCommentBefore");Hxn.stringifyCollection=hes});var r7=T(mVt=>{"use strict";f();var Aes=pVt(),yes=dVt(),Ees=fJe(),t7=na(),IJe=e7(),_es=x0();function Bbe(t,e){let r=t7.isScalar(e)?e.value:e;for(let n of t)if(t7.isPair(n)&&(n.key===e||n.key===r||t7.isScalar(n.key)&&n.key.value===r))return n}a(Bbe,"findPair");var hVt=class extends Ees.Collection{static{a(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(t7.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:o,replacer:s}=n,c=new this(e),l=a((u,d)=>{if(typeof s=="function")d=s.call(r,u,d);else if(Array.isArray(s)&&!s.includes(u))return;(d!==void 0||o)&&c.items.push(IJe.createPair(u,d,n))},"add");if(r instanceof Map)for(let[u,d]of r)l(u,d);else if(r&&typeof r=="object")for(let u of Object.keys(r))l(u,r[u]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,r){let n;t7.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new IJe.Pair(e,e?.value):n=new IJe.Pair(e.key,e.value);let o=Bbe(this.items,n.key),s=this.schema?.sortMapEntries;if(o){if(!r)throw new Error(`Key ${n.key} already set`);t7.isScalar(o.value)&&_es.isScalarValue(n.value)?o.value.value=n.value:o.value=n.value}else if(s){let c=this.items.findIndex(l=>s(n,l)<0);c===-1?this.items.push(n):this.items.splice(c,0,n)}else this.items.push(n)}delete(e){let r=Bbe(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let o=Bbe(this.items,e)?.value;return(!r&&t7.isScalar(o)?o.value:o)??void 0}has(e){return!!Bbe(this.items,e)}set(e,r){this.add(new IJe.Pair(e,r),!0)}toJSON(e,r,n){let o=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(o);for(let s of this.items)yes.addPairToJSMap(r,o,s);return o}toString(e,r,n){if(!e)return JSON.stringify(this);for(let o of this.items)if(!t7.isPair(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Aes.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};mVt.YAMLMap=hVt;mVt.findPair=Bbe});var Eae=T($xn=>{"use strict";f();var Ces=na(),jxn=r7(),ves={collection:"map",default:!0,nodeClass:jxn.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return Ces.isMap(t)||e("Expected a mapping for this tag"),t},createNode:a((t,e,r)=>jxn.YAMLMap.from(t,e,r),"createNode")};$xn.map=ves});var n7=T(Vxn=>{"use strict";f();var bes=wbe(),Tes=pVt(),Ses=fJe(),wJe=na(),Ies=x0(),xes=K9(),gVt=class extends Ses.Collection{static{a(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(wJe.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=xJe(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=xJe(e);if(typeof n!="number")return;let o=this.items[n];return!r&&wJe.isScalar(o)?o.value:o}has(e){let r=xJe(e);return typeof r=="number"&&r=0?e:null}a(xJe,"asItemIndex");Vxn.YAMLSeq=gVt});var _ae=T(zxn=>{"use strict";f();var wes=na(),Wxn=n7(),Res={collection:"seq",default:!0,nodeClass:Wxn.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return wes.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:a((t,e,r)=>Wxn.YAMLSeq.from(t,e,r),"createNode")};zxn.seq=Res});var Lbe=T(Yxn=>{"use strict";f();var Pes=Dbe(),kes={identify:a(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(t=>t,"resolve"),stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),Pes.stringifyString(t,e,r,n)}};Yxn.string=kes});var RJe=T(Xxn=>{"use strict";f();var Kxn=x0(),Jxn={identify:a(t=>t==null,"identify"),createNode:a(()=>new Kxn.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:a(()=>new Kxn.Scalar(null),"resolve"),stringify:a(({source:t},e)=>typeof t=="string"&&Jxn.test.test(t)?t:e.options.nullStr,"stringify")};Xxn.nullTag=Jxn});var AVt=T(ewn=>{"use strict";f();var Des=x0(),Zxn={identify:a(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:a(t=>new Des.Scalar(t[0]==="t"||t[0]==="T"),"resolve"),stringify({source:t,value:e},r){if(t&&Zxn.test.test(t)){let n=t[0]==="t"||t[0]==="T";if(e===n)return t}return e?r.options.trueStr:r.options.falseStr}};ewn.boolTag=Zxn});var Cae=T(twn=>{"use strict";f();function Nes({format:t,minFractionDigits:e,tag:r,value:n}){if(typeof n=="bigint")return String(n);let o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let c=s.indexOf(".");c<0&&(c=s.length,s+=".");let l=e-(s.length-c-1);for(;l-- >0;)s+="0"}return s}a(Nes,"stringifyNumber");twn.stringifyNumber=Nes});var EVt=T(PJe=>{"use strict";f();var Mes=x0(),yVt=Cae(),Oes={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:yVt.stringifyNumber},Bes={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:a(t=>parseFloat(t),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():yVt.stringifyNumber(t)}},Les={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Mes.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:yVt.stringifyNumber};PJe.float=Les;PJe.floatExp=Bes;PJe.floatNaN=Oes});var CVt=T(DJe=>{"use strict";f();var rwn=Cae(),kJe=a(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify"),_Vt=a((t,e,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t.substring(e),r),"intResolve");function nwn(t,e,r){let{value:n}=t;return kJe(n)&&n>=0?r+n.toString(e):rwn.stringifyNumber(t)}a(nwn,"intStringify");var Fes={identify:a(t=>kJe(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:a((t,e,r)=>_Vt(t,2,8,r),"resolve"),stringify:a(t=>nwn(t,8,"0o"),"stringify")},Ues={identify:kJe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:a((t,e,r)=>_Vt(t,0,10,r),"resolve"),stringify:rwn.stringifyNumber},Qes={identify:a(t=>kJe(t)&&t>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:a((t,e,r)=>_Vt(t,2,16,r),"resolve"),stringify:a(t=>nwn(t,16,"0x"),"stringify")};DJe.int=Ues;DJe.intHex=Qes;DJe.intOct=Fes});var own=T(iwn=>{"use strict";f();var qes=Eae(),Ges=RJe(),Hes=_ae(),jes=Lbe(),$es=AVt(),vVt=EVt(),bVt=CVt(),Ves=[qes.map,Hes.seq,jes.string,Ges.nullTag,$es.boolTag,bVt.intOct,bVt.int,bVt.intHex,vVt.floatNaN,vVt.floatExp,vVt.float];iwn.schema=Ves});var cwn=T(awn=>{"use strict";f();var Wes=x0(),zes=Eae(),Yes=_ae();function swn(t){return typeof t=="bigint"||Number.isInteger(t)}a(swn,"intIdentify");var NJe=a(({value:t})=>JSON.stringify(t),"stringifyJSON"),Kes=[{identify:a(t=>typeof t=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(t=>t,"resolve"),stringify:NJe},{identify:a(t=>t==null,"identify"),createNode:a(()=>new Wes.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:a(()=>null,"resolve"),stringify:NJe},{identify:a(t=>typeof t=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a(t=>t==="true","resolve"),stringify:NJe},{identify:swn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:a((t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),"resolve"),stringify:a(({value:t})=>swn(t)?t.toString():JSON.stringify(t),"stringify")},{identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:a(t=>parseFloat(t),"resolve"),stringify:NJe}],Jes={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Xes=[zes.map,Yes.seq].concat(Kes,Jes);awn.schema=Xes});var SVt=T(lwn=>{"use strict";f();var Fbe=require("buffer"),TVt=x0(),Zes=Dbe(),ets={identify:a(t=>t instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Fbe.Buffer=="function")return Fbe.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let o=0;o{"use strict";f();var MJe=na(),IVt=e7(),tts=x0(),rts=n7();function uwn(t,e){if(MJe.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let o=n.items[0]||new IVt.Pair(new tts.Scalar(null));if(n.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${n.commentBefore} ${o.key.commentBefore}`:n.commentBefore),n.comment){let s=o.value??o.key;s.comment=s.comment?`${n.comment} -${s.comment}`:n.comment}n=o}t.items[r]=IXe.isPair(n)?n:new sVt.Pair(n)}}else e("Expected a sequence for this tag");return t}a(dxn,"resolvePairs");function fxn(t,e,r){let{replacer:n}=r,o=new tZo.YAMLSeq(t);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof n=="function"&&(c=n.call(e,String(s++),c));let l,u;if(Array.isArray(c))if(c.length===2)l=c[0],u=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){let d=Object.keys(c);if(d.length===1)l=d[0],u=c[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=c;o.items.push(sVt.createPair(l,u,r))}return o}a(fxn,"createPairs");var rZo={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:dxn,createNode:fxn};xXe.createPairs=fxn;xXe.pairs=rZo;xXe.resolvePairs=dxn});var lVt=T(cVt=>{"use strict";f();var pxn=la(),aVt=b7(),GTe=R7(),nZo=P7(),hxn=wXe(),oz=class t extends nZo.YAMLSeq{static{a(this,"YAMLOMap")}constructor(){super(),this.add=GTe.YAMLMap.prototype.add.bind(this),this.delete=GTe.YAMLMap.prototype.delete.bind(this),this.get=GTe.YAMLMap.prototype.get.bind(this),this.has=GTe.YAMLMap.prototype.has.bind(this),this.set=GTe.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let o of this.items){let s,c;if(pxn.isPair(o)?(s=aVt.toJS(o.key,"",r),c=aVt.toJS(o.value,s,r)):s=aVt.toJS(o,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,c)}return n}static from(e,r,n){let o=hxn.createPairs(e,r,n),s=new this;return s.items=o.items,s}};oz.tag="tag:yaml.org,2002:omap";var iZo={collection:"seq",identify:a(t=>t instanceof Map,"identify"),nodeClass:oz,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=hxn.resolvePairs(t,e),n=[];for(let{key:o}of r.items)pxn.isScalar(o)&&(n.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new oz,r)},createNode:a((t,e,r)=>oz.from(t,e,r),"createNode")};cVt.YAMLOMap=oz;cVt.omap=iZo});var Exn=T(uVt=>{"use strict";f();var mxn=N0();function gxn({value:t,source:e},r){return e&&(t?Axn:yxn).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}a(gxn,"boolStringify");var Axn={identify:a(t=>t===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:a(()=>new mxn.Scalar(!0),"resolve"),stringify:gxn},yxn={identify:a(t=>t===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:a(()=>new mxn.Scalar(!1),"resolve"),stringify:gxn};uVt.falseTag=yxn;uVt.trueTag=Axn});var Cxn=T(RXe=>{"use strict";f();var oZo=N0(),dVt=ace(),sZo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:dVt.stringifyNumber},aZo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:a(t=>parseFloat(t.replace(/_/g,"")),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():dVt.stringifyNumber(t)}},cZo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new oZo.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:dVt.stringifyNumber};RXe.float=cZo;RXe.floatExp=aZo;RXe.floatNaN=sZo});var vxn=T(jTe=>{"use strict";f();var _xn=ace(),HTe=a(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function PXe(t,e,r,{intAsBigInt:n}){let o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let c=BigInt(t);return o==="-"?BigInt(-1)*c:c}let s=parseInt(t,r);return o==="-"?-1*s:s}a(PXe,"intResolve");function fVt(t,e,r){let{value:n}=t;if(HTe(n)){let o=n.toString(e);return n<0?"-"+r+o.substr(1):r+o}return _xn.stringifyNumber(t)}a(fVt,"intStringify");var lZo={identify:HTe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:a((t,e,r)=>PXe(t,2,2,r),"resolve"),stringify:a(t=>fVt(t,2,"0b"),"stringify")},uZo={identify:HTe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:a((t,e,r)=>PXe(t,1,8,r),"resolve"),stringify:a(t=>fVt(t,8,"0"),"stringify")},dZo={identify:HTe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:a((t,e,r)=>PXe(t,0,10,r),"resolve"),stringify:_xn.stringifyNumber},fZo={identify:HTe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:a((t,e,r)=>PXe(t,2,16,r),"resolve"),stringify:a(t=>fVt(t,16,"0x"),"stringify")};jTe.int=dZo;jTe.intBin=lZo;jTe.intHex=fZo;jTe.intOct=uZo});var hVt=T(pVt=>{"use strict";f();var DXe=la(),kXe=x7(),NXe=R7(),sz=class t extends NXe.YAMLMap{static{a(this,"YAMLSet")}constructor(e){super(e),this.tag=t.tag}add(e){let r;DXe.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new kXe.Pair(e.key,null):r=new kXe.Pair(e,null),NXe.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=NXe.findPair(this.items,e);return!r&&DXe.isPair(n)?DXe.isScalar(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=NXe.findPair(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new kXe.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:o}=n,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let c of r)typeof o=="function"&&(c=o.call(r,c,c)),s.items.push(kXe.createPair(c,null,n));return s}};sz.tag="tag:yaml.org,2002:set";var pZo={collection:"map",identify:a(t=>t instanceof Set,"identify"),nodeClass:sz,default:!1,tag:"tag:yaml.org,2002:set",createNode:a((t,e,r)=>sz.from(t,e,r),"createNode"),resolve(t,e){if(DXe.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new sz,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};pVt.YAMLSet=sz;pVt.set=pZo});var gVt=T(MXe=>{"use strict";f();var hZo=ace();function mVt(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,o=a(c=>e?BigInt(c):Number(c),"num"),s=n.replace(/_/g,"").split(":").reduce((c,l)=>c*o(60)+o(l),o(0));return r==="-"?o(-1)*s:s}a(mVt,"parseSexagesimal");function bxn(t){let{value:e}=t,r=a(c=>c,"num");if(typeof e=="bigint")r=a(c=>BigInt(c),"num");else if(isNaN(e)||!isFinite(e))return hZo.stringifyNumber(t);let n="";e<0&&(n="-",e*=r(-1));let o=r(60),s=[e%o];return e<60?s.unshift(0):(e=(e-s[0])/o,s.unshift(e%o),e>=60&&(e=(e-s[0])/o,s.unshift(e))),n+s.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}a(bxn,"stringifySexagesimal");var mZo={identify:a(t=>typeof t=="bigint"||Number.isInteger(t),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:a((t,e,{intAsBigInt:r})=>mVt(t,r),"resolve"),stringify:bxn},gZo={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:a(t=>mVt(t,!1),"resolve"),stringify:bxn},Txn={identify:a(t=>t instanceof Date,"identify"),default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(Txn.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,o,s,c,l]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0,d=Date.UTC(r,n-1,o,s||0,c||0,l||0,u),p=e[8];if(p&&p!=="Z"){let h=mVt(p,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:a(({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};MXe.floatTime=gZo;MXe.intTime=mZo;MXe.timestamp=Txn});var xxn=T(Ixn=>{"use strict";f();var AZo=oce(),yZo=_Xe(),EZo=sce(),CZo=QTe(),_Zo=oVt(),Sxn=Exn(),AVt=Cxn(),OXe=vxn(),vZo=pXe(),bZo=lVt(),TZo=wXe(),SZo=hVt(),yVt=gVt(),IZo=[AZo.map,EZo.seq,CZo.string,yZo.nullTag,Sxn.trueTag,Sxn.falseTag,OXe.intBin,OXe.intOct,OXe.int,OXe.intHex,AVt.floatNaN,AVt.floatExp,AVt.float,_Zo.binary,vZo.merge,bZo.omap,TZo.pairs,SZo.set,yVt.intTime,yVt.floatTime,yVt.timestamp];Ixn.schema=IZo});var Lxn=T(_Vt=>{"use strict";f();var kxn=oce(),xZo=_Xe(),Nxn=sce(),wZo=QTe(),RZo=J$t(),EVt=Z$t(),CVt=tVt(),PZo=sxn(),kZo=lxn(),Dxn=oVt(),$Te=pXe(),Mxn=lVt(),Oxn=wXe(),wxn=xxn(),Bxn=hVt(),BXe=gVt(),Rxn=new Map([["core",PZo.schema],["failsafe",[kxn.map,Nxn.seq,wZo.string]],["json",kZo.schema],["yaml11",wxn.schema],["yaml-1.1",wxn.schema]]),Pxn={binary:Dxn.binary,bool:RZo.boolTag,float:EVt.float,floatExp:EVt.floatExp,floatNaN:EVt.floatNaN,floatTime:BXe.floatTime,int:CVt.int,intHex:CVt.intHex,intOct:CVt.intOct,intTime:BXe.intTime,map:kxn.map,merge:$Te.merge,null:xZo.nullTag,omap:Mxn.omap,pairs:Oxn.pairs,seq:Nxn.seq,set:Bxn.set,timestamp:BXe.timestamp},NZo={"tag:yaml.org,2002:binary":Dxn.binary,"tag:yaml.org,2002:merge":$Te.merge,"tag:yaml.org,2002:omap":Mxn.omap,"tag:yaml.org,2002:pairs":Oxn.pairs,"tag:yaml.org,2002:set":Bxn.set,"tag:yaml.org,2002:timestamp":BXe.timestamp};function DZo(t,e,r){let n=Rxn.get(e);if(n&&!t)return r&&!n.includes($Te.merge)?n.concat($Te.merge):n.slice();let o=n;if(!o)if(Array.isArray(t))o=[];else{let s=Array.from(Rxn.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)o=o.concat(s);else typeof t=="function"&&(o=t(o.slice()));return r&&(o=o.concat($Te.merge)),o.reduce((s,c)=>{let l=typeof c=="string"?Pxn[c]:c;if(!l){let u=JSON.stringify(c),d=Object.keys(Pxn).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${d}`)}return s.includes(l)||s.push(l),s},[])}a(DZo,"getTags");_Vt.coreKnownTags=NZo;_Vt.getTags=DZo});var TVt=T(Fxn=>{"use strict";f();var vVt=la(),MZo=oce(),OZo=sce(),BZo=QTe(),LXe=Lxn(),LZo=a((t,e)=>t.keye.key?1:0,"sortMapEntriesByKey"),bVt=class t{static{a(this,"Schema")}constructor({compat:e,customTags:r,merge:n,resolveKnownTags:o,schema:s,sortMapEntries:c,toStringDefaults:l}){this.compat=Array.isArray(e)?LXe.getTags(e,"compat"):e?LXe.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=o?LXe.coreKnownTags:{},this.tags=LXe.getTags(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,vVt.MAP,{value:MZo.map}),Object.defineProperty(this,vVt.SCALAR,{value:BZo.string}),Object.defineProperty(this,vVt.SEQ,{value:OZo.seq}),this.sortMapEntries=typeof c=="function"?c:c===!0?LZo:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Fxn.Schema=bVt});var Qxn=T(Uxn=>{"use strict";f();var FZo=la(),SVt=BTe(),VTe=NTe();function UZo(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let u=t.directives.toString(t);u?(r.push(u),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let o=SVt.createStringifyContext(t,e),{commentString:s}=o.options;if(t.commentBefore){r.length!==1&&r.unshift("");let u=s(t.commentBefore);r.unshift(VTe.indentComment(u,""))}let c=!1,l=null;if(t.contents){if(FZo.isNode(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let p=s(t.contents.commentBefore);r.push(VTe.indentComment(p,""))}o.forceBlockIndent=!!t.comment,l=t.contents.comment}let u=l?void 0:()=>c=!0,d=SVt.stringify(t.contents,o,()=>l=null,u);l&&(d+=VTe.lineComment(d,"",s(l))),(d[0]==="|"||d[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${d}`:r.push(d)}else r.push(SVt.stringify(t.contents,o));if(t.directives?.docEnd)if(t.comment){let u=s(t.comment);u.includes(` -`)?(r.push("..."),r.push(VTe.indentComment(u,""))):r.push(`... ${u}`)}else r.push("...");else{let u=t.comment;u&&c&&(u=u.replace(/^\n+/,"")),u&&((!c||l)&&r[r.length-1]!==""&&r.push(""),r.push(VTe.indentComment(s(u),"")))}return r.join(` +${s.comment}`:n.comment}n=o}t.items[r]=MJe.isPair(n)?n:new IVt.Pair(n)}}else e("Expected a sequence for this tag");return t}a(uwn,"resolvePairs");function dwn(t,e,r){let{replacer:n}=r,o=new rts.YAMLSeq(t);o.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof n=="function"&&(c=n.call(e,String(s++),c));let l,u;if(Array.isArray(c))if(c.length===2)l=c[0],u=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){let d=Object.keys(c);if(d.length===1)l=d[0],u=c[l];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else l=c;o.items.push(IVt.createPair(l,u,r))}return o}a(dwn,"createPairs");var nts={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:uwn,createNode:dwn};OJe.createPairs=dwn;OJe.pairs=nts;OJe.resolvePairs=uwn});var RVt=T(wVt=>{"use strict";f();var fwn=na(),xVt=K9(),Ube=r7(),its=n7(),pwn=BJe(),fW=class t extends its.YAMLSeq{static{a(this,"YAMLOMap")}constructor(){super(),this.add=Ube.YAMLMap.prototype.add.bind(this),this.delete=Ube.YAMLMap.prototype.delete.bind(this),this.get=Ube.YAMLMap.prototype.get.bind(this),this.has=Ube.YAMLMap.prototype.has.bind(this),this.set=Ube.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let o of this.items){let s,c;if(fwn.isPair(o)?(s=xVt.toJS(o.key,"",r),c=xVt.toJS(o.value,s,r)):s=xVt.toJS(o,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,c)}return n}static from(e,r,n){let o=pwn.createPairs(e,r,n),s=new this;return s.items=o.items,s}};fW.tag="tag:yaml.org,2002:omap";var ots={collection:"seq",identify:a(t=>t instanceof Map,"identify"),nodeClass:fW,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=pwn.resolvePairs(t,e),n=[];for(let{key:o}of r.items)fwn.isScalar(o)&&(n.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new fW,r)},createNode:a((t,e,r)=>fW.from(t,e,r),"createNode")};wVt.YAMLOMap=fW;wVt.omap=ots});var ywn=T(PVt=>{"use strict";f();var hwn=x0();function mwn({value:t,source:e},r){return e&&(t?gwn:Awn).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}a(mwn,"boolStringify");var gwn={identify:a(t=>t===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:a(()=>new hwn.Scalar(!0),"resolve"),stringify:mwn},Awn={identify:a(t=>t===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:a(()=>new hwn.Scalar(!1),"resolve"),stringify:mwn};PVt.falseTag=Awn;PVt.trueTag=gwn});var Ewn=T(LJe=>{"use strict";f();var sts=x0(),kVt=Cae(),ats={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:kVt.stringifyNumber},cts={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:a(t=>parseFloat(t.replace(/_/g,"")),"resolve"),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():kVt.stringifyNumber(t)}},lts={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new sts.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:kVt.stringifyNumber};LJe.float=lts;LJe.floatExp=cts;LJe.floatNaN=ats});var Cwn=T(qbe=>{"use strict";f();var _wn=Cae(),Qbe=a(t=>typeof t=="bigint"||Number.isInteger(t),"intIdentify");function FJe(t,e,r,{intAsBigInt:n}){let o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let c=BigInt(t);return o==="-"?BigInt(-1)*c:c}let s=parseInt(t,r);return o==="-"?-1*s:s}a(FJe,"intResolve");function DVt(t,e,r){let{value:n}=t;if(Qbe(n)){let o=n.toString(e);return n<0?"-"+r+o.substr(1):r+o}return _wn.stringifyNumber(t)}a(DVt,"intStringify");var uts={identify:Qbe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:a((t,e,r)=>FJe(t,2,2,r),"resolve"),stringify:a(t=>DVt(t,2,"0b"),"stringify")},dts={identify:Qbe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:a((t,e,r)=>FJe(t,1,8,r),"resolve"),stringify:a(t=>DVt(t,8,"0"),"stringify")},fts={identify:Qbe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:a((t,e,r)=>FJe(t,0,10,r),"resolve"),stringify:_wn.stringifyNumber},pts={identify:Qbe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:a((t,e,r)=>FJe(t,2,16,r),"resolve"),stringify:a(t=>DVt(t,16,"0x"),"stringify")};qbe.int=fts;qbe.intBin=uts;qbe.intHex=pts;qbe.intOct=dts});var MVt=T(NVt=>{"use strict";f();var qJe=na(),UJe=e7(),QJe=r7(),pW=class t extends QJe.YAMLMap{static{a(this,"YAMLSet")}constructor(e){super(e),this.tag=t.tag}add(e){let r;qJe.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new UJe.Pair(e.key,null):r=new UJe.Pair(e,null),QJe.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=QJe.findPair(this.items,e);return!r&&qJe.isPair(n)?qJe.isScalar(n.key)?n.key.value:n.key:n}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=QJe.findPair(this.items,e);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new UJe.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(e,r,n){let{replacer:o}=n,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let c of r)typeof o=="function"&&(c=o.call(r,c,c)),s.items.push(UJe.createPair(c,null,n));return s}};pW.tag="tag:yaml.org,2002:set";var hts={collection:"map",identify:a(t=>t instanceof Set,"identify"),nodeClass:pW,default:!1,tag:"tag:yaml.org,2002:set",createNode:a((t,e,r)=>pW.from(t,e,r),"createNode"),resolve(t,e){if(qJe.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new pW,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};NVt.YAMLSet=pW;NVt.set=hts});var BVt=T(GJe=>{"use strict";f();var mts=Cae();function OVt(t,e){let r=t[0],n=r==="-"||r==="+"?t.substring(1):t,o=a(c=>e?BigInt(c):Number(c),"num"),s=n.replace(/_/g,"").split(":").reduce((c,l)=>c*o(60)+o(l),o(0));return r==="-"?o(-1)*s:s}a(OVt,"parseSexagesimal");function vwn(t){let{value:e}=t,r=a(c=>c,"num");if(typeof e=="bigint")r=a(c=>BigInt(c),"num");else if(isNaN(e)||!isFinite(e))return mts.stringifyNumber(t);let n="";e<0&&(n="-",e*=r(-1));let o=r(60),s=[e%o];return e<60?s.unshift(0):(e=(e-s[0])/o,s.unshift(e%o),e>=60&&(e=(e-s[0])/o,s.unshift(e))),n+s.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}a(vwn,"stringifySexagesimal");var gts={identify:a(t=>typeof t=="bigint"||Number.isInteger(t),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:a((t,e,{intAsBigInt:r})=>OVt(t,r),"resolve"),stringify:vwn},Ats={identify:a(t=>typeof t=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:a(t=>OVt(t,!1),"resolve"),stringify:vwn},bwn={identify:a(t=>t instanceof Date,"identify"),default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(bwn.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,o,s,c,l]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0,d=Date.UTC(r,n-1,o,s||0,c||0,l||0,u),p=e[8];if(p&&p!=="Z"){let h=OVt(p,!1);Math.abs(h)<30&&(h*=60),d-=6e4*h}return new Date(d)},stringify:a(({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};GJe.floatTime=Ats;GJe.intTime=gts;GJe.timestamp=bwn});var Iwn=T(Swn=>{"use strict";f();var yts=Eae(),Ets=RJe(),_ts=_ae(),Cts=Lbe(),vts=SVt(),Twn=ywn(),LVt=Ewn(),HJe=Cwn(),bts=CJe(),Tts=RVt(),Sts=BJe(),Its=MVt(),FVt=BVt(),xts=[yts.map,_ts.seq,Cts.string,Ets.nullTag,Twn.trueTag,Twn.falseTag,HJe.intBin,HJe.intOct,HJe.int,HJe.intHex,LVt.floatNaN,LVt.floatExp,LVt.float,vts.binary,bts.merge,Tts.omap,Sts.pairs,Its.set,FVt.intTime,FVt.floatTime,FVt.timestamp];Swn.schema=xts});var Bwn=T(qVt=>{"use strict";f();var Pwn=Eae(),wts=RJe(),kwn=_ae(),Rts=Lbe(),Pts=AVt(),UVt=EVt(),QVt=CVt(),kts=own(),Dts=cwn(),Dwn=SVt(),Gbe=CJe(),Nwn=RVt(),Mwn=BJe(),xwn=Iwn(),Own=MVt(),jJe=BVt(),wwn=new Map([["core",kts.schema],["failsafe",[Pwn.map,kwn.seq,Rts.string]],["json",Dts.schema],["yaml11",xwn.schema],["yaml-1.1",xwn.schema]]),Rwn={binary:Dwn.binary,bool:Pts.boolTag,float:UVt.float,floatExp:UVt.floatExp,floatNaN:UVt.floatNaN,floatTime:jJe.floatTime,int:QVt.int,intHex:QVt.intHex,intOct:QVt.intOct,intTime:jJe.intTime,map:Pwn.map,merge:Gbe.merge,null:wts.nullTag,omap:Nwn.omap,pairs:Mwn.pairs,seq:kwn.seq,set:Own.set,timestamp:jJe.timestamp},Nts={"tag:yaml.org,2002:binary":Dwn.binary,"tag:yaml.org,2002:merge":Gbe.merge,"tag:yaml.org,2002:omap":Nwn.omap,"tag:yaml.org,2002:pairs":Mwn.pairs,"tag:yaml.org,2002:set":Own.set,"tag:yaml.org,2002:timestamp":jJe.timestamp};function Mts(t,e,r){let n=wwn.get(e);if(n&&!t)return r&&!n.includes(Gbe.merge)?n.concat(Gbe.merge):n.slice();let o=n;if(!o)if(Array.isArray(t))o=[];else{let s=Array.from(wwn.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)o=o.concat(s);else typeof t=="function"&&(o=t(o.slice()));return r&&(o=o.concat(Gbe.merge)),o.reduce((s,c)=>{let l=typeof c=="string"?Rwn[c]:c;if(!l){let u=JSON.stringify(c),d=Object.keys(Rwn).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${d}`)}return s.includes(l)||s.push(l),s},[])}a(Mts,"getTags");qVt.coreKnownTags=Nts;qVt.getTags=Mts});var jVt=T(Lwn=>{"use strict";f();var GVt=na(),Ots=Eae(),Bts=_ae(),Lts=Lbe(),$Je=Bwn(),Fts=a((t,e)=>t.keye.key?1:0,"sortMapEntriesByKey"),HVt=class t{static{a(this,"Schema")}constructor({compat:e,customTags:r,merge:n,resolveKnownTags:o,schema:s,sortMapEntries:c,toStringDefaults:l}){this.compat=Array.isArray(e)?$Je.getTags(e,"compat"):e?$Je.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=o?$Je.coreKnownTags:{},this.tags=$Je.getTags(r,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,GVt.MAP,{value:Ots.map}),Object.defineProperty(this,GVt.SCALAR,{value:Lts.string}),Object.defineProperty(this,GVt.SEQ,{value:Bts.seq}),this.sortMapEntries=typeof c=="function"?c:c===!0?Fts:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Lwn.Schema=HVt});var Uwn=T(Fwn=>{"use strict";f();var Uts=na(),$Vt=Nbe(),Hbe=Rbe();function Qts(t,e){let r=[],n=e.directives===!0;if(e.directives!==!1&&t.directives){let u=t.directives.toString(t);u?(r.push(u),n=!0):t.directives.docStart&&(n=!0)}n&&r.push("---");let o=$Vt.createStringifyContext(t,e),{commentString:s}=o.options;if(t.commentBefore){r.length!==1&&r.unshift("");let u=s(t.commentBefore);r.unshift(Hbe.indentComment(u,""))}let c=!1,l=null;if(t.contents){if(Uts.isNode(t.contents)){if(t.contents.spaceBefore&&n&&r.push(""),t.contents.commentBefore){let p=s(t.contents.commentBefore);r.push(Hbe.indentComment(p,""))}o.forceBlockIndent=!!t.comment,l=t.contents.comment}let u=l?void 0:()=>c=!0,d=$Vt.stringify(t.contents,o,()=>l=null,u);l&&(d+=Hbe.lineComment(d,"",s(l))),(d[0]==="|"||d[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${d}`:r.push(d)}else r.push($Vt.stringify(t.contents,o));if(t.directives?.docEnd)if(t.comment){let u=s(t.comment);u.includes(` +`)?(r.push("..."),r.push(Hbe.indentComment(u,""))):r.push(`... ${u}`)}else r.push("...");else{let u=t.comment;u&&c&&(u=u.replace(/^\n+/,"")),u&&((!c||l)&&r[r.length-1]!==""&&r.push(""),r.push(Hbe.indentComment(s(u),"")))}return r.join(` `)+` -`}a(UZo,"stringifyDocument");Uxn.stringifyDocument=UZo});var WTe=T(qxn=>{"use strict";f();var QZo=PTe(),cce=iXe(),NS=la(),qZo=x7(),GZo=b7(),HZo=TVt(),jZo=Qxn(),IVt=eXe(),$Zo=P$t(),VZo=kTe(),xVt=R$t(),wVt=class t{static{a(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,NS.NODE_TYPE,{value:NS.DOC});let o=null;typeof r=="function"||Array.isArray(r)?o=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:c}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new xVt.Directives({version:c}),this.setSchema(c,n),this.contents=e===void 0?null:this.createNode(e,o,n)}clone(){let e=Object.create(t.prototype,{[NS.NODE_TYPE]:{value:NS.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=NS.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){lce(this.contents)&&this.contents.add(e)}addIn(e,r){lce(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=IVt.anchorNames(this);e.anchor=!r||n.has(r)?IVt.findNewAnchor(r||"a",n):r}return new QZo.Alias(e.anchor)}createNode(e,r,n){let o;if(typeof r=="function")e=r.call({"":e},"",e),o=r;else if(Array.isArray(r)){let E=a(v=>typeof v=="number"||v instanceof String||v instanceof Number,"keyToStr"),_=r.filter(E).map(String);_.length>0&&(r=r.concat(_)),o=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:c,flow:l,keepUndefined:u,onTagObj:d,tag:p}=n??{},{onAnchor:h,setAnchors:m,sourceObjects:g}=IVt.createNodeAnchors(this,c||"a"),A={aliasDuplicateObjects:s??!0,keepUndefined:u??!1,onAnchor:h,onTagObj:d,replacer:o,schema:this.schema,sourceObjects:g},y=VZo.createNode(e,p,A);return l&&NS.isCollection(y)&&(y.flow=!0),m(),y}createPair(e,r,n={}){let o=this.createNode(e,null,n),s=this.createNode(r,null,n);return new qZo.Pair(o,s)}delete(e){return lce(this.contents)?this.contents.delete(e):!1}deleteIn(e){return cce.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):lce(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return NS.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return cce.isEmptyPath(e)?!r&&NS.isScalar(this.contents)?this.contents.value:this.contents:NS.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return NS.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return cce.isEmptyPath(e)?this.contents!==void 0:NS.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=cce.collectionFromPath(this.schema,[e],r):lce(this.contents)&&this.contents.set(e,r)}setIn(e,r){cce.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=cce.collectionFromPath(this.schema,Array.from(e),r):lce(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new xVt.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new xVt.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new HZo.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:o,onAnchor:s,reviver:c}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},u=GZo.toJS(this.contents,r??"",l);if(typeof s=="function")for(let{count:d,res:p}of l.anchors.values())s(p,d);return typeof c=="function"?$Zo.applyReviver(c,{"":u},"",u):u}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return jZo.stringifyDocument(this,e)}};function lce(t){if(NS.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}a(lce,"assertCollection");qxn.Document=wVt});var KTe=T(YTe=>{"use strict";f();var zTe=class extends Error{static{a(this,"YAMLError")}constructor(e,r,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=r}},RVt=class extends zTe{static{a(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},PVt=class extends zTe{static{a(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},WZo=a((t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(l=>e.linePos(l));let{line:n,col:o}=r.linePos[0];r.message+=` at line ${n}, column ${o}`;let s=o-1,c=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&c.length>80){let l=Math.min(s-39,c.length-79);c="\u2026"+c.substring(l),s-=l-1}if(c.length>80&&(c=c.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(c.substring(0,s))){let l=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026 +`}a(Qts,"stringifyDocument");Fwn.stringifyDocument=Qts});var jbe=T(Qwn=>{"use strict";f();var qts=xbe(),vae=fJe(),_S=na(),Gts=e7(),Hts=K9(),jts=jVt(),$ts=Uwn(),VVt=cJe(),Vts=K$t(),Wts=wbe(),WVt=Y$t(),zVt=class t{static{a(this,"Document")}constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_S.NODE_TYPE,{value:_S.DOC});let o=null;typeof r=="function"||Array.isArray(r)?o=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:c}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new WVt.Directives({version:c}),this.setSchema(c,n),this.contents=e===void 0?null:this.createNode(e,o,n)}clone(){let e=Object.create(t.prototype,{[_S.NODE_TYPE]:{value:_S.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=_S.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){bae(this.contents)&&this.contents.add(e)}addIn(e,r){bae(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=VVt.anchorNames(this);e.anchor=!r||n.has(r)?VVt.findNewAnchor(r||"a",n):r}return new qts.Alias(e.anchor)}createNode(e,r,n){let o;if(typeof r=="function")e=r.call({"":e},"",e),o=r;else if(Array.isArray(r)){let E=a(v=>typeof v=="number"||v instanceof String||v instanceof Number,"keyToStr"),_=r.filter(E).map(String);_.length>0&&(r=r.concat(_)),o=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:c,flow:l,keepUndefined:u,onTagObj:d,tag:p}=n??{},{onAnchor:h,setAnchors:m,sourceObjects:g}=VVt.createNodeAnchors(this,c||"a"),A={aliasDuplicateObjects:s??!0,keepUndefined:u??!1,onAnchor:h,onTagObj:d,replacer:o,schema:this.schema,sourceObjects:g},y=Wts.createNode(e,p,A);return l&&_S.isCollection(y)&&(y.flow=!0),m(),y}createPair(e,r,n={}){let o=this.createNode(e,null,n),s=this.createNode(r,null,n);return new Gts.Pair(o,s)}delete(e){return bae(this.contents)?this.contents.delete(e):!1}deleteIn(e){return vae.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):bae(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return _S.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return vae.isEmptyPath(e)?!r&&_S.isScalar(this.contents)?this.contents.value:this.contents:_S.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return _S.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return vae.isEmptyPath(e)?this.contents!==void 0:_S.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=vae.collectionFromPath(this.schema,[e],r):bae(this.contents)&&this.contents.set(e,r)}setIn(e,r){vae.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=vae.collectionFromPath(this.schema,Array.from(e),r):bae(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new WVt.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new WVt.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new jts.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:o,onAnchor:s,reviver:c}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},u=Hts.toJS(this.contents,r??"",l);if(typeof s=="function")for(let{count:d,res:p}of l.anchors.values())s(p,d);return typeof c=="function"?Vts.applyReviver(c,{"":u},"",u):u}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return $ts.stringifyDocument(this,e)}};function bae(t){if(_S.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}a(bae,"assertCollection");Qwn.Document=zVt});var Wbe=T(Vbe=>{"use strict";f();var $be=class extends Error{static{a(this,"YAMLError")}constructor(e,r,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=r}},YVt=class extends $be{static{a(this,"YAMLParseError")}constructor(e,r,n){super("YAMLParseError",e,r,n)}},KVt=class extends $be{static{a(this,"YAMLWarning")}constructor(e,r,n){super("YAMLWarning",e,r,n)}},zts=a((t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(l=>e.linePos(l));let{line:n,col:o}=r.linePos[0];r.message+=` at line ${n}, column ${o}`;let s=o-1,c=t.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&c.length>80){let l=Math.min(s-39,c.length-79);c="\u2026"+c.substring(l),s-=l-1}if(c.length>80&&(c=c.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(c.substring(0,s))){let l=t.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026 `),c=l+c}if(/[^ ]/.test(c)){let l=1,u=r.linePos[1];u?.line===n&&u.col>o&&(l=Math.max(1,Math.min(u.col-o,80-s)));let d=" ".repeat(s)+"^".repeat(l);r.message+=`: ${c} ${d} -`}},"prettifyError");YTe.YAMLError=zTe;YTe.YAMLParseError=RVt;YTe.YAMLWarning=PVt;YTe.prettifyError=WZo});var JTe=T(Gxn=>{"use strict";f();function zZo(t,{flow:e,indicator:r,next:n,offset:o,onError:s,parentIndent:c,startOnNewline:l}){let u=!1,d=l,p=l,h="",m="",g=!1,A=!1,y=null,E=null,_=null,v=null,b=null,I=null,x=null;for(let P of t)switch(A&&(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma"&&s(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),A=!1),y&&(d&&P.type!=="comment"&&P.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),P.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&P.source.includes(" ")&&(y=P),p=!0;break;case"comment":{p||s(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let k=P.source.substring(1)||" ";h?h+=m+k:h=k,m="",d=!1;break}case"newline":d?h?h+=P.source:(!I||r!=="seq-item-ind")&&(u=!0):m+=P.source,d=!0,g=!0,(E||_)&&(v=P),p=!0;break;case"anchor":E&&s(P,"MULTIPLE_ANCHORS","A node can have at most one anchor"),P.source.endsWith(":")&&s(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=P,x??(x=P.offset),d=!1,p=!1,A=!0;break;case"tag":{_&&s(P,"MULTIPLE_TAGS","A node can have at most one tag"),_=P,x??(x=P.offset),d=!1,p=!1,A=!0;break}case r:(E||_)&&s(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`),I&&s(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${e??"collection"}`),I=P,d=r==="seq-item-ind"||r==="explicit-key-ind",p=!1;break;case"comma":if(e){b&&s(P,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=P,d=!1,p=!1;break}default:s(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),d=!1,p=!1}let R=t[t.length-1],w=R?R.offset+R.source.length:o;return A&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(d&&y.indent<=c||n?.type==="block-map"||n?.type==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:I,spaceBefore:u,comment:h,hasNewline:g,anchor:E,tag:_,newlineAfterProp:v,end:w,start:x??w}}a(zZo,"resolveProps");Gxn.resolveProps=zZo});var FXe=T(Hxn=>{"use strict";f();function kVt(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` -`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(kVt(e.key)||kVt(e.value))return!0}return!1;default:return!0}}a(kVt,"containsNewline");Hxn.containsNewline=kVt});var NVt=T(jxn=>{"use strict";f();var YZo=FXe();function KZo(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&YZo.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}a(KZo,"flowIndentCheck");jxn.flowIndentCheck=KZo});var DVt=T(Vxn=>{"use strict";f();var $xn=la();function JZo(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let o=typeof n=="function"?n:(s,c)=>s===c||$xn.isScalar(s)&&$xn.isScalar(c)&&s.value===c.value;return e.some(s=>o(s.key,r))}a(JZo,"mapIncludes");Vxn.mapIncludes=JZo});var Xxn=T(Jxn=>{"use strict";f();var Wxn=x7(),XZo=R7(),zxn=JTe(),ZZo=FXe(),Yxn=NVt(),ees=DVt(),Kxn="All mapping items must start at the same column";function tes({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=s?.nodeClass??XZo.YAMLMap,l=new c(r.schema);r.atRoot&&(r.atRoot=!1);let u=n.offset,d=null;for(let p of n.items){let{start:h,key:m,sep:g,value:A}=p,y=zxn.resolveProps(h,{indicator:"explicit-key-ind",next:m??g?.[0],offset:u,onError:o,parentIndent:n.indent,startOnNewline:!0}),E=!y.found;if(E){if(m&&(m.type==="block-seq"?o(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==n.indent&&o(u,"BAD_INDENT",Kxn)),!y.anchor&&!y.tag&&!g){d=y.end,y.comment&&(l.comment?l.comment+=` -`+y.comment:l.comment=y.comment);continue}(y.newlineAfterProp||ZZo.containsNewline(m))&&o(m??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else y.found?.indent!==n.indent&&o(u,"BAD_INDENT",Kxn);r.atKey=!0;let _=y.end,v=m?t(r,m,y,o):e(r,_,h,null,y,o);r.schema.compat&&Yxn.flowIndentCheck(n.indent,m,o),r.atKey=!1,ees.mapIncludes(r,l.items,v)&&o(_,"DUPLICATE_KEY","Map keys must be unique");let b=zxn.resolveProps(g??[],{indicator:"map-value-ind",next:A,offset:v.range[2],onError:o,parentIndent:n.indent,startOnNewline:!m||m.type==="block-scalar"});if(u=b.end,b.found){E&&(A?.type==="block-map"&&!b.hasNewline&&o(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&y.start{"use strict";f();var res=P7(),nes=JTe(),ies=NVt();function oes({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=s?.nodeClass??res.YAMLSeq,l=new c(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset,d=null;for(let{start:p,value:h}of n.items){let m=nes.resolveProps(p,{indicator:"seq-item-ind",next:h,offset:u,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||h)h?.type==="block-seq"?o(m.end,"BAD_INDENT","All sequence items must start at the same column"):o(u,"MISSING_CHAR","Sequence item without - indicator");else{d=m.end,m.comment&&(l.comment=m.comment);continue}let g=h?t(r,h,m,o):e(r,m.end,p,null,m,o);r.schema.compat&&ies.flowIndentCheck(n.indent,h,o),u=g.range[2],l.items.push(g)}return l.range=[n.offset,u,d??u],l}a(oes,"resolveBlockSeq");Zxn.resolveBlockSeq=oes});var uce=T(twn=>{"use strict";f();function ses(t,e,r,n){let o="";if(t){let s=!1,c="";for(let l of t){let{source:u,type:d}=l;switch(d){case"space":s=!0;break;case"comment":{r&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=u.substring(1)||" ";o?o+=c+p:o=p,c="";break}case"newline":o&&(c+=u),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}e+=u.length}}return{comment:o,offset:e}}a(ses,"resolveEnd");twn.resolveEnd=ses});var own=T(iwn=>{"use strict";f();var aes=la(),ces=x7(),rwn=R7(),les=P7(),ues=uce(),nwn=JTe(),des=FXe(),fes=DVt(),MVt="Block collections are not allowed within flow collections",OVt=a(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function pes({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=n.start.source==="{",l=c?"flow map":"flow sequence",u=s?.nodeClass??(c?rwn.YAMLMap:les.YAMLSeq),d=new u(r.schema);d.flow=!0;let p=r.atRoot;p&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=n.offset+n.start.source.length;for(let E=0;E0){let E=ues.resolveEnd(A,y,r.options.strict,o);E.comment&&(d.comment?d.comment+=` -`+E.comment:d.comment=E.comment),d.range=[n.offset,y,E.offset]}else d.range=[n.offset,y,y];return d}a(pes,"resolveFlowCollection");iwn.resolveFlowCollection=pes});var awn=T(swn=>{"use strict";f();var hes=la(),mes=N0(),ges=R7(),Aes=P7(),yes=Xxn(),Ees=ewn(),Ces=own();function BVt(t,e,r,n,o,s){let c=r.type==="block-map"?yes.resolveBlockMap(t,e,r,n,s):r.type==="block-seq"?Ees.resolveBlockSeq(t,e,r,n,s):Ces.resolveFlowCollection(t,e,r,n,s),l=c.constructor;return o==="!"||o===l.tagName?(c.tag=l.tagName,c):(o&&(c.tag=o),c)}a(BVt,"resolveCollection");function _es(t,e,r,n,o){let s=n.tag,c=s?e.directives.tagName(s.source,m=>o(s,"TAG_RESOLVE_FAILED",m)):null;if(r.type==="block-seq"){let{anchor:m,newlineAfterProp:g}=n,A=m&&s?m.offset>s.offset?m:s:m??s;A&&(!g||g.offsetm.tag===c&&m.collection===l);if(!u){let m=e.schema.knownTags[c];if(m?.collection===l)e.schema.tags.push(Object.assign({},m,{default:!1})),u=m;else return m?o(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${l} collection, but expects ${m.collection??"scalar"}`,!0):o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),BVt(t,e,r,o,c)}let d=BVt(t,e,r,o,c,u),p=u.resolve?.(d,m=>o(s,"TAG_RESOLVE_FAILED",m),e.options)??d,h=hes.isNode(p)?p:new mes.Scalar(p);return h.range=d.range,h.tag=c,u?.format&&(h.format=u.format),h}a(_es,"composeCollection");swn.composeCollection=_es});var FVt=T(cwn=>{"use strict";f();var LVt=N0();function ves(t,e,r){let n=e.offset,o=bes(e,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};let s=o.mode===">"?LVt.Scalar.BLOCK_FOLDED:LVt.Scalar.BLOCK_LITERAL,c=e.source?Tes(e.source):[],l=c.length;for(let y=c.length-1;y>=0;--y){let E=c[y][1];if(E===""||E==="\r")l=y;else break}if(l===0){let y=o.chomp==="+"&&c.length>0?` +`}},"prettifyError");Vbe.YAMLError=$be;Vbe.YAMLParseError=YVt;Vbe.YAMLWarning=KVt;Vbe.prettifyError=zts});var zbe=T(qwn=>{"use strict";f();function Yts(t,{flow:e,indicator:r,next:n,offset:o,onError:s,parentIndent:c,startOnNewline:l}){let u=!1,d=l,p=l,h="",m="",g=!1,A=!1,y=null,E=null,_=null,v=null,b=null,I=null,x=null;for(let P of t)switch(A&&(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma"&&s(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),A=!1),y&&(d&&P.type!=="comment"&&P.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),P.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&P.source.includes(" ")&&(y=P),p=!0;break;case"comment":{p||s(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let k=P.source.substring(1)||" ";h?h+=m+k:h=k,m="",d=!1;break}case"newline":d?h?h+=P.source:(!I||r!=="seq-item-ind")&&(u=!0):m+=P.source,d=!0,g=!0,(E||_)&&(v=P),p=!0;break;case"anchor":E&&s(P,"MULTIPLE_ANCHORS","A node can have at most one anchor"),P.source.endsWith(":")&&s(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=P,x??(x=P.offset),d=!1,p=!1,A=!0;break;case"tag":{_&&s(P,"MULTIPLE_TAGS","A node can have at most one tag"),_=P,x??(x=P.offset),d=!1,p=!1,A=!0;break}case r:(E||_)&&s(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`),I&&s(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${e??"collection"}`),I=P,d=r==="seq-item-ind"||r==="explicit-key-ind",p=!1;break;case"comma":if(e){b&&s(P,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=P,d=!1,p=!1;break}default:s(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),d=!1,p=!1}let w=t[t.length-1],R=w?w.offset+w.source.length:o;return A&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(d&&y.indent<=c||n?.type==="block-map"||n?.type==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:I,spaceBefore:u,comment:h,hasNewline:g,anchor:E,tag:_,newlineAfterProp:v,end:R,start:x??R}}a(Yts,"resolveProps");qwn.resolveProps=Yts});var VJe=T(Gwn=>{"use strict";f();function JVt(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` +`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(JVt(e.key)||JVt(e.value))return!0}return!1;default:return!0}}a(JVt,"containsNewline");Gwn.containsNewline=JVt});var XVt=T(Hwn=>{"use strict";f();var Kts=VJe();function Jts(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&Kts.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}a(Jts,"flowIndentCheck");Hwn.flowIndentCheck=Jts});var ZVt=T($wn=>{"use strict";f();var jwn=na();function Xts(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let o=typeof n=="function"?n:(s,c)=>s===c||jwn.isScalar(s)&&jwn.isScalar(c)&&s.value===c.value;return e.some(s=>o(s.key,r))}a(Xts,"mapIncludes");$wn.mapIncludes=Xts});var Jwn=T(Kwn=>{"use strict";f();var Vwn=e7(),Zts=r7(),Wwn=zbe(),ers=VJe(),zwn=XVt(),trs=ZVt(),Ywn="All mapping items must start at the same column";function rrs({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=s?.nodeClass??Zts.YAMLMap,l=new c(r.schema);r.atRoot&&(r.atRoot=!1);let u=n.offset,d=null;for(let p of n.items){let{start:h,key:m,sep:g,value:A}=p,y=Wwn.resolveProps(h,{indicator:"explicit-key-ind",next:m??g?.[0],offset:u,onError:o,parentIndent:n.indent,startOnNewline:!0}),E=!y.found;if(E){if(m&&(m.type==="block-seq"?o(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==n.indent&&o(u,"BAD_INDENT",Ywn)),!y.anchor&&!y.tag&&!g){d=y.end,y.comment&&(l.comment?l.comment+=` +`+y.comment:l.comment=y.comment);continue}(y.newlineAfterProp||ers.containsNewline(m))&&o(m??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else y.found?.indent!==n.indent&&o(u,"BAD_INDENT",Ywn);r.atKey=!0;let _=y.end,v=m?t(r,m,y,o):e(r,_,h,null,y,o);r.schema.compat&&zwn.flowIndentCheck(n.indent,m,o),r.atKey=!1,trs.mapIncludes(r,l.items,v)&&o(_,"DUPLICATE_KEY","Map keys must be unique");let b=Wwn.resolveProps(g??[],{indicator:"map-value-ind",next:A,offset:v.range[2],onError:o,parentIndent:n.indent,startOnNewline:!m||m.type==="block-scalar"});if(u=b.end,b.found){E&&(A?.type==="block-map"&&!b.hasNewline&&o(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&y.start{"use strict";f();var nrs=n7(),irs=zbe(),ors=XVt();function srs({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=s?.nodeClass??nrs.YAMLSeq,l=new c(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset,d=null;for(let{start:p,value:h}of n.items){let m=irs.resolveProps(p,{indicator:"seq-item-ind",next:h,offset:u,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||h)h?.type==="block-seq"?o(m.end,"BAD_INDENT","All sequence items must start at the same column"):o(u,"MISSING_CHAR","Sequence item without - indicator");else{d=m.end,m.comment&&(l.comment=m.comment);continue}let g=h?t(r,h,m,o):e(r,m.end,p,null,m,o);r.schema.compat&&ors.flowIndentCheck(n.indent,h,o),u=g.range[2],l.items.push(g)}return l.range=[n.offset,u,d??u],l}a(srs,"resolveBlockSeq");Xwn.resolveBlockSeq=srs});var Tae=T(eRn=>{"use strict";f();function ars(t,e,r,n){let o="";if(t){let s=!1,c="";for(let l of t){let{source:u,type:d}=l;switch(d){case"space":s=!0;break;case"comment":{r&&!s&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=u.substring(1)||" ";o?o+=c+p:o=p,c="";break}case"newline":o&&(c+=u),s=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}e+=u.length}}return{comment:o,offset:e}}a(ars,"resolveEnd");eRn.resolveEnd=ars});var iRn=T(nRn=>{"use strict";f();var crs=na(),lrs=e7(),tRn=r7(),urs=n7(),drs=Tae(),rRn=zbe(),frs=VJe(),prs=ZVt(),eWt="Block collections are not allowed within flow collections",tWt=a(t=>t&&(t.type==="block-map"||t.type==="block-seq"),"isBlock");function hrs({composeNode:t,composeEmptyNode:e},r,n,o,s){let c=n.start.source==="{",l=c?"flow map":"flow sequence",u=s?.nodeClass??(c?tRn.YAMLMap:urs.YAMLSeq),d=new u(r.schema);d.flow=!0;let p=r.atRoot;p&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=n.offset+n.start.source.length;for(let E=0;E0){let E=drs.resolveEnd(A,y,r.options.strict,o);E.comment&&(d.comment?d.comment+=` +`+E.comment:d.comment=E.comment),d.range=[n.offset,y,E.offset]}else d.range=[n.offset,y,y];return d}a(hrs,"resolveFlowCollection");nRn.resolveFlowCollection=hrs});var sRn=T(oRn=>{"use strict";f();var mrs=na(),grs=x0(),Ars=r7(),yrs=n7(),Ers=Jwn(),_rs=Zwn(),Crs=iRn();function rWt(t,e,r,n,o,s){let c=r.type==="block-map"?Ers.resolveBlockMap(t,e,r,n,s):r.type==="block-seq"?_rs.resolveBlockSeq(t,e,r,n,s):Crs.resolveFlowCollection(t,e,r,n,s),l=c.constructor;return o==="!"||o===l.tagName?(c.tag=l.tagName,c):(o&&(c.tag=o),c)}a(rWt,"resolveCollection");function vrs(t,e,r,n,o){let s=n.tag,c=s?e.directives.tagName(s.source,m=>o(s,"TAG_RESOLVE_FAILED",m)):null;if(r.type==="block-seq"){let{anchor:m,newlineAfterProp:g}=n,A=m&&s?m.offset>s.offset?m:s:m??s;A&&(!g||g.offsetm.tag===c&&m.collection===l);if(!u){let m=e.schema.knownTags[c];if(m?.collection===l)e.schema.tags.push(Object.assign({},m,{default:!1})),u=m;else return m?o(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${l} collection, but expects ${m.collection??"scalar"}`,!0):o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),rWt(t,e,r,o,c)}let d=rWt(t,e,r,o,c,u),p=u.resolve?.(d,m=>o(s,"TAG_RESOLVE_FAILED",m),e.options)??d,h=mrs.isNode(p)?p:new grs.Scalar(p);return h.range=d.range,h.tag=c,u?.format&&(h.format=u.format),h}a(vrs,"composeCollection");oRn.composeCollection=vrs});var iWt=T(aRn=>{"use strict";f();var nWt=x0();function brs(t,e,r){let n=e.offset,o=Trs(e,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};let s=o.mode===">"?nWt.Scalar.BLOCK_FOLDED:nWt.Scalar.BLOCK_LITERAL,c=e.source?Srs(e.source):[],l=c.length;for(let y=c.length-1;y>=0;--y){let E=c[y][1];if(E===""||E==="\r")l=y;else break}if(l===0){let y=o.chomp==="+"&&c.length>0?` `.repeat(Math.max(1,c.length-1)):"",E=n+o.length;return e.source&&(E+=e.source.length),{value:y,type:s,comment:o.comment,range:[n,E,E]}}let u=e.indent+o.indent,d=e.offset+o.length,p=0;for(let y=0;yu&&(u=E.length);else{E.length=l;--y)c[y][0].length>u&&(l=y+1);let h="",m="",g=!1;for(let y=0;yu||_[0]===" "?(m===" "?m=` `:!g&&m===` `&&(m=` @@ -437,83 +437,83 @@ ${d} `+c[y][0].slice(u);h[h.length-1]!==` `&&(h+=` `);break;default:h+=` -`}let A=n+o.length+e.source.length;return{value:h,type:s,comment:o.comment,range:[n,A,A]}}a(ves,"resolveBlockScalar");function bes({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:o}=e[0],s=o[0],c=0,l="",u=-1;for(let m=1;m{"use strict";f();var UVt=N0(),Ses=uce();function Ies(t,e,r){let{offset:n,type:o,source:s,end:c}=t,l,u,d=a((m,g,A)=>r(n+m,g,A),"_onError");switch(o){case"scalar":l=UVt.Scalar.PLAIN,u=xes(s,d);break;case"single-quoted-scalar":l=UVt.Scalar.QUOTE_SINGLE,u=wes(s,d);break;case"double-quoted-scalar":l=UVt.Scalar.QUOTE_DOUBLE,u=Res(s,d);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let p=n+s.length,h=Ses.resolveEnd(c,p,e,r);return{value:u,type:l,comment:h.comment,range:[n,p,h.offset]}}a(Ies,"resolveFlowScalar");function xes(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),lwn(t)}a(xes,"plainValue");function wes(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),lwn(t.slice(1,-1)).replace(/''/g,"'")}a(wes,"singleQuotedValue");function lwn(t){let e,r;try{e=new RegExp(`(.*?)(?{"use strict";f();var oWt=x0(),Irs=Tae();function xrs(t,e,r){let{offset:n,type:o,source:s,end:c}=t,l,u,d=a((m,g,A)=>r(n+m,g,A),"_onError");switch(o){case"scalar":l=oWt.Scalar.PLAIN,u=wrs(s,d);break;case"single-quoted-scalar":l=oWt.Scalar.QUOTE_SINGLE,u=Rrs(s,d);break;case"double-quoted-scalar":l=oWt.Scalar.QUOTE_DOUBLE,u=Prs(s,d);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let p=n+s.length,h=Irs.resolveEnd(c,p,e,r);return{value:u,type:l,comment:h.comment,range:[n,p,h.offset]}}a(xrs,"resolveFlowScalar");function wrs(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),cRn(t)}a(wrs,"plainValue");function Rrs(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),cRn(t.slice(1,-1)).replace(/''/g,"'")}a(Rrs,"singleQuotedValue");function cRn(t){let e,r;try{e=new RegExp(`(.*?)(?s?t.slice(s,n+1):o)}else r+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}a(Res,"doubleQuotedValue");function Pes(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===` +`)&&(r+=n>s?t.slice(s,n+1):o)}else r+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}a(Prs,"doubleQuotedValue");function krs(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===` `||n==="\r")&&!(n==="\r"&&t[e+2]!==` `);)n===` `&&(r+=` -`),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}a(Pes,"foldNewline");var kes={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Nes(t,e,r,n){let o=t.substr(e,r),c=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){let l=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(c)}a(Nes,"parseCharCode");uwn.resolveFlowScalar=Ies});var pwn=T(fwn=>{"use strict";f();var az=la(),dwn=N0(),Des=FVt(),Mes=QVt();function Oes(t,e,r,n){let{value:o,type:s,comment:c,range:l}=e.type==="block-scalar"?Des.resolveBlockScalar(t,e,n):Mes.resolveFlowScalar(e,t.options.strict,n),u=r?t.directives.tagName(r.source,h=>n(r,"TAG_RESOLVE_FAILED",h)):null,d;t.options.stringKeys&&t.atKey?d=t.schema[az.SCALAR]:u?d=Bes(t.schema,o,u,r,n):e.type==="scalar"?d=Les(t,o,e,n):d=t.schema[az.SCALAR];let p;try{let h=d.resolve(o,m=>n(r??e,"TAG_RESOLVE_FAILED",m),t.options);p=az.isScalar(h)?h:new dwn.Scalar(h)}catch(h){let m=h instanceof Error?h.message:String(h);n(r??e,"TAG_RESOLVE_FAILED",m),p=new dwn.Scalar(o)}return p.range=l,p.source=o,s&&(p.type=s),u&&(p.tag=u),d.format&&(p.format=d.format),c&&(p.comment=c),p}a(Oes,"composeScalar");function Bes(t,e,r,n,o){if(r==="!")return t[az.SCALAR];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===r)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if(l.test?.test(e))return l;let c=t.knownTags[r];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[az.SCALAR])}a(Bes,"findScalarTagByName");function Les({atKey:t,directives:e,schema:r},n,o,s){let c=r.tags.find(l=>(l.default===!0||t&&l.default==="key")&&l.test?.test(n))||r[az.SCALAR];if(r.compat){let l=r.compat.find(u=>u.default&&u.test?.test(n))??r[az.SCALAR];if(c.tag!==l.tag){let u=e.tagString(c.tag),d=e.tagString(l.tag),p=`Value may be parsed as either ${u} or ${d}`;s(o,"TAG_RESOLVE_FAILED",p,!0)}}return c}a(Les,"findScalarTagByTest");fwn.composeScalar=Oes});var mwn=T(hwn=>{"use strict";f();function Fes(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let o=e[n];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++n];o?.type==="space";)t+=o.source.length,o=e[++n];break}}return t}a(Fes,"emptyScalarPosition");hwn.emptyScalarPosition=Fes});var ywn=T(GVt=>{"use strict";f();var Ues=PTe(),Qes=la(),qes=awn(),gwn=pwn(),Ges=uce(),Hes=mwn(),jes={composeNode:Awn,composeEmptyNode:qVt};function Awn(t,e,r,n){let o=t.atKey,{spaceBefore:s,comment:c,anchor:l,tag:u}=r,d,p=!0;switch(e.type){case"alias":d=$es(t,e,n),(l||u)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=gwn.composeScalar(t,e,u,n),l&&(d.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{d=qes.composeCollection(jes,t,e,r,n),l&&(d.anchor=l.source.substring(1))}catch(h){let m=h instanceof Error?h.message:String(h);n(e,"RESOURCE_EXHAUSTION",m)}break;default:{let h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",h),p=!1}}return d??(d=qVt(t,e.offset,void 0,null,r,n)),l&&d.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Qes.isScalar(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&n(u??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(d.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?d.comment=c:d.commentBefore=c),t.options.keepSourceTokens&&p&&(d.srcToken=e),d}a(Awn,"composeNode");function qVt(t,e,r,n,{spaceBefore:o,comment:s,anchor:c,tag:l,end:u},d){let p={type:"scalar",offset:Hes.emptyScalarPosition(e,r,n),indent:-1,source:""},h=gwn.composeScalar(t,p,l,d);return c&&(h.anchor=c.source.substring(1),h.anchor===""&&d(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=u),h}a(qVt,"composeEmptyNode");function $es({options:t},{offset:e,source:r,end:n},o){let s=new Ues.Alias(r.substring(1));s.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let c=e+r.length,l=Ges.resolveEnd(n,c,t.strict,o);return s.range=[e,c,l.offset],l.comment&&(s.comment=l.comment),s}a($es,"composeAlias");GVt.composeEmptyNode=qVt;GVt.composeNode=Awn});var _wn=T(Cwn=>{"use strict";f();var Ves=WTe(),Ewn=ywn(),Wes=uce(),zes=JTe();function Yes(t,e,{offset:r,start:n,value:o,end:s},c){let l=Object.assign({_directives:e},t),u=new Ves.Document(void 0,l),d={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},p=zes.resolveProps(n,{indicator:"doc-start",next:o??s?.[0],offset:r,onError:c,parentIndent:0,startOnNewline:!0});p.found&&(u.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!p.hasNewline&&c(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=o?Ewn.composeNode(d,o,p,c):Ewn.composeEmptyNode(d,p.end,n,null,p,c);let h=u.contents.range[2],m=Wes.resolveEnd(s,h,!1,c);return m.comment&&(u.comment=m.comment),u.range=[r,h,m.offset],u}a(Yes,"composeDoc");Cwn.composeDoc=Yes});var jVt=T(Twn=>{"use strict";f();var Kes=require("process"),Jes=R$t(),Xes=WTe(),XTe=KTe(),vwn=la(),Zes=_wn(),ets=uce();function ZTe(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}a(ZTe,"getErrorPos");function bwn(t){let e="",r=!1,n=!1;for(let o=0;o{"use strict";f();var hW=na(),uRn=x0(),Mrs=iWt(),Ors=sWt();function Brs(t,e,r,n){let{value:o,type:s,comment:c,range:l}=e.type==="block-scalar"?Mrs.resolveBlockScalar(t,e,n):Ors.resolveFlowScalar(e,t.options.strict,n),u=r?t.directives.tagName(r.source,h=>n(r,"TAG_RESOLVE_FAILED",h)):null,d;t.options.stringKeys&&t.atKey?d=t.schema[hW.SCALAR]:u?d=Lrs(t.schema,o,u,r,n):e.type==="scalar"?d=Frs(t,o,e,n):d=t.schema[hW.SCALAR];let p;try{let h=d.resolve(o,m=>n(r??e,"TAG_RESOLVE_FAILED",m),t.options);p=hW.isScalar(h)?h:new uRn.Scalar(h)}catch(h){let m=h instanceof Error?h.message:String(h);n(r??e,"TAG_RESOLVE_FAILED",m),p=new uRn.Scalar(o)}return p.range=l,p.source=o,s&&(p.type=s),u&&(p.tag=u),d.format&&(p.format=d.format),c&&(p.comment=c),p}a(Brs,"composeScalar");function Lrs(t,e,r,n,o){if(r==="!")return t[hW.SCALAR];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===r)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if(l.test?.test(e))return l;let c=t.knownTags[r];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[hW.SCALAR])}a(Lrs,"findScalarTagByName");function Frs({atKey:t,directives:e,schema:r},n,o,s){let c=r.tags.find(l=>(l.default===!0||t&&l.default==="key")&&l.test?.test(n))||r[hW.SCALAR];if(r.compat){let l=r.compat.find(u=>u.default&&u.test?.test(n))??r[hW.SCALAR];if(c.tag!==l.tag){let u=e.tagString(c.tag),d=e.tagString(l.tag),p=`Value may be parsed as either ${u} or ${d}`;s(o,"TAG_RESOLVE_FAILED",p,!0)}}return c}a(Frs,"findScalarTagByTest");dRn.composeScalar=Brs});var hRn=T(pRn=>{"use strict";f();function Urs(t,e,r){if(e){r??(r=e.length);for(let n=r-1;n>=0;--n){let o=e[n];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++n];o?.type==="space";)t+=o.source.length,o=e[++n];break}}return t}a(Urs,"emptyScalarPosition");pRn.emptyScalarPosition=Urs});var ARn=T(cWt=>{"use strict";f();var Qrs=xbe(),qrs=na(),Grs=sRn(),mRn=fRn(),Hrs=Tae(),jrs=hRn(),$rs={composeNode:gRn,composeEmptyNode:aWt};function gRn(t,e,r,n){let o=t.atKey,{spaceBefore:s,comment:c,anchor:l,tag:u}=r,d,p=!0;switch(e.type){case"alias":d=Vrs(t,e,n),(l||u)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=mRn.composeScalar(t,e,u,n),l&&(d.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{d=Grs.composeCollection($rs,t,e,r,n),l&&(d.anchor=l.source.substring(1))}catch(h){let m=h instanceof Error?h.message:String(h);n(e,"RESOURCE_EXHAUSTION",m)}break;default:{let h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",h),p=!1}}return d??(d=aWt(t,e.offset,void 0,null,r,n)),l&&d.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!qrs.isScalar(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&n(u??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(d.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?d.comment=c:d.commentBefore=c),t.options.keepSourceTokens&&p&&(d.srcToken=e),d}a(gRn,"composeNode");function aWt(t,e,r,n,{spaceBefore:o,comment:s,anchor:c,tag:l,end:u},d){let p={type:"scalar",offset:jrs.emptyScalarPosition(e,r,n),indent:-1,source:""},h=mRn.composeScalar(t,p,l,d);return c&&(h.anchor=c.source.substring(1),h.anchor===""&&d(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=u),h}a(aWt,"composeEmptyNode");function Vrs({options:t},{offset:e,source:r,end:n},o){let s=new Qrs.Alias(r.substring(1));s.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&o(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let c=e+r.length,l=Hrs.resolveEnd(n,c,t.strict,o);return s.range=[e,c,l.offset],l.comment&&(s.comment=l.comment),s}a(Vrs,"composeAlias");cWt.composeEmptyNode=aWt;cWt.composeNode=gRn});var _Rn=T(ERn=>{"use strict";f();var Wrs=jbe(),yRn=ARn(),zrs=Tae(),Yrs=zbe();function Krs(t,e,{offset:r,start:n,value:o,end:s},c){let l=Object.assign({_directives:e},t),u=new Wrs.Document(void 0,l),d={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},p=Yrs.resolveProps(n,{indicator:"doc-start",next:o??s?.[0],offset:r,onError:c,parentIndent:0,startOnNewline:!0});p.found&&(u.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!p.hasNewline&&c(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=o?yRn.composeNode(d,o,p,c):yRn.composeEmptyNode(d,p.end,n,null,p,c);let h=u.contents.range[2],m=zrs.resolveEnd(s,h,!1,c);return m.comment&&(u.comment=m.comment),u.range=[r,h,m.offset],u}a(Krs,"composeDoc");ERn.composeDoc=Krs});var uWt=T(bRn=>{"use strict";f();var Jrs=require("process"),Xrs=Y$t(),Zrs=jbe(),Ybe=Wbe(),CRn=na(),ens=_Rn(),tns=Tae();function Kbe(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}a(Kbe,"getErrorPos");function vRn(t){let e="",r=!1,n=!1;for(let o=0;o{let c=ZTe(r);s?this.warnings.push(new XTe.YAMLWarning(c,n,o)):this.errors.push(new XTe.YAMLParseError(c,n,o))},this.directives=new Jes.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:o}=bwn(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment} -${n}`:n;else if(o||e.directives.docStart||!s)e.commentBefore=n;else if(vwn.isCollection(s)&&!s.flow&&s.items.length>0){let c=s.items[0];vwn.isPair(c)&&(c=c.key);let l=c.commentBefore;c.commentBefore=l?`${n} +`)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[o+1]?.[0]!=="#"&&(o+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}a(vRn,"parsePrelude");var lWt=class{static{a(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,o,s)=>{let c=Kbe(r);s?this.warnings.push(new Ybe.YAMLWarning(c,n,o)):this.errors.push(new Ybe.YAMLParseError(c,n,o))},this.directives=new Xrs.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:o}=vRn(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment} +${n}`:n;else if(o||e.directives.docStart||!s)e.commentBefore=n;else if(CRn.isCollection(s)&&!s.flow&&s.items.length>0){let c=s.items[0];CRn.isPair(c)&&(c=c.key);let l=c.commentBefore;c.commentBefore=l?`${n} ${l}`:n}else{let c=s.commentBefore;s.commentBefore=c?`${n} -${c}`:n}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bwn(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let o of e)yield*this.next(o);yield*this.end(r,n)}*next(e){switch(Kes.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,n,o)=>{let s=ZTe(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Zes.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new XTe.YAMLParseError(ZTe(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new XTe.YAMLParseError(ZTe(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=ets.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n} -${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new XTe.YAMLParseError(ZTe(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),o=new Xes.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,r,r],this.decorate(o,!1),yield o}}};Twn.Composer=HVt});var xwn=T(UXe=>{"use strict";f();var tts=FVt(),rts=QVt(),nts=KTe(),Swn=OTe();function its(t,e=!0,r){if(t){let n=a((o,s,c)=>{let l=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(r)r(l,s,c);else throw new nts.YAMLParseError([l,l+1],s,c)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return rts.resolveFlowScalar(t,e,n);case"block-scalar":return tts.resolveBlockScalar({options:{strict:e}},t,n)}}return null}a(its,"resolveAsScalar");function ots(t,e){let{implicitKey:r=!1,indent:n,inFlow:o=!1,offset:s=-1,type:c="PLAIN"}=e,l=Swn.stringifyString({type:c,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=e.end??[{type:"newline",offset:-1,indent:n,source:` +${c}`:n}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:vRn(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let o of e)yield*this.next(o);yield*this.end(r,n)}*next(e){switch(Jrs.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,n,o)=>{let s=Kbe(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=ens.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Ybe.YAMLParseError(Kbe(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Ybe.YAMLParseError(Kbe(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=tns.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n} +${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Ybe.YAMLParseError(Kbe(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),o=new Zrs.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,r,r],this.decorate(o,!1),yield o}}};bRn.Composer=lWt});var IRn=T(WJe=>{"use strict";f();var rns=iWt(),nns=sWt(),ins=Wbe(),TRn=Dbe();function ons(t,e=!0,r){if(t){let n=a((o,s,c)=>{let l=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(r)r(l,s,c);else throw new ins.YAMLParseError([l,l+1],s,c)},"_onError");switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return nns.resolveFlowScalar(t,e,n);case"block-scalar":return rns.resolveBlockScalar({options:{strict:e}},t,n)}}return null}a(ons,"resolveAsScalar");function sns(t,e){let{implicitKey:r=!1,indent:n,inFlow:o=!1,offset:s=-1,type:c="PLAIN"}=e,l=TRn.stringifyString({type:c,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=e.end??[{type:"newline",offset:-1,indent:n,source:` `}];switch(l[0]){case"|":case">":{let d=l.indexOf(` `),p=l.substring(0,d),h=l.substring(d+1)+` -`,m=[{type:"block-scalar-header",offset:s,indent:n,source:p}];return Iwn(m,u)||m.push({type:"newline",offset:-1,indent:n,source:` -`}),{type:"block-scalar",offset:s,indent:n,props:m,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:u};default:return{type:"scalar",offset:s,indent:n,source:l,end:u}}}a(ots,"createScalarToken");function sts(t,e,r={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:c}=r,l="indent"in t?t.indent:null;if(n&&typeof l=="number"&&(l+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let d=t.props[0];if(d.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let u=Swn.stringifyString({type:c,value:e},{implicitKey:o||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(u[0]){case"|":case">":ats(t,u);break;case'"':$Vt(t,u,"double-quoted-scalar");break;case"'":$Vt(t,u,"single-quoted-scalar");break;default:$Vt(t,u,"scalar")}}a(sts,"setScalarValue");function ats(t,e){let r=e.indexOf(` +`,m=[{type:"block-scalar-header",offset:s,indent:n,source:p}];return SRn(m,u)||m.push({type:"newline",offset:-1,indent:n,source:` +`}),{type:"block-scalar",offset:s,indent:n,props:m,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:l,end:u};default:return{type:"scalar",offset:s,indent:n,source:l,end:u}}}a(sns,"createScalarToken");function ans(t,e,r={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:s=!1,type:c}=r,l="indent"in t?t.indent:null;if(n&&typeof l=="number"&&(l+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let d=t.props[0];if(d.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let u=TRn.stringifyString({type:c,value:e},{implicitKey:o||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(u[0]){case"|":case">":cns(t,u);break;case'"':dWt(t,u,"double-quoted-scalar");break;case"'":dWt(t,u,"single-quoted-scalar");break;default:dWt(t,u,"scalar")}}a(ans,"setScalarValue");function cns(t,e){let r=e.indexOf(` `),n=e.substring(0,r),o=e.substring(r+1)+` -`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=o}else{let{offset:s}=t,c="indent"in t?t.indent:-1,l=[{type:"block-scalar-header",offset:s,indent:c,source:n}];Iwn(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:c,source:` -`});for(let u of Object.keys(t))u!=="type"&&u!=="offset"&&delete t[u];Object.assign(t,{type:"block-scalar",indent:c,props:l,source:o})}}a(ats,"setBlockScalarValue");function Iwn(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}a(Iwn,"addEndtoBlockProps");function $Vt(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(let s of n)s.offset+=o;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:` -`};delete t.items,Object.assign(t,{type:r,source:e,end:[o]});break}default:{let n="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:o})}}}a($Vt,"setFlowScalarValue");UXe.createScalarToken=ots;UXe.resolveAsScalar=its;UXe.setScalarValue=sts});var Rwn=T(wwn=>{"use strict";f();var cts=a(t=>"type"in t?qXe(t):QXe(t),"stringify");function qXe(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=qXe(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=QXe(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=QXe(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=QXe(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}a(qXe,"stringifyToken");function QXe({start:t,key:e,sep:r,value:n}){let o="";for(let s of t)o+=s.source;if(e&&(o+=qXe(e)),r)for(let s of r)o+=s.source;return n&&(o+=qXe(n)),o}a(QXe,"stringifyItem");wwn.stringify=cts});var Dwn=T(Nwn=>{"use strict";f();var VVt=Symbol("break visit"),lts=Symbol("skip children"),Pwn=Symbol("remove item");function cz(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),kwn(Object.freeze([]),t,e)}a(cz,"visit");cz.BREAK=VVt;cz.SKIP=lts;cz.REMOVE=Pwn;cz.itemAtPath=(t,e)=>{let r=t;for(let[n,o]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[o];else return}return r};cz.parentCollection=(t,e)=>{let r=cz.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],o=r?.[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function kwn(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let o of["key","value"]){let s=e[o];if(s&&"items"in s){for(let c=0;c{"use strict";f();var WVt=xwn(),uts=Rwn(),dts=Dwn(),zVt="\uFEFF",YVt="",KVt="",JVt="",fts=a(t=>!!t&&"items"in t,"isCollection"),pts=a(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function hts(t){switch(t){case zVt:return"";case YVt:return"";case KVt:return"";case JVt:return"";default:return JSON.stringify(t)}}a(hts,"prettyToken");function mts(t){switch(t){case zVt:return"byte-order-mark";case YVt:return"doc-mode";case KVt:return"flow-error-end";case JVt:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=o}else{let{offset:s}=t,c="indent"in t?t.indent:-1,l=[{type:"block-scalar-header",offset:s,indent:c,source:n}];SRn(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:c,source:` +`});for(let u of Object.keys(t))u!=="type"&&u!=="offset"&&delete t[u];Object.assign(t,{type:"block-scalar",indent:c,props:l,source:o})}}a(cns,"setBlockScalarValue");function SRn(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}a(SRn,"addEndtoBlockProps");function dWt(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(let s of n)s.offset+=o;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:` +`};delete t.items,Object.assign(t,{type:r,source:e,end:[o]});break}default:{let n="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:o})}}}a(dWt,"setFlowScalarValue");WJe.createScalarToken=sns;WJe.resolveAsScalar=ons;WJe.setScalarValue=ans});var wRn=T(xRn=>{"use strict";f();var lns=a(t=>"type"in t?YJe(t):zJe(t),"stringify");function YJe(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=YJe(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=zJe(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=zJe(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=zJe(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}a(YJe,"stringifyToken");function zJe({start:t,key:e,sep:r,value:n}){let o="";for(let s of t)o+=s.source;if(e&&(o+=YJe(e)),r)for(let s of r)o+=s.source;return n&&(o+=YJe(n)),o}a(zJe,"stringifyItem");xRn.stringify=lns});var DRn=T(kRn=>{"use strict";f();var fWt=Symbol("break visit"),uns=Symbol("skip children"),RRn=Symbol("remove item");function mW(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),PRn(Object.freeze([]),t,e)}a(mW,"visit");mW.BREAK=fWt;mW.SKIP=uns;mW.REMOVE=RRn;mW.itemAtPath=(t,e)=>{let r=t;for(let[n,o]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[o];else return}return r};mW.parentCollection=(t,e)=>{let r=mW.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],o=r?.[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function PRn(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let o of["key","value"]){let s=e[o];if(s&&"items"in s){for(let c=0;c{"use strict";f();var pWt=IRn(),dns=wRn(),fns=DRn(),hWt="\uFEFF",mWt="",gWt="",AWt="",pns=a(t=>!!t&&"items"in t,"isCollection"),hns=a(t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar"),"isScalar");function mns(t){switch(t){case hWt:return"";case mWt:return"";case gWt:return"";case AWt:return"";default:return JSON.stringify(t)}}a(mns,"prettyToken");function gns(t){switch(t){case hWt:return"byte-order-mark";case mWt:return"doc-mode";case gWt:return"flow-error-end";case AWt:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `:case`\r -`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}a(mts,"tokenType");zC.createScalarToken=WVt.createScalarToken;zC.resolveAsScalar=WVt.resolveAsScalar;zC.setScalarValue=WVt.setScalarValue;zC.stringify=uts.stringify;zC.visit=dts.visit;zC.BOM=zVt;zC.DOCUMENT=YVt;zC.FLOW_END=KVt;zC.SCALAR=JVt;zC.isCollection=fts;zC.isScalar=pts;zC.prettyToken=hts;zC.tokenType=mts});var eWt=T(Own=>{"use strict";f();var eSe=GXe();function zw(t){switch(t){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}a(zw,"isEmpty");var Mwn=new Set("0123456789ABCDEFabcdef"),gts=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),HXe=new Set(",[]{}"),Ats=new Set(` ,[]{} -\r `),XVt=a(t=>!t||Ats.has(t),"isNotAnchorChar"),ZVt=class{static{a(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===` +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}a(gns,"tokenType");B_.createScalarToken=pWt.createScalarToken;B_.resolveAsScalar=pWt.resolveAsScalar;B_.setScalarValue=pWt.setScalarValue;B_.stringify=dns.stringify;B_.visit=fns.visit;B_.BOM=hWt;B_.DOCUMENT=mWt;B_.FLOW_END=gWt;B_.SCALAR=AWt;B_.isCollection=pns;B_.isScalar=hns;B_.prettyToken=mns;B_.tokenType=gns});var _Wt=T(MRn=>{"use strict";f();var Jbe=KJe();function Lw(t){switch(t){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}a(Lw,"isEmpty");var NRn=new Set("0123456789ABCDEFabcdef"),Ans=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),JJe=new Set(",[]{}"),yns=new Set(` ,[]{} +\r `),yWt=a(t=>!t||yns.has(t),"isNotAnchorChar"),EWt=class{static{a(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===` `?!0:r==="\r"?this.buffer[e+1]===` `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let o=this.buffer[n+e+1];if(o===` `||!o&&!this.atEnd)return e+n+1}return r===` -`||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&zw(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!zw(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&zw(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(XVt),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Lw(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!Lw(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Lw(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(yWt),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>zw(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case` +`,s)}o!==-1&&(r=o-(n[o-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Lw(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case` `:e=s,r=0;break;case"\r":{let c=this.buffer[s+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===` `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(` `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(n=this.buffer[o];n===" ";)n=this.buffer[++o];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` `;)n=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let s=e-1,c=this.buffer[s];c==="\r"&&(c=this.buffer[--s]);let l=s;for(;c===" ";)c=this.buffer[--s];if(c===` -`&&s>=this.pos&&s+1+r>l)e=s;else break}while(!0);return yield eSe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,o;for(;o=this.buffer[++n];)if(o===":"){let s=this.buffer[n+1];if(zw(s)||e&&HXe.has(s))break;r=n}else if(zw(o)){let s=this.buffer[n+1];if(o==="\r"&&(s===` +`&&s>=this.pos&&s+1+r>l)e=s;else break}while(!0);return yield Jbe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,o;for(;o=this.buffer[++n];)if(o===":"){let s=this.buffer[n+1];if(Lw(s)||e&&JJe.has(s))break;r=n}else if(Lw(o)){let s=this.buffer[n+1];if(o==="\r"&&(s===` `?(n+=1,o=` -`,s=this.buffer[n+1]):r=n),s==="#"||e&&HXe.has(s))break;if(o===` -`){let c=this.continueScalar(n+1);if(c===-1)break;n=Math.max(n,c-2)}}else{if(e&&HXe.has(o))break;r=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield eSe.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(XVt))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(zw(r)||e&&HXe.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!zw(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(gts.has(r))r=this.buffer[++e];else if(r==="%"&&Mwn.has(this.buffer[e+1])&&Mwn.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` +`,s=this.buffer[n+1]):r=n),s==="#"||e&&JJe.has(s))break;if(o===` +`){let c=this.continueScalar(n+1);if(c===-1)break;n=Math.max(n,c-2)}}else{if(e&&JJe.has(o))break;r=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Jbe.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(yWt))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(Lw(r)||e&&JJe.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Lw(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(Ans.has(r))r=this.buffer[++e];else if(r==="%"&&NRn.has(this.buffer[e+1])&&NRn.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let o=r-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=r),o}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};Own.Lexer=ZVt});var rWt=T(Bwn=>{"use strict";f();var tWt=class{static{a(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[s]{"use strict";f();var yts=require("process"),Lwn=GXe(),Ets=eWt();function k7(t,e){for(let r=0;r=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}a(dce,"getFirstKeyStartProps");function Uwn(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!k7(e.start,"explicit-key-ind")&&!k7(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Qwn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}a(Uwn,"fixFlowSeqItems");var nWt=class{static{a(this,"Parser")}constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ets.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,yts.env.LOG_TOKENS&&console.log("|",Lwn.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=Lwn.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&Uwn(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=r;else{Object.assign(o,{key:r,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{let o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:r}):o.value=r;break}case"flow-collection":{let o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:r,sep:[]}):o.sep?o.value=r:Object.assign(o,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let o=r.items[r.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Fwn(o.start)===-1&&(r.indent===0||o.start.every(s=>s.type!=="comment"||s.indent0&&(yield this.buffer.substr(this.pos,o),this.pos=r),o}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};MRn.Lexer=EWt});var vWt=T(ORn=>{"use strict";f();var CWt=class{static{a(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r>1;this.lineStarts[s]{"use strict";f();var Ens=require("process"),BRn=KJe(),_ns=_Wt();function i7(t,e){for(let r=0;r=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}a(Sae,"getFirstKeyStartProps");function FRn(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!i7(e.start,"explicit-key-ind")&&!i7(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,URn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}a(FRn,"fixFlowSeqItems");var bWt=class{static{a(this,"Parser")}constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new _ns.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,Ens.env.LOG_TOKENS&&console.log("|",BRn.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=BRn.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&FRn(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=r;else{Object.assign(o,{key:r,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{let o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:r}):o.value=r;break}case"flow-collection":{let o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:r,sep:[]}):o.sep?o.value=r:Object.assign(o,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let o=r.items[r.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&LRn(o.start)===-1&&(r.indent===0||o.start.every(s=>s.type!=="comment"||s.indent=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,o=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(o&&r.sep&&!r.value){let c=[];for(let l=0;le.indent&&(c.length=0);break;default:c.length=0}}c.length>=2&&(s=r.sep.splice(c[1]))}switch(this.type){case"anchor":case"tag":o||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):o||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(k7(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Qwn(r.key)&&!k7(r.sep,"newline")){let c=dce(r.start),l=r.key,u=r.sep;u.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:l,sep:u}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(k7(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let c=dce(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||o?e.items.push({start:s,key:null,sep:[this.sourceToken]}):k7(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);o||r.value?(e.items.push({start:s,key:c,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(c):(Object.assign(r,{key:c,sep:[]}),this.onKeyLine=!0);return}default:{let c=this.startBlockValue(e);if(c){if(c.type==="block-seq"){if(!r.explicitKey&&r.sep&&!k7(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(c);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let o=e.items[e.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,r.start),o.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||k7(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:o,sep:[]}):r.sep?this.stack.push(o):Object.assign(r,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let o=jXe(n),s=dce(o);Uwn(e);let c=e.end.splice(1,e.end.length);c.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(` +`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let o=e.items[e.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,r.start),o.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,o=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(o&&r.sep&&!r.value){let c=[];for(let l=0;le.indent&&(c.length=0);break;default:c.length=0}}c.length>=2&&(s=r.sep.splice(c[1]))}switch(this.type){case"anchor":case"tag":o||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):o||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(i7(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(URn(r.key)&&!i7(r.sep,"newline")){let c=Sae(r.start),l=r.key,u=r.sep;u.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:l,sep:u}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(i7(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let c=Sae(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||o?e.items.push({start:s,key:null,sep:[this.sourceToken]}):i7(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);o||r.value?(e.items.push({start:s,key:c,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(c):(Object.assign(r,{key:c,sep:[]}),this.onKeyLine=!0);return}default:{let c=this.startBlockValue(e);if(c){if(c.type==="block-seq"){if(!r.explicitKey&&r.sep&&!i7(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:s});this.stack.push(c);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let o=e.items[e.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,r.start),o.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||i7(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:o,sep:[]}):r.sep?this.stack.push(o):Object.assign(r,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let o=XJe(n),s=Sae(o);FRn(e);let c=e.end.splice(1,e.end.length);c.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(` `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(` -`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=jXe(e),n=dce(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=jXe(e),n=dce(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};qwn.Parser=nWt});var Vwn=T(rSe=>{"use strict";f();var Gwn=jVt(),Cts=WTe(),tSe=KTe(),_ts=G$t(),vts=la(),bts=rWt(),Hwn=iWt();function jwn(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new bts.LineCounter||null,prettyErrors:e}}a(jwn,"parseOptions");function Tts(t,e={}){let{lineCounter:r,prettyErrors:n}=jwn(e),o=new Hwn.Parser(r?.addNewLine),s=new Gwn.Composer(e),c=Array.from(s.compose(o.parse(t)));if(n&&r)for(let l of c)l.errors.forEach(tSe.prettifyError(t,r)),l.warnings.forEach(tSe.prettifyError(t,r));return c.length>0?c:Object.assign([],{empty:!0},s.streamInfo())}a(Tts,"parseAllDocuments");function $wn(t,e={}){let{lineCounter:r,prettyErrors:n}=jwn(e),o=new Hwn.Parser(r?.addNewLine),s=new Gwn.Composer(e),c=null;for(let l of s.compose(o.parse(t),!0,t.length))if(!c)c=l;else if(c.options.logLevel!=="silent"){c.errors.push(new tSe.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(c.errors.forEach(tSe.prettifyError(t,r)),c.warnings.forEach(tSe.prettifyError(t,r))),c}a($wn,"parseDocument");function Sts(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let o=$wn(t,r);if(!o)return null;if(o.warnings.forEach(s=>_ts.warn(o.options.logLevel,s)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},r))}a(Sts,"parse");function Its(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let o=Math.round(r);r=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){let{keepUndefined:o}=r??e??{};if(!o)return}return vts.isDocument(t)&&!n?t.toString(r):new Cts.Document(t,n,r).toString(r)}a(Its,"stringify");rSe.parse=Sts;rSe.parseAllDocuments=Tts;rSe.parseDocument=$wn;rSe.stringify=Its});var zwn=T(Wa=>{"use strict";f();var xts=jVt(),wts=WTe(),Rts=TVt(),oWt=KTe(),Pts=PTe(),N7=la(),kts=x7(),Nts=N0(),Dts=R7(),Mts=P7(),Ots=GXe(),Bts=eWt(),Lts=rWt(),Fts=iWt(),$Xe=Vwn(),Wwn=ITe();Wa.Composer=xts.Composer;Wa.Document=wts.Document;Wa.Schema=Rts.Schema;Wa.YAMLError=oWt.YAMLError;Wa.YAMLParseError=oWt.YAMLParseError;Wa.YAMLWarning=oWt.YAMLWarning;Wa.Alias=Pts.Alias;Wa.isAlias=N7.isAlias;Wa.isCollection=N7.isCollection;Wa.isDocument=N7.isDocument;Wa.isMap=N7.isMap;Wa.isNode=N7.isNode;Wa.isPair=N7.isPair;Wa.isScalar=N7.isScalar;Wa.isSeq=N7.isSeq;Wa.Pair=kts.Pair;Wa.Scalar=Nts.Scalar;Wa.YAMLMap=Dts.YAMLMap;Wa.YAMLSeq=Mts.YAMLSeq;Wa.CST=Ots;Wa.Lexer=Bts.Lexer;Wa.LineCounter=Lts.LineCounter;Wa.Parser=Fts.Parser;Wa.parse=$Xe.parse;Wa.parseAllDocuments=$Xe.parseAllDocuments;Wa.parseDocument=$Xe.parseDocument;Wa.stringify=$Xe.stringify;Wa.visit=Wwn.visit;Wa.visitAsync=Wwn.visitAsync});var Ywn=T(VXe=>{"use strict";f();Object.defineProperty(VXe,"__esModule",{value:!0});VXe.FetchCancellationError=void 0;var Uts=es(),sWt=class extends Uts.CancellationError{static{a(this,"FetchCancellationError")}constructor(e){super(),this.extraInformation=e}};VXe.FetchCancellationError=sWt});var Mo=T(D7=>{"use strict";f();Object.defineProperty(D7,"__esModule",{value:!0});D7.IInstantiationService=D7._util=void 0;D7.createDecorator=Kwn;D7.refineServiceDecorator=qts;var q4;(function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies";function e(r){return r[t.DI_DEPENDENCIES]||[]}a(e,"getServiceDependencies"),t.getServiceDependencies=e})(q4||(D7._util=q4={}));D7.IInstantiationService=Kwn("instantiationService");function Qts(t,e,r){e[q4.DI_TARGET]===e?e[q4.DI_DEPENDENCIES].push({id:t,index:r}):(e[q4.DI_DEPENDENCIES]=[{id:t,index:r}],e[q4.DI_TARGET]=e)}a(Qts,"storeServiceDependency");function Kwn(t){if(q4.serviceIds.has(t))return q4.serviceIds.get(t);let e=a(function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Qts(e,r,o)},"id");return e.toString=()=>t,q4.serviceIds.set(t,e),e}a(Kwn,"createDecorator");function qts(t){return t}a(qts,"refineServiceDecorator")});var zXe=T(WXe=>{"use strict";f();Object.defineProperty(WXe,"__esModule",{value:!0});WXe.SyncDescriptor=void 0;var aWt=class{static{a(this,"SyncDescriptor")}constructor(e,r=[],n=!1){this.ctor=e,this.staticArguments=r,this.supportsDelayedInstantiation=n}};WXe.SyncDescriptor=aWt});var Jwn=T(fce=>{"use strict";f();Object.defineProperty(fce,"__esModule",{value:!0});fce.Graph=fce.Node=void 0;var YXe=class{static{a(this,"Node")}constructor(e,r){this.key=e,this.data=r,this.incoming=new Map,this.outgoing=new Map}};fce.Node=YXe;var cWt=class{static{a(this,"Graph")}constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let r of this._nodes.values())r.outgoing.size===0&&e.push(r);return e}insertEdge(e,r){let n=this.lookupOrInsertNode(e),o=this.lookupOrInsertNode(r);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(e){let r=this._hashFn(e);this._nodes.delete(r);for(let n of this._nodes.values())n.outgoing.delete(r),n.incoming.delete(r)}lookupOrInsertNode(e){let r=this._hashFn(e),n=this._nodes.get(r);return n||(n=new YXe(r,e),this._nodes.set(r,n)),n}lookup(e){return this._nodes.get(this._hashFn(e))}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[r,n]of this._nodes)e.push(`${r} +`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=XJe(e),n=Sae(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=XJe(e),n=Sae(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};QRn.Parser=bWt});var $Rn=T(Zbe=>{"use strict";f();var qRn=uWt(),Cns=jbe(),Xbe=Wbe(),vns=cVt(),bns=na(),Tns=vWt(),GRn=TWt();function HRn(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Tns.LineCounter||null,prettyErrors:e}}a(HRn,"parseOptions");function Sns(t,e={}){let{lineCounter:r,prettyErrors:n}=HRn(e),o=new GRn.Parser(r?.addNewLine),s=new qRn.Composer(e),c=Array.from(s.compose(o.parse(t)));if(n&&r)for(let l of c)l.errors.forEach(Xbe.prettifyError(t,r)),l.warnings.forEach(Xbe.prettifyError(t,r));return c.length>0?c:Object.assign([],{empty:!0},s.streamInfo())}a(Sns,"parseAllDocuments");function jRn(t,e={}){let{lineCounter:r,prettyErrors:n}=HRn(e),o=new GRn.Parser(r?.addNewLine),s=new qRn.Composer(e),c=null;for(let l of s.compose(o.parse(t),!0,t.length))if(!c)c=l;else if(c.options.logLevel!=="silent"){c.errors.push(new Xbe.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(c.errors.forEach(Xbe.prettifyError(t,r)),c.warnings.forEach(Xbe.prettifyError(t,r))),c}a(jRn,"parseDocument");function Ins(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let o=jRn(t,r);if(!o)return null;if(o.warnings.forEach(s=>vns.warn(o.options.logLevel,s)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},r))}a(Ins,"parse");function xns(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let o=Math.round(r);r=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){let{keepUndefined:o}=r??e??{};if(!o)return}return bns.isDocument(t)&&!n?t.toString(r):new Cns.Document(t,n,r).toString(r)}a(xns,"stringify");Zbe.parse=Ins;Zbe.parseAllDocuments=Sns;Zbe.parseDocument=jRn;Zbe.stringify=xns});var WRn=T(Ga=>{"use strict";f();var wns=uWt(),Rns=jbe(),Pns=jVt(),SWt=Wbe(),kns=xbe(),o7=na(),Dns=e7(),Nns=x0(),Mns=r7(),Ons=n7(),Bns=KJe(),Lns=_Wt(),Fns=vWt(),Uns=TWt(),ZJe=$Rn(),VRn=bbe();Ga.Composer=wns.Composer;Ga.Document=Rns.Document;Ga.Schema=Pns.Schema;Ga.YAMLError=SWt.YAMLError;Ga.YAMLParseError=SWt.YAMLParseError;Ga.YAMLWarning=SWt.YAMLWarning;Ga.Alias=kns.Alias;Ga.isAlias=o7.isAlias;Ga.isCollection=o7.isCollection;Ga.isDocument=o7.isDocument;Ga.isMap=o7.isMap;Ga.isNode=o7.isNode;Ga.isPair=o7.isPair;Ga.isScalar=o7.isScalar;Ga.isSeq=o7.isSeq;Ga.Pair=Dns.Pair;Ga.Scalar=Nns.Scalar;Ga.YAMLMap=Mns.YAMLMap;Ga.YAMLSeq=Ons.YAMLSeq;Ga.CST=Bns;Ga.Lexer=Lns.Lexer;Ga.LineCounter=Fns.LineCounter;Ga.Parser=Uns.Parser;Ga.parse=ZJe.parse;Ga.parseAllDocuments=ZJe.parseAllDocuments;Ga.parseDocument=ZJe.parseDocument;Ga.stringify=ZJe.stringify;Ga.visit=VRn.visit;Ga.visitAsync=VRn.visitAsync});var zRn=T(eXe=>{"use strict";f();Object.defineProperty(eXe,"__esModule",{value:!0});eXe.FetchCancellationError=void 0;var Qns=Ko(),IWt=class extends Qns.CancellationError{static{a(this,"FetchCancellationError")}constructor(e){super(),this.extraInformation=e}};eXe.FetchCancellationError=IWt});var Po=T(s7=>{"use strict";f();Object.defineProperty(s7,"__esModule",{value:!0});s7.IInstantiationService=s7._util=void 0;s7.createDecorator=YRn;s7.refineServiceDecorator=Gns;var bO;(function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies";function e(r){return r[t.DI_DEPENDENCIES]||[]}a(e,"getServiceDependencies"),t.getServiceDependencies=e})(bO||(s7._util=bO={}));s7.IInstantiationService=YRn("instantiationService");function qns(t,e,r){e[bO.DI_TARGET]===e?e[bO.DI_DEPENDENCIES].push({id:t,index:r}):(e[bO.DI_DEPENDENCIES]=[{id:t,index:r}],e[bO.DI_TARGET]=e)}a(qns,"storeServiceDependency");function YRn(t){if(bO.serviceIds.has(t))return bO.serviceIds.get(t);let e=a(function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");qns(e,r,o)},"id");return e.toString=()=>t,bO.serviceIds.set(t,e),e}a(YRn,"createDecorator");function Gns(t){return t}a(Gns,"refineServiceDecorator")});var rXe=T(tXe=>{"use strict";f();Object.defineProperty(tXe,"__esModule",{value:!0});tXe.SyncDescriptor=void 0;var xWt=class{static{a(this,"SyncDescriptor")}constructor(e,r=[],n=!1){this.ctor=e,this.staticArguments=r,this.supportsDelayedInstantiation=n}};tXe.SyncDescriptor=xWt});var KRn=T(Iae=>{"use strict";f();Object.defineProperty(Iae,"__esModule",{value:!0});Iae.Graph=Iae.Node=void 0;var nXe=class{static{a(this,"Node")}constructor(e,r){this.key=e,this.data=r,this.incoming=new Map,this.outgoing=new Map}};Iae.Node=nXe;var wWt=class{static{a(this,"Graph")}constructor(e){this._hashFn=e,this._nodes=new Map}roots(){let e=[];for(let r of this._nodes.values())r.outgoing.size===0&&e.push(r);return e}insertEdge(e,r){let n=this.lookupOrInsertNode(e),o=this.lookupOrInsertNode(r);n.outgoing.set(o.key,o),o.incoming.set(n.key,n)}removeNode(e){let r=this._hashFn(e);this._nodes.delete(r);for(let n of this._nodes.values())n.outgoing.delete(r),n.incoming.delete(r)}lookupOrInsertNode(e){let r=this._hashFn(e),n=this._nodes.get(r);return n||(n=new nXe(r,e),this._nodes.set(r,n)),n}lookup(e){return this._nodes.get(this._hashFn(e))}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[r,n]of this._nodes)e.push(`${r} (-> incoming)[${[...n.incoming.keys()].join(", ")}] (outgoing ->)[${[...n.outgoing.keys()].join(",")}] `);return e.join(` -`)}findCycleSlow(){for(let[e,r]of this._nodes){let n=new Set([e]),o=this._findCycle(r,n);if(o)return o}}_findCycle(e,r){for(let[n,o]of e.outgoing){if(r.has(n))return[...r,n].join(" -> ");r.add(n);let s=this._findCycle(o,r);if(s)return s;r.delete(n)}}};fce.Graph=cWt});var uWt=T(KXe=>{"use strict";f();Object.defineProperty(KXe,"__esModule",{value:!0});KXe.ServiceCollection=void 0;var lWt=class{static{a(this,"ServiceCollection")}constructor(...e){this._entries=new Map;for(let[r,n]of e)this.set(r,n)}set(e,r){let n=this._entries.get(e);return this._entries.set(e,r),n}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}};KXe.ServiceCollection=lWt});var Zwn=T(mce=>{"use strict";f();Object.defineProperty(mce,"__esModule",{value:!0});mce.Trace=mce.InstantiationService=void 0;var Gts=wc(),Hts=es(),dWt=so(),pce=zXe(),Xwn=Jwn(),fWt=Mo(),jts=uWt(),$ts=tie(),Vts=!1,JXe=class extends Error{static{a(this,"CyclicDependencyError")}constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: -${e.toString()}`}},pWt=class t{static{a(this,"InstantiationService")}constructor(e=new jts.ServiceCollection,r=!1,n,o=Vts){this._services=e,this._strict=r,this._parent=n,this._enableTracing=o,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(fWt.IInstantiationService,this),this._globalGraph=o?n?._globalGraph??new Xwn.Graph(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,dWt.dispose)(this._children),this._children.clear();for(let e of this._servicesToMaybeDispose)(0,dWt.isDisposable)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,r){this._throwIfDisposed();let n=this,o=new class extends t{dispose(){n._children.delete(o),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(o),r?.add(o),o}invokeFunction(e,...r){this._throwIfDisposed();let n=hce.traceInvocation(this._enableTracing,e),o=!1;try{return e({get:a(c=>{if(o)throw(0,Hts.illegalState)("service accessor is only valid during the invocation of its target method");let l=this._getOrCreateServiceInstance(c,n);return l||this._throwIfStrict(`[invokeFunction] unknown service '${c}'`,!1),l},"get")},...r)}finally{o=!0,n.stop()}}createInstance(e,...r){this._throwIfDisposed();let n,o;return e instanceof pce.SyncDescriptor?(n=hce.traceCreation(this._enableTracing,e.ctor),o=this._createInstance(e.ctor,e.staticArguments.concat(r),n)):(n=hce.traceCreation(this._enableTracing,e),o=this._createInstance(e,r,n)),n.stop(),o}_createInstance(e,r=[],n){let o=fWt._util.getServiceDependencies(e).sort((l,u)=>l.index-u.index),s=[];for(let l of o){let u=this._getOrCreateServiceInstance(l.id,n);u||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${l.id}.`,!1),s.push(u)}let c=o.length>0?o[0].index:r.length;if(r.length!==c){console.trace(`[createInstance] First service dependency of ${e.name} at position ${c+1} conflicts with ${r.length} static arguments`);let l=c-r.length;l>0?r=r.concat(new Array(l)):r=r.slice(0,c)}return Reflect.construct(e,r.concat(s))}_setCreatedServiceInstance(e,r){if(this._services.get(e)instanceof pce.SyncDescriptor)this._services.set(e,r);else if(this._parent)this._parent._setCreatedServiceInstance(e,r);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let r=this._services.get(e);return!r&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):r}_getOrCreateServiceInstance(e,r){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof pce.SyncDescriptor?this._safeCreateAndCacheServiceInstance(e,n,r.branch(e,!0)):(r.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,r,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,r,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,r,n){let o=new Xwn.Graph(u=>u.id.toString()),s=0,c=[{id:e,desc:r,_trace:n}],l=new Set;for(;c.length;){let u=c.pop();if(!l.has(String(u.id))){if(l.add(String(u.id)),o.lookupOrInsertNode(u),s++>1e3)throw new JXe(o);for(let d of fWt._util.getServiceDependencies(u.desc.ctor)){let p=this._getServiceInstanceOrDescriptor(d.id);if(p||this._throwIfStrict(`[createInstance] ${e} depends on ${d.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(u.id),String(d.id)),p instanceof pce.SyncDescriptor){let h={id:d.id,desc:p,_trace:u._trace.branch(d.id,!0)};o.insertEdge(u,h),c.push(h)}}}}for(;;){let u=o.roots();if(u.length===0){if(!o.isEmpty())throw new JXe(o);break}for(let{data:d}of u){if(this._getServiceInstanceOrDescriptor(d.id)instanceof pce.SyncDescriptor){let h=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setCreatedServiceInstance(d.id,h)}o.removeNode(d)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,r,n=[],o,s){if(this._services.get(e)instanceof pce.SyncDescriptor)return this._createServiceInstance(e,r,n,o,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,r,n,o,s);throw new Error(`illegalState - creating UNKNOWN service instance ${r.name}`)}_createServiceInstance(e,r,n=[],o,s,c){if(o){let l=new t(void 0,this._strict,this,this._enableTracing);l._globalGraphImplicitDependency=String(e);let u=new Map,d=new Gts.GlobalIdleValue(()=>{let p=l._createInstance(r,n,s);for(let[h,m]of u){let g=p[h];if(typeof g=="function")for(let A of m)A.disposable=g.apply(p,A.listener)}return u.clear(),c.add(p),p});return new Proxy(Object.create(null),{get(p,h){if(!d.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let A=u.get(h);return A||(A=new $ts.LinkedList,u.set(h,A)),a((E,_,v)=>{if(d.isInitialized)return d.value[h](E,_,v);{let b={listener:[E,_,v],disposable:void 0},I=A.push(b);return(0,dWt.toDisposable)(()=>{I(),b.disposable?.dispose()})}},"event")}if(h in p)return p[h];let m=d.value,g=m[h];return typeof g!="function"||(g=g.bind(m),p[h]=g),g},set(p,h,m){return d.value[h]=m,!0},getPrototypeOf(p){return r.prototype}})}else{let l=this._createInstance(r,n,s);return c.add(l),l}}_throwIfStrict(e,r){if(r&&console.warn(e),this._strict)throw new Error(e)}};mce.InstantiationService=pWt;var hce=class t{static{a(this,"Trace")}static{this.all=new Set}static{this._None=new class extends t{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,r){return e?new t(2,r.name||new Error().stack.split(` +`)}findCycleSlow(){for(let[e,r]of this._nodes){let n=new Set([e]),o=this._findCycle(r,n);if(o)return o}}_findCycle(e,r){for(let[n,o]of e.outgoing){if(r.has(n))return[...r,n].join(" -> ");r.add(n);let s=this._findCycle(o,r);if(s)return s;r.delete(n)}}};Iae.Graph=wWt});var PWt=T(iXe=>{"use strict";f();Object.defineProperty(iXe,"__esModule",{value:!0});iXe.ServiceCollection=void 0;var RWt=class{static{a(this,"ServiceCollection")}constructor(...e){this._entries=new Map;for(let[r,n]of e)this.set(r,n)}set(e,r){let n=this._entries.get(e);return this._entries.set(e,r),n}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}};iXe.ServiceCollection=RWt});var XRn=T(Rae=>{"use strict";f();Object.defineProperty(Rae,"__esModule",{value:!0});Rae.Trace=Rae.InstantiationService=void 0;var Hns=vc(),jns=Ko(),kWt=ro(),xae=rXe(),JRn=KRn(),DWt=Po(),$ns=PWt(),Vns=hne(),Wns=!1,oXe=class extends Error{static{a(this,"CyclicDependencyError")}constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: +${e.toString()}`}},NWt=class t{static{a(this,"InstantiationService")}constructor(e=new $ns.ServiceCollection,r=!1,n,o=Wns){this._services=e,this._strict=r,this._parent=n,this._enableTracing=o,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(DWt.IInstantiationService,this),this._globalGraph=o?n?._globalGraph??new JRn.Graph(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,kWt.dispose)(this._children),this._children.clear();for(let e of this._servicesToMaybeDispose)(0,kWt.isDisposable)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,r){this._throwIfDisposed();let n=this,o=new class extends t{dispose(){n._children.delete(o),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(o),r?.add(o),o}invokeFunction(e,...r){this._throwIfDisposed();let n=wae.traceInvocation(this._enableTracing,e),o=!1;try{return e({get:a(c=>{if(o)throw(0,jns.illegalState)("service accessor is only valid during the invocation of its target method");let l=this._getOrCreateServiceInstance(c,n);return l||this._throwIfStrict(`[invokeFunction] unknown service '${c}'`,!1),l},"get")},...r)}finally{o=!0,n.stop()}}createInstance(e,...r){this._throwIfDisposed();let n,o;return e instanceof xae.SyncDescriptor?(n=wae.traceCreation(this._enableTracing,e.ctor),o=this._createInstance(e.ctor,e.staticArguments.concat(r),n)):(n=wae.traceCreation(this._enableTracing,e),o=this._createInstance(e,r,n)),n.stop(),o}_createInstance(e,r=[],n){let o=DWt._util.getServiceDependencies(e).sort((l,u)=>l.index-u.index),s=[];for(let l of o){let u=this._getOrCreateServiceInstance(l.id,n);u||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${l.id}.`,!1),s.push(u)}let c=o.length>0?o[0].index:r.length;if(r.length!==c){console.trace(`[createInstance] First service dependency of ${e.name} at position ${c+1} conflicts with ${r.length} static arguments`);let l=c-r.length;l>0?r=r.concat(new Array(l)):r=r.slice(0,c)}return Reflect.construct(e,r.concat(s))}_setCreatedServiceInstance(e,r){if(this._services.get(e)instanceof xae.SyncDescriptor)this._services.set(e,r);else if(this._parent)this._parent._setCreatedServiceInstance(e,r);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let r=this._services.get(e);return!r&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):r}_getOrCreateServiceInstance(e,r){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));let n=this._getServiceInstanceOrDescriptor(e);return n instanceof xae.SyncDescriptor?this._safeCreateAndCacheServiceInstance(e,n,r.branch(e,!0)):(r.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,r,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,r,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,r,n){let o=new JRn.Graph(u=>u.id.toString()),s=0,c=[{id:e,desc:r,_trace:n}],l=new Set;for(;c.length;){let u=c.pop();if(!l.has(String(u.id))){if(l.add(String(u.id)),o.lookupOrInsertNode(u),s++>1e3)throw new oXe(o);for(let d of DWt._util.getServiceDependencies(u.desc.ctor)){let p=this._getServiceInstanceOrDescriptor(d.id);if(p||this._throwIfStrict(`[createInstance] ${e} depends on ${d.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(u.id),String(d.id)),p instanceof xae.SyncDescriptor){let h={id:d.id,desc:p,_trace:u._trace.branch(d.id,!0)};o.insertEdge(u,h),c.push(h)}}}}for(;;){let u=o.roots();if(u.length===0){if(!o.isEmpty())throw new oXe(o);break}for(let{data:d}of u){if(this._getServiceInstanceOrDescriptor(d.id)instanceof xae.SyncDescriptor){let h=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setCreatedServiceInstance(d.id,h)}o.removeNode(d)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,r,n=[],o,s){if(this._services.get(e)instanceof xae.SyncDescriptor)return this._createServiceInstance(e,r,n,o,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,r,n,o,s);throw new Error(`illegalState - creating UNKNOWN service instance ${r.name}`)}_createServiceInstance(e,r,n=[],o,s,c){if(o){let l=new t(void 0,this._strict,this,this._enableTracing);l._globalGraphImplicitDependency=String(e);let u=new Map,d=new Hns.GlobalIdleValue(()=>{let p=l._createInstance(r,n,s);for(let[h,m]of u){let g=p[h];if(typeof g=="function")for(let A of m)A.disposable=g.apply(p,A.listener)}return u.clear(),c.add(p),p});return new Proxy(Object.create(null),{get(p,h){if(!d.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let A=u.get(h);return A||(A=new Vns.LinkedList,u.set(h,A)),a((E,_,v)=>{if(d.isInitialized)return d.value[h](E,_,v);{let b={listener:[E,_,v],disposable:void 0},I=A.push(b);return(0,kWt.toDisposable)(()=>{I(),b.disposable?.dispose()})}},"event")}if(h in p)return p[h];let m=d.value,g=m[h];return typeof g!="function"||(g=g.bind(m),p[h]=g),g},set(p,h,m){return d.value[h]=m,!0},getPrototypeOf(p){return r.prototype}})}else{let l=this._createInstance(r,n,s);return c.add(l),l}}_throwIfStrict(e,r){if(r&&console.warn(e),this._strict)throw new Error(e)}};Rae.InstantiationService=NWt;var wae=class t{static{a(this,"Trace")}static{this.all=new Set}static{this._None=new class extends t{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,r){return e?new t(2,r.name||new Error().stack.split(` `).slice(3,4).join(` `)):t._None}static traceCreation(e,r){return e?new t(1,r.name):t._None}static{this._totals=0}constructor(e,r){this.type=e,this.name=r,this._start=Date.now(),this._dep=[]}branch(e,r){let n=new t(3,e.toString());return this._dep.push([e,r,n]),n}stop(){let e=Date.now()-this._start;t._totals+=e;let r=!1;function n(s,c){let l=[],u=new Array(s+1).join(" ");for(let[d,p,h]of c._dep)if(p&&h){r=!0,l.push(`${u}CREATES -> ${d}`);let m=n(s+1,h);m&&l.push(m)}else l.push(`${u}uses -> ${d}`);return l.join(` `)}a(n,"printChild");let o=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${t._totals.toFixed(2)}ms)`];(e>2||r)&&t.all.add(o.join(` -`))}};mce.Trace=hce});var qr=T(gce=>{"use strict";f();Object.defineProperty(gce,"__esModule",{value:!0});gce.InstantiationServiceBuilder=gce.createServiceIdentifier=void 0;var Wts=Mo();Object.defineProperty(gce,"createServiceIdentifier",{enumerable:!0,get:a(function(){return Wts.createDecorator},"get")});var zts=Zwn(),eRn=uWt(),hWt=class{static{a(this,"InstantiationServiceBuilder")}constructor(e){this._isSealed=!1,this._collection=Array.isArray(e)?new eRn.ServiceCollection(...e):e??new eRn.ServiceCollection}define(e,r){if(this._isSealed)throw new Error("This accessor is sealed and cannot be modified anymore.");this._collection.set(e,r)}seal(){if(this._isSealed)throw new Error("This accessor is sealed and cannot be seal again anymore.");return this._isSealed=!0,new zts.InstantiationService(this._collection,!0)}};gce.InstantiationServiceBuilder=hWt});var nSe=T(DS=>{"use strict";f();Object.defineProperty(DS,"__esModule",{value:!0});DS.NullLanguageContextService=DS.TriggerKind=DS.KnownSources=DS.ContextKind=DS.ILanguageContextService=void 0;var Yts=qr();DS.ILanguageContextService=(0,Yts.createServiceIdentifier)("ILanguageContextService");var tRn;(function(t){t.Snippet="snippet",t.Trait="trait",t.DiagnosticBag="diagnosticBag"})(tRn||(DS.ContextKind=tRn={}));var rRn;(function(t){t.unknown="unknown",t.sideCar="sideCar",t.completion="completion",t.populateCache="populateCache",t.nes="nes",t.chat="chat",t.fix="fix"})(rRn||(DS.KnownSources=rRn={}));var nRn;(function(t){t.unknown="unknown",t.selection="selection",t.completion="completion"})(nRn||(DS.TriggerKind=nRn={}));var mWt=class{static{a(this,"EmptyAsyncIterable")}async*[Symbol.asyncIterator](){}};DS.NullLanguageContextService={_serviceBrand:void 0,isActivated:a(async()=>!1,"isActivated"),populateCache:a(async()=>{},"populateCache"),getContext:a(()=>new mWt,"getContext"),getContextOnTimeout:a(()=>[],"getContextOnTimeout")}});var oRn=T(XXe=>{"use strict";f();Object.defineProperty(XXe,"__esModule",{value:!0});XXe.serializeLanguageContext=Jts;XXe.serializeFileDiagnostics=rrs;var Kts=Ef(),gWt=nSe();function Jts(t){return{start:t.start,end:t.end,items:t.items.map(e=>({context:Xts(e.context),timeStamp:e.timeStamp,onTimeout:e.onTimeout}))}}a(Jts,"serializeLanguageContext");function Xts(t){switch(t.kind){case gWt.ContextKind.Snippet:return Zts(t);case gWt.ContextKind.Trait:return ers(t);case gWt.ContextKind.DiagnosticBag:return trs(t)}}a(Xts,"serializeLanguageContextItem");function Zts(t){return{kind:t.kind,priority:t.priority,uri:t.uri.toString(),additionalUris:t.additionalUris?.map(e=>e.toString()),value:t.value}}a(Zts,"serializeSnippetContext");function ers(t){return{kind:t.kind,priority:t.priority,name:t.name,value:t.value}}a(ers,"serializeTraitContext");function trs(t){let e=t.values.map(r=>iRn(r));return{kind:t.kind,priority:t.priority,uri:t.uri.toString(),values:e}}a(trs,"serializeDiagnosticBagContext");function iRn(t,e){let r={severity:t.severity===0?"Error":t.severity===1?"Warning":t.severity===2?"Information":"Hint",message:t.message,source:t.source||"",code:t.code&&typeof t.code!="number"&&typeof t.code!="string"?t.code.value:t.code,range:new Kts.Range(t.range.start.line+1,t.range.start.character+1,t.range.end.line+1,t.range.end.character+1).toString()};return e&&(r.uri=e.toString()),r}a(iRn,"serializeDiagnostic");function rrs(t){return t.flatMap(([e,r])=>r.map(n=>iRn(n,e)))}a(rrs,"serializeFileDiagnostics")});var yWt=T(AWt=>{"use strict";f();Object.defineProperty(AWt,"__esModule",{value:!0});AWt.stringifyChatMessages=nrs;var ZXe=po();function nrs(t){return t.map(irs).join(` -`)}a(nrs,"stringifyChatMessages");function irs({role:t,content:e}){if(t!==ZXe.Raw.ChatRole.User&&t!==ZXe.Raw.ChatRole.System)return"omitted because of non-user and non-system role";let r=t===ZXe.Raw.ChatRole.User?"User":"System",n=e.at(0);return n?.type!==ZXe.Raw.ChatCompletionContentPartKind.Text?"omitted because of non-text content":`${r} +`))}};Rae.Trace=wae});var qr=T(Pae=>{"use strict";f();Object.defineProperty(Pae,"__esModule",{value:!0});Pae.InstantiationServiceBuilder=Pae.createServiceIdentifier=void 0;var zns=Po();Object.defineProperty(Pae,"createServiceIdentifier",{enumerable:!0,get:a(function(){return zns.createDecorator},"get")});var Yns=XRn(),ZRn=PWt(),MWt=class{static{a(this,"InstantiationServiceBuilder")}constructor(e){this._isSealed=!1,this._collection=Array.isArray(e)?new ZRn.ServiceCollection(...e):e??new ZRn.ServiceCollection}define(e,r){if(this._isSealed)throw new Error("This accessor is sealed and cannot be modified anymore.");this._collection.set(e,r)}seal(){if(this._isSealed)throw new Error("This accessor is sealed and cannot be seal again anymore.");return this._isSealed=!0,new Yns.InstantiationService(this._collection,!0)}};Pae.InstantiationServiceBuilder=MWt});var eTe=T(CS=>{"use strict";f();Object.defineProperty(CS,"__esModule",{value:!0});CS.NullLanguageContextService=CS.TriggerKind=CS.KnownSources=CS.ContextKind=CS.ILanguageContextService=void 0;var Kns=qr();CS.ILanguageContextService=(0,Kns.createServiceIdentifier)("ILanguageContextService");var e2n;(function(t){t.Snippet="snippet",t.Trait="trait",t.DiagnosticBag="diagnosticBag"})(e2n||(CS.ContextKind=e2n={}));var t2n;(function(t){t.unknown="unknown",t.sideCar="sideCar",t.completion="completion",t.populateCache="populateCache",t.nes="nes",t.chat="chat",t.fix="fix"})(t2n||(CS.KnownSources=t2n={}));var r2n;(function(t){t.unknown="unknown",t.selection="selection",t.completion="completion"})(r2n||(CS.TriggerKind=r2n={}));var OWt=class{static{a(this,"EmptyAsyncIterable")}async*[Symbol.asyncIterator](){}};CS.NullLanguageContextService={_serviceBrand:void 0,isActivated:a(async()=>!1,"isActivated"),populateCache:a(async()=>{},"populateCache"),getContext:a(()=>new OWt,"getContext"),getContextOnTimeout:a(()=>[],"getContextOnTimeout")}});var i2n=T(sXe=>{"use strict";f();Object.defineProperty(sXe,"__esModule",{value:!0});sXe.serializeLanguageContext=Xns;sXe.serializeFileDiagnostics=nis;var Jns=ff(),BWt=eTe();function Xns(t){return{start:t.start,end:t.end,items:t.items.map(e=>({context:Zns(e.context),timeStamp:e.timeStamp,onTimeout:e.onTimeout}))}}a(Xns,"serializeLanguageContext");function Zns(t){switch(t.kind){case BWt.ContextKind.Snippet:return eis(t);case BWt.ContextKind.Trait:return tis(t);case BWt.ContextKind.DiagnosticBag:return ris(t)}}a(Zns,"serializeLanguageContextItem");function eis(t){return{kind:t.kind,priority:t.priority,uri:t.uri.toString(),additionalUris:t.additionalUris?.map(e=>e.toString()),value:t.value}}a(eis,"serializeSnippetContext");function tis(t){return{kind:t.kind,priority:t.priority,name:t.name,value:t.value}}a(tis,"serializeTraitContext");function ris(t){let e=t.values.map(r=>n2n(r));return{kind:t.kind,priority:t.priority,uri:t.uri.toString(),values:e}}a(ris,"serializeDiagnosticBagContext");function n2n(t,e){let r={severity:t.severity===0?"Error":t.severity===1?"Warning":t.severity===2?"Information":"Hint",message:t.message,source:t.source||"",code:t.code&&typeof t.code!="number"&&typeof t.code!="string"?t.code.value:t.code,range:new Jns.Range(t.range.start.line+1,t.range.start.character+1,t.range.end.line+1,t.range.end.character+1).toString()};return e&&(r.uri=e.toString()),r}a(n2n,"serializeDiagnostic");function nis(t){return t.flatMap(([e,r])=>r.map(n=>n2n(n,e)))}a(nis,"serializeFileDiagnostics")});var FWt=T(LWt=>{"use strict";f();Object.defineProperty(LWt,"__esModule",{value:!0});LWt.stringifyChatMessages=iis;var aXe=co();function iis(t){return t.map(ois).join(` +`)}a(iis,"stringifyChatMessages");function ois({role:t,content:e}){if(t!==aXe.Raw.ChatRole.User&&t!==aXe.Raw.ChatRole.System)return"omitted because of non-user and non-system role";let r=t===aXe.Raw.ChatRole.User?"User":"System",n=e.at(0);return n?.type!==aXe.Raw.ChatCompletionContentPartKind.Text?"omitted because of non-text content":`${r} ------ ${n.text} -==================`}a(irs,"stringifyMessage")});var CWt=T(eZe=>{"use strict";f();Object.defineProperty(eZe,"__esModule",{value:!0});eZe.register=srs;eZe.getCodiconFontCharacters=ars;var ors=sv(),EWt=Object.create(null);function srs(t,e){if((0,ors.isString)(e)){let r=EWt[e];if(r===void 0)throw new Error(`${t} references an unknown codicon: ${e}`);e=r}return EWt[t]=e,{id:t}}a(srs,"register");function ars(){return EWt}a(ars,"getCodiconFontCharacters")});var sRn=T(tZe=>{"use strict";f();Object.defineProperty(tZe,"__esModule",{value:!0});tZe.codiconsLibrary=void 0;var q=CWt();tZe.codiconsLibrary={add:(0,q.register)("add",6e4),plus:(0,q.register)("plus",6e4),gistNew:(0,q.register)("gist-new",6e4),repoCreate:(0,q.register)("repo-create",6e4),lightbulb:(0,q.register)("lightbulb",60001),lightBulb:(0,q.register)("light-bulb",60001),repo:(0,q.register)("repo",60002),repoDelete:(0,q.register)("repo-delete",60002),gistFork:(0,q.register)("gist-fork",60003),repoForked:(0,q.register)("repo-forked",60003),gitPullRequest:(0,q.register)("git-pull-request",60004),gitPullRequestAbandoned:(0,q.register)("git-pull-request-abandoned",60004),recordKeys:(0,q.register)("record-keys",60005),keyboard:(0,q.register)("keyboard",60005),tag:(0,q.register)("tag",60006),gitPullRequestLabel:(0,q.register)("git-pull-request-label",60006),tagAdd:(0,q.register)("tag-add",60006),tagRemove:(0,q.register)("tag-remove",60006),person:(0,q.register)("person",60007),personFollow:(0,q.register)("person-follow",60007),personOutline:(0,q.register)("person-outline",60007),personFilled:(0,q.register)("person-filled",60007),sourceControl:(0,q.register)("source-control",60008),mirror:(0,q.register)("mirror",60009),mirrorPublic:(0,q.register)("mirror-public",60009),star:(0,q.register)("star",60010),starAdd:(0,q.register)("star-add",60010),starDelete:(0,q.register)("star-delete",60010),starEmpty:(0,q.register)("star-empty",60010),comment:(0,q.register)("comment",60011),commentAdd:(0,q.register)("comment-add",60011),alert:(0,q.register)("alert",60012),warning:(0,q.register)("warning",60012),search:(0,q.register)("search",60013),searchSave:(0,q.register)("search-save",60013),logOut:(0,q.register)("log-out",60014),signOut:(0,q.register)("sign-out",60014),logIn:(0,q.register)("log-in",60015),signIn:(0,q.register)("sign-in",60015),eye:(0,q.register)("eye",60016),eyeUnwatch:(0,q.register)("eye-unwatch",60016),eyeWatch:(0,q.register)("eye-watch",60016),circleFilled:(0,q.register)("circle-filled",60017),primitiveDot:(0,q.register)("primitive-dot",60017),closeDirty:(0,q.register)("close-dirty",60017),debugBreakpoint:(0,q.register)("debug-breakpoint",60017),debugBreakpointDisabled:(0,q.register)("debug-breakpoint-disabled",60017),debugHint:(0,q.register)("debug-hint",60017),terminalDecorationSuccess:(0,q.register)("terminal-decoration-success",60017),primitiveSquare:(0,q.register)("primitive-square",60018),edit:(0,q.register)("edit",60019),pencil:(0,q.register)("pencil",60019),info:(0,q.register)("info",60020),issueOpened:(0,q.register)("issue-opened",60020),gistPrivate:(0,q.register)("gist-private",60021),gitForkPrivate:(0,q.register)("git-fork-private",60021),lock:(0,q.register)("lock",60021),mirrorPrivate:(0,q.register)("mirror-private",60021),close:(0,q.register)("close",60022),removeClose:(0,q.register)("remove-close",60022),x:(0,q.register)("x",60022),repoSync:(0,q.register)("repo-sync",60023),sync:(0,q.register)("sync",60023),clone:(0,q.register)("clone",60024),desktopDownload:(0,q.register)("desktop-download",60024),beaker:(0,q.register)("beaker",60025),microscope:(0,q.register)("microscope",60025),vm:(0,q.register)("vm",60026),deviceDesktop:(0,q.register)("device-desktop",60026),file:(0,q.register)("file",60027),more:(0,q.register)("more",60028),ellipsis:(0,q.register)("ellipsis",60028),kebabHorizontal:(0,q.register)("kebab-horizontal",60028),mailReply:(0,q.register)("mail-reply",60029),reply:(0,q.register)("reply",60029),organization:(0,q.register)("organization",60030),organizationFilled:(0,q.register)("organization-filled",60030),organizationOutline:(0,q.register)("organization-outline",60030),newFile:(0,q.register)("new-file",60031),fileAdd:(0,q.register)("file-add",60031),newFolder:(0,q.register)("new-folder",60032),fileDirectoryCreate:(0,q.register)("file-directory-create",60032),trash:(0,q.register)("trash",60033),trashcan:(0,q.register)("trashcan",60033),history:(0,q.register)("history",60034),clock:(0,q.register)("clock",60034),folder:(0,q.register)("folder",60035),fileDirectory:(0,q.register)("file-directory",60035),symbolFolder:(0,q.register)("symbol-folder",60035),logoGithub:(0,q.register)("logo-github",60036),markGithub:(0,q.register)("mark-github",60036),github:(0,q.register)("github",60036),terminal:(0,q.register)("terminal",60037),console:(0,q.register)("console",60037),repl:(0,q.register)("repl",60037),zap:(0,q.register)("zap",60038),symbolEvent:(0,q.register)("symbol-event",60038),error:(0,q.register)("error",60039),stop:(0,q.register)("stop",60039),variable:(0,q.register)("variable",60040),symbolVariable:(0,q.register)("symbol-variable",60040),array:(0,q.register)("array",60042),symbolArray:(0,q.register)("symbol-array",60042),symbolModule:(0,q.register)("symbol-module",60043),symbolPackage:(0,q.register)("symbol-package",60043),symbolNamespace:(0,q.register)("symbol-namespace",60043),symbolObject:(0,q.register)("symbol-object",60043),symbolMethod:(0,q.register)("symbol-method",60044),symbolFunction:(0,q.register)("symbol-function",60044),symbolConstructor:(0,q.register)("symbol-constructor",60044),symbolBoolean:(0,q.register)("symbol-boolean",60047),symbolNull:(0,q.register)("symbol-null",60047),symbolNumeric:(0,q.register)("symbol-numeric",60048),symbolNumber:(0,q.register)("symbol-number",60048),symbolStructure:(0,q.register)("symbol-structure",60049),symbolStruct:(0,q.register)("symbol-struct",60049),symbolParameter:(0,q.register)("symbol-parameter",60050),symbolTypeParameter:(0,q.register)("symbol-type-parameter",60050),symbolKey:(0,q.register)("symbol-key",60051),symbolText:(0,q.register)("symbol-text",60051),symbolReference:(0,q.register)("symbol-reference",60052),goToFile:(0,q.register)("go-to-file",60052),symbolEnum:(0,q.register)("symbol-enum",60053),symbolValue:(0,q.register)("symbol-value",60053),symbolRuler:(0,q.register)("symbol-ruler",60054),symbolUnit:(0,q.register)("symbol-unit",60054),activateBreakpoints:(0,q.register)("activate-breakpoints",60055),archive:(0,q.register)("archive",60056),arrowBoth:(0,q.register)("arrow-both",60057),arrowDown:(0,q.register)("arrow-down",60058),arrowLeft:(0,q.register)("arrow-left",60059),arrowRight:(0,q.register)("arrow-right",60060),arrowSmallDown:(0,q.register)("arrow-small-down",60061),arrowSmallLeft:(0,q.register)("arrow-small-left",60062),arrowSmallRight:(0,q.register)("arrow-small-right",60063),arrowSmallUp:(0,q.register)("arrow-small-up",60064),arrowUp:(0,q.register)("arrow-up",60065),bell:(0,q.register)("bell",60066),bold:(0,q.register)("bold",60067),book:(0,q.register)("book",60068),bookmark:(0,q.register)("bookmark",60069),debugBreakpointConditionalUnverified:(0,q.register)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,q.register)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,q.register)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,q.register)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,q.register)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,q.register)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,q.register)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,q.register)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,q.register)("debug-breakpoint-log-disabled",60075),briefcase:(0,q.register)("briefcase",60076),broadcast:(0,q.register)("broadcast",60077),browser:(0,q.register)("browser",60078),bug:(0,q.register)("bug",60079),calendar:(0,q.register)("calendar",60080),caseSensitive:(0,q.register)("case-sensitive",60081),check:(0,q.register)("check",60082),checklist:(0,q.register)("checklist",60083),chevronDown:(0,q.register)("chevron-down",60084),chevronLeft:(0,q.register)("chevron-left",60085),chevronRight:(0,q.register)("chevron-right",60086),chevronUp:(0,q.register)("chevron-up",60087),chromeClose:(0,q.register)("chrome-close",60088),chromeMaximize:(0,q.register)("chrome-maximize",60089),chromeMinimize:(0,q.register)("chrome-minimize",60090),chromeRestore:(0,q.register)("chrome-restore",60091),circleOutline:(0,q.register)("circle-outline",60092),circle:(0,q.register)("circle",60092),debugBreakpointUnverified:(0,q.register)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,q.register)("terminal-decoration-incomplete",60092),circleSlash:(0,q.register)("circle-slash",60093),circuitBoard:(0,q.register)("circuit-board",60094),clearAll:(0,q.register)("clear-all",60095),clippy:(0,q.register)("clippy",60096),closeAll:(0,q.register)("close-all",60097),cloudDownload:(0,q.register)("cloud-download",60098),cloudUpload:(0,q.register)("cloud-upload",60099),code:(0,q.register)("code",60100),collapseAll:(0,q.register)("collapse-all",60101),colorMode:(0,q.register)("color-mode",60102),commentDiscussion:(0,q.register)("comment-discussion",60103),creditCard:(0,q.register)("credit-card",60105),dash:(0,q.register)("dash",60108),dashboard:(0,q.register)("dashboard",60109),database:(0,q.register)("database",60110),debugContinue:(0,q.register)("debug-continue",60111),debugDisconnect:(0,q.register)("debug-disconnect",60112),debugPause:(0,q.register)("debug-pause",60113),debugRestart:(0,q.register)("debug-restart",60114),debugStart:(0,q.register)("debug-start",60115),debugStepInto:(0,q.register)("debug-step-into",60116),debugStepOut:(0,q.register)("debug-step-out",60117),debugStepOver:(0,q.register)("debug-step-over",60118),debugStop:(0,q.register)("debug-stop",60119),debug:(0,q.register)("debug",60120),deviceCameraVideo:(0,q.register)("device-camera-video",60121),deviceCamera:(0,q.register)("device-camera",60122),deviceMobile:(0,q.register)("device-mobile",60123),diffAdded:(0,q.register)("diff-added",60124),diffIgnored:(0,q.register)("diff-ignored",60125),diffModified:(0,q.register)("diff-modified",60126),diffRemoved:(0,q.register)("diff-removed",60127),diffRenamed:(0,q.register)("diff-renamed",60128),diff:(0,q.register)("diff",60129),diffSidebyside:(0,q.register)("diff-sidebyside",60129),discard:(0,q.register)("discard",60130),editorLayout:(0,q.register)("editor-layout",60131),emptyWindow:(0,q.register)("empty-window",60132),exclude:(0,q.register)("exclude",60133),extensions:(0,q.register)("extensions",60134),eyeClosed:(0,q.register)("eye-closed",60135),fileBinary:(0,q.register)("file-binary",60136),fileCode:(0,q.register)("file-code",60137),fileMedia:(0,q.register)("file-media",60138),filePdf:(0,q.register)("file-pdf",60139),fileSubmodule:(0,q.register)("file-submodule",60140),fileSymlinkDirectory:(0,q.register)("file-symlink-directory",60141),fileSymlinkFile:(0,q.register)("file-symlink-file",60142),fileZip:(0,q.register)("file-zip",60143),files:(0,q.register)("files",60144),filter:(0,q.register)("filter",60145),flame:(0,q.register)("flame",60146),foldDown:(0,q.register)("fold-down",60147),foldUp:(0,q.register)("fold-up",60148),fold:(0,q.register)("fold",60149),folderActive:(0,q.register)("folder-active",60150),folderOpened:(0,q.register)("folder-opened",60151),gear:(0,q.register)("gear",60152),gift:(0,q.register)("gift",60153),gistSecret:(0,q.register)("gist-secret",60154),gist:(0,q.register)("gist",60155),gitCommit:(0,q.register)("git-commit",60156),gitCompare:(0,q.register)("git-compare",60157),compareChanges:(0,q.register)("compare-changes",60157),gitMerge:(0,q.register)("git-merge",60158),githubAction:(0,q.register)("github-action",60159),githubAlt:(0,q.register)("github-alt",60160),globe:(0,q.register)("globe",60161),grabber:(0,q.register)("grabber",60162),graph:(0,q.register)("graph",60163),gripper:(0,q.register)("gripper",60164),heart:(0,q.register)("heart",60165),home:(0,q.register)("home",60166),horizontalRule:(0,q.register)("horizontal-rule",60167),hubot:(0,q.register)("hubot",60168),inbox:(0,q.register)("inbox",60169),issueReopened:(0,q.register)("issue-reopened",60171),issues:(0,q.register)("issues",60172),italic:(0,q.register)("italic",60173),jersey:(0,q.register)("jersey",60174),json:(0,q.register)("json",60175),bracket:(0,q.register)("bracket",60175),kebabVertical:(0,q.register)("kebab-vertical",60176),key:(0,q.register)("key",60177),law:(0,q.register)("law",60178),lightbulbAutofix:(0,q.register)("lightbulb-autofix",60179),linkExternal:(0,q.register)("link-external",60180),link:(0,q.register)("link",60181),listOrdered:(0,q.register)("list-ordered",60182),listUnordered:(0,q.register)("list-unordered",60183),liveShare:(0,q.register)("live-share",60184),loading:(0,q.register)("loading",60185),location:(0,q.register)("location",60186),mailRead:(0,q.register)("mail-read",60187),mail:(0,q.register)("mail",60188),markdown:(0,q.register)("markdown",60189),megaphone:(0,q.register)("megaphone",60190),mention:(0,q.register)("mention",60191),milestone:(0,q.register)("milestone",60192),gitPullRequestMilestone:(0,q.register)("git-pull-request-milestone",60192),mortarBoard:(0,q.register)("mortar-board",60193),move:(0,q.register)("move",60194),multipleWindows:(0,q.register)("multiple-windows",60195),mute:(0,q.register)("mute",60196),noNewline:(0,q.register)("no-newline",60197),note:(0,q.register)("note",60198),octoface:(0,q.register)("octoface",60199),openPreview:(0,q.register)("open-preview",60200),package:(0,q.register)("package",60201),paintcan:(0,q.register)("paintcan",60202),pin:(0,q.register)("pin",60203),play:(0,q.register)("play",60204),run:(0,q.register)("run",60204),plug:(0,q.register)("plug",60205),preserveCase:(0,q.register)("preserve-case",60206),preview:(0,q.register)("preview",60207),project:(0,q.register)("project",60208),pulse:(0,q.register)("pulse",60209),question:(0,q.register)("question",60210),quote:(0,q.register)("quote",60211),radioTower:(0,q.register)("radio-tower",60212),reactions:(0,q.register)("reactions",60213),references:(0,q.register)("references",60214),refresh:(0,q.register)("refresh",60215),regex:(0,q.register)("regex",60216),remoteExplorer:(0,q.register)("remote-explorer",60217),remote:(0,q.register)("remote",60218),remove:(0,q.register)("remove",60219),replaceAll:(0,q.register)("replace-all",60220),replace:(0,q.register)("replace",60221),repoClone:(0,q.register)("repo-clone",60222),repoForcePush:(0,q.register)("repo-force-push",60223),repoPull:(0,q.register)("repo-pull",60224),repoPush:(0,q.register)("repo-push",60225),report:(0,q.register)("report",60226),requestChanges:(0,q.register)("request-changes",60227),rocket:(0,q.register)("rocket",60228),rootFolderOpened:(0,q.register)("root-folder-opened",60229),rootFolder:(0,q.register)("root-folder",60230),rss:(0,q.register)("rss",60231),ruby:(0,q.register)("ruby",60232),saveAll:(0,q.register)("save-all",60233),saveAs:(0,q.register)("save-as",60234),save:(0,q.register)("save",60235),screenFull:(0,q.register)("screen-full",60236),screenNormal:(0,q.register)("screen-normal",60237),searchStop:(0,q.register)("search-stop",60238),server:(0,q.register)("server",60240),settingsGear:(0,q.register)("settings-gear",60241),settings:(0,q.register)("settings",60242),shield:(0,q.register)("shield",60243),smiley:(0,q.register)("smiley",60244),sortPrecedence:(0,q.register)("sort-precedence",60245),splitHorizontal:(0,q.register)("split-horizontal",60246),splitVertical:(0,q.register)("split-vertical",60247),squirrel:(0,q.register)("squirrel",60248),starFull:(0,q.register)("star-full",60249),starHalf:(0,q.register)("star-half",60250),symbolClass:(0,q.register)("symbol-class",60251),symbolColor:(0,q.register)("symbol-color",60252),symbolConstant:(0,q.register)("symbol-constant",60253),symbolEnumMember:(0,q.register)("symbol-enum-member",60254),symbolField:(0,q.register)("symbol-field",60255),symbolFile:(0,q.register)("symbol-file",60256),symbolInterface:(0,q.register)("symbol-interface",60257),symbolKeyword:(0,q.register)("symbol-keyword",60258),symbolMisc:(0,q.register)("symbol-misc",60259),symbolOperator:(0,q.register)("symbol-operator",60260),symbolProperty:(0,q.register)("symbol-property",60261),wrench:(0,q.register)("wrench",60261),wrenchSubaction:(0,q.register)("wrench-subaction",60261),symbolSnippet:(0,q.register)("symbol-snippet",60262),tasklist:(0,q.register)("tasklist",60263),telescope:(0,q.register)("telescope",60264),textSize:(0,q.register)("text-size",60265),threeBars:(0,q.register)("three-bars",60266),thumbsdown:(0,q.register)("thumbsdown",60267),thumbsup:(0,q.register)("thumbsup",60268),tools:(0,q.register)("tools",60269),triangleDown:(0,q.register)("triangle-down",60270),triangleLeft:(0,q.register)("triangle-left",60271),triangleRight:(0,q.register)("triangle-right",60272),triangleUp:(0,q.register)("triangle-up",60273),twitter:(0,q.register)("twitter",60274),unfold:(0,q.register)("unfold",60275),unlock:(0,q.register)("unlock",60276),unmute:(0,q.register)("unmute",60277),unverified:(0,q.register)("unverified",60278),verified:(0,q.register)("verified",60279),versions:(0,q.register)("versions",60280),vmActive:(0,q.register)("vm-active",60281),vmOutline:(0,q.register)("vm-outline",60282),vmRunning:(0,q.register)("vm-running",60283),watch:(0,q.register)("watch",60284),whitespace:(0,q.register)("whitespace",60285),wholeWord:(0,q.register)("whole-word",60286),window:(0,q.register)("window",60287),wordWrap:(0,q.register)("word-wrap",60288),zoomIn:(0,q.register)("zoom-in",60289),zoomOut:(0,q.register)("zoom-out",60290),listFilter:(0,q.register)("list-filter",60291),listFlat:(0,q.register)("list-flat",60292),listSelection:(0,q.register)("list-selection",60293),selection:(0,q.register)("selection",60293),listTree:(0,q.register)("list-tree",60294),debugBreakpointFunctionUnverified:(0,q.register)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,q.register)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,q.register)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,q.register)("debug-stackframe-active",60297),circleSmallFilled:(0,q.register)("circle-small-filled",60298),debugStackframeDot:(0,q.register)("debug-stackframe-dot",60298),terminalDecorationMark:(0,q.register)("terminal-decoration-mark",60298),debugStackframe:(0,q.register)("debug-stackframe",60299),debugStackframeFocused:(0,q.register)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,q.register)("debug-breakpoint-unsupported",60300),symbolString:(0,q.register)("symbol-string",60301),debugReverseContinue:(0,q.register)("debug-reverse-continue",60302),debugStepBack:(0,q.register)("debug-step-back",60303),debugRestartFrame:(0,q.register)("debug-restart-frame",60304),debugAlt:(0,q.register)("debug-alt",60305),callIncoming:(0,q.register)("call-incoming",60306),callOutgoing:(0,q.register)("call-outgoing",60307),menu:(0,q.register)("menu",60308),expandAll:(0,q.register)("expand-all",60309),feedback:(0,q.register)("feedback",60310),gitPullRequestReviewer:(0,q.register)("git-pull-request-reviewer",60310),groupByRefType:(0,q.register)("group-by-ref-type",60311),ungroupByRefType:(0,q.register)("ungroup-by-ref-type",60312),account:(0,q.register)("account",60313),gitPullRequestAssignee:(0,q.register)("git-pull-request-assignee",60313),bellDot:(0,q.register)("bell-dot",60314),debugConsole:(0,q.register)("debug-console",60315),library:(0,q.register)("library",60316),output:(0,q.register)("output",60317),runAll:(0,q.register)("run-all",60318),syncIgnored:(0,q.register)("sync-ignored",60319),pinned:(0,q.register)("pinned",60320),githubInverted:(0,q.register)("github-inverted",60321),serverProcess:(0,q.register)("server-process",60322),serverEnvironment:(0,q.register)("server-environment",60323),pass:(0,q.register)("pass",60324),issueClosed:(0,q.register)("issue-closed",60324),stopCircle:(0,q.register)("stop-circle",60325),playCircle:(0,q.register)("play-circle",60326),record:(0,q.register)("record",60327),debugAltSmall:(0,q.register)("debug-alt-small",60328),vmConnect:(0,q.register)("vm-connect",60329),cloud:(0,q.register)("cloud",60330),merge:(0,q.register)("merge",60331),export:(0,q.register)("export",60332),graphLeft:(0,q.register)("graph-left",60333),magnet:(0,q.register)("magnet",60334),notebook:(0,q.register)("notebook",60335),redo:(0,q.register)("redo",60336),checkAll:(0,q.register)("check-all",60337),pinnedDirty:(0,q.register)("pinned-dirty",60338),passFilled:(0,q.register)("pass-filled",60339),circleLargeFilled:(0,q.register)("circle-large-filled",60340),circleLarge:(0,q.register)("circle-large",60341),circleLargeOutline:(0,q.register)("circle-large-outline",60341),combine:(0,q.register)("combine",60342),gather:(0,q.register)("gather",60342),table:(0,q.register)("table",60343),variableGroup:(0,q.register)("variable-group",60344),typeHierarchy:(0,q.register)("type-hierarchy",60345),typeHierarchySub:(0,q.register)("type-hierarchy-sub",60346),typeHierarchySuper:(0,q.register)("type-hierarchy-super",60347),gitPullRequestCreate:(0,q.register)("git-pull-request-create",60348),runAbove:(0,q.register)("run-above",60349),runBelow:(0,q.register)("run-below",60350),notebookTemplate:(0,q.register)("notebook-template",60351),debugRerun:(0,q.register)("debug-rerun",60352),workspaceTrusted:(0,q.register)("workspace-trusted",60353),workspaceUntrusted:(0,q.register)("workspace-untrusted",60354),workspaceUnknown:(0,q.register)("workspace-unknown",60355),terminalCmd:(0,q.register)("terminal-cmd",60356),terminalDebian:(0,q.register)("terminal-debian",60357),terminalLinux:(0,q.register)("terminal-linux",60358),terminalPowershell:(0,q.register)("terminal-powershell",60359),terminalTmux:(0,q.register)("terminal-tmux",60360),terminalUbuntu:(0,q.register)("terminal-ubuntu",60361),terminalBash:(0,q.register)("terminal-bash",60362),arrowSwap:(0,q.register)("arrow-swap",60363),copy:(0,q.register)("copy",60364),personAdd:(0,q.register)("person-add",60365),filterFilled:(0,q.register)("filter-filled",60366),wand:(0,q.register)("wand",60367),debugLineByLine:(0,q.register)("debug-line-by-line",60368),inspect:(0,q.register)("inspect",60369),layers:(0,q.register)("layers",60370),layersDot:(0,q.register)("layers-dot",60371),layersActive:(0,q.register)("layers-active",60372),compass:(0,q.register)("compass",60373),compassDot:(0,q.register)("compass-dot",60374),compassActive:(0,q.register)("compass-active",60375),azure:(0,q.register)("azure",60376),issueDraft:(0,q.register)("issue-draft",60377),gitPullRequestClosed:(0,q.register)("git-pull-request-closed",60378),gitPullRequestDraft:(0,q.register)("git-pull-request-draft",60379),debugAll:(0,q.register)("debug-all",60380),debugCoverage:(0,q.register)("debug-coverage",60381),runErrors:(0,q.register)("run-errors",60382),folderLibrary:(0,q.register)("folder-library",60383),debugContinueSmall:(0,q.register)("debug-continue-small",60384),beakerStop:(0,q.register)("beaker-stop",60385),graphLine:(0,q.register)("graph-line",60386),graphScatter:(0,q.register)("graph-scatter",60387),pieChart:(0,q.register)("pie-chart",60388),bracketDot:(0,q.register)("bracket-dot",60389),bracketError:(0,q.register)("bracket-error",60390),lockSmall:(0,q.register)("lock-small",60391),azureDevops:(0,q.register)("azure-devops",60392),verifiedFilled:(0,q.register)("verified-filled",60393),newline:(0,q.register)("newline",60394),layout:(0,q.register)("layout",60395),layoutActivitybarLeft:(0,q.register)("layout-activitybar-left",60396),layoutActivitybarRight:(0,q.register)("layout-activitybar-right",60397),layoutPanelLeft:(0,q.register)("layout-panel-left",60398),layoutPanelCenter:(0,q.register)("layout-panel-center",60399),layoutPanelJustify:(0,q.register)("layout-panel-justify",60400),layoutPanelRight:(0,q.register)("layout-panel-right",60401),layoutPanel:(0,q.register)("layout-panel",60402),layoutSidebarLeft:(0,q.register)("layout-sidebar-left",60403),layoutSidebarRight:(0,q.register)("layout-sidebar-right",60404),layoutStatusbar:(0,q.register)("layout-statusbar",60405),layoutMenubar:(0,q.register)("layout-menubar",60406),layoutCentered:(0,q.register)("layout-centered",60407),target:(0,q.register)("target",60408),indent:(0,q.register)("indent",60409),recordSmall:(0,q.register)("record-small",60410),errorSmall:(0,q.register)("error-small",60411),terminalDecorationError:(0,q.register)("terminal-decoration-error",60411),arrowCircleDown:(0,q.register)("arrow-circle-down",60412),arrowCircleLeft:(0,q.register)("arrow-circle-left",60413),arrowCircleRight:(0,q.register)("arrow-circle-right",60414),arrowCircleUp:(0,q.register)("arrow-circle-up",60415),layoutSidebarRightOff:(0,q.register)("layout-sidebar-right-off",60416),layoutPanelOff:(0,q.register)("layout-panel-off",60417),layoutSidebarLeftOff:(0,q.register)("layout-sidebar-left-off",60418),blank:(0,q.register)("blank",60419),heartFilled:(0,q.register)("heart-filled",60420),map:(0,q.register)("map",60421),mapHorizontal:(0,q.register)("map-horizontal",60421),foldHorizontal:(0,q.register)("fold-horizontal",60421),mapFilled:(0,q.register)("map-filled",60422),mapHorizontalFilled:(0,q.register)("map-horizontal-filled",60422),foldHorizontalFilled:(0,q.register)("fold-horizontal-filled",60422),circleSmall:(0,q.register)("circle-small",60423),bellSlash:(0,q.register)("bell-slash",60424),bellSlashDot:(0,q.register)("bell-slash-dot",60425),commentUnresolved:(0,q.register)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,q.register)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,q.register)("git-pull-request-new-changes",60428),searchFuzzy:(0,q.register)("search-fuzzy",60429),commentDraft:(0,q.register)("comment-draft",60430),send:(0,q.register)("send",60431),sparkle:(0,q.register)("sparkle",60432),insert:(0,q.register)("insert",60433),mic:(0,q.register)("mic",60434),thumbsdownFilled:(0,q.register)("thumbsdown-filled",60435),thumbsupFilled:(0,q.register)("thumbsup-filled",60436),coffee:(0,q.register)("coffee",60437),snake:(0,q.register)("snake",60438),game:(0,q.register)("game",60439),vr:(0,q.register)("vr",60440),chip:(0,q.register)("chip",60441),piano:(0,q.register)("piano",60442),music:(0,q.register)("music",60443),micFilled:(0,q.register)("mic-filled",60444),repoFetch:(0,q.register)("repo-fetch",60445),copilot:(0,q.register)("copilot",60446),lightbulbSparkle:(0,q.register)("lightbulb-sparkle",60447),robot:(0,q.register)("robot",60448),sparkleFilled:(0,q.register)("sparkle-filled",60449),diffSingle:(0,q.register)("diff-single",60450),diffMultiple:(0,q.register)("diff-multiple",60451),surroundWith:(0,q.register)("surround-with",60452),share:(0,q.register)("share",60453),gitStash:(0,q.register)("git-stash",60454),gitStashApply:(0,q.register)("git-stash-apply",60455),gitStashPop:(0,q.register)("git-stash-pop",60456),vscode:(0,q.register)("vscode",60457),vscodeInsiders:(0,q.register)("vscode-insiders",60458),codeOss:(0,q.register)("code-oss",60459),runCoverage:(0,q.register)("run-coverage",60460),runAllCoverage:(0,q.register)("run-all-coverage",60461),coverage:(0,q.register)("coverage",60462),githubProject:(0,q.register)("github-project",60463),mapVertical:(0,q.register)("map-vertical",60464),foldVertical:(0,q.register)("fold-vertical",60464),mapVerticalFilled:(0,q.register)("map-vertical-filled",60465),foldVerticalFilled:(0,q.register)("fold-vertical-filled",60465),goToSearch:(0,q.register)("go-to-search",60466),percentage:(0,q.register)("percentage",60467),sortPercentage:(0,q.register)("sort-percentage",60467),attach:(0,q.register)("attach",60468),goToEditingSession:(0,q.register)("go-to-editing-session",60469),editSession:(0,q.register)("edit-session",60470),codeReview:(0,q.register)("code-review",60471),copilotWarning:(0,q.register)("copilot-warning",60472),python:(0,q.register)("python",60473),copilotLarge:(0,q.register)("copilot-large",60474),copilotWarningLarge:(0,q.register)("copilot-warning-large",60475),keyboardTab:(0,q.register)("keyboard-tab",60476),copilotBlocked:(0,q.register)("copilot-blocked",60477),copilotNotConnected:(0,q.register)("copilot-not-connected",60478),flag:(0,q.register)("flag",60479),lightbulbEmpty:(0,q.register)("lightbulb-empty",60480),symbolMethodArrow:(0,q.register)("symbol-method-arrow",60481),copilotUnavailable:(0,q.register)("copilot-unavailable",60482),repoPinned:(0,q.register)("repo-pinned",60483),keyboardTabAbove:(0,q.register)("keyboard-tab-above",60484),keyboardTabBelow:(0,q.register)("keyboard-tab-below",60485),gitPullRequestDone:(0,q.register)("git-pull-request-done",60486),mcp:(0,q.register)("mcp",60487),extensionsLarge:(0,q.register)("extensions-large",60488),layoutPanelDock:(0,q.register)("layout-panel-dock",60489),layoutSidebarLeftDock:(0,q.register)("layout-sidebar-left-dock",60490),layoutSidebarRightDock:(0,q.register)("layout-sidebar-right-dock",60491),copilotInProgress:(0,q.register)("copilot-in-progress",60492),copilotError:(0,q.register)("copilot-error",60493),copilotSuccess:(0,q.register)("copilot-success",60494),chatSparkle:(0,q.register)("chat-sparkle",60495),searchSparkle:(0,q.register)("search-sparkle",60496),editSparkle:(0,q.register)("edit-sparkle",60497),copilotSnooze:(0,q.register)("copilot-snooze",60498),sendToRemoteAgent:(0,q.register)("send-to-remote-agent",60499),commentDiscussionSparkle:(0,q.register)("comment-discussion-sparkle",60500),chatSparkleWarning:(0,q.register)("chat-sparkle-warning",60501),chatSparkleError:(0,q.register)("chat-sparkle-error",60502),collection:(0,q.register)("collection",60503),newCollection:(0,q.register)("new-collection",60504),thinking:(0,q.register)("thinking",60505),build:(0,q.register)("build",60506),commentDiscussionQuote:(0,q.register)("comment-discussion-quote",60507),cursor:(0,q.register)("cursor",60508),eraser:(0,q.register)("eraser",60509),fileText:(0,q.register)("file-text",60510),quotes:(0,q.register)("quotes",60512),rename:(0,q.register)("rename",60513),runWithDeps:(0,q.register)("run-with-deps",60514),debugConnected:(0,q.register)("debug-connected",60515),strikethrough:(0,q.register)("strikethrough",60516),openInProduct:(0,q.register)("open-in-product",60517),indexZero:(0,q.register)("index-zero",60518),agent:(0,q.register)("agent",60519),editCode:(0,q.register)("edit-code",60520),repoSelected:(0,q.register)("repo-selected",60521),skip:(0,q.register)("skip",60522),mergeInto:(0,q.register)("merge-into",60523),gitBranchChanges:(0,q.register)("git-branch-changes",60524),gitBranchStagedChanges:(0,q.register)("git-branch-staged-changes",60525),gitBranchConflicts:(0,q.register)("git-branch-conflicts",60526),gitBranch:(0,q.register)("git-branch",60527),gitBranchCreate:(0,q.register)("git-branch-create",60527),gitBranchDelete:(0,q.register)("git-branch-delete",60527),searchLarge:(0,q.register)("search-large",60528),terminalGitBash:(0,q.register)("terminal-git-bash",60529),windowActive:(0,q.register)("window-active",60530),forward:(0,q.register)("forward",60531),download:(0,q.register)("download",60532),clockface:(0,q.register)("clockface",60533),unarchive:(0,q.register)("unarchive",60534),sessionInProgress:(0,q.register)("session-in-progress",60535),collectionSmall:(0,q.register)("collection-small",60536),vmSmall:(0,q.register)("vm-small",60537),cloudSmall:(0,q.register)("cloud-small",60538),addSmall:(0,q.register)("add-small",60539),removeSmall:(0,q.register)("remove-small",60540),worktreeSmall:(0,q.register)("worktree-small",60541),worktree:(0,q.register)("worktree",60542),screenCut:(0,q.register)("screen-cut",60543),ask:(0,q.register)("ask",60544),openai:(0,q.register)("openai",60545),claude:(0,q.register)("claude",60546)}});var _Wt=T(G4=>{"use strict";f();Object.defineProperty(G4,"__esModule",{value:!0});G4.Codicon=G4.codiconsDerived=void 0;G4.getAllCodicons=lrs;var Pc=CWt(),crs=sRn();function lrs(){return Object.values(G4.Codicon)}a(lrs,"getAllCodicons");G4.codiconsDerived={dialogError:(0,Pc.register)("dialog-error","error"),dialogWarning:(0,Pc.register)("dialog-warning","warning"),dialogInfo:(0,Pc.register)("dialog-info","info"),dialogClose:(0,Pc.register)("dialog-close","close"),treeItemExpanded:(0,Pc.register)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,Pc.register)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,Pc.register)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,Pc.register)("tree-filter-clear","close"),treeItemLoading:(0,Pc.register)("tree-item-loading","loading"),menuSelection:(0,Pc.register)("menu-selection","check"),menuSubmenu:(0,Pc.register)("menu-submenu","chevron-right"),menuBarMore:(0,Pc.register)("menubar-more","more"),scrollbarButtonLeft:(0,Pc.register)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,Pc.register)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,Pc.register)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,Pc.register)("scrollbar-button-down","triangle-down"),toolBarMore:(0,Pc.register)("toolbar-more","more"),quickInputBack:(0,Pc.register)("quick-input-back","arrow-left"),dropDownButton:(0,Pc.register)("drop-down-button",60084),symbolCustomColor:(0,Pc.register)("symbol-customcolor",60252),exportIcon:(0,Pc.register)("export",60332),workspaceUnspecified:(0,Pc.register)("workspace-unspecified",60355),newLine:(0,Pc.register)("newline",60394),thumbsDownFilled:(0,Pc.register)("thumbsdown-filled",60435),thumbsUpFilled:(0,Pc.register)("thumbsup-filled",60436),gitFetch:(0,Pc.register)("git-fetch",60445),lightbulbSparkleAutofix:(0,Pc.register)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,Pc.register)("debug-breakpoint-pending",60377)};G4.Codicon={...crs.codiconsLibrary,...G4.codiconsDerived}});var TWt=T(lz=>{"use strict";f();Object.defineProperty(lz,"__esModule",{value:!0});lz.ThemeIcon=lz.ThemeColor=void 0;lz.themeColorFromId=urs;var vWt=_Wt(),bWt;(function(t){function e(r){return!!r&&typeof r=="object"&&typeof r.id=="string"}a(e,"isThemeColor"),t.isThemeColor=e})(bWt||(lz.ThemeColor=bWt={}));function urs(t){return{id:t}}a(urs,"themeColorFromId");var aRn;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9-]+",t.iconModifierExpression="~[A-Za-z]+",t.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function r(A){let y=e.exec(A.id);if(!y)return r(vWt.Codicon.error);let[,E,_]=y,v=["codicon","codicon-"+E];return _&&v.push("codicon-modifier-"+_.substring(1)),v}a(r,"asClassNameArray"),t.asClassNameArray=r;function n(A){return r(A).join(" ")}a(n,"asClassName"),t.asClassName=n;function o(A){return"."+r(A).join(".")}a(o,"asCSSSelector"),t.asCSSSelector=o;function s(A){return!!A&&typeof A=="object"&&typeof A.id=="string"&&(typeof A.color>"u"||bWt.isThemeColor(A.color))}a(s,"isThemeIcon"),t.isThemeIcon=s;let c=new RegExp(`^\\$\\((${t.iconNameExpression}(?:${t.iconModifierExpression})?)\\)$`);function l(A){let y=c.exec(A);if(!y)return;let[,E]=y;return{id:E}}a(l,"fromString"),t.fromString=l;function u(A){return{id:A}}a(u,"fromId"),t.fromId=u;function d(A,y){let E=A.id,_=E.lastIndexOf("~");return _!==-1&&(E=E.substring(0,_)),y&&(E=`${E}~${y}`),{id:E}}a(d,"modify"),t.modify=d;function p(A){let y=A.id.lastIndexOf("~");if(y!==-1)return A.id.substring(y+1)}a(p,"getModifier"),t.getModifier=p;function h(A,y){return A.id===y.id&&A.color?.id===y.color?.id}a(h,"isEqual"),t.isEqual=h;function m(A){return A?.id===vWt.Codicon.file.id}a(m,"isFile"),t.isFile=m;function g(A){return A?.id===vWt.Codicon.folder.id}a(g,"isFolder"),t.isFolder=g})(aRn||(lz.ThemeIcon=aRn={}))});var oSe=T(M7=>{"use strict";f();Object.defineProperty(M7,"__esModule",{value:!0});M7.Icon=void 0;M7.overrideNowValue=drs;M7.now=frs;M7.shortenOpportunityId=prs;M7.checkIfCursorAtEndOfLine=hrs;var iSe=TWt(),SWt=-1;function drs(t){SWt=t}a(drs,"overrideNowValue");function frs(){return SWt!==-1?SWt:Date.now()}a(frs,"now");var cRn;(function(t){t.circleSlash={themeIcon:iSe.ThemeIcon.fromId("circle-slash"),svg:''},t.error={themeIcon:iSe.ThemeIcon.fromId("error"),svg:''},t.skipped={themeIcon:iSe.ThemeIcon.fromId("testing-skipped-icon"),svg:''},t.lightbulbFull={themeIcon:iSe.ThemeIcon.fromId("refactor-preview-view-icon"),svg:''},t.database={themeIcon:iSe.ThemeIcon.fromId("database"),svg:''}})(cRn||(M7.Icon=cRn={}));function prs(t){return t.substring(4,8)}a(prs,"shortenOpportunityId");function hrs(t,e){return t.substring(e).match(/^\s*$/)!==null}a(hrs,"checkIfCursorAtEndOfLine")});var nZe=T(rD=>{"use strict";f();var mrs=rD&&rD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),grs=rD&&rD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ars=rD&&rD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(cXe,"__esModule",{value:!0});cXe.register=ais;cXe.getCodiconFontCharacters=cis;var sis=W1(),UWt=Object.create(null);function ais(t,e){if((0,sis.isString)(e)){let r=UWt[e];if(r===void 0)throw new Error(`${t} references an unknown codicon: ${e}`);e=r}return UWt[t]=e,{id:t}}a(ais,"register");function cis(){return UWt}a(cis,"getCodiconFontCharacters")});var o2n=T(lXe=>{"use strict";f();Object.defineProperty(lXe,"__esModule",{value:!0});lXe.codiconsLibrary=void 0;var q=QWt();lXe.codiconsLibrary={add:(0,q.register)("add",6e4),plus:(0,q.register)("plus",6e4),gistNew:(0,q.register)("gist-new",6e4),repoCreate:(0,q.register)("repo-create",6e4),lightbulb:(0,q.register)("lightbulb",60001),lightBulb:(0,q.register)("light-bulb",60001),repo:(0,q.register)("repo",60002),repoDelete:(0,q.register)("repo-delete",60002),gistFork:(0,q.register)("gist-fork",60003),repoForked:(0,q.register)("repo-forked",60003),gitPullRequest:(0,q.register)("git-pull-request",60004),gitPullRequestAbandoned:(0,q.register)("git-pull-request-abandoned",60004),recordKeys:(0,q.register)("record-keys",60005),keyboard:(0,q.register)("keyboard",60005),tag:(0,q.register)("tag",60006),gitPullRequestLabel:(0,q.register)("git-pull-request-label",60006),tagAdd:(0,q.register)("tag-add",60006),tagRemove:(0,q.register)("tag-remove",60006),person:(0,q.register)("person",60007),personFollow:(0,q.register)("person-follow",60007),personOutline:(0,q.register)("person-outline",60007),personFilled:(0,q.register)("person-filled",60007),sourceControl:(0,q.register)("source-control",60008),mirror:(0,q.register)("mirror",60009),mirrorPublic:(0,q.register)("mirror-public",60009),star:(0,q.register)("star",60010),starAdd:(0,q.register)("star-add",60010),starDelete:(0,q.register)("star-delete",60010),starEmpty:(0,q.register)("star-empty",60010),comment:(0,q.register)("comment",60011),commentAdd:(0,q.register)("comment-add",60011),alert:(0,q.register)("alert",60012),warning:(0,q.register)("warning",60012),search:(0,q.register)("search",60013),searchSave:(0,q.register)("search-save",60013),logOut:(0,q.register)("log-out",60014),signOut:(0,q.register)("sign-out",60014),logIn:(0,q.register)("log-in",60015),signIn:(0,q.register)("sign-in",60015),eye:(0,q.register)("eye",60016),eyeUnwatch:(0,q.register)("eye-unwatch",60016),eyeWatch:(0,q.register)("eye-watch",60016),circleFilled:(0,q.register)("circle-filled",60017),primitiveDot:(0,q.register)("primitive-dot",60017),closeDirty:(0,q.register)("close-dirty",60017),debugBreakpoint:(0,q.register)("debug-breakpoint",60017),debugBreakpointDisabled:(0,q.register)("debug-breakpoint-disabled",60017),debugHint:(0,q.register)("debug-hint",60017),terminalDecorationSuccess:(0,q.register)("terminal-decoration-success",60017),primitiveSquare:(0,q.register)("primitive-square",60018),edit:(0,q.register)("edit",60019),pencil:(0,q.register)("pencil",60019),info:(0,q.register)("info",60020),issueOpened:(0,q.register)("issue-opened",60020),gistPrivate:(0,q.register)("gist-private",60021),gitForkPrivate:(0,q.register)("git-fork-private",60021),lock:(0,q.register)("lock",60021),mirrorPrivate:(0,q.register)("mirror-private",60021),close:(0,q.register)("close",60022),removeClose:(0,q.register)("remove-close",60022),x:(0,q.register)("x",60022),repoSync:(0,q.register)("repo-sync",60023),sync:(0,q.register)("sync",60023),clone:(0,q.register)("clone",60024),desktopDownload:(0,q.register)("desktop-download",60024),beaker:(0,q.register)("beaker",60025),microscope:(0,q.register)("microscope",60025),vm:(0,q.register)("vm",60026),deviceDesktop:(0,q.register)("device-desktop",60026),file:(0,q.register)("file",60027),more:(0,q.register)("more",60028),ellipsis:(0,q.register)("ellipsis",60028),kebabHorizontal:(0,q.register)("kebab-horizontal",60028),mailReply:(0,q.register)("mail-reply",60029),reply:(0,q.register)("reply",60029),organization:(0,q.register)("organization",60030),organizationFilled:(0,q.register)("organization-filled",60030),organizationOutline:(0,q.register)("organization-outline",60030),newFile:(0,q.register)("new-file",60031),fileAdd:(0,q.register)("file-add",60031),newFolder:(0,q.register)("new-folder",60032),fileDirectoryCreate:(0,q.register)("file-directory-create",60032),trash:(0,q.register)("trash",60033),trashcan:(0,q.register)("trashcan",60033),history:(0,q.register)("history",60034),clock:(0,q.register)("clock",60034),folder:(0,q.register)("folder",60035),fileDirectory:(0,q.register)("file-directory",60035),symbolFolder:(0,q.register)("symbol-folder",60035),logoGithub:(0,q.register)("logo-github",60036),markGithub:(0,q.register)("mark-github",60036),github:(0,q.register)("github",60036),terminal:(0,q.register)("terminal",60037),console:(0,q.register)("console",60037),repl:(0,q.register)("repl",60037),zap:(0,q.register)("zap",60038),symbolEvent:(0,q.register)("symbol-event",60038),error:(0,q.register)("error",60039),stop:(0,q.register)("stop",60039),variable:(0,q.register)("variable",60040),symbolVariable:(0,q.register)("symbol-variable",60040),array:(0,q.register)("array",60042),symbolArray:(0,q.register)("symbol-array",60042),symbolModule:(0,q.register)("symbol-module",60043),symbolPackage:(0,q.register)("symbol-package",60043),symbolNamespace:(0,q.register)("symbol-namespace",60043),symbolObject:(0,q.register)("symbol-object",60043),symbolMethod:(0,q.register)("symbol-method",60044),symbolFunction:(0,q.register)("symbol-function",60044),symbolConstructor:(0,q.register)("symbol-constructor",60044),symbolBoolean:(0,q.register)("symbol-boolean",60047),symbolNull:(0,q.register)("symbol-null",60047),symbolNumeric:(0,q.register)("symbol-numeric",60048),symbolNumber:(0,q.register)("symbol-number",60048),symbolStructure:(0,q.register)("symbol-structure",60049),symbolStruct:(0,q.register)("symbol-struct",60049),symbolParameter:(0,q.register)("symbol-parameter",60050),symbolTypeParameter:(0,q.register)("symbol-type-parameter",60050),symbolKey:(0,q.register)("symbol-key",60051),symbolText:(0,q.register)("symbol-text",60051),symbolReference:(0,q.register)("symbol-reference",60052),goToFile:(0,q.register)("go-to-file",60052),symbolEnum:(0,q.register)("symbol-enum",60053),symbolValue:(0,q.register)("symbol-value",60053),symbolRuler:(0,q.register)("symbol-ruler",60054),symbolUnit:(0,q.register)("symbol-unit",60054),activateBreakpoints:(0,q.register)("activate-breakpoints",60055),archive:(0,q.register)("archive",60056),arrowBoth:(0,q.register)("arrow-both",60057),arrowDown:(0,q.register)("arrow-down",60058),arrowLeft:(0,q.register)("arrow-left",60059),arrowRight:(0,q.register)("arrow-right",60060),arrowSmallDown:(0,q.register)("arrow-small-down",60061),arrowSmallLeft:(0,q.register)("arrow-small-left",60062),arrowSmallRight:(0,q.register)("arrow-small-right",60063),arrowSmallUp:(0,q.register)("arrow-small-up",60064),arrowUp:(0,q.register)("arrow-up",60065),bell:(0,q.register)("bell",60066),bold:(0,q.register)("bold",60067),book:(0,q.register)("book",60068),bookmark:(0,q.register)("bookmark",60069),debugBreakpointConditionalUnverified:(0,q.register)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,q.register)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,q.register)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,q.register)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,q.register)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,q.register)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,q.register)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,q.register)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,q.register)("debug-breakpoint-log-disabled",60075),briefcase:(0,q.register)("briefcase",60076),broadcast:(0,q.register)("broadcast",60077),browser:(0,q.register)("browser",60078),bug:(0,q.register)("bug",60079),calendar:(0,q.register)("calendar",60080),caseSensitive:(0,q.register)("case-sensitive",60081),check:(0,q.register)("check",60082),checklist:(0,q.register)("checklist",60083),chevronDown:(0,q.register)("chevron-down",60084),chevronLeft:(0,q.register)("chevron-left",60085),chevronRight:(0,q.register)("chevron-right",60086),chevronUp:(0,q.register)("chevron-up",60087),chromeClose:(0,q.register)("chrome-close",60088),chromeMaximize:(0,q.register)("chrome-maximize",60089),chromeMinimize:(0,q.register)("chrome-minimize",60090),chromeRestore:(0,q.register)("chrome-restore",60091),circleOutline:(0,q.register)("circle-outline",60092),circle:(0,q.register)("circle",60092),debugBreakpointUnverified:(0,q.register)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,q.register)("terminal-decoration-incomplete",60092),circleSlash:(0,q.register)("circle-slash",60093),circuitBoard:(0,q.register)("circuit-board",60094),clearAll:(0,q.register)("clear-all",60095),clippy:(0,q.register)("clippy",60096),closeAll:(0,q.register)("close-all",60097),cloudDownload:(0,q.register)("cloud-download",60098),cloudUpload:(0,q.register)("cloud-upload",60099),code:(0,q.register)("code",60100),collapseAll:(0,q.register)("collapse-all",60101),colorMode:(0,q.register)("color-mode",60102),commentDiscussion:(0,q.register)("comment-discussion",60103),creditCard:(0,q.register)("credit-card",60105),dash:(0,q.register)("dash",60108),dashboard:(0,q.register)("dashboard",60109),database:(0,q.register)("database",60110),debugContinue:(0,q.register)("debug-continue",60111),debugDisconnect:(0,q.register)("debug-disconnect",60112),debugPause:(0,q.register)("debug-pause",60113),debugRestart:(0,q.register)("debug-restart",60114),debugStart:(0,q.register)("debug-start",60115),debugStepInto:(0,q.register)("debug-step-into",60116),debugStepOut:(0,q.register)("debug-step-out",60117),debugStepOver:(0,q.register)("debug-step-over",60118),debugStop:(0,q.register)("debug-stop",60119),debug:(0,q.register)("debug",60120),deviceCameraVideo:(0,q.register)("device-camera-video",60121),deviceCamera:(0,q.register)("device-camera",60122),deviceMobile:(0,q.register)("device-mobile",60123),diffAdded:(0,q.register)("diff-added",60124),diffIgnored:(0,q.register)("diff-ignored",60125),diffModified:(0,q.register)("diff-modified",60126),diffRemoved:(0,q.register)("diff-removed",60127),diffRenamed:(0,q.register)("diff-renamed",60128),diff:(0,q.register)("diff",60129),diffSidebyside:(0,q.register)("diff-sidebyside",60129),discard:(0,q.register)("discard",60130),editorLayout:(0,q.register)("editor-layout",60131),emptyWindow:(0,q.register)("empty-window",60132),exclude:(0,q.register)("exclude",60133),extensions:(0,q.register)("extensions",60134),eyeClosed:(0,q.register)("eye-closed",60135),fileBinary:(0,q.register)("file-binary",60136),fileCode:(0,q.register)("file-code",60137),fileMedia:(0,q.register)("file-media",60138),filePdf:(0,q.register)("file-pdf",60139),fileSubmodule:(0,q.register)("file-submodule",60140),fileSymlinkDirectory:(0,q.register)("file-symlink-directory",60141),fileSymlinkFile:(0,q.register)("file-symlink-file",60142),fileZip:(0,q.register)("file-zip",60143),files:(0,q.register)("files",60144),filter:(0,q.register)("filter",60145),flame:(0,q.register)("flame",60146),foldDown:(0,q.register)("fold-down",60147),foldUp:(0,q.register)("fold-up",60148),fold:(0,q.register)("fold",60149),folderActive:(0,q.register)("folder-active",60150),folderOpened:(0,q.register)("folder-opened",60151),gear:(0,q.register)("gear",60152),gift:(0,q.register)("gift",60153),gistSecret:(0,q.register)("gist-secret",60154),gist:(0,q.register)("gist",60155),gitCommit:(0,q.register)("git-commit",60156),gitCompare:(0,q.register)("git-compare",60157),compareChanges:(0,q.register)("compare-changes",60157),gitMerge:(0,q.register)("git-merge",60158),githubAction:(0,q.register)("github-action",60159),githubAlt:(0,q.register)("github-alt",60160),globe:(0,q.register)("globe",60161),grabber:(0,q.register)("grabber",60162),graph:(0,q.register)("graph",60163),gripper:(0,q.register)("gripper",60164),heart:(0,q.register)("heart",60165),home:(0,q.register)("home",60166),horizontalRule:(0,q.register)("horizontal-rule",60167),hubot:(0,q.register)("hubot",60168),inbox:(0,q.register)("inbox",60169),issueReopened:(0,q.register)("issue-reopened",60171),issues:(0,q.register)("issues",60172),italic:(0,q.register)("italic",60173),jersey:(0,q.register)("jersey",60174),json:(0,q.register)("json",60175),bracket:(0,q.register)("bracket",60175),kebabVertical:(0,q.register)("kebab-vertical",60176),key:(0,q.register)("key",60177),law:(0,q.register)("law",60178),lightbulbAutofix:(0,q.register)("lightbulb-autofix",60179),linkExternal:(0,q.register)("link-external",60180),link:(0,q.register)("link",60181),listOrdered:(0,q.register)("list-ordered",60182),listUnordered:(0,q.register)("list-unordered",60183),liveShare:(0,q.register)("live-share",60184),loading:(0,q.register)("loading",60185),location:(0,q.register)("location",60186),mailRead:(0,q.register)("mail-read",60187),mail:(0,q.register)("mail",60188),markdown:(0,q.register)("markdown",60189),megaphone:(0,q.register)("megaphone",60190),mention:(0,q.register)("mention",60191),milestone:(0,q.register)("milestone",60192),gitPullRequestMilestone:(0,q.register)("git-pull-request-milestone",60192),mortarBoard:(0,q.register)("mortar-board",60193),move:(0,q.register)("move",60194),multipleWindows:(0,q.register)("multiple-windows",60195),mute:(0,q.register)("mute",60196),noNewline:(0,q.register)("no-newline",60197),note:(0,q.register)("note",60198),octoface:(0,q.register)("octoface",60199),openPreview:(0,q.register)("open-preview",60200),package:(0,q.register)("package",60201),paintcan:(0,q.register)("paintcan",60202),pin:(0,q.register)("pin",60203),play:(0,q.register)("play",60204),run:(0,q.register)("run",60204),plug:(0,q.register)("plug",60205),preserveCase:(0,q.register)("preserve-case",60206),preview:(0,q.register)("preview",60207),project:(0,q.register)("project",60208),pulse:(0,q.register)("pulse",60209),question:(0,q.register)("question",60210),quote:(0,q.register)("quote",60211),radioTower:(0,q.register)("radio-tower",60212),reactions:(0,q.register)("reactions",60213),references:(0,q.register)("references",60214),refresh:(0,q.register)("refresh",60215),regex:(0,q.register)("regex",60216),remoteExplorer:(0,q.register)("remote-explorer",60217),remote:(0,q.register)("remote",60218),remove:(0,q.register)("remove",60219),replaceAll:(0,q.register)("replace-all",60220),replace:(0,q.register)("replace",60221),repoClone:(0,q.register)("repo-clone",60222),repoForcePush:(0,q.register)("repo-force-push",60223),repoPull:(0,q.register)("repo-pull",60224),repoPush:(0,q.register)("repo-push",60225),report:(0,q.register)("report",60226),requestChanges:(0,q.register)("request-changes",60227),rocket:(0,q.register)("rocket",60228),rootFolderOpened:(0,q.register)("root-folder-opened",60229),rootFolder:(0,q.register)("root-folder",60230),rss:(0,q.register)("rss",60231),ruby:(0,q.register)("ruby",60232),saveAll:(0,q.register)("save-all",60233),saveAs:(0,q.register)("save-as",60234),save:(0,q.register)("save",60235),screenFull:(0,q.register)("screen-full",60236),screenNormal:(0,q.register)("screen-normal",60237),searchStop:(0,q.register)("search-stop",60238),server:(0,q.register)("server",60240),settingsGear:(0,q.register)("settings-gear",60241),settings:(0,q.register)("settings",60242),shield:(0,q.register)("shield",60243),smiley:(0,q.register)("smiley",60244),sortPrecedence:(0,q.register)("sort-precedence",60245),splitHorizontal:(0,q.register)("split-horizontal",60246),splitVertical:(0,q.register)("split-vertical",60247),squirrel:(0,q.register)("squirrel",60248),starFull:(0,q.register)("star-full",60249),starHalf:(0,q.register)("star-half",60250),symbolClass:(0,q.register)("symbol-class",60251),symbolColor:(0,q.register)("symbol-color",60252),symbolConstant:(0,q.register)("symbol-constant",60253),symbolEnumMember:(0,q.register)("symbol-enum-member",60254),symbolField:(0,q.register)("symbol-field",60255),symbolFile:(0,q.register)("symbol-file",60256),symbolInterface:(0,q.register)("symbol-interface",60257),symbolKeyword:(0,q.register)("symbol-keyword",60258),symbolMisc:(0,q.register)("symbol-misc",60259),symbolOperator:(0,q.register)("symbol-operator",60260),symbolProperty:(0,q.register)("symbol-property",60261),wrench:(0,q.register)("wrench",60261),wrenchSubaction:(0,q.register)("wrench-subaction",60261),symbolSnippet:(0,q.register)("symbol-snippet",60262),tasklist:(0,q.register)("tasklist",60263),telescope:(0,q.register)("telescope",60264),textSize:(0,q.register)("text-size",60265),threeBars:(0,q.register)("three-bars",60266),thumbsdown:(0,q.register)("thumbsdown",60267),thumbsup:(0,q.register)("thumbsup",60268),tools:(0,q.register)("tools",60269),triangleDown:(0,q.register)("triangle-down",60270),triangleLeft:(0,q.register)("triangle-left",60271),triangleRight:(0,q.register)("triangle-right",60272),triangleUp:(0,q.register)("triangle-up",60273),twitter:(0,q.register)("twitter",60274),unfold:(0,q.register)("unfold",60275),unlock:(0,q.register)("unlock",60276),unmute:(0,q.register)("unmute",60277),unverified:(0,q.register)("unverified",60278),verified:(0,q.register)("verified",60279),versions:(0,q.register)("versions",60280),vmActive:(0,q.register)("vm-active",60281),vmOutline:(0,q.register)("vm-outline",60282),vmRunning:(0,q.register)("vm-running",60283),watch:(0,q.register)("watch",60284),whitespace:(0,q.register)("whitespace",60285),wholeWord:(0,q.register)("whole-word",60286),window:(0,q.register)("window",60287),wordWrap:(0,q.register)("word-wrap",60288),zoomIn:(0,q.register)("zoom-in",60289),zoomOut:(0,q.register)("zoom-out",60290),listFilter:(0,q.register)("list-filter",60291),listFlat:(0,q.register)("list-flat",60292),listSelection:(0,q.register)("list-selection",60293),selection:(0,q.register)("selection",60293),listTree:(0,q.register)("list-tree",60294),debugBreakpointFunctionUnverified:(0,q.register)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,q.register)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,q.register)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,q.register)("debug-stackframe-active",60297),circleSmallFilled:(0,q.register)("circle-small-filled",60298),debugStackframeDot:(0,q.register)("debug-stackframe-dot",60298),terminalDecorationMark:(0,q.register)("terminal-decoration-mark",60298),debugStackframe:(0,q.register)("debug-stackframe",60299),debugStackframeFocused:(0,q.register)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,q.register)("debug-breakpoint-unsupported",60300),symbolString:(0,q.register)("symbol-string",60301),debugReverseContinue:(0,q.register)("debug-reverse-continue",60302),debugStepBack:(0,q.register)("debug-step-back",60303),debugRestartFrame:(0,q.register)("debug-restart-frame",60304),debugAlt:(0,q.register)("debug-alt",60305),callIncoming:(0,q.register)("call-incoming",60306),callOutgoing:(0,q.register)("call-outgoing",60307),menu:(0,q.register)("menu",60308),expandAll:(0,q.register)("expand-all",60309),feedback:(0,q.register)("feedback",60310),gitPullRequestReviewer:(0,q.register)("git-pull-request-reviewer",60310),groupByRefType:(0,q.register)("group-by-ref-type",60311),ungroupByRefType:(0,q.register)("ungroup-by-ref-type",60312),account:(0,q.register)("account",60313),gitPullRequestAssignee:(0,q.register)("git-pull-request-assignee",60313),bellDot:(0,q.register)("bell-dot",60314),debugConsole:(0,q.register)("debug-console",60315),library:(0,q.register)("library",60316),output:(0,q.register)("output",60317),runAll:(0,q.register)("run-all",60318),syncIgnored:(0,q.register)("sync-ignored",60319),pinned:(0,q.register)("pinned",60320),githubInverted:(0,q.register)("github-inverted",60321),serverProcess:(0,q.register)("server-process",60322),serverEnvironment:(0,q.register)("server-environment",60323),pass:(0,q.register)("pass",60324),issueClosed:(0,q.register)("issue-closed",60324),stopCircle:(0,q.register)("stop-circle",60325),playCircle:(0,q.register)("play-circle",60326),record:(0,q.register)("record",60327),debugAltSmall:(0,q.register)("debug-alt-small",60328),vmConnect:(0,q.register)("vm-connect",60329),cloud:(0,q.register)("cloud",60330),merge:(0,q.register)("merge",60331),export:(0,q.register)("export",60332),graphLeft:(0,q.register)("graph-left",60333),magnet:(0,q.register)("magnet",60334),notebook:(0,q.register)("notebook",60335),redo:(0,q.register)("redo",60336),checkAll:(0,q.register)("check-all",60337),pinnedDirty:(0,q.register)("pinned-dirty",60338),passFilled:(0,q.register)("pass-filled",60339),circleLargeFilled:(0,q.register)("circle-large-filled",60340),circleLarge:(0,q.register)("circle-large",60341),circleLargeOutline:(0,q.register)("circle-large-outline",60341),combine:(0,q.register)("combine",60342),gather:(0,q.register)("gather",60342),table:(0,q.register)("table",60343),variableGroup:(0,q.register)("variable-group",60344),typeHierarchy:(0,q.register)("type-hierarchy",60345),typeHierarchySub:(0,q.register)("type-hierarchy-sub",60346),typeHierarchySuper:(0,q.register)("type-hierarchy-super",60347),gitPullRequestCreate:(0,q.register)("git-pull-request-create",60348),runAbove:(0,q.register)("run-above",60349),runBelow:(0,q.register)("run-below",60350),notebookTemplate:(0,q.register)("notebook-template",60351),debugRerun:(0,q.register)("debug-rerun",60352),workspaceTrusted:(0,q.register)("workspace-trusted",60353),workspaceUntrusted:(0,q.register)("workspace-untrusted",60354),workspaceUnknown:(0,q.register)("workspace-unknown",60355),terminalCmd:(0,q.register)("terminal-cmd",60356),terminalDebian:(0,q.register)("terminal-debian",60357),terminalLinux:(0,q.register)("terminal-linux",60358),terminalPowershell:(0,q.register)("terminal-powershell",60359),terminalTmux:(0,q.register)("terminal-tmux",60360),terminalUbuntu:(0,q.register)("terminal-ubuntu",60361),terminalBash:(0,q.register)("terminal-bash",60362),arrowSwap:(0,q.register)("arrow-swap",60363),copy:(0,q.register)("copy",60364),personAdd:(0,q.register)("person-add",60365),filterFilled:(0,q.register)("filter-filled",60366),wand:(0,q.register)("wand",60367),debugLineByLine:(0,q.register)("debug-line-by-line",60368),inspect:(0,q.register)("inspect",60369),layers:(0,q.register)("layers",60370),layersDot:(0,q.register)("layers-dot",60371),layersActive:(0,q.register)("layers-active",60372),compass:(0,q.register)("compass",60373),compassDot:(0,q.register)("compass-dot",60374),compassActive:(0,q.register)("compass-active",60375),azure:(0,q.register)("azure",60376),issueDraft:(0,q.register)("issue-draft",60377),gitPullRequestClosed:(0,q.register)("git-pull-request-closed",60378),gitPullRequestDraft:(0,q.register)("git-pull-request-draft",60379),debugAll:(0,q.register)("debug-all",60380),debugCoverage:(0,q.register)("debug-coverage",60381),runErrors:(0,q.register)("run-errors",60382),folderLibrary:(0,q.register)("folder-library",60383),debugContinueSmall:(0,q.register)("debug-continue-small",60384),beakerStop:(0,q.register)("beaker-stop",60385),graphLine:(0,q.register)("graph-line",60386),graphScatter:(0,q.register)("graph-scatter",60387),pieChart:(0,q.register)("pie-chart",60388),bracketDot:(0,q.register)("bracket-dot",60389),bracketError:(0,q.register)("bracket-error",60390),lockSmall:(0,q.register)("lock-small",60391),azureDevops:(0,q.register)("azure-devops",60392),verifiedFilled:(0,q.register)("verified-filled",60393),newline:(0,q.register)("newline",60394),layout:(0,q.register)("layout",60395),layoutActivitybarLeft:(0,q.register)("layout-activitybar-left",60396),layoutActivitybarRight:(0,q.register)("layout-activitybar-right",60397),layoutPanelLeft:(0,q.register)("layout-panel-left",60398),layoutPanelCenter:(0,q.register)("layout-panel-center",60399),layoutPanelJustify:(0,q.register)("layout-panel-justify",60400),layoutPanelRight:(0,q.register)("layout-panel-right",60401),layoutPanel:(0,q.register)("layout-panel",60402),layoutSidebarLeft:(0,q.register)("layout-sidebar-left",60403),layoutSidebarRight:(0,q.register)("layout-sidebar-right",60404),layoutStatusbar:(0,q.register)("layout-statusbar",60405),layoutMenubar:(0,q.register)("layout-menubar",60406),layoutCentered:(0,q.register)("layout-centered",60407),target:(0,q.register)("target",60408),indent:(0,q.register)("indent",60409),recordSmall:(0,q.register)("record-small",60410),errorSmall:(0,q.register)("error-small",60411),terminalDecorationError:(0,q.register)("terminal-decoration-error",60411),arrowCircleDown:(0,q.register)("arrow-circle-down",60412),arrowCircleLeft:(0,q.register)("arrow-circle-left",60413),arrowCircleRight:(0,q.register)("arrow-circle-right",60414),arrowCircleUp:(0,q.register)("arrow-circle-up",60415),layoutSidebarRightOff:(0,q.register)("layout-sidebar-right-off",60416),layoutPanelOff:(0,q.register)("layout-panel-off",60417),layoutSidebarLeftOff:(0,q.register)("layout-sidebar-left-off",60418),blank:(0,q.register)("blank",60419),heartFilled:(0,q.register)("heart-filled",60420),map:(0,q.register)("map",60421),mapHorizontal:(0,q.register)("map-horizontal",60421),foldHorizontal:(0,q.register)("fold-horizontal",60421),mapFilled:(0,q.register)("map-filled",60422),mapHorizontalFilled:(0,q.register)("map-horizontal-filled",60422),foldHorizontalFilled:(0,q.register)("fold-horizontal-filled",60422),circleSmall:(0,q.register)("circle-small",60423),bellSlash:(0,q.register)("bell-slash",60424),bellSlashDot:(0,q.register)("bell-slash-dot",60425),commentUnresolved:(0,q.register)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,q.register)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,q.register)("git-pull-request-new-changes",60428),searchFuzzy:(0,q.register)("search-fuzzy",60429),commentDraft:(0,q.register)("comment-draft",60430),send:(0,q.register)("send",60431),sparkle:(0,q.register)("sparkle",60432),insert:(0,q.register)("insert",60433),mic:(0,q.register)("mic",60434),thumbsdownFilled:(0,q.register)("thumbsdown-filled",60435),thumbsupFilled:(0,q.register)("thumbsup-filled",60436),coffee:(0,q.register)("coffee",60437),snake:(0,q.register)("snake",60438),game:(0,q.register)("game",60439),vr:(0,q.register)("vr",60440),chip:(0,q.register)("chip",60441),piano:(0,q.register)("piano",60442),music:(0,q.register)("music",60443),micFilled:(0,q.register)("mic-filled",60444),repoFetch:(0,q.register)("repo-fetch",60445),copilot:(0,q.register)("copilot",60446),lightbulbSparkle:(0,q.register)("lightbulb-sparkle",60447),robot:(0,q.register)("robot",60448),sparkleFilled:(0,q.register)("sparkle-filled",60449),diffSingle:(0,q.register)("diff-single",60450),diffMultiple:(0,q.register)("diff-multiple",60451),surroundWith:(0,q.register)("surround-with",60452),share:(0,q.register)("share",60453),gitStash:(0,q.register)("git-stash",60454),gitStashApply:(0,q.register)("git-stash-apply",60455),gitStashPop:(0,q.register)("git-stash-pop",60456),vscode:(0,q.register)("vscode",60457),vscodeInsiders:(0,q.register)("vscode-insiders",60458),codeOss:(0,q.register)("code-oss",60459),runCoverage:(0,q.register)("run-coverage",60460),runAllCoverage:(0,q.register)("run-all-coverage",60461),coverage:(0,q.register)("coverage",60462),githubProject:(0,q.register)("github-project",60463),mapVertical:(0,q.register)("map-vertical",60464),foldVertical:(0,q.register)("fold-vertical",60464),mapVerticalFilled:(0,q.register)("map-vertical-filled",60465),foldVerticalFilled:(0,q.register)("fold-vertical-filled",60465),goToSearch:(0,q.register)("go-to-search",60466),percentage:(0,q.register)("percentage",60467),sortPercentage:(0,q.register)("sort-percentage",60467),attach:(0,q.register)("attach",60468),goToEditingSession:(0,q.register)("go-to-editing-session",60469),editSession:(0,q.register)("edit-session",60470),codeReview:(0,q.register)("code-review",60471),copilotWarning:(0,q.register)("copilot-warning",60472),python:(0,q.register)("python",60473),copilotLarge:(0,q.register)("copilot-large",60474),copilotWarningLarge:(0,q.register)("copilot-warning-large",60475),keyboardTab:(0,q.register)("keyboard-tab",60476),copilotBlocked:(0,q.register)("copilot-blocked",60477),copilotNotConnected:(0,q.register)("copilot-not-connected",60478),flag:(0,q.register)("flag",60479),lightbulbEmpty:(0,q.register)("lightbulb-empty",60480),symbolMethodArrow:(0,q.register)("symbol-method-arrow",60481),copilotUnavailable:(0,q.register)("copilot-unavailable",60482),repoPinned:(0,q.register)("repo-pinned",60483),keyboardTabAbove:(0,q.register)("keyboard-tab-above",60484),keyboardTabBelow:(0,q.register)("keyboard-tab-below",60485),gitPullRequestDone:(0,q.register)("git-pull-request-done",60486),mcp:(0,q.register)("mcp",60487),extensionsLarge:(0,q.register)("extensions-large",60488),layoutPanelDock:(0,q.register)("layout-panel-dock",60489),layoutSidebarLeftDock:(0,q.register)("layout-sidebar-left-dock",60490),layoutSidebarRightDock:(0,q.register)("layout-sidebar-right-dock",60491),copilotInProgress:(0,q.register)("copilot-in-progress",60492),copilotError:(0,q.register)("copilot-error",60493),copilotSuccess:(0,q.register)("copilot-success",60494),chatSparkle:(0,q.register)("chat-sparkle",60495),searchSparkle:(0,q.register)("search-sparkle",60496),editSparkle:(0,q.register)("edit-sparkle",60497),copilotSnooze:(0,q.register)("copilot-snooze",60498),sendToRemoteAgent:(0,q.register)("send-to-remote-agent",60499),commentDiscussionSparkle:(0,q.register)("comment-discussion-sparkle",60500),chatSparkleWarning:(0,q.register)("chat-sparkle-warning",60501),chatSparkleError:(0,q.register)("chat-sparkle-error",60502),collection:(0,q.register)("collection",60503),newCollection:(0,q.register)("new-collection",60504),thinking:(0,q.register)("thinking",60505),build:(0,q.register)("build",60506),commentDiscussionQuote:(0,q.register)("comment-discussion-quote",60507),cursor:(0,q.register)("cursor",60508),eraser:(0,q.register)("eraser",60509),fileText:(0,q.register)("file-text",60510),quotes:(0,q.register)("quotes",60512),rename:(0,q.register)("rename",60513),runWithDeps:(0,q.register)("run-with-deps",60514),debugConnected:(0,q.register)("debug-connected",60515),strikethrough:(0,q.register)("strikethrough",60516),openInProduct:(0,q.register)("open-in-product",60517),indexZero:(0,q.register)("index-zero",60518),agent:(0,q.register)("agent",60519),editCode:(0,q.register)("edit-code",60520),repoSelected:(0,q.register)("repo-selected",60521),skip:(0,q.register)("skip",60522),mergeInto:(0,q.register)("merge-into",60523),gitBranchChanges:(0,q.register)("git-branch-changes",60524),gitBranchStagedChanges:(0,q.register)("git-branch-staged-changes",60525),gitBranchConflicts:(0,q.register)("git-branch-conflicts",60526),gitBranch:(0,q.register)("git-branch",60527),gitBranchCreate:(0,q.register)("git-branch-create",60527),gitBranchDelete:(0,q.register)("git-branch-delete",60527),searchLarge:(0,q.register)("search-large",60528),terminalGitBash:(0,q.register)("terminal-git-bash",60529),windowActive:(0,q.register)("window-active",60530),forward:(0,q.register)("forward",60531),download:(0,q.register)("download",60532),clockface:(0,q.register)("clockface",60533),unarchive:(0,q.register)("unarchive",60534),sessionInProgress:(0,q.register)("session-in-progress",60535),collectionSmall:(0,q.register)("collection-small",60536),vmSmall:(0,q.register)("vm-small",60537),cloudSmall:(0,q.register)("cloud-small",60538),addSmall:(0,q.register)("add-small",60539),removeSmall:(0,q.register)("remove-small",60540),worktreeSmall:(0,q.register)("worktree-small",60541),worktree:(0,q.register)("worktree",60542),screenCut:(0,q.register)("screen-cut",60543),ask:(0,q.register)("ask",60544),openai:(0,q.register)("openai",60545),claude:(0,q.register)("claude",60546)}});var qWt=T(TO=>{"use strict";f();Object.defineProperty(TO,"__esModule",{value:!0});TO.Codicon=TO.codiconsDerived=void 0;TO.getAllCodicons=uis;var Tc=QWt(),lis=o2n();function uis(){return Object.values(TO.Codicon)}a(uis,"getAllCodicons");TO.codiconsDerived={dialogError:(0,Tc.register)("dialog-error","error"),dialogWarning:(0,Tc.register)("dialog-warning","warning"),dialogInfo:(0,Tc.register)("dialog-info","info"),dialogClose:(0,Tc.register)("dialog-close","close"),treeItemExpanded:(0,Tc.register)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,Tc.register)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,Tc.register)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,Tc.register)("tree-filter-clear","close"),treeItemLoading:(0,Tc.register)("tree-item-loading","loading"),menuSelection:(0,Tc.register)("menu-selection","check"),menuSubmenu:(0,Tc.register)("menu-submenu","chevron-right"),menuBarMore:(0,Tc.register)("menubar-more","more"),scrollbarButtonLeft:(0,Tc.register)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,Tc.register)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,Tc.register)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,Tc.register)("scrollbar-button-down","triangle-down"),toolBarMore:(0,Tc.register)("toolbar-more","more"),quickInputBack:(0,Tc.register)("quick-input-back","arrow-left"),dropDownButton:(0,Tc.register)("drop-down-button",60084),symbolCustomColor:(0,Tc.register)("symbol-customcolor",60252),exportIcon:(0,Tc.register)("export",60332),workspaceUnspecified:(0,Tc.register)("workspace-unspecified",60355),newLine:(0,Tc.register)("newline",60394),thumbsDownFilled:(0,Tc.register)("thumbsdown-filled",60435),thumbsUpFilled:(0,Tc.register)("thumbsup-filled",60436),gitFetch:(0,Tc.register)("git-fetch",60445),lightbulbSparkleAutofix:(0,Tc.register)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,Tc.register)("debug-breakpoint-pending",60377)};TO.Codicon={...lis.codiconsLibrary,...TO.codiconsDerived}});var jWt=T(gW=>{"use strict";f();Object.defineProperty(gW,"__esModule",{value:!0});gW.ThemeIcon=gW.ThemeColor=void 0;gW.themeColorFromId=dis;var GWt=qWt(),HWt;(function(t){function e(r){return!!r&&typeof r=="object"&&typeof r.id=="string"}a(e,"isThemeColor"),t.isThemeColor=e})(HWt||(gW.ThemeColor=HWt={}));function dis(t){return{id:t}}a(dis,"themeColorFromId");var s2n;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9-]+",t.iconModifierExpression="~[A-Za-z]+",t.iconNameCharacter="[A-Za-z0-9~-]";let e=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function r(A){let y=e.exec(A.id);if(!y)return r(GWt.Codicon.error);let[,E,_]=y,v=["codicon","codicon-"+E];return _&&v.push("codicon-modifier-"+_.substring(1)),v}a(r,"asClassNameArray"),t.asClassNameArray=r;function n(A){return r(A).join(" ")}a(n,"asClassName"),t.asClassName=n;function o(A){return"."+r(A).join(".")}a(o,"asCSSSelector"),t.asCSSSelector=o;function s(A){return!!A&&typeof A=="object"&&typeof A.id=="string"&&(typeof A.color>"u"||HWt.isThemeColor(A.color))}a(s,"isThemeIcon"),t.isThemeIcon=s;let c=new RegExp(`^\\$\\((${t.iconNameExpression}(?:${t.iconModifierExpression})?)\\)$`);function l(A){let y=c.exec(A);if(!y)return;let[,E]=y;return{id:E}}a(l,"fromString"),t.fromString=l;function u(A){return{id:A}}a(u,"fromId"),t.fromId=u;function d(A,y){let E=A.id,_=E.lastIndexOf("~");return _!==-1&&(E=E.substring(0,_)),y&&(E=`${E}~${y}`),{id:E}}a(d,"modify"),t.modify=d;function p(A){let y=A.id.lastIndexOf("~");if(y!==-1)return A.id.substring(y+1)}a(p,"getModifier"),t.getModifier=p;function h(A,y){return A.id===y.id&&A.color?.id===y.color?.id}a(h,"isEqual"),t.isEqual=h;function m(A){return A?.id===GWt.Codicon.file.id}a(m,"isFile"),t.isFile=m;function g(A){return A?.id===GWt.Codicon.folder.id}a(g,"isFolder"),t.isFolder=g})(s2n||(gW.ThemeIcon=s2n={}))});var rTe=T(a7=>{"use strict";f();Object.defineProperty(a7,"__esModule",{value:!0});a7.Icon=void 0;a7.overrideNowValue=fis;a7.now=pis;a7.shortenOpportunityId=his;a7.checkIfCursorAtEndOfLine=mis;var tTe=jWt(),$Wt=-1;function fis(t){$Wt=t}a(fis,"overrideNowValue");function pis(){return $Wt!==-1?$Wt:Date.now()}a(pis,"now");var a2n;(function(t){t.circleSlash={themeIcon:tTe.ThemeIcon.fromId("circle-slash"),svg:''},t.error={themeIcon:tTe.ThemeIcon.fromId("error"),svg:''},t.skipped={themeIcon:tTe.ThemeIcon.fromId("testing-skipped-icon"),svg:''},t.lightbulbFull={themeIcon:tTe.ThemeIcon.fromId("refactor-preview-view-icon"),svg:''},t.database={themeIcon:tTe.ThemeIcon.fromId("database"),svg:''}})(a2n||(a7.Icon=a2n={}));function his(t){return t.substring(4,8)}a(his,"shortenOpportunityId");function mis(t,e){return t.substring(e).match(/^\s*$/)!==null}a(mis,"checkIfCursorAtEndOfLine")});var dXe=T(j5=>{"use strict";f();var gis=j5&&j5.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ais=j5&&j5.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yis=j5&&j5.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oExplanation for icons -`),e.push(`- ${Hv.Icon.lightbulbFull.svg} - model had suggestions -`),e.push(`- ${Hv.Icon.circleSlash.svg} - model had NO suggestions -`),e.push(`- ${Hv.Icon.database.svg} - response is from cache -`),e.push(`- ${Hv.Icon.error.svg} - error happened -`),e.push(`- ${Hv.Icon.skipped.svg} - fetching started but got cancelled +`),e.push(`- ${Pv.Icon.lightbulbFull.svg} - model had suggestions +`),e.push(`- ${Pv.Icon.circleSlash.svg} - model had NO suggestions +`),e.push(`- ${Pv.Icon.database.svg} - response is from cache +`),e.push(`- ${Pv.Icon.error.svg} - error happened +`),e.push(`- ${Pv.Icon.skipped.svg} - fetching started but got cancelled `),e.push(` `),e.push(`Inline Edit Provider: ${this._statelessNextEditProviderId??""} `),e.push("Chat Endpoint"),e.push("```"),e.push(`Model name: ${this._endpointInfo?.modelName??""}`),e.push(`URL: ${this._endpointInfo?.url??""}`),e.push("```");let r=this._logContextOfCachedEdit?`(cached #${this._logContextOfCachedEdit.requestId})`:"(not cached)";if(e.push(`Opportunity ID: ${this._context?this._context.requestUuid:""}`),this.headerRequestId&&(e.push(""),e.push(`Header Request ID: ${this.headerRequestId} ${r}`)),this._nextEditRequest&&(e.push(`## Latest user edits ${r}`),e.push(`
Edit @@ -529,11 +529,11 @@ ${n.text} `);let n=this.prompt;e.push("````"),e.push(...n.split(` `)),e.push("````"),e.push(`
-`)}return this.error&&(e.push(`## Error ${r}`),e.push("```"),e.push(rZe.ErrorUtils.toString(rZe.ErrorUtils.fromUnknown(this.error))),e.push("```")),this.response&&(e.push(`## Response ${r}`),e.push(`
Click to view +`)}return this.error&&(e.push(`## Error ${r}`),e.push("```"),e.push(uXe.ErrorUtils.toString(uXe.ErrorUtils.fromUnknown(this.error))),e.push("```")),this.response&&(e.push(`## Response ${r}`),e.push(`
Click to view `),e.push("````"),e.push(this.response),e.push("````"),e.push(`
`)),this._responseResults&&(e.push(`## Response Results ${r}`),e.push(`
Click to view -`),e.push("```"),e.push(lRn.stringify(this._responseResults,null," ")),e.push("```"),e.push(` +`),e.push("```"),e.push(c2n.stringify(this._responseResults,null," ")),e.push("```"),e.push(`
`)),this._isAccepted!==void 0&&e.push(`## Accepted : ${this._isAccepted?"Yes":"No"}`),this._rebaseFailure&&(e.push("## Rebase Failure"),e.push(`
Click to view `),e.push(this._rebaseFailure.toMarkdown()),e.push(` @@ -545,8 +545,8 @@ ${n.text} `),e.push("```"),e.push(...this._trace),e.push("```"),e.push(`
`)),e.join(` -`)}toMinimalLog(){let e=[];return this._nesTypePicked==="diagnostics"&&this._diagnosticsResultEdit?(e.push("## Result (Diagnostics):"),e.push("``` patch"),e.push(this._diagnosticsResultEdit.toString()),e.push("```")):this._nesTypePicked==="llm"&&this._resultEdit?(e.push("## Result:"),e.push("``` patch"),typeof this._resultEdit=="string"?e.push(this._resultEdit):e.push(this._resultEdit.toString()),e.push("```")):e.push("## Result: "),this.error&&(e.push("## Error:"),e.push("```"),e.push(rZe.ErrorUtils.toString(rZe.ErrorUtils.fromUnknown(this.error))),e.push("```")),e.push("### Info:"),e.push(`**From cache:** ${this._logContextOfCachedEdit?`YES (Request: ${this._logContextOfCachedEdit.requestId})`:"NO"}`),this._context&&(e.push(`**Trigger Kind:** ${this._context.triggerKind===0?"Manual":"Automatic"}`),e.push(`**Request UUID:** ${this._context.requestUuid}`)),e.join(` -`)}setStatelessNextEditProviderId(e){this._statelessNextEditProviderId=e}setRequestInput(e){this._isVisible=!0,this._nextEditRequest=e,this.fireDidChange()}setResult(e){this._isVisible=!0,this._resultEdit=e,this.fireDidChange()}setDiagnosticsResult(e){this._isVisible=!0,this._diagnosticsResultEdit=e,this.fireDidChange()}setPickedNESType(e){return this._nesTypePicked=e,this}setIsCachedResult(e){this._logContextOfCachedEdit=e,this.recordingBookmark=e.recordingBookmark,e._nextEditRequest&&(this._nextEditRequest=e._nextEditRequest),e._resultEdit&&this.setResult(e._resultEdit),e._diagnosticsResultEdit&&this.setDiagnosticsResult(e._diagnosticsResultEdit),e._endpointInfo&&this.setEndpointInfo(e._endpointInfo.url,e._endpointInfo.modelName),e.headerRequestId&&this.setHeaderRequestId(e.headerRequestId),e.prompt&&this.setPrompt(e.prompt),e.response&&this.setResponse(e.response),e.responseResults&&this.setResponseResults(e.responseResults),e.fullResponsePromise&&this.setFullResponse(e.fullResponsePromise),e.error&&this.setError(e.error),this._isVisible=!0,this._icon=Hv.Icon.database,this.fireDidChange()}setEndpointInfo(e,r){this._endpointInfo={url:e,modelName:r},this.fireDidChange()}get endpointInfo(){return this._endpointInfo}setHeaderRequestId(e){this._headerRequestId=e,this.fireDidChange()}get headerRequestId(){return this._headerRequestId}get prompt(){return this._prompt}setPrompt(e){this._isVisible=!0,typeof e=="string"?this._prompt=e:this._prompt=(0,vrs.stringifyChatMessages)(e),this.fireDidChange()}getIcon(){return this._icon?.themeIcon}setIsSkipped(){this._isVisible=!1,this._icon=Hv.Icon.skipped,this.fireDidChange()}markAsFromCache(){this._isVisible=!0,this._icon=Hv.Icon.database,this.fireDidChange()}markAsNoSuggestions(){this._isVisible=!0,this._icon=Hv.Icon.circleSlash,this.fireDidChange()}setError(e){this._isVisible=!0,this.error=e,this.error instanceof Crs.FetchCancellationError?this._icon=Hv.Icon.skipped:(0,yrs.isCancellationError)(this.error)?this._isVisible=!1:this._icon=Hv.Icon.error,this.fireDidChange()}setResponse(e){this._isVisible=!0,this.response=e,this.fireDidChange()}setFullResponse(e){this.fullResponsePromise=e,e.then(r=>this.fullResponse=r)}async allPromisesResolved(){await this.fullResponsePromise}setProviderStartTime(){this.providerStartTime=Date.now(),this.fireDidChange()}setProviderEndTime(){this.providerEndTime=Date.now(),this.fireDidChange()}setFetchStartTime(){this.fetchStartTime=Date.now(),this.fireDidChange()}setFetchEndTime(){this.fetchEndTime=Date.now(),this.fireDidChange()}get responseResults(){return this._responseResults}setResponseResults(e){this._isVisible=!0,this._responseResults=e,this._icon??=Hv.Icon.lightbulbFull,this.fireDidChange()}getDebugName(){return`NES | ${brs(this.filePath)} (v${this.version})`}getMarkdownTitle(){return(this._icon?`${this._icon.svg} `:"")+this.getDebugName()}setRecentEdit(e){this._recentEdit=e}trace(e){this._trace.push(e),this.fireDidChange()}_renderTraceDiagram(){if(this._trace.length===0)return[];let e=[];e.push("## Trace Diagram"),e.push(`
Trace Diagram +`)}toMinimalLog(){let e=[];return this._nesTypePicked==="diagnostics"&&this._diagnosticsResultEdit?(e.push("## Result (Diagnostics):"),e.push("``` patch"),e.push(this._diagnosticsResultEdit.toString()),e.push("```")):this._nesTypePicked==="llm"&&this._resultEdit?(e.push("## Result:"),e.push("``` patch"),typeof this._resultEdit=="string"?e.push(this._resultEdit):e.push(this._resultEdit.toString()),e.push("```")):e.push("## Result: "),this.error&&(e.push("## Error:"),e.push("```"),e.push(uXe.ErrorUtils.toString(uXe.ErrorUtils.fromUnknown(this.error))),e.push("```")),e.push("### Info:"),e.push(`**From cache:** ${this._logContextOfCachedEdit?`YES (Request: ${this._logContextOfCachedEdit.requestId})`:"NO"}`),this._context&&(e.push(`**Trigger Kind:** ${this._context.triggerKind===0?"Manual":"Automatic"}`),e.push(`**Request UUID:** ${this._context.requestUuid}`)),e.join(` +`)}setStatelessNextEditProviderId(e){this._statelessNextEditProviderId=e}setRequestInput(e){this._isVisible=!0,this._nextEditRequest=e,this.fireDidChange()}setResult(e){this._isVisible=!0,this._resultEdit=e,this.fireDidChange()}setDiagnosticsResult(e){this._isVisible=!0,this._diagnosticsResultEdit=e,this.fireDidChange()}setPickedNESType(e){return this._nesTypePicked=e,this}setIsCachedResult(e){this._logContextOfCachedEdit=e,this.recordingBookmark=e.recordingBookmark,e._nextEditRequest&&(this._nextEditRequest=e._nextEditRequest),e._resultEdit&&this.setResult(e._resultEdit),e._diagnosticsResultEdit&&this.setDiagnosticsResult(e._diagnosticsResultEdit),e._endpointInfo&&this.setEndpointInfo(e._endpointInfo.url,e._endpointInfo.modelName),e.headerRequestId&&this.setHeaderRequestId(e.headerRequestId),e.prompt&&this.setPrompt(e.prompt),e.response&&this.setResponse(e.response),e.responseResults&&this.setResponseResults(e.responseResults),e.fullResponsePromise&&this.setFullResponse(e.fullResponsePromise),e.error&&this.setError(e.error),this._isVisible=!0,this._icon=Pv.Icon.database,this.fireDidChange()}setEndpointInfo(e,r){this._endpointInfo={url:e,modelName:r},this.fireDidChange()}get endpointInfo(){return this._endpointInfo}setHeaderRequestId(e){this._headerRequestId=e,this.fireDidChange()}get headerRequestId(){return this._headerRequestId}get prompt(){return this._prompt}setPrompt(e){this._isVisible=!0,typeof e=="string"?this._prompt=e:this._prompt=(0,bis.stringifyChatMessages)(e),this.fireDidChange()}getIcon(){return this._icon?.themeIcon}setIsSkipped(){this._isVisible=!1,this._icon=Pv.Icon.skipped,this.fireDidChange()}markAsFromCache(){this._isVisible=!0,this._icon=Pv.Icon.database,this.fireDidChange()}markAsNoSuggestions(){this._isVisible=!0,this._icon=Pv.Icon.circleSlash,this.fireDidChange()}setError(e){this._isVisible=!0,this.error=e,this.error instanceof Cis.FetchCancellationError?this._icon=Pv.Icon.skipped:(0,Eis.isCancellationError)(this.error)?this._isVisible=!1:this._icon=Pv.Icon.error,this.fireDidChange()}setResponse(e){this._isVisible=!0,this.response=e,this.fireDidChange()}setFullResponse(e){this.fullResponsePromise=e,e.then(r=>this.fullResponse=r)}async allPromisesResolved(){await this.fullResponsePromise}setProviderStartTime(){this.providerStartTime=Date.now(),this.fireDidChange()}setProviderEndTime(){this.providerEndTime=Date.now(),this.fireDidChange()}setFetchStartTime(){this.fetchStartTime=Date.now(),this.fireDidChange()}setFetchEndTime(){this.fetchEndTime=Date.now(),this.fireDidChange()}get responseResults(){return this._responseResults}setResponseResults(e){this._isVisible=!0,this._responseResults=e,this._icon??=Pv.Icon.lightbulbFull,this.fireDidChange()}getDebugName(){return`NES | ${Tis(this.filePath)} (v${this.version})`}getMarkdownTitle(){return(this._icon?`${this._icon.svg} `:"")+this.getDebugName()}setRecentEdit(e){this._recentEdit=e}trace(e){this._trace.push(e),this.fireDidChange()}_renderTraceDiagram(){if(this._trace.length===0)return[];let e=[];e.push("## Trace Diagram"),e.push(`
Trace Diagram `),e.push("```");let r=this._trace.map(d=>{let p=d.match(/^\[\s*(\d+)ms\]/),h=p?parseInt(p[1],10):0,m=d.replace(/^\[\s*\d+ms\]\s*/,""),g=[],A=m,y;for(;y=A.match(/^\[([^\]]+)\]/);)g.push(y[1]),A=A.slice(y[0].length);let E=A.trim();return{timestamp:h,segments:g,message:E}});if(r.length===0)return e.push("(no trace data)"),e.push("```"),e.push(`
`),e;let n=Math.max(...r.map(d=>d.timestamp)),o=Math.max(6,String(n).length+3),s=new Map,c=[];r.forEach((d,p)=>{let h=d.segments.join("|");for(let[g,A]of s)!h.startsWith(g)&&h!==g&&(c.push({path:g,startTime:A.startTime,endTime:d.timestamp,depth:A.depth,name:g.split("|").pop()||""}),s.delete(g));let m="";d.segments.forEach((g,A)=>{m=m?`${m}|${g}`:g,s.has(m)||s.set(m,{startTime:d.timestamp,depth:A})})});let l=r[r.length-1]?.timestamp||0;for(let[d,p]of s)c.push({path:d,startTime:p.startTime,endTime:l,depth:p.depth,name:d.split("|").pop()||""});e.push(""),e.push("Timeline (nested call hierarchy):"),e.push("\u2500".repeat(60));let u=[];for(let d of r){let p=`[${String(d.timestamp).padStart(o-3)}ms]`,h="\u2502 ",m="\u251C\u2500\u2500 ",g="",A="",y=!1;for(let E=0;Ethis.addLog(`- ${r}`))}addCodeblockToLog(e,r=""){this._logs.push(`\`\`\`${r} ${e} \`\`\` -`)}setDiagnosticsData(e){this._fileDiagnostics=e}setTerminalData(e){this._terminalOutput=e}setLanguageContext(e){this._languageContext=e}toJSON(){return{requestId:this.requestId,time:this.time,filePath:this.filePath,version:this.version,statelessNextEditProviderId:this._statelessNextEditProviderId,nextEditRequest:this._nextEditRequest?.serialize(),diagnosticsResultEdit:this._diagnosticsResultEdit?.toString(),resultEdit:this._resultEdit?.toString(),isCachedResult:!!this._logContextOfCachedEdit,prompt:this.prompt,error:String(this.error),response:this.fullResponse,responseResults:lRn.stringify(this._responseResults,null," "),providerStartTime:this.providerStartTime,providerEndTime:this.providerEndTime,fetchStartTime:this.fetchStartTime,fetchEndTime:this.fetchEndTime,logs:this._logs,isAccepted:this._isAccepted,languageContext:this._languageContext?(0,_rs.serializeLanguageContext)(this._languageContext):void 0,diagnostics:this._fileDiagnostics,terminalOutput:this._terminalOutput}}};rD.InlineEditRequestLogContext=IWt;function brs(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?t:t.slice(e+1)}a(brs,"basename")});var uRn=T(iZe=>{"use strict";f();Object.defineProperty(iZe,"__esModule",{value:!0});iZe.GhostTextLogContext=void 0;var Trs=nZe(),Srs=Im(),xWt=class extends Trs.InlineEditRequestLogContext{static{a(this,"GhostTextLogContext")}getDebugName(){return`Ghost | ${(0,Srs.basename)(this.filePath)} (v${this.version})`}};iZe.GhostTextLogContext=xWt});var O7=T(Ace=>{"use strict";f();Object.defineProperty(Ace,"__esModule",{value:!0});Ace.CopilotTokenStore=Ace.ICopilotTokenStore=void 0;var Irs=qr(),xrs=nc(),wrs=so();Ace.ICopilotTokenStore=(0,Irs.createServiceIdentifier)("ICopilotTokenStore");var wWt=class extends wrs.Disposable{static{a(this,"CopilotTokenStore")}constructor(){super(...arguments),this._onDidStoreUpdate=this._register(new xrs.Emitter),this.onDidStoreUpdate=this._onDidStoreUpdate.event}get copilotToken(){return this._copilotToken}set copilotToken(e){let r=this._copilotToken?.token;this._copilotToken=e,r!==e?.token&&this._onDidStoreUpdate.fire()}};Ace.CopilotTokenStore=wWt});var Rp=T(Vm=>{"use strict";f();var Rrs=Vm&&Vm.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Prs=Vm&&Vm.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Vm,"__esModule",{value:!0});Vm.TelemetryTrustedValue=Vm.ITelemetryService=Vm.TelemetryUserConfigImpl=Vm.ITelemetryUserConfig=void 0;Vm.createTrackingIdGetter=Nrs;Vm.multiplexProperties=Mrs;var dRn=qr(),krs=O7();Vm.ITelemetryUserConfig=(0,dRn.createServiceIdentifier)("ITelemetryUserConfig");var RWt=class{static{a(this,"TelemetryUserConfigImpl")}constructor(e,r,n){this._tokenStore=n,this.trackingId=e,this.optedIn=r??!1,this.updateFromToken(this._tokenStore.copilotToken),this._tokenStore.onDidStoreUpdate(()=>{this.updateFromToken(this._tokenStore.copilotToken)})}updateFromToken(e){if(!e)return;let r=e.getTokenValue("rt")==="1",n=e.getTokenValue("tid");n!==void 0&&(this.trackingId=n,this.organizationsList=e.organizationList.toString(),this.enterpriseList=e.enterpriseList.toString(),this.optedIn=r)}};Vm.TelemetryUserConfigImpl=RWt;Vm.TelemetryUserConfigImpl=RWt=Rrs([Prs(2,krs.ICopilotTokenStore)],RWt);function Nrs(t){let e=t.copilotToken?.getTokenValue("tid");return t.onDidStoreUpdate(()=>{let r=t.copilotToken?.getTokenValue("tid");r&&(e=r)}),()=>e}a(Nrs,"createTrackingIdGetter");Vm.ITelemetryService=(0,dRn.createServiceIdentifier)("ITelemetryService");var PWt=class{static{a(this,"TelemetryTrustedValue")}constructor(e){this.value=e,this.isTrustedTelemetryValue=!0}};Vm.TelemetryTrustedValue=PWt;var sSe=8192,Drs=50;function Mrs(t){let e={...t};for(let r in t){let n=t[r],o=n?.length??0;if(o>sSe){let s=0,c=0;for(;o>0&&c1&&(l=r+"_"+(c<10?"0":"")+c);let u=s+sSe;o{"use strict";f();var Ors=co&&co.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Brs=co&&co.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lrs=co&&co.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ors(e,t,r);return Brs(e,t),e},kWt=co&&co.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},NWt=co&&co.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var OWt=dz&&dz.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},BWt=dz&&dz.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]this.maxSizeBytes?[4,this._createBackupFile(r)]:[3,14];case 13:return u.sent(),[3,16];case 14:return[4,nD.appendFileAsync(this._fileFullPath,r)];case 15:u.sent(),u.label=16;case 16:return[3,18];case 17:return l=u.sent(),console.log(this.TAG,"Failed to create backup file: "+(l&&l.message)),[3,18];case 18:return[2]}})})},t.prototype._createBackupFile=function(e){return OWt(this,void 0,void 0,function(){var r,n,o;return BWt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),[4,nD.readFileAsync(this._fileFullPath)];case 1:return r=s.sent(),n=uz.join(this._tempDir,new Date().getTime()+"."+this._logFileName),[4,nD.writeFileAsync(n,r)];case 2:return s.sent(),[3,5];case 3:return o=s.sent(),console.log("Failed to generate backup log file",o),[3,5];case 4:return nD.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}})})},t.prototype._fileCleanupTask=function(){return OWt(this,void 0,void 0,function(){var e,r,n,o,s,c=this;return BWt(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,nD.readdirAsync(this._tempDir)];case 1:e=l.sent(),e=e.filter(function(u){return uz.basename(u).indexOf(c._backUpNameFormat)>-1}),e.sort(function(u,d){var p=new Date(parseInt(u.split(c._backUpNameFormat)[0])),h=new Date(parseInt(d.split(c._backUpNameFormat)[0]));if(p=h)return 1}),r=e.length,n=0,l.label=2;case 2:return n{"use strict";f();var gRn=mRn(),$rs="APPLICATION_INSIGHTS_ENABLE_DEBUG_LOGS",Vrs="APPLICATION_INSIGHTS_DISABLE_WARNING_LOGS",Wrs=(function(){function t(){}return a(t,"Logging"),t.info=function(e){for(var r=[],n=1;n{zrs.exports={}});var sZe=T(yce=>{"use strict";f();var Yrs=yce&&yce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yce,"__esModule",{value:!0});yce.JsonConfig=void 0;var Krs=require("fs"),oZe=require("path"),LWt=Kc(),Jrs=Yrs(yRn()),Xrs="APPLICATIONINSIGHTS_CONFIGURATION_FILE",Zrs="APPLICATIONINSIGHTS_CONNECTION_STRING",ERn="APPSETTING_",CRn="APPINSIGHTS_INSTRUMENTATIONKEY",_Rn="APPINSIGHTS_INSTRUMENTATION_KEY",ens="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",tns="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",rns="http_proxy",nns="https_proxy",ins="APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL",ons="APPLICATION_INSIGHTS_NO_STATSBEAT",sns="APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE",ans="APPLICATION_INSIGHTS_NO_PATCH_MODULES",cns="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED",lns="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING",uns="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE",dns="APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED",fns="APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING",pns=(function(){function t(){this.connectionString=process.env[Zrs],this.instrumentationKey=process.env[CRn]||process.env[ERn+CRn]||process.env[_Rn]||process.env[ERn+_Rn],!this.connectionString&&this.instrumentationKey&&LWt.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env[tns],this.extendedMetricDisablers=process.env[ens],this.proxyHttpUrl=process.env[rns],this.proxyHttpsUrl=process.env[nns],this.noDiagnosticChannel=!!process.env[ins],this.disableStatsbeat=!!process.env[ons],this.noHttpAgentKeepAlive=!!process.env[sns],this.noPatchModules=process.env[ans]||"",this.enableWebInstrumentation=!!process.env[cns]||!!process.env[dns],this.webInstrumentationSrc=process.env[uns]||"",this.webInstrumentationConnectionString=process.env[lns]||process.env[fns]||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return a(t,"JsonConfig"),t.getInstance=function(){return t._instance||(t._instance=new t),t._instance},t.prototype._loadJsonFile=function(){var e="",r=process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT;if(r)e=r;else{var n="applicationinsights.json",o=oZe.join(__dirname,"../../");this._tempDir=oZe.join(o,n);var s=process.env[Xrs];if(s){oZe.isAbsolute(s)?this._tempDir=s:this._tempDir=oZe.join(o,s);try{e=Krs.readFileSync(this._tempDir,"utf8")}catch(l){LWt.warn("Failed to read JSON config file: ",l)}}else e=JSON.stringify(Jrs.default)}try{var c=JSON.parse(e);c.disableStatsbeat!=null&&(this.disableStatsbeat=c.disableStatsbeat),c.disableAllExtendedMetrics!=null&&(this.disableAllExtendedMetrics=c.disableStatsbeat),c.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=c.noDiagnosticChannel),c.noHttpAgentKeepAlive!=null&&(this.noHttpAgentKeepAlive=c.noHttpAgentKeepAlive),c.connectionString!=null&&(this.connectionString=c.connectionString),c.extendedMetricDisablers!=null&&(this.extendedMetricDisablers=c.extendedMetricDisablers),c.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=c.noDiagnosticChannel),c.proxyHttpUrl!=null&&(this.proxyHttpUrl=c.proxyHttpUrl),c.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=c.proxyHttpsUrl),c.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=c.proxyHttpsUrl),c.noPatchModules!=null&&(this.noPatchModules=c.noPatchModules),c.enableAutoWebSnippetInjection!=null&&(this.enableWebInstrumentation=c.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),c.enableWebInstrumentation!=null&&(this.enableWebInstrumentation=c.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),c.webSnippetConnectionString!=null&&(this.webInstrumentationConnectionString=c.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),c.webInstrumentationConnectionString!=null&&(this.webInstrumentationConnectionString=c.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),c.webInstrumentationConfig!=null&&(this.webInstrumentationConfig=c.webInstrumentationConfig),c.webInstrumentationSrc!=null&&(this.webInstrumentationSrc=c.webInstrumentationSrc),c.enableLoggerErrorToTrace!=null&&(this.enableLoggerErrorToTrace=c.enableLoggerErrorToTrace),this.endpointUrl=c.endpointUrl,this.maxBatchSize=c.maxBatchSize,this.maxBatchIntervalMs=c.maxBatchIntervalMs,this.disableAppInsights=c.disableAppInsights,this.samplingPercentage=c.samplingPercentage,this.correlationIdRetryIntervalMs=c.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=c.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=c.ignoreLegacyHeaders,this.distributedTracingMode=c.distributedTracingMode,this.enableAutoCollectExternalLoggers=c.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=c.enableAutoCollectConsole,this.enableLoggerErrorToTrace=c.enableLoggerErrorToTrace,this.enableAutoCollectExceptions=c.enableAutoCollectExceptions,this.enableAutoCollectPerformance=c.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=c.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=c.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=c.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=c.enableAutoCollectRequests,this.enableAutoCollectDependencies=c.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=c.enableAutoDependencyCorrelation,this.enableAutoCollectIncomingRequestAzureFunctions=c.enableAutoCollectIncomingRequestAzureFunctions,this.enableUseAsyncHooks=c.enableUseAsyncHooks,this.enableUseDiskRetryCaching=c.enableUseDiskRetryCaching,this.enableResendInterval=c.enableResendInterval,this.enableMaxBytesOnDisk=c.enableMaxBytesOnDisk,this.enableInternalDebugLogging=c.enableInternalDebugLogging,this.enableInternalWarningLogging=c.enableInternalWarningLogging,this.enableSendLiveMetrics=c.enableSendLiveMetrics,this.quickPulseHost=c.quickPulseHost}catch(l){LWt.warn("Invalid JSON config file: ",l)}},t})();yce.JsonConfig=pns});var FWt=T(aZe=>{"use strict";f();Object.defineProperty(aZe,"__esModule",{value:!0});aZe.makePatchingRequire=void 0;var hns=require("path"),mns=J8(),vRn=Xd(),TRn=require("module"),gns=Object.keys(process.binding("natives")),bRn=TRn.prototype.require;function Ans(t){var e={};return a(function(n){var o=bRn.apply(this,arguments);if(t[n]){var s=TRn._resolveFilename(n,this);if(e.hasOwnProperty(s))return e[s];var c=void 0;if(gns.indexOf(n)<0)try{c=bRn.call(this,hns.join(n,"package.json")).version}catch{return o}else c=process.version.substring(1);var l=c.indexOf("-");l>=0&&(c=c.substring(0,l));for(var u=o,d=0,p=t[n];d{yns.exports={name:"diagnostic-channel",version:"1.1.1",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"eslint ./ --fix",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js",debug:"mocha --inspect-brk ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^7.5.3"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",sinon:"1.17.6",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}});var Xd=T(MS=>{"use strict";f();Object.defineProperty(MS,"__esModule",{value:!0});MS.channel=MS.ContextPreservingEventEmitter=MS.trueFilter=MS.makePatchingRequire=void 0;var Ens=FWt(),Cns=FWt();Object.defineProperty(MS,"makePatchingRequire",{enumerable:!0,get:a(function(){return Cns.makePatchingRequire},"get")});var _ns=a(function(t){return!0},"trueFilter");MS.trueFilter=_ns;var xRn=(function(){function t(){this.version=SRn().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.modulesPatched=[],this.currentlyPublishing=!1}return a(t,"ContextPreservingEventEmitter"),t.prototype.shouldPublish=function(e){var r=this.subscribers[e];return r?r.some(function(n){var o=n.filter;return!o||o(!1)}):!1},t.prototype.publish=function(e,r){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var o={timestamp:Date.now(),data:r};this.currentlyPublishing=!0,n.forEach(function(s){var c=s.listener,l=s.filter;try{l&&l(!0)&&c(o)}catch{}}),this.currentlyPublishing=!1}}},t.prototype.subscribe=function(e,r,n,o){n===void 0&&(n=MS.trueFilter),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:r,filter:n,patchCallback:o});var s=this.checkIfModuleIsAlreadyPatched(e);s&&o&&o(s.name,s.version)},t.prototype.unsubscribe=function(e,r,n){n===void 0&&(n=MS.trueFilter);var o=this.subscribers[e];if(o){for(var s=0;s{f();wRn=typeof globalThis=="object"?globalThis:global});var PRn=Pe(()=>{f();RRn()});var kRn=Pe(()=>{f();PRn()});var j4,UWt=Pe(()=>{f();j4="1.9.0"});function vns(t){var e=new Set([t]),r=new Set,n=t.match(NRn);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return a(function(u){return u===t},"isExactmatch");function s(l){return r.add(l),!1}a(s,"_reject");function c(l){return e.add(l),!0}return a(c,"_accept"),a(function(u){if(e.has(u))return!0;if(r.has(u))return!1;var d=u.match(NRn);if(!d)return s(u);var p={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};return p.prerelease!=null||o.major!==p.major?s(u):o.major===0?o.minor===p.minor&&o.patch<=p.patch?c(u):s(u):o.minor<=p.minor?c(u):s(u)},"isCompatible")}var NRn,DRn,MRn=Pe(()=>{f();UWt();NRn=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;a(vns,"_makeCompatibilityCheck");DRn=vns(j4)});function iD(t,e,r,n){var o;n===void 0&&(n=!1);var s=cSe[aSe]=(o=cSe[aSe])!==null&&o!==void 0?o:{version:j4};if(!n&&s[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(c.stack||c.message),!1}if(s.version!==j4){var c=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+t+" does not match previously registered API v"+j4);return r.error(c.stack||c.message),!1}return s[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+j4+"."),!0}function jv(t){var e,r,n=(e=cSe[aSe])===null||e===void 0?void 0:e.version;if(!(!n||!DRn(n)))return(r=cSe[aSe])===null||r===void 0?void 0:r[t]}function oD(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+j4+".");var r=cSe[aSe];r&&delete r[t]}var bns,aSe,cSe,fz=Pe(()=>{f();kRn();UWt();MRn();bns=j4.split(".")[0],aSe=Symbol.for("opentelemetry.js.api."+bns),cSe=wRn;a(iD,"registerGlobal");a(jv,"getGlobal");a(oD,"unregisterGlobal")});function lSe(t,e,r){var n=jv("diag");if(n)return r.unshift(e),n[t].apply(n,Sns([],Tns(r),!1))}var Tns,Sns,ORn,BRn=Pe(()=>{f();fz();Tns=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Sns=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(Gs||(Gs={}))});function LRn(t,e){tGs.ALL&&(t=Gs.ALL),e=e||{};function r(n,o){var s=e[n];return typeof s=="function"&&t>=o?s.bind(e):function(){}}return a(r,"_filterFunc"),{error:r("error",Gs.ERROR),warn:r("warn",Gs.WARN),info:r("info",Gs.INFO),debug:r("debug",Gs.DEBUG),verbose:r("verbose",Gs.VERBOSE)}}var FRn=Pe(()=>{f();cZe();a(LRn,"createLogLevelDiagLogger")});var Ins,xns,wns,cA,pz=Pe(()=>{f();BRn();FRn();cZe();fz();Ins=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},xns=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n";p.warn("Current logger will be overwritten from "+m),h.warn("Current logger will overwrite one already registered from "+m)}return iD("diag",h,r,!0)},"setLogger");r.setLogger=n,r.disable=function(){oD(wns,r)},r.createComponentLogger=function(o){return new ORn(o)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return a(t,"DiagAPI"),t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})()});var Rns,Pns,URn,QRn=Pe(()=>{f();Rns=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Pns=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},URn=(function(){function t(e){this._entries=e?new Map(e):new Map}return a(t,"BaggageImpl"),t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=Rns(e,2),n=r[0],o=r[1];return[n,o]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],o=0;o{f();qRn=Symbol("BaggageEntryMetadata")});function HRn(t){return t===void 0&&(t={}),new URn(new Map(Object.entries(t)))}function Ece(t){return typeof t!="string"&&(kns.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:qRn,toString:a(function(){return t},"toString")}}var kns,QWt=Pe(()=>{f();pz();QRn();GRn();kns=cA.instance();a(HRn,"createBaggage");a(Ece,"baggageEntryMetadataFromString")});function YC(t){return Symbol.for(t)}var Nns,lZe,uSe=Pe(()=>{f();a(YC,"createContextKey");Nns=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,o){var s=new t(r._currentContext);return s._currentContext.set(n,o),s},r.deleteValue=function(n){var o=new t(r._currentContext);return o._currentContext.delete(n),o}}return a(t,"BaseContext"),t})(),lZe=new Nns});var qWt,jRn,$Rn=Pe(()=>{f();qWt=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],jRn=(function(){function t(){function e(n){return function(){for(var o=[],s=0;s{f();hz=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Dns=(function(){function t(){}return a(t,"NoopMeter"),t.prototype.createGauge=function(e,r){return Gns},t.prototype.createHistogram=function(e,r){return Hns},t.prototype.createCounter=function(e,r){return qns},t.prototype.createUpDownCounter=function(e,r){return jns},t.prototype.createObservableGauge=function(e,r){return Vns},t.prototype.createObservableCounter=function(e,r){return $ns},t.prototype.createObservableUpDownCounter=function(e,r){return Wns},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})(),uZe=(function(){function t(){}return a(t,"NoopMetric"),t})(),Mns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopCounterMetric"),e.prototype.add=function(r,n){},e})(uZe),Ons=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopUpDownCounterMetric"),e.prototype.add=function(r,n){},e})(uZe),Bns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopGaugeMetric"),e.prototype.record=function(r,n){},e})(uZe),Lns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopHistogramMetric"),e.prototype.record=function(r,n){},e})(uZe),GWt=(function(){function t(){}return a(t,"NoopObservableMetric"),t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),Fns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableCounterMetric"),e})(GWt),Uns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableGaugeMetric"),e})(GWt),Qns=(function(t){hz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableUpDownCounterMetric"),e})(GWt),HWt=new Dns,qns=new Mns,Gns=new Bns,Hns=new Lns,jns=new Ons,$ns=new Fns,Vns=new Uns,Wns=new Qns;a(VRn,"createNoopMeter")});var dZe,WRn=Pe(()=>{f();(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(dZe||(dZe={}))});var fZe,pZe,$Wt=Pe(()=>{f();fZe={get:a(function(t,e){if(t!=null)return t[e]},"get"),keys:a(function(t){return t==null?[]:Object.keys(t)},"keys")},pZe={set:a(function(t,e,r){t!=null&&(t[e]=r)},"set")}});var zns,Yns,zRn,YRn=Pe(()=>{f();uSe();zns=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Yns=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();YRn();fz();pz();Kns=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Jns=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(cd||(cd={}))});var fSe,pSe,Cce,hZe=Pe(()=>{f();WWt();fSe="0000000000000000",pSe="00000000000000000000000000000000",Cce={traceId:pSe,spanId:fSe,traceFlags:cd.NONE}});var L7,mZe=Pe(()=>{f();hZe();L7=(function(){function t(e){e===void 0&&(e=Cce),this._spanContext=e}return a(t,"NonRecordingSpan"),t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})()});function gZe(t){return t.getValue(zWt)||void 0}function KRn(){return gZe(B7.getInstance().active())}function hSe(t,e){return t.setValue(zWt,e)}function JRn(t){return t.deleteValue(zWt)}function XRn(t,e){return hSe(t,new L7(e))}function AZe(t){var e;return(e=gZe(t))===null||e===void 0?void 0:e.spanContext()}var zWt,YWt=Pe(()=>{f();uSe();mZe();dSe();zWt=YC("OpenTelemetry Context Key SPAN");a(gZe,"getSpan");a(KRn,"getActiveSpan");a(hSe,"setSpan");a(JRn,"deleteSpan");a(XRn,"setSpanContext");a(AZe,"getSpanContext")});function mz(t){return Zns.test(t)&&t!==pSe}function KWt(t){return eis.test(t)&&t!==fSe}function KC(t){return mz(t.traceId)&&KWt(t.spanId)}function ZRn(t){return new L7(t)}var Zns,eis,yZe=Pe(()=>{f();hZe();mZe();Zns=/^([0-9a-f]{32})$/i,eis=/^[0-9a-f]{16}$/i;a(mz,"isValidTraceId");a(KWt,"isValidSpanId");a(KC,"isSpanContextValid");a(ZRn,"wrapSpanContext")});function tis(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var JWt,EZe,XWt=Pe(()=>{f();dSe();YWt();mZe();yZe();JWt=B7.getInstance(),EZe=(function(){function t(){}return a(t,"NoopTracer"),t.prototype.startSpan=function(e,r,n){n===void 0&&(n=JWt.active());var o=!!r?.root;if(o)return new L7;var s=n&&AZe(n);return tis(s)&&KC(s)?new L7(s):new L7},t.prototype.startActiveSpan=function(e,r,n,o){var s,c,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,c=n,l=o);var u=c??JWt.active(),d=this.startSpan(e,s,u),p=hSe(u,d);return JWt.with(p,l,void 0,d)}},t})();a(tis,"isSpanContext")});var ris,CZe,ZWt=Pe(()=>{f();XWt();ris=new EZe,CZe=(function(){function t(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}return a(t,"ProxyTracer"),t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,o){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ris},t})()});var e2n,t2n=Pe(()=>{f();XWt();e2n=(function(){function t(){}return a(t,"NoopTracerProvider"),t.prototype.getTracer=function(e,r,n){return new EZe},t})()});var nis,mSe,ezt=Pe(()=>{f();ZWt();t2n();nis=new e2n,mSe=(function(){function t(){}return a(t,"ProxyTracerProvider"),t.prototype.getTracer=function(e,r,n){var o;return(o=this.getDelegateTracer(e,r,n))!==null&&o!==void 0?o:new CZe(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:nis},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,r,n)},t})()});var JC,r2n=Pe(()=>{f();(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(JC||(JC={}))});var _ce,n2n=Pe(()=>{f();(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(_ce||(_ce={}))});var vce,i2n=Pe(()=>{f();(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(vce||(vce={}))});function o2n(t){return sis.test(t)}function s2n(t){return ais.test(t)&&!cis.test(t)}var tzt,iis,ois,sis,ais,cis,a2n=Pe(()=>{f();tzt="[_0-9a-z-*/]",iis="[a-z]"+tzt+"{0,255}",ois="[a-z0-9]"+tzt+"{0,240}@[a-z]"+tzt+"{0,13}",sis=new RegExp("^(?:"+iis+"|"+ois+")$"),ais=/^[ -~]{0,255}[!-~]$/,cis=/,|=/;a(o2n,"validateKey");a(s2n,"validateValue")});var c2n,lis,l2n,u2n,d2n,f2n=Pe(()=>{f();a2n();c2n=32,lis=512,l2n=",",u2n="=",d2n=(function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return a(t,"TraceStateImpl"),t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+u2n+e.get(n)),r},[]).join(l2n)},t.prototype._parse=function(e){e.length>lis||(this._internalState=e.split(l2n).reverse().reduce(function(r,n){var o=n.trim(),s=o.indexOf(u2n);if(s!==-1){var c=o.slice(0,s),l=o.slice(s+1,n.length);o2n(c)&&s2n(l)&&r.set(c,l)}return r},new Map),this._internalState.size>c2n&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,c2n))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t})()});function p2n(t){return new d2n(t)}var h2n=Pe(()=>{f();f2n();a(p2n,"createTraceState")});var Bh,m2n=Pe(()=>{f();dSe();Bh=B7.getInstance()});var cn,g2n=Pe(()=>{f();pz();cn=cA.instance()});var uis,A2n,y2n=Pe(()=>{f();jWt();uis=(function(){function t(){}return a(t,"NoopMeterProvider"),t.prototype.getMeter=function(e,r,n){return HWt},t})(),A2n=new uis});var rzt,E2n,C2n=Pe(()=>{f();y2n();fz();pz();rzt="metrics",E2n=(function(){function t(){}return a(t,"MetricsAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return iD(rzt,e,cA.instance())},t.prototype.getMeterProvider=function(){return jv(rzt)||A2n},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){oD(rzt,cA.instance())},t})()});var gz,_2n=Pe(()=>{f();C2n();gz=E2n.getInstance()});var v2n,b2n=Pe(()=>{f();v2n=(function(){function t(){}return a(t,"NoopTextMapPropagator"),t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})()});function izt(t){return t.getValue(nzt)||void 0}function T2n(){return izt(B7.getInstance().active())}function S2n(t,e){return t.setValue(nzt,e)}function I2n(t){return t.deleteValue(nzt)}var nzt,x2n=Pe(()=>{f();dSe();uSe();nzt=YC("OpenTelemetry Baggage Key");a(izt,"getBaggage");a(T2n,"getActiveBaggage");a(S2n,"setBaggage");a(I2n,"deleteBaggage")});var ozt,dis,w2n,R2n=Pe(()=>{f();fz();b2n();$Wt();x2n();QWt();pz();ozt="propagation",dis=new v2n,w2n=(function(){function t(){this.createBaggage=HRn,this.getBaggage=izt,this.getActiveBaggage=T2n,this.setBaggage=S2n,this.deleteBaggage=I2n}return a(t,"PropagationAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return iD(ozt,e,cA.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=pZe),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=fZe),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){oD(ozt,cA.instance())},t.prototype._getGlobalPropagator=function(){return jv(ozt)||dis},t})()});var $v,P2n=Pe(()=>{f();R2n();$v=w2n.getInstance()});var szt,k2n,N2n=Pe(()=>{f();fz();ezt();yZe();YWt();pz();szt="trace",k2n=(function(){function t(){this._proxyTracerProvider=new mSe,this.wrapSpanContext=ZRn,this.isSpanContextValid=KC,this.deleteSpan=JRn,this.getSpan=gZe,this.getActiveSpan=KRn,this.getSpanContext=AZe,this.setSpan=hSe,this.setSpanContext=XRn}return a(t,"TraceAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=iD(szt,this._proxyTracerProvider,cA.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return jv(szt)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){oD(szt,cA.instance()),this._proxyTracerProvider=new mSe},t})()});var _l,D2n=Pe(()=>{f();N2n();_l=k2n.getInstance()});var $4={};Ri($4,{DiagConsoleLogger:()=>jRn,DiagLogLevel:()=>Gs,INVALID_SPANID:()=>fSe,INVALID_SPAN_CONTEXT:()=>Cce,INVALID_TRACEID:()=>pSe,ProxyTracer:()=>CZe,ProxyTracerProvider:()=>mSe,ROOT_CONTEXT:()=>lZe,SamplingDecision:()=>JC,SpanKind:()=>_ce,SpanStatusCode:()=>vce,TraceFlags:()=>cd,ValueType:()=>dZe,baggageEntryMetadataFromString:()=>Ece,context:()=>Bh,createContextKey:()=>YC,createNoopMeter:()=>VRn,createTraceState:()=>p2n,default:()=>fis,defaultTextMapGetter:()=>fZe,defaultTextMapSetter:()=>pZe,diag:()=>cn,isSpanContextValid:()=>KC,isValidSpanId:()=>KWt,isValidTraceId:()=>mz,metrics:()=>gz,propagation:()=>$v,trace:()=>_l});var fis,Fi=Pe(()=>{f();QWt();uSe();$Rn();cZe();jWt();WRn();$Wt();ZWt();ezt();r2n();n2n();i2n();WWt();h2n();yZe();hZe();m2n();g2n();_2n();P2n();D2n();fis={context:Bh,diag:cn,metrics:gz,propagation:$v,trace:_l}});function bce(t){return t.setValue(azt,!0)}function M2n(t){return t.deleteValue(azt)}function F7(t){return t.getValue(azt)===!0}var azt,gSe=Pe(()=>{f();Fi();azt=YC("OpenTelemetry SDK Context Key SUPPRESS_TRACING");a(bce,"suppressTracing");a(M2n,"unsuppressTracing");a(F7,"isTracingSuppressed")});var O2n,_Ze,Tce,vZe,B2n,L2n,F2n,czt=Pe(()=>{f();O2n="=",_Ze=";",Tce=",",vZe="baggage",B2n=180,L2n=4096,F2n=8192});function bZe(t){return t.reduce(function(e,r){var n=""+e+(e!==""?Tce:"")+r;return n.length>F2n?e:n},"")}function TZe(t){return t.getAllEntries().map(function(e){var r=pis(e,2),n=r[0],o=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(o.value);return o.metadata!==void 0&&(s+=_Ze+o.metadata.toString()),s})}function ASe(t){var e=t.split(_Ze);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(O2n);if(!(n<=0)){var o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),c;return e.length>0&&(c=Ece(e.join(_Ze))),{key:o,value:s,metadata:c}}}}}function U2n(t){return typeof t!="string"||t.length===0?{}:t.split(Tce).map(function(e){return ASe(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,r){return e[r.key]=r.value,e},{})}var pis,lzt=Pe(()=>{f();Fi();czt();pis=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s};a(bZe,"serializeKeyPairs");a(TZe,"getKeyPairs");a(ASe,"parsePairKeyValue");a(U2n,"parseKeyPairsIntoRecord")});var SZe,Q2n=Pe(()=>{f();Fi();gSe();czt();lzt();SZe=(function(){function t(){}return a(t,"W3CBaggagePropagator"),t.prototype.inject=function(e,r,n){var o=$v.getBaggage(e);if(!(!o||F7(e))){var s=TZe(o).filter(function(l){return l.length<=L2n}).slice(0,B2n),c=bZe(s);c.length>0&&n.set(r,vZe,c)}},t.prototype.extract=function(e,r,n){var o=n.get(r,vZe),s=Array.isArray(o)?o.join(Tce):o;if(!s)return e;var c={};if(s.length===0)return e;var l=s.split(Tce);return l.forEach(function(u){var d=ASe(u);if(d){var p={value:d.value};d.metadata&&(p.metadata=d.metadata),c[d.key]=p}}),Object.entries(c).length===0?e:$v.setBaggage(e,$v.createBaggage(c))},t.prototype.fields=function(){return[vZe]},t})()});var q2n,G2n=Pe(()=>{f();q2n=(function(){function t(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}return a(t,"AnchoredClock"),t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t})()});function U7(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var o=H2n(Object.entries(t)),s=o.next();!s.done;s=o.next()){var c=his(s.value,2),l=c[0],u=c[1];if(!uzt(l)){cn.warn("Invalid attribute key: "+l);continue}if(!ySe(u)){cn.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(u)?n[l]=u.slice():n[l]=u}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}function uzt(t){return typeof t=="string"&&t.length>0}function ySe(t){return t==null?!0:Array.isArray(t)?mis(t):j2n(t)}function mis(t){var e,r,n;try{for(var o=H2n(t),s=o.next();!s.done;s=o.next()){var c=s.value;if(c!=null){if(!n){if(j2n(c)){n=typeof c;continue}return!1}if(typeof c!==n)return!1}}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return!0}function j2n(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var H2n,his,$2n=Pe(()=>{f();Fi();H2n=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},his=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s};a(U7,"sanitizeAttributes");a(uzt,"isAttributeKey");a(ySe,"isAttributeValue");a(mis,"isHomogeneousAttributeValueArray");a(j2n,"isValidPrimitiveAttributeValue")});function IZe(){return function(t){cn.error(gis(t))}}function gis(t){return typeof t=="string"?t:JSON.stringify(Ais(t))}function Ais(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var o=r[n];o&&(e[n]=String(o))}}),r=Object.getPrototypeOf(r);return e}var dzt=Pe(()=>{f();Fi();a(IZe,"loggingErrorHandler");a(gis,"stringifyException");a(Ais,"flattenException")});function W2n(t){V2n=t}function My(t){try{V2n(t)}catch{}}var V2n,fzt=Pe(()=>{f();dzt();V2n=IZe();a(W2n,"setGlobalErrorHandler");a(My,"globalErrorHandler")});var XC,pzt=Pe(()=>{f();(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(XC||(XC={}))});function Cis(t){return Eis.indexOf(t)>-1}function vis(t){return _is.indexOf(t)>-1}function Tis(t){return bis.indexOf(t)>-1}function Sis(t,e,r){if(!(typeof r[t]>"u")){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function Iis(t,e,r,n,o){if(n===void 0&&(n=-1/0),o===void 0&&(o=1/0),typeof r[t]<"u"){var s=Number(r[t]);isNaN(s)||(so?e[t]=o:e[t]=s)}}function xis(t,e,r,n){n===void 0&&(n=yis);var o=r[t];typeof o=="string"&&(e[t]=o.split(n).map(function(s){return s.trim()}))}function Ris(t,e,r){var n=r[t];if(typeof n=="string"){var o=wis[n.toUpperCase()];o!=null&&(e[t]=o)}}function CSe(t){var e={};for(var r in ESe){var n=r;switch(n){case"OTEL_LOG_LEVEL":Ris(n,e,t);break;default:if(Cis(n))Sis(n,e,t);else if(vis(n))Iis(n,e,t);else if(Tis(n))xis(n,e,t);else{var o=t[n];typeof o<"u"&&o!==null&&(e[n]=String(o))}}}return e}var yis,Eis,_is,bis,Az,yz,hzt,mzt,ESe,wis,gzt=Pe(()=>{f();Fi();pzt();yis=",",Eis=["OTEL_SDK_DISABLED"];a(Cis,"isEnvVarABoolean");_is=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];a(vis,"isEnvVarANumber");bis=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];a(Tis,"isEnvVarAList");Az=1/0,yz=128,hzt=128,mzt=128,ESe={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Gs.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Az,OTEL_ATTRIBUTE_COUNT_LIMIT:yz,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Az,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:yz,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Az,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:yz,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:hzt,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:mzt,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:XC.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};a(Sis,"parseBoolean");a(Iis,"parseNumber");a(xis,"parseStringList");wis={ALL:Gs.ALL,VERBOSE:Gs.VERBOSE,DEBUG:Gs.DEBUG,INFO:Gs.INFO,WARN:Gs.WARN,ERROR:Gs.ERROR,NONE:Gs.NONE};a(Ris,"setLogLevelFromEnv");a(CSe,"parseEnvironment")});function OS(){var t=CSe(process.env);return Object.assign({},ESe,t)}function Sce(){return CSe(process.env)}var z2n=Pe(()=>{f();gzt();a(OS,"getEnv");a(Sce,"getEnvWithoutDefaults")});var xZe,Y2n=Pe(()=>{f();xZe=typeof globalThis=="object"?globalThis:global});function K2n(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function wZe(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n{f();a(K2n,"intValue");a(wZe,"hexToBinary")});function RZe(t){return Buffer.from(wZe(t)).toString("base64")}var J2n=Pe(()=>{f();Azt();a(RZe,"hexToBase64")});function X2n(t){return a(function(){for(var r=0;r>>0,r*4);for(var r=0;r0);r++)r===t-1&&(PZe[t-1]=1);return PZe.toString("hex",0,t)},"generateId")}var Pis,Z2n,kZe,PZe,ePn=Pe(()=>{f();Pis=8,Z2n=16,kZe=(function(){function t(){this.generateTraceId=X2n(Z2n),this.generateSpanId=X2n(Pis)}return a(t,"RandomIdGenerator"),t})(),PZe=Buffer.allocUnsafe(Z2n);a(X2n,"getIdGenerator")});var tPn,BS,rPn=Pe(()=>{f();tPn=require("perf_hooks"),BS=tPn.performance});var NZe,yzt=Pe(()=>{f();NZe="1.30.1"});var nPn=Pe(()=>{f()});var iPn=Pe(()=>{f();nPn()});var kis,Nis,Dis,Mis,oPn,sPn,aPn,cPn,Ois,lPn,uPn=Pe(()=>{f();kis="process.runtime.name",Nis="telemetry.sdk.name",Dis="telemetry.sdk.language",Mis="telemetry.sdk.version",oPn=kis,sPn=Nis,aPn=Dis,cPn=Mis,Ois="nodejs",lPn=Ois});var dPn=Pe(()=>{f();uPn()});var fPn=Pe(()=>{f()});var pPn=Pe(()=>{f()});var hPn=Pe(()=>{f();iPn();dPn();fPn();pPn()});var Ice,Q7,mPn=Pe(()=>{f();yzt();hPn();Q7=(Ice={},Ice[sPn]="opentelemetry",Ice[oPn]="node",Ice[aPn]=lPn,Ice[cPn]=NZe,Ice)});function xce(t){t.unref()}var gPn=Pe(()=>{f();a(xce,"unrefTimer")});var APn=Pe(()=>{f();z2n();Y2n();J2n();ePn();rPn();mPn();gPn()});var Ezt=Pe(()=>{f();APn()});function Kw(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Lis);return[r,n]}function wce(){var t=BS.timeOrigin;if(typeof t!="number"){var e=BS;t=e.timing&&e.timing.fetchStart}return t}function _Se(t){var e=Kw(wce()),r=Kw(typeof t=="number"?t:BS.now());return TSe(e,r)}function EPn(t){if(Rce(t))return t;if(typeof t=="number")return t=DZe&&(r[1]-=DZe,r[0]+=1),r}var yPn,Bis,Lis,DZe,bPn=Pe(()=>{f();Ezt();yPn=9,Bis=6,Lis=Math.pow(10,Bis),DZe=Math.pow(10,yPn);a(Kw,"millisToHrTime");a(wce,"getTimeOrigin");a(_Se,"hrTime");a(EPn,"timeInputToHrTime");a(MZe,"hrTimeDuration");a(CPn,"hrTimeToTimeStamp");a(_Pn,"hrTimeToNanoseconds");a(vPn,"hrTimeToMilliseconds");a(vSe,"hrTimeToMicroseconds");a(Rce,"isTimeInputHrTime");a(bSe,"isTimeInput");a(TSe,"addHrTimes")});var Vv,TPn=Pe(()=>{f();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Vv||(Vv={}))});var Fis,OZe,SPn=Pe(()=>{f();Fi();Fis=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},OZe=(function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,o){return n.concat(o)},[])))}return a(t,"CompositePropagator"),t.prototype.inject=function(e,r,n){var o,s;try{for(var c=Fis(this._propagators),l=c.next();!l.done;l=c.next()){var u=l.value;try{u.inject(e,r,n)}catch(d){cn.warn("Failed to inject with "+u.constructor.name+". Err: "+d.message)}}}catch(d){o={error:d}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(o,s){try{return s.extract(o,r,n)}catch(c){cn.warn("Failed to extract with "+s.constructor.name+". Err: "+c.message)}return o},e)},t.prototype.fields=function(){return this._fields.slice()},t})()});function IPn(t){return qis.test(t)}function xPn(t){return Gis.test(t)&&!His.test(t)}var Czt,Uis,Qis,qis,Gis,His,wPn=Pe(()=>{f();Czt="[_0-9a-z-*/]",Uis="[a-z]"+Czt+"{0,255}",Qis="[a-z0-9]"+Czt+"{0,240}@[a-z]"+Czt+"{0,13}",qis=new RegExp("^(?:"+Uis+"|"+Qis+")$"),Gis=/^[ -~]{0,255}[!-~]$/,His=/,|=/;a(IPn,"validateKey");a(xPn,"validateValue")});var RPn,jis,PPn,kPn,BZe,_zt=Pe(()=>{f();wPn();RPn=32,jis=512,PPn=",",kPn="=",BZe=(function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return a(t,"TraceState"),t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+kPn+e.get(n)),r},[]).join(PPn)},t.prototype._parse=function(e){e.length>jis||(this._internalState=e.split(PPn).reverse().reduce(function(r,n){var o=n.trim(),s=o.indexOf(kPn);if(s!==-1){var c=o.slice(0,s),l=o.slice(s+1,n.length);IPn(c)&&xPn(l)&&r.set(c,l)}return r},new Map),this._internalState.size>RPn&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,RPn))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t})()});function vzt(t){var e=Kis.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var SSe,ISe,$is,Vis,Wis,zis,Yis,Kis,LZe,NPn=Pe(()=>{f();Fi();gSe();_zt();SSe="traceparent",ISe="tracestate",$is="00",Vis="(?!ff)[\\da-f]{2}",Wis="(?![0]{32})[\\da-f]{32}",zis="(?![0]{16})[\\da-f]{16}",Yis="[\\da-f]{2}",Kis=new RegExp("^\\s?("+Vis+")-("+Wis+")-("+zis+")-("+Yis+")(-.*)?\\s?$");a(vzt,"parseTraceParent");LZe=(function(){function t(){}return a(t,"W3CTraceContextPropagator"),t.prototype.inject=function(e,r,n){var o=_l.getSpanContext(e);if(!(!o||F7(e)||!KC(o))){var s=$is+"-"+o.traceId+"-"+o.spanId+"-0"+Number(o.traceFlags||cd.NONE).toString(16);n.set(r,SSe,s),o.traceState&&n.set(r,ISe,o.traceState.serialize())}},t.prototype.extract=function(e,r,n){var o=n.get(r,SSe);if(!o)return e;var s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;var c=vzt(s);if(!c)return e;c.isRemote=!0;var l=n.get(r,ISe);if(l){var u=Array.isArray(l)?l.join(","):l;c.traceState=new BZe(typeof u=="string"?u:void 0)}return _l.setSpanContext(e,c)},t.prototype.fields=function(){return[SSe,ISe]},t})()});function DPn(t,e){return t.setValue(bzt,e)}function MPn(t){return t.deleteValue(bzt)}function OPn(t){return t.getValue(bzt)}var bzt,FZe,BPn=Pe(()=>{f();Fi();bzt=YC("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(FZe||(FZe={}));a(DPn,"setRPCMetadata");a(MPn,"deleteRPCMetadata");a(OPn,"getRPCMetadata")});var xSe,Tzt=Pe(()=>{f();Fi();xSe=(function(){function t(){}return a(t,"AlwaysOffSampler"),t.prototype.shouldSample=function(){return{decision:JC.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})()});var Pce,Szt=Pe(()=>{f();Fi();Pce=(function(){function t(){}return a(t,"AlwaysOnSampler"),t.prototype.shouldSample=function(){return{decision:JC.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})()});var LPn,FPn=Pe(()=>{f();Fi();fzt();Tzt();Szt();LPn=(function(){function t(e){var r,n,o,s;this._root=e.root,this._root||(My(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Pce),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new Pce,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new xSe,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new Pce,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new xSe}return a(t,"ParentBasedSampler"),t.prototype.shouldSample=function(e,r,n,o,s,c){var l=_l.getSpanContext(e);return!l||!KC(l)?this._root.shouldSample(e,r,n,o,s,c):l.isRemote?l.traceFlags&cd.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,c):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,c):l.traceFlags&cd.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,c):this._localParentNotSampled.shouldSample(e,r,n,o,s,c)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t})()});var UPn,QPn=Pe(()=>{f();Fi();UPn=(function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return a(t,"TraceIdRatioBasedSampler"),t.prototype.shouldSample=function(e,r){return{decision:mz(r)&&this._accumulate(r)=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n>>0}return r},t})()});function nos(t,e){return function(r){return t(e(r))}}function Izt(t){if(!ios(t)||oos(t)!==Jis)return!1;var e=ros(t);if(e===null)return!0;var r=HPn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&qPn.call(r)===tos}function ios(t){return t!=null&&typeof t=="object"}function oos(t){return t==null?t===void 0?Zis:Xis:Ez&&Ez in Object(t)?sos(t):aos(t)}function sos(t){var e=HPn.call(t,Ez),r=t[Ez],n=!1;try{t[Ez]=void 0,n=!0}catch{}var o=jPn.call(t);return n&&(e?t[Ez]=r:delete t[Ez]),o}function aos(t){return jPn.call(t)}var Jis,Xis,Zis,eos,qPn,tos,ros,GPn,HPn,Ez,jPn,$Pn=Pe(()=>{f();Jis="[object Object]",Xis="[object Null]",Zis="[object Undefined]",eos=Function.prototype,qPn=eos.toString,tos=qPn.call(Object),ros=nos(Object.getPrototypeOf,Object),GPn=Object.prototype,HPn=GPn.hasOwnProperty,Ez=Symbol?Symbol.toStringTag:void 0,jPn=GPn.toString;a(nos,"overArg");a(Izt,"isPlainObject");a(ios,"isObjectLike");a(oos,"baseGetTag");a(sos,"getRawTag");a(aos,"objectToString")});function qZe(){for(var t=[],e=0;e0;)r=WPn(r,t.shift(),0,n);return r}function xzt(t){return QZe(t)?t.slice():t}function WPn(t,e,r,n){r===void 0&&(r=0);var o;if(!(r>cos)){if(r++,UZe(t)||UZe(e)||zPn(e))o=xzt(e);else if(QZe(t)){if(o=t.slice(),QZe(e))for(var s=0,c=e.length;s"u"?delete o[u]:o[u]=d;else{var p=o[u],h=d;if(VPn(t,u,n)||VPn(e,u,n))delete o[u];else{if(wSe(p)&&wSe(h)){var m=n.get(p)||[],g=n.get(h)||[];m.push({obj:t,key:u}),g.push({obj:e,key:u}),n.set(p,m),n.set(h,g)}o[u]=WPn(o[u],d,r,n)}}}}else o=e;return o}}function VPn(t,e,r){for(var n=r.get(t[e])||[],o=0,s=n.length;o"u"||t instanceof Date||t instanceof RegExp||t===null}function los(t,e){return!(!Izt(t)||!Izt(e))}var cos,YPn=Pe(()=>{f();$Pn();cos=20;a(qZe,"merge");a(xzt,"takeValue");a(WPn,"mergeTwoObjects");a(VPn,"wasObjectReferenced");a(QZe,"isArray");a(zPn,"isFunction");a(wSe,"isObject");a(UZe,"isPrimitive");a(los,"shouldMerge")});function KPn(t,e){var r,n=new Promise(a(function(s,c){r=setTimeout(a(function(){c(new wzt("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([t,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}var uos,wzt,JPn=Pe(()=>{f();uos=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),wzt=(function(t){uos(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return a(e,"TimeoutError"),e})(Error);a(KPn,"callWithTimeout")});function Rzt(t,e){return typeof e=="string"?t===e:!!t.match(e)}function XPn(t,e){var r,n;if(!e)return!1;try{for(var o=dos(e),s=o.next();!s.done;s=o.next()){var c=s.value;if(Rzt(t,c))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}var dos,ZPn=Pe(()=>{f();dos=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};a(Rzt,"urlMatches");a(XPn,"isUrlIgnored")});function ekn(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var tkn=Pe(()=>{f();a(ekn,"isWrapped")});var rkn,nkn=Pe(()=>{f();rkn=(function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return a(t,"Deferred"),Object.defineProperty(t.prototype,"promise",{get:a(function(){return this._promise},"get"),enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t})()});var fos,pos,kce,ikn=Pe(()=>{f();nkn();fos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},pos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();Fi();gSe();a(okn,"_export")});var akn={};Ri(akn,{AlwaysOffSampler:()=>xSe,AlwaysOnSampler:()=>Pce,AnchoredClock:()=>q2n,BindOnceFuture:()=>kce,CompositePropagator:()=>OZe,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>yz,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>Az,DEFAULT_ENVIRONMENT:()=>ESe,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>hzt,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>mzt,ExportResultCode:()=>Vv,ParentBasedSampler:()=>LPn,RPCType:()=>FZe,RandomIdGenerator:()=>kZe,SDK_INFO:()=>Q7,TRACE_PARENT_HEADER:()=>SSe,TRACE_STATE_HEADER:()=>ISe,TimeoutError:()=>wzt,TraceIdRatioBasedSampler:()=>UPn,TraceState:()=>BZe,TracesSamplerValues:()=>XC,VERSION:()=>NZe,W3CBaggagePropagator:()=>SZe,W3CTraceContextPropagator:()=>LZe,_globalThis:()=>xZe,addHrTimes:()=>TSe,baggageUtils:()=>hos,callWithTimeout:()=>KPn,deleteRPCMetadata:()=>MPn,getEnv:()=>OS,getEnvWithoutDefaults:()=>Sce,getRPCMetadata:()=>OPn,getTimeOrigin:()=>wce,globalErrorHandler:()=>My,hexToBase64:()=>RZe,hexToBinary:()=>wZe,hrTime:()=>_Se,hrTimeDuration:()=>MZe,hrTimeToMicroseconds:()=>vSe,hrTimeToMilliseconds:()=>vPn,hrTimeToNanoseconds:()=>_Pn,hrTimeToTimeStamp:()=>CPn,internal:()=>Pzt,isAttributeKey:()=>uzt,isAttributeValue:()=>ySe,isTimeInput:()=>bSe,isTimeInputHrTime:()=>Rce,isTracingSuppressed:()=>F7,isUrlIgnored:()=>XPn,isWrapped:()=>ekn,loggingErrorHandler:()=>IZe,merge:()=>qZe,millisToHrTime:()=>Kw,otperformance:()=>BS,parseEnvironment:()=>CSe,parseTraceParent:()=>vzt,sanitizeAttributes:()=>U7,setGlobalErrorHandler:()=>W2n,setRPCMetadata:()=>DPn,suppressTracing:()=>bce,timeInputToHrTime:()=>EPn,unrefTimer:()=>xce,unsuppressTracing:()=>M2n,urlMatches:()=>Rzt});var hos,Pzt,ZC=Pe(()=>{f();Q2n();G2n();$2n();fzt();dzt();bPn();Azt();TPn();lzt();Ezt();SPn();NPn();BPn();Tzt();Szt();FPn();QPn();gSe();_zt();gzt();YPn();pzt();JPn();ZPn();tkn();ikn();yzt();skn();hos={getKeyPairs:TZe,serializeKeyPairs:bZe,parseKeyPairsIntoRecord:U2n,parsePairKeyValue:ASe},Pzt={_export:okn}});var mos,gos,Aos,GZe,HZe,ckn,lkn=Pe(()=>{f();mos="exception.type",gos="exception.message",Aos="exception.stacktrace",GZe=mos,HZe=gos,ckn=Aos});var ukn=Pe(()=>{f();lkn()});var dkn=Pe(()=>{f()});var fkn=Pe(()=>{f();dkn()});var pkn=Pe(()=>{f()});var hkn=Pe(()=>{f()});var mkn=Pe(()=>{f();ukn();fkn();pkn();hkn()});var gkn,Akn=Pe(()=>{f();gkn="exception"});var kzt,yos,ykn,Eos,jZe,Nzt=Pe(()=>{f();Fi();ZC();mkn();Akn();kzt=function(){return kzt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ykn=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Eos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(cn.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var o=yos(Object.entries(e)),s=o.next();!s.done;s=o.next()){var c=ykn(s.value,2),l=c[0],u=c[1];this.setAttribute(l,u)}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return cn.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&cn.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),bSe(r)&&(bSe(n)||(n=r),r=void 0);var o=U7(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,Eos([],ykn(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=kzt({},e),this.status.message!=null&&typeof e.message!="string"&&(cn.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){cn.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=MZe(this.startTime,this.endTime),this._duration[0]<0&&(cn.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&cn.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=BS.now())return _Se(e+this._performanceOffset);if(typeof e=="number")return Kw(e);if(e instanceof Date)return Kw(e.getTime());if(Rce(e))return e;if(this._startTimeProvided)return Kw(Date.now());var r=BS.now()-this._performanceStartTime;return TSe(this.startTime,Kw(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[HZe]=e:e&&(e.code?n[GZe]=e.code.toString():e.name&&(n[GZe]=e.name),e.message&&(n[HZe]=e.message),e.stack&&(n[ckn]=e.stack)),n[GZe]||n[HZe]?this.addEvent(gkn,n,r):cn.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:a(function(){return this._duration},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:a(function(){return this._ended},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:a(function(){return this._droppedAttributesCount},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:a(function(){return this._droppedEventsCount},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:a(function(){return this._droppedLinksCount},"get"),enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&cn.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(cn.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):e},t})()});var Jw,RSe=Pe(()=>{f();(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Jw||(Jw={}))});var q7,$Ze=Pe(()=>{f();RSe();q7=(function(){function t(){}return a(t,"AlwaysOffSampler"),t.prototype.shouldSample=function(){return{decision:Jw.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})()});var sD,VZe=Pe(()=>{f();RSe();sD=(function(){function t(){}return a(t,"AlwaysOnSampler"),t.prototype.shouldSample=function(){return{decision:Jw.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})()});var Nce,Dzt=Pe(()=>{f();Fi();ZC();$Ze();VZe();Nce=(function(){function t(e){var r,n,o,s;this._root=e.root,this._root||(My(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new sD),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new sD,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new q7,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new sD,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new q7}return a(t,"ParentBasedSampler"),t.prototype.shouldSample=function(e,r,n,o,s,c){var l=_l.getSpanContext(e);return!l||!KC(l)?this._root.shouldSample(e,r,n,o,s,c):l.isRemote?l.traceFlags&cd.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,c):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,c):l.traceFlags&cd.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,c):this._localParentNotSampled.shouldSample(e,r,n,o,s,c)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t})()});var PSe,Mzt=Pe(()=>{f();Fi();RSe();PSe=(function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return a(t,"TraceIdRatioBasedSampler"),t.prototype.shouldSample=function(e,r){return{decision:mz(r)&&this._accumulate(r)=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n>>0}return r},t})()});function WZe(){var t=OS();return{sampler:Ozt(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Ozt(t){switch(t===void 0&&(t=OS()),t.OTEL_TRACES_SAMPLER){case XC.AlwaysOn:return new sD;case XC.AlwaysOff:return new q7;case XC.ParentBasedAlwaysOn:return new Nce({root:new sD});case XC.ParentBasedAlwaysOff:return new Nce({root:new q7});case XC.TraceIdRatio:return new PSe(Ekn(t));case XC.ParentBasedTraceIdRatio:return new Nce({root:new PSe(Ekn(t))});default:return cn.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Cos+'".'),new sD}}function Ekn(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return cn.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Dce+"."),Dce;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(cn.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Dce+"."),Dce):e<0||e>1?(cn.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Dce+"."),Dce):e}var Cos,Dce,Bzt=Pe(()=>{f();Fi();ZC();$Ze();VZe();Dzt();Mzt();Cos=XC.AlwaysOn,Dce=1;a(WZe,"loadDefaultConfig");a(Ozt,"buildSamplerFromEnv");a(Ekn,"getSamplerProbabilityFromEnv")});function Ckn(t){var e={sampler:Ozt()},r=WZe(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function _kn(t){var e,r,n,o,s,c,l,u,d,p,h,m,g=Object.assign({},t.spanLimits),A=Sce();return g.attributeCountLimit=(c=(s=(o=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:A.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:A.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:yz,g.attributeValueLengthLimit=(m=(h=(p=(u=(l=t.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:(d=t.generalLimits)===null||d===void 0?void 0:d.attributeValueLengthLimit)!==null&&p!==void 0?p:A.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:A.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&m!==void 0?m:Az,Object.assign({},t,{spanLimits:g})}var Lzt=Pe(()=>{f();Bzt();ZC();a(Ckn,"mergeConfig");a(_kn,"reconfigureLimits")});var vkn,bkn=Pe(()=>{f();Fi();ZC();vkn=(function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=OS();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new kce(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(cn.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return a(t,"BatchSpanProcessorBase"),t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&cd.SAMPLED)!==0&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&cn.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(cn.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var o=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),c=0,l=s;c0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,My(n)})},"flush");if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),xce(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t})()});var _os,Mce,Tkn=Pe(()=>{f();bkn();_os=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Mce=(function(t){_os(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"BatchSpanProcessor"),e.prototype.onShutdown=function(){},e})(vkn)});function Skn(t){return a(function(){for(var r=0;r>>0,r*4);for(var r=0;r0);r++)r===t-1&&(zZe[t-1]=1);return zZe.toString("hex",0,t)},"generateId")}var vos,Ikn,Oce,zZe,xkn=Pe(()=>{f();vos=8,Ikn=16,Oce=(function(){function t(){this.generateTraceId=Skn(Ikn),this.generateSpanId=Skn(vos)}return a(t,"RandomIdGenerator"),t})(),zZe=Buffer.allocUnsafe(Ikn);a(Skn,"getIdGenerator")});var wkn=Pe(()=>{f();Tkn();xkn()});var YZe=Pe(()=>{f();wkn()});var KZe,Fzt=Pe(()=>{f();Fi();ZC();Nzt();Lzt();YZe();KZe=(function(){function t(e,r,n){this._tracerProvider=n;var o=Ckn(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new Oce,this.resource=n.resource,this.instrumentationLibrary=e}return a(t,"Tracer"),t.prototype.startSpan=function(e,r,n){var o,s,c;r===void 0&&(r={}),n===void 0&&(n=Bh.active()),r.root&&(n=_l.deleteSpan(n));var l=_l.getSpan(n);if(F7(n)){cn.debug("Instrumentation suppressed, returning Noop Span");var u=_l.wrapSpanContext(Cce);return u}var d=l?.spanContext(),p=this._idGenerator.generateSpanId(),h,m,g;!d||!_l.isSpanContextValid(d)?h=this._idGenerator.generateTraceId():(h=d.traceId,m=d.traceState,g=d.spanId);var A=(o=r.kind)!==null&&o!==void 0?o:_ce.INTERNAL,y=((s=r.links)!==null&&s!==void 0?s:[]).map(function(R){return{context:R.context,attributes:U7(R.attributes)}}),E=U7(r.attributes),_=this._sampler.shouldSample(n,h,e,A,E,y);m=(c=_.traceState)!==null&&c!==void 0?c:m;var v=_.decision===JC.RECORD_AND_SAMPLED?cd.SAMPLED:cd.NONE,b={traceId:h,spanId:p,traceFlags:v,traceState:m};if(_.decision===JC.NOT_RECORD){cn.debug("Recording is off, propagating context in a non-recording span");var u=_l.wrapSpanContext(b);return u}var I=U7(Object.assign(E,_.attributes)),x=new jZe(this,n,e,b,A,g,y,r.startTime,void 0,I);return x},t.prototype.startActiveSpan=function(e,r,n,o){var s,c,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,c=n,l=o);var u=c??Bh.active(),d=this.startSpan(e,s,u),p=_l.setSpan(u,d);return Bh.with(p,l,void 0,d)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t})()});var Rkn=Pe(()=>{f()});var Pkn=Pe(()=>{f();Rkn()});var bos,Tos,Sos,Ios,kkn,Uzt,Qzt,qzt,Nkn=Pe(()=>{f();bos="service.name",Tos="telemetry.sdk.name",Sos="telemetry.sdk.language",Ios="telemetry.sdk.version",kkn=bos,Uzt=Tos,Qzt=Sos,qzt=Ios});var Dkn=Pe(()=>{f();Nkn()});var Mkn=Pe(()=>{f()});var Okn=Pe(()=>{f()});var Bkn=Pe(()=>{f();Pkn();Dkn();Mkn();Okn()});function JZe(){return"unknown_service:"+process.argv0}var Lkn=Pe(()=>{f();a(JZe,"defaultServiceName")});var Fkn=Pe(()=>{f();Lkn()});var Ukn=Pe(()=>{f();Fkn()});var G7,xos,wos,Ros,XZe,Qkn=Pe(()=>{f();Fi();Bkn();ZC();Ukn();G7=function(){return G7=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},XZe=(function(){function t(e,r){var n=this,o;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return cn.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return a(t,"Resource"),t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[kkn]=JZe(),e[Qzt]=Q7[Qzt],e[Uzt]=Q7[Uzt],e[qzt]=Q7[qzt],e))},Object.defineProperty(t.prototype,"attributes",{get:a(function(){var e;return this.asyncAttributesPending&&cn.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},"get"),enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return xos(this,void 0,void 0,function(){return wos(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var o=G7(G7({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(c){var l,u=Ros(c,2),d=u[0],p=u[1];return G7(G7(G7(G7({},r._syncAttributes),d),(l=e._syncAttributes)!==null&&l!==void 0?l:e.attributes),p)});return new t(o,s)},t.EMPTY=new t({}),t})()});var qkn=Pe(()=>{f();Qkn()});var ZZe,Gzt,Gkn=Pe(()=>{f();ZC();ZZe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gzt=(function(){function t(e){this._spanProcessors=e}return a(t,"MultiSpanProcessor"),t.prototype.forceFlush=function(){var e,r,n=[];try{for(var o=ZZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;n.push(c.forceFlush())}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(u){My(u||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},t.prototype.onStart=function(e,r){var n,o;try{for(var s=ZZe(this._spanProcessors),c=s.next();!c.done;c=s.next()){var l=c.value;l.onStart(e,r)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var o=ZZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;c.onEnd(e)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var o=ZZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;n.push(c.shutdown())}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return new Promise(function(l,u){Promise.all(n).then(function(){l()},u)})},t})()});var eet,Hzt=Pe(()=>{f();eet=(function(){function t(){}return a(t,"NoopSpanProcessor"),t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})()});var Pos,kos,V4,Hkn,jkn=Pe(()=>{f();Fi();ZC();qkn();Fzt();Bzt();Gkn();Hzt();YZe();Lzt();Pos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},kos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n0?o(c):n()}).catch(function(s){return o([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(OS().OTEL_PROPAGATORS)),n=r.map(function(s){var c=e._getPropagator(s);return c||cn.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),c}),o=n.reduce(function(s,c){return c&&s.push(c),s},[]);if(o.length!==0)return r.length===1?o[0]:new OZe({propagators:o})},t.prototype._buildExporterFromEnv=function(){var e=OS().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||cn.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new LZe}],["baggage",function(){return new SZe}]]),t._registeredExporters=new Map,t})()});var Nos,$kn,Vkn=Pe(()=>{f();ZC();Nos=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$kn=(function(){function t(){}return a(t,"ConsoleSpanExporter"),t.prototype.export=function(e,r){return this._sendSpans(e,r)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var r;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(r=e.spanContext().traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:vSe(e.startTime),duration:vSe(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,r){var n,o;try{for(var s=Nos(e),c=s.next();!c.done;c=s.next()){var l=c.value;console.dir(this._exportInfo(l),{depth:3})}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(r)return r({code:Vv.SUCCESS})},t})()});var Dos,Mos,Wkn,zkn=Pe(()=>{f();ZC();Dos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Mos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();Fi();ZC();Oos=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Bos=function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]q7,AlwaysOnSampler:()=>sD,BasicTracerProvider:()=>Hkn,BatchSpanProcessor:()=>Mce,ConsoleSpanExporter:()=>$kn,ForceFlushState:()=>V4,InMemorySpanExporter:()=>Wkn,NoopSpanProcessor:()=>eet,ParentBasedSampler:()=>Nce,RandomIdGenerator:()=>Oce,SamplingDecision:()=>Jw,SimpleSpanProcessor:()=>Ykn,Span:()=>jZe,TraceIdRatioBasedSampler:()=>PSe,Tracer:()=>KZe});var Xkn=Pe(()=>{f();Fzt();jkn();YZe();Vkn();zkn();Kkn();Hzt();$Ze();VZe();Dzt();Mzt();RSe();Nzt()});var kSe,Zkn,jzt=Pe(()=>{f();kSe=class{static{a(this,"NoopLogger")}emit(e){}},Zkn=new kSe});var $zt,tet,Vzt=Pe(()=>{f();jzt();$zt=class{static{a(this,"NoopLoggerProvider")}getLogger(e,r,n){return new kSe}},tet=new $zt});var ret,eNn=Pe(()=>{f();jzt();ret=class{static{a(this,"ProxyLogger")}constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Zkn}}});var NSe,tNn=Pe(()=>{f();Vzt();eNn();NSe=class{static{a(this,"ProxyLoggerProvider")}getLogger(e,r,n){var o;return(o=this.getDelegateLogger(e,r,n))!==null&&o!==void 0?o:new ret(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:tet}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(e,r,n)}}});var net,rNn=Pe(()=>{f();net=typeof globalThis=="object"?globalThis:global});var nNn=Pe(()=>{f();rNn()});var iNn=Pe(()=>{f();nNn()});function oNn(t,e,r){return n=>n===t?e:r}var DSe,Bce,Wzt,sNn=Pe(()=>{f();iNn();DSe=Symbol.for("io.opentelemetry.js.api.logs"),Bce=net;a(oNn,"makeGetter");Wzt=1});var iet,aNn=Pe(()=>{f();sNn();Vzt();tNn();iet=class t{static{a(this,"LogsAPI")}constructor(){this._proxyLoggerProvider=new NSe}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Bce[DSe]?this.getLoggerProvider():(Bce[DSe]=oNn(Wzt,e,tet),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Bce[DSe])===null||e===void 0?void 0:e.call(Bce,Wzt))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Bce[DSe],this._proxyLoggerProvider=new NSe}}});var oet,zzt=Pe(()=>{f();aNn();oet=iet.getInstance()});function cNn(t,e,r,n){for(let o=0,s=t.length;oe.disable())}var uNn=Pe(()=>{f();a(cNn,"enableInstrumentations");a(lNn,"disableInstrumentations")});function dNn(t){let e=t.tracerProvider||_l.getTracerProvider(),r=t.meterProvider||gz.getMeterProvider(),n=t.loggerProvider||oet.getLoggerProvider(),o=t.instrumentations?.flat()??[];return cNn(o,e,r,n),()=>{lNn(o)}}var fNn=Pe(()=>{f();Fi();zzt();uNn();a(dNn,"registerInstrumentations")});function yNn(t,e,r){if(!Uos(t))return cn.error(`Invalid version: ${t}`),!1;if(!e)return!0;e=e.replace(/([<>=~^]+)\s+/g,"$1");let n=Hos(t);if(!n)return!1;let o=[],s=ENn(n,e,o,r);return s&&!r?.includePrerelease?qos(n,o):s}function Uos(t){return typeof t=="string"&&ANn.test(t)}function ENn(t,e,r,n){if(e.includes("||")){let o=e.trim().split("||");for(let s of o)if(Yzt(t,s,r,n))return!0;return!1}else if(e.includes(" - "))e=uss(e,n);else if(e.includes(" ")){let o=e.trim().replace(/\s{2,}/g," ").split(" ");for(let s of o)if(!Yzt(t,s,r,n))return!1;return!0}return Yzt(t,e,r,n)}function Yzt(t,e,r,n){if(e=Gos(e,n),e.includes(" "))return ENn(t,e,r,n);{let o=jos(e);return r.push(o),Qos(t,o)}}function Qos(t,e){if(e.invalid)return!1;if(!e.version||Jzt(e.version))return!0;let r=hNn(t.versionSegments||[],e.versionSegments||[]);if(r===0){let n=t.prereleaseSegments||[],o=e.prereleaseSegments||[];!n.length&&!o.length?r=0:!n.length&&o.length?r=1:n.length&&!o.length?r=-1:r=hNn(n,o)}return Fos[e.op]?.includes(r)}function qos(t,e){return t.prerelease?e.some(r=>r.prerelease&&r.version===t.version):!0}function Gos(t,e){return t=t.trim(),t=css(t,e),t=ass(t),t=lss(t,e),t=t.trim(),t}function Oy(t){return!t||t.toLowerCase()==="x"||t==="*"}function Hos(t){let e=t.match(ANn);if(!e){cn.error(`Invalid version: ${t}`);return}let r=e.groups.version,n=e.groups.prerelease,o=e.groups.build,s=r.split("."),c=n?.split(".");return{op:void 0,version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:n,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:o}}function jos(t){if(!t)return{};let e=t.match(Los);if(!e)return cn.error(`Invalid range: ${t}`),{invalid:!0};let r=e.groups.op,n=e.groups.version,o=e.groups.prerelease,s=e.groups.build,c=n.split("."),l=o?.split(".");return r==="=="&&(r="="),{op:r||"=",version:n,versionSegments:c,versionSegmentCount:c.length,prerelease:o,prereleaseSegments:l,prereleaseSegmentCount:l?l.length:0,build:s}}function Jzt(t){return t==="*"||t==="x"||t==="X"}function pNn(t){let e=parseInt(t,10);return isNaN(e)?t:e}function $os(t,e){if(typeof t==typeof e){if(typeof t=="number")return[t,e];if(typeof t=="string")return[t,e];throw new Error("Version segments can only be strings or numbers")}else return[String(t),String(e)]}function Vos(t,e){if(Jzt(t)||Jzt(e))return 0;let[r,n]=$os(pNn(t),pNn(e));return r>n?1:r{let l;return Oy(n)?l="":Oy(o)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Oy(s)?l=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`:c?l=`>=${n}.${o}.${s}-${c} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${s} <${n}.${+o+1}.0-0`,l})}function css(t,e){let r=sss,n=e?.includePrerelease?"-0":"";return t.replace(r,(o,s,c,l,u)=>{let d;return Oy(s)?d="":Oy(c)?d=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Oy(l)?s==="0"?d=`>=${s}.${c}.0${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.0${n} <${+s+1}.0.0-0`:u?s==="0"?c==="0"?d=`>=${s}.${c}.${l}-${u} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}-${u} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l}-${u} <${+s+1}.0.0-0`:s==="0"?c==="0"?d=`>=${s}.${c}.${l}${n} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l} <${+s+1}.0.0-0`,d})}function lss(t,e){let r=Xos;return t.replace(r,(n,o,s,c,l,u)=>{let d=Oy(s),p=d||Oy(c),h=p||Oy(l),m=h;return o==="="&&m&&(o=""),u=e?.includePrerelease?"-0":"",d?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),o==="<"&&(u="-0"),n=`${o+s}.${c}.${l}${u}`):p?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${c}.0${u} <${s}.${+c+1}.0-0`),n})}function uss(t,e){let r=ess;return t.replace(r,(n,o,s,c,l,u,d,p,h,m,g,A)=>(Oy(s)?o="":Oy(c)?o=`>=${s}.0.0${e?.includePrerelease?"-0":""}`:Oy(l)?o=`>=${s}.${c}.0${e?.includePrerelease?"-0":""}`:u?o=`>=${o}`:o=`>=${o}${e?.includePrerelease?"-0":""}`,Oy(h)?p="":Oy(m)?p=`<${+h+1}.0.0-0`:Oy(g)?p=`<${h}.${+m+1}.0-0`:A?p=`<=${h}.${m}.${g}-${A}`:e?.includePrerelease?p=`<${h}.${m}.${+g+1}-0`:p=`<=${p}`,`${o} ${p}`.trim()))}var ANn,Los,Fos,CNn,_Nn,Wos,zos,mNn,Yos,gNn,Kos,Kzt,MSe,Jos,Xos,Zos,ess,tss,rss,nss,iss,oss,sss,vNn=Pe(()=>{f();Fi();ANn=/^(?:v)?(?(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*))(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Los=/^(?<|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?(?x|X|\*|0|[1-9]\d*)(?:\.(?x|X|\*|0|[1-9]\d*))?(?:\.(?x|X|\*|0|[1-9]\d*))?)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Fos={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};a(yNn,"satisfies");a(Uos,"_validateVersion");a(ENn,"_doSatisfies");a(Yzt,"_checkRange");a(Qos,"_satisfies");a(qos,"_doPreleaseCheck");a(Gos,"_normalizeRange");a(Oy,"isX");a(Hos,"_parseVersion");a(jos,"_parseRange");a(Jzt,"_isWildcard");a(pNn,"_parseVersionString");a($os,"_normalizeVersionType");a(Vos,"_compareVersionStrings");a(hNn,"_compareVersionSegments");CNn="[a-zA-Z0-9-]",_Nn="0|[1-9]\\d*",Wos=`\\d*[a-zA-Z-]${CNn}*`,zos="((?:<|>)?=?)",mNn=`(?:${_Nn}|${Wos})`,Yos=`(?:-(${mNn}(?:\\.${mNn})*))`,gNn=`${CNn}+`,Kos=`(?:\\+(${gNn}(?:\\.${gNn})*))`,Kzt=`${_Nn}|x|X|\\*`,MSe=`[v=\\s]*(${Kzt})(?:\\.(${Kzt})(?:\\.(${Kzt})(?:${Yos})?${Kos}?)?)?`,Jos=`^${zos}\\s*${MSe}$`,Xos=new RegExp(Jos),Zos=`^\\s*(${MSe})\\s+-\\s+(${MSe})\\s*$`,ess=new RegExp(Zos),tss="(?:~>?)",rss=`^${tss}${MSe}$`,nss=new RegExp(rss),iss="(?:\\^)",oss=`^${iss}${MSe}$`,sss=new RegExp(oss);a(ass,"replaceTilde");a(css,"replaceCaret");a(lss,"replaceXRange");a(uss,"replaceHyphen")});var Lce=T((kyd,SNn)=>{"use strict";f();function Xzt(t){return typeof t=="function"}a(Xzt,"isFunction");var By=console.error.bind(console);function OSe(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}a(OSe,"defineProperty");function BSe(t){t&&t.logger&&(Xzt(t.logger)?By=t.logger:By("new logger isn't a function, not replacing"))}a(BSe,"shimmer");function bNn(t,e,r){if(!t||!t[e]){By("no original function "+e+" to wrap");return}if(!r){By("no wrapper function"),By(new Error().stack);return}if(!Xzt(t[e])||!Xzt(r)){By("original object and wrapper must be functions");return}var n=t[e],o=r(n,e);return OSe(o,"__original",n),OSe(o,"__unwrap",function(){t[e]===o&&OSe(t,e,n)}),OSe(o,"__wrapped",!0),OSe(t,e,o),o}a(bNn,"wrap");function dss(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{By("must provide one or more modules to patch"),By(new Error().stack);return}if(!(e&&Array.isArray(e))){By("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(o){bNn(n,o,r)})})}a(dss,"massWrap");function TNn(t,e){if(!t||!t[e]){By("no function to unwrap."),By(new Error().stack);return}if(!t[e].__unwrap)By("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}a(TNn,"unwrap");function fss(t,e){if(t)Array.isArray(t)||(t=[t]);else{By("must provide one or more modules to patch"),By(new Error().stack);return}if(!(e&&Array.isArray(e))){By("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){TNn(r,n)})})}a(fss,"massUnwrap");BSe.wrap=bNn;BSe.massWrap=dss;BSe.unwrap=TNn;BSe.massUnwrap=fss;SNn.exports=BSe});var H7,set,INn=Pe(()=>{f();Fi();zzt();H7=de(Lce()),set=class{static{a(this,"InstrumentationAbstract")}instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this.setConfig(n),this._diag=cn.createComponentLogger({namespace:e}),this._tracer=_l.getTracer(e,r),this._meter=gz.getMeter(e,r),this._logger=oet.getLogger(e,r),this._updateMetricInstruments()}_wrap=H7.wrap;_unwrap=H7.unwrap;_massWrap=H7.massWrap;_massUnwrap=H7.massUnwrap;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,n,o){if(e)try{e(n,o)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}}}});var wNn=T((Uyd,xNn)=>{f();var Fce=1e3,Uce=Fce*60,Qce=Uce*60,Cz=Qce*24,pss=Cz*7,hss=Cz*365.25;xNn.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return mss(t);if(r==="number"&&isFinite(t))return e.long?Ass(t):gss(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function mss(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*hss;case"weeks":case"week":case"w":return r*pss;case"days":case"day":case"d":return r*Cz;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qce;case"minutes":case"minute":case"mins":case"min":case"m":return r*Uce;case"seconds":case"second":case"secs":case"sec":case"s":return r*Fce;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(mss,"parse");function gss(t){var e=Math.abs(t);return e>=Cz?Math.round(t/Cz)+"d":e>=Qce?Math.round(t/Qce)+"h":e>=Uce?Math.round(t/Uce)+"m":e>=Fce?Math.round(t/Fce)+"s":t+"ms"}a(gss,"fmtShort");function Ass(t){var e=Math.abs(t);return e>=Cz?aet(t,e,Cz,"day"):e>=Qce?aet(t,e,Qce,"hour"):e>=Uce?aet(t,e,Uce,"minute"):e>=Fce?aet(t,e,Fce,"second"):t+" ms"}a(Ass,"fmtLong");function aet(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(aet,"plural")});var Zzt=T((Gyd,RNn)=>{f();function yss(t){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=o,r.enabled=l,r.humanize=wNn(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(R==="%%")return"%";I++;let P=r.formatters[w];if(typeof P=="function"){let k=E[I];R=P.call(_,k),E.splice(I,1),I--}return R}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}a(o,"enable");function s(p,h){let m=0,g=0,A=-1,y=0;for(;m"-"+h)].join(",");return r.enable(""),p}a(c,"disable");function l(p){for(let h of r.skips)if(s(p,h))return!1;for(let h of r.names)if(s(p,h))return!0;return!1}a(l,"enabled");function u(p){return p instanceof Error?p.stack||p.message:p}a(u,"coerce");function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(d,"destroy"),r.enable(r.load()),r}a(yss,"setup");RNn.exports=yss});var PNn=T((e_,cet)=>{f();e_.formatArgs=Css;e_.save=_ss;e_.load=vss;e_.useColors=Ess;e_.storage=bss();e_.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();e_.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ess(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(Ess,"useColors");function Css(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+cet.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(Css,"formatArgs");e_.log=console.debug||console.log||(()=>{});function _ss(t){try{t?e_.storage.setItem("debug",t):e_.storage.removeItem("debug")}catch{}}a(_ss,"save");function vss(){let t;try{t=e_.storage.getItem("debug")||e_.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(vss,"load");function bss(){try{return localStorage}catch{}}a(bss,"localstorage");cet.exports=Zzt()(e_);var{formatters:Tss}=cet.exports;Tss.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var NNn=T((Lh,det)=>{f();var Sss=require("tty"),uet=require("util");Lh.init=Nss;Lh.log=Rss;Lh.formatArgs=xss;Lh.save=Pss;Lh.load=kss;Lh.useColors=Iss;Lh.destroy=uet.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Lh.colors=[6,2,3,4,5,1];try{let t=nLe();t&&(t.stderr||t).level>=2&&(Lh.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Lh.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function Iss(){return"colors"in Lh.inspectOpts?!!Lh.inspectOpts.colors:Sss.isatty(process.stderr.fd)}a(Iss,"useColors");function xss(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` +`)}setDiagnosticsData(e){this._fileDiagnostics=e}setTerminalData(e){this._terminalOutput=e}setLanguageContext(e){this._languageContext=e}toJSON(){return{requestId:this.requestId,time:this.time,filePath:this.filePath,version:this.version,statelessNextEditProviderId:this._statelessNextEditProviderId,nextEditRequest:this._nextEditRequest?.serialize(),diagnosticsResultEdit:this._diagnosticsResultEdit?.toString(),resultEdit:this._resultEdit?.toString(),isCachedResult:!!this._logContextOfCachedEdit,prompt:this.prompt,error:String(this.error),response:this.fullResponse,responseResults:c2n.stringify(this._responseResults,null," "),providerStartTime:this.providerStartTime,providerEndTime:this.providerEndTime,fetchStartTime:this.fetchStartTime,fetchEndTime:this.fetchEndTime,logs:this._logs,isAccepted:this._isAccepted,languageContext:this._languageContext?(0,vis.serializeLanguageContext)(this._languageContext):void 0,diagnostics:this._fileDiagnostics,terminalOutput:this._terminalOutput}}};j5.InlineEditRequestLogContext=VWt;function Tis(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?t:t.slice(e+1)}a(Tis,"basename")});var l2n=T(fXe=>{"use strict";f();Object.defineProperty(fXe,"__esModule",{value:!0});fXe.GhostTextLogContext=void 0;var Sis=dXe(),Iis=gm(),WWt=class extends Sis.InlineEditRequestLogContext{static{a(this,"GhostTextLogContext")}getDebugName(){return`Ghost | ${(0,Iis.basename)(this.filePath)} (v${this.version})`}};fXe.GhostTextLogContext=WWt});var c7=T(kae=>{"use strict";f();Object.defineProperty(kae,"__esModule",{value:!0});kae.CopilotTokenStore=kae.ICopilotTokenStore=void 0;var xis=qr(),wis=Xa(),Ris=ro();kae.ICopilotTokenStore=(0,xis.createServiceIdentifier)("ICopilotTokenStore");var zWt=class extends Ris.Disposable{static{a(this,"CopilotTokenStore")}constructor(){super(...arguments),this._onDidStoreUpdate=this._register(new wis.Emitter),this.onDidStoreUpdate=this._onDidStoreUpdate.event}get copilotToken(){return this._copilotToken}set copilotToken(e){let r=this._copilotToken?.token;this._copilotToken=e,r!==e?.token&&this._onDidStoreUpdate.fire()}};kae.CopilotTokenStore=zWt});var bp=T(Bm=>{"use strict";f();var Pis=Bm&&Bm.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},kis=Bm&&Bm.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.TelemetryTrustedValue=Bm.ITelemetryService=Bm.TelemetryUserConfigImpl=Bm.ITelemetryUserConfig=void 0;Bm.createTrackingIdGetter=Nis;Bm.multiplexProperties=Ois;var u2n=qr(),Dis=c7();Bm.ITelemetryUserConfig=(0,u2n.createServiceIdentifier)("ITelemetryUserConfig");var YWt=class{static{a(this,"TelemetryUserConfigImpl")}constructor(e,r,n){this._tokenStore=n,this.trackingId=e,this.optedIn=r??!1,this.updateFromToken(this._tokenStore.copilotToken),this._tokenStore.onDidStoreUpdate(()=>{this.updateFromToken(this._tokenStore.copilotToken)})}updateFromToken(e){if(!e)return;let r=e.getTokenValue("rt")==="1",n=e.getTokenValue("tid");n!==void 0&&(this.trackingId=n,this.organizationsList=e.organizationList.toString(),this.enterpriseList=e.enterpriseList.toString(),this.optedIn=r)}};Bm.TelemetryUserConfigImpl=YWt;Bm.TelemetryUserConfigImpl=YWt=Pis([kis(2,Dis.ICopilotTokenStore)],YWt);function Nis(t){let e=t.copilotToken?.getTokenValue("tid");return t.onDidStoreUpdate(()=>{let r=t.copilotToken?.getTokenValue("tid");r&&(e=r)}),()=>e}a(Nis,"createTrackingIdGetter");Bm.ITelemetryService=(0,u2n.createServiceIdentifier)("ITelemetryService");var KWt=class{static{a(this,"TelemetryTrustedValue")}constructor(e){this.value=e,this.isTrustedTelemetryValue=!0}};Bm.TelemetryTrustedValue=KWt;var nTe=8192,Mis=50;function Ois(t){let e={...t};for(let r in t){let n=t[r],o=n?.length??0;if(o>nTe){let s=0,c=0;for(;o>0&&c1&&(l=r+"_"+(c<10?"0":"")+c);let u=s+nTe;o{"use strict";f();var Bis=io&&io.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Lis=io&&io.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Fis=io&&io.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Bis(e,t,r);return Lis(e,t),e},JWt=io&&io.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},XWt=io&&io.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var tzt=yW&&yW.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},rzt=yW&&yW.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]this.maxSizeBytes?[4,this._createBackupFile(r)]:[3,14];case 13:return u.sent(),[3,16];case 14:return[4,$5.appendFileAsync(this._fileFullPath,r)];case 15:u.sent(),u.label=16;case 16:return[3,18];case 17:return l=u.sent(),console.log(this.TAG,"Failed to create backup file: "+(l&&l.message)),[3,18];case 18:return[2]}})})},t.prototype._createBackupFile=function(e){return tzt(this,void 0,void 0,function(){var r,n,o;return rzt(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),[4,$5.readFileAsync(this._fileFullPath)];case 1:return r=s.sent(),n=AW.join(this._tempDir,new Date().getTime()+"."+this._logFileName),[4,$5.writeFileAsync(n,r)];case 2:return s.sent(),[3,5];case 3:return o=s.sent(),console.log("Failed to generate backup log file",o),[3,5];case 4:return $5.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}})})},t.prototype._fileCleanupTask=function(){return tzt(this,void 0,void 0,function(){var e,r,n,o,s,c=this;return rzt(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,$5.readdirAsync(this._tempDir)];case 1:e=l.sent(),e=e.filter(function(u){return AW.basename(u).indexOf(c._backUpNameFormat)>-1}),e.sort(function(u,d){var p=new Date(parseInt(u.split(c._backUpNameFormat)[0])),h=new Date(parseInt(d.split(c._backUpNameFormat)[0]));if(p=h)return 1}),r=e.length,n=0,l.label=2;case 2:return n{"use strict";f();var m2n=h2n(),Vis="APPLICATION_INSIGHTS_ENABLE_DEBUG_LOGS",Wis="APPLICATION_INSIGHTS_DISABLE_WARNING_LOGS",zis=(function(){function t(){}return a(t,"Logging"),t.info=function(e){for(var r=[],n=1;n{Yis.exports={}});var hXe=T(Dae=>{"use strict";f();var Kis=Dae&&Dae.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dae,"__esModule",{value:!0});Dae.JsonConfig=void 0;var Jis=require("fs"),pXe=require("path"),nzt=Hc(),Xis=Kis(A2n()),Zis="APPLICATIONINSIGHTS_CONFIGURATION_FILE",eos="APPLICATIONINSIGHTS_CONNECTION_STRING",y2n="APPSETTING_",E2n="APPINSIGHTS_INSTRUMENTATIONKEY",_2n="APPINSIGHTS_INSTRUMENTATION_KEY",tos="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",ros="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",nos="http_proxy",ios="https_proxy",oos="APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL",sos="APPLICATION_INSIGHTS_NO_STATSBEAT",aos="APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE",cos="APPLICATION_INSIGHTS_NO_PATCH_MODULES",los="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED",uos="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING",dos="APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE",fos="APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED",pos="APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING",hos=(function(){function t(){this.connectionString=process.env[eos],this.instrumentationKey=process.env[E2n]||process.env[y2n+E2n]||process.env[_2n]||process.env[y2n+_2n],!this.connectionString&&this.instrumentationKey&&nzt.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env[ros],this.extendedMetricDisablers=process.env[tos],this.proxyHttpUrl=process.env[nos],this.proxyHttpsUrl=process.env[ios],this.noDiagnosticChannel=!!process.env[oos],this.disableStatsbeat=!!process.env[sos],this.noHttpAgentKeepAlive=!!process.env[aos],this.noPatchModules=process.env[cos]||"",this.enableWebInstrumentation=!!process.env[los]||!!process.env[fos],this.webInstrumentationSrc=process.env[dos]||"",this.webInstrumentationConnectionString=process.env[uos]||process.env[pos]||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return a(t,"JsonConfig"),t.getInstance=function(){return t._instance||(t._instance=new t),t._instance},t.prototype._loadJsonFile=function(){var e="",r=process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT;if(r)e=r;else{var n="applicationinsights.json",o=pXe.join(__dirname,"../../");this._tempDir=pXe.join(o,n);var s=process.env[Zis];if(s){pXe.isAbsolute(s)?this._tempDir=s:this._tempDir=pXe.join(o,s);try{e=Jis.readFileSync(this._tempDir,"utf8")}catch(l){nzt.warn("Failed to read JSON config file: ",l)}}else e=JSON.stringify(Xis.default)}try{var c=JSON.parse(e);c.disableStatsbeat!=null&&(this.disableStatsbeat=c.disableStatsbeat),c.disableAllExtendedMetrics!=null&&(this.disableAllExtendedMetrics=c.disableStatsbeat),c.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=c.noDiagnosticChannel),c.noHttpAgentKeepAlive!=null&&(this.noHttpAgentKeepAlive=c.noHttpAgentKeepAlive),c.connectionString!=null&&(this.connectionString=c.connectionString),c.extendedMetricDisablers!=null&&(this.extendedMetricDisablers=c.extendedMetricDisablers),c.noDiagnosticChannel!=null&&(this.noDiagnosticChannel=c.noDiagnosticChannel),c.proxyHttpUrl!=null&&(this.proxyHttpUrl=c.proxyHttpUrl),c.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=c.proxyHttpsUrl),c.proxyHttpsUrl!=null&&(this.proxyHttpsUrl=c.proxyHttpsUrl),c.noPatchModules!=null&&(this.noPatchModules=c.noPatchModules),c.enableAutoWebSnippetInjection!=null&&(this.enableWebInstrumentation=c.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),c.enableWebInstrumentation!=null&&(this.enableWebInstrumentation=c.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),c.webSnippetConnectionString!=null&&(this.webInstrumentationConnectionString=c.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),c.webInstrumentationConnectionString!=null&&(this.webInstrumentationConnectionString=c.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),c.webInstrumentationConfig!=null&&(this.webInstrumentationConfig=c.webInstrumentationConfig),c.webInstrumentationSrc!=null&&(this.webInstrumentationSrc=c.webInstrumentationSrc),c.enableLoggerErrorToTrace!=null&&(this.enableLoggerErrorToTrace=c.enableLoggerErrorToTrace),this.endpointUrl=c.endpointUrl,this.maxBatchSize=c.maxBatchSize,this.maxBatchIntervalMs=c.maxBatchIntervalMs,this.disableAppInsights=c.disableAppInsights,this.samplingPercentage=c.samplingPercentage,this.correlationIdRetryIntervalMs=c.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=c.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=c.ignoreLegacyHeaders,this.distributedTracingMode=c.distributedTracingMode,this.enableAutoCollectExternalLoggers=c.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=c.enableAutoCollectConsole,this.enableLoggerErrorToTrace=c.enableLoggerErrorToTrace,this.enableAutoCollectExceptions=c.enableAutoCollectExceptions,this.enableAutoCollectPerformance=c.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=c.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=c.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=c.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=c.enableAutoCollectRequests,this.enableAutoCollectDependencies=c.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=c.enableAutoDependencyCorrelation,this.enableAutoCollectIncomingRequestAzureFunctions=c.enableAutoCollectIncomingRequestAzureFunctions,this.enableUseAsyncHooks=c.enableUseAsyncHooks,this.enableUseDiskRetryCaching=c.enableUseDiskRetryCaching,this.enableResendInterval=c.enableResendInterval,this.enableMaxBytesOnDisk=c.enableMaxBytesOnDisk,this.enableInternalDebugLogging=c.enableInternalDebugLogging,this.enableInternalWarningLogging=c.enableInternalWarningLogging,this.enableSendLiveMetrics=c.enableSendLiveMetrics,this.quickPulseHost=c.quickPulseHost}catch(l){nzt.warn("Invalid JSON config file: ",l)}},t})();Dae.JsonConfig=hos});var izt=T(mXe=>{"use strict";f();Object.defineProperty(mXe,"__esModule",{value:!0});mXe.makePatchingRequire=void 0;var mos=require("path"),gos=I8(),C2n=Hd(),b2n=require("module"),Aos=Object.keys(process.binding("natives")),v2n=b2n.prototype.require;function yos(t){var e={};return a(function(n){var o=v2n.apply(this,arguments);if(t[n]){var s=b2n._resolveFilename(n,this);if(e.hasOwnProperty(s))return e[s];var c=void 0;if(Aos.indexOf(n)<0)try{c=v2n.call(this,mos.join(n,"package.json")).version}catch{return o}else c=process.version.substring(1);var l=c.indexOf("-");l>=0&&(c=c.substring(0,l));for(var u=o,d=0,p=t[n];d{Eos.exports={name:"diagnostic-channel",version:"1.1.1",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"eslint ./ --fix",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js",debug:"mocha --inspect-brk ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^7.5.3"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",sinon:"1.17.6",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}});var Hd=T(vS=>{"use strict";f();Object.defineProperty(vS,"__esModule",{value:!0});vS.channel=vS.ContextPreservingEventEmitter=vS.trueFilter=vS.makePatchingRequire=void 0;var _os=izt(),Cos=izt();Object.defineProperty(vS,"makePatchingRequire",{enumerable:!0,get:a(function(){return Cos.makePatchingRequire},"get")});var vos=a(function(t){return!0},"trueFilter");vS.trueFilter=vos;var I2n=(function(){function t(){this.version=T2n().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.modulesPatched=[],this.currentlyPublishing=!1}return a(t,"ContextPreservingEventEmitter"),t.prototype.shouldPublish=function(e){var r=this.subscribers[e];return r?r.some(function(n){var o=n.filter;return!o||o(!1)}):!1},t.prototype.publish=function(e,r){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var o={timestamp:Date.now(),data:r};this.currentlyPublishing=!0,n.forEach(function(s){var c=s.listener,l=s.filter;try{l&&l(!0)&&c(o)}catch{}}),this.currentlyPublishing=!1}}},t.prototype.subscribe=function(e,r,n,o){n===void 0&&(n=vS.trueFilter),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:r,filter:n,patchCallback:o});var s=this.checkIfModuleIsAlreadyPatched(e);s&&o&&o(s.name,s.version)},t.prototype.unsubscribe=function(e,r,n){n===void 0&&(n=vS.trueFilter);var o=this.subscribers[e];if(o){for(var s=0;s{f();x2n=typeof globalThis=="object"?globalThis:global});var R2n=Pe(()=>{f();w2n()});var P2n=Pe(()=>{f();R2n()});var IO,ozt=Pe(()=>{f();IO="1.9.0"});function bos(t){var e=new Set([t]),r=new Set,n=t.match(k2n);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return a(function(u){return u===t},"isExactmatch");function s(l){return r.add(l),!1}a(s,"_reject");function c(l){return e.add(l),!0}return a(c,"_accept"),a(function(u){if(e.has(u))return!0;if(r.has(u))return!1;var d=u.match(k2n);if(!d)return s(u);var p={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};return p.prerelease!=null||o.major!==p.major?s(u):o.major===0?o.minor===p.minor&&o.patch<=p.patch?c(u):s(u):o.minor<=p.minor?c(u):s(u)},"isCompatible")}var k2n,D2n,N2n=Pe(()=>{f();ozt();k2n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;a(bos,"_makeCompatibilityCheck");D2n=bos(IO)});function V5(t,e,r,n){var o;n===void 0&&(n=!1);var s=oTe[iTe]=(o=oTe[iTe])!==null&&o!==void 0?o:{version:IO};if(!n&&s[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(c.stack||c.message),!1}if(s.version!==IO){var c=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+t+" does not match previously registered API v"+IO);return r.error(c.stack||c.message),!1}return s[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+IO+"."),!0}function kv(t){var e,r,n=(e=oTe[iTe])===null||e===void 0?void 0:e.version;if(!(!n||!D2n(n)))return(r=oTe[iTe])===null||r===void 0?void 0:r[t]}function W5(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+IO+".");var r=oTe[iTe];r&&delete r[t]}var Tos,iTe,oTe,EW=Pe(()=>{f();P2n();ozt();N2n();Tos=IO.split(".")[0],iTe=Symbol.for("opentelemetry.js.api."+Tos),oTe=x2n;a(V5,"registerGlobal");a(kv,"getGlobal");a(W5,"unregisterGlobal")});function sTe(t,e,r){var n=kv("diag");if(n)return r.unshift(e),n[t].apply(n,Ios([],Sos(r),!1))}var Sos,Ios,M2n,O2n=Pe(()=>{f();EW();Sos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Ios=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(Fs||(Fs={}))});function B2n(t,e){tFs.ALL&&(t=Fs.ALL),e=e||{};function r(n,o){var s=e[n];return typeof s=="function"&&t>=o?s.bind(e):function(){}}return a(r,"_filterFunc"),{error:r("error",Fs.ERROR),warn:r("warn",Fs.WARN),info:r("info",Fs.INFO),debug:r("debug",Fs.DEBUG),verbose:r("verbose",Fs.VERBOSE)}}var L2n=Pe(()=>{f();gXe();a(B2n,"createLogLevelDiagLogger")});var xos,wos,Ros,eA,_W=Pe(()=>{f();O2n();L2n();gXe();EW();xos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},wos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n";p.warn("Current logger will be overwritten from "+m),h.warn("Current logger will overwrite one already registered from "+m)}return V5("diag",h,r,!0)},"setLogger");r.setLogger=n,r.disable=function(){W5(Ros,r)},r.createComponentLogger=function(o){return new M2n(o)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return a(t,"DiagAPI"),t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})()});var Pos,kos,F2n,U2n=Pe(()=>{f();Pos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},kos=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},F2n=(function(){function t(e){this._entries=e?new Map(e):new Map}return a(t,"BaggageImpl"),t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=Pos(e,2),n=r[0],o=r[1];return[n,o]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],o=0;o{f();Q2n=Symbol("BaggageEntryMetadata")});function G2n(t){return t===void 0&&(t={}),new F2n(new Map(Object.entries(t)))}function Nae(t){return typeof t!="string"&&(Dos.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:Q2n,toString:a(function(){return t},"toString")}}var Dos,szt=Pe(()=>{f();_W();U2n();q2n();Dos=eA.instance();a(G2n,"createBaggage");a(Nae,"baggageEntryMetadataFromString")});function L_(t){return Symbol.for(t)}var Nos,AXe,aTe=Pe(()=>{f();a(L_,"createContextKey");Nos=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,o){var s=new t(r._currentContext);return s._currentContext.set(n,o),s},r.deleteValue=function(n){var o=new t(r._currentContext);return o._currentContext.delete(n),o}}return a(t,"BaseContext"),t})(),AXe=new Nos});var azt,H2n,j2n=Pe(()=>{f();azt=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],H2n=(function(){function t(){function e(n){return function(){for(var o=[],s=0;s{f();CW=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Mos=(function(){function t(){}return a(t,"NoopMeter"),t.prototype.createGauge=function(e,r){return Hos},t.prototype.createHistogram=function(e,r){return jos},t.prototype.createCounter=function(e,r){return Gos},t.prototype.createUpDownCounter=function(e,r){return $os},t.prototype.createObservableGauge=function(e,r){return Wos},t.prototype.createObservableCounter=function(e,r){return Vos},t.prototype.createObservableUpDownCounter=function(e,r){return zos},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})(),yXe=(function(){function t(){}return a(t,"NoopMetric"),t})(),Oos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopCounterMetric"),e.prototype.add=function(r,n){},e})(yXe),Bos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopUpDownCounterMetric"),e.prototype.add=function(r,n){},e})(yXe),Los=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopGaugeMetric"),e.prototype.record=function(r,n){},e})(yXe),Fos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopHistogramMetric"),e.prototype.record=function(r,n){},e})(yXe),czt=(function(){function t(){}return a(t,"NoopObservableMetric"),t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),Uos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableCounterMetric"),e})(czt),Qos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableGaugeMetric"),e})(czt),qos=(function(t){CW(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NoopObservableUpDownCounterMetric"),e})(czt),lzt=new Mos,Gos=new Oos,Hos=new Los,jos=new Fos,$os=new Bos,Vos=new Uos,Wos=new Qos,zos=new qos;a($2n,"createNoopMeter")});var EXe,V2n=Pe(()=>{f();(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(EXe||(EXe={}))});var _Xe,CXe,dzt=Pe(()=>{f();_Xe={get:a(function(t,e){if(t!=null)return t[e]},"get"),keys:a(function(t){return t==null?[]:Object.keys(t)},"keys")},CXe={set:a(function(t,e,r){t!=null&&(t[e]=r)},"set")}});var Yos,Kos,W2n,z2n=Pe(()=>{f();aTe();Yos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Kos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();z2n();EW();_W();Jos=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Xos=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(ed||(ed={}))});var lTe,uTe,Mae,vXe=Pe(()=>{f();pzt();lTe="0000000000000000",uTe="00000000000000000000000000000000",Mae={traceId:uTe,spanId:lTe,traceFlags:ed.NONE}});var u7,bXe=Pe(()=>{f();vXe();u7=(function(){function t(e){e===void 0&&(e=Mae),this._spanContext=e}return a(t,"NonRecordingSpan"),t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})()});function TXe(t){return t.getValue(hzt)||void 0}function Y2n(){return TXe(l7.getInstance().active())}function dTe(t,e){return t.setValue(hzt,e)}function K2n(t){return t.deleteValue(hzt)}function J2n(t,e){return dTe(t,new u7(e))}function SXe(t){var e;return(e=TXe(t))===null||e===void 0?void 0:e.spanContext()}var hzt,mzt=Pe(()=>{f();aTe();bXe();cTe();hzt=L_("OpenTelemetry Context Key SPAN");a(TXe,"getSpan");a(Y2n,"getActiveSpan");a(dTe,"setSpan");a(K2n,"deleteSpan");a(J2n,"setSpanContext");a(SXe,"getSpanContext")});function vW(t){return ess.test(t)&&t!==uTe}function gzt(t){return tss.test(t)&&t!==lTe}function F_(t){return vW(t.traceId)&&gzt(t.spanId)}function X2n(t){return new u7(t)}var ess,tss,IXe=Pe(()=>{f();vXe();bXe();ess=/^([0-9a-f]{32})$/i,tss=/^[0-9a-f]{16}$/i;a(vW,"isValidTraceId");a(gzt,"isValidSpanId");a(F_,"isSpanContextValid");a(X2n,"wrapSpanContext")});function rss(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var Azt,xXe,yzt=Pe(()=>{f();cTe();mzt();bXe();IXe();Azt=l7.getInstance(),xXe=(function(){function t(){}return a(t,"NoopTracer"),t.prototype.startSpan=function(e,r,n){n===void 0&&(n=Azt.active());var o=!!r?.root;if(o)return new u7;var s=n&&SXe(n);return rss(s)&&F_(s)?new u7(s):new u7},t.prototype.startActiveSpan=function(e,r,n,o){var s,c,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,c=n,l=o);var u=c??Azt.active(),d=this.startSpan(e,s,u),p=dTe(u,d);return Azt.with(p,l,void 0,d)}},t})();a(rss,"isSpanContext")});var nss,wXe,Ezt=Pe(()=>{f();yzt();nss=new xXe,wXe=(function(){function t(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}return a(t,"ProxyTracer"),t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,o){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):nss},t})()});var Z2n,ePn=Pe(()=>{f();yzt();Z2n=(function(){function t(){}return a(t,"NoopTracerProvider"),t.prototype.getTracer=function(e,r,n){return new xXe},t})()});var iss,fTe,_zt=Pe(()=>{f();Ezt();ePn();iss=new Z2n,fTe=(function(){function t(){}return a(t,"ProxyTracerProvider"),t.prototype.getTracer=function(e,r,n){var o;return(o=this.getDelegateTracer(e,r,n))!==null&&o!==void 0?o:new wXe(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:iss},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,r,n)},t})()});var U_,tPn=Pe(()=>{f();(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(U_||(U_={}))});var Oae,rPn=Pe(()=>{f();(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Oae||(Oae={}))});var Bae,nPn=Pe(()=>{f();(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Bae||(Bae={}))});function iPn(t){return ass.test(t)}function oPn(t){return css.test(t)&&!lss.test(t)}var Czt,oss,sss,ass,css,lss,sPn=Pe(()=>{f();Czt="[_0-9a-z-*/]",oss="[a-z]"+Czt+"{0,255}",sss="[a-z0-9]"+Czt+"{0,240}@[a-z]"+Czt+"{0,13}",ass=new RegExp("^(?:"+oss+"|"+sss+")$"),css=/^[ -~]{0,255}[!-~]$/,lss=/,|=/;a(iPn,"validateKey");a(oPn,"validateValue")});var aPn,uss,cPn,lPn,uPn,dPn=Pe(()=>{f();sPn();aPn=32,uss=512,cPn=",",lPn="=",uPn=(function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return a(t,"TraceStateImpl"),t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+lPn+e.get(n)),r},[]).join(cPn)},t.prototype._parse=function(e){e.length>uss||(this._internalState=e.split(cPn).reverse().reduce(function(r,n){var o=n.trim(),s=o.indexOf(lPn);if(s!==-1){var c=o.slice(0,s),l=o.slice(s+1,n.length);iPn(c)&&oPn(l)&&r.set(c,l)}return r},new Map),this._internalState.size>aPn&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,aPn))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t})()});function fPn(t){return new uPn(t)}var pPn=Pe(()=>{f();dPn();a(fPn,"createTraceState")});var Rh,hPn=Pe(()=>{f();cTe();Rh=l7.getInstance()});var cn,mPn=Pe(()=>{f();_W();cn=eA.instance()});var dss,gPn,APn=Pe(()=>{f();uzt();dss=(function(){function t(){}return a(t,"NoopMeterProvider"),t.prototype.getMeter=function(e,r,n){return lzt},t})(),gPn=new dss});var vzt,yPn,EPn=Pe(()=>{f();APn();EW();_W();vzt="metrics",yPn=(function(){function t(){}return a(t,"MetricsAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return V5(vzt,e,eA.instance())},t.prototype.getMeterProvider=function(){return kv(vzt)||gPn},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){W5(vzt,eA.instance())},t})()});var bW,_Pn=Pe(()=>{f();EPn();bW=yPn.getInstance()});var CPn,vPn=Pe(()=>{f();CPn=(function(){function t(){}return a(t,"NoopTextMapPropagator"),t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})()});function Tzt(t){return t.getValue(bzt)||void 0}function bPn(){return Tzt(l7.getInstance().active())}function TPn(t,e){return t.setValue(bzt,e)}function SPn(t){return t.deleteValue(bzt)}var bzt,IPn=Pe(()=>{f();cTe();aTe();bzt=L_("OpenTelemetry Baggage Key");a(Tzt,"getBaggage");a(bPn,"getActiveBaggage");a(TPn,"setBaggage");a(SPn,"deleteBaggage")});var Szt,fss,xPn,wPn=Pe(()=>{f();EW();vPn();dzt();IPn();szt();_W();Szt="propagation",fss=new CPn,xPn=(function(){function t(){this.createBaggage=G2n,this.getBaggage=Tzt,this.getActiveBaggage=bPn,this.setBaggage=TPn,this.deleteBaggage=SPn}return a(t,"PropagationAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return V5(Szt,e,eA.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=CXe),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=_Xe),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){W5(Szt,eA.instance())},t.prototype._getGlobalPropagator=function(){return kv(Szt)||fss},t})()});var Dv,RPn=Pe(()=>{f();wPn();Dv=xPn.getInstance()});var Izt,PPn,kPn=Pe(()=>{f();EW();_zt();IXe();mzt();_W();Izt="trace",PPn=(function(){function t(){this._proxyTracerProvider=new fTe,this.wrapSpanContext=X2n,this.isSpanContextValid=F_,this.deleteSpan=K2n,this.getSpan=TXe,this.getActiveSpan=Y2n,this.getSpanContext=SXe,this.setSpan=dTe,this.setSpanContext=J2n}return a(t,"TraceAPI"),t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=V5(Izt,this._proxyTracerProvider,eA.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return kv(Izt)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){W5(Izt,eA.instance()),this._proxyTracerProvider=new fTe},t})()});var hl,DPn=Pe(()=>{f();kPn();hl=PPn.getInstance()});var xO={};ui(xO,{DiagConsoleLogger:()=>H2n,DiagLogLevel:()=>Fs,INVALID_SPANID:()=>lTe,INVALID_SPAN_CONTEXT:()=>Mae,INVALID_TRACEID:()=>uTe,ProxyTracer:()=>wXe,ProxyTracerProvider:()=>fTe,ROOT_CONTEXT:()=>AXe,SamplingDecision:()=>U_,SpanKind:()=>Oae,SpanStatusCode:()=>Bae,TraceFlags:()=>ed,ValueType:()=>EXe,baggageEntryMetadataFromString:()=>Nae,context:()=>Rh,createContextKey:()=>L_,createNoopMeter:()=>$2n,createTraceState:()=>fPn,default:()=>pss,defaultTextMapGetter:()=>_Xe,defaultTextMapSetter:()=>CXe,diag:()=>cn,isSpanContextValid:()=>F_,isValidSpanId:()=>gzt,isValidTraceId:()=>vW,metrics:()=>bW,propagation:()=>Dv,trace:()=>hl});var pss,Bi=Pe(()=>{f();szt();aTe();j2n();gXe();uzt();V2n();dzt();Ezt();_zt();tPn();rPn();nPn();pzt();pPn();IXe();vXe();hPn();mPn();_Pn();RPn();DPn();pss={context:Rh,diag:cn,metrics:bW,propagation:Dv,trace:hl}});function Lae(t){return t.setValue(xzt,!0)}function NPn(t){return t.deleteValue(xzt)}function d7(t){return t.getValue(xzt)===!0}var xzt,pTe=Pe(()=>{f();Bi();xzt=L_("OpenTelemetry SDK Context Key SUPPRESS_TRACING");a(Lae,"suppressTracing");a(NPn,"unsuppressTracing");a(d7,"isTracingSuppressed")});var MPn,RXe,Fae,PXe,OPn,BPn,LPn,wzt=Pe(()=>{f();MPn="=",RXe=";",Fae=",",PXe="baggage",OPn=180,BPn=4096,LPn=8192});function kXe(t){return t.reduce(function(e,r){var n=""+e+(e!==""?Fae:"")+r;return n.length>LPn?e:n},"")}function DXe(t){return t.getAllEntries().map(function(e){var r=hss(e,2),n=r[0],o=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(o.value);return o.metadata!==void 0&&(s+=RXe+o.metadata.toString()),s})}function hTe(t){var e=t.split(RXe);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(MPn);if(!(n<=0)){var o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),c;return e.length>0&&(c=Nae(e.join(RXe))),{key:o,value:s,metadata:c}}}}}function FPn(t){return typeof t!="string"||t.length===0?{}:t.split(Fae).map(function(e){return hTe(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,r){return e[r.key]=r.value,e},{})}var hss,Rzt=Pe(()=>{f();Bi();wzt();hss=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s};a(kXe,"serializeKeyPairs");a(DXe,"getKeyPairs");a(hTe,"parsePairKeyValue");a(FPn,"parseKeyPairsIntoRecord")});var NXe,UPn=Pe(()=>{f();Bi();pTe();wzt();Rzt();NXe=(function(){function t(){}return a(t,"W3CBaggagePropagator"),t.prototype.inject=function(e,r,n){var o=Dv.getBaggage(e);if(!(!o||d7(e))){var s=DXe(o).filter(function(l){return l.length<=BPn}).slice(0,OPn),c=kXe(s);c.length>0&&n.set(r,PXe,c)}},t.prototype.extract=function(e,r,n){var o=n.get(r,PXe),s=Array.isArray(o)?o.join(Fae):o;if(!s)return e;var c={};if(s.length===0)return e;var l=s.split(Fae);return l.forEach(function(u){var d=hTe(u);if(d){var p={value:d.value};d.metadata&&(p.metadata=d.metadata),c[d.key]=p}}),Object.entries(c).length===0?e:Dv.setBaggage(e,Dv.createBaggage(c))},t.prototype.fields=function(){return[PXe]},t})()});var QPn,qPn=Pe(()=>{f();QPn=(function(){function t(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}return a(t,"AnchoredClock"),t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t})()});function f7(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var o=GPn(Object.entries(t)),s=o.next();!s.done;s=o.next()){var c=mss(s.value,2),l=c[0],u=c[1];if(!Pzt(l)){cn.warn("Invalid attribute key: "+l);continue}if(!mTe(u)){cn.warn("Invalid attribute value set for key: "+l);continue}Array.isArray(u)?n[l]=u.slice():n[l]=u}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}function Pzt(t){return typeof t=="string"&&t.length>0}function mTe(t){return t==null?!0:Array.isArray(t)?gss(t):HPn(t)}function gss(t){var e,r,n;try{for(var o=GPn(t),s=o.next();!s.done;s=o.next()){var c=s.value;if(c!=null){if(!n){if(HPn(c)){n=typeof c;continue}return!1}if(typeof c!==n)return!1}}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return!0}function HPn(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var GPn,mss,jPn=Pe(()=>{f();Bi();GPn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mss=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s};a(f7,"sanitizeAttributes");a(Pzt,"isAttributeKey");a(mTe,"isAttributeValue");a(gss,"isHomogeneousAttributeValueArray");a(HPn,"isValidPrimitiveAttributeValue")});function MXe(){return function(t){cn.error(Ass(t))}}function Ass(t){return typeof t=="string"?t:JSON.stringify(yss(t))}function yss(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var o=r[n];o&&(e[n]=String(o))}}),r=Object.getPrototypeOf(r);return e}var kzt=Pe(()=>{f();Bi();a(MXe,"loggingErrorHandler");a(Ass,"stringifyException");a(yss,"flattenException")});function VPn(t){$Pn=t}function Sy(t){try{$Pn(t)}catch{}}var $Pn,Dzt=Pe(()=>{f();kzt();$Pn=MXe();a(VPn,"setGlobalErrorHandler");a(Sy,"globalErrorHandler")});var Q_,Nzt=Pe(()=>{f();(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Q_||(Q_={}))});function Css(t){return _ss.indexOf(t)>-1}function bss(t){return vss.indexOf(t)>-1}function Sss(t){return Tss.indexOf(t)>-1}function Iss(t,e,r){if(!(typeof r[t]>"u")){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function xss(t,e,r,n,o){if(n===void 0&&(n=-1/0),o===void 0&&(o=1/0),typeof r[t]<"u"){var s=Number(r[t]);isNaN(s)||(so?e[t]=o:e[t]=s)}}function wss(t,e,r,n){n===void 0&&(n=Ess);var o=r[t];typeof o=="string"&&(e[t]=o.split(n).map(function(s){return s.trim()}))}function Pss(t,e,r){var n=r[t];if(typeof n=="string"){var o=Rss[n.toUpperCase()];o!=null&&(e[t]=o)}}function ATe(t){var e={};for(var r in gTe){var n=r;switch(n){case"OTEL_LOG_LEVEL":Pss(n,e,t);break;default:if(Css(n))Iss(n,e,t);else if(bss(n))xss(n,e,t);else if(Sss(n))wss(n,e,t);else{var o=t[n];typeof o<"u"&&o!==null&&(e[n]=String(o))}}}return e}var Ess,_ss,vss,Tss,TW,SW,Mzt,Ozt,gTe,Rss,Bzt=Pe(()=>{f();Bi();Nzt();Ess=",",_ss=["OTEL_SDK_DISABLED"];a(Css,"isEnvVarABoolean");vss=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];a(bss,"isEnvVarANumber");Tss=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];a(Sss,"isEnvVarAList");TW=1/0,SW=128,Mzt=128,Ozt=128,gTe={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Fs.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:TW,OTEL_ATTRIBUTE_COUNT_LIMIT:SW,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:TW,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:SW,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:TW,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:SW,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Mzt,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Ozt,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Q_.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};a(Iss,"parseBoolean");a(xss,"parseNumber");a(wss,"parseStringList");Rss={ALL:Fs.ALL,VERBOSE:Fs.VERBOSE,DEBUG:Fs.DEBUG,INFO:Fs.INFO,WARN:Fs.WARN,ERROR:Fs.ERROR,NONE:Fs.NONE};a(Pss,"setLogLevelFromEnv");a(ATe,"parseEnvironment")});function bS(){var t=ATe(process.env);return Object.assign({},gTe,t)}function Uae(){return ATe(process.env)}var WPn=Pe(()=>{f();Bzt();a(bS,"getEnv");a(Uae,"getEnvWithoutDefaults")});var OXe,zPn=Pe(()=>{f();OXe=typeof globalThis=="object"?globalThis:global});function YPn(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function BXe(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n{f();a(YPn,"intValue");a(BXe,"hexToBinary")});function LXe(t){return Buffer.from(BXe(t)).toString("base64")}var KPn=Pe(()=>{f();Lzt();a(LXe,"hexToBase64")});function JPn(t){return a(function(){for(var r=0;r>>0,r*4);for(var r=0;r0);r++)r===t-1&&(FXe[t-1]=1);return FXe.toString("hex",0,t)},"generateId")}var kss,XPn,UXe,FXe,ZPn=Pe(()=>{f();kss=8,XPn=16,UXe=(function(){function t(){this.generateTraceId=JPn(XPn),this.generateSpanId=JPn(kss)}return a(t,"RandomIdGenerator"),t})(),FXe=Buffer.allocUnsafe(XPn);a(JPn,"getIdGenerator")});var ekn,TS,tkn=Pe(()=>{f();ekn=require("perf_hooks"),TS=ekn.performance});var QXe,Fzt=Pe(()=>{f();QXe="1.30.1"});var rkn=Pe(()=>{f()});var nkn=Pe(()=>{f();rkn()});var Dss,Nss,Mss,Oss,ikn,okn,skn,akn,Bss,ckn,lkn=Pe(()=>{f();Dss="process.runtime.name",Nss="telemetry.sdk.name",Mss="telemetry.sdk.language",Oss="telemetry.sdk.version",ikn=Dss,okn=Nss,skn=Mss,akn=Oss,Bss="nodejs",ckn=Bss});var ukn=Pe(()=>{f();lkn()});var dkn=Pe(()=>{f()});var fkn=Pe(()=>{f()});var pkn=Pe(()=>{f();nkn();ukn();dkn();fkn()});var Qae,p7,hkn=Pe(()=>{f();Fzt();pkn();p7=(Qae={},Qae[okn]="opentelemetry",Qae[ikn]="node",Qae[skn]=ckn,Qae[akn]=QXe,Qae)});function qae(t){t.unref()}var mkn=Pe(()=>{f();a(qae,"unrefTimer")});var gkn=Pe(()=>{f();WPn();zPn();KPn();ZPn();tkn();hkn();mkn()});var Uzt=Pe(()=>{f();gkn()});function Uw(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Fss);return[r,n]}function Gae(){var t=TS.timeOrigin;if(typeof t!="number"){var e=TS;t=e.timing&&e.timing.fetchStart}return t}function yTe(t){var e=Uw(Gae()),r=Uw(typeof t=="number"?t:TS.now());return CTe(e,r)}function ykn(t){if(Hae(t))return t;if(typeof t=="number")return t=qXe&&(r[1]-=qXe,r[0]+=1),r}var Akn,Lss,Fss,qXe,vkn=Pe(()=>{f();Uzt();Akn=9,Lss=6,Fss=Math.pow(10,Lss),qXe=Math.pow(10,Akn);a(Uw,"millisToHrTime");a(Gae,"getTimeOrigin");a(yTe,"hrTime");a(ykn,"timeInputToHrTime");a(GXe,"hrTimeDuration");a(Ekn,"hrTimeToTimeStamp");a(_kn,"hrTimeToNanoseconds");a(Ckn,"hrTimeToMilliseconds");a(ETe,"hrTimeToMicroseconds");a(Hae,"isTimeInputHrTime");a(_Te,"isTimeInput");a(CTe,"addHrTimes")});var Nv,bkn=Pe(()=>{f();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Nv||(Nv={}))});var Uss,HXe,Tkn=Pe(()=>{f();Bi();Uss=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},HXe=(function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,o){return n.concat(o)},[])))}return a(t,"CompositePropagator"),t.prototype.inject=function(e,r,n){var o,s;try{for(var c=Uss(this._propagators),l=c.next();!l.done;l=c.next()){var u=l.value;try{u.inject(e,r,n)}catch(d){cn.warn("Failed to inject with "+u.constructor.name+". Err: "+d.message)}}}catch(d){o={error:d}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(o,s){try{return s.extract(o,r,n)}catch(c){cn.warn("Failed to extract with "+s.constructor.name+". Err: "+c.message)}return o},e)},t.prototype.fields=function(){return this._fields.slice()},t})()});function Skn(t){return Gss.test(t)}function Ikn(t){return Hss.test(t)&&!jss.test(t)}var Qzt,Qss,qss,Gss,Hss,jss,xkn=Pe(()=>{f();Qzt="[_0-9a-z-*/]",Qss="[a-z]"+Qzt+"{0,255}",qss="[a-z0-9]"+Qzt+"{0,240}@[a-z]"+Qzt+"{0,13}",Gss=new RegExp("^(?:"+Qss+"|"+qss+")$"),Hss=/^[ -~]{0,255}[!-~]$/,jss=/,|=/;a(Skn,"validateKey");a(Ikn,"validateValue")});var wkn,$ss,Rkn,Pkn,jXe,qzt=Pe(()=>{f();xkn();wkn=32,$ss=512,Rkn=",",Pkn="=",jXe=(function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return a(t,"TraceState"),t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+Pkn+e.get(n)),r},[]).join(Rkn)},t.prototype._parse=function(e){e.length>$ss||(this._internalState=e.split(Rkn).reverse().reduce(function(r,n){var o=n.trim(),s=o.indexOf(Pkn);if(s!==-1){var c=o.slice(0,s),l=o.slice(s+1,n.length);Skn(c)&&Ikn(l)&&r.set(c,l)}return r},new Map),this._internalState.size>wkn&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,wkn))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t})()});function Gzt(t){var e=Jss.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var vTe,bTe,Vss,Wss,zss,Yss,Kss,Jss,$Xe,kkn=Pe(()=>{f();Bi();pTe();qzt();vTe="traceparent",bTe="tracestate",Vss="00",Wss="(?!ff)[\\da-f]{2}",zss="(?![0]{32})[\\da-f]{32}",Yss="(?![0]{16})[\\da-f]{16}",Kss="[\\da-f]{2}",Jss=new RegExp("^\\s?("+Wss+")-("+zss+")-("+Yss+")-("+Kss+")(-.*)?\\s?$");a(Gzt,"parseTraceParent");$Xe=(function(){function t(){}return a(t,"W3CTraceContextPropagator"),t.prototype.inject=function(e,r,n){var o=hl.getSpanContext(e);if(!(!o||d7(e)||!F_(o))){var s=Vss+"-"+o.traceId+"-"+o.spanId+"-0"+Number(o.traceFlags||ed.NONE).toString(16);n.set(r,vTe,s),o.traceState&&n.set(r,bTe,o.traceState.serialize())}},t.prototype.extract=function(e,r,n){var o=n.get(r,vTe);if(!o)return e;var s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;var c=Gzt(s);if(!c)return e;c.isRemote=!0;var l=n.get(r,bTe);if(l){var u=Array.isArray(l)?l.join(","):l;c.traceState=new jXe(typeof u=="string"?u:void 0)}return hl.setSpanContext(e,c)},t.prototype.fields=function(){return[vTe,bTe]},t})()});function Dkn(t,e){return t.setValue(Hzt,e)}function Nkn(t){return t.deleteValue(Hzt)}function Mkn(t){return t.getValue(Hzt)}var Hzt,VXe,Okn=Pe(()=>{f();Bi();Hzt=L_("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(VXe||(VXe={}));a(Dkn,"setRPCMetadata");a(Nkn,"deleteRPCMetadata");a(Mkn,"getRPCMetadata")});var TTe,jzt=Pe(()=>{f();Bi();TTe=(function(){function t(){}return a(t,"AlwaysOffSampler"),t.prototype.shouldSample=function(){return{decision:U_.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})()});var jae,$zt=Pe(()=>{f();Bi();jae=(function(){function t(){}return a(t,"AlwaysOnSampler"),t.prototype.shouldSample=function(){return{decision:U_.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})()});var Bkn,Lkn=Pe(()=>{f();Bi();Dzt();jzt();$zt();Bkn=(function(){function t(e){var r,n,o,s;this._root=e.root,this._root||(Sy(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new jae),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new jae,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new TTe,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new jae,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new TTe}return a(t,"ParentBasedSampler"),t.prototype.shouldSample=function(e,r,n,o,s,c){var l=hl.getSpanContext(e);return!l||!F_(l)?this._root.shouldSample(e,r,n,o,s,c):l.isRemote?l.traceFlags&ed.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,c):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,c):l.traceFlags&ed.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,c):this._localParentNotSampled.shouldSample(e,r,n,o,s,c)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t})()});var Fkn,Ukn=Pe(()=>{f();Bi();Fkn=(function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return a(t,"TraceIdRatioBasedSampler"),t.prototype.shouldSample=function(e,r){return{decision:vW(r)&&this._accumulate(r)=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n>>0}return r},t})()});function ias(t,e){return function(r){return t(e(r))}}function Vzt(t){if(!oas(t)||sas(t)!==Xss)return!1;var e=nas(t);if(e===null)return!0;var r=Gkn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Qkn.call(r)===ras}function oas(t){return t!=null&&typeof t=="object"}function sas(t){return t==null?t===void 0?eas:Zss:IW&&IW in Object(t)?aas(t):cas(t)}function aas(t){var e=Gkn.call(t,IW),r=t[IW],n=!1;try{t[IW]=void 0,n=!0}catch{}var o=Hkn.call(t);return n&&(e?t[IW]=r:delete t[IW]),o}function cas(t){return Hkn.call(t)}var Xss,Zss,eas,tas,Qkn,ras,nas,qkn,Gkn,IW,Hkn,jkn=Pe(()=>{f();Xss="[object Object]",Zss="[object Null]",eas="[object Undefined]",tas=Function.prototype,Qkn=tas.toString,ras=Qkn.call(Object),nas=ias(Object.getPrototypeOf,Object),qkn=Object.prototype,Gkn=qkn.hasOwnProperty,IW=Symbol?Symbol.toStringTag:void 0,Hkn=qkn.toString;a(ias,"overArg");a(Vzt,"isPlainObject");a(oas,"isObjectLike");a(sas,"baseGetTag");a(aas,"getRawTag");a(cas,"objectToString")});function YXe(){for(var t=[],e=0;e0;)r=Vkn(r,t.shift(),0,n);return r}function Wzt(t){return zXe(t)?t.slice():t}function Vkn(t,e,r,n){r===void 0&&(r=0);var o;if(!(r>las)){if(r++,WXe(t)||WXe(e)||Wkn(e))o=Wzt(e);else if(zXe(t)){if(o=t.slice(),zXe(e))for(var s=0,c=e.length;s"u"?delete o[u]:o[u]=d;else{var p=o[u],h=d;if($kn(t,u,n)||$kn(e,u,n))delete o[u];else{if(STe(p)&&STe(h)){var m=n.get(p)||[],g=n.get(h)||[];m.push({obj:t,key:u}),g.push({obj:e,key:u}),n.set(p,m),n.set(h,g)}o[u]=Vkn(o[u],d,r,n)}}}}else o=e;return o}}function $kn(t,e,r){for(var n=r.get(t[e])||[],o=0,s=n.length;o"u"||t instanceof Date||t instanceof RegExp||t===null}function uas(t,e){return!(!Vzt(t)||!Vzt(e))}var las,zkn=Pe(()=>{f();jkn();las=20;a(YXe,"merge");a(Wzt,"takeValue");a(Vkn,"mergeTwoObjects");a($kn,"wasObjectReferenced");a(zXe,"isArray");a(Wkn,"isFunction");a(STe,"isObject");a(WXe,"isPrimitive");a(uas,"shouldMerge")});function Ykn(t,e){var r,n=new Promise(a(function(s,c){r=setTimeout(a(function(){c(new zzt("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([t,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}var das,zzt,Kkn=Pe(()=>{f();das=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),zzt=(function(t){das(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return a(e,"TimeoutError"),e})(Error);a(Ykn,"callWithTimeout")});function Yzt(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Jkn(t,e){var r,n;if(!e)return!1;try{for(var o=fas(e),s=o.next();!s.done;s=o.next()){var c=s.value;if(Yzt(t,c))return!0}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}var fas,Xkn=Pe(()=>{f();fas=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};a(Yzt,"urlMatches");a(Jkn,"isUrlIgnored")});function Zkn(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var e5n=Pe(()=>{f();a(Zkn,"isWrapped")});var t5n,r5n=Pe(()=>{f();t5n=(function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return a(t,"Deferred"),Object.defineProperty(t.prototype,"promise",{get:a(function(){return this._promise},"get"),enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t})()});var pas,has,$ae,n5n=Pe(()=>{f();r5n();pas=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},has=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();Bi();pTe();a(i5n,"_export")});var s5n={};ui(s5n,{AlwaysOffSampler:()=>TTe,AlwaysOnSampler:()=>jae,AnchoredClock:()=>QPn,BindOnceFuture:()=>$ae,CompositePropagator:()=>HXe,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>SW,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>TW,DEFAULT_ENVIRONMENT:()=>gTe,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>Mzt,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>Ozt,ExportResultCode:()=>Nv,ParentBasedSampler:()=>Bkn,RPCType:()=>VXe,RandomIdGenerator:()=>UXe,SDK_INFO:()=>p7,TRACE_PARENT_HEADER:()=>vTe,TRACE_STATE_HEADER:()=>bTe,TimeoutError:()=>zzt,TraceIdRatioBasedSampler:()=>Fkn,TraceState:()=>jXe,TracesSamplerValues:()=>Q_,VERSION:()=>QXe,W3CBaggagePropagator:()=>NXe,W3CTraceContextPropagator:()=>$Xe,_globalThis:()=>OXe,addHrTimes:()=>CTe,baggageUtils:()=>mas,callWithTimeout:()=>Ykn,deleteRPCMetadata:()=>Nkn,getEnv:()=>bS,getEnvWithoutDefaults:()=>Uae,getRPCMetadata:()=>Mkn,getTimeOrigin:()=>Gae,globalErrorHandler:()=>Sy,hexToBase64:()=>LXe,hexToBinary:()=>BXe,hrTime:()=>yTe,hrTimeDuration:()=>GXe,hrTimeToMicroseconds:()=>ETe,hrTimeToMilliseconds:()=>Ckn,hrTimeToNanoseconds:()=>_kn,hrTimeToTimeStamp:()=>Ekn,internal:()=>Kzt,isAttributeKey:()=>Pzt,isAttributeValue:()=>mTe,isTimeInput:()=>_Te,isTimeInputHrTime:()=>Hae,isTracingSuppressed:()=>d7,isUrlIgnored:()=>Jkn,isWrapped:()=>Zkn,loggingErrorHandler:()=>MXe,merge:()=>YXe,millisToHrTime:()=>Uw,otperformance:()=>TS,parseEnvironment:()=>ATe,parseTraceParent:()=>Gzt,sanitizeAttributes:()=>f7,setGlobalErrorHandler:()=>VPn,setRPCMetadata:()=>Dkn,suppressTracing:()=>Lae,timeInputToHrTime:()=>ykn,unrefTimer:()=>qae,unsuppressTracing:()=>NPn,urlMatches:()=>Yzt});var mas,Kzt,q_=Pe(()=>{f();UPn();qPn();jPn();Dzt();kzt();vkn();Lzt();bkn();Rzt();Uzt();Tkn();kkn();Okn();jzt();$zt();Lkn();Ukn();pTe();qzt();Bzt();zkn();Nzt();Kkn();Xkn();e5n();n5n();Fzt();o5n();mas={getKeyPairs:DXe,serializeKeyPairs:kXe,parseKeyPairsIntoRecord:FPn,parsePairKeyValue:hTe},Kzt={_export:i5n}});var gas,Aas,yas,KXe,JXe,a5n,c5n=Pe(()=>{f();gas="exception.type",Aas="exception.message",yas="exception.stacktrace",KXe=gas,JXe=Aas,a5n=yas});var l5n=Pe(()=>{f();c5n()});var u5n=Pe(()=>{f()});var d5n=Pe(()=>{f();u5n()});var f5n=Pe(()=>{f()});var p5n=Pe(()=>{f()});var h5n=Pe(()=>{f();l5n();d5n();f5n();p5n()});var m5n,g5n=Pe(()=>{f();m5n="exception"});var Jzt,Eas,A5n,_as,XXe,Xzt=Pe(()=>{f();Bi();q_();h5n();g5n();Jzt=function(){return Jzt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},A5n=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},_as=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(cn.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var o=Eas(Object.entries(e)),s=o.next();!s.done;s=o.next()){var c=A5n(s.value,2),l=c[0],u=c[1];this.setAttribute(l,u)}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return cn.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&cn.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),_Te(r)&&(_Te(n)||(n=r),r=void 0);var o=f7(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,_as([],A5n(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Jzt({},e),this.status.message!=null&&typeof e.message!="string"&&(cn.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){cn.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=GXe(this.startTime,this.endTime),this._duration[0]<0&&(cn.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&cn.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=TS.now())return yTe(e+this._performanceOffset);if(typeof e=="number")return Uw(e);if(e instanceof Date)return Uw(e.getTime());if(Hae(e))return e;if(this._startTimeProvided)return Uw(Date.now());var r=TS.now()-this._performanceStartTime;return CTe(this.startTime,Uw(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[JXe]=e:e&&(e.code?n[KXe]=e.code.toString():e.name&&(n[KXe]=e.name),e.message&&(n[JXe]=e.message),e.stack&&(n[a5n]=e.stack)),n[KXe]||n[JXe]?this.addEvent(m5n,n,r):cn.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:a(function(){return this._duration},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:a(function(){return this._ended},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:a(function(){return this._droppedAttributesCount},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:a(function(){return this._droppedEventsCount},"get"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:a(function(){return this._droppedLinksCount},"get"),enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&cn.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(cn.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):e},t})()});var Qw,ITe=Pe(()=>{f();(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Qw||(Qw={}))});var h7,ZXe=Pe(()=>{f();ITe();h7=(function(){function t(){}return a(t,"AlwaysOffSampler"),t.prototype.shouldSample=function(){return{decision:Qw.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})()});var z5,eZe=Pe(()=>{f();ITe();z5=(function(){function t(){}return a(t,"AlwaysOnSampler"),t.prototype.shouldSample=function(){return{decision:Qw.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})()});var Vae,Zzt=Pe(()=>{f();Bi();q_();ZXe();eZe();Vae=(function(){function t(e){var r,n,o,s;this._root=e.root,this._root||(Sy(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new z5),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new z5,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new h7,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new z5,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new h7}return a(t,"ParentBasedSampler"),t.prototype.shouldSample=function(e,r,n,o,s,c){var l=hl.getSpanContext(e);return!l||!F_(l)?this._root.shouldSample(e,r,n,o,s,c):l.isRemote?l.traceFlags&ed.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,c):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,c):l.traceFlags&ed.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,c):this._localParentNotSampled.shouldSample(e,r,n,o,s,c)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t})()});var xTe,eYt=Pe(()=>{f();Bi();ITe();xTe=(function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return a(t,"TraceIdRatioBasedSampler"),t.prototype.shouldSample=function(e,r){return{decision:vW(r)&&this._accumulate(r)=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n>>0}return r},t})()});function tZe(){var t=bS();return{sampler:tYt(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function tYt(t){switch(t===void 0&&(t=bS()),t.OTEL_TRACES_SAMPLER){case Q_.AlwaysOn:return new z5;case Q_.AlwaysOff:return new h7;case Q_.ParentBasedAlwaysOn:return new Vae({root:new z5});case Q_.ParentBasedAlwaysOff:return new Vae({root:new h7});case Q_.TraceIdRatio:return new xTe(y5n(t));case Q_.ParentBasedTraceIdRatio:return new Vae({root:new xTe(y5n(t))});default:return cn.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Cas+'".'),new z5}}function y5n(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return cn.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Wae+"."),Wae;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(cn.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Wae+"."),Wae):e<0||e>1?(cn.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Wae+"."),Wae):e}var Cas,Wae,rYt=Pe(()=>{f();Bi();q_();ZXe();eZe();Zzt();eYt();Cas=Q_.AlwaysOn,Wae=1;a(tZe,"loadDefaultConfig");a(tYt,"buildSamplerFromEnv");a(y5n,"getSamplerProbabilityFromEnv")});function E5n(t){var e={sampler:tYt()},r=tZe(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function _5n(t){var e,r,n,o,s,c,l,u,d,p,h,m,g=Object.assign({},t.spanLimits),A=Uae();return g.attributeCountLimit=(c=(s=(o=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:A.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:A.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:SW,g.attributeValueLengthLimit=(m=(h=(p=(u=(l=t.spanLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:(d=t.generalLimits)===null||d===void 0?void 0:d.attributeValueLengthLimit)!==null&&p!==void 0?p:A.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:A.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&m!==void 0?m:TW,Object.assign({},t,{spanLimits:g})}var nYt=Pe(()=>{f();rYt();q_();a(E5n,"mergeConfig");a(_5n,"reconfigureLimits")});var C5n,v5n=Pe(()=>{f();Bi();q_();C5n=(function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=bS();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new $ae(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(cn.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return a(t,"BatchSpanProcessorBase"),t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&ed.SAMPLED)!==0&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&cn.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(cn.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var o=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),c=0,l=s;c0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,Sy(n)})},"flush");if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),qae(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t})()});var vas,zae,b5n=Pe(()=>{f();v5n();vas=(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),zae=(function(t){vas(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"BatchSpanProcessor"),e.prototype.onShutdown=function(){},e})(C5n)});function T5n(t){return a(function(){for(var r=0;r>>0,r*4);for(var r=0;r0);r++)r===t-1&&(rZe[t-1]=1);return rZe.toString("hex",0,t)},"generateId")}var bas,S5n,Yae,rZe,I5n=Pe(()=>{f();bas=8,S5n=16,Yae=(function(){function t(){this.generateTraceId=T5n(S5n),this.generateSpanId=T5n(bas)}return a(t,"RandomIdGenerator"),t})(),rZe=Buffer.allocUnsafe(S5n);a(T5n,"getIdGenerator")});var x5n=Pe(()=>{f();b5n();I5n()});var nZe=Pe(()=>{f();x5n()});var iZe,iYt=Pe(()=>{f();Bi();q_();Xzt();nYt();nZe();iZe=(function(){function t(e,r,n){this._tracerProvider=n;var o=E5n(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new Yae,this.resource=n.resource,this.instrumentationLibrary=e}return a(t,"Tracer"),t.prototype.startSpan=function(e,r,n){var o,s,c;r===void 0&&(r={}),n===void 0&&(n=Rh.active()),r.root&&(n=hl.deleteSpan(n));var l=hl.getSpan(n);if(d7(n)){cn.debug("Instrumentation suppressed, returning Noop Span");var u=hl.wrapSpanContext(Mae);return u}var d=l?.spanContext(),p=this._idGenerator.generateSpanId(),h,m,g;!d||!hl.isSpanContextValid(d)?h=this._idGenerator.generateTraceId():(h=d.traceId,m=d.traceState,g=d.spanId);var A=(o=r.kind)!==null&&o!==void 0?o:Oae.INTERNAL,y=((s=r.links)!==null&&s!==void 0?s:[]).map(function(w){return{context:w.context,attributes:f7(w.attributes)}}),E=f7(r.attributes),_=this._sampler.shouldSample(n,h,e,A,E,y);m=(c=_.traceState)!==null&&c!==void 0?c:m;var v=_.decision===U_.RECORD_AND_SAMPLED?ed.SAMPLED:ed.NONE,b={traceId:h,spanId:p,traceFlags:v,traceState:m};if(_.decision===U_.NOT_RECORD){cn.debug("Recording is off, propagating context in a non-recording span");var u=hl.wrapSpanContext(b);return u}var I=f7(Object.assign(E,_.attributes)),x=new XXe(this,n,e,b,A,g,y,r.startTime,void 0,I);return x},t.prototype.startActiveSpan=function(e,r,n,o){var s,c,l;if(!(arguments.length<2)){arguments.length===2?l=r:arguments.length===3?(s=r,l=n):(s=r,c=n,l=o);var u=c??Rh.active(),d=this.startSpan(e,s,u),p=hl.setSpan(u,d);return Rh.with(p,l,void 0,d)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t})()});var w5n=Pe(()=>{f()});var R5n=Pe(()=>{f();w5n()});var Tas,Sas,Ias,xas,P5n,oYt,sYt,aYt,k5n=Pe(()=>{f();Tas="service.name",Sas="telemetry.sdk.name",Ias="telemetry.sdk.language",xas="telemetry.sdk.version",P5n=Tas,oYt=Sas,sYt=Ias,aYt=xas});var D5n=Pe(()=>{f();k5n()});var N5n=Pe(()=>{f()});var M5n=Pe(()=>{f()});var O5n=Pe(()=>{f();R5n();D5n();N5n();M5n()});function oZe(){return"unknown_service:"+process.argv0}var B5n=Pe(()=>{f();a(oZe,"defaultServiceName")});var L5n=Pe(()=>{f();B5n()});var F5n=Pe(()=>{f();L5n()});var m7,was,Ras,Pas,sZe,U5n=Pe(()=>{f();Bi();O5n();q_();F5n();m7=function(){return m7=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},sZe=(function(){function t(e,r){var n=this,o;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return cn.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return a(t,"Resource"),t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[P5n]=oZe(),e[sYt]=p7[sYt],e[oYt]=p7[oYt],e[aYt]=p7[aYt],e))},Object.defineProperty(t.prototype,"attributes",{get:a(function(){var e;return this.asyncAttributesPending&&cn.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},"get"),enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return was(this,void 0,void 0,function(){return Ras(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var o=m7(m7({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(c){var l,u=Pas(c,2),d=u[0],p=u[1];return m7(m7(m7(m7({},r._syncAttributes),d),(l=e._syncAttributes)!==null&&l!==void 0?l:e.attributes),p)});return new t(o,s)},t.EMPTY=new t({}),t})()});var Q5n=Pe(()=>{f();U5n()});var aZe,cYt,q5n=Pe(()=>{f();q_();aZe=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cYt=(function(){function t(e){this._spanProcessors=e}return a(t,"MultiSpanProcessor"),t.prototype.forceFlush=function(){var e,r,n=[];try{for(var o=aZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;n.push(c.forceFlush())}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return new Promise(function(l){Promise.all(n).then(function(){l()}).catch(function(u){Sy(u||new Error("MultiSpanProcessor: forceFlush failed")),l()})})},t.prototype.onStart=function(e,r){var n,o;try{for(var s=aZe(this._spanProcessors),c=s.next();!c.done;c=s.next()){var l=c.value;l.onStart(e,r)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var o=aZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;c.onEnd(e)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var o=aZe(this._spanProcessors),s=o.next();!s.done;s=o.next()){var c=s.value;n.push(c.shutdown())}}catch(l){e={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return new Promise(function(l,u){Promise.all(n).then(function(){l()},u)})},t})()});var cZe,lYt=Pe(()=>{f();cZe=(function(){function t(){}return a(t,"NoopSpanProcessor"),t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})()});var kas,Das,wO,G5n,H5n=Pe(()=>{f();Bi();q_();Q5n();iYt();rYt();q5n();lYt();nZe();nYt();kas=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Das=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n0?o(c):n()}).catch(function(s){return o([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(bS().OTEL_PROPAGATORS)),n=r.map(function(s){var c=e._getPropagator(s);return c||cn.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),c}),o=n.reduce(function(s,c){return c&&s.push(c),s},[]);if(o.length!==0)return r.length===1?o[0]:new HXe({propagators:o})},t.prototype._buildExporterFromEnv=function(){var e=bS().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||cn.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new $Xe}],["baggage",function(){return new NXe}]]),t._registeredExporters=new Map,t})()});var Nas,j5n,$5n=Pe(()=>{f();q_();Nas=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:a(function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j5n=(function(){function t(){}return a(t,"ConsoleSpanExporter"),t.prototype.export=function(e,r){return this._sendSpans(e,r)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var r;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(r=e.spanContext().traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:ETe(e.startTime),duration:ETe(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,r){var n,o;try{for(var s=Nas(e),c=s.next();!c.done;c=s.next()){var l=c.value;console.dir(this._exportInfo(l),{depth:3})}}catch(u){n={error:u}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(r)return r({code:Nv.SUCCESS})},t})()});var Mas,Oas,V5n,W5n=Pe(()=>{f();q_();Mas=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],c;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return s},Oas=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{f();Bi();q_();Bas=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Las=function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]h7,AlwaysOnSampler:()=>z5,BasicTracerProvider:()=>G5n,BatchSpanProcessor:()=>zae,ConsoleSpanExporter:()=>j5n,ForceFlushState:()=>wO,InMemorySpanExporter:()=>V5n,NoopSpanProcessor:()=>cZe,ParentBasedSampler:()=>Vae,RandomIdGenerator:()=>Yae,SamplingDecision:()=>Qw,SimpleSpanProcessor:()=>z5n,Span:()=>XXe,TraceIdRatioBasedSampler:()=>xTe,Tracer:()=>iZe});var J5n=Pe(()=>{f();iYt();H5n();nZe();$5n();W5n();Y5n();lYt();ZXe();eZe();Zzt();eYt();ITe();Xzt()});var wTe,X5n,uYt=Pe(()=>{f();wTe=class{static{a(this,"NoopLogger")}emit(e){}},X5n=new wTe});var dYt,lZe,fYt=Pe(()=>{f();uYt();dYt=class{static{a(this,"NoopLoggerProvider")}getLogger(e,r,n){return new wTe}},lZe=new dYt});var uZe,Z5n=Pe(()=>{f();uYt();uZe=class{static{a(this,"ProxyLogger")}constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):X5n}}});var RTe,eDn=Pe(()=>{f();fYt();Z5n();RTe=class{static{a(this,"ProxyLoggerProvider")}getLogger(e,r,n){var o;return(o=this.getDelegateLogger(e,r,n))!==null&&o!==void 0?o:new uZe(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:lZe}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(e,r,n)}}});var dZe,tDn=Pe(()=>{f();dZe=typeof globalThis=="object"?globalThis:global});var rDn=Pe(()=>{f();tDn()});var nDn=Pe(()=>{f();rDn()});function iDn(t,e,r){return n=>n===t?e:r}var PTe,Kae,pYt,oDn=Pe(()=>{f();nDn();PTe=Symbol.for("io.opentelemetry.js.api.logs"),Kae=dZe;a(iDn,"makeGetter");pYt=1});var fZe,sDn=Pe(()=>{f();oDn();fYt();eDn();fZe=class t{static{a(this,"LogsAPI")}constructor(){this._proxyLoggerProvider=new RTe}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Kae[PTe]?this.getLoggerProvider():(Kae[PTe]=iDn(pYt,e,lZe),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Kae[PTe])===null||e===void 0?void 0:e.call(Kae,pYt))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Kae[PTe],this._proxyLoggerProvider=new RTe}}});var pZe,hYt=Pe(()=>{f();sDn();pZe=fZe.getInstance()});function aDn(t,e,r,n){for(let o=0,s=t.length;oe.disable())}var lDn=Pe(()=>{f();a(aDn,"enableInstrumentations");a(cDn,"disableInstrumentations")});function uDn(t){let e=t.tracerProvider||hl.getTracerProvider(),r=t.meterProvider||bW.getMeterProvider(),n=t.loggerProvider||pZe.getLoggerProvider(),o=t.instrumentations?.flat()??[];return aDn(o,e,r,n),()=>{cDn(o)}}var dDn=Pe(()=>{f();Bi();hYt();lDn();a(uDn,"registerInstrumentations")});function ADn(t,e,r){if(!Qas(t))return cn.error(`Invalid version: ${t}`),!1;if(!e)return!0;e=e.replace(/([<>=~^]+)\s+/g,"$1");let n=jas(t);if(!n)return!1;let o=[],s=yDn(n,e,o,r);return s&&!r?.includePrerelease?Gas(n,o):s}function Qas(t){return typeof t=="string"&&gDn.test(t)}function yDn(t,e,r,n){if(e.includes("||")){let o=e.trim().split("||");for(let s of o)if(mYt(t,s,r,n))return!0;return!1}else if(e.includes(" - "))e=dcs(e,n);else if(e.includes(" ")){let o=e.trim().replace(/\s{2,}/g," ").split(" ");for(let s of o)if(!mYt(t,s,r,n))return!1;return!0}return mYt(t,e,r,n)}function mYt(t,e,r,n){if(e=Has(e,n),e.includes(" "))return yDn(t,e,r,n);{let o=$as(e);return r.push(o),qas(t,o)}}function qas(t,e){if(e.invalid)return!1;if(!e.version||AYt(e.version))return!0;let r=pDn(t.versionSegments||[],e.versionSegments||[]);if(r===0){let n=t.prereleaseSegments||[],o=e.prereleaseSegments||[];!n.length&&!o.length?r=0:!n.length&&o.length?r=1:n.length&&!o.length?r=-1:r=pDn(n,o)}return Uas[e.op]?.includes(r)}function Gas(t,e){return t.prerelease?e.some(r=>r.prerelease&&r.version===t.version):!0}function Has(t,e){return t=t.trim(),t=lcs(t,e),t=ccs(t),t=ucs(t,e),t=t.trim(),t}function Iy(t){return!t||t.toLowerCase()==="x"||t==="*"}function jas(t){let e=t.match(gDn);if(!e){cn.error(`Invalid version: ${t}`);return}let r=e.groups.version,n=e.groups.prerelease,o=e.groups.build,s=r.split("."),c=n?.split(".");return{op:void 0,version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:n,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:o}}function $as(t){if(!t)return{};let e=t.match(Fas);if(!e)return cn.error(`Invalid range: ${t}`),{invalid:!0};let r=e.groups.op,n=e.groups.version,o=e.groups.prerelease,s=e.groups.build,c=n.split("."),l=o?.split(".");return r==="=="&&(r="="),{op:r||"=",version:n,versionSegments:c,versionSegmentCount:c.length,prerelease:o,prereleaseSegments:l,prereleaseSegmentCount:l?l.length:0,build:s}}function AYt(t){return t==="*"||t==="x"||t==="X"}function fDn(t){let e=parseInt(t,10);return isNaN(e)?t:e}function Vas(t,e){if(typeof t==typeof e){if(typeof t=="number")return[t,e];if(typeof t=="string")return[t,e];throw new Error("Version segments can only be strings or numbers")}else return[String(t),String(e)]}function Was(t,e){if(AYt(t)||AYt(e))return 0;let[r,n]=Vas(fDn(t),fDn(e));return r>n?1:r{let l;return Iy(n)?l="":Iy(o)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Iy(s)?l=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`:c?l=`>=${n}.${o}.${s}-${c} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${s} <${n}.${+o+1}.0-0`,l})}function lcs(t,e){let r=acs,n=e?.includePrerelease?"-0":"";return t.replace(r,(o,s,c,l,u)=>{let d;return Iy(s)?d="":Iy(c)?d=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Iy(l)?s==="0"?d=`>=${s}.${c}.0${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.0${n} <${+s+1}.0.0-0`:u?s==="0"?c==="0"?d=`>=${s}.${c}.${l}-${u} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}-${u} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l}-${u} <${+s+1}.0.0-0`:s==="0"?c==="0"?d=`>=${s}.${c}.${l}${n} <${s}.${c}.${+l+1}-0`:d=`>=${s}.${c}.${l}${n} <${s}.${+c+1}.0-0`:d=`>=${s}.${c}.${l} <${+s+1}.0.0-0`,d})}function ucs(t,e){let r=Zas;return t.replace(r,(n,o,s,c,l,u)=>{let d=Iy(s),p=d||Iy(c),h=p||Iy(l),m=h;return o==="="&&m&&(o=""),u=e?.includePrerelease?"-0":"",d?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),o==="<"&&(u="-0"),n=`${o+s}.${c}.${l}${u}`):p?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:h&&(n=`>=${s}.${c}.0${u} <${s}.${+c+1}.0-0`),n})}function dcs(t,e){let r=tcs;return t.replace(r,(n,o,s,c,l,u,d,p,h,m,g,A)=>(Iy(s)?o="":Iy(c)?o=`>=${s}.0.0${e?.includePrerelease?"-0":""}`:Iy(l)?o=`>=${s}.${c}.0${e?.includePrerelease?"-0":""}`:u?o=`>=${o}`:o=`>=${o}${e?.includePrerelease?"-0":""}`,Iy(h)?p="":Iy(m)?p=`<${+h+1}.0.0-0`:Iy(g)?p=`<${h}.${+m+1}.0-0`:A?p=`<=${h}.${m}.${g}-${A}`:e?.includePrerelease?p=`<${h}.${m}.${+g+1}-0`:p=`<=${p}`,`${o} ${p}`.trim()))}var gDn,Fas,Uas,EDn,_Dn,zas,Yas,hDn,Kas,mDn,Jas,gYt,kTe,Xas,Zas,ecs,tcs,rcs,ncs,ics,ocs,scs,acs,CDn=Pe(()=>{f();Bi();gDn=/^(?:v)?(?(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*))(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Fas=/^(?<|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?(?x|X|\*|0|[1-9]\d*)(?:\.(?x|X|\*|0|[1-9]\d*))?(?:\.(?x|X|\*|0|[1-9]\d*))?)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Uas={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};a(ADn,"satisfies");a(Qas,"_validateVersion");a(yDn,"_doSatisfies");a(mYt,"_checkRange");a(qas,"_satisfies");a(Gas,"_doPreleaseCheck");a(Has,"_normalizeRange");a(Iy,"isX");a(jas,"_parseVersion");a($as,"_parseRange");a(AYt,"_isWildcard");a(fDn,"_parseVersionString");a(Vas,"_normalizeVersionType");a(Was,"_compareVersionStrings");a(pDn,"_compareVersionSegments");EDn="[a-zA-Z0-9-]",_Dn="0|[1-9]\\d*",zas=`\\d*[a-zA-Z-]${EDn}*`,Yas="((?:<|>)?=?)",hDn=`(?:${_Dn}|${zas})`,Kas=`(?:-(${hDn}(?:\\.${hDn})*))`,mDn=`${EDn}+`,Jas=`(?:\\+(${mDn}(?:\\.${mDn})*))`,gYt=`${_Dn}|x|X|\\*`,kTe=`[v=\\s]*(${gYt})(?:\\.(${gYt})(?:\\.(${gYt})(?:${Kas})?${Jas}?)?)?`,Xas=`^${Yas}\\s*${kTe}$`,Zas=new RegExp(Xas),ecs=`^\\s*(${kTe})\\s+-\\s+(${kTe})\\s*$`,tcs=new RegExp(ecs),rcs="(?:~>?)",ncs=`^${rcs}${kTe}$`,ics=new RegExp(ncs),ocs="(?:\\^)",scs=`^${ocs}${kTe}$`,acs=new RegExp(scs);a(ccs,"replaceTilde");a(lcs,"replaceCaret");a(ucs,"replaceXRange");a(dcs,"replaceHyphen")});var Jae=T((G_d,TDn)=>{"use strict";f();function yYt(t){return typeof t=="function"}a(yYt,"isFunction");var xy=console.error.bind(console);function DTe(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}a(DTe,"defineProperty");function NTe(t){t&&t.logger&&(yYt(t.logger)?xy=t.logger:xy("new logger isn't a function, not replacing"))}a(NTe,"shimmer");function vDn(t,e,r){if(!t||!t[e]){xy("no original function "+e+" to wrap");return}if(!r){xy("no wrapper function"),xy(new Error().stack);return}if(!yYt(t[e])||!yYt(r)){xy("original object and wrapper must be functions");return}var n=t[e],o=r(n,e);return DTe(o,"__original",n),DTe(o,"__unwrap",function(){t[e]===o&&DTe(t,e,n)}),DTe(o,"__wrapped",!0),DTe(t,e,o),o}a(vDn,"wrap");function fcs(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{xy("must provide one or more modules to patch"),xy(new Error().stack);return}if(!(e&&Array.isArray(e))){xy("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(o){vDn(n,o,r)})})}a(fcs,"massWrap");function bDn(t,e){if(!t||!t[e]){xy("no function to unwrap."),xy(new Error().stack);return}if(!t[e].__unwrap)xy("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}a(bDn,"unwrap");function pcs(t,e){if(t)Array.isArray(t)||(t=[t]);else{xy("must provide one or more modules to patch"),xy(new Error().stack);return}if(!(e&&Array.isArray(e))){xy("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){bDn(r,n)})})}a(pcs,"massUnwrap");NTe.wrap=vDn;NTe.massWrap=fcs;NTe.unwrap=bDn;NTe.massUnwrap=pcs;TDn.exports=NTe});var g7,hZe,SDn=Pe(()=>{f();Bi();hYt();g7=de(Jae()),hZe=class{static{a(this,"InstrumentationAbstract")}instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this.setConfig(n),this._diag=cn.createComponentLogger({namespace:e}),this._tracer=hl.getTracer(e,r),this._meter=bW.getMeter(e,r),this._logger=pZe.getLogger(e,r),this._updateMetricInstruments()}_wrap=g7.wrap;_unwrap=g7.unwrap;_massWrap=g7.massWrap;_massUnwrap=g7.massUnwrap;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,n,o){if(e)try{e(n,o)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}}}});var xDn=T((K_d,IDn)=>{f();var Xae=1e3,Zae=Xae*60,ece=Zae*60,xW=ece*24,hcs=xW*7,mcs=xW*365.25;IDn.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return gcs(t);if(r==="number"&&isFinite(t))return e.long?ycs(t):Acs(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function gcs(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*mcs;case"weeks":case"week":case"w":return r*hcs;case"days":case"day":case"d":return r*xW;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ece;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zae;case"seconds":case"second":case"secs":case"sec":case"s":return r*Xae;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(gcs,"parse");function Acs(t){var e=Math.abs(t);return e>=xW?Math.round(t/xW)+"d":e>=ece?Math.round(t/ece)+"h":e>=Zae?Math.round(t/Zae)+"m":e>=Xae?Math.round(t/Xae)+"s":t+"ms"}a(Acs,"fmtShort");function ycs(t){var e=Math.abs(t);return e>=xW?mZe(t,e,xW,"day"):e>=ece?mZe(t,e,ece,"hour"):e>=Zae?mZe(t,e,Zae,"minute"):e>=Xae?mZe(t,e,Xae,"second"):t+" ms"}a(ycs,"fmtLong");function mZe(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}a(mZe,"plural")});var EYt=T((Z_d,wDn)=>{f();function Ecs(t){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=o,r.enabled=l,r.humanize=xDn(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let h=0;for(let m=0;m{if(w==="%%")return"%";I++;let P=r.formatters[R];if(typeof P=="function"){let k=E[I];w=P.call(_,k),E.splice(I,1),I--}return w}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return a(y,"debug"),y.namespace=p,y.useColors=r.useColors(),y.color=r.selectColor(p),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,A=r.enabled(p)),A),"get"),set:a(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(p,h){let m=r(this.namespace+(typeof h>"u"?":":h)+p);return m.log=this.log,m}a(n,"extend");function o(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let h=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}a(o,"enable");function s(p,h){let m=0,g=0,A=-1,y=0;for(;m"-"+h)].join(",");return r.enable(""),p}a(c,"disable");function l(p){for(let h of r.skips)if(s(p,h))return!1;for(let h of r.names)if(s(p,h))return!0;return!1}a(l,"enabled");function u(p){return p instanceof Error?p.stack||p.message:p}a(u,"coerce");function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(d,"destroy"),r.enable(r.load()),r}a(Ecs,"setup");wDn.exports=Ecs});var RDn=T((G_,gZe)=>{f();G_.formatArgs=Ccs;G_.save=vcs;G_.load=bcs;G_.useColors=_cs;G_.storage=Tcs();G_.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();G_.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function _cs(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(_cs,"useColors");function Ccs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+gZe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}a(Ccs,"formatArgs");G_.log=console.debug||console.log||(()=>{});function vcs(t){try{t?G_.storage.setItem("debug",t):G_.storage.removeItem("debug")}catch{}}a(vcs,"save");function bcs(){let t;try{t=G_.storage.getItem("debug")||G_.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(bcs,"load");function Tcs(){try{return localStorage}catch{}}a(Tcs,"localstorage");gZe.exports=EYt()(G_);var{formatters:Scs}=gZe.exports;Scs.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var kDn=T((Ph,yZe)=>{f();var Ics=require("tty"),AZe=require("util");Ph.init=Ncs;Ph.log=Pcs;Ph.formatArgs=wcs;Ph.save=kcs;Ph.load=Dcs;Ph.useColors=xcs;Ph.destroy=AZe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ph.colors=[6,2,3,4,5,1];try{let t=f3e();t&&(t.stderr||t).level>=2&&(Ph.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ph.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function xcs(){return"colors"in Ph.inspectOpts?!!Ph.inspectOpts.colors:Ics.isatty(process.stderr.fd)}a(xcs,"useColors");function wcs(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(` `).join(` -`+s),t.push(o+"m+"+det.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=wss()+e+" "+t[0]}a(xss,"formatArgs");function wss(){return Lh.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(wss,"getDate");function Rss(...t){return process.stderr.write(uet.formatWithOptions(Lh.inspectOpts,...t)+` -`)}a(Rss,"log");function Pss(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(Pss,"save");function kss(){return process.env.DEBUG}a(kss,"load");function Nss(t){t.inspectOpts={};let e=Object.keys(Lh.inspectOpts);for(let r=0;re.trim()).join(" ")};kNn.O=function(t){return this.inspectOpts.colors=this.useColors,uet.inspect(t,this.inspectOpts)}});var DNn=T((Yyd,eYt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?eYt.exports=PNn():eYt.exports=NNn()});var rYt=T((Jyd,MNn)=>{"use strict";f();var tYt=require("path").sep;MNn.exports=function(t){var e=t.split(tYt),r=e.lastIndexOf("node_modules");if(r!==-1&&e[r+1]){for(var n=e[r+1][0]==="@",o=n?e[r+1]+"/"+e[r+2]:e[r+1],s=n?3:2,c="",l=r+s-1,u=0;u<=l;u++)u===l?c+=e[u]:c+=e[u]+tYt;for(var d="",p=e.length-1,h=r+s;h<=p;h++)h===p?d+=e[h]:d+=e[h]+tYt;return{name:o,basedir:c,path:d}}}});var nYt=T((Zyd,ONn)=>{"use strict";f();var Dss=require("os");ONn.exports=Dss.homedir||a(function(){var e=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null},"homedir")});var iYt=T((rEd,BNn)=>{f();BNn.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(r,n){return n};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var LNn=T((iEd,LSe)=>{"use strict";f();var Mss=process.platform==="win32",Oss=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,oYt={};function Bss(t){return Oss.exec(t).slice(1)}a(Bss,"win32SplitPath");oYt.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=Bss(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var Lss=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,sYt={};function Fss(t){return Lss.exec(t).slice(1)}a(Fss,"posixSplitPath");sYt.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=Fss(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};Mss?LSe.exports=oYt.parse:LSe.exports=sYt.parse;LSe.exports.posix=sYt.parse;LSe.exports.win32=oYt.parse});var aYt=T((aEd,qNn)=>{f();var QNn=require("path"),FNn=QNn.parse||LNn(),UNn=a(function(e,r){var n="/";/^([A-Za-z]:)/.test(e)?n="":/^\\\\/.test(e)&&(n="\\\\");for(var o=[e],s=FNn(e);s.dir!==o[o.length-1];)o.push(s.dir),s=FNn(s.dir);return o.reduce(function(c,l){return c.concat(r.map(function(u){return QNn.resolve(n,l,u)}))},[])},"getNodeModulesDirs");qNn.exports=a(function(e,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,e,function(){return UNn(e,o)},r);var s=UNn(e,o);return r&&r.paths?s.concat(r.paths):s},"nodeModulesPaths")});var cYt=T((uEd,GNn)=>{f();GNn.exports=function(t,e){return e||{}}});var $Nn=T((fEd,jNn)=>{"use strict";f();var Uss="Function.prototype.bind called on incompatible ",Qss=Object.prototype.toString,qss=Math.max,Gss="[object Function]",HNn=a(function(e,r){for(var n=[],o=0;o{"use strict";f();var $ss=$Nn();VNn.exports=Function.prototype.bind||$ss});var YNn=T((AEd,zNn)=>{"use strict";f();var Vss=Function.prototype.call,Wss=Object.prototype.hasOwnProperty,zss=WNn();zNn.exports=zss.call(Vss,Wss)});var KNn=T((EEd,Yss)=>{Yss.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var FSe=T((CEd,ZNn)=>{"use strict";f();var Kss=YNn();function Jss(t,e){for(var r=t.split("."),n=e.split(" "),o=n.length>1?n[0]:"=",s=(n.length>1?n[1]:n[0]).split("."),c=0;c<3;++c){var l=parseInt(r[c]||0,10),u=parseInt(s[c]||0,10);if(l!==u)return o==="<"?l="?l>=u:!1}return o===">="}a(Jss,"specifierIncluded");function JNn(t,e){var r=e.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n"u"?process.versions&&process.versions.node:t;if(typeof r!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var n=0;n{f();var _z=require("fs"),Zss=nYt(),D0=require("path"),eas=iYt(),tas=aYt(),ras=cYt(),nas=FSe(),ias=process.platform!=="win32"&&_z.realpath&&typeof _z.realpath.native=="function"?_z.realpath.native:_z.realpath,eDn=Zss(),oas=a(function(){return[D0.join(eDn,".node_modules"),D0.join(eDn,".node_libraries")]},"defaultPaths"),sas=a(function(e,r){_z.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},"isFile"),aas=a(function(e,r){_z.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},"isDirectory"),cas=a(function(e,r){ias(e,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?e:o)})},"realpath"),USe=a(function(e,r,n,o){n&&n.preserveSymlinks===!1?e(r,o):o(null,r)},"maybeRealpath"),las=a(function(e,r,n){e(r,function(o,s){if(o)n(o);else try{var c=JSON.parse(s);n(null,c)}catch{n(null)}})},"defaultReadPackage"),uas=a(function(e,r,n){for(var o=tas(r,n,e),s=0;s{das.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":">= 23.4",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var aDn=T((xEd,sDn)=>{"use strict";f();var fas=FSe(),iDn=nDn(),oDn={};for(fet in iDn)Object.prototype.hasOwnProperty.call(iDn,fet)&&(oDn[fet]=fas(fet));var fet;sDn.exports=oDn});var lDn=T((REd,cDn)=>{f();var pas=FSe();cDn.exports=a(function(e){return pas(e)},"isCore")});var fDn=T((NEd,dDn)=>{f();var has=FSe(),vz=require("fs"),lA=require("path"),mas=nYt(),gas=iYt(),Aas=aYt(),yas=cYt(),Eas=process.platform!=="win32"&&vz.realpathSync&&typeof vz.realpathSync.native=="function"?vz.realpathSync.native:vz.realpathSync,uDn=mas(),Cas=a(function(){return[lA.join(uDn,".node_modules"),lA.join(uDn,".node_libraries")]},"defaultPaths"),_as=a(function(e){try{var r=vz.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},"isFile"),vas=a(function(e){try{var r=vz.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},"isDirectory"),bas=a(function(e){try{return Eas(e)}catch(r){if(r.code!=="ENOENT")throw r}return e},"realpathSync"),QSe=a(function(e,r,n){return n&&n.preserveSymlinks===!1?e(r):r},"maybeRealpathSync"),Tas=a(function(e,r){var n=e(r);try{var o=JSON.parse(n);return o}catch{}},"defaultReadPackageSync"),Sas=a(function(e,r,n){for(var o=Aas(r,n,e),s=0;s{f();var pet=rDn();pet.core=aDn();pet.isCore=lDn();pet.sync=fDn();pDn.exports=pet});var hDn=T((LEd,Ias)=>{Ias.exports={name:"require-in-the-middle",version:"7.5.2",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/nodejs/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/nodejs/require-in-the-middle/issues"},homepage:"https://github.com/nodejs/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var pYt=T((FEd,fYt)=>{"use strict";f();var Gce=require("path"),Xw=require("module"),kf=DNn()("require-in-the-middle"),xas=rYt();fYt.exports=qSe;fYt.exports.Hook=qSe;var uYt,qce;if(Xw.isBuiltin)qce=Xw.isBuiltin;else if(Xw.builtinModules)qce=a(t=>t.startsWith("node:")?!0:(uYt===void 0&&(uYt=new Set(Xw.builtinModules)),uYt.has(t)),"isCore");else{let t=lYt(),[e,r]=process.versions.node.split(".").map(Number);e===8&&r<8?qce=a(n=>n==="http2"?!0:!!t.core[n],"isCore"):qce=a(n=>!!t.core[n],"isCore")}var het;function was(t,e){if(!het)if(require.resolve&&require.resolve.paths)het=a(function(r,n){return require.resolve(r,{paths:[n]})},"_resolve");else{let r=lYt();het=a(function(n,o){return r.sync(n,{basedir:o})},"_resolve")}return het(t,e)}a(was,"resolve");var Ras=/([/\\]index)?(\.js)?$/,dYt=class{static{a(this,"ExportsCache")}constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,r){if(this._localCache.has(e))return!0;if(r)return!1;{let n=require.cache[e];return!!(n&&this._kRitmExports in n)}}get(e,r){let n=this._localCache.get(e);if(n!==void 0)return n;if(!r){let o=require.cache[e];return o&&o[this._kRitmExports]}}set(e,r,n){n?this._localCache.set(e,r):e in require.cache?require.cache[e][this._kRitmExports]=r:(kf('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,r))}};function qSe(t,e,r){if(!(this instanceof qSe))return new qSe(t,e,r);if(typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),typeof Xw._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof Xw._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,hDn().bugs.url);return}this._cache=new dYt,this._unhooked=!1,this._origRequire=Xw.prototype.require;let n=this,o=new Set,s=e?e.internals===!0:!1,c=Array.isArray(t);kf("registering require hook"),this._require=Xw.prototype.require=function(u){return n._unhooked===!0?(kf("ignoring require call - module is soft-unhooked"),n._origRequire.apply(this,arguments)):l.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(u){return n._unhooked===!0?(kf("ignoring process.getBuiltinModule call - module is soft-unhooked"),n._origGetBuiltinModule.apply(this,arguments)):l.call(this,arguments,!0)});function l(u,d){let p=u[0],h=qce(p),m;if(h){if(m=p,p.startsWith("node:")){let v=p.slice(5);qce(v)&&(m=v)}}else{if(d)return kf("call to process.getBuiltinModule with unknown built-in id"),n._origGetBuiltinModule.apply(this,u);try{m=Xw._resolveFilename(p,this)}catch(v){return kf('Module._resolveFilename("%s") threw %j, calling original Module.require',p,v.message),n._origRequire.apply(this,u)}}let g,A;if(kf("processing %s module require('%s'): %s",h===!0?"core":"non-core",p,m),n._cache.has(m,h)===!0)return kf("returning already patched cached module: %s",m),n._cache.get(m,h);let y=o.has(m);y===!1&&o.add(m);let E=d?n._origGetBuiltinModule.apply(this,u):n._origRequire.apply(this,u);if(y===!0)return kf("module is in the process of being patched already - ignoring: %s",m),E;if(o.delete(m),h===!0){if(c===!0&&t.includes(m)===!1)return kf("ignoring core module not on whitelist: %s",m),E;g=m}else if(c===!0&&t.includes(m)){let v=Gce.parse(m);g=v.name,A=v.dir}else{let v=xas(m);if(v===void 0)return kf("could not parse filename: %s",m),E;g=v.name,A=v.basedir;let b=Pas(v);kf("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",g,p,b,A);let I=!1;if(c){if(!p.startsWith(".")&&t.includes(p)&&(g=p,I=!0),!t.includes(g)&&!t.includes(b))return E;t.includes(b)&&b!==g&&(g=b,I=!0)}if(!I){let x;try{x=was(g,A)}catch{return kf("could not resolve module: %s",g),n._cache.set(m,E,h),E}if(x!==m)if(s===!0)g=g+Gce.sep+Gce.relative(A,m),kf("preparing to process require of internal file: %s",g);else return kf("ignoring require of non-main module file: %s",x),n._cache.set(m,E,h),E}}n._cache.set(m,E,h),kf("calling require hook: %s",g);let _=r(E,g,A);return n._cache.set(m,_,h),kf("returning module: %s",g),_}a(l,"patchedRequire")}a(qSe,"Hook");qSe.prototype.unhook=function(){this._unhooked=!0,this._require===Xw.prototype.require?(Xw.prototype.require=this._origRequire,kf("require unhook successful")):kf("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,kf("process.getBuiltinModule unhook successful")):kf("process.getBuiltinModule unhook unsuccessful"))};function Pas(t){let e=Gce.sep!=="/"?t.path.split(Gce.sep).join("/"):t.path;return Gce.posix.join(t.name,e).replace(Ras,"")}a(Pas,"resolveModuleName")});var met,get,mDn=Pe(()=>{f();met=class{static{a(this,"ModuleNameTrieNode")}hooks=[];children=new Map},get=class{static{a(this,"ModuleNameTrie")}_trie=new met;_counter=0;insert(e){let r=this._trie;for(let n of e.moduleName.split("/")){let o=r.children.get(n);o||(o=new met,r.children.set(n,o)),r=o}r.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:r,fullOnly:n}={}){let o=this._trie,s=[],c=!0;for(let l of e.split("/")){let u=o.children.get(l);if(!u){c=!1;break}n||s.push(...u.hooks),o=u}return n&&c&&s.push(...o.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(r&&s.sort((l,u)=>l.insertedId-u.insertedId),s.map(({hook:l})=>l))}}});function Nas(t){return hYt.sep!=="/"?t.split(hYt.sep).join("/"):t}var ADn,hYt,kas,Aet,yDn=Pe(()=>{f();ADn=de(pYt()),hYt=de(require("path"));mDn();kas=["afterEach","after","beforeEach","before","describe","it"].every(t=>typeof global[t]=="function"),Aet=class t{static{a(this,"RequireInTheMiddleSingleton")}_moduleNameTrie=new get;static _instance;constructor(){this._initialize()}_initialize(){new ADn.Hook(null,{internals:!0},(e,r,n)=>{let o=Nas(r),s=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:n===void 0});for(let{onRequire:c}of s)e=c(e,r,n);return e})}register(e,r){let n={moduleName:e,onRequire:r};return this._moduleNameTrie.insert(n),n}static getInstance(){return kas?new t:this._instance=this._instance??new t}};a(Nas,"normalizePathSeparators")});var TDn=T(bz=>{f();var EDn=[],mYt=new WeakMap,CDn=new WeakMap,_Dn=new Map,vDn=[],Das={set(t,e,r){return mYt.get(t)[e](r)},get(t,e){if(e===Symbol.toStringTag)return"Module";let r=CDn.get(t)[e];if(typeof r=="function")return r()},defineProperty(t,e,r){if(!("value"in r))throw new Error("Getters/setters are not supported for exports property descriptors.");return mYt.get(t)[e](r.value)}};function Mas(t,e,r,n,o){_Dn.set(t,o),mYt.set(e,r),CDn.set(e,n);let s=new Proxy(e,Das);EDn.forEach(c=>c(t,s)),vDn.push([t,s])}a(Mas,"register");var bDn=!1;function Oas(){return bDn}a(Oas,"getExperimentalPatchInternals");function Bas(t){bDn=t}a(Bas,"setExperimentalPatchInternals");bz.register=Mas;bz.importHooks=EDn;bz.specifiers=_Dn;bz.toHook=vDn;bz.getExperimentalPatchInternals=Oas;bz.setExperimentalPatchInternals=Bas});var PDn=T((JEd,Hce)=>{f();var SDn=require("path"),Las=rYt(),{fileURLToPath:IDn}=require("url"),{MessageChannel:Fas}=require("worker_threads"),{importHooks:gYt,specifiers:Uas,toHook:Qas,getExperimentalPatchInternals:qas}=TDn();function wDn(t){gYt.push(t),Qas.forEach(([e,r])=>t(e,r))}a(wDn,"addHook");function RDn(t){let e=gYt.indexOf(t);e>-1&&gYt.splice(e,1)}a(RDn,"removeHook");function xDn(t,e,r,n){let o=t(e,r,n);o&&o!==e&&(e.default=o)}a(xDn,"callHookFn");var AYt;function Gas(){let{port1:t,port2:e}=new Fas,r=0,n;AYt=a(l=>{r++,t.postMessage(l)},"sendModulesToLoader"),t.on("message",()=>{r--,n&&r<=0&&n()}).unref();function o(){let l=setInterval(()=>{},1e3),u=new Promise(d=>{n=d}).then(()=>{clearInterval(l)});return r===0&&n(),u}a(o,"waitForAllMessagesAcknowledged");let s=e;return{registerOptions:{data:{addHookMessagePort:s,include:[]},transferList:[s]},addHookMessagePort:s,waitForAllMessagesAcknowledged:o}}a(Gas,"createAddHookMessageChannel");function GSe(t,e,r){if(!(this instanceof GSe))return new GSe(t,e,r);typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let n=e?e.internals===!0:!1;AYt&&Array.isArray(t)&&AYt(t),this._iitmHook=(o,s)=>{let c=o,l=o.startsWith("node:"),u;if(l)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=IDn(o)}catch{}let d=Las(o);d&&(o=d.name,u=d.basedir)}if(t){for(let d of t)if(d===o){if(u){if(n)o=o+SDn.sep+SDn.relative(u,IDn(c));else if(!qas()&&!u.endsWith(Uas.get(c)))continue}xDn(r,s,o,u)}}else xDn(r,s,o,u)},wDn(this._iitmHook)}a(GSe,"Hook");GSe.prototype.unhook=function(){RDn(this._iitmHook)};Hce.exports=GSe;Hce.exports.Hook=GSe;Hce.exports.addHook=wDn;Hce.exports.removeHook=RDn;Hce.exports.createAddHookMessageChannel=Gas});function kDn(t,e,r){let n,o;try{o=t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}async function NDn(t,e,r){let n,o;try{o=await t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}function yet(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var yYt=Pe(()=>{f();a(kDn,"safeExecuteInTheMiddle");a(NDn,"safeExecuteInTheMiddleAsync");a(yet,"isWrapped")});function DDn(t,e,r){return typeof e>"u"?t.includes("*"):t.some(n=>yNn(e,n,{includePrerelease:r}))}var W4,EYt,HSe,MDn,ODn,BDn,jce,LDn=Pe(()=>{f();W4=de(require("path")),EYt=require("util");vNn();HSe=de(Lce());INn();yDn();MDn=de(PDn());Fi();ODn=de(pYt()),BDn=require("fs");yYt();jce=class extends set{static{a(this,"InstrumentationBase")}_modules;_hooks=[];_requireInTheMiddleSingleton=Aet.getInstance();_enabled=!1;constructor(e,r,n){super(e,r,n);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=a((e,r,n)=>{if(yet(e[r])&&this._unwrap(e,r),EYt.types.isProxy(e)){let o=(0,HSe.wrap)(Object.assign({},e),r,n);return Object.defineProperty(e,r,{value:o}),o}else return(0,HSe.wrap)(e,r,n)},"_wrap");_unwrap=a((e,r)=>EYt.types.isProxy(e)?Object.defineProperty(e,r,{value:e[r]}):(0,HSe.unwrap)(e,r),"_unwrap");_massWrap=a((e,r,n)=>{if(e)Array.isArray(e)||(e=[e]);else{cn.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){cn.error("must provide one or more functions to wrap on modules");return}e.forEach(o=>{r.forEach(s=>{this._wrap(o,s,n)})})},"_massWrap");_massUnwrap=a((e,r)=>{if(e)Array.isArray(e)||(e=[e]);else{cn.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){cn.error("must provide one or more functions to wrap on modules");return}e.forEach(n=>{r.forEach(o=>{this._unwrap(n,o)})})},"_massUnwrap");_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:r}=e;try{let n=require.resolve(r);require.cache[n]&&this._diag.warn(`Module ${r} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${r}`)}catch{}})}_extractPackageVersion(e){try{let r=(0,BDn.readFileSync)(W4.join(e,"package.json"),{encoding:"utf8"}),n=JSON.parse(r).version;return typeof n=="string"?n:void 0}catch{cn.warn("Failed extracting version",e)}}_onRequire(e,r,n,o){if(!o)return typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(r)):r;let s=this._extractPackageVersion(o);if(e.moduleVersion=s,e.name===n)return DDn(e.supportedVersions,s,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:o}),e.patch(r,e.moduleVersion)):r;let c=e.files??[],l=W4.normalize(n);return c.filter(d=>d.name===l).filter(d=>DDn(d.supportedVersions,s,e.includePrerelease)).reduce((d,p)=>(p.moduleExports=d,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:p.name,baseDir:o}),p.patch(d,e.moduleVersion)):d),r)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.patch(r.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let r=a((c,l,u)=>{if(!u&&W4.isAbsolute(l)){let d=W4.parse(l);l=d.name,u=d.dir}return this._onRequire(e,c,l,u)},"hookFn"),n=a((c,l,u)=>this._onRequire(e,c,l,u),"onRequire"),o=W4.isAbsolute(e.name)?new ODn.Hook([e.name],{internals:!0},n):this._requireInTheMiddleSingleton.register(e.name,n);this._hooks.push(o);let s=new MDn.Hook([e.name],{internals:!1},r);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.unpatch(r.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}};a(DDn,"isSupported")});var jSe,FDn=Pe(()=>{f();jSe=require("path")});var UDn=Pe(()=>{f();LDn();FDn()});var CYt=Pe(()=>{f();UDn()});var Eet,QDn=Pe(()=>{f();Eet=class{static{a(this,"InstrumentationNodeModuleDefinition")}name;supportedVersions;patch;unpatch;files;constructor(e,r,n,o,s){this.name=e,this.supportedVersions=r,this.patch=n,this.unpatch=o,this.files=s||[]}}});var Cet,qDn=Pe(()=>{f();CYt();Cet=class{static{a(this,"InstrumentationNodeModuleFile")}supportedVersions;patch;unpatch;name;constructor(e,r,n,o){this.supportedVersions=r,this.patch=n,this.unpatch=o,this.name=(0,jSe.normalize)(e)}}});var _Yt={};Ri(_Yt,{InstrumentationBase:()=>jce,InstrumentationNodeModuleDefinition:()=>Eet,InstrumentationNodeModuleFile:()=>Cet,isWrapped:()=>yet,registerInstrumentations:()=>dNn,safeExecuteInTheMiddle:()=>kDn,safeExecuteInTheMiddleAsync:()=>NDn});var vYt=Pe(()=>{f();fNn();CYt();QDn();qDn();yYt()});var HDn=T(bYt=>{"use strict";f();Object.defineProperty(bYt,"__esModule",{value:!0});bYt.log=Vas;var GDn=(qM(),ba(i6)),Has=require("node:os"),jas=GDn.__importDefault(require("node:util")),$as=GDn.__importStar(require("node:process"));function Vas(t,...e){$as.stderr.write(`${jas.default.format(t,...e)}${Has.EOL}`)}a(Vas,"log")});var zDn=T(wYt=>{"use strict";f();Object.defineProperty(wYt,"__esModule",{value:!0});var Was=HDn(),jDn=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,$Dn,TYt=[],SYt=[],_et=[];jDn&&IYt(jDn);var VDn=Object.assign(t=>WDn(t),{enable:IYt,enabled:xYt,disable:zas,log:Was.log});function IYt(t){$Dn=t,TYt=[],SYt=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?SYt.push(new RegExp(`^${n.substr(1)}$`)):TYt.push(new RegExp(`^${n}$`));for(let n of _et)n.enabled=xYt(n.namespace)}a(IYt,"enable");function xYt(t){if(t.endsWith("*"))return!0;for(let e of SYt)if(e.test(t))return!1;for(let e of TYt)if(e.test(t))return!0;return!1}a(xYt,"enabled");function zas(){let t=$Dn||"";return IYt(""),t}a(zas,"disable");function WDn(t){let e=Object.assign(r,{enabled:xYt(t),destroy:Yas,log:VDn.log,namespace:t,extend:Kas});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),_et.push(e),e}a(WDn,"createDebugger");function Yas(){let t=_et.indexOf(this);return t>=0?(_et.splice(t,1),!0):!1}a(Yas,"destroy");function Kas(t){let e=WDn(`${this.namespace}:${t}`);return e.log=this.log,e}a(Kas,"extend");wYt.default=VDn});var Iet=T(aD=>{"use strict";f();Object.defineProperty(aD,"__esModule",{value:!0});aD.AzureLogger=void 0;aD.setLogLevel=JDn;aD.getLogLevel=Xas;aD.createClientLogger=Zas;var Jas=(qM(),ba(i6)),$Se=Jas.__importDefault(zDn()),KDn=new Set,vet=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,Tet;aD.AzureLogger=(0,$Se.default)("azure");aD.AzureLogger.log=(...t)=>{$Se.default.log(...t)};var RYt=["verbose","info","warning","error"];vet&&(e5n(vet)?JDn(vet):console.error(`AZURE_LOG_LEVEL set to unknown log level '${vet}'; logging is not enabled. Acceptable values: ${RYt.join(", ")}.`));function JDn(t){if(t&&!e5n(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${RYt.join(",")}`);Tet=t;let e=[];for(let r of KDn)ZDn(r)&&e.push(r.namespace);$Se.default.enable(e.join(","))}a(JDn,"setLogLevel");function Xas(){return Tet}a(Xas,"getLogLevel");var YDn={verbose:400,info:300,warning:200,error:100};function Zas(t){let e=aD.AzureLogger.extend(t);return XDn(aD.AzureLogger,e),{error:bet(e,"error"),warning:bet(e,"warning"),info:bet(e,"info"),verbose:bet(e,"verbose")}}a(Zas,"createClientLogger");function XDn(t,e){e.log=(...r)=>{t.log(...r)}}a(XDn,"patchLogMethod");function bet(t,e){let r=Object.assign(t.extend(e),{level:e});if(XDn(t,r),ZDn(r)){let n=$Se.default.disable();$Se.default.enable(n+","+r.namespace)}return KDn.add(r),r}a(bet,"createLogger");function ZDn(t){return!!(Tet&&YDn[t.level]<=YDn[Tet])}a(ZDn,"shouldEnable");function e5n(t){return RYt.includes(t)}a(e5n,"isAzureLogLevel")});var PYt=T(xet=>{"use strict";f();Object.defineProperty(xet,"__esModule",{value:!0});xet.logger=void 0;var ecs=Iet();xet.logger=(0,ecs.createClientLogger)("opentelemetry-instrumentation-azure-sdk")});function wet(t){return t.setValue(kYt,!0)}function t5n(t){return t.deleteValue(kYt)}function $ce(t){return t.getValue(kYt)===!0}var kYt,VSe=Pe(()=>{f();Fi();kYt=YC("OpenTelemetry SDK Context Key SUPPRESS_TRACING");a(wet,"suppressTracing");a(t5n,"unsuppressTracing");a($ce,"isTracingSuppressed")});var Ret,r5n=Pe(()=>{f();Ret="baggage"});function i5n(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?",":""}${r}`;return n.length>8192?e:n},"")}function o5n(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=";"+r.metadata.toString()),n})}function NYt(t){let e=t.split(";");if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf("=");if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),c;return e.length>0&&(c=Ece(e.join(";"))),{key:o,value:s,metadata:c}}function s5n(t){let e={};return typeof t=="string"&&t.length>0&&t.split(",").forEach(r=>{let n=NYt(r);n!==void 0&&n.value.length>0&&(e[n.key]=n.value)}),e}var DYt=Pe(()=>{f();Fi();a(i5n,"serializeKeyPairs");a(o5n,"getKeyPairs");a(NYt,"parsePairKeyValue");a(s5n,"parseKeyPairsIntoRecord")});var ket,a5n=Pe(()=>{f();Fi();VSe();r5n();DYt();ket=class{static{a(this,"W3CBaggagePropagator")}inject(e,r,n){let o=$v.getBaggage(e);if(!o||$ce(e))return;let s=o5n(o).filter(l=>l.length<=4096).slice(0,180),c=i5n(s);c.length>0&&n.set(r,Ret,c)}extract(e,r,n){let o=n.get(r,Ret),s=Array.isArray(o)?o.join(","):o;if(!s)return e;let c={};return s.length===0||(s.split(",").forEach(u=>{let d=NYt(u);if(d){let p={value:d.value};d.metadata&&(p.metadata=d.metadata),c[d.key]=p}}),Object.entries(c).length===0)?e:$v.setBaggage(e,$v.createBaggage(c))}fields(){return[Ret]}}});var Net,c5n=Pe(()=>{f();Net=class{static{a(this,"AnchoredClock")}_monotonicClock;_epochMillis;_performanceMillis;constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}}});function l5n(t){let e={};if(typeof t!="object"||t==null)return e;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if(!ncs(r)){cn.warn(`Invalid attribute key: ${r}`);continue}let n=t[r];if(!MYt(n)){cn.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}function ncs(t){return typeof t=="string"&&t!==""}function MYt(t){return t==null?!0:Array.isArray(t)?ics(t):u5n(typeof t)}function ics(t){let e;for(let r of t){if(r==null)continue;let n=typeof r;if(n!==e){if(!e){if(u5n(n)){e=n;continue}return!1}return!1}}return!0}function u5n(t){switch(t){case"number":case"boolean":case"string":return!0}return!1}var d5n=Pe(()=>{f();Fi();a(l5n,"sanitizeAttributes");a(ncs,"isAttributeKey");a(MYt,"isAttributeValue");a(ics,"isHomogeneousAttributeValueArray");a(u5n,"isValidPrimitiveAttributeValueType")});function Det(){return t=>{cn.error(ocs(t))}}function ocs(t){return typeof t=="string"?t:JSON.stringify(scs(t))}function scs(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}var OYt=Pe(()=>{f();Fi();a(Det,"loggingErrorHandler");a(ocs,"stringifyException");a(scs,"flattenException")});function p5n(t){f5n=t}function h5n(t){try{f5n(t)}catch{}}var f5n,m5n=Pe(()=>{f();OYt();f5n=Det();a(p5n,"setGlobalErrorHandler");a(h5n,"globalErrorHandler")});function Met(t){let e=process.env[t];if(e==null||e.trim()==="")return;let r=Number(e);if(isNaN(r)){cn.warn(`Unknown value ${(0,BYt.inspect)(e)} for ${t}, expected a number, using defaults`);return}return r}function WSe(t){let e=process.env[t];if(!(e==null||e.trim()===""))return e}function Oet(t){let e=process.env[t]?.trim().toLowerCase();return e==null||e===""?!1:e==="true"?!0:(e==="false"||cn.warn(`Unknown value ${(0,BYt.inspect)(e)} for ${t}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}function Bet(t){return WSe(t)?.split(",").map(e=>e.trim()).filter(e=>e!=="")}var BYt,g5n=Pe(()=>{f();Fi();BYt=require("util");a(Met,"getNumberFromEnv");a(WSe,"getStringFromEnv");a(Oet,"getBooleanFromEnv");a(Bet,"getStringListFromEnv")});var Let,A5n=Pe(()=>{f();Let=typeof globalThis=="object"?globalThis:global});var y5n,j7,E5n=Pe(()=>{f();y5n=require("perf_hooks"),j7=y5n.performance});var C5n,_5n=Pe(()=>{f();C5n="2.2.0"});function Nf(t){let e={},r=t.length;for(let n=0;n{f();a(Nf,"createConstMap")});var v5n,b5n,T5n,S5n,I5n,x5n,w5n,R5n,P5n,k5n,N5n,D5n,M5n,O5n,B5n,L5n,F5n,U5n,Q5n,q5n,G5n,H5n,j5n,$5n,V5n,W5n,z5n,Y5n,K5n,J5n,X5n,Z5n,eMn,tMn,rMn,nMn,iMn,oMn,sMn,aMn,cMn,lMn,uMn,dMn,fMn,pMn,hMn,mMn,gMn,AMn,yMn,EMn,CMn,_Mn,vMn,bMn,TMn,SMn,IMn,xMn,wMn,RMn,PMn,kMn,NMn,DMn,MMn,OMn,BMn,LMn,FMn,UMn,QMn,qMn,GMn,HMn,jMn,$Mn,VMn,WMn,zMn,YMn,KMn,JMn,XMn,ZMn,eOn,tOn,rOn,nOn,iOn,oOn,sOn,aOn,cOn,lOn,uOn,dOn,fOn,pOn,hOn,mOn,gOn,AOn,yOn,EOn,COn,_On,vOn,bOn,TOn,SOn,IOn,xOn,wOn,ROn,POn,kOn,NOn,DOn,MOn,OOn,BOn,LOn,FOn,UOn,QOn,qOn,acs,ccs,lcs,ucs,dcs,fcs,pcs,hcs,mcs,gcs,Acs,ycs,Ecs,Ccs,_cs,vcs,bcs,Tcs,Scs,Ics,xcs,wcs,Rcs,Pcs,kcs,Ncs,Dcs,Mcs,Ocs,Bcs,Lcs,Fcs,Ucs,Qcs,qcs,Gcs,Hcs,jcs,$cs,Vcs,Wcs,zcs,Ycs,Kcs,Jcs,Xcs,Zcs,els,tls,rls,nls,ils,ols,sls,als,cls,lls,uls,dls,fls,pls,hls,mls,gls,Als,yls,Els,Cls,_ls,vls,bls,Tls,Sls,Ils,xls,wls,Rls,Pls,kls,Nls,Dls,Mls,Ols,Bls,Lls,Fls,Uls,Qls,qls,Gls,Hls,jls,$ls,Vls,Wls,zls,Yls,Kls,Jls,Xls,Zls,eus,tus,rus,nus,ius,ous,sus,aus,cus,lus,uus,dus,fus,pus,hus,mus,gus,Aus,yus,Eus,Cus,_us,vus,bus,Tus,Sus,Ius,xus,GOn,HOn,jOn,$On,VOn,WOn,zOn,YOn,KOn,JOn,XOn,ZOn,e4n,t4n,r4n,n4n,i4n,o4n,s4n,a4n,c4n,l4n,u4n,d4n,f4n,p4n,h4n,m4n,g4n,A4n,y4n,E4n,C4n,_4n,v4n,b4n,T4n,S4n,I4n,x4n,w4n,R4n,P4n,k4n,N4n,D4n,M4n,wus,Rus,Pus,kus,Nus,Dus,Mus,Ous,Bus,Lus,Fus,Uus,Qus,qus,Gus,Hus,jus,$us,Vus,Wus,zus,Yus,Kus,Jus,Xus,Zus,eds,tds,rds,nds,ids,ods,sds,ads,cds,lds,uds,dds,fds,pds,hds,mds,gds,Ads,yds,Eds,Cds,_ds,O4n,B4n,L4n,F4n,U4n,Q4n,q4n,G4n,H4n,j4n,$4n,vds,bds,Tds,Sds,Ids,xds,wds,Rds,Pds,kds,Nds,Dds,V4n,W4n,z4n,Y4n,K4n,Mds,Ods,Bds,Lds,Fds,Uds,J4n,X4n,Z4n,Qds,qds,Gds,Hds,eBn,tBn,rBn,nBn,jds,$ds,Vds,Wds,zds,iBn,oBn,sBn,aBn,cBn,lBn,uBn,Yds,Kds,Jds,Xds,Zds,efs,tfs,rfs,dBn,fBn,pBn,hBn,mBn,nfs,ifs,ofs,sfs,afs,cfs,gBn,ABn,yBn,EBn,CBn,_Bn,vBn,bBn,TBn,SBn,IBn,xBn,wBn,RBn,PBn,kBn,NBn,DBn,MBn,OBn,BBn,lfs,ufs,dfs,ffs,pfs,hfs,mfs,gfs,Afs,yfs,Efs,Cfs,_fs,vfs,bfs,Tfs,Sfs,Ifs,xfs,wfs,Rfs,Pfs,LBn,FBn,UBn,QBn,qBn,kfs,Nfs,Dfs,Mfs,Ofs,Bfs,GBn,HBn,Lfs,Ffs,Ufs,jBn,$Bn,Qfs,qfs,Gfs,VBn,WBn,zBn,YBn,KBn,JBn,XBn,ZBn,e3n,t3n,r3n,n3n,i3n,o3n,s3n,a3n,c3n,Hfs,jfs,$fs,Vfs,Wfs,zfs,Yfs,Kfs,Jfs,Xfs,Zfs,e0s,t0s,r0s,n0s,i0s,o0s,s0s,l3n,u3n,a0s,c0s,l0s,d3n=Pe(()=>{f();LYt();v5n="aws.lambda.invoked_arn",b5n="db.system",T5n="db.connection_string",S5n="db.user",I5n="db.jdbc.driver_classname",x5n="db.name",w5n="db.statement",R5n="db.operation",P5n="db.mssql.instance_name",k5n="db.cassandra.keyspace",N5n="db.cassandra.page_size",D5n="db.cassandra.consistency_level",M5n="db.cassandra.table",O5n="db.cassandra.idempotence",B5n="db.cassandra.speculative_execution_count",L5n="db.cassandra.coordinator.id",F5n="db.cassandra.coordinator.dc",U5n="db.hbase.namespace",Q5n="db.redis.database_index",q5n="db.mongodb.collection",G5n="db.sql.table",H5n="exception.type",j5n="exception.message",$5n="exception.stacktrace",V5n="exception.escaped",W5n="faas.trigger",z5n="faas.execution",Y5n="faas.document.collection",K5n="faas.document.operation",J5n="faas.document.time",X5n="faas.document.name",Z5n="faas.time",eMn="faas.cron",tMn="faas.coldstart",rMn="faas.invoked_name",nMn="faas.invoked_provider",iMn="faas.invoked_region",oMn="net.transport",sMn="net.peer.ip",aMn="net.peer.port",cMn="net.peer.name",lMn="net.host.ip",uMn="net.host.port",dMn="net.host.name",fMn="net.host.connection.type",pMn="net.host.connection.subtype",hMn="net.host.carrier.name",mMn="net.host.carrier.mcc",gMn="net.host.carrier.mnc",AMn="net.host.carrier.icc",yMn="peer.service",EMn="enduser.id",CMn="enduser.role",_Mn="enduser.scope",vMn="thread.id",bMn="thread.name",TMn="code.function",SMn="code.namespace",IMn="code.filepath",xMn="code.lineno",wMn="http.method",RMn="http.url",PMn="http.target",kMn="http.host",NMn="http.scheme",DMn="http.status_code",MMn="http.flavor",OMn="http.user_agent",BMn="http.request_content_length",LMn="http.request_content_length_uncompressed",FMn="http.response_content_length",UMn="http.response_content_length_uncompressed",QMn="http.server_name",qMn="http.route",GMn="http.client_ip",HMn="aws.dynamodb.table_names",jMn="aws.dynamodb.consumed_capacity",$Mn="aws.dynamodb.item_collection_metrics",VMn="aws.dynamodb.provisioned_read_capacity",WMn="aws.dynamodb.provisioned_write_capacity",zMn="aws.dynamodb.consistent_read",YMn="aws.dynamodb.projection",KMn="aws.dynamodb.limit",JMn="aws.dynamodb.attributes_to_get",XMn="aws.dynamodb.index_name",ZMn="aws.dynamodb.select",eOn="aws.dynamodb.global_secondary_indexes",tOn="aws.dynamodb.local_secondary_indexes",rOn="aws.dynamodb.exclusive_start_table",nOn="aws.dynamodb.table_count",iOn="aws.dynamodb.scan_forward",oOn="aws.dynamodb.segment",sOn="aws.dynamodb.total_segments",aOn="aws.dynamodb.count",cOn="aws.dynamodb.scanned_count",lOn="aws.dynamodb.attribute_definitions",uOn="aws.dynamodb.global_secondary_index_updates",dOn="messaging.system",fOn="messaging.destination",pOn="messaging.destination_kind",hOn="messaging.temp_destination",mOn="messaging.protocol",gOn="messaging.protocol_version",AOn="messaging.url",yOn="messaging.message_id",EOn="messaging.conversation_id",COn="messaging.message_payload_size_bytes",_On="messaging.message_payload_compressed_size_bytes",vOn="messaging.operation",bOn="messaging.consumer_id",TOn="messaging.rabbitmq.routing_key",SOn="messaging.kafka.message_key",IOn="messaging.kafka.consumer_group",xOn="messaging.kafka.client_id",wOn="messaging.kafka.partition",ROn="messaging.kafka.tombstone",POn="rpc.system",kOn="rpc.service",NOn="rpc.method",DOn="rpc.grpc.status_code",MOn="rpc.jsonrpc.version",OOn="rpc.jsonrpc.request_id",BOn="rpc.jsonrpc.error_code",LOn="rpc.jsonrpc.error_message",FOn="message.type",UOn="message.id",QOn="message.compressed_size",qOn="message.uncompressed_size",acs=v5n,ccs=b5n,lcs=T5n,ucs=S5n,dcs=I5n,fcs=x5n,pcs=w5n,hcs=R5n,mcs=P5n,gcs=k5n,Acs=N5n,ycs=D5n,Ecs=M5n,Ccs=O5n,_cs=B5n,vcs=L5n,bcs=F5n,Tcs=U5n,Scs=Q5n,Ics=q5n,xcs=G5n,wcs=H5n,Rcs=j5n,Pcs=$5n,kcs=V5n,Ncs=W5n,Dcs=z5n,Mcs=Y5n,Ocs=K5n,Bcs=J5n,Lcs=X5n,Fcs=Z5n,Ucs=eMn,Qcs=tMn,qcs=rMn,Gcs=nMn,Hcs=iMn,jcs=oMn,$cs=sMn,Vcs=aMn,Wcs=cMn,zcs=lMn,Ycs=uMn,Kcs=dMn,Jcs=fMn,Xcs=pMn,Zcs=hMn,els=mMn,tls=gMn,rls=AMn,nls=yMn,ils=EMn,ols=CMn,sls=_Mn,als=vMn,cls=bMn,lls=TMn,uls=SMn,dls=IMn,fls=xMn,pls=wMn,hls=RMn,mls=PMn,gls=kMn,Als=NMn,yls=DMn,Els=MMn,Cls=OMn,_ls=BMn,vls=LMn,bls=FMn,Tls=UMn,Sls=QMn,Ils=qMn,xls=GMn,wls=HMn,Rls=jMn,Pls=$Mn,kls=VMn,Nls=WMn,Dls=zMn,Mls=YMn,Ols=KMn,Bls=JMn,Lls=XMn,Fls=ZMn,Uls=eOn,Qls=tOn,qls=rOn,Gls=nOn,Hls=iOn,jls=oOn,$ls=sOn,Vls=aOn,Wls=cOn,zls=lOn,Yls=uOn,Kls=dOn,Jls=fOn,Xls=pOn,Zls=hOn,eus=mOn,tus=gOn,rus=AOn,nus=yOn,ius=EOn,ous=COn,sus=_On,aus=vOn,cus=bOn,lus=TOn,uus=SOn,dus=IOn,fus=xOn,pus=wOn,hus=ROn,mus=POn,gus=kOn,Aus=NOn,yus=DOn,Eus=MOn,Cus=OOn,_us=BOn,vus=LOn,bus=FOn,Tus=UOn,Sus=QOn,Ius=qOn,xus=Nf([v5n,b5n,T5n,S5n,I5n,x5n,w5n,R5n,P5n,k5n,N5n,D5n,M5n,O5n,B5n,L5n,F5n,U5n,Q5n,q5n,G5n,H5n,j5n,$5n,V5n,W5n,z5n,Y5n,K5n,J5n,X5n,Z5n,eMn,tMn,rMn,nMn,iMn,oMn,sMn,aMn,cMn,lMn,uMn,dMn,fMn,pMn,hMn,mMn,gMn,AMn,yMn,EMn,CMn,_Mn,vMn,bMn,TMn,SMn,IMn,xMn,wMn,RMn,PMn,kMn,NMn,DMn,MMn,OMn,BMn,LMn,FMn,UMn,QMn,qMn,GMn,HMn,jMn,$Mn,VMn,WMn,zMn,YMn,KMn,JMn,XMn,ZMn,eOn,tOn,rOn,nOn,iOn,oOn,sOn,aOn,cOn,lOn,uOn,dOn,fOn,pOn,hOn,mOn,gOn,AOn,yOn,EOn,COn,_On,vOn,bOn,TOn,SOn,IOn,xOn,wOn,ROn,POn,kOn,NOn,DOn,MOn,OOn,BOn,LOn,FOn,UOn,QOn,qOn]),GOn="other_sql",HOn="mssql",jOn="mysql",$On="oracle",VOn="db2",WOn="postgresql",zOn="redshift",YOn="hive",KOn="cloudscape",JOn="hsqldb",XOn="progress",ZOn="maxdb",e4n="hanadb",t4n="ingres",r4n="firstsql",n4n="edb",i4n="cache",o4n="adabas",s4n="firebird",a4n="derby",c4n="filemaker",l4n="informix",u4n="instantdb",d4n="interbase",f4n="mariadb",p4n="netezza",h4n="pervasive",m4n="pointbase",g4n="sqlite",A4n="sybase",y4n="teradata",E4n="vertica",C4n="h2",_4n="coldfusion",v4n="cassandra",b4n="hbase",T4n="mongodb",S4n="redis",I4n="couchbase",x4n="couchdb",w4n="cosmosdb",R4n="dynamodb",P4n="neo4j",k4n="geode",N4n="elasticsearch",D4n="memcached",M4n="cockroachdb",wus=GOn,Rus=HOn,Pus=jOn,kus=$On,Nus=VOn,Dus=WOn,Mus=zOn,Ous=YOn,Bus=KOn,Lus=JOn,Fus=XOn,Uus=ZOn,Qus=e4n,qus=t4n,Gus=r4n,Hus=n4n,jus=i4n,$us=o4n,Vus=s4n,Wus=a4n,zus=c4n,Yus=l4n,Kus=u4n,Jus=d4n,Xus=f4n,Zus=p4n,eds=h4n,tds=m4n,rds=g4n,nds=A4n,ids=y4n,ods=E4n,sds=C4n,ads=_4n,cds=v4n,lds=b4n,uds=T4n,dds=S4n,fds=I4n,pds=x4n,hds=w4n,mds=R4n,gds=P4n,Ads=k4n,yds=N4n,Eds=D4n,Cds=M4n,_ds=Nf([GOn,HOn,jOn,$On,VOn,WOn,zOn,YOn,KOn,JOn,XOn,ZOn,e4n,t4n,r4n,n4n,i4n,o4n,s4n,a4n,c4n,l4n,u4n,d4n,f4n,p4n,h4n,m4n,g4n,A4n,y4n,E4n,C4n,_4n,v4n,b4n,T4n,S4n,I4n,x4n,w4n,R4n,P4n,k4n,N4n,D4n,M4n]),O4n="all",B4n="each_quorum",L4n="quorum",F4n="local_quorum",U4n="one",Q4n="two",q4n="three",G4n="local_one",H4n="any",j4n="serial",$4n="local_serial",vds=O4n,bds=B4n,Tds=L4n,Sds=F4n,Ids=U4n,xds=Q4n,wds=q4n,Rds=G4n,Pds=H4n,kds=j4n,Nds=$4n,Dds=Nf([O4n,B4n,L4n,F4n,U4n,Q4n,q4n,G4n,H4n,j4n,$4n]),V4n="datasource",W4n="http",z4n="pubsub",Y4n="timer",K4n="other",Mds=V4n,Ods=W4n,Bds=z4n,Lds=Y4n,Fds=K4n,Uds=Nf([V4n,W4n,z4n,Y4n,K4n]),J4n="insert",X4n="edit",Z4n="delete",Qds=J4n,qds=X4n,Gds=Z4n,Hds=Nf([J4n,X4n,Z4n]),eBn="alibaba_cloud",tBn="aws",rBn="azure",nBn="gcp",jds=eBn,$ds=tBn,Vds=rBn,Wds=nBn,zds=Nf([eBn,tBn,rBn,nBn]),iBn="ip_tcp",oBn="ip_udp",sBn="ip",aBn="unix",cBn="pipe",lBn="inproc",uBn="other",Yds=iBn,Kds=oBn,Jds=sBn,Xds=aBn,Zds=cBn,efs=lBn,tfs=uBn,rfs=Nf([iBn,oBn,sBn,aBn,cBn,lBn,uBn]),dBn="wifi",fBn="wired",pBn="cell",hBn="unavailable",mBn="unknown",nfs=dBn,ifs=fBn,ofs=pBn,sfs=hBn,afs=mBn,cfs=Nf([dBn,fBn,pBn,hBn,mBn]),gBn="gprs",ABn="edge",yBn="umts",EBn="cdma",CBn="evdo_0",_Bn="evdo_a",vBn="cdma2000_1xrtt",bBn="hsdpa",TBn="hsupa",SBn="hspa",IBn="iden",xBn="evdo_b",wBn="lte",RBn="ehrpd",PBn="hspap",kBn="gsm",NBn="td_scdma",DBn="iwlan",MBn="nr",OBn="nrnsa",BBn="lte_ca",lfs=gBn,ufs=ABn,dfs=yBn,ffs=EBn,pfs=CBn,hfs=_Bn,mfs=vBn,gfs=bBn,Afs=TBn,yfs=SBn,Efs=IBn,Cfs=xBn,_fs=wBn,vfs=RBn,bfs=PBn,Tfs=kBn,Sfs=NBn,Ifs=DBn,xfs=MBn,wfs=OBn,Rfs=BBn,Pfs=Nf([gBn,ABn,yBn,EBn,CBn,_Bn,vBn,bBn,TBn,SBn,IBn,xBn,wBn,RBn,PBn,kBn,NBn,DBn,MBn,OBn,BBn]),LBn="1.0",FBn="1.1",UBn="2.0",QBn="SPDY",qBn="QUIC",kfs=LBn,Nfs=FBn,Dfs=UBn,Mfs=QBn,Ofs=qBn,Bfs={HTTP_1_0:LBn,HTTP_1_1:FBn,HTTP_2_0:UBn,SPDY:QBn,QUIC:qBn},GBn="queue",HBn="topic",Lfs=GBn,Ffs=HBn,Ufs=Nf([GBn,HBn]),jBn="receive",$Bn="process",Qfs=jBn,qfs=$Bn,Gfs=Nf([jBn,$Bn]),VBn=0,WBn=1,zBn=2,YBn=3,KBn=4,JBn=5,XBn=6,ZBn=7,e3n=8,t3n=9,r3n=10,n3n=11,i3n=12,o3n=13,s3n=14,a3n=15,c3n=16,Hfs=VBn,jfs=WBn,$fs=zBn,Vfs=YBn,Wfs=KBn,zfs=JBn,Yfs=XBn,Kfs=ZBn,Jfs=e3n,Xfs=t3n,Zfs=r3n,e0s=n3n,t0s=i3n,r0s=o3n,n0s=s3n,i0s=a3n,o0s=c3n,s0s={OK:VBn,CANCELLED:WBn,UNKNOWN:zBn,INVALID_ARGUMENT:YBn,DEADLINE_EXCEEDED:KBn,NOT_FOUND:JBn,ALREADY_EXISTS:XBn,PERMISSION_DENIED:ZBn,RESOURCE_EXHAUSTED:e3n,FAILED_PRECONDITION:t3n,ABORTED:r3n,OUT_OF_RANGE:n3n,UNIMPLEMENTED:i3n,INTERNAL:o3n,UNAVAILABLE:s3n,DATA_LOSS:a3n,UNAUTHENTICATED:c3n},l3n="SENT",u3n="RECEIVED",a0s=l3n,c0s=u3n,l0s=Nf([l3n,u3n])});var f3n=Pe(()=>{f();d3n()});var p3n,h3n,m3n,g3n,A3n,y3n,E3n,C3n,_3n,v3n,b3n,T3n,S3n,I3n,x3n,w3n,R3n,P3n,k3n,N3n,D3n,M3n,O3n,B3n,L3n,F3n,U3n,Q3n,q3n,G3n,H3n,j3n,$3n,V3n,W3n,z3n,Y3n,K3n,J3n,X3n,Z3n,eLn,tLn,rLn,nLn,iLn,oLn,sLn,aLn,cLn,lLn,uLn,dLn,fLn,pLn,hLn,mLn,gLn,ALn,yLn,ELn,CLn,_Ln,vLn,bLn,TLn,SLn,ILn,xLn,wLn,RLn,PLn,kLn,NLn,DLn,MLn,OLn,BLn,LLn,FLn,ULn,u0s,d0s,f0s,p0s,h0s,m0s,g0s,A0s,y0s,E0s,C0s,_0s,v0s,b0s,T0s,S0s,I0s,x0s,w0s,R0s,P0s,k0s,N0s,D0s,M0s,O0s,B0s,L0s,F0s,U0s,Q0s,q0s,G0s,H0s,j0s,$0s,V0s,W0s,z0s,Y0s,K0s,J0s,X0s,Z0s,eps,tps,rps,nps,ips,ops,sps,aps,cps,lps,ups,dps,fps,pps,hps,mps,gps,Aps,yps,Eps,Cps,_ps,vps,bps,Tps,Sps,Ips,xps,wps,Rps,Pps,kps,Nps,Dps,Mps,Ops,Bps,Lps,QLn,qLn,GLn,HLn,Fps,Ups,Qps,qps,Gps,jLn,$Ln,VLn,WLn,zLn,YLn,KLn,JLn,XLn,ZLn,e8n,t8n,r8n,n8n,i8n,o8n,s8n,Hps,jps,$ps,Vps,Wps,zps,Yps,Kps,Jps,Xps,Zps,ehs,ths,rhs,nhs,ihs,ohs,shs,a8n,c8n,ahs,chs,lhs,l8n,u8n,d8n,f8n,p8n,h8n,m8n,uhs,dhs,fhs,phs,hhs,mhs,ghs,Ahs,g8n,A8n,y8n,E8n,C8n,_8n,v8n,b8n,T8n,S8n,I8n,yhs,Ehs,Chs,_hs,vhs,bhs,Ths,Shs,Ihs,xhs,whs,Rhs,x8n,w8n,R8n,P8n,k8n,N8n,D8n,M8n,O8n,B8n,Phs,khs,Nhs,Dhs,Mhs,Ohs,Bhs,Lhs,Fhs,Uhs,Qhs,L8n=Pe(()=>{f();LYt();p3n="cloud.provider",h3n="cloud.account.id",m3n="cloud.region",g3n="cloud.availability_zone",A3n="cloud.platform",y3n="aws.ecs.container.arn",E3n="aws.ecs.cluster.arn",C3n="aws.ecs.launchtype",_3n="aws.ecs.task.arn",v3n="aws.ecs.task.family",b3n="aws.ecs.task.revision",T3n="aws.eks.cluster.arn",S3n="aws.log.group.names",I3n="aws.log.group.arns",x3n="aws.log.stream.names",w3n="aws.log.stream.arns",R3n="container.name",P3n="container.id",k3n="container.runtime",N3n="container.image.name",D3n="container.image.tag",M3n="deployment.environment",O3n="device.id",B3n="device.model.identifier",L3n="device.model.name",F3n="faas.name",U3n="faas.id",Q3n="faas.version",q3n="faas.instance",G3n="faas.max_memory",H3n="host.id",j3n="host.name",$3n="host.type",V3n="host.arch",W3n="host.image.name",z3n="host.image.id",Y3n="host.image.version",K3n="k8s.cluster.name",J3n="k8s.node.name",X3n="k8s.node.uid",Z3n="k8s.namespace.name",eLn="k8s.pod.uid",tLn="k8s.pod.name",rLn="k8s.container.name",nLn="k8s.replicaset.uid",iLn="k8s.replicaset.name",oLn="k8s.deployment.uid",sLn="k8s.deployment.name",aLn="k8s.statefulset.uid",cLn="k8s.statefulset.name",lLn="k8s.daemonset.uid",uLn="k8s.daemonset.name",dLn="k8s.job.uid",fLn="k8s.job.name",pLn="k8s.cronjob.uid",hLn="k8s.cronjob.name",mLn="os.type",gLn="os.description",ALn="os.name",yLn="os.version",ELn="process.pid",CLn="process.executable.name",_Ln="process.executable.path",vLn="process.command",bLn="process.command_line",TLn="process.command_args",SLn="process.owner",ILn="process.runtime.name",xLn="process.runtime.version",wLn="process.runtime.description",RLn="service.name",PLn="service.namespace",kLn="service.instance.id",NLn="service.version",DLn="telemetry.sdk.name",MLn="telemetry.sdk.language",OLn="telemetry.sdk.version",BLn="telemetry.auto.version",LLn="webengine.name",FLn="webengine.version",ULn="webengine.description",u0s=p3n,d0s=h3n,f0s=m3n,p0s=g3n,h0s=A3n,m0s=y3n,g0s=E3n,A0s=C3n,y0s=_3n,E0s=v3n,C0s=b3n,_0s=T3n,v0s=S3n,b0s=I3n,T0s=x3n,S0s=w3n,I0s=R3n,x0s=P3n,w0s=k3n,R0s=N3n,P0s=D3n,k0s=M3n,N0s=O3n,D0s=B3n,M0s=L3n,O0s=F3n,B0s=U3n,L0s=Q3n,F0s=q3n,U0s=G3n,Q0s=H3n,q0s=j3n,G0s=$3n,H0s=V3n,j0s=W3n,$0s=z3n,V0s=Y3n,W0s=K3n,z0s=J3n,Y0s=X3n,K0s=Z3n,J0s=eLn,X0s=tLn,Z0s=rLn,eps=nLn,tps=iLn,rps=oLn,nps=sLn,ips=aLn,ops=cLn,sps=lLn,aps=uLn,cps=dLn,lps=fLn,ups=pLn,dps=hLn,fps=mLn,pps=gLn,hps=ALn,mps=yLn,gps=ELn,Aps=CLn,yps=_Ln,Eps=vLn,Cps=bLn,_ps=TLn,vps=SLn,bps=ILn,Tps=xLn,Sps=wLn,Ips=RLn,xps=PLn,wps=kLn,Rps=NLn,Pps=DLn,kps=MLn,Nps=OLn,Dps=BLn,Mps=LLn,Ops=FLn,Bps=ULn,Lps=Nf([p3n,h3n,m3n,g3n,A3n,y3n,E3n,C3n,_3n,v3n,b3n,T3n,S3n,I3n,x3n,w3n,R3n,P3n,k3n,N3n,D3n,M3n,O3n,B3n,L3n,F3n,U3n,Q3n,q3n,G3n,H3n,j3n,$3n,V3n,W3n,z3n,Y3n,K3n,J3n,X3n,Z3n,eLn,tLn,rLn,nLn,iLn,oLn,sLn,aLn,cLn,lLn,uLn,dLn,fLn,pLn,hLn,mLn,gLn,ALn,yLn,ELn,CLn,_Ln,vLn,bLn,TLn,SLn,ILn,xLn,wLn,RLn,PLn,kLn,NLn,DLn,MLn,OLn,BLn,LLn,FLn,ULn]),QLn="alibaba_cloud",qLn="aws",GLn="azure",HLn="gcp",Fps=QLn,Ups=qLn,Qps=GLn,qps=HLn,Gps=Nf([QLn,qLn,GLn,HLn]),jLn="alibaba_cloud_ecs",$Ln="alibaba_cloud_fc",VLn="aws_ec2",WLn="aws_ecs",zLn="aws_eks",YLn="aws_lambda",KLn="aws_elastic_beanstalk",JLn="azure_vm",XLn="azure_container_instances",ZLn="azure_aks",e8n="azure_functions",t8n="azure_app_service",r8n="gcp_compute_engine",n8n="gcp_cloud_run",i8n="gcp_kubernetes_engine",o8n="gcp_cloud_functions",s8n="gcp_app_engine",Hps=jLn,jps=$Ln,$ps=VLn,Vps=WLn,Wps=zLn,zps=YLn,Yps=KLn,Kps=JLn,Jps=XLn,Xps=ZLn,Zps=e8n,ehs=t8n,ths=r8n,rhs=n8n,nhs=i8n,ihs=o8n,ohs=s8n,shs=Nf([jLn,$Ln,VLn,WLn,zLn,YLn,KLn,JLn,XLn,ZLn,e8n,t8n,r8n,n8n,i8n,o8n,s8n]),a8n="ec2",c8n="fargate",ahs=a8n,chs=c8n,lhs=Nf([a8n,c8n]),l8n="amd64",u8n="arm32",d8n="arm64",f8n="ia64",p8n="ppc32",h8n="ppc64",m8n="x86",uhs=l8n,dhs=u8n,fhs=d8n,phs=f8n,hhs=p8n,mhs=h8n,ghs=m8n,Ahs=Nf([l8n,u8n,d8n,f8n,p8n,h8n,m8n]),g8n="windows",A8n="linux",y8n="darwin",E8n="freebsd",C8n="netbsd",_8n="openbsd",v8n="dragonflybsd",b8n="hpux",T8n="aix",S8n="solaris",I8n="z_os",yhs=g8n,Ehs=A8n,Chs=y8n,_hs=E8n,vhs=C8n,bhs=_8n,Ths=v8n,Shs=b8n,Ihs=T8n,xhs=S8n,whs=I8n,Rhs=Nf([g8n,A8n,y8n,E8n,C8n,_8n,v8n,b8n,T8n,S8n,I8n]),x8n="cpp",w8n="dotnet",R8n="erlang",P8n="go",k8n="java",N8n="nodejs",D8n="php",M8n="python",O8n="ruby",B8n="webjs",Phs=x8n,khs=w8n,Nhs=R8n,Dhs=P8n,Mhs=k8n,Ohs=N8n,Bhs=D8n,Lhs=M8n,Fhs=O8n,Uhs=B8n,Qhs=Nf([x8n,w8n,R8n,P8n,k8n,N8n,D8n,M8n,O8n,B8n])});var F8n=Pe(()=>{f();L8n()});var qhs,Ghs,Hhs,jhs,$hs,Vhs,Whs,zhs,Yhs,Khs,Jhs,Xhs,Zhs,ems,tms,rms,nms,ims,oms,sms,ams,cms,lms,ums,dms,fms,pms,hms,mms,gms,Ams,yms,Ems,Cms,_ms,vms,bms,Tms,Sms,Ims,xms,wms,Y_d,K_d,Rms,Pms,kms,Nms,Dms,Mms,Oms,Bms,Lms,Fms,Ums,Qms,qms,Gms,Hms,jms,$ms,Vms,Wms,zms,Yms,Kms,Jms,Xms,Zms,egs,tgs,rgs,ngs,igs,ogs,sgs,ags,cgs,lgs,ugs,dgs,fgs,pgs,hgs,mgs,ggs,Ags,ygs,Egs,Cgs,_gs,vgs,bgs,Tgs,Sgs,Igs,xgs,wgs,Rgs,Pgs,kgs,Ngs,Dgs,Mgs,Ogs,Bgs,Lgs,Fgs,Ugs,Qgs,qgs,Ggs,Hgs,jgs,FYt,$gs,Vgs,Wgs,zgs,Ygs,UYt,Kgs,Jgs,Xgs,Zgs,eAs,tAs,QYt,qYt,rAs,nAs,iAs,oAs,sAs,aAs,U8n=Pe(()=>{f();qhs="aspnetcore.diagnostics.exception.result",Ghs="aborted",Hhs="handled",jhs="skipped",$hs="unhandled",Vhs="aspnetcore.diagnostics.handler.type",Whs="aspnetcore.rate_limiting.policy",zhs="aspnetcore.rate_limiting.result",Yhs="acquired",Khs="endpoint_limiter",Jhs="global_limiter",Xhs="request_canceled",Zhs="aspnetcore.request.is_unhandled",ems="aspnetcore.routing.is_fallback",tms="aspnetcore.routing.match_status",rms="failure",nms="success",ims="aspnetcore.user.is_authenticated",oms="client.address",sms="client.port",ams="code.column.number",cms="code.file.path",lms="code.function.name",ums="code.line.number",dms="code.stacktrace",fms="db.collection.name",pms="db.namespace",hms="db.operation.batch.size",mms="db.operation.name",gms="db.query.summary",Ams="db.query.text",yms="db.response.status_code",Ems="db.stored_procedure.name",Cms="db.system.name",_ms="mariadb",vms="microsoft.sql_server",bms="mysql",Tms="postgresql",Sms="dotnet.gc.heap.generation",Ims="gen0",xms="gen1",wms="gen2",Y_d="loh",K_d="poh",Rms="error.type",Pms="_OTHER",kms="exception.escaped",Nms="exception.message",Dms="exception.stacktrace",Mms="exception.type",Oms=a(t=>`http.request.header.${t}`,"ATTR_HTTP_REQUEST_HEADER"),Bms="http.request.method",Lms="_OTHER",Fms="CONNECT",Ums="DELETE",Qms="GET",qms="HEAD",Gms="OPTIONS",Hms="PATCH",jms="POST",$ms="PUT",Vms="TRACE",Wms="http.request.method_original",zms="http.request.resend_count",Yms=a(t=>`http.response.header.${t}`,"ATTR_HTTP_RESPONSE_HEADER"),Kms="http.response.status_code",Jms="http.route",Xms="jvm.gc.action",Zms="jvm.gc.name",egs="jvm.memory.pool.name",tgs="jvm.memory.type",rgs="heap",ngs="non_heap",igs="jvm.thread.daemon",ogs="jvm.thread.state",sgs="blocked",ags="new",cgs="runnable",lgs="terminated",ugs="timed_waiting",dgs="waiting",fgs="network.local.address",pgs="network.local.port",hgs="network.peer.address",mgs="network.peer.port",ggs="network.protocol.name",Ags="network.protocol.version",ygs="network.transport",Egs="pipe",Cgs="quic",_gs="tcp",vgs="udp",bgs="unix",Tgs="network.type",Sgs="ipv4",Igs="ipv6",xgs="otel.scope.name",wgs="otel.scope.version",Rgs="otel.status_code",Pgs="ERROR",kgs="OK",Ngs="otel.status_description",Dgs="server.address",Mgs="server.port",Ogs="service.name",Bgs="service.version",Lgs="signalr.connection.status",Fgs="app_shutdown",Ugs="normal_closure",Qgs="timeout",qgs="signalr.transport",Ggs="long_polling",Hgs="server_sent_events",jgs="web_sockets",FYt="telemetry.sdk.language",$gs="cpp",Vgs="dotnet",Wgs="erlang",zgs="go",Ygs="java",UYt="nodejs",Kgs="php",Jgs="python",Xgs="ruby",Zgs="rust",eAs="swift",tAs="webjs",QYt="telemetry.sdk.name",qYt="telemetry.sdk.version",rAs="url.fragment",nAs="url.full",iAs="url.path",oAs="url.query",sAs="url.scheme",aAs="user_agent.original"});var cAs,lAs,uAs,dAs,fAs,pAs,hAs,mAs,gAs,AAs,yAs,EAs,CAs,_As,vAs,bAs,TAs,SAs,IAs,xAs,wAs,RAs,PAs,kAs,NAs,DAs,MAs,OAs,BAs,LAs,FAs,UAs,QAs,qAs,GAs,HAs,jAs,$As,VAs,WAs,zAs,YAs,KAs,JAs,XAs,ZAs,eys,tys,rys,nys,iys,Q8n=Pe(()=>{f();cAs="aspnetcore.diagnostics.exceptions",lAs="aspnetcore.rate_limiting.active_request_leases",uAs="aspnetcore.rate_limiting.queued_requests",dAs="aspnetcore.rate_limiting.request.time_in_queue",fAs="aspnetcore.rate_limiting.request_lease.duration",pAs="aspnetcore.rate_limiting.requests",hAs="aspnetcore.routing.match_attempts",mAs="db.client.operation.duration",gAs="dotnet.assembly.count",AAs="dotnet.exceptions",yAs="dotnet.gc.collections",EAs="dotnet.gc.heap.total_allocated",CAs="dotnet.gc.last_collection.heap.fragmentation.size",_As="dotnet.gc.last_collection.heap.size",vAs="dotnet.gc.last_collection.memory.committed_size",bAs="dotnet.gc.pause.time",TAs="dotnet.jit.compilation.time",SAs="dotnet.jit.compiled_il.size",IAs="dotnet.jit.compiled_methods",xAs="dotnet.monitor.lock_contentions",wAs="dotnet.process.cpu.count",RAs="dotnet.process.cpu.time",PAs="dotnet.process.memory.working_set",kAs="dotnet.thread_pool.queue.length",NAs="dotnet.thread_pool.thread.count",DAs="dotnet.thread_pool.work_item.count",MAs="dotnet.timer.count",OAs="http.client.request.duration",BAs="http.server.request.duration",LAs="jvm.class.count",FAs="jvm.class.loaded",UAs="jvm.class.unloaded",QAs="jvm.cpu.count",qAs="jvm.cpu.recent_utilization",GAs="jvm.cpu.time",HAs="jvm.gc.duration",jAs="jvm.memory.committed",$As="jvm.memory.limit",VAs="jvm.memory.used",WAs="jvm.memory.used_after_last_gc",zAs="jvm.thread.count",YAs="kestrel.active_connections",KAs="kestrel.active_tls_handshakes",JAs="kestrel.connection.duration",XAs="kestrel.queued_connections",ZAs="kestrel.queued_requests",eys="kestrel.rejected_connections",tys="kestrel.tls_handshake.duration",rys="kestrel.upgraded_connections",nys="signalr.server.active_connections",iys="signalr.server.connection.duration"});var oys,q8n=Pe(()=>{f();oys="exception"});var GYt={};Ri(GYt,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Ghs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Hhs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>jhs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>$hs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Yhs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Khs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Jhs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Xhs,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>rms,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>nms,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>qhs,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Vhs,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Whs,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>zhs,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Zhs,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>ems,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>tms,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>ims,ATTR_CLIENT_ADDRESS:()=>oms,ATTR_CLIENT_PORT:()=>sms,ATTR_CODE_COLUMN_NUMBER:()=>ams,ATTR_CODE_FILE_PATH:()=>cms,ATTR_CODE_FUNCTION_NAME:()=>lms,ATTR_CODE_LINE_NUMBER:()=>ums,ATTR_CODE_STACKTRACE:()=>dms,ATTR_DB_COLLECTION_NAME:()=>fms,ATTR_DB_NAMESPACE:()=>pms,ATTR_DB_OPERATION_BATCH_SIZE:()=>hms,ATTR_DB_OPERATION_NAME:()=>mms,ATTR_DB_QUERY_SUMMARY:()=>gms,ATTR_DB_QUERY_TEXT:()=>Ams,ATTR_DB_RESPONSE_STATUS_CODE:()=>yms,ATTR_DB_STORED_PROCEDURE_NAME:()=>Ems,ATTR_DB_SYSTEM_NAME:()=>Cms,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Sms,ATTR_ERROR_TYPE:()=>Rms,ATTR_EXCEPTION_ESCAPED:()=>kms,ATTR_EXCEPTION_MESSAGE:()=>Nms,ATTR_EXCEPTION_STACKTRACE:()=>Dms,ATTR_EXCEPTION_TYPE:()=>Mms,ATTR_HTTP_REQUEST_HEADER:()=>Oms,ATTR_HTTP_REQUEST_METHOD:()=>Bms,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Wms,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>zms,ATTR_HTTP_RESPONSE_HEADER:()=>Yms,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Kms,ATTR_HTTP_ROUTE:()=>Jms,ATTR_JVM_GC_ACTION:()=>Xms,ATTR_JVM_GC_NAME:()=>Zms,ATTR_JVM_MEMORY_POOL_NAME:()=>egs,ATTR_JVM_MEMORY_TYPE:()=>tgs,ATTR_JVM_THREAD_DAEMON:()=>igs,ATTR_JVM_THREAD_STATE:()=>ogs,ATTR_NETWORK_LOCAL_ADDRESS:()=>fgs,ATTR_NETWORK_LOCAL_PORT:()=>pgs,ATTR_NETWORK_PEER_ADDRESS:()=>hgs,ATTR_NETWORK_PEER_PORT:()=>mgs,ATTR_NETWORK_PROTOCOL_NAME:()=>ggs,ATTR_NETWORK_PROTOCOL_VERSION:()=>Ags,ATTR_NETWORK_TRANSPORT:()=>ygs,ATTR_NETWORK_TYPE:()=>Tgs,ATTR_OTEL_SCOPE_NAME:()=>xgs,ATTR_OTEL_SCOPE_VERSION:()=>wgs,ATTR_OTEL_STATUS_CODE:()=>Rgs,ATTR_OTEL_STATUS_DESCRIPTION:()=>Ngs,ATTR_SERVER_ADDRESS:()=>Dgs,ATTR_SERVER_PORT:()=>Mgs,ATTR_SERVICE_NAME:()=>Ogs,ATTR_SERVICE_VERSION:()=>Bgs,ATTR_SIGNALR_CONNECTION_STATUS:()=>Lgs,ATTR_SIGNALR_TRANSPORT:()=>qgs,ATTR_TELEMETRY_SDK_LANGUAGE:()=>FYt,ATTR_TELEMETRY_SDK_NAME:()=>QYt,ATTR_TELEMETRY_SDK_VERSION:()=>qYt,ATTR_URL_FRAGMENT:()=>rAs,ATTR_URL_FULL:()=>nAs,ATTR_URL_PATH:()=>iAs,ATTR_URL_QUERY:()=>oAs,ATTR_URL_SCHEME:()=>sAs,ATTR_USER_AGENT_ORIGINAL:()=>aAs,AWSECSLAUNCHTYPEVALUES_EC2:()=>ahs,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>chs,AwsEcsLaunchtypeValues:()=>lhs,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Hps,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>jps,CLOUDPLATFORMVALUES_AWS_EC2:()=>$ps,CLOUDPLATFORMVALUES_AWS_ECS:()=>Vps,CLOUDPLATFORMVALUES_AWS_EKS:()=>Wps,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Yps,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>zps,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Xps,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>ehs,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Jps,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Zps,CLOUDPLATFORMVALUES_AZURE_VM:()=>Kps,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>ohs,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>ihs,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>rhs,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>ths,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>nhs,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Fps,CLOUDPROVIDERVALUES_AWS:()=>Ups,CLOUDPROVIDERVALUES_AZURE:()=>Qps,CLOUDPROVIDERVALUES_GCP:()=>qps,CloudPlatformValues:()=>shs,CloudProviderValues:()=>Gps,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>vds,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Pds,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>bds,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Rds,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Sds,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Nds,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Ids,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Tds,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>kds,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>wds,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>xds,DBSYSTEMVALUES_ADABAS:()=>$us,DBSYSTEMVALUES_CACHE:()=>jus,DBSYSTEMVALUES_CASSANDRA:()=>cds,DBSYSTEMVALUES_CLOUDSCAPE:()=>Bus,DBSYSTEMVALUES_COCKROACHDB:()=>Cds,DBSYSTEMVALUES_COLDFUSION:()=>ads,DBSYSTEMVALUES_COSMOSDB:()=>hds,DBSYSTEMVALUES_COUCHBASE:()=>fds,DBSYSTEMVALUES_COUCHDB:()=>pds,DBSYSTEMVALUES_DB2:()=>Nus,DBSYSTEMVALUES_DERBY:()=>Wus,DBSYSTEMVALUES_DYNAMODB:()=>mds,DBSYSTEMVALUES_EDB:()=>Hus,DBSYSTEMVALUES_ELASTICSEARCH:()=>yds,DBSYSTEMVALUES_FILEMAKER:()=>zus,DBSYSTEMVALUES_FIREBIRD:()=>Vus,DBSYSTEMVALUES_FIRSTSQL:()=>Gus,DBSYSTEMVALUES_GEODE:()=>Ads,DBSYSTEMVALUES_H2:()=>sds,DBSYSTEMVALUES_HANADB:()=>Qus,DBSYSTEMVALUES_HBASE:()=>lds,DBSYSTEMVALUES_HIVE:()=>Ous,DBSYSTEMVALUES_HSQLDB:()=>Lus,DBSYSTEMVALUES_INFORMIX:()=>Yus,DBSYSTEMVALUES_INGRES:()=>qus,DBSYSTEMVALUES_INSTANTDB:()=>Kus,DBSYSTEMVALUES_INTERBASE:()=>Jus,DBSYSTEMVALUES_MARIADB:()=>Xus,DBSYSTEMVALUES_MAXDB:()=>Uus,DBSYSTEMVALUES_MEMCACHED:()=>Eds,DBSYSTEMVALUES_MONGODB:()=>uds,DBSYSTEMVALUES_MSSQL:()=>Rus,DBSYSTEMVALUES_MYSQL:()=>Pus,DBSYSTEMVALUES_NEO4J:()=>gds,DBSYSTEMVALUES_NETEZZA:()=>Zus,DBSYSTEMVALUES_ORACLE:()=>kus,DBSYSTEMVALUES_OTHER_SQL:()=>wus,DBSYSTEMVALUES_PERVASIVE:()=>eds,DBSYSTEMVALUES_POINTBASE:()=>tds,DBSYSTEMVALUES_POSTGRESQL:()=>Dus,DBSYSTEMVALUES_PROGRESS:()=>Fus,DBSYSTEMVALUES_REDIS:()=>dds,DBSYSTEMVALUES_REDSHIFT:()=>Mus,DBSYSTEMVALUES_SQLITE:()=>rds,DBSYSTEMVALUES_SYBASE:()=>nds,DBSYSTEMVALUES_TERADATA:()=>ids,DBSYSTEMVALUES_VERTICA:()=>ods,DB_SYSTEM_NAME_VALUE_MARIADB:()=>_ms,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>vms,DB_SYSTEM_NAME_VALUE_MYSQL:()=>bms,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Tms,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ims,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>xms,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>wms,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Y_d,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>K_d,DbCassandraConsistencyLevelValues:()=>Dds,DbSystemValues:()=>_ds,ERROR_TYPE_VALUE_OTHER:()=>Pms,EVENT_EXCEPTION:()=>oys,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Gds,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>qds,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Qds,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>jds,FAASINVOKEDPROVIDERVALUES_AWS:()=>$ds,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Vds,FAASINVOKEDPROVIDERVALUES_GCP:()=>Wds,FAASTRIGGERVALUES_DATASOURCE:()=>Mds,FAASTRIGGERVALUES_HTTP:()=>Ods,FAASTRIGGERVALUES_OTHER:()=>Fds,FAASTRIGGERVALUES_PUBSUB:()=>Bds,FAASTRIGGERVALUES_TIMER:()=>Lds,FaasDocumentOperationValues:()=>Hds,FaasInvokedProviderValues:()=>zds,FaasTriggerValues:()=>Uds,HOSTARCHVALUES_AMD64:()=>uhs,HOSTARCHVALUES_ARM32:()=>dhs,HOSTARCHVALUES_ARM64:()=>fhs,HOSTARCHVALUES_IA64:()=>phs,HOSTARCHVALUES_PPC32:()=>hhs,HOSTARCHVALUES_PPC64:()=>mhs,HOSTARCHVALUES_X86:()=>ghs,HTTPFLAVORVALUES_HTTP_1_0:()=>kfs,HTTPFLAVORVALUES_HTTP_1_1:()=>Nfs,HTTPFLAVORVALUES_HTTP_2_0:()=>Dfs,HTTPFLAVORVALUES_QUIC:()=>Ofs,HTTPFLAVORVALUES_SPDY:()=>Mfs,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Fms,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Ums,HTTP_REQUEST_METHOD_VALUE_GET:()=>Qms,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>qms,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Gms,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Lms,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Hms,HTTP_REQUEST_METHOD_VALUE_POST:()=>jms,HTTP_REQUEST_METHOD_VALUE_PUT:()=>$ms,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Vms,HostArchValues:()=>Ahs,HttpFlavorValues:()=>Bfs,JVM_MEMORY_TYPE_VALUE_HEAP:()=>rgs,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>ngs,JVM_THREAD_STATE_VALUE_BLOCKED:()=>sgs,JVM_THREAD_STATE_VALUE_NEW:()=>ags,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>cgs,JVM_THREAD_STATE_VALUE_TERMINATED:()=>lgs,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>ugs,JVM_THREAD_STATE_VALUE_WAITING:()=>dgs,MESSAGETYPEVALUES_RECEIVED:()=>c0s,MESSAGETYPEVALUES_SENT:()=>a0s,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Lfs,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Ffs,MESSAGINGOPERATIONVALUES_PROCESS:()=>qfs,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Qfs,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>cAs,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>lAs,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>uAs,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>pAs,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>fAs,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>dAs,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>hAs,METRIC_DB_CLIENT_OPERATION_DURATION:()=>mAs,METRIC_DOTNET_ASSEMBLY_COUNT:()=>gAs,METRIC_DOTNET_EXCEPTIONS:()=>AAs,METRIC_DOTNET_GC_COLLECTIONS:()=>yAs,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>EAs,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>CAs,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>_As,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>vAs,METRIC_DOTNET_GC_PAUSE_TIME:()=>bAs,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>TAs,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>SAs,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>IAs,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>xAs,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>wAs,METRIC_DOTNET_PROCESS_CPU_TIME:()=>RAs,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>PAs,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>kAs,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>NAs,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>DAs,METRIC_DOTNET_TIMER_COUNT:()=>MAs,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>OAs,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>BAs,METRIC_JVM_CLASS_COUNT:()=>LAs,METRIC_JVM_CLASS_LOADED:()=>FAs,METRIC_JVM_CLASS_UNLOADED:()=>UAs,METRIC_JVM_CPU_COUNT:()=>QAs,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>qAs,METRIC_JVM_CPU_TIME:()=>GAs,METRIC_JVM_GC_DURATION:()=>HAs,METRIC_JVM_MEMORY_COMMITTED:()=>jAs,METRIC_JVM_MEMORY_LIMIT:()=>$As,METRIC_JVM_MEMORY_USED:()=>VAs,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>WAs,METRIC_JVM_THREAD_COUNT:()=>zAs,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>YAs,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>KAs,METRIC_KESTREL_CONNECTION_DURATION:()=>JAs,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>XAs,METRIC_KESTREL_QUEUED_REQUESTS:()=>ZAs,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>eys,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>tys,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>rys,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>nys,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>iys,MessageTypeValues:()=>l0s,MessagingDestinationKindValues:()=>Ufs,MessagingOperationValues:()=>Gfs,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>ffs,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>mfs,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>ufs,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>vfs,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>pfs,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>hfs,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Cfs,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>lfs,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Tfs,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>gfs,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>yfs,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>bfs,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Afs,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Efs,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Ifs,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>_fs,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Rfs,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>xfs,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>wfs,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Sfs,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>dfs,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>ofs,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>sfs,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>afs,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>nfs,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>ifs,NETTRANSPORTVALUES_INPROC:()=>efs,NETTRANSPORTVALUES_IP:()=>Jds,NETTRANSPORTVALUES_IP_TCP:()=>Yds,NETTRANSPORTVALUES_IP_UDP:()=>Kds,NETTRANSPORTVALUES_OTHER:()=>tfs,NETTRANSPORTVALUES_PIPE:()=>Zds,NETTRANSPORTVALUES_UNIX:()=>Xds,NETWORK_TRANSPORT_VALUE_PIPE:()=>Egs,NETWORK_TRANSPORT_VALUE_QUIC:()=>Cgs,NETWORK_TRANSPORT_VALUE_TCP:()=>_gs,NETWORK_TRANSPORT_VALUE_UDP:()=>vgs,NETWORK_TRANSPORT_VALUE_UNIX:()=>bgs,NETWORK_TYPE_VALUE_IPV4:()=>Sgs,NETWORK_TYPE_VALUE_IPV6:()=>Igs,NetHostConnectionSubtypeValues:()=>Pfs,NetHostConnectionTypeValues:()=>cfs,NetTransportValues:()=>rfs,OSTYPEVALUES_AIX:()=>Ihs,OSTYPEVALUES_DARWIN:()=>Chs,OSTYPEVALUES_DRAGONFLYBSD:()=>Ths,OSTYPEVALUES_FREEBSD:()=>_hs,OSTYPEVALUES_HPUX:()=>Shs,OSTYPEVALUES_LINUX:()=>Ehs,OSTYPEVALUES_NETBSD:()=>vhs,OSTYPEVALUES_OPENBSD:()=>bhs,OSTYPEVALUES_SOLARIS:()=>xhs,OSTYPEVALUES_WINDOWS:()=>yhs,OSTYPEVALUES_Z_OS:()=>whs,OTEL_STATUS_CODE_VALUE_ERROR:()=>Pgs,OTEL_STATUS_CODE_VALUE_OK:()=>kgs,OsTypeValues:()=>Rhs,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Zfs,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Yfs,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>jfs,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>i0s,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Wfs,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Xfs,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>r0s,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Vfs,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>zfs,RPCGRPCSTATUSCODEVALUES_OK:()=>Hfs,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>e0s,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Kfs,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Jfs,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>o0s,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>n0s,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>t0s,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>$fs,RpcGrpcStatusCodeValues:()=>s0s,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Bls,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>zls,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Dls,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Rls,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Vls,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>qls,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Uls,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>Yls,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Lls,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Pls,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>Ols,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Qls,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Mls,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>kls,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Nls,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Wls,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Hls,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>jls,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Fls,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Gls,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>wls,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>$ls,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>acs,SEMATTRS_CODE_FILEPATH:()=>dls,SEMATTRS_CODE_FUNCTION:()=>lls,SEMATTRS_CODE_LINENO:()=>fls,SEMATTRS_CODE_NAMESPACE:()=>uls,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>ycs,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>bcs,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>vcs,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Ccs,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>gcs,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Acs,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>_cs,SEMATTRS_DB_CASSANDRA_TABLE:()=>Ecs,SEMATTRS_DB_CONNECTION_STRING:()=>lcs,SEMATTRS_DB_HBASE_NAMESPACE:()=>Tcs,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>dcs,SEMATTRS_DB_MONGODB_COLLECTION:()=>Ics,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>mcs,SEMATTRS_DB_NAME:()=>fcs,SEMATTRS_DB_OPERATION:()=>hcs,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Scs,SEMATTRS_DB_SQL_TABLE:()=>xcs,SEMATTRS_DB_STATEMENT:()=>pcs,SEMATTRS_DB_SYSTEM:()=>ccs,SEMATTRS_DB_USER:()=>ucs,SEMATTRS_ENDUSER_ID:()=>ils,SEMATTRS_ENDUSER_ROLE:()=>ols,SEMATTRS_ENDUSER_SCOPE:()=>sls,SEMATTRS_EXCEPTION_ESCAPED:()=>kcs,SEMATTRS_EXCEPTION_MESSAGE:()=>Rcs,SEMATTRS_EXCEPTION_STACKTRACE:()=>Pcs,SEMATTRS_EXCEPTION_TYPE:()=>wcs,SEMATTRS_FAAS_COLDSTART:()=>Qcs,SEMATTRS_FAAS_CRON:()=>Ucs,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Mcs,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Lcs,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Ocs,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Bcs,SEMATTRS_FAAS_EXECUTION:()=>Dcs,SEMATTRS_FAAS_INVOKED_NAME:()=>qcs,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>Gcs,SEMATTRS_FAAS_INVOKED_REGION:()=>Hcs,SEMATTRS_FAAS_TIME:()=>Fcs,SEMATTRS_FAAS_TRIGGER:()=>Ncs,SEMATTRS_HTTP_CLIENT_IP:()=>xls,SEMATTRS_HTTP_FLAVOR:()=>Els,SEMATTRS_HTTP_HOST:()=>gls,SEMATTRS_HTTP_METHOD:()=>pls,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>_ls,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>vls,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>bls,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Tls,SEMATTRS_HTTP_ROUTE:()=>Ils,SEMATTRS_HTTP_SCHEME:()=>Als,SEMATTRS_HTTP_SERVER_NAME:()=>Sls,SEMATTRS_HTTP_STATUS_CODE:()=>yls,SEMATTRS_HTTP_TARGET:()=>mls,SEMATTRS_HTTP_URL:()=>hls,SEMATTRS_HTTP_USER_AGENT:()=>Cls,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Sus,SEMATTRS_MESSAGE_ID:()=>Tus,SEMATTRS_MESSAGE_TYPE:()=>bus,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Ius,SEMATTRS_MESSAGING_CONSUMER_ID:()=>cus,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>ius,SEMATTRS_MESSAGING_DESTINATION:()=>Jls,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Xls,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>fus,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>dus,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>uus,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>pus,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>hus,SEMATTRS_MESSAGING_MESSAGE_ID:()=>nus,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>sus,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>ous,SEMATTRS_MESSAGING_OPERATION:()=>aus,SEMATTRS_MESSAGING_PROTOCOL:()=>eus,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>tus,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>lus,SEMATTRS_MESSAGING_SYSTEM:()=>Kls,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Zls,SEMATTRS_MESSAGING_URL:()=>rus,SEMATTRS_NET_HOST_CARRIER_ICC:()=>rls,SEMATTRS_NET_HOST_CARRIER_MCC:()=>els,SEMATTRS_NET_HOST_CARRIER_MNC:()=>tls,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Zcs,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Xcs,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Jcs,SEMATTRS_NET_HOST_IP:()=>zcs,SEMATTRS_NET_HOST_NAME:()=>Kcs,SEMATTRS_NET_HOST_PORT:()=>Ycs,SEMATTRS_NET_PEER_IP:()=>$cs,SEMATTRS_NET_PEER_NAME:()=>Wcs,SEMATTRS_NET_PEER_PORT:()=>Vcs,SEMATTRS_NET_TRANSPORT:()=>jcs,SEMATTRS_PEER_SERVICE:()=>nls,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>yus,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>_us,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>vus,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Cus,SEMATTRS_RPC_JSONRPC_VERSION:()=>Eus,SEMATTRS_RPC_METHOD:()=>Aus,SEMATTRS_RPC_SERVICE:()=>gus,SEMATTRS_RPC_SYSTEM:()=>mus,SEMATTRS_THREAD_ID:()=>als,SEMATTRS_THREAD_NAME:()=>cls,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>g0s,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>m0s,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>A0s,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>y0s,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>E0s,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>C0s,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>_0s,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>b0s,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>v0s,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>S0s,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>T0s,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>d0s,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>p0s,SEMRESATTRS_CLOUD_PLATFORM:()=>h0s,SEMRESATTRS_CLOUD_PROVIDER:()=>u0s,SEMRESATTRS_CLOUD_REGION:()=>f0s,SEMRESATTRS_CONTAINER_ID:()=>x0s,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>R0s,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>P0s,SEMRESATTRS_CONTAINER_NAME:()=>I0s,SEMRESATTRS_CONTAINER_RUNTIME:()=>w0s,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>k0s,SEMRESATTRS_DEVICE_ID:()=>N0s,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>D0s,SEMRESATTRS_DEVICE_MODEL_NAME:()=>M0s,SEMRESATTRS_FAAS_ID:()=>B0s,SEMRESATTRS_FAAS_INSTANCE:()=>F0s,SEMRESATTRS_FAAS_MAX_MEMORY:()=>U0s,SEMRESATTRS_FAAS_NAME:()=>O0s,SEMRESATTRS_FAAS_VERSION:()=>L0s,SEMRESATTRS_HOST_ARCH:()=>H0s,SEMRESATTRS_HOST_ID:()=>Q0s,SEMRESATTRS_HOST_IMAGE_ID:()=>$0s,SEMRESATTRS_HOST_IMAGE_NAME:()=>j0s,SEMRESATTRS_HOST_IMAGE_VERSION:()=>V0s,SEMRESATTRS_HOST_NAME:()=>q0s,SEMRESATTRS_HOST_TYPE:()=>G0s,SEMRESATTRS_K8S_CLUSTER_NAME:()=>W0s,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Z0s,SEMRESATTRS_K8S_CRONJOB_NAME:()=>dps,SEMRESATTRS_K8S_CRONJOB_UID:()=>ups,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>aps,SEMRESATTRS_K8S_DAEMONSET_UID:()=>sps,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>nps,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>rps,SEMRESATTRS_K8S_JOB_NAME:()=>lps,SEMRESATTRS_K8S_JOB_UID:()=>cps,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>K0s,SEMRESATTRS_K8S_NODE_NAME:()=>z0s,SEMRESATTRS_K8S_NODE_UID:()=>Y0s,SEMRESATTRS_K8S_POD_NAME:()=>X0s,SEMRESATTRS_K8S_POD_UID:()=>J0s,SEMRESATTRS_K8S_REPLICASET_NAME:()=>tps,SEMRESATTRS_K8S_REPLICASET_UID:()=>eps,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>ops,SEMRESATTRS_K8S_STATEFULSET_UID:()=>ips,SEMRESATTRS_OS_DESCRIPTION:()=>pps,SEMRESATTRS_OS_NAME:()=>hps,SEMRESATTRS_OS_TYPE:()=>fps,SEMRESATTRS_OS_VERSION:()=>mps,SEMRESATTRS_PROCESS_COMMAND:()=>Eps,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>_ps,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cps,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Aps,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>yps,SEMRESATTRS_PROCESS_OWNER:()=>vps,SEMRESATTRS_PROCESS_PID:()=>gps,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Sps,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>bps,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Tps,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>wps,SEMRESATTRS_SERVICE_NAME:()=>Ips,SEMRESATTRS_SERVICE_NAMESPACE:()=>xps,SEMRESATTRS_SERVICE_VERSION:()=>Rps,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Dps,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>kps,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Pps,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Nps,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Bps,SEMRESATTRS_WEBENGINE_NAME:()=>Mps,SEMRESATTRS_WEBENGINE_VERSION:()=>Ops,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Fgs,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Ugs,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Qgs,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Ggs,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Hgs,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>jgs,SemanticAttributes:()=>xus,SemanticResourceAttributes:()=>Lps,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Phs,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>khs,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Nhs,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Dhs,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Mhs,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ohs,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Bhs,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Lhs,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Fhs,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Uhs,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>$gs,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Vgs,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Wgs,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>zgs,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Ygs,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>UYt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Kgs,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Jgs,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Xgs,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Zgs,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>eAs,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>tAs,TelemetrySdkLanguageValues:()=>Qhs});var Fet=Pe(()=>{f();f3n();F8n();U8n();Q8n();q8n()});var G8n,H8n=Pe(()=>{f();G8n="process.runtime.name"});var Uet,j8n=Pe(()=>{f();_5n();Fet();H8n();Uet={[QYt]:"opentelemetry",[G8n]:"node",[FYt]:UYt,[qYt]:C5n}});var $8n=Pe(()=>{f();g5n();A5n();E5n();j8n()});var HYt=Pe(()=>{f();$8n()});function Vce(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*ays);return[r,n]}function qet(){let t=j7.timeOrigin;if(typeof t!="number"){let e=j7;t=e.timing&&e.timing.fetchStart}return t}function jYt(t){let e=Vce(qet()),r=Vce(typeof t=="number"?t:j7.now());return $Yt(e,r)}function W8n(t){if(Get(t))return t;if(typeof t=="number")return t=Qet&&(r[1]-=Qet,r[0]+=1),r}var V8n,sys,ays,Qet,e6n=Pe(()=>{f();HYt();V8n=9,sys=6,ays=Math.pow(10,sys),Qet=Math.pow(10,V8n);a(Vce,"millisToHrTime");a(qet,"getTimeOrigin");a(jYt,"hrTime");a(W8n,"timeInputToHrTime");a(z8n,"hrTimeDuration");a(Y8n,"hrTimeToTimeStamp");a(K8n,"hrTimeToNanoseconds");a(J8n,"hrTimeToMilliseconds");a(X8n,"hrTimeToMicroseconds");a(Get,"isTimeInputHrTime");a(Z8n,"isTimeInput");a($Yt,"addHrTimes")});function t6n(t){typeof t!="number"&&t.unref()}var r6n=Pe(()=>{f();a(t6n,"unrefTimer")});var Het,n6n=Pe(()=>{f();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Het||(Het={}))});var jet,i6n=Pe(()=>{f();Fi();jet=class{static{a(this,"CompositePropagator")}_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(s){cn.warn(`Failed to inject with ${o.constructor.name}. Err: ${s.message}`)}}extract(e,r,n){return this._propagators.reduce((o,s)=>{try{return s.extract(o,r,n)}catch(c){cn.warn(`Failed to extract with ${s.constructor.name}. Err: ${c.message}`)}return o},e)}fields(){return this._fields.slice()}}});function o6n(t){return uys.test(t)}function s6n(t){return dys.test(t)&&!fys.test(t)}var VYt,cys,lys,uys,dys,fys,a6n=Pe(()=>{f();VYt="[_0-9a-z-*/]",cys=`[a-z]${VYt}{0,255}`,lys=`[a-z0-9]${VYt}{0,240}@[a-z]${VYt}{0,13}`,uys=new RegExp(`^(?:${cys}|${lys})$`),dys=/^[ -~]{0,255}[!-~]$/,fys=/,|=/;a(o6n,"validateKey");a(s6n,"validateValue")});var c6n,pys,l6n,u6n,Wce,WYt=Pe(()=>{f();a6n();c6n=32,pys=512,l6n=",",u6n="=",Wce=class t{static{a(this,"TraceState")}_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+u6n+this.get(r)),e),[]).join(l6n)}_parse(e){e.length>pys||(this._internalState=e.split(l6n).reverse().reduce((r,n)=>{let o=n.trim(),s=o.indexOf(u6n);if(s!==-1){let c=o.slice(0,s),l=o.slice(s+1,n.length);o6n(c)&&s6n(l)&&r.set(c,l)}return r},new Map),this._internalState.size>c6n&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,c6n))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}}});function zYt(t){let e=Eys.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var zSe,YSe,hys,mys,gys,Ays,yys,Eys,$et,d6n=Pe(()=>{f();Fi();VSe();WYt();zSe="traceparent",YSe="tracestate",hys="00",mys="(?!ff)[\\da-f]{2}",gys="(?![0]{32})[\\da-f]{32}",Ays="(?![0]{16})[\\da-f]{16}",yys="[\\da-f]{2}",Eys=new RegExp(`^\\s?(${mys})-(${gys})-(${Ays})-(${yys})(-.*)?\\s?$`);a(zYt,"parseTraceParent");$et=class{static{a(this,"W3CTraceContextPropagator")}inject(e,r,n){let o=_l.getSpanContext(e);if(!o||$ce(e)||!KC(o))return;let s=`${hys}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||cd.NONE).toString(16)}`;n.set(r,zSe,s),o.traceState&&n.set(r,YSe,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,zSe);if(!o)return e;let s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;let c=zYt(s);if(!c)return e;c.isRemote=!0;let l=n.get(r,YSe);if(l){let u=Array.isArray(l)?l.join(","):l;c.traceState=new Wce(typeof u=="string"?u:void 0)}return _l.setSpanContext(e,c)}fields(){return[zSe,YSe]}}});function f6n(t,e){return t.setValue(YYt,e)}function p6n(t){return t.deleteValue(YYt)}function h6n(t){return t.getValue(YYt)}var YYt,Vet,m6n=Pe(()=>{f();Fi();YYt=YC("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(Vet||(Vet={}));a(f6n,"setRPCMetadata");a(p6n,"deleteRPCMetadata");a(h6n,"getRPCMetadata")});function KYt(t){if(!Iys(t)||xys(t)!==Cys)return!1;let e=Sys(t);if(e===null)return!0;let r=y6n.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&g6n.call(r)===Tys}function Iys(t){return t!=null&&typeof t=="object"}function xys(t){return t==null?t===void 0?vys:_ys:Tz&&Tz in Object(t)?wys(t):Rys(t)}function wys(t){let e=y6n.call(t,Tz),r=t[Tz],n=!1;try{t[Tz]=void 0,n=!0}catch{}let o=E6n.call(t);return n&&(e?t[Tz]=r:delete t[Tz]),o}function Rys(t){return E6n.call(t)}var Cys,_ys,vys,bys,g6n,Tys,Sys,A6n,y6n,Tz,E6n,C6n=Pe(()=>{f();Cys="[object Object]",_ys="[object Null]",vys="[object Undefined]",bys=Function.prototype,g6n=bys.toString,Tys=g6n.call(Object),Sys=Object.getPrototypeOf,A6n=Object.prototype,y6n=A6n.hasOwnProperty,Tz=Symbol?Symbol.toStringTag:void 0,E6n=A6n.toString;a(KYt,"isPlainObject");a(Iys,"isObjectLike");a(xys,"baseGetTag");a(wys,"getRawTag");a(Rys,"objectToString")});function v6n(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=b6n(e,t.shift(),0,r);return e}function JYt(t){return zet(t)?t.slice():t}function b6n(t,e,r=0,n){let o;if(!(r>Pys)){if(r++,Wet(t)||Wet(e)||T6n(e))o=JYt(e);else if(zet(t)){if(o=t.slice(),zet(e))for(let s=0,c=e.length;s"u"?delete o[u]:o[u]=d;else{let p=o[u],h=d;if(_6n(t,u,n)||_6n(e,u,n))delete o[u];else{if(KSe(p)&&KSe(h)){let m=n.get(p)||[],g=n.get(h)||[];m.push({obj:t,key:u}),g.push({obj:e,key:u}),n.set(p,m),n.set(h,g)}o[u]=b6n(o[u],d,r,n)}}}}else o=e;return o}}function _6n(t,e,r){let n=r.get(t[e])||[];for(let o=0,s=n.length;o"u"||t instanceof Date||t instanceof RegExp||t===null}function kys(t,e){return!(!KYt(t)||!KYt(e))}var Pys,S6n=Pe(()=>{f();C6n();Pys=20;a(v6n,"merge");a(JYt,"takeValue");a(b6n,"mergeTwoObjects");a(_6n,"wasObjectReferenced");a(zet,"isArray");a(T6n,"isFunction");a(KSe,"isObject");a(Wet,"isPrimitive");a(kys,"shouldMerge")});function I6n(t,e){let r,n=new Promise(a(function(s,c){r=setTimeout(a(function(){c(new JSe("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([t,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}var JSe,x6n=Pe(()=>{f();JSe=class t extends Error{static{a(this,"TimeoutError")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};a(I6n,"callWithTimeout")});function XYt(t,e){return typeof e=="string"?t===e:!!t.match(e)}function w6n(t,e){if(!e)return!1;for(let r of e)if(XYt(t,r))return!0;return!1}var R6n=Pe(()=>{f();a(XYt,"urlMatches");a(w6n,"isUrlIgnored")});var Yet,P6n=Pe(()=>{f();Yet=class{static{a(this,"Deferred")}_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}});var Ket,k6n=Pe(()=>{f();P6n();Ket=class{static{a(this,"BindOnceFuture")}_callback;_that;_isCalled=!1;_deferred=new Yet;constructor(e,r){this._callback=e,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}});function D6n(t){if(t==null)return;let e=N6n[t.toUpperCase()];return e??(cn.warn(`Unknown log level "${t}", expected one of ${Object.keys(N6n)}, using default`),Gs.INFO)}var N6n,M6n=Pe(()=>{f();Fi();N6n={ALL:Gs.ALL,VERBOSE:Gs.VERBOSE,DEBUG:Gs.DEBUG,INFO:Gs.INFO,WARN:Gs.WARN,ERROR:Gs.ERROR,NONE:Gs.NONE};a(D6n,"diagLogLevelFromString")});function O6n(t,e){return new Promise(r=>{Bh.with(wet(Bh.active()),()=>{t.export(e,n=>{r(n)})})})}var B6n=Pe(()=>{f();Fi();VSe();a(O6n,"_export")});var Jet={};Ri(Jet,{AnchoredClock:()=>Net,BindOnceFuture:()=>Ket,CompositePropagator:()=>jet,ExportResultCode:()=>Het,RPCType:()=>Vet,SDK_INFO:()=>Uet,TRACE_PARENT_HEADER:()=>zSe,TRACE_STATE_HEADER:()=>YSe,TimeoutError:()=>JSe,TraceState:()=>Wce,W3CBaggagePropagator:()=>ket,W3CTraceContextPropagator:()=>$et,_globalThis:()=>Let,addHrTimes:()=>$Yt,callWithTimeout:()=>I6n,deleteRPCMetadata:()=>p6n,diagLogLevelFromString:()=>D6n,getBooleanFromEnv:()=>Oet,getNumberFromEnv:()=>Met,getRPCMetadata:()=>h6n,getStringFromEnv:()=>WSe,getStringListFromEnv:()=>Bet,getTimeOrigin:()=>qet,globalErrorHandler:()=>h5n,hrTime:()=>jYt,hrTimeDuration:()=>z8n,hrTimeToMicroseconds:()=>X8n,hrTimeToMilliseconds:()=>J8n,hrTimeToNanoseconds:()=>K8n,hrTimeToTimeStamp:()=>Y8n,internal:()=>Nys,isAttributeValue:()=>MYt,isTimeInput:()=>Z8n,isTimeInputHrTime:()=>Get,isTracingSuppressed:()=>$ce,isUrlIgnored:()=>w6n,loggingErrorHandler:()=>Det,merge:()=>v6n,millisToHrTime:()=>Vce,otperformance:()=>j7,parseKeyPairsIntoRecord:()=>s5n,parseTraceParent:()=>zYt,sanitizeAttributes:()=>l5n,setGlobalErrorHandler:()=>p5n,setRPCMetadata:()=>f6n,suppressTracing:()=>wet,timeInputToHrTime:()=>W8n,unrefTimer:()=>t6n,unsuppressTracing:()=>t5n,urlMatches:()=>XYt});var Nys,Xet=Pe(()=>{f();a5n();c5n();d5n();m5n();OYt();e6n();r6n();n6n();DYt();HYt();i6n();d6n();m6n();VSe();WYt();S6n();x6n();R6n();k6n();M6n();B6n();Nys={_export:O6n}});var U6n=T(Zet=>{"use strict";f();Object.defineProperty(Zet,"__esModule",{value:!0});Zet.OpenTelemetrySpanWrapper=void 0;var L6n=(Fi(),ba($4)),F6n=(Xet(),ba(Jet)),Dys=PYt(),ZYt=class{static{a(this,"OpenTelemetrySpanWrapper")}constructor(e){this._span=e}setStatus(e){e.status==="error"&&Mys(e.error)?e.error?(this._span.setStatus({code:L6n.SpanStatusCode.ERROR,message:e.error.toString()}),this.recordException(e.error)):this._span.setStatus({code:L6n.SpanStatusCode.ERROR}):e.status==="success"&&Dys.logger.verbose("Leaving span with status UNSET per OpenTelemetry spec.")}setAttribute(e,r){r!=null&&(0,F6n.isAttributeValue)(r)&&this._span.setAttribute(e,r)}end(){this._span.end()}recordException(e){this._span.recordException(e)}isRecording(){return this._span.isRecording()}addEvent(e,r={}){this._span.addEvent(e,(0,F6n.sanitizeAttributes)(r.attributes),r.startTime)}unwrap(){return this._span}};Zet.OpenTelemetrySpanWrapper=ZYt;function Mys(t){return t!==null&&typeof t=="object"&&"statusCode"in t?t.statusCode!==304:!0}a(Mys,"isRecordableError")});var eKt=T(cD=>{"use strict";f();Object.defineProperty(cD,"__esModule",{value:!0});cD.environmentCache=cD.SDK_VERSION=void 0;cD.envVarToBoolean=Oys;cD.SDK_VERSION="1.0.0-beta.9";cD.environmentCache=new Map;function Oys(t){var e;cD.environmentCache.has(t)||Bys(t);let r=((e=cD.environmentCache.get(t))!==null&&e!==void 0?e:"").toLowerCase();return r!=="false"&&r!=="0"&&!!r}a(Oys,"envVarToBoolean");function Bys(t){var e;if(typeof process<"u"&&process.env){let r=(e=process.env[t])!==null&&e!==void 0?e:process.env[t.toLowerCase()];cD.environmentCache.set(t,r)}}a(Bys,"loadEnvironmentVariable")});var H6n=T(ett=>{"use strict";f();Object.defineProperty(ett,"__esModule",{value:!0});ett.toOpenTelemetrySpanKind=G6n;ett.toSpanOptions=Fys;var Q6n=(Fi(),ba($4)),q6n=(Xet(),ba(Jet));function G6n(t){let e=(t||"internal").toUpperCase();return Q6n.SpanKind[e]}a(G6n,"toOpenTelemetrySpanKind");function Lys(t=[]){return t.reduce((e,r)=>{let n=Q6n.trace.getSpanContext(r.tracingContext);return n&&e.push({context:n,attributes:(0,q6n.sanitizeAttributes)(r.attributes)}),e},[])}a(Lys,"toOpenTelemetryLinks");function Fys(t){let{spanAttributes:e,spanLinks:r,spanKind:n}=t||{},o=(0,q6n.sanitizeAttributes)(e),s=G6n(n),c=Lys(r);return{attributes:o,kind:s,links:c}}a(Fys,"toSpanOptions")});var V6n=T($7=>{"use strict";f();Object.defineProperty($7,"__esModule",{value:!0});$7.OpenTelemetryInstrumenter=$7.propagator=void 0;var lD=(Fi(),ba($4)),$6n=(Xet(),ba(Jet)),Uys=U6n(),j6n=eKt(),Qys=H6n();$7.propagator=new $6n.W3CTraceContextPropagator;var tKt=class{static{a(this,"OpenTelemetryInstrumenter")}startSpan(e,r){let n=r?.tracingContext||lD.context.active(),o;return(0,j6n.envVarToBoolean)("AZURE_TRACING_DISABLED")?o=lD.trace.wrapSpanContext(lD.INVALID_SPAN_CONTEXT):(o=lD.trace.getTracer(r.packageName,r.packageVersion).startSpan(e,(0,Qys.toSpanOptions)(r),n),(0,j6n.envVarToBoolean)("AZURE_HTTP_TRACING_CHILDREN_DISABLED")&&e.toUpperCase().startsWith("HTTP")&&(n=(0,$6n.suppressTracing)(n))),{span:new Uys.OpenTelemetrySpanWrapper(o),tracingContext:lD.trace.setSpan(n,o)}}withContext(e,r,...n){return lD.context.with(e,r,void 0,...n)}parseTraceparentHeader(e){return $7.propagator.extract(lD.context.active(),{traceparent:e},lD.defaultTextMapGetter)}createRequestHeaders(e){let r={};return $7.propagator.inject(e||lD.context.active(),r,lD.defaultTextMapSetter),r}};$7.OpenTelemetryInstrumenter=tKt});var z6n=T(XSe=>{"use strict";f();Object.defineProperty(XSe,"__esModule",{value:!0});XSe.AzureSdkInstrumentation=void 0;XSe.createAzureSdkInstrumentation=Hys;var W6n=(vYt(),ba(_Yt)),qys=V6n(),Gys=eKt(),ttt=class extends W6n.InstrumentationBase{static{a(this,"AzureSdkInstrumentation")}constructor(e={}){super("@azure/opentelemetry-instrumentation-azure-sdk",Gys.SDK_VERSION,Object.assign({},e))}init(){let e=new W6n.InstrumentationNodeModuleDefinition("@azure/core-tracing",["^1.0.0-preview.14","^1.0.0"],r=>(typeof r.useInstrumenter=="function"&&r.useInstrumenter(new qys.OpenTelemetryInstrumenter),r));return e.includePrerelease=!0,e}};XSe.AzureSdkInstrumentation=ttt;function Hys(t={}){return new ttt(t)}a(Hys,"createAzureSdkInstrumentation")});var K6n=T(rtt=>{"use strict";f();Object.defineProperty(rtt,"__esModule",{value:!0});var Y6n=(qM(),ba(i6));Y6n.__exportStar(PYt(),rtt);Y6n.__exportStar(z6n(),rtt)});var X6n=T(LS=>{"use strict";f();Object.defineProperty(LS,"__esModule",{value:!0});LS.enable=LS.azureCoreTracing=LS.AzureMonitorSymbol=void 0;var rKt=Xd();LS.AzureMonitorSymbol="Azure_Monitor_Tracer";var nKt="azure-coretracing",J6n=!1,jys=a(function(t){if(J6n)return t;try{var e=(Xkn(),ba(Jkn)),r=(Fi(),ba($4)),n=new e.BasicTracerProvider,o=n.getTracer("applicationinsights tracer");if(t.setTracer){var s=t.setTracer;t.setTracer=function(d){var p=d.startSpan;d.startSpan=function(h,m,g){var A=p.call(this,h,m,g),y=A.end;return A.end=function(){var E=y.apply(this,arguments);return rKt.channel.publish(nKt,A),E},A},d[LS.AzureMonitorSymbol]=!0,s.call(this,d)},r.trace.getSpan(r.context.active()),t.setTracer(o)}else{var c=r.trace.setGlobalTracerProvider;r.trace.setGlobalTracerProvider=function(d){var p=d.getTracer;return d.getTracer=function(h,m){var g=p.call(this,h,m);if(!g[LS.AzureMonitorSymbol]){var A=g.startSpan;g.startSpan=function(y,E,_){var v=A.call(this,y,E,_),b=v.end;return v.end=function(){var I=b.apply(this,arguments);return rKt.channel.publish(nKt,v),I},v},g[LS.AzureMonitorSymbol]=!0}return g},c.call(this,d)},n.register(),r.trace.getSpan(r.context.active());var l=(vYt(),ba(_Yt)),u=K6n();l.registerInstrumentations({instrumentations:[u.createAzureSdkInstrumentation()]})}J6n=!0}catch{}return t},"azureCoreTracingPatchFunction");LS.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:jys,publisherName:nKt};function $ys(){rKt.channel.registerMonkeyPatch("@azure/core-tracing",LS.azureCoreTracing)}a($ys,"enable");LS.enable=$ys});var eFn=T(Sz=>{"use strict";f();Object.defineProperty(Sz,"__esModule",{value:!0});Sz.enable=Sz.bunyan=void 0;var Z6n=Xd(),Vys=a(function(t){var e=t.prototype._emit;return t.prototype._emit=function(r,n){var o=e.apply(this,arguments);if(!n){var s=o;s||(s=e.call(this,r,!0)),Z6n.channel.publish("bunyan",{level:r.level,result:s})}return o},t},"bunyanPatchFunction");Sz.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:Vys};function Wys(){Z6n.channel.registerMonkeyPatch("bunyan",Sz.bunyan)}a(Wys,"enable");Sz.enable=Wys});var rFn=T(Iz=>{"use strict";f();Object.defineProperty(Iz,"__esModule",{value:!0});Iz.enable=Iz.console=void 0;var iKt=Xd(),tFn=require("stream"),zys=a(function(t){var e=new tFn.Writable,r=new tFn.Writable;e.write=function(d){if(!d)return!0;var p=d.toString();return iKt.channel.publish("console",{message:p}),!0},r.write=function(d){if(!d)return!0;var p=d.toString();return iKt.channel.publish("console",{message:p,stderr:!0}),!0};for(var n=new t.Console(e,r),o=["log","info","warn","error","dir","time","timeEnd","trace","assert"],s=a(function(d){var p=t[d];p&&(t[d]=function(){if(n[d])try{n[d].apply(n,arguments)}catch{}return p.apply(t,arguments)})},"_loop_1"),c=0,l=o;c= 4.0.0",patch:zys};function Yys(){iKt.channel.registerMonkeyPatch("console",Iz.console),require("console")}a(Yys,"enable");Iz.enable=Yys});var nFn=T(xz=>{"use strict";f();Object.defineProperty(xz,"__esModule",{value:!0});xz.enable=xz.mongoCore=void 0;var oKt=Xd(),Kys=a(function(t){var e=t.Server.prototype.connect;return t.Server.prototype.connect=a(function(){var n=e.apply(this,arguments),o=this.s.pool.write;this.s.pool.write=a(function(){var l=typeof arguments[1]=="function"?1:2;return typeof arguments[l]=="function"&&(arguments[l]=oKt.channel.bindToContext(arguments[l])),o.apply(this,arguments)},"contextPreservingWrite");var s=this.s.pool.logout;return this.s.pool.logout=a(function(){return typeof arguments[1]=="function"&&(arguments[1]=oKt.channel.bindToContext(arguments[1])),s.apply(this,arguments)},"contextPreservingLogout"),n},"contextPreservingConnect"),t},"mongodbcorePatchFunction");xz.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:Kys};function Jys(){oKt.channel.registerMonkeyPatch("mongodb-core",xz.mongoCore)}a(Jys,"enable");xz.enable=Jys});var iFn=T(Ly=>{"use strict";f();var zce=Ly&&Ly.__assign||function(){return zce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r= 2.0.0 <= 3.0.5",patch:Xys};Ly.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:Zys};Ly.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:tEs};function rEs(){uA.channel.registerMonkeyPatch("mongodb",Ly.mongo2),uA.channel.registerMonkeyPatch("mongodb",Ly.mongo3),uA.channel.registerMonkeyPatch("mongodb",Ly.mongo330)}a(rEs,"enable");Ly.enable=rEs});var sFn=T(wz=>{"use strict";f();Object.defineProperty(wz,"__esModule",{value:!0});wz.enable=wz.mysql=void 0;var ntt=Xd(),oFn=require("path"),nEs=a(function(t,e){var r=a(function(u,d){return function(p,h){var m=u[p];m&&(u[p]=a(function(){for(var A=arguments.length-1,y=arguments.length-1;y>=0;--y)if(typeof arguments[y]=="function"){A=y;break}else if(typeof arguments[y]<"u")break;var E=arguments[A],_={result:null,startTime:null,startDate:null};typeof E=="function"&&(h?(_.startTime=process.hrtime(),_.startDate=new Date,arguments[A]=ntt.channel.bindToContext(h(_,E))):arguments[A]=ntt.channel.bindToContext(E));var v=m.apply(this,arguments);return _.result=v,v},"mysqlContextPreserver"))}},"patchObjectFunction"),n=a(function(u,d){return r(u.prototype,d+".prototype")},"patchClassMemberFunction"),o=["connect","changeUser","ping","statistics","end"],s=require(oFn.dirname(e)+"/lib/Connection");o.forEach(function(u){return n(s,"Connection")(u)}),r(s,"Connection")("createQuery",function(u,d){return function(p){var h=process.hrtime(u.startTime),m=h[0]*1e3+h[1]/1e6|0;ntt.channel.publish("mysql",{query:u.result,callbackArgs:arguments,err:p,duration:m,time:u.startDate}),d.apply(this,arguments)}});var c=["_enqueueCallback"],l=require(oFn.dirname(e)+"/lib/Pool");return c.forEach(function(u){return n(l,"Pool")(u)}),t},"mysqlPatchFunction");wz.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:nEs};function iEs(){ntt.channel.registerMonkeyPatch("mysql",wz.mysql)}a(iEs,"enable");wz.enable=iEs});var cFn=T(Rz=>{"use strict";f();Object.defineProperty(Rz,"__esModule",{value:!0});Rz.enable=Rz.postgresPool1=void 0;var aFn=Xd();function oEs(t){var e=t.prototype.connect;return t.prototype.connect=a(function(n){return n&&(arguments[0]=aFn.channel.bindToContext(n)),e.apply(this,arguments)},"connect"),t}a(oEs,"postgresPool1PatchFunction");Rz.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:oEs};function sEs(){aFn.channel.registerMonkeyPatch("pg-pool",Rz.postgresPool1)}a(sEs,"enable");Rz.enable=sEs});var uFn=T(uD=>{"use strict";f();Object.defineProperty(uD,"__esModule",{value:!0});uD.enable=uD.postgres=uD.postgres6=void 0;var Yce=Xd(),lFn=require("events"),sKt="postgres";function aEs(t,e){var r=t.Client.prototype.query,n="__diagnosticOriginalFunc";return t.Client.prototype.query=a(function(s,c,l){var u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime(),p;function h(m){m&&m[n]&&(m=m[n]);var g=Yce.channel.bindToContext(function(A,y){var E=process.hrtime(d);if(u.result=y&&{rowCount:y.rowCount,command:y.command},u.error=A,u.duration=Math.ceil(E[0]*1e3+E[1]/1e6),Yce.channel.publish(sKt,u),A){if(m)return m.apply(this,arguments);p&&p instanceof lFn.EventEmitter&&p.emit("error",A)}else m&&m.apply(this,arguments)});try{return Object.defineProperty(g,n,{value:m}),g}catch{return m}}a(h,"patchCallback");try{typeof s=="string"?c instanceof Array?(u.query.preparable={text:s,args:c},l=h(l)):(u.query.text=s,l?l=h(l):c=h(c)):(typeof s.name=="string"?u.query.plan=s.name:s.values instanceof Array?u.query.preparable={text:s.text,args:s.values}:u.query.text=s.text,l?l=h(l):c?c=h(c):s.callback=h(s.callback))}catch{return r.apply(this,arguments)}return arguments[0]=s,arguments[1]=c,arguments[2]=l,arguments.length=arguments.length>3?arguments.length:3,p=r.apply(this,arguments),p},"query"),t}a(aEs,"postgres6PatchFunction");function cEs(t,e){var r=t.Client.prototype.query,n="__diagnosticOriginalFunc";return t.Client.prototype.query=a(function(s,c,l){var u=this,d,p,h=!!l,m={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},g,A=process.hrtime();function y(v){v&&v[n]&&(v=v[n]);var b=Yce.channel.bindToContext(function(I,x){var R=process.hrtime(A);if(m.result=x&&{rowCount:x.rowCount,command:x.command},m.error=I,m.duration=Math.ceil(R[0]*1e3+R[1]/1e6),Yce.channel.publish(sKt,m),I){if(v)return v.apply(this,arguments);g&&g instanceof lFn.EventEmitter&&g.emit("error",I)}else v&&v.apply(this,arguments)});try{return Object.defineProperty(b,n,{value:v}),b}catch{return v}}a(y,"patchCallback");try{typeof s=="string"?c instanceof Array?(m.query.preparable={text:s,args:c},h=typeof l=="function",l=h?y(l):l):(m.query.text=s,l?(h=typeof l=="function",l=h?y(l):l):(h=typeof c=="function",c=h?y(c):c)):(typeof s.name=="string"?m.query.plan=s.name:s.values instanceof Array?m.query.preparable={text:s.text,args:s.values}:s.cursor?m.query.text=(d=s.cursor)===null||d===void 0?void 0:d.text:m.query.text=s.text,l?(h=typeof l=="function",l=y(l)):c?(h=typeof c=="function",c=h?y(c):c):(h=typeof s.callback=="function",s.callback=h?y(s.callback):s.callback))}catch{return r.apply(this,arguments)}arguments[0]=s,arguments[1]=c,arguments[2]=l,arguments.length=arguments.length>3?arguments.length:3;try{g=r.apply(this,arguments)}catch(v){throw y()(v,void 0),v}if(!h){if(g instanceof Promise)return g.then(function(v){return y()(void 0,v),new u._Promise(function(b,I){b(v)})}).catch(function(v){return y()(v,void 0),new u._Promise(function(b,I){I(v)})});var E=g.text?g.text:"";if(g.cursor&&(E=(p=g.cursor)===null||p===void 0?void 0:p.text),E){var _={command:E,rowCount:0};y()(void 0,_)}}return g},"query"),t}a(cEs,"postgresLatestPatchFunction");uD.postgres6={versionSpecifier:"6.*",patch:aEs};uD.postgres={versionSpecifier:">=7.* <=8.*",patch:cEs,publisherName:sKt};function lEs(){Yce.channel.registerMonkeyPatch("pg",uD.postgres6),Yce.channel.registerMonkeyPatch("pg",uD.postgres)}a(lEs,"enable");uD.enable=lEs});var dFn=T(Pz=>{"use strict";f();Object.defineProperty(Pz,"__esModule",{value:!0});Pz.enable=Pz.redis=void 0;var aKt=Xd(),uEs=a(function(t){var e=t.RedisClient.prototype.internal_send_command;return t.RedisClient.prototype.internal_send_command=function(r){if(r){var n=r.callback;if(!n||!n.pubsubBound){var o=this.address,s=process.hrtime(),c=new Date;r.callback=aKt.channel.bindToContext(function(l,u){var d=process.hrtime(s),p=d[0]*1e3+d[1]/1e6|0;aKt.channel.publish("redis",{duration:p,address:o,commandObj:r,err:l,result:u,time:c}),typeof n=="function"&&n.apply(this,arguments)}),r.callback.pubsubBound=!0}}return e.call(this,r)},t},"redisPatchFunction");Pz.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:uEs};function dEs(){aKt.channel.registerMonkeyPatch("redis",Pz.redis)}a(dEs,"enable");Pz.enable=dEs});var fFn=T(z4=>{"use strict";f();var itt=z4&&z4.__assign||function(){return itt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r= 6.0.0 < 9.0.0",patch:fEs};function pEs(){cKt.channel.registerMonkeyPatch("tedious",z4.tedious)}a(pEs,"enable");z4.enable=pEs});var pFn=T(t_=>{"use strict";f();var hEs=t_&&t_.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),mEs=t_&&t_.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);od[p]?h:p);return p}a(n,"getLogLevel");function o(l){this.add(new r(t,{level:n(l)}))}a(o,"patchedConfigure");var s=t.createLogger;t.createLogger=a(function(u){var d=s.call(this,u);d.add(new r(t,{level:n(u)}));var p=d.configure;return d.configure=function(){p.apply(this,arguments),o.apply(this,arguments)},d},"patchedCreate");var c=t.configure;return t.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},t.add(new r(t)),t},"winston3PatchFunction");t_.winston3={versionSpecifier:"3.x",patch:AEs};t_.winston2={versionSpecifier:"2.x",patch:gEs};function yEs(){ott.channel.registerMonkeyPatch("winston",t_.winston2),ott.channel.registerMonkeyPatch("winston",t_.winston3)}a(yEs,"enable");t_.enable=yEs});var SFn=T(vl=>{"use strict";f();Object.defineProperty(vl,"__esModule",{value:!0});vl.enable=vl.tedious=vl.pgPool=vl.pg=vl.winston=vl.redis=vl.mysql=vl.mongodb=vl.mongodbCore=vl.console=vl.bunyan=vl.azuresdk=void 0;var hFn=X6n();vl.azuresdk=hFn;var mFn=eFn();vl.bunyan=mFn;var gFn=rFn();vl.console=gFn;var AFn=nFn();vl.mongodbCore=AFn;var yFn=iFn();vl.mongodb=yFn;var EFn=sFn();vl.mysql=EFn;var CFn=cFn();vl.pgPool=CFn;var _Fn=uFn();vl.pg=_Fn;var vFn=dFn();vl.redis=vFn;var bFn=fFn();vl.tedious=bFn;var TFn=pFn();vl.winston=TFn;function EEs(){mFn.enable(),gFn.enable(),AFn.enable(),yFn.enable(),EFn.enable(),_Fn.enable(),CFn.enable(),vFn.enable(),TFn.enable(),hFn.enable(),bFn.enable()}a(EEs,"enable");vl.enable=EEs});var ctt=T(kz=>{"use strict";f();Object.defineProperty(kz,"__esModule",{value:!0});kz.IsInitialized=void 0;kz.registerContextPreservation=CEs;var lKt=Kc(),xFn=sZe();kz.IsInitialized=!xFn.JsonConfig.getInstance().noDiagnosticChannel;var uKt="DiagnosticChannel";if(kz.IsInitialized){Zw=SFn(),IFn=xFn.JsonConfig.getInstance().noPatchModules,stt=IFn.split(","),dKt={bunyan:Zw.bunyan,console:Zw.console,mongodb:Zw.mongodb,mongodbCore:Zw.mongodbCore,mysql:Zw.mysql,redis:Zw.redis,pg:Zw.pg,pgPool:Zw.pgPool,winston:Zw.winston,azuresdk:Zw.azuresdk};for(att in dKt)stt.indexOf(att)===-1&&(dKt[att].enable(),lKt.info(uKt,"Subscribed to ".concat(att," events")));stt.length>0&&lKt.info(uKt,"Some modules will not be patched",stt)}else lKt.info(uKt,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");var Zw,IFn,stt,dKt,att;function CEs(t){if(kz.IsInitialized){var e=Xd();e.channel.addContextPreservation(t)}}a(CEs,"registerContextPreservation")});var Kce=T((tTd,wFn)=>{"use strict";f();wFn.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}});var Wm=T((hKt,RFn)=>{"use strict";f();var W7=hKt&&hKt.__assign||function(){return W7=Object.assign||function(t){for(var e,r=1,n=arguments.length;r>u&255)},"toChar"),n=a(function(l){return r(l,24)+r(l,16)+r(l,8)+r(l,0)},"int32AsString"),o=e.map(n).join(""),s=Buffer.from?Buffer.from(o,"binary"):new Buffer(o,"binary"),c=s.toString("base64");return c.substr(0,c.indexOf("="))},t.random32=function(){return 4294967296*Math.random()|0},t.randomu32=function(){return t.random32()+2147483648},t.w3cTraceId=function(){for(var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",n,o=0;o<4;o++)n=t.random32(),r+=e[n&15]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var s=e[8+Math.random()*4|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+s+r.substr(16,3)+r.substr(19,12)},t.w3cSpanId=function(){return t.w3cTraceId().substring(16)},t.isValidW3CId=function(e){return e.length===32&&e!=="00000000000000000000000000000000"},t.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"},t.isError=function(e){return Object.prototype.toString.call(e)==="[object Error]"},t.isPrimitive=function(e){var r=typeof e;return r==="string"||r==="number"||r==="boolean"},t.isDate=function(e){return Object.prototype.toString.call(e)==="[object Date]"},t.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var r=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/(1e3*60))%60,o=""+Math.floor(e/(1e3*60*60))%24,s=Math.floor(e/(1e3*60*60*24));r=r.indexOf(".")<2?"0"+r:r,n=n.length<2?"0"+n:n,o=o.length<2?"0"+o:o;var c=s>0?s+".":"";return c+o+":"+n+":"+r},t.extractError=function(e){var r=e;return{message:e.message,code:r.code||r.id||""}},t.extractObject=function(e){return e instanceof Error?t.extractError(e):typeof e.toJSON=="function"?e.toJSON():e},t.validateStringMap=function(e){if(typeof e!="object"){Nz.info("Invalid properties dropped from payload");return}var r={};for(var n in e){var o="",s=e[n],c=typeof s;if(t.isPrimitive(s))o=s.toString();else if(s===null||c==="undefined")o="";else if(c==="function"){Nz.info("key: "+n+" was function; will not serialize");continue}else{var l=t.isArray(s)?s:t.extractObject(s);try{t.isPrimitive(l)?o=l:o=JSON.stringify(l)}catch(u){o=s.constructor.name.toString()+" (Error: "+u.message+")",Nz.info("key: "+n+", could not be serialized")}}r[n]=o.substring(0,t.MAX_PROPERTY_LENGTH)}return r},t.canIncludeCorrelationHeader=function(e,r){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||n.length==0||!r)return!0;for(var o=0;o{"use strict";f();var mKt=Wm(),TEs=(function(){function t(){}return a(t,"CorrelationIdManager"),t.queryCorrelationId=function(e,r){},t.cancelCorrelationIdQuery=function(e,r){},t.generateRequestId=function(e){if(e){e=e[0]=="|"?e:"|"+e,e[e.length-1]!=="."&&(e+=".");var r=(t.currentRootId++).toString(16);return t.appendSuffix(e,r,"_")}else return t.generateRootId()},t.getRootId=function(e){var r=e.indexOf(".");r<0&&(r=e.length);var n=e[0]==="|"?1:0;return e.substring(n,r)},t.generateRootId=function(){return"|"+mKt.w3cTraceId()+"."},t.appendSuffix=function(e,r,n){if(e.length+r.lengtho)for(;o>1;--o){var s=e[o-1];if(s==="."||s==="_")break}if(o<=1)return t.generateRootId();for(r=mKt.randomu32().toString(16);r.length<8;)r="0"+r;return e.substring(0,o)+r+"#"},t.correlationIdPrefix="cid-v1:",t.w3cEnabled=!0,t.HTTP_TIMEOUT=2500,t.requestIdMaxLength=1024,t.currentRootId=mKt.randomu32(),t})();PFn.exports=TEs});var ltt=T((cTd,kFn)=>{"use strict";f();var zm=Wm(),SEs=Dz(),IEs=(function(){function t(e,r){if(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.version=t.DEFAULT_VERSION,e&&typeof e=="string")if(e.split(",").length>1)this.traceId=zm.w3cTraceId(),this.spanId=zm.w3cTraceId().substr(0,16);else{var n=e.trim().split("-"),o=n.length;o>=4?(this.version=n[0],this.traceId=n[1],this.spanId=n[2],this.traceFlag=n[3]):(this.traceId=zm.w3cTraceId(),this.spanId=zm.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=t.DEFAULT_VERSION,this.traceId=zm.w3cTraceId()),this.version==="00"&&o!==4&&(this.traceId=zm.w3cTraceId(),this.spanId=zm.w3cTraceId().substr(0,16)),this.version==="ff"&&(this.version=t.DEFAULT_VERSION,this.traceId=zm.w3cTraceId(),this.spanId=zm.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=t.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.traceId=zm.w3cTraceId()),t.isValidTraceId(this.traceId)||(this.traceId=zm.w3cTraceId()),t.isValidSpanId(this.spanId)||(this.spanId=zm.w3cTraceId().substr(0,16),this.traceId=zm.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(r){this.parentId=r.slice();var s=SEs.getRootId(r);t.isValidTraceId(s)||(this.legacyRootId=s,s=zm.w3cTraceId()),r.indexOf("|")!==-1&&(r=r.substring(1+r.substring(0,r.length-1).lastIndexOf("."),r.length-1)),this.traceId=s,this.spanId=r}else this.traceId=zm.w3cTraceId(),this.spanId=zm.w3cTraceId().substr(0,16)}return a(t,"Traceparent"),t.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&e!=="00000000000000000000000000000000"},t.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&e!=="0000000000000000"},t.formatOpenTelemetryTraceFlags=function(e){var r="0"+e.toString(16);return r.substring(r.length-2)},t.prototype.getBackCompatRequestId=function(){return"|".concat(this.traceId,".").concat(this.spanId,".")},t.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},t.prototype.updateSpanId=function(){this.spanId=zm.w3cTraceId().substr(0,16)},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t})();kFn.exports=IEs});var gKt=T((dTd,NFn)=>{"use strict";f();var xEs=(function(){function t(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return a(t,"Tracestate"),t.prototype.toString=function(){var e=this.fieldmap;return!e||e.length==0?null:e.join(", ")},t.validateKeyChars=function(e){var r=e.split("@");if(r.length==2){var n=r[0].trim(),o=r[1].trim(),s=!!n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/),c=!!o.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/);return s&&c}else if(r.length==1)return!!e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/);return!1},t.prototype.parseHeader=function(e){var r=[],n={},o=e.split(",");if(o.length>32)return null;for(var s=0,c=o;s{"use strict";f();var wEs=(function(){function t(){}return a(t,"Domain"),t})();DFn.exports=wEs});var OFn=T((AKt,MFn)=>{"use strict";f();var REs=AKt&&AKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),PEs=Y4(),kEs=(function(t){REs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"AvailabilityData"),e})(PEs);MFn.exports=kEs});var yKt=T((ETd,BFn)=>{"use strict";f();var NEs=(function(){function t(){}return a(t,"Base"),t})();BFn.exports=NEs});var FFn=T((vTd,LFn)=>{"use strict";f();var DEs=(function(){function t(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}return a(t,"ContextTagKeys"),t})();LFn.exports=DEs});var QFn=T((EKt,UFn)=>{"use strict";f();var MEs=EKt&&EKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),OEs=yKt(),BEs=(function(t){MEs(e,t);function e(){return t.call(this)||this}return a(e,"Data"),e})(OEs);UFn.exports=BEs});var _Kt=T((xTd,qFn)=>{"use strict";f();var CKt;(function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"})(CKt||(CKt={}));qFn.exports=CKt});var HFn=T((RTd,GFn)=>{"use strict";f();var LEs=_Kt(),FEs=(function(){function t(){this.kind=LEs.Measurement}return a(t,"DataPoint"),t})();GFn.exports=FEs});var $Fn=T((NTd,jFn)=>{"use strict";f();var UEs=(function(){function t(){this.ver=1,this.sampleRate=100,this.tags={}}return a(t,"Envelope"),t})();jFn.exports=UEs});var bKt=T((vKt,VFn)=>{"use strict";f();var QEs=vKt&&vKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),qEs=Y4(),GEs=(function(t){QEs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"EventData"),e})(qEs);VFn.exports=GEs});var zFn=T((TKt,WFn)=>{"use strict";f();var HEs=TKt&&TKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),jEs=Y4(),$Es=(function(t){HEs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.exceptions=[],r.properties={},r.measurements={},r}return a(e,"ExceptionData"),e})(jEs);WFn.exports=$Es});var KFn=T((UTd,YFn)=>{"use strict";f();var VEs=(function(){function t(){this.hasFullStack=!0,this.parsedStack=[]}return a(t,"ExceptionDetails"),t})();YFn.exports=VEs});var XFn=T((SKt,JFn)=>{"use strict";f();var WEs=SKt&&SKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),zEs=Y4(),YEs=(function(t){WEs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r}return a(e,"MessageData"),e})(zEs);JFn.exports=YEs});var e9n=T((IKt,ZFn)=>{"use strict";f();var KEs=IKt&&IKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),JEs=Y4(),XEs=(function(t){KEs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.metrics=[],r.properties={},r}return a(e,"MetricData"),e})(JEs);ZFn.exports=XEs});var r9n=T((xKt,t9n)=>{"use strict";f();var ZEs=xKt&&xKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),eCs=bKt(),tCs=(function(t){ZEs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"PageViewData"),e})(eCs);t9n.exports=tCs});var i9n=T((wKt,n9n)=>{"use strict";f();var rCs=wKt&&wKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),nCs=Y4(),iCs=(function(t){rCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.success=!0,r.properties={},r.measurements={},r}return a(e,"RemoteDependencyData"),e})(nCs);n9n.exports=iCs});var s9n=T((RKt,o9n)=>{"use strict";f();var oCs=RKt&&RKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),sCs=Y4(),aCs=(function(t){oCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"RequestData"),e})(sCs);o9n.exports=aCs});var c9n=T((XTd,a9n)=>{"use strict";f();var PKt;(function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"})(PKt||(PKt={}));a9n.exports=PKt});var u9n=T((eSd,l9n)=>{"use strict";f();var cCs=(function(){function t(){}return a(t,"StackFrame"),t})();l9n.exports=cCs});var kKt=T(M0=>{"use strict";f();Object.defineProperty(M0,"__esModule",{value:!0});M0.AvailabilityData=OFn();M0.Base=yKt();M0.ContextTagKeys=FFn();M0.Data=QFn();M0.DataPoint=HFn();M0.DataPointType=_Kt();M0.Domain=Y4();M0.Envelope=$Fn();M0.EventData=bKt();M0.ExceptionData=zFn();M0.ExceptionDetails=KFn();M0.MessageData=XFn();M0.MetricData=e9n();M0.PageViewData=r9n();M0.RemoteDependencyData=i9n();M0.RequestData=s9n();M0.SeverityLevel=c9n();M0.StackFrame=u9n()});var d9n=T(ZSe=>{"use strict";f();Object.defineProperty(ZSe,"__esModule",{value:!0});ZSe.RemoteDependencyDataConstants=void 0;ZSe.domainSupportsProperties=uCs;var Mz=kKt(),lCs=(function(){function t(){}return a(t,"RemoteDependencyDataConstants"),t.TYPE_HTTP="Http",t.TYPE_AI="Http (tracked component)",t})();ZSe.RemoteDependencyDataConstants=lCs;function uCs(t){return"properties"in t||t instanceof Mz.EventData||t instanceof Mz.ExceptionData||t instanceof Mz.MessageData||t instanceof Mz.MetricData||t instanceof Mz.PageViewData||t instanceof Mz.RemoteDependencyData||t instanceof Mz.RequestData}a(uCs,"domainSupportsProperties")});var p9n=T(f9n=>{"use strict";f();Object.defineProperty(f9n,"__esModule",{value:!0})});var m9n=T(h9n=>{"use strict";f();Object.defineProperty(h9n,"__esModule",{value:!0})});var A9n=T(g9n=>{"use strict";f();Object.defineProperty(g9n,"__esModule",{value:!0})});var E9n=T(y9n=>{"use strict";f();Object.defineProperty(y9n,"__esModule",{value:!0})});var _9n=T(C9n=>{"use strict";f();Object.defineProperty(C9n,"__esModule",{value:!0})});var b9n=T(v9n=>{"use strict";f();Object.defineProperty(v9n,"__esModule",{value:!0})});var S9n=T(T9n=>{"use strict";f();Object.defineProperty(T9n,"__esModule",{value:!0})});var x9n=T(I9n=>{"use strict";f();Object.defineProperty(I9n,"__esModule",{value:!0})});var R9n=T(w9n=>{"use strict";f();Object.defineProperty(w9n,"__esModule",{value:!0})});var k9n=T(P9n=>{"use strict";f();Object.defineProperty(P9n,"__esModule",{value:!0})});var D9n=T(N9n=>{"use strict";f();Object.defineProperty(N9n,"__esModule",{value:!0})});var O9n=T(M9n=>{"use strict";f();Object.defineProperty(M9n,"__esModule",{value:!0})});var B9n=T(z7=>{"use strict";f();Object.defineProperty(z7,"__esModule",{value:!0});z7.TelemetryType=z7.TelemetryTypeString=void 0;z7.telemetryTypeToBaseType=dCs;z7.baseTypeToTelemetryType=fCs;function dCs(t){switch(t){case Fh.Event:return"EventData";case Fh.Exception:return"ExceptionData";case Fh.Trace:return"MessageData";case Fh.Metric:return"MetricData";case Fh.Request:return"RequestData";case Fh.Dependency:return"RemoteDependencyData";case Fh.Availability:return"AvailabilityData";case Fh.PageView:return"PageViewData"}}a(dCs,"telemetryTypeToBaseType");function fCs(t){switch(t){case"EventData":return Fh.Event;case"ExceptionData":return Fh.Exception;case"MessageData":return Fh.Trace;case"MetricData":return Fh.Metric;case"RequestData":return Fh.Request;case"RemoteDependencyData":return Fh.Dependency;case"AvailabilityData":return Fh.Availability;case"PageViewData":return Fh.PageView}}a(fCs,"baseTypeToTelemetryType");z7.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"};var Fh;(function(t){t[t.Event=0]="Event",t[t.Exception=1]="Exception",t[t.Trace=2]="Trace",t[t.Metric=3]="Metric",t[t.Request=4]="Request",t[t.Dependency=5]="Dependency",t[t.Availability=6]="Availability",t[t.PageView=7]="PageView"})(Fh||(z7.TelemetryType=Fh={}))});var L9n=T(Pp=>{"use strict";f();var pCs=Pp&&Pp.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wv=Pp&&Pp.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pCs(e,t,r)};Object.defineProperty(Pp,"__esModule",{value:!0});Wv(p9n(),Pp);Wv(m9n(),Pp);Wv(A9n(),Pp);Wv(E9n(),Pp);Wv(_9n(),Pp);Wv(b9n(),Pp);Wv(S9n(),Pp);Wv(x9n(),Pp);Wv(R9n(),Pp);Wv(k9n(),Pp);Wv(D9n(),Pp);Wv(O9n(),Pp);Wv(B9n(),Pp)});var U9n=T(F9n=>{"use strict";f();Object.defineProperty(F9n,"__esModule",{value:!0})});var q9n=T(Q9n=>{"use strict";f();Object.defineProperty(Q9n,"__esModule",{value:!0})});var H9n=T(G9n=>{"use strict";f();Object.defineProperty(G9n,"__esModule",{value:!0})});var $9n=T(j9n=>{"use strict";f();Object.defineProperty(j9n,"__esModule",{value:!0})});var W9n=T(V9n=>{"use strict";f();Object.defineProperty(V9n,"__esModule",{value:!0})});var Y9n=T(z9n=>{"use strict";f();Object.defineProperty(z9n,"__esModule",{value:!0})});var J9n=T(K9n=>{"use strict";f();Object.defineProperty(K9n,"__esModule",{value:!0})});var Z9n=T(X9n=>{"use strict";f();Object.defineProperty(X9n,"__esModule",{value:!0})});var e7n=T(r_=>{"use strict";f();var hCs=r_&&r_.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Y7=r_&&r_.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hCs(e,t,r)};Object.defineProperty(r_,"__esModule",{value:!0});Y7(U9n(),r_);Y7(q9n(),r_);Y7(H9n(),r_);Y7($9n(),r_);Y7(W9n(),r_);Y7(Y9n(),r_);Y7(J9n(),r_);Y7(Z9n(),r_)});var dA=T(dD=>{"use strict";f();var mCs=dD&&dD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),utt=dD&&dD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&mCs(e,t,r)};Object.defineProperty(dD,"__esModule",{value:!0});utt(d9n(),dD);utt(kKt(),dD);utt(L9n(),dD);utt(e7n(),dD)});var NKt=T((sId,t7n)=>{"use strict";f();var gCs=(function(){function t(){}return a(t,"RequestParser"),t.prototype.getUrl=function(){return this.url},t.prototype.RequestParser=function(){this.startTime=+new Date},t.prototype._setStatus=function(e,r){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var o=this.properties||{};if(r){if(typeof r=="string")o.error=r;else if(r instanceof Error)o.error=r.message;else if(typeof r=="object")for(var s in r)o[s]=r[s]&&r[s].toString&&r[s].toString()}this.properties=o},t.prototype._isSuccess=function(){return 0{"use strict";f();var eR;Object.defineProperty(Ir,"__esModule",{value:!0});Ir.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=Ir.WEB_INSTRUMENTATION_DEFAULT_SOURCE=Ir.TIME_SINCE_ENQUEUED=Ir.ENQUEUED_TIME=Ir.MessageBusDestination=Ir.MicrosoftEventHub=Ir.AzNamespace=Ir.AttachTypePrefix=Ir.HttpRequestCookieNames=Ir.StatsbeatNetworkCategory=Ir.StatsbeatFeatureType=Ir.StatsbeatInstrumentation=Ir.StatsbeatFeature=Ir.StatsbeatCounter=Ir.StatsbeatAttach=Ir.StatsbeatResourceProvider=Ir.StatsbeatTelemetryName=Ir.HeartBeatMetricName=Ir.DependencyTypeName=Ir.TelemetryTypeStringToQuickPulseDocumentType=Ir.TelemetryTypeStringToQuickPulseType=Ir.QuickPulseType=Ir.QuickPulseDocumentType=Ir.PerformanceToQuickPulseCounter=Ir.MetricId=Ir.PerformanceCounter=Ir.QuickPulseCounter=Ir.DEFAULT_LIVEMETRICS_HOST=Ir.DEFAULT_LIVEMETRICS_ENDPOINT=Ir.DEFAULT_BREEZE_ENDPOINT=Ir.APPLICATION_INSIGHTS_SDK_VERSION=void 0;Ir.APPLICATION_INSIGHTS_SDK_VERSION="2.9.8";Ir.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com";Ir.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com";Ir.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com";var Ym;(function(t){t.COMMITTED_BYTES="\\Memory\\Committed Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",t.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",t.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",t.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",t.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",t.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",t.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"})(Ym||(Ir.QuickPulseCounter=Ym={}));var eIe;(function(t){t.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",t.AVAILABLE_BYTES="\\Memory\\Available Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",t.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",t.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"})(eIe||(Ir.PerformanceCounter=eIe={}));var r7n;(function(t){t.REQUESTS_DURATION="requests/duration",t.DEPENDENCIES_DURATION="dependencies/duration",t.EXCEPTIONS_COUNT="exceptions/count",t.TRACES_COUNT="traces/count"})(r7n||(Ir.MetricId=r7n={}));Ir.PerformanceToQuickPulseCounter=(eR={},eR[eIe.PROCESSOR_TIME]=Ym.PROCESSOR_TIME,eR[eIe.REQUEST_RATE]=Ym.REQUEST_RATE,eR[eIe.REQUEST_DURATION]=Ym.REQUEST_DURATION,eR[Ym.COMMITTED_BYTES]=Ym.COMMITTED_BYTES,eR[Ym.REQUEST_FAILURE_RATE]=Ym.REQUEST_FAILURE_RATE,eR[Ym.DEPENDENCY_RATE]=Ym.DEPENDENCY_RATE,eR[Ym.DEPENDENCY_FAILURE_RATE]=Ym.DEPENDENCY_FAILURE_RATE,eR[Ym.DEPENDENCY_DURATION]=Ym.DEPENDENCY_DURATION,eR[Ym.EXCEPTION_RATE]=Ym.EXCEPTION_RATE,eR);Ir.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"};Ir.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"};Ir.TelemetryTypeStringToQuickPulseType={EventData:Ir.QuickPulseType.Event,ExceptionData:Ir.QuickPulseType.Exception,MessageData:Ir.QuickPulseType.Trace,MetricData:Ir.QuickPulseType.Metric,RequestData:Ir.QuickPulseType.Request,RemoteDependencyData:Ir.QuickPulseType.Dependency,AvailabilityData:Ir.QuickPulseType.Availability,PageViewData:Ir.QuickPulseType.PageView};Ir.TelemetryTypeStringToQuickPulseDocumentType={EventData:Ir.QuickPulseDocumentType.Event,ExceptionData:Ir.QuickPulseDocumentType.Exception,MessageData:Ir.QuickPulseDocumentType.Trace,MetricData:Ir.QuickPulseDocumentType.Metric,RequestData:Ir.QuickPulseDocumentType.Request,RemoteDependencyData:Ir.QuickPulseDocumentType.Dependency,AvailabilityData:Ir.QuickPulseDocumentType.Availability,PageViewData:Ir.QuickPulseDocumentType.PageView};Ir.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"};Ir.HeartBeatMetricName="HeartbeatState";Ir.StatsbeatTelemetryName="Statsbeat";Ir.StatsbeatResourceProvider={appsvc:"appsvc",aks:"aks",functions:"functions",vm:"vm",unknown:"unknown"};Ir.StatsbeatAttach={codeless:"IntegratedAuto",sdk:"Manual"};Ir.StatsbeatCounter={REQUEST_SUCCESS:"Request_Success_Count",REQUEST_FAILURE:"Request_Failure_Count",REQUEST_DURATION:"Request_Duration",RETRY_COUNT:"Retry_Count",THROTTLE_COUNT:"Throttle_Count",EXCEPTION_COUNT:"Exception_Count",ATTACH:"Attach",FEATURE:"Feature"};var n7n;(function(t){t[t.NONE=0]="NONE",t[t.DISK_RETRY=1]="DISK_RETRY",t[t.AAD_HANDLING=2]="AAD_HANDLING",t[t.BROWSER_SDK_LOADER=4]="BROWSER_SDK_LOADER",t[t.LIVE_METRICS=16]="LIVE_METRICS",t[t.NATIVE_METRICS=8192]="NATIVE_METRICS"})(n7n||(Ir.StatsbeatFeature=n7n={}));var i7n;(function(t){t[t.NONE=0]="NONE",t[t.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",t[t.MONGODB=2]="MONGODB",t[t.MYSQL=4]="MYSQL",t[t.REDIS=8]="REDIS",t[t.POSTGRES=16]="POSTGRES",t[t.BUNYAN=32]="BUNYAN",t[t.WINSTON=64]="WINSTON",t[t.CONSOLE=128]="CONSOLE"})(i7n||(Ir.StatsbeatInstrumentation=i7n={}));var o7n;(function(t){t[t.Feature=0]="Feature",t[t.Instrumentation=1]="Instrumentation"})(o7n||(Ir.StatsbeatFeatureType=o7n={}));var s7n;(function(t){t[t.Breeze=0]="Breeze",t[t.Quickpulse=1]="Quickpulse"})(s7n||(Ir.StatsbeatNetworkCategory=s7n={}));var a7n;(function(t){t.SESSION="ai_session",t.USER="ai_user",t.AUTH_USER="ai_authUser"})(a7n||(Ir.HttpRequestCookieNames=a7n={}));var c7n;(function(t){t.INTEGRATED_AUTO="i",t.MANUAL="m"})(c7n||(Ir.AttachTypePrefix=c7n={}));Ir.AzNamespace="az.namespace";Ir.MicrosoftEventHub="Microsoft.EventHub";Ir.MessageBusDestination="message_bus.destination";Ir.ENQUEUED_TIME="enqueuedTime";Ir.TIME_SINCE_ENQUEUED="timeSinceEnqueued";Ir.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai";Ir.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"});var BKt=T((OKt,l7n)=>{"use strict";f();var ACs=OKt&&OKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),dtt=require("url"),yCs=dA(),DKt=Wm(),zv=Kce(),ECs=NKt(),K7=Dz(),CCs=gKt(),MKt=ltt(),_Cs=Kc(),ftt=su(),vCs=(function(t){ACs(e,t);function e(r,n){var o=t.call(this)||this;return r&&(o.method=r.method,o.url=o._getAbsoluteUrl(r),o.startTime=+new Date,o.socketRemoteAddress=r.socket&&r.socket.remoteAddress,o.parseHeaders(r,n),r.connection&&(o.connectionRemoteAddress=r.connection.remoteAddress,o.legacySocketRemoteAddress=r.connection.socket&&r.connection.socket.remoteAddress)),o}return a(e,"HttpRequestParser"),e.prototype.onError=function(r,n){this._setStatus(void 0,r),n&&(this.duration=n)},e.prototype.onResponse=function(r,n){this._setStatus(r.statusCode,void 0),n&&(this.duration=n)},e.prototype.getRequestTelemetry=function(r){var n=this.method;try{n+=" "+new dtt.URL(this.url).pathname}catch{}var o={id:this.requestId,name:n,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(r&&r.time?o.time=r.time:this.startTime&&(o.time=new Date(this.startTime)),r){for(var s in r)o[s]||(o[s]=r[s]);if(r.properties)for(var s in r.properties)o.properties[s]=r.properties[s]}return o},e.prototype.getRequestTags=function(r){var n={};for(var o in r)n[o]=r[o];return n[e.keys.locationIp]=r[e.keys.locationIp]||this._getIp(),n[e.keys.sessionId]=r[e.keys.sessionId]||this._getId(ftt.HttpRequestCookieNames.SESSION),n[e.keys.userId]=r[e.keys.userId]||this._getId(ftt.HttpRequestCookieNames.USER),n[e.keys.userAuthUserId]=r[e.keys.userAuthUserId]||this._getId(ftt.HttpRequestCookieNames.AUTH_USER),n[e.keys.operationName]=this.getOperationName(r),n[e.keys.operationParentId]=this.getOperationParentId(r),n[e.keys.operationId]=this.getOperationId(r),n},e.prototype.getOperationId=function(r){return r[e.keys.operationId]||this.operationId},e.prototype.getOperationParentId=function(r){return r[e.keys.operationParentId]||this.parentId||this.getOperationId(r)},e.prototype.getOperationName=function(r){if(r[e.keys.operationName])return r[e.keys.operationName];var n="";try{n=new dtt.URL(this.url).pathname}catch{}var o=this.method;return n&&(o+=" "+n),o},e.prototype.getRequestId=function(){return this.requestId},e.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},e.prototype.getTraceparent=function(){return this.traceparent},e.prototype.getTracestate=function(){return this.tracestate},e.prototype.getLegacyRootId=function(){return this.legacyRootId},e.prototype._getAbsoluteUrl=function(r){if(!r.headers)return r.url;var n=r.connection?r.connection.encrypted:null,o=n||r.headers["x-forwarded-proto"]=="https"?"https":"http",s=o+"://"+r.headers.host+"/",c="",l="";try{var u=new dtt.URL(r.url,s);c=u.pathname,l=u.search}catch{}var d=dtt.format({protocol:o,host:r.headers.host,pathname:c,search:l});return d},e.prototype._getIp=function(){var r=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,n=a(function(s){var c=r.exec(s);if(c)return c[0]},"check"),o=n(this.rawHeaders["x-forwarded-for"])||n(this.rawHeaders["x-client-ip"])||n(this.rawHeaders["x-real-ip"])||n(this.connectionRemoteAddress)||n(this.socketRemoteAddress)||n(this.legacySocketRemoteAddress);return!o&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&this.connectionRemoteAddress.substr(0,2)==="::"&&(o="127.0.0.1"),o},e.prototype._getId=function(r){var n=this.rawHeaders&&this.rawHeaders.cookie&&typeof this.rawHeaders.cookie=="string"&&this.rawHeaders.cookie||"";if(r===ftt.HttpRequestCookieNames.AUTH_USER)try{n=decodeURI(n)}catch(s){n="",_Cs.warn("Could not decode the auth cookie with error: ",DKt.dumpObj(s))}var o=e.parseId(DKt.getCookie(r,n));return o},e.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},e.prototype.parseHeaders=function(r,n){if(this.rawHeaders=r.headers||r.rawHeaders,this.userAgent=r.headers&&r.headers["user-agent"],this.sourceCorrelationId=DKt.getCorrelationContextTarget(r,zv.requestContextSourceKey),r.headers){var o=r.headers[zv.traceStateHeader]?r.headers[zv.traceStateHeader].toString():null,s=r.headers[zv.traceparentHeader]?r.headers[zv.traceparentHeader].toString():null,c=r.headers[zv.requestIdHeader]?r.headers[zv.requestIdHeader].toString():null,l=r.headers[zv.parentIdHeader]?r.headers[zv.parentIdHeader].toString():null,u=r.headers[zv.rootIdHeader]?r.headers[zv.rootIdHeader].toString():null;this.correlationContextHeader=r.headers[zv.correlationContextHeader]?r.headers[zv.correlationContextHeader].toString():null,K7.w3cEnabled&&(s||o)?(this.traceparent=new MKt(s?s.toString():null),this.tracestate=s&&o&&new CCs(o?o.toString():null),this.setBackCompatFromThisTraceContext()):c?K7.w3cEnabled?(this.traceparent=new MKt(null,c),this.setBackCompatFromThisTraceContext()):(this.parentId=c,this.requestId=K7.generateRequestId(this.parentId),this.operationId=K7.getRootId(this.requestId)):K7.w3cEnabled?(this.traceparent=new MKt,this.traceparent.parentId=l,this.traceparent.legacyRootId=u||l,this.setBackCompatFromThisTraceContext()):(this.parentId=l,this.requestId=K7.generateRequestId(u||this.parentId),this.correlationContextHeader=null,this.operationId=K7.getRootId(this.requestId)),n&&(this.requestId=n,this.operationId=K7.getRootId(this.requestId))}},e.parseId=function(r){var n=r.split("|");return n.length>0?n[0]:""},e.keys=new yCs.ContextTagKeys,e})(ECs);l7n.exports=vCs});var I7n=T((Wi,S7n)=>{f();Wi=S7n.exports=Hs;var uc;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?uc=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):uc=a(function(){},"debug");Wi.SEMVER_SPEC_VERSION="2.0.0";var tIe=256,ptt=Number.MAX_SAFE_INTEGER||9007199254740991,LKt=16,bCs=tIe-6,rIe=Wi.re=[],bl=Wi.safeRe=[],$t=Wi.src=[],Ps=0,GKt="[a-zA-Z0-9-]",FKt=[["\\s",1],["\\d",tIe],[GKt,bCs]];function Ett(t){for(var e=0;e)?=?)";var htt=Ps++;$t[htt]=$t[Zce]+"|x|X|\\*";var mtt=Ps++;$t[mtt]=$t[Xce]+"|x|X|\\*";var Oz=Ps++;$t[Oz]="[v=\\s]*("+$t[mtt]+")(?:\\.("+$t[mtt]+")(?:\\.("+$t[mtt]+")(?:"+$t[jKt]+")?"+$t[iIe]+"?)?)?";var tle=Ps++;$t[tle]="[v=\\s]*("+$t[htt]+")(?:\\.("+$t[htt]+")(?:\\.("+$t[htt]+")(?:"+$t[$Kt]+")?"+$t[iIe]+"?)?)?";var h7n=Ps++;$t[h7n]="^"+$t[ile]+"\\s*"+$t[Oz]+"$";var m7n=Ps++;$t[m7n]="^"+$t[ile]+"\\s*"+$t[tle]+"$";var g7n=Ps++;$t[g7n]="(?:^|[^\\d])(\\d{1,"+LKt+"})(?:\\.(\\d{1,"+LKt+"}))?(?:\\.(\\d{1,"+LKt+"}))?(?:$|[^\\d])";var Ctt=Ps++;$t[Ctt]="(?:~>?)";var rle=Ps++;$t[rle]="(\\s*)"+$t[Ctt]+"\\s+";rIe[rle]=new RegExp($t[rle],"g");bl[rle]=new RegExp(Ett($t[rle]),"g");var TCs="$1~",A7n=Ps++;$t[A7n]="^"+$t[Ctt]+$t[Oz]+"$";var y7n=Ps++;$t[y7n]="^"+$t[Ctt]+$t[tle]+"$";var _tt=Ps++;$t[_tt]="(?:\\^)";var nle=Ps++;$t[nle]="(\\s*)"+$t[_tt]+"\\s+";rIe[nle]=new RegExp($t[nle],"g");bl[nle]=new RegExp(Ett($t[nle]),"g");var SCs="$1^",E7n=Ps++;$t[E7n]="^"+$t[_tt]+$t[Oz]+"$";var C7n=Ps++;$t[C7n]="^"+$t[_tt]+$t[tle]+"$";var YKt=Ps++;$t[YKt]="^"+$t[ile]+"\\s*("+WKt+")$|^$";var KKt=Ps++;$t[KKt]="^"+$t[ile]+"\\s*("+p7n+")$|^$";var Bz=Ps++;$t[Bz]="(\\s*)"+$t[ile]+"\\s*("+WKt+"|"+$t[Oz]+")";rIe[Bz]=new RegExp($t[Bz],"g");bl[Bz]=new RegExp(Ett($t[Bz]),"g");var ICs="$1$2$3",_7n=Ps++;$t[_7n]="^\\s*("+$t[Oz]+")\\s+-\\s+("+$t[Oz]+")\\s*$";var v7n=Ps++;$t[v7n]="^\\s*("+$t[tle]+")\\s+-\\s+("+$t[tle]+")\\s*$";var b7n=Ps++;$t[b7n]="(<|>)?=?\\s*\\*";for(fD=0;fDtIe)return null;var r=e.loose?bl[zKt]:bl[VKt];if(!r.test(t))return null;try{return new Hs(t,e)}catch{return null}}a(Lz,"parse");Wi.valid=xCs;function xCs(t,e){var r=Lz(t,e);return r?r.version:null}a(xCs,"valid");Wi.clean=wCs;function wCs(t,e){var r=Lz(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}a(wCs,"clean");Wi.SemVer=Hs;function Hs(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Hs){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>tIe)throw new TypeError("version is longer than "+tIe+" characters");if(!(this instanceof Hs))return new Hs(t,e);uc("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?bl[zKt]:bl[VKt]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ptt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ptt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ptt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var o=+n;if(o>=0&&o=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};Wi.inc=RCs;function RCs(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new Hs(t,r).inc(e,n).version}catch{return null}}a(RCs,"inc");Wi.diff=PCs;function PCs(t,e){if(JKt(t,e))return null;var r=Lz(t),n=Lz(e),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return o+c;return s}a(PCs,"diff");Wi.compareIdentifiers=ele;var u7n=/^[0-9]+$/;function ele(t,e){var r=u7n.test(t),n=u7n.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t0}a(nIe,"gt");Wi.lt=gtt;function gtt(t,e,r){return K4(t,e,r)<0}a(gtt,"lt");Wi.eq=JKt;function JKt(t,e,r){return K4(t,e,r)===0}a(JKt,"eq");Wi.neq=T7n;function T7n(t,e,r){return K4(t,e,r)!==0}a(T7n,"neq");Wi.gte=XKt;function XKt(t,e,r){return K4(t,e,r)>=0}a(XKt,"gte");Wi.lte=ZKt;function ZKt(t,e,r){return K4(t,e,r)<=0}a(ZKt,"lte");Wi.cmp=Att;function Att(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return JKt(t,r,n);case"!=":return T7n(t,r,n);case">":return nIe(t,r,n);case">=":return XKt(t,r,n);case"<":return gtt(t,r,n);case"<=":return ZKt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}a(Att,"cmp");Wi.Comparator=FS;function FS(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof FS){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof FS))return new FS(t,e);t=t.trim().split(/\s+/).join(" "),uc("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===oIe?this.value="":this.value=this.operator+this.semver.version,uc("comp",this)}a(FS,"Comparator");var oIe={};FS.prototype.parse=function(t){var e=this.options.loose?bl[YKt]:bl[KKt],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new Hs(r[2],this.options.loose):this.semver=oIe};FS.prototype.toString=function(){return this.value};FS.prototype.test=function(t){return uc("Comparator.test",t,this.options.loose),this.semver===oIe?!0:(typeof t=="string"&&(t=new Hs(t,this.options)),Att(t,this.operator,this.semver,this.options))};FS.prototype.intersects=function(t,e){if(!(t instanceof FS))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return r=new ld(t.value,e),ytt(this.value,r,e);if(t.operator==="")return r=new ld(this.value,e),ytt(t.semver,r,e);var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),s=this.semver.version===t.semver.version,c=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),l=Att(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=Att(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||s&&c||l||u};Wi.Range=ld;function ld(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof ld)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new ld(t.raw,e);if(t instanceof FS)return new ld(t.value,e);if(!(this instanceof ld))return new ld(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}a(ld,"Range");ld.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};ld.prototype.toString=function(){return this.range};ld.prototype.parseRange=function(t){var e=this.options.loose,r=e?bl[v7n]:bl[_7n];t=t.replace(r,zCs),uc("hyphen replace",t),t=t.replace(bl[Bz],ICs),uc("comparator trim",t,bl[Bz]),t=t.replace(bl[rle],TCs),t=t.replace(bl[nle],SCs);var n=e?bl[YKt]:bl[KKt],o=t.split(" ").map(function(s){return QCs(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(s){return!!s.match(n)})),o=o.map(function(s){return new FS(s,this.options)},this),o};ld.prototype.intersects=function(t,e){if(!(t instanceof ld))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(n){return t.set.some(function(o){return o.every(function(s){return n.intersects(s,e)})})})})};Wi.toComparators=UCs;function UCs(t,e){return new ld(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}a(UCs,"toComparators");function QCs(t,e){return uc("comp",t,e),t=HCs(t,e),uc("caret",t),t=qCs(t,e),uc("tildes",t),t=$Cs(t,e),uc("xrange",t),t=WCs(t,e),uc("stars",t),t}a(QCs,"parseComparator");function Fy(t){return!t||t.toLowerCase()==="x"||t==="*"}a(Fy,"isX");function qCs(t,e){return t.trim().split(/\s+/).map(function(r){return GCs(r,e)}).join(" ")}a(qCs,"replaceTildes");function GCs(t,e){var r=e.loose?bl[y7n]:bl[A7n];return t.replace(r,function(n,o,s,c,l){uc("tilde",t,n,o,s,c,l);var u;return Fy(o)?u="":Fy(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Fy(c)?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":l?(uc("replaceTilde pr",l),u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0"):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0",uc("tilde return",u),u})}a(GCs,"replaceTilde");function HCs(t,e){return t.trim().split(/\s+/).map(function(r){return jCs(r,e)}).join(" ")}a(HCs,"replaceCarets");function jCs(t,e){uc("caret",t,e);var r=e.loose?bl[C7n]:bl[E7n];return t.replace(r,function(n,o,s,c,l){uc("caret",t,n,o,s,c,l);var u;return Fy(o)?u="":Fy(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Fy(c)?o==="0"?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+".0 <"+(+o+1)+".0.0":l?(uc("replaceCaret pr",l),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+"-"+l+" <"+(+o+1)+".0.0"):(uc("no pr"),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+" <"+(+o+1)+".0.0"),uc("caret return",u),u})}a(jCs,"replaceCaret");function $Cs(t,e){return uc("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return VCs(r,e)}).join(" ")}a($Cs,"replaceXRanges");function VCs(t,e){t=t.trim();var r=e.loose?bl[m7n]:bl[h7n];return t.replace(r,function(n,o,s,c,l,u){uc("xRange",t,n,o,s,c,l,u);var d=Fy(s),p=d||Fy(c),h=p||Fy(l),m=h;return o==="="&&m&&(o=""),d?o===">"||o==="<"?n="<0.0.0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),n=o+s+"."+c+"."+l):p?n=">="+s+".0.0 <"+(+s+1)+".0.0":h&&(n=">="+s+"."+c+".0 <"+s+"."+(+c+1)+".0"),uc("xRange return",n),n})}a(VCs,"replaceXRange");function WCs(t,e){return uc("replaceStars",t,e),t.trim().replace(bl[b7n],"")}a(WCs,"replaceStars");function zCs(t,e,r,n,o,s,c,l,u,d,p,h,m){return Fy(r)?e="":Fy(n)?e=">="+r+".0.0":Fy(o)?e=">="+r+"."+n+".0":e=">="+e,Fy(u)?l="":Fy(d)?l="<"+(+u+1)+".0.0":Fy(p)?l="<"+u+"."+(+d+1)+".0":h?l="<="+u+"."+d+"."+p+"-"+h:l="<="+l,(e+" "+l).trim()}a(zCs,"hyphenReplace");ld.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new Hs(t,this.options));for(var e=0;e0){var o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}a(YCs,"testSet");Wi.satisfies=ytt;function ytt(t,e,r){try{e=new ld(e,r)}catch{return!1}return e.test(t)}a(ytt,"satisfies");Wi.maxSatisfying=KCs;function KCs(t,e,r){var n=null,o=null;try{var s=new ld(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new Hs(n,r))}),n}a(KCs,"maxSatisfying");Wi.minSatisfying=JCs;function JCs(t,e,r){var n=null,o=null;try{var s=new ld(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new Hs(n,r))}),n}a(JCs,"minSatisfying");Wi.minVersion=XCs;function XCs(t,e){t=new ld(t,e);var r=new Hs("0.0.0");if(t.test(r)||(r=new Hs("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!r||nIe(r,c))&&(r=c);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}})}return r&&t.test(r)?r:null}a(XCs,"minVersion");Wi.validRange=ZCs;function ZCs(t,e){try{return new ld(t,e).range||"*"}catch{return null}}a(ZCs,"validRange");Wi.ltr=e_s;function e_s(t,e,r){return eJt(t,e,"<",r)}a(e_s,"ltr");Wi.gtr=t_s;function t_s(t,e,r){return eJt(t,e,">",r)}a(t_s,"gtr");Wi.outside=eJt;function eJt(t,e,r,n){t=new Hs(t,n),e=new ld(e,n);var o,s,c,l,u;switch(r){case">":o=nIe,s=ZKt,c=gtt,l=">",u=">=";break;case"<":o=gtt,s=XKt,c=nIe,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ytt(t,e,n))return!1;for(var d=0;d=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0}a(eJt,"outside");Wi.prerelease=r_s;function r_s(t,e){var r=Lz(t,e);return r&&r.prerelease.length?r.prerelease:null}a(r_s,"prerelease");Wi.intersects=n_s;function n_s(t,e,r){return t=new ld(t,r),e=new ld(e,r),t.intersects(e)}a(n_s,"intersects");Wi.coerce=i_s;function i_s(t){if(t instanceof Hs)return t;if(typeof t!="string")return null;var e=t.match(bl[g7n]);return e==null?null:Lz(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}a(i_s,"coerce")});var Ttt=T((mId,P7n)=>{"use strict";f();var w7n=Lce(),ole=w7n.wrap,vtt=w7n.unwrap,J4="wrap@before";function btt(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}a(btt,"defineProperty");function o_s(t,e){for(var r=e.length,n=0;n0&&o_s(t,o)}a(s_s,"_findAndProcess");function x7n(t,e){if(t){var r=t;if(typeof t=="function")r=e(t);else if(Array.isArray(t)){r=[];for(var n=0;n{"use strict";f();var Ua=require("util"),X4=require("assert"),a_s=Ttt(),au=require("async_hooks"),sIe="cls@contexts",aIe="error@context",ud=process.env.DEBUG_CLS_HOOKED,Fa=-1;D7n.exports={getNamespace:k7n,createNamespace:c_s,destroyNamespace:N7n,reset:l_s,ERROR_SYMBOL:aIe};function US(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}a(US,"Namespace");US.prototype.set=a(function(e,r){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");if(this.active[e]=r,ud){let n=" ".repeat(this._indent<0?0:this._indent);Uu(n+"CONTEXT-SET KEY:"+e+"="+r+" in ns:"+this.name+" currentUid:"+Fa+" active:"+Ua.inspect(this.active,{showHidden:!0,depth:2,colors:!0}))}return r},"set");US.prototype.get=a(function(e){if(!this.active){if(ud){let r=au.currentId(),n=au.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Uu(`${o}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${Fa} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length}`)}return}if(ud){let r=au.executionAsyncId(),n=au.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Uu(o+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+Fa+" active:"+Ua.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),Uu(`${o}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${Fa} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length} active:${Ua.inspect(this.active)}`)}return this.active[e]},"get");US.prototype.createContext=a(function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=Fa,ud){let r=au.executionAsyncId(),n=au.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Uu(`${o}CONTEXT-CREATED Context: (${this.name}) currentUid:${Fa} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length} context:${Ua.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},"createContext");US.prototype.run=a(function(e){let r=this.createContext();this.enter(r);try{if(ud){let n=au.triggerAsyncId(),o=au.executionAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Uu(`${s}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${Fa} triggerId:${n} asyncHooksCurrentId:${o} len:${this._set.length} context:${Ua.inspect(r)}`)}return e(r),r}catch(n){throw n&&(n[aIe]=r),n}finally{if(ud){let n=au.triggerAsyncId(),o=au.executionAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Uu(`${s}CONTEXT-RUN END: (${this.name}) currentUid:${Fa} triggerId:${n} asyncHooksCurrentId:${o} len:${this._set.length} ${Ua.inspect(r)}`)}this.exit(r)}},"run");US.prototype.runAndReturn=a(function(e){let r;return this.run(function(n){r=e(n)}),r},"runAndReturn");US.prototype.runPromise=a(function(e){let r=this.createContext();this.enter(r);let n=e(r);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return ud&&Uu("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+Fa+" len:"+this._set.length+" "+Ua.inspect(r)),n.then(o=>(ud&&Uu("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+Fa+" len:"+this._set.length+" "+Ua.inspect(r)),this.exit(r),o)).catch(o=>{throw o[aIe]=r,ud&&Uu("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+Fa+" len:"+this._set.length+" "+Ua.inspect(r)),this.exit(r),o})},"runPromise");US.prototype.bind=a(function(e,r){r||(this.active?r=this.active:r=this.createContext());let n=this;return a(function(){n.enter(r);try{return e.apply(this,arguments)}catch(s){throw s&&(s[aIe]=r),s}finally{n.exit(r)}},"clsBind")},"bindFactory");US.prototype.enter=a(function(e){if(X4.ok(e,"context must be provided for entering"),ud){let r=au.executionAsyncId(),n=au.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Uu(`${o}CONTEXT-ENTER: (${this.name}) currentUid:${Fa} triggerId:${n} asyncHooksCurrentId:${r} len:${this._set.length} ${Ua.inspect(e)}`)}this._set.push(this.active),this.active=e},"enter");US.prototype.exit=a(function(e){if(X4.ok(e,"context must be provided for exiting"),ud){let n=au.executionAsyncId(),o=au.triggerAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Uu(`${s}CONTEXT-EXIT: (${this.name}) currentUid:${Fa} triggerId:${o} asyncHooksCurrentId:${n} len:${this._set.length} ${Ua.inspect(e)}`)}if(this.active===e){X4.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let r=this._set.lastIndexOf(e);r<0?(ud&&Uu("??ERROR?? context exiting but not entered - ignoring: "+Ua.inspect(e)),X4.ok(r>=0,`context not currently entered; can't exit. -`+Ua.inspect(this)+` -`+Ua.inspect(e))):(X4.ok(r,"can't remove top context"),this._set.splice(r,1))},"exit");US.prototype.bindEmitter=a(function(e){X4.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let r=this,n="context@"+this.name;function o(c){c&&(c[sIe]||(c[sIe]=Object.create(null)),c[sIe][n]={namespace:r,context:r.active})}a(o,"attach");function s(c){if(!(c&&c[sIe]))return c;let l=c,u=c[sIe];return Object.keys(u).forEach(function(d){let p=u[d];l=p.namespace.bind(l,p.context)}),l}a(s,"bind"),a_s(e,o,s)},"bindEmitter");US.prototype.fromException=a(function(e){return e[aIe]},"fromException");function k7n(t){return process.namespaces[t]}a(k7n,"getNamespace");function c_s(t){X4.ok(t,"namespace must be given a name."),ud&&Uu(`NS-CREATING NAMESPACE (${t})`);let e=new US(t);return e.id=Fa,au.createHook({init(n,o,s,c){if(Fa=au.executionAsyncId(),e.active){if(e._contexts.set(n,e.active),ud){let l=" ".repeat(e._indent<0?0:e._indent);Uu(`${l}INIT [${o}] (${t}) asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}else if(Fa===0){let l=au.triggerAsyncId(),u=e._contexts.get(l);if(u){if(e._contexts.set(n,u),ud){let d=" ".repeat(e._indent<0?0:e._indent);Uu(`${d}INIT USING CONTEXT FROM TRIGGERID [${o}] (${t}) asyncId:${n} currentUid:${Fa} triggerId:${l} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}else if(ud){let d=" ".repeat(e._indent<0?0:e._indent);Uu(`${d}INIT MISSING CONTEXT [${o}] (${t}) asyncId:${n} currentUid:${Fa} triggerId:${l} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}if(ud&&o==="PROMISE"){Uu(Ua.inspect(c,{showHidden:!0}));let l=c.parentId,u=" ".repeat(e._indent<0?0:e._indent);Uu(`${u}INIT RESOURCE-PROMISE [${o}] (${t}) parentId:${l} asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}},before(n){Fa=au.executionAsyncId();let o;if(o=e._contexts.get(n)||e._contexts.get(Fa),o){if(ud){let s=au.triggerAsyncId(),c=" ".repeat(e._indent<0?0:e._indent);Uu(`${c}BEFORE (${t}) asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ua.inspect(o)}`),e._indent+=2}e.enter(o)}else if(ud){let s=au.triggerAsyncId(),c=" ".repeat(e._indent<0?0:e._indent);Uu(`${c}BEFORE MISSING CONTEXT (${t}) asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${Ua.inspect(e._contexts,{showHidden:!0,depth:2,colors:!0})}`),e._indent+=2}},after(n){Fa=au.executionAsyncId();let o;if(o=e._contexts.get(n)||e._contexts.get(Fa),o){if(ud){let s=au.triggerAsyncId();e._indent-=2;let c=" ".repeat(e._indent<0?0:e._indent);Uu(`${c}AFTER (${t}) asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ua.inspect(o)}`)}e.exit(o)}else if(ud){let s=au.triggerAsyncId();e._indent-=2;let c=" ".repeat(e._indent<0?0:e._indent);Uu(`${c}AFTER MISSING CONTEXT (${t}) asyncId:${n} currentUid:${Fa} triggerId:${s} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ua.inspect(o)}`)}},destroy(n){if(Fa=au.executionAsyncId(),ud){let o=au.triggerAsyncId(),s=" ".repeat(e._indent<0?0:e._indent);Uu(`${s}DESTROY (${t}) currentUid:${Fa} asyncId:${n} triggerId:${o} active:${Ua.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ua.inspect(e._contexts.get(Fa))}`)}e._contexts.delete(n)}}).enable(),process.namespaces[t]=e,e}a(c_s,"createNamespace");function N7n(t){let e=k7n(t);X4.ok(e,`can't delete nonexistent namespace! "`+t+'"'),X4.ok(e.id,"don't assign to process.namespaces directly! "+Ua.inspect(e)),process.namespaces[t]=null}a(N7n,"destroyNamespace");function l_s(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){N7n(t)}),process.namespaces=Object.create(null)}a(l_s,"reset");process.namespaces={};function Uu(...t){ud&&process._rawDebug(`${Ua.format(...t)}`)}a(Uu,"debug2")});var B7n=T((_Id,O7n)=>{"use strict";f();function u_s(){}a(u_s,"NextTickWrap");O7n.exports=a(function(){let e=this._hooks,r=this._state,n=process.nextTick;process.nextTick=function(){if(!r.enabled)return n.apply(process,arguments);let o=new Array(arguments.length);for(let u=0;u0&&process.once("uncaughtException",function(){e.post.call(c,l,!0),e.destroy.call(null,l)})}e.post.call(c,l,!1),e.destroy.call(null,l)},n.apply(process,o)}},"patch")});var F7n=T((TId,L7n)=>{"use strict";f();function d_s(){}a(d_s,"PromiseWrap");L7n.exports=a(function(){let e=this._hooks,r=this._state,n=global.Promise,o=n.prototype.then;n.prototype.then=u;function s(d,p,h,m){return typeof d!="function"?m?c(h):l(h):a(function(){e.pre.call(p,h);try{return d.apply(this,arguments)}finally{e.post.call(p,h,!1),e.destroy.call(null,h)}},"wrappedHandler")}a(s,"makeWrappedHandler");function c(d){return a(function(h){return e.destroy.call(null,d),h},"unhandledResolutionHandler")}a(c,"makeUnhandledResolutionHandler");function l(d){return a(function(h){throw e.destroy.call(null,d),h},"unhandledRejectedHandler")}a(l,"makeUnhandledRejectionHandler");function u(d,p){if(!r.enabled)return o.call(this,d,p);let h=new d_s,m=--r.counter;return e.init.call(h,m,0,null,null),o.call(this,s(d,h,m,!0),s(p,h,m,!1))}a(u,"wrappedThen")},"patchPromise")});var Q7n=T((xId,U7n)=>{"use strict";f();var Yv=require("timers");function f_s(){}a(f_s,"TimeoutWrap");function p_s(){}a(p_s,"IntervalWrap");function h_s(){}a(h_s,"ImmediateWrap");var m_s=new Map,g_s=new Map,A_s=new Map,tJt=null,rJt=!1;U7n.exports=a(function(){nJt(this._hooks,this._state,"setTimeout","clearTimeout",f_s,m_s,!0),nJt(this._hooks,this._state,"setInterval","clearInterval",p_s,g_s,!1),nJt(this._hooks,this._state,"setImmediate","clearImmediate",h_s,A_s,!0),global.setTimeout=Yv.setTimeout,global.setInterval=Yv.setInterval,global.setImmediate=Yv.setImmediate,global.clearTimeout=Yv.clearTimeout,global.clearInterval=Yv.clearInterval,global.clearImmediate=Yv.clearImmediate},"patch");function nJt(t,e,r,n,o,s,c){let l=Yv[r],u=Yv[n];Yv[r]=function(){if(!e.enabled)return l.apply(Yv,arguments);let d=new Array(arguments.length);for(let A=0;A0&&process.once("uncaughtException",function(){t.post.call(h,m,!0),s.delete(g),t.destroy.call(null,m)})}t.post.call(h,m,!1),tJt=null,(c||rJt)&&(rJt=!1,s.delete(g),t.destroy.call(null,m))},g=l.apply(Yv,d),s.set(g,m),g},Yv[n]=function(d){if(tJt===d&&d!==null)rJt=!0;else if(s.has(d)){let p=s.get(d);s.delete(d),t.destroy.call(null,p)}u.apply(Yv,arguments)}}a(nJt,"patchTimer")});var iJt=T((PId,y_s)=>{y_s.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen ",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}});var H7n=T((kId,G7n)=>{"use strict";f();var lIe=process.binding("async_wrap"),E_s=lIe.Providers.TIMERWRAP,q7n={nextTick:B7n(),promise:F7n(),timers:Q7n()},cIe=new Set;function C_s(){this.enabled=!1,this.counter=0}a(C_s,"State");function oJt(){let t=this.initFns=[],e=this.preFns=[],r=this.postFns=[],n=this.destroyFns=[];this.init=function(o,s,c,l){if(s===E_s){cIe.add(o);return}for(let u of t)u(o,this,s,c,l)},this.pre=function(o){if(!cIe.has(o))for(let s of e)s(o,this)},this.post=function(o,s){if(!cIe.has(o))for(let c of r)c(o,this,s)},this.destroy=function(o){if(cIe.has(o)){cIe.delete(o);return}for(let s of n)s(o)}}a(oJt,"Hooks");oJt.prototype.add=function(t){t.init&&this.initFns.push(t.init),t.pre&&this.preFns.push(t.pre),t.post&&this.postFns.push(t.post),t.destroy&&this.destroyFns.push(t.destroy)};function Stt(t,e){let r=t.indexOf(e);r!==-1&&t.splice(r,1)}a(Stt,"removeElement");oJt.prototype.remove=function(t){t.init&&Stt(this.initFns,t.init),t.pre&&Stt(this.preFns,t.pre),t.post&&Stt(this.postFns,t.post),t.destroy&&Stt(this.destroyFns,t.destroy)};function uIe(){this._state=new C_s,this._hooks=new oJt,this.version=iJt().version,this.providers=lIe.Providers;for(let t of Object.keys(q7n))q7n[t].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),lIe.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a(uIe,"AsyncHook");G7n.exports=uIe;uIe.prototype.addHooks=function(t){this._hooks.add(t)};uIe.prototype.removeHooks=function(t){this._hooks.remove(t)};uIe.prototype.enable=function(){this._state.enabled=!0,lIe.enable()};uIe.prototype.disable=function(){this._state.enabled=!1,lIe.disable()}});var sJt=T((MId,__s)=>{__s.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen ",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}});var $7n=T((OId,j7n)=>{f();function v_s(t){try{return Error.prototype.toString.call(t)}catch(e){try{return""}catch{return""}}}a(v_s,"FormatErrorString");j7n.exports=a(function(e,r){var n=[];n.push(v_s(e));for(var o=0;o"}catch{c=""}}n.push(" at "+c)}return n.join(` -`)},"FormatStackTrace")});var Y7n=T((FId,z7n)=>{f();var Itt=$7n();function W7n(){this.extend=new dIe,this.filter=new dIe,this.format=new fIe,this.version=sJt().version}a(W7n,"stackChain");var cJt=!1;W7n.prototype.callSite=a(function t(e){e||(e={}),cJt=!0;var r={};Error.captureStackTrace(r,t);var n=r.stack;return cJt=!1,n=n.slice(e.slice||0),e.extend&&(n=this.extend._modify(r,n)),e.filter&&(n=this.filter._modify(r,n)),n},"collectCallSites");var J7=new W7n;function dIe(){this._modifiers=[]}a(dIe,"TraceModifier");dIe.prototype._modify=function(t,e){for(var r=0,n=this._modifiers.length;r{f();if(global._stackChain)if(global._stackChain.version===sJt().version)lJt.exports=global._stackChain;else throw new Error("Conflicting version of stack-chain found");else lJt.exports=global._stackChain=Y7n()});var K7n=T((HId,dJt)=>{"use strict";f();var T_s=H7n();if(global._asyncHook)if(global._asyncHook.version===iJt().version)dJt.exports=global._asyncHook;else throw new Error("Conflicting version of async-hook-jl found");else uJt().filter.attach(function(e,r){return r.filter(function(n){let o=n.getFileName();return!(o&&o.slice(0,__dirname.length)===__dirname)})}),dJt.exports=global._asyncHook=new T_s});var rUn=T(($Id,tUn)=>{"use strict";f();var Mf=require("util"),Z4=require("assert"),S_s=Ttt(),sle=K7n(),pIe="cls@contexts",hIe="error@context",X7n=[];for(let t in sle.providers)X7n[sle.providers[t]]=t;var Zd=process.env.DEBUG_CLS_HOOKED,O0=-1;tUn.exports={getNamespace:Z7n,createNamespace:I_s,destroyNamespace:eUn,reset:x_s,ERROR_SYMBOL:hIe};function QS(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map}a(QS,"Namespace");QS.prototype.set=a(function(e,r){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return Zd&&Df(" SETTING KEY:"+e+"="+r+" in ns:"+this.name+" uid:"+O0+" active:"+Mf.inspect(this.active,!0)),this.active[e]=r,r},"set");QS.prototype.get=a(function(e){if(!this.active){Zd&&Df(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+O0+" active:"+Mf.inspect(this.active,!0));return}return Zd&&Df(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+O0+" active:"+Mf.inspect(this.active,!0)),this.active[e]},"get");QS.prototype.createContext=a(function(){Zd&&Df(" CREATING Context: "+this.name+" uid:"+O0+" len:"+this._set.length+" active:"+Mf.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=O0,Zd&&Df(" CREATED Context: "+this.name+" uid:"+O0+" len:"+this._set.length+" context:"+Mf.inspect(e,!0,2,!0)),e},"createContext");QS.prototype.run=a(function(e){let r=this.createContext();this.enter(r);try{return Zd&&Df(" BEFORE RUN: "+this.name+" uid:"+O0+" len:"+this._set.length+" "+Mf.inspect(r)),e(r),r}catch(n){throw n&&(n[hIe]=r),n}finally{Zd&&Df(" AFTER RUN: "+this.name+" uid:"+O0+" len:"+this._set.length+" "+Mf.inspect(r)),this.exit(r)}},"run");QS.prototype.runAndReturn=a(function(e){var r;return this.run(function(n){r=e(n)}),r},"runAndReturn");QS.prototype.runPromise=a(function(e){let r=this.createContext();this.enter(r);let n=e(r);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return Zd&&Df(" BEFORE runPromise: "+this.name+" uid:"+O0+" len:"+this._set.length+" "+Mf.inspect(r)),n.then(o=>(Zd&&Df(" AFTER runPromise: "+this.name+" uid:"+O0+" len:"+this._set.length+" "+Mf.inspect(r)),this.exit(r),o)).catch(o=>{throw o[hIe]=r,Zd&&Df(" AFTER runPromise: "+this.name+" uid:"+O0+" len:"+this._set.length+" "+Mf.inspect(r)),this.exit(r),o})},"runPromise");QS.prototype.bind=a(function(e,r){r||(this.active?r=this.active:r=this.createContext());let n=this;return a(function(){n.enter(r);try{return e.apply(this,arguments)}catch(s){throw s&&(s[hIe]=r),s}finally{n.exit(r)}},"clsBind")},"bindFactory");QS.prototype.enter=a(function(e){Z4.ok(e,"context must be provided for entering"),Zd&&Df(" ENTER "+this.name+" uid:"+O0+" len:"+this._set.length+" context: "+Mf.inspect(e)),this._set.push(this.active),this.active=e},"enter");QS.prototype.exit=a(function(e){if(Z4.ok(e,"context must be provided for exiting"),Zd&&Df(" EXIT "+this.name+" uid:"+O0+" len:"+this._set.length+" context: "+Mf.inspect(e)),this.active===e){Z4.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let r=this._set.lastIndexOf(e);r<0?(Zd&&Df("??ERROR?? context exiting but not entered - ignoring: "+Mf.inspect(e)),Z4.ok(r>=0,`context not currently entered; can't exit. -`+Mf.inspect(this)+` -`+Mf.inspect(e))):(Z4.ok(r,"can't remove top context"),this._set.splice(r,1))},"exit");QS.prototype.bindEmitter=a(function(e){Z4.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let r=this,n="context@"+this.name;function o(c){c&&(c[pIe]||(c[pIe]=Object.create(null)),c[pIe][n]={namespace:r,context:r.active})}a(o,"attach");function s(c){if(!(c&&c[pIe]))return c;let l=c,u=c[pIe];return Object.keys(u).forEach(function(d){let p=u[d];l=p.namespace.bind(l,p.context)}),l}a(s,"bind"),S_s(e,o,s)},"bindEmitter");QS.prototype.fromException=a(function(e){return e[hIe]},"fromException");function Z7n(t){return process.namespaces[t]}a(Z7n,"getNamespace");function I_s(t){Z4.ok(t,"namespace must be given a name."),Zd&&Df("CREATING NAMESPACE "+t);let e=new QS(t);return e.id=O0,sle.addHooks({init(r,n,o,s,c){O0=r,s?(e._contexts.set(r,e._contexts.get(s)),Zd&&Df("PARENTID: "+t+" uid:"+r+" parent:"+s+" provider:"+o)):e._contexts.set(O0,e.active),Zd&&Df("INIT "+t+" uid:"+r+" parent:"+s+" provider:"+X7n[o]+" active:"+Mf.inspect(e.active,!0))},pre(r,n){O0=r;let o=e._contexts.get(r);o?(Zd&&Df(" PRE "+t+" uid:"+r+" handle:"+xtt(n)+" context:"+Mf.inspect(o)),e.enter(o)):Zd&&Df(" PRE MISSING CONTEXT "+t+" uid:"+r+" handle:"+xtt(n))},post(r,n){O0=r;let o=e._contexts.get(r);o?(Zd&&Df(" POST "+t+" uid:"+r+" handle:"+xtt(n)+" context:"+Mf.inspect(o)),e.exit(o)):Zd&&Df(" POST MISSING CONTEXT "+t+" uid:"+r+" handle:"+xtt(n))},destroy(r){O0=r,Zd&&Df("DESTROY "+t+" uid:"+r+" context:"+Mf.inspect(e._contexts.get(O0))+" active:"+Mf.inspect(e.active,!0)),e._contexts.delete(r)}}),process.namespaces[t]=e,e}a(I_s,"createNamespace");function eUn(t){let e=Z7n(t);Z4.ok(e,`can't delete nonexistent namespace! "`+t+'"'),Z4.ok(e.id,"don't assign to process.namespaces directly! "+Mf.inspect(e)),process.namespaces[t]=null}a(eUn,"destroyNamespace");function x_s(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){eUn(t)}),process.namespaces=Object.create(null)}a(x_s,"reset");process.namespaces={};sle._state&&!sle._state.enabled&&sle.enable();function Df(t){process.env.DEBUG&&process._rawDebug(t)}a(Df,"debug2");function xtt(t){if(!t)return t;if(typeof t=="function")return t.name?t.name:(t.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1];if(t.constructor&&t.constructor.name)return t.constructor.name}a(xtt,"getFunctionName");if(Zd){fJt=uJt();for(J7n in fJt.filter._modifiers)fJt.filter.deattach(J7n)}var fJt,J7n});var nUn=T((zId,pJt)=>{"use strict";f();var w_s=I7n();process&&w_s.gte(process.versions.node,"8.0.0")?pJt.exports=M7n():pJt.exports=rUn()});var CUn=T((zi,EUn)=>{f();zi=EUn.exports=js;var dc;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?dc=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):dc=a(function(){},"debug");zi.SEMVER_SPEC_VERSION="2.0.0";var mIe=256,wtt=Number.MAX_SAFE_INTEGER||9007199254740991,hJt=16,R_s=mIe-6,gIe=zi.re=[],Tl=zi.safeRe=[],Vt=zi.src=[],ks=0,EJt="[a-zA-Z0-9-]",mJt=[["\\s",1],["\\d",mIe],[EJt,R_s]];function Mtt(t){for(var e=0;e)?=?)";var Rtt=ks++;Vt[Rtt]=Vt[cle]+"|x|X|\\*";var Ptt=ks++;Vt[Ptt]=Vt[ale]+"|x|X|\\*";var Fz=ks++;Vt[Fz]="[v=\\s]*("+Vt[Ptt]+")(?:\\.("+Vt[Ptt]+")(?:\\.("+Vt[Ptt]+")(?:"+Vt[_Jt]+")?"+Vt[yIe]+"?)?)?";var ule=ks++;Vt[ule]="[v=\\s]*("+Vt[Rtt]+")(?:\\.("+Vt[Rtt]+")(?:\\.("+Vt[Rtt]+")(?:"+Vt[vJt]+")?"+Vt[yIe]+"?)?)?";var cUn=ks++;Vt[cUn]="^"+Vt[ple]+"\\s*"+Vt[Fz]+"$";var lUn=ks++;Vt[lUn]="^"+Vt[ple]+"\\s*"+Vt[ule]+"$";var uUn=ks++;Vt[uUn]="(?:^|[^\\d])(\\d{1,"+hJt+"})(?:\\.(\\d{1,"+hJt+"}))?(?:\\.(\\d{1,"+hJt+"}))?(?:$|[^\\d])";var Ott=ks++;Vt[Ott]="(?:~>?)";var dle=ks++;Vt[dle]="(\\s*)"+Vt[Ott]+"\\s+";gIe[dle]=new RegExp(Vt[dle],"g");Tl[dle]=new RegExp(Mtt(Vt[dle]),"g");var P_s="$1~",dUn=ks++;Vt[dUn]="^"+Vt[Ott]+Vt[Fz]+"$";var fUn=ks++;Vt[fUn]="^"+Vt[Ott]+Vt[ule]+"$";var Btt=ks++;Vt[Btt]="(?:\\^)";var fle=ks++;Vt[fle]="(\\s*)"+Vt[Btt]+"\\s+";gIe[fle]=new RegExp(Vt[fle],"g");Tl[fle]=new RegExp(Mtt(Vt[fle]),"g");var k_s="$1^",pUn=ks++;Vt[pUn]="^"+Vt[Btt]+Vt[Fz]+"$";var hUn=ks++;Vt[hUn]="^"+Vt[Btt]+Vt[ule]+"$";var IJt=ks++;Vt[IJt]="^"+Vt[ple]+"\\s*("+TJt+")$|^$";var xJt=ks++;Vt[xJt]="^"+Vt[ple]+"\\s*("+aUn+")$|^$";var Uz=ks++;Vt[Uz]="(\\s*)"+Vt[ple]+"\\s*("+TJt+"|"+Vt[Fz]+")";gIe[Uz]=new RegExp(Vt[Uz],"g");Tl[Uz]=new RegExp(Mtt(Vt[Uz]),"g");var N_s="$1$2$3",mUn=ks++;Vt[mUn]="^\\s*("+Vt[Fz]+")\\s+-\\s+("+Vt[Fz]+")\\s*$";var gUn=ks++;Vt[gUn]="^\\s*("+Vt[ule]+")\\s+-\\s+("+Vt[ule]+")\\s*$";var AUn=ks++;Vt[AUn]="(<|>)?=?\\s*\\*";for(pD=0;pDmIe)return null;var r=e.loose?Tl[SJt]:Tl[bJt];if(!r.test(t))return null;try{return new js(t,e)}catch{return null}}a(Qz,"parse");zi.valid=D_s;function D_s(t,e){var r=Qz(t,e);return r?r.version:null}a(D_s,"valid");zi.clean=M_s;function M_s(t,e){var r=Qz(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}a(M_s,"clean");zi.SemVer=js;function js(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof js){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>mIe)throw new TypeError("version is longer than "+mIe+" characters");if(!(this instanceof js))return new js(t,e);dc("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?Tl[SJt]:Tl[bJt]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>wtt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>wtt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>wtt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var o=+n;if(o>=0&&o=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};zi.inc=O_s;function O_s(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new js(t,r).inc(e,n).version}catch{return null}}a(O_s,"inc");zi.diff=B_s;function B_s(t,e){if(wJt(t,e))return null;var r=Qz(t),n=Qz(e),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return o+c;return s}a(B_s,"diff");zi.compareIdentifiers=lle;var iUn=/^[0-9]+$/;function lle(t,e){var r=iUn.test(t),n=iUn.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t0}a(AIe,"gt");zi.lt=ktt;function ktt(t,e,r){return eB(t,e,r)<0}a(ktt,"lt");zi.eq=wJt;function wJt(t,e,r){return eB(t,e,r)===0}a(wJt,"eq");zi.neq=yUn;function yUn(t,e,r){return eB(t,e,r)!==0}a(yUn,"neq");zi.gte=RJt;function RJt(t,e,r){return eB(t,e,r)>=0}a(RJt,"gte");zi.lte=PJt;function PJt(t,e,r){return eB(t,e,r)<=0}a(PJt,"lte");zi.cmp=Ntt;function Ntt(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return wJt(t,r,n);case"!=":return yUn(t,r,n);case">":return AIe(t,r,n);case">=":return RJt(t,r,n);case"<":return ktt(t,r,n);case"<=":return PJt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}a(Ntt,"cmp");zi.Comparator=qS;function qS(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof qS){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof qS))return new qS(t,e);t=t.trim().split(/\s+/).join(" "),dc("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===EIe?this.value="":this.value=this.operator+this.semver.version,dc("comp",this)}a(qS,"Comparator");var EIe={};qS.prototype.parse=function(t){var e=this.options.loose?Tl[IJt]:Tl[xJt],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new js(r[2],this.options.loose):this.semver=EIe};qS.prototype.toString=function(){return this.value};qS.prototype.test=function(t){return dc("Comparator.test",t,this.options.loose),this.semver===EIe?!0:(typeof t=="string"&&(t=new js(t,this.options)),Ntt(t,this.operator,this.semver,this.options))};qS.prototype.intersects=function(t,e){if(!(t instanceof qS))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return r=new dd(t.value,e),Dtt(this.value,r,e);if(t.operator==="")return r=new dd(this.value,e),Dtt(t.semver,r,e);var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),s=this.semver.version===t.semver.version,c=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),l=Ntt(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=Ntt(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||s&&c||l||u};zi.Range=dd;function dd(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof dd)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new dd(t.raw,e);if(t instanceof qS)return new dd(t.value,e);if(!(this instanceof dd))return new dd(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}a(dd,"Range");dd.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};dd.prototype.toString=function(){return this.range};dd.prototype.parseRange=function(t){var e=this.options.loose,r=e?Tl[gUn]:Tl[mUn];t=t.replace(r,e1s),dc("hyphen replace",t),t=t.replace(Tl[Uz],N_s),dc("comparator trim",t,Tl[Uz]),t=t.replace(Tl[dle],P_s),t=t.replace(Tl[fle],k_s);var n=e?Tl[IJt]:Tl[xJt],o=t.split(" ").map(function(s){return V_s(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(s){return!!s.match(n)})),o=o.map(function(s){return new qS(s,this.options)},this),o};dd.prototype.intersects=function(t,e){if(!(t instanceof dd))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(n){return t.set.some(function(o){return o.every(function(s){return n.intersects(s,e)})})})})};zi.toComparators=$_s;function $_s(t,e){return new dd(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}a($_s,"toComparators");function V_s(t,e){return dc("comp",t,e),t=Y_s(t,e),dc("caret",t),t=W_s(t,e),dc("tildes",t),t=J_s(t,e),dc("xrange",t),t=Z_s(t,e),dc("stars",t),t}a(V_s,"parseComparator");function Uy(t){return!t||t.toLowerCase()==="x"||t==="*"}a(Uy,"isX");function W_s(t,e){return t.trim().split(/\s+/).map(function(r){return z_s(r,e)}).join(" ")}a(W_s,"replaceTildes");function z_s(t,e){var r=e.loose?Tl[fUn]:Tl[dUn];return t.replace(r,function(n,o,s,c,l){dc("tilde",t,n,o,s,c,l);var u;return Uy(o)?u="":Uy(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Uy(c)?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":l?(dc("replaceTilde pr",l),u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0"):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0",dc("tilde return",u),u})}a(z_s,"replaceTilde");function Y_s(t,e){return t.trim().split(/\s+/).map(function(r){return K_s(r,e)}).join(" ")}a(Y_s,"replaceCarets");function K_s(t,e){dc("caret",t,e);var r=e.loose?Tl[hUn]:Tl[pUn];return t.replace(r,function(n,o,s,c,l){dc("caret",t,n,o,s,c,l);var u;return Uy(o)?u="":Uy(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Uy(c)?o==="0"?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+".0 <"+(+o+1)+".0.0":l?(dc("replaceCaret pr",l),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+"-"+l+" <"+(+o+1)+".0.0"):(dc("no pr"),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+" <"+(+o+1)+".0.0"),dc("caret return",u),u})}a(K_s,"replaceCaret");function J_s(t,e){return dc("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return X_s(r,e)}).join(" ")}a(J_s,"replaceXRanges");function X_s(t,e){t=t.trim();var r=e.loose?Tl[lUn]:Tl[cUn];return t.replace(r,function(n,o,s,c,l,u){dc("xRange",t,n,o,s,c,l,u);var d=Uy(s),p=d||Uy(c),h=p||Uy(l),m=h;return o==="="&&m&&(o=""),d?o===">"||o==="<"?n="<0.0.0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),n=o+s+"."+c+"."+l):p?n=">="+s+".0.0 <"+(+s+1)+".0.0":h&&(n=">="+s+"."+c+".0 <"+s+"."+(+c+1)+".0"),dc("xRange return",n),n})}a(X_s,"replaceXRange");function Z_s(t,e){return dc("replaceStars",t,e),t.trim().replace(Tl[AUn],"")}a(Z_s,"replaceStars");function e1s(t,e,r,n,o,s,c,l,u,d,p,h,m){return Uy(r)?e="":Uy(n)?e=">="+r+".0.0":Uy(o)?e=">="+r+"."+n+".0":e=">="+e,Uy(u)?l="":Uy(d)?l="<"+(+u+1)+".0.0":Uy(p)?l="<"+u+"."+(+d+1)+".0":h?l="<="+u+"."+d+"."+p+"-"+h:l="<="+l,(e+" "+l).trim()}a(e1s,"hyphenReplace");dd.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new js(t,this.options));for(var e=0;e0){var o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}a(t1s,"testSet");zi.satisfies=Dtt;function Dtt(t,e,r){try{e=new dd(e,r)}catch{return!1}return e.test(t)}a(Dtt,"satisfies");zi.maxSatisfying=r1s;function r1s(t,e,r){var n=null,o=null;try{var s=new dd(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new js(n,r))}),n}a(r1s,"maxSatisfying");zi.minSatisfying=n1s;function n1s(t,e,r){var n=null,o=null;try{var s=new dd(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new js(n,r))}),n}a(n1s,"minSatisfying");zi.minVersion=i1s;function i1s(t,e){t=new dd(t,e);var r=new js("0.0.0");if(t.test(r)||(r=new js("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!r||AIe(r,c))&&(r=c);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}})}return r&&t.test(r)?r:null}a(i1s,"minVersion");zi.validRange=o1s;function o1s(t,e){try{return new dd(t,e).range||"*"}catch{return null}}a(o1s,"validRange");zi.ltr=s1s;function s1s(t,e,r){return kJt(t,e,"<",r)}a(s1s,"ltr");zi.gtr=a1s;function a1s(t,e,r){return kJt(t,e,">",r)}a(a1s,"gtr");zi.outside=kJt;function kJt(t,e,r,n){t=new js(t,n),e=new dd(e,n);var o,s,c,l,u;switch(r){case">":o=AIe,s=PJt,c=ktt,l=">",u=">=";break;case"<":o=ktt,s=RJt,c=AIe,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Dtt(t,e,n))return!1;for(var d=0;d=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0}a(kJt,"outside");zi.prerelease=c1s;function c1s(t,e){var r=Qz(t,e);return r&&r.prerelease.length?r.prerelease:null}a(c1s,"prerelease");zi.intersects=l1s;function l1s(t,e,r){return t=new dd(t,r),e=new dd(e,r),t.intersects(e)}a(l1s,"intersects");zi.coerce=u1s;function u1s(t){if(t instanceof js)return t;if(typeof t!="string")return null;var e=t.match(Tl[uUn]);return e==null?null:Qz(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}a(u1s,"coerce")});var bUn=T((XId,vUn)=>{f();var d1s=Lce().wrap,DJt=1,MJt=2,OJt=4,Ftt=8,Jc=[],f1s=0,fA=!1,X7=[],hle,BJt;function LJt(t,e){var r=t.length,n=e.length,o=[];if(r===0&&n===0)return o;for(var s=0;s0&&(Jc=X7.pop()),mle=void 0,n&&!fA},"asyncCatcher"),BJt=a(function(e,r,n){var o=[];fA=!0;for(var s=0;s0&&r[u].before(this,o[r[u].uid]);fA=!1;var d=e.apply(this,arguments);for(fA=!0,u=0;u0&&r[u].after(this,o[r[u].uid]);return fA=!1,Jc=X7.pop(),mle=void 0,d}},"asyncWrap"),d1s(process,"_fatalException",function(t){return a(function(r){return hle(r)||t(r)},"_asyncFatalException")})):(NJt=!1,hle=a(function(e){if(NJt)throw e;for(var r=!1,n=Jc.length,o=0;o0&&r[p].before(this,o[r[p].uid]);fA=!1;var h;try{h=e.apply(this,arguments)}catch(m){u=!0;for(var p=0;p0&&r[p].after(this,o[r[p].uid]);fA=!1}Jc=X7.pop()}return h}},"asyncWrap"),process.addListener("uncaughtException",hle));var Ltt,mle,NJt;function p1s(t,e,r){fA=!0;for(var n=0;n0)return BJt(t,r,e);return p1s(t,r,e)}a(h1s,"wrapCallback");function hD(t,e){typeof t.create=="function"&&(this.create=t.create,this.flags|=DJt),typeof t.before=="function"&&(this.before=t.before,this.flags|=MJt),typeof t.after=="function"&&(this.after=t.after,this.flags|=OJt),typeof t.error=="function"&&(this.error=t.error,this.flags|=Ftt),this.uid=++f1s,this.data=e===void 0?null:e}a(hD,"AsyncListener");hD.prototype.create=void 0;hD.prototype.before=void 0;hD.prototype.after=void 0;hD.prototype.error=void 0;hD.prototype.data=void 0;hD.prototype.uid=0;hD.prototype.flags=0;function _Un(t,e){if(typeof t!="object"||!t)throw new TypeError("callbacks argument must be an object");return t instanceof hD?t:new hD(t,e)}a(_Un,"createAsyncListener");function m1s(t,e){var r;t instanceof hD?r=t:r=_Un(t,e);for(var n=!1,o=0;o{"use strict";f();TUn.exports=(t,e)=>class extends t{static{a(this,"WrappedPromise")}constructor(n){var o,s;super(l);var c=this;try{n.apply(o,s)}catch(u){s[1](u)}return c;function l(u,d){o=this,s=[p,h];function p(m){return e(c,!1),u(m)}a(p,"wrappedResolve");function h(m){return e(c,!1),d(m)}a(h,"wrappedReject")}}}});var NUn=T(()=>{"use strict";f();if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var RUn=Lce(),Qtt=CUn(),n_=RUn.wrap,Z7=RUn.massWrap,fd=bUn(),A1s=require("util"),y1s=Qtt.gte(process.version,"6.0.0"),QJt=Qtt.gte(process.version,"7.0.0"),E1s=Qtt.gte(process.version,"8.0.0"),C1s=Qtt.gte(process.version,"11.0.0"),mD=require("net");QJt&&!mD._normalizeArgs?mD._normalizeArgs=function(t){if(t.length===0)return[{},null];var e=t[0],r={};typeof e=="object"&&e!==null?r=e:S1s(e)?r.path=e:(r.port=e,t.length>1&&typeof t[1]=="string"&&(r.host=t[1]));var n=t[t.length-1];return typeof n!="function"?[r,null]:[r,n]}:!QJt&&!mD._normalizeConnectArgs&&(mD._normalizeConnectArgs=function(t){var e={};function r(o){return(o=Number(o))>=0?o:!1}a(r,"toNumber"),typeof t[0]=="object"&&t[0]!==null?e=t[0]:typeof t[0]=="string"&&r(t[0])===!1?e.path=t[0]:(e.port=t[0],typeof t[1]=="string"&&(e.host=t[1]));var n=t[t.length-1];return typeof n=="function"?[e,n]:[e]});"_setUpListenHandle"in mD.Server.prototype?n_(mD.Server.prototype,"_setUpListenHandle",IUn):n_(mD.Server.prototype,"_listen2",IUn);function IUn(t){return function(){this.on("connection",function(e){e._handle&&(e._handle.onread=fd(e._handle.onread))});try{return t.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=fd(this._handle.onconnection))}}}a(IUn,"wrapSetUpListenHandle");function PUn(t){if(t&&t._handle){var e=t._handle;e._originalOnread||(e._originalOnread=e.onread),e.onread=fd(e._originalOnread)}}a(PUn,"patchOnRead");n_(mD.Socket.prototype,"connect",function(t){return function(){var e;E1s&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?e=arguments[0]:e=QJt?mD._normalizeArgs(arguments):mD._normalizeConnectArgs(arguments),e[1]&&(e[1]=fd(e[1]));var r=t.apply(this,e);return PUn(this),r}});var _1s=require("http");n_(_1s.Agent.prototype,"addRequest",function(t){return function(e){var r=e.onSocket;return e.onSocket=fd(function(n){return PUn(n),r.apply(this,arguments)}),t.apply(this,arguments)}});var FJt=require("child_process");function xUn(t){Array.isArray(t.stdio)&&t.stdio.forEach(function(e){e&&e._handle&&(e._handle.onread=fd(e._handle.onread),n_(e._handle,"close",qtt))}),t._handle&&(t._handle.onexit=fd(t._handle.onexit))}a(xUn,"wrapChildProcess");FJt.ChildProcess?n_(FJt.ChildProcess.prototype,"spawn",function(t){return function(){var e=t.apply(this,arguments);return xUn(this),e}}):Z7(FJt,["execFile","fork","spawn"],function(t){return function(){var e=t.apply(this,arguments);return xUn(e),e}});process._fatalException||(process._originalNextTick=process.nextTick);var HJt=[];process._nextDomainTick&&HJt.push("_nextDomainTick");process._tickDomainCallback&&HJt.push("_tickDomainCallback");Z7(process,HJt,gD);n_(process,"nextTick",qtt);var jJt=["setTimeout","setInterval"];global.setImmediate&&jJt.push("setImmediate");var kUn=require("timers"),v1s=global.setTimeout===kUn.setTimeout;Z7(kUn,jJt,qtt);v1s&&Z7(global,jJt,qtt);var qJt=require("dns");Z7(qJt,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],gD);qJt.resolveNaptr&&n_(qJt,"resolveNaptr",gD);var Gz=require("fs");Z7(Gz,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],gD);Gz.lchown&&n_(Gz,"lchown",gD);Gz.lchmod&&n_(Gz,"lchmod",gD);Gz.ftruncate&&n_(Gz,"ftruncate",gD);var CIe;try{CIe=require("zlib")}catch{}CIe&&CIe.Deflate&&CIe.Deflate.prototype&&(qz=Object.getPrototypeOf(CIe.Deflate.prototype),qz._transform?n_(qz,"_transform",gD):qz.write&&qz.flush&&qz.end&&Z7(qz,["write","flush","end"],gD));var qz,GJt;try{GJt=require("crypto")}catch{}GJt&&(UJt=["pbkdf2","randomBytes"],C1s||UJt.push("pseudoRandomBytes"),Z7(GJt,UJt,gD));var UJt,Utt=!!global.Promise&&Promise.toString()==="function Promise() { [native code] }"&&Promise.toString.toString()==="function toString() { [native code] }";Utt&&(wUn=process.addAsyncListener({create:a(function(){Utt=!1},"create")}),global.Promise.resolve(!0).then(a(function(){Utt=!1},"notSync")),process.removeAsyncListener(wUn));var wUn;Utt&&b1s();function b1s(){var t=global.Promise;function e(c){if(!(this instanceof e))return t(c);if(typeof c!="function")return new t(c);var l,u,d=new t(p);d.__proto__=e.prototype;try{c.apply(l,u)}catch(h){u[1](h)}return d;function p(h,m){l=this,u=[g,A];function g(y){return n(d,!1),h(y)}a(g,"wrappedResolve");function A(y){return n(d,!1),m(y)}a(A,"wrappedReject")}}if(a(e,"wrappedPromise"),A1s.inherits(e,t),n_(t.prototype,"then",s),t.prototype.chain&&n_(t.prototype,"chain",s),y1s)global.Promise=SUn()(t,n);else{var r=["all","race","reject","resolve","accept","defer"];r.forEach(function(c){typeof t[c]=="function"&&(e[c]=t[c])}),global.Promise=e}function n(c,l){(!c.__asl_wrapper||l)&&(c.__asl_wrapper=fd(o))}a(n,"ensureAslWrapper");function o(c,l,u,d){var p;try{return p=l.call(c,u),{returnVal:p,error:!1}}catch(h){return{errorVal:h,error:!0}}finally{p instanceof t?d.__asl_wrapper=a(function(){var m=p.__asl_wrapper||o;return m.apply(this,arguments)},"proxyWrapper"):n(d,!0)}}a(o,"propagateAslWrapper");function s(c){return a(function(){var u=this,d=c.apply(u,Array.prototype.map.call(arguments,p));return d.__asl_wrapper=a(function(m,g,A,y){return u.__asl_wrapper?(u.__asl_wrapper(m,function(){},null,d),d.__asl_wrapper(m,g,A,y)):o(m,g,A,y)},"proxyWrapper"),d;function p(h){return typeof h!="function"?h:fd(function(m){var g=(u.__asl_wrapper||o)(this,h,m,d);if(g.error)throw g.errorVal;return g.returnVal})}a(p,"bind")},"wrappedThen")}a(s,"wrapThen")}a(b1s,"wrapPromise");function gD(t){var e=a(function(){var r,n=arguments.length-1;if(typeof arguments[n]=="function"){r=Array(arguments.length);for(var o=0;o=0?t:!1}a(T1s,"toNumber");function S1s(t){return typeof t=="string"&&T1s(t)===!1}a(S1s,"isPipeName")});var LUn=T((lxd,BUn)=>{"use strict";f();var tB=require("assert"),I1s=Ttt(),_Ie="cls@contexts",$Jt="error@context";process.addAsyncListener||NUn();function tR(t){this.name=t,this.active=null,this._set=[],this.id=null}a(tR,"Namespace");tR.prototype.set=function(t,e){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[t]=e,e};tR.prototype.get=function(t){if(this.active)return this.active[t]};tR.prototype.createContext=function(){return Object.create(this.active)};tR.prototype.run=function(t){var e=this.createContext();this.enter(e);try{return t(e),e}catch(r){throw r&&(r[$Jt]=e),r}finally{this.exit(e)}};tR.prototype.runAndReturn=function(t){var e;return this.run(function(r){e=t(r)}),e};tR.prototype.bind=function(t,e){e||(this.active?e=this.active:e=this.createContext());var r=this;return function(){r.enter(e);try{return t.apply(this,arguments)}catch(n){throw n&&(n[$Jt]=e),n}finally{r.exit(e)}}};tR.prototype.enter=function(t){tB.ok(t,"context must be provided for entering"),this._set.push(this.active),this.active=t};tR.prototype.exit=function(t){if(tB.ok(t,"context must be provided for exiting"),this.active===t){tB.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}var e=this._set.lastIndexOf(t);tB.ok(e>=0,"context not currently entered; can't exit"),tB.ok(e,"can't remove top context"),this._set.splice(e,1)};tR.prototype.bindEmitter=function(t){tB.ok(t.on&&t.addListener&&t.emit,"can only bind real EEs");var e=this,r="context@"+this.name;function n(s){s&&(s[_Ie]||(s[_Ie]=Object.create(null)),s[_Ie][r]={namespace:e,context:e.active})}a(n,"attach");function o(s){if(!(s&&s[_Ie]))return s;var c=s,l=s[_Ie];return Object.keys(l).forEach(function(u){var d=l[u];c=d.namespace.bind(c,d.context)}),c}a(o,"bind"),I1s(t,n,o)};tR.prototype.fromException=function(t){return t[$Jt]};function DUn(t){return process.namespaces[t]}a(DUn,"get");function x1s(t){tB.ok(t,"namespace must be given a name!");var e=new tR(t);return e.id=process.addAsyncListener({create:a(function(){return e.active},"create"),before:a(function(r,n){n&&e.enter(n)},"before"),after:a(function(r,n){n&&e.exit(n)},"after"),error:a(function(r){r&&e.exit(r)},"error")}),process.namespaces[t]=e,e}a(x1s,"create");function MUn(t){var e=DUn(t);tB.ok(e,"can't delete nonexistent namespace!"),tB.ok(e.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(e.id),process.namespaces[t]=null}a(MUn,"destroy");function OUn(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){MUn(t)}),process.namespaces=Object.create(null)}a(OUn,"reset");process.namespaces||OUn();BUn.exports={getNamespace:DUn,createNamespace:x1s,destroyNamespace:MUn,reset:OUn}});var tU=T(AD=>{"use strict";f();var w1s=AD&&AD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),R1s=AD&&AD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),P1s=AD&&AD.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&w1s(e,t,r);return R1s(e,t),e};Object.defineProperty(AD,"__esModule",{value:!0});AD.CorrelationContextManager=void 0;var eU=Kc(),k1s=P1s(ctt()),Hz=ltt(),VJt=gKt(),FUn=BKt(),gle=Wm(),N1s=(function(){function t(){}return a(t,"CorrelationContextManager"),t.getCurrentContext=function(){if(!t.enabled)return null;var e=t.session.get(t.CONTEXT_NAME);return e===void 0?null:e},t.generateContextObject=function(e,r,n,o,s,c){return r=r||e,this.enabled?{operation:{name:n,id:e,parentId:r,traceparent:s,tracestate:c},customProperties:new D1s(o)}:null},t.spanToContextObject=function(e,r,n){var o=new Hz;return o.traceId=e.traceId,o.spanId=e.spanId,o.traceFlag=Hz.formatOpenTelemetryTraceFlags(e.traceFlags)||Hz.DEFAULT_TRACE_FLAG,o.parentId=r,t.generateContextObject(o.traceId,o.parentId,n,null,o)},t.runWithContext=function(e,r){var n;if(t.enabled)try{return t.session.bind(r,(n={},n[t.CONTEXT_NAME]=e,n))()}catch(o){eU.warn("Error binding to session context",gle.dumpObj(o))}return r()},t.wrapEmitter=function(e){if(t.enabled)try{t.session.bindEmitter(e)}catch(r){eU.warn("Error binding to session context",gle.dumpObj(r))}},t.wrapCallback=function(e,r){var n;if(t.enabled)try{return t.session.bind(e,r?(n={},n[t.CONTEXT_NAME]=r,n):void 0)}catch(o){eU.warn("Error binding to session context",gle.dumpObj(o))}return e},t.enable=function(e){if(!this.enabled){if(!this.isNodeVersionCompatible()){this.enabled=!1;return}if(!t.hasEverEnabled){this.forceClsHooked=e,this.hasEverEnabled=!0,typeof this.cls>"u"&&(t.forceClsHooked===!0||t.forceClsHooked===void 0&&t.shouldUseClsHooked()?this.cls=nUn():this.cls=LUn());try{t.session=this.cls.createNamespace("AI-CLS-Session")}catch(r){eU.warn("Failed to create AI-CLS-Session namespace. Correlation of requests may be lost",gle.dumpObj(r)),this.enabled=!1;return}k1s.registerContextPreservation(function(r){try{return t.session.bind(r)}catch(n){eU.warn("Error binding to session context",gle.dumpObj(n))}})}this.enabled=!0}},t.startOperation=function(e,r){var n=e&&e.traceContext||null,o=e&&e.spanContext?e:null,s=e&&e.traceId?e:null,c=e&&e.headers;if(o)return this.spanToContextObject(o.spanContext(),o.parentSpanId,o.name);if(s)return this.spanToContextObject(s,"|".concat(s.traceId,".").concat(s.spanId,"."),typeof r=="string"?r:"");var l=typeof r=="string"?r:"";if(n){var u=null,d=null;if(l=n.attributes.OperationName||l,r){var p=r;p.headers&&(p.headers.traceparent?u=new Hz(p.headers.traceparent):p.headers["request-id"]&&(u=new Hz(null,p.headers["request-id"])),p.headers.tracestate&&(d=new VJt(p.headers.tracestate)))}u||(u=new Hz(n.traceParent||n.traceparent)),d||(d=new VJt(n.traceState||n.tracestate));var h=void 0;if(typeof r=="object"){var m=new FUn(r);h=m.getCorrelationContextHeader(),l=m.getOperationName({})}var g=t.generateContextObject(u.traceId,u.parentId,l,h,u,d);return g}if(c){var u=new Hz(c.traceparent?c.traceparent.toString():null),d=new VJt(c.tracestate?c.tracestate.toString():null),m=new FUn(e),g=t.generateContextObject(u.traceId,u.parentId,m.getOperationName({}),m.getCorrelationContextHeader(),u,d);return g}return eU.warn("startOperation was called with invalid arguments",arguments),null},t.disable=function(){this.enabled=!1},t.reset=function(){if(t.hasEverEnabled){t.session=null;try{t.session=this.cls.createNamespace("AI-CLS-Session")}catch(e){eU.warn("Failed to create AI-CLS-Session namespace. Correlation of requests may be lost",gle.dumpObj(e)),this.enabled=!1;return}}},t.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},t.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},t.canUseClsHooked=function(){var e=process.versions.node.split("."),r=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,o=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(r&&n)&&o},t.enabled=!1,t.hasEverEnabled=!1,t.forceClsHooked=void 0,t.CONTEXT_NAME="ApplicationInsights-Context",t})();AD.CorrelationContextManager=N1s;var D1s=(function(){function t(e){this.props=[],this.addHeaderData(e)}return a(t,"CustomPropertiesImpl"),t.prototype.addHeaderData=function(e){var r=e?e.split(", "):[];this.props=r.map(function(n){var o=n.split("=");return{key:o[0],value:o[1]}}).concat(this.props)},t.prototype.serializeToHeader=function(){return this.props.map(function(e){return"".concat(e.key,"=").concat(e.value)}).join(", ")},t.prototype.getProperty=function(e){for(var r=0;r'+r+""+s,n},"insertSnippetByIndex");to.insertSnippetByIndex=kvs;var Nvs=a(function(t){var e=!1,r=t.getHeader("Content-Type");return r&&(typeof r=="string"?e=r.indexOf("html")>=0:e=r.toString().indexOf("html")>=0),e},"isContentTypeHeaderHtml");to.isContentTypeHeaderHtml=Nvs});var ZJt=T((Kxd,iQn)=>{"use strict";f();var nQn=su(),Dvs=(function(){function t(){}return a(t,"ConnectionStringParser"),t.parse=function(e){if(!e)return{};var r=e.split(t._FIELDS_SEPARATOR),n=r.reduce(function(s,c){var l=c.split(t._FIELD_KEY_VALUE_SEPARATOR);if(l.length===2){var u=l[0].toLowerCase(),d=l[1];s[u]=d}return s},{});if(Object.keys(n).length>0){if(n.endpointsuffix){var o=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+o+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+o+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||nQn.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||nQn.DEFAULT_LIVEMETRICS_ENDPOINT}return n},t.isIkeyValid=function(e){if(!e||e=="")return!1;var r="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",n=new RegExp(r);return n.test(e)},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t})();iQn.exports=Dvs});var oQn={};Ri(oQn,{webSnippet:()=>Mvs});var Mvs,sQn=Pe(()=>{f();Mvs=`!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;ae.trim()).join(" ")};PDn.O=function(t){return this.inspectOpts.colors=this.useColors,AZe.inspect(t,this.inspectOpts)}});var DDn=T((sCd,_Yt)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?_Yt.exports=RDn():_Yt.exports=kDn()});var vYt=T((cCd,NDn)=>{"use strict";f();var CYt=require("path").sep;NDn.exports=function(t){var e=t.split(CYt),r=e.lastIndexOf("node_modules");if(r!==-1&&e[r+1]){for(var n=e[r+1][0]==="@",o=n?e[r+1]+"/"+e[r+2]:e[r+1],s=n?3:2,c="",l=r+s-1,u=0;u<=l;u++)u===l?c+=e[u]:c+=e[u]+CYt;for(var d="",p=e.length-1,h=r+s;h<=p;h++)h===p?d+=e[h]:d+=e[h]+CYt;return{name:o,basedir:c,path:d}}}});var bYt=T((uCd,MDn)=>{"use strict";f();var Mcs=require("os");MDn.exports=Mcs.homedir||a(function(){var e=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null},"homedir")});var TYt=T((pCd,ODn)=>{f();ODn.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(r,n){return n};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var BDn=T((mCd,MTe)=>{"use strict";f();var Ocs=process.platform==="win32",Bcs=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,SYt={};function Lcs(t){return Bcs.exec(t).slice(1)}a(Lcs,"win32SplitPath");SYt.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=Lcs(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var Fcs=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,IYt={};function Ucs(t){return Fcs.exec(t).slice(1)}a(Ucs,"posixSplitPath");IYt.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=Ucs(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};Ocs?MTe.exports=SYt.parse:MTe.exports=IYt.parse;MTe.exports.posix=IYt.parse;MTe.exports.win32=SYt.parse});var xYt=T((yCd,QDn)=>{f();var UDn=require("path"),LDn=UDn.parse||BDn(),FDn=a(function(e,r){var n="/";/^([A-Za-z]:)/.test(e)?n="":/^\\\\/.test(e)&&(n="\\\\");for(var o=[e],s=LDn(e);s.dir!==o[o.length-1];)o.push(s.dir),s=LDn(s.dir);return o.reduce(function(c,l){return c.concat(r.map(function(u){return UDn.resolve(n,l,u)}))},[])},"getNodeModulesDirs");QDn.exports=a(function(e,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,e,function(){return FDn(e,o)},r);var s=FDn(e,o);return r&&r.paths?s.concat(r.paths):s},"nodeModulesPaths")});var wYt=T((CCd,qDn)=>{f();qDn.exports=function(t,e){return e||{}}});var jDn=T((bCd,HDn)=>{"use strict";f();var Qcs="Function.prototype.bind called on incompatible ",qcs=Object.prototype.toString,Gcs=Math.max,Hcs="[object Function]",GDn=a(function(e,r){for(var n=[],o=0;o{"use strict";f();var Vcs=jDn();$Dn.exports=Function.prototype.bind||Vcs});var zDn=T((wCd,WDn)=>{"use strict";f();var Wcs=Function.prototype.call,zcs=Object.prototype.hasOwnProperty,Ycs=VDn();WDn.exports=Ycs.call(Wcs,zcs)});var YDn=T((PCd,Kcs)=>{Kcs.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var OTe=T((kCd,XDn)=>{"use strict";f();var Jcs=zDn();function Xcs(t,e){for(var r=t.split("."),n=e.split(" "),o=n.length>1?n[0]:"=",s=(n.length>1?n[1]:n[0]).split("."),c=0;c<3;++c){var l=parseInt(r[c]||0,10),u=parseInt(s[c]||0,10);if(l!==u)return o==="<"?l="?l>=u:!1}return o===">="}a(Xcs,"specifierIncluded");function KDn(t,e){var r=e.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n"u"?process.versions&&process.versions.node:t;if(typeof r!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var n=0;n{f();var wW=require("fs"),els=bYt(),w0=require("path"),tls=TYt(),rls=xYt(),nls=wYt(),ils=OTe(),ols=process.platform!=="win32"&&wW.realpath&&typeof wW.realpath.native=="function"?wW.realpath.native:wW.realpath,ZDn=els(),sls=a(function(){return[w0.join(ZDn,".node_modules"),w0.join(ZDn,".node_libraries")]},"defaultPaths"),als=a(function(e,r){wW.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},"isFile"),cls=a(function(e,r){wW.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},"isDirectory"),lls=a(function(e,r){ols(e,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?e:o)})},"realpath"),BTe=a(function(e,r,n,o){n&&n.preserveSymlinks===!1?e(r,o):o(null,r)},"maybeRealpath"),uls=a(function(e,r,n){e(r,function(o,s){if(o)n(o);else try{var c=JSON.parse(s);n(null,c)}catch{n(null)}})},"defaultReadPackage"),dls=a(function(e,r,n){for(var o=rls(r,n,e),s=0;s{fls.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":">= 23.4",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var sNn=T((FCd,oNn)=>{"use strict";f();var pls=OTe(),nNn=rNn(),iNn={};for(EZe in nNn)Object.prototype.hasOwnProperty.call(nNn,EZe)&&(iNn[EZe]=pls(EZe));var EZe;oNn.exports=iNn});var cNn=T((QCd,aNn)=>{f();var hls=OTe();aNn.exports=a(function(e){return hls(e)},"isCore")});var dNn=T((HCd,uNn)=>{f();var mls=OTe(),RW=require("fs"),tA=require("path"),gls=bYt(),Als=TYt(),yls=xYt(),Els=wYt(),_ls=process.platform!=="win32"&&RW.realpathSync&&typeof RW.realpathSync.native=="function"?RW.realpathSync.native:RW.realpathSync,lNn=gls(),Cls=a(function(){return[tA.join(lNn,".node_modules"),tA.join(lNn,".node_libraries")]},"defaultPaths"),vls=a(function(e){try{var r=RW.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},"isFile"),bls=a(function(e){try{var r=RW.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},"isDirectory"),Tls=a(function(e){try{return _ls(e)}catch(r){if(r.code!=="ENOENT")throw r}return e},"realpathSync"),LTe=a(function(e,r,n){return n&&n.preserveSymlinks===!1?e(r):r},"maybeRealpathSync"),Sls=a(function(e,r){var n=e(r);try{var o=JSON.parse(n);return o}catch{}},"defaultReadPackageSync"),Ils=a(function(e,r,n){for(var o=yls(r,n,e),s=0;s{f();var _Ze=tNn();_Ze.core=sNn();_Ze.isCore=cNn();_Ze.sync=dNn();fNn.exports=_Ze});var pNn=T((zCd,xls)=>{xls.exports={name:"require-in-the-middle",version:"7.5.2",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/nodejs/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/nodejs/require-in-the-middle/issues"},homepage:"https://github.com/nodejs/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var NYt=T((YCd,DYt)=>{"use strict";f();var rce=require("path"),qw=require("module"),Tf=DDn()("require-in-the-middle"),wls=vYt();DYt.exports=FTe;DYt.exports.Hook=FTe;var PYt,tce;if(qw.isBuiltin)tce=qw.isBuiltin;else if(qw.builtinModules)tce=a(t=>t.startsWith("node:")?!0:(PYt===void 0&&(PYt=new Set(qw.builtinModules)),PYt.has(t)),"isCore");else{let t=RYt(),[e,r]=process.versions.node.split(".").map(Number);e===8&&r<8?tce=a(n=>n==="http2"?!0:!!t.core[n],"isCore"):tce=a(n=>!!t.core[n],"isCore")}var CZe;function Rls(t,e){if(!CZe)if(require.resolve&&require.resolve.paths)CZe=a(function(r,n){return require.resolve(r,{paths:[n]})},"_resolve");else{let r=RYt();CZe=a(function(n,o){return r.sync(n,{basedir:o})},"_resolve")}return CZe(t,e)}a(Rls,"resolve");var Pls=/([/\\]index)?(\.js)?$/,kYt=class{static{a(this,"ExportsCache")}constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,r){if(this._localCache.has(e))return!0;if(r)return!1;{let n=require.cache[e];return!!(n&&this._kRitmExports in n)}}get(e,r){let n=this._localCache.get(e);if(n!==void 0)return n;if(!r){let o=require.cache[e];return o&&o[this._kRitmExports]}}set(e,r,n){n?this._localCache.set(e,r):e in require.cache?require.cache[e][this._kRitmExports]=r:(Tf('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,r))}};function FTe(t,e,r){if(!(this instanceof FTe))return new FTe(t,e,r);if(typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),typeof qw._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof qw._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,pNn().bugs.url);return}this._cache=new kYt,this._unhooked=!1,this._origRequire=qw.prototype.require;let n=this,o=new Set,s=e?e.internals===!0:!1,c=Array.isArray(t);Tf("registering require hook"),this._require=qw.prototype.require=function(u){return n._unhooked===!0?(Tf("ignoring require call - module is soft-unhooked"),n._origRequire.apply(this,arguments)):l.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(u){return n._unhooked===!0?(Tf("ignoring process.getBuiltinModule call - module is soft-unhooked"),n._origGetBuiltinModule.apply(this,arguments)):l.call(this,arguments,!0)});function l(u,d){let p=u[0],h=tce(p),m;if(h){if(m=p,p.startsWith("node:")){let v=p.slice(5);tce(v)&&(m=v)}}else{if(d)return Tf("call to process.getBuiltinModule with unknown built-in id"),n._origGetBuiltinModule.apply(this,u);try{m=qw._resolveFilename(p,this)}catch(v){return Tf('Module._resolveFilename("%s") threw %j, calling original Module.require',p,v.message),n._origRequire.apply(this,u)}}let g,A;if(Tf("processing %s module require('%s'): %s",h===!0?"core":"non-core",p,m),n._cache.has(m,h)===!0)return Tf("returning already patched cached module: %s",m),n._cache.get(m,h);let y=o.has(m);y===!1&&o.add(m);let E=d?n._origGetBuiltinModule.apply(this,u):n._origRequire.apply(this,u);if(y===!0)return Tf("module is in the process of being patched already - ignoring: %s",m),E;if(o.delete(m),h===!0){if(c===!0&&t.includes(m)===!1)return Tf("ignoring core module not on whitelist: %s",m),E;g=m}else if(c===!0&&t.includes(m)){let v=rce.parse(m);g=v.name,A=v.dir}else{let v=wls(m);if(v===void 0)return Tf("could not parse filename: %s",m),E;g=v.name,A=v.basedir;let b=kls(v);Tf("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",g,p,b,A);let I=!1;if(c){if(!p.startsWith(".")&&t.includes(p)&&(g=p,I=!0),!t.includes(g)&&!t.includes(b))return E;t.includes(b)&&b!==g&&(g=b,I=!0)}if(!I){let x;try{x=Rls(g,A)}catch{return Tf("could not resolve module: %s",g),n._cache.set(m,E,h),E}if(x!==m)if(s===!0)g=g+rce.sep+rce.relative(A,m),Tf("preparing to process require of internal file: %s",g);else return Tf("ignoring require of non-main module file: %s",x),n._cache.set(m,E,h),E}}n._cache.set(m,E,h),Tf("calling require hook: %s",g);let _=r(E,g,A);return n._cache.set(m,_,h),Tf("returning module: %s",g),_}a(l,"patchedRequire")}a(FTe,"Hook");FTe.prototype.unhook=function(){this._unhooked=!0,this._require===qw.prototype.require?(qw.prototype.require=this._origRequire,Tf("require unhook successful")):Tf("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,Tf("process.getBuiltinModule unhook successful")):Tf("process.getBuiltinModule unhook unsuccessful"))};function kls(t){let e=rce.sep!=="/"?t.path.split(rce.sep).join("/"):t.path;return rce.posix.join(t.name,e).replace(Pls,"")}a(kls,"resolveModuleName")});var vZe,bZe,hNn=Pe(()=>{f();vZe=class{static{a(this,"ModuleNameTrieNode")}hooks=[];children=new Map},bZe=class{static{a(this,"ModuleNameTrie")}_trie=new vZe;_counter=0;insert(e){let r=this._trie;for(let n of e.moduleName.split("/")){let o=r.children.get(n);o||(o=new vZe,r.children.set(n,o)),r=o}r.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:r,fullOnly:n}={}){let o=this._trie,s=[],c=!0;for(let l of e.split("/")){let u=o.children.get(l);if(!u){c=!1;break}n||s.push(...u.hooks),o=u}return n&&c&&s.push(...o.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(r&&s.sort((l,u)=>l.insertedId-u.insertedId),s.map(({hook:l})=>l))}}});function Nls(t){return MYt.sep!=="/"?t.split(MYt.sep).join("/"):t}var gNn,MYt,Dls,TZe,ANn=Pe(()=>{f();gNn=de(NYt()),MYt=de(require("path"));hNn();Dls=["afterEach","after","beforeEach","before","describe","it"].every(t=>typeof global[t]=="function"),TZe=class t{static{a(this,"RequireInTheMiddleSingleton")}_moduleNameTrie=new bZe;static _instance;constructor(){this._initialize()}_initialize(){new gNn.Hook(null,{internals:!0},(e,r,n)=>{let o=Nls(r),s=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:n===void 0});for(let{onRequire:c}of s)e=c(e,r,n);return e})}register(e,r){let n={moduleName:e,onRequire:r};return this._moduleNameTrie.insert(n),n}static getInstance(){return Dls?new t:this._instance=this._instance??new t}};a(Nls,"normalizePathSeparators")});var bNn=T(PW=>{f();var yNn=[],OYt=new WeakMap,ENn=new WeakMap,_Nn=new Map,CNn=[],Mls={set(t,e,r){return OYt.get(t)[e](r)},get(t,e){if(e===Symbol.toStringTag)return"Module";let r=ENn.get(t)[e];if(typeof r=="function")return r()},defineProperty(t,e,r){if(!("value"in r))throw new Error("Getters/setters are not supported for exports property descriptors.");return OYt.get(t)[e](r.value)}};function Ols(t,e,r,n,o){_Nn.set(t,o),OYt.set(e,r),ENn.set(e,n);let s=new Proxy(e,Mls);yNn.forEach(c=>c(t,s)),CNn.push([t,s])}a(Ols,"register");var vNn=!1;function Bls(){return vNn}a(Bls,"getExperimentalPatchInternals");function Lls(t){vNn=t}a(Lls,"setExperimentalPatchInternals");PW.register=Ols;PW.importHooks=yNn;PW.specifiers=_Nn;PW.toHook=CNn;PW.getExperimentalPatchInternals=Bls;PW.setExperimentalPatchInternals=Lls});var RNn=T((c1d,nce)=>{f();var TNn=require("path"),Fls=vYt(),{fileURLToPath:SNn}=require("url"),{MessageChannel:Uls}=require("worker_threads"),{importHooks:BYt,specifiers:Qls,toHook:qls,getExperimentalPatchInternals:Gls}=bNn();function xNn(t){BYt.push(t),qls.forEach(([e,r])=>t(e,r))}a(xNn,"addHook");function wNn(t){let e=BYt.indexOf(t);e>-1&&BYt.splice(e,1)}a(wNn,"removeHook");function INn(t,e,r,n){let o=t(e,r,n);o&&o!==e&&(e.default=o)}a(INn,"callHookFn");var LYt;function Hls(){let{port1:t,port2:e}=new Uls,r=0,n;LYt=a(l=>{r++,t.postMessage(l)},"sendModulesToLoader"),t.on("message",()=>{r--,n&&r<=0&&n()}).unref();function o(){let l=setInterval(()=>{},1e3),u=new Promise(d=>{n=d}).then(()=>{clearInterval(l)});return r===0&&n(),u}a(o,"waitForAllMessagesAcknowledged");let s=e;return{registerOptions:{data:{addHookMessagePort:s,include:[]},transferList:[s]},addHookMessagePort:s,waitForAllMessagesAcknowledged:o}}a(Hls,"createAddHookMessageChannel");function UTe(t,e,r){if(!(this instanceof UTe))return new UTe(t,e,r);typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let n=e?e.internals===!0:!1;LYt&&Array.isArray(t)&&LYt(t),this._iitmHook=(o,s)=>{let c=o,l=o.startsWith("node:"),u;if(l)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=SNn(o)}catch{}let d=Fls(o);d&&(o=d.name,u=d.basedir)}if(t){for(let d of t)if(d===o){if(u){if(n)o=o+TNn.sep+TNn.relative(u,SNn(c));else if(!Gls()&&!u.endsWith(Qls.get(c)))continue}INn(r,s,o,u)}}else INn(r,s,o,u)},xNn(this._iitmHook)}a(UTe,"Hook");UTe.prototype.unhook=function(){wNn(this._iitmHook)};nce.exports=UTe;nce.exports.Hook=UTe;nce.exports.addHook=xNn;nce.exports.removeHook=wNn;nce.exports.createAddHookMessageChannel=Hls});function PNn(t,e,r){let n,o;try{o=t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}async function kNn(t,e,r){let n,o;try{o=await t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}function SZe(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var FYt=Pe(()=>{f();a(PNn,"safeExecuteInTheMiddle");a(kNn,"safeExecuteInTheMiddleAsync");a(SZe,"isWrapped")});function DNn(t,e,r){return typeof e>"u"?t.includes("*"):t.some(n=>ADn(e,n,{includePrerelease:r}))}var RO,UYt,QTe,NNn,MNn,ONn,ice,BNn=Pe(()=>{f();RO=de(require("path")),UYt=require("util");CDn();QTe=de(Jae());SDn();ANn();NNn=de(RNn());Bi();MNn=de(NYt()),ONn=require("fs");FYt();ice=class extends hZe{static{a(this,"InstrumentationBase")}_modules;_hooks=[];_requireInTheMiddleSingleton=TZe.getInstance();_enabled=!1;constructor(e,r,n){super(e,r,n);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=a((e,r,n)=>{if(SZe(e[r])&&this._unwrap(e,r),UYt.types.isProxy(e)){let o=(0,QTe.wrap)(Object.assign({},e),r,n);return Object.defineProperty(e,r,{value:o}),o}else return(0,QTe.wrap)(e,r,n)},"_wrap");_unwrap=a((e,r)=>UYt.types.isProxy(e)?Object.defineProperty(e,r,{value:e[r]}):(0,QTe.unwrap)(e,r),"_unwrap");_massWrap=a((e,r,n)=>{if(e)Array.isArray(e)||(e=[e]);else{cn.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){cn.error("must provide one or more functions to wrap on modules");return}e.forEach(o=>{r.forEach(s=>{this._wrap(o,s,n)})})},"_massWrap");_massUnwrap=a((e,r)=>{if(e)Array.isArray(e)||(e=[e]);else{cn.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){cn.error("must provide one or more functions to wrap on modules");return}e.forEach(n=>{r.forEach(o=>{this._unwrap(n,o)})})},"_massUnwrap");_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:r}=e;try{let n=require.resolve(r);require.cache[n]&&this._diag.warn(`Module ${r} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${r}`)}catch{}})}_extractPackageVersion(e){try{let r=(0,ONn.readFileSync)(RO.join(e,"package.json"),{encoding:"utf8"}),n=JSON.parse(r).version;return typeof n=="string"?n:void 0}catch{cn.warn("Failed extracting version",e)}}_onRequire(e,r,n,o){if(!o)return typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(r)):r;let s=this._extractPackageVersion(o);if(e.moduleVersion=s,e.name===n)return DNn(e.supportedVersions,s,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:o}),e.patch(r,e.moduleVersion)):r;let c=e.files??[],l=RO.normalize(n);return c.filter(d=>d.name===l).filter(d=>DNn(d.supportedVersions,s,e.includePrerelease)).reduce((d,p)=>(p.moduleExports=d,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:p.name,baseDir:o}),p.patch(d,e.moduleVersion)):d),r)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.patch(r.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let r=a((c,l,u)=>{if(!u&&RO.isAbsolute(l)){let d=RO.parse(l);l=d.name,u=d.dir}return this._onRequire(e,c,l,u)},"hookFn"),n=a((c,l,u)=>this._onRequire(e,c,l,u),"onRequire"),o=RO.isAbsolute(e.name)?new MNn.Hook([e.name],{internals:!0},n):this._requireInTheMiddleSingleton.register(e.name,n);this._hooks.push(o);let s=new NNn.Hook([e.name],{internals:!1},r);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.unpatch(r.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}};a(DNn,"isSupported")});var qTe,LNn=Pe(()=>{f();qTe=require("path")});var FNn=Pe(()=>{f();BNn();LNn()});var QYt=Pe(()=>{f();FNn()});var IZe,UNn=Pe(()=>{f();IZe=class{static{a(this,"InstrumentationNodeModuleDefinition")}name;supportedVersions;patch;unpatch;files;constructor(e,r,n,o,s){this.name=e,this.supportedVersions=r,this.patch=n,this.unpatch=o,this.files=s||[]}}});var xZe,QNn=Pe(()=>{f();QYt();xZe=class{static{a(this,"InstrumentationNodeModuleFile")}supportedVersions;patch;unpatch;name;constructor(e,r,n,o){this.supportedVersions=r,this.patch=n,this.unpatch=o,this.name=(0,qTe.normalize)(e)}}});var qYt={};ui(qYt,{InstrumentationBase:()=>ice,InstrumentationNodeModuleDefinition:()=>IZe,InstrumentationNodeModuleFile:()=>xZe,isWrapped:()=>SZe,registerInstrumentations:()=>uDn,safeExecuteInTheMiddle:()=>PNn,safeExecuteInTheMiddleAsync:()=>kNn});var GYt=Pe(()=>{f();dDn();QYt();UNn();QNn();FYt()});var GNn=T(HYt=>{"use strict";f();Object.defineProperty(HYt,"__esModule",{value:!0});HYt.log=Wls;var qNn=(bM(),Aa(k8)),jls=require("node:os"),$ls=qNn.__importDefault(require("node:util")),Vls=qNn.__importStar(require("node:process"));function Wls(t,...e){Vls.stderr.write(`${$ls.default.format(t,...e)}${jls.EOL}`)}a(Wls,"log")});var WNn=T(zYt=>{"use strict";f();Object.defineProperty(zYt,"__esModule",{value:!0});var zls=GNn(),HNn=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,jNn,jYt=[],$Yt=[],wZe=[];HNn&&VYt(HNn);var $Nn=Object.assign(t=>VNn(t),{enable:VYt,enabled:WYt,disable:Yls,log:zls.log});function VYt(t){jNn=t,jYt=[],$Yt=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?$Yt.push(new RegExp(`^${n.substr(1)}$`)):jYt.push(new RegExp(`^${n}$`));for(let n of wZe)n.enabled=WYt(n.namespace)}a(VYt,"enable");function WYt(t){if(t.endsWith("*"))return!0;for(let e of $Yt)if(e.test(t))return!1;for(let e of jYt)if(e.test(t))return!0;return!1}a(WYt,"enabled");function Yls(){let t=jNn||"";return VYt(""),t}a(Yls,"disable");function VNn(t){let e=Object.assign(r,{enabled:WYt(t),destroy:Kls,log:$Nn.log,namespace:t,extend:Jls});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),wZe.push(e),e}a(VNn,"createDebugger");function Kls(){let t=wZe.indexOf(this);return t>=0?(wZe.splice(t,1),!0):!1}a(Kls,"destroy");function Jls(t){let e=VNn(`${this.namespace}:${t}`);return e.log=this.log,e}a(Jls,"extend");zYt.default=$Nn});var DZe=T(Y5=>{"use strict";f();Object.defineProperty(Y5,"__esModule",{value:!0});Y5.AzureLogger=void 0;Y5.setLogLevel=KNn;Y5.getLogLevel=Zls;Y5.createClientLogger=eus;var Xls=(bM(),Aa(k8)),GTe=Xls.__importDefault(WNn()),YNn=new Set,RZe=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,kZe;Y5.AzureLogger=(0,GTe.default)("azure");Y5.AzureLogger.log=(...t)=>{GTe.default.log(...t)};var YYt=["verbose","info","warning","error"];RZe&&(ZNn(RZe)?KNn(RZe):console.error(`AZURE_LOG_LEVEL set to unknown log level '${RZe}'; logging is not enabled. Acceptable values: ${YYt.join(", ")}.`));function KNn(t){if(t&&!ZNn(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${YYt.join(",")}`);kZe=t;let e=[];for(let r of YNn)XNn(r)&&e.push(r.namespace);GTe.default.enable(e.join(","))}a(KNn,"setLogLevel");function Zls(){return kZe}a(Zls,"getLogLevel");var zNn={verbose:400,info:300,warning:200,error:100};function eus(t){let e=Y5.AzureLogger.extend(t);return JNn(Y5.AzureLogger,e),{error:PZe(e,"error"),warning:PZe(e,"warning"),info:PZe(e,"info"),verbose:PZe(e,"verbose")}}a(eus,"createClientLogger");function JNn(t,e){e.log=(...r)=>{t.log(...r)}}a(JNn,"patchLogMethod");function PZe(t,e){let r=Object.assign(t.extend(e),{level:e});if(JNn(t,r),XNn(r)){let n=GTe.default.disable();GTe.default.enable(n+","+r.namespace)}return YNn.add(r),r}a(PZe,"createLogger");function XNn(t){return!!(kZe&&zNn[t.level]<=zNn[kZe])}a(XNn,"shouldEnable");function ZNn(t){return YYt.includes(t)}a(ZNn,"isAzureLogLevel")});var KYt=T(NZe=>{"use strict";f();Object.defineProperty(NZe,"__esModule",{value:!0});NZe.logger=void 0;var tus=DZe();NZe.logger=(0,tus.createClientLogger)("opentelemetry-instrumentation-azure-sdk")});function MZe(t){return t.setValue(JYt,!0)}function eMn(t){return t.deleteValue(JYt)}function oce(t){return t.getValue(JYt)===!0}var JYt,HTe=Pe(()=>{f();Bi();JYt=L_("OpenTelemetry SDK Context Key SUPPRESS_TRACING");a(MZe,"suppressTracing");a(eMn,"unsuppressTracing");a(oce,"isTracingSuppressed")});var OZe,tMn=Pe(()=>{f();OZe="baggage"});function nMn(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?",":""}${r}`;return n.length>8192?e:n},"")}function iMn(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=";"+r.metadata.toString()),n})}function XYt(t){let e=t.split(";");if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf("=");if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),c;return e.length>0&&(c=Nae(e.join(";"))),{key:o,value:s,metadata:c}}function oMn(t){let e={};return typeof t=="string"&&t.length>0&&t.split(",").forEach(r=>{let n=XYt(r);n!==void 0&&n.value.length>0&&(e[n.key]=n.value)}),e}var ZYt=Pe(()=>{f();Bi();a(nMn,"serializeKeyPairs");a(iMn,"getKeyPairs");a(XYt,"parsePairKeyValue");a(oMn,"parseKeyPairsIntoRecord")});var LZe,sMn=Pe(()=>{f();Bi();HTe();tMn();ZYt();LZe=class{static{a(this,"W3CBaggagePropagator")}inject(e,r,n){let o=Dv.getBaggage(e);if(!o||oce(e))return;let s=iMn(o).filter(l=>l.length<=4096).slice(0,180),c=nMn(s);c.length>0&&n.set(r,OZe,c)}extract(e,r,n){let o=n.get(r,OZe),s=Array.isArray(o)?o.join(","):o;if(!s)return e;let c={};return s.length===0||(s.split(",").forEach(u=>{let d=XYt(u);if(d){let p={value:d.value};d.metadata&&(p.metadata=d.metadata),c[d.key]=p}}),Object.entries(c).length===0)?e:Dv.setBaggage(e,Dv.createBaggage(c))}fields(){return[OZe]}}});var FZe,aMn=Pe(()=>{f();FZe=class{static{a(this,"AnchoredClock")}_monotonicClock;_epochMillis;_performanceMillis;constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}}});function cMn(t){let e={};if(typeof t!="object"||t==null)return e;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if(!ius(r)){cn.warn(`Invalid attribute key: ${r}`);continue}let n=t[r];if(!eKt(n)){cn.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}function ius(t){return typeof t=="string"&&t!==""}function eKt(t){return t==null?!0:Array.isArray(t)?ous(t):lMn(typeof t)}function ous(t){let e;for(let r of t){if(r==null)continue;let n=typeof r;if(n!==e){if(!e){if(lMn(n)){e=n;continue}return!1}return!1}}return!0}function lMn(t){switch(t){case"number":case"boolean":case"string":return!0}return!1}var uMn=Pe(()=>{f();Bi();a(cMn,"sanitizeAttributes");a(ius,"isAttributeKey");a(eKt,"isAttributeValue");a(ous,"isHomogeneousAttributeValueArray");a(lMn,"isValidPrimitiveAttributeValueType")});function UZe(){return t=>{cn.error(sus(t))}}function sus(t){return typeof t=="string"?t:JSON.stringify(aus(t))}function aus(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}var tKt=Pe(()=>{f();Bi();a(UZe,"loggingErrorHandler");a(sus,"stringifyException");a(aus,"flattenException")});function fMn(t){dMn=t}function pMn(t){try{dMn(t)}catch{}}var dMn,hMn=Pe(()=>{f();tKt();dMn=UZe();a(fMn,"setGlobalErrorHandler");a(pMn,"globalErrorHandler")});function QZe(t){let e=process.env[t];if(e==null||e.trim()==="")return;let r=Number(e);if(isNaN(r)){cn.warn(`Unknown value ${(0,rKt.inspect)(e)} for ${t}, expected a number, using defaults`);return}return r}function jTe(t){let e=process.env[t];if(!(e==null||e.trim()===""))return e}function qZe(t){let e=process.env[t]?.trim().toLowerCase();return e==null||e===""?!1:e==="true"?!0:(e==="false"||cn.warn(`Unknown value ${(0,rKt.inspect)(e)} for ${t}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}function GZe(t){return jTe(t)?.split(",").map(e=>e.trim()).filter(e=>e!=="")}var rKt,mMn=Pe(()=>{f();Bi();rKt=require("util");a(QZe,"getNumberFromEnv");a(jTe,"getStringFromEnv");a(qZe,"getBooleanFromEnv");a(GZe,"getStringListFromEnv")});var HZe,gMn=Pe(()=>{f();HZe=typeof globalThis=="object"?globalThis:global});var AMn,A7,yMn=Pe(()=>{f();AMn=require("perf_hooks"),A7=AMn.performance});var EMn,_Mn=Pe(()=>{f();EMn="2.2.0"});function Sf(t){let e={},r=t.length;for(let n=0;n{f();a(Sf,"createConstMap")});var CMn,vMn,bMn,TMn,SMn,IMn,xMn,wMn,RMn,PMn,kMn,DMn,NMn,MMn,OMn,BMn,LMn,FMn,UMn,QMn,qMn,GMn,HMn,jMn,$Mn,VMn,WMn,zMn,YMn,KMn,JMn,XMn,ZMn,e4n,t4n,r4n,n4n,i4n,o4n,s4n,a4n,c4n,l4n,u4n,d4n,f4n,p4n,h4n,m4n,g4n,A4n,y4n,E4n,_4n,C4n,v4n,b4n,T4n,S4n,I4n,x4n,w4n,R4n,P4n,k4n,D4n,N4n,M4n,O4n,B4n,L4n,F4n,U4n,Q4n,q4n,G4n,H4n,j4n,$4n,V4n,W4n,z4n,Y4n,K4n,J4n,X4n,Z4n,eOn,tOn,rOn,nOn,iOn,oOn,sOn,aOn,cOn,lOn,uOn,dOn,fOn,pOn,hOn,mOn,gOn,AOn,yOn,EOn,_On,COn,vOn,bOn,TOn,SOn,IOn,xOn,wOn,ROn,POn,kOn,DOn,NOn,MOn,OOn,BOn,LOn,FOn,UOn,QOn,cus,lus,uus,dus,fus,pus,hus,mus,gus,Aus,yus,Eus,_us,Cus,vus,bus,Tus,Sus,Ius,xus,wus,Rus,Pus,kus,Dus,Nus,Mus,Ous,Bus,Lus,Fus,Uus,Qus,qus,Gus,Hus,jus,$us,Vus,Wus,zus,Yus,Kus,Jus,Xus,Zus,eds,tds,rds,nds,ids,ods,sds,ads,cds,lds,uds,dds,fds,pds,hds,mds,gds,Ads,yds,Eds,_ds,Cds,vds,bds,Tds,Sds,Ids,xds,wds,Rds,Pds,kds,Dds,Nds,Mds,Ods,Bds,Lds,Fds,Uds,Qds,qds,Gds,Hds,jds,$ds,Vds,Wds,zds,Yds,Kds,Jds,Xds,Zds,efs,tfs,rfs,nfs,ifs,ofs,sfs,afs,cfs,lfs,ufs,dfs,ffs,pfs,hfs,mfs,gfs,Afs,yfs,Efs,_fs,Cfs,vfs,bfs,Tfs,Sfs,Ifs,xfs,wfs,qOn,GOn,HOn,jOn,$On,VOn,WOn,zOn,YOn,KOn,JOn,XOn,ZOn,eBn,tBn,rBn,nBn,iBn,oBn,sBn,aBn,cBn,lBn,uBn,dBn,fBn,pBn,hBn,mBn,gBn,ABn,yBn,EBn,_Bn,CBn,vBn,bBn,TBn,SBn,IBn,xBn,wBn,RBn,PBn,kBn,DBn,NBn,Rfs,Pfs,kfs,Dfs,Nfs,Mfs,Ofs,Bfs,Lfs,Ffs,Ufs,Qfs,qfs,Gfs,Hfs,jfs,$fs,Vfs,Wfs,zfs,Yfs,Kfs,Jfs,Xfs,Zfs,e0s,t0s,r0s,n0s,i0s,o0s,s0s,a0s,c0s,l0s,u0s,d0s,f0s,p0s,h0s,m0s,g0s,A0s,y0s,E0s,_0s,C0s,v0s,MBn,OBn,BBn,LBn,FBn,UBn,QBn,qBn,GBn,HBn,jBn,b0s,T0s,S0s,I0s,x0s,w0s,R0s,P0s,k0s,D0s,N0s,M0s,$Bn,VBn,WBn,zBn,YBn,O0s,B0s,L0s,F0s,U0s,Q0s,KBn,JBn,XBn,q0s,G0s,H0s,j0s,ZBn,e3n,t3n,r3n,$0s,V0s,W0s,z0s,Y0s,n3n,i3n,o3n,s3n,a3n,c3n,l3n,K0s,J0s,X0s,Z0s,eps,tps,rps,nps,u3n,d3n,f3n,p3n,h3n,ips,ops,sps,aps,cps,lps,m3n,g3n,A3n,y3n,E3n,_3n,C3n,v3n,b3n,T3n,S3n,I3n,x3n,w3n,R3n,P3n,k3n,D3n,N3n,M3n,O3n,ups,dps,fps,pps,hps,mps,gps,Aps,yps,Eps,_ps,Cps,vps,bps,Tps,Sps,Ips,xps,wps,Rps,Pps,kps,B3n,L3n,F3n,U3n,Q3n,Dps,Nps,Mps,Ops,Bps,Lps,q3n,G3n,Fps,Ups,Qps,H3n,j3n,qps,Gps,Hps,$3n,V3n,W3n,z3n,Y3n,K3n,J3n,X3n,Z3n,eLn,tLn,rLn,nLn,iLn,oLn,sLn,aLn,jps,$ps,Vps,Wps,zps,Yps,Kps,Jps,Xps,Zps,ehs,ths,rhs,nhs,ihs,ohs,shs,ahs,cLn,lLn,chs,lhs,uhs,uLn=Pe(()=>{f();nKt();CMn="aws.lambda.invoked_arn",vMn="db.system",bMn="db.connection_string",TMn="db.user",SMn="db.jdbc.driver_classname",IMn="db.name",xMn="db.statement",wMn="db.operation",RMn="db.mssql.instance_name",PMn="db.cassandra.keyspace",kMn="db.cassandra.page_size",DMn="db.cassandra.consistency_level",NMn="db.cassandra.table",MMn="db.cassandra.idempotence",OMn="db.cassandra.speculative_execution_count",BMn="db.cassandra.coordinator.id",LMn="db.cassandra.coordinator.dc",FMn="db.hbase.namespace",UMn="db.redis.database_index",QMn="db.mongodb.collection",qMn="db.sql.table",GMn="exception.type",HMn="exception.message",jMn="exception.stacktrace",$Mn="exception.escaped",VMn="faas.trigger",WMn="faas.execution",zMn="faas.document.collection",YMn="faas.document.operation",KMn="faas.document.time",JMn="faas.document.name",XMn="faas.time",ZMn="faas.cron",e4n="faas.coldstart",t4n="faas.invoked_name",r4n="faas.invoked_provider",n4n="faas.invoked_region",i4n="net.transport",o4n="net.peer.ip",s4n="net.peer.port",a4n="net.peer.name",c4n="net.host.ip",l4n="net.host.port",u4n="net.host.name",d4n="net.host.connection.type",f4n="net.host.connection.subtype",p4n="net.host.carrier.name",h4n="net.host.carrier.mcc",m4n="net.host.carrier.mnc",g4n="net.host.carrier.icc",A4n="peer.service",y4n="enduser.id",E4n="enduser.role",_4n="enduser.scope",C4n="thread.id",v4n="thread.name",b4n="code.function",T4n="code.namespace",S4n="code.filepath",I4n="code.lineno",x4n="http.method",w4n="http.url",R4n="http.target",P4n="http.host",k4n="http.scheme",D4n="http.status_code",N4n="http.flavor",M4n="http.user_agent",O4n="http.request_content_length",B4n="http.request_content_length_uncompressed",L4n="http.response_content_length",F4n="http.response_content_length_uncompressed",U4n="http.server_name",Q4n="http.route",q4n="http.client_ip",G4n="aws.dynamodb.table_names",H4n="aws.dynamodb.consumed_capacity",j4n="aws.dynamodb.item_collection_metrics",$4n="aws.dynamodb.provisioned_read_capacity",V4n="aws.dynamodb.provisioned_write_capacity",W4n="aws.dynamodb.consistent_read",z4n="aws.dynamodb.projection",Y4n="aws.dynamodb.limit",K4n="aws.dynamodb.attributes_to_get",J4n="aws.dynamodb.index_name",X4n="aws.dynamodb.select",Z4n="aws.dynamodb.global_secondary_indexes",eOn="aws.dynamodb.local_secondary_indexes",tOn="aws.dynamodb.exclusive_start_table",rOn="aws.dynamodb.table_count",nOn="aws.dynamodb.scan_forward",iOn="aws.dynamodb.segment",oOn="aws.dynamodb.total_segments",sOn="aws.dynamodb.count",aOn="aws.dynamodb.scanned_count",cOn="aws.dynamodb.attribute_definitions",lOn="aws.dynamodb.global_secondary_index_updates",uOn="messaging.system",dOn="messaging.destination",fOn="messaging.destination_kind",pOn="messaging.temp_destination",hOn="messaging.protocol",mOn="messaging.protocol_version",gOn="messaging.url",AOn="messaging.message_id",yOn="messaging.conversation_id",EOn="messaging.message_payload_size_bytes",_On="messaging.message_payload_compressed_size_bytes",COn="messaging.operation",vOn="messaging.consumer_id",bOn="messaging.rabbitmq.routing_key",TOn="messaging.kafka.message_key",SOn="messaging.kafka.consumer_group",IOn="messaging.kafka.client_id",xOn="messaging.kafka.partition",wOn="messaging.kafka.tombstone",ROn="rpc.system",POn="rpc.service",kOn="rpc.method",DOn="rpc.grpc.status_code",NOn="rpc.jsonrpc.version",MOn="rpc.jsonrpc.request_id",OOn="rpc.jsonrpc.error_code",BOn="rpc.jsonrpc.error_message",LOn="message.type",FOn="message.id",UOn="message.compressed_size",QOn="message.uncompressed_size",cus=CMn,lus=vMn,uus=bMn,dus=TMn,fus=SMn,pus=IMn,hus=xMn,mus=wMn,gus=RMn,Aus=PMn,yus=kMn,Eus=DMn,_us=NMn,Cus=MMn,vus=OMn,bus=BMn,Tus=LMn,Sus=FMn,Ius=UMn,xus=QMn,wus=qMn,Rus=GMn,Pus=HMn,kus=jMn,Dus=$Mn,Nus=VMn,Mus=WMn,Ous=zMn,Bus=YMn,Lus=KMn,Fus=JMn,Uus=XMn,Qus=ZMn,qus=e4n,Gus=t4n,Hus=r4n,jus=n4n,$us=i4n,Vus=o4n,Wus=s4n,zus=a4n,Yus=c4n,Kus=l4n,Jus=u4n,Xus=d4n,Zus=f4n,eds=p4n,tds=h4n,rds=m4n,nds=g4n,ids=A4n,ods=y4n,sds=E4n,ads=_4n,cds=C4n,lds=v4n,uds=b4n,dds=T4n,fds=S4n,pds=I4n,hds=x4n,mds=w4n,gds=R4n,Ads=P4n,yds=k4n,Eds=D4n,_ds=N4n,Cds=M4n,vds=O4n,bds=B4n,Tds=L4n,Sds=F4n,Ids=U4n,xds=Q4n,wds=q4n,Rds=G4n,Pds=H4n,kds=j4n,Dds=$4n,Nds=V4n,Mds=W4n,Ods=z4n,Bds=Y4n,Lds=K4n,Fds=J4n,Uds=X4n,Qds=Z4n,qds=eOn,Gds=tOn,Hds=rOn,jds=nOn,$ds=iOn,Vds=oOn,Wds=sOn,zds=aOn,Yds=cOn,Kds=lOn,Jds=uOn,Xds=dOn,Zds=fOn,efs=pOn,tfs=hOn,rfs=mOn,nfs=gOn,ifs=AOn,ofs=yOn,sfs=EOn,afs=_On,cfs=COn,lfs=vOn,ufs=bOn,dfs=TOn,ffs=SOn,pfs=IOn,hfs=xOn,mfs=wOn,gfs=ROn,Afs=POn,yfs=kOn,Efs=DOn,_fs=NOn,Cfs=MOn,vfs=OOn,bfs=BOn,Tfs=LOn,Sfs=FOn,Ifs=UOn,xfs=QOn,wfs=Sf([CMn,vMn,bMn,TMn,SMn,IMn,xMn,wMn,RMn,PMn,kMn,DMn,NMn,MMn,OMn,BMn,LMn,FMn,UMn,QMn,qMn,GMn,HMn,jMn,$Mn,VMn,WMn,zMn,YMn,KMn,JMn,XMn,ZMn,e4n,t4n,r4n,n4n,i4n,o4n,s4n,a4n,c4n,l4n,u4n,d4n,f4n,p4n,h4n,m4n,g4n,A4n,y4n,E4n,_4n,C4n,v4n,b4n,T4n,S4n,I4n,x4n,w4n,R4n,P4n,k4n,D4n,N4n,M4n,O4n,B4n,L4n,F4n,U4n,Q4n,q4n,G4n,H4n,j4n,$4n,V4n,W4n,z4n,Y4n,K4n,J4n,X4n,Z4n,eOn,tOn,rOn,nOn,iOn,oOn,sOn,aOn,cOn,lOn,uOn,dOn,fOn,pOn,hOn,mOn,gOn,AOn,yOn,EOn,_On,COn,vOn,bOn,TOn,SOn,IOn,xOn,wOn,ROn,POn,kOn,DOn,NOn,MOn,OOn,BOn,LOn,FOn,UOn,QOn]),qOn="other_sql",GOn="mssql",HOn="mysql",jOn="oracle",$On="db2",VOn="postgresql",WOn="redshift",zOn="hive",YOn="cloudscape",KOn="hsqldb",JOn="progress",XOn="maxdb",ZOn="hanadb",eBn="ingres",tBn="firstsql",rBn="edb",nBn="cache",iBn="adabas",oBn="firebird",sBn="derby",aBn="filemaker",cBn="informix",lBn="instantdb",uBn="interbase",dBn="mariadb",fBn="netezza",pBn="pervasive",hBn="pointbase",mBn="sqlite",gBn="sybase",ABn="teradata",yBn="vertica",EBn="h2",_Bn="coldfusion",CBn="cassandra",vBn="hbase",bBn="mongodb",TBn="redis",SBn="couchbase",IBn="couchdb",xBn="cosmosdb",wBn="dynamodb",RBn="neo4j",PBn="geode",kBn="elasticsearch",DBn="memcached",NBn="cockroachdb",Rfs=qOn,Pfs=GOn,kfs=HOn,Dfs=jOn,Nfs=$On,Mfs=VOn,Ofs=WOn,Bfs=zOn,Lfs=YOn,Ffs=KOn,Ufs=JOn,Qfs=XOn,qfs=ZOn,Gfs=eBn,Hfs=tBn,jfs=rBn,$fs=nBn,Vfs=iBn,Wfs=oBn,zfs=sBn,Yfs=aBn,Kfs=cBn,Jfs=lBn,Xfs=uBn,Zfs=dBn,e0s=fBn,t0s=pBn,r0s=hBn,n0s=mBn,i0s=gBn,o0s=ABn,s0s=yBn,a0s=EBn,c0s=_Bn,l0s=CBn,u0s=vBn,d0s=bBn,f0s=TBn,p0s=SBn,h0s=IBn,m0s=xBn,g0s=wBn,A0s=RBn,y0s=PBn,E0s=kBn,_0s=DBn,C0s=NBn,v0s=Sf([qOn,GOn,HOn,jOn,$On,VOn,WOn,zOn,YOn,KOn,JOn,XOn,ZOn,eBn,tBn,rBn,nBn,iBn,oBn,sBn,aBn,cBn,lBn,uBn,dBn,fBn,pBn,hBn,mBn,gBn,ABn,yBn,EBn,_Bn,CBn,vBn,bBn,TBn,SBn,IBn,xBn,wBn,RBn,PBn,kBn,DBn,NBn]),MBn="all",OBn="each_quorum",BBn="quorum",LBn="local_quorum",FBn="one",UBn="two",QBn="three",qBn="local_one",GBn="any",HBn="serial",jBn="local_serial",b0s=MBn,T0s=OBn,S0s=BBn,I0s=LBn,x0s=FBn,w0s=UBn,R0s=QBn,P0s=qBn,k0s=GBn,D0s=HBn,N0s=jBn,M0s=Sf([MBn,OBn,BBn,LBn,FBn,UBn,QBn,qBn,GBn,HBn,jBn]),$Bn="datasource",VBn="http",WBn="pubsub",zBn="timer",YBn="other",O0s=$Bn,B0s=VBn,L0s=WBn,F0s=zBn,U0s=YBn,Q0s=Sf([$Bn,VBn,WBn,zBn,YBn]),KBn="insert",JBn="edit",XBn="delete",q0s=KBn,G0s=JBn,H0s=XBn,j0s=Sf([KBn,JBn,XBn]),ZBn="alibaba_cloud",e3n="aws",t3n="azure",r3n="gcp",$0s=ZBn,V0s=e3n,W0s=t3n,z0s=r3n,Y0s=Sf([ZBn,e3n,t3n,r3n]),n3n="ip_tcp",i3n="ip_udp",o3n="ip",s3n="unix",a3n="pipe",c3n="inproc",l3n="other",K0s=n3n,J0s=i3n,X0s=o3n,Z0s=s3n,eps=a3n,tps=c3n,rps=l3n,nps=Sf([n3n,i3n,o3n,s3n,a3n,c3n,l3n]),u3n="wifi",d3n="wired",f3n="cell",p3n="unavailable",h3n="unknown",ips=u3n,ops=d3n,sps=f3n,aps=p3n,cps=h3n,lps=Sf([u3n,d3n,f3n,p3n,h3n]),m3n="gprs",g3n="edge",A3n="umts",y3n="cdma",E3n="evdo_0",_3n="evdo_a",C3n="cdma2000_1xrtt",v3n="hsdpa",b3n="hsupa",T3n="hspa",S3n="iden",I3n="evdo_b",x3n="lte",w3n="ehrpd",R3n="hspap",P3n="gsm",k3n="td_scdma",D3n="iwlan",N3n="nr",M3n="nrnsa",O3n="lte_ca",ups=m3n,dps=g3n,fps=A3n,pps=y3n,hps=E3n,mps=_3n,gps=C3n,Aps=v3n,yps=b3n,Eps=T3n,_ps=S3n,Cps=I3n,vps=x3n,bps=w3n,Tps=R3n,Sps=P3n,Ips=k3n,xps=D3n,wps=N3n,Rps=M3n,Pps=O3n,kps=Sf([m3n,g3n,A3n,y3n,E3n,_3n,C3n,v3n,b3n,T3n,S3n,I3n,x3n,w3n,R3n,P3n,k3n,D3n,N3n,M3n,O3n]),B3n="1.0",L3n="1.1",F3n="2.0",U3n="SPDY",Q3n="QUIC",Dps=B3n,Nps=L3n,Mps=F3n,Ops=U3n,Bps=Q3n,Lps={HTTP_1_0:B3n,HTTP_1_1:L3n,HTTP_2_0:F3n,SPDY:U3n,QUIC:Q3n},q3n="queue",G3n="topic",Fps=q3n,Ups=G3n,Qps=Sf([q3n,G3n]),H3n="receive",j3n="process",qps=H3n,Gps=j3n,Hps=Sf([H3n,j3n]),$3n=0,V3n=1,W3n=2,z3n=3,Y3n=4,K3n=5,J3n=6,X3n=7,Z3n=8,eLn=9,tLn=10,rLn=11,nLn=12,iLn=13,oLn=14,sLn=15,aLn=16,jps=$3n,$ps=V3n,Vps=W3n,Wps=z3n,zps=Y3n,Yps=K3n,Kps=J3n,Jps=X3n,Xps=Z3n,Zps=eLn,ehs=tLn,ths=rLn,rhs=nLn,nhs=iLn,ihs=oLn,ohs=sLn,shs=aLn,ahs={OK:$3n,CANCELLED:V3n,UNKNOWN:W3n,INVALID_ARGUMENT:z3n,DEADLINE_EXCEEDED:Y3n,NOT_FOUND:K3n,ALREADY_EXISTS:J3n,PERMISSION_DENIED:X3n,RESOURCE_EXHAUSTED:Z3n,FAILED_PRECONDITION:eLn,ABORTED:tLn,OUT_OF_RANGE:rLn,UNIMPLEMENTED:nLn,INTERNAL:iLn,UNAVAILABLE:oLn,DATA_LOSS:sLn,UNAUTHENTICATED:aLn},cLn="SENT",lLn="RECEIVED",chs=cLn,lhs=lLn,uhs=Sf([cLn,lLn])});var dLn=Pe(()=>{f();uLn()});var fLn,pLn,hLn,mLn,gLn,ALn,yLn,ELn,_Ln,CLn,vLn,bLn,TLn,SLn,ILn,xLn,wLn,RLn,PLn,kLn,DLn,NLn,MLn,OLn,BLn,LLn,FLn,ULn,QLn,qLn,GLn,HLn,jLn,$Ln,VLn,WLn,zLn,YLn,KLn,JLn,XLn,ZLn,e8n,t8n,r8n,n8n,i8n,o8n,s8n,a8n,c8n,l8n,u8n,d8n,f8n,p8n,h8n,m8n,g8n,A8n,y8n,E8n,_8n,C8n,v8n,b8n,T8n,S8n,I8n,x8n,w8n,R8n,P8n,k8n,D8n,N8n,M8n,O8n,B8n,L8n,F8n,dhs,fhs,phs,hhs,mhs,ghs,Ahs,yhs,Ehs,_hs,Chs,vhs,bhs,Ths,Shs,Ihs,xhs,whs,Rhs,Phs,khs,Dhs,Nhs,Mhs,Ohs,Bhs,Lhs,Fhs,Uhs,Qhs,qhs,Ghs,Hhs,jhs,$hs,Vhs,Whs,zhs,Yhs,Khs,Jhs,Xhs,Zhs,ems,tms,rms,nms,ims,oms,sms,ams,cms,lms,ums,dms,fms,pms,hms,mms,gms,Ams,yms,Ems,_ms,Cms,vms,bms,Tms,Sms,Ims,xms,wms,Rms,Pms,kms,Dms,Nms,Mms,Oms,Bms,Lms,Fms,U8n,Q8n,q8n,G8n,Ums,Qms,qms,Gms,Hms,H8n,j8n,$8n,V8n,W8n,z8n,Y8n,K8n,J8n,X8n,Z8n,e6n,t6n,r6n,n6n,i6n,o6n,jms,$ms,Vms,Wms,zms,Yms,Kms,Jms,Xms,Zms,egs,tgs,rgs,ngs,igs,ogs,sgs,ags,s6n,a6n,cgs,lgs,ugs,c6n,l6n,u6n,d6n,f6n,p6n,h6n,dgs,fgs,pgs,hgs,mgs,ggs,Ags,ygs,m6n,g6n,A6n,y6n,E6n,_6n,C6n,v6n,b6n,T6n,S6n,Egs,_gs,Cgs,vgs,bgs,Tgs,Sgs,Igs,xgs,wgs,Rgs,Pgs,I6n,x6n,w6n,R6n,P6n,k6n,D6n,N6n,M6n,O6n,kgs,Dgs,Ngs,Mgs,Ogs,Bgs,Lgs,Fgs,Ugs,Qgs,qgs,B6n=Pe(()=>{f();nKt();fLn="cloud.provider",pLn="cloud.account.id",hLn="cloud.region",mLn="cloud.availability_zone",gLn="cloud.platform",ALn="aws.ecs.container.arn",yLn="aws.ecs.cluster.arn",ELn="aws.ecs.launchtype",_Ln="aws.ecs.task.arn",CLn="aws.ecs.task.family",vLn="aws.ecs.task.revision",bLn="aws.eks.cluster.arn",TLn="aws.log.group.names",SLn="aws.log.group.arns",ILn="aws.log.stream.names",xLn="aws.log.stream.arns",wLn="container.name",RLn="container.id",PLn="container.runtime",kLn="container.image.name",DLn="container.image.tag",NLn="deployment.environment",MLn="device.id",OLn="device.model.identifier",BLn="device.model.name",LLn="faas.name",FLn="faas.id",ULn="faas.version",QLn="faas.instance",qLn="faas.max_memory",GLn="host.id",HLn="host.name",jLn="host.type",$Ln="host.arch",VLn="host.image.name",WLn="host.image.id",zLn="host.image.version",YLn="k8s.cluster.name",KLn="k8s.node.name",JLn="k8s.node.uid",XLn="k8s.namespace.name",ZLn="k8s.pod.uid",e8n="k8s.pod.name",t8n="k8s.container.name",r8n="k8s.replicaset.uid",n8n="k8s.replicaset.name",i8n="k8s.deployment.uid",o8n="k8s.deployment.name",s8n="k8s.statefulset.uid",a8n="k8s.statefulset.name",c8n="k8s.daemonset.uid",l8n="k8s.daemonset.name",u8n="k8s.job.uid",d8n="k8s.job.name",f8n="k8s.cronjob.uid",p8n="k8s.cronjob.name",h8n="os.type",m8n="os.description",g8n="os.name",A8n="os.version",y8n="process.pid",E8n="process.executable.name",_8n="process.executable.path",C8n="process.command",v8n="process.command_line",b8n="process.command_args",T8n="process.owner",S8n="process.runtime.name",I8n="process.runtime.version",x8n="process.runtime.description",w8n="service.name",R8n="service.namespace",P8n="service.instance.id",k8n="service.version",D8n="telemetry.sdk.name",N8n="telemetry.sdk.language",M8n="telemetry.sdk.version",O8n="telemetry.auto.version",B8n="webengine.name",L8n="webengine.version",F8n="webengine.description",dhs=fLn,fhs=pLn,phs=hLn,hhs=mLn,mhs=gLn,ghs=ALn,Ahs=yLn,yhs=ELn,Ehs=_Ln,_hs=CLn,Chs=vLn,vhs=bLn,bhs=TLn,Ths=SLn,Shs=ILn,Ihs=xLn,xhs=wLn,whs=RLn,Rhs=PLn,Phs=kLn,khs=DLn,Dhs=NLn,Nhs=MLn,Mhs=OLn,Ohs=BLn,Bhs=LLn,Lhs=FLn,Fhs=ULn,Uhs=QLn,Qhs=qLn,qhs=GLn,Ghs=HLn,Hhs=jLn,jhs=$Ln,$hs=VLn,Vhs=WLn,Whs=zLn,zhs=YLn,Yhs=KLn,Khs=JLn,Jhs=XLn,Xhs=ZLn,Zhs=e8n,ems=t8n,tms=r8n,rms=n8n,nms=i8n,ims=o8n,oms=s8n,sms=a8n,ams=c8n,cms=l8n,lms=u8n,ums=d8n,dms=f8n,fms=p8n,pms=h8n,hms=m8n,mms=g8n,gms=A8n,Ams=y8n,yms=E8n,Ems=_8n,_ms=C8n,Cms=v8n,vms=b8n,bms=T8n,Tms=S8n,Sms=I8n,Ims=x8n,xms=w8n,wms=R8n,Rms=P8n,Pms=k8n,kms=D8n,Dms=N8n,Nms=M8n,Mms=O8n,Oms=B8n,Bms=L8n,Lms=F8n,Fms=Sf([fLn,pLn,hLn,mLn,gLn,ALn,yLn,ELn,_Ln,CLn,vLn,bLn,TLn,SLn,ILn,xLn,wLn,RLn,PLn,kLn,DLn,NLn,MLn,OLn,BLn,LLn,FLn,ULn,QLn,qLn,GLn,HLn,jLn,$Ln,VLn,WLn,zLn,YLn,KLn,JLn,XLn,ZLn,e8n,t8n,r8n,n8n,i8n,o8n,s8n,a8n,c8n,l8n,u8n,d8n,f8n,p8n,h8n,m8n,g8n,A8n,y8n,E8n,_8n,C8n,v8n,b8n,T8n,S8n,I8n,x8n,w8n,R8n,P8n,k8n,D8n,N8n,M8n,O8n,B8n,L8n,F8n]),U8n="alibaba_cloud",Q8n="aws",q8n="azure",G8n="gcp",Ums=U8n,Qms=Q8n,qms=q8n,Gms=G8n,Hms=Sf([U8n,Q8n,q8n,G8n]),H8n="alibaba_cloud_ecs",j8n="alibaba_cloud_fc",$8n="aws_ec2",V8n="aws_ecs",W8n="aws_eks",z8n="aws_lambda",Y8n="aws_elastic_beanstalk",K8n="azure_vm",J8n="azure_container_instances",X8n="azure_aks",Z8n="azure_functions",e6n="azure_app_service",t6n="gcp_compute_engine",r6n="gcp_cloud_run",n6n="gcp_kubernetes_engine",i6n="gcp_cloud_functions",o6n="gcp_app_engine",jms=H8n,$ms=j8n,Vms=$8n,Wms=V8n,zms=W8n,Yms=z8n,Kms=Y8n,Jms=K8n,Xms=J8n,Zms=X8n,egs=Z8n,tgs=e6n,rgs=t6n,ngs=r6n,igs=n6n,ogs=i6n,sgs=o6n,ags=Sf([H8n,j8n,$8n,V8n,W8n,z8n,Y8n,K8n,J8n,X8n,Z8n,e6n,t6n,r6n,n6n,i6n,o6n]),s6n="ec2",a6n="fargate",cgs=s6n,lgs=a6n,ugs=Sf([s6n,a6n]),c6n="amd64",l6n="arm32",u6n="arm64",d6n="ia64",f6n="ppc32",p6n="ppc64",h6n="x86",dgs=c6n,fgs=l6n,pgs=u6n,hgs=d6n,mgs=f6n,ggs=p6n,Ags=h6n,ygs=Sf([c6n,l6n,u6n,d6n,f6n,p6n,h6n]),m6n="windows",g6n="linux",A6n="darwin",y6n="freebsd",E6n="netbsd",_6n="openbsd",C6n="dragonflybsd",v6n="hpux",b6n="aix",T6n="solaris",S6n="z_os",Egs=m6n,_gs=g6n,Cgs=A6n,vgs=y6n,bgs=E6n,Tgs=_6n,Sgs=C6n,Igs=v6n,xgs=b6n,wgs=T6n,Rgs=S6n,Pgs=Sf([m6n,g6n,A6n,y6n,E6n,_6n,C6n,v6n,b6n,T6n,S6n]),I6n="cpp",x6n="dotnet",w6n="erlang",R6n="go",P6n="java",k6n="nodejs",D6n="php",N6n="python",M6n="ruby",O6n="webjs",kgs=I6n,Dgs=x6n,Ngs=w6n,Mgs=R6n,Ogs=P6n,Bgs=k6n,Lgs=D6n,Fgs=N6n,Ugs=M6n,Qgs=O6n,qgs=Sf([I6n,x6n,w6n,R6n,P6n,k6n,D6n,N6n,M6n,O6n])});var L6n=Pe(()=>{f();B6n()});var Ggs,Hgs,jgs,$gs,Vgs,Wgs,zgs,Ygs,Kgs,Jgs,Xgs,Zgs,eAs,tAs,rAs,nAs,iAs,oAs,sAs,aAs,cAs,lAs,uAs,dAs,fAs,pAs,hAs,mAs,gAs,AAs,yAs,EAs,_As,CAs,vAs,bAs,TAs,SAs,IAs,xAs,wAs,RAs,sbd,abd,PAs,kAs,DAs,NAs,MAs,OAs,BAs,LAs,FAs,UAs,QAs,qAs,GAs,HAs,jAs,$As,VAs,WAs,zAs,YAs,KAs,JAs,XAs,ZAs,eys,tys,rys,nys,iys,oys,sys,ays,cys,lys,uys,dys,fys,pys,hys,mys,gys,Ays,yys,Eys,_ys,Cys,vys,bys,Tys,Sys,Iys,xys,wys,Rys,Pys,kys,Dys,Nys,Mys,Oys,Bys,Lys,Fys,Uys,Qys,qys,Gys,Hys,jys,$ys,iKt,Vys,Wys,zys,Yys,Kys,oKt,Jys,Xys,Zys,eEs,tEs,rEs,sKt,aKt,nEs,iEs,oEs,sEs,aEs,cEs,F6n=Pe(()=>{f();Ggs="aspnetcore.diagnostics.exception.result",Hgs="aborted",jgs="handled",$gs="skipped",Vgs="unhandled",Wgs="aspnetcore.diagnostics.handler.type",zgs="aspnetcore.rate_limiting.policy",Ygs="aspnetcore.rate_limiting.result",Kgs="acquired",Jgs="endpoint_limiter",Xgs="global_limiter",Zgs="request_canceled",eAs="aspnetcore.request.is_unhandled",tAs="aspnetcore.routing.is_fallback",rAs="aspnetcore.routing.match_status",nAs="failure",iAs="success",oAs="aspnetcore.user.is_authenticated",sAs="client.address",aAs="client.port",cAs="code.column.number",lAs="code.file.path",uAs="code.function.name",dAs="code.line.number",fAs="code.stacktrace",pAs="db.collection.name",hAs="db.namespace",mAs="db.operation.batch.size",gAs="db.operation.name",AAs="db.query.summary",yAs="db.query.text",EAs="db.response.status_code",_As="db.stored_procedure.name",CAs="db.system.name",vAs="mariadb",bAs="microsoft.sql_server",TAs="mysql",SAs="postgresql",IAs="dotnet.gc.heap.generation",xAs="gen0",wAs="gen1",RAs="gen2",sbd="loh",abd="poh",PAs="error.type",kAs="_OTHER",DAs="exception.escaped",NAs="exception.message",MAs="exception.stacktrace",OAs="exception.type",BAs=a(t=>`http.request.header.${t}`,"ATTR_HTTP_REQUEST_HEADER"),LAs="http.request.method",FAs="_OTHER",UAs="CONNECT",QAs="DELETE",qAs="GET",GAs="HEAD",HAs="OPTIONS",jAs="PATCH",$As="POST",VAs="PUT",WAs="TRACE",zAs="http.request.method_original",YAs="http.request.resend_count",KAs=a(t=>`http.response.header.${t}`,"ATTR_HTTP_RESPONSE_HEADER"),JAs="http.response.status_code",XAs="http.route",ZAs="jvm.gc.action",eys="jvm.gc.name",tys="jvm.memory.pool.name",rys="jvm.memory.type",nys="heap",iys="non_heap",oys="jvm.thread.daemon",sys="jvm.thread.state",ays="blocked",cys="new",lys="runnable",uys="terminated",dys="timed_waiting",fys="waiting",pys="network.local.address",hys="network.local.port",mys="network.peer.address",gys="network.peer.port",Ays="network.protocol.name",yys="network.protocol.version",Eys="network.transport",_ys="pipe",Cys="quic",vys="tcp",bys="udp",Tys="unix",Sys="network.type",Iys="ipv4",xys="ipv6",wys="otel.scope.name",Rys="otel.scope.version",Pys="otel.status_code",kys="ERROR",Dys="OK",Nys="otel.status_description",Mys="server.address",Oys="server.port",Bys="service.name",Lys="service.version",Fys="signalr.connection.status",Uys="app_shutdown",Qys="normal_closure",qys="timeout",Gys="signalr.transport",Hys="long_polling",jys="server_sent_events",$ys="web_sockets",iKt="telemetry.sdk.language",Vys="cpp",Wys="dotnet",zys="erlang",Yys="go",Kys="java",oKt="nodejs",Jys="php",Xys="python",Zys="ruby",eEs="rust",tEs="swift",rEs="webjs",sKt="telemetry.sdk.name",aKt="telemetry.sdk.version",nEs="url.fragment",iEs="url.full",oEs="url.path",sEs="url.query",aEs="url.scheme",cEs="user_agent.original"});var lEs,uEs,dEs,fEs,pEs,hEs,mEs,gEs,AEs,yEs,EEs,_Es,CEs,vEs,bEs,TEs,SEs,IEs,xEs,wEs,REs,PEs,kEs,DEs,NEs,MEs,OEs,BEs,LEs,FEs,UEs,QEs,qEs,GEs,HEs,jEs,$Es,VEs,WEs,zEs,YEs,KEs,JEs,XEs,ZEs,e_s,t_s,r_s,n_s,i_s,o_s,U6n=Pe(()=>{f();lEs="aspnetcore.diagnostics.exceptions",uEs="aspnetcore.rate_limiting.active_request_leases",dEs="aspnetcore.rate_limiting.queued_requests",fEs="aspnetcore.rate_limiting.request.time_in_queue",pEs="aspnetcore.rate_limiting.request_lease.duration",hEs="aspnetcore.rate_limiting.requests",mEs="aspnetcore.routing.match_attempts",gEs="db.client.operation.duration",AEs="dotnet.assembly.count",yEs="dotnet.exceptions",EEs="dotnet.gc.collections",_Es="dotnet.gc.heap.total_allocated",CEs="dotnet.gc.last_collection.heap.fragmentation.size",vEs="dotnet.gc.last_collection.heap.size",bEs="dotnet.gc.last_collection.memory.committed_size",TEs="dotnet.gc.pause.time",SEs="dotnet.jit.compilation.time",IEs="dotnet.jit.compiled_il.size",xEs="dotnet.jit.compiled_methods",wEs="dotnet.monitor.lock_contentions",REs="dotnet.process.cpu.count",PEs="dotnet.process.cpu.time",kEs="dotnet.process.memory.working_set",DEs="dotnet.thread_pool.queue.length",NEs="dotnet.thread_pool.thread.count",MEs="dotnet.thread_pool.work_item.count",OEs="dotnet.timer.count",BEs="http.client.request.duration",LEs="http.server.request.duration",FEs="jvm.class.count",UEs="jvm.class.loaded",QEs="jvm.class.unloaded",qEs="jvm.cpu.count",GEs="jvm.cpu.recent_utilization",HEs="jvm.cpu.time",jEs="jvm.gc.duration",$Es="jvm.memory.committed",VEs="jvm.memory.limit",WEs="jvm.memory.used",zEs="jvm.memory.used_after_last_gc",YEs="jvm.thread.count",KEs="kestrel.active_connections",JEs="kestrel.active_tls_handshakes",XEs="kestrel.connection.duration",ZEs="kestrel.queued_connections",e_s="kestrel.queued_requests",t_s="kestrel.rejected_connections",r_s="kestrel.tls_handshake.duration",n_s="kestrel.upgraded_connections",i_s="signalr.server.active_connections",o_s="signalr.server.connection.duration"});var s_s,Q6n=Pe(()=>{f();s_s="exception"});var cKt={};ui(cKt,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Hgs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>jgs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>$gs,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Vgs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Kgs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Jgs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Xgs,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Zgs,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>nAs,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>iAs,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Ggs,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Wgs,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>zgs,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ygs,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>eAs,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>tAs,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>rAs,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>oAs,ATTR_CLIENT_ADDRESS:()=>sAs,ATTR_CLIENT_PORT:()=>aAs,ATTR_CODE_COLUMN_NUMBER:()=>cAs,ATTR_CODE_FILE_PATH:()=>lAs,ATTR_CODE_FUNCTION_NAME:()=>uAs,ATTR_CODE_LINE_NUMBER:()=>dAs,ATTR_CODE_STACKTRACE:()=>fAs,ATTR_DB_COLLECTION_NAME:()=>pAs,ATTR_DB_NAMESPACE:()=>hAs,ATTR_DB_OPERATION_BATCH_SIZE:()=>mAs,ATTR_DB_OPERATION_NAME:()=>gAs,ATTR_DB_QUERY_SUMMARY:()=>AAs,ATTR_DB_QUERY_TEXT:()=>yAs,ATTR_DB_RESPONSE_STATUS_CODE:()=>EAs,ATTR_DB_STORED_PROCEDURE_NAME:()=>_As,ATTR_DB_SYSTEM_NAME:()=>CAs,ATTR_DOTNET_GC_HEAP_GENERATION:()=>IAs,ATTR_ERROR_TYPE:()=>PAs,ATTR_EXCEPTION_ESCAPED:()=>DAs,ATTR_EXCEPTION_MESSAGE:()=>NAs,ATTR_EXCEPTION_STACKTRACE:()=>MAs,ATTR_EXCEPTION_TYPE:()=>OAs,ATTR_HTTP_REQUEST_HEADER:()=>BAs,ATTR_HTTP_REQUEST_METHOD:()=>LAs,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>zAs,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>YAs,ATTR_HTTP_RESPONSE_HEADER:()=>KAs,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>JAs,ATTR_HTTP_ROUTE:()=>XAs,ATTR_JVM_GC_ACTION:()=>ZAs,ATTR_JVM_GC_NAME:()=>eys,ATTR_JVM_MEMORY_POOL_NAME:()=>tys,ATTR_JVM_MEMORY_TYPE:()=>rys,ATTR_JVM_THREAD_DAEMON:()=>oys,ATTR_JVM_THREAD_STATE:()=>sys,ATTR_NETWORK_LOCAL_ADDRESS:()=>pys,ATTR_NETWORK_LOCAL_PORT:()=>hys,ATTR_NETWORK_PEER_ADDRESS:()=>mys,ATTR_NETWORK_PEER_PORT:()=>gys,ATTR_NETWORK_PROTOCOL_NAME:()=>Ays,ATTR_NETWORK_PROTOCOL_VERSION:()=>yys,ATTR_NETWORK_TRANSPORT:()=>Eys,ATTR_NETWORK_TYPE:()=>Sys,ATTR_OTEL_SCOPE_NAME:()=>wys,ATTR_OTEL_SCOPE_VERSION:()=>Rys,ATTR_OTEL_STATUS_CODE:()=>Pys,ATTR_OTEL_STATUS_DESCRIPTION:()=>Nys,ATTR_SERVER_ADDRESS:()=>Mys,ATTR_SERVER_PORT:()=>Oys,ATTR_SERVICE_NAME:()=>Bys,ATTR_SERVICE_VERSION:()=>Lys,ATTR_SIGNALR_CONNECTION_STATUS:()=>Fys,ATTR_SIGNALR_TRANSPORT:()=>Gys,ATTR_TELEMETRY_SDK_LANGUAGE:()=>iKt,ATTR_TELEMETRY_SDK_NAME:()=>sKt,ATTR_TELEMETRY_SDK_VERSION:()=>aKt,ATTR_URL_FRAGMENT:()=>nEs,ATTR_URL_FULL:()=>iEs,ATTR_URL_PATH:()=>oEs,ATTR_URL_QUERY:()=>sEs,ATTR_URL_SCHEME:()=>aEs,ATTR_USER_AGENT_ORIGINAL:()=>cEs,AWSECSLAUNCHTYPEVALUES_EC2:()=>cgs,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>lgs,AwsEcsLaunchtypeValues:()=>ugs,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>jms,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>$ms,CLOUDPLATFORMVALUES_AWS_EC2:()=>Vms,CLOUDPLATFORMVALUES_AWS_ECS:()=>Wms,CLOUDPLATFORMVALUES_AWS_EKS:()=>zms,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Kms,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Yms,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Zms,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>tgs,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Xms,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>egs,CLOUDPLATFORMVALUES_AZURE_VM:()=>Jms,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>sgs,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>ogs,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>ngs,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>rgs,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>igs,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Ums,CLOUDPROVIDERVALUES_AWS:()=>Qms,CLOUDPROVIDERVALUES_AZURE:()=>qms,CLOUDPROVIDERVALUES_GCP:()=>Gms,CloudPlatformValues:()=>ags,CloudProviderValues:()=>Hms,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>b0s,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>k0s,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>T0s,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>P0s,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>I0s,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>N0s,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>x0s,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>S0s,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>D0s,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>R0s,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>w0s,DBSYSTEMVALUES_ADABAS:()=>Vfs,DBSYSTEMVALUES_CACHE:()=>$fs,DBSYSTEMVALUES_CASSANDRA:()=>l0s,DBSYSTEMVALUES_CLOUDSCAPE:()=>Lfs,DBSYSTEMVALUES_COCKROACHDB:()=>C0s,DBSYSTEMVALUES_COLDFUSION:()=>c0s,DBSYSTEMVALUES_COSMOSDB:()=>m0s,DBSYSTEMVALUES_COUCHBASE:()=>p0s,DBSYSTEMVALUES_COUCHDB:()=>h0s,DBSYSTEMVALUES_DB2:()=>Nfs,DBSYSTEMVALUES_DERBY:()=>zfs,DBSYSTEMVALUES_DYNAMODB:()=>g0s,DBSYSTEMVALUES_EDB:()=>jfs,DBSYSTEMVALUES_ELASTICSEARCH:()=>E0s,DBSYSTEMVALUES_FILEMAKER:()=>Yfs,DBSYSTEMVALUES_FIREBIRD:()=>Wfs,DBSYSTEMVALUES_FIRSTSQL:()=>Hfs,DBSYSTEMVALUES_GEODE:()=>y0s,DBSYSTEMVALUES_H2:()=>a0s,DBSYSTEMVALUES_HANADB:()=>qfs,DBSYSTEMVALUES_HBASE:()=>u0s,DBSYSTEMVALUES_HIVE:()=>Bfs,DBSYSTEMVALUES_HSQLDB:()=>Ffs,DBSYSTEMVALUES_INFORMIX:()=>Kfs,DBSYSTEMVALUES_INGRES:()=>Gfs,DBSYSTEMVALUES_INSTANTDB:()=>Jfs,DBSYSTEMVALUES_INTERBASE:()=>Xfs,DBSYSTEMVALUES_MARIADB:()=>Zfs,DBSYSTEMVALUES_MAXDB:()=>Qfs,DBSYSTEMVALUES_MEMCACHED:()=>_0s,DBSYSTEMVALUES_MONGODB:()=>d0s,DBSYSTEMVALUES_MSSQL:()=>Pfs,DBSYSTEMVALUES_MYSQL:()=>kfs,DBSYSTEMVALUES_NEO4J:()=>A0s,DBSYSTEMVALUES_NETEZZA:()=>e0s,DBSYSTEMVALUES_ORACLE:()=>Dfs,DBSYSTEMVALUES_OTHER_SQL:()=>Rfs,DBSYSTEMVALUES_PERVASIVE:()=>t0s,DBSYSTEMVALUES_POINTBASE:()=>r0s,DBSYSTEMVALUES_POSTGRESQL:()=>Mfs,DBSYSTEMVALUES_PROGRESS:()=>Ufs,DBSYSTEMVALUES_REDIS:()=>f0s,DBSYSTEMVALUES_REDSHIFT:()=>Ofs,DBSYSTEMVALUES_SQLITE:()=>n0s,DBSYSTEMVALUES_SYBASE:()=>i0s,DBSYSTEMVALUES_TERADATA:()=>o0s,DBSYSTEMVALUES_VERTICA:()=>s0s,DB_SYSTEM_NAME_VALUE_MARIADB:()=>vAs,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>bAs,DB_SYSTEM_NAME_VALUE_MYSQL:()=>TAs,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>SAs,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>xAs,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>wAs,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>RAs,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>sbd,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>abd,DbCassandraConsistencyLevelValues:()=>M0s,DbSystemValues:()=>v0s,ERROR_TYPE_VALUE_OTHER:()=>kAs,EVENT_EXCEPTION:()=>s_s,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>H0s,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>G0s,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>q0s,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>$0s,FAASINVOKEDPROVIDERVALUES_AWS:()=>V0s,FAASINVOKEDPROVIDERVALUES_AZURE:()=>W0s,FAASINVOKEDPROVIDERVALUES_GCP:()=>z0s,FAASTRIGGERVALUES_DATASOURCE:()=>O0s,FAASTRIGGERVALUES_HTTP:()=>B0s,FAASTRIGGERVALUES_OTHER:()=>U0s,FAASTRIGGERVALUES_PUBSUB:()=>L0s,FAASTRIGGERVALUES_TIMER:()=>F0s,FaasDocumentOperationValues:()=>j0s,FaasInvokedProviderValues:()=>Y0s,FaasTriggerValues:()=>Q0s,HOSTARCHVALUES_AMD64:()=>dgs,HOSTARCHVALUES_ARM32:()=>fgs,HOSTARCHVALUES_ARM64:()=>pgs,HOSTARCHVALUES_IA64:()=>hgs,HOSTARCHVALUES_PPC32:()=>mgs,HOSTARCHVALUES_PPC64:()=>ggs,HOSTARCHVALUES_X86:()=>Ags,HTTPFLAVORVALUES_HTTP_1_0:()=>Dps,HTTPFLAVORVALUES_HTTP_1_1:()=>Nps,HTTPFLAVORVALUES_HTTP_2_0:()=>Mps,HTTPFLAVORVALUES_QUIC:()=>Bps,HTTPFLAVORVALUES_SPDY:()=>Ops,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>UAs,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>QAs,HTTP_REQUEST_METHOD_VALUE_GET:()=>qAs,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>GAs,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>HAs,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>FAs,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>jAs,HTTP_REQUEST_METHOD_VALUE_POST:()=>$As,HTTP_REQUEST_METHOD_VALUE_PUT:()=>VAs,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>WAs,HostArchValues:()=>ygs,HttpFlavorValues:()=>Lps,JVM_MEMORY_TYPE_VALUE_HEAP:()=>nys,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>iys,JVM_THREAD_STATE_VALUE_BLOCKED:()=>ays,JVM_THREAD_STATE_VALUE_NEW:()=>cys,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>lys,JVM_THREAD_STATE_VALUE_TERMINATED:()=>uys,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>dys,JVM_THREAD_STATE_VALUE_WAITING:()=>fys,MESSAGETYPEVALUES_RECEIVED:()=>lhs,MESSAGETYPEVALUES_SENT:()=>chs,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Fps,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Ups,MESSAGINGOPERATIONVALUES_PROCESS:()=>Gps,MESSAGINGOPERATIONVALUES_RECEIVE:()=>qps,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>lEs,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>uEs,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>dEs,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>hEs,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>pEs,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>fEs,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>mEs,METRIC_DB_CLIENT_OPERATION_DURATION:()=>gEs,METRIC_DOTNET_ASSEMBLY_COUNT:()=>AEs,METRIC_DOTNET_EXCEPTIONS:()=>yEs,METRIC_DOTNET_GC_COLLECTIONS:()=>EEs,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>_Es,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>CEs,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>vEs,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>bEs,METRIC_DOTNET_GC_PAUSE_TIME:()=>TEs,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>SEs,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>IEs,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>xEs,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>wEs,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>REs,METRIC_DOTNET_PROCESS_CPU_TIME:()=>PEs,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>kEs,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>DEs,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>NEs,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>MEs,METRIC_DOTNET_TIMER_COUNT:()=>OEs,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>BEs,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>LEs,METRIC_JVM_CLASS_COUNT:()=>FEs,METRIC_JVM_CLASS_LOADED:()=>UEs,METRIC_JVM_CLASS_UNLOADED:()=>QEs,METRIC_JVM_CPU_COUNT:()=>qEs,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>GEs,METRIC_JVM_CPU_TIME:()=>HEs,METRIC_JVM_GC_DURATION:()=>jEs,METRIC_JVM_MEMORY_COMMITTED:()=>$Es,METRIC_JVM_MEMORY_LIMIT:()=>VEs,METRIC_JVM_MEMORY_USED:()=>WEs,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>zEs,METRIC_JVM_THREAD_COUNT:()=>YEs,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>KEs,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>JEs,METRIC_KESTREL_CONNECTION_DURATION:()=>XEs,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>ZEs,METRIC_KESTREL_QUEUED_REQUESTS:()=>e_s,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>t_s,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>r_s,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>n_s,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>i_s,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>o_s,MessageTypeValues:()=>uhs,MessagingDestinationKindValues:()=>Qps,MessagingOperationValues:()=>Hps,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>pps,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>gps,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>dps,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>bps,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>hps,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>mps,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Cps,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>ups,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Sps,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Aps,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Eps,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Tps,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>yps,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>_ps,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>xps,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>vps,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Pps,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>wps,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Rps,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Ips,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>fps,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>sps,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>aps,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>cps,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>ips,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>ops,NETTRANSPORTVALUES_INPROC:()=>tps,NETTRANSPORTVALUES_IP:()=>X0s,NETTRANSPORTVALUES_IP_TCP:()=>K0s,NETTRANSPORTVALUES_IP_UDP:()=>J0s,NETTRANSPORTVALUES_OTHER:()=>rps,NETTRANSPORTVALUES_PIPE:()=>eps,NETTRANSPORTVALUES_UNIX:()=>Z0s,NETWORK_TRANSPORT_VALUE_PIPE:()=>_ys,NETWORK_TRANSPORT_VALUE_QUIC:()=>Cys,NETWORK_TRANSPORT_VALUE_TCP:()=>vys,NETWORK_TRANSPORT_VALUE_UDP:()=>bys,NETWORK_TRANSPORT_VALUE_UNIX:()=>Tys,NETWORK_TYPE_VALUE_IPV4:()=>Iys,NETWORK_TYPE_VALUE_IPV6:()=>xys,NetHostConnectionSubtypeValues:()=>kps,NetHostConnectionTypeValues:()=>lps,NetTransportValues:()=>nps,OSTYPEVALUES_AIX:()=>xgs,OSTYPEVALUES_DARWIN:()=>Cgs,OSTYPEVALUES_DRAGONFLYBSD:()=>Sgs,OSTYPEVALUES_FREEBSD:()=>vgs,OSTYPEVALUES_HPUX:()=>Igs,OSTYPEVALUES_LINUX:()=>_gs,OSTYPEVALUES_NETBSD:()=>bgs,OSTYPEVALUES_OPENBSD:()=>Tgs,OSTYPEVALUES_SOLARIS:()=>wgs,OSTYPEVALUES_WINDOWS:()=>Egs,OSTYPEVALUES_Z_OS:()=>Rgs,OTEL_STATUS_CODE_VALUE_ERROR:()=>kys,OTEL_STATUS_CODE_VALUE_OK:()=>Dys,OsTypeValues:()=>Pgs,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>ehs,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Kps,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>$ps,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>ohs,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>zps,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Zps,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>nhs,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Wps,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Yps,RPCGRPCSTATUSCODEVALUES_OK:()=>jps,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>ths,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Jps,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Xps,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>shs,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>ihs,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>rhs,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Vps,RpcGrpcStatusCodeValues:()=>ahs,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Lds,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Yds,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Mds,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Pds,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Wds,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Gds,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Qds,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>Kds,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Fds,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>kds,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>Bds,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>qds,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Ods,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Dds,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Nds,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>zds,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>jds,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>$ds,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Uds,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Hds,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Rds,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Vds,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>cus,SEMATTRS_CODE_FILEPATH:()=>fds,SEMATTRS_CODE_FUNCTION:()=>uds,SEMATTRS_CODE_LINENO:()=>pds,SEMATTRS_CODE_NAMESPACE:()=>dds,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Eus,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Tus,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>bus,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Cus,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Aus,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>yus,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>vus,SEMATTRS_DB_CASSANDRA_TABLE:()=>_us,SEMATTRS_DB_CONNECTION_STRING:()=>uus,SEMATTRS_DB_HBASE_NAMESPACE:()=>Sus,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>fus,SEMATTRS_DB_MONGODB_COLLECTION:()=>xus,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>gus,SEMATTRS_DB_NAME:()=>pus,SEMATTRS_DB_OPERATION:()=>mus,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Ius,SEMATTRS_DB_SQL_TABLE:()=>wus,SEMATTRS_DB_STATEMENT:()=>hus,SEMATTRS_DB_SYSTEM:()=>lus,SEMATTRS_DB_USER:()=>dus,SEMATTRS_ENDUSER_ID:()=>ods,SEMATTRS_ENDUSER_ROLE:()=>sds,SEMATTRS_ENDUSER_SCOPE:()=>ads,SEMATTRS_EXCEPTION_ESCAPED:()=>Dus,SEMATTRS_EXCEPTION_MESSAGE:()=>Pus,SEMATTRS_EXCEPTION_STACKTRACE:()=>kus,SEMATTRS_EXCEPTION_TYPE:()=>Rus,SEMATTRS_FAAS_COLDSTART:()=>qus,SEMATTRS_FAAS_CRON:()=>Qus,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Ous,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Fus,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Bus,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Lus,SEMATTRS_FAAS_EXECUTION:()=>Mus,SEMATTRS_FAAS_INVOKED_NAME:()=>Gus,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>Hus,SEMATTRS_FAAS_INVOKED_REGION:()=>jus,SEMATTRS_FAAS_TIME:()=>Uus,SEMATTRS_FAAS_TRIGGER:()=>Nus,SEMATTRS_HTTP_CLIENT_IP:()=>wds,SEMATTRS_HTTP_FLAVOR:()=>_ds,SEMATTRS_HTTP_HOST:()=>Ads,SEMATTRS_HTTP_METHOD:()=>hds,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>vds,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>bds,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>Tds,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Sds,SEMATTRS_HTTP_ROUTE:()=>xds,SEMATTRS_HTTP_SCHEME:()=>yds,SEMATTRS_HTTP_SERVER_NAME:()=>Ids,SEMATTRS_HTTP_STATUS_CODE:()=>Eds,SEMATTRS_HTTP_TARGET:()=>gds,SEMATTRS_HTTP_URL:()=>mds,SEMATTRS_HTTP_USER_AGENT:()=>Cds,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Ifs,SEMATTRS_MESSAGE_ID:()=>Sfs,SEMATTRS_MESSAGE_TYPE:()=>Tfs,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>xfs,SEMATTRS_MESSAGING_CONSUMER_ID:()=>lfs,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>ofs,SEMATTRS_MESSAGING_DESTINATION:()=>Xds,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Zds,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>pfs,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>ffs,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>dfs,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>hfs,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>mfs,SEMATTRS_MESSAGING_MESSAGE_ID:()=>ifs,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>afs,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>sfs,SEMATTRS_MESSAGING_OPERATION:()=>cfs,SEMATTRS_MESSAGING_PROTOCOL:()=>tfs,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>rfs,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>ufs,SEMATTRS_MESSAGING_SYSTEM:()=>Jds,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>efs,SEMATTRS_MESSAGING_URL:()=>nfs,SEMATTRS_NET_HOST_CARRIER_ICC:()=>nds,SEMATTRS_NET_HOST_CARRIER_MCC:()=>tds,SEMATTRS_NET_HOST_CARRIER_MNC:()=>rds,SEMATTRS_NET_HOST_CARRIER_NAME:()=>eds,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Zus,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Xus,SEMATTRS_NET_HOST_IP:()=>Yus,SEMATTRS_NET_HOST_NAME:()=>Jus,SEMATTRS_NET_HOST_PORT:()=>Kus,SEMATTRS_NET_PEER_IP:()=>Vus,SEMATTRS_NET_PEER_NAME:()=>zus,SEMATTRS_NET_PEER_PORT:()=>Wus,SEMATTRS_NET_TRANSPORT:()=>$us,SEMATTRS_PEER_SERVICE:()=>ids,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>Efs,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>vfs,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>bfs,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Cfs,SEMATTRS_RPC_JSONRPC_VERSION:()=>_fs,SEMATTRS_RPC_METHOD:()=>yfs,SEMATTRS_RPC_SERVICE:()=>Afs,SEMATTRS_RPC_SYSTEM:()=>gfs,SEMATTRS_THREAD_ID:()=>cds,SEMATTRS_THREAD_NAME:()=>lds,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Ahs,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>ghs,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>yhs,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Ehs,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>_hs,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Chs,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>vhs,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Ths,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>bhs,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Ihs,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Shs,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>fhs,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>hhs,SEMRESATTRS_CLOUD_PLATFORM:()=>mhs,SEMRESATTRS_CLOUD_PROVIDER:()=>dhs,SEMRESATTRS_CLOUD_REGION:()=>phs,SEMRESATTRS_CONTAINER_ID:()=>whs,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Phs,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>khs,SEMRESATTRS_CONTAINER_NAME:()=>xhs,SEMRESATTRS_CONTAINER_RUNTIME:()=>Rhs,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Dhs,SEMRESATTRS_DEVICE_ID:()=>Nhs,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Mhs,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Ohs,SEMRESATTRS_FAAS_ID:()=>Lhs,SEMRESATTRS_FAAS_INSTANCE:()=>Uhs,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Qhs,SEMRESATTRS_FAAS_NAME:()=>Bhs,SEMRESATTRS_FAAS_VERSION:()=>Fhs,SEMRESATTRS_HOST_ARCH:()=>jhs,SEMRESATTRS_HOST_ID:()=>qhs,SEMRESATTRS_HOST_IMAGE_ID:()=>Vhs,SEMRESATTRS_HOST_IMAGE_NAME:()=>$hs,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Whs,SEMRESATTRS_HOST_NAME:()=>Ghs,SEMRESATTRS_HOST_TYPE:()=>Hhs,SEMRESATTRS_K8S_CLUSTER_NAME:()=>zhs,SEMRESATTRS_K8S_CONTAINER_NAME:()=>ems,SEMRESATTRS_K8S_CRONJOB_NAME:()=>fms,SEMRESATTRS_K8S_CRONJOB_UID:()=>dms,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>cms,SEMRESATTRS_K8S_DAEMONSET_UID:()=>ams,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>ims,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>nms,SEMRESATTRS_K8S_JOB_NAME:()=>ums,SEMRESATTRS_K8S_JOB_UID:()=>lms,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Jhs,SEMRESATTRS_K8S_NODE_NAME:()=>Yhs,SEMRESATTRS_K8S_NODE_UID:()=>Khs,SEMRESATTRS_K8S_POD_NAME:()=>Zhs,SEMRESATTRS_K8S_POD_UID:()=>Xhs,SEMRESATTRS_K8S_REPLICASET_NAME:()=>rms,SEMRESATTRS_K8S_REPLICASET_UID:()=>tms,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>sms,SEMRESATTRS_K8S_STATEFULSET_UID:()=>oms,SEMRESATTRS_OS_DESCRIPTION:()=>hms,SEMRESATTRS_OS_NAME:()=>mms,SEMRESATTRS_OS_TYPE:()=>pms,SEMRESATTRS_OS_VERSION:()=>gms,SEMRESATTRS_PROCESS_COMMAND:()=>_ms,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>vms,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cms,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>yms,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Ems,SEMRESATTRS_PROCESS_OWNER:()=>bms,SEMRESATTRS_PROCESS_PID:()=>Ams,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Ims,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Tms,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Sms,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Rms,SEMRESATTRS_SERVICE_NAME:()=>xms,SEMRESATTRS_SERVICE_NAMESPACE:()=>wms,SEMRESATTRS_SERVICE_VERSION:()=>Pms,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Mms,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Dms,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>kms,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Nms,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Lms,SEMRESATTRS_WEBENGINE_NAME:()=>Oms,SEMRESATTRS_WEBENGINE_VERSION:()=>Bms,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Uys,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Qys,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>qys,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Hys,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>jys,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>$ys,SemanticAttributes:()=>wfs,SemanticResourceAttributes:()=>Fms,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>kgs,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Dgs,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Ngs,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Mgs,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Ogs,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Bgs,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Lgs,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Fgs,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Ugs,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Qgs,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Vys,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Wys,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>zys,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Yys,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Kys,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>oKt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Jys,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Xys,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Zys,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>eEs,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>tEs,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>rEs,TelemetrySdkLanguageValues:()=>qgs});var jZe=Pe(()=>{f();dLn();L6n();F6n();U6n();Q6n()});var q6n,G6n=Pe(()=>{f();q6n="process.runtime.name"});var $Ze,H6n=Pe(()=>{f();_Mn();jZe();G6n();$Ze={[sKt]:"opentelemetry",[q6n]:"node",[iKt]:oKt,[aKt]:EMn}});var j6n=Pe(()=>{f();mMn();gMn();yMn();H6n()});var lKt=Pe(()=>{f();j6n()});function sce(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*c_s);return[r,n]}function WZe(){let t=A7.timeOrigin;if(typeof t!="number"){let e=A7;t=e.timing&&e.timing.fetchStart}return t}function uKt(t){let e=sce(WZe()),r=sce(typeof t=="number"?t:A7.now());return dKt(e,r)}function V6n(t){if(zZe(t))return t;if(typeof t=="number")return t=VZe&&(r[1]-=VZe,r[0]+=1),r}var $6n,a_s,c_s,VZe,Z6n=Pe(()=>{f();lKt();$6n=9,a_s=6,c_s=Math.pow(10,a_s),VZe=Math.pow(10,$6n);a(sce,"millisToHrTime");a(WZe,"getTimeOrigin");a(uKt,"hrTime");a(V6n,"timeInputToHrTime");a(W6n,"hrTimeDuration");a(z6n,"hrTimeToTimeStamp");a(Y6n,"hrTimeToNanoseconds");a(K6n,"hrTimeToMilliseconds");a(J6n,"hrTimeToMicroseconds");a(zZe,"isTimeInputHrTime");a(X6n,"isTimeInput");a(dKt,"addHrTimes")});function eFn(t){typeof t!="number"&&t.unref()}var tFn=Pe(()=>{f();a(eFn,"unrefTimer")});var YZe,rFn=Pe(()=>{f();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(YZe||(YZe={}))});var KZe,nFn=Pe(()=>{f();Bi();KZe=class{static{a(this,"CompositePropagator")}_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(s){cn.warn(`Failed to inject with ${o.constructor.name}. Err: ${s.message}`)}}extract(e,r,n){return this._propagators.reduce((o,s)=>{try{return s.extract(o,r,n)}catch(c){cn.warn(`Failed to extract with ${s.constructor.name}. Err: ${c.message}`)}return o},e)}fields(){return this._fields.slice()}}});function iFn(t){return d_s.test(t)}function oFn(t){return f_s.test(t)&&!p_s.test(t)}var fKt,l_s,u_s,d_s,f_s,p_s,sFn=Pe(()=>{f();fKt="[_0-9a-z-*/]",l_s=`[a-z]${fKt}{0,255}`,u_s=`[a-z0-9]${fKt}{0,240}@[a-z]${fKt}{0,13}`,d_s=new RegExp(`^(?:${l_s}|${u_s})$`),f_s=/^[ -~]{0,255}[!-~]$/,p_s=/,|=/;a(iFn,"validateKey");a(oFn,"validateValue")});var aFn,h_s,cFn,lFn,ace,pKt=Pe(()=>{f();sFn();aFn=32,h_s=512,cFn=",",lFn="=",ace=class t{static{a(this,"TraceState")}_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+lFn+this.get(r)),e),[]).join(cFn)}_parse(e){e.length>h_s||(this._internalState=e.split(cFn).reverse().reduce((r,n)=>{let o=n.trim(),s=o.indexOf(lFn);if(s!==-1){let c=o.slice(0,s),l=o.slice(s+1,n.length);iFn(c)&&oFn(l)&&r.set(c,l)}return r},new Map),this._internalState.size>aFn&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,aFn))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}}});function hKt(t){let e=__s.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var $Te,VTe,m_s,g_s,A_s,y_s,E_s,__s,JZe,uFn=Pe(()=>{f();Bi();HTe();pKt();$Te="traceparent",VTe="tracestate",m_s="00",g_s="(?!ff)[\\da-f]{2}",A_s="(?![0]{32})[\\da-f]{32}",y_s="(?![0]{16})[\\da-f]{16}",E_s="[\\da-f]{2}",__s=new RegExp(`^\\s?(${g_s})-(${A_s})-(${y_s})-(${E_s})(-.*)?\\s?$`);a(hKt,"parseTraceParent");JZe=class{static{a(this,"W3CTraceContextPropagator")}inject(e,r,n){let o=hl.getSpanContext(e);if(!o||oce(e)||!F_(o))return;let s=`${m_s}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||ed.NONE).toString(16)}`;n.set(r,$Te,s),o.traceState&&n.set(r,VTe,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,$Te);if(!o)return e;let s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;let c=hKt(s);if(!c)return e;c.isRemote=!0;let l=n.get(r,VTe);if(l){let u=Array.isArray(l)?l.join(","):l;c.traceState=new ace(typeof u=="string"?u:void 0)}return hl.setSpanContext(e,c)}fields(){return[$Te,VTe]}}});function dFn(t,e){return t.setValue(mKt,e)}function fFn(t){return t.deleteValue(mKt)}function pFn(t){return t.getValue(mKt)}var mKt,XZe,hFn=Pe(()=>{f();Bi();mKt=L_("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(XZe||(XZe={}));a(dFn,"setRPCMetadata");a(fFn,"deleteRPCMetadata");a(pFn,"getRPCMetadata")});function gKt(t){if(!x_s(t)||w_s(t)!==C_s)return!1;let e=I_s(t);if(e===null)return!0;let r=AFn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&mFn.call(r)===S_s}function x_s(t){return t!=null&&typeof t=="object"}function w_s(t){return t==null?t===void 0?b_s:v_s:kW&&kW in Object(t)?R_s(t):P_s(t)}function R_s(t){let e=AFn.call(t,kW),r=t[kW],n=!1;try{t[kW]=void 0,n=!0}catch{}let o=yFn.call(t);return n&&(e?t[kW]=r:delete t[kW]),o}function P_s(t){return yFn.call(t)}var C_s,v_s,b_s,T_s,mFn,S_s,I_s,gFn,AFn,kW,yFn,EFn=Pe(()=>{f();C_s="[object Object]",v_s="[object Null]",b_s="[object Undefined]",T_s=Function.prototype,mFn=T_s.toString,S_s=mFn.call(Object),I_s=Object.getPrototypeOf,gFn=Object.prototype,AFn=gFn.hasOwnProperty,kW=Symbol?Symbol.toStringTag:void 0,yFn=gFn.toString;a(gKt,"isPlainObject");a(x_s,"isObjectLike");a(w_s,"baseGetTag");a(R_s,"getRawTag");a(P_s,"objectToString")});function CFn(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=vFn(e,t.shift(),0,r);return e}function AKt(t){return eet(t)?t.slice():t}function vFn(t,e,r=0,n){let o;if(!(r>k_s)){if(r++,ZZe(t)||ZZe(e)||bFn(e))o=AKt(e);else if(eet(t)){if(o=t.slice(),eet(e))for(let s=0,c=e.length;s"u"?delete o[u]:o[u]=d;else{let p=o[u],h=d;if(_Fn(t,u,n)||_Fn(e,u,n))delete o[u];else{if(WTe(p)&&WTe(h)){let m=n.get(p)||[],g=n.get(h)||[];m.push({obj:t,key:u}),g.push({obj:e,key:u}),n.set(p,m),n.set(h,g)}o[u]=vFn(o[u],d,r,n)}}}}else o=e;return o}}function _Fn(t,e,r){let n=r.get(t[e])||[];for(let o=0,s=n.length;o"u"||t instanceof Date||t instanceof RegExp||t===null}function D_s(t,e){return!(!gKt(t)||!gKt(e))}var k_s,TFn=Pe(()=>{f();EFn();k_s=20;a(CFn,"merge");a(AKt,"takeValue");a(vFn,"mergeTwoObjects");a(_Fn,"wasObjectReferenced");a(eet,"isArray");a(bFn,"isFunction");a(WTe,"isObject");a(ZZe,"isPrimitive");a(D_s,"shouldMerge")});function SFn(t,e){let r,n=new Promise(a(function(s,c){r=setTimeout(a(function(){c(new zTe("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([t,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}var zTe,IFn=Pe(()=>{f();zTe=class t extends Error{static{a(this,"TimeoutError")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};a(SFn,"callWithTimeout")});function yKt(t,e){return typeof e=="string"?t===e:!!t.match(e)}function xFn(t,e){if(!e)return!1;for(let r of e)if(yKt(t,r))return!0;return!1}var wFn=Pe(()=>{f();a(yKt,"urlMatches");a(xFn,"isUrlIgnored")});var tet,RFn=Pe(()=>{f();tet=class{static{a(this,"Deferred")}_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}});var ret,PFn=Pe(()=>{f();RFn();ret=class{static{a(this,"BindOnceFuture")}_callback;_that;_isCalled=!1;_deferred=new tet;constructor(e,r){this._callback=e,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}});function DFn(t){if(t==null)return;let e=kFn[t.toUpperCase()];return e??(cn.warn(`Unknown log level "${t}", expected one of ${Object.keys(kFn)}, using default`),Fs.INFO)}var kFn,NFn=Pe(()=>{f();Bi();kFn={ALL:Fs.ALL,VERBOSE:Fs.VERBOSE,DEBUG:Fs.DEBUG,INFO:Fs.INFO,WARN:Fs.WARN,ERROR:Fs.ERROR,NONE:Fs.NONE};a(DFn,"diagLogLevelFromString")});function MFn(t,e){return new Promise(r=>{Rh.with(MZe(Rh.active()),()=>{t.export(e,n=>{r(n)})})})}var OFn=Pe(()=>{f();Bi();HTe();a(MFn,"_export")});var net={};ui(net,{AnchoredClock:()=>FZe,BindOnceFuture:()=>ret,CompositePropagator:()=>KZe,ExportResultCode:()=>YZe,RPCType:()=>XZe,SDK_INFO:()=>$Ze,TRACE_PARENT_HEADER:()=>$Te,TRACE_STATE_HEADER:()=>VTe,TimeoutError:()=>zTe,TraceState:()=>ace,W3CBaggagePropagator:()=>LZe,W3CTraceContextPropagator:()=>JZe,_globalThis:()=>HZe,addHrTimes:()=>dKt,callWithTimeout:()=>SFn,deleteRPCMetadata:()=>fFn,diagLogLevelFromString:()=>DFn,getBooleanFromEnv:()=>qZe,getNumberFromEnv:()=>QZe,getRPCMetadata:()=>pFn,getStringFromEnv:()=>jTe,getStringListFromEnv:()=>GZe,getTimeOrigin:()=>WZe,globalErrorHandler:()=>pMn,hrTime:()=>uKt,hrTimeDuration:()=>W6n,hrTimeToMicroseconds:()=>J6n,hrTimeToMilliseconds:()=>K6n,hrTimeToNanoseconds:()=>Y6n,hrTimeToTimeStamp:()=>z6n,internal:()=>N_s,isAttributeValue:()=>eKt,isTimeInput:()=>X6n,isTimeInputHrTime:()=>zZe,isTracingSuppressed:()=>oce,isUrlIgnored:()=>xFn,loggingErrorHandler:()=>UZe,merge:()=>CFn,millisToHrTime:()=>sce,otperformance:()=>A7,parseKeyPairsIntoRecord:()=>oMn,parseTraceParent:()=>hKt,sanitizeAttributes:()=>cMn,setGlobalErrorHandler:()=>fMn,setRPCMetadata:()=>dFn,suppressTracing:()=>MZe,timeInputToHrTime:()=>V6n,unrefTimer:()=>eFn,unsuppressTracing:()=>eMn,urlMatches:()=>yKt});var N_s,iet=Pe(()=>{f();sMn();aMn();uMn();hMn();tKt();Z6n();tFn();rFn();ZYt();lKt();nFn();uFn();hFn();HTe();pKt();TFn();IFn();wFn();PFn();NFn();OFn();N_s={_export:MFn}});var FFn=T(oet=>{"use strict";f();Object.defineProperty(oet,"__esModule",{value:!0});oet.OpenTelemetrySpanWrapper=void 0;var BFn=(Bi(),Aa(xO)),LFn=(iet(),Aa(net)),M_s=KYt(),EKt=class{static{a(this,"OpenTelemetrySpanWrapper")}constructor(e){this._span=e}setStatus(e){e.status==="error"&&O_s(e.error)?e.error?(this._span.setStatus({code:BFn.SpanStatusCode.ERROR,message:e.error.toString()}),this.recordException(e.error)):this._span.setStatus({code:BFn.SpanStatusCode.ERROR}):e.status==="success"&&M_s.logger.verbose("Leaving span with status UNSET per OpenTelemetry spec.")}setAttribute(e,r){r!=null&&(0,LFn.isAttributeValue)(r)&&this._span.setAttribute(e,r)}end(){this._span.end()}recordException(e){this._span.recordException(e)}isRecording(){return this._span.isRecording()}addEvent(e,r={}){this._span.addEvent(e,(0,LFn.sanitizeAttributes)(r.attributes),r.startTime)}unwrap(){return this._span}};oet.OpenTelemetrySpanWrapper=EKt;function O_s(t){return t!==null&&typeof t=="object"&&"statusCode"in t?t.statusCode!==304:!0}a(O_s,"isRecordableError")});var _Kt=T(K5=>{"use strict";f();Object.defineProperty(K5,"__esModule",{value:!0});K5.environmentCache=K5.SDK_VERSION=void 0;K5.envVarToBoolean=B_s;K5.SDK_VERSION="1.0.0-beta.9";K5.environmentCache=new Map;function B_s(t){var e;K5.environmentCache.has(t)||L_s(t);let r=((e=K5.environmentCache.get(t))!==null&&e!==void 0?e:"").toLowerCase();return r!=="false"&&r!=="0"&&!!r}a(B_s,"envVarToBoolean");function L_s(t){var e;if(typeof process<"u"&&process.env){let r=(e=process.env[t])!==null&&e!==void 0?e:process.env[t.toLowerCase()];K5.environmentCache.set(t,r)}}a(L_s,"loadEnvironmentVariable")});var GFn=T(set=>{"use strict";f();Object.defineProperty(set,"__esModule",{value:!0});set.toOpenTelemetrySpanKind=qFn;set.toSpanOptions=U_s;var UFn=(Bi(),Aa(xO)),QFn=(iet(),Aa(net));function qFn(t){let e=(t||"internal").toUpperCase();return UFn.SpanKind[e]}a(qFn,"toOpenTelemetrySpanKind");function F_s(t=[]){return t.reduce((e,r)=>{let n=UFn.trace.getSpanContext(r.tracingContext);return n&&e.push({context:n,attributes:(0,QFn.sanitizeAttributes)(r.attributes)}),e},[])}a(F_s,"toOpenTelemetryLinks");function U_s(t){let{spanAttributes:e,spanLinks:r,spanKind:n}=t||{},o=(0,QFn.sanitizeAttributes)(e),s=qFn(n),c=F_s(r);return{attributes:o,kind:s,links:c}}a(U_s,"toSpanOptions")});var $Fn=T(y7=>{"use strict";f();Object.defineProperty(y7,"__esModule",{value:!0});y7.OpenTelemetryInstrumenter=y7.propagator=void 0;var J5=(Bi(),Aa(xO)),jFn=(iet(),Aa(net)),Q_s=FFn(),HFn=_Kt(),q_s=GFn();y7.propagator=new jFn.W3CTraceContextPropagator;var CKt=class{static{a(this,"OpenTelemetryInstrumenter")}startSpan(e,r){let n=r?.tracingContext||J5.context.active(),o;return(0,HFn.envVarToBoolean)("AZURE_TRACING_DISABLED")?o=J5.trace.wrapSpanContext(J5.INVALID_SPAN_CONTEXT):(o=J5.trace.getTracer(r.packageName,r.packageVersion).startSpan(e,(0,q_s.toSpanOptions)(r),n),(0,HFn.envVarToBoolean)("AZURE_HTTP_TRACING_CHILDREN_DISABLED")&&e.toUpperCase().startsWith("HTTP")&&(n=(0,jFn.suppressTracing)(n))),{span:new Q_s.OpenTelemetrySpanWrapper(o),tracingContext:J5.trace.setSpan(n,o)}}withContext(e,r,...n){return J5.context.with(e,r,void 0,...n)}parseTraceparentHeader(e){return y7.propagator.extract(J5.context.active(),{traceparent:e},J5.defaultTextMapGetter)}createRequestHeaders(e){let r={};return y7.propagator.inject(e||J5.context.active(),r,J5.defaultTextMapSetter),r}};y7.OpenTelemetryInstrumenter=CKt});var WFn=T(YTe=>{"use strict";f();Object.defineProperty(YTe,"__esModule",{value:!0});YTe.AzureSdkInstrumentation=void 0;YTe.createAzureSdkInstrumentation=j_s;var VFn=(GYt(),Aa(qYt)),G_s=$Fn(),H_s=_Kt(),aet=class extends VFn.InstrumentationBase{static{a(this,"AzureSdkInstrumentation")}constructor(e={}){super("@azure/opentelemetry-instrumentation-azure-sdk",H_s.SDK_VERSION,Object.assign({},e))}init(){let e=new VFn.InstrumentationNodeModuleDefinition("@azure/core-tracing",["^1.0.0-preview.14","^1.0.0"],r=>(typeof r.useInstrumenter=="function"&&r.useInstrumenter(new G_s.OpenTelemetryInstrumenter),r));return e.includePrerelease=!0,e}};YTe.AzureSdkInstrumentation=aet;function j_s(t={}){return new aet(t)}a(j_s,"createAzureSdkInstrumentation")});var YFn=T(cet=>{"use strict";f();Object.defineProperty(cet,"__esModule",{value:!0});var zFn=(bM(),Aa(k8));zFn.__exportStar(KYt(),cet);zFn.__exportStar(WFn(),cet)});var JFn=T(SS=>{"use strict";f();Object.defineProperty(SS,"__esModule",{value:!0});SS.enable=SS.azureCoreTracing=SS.AzureMonitorSymbol=void 0;var vKt=Hd();SS.AzureMonitorSymbol="Azure_Monitor_Tracer";var bKt="azure-coretracing",KFn=!1,$_s=a(function(t){if(KFn)return t;try{var e=(J5n(),Aa(K5n)),r=(Bi(),Aa(xO)),n=new e.BasicTracerProvider,o=n.getTracer("applicationinsights tracer");if(t.setTracer){var s=t.setTracer;t.setTracer=function(d){var p=d.startSpan;d.startSpan=function(h,m,g){var A=p.call(this,h,m,g),y=A.end;return A.end=function(){var E=y.apply(this,arguments);return vKt.channel.publish(bKt,A),E},A},d[SS.AzureMonitorSymbol]=!0,s.call(this,d)},r.trace.getSpan(r.context.active()),t.setTracer(o)}else{var c=r.trace.setGlobalTracerProvider;r.trace.setGlobalTracerProvider=function(d){var p=d.getTracer;return d.getTracer=function(h,m){var g=p.call(this,h,m);if(!g[SS.AzureMonitorSymbol]){var A=g.startSpan;g.startSpan=function(y,E,_){var v=A.call(this,y,E,_),b=v.end;return v.end=function(){var I=b.apply(this,arguments);return vKt.channel.publish(bKt,v),I},v},g[SS.AzureMonitorSymbol]=!0}return g},c.call(this,d)},n.register(),r.trace.getSpan(r.context.active());var l=(GYt(),Aa(qYt)),u=YFn();l.registerInstrumentations({instrumentations:[u.createAzureSdkInstrumentation()]})}KFn=!0}catch{}return t},"azureCoreTracingPatchFunction");SS.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:$_s,publisherName:bKt};function V_s(){vKt.channel.registerMonkeyPatch("@azure/core-tracing",SS.azureCoreTracing)}a(V_s,"enable");SS.enable=V_s});var ZFn=T(DW=>{"use strict";f();Object.defineProperty(DW,"__esModule",{value:!0});DW.enable=DW.bunyan=void 0;var XFn=Hd(),W_s=a(function(t){var e=t.prototype._emit;return t.prototype._emit=function(r,n){var o=e.apply(this,arguments);if(!n){var s=o;s||(s=e.call(this,r,!0)),XFn.channel.publish("bunyan",{level:r.level,result:s})}return o},t},"bunyanPatchFunction");DW.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:W_s};function z_s(){XFn.channel.registerMonkeyPatch("bunyan",DW.bunyan)}a(z_s,"enable");DW.enable=z_s});var t9n=T(NW=>{"use strict";f();Object.defineProperty(NW,"__esModule",{value:!0});NW.enable=NW.console=void 0;var TKt=Hd(),e9n=require("stream"),Y_s=a(function(t){var e=new e9n.Writable,r=new e9n.Writable;e.write=function(d){if(!d)return!0;var p=d.toString();return TKt.channel.publish("console",{message:p}),!0},r.write=function(d){if(!d)return!0;var p=d.toString();return TKt.channel.publish("console",{message:p,stderr:!0}),!0};for(var n=new t.Console(e,r),o=["log","info","warn","error","dir","time","timeEnd","trace","assert"],s=a(function(d){var p=t[d];p&&(t[d]=function(){if(n[d])try{n[d].apply(n,arguments)}catch{}return p.apply(t,arguments)})},"_loop_1"),c=0,l=o;c= 4.0.0",patch:Y_s};function K_s(){TKt.channel.registerMonkeyPatch("console",NW.console),require("console")}a(K_s,"enable");NW.enable=K_s});var r9n=T(MW=>{"use strict";f();Object.defineProperty(MW,"__esModule",{value:!0});MW.enable=MW.mongoCore=void 0;var SKt=Hd(),J_s=a(function(t){var e=t.Server.prototype.connect;return t.Server.prototype.connect=a(function(){var n=e.apply(this,arguments),o=this.s.pool.write;this.s.pool.write=a(function(){var l=typeof arguments[1]=="function"?1:2;return typeof arguments[l]=="function"&&(arguments[l]=SKt.channel.bindToContext(arguments[l])),o.apply(this,arguments)},"contextPreservingWrite");var s=this.s.pool.logout;return this.s.pool.logout=a(function(){return typeof arguments[1]=="function"&&(arguments[1]=SKt.channel.bindToContext(arguments[1])),s.apply(this,arguments)},"contextPreservingLogout"),n},"contextPreservingConnect"),t},"mongodbcorePatchFunction");MW.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:J_s};function X_s(){SKt.channel.registerMonkeyPatch("mongodb-core",MW.mongoCore)}a(X_s,"enable");MW.enable=X_s});var n9n=T(wy=>{"use strict";f();var cce=wy&&wy.__assign||function(){return cce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r= 2.0.0 <= 3.0.5",patch:Z_s};wy.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:eCs};wy.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:rCs};function nCs(){rA.channel.registerMonkeyPatch("mongodb",wy.mongo2),rA.channel.registerMonkeyPatch("mongodb",wy.mongo3),rA.channel.registerMonkeyPatch("mongodb",wy.mongo330)}a(nCs,"enable");wy.enable=nCs});var o9n=T(OW=>{"use strict";f();Object.defineProperty(OW,"__esModule",{value:!0});OW.enable=OW.mysql=void 0;var uet=Hd(),i9n=require("path"),iCs=a(function(t,e){var r=a(function(u,d){return function(p,h){var m=u[p];m&&(u[p]=a(function(){for(var A=arguments.length-1,y=arguments.length-1;y>=0;--y)if(typeof arguments[y]=="function"){A=y;break}else if(typeof arguments[y]<"u")break;var E=arguments[A],_={result:null,startTime:null,startDate:null};typeof E=="function"&&(h?(_.startTime=process.hrtime(),_.startDate=new Date,arguments[A]=uet.channel.bindToContext(h(_,E))):arguments[A]=uet.channel.bindToContext(E));var v=m.apply(this,arguments);return _.result=v,v},"mysqlContextPreserver"))}},"patchObjectFunction"),n=a(function(u,d){return r(u.prototype,d+".prototype")},"patchClassMemberFunction"),o=["connect","changeUser","ping","statistics","end"],s=require(i9n.dirname(e)+"/lib/Connection");o.forEach(function(u){return n(s,"Connection")(u)}),r(s,"Connection")("createQuery",function(u,d){return function(p){var h=process.hrtime(u.startTime),m=h[0]*1e3+h[1]/1e6|0;uet.channel.publish("mysql",{query:u.result,callbackArgs:arguments,err:p,duration:m,time:u.startDate}),d.apply(this,arguments)}});var c=["_enqueueCallback"],l=require(i9n.dirname(e)+"/lib/Pool");return c.forEach(function(u){return n(l,"Pool")(u)}),t},"mysqlPatchFunction");OW.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:iCs};function oCs(){uet.channel.registerMonkeyPatch("mysql",OW.mysql)}a(oCs,"enable");OW.enable=oCs});var a9n=T(BW=>{"use strict";f();Object.defineProperty(BW,"__esModule",{value:!0});BW.enable=BW.postgresPool1=void 0;var s9n=Hd();function sCs(t){var e=t.prototype.connect;return t.prototype.connect=a(function(n){return n&&(arguments[0]=s9n.channel.bindToContext(n)),e.apply(this,arguments)},"connect"),t}a(sCs,"postgresPool1PatchFunction");BW.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:sCs};function aCs(){s9n.channel.registerMonkeyPatch("pg-pool",BW.postgresPool1)}a(aCs,"enable");BW.enable=aCs});var l9n=T(X5=>{"use strict";f();Object.defineProperty(X5,"__esModule",{value:!0});X5.enable=X5.postgres=X5.postgres6=void 0;var lce=Hd(),c9n=require("events"),IKt="postgres";function cCs(t,e){var r=t.Client.prototype.query,n="__diagnosticOriginalFunc";return t.Client.prototype.query=a(function(s,c,l){var u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime(),p;function h(m){m&&m[n]&&(m=m[n]);var g=lce.channel.bindToContext(function(A,y){var E=process.hrtime(d);if(u.result=y&&{rowCount:y.rowCount,command:y.command},u.error=A,u.duration=Math.ceil(E[0]*1e3+E[1]/1e6),lce.channel.publish(IKt,u),A){if(m)return m.apply(this,arguments);p&&p instanceof c9n.EventEmitter&&p.emit("error",A)}else m&&m.apply(this,arguments)});try{return Object.defineProperty(g,n,{value:m}),g}catch{return m}}a(h,"patchCallback");try{typeof s=="string"?c instanceof Array?(u.query.preparable={text:s,args:c},l=h(l)):(u.query.text=s,l?l=h(l):c=h(c)):(typeof s.name=="string"?u.query.plan=s.name:s.values instanceof Array?u.query.preparable={text:s.text,args:s.values}:u.query.text=s.text,l?l=h(l):c?c=h(c):s.callback=h(s.callback))}catch{return r.apply(this,arguments)}return arguments[0]=s,arguments[1]=c,arguments[2]=l,arguments.length=arguments.length>3?arguments.length:3,p=r.apply(this,arguments),p},"query"),t}a(cCs,"postgres6PatchFunction");function lCs(t,e){var r=t.Client.prototype.query,n="__diagnosticOriginalFunc";return t.Client.prototype.query=a(function(s,c,l){var u=this,d,p,h=!!l,m={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},g,A=process.hrtime();function y(v){v&&v[n]&&(v=v[n]);var b=lce.channel.bindToContext(function(I,x){var w=process.hrtime(A);if(m.result=x&&{rowCount:x.rowCount,command:x.command},m.error=I,m.duration=Math.ceil(w[0]*1e3+w[1]/1e6),lce.channel.publish(IKt,m),I){if(v)return v.apply(this,arguments);g&&g instanceof c9n.EventEmitter&&g.emit("error",I)}else v&&v.apply(this,arguments)});try{return Object.defineProperty(b,n,{value:v}),b}catch{return v}}a(y,"patchCallback");try{typeof s=="string"?c instanceof Array?(m.query.preparable={text:s,args:c},h=typeof l=="function",l=h?y(l):l):(m.query.text=s,l?(h=typeof l=="function",l=h?y(l):l):(h=typeof c=="function",c=h?y(c):c)):(typeof s.name=="string"?m.query.plan=s.name:s.values instanceof Array?m.query.preparable={text:s.text,args:s.values}:s.cursor?m.query.text=(d=s.cursor)===null||d===void 0?void 0:d.text:m.query.text=s.text,l?(h=typeof l=="function",l=y(l)):c?(h=typeof c=="function",c=h?y(c):c):(h=typeof s.callback=="function",s.callback=h?y(s.callback):s.callback))}catch{return r.apply(this,arguments)}arguments[0]=s,arguments[1]=c,arguments[2]=l,arguments.length=arguments.length>3?arguments.length:3;try{g=r.apply(this,arguments)}catch(v){throw y()(v,void 0),v}if(!h){if(g instanceof Promise)return g.then(function(v){return y()(void 0,v),new u._Promise(function(b,I){b(v)})}).catch(function(v){return y()(v,void 0),new u._Promise(function(b,I){I(v)})});var E=g.text?g.text:"";if(g.cursor&&(E=(p=g.cursor)===null||p===void 0?void 0:p.text),E){var _={command:E,rowCount:0};y()(void 0,_)}}return g},"query"),t}a(lCs,"postgresLatestPatchFunction");X5.postgres6={versionSpecifier:"6.*",patch:cCs};X5.postgres={versionSpecifier:">=7.* <=8.*",patch:lCs,publisherName:IKt};function uCs(){lce.channel.registerMonkeyPatch("pg",X5.postgres6),lce.channel.registerMonkeyPatch("pg",X5.postgres)}a(uCs,"enable");X5.enable=uCs});var u9n=T(LW=>{"use strict";f();Object.defineProperty(LW,"__esModule",{value:!0});LW.enable=LW.redis=void 0;var xKt=Hd(),dCs=a(function(t){var e=t.RedisClient.prototype.internal_send_command;return t.RedisClient.prototype.internal_send_command=function(r){if(r){var n=r.callback;if(!n||!n.pubsubBound){var o=this.address,s=process.hrtime(),c=new Date;r.callback=xKt.channel.bindToContext(function(l,u){var d=process.hrtime(s),p=d[0]*1e3+d[1]/1e6|0;xKt.channel.publish("redis",{duration:p,address:o,commandObj:r,err:l,result:u,time:c}),typeof n=="function"&&n.apply(this,arguments)}),r.callback.pubsubBound=!0}}return e.call(this,r)},t},"redisPatchFunction");LW.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:dCs};function fCs(){xKt.channel.registerMonkeyPatch("redis",LW.redis)}a(fCs,"enable");LW.enable=fCs});var d9n=T(PO=>{"use strict";f();var det=PO&&PO.__assign||function(){return det=Object.assign||function(t){for(var e,r=1,n=arguments.length;r= 6.0.0 < 9.0.0",patch:pCs};function hCs(){wKt.channel.registerMonkeyPatch("tedious",PO.tedious)}a(hCs,"enable");PO.enable=hCs});var f9n=T(H_=>{"use strict";f();var mCs=H_&&H_.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gCs=H_&&H_.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);od[p]?h:p);return p}a(n,"getLogLevel");function o(l){this.add(new r(t,{level:n(l)}))}a(o,"patchedConfigure");var s=t.createLogger;t.createLogger=a(function(u){var d=s.call(this,u);d.add(new r(t,{level:n(u)}));var p=d.configure;return d.configure=function(){p.apply(this,arguments),o.apply(this,arguments)},d},"patchedCreate");var c=t.configure;return t.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},t.add(new r(t)),t},"winston3PatchFunction");H_.winston3={versionSpecifier:"3.x",patch:yCs};H_.winston2={versionSpecifier:"2.x",patch:ACs};function ECs(){fet.channel.registerMonkeyPatch("winston",H_.winston2),fet.channel.registerMonkeyPatch("winston",H_.winston3)}a(ECs,"enable");H_.enable=ECs});var T9n=T(ml=>{"use strict";f();Object.defineProperty(ml,"__esModule",{value:!0});ml.enable=ml.tedious=ml.pgPool=ml.pg=ml.winston=ml.redis=ml.mysql=ml.mongodb=ml.mongodbCore=ml.console=ml.bunyan=ml.azuresdk=void 0;var p9n=JFn();ml.azuresdk=p9n;var h9n=ZFn();ml.bunyan=h9n;var m9n=t9n();ml.console=m9n;var g9n=r9n();ml.mongodbCore=g9n;var A9n=n9n();ml.mongodb=A9n;var y9n=o9n();ml.mysql=y9n;var E9n=a9n();ml.pgPool=E9n;var _9n=l9n();ml.pg=_9n;var C9n=u9n();ml.redis=C9n;var v9n=d9n();ml.tedious=v9n;var b9n=f9n();ml.winston=b9n;function _Cs(){h9n.enable(),m9n.enable(),g9n.enable(),A9n.enable(),y9n.enable(),_9n.enable(),E9n.enable(),C9n.enable(),b9n.enable(),p9n.enable(),v9n.enable()}a(_Cs,"enable");ml.enable=_Cs});var met=T(FW=>{"use strict";f();Object.defineProperty(FW,"__esModule",{value:!0});FW.IsInitialized=void 0;FW.registerContextPreservation=CCs;var RKt=Hc(),I9n=hXe();FW.IsInitialized=!I9n.JsonConfig.getInstance().noDiagnosticChannel;var PKt="DiagnosticChannel";if(FW.IsInitialized){Gw=T9n(),S9n=I9n.JsonConfig.getInstance().noPatchModules,pet=S9n.split(","),kKt={bunyan:Gw.bunyan,console:Gw.console,mongodb:Gw.mongodb,mongodbCore:Gw.mongodbCore,mysql:Gw.mysql,redis:Gw.redis,pg:Gw.pg,pgPool:Gw.pgPool,winston:Gw.winston,azuresdk:Gw.azuresdk};for(het in kKt)pet.indexOf(het)===-1&&(kKt[het].enable(),RKt.info(PKt,"Subscribed to ".concat(het," events")));pet.length>0&&RKt.info(PKt,"Some modules will not be patched",pet)}else RKt.info(PKt,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");var Gw,S9n,pet,kKt,het;function CCs(t){if(FW.IsInitialized){var e=Hd();e.channel.addContextPreservation(t)}}a(CCs,"registerContextPreservation")});var uce=T((fId,x9n)=>{"use strict";f();x9n.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}});var Lm=T((MKt,w9n)=>{"use strict";f();var _7=MKt&&MKt.__assign||function(){return _7=Object.assign||function(t){for(var e,r=1,n=arguments.length;r>u&255)},"toChar"),n=a(function(l){return r(l,24)+r(l,16)+r(l,8)+r(l,0)},"int32AsString"),o=e.map(n).join(""),s=Buffer.from?Buffer.from(o,"binary"):new Buffer(o,"binary"),c=s.toString("base64");return c.substr(0,c.indexOf("="))},t.random32=function(){return 4294967296*Math.random()|0},t.randomu32=function(){return t.random32()+2147483648},t.w3cTraceId=function(){for(var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",n,o=0;o<4;o++)n=t.random32(),r+=e[n&15]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var s=e[8+Math.random()*4|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+s+r.substr(16,3)+r.substr(19,12)},t.w3cSpanId=function(){return t.w3cTraceId().substring(16)},t.isValidW3CId=function(e){return e.length===32&&e!=="00000000000000000000000000000000"},t.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"},t.isError=function(e){return Object.prototype.toString.call(e)==="[object Error]"},t.isPrimitive=function(e){var r=typeof e;return r==="string"||r==="number"||r==="boolean"},t.isDate=function(e){return Object.prototype.toString.call(e)==="[object Date]"},t.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var r=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/(1e3*60))%60,o=""+Math.floor(e/(1e3*60*60))%24,s=Math.floor(e/(1e3*60*60*24));r=r.indexOf(".")<2?"0"+r:r,n=n.length<2?"0"+n:n,o=o.length<2?"0"+o:o;var c=s>0?s+".":"";return c+o+":"+n+":"+r},t.extractError=function(e){var r=e;return{message:e.message,code:r.code||r.id||""}},t.extractObject=function(e){return e instanceof Error?t.extractError(e):typeof e.toJSON=="function"?e.toJSON():e},t.validateStringMap=function(e){if(typeof e!="object"){UW.info("Invalid properties dropped from payload");return}var r={};for(var n in e){var o="",s=e[n],c=typeof s;if(t.isPrimitive(s))o=s.toString();else if(s===null||c==="undefined")o="";else if(c==="function"){UW.info("key: "+n+" was function; will not serialize");continue}else{var l=t.isArray(s)?s:t.extractObject(s);try{t.isPrimitive(l)?o=l:o=JSON.stringify(l)}catch(u){o=s.constructor.name.toString()+" (Error: "+u.message+")",UW.info("key: "+n+", could not be serialized")}}r[n]=o.substring(0,t.MAX_PROPERTY_LENGTH)}return r},t.canIncludeCorrelationHeader=function(e,r){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||n.length==0||!r)return!0;for(var o=0;o{"use strict";f();var OKt=Lm(),SCs=(function(){function t(){}return a(t,"CorrelationIdManager"),t.queryCorrelationId=function(e,r){},t.cancelCorrelationIdQuery=function(e,r){},t.generateRequestId=function(e){if(e){e=e[0]=="|"?e:"|"+e,e[e.length-1]!=="."&&(e+=".");var r=(t.currentRootId++).toString(16);return t.appendSuffix(e,r,"_")}else return t.generateRootId()},t.getRootId=function(e){var r=e.indexOf(".");r<0&&(r=e.length);var n=e[0]==="|"?1:0;return e.substring(n,r)},t.generateRootId=function(){return"|"+OKt.w3cTraceId()+"."},t.appendSuffix=function(e,r,n){if(e.length+r.lengtho)for(;o>1;--o){var s=e[o-1];if(s==="."||s==="_")break}if(o<=1)return t.generateRootId();for(r=OKt.randomu32().toString(16);r.length<8;)r="0"+r;return e.substring(0,o)+r+"#"},t.correlationIdPrefix="cid-v1:",t.w3cEnabled=!0,t.HTTP_TIMEOUT=2500,t.requestIdMaxLength=1024,t.currentRootId=OKt.randomu32(),t})();R9n.exports=SCs});var get=T((EId,P9n)=>{"use strict";f();var Fm=Lm(),ICs=QW(),xCs=(function(){function t(e,r){if(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.version=t.DEFAULT_VERSION,e&&typeof e=="string")if(e.split(",").length>1)this.traceId=Fm.w3cTraceId(),this.spanId=Fm.w3cTraceId().substr(0,16);else{var n=e.trim().split("-"),o=n.length;o>=4?(this.version=n[0],this.traceId=n[1],this.spanId=n[2],this.traceFlag=n[3]):(this.traceId=Fm.w3cTraceId(),this.spanId=Fm.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=t.DEFAULT_VERSION,this.traceId=Fm.w3cTraceId()),this.version==="00"&&o!==4&&(this.traceId=Fm.w3cTraceId(),this.spanId=Fm.w3cTraceId().substr(0,16)),this.version==="ff"&&(this.version=t.DEFAULT_VERSION,this.traceId=Fm.w3cTraceId(),this.spanId=Fm.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=t.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=t.DEFAULT_TRACE_FLAG,this.traceId=Fm.w3cTraceId()),t.isValidTraceId(this.traceId)||(this.traceId=Fm.w3cTraceId()),t.isValidSpanId(this.spanId)||(this.spanId=Fm.w3cTraceId().substr(0,16),this.traceId=Fm.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(r){this.parentId=r.slice();var s=ICs.getRootId(r);t.isValidTraceId(s)||(this.legacyRootId=s,s=Fm.w3cTraceId()),r.indexOf("|")!==-1&&(r=r.substring(1+r.substring(0,r.length-1).lastIndexOf("."),r.length-1)),this.traceId=s,this.spanId=r}else this.traceId=Fm.w3cTraceId(),this.spanId=Fm.w3cTraceId().substr(0,16)}return a(t,"Traceparent"),t.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&e!=="00000000000000000000000000000000"},t.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&e!=="0000000000000000"},t.formatOpenTelemetryTraceFlags=function(e){var r="0"+e.toString(16);return r.substring(r.length-2)},t.prototype.getBackCompatRequestId=function(){return"|".concat(this.traceId,".").concat(this.spanId,".")},t.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},t.prototype.updateSpanId=function(){this.spanId=Fm.w3cTraceId().substr(0,16)},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t})();P9n.exports=xCs});var BKt=T((vId,k9n)=>{"use strict";f();var wCs=(function(){function t(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return a(t,"Tracestate"),t.prototype.toString=function(){var e=this.fieldmap;return!e||e.length==0?null:e.join(", ")},t.validateKeyChars=function(e){var r=e.split("@");if(r.length==2){var n=r[0].trim(),o=r[1].trim(),s=!!n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/),c=!!o.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/);return s&&c}else if(r.length==1)return!!e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/);return!1},t.prototype.parseHeader=function(e){var r=[],n={},o=e.split(",");if(o.length>32)return null;for(var s=0,c=o;s{"use strict";f();var RCs=(function(){function t(){}return a(t,"Domain"),t})();D9n.exports=RCs});var M9n=T((LKt,N9n)=>{"use strict";f();var PCs=LKt&&LKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),kCs=kO(),DCs=(function(t){PCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"AvailabilityData"),e})(kCs);N9n.exports=DCs});var FKt=T((PId,O9n)=>{"use strict";f();var NCs=(function(){function t(){}return a(t,"Base"),t})();O9n.exports=NCs});var L9n=T((NId,B9n)=>{"use strict";f();var MCs=(function(){function t(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}return a(t,"ContextTagKeys"),t})();B9n.exports=MCs});var U9n=T((UKt,F9n)=>{"use strict";f();var OCs=UKt&&UKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),BCs=FKt(),LCs=(function(t){OCs(e,t);function e(){return t.call(this)||this}return a(e,"Data"),e})(BCs);F9n.exports=LCs});var qKt=T((FId,Q9n)=>{"use strict";f();var QKt;(function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"})(QKt||(QKt={}));Q9n.exports=QKt});var G9n=T((QId,q9n)=>{"use strict";f();var FCs=qKt(),UCs=(function(){function t(){this.kind=FCs.Measurement}return a(t,"DataPoint"),t})();q9n.exports=UCs});var j9n=T((HId,H9n)=>{"use strict";f();var QCs=(function(){function t(){this.ver=1,this.sampleRate=100,this.tags={}}return a(t,"Envelope"),t})();H9n.exports=QCs});var HKt=T((GKt,$9n)=>{"use strict";f();var qCs=GKt&&GKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),GCs=kO(),HCs=(function(t){qCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"EventData"),e})(GCs);$9n.exports=HCs});var W9n=T((jKt,V9n)=>{"use strict";f();var jCs=jKt&&jKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),$Cs=kO(),VCs=(function(t){jCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.exceptions=[],r.properties={},r.measurements={},r}return a(e,"ExceptionData"),e})($Cs);V9n.exports=VCs});var Y9n=T((KId,z9n)=>{"use strict";f();var WCs=(function(){function t(){this.hasFullStack=!0,this.parsedStack=[]}return a(t,"ExceptionDetails"),t})();z9n.exports=WCs});var J9n=T(($Kt,K9n)=>{"use strict";f();var zCs=$Kt&&$Kt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),YCs=kO(),KCs=(function(t){zCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r}return a(e,"MessageData"),e})(YCs);K9n.exports=KCs});var Z9n=T((VKt,X9n)=>{"use strict";f();var JCs=VKt&&VKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),XCs=kO(),ZCs=(function(t){JCs(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.metrics=[],r.properties={},r}return a(e,"MetricData"),e})(XCs);X9n.exports=ZCs});var t7n=T((WKt,e7n)=>{"use strict";f();var e1s=WKt&&WKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),t1s=HKt(),r1s=(function(t){e1s(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"PageViewData"),e})(t1s);e7n.exports=r1s});var n7n=T((zKt,r7n)=>{"use strict";f();var n1s=zKt&&zKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),i1s=kO(),o1s=(function(t){n1s(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.success=!0,r.properties={},r.measurements={},r}return a(e,"RemoteDependencyData"),e})(i1s);r7n.exports=o1s});var o7n=T((YKt,i7n)=>{"use strict";f();var s1s=YKt&&YKt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),a1s=kO(),c1s=(function(t){s1s(e,t);function e(){var r=t.call(this)||this;return r.ver=2,r.properties={},r.measurements={},r}return a(e,"RequestData"),e})(a1s);i7n.exports=c1s});var a7n=T((lxd,s7n)=>{"use strict";f();var KKt;(function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"})(KKt||(KKt={}));s7n.exports=KKt});var l7n=T((dxd,c7n)=>{"use strict";f();var l1s=(function(){function t(){}return a(t,"StackFrame"),t})();c7n.exports=l1s});var JKt=T(R0=>{"use strict";f();Object.defineProperty(R0,"__esModule",{value:!0});R0.AvailabilityData=M9n();R0.Base=FKt();R0.ContextTagKeys=L9n();R0.Data=U9n();R0.DataPoint=G9n();R0.DataPointType=qKt();R0.Domain=kO();R0.Envelope=j9n();R0.EventData=HKt();R0.ExceptionData=W9n();R0.ExceptionDetails=Y9n();R0.MessageData=J9n();R0.MetricData=Z9n();R0.PageViewData=t7n();R0.RemoteDependencyData=n7n();R0.RequestData=o7n();R0.SeverityLevel=a7n();R0.StackFrame=l7n()});var u7n=T(KTe=>{"use strict";f();Object.defineProperty(KTe,"__esModule",{value:!0});KTe.RemoteDependencyDataConstants=void 0;KTe.domainSupportsProperties=d1s;var qW=JKt(),u1s=(function(){function t(){}return a(t,"RemoteDependencyDataConstants"),t.TYPE_HTTP="Http",t.TYPE_AI="Http (tracked component)",t})();KTe.RemoteDependencyDataConstants=u1s;function d1s(t){return"properties"in t||t instanceof qW.EventData||t instanceof qW.ExceptionData||t instanceof qW.MessageData||t instanceof qW.MetricData||t instanceof qW.PageViewData||t instanceof qW.RemoteDependencyData||t instanceof qW.RequestData}a(d1s,"domainSupportsProperties")});var f7n=T(d7n=>{"use strict";f();Object.defineProperty(d7n,"__esModule",{value:!0})});var h7n=T(p7n=>{"use strict";f();Object.defineProperty(p7n,"__esModule",{value:!0})});var g7n=T(m7n=>{"use strict";f();Object.defineProperty(m7n,"__esModule",{value:!0})});var y7n=T(A7n=>{"use strict";f();Object.defineProperty(A7n,"__esModule",{value:!0})});var _7n=T(E7n=>{"use strict";f();Object.defineProperty(E7n,"__esModule",{value:!0})});var v7n=T(C7n=>{"use strict";f();Object.defineProperty(C7n,"__esModule",{value:!0})});var T7n=T(b7n=>{"use strict";f();Object.defineProperty(b7n,"__esModule",{value:!0})});var I7n=T(S7n=>{"use strict";f();Object.defineProperty(S7n,"__esModule",{value:!0})});var w7n=T(x7n=>{"use strict";f();Object.defineProperty(x7n,"__esModule",{value:!0})});var P7n=T(R7n=>{"use strict";f();Object.defineProperty(R7n,"__esModule",{value:!0})});var D7n=T(k7n=>{"use strict";f();Object.defineProperty(k7n,"__esModule",{value:!0})});var M7n=T(N7n=>{"use strict";f();Object.defineProperty(N7n,"__esModule",{value:!0})});var O7n=T(C7=>{"use strict";f();Object.defineProperty(C7,"__esModule",{value:!0});C7.TelemetryType=C7.TelemetryTypeString=void 0;C7.telemetryTypeToBaseType=f1s;C7.baseTypeToTelemetryType=p1s;function f1s(t){switch(t){case kh.Event:return"EventData";case kh.Exception:return"ExceptionData";case kh.Trace:return"MessageData";case kh.Metric:return"MetricData";case kh.Request:return"RequestData";case kh.Dependency:return"RemoteDependencyData";case kh.Availability:return"AvailabilityData";case kh.PageView:return"PageViewData"}}a(f1s,"telemetryTypeToBaseType");function p1s(t){switch(t){case"EventData":return kh.Event;case"ExceptionData":return kh.Exception;case"MessageData":return kh.Trace;case"MetricData":return kh.Metric;case"RequestData":return kh.Request;case"RemoteDependencyData":return kh.Dependency;case"AvailabilityData":return kh.Availability;case"PageViewData":return kh.PageView}}a(p1s,"baseTypeToTelemetryType");C7.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"};var kh;(function(t){t[t.Event=0]="Event",t[t.Exception=1]="Exception",t[t.Trace=2]="Trace",t[t.Metric=3]="Metric",t[t.Request=4]="Request",t[t.Dependency=5]="Dependency",t[t.Availability=6]="Availability",t[t.PageView=7]="PageView"})(kh||(C7.TelemetryType=kh={}))});var B7n=T(Tp=>{"use strict";f();var h1s=Tp&&Tp.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mv=Tp&&Tp.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&h1s(e,t,r)};Object.defineProperty(Tp,"__esModule",{value:!0});Mv(f7n(),Tp);Mv(h7n(),Tp);Mv(g7n(),Tp);Mv(y7n(),Tp);Mv(_7n(),Tp);Mv(v7n(),Tp);Mv(T7n(),Tp);Mv(I7n(),Tp);Mv(w7n(),Tp);Mv(P7n(),Tp);Mv(D7n(),Tp);Mv(M7n(),Tp);Mv(O7n(),Tp)});var F7n=T(L7n=>{"use strict";f();Object.defineProperty(L7n,"__esModule",{value:!0})});var Q7n=T(U7n=>{"use strict";f();Object.defineProperty(U7n,"__esModule",{value:!0})});var G7n=T(q7n=>{"use strict";f();Object.defineProperty(q7n,"__esModule",{value:!0})});var j7n=T(H7n=>{"use strict";f();Object.defineProperty(H7n,"__esModule",{value:!0})});var V7n=T($7n=>{"use strict";f();Object.defineProperty($7n,"__esModule",{value:!0})});var z7n=T(W7n=>{"use strict";f();Object.defineProperty(W7n,"__esModule",{value:!0})});var K7n=T(Y7n=>{"use strict";f();Object.defineProperty(Y7n,"__esModule",{value:!0})});var X7n=T(J7n=>{"use strict";f();Object.defineProperty(J7n,"__esModule",{value:!0})});var Z7n=T(j_=>{"use strict";f();var m1s=j_&&j_.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),v7=j_&&j_.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&m1s(e,t,r)};Object.defineProperty(j_,"__esModule",{value:!0});v7(F7n(),j_);v7(Q7n(),j_);v7(G7n(),j_);v7(j7n(),j_);v7(V7n(),j_);v7(z7n(),j_);v7(K7n(),j_);v7(X7n(),j_)});var nA=T(Z5=>{"use strict";f();var g1s=Z5&&Z5.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Aet=Z5&&Z5.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&g1s(e,t,r)};Object.defineProperty(Z5,"__esModule",{value:!0});Aet(u7n(),Z5);Aet(JKt(),Z5);Aet(B7n(),Z5);Aet(Z7n(),Z5)});var XKt=T((Awd,eUn)=>{"use strict";f();var A1s=(function(){function t(){}return a(t,"RequestParser"),t.prototype.getUrl=function(){return this.url},t.prototype.RequestParser=function(){this.startTime=+new Date},t.prototype._setStatus=function(e,r){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var o=this.properties||{};if(r){if(typeof r=="string")o.error=r;else if(r instanceof Error)o.error=r.message;else if(typeof r=="object")for(var s in r)o[s]=r[s]&&r[s].toString&&r[s].toString()}this.properties=o},t.prototype._isSuccess=function(){return 0{"use strict";f();var Hw;Object.defineProperty(Ir,"__esModule",{value:!0});Ir.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=Ir.WEB_INSTRUMENTATION_DEFAULT_SOURCE=Ir.TIME_SINCE_ENQUEUED=Ir.ENQUEUED_TIME=Ir.MessageBusDestination=Ir.MicrosoftEventHub=Ir.AzNamespace=Ir.AttachTypePrefix=Ir.HttpRequestCookieNames=Ir.StatsbeatNetworkCategory=Ir.StatsbeatFeatureType=Ir.StatsbeatInstrumentation=Ir.StatsbeatFeature=Ir.StatsbeatCounter=Ir.StatsbeatAttach=Ir.StatsbeatResourceProvider=Ir.StatsbeatTelemetryName=Ir.HeartBeatMetricName=Ir.DependencyTypeName=Ir.TelemetryTypeStringToQuickPulseDocumentType=Ir.TelemetryTypeStringToQuickPulseType=Ir.QuickPulseType=Ir.QuickPulseDocumentType=Ir.PerformanceToQuickPulseCounter=Ir.MetricId=Ir.PerformanceCounter=Ir.QuickPulseCounter=Ir.DEFAULT_LIVEMETRICS_HOST=Ir.DEFAULT_LIVEMETRICS_ENDPOINT=Ir.DEFAULT_BREEZE_ENDPOINT=Ir.APPLICATION_INSIGHTS_SDK_VERSION=void 0;Ir.APPLICATION_INSIGHTS_SDK_VERSION="2.9.8";Ir.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com";Ir.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com";Ir.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com";var Um;(function(t){t.COMMITTED_BYTES="\\Memory\\Committed Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",t.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",t.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",t.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",t.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",t.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",t.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"})(Um||(Ir.QuickPulseCounter=Um={}));var JTe;(function(t){t.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",t.AVAILABLE_BYTES="\\Memory\\Available Bytes",t.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",t.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",t.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",t.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"})(JTe||(Ir.PerformanceCounter=JTe={}));var tUn;(function(t){t.REQUESTS_DURATION="requests/duration",t.DEPENDENCIES_DURATION="dependencies/duration",t.EXCEPTIONS_COUNT="exceptions/count",t.TRACES_COUNT="traces/count"})(tUn||(Ir.MetricId=tUn={}));Ir.PerformanceToQuickPulseCounter=(Hw={},Hw[JTe.PROCESSOR_TIME]=Um.PROCESSOR_TIME,Hw[JTe.REQUEST_RATE]=Um.REQUEST_RATE,Hw[JTe.REQUEST_DURATION]=Um.REQUEST_DURATION,Hw[Um.COMMITTED_BYTES]=Um.COMMITTED_BYTES,Hw[Um.REQUEST_FAILURE_RATE]=Um.REQUEST_FAILURE_RATE,Hw[Um.DEPENDENCY_RATE]=Um.DEPENDENCY_RATE,Hw[Um.DEPENDENCY_FAILURE_RATE]=Um.DEPENDENCY_FAILURE_RATE,Hw[Um.DEPENDENCY_DURATION]=Um.DEPENDENCY_DURATION,Hw[Um.EXCEPTION_RATE]=Um.EXCEPTION_RATE,Hw);Ir.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"};Ir.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"};Ir.TelemetryTypeStringToQuickPulseType={EventData:Ir.QuickPulseType.Event,ExceptionData:Ir.QuickPulseType.Exception,MessageData:Ir.QuickPulseType.Trace,MetricData:Ir.QuickPulseType.Metric,RequestData:Ir.QuickPulseType.Request,RemoteDependencyData:Ir.QuickPulseType.Dependency,AvailabilityData:Ir.QuickPulseType.Availability,PageViewData:Ir.QuickPulseType.PageView};Ir.TelemetryTypeStringToQuickPulseDocumentType={EventData:Ir.QuickPulseDocumentType.Event,ExceptionData:Ir.QuickPulseDocumentType.Exception,MessageData:Ir.QuickPulseDocumentType.Trace,MetricData:Ir.QuickPulseDocumentType.Metric,RequestData:Ir.QuickPulseDocumentType.Request,RemoteDependencyData:Ir.QuickPulseDocumentType.Dependency,AvailabilityData:Ir.QuickPulseDocumentType.Availability,PageViewData:Ir.QuickPulseDocumentType.PageView};Ir.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"};Ir.HeartBeatMetricName="HeartbeatState";Ir.StatsbeatTelemetryName="Statsbeat";Ir.StatsbeatResourceProvider={appsvc:"appsvc",aks:"aks",functions:"functions",vm:"vm",unknown:"unknown"};Ir.StatsbeatAttach={codeless:"IntegratedAuto",sdk:"Manual"};Ir.StatsbeatCounter={REQUEST_SUCCESS:"Request_Success_Count",REQUEST_FAILURE:"Request_Failure_Count",REQUEST_DURATION:"Request_Duration",RETRY_COUNT:"Retry_Count",THROTTLE_COUNT:"Throttle_Count",EXCEPTION_COUNT:"Exception_Count",ATTACH:"Attach",FEATURE:"Feature"};var rUn;(function(t){t[t.NONE=0]="NONE",t[t.DISK_RETRY=1]="DISK_RETRY",t[t.AAD_HANDLING=2]="AAD_HANDLING",t[t.BROWSER_SDK_LOADER=4]="BROWSER_SDK_LOADER",t[t.LIVE_METRICS=16]="LIVE_METRICS",t[t.NATIVE_METRICS=8192]="NATIVE_METRICS"})(rUn||(Ir.StatsbeatFeature=rUn={}));var nUn;(function(t){t[t.NONE=0]="NONE",t[t.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",t[t.MONGODB=2]="MONGODB",t[t.MYSQL=4]="MYSQL",t[t.REDIS=8]="REDIS",t[t.POSTGRES=16]="POSTGRES",t[t.BUNYAN=32]="BUNYAN",t[t.WINSTON=64]="WINSTON",t[t.CONSOLE=128]="CONSOLE"})(nUn||(Ir.StatsbeatInstrumentation=nUn={}));var iUn;(function(t){t[t.Feature=0]="Feature",t[t.Instrumentation=1]="Instrumentation"})(iUn||(Ir.StatsbeatFeatureType=iUn={}));var oUn;(function(t){t[t.Breeze=0]="Breeze",t[t.Quickpulse=1]="Quickpulse"})(oUn||(Ir.StatsbeatNetworkCategory=oUn={}));var sUn;(function(t){t.SESSION="ai_session",t.USER="ai_user",t.AUTH_USER="ai_authUser"})(sUn||(Ir.HttpRequestCookieNames=sUn={}));var aUn;(function(t){t.INTEGRATED_AUTO="i",t.MANUAL="m"})(aUn||(Ir.AttachTypePrefix=aUn={}));Ir.AzNamespace="az.namespace";Ir.MicrosoftEventHub="Microsoft.EventHub";Ir.MessageBusDestination="message_bus.destination";Ir.ENQUEUED_TIME="enqueuedTime";Ir.TIME_SINCE_ENQUEUED="timeSinceEnqueued";Ir.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai";Ir.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"});var rJt=T((tJt,cUn)=>{"use strict";f();var y1s=tJt&&tJt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),yet=require("url"),E1s=nA(),ZKt=Lm(),Ov=uce(),_1s=XKt(),b7=QW(),C1s=BKt(),eJt=get(),v1s=Hc(),Eet=Xl(),b1s=(function(t){y1s(e,t);function e(r,n){var o=t.call(this)||this;return r&&(o.method=r.method,o.url=o._getAbsoluteUrl(r),o.startTime=+new Date,o.socketRemoteAddress=r.socket&&r.socket.remoteAddress,o.parseHeaders(r,n),r.connection&&(o.connectionRemoteAddress=r.connection.remoteAddress,o.legacySocketRemoteAddress=r.connection.socket&&r.connection.socket.remoteAddress)),o}return a(e,"HttpRequestParser"),e.prototype.onError=function(r,n){this._setStatus(void 0,r),n&&(this.duration=n)},e.prototype.onResponse=function(r,n){this._setStatus(r.statusCode,void 0),n&&(this.duration=n)},e.prototype.getRequestTelemetry=function(r){var n=this.method;try{n+=" "+new yet.URL(this.url).pathname}catch{}var o={id:this.requestId,name:n,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(r&&r.time?o.time=r.time:this.startTime&&(o.time=new Date(this.startTime)),r){for(var s in r)o[s]||(o[s]=r[s]);if(r.properties)for(var s in r.properties)o.properties[s]=r.properties[s]}return o},e.prototype.getRequestTags=function(r){var n={};for(var o in r)n[o]=r[o];return n[e.keys.locationIp]=r[e.keys.locationIp]||this._getIp(),n[e.keys.sessionId]=r[e.keys.sessionId]||this._getId(Eet.HttpRequestCookieNames.SESSION),n[e.keys.userId]=r[e.keys.userId]||this._getId(Eet.HttpRequestCookieNames.USER),n[e.keys.userAuthUserId]=r[e.keys.userAuthUserId]||this._getId(Eet.HttpRequestCookieNames.AUTH_USER),n[e.keys.operationName]=this.getOperationName(r),n[e.keys.operationParentId]=this.getOperationParentId(r),n[e.keys.operationId]=this.getOperationId(r),n},e.prototype.getOperationId=function(r){return r[e.keys.operationId]||this.operationId},e.prototype.getOperationParentId=function(r){return r[e.keys.operationParentId]||this.parentId||this.getOperationId(r)},e.prototype.getOperationName=function(r){if(r[e.keys.operationName])return r[e.keys.operationName];var n="";try{n=new yet.URL(this.url).pathname}catch{}var o=this.method;return n&&(o+=" "+n),o},e.prototype.getRequestId=function(){return this.requestId},e.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},e.prototype.getTraceparent=function(){return this.traceparent},e.prototype.getTracestate=function(){return this.tracestate},e.prototype.getLegacyRootId=function(){return this.legacyRootId},e.prototype._getAbsoluteUrl=function(r){if(!r.headers)return r.url;var n=r.connection?r.connection.encrypted:null,o=n||r.headers["x-forwarded-proto"]=="https"?"https":"http",s=o+"://"+r.headers.host+"/",c="",l="";try{var u=new yet.URL(r.url,s);c=u.pathname,l=u.search}catch{}var d=yet.format({protocol:o,host:r.headers.host,pathname:c,search:l});return d},e.prototype._getIp=function(){var r=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,n=a(function(s){var c=r.exec(s);if(c)return c[0]},"check"),o=n(this.rawHeaders["x-forwarded-for"])||n(this.rawHeaders["x-client-ip"])||n(this.rawHeaders["x-real-ip"])||n(this.connectionRemoteAddress)||n(this.socketRemoteAddress)||n(this.legacySocketRemoteAddress);return!o&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&this.connectionRemoteAddress.substr(0,2)==="::"&&(o="127.0.0.1"),o},e.prototype._getId=function(r){var n=this.rawHeaders&&this.rawHeaders.cookie&&typeof this.rawHeaders.cookie=="string"&&this.rawHeaders.cookie||"";if(r===Eet.HttpRequestCookieNames.AUTH_USER)try{n=decodeURI(n)}catch(s){n="",v1s.warn("Could not decode the auth cookie with error: ",ZKt.dumpObj(s))}var o=e.parseId(ZKt.getCookie(r,n));return o},e.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},e.prototype.parseHeaders=function(r,n){if(this.rawHeaders=r.headers||r.rawHeaders,this.userAgent=r.headers&&r.headers["user-agent"],this.sourceCorrelationId=ZKt.getCorrelationContextTarget(r,Ov.requestContextSourceKey),r.headers){var o=r.headers[Ov.traceStateHeader]?r.headers[Ov.traceStateHeader].toString():null,s=r.headers[Ov.traceparentHeader]?r.headers[Ov.traceparentHeader].toString():null,c=r.headers[Ov.requestIdHeader]?r.headers[Ov.requestIdHeader].toString():null,l=r.headers[Ov.parentIdHeader]?r.headers[Ov.parentIdHeader].toString():null,u=r.headers[Ov.rootIdHeader]?r.headers[Ov.rootIdHeader].toString():null;this.correlationContextHeader=r.headers[Ov.correlationContextHeader]?r.headers[Ov.correlationContextHeader].toString():null,b7.w3cEnabled&&(s||o)?(this.traceparent=new eJt(s?s.toString():null),this.tracestate=s&&o&&new C1s(o?o.toString():null),this.setBackCompatFromThisTraceContext()):c?b7.w3cEnabled?(this.traceparent=new eJt(null,c),this.setBackCompatFromThisTraceContext()):(this.parentId=c,this.requestId=b7.generateRequestId(this.parentId),this.operationId=b7.getRootId(this.requestId)):b7.w3cEnabled?(this.traceparent=new eJt,this.traceparent.parentId=l,this.traceparent.legacyRootId=u||l,this.setBackCompatFromThisTraceContext()):(this.parentId=l,this.requestId=b7.generateRequestId(u||this.parentId),this.correlationContextHeader=null,this.operationId=b7.getRootId(this.requestId)),n&&(this.requestId=n,this.operationId=b7.getRootId(this.requestId))}},e.parseId=function(r){var n=r.split("|");return n.length>0?n[0]:""},e.keys=new E1s.ContextTagKeys,e})(_1s);cUn.exports=b1s});var SUn=T((Gi,TUn)=>{f();Gi=TUn.exports=Us;var oc;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?oc=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):oc=a(function(){},"debug");Gi.SEMVER_SPEC_VERSION="2.0.0";var XTe=256,_et=Number.MAX_SAFE_INTEGER||9007199254740991,nJt=16,T1s=XTe-6,ZTe=Gi.re=[],gl=Gi.safeRe=[],jt=Gi.src=[],Ts=0,cJt="[a-zA-Z0-9-]",iJt=[["\\s",1],["\\d",XTe],[cJt,T1s]];function xet(t){for(var e=0;e)?=?)";var Cet=Ts++;jt[Cet]=jt[pce]+"|x|X|\\*";var vet=Ts++;jt[vet]=jt[fce]+"|x|X|\\*";var GW=Ts++;jt[GW]="[v=\\s]*("+jt[vet]+")(?:\\.("+jt[vet]+")(?:\\.("+jt[vet]+")(?:"+jt[uJt]+")?"+jt[tSe]+"?)?)?";var mce=Ts++;jt[mce]="[v=\\s]*("+jt[Cet]+")(?:\\.("+jt[Cet]+")(?:\\.("+jt[Cet]+")(?:"+jt[dJt]+")?"+jt[tSe]+"?)?)?";var pUn=Ts++;jt[pUn]="^"+jt[yce]+"\\s*"+jt[GW]+"$";var hUn=Ts++;jt[hUn]="^"+jt[yce]+"\\s*"+jt[mce]+"$";var mUn=Ts++;jt[mUn]="(?:^|[^\\d])(\\d{1,"+nJt+"})(?:\\.(\\d{1,"+nJt+"}))?(?:\\.(\\d{1,"+nJt+"}))?(?:$|[^\\d])";var wet=Ts++;jt[wet]="(?:~>?)";var gce=Ts++;jt[gce]="(\\s*)"+jt[wet]+"\\s+";ZTe[gce]=new RegExp(jt[gce],"g");gl[gce]=new RegExp(xet(jt[gce]),"g");var S1s="$1~",gUn=Ts++;jt[gUn]="^"+jt[wet]+jt[GW]+"$";var AUn=Ts++;jt[AUn]="^"+jt[wet]+jt[mce]+"$";var Ret=Ts++;jt[Ret]="(?:\\^)";var Ace=Ts++;jt[Ace]="(\\s*)"+jt[Ret]+"\\s+";ZTe[Ace]=new RegExp(jt[Ace],"g");gl[Ace]=new RegExp(xet(jt[Ace]),"g");var I1s="$1^",yUn=Ts++;jt[yUn]="^"+jt[Ret]+jt[GW]+"$";var EUn=Ts++;jt[EUn]="^"+jt[Ret]+jt[mce]+"$";var mJt=Ts++;jt[mJt]="^"+jt[yce]+"\\s*("+pJt+")$|^$";var gJt=Ts++;jt[gJt]="^"+jt[yce]+"\\s*("+fUn+")$|^$";var HW=Ts++;jt[HW]="(\\s*)"+jt[yce]+"\\s*("+pJt+"|"+jt[GW]+")";ZTe[HW]=new RegExp(jt[HW],"g");gl[HW]=new RegExp(xet(jt[HW]),"g");var x1s="$1$2$3",_Un=Ts++;jt[_Un]="^\\s*("+jt[GW]+")\\s+-\\s+("+jt[GW]+")\\s*$";var CUn=Ts++;jt[CUn]="^\\s*("+jt[mce]+")\\s+-\\s+("+jt[mce]+")\\s*$";var vUn=Ts++;jt[vUn]="(<|>)?=?\\s*\\*";for(eD=0;eDXTe)return null;var r=e.loose?gl[hJt]:gl[fJt];if(!r.test(t))return null;try{return new Us(t,e)}catch{return null}}a(jW,"parse");Gi.valid=w1s;function w1s(t,e){var r=jW(t,e);return r?r.version:null}a(w1s,"valid");Gi.clean=R1s;function R1s(t,e){var r=jW(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}a(R1s,"clean");Gi.SemVer=Us;function Us(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Us){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>XTe)throw new TypeError("version is longer than "+XTe+" characters");if(!(this instanceof Us))return new Us(t,e);oc("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?gl[hJt]:gl[fJt]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>_et||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_et||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_et||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var o=+n;if(o>=0&&o<_et)return o}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}a(Us,"SemVer");Us.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};Us.prototype.toString=function(){return this.version};Us.prototype.compare=function(t){return oc("SemVer.compare",this.version,this.options,t),t instanceof Us||(t=new Us(t,this.options)),this.compareMain(t)||this.comparePre(t)};Us.prototype.compareMain=function(t){return t instanceof Us||(t=new Us(t,this.options)),hce(this.major,t.major)||hce(this.minor,t.minor)||hce(this.patch,t.patch)};Us.prototype.comparePre=function(t){if(t instanceof Us||(t=new Us(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var e=0;do{var r=this.prerelease[e],n=t.prerelease[e];if(oc("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return hce(r,n)}while(++e)};Us.prototype.inc=function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};Gi.inc=P1s;function P1s(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new Us(t,r).inc(e,n).version}catch{return null}}a(P1s,"inc");Gi.diff=k1s;function k1s(t,e){if(AJt(t,e))return null;var r=jW(t),n=jW(e),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return o+c;return s}a(k1s,"diff");Gi.compareIdentifiers=hce;var lUn=/^[0-9]+$/;function hce(t,e){var r=lUn.test(t),n=lUn.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t0}a(eSe,"gt");Gi.lt=bet;function bet(t,e,r){return DO(t,e,r)<0}a(bet,"lt");Gi.eq=AJt;function AJt(t,e,r){return DO(t,e,r)===0}a(AJt,"eq");Gi.neq=bUn;function bUn(t,e,r){return DO(t,e,r)!==0}a(bUn,"neq");Gi.gte=yJt;function yJt(t,e,r){return DO(t,e,r)>=0}a(yJt,"gte");Gi.lte=EJt;function EJt(t,e,r){return DO(t,e,r)<=0}a(EJt,"lte");Gi.cmp=Tet;function Tet(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return AJt(t,r,n);case"!=":return bUn(t,r,n);case">":return eSe(t,r,n);case">=":return yJt(t,r,n);case"<":return bet(t,r,n);case"<=":return EJt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}a(Tet,"cmp");Gi.Comparator=IS;function IS(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof IS){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof IS))return new IS(t,e);t=t.trim().split(/\s+/).join(" "),oc("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===rSe?this.value="":this.value=this.operator+this.semver.version,oc("comp",this)}a(IS,"Comparator");var rSe={};IS.prototype.parse=function(t){var e=this.options.loose?gl[mJt]:gl[gJt],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new Us(r[2],this.options.loose):this.semver=rSe};IS.prototype.toString=function(){return this.value};IS.prototype.test=function(t){return oc("Comparator.test",t,this.options.loose),this.semver===rSe?!0:(typeof t=="string"&&(t=new Us(t,this.options)),Tet(t,this.operator,this.semver,this.options))};IS.prototype.intersects=function(t,e){if(!(t instanceof IS))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return r=new td(t.value,e),Iet(this.value,r,e);if(t.operator==="")return r=new td(this.value,e),Iet(t.semver,r,e);var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),s=this.semver.version===t.semver.version,c=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),l=Tet(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=Tet(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||s&&c||l||u};Gi.Range=td;function td(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof td)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new td(t.raw,e);if(t instanceof IS)return new td(t.value,e);if(!(this instanceof td))return new td(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}a(td,"Range");td.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};td.prototype.toString=function(){return this.range};td.prototype.parseRange=function(t){var e=this.options.loose,r=e?gl[CUn]:gl[_Un];t=t.replace(r,Y1s),oc("hyphen replace",t),t=t.replace(gl[HW],x1s),oc("comparator trim",t,gl[HW]),t=t.replace(gl[gce],S1s),t=t.replace(gl[Ace],I1s);var n=e?gl[mJt]:gl[gJt],o=t.split(" ").map(function(s){return q1s(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(s){return!!s.match(n)})),o=o.map(function(s){return new IS(s,this.options)},this),o};td.prototype.intersects=function(t,e){if(!(t instanceof td))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(n){return t.set.some(function(o){return o.every(function(s){return n.intersects(s,e)})})})})};Gi.toComparators=Q1s;function Q1s(t,e){return new td(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}a(Q1s,"toComparators");function q1s(t,e){return oc("comp",t,e),t=j1s(t,e),oc("caret",t),t=G1s(t,e),oc("tildes",t),t=V1s(t,e),oc("xrange",t),t=z1s(t,e),oc("stars",t),t}a(q1s,"parseComparator");function Ry(t){return!t||t.toLowerCase()==="x"||t==="*"}a(Ry,"isX");function G1s(t,e){return t.trim().split(/\s+/).map(function(r){return H1s(r,e)}).join(" ")}a(G1s,"replaceTildes");function H1s(t,e){var r=e.loose?gl[AUn]:gl[gUn];return t.replace(r,function(n,o,s,c,l){oc("tilde",t,n,o,s,c,l);var u;return Ry(o)?u="":Ry(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Ry(c)?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":l?(oc("replaceTilde pr",l),u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0"):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0",oc("tilde return",u),u})}a(H1s,"replaceTilde");function j1s(t,e){return t.trim().split(/\s+/).map(function(r){return $1s(r,e)}).join(" ")}a(j1s,"replaceCarets");function $1s(t,e){oc("caret",t,e);var r=e.loose?gl[EUn]:gl[yUn];return t.replace(r,function(n,o,s,c,l){oc("caret",t,n,o,s,c,l);var u;return Ry(o)?u="":Ry(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Ry(c)?o==="0"?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+".0 <"+(+o+1)+".0.0":l?(oc("replaceCaret pr",l),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+"-"+l+" <"+(+o+1)+".0.0"):(oc("no pr"),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+" <"+(+o+1)+".0.0"),oc("caret return",u),u})}a($1s,"replaceCaret");function V1s(t,e){return oc("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return W1s(r,e)}).join(" ")}a(V1s,"replaceXRanges");function W1s(t,e){t=t.trim();var r=e.loose?gl[hUn]:gl[pUn];return t.replace(r,function(n,o,s,c,l,u){oc("xRange",t,n,o,s,c,l,u);var d=Ry(s),p=d||Ry(c),h=p||Ry(l),m=h;return o==="="&&m&&(o=""),d?o===">"||o==="<"?n="<0.0.0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),n=o+s+"."+c+"."+l):p?n=">="+s+".0.0 <"+(+s+1)+".0.0":h&&(n=">="+s+"."+c+".0 <"+s+"."+(+c+1)+".0"),oc("xRange return",n),n})}a(W1s,"replaceXRange");function z1s(t,e){return oc("replaceStars",t,e),t.trim().replace(gl[vUn],"")}a(z1s,"replaceStars");function Y1s(t,e,r,n,o,s,c,l,u,d,p,h,m){return Ry(r)?e="":Ry(n)?e=">="+r+".0.0":Ry(o)?e=">="+r+"."+n+".0":e=">="+e,Ry(u)?l="":Ry(d)?l="<"+(+u+1)+".0.0":Ry(p)?l="<"+u+"."+(+d+1)+".0":h?l="<="+u+"."+d+"."+p+"-"+h:l="<="+l,(e+" "+l).trim()}a(Y1s,"hyphenReplace");td.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new Us(t,this.options));for(var e=0;e0){var o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}a(K1s,"testSet");Gi.satisfies=Iet;function Iet(t,e,r){try{e=new td(e,r)}catch{return!1}return e.test(t)}a(Iet,"satisfies");Gi.maxSatisfying=J1s;function J1s(t,e,r){var n=null,o=null;try{var s=new td(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new Us(n,r))}),n}a(J1s,"maxSatisfying");Gi.minSatisfying=X1s;function X1s(t,e,r){var n=null,o=null;try{var s=new td(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new Us(n,r))}),n}a(X1s,"minSatisfying");Gi.minVersion=Z1s;function Z1s(t,e){t=new td(t,e);var r=new Us("0.0.0");if(t.test(r)||(r=new Us("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!r||eSe(r,c))&&(r=c);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}})}return r&&t.test(r)?r:null}a(Z1s,"minVersion");Gi.validRange=evs;function evs(t,e){try{return new td(t,e).range||"*"}catch{return null}}a(evs,"validRange");Gi.ltr=tvs;function tvs(t,e,r){return _Jt(t,e,"<",r)}a(tvs,"ltr");Gi.gtr=rvs;function rvs(t,e,r){return _Jt(t,e,">",r)}a(rvs,"gtr");Gi.outside=_Jt;function _Jt(t,e,r,n){t=new Us(t,n),e=new td(e,n);var o,s,c,l,u;switch(r){case">":o=eSe,s=EJt,c=bet,l=">",u=">=";break;case"<":o=bet,s=yJt,c=eSe,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Iet(t,e,n))return!1;for(var d=0;d=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0}a(_Jt,"outside");Gi.prerelease=nvs;function nvs(t,e){var r=jW(t,e);return r&&r.prerelease.length?r.prerelease:null}a(nvs,"prerelease");Gi.intersects=ivs;function ivs(t,e,r){return t=new td(t,r),e=new td(e,r),t.intersects(e)}a(ivs,"intersects");Gi.coerce=ovs;function ovs(t){if(t instanceof Us)return t;if(typeof t!="string")return null;var e=t.match(gl[mUn]);return e==null?null:jW(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}a(ovs,"coerce")});var Det=T((Iwd,RUn)=>{"use strict";f();var xUn=Jae(),Ece=xUn.wrap,Pet=xUn.unwrap,NO="wrap@before";function ket(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}a(ket,"defineProperty");function svs(t,e){for(var r=e.length,n=0;n0&&svs(t,o)}a(avs,"_findAndProcess");function IUn(t,e){if(t){var r=t;if(typeof t=="function")r=e(t);else if(Array.isArray(t)){r=[];for(var n=0;n{"use strict";f();var Ma=require("util"),MO=require("assert"),cvs=Det(),Zl=require("async_hooks"),nSe="cls@contexts",iSe="error@context",rd=process.env.DEBUG_CLS_HOOKED,Na=-1;DUn.exports={getNamespace:PUn,createNamespace:lvs,destroyNamespace:kUn,reset:uvs,ERROR_SYMBOL:iSe};function xS(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}a(xS,"Namespace");xS.prototype.set=a(function(e,r){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");if(this.active[e]=r,rd){let n=" ".repeat(this._indent<0?0:this._indent);Ru(n+"CONTEXT-SET KEY:"+e+"="+r+" in ns:"+this.name+" currentUid:"+Na+" active:"+Ma.inspect(this.active,{showHidden:!0,depth:2,colors:!0}))}return r},"set");xS.prototype.get=a(function(e){if(!this.active){if(rd){let r=Zl.currentId(),n=Zl.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Ru(`${o}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${Na} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length}`)}return}if(rd){let r=Zl.executionAsyncId(),n=Zl.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Ru(o+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+Na+" active:"+Ma.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),Ru(`${o}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${Na} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length} active:${Ma.inspect(this.active)}`)}return this.active[e]},"get");xS.prototype.createContext=a(function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=Na,rd){let r=Zl.executionAsyncId(),n=Zl.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Ru(`${o}CONTEXT-CREATED Context: (${this.name}) currentUid:${Na} asyncHooksCurrentId:${r} triggerId:${n} len:${this._set.length} context:${Ma.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},"createContext");xS.prototype.run=a(function(e){let r=this.createContext();this.enter(r);try{if(rd){let n=Zl.triggerAsyncId(),o=Zl.executionAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Ru(`${s}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${Na} triggerId:${n} asyncHooksCurrentId:${o} len:${this._set.length} context:${Ma.inspect(r)}`)}return e(r),r}catch(n){throw n&&(n[iSe]=r),n}finally{if(rd){let n=Zl.triggerAsyncId(),o=Zl.executionAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Ru(`${s}CONTEXT-RUN END: (${this.name}) currentUid:${Na} triggerId:${n} asyncHooksCurrentId:${o} len:${this._set.length} ${Ma.inspect(r)}`)}this.exit(r)}},"run");xS.prototype.runAndReturn=a(function(e){let r;return this.run(function(n){r=e(n)}),r},"runAndReturn");xS.prototype.runPromise=a(function(e){let r=this.createContext();this.enter(r);let n=e(r);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return rd&&Ru("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+Na+" len:"+this._set.length+" "+Ma.inspect(r)),n.then(o=>(rd&&Ru("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+Na+" len:"+this._set.length+" "+Ma.inspect(r)),this.exit(r),o)).catch(o=>{throw o[iSe]=r,rd&&Ru("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+Na+" len:"+this._set.length+" "+Ma.inspect(r)),this.exit(r),o})},"runPromise");xS.prototype.bind=a(function(e,r){r||(this.active?r=this.active:r=this.createContext());let n=this;return a(function(){n.enter(r);try{return e.apply(this,arguments)}catch(s){throw s&&(s[iSe]=r),s}finally{n.exit(r)}},"clsBind")},"bindFactory");xS.prototype.enter=a(function(e){if(MO.ok(e,"context must be provided for entering"),rd){let r=Zl.executionAsyncId(),n=Zl.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);Ru(`${o}CONTEXT-ENTER: (${this.name}) currentUid:${Na} triggerId:${n} asyncHooksCurrentId:${r} len:${this._set.length} ${Ma.inspect(e)}`)}this._set.push(this.active),this.active=e},"enter");xS.prototype.exit=a(function(e){if(MO.ok(e,"context must be provided for exiting"),rd){let n=Zl.executionAsyncId(),o=Zl.triggerAsyncId(),s=" ".repeat(this._indent<0?0:this._indent);Ru(`${s}CONTEXT-EXIT: (${this.name}) currentUid:${Na} triggerId:${o} asyncHooksCurrentId:${n} len:${this._set.length} ${Ma.inspect(e)}`)}if(this.active===e){MO.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let r=this._set.lastIndexOf(e);r<0?(rd&&Ru("??ERROR?? context exiting but not entered - ignoring: "+Ma.inspect(e)),MO.ok(r>=0,`context not currently entered; can't exit. +`+Ma.inspect(this)+` +`+Ma.inspect(e))):(MO.ok(r,"can't remove top context"),this._set.splice(r,1))},"exit");xS.prototype.bindEmitter=a(function(e){MO.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let r=this,n="context@"+this.name;function o(c){c&&(c[nSe]||(c[nSe]=Object.create(null)),c[nSe][n]={namespace:r,context:r.active})}a(o,"attach");function s(c){if(!(c&&c[nSe]))return c;let l=c,u=c[nSe];return Object.keys(u).forEach(function(d){let p=u[d];l=p.namespace.bind(l,p.context)}),l}a(s,"bind"),cvs(e,o,s)},"bindEmitter");xS.prototype.fromException=a(function(e){return e[iSe]},"fromException");function PUn(t){return process.namespaces[t]}a(PUn,"getNamespace");function lvs(t){MO.ok(t,"namespace must be given a name."),rd&&Ru(`NS-CREATING NAMESPACE (${t})`);let e=new xS(t);return e.id=Na,Zl.createHook({init(n,o,s,c){if(Na=Zl.executionAsyncId(),e.active){if(e._contexts.set(n,e.active),rd){let l=" ".repeat(e._indent<0?0:e._indent);Ru(`${l}INIT [${o}] (${t}) asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}else if(Na===0){let l=Zl.triggerAsyncId(),u=e._contexts.get(l);if(u){if(e._contexts.set(n,u),rd){let d=" ".repeat(e._indent<0?0:e._indent);Ru(`${d}INIT USING CONTEXT FROM TRIGGERID [${o}] (${t}) asyncId:${n} currentUid:${Na} triggerId:${l} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}else if(rd){let d=" ".repeat(e._indent<0?0:e._indent);Ru(`${d}INIT MISSING CONTEXT [${o}] (${t}) asyncId:${n} currentUid:${Na} triggerId:${l} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}}if(rd&&o==="PROMISE"){Ru(Ma.inspect(c,{showHidden:!0}));let l=c.parentId,u=" ".repeat(e._indent<0?0:e._indent);Ru(`${u}INIT RESOURCE-PROMISE [${o}] (${t}) parentId:${l} asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} resource:${c}`)}},before(n){Na=Zl.executionAsyncId();let o;if(o=e._contexts.get(n)||e._contexts.get(Na),o){if(rd){let s=Zl.triggerAsyncId(),c=" ".repeat(e._indent<0?0:e._indent);Ru(`${c}BEFORE (${t}) asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ma.inspect(o)}`),e._indent+=2}e.enter(o)}else if(rd){let s=Zl.triggerAsyncId(),c=" ".repeat(e._indent<0?0:e._indent);Ru(`${c}BEFORE MISSING CONTEXT (${t}) asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${Ma.inspect(e._contexts,{showHidden:!0,depth:2,colors:!0})}`),e._indent+=2}},after(n){Na=Zl.executionAsyncId();let o;if(o=e._contexts.get(n)||e._contexts.get(Na),o){if(rd){let s=Zl.triggerAsyncId();e._indent-=2;let c=" ".repeat(e._indent<0?0:e._indent);Ru(`${c}AFTER (${t}) asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ma.inspect(o)}`)}e.exit(o)}else if(rd){let s=Zl.triggerAsyncId();e._indent-=2;let c=" ".repeat(e._indent<0?0:e._indent);Ru(`${c}AFTER MISSING CONTEXT (${t}) asyncId:${n} currentUid:${Na} triggerId:${s} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ma.inspect(o)}`)}},destroy(n){if(Na=Zl.executionAsyncId(),rd){let o=Zl.triggerAsyncId(),s=" ".repeat(e._indent<0?0:e._indent);Ru(`${s}DESTROY (${t}) currentUid:${Na} asyncId:${n} triggerId:${o} active:${Ma.inspect(e.active,{showHidden:!0,depth:2,colors:!0})} context:${Ma.inspect(e._contexts.get(Na))}`)}e._contexts.delete(n)}}).enable(),process.namespaces[t]=e,e}a(lvs,"createNamespace");function kUn(t){let e=PUn(t);MO.ok(e,`can't delete nonexistent namespace! "`+t+'"'),MO.ok(e.id,"don't assign to process.namespaces directly! "+Ma.inspect(e)),process.namespaces[t]=null}a(kUn,"destroyNamespace");function uvs(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){kUn(t)}),process.namespaces=Object.create(null)}a(uvs,"reset");process.namespaces={};function Ru(...t){rd&&process._rawDebug(`${Ma.format(...t)}`)}a(Ru,"debug2")});var OUn=T((Dwd,MUn)=>{"use strict";f();function dvs(){}a(dvs,"NextTickWrap");MUn.exports=a(function(){let e=this._hooks,r=this._state,n=process.nextTick;process.nextTick=function(){if(!r.enabled)return n.apply(process,arguments);let o=new Array(arguments.length);for(let u=0;u0&&process.once("uncaughtException",function(){e.post.call(c,l,!0),e.destroy.call(null,l)})}e.post.call(c,l,!1),e.destroy.call(null,l)},n.apply(process,o)}},"patch")});var LUn=T((Owd,BUn)=>{"use strict";f();function fvs(){}a(fvs,"PromiseWrap");BUn.exports=a(function(){let e=this._hooks,r=this._state,n=global.Promise,o=n.prototype.then;n.prototype.then=u;function s(d,p,h,m){return typeof d!="function"?m?c(h):l(h):a(function(){e.pre.call(p,h);try{return d.apply(this,arguments)}finally{e.post.call(p,h,!1),e.destroy.call(null,h)}},"wrappedHandler")}a(s,"makeWrappedHandler");function c(d){return a(function(h){return e.destroy.call(null,d),h},"unhandledResolutionHandler")}a(c,"makeUnhandledResolutionHandler");function l(d){return a(function(h){throw e.destroy.call(null,d),h},"unhandledRejectedHandler")}a(l,"makeUnhandledRejectionHandler");function u(d,p){if(!r.enabled)return o.call(this,d,p);let h=new fvs,m=--r.counter;return e.init.call(h,m,0,null,null),o.call(this,s(d,h,m,!0),s(p,h,m,!1))}a(u,"wrappedThen")},"patchPromise")});var UUn=T((Fwd,FUn)=>{"use strict";f();var Bv=require("timers");function pvs(){}a(pvs,"TimeoutWrap");function hvs(){}a(hvs,"IntervalWrap");function mvs(){}a(mvs,"ImmediateWrap");var gvs=new Map,Avs=new Map,yvs=new Map,CJt=null,vJt=!1;FUn.exports=a(function(){bJt(this._hooks,this._state,"setTimeout","clearTimeout",pvs,gvs,!0),bJt(this._hooks,this._state,"setInterval","clearInterval",hvs,Avs,!1),bJt(this._hooks,this._state,"setImmediate","clearImmediate",mvs,yvs,!0),global.setTimeout=Bv.setTimeout,global.setInterval=Bv.setInterval,global.setImmediate=Bv.setImmediate,global.clearTimeout=Bv.clearTimeout,global.clearInterval=Bv.clearInterval,global.clearImmediate=Bv.clearImmediate},"patch");function bJt(t,e,r,n,o,s,c){let l=Bv[r],u=Bv[n];Bv[r]=function(){if(!e.enabled)return l.apply(Bv,arguments);let d=new Array(arguments.length);for(let A=0;A0&&process.once("uncaughtException",function(){t.post.call(h,m,!0),s.delete(g),t.destroy.call(null,m)})}t.post.call(h,m,!1),CJt=null,(c||vJt)&&(vJt=!1,s.delete(g),t.destroy.call(null,m))},g=l.apply(Bv,d),s.set(g,m),g},Bv[n]=function(d){if(CJt===d&&d!==null)vJt=!0;else if(s.has(d)){let p=s.get(d);s.delete(d),t.destroy.call(null,p)}u.apply(Bv,arguments)}}a(bJt,"patchTimer")});var TJt=T((qwd,Evs)=>{Evs.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen ",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}});var GUn=T((Gwd,qUn)=>{"use strict";f();var sSe=process.binding("async_wrap"),_vs=sSe.Providers.TIMERWRAP,QUn={nextTick:OUn(),promise:LUn(),timers:UUn()},oSe=new Set;function Cvs(){this.enabled=!1,this.counter=0}a(Cvs,"State");function SJt(){let t=this.initFns=[],e=this.preFns=[],r=this.postFns=[],n=this.destroyFns=[];this.init=function(o,s,c,l){if(s===_vs){oSe.add(o);return}for(let u of t)u(o,this,s,c,l)},this.pre=function(o){if(!oSe.has(o))for(let s of e)s(o,this)},this.post=function(o,s){if(!oSe.has(o))for(let c of r)c(o,this,s)},this.destroy=function(o){if(oSe.has(o)){oSe.delete(o);return}for(let s of n)s(o)}}a(SJt,"Hooks");SJt.prototype.add=function(t){t.init&&this.initFns.push(t.init),t.pre&&this.preFns.push(t.pre),t.post&&this.postFns.push(t.post),t.destroy&&this.destroyFns.push(t.destroy)};function Net(t,e){let r=t.indexOf(e);r!==-1&&t.splice(r,1)}a(Net,"removeElement");SJt.prototype.remove=function(t){t.init&&Net(this.initFns,t.init),t.pre&&Net(this.preFns,t.pre),t.post&&Net(this.postFns,t.post),t.destroy&&Net(this.destroyFns,t.destroy)};function aSe(){this._state=new Cvs,this._hooks=new SJt,this.version=TJt().version,this.providers=sSe.Providers;for(let t of Object.keys(QUn))QUn[t].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),sSe.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a(aSe,"AsyncHook");qUn.exports=aSe;aSe.prototype.addHooks=function(t){this._hooks.add(t)};aSe.prototype.removeHooks=function(t){this._hooks.remove(t)};aSe.prototype.enable=function(){this._state.enabled=!0,sSe.enable()};aSe.prototype.disable=function(){this._state.enabled=!1,sSe.disable()}});var IJt=T(($wd,vvs)=>{vvs.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen ",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}});var jUn=T((Vwd,HUn)=>{f();function bvs(t){try{return Error.prototype.toString.call(t)}catch(e){try{return""}catch{return""}}}a(bvs,"FormatErrorString");HUn.exports=a(function(e,r){var n=[];n.push(bvs(e));for(var o=0;o"}catch{c=""}}n.push(" at "+c)}return n.join(` +`)},"FormatStackTrace")});var zUn=T((Ywd,WUn)=>{f();var Met=jUn();function VUn(){this.extend=new cSe,this.filter=new cSe,this.format=new lSe,this.version=IJt().version}a(VUn,"stackChain");var wJt=!1;VUn.prototype.callSite=a(function t(e){e||(e={}),wJt=!0;var r={};Error.captureStackTrace(r,t);var n=r.stack;return wJt=!1,n=n.slice(e.slice||0),e.extend&&(n=this.extend._modify(r,n)),e.filter&&(n=this.filter._modify(r,n)),n},"collectCallSites");var T7=new VUn;function cSe(){this._modifiers=[]}a(cSe,"TraceModifier");cSe.prototype._modify=function(t,e){for(var r=0,n=this._modifiers.length;r{f();if(global._stackChain)if(global._stackChain.version===IJt().version)RJt.exports=global._stackChain;else throw new Error("Conflicting version of stack-chain found");else RJt.exports=global._stackChain=zUn()});var YUn=T((eRd,kJt)=>{"use strict";f();var Svs=GUn();if(global._asyncHook)if(global._asyncHook.version===TJt().version)kJt.exports=global._asyncHook;else throw new Error("Conflicting version of async-hook-jl found");else PJt().filter.attach(function(e,r){return r.filter(function(n){let o=n.getFileName();return!(o&&o.slice(0,__dirname.length)===__dirname)})}),kJt.exports=global._asyncHook=new Svs});var tQn=T((rRd,eQn)=>{"use strict";f();var xf=require("util"),OO=require("assert"),Ivs=Det(),_ce=YUn(),uSe="cls@contexts",dSe="error@context",JUn=[];for(let t in _ce.providers)JUn[_ce.providers[t]]=t;var jd=process.env.DEBUG_CLS_HOOKED,P0=-1;eQn.exports={getNamespace:XUn,createNamespace:xvs,destroyNamespace:ZUn,reset:wvs,ERROR_SYMBOL:dSe};function wS(t){this.name=t,this.active=null,this._set=[],this.id=null,this._contexts=new Map}a(wS,"Namespace");wS.prototype.set=a(function(e,r){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return jd&&If(" SETTING KEY:"+e+"="+r+" in ns:"+this.name+" uid:"+P0+" active:"+xf.inspect(this.active,!0)),this.active[e]=r,r},"set");wS.prototype.get=a(function(e){if(!this.active){jd&&If(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+P0+" active:"+xf.inspect(this.active,!0));return}return jd&&If(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+P0+" active:"+xf.inspect(this.active,!0)),this.active[e]},"get");wS.prototype.createContext=a(function(){jd&&If(" CREATING Context: "+this.name+" uid:"+P0+" len:"+this._set.length+" active:"+xf.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=P0,jd&&If(" CREATED Context: "+this.name+" uid:"+P0+" len:"+this._set.length+" context:"+xf.inspect(e,!0,2,!0)),e},"createContext");wS.prototype.run=a(function(e){let r=this.createContext();this.enter(r);try{return jd&&If(" BEFORE RUN: "+this.name+" uid:"+P0+" len:"+this._set.length+" "+xf.inspect(r)),e(r),r}catch(n){throw n&&(n[dSe]=r),n}finally{jd&&If(" AFTER RUN: "+this.name+" uid:"+P0+" len:"+this._set.length+" "+xf.inspect(r)),this.exit(r)}},"run");wS.prototype.runAndReturn=a(function(e){var r;return this.run(function(n){r=e(n)}),r},"runAndReturn");wS.prototype.runPromise=a(function(e){let r=this.createContext();this.enter(r);let n=e(r);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return jd&&If(" BEFORE runPromise: "+this.name+" uid:"+P0+" len:"+this._set.length+" "+xf.inspect(r)),n.then(o=>(jd&&If(" AFTER runPromise: "+this.name+" uid:"+P0+" len:"+this._set.length+" "+xf.inspect(r)),this.exit(r),o)).catch(o=>{throw o[dSe]=r,jd&&If(" AFTER runPromise: "+this.name+" uid:"+P0+" len:"+this._set.length+" "+xf.inspect(r)),this.exit(r),o})},"runPromise");wS.prototype.bind=a(function(e,r){r||(this.active?r=this.active:r=this.createContext());let n=this;return a(function(){n.enter(r);try{return e.apply(this,arguments)}catch(s){throw s&&(s[dSe]=r),s}finally{n.exit(r)}},"clsBind")},"bindFactory");wS.prototype.enter=a(function(e){OO.ok(e,"context must be provided for entering"),jd&&If(" ENTER "+this.name+" uid:"+P0+" len:"+this._set.length+" context: "+xf.inspect(e)),this._set.push(this.active),this.active=e},"enter");wS.prototype.exit=a(function(e){if(OO.ok(e,"context must be provided for exiting"),jd&&If(" EXIT "+this.name+" uid:"+P0+" len:"+this._set.length+" context: "+xf.inspect(e)),this.active===e){OO.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}let r=this._set.lastIndexOf(e);r<0?(jd&&If("??ERROR?? context exiting but not entered - ignoring: "+xf.inspect(e)),OO.ok(r>=0,`context not currently entered; can't exit. +`+xf.inspect(this)+` +`+xf.inspect(e))):(OO.ok(r,"can't remove top context"),this._set.splice(r,1))},"exit");wS.prototype.bindEmitter=a(function(e){OO.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let r=this,n="context@"+this.name;function o(c){c&&(c[uSe]||(c[uSe]=Object.create(null)),c[uSe][n]={namespace:r,context:r.active})}a(o,"attach");function s(c){if(!(c&&c[uSe]))return c;let l=c,u=c[uSe];return Object.keys(u).forEach(function(d){let p=u[d];l=p.namespace.bind(l,p.context)}),l}a(s,"bind"),Ivs(e,o,s)},"bindEmitter");wS.prototype.fromException=a(function(e){return e[dSe]},"fromException");function XUn(t){return process.namespaces[t]}a(XUn,"getNamespace");function xvs(t){OO.ok(t,"namespace must be given a name."),jd&&If("CREATING NAMESPACE "+t);let e=new wS(t);return e.id=P0,_ce.addHooks({init(r,n,o,s,c){P0=r,s?(e._contexts.set(r,e._contexts.get(s)),jd&&If("PARENTID: "+t+" uid:"+r+" parent:"+s+" provider:"+o)):e._contexts.set(P0,e.active),jd&&If("INIT "+t+" uid:"+r+" parent:"+s+" provider:"+JUn[o]+" active:"+xf.inspect(e.active,!0))},pre(r,n){P0=r;let o=e._contexts.get(r);o?(jd&&If(" PRE "+t+" uid:"+r+" handle:"+Oet(n)+" context:"+xf.inspect(o)),e.enter(o)):jd&&If(" PRE MISSING CONTEXT "+t+" uid:"+r+" handle:"+Oet(n))},post(r,n){P0=r;let o=e._contexts.get(r);o?(jd&&If(" POST "+t+" uid:"+r+" handle:"+Oet(n)+" context:"+xf.inspect(o)),e.exit(o)):jd&&If(" POST MISSING CONTEXT "+t+" uid:"+r+" handle:"+Oet(n))},destroy(r){P0=r,jd&&If("DESTROY "+t+" uid:"+r+" context:"+xf.inspect(e._contexts.get(P0))+" active:"+xf.inspect(e.active,!0)),e._contexts.delete(r)}}),process.namespaces[t]=e,e}a(xvs,"createNamespace");function ZUn(t){let e=XUn(t);OO.ok(e,`can't delete nonexistent namespace! "`+t+'"'),OO.ok(e.id,"don't assign to process.namespaces directly! "+xf.inspect(e)),process.namespaces[t]=null}a(ZUn,"destroyNamespace");function wvs(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){ZUn(t)}),process.namespaces=Object.create(null)}a(wvs,"reset");process.namespaces={};_ce._state&&!_ce._state.enabled&&_ce.enable();function If(t){process.env.DEBUG&&process._rawDebug(t)}a(If,"debug2");function Oet(t){if(!t)return t;if(typeof t=="function")return t.name?t.name:(t.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1];if(t.constructor&&t.constructor.name)return t.constructor.name}a(Oet,"getFunctionName");if(jd){DJt=PJt();for(KUn in DJt.filter._modifiers)DJt.filter.deattach(KUn)}var DJt,KUn});var rQn=T((oRd,NJt)=>{"use strict";f();var Rvs=SUn();process&&Rvs.gte(process.versions.node,"8.0.0")?NJt.exports=NUn():NJt.exports=tQn()});var EQn=T((Hi,yQn)=>{f();Hi=yQn.exports=Qs;var sc;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?sc=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):sc=a(function(){},"debug");Hi.SEMVER_SPEC_VERSION="2.0.0";var fSe=256,Bet=Number.MAX_SAFE_INTEGER||9007199254740991,MJt=16,Pvs=fSe-6,pSe=Hi.re=[],Al=Hi.safeRe=[],$t=Hi.src=[],Ss=0,UJt="[a-zA-Z0-9-]",OJt=[["\\s",1],["\\d",fSe],[UJt,Pvs]];function Get(t){for(var e=0;e)?=?)";var Let=Ss++;$t[Let]=$t[vce]+"|x|X|\\*";var Fet=Ss++;$t[Fet]=$t[Cce]+"|x|X|\\*";var $W=Ss++;$t[$W]="[v=\\s]*("+$t[Fet]+")(?:\\.("+$t[Fet]+")(?:\\.("+$t[Fet]+")(?:"+$t[qJt]+")?"+$t[mSe]+"?)?)?";var Tce=Ss++;$t[Tce]="[v=\\s]*("+$t[Let]+")(?:\\.("+$t[Let]+")(?:\\.("+$t[Let]+")(?:"+$t[GJt]+")?"+$t[mSe]+"?)?)?";var aQn=Ss++;$t[aQn]="^"+$t[xce]+"\\s*"+$t[$W]+"$";var cQn=Ss++;$t[cQn]="^"+$t[xce]+"\\s*"+$t[Tce]+"$";var lQn=Ss++;$t[lQn]="(?:^|[^\\d])(\\d{1,"+MJt+"})(?:\\.(\\d{1,"+MJt+"}))?(?:\\.(\\d{1,"+MJt+"}))?(?:$|[^\\d])";var Het=Ss++;$t[Het]="(?:~>?)";var Sce=Ss++;$t[Sce]="(\\s*)"+$t[Het]+"\\s+";pSe[Sce]=new RegExp($t[Sce],"g");Al[Sce]=new RegExp(Get($t[Sce]),"g");var kvs="$1~",uQn=Ss++;$t[uQn]="^"+$t[Het]+$t[$W]+"$";var dQn=Ss++;$t[dQn]="^"+$t[Het]+$t[Tce]+"$";var jet=Ss++;$t[jet]="(?:\\^)";var Ice=Ss++;$t[Ice]="(\\s*)"+$t[jet]+"\\s+";pSe[Ice]=new RegExp($t[Ice],"g");Al[Ice]=new RegExp(Get($t[Ice]),"g");var Dvs="$1^",fQn=Ss++;$t[fQn]="^"+$t[jet]+$t[$W]+"$";var pQn=Ss++;$t[pQn]="^"+$t[jet]+$t[Tce]+"$";var VJt=Ss++;$t[VJt]="^"+$t[xce]+"\\s*("+jJt+")$|^$";var WJt=Ss++;$t[WJt]="^"+$t[xce]+"\\s*("+sQn+")$|^$";var VW=Ss++;$t[VW]="(\\s*)"+$t[xce]+"\\s*("+jJt+"|"+$t[$W]+")";pSe[VW]=new RegExp($t[VW],"g");Al[VW]=new RegExp(Get($t[VW]),"g");var Nvs="$1$2$3",hQn=Ss++;$t[hQn]="^\\s*("+$t[$W]+")\\s+-\\s+("+$t[$W]+")\\s*$";var mQn=Ss++;$t[mQn]="^\\s*("+$t[Tce]+")\\s+-\\s+("+$t[Tce]+")\\s*$";var gQn=Ss++;$t[gQn]="(<|>)?=?\\s*\\*";for(tD=0;tDfSe)return null;var r=e.loose?Al[$Jt]:Al[HJt];if(!r.test(t))return null;try{return new Qs(t,e)}catch{return null}}a(WW,"parse");Hi.valid=Mvs;function Mvs(t,e){var r=WW(t,e);return r?r.version:null}a(Mvs,"valid");Hi.clean=Ovs;function Ovs(t,e){var r=WW(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}a(Ovs,"clean");Hi.SemVer=Qs;function Qs(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof Qs){if(t.loose===e.loose)return t;t=t.version}else if(typeof t!="string")throw new TypeError("Invalid Version: "+t);if(t.length>fSe)throw new TypeError("version is longer than "+fSe+" characters");if(!(this instanceof Qs))return new Qs(t,e);sc("SemVer",t,e),this.options=e,this.loose=!!e.loose;var r=t.trim().match(e.loose?Al[$Jt]:Al[HJt]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Bet||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Bet||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Bet||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var o=+n;if(o>=0&&o=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: "+t)}return this.format(),this.raw=this.version,this};Hi.inc=Bvs;function Bvs(t,e,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new Qs(t,r).inc(e,n).version}catch{return null}}a(Bvs,"inc");Hi.diff=Lvs;function Lvs(t,e){if(zJt(t,e))return null;var r=WW(t),n=WW(e),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var c in r)if((c==="major"||c==="minor"||c==="patch")&&r[c]!==n[c])return o+c;return s}a(Lvs,"diff");Hi.compareIdentifiers=bce;var nQn=/^[0-9]+$/;function bce(t,e){var r=nQn.test(t),n=nQn.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t0}a(hSe,"gt");Hi.lt=Uet;function Uet(t,e,r){return BO(t,e,r)<0}a(Uet,"lt");Hi.eq=zJt;function zJt(t,e,r){return BO(t,e,r)===0}a(zJt,"eq");Hi.neq=AQn;function AQn(t,e,r){return BO(t,e,r)!==0}a(AQn,"neq");Hi.gte=YJt;function YJt(t,e,r){return BO(t,e,r)>=0}a(YJt,"gte");Hi.lte=KJt;function KJt(t,e,r){return BO(t,e,r)<=0}a(KJt,"lte");Hi.cmp=Qet;function Qet(t,e,r,n){switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return zJt(t,r,n);case"!=":return AQn(t,r,n);case">":return hSe(t,r,n);case">=":return YJt(t,r,n);case"<":return Uet(t,r,n);case"<=":return KJt(t,r,n);default:throw new TypeError("Invalid operator: "+e)}}a(Qet,"cmp");Hi.Comparator=RS;function RS(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof RS){if(t.loose===!!e.loose)return t;t=t.value}if(!(this instanceof RS))return new RS(t,e);t=t.trim().split(/\s+/).join(" "),sc("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===gSe?this.value="":this.value=this.operator+this.semver.version,sc("comp",this)}a(RS,"Comparator");var gSe={};RS.prototype.parse=function(t){var e=this.options.loose?Al[VJt]:Al[WJt],r=t.match(e);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new Qs(r[2],this.options.loose):this.semver=gSe};RS.prototype.toString=function(){return this.value};RS.prototype.test=function(t){return sc("Comparator.test",t,this.options.loose),this.semver===gSe?!0:(typeof t=="string"&&(t=new Qs(t,this.options)),Qet(t,this.operator,this.semver,this.options))};RS.prototype.intersects=function(t,e){if(!(t instanceof RS))throw new TypeError("a Comparator is required");(!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1});var r;if(this.operator==="")return r=new nd(t.value,e),qet(this.value,r,e);if(t.operator==="")return r=new nd(this.value,e),qet(t.semver,r,e);var n=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),s=this.semver.version===t.semver.version,c=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),l=Qet(this.semver,"<",t.semver,e)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),u=Qet(this.semver,">",t.semver,e)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return n||o||s&&c||l||u};Hi.Range=nd;function nd(t,e){if((!e||typeof e!="object")&&(e={loose:!!e,includePrerelease:!1}),t instanceof nd)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new nd(t.raw,e);if(t instanceof RS)return new nd(t.value,e);if(!(this instanceof nd))return new nd(t,e);if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}a(nd,"Range");nd.prototype.format=function(){return this.range=this.set.map(function(t){return t.join(" ").trim()}).join("||").trim(),this.range};nd.prototype.toString=function(){return this.range};nd.prototype.parseRange=function(t){var e=this.options.loose,r=e?Al[mQn]:Al[hQn];t=t.replace(r,tbs),sc("hyphen replace",t),t=t.replace(Al[VW],Nvs),sc("comparator trim",t,Al[VW]),t=t.replace(Al[Sce],kvs),t=t.replace(Al[Ice],Dvs);var n=e?Al[VJt]:Al[WJt],o=t.split(" ").map(function(s){return Wvs(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(s){return!!s.match(n)})),o=o.map(function(s){return new RS(s,this.options)},this),o};nd.prototype.intersects=function(t,e){if(!(t instanceof nd))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(n){return t.set.some(function(o){return o.every(function(s){return n.intersects(s,e)})})})})};Hi.toComparators=Vvs;function Vvs(t,e){return new nd(t,e).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}a(Vvs,"toComparators");function Wvs(t,e){return sc("comp",t,e),t=Kvs(t,e),sc("caret",t),t=zvs(t,e),sc("tildes",t),t=Xvs(t,e),sc("xrange",t),t=ebs(t,e),sc("stars",t),t}a(Wvs,"parseComparator");function Py(t){return!t||t.toLowerCase()==="x"||t==="*"}a(Py,"isX");function zvs(t,e){return t.trim().split(/\s+/).map(function(r){return Yvs(r,e)}).join(" ")}a(zvs,"replaceTildes");function Yvs(t,e){var r=e.loose?Al[dQn]:Al[uQn];return t.replace(r,function(n,o,s,c,l){sc("tilde",t,n,o,s,c,l);var u;return Py(o)?u="":Py(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Py(c)?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":l?(sc("replaceTilde pr",l),u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0"):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0",sc("tilde return",u),u})}a(Yvs,"replaceTilde");function Kvs(t,e){return t.trim().split(/\s+/).map(function(r){return Jvs(r,e)}).join(" ")}a(Kvs,"replaceCarets");function Jvs(t,e){sc("caret",t,e);var r=e.loose?Al[pQn]:Al[fQn];return t.replace(r,function(n,o,s,c,l){sc("caret",t,n,o,s,c,l);var u;return Py(o)?u="":Py(s)?u=">="+o+".0.0 <"+(+o+1)+".0.0":Py(c)?o==="0"?u=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+".0 <"+(+o+1)+".0.0":l?(sc("replaceCaret pr",l),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+"-"+l+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+"-"+l+" <"+(+o+1)+".0.0"):(sc("no pr"),o==="0"?s==="0"?u=">="+o+"."+s+"."+c+" <"+o+"."+s+"."+(+c+1):u=">="+o+"."+s+"."+c+" <"+o+"."+(+s+1)+".0":u=">="+o+"."+s+"."+c+" <"+(+o+1)+".0.0"),sc("caret return",u),u})}a(Jvs,"replaceCaret");function Xvs(t,e){return sc("replaceXRanges",t,e),t.split(/\s+/).map(function(r){return Zvs(r,e)}).join(" ")}a(Xvs,"replaceXRanges");function Zvs(t,e){t=t.trim();var r=e.loose?Al[cQn]:Al[aQn];return t.replace(r,function(n,o,s,c,l,u){sc("xRange",t,n,o,s,c,l,u);var d=Py(s),p=d||Py(c),h=p||Py(l),m=h;return o==="="&&m&&(o=""),d?o===">"||o==="<"?n="<0.0.0":n="*":o&&m?(p&&(c=0),l=0,o===">"?(o=">=",p?(s=+s+1,c=0,l=0):(c=+c+1,l=0)):o==="<="&&(o="<",p?s=+s+1:c=+c+1),n=o+s+"."+c+"."+l):p?n=">="+s+".0.0 <"+(+s+1)+".0.0":h&&(n=">="+s+"."+c+".0 <"+s+"."+(+c+1)+".0"),sc("xRange return",n),n})}a(Zvs,"replaceXRange");function ebs(t,e){return sc("replaceStars",t,e),t.trim().replace(Al[gQn],"")}a(ebs,"replaceStars");function tbs(t,e,r,n,o,s,c,l,u,d,p,h,m){return Py(r)?e="":Py(n)?e=">="+r+".0.0":Py(o)?e=">="+r+"."+n+".0":e=">="+e,Py(u)?l="":Py(d)?l="<"+(+u+1)+".0.0":Py(p)?l="<"+u+"."+(+d+1)+".0":h?l="<="+u+"."+d+"."+p+"-"+h:l="<="+l,(e+" "+l).trim()}a(tbs,"hyphenReplace");nd.prototype.test=function(t){if(!t)return!1;typeof t=="string"&&(t=new Qs(t,this.options));for(var e=0;e0){var o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}a(rbs,"testSet");Hi.satisfies=qet;function qet(t,e,r){try{e=new nd(e,r)}catch{return!1}return e.test(t)}a(qet,"satisfies");Hi.maxSatisfying=nbs;function nbs(t,e,r){var n=null,o=null;try{var s=new nd(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===-1)&&(n=c,o=new Qs(n,r))}),n}a(nbs,"maxSatisfying");Hi.minSatisfying=ibs;function ibs(t,e,r){var n=null,o=null;try{var s=new nd(e,r)}catch{return null}return t.forEach(function(c){s.test(c)&&(!n||o.compare(c)===1)&&(n=c,o=new Qs(n,r))}),n}a(ibs,"minSatisfying");Hi.minVersion=obs;function obs(t,e){t=new nd(t,e);var r=new Qs("0.0.0");if(t.test(r)||(r=new Qs("0.0.0-0"),t.test(r)))return r;r=null;for(var n=0;n":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!r||hSe(r,c))&&(r=c);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}})}return r&&t.test(r)?r:null}a(obs,"minVersion");Hi.validRange=sbs;function sbs(t,e){try{return new nd(t,e).range||"*"}catch{return null}}a(sbs,"validRange");Hi.ltr=abs;function abs(t,e,r){return JJt(t,e,"<",r)}a(abs,"ltr");Hi.gtr=cbs;function cbs(t,e,r){return JJt(t,e,">",r)}a(cbs,"gtr");Hi.outside=JJt;function JJt(t,e,r,n){t=new Qs(t,n),e=new nd(e,n);var o,s,c,l,u;switch(r){case">":o=hSe,s=KJt,c=Uet,l=">",u=">=";break;case"<":o=Uet,s=YJt,c=hSe,l="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qet(t,e,n))return!1;for(var d=0;d=0.0.0")),h=h||g,m=m||g,o(g.semver,h.semver,n)?h=g:c(g.semver,m.semver,n)&&(m=g)}),h.operator===l||h.operator===u||(!m.operator||m.operator===l)&&s(t,m.semver))return!1;if(m.operator===u&&c(t,m.semver))return!1}return!0}a(JJt,"outside");Hi.prerelease=lbs;function lbs(t,e){var r=WW(t,e);return r&&r.prerelease.length?r.prerelease:null}a(lbs,"prerelease");Hi.intersects=ubs;function ubs(t,e,r){return t=new nd(t,r),e=new nd(e,r),t.intersects(e)}a(ubs,"intersects");Hi.coerce=dbs;function dbs(t){if(t instanceof Qs)return t;if(typeof t!="string")return null;var e=t.match(Al[lQn]);return e==null?null:WW(e[1]+"."+(e[2]||"0")+"."+(e[3]||"0"))}a(dbs,"coerce")});var vQn=T((lRd,CQn)=>{f();var fbs=Jae().wrap,ZJt=1,eXt=2,tXt=4,Vet=8,jc=[],pbs=0,iA=!1,S7=[],wce,rXt;function nXt(t,e){var r=t.length,n=e.length,o=[];if(r===0&&n===0)return o;for(var s=0;s0&&(jc=S7.pop()),Rce=void 0,n&&!iA},"asyncCatcher"),rXt=a(function(e,r,n){var o=[];iA=!0;for(var s=0;s0&&r[u].before(this,o[r[u].uid]);iA=!1;var d=e.apply(this,arguments);for(iA=!0,u=0;u0&&r[u].after(this,o[r[u].uid]);return iA=!1,jc=S7.pop(),Rce=void 0,d}},"asyncWrap"),fbs(process,"_fatalException",function(t){return a(function(r){return wce(r)||t(r)},"_asyncFatalException")})):(XJt=!1,wce=a(function(e){if(XJt)throw e;for(var r=!1,n=jc.length,o=0;o0&&r[p].before(this,o[r[p].uid]);iA=!1;var h;try{h=e.apply(this,arguments)}catch(m){u=!0;for(var p=0;p0&&r[p].after(this,o[r[p].uid]);iA=!1}jc=S7.pop()}return h}},"asyncWrap"),process.addListener("uncaughtException",wce));var $et,Rce,XJt;function hbs(t,e,r){iA=!0;for(var n=0;n0)return rXt(t,r,e);return hbs(t,r,e)}a(mbs,"wrapCallback");function rD(t,e){typeof t.create=="function"&&(this.create=t.create,this.flags|=ZJt),typeof t.before=="function"&&(this.before=t.before,this.flags|=eXt),typeof t.after=="function"&&(this.after=t.after,this.flags|=tXt),typeof t.error=="function"&&(this.error=t.error,this.flags|=Vet),this.uid=++pbs,this.data=e===void 0?null:e}a(rD,"AsyncListener");rD.prototype.create=void 0;rD.prototype.before=void 0;rD.prototype.after=void 0;rD.prototype.error=void 0;rD.prototype.data=void 0;rD.prototype.uid=0;rD.prototype.flags=0;function _Qn(t,e){if(typeof t!="object"||!t)throw new TypeError("callbacks argument must be an object");return t instanceof rD?t:new rD(t,e)}a(_Qn,"createAsyncListener");function gbs(t,e){var r;t instanceof rD?r=t:r=_Qn(t,e);for(var n=!1,o=0;o{"use strict";f();bQn.exports=(t,e)=>class extends t{static{a(this,"WrappedPromise")}constructor(n){var o,s;super(l);var c=this;try{n.apply(o,s)}catch(u){s[1](u)}return c;function l(u,d){o=this,s=[p,h];function p(m){return e(c,!1),u(m)}a(p,"wrappedResolve");function h(m){return e(c,!1),d(m)}a(h,"wrappedReject")}}}});var kQn=T(()=>{"use strict";f();if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var wQn=Jae(),zet=EQn(),$_=wQn.wrap,I7=wQn.massWrap,id=vQn(),ybs=require("util"),Ebs=zet.gte(process.version,"6.0.0"),sXt=zet.gte(process.version,"7.0.0"),_bs=zet.gte(process.version,"8.0.0"),Cbs=zet.gte(process.version,"11.0.0"),nD=require("net");sXt&&!nD._normalizeArgs?nD._normalizeArgs=function(t){if(t.length===0)return[{},null];var e=t[0],r={};typeof e=="object"&&e!==null?r=e:Ibs(e)?r.path=e:(r.port=e,t.length>1&&typeof t[1]=="string"&&(r.host=t[1]));var n=t[t.length-1];return typeof n!="function"?[r,null]:[r,n]}:!sXt&&!nD._normalizeConnectArgs&&(nD._normalizeConnectArgs=function(t){var e={};function r(o){return(o=Number(o))>=0?o:!1}a(r,"toNumber"),typeof t[0]=="object"&&t[0]!==null?e=t[0]:typeof t[0]=="string"&&r(t[0])===!1?e.path=t[0]:(e.port=t[0],typeof t[1]=="string"&&(e.host=t[1]));var n=t[t.length-1];return typeof n=="function"?[e,n]:[e]});"_setUpListenHandle"in nD.Server.prototype?$_(nD.Server.prototype,"_setUpListenHandle",SQn):$_(nD.Server.prototype,"_listen2",SQn);function SQn(t){return function(){this.on("connection",function(e){e._handle&&(e._handle.onread=id(e._handle.onread))});try{return t.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=id(this._handle.onconnection))}}}a(SQn,"wrapSetUpListenHandle");function RQn(t){if(t&&t._handle){var e=t._handle;e._originalOnread||(e._originalOnread=e.onread),e.onread=id(e._originalOnread)}}a(RQn,"patchOnRead");$_(nD.Socket.prototype,"connect",function(t){return function(){var e;_bs&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?e=arguments[0]:e=sXt?nD._normalizeArgs(arguments):nD._normalizeConnectArgs(arguments),e[1]&&(e[1]=id(e[1]));var r=t.apply(this,e);return RQn(this),r}});var vbs=require("http");$_(vbs.Agent.prototype,"addRequest",function(t){return function(e){var r=e.onSocket;return e.onSocket=id(function(n){return RQn(n),r.apply(this,arguments)}),t.apply(this,arguments)}});var iXt=require("child_process");function IQn(t){Array.isArray(t.stdio)&&t.stdio.forEach(function(e){e&&e._handle&&(e._handle.onread=id(e._handle.onread),$_(e._handle,"close",Yet))}),t._handle&&(t._handle.onexit=id(t._handle.onexit))}a(IQn,"wrapChildProcess");iXt.ChildProcess?$_(iXt.ChildProcess.prototype,"spawn",function(t){return function(){var e=t.apply(this,arguments);return IQn(this),e}}):I7(iXt,["execFile","fork","spawn"],function(t){return function(){var e=t.apply(this,arguments);return IQn(e),e}});process._fatalException||(process._originalNextTick=process.nextTick);var lXt=[];process._nextDomainTick&&lXt.push("_nextDomainTick");process._tickDomainCallback&&lXt.push("_tickDomainCallback");I7(process,lXt,iD);$_(process,"nextTick",Yet);var uXt=["setTimeout","setInterval"];global.setImmediate&&uXt.push("setImmediate");var PQn=require("timers"),bbs=global.setTimeout===PQn.setTimeout;I7(PQn,uXt,Yet);bbs&&I7(global,uXt,Yet);var aXt=require("dns");I7(aXt,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],iD);aXt.resolveNaptr&&$_(aXt,"resolveNaptr",iD);var YW=require("fs");I7(YW,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],iD);YW.lchown&&$_(YW,"lchown",iD);YW.lchmod&&$_(YW,"lchmod",iD);YW.ftruncate&&$_(YW,"ftruncate",iD);var ASe;try{ASe=require("zlib")}catch{}ASe&&ASe.Deflate&&ASe.Deflate.prototype&&(zW=Object.getPrototypeOf(ASe.Deflate.prototype),zW._transform?$_(zW,"_transform",iD):zW.write&&zW.flush&&zW.end&&I7(zW,["write","flush","end"],iD));var zW,cXt;try{cXt=require("crypto")}catch{}cXt&&(oXt=["pbkdf2","randomBytes"],Cbs||oXt.push("pseudoRandomBytes"),I7(cXt,oXt,iD));var oXt,Wet=!!global.Promise&&Promise.toString()==="function Promise() { [native code] }"&&Promise.toString.toString()==="function toString() { [native code] }";Wet&&(xQn=process.addAsyncListener({create:a(function(){Wet=!1},"create")}),global.Promise.resolve(!0).then(a(function(){Wet=!1},"notSync")),process.removeAsyncListener(xQn));var xQn;Wet&&Tbs();function Tbs(){var t=global.Promise;function e(c){if(!(this instanceof e))return t(c);if(typeof c!="function")return new t(c);var l,u,d=new t(p);d.__proto__=e.prototype;try{c.apply(l,u)}catch(h){u[1](h)}return d;function p(h,m){l=this,u=[g,A];function g(y){return n(d,!1),h(y)}a(g,"wrappedResolve");function A(y){return n(d,!1),m(y)}a(A,"wrappedReject")}}if(a(e,"wrappedPromise"),ybs.inherits(e,t),$_(t.prototype,"then",s),t.prototype.chain&&$_(t.prototype,"chain",s),Ebs)global.Promise=TQn()(t,n);else{var r=["all","race","reject","resolve","accept","defer"];r.forEach(function(c){typeof t[c]=="function"&&(e[c]=t[c])}),global.Promise=e}function n(c,l){(!c.__asl_wrapper||l)&&(c.__asl_wrapper=id(o))}a(n,"ensureAslWrapper");function o(c,l,u,d){var p;try{return p=l.call(c,u),{returnVal:p,error:!1}}catch(h){return{errorVal:h,error:!0}}finally{p instanceof t?d.__asl_wrapper=a(function(){var m=p.__asl_wrapper||o;return m.apply(this,arguments)},"proxyWrapper"):n(d,!0)}}a(o,"propagateAslWrapper");function s(c){return a(function(){var u=this,d=c.apply(u,Array.prototype.map.call(arguments,p));return d.__asl_wrapper=a(function(m,g,A,y){return u.__asl_wrapper?(u.__asl_wrapper(m,function(){},null,d),d.__asl_wrapper(m,g,A,y)):o(m,g,A,y)},"proxyWrapper"),d;function p(h){return typeof h!="function"?h:id(function(m){var g=(u.__asl_wrapper||o)(this,h,m,d);if(g.error)throw g.errorVal;return g.returnVal})}a(p,"bind")},"wrappedThen")}a(s,"wrapThen")}a(Tbs,"wrapPromise");function iD(t){var e=a(function(){var r,n=arguments.length-1;if(typeof arguments[n]=="function"){r=Array(arguments.length);for(var o=0;o=0?t:!1}a(Sbs,"toNumber");function Ibs(t){return typeof t=="string"&&Sbs(t)===!1}a(Ibs,"isPipeName")});var BQn=T((_Rd,OQn)=>{"use strict";f();var LO=require("assert"),xbs=Det(),ySe="cls@contexts",dXt="error@context";process.addAsyncListener||kQn();function jw(t){this.name=t,this.active=null,this._set=[],this.id=null}a(jw,"Namespace");jw.prototype.set=function(t,e){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[t]=e,e};jw.prototype.get=function(t){if(this.active)return this.active[t]};jw.prototype.createContext=function(){return Object.create(this.active)};jw.prototype.run=function(t){var e=this.createContext();this.enter(e);try{return t(e),e}catch(r){throw r&&(r[dXt]=e),r}finally{this.exit(e)}};jw.prototype.runAndReturn=function(t){var e;return this.run(function(r){e=t(r)}),e};jw.prototype.bind=function(t,e){e||(this.active?e=this.active:e=this.createContext());var r=this;return function(){r.enter(e);try{return t.apply(this,arguments)}catch(n){throw n&&(n[dXt]=e),n}finally{r.exit(e)}}};jw.prototype.enter=function(t){LO.ok(t,"context must be provided for entering"),this._set.push(this.active),this.active=t};jw.prototype.exit=function(t){if(LO.ok(t,"context must be provided for exiting"),this.active===t){LO.ok(this._set.length,"can't remove top context"),this.active=this._set.pop();return}var e=this._set.lastIndexOf(t);LO.ok(e>=0,"context not currently entered; can't exit"),LO.ok(e,"can't remove top context"),this._set.splice(e,1)};jw.prototype.bindEmitter=function(t){LO.ok(t.on&&t.addListener&&t.emit,"can only bind real EEs");var e=this,r="context@"+this.name;function n(s){s&&(s[ySe]||(s[ySe]=Object.create(null)),s[ySe][r]={namespace:e,context:e.active})}a(n,"attach");function o(s){if(!(s&&s[ySe]))return s;var c=s,l=s[ySe];return Object.keys(l).forEach(function(u){var d=l[u];c=d.namespace.bind(c,d.context)}),c}a(o,"bind"),xbs(t,n,o)};jw.prototype.fromException=function(t){return t[dXt]};function DQn(t){return process.namespaces[t]}a(DQn,"get");function wbs(t){LO.ok(t,"namespace must be given a name!");var e=new jw(t);return e.id=process.addAsyncListener({create:a(function(){return e.active},"create"),before:a(function(r,n){n&&e.enter(n)},"before"),after:a(function(r,n){n&&e.exit(n)},"after"),error:a(function(r){r&&e.exit(r)},"error")}),process.namespaces[t]=e,e}a(wbs,"create");function NQn(t){var e=DQn(t);LO.ok(e,"can't delete nonexistent namespace!"),LO.ok(e.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(e.id),process.namespaces[t]=null}a(NQn,"destroy");function MQn(){process.namespaces&&Object.keys(process.namespaces).forEach(function(t){NQn(t)}),process.namespaces=Object.create(null)}a(MQn,"reset");process.namespaces||MQn();OQn.exports={getNamespace:DQn,createNamespace:wbs,destroyNamespace:NQn,reset:MQn}});var w7=T(oD=>{"use strict";f();var Rbs=oD&&oD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Pbs=oD&&oD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kbs=oD&&oD.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Rbs(e,t,r);return Pbs(e,t),e};Object.defineProperty(oD,"__esModule",{value:!0});oD.CorrelationContextManager=void 0;var x7=Hc(),Dbs=kbs(met()),KW=get(),fXt=BKt(),LQn=rJt(),Pce=Lm(),Nbs=(function(){function t(){}return a(t,"CorrelationContextManager"),t.getCurrentContext=function(){if(!t.enabled)return null;var e=t.session.get(t.CONTEXT_NAME);return e===void 0?null:e},t.generateContextObject=function(e,r,n,o,s,c){return r=r||e,this.enabled?{operation:{name:n,id:e,parentId:r,traceparent:s,tracestate:c},customProperties:new Mbs(o)}:null},t.spanToContextObject=function(e,r,n){var o=new KW;return o.traceId=e.traceId,o.spanId=e.spanId,o.traceFlag=KW.formatOpenTelemetryTraceFlags(e.traceFlags)||KW.DEFAULT_TRACE_FLAG,o.parentId=r,t.generateContextObject(o.traceId,o.parentId,n,null,o)},t.runWithContext=function(e,r){var n;if(t.enabled)try{return t.session.bind(r,(n={},n[t.CONTEXT_NAME]=e,n))()}catch(o){x7.warn("Error binding to session context",Pce.dumpObj(o))}return r()},t.wrapEmitter=function(e){if(t.enabled)try{t.session.bindEmitter(e)}catch(r){x7.warn("Error binding to session context",Pce.dumpObj(r))}},t.wrapCallback=function(e,r){var n;if(t.enabled)try{return t.session.bind(e,r?(n={},n[t.CONTEXT_NAME]=r,n):void 0)}catch(o){x7.warn("Error binding to session context",Pce.dumpObj(o))}return e},t.enable=function(e){if(!this.enabled){if(!this.isNodeVersionCompatible()){this.enabled=!1;return}if(!t.hasEverEnabled){this.forceClsHooked=e,this.hasEverEnabled=!0,typeof this.cls>"u"&&(t.forceClsHooked===!0||t.forceClsHooked===void 0&&t.shouldUseClsHooked()?this.cls=rQn():this.cls=BQn());try{t.session=this.cls.createNamespace("AI-CLS-Session")}catch(r){x7.warn("Failed to create AI-CLS-Session namespace. Correlation of requests may be lost",Pce.dumpObj(r)),this.enabled=!1;return}Dbs.registerContextPreservation(function(r){try{return t.session.bind(r)}catch(n){x7.warn("Error binding to session context",Pce.dumpObj(n))}})}this.enabled=!0}},t.startOperation=function(e,r){var n=e&&e.traceContext||null,o=e&&e.spanContext?e:null,s=e&&e.traceId?e:null,c=e&&e.headers;if(o)return this.spanToContextObject(o.spanContext(),o.parentSpanId,o.name);if(s)return this.spanToContextObject(s,"|".concat(s.traceId,".").concat(s.spanId,"."),typeof r=="string"?r:"");var l=typeof r=="string"?r:"";if(n){var u=null,d=null;if(l=n.attributes.OperationName||l,r){var p=r;p.headers&&(p.headers.traceparent?u=new KW(p.headers.traceparent):p.headers["request-id"]&&(u=new KW(null,p.headers["request-id"])),p.headers.tracestate&&(d=new fXt(p.headers.tracestate)))}u||(u=new KW(n.traceParent||n.traceparent)),d||(d=new fXt(n.traceState||n.tracestate));var h=void 0;if(typeof r=="object"){var m=new LQn(r);h=m.getCorrelationContextHeader(),l=m.getOperationName({})}var g=t.generateContextObject(u.traceId,u.parentId,l,h,u,d);return g}if(c){var u=new KW(c.traceparent?c.traceparent.toString():null),d=new fXt(c.tracestate?c.tracestate.toString():null),m=new LQn(e),g=t.generateContextObject(u.traceId,u.parentId,m.getOperationName({}),m.getCorrelationContextHeader(),u,d);return g}return x7.warn("startOperation was called with invalid arguments",arguments),null},t.disable=function(){this.enabled=!1},t.reset=function(){if(t.hasEverEnabled){t.session=null;try{t.session=this.cls.createNamespace("AI-CLS-Session")}catch(e){x7.warn("Failed to create AI-CLS-Session namespace. Correlation of requests may be lost",Pce.dumpObj(e)),this.enabled=!1;return}}},t.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},t.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},t.canUseClsHooked=function(){var e=process.versions.node.split("."),r=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,o=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(r&&n)&&o},t.enabled=!1,t.hasEverEnabled=!1,t.forceClsHooked=void 0,t.CONTEXT_NAME="ApplicationInsights-Context",t})();oD.CorrelationContextManager=Nbs;var Mbs=(function(){function t(e){this.props=[],this.addHeaderData(e)}return a(t,"CustomPropertiesImpl"),t.prototype.addHeaderData=function(e){var r=e?e.split(", "):[];this.props=r.map(function(n){var o=n.split("=");return{key:o[0],value:o[1]}}).concat(this.props)},t.prototype.serializeToHeader=function(){return this.props.map(function(e){return"".concat(e.key,"=").concat(e.value)}).join(", ")},t.prototype.getProperty=function(e){for(var r=0;r'+r+""+s,n},"insertSnippetByIndex");Ji.insertSnippetByIndex=DTs;var NTs=a(function(t){var e=!1,r=t.getHeader("Content-Type");return r&&(typeof r=="string"?e=r.indexOf("html")>=0:e=r.toString().indexOf("html")>=0),e},"isContentTypeHeaderHtml");Ji.isContentTypeHeaderHtml=NTs});var EXt=T((a2d,nqn)=>{"use strict";f();var rqn=Xl(),MTs=(function(){function t(){}return a(t,"ConnectionStringParser"),t.parse=function(e){if(!e)return{};var r=e.split(t._FIELDS_SEPARATOR),n=r.reduce(function(s,c){var l=c.split(t._FIELD_KEY_VALUE_SEPARATOR);if(l.length===2){var u=l[0].toLowerCase(),d=l[1];s[u]=d}return s},{});if(Object.keys(n).length>0){if(n.endpointsuffix){var o=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+o+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+o+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||rqn.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||rqn.DEFAULT_LIVEMETRICS_ENDPOINT}return n},t.isIkeyValid=function(e){if(!e||e=="")return!1;var r="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",n=new RegExp(r);return n.test(e)},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t})();nqn.exports=MTs});var iqn={};ui(iqn,{webSnippet:()=>OTs});var OTs,oqn=Pe(()=>{f();OTs=`!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a{"use strict";f();var aQn=require("http"),cQn=require("https"),Cle=require("zlib"),yD=Kc(),HS=rQn(),lQn=XJt(),bIe=su(),uQn=ZJt(),Ovs=(sQn(),ba(oQn)),Bvs=(function(){function t(e){var r;if(this._isIkeyValid=!0,t.INSTANCE)throw new Error("Web snippet injection should be configured from the applicationInsights object");t.INSTANCE=this,t._aiUrl=bIe.WEB_INSTRUMENTATION_DEFAULT_SOURCE,t._aiDeprecatedUrl=bIe.WEB_INSTRUMENTATION_DEPRECATED_SOURCE;var n=this._getWebSnippetIkey((r=e.config)===null||r===void 0?void 0:r.webInstrumentationConnectionString);this._webInstrumentationIkey=n||e.config.instrumentationKey,this._clientWebInstrumentationConfig=e.config.webInstrumentationConfig,this._clientWebInstrumentationSrc=e.config.webInstrumentationSrc,this._statsbeat=e?.getStatsbeat()}return a(t,"WebSnippet"),t.prototype.enable=function(e,r){this._isEnabled=e,this._webInstrumentationIkey=this._getWebSnippetIkey(r)||this._webInstrumentationIkey,t._snippet=this._getWebInstrumentationReplacedStr(),this._isEnabled&&!this._isInitialized&&this._isIkeyValid?(this._statsbeat&&this._statsbeat.addFeature(bIe.StatsbeatFeature.BROWSER_SDK_LOADER),this._initialize()):this._isEnabled||this._statsbeat&&this._statsbeat.removeFeature(bIe.StatsbeatFeature.BROWSER_SDK_LOADER)},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype._getWebSnippetIkey=function(e){var r=null;try{var n=uQn.parse(e),o=n.instrumentationkey||"";uQn.isIkeyValid(o)?(this._isIkeyValid=!0,r=o):(this._isIkeyValid=!1,yD.info("Invalid web Instrumentation connection string, web Instrumentation is not enabled."))}catch(s){yD.info("get web snippet ikey error: "+s)}return r},t.prototype._getWebInstrumentationReplacedStr=function(){var e=this._getClientWebInstrumentationConfigStr(this._clientWebInstrumentationConfig),r=lQn.getOsPrefix(),n=lQn.getResourceProvider(),o="".concat(this._webInstrumentationIkey,`",\r +}});`});var dqn=T((d2d,uqn)=>{"use strict";f();var sqn=require("http"),aqn=require("https"),Mce=require("zlib"),sD=Hc(),kS=tqn(),cqn=yXt(),_Se=Xl(),lqn=EXt(),BTs=(oqn(),Aa(iqn)),LTs=(function(){function t(e){var r;if(this._isIkeyValid=!0,t.INSTANCE)throw new Error("Web snippet injection should be configured from the applicationInsights object");t.INSTANCE=this,t._aiUrl=_Se.WEB_INSTRUMENTATION_DEFAULT_SOURCE,t._aiDeprecatedUrl=_Se.WEB_INSTRUMENTATION_DEPRECATED_SOURCE;var n=this._getWebSnippetIkey((r=e.config)===null||r===void 0?void 0:r.webInstrumentationConnectionString);this._webInstrumentationIkey=n||e.config.instrumentationKey,this._clientWebInstrumentationConfig=e.config.webInstrumentationConfig,this._clientWebInstrumentationSrc=e.config.webInstrumentationSrc,this._statsbeat=e?.getStatsbeat()}return a(t,"WebSnippet"),t.prototype.enable=function(e,r){this._isEnabled=e,this._webInstrumentationIkey=this._getWebSnippetIkey(r)||this._webInstrumentationIkey,t._snippet=this._getWebInstrumentationReplacedStr(),this._isEnabled&&!this._isInitialized&&this._isIkeyValid?(this._statsbeat&&this._statsbeat.addFeature(_Se.StatsbeatFeature.BROWSER_SDK_LOADER),this._initialize()):this._isEnabled||this._statsbeat&&this._statsbeat.removeFeature(_Se.StatsbeatFeature.BROWSER_SDK_LOADER)},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype._getWebSnippetIkey=function(e){var r=null;try{var n=lqn.parse(e),o=n.instrumentationkey||"";lqn.isIkeyValid(o)?(this._isIkeyValid=!0,r=o):(this._isIkeyValid=!1,sD.info("Invalid web Instrumentation connection string, web Instrumentation is not enabled."))}catch(s){sD.info("get web snippet ikey error: "+s)}return r},t.prototype._getWebInstrumentationReplacedStr=function(){var e=this._getClientWebInstrumentationConfigStr(this._clientWebInstrumentationConfig),r=cqn.getOsPrefix(),n=cqn.getResourceProvider(),o="".concat(this._webInstrumentationIkey,`",\r `).concat(e,` disableIkeyDeprecationMessage: true,\r - sdkExtension: "`).concat(n).concat(r,"d_n_"),s=Ovs.webSnippet.replace("INSTRUMENTATION_KEY",o);return this._clientWebInstrumentationSrc?s.replace("".concat(bIe.WEB_INSTRUMENTATION_DEFAULT_SOURCE,".2.min.js"),this._clientWebInstrumentationSrc):s},t.prototype._getClientWebInstrumentationConfigStr=function(e){var r="";try{e!=null&&e.length>0&&e.forEach(function(n){var o=n.name;if(o!==void 0){var s=n.value,c="";switch(typeof s){case"function":break;case"object":break;case"string":c=" ".concat(o,': "').concat(s,`",\r + sdkExtension: "`).concat(n).concat(r,"d_n_"),s=BTs.webSnippet.replace("INSTRUMENTATION_KEY",o);return this._clientWebInstrumentationSrc?s.replace("".concat(_Se.WEB_INSTRUMENTATION_DEFAULT_SOURCE,".2.min.js"),this._clientWebInstrumentationSrc):s},t.prototype._getClientWebInstrumentationConfigStr=function(e){var r="";try{e!=null&&e.length>0&&e.forEach(function(n){var o=n.name;if(o!==void 0){var s=n.value,c="";switch(typeof s){case"function":break;case"object":break;case"string":c=" ".concat(o,': "').concat(s,`",\r `),r+=c;break;default:c=" ".concat(o,": ").concat(s,`,\r -`),r+=c;break}}})}catch{this._isEnabled=!1,yD.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return r},t.prototype._initialize=function(){this._isInitialized=!0;var e=aQn.createServer,r=cQn.createServer,n=this._isEnabled;aQn.createServer=function(o){var s=o;return s&&(o=a(function(c,l){var u=l.write,d=c.method=="GET";l.write=a(function(m,g,A){try{if(n&&d){var y=HS.getContentEncodingFromHeaders(l),E=void 0;if(typeof g=="string"&&(E=g),y==null)t.INSTANCE.ValidateInjection(l,m)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,void 0,E));else if(y.length){var _=y[0];arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,_)}}}catch(v){yD.warn("Inject snippet error: "+v)}return u.apply(l,arguments)},"wrap");var p=l.end;return l.end=a(function(m,g,A){if(n&&d)try{if(n&&d){var y=HS.getContentEncodingFromHeaders(l),E=void 0;if(typeof g=="string"&&(E=g),y==null)t.INSTANCE.ValidateInjection(l,m)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,void 0,E));else if(y.length){var _=y[0];arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,_)}}}catch(v){yD.warn("Inject snipet error: "+v)}return p.apply(l,arguments)},"wrap"),s(c,l)},"requestListener")),e(o)},cQn.createServer=function(o,s){var c=s;if(c)return s=a(function(l,u){var d=l.method=="GET",p=u.write,h=u.end;return u.write=a(function(g,A,y){try{if(n&&d){var E=HS.getContentEncodingFromHeaders(u),_=void 0;if(typeof A=="string"&&(_=A),E==null)t.INSTANCE.ValidateInjection(u,g)&&(arguments[0]=this.InjectWebSnippet(u,g,void 0,_));else if(E.length){var v=E[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,v)}}}catch(b){yD.warn("Inject snippet error: "+b)}return p.apply(u,arguments)},"wrap"),u.end=a(function(g,A,y){try{if(n&&d){var E=HS.getContentEncodingFromHeaders(u),_=void 0;if(typeof A=="string"&&(_=A),E==null)t.INSTANCE.ValidateInjection(u,g)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,void 0,_));else if(E.length){var v=E[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,v)}}}catch(b){yD.warn("Inject snippet error: "+b)}return h.apply(u,arguments)},"wrap"),c(l,u)},"httpsRequestListener"),r(o,s)}},t.prototype.ValidateInjection=function(e,r){try{if(!e||!r||e.statusCode!=200)return!1;var n=HS.isContentTypeHeaderHtml(e);if(!n)return!1;var o=r.slice().toString();if(o.indexOf("")>=0&&o.indexOf("")>=0&&o.indexOf(t._aiUrl)<0&&o.indexOf(t._aiDeprecatedUrl)<0)return!0}catch(s){yD.info("validate injections error: "+s)}return!1},t.prototype.InjectWebSnippet=function(e,r,n,o){try{var s=!!n;if(s)e.removeHeader("Content-Length"),r=this._getInjectedCompressBuffer(e,r,n),e.setHeader("Content-Length",r.length);else{var c=r.toString(),l=c.indexOf("");if(l<0)return r;var u=HS.insertSnippetByIndex(l,c,t._snippet);if(typeof r=="string")e.removeHeader("Content-Length"),r=u,e.setHeader("Content-Length",Buffer.byteLength(r));else if(Buffer.isBuffer(r)){var d=o||"utf8",p=HS.isBufferType(r,d);if(p){e.removeHeader("Content-Length");var h=Buffer.from(u).toString(d);r=Buffer.from(h,d),e.setHeader("Content-Length",r.length)}}}}catch(m){yD.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+m)}return r},t.prototype._getInjectedCompressBuffer=function(e,r,n){try{switch(n){case HS.contentEncodingMethod.GZIP:var o=Cle.gunzipSync(r);if(this.ValidateInjection(e,o)){var s=this.InjectWebSnippet(e,o);r=Cle.gzipSync(s)}break;case HS.contentEncodingMethod.DEFLATE:var c=Cle.inflateSync(r);if(this.ValidateInjection(e,c)){var l=this.InjectWebSnippet(e,c);r=Cle.deflateSync(l)}break;case HS.contentEncodingMethod.BR:var u=HS.getBrotliDecompressSync(Cle),d=HS.getBrotliCompressSync(Cle);if(u&&d){var p=u(r);if(this.ValidateInjection(e,p)){var h=this.InjectWebSnippet(e,p);r=d(h)}break}}}catch(m){yD.info("get web injection compress buffer error: "+m)}return r},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t})();dQn.exports=Bvs});var hQn=T((tXt,pQn)=>{"use strict";f();var Lvs=tXt&&tXt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),jS=require("url"),eXt=dA(),Fvs=Wm(),Uvs=Kce(),Qvs=NKt(),qvs=Dz(),Gvs=(function(t){Lvs(e,t);function e(r,n){var o=t.call(this)||this;return n&&n.method&&r&&(o.method=n.method,o.url=e._getUrlFromRequestOptions(r,n),o.startTime=+new Date),o}return a(e,"HttpDependencyParser"),e.prototype.onError=function(r){this._setStatus(void 0,r)},e.prototype.onResponse=function(r){this._setStatus(r.statusCode,void 0),this.correlationId=Fvs.getCorrelationContextTarget(r,Uvs.requestContextTargetKey)},e.prototype.getDependencyTelemetry=function(r,n){var o=this.method.toUpperCase(),s=eXt.RemoteDependencyDataConstants.TYPE_HTTP,c="";try{var l=new jS.URL(this.url);l.search=void 0,l.hash=void 0,o+=" "+l.pathname,c=l.hostname,l.port&&(c+=":"+l.port)}catch{}this.correlationId?(s=eXt.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==qvs.correlationIdPrefix&&(c+=" | "+this.correlationId)):s=eXt.RemoteDependencyDataConstants.TYPE_HTTP;var u={id:n,name:o,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:s,target:c};if(r&&r.time?u.time=r.time:this.startTime&&(u.time=new Date(this.startTime)),r){for(var d in r)u[d]||(u[d]=r[d]);if(r.properties)for(var d in r.properties)u.properties[d]=r.properties[d]}return u},e._getUrlFromRequestOptions=function(r,n){if(typeof r=="string")if(r.indexOf("http://")===0||r.indexOf("https://")===0)try{r=new jS.URL(r)}catch{}else try{var o=new jS.URL("http://"+r);o.port==="443"?r=new jS.URL("https://"+r):r=new jS.URL("http://"+r)}catch{}else{if(r&&typeof jS.URL=="function"&&r instanceof jS.URL)return jS.format(r);var s=r;r={},s&&Object.keys(s).forEach(function(u){r[u]=s[u]})}if(r.path&&r.host)try{var c=new jS.URL(r.path,"http://"+r.host+r.path);r.pathname=c.pathname,r.search=c.search}catch{}if(r.path&&r.hostname&&!r.host)try{var c=new jS.URL(r.path,"http://"+r.hostname+r.path);r.pathname=c.pathname,r.search=c.search}catch{}if(r.host&&r.port)try{var l=new jS.URL("http://".concat(r.host));!l.port&&r.port&&(r.hostname=r.host,delete r.host)}catch{}return r.protocol=r.protocol||n.agent&&n.agent.protocol||n.protocol||void 0,r.hostname=r.hostname||"localhost",jS.format(r)},e})(Qvs);pQn.exports=Gvs});var mQn=T(_le=>{"use strict";f();var rrt=_le&&_le.__assign||function(){return rrt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var Wvs=iB&&iB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zvs=iB&&iB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yvs=iB&&iB.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wvs(e,t,r);return zvs(e,t),e};Object.defineProperty(iB,"__esModule",{value:!0});iB.spanToTelemetryContract=rbs;var gQn=require("url"),rR=(Fi(),ba($4)),Oo=(Fet(),ba(GYt)),nB=Yvs(su()),Kvs=mQn(),Jvs=Wm();function Xvs(t){for(var e={},r=0,n=Object.keys(t.attributes);r0&&(e["_MS.links"]=Jvs.stringify(s)),e}a(Xvs,"createPropertiesFromSpan");function Zvs(t){return t===Oo.DbSystemValues.DB2||t===Oo.DbSystemValues.DERBY||t===Oo.DbSystemValues.MARIADB||t===Oo.DbSystemValues.MSSQL||t===Oo.DbSystemValues.ORACLE||t===Oo.DbSystemValues.SQLITE||t===Oo.DbSystemValues.OTHER_SQL||t===Oo.DbSystemValues.HSQLDB||t===Oo.DbSystemValues.H2}a(Zvs,"isSqlDB");function AQn(t){var e=t.attributes[Oo.SemanticAttributes.HTTP_METHOD];if(e){var r=t.attributes[Oo.SemanticAttributes.HTTP_URL];if(r)return String(r);var n=t.attributes[Oo.SemanticAttributes.HTTP_SCHEME],o=t.attributes[Oo.SemanticAttributes.HTTP_TARGET];if(n&&o){var s=t.attributes[Oo.SemanticAttributes.HTTP_HOST];if(s)return"".concat(n,"://").concat(s).concat(o);var c=t.attributes[Oo.SemanticAttributes.NET_PEER_PORT];if(c){var l=t.attributes[Oo.SemanticAttributes.NET_PEER_NAME];if(l)return"".concat(n,"://").concat(l,":").concat(c).concat(o);var u=t.attributes[Oo.SemanticAttributes.NET_PEER_IP];if(u)return"".concat(n,"://").concat(u,":").concat(c).concat(o)}}}return""}a(AQn,"getUrl");function nXt(t){var e=t.attributes[Oo.SemanticAttributes.PEER_SERVICE],r=t.attributes[Oo.SemanticAttributes.HTTP_HOST],n=t.attributes[Oo.SemanticAttributes.HTTP_URL],o=t.attributes[Oo.SemanticAttributes.NET_PEER_NAME],s=t.attributes[Oo.SemanticAttributes.NET_PEER_IP];return e?String(e):r?String(r):n?String(n):o?String(o):s?String(s):""}a(nXt,"getDependencyTarget");function ebs(t){var e={name:t.name,success:t.status.code!=rR.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};t.kind===rR.SpanKind.PRODUCER&&(e.dependencyTypeName=nB.DependencyTypeName.QueueMessage),t.kind===rR.SpanKind.INTERNAL&&t.parentSpanId&&(e.dependencyTypeName=nB.DependencyTypeName.InProc);var r=t.attributes[Oo.SemanticAttributes.HTTP_METHOD],n=t.attributes[Oo.SemanticAttributes.DB_SYSTEM],o=t.attributes[Oo.SemanticAttributes.RPC_SYSTEM];if(r){e.dependencyTypeName=nB.DependencyTypeName.Http;var s=t.attributes[Oo.SemanticAttributes.HTTP_URL];if(s){var c="";try{var l=new gQn.URL(String(s));c=l.pathname}catch{}e.name="".concat(r," ").concat(c)}e.data=AQn(t);var u=t.attributes[Oo.SemanticAttributes.HTTP_STATUS_CODE];u&&(e.resultCode=String(u));var d=nXt(t);if(d){try{var p=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/),h=p.exec(d);if(h!=null){var m=h[1],g=h[3];(m=="https"&&g==":443"||m=="http"&&g==":80")&&(d=h[1]+h[2]+h[4])}}catch{}e.target="".concat(d)}}else if(n){String(n)===Oo.DbSystemValues.MYSQL?e.dependencyTypeName="mysql":String(n)===Oo.DbSystemValues.POSTGRESQL?e.dependencyTypeName="postgresql":String(n)===Oo.DbSystemValues.MONGODB?e.dependencyTypeName="mongodb":String(n)===Oo.DbSystemValues.REDIS?e.dependencyTypeName="redis":Zvs(String(n))?e.dependencyTypeName="SQL":e.dependencyTypeName=String(n);var A=t.attributes[Oo.SemanticAttributes.DB_STATEMENT],y=t.attributes[Oo.SemanticAttributes.DB_OPERATION];A?e.data=String(A):y&&(e.data=String(y));var d=nXt(t),E=t.attributes[Oo.SemanticAttributes.DB_NAME];d?e.target=E?"".concat(d,"|").concat(E):"".concat(d):e.target=E?"".concat(E):"".concat(n)}else if(o){e.dependencyTypeName=nB.DependencyTypeName.Grpc;var _=t.attributes[Oo.SemanticAttributes.RPC_GRPC_STATUS_CODE];_&&(e.resultCode=String(_));var d=nXt(t);d?e.target="".concat(d):o&&(e.target=String(o))}return e}a(ebs,"createDependencyData");function tbs(t){var e={name:t.name,success:t.status.code!=rR.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},r=t.attributes[Oo.SemanticAttributes.HTTP_METHOD],n=t.attributes[Oo.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(r){if(t.kind==rR.SpanKind.SERVER){var o=t.attributes[Oo.SemanticAttributes.HTTP_ROUTE],s=t.attributes[Oo.SemanticAttributes.HTTP_URL];if(o)e.name="".concat(r," ").concat(o);else if(s)try{var c=new gQn.URL(String(s));e.name="".concat(r," ").concat(c.pathname)}catch{}}e.url=AQn(t);var l=t.attributes[Oo.SemanticAttributes.HTTP_STATUS_CODE];l&&(e.resultCode=String(l))}else n&&(e.resultCode=String(n));return e}a(tbs,"createRequestData");function rbs(t){var e;switch(t.kind){case rR.SpanKind.CLIENT:case rR.SpanKind.PRODUCER:case rR.SpanKind.INTERNAL:e=ebs(t);break;case rR.SpanKind.SERVER:case rR.SpanKind.CONSUMER:e=tbs(t);break}var r=t.spanContext?t.spanContext():t.context(),n="".concat(r.spanId),o=Math.round(t.duration[0]*1e3+t.duration[1]/1e6);return e.id=n,e.duration=o,e.properties=Xvs(t),t.attributes[nB.AzNamespace]&&(t.kind===rR.SpanKind.INTERNAL&&(e.dependencyTypeName="".concat(nB.DependencyTypeName.InProc," | ").concat(t.attributes[nB.AzNamespace])),t.attributes[nB.AzNamespace]===nB.MicrosoftEventHub&&(0,Kvs.parseEventHubSpan)(t,e)),e}a(rbs,"spanToTelemetryContract")});var CQn=T(sU=>{"use strict";f();var vle=sU&&sU.__assign||function(){return vle=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var ibs=Kv&&Kv.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),obs=Kv&&Kv.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sbs=Kv&&Kv.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ibs(e,t,r);return obs(e,t),e};Object.defineProperty(Kv,"__esModule",{value:!0});Kv.subscriber=void 0;Kv.enable=dbs;var SIe=(Fi(),ba($4)),abs=su(),iXt=Xd(),cbs=sbs(yQn()),lbs=CQn(),Vz=[],ubs=a(function(t){try{var e=t.data,r=cbs.spanToTelemetryContract(e);lbs.AsyncScopeManager.with(e,function(){Vz.forEach(function(n){e.kind===SIe.SpanKind.SERVER||e.kind===SIe.SpanKind.CONSUMER?n.trackRequest(r):(e.kind===SIe.SpanKind.CLIENT||e.kind===SIe.SpanKind.INTERNAL||e.kind===SIe.SpanKind.PRODUCER)&&n.trackDependency(r)})})}catch{}},"subscriber");Kv.subscriber=ubs;function dbs(t,e){if(t){var r=Vz.find(function(n){return n==e});if(r)return;Vz.length===0&&iXt.channel.subscribe("azure-coretracing",Kv.subscriber,iXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(abs.StatsbeatInstrumentation.AZURE_CORE_TRACING)}),Vz.push(e)}else Vz=Vz.filter(function(n){return n!=e}),Vz.length===0&&iXt.channel.unsubscribe("azure-coretracing",Kv.subscriber)}a(dbs,"enable")});var vQn=T(zz=>{"use strict";f();Object.defineProperty(zz,"__esModule",{value:!0});zz.subscriber=void 0;zz.enable=hbs;var fbs=su(),oXt=Xd(),Wz=[],pbs=a(function(t){t.data.event.commandName!=="ismaster"&&Wz.forEach(function(e){var r=t.data.startedData&&t.data.startedData.databaseName||"Unknown database";e.trackDependency({target:r,data:t.data.event.commandName,name:t.data.event.commandName,duration:t.data.event.duration,success:t.data.succeeded,resultCode:t.data.succeeded?"0":"1",time:t.data.startedData.time,dependencyTypeName:"mongodb"})})},"subscriber");zz.subscriber=pbs;function hbs(t,e){if(t){var r=Wz.find(function(n){return n==e});if(r)return;Wz.length===0&&oXt.channel.subscribe("mongodb",zz.subscriber,oXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(fbs.StatsbeatInstrumentation.MONGODB)}),Wz.push(e)}else Wz=Wz.filter(function(n){return n!=e}),Wz.length===0&&oXt.channel.unsubscribe("mongodb",zz.subscriber)}a(hbs,"enable")});var bQn=T(Kz=>{"use strict";f();Object.defineProperty(Kz,"__esModule",{value:!0});Kz.subscriber=void 0;Kz.enable=Abs;var mbs=su(),sXt=Xd(),Yz=[],gbs=a(function(t){Yz.forEach(function(e){var r=t.data.query||{},n=r.sql||"Unknown query",o=!t.data.err,s=r._connection||{},c=s.config||{},l=c.socketPath?c.socketPath:"".concat(c.host||"localhost",":").concat(c.port);e.trackDependency({target:l,data:n,name:n,duration:t.data.duration,success:o,resultCode:o?"0":"1",time:t.data.time,dependencyTypeName:"mysql"})})},"subscriber");Kz.subscriber=gbs;function Abs(t,e){if(t){var r=Yz.find(function(n){return n==e});if(r)return;Yz.length===0&&sXt.channel.subscribe("mysql",Kz.subscriber,sXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(mbs.StatsbeatInstrumentation.MYSQL)}),Yz.push(e)}else Yz=Yz.filter(function(n){return n!=e}),Yz.length===0&&sXt.channel.unsubscribe("mysql",Kz.subscriber)}a(Abs,"enable")});var TQn=T(Xz=>{"use strict";f();Object.defineProperty(Xz,"__esModule",{value:!0});Xz.subscriber=void 0;Xz.enable=Cbs;var ybs=su(),aXt=Xd(),Jz=[],Ebs=a(function(t){Jz.forEach(function(e){t.data.commandObj.command!=="info"&&e.trackDependency({target:t.data.address,name:t.data.commandObj.command,data:t.data.commandObj.command,duration:t.data.duration,success:!t.data.err,resultCode:t.data.err?"1":"0",time:t.data.time,dependencyTypeName:"redis"})})},"subscriber");Xz.subscriber=Ebs;function Cbs(t,e){if(t){var r=Jz.find(function(n){return n==e});if(r)return;Jz.length===0&&aXt.channel.subscribe("redis",Xz.subscriber,aXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(ybs.StatsbeatInstrumentation.REDIS)}),Jz.push(e)}else Jz=Jz.filter(function(n){return n!=e}),Jz.length===0&&aXt.channel.unsubscribe("redis",Xz.subscriber)}a(Cbs,"enable")});var SQn=T(eY=>{"use strict";f();Object.defineProperty(eY,"__esModule",{value:!0});eY.subscriber=void 0;eY.enable=bbs;var _bs=su(),cXt=Xd(),Zz=[],vbs=a(function(t){Zz.forEach(function(e){var r=t.data.query,n=r.preparable&&r.preparable.text||r.plan||r.text||"unknown query",o=!t.data.error,s="".concat(t.data.database.host,":").concat(t.data.database.port);e.trackDependency({target:s,data:n,name:n,duration:t.data.duration,success:o,resultCode:o?"0":"1",time:t.data.time,dependencyTypeName:"postgres"})})},"subscriber");eY.subscriber=vbs;function bbs(t,e){if(t){var r=Zz.find(function(n){return n==e});if(r)return;Zz.length===0&&cXt.channel.subscribe("postgres",eY.subscriber,cXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(_bs.StatsbeatInstrumentation.POSTGRES)}),Zz.push(e)}else Zz=Zz.filter(function(n){return n!=e}),Zz.length===0&&cXt.channel.unsubscribe("postgres",eY.subscriber)}a(bbs,"enable")});var Sle=T((oB,IQn)=>{"use strict";f();var Tbs=oB&&oB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Sbs=oB&&oB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ibs=oB&&oB.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tbs(e,t,r);return Sbs(e,t),e},nrt=oB&&oB.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{"use strict";f();var xQn=require("http"),wQn=require("https"),RQn=Kc(),PQn=Wm(),Pbs=Kce(),uXt=BKt(),sB=tU(),kbs=Ktt(),Nbs=(function(){function t(e){if(t.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");t.INSTANCE=this,this._client=e}return a(t,"AutoCollectHttpRequests"),t.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||kbs.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},t.prototype.useAutoCorrelation=function(e,r){e&&!this._isAutoCorrelating?sB.CorrelationContextManager.enable(r):!e&&this._isAutoCorrelating&&sB.CorrelationContextManager.disable(),this._isAutoCorrelating=e},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},t.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return sB.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},t.prototype._registerRequest=function(e,r,n){var o=this,s=new uXt(e),c=this._generateCorrelationContext(s);sB.CorrelationContextManager.runWithContext(c,function(){o._isEnabled&&(e[t.alreadyAutoCollectedFlag]=!0,t.trackRequest(o._client,{request:e,response:r},s)),typeof n=="function"&&n(e,r)})},t.prototype._initialize=function(){if(this._isInitialized=!0,!t.HANDLER_READY){t.HANDLER_READY=!0;var e=a(function(s){if(s){if(typeof s!="function")throw new Error("onRequest handler must be a function");return function(c,l){sB.CorrelationContextManager.wrapEmitter(c),sB.CorrelationContextManager.wrapEmitter(l);var u=c&&!c[t.alreadyAutoCollectedFlag];c&&u&&t.INSTANCE?t.INSTANCE._registerRequest(c,l,s):s(c,l)}}},"wrapOnRequestHandler"),r=a(function(s){var c=s.addListener.bind(s);s.addListener=function(l,u){switch(l){case"request":case"checkContinue":return c(l,e(u));default:return c(l,u)}},s.on=s.addListener},"wrapServerEventHandler"),n=xQn.createServer;xQn.createServer=function(s,c){if(c&&typeof c=="function"){var l=n(s,e(c));return r(l),l}else{var l=n(e(s));return r(l),l}};var o=wQn.createServer;wQn.createServer=function(s,c){var l=o(s,e(c));return r(l),l}}},t.trackRequestSync=function(e,r){if(!r.request||!r.response||!e){RQn.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!r.request,!r.response,!e);return}r.isProcessed=!1,t.addResponseCorrelationIdHeader(e,r.response);var n=sB.CorrelationContextManager.getCurrentContext(),o=new uXt(r.request,n&&n.operation.parentId);n&&(n.operation.id=o.getOperationId(e.context.tags)||n.operation.id,n.operation.name=o.getOperationName(e.context.tags)||n.operation.name,n.operation.parentId=o.getRequestId()||n.operation.parentId,n.customProperties.addHeaderData(o.getCorrelationContextHeader())),t.endRequest(e,o,r,r.duration,r.error)},t.trackRequest=function(e,r,n){if(!r.request||!r.response||!e){RQn.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!r.request,!r.response,!e);return}r.isProcessed=!1;var o=sB.CorrelationContextManager.getCurrentContext(),s=n||new uXt(r.request,o&&o.operation.parentId);PQn.canIncludeCorrelationHeader(e,s.getUrl())&&t.addResponseCorrelationIdHeader(e,r.response),o&&!n&&(o.operation.id=s.getOperationId(e.context.tags)||o.operation.id,o.operation.name=s.getOperationName(e.context.tags)||o.operation.name,o.operation.parentId=s.getOperationParentId(e.context.tags)||o.operation.parentId,o.customProperties.addHeaderData(s.getCorrelationContextHeader())),r.response.once&&r.response.once("finish",function(){t.endRequest(e,s,r,null,null)}),r.request.on&&r.request.on("error",function(c){t.endRequest(e,s,r,null,c)}),r.request.on&&r.request.on("aborted",function(){var c="The request has been aborted and the network socket has closed.";t.endRequest(e,s,r,null,c)})},t.addResponseCorrelationIdHeader=function(e,r){if(e.config&&e.config.correlationId&&r.getHeader&&r.setHeader&&!r.headersSent){var n=r.getHeader(Pbs.requestContextHeader);PQn.safeIncludeCorrelationHeader(e,r,n)}},t.endRequest=function(e,r,n,o,s){if(!n.isProcessed){n.isProcessed=!0,s?r.onError(s,o):r.onResponse(n.response,o);var c=r.getRequestTelemetry(n);if(c.tagOverrides=r.getRequestTags(e.context.tags),n.tagOverrides)for(var l in n.tagOverrides)c.tagOverrides[l]=n.tagOverrides[l];var u=r.getLegacyRootId();u&&(c.properties.ai_legacyRootId=u),c.contextObjects=c.contextObjects||{},c.contextObjects["http.ServerRequest"]=n.request,c.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(c)}},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1,sB.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},t.HANDLER_READY=!1,t.alreadyAutoCollectedFlag="_appInsightsAutoCollected",t})();kQn.exports=Nbs});var MQn=T((pXt,DQn)=>{"use strict";f();var $S=pXt&&pXt.__assign||function(){return $S=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0?r:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date(".concat(Date.now(),")/"),Version:o.tags[o.keys.internalSdkVersion],StreamId:Obs,MachineName:s,Instance:c,RoleName:l};return u},t.createQuickPulseMetric=function(e){var r;return r={Name:e.name,Value:e.value,Weight:e.count||1},r},t.telemetryEnvelopeToQuickPulseDocument=function(e){switch(e.data.baseType){case tY.TelemetryTypeString.Event:return t.createQuickPulseEventDocument(e);case tY.TelemetryTypeString.Exception:return t.createQuickPulseExceptionDocument(e);case tY.TelemetryTypeString.Trace:return t.createQuickPulseTraceDocument(e);case tY.TelemetryTypeString.Dependency:return t.createQuickPulseDependencyDocument(e);case tY.TelemetryTypeString.Request:return t.createQuickPulseRequestDocument(e)}return null},t.createQuickPulseEventDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.name,o=$S($S({},r),{Name:n});return o},t.createQuickPulseTraceDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.severityLevel||0,o=$S($S({},r),{Message:e.data.baseData.message,SeverityLevel:tY.SeverityLevel[n]});return o},t.createQuickPulseExceptionDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.exceptions,o="",s="",c="";n&&n.length>0&&(n[0].parsedStack&&n[0].parsedStack.length>0?n[0].parsedStack.forEach(function(u){o+=u.assembly+` -`}):n[0].stack&&n[0].stack.length>0&&(o=n[0].stack),s=n[0].message,c=n[0].typeName);var l=$S($S({},r),{Exception:o,ExceptionMessage:s,ExceptionType:c});return l},t.createQuickPulseRequestDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData,o=$S($S({},r),{Name:n.name,Success:n.success,Duration:n.duration,ResponseCode:n.responseCode,OperationName:n.name});return o},t.createQuickPulseDependencyDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData,o=$S($S({},r),{Name:n.name,Target:n.target,Success:n.success,Duration:n.duration,ResultCode:n.resultCode,CommandName:n.data,OperationName:r.OperationId,DependencyTypeName:n.type});return o},t.createQuickPulseDocument=function(e){var r,n,o,s;e.data.baseType?(n=NQn.TelemetryTypeStringToQuickPulseType[e.data.baseType],r=NQn.TelemetryTypeStringToQuickPulseDocumentType[e.data.baseType]):Mbs.warn("Document type invalid; not sending live metric document",e.data.baseType),o=e.tags[t.keys.operationId],s=t.aggregateProperties(e);var c={DocumentType:r,__type:n,OperationId:o,Version:"1.0",Properties:s};return c},t.aggregateProperties=function(e){var r=[],n=e.data.baseData.measurements||{};for(var o in n)if(n.hasOwnProperty(o)){var s=n[o],c={key:o,value:s};r.push(c)}var l=e.data.baseData.properties||{};for(var o in l)if(l.hasOwnProperty(o)){var s=l[o],c={key:o,value:s};r.push(c)}return r},t.keys=new tY.ContextTagKeys,t})();DQn.exports=Bbs});var BQn=T((Bwd,OQn)=>{"use strict";f();var Lbs=a(function(){return(Date.now()+621355968e5)*1e4},"getTransmissionTime");OQn.exports={getTransmissionTime:Lbs}});var QQn=T((wIe,UQn)=>{"use strict";f();var LQn=wIe&&wIe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},FQn=wIe&&wIe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0?r:this._config.quickPulseHost,m.method=VS.method,m.path="/QuickPulseService.svc/".concat(o,"?ikey=").concat(this._config.instrumentationKey),m.headers=(g={Expect:"100-continue"},g[VS.time]=Qbs.getTransmissionTime(),g["Content-Type"]="application/json",g["Content-Length"]=Buffer.byteLength(c),g),m),s&&s.length>0&&s.forEach(function(E){return l.headers[E.name]=E.value}),o!=="post")return[3,4];if(u=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!u)return[3,4];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,u.addAuthorizationHeader(l)];case 2:return y.sent(),[3,4];case 3:return d=y.sent(),p="Failed to get AAD bearer token for the Application. Error:",hXt.info(t.TAG,p,d),[2];case 4:return this._config.httpsAgent?l.agent=this._config.httpsAgent:l.agent=mXt.tlsRestrictedAgent,h=Fbs.request(l,function(E){if(E.statusCode==200){var _=E.headers[VS.subscribed]==="true",v=null;try{v=E.headers[VS.endpointRedirect]?new qbs.URL(E.headers[VS.endpointRedirect].toString()).host:null}catch(I){A._onError("Failed to parse redirect header from QuickPulse: "+mXt.dumpObj(I))}var b=E.headers[VS.pollingIntervalHint]?parseInt(E.headers[VS.pollingIntervalHint].toString()):null;A._consecutiveErrors=0,n(_,E,v,b)}else A._onError("StatusCode:"+E.statusCode+" StatusMessage:"+E.statusMessage),n()}),h.on("error",function(E){A._onError(E),n()}),h.write(c),h.end(),[2]}})})},t.prototype._onError=function(e){this._consecutiveErrors++;var r="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%t.MAX_QPS_FAILURES_BEFORE_WARN===0?(r="Live Metrics endpoint could not be reached ".concat(this._consecutiveErrors," consecutive times. Most recent error:"),hXt.warn(t.TAG,r,e)):hXt.info(t.TAG,r,e)},t.TAG="QuickPulseSender",t.MAX_QPS_FAILURES_BEFORE_WARN=25,t})();UQn.exports=Gbs});var VQn=T((RIe,$Qn)=>{"use strict";f();var qQn=RIe&&RIe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},GQn=RIe&&RIe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0?this._pollingIntervalHint:t.PING_INTERVAL,o=this._isCollectingData?t.POST_INTERVAL:n,this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,o=t.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(o=t.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),o),this._handle.unref(),[2]}})})},t.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},t.prototype._post=function(e){return qQn(this,void 0,void 0,function(){return GQn(this,function(r){switch(r.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return r.sent(),[2]}})})},t.prototype._quickPulseDone=function(e,r,n,o){e!=null?(this._isCollectingData!==e&&(HQn.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,HQn.info("Redirecting endpoint to: ",n)),o&&o>0&&(this._pollingIntervalHint=o),r&&r.statusCode<300&&r.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},t.MAX_POST_WAIT_TIME=2e4,t.MAX_PING_WAIT_TIME=6e4,t.FALLBACK_INTERVAL=6e4,t.PING_INTERVAL=5e3,t.POST_INTERVAL=1e3,t})();$Qn.exports=$bs});var zQn=T(Ile=>{"use strict";f();var srt=Ile&&Ile.__assign||function(){return srt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)for(var l=0,u=s;l{"use strict";f();var YQn=cU&&cU.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},KQn=cU&&cU.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var Jbs=Dz(),XQn=ZJt(),Xbs=Kc(),ZQn=su(),Zbs=require("url"),eTs=sZe(),tTs=(function(){function t(e){this._endpointBase=ZQn.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var r=this._connectionString,n=XQn.parse(e),o=XQn.parse(r),s=!n.instrumentationkey&&Object.keys(n).length>0?null:e,c=this._instrumentationKey;this.instrumentationKey=n.instrumentationkey||s||o.instrumentationkey||c;var l="".concat(this.endpointUrl||n.ingestionendpoint||o.ingestionendpoint||this._endpointBase);l.endsWith("/")&&(l=l.slice(0,-1)),this.endpointUrl="".concat(l,"/v2.1/track"),this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||30*1e3,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=n.ingestionendpoint||o.ingestionendpoint||process.env[t.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||n.liveendpoint||o.liveendpoint||process.env[t.ENV_quickPulseHost]||ZQn.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new Zbs.URL(this.quickPulseHost).host),this.aadAudience=n.aadaudience||o.aadaudience}return a(t,"Config"),Object.defineProperty(t.prototype,"profileQueryEndpoint",{get:a(function(){return this._profileQueryEndpoint},"get"),set:a(function(e){this._profileQueryEndpoint=e,this.correlationId=Jbs.correlationIdPrefix},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instrumentationKey",{get:a(function(){return this._instrumentationKey},"get"),set:a(function(e){t._validateInstrumentationKey(e)||Xbs.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss",this.instrumentationKey),this._instrumentationKey=e},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webSnippetConnectionString",{get:a(function(){return this._webInstrumentationConnectionString},"get"),set:a(function(e){this._webInstrumentationConnectionString=e},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webInstrumentationConnectionString",{get:a(function(){return this._webInstrumentationConnectionString},"get"),set:a(function(e){this._webInstrumentationConnectionString=e},"set"),enumerable:!1,configurable:!0}),t.prototype._mergeConfig=function(){var e=eTs.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableLoggerErrorToTrace=e.enableLoggerErrorToTrace,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectIncomingRequestAzureFunctions=e.enableAutoCollectIncomingRequestAzureFunctions,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},t._validateInstrumentationKey=function(e){var r="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",n=new RegExp(r);return n.test(e)},t.ENV_azurePrefix="APPSETTING_",t.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",t.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",t.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",t.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",t})();eqn.exports=tTs});var _Xt=T(CXt=>{"use strict";f();Object.defineProperty(CXt,"__esModule",{value:!0});CXt.createEmptyPipeline=rTs;var tqn=new Set(["Deserialize","Serialize","Retry","Sign"]),EXt=class t{static{a(this,"HttpPipeline")}constructor(e){var r;this._policies=[],this._policies=(r=e?.slice(0))!==null&&r!==void 0?r:[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!tqn.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!tqn.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,c)=>l=>c.sendRequest(l,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(A){return{name:A,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}a(n,"createPhase");let o=n("Serialize"),s=n("None"),c=n("Deserialize"),l=n("Retry"),u=n("Sign"),d=[o,s,c,l,u];function p(A){return A==="Retry"?l:A==="Serialize"?o:A==="Deserialize"?c:A==="Sign"?u:s}a(p,"getPhase");for(let A of this._policies){let y=A.policy,E=A.options,_=y.name;if(r.has(_))throw new Error("Duplicate policy names not allowed in pipeline");let v={policy:y,dependsOn:new Set,dependants:new Set};E.afterPhase&&(v.afterPhase=p(E.afterPhase),v.afterPhase.hasAfterPolicies=!0),r.set(_,v),p(E.phase).policies.add(v)}for(let A of this._policies){let{policy:y,options:E}=A,_=y.name,v=r.get(_);if(!v)throw new Error(`Missing node for policy ${_}`);if(E.afterPolicies)for(let b of E.afterPolicies){let I=r.get(b);I&&(v.dependsOn.add(I),I.dependants.add(v))}if(E.beforePolicies)for(let b of E.beforePolicies){let I=r.get(b);I&&(I.dependsOn.add(v),v.dependants.add(I))}}function h(A){A.hasRun=!0;for(let y of A.policies)if(!(y.afterPhase&&(!y.afterPhase.hasRun||y.afterPhase.policies.size))&&y.dependsOn.size===0){e.push(y.policy);for(let E of y.dependants)E.dependsOn.delete(y);r.delete(y.policy.name),A.policies.delete(y)}}a(h,"walkPhase");function m(){for(let A of d){if(h(A),A.policies.size>0&&A!==s){s.hasRun||h(s);return}A.hasAfterPolicies&&h(s)}}a(m,"walkPhases");let g=0;for(;r.size>0;){g++;let A=e.length;if(m(),e.length<=A&&g>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function rTs(){return EXt.create()}a(rTs,"createEmptyPipeline")});var rY=T(crt=>{"use strict";f();Object.defineProperty(crt,"__esModule",{value:!0});crt.logger=void 0;var nTs=Iet();crt.logger=(0,nTs.createClientLogger)("core-rest-pipeline")});var bXt=T(vXt=>{"use strict";f();Object.defineProperty(vXt,"__esModule",{value:!0});vXt.getRandomIntegerInclusive=iTs;function iTs(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}a(iTs,"getRandomIntegerInclusive")});var rqn=T(TXt=>{"use strict";f();Object.defineProperty(TXt,"__esModule",{value:!0});TXt.calculateRetryDelay=sTs;var oTs=bXt();function sTs(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+(0,oTs.getRandomIntegerInclusive)(0,n/2)}}a(sTs,"calculateRetryDelay")});var lrt=T(SXt=>{"use strict";f();Object.defineProperty(SXt,"__esModule",{value:!0});SXt.isObject=aTs;function aTs(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(aTs,"isObject")});var nqn=T(IXt=>{"use strict";f();Object.defineProperty(IXt,"__esModule",{value:!0});IXt.isError=lTs;var cTs=lrt();function lTs(t){if((0,cTs.isObject)(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}a(lTs,"isError")});var oqn=T(urt=>{"use strict";f();Object.defineProperty(urt,"__esModule",{value:!0});urt.computeSha256Hmac=uTs;urt.computeSha256Hash=dTs;var iqn=require("node:crypto");async function uTs(t,e,r){let n=Buffer.from(t,"base64");return(0,iqn.createHmac)("sha256",n).update(e).digest(r)}a(uTs,"computeSha256Hmac");async function dTs(t,e){return(0,iqn.createHash)("sha256").update(t).digest(e)}a(dTs,"computeSha256Hash")});var sqn=T(wXt=>{"use strict";f();var xXt;Object.defineProperty(wXt,"__esModule",{value:!0});wXt.randomUUID=hTs;var fTs=require("node:crypto"),pTs=typeof((xXt=globalThis?.crypto)===null||xXt===void 0?void 0:xXt.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):fTs.randomUUID;function hTs(){return pTs()}a(hTs,"randomUUID")});var aqn=T(kp=>{"use strict";f();var RXt,PXt,kXt,NXt;Object.defineProperty(kp,"__esModule",{value:!0});kp.isReactNative=kp.isNodeRuntime=kp.isNodeLike=kp.isBun=kp.isDeno=kp.isWebWorker=kp.isBrowser=void 0;kp.isBrowser=typeof window<"u"&&typeof window.document<"u";kp.isWebWorker=typeof self=="object"&&typeof self?.importScripts=="function"&&(((RXt=self.constructor)===null||RXt===void 0?void 0:RXt.name)==="DedicatedWorkerGlobalScope"||((PXt=self.constructor)===null||PXt===void 0?void 0:PXt.name)==="ServiceWorkerGlobalScope"||((kXt=self.constructor)===null||kXt===void 0?void 0:kXt.name)==="SharedWorkerGlobalScope");kp.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";kp.isBun=typeof Bun<"u"&&typeof Bun.version<"u";kp.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((NXt=globalThis.process.versions)===null||NXt===void 0)&&NXt.node);kp.isNodeRuntime=kp.isNodeLike&&!kp.isBun&&!kp.isDeno;kp.isReactNative=typeof navigator<"u"&&navigator?.product==="ReactNative"});var cqn=T(drt=>{"use strict";f();Object.defineProperty(drt,"__esModule",{value:!0});drt.uint8ArrayToString=mTs;drt.stringToUint8Array=gTs;function mTs(t,e){return Buffer.from(t).toString(e)}a(mTs,"uint8ArrayToString");function gTs(t,e){return Buffer.from(t,e)}a(gTs,"stringToUint8Array")});var lqn=T(frt=>{"use strict";f();Object.defineProperty(frt,"__esModule",{value:!0});frt.Sanitizer=void 0;var ATs=lrt(),DXt="REDACTED",yTs=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],ETs=["api-version"],MXt=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=yTs.concat(e),r=ETs.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||(0,ATs.isObject)(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,DXt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=DXt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=DXt;return r}};frt.Sanitizer=MXt});var prt=T(Ns=>{"use strict";f();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.Sanitizer=Ns.uint8ArrayToString=Ns.stringToUint8Array=Ns.isWebWorker=Ns.isReactNative=Ns.isDeno=Ns.isNodeRuntime=Ns.isNodeLike=Ns.isBun=Ns.isBrowser=Ns.randomUUID=Ns.computeSha256Hmac=Ns.computeSha256Hash=Ns.isError=Ns.isObject=Ns.getRandomIntegerInclusive=Ns.calculateRetryDelay=void 0;var CTs=rqn();Object.defineProperty(Ns,"calculateRetryDelay",{enumerable:!0,get:a(function(){return CTs.calculateRetryDelay},"get")});var _Ts=bXt();Object.defineProperty(Ns,"getRandomIntegerInclusive",{enumerable:!0,get:a(function(){return _Ts.getRandomIntegerInclusive},"get")});var vTs=lrt();Object.defineProperty(Ns,"isObject",{enumerable:!0,get:a(function(){return vTs.isObject},"get")});var bTs=nqn();Object.defineProperty(Ns,"isError",{enumerable:!0,get:a(function(){return bTs.isError},"get")});var uqn=oqn();Object.defineProperty(Ns,"computeSha256Hash",{enumerable:!0,get:a(function(){return uqn.computeSha256Hash},"get")});Object.defineProperty(Ns,"computeSha256Hmac",{enumerable:!0,get:a(function(){return uqn.computeSha256Hmac},"get")});var TTs=sqn();Object.defineProperty(Ns,"randomUUID",{enumerable:!0,get:a(function(){return TTs.randomUUID},"get")});var nY=aqn();Object.defineProperty(Ns,"isBrowser",{enumerable:!0,get:a(function(){return nY.isBrowser},"get")});Object.defineProperty(Ns,"isBun",{enumerable:!0,get:a(function(){return nY.isBun},"get")});Object.defineProperty(Ns,"isNodeLike",{enumerable:!0,get:a(function(){return nY.isNodeLike},"get")});Object.defineProperty(Ns,"isNodeRuntime",{enumerable:!0,get:a(function(){return nY.isNodeRuntime},"get")});Object.defineProperty(Ns,"isDeno",{enumerable:!0,get:a(function(){return nY.isDeno},"get")});Object.defineProperty(Ns,"isReactNative",{enumerable:!0,get:a(function(){return nY.isReactNative},"get")});Object.defineProperty(Ns,"isWebWorker",{enumerable:!0,get:a(function(){return nY.isWebWorker},"get")});var dqn=cqn();Object.defineProperty(Ns,"stringToUint8Array",{enumerable:!0,get:a(function(){return dqn.stringToUint8Array},"get")});Object.defineProperty(Ns,"uint8ArrayToString",{enumerable:!0,get:a(function(){return dqn.uint8ArrayToString},"get")});var STs=lqn();Object.defineProperty(Ns,"Sanitizer",{enumerable:!0,get:a(function(){return STs.Sanitizer},"get")})});var fqn=T(OXt=>{"use strict";f();Object.defineProperty(OXt,"__esModule",{value:!0});OXt.cancelablePromiseRace=ITs;async function ITs(t,e){var r,n;let o=new AbortController;function s(){o.abort()}a(s,"abortHandler"),(r=e?.abortSignal)===null||r===void 0||r.addEventListener("abort",s);try{return await Promise.race(t.map(c=>c({abortSignal:o.signal})))}finally{o.abort(),(n=e?.abortSignal)===null||n===void 0||n.removeEventListener("abort",s)}}a(ITs,"cancelablePromiseRace")});var pqn=T(hrt=>{"use strict";f();Object.defineProperty(hrt,"__esModule",{value:!0});hrt.AbortError=void 0;var BXt=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};hrt.AbortError=BXt});var kIe=T(mrt=>{"use strict";f();Object.defineProperty(mrt,"__esModule",{value:!0});mrt.AbortError=void 0;var xTs=pqn();Object.defineProperty(mrt,"AbortError",{enumerable:!0,get:a(function(){return xTs.AbortError},"get")})});var FXt=T(LXt=>{"use strict";f();Object.defineProperty(LXt,"__esModule",{value:!0});LXt.createAbortablePromise=RTs;var wTs=kIe();function RTs(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,c)=>{function l(){c(new wTs.AbortError(o??"The operation was aborted."))}a(l,"rejectOnAbort");function u(){n?.removeEventListener("abort",d)}a(u,"removeListeners");function d(){r?.(),u(),l()}if(a(d,"onAbort"),n?.aborted)return l();try{t(p=>{u(),s(p)},p=>{u(),c(p)})}catch(p){c(p)}n?.addEventListener("abort",d)})}a(RTs,"createAbortablePromise")});var hqn=T(grt=>{"use strict";f();Object.defineProperty(grt,"__esModule",{value:!0});grt.delay=DTs;grt.calculateRetryDelay=MTs;var PTs=FXt(),kTs=prt(),NTs="The delay was aborted.";function DTs(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return(0,PTs.createAbortablePromise)(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:a(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??NTs})}a(DTs,"delay");function MTs(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+(0,kTs.getRandomIntegerInclusive)(0,n/2)}}a(MTs,"calculateRetryDelay")});var mqn=T(UXt=>{"use strict";f();Object.defineProperty(UXt,"__esModule",{value:!0});UXt.getErrorMessage=BTs;var OTs=prt();function BTs(t){if((0,OTs.isError)(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}a(BTs,"getErrorMessage")});var Aqn=T(NIe=>{"use strict";f();Object.defineProperty(NIe,"__esModule",{value:!0});NIe.isDefined=QXt;NIe.isObjectWithProperties=LTs;NIe.objectHasProperty=gqn;function QXt(t){return typeof t<"u"&&t!==null}a(QXt,"isDefined");function LTs(t,e){if(!QXt(t)||typeof t!="object")return!1;for(let r of e)if(!gqn(t,r))return!1;return!0}a(LTs,"isObjectWithProperties");function gqn(t,e){return QXt(t)&&typeof t=="object"&&e in t}a(gqn,"objectHasProperty")});var ED=T(Io=>{"use strict";f();Object.defineProperty(Io,"__esModule",{value:!0});Io.isWebWorker=Io.isReactNative=Io.isNodeRuntime=Io.isNodeLike=Io.isNode=Io.isDeno=Io.isBun=Io.isBrowser=Io.objectHasProperty=Io.isObjectWithProperties=Io.isDefined=Io.getErrorMessage=Io.delay=Io.createAbortablePromise=Io.cancelablePromiseRace=void 0;Io.calculateRetryDelay=HTs;Io.computeSha256Hash=jTs;Io.computeSha256Hmac=$Ts;Io.getRandomIntegerInclusive=VTs;Io.isError=WTs;Io.isObject=zTs;Io.randomUUID=YTs;Io.uint8ArrayToString=KTs;Io.stringToUint8Array=JTs;var FTs=(qM(),ba(i6)),Jm=FTs.__importStar(prt()),UTs=fqn();Object.defineProperty(Io,"cancelablePromiseRace",{enumerable:!0,get:a(function(){return UTs.cancelablePromiseRace},"get")});var QTs=FXt();Object.defineProperty(Io,"createAbortablePromise",{enumerable:!0,get:a(function(){return QTs.createAbortablePromise},"get")});var qTs=hqn();Object.defineProperty(Io,"delay",{enumerable:!0,get:a(function(){return qTs.delay},"get")});var GTs=mqn();Object.defineProperty(Io,"getErrorMessage",{enumerable:!0,get:a(function(){return GTs.getErrorMessage},"get")});var qXt=Aqn();Object.defineProperty(Io,"isDefined",{enumerable:!0,get:a(function(){return qXt.isDefined},"get")});Object.defineProperty(Io,"isObjectWithProperties",{enumerable:!0,get:a(function(){return qXt.isObjectWithProperties},"get")});Object.defineProperty(Io,"objectHasProperty",{enumerable:!0,get:a(function(){return qXt.objectHasProperty},"get")});function HTs(t,e){return Jm.calculateRetryDelay(t,e)}a(HTs,"calculateRetryDelay");function jTs(t,e){return Jm.computeSha256Hash(t,e)}a(jTs,"computeSha256Hash");function $Ts(t,e,r){return Jm.computeSha256Hmac(t,e,r)}a($Ts,"computeSha256Hmac");function VTs(t,e){return Jm.getRandomIntegerInclusive(t,e)}a(VTs,"getRandomIntegerInclusive");function WTs(t){return Jm.isError(t)}a(WTs,"isError");function zTs(t){return Jm.isObject(t)}a(zTs,"isObject");function YTs(){return Jm.randomUUID()}a(YTs,"randomUUID");Io.isBrowser=Jm.isBrowser;Io.isBun=Jm.isBun;Io.isDeno=Jm.isDeno;Io.isNode=Jm.isNodeLike;Io.isNodeLike=Jm.isNodeLike;Io.isNodeRuntime=Jm.isNodeRuntime;Io.isReactNative=Jm.isReactNative;Io.isWebWorker=Jm.isWebWorker;function KTs(t,e){return Jm.uint8ArrayToString(t,e)}a(KTs,"uint8ArrayToString");function JTs(t,e){return Jm.stringToUint8Array(t,e)}a(JTs,"stringToUint8Array")});var yrt=T(Art=>{"use strict";f();Object.defineProperty(Art,"__esModule",{value:!0});Art.Sanitizer=void 0;var XTs=ED(),GXt="REDACTED",ZTs=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],eSs=["api-version"],HXt=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=ZTs.concat(e),r=eSs.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||(0,XTs.isObject)(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,GXt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=GXt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=GXt;return r}};Art.Sanitizer=HXt});var jXt=T(xle=>{"use strict";f();Object.defineProperty(xle,"__esModule",{value:!0});xle.logPolicyName=void 0;xle.logPolicy=nSs;var tSs=rY(),rSs=yrt();xle.logPolicyName="logPolicy";function nSs(t={}){var e;let r=(e=t.logger)!==null&&e!==void 0?e:tSs.logger.info,n=new rSs.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:xle.logPolicyName,async sendRequest(o,s){if(!r.enabled)return s(o);r(`Request: ${n.sanitize(o)}`);let c=await s(o);return r(`Response status code: ${c.status}`),r(`Headers: ${n.sanitize(c.headers)}`),c}}}a(nSs,"logPolicy")});var $Xt=T(wle=>{"use strict";f();Object.defineProperty(wle,"__esModule",{value:!0});wle.redirectPolicyName=void 0;wle.redirectPolicy=iSs;wle.redirectPolicyName="redirectPolicy";var yqn=["GET","HEAD"];function iSs(t={}){let{maxRetries:e=20}=t;return{name:wle.redirectPolicyName,async sendRequest(r,n){let o=await n(r);return Eqn(n,o,e)}}}a(iSs,"redirectPolicy");async function Eqn(t,e,r,n=0){let{request:o,status:s,headers:c}=e,l=c.get("location");if(l&&(s===300||s===301&&yqn.includes(o.method)||s===302&&yqn.includes(o.method)||s===303&&o.method==="POST"||s===307)&&n{"use strict";f();Object.defineProperty(Ert,"__esModule",{value:!0});Ert.getHeaderName=oSs;Ert.setPlatformSpecificData=sSs;var Cqn=(qM(),ba(i6)),VXt=Cqn.__importStar(require("node:os")),WXt=Cqn.__importStar(require("node:process"));function oSs(){return"User-Agent"}a(oSs,"getHeaderName");async function sSs(t){if(WXt&&WXt.versions){let e=WXt.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${VXt.arch()}-${VXt.type()}-${VXt.release()})`)}a(sSs,"setPlatformSpecificData")});var lU=T(Rle=>{"use strict";f();Object.defineProperty(Rle,"__esModule",{value:!0});Rle.DEFAULT_RETRY_POLICY_COUNT=Rle.SDK_VERSION=void 0;Rle.SDK_VERSION="1.16.3";Rle.DEFAULT_RETRY_POLICY_COUNT=3});var zXt=T(Crt=>{"use strict";f();Object.defineProperty(Crt,"__esModule",{value:!0});Crt.getUserAgentHeaderName=lSs;Crt.getUserAgentValue=uSs;var vqn=_qn(),aSs=lU();function cSs(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}a(cSs,"getUserAgentString");function lSs(){return(0,vqn.getHeaderName)()}a(lSs,"getUserAgentHeaderName");async function uSs(t){let e=new Map;e.set("core-rest-pipeline",aSs.SDK_VERSION),await(0,vqn.setPlatformSpecificData)(e);let r=cSs(e);return t?`${t} ${r}`:r}a(uSs,"getUserAgentValue")});var YXt=T(Ple=>{"use strict";f();Object.defineProperty(Ple,"__esModule",{value:!0});Ple.userAgentPolicyName=void 0;Ple.userAgentPolicy=dSs;var Tqn=zXt(),bqn=(0,Tqn.getUserAgentHeaderName)();Ple.userAgentPolicyName="userAgentPolicy";function dSs(t={}){let e=(0,Tqn.getUserAgentValue)(t.userAgentPrefix);return{name:Ple.userAgentPolicyName,async sendRequest(r,n){return r.headers.has(bqn)||r.headers.set(bqn,await e),n(r)}}}a(dSs,"userAgentPolicy")});var _rt=T(kle=>{"use strict";f();Object.defineProperty(kle,"__esModule",{value:!0});kle.isNodeReadableStream=Sqn;kle.isWebReadableStream=Iqn;kle.isReadableStream=fSs;kle.isBlob=pSs;function Sqn(t){return!!(t&&typeof t.pipe=="function")}a(Sqn,"isNodeReadableStream");function Iqn(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}a(Iqn,"isWebReadableStream");function fSs(t){return Sqn(t)||Iqn(t)}a(fSs,"isReadableStream");function pSs(t){return typeof t.stream=="function"}a(pSs,"isBlob")});var KXt=T(DIe=>{"use strict";f();Object.defineProperty(DIe,"__esModule",{value:!0});DIe.getRawContent=ASs;DIe.createFileFromStream=ySs;DIe.createFile=ESs;var hSs=ED(),mSs=_rt(),xqn={arrayBuffer:a(()=>{throw new Error("Not implemented")},"arrayBuffer"),slice:a(()=>{throw new Error("Not implemented")},"slice"),text:a(()=>{throw new Error("Not implemented")},"text")},vrt=Symbol("rawContent");function gSs(t){return typeof t[vrt]=="function"}a(gSs,"hasRawContent");function ASs(t){return gSs(t)?t[vrt]():t.stream()}a(ASs,"getRawContent");function ySs(t,e,r={}){var n,o,s,c;return Object.assign(Object.assign({},xqn),{type:(n=r.type)!==null&&n!==void 0?n:"",lastModified:(o=r.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(s=r.webkitRelativePath)!==null&&s!==void 0?s:"",size:(c=r.size)!==null&&c!==void 0?c:-1,name:e,stream:a(()=>{let l=t();if((0,mSs.isNodeReadableStream)(l))throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");return l},"stream"),[vrt]:t})}a(ySs,"createFileFromStream");function ESs(t,e,r={}){var n,o,s;return hSs.isNodeLike?Object.assign(Object.assign({},xqn),{type:(n=r.type)!==null&&n!==void 0?n:"",lastModified:(o=r.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(s=r.webkitRelativePath)!==null&&s!==void 0?s:"",size:t.byteLength,name:e,arrayBuffer:a(async()=>t.buffer,"arrayBuffer"),stream:a(()=>new Blob([t]).stream(),"stream"),[vrt]:()=>t}):new File([t],e,r)}a(ESs,"createFile")});var Pqn=T(XXt=>{"use strict";f();Object.defineProperty(XXt,"__esModule",{value:!0});XXt.concat=TSs;var aB=(qM(),ba(i6)),JXt=require("node:stream"),CSs=_rt(),_Ss=KXt();function wqn(){return aB.__asyncGenerator(this,arguments,a(function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield aB.__await(e.read());if(r)return yield aB.__await(void 0);yield yield aB.__await(n)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}a(wqn,"streamAsyncIterator");function vSs(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=wqn.bind(t)),t.values||(t.values=wqn.bind(t))}a(vSs,"makeAsyncIterable");function bSs(t){return t instanceof ReadableStream?(vSs(t),JXt.Readable.fromWeb(t)):t}a(bSs,"ensureNodeStream");function Rqn(t){return t instanceof Uint8Array?JXt.Readable.from(Buffer.from(t)):(0,CSs.isBlob)(t)?Rqn((0,_Ss.getRawContent)(t)):bSs(t)}a(Rqn,"toStream");async function TSs(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(Rqn);return JXt.Readable.from((function(){return aB.__asyncGenerator(this,arguments,function*(){var r,n,o,s;for(let d of e)try{for(var c=!0,l=(n=void 0,aB.__asyncValues(d)),u;u=yield aB.__await(l.next()),r=u.done,!r;c=!0){s=u.value,c=!1;let p=s;yield yield aB.__await(p)}}catch(p){n={error:p}}finally{try{!c&&!r&&(o=l.return)&&(yield aB.__await(o.call(l)))}finally{if(n)throw n.error}}})})())}}a(TSs,"concat")});var ZXt=T(Nle=>{"use strict";f();Object.defineProperty(Nle,"__esModule",{value:!0});Nle.multipartPolicyName=void 0;Nle.multipartPolicy=OSs;var iY=ED(),SSs=Pqn(),ISs=_rt();function xSs(){return`----AzSDKFormBoundary${(0,iY.randomUUID)()}`}a(xSs,"generateBoundary");function wSs(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r -`;return e}a(wSs,"encodeHeaders");function RSs(t){return t instanceof Uint8Array?t.byteLength:(0,ISs.isBlob)(t)?t.size===-1?void 0:t.size:void 0}a(RSs,"getLength");function PSs(t){let e=0;for(let r of t){let n=RSs(r);if(n===void 0)return;e+=n}return e}a(PSs,"getTotalLength");async function kSs(t,e,r){let n=[(0,iY.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,iY.stringToUint8Array)(`\r -`,"utf-8"),(0,iY.stringToUint8Array)(wSs(s.headers),"utf-8"),(0,iY.stringToUint8Array)(`\r -`,"utf-8"),s.body,(0,iY.stringToUint8Array)(`\r ---${r}`,"utf-8")]),(0,iY.stringToUint8Array)(`--\r +`),r+=c;break}}})}catch{this._isEnabled=!1,sD.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return r},t.prototype._initialize=function(){this._isInitialized=!0;var e=sqn.createServer,r=aqn.createServer,n=this._isEnabled;sqn.createServer=function(o){var s=o;return s&&(o=a(function(c,l){var u=l.write,d=c.method=="GET";l.write=a(function(m,g,A){try{if(n&&d){var y=kS.getContentEncodingFromHeaders(l),E=void 0;if(typeof g=="string"&&(E=g),y==null)t.INSTANCE.ValidateInjection(l,m)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,void 0,E));else if(y.length){var _=y[0];arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,_)}}}catch(v){sD.warn("Inject snippet error: "+v)}return u.apply(l,arguments)},"wrap");var p=l.end;return l.end=a(function(m,g,A){if(n&&d)try{if(n&&d){var y=kS.getContentEncodingFromHeaders(l),E=void 0;if(typeof g=="string"&&(E=g),y==null)t.INSTANCE.ValidateInjection(l,m)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,void 0,E));else if(y.length){var _=y[0];arguments[0]=t.INSTANCE.InjectWebSnippet(l,m,_)}}}catch(v){sD.warn("Inject snipet error: "+v)}return p.apply(l,arguments)},"wrap"),s(c,l)},"requestListener")),e(o)},aqn.createServer=function(o,s){var c=s;if(c)return s=a(function(l,u){var d=l.method=="GET",p=u.write,h=u.end;return u.write=a(function(g,A,y){try{if(n&&d){var E=kS.getContentEncodingFromHeaders(u),_=void 0;if(typeof A=="string"&&(_=A),E==null)t.INSTANCE.ValidateInjection(u,g)&&(arguments[0]=this.InjectWebSnippet(u,g,void 0,_));else if(E.length){var v=E[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,v)}}}catch(b){sD.warn("Inject snippet error: "+b)}return p.apply(u,arguments)},"wrap"),u.end=a(function(g,A,y){try{if(n&&d){var E=kS.getContentEncodingFromHeaders(u),_=void 0;if(typeof A=="string"&&(_=A),E==null)t.INSTANCE.ValidateInjection(u,g)&&(arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,void 0,_));else if(E.length){var v=E[0];arguments[0]=t.INSTANCE.InjectWebSnippet(u,g,v)}}}catch(b){sD.warn("Inject snippet error: "+b)}return h.apply(u,arguments)},"wrap"),c(l,u)},"httpsRequestListener"),r(o,s)}},t.prototype.ValidateInjection=function(e,r){try{if(!e||!r||e.statusCode!=200)return!1;var n=kS.isContentTypeHeaderHtml(e);if(!n)return!1;var o=r.slice().toString();if(o.indexOf("")>=0&&o.indexOf("")>=0&&o.indexOf(t._aiUrl)<0&&o.indexOf(t._aiDeprecatedUrl)<0)return!0}catch(s){sD.info("validate injections error: "+s)}return!1},t.prototype.InjectWebSnippet=function(e,r,n,o){try{var s=!!n;if(s)e.removeHeader("Content-Length"),r=this._getInjectedCompressBuffer(e,r,n),e.setHeader("Content-Length",r.length);else{var c=r.toString(),l=c.indexOf("");if(l<0)return r;var u=kS.insertSnippetByIndex(l,c,t._snippet);if(typeof r=="string")e.removeHeader("Content-Length"),r=u,e.setHeader("Content-Length",Buffer.byteLength(r));else if(Buffer.isBuffer(r)){var d=o||"utf8",p=kS.isBufferType(r,d);if(p){e.removeHeader("Content-Length");var h=Buffer.from(u).toString(d);r=Buffer.from(h,d),e.setHeader("Content-Length",r.length)}}}}catch(m){sD.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+m)}return r},t.prototype._getInjectedCompressBuffer=function(e,r,n){try{switch(n){case kS.contentEncodingMethod.GZIP:var o=Mce.gunzipSync(r);if(this.ValidateInjection(e,o)){var s=this.InjectWebSnippet(e,o);r=Mce.gzipSync(s)}break;case kS.contentEncodingMethod.DEFLATE:var c=Mce.inflateSync(r);if(this.ValidateInjection(e,c)){var l=this.InjectWebSnippet(e,c);r=Mce.deflateSync(l)}break;case kS.contentEncodingMethod.BR:var u=kS.getBrotliDecompressSync(Mce),d=kS.getBrotliCompressSync(Mce);if(u&&d){var p=u(r);if(this.ValidateInjection(e,p)){var h=this.InjectWebSnippet(e,p);r=d(h)}break}}}catch(m){sD.info("get web injection compress buffer error: "+m)}return r},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1},t})();uqn.exports=LTs});var pqn=T((CXt,fqn)=>{"use strict";f();var FTs=CXt&&CXt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),DS=require("url"),_Xt=nA(),UTs=Lm(),QTs=uce(),qTs=XKt(),GTs=QW(),HTs=(function(t){FTs(e,t);function e(r,n){var o=t.call(this)||this;return n&&n.method&&r&&(o.method=n.method,o.url=e._getUrlFromRequestOptions(r,n),o.startTime=+new Date),o}return a(e,"HttpDependencyParser"),e.prototype.onError=function(r){this._setStatus(void 0,r)},e.prototype.onResponse=function(r){this._setStatus(r.statusCode,void 0),this.correlationId=UTs.getCorrelationContextTarget(r,QTs.requestContextTargetKey)},e.prototype.getDependencyTelemetry=function(r,n){var o=this.method.toUpperCase(),s=_Xt.RemoteDependencyDataConstants.TYPE_HTTP,c="";try{var l=new DS.URL(this.url);l.search=void 0,l.hash=void 0,o+=" "+l.pathname,c=l.hostname,l.port&&(c+=":"+l.port)}catch{}this.correlationId?(s=_Xt.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==GTs.correlationIdPrefix&&(c+=" | "+this.correlationId)):s=_Xt.RemoteDependencyDataConstants.TYPE_HTTP;var u={id:n,name:o,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:s,target:c};if(r&&r.time?u.time=r.time:this.startTime&&(u.time=new Date(this.startTime)),r){for(var d in r)u[d]||(u[d]=r[d]);if(r.properties)for(var d in r.properties)u.properties[d]=r.properties[d]}return u},e._getUrlFromRequestOptions=function(r,n){if(typeof r=="string")if(r.indexOf("http://")===0||r.indexOf("https://")===0)try{r=new DS.URL(r)}catch{}else try{var o=new DS.URL("http://"+r);o.port==="443"?r=new DS.URL("https://"+r):r=new DS.URL("http://"+r)}catch{}else{if(r&&typeof DS.URL=="function"&&r instanceof DS.URL)return DS.format(r);var s=r;r={},s&&Object.keys(s).forEach(function(u){r[u]=s[u]})}if(r.path&&r.host)try{var c=new DS.URL(r.path,"http://"+r.host+r.path);r.pathname=c.pathname,r.search=c.search}catch{}if(r.path&&r.hostname&&!r.host)try{var c=new DS.URL(r.path,"http://"+r.hostname+r.path);r.pathname=c.pathname,r.search=c.search}catch{}if(r.host&&r.port)try{var l=new DS.URL("http://".concat(r.host));!l.port&&r.port&&(r.hostname=r.host,delete r.host)}catch{}return r.protocol=r.protocol||n.agent&&n.agent.protocol||n.protocol||void 0,r.hostname=r.hostname||"localhost",DS.format(r)},e})(qTs);fqn.exports=HTs});var hqn=T(Oce=>{"use strict";f();var utt=Oce&&Oce.__assign||function(){return utt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var zTs=QO&&QO.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),YTs=QO&&QO.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),KTs=QO&&QO.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zTs(e,t,r);return YTs(e,t),e};Object.defineProperty(QO,"__esModule",{value:!0});QO.spanToTelemetryContract=nSs;var mqn=require("url"),$w=(Bi(),Aa(xO)),ko=(jZe(),Aa(cKt)),UO=KTs(Xl()),JTs=hqn(),XTs=Lm();function ZTs(t){for(var e={},r=0,n=Object.keys(t.attributes);r0&&(e["_MS.links"]=XTs.stringify(s)),e}a(ZTs,"createPropertiesFromSpan");function eSs(t){return t===ko.DbSystemValues.DB2||t===ko.DbSystemValues.DERBY||t===ko.DbSystemValues.MARIADB||t===ko.DbSystemValues.MSSQL||t===ko.DbSystemValues.ORACLE||t===ko.DbSystemValues.SQLITE||t===ko.DbSystemValues.OTHER_SQL||t===ko.DbSystemValues.HSQLDB||t===ko.DbSystemValues.H2}a(eSs,"isSqlDB");function gqn(t){var e=t.attributes[ko.SemanticAttributes.HTTP_METHOD];if(e){var r=t.attributes[ko.SemanticAttributes.HTTP_URL];if(r)return String(r);var n=t.attributes[ko.SemanticAttributes.HTTP_SCHEME],o=t.attributes[ko.SemanticAttributes.HTTP_TARGET];if(n&&o){var s=t.attributes[ko.SemanticAttributes.HTTP_HOST];if(s)return"".concat(n,"://").concat(s).concat(o);var c=t.attributes[ko.SemanticAttributes.NET_PEER_PORT];if(c){var l=t.attributes[ko.SemanticAttributes.NET_PEER_NAME];if(l)return"".concat(n,"://").concat(l,":").concat(c).concat(o);var u=t.attributes[ko.SemanticAttributes.NET_PEER_IP];if(u)return"".concat(n,"://").concat(u,":").concat(c).concat(o)}}}return""}a(gqn,"getUrl");function bXt(t){var e=t.attributes[ko.SemanticAttributes.PEER_SERVICE],r=t.attributes[ko.SemanticAttributes.HTTP_HOST],n=t.attributes[ko.SemanticAttributes.HTTP_URL],o=t.attributes[ko.SemanticAttributes.NET_PEER_NAME],s=t.attributes[ko.SemanticAttributes.NET_PEER_IP];return e?String(e):r?String(r):n?String(n):o?String(o):s?String(s):""}a(bXt,"getDependencyTarget");function tSs(t){var e={name:t.name,success:t.status.code!=$w.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};t.kind===$w.SpanKind.PRODUCER&&(e.dependencyTypeName=UO.DependencyTypeName.QueueMessage),t.kind===$w.SpanKind.INTERNAL&&t.parentSpanId&&(e.dependencyTypeName=UO.DependencyTypeName.InProc);var r=t.attributes[ko.SemanticAttributes.HTTP_METHOD],n=t.attributes[ko.SemanticAttributes.DB_SYSTEM],o=t.attributes[ko.SemanticAttributes.RPC_SYSTEM];if(r){e.dependencyTypeName=UO.DependencyTypeName.Http;var s=t.attributes[ko.SemanticAttributes.HTTP_URL];if(s){var c="";try{var l=new mqn.URL(String(s));c=l.pathname}catch{}e.name="".concat(r," ").concat(c)}e.data=gqn(t);var u=t.attributes[ko.SemanticAttributes.HTTP_STATUS_CODE];u&&(e.resultCode=String(u));var d=bXt(t);if(d){try{var p=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/),h=p.exec(d);if(h!=null){var m=h[1],g=h[3];(m=="https"&&g==":443"||m=="http"&&g==":80")&&(d=h[1]+h[2]+h[4])}}catch{}e.target="".concat(d)}}else if(n){String(n)===ko.DbSystemValues.MYSQL?e.dependencyTypeName="mysql":String(n)===ko.DbSystemValues.POSTGRESQL?e.dependencyTypeName="postgresql":String(n)===ko.DbSystemValues.MONGODB?e.dependencyTypeName="mongodb":String(n)===ko.DbSystemValues.REDIS?e.dependencyTypeName="redis":eSs(String(n))?e.dependencyTypeName="SQL":e.dependencyTypeName=String(n);var A=t.attributes[ko.SemanticAttributes.DB_STATEMENT],y=t.attributes[ko.SemanticAttributes.DB_OPERATION];A?e.data=String(A):y&&(e.data=String(y));var d=bXt(t),E=t.attributes[ko.SemanticAttributes.DB_NAME];d?e.target=E?"".concat(d,"|").concat(E):"".concat(d):e.target=E?"".concat(E):"".concat(n)}else if(o){e.dependencyTypeName=UO.DependencyTypeName.Grpc;var _=t.attributes[ko.SemanticAttributes.RPC_GRPC_STATUS_CODE];_&&(e.resultCode=String(_));var d=bXt(t);d?e.target="".concat(d):o&&(e.target=String(o))}return e}a(tSs,"createDependencyData");function rSs(t){var e={name:t.name,success:t.status.code!=$w.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},r=t.attributes[ko.SemanticAttributes.HTTP_METHOD],n=t.attributes[ko.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(r){if(t.kind==$w.SpanKind.SERVER){var o=t.attributes[ko.SemanticAttributes.HTTP_ROUTE],s=t.attributes[ko.SemanticAttributes.HTTP_URL];if(o)e.name="".concat(r," ").concat(o);else if(s)try{var c=new mqn.URL(String(s));e.name="".concat(r," ").concat(c.pathname)}catch{}}e.url=gqn(t);var l=t.attributes[ko.SemanticAttributes.HTTP_STATUS_CODE];l&&(e.resultCode=String(l))}else n&&(e.resultCode=String(n));return e}a(rSs,"createRequestData");function nSs(t){var e;switch(t.kind){case $w.SpanKind.CLIENT:case $w.SpanKind.PRODUCER:case $w.SpanKind.INTERNAL:e=tSs(t);break;case $w.SpanKind.SERVER:case $w.SpanKind.CONSUMER:e=rSs(t);break}var r=t.spanContext?t.spanContext():t.context(),n="".concat(r.spanId),o=Math.round(t.duration[0]*1e3+t.duration[1]/1e6);return e.id=n,e.duration=o,e.properties=ZTs(t),t.attributes[UO.AzNamespace]&&(t.kind===$w.SpanKind.INTERNAL&&(e.dependencyTypeName="".concat(UO.DependencyTypeName.InProc," | ").concat(t.attributes[UO.AzNamespace])),t.attributes[UO.AzNamespace]===UO.MicrosoftEventHub&&(0,JTs.parseEventHubSpan)(t,e)),e}a(nSs,"spanToTelemetryContract")});var Eqn=T(N7=>{"use strict";f();var Bce=N7&&N7.__assign||function(){return Bce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var oSs=Lv&&Lv.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sSs=Lv&&Lv.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aSs=Lv&&Lv.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oSs(e,t,r);return sSs(e,t),e};Object.defineProperty(Lv,"__esModule",{value:!0});Lv.subscriber=void 0;Lv.enable=fSs;var vSe=(Bi(),Aa(xO)),cSs=Xl(),TXt=Hd(),lSs=aSs(Aqn()),uSs=Eqn(),ZW=[],dSs=a(function(t){try{var e=t.data,r=lSs.spanToTelemetryContract(e);uSs.AsyncScopeManager.with(e,function(){ZW.forEach(function(n){e.kind===vSe.SpanKind.SERVER||e.kind===vSe.SpanKind.CONSUMER?n.trackRequest(r):(e.kind===vSe.SpanKind.CLIENT||e.kind===vSe.SpanKind.INTERNAL||e.kind===vSe.SpanKind.PRODUCER)&&n.trackDependency(r)})})}catch{}},"subscriber");Lv.subscriber=dSs;function fSs(t,e){if(t){var r=ZW.find(function(n){return n==e});if(r)return;ZW.length===0&&TXt.channel.subscribe("azure-coretracing",Lv.subscriber,TXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(cSs.StatsbeatInstrumentation.AZURE_CORE_TRACING)}),ZW.push(e)}else ZW=ZW.filter(function(n){return n!=e}),ZW.length===0&&TXt.channel.unsubscribe("azure-coretracing",Lv.subscriber)}a(fSs,"enable")});var Cqn=T(tz=>{"use strict";f();Object.defineProperty(tz,"__esModule",{value:!0});tz.subscriber=void 0;tz.enable=mSs;var pSs=Xl(),SXt=Hd(),ez=[],hSs=a(function(t){t.data.event.commandName!=="ismaster"&&ez.forEach(function(e){var r=t.data.startedData&&t.data.startedData.databaseName||"Unknown database";e.trackDependency({target:r,data:t.data.event.commandName,name:t.data.event.commandName,duration:t.data.event.duration,success:t.data.succeeded,resultCode:t.data.succeeded?"0":"1",time:t.data.startedData.time,dependencyTypeName:"mongodb"})})},"subscriber");tz.subscriber=hSs;function mSs(t,e){if(t){var r=ez.find(function(n){return n==e});if(r)return;ez.length===0&&SXt.channel.subscribe("mongodb",tz.subscriber,SXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(pSs.StatsbeatInstrumentation.MONGODB)}),ez.push(e)}else ez=ez.filter(function(n){return n!=e}),ez.length===0&&SXt.channel.unsubscribe("mongodb",tz.subscriber)}a(mSs,"enable")});var vqn=T(nz=>{"use strict";f();Object.defineProperty(nz,"__esModule",{value:!0});nz.subscriber=void 0;nz.enable=ySs;var gSs=Xl(),IXt=Hd(),rz=[],ASs=a(function(t){rz.forEach(function(e){var r=t.data.query||{},n=r.sql||"Unknown query",o=!t.data.err,s=r._connection||{},c=s.config||{},l=c.socketPath?c.socketPath:"".concat(c.host||"localhost",":").concat(c.port);e.trackDependency({target:l,data:n,name:n,duration:t.data.duration,success:o,resultCode:o?"0":"1",time:t.data.time,dependencyTypeName:"mysql"})})},"subscriber");nz.subscriber=ASs;function ySs(t,e){if(t){var r=rz.find(function(n){return n==e});if(r)return;rz.length===0&&IXt.channel.subscribe("mysql",nz.subscriber,IXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(gSs.StatsbeatInstrumentation.MYSQL)}),rz.push(e)}else rz=rz.filter(function(n){return n!=e}),rz.length===0&&IXt.channel.unsubscribe("mysql",nz.subscriber)}a(ySs,"enable")});var bqn=T(oz=>{"use strict";f();Object.defineProperty(oz,"__esModule",{value:!0});oz.subscriber=void 0;oz.enable=CSs;var ESs=Xl(),xXt=Hd(),iz=[],_Ss=a(function(t){iz.forEach(function(e){t.data.commandObj.command!=="info"&&e.trackDependency({target:t.data.address,name:t.data.commandObj.command,data:t.data.commandObj.command,duration:t.data.duration,success:!t.data.err,resultCode:t.data.err?"1":"0",time:t.data.time,dependencyTypeName:"redis"})})},"subscriber");oz.subscriber=_Ss;function CSs(t,e){if(t){var r=iz.find(function(n){return n==e});if(r)return;iz.length===0&&xXt.channel.subscribe("redis",oz.subscriber,xXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(ESs.StatsbeatInstrumentation.REDIS)}),iz.push(e)}else iz=iz.filter(function(n){return n!=e}),iz.length===0&&xXt.channel.unsubscribe("redis",oz.subscriber)}a(CSs,"enable")});var Tqn=T(az=>{"use strict";f();Object.defineProperty(az,"__esModule",{value:!0});az.subscriber=void 0;az.enable=TSs;var vSs=Xl(),wXt=Hd(),sz=[],bSs=a(function(t){sz.forEach(function(e){var r=t.data.query,n=r.preparable&&r.preparable.text||r.plan||r.text||"unknown query",o=!t.data.error,s="".concat(t.data.database.host,":").concat(t.data.database.port);e.trackDependency({target:s,data:n,name:n,duration:t.data.duration,success:o,resultCode:o?"0":"1",time:t.data.time,dependencyTypeName:"postgres"})})},"subscriber");az.subscriber=bSs;function TSs(t,e){if(t){var r=sz.find(function(n){return n==e});if(r)return;sz.length===0&&wXt.channel.subscribe("postgres",az.subscriber,wXt.trueFilter,function(n,o){var s=e.getStatsbeat();s&&s.addInstrumentation(vSs.StatsbeatInstrumentation.POSTGRES)}),sz.push(e)}else sz=sz.filter(function(n){return n!=e}),sz.length===0&&wXt.channel.unsubscribe("postgres",az.subscriber)}a(TSs,"enable")});var Uce=T((qO,Sqn)=>{"use strict";f();var SSs=qO&&qO.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ISs=qO&&qO.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xSs=qO&&qO.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&SSs(e,t,r);return ISs(e,t),e},dtt=qO&&qO.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n{"use strict";f();var Iqn=require("http"),xqn=require("https"),wqn=Hc(),Rqn=Lm(),kSs=uce(),PXt=rJt(),GO=w7(),DSs=itt(),NSs=(function(){function t(e){if(t.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");t.INSTANCE=this,this._client=e}return a(t,"AutoCollectHttpRequests"),t.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||DSs.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},t.prototype.useAutoCorrelation=function(e,r){e&&!this._isAutoCorrelating?GO.CorrelationContextManager.enable(r):!e&&this._isAutoCorrelating&&GO.CorrelationContextManager.disable(),this._isAutoCorrelating=e},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},t.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return GO.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},t.prototype._registerRequest=function(e,r,n){var o=this,s=new PXt(e),c=this._generateCorrelationContext(s);GO.CorrelationContextManager.runWithContext(c,function(){o._isEnabled&&(e[t.alreadyAutoCollectedFlag]=!0,t.trackRequest(o._client,{request:e,response:r},s)),typeof n=="function"&&n(e,r)})},t.prototype._initialize=function(){if(this._isInitialized=!0,!t.HANDLER_READY){t.HANDLER_READY=!0;var e=a(function(s){if(s){if(typeof s!="function")throw new Error("onRequest handler must be a function");return function(c,l){GO.CorrelationContextManager.wrapEmitter(c),GO.CorrelationContextManager.wrapEmitter(l);var u=c&&!c[t.alreadyAutoCollectedFlag];c&&u&&t.INSTANCE?t.INSTANCE._registerRequest(c,l,s):s(c,l)}}},"wrapOnRequestHandler"),r=a(function(s){var c=s.addListener.bind(s);s.addListener=function(l,u){switch(l){case"request":case"checkContinue":return c(l,e(u));default:return c(l,u)}},s.on=s.addListener},"wrapServerEventHandler"),n=Iqn.createServer;Iqn.createServer=function(s,c){if(c&&typeof c=="function"){var l=n(s,e(c));return r(l),l}else{var l=n(e(s));return r(l),l}};var o=xqn.createServer;xqn.createServer=function(s,c){var l=o(s,e(c));return r(l),l}}},t.trackRequestSync=function(e,r){if(!r.request||!r.response||!e){wqn.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!r.request,!r.response,!e);return}r.isProcessed=!1,t.addResponseCorrelationIdHeader(e,r.response);var n=GO.CorrelationContextManager.getCurrentContext(),o=new PXt(r.request,n&&n.operation.parentId);n&&(n.operation.id=o.getOperationId(e.context.tags)||n.operation.id,n.operation.name=o.getOperationName(e.context.tags)||n.operation.name,n.operation.parentId=o.getRequestId()||n.operation.parentId,n.customProperties.addHeaderData(o.getCorrelationContextHeader())),t.endRequest(e,o,r,r.duration,r.error)},t.trackRequest=function(e,r,n){if(!r.request||!r.response||!e){wqn.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!r.request,!r.response,!e);return}r.isProcessed=!1;var o=GO.CorrelationContextManager.getCurrentContext(),s=n||new PXt(r.request,o&&o.operation.parentId);Rqn.canIncludeCorrelationHeader(e,s.getUrl())&&t.addResponseCorrelationIdHeader(e,r.response),o&&!n&&(o.operation.id=s.getOperationId(e.context.tags)||o.operation.id,o.operation.name=s.getOperationName(e.context.tags)||o.operation.name,o.operation.parentId=s.getOperationParentId(e.context.tags)||o.operation.parentId,o.customProperties.addHeaderData(s.getCorrelationContextHeader())),r.response.once&&r.response.once("finish",function(){t.endRequest(e,s,r,null,null)}),r.request.on&&r.request.on("error",function(c){t.endRequest(e,s,r,null,c)}),r.request.on&&r.request.on("aborted",function(){var c="The request has been aborted and the network socket has closed.";t.endRequest(e,s,r,null,c)})},t.addResponseCorrelationIdHeader=function(e,r){if(e.config&&e.config.correlationId&&r.getHeader&&r.setHeader&&!r.headersSent){var n=r.getHeader(kSs.requestContextHeader);Rqn.safeIncludeCorrelationHeader(e,r,n)}},t.endRequest=function(e,r,n,o,s){if(!n.isProcessed){n.isProcessed=!0,s?r.onError(s,o):r.onResponse(n.response,o);var c=r.getRequestTelemetry(n);if(c.tagOverrides=r.getRequestTags(e.context.tags),n.tagOverrides)for(var l in n.tagOverrides)c.tagOverrides[l]=n.tagOverrides[l];var u=r.getLegacyRootId();u&&(c.properties.ai_legacyRootId=u),c.contextObjects=c.contextObjects||{},c.contextObjects["http.ServerRequest"]=n.request,c.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(c)}},t.prototype.dispose=function(){t.INSTANCE=null,this.enable(!1),this._isInitialized=!1,GO.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},t.HANDLER_READY=!1,t.alreadyAutoCollectedFlag="_appInsightsAutoCollected",t})();Pqn.exports=NSs});var Nqn=T((NXt,Dqn)=>{"use strict";f();var NS=NXt&&NXt.__assign||function(){return NS=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0?r:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date(".concat(Date.now(),")/"),Version:o.tags[o.keys.internalSdkVersion],StreamId:BSs,MachineName:s,Instance:c,RoleName:l};return u},t.createQuickPulseMetric=function(e){var r;return r={Name:e.name,Value:e.value,Weight:e.count||1},r},t.telemetryEnvelopeToQuickPulseDocument=function(e){switch(e.data.baseType){case cz.TelemetryTypeString.Event:return t.createQuickPulseEventDocument(e);case cz.TelemetryTypeString.Exception:return t.createQuickPulseExceptionDocument(e);case cz.TelemetryTypeString.Trace:return t.createQuickPulseTraceDocument(e);case cz.TelemetryTypeString.Dependency:return t.createQuickPulseDependencyDocument(e);case cz.TelemetryTypeString.Request:return t.createQuickPulseRequestDocument(e)}return null},t.createQuickPulseEventDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.name,o=NS(NS({},r),{Name:n});return o},t.createQuickPulseTraceDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.severityLevel||0,o=NS(NS({},r),{Message:e.data.baseData.message,SeverityLevel:cz.SeverityLevel[n]});return o},t.createQuickPulseExceptionDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData.exceptions,o="",s="",c="";n&&n.length>0&&(n[0].parsedStack&&n[0].parsedStack.length>0?n[0].parsedStack.forEach(function(u){o+=u.assembly+` +`}):n[0].stack&&n[0].stack.length>0&&(o=n[0].stack),s=n[0].message,c=n[0].typeName);var l=NS(NS({},r),{Exception:o,ExceptionMessage:s,ExceptionType:c});return l},t.createQuickPulseRequestDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData,o=NS(NS({},r),{Name:n.name,Success:n.success,Duration:n.duration,ResponseCode:n.responseCode,OperationName:n.name});return o},t.createQuickPulseDependencyDocument=function(e){var r=t.createQuickPulseDocument(e),n=e.data.baseData,o=NS(NS({},r),{Name:n.name,Target:n.target,Success:n.success,Duration:n.duration,ResultCode:n.resultCode,CommandName:n.data,OperationName:r.OperationId,DependencyTypeName:n.type});return o},t.createQuickPulseDocument=function(e){var r,n,o,s;e.data.baseType?(n=kqn.TelemetryTypeStringToQuickPulseType[e.data.baseType],r=kqn.TelemetryTypeStringToQuickPulseDocumentType[e.data.baseType]):OSs.warn("Document type invalid; not sending live metric document",e.data.baseType),o=e.tags[t.keys.operationId],s=t.aggregateProperties(e);var c={DocumentType:r,__type:n,OperationId:o,Version:"1.0",Properties:s};return c},t.aggregateProperties=function(e){var r=[],n=e.data.baseData.measurements||{};for(var o in n)if(n.hasOwnProperty(o)){var s=n[o],c={key:o,value:s};r.push(c)}var l=e.data.baseData.properties||{};for(var o in l)if(l.hasOwnProperty(o)){var s=l[o],c={key:o,value:s};r.push(c)}return r},t.keys=new cz.ContextTagKeys,t})();Dqn.exports=LSs});var Oqn=T((W2d,Mqn)=>{"use strict";f();var FSs=a(function(){return(Date.now()+621355968e5)*1e4},"getTransmissionTime");Mqn.exports={getTransmissionTime:FSs}});var Uqn=T((SSe,Fqn)=>{"use strict";f();var Bqn=SSe&&SSe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Lqn=SSe&&SSe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0?r:this._config.quickPulseHost,m.method=MS.method,m.path="/QuickPulseService.svc/".concat(o,"?ikey=").concat(this._config.instrumentationKey),m.headers=(g={Expect:"100-continue"},g[MS.time]=qSs.getTransmissionTime(),g["Content-Type"]="application/json",g["Content-Length"]=Buffer.byteLength(c),g),m),s&&s.length>0&&s.forEach(function(E){return l.headers[E.name]=E.value}),o!=="post")return[3,4];if(u=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!u)return[3,4];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,u.addAuthorizationHeader(l)];case 2:return y.sent(),[3,4];case 3:return d=y.sent(),p="Failed to get AAD bearer token for the Application. Error:",MXt.info(t.TAG,p,d),[2];case 4:return this._config.httpsAgent?l.agent=this._config.httpsAgent:l.agent=OXt.tlsRestrictedAgent,h=USs.request(l,function(E){if(E.statusCode==200){var _=E.headers[MS.subscribed]==="true",v=null;try{v=E.headers[MS.endpointRedirect]?new GSs.URL(E.headers[MS.endpointRedirect].toString()).host:null}catch(I){A._onError("Failed to parse redirect header from QuickPulse: "+OXt.dumpObj(I))}var b=E.headers[MS.pollingIntervalHint]?parseInt(E.headers[MS.pollingIntervalHint].toString()):null;A._consecutiveErrors=0,n(_,E,v,b)}else A._onError("StatusCode:"+E.statusCode+" StatusMessage:"+E.statusMessage),n()}),h.on("error",function(E){A._onError(E),n()}),h.write(c),h.end(),[2]}})})},t.prototype._onError=function(e){this._consecutiveErrors++;var r="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%t.MAX_QPS_FAILURES_BEFORE_WARN===0?(r="Live Metrics endpoint could not be reached ".concat(this._consecutiveErrors," consecutive times. Most recent error:"),MXt.warn(t.TAG,r,e)):MXt.info(t.TAG,r,e)},t.TAG="QuickPulseSender",t.MAX_QPS_FAILURES_BEFORE_WARN=25,t})();Fqn.exports=HSs});var $qn=T((ISe,jqn)=>{"use strict";f();var Qqn=ISe&&ISe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},qqn=ISe&&ISe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0?this._pollingIntervalHint:t.PING_INTERVAL,o=this._isCollectingData?t.POST_INTERVAL:n,this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,o=t.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=t.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(o=t.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),o),this._handle.unref(),[2]}})})},t.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},t.prototype._post=function(e){return Qqn(this,void 0,void 0,function(){return qqn(this,function(r){switch(r.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return r.sent(),[2]}})})},t.prototype._quickPulseDone=function(e,r,n,o){e!=null?(this._isCollectingData!==e&&(Gqn.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,Gqn.info("Redirecting endpoint to: ",n)),o&&o>0&&(this._pollingIntervalHint=o),r&&r.statusCode<300&&r.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},t.MAX_POST_WAIT_TIME=2e4,t.MAX_PING_WAIT_TIME=6e4,t.FALLBACK_INTERVAL=6e4,t.PING_INTERVAL=5e3,t.POST_INTERVAL=1e3,t})();jqn.exports=VSs});var Wqn=T(Qce=>{"use strict";f();var htt=Qce&&Qce.__assign||function(){return htt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)for(var l=0,u=s;l{"use strict";f();var zqn=O7&&O7.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Yqn=O7&&O7.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var XSs=QW(),Jqn=EXt(),ZSs=Hc(),Xqn=Xl(),eIs=require("url"),tIs=hXe(),rIs=(function(){function t(e){this._endpointBase=Xqn.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var r=this._connectionString,n=Jqn.parse(e),o=Jqn.parse(r),s=!n.instrumentationkey&&Object.keys(n).length>0?null:e,c=this._instrumentationKey;this.instrumentationKey=n.instrumentationkey||s||o.instrumentationkey||c;var l="".concat(this.endpointUrl||n.ingestionendpoint||o.ingestionendpoint||this._endpointBase);l.endsWith("/")&&(l=l.slice(0,-1)),this.endpointUrl="".concat(l,"/v2.1/track"),this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||30*1e3,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=n.ingestionendpoint||o.ingestionendpoint||process.env[t.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||n.liveendpoint||o.liveendpoint||process.env[t.ENV_quickPulseHost]||Xqn.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new eIs.URL(this.quickPulseHost).host),this.aadAudience=n.aadaudience||o.aadaudience}return a(t,"Config"),Object.defineProperty(t.prototype,"profileQueryEndpoint",{get:a(function(){return this._profileQueryEndpoint},"get"),set:a(function(e){this._profileQueryEndpoint=e,this.correlationId=XSs.correlationIdPrefix},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instrumentationKey",{get:a(function(){return this._instrumentationKey},"get"),set:a(function(e){t._validateInstrumentationKey(e)||ZSs.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss",this.instrumentationKey),this._instrumentationKey=e},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webSnippetConnectionString",{get:a(function(){return this._webInstrumentationConnectionString},"get"),set:a(function(e){this._webInstrumentationConnectionString=e},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webInstrumentationConnectionString",{get:a(function(){return this._webInstrumentationConnectionString},"get"),set:a(function(e){this._webInstrumentationConnectionString=e},"set"),enumerable:!1,configurable:!0}),t.prototype._mergeConfig=function(){var e=tIs.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableLoggerErrorToTrace=e.enableLoggerErrorToTrace,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectIncomingRequestAzureFunctions=e.enableAutoCollectIncomingRequestAzureFunctions,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},t._validateInstrumentationKey=function(e){var r="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",n=new RegExp(r);return n.test(e)},t.ENV_azurePrefix="APPSETTING_",t.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",t.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",t.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",t.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",t})();Zqn.exports=rIs});var qXt=T(QXt=>{"use strict";f();Object.defineProperty(QXt,"__esModule",{value:!0});QXt.createEmptyPipeline=nIs;var eGn=new Set(["Deserialize","Serialize","Retry","Sign"]),UXt=class t{static{a(this,"HttpPipeline")}constructor(e){var r;this._policies=[],this._policies=(r=e?.slice(0))!==null&&r!==void 0?r:[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!eGn.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!eGn.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,c)=>l=>c.sendRequest(l,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(A){return{name:A,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}a(n,"createPhase");let o=n("Serialize"),s=n("None"),c=n("Deserialize"),l=n("Retry"),u=n("Sign"),d=[o,s,c,l,u];function p(A){return A==="Retry"?l:A==="Serialize"?o:A==="Deserialize"?c:A==="Sign"?u:s}a(p,"getPhase");for(let A of this._policies){let y=A.policy,E=A.options,_=y.name;if(r.has(_))throw new Error("Duplicate policy names not allowed in pipeline");let v={policy:y,dependsOn:new Set,dependants:new Set};E.afterPhase&&(v.afterPhase=p(E.afterPhase),v.afterPhase.hasAfterPolicies=!0),r.set(_,v),p(E.phase).policies.add(v)}for(let A of this._policies){let{policy:y,options:E}=A,_=y.name,v=r.get(_);if(!v)throw new Error(`Missing node for policy ${_}`);if(E.afterPolicies)for(let b of E.afterPolicies){let I=r.get(b);I&&(v.dependsOn.add(I),I.dependants.add(v))}if(E.beforePolicies)for(let b of E.beforePolicies){let I=r.get(b);I&&(I.dependsOn.add(v),v.dependants.add(I))}}function h(A){A.hasRun=!0;for(let y of A.policies)if(!(y.afterPhase&&(!y.afterPhase.hasRun||y.afterPhase.policies.size))&&y.dependsOn.size===0){e.push(y.policy);for(let E of y.dependants)E.dependsOn.delete(y);r.delete(y.policy.name),A.policies.delete(y)}}a(h,"walkPhase");function m(){for(let A of d){if(h(A),A.policies.size>0&&A!==s){s.hasRun||h(s);return}A.hasAfterPolicies&&h(s)}}a(m,"walkPhases");let g=0;for(;r.size>0;){g++;let A=e.length;if(m(),e.length<=A&&g>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function nIs(){return UXt.create()}a(nIs,"createEmptyPipeline")});var lz=T(gtt=>{"use strict";f();Object.defineProperty(gtt,"__esModule",{value:!0});gtt.logger=void 0;var iIs=DZe();gtt.logger=(0,iIs.createClientLogger)("core-rest-pipeline")});var HXt=T(GXt=>{"use strict";f();Object.defineProperty(GXt,"__esModule",{value:!0});GXt.getRandomIntegerInclusive=oIs;function oIs(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}a(oIs,"getRandomIntegerInclusive")});var tGn=T(jXt=>{"use strict";f();Object.defineProperty(jXt,"__esModule",{value:!0});jXt.calculateRetryDelay=aIs;var sIs=HXt();function aIs(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+(0,sIs.getRandomIntegerInclusive)(0,n/2)}}a(aIs,"calculateRetryDelay")});var Att=T($Xt=>{"use strict";f();Object.defineProperty($Xt,"__esModule",{value:!0});$Xt.isObject=cIs;function cIs(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(cIs,"isObject")});var rGn=T(VXt=>{"use strict";f();Object.defineProperty(VXt,"__esModule",{value:!0});VXt.isError=uIs;var lIs=Att();function uIs(t){if((0,lIs.isObject)(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}a(uIs,"isError")});var iGn=T(ytt=>{"use strict";f();Object.defineProperty(ytt,"__esModule",{value:!0});ytt.computeSha256Hmac=dIs;ytt.computeSha256Hash=fIs;var nGn=require("node:crypto");async function dIs(t,e,r){let n=Buffer.from(t,"base64");return(0,nGn.createHmac)("sha256",n).update(e).digest(r)}a(dIs,"computeSha256Hmac");async function fIs(t,e){return(0,nGn.createHash)("sha256").update(t).digest(e)}a(fIs,"computeSha256Hash")});var oGn=T(zXt=>{"use strict";f();var WXt;Object.defineProperty(zXt,"__esModule",{value:!0});zXt.randomUUID=mIs;var pIs=require("node:crypto"),hIs=typeof((WXt=globalThis?.crypto)===null||WXt===void 0?void 0:WXt.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):pIs.randomUUID;function mIs(){return hIs()}a(mIs,"randomUUID")});var sGn=T(Sp=>{"use strict";f();var YXt,KXt,JXt,XXt;Object.defineProperty(Sp,"__esModule",{value:!0});Sp.isReactNative=Sp.isNodeRuntime=Sp.isNodeLike=Sp.isBun=Sp.isDeno=Sp.isWebWorker=Sp.isBrowser=void 0;Sp.isBrowser=typeof window<"u"&&typeof window.document<"u";Sp.isWebWorker=typeof self=="object"&&typeof self?.importScripts=="function"&&(((YXt=self.constructor)===null||YXt===void 0?void 0:YXt.name)==="DedicatedWorkerGlobalScope"||((KXt=self.constructor)===null||KXt===void 0?void 0:KXt.name)==="ServiceWorkerGlobalScope"||((JXt=self.constructor)===null||JXt===void 0?void 0:JXt.name)==="SharedWorkerGlobalScope");Sp.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";Sp.isBun=typeof Bun<"u"&&typeof Bun.version<"u";Sp.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((XXt=globalThis.process.versions)===null||XXt===void 0)&&XXt.node);Sp.isNodeRuntime=Sp.isNodeLike&&!Sp.isBun&&!Sp.isDeno;Sp.isReactNative=typeof navigator<"u"&&navigator?.product==="ReactNative"});var aGn=T(Ett=>{"use strict";f();Object.defineProperty(Ett,"__esModule",{value:!0});Ett.uint8ArrayToString=gIs;Ett.stringToUint8Array=AIs;function gIs(t,e){return Buffer.from(t).toString(e)}a(gIs,"uint8ArrayToString");function AIs(t,e){return Buffer.from(t,e)}a(AIs,"stringToUint8Array")});var cGn=T(_tt=>{"use strict";f();Object.defineProperty(_tt,"__esModule",{value:!0});_tt.Sanitizer=void 0;var yIs=Att(),ZXt="REDACTED",EIs=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],_Is=["api-version"],eZt=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=EIs.concat(e),r=_Is.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||(0,yIs.isObject)(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,ZXt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=ZXt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=ZXt;return r}};_tt.Sanitizer=eZt});var Ctt=T(Is=>{"use strict";f();Object.defineProperty(Is,"__esModule",{value:!0});Is.Sanitizer=Is.uint8ArrayToString=Is.stringToUint8Array=Is.isWebWorker=Is.isReactNative=Is.isDeno=Is.isNodeRuntime=Is.isNodeLike=Is.isBun=Is.isBrowser=Is.randomUUID=Is.computeSha256Hmac=Is.computeSha256Hash=Is.isError=Is.isObject=Is.getRandomIntegerInclusive=Is.calculateRetryDelay=void 0;var CIs=tGn();Object.defineProperty(Is,"calculateRetryDelay",{enumerable:!0,get:a(function(){return CIs.calculateRetryDelay},"get")});var vIs=HXt();Object.defineProperty(Is,"getRandomIntegerInclusive",{enumerable:!0,get:a(function(){return vIs.getRandomIntegerInclusive},"get")});var bIs=Att();Object.defineProperty(Is,"isObject",{enumerable:!0,get:a(function(){return bIs.isObject},"get")});var TIs=rGn();Object.defineProperty(Is,"isError",{enumerable:!0,get:a(function(){return TIs.isError},"get")});var lGn=iGn();Object.defineProperty(Is,"computeSha256Hash",{enumerable:!0,get:a(function(){return lGn.computeSha256Hash},"get")});Object.defineProperty(Is,"computeSha256Hmac",{enumerable:!0,get:a(function(){return lGn.computeSha256Hmac},"get")});var SIs=oGn();Object.defineProperty(Is,"randomUUID",{enumerable:!0,get:a(function(){return SIs.randomUUID},"get")});var uz=sGn();Object.defineProperty(Is,"isBrowser",{enumerable:!0,get:a(function(){return uz.isBrowser},"get")});Object.defineProperty(Is,"isBun",{enumerable:!0,get:a(function(){return uz.isBun},"get")});Object.defineProperty(Is,"isNodeLike",{enumerable:!0,get:a(function(){return uz.isNodeLike},"get")});Object.defineProperty(Is,"isNodeRuntime",{enumerable:!0,get:a(function(){return uz.isNodeRuntime},"get")});Object.defineProperty(Is,"isDeno",{enumerable:!0,get:a(function(){return uz.isDeno},"get")});Object.defineProperty(Is,"isReactNative",{enumerable:!0,get:a(function(){return uz.isReactNative},"get")});Object.defineProperty(Is,"isWebWorker",{enumerable:!0,get:a(function(){return uz.isWebWorker},"get")});var uGn=aGn();Object.defineProperty(Is,"stringToUint8Array",{enumerable:!0,get:a(function(){return uGn.stringToUint8Array},"get")});Object.defineProperty(Is,"uint8ArrayToString",{enumerable:!0,get:a(function(){return uGn.uint8ArrayToString},"get")});var IIs=cGn();Object.defineProperty(Is,"Sanitizer",{enumerable:!0,get:a(function(){return IIs.Sanitizer},"get")})});var dGn=T(tZt=>{"use strict";f();Object.defineProperty(tZt,"__esModule",{value:!0});tZt.cancelablePromiseRace=xIs;async function xIs(t,e){var r,n;let o=new AbortController;function s(){o.abort()}a(s,"abortHandler"),(r=e?.abortSignal)===null||r===void 0||r.addEventListener("abort",s);try{return await Promise.race(t.map(c=>c({abortSignal:o.signal})))}finally{o.abort(),(n=e?.abortSignal)===null||n===void 0||n.removeEventListener("abort",s)}}a(xIs,"cancelablePromiseRace")});var fGn=T(vtt=>{"use strict";f();Object.defineProperty(vtt,"__esModule",{value:!0});vtt.AbortError=void 0;var rZt=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};vtt.AbortError=rZt});var wSe=T(btt=>{"use strict";f();Object.defineProperty(btt,"__esModule",{value:!0});btt.AbortError=void 0;var wIs=fGn();Object.defineProperty(btt,"AbortError",{enumerable:!0,get:a(function(){return wIs.AbortError},"get")})});var iZt=T(nZt=>{"use strict";f();Object.defineProperty(nZt,"__esModule",{value:!0});nZt.createAbortablePromise=PIs;var RIs=wSe();function PIs(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,c)=>{function l(){c(new RIs.AbortError(o??"The operation was aborted."))}a(l,"rejectOnAbort");function u(){n?.removeEventListener("abort",d)}a(u,"removeListeners");function d(){r?.(),u(),l()}if(a(d,"onAbort"),n?.aborted)return l();try{t(p=>{u(),s(p)},p=>{u(),c(p)})}catch(p){c(p)}n?.addEventListener("abort",d)})}a(PIs,"createAbortablePromise")});var pGn=T(Ttt=>{"use strict";f();Object.defineProperty(Ttt,"__esModule",{value:!0});Ttt.delay=MIs;Ttt.calculateRetryDelay=OIs;var kIs=iZt(),DIs=Ctt(),NIs="The delay was aborted.";function MIs(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return(0,kIs.createAbortablePromise)(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:a(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??NIs})}a(MIs,"delay");function OIs(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+(0,DIs.getRandomIntegerInclusive)(0,n/2)}}a(OIs,"calculateRetryDelay")});var hGn=T(oZt=>{"use strict";f();Object.defineProperty(oZt,"__esModule",{value:!0});oZt.getErrorMessage=LIs;var BIs=Ctt();function LIs(t){if((0,BIs.isError)(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}a(LIs,"getErrorMessage")});var gGn=T(RSe=>{"use strict";f();Object.defineProperty(RSe,"__esModule",{value:!0});RSe.isDefined=sZt;RSe.isObjectWithProperties=FIs;RSe.objectHasProperty=mGn;function sZt(t){return typeof t<"u"&&t!==null}a(sZt,"isDefined");function FIs(t,e){if(!sZt(t)||typeof t!="object")return!1;for(let r of e)if(!mGn(t,r))return!1;return!0}a(FIs,"isObjectWithProperties");function mGn(t,e){return sZt(t)&&typeof t=="object"&&e in t}a(mGn,"objectHasProperty")});var aD=T(vo=>{"use strict";f();Object.defineProperty(vo,"__esModule",{value:!0});vo.isWebWorker=vo.isReactNative=vo.isNodeRuntime=vo.isNodeLike=vo.isNode=vo.isDeno=vo.isBun=vo.isBrowser=vo.objectHasProperty=vo.isObjectWithProperties=vo.isDefined=vo.getErrorMessage=vo.delay=vo.createAbortablePromise=vo.cancelablePromiseRace=void 0;vo.calculateRetryDelay=jIs;vo.computeSha256Hash=$Is;vo.computeSha256Hmac=VIs;vo.getRandomIntegerInclusive=WIs;vo.isError=zIs;vo.isObject=YIs;vo.randomUUID=KIs;vo.uint8ArrayToString=JIs;vo.stringToUint8Array=XIs;var UIs=(bM(),Aa(k8)),qm=UIs.__importStar(Ctt()),QIs=dGn();Object.defineProperty(vo,"cancelablePromiseRace",{enumerable:!0,get:a(function(){return QIs.cancelablePromiseRace},"get")});var qIs=iZt();Object.defineProperty(vo,"createAbortablePromise",{enumerable:!0,get:a(function(){return qIs.createAbortablePromise},"get")});var GIs=pGn();Object.defineProperty(vo,"delay",{enumerable:!0,get:a(function(){return GIs.delay},"get")});var HIs=hGn();Object.defineProperty(vo,"getErrorMessage",{enumerable:!0,get:a(function(){return HIs.getErrorMessage},"get")});var aZt=gGn();Object.defineProperty(vo,"isDefined",{enumerable:!0,get:a(function(){return aZt.isDefined},"get")});Object.defineProperty(vo,"isObjectWithProperties",{enumerable:!0,get:a(function(){return aZt.isObjectWithProperties},"get")});Object.defineProperty(vo,"objectHasProperty",{enumerable:!0,get:a(function(){return aZt.objectHasProperty},"get")});function jIs(t,e){return qm.calculateRetryDelay(t,e)}a(jIs,"calculateRetryDelay");function $Is(t,e){return qm.computeSha256Hash(t,e)}a($Is,"computeSha256Hash");function VIs(t,e,r){return qm.computeSha256Hmac(t,e,r)}a(VIs,"computeSha256Hmac");function WIs(t,e){return qm.getRandomIntegerInclusive(t,e)}a(WIs,"getRandomIntegerInclusive");function zIs(t){return qm.isError(t)}a(zIs,"isError");function YIs(t){return qm.isObject(t)}a(YIs,"isObject");function KIs(){return qm.randomUUID()}a(KIs,"randomUUID");vo.isBrowser=qm.isBrowser;vo.isBun=qm.isBun;vo.isDeno=qm.isDeno;vo.isNode=qm.isNodeLike;vo.isNodeLike=qm.isNodeLike;vo.isNodeRuntime=qm.isNodeRuntime;vo.isReactNative=qm.isReactNative;vo.isWebWorker=qm.isWebWorker;function JIs(t,e){return qm.uint8ArrayToString(t,e)}a(JIs,"uint8ArrayToString");function XIs(t,e){return qm.stringToUint8Array(t,e)}a(XIs,"stringToUint8Array")});var Itt=T(Stt=>{"use strict";f();Object.defineProperty(Stt,"__esModule",{value:!0});Stt.Sanitizer=void 0;var ZIs=aD(),cZt="REDACTED",exs=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],txs=["api-version"],lZt=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=exs.concat(e),r=txs.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||(0,ZIs.isObject)(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,cZt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=cZt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=cZt;return r}};Stt.Sanitizer=lZt});var uZt=T(qce=>{"use strict";f();Object.defineProperty(qce,"__esModule",{value:!0});qce.logPolicyName=void 0;qce.logPolicy=ixs;var rxs=lz(),nxs=Itt();qce.logPolicyName="logPolicy";function ixs(t={}){var e;let r=(e=t.logger)!==null&&e!==void 0?e:rxs.logger.info,n=new nxs.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:qce.logPolicyName,async sendRequest(o,s){if(!r.enabled)return s(o);r(`Request: ${n.sanitize(o)}`);let c=await s(o);return r(`Response status code: ${c.status}`),r(`Headers: ${n.sanitize(c.headers)}`),c}}}a(ixs,"logPolicy")});var dZt=T(Gce=>{"use strict";f();Object.defineProperty(Gce,"__esModule",{value:!0});Gce.redirectPolicyName=void 0;Gce.redirectPolicy=oxs;Gce.redirectPolicyName="redirectPolicy";var AGn=["GET","HEAD"];function oxs(t={}){let{maxRetries:e=20}=t;return{name:Gce.redirectPolicyName,async sendRequest(r,n){let o=await n(r);return yGn(n,o,e)}}}a(oxs,"redirectPolicy");async function yGn(t,e,r,n=0){let{request:o,status:s,headers:c}=e,l=c.get("location");if(l&&(s===300||s===301&&AGn.includes(o.method)||s===302&&AGn.includes(o.method)||s===303&&o.method==="POST"||s===307)&&n{"use strict";f();Object.defineProperty(xtt,"__esModule",{value:!0});xtt.getHeaderName=sxs;xtt.setPlatformSpecificData=axs;var EGn=(bM(),Aa(k8)),fZt=EGn.__importStar(require("node:os")),pZt=EGn.__importStar(require("node:process"));function sxs(){return"User-Agent"}a(sxs,"getHeaderName");async function axs(t){if(pZt&&pZt.versions){let e=pZt.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${fZt.arch()}-${fZt.type()}-${fZt.release()})`)}a(axs,"setPlatformSpecificData")});var B7=T(Hce=>{"use strict";f();Object.defineProperty(Hce,"__esModule",{value:!0});Hce.DEFAULT_RETRY_POLICY_COUNT=Hce.SDK_VERSION=void 0;Hce.SDK_VERSION="1.16.3";Hce.DEFAULT_RETRY_POLICY_COUNT=3});var hZt=T(wtt=>{"use strict";f();Object.defineProperty(wtt,"__esModule",{value:!0});wtt.getUserAgentHeaderName=uxs;wtt.getUserAgentValue=dxs;var CGn=_Gn(),cxs=B7();function lxs(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}a(lxs,"getUserAgentString");function uxs(){return(0,CGn.getHeaderName)()}a(uxs,"getUserAgentHeaderName");async function dxs(t){let e=new Map;e.set("core-rest-pipeline",cxs.SDK_VERSION),await(0,CGn.setPlatformSpecificData)(e);let r=lxs(e);return t?`${t} ${r}`:r}a(dxs,"getUserAgentValue")});var mZt=T(jce=>{"use strict";f();Object.defineProperty(jce,"__esModule",{value:!0});jce.userAgentPolicyName=void 0;jce.userAgentPolicy=fxs;var bGn=hZt(),vGn=(0,bGn.getUserAgentHeaderName)();jce.userAgentPolicyName="userAgentPolicy";function fxs(t={}){let e=(0,bGn.getUserAgentValue)(t.userAgentPrefix);return{name:jce.userAgentPolicyName,async sendRequest(r,n){return r.headers.has(vGn)||r.headers.set(vGn,await e),n(r)}}}a(fxs,"userAgentPolicy")});var Rtt=T($ce=>{"use strict";f();Object.defineProperty($ce,"__esModule",{value:!0});$ce.isNodeReadableStream=TGn;$ce.isWebReadableStream=SGn;$ce.isReadableStream=pxs;$ce.isBlob=hxs;function TGn(t){return!!(t&&typeof t.pipe=="function")}a(TGn,"isNodeReadableStream");function SGn(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}a(SGn,"isWebReadableStream");function pxs(t){return TGn(t)||SGn(t)}a(pxs,"isReadableStream");function hxs(t){return typeof t.stream=="function"}a(hxs,"isBlob")});var gZt=T(PSe=>{"use strict";f();Object.defineProperty(PSe,"__esModule",{value:!0});PSe.getRawContent=yxs;PSe.createFileFromStream=Exs;PSe.createFile=_xs;var mxs=aD(),gxs=Rtt(),IGn={arrayBuffer:a(()=>{throw new Error("Not implemented")},"arrayBuffer"),slice:a(()=>{throw new Error("Not implemented")},"slice"),text:a(()=>{throw new Error("Not implemented")},"text")},Ptt=Symbol("rawContent");function Axs(t){return typeof t[Ptt]=="function"}a(Axs,"hasRawContent");function yxs(t){return Axs(t)?t[Ptt]():t.stream()}a(yxs,"getRawContent");function Exs(t,e,r={}){var n,o,s,c;return Object.assign(Object.assign({},IGn),{type:(n=r.type)!==null&&n!==void 0?n:"",lastModified:(o=r.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(s=r.webkitRelativePath)!==null&&s!==void 0?s:"",size:(c=r.size)!==null&&c!==void 0?c:-1,name:e,stream:a(()=>{let l=t();if((0,gxs.isNodeReadableStream)(l))throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");return l},"stream"),[Ptt]:t})}a(Exs,"createFileFromStream");function _xs(t,e,r={}){var n,o,s;return mxs.isNodeLike?Object.assign(Object.assign({},IGn),{type:(n=r.type)!==null&&n!==void 0?n:"",lastModified:(o=r.lastModified)!==null&&o!==void 0?o:new Date().getTime(),webkitRelativePath:(s=r.webkitRelativePath)!==null&&s!==void 0?s:"",size:t.byteLength,name:e,arrayBuffer:a(async()=>t.buffer,"arrayBuffer"),stream:a(()=>new Blob([t]).stream(),"stream"),[Ptt]:()=>t}):new File([t],e,r)}a(_xs,"createFile")});var RGn=T(yZt=>{"use strict";f();Object.defineProperty(yZt,"__esModule",{value:!0});yZt.concat=Sxs;var HO=(bM(),Aa(k8)),AZt=require("node:stream"),Cxs=Rtt(),vxs=gZt();function xGn(){return HO.__asyncGenerator(this,arguments,a(function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield HO.__await(e.read());if(r)return yield HO.__await(void 0);yield yield HO.__await(n)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}a(xGn,"streamAsyncIterator");function bxs(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=xGn.bind(t)),t.values||(t.values=xGn.bind(t))}a(bxs,"makeAsyncIterable");function Txs(t){return t instanceof ReadableStream?(bxs(t),AZt.Readable.fromWeb(t)):t}a(Txs,"ensureNodeStream");function wGn(t){return t instanceof Uint8Array?AZt.Readable.from(Buffer.from(t)):(0,Cxs.isBlob)(t)?wGn((0,vxs.getRawContent)(t)):Txs(t)}a(wGn,"toStream");async function Sxs(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(wGn);return AZt.Readable.from((function(){return HO.__asyncGenerator(this,arguments,function*(){var r,n,o,s;for(let d of e)try{for(var c=!0,l=(n=void 0,HO.__asyncValues(d)),u;u=yield HO.__await(l.next()),r=u.done,!r;c=!0){s=u.value,c=!1;let p=s;yield yield HO.__await(p)}}catch(p){n={error:p}}finally{try{!c&&!r&&(o=l.return)&&(yield HO.__await(o.call(l)))}finally{if(n)throw n.error}}})})())}}a(Sxs,"concat")});var EZt=T(Vce=>{"use strict";f();Object.defineProperty(Vce,"__esModule",{value:!0});Vce.multipartPolicyName=void 0;Vce.multipartPolicy=Bxs;var dz=aD(),Ixs=RGn(),xxs=Rtt();function wxs(){return`----AzSDKFormBoundary${(0,dz.randomUUID)()}`}a(wxs,"generateBoundary");function Rxs(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r +`;return e}a(Rxs,"encodeHeaders");function Pxs(t){return t instanceof Uint8Array?t.byteLength:(0,xxs.isBlob)(t)?t.size===-1?void 0:t.size:void 0}a(Pxs,"getLength");function kxs(t){let e=0;for(let r of t){let n=Pxs(r);if(n===void 0)return;e+=n}return e}a(kxs,"getTotalLength");async function Dxs(t,e,r){let n=[(0,dz.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,dz.stringToUint8Array)(`\r +`,"utf-8"),(0,dz.stringToUint8Array)(Rxs(s.headers),"utf-8"),(0,dz.stringToUint8Array)(`\r +`,"utf-8"),s.body,(0,dz.stringToUint8Array)(`\r +--${r}`,"utf-8")]),(0,dz.stringToUint8Array)(`--\r \r -`,"utf-8")],o=PSs(n);o&&t.headers.set("Content-Length",o),t.body=await(0,SSs.concat)(n)}a(kSs,"buildRequestBody");Nle.multipartPolicyName="multipartPolicy";var NSs=70,DSs=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function MSs(t){if(t.length>NSs)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!DSs.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}a(MSs,"assertValidBoundary");function OSs(){return{name:Nle.multipartPolicyName,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,o=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,c,l]=s;if(l&&n&&l!==n)throw new Error(`Multipart boundary was specified as ${l} in the header, but got ${n} in the request body`);return n??(n=l),n?MSs(n):n=xSs(),t.headers.set("Content-Type",`${c}; boundary=${n}`),await kSs(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}a(OSs,"multipartPolicy")});var eZt=T(Dle=>{"use strict";f();Object.defineProperty(Dle,"__esModule",{value:!0});Dle.decompressResponsePolicyName=void 0;Dle.decompressResponsePolicy=BSs;Dle.decompressResponsePolicyName="decompressResponsePolicy";function BSs(){return{name:Dle.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}a(BSs,"decompressResponsePolicy")});var Trt=T(brt=>{"use strict";f();Object.defineProperty(brt,"__esModule",{value:!0});brt.delay=USs;brt.parseHeaderValueAsNumber=QSs;var LSs=kIe(),FSs="The operation was aborted.";function USs(t,e,r){return new Promise((n,o)=>{let s,c,l=a(()=>o(new LSs.AbortError(r?.abortErrorMsg?r?.abortErrorMsg:FSs)),"rejectOnAbort"),u=a(()=>{r?.abortSignal&&c&&r.abortSignal.removeEventListener("abort",c)},"removeListeners");if(c=a(()=>(s&&clearTimeout(s),u(),l()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return l();s=setTimeout(()=>{u(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",c)})}a(USs,"delay");function QSs(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}a(QSs,"parseHeaderValueAsNumber")});var Irt=T(Srt=>{"use strict";f();Object.defineProperty(Srt,"__esModule",{value:!0});Srt.isThrottlingRetryResponse=HSs;Srt.throttlingRetryStrategy=jSs;var qSs=Trt(),tZt="Retry-After",GSs=["retry-after-ms","x-ms-retry-after-ms",tZt];function kqn(t){if(t&&[429,503].includes(t.status))try{for(let o of GSs){let s=(0,qSs.parseHeaderValueAsNumber)(t,o);if(s===0||s)return s*(o===tZt?1e3:1)}let e=t.headers.get(tZt);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}a(kqn,"getRetryAfterInMs");function HSs(t){return Number.isFinite(kqn(t))}a(HSs,"isThrottlingRetryResponse");function jSs(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=kqn(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}a(jSs,"throttlingRetryStrategy")});var xrt=T(MIe=>{"use strict";f();Object.defineProperty(MIe,"__esModule",{value:!0});MIe.exponentialRetryStrategy=YSs;MIe.isExponentialRetryResponse=Nqn;MIe.isSystemError=Dqn;var $Ss=ED(),VSs=Irt(),WSs=1e3,zSs=1e3*64;function YSs(t={}){var e,r;let n=(e=t.retryDelayInMs)!==null&&e!==void 0?e:WSs,o=(r=t.maxRetryDelayInMs)!==null&&r!==void 0?r:zSs,s=n;return{name:"exponentialRetryStrategy",retry({retryCount:c,response:l,responseError:u}){let d=Dqn(u),p=d&&t.ignoreSystemErrors,h=Nqn(l),m=h&&t.ignoreHttpStatusCodes;if(l&&((0,VSs.isThrottlingRetryResponse)(l)||!h)||m||p)return{skipStrategy:!0};if(u&&!d&&!h)return{errorToThrow:u};let A=s*Math.pow(2,c),y=Math.min(o,A);return s=y/2+(0,$Ss.getRandomIntegerInclusive)(0,y/2),{retryAfterInMs:s}}}}a(YSs,"exponentialRetryStrategy");function Nqn(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}a(Nqn,"isExponentialRetryResponse");function Dqn(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}a(Dqn,"isSystemError")});var Mle=T(rZt=>{"use strict";f();Object.defineProperty(rZt,"__esModule",{value:!0});rZt.retryPolicy=eIs;var KSs=Trt(),JSs=Iet(),XSs=kIe(),Mqn=lU(),Oqn=(0,JSs.createClientLogger)("core-rest-pipeline retryPolicy"),ZSs="retryPolicy";function eIs(t,e={maxRetries:Mqn.DEFAULT_RETRY_POLICY_COUNT}){let r=e.logger||Oqn;return{name:ZSs,async sendRequest(n,o){var s,c;let l,u,d=-1;e:for(;;){d+=1,l=void 0,u=void 0;try{r.info(`Retry ${d}: Attempting to send request`,n.requestId),l=await o(n),r.info(`Retry ${d}: Received a response from request`,n.requestId)}catch(p){if(r.error(`Retry ${d}: Received an error from request`,n.requestId),u=p,!p||u.name!=="RestError")throw p;l=u.response}if(!((s=n.abortSignal)===null||s===void 0)&&s.aborted)throw r.error(`Retry ${d}: Request aborted.`),new XSs.AbortError;if(d>=((c=e.maxRetries)!==null&&c!==void 0?c:Mqn.DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${d}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),u)throw u;if(l)return l;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${d}: Processing ${t.length} retry strategies.`);t:for(let p of t){let h=p.logger||Oqn;h.info(`Retry ${d}: Processing retry strategy ${p.name}.`);let m=p.retry({retryCount:d,response:l,responseError:u});if(m.skipStrategy){h.info(`Retry ${d}: Skipped.`);continue t}let{errorToThrow:g,retryAfterInMs:A,redirectTo:y}=m;if(g)throw h.error(`Retry ${d}: Retry strategy ${p.name} throws error:`,g),g;if(A||A===0){h.info(`Retry ${d}: Retry strategy ${p.name} retries after ${A}`),await(0,KSs.delay)(A,void 0,{abortSignal:n.abortSignal});continue e}if(y){h.info(`Retry ${d}: Retry strategy ${p.name} redirects to ${y}`),n.url=y;continue e}}if(u)throw r.info("None of the retry strategies could work with the received error. Throwing it."),u;if(l)return r.info("None of the retry strategies could work with the received response. Returning it."),l}}}}a(eIs,"retryPolicy")});var nZt=T(Ole=>{"use strict";f();Object.defineProperty(Ole,"__esModule",{value:!0});Ole.defaultRetryPolicyName=void 0;Ole.defaultRetryPolicy=oIs;var tIs=xrt(),rIs=Irt(),nIs=Mle(),iIs=lU();Ole.defaultRetryPolicyName="defaultRetryPolicy";function oIs(t={}){var e;return{name:Ole.defaultRetryPolicyName,sendRequest:(0,nIs.retryPolicy)([(0,rIs.throttlingRetryStrategy)(),(0,tIs.exponentialRetryStrategy)(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:iIs.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(oIs,"defaultRetryPolicy")});var OIe=T(oZt=>{"use strict";f();Object.defineProperty(oZt,"__esModule",{value:!0});oZt.createHttpHeaders=aIs;function wrt(t){return t.toLowerCase()}a(wrt,"normalizeName");function*sIs(t){for(let e of t.values())yield[e.name,e.value]}a(sIs,"headerIterator");var iZt=class{static{a(this,"HttpHeadersImpl")}constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(wrt(e),{name:e,value:String(r).trim()})}get(e){var r;return(r=this._headersMap.get(wrt(e)))===null||r===void 0?void 0:r.value}has(e){return this._headersMap.has(wrt(e))}delete(e){this._headersMap.delete(wrt(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,o]of this._headersMap)r[n]=o.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return sIs(this._headersMap)}};function aIs(t){return new iZt(t)}a(aIs,"createHttpHeaders")});var sZt=T(Ble=>{"use strict";f();Object.defineProperty(Ble,"__esModule",{value:!0});Ble.formDataPolicyName=void 0;Ble.formDataPolicy=lIs;var Lqn=ED(),Bqn=OIe();Ble.formDataPolicyName="formDataPolicy";function cIs(t){var e;let r={};for(let[n,o]of t.entries())(e=r[n])!==null&&e!==void 0||(r[n]=[]),r[n].push(o);return r}a(cIs,"formDataToFormDataMap");function lIs(){return{name:Ble.formDataPolicyName,async sendRequest(t,e){if(Lqn.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=cIs(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=uIs(t.formData):await dIs(t.formData,t),t.formData=void 0}return e(t)}}}a(lIs,"formDataPolicy");function uIs(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.append(r,o.toString());else e.append(r,n.toString());return e.toString()}a(uIs,"wwwFormUrlEncode");async function dIs(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[o,s]of Object.entries(t))for(let c of Array.isArray(s)?s:[s])if(typeof c=="string")n.push({headers:(0,Bqn.createHttpHeaders)({"Content-Disposition":`form-data; name="${o}"`}),body:(0,Lqn.stringToUint8Array)(c,"utf-8")});else{if(c==null||typeof c!="object")throw new Error(`Unexpected value for key ${o}: ${c}. Value should be serialized to string first.`);{let l=c.name||"blob",u=(0,Bqn.createHttpHeaders)();u.set("Content-Disposition",`form-data; name="${o}"; filename="${l}"`),u.set("Content-Type",c.type||"application/octet-stream"),n.push({headers:u,body:c})}}e.multipartBody={parts:n}}a(dIs,"prepareFormData")});var aZt=T(WS=>{"use strict";f();Object.defineProperty(WS,"__esModule",{value:!0});WS.globalNoProxyList=WS.proxyPolicyName=void 0;WS.loadNoProxy=Gqn;WS.getDefaultProxySettings=_Is;WS.proxyPolicy=bIs;var fIs=qbt(),pIs=Gbt(),hIs=rY(),mIs="HTTPS_PROXY",gIs="HTTP_PROXY",AIs="ALL_PROXY",yIs="NO_PROXY";WS.proxyPolicyName="proxyPolicy";WS.globalNoProxyList=[];var Qqn=!1,EIs=new Map;function Rrt(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}a(Rrt,"getEnvironmentValue");function qqn(){if(!process)return;let t=Rrt(mIs),e=Rrt(AIs),r=Rrt(gIs);return t||e||r}a(qqn,"loadEnvironmentProxyValue");function CIs(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let o=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(o=!0):n===s&&(o=!0);return r?.set(n,o),o}a(CIs,"isBypassed");function Gqn(){let t=Rrt(yIs);return Qqn=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(Gqn,"loadNoProxy");function _Is(t){if(!t&&(t=qqn(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}a(_Is,"getDefaultProxySettings");function vIs(){let t=qqn();return t?new URL(t):void 0}a(vIs,"getDefaultProxySettingsInternal");function Fqn(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}a(Fqn,"getUrlFromProxySettings");function Uqn(t,e,r){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&hIs.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new pIs.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new fIs.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}a(Uqn,"setProxyAgentOnRequest");function bIs(t,e){Qqn||WS.globalNoProxyList.push(...Gqn());let r=t?Fqn(t):vIs(),n={};return{name:WS.proxyPolicyName,async sendRequest(o,s){var c;return!o.proxySettings&&r&&!CIs(o.url,(c=e?.customNoProxyList)!==null&&c!==void 0?c:WS.globalNoProxyList,e?.customNoProxyList?void 0:EIs)?Uqn(o,n,r):o.proxySettings&&Uqn(o,n,Fqn(o.proxySettings)),s(o)}}}a(bIs,"proxyPolicy")});var cZt=T(Lle=>{"use strict";f();Object.defineProperty(Lle,"__esModule",{value:!0});Lle.setClientRequestIdPolicyName=void 0;Lle.setClientRequestIdPolicy=TIs;Lle.setClientRequestIdPolicyName="setClientRequestIdPolicy";function TIs(t="x-ms-client-request-id"){return{name:Lle.setClientRequestIdPolicyName,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}a(TIs,"setClientRequestIdPolicy")});var lZt=T(Fle=>{"use strict";f();Object.defineProperty(Fle,"__esModule",{value:!0});Fle.tlsPolicyName=void 0;Fle.tlsPolicy=SIs;Fle.tlsPolicyName="tlsPolicy";function SIs(t){return{name:Fle.tlsPolicyName,sendRequest:a(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}a(SIs,"tlsPolicy")});var uZt=T(cB=>{"use strict";f();Object.defineProperty(cB,"__esModule",{value:!0});cB.TracingContextImpl=cB.knownContextKeys=void 0;cB.createTracingContext=IIs;cB.knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function IIs(t={}){let e=new Prt(t.parentContext);return t.span&&(e=e.setValue(cB.knownContextKeys.span,t.span)),t.namespace&&(e=e.setValue(cB.knownContextKeys.namespace,t.namespace)),e}a(IIs,"createTracingContext");var Prt=class t{static{a(this,"TracingContextImpl")}constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};cB.TracingContextImpl=Prt});var dZt=T(Ule=>{"use strict";f();Object.defineProperty(Ule,"__esModule",{value:!0});Ule.createDefaultTracingSpan=Hqn;Ule.createDefaultInstrumenter=jqn;Ule.useInstrumenter=wIs;Ule.getInstrumenter=RIs;var xIs=uZt(),krt=W_t();function Hqn(){return{end:a(()=>{},"end"),isRecording:a(()=>!1,"isRecording"),recordException:a(()=>{},"recordException"),setAttribute:a(()=>{},"setAttribute"),setStatus:a(()=>{},"setStatus"),addEvent:a(()=>{},"addEvent")}}a(Hqn,"createDefaultTracingSpan");function jqn(){return{createRequestHeaders:a(()=>({}),"createRequestHeaders"),parseTraceparentHeader:a(()=>{},"parseTraceparentHeader"),startSpan:a((t,e)=>({span:Hqn(),tracingContext:(0,xIs.createTracingContext)({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}a(jqn,"createDefaultInstrumenter");function wIs(t){krt.state.instrumenterImplementation=t}a(wIs,"useInstrumenter");function RIs(){return krt.state.instrumenterImplementation||(krt.state.instrumenterImplementation=jqn()),krt.state.instrumenterImplementation}a(RIs,"getInstrumenter")});var $qn=T(pZt=>{"use strict";f();Object.defineProperty(pZt,"__esModule",{value:!0});pZt.createTracingClient=PIs;var Nrt=dZt(),fZt=uZt();function PIs(t){let{namespace:e,packageName:r,packageVersion:n}=t;function o(d,p,h){var m;let g=(0,Nrt.getInstrumenter)().startSpan(d,Object.assign(Object.assign({},h),{packageName:r,packageVersion:n,tracingContext:(m=p?.tracingOptions)===null||m===void 0?void 0:m.tracingContext})),A=g.tracingContext,y=g.span;A.getValue(fZt.knownContextKeys.namespace)||(A=A.setValue(fZt.knownContextKeys.namespace,e)),y.setAttribute("az.namespace",A.getValue(fZt.knownContextKeys.namespace));let E=Object.assign({},p,{tracingOptions:Object.assign(Object.assign({},p?.tracingOptions),{tracingContext:A})});return{span:y,updatedOptions:E}}a(o,"startSpan");async function s(d,p,h,m){let{span:g,updatedOptions:A}=o(d,p,m);try{let y=await c(A.tracingOptions.tracingContext,()=>Promise.resolve(h(A,g)));return g.setStatus({status:"success"}),y}catch(y){throw g.setStatus({status:"error",error:y}),y}finally{g.end()}}a(s,"withSpan");function c(d,p,...h){return(0,Nrt.getInstrumenter)().withContext(d,p,...h)}a(c,"withContext");function l(d){return(0,Nrt.getInstrumenter)().parseTraceparentHeader(d)}a(l,"parseTraceparentHeader");function u(d){return(0,Nrt.getInstrumenter)().createRequestHeaders(d)}return a(u,"createRequestHeaders"),{startSpan:o,withSpan:s,withContext:c,parseTraceparentHeader:l,createRequestHeaders:u}}a(PIs,"createTracingClient")});var Vqn=T(Qle=>{"use strict";f();Object.defineProperty(Qle,"__esModule",{value:!0});Qle.createTracingClient=Qle.useInstrumenter=void 0;var kIs=dZt();Object.defineProperty(Qle,"useInstrumenter",{enumerable:!0,get:a(function(){return kIs.useInstrumenter},"get")});var NIs=$qn();Object.defineProperty(Qle,"createTracingClient",{enumerable:!0,get:a(function(){return NIs.createTracingClient},"get")})});var Wqn=T(Drt=>{"use strict";f();Object.defineProperty(Drt,"__esModule",{value:!0});Drt.custom=void 0;var DIs=require("node:util");Drt.custom=DIs.inspect.custom});var Mrt=T(BIe=>{"use strict";f();Object.defineProperty(BIe,"__esModule",{value:!0});BIe.RestError=void 0;BIe.isRestError=FIs;var MIs=ED(),OIs=Wqn(),BIs=yrt(),LIs=new BIs.Sanitizer,qle=class t extends Error{static{a(this,"RestError")}constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}[OIs.custom](){return`RestError: ${this.message} - ${LIs.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}};BIe.RestError=qle;qle.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";qle.PARSE_ERROR="PARSE_ERROR";function FIs(t){return t instanceof qle?!0:(0,MIs.isError)(t)&&t.name==="RestError"}a(FIs,"isRestError")});var hZt=T(Gle=>{"use strict";f();Object.defineProperty(Gle,"__esModule",{value:!0});Gle.tracingPolicyName=void 0;Gle.tracingPolicy=jIs;var UIs=Vqn(),QIs=lU(),qIs=zXt(),Ort=rY(),LIe=ED(),GIs=Mrt(),HIs=yrt();Gle.tracingPolicyName="tracingPolicy";function jIs(t={}){let e=(0,qIs.getUserAgentValue)(t.userAgentPrefix),r=new HIs.Sanitizer({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=$Is();return{name:Gle.tracingPolicyName,async sendRequest(o,s){var c,l;if(!n||!(!((c=o.tracingOptions)===null||c===void 0)&&c.tracingContext))return s(o);let u=await e,d={"http.url":r.sanitizeUrl(o.url),"http.method":o.method,"http.user_agent":u,requestId:o.requestId};u&&(d["http.user_agent"]=u);let{span:p,tracingContext:h}=(l=VIs(n,o,d))!==null&&l!==void 0?l:{};if(!p||!h)return s(o);try{let m=await n.withContext(h,s,o);return zIs(p,m),m}catch(m){throw WIs(p,m),m}}}}a(jIs,"tracingPolicy");function $Is(){try{return(0,UIs.createTracingClient)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:QIs.SDK_VERSION})}catch(t){Ort.logger.warning(`Error when creating the TracingClient: ${(0,LIe.getErrorMessage)(t)}`);return}}a($Is,"tryCreateTracingClient");function VIs(t,e,r){try{let{span:n,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let s=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[c,l]of Object.entries(s))e.headers.set(c,l);return{span:n,tracingContext:o.tracingOptions.tracingContext}}catch(n){Ort.logger.warning(`Skipping creating a tracing span due to an error: ${(0,LIe.getErrorMessage)(n)}`);return}}a(VIs,"tryCreateSpan");function WIs(t,e){try{t.setStatus({status:"error",error:(0,LIe.isError)(e)?e:void 0}),(0,GIs.isRestError)(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){Ort.logger.warning(`Skipping tracing span processing due to an error: ${(0,LIe.getErrorMessage)(r)}`)}}a(WIs,"tryProcessError");function zIs(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),t.setStatus({status:"success"}),t.end()}catch(r){Ort.logger.warning(`Skipping tracing span processing due to an error: ${(0,LIe.getErrorMessage)(r)}`)}}a(zIs,"tryProcessResponse")});var Kqn=T(mZt=>{"use strict";f();Object.defineProperty(mZt,"__esModule",{value:!0});mZt.createPipelineFromOptions=sxs;var YIs=jXt(),KIs=_Xt(),JIs=$Xt(),XIs=YXt(),zqn=ZXt(),ZIs=eZt(),exs=nZt(),txs=sZt(),Yqn=ED(),rxs=aZt(),nxs=cZt(),ixs=lZt(),oxs=hZt();function sxs(t){var e;let r=(0,KIs.createEmptyPipeline)();return Yqn.isNodeLike&&(t.tlsOptions&&r.addPolicy((0,ixs.tlsPolicy)(t.tlsOptions)),r.addPolicy((0,rxs.proxyPolicy)(t.proxyOptions)),r.addPolicy((0,ZIs.decompressResponsePolicy)())),r.addPolicy((0,txs.formDataPolicy)(),{beforePolicies:[zqn.multipartPolicyName]}),r.addPolicy((0,XIs.userAgentPolicy)(t.userAgentOptions)),r.addPolicy((0,nxs.setClientRequestIdPolicy)((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),r.addPolicy((0,zqn.multipartPolicy)(),{afterPhase:"Deserialize"}),r.addPolicy((0,exs.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),r.addPolicy((0,oxs.tracingPolicy)(Object.assign(Object.assign({},t.userAgentOptions),t.loggingOptions)),{afterPhase:"Retry"}),Yqn.isNodeLike&&r.addPolicy((0,JIs.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),r.addPolicy((0,YIs.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),r}a(sxs,"createPipelineFromOptions")});var rGn=T(Lrt=>{"use strict";f();Object.defineProperty(Lrt,"__esModule",{value:!0});Lrt.getBodyLength=tGn;Lrt.createNodeHttpClient=pxs;var EZt=(qM(),ba(i6)),gZt=EZt.__importStar(require("node:http")),AZt=EZt.__importStar(require("node:https")),Jqn=EZt.__importStar(require("node:zlib")),axs=require("node:stream"),Xqn=kIe(),cxs=OIe(),QIe=Mrt(),FIe=rY(),lxs={};function UIe(t){return t&&typeof t.pipe=="function"}a(UIe,"isReadableStream");function Zqn(t){return new Promise(e=>{t.on("close",e),t.on("end",e),t.on("error",e)})}a(Zqn,"isStreamComplete");function eGn(t){return t&&typeof t.byteLength=="number"}a(eGn,"isArrayBuffer");var Brt=class extends axs.Transform{static{a(this,"ReportTransform")}_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},yZt=class{static{a(this,"NodeHttpClient")}constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,o;let s=new AbortController,c;if(e.abortSignal){if(e.abortSignal.aborted)throw new Xqn.AbortError("The operation was aborted.");c=a(h=>{h.type==="abort"&&s.abort()},"abortListener"),e.abortSignal.addEventListener("abort",c)}e.timeout>0&&setTimeout(()=>{s.abort()},e.timeout);let l=e.headers.get("Accept-Encoding"),u=l?.includes("gzip")||l?.includes("deflate"),d=typeof e.body=="function"?e.body():e.body;if(d&&!e.headers.has("Content-Length")){let h=tGn(d);h!==null&&e.headers.set("Content-Length",h)}let p;try{if(d&&e.onUploadProgress){let E=e.onUploadProgress,_=new Brt(E);_.on("error",v=>{FIe.logger.error("Error in upload progress",v)}),UIe(d)?d.pipe(_):_.end(d),d=_}let h=await this.makeRequest(e,s,d),m=uxs(h),A={status:(r=h.statusCode)!==null&&r!==void 0?r:0,headers:m,request:e};if(e.method==="HEAD")return h.resume(),A;p=u?dxs(h,m):h;let y=e.onDownloadProgress;if(y){let E=new Brt(y);E.on("error",_=>{FIe.logger.error("Error in download progress",_)}),p.pipe(E),p=E}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(A.status)?A.readableStreamBody=p:A.bodyAsText=await fxs(p),A}finally{if(e.abortSignal&&c){let h=Promise.resolve();UIe(d)&&(h=Zqn(d));let m=Promise.resolve();UIe(p)&&(m=Zqn(p)),Promise.all([h,m]).then(()=>{var g;c&&((g=e.abortSignal)===null||g===void 0||g.removeEventListener("abort",c))}).catch(g=>{FIe.logger.warning("Error when cleaning up abortListener on httpRequest",g)})}}}makeRequest(e,r,n){var o;let s=new URL(e.url),c=s.protocol!=="https:";if(c&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let u={agent:(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,c),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise((d,p)=>{let h=c?gZt.request(u,d):AZt.request(u,d);h.once("error",m=>{var g;p(new QIe.RestError(m.message,{code:(g=m.code)!==null&&g!==void 0?g:QIe.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let m=new Xqn.AbortError("The operation was aborted.");h.destroy(m),p(m)}),n&&UIe(n)?n.pipe(h):n?typeof n=="string"||Buffer.isBuffer(n)?h.end(n):eGn(n)?h.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(FIe.logger.error("Unrecognized body type",n),p(new QIe.RestError("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){var n;let o=e.disableKeepAlive;if(r)return o?gZt.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new gZt.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return AZt.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:lxs,c=this.cachedHttpsAgents.get(s);return c&&c.options.keepAlive===!o||(FIe.logger.info("No cached TLS Agent exist, creating a new Agent"),c=new AZt.Agent(Object.assign({keepAlive:!o},s)),this.cachedHttpsAgents.set(s,c)),c}}};function uxs(t){let e=(0,cxs.createHttpHeaders)();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}a(uxs,"getResponseHeaders");function dxs(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=Jqn.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=Jqn.createInflate();return t.pipe(n),n}return t}a(dxs,"getDecodedResponseStream");function fxs(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new QIe.RestError(`Error reading response as text: ${o.message}`,{code:QIe.RestError.PARSE_ERROR}))})})}a(fxs,"streamToText");function tGn(t){return t?Buffer.isBuffer(t)?t.length:UIe(t)?null:eGn(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}a(tGn,"getBodyLength");function pxs(){return new yZt}a(pxs,"createNodeHttpClient")});var nGn=T(CZt=>{"use strict";f();Object.defineProperty(CZt,"__esModule",{value:!0});CZt.createDefaultHttpClient=mxs;var hxs=rGn();function mxs(){return(0,hxs.createNodeHttpClient)()}a(mxs,"createDefaultHttpClient")});var iGn=T(vZt=>{"use strict";f();Object.defineProperty(vZt,"__esModule",{value:!0});vZt.createPipelineRequest=yxs;var gxs=OIe(),Axs=ED(),_Zt=class{static{a(this,"PipelineRequestImpl")}constructor(e){var r,n,o,s,c,l,u;this.url=e.url,this.body=e.body,this.headers=(r=e.headers)!==null&&r!==void 0?r:(0,gxs.createHttpHeaders)(),this.method=(n=e.method)!==null&&n!==void 0?n:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(s=e.disableKeepAlive)!==null&&s!==void 0?s:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(c=e.withCredentials)!==null&&c!==void 0?c:!1,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,Axs.randomUUID)(),this.allowInsecureConnection=(l=e.allowInsecureConnection)!==null&&l!==void 0?l:!1,this.enableBrowserStreams=(u=e.enableBrowserStreams)!==null&&u!==void 0?u:!1}};function yxs(t){return new _Zt(t)}a(yxs,"createPipelineRequest")});var oGn=T(qIe=>{"use strict";f();Object.defineProperty(qIe,"__esModule",{value:!0});qIe.exponentialRetryPolicyName=void 0;qIe.exponentialRetryPolicy=vxs;var Exs=xrt(),Cxs=Mle(),_xs=lU();qIe.exponentialRetryPolicyName="exponentialRetryPolicy";function vxs(t={}){var e;return(0,Cxs.retryPolicy)([(0,Exs.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreSystemErrors:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:_xs.DEFAULT_RETRY_POLICY_COUNT})}a(vxs,"exponentialRetryPolicy")});var sGn=T(Hle=>{"use strict";f();Object.defineProperty(Hle,"__esModule",{value:!0});Hle.systemErrorRetryPolicyName=void 0;Hle.systemErrorRetryPolicy=Ixs;var bxs=xrt(),Txs=Mle(),Sxs=lU();Hle.systemErrorRetryPolicyName="systemErrorRetryPolicy";function Ixs(t={}){var e;return{name:Hle.systemErrorRetryPolicyName,sendRequest:(0,Txs.retryPolicy)([(0,bxs.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreHttpStatusCodes:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:Sxs.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(Ixs,"systemErrorRetryPolicy")});var aGn=T(jle=>{"use strict";f();Object.defineProperty(jle,"__esModule",{value:!0});jle.throttlingRetryPolicyName=void 0;jle.throttlingRetryPolicy=Pxs;var xxs=Irt(),wxs=Mle(),Rxs=lU();jle.throttlingRetryPolicyName="throttlingRetryPolicy";function Pxs(t={}){var e;return{name:jle.throttlingRetryPolicyName,sendRequest:(0,wxs.retryPolicy)([(0,xxs.throttlingRetryStrategy)()],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:Rxs.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(Pxs,"throttlingRetryPolicy")});var bZt=T($le=>{"use strict";f();Object.defineProperty($le,"__esModule",{value:!0});$le.DEFAULT_CYCLER_OPTIONS=void 0;$le.createTokenCycler=Dxs;var kxs=Trt();$le.DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function Nxs(t,e,r){async function n(){if(Date.now()t.getToken(u,d),"tryGetAccessToken"),s.retryIntervalInMs,(p=n?.expiresOnTimestamp)!==null&&p!==void 0?p:Date.now()).then(m=>(r=null,n=m,o=d.tenantId,n)).catch(m=>{throw r=null,n=null,o=void 0,m})),r}return a(l,"refresh"),async(u,d)=>{let p=!!d.claims,h=o!==d.tenantId;return p&&(n=null),h||p||c.mustRefresh?l(u,d):(c.shouldRefresh&&l(u,d),n)}}a(Dxs,"createTokenCycler")});var cGn=T(Vle=>{"use strict";f();Object.defineProperty(Vle,"__esModule",{value:!0});Vle.bearerTokenAuthenticationPolicyName=void 0;Vle.bearerTokenAuthenticationPolicy=Fxs;var Mxs=bZt(),Oxs=rY();Vle.bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy";async function Bxs(t){let{scopes:e,getAccessToken:r,request:n}=t,o={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions},s=await r(e,o);s&&t.request.headers.set("Authorization",`Bearer ${s.token}`)}a(Bxs,"defaultAuthorizeRequest");function Lxs(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}a(Lxs,"getChallenge");function Fxs(t){var e;let{credential:r,scopes:n,challengeCallbacks:o}=t,s=t.logger||Oxs.logger,c=Object.assign({authorizeRequest:(e=o?.authorizeRequest)!==null&&e!==void 0?e:Bxs,authorizeRequestOnChallenge:o?.authorizeRequestOnChallenge},o),l=r?(0,Mxs.createTokenCycler)(r):()=>Promise.resolve(null);return{name:Vle.bearerTokenAuthenticationPolicyName,async sendRequest(u,d){if(!u.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await c.authorizeRequest({scopes:Array.isArray(n)?n:[n],request:u,getAccessToken:l,logger:s});let p,h;try{p=await d(u)}catch(m){h=m,p=m.response}if(c.authorizeRequestOnChallenge&&p?.status===401&&Lxs(p)&&await c.authorizeRequestOnChallenge({scopes:Array.isArray(n)?n:[n],request:u,response:p,getAccessToken:l,logger:s}))return d(u);if(h)throw h;return p}}}a(Fxs,"bearerTokenAuthenticationPolicy")});var lGn=T(Wle=>{"use strict";f();Object.defineProperty(Wle,"__esModule",{value:!0});Wle.ndJsonPolicyName=void 0;Wle.ndJsonPolicy=Uxs;Wle.ndJsonPolicyName="ndJsonPolicy";function Uxs(){return{name:Wle.ndJsonPolicyName,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let r=JSON.parse(t.body);Array.isArray(r)&&(t.body=r.map(n=>JSON.stringify(n)+` -`).join(""))}return e(t)}}}a(Uxs,"ndJsonPolicy")});var dGn=T(oY=>{"use strict";f();Object.defineProperty(oY,"__esModule",{value:!0});oY.auxiliaryAuthenticationHeaderPolicyName=void 0;oY.auxiliaryAuthenticationHeaderPolicy=Hxs;var Qxs=bZt(),qxs=rY();oY.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var uGn="x-ms-authorization-auxiliary";async function Gxs(t){var e,r;let{scopes:n,getAccessToken:o,request:s}=t,c={abortSignal:s.abortSignal,tracingOptions:s.tracingOptions};return(r=(e=await o(n,c))===null||e===void 0?void 0:e.token)!==null&&r!==void 0?r:""}a(Gxs,"sendAuthorizeRequest");function Hxs(t){let{credentials:e,scopes:r}=t,n=t.logger||qxs.logger,o=new WeakMap;return{name:oY.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,c){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${oY.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),c(s);let l=[];for(let d of e){let p=o.get(d);p||(p=(0,Qxs.createTokenCycler)(d),o.set(d,p)),l.push(Gxs({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:p,logger:n}))}let u=(await Promise.all(l)).filter(d=>!!d);return u.length===0?(n.warning(`None of the auxiliary tokens are valid. ${uGn} header will not be set.`),c(s)):(s.headers.set(uGn,u.map(d=>`Bearer ${d}`).join(", ")),c(s))}}}a(Hxs,"auxiliaryAuthenticationHeaderPolicy")});var RGn=T(ar=>{"use strict";f();Object.defineProperty(ar,"__esModule",{value:!0});ar.createFileFromStream=ar.createFile=ar.auxiliaryAuthenticationHeaderPolicyName=ar.auxiliaryAuthenticationHeaderPolicy=ar.ndJsonPolicyName=ar.ndJsonPolicy=ar.bearerTokenAuthenticationPolicyName=ar.bearerTokenAuthenticationPolicy=ar.formDataPolicyName=ar.formDataPolicy=ar.tlsPolicyName=ar.tlsPolicy=ar.userAgentPolicyName=ar.userAgentPolicy=ar.defaultRetryPolicy=ar.tracingPolicyName=ar.tracingPolicy=ar.retryPolicy=ar.throttlingRetryPolicyName=ar.throttlingRetryPolicy=ar.systemErrorRetryPolicyName=ar.systemErrorRetryPolicy=ar.redirectPolicyName=ar.redirectPolicy=ar.getDefaultProxySettings=ar.proxyPolicyName=ar.proxyPolicy=ar.multipartPolicyName=ar.multipartPolicy=ar.logPolicyName=ar.logPolicy=ar.setClientRequestIdPolicyName=ar.setClientRequestIdPolicy=ar.exponentialRetryPolicyName=ar.exponentialRetryPolicy=ar.decompressResponsePolicyName=ar.decompressResponsePolicy=ar.isRestError=ar.RestError=ar.createPipelineRequest=ar.createHttpHeaders=ar.createDefaultHttpClient=ar.createPipelineFromOptions=ar.createEmptyPipeline=void 0;var jxs=_Xt();Object.defineProperty(ar,"createEmptyPipeline",{enumerable:!0,get:a(function(){return jxs.createEmptyPipeline},"get")});var $xs=Kqn();Object.defineProperty(ar,"createPipelineFromOptions",{enumerable:!0,get:a(function(){return $xs.createPipelineFromOptions},"get")});var Vxs=nGn();Object.defineProperty(ar,"createDefaultHttpClient",{enumerable:!0,get:a(function(){return Vxs.createDefaultHttpClient},"get")});var Wxs=OIe();Object.defineProperty(ar,"createHttpHeaders",{enumerable:!0,get:a(function(){return Wxs.createHttpHeaders},"get")});var zxs=iGn();Object.defineProperty(ar,"createPipelineRequest",{enumerable:!0,get:a(function(){return zxs.createPipelineRequest},"get")});var fGn=Mrt();Object.defineProperty(ar,"RestError",{enumerable:!0,get:a(function(){return fGn.RestError},"get")});Object.defineProperty(ar,"isRestError",{enumerable:!0,get:a(function(){return fGn.isRestError},"get")});var pGn=eZt();Object.defineProperty(ar,"decompressResponsePolicy",{enumerable:!0,get:a(function(){return pGn.decompressResponsePolicy},"get")});Object.defineProperty(ar,"decompressResponsePolicyName",{enumerable:!0,get:a(function(){return pGn.decompressResponsePolicyName},"get")});var hGn=oGn();Object.defineProperty(ar,"exponentialRetryPolicy",{enumerable:!0,get:a(function(){return hGn.exponentialRetryPolicy},"get")});Object.defineProperty(ar,"exponentialRetryPolicyName",{enumerable:!0,get:a(function(){return hGn.exponentialRetryPolicyName},"get")});var mGn=cZt();Object.defineProperty(ar,"setClientRequestIdPolicy",{enumerable:!0,get:a(function(){return mGn.setClientRequestIdPolicy},"get")});Object.defineProperty(ar,"setClientRequestIdPolicyName",{enumerable:!0,get:a(function(){return mGn.setClientRequestIdPolicyName},"get")});var gGn=jXt();Object.defineProperty(ar,"logPolicy",{enumerable:!0,get:a(function(){return gGn.logPolicy},"get")});Object.defineProperty(ar,"logPolicyName",{enumerable:!0,get:a(function(){return gGn.logPolicyName},"get")});var AGn=ZXt();Object.defineProperty(ar,"multipartPolicy",{enumerable:!0,get:a(function(){return AGn.multipartPolicy},"get")});Object.defineProperty(ar,"multipartPolicyName",{enumerable:!0,get:a(function(){return AGn.multipartPolicyName},"get")});var TZt=aZt();Object.defineProperty(ar,"proxyPolicy",{enumerable:!0,get:a(function(){return TZt.proxyPolicy},"get")});Object.defineProperty(ar,"proxyPolicyName",{enumerable:!0,get:a(function(){return TZt.proxyPolicyName},"get")});Object.defineProperty(ar,"getDefaultProxySettings",{enumerable:!0,get:a(function(){return TZt.getDefaultProxySettings},"get")});var yGn=$Xt();Object.defineProperty(ar,"redirectPolicy",{enumerable:!0,get:a(function(){return yGn.redirectPolicy},"get")});Object.defineProperty(ar,"redirectPolicyName",{enumerable:!0,get:a(function(){return yGn.redirectPolicyName},"get")});var EGn=sGn();Object.defineProperty(ar,"systemErrorRetryPolicy",{enumerable:!0,get:a(function(){return EGn.systemErrorRetryPolicy},"get")});Object.defineProperty(ar,"systemErrorRetryPolicyName",{enumerable:!0,get:a(function(){return EGn.systemErrorRetryPolicyName},"get")});var CGn=aGn();Object.defineProperty(ar,"throttlingRetryPolicy",{enumerable:!0,get:a(function(){return CGn.throttlingRetryPolicy},"get")});Object.defineProperty(ar,"throttlingRetryPolicyName",{enumerable:!0,get:a(function(){return CGn.throttlingRetryPolicyName},"get")});var Yxs=Mle();Object.defineProperty(ar,"retryPolicy",{enumerable:!0,get:a(function(){return Yxs.retryPolicy},"get")});var _Gn=hZt();Object.defineProperty(ar,"tracingPolicy",{enumerable:!0,get:a(function(){return _Gn.tracingPolicy},"get")});Object.defineProperty(ar,"tracingPolicyName",{enumerable:!0,get:a(function(){return _Gn.tracingPolicyName},"get")});var Kxs=nZt();Object.defineProperty(ar,"defaultRetryPolicy",{enumerable:!0,get:a(function(){return Kxs.defaultRetryPolicy},"get")});var vGn=YXt();Object.defineProperty(ar,"userAgentPolicy",{enumerable:!0,get:a(function(){return vGn.userAgentPolicy},"get")});Object.defineProperty(ar,"userAgentPolicyName",{enumerable:!0,get:a(function(){return vGn.userAgentPolicyName},"get")});var bGn=lZt();Object.defineProperty(ar,"tlsPolicy",{enumerable:!0,get:a(function(){return bGn.tlsPolicy},"get")});Object.defineProperty(ar,"tlsPolicyName",{enumerable:!0,get:a(function(){return bGn.tlsPolicyName},"get")});var TGn=sZt();Object.defineProperty(ar,"formDataPolicy",{enumerable:!0,get:a(function(){return TGn.formDataPolicy},"get")});Object.defineProperty(ar,"formDataPolicyName",{enumerable:!0,get:a(function(){return TGn.formDataPolicyName},"get")});var SGn=cGn();Object.defineProperty(ar,"bearerTokenAuthenticationPolicy",{enumerable:!0,get:a(function(){return SGn.bearerTokenAuthenticationPolicy},"get")});Object.defineProperty(ar,"bearerTokenAuthenticationPolicyName",{enumerable:!0,get:a(function(){return SGn.bearerTokenAuthenticationPolicyName},"get")});var IGn=lGn();Object.defineProperty(ar,"ndJsonPolicy",{enumerable:!0,get:a(function(){return IGn.ndJsonPolicy},"get")});Object.defineProperty(ar,"ndJsonPolicyName",{enumerable:!0,get:a(function(){return IGn.ndJsonPolicyName},"get")});var xGn=dGn();Object.defineProperty(ar,"auxiliaryAuthenticationHeaderPolicy",{enumerable:!0,get:a(function(){return xGn.auxiliaryAuthenticationHeaderPolicy},"get")});Object.defineProperty(ar,"auxiliaryAuthenticationHeaderPolicyName",{enumerable:!0,get:a(function(){return xGn.auxiliaryAuthenticationHeaderPolicyName},"get")});var wGn=KXt();Object.defineProperty(ar,"createFile",{enumerable:!0,get:a(function(){return wGn.createFile},"get")});Object.defineProperty(ar,"createFileFromStream",{enumerable:!0,get:a(function(){return wGn.createFileFromStream},"get")})});var kGn=T((HIe,PGn)=>{"use strict";f();var Jxs=HIe&&HIe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Xxs=HIe&&HIe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var nws=Kc(),iws=Wm(),ows=(function(){function t(e,r,n,o){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=r,this._getBatchIntervalMs=n,this._sender=o}return a(t,"Channel"),t.prototype.setUseDiskRetryCaching=function(e,r,n){this._sender.setDiskRetryMode(e,r,n)},t.prototype.send=function(e){var r=this;if(!this._isDisabled()){if(!e){nws.warn("Cannot send null/undefined telemetry");return}if(this._buffer.push(e),this._buffer.length>=this._getBatchSize()){this.triggerSend(!1);return}!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout(function(){r._timeoutHandle=null,r.triggerSend(!1)},this._getBatchIntervalMs()))}},t.prototype.triggerSend=function(e,r){var n=this._buffer.length<1;n||(e||iws.isNodeExit?(this._sender.saveOnCrash(this._buffer),typeof r=="function"&&r("data saved on crash")):this._sender.send(this._buffer,r)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&typeof r=="function"&&r("no data to send")},t})();NGn.exports=ows});var MGn=T(SZt=>{"use strict";f();Object.defineProperty(SZt,"__esModule",{value:!0});SZt.azureRoleEnvironmentTelemetryProcessor=sws;function sws(t,e){}a(sws,"azureRoleEnvironmentTelemetryProcessor")});var LGn=T(Frt=>{"use strict";f();Object.defineProperty(Frt,"__esModule",{value:!0});Frt.samplingTelemetryProcessor=aws;Frt.getSamplingHashCode=BGn;var OGn=dA();function aws(t,e){var r=t.sampleRate,n=!1;return r==null||r>=100||t.data&&OGn.TelemetryType.Metric===OGn.baseTypeToTelemetryType(t.data.baseType)?!0:(e.correlationContext&&e.correlationContext.operation?n=BGn(e.correlationContext.operation.id){"use strict";f();var cws=lB&&lB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lws=lB&&lB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uws=lB&&lB.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cws(e,t,r);return lws(e,t),e};Object.defineProperty(lB,"__esModule",{value:!0});lB.performanceMetricsTelemetryProcessor=dws;var IZt=Ktt(),xZt=uws(dA());function dws(t,e){switch(e&&e.addDocument(t),t.data.baseType){case xZt.TelemetryTypeString.Exception:IZt.countException();break;case xZt.TelemetryTypeString.Request:var r=t.data.baseData;IZt.countRequest(r.duration,r.success);break;case xZt.TelemetryTypeString.Dependency:var n=t.data.baseData;IZt.countDependency(n.duration,n.success);break}return!0}a(dws,"performanceMetricsTelemetryProcessor")});var UGn=T(nR=>{"use strict";f();var CD=nR&&nR.__assign||function(){return CD=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var Aws=_D&&_D.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Qrt=_D&&_D.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Aws(e,t,r)};Object.defineProperty(_D,"__esModule",{value:!0});Qrt(MGn(),_D);Qrt(LGn(),_D);Qrt(FGn(),_D);Qrt(UGn(),_D)});var wZt=T((Okd,HGn)=>{"use strict";f();var wi=dA(),i_=Wm(),qGn=tU(),yws=Kc(),Ews=(function(){function t(){}return a(t,"EnvelopeFactory"),t.createEnvelope=function(e,r,n,o,s){var c=null;switch(r){case wi.TelemetryType.Trace:c=t.createTraceData(e);break;case wi.TelemetryType.Dependency:c=t.createDependencyData(e);break;case wi.TelemetryType.Event:c=t.createEventData(e);break;case wi.TelemetryType.Exception:c=t.createExceptionData(e);break;case wi.TelemetryType.Request:c=t.createRequestData(e);break;case wi.TelemetryType.Metric:c=t.createMetricData(e);break;case wi.TelemetryType.Availability:c=t.createAvailabilityData(e);break;case wi.TelemetryType.PageView:c=t.createPageViewData(e);break}if(c&&c.baseData&&wi.domainSupportsProperties(c.baseData)){if(n)if(!c.baseData.properties)c.baseData.properties=n;else for(var l in n)c.baseData.properties[l]||(c.baseData.properties[l]=n[l]);t.addAzureFunctionsCorrelationProperties(c.baseData.properties),c.baseData.properties&&(c.baseData.properties=i_.validateStringMap(c.baseData.properties))}var u=s&&s.instrumentationKey||"",d=new wi.Envelope;return d.data=c,d.iKey=u,d.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(o,e.tagOverrides),d.time=new Date().toISOString(),d.ver=1,d.sampleRate=s?s.samplingPercentage:100,r===wi.TelemetryType.Metric&&(d.sampleRate=100),d},t.addAzureFunctionsCorrelationProperties=function(e){var r=qGn.CorrelationContextManager.getCurrentContext();if(r&&r.customProperties&&r.customProperties.getProperty instanceof Function){e=e||{};var n=r.customProperties.getProperty("InvocationId");n&&(e.InvocationId=n),n=r.customProperties.getProperty("ProcessId"),n&&(e.ProcessId=n),n=r.customProperties.getProperty("LogLevel"),n&&(e.LogLevel=n),n=r.customProperties.getProperty("Category"),n&&(e.Category=n),n=r.customProperties.getProperty("HostInstanceId"),n&&(e.HostInstanceId=n),n=r.customProperties.getProperty("AzFuncLiveLogsSessionId"),n&&(e.AzFuncLiveLogsSessionId=n)}},t.truncateProperties=function(e){if(e.properties)try{for(var r={},n=Object.keys(e.properties),o=Object.values(e.properties),s=0;s0,o.exceptions.push(c);var l=new wi.Data;return l.baseType=wi.telemetryTypeToBaseType(wi.TelemetryType.Exception),l.baseData=o,l},t.createRequestData=function(e){var r,n,o,s,c=new wi.RequestData;e.id?c.id=e.id:c.id=i_.w3cTraceId(),c.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),c.url=(n=e.url)===null||n===void 0?void 0:n.substring(0,2048),c.source=(o=e.source)===null||o===void 0?void 0:o.substring(0,1024),c.duration=i_.msToTimeSpan(e.duration),c.responseCode=(s=e.resultCode?e.resultCode.toString():"0")===null||s===void 0?void 0:s.substring(0,1024),c.success=e.success,c.properties=this.truncateProperties(e),c.measurements=e.measurements;var l=new wi.Data;return l.baseType=wi.telemetryTypeToBaseType(wi.TelemetryType.Request),l.baseData=c,l},t.createMetricData=function(e){var r,n=new wi.MetricData;n.metrics=[];var o=new wi.DataPoint;o.count=isNaN(e.count)?1:e.count,o.kind=wi.DataPointType.Aggregation,o.max=isNaN(e.max)?e.value:e.max,o.min=isNaN(e.min)?e.value:e.min,o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.stdDev=isNaN(e.stdDev)?0:e.stdDev,o.value=e.value,o.ns=e.namespace,n.metrics.push(o),n.properties=this.truncateProperties(e);var s=new wi.Data;return s.baseType=wi.telemetryTypeToBaseType(wi.TelemetryType.Metric),s.baseData=n,s},t.createAvailabilityData=function(e){var r,n,o=new wi.AvailabilityData;e.id?o.id=e.id:o.id=i_.w3cTraceId(),o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.duration=i_.msToTimeSpan(e.duration),o.success=e.success,o.runLocation=e.runLocation,o.message=(n=e.message)===null||n===void 0?void 0:n.substring(0,8192),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new wi.Data;return s.baseType=wi.telemetryTypeToBaseType(wi.TelemetryType.Availability),s.baseData=o,s},t.createPageViewData=function(e){var r,n,o=new wi.PageViewData;o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.duration=i_.msToTimeSpan(e.duration),o.url=(n=e.url)===null||n===void 0?void 0:n.substring(0,2048),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new wi.Data;return s.baseType=wi.telemetryTypeToBaseType(wi.TelemetryType.PageView),s.baseData=o,s},t.getTags=function(e,r){var n=qGn.CorrelationContextManager.getCurrentContext(),o={};if(e&&e.tags)for(var s in e.tags)o[s]=e.tags[s];if(r)for(var s in r)o[s]=r[s];return n&&(o[e.keys.operationId]=o[e.keys.operationId]||n.operation.id,o[e.keys.operationName]=o[e.keys.operationName]||n.operation.name,o[e.keys.operationParentId]=o[e.keys.operationParentId]||n.operation.parentId),o},t.parseStack=function(e){var r=void 0;if(typeof e=="string"){var n=e.split(` -`);r=[];for(var o=0,s=0,c=0;c<=n.length;c++){var l=n[c];if(GGn.regex.test(l)){var u=new GGn(n[c],o++);s+=u.sizeInBytes,r.push(u)}}var d=32*1024;if(s>d)for(var p=0,h=r.length-1,m=0,g=p,A=h;pd){var _=A-g+1;r.splice(g,_);break}g=p,A=h,p++,h--}}return r},t})(),GGn=(function(){function t(e,r){this.sizeInBytes=0,this.level=r,this.method="",this.assembly=i_.trim(e);var n=e.match(t.regex);n&&n.length>=5&&(this.method=i_.trim(n[2])||this.method,this.fileName=i_.trim(n[4])||"",this.line=parseInt(n[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=t.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return a(t,"_StackFrame"),t.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,t.baseSize=58,t})();HGn.exports=Ews});var jGn=T(uU=>{"use strict";f();var Cws=uU&&uU.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},_ws=uU&&uU.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var qrt=VIe&&VIe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Grt=VIe&&VIe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]=0&&(this._resendInterval=Math.floor(r)),typeof n=="number"&&n>=0&&(this._maxBytesOnDisk=Math.floor(n)),e&&!$Ie.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(dU.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout(function(){o._fileCleanupTask()},t.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(dU.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},t.prototype.send=function(e,r){return qrt(this,void 0,void 0,function(){var n,o,s,c,l,u,d,p,h=this;return Grt(this,function(m){switch(m.label){case 0:if(!(e&&e.length>0))return[3,5];if(n=this._redirectedHost||this._config.endpointUrl,o=new Rws.URL(n).hostname,s={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},c=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!c)return[3,4];this._statsbeat&&this._statsbeat.addFeature(dU.StatsbeatFeature.AAD_HANDLING),m.label=1;case 1:return m.trys.push([1,3,,4]),[4,c.addAuthorizationHeader(s)];case 2:return m.sent(),[3,4];case 3:return l=m.sent(),u="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(u+="This batch of telemetry items will be retried. ",this._storeToDisk(e)),u+="Error:"+l.toString(),this._logWarn(u),typeof r=="function"&&r(u),[2];case 4:if(d="",e.forEach(function(g){var A=o_.stringify(g);typeof A=="string"&&(d+=A+` -`)}),d.length>0&&(d=d.substring(0,d.length-1)),d.length===0)return typeof r=="function"&&r("Empty batch of telemetry items. Nothing to send."),[2];p=Buffer.from?Buffer.from(d):new Buffer(d),xws.gzip(p,function(g,A){var y=A;g?(h._logWarn(o_.dumpObj(g)),y=p,s.headers["Content-Length"]=p.length.toString()):(s.headers["Content-Encoding"]="gzip",s.headers["Content-Length"]=A.length.toString()),h._logInfo(o_.dumpObj(s)),s[wws.disableCollectionRequestOption]=!0;var E=+new Date,_=a(function(b){b.setEncoding("utf-8");var I="";b.on("data",function(x){I+=x}),b.on("end",function(){var x,R=+new Date,w=R-E;if(h._numConsecutiveFailures=0,I.includes(Dws)&&b.statusCode===400&&(PZt.warn("Instrumentation key was invalid, please check the iKey"),(x=h._shutdownStatsbeat)===null||x===void 0||x.call(h)),h._isStatsbeatSender&&!h._statsbeatHasReachedIngestionAtLeastOnce&&(Nws.includes(b.statusCode)?h._statsbeatHasReachedIngestionAtLeastOnce=!0:h._statsbeatFailedToIngest()),h._statsbeat&&(b.statusCode==kws||b.statusCode==Pws?h._statsbeat.countThrottle(dU.StatsbeatNetworkCategory.Breeze,o,b.statusCode):h._statsbeat.countRequest(dU.StatsbeatNetworkCategory.Breeze,o,w,b.statusCode===200,b.statusCode)),h._enableDiskRetryMode){if(b.statusCode===200)h._resendTimer||(h._resendTimer=setTimeout(function(){h._resendTimer=null,h._sendFirstFileOnDisk()},h._resendInterval),h._resendTimer.unref());else if(h._isRetriable(b.statusCode))try{h._statsbeat&&h._statsbeat.countRetry(dU.StatsbeatNetworkCategory.Breeze,o,b.statusCode);var P=JSON.parse(I),k=[];P.errors&&(P.errors.forEach(function(D){(D.statusCode==429||D.statusCode==500||D.statusCode==503)&&k.push(e[D.index])}),k.length>0&&h._storeToDisk(k))}catch{h._storeToDisk(e)}}if(b.statusCode===307||b.statusCode===308)if(h._numConsecutiveRedirects++,h._numConsecutiveRedirects<10){var Q=b.headers.location?b.headers.location.toString():null;Q&&(h._redirectedHost=Q,h.send(e,r))}else{var M={name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."};h._statsbeat&&h._statsbeat.countException(dU.StatsbeatNetworkCategory.Breeze,o,M),typeof r=="function"&&r("Error sending telemetry because of circular redirects.")}else h._numConsecutiveRedirects=0,typeof r=="function"&&r(I),h._logInfo(I),typeof h._onSuccess=="function"&&h._onSuccess(I)})},"requestCallback"),v=o_.makeRequest(h._config,n,s,_);v.setTimeout(t.HTTP_TIMEOUT,function(){h._requestTimedOut=!0,v.abort()}),v.on("error",function(b){if(h._isStatsbeatSender&&!h._statsbeatHasReachedIngestionAtLeastOnce&&h._statsbeatFailedToIngest(),h._numConsecutiveFailures++,h._statsbeat&&h._statsbeat.countException(dU.StatsbeatNetworkCategory.Breeze,o,b),!h._enableDiskRetryMode||h._numConsecutiveFailures>0&&h._numConsecutiveFailures%t.MAX_CONNECTION_FAILURES_BEFORE_WARN===0){var I="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";h._enableDiskRetryMode&&(I="Ingestion endpoint could not be reached ".concat(h._numConsecutiveFailures," consecutive times. There may be resulting telemetry loss. Most recent error:")),h._logWarn(I,o_.dumpObj(b))}else{var I="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";h._logInfo(I,o_.dumpObj(b))}h._onErrorHelper(b),typeof r=="function"&&(b?(h._requestTimedOut&&(b.name="telemetry timeout",b.message="telemetry request timed out"),r(o_.dumpObj(b))):r("Error sending telemetry")),h._enableDiskRetryMode&&h._storeToDisk(e)}),v.write(y),v.end()}),m.label=5;case 5:return[2]}})})},t.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(o_.stringify(e))},t.prototype._isRetriable=function(e){return e===206||e===401||e===403||e===408||e===429||e===500||e===502||e===503||e===504},t.prototype._logInfo=function(e){for(var r=[],n=1;n=3&&this._shutdownStatsbeat())},t.prototype._storeToDisk=function(e){return qrt(this,void 0,void 0,function(){var r,n,o,s,c,l,u;return Grt(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,uB.confirmDirExists(this._tempDir)];case 1:return d.sent(),[3,3];case 2:return r=d.sent(),this._logWarn("Failed to create folder to put telemetry: "+o_.dumpObj(r)),this._onErrorHelper(r),[2];case 3:return d.trys.push([3,5,,6]),[4,$Ie.FileAccessControl.applyACLRules(this._tempDir)];case 4:return d.sent(),[3,6];case 5:return n=d.sent(),this._logWarn("Failed to apply file access control to folder: "+o_.dumpObj(n)),this._onErrorHelper(n),[2];case 6:return d.trys.push([6,8,,9]),[4,uB.getShallowDirectorySize(this._tempDir)];case 7:return o=d.sent(),o>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+o),[2]):[3,9];case 8:return s=d.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+o_.dumpObj(s)),this._onErrorHelper(s),[2];case 9:return d.trys.push([9,11,,12]),c="".concat(new Date().getTime(),".ai.json"),l=sY.join(this._tempDir,c),this._logInfo("saving data to disk at: "+l),[4,uB.writeFileAsync(l,o_.stringify(e),{mode:384})];case 10:return d.sent(),[3,12];case 11:return u=d.sent(),this._logWarn("Failed to persist telemetry to disk: "+o_.dumpObj(u)),this._onErrorHelper(u),[2];case 12:return[2]}})})},t.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),RZt.existsSync(this._tempDir)||RZt.mkdirSync(this._tempDir),$Ie.FileAccessControl.applyACLRulesSync(this._tempDir);var r=uB.getShallowDirectorySizeSync(this._tempDir);if(r>this._maxBytesOnDisk){this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+r);return}var n="".concat(new Date().getTime(),".ai.json"),o=sY.join(this._tempDir,n);this._logInfo("saving data before crash to disk at: "+o),RZt.writeFileSync(o,e,{mode:384})}catch(s){this._logWarn("Error while saving data to disk: "+o_.dumpObj(s)),this._onErrorHelper(s)}},t.prototype._sendFirstFileOnDisk=function(){return qrt(this,void 0,void 0,function(){var e,r,n,o,s,c;return Grt(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,uB.readdirAsync(this._tempDir)];case 1:return e=l.sent(),e=e.filter(function(u){return sY.basename(u).indexOf(".ai.json")>-1}),e.length>0?(r=e[0],n=sY.join(this._tempDir,r),[4,uB.readFileAsync(n)]):[3,5];case 2:return o=l.sent(),[4,uB.unlinkAsync(n)];case 3:return l.sent(),s=JSON.parse(o.toString()),[4,this.send(s)];case 4:l.sent(),l.label=5;case 5:return[3,7];case 6:return c=l.sent(),this._onErrorHelper(c),[3,7];case 7:return[2]}})})},t.prototype._onErrorHelper=function(e){typeof this._onError=="function"&&this._onError(e)},t.prototype._fileCleanupTask=function(){return qrt(this,void 0,void 0,function(){var e,r,n,o,s,c,l=this;return Grt(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,uB.readdirAsync(this._tempDir)];case 1:if(e=u.sent(),e=e.filter(function(d){return sY.basename(d).indexOf(".ai.json")>-1}),!(e.length>0))return[3,5];r=0,u.label=2;case 2:return rn,o?(s=sY.join(this._tempDir,e[r]),[4,uB.unlinkAsync(s).catch(function(d){l._onErrorHelper(d)})]):[3,4]):[3,5];case 3:u.sent(),u.label=4;case 4:return r++,[3,2];case 5:return[3,7];case 6:return c=u.sent(),c.code!="ENOENT"&&this._onErrorHelper(c),[3,7];case 7:return[2]}})})},t.TAG="Sender",t.WAIT_BETWEEN_RESEND=60*1e3,t.MAX_BYTES_ON_DISK=50*1024*1024,t.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,t.CLEANUP_TIMEOUT=3600*1e3,t.FILE_RETEMPTION_PERIOD=10080*60*1e3,t.TEMPDIR_PREFIX="appInsights-node",t.HTTP_TIMEOUT=2e4,t})();$Gn.exports=Mws});var WGn=T(Hrt=>{"use strict";f();Object.defineProperty(Hrt,"__esModule",{value:!0});Hrt.AzureVirtualMachine=void 0;var VGn=Kc(),Ows=Wm(),Bws=Sle(),Lws="http://169.254.169.254/metadata/instance/compute",Fws="api-version=2017-12-01",Uws="format=json",Qws="UNREACH",qws=(function(){function t(){}return a(t,"AzureVirtualMachine"),t.getAzureComputeMetadata=function(e,r){var n,o=this,s={},c="".concat(Lws,"?").concat(Fws,"&").concat(Uws),l=(n={method:"GET"},n[Bws.disableCollectionRequestOption]=!0,n.headers={Metadata:"True"},n),u=Ows.makeRequest(e,c,l,function(d){if(d.statusCode===200){s.isVM=!0;var p="";d.on("data",function(h){p+=h}),d.on("end",function(){try{var h=JSON.parse(p);s.id=h.vmId||"",s.subscriptionId=h.subscriptionId||"",s.osType=h.osType||""}catch(m){VGn.info(t.TAG,m)}r(s)})}else r(s)},!1,!1);u&&(setTimeout(function(){o._requestTimedOut=!0,u.abort()},t.HTTP_TIMEOUT),u.on("error",function(d){o._requestTimedOut&&d&&(d.name="telemetry timeout",d.message="telemetry request timed out"),d&&d.message&&d.message.indexOf(Qws)>-1?s.isVM=!1:VGn.info(t.TAG,d),r(s)}),u.end())},t.HTTP_TIMEOUT=2500,t.TAG="AzureVirtualMachine",t})();Hrt.AzureVirtualMachine=qws});var zGn=T(jrt=>{"use strict";f();Object.defineProperty(jrt,"__esModule",{value:!0});jrt.NetworkStatsbeat=void 0;var Gws=(function(){function t(e,r){this.endpoint=e,this.host=r,this.totalRequestCount=0,this.totalSuccesfulRequestCount=0,this.totalFailedRequestCount=[],this.retryCount=[],this.exceptionCount=[],this.throttleCount=[],this.intervalRequestExecutionTime=0,this.lastIntervalRequestExecutionTime=0,this.lastTime=+new Date,this.lastRequestCount=0}return a(t,"NetworkStatsbeat"),t})();jrt.NetworkStatsbeat=Gws});var ZGn=T((aY,XGn)=>{"use strict";f();var vD=aY&&aY.__assign||function(){return vD=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&s/o||0;if(n.lastIntervalRequestExecutionTime=n.intervalRequestExecutionTime,o>0){var l=Object.assign({endpoint:this._networkStatsbeatCollection[r].endpoint,host:this._networkStatsbeatCollection[r].host},e);this._statbeatMetrics.push({name:cu.StatsbeatCounter.REQUEST_DURATION,value:c,properties:l})}n.lastRequestCount=n.totalRequestCount,n.lastTime=n.time}},t.prototype._getShortHost=function(e){var r=e;try{var n=new RegExp(/^https?:\/\/(?:www\.)?([^\/.-]+)/),o=n.exec(e);o!=null&&o.length>1&&(r=o[1]),r=r.replace(".in.applicationinsights.azure.com","")}catch{}return r},t.prototype._trackRequestsCount=function(e){for(var r=this,n=a(function(l){s=o._networkStatsbeatCollection[l];var u=Object.assign({endpoint:s.endpoint,host:s.host},e);s.totalSuccesfulRequestCount>0&&(o._statbeatMetrics.push({name:cu.StatsbeatCounter.REQUEST_SUCCESS,value:s.totalSuccesfulRequestCount,properties:u}),s.totalSuccesfulRequestCount=0),s.totalFailedRequestCount.length>0&&(s.totalFailedRequestCount.forEach(function(d){u=Object.assign(vD(vD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:cu.StatsbeatCounter.REQUEST_FAILURE,value:d.count,properties:u})}),s.totalFailedRequestCount=[]),s.retryCount.length>0&&(s.retryCount.forEach(function(d){u=Object.assign(vD(vD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:cu.StatsbeatCounter.RETRY_COUNT,value:d.count,properties:u})}),s.retryCount=[]),s.throttleCount.length>0&&(s.throttleCount.forEach(function(d){u=Object.assign(vD(vD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:cu.StatsbeatCounter.THROTTLE_COUNT,value:d.count,properties:u})}),s.throttleCount=[]),s.exceptionCount.length>0&&(s.exceptionCount.forEach(function(d){u=Object.assign(vD(vD({},u),{exceptionType:d.exceptionType})),r._statbeatMetrics.push({name:cu.StatsbeatCounter.EXCEPTION_COUNT,value:d.count,properties:u})}),s.exceptionCount=[])},"_loop_1"),o=this,s,c=0;c0))return[3,2];for(e=[],r=0;r-1)return t.EU_CONNECTION_STRING;return t.NON_EU_CONNECTION_STRING},t.NON_EU_CONNECTION_STRING="InstrumentationKey=c4a29126-a7cb-47e5-b348-11414998b11e;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com",t.EU_CONNECTION_STRING="InstrumentationKey=7dc56bab-3c0c-4e9f-9ebb-d1acadee8d0f;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com",t.STATS_COLLECTION_SHORT_INTERVAL=9e5,t.STATS_COLLECTION_LONG_INTERVAL=864e5,t.STATS_COLLECTION_INITIAL_DELAY=15e3,t.TAG="Statsbeat",t})();XGn.exports=Jws});var rHn=T((Jkd,tHn)=>{"use strict";f();var Xws=require("url"),Zws=yXt(),eRs=kGn(),tRs=yle(),dB=dA(),rRs=DGn(),MZt=QGn(),eHn=tU(),nRs=ZGn(),iRs=kZt(),OZt=Wm(),$rt=Kc(),oRs=wZt(),sRs=(function(){function t(e){this._telemetryProcessors=[];var r=new Zws(e);if(this.config=r,!this.config.instrumentationKey||this.config.instrumentationKey=="")throw new Error("Instrumentation key not found, please provide a connection string before starting Application Insights SDK.");this.context=new tRs,this.commonProperties={},this.authorizationHandler=null,this.config.disableStatsbeat||(this._statsbeat=new nRs(this.config,this.context),this._statsbeat.enable(!0));var n=new iRs(this.config,this.getAuthorizationHandler,null,null,this._statsbeat);this.channel=new rRs(function(){return r.disableAppInsights},function(){return r.maxBatchSize},function(){return r.maxBatchIntervalMs},n)}return a(t,"TelemetryClient"),t.prototype.trackAvailability=function(e){this.track(e,dB.TelemetryType.Availability)},t.prototype.trackPageView=function(e){this.track(e,dB.TelemetryType.PageView)},t.prototype.trackTrace=function(e){this.track(e,dB.TelemetryType.Trace)},t.prototype.trackMetric=function(e){this.track(e,dB.TelemetryType.Metric)},t.prototype.trackException=function(e){e&&e.exception&&!OZt.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,dB.TelemetryType.Exception)},t.prototype.trackEvent=function(e){this.track(e,dB.TelemetryType.Event)},t.prototype.trackRequest=function(e){this.track(e,dB.TelemetryType.Request)},t.prototype.trackDependency=function(e){if(e&&!e.target&&e.data)try{e.target=new Xws.URL(e.data).host}catch(r){e.target=null,$rt.warn(t.TAG,"The URL object is failed to create.",r)}this.track(e,dB.TelemetryType.Dependency)},t.prototype.flush=function(e){this.channel.triggerSend(e?!!e.isAppCrashing:!1,e?e.callback:void 0)},t.prototype.track=function(e,r){if(e&&dB.telemetryTypeToBaseType(r)){var n=oRs.createEnvelope(e,r,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString());var o=this.runTelemetryProcessors(n,e.contextObjects);o=o&&MZt.samplingTelemetryProcessor(n,{correlationContext:eHn.CorrelationContextManager.getCurrentContext()}),MZt.preAggregatedMetricsTelemetryProcessor(n,this.context),o&&(MZt.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else $rt.warn(t.TAG,"track() requires telemetry object and telemetryType to be specified.")},t.prototype.setAutoPopulateAzureProperties=function(e){},t.prototype.getAuthorizationHandler=function(e){return e&&e.aadTokenCredential?(this.authorizationHandler||($rt.info(t.TAG,"Adding authorization handler"),this.authorizationHandler=new eRs(e.aadTokenCredential,e.aadAudience)),this.authorizationHandler):null},t.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},t.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},t.prototype.runTelemetryProcessors=function(e,r){var n=!0,o=this._telemetryProcessors.length;if(o===0)return n;r=r||{},r.correlationContext=eHn.CorrelationContextManager.getCurrentContext();for(var s=0;s{"use strict";f();var aRs=BZt&&BZt.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),cRs=rHn(),nHn=dXt(),lRs=Sle(),Vrt=Kc(),uRs=(function(t){aRs(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NodeClient"),e.prototype.trackNodeHttpRequestSync=function(r){r&&r.request&&r.response&&r.duration?nHn.trackRequestSync(this,r):Vrt.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},e.prototype.trackNodeHttpRequest=function(r){(r.duration||r.error)&&Vrt.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),r&&r.request&&r.response?nHn.trackRequest(this,r):Vrt.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},e.prototype.trackNodeHttpDependency=function(r){r&&r.request?lRs.trackRequest(this,r):Vrt.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},e})(cRs);iHn.exports=uRs});var aHn=T(sHn=>{"use strict";f();Object.defineProperty(sHn,"__esModule",{value:!0})});var dHn=T(ct=>{"use strict";f();Object.defineProperty(ct,"__esModule",{value:!0});ct.Configuration=ct.liveMetricsClient=ct.defaultClient=ct.DistributedTracingModes=void 0;ct.setup=ERs;ct.start=uHn;ct.getCorrelationContext=_Rs;ct.startOperation=vRs;ct.wrapWithCorrelationContext=bRs;ct.dispose=TRs;var FZt=tU(),dRs=HUn(),fRs=$Un(),UZt=Ktt(),pRs=JJt(),hRs=tQn(),mRs=fQn(),gRs=Sle(),ARs=dXt(),cHn=Dz(),WIe=Kc(),lHn=VQn(),QZt=zQn(),yRs=JQn();ct.TelemetryClient=oHn();ct.Contracts=dA();ct.azureFunctionsTypes=aHn();var LZt;(function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C"})(LZt||(ct.DistributedTracingModes=LZt={}));var zIe,YIe,KIe,JIe,XIe,Yle,Kle,cY,ZIe,exe,Jv=!1,Wrt;function ERs(t){return ct.defaultClient?WIe.info("The default client is already setup"):(ct.defaultClient=new ct.TelemetryClient(t),zIe=new dRs(ct.defaultClient),YIe=new fRs(ct.defaultClient),KIe=new UZt(ct.defaultClient),JIe=new pRs(ct.defaultClient),XIe=new hRs(ct.defaultClient),Yle=new mRs(ct.defaultClient),cY=new ARs(ct.defaultClient),ZIe=new gRs(ct.defaultClient),Kle||(Kle=new QZt.AutoCollectNativePerformance(ct.defaultClient)),exe=new yRs.AzureFunctionsHook(ct.defaultClient)),qZt}a(ERs,"setup");function CRs(){ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectExternalLoggers==null&&(ct.defaultClient.config.enableAutoCollectExternalLoggers=!0),ct.defaultClient.config.enableAutoCollectConsole==null&&(ct.defaultClient.config.enableAutoCollectConsole=!1),ct.defaultClient.config.enableAutoCollectExceptions==null&&(ct.defaultClient.config.enableAutoCollectExceptions=!0),ct.defaultClient.config.enableAutoCollectPerformance==null&&(ct.defaultClient.config.enableAutoCollectPerformance=!0),ct.defaultClient.config.enableAutoCollectPreAggregatedMetrics==null&&(ct.defaultClient.config.enableAutoCollectPreAggregatedMetrics=!0),ct.defaultClient.config.enableAutoCollectHeartbeat==null&&(ct.defaultClient.config.enableAutoCollectHeartbeat=!0),ct.defaultClient.config.enableAutoCollectRequests==null&&(ct.defaultClient.config.enableAutoCollectRequests=!0),ct.defaultClient.config.enableAutoCollectDependencies==null&&(ct.defaultClient.config.enableAutoCollectDependencies=!0),ct.defaultClient.config.enableUseDiskRetryCaching==null&&(ct.defaultClient.config.enableUseDiskRetryCaching=!0),ct.defaultClient.config.enableAutoDependencyCorrelation==null&&(ct.defaultClient.config.enableAutoDependencyCorrelation=!0),ct.defaultClient.config.enableSendLiveMetrics==null&&(ct.defaultClient.config.enableSendLiveMetrics=!1),ct.defaultClient.config.enableAutoCollectExtendedMetrics==null&&(ct.defaultClient.config.enableAutoCollectExtendedMetrics=!0),ct.defaultClient.config.enableWebInstrumentation==null&&(ct.defaultClient.config.enableWebInstrumentation=!1),ct.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions==null&&(ct.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=!1))}a(CRs,"_setDefaultConfig");function uHn(){if(ct.defaultClient){Jv=!0,CRs(),zIe.enable(ct.defaultClient.config.enableAutoCollectExternalLoggers,ct.defaultClient.config.enableAutoCollectConsole),YIe.enable(ct.defaultClient.config.enableAutoCollectExceptions),KIe.enable(ct.defaultClient.config.enableAutoCollectPerformance),JIe.enable(ct.defaultClient.config.enableAutoCollectPreAggregatedMetrics),XIe.enable(ct.defaultClient.config.enableAutoCollectHeartbeat),cY.useAutoCorrelation(ct.defaultClient.config.enableAutoDependencyCorrelation,ct.defaultClient.config.enableUseAsyncHooks),cY.enable(ct.defaultClient.config.enableAutoCollectRequests),ZIe.enable(ct.defaultClient.config.enableAutoCollectDependencies),Yle.enable(ct.defaultClient.config.enableWebInstrumentation,ct.defaultClient.config.webInstrumentationConnectionString),ct.defaultClient.config.enableSendLiveMetrics&&(ct.liveMetricsClient||(ct.liveMetricsClient=new lHn(ct.defaultClient.config,ct.defaultClient.context,ct.defaultClient.getAuthorizationHandler,ct.defaultClient),Wrt=new UZt(ct.liveMetricsClient,1e3,!0),ct.liveMetricsClient.addCollector(Wrt),ct.defaultClient.quickPulseClient=ct.liveMetricsClient),ct.liveMetricsClient.enable(ct.defaultClient.config.enableSendLiveMetrics)),exe.enable(ct.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions);var t=QZt.AutoCollectNativePerformance.parseEnabled(ct.defaultClient.config.enableAutoCollectExtendedMetrics,ct.defaultClient.config);Kle.enable(ct.defaultClient.config.enableAutoCollectExtendedMetrics,t.disabledMetrics),ct.defaultClient&&ct.defaultClient.channel&&ct.defaultClient.channel.setUseDiskRetryCaching(ct.defaultClient.config.enableUseDiskRetryCaching,ct.defaultClient.config.enableResendInterval,ct.defaultClient.config.enableMaxBytesOnDisk)}else WIe.warn("Start cannot be called before setup");return qZt}a(uHn,"start");function _Rs(){return FZt.CorrelationContextManager.getCurrentContext()}a(_Rs,"getCorrelationContext");function vRs(t,e){return FZt.CorrelationContextManager.startOperation(t,e)}a(vRs,"startOperation");function bRs(t,e){return FZt.CorrelationContextManager.wrapCallback(t,e)}a(bRs,"wrapWithCorrelationContext");var qZt=(function(){function t(){}return a(t,"Configuration"),t.setDistributedTracingMode=function(e){return cHn.w3cEnabled=e===LZt.AI_AND_W3C,t},t.setAutoCollectConsole=function(e,r){return r===void 0&&(r=!1),ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectExternalLoggers=e,ct.defaultClient.config.enableAutoCollectConsole=r,Jv&&zIe.enable(e,r)),t},t.setAutoCollectExceptions=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectExceptions=e,Jv&&YIe.enable(e)),t},t.setAutoCollectPerformance=function(e,r){if(r===void 0&&(r=!0),ct.defaultClient){ct.defaultClient.config.enableAutoCollectPerformance=e;var n=QZt.AutoCollectNativePerformance.parseEnabled(r,ct.defaultClient.config);ct.defaultClient.config.enableAutoCollectExtendedMetrics=n.isEnabled,Jv&&(KIe.enable(e),Kle.enable(ct.defaultClient.config.enableAutoCollectExtendedMetrics,n.disabledMetrics))}return t},t.setAutoCollectPreAggregatedMetrics=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectPreAggregatedMetrics=e,Jv&&JIe.enable(e)),t},t.setAutoCollectHeartbeat=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectHeartbeat=e,Jv&&XIe.enable(e)),t},t.enableAutoWebSnippetInjection=function(e,r){return ct.defaultClient&&(ct.defaultClient.config.enableWebInstrumentation=e,ct.defaultClient.config.webInstrumentationConnectionString=r,Jv&&Yle.enable(ct.defaultClient.config.enableAutoWebSnippetInjection,ct.defaultClient.config.webSnippetConnectionString)),t},t.enableWebInstrumentation=function(e,r){return ct.defaultClient&&(ct.defaultClient.config.enableWebInstrumentation=e,ct.defaultClient.config.webInstrumentationConnectionString=r,Jv&&Yle.enable(ct.defaultClient.config.enableWebInstrumentation,ct.defaultClient.config.webInstrumentationConnectionString)),t},t.setAutoCollectRequests=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectRequests=e,Jv&&cY.enable(e)),t},t.setAutoCollectDependencies=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectDependencies=e,Jv&&ZIe.enable(e)),t},t.setAutoDependencyCorrelation=function(e,r){return ct.defaultClient&&(ct.defaultClient.config.enableAutoDependencyCorrelation=e,ct.defaultClient.config.enableUseAsyncHooks=r,Jv&&cY.useAutoCorrelation(e,r)),t},t.setUseDiskRetryCaching=function(e,r,n){return ct.defaultClient&&(ct.defaultClient.config.enableUseDiskRetryCaching=e,ct.defaultClient.config.enableResendInterval=r,ct.defaultClient.config.enableMaxBytesOnDisk=n,ct.defaultClient.channel&&ct.defaultClient.channel.setUseDiskRetryCaching(ct.defaultClient.config.enableUseDiskRetryCaching,ct.defaultClient.config.enableResendInterval,ct.defaultClient.config.enableMaxBytesOnDisk)),t},t.setInternalLogging=function(e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),WIe.enableDebug=e,WIe.disableWarnings=!r,t},t.setAutoCollectIncomingRequestAzureFunctions=function(e){return ct.defaultClient&&(ct.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=e,Jv&&exe.enable(e)),t},t.setSendLiveMetrics=function(e){return e===void 0&&(e=!1),ct.defaultClient?(!ct.liveMetricsClient&&e?(ct.liveMetricsClient=new lHn(ct.defaultClient.config,ct.defaultClient.context,ct.defaultClient.getAuthorizationHandler,ct.defaultClient),Wrt=new UZt(ct.liveMetricsClient,1e3,!0),ct.liveMetricsClient.addCollector(Wrt),ct.defaultClient.quickPulseClient=ct.liveMetricsClient):ct.liveMetricsClient&&ct.liveMetricsClient.enable(e),ct.defaultClient.config.enableSendLiveMetrics=e,t):(WIe.warn("Live metrics client cannot be setup without the default client"),t)},t.start=uHn,t})();ct.Configuration=qZt;function TRs(){cHn.w3cEnabled=!0,ct.defaultClient=null,Jv=!1,zIe&&zIe.dispose(),YIe&&YIe.dispose(),KIe&&KIe.dispose(),JIe&&JIe.dispose(),XIe&&XIe.dispose(),Yle&&Yle.dispose(),Kle&&Kle.dispose(),cY&&cY.dispose(),ZIe&&ZIe.dispose(),ct.liveMetricsClient&&(ct.liveMetricsClient.enable(!1),ct.liveMetricsClient=void 0),exe&&exe.dispose()}a(TRs,"dispose")});var HZt=T(zS=>{"use strict";f();var SRs=zS&&zS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),IRs=zS&&zS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fHn=zS&&zS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{this.client.flush({callback:a(()=>{e(void 0)},"callback")})})}massageEventName(e){return PRs(e)?pHn(e):e.includes(this.namespace)?e:`${this.namespace}/${e}`}};zS.AzureInsightReporter=GZt;function kRs(t,e,r){let n=new xRs.TelemetryClient(r);return n.config.enableAutoCollectRequests=!1,n.config.enableAutoCollectPerformance=!1,n.config.enableAutoCollectExceptions=!1,n.config.enableAutoCollectConsole=!1,n.config.enableAutoCollectDependencies=!1,n.config.noDiagnosticChannel=!0,hHn(t,e,n),n}a(kRs,"createAppInsightsClient");function hHn(t,e,r){r.commonProperties=NRs(r.commonProperties,e),r.context.tags[r.context.keys.cloudRoleInstance]="REDACTED",r.context.tags[r.context.keys.sessionId]=e.sessionId,r.config.endpointUrl=t.copilotTelemetryURL}a(hHn,"configureReporter");function NRs(t,e){return t=t||{},t.common_os=zrt.platform(),t.common_platformversion=zrt.release(),t.common_arch=zrt.arch(),t.common_cpu=Array.from(new Set(zrt.cpus().map(r=>r.model))).join(),t.common_vscodemachineid=e.machineId,t.common_vscodesessionid=e.sessionId,t.client_deviceid=e.devDeviceId,t.common_uikind=e.uiKind,t.common_remotename=e.remoteName??"none",t.common_isnewappinstall="",t}a(NRs,"decorateWithCommonProperties")});var mHn=T((uNd,DRs)=>{DRs.exports={name:"copilot-chat",displayName:"GitHub Copilot Chat",description:"AI chat features powered by Copilot",version:"0.42.0",build:"1",internalAIKey:"1058ec22-3c95-4951-8443-f26c1f325911",completionsCoreVersion:"1.378.1799",internalLargeStorageAriaKey:"ec712b3202c5462fb6877acae7f1f9d7-c19ad55e-3e3c-4f99-984b-827f6d95bd9e-6917",ariaKey:"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",buildType:"dev",publisher:"GitHub",homepage:"https://github.com/features/copilot?editor=vscode",license:"SEE LICENSE IN LICENSE.txt",repository:{type:"git",url:"https://github.com/microsoft/vscode-copilot-chat"},bugs:{url:"https://github.com/microsoft/vscode/issues"},qna:"https://github.com/github-community/community/discussions/categories/copilot",icon:"assets/copilot.png",pricing:"Trial",engines:{vscode:"^1.111.0",npm:">=9.0.0",node:">=22.14.0"},categories:["AI","Chat","Programming Languages","Machine Learning"],keywords:["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin","co-pilot"],badges:[{url:"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange",href:"https://github.com/github-copilot/signup?editor=vscode",description:"%github.copilot.badge.signUp%"},{url:"https://img.shields.io/github/stars/github/copilot-docs?style=social",href:"https://github.com/github/copilot-docs",description:"%github.copilot.badge.star%"},{url:"https://img.shields.io/youtube/channel/views/UC7c3Kb6jYCRj4JOHHZTxKsQ?style=social",href:"https://www.youtube.com/@GitHub/search?query=copilot",description:"%github.copilot.badge.youtube%"},{url:"https://img.shields.io/twitter/follow/github?style=social",href:"https://twitter.com/github",description:"%github.copilot.badge.twitter%"}],activationEvents:["onStartupFinished","onLanguageModelChat:copilot","onUri","onFileSystem:ccreq","onFileSystem:ccsettings"],main:"./dist/extension",l10n:"./l10n",enabledApiProposals:["agentSessionsWorkspace","chatDebug@4","chatHooks@6","extensionsAny","newSymbolNamesProvider","interactive","codeActionAI","activeComment","commentReveal","contribCommentThreadAdditionalMenu","contribCommentsViewThreadMenus","contribChatEditorInlineGutterMenu","documentFiltersExclusive","embeddings","findTextInFiles","findTextInFiles2","languageModelToolSupportsModel@1","findFiles2@2","textSearchProvider","terminalDataWriteEvent","terminalExecuteCommandEvent","terminalSelection","terminalQuickFixProvider","mappedEditsProvider","aiRelatedInformation","aiSettingsSearch","chatParticipantAdditions@3","defaultChatParticipant@4","contribSourceControlInputBoxMenu","authLearnMore","testObserver","aiTextSearchProvider@2","chatParticipantPrivate@15","chatProvider@4","contribDebugCreateConfiguration","chatReferenceDiagnostic","textSearchProvider2","chatReferenceBinaryData","languageModelSystem","languageModelCapabilities","inlineCompletionsAdditions","chatStatusItem","taskProblemMatcherStatus","contribLanguageModelToolSets","textDocumentChangeReason","resolvers","taskExecutionTerminal","dataChannels","languageModelThinkingPart","chatSessionsProvider@3","devDeviceId","contribEditorContentMenu","chatPromptFiles","mcpServerDefinitions","tabInputMultiDiff","workspaceTrust","environmentPower","terminalTitle","toolInvocationApproveCombination"],contributes:{languageModelTools:[{name:"copilot_searchCodebase",toolReferenceName:"codebase",displayName:"%copilot.tools.searchCodebase.name%",icon:"$(folder)",userDescription:"%copilot.codebase.tool.description%",modelDescription:"Run a natural language search for relevant code or documentation comments from the user's current workspace. Returns relevant code snippets from the user's current workspace if it is large, or the full contents of the workspace if it is small.",tags:["codesearch","vscode_codesearch"],inputSchema:{type:"object",properties:{query:{type:"string",description:"The query to search the codebase for. Should contain all relevant context. Should ideally be text that might appear in the codebase, such as function names, variable names, or comments."}},required:["query"]}},{name:"execution_subagent",toolReferenceName:"executionSubagent",displayName:"%copilot.tools.executionSubagent.name%",icon:"$(play)",userDescription:"%copilot.tools.executionSubagent.description%",modelDescription:`Launch an iterative execution-focused subagent that performs an execution-based task. +`,"utf-8")],o=kxs(n);o&&t.headers.set("Content-Length",o),t.body=await(0,Ixs.concat)(n)}a(Dxs,"buildRequestBody");Vce.multipartPolicyName="multipartPolicy";var Nxs=70,Mxs=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Oxs(t){if(t.length>Nxs)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!Mxs.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}a(Oxs,"assertValidBoundary");function Bxs(){return{name:Vce.multipartPolicyName,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,o=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,c,l]=s;if(l&&n&&l!==n)throw new Error(`Multipart boundary was specified as ${l} in the header, but got ${n} in the request body`);return n??(n=l),n?Oxs(n):n=wxs(),t.headers.set("Content-Type",`${c}; boundary=${n}`),await Dxs(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}a(Bxs,"multipartPolicy")});var _Zt=T(Wce=>{"use strict";f();Object.defineProperty(Wce,"__esModule",{value:!0});Wce.decompressResponsePolicyName=void 0;Wce.decompressResponsePolicy=Lxs;Wce.decompressResponsePolicyName="decompressResponsePolicy";function Lxs(){return{name:Wce.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}a(Lxs,"decompressResponsePolicy")});var Dtt=T(ktt=>{"use strict";f();Object.defineProperty(ktt,"__esModule",{value:!0});ktt.delay=Qxs;ktt.parseHeaderValueAsNumber=qxs;var Fxs=wSe(),Uxs="The operation was aborted.";function Qxs(t,e,r){return new Promise((n,o)=>{let s,c,l=a(()=>o(new Fxs.AbortError(r?.abortErrorMsg?r?.abortErrorMsg:Uxs)),"rejectOnAbort"),u=a(()=>{r?.abortSignal&&c&&r.abortSignal.removeEventListener("abort",c)},"removeListeners");if(c=a(()=>(s&&clearTimeout(s),u(),l()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return l();s=setTimeout(()=>{u(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",c)})}a(Qxs,"delay");function qxs(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}a(qxs,"parseHeaderValueAsNumber")});var Mtt=T(Ntt=>{"use strict";f();Object.defineProperty(Ntt,"__esModule",{value:!0});Ntt.isThrottlingRetryResponse=jxs;Ntt.throttlingRetryStrategy=$xs;var Gxs=Dtt(),CZt="Retry-After",Hxs=["retry-after-ms","x-ms-retry-after-ms",CZt];function PGn(t){if(t&&[429,503].includes(t.status))try{for(let o of Hxs){let s=(0,Gxs.parseHeaderValueAsNumber)(t,o);if(s===0||s)return s*(o===CZt?1e3:1)}let e=t.headers.get(CZt);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}a(PGn,"getRetryAfterInMs");function jxs(t){return Number.isFinite(PGn(t))}a(jxs,"isThrottlingRetryResponse");function $xs(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=PGn(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}a($xs,"throttlingRetryStrategy")});var Ott=T(kSe=>{"use strict";f();Object.defineProperty(kSe,"__esModule",{value:!0});kSe.exponentialRetryStrategy=Kxs;kSe.isExponentialRetryResponse=kGn;kSe.isSystemError=DGn;var Vxs=aD(),Wxs=Mtt(),zxs=1e3,Yxs=1e3*64;function Kxs(t={}){var e,r;let n=(e=t.retryDelayInMs)!==null&&e!==void 0?e:zxs,o=(r=t.maxRetryDelayInMs)!==null&&r!==void 0?r:Yxs,s=n;return{name:"exponentialRetryStrategy",retry({retryCount:c,response:l,responseError:u}){let d=DGn(u),p=d&&t.ignoreSystemErrors,h=kGn(l),m=h&&t.ignoreHttpStatusCodes;if(l&&((0,Wxs.isThrottlingRetryResponse)(l)||!h)||m||p)return{skipStrategy:!0};if(u&&!d&&!h)return{errorToThrow:u};let A=s*Math.pow(2,c),y=Math.min(o,A);return s=y/2+(0,Vxs.getRandomIntegerInclusive)(0,y/2),{retryAfterInMs:s}}}}a(Kxs,"exponentialRetryStrategy");function kGn(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}a(kGn,"isExponentialRetryResponse");function DGn(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}a(DGn,"isSystemError")});var zce=T(vZt=>{"use strict";f();Object.defineProperty(vZt,"__esModule",{value:!0});vZt.retryPolicy=tws;var Jxs=Dtt(),Xxs=DZe(),Zxs=wSe(),NGn=B7(),MGn=(0,Xxs.createClientLogger)("core-rest-pipeline retryPolicy"),ews="retryPolicy";function tws(t,e={maxRetries:NGn.DEFAULT_RETRY_POLICY_COUNT}){let r=e.logger||MGn;return{name:ews,async sendRequest(n,o){var s,c;let l,u,d=-1;e:for(;;){d+=1,l=void 0,u=void 0;try{r.info(`Retry ${d}: Attempting to send request`,n.requestId),l=await o(n),r.info(`Retry ${d}: Received a response from request`,n.requestId)}catch(p){if(r.error(`Retry ${d}: Received an error from request`,n.requestId),u=p,!p||u.name!=="RestError")throw p;l=u.response}if(!((s=n.abortSignal)===null||s===void 0)&&s.aborted)throw r.error(`Retry ${d}: Request aborted.`),new Zxs.AbortError;if(d>=((c=e.maxRetries)!==null&&c!==void 0?c:NGn.DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${d}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),u)throw u;if(l)return l;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${d}: Processing ${t.length} retry strategies.`);t:for(let p of t){let h=p.logger||MGn;h.info(`Retry ${d}: Processing retry strategy ${p.name}.`);let m=p.retry({retryCount:d,response:l,responseError:u});if(m.skipStrategy){h.info(`Retry ${d}: Skipped.`);continue t}let{errorToThrow:g,retryAfterInMs:A,redirectTo:y}=m;if(g)throw h.error(`Retry ${d}: Retry strategy ${p.name} throws error:`,g),g;if(A||A===0){h.info(`Retry ${d}: Retry strategy ${p.name} retries after ${A}`),await(0,Jxs.delay)(A,void 0,{abortSignal:n.abortSignal});continue e}if(y){h.info(`Retry ${d}: Retry strategy ${p.name} redirects to ${y}`),n.url=y;continue e}}if(u)throw r.info("None of the retry strategies could work with the received error. Throwing it."),u;if(l)return r.info("None of the retry strategies could work with the received response. Returning it."),l}}}}a(tws,"retryPolicy")});var bZt=T(Yce=>{"use strict";f();Object.defineProperty(Yce,"__esModule",{value:!0});Yce.defaultRetryPolicyName=void 0;Yce.defaultRetryPolicy=sws;var rws=Ott(),nws=Mtt(),iws=zce(),ows=B7();Yce.defaultRetryPolicyName="defaultRetryPolicy";function sws(t={}){var e;return{name:Yce.defaultRetryPolicyName,sendRequest:(0,iws.retryPolicy)([(0,nws.throttlingRetryStrategy)(),(0,rws.exponentialRetryStrategy)(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:ows.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(sws,"defaultRetryPolicy")});var DSe=T(SZt=>{"use strict";f();Object.defineProperty(SZt,"__esModule",{value:!0});SZt.createHttpHeaders=cws;function Btt(t){return t.toLowerCase()}a(Btt,"normalizeName");function*aws(t){for(let e of t.values())yield[e.name,e.value]}a(aws,"headerIterator");var TZt=class{static{a(this,"HttpHeadersImpl")}constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(Btt(e),{name:e,value:String(r).trim()})}get(e){var r;return(r=this._headersMap.get(Btt(e)))===null||r===void 0?void 0:r.value}has(e){return this._headersMap.has(Btt(e))}delete(e){this._headersMap.delete(Btt(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,o]of this._headersMap)r[n]=o.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return aws(this._headersMap)}};function cws(t){return new TZt(t)}a(cws,"createHttpHeaders")});var IZt=T(Kce=>{"use strict";f();Object.defineProperty(Kce,"__esModule",{value:!0});Kce.formDataPolicyName=void 0;Kce.formDataPolicy=uws;var BGn=aD(),OGn=DSe();Kce.formDataPolicyName="formDataPolicy";function lws(t){var e;let r={};for(let[n,o]of t.entries())(e=r[n])!==null&&e!==void 0||(r[n]=[]),r[n].push(o);return r}a(lws,"formDataToFormDataMap");function uws(){return{name:Kce.formDataPolicyName,async sendRequest(t,e){if(BGn.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=lws(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=dws(t.formData):await fws(t.formData,t),t.formData=void 0}return e(t)}}}a(uws,"formDataPolicy");function dws(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.append(r,o.toString());else e.append(r,n.toString());return e.toString()}a(dws,"wwwFormUrlEncode");async function fws(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[o,s]of Object.entries(t))for(let c of Array.isArray(s)?s:[s])if(typeof c=="string")n.push({headers:(0,OGn.createHttpHeaders)({"Content-Disposition":`form-data; name="${o}"`}),body:(0,BGn.stringToUint8Array)(c,"utf-8")});else{if(c==null||typeof c!="object")throw new Error(`Unexpected value for key ${o}: ${c}. Value should be serialized to string first.`);{let l=c.name||"blob",u=(0,OGn.createHttpHeaders)();u.set("Content-Disposition",`form-data; name="${o}"; filename="${l}"`),u.set("Content-Type",c.type||"application/octet-stream"),n.push({headers:u,body:c})}}e.multipartBody={parts:n}}a(fws,"prepareFormData")});var xZt=T(OS=>{"use strict";f();Object.defineProperty(OS,"__esModule",{value:!0});OS.globalNoProxyList=OS.proxyPolicyName=void 0;OS.loadNoProxy=qGn;OS.getDefaultProxySettings=vws;OS.proxyPolicy=Tws;var pws=aTt(),hws=cTt(),mws=lz(),gws="HTTPS_PROXY",Aws="HTTP_PROXY",yws="ALL_PROXY",Ews="NO_PROXY";OS.proxyPolicyName="proxyPolicy";OS.globalNoProxyList=[];var UGn=!1,_ws=new Map;function Ltt(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}a(Ltt,"getEnvironmentValue");function QGn(){if(!process)return;let t=Ltt(gws),e=Ltt(yws),r=Ltt(Aws);return t||e||r}a(QGn,"loadEnvironmentProxyValue");function Cws(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let o=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(o=!0):n===s&&(o=!0);return r?.set(n,o),o}a(Cws,"isBypassed");function qGn(){let t=Ltt(Ews);return UGn=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(qGn,"loadNoProxy");function vws(t){if(!t&&(t=QGn(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}a(vws,"getDefaultProxySettings");function bws(){let t=QGn();return t?new URL(t):void 0}a(bws,"getDefaultProxySettingsInternal");function LGn(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}a(LGn,"getUrlFromProxySettings");function FGn(t,e,r){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&mws.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new hws.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new pws.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}a(FGn,"setProxyAgentOnRequest");function Tws(t,e){UGn||OS.globalNoProxyList.push(...qGn());let r=t?LGn(t):bws(),n={};return{name:OS.proxyPolicyName,async sendRequest(o,s){var c;return!o.proxySettings&&r&&!Cws(o.url,(c=e?.customNoProxyList)!==null&&c!==void 0?c:OS.globalNoProxyList,e?.customNoProxyList?void 0:_ws)?FGn(o,n,r):o.proxySettings&&FGn(o,n,LGn(o.proxySettings)),s(o)}}}a(Tws,"proxyPolicy")});var wZt=T(Jce=>{"use strict";f();Object.defineProperty(Jce,"__esModule",{value:!0});Jce.setClientRequestIdPolicyName=void 0;Jce.setClientRequestIdPolicy=Sws;Jce.setClientRequestIdPolicyName="setClientRequestIdPolicy";function Sws(t="x-ms-client-request-id"){return{name:Jce.setClientRequestIdPolicyName,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}a(Sws,"setClientRequestIdPolicy")});var RZt=T(Xce=>{"use strict";f();Object.defineProperty(Xce,"__esModule",{value:!0});Xce.tlsPolicyName=void 0;Xce.tlsPolicy=Iws;Xce.tlsPolicyName="tlsPolicy";function Iws(t){return{name:Xce.tlsPolicyName,sendRequest:a(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}a(Iws,"tlsPolicy")});var PZt=T(jO=>{"use strict";f();Object.defineProperty(jO,"__esModule",{value:!0});jO.TracingContextImpl=jO.knownContextKeys=void 0;jO.createTracingContext=xws;jO.knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function xws(t={}){let e=new Ftt(t.parentContext);return t.span&&(e=e.setValue(jO.knownContextKeys.span,t.span)),t.namespace&&(e=e.setValue(jO.knownContextKeys.namespace,t.namespace)),e}a(xws,"createTracingContext");var Ftt=class t{static{a(this,"TracingContextImpl")}constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};jO.TracingContextImpl=Ftt});var kZt=T(Zce=>{"use strict";f();Object.defineProperty(Zce,"__esModule",{value:!0});Zce.createDefaultTracingSpan=GGn;Zce.createDefaultInstrumenter=HGn;Zce.useInstrumenter=Rws;Zce.getInstrumenter=Pws;var wws=PZt(),Utt=tCt();function GGn(){return{end:a(()=>{},"end"),isRecording:a(()=>!1,"isRecording"),recordException:a(()=>{},"recordException"),setAttribute:a(()=>{},"setAttribute"),setStatus:a(()=>{},"setStatus"),addEvent:a(()=>{},"addEvent")}}a(GGn,"createDefaultTracingSpan");function HGn(){return{createRequestHeaders:a(()=>({}),"createRequestHeaders"),parseTraceparentHeader:a(()=>{},"parseTraceparentHeader"),startSpan:a((t,e)=>({span:GGn(),tracingContext:(0,wws.createTracingContext)({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}a(HGn,"createDefaultInstrumenter");function Rws(t){Utt.state.instrumenterImplementation=t}a(Rws,"useInstrumenter");function Pws(){return Utt.state.instrumenterImplementation||(Utt.state.instrumenterImplementation=HGn()),Utt.state.instrumenterImplementation}a(Pws,"getInstrumenter")});var jGn=T(NZt=>{"use strict";f();Object.defineProperty(NZt,"__esModule",{value:!0});NZt.createTracingClient=kws;var Qtt=kZt(),DZt=PZt();function kws(t){let{namespace:e,packageName:r,packageVersion:n}=t;function o(d,p,h){var m;let g=(0,Qtt.getInstrumenter)().startSpan(d,Object.assign(Object.assign({},h),{packageName:r,packageVersion:n,tracingContext:(m=p?.tracingOptions)===null||m===void 0?void 0:m.tracingContext})),A=g.tracingContext,y=g.span;A.getValue(DZt.knownContextKeys.namespace)||(A=A.setValue(DZt.knownContextKeys.namespace,e)),y.setAttribute("az.namespace",A.getValue(DZt.knownContextKeys.namespace));let E=Object.assign({},p,{tracingOptions:Object.assign(Object.assign({},p?.tracingOptions),{tracingContext:A})});return{span:y,updatedOptions:E}}a(o,"startSpan");async function s(d,p,h,m){let{span:g,updatedOptions:A}=o(d,p,m);try{let y=await c(A.tracingOptions.tracingContext,()=>Promise.resolve(h(A,g)));return g.setStatus({status:"success"}),y}catch(y){throw g.setStatus({status:"error",error:y}),y}finally{g.end()}}a(s,"withSpan");function c(d,p,...h){return(0,Qtt.getInstrumenter)().withContext(d,p,...h)}a(c,"withContext");function l(d){return(0,Qtt.getInstrumenter)().parseTraceparentHeader(d)}a(l,"parseTraceparentHeader");function u(d){return(0,Qtt.getInstrumenter)().createRequestHeaders(d)}return a(u,"createRequestHeaders"),{startSpan:o,withSpan:s,withContext:c,parseTraceparentHeader:l,createRequestHeaders:u}}a(kws,"createTracingClient")});var $Gn=T(ele=>{"use strict";f();Object.defineProperty(ele,"__esModule",{value:!0});ele.createTracingClient=ele.useInstrumenter=void 0;var Dws=kZt();Object.defineProperty(ele,"useInstrumenter",{enumerable:!0,get:a(function(){return Dws.useInstrumenter},"get")});var Nws=jGn();Object.defineProperty(ele,"createTracingClient",{enumerable:!0,get:a(function(){return Nws.createTracingClient},"get")})});var VGn=T(qtt=>{"use strict";f();Object.defineProperty(qtt,"__esModule",{value:!0});qtt.custom=void 0;var Mws=require("node:util");qtt.custom=Mws.inspect.custom});var Gtt=T(NSe=>{"use strict";f();Object.defineProperty(NSe,"__esModule",{value:!0});NSe.RestError=void 0;NSe.isRestError=Uws;var Ows=aD(),Bws=VGn(),Lws=Itt(),Fws=new Lws.Sanitizer,tle=class t extends Error{static{a(this,"RestError")}constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}[Bws.custom](){return`RestError: ${this.message} + ${Fws.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}};NSe.RestError=tle;tle.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";tle.PARSE_ERROR="PARSE_ERROR";function Uws(t){return t instanceof tle?!0:(0,Ows.isError)(t)&&t.name==="RestError"}a(Uws,"isRestError")});var MZt=T(rle=>{"use strict";f();Object.defineProperty(rle,"__esModule",{value:!0});rle.tracingPolicyName=void 0;rle.tracingPolicy=$ws;var Qws=$Gn(),qws=B7(),Gws=hZt(),Htt=lz(),MSe=aD(),Hws=Gtt(),jws=Itt();rle.tracingPolicyName="tracingPolicy";function $ws(t={}){let e=(0,Gws.getUserAgentValue)(t.userAgentPrefix),r=new jws.Sanitizer({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=Vws();return{name:rle.tracingPolicyName,async sendRequest(o,s){var c,l;if(!n||!(!((c=o.tracingOptions)===null||c===void 0)&&c.tracingContext))return s(o);let u=await e,d={"http.url":r.sanitizeUrl(o.url),"http.method":o.method,"http.user_agent":u,requestId:o.requestId};u&&(d["http.user_agent"]=u);let{span:p,tracingContext:h}=(l=Wws(n,o,d))!==null&&l!==void 0?l:{};if(!p||!h)return s(o);try{let m=await n.withContext(h,s,o);return Yws(p,m),m}catch(m){throw zws(p,m),m}}}}a($ws,"tracingPolicy");function Vws(){try{return(0,Qws.createTracingClient)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:qws.SDK_VERSION})}catch(t){Htt.logger.warning(`Error when creating the TracingClient: ${(0,MSe.getErrorMessage)(t)}`);return}}a(Vws,"tryCreateTracingClient");function Wws(t,e,r){try{let{span:n,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let s=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[c,l]of Object.entries(s))e.headers.set(c,l);return{span:n,tracingContext:o.tracingOptions.tracingContext}}catch(n){Htt.logger.warning(`Skipping creating a tracing span due to an error: ${(0,MSe.getErrorMessage)(n)}`);return}}a(Wws,"tryCreateSpan");function zws(t,e){try{t.setStatus({status:"error",error:(0,MSe.isError)(e)?e:void 0}),(0,Hws.isRestError)(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){Htt.logger.warning(`Skipping tracing span processing due to an error: ${(0,MSe.getErrorMessage)(r)}`)}}a(zws,"tryProcessError");function Yws(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),t.setStatus({status:"success"}),t.end()}catch(r){Htt.logger.warning(`Skipping tracing span processing due to an error: ${(0,MSe.getErrorMessage)(r)}`)}}a(Yws,"tryProcessResponse")});var YGn=T(OZt=>{"use strict";f();Object.defineProperty(OZt,"__esModule",{value:!0});OZt.createPipelineFromOptions=aRs;var Kws=uZt(),Jws=qXt(),Xws=dZt(),Zws=mZt(),WGn=EZt(),eRs=_Zt(),tRs=bZt(),rRs=IZt(),zGn=aD(),nRs=xZt(),iRs=wZt(),oRs=RZt(),sRs=MZt();function aRs(t){var e;let r=(0,Jws.createEmptyPipeline)();return zGn.isNodeLike&&(t.tlsOptions&&r.addPolicy((0,oRs.tlsPolicy)(t.tlsOptions)),r.addPolicy((0,nRs.proxyPolicy)(t.proxyOptions)),r.addPolicy((0,eRs.decompressResponsePolicy)())),r.addPolicy((0,rRs.formDataPolicy)(),{beforePolicies:[WGn.multipartPolicyName]}),r.addPolicy((0,Zws.userAgentPolicy)(t.userAgentOptions)),r.addPolicy((0,iRs.setClientRequestIdPolicy)((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),r.addPolicy((0,WGn.multipartPolicy)(),{afterPhase:"Deserialize"}),r.addPolicy((0,tRs.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),r.addPolicy((0,sRs.tracingPolicy)(Object.assign(Object.assign({},t.userAgentOptions),t.loggingOptions)),{afterPhase:"Retry"}),zGn.isNodeLike&&r.addPolicy((0,Xws.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),r.addPolicy((0,Kws.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),r}a(aRs,"createPipelineFromOptions")});var tHn=T($tt=>{"use strict";f();Object.defineProperty($tt,"__esModule",{value:!0});$tt.getBodyLength=eHn;$tt.createNodeHttpClient=hRs;var UZt=(bM(),Aa(k8)),BZt=UZt.__importStar(require("node:http")),LZt=UZt.__importStar(require("node:https")),KGn=UZt.__importStar(require("node:zlib")),cRs=require("node:stream"),JGn=wSe(),lRs=DSe(),LSe=Gtt(),OSe=lz(),uRs={};function BSe(t){return t&&typeof t.pipe=="function"}a(BSe,"isReadableStream");function XGn(t){return new Promise(e=>{t.on("close",e),t.on("end",e),t.on("error",e)})}a(XGn,"isStreamComplete");function ZGn(t){return t&&typeof t.byteLength=="number"}a(ZGn,"isArrayBuffer");var jtt=class extends cRs.Transform{static{a(this,"ReportTransform")}_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},FZt=class{static{a(this,"NodeHttpClient")}constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,o;let s=new AbortController,c;if(e.abortSignal){if(e.abortSignal.aborted)throw new JGn.AbortError("The operation was aborted.");c=a(h=>{h.type==="abort"&&s.abort()},"abortListener"),e.abortSignal.addEventListener("abort",c)}e.timeout>0&&setTimeout(()=>{s.abort()},e.timeout);let l=e.headers.get("Accept-Encoding"),u=l?.includes("gzip")||l?.includes("deflate"),d=typeof e.body=="function"?e.body():e.body;if(d&&!e.headers.has("Content-Length")){let h=eHn(d);h!==null&&e.headers.set("Content-Length",h)}let p;try{if(d&&e.onUploadProgress){let E=e.onUploadProgress,_=new jtt(E);_.on("error",v=>{OSe.logger.error("Error in upload progress",v)}),BSe(d)?d.pipe(_):_.end(d),d=_}let h=await this.makeRequest(e,s,d),m=dRs(h),A={status:(r=h.statusCode)!==null&&r!==void 0?r:0,headers:m,request:e};if(e.method==="HEAD")return h.resume(),A;p=u?fRs(h,m):h;let y=e.onDownloadProgress;if(y){let E=new jtt(y);E.on("error",_=>{OSe.logger.error("Error in download progress",_)}),p.pipe(E),p=E}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(A.status)?A.readableStreamBody=p:A.bodyAsText=await pRs(p),A}finally{if(e.abortSignal&&c){let h=Promise.resolve();BSe(d)&&(h=XGn(d));let m=Promise.resolve();BSe(p)&&(m=XGn(p)),Promise.all([h,m]).then(()=>{var g;c&&((g=e.abortSignal)===null||g===void 0||g.removeEventListener("abort",c))}).catch(g=>{OSe.logger.warning("Error when cleaning up abortListener on httpRequest",g)})}}}makeRequest(e,r,n){var o;let s=new URL(e.url),c=s.protocol!=="https:";if(c&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let u={agent:(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,c),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise((d,p)=>{let h=c?BZt.request(u,d):LZt.request(u,d);h.once("error",m=>{var g;p(new LSe.RestError(m.message,{code:(g=m.code)!==null&&g!==void 0?g:LSe.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let m=new JGn.AbortError("The operation was aborted.");h.destroy(m),p(m)}),n&&BSe(n)?n.pipe(h):n?typeof n=="string"||Buffer.isBuffer(n)?h.end(n):ZGn(n)?h.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(OSe.logger.error("Unrecognized body type",n),p(new LSe.RestError("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){var n;let o=e.disableKeepAlive;if(r)return o?BZt.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new BZt.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return LZt.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:uRs,c=this.cachedHttpsAgents.get(s);return c&&c.options.keepAlive===!o||(OSe.logger.info("No cached TLS Agent exist, creating a new Agent"),c=new LZt.Agent(Object.assign({keepAlive:!o},s)),this.cachedHttpsAgents.set(s,c)),c}}};function dRs(t){let e=(0,lRs.createHttpHeaders)();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}a(dRs,"getResponseHeaders");function fRs(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=KGn.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=KGn.createInflate();return t.pipe(n),n}return t}a(fRs,"getDecodedResponseStream");function pRs(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new LSe.RestError(`Error reading response as text: ${o.message}`,{code:LSe.RestError.PARSE_ERROR}))})})}a(pRs,"streamToText");function eHn(t){return t?Buffer.isBuffer(t)?t.length:BSe(t)?null:ZGn(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}a(eHn,"getBodyLength");function hRs(){return new FZt}a(hRs,"createNodeHttpClient")});var rHn=T(QZt=>{"use strict";f();Object.defineProperty(QZt,"__esModule",{value:!0});QZt.createDefaultHttpClient=gRs;var mRs=tHn();function gRs(){return(0,mRs.createNodeHttpClient)()}a(gRs,"createDefaultHttpClient")});var nHn=T(GZt=>{"use strict";f();Object.defineProperty(GZt,"__esModule",{value:!0});GZt.createPipelineRequest=ERs;var ARs=DSe(),yRs=aD(),qZt=class{static{a(this,"PipelineRequestImpl")}constructor(e){var r,n,o,s,c,l,u;this.url=e.url,this.body=e.body,this.headers=(r=e.headers)!==null&&r!==void 0?r:(0,ARs.createHttpHeaders)(),this.method=(n=e.method)!==null&&n!==void 0?n:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(s=e.disableKeepAlive)!==null&&s!==void 0?s:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(c=e.withCredentials)!==null&&c!==void 0?c:!1,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,yRs.randomUUID)(),this.allowInsecureConnection=(l=e.allowInsecureConnection)!==null&&l!==void 0?l:!1,this.enableBrowserStreams=(u=e.enableBrowserStreams)!==null&&u!==void 0?u:!1}};function ERs(t){return new qZt(t)}a(ERs,"createPipelineRequest")});var iHn=T(FSe=>{"use strict";f();Object.defineProperty(FSe,"__esModule",{value:!0});FSe.exponentialRetryPolicyName=void 0;FSe.exponentialRetryPolicy=bRs;var _Rs=Ott(),CRs=zce(),vRs=B7();FSe.exponentialRetryPolicyName="exponentialRetryPolicy";function bRs(t={}){var e;return(0,CRs.retryPolicy)([(0,_Rs.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreSystemErrors:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:vRs.DEFAULT_RETRY_POLICY_COUNT})}a(bRs,"exponentialRetryPolicy")});var oHn=T(nle=>{"use strict";f();Object.defineProperty(nle,"__esModule",{value:!0});nle.systemErrorRetryPolicyName=void 0;nle.systemErrorRetryPolicy=xRs;var TRs=Ott(),SRs=zce(),IRs=B7();nle.systemErrorRetryPolicyName="systemErrorRetryPolicy";function xRs(t={}){var e;return{name:nle.systemErrorRetryPolicyName,sendRequest:(0,SRs.retryPolicy)([(0,TRs.exponentialRetryStrategy)(Object.assign(Object.assign({},t),{ignoreHttpStatusCodes:!0}))],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:IRs.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(xRs,"systemErrorRetryPolicy")});var sHn=T(ile=>{"use strict";f();Object.defineProperty(ile,"__esModule",{value:!0});ile.throttlingRetryPolicyName=void 0;ile.throttlingRetryPolicy=kRs;var wRs=Mtt(),RRs=zce(),PRs=B7();ile.throttlingRetryPolicyName="throttlingRetryPolicy";function kRs(t={}){var e;return{name:ile.throttlingRetryPolicyName,sendRequest:(0,RRs.retryPolicy)([(0,wRs.throttlingRetryStrategy)()],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:PRs.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}a(kRs,"throttlingRetryPolicy")});var HZt=T(ole=>{"use strict";f();Object.defineProperty(ole,"__esModule",{value:!0});ole.DEFAULT_CYCLER_OPTIONS=void 0;ole.createTokenCycler=MRs;var DRs=Dtt();ole.DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function NRs(t,e,r){async function n(){if(Date.now()t.getToken(u,d),"tryGetAccessToken"),s.retryIntervalInMs,(p=n?.expiresOnTimestamp)!==null&&p!==void 0?p:Date.now()).then(m=>(r=null,n=m,o=d.tenantId,n)).catch(m=>{throw r=null,n=null,o=void 0,m})),r}return a(l,"refresh"),async(u,d)=>{let p=!!d.claims,h=o!==d.tenantId;return p&&(n=null),h||p||c.mustRefresh?l(u,d):(c.shouldRefresh&&l(u,d),n)}}a(MRs,"createTokenCycler")});var aHn=T(sle=>{"use strict";f();Object.defineProperty(sle,"__esModule",{value:!0});sle.bearerTokenAuthenticationPolicyName=void 0;sle.bearerTokenAuthenticationPolicy=URs;var ORs=HZt(),BRs=lz();sle.bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy";async function LRs(t){let{scopes:e,getAccessToken:r,request:n}=t,o={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions},s=await r(e,o);s&&t.request.headers.set("Authorization",`Bearer ${s.token}`)}a(LRs,"defaultAuthorizeRequest");function FRs(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}a(FRs,"getChallenge");function URs(t){var e;let{credential:r,scopes:n,challengeCallbacks:o}=t,s=t.logger||BRs.logger,c=Object.assign({authorizeRequest:(e=o?.authorizeRequest)!==null&&e!==void 0?e:LRs,authorizeRequestOnChallenge:o?.authorizeRequestOnChallenge},o),l=r?(0,ORs.createTokenCycler)(r):()=>Promise.resolve(null);return{name:sle.bearerTokenAuthenticationPolicyName,async sendRequest(u,d){if(!u.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await c.authorizeRequest({scopes:Array.isArray(n)?n:[n],request:u,getAccessToken:l,logger:s});let p,h;try{p=await d(u)}catch(m){h=m,p=m.response}if(c.authorizeRequestOnChallenge&&p?.status===401&&FRs(p)&&await c.authorizeRequestOnChallenge({scopes:Array.isArray(n)?n:[n],request:u,response:p,getAccessToken:l,logger:s}))return d(u);if(h)throw h;return p}}}a(URs,"bearerTokenAuthenticationPolicy")});var cHn=T(ale=>{"use strict";f();Object.defineProperty(ale,"__esModule",{value:!0});ale.ndJsonPolicyName=void 0;ale.ndJsonPolicy=QRs;ale.ndJsonPolicyName="ndJsonPolicy";function QRs(){return{name:ale.ndJsonPolicyName,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let r=JSON.parse(t.body);Array.isArray(r)&&(t.body=r.map(n=>JSON.stringify(n)+` +`).join(""))}return e(t)}}}a(QRs,"ndJsonPolicy")});var uHn=T(fz=>{"use strict";f();Object.defineProperty(fz,"__esModule",{value:!0});fz.auxiliaryAuthenticationHeaderPolicyName=void 0;fz.auxiliaryAuthenticationHeaderPolicy=jRs;var qRs=HZt(),GRs=lz();fz.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var lHn="x-ms-authorization-auxiliary";async function HRs(t){var e,r;let{scopes:n,getAccessToken:o,request:s}=t,c={abortSignal:s.abortSignal,tracingOptions:s.tracingOptions};return(r=(e=await o(n,c))===null||e===void 0?void 0:e.token)!==null&&r!==void 0?r:""}a(HRs,"sendAuthorizeRequest");function jRs(t){let{credentials:e,scopes:r}=t,n=t.logger||GRs.logger,o=new WeakMap;return{name:fz.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,c){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${fz.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),c(s);let l=[];for(let d of e){let p=o.get(d);p||(p=(0,qRs.createTokenCycler)(d),o.set(d,p)),l.push(HRs({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:p,logger:n}))}let u=(await Promise.all(l)).filter(d=>!!d);return u.length===0?(n.warning(`None of the auxiliary tokens are valid. ${lHn} header will not be set.`),c(s)):(s.headers.set(lHn,u.map(d=>`Bearer ${d}`).join(", ")),c(s))}}}a(jRs,"auxiliaryAuthenticationHeaderPolicy")});var wHn=T(ar=>{"use strict";f();Object.defineProperty(ar,"__esModule",{value:!0});ar.createFileFromStream=ar.createFile=ar.auxiliaryAuthenticationHeaderPolicyName=ar.auxiliaryAuthenticationHeaderPolicy=ar.ndJsonPolicyName=ar.ndJsonPolicy=ar.bearerTokenAuthenticationPolicyName=ar.bearerTokenAuthenticationPolicy=ar.formDataPolicyName=ar.formDataPolicy=ar.tlsPolicyName=ar.tlsPolicy=ar.userAgentPolicyName=ar.userAgentPolicy=ar.defaultRetryPolicy=ar.tracingPolicyName=ar.tracingPolicy=ar.retryPolicy=ar.throttlingRetryPolicyName=ar.throttlingRetryPolicy=ar.systemErrorRetryPolicyName=ar.systemErrorRetryPolicy=ar.redirectPolicyName=ar.redirectPolicy=ar.getDefaultProxySettings=ar.proxyPolicyName=ar.proxyPolicy=ar.multipartPolicyName=ar.multipartPolicy=ar.logPolicyName=ar.logPolicy=ar.setClientRequestIdPolicyName=ar.setClientRequestIdPolicy=ar.exponentialRetryPolicyName=ar.exponentialRetryPolicy=ar.decompressResponsePolicyName=ar.decompressResponsePolicy=ar.isRestError=ar.RestError=ar.createPipelineRequest=ar.createHttpHeaders=ar.createDefaultHttpClient=ar.createPipelineFromOptions=ar.createEmptyPipeline=void 0;var $Rs=qXt();Object.defineProperty(ar,"createEmptyPipeline",{enumerable:!0,get:a(function(){return $Rs.createEmptyPipeline},"get")});var VRs=YGn();Object.defineProperty(ar,"createPipelineFromOptions",{enumerable:!0,get:a(function(){return VRs.createPipelineFromOptions},"get")});var WRs=rHn();Object.defineProperty(ar,"createDefaultHttpClient",{enumerable:!0,get:a(function(){return WRs.createDefaultHttpClient},"get")});var zRs=DSe();Object.defineProperty(ar,"createHttpHeaders",{enumerable:!0,get:a(function(){return zRs.createHttpHeaders},"get")});var YRs=nHn();Object.defineProperty(ar,"createPipelineRequest",{enumerable:!0,get:a(function(){return YRs.createPipelineRequest},"get")});var dHn=Gtt();Object.defineProperty(ar,"RestError",{enumerable:!0,get:a(function(){return dHn.RestError},"get")});Object.defineProperty(ar,"isRestError",{enumerable:!0,get:a(function(){return dHn.isRestError},"get")});var fHn=_Zt();Object.defineProperty(ar,"decompressResponsePolicy",{enumerable:!0,get:a(function(){return fHn.decompressResponsePolicy},"get")});Object.defineProperty(ar,"decompressResponsePolicyName",{enumerable:!0,get:a(function(){return fHn.decompressResponsePolicyName},"get")});var pHn=iHn();Object.defineProperty(ar,"exponentialRetryPolicy",{enumerable:!0,get:a(function(){return pHn.exponentialRetryPolicy},"get")});Object.defineProperty(ar,"exponentialRetryPolicyName",{enumerable:!0,get:a(function(){return pHn.exponentialRetryPolicyName},"get")});var hHn=wZt();Object.defineProperty(ar,"setClientRequestIdPolicy",{enumerable:!0,get:a(function(){return hHn.setClientRequestIdPolicy},"get")});Object.defineProperty(ar,"setClientRequestIdPolicyName",{enumerable:!0,get:a(function(){return hHn.setClientRequestIdPolicyName},"get")});var mHn=uZt();Object.defineProperty(ar,"logPolicy",{enumerable:!0,get:a(function(){return mHn.logPolicy},"get")});Object.defineProperty(ar,"logPolicyName",{enumerable:!0,get:a(function(){return mHn.logPolicyName},"get")});var gHn=EZt();Object.defineProperty(ar,"multipartPolicy",{enumerable:!0,get:a(function(){return gHn.multipartPolicy},"get")});Object.defineProperty(ar,"multipartPolicyName",{enumerable:!0,get:a(function(){return gHn.multipartPolicyName},"get")});var jZt=xZt();Object.defineProperty(ar,"proxyPolicy",{enumerable:!0,get:a(function(){return jZt.proxyPolicy},"get")});Object.defineProperty(ar,"proxyPolicyName",{enumerable:!0,get:a(function(){return jZt.proxyPolicyName},"get")});Object.defineProperty(ar,"getDefaultProxySettings",{enumerable:!0,get:a(function(){return jZt.getDefaultProxySettings},"get")});var AHn=dZt();Object.defineProperty(ar,"redirectPolicy",{enumerable:!0,get:a(function(){return AHn.redirectPolicy},"get")});Object.defineProperty(ar,"redirectPolicyName",{enumerable:!0,get:a(function(){return AHn.redirectPolicyName},"get")});var yHn=oHn();Object.defineProperty(ar,"systemErrorRetryPolicy",{enumerable:!0,get:a(function(){return yHn.systemErrorRetryPolicy},"get")});Object.defineProperty(ar,"systemErrorRetryPolicyName",{enumerable:!0,get:a(function(){return yHn.systemErrorRetryPolicyName},"get")});var EHn=sHn();Object.defineProperty(ar,"throttlingRetryPolicy",{enumerable:!0,get:a(function(){return EHn.throttlingRetryPolicy},"get")});Object.defineProperty(ar,"throttlingRetryPolicyName",{enumerable:!0,get:a(function(){return EHn.throttlingRetryPolicyName},"get")});var KRs=zce();Object.defineProperty(ar,"retryPolicy",{enumerable:!0,get:a(function(){return KRs.retryPolicy},"get")});var _Hn=MZt();Object.defineProperty(ar,"tracingPolicy",{enumerable:!0,get:a(function(){return _Hn.tracingPolicy},"get")});Object.defineProperty(ar,"tracingPolicyName",{enumerable:!0,get:a(function(){return _Hn.tracingPolicyName},"get")});var JRs=bZt();Object.defineProperty(ar,"defaultRetryPolicy",{enumerable:!0,get:a(function(){return JRs.defaultRetryPolicy},"get")});var CHn=mZt();Object.defineProperty(ar,"userAgentPolicy",{enumerable:!0,get:a(function(){return CHn.userAgentPolicy},"get")});Object.defineProperty(ar,"userAgentPolicyName",{enumerable:!0,get:a(function(){return CHn.userAgentPolicyName},"get")});var vHn=RZt();Object.defineProperty(ar,"tlsPolicy",{enumerable:!0,get:a(function(){return vHn.tlsPolicy},"get")});Object.defineProperty(ar,"tlsPolicyName",{enumerable:!0,get:a(function(){return vHn.tlsPolicyName},"get")});var bHn=IZt();Object.defineProperty(ar,"formDataPolicy",{enumerable:!0,get:a(function(){return bHn.formDataPolicy},"get")});Object.defineProperty(ar,"formDataPolicyName",{enumerable:!0,get:a(function(){return bHn.formDataPolicyName},"get")});var THn=aHn();Object.defineProperty(ar,"bearerTokenAuthenticationPolicy",{enumerable:!0,get:a(function(){return THn.bearerTokenAuthenticationPolicy},"get")});Object.defineProperty(ar,"bearerTokenAuthenticationPolicyName",{enumerable:!0,get:a(function(){return THn.bearerTokenAuthenticationPolicyName},"get")});var SHn=cHn();Object.defineProperty(ar,"ndJsonPolicy",{enumerable:!0,get:a(function(){return SHn.ndJsonPolicy},"get")});Object.defineProperty(ar,"ndJsonPolicyName",{enumerable:!0,get:a(function(){return SHn.ndJsonPolicyName},"get")});var IHn=uHn();Object.defineProperty(ar,"auxiliaryAuthenticationHeaderPolicy",{enumerable:!0,get:a(function(){return IHn.auxiliaryAuthenticationHeaderPolicy},"get")});Object.defineProperty(ar,"auxiliaryAuthenticationHeaderPolicyName",{enumerable:!0,get:a(function(){return IHn.auxiliaryAuthenticationHeaderPolicyName},"get")});var xHn=gZt();Object.defineProperty(ar,"createFile",{enumerable:!0,get:a(function(){return xHn.createFile},"get")});Object.defineProperty(ar,"createFileFromStream",{enumerable:!0,get:a(function(){return xHn.createFileFromStream},"get")})});var PHn=T((QSe,RHn)=>{"use strict";f();var XRs=QSe&&QSe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},ZRs=QSe&&QSe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var i2s=Hc(),o2s=Lm(),s2s=(function(){function t(e,r,n,o){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=r,this._getBatchIntervalMs=n,this._sender=o}return a(t,"Channel"),t.prototype.setUseDiskRetryCaching=function(e,r,n){this._sender.setDiskRetryMode(e,r,n)},t.prototype.send=function(e){var r=this;if(!this._isDisabled()){if(!e){i2s.warn("Cannot send null/undefined telemetry");return}if(this._buffer.push(e),this._buffer.length>=this._getBatchSize()){this.triggerSend(!1);return}!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout(function(){r._timeoutHandle=null,r.triggerSend(!1)},this._getBatchIntervalMs()))}},t.prototype.triggerSend=function(e,r){var n=this._buffer.length<1;n||(e||o2s.isNodeExit?(this._sender.saveOnCrash(this._buffer),typeof r=="function"&&r("data saved on crash")):this._sender.send(this._buffer,r)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&typeof r=="function"&&r("no data to send")},t})();kHn.exports=s2s});var NHn=T($Zt=>{"use strict";f();Object.defineProperty($Zt,"__esModule",{value:!0});$Zt.azureRoleEnvironmentTelemetryProcessor=a2s;function a2s(t,e){}a(a2s,"azureRoleEnvironmentTelemetryProcessor")});var BHn=T(Vtt=>{"use strict";f();Object.defineProperty(Vtt,"__esModule",{value:!0});Vtt.samplingTelemetryProcessor=c2s;Vtt.getSamplingHashCode=OHn;var MHn=nA();function c2s(t,e){var r=t.sampleRate,n=!1;return r==null||r>=100||t.data&&MHn.TelemetryType.Metric===MHn.baseTypeToTelemetryType(t.data.baseType)?!0:(e.correlationContext&&e.correlationContext.operation?n=OHn(e.correlationContext.operation.id){"use strict";f();var l2s=$O&&$O.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),u2s=$O&&$O.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),d2s=$O&&$O.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&l2s(e,t,r);return u2s(e,t),e};Object.defineProperty($O,"__esModule",{value:!0});$O.performanceMetricsTelemetryProcessor=f2s;var VZt=itt(),WZt=d2s(nA());function f2s(t,e){switch(e&&e.addDocument(t),t.data.baseType){case WZt.TelemetryTypeString.Exception:VZt.countException();break;case WZt.TelemetryTypeString.Request:var r=t.data.baseData;VZt.countRequest(r.duration,r.success);break;case WZt.TelemetryTypeString.Dependency:var n=t.data.baseData;VZt.countDependency(n.duration,n.success);break}return!0}a(f2s,"performanceMetricsTelemetryProcessor")});var FHn=T(Vw=>{"use strict";f();var cD=Vw&&Vw.__assign||function(){return cD=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";f();var y2s=lD&&lD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ztt=lD&&lD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&y2s(e,t,r)};Object.defineProperty(lD,"__esModule",{value:!0});ztt(NHn(),lD);ztt(BHn(),lD);ztt(LHn(),lD);ztt(FHn(),lD)});var zZt=T((VDd,GHn)=>{"use strict";f();var xi=nA(),V_=Lm(),QHn=w7(),E2s=Hc(),_2s=(function(){function t(){}return a(t,"EnvelopeFactory"),t.createEnvelope=function(e,r,n,o,s){var c=null;switch(r){case xi.TelemetryType.Trace:c=t.createTraceData(e);break;case xi.TelemetryType.Dependency:c=t.createDependencyData(e);break;case xi.TelemetryType.Event:c=t.createEventData(e);break;case xi.TelemetryType.Exception:c=t.createExceptionData(e);break;case xi.TelemetryType.Request:c=t.createRequestData(e);break;case xi.TelemetryType.Metric:c=t.createMetricData(e);break;case xi.TelemetryType.Availability:c=t.createAvailabilityData(e);break;case xi.TelemetryType.PageView:c=t.createPageViewData(e);break}if(c&&c.baseData&&xi.domainSupportsProperties(c.baseData)){if(n)if(!c.baseData.properties)c.baseData.properties=n;else for(var l in n)c.baseData.properties[l]||(c.baseData.properties[l]=n[l]);t.addAzureFunctionsCorrelationProperties(c.baseData.properties),c.baseData.properties&&(c.baseData.properties=V_.validateStringMap(c.baseData.properties))}var u=s&&s.instrumentationKey||"",d=new xi.Envelope;return d.data=c,d.iKey=u,d.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(o,e.tagOverrides),d.time=new Date().toISOString(),d.ver=1,d.sampleRate=s?s.samplingPercentage:100,r===xi.TelemetryType.Metric&&(d.sampleRate=100),d},t.addAzureFunctionsCorrelationProperties=function(e){var r=QHn.CorrelationContextManager.getCurrentContext();if(r&&r.customProperties&&r.customProperties.getProperty instanceof Function){e=e||{};var n=r.customProperties.getProperty("InvocationId");n&&(e.InvocationId=n),n=r.customProperties.getProperty("ProcessId"),n&&(e.ProcessId=n),n=r.customProperties.getProperty("LogLevel"),n&&(e.LogLevel=n),n=r.customProperties.getProperty("Category"),n&&(e.Category=n),n=r.customProperties.getProperty("HostInstanceId"),n&&(e.HostInstanceId=n),n=r.customProperties.getProperty("AzFuncLiveLogsSessionId"),n&&(e.AzFuncLiveLogsSessionId=n)}},t.truncateProperties=function(e){if(e.properties)try{for(var r={},n=Object.keys(e.properties),o=Object.values(e.properties),s=0;s0,o.exceptions.push(c);var l=new xi.Data;return l.baseType=xi.telemetryTypeToBaseType(xi.TelemetryType.Exception),l.baseData=o,l},t.createRequestData=function(e){var r,n,o,s,c=new xi.RequestData;e.id?c.id=e.id:c.id=V_.w3cTraceId(),c.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),c.url=(n=e.url)===null||n===void 0?void 0:n.substring(0,2048),c.source=(o=e.source)===null||o===void 0?void 0:o.substring(0,1024),c.duration=V_.msToTimeSpan(e.duration),c.responseCode=(s=e.resultCode?e.resultCode.toString():"0")===null||s===void 0?void 0:s.substring(0,1024),c.success=e.success,c.properties=this.truncateProperties(e),c.measurements=e.measurements;var l=new xi.Data;return l.baseType=xi.telemetryTypeToBaseType(xi.TelemetryType.Request),l.baseData=c,l},t.createMetricData=function(e){var r,n=new xi.MetricData;n.metrics=[];var o=new xi.DataPoint;o.count=isNaN(e.count)?1:e.count,o.kind=xi.DataPointType.Aggregation,o.max=isNaN(e.max)?e.value:e.max,o.min=isNaN(e.min)?e.value:e.min,o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.stdDev=isNaN(e.stdDev)?0:e.stdDev,o.value=e.value,o.ns=e.namespace,n.metrics.push(o),n.properties=this.truncateProperties(e);var s=new xi.Data;return s.baseType=xi.telemetryTypeToBaseType(xi.TelemetryType.Metric),s.baseData=n,s},t.createAvailabilityData=function(e){var r,n,o=new xi.AvailabilityData;e.id?o.id=e.id:o.id=V_.w3cTraceId(),o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.duration=V_.msToTimeSpan(e.duration),o.success=e.success,o.runLocation=e.runLocation,o.message=(n=e.message)===null||n===void 0?void 0:n.substring(0,8192),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new xi.Data;return s.baseType=xi.telemetryTypeToBaseType(xi.TelemetryType.Availability),s.baseData=o,s},t.createPageViewData=function(e){var r,n,o=new xi.PageViewData;o.name=(r=e.name)===null||r===void 0?void 0:r.substring(0,1024),o.duration=V_.msToTimeSpan(e.duration),o.url=(n=e.url)===null||n===void 0?void 0:n.substring(0,2048),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new xi.Data;return s.baseType=xi.telemetryTypeToBaseType(xi.TelemetryType.PageView),s.baseData=o,s},t.getTags=function(e,r){var n=QHn.CorrelationContextManager.getCurrentContext(),o={};if(e&&e.tags)for(var s in e.tags)o[s]=e.tags[s];if(r)for(var s in r)o[s]=r[s];return n&&(o[e.keys.operationId]=o[e.keys.operationId]||n.operation.id,o[e.keys.operationName]=o[e.keys.operationName]||n.operation.name,o[e.keys.operationParentId]=o[e.keys.operationParentId]||n.operation.parentId),o},t.parseStack=function(e){var r=void 0;if(typeof e=="string"){var n=e.split(` +`);r=[];for(var o=0,s=0,c=0;c<=n.length;c++){var l=n[c];if(qHn.regex.test(l)){var u=new qHn(n[c],o++);s+=u.sizeInBytes,r.push(u)}}var d=32*1024;if(s>d)for(var p=0,h=r.length-1,m=0,g=p,A=h;pd){var _=A-g+1;r.splice(g,_);break}g=p,A=h,p++,h--}}return r},t})(),qHn=(function(){function t(e,r){this.sizeInBytes=0,this.level=r,this.method="",this.assembly=V_.trim(e);var n=e.match(t.regex);n&&n.length>=5&&(this.method=V_.trim(n[2])||this.method,this.fileName=V_.trim(n[4])||"",this.line=parseInt(n[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=t.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return a(t,"_StackFrame"),t.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,t.baseSize=58,t})();GHn.exports=_2s});var HHn=T(L7=>{"use strict";f();var C2s=L7&&L7.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},v2s=L7&&L7.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]{"use strict";f();var Ytt=HSe&&HSe.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(c){c(s)})}return a(o,"adopt"),new(r||(r=Promise))(function(s,c){function l(p){try{d(n.next(p))}catch(h){c(h)}}a(l,"fulfilled");function u(p){try{d(n.throw(p))}catch(h){c(h)}}a(u,"rejected");function d(p){p.done?s(p.value):o(p.value).then(l,u)}a(d,"step"),d((n=n.apply(t,e||[])).next())})},Ktt=HSe&&HSe.__generator||function(t,e){var r={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,o,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(p){return u([d,p])}}function u(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]=0&&(this._resendInterval=Math.floor(r)),typeof n=="number"&&n>=0&&(this._maxBytesOnDisk=Math.floor(n)),e&&!GSe.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(F7.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout(function(){o._fileCleanupTask()},t.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(F7.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},t.prototype.send=function(e,r){return Ytt(this,void 0,void 0,function(){var n,o,s,c,l,u,d,p,h=this;return Ktt(this,function(m){switch(m.label){case 0:if(!(e&&e.length>0))return[3,5];if(n=this._redirectedHost||this._config.endpointUrl,o=new P2s.URL(n).hostname,s={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},c=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null,!c)return[3,4];this._statsbeat&&this._statsbeat.addFeature(F7.StatsbeatFeature.AAD_HANDLING),m.label=1;case 1:return m.trys.push([1,3,,4]),[4,c.addAuthorizationHeader(s)];case 2:return m.sent(),[3,4];case 3:return l=m.sent(),u="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(u+="This batch of telemetry items will be retried. ",this._storeToDisk(e)),u+="Error:"+l.toString(),this._logWarn(u),typeof r=="function"&&r(u),[2];case 4:if(d="",e.forEach(function(g){var A=W_.stringify(g);typeof A=="string"&&(d+=A+` +`)}),d.length>0&&(d=d.substring(0,d.length-1)),d.length===0)return typeof r=="function"&&r("Empty batch of telemetry items. Nothing to send."),[2];p=Buffer.from?Buffer.from(d):new Buffer(d),w2s.gzip(p,function(g,A){var y=A;g?(h._logWarn(W_.dumpObj(g)),y=p,s.headers["Content-Length"]=p.length.toString()):(s.headers["Content-Encoding"]="gzip",s.headers["Content-Length"]=A.length.toString()),h._logInfo(W_.dumpObj(s)),s[R2s.disableCollectionRequestOption]=!0;var E=+new Date,_=a(function(b){b.setEncoding("utf-8");var I="";b.on("data",function(x){I+=x}),b.on("end",function(){var x,w=+new Date,R=w-E;if(h._numConsecutiveFailures=0,I.includes(M2s)&&b.statusCode===400&&(KZt.warn("Instrumentation key was invalid, please check the iKey"),(x=h._shutdownStatsbeat)===null||x===void 0||x.call(h)),h._isStatsbeatSender&&!h._statsbeatHasReachedIngestionAtLeastOnce&&(N2s.includes(b.statusCode)?h._statsbeatHasReachedIngestionAtLeastOnce=!0:h._statsbeatFailedToIngest()),h._statsbeat&&(b.statusCode==D2s||b.statusCode==k2s?h._statsbeat.countThrottle(F7.StatsbeatNetworkCategory.Breeze,o,b.statusCode):h._statsbeat.countRequest(F7.StatsbeatNetworkCategory.Breeze,o,R,b.statusCode===200,b.statusCode)),h._enableDiskRetryMode){if(b.statusCode===200)h._resendTimer||(h._resendTimer=setTimeout(function(){h._resendTimer=null,h._sendFirstFileOnDisk()},h._resendInterval),h._resendTimer.unref());else if(h._isRetriable(b.statusCode))try{h._statsbeat&&h._statsbeat.countRetry(F7.StatsbeatNetworkCategory.Breeze,o,b.statusCode);var P=JSON.parse(I),k=[];P.errors&&(P.errors.forEach(function(N){(N.statusCode==429||N.statusCode==500||N.statusCode==503)&&k.push(e[N.index])}),k.length>0&&h._storeToDisk(k))}catch{h._storeToDisk(e)}}if(b.statusCode===307||b.statusCode===308)if(h._numConsecutiveRedirects++,h._numConsecutiveRedirects<10){var Q=b.headers.location?b.headers.location.toString():null;Q&&(h._redirectedHost=Q,h.send(e,r))}else{var M={name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."};h._statsbeat&&h._statsbeat.countException(F7.StatsbeatNetworkCategory.Breeze,o,M),typeof r=="function"&&r("Error sending telemetry because of circular redirects.")}else h._numConsecutiveRedirects=0,typeof r=="function"&&r(I),h._logInfo(I),typeof h._onSuccess=="function"&&h._onSuccess(I)})},"requestCallback"),v=W_.makeRequest(h._config,n,s,_);v.setTimeout(t.HTTP_TIMEOUT,function(){h._requestTimedOut=!0,v.abort()}),v.on("error",function(b){if(h._isStatsbeatSender&&!h._statsbeatHasReachedIngestionAtLeastOnce&&h._statsbeatFailedToIngest(),h._numConsecutiveFailures++,h._statsbeat&&h._statsbeat.countException(F7.StatsbeatNetworkCategory.Breeze,o,b),!h._enableDiskRetryMode||h._numConsecutiveFailures>0&&h._numConsecutiveFailures%t.MAX_CONNECTION_FAILURES_BEFORE_WARN===0){var I="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";h._enableDiskRetryMode&&(I="Ingestion endpoint could not be reached ".concat(h._numConsecutiveFailures," consecutive times. There may be resulting telemetry loss. Most recent error:")),h._logWarn(I,W_.dumpObj(b))}else{var I="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:";h._logInfo(I,W_.dumpObj(b))}h._onErrorHelper(b),typeof r=="function"&&(b?(h._requestTimedOut&&(b.name="telemetry timeout",b.message="telemetry request timed out"),r(W_.dumpObj(b))):r("Error sending telemetry")),h._enableDiskRetryMode&&h._storeToDisk(e)}),v.write(y),v.end()}),m.label=5;case 5:return[2]}})})},t.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(W_.stringify(e))},t.prototype._isRetriable=function(e){return e===206||e===401||e===403||e===408||e===429||e===500||e===502||e===503||e===504},t.prototype._logInfo=function(e){for(var r=[],n=1;n=3&&this._shutdownStatsbeat())},t.prototype._storeToDisk=function(e){return Ytt(this,void 0,void 0,function(){var r,n,o,s,c,l,u;return Ktt(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,VO.confirmDirExists(this._tempDir)];case 1:return d.sent(),[3,3];case 2:return r=d.sent(),this._logWarn("Failed to create folder to put telemetry: "+W_.dumpObj(r)),this._onErrorHelper(r),[2];case 3:return d.trys.push([3,5,,6]),[4,GSe.FileAccessControl.applyACLRules(this._tempDir)];case 4:return d.sent(),[3,6];case 5:return n=d.sent(),this._logWarn("Failed to apply file access control to folder: "+W_.dumpObj(n)),this._onErrorHelper(n),[2];case 6:return d.trys.push([6,8,,9]),[4,VO.getShallowDirectorySize(this._tempDir)];case 7:return o=d.sent(),o>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+o),[2]):[3,9];case 8:return s=d.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+W_.dumpObj(s)),this._onErrorHelper(s),[2];case 9:return d.trys.push([9,11,,12]),c="".concat(new Date().getTime(),".ai.json"),l=pz.join(this._tempDir,c),this._logInfo("saving data to disk at: "+l),[4,VO.writeFileAsync(l,W_.stringify(e),{mode:384})];case 10:return d.sent(),[3,12];case 11:return u=d.sent(),this._logWarn("Failed to persist telemetry to disk: "+W_.dumpObj(u)),this._onErrorHelper(u),[2];case 12:return[2]}})})},t.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),YZt.existsSync(this._tempDir)||YZt.mkdirSync(this._tempDir),GSe.FileAccessControl.applyACLRulesSync(this._tempDir);var r=VO.getShallowDirectorySizeSync(this._tempDir);if(r>this._maxBytesOnDisk){this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+r);return}var n="".concat(new Date().getTime(),".ai.json"),o=pz.join(this._tempDir,n);this._logInfo("saving data before crash to disk at: "+o),YZt.writeFileSync(o,e,{mode:384})}catch(s){this._logWarn("Error while saving data to disk: "+W_.dumpObj(s)),this._onErrorHelper(s)}},t.prototype._sendFirstFileOnDisk=function(){return Ytt(this,void 0,void 0,function(){var e,r,n,o,s,c;return Ktt(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,VO.readdirAsync(this._tempDir)];case 1:return e=l.sent(),e=e.filter(function(u){return pz.basename(u).indexOf(".ai.json")>-1}),e.length>0?(r=e[0],n=pz.join(this._tempDir,r),[4,VO.readFileAsync(n)]):[3,5];case 2:return o=l.sent(),[4,VO.unlinkAsync(n)];case 3:return l.sent(),s=JSON.parse(o.toString()),[4,this.send(s)];case 4:l.sent(),l.label=5;case 5:return[3,7];case 6:return c=l.sent(),this._onErrorHelper(c),[3,7];case 7:return[2]}})})},t.prototype._onErrorHelper=function(e){typeof this._onError=="function"&&this._onError(e)},t.prototype._fileCleanupTask=function(){return Ytt(this,void 0,void 0,function(){var e,r,n,o,s,c,l=this;return Ktt(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,VO.readdirAsync(this._tempDir)];case 1:if(e=u.sent(),e=e.filter(function(d){return pz.basename(d).indexOf(".ai.json")>-1}),!(e.length>0))return[3,5];r=0,u.label=2;case 2:return rn,o?(s=pz.join(this._tempDir,e[r]),[4,VO.unlinkAsync(s).catch(function(d){l._onErrorHelper(d)})]):[3,4]):[3,5];case 3:u.sent(),u.label=4;case 4:return r++,[3,2];case 5:return[3,7];case 6:return c=u.sent(),c.code!="ENOENT"&&this._onErrorHelper(c),[3,7];case 7:return[2]}})})},t.TAG="Sender",t.WAIT_BETWEEN_RESEND=60*1e3,t.MAX_BYTES_ON_DISK=50*1024*1024,t.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,t.CLEANUP_TIMEOUT=3600*1e3,t.FILE_RETEMPTION_PERIOD=10080*60*1e3,t.TEMPDIR_PREFIX="appInsights-node",t.HTTP_TIMEOUT=2e4,t})();jHn.exports=O2s});var VHn=T(Jtt=>{"use strict";f();Object.defineProperty(Jtt,"__esModule",{value:!0});Jtt.AzureVirtualMachine=void 0;var $Hn=Hc(),B2s=Lm(),L2s=Uce(),F2s="http://169.254.169.254/metadata/instance/compute",U2s="api-version=2017-12-01",Q2s="format=json",q2s="UNREACH",G2s=(function(){function t(){}return a(t,"AzureVirtualMachine"),t.getAzureComputeMetadata=function(e,r){var n,o=this,s={},c="".concat(F2s,"?").concat(U2s,"&").concat(Q2s),l=(n={method:"GET"},n[L2s.disableCollectionRequestOption]=!0,n.headers={Metadata:"True"},n),u=B2s.makeRequest(e,c,l,function(d){if(d.statusCode===200){s.isVM=!0;var p="";d.on("data",function(h){p+=h}),d.on("end",function(){try{var h=JSON.parse(p);s.id=h.vmId||"",s.subscriptionId=h.subscriptionId||"",s.osType=h.osType||""}catch(m){$Hn.info(t.TAG,m)}r(s)})}else r(s)},!1,!1);u&&(setTimeout(function(){o._requestTimedOut=!0,u.abort()},t.HTTP_TIMEOUT),u.on("error",function(d){o._requestTimedOut&&d&&(d.name="telemetry timeout",d.message="telemetry request timed out"),d&&d.message&&d.message.indexOf(q2s)>-1?s.isVM=!1:$Hn.info(t.TAG,d),r(s)}),u.end())},t.HTTP_TIMEOUT=2500,t.TAG="AzureVirtualMachine",t})();Jtt.AzureVirtualMachine=G2s});var WHn=T(Xtt=>{"use strict";f();Object.defineProperty(Xtt,"__esModule",{value:!0});Xtt.NetworkStatsbeat=void 0;var H2s=(function(){function t(e,r){this.endpoint=e,this.host=r,this.totalRequestCount=0,this.totalSuccesfulRequestCount=0,this.totalFailedRequestCount=[],this.retryCount=[],this.exceptionCount=[],this.throttleCount=[],this.intervalRequestExecutionTime=0,this.lastIntervalRequestExecutionTime=0,this.lastTime=+new Date,this.lastRequestCount=0}return a(t,"NetworkStatsbeat"),t})();Xtt.NetworkStatsbeat=H2s});var XHn=T((hz,JHn)=>{"use strict";f();var uD=hz&&hz.__assign||function(){return uD=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&s/o||0;if(n.lastIntervalRequestExecutionTime=n.intervalRequestExecutionTime,o>0){var l=Object.assign({endpoint:this._networkStatsbeatCollection[r].endpoint,host:this._networkStatsbeatCollection[r].host},e);this._statbeatMetrics.push({name:eu.StatsbeatCounter.REQUEST_DURATION,value:c,properties:l})}n.lastRequestCount=n.totalRequestCount,n.lastTime=n.time}},t.prototype._getShortHost=function(e){var r=e;try{var n=new RegExp(/^https?:\/\/(?:www\.)?([^\/.-]+)/),o=n.exec(e);o!=null&&o.length>1&&(r=o[1]),r=r.replace(".in.applicationinsights.azure.com","")}catch{}return r},t.prototype._trackRequestsCount=function(e){for(var r=this,n=a(function(l){s=o._networkStatsbeatCollection[l];var u=Object.assign({endpoint:s.endpoint,host:s.host},e);s.totalSuccesfulRequestCount>0&&(o._statbeatMetrics.push({name:eu.StatsbeatCounter.REQUEST_SUCCESS,value:s.totalSuccesfulRequestCount,properties:u}),s.totalSuccesfulRequestCount=0),s.totalFailedRequestCount.length>0&&(s.totalFailedRequestCount.forEach(function(d){u=Object.assign(uD(uD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:eu.StatsbeatCounter.REQUEST_FAILURE,value:d.count,properties:u})}),s.totalFailedRequestCount=[]),s.retryCount.length>0&&(s.retryCount.forEach(function(d){u=Object.assign(uD(uD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:eu.StatsbeatCounter.RETRY_COUNT,value:d.count,properties:u})}),s.retryCount=[]),s.throttleCount.length>0&&(s.throttleCount.forEach(function(d){u=Object.assign(uD(uD({},u),{statusCode:d.statusCode})),r._statbeatMetrics.push({name:eu.StatsbeatCounter.THROTTLE_COUNT,value:d.count,properties:u})}),s.throttleCount=[]),s.exceptionCount.length>0&&(s.exceptionCount.forEach(function(d){u=Object.assign(uD(uD({},u),{exceptionType:d.exceptionType})),r._statbeatMetrics.push({name:eu.StatsbeatCounter.EXCEPTION_COUNT,value:d.count,properties:u})}),s.exceptionCount=[])},"_loop_1"),o=this,s,c=0;c0))return[3,2];for(e=[],r=0;r-1)return t.EU_CONNECTION_STRING;return t.NON_EU_CONNECTION_STRING},t.NON_EU_CONNECTION_STRING="InstrumentationKey=c4a29126-a7cb-47e5-b348-11414998b11e;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com",t.EU_CONNECTION_STRING="InstrumentationKey=7dc56bab-3c0c-4e9f-9ebb-d1acadee8d0f;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com",t.STATS_COLLECTION_SHORT_INTERVAL=9e5,t.STATS_COLLECTION_LONG_INTERVAL=864e5,t.STATS_COLLECTION_INITIAL_DELAY=15e3,t.TAG="Statsbeat",t})();JHn.exports=X2s});var tjn=T((cNd,ejn)=>{"use strict";f();var Z2s=require("url"),ePs=FXt(),tPs=PHn(),rPs=Dce(),WO=nA(),nPs=DHn(),eer=UHn(),ZHn=w7(),iPs=XHn(),oPs=JZt(),ter=Lm(),Ztt=Hc(),sPs=zZt(),aPs=(function(){function t(e){this._telemetryProcessors=[];var r=new ePs(e);if(this.config=r,!this.config.instrumentationKey||this.config.instrumentationKey=="")throw new Error("Instrumentation key not found, please provide a connection string before starting Application Insights SDK.");this.context=new rPs,this.commonProperties={},this.authorizationHandler=null,this.config.disableStatsbeat||(this._statsbeat=new iPs(this.config,this.context),this._statsbeat.enable(!0));var n=new oPs(this.config,this.getAuthorizationHandler,null,null,this._statsbeat);this.channel=new nPs(function(){return r.disableAppInsights},function(){return r.maxBatchSize},function(){return r.maxBatchIntervalMs},n)}return a(t,"TelemetryClient"),t.prototype.trackAvailability=function(e){this.track(e,WO.TelemetryType.Availability)},t.prototype.trackPageView=function(e){this.track(e,WO.TelemetryType.PageView)},t.prototype.trackTrace=function(e){this.track(e,WO.TelemetryType.Trace)},t.prototype.trackMetric=function(e){this.track(e,WO.TelemetryType.Metric)},t.prototype.trackException=function(e){e&&e.exception&&!ter.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,WO.TelemetryType.Exception)},t.prototype.trackEvent=function(e){this.track(e,WO.TelemetryType.Event)},t.prototype.trackRequest=function(e){this.track(e,WO.TelemetryType.Request)},t.prototype.trackDependency=function(e){if(e&&!e.target&&e.data)try{e.target=new Z2s.URL(e.data).host}catch(r){e.target=null,Ztt.warn(t.TAG,"The URL object is failed to create.",r)}this.track(e,WO.TelemetryType.Dependency)},t.prototype.flush=function(e){this.channel.triggerSend(e?!!e.isAppCrashing:!1,e?e.callback:void 0)},t.prototype.track=function(e,r){if(e&&WO.telemetryTypeToBaseType(r)){var n=sPs.createEnvelope(e,r,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString());var o=this.runTelemetryProcessors(n,e.contextObjects);o=o&&eer.samplingTelemetryProcessor(n,{correlationContext:ZHn.CorrelationContextManager.getCurrentContext()}),eer.preAggregatedMetricsTelemetryProcessor(n,this.context),o&&(eer.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else Ztt.warn(t.TAG,"track() requires telemetry object and telemetryType to be specified.")},t.prototype.setAutoPopulateAzureProperties=function(e){},t.prototype.getAuthorizationHandler=function(e){return e&&e.aadTokenCredential?(this.authorizationHandler||(Ztt.info(t.TAG,"Adding authorization handler"),this.authorizationHandler=new tPs(e.aadTokenCredential,e.aadAudience)),this.authorizationHandler):null},t.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},t.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},t.prototype.runTelemetryProcessors=function(e,r){var n=!0,o=this._telemetryProcessors.length;if(o===0)return n;r=r||{},r.correlationContext=ZHn.CorrelationContextManager.getCurrentContext();for(var s=0;s{"use strict";f();var cPs=rer&&rer.__extends||(function(){var t=a(function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)},"extendStatics");return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}a(n,"__"),e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),lPs=tjn(),rjn=kXt(),uPs=Uce(),ert=Hc(),dPs=(function(t){cPs(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return a(e,"NodeClient"),e.prototype.trackNodeHttpRequestSync=function(r){r&&r.request&&r.response&&r.duration?rjn.trackRequestSync(this,r):ert.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},e.prototype.trackNodeHttpRequest=function(r){(r.duration||r.error)&&ert.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),r&&r.request&&r.response?rjn.trackRequest(this,r):ert.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},e.prototype.trackNodeHttpDependency=function(r){r&&r.request?uPs.trackRequest(this,r):ert.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},e})(lPs);njn.exports=dPs});var sjn=T(ojn=>{"use strict";f();Object.defineProperty(ojn,"__esModule",{value:!0})});var ujn=T(at=>{"use strict";f();Object.defineProperty(at,"__esModule",{value:!0});at.Configuration=at.liveMetricsClient=at.defaultClient=at.DistributedTracingModes=void 0;at.setup=_Ps;at.start=ljn;at.getCorrelationContext=vPs;at.startOperation=bPs;at.wrapWithCorrelationContext=TPs;at.dispose=SPs;var ier=w7(),fPs=GQn(),pPs=jQn(),oer=itt(),hPs=AXt(),mPs=eqn(),gPs=dqn(),APs=Uce(),yPs=kXt(),ajn=QW(),jSe=Hc(),cjn=$qn(),ser=Wqn(),EPs=Kqn();at.TelemetryClient=ijn();at.Contracts=nA();at.azureFunctionsTypes=sjn();var ner;(function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C"})(ner||(at.DistributedTracingModes=ner={}));var $Se,VSe,WSe,zSe,YSe,lle,ule,mz,KSe,JSe,Fv=!1,trt;function _Ps(t){return at.defaultClient?jSe.info("The default client is already setup"):(at.defaultClient=new at.TelemetryClient(t),$Se=new fPs(at.defaultClient),VSe=new pPs(at.defaultClient),WSe=new oer(at.defaultClient),zSe=new hPs(at.defaultClient),YSe=new mPs(at.defaultClient),lle=new gPs(at.defaultClient),mz=new yPs(at.defaultClient),KSe=new APs(at.defaultClient),ule||(ule=new ser.AutoCollectNativePerformance(at.defaultClient)),JSe=new EPs.AzureFunctionsHook(at.defaultClient)),aer}a(_Ps,"setup");function CPs(){at.defaultClient&&(at.defaultClient.config.enableAutoCollectExternalLoggers==null&&(at.defaultClient.config.enableAutoCollectExternalLoggers=!0),at.defaultClient.config.enableAutoCollectConsole==null&&(at.defaultClient.config.enableAutoCollectConsole=!1),at.defaultClient.config.enableAutoCollectExceptions==null&&(at.defaultClient.config.enableAutoCollectExceptions=!0),at.defaultClient.config.enableAutoCollectPerformance==null&&(at.defaultClient.config.enableAutoCollectPerformance=!0),at.defaultClient.config.enableAutoCollectPreAggregatedMetrics==null&&(at.defaultClient.config.enableAutoCollectPreAggregatedMetrics=!0),at.defaultClient.config.enableAutoCollectHeartbeat==null&&(at.defaultClient.config.enableAutoCollectHeartbeat=!0),at.defaultClient.config.enableAutoCollectRequests==null&&(at.defaultClient.config.enableAutoCollectRequests=!0),at.defaultClient.config.enableAutoCollectDependencies==null&&(at.defaultClient.config.enableAutoCollectDependencies=!0),at.defaultClient.config.enableUseDiskRetryCaching==null&&(at.defaultClient.config.enableUseDiskRetryCaching=!0),at.defaultClient.config.enableAutoDependencyCorrelation==null&&(at.defaultClient.config.enableAutoDependencyCorrelation=!0),at.defaultClient.config.enableSendLiveMetrics==null&&(at.defaultClient.config.enableSendLiveMetrics=!1),at.defaultClient.config.enableAutoCollectExtendedMetrics==null&&(at.defaultClient.config.enableAutoCollectExtendedMetrics=!0),at.defaultClient.config.enableWebInstrumentation==null&&(at.defaultClient.config.enableWebInstrumentation=!1),at.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions==null&&(at.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=!1))}a(CPs,"_setDefaultConfig");function ljn(){if(at.defaultClient){Fv=!0,CPs(),$Se.enable(at.defaultClient.config.enableAutoCollectExternalLoggers,at.defaultClient.config.enableAutoCollectConsole),VSe.enable(at.defaultClient.config.enableAutoCollectExceptions),WSe.enable(at.defaultClient.config.enableAutoCollectPerformance),zSe.enable(at.defaultClient.config.enableAutoCollectPreAggregatedMetrics),YSe.enable(at.defaultClient.config.enableAutoCollectHeartbeat),mz.useAutoCorrelation(at.defaultClient.config.enableAutoDependencyCorrelation,at.defaultClient.config.enableUseAsyncHooks),mz.enable(at.defaultClient.config.enableAutoCollectRequests),KSe.enable(at.defaultClient.config.enableAutoCollectDependencies),lle.enable(at.defaultClient.config.enableWebInstrumentation,at.defaultClient.config.webInstrumentationConnectionString),at.defaultClient.config.enableSendLiveMetrics&&(at.liveMetricsClient||(at.liveMetricsClient=new cjn(at.defaultClient.config,at.defaultClient.context,at.defaultClient.getAuthorizationHandler,at.defaultClient),trt=new oer(at.liveMetricsClient,1e3,!0),at.liveMetricsClient.addCollector(trt),at.defaultClient.quickPulseClient=at.liveMetricsClient),at.liveMetricsClient.enable(at.defaultClient.config.enableSendLiveMetrics)),JSe.enable(at.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions);var t=ser.AutoCollectNativePerformance.parseEnabled(at.defaultClient.config.enableAutoCollectExtendedMetrics,at.defaultClient.config);ule.enable(at.defaultClient.config.enableAutoCollectExtendedMetrics,t.disabledMetrics),at.defaultClient&&at.defaultClient.channel&&at.defaultClient.channel.setUseDiskRetryCaching(at.defaultClient.config.enableUseDiskRetryCaching,at.defaultClient.config.enableResendInterval,at.defaultClient.config.enableMaxBytesOnDisk)}else jSe.warn("Start cannot be called before setup");return aer}a(ljn,"start");function vPs(){return ier.CorrelationContextManager.getCurrentContext()}a(vPs,"getCorrelationContext");function bPs(t,e){return ier.CorrelationContextManager.startOperation(t,e)}a(bPs,"startOperation");function TPs(t,e){return ier.CorrelationContextManager.wrapCallback(t,e)}a(TPs,"wrapWithCorrelationContext");var aer=(function(){function t(){}return a(t,"Configuration"),t.setDistributedTracingMode=function(e){return ajn.w3cEnabled=e===ner.AI_AND_W3C,t},t.setAutoCollectConsole=function(e,r){return r===void 0&&(r=!1),at.defaultClient&&(at.defaultClient.config.enableAutoCollectExternalLoggers=e,at.defaultClient.config.enableAutoCollectConsole=r,Fv&&$Se.enable(e,r)),t},t.setAutoCollectExceptions=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectExceptions=e,Fv&&VSe.enable(e)),t},t.setAutoCollectPerformance=function(e,r){if(r===void 0&&(r=!0),at.defaultClient){at.defaultClient.config.enableAutoCollectPerformance=e;var n=ser.AutoCollectNativePerformance.parseEnabled(r,at.defaultClient.config);at.defaultClient.config.enableAutoCollectExtendedMetrics=n.isEnabled,Fv&&(WSe.enable(e),ule.enable(at.defaultClient.config.enableAutoCollectExtendedMetrics,n.disabledMetrics))}return t},t.setAutoCollectPreAggregatedMetrics=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectPreAggregatedMetrics=e,Fv&&zSe.enable(e)),t},t.setAutoCollectHeartbeat=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectHeartbeat=e,Fv&&YSe.enable(e)),t},t.enableAutoWebSnippetInjection=function(e,r){return at.defaultClient&&(at.defaultClient.config.enableWebInstrumentation=e,at.defaultClient.config.webInstrumentationConnectionString=r,Fv&&lle.enable(at.defaultClient.config.enableAutoWebSnippetInjection,at.defaultClient.config.webSnippetConnectionString)),t},t.enableWebInstrumentation=function(e,r){return at.defaultClient&&(at.defaultClient.config.enableWebInstrumentation=e,at.defaultClient.config.webInstrumentationConnectionString=r,Fv&&lle.enable(at.defaultClient.config.enableWebInstrumentation,at.defaultClient.config.webInstrumentationConnectionString)),t},t.setAutoCollectRequests=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectRequests=e,Fv&&mz.enable(e)),t},t.setAutoCollectDependencies=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectDependencies=e,Fv&&KSe.enable(e)),t},t.setAutoDependencyCorrelation=function(e,r){return at.defaultClient&&(at.defaultClient.config.enableAutoDependencyCorrelation=e,at.defaultClient.config.enableUseAsyncHooks=r,Fv&&mz.useAutoCorrelation(e,r)),t},t.setUseDiskRetryCaching=function(e,r,n){return at.defaultClient&&(at.defaultClient.config.enableUseDiskRetryCaching=e,at.defaultClient.config.enableResendInterval=r,at.defaultClient.config.enableMaxBytesOnDisk=n,at.defaultClient.channel&&at.defaultClient.channel.setUseDiskRetryCaching(at.defaultClient.config.enableUseDiskRetryCaching,at.defaultClient.config.enableResendInterval,at.defaultClient.config.enableMaxBytesOnDisk)),t},t.setInternalLogging=function(e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),jSe.enableDebug=e,jSe.disableWarnings=!r,t},t.setAutoCollectIncomingRequestAzureFunctions=function(e){return at.defaultClient&&(at.defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions=e,Fv&&JSe.enable(e)),t},t.setSendLiveMetrics=function(e){return e===void 0&&(e=!1),at.defaultClient?(!at.liveMetricsClient&&e?(at.liveMetricsClient=new cjn(at.defaultClient.config,at.defaultClient.context,at.defaultClient.getAuthorizationHandler,at.defaultClient),trt=new oer(at.liveMetricsClient,1e3,!0),at.liveMetricsClient.addCollector(trt),at.defaultClient.quickPulseClient=at.liveMetricsClient):at.liveMetricsClient&&at.liveMetricsClient.enable(e),at.defaultClient.config.enableSendLiveMetrics=e,t):(jSe.warn("Live metrics client cannot be setup without the default client"),t)},t.start=ljn,t})();at.Configuration=aer;function SPs(){ajn.w3cEnabled=!0,at.defaultClient=null,Fv=!1,$Se&&$Se.dispose(),VSe&&VSe.dispose(),WSe&&WSe.dispose(),zSe&&zSe.dispose(),YSe&&YSe.dispose(),lle&&lle.dispose(),ule&&ule.dispose(),mz&&mz.dispose(),KSe&&KSe.dispose(),at.liveMetricsClient&&(at.liveMetricsClient.enable(!1),at.liveMetricsClient=void 0),JSe&&JSe.dispose()}a(SPs,"dispose")});var ler=T(BS=>{"use strict";f();var IPs=BS&&BS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xPs=BS&&BS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),djn=BS&&BS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{this.client.flush({callback:a(()=>{e(void 0)},"callback")})})}massageEventName(e){return kPs(e)?fjn(e):e.includes(this.namespace)?e:`${this.namespace}/${e}`}};BS.AzureInsightReporter=cer;function DPs(t,e,r){let n=new wPs.TelemetryClient(r);return n.config.enableAutoCollectRequests=!1,n.config.enableAutoCollectPerformance=!1,n.config.enableAutoCollectExceptions=!1,n.config.enableAutoCollectConsole=!1,n.config.enableAutoCollectDependencies=!1,n.config.noDiagnosticChannel=!0,pjn(t,e,n),n}a(DPs,"createAppInsightsClient");function pjn(t,e,r){r.commonProperties=NPs(r.commonProperties,e),r.context.tags[r.context.keys.cloudRoleInstance]="REDACTED",r.context.tags[r.context.keys.sessionId]=e.sessionId,r.config.endpointUrl=t.copilotTelemetryURL}a(pjn,"configureReporter");function NPs(t,e){return t=t||{},t.common_os=rrt.platform(),t.common_platformversion=rrt.release(),t.common_arch=rrt.arch(),t.common_cpu=Array.from(new Set(rrt.cpus().map(r=>r.model))).join(),t.common_vscodemachineid=e.machineId,t.common_vscodesessionid=e.sessionId,t.client_deviceid=e.devDeviceId,t.common_uikind=e.uiKind,t.common_remotename=e.remoteName??"none",t.common_isnewappinstall="",t}a(NPs,"decorateWithCommonProperties")});var hjn=T((CNd,MPs)=>{MPs.exports={name:"copilot-chat",displayName:"GitHub Copilot Chat",description:"AI chat features powered by Copilot",version:"0.42.0",build:"1",internalAIKey:"1058ec22-3c95-4951-8443-f26c1f325911",completionsCoreVersion:"1.378.1799",internalLargeStorageAriaKey:"ec712b3202c5462fb6877acae7f1f9d7-c19ad55e-3e3c-4f99-984b-827f6d95bd9e-6917",ariaKey:"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",buildType:"dev",publisher:"GitHub",homepage:"https://github.com/features/copilot?editor=vscode",license:"SEE LICENSE IN LICENSE.txt",repository:{type:"git",url:"https://github.com/microsoft/vscode-copilot-chat"},bugs:{url:"https://github.com/microsoft/vscode/issues"},qna:"https://github.com/github-community/community/discussions/categories/copilot",icon:"assets/copilot.png",pricing:"Trial",engines:{vscode:"^1.111.0",npm:">=9.0.0",node:">=22.14.0"},categories:["AI","Chat","Programming Languages","Machine Learning"],keywords:["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin","co-pilot"],badges:[{url:"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange",href:"https://github.com/github-copilot/signup?editor=vscode",description:"%github.copilot.badge.signUp%"},{url:"https://img.shields.io/github/stars/github/copilot-docs?style=social",href:"https://github.com/github/copilot-docs",description:"%github.copilot.badge.star%"},{url:"https://img.shields.io/youtube/channel/views/UC7c3Kb6jYCRj4JOHHZTxKsQ?style=social",href:"https://www.youtube.com/@GitHub/search?query=copilot",description:"%github.copilot.badge.youtube%"},{url:"https://img.shields.io/twitter/follow/github?style=social",href:"https://twitter.com/github",description:"%github.copilot.badge.twitter%"}],activationEvents:["onStartupFinished","onLanguageModelChat:copilot","onUri","onFileSystem:ccreq","onFileSystem:ccsettings"],main:"./dist/extension",l10n:"./l10n",enabledApiProposals:["agentSessionsWorkspace","chatDebug@4","chatHooks@6","extensionsAny","newSymbolNamesProvider","interactive","codeActionAI","activeComment","commentReveal","contribCommentThreadAdditionalMenu","contribCommentsViewThreadMenus","contribChatEditorInlineGutterMenu","documentFiltersExclusive","embeddings","findTextInFiles","findTextInFiles2","languageModelToolSupportsModel@1","findFiles2@2","textSearchProvider","terminalDataWriteEvent","terminalExecuteCommandEvent","terminalSelection","terminalQuickFixProvider","mappedEditsProvider","aiRelatedInformation","aiSettingsSearch","chatParticipantAdditions@3","defaultChatParticipant@4","contribSourceControlInputBoxMenu","authLearnMore","testObserver","aiTextSearchProvider@2","chatParticipantPrivate@15","chatProvider@4","contribDebugCreateConfiguration","chatReferenceDiagnostic","textSearchProvider2","chatReferenceBinaryData","languageModelSystem","languageModelCapabilities","inlineCompletionsAdditions","chatStatusItem","taskProblemMatcherStatus","contribLanguageModelToolSets","textDocumentChangeReason","resolvers","taskExecutionTerminal","dataChannels","languageModelThinkingPart","chatSessionsProvider@3","devDeviceId","contribEditorContentMenu","chatPromptFiles","mcpServerDefinitions","tabInputMultiDiff","workspaceTrust","environmentPower","terminalTitle","toolInvocationApproveCombination"],contributes:{languageModelTools:[{name:"copilot_searchCodebase",toolReferenceName:"codebase",displayName:"%copilot.tools.searchCodebase.name%",icon:"$(folder)",userDescription:"%copilot.codebase.tool.description%",modelDescription:"Run a natural language search for relevant code or documentation comments from the user's current workspace. Returns relevant code snippets from the user's current workspace if it is large, or the full contents of the workspace if it is small.",tags:["codesearch","vscode_codesearch"],inputSchema:{type:"object",properties:{query:{type:"string",description:"The query to search the codebase for. Should contain all relevant context. Should ideally be text that might appear in the codebase, such as function names, variable names, or comments."}},required:["query"]}},{name:"execution_subagent",toolReferenceName:"executionSubagent",displayName:"%copilot.tools.executionSubagent.name%",icon:"$(play)",userDescription:"%copilot.tools.executionSubagent.description%",modelDescription:`Launch an iterative execution-focused subagent that performs an execution-based task. USE THIS INSTEAD OF RUNNING INDIVIDUAL COMMANDS WITH run_in_terminal EXCEPT IN THE RARE CASES THAT YOU NEED THE FULL OUTPUT OF A COMMAND. Here are some examples of how it can be used: - Run tests and filter the output to summarize which tests failed and why. @@ -753,49 +753,49 @@ EXAMPLES: - 'apply-patch': A file-oriented diff format used by some OpenAI models - 'code-rewrite': A general but slower editing tool that allows the model to rewrite and code snippet and provide only the replacement to the editor.`,items:{type:"string",enum:["find-replace","multi-find-replace","apply-patch","code-rewrite"]}},thinking:{type:"boolean",default:!1,description:"Whether the model supports thinking capabilities"},streaming:{type:"boolean",default:!0,description:"Whether the model supports streaming responses. Defaults to true."},zeroDataRetentionEnabled:{type:"boolean",default:!1,markdownDescription:"Whether Zero Data Retention (ZDR) is enabled for this endpoint. When `true`, `previous_response_id` will not be sent in requests via Responses API."},requestHeaders:{type:"object",description:"Additional HTTP headers to include with requests to this model. These reserved headers are not allowed and ignored if present: forbidden request headers (https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header), forwarding headers ('forwarded', 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto'), and others ('api-key', 'authorization', 'content-type', 'openai-intent', 'x-github-api-version', 'x-initiator', 'x-interaction-id', 'x-interaction-type', 'x-onbehalf-extension-id', 'x-request-id', 'x-vscode-user-agent-library-version'). Pattern-based forbidden headers ('proxy-*', 'sec-*', 'x-http-method*' with forbidden methods) are also blocked.",additionalProperties:{type:"string"}}},required:["id","name","url","toolCalling","vision","maxInputTokens","maxOutputTokens"]}}}}},{vendor:"azure",displayName:"Azure",configuration:{type:"object",properties:{apiKey:{type:"string",secret:!0,description:"API key for the models. If not set then Entra ID (Azure AD) authentication with your Microsoft account credentials will be used.",title:"API Key"},models:{type:"array",defaultSnippets:[{label:"New Model",description:"Add a new custom model configuration",body:[{id:"$1",name:"$2",url:"$3",toolCalling:"^${4|true,false|}",vision:"^${5|true,false|}",maxInputTokens:"^${6:128000}",maxOutputTokens:"^${7:16000}"}]}],items:{type:"object",properties:{id:{type:"string",description:"Unique identifier for the model"},name:{type:"string",description:"Display name of the custom OpenAI model"},url:{type:"string",markdownDescription:"URL endpoint for the custom OpenAI-compatible model.\n\n**Important:** Base URLs default to Chat Completions API. Explicit API paths including `/responses` or `/chat/completions` are respected."},toolCalling:{type:"boolean",description:"Whether the model supports tool calling"},vision:{type:"boolean",description:"Whether the model supports vision capabilities"},maxInputTokens:{type:"number",description:"Maximum number of input tokens supported by the model"},maxOutputTokens:{type:"number",description:"Maximum number of output tokens supported by the model"},thinking:{type:"boolean",default:!1,description:"Whether the model supports thinking capabilities"},streaming:{type:"boolean",default:!0,description:"Whether the model supports streaming responses. Defaults to true."},zeroDataRetentionEnabled:{type:"boolean",default:!1,markdownDescription:"Whether Zero Data Retention (ZDR) is enabled for this endpoint. When `true`, `previous_response_id` will not be sent in requests via Responses API."},requestHeaders:{type:"object",description:"Additional HTTP headers to include with requests to this model. These reserved headers are not allowed and ignored if present: forbidden request headers (https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header), forwarding headers ('forwarded', 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto'), and others ('api-key', 'authorization', 'content-type', 'openai-intent', 'x-github-api-version', 'x-initiator', 'x-interaction-id', 'x-interaction-type', 'x-onbehalf-extension-id', 'x-request-id', 'x-vscode-user-agent-library-version'). Pattern-based forbidden headers ('proxy-*', 'sec-*', 'x-http-method*' with forbidden methods) are also blocked.",additionalProperties:{type:"string"}}},required:["id","name","url","toolCalling","vision","maxInputTokens","maxOutputTokens"]}}}}}],interactiveSession:[{label:"GitHub Copilot",id:"copilot",icon:"",when:"!github.copilot.interactiveSession.disabled"}],mcpServerDefinitionProviders:[{id:"github",label:"GitHub"}],viewsWelcome:[{view:"debug",when:"github.copilot-chat.activated",contents:"%github.copilot.viewsWelcome.debug%"}],chatViewsWelcome:[{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.individual.expired%",when:"github.copilot.interactiveSession.individual.expired"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.enterprise%",when:"github.copilot.interactiveSession.enterprise.disabled"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.offline%",when:"github.copilot.offline"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.invalidToken%",when:"github.copilot.interactiveSession.invalidToken"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.rateLimited%",when:"github.copilot.interactiveSession.rateLimited"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.gitHubLoginFailed%",when:"github.copilot.interactiveSession.gitHubLoginFailed"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.contactSupport%",when:"github.copilot.interactiveSession.contactSupport"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.chatDisabled%",when:"github.copilot.interactiveSession.chatDisabled"},{icon:"$(chat-sparkle)",title:"%copilot.title%",content:"%github.copilot.viewsWelcome.switchToReleaseChannel%",when:"github.copilot.interactiveSession.switchToReleaseChannel"}],commands:[{command:"github.copilot.chat.triggerPermissiveSignIn",title:"%github.copilot.command.triggerPermissiveSignIn%"},{command:"copilot.claude.agents",title:"Manage Agents",category:"Claude Agent"},{command:"copilot.claude.hooks",title:"Configure Hooks",category:"Claude Agent"},{command:"copilot.claude.memory",title:"Open Memory Files",category:"Claude Agent"},{command:"github.copilot.cli.sessions.delete",title:"%github.copilot.command.deleteAgentSession%",icon:"$(close)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.resumeInTerminal",title:"%github.copilot.command.cli.sessions.resumeInTerminal%",icon:"$(terminal)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.rename",title:"%github.copilot.command.cli.sessions.rename%",icon:"$(edit)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.setTitle",title:"%github.copilot.command.cli.sessions.setTitle%",category:"Copilot CLI"},{command:"github.copilot.claude.sessions.rename",title:"%github.copilot.command.claude.sessions.rename%",icon:"$(edit)",category:"Claude"},{command:"github.copilot.cli.sessions.openRepository",title:"%github.copilot.command.cli.sessions.openRepository%",icon:"$(folder-opened)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.openWorktreeInNewWindow",title:"%github.copilot.command.cli.sessions.openWorktreeInNewWindow%",icon:"$(folder-opened)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.openWorktreeInTerminal",title:"%github.copilot.command.cli.sessions.openWorktreeInTerminal%",icon:"$(terminal)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.copyWorktreeBranchName",title:"%github.copilot.command.cli.sessions.copyWorktreeBranchName%",icon:"$(copy)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.commitToWorktree",title:"%github.copilot.command.cli.sessions.commitToWorktree%",icon:"$(git-commit)",category:"Copilot CLI"},{command:"github.copilot.cli.sessions.commitToRepository",title:"%github.copilot.command.cli.sessions.commitToRepository%",icon:"$(git-commit)",category:"Copilot CLI"},{command:"github.copilot.cli.newSession",title:"%github.copilot.command.cli.newSession%",icon:"$(terminal)",category:"Chat"},{command:"github.copilot.cli.newSessionToSide",title:"%github.copilot.command.cli.newSessionToSide%",icon:"$(terminal)",category:"Chat"},{command:"github.copilot.cli.openInCopilotCLI",title:"%github.copilot.command.cli.openInCopilotCLI%",icon:"$(terminal)",category:"Copilot CLI"},{command:"github.copilot.chat.replay",title:"Start Chat Replay",icon:"$(debug-line-by-line)",enablement:"resourceFilename === 'benchRun.chatReplay.json' && !inDebugMode"},{command:"github.copilot.chat.replay.enableWorkspaceEditTracing",title:"%github.copilot.command.enableEditTracing%",category:"Developer",enablement:"!github.copilot.chat.replay.workspaceEditTracing"},{command:"github.copilot.chat.replay.disableWorkspaceEditTracing",title:"%github.copilot.command.disableEditTracing%",category:"Developer",enablement:"github.copilot.chat.replay.workspaceEditTracing"},{command:"github.copilot.chat.compact",title:"%github.copilot.command.compactConversation%"},{command:"github.copilot.chat.explain",title:"%github.copilot.command.explainThis%",enablement:"!github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.explain.palette",title:"%github.copilot.command.explainThis%",enablement:"!github.copilot.interactiveSession.disabled && !editorReadonly",category:"Chat"},{command:"github.copilot.chat.review",title:"%github.copilot.command.reviewAndComment%",enablement:"config.github.copilot.chat.reviewSelection.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.apply",title:"%github.copilot.command.applyReviewSuggestion%",icon:"$(sparkle)",enablement:"commentThread =~ /hasSuggestion/",category:"Chat"},{command:"github.copilot.chat.review.applyAndNext",title:"%github.copilot.command.applyReviewSuggestionAndNext%",icon:"$(sparkle)",enablement:"commentThread =~ /hasSuggestion/",category:"Chat"},{command:"github.copilot.chat.review.discard",title:"%github.copilot.command.discardReviewSuggestion%",icon:"$(close)",category:"Chat"},{command:"github.copilot.chat.review.discardAndNext",title:"%github.copilot.command.discardReviewSuggestionAndNext%",icon:"$(close)",category:"Chat"},{command:"github.copilot.chat.review.discardAll",title:"%github.copilot.command.discardAllReviewSuggestion%",icon:"$(close-all)",category:"Chat"},{command:"github.copilot.chat.review.stagedChanges",title:"%github.copilot.command.reviewStagedChanges%",icon:"$(code-review)",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.unstagedChanges",title:"%github.copilot.command.reviewUnstagedChanges%",icon:"$(code-review)",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.changes",title:"%github.copilot.command.reviewChanges%",icon:"$(code-review)",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.stagedFileChange",title:"%github.copilot.command.reviewFileChange%",icon:"$(code-review)",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.unstagedFileChange",title:"%github.copilot.command.reviewFileChange%",icon:"$(code-review)",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.codeReview.run",title:"%github.copilot.command.codeReviewRun%",enablement:"github.copilot.chat.reviewDiff.enabled && !github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.chat.review.previous",title:"%github.copilot.command.gotoPreviousReviewSuggestion%",icon:"$(arrow-up)",category:"Chat"},{command:"github.copilot.chat.review.next",title:"%github.copilot.command.gotoNextReviewSuggestion%",icon:"$(arrow-down)",category:"Chat"},{command:"github.copilot.chat.review.continueInInlineChat",title:"%github.copilot.command.continueReviewInInlineChat%",icon:"$(comment-discussion)",category:"Chat"},{command:"github.copilot.chat.review.continueInChat",title:"%github.copilot.command.continueReviewInChat%",icon:"$(comment-discussion)",category:"Chat"},{command:"github.copilot.chat.review.markHelpful",title:"%github.copilot.command.helpfulReviewSuggestion%",icon:"$(thumbsup)",enablement:"!(commentThread =~ /markedAsHelpful/)",category:"Chat"},{command:"github.copilot.chat.openUserPreferences",title:"%github.copilot.command.openUserPreferences%",category:"Chat",enablement:"config.github.copilot.chat.enableUserPreferences"},{command:"github.copilot.chat.review.markUnhelpful",title:"%github.copilot.command.unhelpfulReviewSuggestion%",icon:"$(thumbsdown)",enablement:"!(commentThread =~ /markedAsUnhelpful/)",category:"Chat"},{command:"github.copilot.chat.generate",title:"%github.copilot.command.generateThis%",icon:"$(sparkle)",enablement:"!github.copilot.interactiveSession.disabled && !editorReadonly",category:"Chat"},{command:"github.copilot.chat.fix",title:"%github.copilot.command.fixThis%",enablement:"!github.copilot.interactiveSession.disabled && !editorReadonly",category:"Chat"},{command:"github.copilot.interactiveSession.feedback",title:"%github.copilot.command.sendChatFeedback%",enablement:"github.copilot-chat.activated && !github.copilot.interactiveSession.disabled",icon:"$(feedback)",category:"Chat"},{command:"github.copilot.debug.workbenchState",title:"%github.copilot.command.logWorkbenchState%",category:"Developer"},{command:"github.copilot.debug.togglePowerSaveBlocker",title:"%github.copilot.command.togglePowerSaveBlocker%",category:"Developer"},{command:"github.copilot.debug.showChatLogView",title:"%github.copilot.command.showChatLogView%",category:"Developer"},{command:"github.copilot.debug.showOutputChannel",title:"%github.copilot.command.showOutputChannel%",category:"Developer"},{command:"github.copilot.debug.showContextInspectorView",title:"%github.copilot.command.showContextInspectorView%",icon:"$(inspect)",category:"Developer"},{command:"github.copilot.debug.validateNesRename",title:"%github.copilot.command.validateNesRename%",category:"Developer"},{command:"github.copilot.debug.resetVirtualToolGroups",title:"%github.copilot.command.resetVirtualToolGroups%",icon:"$(inspect)",category:"Developer"},{command:"github.copilot.debug.extensionState",title:"%github.copilot.command.extensionState%",category:"Developer"},{command:"github.copilot.chat.tools.memory.showMemories",title:"%github.copilot.command.showMemories%",category:"Chat"},{command:"github.copilot.chat.tools.memory.clearMemories",title:"%github.copilot.command.clearMemories%",category:"Chat"},{command:"github.copilot.terminal.explainTerminalLastCommand",title:"%github.copilot.command.explainTerminalLastCommand%",category:"Chat"},{command:"github.copilot.git.generateCommitMessage",title:"%github.copilot.git.generateCommitMessage%",icon:"$(sparkle)",enablement:"!github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.git.resolveMergeConflicts",title:"%github.copilot.git.resolveMergeConflicts%",icon:"$(chat-sparkle)",enablement:"!github.copilot.interactiveSession.disabled",category:"Chat"},{command:"github.copilot.devcontainer.generateDevContainerConfig",title:"%github.copilot.devcontainer.generateDevContainerConfig%",category:"Chat"},{command:"github.copilot.tests.fixTestFailure",icon:"$(sparkle)",title:"%github.copilot.command.fixTestFailure%",category:"Chat"},{command:"github.copilot.tests.fixTestFailure.fromInline",icon:"$(sparkle)",title:"%github.copilot.command.fixTestFailure%"},{command:"github.copilot.chat.attachFile",title:"%github.copilot.chat.attachFile%",category:"Chat"},{command:"github.copilot.chat.attachSelection",title:"%github.copilot.chat.attachSelection%",icon:"$(comment-discussion)",category:"Chat"},{command:"github.copilot.debug.collectDiagnostics",title:"%github.copilot.command.collectDiagnostics%",category:"Developer"},{command:"github.copilot.debug.showNodeSystemCertificatesErrors",title:"%github.copilot.command.showNodeSystemCertificatesErrors%",category:"Developer"},{command:"github.copilot.debug.inlineEdit.clearCache",title:"%github.copilot.command.inlineEdit.clearCache%",category:"Developer"},{command:"github.copilot.debug.inlineEdit.reportNotebookNESIssue",title:"%github.copilot.command.inlineEdit.reportNotebookNESIssue%",enablement:"config.github.copilot.chat.advanced.notebook.alternativeNESFormat.enabled || github.copilot.chat.enableEnhancedNotebookNES",category:"Developer"},{command:"github.copilot.debug.generateSTest",title:"%github.copilot.command.generateSTest%",enablement:"github.copilot.debugReportFeedback",category:"Developer"},{command:"github.copilot.open.walkthrough",title:"%github.copilot.command.openWalkthrough%",category:"Chat"},{command:"github.copilot.debug.generateInlineEditTests",title:"Generate Inline Edit Tests",category:"Chat",enablement:"resourceScheme == 'ccreq'"},{command:"github.copilot.buildRemoteWorkspaceIndex",title:"%github.copilot.command.buildRemoteWorkspaceIndex%",category:"Chat",enablement:"github.copilot-chat.activated"},{command:"github.copilot.deleteExternalIngestWorkspaceIndex",title:"%github.copilot.command.deleteExternalIngestWorkspaceIndex%",category:"Developer",enablement:"github.copilot-chat.activated"},{command:"github.copilot.report",title:"Report Issue",category:"Chat"},{command:"github.copilot.chat.rerunWithCopilotDebug",title:"%github.copilot.command.rerunWithCopilotDebug%",category:"Chat"},{command:"github.copilot.chat.startCopilotDebugCommand",title:"Start Copilot Debug"},{command:"github.copilot.chat.clearTemporalContext",title:"Clear Temporal Context",category:"Developer"},{command:"github.copilot.search.markHelpful",title:"Helpful",icon:"$(thumbsup)",enablement:"!github.copilot.search.feedback.sent"},{command:"github.copilot.search.markUnhelpful",title:"Unhelpful",icon:"$(thumbsdown)",enablement:"!github.copilot.search.feedback.sent"},{command:"github.copilot.search.feedback",title:"Feedback",icon:"$(feedback)",enablement:"!github.copilot.search.feedback.sent"},{command:"github.copilot.chat.debug.showElements",title:"Show Rendered Elements"},{command:"github.copilot.chat.debug.hideElements",title:"Hide Rendered Elements"},{command:"github.copilot.chat.debug.showTools",title:"Show Tools"},{command:"github.copilot.chat.debug.hideTools",title:"Hide Tools"},{command:"github.copilot.chat.debug.showNesRequests",title:"Show NES Requests"},{command:"github.copilot.chat.debug.hideNesRequests",title:"Hide NES Requests"},{command:"github.copilot.chat.debug.showGhostRequests",title:"Show Ghost Requests"},{command:"github.copilot.chat.debug.hideGhostRequests",title:"Hide Ghost Requests"},{command:"github.copilot.chat.debug.showRawRequestBody",title:"Show Raw Request Body"},{command:"github.copilot.chat.debug.exportLogItem",title:"Export as...",icon:"$(export)"},{command:"github.copilot.chat.debug.exportPromptArchive",title:"Export All as Archive...",icon:"$(archive)"},{command:"github.copilot.chat.debug.exportPromptLogsAsJson",title:"Export All as JSON...",icon:"$(export)"},{command:"github.copilot.chat.debug.exportAllPromptLogsAsJson",title:"Export All Prompt Logs as JSON...",icon:"$(export)"},{command:"github.copilot.chat.otel.exportAgentTracesDB",title:"Export Agent Traces DB",category:"Chat",enablement:"config.github.copilot.chat.otel.dbSpanExporter.enabled"},{command:"github.copilot.nes.captureExpected.start",title:"Record Expected Edit (NES)",category:"Copilot"},{command:"github.copilot.nes.captureExpected.confirm",title:"Confirm and Save Expected Edit Capture",category:"Copilot"},{command:"github.copilot.nes.captureExpected.abort",title:"Cancel Expected Edit Capture",category:"Copilot"},{command:"github.copilot.nes.captureExpected.submit",title:"Submit NES Captures",category:"Copilot"},{command:"github.copilot.chat.showAsChatSession",title:"Show as chat session",icon:"$(chat-sparkle)"},{command:"github.copilot.debug.collectWorkspaceIndexDiagnostics",title:"%github.copilot.command.collectWorkspaceIndexDiagnostics%",category:"Developer"},{command:"github.copilot.chat.mcp.setup.check",title:"MCP Check: is supported"},{command:"github.copilot.chat.mcp.setup.validatePackage",title:"MCP Check: validate package"},{command:"github.copilot.chat.mcp.setup.flow",title:"MCP Check: do prompts"},{command:"github.copilot.chat.generateAltText",title:"Generate/Refine Alt Text"},{command:"github.copilot.chat.notebook.enableFollowCellExecution",title:"Enable Follow Cell Execution from Chat",shortTitle:"Follow",icon:"$(pinned)"},{command:"github.copilot.chat.notebook.disableFollowCellExecution",title:"Disable Follow Cell Execution from Chat",shortTitle:"Unfollow",icon:"$(pinned-dirty)"},{command:"github.copilot.cloud.resetWorkspaceConfirmations",title:"%github.copilot.command.resetCloudAgentWorkspaceConfirmations%"},{command:"github.copilot.cloud.sessions.openInBrowser",title:"%github.copilot.command.openCopilotAgentSessionsInBrowser%",icon:"$(link-external)"},{command:"github.copilot.cloud.sessions.proxy.closeChatSessionPullRequest",title:"%github.copilot.command.closeChatSessionPullRequest.title%"},{command:"github.copilot.cloud.sessions.installPRExtension",title:"%github.copilot.command.installPRExtension.title%",icon:"$(extensions)"},{command:"github.copilot.chat.openSuggestionsPanel",title:"Open Completions Panel",enablement:"github.copilot.extensionUnification.activated && !isWeb",category:"GitHub Copilot"},{command:"github.copilot.chat.toggleStatusMenu",title:"Open Status Menu",enablement:"github.copilot.extensionUnification.activated",category:"GitHub Copilot"},{command:"github.copilot.chat.completions.disable",title:"Disable Inline Suggestions",enablement:"github.copilot.extensionUnification.activated && github.copilot.activated && config.editor.inlineSuggest.enabled && github.copilot.completions.enabled",category:"GitHub Copilot"},{command:"github.copilot.chat.completions.enable",title:"Enable Inline Suggestions",enablement:"github.copilot.extensionUnification.activated && github.copilot.activated && !(config.editor.inlineSuggest.enabled && github.copilot.completions.enabled)",category:"GitHub Copilot"},{command:"github.copilot.chat.completions.toggle",title:"Toggle (Enable/Disable) Inline Suggestions",enablement:"github.copilot.extensionUnification.activated && github.copilot.activated",category:"GitHub Copilot"},{command:"github.copilot.chat.openModelPicker",title:"Change Completions Model",category:"GitHub Copilot",enablement:"github.copilot.extensionUnification.activated && !isWeb && github.copilot.completions.hasMultipleModels"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",title:"%github.copilot.command.applyCopilotCLIAgentSessionChanges%",enablement:"!chatSessionRequestInProgress",category:"GitHub Copilot"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges.apply",title:"%github.copilot.chat.applyCopilotCLIAgentSessionChanges.apply%",enablement:"!chatSessionRequestInProgress",icon:"$(git-stash-pop)",category:"GitHub Copilot"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.merge",title:"%github.copilot.chat.mergeCopilotCLIAgentSessionChanges.merge%",enablement:"!chatSessionRequestInProgress",icon:"$(git-merge)",category:"GitHub Copilot"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.mergeAndSync",title:"%github.copilot.chat.mergeCopilotCLIAgentSessionChanges.mergeAndSync%",enablement:"!chatSessionRequestInProgress",icon:"$(sync)",category:"GitHub Copilot"},{command:"github.copilot.chat.updateCopilotCLIAgentSessionChanges.update",title:"%github.copilot.chat.updateCopilotCLIAgentSessionChanges.update%",enablement:"!chatSessionRequestInProgress",icon:"$(download)",category:"GitHub Copilot"},{command:"github.copilot.sessions.commitChanges",title:"%github.copilot.command.sessions.commitChanges%",enablement:"!chatSessionRequestInProgress",icon:"$(git-commit)",category:"GitHub Copilot"},{command:"github.copilot.sessions.discardChanges",title:"%github.copilot.command.sessions.discardChanges%",enablement:"!chatSessionRequestInProgress",icon:"$(discard)",category:"GitHub Copilot"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR",title:"%github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR%",enablement:"!chatSessionRequestInProgress",icon:"$(git-pull-request-create)",category:"GitHub Copilot"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR",title:"%github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR%",enablement:"!chatSessionRequestInProgress",icon:"$(sync)",category:"GitHub Copilot"},{command:"github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR",title:"%github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR%",enablement:"!chatSessionRequestInProgress",icon:"$(git-pull-request-draft)",category:"GitHub Copilot"},{command:"github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",title:"%github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR%",enablement:"!chatSessionRequestInProgress",icon:"$(git-pull-request)",category:"GitHub Copilot"},{command:"github.copilot.chat.copilotCLI.addFileReference",title:"%github.copilot.command.chat.copilotCLI.addFileReference%",enablement:"github.copilot.chat.copilotCLI.hasSession",category:"Copilot CLI"},{command:"github.copilot.chat.copilotCLI.addSelection",title:"%github.copilot.command.chat.copilotCLI.addSelection%",enablement:"github.copilot.chat.copilotCLI.hasSession",category:"Copilot CLI"},{command:"github.copilot.chat.copilotCLI.acceptDiff",title:"%github.copilot.command.chat.copilotCLI.acceptDiff%",enablement:"github.copilot.chat.copilotCLI.hasActiveDiff",icon:"$(check)",category:"Copilot CLI"},{command:"github.copilot.chat.copilotCLI.rejectDiff",title:"%github.copilot.command.chat.copilotCLI.rejectDiff%",enablement:"github.copilot.chat.copilotCLI.hasActiveDiff",icon:"$(close)",category:"Copilot CLI"},{command:"github.copilot.chat.checkoutPullRequestReroute",title:"%github.copilot.command.checkoutPullRequestReroute.title%",icon:"$(git-pull-request)",category:"GitHub Pull Request"},{command:"github.copilot.chat.cloudSessions.openRepository",title:"%github.copilot.command.cloudSessions.openRepository.title%",icon:"$(repo)",category:"GitHub Copilot"},{command:"github.copilot.chat.cloudSessions.clearCaches",title:"%github.copilot.command.cloudSessions.clearCaches.title%",category:"GitHub Copilot"},{command:"github.copilot.sessions.refreshChanges",title:"%github.copilot.command.sessions.refreshChanges%",icon:"$(refresh)",category:"GitHub Copilot"}],configuration:[{title:"GitHub Copilot Chat",id:"stable",properties:{"github.copilot.chat.backgroundAgent.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.backgroundAgent.enabled%"},"github.copilot.chat.cloudAgent.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.cloudAgent.enabled%"},"github.copilot.chat.codeGeneration.useInstructionFiles":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.codeGeneration.useInstructionFiles%"},"github.copilot.editor.enableCodeActions":{type:"boolean",default:!0,description:"%github.copilot.config.enableCodeActions%"},"github.copilot.renameSuggestions.triggerAutomatically":{type:"boolean",default:!0,description:"%github.copilot.config.renameSuggestions.triggerAutomatically%"},"github.copilot.chat.localeOverride":{type:"string",enum:["auto","en","fr","it","de","es","ru","zh-CN","zh-TW","ja","ko","cs","pt-br","tr","pl"],enumDescriptions:["Use VS Code's configured display language","English","fran\xE7ais","italiano","Deutsch","espa\xF1ol","\u0440\u0443\u0441\u0441\u043A\u0438\u0439","\u4E2D\u6587(\u7B80\u4F53)","\u4E2D\u6587(\u7E41\u9AD4)","\u65E5\u672C\u8A9E","\uD55C\uAD6D\uC5B4","\u010De\u0161tina","portugu\xEAs","T\xFCrk\xE7e","polski"],default:"auto",markdownDescription:"%github.copilot.config.localeOverride%"},"github.copilot.chat.terminalChatLocation":{type:"string",default:"chatView",markdownDescription:"%github.copilot.config.terminalChatLocation%",markdownEnumDescriptions:["%github.copilot.config.terminalChatLocation.chatView%","%github.copilot.config.terminalChatLocation.quickChat%","%github.copilot.config.terminalChatLocation.terminal%"],enum:["chatView","quickChat","terminal"]},"github.copilot.chat.scopeSelection":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.scopeSelection%"},"github.copilot.chat.useProjectTemplates":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.useProjectTemplates%"},"github.copilot.nextEditSuggestions.enabled":{type:"boolean",default:!0,tags:["nextEditSuggestions","onExp"],markdownDescription:"%github.copilot.nextEditSuggestions.enabled%",scope:"language-overridable"},"github.copilot.nextEditSuggestions.extendedRange":{type:"boolean",default:!1,tags:["nextEditSuggestions","onExp"],markdownDescription:"%github.copilot.nextEditSuggestions.extendedRange%"},"github.copilot.nextEditSuggestions.fixes":{type:"boolean",default:!0,tags:["nextEditSuggestions","onExp"],markdownDescription:"%github.copilot.nextEditSuggestions.fixes%",scope:"language-overridable"},"github.copilot.nextEditSuggestions.allowWhitespaceOnlyChanges":{type:"boolean",default:!0,tags:["nextEditSuggestions","onExp"],markdownDescription:"%github.copilot.nextEditSuggestions.allowWhitespaceOnlyChanges%",scope:"language-overridable"},"github.copilot.chat.agent.autoFix":{type:"boolean",default:!1,description:"%github.copilot.config.autoFix%",tags:["onExp"]},"github.copilot.chat.rateLimitAutoSwitchToAuto":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.rateLimitAutoSwitchToAuto%",tags:["onExp"]},"github.copilot.chat.customInstructionsInSystemMessage":{type:"boolean",default:!0,description:"%github.copilot.config.customInstructionsInSystemMessage%"},"github.copilot.chat.organizationCustomAgents.enabled":{type:"boolean",default:!0,description:"%github.copilot.config.organizationCustomAgents.enabled%"},"github.copilot.chat.organizationInstructions.enabled":{type:"boolean",default:!0,description:"%github.copilot.config.organizationInstructions.enabled%"},"github.copilot.chat.additionalReadAccessPaths":{type:"array",default:[],items:{type:"string"},markdownDescription:"%github.copilot.config.additionalReadAccessPaths%",scope:"window"},"github.copilot.chat.agent.currentEditorContext.enabled":{type:"boolean",default:!0,description:"%github.copilot.config.agent.currentEditorContext.enabled%"},"github.copilot.enable":{type:"object",scope:"window",default:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},additionalProperties:{type:"boolean"},markdownDescription:"Enable or disable auto triggering of Copilot completions for specified [languages](https://code.visualstudio.com/docs/languages/identifiers). You can still trigger suggestions manually using `Alt + \\`"},"github.copilot.selectedCompletionModel":{type:"string",default:"",markdownDescription:'The currently selected completion model ID. To select from a list of available models, use the __"Change Completions Model"__ command or open the model picker (from the Copilot menu in the VS Code title bar, select __"Configure Code Completions"__ then __"Change Completions Model"__. The value must be a valid model ID. An empty value indicates that the default model will be used.'},"github.copilot.chat.claudeAgent.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.claudeAgent.enabled%"},"github.copilot.chat.claudeAgent.allowDangerouslySkipPermissions":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.claudeAgent.allowDangerouslySkipPermissions%"},"github.copilot.chat.reviewAgent.enabled":{type:"boolean",default:!0,description:"%github.copilot.config.reviewAgent.enabled%"},"github.copilot.chat.reviewSelection.enabled":{type:"boolean",default:!0,description:"%github.copilot.config.reviewSelection.enabled%"},"github.copilot.chat.reviewSelection.instructions":{type:"array",items:{oneOf:[{type:"object",markdownDescription:"%github.copilot.config.reviewSelection.instruction.file%",properties:{file:{type:"string",examples:[".copilot-review-instructions.md"]},language:{type:"string"}},examples:[{file:".copilot-review-instructions.md"}],required:["file"]},{type:"object",markdownDescription:"%github.copilot.config.reviewSelection.instruction.text%",properties:{text:{type:"string",examples:["Use underscore for field names."]},language:{type:"string"}},required:["text"],examples:[{text:"Use underscore for field names."},{text:"Resolve all TODO tasks."}]}]},default:[],markdownDescription:"%github.copilot.config.reviewSelection.instructions%",examples:[[{file:".copilot-review-instructions.md"},{text:"Resolve all TODO tasks."}]]},"github.copilot.chat.anthropic.useMessagesApi":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.useMessagesApi%",tags:["onExp"]},"github.copilot.chat.anthropic.thinking.budgetTokens":{type:"number",markdownDescription:"%github.copilot.config.anthropic.thinking.budgetTokens%",minimum:0,maximum:32e3,default:16e3}}},{id:"preview",properties:{"github.copilot.chat.copilotDebugCommand.enabled":{type:"boolean",default:!0,tags:["preview"],description:"%github.copilot.chat.copilotDebugCommand.enabled%"},"github.copilot.chat.codesearch.enabled":{type:"boolean",default:!1,tags:["preview"],markdownDescription:"%github.copilot.config.codesearch.enabled%"},"github.copilot.chat.copilotMemory.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.copilotMemory.enabled%",tags:["preview"]},"github.copilot.chat.tools.memory.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.tools.memory.enabled%",tags:["preview"]},"github.copilot.chat.tools.viewImage.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.tools.viewImage.enabled%",tags:["preview","onExp"]},"github.copilot.chat.anthropic.thinking.forceExtendedThinking":{type:"boolean",markdownDescription:"%github.copilot.config.anthropic.thinking.forceExtendedThinking%",default:!1,tags:["preview","onExp"]},"github.copilot.chat.backgroundCompaction":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.backgroundCompaction%",tags:["preview","onExp"]},"github.copilot.chat.anthropic.toolSearchTool.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.anthropic.toolSearchTool.enabled%",tags:["preview"]},"github.copilot.chat.anthropic.toolSearchTool.mode":{type:"string",enum:["server","client"],default:"server",markdownDescription:"%github.copilot.config.anthropic.toolSearchTool.mode%",tags:["preview","onExp"]},"github.copilot.chat.conversationTranscriptLookup.enabled":{type:"boolean",default:!1,description:"%github.copilot.config.conversationTranscriptLookup.enabled%",tags:["preview","onExp"]}}},{id:"experimental",properties:{"github.copilot.chat.getSearchViewResultsSkill.enabled":{type:"boolean",default:!1,description:"%github.copilot.config.getSearchViewResultsSkill.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.githubMcpServer.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.githubMcpServer.enabled%",tags:["experimental"]},"github.copilot.chat.githubMcpServer.toolsets":{type:"array",default:["default"],markdownDescription:"%github.copilot.config.githubMcpServer.toolsets%",items:{type:"string"},tags:["experimental"]},"github.copilot.chat.githubMcpServer.readonly":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.githubMcpServer.readonly%",tags:["experimental"]},"github.copilot.chat.githubMcpServer.lockdown":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.githubMcpServer.lockdown%",tags:["experimental"]},"github.copilot.chat.switchAgent.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.switchAgent.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.imageUpload.enabled":{type:"boolean",default:!0,tags:["experimental","onExp"],markdownDescription:"%github.copilot.config.imageUpload.enabled%"},"github.copilot.chat.codeGeneration.instructions":{markdownDeprecationMessage:"%github.copilot.config.codeGeneration.instructions.deprecated%",type:"array",items:{oneOf:[{type:"object",markdownDescription:"%github.copilot.config.codeGeneration.instruction.file%",properties:{file:{type:"string",examples:[".copilot-codeGeneration-instructions.md"]},language:{type:"string"}},examples:[{file:".copilot-codeGeneration-instructions.md"}],required:["file"]},{type:"object",markdownDescription:"%github.copilot.config.codeGeneration.instruction.text%",properties:{text:{type:"string",examples:["Use underscore for field names."]},language:{type:"string"}},required:["text"],examples:[{text:"Use underscore for field names."},{text:"Always add a comment: 'Generated by Copilot'."}]}]},default:[],markdownDescription:"%github.copilot.config.codeGeneration.instructions%",examples:[[{file:".copilot-codeGeneration-instructions.md"},{text:"Always add a comment: 'Generated by Copilot'."}]],tags:["experimental"]},"github.copilot.chat.testGeneration.instructions":{markdownDeprecationMessage:"%github.copilot.config.testGeneration.instructions.deprecated%",type:"array",items:{oneOf:[{type:"object",markdownDescription:"%github.copilot.config.experimental.testGeneration.instruction.file%",properties:{file:{type:"string",examples:[".copilot-test-instructions.md"]},language:{type:"string"}},examples:[{file:".copilot-test-instructions.md"}],required:["file"]},{type:"object",markdownDescription:"%github.copilot.config.experimental.testGeneration.instruction.text%",properties:{text:{type:"string",examples:["Use suite and test instead of describe and it."]},language:{type:"string"}},required:["text"],examples:[{text:"Always try uniting related tests in a suite."}]}]},default:[],markdownDescription:"%github.copilot.config.testGeneration.instructions%",examples:[[{file:".copilot-test-instructions.md"},{text:"Always try uniting related tests in a suite."}]],tags:["experimental"]},"github.copilot.chat.commitMessageGeneration.instructions":{type:"array",items:{oneOf:[{type:"object",markdownDescription:"%github.copilot.config.commitMessageGeneration.instruction.file%",properties:{file:{type:"string",examples:[".copilot-commit-message-instructions.md"]}},examples:[{file:".copilot-commit-message-instructions.md"}],required:["file"]},{type:"object",markdownDescription:"%github.copilot.config.commitMessageGeneration.instruction.text%",properties:{text:{type:"string",examples:["Use conventional commit message format."]}},required:["text"],examples:[{text:"Use conventional commit message format."}]}]},default:[],markdownDescription:"%github.copilot.config.commitMessageGeneration.instructions%",examples:[[{file:".copilot-commit-message-instructions.md"},{text:"Use conventional commit message format."}]],tags:["experimental"]},"github.copilot.chat.pullRequestDescriptionGeneration.instructions":{type:"array",items:{oneOf:[{type:"object",markdownDescription:"%github.copilot.config.pullRequestDescriptionGeneration.instruction.file%",properties:{file:{type:"string",examples:[".copilot-pull-request-description-instructions.md"]}},examples:[{file:".copilot-pull-request-description-instructions.md"}],required:["file"]},{type:"object",markdownDescription:"%github.copilot.config.pullRequestDescriptionGeneration.instruction.text%",properties:{text:{type:"string",examples:["Include every commit message in the pull request description."]}},required:["text"],examples:[{text:"Include every commit message in the pull request description."}]}]},default:[],markdownDescription:"%github.copilot.config.pullRequestDescriptionGeneration.instructions%",examples:[[{file:".copilot-pull-request-description-instructions.md"},{text:"Use conventional commit message format."}]],tags:["experimental"]},"github.copilot.chat.setupTests.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.setupTests.enabled%",tags:["experimental"]},"github.copilot.chat.languageContext.typescript.enabled":{type:"boolean",default:!0,scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.typescript.enabled%"},"github.copilot.chat.languageContext.typescript.items":{type:"string",enum:["minimal","double","fillHalf","fill"],default:"double",scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.typescript.items%"},"github.copilot.chat.languageContext.typescript.includeDocumentation":{type:"boolean",default:!1,scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.typescript.includeDocumentation%"},"github.copilot.chat.languageContext.typescript.cacheTimeout":{type:"number",default:500,scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.typescript.cacheTimeout%"},"github.copilot.chat.languageContext.fix.typescript.enabled":{type:"boolean",default:!1,scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.fix.typescript.enabled%"},"github.copilot.chat.languageContext.inline.typescript.enabled":{type:"boolean",default:!1,scope:"resource",tags:["experimental","onExP"],markdownDescription:"%github.copilot.chat.languageContext.inline.typescript.enabled%"},"github.copilot.chat.newWorkspaceCreation.enabled":{type:"boolean",default:!0,tags:["experimental"],description:"%github.copilot.config.newWorkspaceCreation.enabled%"},"github.copilot.chat.newWorkspace.useContext7":{type:"boolean",default:!1,tags:["experimental"],markdownDescription:"%github.copilot.config.newWorkspace.useContext7%"},"github.copilot.chat.notebook.followCellExecution.enabled":{type:"boolean",default:!1,tags:["experimental"],description:"%github.copilot.config.notebook.followCellExecution%"},"github.copilot.chat.notebook.enhancedNextEditSuggestions.enabled":{type:"boolean",default:!1,tags:["experimental","onExp"],description:"%github.copilot.config.notebook.enhancedNextEditSuggestions%"},"github.copilot.chat.summarizeAgentConversationHistory.enabled":{type:"boolean",default:!0,tags:["experimental"],description:"%github.copilot.config.summarizeAgentConversationHistory.enabled%"},"github.copilot.chat.virtualTools.threshold":{type:"number",minimum:0,maximum:128,default:128,tags:["experimental"],markdownDescription:"%github.copilot.config.virtualTools.threshold%"},"github.copilot.chat.alternateGptPrompt.enabled":{type:"boolean",default:!1,tags:["experimental"],description:"%github.copilot.config.alternateGptPrompt.enabled%"},"github.copilot.chat.alternateGeminiModelFPrompt.enabled":{type:"boolean",default:!1,tags:["experimental","onExp"],description:"%github.copilot.config.alternateGeminiModelFPrompt.enabled%"},"github.copilot.chat.anthropic.contextEditing.mode":{type:"string",default:"off",markdownDescription:"%github.copilot.config.anthropic.contextEditing.mode%",tags:["experimental","onExp"],enum:["off","clear-thinking","clear-tooluse","clear-both"]},"github.copilot.chat.anthropic.promptOptimization":{type:"string",default:"control",markdownDescription:"%github.copilot.config.anthropic.promptOptimization%",tags:["experimental","onExp"],enum:["control","combined","split"]},"github.copilot.chat.responsesApiReasoningSummary":{type:"string",default:"detailed",markdownDescription:"%github.copilot.config.responsesApiReasoningSummary%",tags:["experimental","onExp"],enum:["off","detailed"]},"github.copilot.chat.responsesApiContextManagement.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.responsesApiContextManagement.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.responsesApi.promptCacheKey.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.responsesApi.promptCacheKey.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.updated53CodexPrompt.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.updated53CodexPrompt.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.gpt54ConcisePrompt.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.gpt54ConcisePrompt.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.gpt54LargePrompt.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.gpt54LargePrompt.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.anthropic.tools.websearch.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.anthropic.tools.websearch.enabled%",tags:["experimental","onExp"]},"github.copilot.chat.anthropic.tools.websearch.maxUses":{type:"number",default:5,markdownDescription:"%github.copilot.config.anthropic.tools.websearch.maxUses%",minimum:1,maximum:20,tags:["experimental"]},"github.copilot.chat.anthropic.tools.websearch.allowedDomains":{type:"array",default:[],markdownDescription:"%github.copilot.config.anthropic.tools.websearch.allowedDomains%",items:{type:"string"},tags:["experimental"]},"github.copilot.chat.anthropic.tools.websearch.blockedDomains":{type:"array",default:[],markdownDescription:"%github.copilot.config.anthropic.tools.websearch.blockedDomains%",items:{type:"string"},tags:["experimental"]},"github.copilot.chat.anthropic.tools.websearch.userLocation":{type:["object","null"],default:null,markdownDescription:"%github.copilot.config.anthropic.tools.websearch.userLocation%",properties:{city:{type:"string",description:"City name (e.g., 'San Francisco')"},region:{type:"string",description:"State or region (e.g., 'California')"},country:{type:"string",description:"ISO country code (e.g., 'US')"},timezone:{type:"string",description:"IANA timezone identifier (e.g., 'America/Los_Angeles')"}},tags:["experimental"]},"github.copilot.chat.completionsFetcher":{type:["string","null"],markdownDescription:"%github.copilot.config.completionsFetcher%",tags:["experimental","onExp"],enum:["electron-fetch","node-fetch"]},"github.copilot.chat.nesFetcher":{type:["string","null"],markdownDescription:"%github.copilot.config.nesFetcher%",tags:["experimental","onExp"],enum:["electron-fetch","node-fetch"]},"github.copilot.chat.planAgent.additionalTools":{type:"array",items:{type:"string"},default:[],scope:"resource",markdownDescription:"%github.copilot.config.planAgent.additionalTools%",tags:["experimental"]},"github.copilot.chat.implementAgent.model":{type:"string",default:"",scope:"resource",markdownDescription:"%github.copilot.config.implementAgent.model%",tags:["experimental"]},"github.copilot.chat.askAgent.additionalTools":{type:"array",items:{type:"string"},default:[],scope:"resource",markdownDescription:"%github.copilot.config.askAgent.additionalTools%",tags:["experimental"]},"github.copilot.chat.askAgent.model":{type:"string",default:"",scope:"resource",markdownDescription:"%github.copilot.config.askAgent.model%",tags:["experimental"]},"github.copilot.chat.exploreAgent.model":{type:"string",default:"",scope:"resource",markdownDescription:"%github.copilot.config.exploreAgent.model%",tags:["experimental"]}}},{id:"advanced",properties:{"github.copilot.chat.installExtensionSkill.enabled":{type:"boolean",default:!1,tags:["advanced","experimental","onExp"],description:"%github.copilot.config.installExtensionSkill.enabled%"},"github.copilot.chat.projectSetupInfoSkill.enabled":{type:"boolean",default:!1,tags:["advanced","experimental","onExp"],description:"%github.copilot.config.projectSetupInfoSkill.enabled%"},"github.copilot.chat.debug.promptOverrideFile":{type:["string","null"],default:null,markdownDescription:`Path to a YAML file that overrides the system prompt and/or tool descriptions sent to the model. -**Note**: This is an advanced debugging setting.`,tags:["advanced","experimental"]},"github.copilot.chat.edits.gemini3MultiReplaceString":{type:"boolean",default:!1,markdownDescription:"Enable the modern `multi_replace_string_in_file` edit tool when generating edits with Gemini 3 models.",tags:["advanced","experimental","onExp"]},"github.copilot.chat.projectLabels.expanded":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.projectLabels.expanded%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.projectLabels.chat":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.projectLabels.chat%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.projectLabels.inline":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.projectLabels.inline%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.workspace.maxLocalIndexSize":{type:"number",default:1e5,markdownDescription:"%github.copilot.config.workspace.maxLocalIndexSize%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.workspace.enableCodeSearch":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.workspace.enableCodeSearch%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.workspace.maxDiffSizeBeforeUsingExternalIngest":{type:"number",default:100,markdownDescription:"%github.copilot.config.workspace.maxDiffSizeBeforeUsingExternalIngest%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.workspace.preferredEmbeddingsModel":{type:"string",default:"",markdownDescription:"%github.copilot.config.workspace.preferredEmbeddingsModel%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.workspace.prototypeAdoCodeSearchEndpointOverride":{type:"string",default:"",markdownDescription:"%github.copilot.config.workspace.prototypeAdoCodeSearchEndpointOverride%",tags:["advanced","experimental"]},"github.copilot.chat.feedback.onChange":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.feedback.onChange%",tags:["advanced","experimental"]},"github.copilot.chat.review.intent":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.review.intent%",tags:["advanced","experimental"]},"github.copilot.chat.notebook.summaryExperimentEnabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.notebook.summaryExperimentEnabled%",tags:["advanced","experimental"]},"github.copilot.chat.notebook.variableFilteringEnabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.notebook.variableFilteringEnabled%",tags:["advanced","experimental"]},"github.copilot.chat.notebook.alternativeFormat":{type:"string",default:"xml",enum:["xml","markdown"],markdownDescription:"%github.copilot.config.notebook.alternativeFormat%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.notebook.alternativeNESFormat.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.notebook.alternativeNESFormat.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.debugTerminalCommandPatterns":{type:"array",default:[],items:{type:"string"},markdownDescription:"%github.copilot.config.debugTerminalCommandPatterns%",tags:["advanced","experimental"]},"github.copilot.chat.localWorkspaceRecording.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.localWorkspaceRecording.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.editRecording.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.editRecording.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.inlineChat.selectionRatioThreshold":{type:"number",default:0,markdownDescription:"%github.copilot.config.inlineChat.selectionRatioThreshold%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.debug.requestLogger.maxEntries":{type:"number",default:100,markdownDescription:"%github.copilot.config.debug.requestLogger.maxEntries%",tags:["advanced","experimental"]},"github.copilot.chat.inlineEdits.diagnosticsContextProvider.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.inlineEdits.diagnosticsContextProvider.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.inlineEdits.chatSessionContextProvider.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.inlineEdits.chatSessionContextProvider.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.codesearch.agent.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.codesearch.agent.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.agent.temperature":{type:["number","null"],markdownDescription:"%github.copilot.config.agent.temperature%",tags:["advanced","experimental"]},"github.copilot.chat.agent.omitFileAttachmentContents":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.agent.omitFileAttachmentContents%",tags:["advanced","experimental"]},"github.copilot.chat.agent.largeToolResultsToDisk.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.agent.largeToolResultsToDisk.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.agent.largeToolResultsToDisk.thresholdBytes":{type:"number",default:8192,markdownDescription:"%github.copilot.config.agent.largeToolResultsToDisk.thresholdBytes%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.instantApply.shortContextModelName":{type:"string",default:"gpt-4o-instant-apply-full-ft-v66-short",markdownDescription:"%github.copilot.config.instantApply.shortContextModelName%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.instantApply.shortContextLimit":{type:"number",default:8e3,markdownDescription:"%github.copilot.config.instantApply.shortContextLimit%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.enableUserPreferences":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.enableUserPreferences%",tags:["advanced","experimental"]},"github.copilot.chat.executionSubagent.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.executionSubagent.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.executionSubagent.model":{type:"string",default:"",markdownDescription:"%github.copilot.config.executionSubagent.model%",tags:["advanced","experimental"]},"github.copilot.chat.executionSubagent.toolCallLimit":{type:"number",default:5,markdownDescription:"%github.copilot.config.executionSubagent.toolCallLimit%",tags:["advanced","experimental"]},"github.copilot.chat.summarizeAgentConversationHistoryThreshold":{type:["number","null"],markdownDescription:"%github.copilot.config.summarizeAgentConversationHistoryThreshold%",tags:["advanced","experimental"]},"github.copilot.chat.agentHistorySummarizationMode":{type:["string","null"],markdownDescription:"%github.copilot.config.agentHistorySummarizationMode%",tags:["advanced","experimental"]},"github.copilot.chat.agentHistorySummarizationWithPromptCache":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.agentHistorySummarizationWithPromptCache%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.useResponsesApiTruncation":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.useResponsesApiTruncation%",tags:["advanced","experimental"]},"github.copilot.chat.omitBaseAgentInstructions":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.omitBaseAgentInstructions%",tags:["advanced","experimental"]},"github.copilot.chat.promptFileContextProvider.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.promptFileContextProvider.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.tools.defaultToolsGrouped":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.tools.defaultToolsGrouped%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.gpt5AlternativePatch":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.gpt5AlternativePatch%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.inlineEdits.triggerOnEditorChangeAfterSeconds":{type:["number","null"],markdownDescription:"%github.copilot.config.inlineEdits.triggerOnEditorChangeAfterSeconds%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.inlineEdits.nextCursorPrediction.displayLine":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.inlineEdits.nextCursorPrediction.displayLine%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.inlineEdits.nextCursorPrediction.currentFileMaxTokens":{type:"number",default:3e3,markdownDescription:"%github.copilot.config.inlineEdits.nextCursorPrediction.currentFileMaxTokens%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.inlineEdits.renameSymbolSuggestions":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.inlineEdits.renameSymbolSuggestions%",tags:["advanced","experimental","onExp"]},"github.copilot.nextEditSuggestions.preferredModel":{type:"string",default:"none",markdownDescription:"%github.copilot.config.nextEditSuggestions.preferredModel%",tags:["advanced","experimental","onExp"]},"github.copilot.nextEditSuggestions.eagerness":{type:"string",default:"auto",enum:["auto","low","medium","high"],enumItemLabels:["%github.copilot.config.nextEditSuggestions.eagerness.auto.label%","%github.copilot.config.nextEditSuggestions.eagerness.low.label%","%github.copilot.config.nextEditSuggestions.eagerness.medium.label%","%github.copilot.config.nextEditSuggestions.eagerness.high.label%"],enumDescriptions:["%github.copilot.config.nextEditSuggestions.eagerness.auto%","%github.copilot.config.nextEditSuggestions.eagerness.low%","%github.copilot.config.nextEditSuggestions.eagerness.medium%","%github.copilot.config.nextEditSuggestions.eagerness.high%"],markdownDescription:"%github.copilot.config.nextEditSuggestions.eagerness%",tags:["advanced","experimental"]},"github.copilot.chat.cli.mcp.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.cli.mcp.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.cli.branchSupport.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.cli.branchSupport.enabled%",tags:["advanced"]},"github.copilot.chat.cli.planExitMode.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.cli.planExitMode.enabled%",tags:["advanced"]},"github.copilot.chat.cli.forkSessions.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.cli.forkSessions.enabled%",tags:["advanced"]},"github.copilot.chat.cli.isolationOption.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.cli.isolationOption.enabled%",tags:["advanced"]},"github.copilot.chat.cli.autoCommit.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.cli.autoCommit.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.cli.sessionController.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.cli.sessionController.enabled%",tags:["advanced"]},"github.copilot.chat.cli.terminalLinks.enabled":{type:"boolean",default:!0,markdownDescription:"%github.copilot.config.cli.terminalLinks.enabled%",tags:["advanced"]},"github.copilot.chat.searchSubagent.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.searchSubagent.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.searchSubagent.useAgenticProxy":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.searchSubagent.useAgenticProxy%",tags:["advanced"]},"github.copilot.chat.searchSubagent.model":{type:"string",default:"",markdownDescription:"%github.copilot.config.searchSubagent.model%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.searchSubagent.toolCallLimit":{type:"number",default:4,markdownDescription:"%github.copilot.config.searchSubagent.toolCallLimit%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.agentDebugLog.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.chat.agentDebugLog.enabled%",tags:["advanced","experimental"]},"github.copilot.chat.agentDebugLog.fileLogging.enabled":{type:"boolean",default:!1,markdownDescription:"%github.copilot.config.chat.agentDebugLog.fileLogging.enabled%",tags:["advanced","experimental","onExp"]},"github.copilot.chat.agentDebugLog.fileLogging.flushIntervalMs":{type:"number",default:4e3,minimum:2e3,markdownDescription:"%github.copilot.config.chat.agentDebugLog.fileLogging.flushIntervalMs%",tags:["advanced","experimental"]},"github.copilot.chat.otel.enabled":{type:"boolean",default:!1,markdownDescription:"Enable OpenTelemetry trace/metric/log emission for Copilot Chat operations. Env var `COPILOT_OTEL_ENABLED` takes precedence. Requires window reload.",tags:["advanced"]},"github.copilot.chat.otel.exporterType":{type:"string",enum:["otlp-grpc","otlp-http","console","file"],default:"otlp-http",markdownDescription:"OTel exporter type for Copilot Chat telemetry. Requires window reload.",tags:["advanced"]},"github.copilot.chat.otel.otlpEndpoint":{type:"string",default:"http://localhost:4318",markdownDescription:"OTLP collector endpoint URL for Copilot Chat OTel data. Env var `OTEL_EXPORTER_OTLP_ENDPOINT` takes precedence. Requires window reload.",tags:["advanced"]},"github.copilot.chat.otel.captureContent":{type:"boolean",default:!1,markdownDescription:"Capture input/output messages, system instructions, and tool definitions in OTel telemetry. **Contains potentially sensitive data.** Env var `COPILOT_OTEL_CAPTURE_CONTENT` takes precedence. Requires window reload.",tags:["advanced"]},"github.copilot.chat.otel.outfile":{type:"string",default:"",markdownDescription:"File path for file-based OTel exporter output (JSON-lines). When set, overrides exporter type to `file`. Requires window reload.",tags:["advanced"]},"github.copilot.chat.otel.dbSpanExporter.enabled":{type:"boolean",default:!1,markdownDescription:"Enable SQLite DB span exporter. Persists OTel spans to a local SQLite database. Automatically enables OTel when set to true. Requires window reload.",tags:["advanced"]}}}],submenus:[{id:"copilot/reviewComment/additionalActions/applyAndNext",label:"%github.copilot.submenu.reviewComment.applyAndNext.label%"},{id:"copilot/reviewComment/additionalActions/discardAndNext",label:"%github.copilot.submenu.reviewComment.discardAndNext.label%"},{id:"copilot/reviewComment/additionalActions/discard",label:"%github.copilot.submenu.reviewComment.discard.label%"},{id:"github.copilot.chat.debug.filter",label:"Filter",icon:"$(filter)"},{id:"github.copilot.chat.debug.exportAllPromptLogsAsJson",label:"Export All Logs as JSON",icon:"$(file-export)"}],menus:{"editor/title":[{command:"github.copilot.debug.generateInlineEditTests",when:"resourceScheme == 'ccreq'"},{command:"github.copilot.chat.notebook.enableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && !github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && !config.notebook.globalToolbar",group:"navigation@10"},{command:"github.copilot.chat.notebook.disableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && !config.notebook.globalToolbar",group:"navigation@10"},{command:"github.copilot.chat.replay",group:"navigation@9",when:"resourceFilename === 'benchRun.chatReplay.json'"},{command:"github.copilot.chat.showAsChatSession",group:"navigation@9",when:"resourceFilename === 'benchRun.chatReplay.json' || resourceFilename === 'chat-export-logs.json'"},{command:"github.copilot.chat.copilotCLI.acceptDiff",group:"navigation@1",when:"github.copilot.chat.copilotCLI.hasActiveDiff"},{command:"github.copilot.chat.copilotCLI.rejectDiff",group:"navigation@2",when:"github.copilot.chat.copilotCLI.hasActiveDiff"}],"editor/title/context":[{command:"github.copilot.chat.copilotCLI.addFileReference",group:"copilot",when:"github.copilot.chat.copilotCLI.hasSession && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"}],"explorer/context":[{command:"github.copilot.chat.showAsChatSession",when:"resourceFilename === 'benchRun.chatReplay.json' || resourceFilename === 'chat-export-logs.json'",group:"2_copilot@1"},{command:"github.copilot.chat.copilotCLI.addFileReference",group:"copilot",when:"github.copilot.chat.copilotCLI.hasSession && !explorerResourceIsFolder"}],"editor/context":[{command:"github.copilot.chat.fix",when:"!github.copilot.interactiveSession.disabled && !editorReadonly && editorSelectionHasDiagnostics",group:"1_chat@4"},{command:"github.copilot.chat.explain",when:"!github.copilot.interactiveSession.disabled",group:"1_chat@5"},{command:"github.copilot.chat.review",when:"config.github.copilot.chat.reviewSelection.enabled && !github.copilot.interactiveSession.disabled && resourceScheme != 'vscode-chat-code-block'",group:"1_chat@6"},{command:"github.copilot.chat.copilotCLI.addFileReference",group:"copilot",when:"github.copilot.chat.copilotCLI.hasSession && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"},{command:"github.copilot.chat.copilotCLI.addSelection",group:"copilot",when:"github.copilot.chat.copilotCLI.hasSession && editorHasSelection && !inOutput && resourceScheme != 'vscode-webview' && resourceScheme != 'webview-panel'"}],"chat/editor/inlineGutter":[{command:"github.copilot.chat.explain",when:"!github.copilot.interactiveSession.disabled && editor.hasSelection && !inlineChatFileBelongsToChat",group:"2_chat@2"},{command:"github.copilot.chat.review",when:"!github.copilot.interactiveSession.disabled && editor.hasSelection && config.github.copilot.chat.reviewSelection.enabled && !inlineChatFileBelongsToChat",group:"2_chat@3"}],"chat/input/editing/sessionToolbar":[{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges.apply",when:"chatSessionType == copilotcli && workbenchState != empty && !isSessionsWindow",group:"navigation@0"},{command:"github.copilot.chat.checkoutPullRequestReroute",when:"chatSessionType == copilot-cloud-agent && !github.vscode-pull-request-github.activated && gitOpenRepositoryCount != 0",group:"navigation@0"},{command:"github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.hasPullRequest",group:"navigation@9"}],"chat/input/editing/sessionApplyActions":[{command:"github.copilot.sessions.commitChanges",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == workspace",group:"commit@1"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.merge",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == worktree && !sessions.isMergeBaseBranchProtected && !sessions.hasPullRequest",group:"merge@1"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.mergeAndSync",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == worktree && !sessions.isMergeBaseBranchProtected && !sessions.hasPullRequest",group:"merge@2"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == worktree && !sessions.hasPullRequest",group:"pull_request@1"},{command:"github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == worktree && !sessions.hasPullRequest",group:"pull_request@2"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR",when:"chatSessionType == copilotcli && isSessionsWindow && sessions.isolationMode == worktree && sessions.hasPullRequest && sessions.hasOpenPullRequest",group:"pull_request@1"}],"chat/contextUsage/actions":[{command:"github.copilot.chat.compact"}],"chat/newSession":[{command:"github.copilot.cli.newSession",group:"4_recommendations@0"}],"testing/item/result":[{command:"github.copilot.tests.fixTestFailure.fromInline",when:"testResultState == failed && !testResultOutdated",group:"inline@2"}],"testing/item/context":[{command:"github.copilot.tests.fixTestFailure.fromInline",when:"testResultState == failed && !testResultOutdated",group:"inline@2"}],commandPalette:[{command:"github.copilot.cli.openInCopilotCLI",when:"false"},{command:"github.copilot.debug.extensionState",when:"false"},{command:"github.copilot.cli.sessions.commitToWorktree",when:"false"},{command:"github.copilot.cli.sessions.commitToRepository",when:"false"},{command:"github.copilot.chat.triggerPermissiveSignIn",when:"false"},{command:"github.copilot.interactiveSession.feedback",when:"github.copilot-chat.activated && !github.copilot.interactiveSession.disabled"},{command:"github.copilot.debug.workbenchState",when:"true"},{command:"github.copilot.chat.rerunWithCopilotDebug",when:"false"},{command:"github.copilot.chat.startCopilotDebugCommand",when:"false"},{command:"github.copilot.git.generateCommitMessage",when:"false"},{command:"github.copilot.git.resolveMergeConflicts",when:"false"},{command:"github.copilot.chat.explain",when:"false"},{command:"github.copilot.chat.review",when:"!github.copilot.interactiveSession.disabled"},{command:"github.copilot.chat.review.apply",when:"false"},{command:"github.copilot.chat.review.applyAndNext",when:"false"},{command:"github.copilot.chat.review.discard",when:"false"},{command:"github.copilot.chat.review.discardAndNext",when:"false"},{command:"github.copilot.chat.review.discardAll",when:"false"},{command:"github.copilot.chat.review.stagedChanges",when:"false"},{command:"github.copilot.chat.review.unstagedChanges",when:"false"},{command:"github.copilot.chat.review.changes",when:"false"},{command:"github.copilot.chat.review.stagedFileChange",when:"false"},{command:"github.copilot.chat.review.unstagedFileChange",when:"false"},{command:"github.copilot.chat.review.previous",when:"false"},{command:"github.copilot.chat.review.next",when:"false"},{command:"github.copilot.chat.review.continueInInlineChat",when:"false"},{command:"github.copilot.chat.review.continueInChat",when:"false"},{command:"github.copilot.chat.review.markHelpful",when:"false"},{command:"github.copilot.chat.review.markUnhelpful",when:"false"},{command:"github.copilot.devcontainer.generateDevContainerConfig",when:"false"},{command:"github.copilot.tests.fixTestFailure",when:"false"},{command:"github.copilot.tests.fixTestFailure.fromInline",when:"false"},{command:"github.copilot.search.markHelpful",when:"false"},{command:"github.copilot.search.markUnhelpful",when:"false"},{command:"github.copilot.search.feedback",when:"false"},{command:"github.copilot.chat.debug.showElements",when:"false"},{command:"github.copilot.chat.debug.hideElements",when:"false"},{command:"github.copilot.chat.debug.showTools",when:"false"},{command:"github.copilot.chat.debug.hideTools",when:"false"},{command:"github.copilot.chat.debug.showNesRequests",when:"false"},{command:"github.copilot.chat.debug.hideNesRequests",when:"false"},{command:"github.copilot.chat.debug.showGhostRequests",when:"false"},{command:"github.copilot.chat.debug.hideGhostRequests",when:"false"},{command:"github.copilot.chat.debug.exportLogItem",when:"false"},{command:"github.copilot.chat.debug.exportPromptArchive",when:"false"},{command:"github.copilot.chat.debug.exportPromptLogsAsJson",when:"false"},{command:"github.copilot.chat.debug.exportAllPromptLogsAsJson",when:"false"},{command:"github.copilot.chat.mcp.setup.check",when:"false"},{command:"github.copilot.chat.mcp.setup.validatePackage",when:"false"},{command:"github.copilot.chat.mcp.setup.flow",when:"false"},{command:"github.copilot.chat.debug.showRawRequestBody",when:"false"},{command:"github.copilot.debug.showOutputChannel",when:"false"},{command:"github.copilot.cli.sessions.delete",when:"false"},{command:"github.copilot.cli.sessions.resumeInTerminal",when:"false"},{command:"github.copilot.cli.sessions.rename",when:"false"},{command:"github.copilot.claude.sessions.rename",when:"false"},{command:"github.copilot.cli.sessions.setTitle",when:"false"},{command:"github.copilot.cli.sessions.openRepository",when:"false"},{command:"github.copilot.cli.sessions.openWorktreeInNewWindow",when:"false"},{command:"github.copilot.cli.sessions.openWorktreeInTerminal",when:"false"},{command:"github.copilot.cli.sessions.copyWorktreeBranchName",when:"false"},{command:"github.copilot.cloud.sessions.openInBrowser",when:"false"},{command:"github.copilot.cloud.sessions.proxy.closeChatSessionPullRequest",when:"false"},{command:"github.copilot.cloud.sessions.installPRExtension",when:"false"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",when:"false"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges.apply",when:"false"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.merge",when:"false"},{command:"github.copilot.chat.mergeCopilotCLIAgentSessionChanges.mergeAndSync",when:"false"},{command:"github.copilot.chat.updateCopilotCLIAgentSessionChanges.update",when:"false"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR",when:"false"},{command:"github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR",when:"false"},{command:"github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR",when:"false"},{command:"github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",when:"false"},{command:"github.copilot.chat.showAsChatSession",when:"false"},{command:"github.copilot.chat.checkoutPullRequestReroute",when:"false"},{command:"github.copilot.chat.cloudSessions.openRepository",when:"false"},{command:"github.copilot.nes.captureExpected.start",when:"github.copilot.inlineEditsEnabled"},{command:"github.copilot.nes.captureExpected.submit",when:"github.copilot.inlineEditsEnabled"},{command:"github.copilot.chat.tools.memory.showMemories",when:"config.github.copilot.chat.tools.memory.enabled"},{command:"github.copilot.chat.tools.memory.clearMemories",when:"config.github.copilot.chat.tools.memory.enabled"},{command:"github.copilot.sessions.commitChanges",when:"false"},{command:"github.copilot.sessions.discardChanges",when:"false"},{command:"github.copilot.sessions.refreshChanges",when:"false"}],"view/title":[{submenu:"github.copilot.chat.debug.filter",when:"view == copilot-chat",group:"navigation"},{command:"github.copilot.chat.debug.exportAllPromptLogsAsJson",when:"view == copilot-chat",group:"export@1"},{command:"workbench.action.chat.openAgentDebugPanel",when:"view == copilot-chat",group:"3_show@0"},{command:"github.copilot.debug.showOutputChannel",when:"view == copilot-chat",group:"3_show@1"},{command:"github.copilot.debug.showChatLogView",when:"view == workbench.panel.chat.view.copilot",group:"3_show"}],"view/item/context":[{command:"github.copilot.chat.debug.showRawRequestBody",when:"view == copilot-chat && viewItem == request",group:"export@0"},{command:"github.copilot.chat.debug.exportLogItem",when:"view == copilot-chat && (viewItem == toolcall || viewItem == request)",group:"export@1"},{command:"github.copilot.chat.debug.exportPromptArchive",when:"view == copilot-chat && viewItem == chatprompt",group:"export@2"},{command:"github.copilot.chat.debug.exportPromptLogsAsJson",when:"view == copilot-chat && viewItem == chatprompt",group:"export@3"}],"searchPanel/aiResults/commands":[{command:"github.copilot.search.markHelpful",group:"inline@0",when:"aiResultsTitle && aiResultsRequested"},{command:"github.copilot.search.markUnhelpful",group:"inline@1",when:"aiResultsTitle && aiResultsRequested"},{command:"github.copilot.search.feedback",group:"inline@2",when:"aiResultsTitle && aiResultsRequested && github.copilot.debugReportFeedback"}],"comments/comment/title":[{command:"github.copilot.chat.review.markHelpful",group:"inline@0",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.markUnhelpful",group:"inline@1",when:"commentController == github-copilot-review"}],"commentsView/commentThread/context":[{command:"github.copilot.chat.review.apply",group:"context@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discard",group:"context@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discardAll",group:"context@3",when:"commentController == github-copilot-review"}],"comments/commentThread/additionalActions":[{submenu:"copilot/reviewComment/additionalActions/applyAndNext",group:"inline@1",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments > 1"},{command:"github.copilot.chat.review.apply",group:"inline@1",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments == 1"},{submenu:"copilot/reviewComment/additionalActions/discardAndNext",group:"inline@2",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments > 1"},{submenu:"copilot/reviewComment/additionalActions/discard",group:"inline@2",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments == 1"}],"copilot/reviewComment/additionalActions/applyAndNext":[{command:"github.copilot.chat.review.applyAndNext",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.apply",group:"inline@2",when:"commentController == github-copilot-review"}],"copilot/reviewComment/additionalActions/discardAndNext":[{command:"github.copilot.chat.review.discardAndNext",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discard",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInInlineChat",group:"inline@3",when:"commentController == github-copilot-review"}],"copilot/reviewComment/additionalActions/discard":[{command:"github.copilot.chat.review.discard",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInInlineChat",group:"inline@3",when:"commentController == github-copilot-review"}],"comments/commentThread/title":[{command:"github.copilot.chat.review.previous",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.next",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInChat",group:"inline@3",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discardAll",group:"inline@4",when:"commentController == github-copilot-review"}],"scm/title":[{command:"github.copilot.chat.review.changes",group:"navigation",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmProviderRootUri in github.copilot.chat.reviewDiff.enabledRootUris"}],"scm/sourceControl":[{command:"github.copilot.cli.openInCopilotCLI",group:"3_worktree@1",when:"scmProvider == git"}],"scm/resourceGroup/context":[{command:"github.copilot.chat.review.stagedChanges",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == index",group:"inline@-3"},{command:"github.copilot.chat.review.unstagedChanges",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == workingTree",group:"inline@-3"}],"scm/resourceState/context":[{command:"github.copilot.git.resolveMergeConflicts",when:"scmProvider == git && scmResourceGroup == merge && git.activeResourceHasMergeConflicts",group:"z_chat@1"},{command:"github.copilot.chat.review.stagedFileChange",group:"3_copilot",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == index"},{command:"github.copilot.chat.review.unstagedFileChange",group:"3_copilot",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == workingTree"}],"scm/inputBox":[{command:"github.copilot.git.generateCommitMessage",when:"scmProvider == git"}],"testing/message/context":[{command:"github.copilot.tests.fixTestFailure",when:"testing.testItemHasUri",group:"inline@1"}],"issue/reporter":[{command:"github.copilot.report"}],"github.copilot.chat.debug.filter":[{command:"github.copilot.chat.debug.showElements",when:"github.copilot.chat.debug.elementsHidden",group:"commands@0"},{command:"github.copilot.chat.debug.hideElements",when:"!github.copilot.chat.debug.elementsHidden",group:"commands@0"},{command:"github.copilot.chat.debug.showTools",when:"github.copilot.chat.debug.toolsHidden",group:"commands@1"},{command:"github.copilot.chat.debug.hideTools",when:"!github.copilot.chat.debug.toolsHidden",group:"commands@1"},{command:"github.copilot.chat.debug.showNesRequests",when:"github.copilot.chat.debug.nesRequestsHidden",group:"commands@2"},{command:"github.copilot.chat.debug.hideNesRequests",when:"!github.copilot.chat.debug.nesRequestsHidden",group:"commands@2"},{command:"github.copilot.chat.debug.showGhostRequests",when:"github.copilot.chat.debug.ghostRequestsHidden",group:"commands@3"},{command:"github.copilot.chat.debug.hideGhostRequests",when:"!github.copilot.chat.debug.ghostRequestsHidden",group:"commands@3"}],"notebook/toolbar":[{command:"github.copilot.chat.notebook.enableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && !github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && config.notebook.globalToolbar",group:"navigation/execute@15"},{command:"github.copilot.chat.notebook.disableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && config.notebook.globalToolbar",group:"navigation/execute@15"}],"editor/content":[{command:"github.copilot.git.resolveMergeConflicts",group:"z_chat@1",when:"config.git.enabled && !git.missing && !isInDiffEditor && !isMergeEditor && resource in git.mergeChanges && git.activeResourceHasMergeConflicts"}],"multiDiffEditor/content":[{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",when:"resourceScheme == copilotcli-worktree-changes && workbenchState != empty && !isSessionsWindow"}],"chat/chatSessions":[{command:"github.copilot.claude.sessions.rename",when:"chatSessionType == claude-code",group:"1_edit@4"},{command:"github.copilot.cli.sessions.delete",when:"chatSessionType == copilotcli",group:"1_edit@10"},{command:"github.copilot.cli.sessions.rename",when:"chatSessionType == copilotcli",group:"1_edit@4"},{command:"github.copilot.cli.sessions.openWorktreeInNewWindow",when:"chatSessionType == copilotcli && !isSessionsWindow",group:"2_open@1"},{command:"github.copilot.cli.sessions.openWorktreeInTerminal",when:"chatSessionType == copilotcli",group:"2_open@2"},{command:"github.copilot.cli.sessions.copyWorktreeBranchName",when:"chatSessionType == copilotcli",group:"2_open@3"},{command:"github.copilot.cli.sessions.resumeInTerminal",when:"chatSessionType == copilotcli",group:"2_open@4"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",when:"chatSessionType == copilotcli && workbenchState != empty && !isSessionsWindow",group:"3_apply@0"},{command:"github.copilot.cloud.sessions.openInBrowser",when:"chatSessionType == copilot-cloud-agent",group:"navigation@10"},{command:"github.copilot.cloud.sessions.proxy.closeChatSessionPullRequest",when:"chatSessionType == copilot-cloud-agent",group:"1_edit@10"}],"chat/multiDiff/context":[{command:"github.copilot.cloud.sessions.installPRExtension",when:"chatSessionType == copilot-cloud-agent && !github.copilot.prExtensionInstalled",group:"inline@1"}],"chat/input/editing/sessionTitleToolbar":[{command:"github.copilot.sessions.refreshChanges",when:"chatSessionType == copilotcli && isSessionsWindow",group:"9_refresh@1"}],"chat/input/editing/sessionChangeToolbar":[{command:"github.copilot.sessions.discardChanges",when:"chatSessionType == copilotcli && isSessionsWindow",group:"navigation@1"}]},icons:{"copilot-logo":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0041"}},"copilot-warning":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0042"}},"copilot-notconnected":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0043"}}},iconFonts:[{id:"copilot-font",src:[{path:"assets/copilot.woff",format:"woff"}]}],terminalQuickFixes:[{id:"copilot-chat.fixWithCopilot",commandLineMatcher:".+",commandExitResult:"error",outputMatcher:{anchor:"bottom",length:1,lineMatcher:".+",offset:0},kind:"explain"},{id:"copilot-chat.generateCommitMessage",commandLineMatcher:"git add .+",commandExitResult:"success",kind:"explain",outputMatcher:{anchor:"bottom",length:1,lineMatcher:".+",offset:0}},{id:"copilot-chat.terminalToDebugging",commandLineMatcher:".+",kind:"explain",commandExitResult:"error",outputMatcher:{anchor:"bottom",length:1,lineMatcher:"",offset:0}},{id:"copilot-chat.terminalToDebuggingSuccess",commandLineMatcher:".+",kind:"explain",commandExitResult:"success",outputMatcher:{anchor:"bottom",length:1,lineMatcher:"",offset:0}}],languages:[{id:"ignore",filenamePatterns:[".copilotignore"],aliases:[]},{id:"markdown",extensions:[".copilotmd"]}],notebooks:[{type:"copilot-chat-replay",displayName:"Copilot Chat Replay",selector:[{filenamePattern:"*.chatreplay.json"}]}],views:{"copilot-chat":[{id:"copilot-chat",name:"Chat Debug",icon:"assets/debug-icon.svg",when:"github.copilot.chat.showLogView"}],"context-inspector":[{id:"context-inspector",name:"Language Context Inspector",icon:"$(inspect)",when:"github.copilot.chat.showContextInspectorView"}]},viewsContainers:{activitybar:[{id:"copilot-chat",title:"Chat Debug",icon:"assets/debug-icon.svg"},{id:"context-inspector",title:"Language Context Inspector",icon:"$(inspect)"}]},configurationDefaults:{"workbench.editorAssociations":{"*.copilotmd":"vscode.markdown.preview.editor"}},keybindings:[{command:"github.copilot.chat.copilotCLI.addFileReference",key:"ctrl+shift+.",mac:"cmd+shift+.",when:"github.copilot.chat.copilotCLI.hasSession && editorTextFocus"},{command:"github.copilot.chat.rerunWithCopilotDebug",key:"ctrl+alt+.",mac:"cmd+alt+.",when:"github.copilot-chat.activated && terminalShellIntegrationEnabled && terminalFocus && !terminalAltBufferActive"},{command:"github.copilot.nes.captureExpected.confirm",key:"ctrl+enter",mac:"cmd+enter",when:"copilotNesCaptureMode && editorTextFocus"},{command:"github.copilot.nes.captureExpected.abort",key:"escape",when:"copilotNesCaptureMode && editorTextFocus"}],walkthroughs:[{id:"copilotWelcome",title:"%github.copilot.walkthrough.title%",description:"%github.copilot.walkthrough.description%",when:"!isWeb",steps:[{id:"copilot.setup.signIn",title:"%github.copilot.walkthrough.setup.signIn.title%",description:"%github.copilot.walkthrough.setup.signIn.description%",when:"chatEntitlementSignedOut && !view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && !github.copilot.interactiveSession.individual.disabled && !github.copilot.interactiveSession.individual.expired && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signInNoAction",title:"%github.copilot.walkthrough.setup.signIn.title%",description:"%github.copilot.walkthrough.setup.noAction.description%",when:"chatEntitlementSignedOut && view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && !github.copilot.interactiveSession.individual.disabled && !github.copilot.interactiveSession.individual.expired && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signUp",title:"%github.copilot.walkthrough.setup.signUp.title%",description:"%github.copilot.walkthrough.setup.signUp.description%",when:"chatPlanCanSignUp && !view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && (github.copilot.interactiveSession.individual.disabled || github.copilot.interactiveSession.individual.expired) && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signUpNoAction",title:"%github.copilot.walkthrough.setup.signUp.title%",description:"%github.copilot.walkthrough.setup.noAction.description%",when:"chatPlanCanSignUp && view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && (github.copilot.interactiveSession.individual.disabled || github.copilot.interactiveSession.individual.expired) && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.panelChat",title:"%github.copilot.walkthrough.panelChat.title%",description:"%github.copilot.walkthrough.panelChat.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.edits",title:"%github.copilot.walkthrough.edits.title%",description:"%github.copilot.walkthrough.edits.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-hclight.mp4"},altText:"%github.copilot.walkthrough.edits.media.altText%"}},{id:"copilot.firstSuggest",title:"%github.copilot.walkthrough.firstSuggest.title%",description:"%github.copilot.walkthrough.firstSuggest.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-hclight.mp4"},altText:"%github.copilot.walkthrough.firstSuggest.media.altText%"}},{id:"copilot.inlineChatNotMac",title:"%github.copilot.walkthrough.inlineChatNotMac.title%",description:"%github.copilot.walkthrough.inlineChatNotMac.description%",when:"!isMac && (!chatEntitlementSignedOut || chatIsEnabled )",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hclight.mp4"},altText:"%github.copilot.walkthrough.inlineChatNotMac.media.altText%"}},{id:"copilot.inlineChatMac",title:"%github.copilot.walkthrough.inlineChatMac.title%",description:"%github.copilot.walkthrough.inlineChatMac.description%",when:"isMac && (!chatEntitlementSignedOut || chatIsEnabled )",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hclight.mp4"},altText:"%github.copilot.walkthrough.inlineChatMac.media.altText%"}},{id:"copilot.sparkle",title:"%github.copilot.walkthrough.sparkle.title%",description:"%github.copilot.walkthrough.sparkle.description%",when:"!chatEntitlementSignedOut || chatIsEnabled",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-hclight.mp4"},altText:"%github.copilot.walkthrough.sparkle.media.altText%"}}]}],jsonValidation:[{fileMatch:"settings.json",url:"ccsettings://root/schema.json"}],typescriptServerPlugins:[{name:"@vscode/copilot-typescript-server-plugin",enableForWorkspaceTypeScriptVersions:!0}],chatSessions:[{type:"claude-code",name:"claude",displayName:"Claude",icon:"$(claude)",welcomeTitle:"Claude Agent",welcomeMessage:"Powered by the same agent as Claude Code",inputPlaceholder:"Run local tasks with Claude, type `#` for adding context",order:3,description:"%github.copilot.session.providerDescription.claude%",when:"config.github.copilot.chat.claudeAgent.enabled",canDelegate:!0,requiresCustomModels:!0,capabilities:{supportsFileAttachments:!0,supportsImageAttachments:!0},commands:[{name:"init",description:"Initialize a new CLAUDE.md file with codebase documentation"},{name:"pr-comments",description:"Get comments from a GitHub pull request"},{name:"review",description:"Review a pull request"},{name:"security-review",description:"Complete a security review of the pending changes on the current branch"},{name:"simplify",description:"Review changed code for reuse, quality, and efficiency"},{name:"claude-api",description:"Help building with Claude API or Anthropic SDK"},{name:"agents",description:"Create and manage specialized Claude agents"},{name:"hooks",description:"Configure Claude Code hooks for tool execution and events"},{name:"memory",description:"Open memory files (CLAUDE.md) for editing"},{name:"compact",description:"Compact the conversation history to save context tokens"}]},{type:"copilotcli",name:"cli",displayName:"Copilot CLI",icon:"$(worktree)",welcomeTitle:"Copilot CLI",welcomeMessage:"Run tasks in the background with the Copilot CLI",inputPlaceholder:"Run tasks in the background with the Copilot CLI, type `#` for adding context",order:1,canDelegate:!0,description:"%github.copilot.session.providerDescription.background%",when:"config.github.copilot.chat.backgroundAgent.enabled",capabilities:{supportsFileAttachments:!0,supportsProblemAttachments:!0,supportsToolAttachments:!1,supportsImageAttachments:!0,supportsSymbolAttachments:!0,supportsSearchResultAttachments:!0,supportsSourceControlAttachments:!0,supportsPromptAttachments:!0,supportsHandOffs:!0},commands:[{name:"delegate",description:"Delegate chat session to cloud agent and create associated PR",when:"config.github.copilot.chat.cloudAgent.enabled"},{name:"compact",description:"%github.copilot.command.cli.compact.description%"}],customAgentTarget:"github-copilot",requiresCustomModels:!0,autoAttachReferences:!0,useRequestToPopulateBuiltInPickers:!0},{type:"copilot-cloud-agent",alternativeIds:["copilot-swe-agent"],name:"cloud",displayName:"Cloud",icon:"$(cloud)",welcomeTitle:"Cloud Agent",welcomeMessage:"Delegate tasks to the cloud",inputPlaceholder:"Delegate tasks to the cloud, type `#` for adding context",order:2,canDelegate:!0,description:"%github.copilot.session.providerDescription.cloud%",when:"config.github.copilot.chat.cloudAgent.enabled",capabilities:{supportsFileAttachments:!0},autoAttachReferences:!0}],debuggers:[{type:"vscode-chat-replay",label:"vscode-chat-replay",languages:["json"],when:"resourceFilename === 'benchRun.chatReplay.json'",configurationAttributes:{launch:{properties:{program:{type:"string",description:"Chat replay file to debug (parse for headers)",default:"${file}"},stopOnEntry:{type:"boolean",default:!0,description:"Break immediately to step through manually."}},required:["program"]}}}],chatAgents:[],chatPromptFiles:[{path:"./assets/prompts/plan.prompt.md"},{path:"./assets/prompts/init.prompt.md"},{path:"./assets/prompts/create-prompt.prompt.md"},{path:"./assets/prompts/create-instructions.prompt.md"},{path:"./assets/prompts/create-skill.prompt.md"},{path:"./assets/prompts/create-agent.prompt.md"},{path:"./assets/prompts/create-hook.prompt.md"}],chatSkills:[{path:"./assets/prompts/skills/project-setup-info-local/SKILL.md",when:"config.github.copilot.chat.projectSetupInfoSkill.enabled && !config.github.copilot.chat.newWorkspace.useContext7"},{path:"./assets/prompts/skills/project-setup-info-context7/SKILL.md",when:"config.github.copilot.chat.projectSetupInfoSkill.enabled && config.github.copilot.chat.newWorkspace.useContext7"},{path:"./assets/prompts/skills/install-vscode-extension/SKILL.md",when:"config.github.copilot.chat.installExtensionSkill.enabled && config.github.copilot.chat.newWorkspaceCreation.enabled"},{path:"./assets/prompts/skills/get-search-view-results/SKILL.md",when:"config.github.copilot.chat.getSearchViewResultsSkill.enabled"},{path:"./assets/prompts/skills/troubleshoot/SKILL.md"},{path:"./assets/prompts/skills/agent-customization/SKILL.md"}],terminal:{profiles:[{icon:"copilot",id:"copilot-cli",title:"GitHub Copilot CLI",titleTemplate:"${sequence}"}]}},prettier:{useTabs:!0,tabWidth:4,singleQuote:!0},scripts:{postinstall:"tsx ./script/postinstall.ts",prepare:"husky","vscode-dts:update":"node script/build/vscodeDtsUpdate.js","vscode-dts:check":"node script/build/vscodeDtsCheck.js","vscode-dts:dev":"node node_modules/@vscode/dts/index.js dev && node script/build/moveProposedDts.js","vscode-dts:main":"node node_modules/@vscode/dts/index.js main && node script/build/moveProposedDts.js",build:"node .esbuild.ts --sourcemaps",compile:"node .esbuild.ts --dev",watch:"npm-run-all -p watch:*","watch:esbuild":"node .esbuild.ts --watch --dev","watch:tsc-extension":"tsc --noEmit --watch --project tsconfig.json","watch:tsc-extension-web":"tsc --noEmit --watch --project tsconfig.worker.json","watch:tsc-simulation-workbench":"tsc --noEmit --watch --project test/simulation/workbench/tsconfig.json",typecheck:"tsc --noEmit --project tsconfig.json && tsc --noEmit --project test/simulation/workbench/tsconfig.json && tsc --noEmit --project tsconfig.worker.json && tsc --noEmit --project src/extension/completions-core/vscode-node/extension/src/copilotPanel/webView/tsconfig.json",lint:"eslint . --max-warnings=0","lint-staged":"eslint --max-warnings=0",tsfmt:"npx tsfmt -r --verify",test:"npm-run-all test:*","test:extension":"vscode-test","test:sanity":"vscode-test --sanity","test:unit":"vitest --run --pool=forks",vitest:"vitest",bench:"vitest bench",get_env:"tsx script/setup/getEnv.mts",get_token:"tsx script/setup/getToken.mts",prettier:"prettier --list-different --write --cache .",simulate:"node dist/simulationMain.js","simulate-require-cache":"node dist/simulationMain.js --require-cache","simulate-ci":"node dist/simulationMain.js --ci --require-cache","simulate-update-baseline":"node dist/simulationMain.js --update-baseline","simulate-gc":"node dist/simulationMain.js --require-cache --gc",setup:"npm run get_env && npm run get_token","setup:dotnet":"run-script-os","setup:dotnet:darwin:linux":"curl -O https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.sh && chmod u+x dotnet-install.sh && ./dotnet-install.sh --channel 10.0 && rm dotnet-install.sh","setup:dotnet:win32":'powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.ps1 -OutFile dotnet-install.ps1; ./dotnet-install.ps1 -channel 10.0; Remove-Item dotnet-install.ps1"',"analyze-edits":"tsx script/analyzeEdits.ts","extract-chat-lib":"tsx script/build/extractChatLib.ts",create_venv:"tsx script/setup/createVenv.mts",package:"vsce package",web:"vscode-test-web --headless --extensionDevelopmentPath=. .","test:prompt":'mocha "src/extension/completions-core/vscode-node/prompt/**/test/**/*.test.{ts,tsx}"',"test:completions-core":"tsx src/extension/completions-core/vscode-node/extension/test/runTest.ts"},devDependencies:{"@azure/identity":"4.9.1","@azure/keyvault-secrets":"^4.10.0","@azure/msal-node":"^3.6.3","@c4312/scip":"^0.1.0","@fluentui/react-components":"^9.66.6","@fluentui/react-icons":"^2.0.305","@hediet/node-reload":"^0.8.0","@keyv/sqlite":"^4.0.5","@octokit/types":"^14.1.0","@parcel/watcher":"^2.5.1","@stylistic/eslint-plugin":"^3.0.1","@types/eslint":"^9.0.0","@types/express":"^5.0.6","@types/google-protobuf":"^3.15.12","@types/js-yaml":"^4.0.9","@types/markdown-it":"^14.0.0","@types/minimist":"^1.2.5","@types/mocha":"^10.0.10","@types/node":"^22.16.3","@types/picomatch":"^4.0.0","@types/react":"17.0.44","@types/react-dom":"^18.2.17","@types/sinon":"^17.0.4","@types/source-map-support":"^0.5.10","@types/tar":"^6.1.13","@types/vinyl":"^2.0.12","@types/vscode":"^1.109.0","@types/vscode-webview":"^1.57.4","@types/yargs":"^17.0.24","@typescript-eslint/eslint-plugin":"^8.35.0","@typescript-eslint/parser":"^8.32.0","@typescript-eslint/typescript-estree":"^8.26.1","@vitest/coverage-v8":"^3.2.4","@vitest/snapshot":"^1.5.0","@vscode/debugadapter":"^1.68.0","@vscode/debugprotocol":"^1.68.0","@vscode/dts":"^0.4.1","@vscode/lsif-language-service":"^0.1.0-pre.4","@vscode/test-cli":"^0.0.11","@vscode/test-electron":"^2.5.2","@vscode/test-web":"^0.0.71","@vscode/vsce":"3.6.0","agent-browser":"^0.16.3",copyfiles:"^2.4.1","csv-parse":"^6.0.0",dotenv:"^17.2.0",electron:"^37.2.1",esbuild:"^0.25.6",eslint:"^9.30.0","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-header":"^3.1.1","eslint-plugin-import":"^2.32.0","eslint-plugin-jsdoc":"^51.3.4","eslint-plugin-no-only-tests":"^3.3.0",fastq:"^1.19.1",glob:"^11.1.0",husky:"^9.1.7","js-yaml":"^4.1.1",keyv:"^5.3.2","lint-staged":"15.2.9",minimist:"^1.2.8",mobx:"^6.13.7","mobx-react-lite":"^4.1.0",mocha:"^11.7.1","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","monaco-editor":"0.44.0","npm-run-all":"^4.1.5",open:"^10.1.2",openai:"^6.7.0",outdent:"^0.8.0",picomatch:"^4.0.4",playwright:"^1.58.2",prettier:"^3.6.2",react:"^17.0.2","react-dom":"17.0.2",rimraf:"^6.0.1","run-script-os":"^1.1.6",shiki:"~1.15.0",sinon:"^21.0.0","source-map-support":"^0.5.21",tar:"^7.5.11","ts-dedent":"^2.2.0",tsx:"^4.20.3",typescript:"^5.8.3","typescript-eslint":"^8.36.0","typescript-formatter":"github:jrieken/typescript-formatter#497efb26bc40b5fa59a350e6eab17bce650a7e4b","vite-plugin-top-level-await":"^1.5.0","vite-plugin-wasm":"^3.5.0",vitest:"^3.0.5","vscode-languageserver-protocol":"^3.17.5","vscode-languageserver-textdocument":"^1.0.12","vscode-languageserver-types":"^3.17.5",yaml:"^2.8.0",yargs:"^17.7.2",zod:"3.25.76"},dependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.81","@anthropic-ai/sdk":"^0.80.0","@github/blackbird-external-ingest-utils":"^0.3.0","@github/copilot":"^1.0.11","@google/genai":"^1.22.0","@humanwhocodes/gitignore-to-minimatch":"1.0.2","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.25.2","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.212.0","@opentelemetry/exporter-logs-otlp-grpc":"^0.212.0","@opentelemetry/exporter-logs-otlp-http":"^0.212.0","@opentelemetry/exporter-metrics-otlp-grpc":"^0.212.0","@opentelemetry/exporter-metrics-otlp-http":"^0.212.0","@opentelemetry/exporter-trace-otlp-grpc":"^0.212.0","@opentelemetry/exporter-trace-otlp-http":"^0.212.0","@opentelemetry/resources":"^2.5.1","@opentelemetry/sdk-logs":"^0.212.0","@opentelemetry/sdk-metrics":"^2.5.1","@opentelemetry/sdk-trace-node":"^2.5.1","@opentelemetry/semantic-conventions":"^1.39.0","@sinclair/typebox":"^0.34.41","@vscode/copilot-api":"^0.2.18","@vscode/extension-telemetry":"^1.5.1","@vscode/l10n":"^0.0.18","@vscode/prompt-tsx":"^0.4.0-alpha.8","@vscode/tree-sitter-wasm":"0.0.5-php.2","@vscode/webview-ui-toolkit":"^1.3.1","@xterm/headless":"^5.5.0",ajv:"^8.18.0",applicationinsights:"^2.9.7","best-effort-json-parser":"^1.2.1",diff:"^8.0.3",dompurify:"^3.3.2",express:"^5.2.1",ignore:"^7.0.5",isbinaryfile:"^5.0.4","jsonc-parser":"^3.3.1","lru-cache":"^11.1.0","markdown-it":"^14.1.1",minimatch:"^10.2.1",undici:"^7.24.1","vscode-tas-client":"^0.1.84","web-tree-sitter":"^0.23.0"},overrides:{"@aminya/node-gyp-build":"npm:node-gyp-build@4.8.1",string_decoder:"npm:string_decoder@1.2.0","node-gyp":"npm:node-gyp@10.3.1",zod:"3.25.76"},vscodeCommit:"e1ab55e1215fa458d1aeabcf8afd1a9478d2c47f"}});var txe=T(s_=>{"use strict";f();Object.defineProperty(s_,"__esModule",{value:!0});s_.vscodeEngineVersion=s_.isPreRelease=s_.isProduction=s_.packageJson=void 0;s_.packageJson=mHn();s_.isProduction=s_.packageJson.buildType!=="dev";s_.isPreRelease=s_.packageJson.isPreRelease||!s_.isProduction;s_.vscodeEngineVersion=s_.packageJson.engines.vscode});var iR=T(a_=>{"use strict";f();Object.defineProperty(a_,"__esModule",{value:!0});a_.isScenarioAutomation=a_.AbstractEnvService=a_.INativeEnvService=a_.IEnvService=a_.NameAndVersion=a_.OperatingSystem=void 0;var AHn=qr(),yHn=IQe(),Jle=txe(),gHn;(function(t){t.Windows="Windows",t.Macintosh="Mac",t.Linux="Linux"})(gHn||(a_.OperatingSystem=gHn={}));var jZt=class{static{a(this,"NameAndVersion")}constructor(e,r){this.name=e,this.version=r}format(){return`${this.name}/${this.version}`}};a_.NameAndVersion=jZt;a_.IEnvService=(0,AHn.createServiceIdentifier)("IEnvService");a_.INativeEnvService=(0,AHn.createServiceIdentifier)("INativeEnvService");var $Zt=class{static{a(this,"AbstractEnvService")}isProduction(){return Jle.isProduction}isPreRelease(){return Jle.isPreRelease}isSimulation(){return yHn.env.SIMULATION==="1"}getBuildType(){return Jle.packageJson.buildType}getVersion(){return Jle.packageJson.version}getBuild(){return Jle.packageJson.build}getName(){return Jle.packageJson.name}getEditorVersionHeaders(){return{"Editor-Version":this.getEditorInfo().format(),"Editor-Plugin-Version":this.getEditorPluginInfo().format()}}};a_.AbstractEnvService=$Zt;a_.isScenarioAutomation=yHn.env.IS_SCENARIO_AUTOMATION==="1"});var Np=T(lY=>{"use strict";f();Object.defineProperty(lY,"__esModule",{value:!0});lY.generateUuid=void 0;lY.isUUID=ORs;lY.prefixedUuid=BRs;var MRs=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ORs(t){return MRs.test(t)}a(ORs,"isUUID");lY.generateUuid=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let t=new Uint8Array(16),e=[];for(let r=0;r<256;r++)e.push(r.toString(16).padStart(2,"0"));return a(function(){crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=0,o="";return o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o},"generateUuid")})();function BRs(t){return`${t}-${(0,lY.generateUuid)()}`}a(BRs,"prefixedUuid")});var EHn=T(Yrt=>{"use strict";f();Object.defineProperty(Yrt,"__esModule",{value:!0});Yrt.CopilotConfigPrefix=void 0;Yrt.CopilotConfigPrefix="github.copilot"});var WZt=T(oR=>{"use strict";f();var LRs=oR&&oR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FRs=oR&&oR.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),URs=oR&&oR.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o(n&&(r=r.bind(n)),t(a(c=>{let l=e(c);l!==void 0&&r(l)},"wrappedListener"),void 0,o))}a(qRs,"transformEvent")});var Xm=T(Yr=>{"use strict";f();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.apiVersion=Yr.ICompletionsEditorAndPluginInfo=Yr.BuildInfo=Yr.InMemoryConfigProvider=Yr.DefaultsOnlyConfigProvider=Yr.ConfigProvider=Yr.ICompletionsConfigProvider=Yr.BuildType=Yr.BlockMode=Yr.ConfigKey=Yr.packageJson=void 0;Yr.shouldDoServerTrimming=jRs;Yr.getConfigKeyRecursively=$Rs;Yr.getConfigDefaultForKey=_Hn;Yr.getOptionalConfigDefaultForKey=vHn;Yr.getConfig=VRs;Yr.dumpForTelemetry=WRs;Yr.formatNameAndVersion=JZt;Yr.editorVersionHeaders=zRs;var Krt=txe();Object.defineProperty(Yr,"packageJson",{enumerable:!0,get:a(function(){return Krt.packageJson},"get")});var CHn=qr(),GRs=EHn(),HRs=WZt();Yr.ConfigKey={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",UseSplitContextPrompt:"internal.useSplitContextPrompt"};var Jrt;(function(t){t.Parsing="parsing",t.Server="server",t.ParsingAndServer="parsingandserver",t.MoreMultiline="moremultiline"})(Jrt||(Yr.BlockMode=Jrt={}));function jRs(t){return[Jrt.Server,Jrt.ParsingAndServer].includes(t)}a(jRs,"shouldDoServerTrimming");var uY;(function(t){t.DEV="dev",t.PROD="prod",t.NIGHTLY="nightly"})(uY||(Yr.BuildType=uY={}));Yr.ICompletionsConfigProvider=(0,CHn.createServiceIdentifier)("ICompletionsConfigProvider");var rxe=class{static{a(this,"ConfigProvider")}requireReady(){return Promise.resolve()}};Yr.ConfigProvider=rxe;var zZt=class extends rxe{static{a(this,"DefaultsOnlyConfigProvider")}constructor(){super(...arguments),this.onDidChangeCopilotSettings=()=>({dispose:a(()=>{},"dispose")})}getConfig(e){return _Hn(e)}getOptionalConfig(e){return vHn(e)}dumpForTelemetry(){return{}}};Yr.DefaultsOnlyConfigProvider=zZt;var YZt=class extends rxe{static{a(this,"InMemoryConfigProvider")}constructor(e){super(),this.baseConfigProvider=e,this.copilotEmitter=new HRs.Emitter,this.onDidChangeCopilotSettings=this.copilotEmitter.event,this.overrides=new Map}setOverrides(e){this.overrides=e}clearOverrides(){this.overrides.clear()}getOptionalOverride(e){return this.overrides.get(e)}getConfig(e){return this.getOptionalOverride(e)??this.baseConfigProvider.getConfig(e)}getOptionalConfig(e){return this.getOptionalOverride(e)??this.baseConfigProvider.getOptionalConfig(e)}setConfig(e,r){this.setCopilotSettings({[e]:r})}setCopilotSettings(e){for(let[r,n]of Object.entries(e))n!==void 0?this.overrides.set(r,n):this.overrides.delete(r);this.copilotEmitter.fire(this)}dumpForTelemetry(){let e=this.baseConfigProvider.dumpForTelemetry();for(let r of[Yr.ConfigKey.ShowEditorCompletions,Yr.ConfigKey.EnableAutoCompletions,Yr.ConfigKey.DelayCompletions,Yr.ConfigKey.FilterCompletions]){let n=this.overrides.get(r);n!==void 0&&(e[r]=JSON.stringify(n))}return e}};Yr.InMemoryConfigProvider=YZt;function $Rs(t,e){let r=t,n=[];for(let o of e.split(".")){let s=[...n,o].join(".");r&&typeof r=="object"&&s in r?(r=r[s],n.length=0):n.push(o)}if(!(r===void 0||n.length>0))return r}a($Rs,"getConfigKeyRecursively");function _Hn(t){if(KZt.has(t))return KZt.get(t);throw new Error(`Missing config default value: ${GRs.CopilotConfigPrefix}.${t}`)}a(_Hn,"getConfigDefaultForKey");function vHn(t){return KZt.get(t)}a(vHn,"getOptionalConfigDefaultForKey");var KZt=new Map([[Yr.ConfigKey.DebugOverrideCppHeadersEnableSwitch,!1],[Yr.ConfigKey.RelatedFilesVSCodeCSharp,!1],[Yr.ConfigKey.RelatedFilesVSCodeTypeScript,!1],[Yr.ConfigKey.RelatedFilesVSCode,!1],[Yr.ConfigKey.IncludeNeighboringFiles,!1],[Yr.ConfigKey.ExcludeRelatedFiles,!1],[Yr.ConfigKey.ContextProviders,[]],[Yr.ConfigKey.DebugSnippyOverrideUrl,""],[Yr.ConfigKey.UseSubsetMatching,null],[Yr.ConfigKey.ContextProviderTimeBudget,void 0],[Yr.ConfigKey.DebugOverrideCapiUrl,""],[Yr.ConfigKey.DebugTestOverrideCapiUrl,""],[Yr.ConfigKey.DebugOverrideProxyUrl,""],[Yr.ConfigKey.DebugTestOverrideProxyUrl,""],[Yr.ConfigKey.DebugOverrideEngine,""],[Yr.ConfigKey.AlwaysRequestMultiline,void 0],[Yr.ConfigKey.CompletionsDebounce,void 0],[Yr.ConfigKey.CompletionsDelay,void 0],[Yr.ConfigKey.ModelAlwaysTerminatesSingleline,void 0],[Yr.ConfigKey.UseWorkspaceContextCoordinator,void 0],[Yr.ConfigKey.ShowEditorCompletions,void 0],[Yr.ConfigKey.EnableAutoCompletions,void 0],[Yr.ConfigKey.DelayCompletions,void 0],[Yr.ConfigKey.FilterCompletions,void 0],[Yr.ConfigKey.UseSplitContextPrompt,!0],[Yr.ConfigKey.Enable,{"*":!0,plaintext:!1,markdown:!1,scminput:!1}],[Yr.ConfigKey.UserSelectedCompletionModel,""],[Yr.ConfigKey.DebugOverrideEngineLegacy,""],[Yr.ConfigKey.DebugOverrideProxyUrlLegacy,""],[Yr.ConfigKey.DebugTestOverrideProxyUrlLegacy,""],[Yr.ConfigKey.DebugOverrideCapiUrlLegacy,""],[Yr.ConfigKey.DebugTestOverrideCapiUrlLegacy,""],[Yr.ConfigKey.DebugFilterLogCategories,[]]]);function VRs(t,e){return t.get(Yr.ICompletionsConfigProvider).getConfig(e)}a(VRs,"getConfig");function WRs(t){try{return t.get(Yr.ICompletionsConfigProvider).dumpForTelemetry()}catch(e){return console.error(`Error dumping config for telemetry: ${e}`),{}}}a(WRs,"dumpForTelemetry");var Xrt=class t{static{a(this,"BuildInfo")}static isPreRelease(){return this.getBuildType()===uY.NIGHTLY}static isProduction(){return this.getBuildType()!==uY.DEV}static getBuildType(){return Krt.packageJson.buildType==="prod"?t.getVersion().length===15?uY.NIGHTLY:uY.PROD:uY.DEV}static getVersion(){return Krt.packageJson.version}static getBuild(){return Krt.packageJson.build}};Yr.BuildInfo=Xrt;function JZt({name:t,version:e}){return`${t}/${e}`}a(JZt,"formatNameAndVersion");Yr.ICompletionsEditorAndPluginInfo=(0,CHn.createServiceIdentifier)("ICompletionsEditorAndPluginInfo");Yr.apiVersion="2025-05-01";function zRs(t){let e=t.get(Yr.ICompletionsEditorAndPluginInfo);return{"Editor-Version":JZt(e.getEditorInfo()),"Editor-Plugin-Version":JZt(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":Xrt.getVersion()}}a(zRs,"editorVersionHeaders")});var XZt=T(Zrt=>{"use strict";f();Object.defineProperty(Zrt,"__esModule",{value:!0});Zrt.ExpServiceTelemetryNames=void 0;var bHn;(function(t){t.featuresTelemetryPropertyName="VSCode.ABExp.Features"})(bHn||(Zrt.ExpServiceTelemetryNames=bHn={}))});var ent=T(Xle=>{"use strict";f();Object.defineProperty(Xle,"__esModule",{value:!0});Xle.ExpConfig=Xle.ExpTreatmentVariables=void 0;var YRs=Dp(),KRs=XZt(),THn;(function(t){t.CustomEngine="copilotcustomengine",t.CustomEngineTargetEngine="copilotcustomenginetargetengine",t.OverrideBlockMode="copilotoverrideblockmode",t.SuffixPercent="CopilotSuffixPercent",t.CppHeadersEnableSwitch="copilotcppheadersenableswitch",t.UseSubsetMatching="copilotsubsetmatching",t.SuffixMatchThreshold="copilotsuffixmatchthreshold",t.MaxPromptCompletionTokens="maxpromptcompletionTokens",t.StableContextPercent="copilotstablecontextpercent",t.VolatileContextPercent="copilotvolatilecontextpercent",t.RelatedFilesVSCodeCSharp="copilotrelatedfilesvscodecsharp",t.RelatedFilesVSCodeTypeScript="copilotrelatedfilesvscodetypescript",t.RelatedFilesVSCode="copilotrelatedfilesvscode",t.ContextProviders="copilotcontextproviders",t.IncludeNeighboringFiles="copilotincludeneighboringfiles",t.ExcludeRelatedFiles="copilotexcluderelatedfiles",t.ContextProviderTimeBudget="copilotcontextprovidertimebudget",t.CppContextProviderParams="copilotcppContextProviderParams",t.CSharpContextProviderParams="copilotcsharpcontextproviderparams",t.JavaContextProviderParams="copilotjavacontextproviderparams",t.MultiLanguageContextProviderParams="copilotmultilanguagecontextproviderparams",t.TsContextProviderParams="copilottscontextproviderparams",t.CompletionsDebounce="copilotcompletionsdebounce",t.ElectronFetcher="copilotelectronfetcher",t.FetchFetcher="copilotfetchfetcher",t.AsyncCompletionsTimeout="copilotasynccompletionstimeout",t.EnablePromptContextProxyField="copilotenablepromptcontextproxyfield",t.ProgressiveReveal="copilotprogressivereveal",t.ModelAlwaysTerminatesSingleline="copilotmodelterminatesingleline",t.ProgressiveRevealLongLookaheadSize="copilotprogressivereveallonglookaheadsize",t.ProgressiveRevealShortLookaheadSize="copilotprogressiverevealshortlookaheadsize",t.MaxMultilineTokens="copilotmaxmultilinetokens",t.MultilineAfterAcceptLines="copilotmultilineafteracceptlines",t.CompletionsDelay="copilotcompletionsdelay",t.SingleLineUnlessAccepted="copilotsinglelineunlessaccepted"})(THn||(Xle.ExpTreatmentVariables=THn={}));var ZZt=class t{static{a(this,"ExpConfig")}constructor(e,r){this.variables=e,this.features=r}static createFallbackConfig(e,r){return(0,YRs.telemetryExpProblem)(e,{reason:r}),this.createEmptyConfig()}static createEmptyConfig(){return new t({},"")}addToTelemetry(e){e.properties[KRs.ExpServiceTelemetryNames.featuresTelemetryPropertyName]=this.features}};Xle.ExpConfig=ZZt});var Zm=T(tnt=>{"use strict";f();Object.defineProperty(tnt,"__esModule",{value:!0});tnt.ICompletionsFeaturesService=void 0;var JRs=qr();tnt.ICompletionsFeaturesService=(0,JRs.createServiceIdentifier)("ICompletionsFeaturesService")});var rnt=T(fU=>{"use strict";f();Object.defineProperty(fU,"__esModule",{value:!0});fU.FilterSettings=fU.Release=fU.Filter=void 0;var dY;(function(t){t.ExtensionRelease="X-VSCode-ExtensionRelease",t.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",t.CopilotEngine="X-Copilot-Engine",t.CopilotOverrideEngine="X-Copilot-OverrideEngine",t.CopilotRepository="X-Copilot-Repository",t.CopilotFileType="X-Copilot-FileType",t.CopilotUserKind="X-Copilot-UserKind",t.CopilotDogfood="X-Copilot-Dogfood",t.CopilotCustomModel="X-Copilot-CustomModel",t.CopilotOrgs="X-Copilot-Orgs",t.CopilotCustomModelNames="X-Copilot-CustomModelNames",t.CopilotTrackingId="X-Copilot-CopilotTrackingId",t.CopilotClientVersion="X-Copilot-ClientVersion",t.CopilotRelatedPluginVersionCppTools="X-Copilot-RelatedPluginVersion-msvscodecpptools",t.CopilotRelatedPluginVersionCMakeTools="X-Copilot-RelatedPluginVersion-msvscodecmaketools",t.CopilotRelatedPluginVersionMakefileTools="X-Copilot-RelatedPluginVersion-msvscodemakefiletools",t.CopilotRelatedPluginVersionCSharpDevKit="X-Copilot-RelatedPluginVersion-msdotnettoolscsdevkit",t.CopilotRelatedPluginVersionPython="X-Copilot-RelatedPluginVersion-mspythonpython",t.CopilotRelatedPluginVersionPylance="X-Copilot-RelatedPluginVersion-mspythonvscodepylance",t.CopilotRelatedPluginVersionJavaPack="X-Copilot-RelatedPluginVersion-vscjavavscodejavapack",t.CopilotRelatedPluginVersionJavaManager="X-Copilot-RelatedPluginVersion-vscjavavscodejavadependency",t.CopilotRelatedPluginVersionTypescript="X-Copilot-RelatedPluginVersion-vscodetypescriptlanguagefeatures",t.CopilotRelatedPluginVersionTypescriptNext="X-Copilot-RelatedPluginVersion-msvscodevscodetypescriptnext",t.CopilotRelatedPluginVersionCSharp="X-Copilot-RelatedPluginVersion-msdotnettoolscsharp",t.CopilotRelatedPluginVersionGithubCopilotChat="X-Copilot-RelatedPluginVersion-githubcopilotchat",t.CopilotRelatedPluginVersionGithubCopilot="X-Copilot-RelatedPluginVersion-githubcopilot"})(dY||(fU.Filter=dY={}));var SHn;(function(t){t.Stable="stable",t.Nightly="nightly"})(SHn||(fU.Release=SHn={}));var XRs={[dY.CopilotClientTimeBucket]:"timeBucket",[dY.CopilotOverrideEngine]:"engine",[dY.CopilotRepository]:"repo",[dY.CopilotFileType]:"fileType",[dY.CopilotUserKind]:"userKind"},eer=class{static{a(this,"FilterSettings")}constructor(e){this.filters=e;for(let[r,n]of Object.entries(this.filters))n===""&&delete this.filters[r]}addToTelemetry(e){for(let[r,n]of Object.entries(this.filters)){let o=XRs[r];o!==void 0&&(e.properties[o]=n)}}toHeaders(){return{...this.filters}}};fU.FilterSettings=eer});var fB=T(Mp=>{"use strict";f();Object.defineProperty(Mp,"__esModule",{value:!0});Mp.vString=e2s;Mp.vNumber=r2s;Mp.vBoolean=i2s;Mp.vObjAny=s2s;Mp.vUndefined=c2s;Mp.vNull=l2s;Mp.vNullable=u2s;Mp.vUnchecked=xHn;Mp.vUnknown=d2s;Mp.vRequired=f2s;Mp.vObj=p2s;Mp.vArray=h2s;Mp.vTuple=m2s;Mp.vUnion=wHn;Mp.vEnum=g2s;Mp.vLiteral=A2s;Mp.vLazy=y2s;var fY=class{static{a(this,"TypeofValidator")}constructor(e){this.type=e}validate(e){return typeof e!==this.type?{content:void 0,error:{message:`Expected ${this.type}, but got ${typeof e}`}}:{content:e,error:void 0}}toSchema(){return{type:this.type}}},ZRs=new fY("string");function e2s(){return ZRs}a(e2s,"vString");var t2s=new fY("number");function r2s(){return t2s}a(r2s,"vNumber");var n2s=new fY("boolean");function i2s(){return n2s}a(i2s,"vBoolean");var o2s=new fY("object");function s2s(){return o2s}a(s2s,"vObjAny");var a2s=new fY("undefined");function c2s(){return a2s}a(c2s,"vUndefined");var ter=class{static{a(this,"NullValidator")}validate(e){return e!==null?{content:void 0,error:{message:`Expected null, but got ${typeof e}`}}:{content:null,error:void 0}}toSchema(){return{type:"null"}}},IHn=new ter;function l2s(){return IHn}a(l2s,"vNull");function u2s(t){return wHn(t,IHn)}a(u2s,"vNullable");function xHn(){return{validate(t){return{content:t,error:void 0}},toSchema(){return{}}}}a(xHn,"vUnchecked");function d2s(){return xHn()}a(d2s,"vUnknown");function f2s(t){return{validate(e){return e===void 0?{content:void 0,error:{message:"Required field is missing"}}:t.validate(e)},toSchema(){return t.toSchema()},isRequired(){return!0}}}a(f2s,"vRequired");function p2s(t){return{validate(e){if(typeof e!="object"||e===null)return{content:void 0,error:{message:"Expected object"}};let r={};for(let n in t){let o=t[n],s=e[n],c=o.isRequired?.()??!1;if(c&&s===void 0)return{content:void 0,error:{message:`Required field '${n}' is missing`}};if(!c&&s===void 0)continue;let{content:l,error:u}=o.validate(s);if(u)return{content:void 0,error:{message:`Error in property '${n}': ${u.message}`}};r[n]=l}return{content:r,error:void 0}},toSchema(){let e=[],r={};for(let[o,s]of Object.entries(t))r[o]=s.toSchema(),s.isRequired?.()&&e.push(o);return{type:"object",properties:r,...e.length>0?{required:e}:{}}}}}a(p2s,"vObj");function h2s(t){return{validate(e){if(!Array.isArray(e))return{content:void 0,error:{message:"Expected array"}};let r=[];for(let n=0;ne.toSchema())}}}}a(m2s,"vTuple");function wHn(...t){return{validate(e){let r;for(let n of t){let{content:o,error:s}=n.validate(e);if(!s)return{content:o,error:void 0};r=s}return{content:void 0,error:r}},toSchema(){return{oneOf:t.map(e=>e.toSchema())}}}}a(wHn,"vUnion");function g2s(...t){return{validate(e){return t.indexOf(e)===-1?{content:void 0,error:{message:`Expected one of: ${t.join(", ")}`}}:{content:e,error:void 0}},toSchema(){return{enum:t}}}}a(g2s,"vEnum");function A2s(t){return{validate(e){return e!==t?{content:void 0,error:{message:`Expected: ${t}`}}:{content:e,error:void 0}},toSchema(){return{const:t}}}}a(A2s,"vLiteral");function y2s(t){return{validate(e){return t().validate(e)},toSchema(){return t().toSchema()}}}a(y2s,"vLazy")});var rer=T(nxe=>{"use strict";f();Object.defineProperty(nxe,"__esModule",{value:!0});nxe.ImportChanges=void 0;var E2s=fB(),nnt;(function(t){t.All="all",t.None="none"})(nnt||(nxe.ImportChanges=nnt={}));(function(t){t.VALIDATOR=(0,E2s.vEnum)(t.All,t.None)})(nnt||(nxe.ImportChanges=nnt={}))});var kHn=T(Zle=>{"use strict";f();Object.defineProperty(Zle,"__esModule",{value:!0});Zle.JointCompletionsProviderTriggerChangeStrategy=Zle.JointCompletionsProviderStrategy=void 0;var RHn;(function(t){t.Regular="regular",t.CursorEndOfLine="cursorEndOfLine"})(RHn||(Zle.JointCompletionsProviderStrategy=RHn={}));var PHn;(function(t){t.NoTriggerOnRequestInFlight="noTriggerOnRequestInFlight",t.NoTriggerOnCompletionsRequestInFlight="noTriggerOnCompletionsRequestInFlight",t.AlwaysTrigger="alwaysTrigger"})(PHn||(Zle.JointCompletionsProviderTriggerChangeStrategy=PHn={}))});var ont=T(pY=>{"use strict";f();Object.defineProperty(pY,"__esModule",{value:!0});pY.NextCursorLinePredictionCursorPlacement=pY.NextCursorLinePrediction=void 0;var C2s=fB(),NHn;(function(t){t.Jump="jump",t.OnlyWithEdit="onlyWithEdit"})(NHn||(pY.NextCursorLinePrediction=NHn={}));var int;(function(t){t.BeforeLine="beforeLine",t.AfterLine="afterLine"})(int||(pY.NextCursorLinePredictionCursorPlacement=int={}));(function(t){t.VALIDATOR=(0,C2s.vEnum)(t.BeforeLine,t.AfterLine)})(int||(pY.NextCursorLinePredictionCursorPlacement=int={}))});var DHn=T(ixe=>{"use strict";f();Object.defineProperty(ixe,"__esModule",{value:!0});ixe.DocumentSwitchTriggerStrategy=void 0;var _2s=fB(),snt;(function(t){t.Always="always",t.AfterAcceptance="afterAcceptance"})(snt||(ixe.DocumentSwitchTriggerStrategy=snt={}));(function(t){t.VALIDATOR=(0,_2s.vEnum)(t.Always,t.AfterAcceptance)})(snt||(ixe.DocumentSwitchTriggerStrategy=snt={}))});var ner=T(oxe=>{"use strict";f();Object.defineProperty(oxe,"__esModule",{value:!0});oxe.DiffHistoryMergeStrategy=void 0;var v2s=fB(),ant;(function(t){t.SameStartLine="sameStartLine",t.Proximity="proximity",t.Hybrid="hybrid"})(ant||(oxe.DiffHistoryMergeStrategy=ant={}));(function(t){t.VALIDATOR=(0,v2s.vEnum)(t.SameStartLine,t.Proximity,t.Hybrid)})(ant||(oxe.DiffHistoryMergeStrategy=ant={}))});var Qy=T(Mn=>{"use strict";f();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.SpeculativeRequestsAutoExpandEditWindowLines=Mn.SpeculativeRequestsCursorPlacement=Mn.SpeculativeRequestsEnablement=Mn.USER_HAPPINESS_SCORE_CONFIGURATION_VALIDATOR=Mn.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION=Mn.MODEL_CONFIGURATION_VALIDATOR=Mn.LINT_OPTIONS_VALIDATOR=Mn.LANGUAGE_CONTEXT_ENABLED_LANGUAGES=Mn.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS=Mn.DEFAULT_OPTIONS=Mn.ResponseFormat=Mn.PromptingStrategy=Mn.EditIntent=Mn.AggressivenessLevel=Mn.AggressivenessSetting=Mn.LintOptionShowCode=Mn.LintOptionWarning=Mn.CurrentFileOptions=Mn.RecentlyViewedDocumentsOptions=Mn.RecentFileClippingStrategy=Mn.IncludeLineNumbersOption=void 0;Mn.isPromptingStrategy=b2s;Mn.isAggressivenessStrategy=T2s;Mn.parseLintOptionString=S2s;Mn.parseUserHappinessScoreConfigurationString=I2s;var OHn=Jl(),En=fB(),bD;(function(t){t.WithSpaceAfter="withSpaceAfter",t.WithoutSpace="withoutSpaceAfter",t.None="none"})(bD||(Mn.IncludeLineNumbersOption=bD={}));var pU;(function(t){t.TopToBottom="topToBottom",t.AroundEditRange="aroundEditRange",t.Proportional="proportional"})(pU||(Mn.RecentFileClippingStrategy=pU={}));(function(t){t.VALIDATOR=(0,En.vEnum)(t.TopToBottom,t.AroundEditRange,t.Proportional)})(pU||(Mn.RecentFileClippingStrategy=pU={}));var ier;(function(t){t.VALIDATOR=(0,En.vObj)({nDocuments:(0,En.vNumber)(),maxTokens:(0,En.vNumber)(),includeViewedFiles:(0,En.vBoolean)(),includeLineNumbers:(0,En.vEnum)(bD.WithSpaceAfter,bD.WithoutSpace,bD.None),clippingStrategy:(0,En.vEnum)(pU.TopToBottom,pU.AroundEditRange,pU.Proportional)})})(ier||(Mn.RecentlyViewedDocumentsOptions=ier={}));var oer;(function(t){t.VALIDATOR=(0,En.vObj)({maxTokens:(0,En.vNumber)(),includeTags:(0,En.vBoolean)(),includeLineNumbers:(0,En.vEnum)(bD.WithSpaceAfter,bD.WithoutSpace,bD.None),includeCursorTag:(0,En.vBoolean)(),prioritizeAboveCursor:(0,En.vBoolean)()})})(oer||(Mn.CurrentFileOptions=oer={}));var eue;(function(t){t.YES="yes",t.NO="no",t.YES_IF_NO_ERRORS="yesIfNoErrors"})(eue||(Mn.LintOptionWarning=eue={}));var tue;(function(t){t.YES="yes",t.NO="no",t.YES_WITH_SURROUNDING="yesWithSurroundingLines"})(tue||(Mn.LintOptionShowCode=tue={}));var cnt;(function(t){t.Default="auto",t.Low="low",t.Medium="medium",t.High="high"})(cnt||(Mn.AggressivenessSetting=cnt={}));var hU;(function(t){t.Low="low",t.Medium="medium",t.High="high"})(hU||(Mn.AggressivenessLevel=hU={}));(function(t){t.VALIDATOR=(0,En.vEnum)(t.Default,t.Low,t.Medium,t.High);function e(r){switch(r){case t.Low:return hU.Low;case t.Medium:return hU.Medium;case t.High:return hU.High;case t.Default:return}}a(e,"toLevel"),t.toLevel=e})(cnt||(Mn.AggressivenessSetting=cnt={}));var lnt;(function(t){t.NoEdit="no_edit",t.Low="low",t.Medium="medium",t.High="high"})(lnt||(Mn.EditIntent=lnt={}));(function(t){function e(o){switch(o){case"no_edit":return t.NoEdit;case"low":return t.Low;case"medium":return t.Medium;case"high":return t.High;default:return t.High}}a(e,"fromString"),t.fromString=e;function r(o){switch(o){case"N":return t.NoEdit;case"L":return t.Low;case"M":return t.Medium;case"H":return t.High;default:return}}a(r,"fromShortName"),t.fromShortName=r;function n(o,s){switch(o){case t.NoEdit:return!1;case t.High:return!0;case t.Medium:return s===hU.Medium||s===hU.High;case t.Low:return s===hU.High;default:(0,OHn.assertNever)(o)}}a(n,"shouldShowEdit"),t.shouldShowEdit=n})(lnt||(Mn.EditIntent=lnt={}));var Of;(function(t){t.CopilotNesXtab="copilotNesXtab",t.UnifiedModel="xtabUnifiedModel",t.Codexv21NesUnified="codexv21nesUnified",t.Nes41Miniv3="nes41miniv3",t.SimplifiedSystemPrompt="simplifiedSystemPrompt",t.Xtab275="xtab275",t.XtabAggressiveness="xtabAggressiveness",t.Xtab275Aggressiveness="xtab275Aggressiveness",t.PatchBased="patchBased",t.PatchBased01="patchBased01",t.PatchBased02="patchBased02",t.Xtab275EditIntent="xtab275EditIntent",t.Xtab275EditIntentShort="xtab275EditIntentShort"})(Of||(Mn.PromptingStrategy=Of={}));function b2s(t){return Object.values(Of).includes(t)}a(b2s,"isPromptingStrategy");function T2s(t){return t===Of.XtabAggressiveness||t===Of.Xtab275Aggressiveness||t===Of.Xtab275EditIntent||t===Of.Xtab275EditIntentShort}a(T2s,"isAggressivenessStrategy");var unt;(function(t){t.CodeBlock="codeBlock",t.UnifiedWithXml="unifiedWithXml",t.EditWindowOnly="editWindowOnly",t.CustomDiffPatch="customDiffPatch",t.EditWindowWithEditIntent="editWindowWithEditIntent",t.EditWindowWithEditIntentShort="editWindowWithEditIntentShort"})(unt||(Mn.ResponseFormat=unt={}));(function(t){function e(r){switch(r){case Of.UnifiedModel:case Of.Codexv21NesUnified:case Of.Nes41Miniv3:return t.UnifiedWithXml;case Of.Xtab275:case Of.XtabAggressiveness:case Of.Xtab275Aggressiveness:return t.EditWindowOnly;case Of.PatchBased:case Of.PatchBased01:case Of.PatchBased02:return t.CustomDiffPatch;case Of.Xtab275EditIntent:return t.EditWindowWithEditIntent;case Of.Xtab275EditIntentShort:return t.EditWindowWithEditIntentShort;case Of.SimplifiedSystemPrompt:case Of.CopilotNesXtab:case void 0:return t.CodeBlock;default:(0,OHn.assertNever)(r)}}a(e,"fromPromptingStrategy"),t.fromPromptingStrategy=e})(unt||(Mn.ResponseFormat=unt={}));Mn.DEFAULT_OPTIONS={promptingStrategy:void 0,currentFile:{maxTokens:2e3,includeTags:!0,includeLineNumbers:bD.None,includeCursorTag:!1,prioritizeAboveCursor:!1},pagedClipping:{pageSize:10},recentlyViewedDocuments:{nDocuments:5,maxTokens:2e3,includeViewedFiles:!1,includeLineNumbers:bD.None,clippingStrategy:pU.TopToBottom},languageContext:{enabled:!1,maxTokens:2e3,traitPosition:"after"},diffHistory:{nEntries:25,maxTokens:1e3,onlyForDocsInPrompt:!1,useRelativePaths:!1},lintOptions:void 0,includePostScript:!0};Mn.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS={maxLineDistance:1e3,maxLints:5,showCode:tue.YES_WITH_SURROUNDING,tagName:"linter",warnings:eue.YES_IF_NO_ERRORS,nRecentFiles:0};Mn.LANGUAGE_CONTEXT_ENABLED_LANGUAGES={prompt:!0,instructions:!0,chatagent:!0};Mn.LINT_OPTIONS_VALIDATOR=(0,En.vObj)({tagName:(0,En.vString)(),warnings:(0,En.vEnum)(eue.YES,eue.NO,eue.YES_IF_NO_ERRORS),showCode:(0,En.vEnum)(tue.NO,tue.YES,tue.YES_WITH_SURROUNDING),maxLints:(0,En.vNumber)(),maxLineDistance:(0,En.vNumber)(),nRecentFiles:(0,En.vNumber)()});Mn.MODEL_CONFIGURATION_VALIDATOR=(0,En.vObj)({modelName:(0,En.vRequired)((0,En.vString)()),promptingStrategy:(0,En.vUnion)((0,En.vEnum)(...Object.values(Of)),(0,En.vUndefined)()),includeTagsInCurrentFile:(0,En.vRequired)((0,En.vBoolean)()),includePostScript:(0,En.vUnion)((0,En.vBoolean)(),(0,En.vUndefined)()),currentFile:(0,En.vUnion)(oer.VALIDATOR,(0,En.vUndefined)()),recentlyViewedDocuments:(0,En.vUnion)(ier.VALIDATOR,(0,En.vUndefined)()),lintOptions:(0,En.vUnion)(Mn.LINT_OPTIONS_VALIDATOR,(0,En.vUndefined)()),supportsNextCursorLinePrediction:(0,En.vUnion)((0,En.vBoolean)(),(0,En.vUndefined)())});function S2s(t,e){try{let r=JSON.parse(t),n=Mn.LINT_OPTIONS_VALIDATOR.validate(r);if(n.error)throw new Error(`Lint options validation failed: ${n.error.message}`);return{...e,...n.content}}catch(r){throw new Error(`Failed to parse lint options string: ${r}`)}}a(S2s,"parseLintOptionString");Mn.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION={acceptedScore:1,rejectedScore:0,ignoredScore:.5,highThreshold:.7,mediumThreshold:.4,includeIgnored:!1,ignoredLimit:0,limitConsecutiveIgnored:!1,limitTotalIgnored:!0};var MHn=(0,En.vObj)({acceptedScore:(0,En.vRequired)((0,En.vNumber)()),rejectedScore:(0,En.vRequired)((0,En.vNumber)()),ignoredScore:(0,En.vRequired)((0,En.vNumber)()),highThreshold:(0,En.vRequired)((0,En.vNumber)()),mediumThreshold:(0,En.vRequired)((0,En.vNumber)()),includeIgnored:(0,En.vRequired)((0,En.vBoolean)()),ignoredLimit:(0,En.vRequired)((0,En.vNumber)()),limitConsecutiveIgnored:(0,En.vRequired)((0,En.vBoolean)()),limitTotalIgnored:(0,En.vRequired)((0,En.vBoolean)())});function sxe(t,e,r){return t>=e&&t<=r}a(sxe,"isInRange");Mn.USER_HAPPINESS_SCORE_CONFIGURATION_VALIDATOR={validate(t){let e=MHn.validate(t);if(e.error)return e;let r=e.content;return sxe(r.acceptedScore,0,1)?sxe(r.rejectedScore,0,1)?sxe(r.ignoredScore,0,1)?sxe(r.highThreshold,0,1)?sxe(r.mediumThreshold,0,1)?r.acceptedScore<=r.rejectedScore?{content:void 0,error:{message:"acceptedScore must be greater than rejectedScore to prevent division by zero"}}:r.ignoredScore{"use strict";f();Object.defineProperty(rue,"__esModule",{value:!0});rue.TextReplacement=rue.TextEdit=void 0;var BHn=jc(),LHn=Jl(),gnt=es(),hnt=C0(),mU=ZE(),B0=Ef(),Ant=Vae(),FHn=Qv(),ynt=class t{static{a(this,"TextEdit")}static fromStringEdit(e,r){let n=e.replacements.map(o=>qy.fromStringReplacement(o,r));return new t(n)}static replace(e,r){return new t([new qy(e,r)])}static delete(e){return new t([new qy(e,"")])}static insert(e,r){return new t([new qy(B0.Range.fromPositions(e,e),r)])}static fromParallelReplacementsUnsorted(e){let r=e.slice().sort((0,BHn.compareBy)(n=>n.range,B0.Range.compareRangesUsingStarts));return new t(r)}constructor(e){this.replacements=e,(0,LHn.assertFn)(()=>(0,LHn.checkAdjacentItems)(e,(r,n)=>r.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}normalize(){let e=[];for(let r of this.replacements)if(e.length>0&&e[e.length-1].range.getEndPosition().equals(r.range.getStartPosition())){let n=e[e.length-1];e[e.length-1]=new qy(n.range.plusRange(r.range),n.text+r.text)}else r.isEmpty||e.push(r);return new t(e)}mapPosition(e){let r=0,n=0,o=0;for(let s of this.replacements){let c=s.range.getStartPosition();if(e.isBeforeOrEqual(c))break;let l=s.range.getEndPosition(),u=Ant.TextLength.ofText(s.text);if(e.isBefore(l)){let d=new mU.Position(c.lineNumber+r,c.column+(c.lineNumber+r===n?o:0)),p=u.addToPosition(d);return mnt(d,p)}c.lineNumber+r!==n&&(o=0),r+=u.lineCount-(s.range.endLineNumber-s.range.startLineNumber),u.lineCount===0?l.lineNumber!==c.lineNumber?o+=u.columnCount-(l.column-1):o+=u.columnCount-(l.column-c.column):o=u.columnCount,n=l.lineNumber+r}return new mU.Position(e.lineNumber+r,e.column+(e.lineNumber+r===n?o:0))}mapRange(e){function r(c){return c instanceof mU.Position?c:c.getStartPosition()}a(r,"getStart");function n(c){return c instanceof mU.Position?c:c.getEndPosition()}a(n,"getEnd");let o=r(this.mapPosition(e.getStartPosition())),s=n(this.mapPosition(e.getEndPosition()));return mnt(o,s)}inverseMapPosition(e,r){return this.inverse(r).mapPosition(e)}inverseMapRange(e,r){return this.inverse(r).mapRange(e)}apply(e){let r="",n=new mU.Position(1,1);for(let s of this.replacements){let c=s.range,l=c.getStartPosition(),u=c.getEndPosition(),d=mnt(n,l);d.isEmpty()||(r+=e.getValueOfRange(d)),r+=s.text,n=u}let o=mnt(n,e.endPositionExclusive);return o.isEmpty()||(r+=e.getValueOfRange(o)),r}applyToString(e){let r=new FHn.StringText(e);return this.apply(r)}inverse(e){let r=this.getNewRanges();return new t(this.replacements.map((n,o)=>new qy(r[o],e.getValueOfRange(n.range))))}getNewRanges(){let e=[],r=0,n=0,o=0;for(let s of this.replacements){let c=Ant.TextLength.ofText(s.text),l=mU.Position.lift({lineNumber:s.range.startLineNumber+n,column:s.range.startColumn+(s.range.startLineNumber===r?o:0)}),u=c.createRange(l);e.push(u),n=u.endLineNumber-s.range.endLineNumber,o=u.endColumn-s.range.endColumn,r=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new gnt.BugIndicatingError;if(this.replacements.length===1)return this.replacements[0];let r=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition(),o="";for(let s=0;sr.equals(n))}compose(e){let r=this.normalize(),n=e.normalize();if(r.replacements.length===0)return n;if(n.replacements.length===0)return r;let o=[],s=0,c=1,l=1,u=0,d=0,p=0,h=0,m=null,g=0,A=0,y=!1,E=!1,_=1,v=1;function b(){if(!y)if(sr.toString()).join(` -`):typeof e=="string"?this.toString(new FHn.StringText(e)):this.replacements.length===0?"":this.replacements.map(r=>{let o=e.getValueOfRange(r.range),s=B0.Range.fromPositions(new mU.Position(Math.max(1,r.range.startLineNumber-1),1),r.range.getStartPosition()),c=e.getValueOfRange(s);c.length>10&&(c="..."+c.substring(c.length-10));let l=B0.Range.fromPositions(r.range.getEndPosition(),new mU.Position(r.range.endLineNumber+1,1)),u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let d=o;if(d.length>10){let h=Math.floor(5);d=d.substring(0,h)+"..."+d.substring(d.length-h)}let p=r.text;if(p.length>10){let h=Math.floor(5);p=p.substring(0,h)+"..."+p.substring(p.length-h)}return d.length===0?`${c}\u2770${p}\u2771${u}`:`${c}\u2770${d}\u21A6${p}\u2771${u}`}).join(` -`)}};rue.TextEdit=ynt;var qy=class t{static{a(this,"TextReplacement")}static joinReplacements(e,r){if(e.length===0)throw new gnt.BugIndicatingError;if(e.length===1)return e[0];let n=e[0].range.getStartPosition(),o=e[e.length-1].range.getEndPosition(),s="";for(let c=0;c 1"},{command:"github.copilot.chat.review.apply",group:"inline@1",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments == 1"},{submenu:"copilot/reviewComment/additionalActions/discardAndNext",group:"inline@2",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments > 1"},{submenu:"copilot/reviewComment/additionalActions/discard",group:"inline@2",when:"commentController == github-copilot-review && github.copilot.chat.review.numberOfComments == 1"}],"copilot/reviewComment/additionalActions/applyAndNext":[{command:"github.copilot.chat.review.applyAndNext",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.apply",group:"inline@2",when:"commentController == github-copilot-review"}],"copilot/reviewComment/additionalActions/discardAndNext":[{command:"github.copilot.chat.review.discardAndNext",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discard",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInInlineChat",group:"inline@3",when:"commentController == github-copilot-review"}],"copilot/reviewComment/additionalActions/discard":[{command:"github.copilot.chat.review.discard",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInInlineChat",group:"inline@3",when:"commentController == github-copilot-review"}],"comments/commentThread/title":[{command:"github.copilot.chat.review.previous",group:"inline@1",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.next",group:"inline@2",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.continueInChat",group:"inline@3",when:"commentController == github-copilot-review"},{command:"github.copilot.chat.review.discardAll",group:"inline@4",when:"commentController == github-copilot-review"}],"scm/title":[{command:"github.copilot.chat.review.changes",group:"navigation",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmProviderRootUri in github.copilot.chat.reviewDiff.enabledRootUris"}],"scm/sourceControl":[{command:"github.copilot.cli.openInCopilotCLI",group:"3_worktree@1",when:"scmProvider == git"}],"scm/resourceGroup/context":[{command:"github.copilot.chat.review.stagedChanges",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == index",group:"inline@-3"},{command:"github.copilot.chat.review.unstagedChanges",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == workingTree",group:"inline@-3"}],"scm/resourceState/context":[{command:"github.copilot.git.resolveMergeConflicts",when:"scmProvider == git && scmResourceGroup == merge && git.activeResourceHasMergeConflicts",group:"z_chat@1"},{command:"github.copilot.chat.review.stagedFileChange",group:"3_copilot",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == index"},{command:"github.copilot.chat.review.unstagedFileChange",group:"3_copilot",when:"config.github.copilot.chat.reviewAgent.enabled && github.copilot.chat.reviewDiff.enabled && scmProvider == git && scmResourceGroup == workingTree"}],"scm/inputBox":[{command:"github.copilot.git.generateCommitMessage",when:"scmProvider == git"}],"testing/message/context":[{command:"github.copilot.tests.fixTestFailure",when:"testing.testItemHasUri",group:"inline@1"}],"issue/reporter":[{command:"github.copilot.report"}],"github.copilot.chat.debug.filter":[{command:"github.copilot.chat.debug.showElements",when:"github.copilot.chat.debug.elementsHidden",group:"commands@0"},{command:"github.copilot.chat.debug.hideElements",when:"!github.copilot.chat.debug.elementsHidden",group:"commands@0"},{command:"github.copilot.chat.debug.showTools",when:"github.copilot.chat.debug.toolsHidden",group:"commands@1"},{command:"github.copilot.chat.debug.hideTools",when:"!github.copilot.chat.debug.toolsHidden",group:"commands@1"},{command:"github.copilot.chat.debug.showNesRequests",when:"github.copilot.chat.debug.nesRequestsHidden",group:"commands@2"},{command:"github.copilot.chat.debug.hideNesRequests",when:"!github.copilot.chat.debug.nesRequestsHidden",group:"commands@2"},{command:"github.copilot.chat.debug.showGhostRequests",when:"github.copilot.chat.debug.ghostRequestsHidden",group:"commands@3"},{command:"github.copilot.chat.debug.hideGhostRequests",when:"!github.copilot.chat.debug.ghostRequestsHidden",group:"commands@3"}],"notebook/toolbar":[{command:"github.copilot.chat.notebook.enableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && !github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && config.notebook.globalToolbar",group:"navigation/execute@15"},{command:"github.copilot.chat.notebook.disableFollowCellExecution",when:"config.github.copilot.chat.notebook.followCellExecution.enabled && github.copilot.notebookFollowInSessionEnabled && github.copilot.notebookAgentModeUsage && config.notebook.globalToolbar",group:"navigation/execute@15"}],"editor/content":[{command:"github.copilot.git.resolveMergeConflicts",group:"z_chat@1",when:"config.git.enabled && !git.missing && !isInDiffEditor && !isMergeEditor && resource in git.mergeChanges && git.activeResourceHasMergeConflicts"}],"multiDiffEditor/content":[{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",when:"resourceScheme == copilotcli-worktree-changes && workbenchState != empty && !isSessionsWindow"}],"chat/chatSessions":[{command:"github.copilot.claude.sessions.rename",when:"chatSessionType == claude-code",group:"1_edit@4"},{command:"github.copilot.cli.sessions.delete",when:"chatSessionType == copilotcli",group:"1_edit@10"},{command:"github.copilot.cli.sessions.rename",when:"chatSessionType == copilotcli",group:"1_edit@4"},{command:"github.copilot.cli.sessions.openWorktreeInNewWindow",when:"chatSessionType == copilotcli && !isSessionsWindow",group:"2_open@1"},{command:"github.copilot.cli.sessions.openWorktreeInTerminal",when:"chatSessionType == copilotcli",group:"2_open@2"},{command:"github.copilot.cli.sessions.copyWorktreeBranchName",when:"chatSessionType == copilotcli",group:"2_open@3"},{command:"github.copilot.cli.sessions.resumeInTerminal",when:"chatSessionType == copilotcli",group:"2_open@4"},{command:"github.copilot.chat.applyCopilotCLIAgentSessionChanges",when:"chatSessionType == copilotcli && workbenchState != empty && !isSessionsWindow",group:"3_apply@0"},{command:"github.copilot.cloud.sessions.openInBrowser",when:"chatSessionType == copilot-cloud-agent",group:"navigation@10"},{command:"github.copilot.cloud.sessions.proxy.closeChatSessionPullRequest",when:"chatSessionType == copilot-cloud-agent",group:"1_edit@10"}],"chat/multiDiff/context":[{command:"github.copilot.cloud.sessions.installPRExtension",when:"chatSessionType == copilot-cloud-agent && !github.copilot.prExtensionInstalled",group:"inline@1"}],"chat/input/editing/sessionTitleToolbar":[{command:"github.copilot.sessions.refreshChanges",when:"chatSessionType == copilotcli && isSessionsWindow",group:"9_refresh@1"}],"chat/input/editing/sessionChangeToolbar":[{command:"github.copilot.sessions.discardChanges",when:"chatSessionType == copilotcli && isSessionsWindow",group:"navigation@1"}]},icons:{"copilot-logo":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0041"}},"copilot-warning":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0042"}},"copilot-notconnected":{description:"%github.copilot.icon%",default:{fontPath:"assets/copilot.woff",fontCharacter:"\\0043"}}},iconFonts:[{id:"copilot-font",src:[{path:"assets/copilot.woff",format:"woff"}]}],terminalQuickFixes:[{id:"copilot-chat.fixWithCopilot",commandLineMatcher:".+",commandExitResult:"error",outputMatcher:{anchor:"bottom",length:1,lineMatcher:".+",offset:0},kind:"explain"},{id:"copilot-chat.generateCommitMessage",commandLineMatcher:"git add .+",commandExitResult:"success",kind:"explain",outputMatcher:{anchor:"bottom",length:1,lineMatcher:".+",offset:0}},{id:"copilot-chat.terminalToDebugging",commandLineMatcher:".+",kind:"explain",commandExitResult:"error",outputMatcher:{anchor:"bottom",length:1,lineMatcher:"",offset:0}},{id:"copilot-chat.terminalToDebuggingSuccess",commandLineMatcher:".+",kind:"explain",commandExitResult:"success",outputMatcher:{anchor:"bottom",length:1,lineMatcher:"",offset:0}}],languages:[{id:"ignore",filenamePatterns:[".copilotignore"],aliases:[]},{id:"markdown",extensions:[".copilotmd"]}],notebooks:[{type:"copilot-chat-replay",displayName:"Copilot Chat Replay",selector:[{filenamePattern:"*.chatreplay.json"}]}],views:{"copilot-chat":[{id:"copilot-chat",name:"Chat Debug",icon:"assets/debug-icon.svg",when:"github.copilot.chat.showLogView"}],"context-inspector":[{id:"context-inspector",name:"Language Context Inspector",icon:"$(inspect)",when:"github.copilot.chat.showContextInspectorView"}]},viewsContainers:{activitybar:[{id:"copilot-chat",title:"Chat Debug",icon:"assets/debug-icon.svg"},{id:"context-inspector",title:"Language Context Inspector",icon:"$(inspect)"}]},configurationDefaults:{"workbench.editorAssociations":{"*.copilotmd":"vscode.markdown.preview.editor"}},keybindings:[{command:"github.copilot.chat.copilotCLI.addFileReference",key:"ctrl+shift+.",mac:"cmd+shift+.",when:"github.copilot.chat.copilotCLI.hasSession && editorTextFocus"},{command:"github.copilot.chat.rerunWithCopilotDebug",key:"ctrl+alt+.",mac:"cmd+alt+.",when:"github.copilot-chat.activated && terminalShellIntegrationEnabled && terminalFocus && !terminalAltBufferActive"},{command:"github.copilot.nes.captureExpected.confirm",key:"ctrl+enter",mac:"cmd+enter",when:"copilotNesCaptureMode && editorTextFocus"},{command:"github.copilot.nes.captureExpected.abort",key:"escape",when:"copilotNesCaptureMode && editorTextFocus"}],walkthroughs:[{id:"copilotWelcome",title:"%github.copilot.walkthrough.title%",description:"%github.copilot.walkthrough.description%",when:"!isWeb",steps:[{id:"copilot.setup.signIn",title:"%github.copilot.walkthrough.setup.signIn.title%",description:"%github.copilot.walkthrough.setup.signIn.description%",when:"chatEntitlementSignedOut && !view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && !github.copilot.interactiveSession.individual.disabled && !github.copilot.interactiveSession.individual.expired && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signInNoAction",title:"%github.copilot.walkthrough.setup.signIn.title%",description:"%github.copilot.walkthrough.setup.noAction.description%",when:"chatEntitlementSignedOut && view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && !github.copilot.interactiveSession.individual.disabled && !github.copilot.interactiveSession.individual.expired && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signUp",title:"%github.copilot.walkthrough.setup.signUp.title%",description:"%github.copilot.walkthrough.setup.signUp.description%",when:"chatPlanCanSignUp && !view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && (github.copilot.interactiveSession.individual.disabled || github.copilot.interactiveSession.individual.expired) && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.setup.signUpNoAction",title:"%github.copilot.walkthrough.setup.signUp.title%",description:"%github.copilot.walkthrough.setup.noAction.description%",when:"chatPlanCanSignUp && view.workbench.panel.chat.view.copilot.visible && !github.copilot-chat.activated && !github.copilot.offline && (github.copilot.interactiveSession.individual.disabled || github.copilot.interactiveSession.individual.expired) && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.invalidToken && !github.copilot.interactiveSession.rateLimited && !github.copilot.interactiveSession.gitHubLoginFailed",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.panelChat",title:"%github.copilot.walkthrough.panelChat.title%",description:"%github.copilot.walkthrough.panelChat.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/workspace-hclight.mp4"},altText:"%github.copilot.walkthrough.panelChat.media.altText%"}},{id:"copilot.edits",title:"%github.copilot.walkthrough.edits.title%",description:"%github.copilot.walkthrough.edits.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/edits-hclight.mp4"},altText:"%github.copilot.walkthrough.edits.media.altText%"}},{id:"copilot.firstSuggest",title:"%github.copilot.walkthrough.firstSuggest.title%",description:"%github.copilot.walkthrough.firstSuggest.description%",when:"!chatEntitlementSignedOut || chatIsEnabled ",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/ghost-text-hclight.mp4"},altText:"%github.copilot.walkthrough.firstSuggest.media.altText%"}},{id:"copilot.inlineChatNotMac",title:"%github.copilot.walkthrough.inlineChatNotMac.title%",description:"%github.copilot.walkthrough.inlineChatNotMac.description%",when:"!isMac && (!chatEntitlementSignedOut || chatIsEnabled )",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hclight.mp4"},altText:"%github.copilot.walkthrough.inlineChatNotMac.media.altText%"}},{id:"copilot.inlineChatMac",title:"%github.copilot.walkthrough.inlineChatMac.title%",description:"%github.copilot.walkthrough.inlineChatMac.description%",when:"isMac && (!chatEntitlementSignedOut || chatIsEnabled )",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/inline-hclight.mp4"},altText:"%github.copilot.walkthrough.inlineChatMac.media.altText%"}},{id:"copilot.sparkle",title:"%github.copilot.walkthrough.sparkle.title%",description:"%github.copilot.walkthrough.sparkle.description%",when:"!chatEntitlementSignedOut || chatIsEnabled",media:{video:{dark:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit.mp4",light:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-light.mp4",hc:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-hc.mp4",hcLight:"https://vscodewalkthroughs.z1.web.core.windows.net/v0.26/git-commit-hclight.mp4"},altText:"%github.copilot.walkthrough.sparkle.media.altText%"}}]}],jsonValidation:[{fileMatch:"settings.json",url:"ccsettings://root/schema.json"}],typescriptServerPlugins:[{name:"@vscode/copilot-typescript-server-plugin",enableForWorkspaceTypeScriptVersions:!0}],chatSessions:[{type:"claude-code",name:"claude",displayName:"Claude",icon:"$(claude)",welcomeTitle:"Claude Agent",welcomeMessage:"Powered by the same agent as Claude Code",inputPlaceholder:"Run local tasks with Claude, type `#` for adding context",order:3,description:"%github.copilot.session.providerDescription.claude%",when:"config.github.copilot.chat.claudeAgent.enabled",canDelegate:!0,requiresCustomModels:!0,capabilities:{supportsFileAttachments:!0,supportsImageAttachments:!0},commands:[{name:"init",description:"Initialize a new CLAUDE.md file with codebase documentation"},{name:"pr-comments",description:"Get comments from a GitHub pull request"},{name:"review",description:"Review a pull request"},{name:"security-review",description:"Complete a security review of the pending changes on the current branch"},{name:"simplify",description:"Review changed code for reuse, quality, and efficiency"},{name:"claude-api",description:"Help building with Claude API or Anthropic SDK"},{name:"agents",description:"Create and manage specialized Claude agents"},{name:"hooks",description:"Configure Claude Code hooks for tool execution and events"},{name:"memory",description:"Open memory files (CLAUDE.md) for editing"},{name:"compact",description:"Compact the conversation history to save context tokens"}]},{type:"copilotcli",name:"cli",displayName:"Copilot CLI",icon:"$(worktree)",welcomeTitle:"Copilot CLI",welcomeMessage:"Run tasks in the background with the Copilot CLI",inputPlaceholder:"Run tasks in the background with the Copilot CLI, type `#` for adding context",order:1,canDelegate:!0,description:"%github.copilot.session.providerDescription.background%",when:"config.github.copilot.chat.backgroundAgent.enabled",capabilities:{supportsFileAttachments:!0,supportsProblemAttachments:!0,supportsToolAttachments:!1,supportsImageAttachments:!0,supportsSymbolAttachments:!0,supportsSearchResultAttachments:!0,supportsSourceControlAttachments:!0,supportsPromptAttachments:!0,supportsHandOffs:!0},commands:[{name:"delegate",description:"Delegate chat session to cloud agent and create associated PR",when:"config.github.copilot.chat.cloudAgent.enabled"},{name:"compact",description:"%github.copilot.command.cli.compact.description%"}],customAgentTarget:"github-copilot",requiresCustomModels:!0,autoAttachReferences:!0,useRequestToPopulateBuiltInPickers:!0},{type:"copilot-cloud-agent",alternativeIds:["copilot-swe-agent"],name:"cloud",displayName:"Cloud",icon:"$(cloud)",welcomeTitle:"Cloud Agent",welcomeMessage:"Delegate tasks to the cloud",inputPlaceholder:"Delegate tasks to the cloud, type `#` for adding context",order:2,canDelegate:!0,description:"%github.copilot.session.providerDescription.cloud%",when:"config.github.copilot.chat.cloudAgent.enabled",capabilities:{supportsFileAttachments:!0},autoAttachReferences:!0}],debuggers:[{type:"vscode-chat-replay",label:"vscode-chat-replay",languages:["json"],when:"resourceFilename === 'benchRun.chatReplay.json'",configurationAttributes:{launch:{properties:{program:{type:"string",description:"Chat replay file to debug (parse for headers)",default:"${file}"},stopOnEntry:{type:"boolean",default:!0,description:"Break immediately to step through manually."}},required:["program"]}}}],chatAgents:[],chatPromptFiles:[{path:"./assets/prompts/plan.prompt.md"},{path:"./assets/prompts/init.prompt.md"},{path:"./assets/prompts/create-prompt.prompt.md"},{path:"./assets/prompts/create-instructions.prompt.md"},{path:"./assets/prompts/create-skill.prompt.md"},{path:"./assets/prompts/create-agent.prompt.md"},{path:"./assets/prompts/create-hook.prompt.md"}],chatSkills:[{path:"./assets/prompts/skills/project-setup-info-local/SKILL.md",when:"config.github.copilot.chat.projectSetupInfoSkill.enabled && !config.github.copilot.chat.newWorkspace.useContext7"},{path:"./assets/prompts/skills/project-setup-info-context7/SKILL.md",when:"config.github.copilot.chat.projectSetupInfoSkill.enabled && config.github.copilot.chat.newWorkspace.useContext7"},{path:"./assets/prompts/skills/install-vscode-extension/SKILL.md",when:"config.github.copilot.chat.installExtensionSkill.enabled && config.github.copilot.chat.newWorkspaceCreation.enabled"},{path:"./assets/prompts/skills/get-search-view-results/SKILL.md",when:"config.github.copilot.chat.getSearchViewResultsSkill.enabled"},{path:"./assets/prompts/skills/troubleshoot/SKILL.md"},{path:"./assets/prompts/skills/agent-customization/SKILL.md"}],terminal:{profiles:[{icon:"copilot",id:"copilot-cli",title:"GitHub Copilot CLI",titleTemplate:"${sequence}"}]}},prettier:{useTabs:!0,tabWidth:4,singleQuote:!0},scripts:{postinstall:"tsx ./script/postinstall.ts",prepare:"husky","vscode-dts:update":"node script/build/vscodeDtsUpdate.js","vscode-dts:check":"node script/build/vscodeDtsCheck.js","vscode-dts:dev":"node node_modules/@vscode/dts/index.js dev && node script/build/moveProposedDts.js","vscode-dts:main":"node node_modules/@vscode/dts/index.js main && node script/build/moveProposedDts.js",build:"node .esbuild.ts --sourcemaps",compile:"node .esbuild.ts --dev",watch:"npm-run-all -p watch:*","watch:esbuild":"node .esbuild.ts --watch --dev","watch:tsc-extension":"tsc --noEmit --watch --project tsconfig.json","watch:tsc-extension-web":"tsc --noEmit --watch --project tsconfig.worker.json","watch:tsc-simulation-workbench":"tsc --noEmit --watch --project test/simulation/workbench/tsconfig.json",typecheck:"tsc --noEmit --project tsconfig.json && tsc --noEmit --project test/simulation/workbench/tsconfig.json && tsc --noEmit --project tsconfig.worker.json && tsc --noEmit --project src/extension/completions-core/vscode-node/extension/src/copilotPanel/webView/tsconfig.json",lint:"eslint . --max-warnings=0","lint-staged":"eslint --max-warnings=0",tsfmt:"npx tsfmt -r --verify",test:"npm-run-all test:*","test:extension":"vscode-test","test:sanity":"vscode-test --sanity","test:unit":"vitest --run --pool=forks",vitest:"vitest",bench:"vitest bench",get_env:"tsx script/setup/getEnv.mts",get_token:"tsx script/setup/getToken.mts",prettier:"prettier --list-different --write --cache .",simulate:"node dist/simulationMain.js","simulate-require-cache":"node dist/simulationMain.js --require-cache","simulate-ci":"node dist/simulationMain.js --ci --require-cache","simulate-update-baseline":"node dist/simulationMain.js --update-baseline","simulate-gc":"node dist/simulationMain.js --require-cache --gc",setup:"npm run get_env && npm run get_token","setup:dotnet":"run-script-os","setup:dotnet:darwin:linux":"curl -O https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.sh && chmod u+x dotnet-install.sh && ./dotnet-install.sh --channel 10.0 && rm dotnet-install.sh","setup:dotnet:win32":'powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.ps1 -OutFile dotnet-install.ps1; ./dotnet-install.ps1 -channel 10.0; Remove-Item dotnet-install.ps1"',"analyze-edits":"tsx script/analyzeEdits.ts","extract-chat-lib":"tsx script/build/extractChatLib.ts",create_venv:"tsx script/setup/createVenv.mts",package:"vsce package",web:"vscode-test-web --headless --extensionDevelopmentPath=. .","test:prompt":'mocha "src/extension/completions-core/vscode-node/prompt/**/test/**/*.test.{ts,tsx}"',"test:completions-core":"tsx src/extension/completions-core/vscode-node/extension/test/runTest.ts"},devDependencies:{"@azure/identity":"4.9.1","@azure/keyvault-secrets":"^4.10.0","@azure/msal-node":"^3.6.3","@c4312/scip":"^0.1.0","@fluentui/react-components":"^9.66.6","@fluentui/react-icons":"^2.0.305","@hediet/node-reload":"^0.8.0","@keyv/sqlite":"^4.0.5","@octokit/types":"^14.1.0","@parcel/watcher":"^2.5.1","@stylistic/eslint-plugin":"^3.0.1","@types/eslint":"^9.0.0","@types/express":"^5.0.6","@types/google-protobuf":"^3.15.12","@types/js-yaml":"^4.0.9","@types/markdown-it":"^14.0.0","@types/minimist":"^1.2.5","@types/mocha":"^10.0.10","@types/node":"^22.16.3","@types/picomatch":"^4.0.0","@types/react":"17.0.44","@types/react-dom":"^18.2.17","@types/sinon":"^17.0.4","@types/source-map-support":"^0.5.10","@types/tar":"^6.1.13","@types/vinyl":"^2.0.12","@types/vscode":"^1.109.0","@types/vscode-webview":"^1.57.4","@types/yargs":"^17.0.24","@typescript-eslint/eslint-plugin":"^8.35.0","@typescript-eslint/parser":"^8.32.0","@typescript-eslint/typescript-estree":"^8.26.1","@vitest/coverage-v8":"^3.2.4","@vitest/snapshot":"^1.5.0","@vscode/debugadapter":"^1.68.0","@vscode/debugprotocol":"^1.68.0","@vscode/dts":"^0.4.1","@vscode/lsif-language-service":"^0.1.0-pre.4","@vscode/test-cli":"^0.0.11","@vscode/test-electron":"^2.5.2","@vscode/test-web":"^0.0.71","@vscode/vsce":"3.6.0","agent-browser":"^0.16.3",copyfiles:"^2.4.1","csv-parse":"^6.0.0",dotenv:"^17.2.0",electron:"^37.2.1",esbuild:"^0.25.6",eslint:"^9.30.0","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-header":"^3.1.1","eslint-plugin-import":"^2.32.0","eslint-plugin-jsdoc":"^51.3.4","eslint-plugin-no-only-tests":"^3.3.0",fastq:"^1.19.1",glob:"^11.1.0",husky:"^9.1.7","js-yaml":"^4.1.1",keyv:"^5.3.2","lint-staged":"15.2.9",minimist:"^1.2.8",mobx:"^6.13.7","mobx-react-lite":"^4.1.0",mocha:"^11.7.1","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","monaco-editor":"0.44.0","npm-run-all":"^4.1.5",open:"^10.1.2",openai:"^6.7.0",outdent:"^0.8.0",picomatch:"^4.0.4",playwright:"^1.58.2",prettier:"^3.6.2",react:"^17.0.2","react-dom":"17.0.2",rimraf:"^6.0.1","run-script-os":"^1.1.6",shiki:"~1.15.0",sinon:"^21.0.0","source-map-support":"^0.5.21",tar:"^7.5.11","ts-dedent":"^2.2.0",tsx:"^4.20.3",typescript:"^5.8.3","typescript-eslint":"^8.36.0","typescript-formatter":"github:jrieken/typescript-formatter#497efb26bc40b5fa59a350e6eab17bce650a7e4b","vite-plugin-top-level-await":"^1.5.0","vite-plugin-wasm":"^3.5.0",vitest:"^3.0.5","vscode-languageserver-protocol":"^3.17.5","vscode-languageserver-textdocument":"^1.0.12","vscode-languageserver-types":"^3.17.5",yaml:"^2.8.0",yargs:"^17.7.2",zod:"3.25.76"},dependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.81","@anthropic-ai/sdk":"^0.80.0","@github/blackbird-external-ingest-utils":"^0.3.0","@github/copilot":"^1.0.11","@google/genai":"^1.22.0","@humanwhocodes/gitignore-to-minimatch":"1.0.2","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.25.2","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.212.0","@opentelemetry/exporter-logs-otlp-grpc":"^0.212.0","@opentelemetry/exporter-logs-otlp-http":"^0.212.0","@opentelemetry/exporter-metrics-otlp-grpc":"^0.212.0","@opentelemetry/exporter-metrics-otlp-http":"^0.212.0","@opentelemetry/exporter-trace-otlp-grpc":"^0.212.0","@opentelemetry/exporter-trace-otlp-http":"^0.212.0","@opentelemetry/resources":"^2.5.1","@opentelemetry/sdk-logs":"^0.212.0","@opentelemetry/sdk-metrics":"^2.5.1","@opentelemetry/sdk-trace-node":"^2.5.1","@opentelemetry/semantic-conventions":"^1.39.0","@sinclair/typebox":"^0.34.41","@vscode/copilot-api":"^0.2.18","@vscode/extension-telemetry":"^1.5.1","@vscode/l10n":"^0.0.18","@vscode/prompt-tsx":"^0.4.0-alpha.8","@vscode/tree-sitter-wasm":"0.0.5-php.2","@vscode/webview-ui-toolkit":"^1.3.1","@xterm/headless":"^5.5.0",ajv:"^8.18.0",applicationinsights:"^2.9.7","best-effort-json-parser":"^1.2.1",diff:"^8.0.3",dompurify:"^3.3.2",express:"^5.2.1",ignore:"^7.0.5",isbinaryfile:"^5.0.4","jsonc-parser":"^3.3.1","lru-cache":"^11.1.0","markdown-it":"^14.1.1",minimatch:"^10.2.1",undici:"^7.24.1","vscode-tas-client":"^0.1.84","web-tree-sitter":"^0.23.0"},overrides:{"@aminya/node-gyp-build":"npm:node-gyp-build@4.8.1",string_decoder:"npm:string_decoder@1.2.0","node-gyp":"npm:node-gyp@10.3.1",zod:"3.25.76"},vscodeCommit:"e1ab55e1215fa458d1aeabcf8afd1a9478d2c47f"}});var XSe=T(z_=>{"use strict";f();Object.defineProperty(z_,"__esModule",{value:!0});z_.vscodeEngineVersion=z_.isPreRelease=z_.isProduction=z_.packageJson=void 0;z_.packageJson=hjn();z_.isProduction=z_.packageJson.buildType!=="dev";z_.isPreRelease=z_.packageJson.isPreRelease||!z_.isProduction;z_.vscodeEngineVersion=z_.packageJson.engines.vscode});var Ww=T(Y_=>{"use strict";f();Object.defineProperty(Y_,"__esModule",{value:!0});Y_.isScenarioAutomation=Y_.AbstractEnvService=Y_.INativeEnvService=Y_.IEnvService=Y_.NameAndVersion=Y_.OperatingSystem=void 0;var gjn=qr(),Ajn=MUe(),dle=XSe(),mjn;(function(t){t.Windows="Windows",t.Macintosh="Mac",t.Linux="Linux"})(mjn||(Y_.OperatingSystem=mjn={}));var uer=class{static{a(this,"NameAndVersion")}constructor(e,r){this.name=e,this.version=r}format(){return`${this.name}/${this.version}`}};Y_.NameAndVersion=uer;Y_.IEnvService=(0,gjn.createServiceIdentifier)("IEnvService");Y_.INativeEnvService=(0,gjn.createServiceIdentifier)("INativeEnvService");var der=class{static{a(this,"AbstractEnvService")}isProduction(){return dle.isProduction}isPreRelease(){return dle.isPreRelease}isSimulation(){return Ajn.env.SIMULATION==="1"}getBuildType(){return dle.packageJson.buildType}getVersion(){return dle.packageJson.version}getBuild(){return dle.packageJson.build}getName(){return dle.packageJson.name}getEditorVersionHeaders(){return{"Editor-Version":this.getEditorInfo().format(),"Editor-Plugin-Version":this.getEditorPluginInfo().format()}}};Y_.AbstractEnvService=der;Y_.isScenarioAutomation=Ajn.env.IS_SCENARIO_AUTOMATION==="1"});var Ip=T(gz=>{"use strict";f();Object.defineProperty(gz,"__esModule",{value:!0});gz.generateUuid=void 0;gz.isUUID=BPs;gz.prefixedUuid=LPs;var OPs=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function BPs(t){return OPs.test(t)}a(BPs,"isUUID");gz.generateUuid=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let t=new Uint8Array(16),e=[];for(let r=0;r<256;r++)e.push(r.toString(16).padStart(2,"0"));return a(function(){crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=0,o="";return o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+="-",o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o+=e[t[n++]],o},"generateUuid")})();function LPs(t){return`${t}-${(0,gz.generateUuid)()}`}a(LPs,"prefixedUuid")});var yjn=T(nrt=>{"use strict";f();Object.defineProperty(nrt,"__esModule",{value:!0});nrt.CopilotConfigPrefix=void 0;nrt.CopilotConfigPrefix="github.copilot"});var per=T(zw=>{"use strict";f();var FPs=zw&&zw.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UPs=zw&&zw.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QPs=zw&&zw.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o(n&&(r=r.bind(n)),t(a(c=>{let l=e(c);l!==void 0&&r(l)},"wrappedListener"),void 0,o))}a(GPs,"transformEvent")});var Gm=T(Yr=>{"use strict";f();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.apiVersion=Yr.ICompletionsEditorAndPluginInfo=Yr.BuildInfo=Yr.InMemoryConfigProvider=Yr.DefaultsOnlyConfigProvider=Yr.ConfigProvider=Yr.ICompletionsConfigProvider=Yr.BuildType=Yr.BlockMode=Yr.ConfigKey=Yr.packageJson=void 0;Yr.shouldDoServerTrimming=$Ps;Yr.getConfigKeyRecursively=VPs;Yr.getConfigDefaultForKey=_jn;Yr.getOptionalConfigDefaultForKey=Cjn;Yr.getConfig=WPs;Yr.dumpForTelemetry=zPs;Yr.formatNameAndVersion=Aer;Yr.editorVersionHeaders=YPs;var irt=XSe();Object.defineProperty(Yr,"packageJson",{enumerable:!0,get:a(function(){return irt.packageJson},"get")});var Ejn=qr(),HPs=yjn(),jPs=per();Yr.ConfigKey={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",UseSplitContextPrompt:"internal.useSplitContextPrompt"};var ort;(function(t){t.Parsing="parsing",t.Server="server",t.ParsingAndServer="parsingandserver",t.MoreMultiline="moremultiline"})(ort||(Yr.BlockMode=ort={}));function $Ps(t){return[ort.Server,ort.ParsingAndServer].includes(t)}a($Ps,"shouldDoServerTrimming");var Az;(function(t){t.DEV="dev",t.PROD="prod",t.NIGHTLY="nightly"})(Az||(Yr.BuildType=Az={}));Yr.ICompletionsConfigProvider=(0,Ejn.createServiceIdentifier)("ICompletionsConfigProvider");var ZSe=class{static{a(this,"ConfigProvider")}requireReady(){return Promise.resolve()}};Yr.ConfigProvider=ZSe;var her=class extends ZSe{static{a(this,"DefaultsOnlyConfigProvider")}constructor(){super(...arguments),this.onDidChangeCopilotSettings=()=>({dispose:a(()=>{},"dispose")})}getConfig(e){return _jn(e)}getOptionalConfig(e){return Cjn(e)}dumpForTelemetry(){return{}}};Yr.DefaultsOnlyConfigProvider=her;var mer=class extends ZSe{static{a(this,"InMemoryConfigProvider")}constructor(e){super(),this.baseConfigProvider=e,this.copilotEmitter=new jPs.Emitter,this.onDidChangeCopilotSettings=this.copilotEmitter.event,this.overrides=new Map}setOverrides(e){this.overrides=e}clearOverrides(){this.overrides.clear()}getOptionalOverride(e){return this.overrides.get(e)}getConfig(e){return this.getOptionalOverride(e)??this.baseConfigProvider.getConfig(e)}getOptionalConfig(e){return this.getOptionalOverride(e)??this.baseConfigProvider.getOptionalConfig(e)}setConfig(e,r){this.setCopilotSettings({[e]:r})}setCopilotSettings(e){for(let[r,n]of Object.entries(e))n!==void 0?this.overrides.set(r,n):this.overrides.delete(r);this.copilotEmitter.fire(this)}dumpForTelemetry(){let e=this.baseConfigProvider.dumpForTelemetry();for(let r of[Yr.ConfigKey.ShowEditorCompletions,Yr.ConfigKey.EnableAutoCompletions,Yr.ConfigKey.DelayCompletions,Yr.ConfigKey.FilterCompletions]){let n=this.overrides.get(r);n!==void 0&&(e[r]=JSON.stringify(n))}return e}};Yr.InMemoryConfigProvider=mer;function VPs(t,e){let r=t,n=[];for(let o of e.split(".")){let s=[...n,o].join(".");r&&typeof r=="object"&&s in r?(r=r[s],n.length=0):n.push(o)}if(!(r===void 0||n.length>0))return r}a(VPs,"getConfigKeyRecursively");function _jn(t){if(ger.has(t))return ger.get(t);throw new Error(`Missing config default value: ${HPs.CopilotConfigPrefix}.${t}`)}a(_jn,"getConfigDefaultForKey");function Cjn(t){return ger.get(t)}a(Cjn,"getOptionalConfigDefaultForKey");var ger=new Map([[Yr.ConfigKey.DebugOverrideCppHeadersEnableSwitch,!1],[Yr.ConfigKey.RelatedFilesVSCodeCSharp,!1],[Yr.ConfigKey.RelatedFilesVSCodeTypeScript,!1],[Yr.ConfigKey.RelatedFilesVSCode,!1],[Yr.ConfigKey.IncludeNeighboringFiles,!1],[Yr.ConfigKey.ExcludeRelatedFiles,!1],[Yr.ConfigKey.ContextProviders,[]],[Yr.ConfigKey.DebugSnippyOverrideUrl,""],[Yr.ConfigKey.UseSubsetMatching,null],[Yr.ConfigKey.ContextProviderTimeBudget,void 0],[Yr.ConfigKey.DebugOverrideCapiUrl,""],[Yr.ConfigKey.DebugTestOverrideCapiUrl,""],[Yr.ConfigKey.DebugOverrideProxyUrl,""],[Yr.ConfigKey.DebugTestOverrideProxyUrl,""],[Yr.ConfigKey.DebugOverrideEngine,""],[Yr.ConfigKey.AlwaysRequestMultiline,void 0],[Yr.ConfigKey.CompletionsDebounce,void 0],[Yr.ConfigKey.CompletionsDelay,void 0],[Yr.ConfigKey.ModelAlwaysTerminatesSingleline,void 0],[Yr.ConfigKey.UseWorkspaceContextCoordinator,void 0],[Yr.ConfigKey.ShowEditorCompletions,void 0],[Yr.ConfigKey.EnableAutoCompletions,void 0],[Yr.ConfigKey.DelayCompletions,void 0],[Yr.ConfigKey.FilterCompletions,void 0],[Yr.ConfigKey.UseSplitContextPrompt,!0],[Yr.ConfigKey.Enable,{"*":!0,plaintext:!1,markdown:!1,scminput:!1}],[Yr.ConfigKey.UserSelectedCompletionModel,""],[Yr.ConfigKey.DebugOverrideEngineLegacy,""],[Yr.ConfigKey.DebugOverrideProxyUrlLegacy,""],[Yr.ConfigKey.DebugTestOverrideProxyUrlLegacy,""],[Yr.ConfigKey.DebugOverrideCapiUrlLegacy,""],[Yr.ConfigKey.DebugTestOverrideCapiUrlLegacy,""],[Yr.ConfigKey.DebugFilterLogCategories,[]]]);function WPs(t,e){return t.get(Yr.ICompletionsConfigProvider).getConfig(e)}a(WPs,"getConfig");function zPs(t){try{return t.get(Yr.ICompletionsConfigProvider).dumpForTelemetry()}catch(e){return console.error(`Error dumping config for telemetry: ${e}`),{}}}a(zPs,"dumpForTelemetry");var srt=class t{static{a(this,"BuildInfo")}static isPreRelease(){return this.getBuildType()===Az.NIGHTLY}static isProduction(){return this.getBuildType()!==Az.DEV}static getBuildType(){return irt.packageJson.buildType==="prod"?t.getVersion().length===15?Az.NIGHTLY:Az.PROD:Az.DEV}static getVersion(){return irt.packageJson.version}static getBuild(){return irt.packageJson.build}};Yr.BuildInfo=srt;function Aer({name:t,version:e}){return`${t}/${e}`}a(Aer,"formatNameAndVersion");Yr.ICompletionsEditorAndPluginInfo=(0,Ejn.createServiceIdentifier)("ICompletionsEditorAndPluginInfo");Yr.apiVersion="2025-05-01";function YPs(t){let e=t.get(Yr.ICompletionsEditorAndPluginInfo);return{"Editor-Version":Aer(e.getEditorInfo()),"Editor-Plugin-Version":Aer(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":srt.getVersion()}}a(YPs,"editorVersionHeaders")});var yer=T(art=>{"use strict";f();Object.defineProperty(art,"__esModule",{value:!0});art.ExpServiceTelemetryNames=void 0;var vjn;(function(t){t.featuresTelemetryPropertyName="VSCode.ABExp.Features"})(vjn||(art.ExpServiceTelemetryNames=vjn={}))});var crt=T(fle=>{"use strict";f();Object.defineProperty(fle,"__esModule",{value:!0});fle.ExpConfig=fle.ExpTreatmentVariables=void 0;var KPs=xp(),JPs=yer(),bjn;(function(t){t.CustomEngine="copilotcustomengine",t.CustomEngineTargetEngine="copilotcustomenginetargetengine",t.OverrideBlockMode="copilotoverrideblockmode",t.SuffixPercent="CopilotSuffixPercent",t.CppHeadersEnableSwitch="copilotcppheadersenableswitch",t.UseSubsetMatching="copilotsubsetmatching",t.SuffixMatchThreshold="copilotsuffixmatchthreshold",t.MaxPromptCompletionTokens="maxpromptcompletionTokens",t.StableContextPercent="copilotstablecontextpercent",t.VolatileContextPercent="copilotvolatilecontextpercent",t.RelatedFilesVSCodeCSharp="copilotrelatedfilesvscodecsharp",t.RelatedFilesVSCodeTypeScript="copilotrelatedfilesvscodetypescript",t.RelatedFilesVSCode="copilotrelatedfilesvscode",t.ContextProviders="copilotcontextproviders",t.IncludeNeighboringFiles="copilotincludeneighboringfiles",t.ExcludeRelatedFiles="copilotexcluderelatedfiles",t.ContextProviderTimeBudget="copilotcontextprovidertimebudget",t.CppContextProviderParams="copilotcppContextProviderParams",t.CSharpContextProviderParams="copilotcsharpcontextproviderparams",t.JavaContextProviderParams="copilotjavacontextproviderparams",t.MultiLanguageContextProviderParams="copilotmultilanguagecontextproviderparams",t.TsContextProviderParams="copilottscontextproviderparams",t.CompletionsDebounce="copilotcompletionsdebounce",t.ElectronFetcher="copilotelectronfetcher",t.FetchFetcher="copilotfetchfetcher",t.AsyncCompletionsTimeout="copilotasynccompletionstimeout",t.EnablePromptContextProxyField="copilotenablepromptcontextproxyfield",t.ProgressiveReveal="copilotprogressivereveal",t.ModelAlwaysTerminatesSingleline="copilotmodelterminatesingleline",t.ProgressiveRevealLongLookaheadSize="copilotprogressivereveallonglookaheadsize",t.ProgressiveRevealShortLookaheadSize="copilotprogressiverevealshortlookaheadsize",t.MaxMultilineTokens="copilotmaxmultilinetokens",t.MultilineAfterAcceptLines="copilotmultilineafteracceptlines",t.CompletionsDelay="copilotcompletionsdelay",t.SingleLineUnlessAccepted="copilotsinglelineunlessaccepted"})(bjn||(fle.ExpTreatmentVariables=bjn={}));var Eer=class t{static{a(this,"ExpConfig")}constructor(e,r){this.variables=e,this.features=r}static createFallbackConfig(e,r){return(0,KPs.telemetryExpProblem)(e,{reason:r}),this.createEmptyConfig()}static createEmptyConfig(){return new t({},"")}addToTelemetry(e){e.properties[JPs.ExpServiceTelemetryNames.featuresTelemetryPropertyName]=this.features}};fle.ExpConfig=Eer});var Hm=T(lrt=>{"use strict";f();Object.defineProperty(lrt,"__esModule",{value:!0});lrt.ICompletionsFeaturesService=void 0;var XPs=qr();lrt.ICompletionsFeaturesService=(0,XPs.createServiceIdentifier)("ICompletionsFeaturesService")});var urt=T(U7=>{"use strict";f();Object.defineProperty(U7,"__esModule",{value:!0});U7.FilterSettings=U7.Release=U7.Filter=void 0;var yz;(function(t){t.ExtensionRelease="X-VSCode-ExtensionRelease",t.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",t.CopilotEngine="X-Copilot-Engine",t.CopilotOverrideEngine="X-Copilot-OverrideEngine",t.CopilotRepository="X-Copilot-Repository",t.CopilotFileType="X-Copilot-FileType",t.CopilotUserKind="X-Copilot-UserKind",t.CopilotDogfood="X-Copilot-Dogfood",t.CopilotCustomModel="X-Copilot-CustomModel",t.CopilotOrgs="X-Copilot-Orgs",t.CopilotCustomModelNames="X-Copilot-CustomModelNames",t.CopilotTrackingId="X-Copilot-CopilotTrackingId",t.CopilotClientVersion="X-Copilot-ClientVersion",t.CopilotRelatedPluginVersionCppTools="X-Copilot-RelatedPluginVersion-msvscodecpptools",t.CopilotRelatedPluginVersionCMakeTools="X-Copilot-RelatedPluginVersion-msvscodecmaketools",t.CopilotRelatedPluginVersionMakefileTools="X-Copilot-RelatedPluginVersion-msvscodemakefiletools",t.CopilotRelatedPluginVersionCSharpDevKit="X-Copilot-RelatedPluginVersion-msdotnettoolscsdevkit",t.CopilotRelatedPluginVersionPython="X-Copilot-RelatedPluginVersion-mspythonpython",t.CopilotRelatedPluginVersionPylance="X-Copilot-RelatedPluginVersion-mspythonvscodepylance",t.CopilotRelatedPluginVersionJavaPack="X-Copilot-RelatedPluginVersion-vscjavavscodejavapack",t.CopilotRelatedPluginVersionJavaManager="X-Copilot-RelatedPluginVersion-vscjavavscodejavadependency",t.CopilotRelatedPluginVersionTypescript="X-Copilot-RelatedPluginVersion-vscodetypescriptlanguagefeatures",t.CopilotRelatedPluginVersionTypescriptNext="X-Copilot-RelatedPluginVersion-msvscodevscodetypescriptnext",t.CopilotRelatedPluginVersionCSharp="X-Copilot-RelatedPluginVersion-msdotnettoolscsharp",t.CopilotRelatedPluginVersionGithubCopilotChat="X-Copilot-RelatedPluginVersion-githubcopilotchat",t.CopilotRelatedPluginVersionGithubCopilot="X-Copilot-RelatedPluginVersion-githubcopilot"})(yz||(U7.Filter=yz={}));var Tjn;(function(t){t.Stable="stable",t.Nightly="nightly"})(Tjn||(U7.Release=Tjn={}));var ZPs={[yz.CopilotClientTimeBucket]:"timeBucket",[yz.CopilotOverrideEngine]:"engine",[yz.CopilotRepository]:"repo",[yz.CopilotFileType]:"fileType",[yz.CopilotUserKind]:"userKind"},_er=class{static{a(this,"FilterSettings")}constructor(e){this.filters=e;for(let[r,n]of Object.entries(this.filters))n===""&&delete this.filters[r]}addToTelemetry(e){for(let[r,n]of Object.entries(this.filters)){let o=ZPs[r];o!==void 0&&(e.properties[o]=n)}}toHeaders(){return{...this.filters}}};U7.FilterSettings=_er});var zO=T(wp=>{"use strict";f();Object.defineProperty(wp,"__esModule",{value:!0});wp.vString=tks;wp.vNumber=nks;wp.vBoolean=oks;wp.vObjAny=aks;wp.vUndefined=lks;wp.vNull=uks;wp.vNullable=dks;wp.vUnchecked=Ijn;wp.vUnknown=fks;wp.vRequired=pks;wp.vObj=hks;wp.vArray=mks;wp.vTuple=gks;wp.vUnion=xjn;wp.vEnum=Aks;wp.vLiteral=yks;wp.vLazy=Eks;var Ez=class{static{a(this,"TypeofValidator")}constructor(e){this.type=e}validate(e){return typeof e!==this.type?{content:void 0,error:{message:`Expected ${this.type}, but got ${typeof e}`}}:{content:e,error:void 0}}toSchema(){return{type:this.type}}},eks=new Ez("string");function tks(){return eks}a(tks,"vString");var rks=new Ez("number");function nks(){return rks}a(nks,"vNumber");var iks=new Ez("boolean");function oks(){return iks}a(oks,"vBoolean");var sks=new Ez("object");function aks(){return sks}a(aks,"vObjAny");var cks=new Ez("undefined");function lks(){return cks}a(lks,"vUndefined");var Cer=class{static{a(this,"NullValidator")}validate(e){return e!==null?{content:void 0,error:{message:`Expected null, but got ${typeof e}`}}:{content:null,error:void 0}}toSchema(){return{type:"null"}}},Sjn=new Cer;function uks(){return Sjn}a(uks,"vNull");function dks(t){return xjn(t,Sjn)}a(dks,"vNullable");function Ijn(){return{validate(t){return{content:t,error:void 0}},toSchema(){return{}}}}a(Ijn,"vUnchecked");function fks(){return Ijn()}a(fks,"vUnknown");function pks(t){return{validate(e){return e===void 0?{content:void 0,error:{message:"Required field is missing"}}:t.validate(e)},toSchema(){return t.toSchema()},isRequired(){return!0}}}a(pks,"vRequired");function hks(t){return{validate(e){if(typeof e!="object"||e===null)return{content:void 0,error:{message:"Expected object"}};let r={};for(let n in t){let o=t[n],s=e[n],c=o.isRequired?.()??!1;if(c&&s===void 0)return{content:void 0,error:{message:`Required field '${n}' is missing`}};if(!c&&s===void 0)continue;let{content:l,error:u}=o.validate(s);if(u)return{content:void 0,error:{message:`Error in property '${n}': ${u.message}`}};r[n]=l}return{content:r,error:void 0}},toSchema(){let e=[],r={};for(let[o,s]of Object.entries(t))r[o]=s.toSchema(),s.isRequired?.()&&e.push(o);return{type:"object",properties:r,...e.length>0?{required:e}:{}}}}}a(hks,"vObj");function mks(t){return{validate(e){if(!Array.isArray(e))return{content:void 0,error:{message:"Expected array"}};let r=[];for(let n=0;ne.toSchema())}}}}a(gks,"vTuple");function xjn(...t){return{validate(e){let r;for(let n of t){let{content:o,error:s}=n.validate(e);if(!s)return{content:o,error:void 0};r=s}return{content:void 0,error:r}},toSchema(){return{oneOf:t.map(e=>e.toSchema())}}}}a(xjn,"vUnion");function Aks(...t){return{validate(e){return t.indexOf(e)===-1?{content:void 0,error:{message:`Expected one of: ${t.join(", ")}`}}:{content:e,error:void 0}},toSchema(){return{enum:t}}}}a(Aks,"vEnum");function yks(t){return{validate(e){return e!==t?{content:void 0,error:{message:`Expected: ${t}`}}:{content:e,error:void 0}},toSchema(){return{const:t}}}}a(yks,"vLiteral");function Eks(t){return{validate(e){return t().validate(e)},toSchema(){return t().toSchema()}}}a(Eks,"vLazy")});var ver=T(eIe=>{"use strict";f();Object.defineProperty(eIe,"__esModule",{value:!0});eIe.ImportChanges=void 0;var _ks=zO(),drt;(function(t){t.All="all",t.None="none"})(drt||(eIe.ImportChanges=drt={}));(function(t){t.VALIDATOR=(0,_ks.vEnum)(t.All,t.None)})(drt||(eIe.ImportChanges=drt={}))});var Pjn=T(ple=>{"use strict";f();Object.defineProperty(ple,"__esModule",{value:!0});ple.JointCompletionsProviderTriggerChangeStrategy=ple.JointCompletionsProviderStrategy=void 0;var wjn;(function(t){t.Regular="regular",t.CursorEndOfLine="cursorEndOfLine"})(wjn||(ple.JointCompletionsProviderStrategy=wjn={}));var Rjn;(function(t){t.NoTriggerOnRequestInFlight="noTriggerOnRequestInFlight",t.NoTriggerOnCompletionsRequestInFlight="noTriggerOnCompletionsRequestInFlight",t.AlwaysTrigger="alwaysTrigger"})(Rjn||(ple.JointCompletionsProviderTriggerChangeStrategy=Rjn={}))});var prt=T(_z=>{"use strict";f();Object.defineProperty(_z,"__esModule",{value:!0});_z.NextCursorLinePredictionCursorPlacement=_z.NextCursorLinePrediction=void 0;var Cks=zO(),kjn;(function(t){t.Jump="jump",t.OnlyWithEdit="onlyWithEdit"})(kjn||(_z.NextCursorLinePrediction=kjn={}));var frt;(function(t){t.BeforeLine="beforeLine",t.AfterLine="afterLine"})(frt||(_z.NextCursorLinePredictionCursorPlacement=frt={}));(function(t){t.VALIDATOR=(0,Cks.vEnum)(t.BeforeLine,t.AfterLine)})(frt||(_z.NextCursorLinePredictionCursorPlacement=frt={}))});var Djn=T(tIe=>{"use strict";f();Object.defineProperty(tIe,"__esModule",{value:!0});tIe.DocumentSwitchTriggerStrategy=void 0;var vks=zO(),hrt;(function(t){t.Always="always",t.AfterAcceptance="afterAcceptance"})(hrt||(tIe.DocumentSwitchTriggerStrategy=hrt={}));(function(t){t.VALIDATOR=(0,vks.vEnum)(t.Always,t.AfterAcceptance)})(hrt||(tIe.DocumentSwitchTriggerStrategy=hrt={}))});var ber=T(rIe=>{"use strict";f();Object.defineProperty(rIe,"__esModule",{value:!0});rIe.DiffHistoryMergeStrategy=void 0;var bks=zO(),mrt;(function(t){t.SameStartLine="sameStartLine",t.Proximity="proximity",t.Hybrid="hybrid"})(mrt||(rIe.DiffHistoryMergeStrategy=mrt={}));(function(t){t.VALIDATOR=(0,bks.vEnum)(t.SameStartLine,t.Proximity,t.Hybrid)})(mrt||(rIe.DiffHistoryMergeStrategy=mrt={}))});var ky=T(Mn=>{"use strict";f();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.SpeculativeRequestsAutoExpandEditWindowLines=Mn.SpeculativeRequestsCursorPlacement=Mn.SpeculativeRequestsEnablement=Mn.USER_HAPPINESS_SCORE_CONFIGURATION_VALIDATOR=Mn.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION=Mn.MODEL_CONFIGURATION_VALIDATOR=Mn.LINT_OPTIONS_VALIDATOR=Mn.LANGUAGE_CONTEXT_ENABLED_LANGUAGES=Mn.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS=Mn.DEFAULT_OPTIONS=Mn.ResponseFormat=Mn.PromptingStrategy=Mn.EditIntent=Mn.AggressivenessLevel=Mn.AggressivenessSetting=Mn.LintOptionShowCode=Mn.LintOptionWarning=Mn.CurrentFileOptions=Mn.RecentlyViewedDocumentsOptions=Mn.RecentFileClippingStrategy=Mn.IncludeLineNumbersOption=void 0;Mn.isPromptingStrategy=Tks;Mn.isAggressivenessStrategy=Sks;Mn.parseLintOptionString=Iks;Mn.parseUserHappinessScoreConfigurationString=xks;var Mjn=Hl(),En=zO(),dD;(function(t){t.WithSpaceAfter="withSpaceAfter",t.WithoutSpace="withoutSpaceAfter",t.None="none"})(dD||(Mn.IncludeLineNumbersOption=dD={}));var Q7;(function(t){t.TopToBottom="topToBottom",t.AroundEditRange="aroundEditRange",t.Proportional="proportional"})(Q7||(Mn.RecentFileClippingStrategy=Q7={}));(function(t){t.VALIDATOR=(0,En.vEnum)(t.TopToBottom,t.AroundEditRange,t.Proportional)})(Q7||(Mn.RecentFileClippingStrategy=Q7={}));var Ter;(function(t){t.VALIDATOR=(0,En.vObj)({nDocuments:(0,En.vNumber)(),maxTokens:(0,En.vNumber)(),includeViewedFiles:(0,En.vBoolean)(),includeLineNumbers:(0,En.vEnum)(dD.WithSpaceAfter,dD.WithoutSpace,dD.None),clippingStrategy:(0,En.vEnum)(Q7.TopToBottom,Q7.AroundEditRange,Q7.Proportional)})})(Ter||(Mn.RecentlyViewedDocumentsOptions=Ter={}));var Ser;(function(t){t.VALIDATOR=(0,En.vObj)({maxTokens:(0,En.vNumber)(),includeTags:(0,En.vBoolean)(),includeLineNumbers:(0,En.vEnum)(dD.WithSpaceAfter,dD.WithoutSpace,dD.None),includeCursorTag:(0,En.vBoolean)(),prioritizeAboveCursor:(0,En.vBoolean)()})})(Ser||(Mn.CurrentFileOptions=Ser={}));var hle;(function(t){t.YES="yes",t.NO="no",t.YES_IF_NO_ERRORS="yesIfNoErrors"})(hle||(Mn.LintOptionWarning=hle={}));var mle;(function(t){t.YES="yes",t.NO="no",t.YES_WITH_SURROUNDING="yesWithSurroundingLines"})(mle||(Mn.LintOptionShowCode=mle={}));var grt;(function(t){t.Default="auto",t.Low="low",t.Medium="medium",t.High="high"})(grt||(Mn.AggressivenessSetting=grt={}));var q7;(function(t){t.Low="low",t.Medium="medium",t.High="high"})(q7||(Mn.AggressivenessLevel=q7={}));(function(t){t.VALIDATOR=(0,En.vEnum)(t.Default,t.Low,t.Medium,t.High);function e(r){switch(r){case t.Low:return q7.Low;case t.Medium:return q7.Medium;case t.High:return q7.High;case t.Default:return}}a(e,"toLevel"),t.toLevel=e})(grt||(Mn.AggressivenessSetting=grt={}));var Art;(function(t){t.NoEdit="no_edit",t.Low="low",t.Medium="medium",t.High="high"})(Art||(Mn.EditIntent=Art={}));(function(t){function e(o){switch(o){case"no_edit":return t.NoEdit;case"low":return t.Low;case"medium":return t.Medium;case"high":return t.High;default:return t.High}}a(e,"fromString"),t.fromString=e;function r(o){switch(o){case"N":return t.NoEdit;case"L":return t.Low;case"M":return t.Medium;case"H":return t.High;default:return}}a(r,"fromShortName"),t.fromShortName=r;function n(o,s){switch(o){case t.NoEdit:return!1;case t.High:return!0;case t.Medium:return s===q7.Medium||s===q7.High;case t.Low:return s===q7.High;default:(0,Mjn.assertNever)(o)}}a(n,"shouldShowEdit"),t.shouldShowEdit=n})(Art||(Mn.EditIntent=Art={}));var wf;(function(t){t.CopilotNesXtab="copilotNesXtab",t.UnifiedModel="xtabUnifiedModel",t.Codexv21NesUnified="codexv21nesUnified",t.Nes41Miniv3="nes41miniv3",t.SimplifiedSystemPrompt="simplifiedSystemPrompt",t.Xtab275="xtab275",t.XtabAggressiveness="xtabAggressiveness",t.Xtab275Aggressiveness="xtab275Aggressiveness",t.PatchBased="patchBased",t.PatchBased01="patchBased01",t.PatchBased02="patchBased02",t.Xtab275EditIntent="xtab275EditIntent",t.Xtab275EditIntentShort="xtab275EditIntentShort"})(wf||(Mn.PromptingStrategy=wf={}));function Tks(t){return Object.values(wf).includes(t)}a(Tks,"isPromptingStrategy");function Sks(t){return t===wf.XtabAggressiveness||t===wf.Xtab275Aggressiveness||t===wf.Xtab275EditIntent||t===wf.Xtab275EditIntentShort}a(Sks,"isAggressivenessStrategy");var yrt;(function(t){t.CodeBlock="codeBlock",t.UnifiedWithXml="unifiedWithXml",t.EditWindowOnly="editWindowOnly",t.CustomDiffPatch="customDiffPatch",t.EditWindowWithEditIntent="editWindowWithEditIntent",t.EditWindowWithEditIntentShort="editWindowWithEditIntentShort"})(yrt||(Mn.ResponseFormat=yrt={}));(function(t){function e(r){switch(r){case wf.UnifiedModel:case wf.Codexv21NesUnified:case wf.Nes41Miniv3:return t.UnifiedWithXml;case wf.Xtab275:case wf.XtabAggressiveness:case wf.Xtab275Aggressiveness:return t.EditWindowOnly;case wf.PatchBased:case wf.PatchBased01:case wf.PatchBased02:return t.CustomDiffPatch;case wf.Xtab275EditIntent:return t.EditWindowWithEditIntent;case wf.Xtab275EditIntentShort:return t.EditWindowWithEditIntentShort;case wf.SimplifiedSystemPrompt:case wf.CopilotNesXtab:case void 0:return t.CodeBlock;default:(0,Mjn.assertNever)(r)}}a(e,"fromPromptingStrategy"),t.fromPromptingStrategy=e})(yrt||(Mn.ResponseFormat=yrt={}));Mn.DEFAULT_OPTIONS={promptingStrategy:void 0,currentFile:{maxTokens:2e3,includeTags:!0,includeLineNumbers:dD.None,includeCursorTag:!1,prioritizeAboveCursor:!1},pagedClipping:{pageSize:10},recentlyViewedDocuments:{nDocuments:5,maxTokens:2e3,includeViewedFiles:!1,includeLineNumbers:dD.None,clippingStrategy:Q7.TopToBottom},languageContext:{enabled:!1,maxTokens:2e3,traitPosition:"after"},diffHistory:{nEntries:25,maxTokens:1e3,onlyForDocsInPrompt:!1,useRelativePaths:!1},lintOptions:void 0,includePostScript:!0};Mn.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS={maxLineDistance:1e3,maxLints:5,showCode:mle.YES_WITH_SURROUNDING,tagName:"linter",warnings:hle.YES_IF_NO_ERRORS,nRecentFiles:0};Mn.LANGUAGE_CONTEXT_ENABLED_LANGUAGES={prompt:!0,instructions:!0,chatagent:!0};Mn.LINT_OPTIONS_VALIDATOR=(0,En.vObj)({tagName:(0,En.vString)(),warnings:(0,En.vEnum)(hle.YES,hle.NO,hle.YES_IF_NO_ERRORS),showCode:(0,En.vEnum)(mle.NO,mle.YES,mle.YES_WITH_SURROUNDING),maxLints:(0,En.vNumber)(),maxLineDistance:(0,En.vNumber)(),nRecentFiles:(0,En.vNumber)()});Mn.MODEL_CONFIGURATION_VALIDATOR=(0,En.vObj)({modelName:(0,En.vRequired)((0,En.vString)()),promptingStrategy:(0,En.vUnion)((0,En.vEnum)(...Object.values(wf)),(0,En.vUndefined)()),includeTagsInCurrentFile:(0,En.vRequired)((0,En.vBoolean)()),includePostScript:(0,En.vUnion)((0,En.vBoolean)(),(0,En.vUndefined)()),currentFile:(0,En.vUnion)(Ser.VALIDATOR,(0,En.vUndefined)()),recentlyViewedDocuments:(0,En.vUnion)(Ter.VALIDATOR,(0,En.vUndefined)()),lintOptions:(0,En.vUnion)(Mn.LINT_OPTIONS_VALIDATOR,(0,En.vUndefined)()),supportsNextCursorLinePrediction:(0,En.vUnion)((0,En.vBoolean)(),(0,En.vUndefined)())});function Iks(t,e){try{let r=JSON.parse(t),n=Mn.LINT_OPTIONS_VALIDATOR.validate(r);if(n.error)throw new Error(`Lint options validation failed: ${n.error.message}`);return{...e,...n.content}}catch(r){throw new Error(`Failed to parse lint options string: ${r}`)}}a(Iks,"parseLintOptionString");Mn.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION={acceptedScore:1,rejectedScore:0,ignoredScore:.5,highThreshold:.7,mediumThreshold:.4,includeIgnored:!1,ignoredLimit:0,limitConsecutiveIgnored:!1,limitTotalIgnored:!0};var Njn=(0,En.vObj)({acceptedScore:(0,En.vRequired)((0,En.vNumber)()),rejectedScore:(0,En.vRequired)((0,En.vNumber)()),ignoredScore:(0,En.vRequired)((0,En.vNumber)()),highThreshold:(0,En.vRequired)((0,En.vNumber)()),mediumThreshold:(0,En.vRequired)((0,En.vNumber)()),includeIgnored:(0,En.vRequired)((0,En.vBoolean)()),ignoredLimit:(0,En.vRequired)((0,En.vNumber)()),limitConsecutiveIgnored:(0,En.vRequired)((0,En.vBoolean)()),limitTotalIgnored:(0,En.vRequired)((0,En.vBoolean)())});function nIe(t,e,r){return t>=e&&t<=r}a(nIe,"isInRange");Mn.USER_HAPPINESS_SCORE_CONFIGURATION_VALIDATOR={validate(t){let e=Njn.validate(t);if(e.error)return e;let r=e.content;return nIe(r.acceptedScore,0,1)?nIe(r.rejectedScore,0,1)?nIe(r.ignoredScore,0,1)?nIe(r.highThreshold,0,1)?nIe(r.mediumThreshold,0,1)?r.acceptedScore<=r.rejectedScore?{content:void 0,error:{message:"acceptedScore must be greater than rejectedScore to prevent division by zero"}}:r.ignoredScore{"use strict";f();Object.defineProperty(gle,"__esModule",{value:!0});gle.TextReplacement=gle.TextEdit=void 0;var Ojn=Lc(),Bjn=Hl(),Trt=Ko(),vrt=m0(),G7=qE(),k0=ff(),Srt=sae(),Ljn=xv(),Irt=class t{static{a(this,"TextEdit")}static fromStringEdit(e,r){let n=e.replacements.map(o=>Dy.fromStringReplacement(o,r));return new t(n)}static replace(e,r){return new t([new Dy(e,r)])}static delete(e){return new t([new Dy(e,"")])}static insert(e,r){return new t([new Dy(k0.Range.fromPositions(e,e),r)])}static fromParallelReplacementsUnsorted(e){let r=e.slice().sort((0,Ojn.compareBy)(n=>n.range,k0.Range.compareRangesUsingStarts));return new t(r)}constructor(e){this.replacements=e,(0,Bjn.assertFn)(()=>(0,Bjn.checkAdjacentItems)(e,(r,n)=>r.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}normalize(){let e=[];for(let r of this.replacements)if(e.length>0&&e[e.length-1].range.getEndPosition().equals(r.range.getStartPosition())){let n=e[e.length-1];e[e.length-1]=new Dy(n.range.plusRange(r.range),n.text+r.text)}else r.isEmpty||e.push(r);return new t(e)}mapPosition(e){let r=0,n=0,o=0;for(let s of this.replacements){let c=s.range.getStartPosition();if(e.isBeforeOrEqual(c))break;let l=s.range.getEndPosition(),u=Srt.TextLength.ofText(s.text);if(e.isBefore(l)){let d=new G7.Position(c.lineNumber+r,c.column+(c.lineNumber+r===n?o:0)),p=u.addToPosition(d);return brt(d,p)}c.lineNumber+r!==n&&(o=0),r+=u.lineCount-(s.range.endLineNumber-s.range.startLineNumber),u.lineCount===0?l.lineNumber!==c.lineNumber?o+=u.columnCount-(l.column-1):o+=u.columnCount-(l.column-c.column):o=u.columnCount,n=l.lineNumber+r}return new G7.Position(e.lineNumber+r,e.column+(e.lineNumber+r===n?o:0))}mapRange(e){function r(c){return c instanceof G7.Position?c:c.getStartPosition()}a(r,"getStart");function n(c){return c instanceof G7.Position?c:c.getEndPosition()}a(n,"getEnd");let o=r(this.mapPosition(e.getStartPosition())),s=n(this.mapPosition(e.getEndPosition()));return brt(o,s)}inverseMapPosition(e,r){return this.inverse(r).mapPosition(e)}inverseMapRange(e,r){return this.inverse(r).mapRange(e)}apply(e){let r="",n=new G7.Position(1,1);for(let s of this.replacements){let c=s.range,l=c.getStartPosition(),u=c.getEndPosition(),d=brt(n,l);d.isEmpty()||(r+=e.getValueOfRange(d)),r+=s.text,n=u}let o=brt(n,e.endPositionExclusive);return o.isEmpty()||(r+=e.getValueOfRange(o)),r}applyToString(e){let r=new Ljn.StringText(e);return this.apply(r)}inverse(e){let r=this.getNewRanges();return new t(this.replacements.map((n,o)=>new Dy(r[o],e.getValueOfRange(n.range))))}getNewRanges(){let e=[],r=0,n=0,o=0;for(let s of this.replacements){let c=Srt.TextLength.ofText(s.text),l=G7.Position.lift({lineNumber:s.range.startLineNumber+n,column:s.range.startColumn+(s.range.startLineNumber===r?o:0)}),u=c.createRange(l);e.push(u),n=u.endLineNumber-s.range.endLineNumber,o=u.endColumn-s.range.endColumn,r=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Trt.BugIndicatingError;if(this.replacements.length===1)return this.replacements[0];let r=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition(),o="";for(let s=0;sr.equals(n))}compose(e){let r=this.normalize(),n=e.normalize();if(r.replacements.length===0)return n;if(n.replacements.length===0)return r;let o=[],s=0,c=1,l=1,u=0,d=0,p=0,h=0,m=null,g=0,A=0,y=!1,E=!1,_=1,v=1;function b(){if(!y)if(sr.toString()).join(` +`):typeof e=="string"?this.toString(new Ljn.StringText(e)):this.replacements.length===0?"":this.replacements.map(r=>{let o=e.getValueOfRange(r.range),s=k0.Range.fromPositions(new G7.Position(Math.max(1,r.range.startLineNumber-1),1),r.range.getStartPosition()),c=e.getValueOfRange(s);c.length>10&&(c="..."+c.substring(c.length-10));let l=k0.Range.fromPositions(r.range.getEndPosition(),new G7.Position(r.range.endLineNumber+1,1)),u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let d=o;if(d.length>10){let h=Math.floor(5);d=d.substring(0,h)+"..."+d.substring(d.length-h)}let p=r.text;if(p.length>10){let h=Math.floor(5);p=p.substring(0,h)+"..."+p.substring(p.length-h)}return d.length===0?`${c}\u2770${p}\u2771${u}`:`${c}\u2770${d}\u21A6${p}\u2771${u}`}).join(` +`)}};gle.TextEdit=Irt;var Dy=class t{static{a(this,"TextReplacement")}static joinReplacements(e,r){if(e.length===0)throw new Trt.BugIndicatingError;if(e.length===1)return e[0];let n=e[0].range.getStartPosition(),o=e[e.length-1].range.getEndPosition(),s="";for(let c=0;c ${r.lineNumber},${r.column}): "${this.text}"`}};rue.TextReplacement=qy;function mnt(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return B0.Range.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new gnt.BugIndicatingError("start must be before end");return new B0.Range(t.lineNumber,t.column,e.lineNumber,e.column)}a(mnt,"rangeFromPositions")});var mY=T(gU=>{"use strict";f();Object.defineProperty(gU,"__esModule",{value:!0});gU.SerializedLineReplacement=gU.LineReplacement=gU.LineEdit=void 0;var ser=jc(),UHn=Jl(),x2s=C0(),cxe=$N(),qHn=aA(),nue=ZE(),iue=Ef(),oue=axe(),Ent=class t{static{a(this,"LineEdit")}static{this.empty=new t([])}static deserialize(e){return new t(e.map(r=>hY.deserialize(r)))}static fromStringEdit(e,r){let n=oue.TextEdit.fromStringEdit(e,r);return t.fromTextEdit(n,r)}static fromTextEdit(e,r){let n=e.replacements,o=[],s=[];for(let c=0;cn.lineRange.startLineNumber,ser.numberComparator)),new t(r)}constructor(e){this.replacements=e,(0,UHn.assert)((0,UHn.checkAdjacentItems)(e,(r,n)=>r.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}isEmpty(){return this.replacements.length===0}toEdit(e){let r=[];for(let n of this.replacements){let o=n.toSingleEdit(e);r.push(o)}return new qHn.StringEdit(r)}toString(){return this.replacements.map(e=>e.toString()).join(",")}serialize(){return this.replacements.map(e=>e.serialize())}getNewLineRanges(){let e=[],r=0;for(let n of this.replacements)e.push(cxe.LineRange.ofLength(n.lineRange.startLineNumber+r,n.newLines.length)),r+=n.newLines.length-n.lineRange.length;return e}mapLineNumber(e){let r=0;for(let n of this.replacements){if(n.lineRange.endLineNumberExclusive>e)break;r+=n.newLines.length-n.lineRange.length}return e+r}mapLineRange(e){return new cxe.LineRange(this.mapLineNumber(e.startLineNumber),this.mapLineNumber(e.endLineNumberExclusive))}mapBackLineRange(e,r){return this.inverse(r).mapLineRange(e)}touches(e){return this.replacements.some(r=>e.replacements.some(n=>r.lineRange.intersect(n.lineRange)))}rebase(e){return new t(this.replacements.map(r=>new hY(e.mapLineRange(r.lineRange),r.newLines)))}humanReadablePatch(e){let r=[];function n(l,u,d,p){let h=d==="unmodified"?" ":d==="deleted"?"-":"+";p===void 0&&(p="[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]");let m=l===-1?" ":l.toString().padStart(3," "),g=u===-1?" ":u.toString().padStart(3," ");r.push(`${h} ${m} ${g} ${p}`)}a(n,"pushLine");function o(){r.push("---")}a(o,"pushSeperator");let s=0,c=!0;for(let l of(0,ser.groupAdjacentBy)(this.replacements,(u,d)=>u.lineRange.distanceToRange(d.lineRange)<=5)){c?c=!1:o();let u=l[0].lineRange.startLineNumber-2;for(let d of l){for(let m=Math.max(1,u);mg)){let g=e[m-1];n(m,-1,"deleted",g)}for(let m=0;mnew hY(r[o],e.slice(n.lineRange.startLineNumber-1,n.lineRange.endLineNumberExclusive-1))))}};gU.LineEdit=Ent;var hY=class t{static{a(this,"LineReplacement")}static deserialize(e){return new t(cxe.LineRange.ofLength(e[0],e[1]-e[0]),e[2])}static fromSingleTextEdit(e,r){let n=(0,x2s.splitLines)(e.text),o=e.range.startLineNumber,s=r.getValueOfRange(iue.Range.fromPositions(new nue.Position(e.range.startLineNumber,1),e.range.getStartPosition()));n[0]=s+n[0];let c=e.range.endLineNumber+1,l=r.getTransformer().getLineLength(e.range.endLineNumber)+1,u=r.getValueOfRange(iue.Range.fromPositions(e.range.getEndPosition(),new nue.Position(e.range.endLineNumber,l)));n[n.length-1]=n[n.length-1]+u;let d=e.range.startColumn===r.getTransformer().getLineLength(e.range.startLineNumber)+1,p=e.range.endColumn===1;return d&&n[0].length===s.length&&(o++,n.shift()),n.length>0&&o1){let s=this.lineRange.startLineNumber-1,c=e.getTransformer().getLineLength(s)+1;n=new nue.Position(s,c)}else n=new nue.Position(1,1);let o=r.addToPosition(new nue.Position(1,1));return new oue.TextReplacement(iue.Range.fromPositions(n,o),"")}else return new oue.TextReplacement(new iue.Range(this.lineRange.startLineNumber,1,this.lineRange.endLineNumberExclusive,1),"")}else if(this.lineRange.isEmpty){let r,n,o,s=this.lineRange.startLineNumber;return s===e.getTransformer().textLength.lineCount+2?(r=s-1,n=e.getTransformer().getLineLength(r)+1,o=this.newLines.map(c=>` +`),o=(0,vrt.commonPrefixLength)(r,n);r=r.substring(o),n=n.substring(o);let s=(0,vrt.commonSuffixLength)(r,n);return r=r.substring(0,r.length-s),n=n.substring(0,n.length-s),r===""}toString(){let e=this.range.getStartPosition(),r=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${r.lineNumber},${r.column}): "${this.text}"`}};gle.TextReplacement=Dy;function brt(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return k0.Range.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new Trt.BugIndicatingError("start must be before end");return new k0.Range(t.lineNumber,t.column,e.lineNumber,e.column)}a(brt,"rangeFromPositions")});var vz=T(H7=>{"use strict";f();Object.defineProperty(H7,"__esModule",{value:!0});H7.SerializedLineReplacement=H7.LineReplacement=H7.LineEdit=void 0;var Ier=Lc(),Fjn=Hl(),wks=m0(),oIe=N5(),Qjn=Zg(),Ale=qE(),yle=ff(),Ele=iIe(),xrt=class t{static{a(this,"LineEdit")}static{this.empty=new t([])}static deserialize(e){return new t(e.map(r=>Cz.deserialize(r)))}static fromStringEdit(e,r){let n=Ele.TextEdit.fromStringEdit(e,r);return t.fromTextEdit(n,r)}static fromTextEdit(e,r){let n=e.replacements,o=[],s=[];for(let c=0;cn.lineRange.startLineNumber,Ier.numberComparator)),new t(r)}constructor(e){this.replacements=e,(0,Fjn.assert)((0,Fjn.checkAdjacentItems)(e,(r,n)=>r.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}isEmpty(){return this.replacements.length===0}toEdit(e){let r=[];for(let n of this.replacements){let o=n.toSingleEdit(e);r.push(o)}return new Qjn.StringEdit(r)}toString(){return this.replacements.map(e=>e.toString()).join(",")}serialize(){return this.replacements.map(e=>e.serialize())}getNewLineRanges(){let e=[],r=0;for(let n of this.replacements)e.push(oIe.LineRange.ofLength(n.lineRange.startLineNumber+r,n.newLines.length)),r+=n.newLines.length-n.lineRange.length;return e}mapLineNumber(e){let r=0;for(let n of this.replacements){if(n.lineRange.endLineNumberExclusive>e)break;r+=n.newLines.length-n.lineRange.length}return e+r}mapLineRange(e){return new oIe.LineRange(this.mapLineNumber(e.startLineNumber),this.mapLineNumber(e.endLineNumberExclusive))}mapBackLineRange(e,r){return this.inverse(r).mapLineRange(e)}touches(e){return this.replacements.some(r=>e.replacements.some(n=>r.lineRange.intersect(n.lineRange)))}rebase(e){return new t(this.replacements.map(r=>new Cz(e.mapLineRange(r.lineRange),r.newLines)))}humanReadablePatch(e){let r=[];function n(l,u,d,p){let h=d==="unmodified"?" ":d==="deleted"?"-":"+";p===void 0&&(p="[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]");let m=l===-1?" ":l.toString().padStart(3," "),g=u===-1?" ":u.toString().padStart(3," ");r.push(`${h} ${m} ${g} ${p}`)}a(n,"pushLine");function o(){r.push("---")}a(o,"pushSeperator");let s=0,c=!0;for(let l of(0,Ier.groupAdjacentBy)(this.replacements,(u,d)=>u.lineRange.distanceToRange(d.lineRange)<=5)){c?c=!1:o();let u=l[0].lineRange.startLineNumber-2;for(let d of l){for(let m=Math.max(1,u);mg)){let g=e[m-1];n(m,-1,"deleted",g)}for(let m=0;mnew Cz(r[o],e.slice(n.lineRange.startLineNumber-1,n.lineRange.endLineNumberExclusive-1))))}};H7.LineEdit=xrt;var Cz=class t{static{a(this,"LineReplacement")}static deserialize(e){return new t(oIe.LineRange.ofLength(e[0],e[1]-e[0]),e[2])}static fromSingleTextEdit(e,r){let n=(0,wks.splitLines)(e.text),o=e.range.startLineNumber,s=r.getValueOfRange(yle.Range.fromPositions(new Ale.Position(e.range.startLineNumber,1),e.range.getStartPosition()));n[0]=s+n[0];let c=e.range.endLineNumber+1,l=r.getTransformer().getLineLength(e.range.endLineNumber)+1,u=r.getValueOfRange(yle.Range.fromPositions(e.range.getEndPosition(),new Ale.Position(e.range.endLineNumber,l)));n[n.length-1]=n[n.length-1]+u;let d=e.range.startColumn===r.getTransformer().getLineLength(e.range.startLineNumber)+1,p=e.range.endColumn===1;return d&&n[0].length===s.length&&(o++,n.shift()),n.length>0&&o1){let s=this.lineRange.startLineNumber-1,c=e.getTransformer().getLineLength(s)+1;n=new Ale.Position(s,c)}else n=new Ale.Position(1,1);let o=r.addToPosition(new Ale.Position(1,1));return new Ele.TextReplacement(yle.Range.fromPositions(n,o),"")}else return new Ele.TextReplacement(new yle.Range(this.lineRange.startLineNumber,1,this.lineRange.endLineNumberExclusive,1),"")}else if(this.lineRange.isEmpty){let r,n,o,s=this.lineRange.startLineNumber;return s===e.getTransformer().textLength.lineCount+2?(r=s-1,n=e.getTransformer().getLineLength(r)+1,o=this.newLines.map(c=>` `+c).join("")):(r=s,n=1,o=this.newLines.map(c=>c+` -`).join("")),new oue.TextReplacement(iue.Range.fromPositions(new nue.Position(r,n)),o)}else{let r=this.lineRange.endLineNumberExclusive-1,n=e.getTransformer().getLineLength(r)+1,o=new iue.Range(this.lineRange.startLineNumber,1,r,n),s=this.newLines.join(` -`);return new oue.TextReplacement(o,s)}}toSingleEdit(e){let r=this.toSingleTextEdit(e),n=e.getTransformer().getOffsetRange(r.range);return new qHn.StringReplacement(n,r.text)}toString(){return`${this.lineRange}->${JSON.stringify(this.newLines)}`}serialize(){return[this.lineRange.startLineNumber,this.lineRange.endLineNumberExclusive,this.newLines]}removeCommonSuffixPrefixLines(e){let r=this.lineRange.startLineNumber,n=this.lineRange.endLineNumberExclusive,o=0;for(;rtypeof n=="string")}a(e,"is"),t.is=e})(QHn||(gU.SerializedLineReplacement=QHn={}))});var aer=T(sue=>{"use strict";f();Object.defineProperty(sue,"__esModule",{value:!0});sue.ArrayMap=sue.ResponseProcessor=void 0;var w2s=es(),Cnt=mY(),_nt=$N(),GHn;(function(t){t.DEFAULT_DIFF_PARAMS={emitFastCursorLineChange:"off",nSignificantLinesToConverge:2,nLinesToConverge:3};function e(l){return l===!0?"additiveOnly":l===!1?"off":l}a(e,"mapEmitFastCursorLineChange"),t.mapEmitFastCursorLineChange=e;async function*r(l,u,d,p){let h=new vnt;for(let[y,E]of l.entries())h.add(E,y);let m=0,g=-1,A={k:"aligned"};for await(let y of u){if(++g,m>=l.length){switch(A.k){case"aligned":{A={k:"diverged",startLineIdx:m,newLines:[y]};break}case"diverged":A.newLines.push(y)}continue}if(A.k==="aligned"){if(l[m]===y){++m;continue}A={k:"diverged",startLineIdx:m,newLines:[]}}A.newLines.push(y);let E=c(l,d,h,A,m,p);E&&(yield E.singleLineEdit,m=E.convergenceEndIdx,A={k:"aligned"})}switch(A.k){case"diverged":{let y=new _nt.LineRange(A.startLineIdx+1,l.length+1);yield new Cnt.LineReplacement(y,A.newLines);break}case"aligned":{if(mu.length)return!1;let d=0;for(let p=0;p[D,D]);if(A.length===0){if(m.emitFastCursorLineChange==="off"||h!==u||p.newLines.length>1)return;let D=l[h],G=p.newLines[0];if(D.trim()===""&&h+10&&v[0]-p.startLineIdx===p.newLines.length-1&&(_="found_significant_matches");g>=0&&(A=A.map(([D,G])=>[D,G-1]),A=A.filter(([D,G])=>G>=0&&h<=G),A=A.filter(([D,G])=>l[G]===p.newLines[g]),A.length!==0);--g)if(++y,n(p.newLines[g])&&++E,E===m.nSignificantLinesToConverge&&(_="found_significant_matches",v=A[0]),y===m.nLinesToConverge){_="found_matches",v=A[0];break}if(!_)return;let b=v[1],I=v[0],x=I-b+1,R=b-p.startLineIdx,w=p.newLines.slice(0,p.newLines.length-x),P=w.length;if(R-P>1&&P>0)return;let k=[p.startLineIdx,b],Q=new _nt.LineRange(k[0]+1,k[1]+1);return{singleLineEdit:new Cnt.LineReplacement(Q,w),convergenceEndIdx:I+1}}a(c,"checkForConvergence")})(GHn||(sue.ResponseProcessor=GHn={}));var vnt=class{static{a(this,"ArrayMap")}constructor(){this.map=new Map}add(e,r){let n=this.map.get(e);n?n.push(r):this.map.set(e,[r])}get(e){return this.map.get(e)||[]}};sue.ArrayMap=vnt});var jHn=T(bnt=>{"use strict";f();Object.defineProperty(bnt,"__esModule",{value:!0});bnt.AlternativeNotebookFormat=void 0;var HHn;(function(t){t.json="json",t.xml="xml",t.text="text"})(HHn||(bnt.AlternativeNotebookFormat=HHn={}))});var fc=T(lo=>{"use strict";f();var R2s=lo&&lo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P2s=lo&&lo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uxe=lo&&lo.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{this._setUserInfo({isInternal:!!e.copilotToken?.isInternal})}))}getConfigMixedWithDefaults(e){if(e.options?.valueIgnoredForExternals&&!this._isInternal)return this.getDefaultValue(e);let r=this.getConfig(e);return r===void 0?this.getDefaultValue(e):$Hn.isObject(r)&&$Hn.isObject(e.defaultValue)?{...e.defaultValue,...r}:r}getDefaultValue(e){let r=this.getDefaultValueForConfig(e),n=r==null||r===!1||r===0||r==="";return e.defaultValue===void 0&&n?e.defaultValue:r!==void 0?r:e.defaultValue}_setUserInfo(e){if(this._isInternal===e.isInternal)return;let r=this._isInternal!==e.isInternal;this._isInternal=e.isInternal;let n=new Set;for(let o of lo.globalConfigRegistry.configs.values())r&&o.options?.valueIgnoredForExternals&&n.add(o.fullyQualifiedId);n.size>0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a(o=>{for(let s of n)if(s===o||s.startsWith(o+".")||o.startsWith(s+"."))return!0;return!1},"affectsConfiguration")})}updateExperimentBasedConfiguration(e){e.length!==0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a(()=>!0,"affectsConfiguration")})}getConfigObservable(e){return this._getObservable_$show2FramesUp(e,()=>this.getConfig(e))}getExperimentBasedConfigObservable(e,r){return this._getObservable_$show2FramesUp(e,()=>this.getExperimentBasedConfig(e,r))}_getObservable_$show2FramesUp(e,r){let n=this.observables.get(e.id);return n||(n=(0,M2s.observableFromEventOpts)({debugName:a(()=>`Configuration Key "${e.id}"`,"debugName")},o=>this._register(this.onDidChangeConfiguration(s=>{s.affectsConfiguration(e.fullyQualifiedId)&&o(s)})),r),this.observables.set(e.id,n)),n}isConfigured(e,r){let n=this.inspectConfig(e,r);return n?.globalValue!==void 0||n?.globalLanguageValue!==void 0||n?.workspaceFolderValue!==void 0||n?.workspaceFolderLanguageValue!==void 0||n?.workspaceValue!==void 0||n?.workspaceLanguageValue!==void 0}getDefaultValueForConfig(e){}};lo.AbstractConfigurationService=ler;var Tnt;function L2s(){if(!Tnt){Tnt=new Map;let e=O2s.packageJson.contributes.configuration.map(n=>n.properties),r=Object.assign({},...e);for(let n in r)Tnt.set(n,r[n].default)}return Tnt}a(L2s,"getPackageJsonDefaults");function XHn(t,e,r){let n=`${lo.CopilotConfigPrefix}.${t}`,o=r?.oldKey?`${lo.CopilotConfigPrefix}.${r.oldKey}`:void 0,s=L2s(),c=s.has(n),l=s.get(n);if(c&&!D2s.equals(e,l))throw new cer.BugIndicatingError(`The default value for setting ${t} is different in packageJson and in code`);if(c&&r?.valueIgnoredForExternals)throw new cer.BugIndicatingError(`The setting ${t} is public, it therefore cannot be restricted to internal!`);let u=n.startsWith("github.copilot.advanced.")?n.substring(24):void 0;return{id:t,oldId:r?.oldKey,isPublic:c,fullyQualifiedId:n,fullyQualifiedOldId:o,advancedSubKey:u,defaultValue:e,options:r}}a(XHn,"toBaseConfig");var uer=class{static{a(this,"ConfigRegistry")}constructor(){this.configs=new Map}registerConfig(e){this.configs.set(e.fullyQualifiedId,e)}};lo.globalConfigRegistry=new uer;var der=class{static{a(this,"ConfigurationMigrationRegistryImpl")}constructor(){this.migrations=[],this._onDidRegisterConfigurationMigrations=new ZHn.Emitter,this.onDidRegisterConfigurationMigration=this._onDidRegisterConfigurationMigrations.event}registerConfigurationMigrations(e){this.migrations.push(...e),this._onDidRegisterConfigurationMigrations.fire(e)}};lo.ConfigurationMigrationRegistry=new der;function At(t,e,r,n,o,s){if(e===1){let l={...XHn(t,r,o),configType:1,experimentName:s?.experimentName,validator:n};if(l.advancedSubKey)throw new cer.BugIndicatingError("Shared settings cannot be experiment based");return lo.globalConfigRegistry.registerConfig(l),l}let c={...XHn(t,r,o),configType:0,validator:n};return lo.globalConfigRegistry.registerConfig(c),c}a(At,"defineSetting");function kt(t,e,r,n,o,s){return o={...o,valueIgnoredForExternals:!0},e===0?At(t,e,r,n,o):At(t,e,r,n,o,s)}a(kt,"defineTeamInternalSetting");function ejn(t,e){lo.ConfigurationMigrationRegistry.registerConfigurationMigrations([{key:`${lo.CopilotConfigPrefix}.${e}`,migrateFn:a(async r=>[[`${lo.CopilotConfigPrefix}.${t}`,{value:r}],[`${lo.CopilotConfigPrefix}.${e}`,{value:void 0}]],"migrateFn")}])}a(ejn,"migrateSetting");function Qh(t,e,r,n){return ejn(e,t),At(e,0,r,void 0,{...n,oldKey:t})}a(Qh,"defineAndMigrateSetting");function Bf(t,e,r,n,o){return ejn(e,t),At(e,1,r,void 0,{...n,oldKey:t},o)}a(Bf,"defineAndMigrateExpSetting");lo.HARD_TOOL_LIMIT=128;var fer;(function(t){t.GitHub="github",t.GitHubEnterprise="github-enterprise",t.Microsoft="microsoft"})(fer||(lo.AuthProviderId=fer={}));var per;(function(t){t.Default="default",t.Minimal="minimal"})(per||(lo.AuthPermissionMode=per={}));var lxe;(function(t){t.EntraId="entraId",t.ApiKey="apiKey"})(lxe||(lo.AzureAuthMode=lxe={}));(function(t){t.MICROSOFT_AUTH_PROVIDER="microsoft",t.COGNITIVE_SERVICES_SCOPE="https://cognitiveservices.azure.com/.default"})(lxe||(lo.AzureAuthMode=lxe={}));lo.XTabProviderId="XtabProvider";var her;(function(t){let e;(function(s){s.DebugOverrideProxyUrl=At("advanced.debug.overrideProxyUrl",0,void 0),s.DebugOverrideCAPIUrl=At("advanced.debug.overrideCapiUrl",0,void 0),s.DebugUseNodeFetchFetcher=At("advanced.debug.useNodeFetchFetcher",0,!0),s.DebugUseNodeFetcher=At("advanced.debug.useNodeFetcher",0,!1),s.DebugUseElectronFetcher=At("advanced.debug.useElectronFetcher",0,!0),s.AuthProvider=At("advanced.authProvider",0,fer.GitHub),s.AuthPermissions=At("advanced.authPermissions",0,per.Default)})(e=t.Shared||(t.Shared={}));let r;(function(s){s.DebugPromptOverrideFile=At("chat.debug.promptOverrideFile",0,null),s.WorkspacePrototypeAdoCodeSearchEndpointOverride=Qh("chat.advanced.workspace.prototypeAdoCodeSearchEndpointOverride","chat.workspace.prototypeAdoCodeSearchEndpointOverride",""),s.FeedbackOnChange=Qh("chat.advanced.feedback.onChange","chat.feedback.onChange",!1),s.ReviewIntent=Qh("chat.advanced.review.intent","chat.review.intent",!1),s.NotebookSummaryExperimentEnabled=Qh("chat.advanced.notebook.summaryExperimentEnabled","chat.notebook.summaryExperimentEnabled",!1),s.NotebookVariableFilteringEnabled=Qh("chat.advanced.notebook.variableFilteringEnabled","chat.notebook.variableFilteringEnabled",!1),s.TerminalToDebuggerPatterns=Qh("chat.advanced.debugTerminalCommandPatterns","chat.debugTerminalCommandPatterns",[]),s.WorkspaceRecordingEnabled=Qh("chat.advanced.localWorkspaceRecording.enabled","chat.localWorkspaceRecording.enabled",!1),s.EditRecordingEnabled=Qh("chat.advanced.editRecording.enabled","chat.editRecording.enabled",!1),s.CodeSearchAgentEnabled=Qh("chat.advanced.codesearch.agent.enabled","chat.codesearch.agent.enabled",!0),s.AgentTemperature=Qh("chat.advanced.agent.temperature","chat.agent.temperature",void 0),s.EnableUserPreferences=Qh("chat.advanced.enableUserPreferences","chat.enableUserPreferences",!1),s.SummarizeAgentConversationHistoryThreshold=Qh("chat.advanced.summarizeAgentConversationHistoryThreshold","chat.summarizeAgentConversationHistoryThreshold",void 0),s.AgentHistorySummarizationMode=Qh("chat.advanced.agentHistorySummarizationMode","chat.agentHistorySummarizationMode",void 0),s.UseResponsesApiTruncation=Qh("chat.advanced.useResponsesApiTruncation","chat.useResponsesApiTruncation",!1),s.OmitBaseAgentInstructions=Qh("chat.advanced.omitBaseAgentInstructions","chat.omitBaseAgentInstructions",!1),s.CLIPlanExitModeEnabled=At("chat.cli.planExitMode.enabled",0,!1),s.CLIForkSessionsEnabled=At("chat.cli.forkSessions.enabled",0,!1),s.CLIMCPServerEnabled=Qh("chat.advanced.cli.mcp.enabled","chat.cli.mcp.enabled",!0),s.CLIBranchSupport=At("chat.cli.branchSupport.enabled",0,!1),s.CLIIsolationOption=At("chat.cli.isolationOption.enabled",0,!0),s.CLIAutoCommitEnabled=At("chat.cli.autoCommit.enabled",0,!0),s.CLISessionController=At("chat.cli.sessionController.enabled",0,!1),s.CLITerminalLinks=At("chat.cli.terminalLinks.enabled",0,!0),s.RequestLoggerMaxEntries=Qh("chat.advanced.debug.requestLogger.maxEntries","chat.debug.requestLogger.maxEntries",100),s.ProjectLabelsExpanded=Bf("chat.advanced.projectLabels.expanded","chat.projectLabels.expanded",!1),s.ProjectLabelsChat=Bf("chat.advanced.projectLabels.chat","chat.projectLabels.chat",!1),s.ProjectLabelsInline=Bf("chat.advanced.projectLabels.inline","chat.projectLabels.inline",!1),s.WorkspaceMaxLocalIndexSize=Bf("chat.advanced.workspace.maxLocalIndexSize","chat.workspace.maxLocalIndexSize",1e5),s.WorkspaceEnableCodeSearch=Bf("chat.advanced.workspace.enableCodeSearch","chat.workspace.enableCodeSearch",!0),s.WorkspaceMaxDiffSizeBeforeUsingExternalIngest=Bf("chat.advanced.workspace.maxDiffSizeBeforeUsingExternalIngest","chat.workspace.maxDiffSizeBeforeUsingExternalIngest",100),s.WorkspacePreferredEmbeddingsModel=Bf("chat.advanced.workspace.preferredEmbeddingsModel","chat.workspace.preferredEmbeddingsModel",""),s.NotebookAlternativeDocumentFormat=Bf("chat.advanced.notebook.alternativeFormat","chat.notebook.alternativeFormat",B2s.AlternativeNotebookFormat.xml),s.UseAlternativeNESNotebookFormat=Bf("chat.advanced.notebook.alternativeNESFormat.enabled","chat.notebook.alternativeNESFormat.enabled",!1),s.InlineChatSelectionRatioThreshold=At("chat.inlineChat.selectionRatioThreshold",1,0),s.InstantApplyShortModelName=Bf("chat.advanced.instantApply.shortContextModelName","chat.instantApply.shortContextModelName","gpt-4o-instant-apply-full-ft-v66-short"),s.InstantApplyShortContextLimit=Bf("chat.advanced.instantApply.shortContextLimit","chat.instantApply.shortContextLimit",8e3),s.AgentHistorySummarizationWithPromptCache=Bf("chat.advanced.agentHistorySummarizationWithPromptCache","chat.agentHistorySummarizationWithPromptCache",!1),s.PromptFileContext=Bf("chat.advanced.promptFileContextProvider.enabled","chat.promptFileContextProvider.enabled",!0),s.DefaultToolsGrouped=Bf("chat.advanced.tools.defaultToolsGrouped","chat.tools.defaultToolsGrouped",!1),s.Gpt5AlternativePatch=Bf("chat.advanced.gpt5AlternativePatch","chat.gpt5AlternativePatch",!1),s.SearchSubagentToolEnabled=At("chat.searchSubagent.enabled",1,!1),s.SearchSubagentUseAgenticProxy=At("chat.searchSubagent.useAgenticProxy",1,!1),s.SearchSubagentModel=At("chat.searchSubagent.model",1,""),s.SearchSubagentToolCallLimit=At("chat.searchSubagent.toolCallLimit",1,4),s.ExecutionSubagentToolEnabled=At("chat.executionSubagent.enabled",1,!1),s.ExecutionSubagentModel=At("chat.executionSubagent.model",0,""),s.ExecutionSubagentToolCallLimit=At("chat.executionSubagent.toolCallLimit",1,5),s.InlineEditsTriggerOnEditorChangeAfterSeconds=Bf("chat.advanced.inlineEdits.triggerOnEditorChangeAfterSeconds","chat.inlineEdits.triggerOnEditorChangeAfterSeconds",void 0),s.InlineEditsNextCursorPredictionDisplayLine=Bf("chat.advanced.inlineEdits.nextCursorPrediction.displayLine","chat.inlineEdits.nextCursorPrediction.displayLine",!0),s.InlineEditsNextCursorPredictionCurrentFileMaxTokens=Bf("chat.advanced.inlineEdits.nextCursorPrediction.currentFileMaxTokens","chat.inlineEdits.nextCursorPrediction.currentFileMaxTokens",3e3),s.InlineEditsRenameSymbolSuggestions=At("chat.inlineEdits.renameSymbolSuggestions",1,!0),s.InlineEditsPreferredModel=At("nextEditSuggestions.preferredModel",1,"none"),s.InlineEditsAggressiveness=At("nextEditSuggestions.eagerness",1,pd.AggressivenessSetting.Default,pd.AggressivenessSetting.VALIDATOR),s.DiagnosticsContextProvider=Bf("chat.advanced.inlineEdits.diagnosticsContextProvider.enabled","chat.inlineEdits.diagnosticsContextProvider.enabled",!1),s.ChatSessionContextProvider=At("chat.inlineEdits.chatSessionContextProvider.enabled",1,!1),s.Gemini3MultiReplaceString=At("chat.edits.gemini3MultiReplaceString",1,!1),s.AgentOmitFileAttachmentContents=At("chat.agent.omitFileAttachmentContents",1,!1),s.InstallExtensionSkillEnabled=At("chat.installExtensionSkill.enabled",1,!1),s.ProjectSetupInfoSkillEnabled=At("chat.projectSetupInfoSkill.enabled",1,!1),s.LargeToolResultsToDiskEnabled=At("chat.agent.largeToolResultsToDisk.enabled",1,!0),s.LargeToolResultsToDiskThreshold=At("chat.agent.largeToolResultsToDisk.thresholdBytes",1,8*1024),s.DebugGitHubAuthFailWith=At("chat.debug.githubAuthFailWith",0,null),s.AgentDebugLogEnabled=Bf("agentDebugLog.enabled","chat.agentDebugLog.enabled",!1),s.ChatDebugFileLogging=Bf("chat.chatDebug.fileLogging.enabled","chat.agentDebugLog.fileLogging.enabled",!1),s.ChatDebugFileLoggingFlushInterval=Qh("chat.chatDebug.fileLogging.flushIntervalMs","chat.agentDebugLog.fileLogging.flushIntervalMs",4e3),s.OTelEnabled=At("chat.otel.enabled",0,!1),s.OTelExporterType=At("chat.otel.exporterType",0,"otlp-http"),s.OTelOtlpEndpoint=At("chat.otel.otlpEndpoint",0,"http://localhost:4318"),s.OTelCaptureContent=At("chat.otel.captureContent",0,!1),s.OTelOutfile=At("chat.otel.outfile",0,""),s.OTelDbSpanExporter=At("chat.otel.dbSpanExporter.enabled",0,!1)})(r=t.Advanced||(t.Advanced={}));let n;(function(s){s.DebugOverrideChatMaxTokenNum=kt("chat.advanced.debug.overrideChatMaxTokenNum",0,0),s.DebugReportFeedback=kt("chat.advanced.debug.reportFeedback",0,!1),s.DisableRepoInfoTelemetry=kt("chat.advanced.debug.disableRepoInfoTelemetry",0,!1),s.InlineEditsIgnoreCompletionsDisablement=kt("chat.advanced.inlineEdits.ignoreCompletionsDisablement",0,!1,(0,pA.vBoolean)()),s.InlineEditsModelPickerEnabled=kt("chat.advanced.inlineEdits.modelPicker.enabled",1,!1,(0,pA.vBoolean)()),s.InlineEditsUseSlashModels=kt("chat.advanced.inlineEdits.useSlashModels",1,!0),s.InlineEditsLogContextRecorderEnabled=kt("chat.advanced.inlineEdits.logContextRecorder.enabled",0,!1),s.InlineEditsHideInternalInterface=kt("chat.advanced.inlineEdits.hideInternalInterface",0,!1,(0,pA.vBoolean)()),s.InlineEditsLogCancelledRequests=kt("chat.advanced.inlineEdits.logCancelledRequests",0,!1,(0,pA.vBoolean)()),s.InlineEditsNextCursorPredictionUrl=kt("chat.advanced.inlineEdits.nextCursorPrediction.url",0,void 0,(0,pA.vString)()),s.InlineEditsNextCursorPredictionApiKey=kt("chat.advanced.inlineEdits.nextCursorPrediction.apiKey",0,void 0,(0,pA.vString)()),s.InlineEditsXtabProviderUrl=kt("chat.advanced.inlineEdits.xtabProvider.url",0,void 0,(0,pA.vString)()),s.InlineEditsXtabProviderApiKey=kt("chat.advanced.inlineEdits.xtabProvider.apiKey",0,void 0,(0,pA.vString)()),s.InlineEditsXtabProviderModelConfiguration=kt("chat.advanced.inlineEdits.xtabProvider.modelConfiguration",0,void 0,pd.MODEL_CONFIGURATION_VALIDATOR),s.InlineEditsNextCursorPredictionLintOptions=kt("chat.advanced.inlineEdits.nextCursorPrediction.lintOptions",0,void 0,pd.LINT_OPTIONS_VALIDATOR),s.InlineEditsInlineCompletionsEnabled=kt("chat.advanced.inlineEdits.inlineCompletions.enabled",0,!0,(0,pA.vBoolean)()),s.InlineEditsInlineCompletionsAdvanced=kt("chat.advanced.inlineEdits.inlineCompletions.advancedDetection",1,!0,(0,pA.vBoolean)()),s.InlineEditsXtabProviderUsePrediction=kt("chat.advanced.inlineEdits.xtabProvider.usePrediction",1,!0,(0,pA.vBoolean)()),s.InlineEditsXtabLanguageContextEnabledLanguages=kt("chat.advanced.inlineEdits.xtabProvider.languageContext.enabledLanguages",0,gY.LANGUAGE_CONTEXT_ENABLED_LANGUAGES),s.InlineEditsXtabLanguageContextTraitsPosition=kt("chat.advanced.inlineEdits.xtabProvider.languageContext.traitsPosition",1,"before"),s.InlineEditsDiagnosticsExplorationEnabled=kt("chat.advanced.inlineEdits.inlineEditsDiagnosticsExplorationEnabled",0,!1),s.GhostTextUseCompletionsFetchService=kt("chat.advanced.ghostText.useCompletionsFetchService",1,!1),s.InternalWelcomeHintEnabled=kt("chat.advanced.welcomePageHint.enabled",0,!1),s.InlineChatUseCodeMapper=kt("chat.advanced.inlineChat.useCodeMapper",0,!1),s.EnablePromptRendererTracing=kt("chat.advanced.promptRenderer.trace",0,!1),s.DebugCollectFetcherTelemetry=kt("chat.advanced.debug.collectFetcherTelemetry",1,!0),s.DebugShowNetworkStatus=kt("chat.advanced.debug.showNetworkStatus",1,!1),s.GeminiFunctionCallingMode=kt("chat.advanced.gemini.functionCallingMode",1,"validated"),s.ModelProviderPreference=kt("chat.advanced.modelProviderPreference",0,void 0,(0,pA.vString)()),s.UseVSCodeTelemetryLibForGH=kt("chat.advanced.telemetry.useVSCodeTelemetryLibForGH",1,!1),s.DebugExpUseNodeFetchFetcher=kt("chat.advanced.debug.useNodeFetchFetcher",1,void 0),s.DebugExpUseNodeFetcher=kt("chat.advanced.debug.useNodeFetcher",1,void 0),s.DebugExpUseElectronFetcher=kt("chat.advanced.debug.useElectronFetcher",1,void 0),s.InlineEditsAsyncCompletions=kt("chat.advanced.inlineEdits.asyncCompletions",1,!0),s.InlineEditsEagerBackupRequest=kt("chat.advanced.inlineEdits.eagerBackupRequest",1,!1),s.InlineEditsDebounceUseCoreRequestTime=kt("chat.advanced.inlineEdits.debounceUseCoreRequestTime",1,!1),s.InlineEditsYieldToCopilot=kt("chat.advanced.inlineEdits.yieldToCopilot",1,!1),s.InlineEditsExcludedProviders=kt("chat.advanced.inlineEdits.excludedProviders",1,void 0),s.InlineEditsEnableGhCompletionsProvider=kt("chat.advanced.inlineEdits.githubCompletionsProvider.enabled",1,!1),s.InlineEditsCompletionsUrl=kt("chat.advanced.inlineEdits.completionsProvider.url",1,void 0),s.InlineEditsDebounce=kt("chat.advanced.inlineEdits.debounce",1,100),s.InlineEditsCacheDelay=kt("chat.advanced.inlineEdits.cacheDelay",1,200),s.InlineEditsSubsequentCacheDelay=kt("chat.advanced.inlineEdits.subsequentCacheDelay",1,0),s.InlineEditsSpeculativeRequestDelay=kt("chat.advanced.inlineEdits.speculativeRequestDelay",1,0),s.InlineEditsRebasedCacheDelay=kt("chat.advanced.inlineEdits.rebasedCacheDelay",1,0),s.InlineEditsAbsorbSubsequenceTyping=kt("chat.advanced.inlineEdits.absorbSubsequenceTyping",1,!1),s.InlineEditsBackoffDebounceEnabled=kt("chat.advanced.inlineEdits.backoffDebounceEnabled",1,!0),s.InlineEditsExtraDebounceEndOfLine=kt("chat.advanced.inlineEdits.extraDebounceEndOfLine",1,2e3),s.InlineEditsSpeculativeRequests=kt("chat.advanced.inlineEdits.speculativeRequests",1,gY.SpeculativeRequestsEnablement.Off,gY.SpeculativeRequestsEnablement.VALIDATOR),s.InlineEditsSpeculativeRequestsCursorPlacement=kt("chat.advanced.inlineEdits.speculativeRequestsCursorPlacement",1,gY.SpeculativeRequestsCursorPlacement.AfterEditApplied,gY.SpeculativeRequestsCursorPlacement.VALIDATOR),s.InlineEditsSpeculativeRequestsAutoExpandEditWindowLines=kt("chat.advanced.inlineEdits.speculativeRequestsAutoExpandEditWindowLines",1,gY.SpeculativeRequestsAutoExpandEditWindowLines.Off,gY.SpeculativeRequestsAutoExpandEditWindowLines.VALIDATOR),s.InlineEditsExtraDebounceInlineSuggestion=kt("chat.advanced.inlineEdits.extraDebounceInlineSuggestion",1,0),s.InlineEditsDebounceOnSelectionChange=kt("chat.advanced.inlineEdits.debounceOnSelectionChange",1,void 0),s.InlineEditsTriggerOnEditorChangeStrategy=kt("chat.advanced.inlineEdits.triggerOnEditorChangeStrategy",1,YHn.DocumentSwitchTriggerStrategy.Always,YHn.DocumentSwitchTriggerStrategy.VALIDATOR),s.InlineEditsProviderId=kt("chat.advanced.inlineEdits.providerId",1,void 0),s.InlineEditsUnification=kt("chat.advanced.inlineEdits.unification",1,!1),s.InlineEditsNextCursorPredictionModelName=kt("chat.advanced.inlineEdits.nextCursorPrediction.modelName",1,"copilot-suggestions-himalia-001"),s.InlineEditsNextCursorPredictionUseEndpointProvider=kt("chat.advanced.inlineEdits.nextCursorPrediction.useEndpointProvider",0,!1,(0,pA.vBoolean)()),s.InlineEditsNextCursorPredictionMaxResponseTokens=kt("chat.advanced.inlineEdits.nextCursorPrediction.maxResponseTokens",1,40),s.InlineEditsNextCursorPredictionLintOptionsString=kt("chat.advanced.inlineEdits.nextCursorPrediction.lintOptionsString",1,void 0),s.InlineEditsXtabProviderModelConfigurationString=kt("chat.advanced.inlineEdits.xtabProvider.modelConfigurationString",1,void 0),s.InlineEditsXtabProviderDefaultModelConfigurationString=kt("chat.advanced.inlineEdits.xtabProvider.defaultModelConfigurationString",1,void 0),s.InlineEditsXtabProviderUseVaryingLinesAbove=kt("chat.advanced.inlineEdits.xtabProvider.useVaryingLinesAbove",1,void 0),s.InlineEditsXtabProviderNLinesAbove=kt("chat.advanced.inlineEdits.xtabProvider.nLinesAbove",1,void 0),s.InlineEditsXtabProviderNLinesBelow=kt("chat.advanced.inlineEdits.xtabProvider.nLinesBelow",1,void 0),s.InlineEditsAutoExpandEditWindowLines=kt("chat.advanced.inlineEdits.autoExpandEditWindowLines",1,10),s.InlineEditsXtabNRecentlyViewedDocuments=kt("chat.advanced.inlineEdits.xtabProvider.nRecentlyViewedDocuments",1,pd.DEFAULT_OPTIONS.recentlyViewedDocuments.nDocuments),s.InlineEditsXtabRecentlyViewedDocumentsMaxTokens=kt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.maxTokens",1,pd.DEFAULT_OPTIONS.recentlyViewedDocuments.maxTokens),s.InlineEditsXtabRecentlyViewedIncludeLineNumbers=kt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.includeLineNumbers",1,pd.DEFAULT_OPTIONS.recentlyViewedDocuments.includeLineNumbers),s.InlineEditsNextCursorPredictionRecentSnippetsIncludeLineNumbers=kt("chat.advanced.inlineEdits.nextCursorPrediction.recentSnippets.includeLineNumbers",1,pd.IncludeLineNumbersOption.None),s.InlineEditsNextCursorPredictionCursorPlacement=kt("chat.advanced.inlineEdits.nextCursorPrediction.cursorPlacement",1,zHn.NextCursorLinePredictionCursorPlacement.AfterLine,zHn.NextCursorLinePredictionCursorPlacement.VALIDATOR),s.InlineEditsXtabDiffNEntries=kt("chat.advanced.inlineEdits.xtabProvider.diffNEntries",1,pd.DEFAULT_OPTIONS.diffHistory.nEntries),s.InlineEditsXtabDiffMaxTokens=kt("chat.advanced.inlineEdits.xtabProvider.diffMaxTokens",1,pd.DEFAULT_OPTIONS.diffHistory.maxTokens),s.InlineEditsXtabDiffMergeStrategy=kt("chat.advanced.inlineEdits.xtabProvider.diffMergeStrategy",1,KHn.DiffHistoryMergeStrategy.SameStartLine,KHn.DiffHistoryMergeStrategy.VALIDATOR),s.InlineEditsXtabDiffMergeLineGap=kt("chat.advanced.inlineEdits.xtabProvider.diffMergeLineGap",1,0,(0,pA.vNumber)()),s.InlineEditsXtabDiffMergeSplitAfterMs=kt("chat.advanced.inlineEdits.xtabProvider.diffMergeSplitAfterMs",1,100,(0,pA.vNumber)()),s.InlineEditsXtabProviderEmitFastCursorLineChange=kt("chat.advanced.inlineEdits.xtabProvider.emitFastCursorLineChange",1,"additiveOnly"),s.InlineEditsXtabIncludeViewedFiles=kt("chat.advanced.inlineEdits.xtabProvider.includeViewedFiles",1,pd.DEFAULT_OPTIONS.recentlyViewedDocuments.includeViewedFiles),s.InlineEditsXtabRecentlyViewedClippingStrategy=kt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.clippingStrategy",1,pd.DEFAULT_OPTIONS.recentlyViewedDocuments.clippingStrategy,pd.RecentFileClippingStrategy.VALIDATOR),s.InlineEditsXtabPageSize=kt("chat.advanced.inlineEdits.xtabProvider.pageSize",1,pd.DEFAULT_OPTIONS.pagedClipping.pageSize),s.InlineEditsXtabEditWindowMaxTokens=kt("chat.advanced.inlineEdits.xtabProvider.editWindowMaxTokens",1,2e3),s.InlineEditsXtabIncludeTagsInCurrentFile=kt("chat.advanced.inlineEdits.xtabProvider.includeTagsInCurrentFile",1,pd.DEFAULT_OPTIONS.currentFile.includeTags),s.InlineEditsXtabIncludeLineNumbersInCurrentFile=kt("chat.advanced.inlineEdits.xtabProvider.includeLineNumbersInCurrentFile",1,pd.DEFAULT_OPTIONS.currentFile.includeLineNumbers),s.InlineEditsXtabIncludeCursorTagInCurrentFile=kt("chat.advanced.inlineEdits.xtabProvider.includeCursorTagInCurrentFile",1,pd.DEFAULT_OPTIONS.currentFile.includeCursorTag),s.InlineEditsXtabCurrentFileMaxTokens=kt("chat.advanced.inlineEdits.xtabProvider.currentFileMaxTokens",1,pd.DEFAULT_OPTIONS.currentFile.maxTokens),s.InlineEditsXtabPrioritizeAboveCursor=kt("chat.advanced.inlineEdits.xtabProvider.currentFile.prioritizeAboveCursor",1,pd.DEFAULT_OPTIONS.currentFile.prioritizeAboveCursor),s.InlineEditsXtabDiffOnlyForDocsInPrompt=kt("chat.advanced.inlineEdits.xtabProvider.diffOnlyForDocsInPrompt",1,pd.DEFAULT_OPTIONS.diffHistory.onlyForDocsInPrompt),s.InlineEditsXtabDiffUseRelativePaths=kt("chat.advanced.inlineEdits.xtabProvider.diffUseRelativePaths",1,pd.DEFAULT_OPTIONS.diffHistory.useRelativePaths),s.InlineEditsXtabNNonSignificantLinesToConverge=kt("chat.advanced.inlineEdits.xtabProvider.nNonSignificantLinesToConverge",1,JHn.ResponseProcessor.DEFAULT_DIFF_PARAMS.nLinesToConverge),s.InlineEditsXtabNSignificantLinesToConverge=kt("chat.advanced.inlineEdits.xtabProvider.nSignificantLinesToConverge",1,JHn.ResponseProcessor.DEFAULT_DIFF_PARAMS.nSignificantLinesToConverge),s.InlineEditsXtabLanguageContextEnabled=kt("chat.advanced.inlineEdits.xtabProvider.languageContext.enabled",1,pd.DEFAULT_OPTIONS.languageContext.enabled),s.InlineEditsXtabLanguageContextMaxTokens=kt("chat.advanced.inlineEdits.xtabProvider.languageContext.maxTokens",1,pd.DEFAULT_OPTIONS.languageContext.maxTokens),s.InlineEditsXtabMaxMergeConflictLines=kt("chat.advanced.inlineEdits.xtabProvider.maxMergeConflictLines",1,void 0),s.InlineEditsXtabOnlyMergeConflictLines=kt("chat.advanced.inlineEdits.xtabProvider.onlyMergeConflictLines",1,!1),s.InlineEditsXtabAggressivenessLevel=kt("chat.advanced.inlineEdits.xtabProvider.aggressivenessLevel",1,void 0),s.InlineEditsAggressivenessLowMinResponseTimeMs=kt("chat.advanced.inlineEdits.aggressiveness.lowMinResponseTimeMs",1,1500),s.InlineEditsAggressivenessMediumMinResponseTimeMs=kt("chat.advanced.inlineEdits.aggressiveness.mediumMinResponseTimeMs",1,700),s.InlineEditsAggressivenessHighDebounceMs=kt("chat.advanced.inlineEdits.aggressiveness.highDebounceMs",1,0),s.InlineEditsUserHappinessScoreConfigurationString=kt("chat.advanced.inlineEdits.adaptiveAggressivenessConfigurationString",1,void 0),s.InlineEditsUndoInsertionFiltering=kt("chat.advanced.inlineEdits.undoInsertionFiltering",1,"v1"),s.InlineEditsFilterOutEditsWithSubstrings=kt("chat.advanced.inlineEdits.filterOutEditsWithSubstrings",1,"<|current_file_content|>,<|/current_file_content|>,<|diff_marker|>"),s.InlineEditsAllowImportChanges=kt("chat.advanced.inlineEdits.allowImportChanges",1,VHn.ImportChanges.None,VHn.ImportChanges.VALIDATOR),s.InlineEditsIgnoreWhenSuggestVisible=kt("chat.advanced.inlineEdits.ignoreWhenSuggestVisible",1,!0),s.InlineEditsJointCompletionsProviderEnabled=kt("chat.advanced.inlineEdits.jointCompletionsProvider.enabled",1,!1),s.InlineEditsJointCompletionsProviderStrategy=kt("chat.advanced.inlineEdits.jointCompletionsProvider.strategy",1,WHn.JointCompletionsProviderStrategy.Regular),s.InlineEditsJointCompletionsProviderTriggerChangeStrategy=kt("chat.advanced.inlineEdits.jointCompletionsProvider.triggerChangeStrategy",1,WHn.JointCompletionsProviderTriggerChangeStrategy.NoTriggerOnCompletionsRequestInFlight),s.InstantApplyModelName=kt("chat.advanced.instantApply.modelName",1,"gpt-4o-instant-apply-full-ft-v66"),s.VerifyTextDocumentChanges=kt("chat.advanced.inlineEdits.verifyTextDocumentChanges",1,!1),s.UseAutoModeRouting=kt("chat.advanced.useAutoModeRouter",1,!1),s.InlineCompletionsDefaultDiagnosticsOptions=kt("chat.advanced.inlineCompletions.defaultDiagnosticsOptionsString",1,void 0),s.RecordExpectedEditEnabled=kt("chat.advanced.inlineEdits.recordExpectedEdit.enabled",0,!1),s.RecordExpectedEditOnReject=kt("chat.advanced.inlineEdits.recordExpectedEdit.onReject",0,!1),s.ReadFileCodeFences=kt("chat.advanced.readFileCodeFences",1,!1),s.EnableReadFileV2=At("chat.advanced.enableReadFileV2",1,!1),s.AskAgent=At("chat.advanced.enableAskAgent",1,!1),s.RetryNetworkErrors=At("chat.advanced.enableRetryNetworkErrors",1,!0),s.RetryServerErrorStatusCodes=At("chat.advanced.retryServerErrorStatusCodes",1,"500,502"),s.FallbackNodeFetchOnNetworkProcessCrash=At("chat.advanced.enableFallbackNodeFetchOnNetworkProcessCrash",1,!0),s.WorkspaceEnableCodeSearchExternalIngest=kt("chat.advanced.workspace.codeSearchExternalIngest.enabled",1,!1),s.ChatRequestPowerSaveBlocker=kt("chat.advanced.chatRequestPowerSaveBlocker",1,!0),s.ResponsesApiWebSocketEnabled=kt("chat.advanced.responsesApi.webSocket.enabled",1,!1),s.DebugSimulateWebSocketResponse=kt("chat.advanced.debug.simulateWebSocketResponse",0,"")})(n=t.TeamInternal||(t.TeamInternal={}));let o;(function(s){s.PlanAgentModel=At("chat.planAgent.model",0,""),s.OllamaEndpoint=At("chat.byok.ollamaEndpoint",0,"http://localhost:11434"),s.AzureModels=At("chat.azureModels",0,{}),s.CustomOAIModels=At("chat.customOAIModels",0,{}),s.AzureAuthType=At("chat.azureAuthType",0,lxe.EntraId)})(o=t.Deprecated||(t.Deprecated={})),t.Enable=At("enable",0,{"*":!0,plaintext:!1,markdown:!1,scminput:!1}),t.selectedCompletionsModel=At("selectedCompletionModel",0,""),t.RateLimitAutoSwitchToAuto=At("chat.rateLimitAutoSwitchToAuto",0,!1,(0,pA.vBoolean)()),t.UseAnthropicMessagesApi=At("chat.anthropic.useMessagesApi",1,!0),t.AnthropicContextEditingMode=At("chat.anthropic.contextEditing.mode",1,"off"),t.AnthropicToolSearchEnabled=At("chat.anthropic.toolSearchTool.enabled",0,!0),t.AnthropicToolSearchMode=At("chat.anthropic.toolSearchTool.mode",1,"server"),t.AnthropicPromptOptimization=At("chat.anthropic.promptOptimization",1,"control"),t.ResponsesApiReasoningSummary=At("chat.responsesApiReasoningSummary",1,"detailed"),t.ResponsesApiContextManagementEnabled=At("chat.responsesApiContextManagement.enabled",1,!1),t.ResponsesApiPromptCacheKeyEnabled=At("chat.responsesApi.promptCacheKey.enabled",1,!1),t.Updated53CodexPromptEnabled=At("chat.updated53CodexPrompt.enabled",1,!0),t.EnableGpt54ConcisePromptExp=At("chat.gpt54ConcisePrompt.enabled",1,!1),t.EnableGpt54LargePromptExp=At("chat.gpt54LargePrompt.enabled",1,!1),t.EnableChatImageUpload=At("chat.imageUpload.enabled",1,!0),t.AnthropicThinkingBudget=At("chat.anthropic.thinking.budgetTokens",0,16e3),t.AnthropicForceExtendedThinking=At("chat.anthropic.thinking.forceExtendedThinking",1,!1),t.AnthropicWebSearchToolEnabled=At("chat.anthropic.tools.websearch.enabled",1,!1),t.AnthropicWebSearchMaxUses=At("chat.anthropic.tools.websearch.maxUses",0,5),t.AnthropicWebSearchAllowedDomains=At("chat.anthropic.tools.websearch.allowedDomains",0,[]),t.AnthropicWebSearchBlockedDomains=At("chat.anthropic.tools.websearch.blockedDomains",0,[]),t.AnthropicWebSearchUserLocation=At("chat.anthropic.tools.websearch.userLocation",0,null),t.CodeGenerationInstructions=At("chat.codeGeneration.instructions",0,[]),t.TestGenerationInstructions=At("chat.testGeneration.instructions",0,[]),t.CommitMessageGenerationInstructions=At("chat.commitMessageGeneration.instructions",0,[]),t.PullRequestDescriptionGenerationInstructions=At("chat.pullRequestDescriptionGeneration.instructions",0,[]),t.SetupTests=At("chat.setupTests.enabled",0,!0),t.TypeScriptLanguageContext=At("chat.languageContext.typescript.enabled",1,!0),t.TypeScriptLanguageContextMode=At("chat.languageContext.typescript.items",1,"double"),t.TypeScriptLanguageContextIncludeDocumentation=At("chat.languageContext.typescript.includeDocumentation",1,!1),t.TypeScriptLanguageContextCacheTimeout=At("chat.languageContext.typescript.cacheTimeout",1,500),t.TypeScriptLanguageContextFix=At("chat.languageContext.fix.typescript.enabled",1,!1),t.TypeScriptLanguageContextInline=At("chat.languageContext.inline.typescript.enabled",1,!1),t.UseInstructionFiles=At("chat.codeGeneration.useInstructionFiles",0,!0),t.ReviewAgent=At("chat.reviewAgent.enabled",0,!0),t.CodeFeedback=At("chat.reviewSelection.enabled",0,!0),t.CodeFeedbackInstructions=At("chat.reviewSelection.instructions",0,[]),t.UseProjectTemplates=At("chat.useProjectTemplates",0,!0),t.ExplainScopeSelection=At("chat.scopeSelection",0,!1),t.EnableCodeActions=At("editor.enableCodeActions",0,!0),t.LocaleOverride=At("chat.localeOverride",0,"auto"),t.TerminalChatLocation=At("chat.terminalChatLocation",0,"chatView"),t.AutomaticRenameSuggestions=At("renameSuggestions.triggerAutomatically",0,!0),t.TerminalToDebuggerEnabled=At("chat.copilotDebugCommand.enabled",0,!0),t.CodeSearchAgentEnabled=At("chat.codesearch.enabled",0,!1),t.ClaudeAgentEnabled=At("chat.claudeAgent.enabled",0,!0),t.ClaudeAgentAllowDangerouslySkipPermissions=At("chat.claudeAgent.allowDangerouslySkipPermissions",0,!1),t.InlineEditsEnabled=At("nextEditSuggestions.enabled",1,!0),t.InlineEditsEnableDiagnosticsProvider=At("nextEditSuggestions.fixes",1,!0),t.InlineEditsAllowWhitespaceOnlyChanges=At("nextEditSuggestions.allowWhitespaceOnlyChanges",1,!0),t.InlineEditsNextCursorPredictionEnabled=At("nextEditSuggestions.extendedRange",1,!1,void 0,{oldKey:"chat.advanced.inlineEdits.nextCursorPrediction.enabled"}),t.NewWorkspaceCreationAgentEnabled=At("chat.newWorkspaceCreation.enabled",0,!0),t.NewWorkspaceUseContext7=At("chat.newWorkspace.useContext7",0,!1),t.SummarizeAgentConversationHistory=At("chat.summarizeAgentConversationHistory.enabled",0,!0),t.ConversationTranscriptLookup=At("chat.conversationTranscriptLookup.enabled",1,!1),t.BackgroundCompaction=At("chat.backgroundCompaction",1,!1),t.VirtualToolThreshold=At("chat.virtualTools.threshold",1,lo.HARD_TOOL_LIMIT),t.CurrentEditorAgentContext=At("chat.agent.currentEditorContext.enabled",0,!0),t.AutoFixDiagnostics=At("chat.agent.autoFix",1,!1),t.NotebookFollowCellExecution=At("chat.notebook.followCellExecution.enabled",0,!1),t.UseAlternativeNESNotebookFormat=At("chat.notebook.enhancedNextEditSuggestions.enabled",1,!1),t.CustomInstructionsInSystemMessage=At("chat.customInstructionsInSystemMessage",0,!0),t.EnableAlternateGptPrompt=At("chat.alternateGptPrompt.enabled",1,!1),t.EnableAlternateGeminiModelFPrompt=At("chat.alternateGeminiModelFPrompt.enabled",1,!1),t.EnableOrganizationCustomAgents=At("chat.organizationCustomAgents.enabled",0,!0),t.EnableOrganizationInstructions=At("chat.organizationInstructions.enabled",0,!0),t.CompletionsFetcher=At("chat.completionsFetcher",1,void 0),t.NextEditSuggestionsFetcher=At("chat.nesFetcher",1,void 0),t.GitHubMcpEnabled=At("chat.githubMcpServer.enabled",1,!1),t.GitHubMcpToolsets=At("chat.githubMcpServer.toolsets",0,["default"]),t.GitHubMcpReadonly=At("chat.githubMcpServer.readonly",0,!1),t.GitHubMcpLockdown=At("chat.githubMcpServer.lockdown",0,!1),t.GetSearchResultsViewSkill=At("chat.getSearchViewResultsSkill.enabled",1,!1),t.BackgroundAgentEnabled=At("chat.backgroundAgent.enabled",0,!0),t.CloudAgentEnabled=At("chat.cloudAgent.enabled",0,!0),t.AdditionalReadAccessPaths=At("chat.additionalReadAccessPaths",0,[]),t.SwitchAgentEnabled=At("chat.switchAgent.enabled",1,!1),t.PlanAgentAdditionalTools=At("chat.planAgent.additionalTools",0,[]),t.ImplementAgentModel=At("chat.implementAgent.model",0,""),t.AskAgentAdditionalTools=At("chat.askAgent.additionalTools",0,[]),t.AskAgentModel=At("chat.askAgent.model",0,""),t.ExploreAgentModel=At("chat.exploreAgent.model",0,""),t.CopilotMemoryEnabled=At("chat.copilotMemory.enabled",1,!1),t.MemoryToolEnabled=At("chat.tools.memory.enabled",1,!0),t.ViewImageToolEnabled=At("chat.tools.viewImage.enabled",1,!0)})(her||(lo.ConfigKey=her={}));function F2s(){return Object.values(her).flatMap(t=>Object.values(t).map(e=>e.fullyQualifiedId))}a(F2s,"getAllConfigKeys");var U2s=[];function Q2s(t){return U2s.push(t),t}a(Q2s,"registerNextEditProviderId")});var L0=T(mA=>{"use strict";f();Object.defineProperty(mA,"__esModule",{value:!0});mA.LogMemory=mA.LogServiceImpl=mA.ConsoleLog=mA.LogTarget=mA.LogLevel=mA.ILogService=void 0;mA.collectErrorMessages=rjn;mA.collectSingleLineErrorMessage=H2s;var q2s=qr(),G2s=so();mA.ILogService=(0,q2s.createServiceIdentifier)("ILogService");var hA;(function(t){t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warning=4]="Warning",t[t.Error=5]="Error"})(hA||(mA.LogLevel=hA={}));var tjn;(function(t){function e(r){return{logIt:r}}a(e,"fromCallback"),t.fromCallback=e})(tjn||(mA.LogTarget=tjn={}));var mer=class{static{a(this,"ConsoleLog")}constructor(e,r=hA.Warning){this.prefix=e,this.minLogLevel=r}logIt(e,r,...n){this.prefix&&(r=`${this.prefix}${r}`),e===hA.Error?console.error(r,...n):e===hA.Warning?console.warn(r,...n):e>=this.minLogLevel&&console.log(r,...n)}};mA.ConsoleLog=mer;var ger=class extends G2s.Disposable{static{a(this,"LogServiceImpl")}constructor(e){super(),this.logger=new Aer(e)}trace(e){this.logger.trace(e)}debug(e){this.logger.debug(e)}info(e){this.logger.info(e)}warn(e){this.logger.warn(e)}error(e,r){this.logger.error(e,r)}show(e){this.logger.show(e)}createSubLogger(e){return this.logger.createSubLogger(e)}withExtraTarget(e){return this.logger.withExtraTarget(e)}};mA.LogServiceImpl=ger;var Aer=class{static{a(this,"LoggerImpl")}constructor(e){this._logTargets=e}_logIt(e,r){Int.addLog(hA[e],r),this._logTargets.forEach(n=>n.logIt(e,r))}trace(e){this._logIt(hA.Trace,e)}debug(e){this._logIt(hA.Debug,e)}info(e){this._logIt(hA.Info,e)}warn(e){this._logIt(hA.Warning,e)}error(e,r){this._logIt(hA.Error,rjn(e)+(r?`: ${r}`:""))}show(e){this._logTargets.forEach(r=>r.show?.(e))}createSubLogger(e){return new yer(this,e)}withExtraTarget(e){return new Snt(this,[e])}},yer=class t{static{a(this,"SubLogger")}constructor(e,r,n){this._parent=e;let s=(Array.isArray(r)?r:[r]).map(c=>`[${c}]`).join("");this._prefix=n?n+s:s}_prefixMessage(e){return`${this._prefix} ${e}`}trace(e){this._parent.trace(this._prefixMessage(e))}debug(e){this._parent.debug(this._prefixMessage(e))}info(e){this._parent.info(this._prefixMessage(e))}warn(e){this._parent.warn(this._prefixMessage(e))}error(e,r){let n=r?this._prefixMessage(r):this._prefix;this._parent.error(e,n)}show(e){this._parent.show(e)}createSubLogger(e){return new t(this._parent,e,this._prefix)}withExtraTarget(e){return new Snt(this,[e],this._prefix)}},Snt=class t{static{a(this,"LoggerWithExtraTargets")}constructor(e,r,n=""){this._parent=e,this._extraTargets=r,this._prefix=n}_notifyExtraTargets(e,r){let n=this._prefix?`${this._prefix} ${r}`:r;for(let o of this._extraTargets)try{o.logIt(e,n)}catch{}}trace(e){this._notifyExtraTargets(hA.Trace,e),this._parent.trace(e)}debug(e){this._notifyExtraTargets(hA.Debug,e),this._parent.debug(e)}info(e){this._notifyExtraTargets(hA.Info,e),this._parent.info(e)}warn(e){this._notifyExtraTargets(hA.Warning,e),this._parent.warn(e)}error(e,r){let n=typeof e=="string"?e:e.message||"Error",o=r?`${n}: ${r}`:n;this._notifyExtraTargets(hA.Error,o),this._parent.error(e,r)}show(e){this._parent.show(e);for(let r of this._extraTargets)try{r.show?.(e)}catch{}}createSubLogger(e){let r=Array.isArray(e)?e:[e],n=this._prefix+r.map(o=>`[${o}]`).join("");return new t(this._parent.createSubLogger(e),this._extraTargets,n)}withExtraTarget(e){return new t(this._parent,[...this._extraTargets,e],this._prefix)}};function rjn(t){let e=new Set;function r(n,o){if(!n||!["object","string"].includes(typeof n)||e.has(n))return"";e.add(n);let c=(typeof n=="string"?n:n.stack||n.message||n.code||"").toString?.()||"";return[c?`${c.split(` +`).join("")),new Ele.TextReplacement(yle.Range.fromPositions(new Ale.Position(r,n)),o)}else{let r=this.lineRange.endLineNumberExclusive-1,n=e.getTransformer().getLineLength(r)+1,o=new yle.Range(this.lineRange.startLineNumber,1,r,n),s=this.newLines.join(` +`);return new Ele.TextReplacement(o,s)}}toSingleEdit(e){let r=this.toSingleTextEdit(e),n=e.getTransformer().getOffsetRange(r.range);return new Qjn.StringReplacement(n,r.text)}toString(){return`${this.lineRange}->${JSON.stringify(this.newLines)}`}serialize(){return[this.lineRange.startLineNumber,this.lineRange.endLineNumberExclusive,this.newLines]}removeCommonSuffixPrefixLines(e){let r=this.lineRange.startLineNumber,n=this.lineRange.endLineNumberExclusive,o=0;for(;rtypeof n=="string")}a(e,"is"),t.is=e})(Ujn||(H7.SerializedLineReplacement=Ujn={}))});var xer=T(_le=>{"use strict";f();Object.defineProperty(_le,"__esModule",{value:!0});_le.ArrayMap=_le.ResponseProcessor=void 0;var Rks=Ko(),wrt=vz(),Rrt=N5(),qjn;(function(t){t.DEFAULT_DIFF_PARAMS={emitFastCursorLineChange:"off",nSignificantLinesToConverge:2,nLinesToConverge:3};function e(l){return l===!0?"additiveOnly":l===!1?"off":l}a(e,"mapEmitFastCursorLineChange"),t.mapEmitFastCursorLineChange=e;async function*r(l,u,d,p){let h=new Prt;for(let[y,E]of l.entries())h.add(E,y);let m=0,g=-1,A={k:"aligned"};for await(let y of u){if(++g,m>=l.length){switch(A.k){case"aligned":{A={k:"diverged",startLineIdx:m,newLines:[y]};break}case"diverged":A.newLines.push(y)}continue}if(A.k==="aligned"){if(l[m]===y){++m;continue}A={k:"diverged",startLineIdx:m,newLines:[]}}A.newLines.push(y);let E=c(l,d,h,A,m,p);E&&(yield E.singleLineEdit,m=E.convergenceEndIdx,A={k:"aligned"})}switch(A.k){case"diverged":{let y=new Rrt.LineRange(A.startLineIdx+1,l.length+1);yield new wrt.LineReplacement(y,A.newLines);break}case"aligned":{if(mu.length)return!1;let d=0;for(let p=0;p[N,N]);if(A.length===0){if(m.emitFastCursorLineChange==="off"||h!==u||p.newLines.length>1)return;let N=l[h],G=p.newLines[0];if(N.trim()===""&&h+10&&v[0]-p.startLineIdx===p.newLines.length-1&&(_="found_significant_matches");g>=0&&(A=A.map(([N,G])=>[N,G-1]),A=A.filter(([N,G])=>G>=0&&h<=G),A=A.filter(([N,G])=>l[G]===p.newLines[g]),A.length!==0);--g)if(++y,n(p.newLines[g])&&++E,E===m.nSignificantLinesToConverge&&(_="found_significant_matches",v=A[0]),y===m.nLinesToConverge){_="found_matches",v=A[0];break}if(!_)return;let b=v[1],I=v[0],x=I-b+1,w=b-p.startLineIdx,R=p.newLines.slice(0,p.newLines.length-x),P=R.length;if(w-P>1&&P>0)return;let k=[p.startLineIdx,b],Q=new Rrt.LineRange(k[0]+1,k[1]+1);return{singleLineEdit:new wrt.LineReplacement(Q,R),convergenceEndIdx:I+1}}a(c,"checkForConvergence")})(qjn||(_le.ResponseProcessor=qjn={}));var Prt=class{static{a(this,"ArrayMap")}constructor(){this.map=new Map}add(e,r){let n=this.map.get(e);n?n.push(r):this.map.set(e,[r])}get(e){return this.map.get(e)||[]}};_le.ArrayMap=Prt});var Hjn=T(krt=>{"use strict";f();Object.defineProperty(krt,"__esModule",{value:!0});krt.AlternativeNotebookFormat=void 0;var Gjn;(function(t){t.json="json",t.xml="xml",t.text="text"})(Gjn||(krt.AlternativeNotebookFormat=Gjn={}))});var ac=T(oo=>{"use strict";f();var Pks=oo&&oo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kks=oo&&oo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aIe=oo&&oo.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{this._setUserInfo({isInternal:!!e.copilotToken?.isInternal})}))}getConfigMixedWithDefaults(e){if(e.options?.valueIgnoredForExternals&&!this._isInternal)return this.getDefaultValue(e);let r=this.getConfig(e);return r===void 0?this.getDefaultValue(e):jjn.isObject(r)&&jjn.isObject(e.defaultValue)?{...e.defaultValue,...r}:r}getDefaultValue(e){let r=this.getDefaultValueForConfig(e),n=r==null||r===!1||r===0||r==="";return e.defaultValue===void 0&&n?e.defaultValue:r!==void 0?r:e.defaultValue}_setUserInfo(e){if(this._isInternal===e.isInternal)return;let r=this._isInternal!==e.isInternal;this._isInternal=e.isInternal;let n=new Set;for(let o of oo.globalConfigRegistry.configs.values())r&&o.options?.valueIgnoredForExternals&&n.add(o.fullyQualifiedId);n.size>0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a(o=>{for(let s of n)if(s===o||s.startsWith(o+".")||o.startsWith(s+"."))return!0;return!1},"affectsConfiguration")})}updateExperimentBasedConfiguration(e){e.length!==0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a(()=>!0,"affectsConfiguration")})}getConfigObservable(e){return this._getObservable_$show2FramesUp(e,()=>this.getConfig(e))}getExperimentBasedConfigObservable(e,r){return this._getObservable_$show2FramesUp(e,()=>this.getExperimentBasedConfig(e,r))}_getObservable_$show2FramesUp(e,r){let n=this.observables.get(e.id);return n||(n=(0,Oks.observableFromEventOpts)({debugName:a(()=>`Configuration Key "${e.id}"`,"debugName")},o=>this._register(this.onDidChangeConfiguration(s=>{s.affectsConfiguration(e.fullyQualifiedId)&&o(s)})),r),this.observables.set(e.id,n)),n}isConfigured(e,r){let n=this.inspectConfig(e,r);return n?.globalValue!==void 0||n?.globalLanguageValue!==void 0||n?.workspaceFolderValue!==void 0||n?.workspaceFolderLanguageValue!==void 0||n?.workspaceValue!==void 0||n?.workspaceLanguageValue!==void 0}getDefaultValueForConfig(e){}};oo.AbstractConfigurationService=Rer;var Drt;function Fks(){if(!Drt){Drt=new Map;let e=Bks.packageJson.contributes.configuration.map(n=>n.properties),r=Object.assign({},...e);for(let n in r)Drt.set(n,r[n].default)}return Drt}a(Fks,"getPackageJsonDefaults");function Jjn(t,e,r){let n=`${oo.CopilotConfigPrefix}.${t}`,o=r?.oldKey?`${oo.CopilotConfigPrefix}.${r.oldKey}`:void 0,s=Fks(),c=s.has(n),l=s.get(n);if(c&&!Mks.equals(e,l))throw new wer.BugIndicatingError(`The default value for setting ${t} is different in packageJson and in code`);if(c&&r?.valueIgnoredForExternals)throw new wer.BugIndicatingError(`The setting ${t} is public, it therefore cannot be restricted to internal!`);let u=n.startsWith("github.copilot.advanced.")?n.substring(24):void 0;return{id:t,oldId:r?.oldKey,isPublic:c,fullyQualifiedId:n,fullyQualifiedOldId:o,advancedSubKey:u,defaultValue:e,options:r}}a(Jjn,"toBaseConfig");var Per=class{static{a(this,"ConfigRegistry")}constructor(){this.configs=new Map}registerConfig(e){this.configs.set(e.fullyQualifiedId,e)}};oo.globalConfigRegistry=new Per;var ker=class{static{a(this,"ConfigurationMigrationRegistryImpl")}constructor(){this.migrations=[],this._onDidRegisterConfigurationMigrations=new Xjn.Emitter,this.onDidRegisterConfigurationMigration=this._onDidRegisterConfigurationMigrations.event}registerConfigurationMigrations(e){this.migrations.push(...e),this._onDidRegisterConfigurationMigrations.fire(e)}};oo.ConfigurationMigrationRegistry=new ker;function mt(t,e,r,n,o,s){if(e===1){let l={...Jjn(t,r,o),configType:1,experimentName:s?.experimentName,validator:n};if(l.advancedSubKey)throw new wer.BugIndicatingError("Shared settings cannot be experiment based");return oo.globalConfigRegistry.registerConfig(l),l}let c={...Jjn(t,r,o),configType:0,validator:n};return oo.globalConfigRegistry.registerConfig(c),c}a(mt,"defineSetting");function wt(t,e,r,n,o,s){return o={...o,valueIgnoredForExternals:!0},e===0?mt(t,e,r,n,o):mt(t,e,r,n,o,s)}a(wt,"defineTeamInternalSetting");function Zjn(t,e){oo.ConfigurationMigrationRegistry.registerConfigurationMigrations([{key:`${oo.CopilotConfigPrefix}.${e}`,migrateFn:a(async r=>[[`${oo.CopilotConfigPrefix}.${t}`,{value:r}],[`${oo.CopilotConfigPrefix}.${e}`,{value:void 0}]],"migrateFn")}])}a(Zjn,"migrateSetting");function Nh(t,e,r,n){return Zjn(e,t),mt(e,0,r,void 0,{...n,oldKey:t})}a(Nh,"defineAndMigrateSetting");function Rf(t,e,r,n,o){return Zjn(e,t),mt(e,1,r,void 0,{...n,oldKey:t},o)}a(Rf,"defineAndMigrateExpSetting");oo.HARD_TOOL_LIMIT=128;var Der;(function(t){t.GitHub="github",t.GitHubEnterprise="github-enterprise",t.Microsoft="microsoft"})(Der||(oo.AuthProviderId=Der={}));var Ner;(function(t){t.Default="default",t.Minimal="minimal"})(Ner||(oo.AuthPermissionMode=Ner={}));var sIe;(function(t){t.EntraId="entraId",t.ApiKey="apiKey"})(sIe||(oo.AzureAuthMode=sIe={}));(function(t){t.MICROSOFT_AUTH_PROVIDER="microsoft",t.COGNITIVE_SERVICES_SCOPE="https://cognitiveservices.azure.com/.default"})(sIe||(oo.AzureAuthMode=sIe={}));oo.XTabProviderId="XtabProvider";var Mer;(function(t){let e;(function(s){s.DebugOverrideProxyUrl=mt("advanced.debug.overrideProxyUrl",0,void 0),s.DebugOverrideCAPIUrl=mt("advanced.debug.overrideCapiUrl",0,void 0),s.DebugUseNodeFetchFetcher=mt("advanced.debug.useNodeFetchFetcher",0,!0),s.DebugUseNodeFetcher=mt("advanced.debug.useNodeFetcher",0,!1),s.DebugUseElectronFetcher=mt("advanced.debug.useElectronFetcher",0,!0),s.AuthProvider=mt("advanced.authProvider",0,Der.GitHub),s.AuthPermissions=mt("advanced.authPermissions",0,Ner.Default)})(e=t.Shared||(t.Shared={}));let r;(function(s){s.DebugPromptOverrideFile=mt("chat.debug.promptOverrideFile",0,null),s.WorkspacePrototypeAdoCodeSearchEndpointOverride=Nh("chat.advanced.workspace.prototypeAdoCodeSearchEndpointOverride","chat.workspace.prototypeAdoCodeSearchEndpointOverride",""),s.FeedbackOnChange=Nh("chat.advanced.feedback.onChange","chat.feedback.onChange",!1),s.ReviewIntent=Nh("chat.advanced.review.intent","chat.review.intent",!1),s.NotebookSummaryExperimentEnabled=Nh("chat.advanced.notebook.summaryExperimentEnabled","chat.notebook.summaryExperimentEnabled",!1),s.NotebookVariableFilteringEnabled=Nh("chat.advanced.notebook.variableFilteringEnabled","chat.notebook.variableFilteringEnabled",!1),s.TerminalToDebuggerPatterns=Nh("chat.advanced.debugTerminalCommandPatterns","chat.debugTerminalCommandPatterns",[]),s.WorkspaceRecordingEnabled=Nh("chat.advanced.localWorkspaceRecording.enabled","chat.localWorkspaceRecording.enabled",!1),s.EditRecordingEnabled=Nh("chat.advanced.editRecording.enabled","chat.editRecording.enabled",!1),s.CodeSearchAgentEnabled=Nh("chat.advanced.codesearch.agent.enabled","chat.codesearch.agent.enabled",!0),s.AgentTemperature=Nh("chat.advanced.agent.temperature","chat.agent.temperature",void 0),s.EnableUserPreferences=Nh("chat.advanced.enableUserPreferences","chat.enableUserPreferences",!1),s.SummarizeAgentConversationHistoryThreshold=Nh("chat.advanced.summarizeAgentConversationHistoryThreshold","chat.summarizeAgentConversationHistoryThreshold",void 0),s.AgentHistorySummarizationMode=Nh("chat.advanced.agentHistorySummarizationMode","chat.agentHistorySummarizationMode",void 0),s.UseResponsesApiTruncation=Nh("chat.advanced.useResponsesApiTruncation","chat.useResponsesApiTruncation",!1),s.OmitBaseAgentInstructions=Nh("chat.advanced.omitBaseAgentInstructions","chat.omitBaseAgentInstructions",!1),s.CLIPlanExitModeEnabled=mt("chat.cli.planExitMode.enabled",0,!1),s.CLIForkSessionsEnabled=mt("chat.cli.forkSessions.enabled",0,!1),s.CLIMCPServerEnabled=Nh("chat.advanced.cli.mcp.enabled","chat.cli.mcp.enabled",!0),s.CLIBranchSupport=mt("chat.cli.branchSupport.enabled",0,!1),s.CLIIsolationOption=mt("chat.cli.isolationOption.enabled",0,!0),s.CLIAutoCommitEnabled=mt("chat.cli.autoCommit.enabled",0,!0),s.CLISessionController=mt("chat.cli.sessionController.enabled",0,!1),s.CLITerminalLinks=mt("chat.cli.terminalLinks.enabled",0,!0),s.RequestLoggerMaxEntries=Nh("chat.advanced.debug.requestLogger.maxEntries","chat.debug.requestLogger.maxEntries",100),s.ProjectLabelsExpanded=Rf("chat.advanced.projectLabels.expanded","chat.projectLabels.expanded",!1),s.ProjectLabelsChat=Rf("chat.advanced.projectLabels.chat","chat.projectLabels.chat",!1),s.ProjectLabelsInline=Rf("chat.advanced.projectLabels.inline","chat.projectLabels.inline",!1),s.WorkspaceMaxLocalIndexSize=Rf("chat.advanced.workspace.maxLocalIndexSize","chat.workspace.maxLocalIndexSize",1e5),s.WorkspaceEnableCodeSearch=Rf("chat.advanced.workspace.enableCodeSearch","chat.workspace.enableCodeSearch",!0),s.WorkspaceMaxDiffSizeBeforeUsingExternalIngest=Rf("chat.advanced.workspace.maxDiffSizeBeforeUsingExternalIngest","chat.workspace.maxDiffSizeBeforeUsingExternalIngest",100),s.WorkspacePreferredEmbeddingsModel=Rf("chat.advanced.workspace.preferredEmbeddingsModel","chat.workspace.preferredEmbeddingsModel",""),s.NotebookAlternativeDocumentFormat=Rf("chat.advanced.notebook.alternativeFormat","chat.notebook.alternativeFormat",Lks.AlternativeNotebookFormat.xml),s.UseAlternativeNESNotebookFormat=Rf("chat.advanced.notebook.alternativeNESFormat.enabled","chat.notebook.alternativeNESFormat.enabled",!1),s.InlineChatSelectionRatioThreshold=mt("chat.inlineChat.selectionRatioThreshold",1,0),s.InstantApplyShortModelName=Rf("chat.advanced.instantApply.shortContextModelName","chat.instantApply.shortContextModelName","gpt-4o-instant-apply-full-ft-v66-short"),s.InstantApplyShortContextLimit=Rf("chat.advanced.instantApply.shortContextLimit","chat.instantApply.shortContextLimit",8e3),s.AgentHistorySummarizationWithPromptCache=Rf("chat.advanced.agentHistorySummarizationWithPromptCache","chat.agentHistorySummarizationWithPromptCache",!1),s.PromptFileContext=Rf("chat.advanced.promptFileContextProvider.enabled","chat.promptFileContextProvider.enabled",!0),s.DefaultToolsGrouped=Rf("chat.advanced.tools.defaultToolsGrouped","chat.tools.defaultToolsGrouped",!1),s.Gpt5AlternativePatch=Rf("chat.advanced.gpt5AlternativePatch","chat.gpt5AlternativePatch",!1),s.SearchSubagentToolEnabled=mt("chat.searchSubagent.enabled",1,!1),s.SearchSubagentUseAgenticProxy=mt("chat.searchSubagent.useAgenticProxy",1,!1),s.SearchSubagentModel=mt("chat.searchSubagent.model",1,""),s.SearchSubagentToolCallLimit=mt("chat.searchSubagent.toolCallLimit",1,4),s.ExecutionSubagentToolEnabled=mt("chat.executionSubagent.enabled",1,!1),s.ExecutionSubagentModel=mt("chat.executionSubagent.model",0,""),s.ExecutionSubagentToolCallLimit=mt("chat.executionSubagent.toolCallLimit",1,5),s.InlineEditsTriggerOnEditorChangeAfterSeconds=Rf("chat.advanced.inlineEdits.triggerOnEditorChangeAfterSeconds","chat.inlineEdits.triggerOnEditorChangeAfterSeconds",void 0),s.InlineEditsNextCursorPredictionDisplayLine=Rf("chat.advanced.inlineEdits.nextCursorPrediction.displayLine","chat.inlineEdits.nextCursorPrediction.displayLine",!0),s.InlineEditsNextCursorPredictionCurrentFileMaxTokens=Rf("chat.advanced.inlineEdits.nextCursorPrediction.currentFileMaxTokens","chat.inlineEdits.nextCursorPrediction.currentFileMaxTokens",3e3),s.InlineEditsRenameSymbolSuggestions=mt("chat.inlineEdits.renameSymbolSuggestions",1,!0),s.InlineEditsPreferredModel=mt("nextEditSuggestions.preferredModel",1,"none"),s.InlineEditsAggressiveness=mt("nextEditSuggestions.eagerness",1,od.AggressivenessSetting.Default,od.AggressivenessSetting.VALIDATOR),s.DiagnosticsContextProvider=Rf("chat.advanced.inlineEdits.diagnosticsContextProvider.enabled","chat.inlineEdits.diagnosticsContextProvider.enabled",!1),s.ChatSessionContextProvider=mt("chat.inlineEdits.chatSessionContextProvider.enabled",1,!1),s.Gemini3MultiReplaceString=mt("chat.edits.gemini3MultiReplaceString",1,!1),s.AgentOmitFileAttachmentContents=mt("chat.agent.omitFileAttachmentContents",1,!1),s.InstallExtensionSkillEnabled=mt("chat.installExtensionSkill.enabled",1,!1),s.ProjectSetupInfoSkillEnabled=mt("chat.projectSetupInfoSkill.enabled",1,!1),s.LargeToolResultsToDiskEnabled=mt("chat.agent.largeToolResultsToDisk.enabled",1,!0),s.LargeToolResultsToDiskThreshold=mt("chat.agent.largeToolResultsToDisk.thresholdBytes",1,8*1024),s.DebugGitHubAuthFailWith=mt("chat.debug.githubAuthFailWith",0,null),s.AgentDebugLogEnabled=Rf("agentDebugLog.enabled","chat.agentDebugLog.enabled",!1),s.ChatDebugFileLogging=Rf("chat.chatDebug.fileLogging.enabled","chat.agentDebugLog.fileLogging.enabled",!1),s.ChatDebugFileLoggingFlushInterval=Nh("chat.chatDebug.fileLogging.flushIntervalMs","chat.agentDebugLog.fileLogging.flushIntervalMs",4e3),s.OTelEnabled=mt("chat.otel.enabled",0,!1),s.OTelExporterType=mt("chat.otel.exporterType",0,"otlp-http"),s.OTelOtlpEndpoint=mt("chat.otel.otlpEndpoint",0,"http://localhost:4318"),s.OTelCaptureContent=mt("chat.otel.captureContent",0,!1),s.OTelOutfile=mt("chat.otel.outfile",0,""),s.OTelDbSpanExporter=mt("chat.otel.dbSpanExporter.enabled",0,!1)})(r=t.Advanced||(t.Advanced={}));let n;(function(s){s.DebugOverrideChatMaxTokenNum=wt("chat.advanced.debug.overrideChatMaxTokenNum",0,0),s.DebugReportFeedback=wt("chat.advanced.debug.reportFeedback",0,!1),s.DisableRepoInfoTelemetry=wt("chat.advanced.debug.disableRepoInfoTelemetry",0,!1),s.InlineEditsIgnoreCompletionsDisablement=wt("chat.advanced.inlineEdits.ignoreCompletionsDisablement",0,!1,(0,oA.vBoolean)()),s.InlineEditsModelPickerEnabled=wt("chat.advanced.inlineEdits.modelPicker.enabled",1,!1,(0,oA.vBoolean)()),s.InlineEditsUseSlashModels=wt("chat.advanced.inlineEdits.useSlashModels",1,!0),s.InlineEditsLogContextRecorderEnabled=wt("chat.advanced.inlineEdits.logContextRecorder.enabled",0,!1),s.InlineEditsHideInternalInterface=wt("chat.advanced.inlineEdits.hideInternalInterface",0,!1,(0,oA.vBoolean)()),s.InlineEditsLogCancelledRequests=wt("chat.advanced.inlineEdits.logCancelledRequests",0,!1,(0,oA.vBoolean)()),s.InlineEditsNextCursorPredictionUrl=wt("chat.advanced.inlineEdits.nextCursorPrediction.url",0,void 0,(0,oA.vString)()),s.InlineEditsNextCursorPredictionApiKey=wt("chat.advanced.inlineEdits.nextCursorPrediction.apiKey",0,void 0,(0,oA.vString)()),s.InlineEditsXtabProviderUrl=wt("chat.advanced.inlineEdits.xtabProvider.url",0,void 0,(0,oA.vString)()),s.InlineEditsXtabProviderApiKey=wt("chat.advanced.inlineEdits.xtabProvider.apiKey",0,void 0,(0,oA.vString)()),s.InlineEditsXtabProviderModelConfiguration=wt("chat.advanced.inlineEdits.xtabProvider.modelConfiguration",0,void 0,od.MODEL_CONFIGURATION_VALIDATOR),s.InlineEditsNextCursorPredictionLintOptions=wt("chat.advanced.inlineEdits.nextCursorPrediction.lintOptions",0,void 0,od.LINT_OPTIONS_VALIDATOR),s.InlineEditsInlineCompletionsEnabled=wt("chat.advanced.inlineEdits.inlineCompletions.enabled",0,!0,(0,oA.vBoolean)()),s.InlineEditsInlineCompletionsAdvanced=wt("chat.advanced.inlineEdits.inlineCompletions.advancedDetection",1,!0,(0,oA.vBoolean)()),s.InlineEditsXtabProviderUsePrediction=wt("chat.advanced.inlineEdits.xtabProvider.usePrediction",1,!0,(0,oA.vBoolean)()),s.InlineEditsXtabLanguageContextEnabledLanguages=wt("chat.advanced.inlineEdits.xtabProvider.languageContext.enabledLanguages",0,bz.LANGUAGE_CONTEXT_ENABLED_LANGUAGES),s.InlineEditsXtabLanguageContextTraitsPosition=wt("chat.advanced.inlineEdits.xtabProvider.languageContext.traitsPosition",1,"before"),s.InlineEditsDiagnosticsExplorationEnabled=wt("chat.advanced.inlineEdits.inlineEditsDiagnosticsExplorationEnabled",0,!1),s.GhostTextUseCompletionsFetchService=wt("chat.advanced.ghostText.useCompletionsFetchService",1,!1),s.InternalWelcomeHintEnabled=wt("chat.advanced.welcomePageHint.enabled",0,!1),s.InlineChatUseCodeMapper=wt("chat.advanced.inlineChat.useCodeMapper",0,!1),s.EnablePromptRendererTracing=wt("chat.advanced.promptRenderer.trace",0,!1),s.DebugCollectFetcherTelemetry=wt("chat.advanced.debug.collectFetcherTelemetry",1,!0),s.DebugShowNetworkStatus=wt("chat.advanced.debug.showNetworkStatus",1,!1),s.GeminiFunctionCallingMode=wt("chat.advanced.gemini.functionCallingMode",1,"validated"),s.ModelProviderPreference=wt("chat.advanced.modelProviderPreference",0,void 0,(0,oA.vString)()),s.UseVSCodeTelemetryLibForGH=wt("chat.advanced.telemetry.useVSCodeTelemetryLibForGH",1,!1),s.DebugExpUseNodeFetchFetcher=wt("chat.advanced.debug.useNodeFetchFetcher",1,void 0),s.DebugExpUseNodeFetcher=wt("chat.advanced.debug.useNodeFetcher",1,void 0),s.DebugExpUseElectronFetcher=wt("chat.advanced.debug.useElectronFetcher",1,void 0),s.InlineEditsAsyncCompletions=wt("chat.advanced.inlineEdits.asyncCompletions",1,!0),s.InlineEditsEagerBackupRequest=wt("chat.advanced.inlineEdits.eagerBackupRequest",1,!1),s.InlineEditsDebounceUseCoreRequestTime=wt("chat.advanced.inlineEdits.debounceUseCoreRequestTime",1,!1),s.InlineEditsYieldToCopilot=wt("chat.advanced.inlineEdits.yieldToCopilot",1,!1),s.InlineEditsExcludedProviders=wt("chat.advanced.inlineEdits.excludedProviders",1,void 0),s.InlineEditsEnableGhCompletionsProvider=wt("chat.advanced.inlineEdits.githubCompletionsProvider.enabled",1,!1),s.InlineEditsCompletionsUrl=wt("chat.advanced.inlineEdits.completionsProvider.url",1,void 0),s.InlineEditsDebounce=wt("chat.advanced.inlineEdits.debounce",1,100),s.InlineEditsCacheDelay=wt("chat.advanced.inlineEdits.cacheDelay",1,200),s.InlineEditsSubsequentCacheDelay=wt("chat.advanced.inlineEdits.subsequentCacheDelay",1,0),s.InlineEditsSpeculativeRequestDelay=wt("chat.advanced.inlineEdits.speculativeRequestDelay",1,0),s.InlineEditsRebasedCacheDelay=wt("chat.advanced.inlineEdits.rebasedCacheDelay",1,0),s.InlineEditsAbsorbSubsequenceTyping=wt("chat.advanced.inlineEdits.absorbSubsequenceTyping",1,!1),s.InlineEditsBackoffDebounceEnabled=wt("chat.advanced.inlineEdits.backoffDebounceEnabled",1,!0),s.InlineEditsExtraDebounceEndOfLine=wt("chat.advanced.inlineEdits.extraDebounceEndOfLine",1,2e3),s.InlineEditsSpeculativeRequests=wt("chat.advanced.inlineEdits.speculativeRequests",1,bz.SpeculativeRequestsEnablement.Off,bz.SpeculativeRequestsEnablement.VALIDATOR),s.InlineEditsSpeculativeRequestsCursorPlacement=wt("chat.advanced.inlineEdits.speculativeRequestsCursorPlacement",1,bz.SpeculativeRequestsCursorPlacement.AfterEditApplied,bz.SpeculativeRequestsCursorPlacement.VALIDATOR),s.InlineEditsSpeculativeRequestsAutoExpandEditWindowLines=wt("chat.advanced.inlineEdits.speculativeRequestsAutoExpandEditWindowLines",1,bz.SpeculativeRequestsAutoExpandEditWindowLines.Off,bz.SpeculativeRequestsAutoExpandEditWindowLines.VALIDATOR),s.InlineEditsExtraDebounceInlineSuggestion=wt("chat.advanced.inlineEdits.extraDebounceInlineSuggestion",1,0),s.InlineEditsDebounceOnSelectionChange=wt("chat.advanced.inlineEdits.debounceOnSelectionChange",1,void 0),s.InlineEditsTriggerOnEditorChangeStrategy=wt("chat.advanced.inlineEdits.triggerOnEditorChangeStrategy",1,zjn.DocumentSwitchTriggerStrategy.Always,zjn.DocumentSwitchTriggerStrategy.VALIDATOR),s.InlineEditsProviderId=wt("chat.advanced.inlineEdits.providerId",1,void 0),s.InlineEditsUnification=wt("chat.advanced.inlineEdits.unification",1,!1),s.InlineEditsNextCursorPredictionModelName=wt("chat.advanced.inlineEdits.nextCursorPrediction.modelName",1,"copilot-suggestions-himalia-001"),s.InlineEditsNextCursorPredictionUseEndpointProvider=wt("chat.advanced.inlineEdits.nextCursorPrediction.useEndpointProvider",0,!1,(0,oA.vBoolean)()),s.InlineEditsNextCursorPredictionMaxResponseTokens=wt("chat.advanced.inlineEdits.nextCursorPrediction.maxResponseTokens",1,40),s.InlineEditsNextCursorPredictionLintOptionsString=wt("chat.advanced.inlineEdits.nextCursorPrediction.lintOptionsString",1,void 0),s.InlineEditsXtabProviderModelConfigurationString=wt("chat.advanced.inlineEdits.xtabProvider.modelConfigurationString",1,void 0),s.InlineEditsXtabProviderDefaultModelConfigurationString=wt("chat.advanced.inlineEdits.xtabProvider.defaultModelConfigurationString",1,void 0),s.InlineEditsXtabProviderUseVaryingLinesAbove=wt("chat.advanced.inlineEdits.xtabProvider.useVaryingLinesAbove",1,void 0),s.InlineEditsXtabProviderNLinesAbove=wt("chat.advanced.inlineEdits.xtabProvider.nLinesAbove",1,void 0),s.InlineEditsXtabProviderNLinesBelow=wt("chat.advanced.inlineEdits.xtabProvider.nLinesBelow",1,void 0),s.InlineEditsAutoExpandEditWindowLines=wt("chat.advanced.inlineEdits.autoExpandEditWindowLines",1,10),s.InlineEditsXtabNRecentlyViewedDocuments=wt("chat.advanced.inlineEdits.xtabProvider.nRecentlyViewedDocuments",1,od.DEFAULT_OPTIONS.recentlyViewedDocuments.nDocuments),s.InlineEditsXtabRecentlyViewedDocumentsMaxTokens=wt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.maxTokens",1,od.DEFAULT_OPTIONS.recentlyViewedDocuments.maxTokens),s.InlineEditsXtabRecentlyViewedIncludeLineNumbers=wt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.includeLineNumbers",1,od.DEFAULT_OPTIONS.recentlyViewedDocuments.includeLineNumbers),s.InlineEditsNextCursorPredictionRecentSnippetsIncludeLineNumbers=wt("chat.advanced.inlineEdits.nextCursorPrediction.recentSnippets.includeLineNumbers",1,od.IncludeLineNumbersOption.None),s.InlineEditsNextCursorPredictionCursorPlacement=wt("chat.advanced.inlineEdits.nextCursorPrediction.cursorPlacement",1,Wjn.NextCursorLinePredictionCursorPlacement.AfterLine,Wjn.NextCursorLinePredictionCursorPlacement.VALIDATOR),s.InlineEditsXtabDiffNEntries=wt("chat.advanced.inlineEdits.xtabProvider.diffNEntries",1,od.DEFAULT_OPTIONS.diffHistory.nEntries),s.InlineEditsXtabDiffMaxTokens=wt("chat.advanced.inlineEdits.xtabProvider.diffMaxTokens",1,od.DEFAULT_OPTIONS.diffHistory.maxTokens),s.InlineEditsXtabDiffMergeStrategy=wt("chat.advanced.inlineEdits.xtabProvider.diffMergeStrategy",1,Yjn.DiffHistoryMergeStrategy.SameStartLine,Yjn.DiffHistoryMergeStrategy.VALIDATOR),s.InlineEditsXtabDiffMergeLineGap=wt("chat.advanced.inlineEdits.xtabProvider.diffMergeLineGap",1,0,(0,oA.vNumber)()),s.InlineEditsXtabDiffMergeSplitAfterMs=wt("chat.advanced.inlineEdits.xtabProvider.diffMergeSplitAfterMs",1,100,(0,oA.vNumber)()),s.InlineEditsXtabProviderEmitFastCursorLineChange=wt("chat.advanced.inlineEdits.xtabProvider.emitFastCursorLineChange",1,"additiveOnly"),s.InlineEditsXtabIncludeViewedFiles=wt("chat.advanced.inlineEdits.xtabProvider.includeViewedFiles",1,od.DEFAULT_OPTIONS.recentlyViewedDocuments.includeViewedFiles),s.InlineEditsXtabRecentlyViewedClippingStrategy=wt("chat.advanced.inlineEdits.xtabProvider.recentlyViewedDocuments.clippingStrategy",1,od.DEFAULT_OPTIONS.recentlyViewedDocuments.clippingStrategy,od.RecentFileClippingStrategy.VALIDATOR),s.InlineEditsXtabPageSize=wt("chat.advanced.inlineEdits.xtabProvider.pageSize",1,od.DEFAULT_OPTIONS.pagedClipping.pageSize),s.InlineEditsXtabEditWindowMaxTokens=wt("chat.advanced.inlineEdits.xtabProvider.editWindowMaxTokens",1,2e3),s.InlineEditsXtabIncludeTagsInCurrentFile=wt("chat.advanced.inlineEdits.xtabProvider.includeTagsInCurrentFile",1,od.DEFAULT_OPTIONS.currentFile.includeTags),s.InlineEditsXtabIncludeLineNumbersInCurrentFile=wt("chat.advanced.inlineEdits.xtabProvider.includeLineNumbersInCurrentFile",1,od.DEFAULT_OPTIONS.currentFile.includeLineNumbers),s.InlineEditsXtabIncludeCursorTagInCurrentFile=wt("chat.advanced.inlineEdits.xtabProvider.includeCursorTagInCurrentFile",1,od.DEFAULT_OPTIONS.currentFile.includeCursorTag),s.InlineEditsXtabCurrentFileMaxTokens=wt("chat.advanced.inlineEdits.xtabProvider.currentFileMaxTokens",1,od.DEFAULT_OPTIONS.currentFile.maxTokens),s.InlineEditsXtabPrioritizeAboveCursor=wt("chat.advanced.inlineEdits.xtabProvider.currentFile.prioritizeAboveCursor",1,od.DEFAULT_OPTIONS.currentFile.prioritizeAboveCursor),s.InlineEditsXtabDiffOnlyForDocsInPrompt=wt("chat.advanced.inlineEdits.xtabProvider.diffOnlyForDocsInPrompt",1,od.DEFAULT_OPTIONS.diffHistory.onlyForDocsInPrompt),s.InlineEditsXtabDiffUseRelativePaths=wt("chat.advanced.inlineEdits.xtabProvider.diffUseRelativePaths",1,od.DEFAULT_OPTIONS.diffHistory.useRelativePaths),s.InlineEditsXtabNNonSignificantLinesToConverge=wt("chat.advanced.inlineEdits.xtabProvider.nNonSignificantLinesToConverge",1,Kjn.ResponseProcessor.DEFAULT_DIFF_PARAMS.nLinesToConverge),s.InlineEditsXtabNSignificantLinesToConverge=wt("chat.advanced.inlineEdits.xtabProvider.nSignificantLinesToConverge",1,Kjn.ResponseProcessor.DEFAULT_DIFF_PARAMS.nSignificantLinesToConverge),s.InlineEditsXtabLanguageContextEnabled=wt("chat.advanced.inlineEdits.xtabProvider.languageContext.enabled",1,od.DEFAULT_OPTIONS.languageContext.enabled),s.InlineEditsXtabLanguageContextMaxTokens=wt("chat.advanced.inlineEdits.xtabProvider.languageContext.maxTokens",1,od.DEFAULT_OPTIONS.languageContext.maxTokens),s.InlineEditsXtabMaxMergeConflictLines=wt("chat.advanced.inlineEdits.xtabProvider.maxMergeConflictLines",1,void 0),s.InlineEditsXtabOnlyMergeConflictLines=wt("chat.advanced.inlineEdits.xtabProvider.onlyMergeConflictLines",1,!1),s.InlineEditsXtabAggressivenessLevel=wt("chat.advanced.inlineEdits.xtabProvider.aggressivenessLevel",1,void 0),s.InlineEditsAggressivenessLowMinResponseTimeMs=wt("chat.advanced.inlineEdits.aggressiveness.lowMinResponseTimeMs",1,1500),s.InlineEditsAggressivenessMediumMinResponseTimeMs=wt("chat.advanced.inlineEdits.aggressiveness.mediumMinResponseTimeMs",1,700),s.InlineEditsAggressivenessHighDebounceMs=wt("chat.advanced.inlineEdits.aggressiveness.highDebounceMs",1,0),s.InlineEditsUserHappinessScoreConfigurationString=wt("chat.advanced.inlineEdits.adaptiveAggressivenessConfigurationString",1,void 0),s.InlineEditsUndoInsertionFiltering=wt("chat.advanced.inlineEdits.undoInsertionFiltering",1,"v1"),s.InlineEditsFilterOutEditsWithSubstrings=wt("chat.advanced.inlineEdits.filterOutEditsWithSubstrings",1,"<|current_file_content|>,<|/current_file_content|>,<|diff_marker|>"),s.InlineEditsAllowImportChanges=wt("chat.advanced.inlineEdits.allowImportChanges",1,$jn.ImportChanges.None,$jn.ImportChanges.VALIDATOR),s.InlineEditsIgnoreWhenSuggestVisible=wt("chat.advanced.inlineEdits.ignoreWhenSuggestVisible",1,!0),s.InlineEditsJointCompletionsProviderEnabled=wt("chat.advanced.inlineEdits.jointCompletionsProvider.enabled",1,!1),s.InlineEditsJointCompletionsProviderStrategy=wt("chat.advanced.inlineEdits.jointCompletionsProvider.strategy",1,Vjn.JointCompletionsProviderStrategy.Regular),s.InlineEditsJointCompletionsProviderTriggerChangeStrategy=wt("chat.advanced.inlineEdits.jointCompletionsProvider.triggerChangeStrategy",1,Vjn.JointCompletionsProviderTriggerChangeStrategy.NoTriggerOnCompletionsRequestInFlight),s.InstantApplyModelName=wt("chat.advanced.instantApply.modelName",1,"gpt-4o-instant-apply-full-ft-v66"),s.VerifyTextDocumentChanges=wt("chat.advanced.inlineEdits.verifyTextDocumentChanges",1,!1),s.UseAutoModeRouting=wt("chat.advanced.useAutoModeRouter",1,!1),s.InlineCompletionsDefaultDiagnosticsOptions=wt("chat.advanced.inlineCompletions.defaultDiagnosticsOptionsString",1,void 0),s.RecordExpectedEditEnabled=wt("chat.advanced.inlineEdits.recordExpectedEdit.enabled",0,!1),s.RecordExpectedEditOnReject=wt("chat.advanced.inlineEdits.recordExpectedEdit.onReject",0,!1),s.ReadFileCodeFences=wt("chat.advanced.readFileCodeFences",1,!1),s.EnableReadFileV2=mt("chat.advanced.enableReadFileV2",1,!1),s.AskAgent=mt("chat.advanced.enableAskAgent",1,!1),s.RetryNetworkErrors=mt("chat.advanced.enableRetryNetworkErrors",1,!0),s.RetryServerErrorStatusCodes=mt("chat.advanced.retryServerErrorStatusCodes",1,"500,502"),s.FallbackNodeFetchOnNetworkProcessCrash=mt("chat.advanced.enableFallbackNodeFetchOnNetworkProcessCrash",1,!0),s.WorkspaceEnableCodeSearchExternalIngest=wt("chat.advanced.workspace.codeSearchExternalIngest.enabled",1,!1),s.ChatRequestPowerSaveBlocker=wt("chat.advanced.chatRequestPowerSaveBlocker",1,!0),s.ResponsesApiWebSocketEnabled=wt("chat.advanced.responsesApi.webSocket.enabled",1,!1),s.DebugSimulateWebSocketResponse=wt("chat.advanced.debug.simulateWebSocketResponse",0,"")})(n=t.TeamInternal||(t.TeamInternal={}));let o;(function(s){s.PlanAgentModel=mt("chat.planAgent.model",0,""),s.OllamaEndpoint=mt("chat.byok.ollamaEndpoint",0,"http://localhost:11434"),s.AzureModels=mt("chat.azureModels",0,{}),s.CustomOAIModels=mt("chat.customOAIModels",0,{}),s.AzureAuthType=mt("chat.azureAuthType",0,sIe.EntraId)})(o=t.Deprecated||(t.Deprecated={})),t.Enable=mt("enable",0,{"*":!0,plaintext:!1,markdown:!1,scminput:!1}),t.selectedCompletionsModel=mt("selectedCompletionModel",0,""),t.RateLimitAutoSwitchToAuto=mt("chat.rateLimitAutoSwitchToAuto",0,!1,(0,oA.vBoolean)()),t.UseAnthropicMessagesApi=mt("chat.anthropic.useMessagesApi",1,!0),t.AnthropicContextEditingMode=mt("chat.anthropic.contextEditing.mode",1,"off"),t.AnthropicToolSearchEnabled=mt("chat.anthropic.toolSearchTool.enabled",0,!0),t.AnthropicToolSearchMode=mt("chat.anthropic.toolSearchTool.mode",1,"server"),t.AnthropicPromptOptimization=mt("chat.anthropic.promptOptimization",1,"control"),t.ResponsesApiReasoningSummary=mt("chat.responsesApiReasoningSummary",1,"detailed"),t.ResponsesApiContextManagementEnabled=mt("chat.responsesApiContextManagement.enabled",1,!1),t.ResponsesApiPromptCacheKeyEnabled=mt("chat.responsesApi.promptCacheKey.enabled",1,!1),t.Updated53CodexPromptEnabled=mt("chat.updated53CodexPrompt.enabled",1,!0),t.EnableGpt54ConcisePromptExp=mt("chat.gpt54ConcisePrompt.enabled",1,!1),t.EnableGpt54LargePromptExp=mt("chat.gpt54LargePrompt.enabled",1,!1),t.EnableChatImageUpload=mt("chat.imageUpload.enabled",1,!0),t.AnthropicThinkingBudget=mt("chat.anthropic.thinking.budgetTokens",0,16e3),t.AnthropicForceExtendedThinking=mt("chat.anthropic.thinking.forceExtendedThinking",1,!1),t.AnthropicWebSearchToolEnabled=mt("chat.anthropic.tools.websearch.enabled",1,!1),t.AnthropicWebSearchMaxUses=mt("chat.anthropic.tools.websearch.maxUses",0,5),t.AnthropicWebSearchAllowedDomains=mt("chat.anthropic.tools.websearch.allowedDomains",0,[]),t.AnthropicWebSearchBlockedDomains=mt("chat.anthropic.tools.websearch.blockedDomains",0,[]),t.AnthropicWebSearchUserLocation=mt("chat.anthropic.tools.websearch.userLocation",0,null),t.CodeGenerationInstructions=mt("chat.codeGeneration.instructions",0,[]),t.TestGenerationInstructions=mt("chat.testGeneration.instructions",0,[]),t.CommitMessageGenerationInstructions=mt("chat.commitMessageGeneration.instructions",0,[]),t.PullRequestDescriptionGenerationInstructions=mt("chat.pullRequestDescriptionGeneration.instructions",0,[]),t.SetupTests=mt("chat.setupTests.enabled",0,!0),t.TypeScriptLanguageContext=mt("chat.languageContext.typescript.enabled",1,!0),t.TypeScriptLanguageContextMode=mt("chat.languageContext.typescript.items",1,"double"),t.TypeScriptLanguageContextIncludeDocumentation=mt("chat.languageContext.typescript.includeDocumentation",1,!1),t.TypeScriptLanguageContextCacheTimeout=mt("chat.languageContext.typescript.cacheTimeout",1,500),t.TypeScriptLanguageContextFix=mt("chat.languageContext.fix.typescript.enabled",1,!1),t.TypeScriptLanguageContextInline=mt("chat.languageContext.inline.typescript.enabled",1,!1),t.UseInstructionFiles=mt("chat.codeGeneration.useInstructionFiles",0,!0),t.ReviewAgent=mt("chat.reviewAgent.enabled",0,!0),t.CodeFeedback=mt("chat.reviewSelection.enabled",0,!0),t.CodeFeedbackInstructions=mt("chat.reviewSelection.instructions",0,[]),t.UseProjectTemplates=mt("chat.useProjectTemplates",0,!0),t.ExplainScopeSelection=mt("chat.scopeSelection",0,!1),t.EnableCodeActions=mt("editor.enableCodeActions",0,!0),t.LocaleOverride=mt("chat.localeOverride",0,"auto"),t.TerminalChatLocation=mt("chat.terminalChatLocation",0,"chatView"),t.AutomaticRenameSuggestions=mt("renameSuggestions.triggerAutomatically",0,!0),t.TerminalToDebuggerEnabled=mt("chat.copilotDebugCommand.enabled",0,!0),t.CodeSearchAgentEnabled=mt("chat.codesearch.enabled",0,!1),t.ClaudeAgentEnabled=mt("chat.claudeAgent.enabled",0,!0),t.ClaudeAgentAllowDangerouslySkipPermissions=mt("chat.claudeAgent.allowDangerouslySkipPermissions",0,!1),t.InlineEditsEnabled=mt("nextEditSuggestions.enabled",1,!0),t.InlineEditsEnableDiagnosticsProvider=mt("nextEditSuggestions.fixes",1,!0),t.InlineEditsAllowWhitespaceOnlyChanges=mt("nextEditSuggestions.allowWhitespaceOnlyChanges",1,!0),t.InlineEditsNextCursorPredictionEnabled=mt("nextEditSuggestions.extendedRange",1,!1,void 0,{oldKey:"chat.advanced.inlineEdits.nextCursorPrediction.enabled"}),t.NewWorkspaceCreationAgentEnabled=mt("chat.newWorkspaceCreation.enabled",0,!0),t.NewWorkspaceUseContext7=mt("chat.newWorkspace.useContext7",0,!1),t.SummarizeAgentConversationHistory=mt("chat.summarizeAgentConversationHistory.enabled",0,!0),t.ConversationTranscriptLookup=mt("chat.conversationTranscriptLookup.enabled",1,!1),t.BackgroundCompaction=mt("chat.backgroundCompaction",1,!1),t.VirtualToolThreshold=mt("chat.virtualTools.threshold",1,oo.HARD_TOOL_LIMIT),t.CurrentEditorAgentContext=mt("chat.agent.currentEditorContext.enabled",0,!0),t.AutoFixDiagnostics=mt("chat.agent.autoFix",1,!1),t.NotebookFollowCellExecution=mt("chat.notebook.followCellExecution.enabled",0,!1),t.UseAlternativeNESNotebookFormat=mt("chat.notebook.enhancedNextEditSuggestions.enabled",1,!1),t.CustomInstructionsInSystemMessage=mt("chat.customInstructionsInSystemMessage",0,!0),t.EnableAlternateGptPrompt=mt("chat.alternateGptPrompt.enabled",1,!1),t.EnableAlternateGeminiModelFPrompt=mt("chat.alternateGeminiModelFPrompt.enabled",1,!1),t.EnableOrganizationCustomAgents=mt("chat.organizationCustomAgents.enabled",0,!0),t.EnableOrganizationInstructions=mt("chat.organizationInstructions.enabled",0,!0),t.CompletionsFetcher=mt("chat.completionsFetcher",1,void 0),t.NextEditSuggestionsFetcher=mt("chat.nesFetcher",1,void 0),t.GitHubMcpEnabled=mt("chat.githubMcpServer.enabled",1,!1),t.GitHubMcpToolsets=mt("chat.githubMcpServer.toolsets",0,["default"]),t.GitHubMcpReadonly=mt("chat.githubMcpServer.readonly",0,!1),t.GitHubMcpLockdown=mt("chat.githubMcpServer.lockdown",0,!1),t.GetSearchResultsViewSkill=mt("chat.getSearchViewResultsSkill.enabled",1,!1),t.BackgroundAgentEnabled=mt("chat.backgroundAgent.enabled",0,!0),t.CloudAgentEnabled=mt("chat.cloudAgent.enabled",0,!0),t.AdditionalReadAccessPaths=mt("chat.additionalReadAccessPaths",0,[]),t.SwitchAgentEnabled=mt("chat.switchAgent.enabled",1,!1),t.PlanAgentAdditionalTools=mt("chat.planAgent.additionalTools",0,[]),t.ImplementAgentModel=mt("chat.implementAgent.model",0,""),t.AskAgentAdditionalTools=mt("chat.askAgent.additionalTools",0,[]),t.AskAgentModel=mt("chat.askAgent.model",0,""),t.ExploreAgentModel=mt("chat.exploreAgent.model",0,""),t.CopilotMemoryEnabled=mt("chat.copilotMemory.enabled",1,!1),t.MemoryToolEnabled=mt("chat.tools.memory.enabled",1,!0),t.ViewImageToolEnabled=mt("chat.tools.viewImage.enabled",1,!0)})(Mer||(oo.ConfigKey=Mer={}));function Uks(){return Object.values(Mer).flatMap(t=>Object.values(t).map(e=>e.fullyQualifiedId))}a(Uks,"getAllConfigKeys");var Qks=[];function qks(t){return Qks.push(t),t}a(qks,"registerNextEditProviderId")});var D0=T(aA=>{"use strict";f();Object.defineProperty(aA,"__esModule",{value:!0});aA.LogMemory=aA.LogServiceImpl=aA.ConsoleLog=aA.LogTarget=aA.LogLevel=aA.ILogService=void 0;aA.collectErrorMessages=t$n;aA.collectSingleLineErrorMessage=jks;var Gks=qr(),Hks=ro();aA.ILogService=(0,Gks.createServiceIdentifier)("ILogService");var sA;(function(t){t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warning=4]="Warning",t[t.Error=5]="Error"})(sA||(aA.LogLevel=sA={}));var e$n;(function(t){function e(r){return{logIt:r}}a(e,"fromCallback"),t.fromCallback=e})(e$n||(aA.LogTarget=e$n={}));var Oer=class{static{a(this,"ConsoleLog")}constructor(e,r=sA.Warning){this.prefix=e,this.minLogLevel=r}logIt(e,r,...n){this.prefix&&(r=`${this.prefix}${r}`),e===sA.Error?console.error(r,...n):e===sA.Warning?console.warn(r,...n):e>=this.minLogLevel&&console.log(r,...n)}};aA.ConsoleLog=Oer;var Ber=class extends Hks.Disposable{static{a(this,"LogServiceImpl")}constructor(e){super(),this.logger=new Ler(e)}trace(e){this.logger.trace(e)}debug(e){this.logger.debug(e)}info(e){this.logger.info(e)}warn(e){this.logger.warn(e)}error(e,r){this.logger.error(e,r)}show(e){this.logger.show(e)}createSubLogger(e){return this.logger.createSubLogger(e)}withExtraTarget(e){return this.logger.withExtraTarget(e)}};aA.LogServiceImpl=Ber;var Ler=class{static{a(this,"LoggerImpl")}constructor(e){this._logTargets=e}_logIt(e,r){Mrt.addLog(sA[e],r),this._logTargets.forEach(n=>n.logIt(e,r))}trace(e){this._logIt(sA.Trace,e)}debug(e){this._logIt(sA.Debug,e)}info(e){this._logIt(sA.Info,e)}warn(e){this._logIt(sA.Warning,e)}error(e,r){this._logIt(sA.Error,t$n(e)+(r?`: ${r}`:""))}show(e){this._logTargets.forEach(r=>r.show?.(e))}createSubLogger(e){return new Fer(this,e)}withExtraTarget(e){return new Nrt(this,[e])}},Fer=class t{static{a(this,"SubLogger")}constructor(e,r,n){this._parent=e;let s=(Array.isArray(r)?r:[r]).map(c=>`[${c}]`).join("");this._prefix=n?n+s:s}_prefixMessage(e){return`${this._prefix} ${e}`}trace(e){this._parent.trace(this._prefixMessage(e))}debug(e){this._parent.debug(this._prefixMessage(e))}info(e){this._parent.info(this._prefixMessage(e))}warn(e){this._parent.warn(this._prefixMessage(e))}error(e,r){let n=r?this._prefixMessage(r):this._prefix;this._parent.error(e,n)}show(e){this._parent.show(e)}createSubLogger(e){return new t(this._parent,e,this._prefix)}withExtraTarget(e){return new Nrt(this,[e],this._prefix)}},Nrt=class t{static{a(this,"LoggerWithExtraTargets")}constructor(e,r,n=""){this._parent=e,this._extraTargets=r,this._prefix=n}_notifyExtraTargets(e,r){let n=this._prefix?`${this._prefix} ${r}`:r;for(let o of this._extraTargets)try{o.logIt(e,n)}catch{}}trace(e){this._notifyExtraTargets(sA.Trace,e),this._parent.trace(e)}debug(e){this._notifyExtraTargets(sA.Debug,e),this._parent.debug(e)}info(e){this._notifyExtraTargets(sA.Info,e),this._parent.info(e)}warn(e){this._notifyExtraTargets(sA.Warning,e),this._parent.warn(e)}error(e,r){let n=typeof e=="string"?e:e.message||"Error",o=r?`${n}: ${r}`:n;this._notifyExtraTargets(sA.Error,o),this._parent.error(e,r)}show(e){this._parent.show(e);for(let r of this._extraTargets)try{r.show?.(e)}catch{}}createSubLogger(e){let r=Array.isArray(e)?e:[e],n=this._prefix+r.map(o=>`[${o}]`).join("");return new t(this._parent.createSubLogger(e),this._extraTargets,n)}withExtraTarget(e){return new t(this._parent,[...this._extraTargets,e],this._prefix)}};function t$n(t){let e=new Set;function r(n,o){if(!n||!["object","string"].includes(typeof n)||e.has(n))return"";e.add(n);let c=(typeof n=="string"?n:n.stack||n.message||n.code||"").toString?.()||"";return[c?`${c.split(` `).map(l=>`${o}${l}`).join(` `)} -`:"",n.chromiumDetails?`${o}${JSON.stringify(njn(n.chromiumDetails))} -`:"",r(n.cause,o+" "),...Array.isArray(n.errors)?n.errors.map(l=>r(l,o+" ")):[]].join("")}return a(r,"collect"),r(t,"").trim()}a(rjn,"collectErrorMessages");function H2s(t,e=!1){let r=new Set;function n(o){if(!o||!["object","string"].includes(typeof o)||r.has(o))return"";r.add(o);let l=((typeof o=="string"?o:o.message||o.code||"").toString?.()||"").trim().split(` -`).join(" "),u=[...e&&o.chromiumDetails?[JSON.stringify(njn(o.chromiumDetails))]:[],...o.cause?[n(o.cause)]:[],...Array.isArray(o.errors)?o.errors.map(d=>n(d)):[]].join(", ");return u?`${l}: ${u}`:l}return a(n,"collect"),n(t)}a(H2s,"collectSingleLineErrorMessage");function njn(t){if(!t||typeof t!="object")return{};if(t.is_request_error!==void 0&&t.session_state===void 0)return{is_request_error:t.is_request_error,network_process_crashed:t.network_process_crashed};let e={drain_error:t.drain_error,drain_description:t.drain_description,go_away_error:t.go_away_error,go_away_error_details:t.go_away_error_details,go_away_debug_data:t.go_away_debug_data,rst_stream_error:t.rst_stream_error,rst_stream_error_details:t.rst_stream_error_details,rst_stream_description:t.rst_stream_description,last_framer_error:t.last_framer_error,last_framer_error_details:t.last_framer_error_details,error_source:t.error_source,aliases_length:Array.isArray(t.aliases)?t.aliases.length:void 0};if(t.proxy){let n=[...String(t.proxy).matchAll(/([a-z][a-z0-9+.-]*):\/\//gi)].map(o=>o[1]);n.length>0&&(e.proxy_schemes=n)}if(t.in_flight_write&&typeof t.in_flight_write=="object"&&(e.in_flight_write={frame_type:t.in_flight_write.frame_type,frame_size:t.in_flight_write.frame_size,remaining_size:t.in_flight_write.remaining_size}),t.buffered_spdy_framer&&typeof t.buffered_spdy_framer=="object"&&(e.buffered_spdy_framer={frames_received:t.buffered_spdy_framer.frames_received,has_error:t.buffered_spdy_framer.has_error,message_fully_read:t.buffered_spdy_framer.message_fully_read}),t.session_state&&typeof t.session_state=="object"){let r=t.session_state;e.session_state={availability_state:r.availability_state,session_send_window:r.session_send_window,session_recv_window:r.session_recv_window,stream_initial_send_window:r.stream_initial_send_window,stream_initial_recv_window:r.stream_initial_recv_window,send_stalled_by_session_window:r.send_stalled_by_session_window,active_stream_count:r.active_stream_count,created_stream_count:r.created_stream_count,max_concurrent_streams:r.max_concurrent_streams,highest_stream_id_sent:r.highest_stream_id_sent,frames_sent:r.frames_sent,frames_received:r.frames_received,ping_in_flight:r.ping_in_flight,last_ping_sent_ms:r.last_ping_sent_ms,next_ping_id:r.next_ping_id,failed_ping_count:r.failed_ping_count,support_websocket:r.support_websocket,deprecate_http2_priorities:r.deprecate_http2_priorities,streams_initiated_count:r.streams_initiated_count,streams_abandoned_count:r.streams_abandoned_count,read_state:r.read_state,write_state:r.write_state,pending_create_stream_request_count:r.pending_create_stream_request_count,error:r.error,error_on_unavailable:r.error_on_unavailable,unacked_recv_window_bytes:r.unacked_recv_window_bytes,last_good_stream_id:r.last_good_stream_id,debug_stream_id:r.debug_stream_id,has_ping_based_connection_checking:r.has_ping_based_connection_checking,num_broken_connection_detection_requests:r.num_broken_connection_detection_requests,session_max_queued_capped_frames:r.session_max_queued_capped_frames,num_queued_capped_frames:r.num_queued_capped_frames,check_ping_status_pending:r.check_ping_status_pending,in_confirm_handshake:r.in_confirm_handshake,http2_end_stream_with_data_frame:r.http2_end_stream_with_data_frame,reused:r.reused,session_max_recv_window_size:r.session_max_recv_window_size,max_header_table_size:r.max_header_table_size,time_since_last_read_ms:r.time_since_last_read_ms,time_since_last_write_ms:r.time_since_last_write_ms,time_since_last_recv_window_update_ms:r.time_since_last_recv_window_update_ms}}if(t.tls_info&&typeof t.tls_info=="object"){let r=t.tls_info;e.tls_info={is_secure_connection:r.is_secure_connection,ssl_version:r.ssl_version,cipher_suite:r.cipher_suite,negotiated_alpn:r.negotiated_alpn,cert_status:r.cert_status,is_issued_by_known_root:r.is_issued_by_known_root,handshake_type:r.handshake_type,client_cert_sent:r.client_cert_sent,exchange_group:r.key_exchange_group,ct_compliance:r.ct_compliance,alps_negotiated:r.alps_negotiated}}if(t.socket_info&&typeof t.socket_info=="object"){let r=t.socket_info;e.socket_info={is_connected:r.is_connected,was_ever_used:r.was_ever_used,dns_lookup_duration_ms:r.dns_lookup_duration_ms,tcp_connect_duration_ms:r.tcp_connect_duration_ms,ssl_handshake_duration_ms:r.ssl_handshake_duration_ms,owned_socket:r.owned_socket,socket_reuse_type:r.socket_reuse_type}}return t.url_loader_error&&typeof t.url_loader_error=="object"&&(e.url_loader_error={is_request_error:t.url_loader_error.is_request_error,network_process_crashed:t.url_loader_error.network_process_crashed}),Array.isArray(t.active_stream_details)&&(e.active_stream_details=t.active_stream_details.map(r=>({stream_id:r.stream_id,io_state:r.io_state,type:r.type,priority:r.priority,send_window_size:r.send_window_size,recv_window_size:r.recv_window_size,max_recv_window_size:r.max_recv_window_size,unacked_recv_window_bytes:r.unacked_recv_window_bytes,send_stalled_by_flow_control:r.send_stalled_by_flow_control,raw_sent_bytes:r.raw_sent_bytes,raw_received_bytes:r.raw_received_bytes,recv_bytes:r.recv_bytes,pending_send_status:r.pending_send_status,response_state:r.response_state,pending_send_data_remaining:r.pending_send_data_remaining,request_time_ms:r.request_time_ms,response_time_ms:r.response_time_ms}))),Array.isArray(t.closed_stream_details)&&(e.closed_stream_details=t.closed_stream_details.map(r=>({stream_id:r.stream_id,io_state:r.io_state,type:r.type,priority:r.priority,send_window_size:r.send_window_size,recv_window_size:r.recv_window_size,max_recv_window_size:r.max_recv_window_size,unacked_recv_window_bytes:r.unacked_recv_window_bytes,send_stalled_by_flow_control:r.send_stalled_by_flow_control,raw_sent_bytes:r.raw_sent_bytes,raw_received_bytes:r.raw_received_bytes,recv_bytes:r.recv_bytes,pending_send_status:r.pending_send_status,response_state:r.response_state,pending_send_data_remaining:r.pending_send_data_remaining,request_time_ms:r.request_time_ms,response_time_ms:r.response_time_ms}))),e}a(njn,"extractChromiumDetails");var Int=class{static{a(this,"LogMemory")}static{this._logs=[]}static{this._requestIds=[]}static{this.MAX_LOGS=50}static extractRequestIdFromMessage(e){let r=e.match(/request done: requestId: \[([0-9a-fA-F-]+)\] model deployment ID: \[/);if(r){let n=r[1];if(!this._requestIds.includes(n))return n}}static addLog(e,r){this._logs.length>=this.MAX_LOGS&&this._logs.shift(),this._logs.push(`${e}: ${r}`),this._requestIds.length>=this.MAX_LOGS&&this._requestIds.shift();let n=this.extractRequestIdFromMessage(r);n&&this._requestIds.push(n)}static getLogs(){return this._logs}static getRequestIds(){return this._requestIds}};mA.LogMemory=Int});var fxe=T(dxe=>{"use strict";f();Object.defineProperty(dxe,"__esModule",{value:!0});dxe.ICopilotTokenManager=void 0;dxe.nowSeconds=$2s;var j2s=qr();dxe.ICopilotTokenManager=(0,j2s.createServiceIdentifier)("ICopilotTokenManager");function $2s(){return Math.floor(Date.now()/1e3)}a($2s,"nowSeconds")});var gA=T(F0=>{"use strict";f();var V2s=F0&&F0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},xnt=F0&&F0.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(F0,"__esModule",{value:!0});F0.BaseAuthenticationService=F0.IAuthenticationService=F0.MinimalModeError=F0.GITHUB_SCOPE_ALIGNED=F0.GITHUB_SCOPE_READ_USER=F0.GITHUB_SCOPE_USER_EMAIL=void 0;F0.authProviderId=Z2s;var W2s=qr(),Eer=nc(),z2s=so(),Y2s=M4(),AY=fc(),K2s=L0(),J2s=fxe(),X2s=O7();F0.GITHUB_SCOPE_USER_EMAIL=["user:email"];F0.GITHUB_SCOPE_READ_USER=["read:user"];F0.GITHUB_SCOPE_ALIGNED=["read:user","user:email","repo","workflow"];var Cer=class extends Error{static{a(this,"MinimalModeError")}constructor(){super("The authentication service is in minimal mode."),this.name="MinimalModeError"}};F0.MinimalModeError=Cer;F0.IAuthenticationService=(0,W2s.createServiceIdentifier)("IAuthenticationService");var _er=class extends z2s.Disposable{static{a(this,"BaseAuthenticationService")}fireAuthenticationChange(e){let r=!!this.copilotToken;this._logService.info(`AuthenticationService: firing onDidAuthenticationChange from ${e}. Has token: ${r}`),this._onDidAuthenticationChange.fire()}constructor(e,r,n,o){super(),this._logService=e,this._tokenStore=r,this._tokenManager=n,this._configurationService=o,this._onDidAuthenticationChange=this._register(new Eer.Emitter),this.onDidAuthenticationChange=this._onDidAuthenticationChange.event,this._onDidAccessTokenChange=this._register(new Eer.Emitter),this.onDidAccessTokenChange=this._onDidAccessTokenChange.event,this._onDidAdoAuthenticationChange=this._register(new Eer.Emitter),this.onDidAdoAuthenticationChange=this._onDidAdoAuthenticationChange.event,this._isMinimalMode=(0,Y2s.derived)(s=>this._configurationService.getConfigObservable(AY.ConfigKey.Shared.AuthPermissions).read(s)===AY.AuthPermissionMode.Minimal),this._register(n.onDidCopilotTokenRefresh(()=>{this._logService.debug("Handling CopilotToken refresh."),this._handleAuthChangeEvent()}))}get isMinimalMode(){return this._isMinimalMode.get()}get anyGitHubSession(){return this._anyGitHubSession}get permissiveGitHubSession(){return this._permissiveGitHubSession}get anyAdoSession(){return this._anyAdoSession}get copilotToken(){return this._tokenStore.copilotToken}async getCopilotToken(e){try{let r=await this._tokenManager.getCopilotToken(e);return this._tokenStore.copilotToken=r,this._copilotTokenError=void 0,r}catch(r){this._tokenStore.copilotToken=void 0;let n=this._copilotTokenError;throw this._copilotTokenError=r,n&&r&&n.message!==r.message&&this.fireAuthenticationChange("getCopilotToken error change"),r}}resetCopilotToken(e){this._tokenStore.copilotToken=void 0,this._tokenManager.resetCopilotToken(e)}async _handleAuthChangeEvent(){let e=this._anyGitHubSession,r=this._permissiveGitHubSession,n=this._anyAdoSession,o=this._tokenStore.copilotToken,s=this._copilotTokenError,c=await Promise.allSettled([this.getGitHubSession("any",{silent:!0}),this.getGitHubSession("permissive",{silent:!0}),this.getAnyAdoSession({silent:!0})]);for(let l of c)l.status==="rejected"&&this._logService.error(`Error getting a session: ${l.reason}`);if(e?.accessToken!==this._anyGitHubSession?.accessToken||r?.accessToken!==this._permissiveGitHubSession?.accessToken){this._onDidAccessTokenChange.fire(),this._logService.debug("Auth state changed, minting a new CopilotToken...");try{await this.getCopilotToken(!0)}catch{}this._logService.debug("Minted a new CopilotToken.");return}n?.accessToken!==this._anyAdoSession?.accessToken&&(this._logService.debug(`Ado auth state changed, firing event. Had token before: ${!!n?.accessToken}. Has token now: ${!!this._anyAdoSession?.accessToken}.`),this._onDidAdoAuthenticationChange.fire());try{await this.getCopilotToken()}catch{}(o?.token!==this._tokenStore.copilotToken?.token||s?.message!==this._copilotTokenError?.message)&&(this._logService.debug("CopilotToken state changed, firing event."),this.fireAuthenticationChange("handleAuthChangeEvent")),this._logService.debug("Finished handling auth change event.")}};F0.BaseAuthenticationService=_er;F0.BaseAuthenticationService=_er=V2s([xnt(0,K2s.ILogService),xnt(1,X2s.ICopilotTokenStore),xnt(2,J2s.ICopilotTokenManager),xnt(3,AY.IConfigurationService)],_er);function Z2s(t){return t.getConfig(AY.ConfigKey.Shared.AuthProvider)===AY.AuthProviderId.GitHubEnterprise?AY.AuthProviderId.GitHubEnterprise:AY.AuthProviderId.GitHub}a(Z2s,"authProviderId")});var wnt=T(ver=>{"use strict";f();Object.defineProperty(ver,"__esModule",{value:!0});ver.onCopilotToken=ePs;function ePs(t,e){return t.onDidAuthenticationChange(()=>{let r=t.copilotToken;r&&e(r)})}a(ePs,"onCopilotToken")});var Ter=T(sR=>{"use strict";f();var tPs=sR&&sR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},rPs=sR&&sR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(sR,"__esModule",{value:!0});sR.TelemetryUserConfig=sR.ICompletionsTelemetryUserConfigService=void 0;var nPs=gA(),iPs=qr(),oPs=so(),sPs=wnt();function aPs(t){let e=t.getTokenValue("tid"),r=t.organizationList,n=t.enterpriseList,o=t.getTokenValue("sku");if(!e)return;let s={copilot_trackingId:e};return r&&(s.organizations_list=r.toString()),n&&(s.enterprise_list=n.toString()),o&&(s.sku=o),s}a(aPs,"propertiesFromCopilotToken");sR.ICompletionsTelemetryUserConfigService=(0,iPs.createServiceIdentifier)("ICompletionsTelemetryUserConfigService");var ber=class extends oPs.Disposable{static{a(this,"TelemetryUserConfig")}#e;constructor(e){super(),this.#e={},this.optedIn=!1,this.ftFlag="",this._register((0,sPs.onCopilotToken)(e,n=>this.updateFromToken(n)));let r=e.copilotToken;r&&this.updateFromToken(r)}getProperties(){return this.#e}get trackingId(){return this.#e.copilot_trackingId}updateFromToken(e){let r=aPs(e);r&&(this.#e=r,this.optedIn=e.getTokenValue("rt")==="1",this.ftFlag=e.getTokenValue("ft")??"")}};sR.TelemetryUserConfig=ber;sR.TelemetryUserConfig=ber=tPs([rPs(0,nPs.IAuthenticationService)],ber)});var pxe=T(aue=>{"use strict";f();Object.defineProperty(aue,"__esModule",{value:!0});aue.PromiseQueue=aue.ICompletionsPromiseQueueService=void 0;var cPs=qr();aue.ICompletionsPromiseQueueService=(0,cPs.createServiceIdentifier)("completionsPromiseQueueService");var Ser=class{static{a(this,"PromiseQueue")}constructor(){this.promises=new Set}register(e){this.promises.add(e),e.finally(()=>this.promises.delete(e))}async flush(){await Promise.allSettled(this.promises)}};aue.PromiseQueue=Ser});var Dp=T(lu=>{"use strict";f();Object.defineProperty(lu,"__esModule",{value:!0});lu.TelemetryReporters=lu.ICompletionsTelemetryReporters=lu.CopilotTelemetryReporter=lu.TelemetryWithExp=lu.TelemetryData=lu.TelemetryStore=void 0;lu.telemetrizePromptLength=CPs;lu.now=lue;lu.telemetry=Mer;lu.telemetryExpProblem=bPs;lu.telemetryRaw=SPs;lu.telemetryException=sjn;lu.telemetryCatch=IPs;lu.telemetryError=xPs;lu.logEngineCompletion=RPs;lu.logEnginePrompt=PPs;var lPs=iR(),uPs=qr(),dPs=Np(),Rer=Mo(),Rnt=yY(),TD=Xm(),fPs=ent(),pPs=Zm(),hPs=rnt(),mPs=XZt(),Per=Ter(),ker=pxe(),Xv;(function(t){t[t.Standard=0]="Standard",t[t.Enhanced=1]="Enhanced"})(Xv||(lu.TelemetryStore=Xv={}));(function(t){function e(r){return r===t.Enhanced}a(e,"isEnhanced"),t.isEnhanced=e})(Xv||(lu.TelemetryStore=Xv={}));function cue(t){return t===Xv.Enhanced}a(cue,"isEnhanced");var gPs=["engine.prompt","engine.completion","ghostText.capturedAfterAccepted","ghostText.capturedAfterRejected"],hxe=8192,APs=21,SD=class t{static{a(this,"TelemetryData")}static{this.keysExemptedFromSanitization=[mPs.ExpServiceTelemetryNames.featuresTelemetryPropertyName]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},lue())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=lue())}async extendWithExpTelemetry(e){let{filters:r,exp:n}=await e.get(pPs.ICompletionsFeaturesService).getFallbackExpAndFilters();n.addToTelemetry(this),r.addToTelemetry(this)}extendWithEditorAgnosticFields(e){let r=e.get(lPs.IEnvService),n=e.get(TD.ICompletionsEditorAndPluginInfo);this.properties.editor_version=(0,TD.formatNameAndVersion)(n.getEditorInfo()),this.properties.editor_plugin_version=(0,TD.formatNameAndVersion)(n.getEditorPluginInfo()),this.properties.client_machineid=r.machineId,this.properties.client_sessionid=r.sessionId,this.properties.copilot_version=`copilot/${TD.BuildInfo.getVersion()}`,typeof process<"u"&&(this.properties.runtime_version=`node/${process.versions.node}`),this.properties.common_extname=n.getEditorPluginInfo().name,this.properties.common_extversion=n.getEditorPluginInfo().version,this.properties.common_vscodeversion=(0,TD.formatNameAndVersion)(n.getEditorInfo())}extendWithConfigProperties(e){let r=(0,TD.dumpForTelemetry)(e);r["copilot.build"]=TD.BuildInfo.getBuild(),r["copilot.buildType"]=TD.BuildInfo.getBuildType(),this.properties={...this.properties,...r}}extendWithRequestId(e){let r={headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetry=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromProperties(e,r){if(cue(e))return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetry.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements);for(let e in this.measurements)isNaN(this.measurements[e])&&delete this.measurements[e]}multiplexProperties(){this.properties=t.multiplexProperties(this.properties)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}static multiplexProperties(e){let r={...e};for(let n in e){let o=e[n],s=o?.length??0;if(s>hxe){let c=0,l=0;for(;s>0&&l1&&(u=n+"_"+(l<10?"0":"")+l);let d=c+hxe;se+r.length,0)??0),promptSuffixCharLen:t.suffix.length}}a(CPs,"telemetrizePromptLength");function lue(){return performance.now()}a(lue,"now");function _Ps(t){return Math.floor(t/1e3)}a(_Ps,"nowSeconds");function Der(t){return t.get(Per.ICompletionsTelemetryUserConfigService).optedIn}a(Der,"shouldSendEnhanced");function ijn(t){return t.get(Per.ICompletionsTelemetryUserConfigService).ftFlag!==""}a(ijn,"shouldSendFinetuningTelemetry");function Mer(t,e,r,n){return t.get(ker.ICompletionsPromiseQueueService).register(vPs(t,e,lue(),r?.extendedBy(),n))}a(Mer,"telemetry");async function vPs(t,e,r,n,o=Xv.Standard){let s=t.get(Rnt.ICompletionsTelemetryService),c=t.get(Rer.IInstantiationService),l=n||SD.createAndMarkAsIssued({},{});await l.makeReadyForSending(t,o??!1,"IncludeExp",r),(!cue(o)||c.invokeFunction(Der))&&Ner(s,o,e,l),cue(o)&&gPs.includes(e)&&c.invokeFunction(ijn)&&c.invokeFunction(EPs,o,e,l)}a(vPs,"_telemetry");function bPs(t,e){return t.get(ker.ICompletionsPromiseQueueService).register(TPs(t,e,lue()))}a(bPs,"telemetryExpProblem");async function TPs(t,e,r){let n=t.get(Rnt.ICompletionsTelemetryService),o="expProblem",s=SD.createAndMarkAsIssued(e,{});await s.makeReadyForSending(t,Xv.Standard,"SkipExp",r),Ner(n,Xv.Standard,o,s)}a(TPs,"_telemetryExpProblem");function SPs(t,e,r,n){let o=t.get(Rnt.ICompletionsTelemetryService),s={...r,...ojn(t)};Ner(o,Xv.Standard,e,{properties:s,measurements:n})}a(SPs,"telemetryRaw");function ojn(t){let e=t.get(TD.ICompletionsEditorAndPluginInfo),r={unique_id:(0,dPs.generateUuid)(),common_extname:e.getEditorPluginInfo().name,common_extversion:e.getEditorPluginInfo().version,common_vscodeversion:(0,TD.formatNameAndVersion)(e.getEditorInfo())};return{...t.get(Per.ICompletionsTelemetryUserConfigService).getProperties(),...r}}a(ojn,"createRequiredProperties");function sjn(t,e,r){return t.sendGHTelemetryException(e,r||"")}a(sjn,"telemetryException");function IPs(t,e,r,n){let o=a(async(...s)=>{try{await r(...s)}catch(c){sjn(t,c,n)}},"wrapped");return(...s)=>e.register(o(...s))}a(IPs,"telemetryCatch");function xPs(t,e,r,n){return t.get(ker.ICompletionsPromiseQueueService).register(wPs(t,e,lue(),r?.extendedBy(),n))}a(xPs,"telemetryError");async function wPs(t,e,r,n,o=Xv.Standard){if(cue(o)&&!Der(t))return;let s=t.get(Rer.IInstantiationService),c=n||SD.createAndMarkAsIssued({},{});await c.makeReadyForSending(t,o,"IncludeExp",r),s.invokeFunction(yPs,o,e,c)}a(wPs,"_telemetryError");function RPs(t,e,r,n,o){let s=SD.createAndMarkAsIssued({completionTextJson:JSON.stringify(e),choiceIndex:o.toString()});if(r.logprobs)for(let[c,l]of Object.entries(r.logprobs))s.properties["logprobs_"+c]=JSON.stringify(l)??"unset";return s.extendWithRequestId(n),Mer(t,"engine.completion",s,Xv.Enhanced)}a(RPs,"logEngineCompletion");function PPs(t,e,r){let n={promptJson:JSON.stringify({prefix:e.prefix,context:e.context}),promptSuffixJson:JSON.stringify(e.suffix)};if(e.context){let s=r.properties["request.option.extra"]?JSON.parse(r.properties["request.option.extra"]):{};s.context=e.context,n["request.option.extra"]=JSON.stringify(s)}let o=r.extendedBy(n);return Mer(t,"engine.prompt",o,Xv.Enhanced)}a(PPs,"logEnginePrompt");var xer=class{static{a(this,"CopilotTelemetryReporter")}};lu.CopilotTelemetryReporter=xer;lu.ICompletionsTelemetryReporters=(0,uPs.createServiceIdentifier)("ICompletionsTelemetryReporters");var wer=class{static{a(this,"TelemetryReporters")}getReporter(e,r=Xv.Standard){return cue(r)?this.getEnhancedReporter(e):this.reporter}getEnhancedReporter(e){if(Der(e))return this.reporterEnhanced}getFTReporter(e){}setReporter(e){this.reporter=e}setEnhancedReporter(e){this.reporterEnhanced=e}setFTReporter(e){this.reporterFT=e}async deactivate(){let e=[this.reporter,this.reporterEnhanced,this.reporterFT];this.reporter=this.reporterEnhanced=this.reporterFT=void 0,await Promise.all(e.map(r=>r?.dispose()))}};lu.TelemetryReporters=wer});var yY=T(aR=>{"use strict";f();var kPs=aR&&aR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},NPs=aR&&aR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(aR,"__esModule",{value:!0});aR.CompletionsTelemetryServiceBridge=aR.ICompletionsTelemetryService=void 0;var DPs=Rp(),Oer=HZt(),MPs=qr(),mxe=Dp();aR.ICompletionsTelemetryService=(0,MPs.createServiceIdentifier)("completionsTelemetryService");var Ber=class{static{a(this,"CompletionsTelemetryServiceBridge")}constructor(e){this.telemetryService=e,this.reporter=void 0,this.enhancedReporter=void 0}sendGHTelemetryEvent(e,r,n,o){this.telemetryService.sendGHTelemetryEvent((0,Oer.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??mxe.TelemetryStore.Standard)?.sendTelemetryEvent(e,r,n)}sendEnhancedGHTelemetryEvent(e,r,n,o){this.telemetryService.sendEnhancedGHTelemetryEvent((0,Oer.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??mxe.TelemetryStore.Enhanced)?.sendTelemetryEvent(e,r,n)}sendGHTelemetryErrorEvent(e,r,n,o){this.telemetryService.sendGHTelemetryErrorEvent((0,Oer.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??mxe.TelemetryStore.Enhanced)?.sendTelemetryErrorEvent(e,r,n)}sendGHTelemetryException(e,r,n){this.telemetryService.sendGHTelemetryException(e,r),e instanceof Error&&this.getSpyReporters(n??mxe.TelemetryStore.Enhanced)?.sendTelemetryException(e,void 0,void 0)}setSpyReporters(e,r){this.reporter=e,this.enhancedReporter=r}clearSpyReporters(){this.reporter=void 0,this.enhancedReporter=void 0}getSpyReporters(e){return mxe.TelemetryStore.isEnhanced(e)?this.enhancedReporter:this.reporter}};aR.CompletionsTelemetryServiceBridge=Ber;aR.CompletionsTelemetryServiceBridge=Ber=kPs([NPs(0,DPs.ITelemetryService)],Ber)});var ajn=T(uue=>{"use strict";f();Object.defineProperty(uue,"__esModule",{value:!0});uue.CopilotExtensionStatus=uue.ICompletionsExtensionStatus=void 0;var OPs=qr();uue.ICompletionsExtensionStatus=(0,OPs.createServiceIdentifier)("ICompletionsExtensionStatus");var Ler=class{static{a(this,"CopilotExtensionStatus")}constructor(e="Normal",r,n=!1,o){this.kind=e,this.message=r,this.busy=n,this.command=o}};uue.CopilotExtensionStatus=Ler});var Pnt=T(cR=>{"use strict";f();Object.defineProperty(cR,"__esModule",{value:!0});cR.CopilotToken=void 0;cR.containsInternalOrg=cjn;cR.containsVSCodeOrg=djn;cR.validateTokenEnvelope=pjn;cR.isTokenEnvelope=QPs;cR.isErrorEnvelope=qPs;cR.isStandardErrorEnvelope=GPs;cR.createTestExtendedTokenInfo=HPs;var pn=fB();function cjn(t){return ljn(t)||ujn(t)}a(cjn,"containsInternalOrg");function ljn(t){let e=["4535c7beffc844b46bb1ed4aa04d759a"];for(let r of t)if(e.includes(r))return!0;return!1}a(ljn,"containsGitHubOrg");function ujn(t){let e=["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","1cb18ac6eedd49b43d74a1c5beb0b955","ea9395b9a9248c05ee6847cbd24355ed"];for(let r of t)if(e.includes(r))return!0;return!1}a(ujn,"containsMicrosoftOrg");function djn(t){let e=["551cca60ce19654d894e786220822482"];for(let r of t)if(e.includes(r))return!0;return!1}a(djn,"containsVSCodeOrg");var Fer=class{static{a(this,"CopilotToken")}constructor(e){this._info=e,this.tokenMap=this.parseToken(e.token)}parseToken(e){let r=new Map,o=e?.split(":")[0]?.split(";");for(let s of o){let[c,l]=s.split("=");r.set(c,l)}return r}get token(){return this._info.token}get sku(){return this._info.sku}get isIndividual(){return this._info.individual??!1}get organizationList(){return this._info.organization_list||[]}get organizationLoginList(){return this._info.organization_login_list||[]}get enterpriseList(){return this._info.enterprise_list||[]}get endpoints(){return this._info.endpoints}get isInternal(){return cjn(this.organizationList)}get isMicrosoftInternal(){return ujn(this.organizationList)}get isGitHubInternal(){return ljn(this.organizationList)}get isFreeUser(){return this.sku==="free_limited_copilot"}get isNoAuthUser(){return this.sku==="no_auth_limited_copilot"}get isChatQuotaExceeded(){return this.isFreeUser&&(this._info.limited_user_quotas?.chat??1)<=0}get isCompletionsQuotaExceeded(){return this.isFreeUser&&(this._info.limited_user_quotas?.completions??1)<=0}get codeQuoteEnabled(){return this._info.code_quote_enabled??!1}get isVscodeTeamMember(){return this._info.isVscodeTeamMember||djn(this.organizationList)}get codexAgentEnabled(){return this._info.codex_agent_enabled??!1}get copilotPlan(){if(this.isFreeUser)return"free";let e=this._info.copilot_plan;switch(e){case"individual":case"individual_pro":case"business":case"enterprise":return e;default:return"individual"}}get quotaInfo(){return{quota_snapshots:this._info.quota_snapshots,quota_reset_date:this._info.quota_reset_date}}get username(){return this._info.username}isTelemetryEnabled(){return this._isTelemetryEnabled===void 0&&(this._isTelemetryEnabled=this._info.telemetry==="enabled"),this._isTelemetryEnabled}isPublicSuggestionsEnabled(){return this._isPublicSuggestionsEnabled===void 0&&(this._isPublicSuggestionsEnabled=this._info.public_suggestions==="enabled"),this._isPublicSuggestionsEnabled}isCopilotIgnoreEnabled(){return this._info.copilotignore_enabled??!1}get isCopilotCodeReviewEnabled(){return this._info.code_review_enabled??this.getTokenValue("ccr")==="1"}isEditorPreviewFeaturesEnabled(){return this.getTokenValue("editor_preview_features")!=="0"}isMcpEnabled(){return this.getTokenValue("mcp")!=="0"}getTokenValue(e){return this.tokenMap.get(e)}isExpandedClientSideIndexingEnabled(){return this._info.blackbird_clientside_indexing===!0}isFcv1(){return this.tokenMap.get("fcv1")==="1"}isSn(){return this.tokenMap.get("sn")==="1"}};cR.CopilotToken=Fer;var fjn=(0,pn.vObj)({message:(0,pn.vRequired)((0,pn.vString)()),notification_id:(0,pn.vRequired)((0,pn.vString)()),title:(0,pn.vRequired)((0,pn.vString)()),url:(0,pn.vRequired)((0,pn.vString)())}),BPs=(0,pn.vObj)({can_signup_for_limited:(0,pn.vNullable)((0,pn.vBoolean)()),error_details:(0,pn.vRequired)(fjn),message:(0,pn.vRequired)((0,pn.vString)()),reason:(0,pn.vString)()}),LPs=(0,pn.vObj)({token:(0,pn.vRequired)((0,pn.vString)()),expires_at:(0,pn.vRequired)((0,pn.vNumber)()),refresh_in:(0,pn.vRequired)((0,pn.vNumber)()),sku:(0,pn.vString)(),individual:(0,pn.vBoolean)(),blackbird_clientside_indexing:(0,pn.vBoolean)(),code_quote_enabled:(0,pn.vBoolean)(),code_review_enabled:(0,pn.vBoolean)(),codesearch:(0,pn.vBoolean)(),copilotignore_enabled:(0,pn.vBoolean)(),vsc_electron_fetcher_v2:(0,pn.vBoolean)(),public_suggestions:(0,pn.vEnum)("enabled","disabled","unconfigured"),telemetry:(0,pn.vEnum)("enabled","disabled"),endpoints:(0,pn.vObj)({api:(0,pn.vString)(),"origin-tracker":(0,pn.vString)(),proxy:(0,pn.vString)(),telemetry:(0,pn.vString)()}),enterprise_list:(0,pn.vNullable)((0,pn.vArray)((0,pn.vNumber)())),limited_user_quotas:(0,pn.vNullable)((0,pn.vObj)({chat:(0,pn.vRequired)((0,pn.vNumber)()),completions:(0,pn.vRequired)((0,pn.vNumber)())})),limited_user_reset_date:(0,pn.vNullable)((0,pn.vNumber)()),organization_list:(0,pn.vArray)((0,pn.vString)()),user_notification:fjn}),FPs=(0,pn.vObj)({message:(0,pn.vRequired)((0,pn.vString)()),documentation_url:(0,pn.vRequired)((0,pn.vString)()),status:(0,pn.vRequired)((0,pn.vString)())}),UPs=(0,pn.vObj)({token:(0,pn.vRequired)((0,pn.vString)()),expires_at:(0,pn.vRequired)((0,pn.vNumber)()),refresh_in:(0,pn.vRequired)((0,pn.vNumber)())});function pjn(t){let e=LPs.validate(t);if(e.error===void 0)return{valid:!0,strategy:"strict",envelope:e.content};let r=e.error.message,n=UPs.validate(t);return n.error===void 0?{valid:!0,strategy:"fallback",strictError:r,envelope:t}:{valid:!1,strategy:"failed",strictError:r,fallbackError:n.error.message}}a(pjn,"validateTokenEnvelope");function QPs(t){return pjn(t).valid}a(QPs,"isTokenEnvelope");function qPs(t){return BPs.validate(t).error===void 0}a(qPs,"isErrorEnvelope");function GPs(t){return FPs.validate(t).error===void 0}a(GPs,"isStandardErrorEnvelope");function HPs(t){return{token:"test-token",expires_at:0,refresh_in:0,sku:"free_limited_copilot",individual:!0,blackbird_clientside_indexing:!1,code_quote_enabled:!1,code_review_enabled:!1,codesearch:!1,copilotignore_enabled:!1,vsc_electron_fetcher_v2:!1,public_suggestions:"enabled",telemetry:"enabled",username:"testuser",isVscodeTeamMember:!1,copilot_plan:"free",organization_login_list:[],...t}}a(HPs,"createTestExtendedTokenInfo")});var due=T(Zv=>{"use strict";f();var jPs=Zv&&Zv.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},$Ps=Zv&&Zv.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Zv,"__esModule",{value:!0});Zv.CopilotTokenManagerImpl=Zv.ICompletionsCopilotTokenManager=Zv.CopilotToken=void 0;var VPs=gA(),WPs=qr(),zPs=wc(),YPs=so(),KPs=Pnt();Object.defineProperty(Zv,"CopilotToken",{enumerable:!0,get:a(function(){return KPs.CopilotToken},"get")});Zv.ICompletionsCopilotTokenManager=(0,WPs.createServiceIdentifier)("ICompletionsCopilotTokenManager");var Uer=class extends YPs.Disposable{static{a(this,"CopilotTokenManagerImpl")}get token(){return this.tokenRefetcher.trigger(()=>this.updateCachedToken()),this._token}constructor(e=!1,r){super(),this.primed=e,this.authenticationService=r,this.tokenRefetcher=new zPs.ThrottledDelayer(5e3),this.updateCachedToken(),this._register(this.authenticationService.onDidAuthenticationChange(()=>this.updateCachedToken()))}primeToken(){try{return this.getToken().then(()=>!0,()=>!1)}catch{return Promise.resolve(!1)}}async getToken(){return this.updateCachedToken()}async updateCachedToken(){return this._token=await this.authenticationService.getCopilotToken(),this._token}resetToken(e){this.authenticationService.resetCopilotToken()}getLastToken(){return this.authenticationService.copilotToken}};Zv.CopilotTokenManagerImpl=Uer;Zv.CopilotTokenManagerImpl=Uer=jPs([$Ps(1,VPs.IAuthenticationService)],Uer)});var knt=T(fue=>{"use strict";f();Object.defineProperty(fue,"__esModule",{value:!0});fue.NoOpCitationManager=fue.ICompletionsCitationManager=void 0;var JPs=qr(),XPs=so();fue.ICompletionsCitationManager=(0,JPs.createServiceIdentifier)("ICompletionsCitationManager");var Qer=class{static{a(this,"NoOpCitationManager")}register(){return XPs.Disposable.None}async handleIPCodeCitation(e){}};fue.NoOpCitationManager=Qer});var Gy=T(qh=>{"use strict";f();Object.defineProperty(qh,"__esModule",{value:!0});qh.HasPropertyKey=ZPs;qh.IsAsyncIterator=eks;qh.IsArray=qer;qh.IsBigInt=tks;qh.IsBoolean=rks;qh.IsDate=nks;qh.IsFunction=iks;qh.IsIterator=oks;qh.IsNull=sks;qh.IsNumber=aks;qh.IsObject=Ger;qh.IsRegExp=cks;qh.IsString=lks;qh.IsSymbol=uks;qh.IsUint8Array=Her;qh.IsUndefined=dks;function ZPs(t,e){return e in t}a(ZPs,"HasPropertyKey");function eks(t){return Ger(t)&&!qer(t)&&!Her(t)&&Symbol.asyncIterator in t}a(eks,"IsAsyncIterator");function qer(t){return Array.isArray(t)}a(qer,"IsArray");function tks(t){return typeof t=="bigint"}a(tks,"IsBigInt");function rks(t){return typeof t=="boolean"}a(rks,"IsBoolean");function nks(t){return t instanceof globalThis.Date}a(nks,"IsDate");function iks(t){return typeof t=="function"}a(iks,"IsFunction");function oks(t){return Ger(t)&&!qer(t)&&!Her(t)&&Symbol.iterator in t}a(oks,"IsIterator");function sks(t){return t===null}a(sks,"IsNull");function aks(t){return typeof t=="number"}a(aks,"IsNumber");function Ger(t){return typeof t=="object"&&t!==null}a(Ger,"IsObject");function cks(t){return t instanceof globalThis.RegExp}a(cks,"IsRegExp");function lks(t){return typeof t=="string"}a(lks,"IsString");function uks(t){return typeof t=="symbol"}a(uks,"IsSymbol");function Her(t){return t instanceof globalThis.Uint8Array}a(Her,"IsUint8Array");function dks(t){return t===void 0}a(dks,"IsUndefined")});var c_=T(pB=>{"use strict";f();var fks=pB&&pB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pks=pB&&pB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hks=pB&&pB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oNnt(e))}a(mks,"ArrayType");function gks(t){return new Date(t.getTime())}a(gks,"DateType");function Aks(t){return new Uint8Array(t)}a(Aks,"Uint8ArrayType");function yks(t){return new RegExp(t.source,t.flags)}a(yks,"RegExpType");function Eks(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Nnt(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Nnt(t[r]);return e}a(Eks,"ObjectType");function Nnt(t){return gxe.IsArray(t)?mks(t):gxe.IsDate(t)?gks(t):gxe.IsUint8Array(t)?Aks(t):gxe.IsRegExp(t)?yks(t):gxe.IsObject(t)?Eks(t):t}a(Nnt,"Visit");function Cks(t){return Nnt(t)}a(Cks,"Clone")});var Mnt=T(Dnt=>{"use strict";f();Object.defineProperty(Dnt,"__esModule",{value:!0});Dnt.CloneRest=_ks;Dnt.CloneType=mjn;var hjn=c_();function _ks(t){return t.map(e=>mjn(e))}a(_ks,"CloneRest");function mjn(t,e){return e===void 0?(0,hjn.Clone)(t):(0,hjn.Clone)({...e,...t})}a(mjn,"CloneType")});var jer=T(AU=>{"use strict";f();var vks=AU&&AU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gjn=AU&&AU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&vks(e,t,r)};Object.defineProperty(AU,"__esModule",{value:!0});gjn(Mnt(),AU);gjn(c_(),AU)});var Ont=T(Ds=>{"use strict";f();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.IsAsyncIterator=bks;Ds.IsIterator=Tks;Ds.IsStandardObject=Sks;Ds.IsInstanceObject=Iks;Ds.IsPromise=xks;Ds.IsDate=wks;Ds.IsMap=Rks;Ds.IsSet=Pks;Ds.IsRegExp=kks;Ds.IsTypedArray=Nks;Ds.IsInt8Array=Dks;Ds.IsUint8Array=Mks;Ds.IsUint8ClampedArray=Oks;Ds.IsInt16Array=Bks;Ds.IsUint16Array=Lks;Ds.IsInt32Array=Fks;Ds.IsUint32Array=Uks;Ds.IsFloat32Array=Qks;Ds.IsFloat64Array=qks;Ds.IsBigInt64Array=Gks;Ds.IsBigUint64Array=Hks;Ds.HasPropertyKey=jks;Ds.IsObject=Axe;Ds.IsArray=Ajn;Ds.IsUndefined=yjn;Ds.IsNull=Ejn;Ds.IsBoolean=Cjn;Ds.IsNumber=_jn;Ds.IsInteger=$ks;Ds.IsBigInt=vjn;Ds.IsString=bjn;Ds.IsFunction=Tjn;Ds.IsSymbol=Sjn;Ds.IsValueType=Vks;function bks(t){return Axe(t)&&globalThis.Symbol.asyncIterator in t}a(bks,"IsAsyncIterator");function Tks(t){return Axe(t)&&globalThis.Symbol.iterator in t}a(Tks,"IsIterator");function Sks(t){return Axe(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}a(Sks,"IsStandardObject");function Iks(t){return Axe(t)&&!Ajn(t)&&Tjn(t.constructor)&&t.constructor.name!=="Object"}a(Iks,"IsInstanceObject");function xks(t){return t instanceof globalThis.Promise}a(xks,"IsPromise");function wks(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}a(wks,"IsDate");function Rks(t){return t instanceof globalThis.Map}a(Rks,"IsMap");function Pks(t){return t instanceof globalThis.Set}a(Pks,"IsSet");function kks(t){return t instanceof globalThis.RegExp}a(kks,"IsRegExp");function Nks(t){return globalThis.ArrayBuffer.isView(t)}a(Nks,"IsTypedArray");function Dks(t){return t instanceof globalThis.Int8Array}a(Dks,"IsInt8Array");function Mks(t){return t instanceof globalThis.Uint8Array}a(Mks,"IsUint8Array");function Oks(t){return t instanceof globalThis.Uint8ClampedArray}a(Oks,"IsUint8ClampedArray");function Bks(t){return t instanceof globalThis.Int16Array}a(Bks,"IsInt16Array");function Lks(t){return t instanceof globalThis.Uint16Array}a(Lks,"IsUint16Array");function Fks(t){return t instanceof globalThis.Int32Array}a(Fks,"IsInt32Array");function Uks(t){return t instanceof globalThis.Uint32Array}a(Uks,"IsUint32Array");function Qks(t){return t instanceof globalThis.Float32Array}a(Qks,"IsFloat32Array");function qks(t){return t instanceof globalThis.Float64Array}a(qks,"IsFloat64Array");function Gks(t){return t instanceof globalThis.BigInt64Array}a(Gks,"IsBigInt64Array");function Hks(t){return t instanceof globalThis.BigUint64Array}a(Hks,"IsBigUint64Array");function jks(t,e){return e in t}a(jks,"HasPropertyKey");function Axe(t){return t!==null&&typeof t=="object"}a(Axe,"IsObject");function Ajn(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}a(Ajn,"IsArray");function yjn(t){return t===void 0}a(yjn,"IsUndefined");function Ejn(t){return t===null}a(Ejn,"IsNull");function Cjn(t){return typeof t=="boolean"}a(Cjn,"IsBoolean");function _jn(t){return typeof t=="number"}a(_jn,"IsNumber");function $ks(t){return globalThis.Number.isInteger(t)}a($ks,"IsInteger");function vjn(t){return typeof t=="bigint"}a(vjn,"IsBigInt");function bjn(t){return typeof t=="string"}a(bjn,"IsString");function Tjn(t){return typeof t=="function"}a(Tjn,"IsFunction");function Sjn(t){return typeof t=="symbol"}a(Sjn,"IsSymbol");function Vks(t){return vjn(t)||Cjn(t)||Ejn(t)||_jn(t)||bjn(t)||Sjn(t)||yjn(t)}a(Vks,"IsValueType")});var Op=T(EY=>{"use strict";f();var Wks=EY&&EY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zks=EY&&EY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wks(e,t,r)};Object.defineProperty(EY,"__esModule",{value:!0});zks(Ont(),EY)});var yxe=T(Lnt=>{"use strict";f();Object.defineProperty(Lnt,"__esModule",{value:!0});Lnt.TypeSystemPolicy=void 0;var Bnt=Op(),Ijn;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(c,l){return t.ExactOptionalPropertyTypes?l in c:c[l]!==void 0}a(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function r(c){let l=(0,Bnt.IsObject)(c);return t.AllowArrayObject?l:l&&!(0,Bnt.IsArray)(c)}a(r,"IsObjectLike"),t.IsObjectLike=r;function n(c){return r(c)&&!(c instanceof Date)&&!(c instanceof Uint8Array)}a(n,"IsRecordLike"),t.IsRecordLike=n;function o(c){return t.AllowNaN?(0,Bnt.IsNumber)(c):Number.isFinite(c)}a(o,"IsNumberLike"),t.IsNumberLike=o;function s(c){let l=(0,Bnt.IsUndefined)(c);return t.AllowNullVoid?l||c===null:l}a(s,"IsVoidLike"),t.IsVoidLike=s})(Ijn||(Lnt.TypeSystemPolicy=Ijn={}))});var xjn=T(hB=>{"use strict";f();var Yks=hB&&hB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kks=hB&&hB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jks=hB&&hB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oFnt(e))}a(Xks,"ImmutableArray");function Zks(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Fnt(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Fnt(t[r]);return globalThis.Object.freeze(e)}a(Zks,"ImmutableObject");function Fnt(t){return Exe.IsArray(t)?Xks(t):Exe.IsDate(t)?t:Exe.IsUint8Array(t)?t:Exe.IsRegExp(t)?t:Exe.IsObject(t)?Zks(t):t}a(Fnt,"Immutable")});var Zn=T($er=>{"use strict";f();Object.defineProperty($er,"__esModule",{value:!0});$er.CreateType=nNs;var eNs=yxe(),tNs=xjn(),rNs=c_();function nNs(t,e){let r=e!==void 0?{...e,...t}:t;switch(eNs.TypeSystemPolicy.InstanceMode){case"freeze":return(0,tNs.Immutable)(r);case"clone":return(0,rNs.Clone)(r);default:return r}}a(nNs,"CreateType")});var mB=T(CY=>{"use strict";f();var iNs=CY&&CY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oNs=CY&&CY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iNs(e,t,r)};Object.defineProperty(CY,"__esModule",{value:!0});oNs(Zn(),CY)});var Wer=T(Unt=>{"use strict";f();Object.defineProperty(Unt,"__esModule",{value:!0});Unt.TypeBoxError=void 0;var Ver=class extends Error{static{a(this,"TypeBoxError")}constructor(e){super(e)}};Unt.TypeBoxError=Ver});var hd=T(_Y=>{"use strict";f();var sNs=_Y&&_Y.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aNs=_Y&&_Y.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sNs(e,t,r)};Object.defineProperty(_Y,"__esModule",{value:!0});aNs(Wer(),_Y)});var Cxe=T(YS=>{"use strict";f();Object.defineProperty(YS,"__esModule",{value:!0});YS.Kind=YS.Hint=YS.OptionalKind=YS.ReadonlyKind=YS.TransformKind=void 0;YS.TransformKind=Symbol.for("TypeBox.Transform");YS.ReadonlyKind=Symbol.for("TypeBox.Readonly");YS.OptionalKind=Symbol.for("TypeBox.Optional");YS.Hint=Symbol.for("TypeBox.Hint");YS.Kind=Symbol.for("TypeBox.Kind")});var nn=T(vY=>{"use strict";f();var cNs=vY&&vY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lNs=vY&&vY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cNs(e,t,r)};Object.defineProperty(vY,"__esModule",{value:!0});lNs(Cxe(),vY)});var Bo=T(Qn=>{"use strict";f();var uNs=Qn&&Qn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dNs=Qn&&Qn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fNs=Qn&&Qn.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var TNs=wn&&wn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),SNs=wn&&wn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),INs=wn&&wn.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=7&&r<=13||r===27||r===127)return!1}return!0}a(Yer,"IsControlCharacterFree");function d$n(t){return Ker(t)||Gh(t)}a(d$n,"IsAdditionalProperties");function vxe(t){return On.IsUndefined(t)||On.IsBigInt(t)}a(vxe,"IsOptionalBigInt");function Xc(t){return On.IsUndefined(t)||On.IsNumber(t)}a(Xc,"IsOptionalNumber");function Ker(t){return On.IsUndefined(t)||On.IsBoolean(t)}a(Ker,"IsOptionalBoolean");function pc(t){return On.IsUndefined(t)||On.IsString(t)}a(pc,"IsOptionalString");function RNs(t){return On.IsUndefined(t)||On.IsString(t)&&Yer(t)&&u$n(t)}a(RNs,"IsOptionalPattern");function PNs(t){return On.IsUndefined(t)||On.IsString(t)&&Yer(t)}a(PNs,"IsOptionalFormat");function f$n(t){return On.IsUndefined(t)||Gh(t)}a(f$n,"IsOptionalSchema");function kNs(t){return On.IsObject(t)&&t[ID.ReadonlyKind]==="Readonly"}a(kNs,"IsReadonly");function NNs(t){return On.IsObject(t)&&t[ID.OptionalKind]==="Optional"}a(NNs,"IsOptional");function p$n(t){return is(t,"Any")&&pc(t.$id)}a(p$n,"IsAny");function h$n(t){return is(t,"Argument")&&On.IsNumber(t.index)}a(h$n,"IsArgument");function m$n(t){return is(t,"Array")&&t.type==="array"&&pc(t.$id)&&Gh(t.items)&&Xc(t.minItems)&&Xc(t.maxItems)&&Ker(t.uniqueItems)&&f$n(t.contains)&&Xc(t.minContains)&&Xc(t.maxContains)}a(m$n,"IsArray");function g$n(t){return is(t,"AsyncIterator")&&t.type==="AsyncIterator"&&pc(t.$id)&&Gh(t.items)}a(g$n,"IsAsyncIterator");function A$n(t){return is(t,"BigInt")&&t.type==="bigint"&&pc(t.$id)&&vxe(t.exclusiveMaximum)&&vxe(t.exclusiveMinimum)&&vxe(t.maximum)&&vxe(t.minimum)&&vxe(t.multipleOf)}a(A$n,"IsBigInt");function y$n(t){return is(t,"Boolean")&&t.type==="boolean"&&pc(t.$id)}a(y$n,"IsBoolean");function E$n(t){return is(t,"Computed")&&On.IsString(t.target)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Gh(e))}a(E$n,"IsComputed");function C$n(t){return is(t,"Constructor")&&t.type==="Constructor"&&pc(t.$id)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Gh(e))&&Gh(t.returns)}a(C$n,"IsConstructor");function _$n(t){return is(t,"Date")&&t.type==="Date"&&pc(t.$id)&&Xc(t.exclusiveMaximumTimestamp)&&Xc(t.exclusiveMinimumTimestamp)&&Xc(t.maximumTimestamp)&&Xc(t.minimumTimestamp)&&Xc(t.multipleOfTimestamp)}a(_$n,"IsDate");function v$n(t){return is(t,"Function")&&t.type==="Function"&&pc(t.$id)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Gh(e))&&Gh(t.returns)}a(v$n,"IsFunction");function DNs(t){return is(t,"Import")&&On.HasPropertyKey(t,"$defs")&&On.IsObject(t.$defs)&&Qnt(t.$defs)&&On.HasPropertyKey(t,"$ref")&&On.IsString(t.$ref)&&t.$ref in t.$defs}a(DNs,"IsImport");function b$n(t){return is(t,"Integer")&&t.type==="integer"&&pc(t.$id)&&Xc(t.exclusiveMaximum)&&Xc(t.exclusiveMinimum)&&Xc(t.maximum)&&Xc(t.minimum)&&Xc(t.multipleOf)}a(b$n,"IsInteger");function Qnt(t){return On.IsObject(t)&&Object.entries(t).every(([e,r])=>Yer(e)&&Gh(r))}a(Qnt,"IsProperties");function T$n(t){return is(t,"Intersect")&&!(On.IsString(t.type)&&t.type!=="object")&&On.IsArray(t.allOf)&&t.allOf.every(e=>Gh(e)&&!j$n(e))&&pc(t.type)&&(Ker(t.unevaluatedProperties)||f$n(t.unevaluatedProperties))&&pc(t.$id)}a(T$n,"IsIntersect");function S$n(t){return is(t,"Iterator")&&t.type==="Iterator"&&pc(t.$id)&&Gh(t.items)}a(S$n,"IsIterator");function is(t,e){return On.IsObject(t)&&ID.Kind in t&&t[ID.Kind]===e}a(is,"IsKindOf");function I$n(t){return bxe(t)&&On.IsString(t.const)}a(I$n,"IsLiteralString");function x$n(t){return bxe(t)&&On.IsNumber(t.const)}a(x$n,"IsLiteralNumber");function MNs(t){return bxe(t)&&On.IsBoolean(t.const)}a(MNs,"IsLiteralBoolean");function bxe(t){return is(t,"Literal")&&pc(t.$id)&&w$n(t.const)}a(bxe,"IsLiteral");function w$n(t){return On.IsBoolean(t)||On.IsNumber(t)||On.IsString(t)}a(w$n,"IsLiteralValue");function R$n(t){return is(t,"MappedKey")&&On.IsArray(t.keys)&&t.keys.every(e=>On.IsNumber(e)||On.IsString(e))}a(R$n,"IsMappedKey");function P$n(t){return is(t,"MappedResult")&&Qnt(t.properties)}a(P$n,"IsMappedResult");function k$n(t){return is(t,"Never")&&On.IsObject(t.not)&&Object.getOwnPropertyNames(t.not).length===0}a(k$n,"IsNever");function N$n(t){return is(t,"Not")&&Gh(t.not)}a(N$n,"IsNot");function D$n(t){return is(t,"Null")&&t.type==="null"&&pc(t.$id)}a(D$n,"IsNull");function M$n(t){return is(t,"Number")&&t.type==="number"&&pc(t.$id)&&Xc(t.exclusiveMaximum)&&Xc(t.exclusiveMinimum)&&Xc(t.maximum)&&Xc(t.minimum)&&Xc(t.multipleOf)}a(M$n,"IsNumber");function O$n(t){return is(t,"Object")&&t.type==="object"&&pc(t.$id)&&Qnt(t.properties)&&d$n(t.additionalProperties)&&Xc(t.minProperties)&&Xc(t.maxProperties)}a(O$n,"IsObject");function B$n(t){return is(t,"Promise")&&t.type==="Promise"&&pc(t.$id)&&Gh(t.item)}a(B$n,"IsPromise");function L$n(t){return is(t,"Record")&&t.type==="object"&&pc(t.$id)&&d$n(t.additionalProperties)&&On.IsObject(t.patternProperties)&&(e=>{let r=Object.getOwnPropertyNames(e.patternProperties);return r.length===1&&u$n(r[0])&&On.IsObject(e.patternProperties)&&Gh(e.patternProperties[r[0]])})(t)}a(L$n,"IsRecord");function ONs(t){return On.IsObject(t)&&ID.Hint in t&&t[ID.Hint]==="Recursive"}a(ONs,"IsRecursive");function F$n(t){return is(t,"Ref")&&pc(t.$id)&&On.IsString(t.$ref)}a(F$n,"IsRef");function U$n(t){return is(t,"RegExp")&&pc(t.$id)&&On.IsString(t.source)&&On.IsString(t.flags)&&Xc(t.maxLength)&&Xc(t.minLength)}a(U$n,"IsRegExp");function Q$n(t){return is(t,"String")&&t.type==="string"&&pc(t.$id)&&Xc(t.minLength)&&Xc(t.maxLength)&&RNs(t.pattern)&&PNs(t.format)}a(Q$n,"IsString");function q$n(t){return is(t,"Symbol")&&t.type==="symbol"&&pc(t.$id)}a(q$n,"IsSymbol");function G$n(t){return is(t,"TemplateLiteral")&&t.type==="string"&&On.IsString(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}a(G$n,"IsTemplateLiteral");function H$n(t){return is(t,"This")&&pc(t.$id)&&On.IsString(t.$ref)}a(H$n,"IsThis");function j$n(t){return On.IsObject(t)&&ID.TransformKind in t}a(j$n,"IsTransform");function $$n(t){return is(t,"Tuple")&&t.type==="array"&&pc(t.$id)&&On.IsNumber(t.minItems)&&On.IsNumber(t.maxItems)&&t.minItems===t.maxItems&&(On.IsUndefined(t.items)&&On.IsUndefined(t.additionalItems)&&t.minItems===0||On.IsArray(t.items)&&t.items.every(e=>Gh(e)))}a($$n,"IsTuple");function V$n(t){return is(t,"Undefined")&&t.type==="undefined"&&pc(t.$id)}a(V$n,"IsUndefined");function BNs(t){return Jer(t)&&t.anyOf.every(e=>I$n(e)||x$n(e))}a(BNs,"IsUnionLiteral");function Jer(t){return is(t,"Union")&&pc(t.$id)&&On.IsObject(t)&&On.IsArray(t.anyOf)&&t.anyOf.every(e=>Gh(e))}a(Jer,"IsUnion");function W$n(t){return is(t,"Uint8Array")&&t.type==="Uint8Array"&&pc(t.$id)&&Xc(t.minByteLength)&&Xc(t.maxByteLength)}a(W$n,"IsUint8Array");function z$n(t){return is(t,"Unknown")&&pc(t.$id)}a(z$n,"IsUnknown");function Y$n(t){return is(t,"Unsafe")}a(Y$n,"IsUnsafe");function K$n(t){return is(t,"Void")&&t.type==="void"&&pc(t.$id)}a(K$n,"IsVoid");function J$n(t){return On.IsObject(t)&&ID.Kind in t&&On.IsString(t[ID.Kind])&&!wNs.includes(t[ID.Kind])}a(J$n,"IsKind");function Gh(t){return On.IsObject(t)&&(p$n(t)||h$n(t)||m$n(t)||y$n(t)||A$n(t)||g$n(t)||E$n(t)||C$n(t)||_$n(t)||v$n(t)||b$n(t)||T$n(t)||S$n(t)||bxe(t)||R$n(t)||P$n(t)||k$n(t)||N$n(t)||D$n(t)||M$n(t)||O$n(t)||B$n(t)||L$n(t)||F$n(t)||U$n(t)||Q$n(t)||q$n(t)||G$n(t)||H$n(t)||$$n(t)||V$n(t)||Jer(t)||W$n(t)||z$n(t)||Y$n(t)||K$n(t)||J$n(t))}a(Gh,"IsSchema")});var Zer=T(u_=>{"use strict";f();var LNs=u_&&u_.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FNs=u_&&u_.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xer=u_&&u_.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(etr,"__esModule",{value:!0});etr.Increment=UNs;function UNs(t){return(parseInt(t)+1).toString()}a(UNs,"Increment")});var eVn=T(bY=>{"use strict";f();var QNs=bY&&bY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qNs=bY&&bY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&QNs(e,t,r)};Object.defineProperty(bY,"__esModule",{value:!0});qNs(Z$n(),bY)});var tVn=T(ef=>{"use strict";f();Object.defineProperty(ef,"__esModule",{value:!0});ef.PatternNeverExact=ef.PatternStringExact=ef.PatternNumberExact=ef.PatternBooleanExact=ef.PatternNever=ef.PatternString=ef.PatternNumber=ef.PatternBoolean=void 0;ef.PatternBoolean="(true|false)";ef.PatternNumber="(0|[1-9][0-9]*)";ef.PatternString="(.*)";ef.PatternNever="(?!.*)";ef.PatternBooleanExact=`^${ef.PatternBoolean}$`;ef.PatternNumberExact=`^${ef.PatternNumber}$`;ef.PatternStringExact=`^${ef.PatternString}$`;ef.PatternNeverExact=`^${ef.PatternNever}$`});var Txe=T(TY=>{"use strict";f();var GNs=TY&&TY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),HNs=TY&&TY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&GNs(e,t,r)};Object.defineProperty(TY,"__esModule",{value:!0});HNs(tVn(),TY)});var rVn=T(yU=>{"use strict";f();Object.defineProperty(yU,"__esModule",{value:!0});yU.Entries=jNs;yU.Clear=$Ns;yU.Delete=VNs;yU.Has=WNs;yU.Set=zNs;yU.Get=YNs;var pue=new Map;function jNs(){return new Map(pue)}a(jNs,"Entries");function $Ns(){return pue.clear()}a($Ns,"Clear");function VNs(t){return pue.delete(t)}a(VNs,"Delete");function WNs(t){return pue.has(t)}a(WNs,"Has");function zNs(t,e){pue.set(t,e)}a(zNs,"Set");function YNs(t){return pue.get(t)}a(YNs,"Get")});var nVn=T(EU=>{"use strict";f();Object.defineProperty(EU,"__esModule",{value:!0});EU.Entries=KNs;EU.Clear=JNs;EU.Delete=XNs;EU.Has=ZNs;EU.Set=eDs;EU.Get=tDs;var hue=new Map;function KNs(){return new Map(hue)}a(KNs,"Entries");function JNs(){return hue.clear()}a(JNs,"Clear");function XNs(t){return hue.delete(t)}a(XNs,"Delete");function ZNs(t){return hue.has(t)}a(ZNs,"Has");function eDs(t,e){hue.set(t,e)}a(eDs,"Set");function tDs(t){return hue.get(t)}a(tDs,"Get")});var mue=T(KS=>{"use strict";f();var rDs=KS&&KS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nDs=KS&&KS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),iVn=KS&&KS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(xD,"__esModule",{value:!0});xD.SetIncludes=oVn;xD.SetIsSubset=iDs;xD.SetDistinct=oDs;xD.SetIntersect=sVn;xD.SetUnion=sDs;xD.SetComplement=aDs;xD.SetIntersectMany=lDs;xD.SetUnionMany=uDs;function oVn(t,e){return t.includes(e)}a(oVn,"SetIncludes");function iDs(t,e){return t.every(r=>oVn(e,r))}a(iDs,"SetIsSubset");function oDs(t){return[...new Set(t)]}a(oDs,"SetDistinct");function sVn(t,e){return t.filter(r=>e.includes(r))}a(sVn,"SetIntersect");function sDs(t,e){return[...t,...e]}a(sDs,"SetUnion");function aDs(t,e){return t.filter(r=>!e.includes(r))}a(aDs,"SetComplement");function cDs(t,e){return t.reduce((r,n)=>sVn(r,n),e)}a(cDs,"SetIntersectManyResolve");function lDs(t){return t.length===1?t[0]:t.length>1?cDs(t.slice(1),t[0]):[]}a(lDs,"SetIntersectMany");function uDs(t){let e=[];for(let r of t)e.push(...r);return e}a(uDs,"SetUnionMany")});var Sxe=T(SY=>{"use strict";f();var dDs=SY&&SY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fDs=SY&&SY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dDs(e,t,r)};Object.defineProperty(SY,"__esModule",{value:!0});fDs(aVn(),SY)});var cVn=T(ttr=>{"use strict";f();Object.defineProperty(ttr,"__esModule",{value:!0});ttr.Any=mDs;var pDs=mB(),hDs=nn();function mDs(t){return(0,pDs.CreateType)({[hDs.Kind]:"Any"},t)}a(mDs,"Any")});var gue=T(IY=>{"use strict";f();var gDs=IY&&IY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ADs=IY&&IY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&gDs(e,t,r)};Object.defineProperty(IY,"__esModule",{value:!0});ADs(cVn(),IY)});var lVn=T(rtr=>{"use strict";f();Object.defineProperty(rtr,"__esModule",{value:!0});rtr.Array=CDs;var yDs=Zn(),EDs=nn();function CDs(t,e){return(0,yDs.CreateType)({[EDs.Kind]:"Array",type:"array",items:t},e)}a(CDs,"Array")});var Aue=T(xY=>{"use strict";f();var _Ds=xY&&xY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vDs=xY&&xY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_Ds(e,t,r)};Object.defineProperty(xY,"__esModule",{value:!0});vDs(lVn(),xY)});var uVn=T(ntr=>{"use strict";f();Object.defineProperty(ntr,"__esModule",{value:!0});ntr.Argument=SDs;var bDs=Zn(),TDs=nn();function SDs(t){return(0,bDs.CreateType)({[TDs.Kind]:"Argument",index:t})}a(SDs,"Argument")});var qnt=T(wY=>{"use strict";f();var IDs=wY&&wY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xDs=wY&&wY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&IDs(e,t,r)};Object.defineProperty(wY,"__esModule",{value:!0});xDs(uVn(),wY)});var dVn=T(itr=>{"use strict";f();Object.defineProperty(itr,"__esModule",{value:!0});itr.AsyncIterator=PDs;var wDs=nn(),RDs=Zn();function PDs(t,e){return(0,RDs.CreateType)({[wDs.Kind]:"AsyncIterator",type:"AsyncIterator",items:t},e)}a(PDs,"AsyncIterator")});var yue=T(RY=>{"use strict";f();var kDs=RY&&RY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NDs=RY&&RY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kDs(e,t,r)};Object.defineProperty(RY,"__esModule",{value:!0});NDs(dVn(),RY)});var fVn=T(otr=>{"use strict";f();Object.defineProperty(otr,"__esModule",{value:!0});otr.Computed=ODs;var DDs=mB(),MDs=Cxe();function ODs(t,e,r){return(0,DDs.CreateType)({[MDs.Kind]:"Computed",target:t,parameters:e},r)}a(ODs,"Computed")});var CU=T(PY=>{"use strict";f();var BDs=PY&&PY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LDs=PY&&PY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BDs(e,t,r)};Object.defineProperty(PY,"__esModule",{value:!0});LDs(fVn(),PY)});var Gnt=T(str=>{"use strict";f();Object.defineProperty(str,"__esModule",{value:!0});str.Discard=UDs;function FDs(t,e){let{[e]:r,...n}=t;return n}a(FDs,"DiscardKey");function UDs(t,e){return e.reduce((r,n)=>FDs(r,n),t)}a(UDs,"Discard")});var AB=T(kY=>{"use strict";f();var QDs=kY&&kY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qDs=kY&&kY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&QDs(e,t,r)};Object.defineProperty(kY,"__esModule",{value:!0});qDs(Gnt(),kY)});var pVn=T(atr=>{"use strict";f();Object.defineProperty(atr,"__esModule",{value:!0});atr.Never=jDs;var GDs=Zn(),HDs=nn();function jDs(t){return(0,GDs.CreateType)({[HDs.Kind]:"Never",not:{}},t)}a(jDs,"Never")});var U0=T(NY=>{"use strict";f();var $Ds=NY&&NY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),VDs=NY&&NY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$Ds(e,t,r)};Object.defineProperty(NY,"__esModule",{value:!0});VDs(pVn(),NY)});var hVn=T(ctr=>{"use strict";f();Object.defineProperty(ctr,"__esModule",{value:!0});ctr.MappedKey=YDs;var WDs=Zn(),zDs=nn();function YDs(t){return(0,WDs.CreateType)({[zDs.Kind]:"MappedKey",keys:t})}a(YDs,"MappedKey")});var utr=T(ltr=>{"use strict";f();Object.defineProperty(ltr,"__esModule",{value:!0});ltr.MappedResult=XDs;var KDs=Zn(),JDs=nn();function XDs(t){return(0,KDs.CreateType)({[JDs.Kind]:"MappedResult",properties:t})}a(XDs,"MappedResult")});var mVn=T(dtr=>{"use strict";f();Object.defineProperty(dtr,"__esModule",{value:!0});dtr.Constructor=t5s;var ZDs=Zn(),e5s=nn();function t5s(t,e,r){return(0,ZDs.CreateType)({[e5s.Kind]:"Constructor",type:"Constructor",parameters:t,returns:e},r)}a(t5s,"Constructor")});var Eue=T(DY=>{"use strict";f();var r5s=DY&&DY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),n5s=DY&&DY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&r5s(e,t,r)};Object.defineProperty(DY,"__esModule",{value:!0});n5s(mVn(),DY)});var gVn=T(ftr=>{"use strict";f();Object.defineProperty(ftr,"__esModule",{value:!0});ftr.Function=s5s;var i5s=Zn(),o5s=nn();function s5s(t,e,r){return(0,i5s.CreateType)({[o5s.Kind]:"Function",type:"Function",parameters:t,returns:e},r)}a(s5s,"Function")});var _U=T(MY=>{"use strict";f();var a5s=MY&&MY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),c5s=MY&&MY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&a5s(e,t,r)};Object.defineProperty(MY,"__esModule",{value:!0});c5s(gVn(),MY)});var htr=T(ptr=>{"use strict";f();Object.defineProperty(ptr,"__esModule",{value:!0});ptr.UnionCreate=d5s;var l5s=Zn(),u5s=nn();function d5s(t,e){return(0,l5s.CreateType)({[u5s.Kind]:"Union",anyOf:t},e)}a(d5s,"UnionCreate")});var CVn=T(mtr=>{"use strict";f();Object.defineProperty(mtr,"__esModule",{value:!0});mtr.UnionEvaluated=C5s;var f5s=Zn(),p5s=nn(),h5s=AB(),m5s=U0(),g5s=wD(),AVn=htr(),EVn=Bo();function A5s(t){return t.some(e=>(0,EVn.IsOptional)(e))}a(A5s,"IsUnionOptional");function yVn(t){return t.map(e=>(0,EVn.IsOptional)(e)?y5s(e):e)}a(yVn,"RemoveOptionalFromRest");function y5s(t){return(0,h5s.Discard)(t,[p5s.OptionalKind])}a(y5s,"RemoveOptionalFromType");function E5s(t,e){return A5s(t)?(0,g5s.Optional)((0,AVn.UnionCreate)(yVn(t),e)):(0,AVn.UnionCreate)(yVn(t),e)}a(E5s,"ResolveUnion");function C5s(t,e){return t.length===1?(0,f5s.CreateType)(t[0],e):t.length===0?(0,m5s.Never)(e):E5s(t,e)}a(C5s,"UnionEvaluated")});var vVn=T(_Vn=>{"use strict";f();Object.defineProperty(_Vn,"__esModule",{value:!0});var DOd=nn()});var bVn=T(gtr=>{"use strict";f();Object.defineProperty(gtr,"__esModule",{value:!0});gtr.Union=T5s;var _5s=U0(),v5s=Zn(),b5s=htr();function T5s(t,e){return t.length===0?(0,_5s.Never)(e):t.length===1?(0,v5s.CreateType)(t[0],e):(0,b5s.UnionCreate)(t,e)}a(T5s,"Union")});var tf=T(yB=>{"use strict";f();var S5s=yB&&yB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Atr=yB&&yB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&S5s(e,t,r)};Object.defineProperty(yB,"__esModule",{value:!0});Atr(CVn(),yB);Atr(vVn(),yB);Atr(bVn(),yB)});var Hnt=T(Cue=>{"use strict";f();Object.defineProperty(Cue,"__esModule",{value:!0});Cue.TemplateLiteralParserError=void 0;Cue.TemplateLiteralParse=OY;Cue.TemplateLiteralParseExact=M5s;var I5s=hd(),Ixe=class extends I5s.TypeBoxError{static{a(this,"TemplateLiteralParserError")}};Cue.TemplateLiteralParserError=Ixe;function x5s(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}a(x5s,"Unescape");function ytr(t,e,r){return t[e]===r&&t.charCodeAt(e-1)!==92}a(ytr,"IsNonEscaped");function EB(t,e){return ytr(t,e,"(")}a(EB,"IsOpenParen");function xxe(t,e){return ytr(t,e,")")}a(xxe,"IsCloseParen");function TVn(t,e){return ytr(t,e,"|")}a(TVn,"IsSeparator");function w5s(t){if(!(EB(t,0)&&xxe(t,t.length-1)))return!1;let e=0;for(let r=0;r0&&n.push(OY(c)),r=s+1}let o=t.slice(r);return o.length>0&&n.push(OY(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}a(N5s,"Or");function D5s(t){function e(o,s){if(!EB(o,s))throw new Ixe("TemplateLiteralParser: Index must point to open parens");let c=0;for(let l=s;l0&&n.push(OY(l)),o=c-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}a(D5s,"And");function OY(t){return w5s(t)?OY(R5s(t)):P5s(t)?N5s(t):k5s(t)?D5s(t):{type:"const",const:x5s(t)}}a(OY,"TemplateLiteralParse");function M5s(t){return OY(t.slice(1,t.length-1))}a(M5s,"TemplateLiteralParseExact")});var Etr=T(_ue=>{"use strict";f();Object.defineProperty(_ue,"__esModule",{value:!0});_ue.TemplateLiteralFiniteError=void 0;_ue.IsTemplateLiteralExpressionFinite=$nt;_ue.IsTemplateLiteralFinite=Q5s;var O5s=Hnt(),B5s=hd(),jnt=class extends B5s.TypeBoxError{static{a(this,"TemplateLiteralFiniteError")}};_ue.TemplateLiteralFiniteError=jnt;function L5s(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}a(L5s,"IsNumberExpression");function F5s(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}a(F5s,"IsBooleanExpression");function U5s(t){return t.type==="const"&&t.const===".*"}a(U5s,"IsStringExpression");function $nt(t){return L5s(t)||U5s(t)?!1:F5s(t)?!0:t.type==="and"?t.expr.every(e=>$nt(e)):t.type==="or"?t.expr.every(e=>$nt(e)):t.type==="const"?!0:(()=>{throw new jnt("Unknown expression type")})()}a($nt,"IsTemplateLiteralExpressionFinite");function Q5s(t){let e=(0,O5s.TemplateLiteralParseExact)(t.pattern);return $nt(e)}a(Q5s,"IsTemplateLiteralFinite")});var Ctr=T(vue=>{"use strict";f();Object.defineProperty(vue,"__esModule",{value:!0});vue.TemplateLiteralGenerateError=void 0;vue.TemplateLiteralExpressionGenerate=Wnt;vue.TemplateLiteralGenerate=W5s;var q5s=Etr(),G5s=Hnt(),H5s=hd(),Vnt=class extends H5s.TypeBoxError{static{a(this,"TemplateLiteralGenerateError")}};vue.TemplateLiteralGenerateError=Vnt;function*SVn(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let r of SVn(t.slice(1)))yield`${e}${r}`}a(SVn,"GenerateReduce");function*j5s(t){return yield*SVn(t.expr.map(e=>[...Wnt(e)]))}a(j5s,"GenerateAnd");function*$5s(t){for(let e of t.expr)yield*Wnt(e)}a($5s,"GenerateOr");function*V5s(t){return yield t.const}a(V5s,"GenerateConst");function*Wnt(t){return t.type==="and"?yield*j5s(t):t.type==="or"?yield*$5s(t):t.type==="const"?yield*V5s(t):(()=>{throw new Vnt("Unknown expression")})()}a(Wnt,"TemplateLiteralExpressionGenerate");function W5s(t){let e=(0,G5s.TemplateLiteralParseExact)(t.pattern);return(0,q5s.IsTemplateLiteralExpressionFinite)(e)?[...Wnt(e)]:[]}a(W5s,"TemplateLiteralGenerate")});var IVn=T(_tr=>{"use strict";f();Object.defineProperty(_tr,"__esModule",{value:!0});_tr.Literal=K5s;var z5s=Zn(),Y5s=nn();function K5s(t,e){return(0,z5s.CreateType)({[Y5s.Kind]:"Literal",const:t,type:typeof t},e)}a(K5s,"Literal")});var AA=T(BY=>{"use strict";f();var J5s=BY&&BY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),X5s=BY&&BY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&J5s(e,t,r)};Object.defineProperty(BY,"__esModule",{value:!0});X5s(IVn(),BY)});var xVn=T(vtr=>{"use strict";f();Object.defineProperty(vtr,"__esModule",{value:!0});vtr.Boolean=tMs;var Z5s=nn(),eMs=mB();function tMs(t){return(0,eMs.CreateType)({[Z5s.Kind]:"Boolean",type:"boolean"},t)}a(tMs,"Boolean")});var wxe=T(LY=>{"use strict";f();var rMs=LY&&LY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nMs=LY&&LY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rMs(e,t,r)};Object.defineProperty(LY,"__esModule",{value:!0});nMs(xVn(),LY)});var wVn=T(btr=>{"use strict";f();Object.defineProperty(btr,"__esModule",{value:!0});btr.BigInt=sMs;var iMs=nn(),oMs=mB();function sMs(t){return(0,oMs.CreateType)({[iMs.Kind]:"BigInt",type:"bigint"},t)}a(sMs,"BigInt")});var bue=T(FY=>{"use strict";f();var aMs=FY&&FY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cMs=FY&&FY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&aMs(e,t,r)};Object.defineProperty(FY,"__esModule",{value:!0});cMs(wVn(),FY)});var RVn=T(Ttr=>{"use strict";f();Object.defineProperty(Ttr,"__esModule",{value:!0});Ttr.Number=dMs;var lMs=Zn(),uMs=nn();function dMs(t){return(0,lMs.CreateType)({[uMs.Kind]:"Number",type:"number"},t)}a(dMs,"Number")});var vU=T(UY=>{"use strict";f();var fMs=UY&&UY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pMs=UY&&UY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fMs(e,t,r)};Object.defineProperty(UY,"__esModule",{value:!0});pMs(RVn(),UY)});var PVn=T(Str=>{"use strict";f();Object.defineProperty(Str,"__esModule",{value:!0});Str.String=gMs;var hMs=Zn(),mMs=nn();function gMs(t){return(0,hMs.CreateType)({[mMs.Kind]:"String",type:"string"},t)}a(gMs,"String")});var bU=T(QY=>{"use strict";f();var AMs=QY&&QY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yMs=QY&&QY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AMs(e,t,r)};Object.defineProperty(QY,"__esModule",{value:!0});yMs(PVn(),QY)});var wtr=T(xtr=>{"use strict";f();Object.defineProperty(xtr,"__esModule",{value:!0});xtr.TemplateLiteralSyntax=xMs;var Rxe=AA(),EMs=wxe(),CMs=bue(),_Ms=vU(),vMs=bU(),bMs=tf(),TMs=U0();function*SMs(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield(0,EMs.Boolean)():e==="number"?yield(0,_Ms.Number)():e==="bigint"?yield(0,CMs.BigInt)():e==="string"?yield(0,vMs.String)():yield(()=>{let r=e.split("|").map(n=>(0,Rxe.Literal)(n.trim()));return r.length===0?(0,TMs.Never)():r.length===1?r[0]:(0,bMs.UnionEvaluated)(r)})()}a(SMs,"FromUnion");function*IMs(t){if(t[1]!=="{"){let e=(0,Rxe.Literal)("$"),r=Itr(t.slice(1));return yield*[e,...r]}for(let e=2;e{"use strict";f();Object.defineProperty(kxe,"__esModule",{value:!0});kxe.TemplateLiteralPatternError=void 0;kxe.TemplateLiteralPattern=kMs;var Pxe=Txe(),wMs=nn(),RMs=hd(),TU=Bo(),znt=class extends RMs.TypeBoxError{static{a(this,"TemplateLiteralPatternError")}};kxe.TemplateLiteralPatternError=znt;function PMs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(PMs,"Escape");function kVn(t,e){return(0,TU.IsTemplateLiteral)(t)?t.pattern.slice(1,t.pattern.length-1):(0,TU.IsUnion)(t)?`(${t.anyOf.map(r=>kVn(r,e)).join("|")})`:(0,TU.IsNumber)(t)?`${e}${Pxe.PatternNumber}`:(0,TU.IsInteger)(t)?`${e}${Pxe.PatternNumber}`:(0,TU.IsBigInt)(t)?`${e}${Pxe.PatternNumber}`:(0,TU.IsString)(t)?`${e}${Pxe.PatternString}`:(0,TU.IsLiteral)(t)?`${e}${PMs(t.const.toString())}`:(0,TU.IsBoolean)(t)?`${e}${Pxe.PatternBoolean}`:(()=>{throw new znt(`Unexpected Kind '${t[wMs.Kind]}'`)})()}a(kVn,"Visit");function kMs(t){return`^${t.map(e=>kVn(e,"")).join("")}$`}a(kMs,"TemplateLiteralPattern")});var NVn=T(Ptr=>{"use strict";f();Object.defineProperty(Ptr,"__esModule",{value:!0});Ptr.TemplateLiteralToUnion=OMs;var NMs=tf(),DMs=AA(),MMs=Ctr();function OMs(t){let r=(0,MMs.TemplateLiteralGenerate)(t).map(n=>(0,DMs.Literal)(n));return(0,NMs.UnionEvaluated)(r)}a(OMs,"TemplateLiteralToUnion")});var MVn=T(ktr=>{"use strict";f();Object.defineProperty(ktr,"__esModule",{value:!0});ktr.TemplateLiteral=QMs;var BMs=Zn(),LMs=wtr(),DVn=Rtr(),FMs=Gy(),UMs=nn();function QMs(t,e){let r=(0,FMs.IsString)(t)?(0,DVn.TemplateLiteralPattern)((0,LMs.TemplateLiteralSyntax)(t)):(0,DVn.TemplateLiteralPattern)(t);return(0,BMs.CreateType)({[UMs.Kind]:"TemplateLiteral",type:"string",pattern:r},e)}a(QMs,"TemplateLiteral")});var lR=T(eb=>{"use strict";f();var qMs=eb&&eb.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qY=eb&&eb.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qMs(e,t,r)};Object.defineProperty(eb,"__esModule",{value:!0});qY(Etr(),eb);qY(Ctr(),eb);qY(wtr(),eb);qY(Hnt(),eb);qY(Rtr(),eb);qY(NVn(),eb);qY(MVn(),eb)});var Ynt=T(Ntr=>{"use strict";f();Object.defineProperty(Ntr,"__esModule",{value:!0});Ntr.IndexPropertyKeys=OVn;var GMs=lR(),Nxe=Bo();function HMs(t){return(0,GMs.TemplateLiteralGenerate)(t).map(r=>r.toString())}a(HMs,"FromTemplateLiteral");function jMs(t){let e=[];for(let r of t)e.push(...OVn(r));return e}a(jMs,"FromUnion");function $Ms(t){return[t.toString()]}a($Ms,"FromLiteral");function OVn(t){return[...new Set((0,Nxe.IsTemplateLiteral)(t)?HMs(t):(0,Nxe.IsUnion)(t)?jMs(t.anyOf):(0,Nxe.IsLiteral)(t)?$Ms(t.const):(0,Nxe.IsNumber)(t)?["[number]"]:(0,Nxe.IsInteger)(t)?["[number]"]:[])]}a(OVn,"IndexPropertyKeys")});var Mtr=T(Dtr=>{"use strict";f();Object.defineProperty(Dtr,"__esModule",{value:!0});Dtr.IndexFromMappedResult=JMs;var VMs=Q0(),WMs=Ynt(),zMs=uR();function YMs(t,e,r){let n={};for(let o of Object.getOwnPropertyNames(e))n[o]=(0,zMs.Index)(t,(0,WMs.IndexPropertyKeys)(e[o]),r);return n}a(YMs,"FromProperties");function KMs(t,e,r){return YMs(t,e.properties,r)}a(KMs,"FromMappedResult");function JMs(t,e,r){let n=KMs(t,e,r);return(0,VMs.MappedResult)(n)}a(JMs,"IndexFromMappedResult")});var Jnt=T(Tue=>{"use strict";f();Object.defineProperty(Tue,"__esModule",{value:!0});Tue.IndexFromPropertyKey=Btr;Tue.IndexFromPropertyKeys=UVn;Tue.IndexFromComputed=dOs;Tue.Index=fOs;var XMs=Zn(),ZMs=hd(),LVn=CU(),Knt=U0(),eOs=tb(),Otr=tf(),tOs=Ynt(),rOs=Ltr(),nOs=Mtr(),d_=Bo();function FVn(t,e){return t.map(r=>Btr(r,e))}a(FVn,"FromRest");function iOs(t){return t.filter(e=>!(0,d_.IsNever)(e))}a(iOs,"FromIntersectRest");function oOs(t,e){return(0,eOs.IntersectEvaluated)(iOs(FVn(t,e)))}a(oOs,"FromIntersect");function sOs(t){return t.some(e=>(0,d_.IsNever)(e))?[]:t}a(sOs,"FromUnionRest");function aOs(t,e){return(0,Otr.UnionEvaluated)(sOs(FVn(t,e)))}a(aOs,"FromUnion");function cOs(t,e){return e in t?t[e]:e==="[number]"?(0,Otr.UnionEvaluated)(t):(0,Knt.Never)()}a(cOs,"FromTuple");function lOs(t,e){return e==="[number]"?t:(0,Knt.Never)()}a(lOs,"FromArray");function uOs(t,e){return e in t?t[e]:(0,Knt.Never)()}a(uOs,"FromProperty");function Btr(t,e){return(0,d_.IsIntersect)(t)?oOs(t.allOf,e):(0,d_.IsUnion)(t)?aOs(t.anyOf,e):(0,d_.IsTuple)(t)?cOs(t.items??[],e):(0,d_.IsArray)(t)?lOs(t.items,e):(0,d_.IsObject)(t)?uOs(t.properties,e):(0,Knt.Never)()}a(Btr,"IndexFromPropertyKey");function UVn(t,e){return e.map(r=>Btr(t,r))}a(UVn,"IndexFromPropertyKeys");function BVn(t,e){return(0,Otr.UnionEvaluated)(UVn(t,e))}a(BVn,"FromSchema");function dOs(t,e){return(0,LVn.Computed)("Index",[t,e])}a(dOs,"IndexFromComputed");function fOs(t,e,r){if((0,d_.IsRef)(t)||(0,d_.IsRef)(e)){let n="Index types using Ref parameters require both Type and Key to be of TSchema";if(!(0,d_.IsSchema)(t)||!(0,d_.IsSchema)(e))throw new ZMs.TypeBoxError(n);return(0,LVn.Computed)("Index",[t,e])}return(0,d_.IsMappedResult)(e)?(0,nOs.IndexFromMappedResult)(t,e,r):(0,d_.IsMappedKey)(e)?(0,rOs.IndexFromMappedKey)(t,e,r):(0,XMs.CreateType)((0,d_.IsSchema)(e)?BVn(t,(0,tOs.IndexPropertyKeys)(e)):BVn(t,e),r)}a(fOs,"Index")});var Ltr=T(Ftr=>{"use strict";f();Object.defineProperty(Ftr,"__esModule",{value:!0});Ftr.IndexFromMappedKey=EOs;var pOs=Jnt(),hOs=Q0(),mOs=c_();function gOs(t,e,r){return{[e]:(0,pOs.Index)(t,[e],(0,mOs.Clone)(r))}}a(gOs,"MappedIndexPropertyKey");function AOs(t,e,r){return e.reduce((n,o)=>({...n,...gOs(t,o,r)}),{})}a(AOs,"MappedIndexPropertyKeys");function yOs(t,e,r){return AOs(t,e.keys,r)}a(yOs,"MappedIndexProperties");function EOs(t,e,r){let n=yOs(t,e,r);return(0,hOs.MappedResult)(n)}a(EOs,"IndexFromMappedKey")});var uR=T(RD=>{"use strict";f();var COs=RD&&RD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Xnt=RD&&RD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&COs(e,t,r)};Object.defineProperty(RD,"__esModule",{value:!0});Xnt(Ltr(),RD);Xnt(Mtr(),RD);Xnt(Ynt(),RD);Xnt(Jnt(),RD)});var QVn=T(Utr=>{"use strict";f();Object.defineProperty(Utr,"__esModule",{value:!0});Utr.Iterator=bOs;var _Os=Zn(),vOs=nn();function bOs(t,e){return(0,_Os.CreateType)({[vOs.Kind]:"Iterator",type:"Iterator",items:t},e)}a(bOs,"Iterator")});var Sue=T(GY=>{"use strict";f();var TOs=GY&&GY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),SOs=GY&&GY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&TOs(e,t,r)};Object.defineProperty(GY,"__esModule",{value:!0});SOs(QVn(),GY)});var GVn=T(Znt=>{"use strict";f();Object.defineProperty(Znt,"__esModule",{value:!0});Znt.Object=void 0;var IOs=Zn(),qVn=nn(),xOs=Bo();function wOs(t){let e=[];for(let r in t)(0,xOs.IsOptional)(t[r])||e.push(r);return e}a(wOs,"RequiredKeys");function ROs(t,e){let r=wOs(t),n=r.length>0?{[qVn.Kind]:"Object",type:"object",properties:t,required:r}:{[qVn.Kind]:"Object",type:"object",properties:t};return(0,IOs.CreateType)(n,e)}a(ROs,"_Object");Znt.Object=ROs});var Hy=T(HY=>{"use strict";f();var POs=HY&&HY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kOs=HY&&HY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&POs(e,t,r)};Object.defineProperty(HY,"__esModule",{value:!0});kOs(GVn(),HY)});var HVn=T(Qtr=>{"use strict";f();Object.defineProperty(Qtr,"__esModule",{value:!0});Qtr.Promise=MOs;var NOs=Zn(),DOs=nn();function MOs(t,e){return(0,NOs.CreateType)({[DOs.Kind]:"Promise",type:"Promise",item:t},e)}a(MOs,"Promise")});var Dxe=T(jY=>{"use strict";f();var OOs=jY&&jY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),BOs=jY&&jY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&OOs(e,t,r)};Object.defineProperty(jY,"__esModule",{value:!0});BOs(HVn(),jY)});var Gtr=T(qtr=>{"use strict";f();Object.defineProperty(qtr,"__esModule",{value:!0});qtr.Readonly=HOs;var jVn=Zn(),$Vn=nn(),LOs=AB(),FOs=Htr(),UOs=Bo();function QOs(t){return(0,jVn.CreateType)((0,LOs.Discard)(t,[$Vn.ReadonlyKind]))}a(QOs,"RemoveReadonly");function qOs(t){return(0,jVn.CreateType)({...t,[$Vn.ReadonlyKind]:"Readonly"})}a(qOs,"AddReadonly");function GOs(t,e){return e===!1?QOs(t):qOs(t)}a(GOs,"ReadonlyWithFlag");function HOs(t,e){let r=e??!0;return(0,UOs.IsMappedResult)(t)?(0,FOs.ReadonlyFromMappedResult)(t,r):GOs(t,r)}a(HOs,"Readonly")});var Htr=T(jtr=>{"use strict";f();Object.defineProperty(jtr,"__esModule",{value:!0});jtr.ReadonlyFromMappedResult=zOs;var jOs=Q0(),$Os=Gtr();function VOs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,$Os.Readonly)(t[n],e);return r}a(VOs,"FromProperties");function WOs(t,e){return VOs(t.properties,e)}a(WOs,"FromMappedResult");function zOs(t,e){let r=WOs(t,e);return(0,jOs.MappedResult)(r)}a(zOs,"ReadonlyFromMappedResult")});var IU=T(SU=>{"use strict";f();var YOs=SU&&SU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),VVn=SU&&SU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YOs(e,t,r)};Object.defineProperty(SU,"__esModule",{value:!0});VVn(Htr(),SU);VVn(Gtr(),SU)});var zVn=T($tr=>{"use strict";f();Object.defineProperty($tr,"__esModule",{value:!0});$tr.Tuple=JOs;var KOs=Zn(),WVn=nn();function JOs(t,e){return(0,KOs.CreateType)(t.length>0?{[WVn.Kind]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[WVn.Kind]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}a(JOs,"Tuple")});var CB=T($Y=>{"use strict";f();var XOs=$Y&&$Y.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ZOs=$Y&&$Y.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&XOs(e,t,r)};Object.defineProperty($Y,"__esModule",{value:!0});ZOs(zVn(),$Y)});var eWn=T(eit=>{"use strict";f();Object.defineProperty(eit,"__esModule",{value:!0});eit.MappedFunctionReturnType=ZVn;eit.Mapped=E4s;var Vtr=nn(),YVn=AB(),e4s=Aue(),t4s=yue(),r4s=Eue(),n4s=_U(),i4s=uR(),o4s=tb(),s4s=Sue(),KVn=AA(),JVn=Hy(),a4s=wD(),c4s=Dxe(),l4s=IU(),u4s=CB(),d4s=tf(),f4s=Sxe(),p4s=utr(),jy=Bo();function XVn(t,e){return t in e?JS(t,e[t]):(0,p4s.MappedResult)(e)}a(XVn,"FromMappedResult");function h4s(t){return{[t]:(0,KVn.Literal)(t)}}a(h4s,"MappedKeyToKnownMappedResultProperties");function m4s(t){let e={};for(let r of t)e[r]=(0,KVn.Literal)(r);return e}a(m4s,"MappedKeyToUnknownMappedResultProperties");function g4s(t,e){return(0,f4s.SetIncludes)(e,t)?h4s(t):m4s(e)}a(g4s,"MappedKeyToMappedResultProperties");function A4s(t,e){let r=g4s(t,e);return XVn(t,r)}a(A4s,"FromMappedKey");function Mxe(t,e){return e.map(r=>JS(t,r))}a(Mxe,"FromRest");function y4s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=JS(t,e[n]);return r}a(y4s,"FromProperties");function JS(t,e){let r={...e};return(0,jy.IsOptional)(e)?(0,a4s.Optional)(JS(t,(0,YVn.Discard)(e,[Vtr.OptionalKind]))):(0,jy.IsReadonly)(e)?(0,l4s.Readonly)(JS(t,(0,YVn.Discard)(e,[Vtr.ReadonlyKind]))):(0,jy.IsMappedResult)(e)?XVn(t,e.properties):(0,jy.IsMappedKey)(e)?A4s(t,e.keys):(0,jy.IsConstructor)(e)?(0,r4s.Constructor)(Mxe(t,e.parameters),JS(t,e.returns),r):(0,jy.IsFunction)(e)?(0,n4s.Function)(Mxe(t,e.parameters),JS(t,e.returns),r):(0,jy.IsAsyncIterator)(e)?(0,t4s.AsyncIterator)(JS(t,e.items),r):(0,jy.IsIterator)(e)?(0,s4s.Iterator)(JS(t,e.items),r):(0,jy.IsIntersect)(e)?(0,o4s.Intersect)(Mxe(t,e.allOf),r):(0,jy.IsUnion)(e)?(0,d4s.Union)(Mxe(t,e.anyOf),r):(0,jy.IsTuple)(e)?(0,u4s.Tuple)(Mxe(t,e.items??[]),r):(0,jy.IsObject)(e)?(0,JVn.Object)(y4s(t,e.properties),r):(0,jy.IsArray)(e)?(0,e4s.Array)(JS(t,e.items),r):(0,jy.IsPromise)(e)?(0,c4s.Promise)(JS(t,e.item),r):e}a(JS,"FromSchemaType");function ZVn(t,e){let r={};for(let n of t)r[n]=JS(n,e);return r}a(ZVn,"MappedFunctionReturnType");function E4s(t,e,r){let n=(0,jy.IsSchema)(t)?(0,i4s.IndexPropertyKeys)(t):t,o=e({[Vtr.Kind]:"MappedKey",keys:n}),s=ZVn(n,o);return(0,JVn.Object)(s,r)}a(E4s,"Mapped")});var Q0=T(_B=>{"use strict";f();var C4s=_B&&_B.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wtr=_B&&_B.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&C4s(e,t,r)};Object.defineProperty(_B,"__esModule",{value:!0});Wtr(hVn(),_B);Wtr(utr(),_B);Wtr(eWn(),_B)});var Ytr=T(ztr=>{"use strict";f();Object.defineProperty(ztr,"__esModule",{value:!0});ztr.Optional=x4s;var tWn=Zn(),rWn=nn(),_4s=AB(),v4s=Ktr(),b4s=Bo();function T4s(t){return(0,tWn.CreateType)((0,_4s.Discard)(t,[rWn.OptionalKind]))}a(T4s,"RemoveOptional");function S4s(t){return(0,tWn.CreateType)({...t,[rWn.OptionalKind]:"Optional"})}a(S4s,"AddOptional");function I4s(t,e){return e===!1?T4s(t):S4s(t)}a(I4s,"OptionalWithFlag");function x4s(t,e){let r=e??!0;return(0,b4s.IsMappedResult)(t)?(0,v4s.OptionalFromMappedResult)(t,r):I4s(t,r)}a(x4s,"Optional")});var Ktr=T(Jtr=>{"use strict";f();Object.defineProperty(Jtr,"__esModule",{value:!0});Jtr.OptionalFromMappedResult=N4s;var w4s=Q0(),R4s=Ytr();function P4s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,R4s.Optional)(t[n],e);return r}a(P4s,"FromProperties");function k4s(t,e){return P4s(t.properties,e)}a(k4s,"FromMappedResult");function N4s(t,e){let r=k4s(t,e);return(0,w4s.MappedResult)(r)}a(N4s,"OptionalFromMappedResult")});var wD=T(xU=>{"use strict";f();var D4s=xU&&xU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nWn=xU&&xU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&D4s(e,t,r)};Object.defineProperty(xU,"__esModule",{value:!0});nWn(Ktr(),xU);nWn(Ytr(),xU)});var trr=T(Ztr=>{"use strict";f();Object.defineProperty(Ztr,"__esModule",{value:!0});Ztr.IntersectCreate=O4s;var M4s=Zn(),iWn=nn(),Xtr=Bo();function O4s(t,e={}){let r=t.every(o=>(0,Xtr.IsObject)(o)),n=(0,Xtr.IsSchema)(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return(0,M4s.CreateType)(e.unevaluatedProperties===!1||(0,Xtr.IsSchema)(e.unevaluatedProperties)||r?{...n,[iWn.Kind]:"Intersect",type:"object",allOf:t}:{...n,[iWn.Kind]:"Intersect",allOf:t},e)}a(O4s,"IntersectCreate")});var aWn=T(nrr=>{"use strict";f();Object.defineProperty(nrr,"__esModule",{value:!0});nrr.IntersectEvaluated=j4s;var B4s=nn(),L4s=Zn(),F4s=AB(),U4s=U0(),Q4s=wD(),oWn=trr(),rrr=Bo();function q4s(t){return t.every(e=>(0,rrr.IsOptional)(e))}a(q4s,"IsIntersectOptional");function G4s(t){return(0,F4s.Discard)(t,[B4s.OptionalKind])}a(G4s,"RemoveOptionalFromType");function sWn(t){return t.map(e=>(0,rrr.IsOptional)(e)?G4s(e):e)}a(sWn,"RemoveOptionalFromRest");function H4s(t,e){return q4s(t)?(0,Q4s.Optional)((0,oWn.IntersectCreate)(sWn(t),e)):(0,oWn.IntersectCreate)(sWn(t),e)}a(H4s,"ResolveIntersect");function j4s(t,e={}){if(t.length===1)return(0,L4s.CreateType)(t[0],e);if(t.length===0)return(0,U4s.Never)(e);if(t.some(r=>(0,rrr.IsTransform)(r)))throw new Error("Cannot intersect transform types");return H4s(t,e)}a(j4s,"IntersectEvaluated")});var lWn=T(cWn=>{"use strict";f();Object.defineProperty(cWn,"__esModule",{value:!0});var n3d=nn()});var uWn=T(irr=>{"use strict";f();Object.defineProperty(irr,"__esModule",{value:!0});irr.Intersect=Y4s;var $4s=Zn(),V4s=U0(),W4s=trr(),z4s=Bo();function Y4s(t,e){if(t.length===1)return(0,$4s.CreateType)(t[0],e);if(t.length===0)return(0,V4s.Never)(e);if(t.some(r=>(0,z4s.IsTransform)(r)))throw new Error("Cannot intersect transform types");return(0,W4s.IntersectCreate)(t,e)}a(Y4s,"Intersect")});var tb=T(vB=>{"use strict";f();var K4s=vB&&vB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),orr=vB&&vB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&K4s(e,t,r)};Object.defineProperty(vB,"__esModule",{value:!0});orr(aWn(),vB);orr(lWn(),vB);orr(uWn(),vB)});var dWn=T(srr=>{"use strict";f();Object.defineProperty(srr,"__esModule",{value:!0});srr.Ref=eBs;var J4s=hd(),X4s=Zn(),Z4s=nn();function eBs(...t){let[e,r]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new J4s.TypeBoxError("Ref: $ref must be a string");return(0,X4s.CreateType)({[Z4s.Kind]:"Ref",$ref:e},r)}a(eBs,"Ref")});var wU=T(VY=>{"use strict";f();var tBs=VY&&VY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rBs=VY&&VY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tBs(e,t,r)};Object.defineProperty(VY,"__esModule",{value:!0});rBs(dWn(),VY)});var pWn=T(lrr=>{"use strict";f();Object.defineProperty(lrr,"__esModule",{value:!0});lrr.Awaited=crr;var nBs=Zn(),arr=CU(),iBs=tb(),oBs=tf(),sBs=wU(),Oxe=Bo();function aBs(t,e){return(0,arr.Computed)("Awaited",[(0,arr.Computed)(t,e)])}a(aBs,"FromComputed");function cBs(t){return(0,arr.Computed)("Awaited",[(0,sBs.Ref)(t)])}a(cBs,"FromRef");function lBs(t){return(0,iBs.Intersect)(fWn(t))}a(lBs,"FromIntersect");function uBs(t){return(0,oBs.Union)(fWn(t))}a(uBs,"FromUnion");function dBs(t){return crr(t)}a(dBs,"FromPromise");function fWn(t){return t.map(e=>crr(e))}a(fWn,"FromRest");function crr(t,e){return(0,nBs.CreateType)((0,Oxe.IsComputed)(t)?aBs(t.target,t.parameters):(0,Oxe.IsIntersect)(t)?lBs(t.allOf):(0,Oxe.IsUnion)(t)?uBs(t.anyOf):(0,Oxe.IsPromise)(t)?dBs(t.item):(0,Oxe.IsRef)(t)?cBs(t.$ref):t,e)}a(crr,"Awaited")});var Bxe=T(WY=>{"use strict";f();var fBs=WY&&WY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pBs=WY&&WY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fBs(e,t,r)};Object.defineProperty(WY,"__esModule",{value:!0});pBs(pWn(),WY)});var rit=T(tit=>{"use strict";f();Object.defineProperty(tit,"__esModule",{value:!0});tit.KeyOfPropertyKeys=drr;tit.KeyOfPattern=CBs;var hWn=Sxe(),Iue=Bo();function mWn(t){let e=[];for(let r of t)e.push(drr(r));return e}a(mWn,"FromRest");function hBs(t){let e=mWn(t);return(0,hWn.SetUnionMany)(e)}a(hBs,"FromIntersect");function mBs(t){let e=mWn(t);return(0,hWn.SetIntersectMany)(e)}a(mBs,"FromUnion");function gBs(t){return t.map((e,r)=>r.toString())}a(gBs,"FromTuple");function ABs(t){return["[number]"]}a(ABs,"FromArray");function yBs(t){return globalThis.Object.getOwnPropertyNames(t)}a(yBs,"FromProperties");function EBs(t){return urr?globalThis.Object.getOwnPropertyNames(t).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}a(EBs,"FromPatternProperties");function drr(t){return(0,Iue.IsIntersect)(t)?hBs(t.allOf):(0,Iue.IsUnion)(t)?mBs(t.anyOf):(0,Iue.IsTuple)(t)?gBs(t.items??[]):(0,Iue.IsArray)(t)?ABs(t.items):(0,Iue.IsObject)(t)?yBs(t.properties):(0,Iue.IsRecord)(t)?EBs(t.patternProperties):[]}a(drr,"KeyOfPropertyKeys");var urr=!1;function CBs(t){urr=!0;let e=drr(t);return urr=!1,`^(${e.map(n=>`(${n})`).join("|")})$`}a(CBs,"KeyOfPattern")});var hrr=T(nit=>{"use strict";f();Object.defineProperty(nit,"__esModule",{value:!0});nit.KeyOfPropertyKeysToRest=gWn;nit.KeyOf=kBs;var _Bs=Zn(),vBs=AA(),bBs=vU(),prr=CU(),TBs=wU(),SBs=rit(),IBs=tf(),xBs=mrr(),frr=Bo();function wBs(t,e){return(0,prr.Computed)("KeyOf",[(0,prr.Computed)(t,e)])}a(wBs,"FromComputed");function RBs(t){return(0,prr.Computed)("KeyOf",[(0,TBs.Ref)(t)])}a(RBs,"FromRef");function PBs(t,e){let r=(0,SBs.KeyOfPropertyKeys)(t),n=gWn(r),o=(0,IBs.UnionEvaluated)(n);return(0,_Bs.CreateType)(o,e)}a(PBs,"KeyOfFromType");function gWn(t){return t.map(e=>e==="[number]"?(0,bBs.Number)():(0,vBs.Literal)(e))}a(gWn,"KeyOfPropertyKeysToRest");function kBs(t,e){return(0,frr.IsComputed)(t)?wBs(t.target,t.parameters):(0,frr.IsRef)(t)?RBs(t.$ref):(0,frr.IsMappedResult)(t)?(0,xBs.KeyOfFromMappedResult)(t,e):PBs(t,e)}a(kBs,"KeyOf")});var mrr=T(grr=>{"use strict";f();Object.defineProperty(grr,"__esModule",{value:!0});grr.KeyOfFromMappedResult=LBs;var NBs=Q0(),DBs=hrr(),MBs=c_();function OBs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,DBs.KeyOf)(t[n],(0,MBs.Clone)(e));return r}a(OBs,"FromProperties");function BBs(t,e){return OBs(t.properties,e)}a(BBs,"FromMappedResult");function LBs(t,e){let r=BBs(t,e);return(0,NBs.MappedResult)(r)}a(LBs,"KeyOfFromMappedResult")});var AWn=T(Arr=>{"use strict";f();Object.defineProperty(Arr,"__esModule",{value:!0});Arr.KeyOfPropertyEntries=QBs;var FBs=Jnt(),UBs=rit();function QBs(t){let e=(0,UBs.KeyOfPropertyKeys)(t),r=(0,FBs.IndexFromPropertyKeys)(t,e);return e.map((n,o)=>[e[o],r[o]])}a(QBs,"KeyOfPropertyEntries")});var dR=T(PD=>{"use strict";f();var qBs=PD&&PD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iit=PD&&PD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qBs(e,t,r)};Object.defineProperty(PD,"__esModule",{value:!0});iit(mrr(),PD);iit(AWn(),PD);iit(rit(),PD);iit(hrr(),PD)});var yWn=T(yrr=>{"use strict";f();Object.defineProperty(yrr,"__esModule",{value:!0});yrr.Composite=XBs;var GBs=tb(),HBs=uR(),jBs=dR(),$Bs=Hy(),VBs=Sxe(),WBs=Bo();function zBs(t){let e=[];for(let r of t)e.push(...(0,jBs.KeyOfPropertyKeys)(r));return(0,VBs.SetDistinct)(e)}a(zBs,"CompositeKeys");function YBs(t){return t.filter(e=>!(0,WBs.IsNever)(e))}a(YBs,"FilterNever");function KBs(t,e){let r=[];for(let n of t)r.push(...(0,HBs.IndexFromPropertyKeys)(n,[e]));return YBs(r)}a(KBs,"CompositeProperty");function JBs(t,e){let r={};for(let n of e)r[n]=(0,GBs.IntersectEvaluated)(KBs(t,n));return r}a(JBs,"CompositeProperties");function XBs(t,e){let r=zBs(t),n=JBs(t,r);return(0,$Bs.Object)(n,e)}a(XBs,"Composite")});var oit=T(zY=>{"use strict";f();var ZBs=zY&&zY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),e3s=zY&&zY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZBs(e,t,r)};Object.defineProperty(zY,"__esModule",{value:!0});e3s(yWn(),zY)});var EWn=T(Err=>{"use strict";f();Object.defineProperty(Err,"__esModule",{value:!0});Err.Date=n3s;var t3s=nn(),r3s=Zn();function n3s(t){return(0,r3s.CreateType)({[t3s.Kind]:"Date",type:"Date"},t)}a(n3s,"Date")});var Lxe=T(YY=>{"use strict";f();var i3s=YY&&YY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o3s=YY&&YY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&i3s(e,t,r)};Object.defineProperty(YY,"__esModule",{value:!0});o3s(EWn(),YY)});var CWn=T(Crr=>{"use strict";f();Object.defineProperty(Crr,"__esModule",{value:!0});Crr.Null=c3s;var s3s=Zn(),a3s=nn();function c3s(t){return(0,s3s.CreateType)({[a3s.Kind]:"Null",type:"null"},t)}a(c3s,"Null")});var Fxe=T(KY=>{"use strict";f();var l3s=KY&&KY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),u3s=KY&&KY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&l3s(e,t,r)};Object.defineProperty(KY,"__esModule",{value:!0});u3s(CWn(),KY)});var _Wn=T(_rr=>{"use strict";f();Object.defineProperty(_rr,"__esModule",{value:!0});_rr.Symbol=p3s;var d3s=Zn(),f3s=nn();function p3s(t){return(0,d3s.CreateType)({[f3s.Kind]:"Symbol",type:"symbol"},t)}a(p3s,"Symbol")});var Uxe=T(JY=>{"use strict";f();var h3s=JY&&JY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),m3s=JY&&JY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&h3s(e,t,r)};Object.defineProperty(JY,"__esModule",{value:!0});m3s(_Wn(),JY)});var vWn=T(vrr=>{"use strict";f();Object.defineProperty(vrr,"__esModule",{value:!0});vrr.Undefined=y3s;var g3s=Zn(),A3s=nn();function y3s(t){return(0,g3s.CreateType)({[A3s.Kind]:"Undefined",type:"undefined"},t)}a(y3s,"Undefined")});var Qxe=T(XY=>{"use strict";f();var E3s=XY&&XY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),C3s=XY&&XY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&E3s(e,t,r)};Object.defineProperty(XY,"__esModule",{value:!0});C3s(vWn(),XY)});var bWn=T(brr=>{"use strict";f();Object.defineProperty(brr,"__esModule",{value:!0});brr.Uint8Array=b3s;var _3s=Zn(),v3s=nn();function b3s(t){return(0,_3s.CreateType)({[v3s.Kind]:"Uint8Array",type:"Uint8Array"},t)}a(b3s,"Uint8Array")});var qxe=T(ZY=>{"use strict";f();var T3s=ZY&&ZY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),S3s=ZY&&ZY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&T3s(e,t,r)};Object.defineProperty(ZY,"__esModule",{value:!0});S3s(bWn(),ZY)});var TWn=T(Trr=>{"use strict";f();Object.defineProperty(Trr,"__esModule",{value:!0});Trr.Unknown=w3s;var I3s=Zn(),x3s=nn();function w3s(t){return(0,I3s.CreateType)({[x3s.Kind]:"Unknown"},t)}a(w3s,"Unknown")});var RU=T(eK=>{"use strict";f();var R3s=eK&&eK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P3s=eK&&eK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&R3s(e,t,r)};Object.defineProperty(eK,"__esModule",{value:!0});P3s(TWn(),eK)});var xWn=T(wrr=>{"use strict";f();Object.defineProperty(wrr,"__esModule",{value:!0});wrr.Const=H3s;var SWn=gue(),k3s=bue(),N3s=Lxe(),D3s=_U(),Srr=AA(),M3s=Fxe(),IWn=Hy(),O3s=Uxe(),B3s=CB(),Irr=IU(),L3s=Qxe(),F3s=qxe(),U3s=RU(),Q3s=mB(),f_=Gy();function q3s(t){return t.map(e=>xrr(e,!1))}a(q3s,"FromArray");function G3s(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=(0,Irr.Readonly)(xrr(t[r],!1));return e}a(G3s,"FromProperties");function sit(t,e){return e===!0?t:(0,Irr.Readonly)(t)}a(sit,"ConditionalReadonly");function xrr(t,e){return(0,f_.IsAsyncIterator)(t)||(0,f_.IsIterator)(t)?sit((0,SWn.Any)(),e):(0,f_.IsArray)(t)?(0,Irr.Readonly)((0,B3s.Tuple)(q3s(t))):(0,f_.IsUint8Array)(t)?(0,F3s.Uint8Array)():(0,f_.IsDate)(t)?(0,N3s.Date)():(0,f_.IsObject)(t)?sit((0,IWn.Object)(G3s(t)),e):(0,f_.IsFunction)(t)?sit((0,D3s.Function)([],(0,U3s.Unknown)()),e):(0,f_.IsUndefined)(t)?(0,L3s.Undefined)():(0,f_.IsNull)(t)?(0,M3s.Null)():(0,f_.IsSymbol)(t)?(0,O3s.Symbol)():(0,f_.IsBigInt)(t)?(0,k3s.BigInt)():(0,f_.IsNumber)(t)||(0,f_.IsBoolean)(t)||(0,f_.IsString)(t)?(0,Srr.Literal)(t):(0,IWn.Object)({})}a(xrr,"FromValue");function H3s(t,e){return(0,Q3s.CreateType)(xrr(t,!0),e)}a(H3s,"Const")});var ait=T(tK=>{"use strict";f();var j3s=tK&&tK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$3s=tK&&tK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&j3s(e,t,r)};Object.defineProperty(tK,"__esModule",{value:!0});$3s(xWn(),tK)});var wWn=T(bB=>{"use strict";f();var V3s=bB&&bB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),W3s=bB&&bB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),z3s=bB&&bB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var Z3s=rK&&rK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eLs=rK&&rK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Z3s(e,t,r)};Object.defineProperty(rK,"__esModule",{value:!0});eLs(wWn(),rK)});var RWn=T(Rrr=>{"use strict";f();Object.defineProperty(Rrr,"__esModule",{value:!0});Rrr.Enum=oLs;var tLs=AA(),rLs=nn(),nLs=tf(),iLs=Gy();function oLs(t,e){if((0,iLs.IsUndefined)(t))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]),o=[...new Set(r)].map(s=>(0,tLs.Literal)(s));return(0,nLs.Union)(o,{...e,[rLs.Hint]:"Enum"})}a(oLs,"Enum")});var lit=T(nK=>{"use strict";f();var sLs=nK&&nK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aLs=nK&&nK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sLs(e,t,r)};Object.defineProperty(nK,"__esModule",{value:!0});aLs(RWn(),nK)});var Lrr=T(iK=>{"use strict";f();Object.defineProperty(iK,"__esModule",{value:!0});iK.ExtendsResult=iK.ExtendsResolverError=void 0;iK.ExtendsCheck=KLs;var PWn=gue(),cLs=_U(),Mrr=vU(),krr=bU(),lLs=RU(),kWn=lR(),xue=Txe(),BWn=nn(),uLs=hd(),Fe=Zer(),uit=class extends uLs.TypeBoxError{static{a(this,"ExtendsResolverError")}};iK.ExtendsResolverError=uit;var It;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(It||(iK.ExtendsResult=It={}));function XS(t){return t===It.False?t:It.True}a(XS,"IntoBooleanResult");function wue(t){throw new uit(t)}a(wue,"Throw");function q0(t){return Fe.TypeGuard.IsNever(t)||Fe.TypeGuard.IsIntersect(t)||Fe.TypeGuard.IsUnion(t)||Fe.TypeGuard.IsUnknown(t)||Fe.TypeGuard.IsAny(t)}a(q0,"IsStructuralRight");function G0(t,e){return Fe.TypeGuard.IsNever(e)?UWn(t,e):Fe.TypeGuard.IsIntersect(e)?dit(t,e):Fe.TypeGuard.IsUnion(e)?Brr(t,e):Fe.TypeGuard.IsUnknown(e)?HWn(t,e):Fe.TypeGuard.IsAny(e)?Orr(t,e):wue("StructuralRight")}a(G0,"StructuralRight");function Orr(t,e){return It.True}a(Orr,"FromAnyRight");function dLs(t,e){return Fe.TypeGuard.IsIntersect(e)?dit(t,e):Fe.TypeGuard.IsUnion(e)&&e.anyOf.some(r=>Fe.TypeGuard.IsAny(r)||Fe.TypeGuard.IsUnknown(r))?It.True:Fe.TypeGuard.IsUnion(e)?It.Union:Fe.TypeGuard.IsUnknown(e)||Fe.TypeGuard.IsAny(e)?It.True:It.Union}a(dLs,"FromAny");function fLs(t,e){return Fe.TypeGuard.IsUnknown(t)?It.False:Fe.TypeGuard.IsAny(t)?It.Union:Fe.TypeGuard.IsNever(t)?It.True:It.False}a(fLs,"FromArrayRight");function pLs(t,e){return Fe.TypeGuard.IsObject(e)&&fit(e)?It.True:q0(e)?G0(t,e):Fe.TypeGuard.IsArray(e)?XS(hc(t.items,e.items)):It.False}a(pLs,"FromArray");function hLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsAsyncIterator(e)?XS(hc(t.items,e.items)):It.False}a(hLs,"FromAsyncIterator");function mLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsBigInt(e)?It.True:It.False}a(mLs,"FromBigInt");function LWn(t,e){return Fe.TypeGuard.IsLiteralBoolean(t)||Fe.TypeGuard.IsBoolean(t)?It.True:It.False}a(LWn,"FromBooleanRight");function gLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsBoolean(e)?It.True:It.False}a(gLs,"FromBoolean");function ALs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsConstructor(e)?t.parameters.length>e.parameters.length?It.False:t.parameters.every((r,n)=>XS(hc(e.parameters[n],r))===It.True)?XS(hc(t.returns,e.returns)):It.False:It.False}a(ALs,"FromConstructor");function yLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsDate(e)?It.True:It.False}a(yLs,"FromDate");function ELs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsFunction(e)?t.parameters.length>e.parameters.length?It.False:t.parameters.every((r,n)=>XS(hc(e.parameters[n],r))===It.True)?XS(hc(t.returns,e.returns)):It.False:It.False}a(ELs,"FromFunction");function FWn(t,e){return Fe.TypeGuard.IsLiteral(t)&&Fe.ValueGuard.IsNumber(t.const)||Fe.TypeGuard.IsNumber(t)||Fe.TypeGuard.IsInteger(t)?It.True:It.False}a(FWn,"FromIntegerRight");function CLs(t,e){return Fe.TypeGuard.IsInteger(e)||Fe.TypeGuard.IsNumber(e)?It.True:q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):It.False}a(CLs,"FromInteger");function dit(t,e){return e.allOf.every(r=>hc(t,r)===It.True)?It.True:It.False}a(dit,"FromIntersectRight");function _Ls(t,e){return t.allOf.some(r=>hc(r,e)===It.True)?It.True:It.False}a(_Ls,"FromIntersect");function vLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsIterator(e)?XS(hc(t.items,e.items)):It.False}a(vLs,"FromIterator");function bLs(t,e){return Fe.TypeGuard.IsLiteral(e)&&e.const===t.const?It.True:q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsString(e)?GWn(t,e):Fe.TypeGuard.IsNumber(e)?QWn(t,e):Fe.TypeGuard.IsInteger(e)?FWn(t,e):Fe.TypeGuard.IsBoolean(e)?LWn(t,e):It.False}a(bLs,"FromLiteral");function UWn(t,e){return It.False}a(UWn,"FromNeverRight");function TLs(t,e){return It.True}a(TLs,"FromNever");function NWn(t){let[e,r]=[t,0];for(;Fe.TypeGuard.IsNot(e);)e=e.not,r+=1;return r%2===0?e:(0,lLs.Unknown)()}a(NWn,"UnwrapTNot");function SLs(t,e){return Fe.TypeGuard.IsNot(t)?hc(NWn(t),e):Fe.TypeGuard.IsNot(e)?hc(t,NWn(e)):wue("Invalid fallthrough for Not")}a(SLs,"FromNot");function ILs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsNull(e)?It.True:It.False}a(ILs,"FromNull");function QWn(t,e){return Fe.TypeGuard.IsLiteralNumber(t)||Fe.TypeGuard.IsNumber(t)||Fe.TypeGuard.IsInteger(t)?It.True:It.False}a(QWn,"FromNumberRight");function xLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsInteger(e)||Fe.TypeGuard.IsNumber(e)?It.True:It.False}a(xLs,"FromNumber");function p_(t,e){return Object.getOwnPropertyNames(t.properties).length===e}a(p_,"IsObjectPropertyCount");function DWn(t){return fit(t)}a(DWn,"IsObjectStringLike");function MWn(t){return p_(t,0)||p_(t,1)&&"description"in t.properties&&Fe.TypeGuard.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(Fe.TypeGuard.IsString(t.properties.description.anyOf[0])&&Fe.TypeGuard.IsUndefined(t.properties.description.anyOf[1])||Fe.TypeGuard.IsString(t.properties.description.anyOf[1])&&Fe.TypeGuard.IsUndefined(t.properties.description.anyOf[0]))}a(MWn,"IsObjectSymbolLike");function Prr(t){return p_(t,0)}a(Prr,"IsObjectNumberLike");function OWn(t){return p_(t,0)}a(OWn,"IsObjectBooleanLike");function wLs(t){return p_(t,0)}a(wLs,"IsObjectBigIntLike");function RLs(t){return p_(t,0)}a(RLs,"IsObjectDateLike");function PLs(t){return fit(t)}a(PLs,"IsObjectUint8ArrayLike");function kLs(t){let e=(0,Mrr.Number)();return p_(t,0)||p_(t,1)&&"length"in t.properties&&XS(hc(t.properties.length,e))===It.True}a(kLs,"IsObjectFunctionLike");function NLs(t){return p_(t,0)}a(NLs,"IsObjectConstructorLike");function fit(t){let e=(0,Mrr.Number)();return p_(t,0)||p_(t,1)&&"length"in t.properties&&XS(hc(t.properties.length,e))===It.True}a(fit,"IsObjectArrayLike");function DLs(t){let e=(0,cLs.Function)([(0,PWn.Any)()],(0,PWn.Any)());return p_(t,0)||p_(t,1)&&"then"in t.properties&&XS(hc(t.properties.then,e))===It.True}a(DLs,"IsObjectPromiseLike");function qWn(t,e){return hc(t,e)===It.False||Fe.TypeGuard.IsOptional(t)&&!Fe.TypeGuard.IsOptional(e)?It.False:It.True}a(qWn,"Property");function yA(t,e){return Fe.TypeGuard.IsUnknown(t)?It.False:Fe.TypeGuard.IsAny(t)?It.Union:Fe.TypeGuard.IsNever(t)||Fe.TypeGuard.IsLiteralString(t)&&DWn(e)||Fe.TypeGuard.IsLiteralNumber(t)&&Prr(e)||Fe.TypeGuard.IsLiteralBoolean(t)&&OWn(e)||Fe.TypeGuard.IsSymbol(t)&&MWn(e)||Fe.TypeGuard.IsBigInt(t)&&wLs(e)||Fe.TypeGuard.IsString(t)&&DWn(e)||Fe.TypeGuard.IsSymbol(t)&&MWn(e)||Fe.TypeGuard.IsNumber(t)&&Prr(e)||Fe.TypeGuard.IsInteger(t)&&Prr(e)||Fe.TypeGuard.IsBoolean(t)&&OWn(e)||Fe.TypeGuard.IsUint8Array(t)&&PLs(e)||Fe.TypeGuard.IsDate(t)&&RLs(e)||Fe.TypeGuard.IsConstructor(t)&&NLs(e)||Fe.TypeGuard.IsFunction(t)&&kLs(e)?It.True:Fe.TypeGuard.IsRecord(t)&&Fe.TypeGuard.IsString(Nrr(t))?e[BWn.Hint]==="Record"?It.True:It.False:Fe.TypeGuard.IsRecord(t)&&Fe.TypeGuard.IsNumber(Nrr(t))&&p_(e,0)?It.True:It.False}a(yA,"FromObjectRight");function MLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsObject(e)?(()=>{for(let r of Object.getOwnPropertyNames(e.properties)){if(!(r in t.properties)&&!Fe.TypeGuard.IsOptional(e.properties[r]))return It.False;if(Fe.TypeGuard.IsOptional(e.properties[r]))return It.True;if(qWn(t.properties[r],e.properties[r])===It.False)return It.False}return It.True})():It.False}a(MLs,"FromObject");function OLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)&&DLs(e)?It.True:Fe.TypeGuard.IsPromise(e)?XS(hc(t.item,e.item)):It.False}a(OLs,"FromPromise");function Nrr(t){return xue.PatternNumberExact in t.patternProperties?(0,Mrr.Number)():xue.PatternStringExact in t.patternProperties?(0,krr.String)():wue("Unknown record key pattern")}a(Nrr,"RecordKey");function Drr(t){return xue.PatternNumberExact in t.patternProperties?t.patternProperties[xue.PatternNumberExact]:xue.PatternStringExact in t.patternProperties?t.patternProperties[xue.PatternStringExact]:wue("Unable to get record value schema")}a(Drr,"RecordValue");function ZS(t,e){let[r,n]=[Nrr(e),Drr(e)];return Fe.TypeGuard.IsLiteralString(t)&&Fe.TypeGuard.IsNumber(r)&&XS(hc(t,n))===It.True?It.True:Fe.TypeGuard.IsUint8Array(t)&&Fe.TypeGuard.IsNumber(r)||Fe.TypeGuard.IsString(t)&&Fe.TypeGuard.IsNumber(r)||Fe.TypeGuard.IsArray(t)&&Fe.TypeGuard.IsNumber(r)?hc(t,n):Fe.TypeGuard.IsObject(t)?(()=>{for(let o of Object.getOwnPropertyNames(t.properties))if(qWn(n,t.properties[o])===It.False)return It.False;return It.True})():It.False}a(ZS,"FromRecordRight");function BLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?hc(Drr(t),Drr(e)):It.False}a(BLs,"FromRecord");function LLs(t,e){let r=Fe.TypeGuard.IsRegExp(t)?(0,krr.String)():t,n=Fe.TypeGuard.IsRegExp(e)?(0,krr.String)():e;return hc(r,n)}a(LLs,"FromRegExp");function GWn(t,e){return Fe.TypeGuard.IsLiteral(t)&&Fe.ValueGuard.IsString(t.const)||Fe.TypeGuard.IsString(t)?It.True:It.False}a(GWn,"FromStringRight");function FLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsString(e)?It.True:It.False}a(FLs,"FromString");function ULs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsSymbol(e)?It.True:It.False}a(ULs,"FromSymbol");function QLs(t,e){return Fe.TypeGuard.IsTemplateLiteral(t)?hc((0,kWn.TemplateLiteralToUnion)(t),e):Fe.TypeGuard.IsTemplateLiteral(e)?hc(t,(0,kWn.TemplateLiteralToUnion)(e)):wue("Invalid fallthrough for TemplateLiteral")}a(QLs,"FromTemplateLiteral");function qLs(t,e){return Fe.TypeGuard.IsArray(e)&&t.items!==void 0&&t.items.every(r=>hc(r,e.items)===It.True)}a(qLs,"IsArrayOfTuple");function GLs(t,e){return Fe.TypeGuard.IsNever(t)?It.True:Fe.TypeGuard.IsUnknown(t)?It.False:Fe.TypeGuard.IsAny(t)?It.Union:It.False}a(GLs,"FromTupleRight");function HLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)&&fit(e)||Fe.TypeGuard.IsArray(e)&&qLs(t,e)?It.True:Fe.TypeGuard.IsTuple(e)?Fe.ValueGuard.IsUndefined(t.items)&&!Fe.ValueGuard.IsUndefined(e.items)||!Fe.ValueGuard.IsUndefined(t.items)&&Fe.ValueGuard.IsUndefined(e.items)?It.False:Fe.ValueGuard.IsUndefined(t.items)&&!Fe.ValueGuard.IsUndefined(e.items)||t.items.every((r,n)=>hc(r,e.items[n])===It.True)?It.True:It.False:It.False}a(HLs,"FromTuple");function jLs(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsUint8Array(e)?It.True:It.False}a(jLs,"FromUint8Array");function $Ls(t,e){return q0(e)?G0(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsRecord(e)?ZS(t,e):Fe.TypeGuard.IsVoid(e)?zLs(t,e):Fe.TypeGuard.IsUndefined(e)?It.True:It.False}a($Ls,"FromUndefined");function Brr(t,e){return e.anyOf.some(r=>hc(t,r)===It.True)?It.True:It.False}a(Brr,"FromUnionRight");function VLs(t,e){return t.anyOf.every(r=>hc(r,e)===It.True)?It.True:It.False}a(VLs,"FromUnion");function HWn(t,e){return It.True}a(HWn,"FromUnknownRight");function WLs(t,e){return Fe.TypeGuard.IsNever(e)?UWn(t,e):Fe.TypeGuard.IsIntersect(e)?dit(t,e):Fe.TypeGuard.IsUnion(e)?Brr(t,e):Fe.TypeGuard.IsAny(e)?Orr(t,e):Fe.TypeGuard.IsString(e)?GWn(t,e):Fe.TypeGuard.IsNumber(e)?QWn(t,e):Fe.TypeGuard.IsInteger(e)?FWn(t,e):Fe.TypeGuard.IsBoolean(e)?LWn(t,e):Fe.TypeGuard.IsArray(e)?fLs(t,e):Fe.TypeGuard.IsTuple(e)?GLs(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsUnknown(e)?It.True:It.False}a(WLs,"FromUnknown");function zLs(t,e){return Fe.TypeGuard.IsUndefined(t)||Fe.TypeGuard.IsUndefined(t)?It.True:It.False}a(zLs,"FromVoidRight");function YLs(t,e){return Fe.TypeGuard.IsIntersect(e)?dit(t,e):Fe.TypeGuard.IsUnion(e)?Brr(t,e):Fe.TypeGuard.IsUnknown(e)?HWn(t,e):Fe.TypeGuard.IsAny(e)?Orr(t,e):Fe.TypeGuard.IsObject(e)?yA(t,e):Fe.TypeGuard.IsVoid(e)?It.True:It.False}a(YLs,"FromVoid");function hc(t,e){return Fe.TypeGuard.IsTemplateLiteral(t)||Fe.TypeGuard.IsTemplateLiteral(e)?QLs(t,e):Fe.TypeGuard.IsRegExp(t)||Fe.TypeGuard.IsRegExp(e)?LLs(t,e):Fe.TypeGuard.IsNot(t)||Fe.TypeGuard.IsNot(e)?SLs(t,e):Fe.TypeGuard.IsAny(t)?dLs(t,e):Fe.TypeGuard.IsArray(t)?pLs(t,e):Fe.TypeGuard.IsBigInt(t)?mLs(t,e):Fe.TypeGuard.IsBoolean(t)?gLs(t,e):Fe.TypeGuard.IsAsyncIterator(t)?hLs(t,e):Fe.TypeGuard.IsConstructor(t)?ALs(t,e):Fe.TypeGuard.IsDate(t)?yLs(t,e):Fe.TypeGuard.IsFunction(t)?ELs(t,e):Fe.TypeGuard.IsInteger(t)?CLs(t,e):Fe.TypeGuard.IsIntersect(t)?_Ls(t,e):Fe.TypeGuard.IsIterator(t)?vLs(t,e):Fe.TypeGuard.IsLiteral(t)?bLs(t,e):Fe.TypeGuard.IsNever(t)?TLs(t,e):Fe.TypeGuard.IsNull(t)?ILs(t,e):Fe.TypeGuard.IsNumber(t)?xLs(t,e):Fe.TypeGuard.IsObject(t)?MLs(t,e):Fe.TypeGuard.IsRecord(t)?BLs(t,e):Fe.TypeGuard.IsString(t)?FLs(t,e):Fe.TypeGuard.IsSymbol(t)?ULs(t,e):Fe.TypeGuard.IsTuple(t)?HLs(t,e):Fe.TypeGuard.IsPromise(t)?OLs(t,e):Fe.TypeGuard.IsUint8Array(t)?jLs(t,e):Fe.TypeGuard.IsUndefined(t)?$Ls(t,e):Fe.TypeGuard.IsUnion(t)?VLs(t,e):Fe.TypeGuard.IsUnknown(t)?WLs(t,e):Fe.TypeGuard.IsVoid(t)?YLs(t,e):wue(`Unknown left type operand '${t[BWn.Kind]}'`)}a(hc,"Visit");function KLs(t,e){return hc(t,e)}a(KLs,"ExtendsCheck")});var Urr=T(Frr=>{"use strict";f();Object.defineProperty(Frr,"__esModule",{value:!0});Frr.ExtendsFromMappedResult=r8s;var JLs=Q0(),XLs=pit(),ZLs=c_();function e8s(t,e,r,n,o){let s={};for(let c of globalThis.Object.getOwnPropertyNames(t))s[c]=(0,XLs.Extends)(t[c],e,r,n,(0,ZLs.Clone)(o));return s}a(e8s,"FromProperties");function t8s(t,e,r,n,o){return e8s(t.properties,e,r,n,o)}a(t8s,"FromMappedResult");function r8s(t,e,r,n,o){let s=t8s(t,e,r,n,o);return(0,JLs.MappedResult)(s)}a(r8s,"ExtendsFromMappedResult")});var pit=T(qrr=>{"use strict";f();Object.defineProperty(qrr,"__esModule",{value:!0});qrr.Extends=a8s;var jWn=Zn(),n8s=tf(),Qrr=Lrr(),i8s=Grr(),o8s=Urr(),$Wn=Bo();function s8s(t,e,r,n){let o=(0,Qrr.ExtendsCheck)(t,e);return o===Qrr.ExtendsResult.Union?(0,n8s.Union)([r,n]):o===Qrr.ExtendsResult.True?r:n}a(s8s,"ExtendsResolve");function a8s(t,e,r,n,o){return(0,$Wn.IsMappedResult)(t)?(0,o8s.ExtendsFromMappedResult)(t,e,r,n,o):(0,$Wn.IsMappedKey)(t)?(0,jWn.CreateType)((0,i8s.ExtendsFromMappedKey)(t,e,r,n,o)):(0,jWn.CreateType)(s8s(t,e,r,n),o)}a(a8s,"Extends")});var Grr=T(Hrr=>{"use strict";f();Object.defineProperty(Hrr,"__esModule",{value:!0});Hrr.ExtendsFromMappedKey=m8s;var c8s=Q0(),l8s=AA(),u8s=pit(),d8s=c_();function f8s(t,e,r,n,o){return{[t]:(0,u8s.Extends)((0,l8s.Literal)(t),e,r,n,(0,d8s.Clone)(o))}}a(f8s,"FromPropertyKey");function p8s(t,e,r,n,o){return t.reduce((s,c)=>({...s,...f8s(c,e,r,n,o)}),{})}a(p8s,"FromPropertyKeys");function h8s(t,e,r,n,o){return p8s(t.keys,e,r,n,o)}a(h8s,"FromMappedKey");function m8s(t,e,r,n,o){let s=h8s(t,e,r,n,o);return(0,c8s.MappedResult)(s)}a(m8s,"ExtendsFromMappedKey")});var $rr=T(jrr=>{"use strict";f();Object.defineProperty(jrr,"__esModule",{value:!0});jrr.ExtendsUndefinedCheck=mit;var hit=nn();function g8s(t){return t.allOf.every(e=>mit(e))}a(g8s,"Intersect");function A8s(t){return t.anyOf.some(e=>mit(e))}a(A8s,"Union");function y8s(t){return!mit(t.not)}a(y8s,"Not");function mit(t){return t[hit.Kind]==="Intersect"?g8s(t):t[hit.Kind]==="Union"?A8s(t):t[hit.Kind]==="Not"?y8s(t):t[hit.Kind]==="Undefined"}a(mit,"ExtendsUndefinedCheck")});var oK=T(fR=>{"use strict";f();var E8s=fR&&fR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gxe=fR&&fR.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&E8s(e,t,r)};Object.defineProperty(fR,"__esModule",{value:!0});Gxe(Lrr(),fR);Gxe(Grr(),fR);Gxe(Urr(),fR);Gxe($rr(),fR);Gxe(pit(),fR)});var Wrr=T(Vrr=>{"use strict";f();Object.defineProperty(Vrr,"__esModule",{value:!0});Vrr.ExcludeFromTemplateLiteral=v8s;var C8s=git(),_8s=lR();function v8s(t,e){return(0,C8s.Exclude)((0,_8s.TemplateLiteralToUnion)(t),e)}a(v8s,"ExcludeFromTemplateLiteral")});var git=T(Krr=>{"use strict";f();Object.defineProperty(Krr,"__esModule",{value:!0});Krr.Exclude=w8s;var zrr=Zn(),b8s=tf(),T8s=U0(),Ait=oK(),S8s=Jrr(),I8s=Wrr(),Yrr=Bo();function x8s(t,e){let r=t.filter(n=>(0,Ait.ExtendsCheck)(n,e)===Ait.ExtendsResult.False);return r.length===1?r[0]:(0,b8s.Union)(r)}a(x8s,"ExcludeRest");function w8s(t,e,r={}){return(0,Yrr.IsTemplateLiteral)(t)?(0,zrr.CreateType)((0,I8s.ExcludeFromTemplateLiteral)(t,e),r):(0,Yrr.IsMappedResult)(t)?(0,zrr.CreateType)((0,S8s.ExcludeFromMappedResult)(t,e),r):(0,zrr.CreateType)((0,Yrr.IsUnion)(t)?x8s(t.anyOf,e):(0,Ait.ExtendsCheck)(t,e)!==Ait.ExtendsResult.False?(0,T8s.Never)():t,r)}a(w8s,"Exclude")});var Jrr=T(Xrr=>{"use strict";f();Object.defineProperty(Xrr,"__esModule",{value:!0});Xrr.ExcludeFromMappedResult=D8s;var R8s=Q0(),P8s=git();function k8s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,P8s.Exclude)(t[n],e);return r}a(k8s,"FromProperties");function N8s(t,e){return k8s(t.properties,e)}a(N8s,"FromMappedResult");function D8s(t,e){let r=N8s(t,e);return(0,R8s.MappedResult)(r)}a(D8s,"ExcludeFromMappedResult")});var yit=T(TB=>{"use strict";f();var M8s=TB&&TB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zrr=TB&&TB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&M8s(e,t,r)};Object.defineProperty(TB,"__esModule",{value:!0});Zrr(Jrr(),TB);Zrr(Wrr(),TB);Zrr(git(),TB)});var tnr=T(enr=>{"use strict";f();Object.defineProperty(enr,"__esModule",{value:!0});enr.ExtractFromTemplateLiteral=L8s;var O8s=Eit(),B8s=lR();function L8s(t,e){return(0,O8s.Extract)((0,B8s.TemplateLiteralToUnion)(t),e)}a(L8s,"ExtractFromTemplateLiteral")});var Eit=T(inr=>{"use strict";f();Object.defineProperty(inr,"__esModule",{value:!0});inr.Extract=H8s;var rnr=Zn(),F8s=tf(),U8s=U0(),Cit=oK(),Q8s=onr(),q8s=tnr(),nnr=Bo();function G8s(t,e){let r=t.filter(n=>(0,Cit.ExtendsCheck)(n,e)!==Cit.ExtendsResult.False);return r.length===1?r[0]:(0,F8s.Union)(r)}a(G8s,"ExtractRest");function H8s(t,e,r){return(0,nnr.IsTemplateLiteral)(t)?(0,rnr.CreateType)((0,q8s.ExtractFromTemplateLiteral)(t,e),r):(0,nnr.IsMappedResult)(t)?(0,rnr.CreateType)((0,Q8s.ExtractFromMappedResult)(t,e),r):(0,rnr.CreateType)((0,nnr.IsUnion)(t)?G8s(t.anyOf,e):(0,Cit.ExtendsCheck)(t,e)!==Cit.ExtendsResult.False?t:(0,U8s.Never)(),r)}a(H8s,"Extract")});var onr=T(snr=>{"use strict";f();Object.defineProperty(snr,"__esModule",{value:!0});snr.ExtractFromMappedResult=z8s;var j8s=Q0(),$8s=Eit();function V8s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,$8s.Extract)(t[n],e);return r}a(V8s,"FromProperties");function W8s(t,e){return V8s(t.properties,e)}a(W8s,"FromMappedResult");function z8s(t,e){let r=W8s(t,e);return(0,j8s.MappedResult)(r)}a(z8s,"ExtractFromMappedResult")});var _it=T(SB=>{"use strict";f();var Y8s=SB&&SB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),anr=SB&&SB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Y8s(e,t,r)};Object.defineProperty(SB,"__esModule",{value:!0});anr(onr(),SB);anr(tnr(),SB);anr(Eit(),SB)});var VWn=T(IB=>{"use strict";f();var K8s=IB&&IB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),J8s=IB&&IB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),X8s=IB&&IB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var n6s=sK&&sK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),i6s=sK&&sK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&n6s(e,t,r)};Object.defineProperty(sK,"__esModule",{value:!0});i6s(VWn(),sK)});var WWn=T(cnr=>{"use strict";f();Object.defineProperty(cnr,"__esModule",{value:!0});cnr.ReadonlyOptional=a6s;var o6s=IU(),s6s=wD();function a6s(t){return(0,o6s.Readonly)((0,s6s.Optional)(t))}a(a6s,"ReadonlyOptional")});var Hxe=T(aK=>{"use strict";f();var c6s=aK&&aK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),l6s=aK&&aK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&c6s(e,t,r)};Object.defineProperty(aK,"__esModule",{value:!0});l6s(WWn(),aK)});var XWn=T(Rue=>{"use strict";f();Object.defineProperty(Rue,"__esModule",{value:!0});Rue.Record=I6s;Rue.RecordPattern=unr;Rue.RecordKey=x6s;Rue.RecordValue=w6s;var u6s=Zn(),YWn=nn(),d6s=U0(),f6s=vU(),KWn=Hy(),zWn=bU(),p6s=tf(),h6s=lR(),cK=Txe(),JWn=uR(),m6s=Gy(),kD=Bo();function lK(t,e,r){return(0,u6s.CreateType)({[YWn.Kind]:"Record",type:"object",patternProperties:{[t]:e}},r)}a(lK,"RecordCreateFromPattern");function lnr(t,e,r){let n={};for(let o of t)n[o]=e;return(0,KWn.Object)(n,{...r,[YWn.Hint]:"Record"})}a(lnr,"RecordCreateFromKeys");function g6s(t,e,r){return(0,h6s.IsTemplateLiteralFinite)(t)?lnr((0,JWn.IndexPropertyKeys)(t),e,r):lK(t.pattern,e,r)}a(g6s,"FromTemplateLiteralKey");function A6s(t,e,r){return lnr((0,JWn.IndexPropertyKeys)((0,p6s.Union)(t)),e,r)}a(A6s,"FromUnionKey");function y6s(t,e,r){return lnr([t.toString()],e,r)}a(y6s,"FromLiteralKey");function E6s(t,e,r){return lK(t.source,e,r)}a(E6s,"FromRegExpKey");function C6s(t,e,r){let n=(0,m6s.IsUndefined)(t.pattern)?cK.PatternStringExact:t.pattern;return lK(n,e,r)}a(C6s,"FromStringKey");function _6s(t,e,r){return lK(cK.PatternStringExact,e,r)}a(_6s,"FromAnyKey");function v6s(t,e,r){return lK(cK.PatternNeverExact,e,r)}a(v6s,"FromNeverKey");function b6s(t,e,r){return(0,KWn.Object)({true:e,false:e},r)}a(b6s,"FromBooleanKey");function T6s(t,e,r){return lK(cK.PatternNumberExact,e,r)}a(T6s,"FromIntegerKey");function S6s(t,e,r){return lK(cK.PatternNumberExact,e,r)}a(S6s,"FromNumberKey");function I6s(t,e,r={}){return(0,kD.IsUnion)(t)?A6s(t.anyOf,e,r):(0,kD.IsTemplateLiteral)(t)?g6s(t,e,r):(0,kD.IsLiteral)(t)?y6s(t.const,e,r):(0,kD.IsBoolean)(t)?b6s(t,e,r):(0,kD.IsInteger)(t)?T6s(t,e,r):(0,kD.IsNumber)(t)?S6s(t,e,r):(0,kD.IsRegExp)(t)?E6s(t,e,r):(0,kD.IsString)(t)?C6s(t,e,r):(0,kD.IsAny)(t)?_6s(t,e,r):(0,kD.IsNever)(t)?v6s(t,e,r):(0,d6s.Never)(r)}a(I6s,"Record");function unr(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}a(unr,"RecordPattern");function x6s(t){let e=unr(t);return e===cK.PatternStringExact?(0,zWn.String)():e===cK.PatternNumberExact?(0,f6s.Number)():(0,zWn.String)({pattern:e})}a(x6s,"RecordKey");function w6s(t){return t.patternProperties[unr(t)]}a(w6s,"RecordValue")});var Pue=T(uK=>{"use strict";f();var R6s=uK&&uK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P6s=uK&&uK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&R6s(e,t,r)};Object.defineProperty(uK,"__esModule",{value:!0});P6s(XWn(),uK)});var ezn=T(ND=>{"use strict";f();var k6s=ND&&ND.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N6s=ND&&ND.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ZWn=ND&&ND.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o({...r,[n]:X6s(t,e[n])}),{})}a(Z6s,"FromProperties");function kue(t,e){return e.map(r=>pR(t,r))}a(kue,"FromTypes");function pR(t,e){return h_.IsConstructor(e)?Q6s(t,e):h_.IsFunction(e)?q6s(t,e):h_.IsIntersect(e)?G6s(t,e):h_.IsUnion(e)?H6s(t,e):h_.IsTuple(e)?j6s(t,e):h_.IsArray(e)?$6s(t,e):h_.IsAsyncIterator(e)?V6s(t,e):h_.IsIterator(e)?W6s(t,e):h_.IsPromise(e)?z6s(t,e):h_.IsObject(e)?Y6s(t,e):h_.IsRecord(e)?K6s(t,e):h_.IsArgument(e)?J6s(t,e):e}a(pR,"FromType");function eFs(t,e){return pR(e,(0,D6s.CloneType)(t))}a(eFs,"Instantiate")});var bit=T(dK=>{"use strict";f();var tFs=dK&&dK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rFs=dK&&dK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tFs(e,t,r)};Object.defineProperty(dK,"__esModule",{value:!0});rFs(ezn(),dK)});var tzn=T(fnr=>{"use strict";f();Object.defineProperty(fnr,"__esModule",{value:!0});fnr.Integer=oFs;var nFs=Zn(),iFs=nn();function oFs(t){return(0,nFs.CreateType)({[iFs.Kind]:"Integer",type:"integer"},t)}a(oFs,"Integer")});var Tit=T(fK=>{"use strict";f();var sFs=fK&&fK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aFs=fK&&fK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sFs(e,t,r)};Object.defineProperty(fK,"__esModule",{value:!0});aFs(tzn(),fK)});var hnr=T(pnr=>{"use strict";f();Object.defineProperty(pnr,"__esModule",{value:!0});pnr.IntrinsicFromMappedKey=mFs;var cFs=Q0(),lFs=pK(),uFs=AA(),dFs=c_();function fFs(t,e,r){return{[t]:(0,lFs.Intrinsic)((0,uFs.Literal)(t),e,(0,dFs.Clone)(r))}}a(fFs,"MappedIntrinsicPropertyKey");function pFs(t,e,r){return t.reduce((o,s)=>({...o,...fFs(s,e,r)}),{})}a(pFs,"MappedIntrinsicPropertyKeys");function hFs(t,e,r){return pFs(t.keys,e,r)}a(hFs,"MappedIntrinsicProperties");function mFs(t,e,r){let n=hFs(t,e,r);return(0,cFs.MappedResult)(n)}a(mFs,"IntrinsicFromMappedKey")});var pK=T(mnr=>{"use strict";f();Object.defineProperty(mnr,"__esModule",{value:!0});mnr.Intrinsic=szn;var gFs=Zn(),Sit=lR(),AFs=hnr(),rzn=AA(),nzn=tf(),Iit=Bo();function yFs(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),r].join("")}a(yFs,"ApplyUncapitalize");function EFs(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),r].join("")}a(EFs,"ApplyCapitalize");function CFs(t){return t.toUpperCase()}a(CFs,"ApplyUppercase");function _Fs(t){return t.toLowerCase()}a(_Fs,"ApplyLowercase");function vFs(t,e,r){let n=(0,Sit.TemplateLiteralParseExact)(t.pattern);if(!(0,Sit.IsTemplateLiteralExpressionFinite)(n))return{...t,pattern:izn(t.pattern,e)};let c=[...(0,Sit.TemplateLiteralExpressionGenerate)(n)].map(d=>(0,rzn.Literal)(d)),l=ozn(c,e),u=(0,nzn.Union)(l);return(0,Sit.TemplateLiteral)([u],r)}a(vFs,"FromTemplateLiteral");function izn(t,e){return typeof t=="string"?e==="Uncapitalize"?yFs(t):e==="Capitalize"?EFs(t):e==="Uppercase"?CFs(t):e==="Lowercase"?_Fs(t):t:t.toString()}a(izn,"FromLiteralValue");function ozn(t,e){return t.map(r=>szn(r,e))}a(ozn,"FromRest");function szn(t,e,r={}){return(0,Iit.IsMappedKey)(t)?(0,AFs.IntrinsicFromMappedKey)(t,e,r):(0,Iit.IsTemplateLiteral)(t)?vFs(t,e,r):(0,Iit.IsUnion)(t)?(0,nzn.Union)(ozn(t.anyOf,e),r):(0,Iit.IsLiteral)(t)?(0,rzn.Literal)(izn(t.const,e),r):(0,gFs.CreateType)(t,r)}a(szn,"Intrinsic")});var azn=T(gnr=>{"use strict";f();Object.defineProperty(gnr,"__esModule",{value:!0});gnr.Capitalize=TFs;var bFs=pK();function TFs(t,e={}){return(0,bFs.Intrinsic)(t,"Capitalize",e)}a(TFs,"Capitalize")});var czn=T(Anr=>{"use strict";f();Object.defineProperty(Anr,"__esModule",{value:!0});Anr.Lowercase=IFs;var SFs=pK();function IFs(t,e={}){return(0,SFs.Intrinsic)(t,"Lowercase",e)}a(IFs,"Lowercase")});var lzn=T(ynr=>{"use strict";f();Object.defineProperty(ynr,"__esModule",{value:!0});ynr.Uncapitalize=wFs;var xFs=pK();function wFs(t,e={}){return(0,xFs.Intrinsic)(t,"Uncapitalize",e)}a(wFs,"Uncapitalize")});var uzn=T(Enr=>{"use strict";f();Object.defineProperty(Enr,"__esModule",{value:!0});Enr.Uppercase=PFs;var RFs=pK();function PFs(t,e={}){return(0,RFs.Intrinsic)(t,"Uppercase",e)}a(PFs,"Uppercase")});var xit=T(eI=>{"use strict";f();var kFs=eI&&eI.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nue=eI&&eI.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kFs(e,t,r)};Object.defineProperty(eI,"__esModule",{value:!0});Nue(azn(),eI);Nue(hnr(),eI);Nue(pK(),eI);Nue(czn(),eI);Nue(lzn(),eI);Nue(uzn(),eI)});var _nr=T(Cnr=>{"use strict";f();Object.defineProperty(Cnr,"__esModule",{value:!0});Cnr.OmitFromMappedResult=LFs;var NFs=Q0(),DFs=wit(),MFs=c_();function OFs(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=(0,DFs.Omit)(t[o],e,(0,MFs.Clone)(r));return n}a(OFs,"FromProperties");function BFs(t,e,r){return OFs(t.properties,e,r)}a(BFs,"FromMappedResult");function LFs(t,e,r){let n=BFs(t,e,r);return(0,NFs.MappedResult)(n)}a(LFs,"OmitFromMappedResult")});var wit=T(Tnr=>{"use strict";f();Object.defineProperty(Tnr,"__esModule",{value:!0});Tnr.Omit=ZFs;var FFs=Zn(),UFs=Gnt(),QFs=Cxe(),vnr=CU(),qFs=AA(),GFs=uR(),HFs=tb(),dzn=tf(),fzn=Hy(),jFs=Snr(),$Fs=_nr(),xB=Bo(),VFs=Gy();function WFs(t,e){return t.map(r=>bnr(r,e))}a(WFs,"FromIntersect");function zFs(t,e){return t.map(r=>bnr(r,e))}a(zFs,"FromUnion");function YFs(t,e){let{[e]:r,...n}=t;return n}a(YFs,"FromProperty");function KFs(t,e){return e.reduce((r,n)=>YFs(r,n),t)}a(KFs,"FromProperties");function JFs(t,e){let r=(0,UFs.Discard)(t,[QFs.TransformKind,"$id","required","properties"]),n=KFs(t.properties,e);return(0,fzn.Object)(n,r)}a(JFs,"FromObject");function XFs(t){let e=t.reduce((r,n)=>(0,xB.IsLiteralValue)(n)?[...r,(0,qFs.Literal)(n)]:r,[]);return(0,dzn.Union)(e)}a(XFs,"UnionFromPropertyKeys");function bnr(t,e){return(0,xB.IsIntersect)(t)?(0,HFs.Intersect)(WFs(t.allOf,e)):(0,xB.IsUnion)(t)?(0,dzn.Union)(zFs(t.anyOf,e)):(0,xB.IsObject)(t)?JFs(t,e):(0,fzn.Object)({})}a(bnr,"OmitResolve");function ZFs(t,e,r){let n=(0,VFs.IsArray)(e)?XFs(e):e,o=(0,xB.IsSchema)(e)?(0,GFs.IndexPropertyKeys)(e):e,s=(0,xB.IsRef)(t),c=(0,xB.IsRef)(e);return(0,xB.IsMappedResult)(t)?(0,$Fs.OmitFromMappedResult)(t,o,r):(0,xB.IsMappedKey)(e)?(0,jFs.OmitFromMappedKey)(t,e,r):s&&c?(0,vnr.Computed)("Omit",[t,n],r):!s&&c?(0,vnr.Computed)("Omit",[t,n],r):s&&!c?(0,vnr.Computed)("Omit",[t,n],r):(0,FFs.CreateType)({...bnr(t,o),...r})}a(ZFs,"Omit")});var Snr=T(Inr=>{"use strict";f();Object.defineProperty(Inr,"__esModule",{value:!0});Inr.OmitFromMappedKey=s9s;var e9s=Q0(),t9s=wit(),r9s=c_();function n9s(t,e,r){return{[e]:(0,t9s.Omit)(t,[e],(0,r9s.Clone)(r))}}a(n9s,"FromPropertyKey");function i9s(t,e,r){return e.reduce((n,o)=>({...n,...n9s(t,o,r)}),{})}a(i9s,"FromPropertyKeys");function o9s(t,e,r){return i9s(t,e.keys,r)}a(o9s,"FromMappedKey");function s9s(t,e,r){let n=o9s(t,e,r);return(0,e9s.MappedResult)(n)}a(s9s,"OmitFromMappedKey")});var jxe=T(wB=>{"use strict";f();var a9s=wB&&wB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xnr=wB&&wB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&a9s(e,t,r)};Object.defineProperty(wB,"__esModule",{value:!0});xnr(Snr(),wB);xnr(_nr(),wB);xnr(wit(),wB)});var Rnr=T(wnr=>{"use strict";f();Object.defineProperty(wnr,"__esModule",{value:!0});wnr.PickFromMappedResult=p9s;var c9s=Q0(),l9s=Rit(),u9s=c_();function d9s(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=(0,l9s.Pick)(t[o],e,(0,u9s.Clone)(r));return n}a(d9s,"FromProperties");function f9s(t,e,r){return d9s(t.properties,e,r)}a(f9s,"FromMappedResult");function p9s(t,e,r){let n=f9s(t,e,r);return(0,c9s.MappedResult)(n)}a(p9s,"PickFromMappedResult")});var Rit=T(Nnr=>{"use strict";f();Object.defineProperty(Nnr,"__esModule",{value:!0});Nnr.Pick=w9s;var h9s=Zn(),m9s=Gnt(),Pnr=CU(),g9s=tb(),A9s=AA(),pzn=Hy(),hzn=tf(),y9s=uR(),E9s=Cxe(),RB=Bo(),C9s=Gy(),_9s=Dnr(),v9s=Rnr();function b9s(t,e){return t.map(r=>knr(r,e))}a(b9s,"FromIntersect");function T9s(t,e){return t.map(r=>knr(r,e))}a(T9s,"FromUnion");function S9s(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}a(S9s,"FromProperties");function I9s(t,e){let r=(0,m9s.Discard)(t,[E9s.TransformKind,"$id","required","properties"]),n=S9s(t.properties,e);return(0,pzn.Object)(n,r)}a(I9s,"FromObject");function x9s(t){let e=t.reduce((r,n)=>(0,RB.IsLiteralValue)(n)?[...r,(0,A9s.Literal)(n)]:r,[]);return(0,hzn.Union)(e)}a(x9s,"UnionFromPropertyKeys");function knr(t,e){return(0,RB.IsIntersect)(t)?(0,g9s.Intersect)(b9s(t.allOf,e)):(0,RB.IsUnion)(t)?(0,hzn.Union)(T9s(t.anyOf,e)):(0,RB.IsObject)(t)?I9s(t,e):(0,pzn.Object)({})}a(knr,"PickResolve");function w9s(t,e,r){let n=(0,C9s.IsArray)(e)?x9s(e):e,o=(0,RB.IsSchema)(e)?(0,y9s.IndexPropertyKeys)(e):e,s=(0,RB.IsRef)(t),c=(0,RB.IsRef)(e);return(0,RB.IsMappedResult)(t)?(0,v9s.PickFromMappedResult)(t,o,r):(0,RB.IsMappedKey)(e)?(0,_9s.PickFromMappedKey)(t,e,r):s&&c?(0,Pnr.Computed)("Pick",[t,n],r):!s&&c?(0,Pnr.Computed)("Pick",[t,n],r):s&&!c?(0,Pnr.Computed)("Pick",[t,n],r):(0,h9s.CreateType)({...knr(t,o),...r})}a(w9s,"Pick")});var Dnr=T(Mnr=>{"use strict";f();Object.defineProperty(Mnr,"__esModule",{value:!0});Mnr.PickFromMappedKey=O9s;var R9s=Q0(),P9s=Rit(),k9s=c_();function N9s(t,e,r){return{[e]:(0,P9s.Pick)(t,[e],(0,k9s.Clone)(r))}}a(N9s,"FromPropertyKey");function D9s(t,e,r){return e.reduce((n,o)=>({...n,...N9s(t,o,r)}),{})}a(D9s,"FromPropertyKeys");function M9s(t,e,r){return D9s(t,e.keys,r)}a(M9s,"FromMappedKey");function O9s(t,e,r){let n=M9s(t,e,r);return(0,R9s.MappedResult)(n)}a(O9s,"PickFromMappedKey")});var $xe=T(PB=>{"use strict";f();var B9s=PB&&PB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Onr=PB&&PB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&B9s(e,t,r)};Object.defineProperty(PB,"__esModule",{value:!0});Onr(Dnr(),PB);Onr(Rnr(),PB);Onr(Rit(),PB)});var Lnr=T(kB=>{"use strict";f();var L9s=kB&&kB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),F9s=kB&&kB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),U9s=kB&&kB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oAzn(e))}a(mzn,"FromRest");function Azn(t){return $y.IsComputed(t)?z9s(t.target,t.parameters):$y.IsRef(t)?Y9s(t.$ref):$y.IsIntersect(t)?(0,G9s.Intersect)(mzn(t.allOf)):$y.IsUnion(t)?(0,H9s.Union)(mzn(t.anyOf)):$y.IsObject(t)?J9s(t):$y.IsBigInt(t)||$y.IsBoolean(t)||$y.IsInteger(t)||$y.IsLiteral(t)||$y.IsNull(t)||$y.IsNumber(t)||$y.IsString(t)||$y.IsSymbol(t)||$y.IsUndefined(t)?t:(0,gzn.Object)({})}a(Azn,"PartialResolve");function X9s(t,e){return $y.IsMappedResult(t)?(0,W9s.PartialFromMappedResult)(t,e):(0,Q9s.CreateType)({...Azn(t),...e})}a(X9s,"Partial")});var Fnr=T(Unr=>{"use strict";f();Object.defineProperty(Unr,"__esModule",{value:!0});Unr.PartialFromMappedResult=i7s;var Z9s=Q0(),e7s=Lnr(),t7s=c_();function r7s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,e7s.Partial)(t[n],(0,t7s.Clone)(e));return r}a(r7s,"FromProperties");function n7s(t,e){return r7s(t.properties,e)}a(n7s,"FromMappedResult");function i7s(t,e){let r=n7s(t,e);return(0,Z9s.MappedResult)(r)}a(i7s,"PartialFromMappedResult")});var Vxe=T(PU=>{"use strict";f();var o7s=PU&&PU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yzn=PU&&PU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&o7s(e,t,r)};Object.defineProperty(PU,"__esModule",{value:!0});yzn(Fnr(),PU);yzn(Lnr(),PU)});var qnr=T(NB=>{"use strict";f();var s7s=NB&&NB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),a7s=NB&&NB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),c7s=NB&&NB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;obzn(e))}a(Ezn,"FromRest");function bzn(t){return Vy.IsComputed(t)?h7s(t.target,t.parameters):Vy.IsRef(t)?m7s(t.$ref):Vy.IsIntersect(t)?(0,u7s.Intersect)(Ezn(t.allOf)):Vy.IsUnion(t)?(0,d7s.Union)(Ezn(t.anyOf)):Vy.IsObject(t)?A7s(t):Vy.IsBigInt(t)||Vy.IsBoolean(t)||Vy.IsInteger(t)||Vy.IsLiteral(t)||Vy.IsNull(t)||Vy.IsNumber(t)||Vy.IsString(t)||Vy.IsSymbol(t)||Vy.IsUndefined(t)?t:(0,Czn.Object)({})}a(bzn,"RequiredResolve");function y7s(t,e){return Vy.IsMappedResult(t)?(0,p7s.RequiredFromMappedResult)(t,e):(0,l7s.CreateType)({...bzn(t),...e})}a(y7s,"Required")});var Gnr=T(Hnr=>{"use strict";f();Object.defineProperty(Hnr,"__esModule",{value:!0});Hnr.RequiredFromMappedResult=b7s;var E7s=Q0(),C7s=qnr();function _7s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,C7s.Required)(t[n],e);return r}a(_7s,"FromProperties");function v7s(t,e){return _7s(t.properties,e)}a(v7s,"FromMappedResult");function b7s(t,e){let r=v7s(t,e);return(0,E7s.MappedResult)(r)}a(b7s,"RequiredFromMappedResult")});var Wxe=T(kU=>{"use strict";f();var T7s=kU&&kU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Tzn=kU&&kU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&T7s(e,t,r)};Object.defineProperty(kU,"__esModule",{value:!0});Tzn(Gnr(),kU);Tzn(qnr(),kU)});var wzn=T(hR=>{"use strict";f();var S7s=hR&&hR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),I7s=hR&&hR.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),x7s=hR&&hR.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oeg.IsRef(r)?$nr(t,r.$ref):g_(t,r))}a($7s,"DereferenceParameters");function $nr(t,e){return e in t?eg.IsRef(t[e])?$nr(t,t[e].$ref):g_(t,t[e]):(0,jnr.Never)()}a($nr,"Dereference");function V7s(t){return(0,P7s.Awaited)(t[0])}a(V7s,"FromAwaited");function W7s(t){return(0,D7s.Index)(t[0],t[1])}a(W7s,"FromIndex");function z7s(t){return(0,L7s.KeyOf)(t[0])}a(z7s,"FromKeyOf");function Y7s(t){return(0,q7s.Partial)(t[0])}a(Y7s,"FromPartial");function K7s(t){return(0,U7s.Omit)(t[0],t[1])}a(K7s,"FromOmit");function J7s(t){return(0,Q7s.Pick)(t[0],t[1])}a(J7s,"FromPick");function X7s(t){return(0,G7s.Required)(t[0])}a(X7s,"FromRequired");function Z7s(t,e,r){let n=$7s(t,r);return e==="Awaited"?V7s(n):e==="Index"?W7s(n):e==="KeyOf"?z7s(n):e==="Partial"?Y7s(n):e==="Omit"?K7s(n):e==="Pick"?J7s(n):e==="Required"?X7s(n):(0,jnr.Never)()}a(Z7s,"FromComputed");function eUs(t,e){return(0,R7s.Array)(g_(t,e))}a(eUs,"FromArray");function tUs(t,e){return(0,k7s.AsyncIterator)(g_(t,e))}a(tUs,"FromAsyncIterator");function rUs(t,e,r){return(0,N7s.Constructor)(zxe(t,e),g_(t,r))}a(rUs,"FromConstructor");function nUs(t,e,r){return(0,M7s.Function)(zxe(t,e),g_(t,r))}a(nUs,"FromFunction");function iUs(t,e){return(0,O7s.Intersect)(zxe(t,e))}a(iUs,"FromIntersect");function oUs(t,e){return(0,B7s.Iterator)(g_(t,e))}a(oUs,"FromIterator");function sUs(t,e){return(0,F7s.Object)(globalThis.Object.keys(e).reduce((r,n)=>({...r,[n]:g_(t,e[n])}),{}))}a(sUs,"FromObject");function aUs(t,e){let[r,n]=[g_(t,(0,Izn.RecordValue)(e)),(0,Izn.RecordPattern)(e)],o=(0,w7s.CloneType)(e);return o.patternProperties[n]=r,o}a(aUs,"FromRecord");function cUs(t,e){return eg.IsRef(e)?{...$nr(t,e.$ref),[Pit.TransformKind]:e[Pit.TransformKind]}:e}a(cUs,"FromTransform");function lUs(t,e){return(0,H7s.Tuple)(zxe(t,e))}a(lUs,"FromTuple");function uUs(t,e){return(0,j7s.Union)(zxe(t,e))}a(uUs,"FromUnion");function zxe(t,e){return e.map(r=>g_(t,r))}a(zxe,"FromTypes");function g_(t,e){return eg.IsOptional(e)?(0,m_.CreateType)(g_(t,(0,Szn.Discard)(e,[Pit.OptionalKind])),e):eg.IsReadonly(e)?(0,m_.CreateType)(g_(t,(0,Szn.Discard)(e,[Pit.ReadonlyKind])),e):eg.IsTransform(e)?(0,m_.CreateType)(cUs(t,e),e):eg.IsArray(e)?(0,m_.CreateType)(eUs(t,e.items),e):eg.IsAsyncIterator(e)?(0,m_.CreateType)(tUs(t,e.items),e):eg.IsComputed(e)?(0,m_.CreateType)(Z7s(t,e.target,e.parameters)):eg.IsConstructor(e)?(0,m_.CreateType)(rUs(t,e.parameters,e.returns),e):eg.IsFunction(e)?(0,m_.CreateType)(nUs(t,e.parameters,e.returns),e):eg.IsIntersect(e)?(0,m_.CreateType)(iUs(t,e.allOf),e):eg.IsIterator(e)?(0,m_.CreateType)(oUs(t,e.items),e):eg.IsObject(e)?(0,m_.CreateType)(sUs(t,e.properties),e):eg.IsRecord(e)?(0,m_.CreateType)(aUs(t,e)):eg.IsTuple(e)?(0,m_.CreateType)(lUs(t,e.items||[]),e):eg.IsUnion(e)?(0,m_.CreateType)(uUs(t,e.anyOf),e):e}a(g_,"FromType");function xzn(t,e){return e in t?g_(t,t[e]):(0,jnr.Never)()}a(xzn,"ComputeType");function dUs(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,r)=>({...e,[r]:xzn(t,r)}),{})}a(dUs,"ComputeModuleProperties")});var Pzn=T(Yxe=>{"use strict";f();Object.defineProperty(Yxe,"__esModule",{value:!0});Yxe.TModule=void 0;Yxe.Module=hUs;var Rzn=mB(),fUs=nn(),pUs=wzn(),kit=class{static{a(this,"TModule")}constructor(e){let r=(0,pUs.ComputeModuleProperties)(e),n=this.WithIdentifiers(r);this.$defs=n}Import(e,r){let n={...this.$defs,[e]:(0,Rzn.CreateType)(this.$defs[e],r)};return(0,Rzn.CreateType)({[fUs.Kind]:"Import",$defs:n,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:{...e[n],$id:n}}),{})}};Yxe.TModule=kit;function hUs(t){return new kit(t)}a(hUs,"Module")});var Nit=T(hK=>{"use strict";f();var mUs=hK&&hK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gUs=hK&&hK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&mUs(e,t,r)};Object.defineProperty(hK,"__esModule",{value:!0});gUs(Pzn(),hK)});var kzn=T(Vnr=>{"use strict";f();Object.defineProperty(Vnr,"__esModule",{value:!0});Vnr.Not=EUs;var AUs=Zn(),yUs=nn();function EUs(t,e){return(0,AUs.CreateType)({[yUs.Kind]:"Not",not:t},e)}a(EUs,"Not")});var Dit=T(mK=>{"use strict";f();var CUs=mK&&mK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_Us=mK&&mK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&CUs(e,t,r)};Object.defineProperty(mK,"__esModule",{value:!0});_Us(kzn(),mK)});var Nzn=T(DB=>{"use strict";f();var vUs=DB&&DB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bUs=DB&&DB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TUs=DB&&DB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var RUs=gK&&gK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PUs=gK&&gK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&RUs(e,t,r)};Object.defineProperty(gK,"__esModule",{value:!0});PUs(Nzn(),gK)});var Mzn=T(Wnr=>{"use strict";f();Object.defineProperty(Wnr,"__esModule",{value:!0});Wnr.Recursive=OUs;var kUs=Mnt(),NUs=Zn(),DUs=Gy(),Dzn=nn(),MUs=0;function OUs(t,e={}){(0,DUs.IsUndefined)(e.$id)&&(e.$id=`T${MUs++}`);let r=(0,kUs.CloneType)(t({[Dzn.Kind]:"This",$ref:`${e.$id}`}));return r.$id=e.$id,(0,NUs.CreateType)({[Dzn.Hint]:"Recursive",...r},e)}a(OUs,"Recursive")});var Oit=T(AK=>{"use strict";f();var BUs=AK&&AK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LUs=AK&&AK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BUs(e,t,r)};Object.defineProperty(AK,"__esModule",{value:!0});LUs(Mzn(),AK)});var Ozn=T(znr=>{"use strict";f();Object.defineProperty(znr,"__esModule",{value:!0});znr.RegExp=qUs;var FUs=Zn(),UUs=Gy(),QUs=nn();function qUs(t,e){let r=(0,UUs.IsString)(t)?new globalThis.RegExp(t):t;return(0,FUs.CreateType)({[QUs.Kind]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},e)}a(qUs,"RegExp")});var Bit=T(yK=>{"use strict";f();var GUs=yK&&yK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),HUs=yK&&yK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&GUs(e,t,r)};Object.defineProperty(yK,"__esModule",{value:!0});HUs(Ozn(),yK)});var Bzn=T(Knr=>{"use strict";f();Object.defineProperty(Knr,"__esModule",{value:!0});Knr.Rest=$Us;var Ynr=Bo();function jUs(t){return(0,Ynr.IsIntersect)(t)?t.allOf:(0,Ynr.IsUnion)(t)?t.anyOf:(0,Ynr.IsTuple)(t)?t.items??[]:[]}a(jUs,"RestResolve");function $Us(t){return jUs(t)}a($Us,"Rest")});var Lit=T(EK=>{"use strict";f();var VUs=EK&&EK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),WUs=EK&&EK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&VUs(e,t,r)};Object.defineProperty(EK,"__esModule",{value:!0});WUs(Bzn(),EK)});var Lzn=T(MB=>{"use strict";f();var zUs=MB&&MB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),YUs=MB&&MB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),KUs=MB&&MB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var tQs=CK&&CK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rQs=CK&&CK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&tQs(e,t,r)};Object.defineProperty(CK,"__esModule",{value:!0});rQs(Lzn(),CK)});var Uzn=T(Fzn=>{"use strict";f();Object.defineProperty(Fzn,"__esModule",{value:!0})});var qzn=T(Qzn=>{"use strict";f();Object.defineProperty(Qzn,"__esModule",{value:!0});var d9d=nn()});var Hzn=T(NU=>{"use strict";f();var nQs=NU&&NU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gzn=NU&&NU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nQs(e,t,r)};Object.defineProperty(NU,"__esModule",{value:!0});Gzn(Uzn(),NU);Gzn(qzn(),NU)});var $zn=T(jzn=>{"use strict";f();Object.defineProperty(jzn,"__esModule",{value:!0})});var Vzn=T(_K=>{"use strict";f();var iQs=_K&&_K.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oQs=_K&&_K.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iQs(e,t,r)};Object.defineProperty(_K,"__esModule",{value:!0});oQs($zn(),_K)});var Wzn=T(vK=>{"use strict";f();Object.defineProperty(vK,"__esModule",{value:!0});vK.TransformEncodeBuilder=vK.TransformDecodeBuilder=void 0;vK.Transform=aQs;var Uit=nn(),sQs=Bo(),Qit=class{static{a(this,"TransformDecodeBuilder")}constructor(e){this.schema=e}Decode(e){return new qit(this.schema,e)}};vK.TransformDecodeBuilder=Qit;var qit=class{static{a(this,"TransformEncodeBuilder")}constructor(e,r){this.schema=e,this.decode=r}EncodeTransform(e,r){let s={Encode:a(c=>r[Uit.TransformKind].Encode(e(c)),"Encode"),Decode:a(c=>this.decode(r[Uit.TransformKind].Decode(c)),"Decode")};return{...r,[Uit.TransformKind]:s}}EncodeSchema(e,r){let n={Decode:this.decode,Encode:e};return{...r,[Uit.TransformKind]:n}}Encode(e){return(0,sQs.IsTransform)(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};vK.TransformEncodeBuilder=qit;function aQs(t){return new Qit(t)}a(aQs,"Transform")});var Git=T(bK=>{"use strict";f();var cQs=bK&&bK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lQs=bK&&bK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cQs(e,t,r)};Object.defineProperty(bK,"__esModule",{value:!0});lQs(Wzn(),bK)});var Yzn=T(Jnr=>{"use strict";f();Object.defineProperty(Jnr,"__esModule",{value:!0});Jnr.Unsafe=dQs;var uQs=Zn(),zzn=nn();function dQs(t={}){return(0,uQs.CreateType)({[zzn.Kind]:t[zzn.Kind]??"Unsafe"},t)}a(dQs,"Unsafe")});var Kxe=T(TK=>{"use strict";f();var fQs=TK&&TK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pQs=TK&&TK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fQs(e,t,r)};Object.defineProperty(TK,"__esModule",{value:!0});pQs(Yzn(),TK)});var Kzn=T(Xnr=>{"use strict";f();Object.defineProperty(Xnr,"__esModule",{value:!0});Xnr.Void=gQs;var hQs=Zn(),mQs=nn();function gQs(t){return(0,hQs.CreateType)({[mQs.Kind]:"Void",type:"void"},t)}a(gQs,"Void")});var Hit=T(SK=>{"use strict";f();var AQs=SK&&SK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yQs=SK&&SK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AQs(e,t,r)};Object.defineProperty(SK,"__esModule",{value:!0});yQs(Kzn(),SK)});var eir=T($it=>{"use strict";f();Object.defineProperty($it,"__esModule",{value:!0});$it.JsonTypeBuilder=void 0;var EQs=gue(),CQs=Aue(),_Qs=wxe(),vQs=oit(),bQs=ait(),TQs=lit(),SQs=yit(),IQs=oK(),xQs=_it(),wQs=uR(),RQs=Tit(),PQs=tb(),jit=xit(),kQs=dR(),NQs=AA(),DQs=Q0(),MQs=U0(),OQs=Dit(),BQs=Fxe(),LQs=Nit(),FQs=vU(),UQs=Hy(),QQs=jxe(),qQs=wD(),GQs=Vxe(),HQs=$xe(),jQs=IU(),$Qs=Hxe(),VQs=Pue(),WQs=Oit(),zQs=wU(),YQs=Wxe(),KQs=Lit(),JQs=bU(),XQs=lR(),ZQs=Git(),eqs=CB(),tqs=tf(),rqs=RU(),nqs=Kxe(),Znr=class{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(e){return(0,$Qs.ReadonlyOptional)(e)}Readonly(e,r){return(0,jQs.Readonly)(e,r??!0)}Optional(e,r){return(0,qQs.Optional)(e,r??!0)}Any(e){return(0,EQs.Any)(e)}Array(e,r){return(0,CQs.Array)(e,r)}Boolean(e){return(0,_Qs.Boolean)(e)}Capitalize(e,r){return(0,jit.Capitalize)(e,r)}Composite(e,r){return(0,vQs.Composite)(e,r)}Const(e,r){return(0,bQs.Const)(e,r)}Enum(e,r){return(0,TQs.Enum)(e,r)}Exclude(e,r,n){return(0,SQs.Exclude)(e,r,n)}Extends(e,r,n,o,s){return(0,IQs.Extends)(e,r,n,o,s)}Extract(e,r,n){return(0,xQs.Extract)(e,r,n)}Index(e,r,n){return(0,wQs.Index)(e,r,n)}Integer(e){return(0,RQs.Integer)(e)}Intersect(e,r){return(0,PQs.Intersect)(e,r)}KeyOf(e,r){return(0,kQs.KeyOf)(e,r)}Literal(e,r){return(0,NQs.Literal)(e,r)}Lowercase(e,r){return(0,jit.Lowercase)(e,r)}Mapped(e,r,n){return(0,DQs.Mapped)(e,r,n)}Module(e){return(0,LQs.Module)(e)}Never(e){return(0,MQs.Never)(e)}Not(e,r){return(0,OQs.Not)(e,r)}Null(e){return(0,BQs.Null)(e)}Number(e){return(0,FQs.Number)(e)}Object(e,r){return(0,UQs.Object)(e,r)}Omit(e,r,n){return(0,QQs.Omit)(e,r,n)}Partial(e,r){return(0,GQs.Partial)(e,r)}Pick(e,r,n){return(0,HQs.Pick)(e,r,n)}Record(e,r,n){return(0,VQs.Record)(e,r,n)}Recursive(e,r){return(0,WQs.Recursive)(e,r)}Ref(...e){return(0,zQs.Ref)(e[0],e[1])}Required(e,r){return(0,YQs.Required)(e,r)}Rest(e){return(0,KQs.Rest)(e)}String(e){return(0,JQs.String)(e)}TemplateLiteral(e,r){return(0,XQs.TemplateLiteral)(e,r)}Transform(e){return(0,ZQs.Transform)(e)}Tuple(e,r){return(0,eqs.Tuple)(e,r)}Uncapitalize(e,r){return(0,jit.Uncapitalize)(e,r)}Union(e,r){return(0,tqs.Union)(e,r)}Unknown(e){return(0,rqs.Unknown)(e)}Unsafe(e){return(0,nqs.Unsafe)(e)}Uppercase(e,r){return(0,jit.Uppercase)(e,r)}};$it.JsonTypeBuilder=Znr});var Jzn=T(St=>{"use strict";f();Object.defineProperty(St,"__esModule",{value:!0});St.Rest=St.Required=St.RegExp=St.Ref=St.Recursive=St.Record=St.ReadonlyOptional=St.Readonly=St.Promise=St.Pick=St.Partial=St.Parameters=St.Optional=St.Omit=St.Object=St.Number=St.Null=St.Not=St.Never=St.Module=St.Mapped=St.Literal=St.KeyOf=St.Iterator=St.Uppercase=St.Lowercase=St.Uncapitalize=St.Capitalize=St.Intersect=St.Integer=St.Instantiate=St.InstanceType=St.Index=St.Function=St.Extract=St.Extends=St.Exclude=St.Enum=St.Date=St.ConstructorParameters=St.Constructor=St.Const=St.Composite=St.Boolean=St.BigInt=St.Awaited=St.AsyncIterator=St.Array=St.Argument=St.Any=void 0;St.Void=St.Unsafe=St.Unknown=St.Union=St.Undefined=St.Uint8Array=St.Tuple=St.Transform=St.TemplateLiteral=St.Symbol=St.String=St.ReturnType=void 0;var iqs=gue();Object.defineProperty(St,"Any",{enumerable:!0,get:a(function(){return iqs.Any},"get")});var oqs=qnt();Object.defineProperty(St,"Argument",{enumerable:!0,get:a(function(){return oqs.Argument},"get")});var sqs=Aue();Object.defineProperty(St,"Array",{enumerable:!0,get:a(function(){return sqs.Array},"get")});var aqs=yue();Object.defineProperty(St,"AsyncIterator",{enumerable:!0,get:a(function(){return aqs.AsyncIterator},"get")});var cqs=Bxe();Object.defineProperty(St,"Awaited",{enumerable:!0,get:a(function(){return cqs.Awaited},"get")});var lqs=bue();Object.defineProperty(St,"BigInt",{enumerable:!0,get:a(function(){return lqs.BigInt},"get")});var uqs=wxe();Object.defineProperty(St,"Boolean",{enumerable:!0,get:a(function(){return uqs.Boolean},"get")});var dqs=oit();Object.defineProperty(St,"Composite",{enumerable:!0,get:a(function(){return dqs.Composite},"get")});var fqs=ait();Object.defineProperty(St,"Const",{enumerable:!0,get:a(function(){return fqs.Const},"get")});var pqs=Eue();Object.defineProperty(St,"Constructor",{enumerable:!0,get:a(function(){return pqs.Constructor},"get")});var hqs=cit();Object.defineProperty(St,"ConstructorParameters",{enumerable:!0,get:a(function(){return hqs.ConstructorParameters},"get")});var mqs=Lxe();Object.defineProperty(St,"Date",{enumerable:!0,get:a(function(){return mqs.Date},"get")});var gqs=lit();Object.defineProperty(St,"Enum",{enumerable:!0,get:a(function(){return gqs.Enum},"get")});var Aqs=yit();Object.defineProperty(St,"Exclude",{enumerable:!0,get:a(function(){return Aqs.Exclude},"get")});var yqs=oK();Object.defineProperty(St,"Extends",{enumerable:!0,get:a(function(){return yqs.Extends},"get")});var Eqs=_it();Object.defineProperty(St,"Extract",{enumerable:!0,get:a(function(){return Eqs.Extract},"get")});var Cqs=_U();Object.defineProperty(St,"Function",{enumerable:!0,get:a(function(){return Cqs.Function},"get")});var _qs=uR();Object.defineProperty(St,"Index",{enumerable:!0,get:a(function(){return _qs.Index},"get")});var vqs=vit();Object.defineProperty(St,"InstanceType",{enumerable:!0,get:a(function(){return vqs.InstanceType},"get")});var bqs=bit();Object.defineProperty(St,"Instantiate",{enumerable:!0,get:a(function(){return bqs.Instantiate},"get")});var Tqs=Tit();Object.defineProperty(St,"Integer",{enumerable:!0,get:a(function(){return Tqs.Integer},"get")});var Sqs=tb();Object.defineProperty(St,"Intersect",{enumerable:!0,get:a(function(){return Sqs.Intersect},"get")});var Vit=xit();Object.defineProperty(St,"Capitalize",{enumerable:!0,get:a(function(){return Vit.Capitalize},"get")});Object.defineProperty(St,"Uncapitalize",{enumerable:!0,get:a(function(){return Vit.Uncapitalize},"get")});Object.defineProperty(St,"Lowercase",{enumerable:!0,get:a(function(){return Vit.Lowercase},"get")});Object.defineProperty(St,"Uppercase",{enumerable:!0,get:a(function(){return Vit.Uppercase},"get")});var Iqs=Sue();Object.defineProperty(St,"Iterator",{enumerable:!0,get:a(function(){return Iqs.Iterator},"get")});var xqs=dR();Object.defineProperty(St,"KeyOf",{enumerable:!0,get:a(function(){return xqs.KeyOf},"get")});var wqs=AA();Object.defineProperty(St,"Literal",{enumerable:!0,get:a(function(){return wqs.Literal},"get")});var Rqs=Q0();Object.defineProperty(St,"Mapped",{enumerable:!0,get:a(function(){return Rqs.Mapped},"get")});var Pqs=Nit();Object.defineProperty(St,"Module",{enumerable:!0,get:a(function(){return Pqs.Module},"get")});var kqs=U0();Object.defineProperty(St,"Never",{enumerable:!0,get:a(function(){return kqs.Never},"get")});var Nqs=Dit();Object.defineProperty(St,"Not",{enumerable:!0,get:a(function(){return Nqs.Not},"get")});var Dqs=Fxe();Object.defineProperty(St,"Null",{enumerable:!0,get:a(function(){return Dqs.Null},"get")});var Mqs=vU();Object.defineProperty(St,"Number",{enumerable:!0,get:a(function(){return Mqs.Number},"get")});var Oqs=Hy();Object.defineProperty(St,"Object",{enumerable:!0,get:a(function(){return Oqs.Object},"get")});var Bqs=jxe();Object.defineProperty(St,"Omit",{enumerable:!0,get:a(function(){return Bqs.Omit},"get")});var Lqs=wD();Object.defineProperty(St,"Optional",{enumerable:!0,get:a(function(){return Lqs.Optional},"get")});var Fqs=Mit();Object.defineProperty(St,"Parameters",{enumerable:!0,get:a(function(){return Fqs.Parameters},"get")});var Uqs=Vxe();Object.defineProperty(St,"Partial",{enumerable:!0,get:a(function(){return Uqs.Partial},"get")});var Qqs=$xe();Object.defineProperty(St,"Pick",{enumerable:!0,get:a(function(){return Qqs.Pick},"get")});var qqs=Dxe();Object.defineProperty(St,"Promise",{enumerable:!0,get:a(function(){return qqs.Promise},"get")});var Gqs=IU();Object.defineProperty(St,"Readonly",{enumerable:!0,get:a(function(){return Gqs.Readonly},"get")});var Hqs=Hxe();Object.defineProperty(St,"ReadonlyOptional",{enumerable:!0,get:a(function(){return Hqs.ReadonlyOptional},"get")});var jqs=Pue();Object.defineProperty(St,"Record",{enumerable:!0,get:a(function(){return jqs.Record},"get")});var $qs=Oit();Object.defineProperty(St,"Recursive",{enumerable:!0,get:a(function(){return $qs.Recursive},"get")});var Vqs=wU();Object.defineProperty(St,"Ref",{enumerable:!0,get:a(function(){return Vqs.Ref},"get")});var Wqs=Bit();Object.defineProperty(St,"RegExp",{enumerable:!0,get:a(function(){return Wqs.RegExp},"get")});var zqs=Wxe();Object.defineProperty(St,"Required",{enumerable:!0,get:a(function(){return zqs.Required},"get")});var Yqs=Lit();Object.defineProperty(St,"Rest",{enumerable:!0,get:a(function(){return Yqs.Rest},"get")});var Kqs=Fit();Object.defineProperty(St,"ReturnType",{enumerable:!0,get:a(function(){return Kqs.ReturnType},"get")});var Jqs=bU();Object.defineProperty(St,"String",{enumerable:!0,get:a(function(){return Jqs.String},"get")});var Xqs=Uxe();Object.defineProperty(St,"Symbol",{enumerable:!0,get:a(function(){return Xqs.Symbol},"get")});var Zqs=lR();Object.defineProperty(St,"TemplateLiteral",{enumerable:!0,get:a(function(){return Zqs.TemplateLiteral},"get")});var eGs=Git();Object.defineProperty(St,"Transform",{enumerable:!0,get:a(function(){return eGs.Transform},"get")});var tGs=CB();Object.defineProperty(St,"Tuple",{enumerable:!0,get:a(function(){return tGs.Tuple},"get")});var rGs=qxe();Object.defineProperty(St,"Uint8Array",{enumerable:!0,get:a(function(){return rGs.Uint8Array},"get")});var nGs=Qxe();Object.defineProperty(St,"Undefined",{enumerable:!0,get:a(function(){return nGs.Undefined},"get")});var iGs=tf();Object.defineProperty(St,"Union",{enumerable:!0,get:a(function(){return iGs.Union},"get")});var oGs=RU();Object.defineProperty(St,"Unknown",{enumerable:!0,get:a(function(){return oGs.Unknown},"get")});var sGs=Kxe();Object.defineProperty(St,"Unsafe",{enumerable:!0,get:a(function(){return sGs.Unsafe},"get")});var aGs=Hit();Object.defineProperty(St,"Void",{enumerable:!0,get:a(function(){return aGs.Void},"get")})});var Xzn=T(Wit=>{"use strict";f();Object.defineProperty(Wit,"__esModule",{value:!0});Wit.JavaScriptTypeBuilder=void 0;var cGs=eir(),lGs=qnt(),uGs=yue(),dGs=Bxe(),fGs=bue(),pGs=Eue(),hGs=cit(),mGs=Lxe(),gGs=_U(),AGs=vit(),yGs=bit(),EGs=Sue(),CGs=Mit(),_Gs=Dxe(),vGs=Bit(),bGs=Fit(),TGs=Uxe(),SGs=qxe(),IGs=Qxe(),xGs=Hit(),tir=class extends cGs.JsonTypeBuilder{static{a(this,"JavaScriptTypeBuilder")}Argument(e){return(0,lGs.Argument)(e)}AsyncIterator(e,r){return(0,uGs.AsyncIterator)(e,r)}Awaited(e,r){return(0,dGs.Awaited)(e,r)}BigInt(e){return(0,fGs.BigInt)(e)}ConstructorParameters(e,r){return(0,hGs.ConstructorParameters)(e,r)}Constructor(e,r,n){return(0,pGs.Constructor)(e,r,n)}Date(e={}){return(0,mGs.Date)(e)}Function(e,r,n){return(0,gGs.Function)(e,r,n)}InstanceType(e,r){return(0,AGs.InstanceType)(e,r)}Instantiate(e,r){return(0,yGs.Instantiate)(e,r)}Iterator(e,r){return(0,EGs.Iterator)(e,r)}Parameters(e,r){return(0,CGs.Parameters)(e,r)}Promise(e,r){return(0,_Gs.Promise)(e,r)}RegExp(e,r){return(0,vGs.RegExp)(e,r)}ReturnType(e,r){return(0,bGs.ReturnType)(e,r)}Symbol(e){return(0,TGs.Symbol)(e)}Undefined(e){return(0,IGs.Undefined)(e)}Uint8Array(e){return(0,SGs.Uint8Array)(e)}Void(e){return(0,xGs.Void)(e)}};Wit.JavaScriptTypeBuilder=tir});var Zzn=T(A_=>{"use strict";f();var wGs=A_&&A_.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),RGs=A_&&A_.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),PGs=A_&&A_.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var OGs=Lr&&Lr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zr=Lr&&Lr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&OGs(e,t,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Zr(jer(),Lr);Zr(mB(),Lr);Zr(hd(),Lr);Zr(Zer(),Lr);Zr(eVn(),Lr);Zr(Txe(),Lr);Zr(mue(),Lr);Zr(Sxe(),Lr);Zr(nn(),Lr);Zr(gue(),Lr);Zr(Aue(),Lr);Zr(qnt(),Lr);Zr(yue(),Lr);Zr(Bxe(),Lr);Zr(bue(),Lr);Zr(wxe(),Lr);Zr(oit(),Lr);Zr(ait(),Lr);Zr(Eue(),Lr);Zr(cit(),Lr);Zr(Lxe(),Lr);Zr(lit(),Lr);Zr(yit(),Lr);Zr(oK(),Lr);Zr(_it(),Lr);Zr(_U(),Lr);Zr(uR(),Lr);Zr(vit(),Lr);Zr(bit(),Lr);Zr(Tit(),Lr);Zr(tb(),Lr);Zr(Sue(),Lr);Zr(xit(),Lr);Zr(dR(),Lr);Zr(AA(),Lr);Zr(Nit(),Lr);Zr(Q0(),Lr);Zr(U0(),Lr);Zr(Dit(),Lr);Zr(Fxe(),Lr);Zr(vU(),Lr);Zr(Hy(),Lr);Zr(jxe(),Lr);Zr(wD(),Lr);Zr(Mit(),Lr);Zr(Vxe(),Lr);Zr($xe(),Lr);Zr(Dxe(),Lr);Zr(IU(),Lr);Zr(Hxe(),Lr);Zr(Pue(),Lr);Zr(Oit(),Lr);Zr(wU(),Lr);Zr(Bit(),Lr);Zr(Wxe(),Lr);Zr(Lit(),Lr);Zr(Fit(),Lr);Zr(Hzn(),Lr);Zr(Vzn(),Lr);Zr(bU(),Lr);Zr(Uxe(),Lr);Zr(lR(),Lr);Zr(Git(),Lr);Zr(CB(),Lr);Zr(qxe(),Lr);Zr(Qxe(),Lr);Zr(tf(),Lr);Zr(RU(),Lr);Zr(Kxe(),Lr);Zr(Hit(),Lr);Zr(Zzn(),Lr)});var tYn=T(tI=>{"use strict";f();var BGs=tI&&tI.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LGs=tI&&tI.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),FGs=tI&&tI.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var QGs=DD&&DD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qGs=DD&&DD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GGs=DD&&DD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(Yit,"__esModule",{value:!0});Yit.ContextItemOrigin=void 0;var iYn;(function(t){function e(r){return r==="request"||r==="update"}a(e,"is"),t.is=e})(iYn||(Yit.ContextItemOrigin=iYn={}))});var aYn=T(Sl=>{"use strict";f();Object.defineProperty(Sl,"__esModule",{value:!0});Sl.RangeSchema=Sl.WorkspaceFolder=Sl.VersionedTextDocumentIdentifier=Sl.TextEdit=Sl.TextDocumentItem=Sl.Range=Sl.Position=Sl.DocumentUri=Sl.Disposable=Sl.Command=Sl.CancellationTokenSource=Sl.CancellationToken=void 0;var Kit=zit(),mR=Nn();Object.defineProperty(Sl,"CancellationToken",{enumerable:!0,get:a(function(){return mR.CancellationToken},"get")});Object.defineProperty(Sl,"CancellationTokenSource",{enumerable:!0,get:a(function(){return mR.CancellationTokenSource},"get")});Object.defineProperty(Sl,"Command",{enumerable:!0,get:a(function(){return mR.Command},"get")});Object.defineProperty(Sl,"Disposable",{enumerable:!0,get:a(function(){return mR.Disposable},"get")});Object.defineProperty(Sl,"DocumentUri",{enumerable:!0,get:a(function(){return mR.DocumentUri},"get")});Object.defineProperty(Sl,"Position",{enumerable:!0,get:a(function(){return mR.Position},"get")});Object.defineProperty(Sl,"Range",{enumerable:!0,get:a(function(){return mR.Range},"get")});Object.defineProperty(Sl,"TextDocumentItem",{enumerable:!0,get:a(function(){return mR.TextDocumentItem},"get")});Object.defineProperty(Sl,"TextEdit",{enumerable:!0,get:a(function(){return mR.TextEdit},"get")});Object.defineProperty(Sl,"VersionedTextDocumentIdentifier",{enumerable:!0,get:a(function(){return mR.VersionedTextDocumentIdentifier},"get")});Object.defineProperty(Sl,"WorkspaceFolder",{enumerable:!0,get:a(function(){return mR.WorkspaceFolder},"get")});var sYn=Kit.Type.Object({line:Kit.Type.Integer({minimum:0}),character:Kit.Type.Integer({minimum:0})});Sl.RangeSchema=Kit.Type.Object({start:sYn,end:sYn})});var lYn=T(cYn=>{"use strict";f();Object.defineProperty(cYn,"__esModule",{value:!0})});var Xxe=T(md=>{"use strict";f();var jGs=md&&md.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jxe=md&&md.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&jGs(e,t,r)};Object.defineProperty(md,"__esModule",{value:!0});md.TextEdit=md.Range=md.Position=md.Disposable=md.CancellationTokenSource=md.CancellationToken=void 0;var Due=Nn();Object.defineProperty(md,"CancellationToken",{enumerable:!0,get:a(function(){return Due.CancellationToken},"get")});Object.defineProperty(md,"CancellationTokenSource",{enumerable:!0,get:a(function(){return Due.CancellationTokenSource},"get")});Object.defineProperty(md,"Disposable",{enumerable:!0,get:a(function(){return Due.Disposable},"get")});Object.defineProperty(md,"Position",{enumerable:!0,get:a(function(){return Due.Position},"get")});Object.defineProperty(md,"Range",{enumerable:!0,get:a(function(){return Due.Range},"get")});Object.defineProperty(md,"TextEdit",{enumerable:!0,get:a(function(){return Due.TextEdit},"get")});Jxe(tYn(),md);Jxe(nYn(),md);Jxe(oYn(),md);Jxe(aYn(),md);Jxe(lYn(),md)});var nir=T(rb=>{"use strict";f();var $Gs=rb&&rb.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},uYn=rb&&rb.__param||function(t,e){return function(r,n){e(r,n,t)}},VGs=rb&&rb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rb,"__esModule",{value:!0});rb.CompletionNotifier=rb.ICompletionsNotifierService=void 0;var WGs=VGs(require("events")),zGs=qr(),YGs=yY(),KGs=Xxe(),JGs=Dp(),XGs=pxe(),Jit="CompletionRequested";rb.ICompletionsNotifierService=(0,zGs.createServiceIdentifier)("ICompletionsNotifierService");var rir=class{static{a(this,"CompletionNotifier")}#e=new WGs.default;constructor(e,r){this.completionsPromiseQueue=e,this.completionsTelemetryService=r}notifyRequest(e,r,n,o,s){return this.#e.emit(Jit,{completionId:r,completionState:e,telemetryData:n,cancellationToken:o,options:s})}onRequest(e){let r=(0,JGs.telemetryCatch)(this.completionsTelemetryService,this.completionsPromiseQueue,e,`event.${Jit}`);return this.#e.on(Jit,r),KGs.Disposable.create(()=>this.#e.off(Jit,r))}};rb.CompletionNotifier=rir;rb.CompletionNotifier=rir=$Gs([uYn(0,XGs.ICompletionsPromiseQueueService),uYn(1,YGs.ICompletionsTelemetryService)],rir)});var iir=T(Xit=>{"use strict";f();Object.defineProperty(Xit,"__esModule",{value:!0});Xit.ICompletionsObservableWorkspace=void 0;var ZGs=Mo();Xit.ICompletionsObservableWorkspace=(0,ZGs.createDecorator)("ICompletionsObservableWorkspace")});var mc=T(gR=>{"use strict";f();Object.defineProperty(gR,"__esModule",{value:!0});gR.logger=gR.Logger=gR.ICompletionsLogTargetService=gR.LogLevel=void 0;var eHs=qr(),tHs=yY(),rHs=Dp(),IK;(function(t){t[t.DEBUG=4]="DEBUG",t[t.INFO=3]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=1]="ERROR"})(IK||(gR.LogLevel=IK={}));gR.ICompletionsLogTargetService=(0,eHs.createServiceIdentifier)("ICompletionsLogTargetService");var Zit=class{static{a(this,"Logger")}constructor(e){this.category=e}log(e,r,...n){e.logIt(r,this.category,...n)}debug(e,...r){this.log(e,IK.DEBUG,...r)}info(e,...r){this.log(e,IK.INFO,...r)}warn(e,...r){this.log(e,IK.WARN,...r)}error(e,...r){this.log(e,IK.ERROR,...r)}exception(e,r,n){if(r instanceof Error&&r.name==="Canceled"&&r.message==="Canceled")return;let o=n;n.startsWith(".")&&(o=n.substring(1),n=`${this.category}${n}`),(0,rHs.telemetryException)(e.get(tHs.ICompletionsTelemetryService),r,n);let s=r instanceof Error?r:new Error(`Non-error thrown: ${String(r)}`);this.log(e.get(gR.ICompletionsLogTargetService),IK.ERROR,`${o}:`,s)}};gR.Logger=Zit;gR.logger=new Zit("default")});var fYn=T(DU=>{"use strict";f();Object.defineProperty(DU,"__esModule",{value:!0});DU.INotificationService=DU.NullNotificationService=DU.ProgressLocation=void 0;var nHs=qr(),iHs=_O(),dYn;(function(t){t[t.SourceControl=1]="SourceControl",t[t.Window=10]="Window",t[t.Notification=15]="Notification"})(dYn||(DU.ProgressLocation=dYn={}));var oir=class{static{a(this,"NullNotificationService")}showInformationMessage(e,r,...n){return Promise.resolve(void 0)}showWarningMessage(e,...r){return Promise.resolve(void 0)}showQuotaExceededDialog(e){return Promise.resolve()}withProgress(e,r){return Promise.resolve(r({report:a(()=>{},"report")},iHs.CancellationToken.None))}};DU.NullNotificationService=oir;DU.INotificationService=(0,nHs.createServiceIdentifier)("INotificationService")});var air=T(AR=>{"use strict";f();var oHs=AR&&AR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},sHs=AR&&AR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(AR,"__esModule",{value:!0});AR.ExtensionNotificationSender=AR.ICompletionsNotificationSender=void 0;var aHs=fYn(),cHs=qr();AR.ICompletionsNotificationSender=(0,cHs.createServiceIdentifier)("ICompletionsNotificationSender");var sir=class{static{a(this,"ExtensionNotificationSender")}constructor(e){this.notificationService=e}async showWarningMessage(e,...r){let n=await this.notificationService.showWarningMessage(e,...r.map(o=>o.title));if(n!==void 0)return{title:n}}};AR.ExtensionNotificationSender=sir;AR.ExtensionNotificationSender=sir=oHs([sHs(0,aHs.INotificationService)],sir)});var uir=T(yR=>{"use strict";f();var lHs=yR&&yR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},cir=yR&&yR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(yR,"__esModule",{value:!0});yR.UserErrorNotifier=yR.ICompletionsUserErrorNotifierService=void 0;var uHs=iR(),dHs=qr(),fHs=Ru(),mYn=mc(),pHs=air(),hHs=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"],pYn="Your proxy connection requires a trusted certificate. Please make sure the proxy certificate and any issuers are configured correctly and trusted by your operating system.",hYn="https://gh.io/copilot-network-errors";yR.ICompletionsUserErrorNotifierService=(0,dHs.createServiceIdentifier)("ICompletionsUserErrorNotifierService");var lir=class{static{a(this,"UserErrorNotifier")}constructor(e,r,n){this._logTarget=e,this._notificationSender=r,this._env=n,this.notifiedErrorCodes=[]}notifyUser(e){if(!(e instanceof Error))return;let r=e;r.code&&hHs.includes(r.code)&&!this.didNotifyBefore(r.code)&&(this.notifiedErrorCodes.push(r.code),this.displayCertificateErrorNotification(r))}async displayCertificateErrorNotification(e){new mYn.Logger("certificates").error(this._logTarget,`${pYn} Please visit ${hYn} to learn more. Original cause:`,e);let r={title:"Learn more"};return this._notificationSender.showWarningMessage(pYn,r).then(n=>{if(n?.title===r.title)return this._env.openExternal(fHs.URI.parse(hYn))})}didNotifyBefore(e){return this.notifiedErrorCodes.indexOf(e)!==-1}};yR.UserErrorNotifier=lir;yR.UserErrorNotifier=lir=lHs([cir(0,mYn.ICompletionsLogTargetService),cir(1,pHs.ICompletionsNotificationSender),cir(2,uHs.IEnvService)],lir)});var gd=T(Mue=>{"use strict";f();Object.defineProperty(Mue,"__esModule",{value:!0});Mue.NullExperimentationService=Mue.IExperimentationService=void 0;var mHs=qr(),gHs=nc();Mue.IExperimentationService=(0,mHs.createServiceIdentifier)("IExperimentationService");var dir=class{static{a(this,"NullExperimentationService")}constructor(){this._onDidTreatmentsChange=new gHs.Emitter,this.onDidTreatmentsChange=this._onDidTreatmentsChange.event}async hasTreatments(){return Promise.resolve()}async hasAccountBasedTreatments(){return Promise.resolve()}getTreatmentVariable(e){}async setCompletionsFilters(e){}};Mue.NullExperimentationService=dir});var MU=T(y_=>{"use strict";f();Object.defineProperty(y_,"__esModule",{value:!0});y_.DEFAULT_PROMPT_ALLOCATION_PERCENT=y_.DEFAULT_SUFFIX_MATCH_THRESHOLD=y_.DEFAULT_NUM_SNIPPETS=y_.DEFAULT_MAX_PROMPT_LENGTH=y_.DEFAULT_MAX_COMPLETION_LENGTH=void 0;y_.normalizeLanguageId=yHs;y_.DEFAULT_MAX_COMPLETION_LENGTH=500;y_.DEFAULT_MAX_PROMPT_LENGTH=8192-y_.DEFAULT_MAX_COMPLETION_LENGTH;y_.DEFAULT_NUM_SNIPPETS=4;y_.DEFAULT_SUFFIX_MATCH_THRESHOLD=10;y_.DEFAULT_PROMPT_ALLOCATION_PERCENT={prefix:35,suffix:15,stableContext:35,volatileContext:15};var AHs={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor",c:"cpp"};function yHs(t){return t=t.toLowerCase(),AHs[t]??t}a(yHs,"normalizeLanguageId")});var gYn=T(fir=>{"use strict";f();Object.defineProperty(fir,"__esModule",{value:!0});fir.getUserKind=CHs;function EHs(t){return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","faef89d9169d5eacf1d8c8dde3412e37","4535c7beffc844b46bb1ed4aa04d759a"].find(r=>t.includes(r))}a(EHs,"findKnownOrg");function CHs(t){let e=t.organizationList??[];return EHs(e)??""}a(CHs,"getUserKind")});var Zxe=T(MD=>{"use strict";f();Object.defineProperty(MD,"__esModule",{value:!0});MD.IEndpointProvider=MD.ModelSupportedEndpoint=void 0;MD.isEndpointEditToolName=bHs;MD.isChatModelInformation=THs;MD.isEmbeddingModelInformation=SHs;MD.isCompletionModelInformation=IHs;var _Hs=qr(),vHs=new Set(["find-replace","multi-find-replace","apply-patch","code-rewrite"]);function bHs(t){return vHs.has(t)}a(bHs,"isEndpointEditToolName");var AYn;(function(t){t.ChatCompletions="/chat/completions",t.Responses="/responses",t.WebSocketResponses="ws:/responses",t.Messages="/v1/messages"})(AYn||(MD.ModelSupportedEndpoint=AYn={}));function THs(t){return t.capabilities.type==="chat"}a(THs,"isChatModelInformation");function SHs(t){return t.capabilities.type==="embeddings"}a(SHs,"isEmbeddingModelInformation");function IHs(t){return t.capabilities.type==="completion"}a(IHs,"isCompletionModelInformation");MD.IEndpointProvider=(0,_Hs.createServiceIdentifier)("IEndpointProvider")});var EYn=T(pir=>{"use strict";f();Object.defineProperty(pir,"__esModule",{value:!0});pir.getUserSelectedModelConfiguration=xHs;var yYn=Xm();function xHs(t){let e=(0,yYn.getConfig)(t,yYn.ConfigKey.UserSelectedCompletionModel);return typeof e=="string"&&e.length>0?e:null}a(xHs,"getUserSelectedModelConfiguration")});var _Yn=T(tg=>{"use strict";f();Object.defineProperty(tg,"__esModule",{value:!0});tg.isReadable=RHs;tg.isReadableStream=CYn;tg.isReadableBufferedStream=PHs;tg.newWriteableStream=ewe;tg.consumeReadable=kHs;tg.peekReadable=NHs;tg.consumeStream=DHs;tg.listenStream=tot;tg.peekStream=MHs;tg.toStream=OHs;tg.emptyStream=BHs;tg.toReadable=LHs;tg.transform=FHs;tg.prefixedReadable=UHs;tg.prefixedStream=QHs;var wHs=es(),eot=so();function RHs(t){let e=t;return e?typeof e.read=="function":!1}a(RHs,"isReadable");function CYn(t){let e=t;return e?[e.on,e.pause,e.resume,e.destroy].every(r=>typeof r=="function"):!1}a(CYn,"isReadableStream");function PHs(t){let e=t;return e?CYn(e.stream)&&Array.isArray(e.buffer)&&typeof e.ended=="boolean":!1}a(PHs,"isReadableBufferedStream");function ewe(t,e){return new hir(t,e)}a(ewe,"newWriteableStream");var hir=class{static{a(this,"WriteableStreamImpl")}constructor(e,r){this.reducer=e,this.options=r,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(e){if(!this.state.destroyed){if(this.state.flowing)this.emitData(e);else if(this.buffer.data.push(e),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(r=>this.pendingWritePromises.push(r))}}error(e){this.state.destroyed||(this.state.flowing?this.emitError(e):this.buffer.error.push(e))}end(e){this.state.destroyed||(typeof e<"u"&&this.write(e),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(e){this.listeners.data.slice(0).forEach(r=>r(e))}emitError(e){this.listeners.error.length===0?(0,wHs.onUnexpectedError)(e):this.listeners.error.slice(0).forEach(r=>r(e))}emitEnd(){this.listeners.end.slice(0).forEach(e=>e())}on(e,r){if(!this.state.destroyed)switch(e){case"data":this.listeners.data.push(r),this.resume();break;case"end":this.listeners.end.push(r),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(r),this.state.flowing&&this.flowErrors();break}}removeListener(e,r){if(this.state.destroyed)return;let n;switch(e){case"data":n=this.listeners.data;break;case"end":n=this.listeners.end;break;case"error":n=this.listeners.error;break}if(n){let o=n.indexOf(r);o>=0&&n.splice(o,1)}}flowData(){if(this.buffer.data.length===0)return;if(typeof this.reducer=="function"){let r=this.reducer(this.buffer.data);this.emitData(r)}else for(let r of this.buffer.data)this.emitData(r);this.buffer.data.length=0;let e=[...this.pendingWritePromises];this.pendingWritePromises.length=0,e.forEach(r=>r())}flowErrors(){if(this.listeners.error.length>0){for(let e of this.buffer.error)this.emitError(e);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}};function kHs(t,e){let r=[],n;for(;(n=t.read())!==null;)r.push(n);return e(r)}a(kHs,"consumeReadable");function NHs(t,e,r){let n=[],o;for(;(o=t.read())!==null&&n.length0?e(n):{read:a(()=>{if(n.length>0)return n.shift();if(typeof o<"u"){let s=o;return o=void 0,s}return t.read()},"read")}}a(NHs,"peekReadable");function DHs(t,e){return new Promise((r,n)=>{let o=[];tot(t,{onData:a(s=>{e&&o.push(s)},"onData"),onError:a(s=>{e?n(s):r(void 0)},"onError"),onEnd:a(()=>{r(e?e(o):void 0)},"onEnd")})})}a(DHs,"consumeStream");function tot(t,e,r){t.on("error",n=>{r?.isCancellationRequested||e.onError(n)}),t.on("end",()=>{r?.isCancellationRequested||e.onEnd()}),t.on("data",n=>{r?.isCancellationRequested||e.onData(n)})}a(tot,"listenStream");function MHs(t,e){return new Promise((r,n)=>{let o=new eot.DisposableStore,s=[],c=a(d=>{if(s.push(d),s.length>e)return o.dispose(),t.pause(),r({stream:t,buffer:s,ended:!1})},"dataListener"),l=a(d=>(o.dispose(),n(d)),"errorListener"),u=a(()=>(o.dispose(),r({stream:t,buffer:s,ended:!0})),"endListener");o.add((0,eot.toDisposable)(()=>t.removeListener("error",l))),t.on("error",l),o.add((0,eot.toDisposable)(()=>t.removeListener("end",u))),t.on("end",u),o.add((0,eot.toDisposable)(()=>t.removeListener("data",c))),t.on("data",c)})}a(MHs,"peekStream");function OHs(t,e){let r=ewe(e);return r.end(t),r}a(OHs,"toStream");function BHs(){let t=ewe(()=>{throw new Error("not supported")});return t.end(),t}a(BHs,"emptyStream");function LHs(t){let e=!1;return{read:a(()=>e?null:(e=!0,t),"read")}}a(LHs,"toReadable");function FHs(t,e,r){let n=ewe(r);return tot(t,{onData:a(o=>n.write(e.data(o)),"onData"),onError:a(o=>n.error(e.error?e.error(o):o),"onError"),onEnd:a(()=>n.end(),"onEnd")}),n}a(FHs,"transform");function UHs(t,e,r){let n=!1;return{read:a(()=>{let o=e.read();return n?o:(n=!0,o!==null?r([t,o]):t)},"read")}}a(UHs,"prefixedReadable");function QHs(t,e,r){let n=!1,o=ewe(r);return tot(e,{onData:a(s=>n?o.write(s):(n=!0,o.write(r([t,s]))),"onData"),onError:a(s=>o.error(s),"onError"),onEnd:a(()=>{n||(n=!0,o.write(t)),o.end()},"onEnd")}),o}a(QHs,"prefixedStream")});var BU=T(wa=>{"use strict";f();var qHs=wa&&wa.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),GHs=wa&&wa.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),HHs=wa&&wa.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;onew Uint8Array(256)),mir,gir,EA=class t{static{a(this,"VSBuffer")}static alloc(e){return twe?new t(Buffer.allocUnsafe(e)):new t(new Uint8Array(e))}static wrap(e){return twe&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new t(e)}static fromString(e,r){return!(r?.dontUseNodeBuffer||!1)&&twe?new t(Buffer.from(e)):(mir||(mir=new TextEncoder),new t(mir.encode(e)))}static fromByteArray(e){let r=t.alloc(e.length);for(let n=0,o=e.length;n"u"){r=0;for(let s=0,c=e.length;sr===e.buffer[n])}};wa.VSBuffer=EA;function TYn(t,e,r=0){let n=e.byteLength,o=t.byteLength;if(n===0)return 0;if(n===1)return t.indexOf(e[0],r);if(n>o-r)return-1;let s=$Hs.value;s.fill(e.length);for(let d=0;d>>0|t[e+1]<<8>>>0}a(VHs,"readUInt16LE");function WHs(t,e,r){t[r+0]=e&255,e=e>>>8,t[r+1]=e&255}a(WHs,"writeUInt16LE");function SYn(t,e){return t[e]*2**24+t[e+1]*2**16+t[e+2]*2**8+t[e+3]}a(SYn,"readUInt32BE");function IYn(t,e,r){t[r+3]=e,e=e>>>8,t[r+2]=e,e=e>>>8,t[r+1]=e,e=e>>>8,t[r]=e}a(IYn,"writeUInt32BE");function xYn(t,e){return t[e+0]<<0>>>0|t[e+1]<<8>>>0|t[e+2]<<16>>>0|t[e+3]<<24>>>0}a(xYn,"readUInt32LE");function wYn(t,e,r){t[r+0]=e&255,e=e>>>8,t[r+1]=e&255,e=e>>>8,t[r+2]=e&255,e=e>>>8,t[r+3]=e&255}a(wYn,"writeUInt32LE");function RYn(t,e){return t[e]}a(RYn,"readUInt8");function PYn(t,e,r){t[r]=e}a(PYn,"writeUInt8");function zHs(t){return OU.consumeReadable(t,e=>EA.concat(e))}a(zHs,"readableToBuffer");function YHs(t){return OU.toReadable(t)}a(YHs,"bufferToReadable");function kYn(t){return OU.consumeStream(t,e=>EA.concat(e))}a(kYn,"streamToBuffer");async function KHs(t){return t.ended?EA.concat(t.buffer):EA.concat([...t.buffer,await kYn(t.stream)])}a(KHs,"bufferedStreamToBuffer");function JHs(t){return OU.toStream(t,e=>EA.concat(e))}a(JHs,"bufferToStream");function XHs(t){return OU.transform(t,{data:a(e=>typeof e=="string"?EA.fromString(e):EA.wrap(e),"data")},e=>EA.concat(e))}a(XHs,"streamToBufferReadableStream");function ZHs(t){return OU.newWriteableStream(e=>EA.concat(e),t)}a(ZHs,"newWriteableBufferStream");function ejs(t,e){return OU.prefixedReadable(t,e,r=>EA.concat(r))}a(ejs,"prefixedBufferReadable");function tjs(t,e){return OU.prefixedStream(t,e,r=>EA.concat(r))}a(tjs,"prefixedBufferStream");function rjs(t){let e=0,r=0,n=0,o=new Uint8Array(Math.floor(t.length/4*3)),s=a(l=>{switch(r){case 3:o[n++]=e|l,r=0;break;case 2:o[n++]=e|l>>>2,e=l<<6,r=3;break;case 1:o[n++]=e|l>>>4,e=l<<4,r=2;break;default:e=l<<2,r=1}},"append");for(let l=0;l=65&&u<=90)s(u-65);else if(u>=97&&u<=122)s(u-97+26);else if(u>=48&&u<=57)s(u-48+52);else if(u===43||u===45)s(62);else if(u===47||u===95)s(63);else{if(u===61)break;throw new SyntaxError(`Unexpected base64 character ${t[l]}`)}}let c=n;for(;r>0;)s(0);return EA.wrap(o).slice(0,c)}a(rjs,"decodeBase64");var njs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ijs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function ojs({buffer:t},e=!0,r=!1){let n=r?ijs:njs,o="",s=t.byteLength%3,c=0;for(;c>>2],o+=n[(l<<4|u>>>4)&63],o+=n[(u<<2|d>>>6)&63],o+=n[d&63]}if(s===1){let l=t[c+0];o+=n[l>>>2],o+=n[l<<4&63],e&&(o+="==")}else if(s===2){let l=t[c+0],u=t[c+1];o+=n[l>>>2],o+=n[(l<<4|u>>>4)&63],o+=n[u<<2&63],e&&(o+="=")}return o}a(ojs,"encodeBase64");var vYn="0123456789abcdef";function sjs({buffer:t}){let e="";for(let r=0;r>>4],e+=vYn[n&15]}return e}a(sjs,"encodeHex");function ajs(t){if(t.length%2!==0)throw new SyntaxError("Hex string must have an even length");let e=new Uint8Array(t.length>>1);for(let r=0;r>1]=bYn(t,r++)<<4|bYn(t,r++);return EA.wrap(e)}a(ajs,"decodeHex");function bYn(t,e){let r=t.charCodeAt(e);if(r>=48&&r<=57)return r-48;if(r>=97&&r<=102)return r-87;if(r>=65&&r<=70)return r-55;throw new SyntaxError(`Invalid hex character at position ${e}`)}a(bYn,"decodeHexChar")});var NYn=T(rot=>{"use strict";f();Object.defineProperty(rot,"__esModule",{value:!0});rot.readVariableLengthQuantity=ljs;rot.writeVariableLengthQuantity=ujs;var cjs=BU();function ljs(t,e){let r=0,n=0,o;do o=t.readUInt8(e+n),r|=(o&127)<>>=7,t!==0&&(r|=128),e.push(r)}while(t!==0);return cjs.VSBuffer.fromByteArray(e)}a(ujs,"writeVariableLengthQuantity")});var Air=T(not=>{"use strict";f();Object.defineProperty(not,"__esModule",{value:!0});not.parseTikTokenBinary=void 0;var djs=require("fs"),fjs=NYn(),pjs=BU(),hjs=a(t=>{let e=(0,djs.readFileSync)(t),r=new Map;for(let n=0;n{"use strict";f();Object.defineProperty(iot,"__esModule",{value:!0});iot.CopilotPromptLoadFailure=void 0;var yir=class extends Error{static{a(this,"CopilotPromptLoadFailure")}constructor(e,r){super(e,{cause:r}),this.code="CopilotPromptLoadFailure"}};iot.CopilotPromptLoadFailure=yir});var Cir=T(rI=>{"use strict";f();var mjs=rI&&rI.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gjs=rI&&rI.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ajs=rI&&rI.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(ER,"__esModule",{value:!0});ER.initializeTokenizers=ER.ApproximateTokenizer=ER.TTokenizer=ER.TokenizerName=void 0;ER.getTokenizer=Tjs;var _ir=e8e(),_js=Air(),vjs=Eir(),bjs=Cir(),OD;(function(t){t.cl100k="cl100k_base",t.o200k="o200k_base",t.mock="mock"})(OD||(ER.TokenizerName=OD={}));var oot=new Map;function Tjs(t=OD.o200k){let e=oot.get(t);return e!==void 0||(e=oot.get(OD.o200k),e!==void 0)?e:new aot}a(Tjs,"getTokenizer");var sot=class t{static{a(this,"TTokenizer")}constructor(e){this._tokenizer=e}static async create(e){try{let r=(0,_ir.createTokenizer)((0,_js.parseTikTokenBinary)((0,bjs.locateFile)(`${e}.tiktoken`)),(0,_ir.getSpecialTokensByEncoder)(e),(0,_ir.getRegexByEncoder)(e),32768);return new t(r)}catch(r){throw r instanceof Error?new vjs.CopilotPromptLoadFailure("Could not load tokenizer",r):r}}tokenize(e){return this._tokenizer.encode(e)}detokenize(e){return this._tokenizer.decode(e)}tokenLength(e){return this.tokenize(e).length}tokenizeStrings(e){return this.tokenize(e).map(n=>this.detokenize([n]))}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=4,o=1,s=Math.min(e.length,r*n),c=e.slice(-s),l=this.tokenize(c);for(;l.lengthr(l,o+" ")):[]].join("")}return a(r,"collect"),r(t,"").trim()}a(t$n,"collectErrorMessages");function jks(t,e=!1){let r=new Set;function n(o){if(!o||!["object","string"].includes(typeof o)||r.has(o))return"";r.add(o);let l=((typeof o=="string"?o:o.message||o.code||"").toString?.()||"").trim().split(` +`).join(" "),u=[...e&&o.chromiumDetails?[JSON.stringify(r$n(o.chromiumDetails))]:[],...o.cause?[n(o.cause)]:[],...Array.isArray(o.errors)?o.errors.map(d=>n(d)):[]].join(", ");return u?`${l}: ${u}`:l}return a(n,"collect"),n(t)}a(jks,"collectSingleLineErrorMessage");function r$n(t){if(!t||typeof t!="object")return{};if(t.is_request_error!==void 0&&t.session_state===void 0)return{is_request_error:t.is_request_error,network_process_crashed:t.network_process_crashed};let e={drain_error:t.drain_error,drain_description:t.drain_description,go_away_error:t.go_away_error,go_away_error_details:t.go_away_error_details,go_away_debug_data:t.go_away_debug_data,rst_stream_error:t.rst_stream_error,rst_stream_error_details:t.rst_stream_error_details,rst_stream_description:t.rst_stream_description,last_framer_error:t.last_framer_error,last_framer_error_details:t.last_framer_error_details,error_source:t.error_source,aliases_length:Array.isArray(t.aliases)?t.aliases.length:void 0};if(t.proxy){let n=[...String(t.proxy).matchAll(/([a-z][a-z0-9+.-]*):\/\//gi)].map(o=>o[1]);n.length>0&&(e.proxy_schemes=n)}if(t.in_flight_write&&typeof t.in_flight_write=="object"&&(e.in_flight_write={frame_type:t.in_flight_write.frame_type,frame_size:t.in_flight_write.frame_size,remaining_size:t.in_flight_write.remaining_size}),t.buffered_spdy_framer&&typeof t.buffered_spdy_framer=="object"&&(e.buffered_spdy_framer={frames_received:t.buffered_spdy_framer.frames_received,has_error:t.buffered_spdy_framer.has_error,message_fully_read:t.buffered_spdy_framer.message_fully_read}),t.session_state&&typeof t.session_state=="object"){let r=t.session_state;e.session_state={availability_state:r.availability_state,session_send_window:r.session_send_window,session_recv_window:r.session_recv_window,stream_initial_send_window:r.stream_initial_send_window,stream_initial_recv_window:r.stream_initial_recv_window,send_stalled_by_session_window:r.send_stalled_by_session_window,active_stream_count:r.active_stream_count,created_stream_count:r.created_stream_count,max_concurrent_streams:r.max_concurrent_streams,highest_stream_id_sent:r.highest_stream_id_sent,frames_sent:r.frames_sent,frames_received:r.frames_received,ping_in_flight:r.ping_in_flight,last_ping_sent_ms:r.last_ping_sent_ms,next_ping_id:r.next_ping_id,failed_ping_count:r.failed_ping_count,support_websocket:r.support_websocket,deprecate_http2_priorities:r.deprecate_http2_priorities,streams_initiated_count:r.streams_initiated_count,streams_abandoned_count:r.streams_abandoned_count,read_state:r.read_state,write_state:r.write_state,pending_create_stream_request_count:r.pending_create_stream_request_count,error:r.error,error_on_unavailable:r.error_on_unavailable,unacked_recv_window_bytes:r.unacked_recv_window_bytes,last_good_stream_id:r.last_good_stream_id,debug_stream_id:r.debug_stream_id,has_ping_based_connection_checking:r.has_ping_based_connection_checking,num_broken_connection_detection_requests:r.num_broken_connection_detection_requests,session_max_queued_capped_frames:r.session_max_queued_capped_frames,num_queued_capped_frames:r.num_queued_capped_frames,check_ping_status_pending:r.check_ping_status_pending,in_confirm_handshake:r.in_confirm_handshake,http2_end_stream_with_data_frame:r.http2_end_stream_with_data_frame,reused:r.reused,session_max_recv_window_size:r.session_max_recv_window_size,max_header_table_size:r.max_header_table_size,time_since_last_read_ms:r.time_since_last_read_ms,time_since_last_write_ms:r.time_since_last_write_ms,time_since_last_recv_window_update_ms:r.time_since_last_recv_window_update_ms}}if(t.tls_info&&typeof t.tls_info=="object"){let r=t.tls_info;e.tls_info={is_secure_connection:r.is_secure_connection,ssl_version:r.ssl_version,cipher_suite:r.cipher_suite,negotiated_alpn:r.negotiated_alpn,cert_status:r.cert_status,is_issued_by_known_root:r.is_issued_by_known_root,handshake_type:r.handshake_type,client_cert_sent:r.client_cert_sent,exchange_group:r.key_exchange_group,ct_compliance:r.ct_compliance,alps_negotiated:r.alps_negotiated}}if(t.socket_info&&typeof t.socket_info=="object"){let r=t.socket_info;e.socket_info={is_connected:r.is_connected,was_ever_used:r.was_ever_used,dns_lookup_duration_ms:r.dns_lookup_duration_ms,tcp_connect_duration_ms:r.tcp_connect_duration_ms,ssl_handshake_duration_ms:r.ssl_handshake_duration_ms,owned_socket:r.owned_socket,socket_reuse_type:r.socket_reuse_type}}return t.url_loader_error&&typeof t.url_loader_error=="object"&&(e.url_loader_error={is_request_error:t.url_loader_error.is_request_error,network_process_crashed:t.url_loader_error.network_process_crashed}),Array.isArray(t.active_stream_details)&&(e.active_stream_details=t.active_stream_details.map(r=>({stream_id:r.stream_id,io_state:r.io_state,type:r.type,priority:r.priority,send_window_size:r.send_window_size,recv_window_size:r.recv_window_size,max_recv_window_size:r.max_recv_window_size,unacked_recv_window_bytes:r.unacked_recv_window_bytes,send_stalled_by_flow_control:r.send_stalled_by_flow_control,raw_sent_bytes:r.raw_sent_bytes,raw_received_bytes:r.raw_received_bytes,recv_bytes:r.recv_bytes,pending_send_status:r.pending_send_status,response_state:r.response_state,pending_send_data_remaining:r.pending_send_data_remaining,request_time_ms:r.request_time_ms,response_time_ms:r.response_time_ms}))),Array.isArray(t.closed_stream_details)&&(e.closed_stream_details=t.closed_stream_details.map(r=>({stream_id:r.stream_id,io_state:r.io_state,type:r.type,priority:r.priority,send_window_size:r.send_window_size,recv_window_size:r.recv_window_size,max_recv_window_size:r.max_recv_window_size,unacked_recv_window_bytes:r.unacked_recv_window_bytes,send_stalled_by_flow_control:r.send_stalled_by_flow_control,raw_sent_bytes:r.raw_sent_bytes,raw_received_bytes:r.raw_received_bytes,recv_bytes:r.recv_bytes,pending_send_status:r.pending_send_status,response_state:r.response_state,pending_send_data_remaining:r.pending_send_data_remaining,request_time_ms:r.request_time_ms,response_time_ms:r.response_time_ms}))),e}a(r$n,"extractChromiumDetails");var Mrt=class{static{a(this,"LogMemory")}static{this._logs=[]}static{this._requestIds=[]}static{this.MAX_LOGS=50}static extractRequestIdFromMessage(e){let r=e.match(/request done: requestId: \[([0-9a-fA-F-]+)\] model deployment ID: \[/);if(r){let n=r[1];if(!this._requestIds.includes(n))return n}}static addLog(e,r){this._logs.length>=this.MAX_LOGS&&this._logs.shift(),this._logs.push(`${e}: ${r}`),this._requestIds.length>=this.MAX_LOGS&&this._requestIds.shift();let n=this.extractRequestIdFromMessage(r);n&&this._requestIds.push(n)}static getLogs(){return this._logs}static getRequestIds(){return this._requestIds}};aA.LogMemory=Mrt});var lIe=T(cIe=>{"use strict";f();Object.defineProperty(cIe,"__esModule",{value:!0});cIe.ICopilotTokenManager=void 0;cIe.nowSeconds=Vks;var $ks=qr();cIe.ICopilotTokenManager=(0,$ks.createServiceIdentifier)("ICopilotTokenManager");function Vks(){return Math.floor(Date.now()/1e3)}a(Vks,"nowSeconds")});var cA=T(N0=>{"use strict";f();var Wks=N0&&N0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Ort=N0&&N0.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(N0,"__esModule",{value:!0});N0.BaseAuthenticationService=N0.IAuthenticationService=N0.MinimalModeError=N0.GITHUB_SCOPE_ALIGNED=N0.GITHUB_SCOPE_READ_USER=N0.GITHUB_SCOPE_USER_EMAIL=void 0;N0.authProviderId=e5s;var zks=qr(),Uer=Xa(),Yks=ro(),Kks=gO(),Tz=ac(),Jks=D0(),Xks=lIe(),Zks=c7();N0.GITHUB_SCOPE_USER_EMAIL=["user:email"];N0.GITHUB_SCOPE_READ_USER=["read:user"];N0.GITHUB_SCOPE_ALIGNED=["read:user","user:email","repo","workflow"];var Qer=class extends Error{static{a(this,"MinimalModeError")}constructor(){super("The authentication service is in minimal mode."),this.name="MinimalModeError"}};N0.MinimalModeError=Qer;N0.IAuthenticationService=(0,zks.createServiceIdentifier)("IAuthenticationService");var qer=class extends Yks.Disposable{static{a(this,"BaseAuthenticationService")}fireAuthenticationChange(e){let r=!!this.copilotToken;this._logService.info(`AuthenticationService: firing onDidAuthenticationChange from ${e}. Has token: ${r}`),this._onDidAuthenticationChange.fire()}constructor(e,r,n,o){super(),this._logService=e,this._tokenStore=r,this._tokenManager=n,this._configurationService=o,this._onDidAuthenticationChange=this._register(new Uer.Emitter),this.onDidAuthenticationChange=this._onDidAuthenticationChange.event,this._onDidAccessTokenChange=this._register(new Uer.Emitter),this.onDidAccessTokenChange=this._onDidAccessTokenChange.event,this._onDidAdoAuthenticationChange=this._register(new Uer.Emitter),this.onDidAdoAuthenticationChange=this._onDidAdoAuthenticationChange.event,this._isMinimalMode=(0,Kks.derived)(s=>this._configurationService.getConfigObservable(Tz.ConfigKey.Shared.AuthPermissions).read(s)===Tz.AuthPermissionMode.Minimal),this._register(n.onDidCopilotTokenRefresh(()=>{this._logService.debug("Handling CopilotToken refresh."),this._handleAuthChangeEvent()}))}get isMinimalMode(){return this._isMinimalMode.get()}get anyGitHubSession(){return this._anyGitHubSession}get permissiveGitHubSession(){return this._permissiveGitHubSession}get anyAdoSession(){return this._anyAdoSession}get copilotToken(){return this._tokenStore.copilotToken}async getCopilotToken(e){try{let r=await this._tokenManager.getCopilotToken(e);return this._tokenStore.copilotToken=r,this._copilotTokenError=void 0,r}catch(r){this._tokenStore.copilotToken=void 0;let n=this._copilotTokenError;throw this._copilotTokenError=r,n&&r&&n.message!==r.message&&this.fireAuthenticationChange("getCopilotToken error change"),r}}resetCopilotToken(e){this._tokenStore.copilotToken=void 0,this._tokenManager.resetCopilotToken(e)}async _handleAuthChangeEvent(){let e=this._anyGitHubSession,r=this._permissiveGitHubSession,n=this._anyAdoSession,o=this._tokenStore.copilotToken,s=this._copilotTokenError,c=await Promise.allSettled([this.getGitHubSession("any",{silent:!0}),this.getGitHubSession("permissive",{silent:!0}),this.getAnyAdoSession({silent:!0})]);for(let l of c)l.status==="rejected"&&this._logService.error(`Error getting a session: ${l.reason}`);if(e?.accessToken!==this._anyGitHubSession?.accessToken||r?.accessToken!==this._permissiveGitHubSession?.accessToken){this._onDidAccessTokenChange.fire(),this._logService.debug("Auth state changed, minting a new CopilotToken...");try{await this.getCopilotToken(!0)}catch{}this._logService.debug("Minted a new CopilotToken.");return}n?.accessToken!==this._anyAdoSession?.accessToken&&(this._logService.debug(`Ado auth state changed, firing event. Had token before: ${!!n?.accessToken}. Has token now: ${!!this._anyAdoSession?.accessToken}.`),this._onDidAdoAuthenticationChange.fire());try{await this.getCopilotToken()}catch{}(o?.token!==this._tokenStore.copilotToken?.token||s?.message!==this._copilotTokenError?.message)&&(this._logService.debug("CopilotToken state changed, firing event."),this.fireAuthenticationChange("handleAuthChangeEvent")),this._logService.debug("Finished handling auth change event.")}};N0.BaseAuthenticationService=qer;N0.BaseAuthenticationService=qer=Wks([Ort(0,Jks.ILogService),Ort(1,Zks.ICopilotTokenStore),Ort(2,Xks.ICopilotTokenManager),Ort(3,Tz.IConfigurationService)],qer);function e5s(t){return t.getConfig(Tz.ConfigKey.Shared.AuthProvider)===Tz.AuthProviderId.GitHubEnterprise?Tz.AuthProviderId.GitHubEnterprise:Tz.AuthProviderId.GitHub}a(e5s,"authProviderId")});var Brt=T(Ger=>{"use strict";f();Object.defineProperty(Ger,"__esModule",{value:!0});Ger.onCopilotToken=t5s;function t5s(t,e){return t.onDidAuthenticationChange(()=>{let r=t.copilotToken;r&&e(r)})}a(t5s,"onCopilotToken")});var jer=T(Yw=>{"use strict";f();var r5s=Yw&&Yw.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},n5s=Yw&&Yw.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.TelemetryUserConfig=Yw.ICompletionsTelemetryUserConfigService=void 0;var i5s=cA(),o5s=qr(),s5s=ro(),a5s=Brt();function c5s(t){let e=t.getTokenValue("tid"),r=t.organizationList,n=t.enterpriseList,o=t.getTokenValue("sku");if(!e)return;let s={copilot_trackingId:e};return r&&(s.organizations_list=r.toString()),n&&(s.enterprise_list=n.toString()),o&&(s.sku=o),s}a(c5s,"propertiesFromCopilotToken");Yw.ICompletionsTelemetryUserConfigService=(0,o5s.createServiceIdentifier)("ICompletionsTelemetryUserConfigService");var Her=class extends s5s.Disposable{static{a(this,"TelemetryUserConfig")}#e;constructor(e){super(),this.#e={},this.optedIn=!1,this.ftFlag="",this._register((0,a5s.onCopilotToken)(e,n=>this.updateFromToken(n)));let r=e.copilotToken;r&&this.updateFromToken(r)}getProperties(){return this.#e}get trackingId(){return this.#e.copilot_trackingId}updateFromToken(e){let r=c5s(e);r&&(this.#e=r,this.optedIn=e.getTokenValue("rt")==="1",this.ftFlag=e.getTokenValue("ft")??"")}};Yw.TelemetryUserConfig=Her;Yw.TelemetryUserConfig=Her=r5s([n5s(0,i5s.IAuthenticationService)],Her)});var uIe=T(Cle=>{"use strict";f();Object.defineProperty(Cle,"__esModule",{value:!0});Cle.PromiseQueue=Cle.ICompletionsPromiseQueueService=void 0;var l5s=qr();Cle.ICompletionsPromiseQueueService=(0,l5s.createServiceIdentifier)("completionsPromiseQueueService");var $er=class{static{a(this,"PromiseQueue")}constructor(){this.promises=new Set}register(e){this.promises.add(e),e.finally(()=>this.promises.delete(e))}async flush(){await Promise.allSettled(this.promises)}};Cle.PromiseQueue=$er});var xp=T(tu=>{"use strict";f();Object.defineProperty(tu,"__esModule",{value:!0});tu.TelemetryReporters=tu.ICompletionsTelemetryReporters=tu.CopilotTelemetryReporter=tu.TelemetryWithExp=tu.TelemetryData=tu.TelemetryStore=void 0;tu.telemetrizePromptLength=C5s;tu.now=ble;tu.telemetry=etr;tu.telemetryExpProblem=T5s;tu.telemetryRaw=I5s;tu.telemetryException=o$n;tu.telemetryCatch=x5s;tu.telemetryError=w5s;tu.logEngineCompletion=P5s;tu.logEnginePrompt=k5s;var u5s=Ww(),d5s=qr(),f5s=Ip(),Yer=Po(),Lrt=Sz(),fD=Gm(),p5s=crt(),h5s=Hm(),m5s=urt(),g5s=yer(),Ker=jer(),Jer=uIe(),Uv;(function(t){t[t.Standard=0]="Standard",t[t.Enhanced=1]="Enhanced"})(Uv||(tu.TelemetryStore=Uv={}));(function(t){function e(r){return r===t.Enhanced}a(e,"isEnhanced"),t.isEnhanced=e})(Uv||(tu.TelemetryStore=Uv={}));function vle(t){return t===Uv.Enhanced}a(vle,"isEnhanced");var A5s=["engine.prompt","engine.completion","ghostText.capturedAfterAccepted","ghostText.capturedAfterRejected"],dIe=8192,y5s=21,pD=class t{static{a(this,"TelemetryData")}static{this.keysExemptedFromSanitization=[g5s.ExpServiceTelemetryNames.featuresTelemetryPropertyName]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},ble())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=ble())}async extendWithExpTelemetry(e){let{filters:r,exp:n}=await e.get(h5s.ICompletionsFeaturesService).getFallbackExpAndFilters();n.addToTelemetry(this),r.addToTelemetry(this)}extendWithEditorAgnosticFields(e){let r=e.get(u5s.IEnvService),n=e.get(fD.ICompletionsEditorAndPluginInfo);this.properties.editor_version=(0,fD.formatNameAndVersion)(n.getEditorInfo()),this.properties.editor_plugin_version=(0,fD.formatNameAndVersion)(n.getEditorPluginInfo()),this.properties.client_machineid=r.machineId,this.properties.client_sessionid=r.sessionId,this.properties.copilot_version=`copilot/${fD.BuildInfo.getVersion()}`,typeof process<"u"&&(this.properties.runtime_version=`node/${process.versions.node}`),this.properties.common_extname=n.getEditorPluginInfo().name,this.properties.common_extversion=n.getEditorPluginInfo().version,this.properties.common_vscodeversion=(0,fD.formatNameAndVersion)(n.getEditorInfo())}extendWithConfigProperties(e){let r=(0,fD.dumpForTelemetry)(e);r["copilot.build"]=fD.BuildInfo.getBuild(),r["copilot.buildType"]=fD.BuildInfo.getBuildType(),this.properties={...this.properties,...r}}extendWithRequestId(e){let r={headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetry=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromProperties(e,r){if(vle(e))return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetry.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements);for(let e in this.measurements)isNaN(this.measurements[e])&&delete this.measurements[e]}multiplexProperties(){this.properties=t.multiplexProperties(this.properties)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}static multiplexProperties(e){let r={...e};for(let n in e){let o=e[n],s=o?.length??0;if(s>dIe){let c=0,l=0;for(;s>0&&l1&&(u=n+"_"+(l<10?"0":"")+l);let d=c+dIe;se+r.length,0)??0),promptSuffixCharLen:t.suffix.length}}a(C5s,"telemetrizePromptLength");function ble(){return performance.now()}a(ble,"now");function v5s(t){return Math.floor(t/1e3)}a(v5s,"nowSeconds");function Zer(t){return t.get(Ker.ICompletionsTelemetryUserConfigService).optedIn}a(Zer,"shouldSendEnhanced");function n$n(t){return t.get(Ker.ICompletionsTelemetryUserConfigService).ftFlag!==""}a(n$n,"shouldSendFinetuningTelemetry");function etr(t,e,r,n){return t.get(Jer.ICompletionsPromiseQueueService).register(b5s(t,e,ble(),r?.extendedBy(),n))}a(etr,"telemetry");async function b5s(t,e,r,n,o=Uv.Standard){let s=t.get(Lrt.ICompletionsTelemetryService),c=t.get(Yer.IInstantiationService),l=n||pD.createAndMarkAsIssued({},{});await l.makeReadyForSending(t,o??!1,"IncludeExp",r),(!vle(o)||c.invokeFunction(Zer))&&Xer(s,o,e,l),vle(o)&&A5s.includes(e)&&c.invokeFunction(n$n)&&c.invokeFunction(_5s,o,e,l)}a(b5s,"_telemetry");function T5s(t,e){return t.get(Jer.ICompletionsPromiseQueueService).register(S5s(t,e,ble()))}a(T5s,"telemetryExpProblem");async function S5s(t,e,r){let n=t.get(Lrt.ICompletionsTelemetryService),o="expProblem",s=pD.createAndMarkAsIssued(e,{});await s.makeReadyForSending(t,Uv.Standard,"SkipExp",r),Xer(n,Uv.Standard,o,s)}a(S5s,"_telemetryExpProblem");function I5s(t,e,r,n){let o=t.get(Lrt.ICompletionsTelemetryService),s={...r,...i$n(t)};Xer(o,Uv.Standard,e,{properties:s,measurements:n})}a(I5s,"telemetryRaw");function i$n(t){let e=t.get(fD.ICompletionsEditorAndPluginInfo),r={unique_id:(0,f5s.generateUuid)(),common_extname:e.getEditorPluginInfo().name,common_extversion:e.getEditorPluginInfo().version,common_vscodeversion:(0,fD.formatNameAndVersion)(e.getEditorInfo())};return{...t.get(Ker.ICompletionsTelemetryUserConfigService).getProperties(),...r}}a(i$n,"createRequiredProperties");function o$n(t,e,r){return t.sendGHTelemetryException(e,r||"")}a(o$n,"telemetryException");function x5s(t,e,r,n){let o=a(async(...s)=>{try{await r(...s)}catch(c){o$n(t,c,n)}},"wrapped");return(...s)=>e.register(o(...s))}a(x5s,"telemetryCatch");function w5s(t,e,r,n){return t.get(Jer.ICompletionsPromiseQueueService).register(R5s(t,e,ble(),r?.extendedBy(),n))}a(w5s,"telemetryError");async function R5s(t,e,r,n,o=Uv.Standard){if(vle(o)&&!Zer(t))return;let s=t.get(Yer.IInstantiationService),c=n||pD.createAndMarkAsIssued({},{});await c.makeReadyForSending(t,o,"IncludeExp",r),s.invokeFunction(E5s,o,e,c)}a(R5s,"_telemetryError");function P5s(t,e,r,n,o){let s=pD.createAndMarkAsIssued({completionTextJson:JSON.stringify(e),choiceIndex:o.toString()});if(r.logprobs)for(let[c,l]of Object.entries(r.logprobs))s.properties["logprobs_"+c]=JSON.stringify(l)??"unset";return s.extendWithRequestId(n),etr(t,"engine.completion",s,Uv.Enhanced)}a(P5s,"logEngineCompletion");function k5s(t,e,r){let n={promptJson:JSON.stringify({prefix:e.prefix,context:e.context}),promptSuffixJson:JSON.stringify(e.suffix)};if(e.context){let s=r.properties["request.option.extra"]?JSON.parse(r.properties["request.option.extra"]):{};s.context=e.context,n["request.option.extra"]=JSON.stringify(s)}let o=r.extendedBy(n);return etr(t,"engine.prompt",o,Uv.Enhanced)}a(k5s,"logEnginePrompt");var Wer=class{static{a(this,"CopilotTelemetryReporter")}};tu.CopilotTelemetryReporter=Wer;tu.ICompletionsTelemetryReporters=(0,d5s.createServiceIdentifier)("ICompletionsTelemetryReporters");var zer=class{static{a(this,"TelemetryReporters")}getReporter(e,r=Uv.Standard){return vle(r)?this.getEnhancedReporter(e):this.reporter}getEnhancedReporter(e){if(Zer(e))return this.reporterEnhanced}getFTReporter(e){}setReporter(e){this.reporter=e}setEnhancedReporter(e){this.reporterEnhanced=e}setFTReporter(e){this.reporterFT=e}async deactivate(){let e=[this.reporter,this.reporterEnhanced,this.reporterFT];this.reporter=this.reporterEnhanced=this.reporterFT=void 0,await Promise.all(e.map(r=>r?.dispose()))}};tu.TelemetryReporters=zer});var Sz=T(Kw=>{"use strict";f();var D5s=Kw&&Kw.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},N5s=Kw&&Kw.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Kw,"__esModule",{value:!0});Kw.CompletionsTelemetryServiceBridge=Kw.ICompletionsTelemetryService=void 0;var M5s=bp(),ttr=ler(),O5s=qr(),fIe=xp();Kw.ICompletionsTelemetryService=(0,O5s.createServiceIdentifier)("completionsTelemetryService");var rtr=class{static{a(this,"CompletionsTelemetryServiceBridge")}constructor(e){this.telemetryService=e,this.reporter=void 0,this.enhancedReporter=void 0}sendGHTelemetryEvent(e,r,n,o){this.telemetryService.sendGHTelemetryEvent((0,ttr.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??fIe.TelemetryStore.Standard)?.sendTelemetryEvent(e,r,n)}sendEnhancedGHTelemetryEvent(e,r,n,o){this.telemetryService.sendEnhancedGHTelemetryEvent((0,ttr.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??fIe.TelemetryStore.Enhanced)?.sendTelemetryEvent(e,r,n)}sendGHTelemetryErrorEvent(e,r,n,o){this.telemetryService.sendGHTelemetryErrorEvent((0,ttr.wrapEventNameForPrefixRemoval)(`copilot/${e}`),r,n),this.getSpyReporters(o??fIe.TelemetryStore.Enhanced)?.sendTelemetryErrorEvent(e,r,n)}sendGHTelemetryException(e,r,n){this.telemetryService.sendGHTelemetryException(e,r),e instanceof Error&&this.getSpyReporters(n??fIe.TelemetryStore.Enhanced)?.sendTelemetryException(e,void 0,void 0)}setSpyReporters(e,r){this.reporter=e,this.enhancedReporter=r}clearSpyReporters(){this.reporter=void 0,this.enhancedReporter=void 0}getSpyReporters(e){return fIe.TelemetryStore.isEnhanced(e)?this.enhancedReporter:this.reporter}};Kw.CompletionsTelemetryServiceBridge=rtr;Kw.CompletionsTelemetryServiceBridge=rtr=D5s([N5s(0,M5s.ITelemetryService)],rtr)});var s$n=T(Tle=>{"use strict";f();Object.defineProperty(Tle,"__esModule",{value:!0});Tle.CopilotExtensionStatus=Tle.ICompletionsExtensionStatus=void 0;var B5s=qr();Tle.ICompletionsExtensionStatus=(0,B5s.createServiceIdentifier)("ICompletionsExtensionStatus");var ntr=class{static{a(this,"CopilotExtensionStatus")}constructor(e="Normal",r,n=!1,o){this.kind=e,this.message=r,this.busy=n,this.command=o}};Tle.CopilotExtensionStatus=ntr});var Frt=T(Jw=>{"use strict";f();Object.defineProperty(Jw,"__esModule",{value:!0});Jw.CopilotToken=void 0;Jw.containsInternalOrg=a$n;Jw.containsVSCodeOrg=u$n;Jw.validateTokenEnvelope=f$n;Jw.isTokenEnvelope=q5s;Jw.isErrorEnvelope=G5s;Jw.isStandardErrorEnvelope=H5s;Jw.createTestExtendedTokenInfo=j5s;var pn=zO();function a$n(t){return c$n(t)||l$n(t)}a(a$n,"containsInternalOrg");function c$n(t){let e=["4535c7beffc844b46bb1ed4aa04d759a"];for(let r of t)if(e.includes(r))return!0;return!1}a(c$n,"containsGitHubOrg");function l$n(t){let e=["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","1cb18ac6eedd49b43d74a1c5beb0b955","ea9395b9a9248c05ee6847cbd24355ed"];for(let r of t)if(e.includes(r))return!0;return!1}a(l$n,"containsMicrosoftOrg");function u$n(t){let e=["551cca60ce19654d894e786220822482"];for(let r of t)if(e.includes(r))return!0;return!1}a(u$n,"containsVSCodeOrg");var itr=class{static{a(this,"CopilotToken")}constructor(e){this._info=e,this.tokenMap=this.parseToken(e.token)}parseToken(e){let r=new Map,o=e?.split(":")[0]?.split(";");for(let s of o){let[c,l]=s.split("=");r.set(c,l)}return r}get token(){return this._info.token}get sku(){return this._info.sku}get isIndividual(){return this._info.individual??!1}get organizationList(){return this._info.organization_list||[]}get organizationLoginList(){return this._info.organization_login_list||[]}get enterpriseList(){return this._info.enterprise_list||[]}get endpoints(){return this._info.endpoints}get isInternal(){return a$n(this.organizationList)}get isMicrosoftInternal(){return l$n(this.organizationList)}get isGitHubInternal(){return c$n(this.organizationList)}get isFreeUser(){return this.sku==="free_limited_copilot"}get isNoAuthUser(){return this.sku==="no_auth_limited_copilot"}get isChatQuotaExceeded(){return this.isFreeUser&&(this._info.limited_user_quotas?.chat??1)<=0}get isCompletionsQuotaExceeded(){return this.isFreeUser&&(this._info.limited_user_quotas?.completions??1)<=0}get codeQuoteEnabled(){return this._info.code_quote_enabled??!1}get isVscodeTeamMember(){return this._info.isVscodeTeamMember||u$n(this.organizationList)}get codexAgentEnabled(){return this._info.codex_agent_enabled??!1}get copilotPlan(){if(this.isFreeUser)return"free";let e=this._info.copilot_plan;switch(e){case"individual":case"individual_pro":case"business":case"enterprise":return e;default:return"individual"}}get quotaInfo(){return{quota_snapshots:this._info.quota_snapshots,quota_reset_date:this._info.quota_reset_date}}get username(){return this._info.username}isTelemetryEnabled(){return this._isTelemetryEnabled===void 0&&(this._isTelemetryEnabled=this._info.telemetry==="enabled"),this._isTelemetryEnabled}isPublicSuggestionsEnabled(){return this._isPublicSuggestionsEnabled===void 0&&(this._isPublicSuggestionsEnabled=this._info.public_suggestions==="enabled"),this._isPublicSuggestionsEnabled}isCopilotIgnoreEnabled(){return this._info.copilotignore_enabled??!1}get isCopilotCodeReviewEnabled(){return this._info.code_review_enabled??this.getTokenValue("ccr")==="1"}isEditorPreviewFeaturesEnabled(){return this.getTokenValue("editor_preview_features")!=="0"}isMcpEnabled(){return this.getTokenValue("mcp")!=="0"}getTokenValue(e){return this.tokenMap.get(e)}isExpandedClientSideIndexingEnabled(){return this._info.blackbird_clientside_indexing===!0}isFcv1(){return this.tokenMap.get("fcv1")==="1"}isSn(){return this.tokenMap.get("sn")==="1"}};Jw.CopilotToken=itr;var d$n=(0,pn.vObj)({message:(0,pn.vRequired)((0,pn.vString)()),notification_id:(0,pn.vRequired)((0,pn.vString)()),title:(0,pn.vRequired)((0,pn.vString)()),url:(0,pn.vRequired)((0,pn.vString)())}),L5s=(0,pn.vObj)({can_signup_for_limited:(0,pn.vNullable)((0,pn.vBoolean)()),error_details:(0,pn.vRequired)(d$n),message:(0,pn.vRequired)((0,pn.vString)()),reason:(0,pn.vString)()}),F5s=(0,pn.vObj)({token:(0,pn.vRequired)((0,pn.vString)()),expires_at:(0,pn.vRequired)((0,pn.vNumber)()),refresh_in:(0,pn.vRequired)((0,pn.vNumber)()),sku:(0,pn.vString)(),individual:(0,pn.vBoolean)(),blackbird_clientside_indexing:(0,pn.vBoolean)(),code_quote_enabled:(0,pn.vBoolean)(),code_review_enabled:(0,pn.vBoolean)(),codesearch:(0,pn.vBoolean)(),copilotignore_enabled:(0,pn.vBoolean)(),vsc_electron_fetcher_v2:(0,pn.vBoolean)(),public_suggestions:(0,pn.vEnum)("enabled","disabled","unconfigured"),telemetry:(0,pn.vEnum)("enabled","disabled"),endpoints:(0,pn.vObj)({api:(0,pn.vString)(),"origin-tracker":(0,pn.vString)(),proxy:(0,pn.vString)(),telemetry:(0,pn.vString)()}),enterprise_list:(0,pn.vNullable)((0,pn.vArray)((0,pn.vNumber)())),limited_user_quotas:(0,pn.vNullable)((0,pn.vObj)({chat:(0,pn.vRequired)((0,pn.vNumber)()),completions:(0,pn.vRequired)((0,pn.vNumber)())})),limited_user_reset_date:(0,pn.vNullable)((0,pn.vNumber)()),organization_list:(0,pn.vArray)((0,pn.vString)()),user_notification:d$n}),U5s=(0,pn.vObj)({message:(0,pn.vRequired)((0,pn.vString)()),documentation_url:(0,pn.vRequired)((0,pn.vString)()),status:(0,pn.vRequired)((0,pn.vString)())}),Q5s=(0,pn.vObj)({token:(0,pn.vRequired)((0,pn.vString)()),expires_at:(0,pn.vRequired)((0,pn.vNumber)()),refresh_in:(0,pn.vRequired)((0,pn.vNumber)())});function f$n(t){let e=F5s.validate(t);if(e.error===void 0)return{valid:!0,strategy:"strict",envelope:e.content};let r=e.error.message,n=Q5s.validate(t);return n.error===void 0?{valid:!0,strategy:"fallback",strictError:r,envelope:t}:{valid:!1,strategy:"failed",strictError:r,fallbackError:n.error.message}}a(f$n,"validateTokenEnvelope");function q5s(t){return f$n(t).valid}a(q5s,"isTokenEnvelope");function G5s(t){return L5s.validate(t).error===void 0}a(G5s,"isErrorEnvelope");function H5s(t){return U5s.validate(t).error===void 0}a(H5s,"isStandardErrorEnvelope");function j5s(t){return{token:"test-token",expires_at:0,refresh_in:0,sku:"free_limited_copilot",individual:!0,blackbird_clientside_indexing:!1,code_quote_enabled:!1,code_review_enabled:!1,codesearch:!1,copilotignore_enabled:!1,vsc_electron_fetcher_v2:!1,public_suggestions:"enabled",telemetry:"enabled",username:"testuser",isVscodeTeamMember:!1,copilot_plan:"free",organization_login_list:[],...t}}a(j5s,"createTestExtendedTokenInfo")});var Sle=T(Qv=>{"use strict";f();var $5s=Qv&&Qv.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},V5s=Qv&&Qv.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Qv,"__esModule",{value:!0});Qv.CopilotTokenManagerImpl=Qv.ICompletionsCopilotTokenManager=Qv.CopilotToken=void 0;var W5s=cA(),z5s=qr(),Y5s=vc(),K5s=ro(),J5s=Frt();Object.defineProperty(Qv,"CopilotToken",{enumerable:!0,get:a(function(){return J5s.CopilotToken},"get")});Qv.ICompletionsCopilotTokenManager=(0,z5s.createServiceIdentifier)("ICompletionsCopilotTokenManager");var otr=class extends K5s.Disposable{static{a(this,"CopilotTokenManagerImpl")}get token(){return this.tokenRefetcher.trigger(()=>this.updateCachedToken()),this._token}constructor(e=!1,r){super(),this.primed=e,this.authenticationService=r,this.tokenRefetcher=new Y5s.ThrottledDelayer(5e3),this.updateCachedToken(),this._register(this.authenticationService.onDidAuthenticationChange(()=>this.updateCachedToken()))}primeToken(){try{return this.getToken().then(()=>!0,()=>!1)}catch{return Promise.resolve(!1)}}async getToken(){return this.updateCachedToken()}async updateCachedToken(){return this._token=await this.authenticationService.getCopilotToken(),this._token}resetToken(e){this.authenticationService.resetCopilotToken()}getLastToken(){return this.authenticationService.copilotToken}};Qv.CopilotTokenManagerImpl=otr;Qv.CopilotTokenManagerImpl=otr=$5s([V5s(1,W5s.IAuthenticationService)],otr)});var Urt=T(Ile=>{"use strict";f();Object.defineProperty(Ile,"__esModule",{value:!0});Ile.NoOpCitationManager=Ile.ICompletionsCitationManager=void 0;var X5s=qr(),Z5s=ro();Ile.ICompletionsCitationManager=(0,X5s.createServiceIdentifier)("ICompletionsCitationManager");var str=class{static{a(this,"NoOpCitationManager")}register(){return Z5s.Disposable.None}async handleIPCodeCitation(e){}};Ile.NoOpCitationManager=str});var Ny=T(Mh=>{"use strict";f();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.HasPropertyKey=eDs;Mh.IsAsyncIterator=tDs;Mh.IsArray=atr;Mh.IsBigInt=rDs;Mh.IsBoolean=nDs;Mh.IsDate=iDs;Mh.IsFunction=oDs;Mh.IsIterator=sDs;Mh.IsNull=aDs;Mh.IsNumber=cDs;Mh.IsObject=ctr;Mh.IsRegExp=lDs;Mh.IsString=uDs;Mh.IsSymbol=dDs;Mh.IsUint8Array=ltr;Mh.IsUndefined=fDs;function eDs(t,e){return e in t}a(eDs,"HasPropertyKey");function tDs(t){return ctr(t)&&!atr(t)&&!ltr(t)&&Symbol.asyncIterator in t}a(tDs,"IsAsyncIterator");function atr(t){return Array.isArray(t)}a(atr,"IsArray");function rDs(t){return typeof t=="bigint"}a(rDs,"IsBigInt");function nDs(t){return typeof t=="boolean"}a(nDs,"IsBoolean");function iDs(t){return t instanceof globalThis.Date}a(iDs,"IsDate");function oDs(t){return typeof t=="function"}a(oDs,"IsFunction");function sDs(t){return ctr(t)&&!atr(t)&&!ltr(t)&&Symbol.iterator in t}a(sDs,"IsIterator");function aDs(t){return t===null}a(aDs,"IsNull");function cDs(t){return typeof t=="number"}a(cDs,"IsNumber");function ctr(t){return typeof t=="object"&&t!==null}a(ctr,"IsObject");function lDs(t){return t instanceof globalThis.RegExp}a(lDs,"IsRegExp");function uDs(t){return typeof t=="string"}a(uDs,"IsString");function dDs(t){return typeof t=="symbol"}a(dDs,"IsSymbol");function ltr(t){return t instanceof globalThis.Uint8Array}a(ltr,"IsUint8Array");function fDs(t){return t===void 0}a(fDs,"IsUndefined")});var K_=T(YO=>{"use strict";f();var pDs=YO&&YO.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hDs=YO&&YO.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mDs=YO&&YO.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oQrt(e))}a(gDs,"ArrayType");function ADs(t){return new Date(t.getTime())}a(ADs,"DateType");function yDs(t){return new Uint8Array(t)}a(yDs,"Uint8ArrayType");function EDs(t){return new RegExp(t.source,t.flags)}a(EDs,"RegExpType");function _Ds(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Qrt(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Qrt(t[r]);return e}a(_Ds,"ObjectType");function Qrt(t){return pIe.IsArray(t)?gDs(t):pIe.IsDate(t)?ADs(t):pIe.IsUint8Array(t)?yDs(t):pIe.IsRegExp(t)?EDs(t):pIe.IsObject(t)?_Ds(t):t}a(Qrt,"Visit");function CDs(t){return Qrt(t)}a(CDs,"Clone")});var Grt=T(qrt=>{"use strict";f();Object.defineProperty(qrt,"__esModule",{value:!0});qrt.CloneRest=vDs;qrt.CloneType=h$n;var p$n=K_();function vDs(t){return t.map(e=>h$n(e))}a(vDs,"CloneRest");function h$n(t,e){return e===void 0?(0,p$n.Clone)(t):(0,p$n.Clone)({...e,...t})}a(h$n,"CloneType")});var utr=T(j7=>{"use strict";f();var bDs=j7&&j7.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),m$n=j7&&j7.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bDs(e,t,r)};Object.defineProperty(j7,"__esModule",{value:!0});m$n(Grt(),j7);m$n(K_(),j7)});var Hrt=T(xs=>{"use strict";f();Object.defineProperty(xs,"__esModule",{value:!0});xs.IsAsyncIterator=TDs;xs.IsIterator=SDs;xs.IsStandardObject=IDs;xs.IsInstanceObject=xDs;xs.IsPromise=wDs;xs.IsDate=RDs;xs.IsMap=PDs;xs.IsSet=kDs;xs.IsRegExp=DDs;xs.IsTypedArray=NDs;xs.IsInt8Array=MDs;xs.IsUint8Array=ODs;xs.IsUint8ClampedArray=BDs;xs.IsInt16Array=LDs;xs.IsUint16Array=FDs;xs.IsInt32Array=UDs;xs.IsUint32Array=QDs;xs.IsFloat32Array=qDs;xs.IsFloat64Array=GDs;xs.IsBigInt64Array=HDs;xs.IsBigUint64Array=jDs;xs.HasPropertyKey=$Ds;xs.IsObject=hIe;xs.IsArray=g$n;xs.IsUndefined=A$n;xs.IsNull=y$n;xs.IsBoolean=E$n;xs.IsNumber=_$n;xs.IsInteger=VDs;xs.IsBigInt=C$n;xs.IsString=v$n;xs.IsFunction=b$n;xs.IsSymbol=T$n;xs.IsValueType=WDs;function TDs(t){return hIe(t)&&globalThis.Symbol.asyncIterator in t}a(TDs,"IsAsyncIterator");function SDs(t){return hIe(t)&&globalThis.Symbol.iterator in t}a(SDs,"IsIterator");function IDs(t){return hIe(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}a(IDs,"IsStandardObject");function xDs(t){return hIe(t)&&!g$n(t)&&b$n(t.constructor)&&t.constructor.name!=="Object"}a(xDs,"IsInstanceObject");function wDs(t){return t instanceof globalThis.Promise}a(wDs,"IsPromise");function RDs(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}a(RDs,"IsDate");function PDs(t){return t instanceof globalThis.Map}a(PDs,"IsMap");function kDs(t){return t instanceof globalThis.Set}a(kDs,"IsSet");function DDs(t){return t instanceof globalThis.RegExp}a(DDs,"IsRegExp");function NDs(t){return globalThis.ArrayBuffer.isView(t)}a(NDs,"IsTypedArray");function MDs(t){return t instanceof globalThis.Int8Array}a(MDs,"IsInt8Array");function ODs(t){return t instanceof globalThis.Uint8Array}a(ODs,"IsUint8Array");function BDs(t){return t instanceof globalThis.Uint8ClampedArray}a(BDs,"IsUint8ClampedArray");function LDs(t){return t instanceof globalThis.Int16Array}a(LDs,"IsInt16Array");function FDs(t){return t instanceof globalThis.Uint16Array}a(FDs,"IsUint16Array");function UDs(t){return t instanceof globalThis.Int32Array}a(UDs,"IsInt32Array");function QDs(t){return t instanceof globalThis.Uint32Array}a(QDs,"IsUint32Array");function qDs(t){return t instanceof globalThis.Float32Array}a(qDs,"IsFloat32Array");function GDs(t){return t instanceof globalThis.Float64Array}a(GDs,"IsFloat64Array");function HDs(t){return t instanceof globalThis.BigInt64Array}a(HDs,"IsBigInt64Array");function jDs(t){return t instanceof globalThis.BigUint64Array}a(jDs,"IsBigUint64Array");function $Ds(t,e){return e in t}a($Ds,"HasPropertyKey");function hIe(t){return t!==null&&typeof t=="object"}a(hIe,"IsObject");function g$n(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}a(g$n,"IsArray");function A$n(t){return t===void 0}a(A$n,"IsUndefined");function y$n(t){return t===null}a(y$n,"IsNull");function E$n(t){return typeof t=="boolean"}a(E$n,"IsBoolean");function _$n(t){return typeof t=="number"}a(_$n,"IsNumber");function VDs(t){return globalThis.Number.isInteger(t)}a(VDs,"IsInteger");function C$n(t){return typeof t=="bigint"}a(C$n,"IsBigInt");function v$n(t){return typeof t=="string"}a(v$n,"IsString");function b$n(t){return typeof t=="function"}a(b$n,"IsFunction");function T$n(t){return typeof t=="symbol"}a(T$n,"IsSymbol");function WDs(t){return C$n(t)||E$n(t)||y$n(t)||_$n(t)||v$n(t)||T$n(t)||A$n(t)}a(WDs,"IsValueType")});var Rp=T(Iz=>{"use strict";f();var zDs=Iz&&Iz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),YDs=Iz&&Iz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&zDs(e,t,r)};Object.defineProperty(Iz,"__esModule",{value:!0});YDs(Hrt(),Iz)});var mIe=T($rt=>{"use strict";f();Object.defineProperty($rt,"__esModule",{value:!0});$rt.TypeSystemPolicy=void 0;var jrt=Rp(),S$n;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(c,l){return t.ExactOptionalPropertyTypes?l in c:c[l]!==void 0}a(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function r(c){let l=(0,jrt.IsObject)(c);return t.AllowArrayObject?l:l&&!(0,jrt.IsArray)(c)}a(r,"IsObjectLike"),t.IsObjectLike=r;function n(c){return r(c)&&!(c instanceof Date)&&!(c instanceof Uint8Array)}a(n,"IsRecordLike"),t.IsRecordLike=n;function o(c){return t.AllowNaN?(0,jrt.IsNumber)(c):Number.isFinite(c)}a(o,"IsNumberLike"),t.IsNumberLike=o;function s(c){let l=(0,jrt.IsUndefined)(c);return t.AllowNullVoid?l||c===null:l}a(s,"IsVoidLike"),t.IsVoidLike=s})(S$n||($rt.TypeSystemPolicy=S$n={}))});var I$n=T(KO=>{"use strict";f();var KDs=KO&&KO.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),JDs=KO&&KO.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),XDs=KO&&KO.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oVrt(e))}a(ZDs,"ImmutableArray");function eNs(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Vrt(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Vrt(t[r]);return globalThis.Object.freeze(e)}a(eNs,"ImmutableObject");function Vrt(t){return gIe.IsArray(t)?ZDs(t):gIe.IsDate(t)?t:gIe.IsUint8Array(t)?t:gIe.IsRegExp(t)?t:gIe.IsObject(t)?eNs(t):t}a(Vrt,"Immutable")});var Xn=T(dtr=>{"use strict";f();Object.defineProperty(dtr,"__esModule",{value:!0});dtr.CreateType=iNs;var tNs=mIe(),rNs=I$n(),nNs=K_();function iNs(t,e){let r=e!==void 0?{...e,...t}:t;switch(tNs.TypeSystemPolicy.InstanceMode){case"freeze":return(0,rNs.Immutable)(r);case"clone":return(0,nNs.Clone)(r);default:return r}}a(iNs,"CreateType")});var JO=T(xz=>{"use strict";f();var oNs=xz&&xz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sNs=xz&&xz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oNs(e,t,r)};Object.defineProperty(xz,"__esModule",{value:!0});sNs(Xn(),xz)});var ptr=T(Wrt=>{"use strict";f();Object.defineProperty(Wrt,"__esModule",{value:!0});Wrt.TypeBoxError=void 0;var ftr=class extends Error{static{a(this,"TypeBoxError")}constructor(e){super(e)}};Wrt.TypeBoxError=ftr});var sd=T(wz=>{"use strict";f();var aNs=wz&&wz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cNs=wz&&wz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&aNs(e,t,r)};Object.defineProperty(wz,"__esModule",{value:!0});cNs(ptr(),wz)});var AIe=T(LS=>{"use strict";f();Object.defineProperty(LS,"__esModule",{value:!0});LS.Kind=LS.Hint=LS.OptionalKind=LS.ReadonlyKind=LS.TransformKind=void 0;LS.TransformKind=Symbol.for("TypeBox.Transform");LS.ReadonlyKind=Symbol.for("TypeBox.Readonly");LS.OptionalKind=Symbol.for("TypeBox.Optional");LS.Hint=Symbol.for("TypeBox.Hint");LS.Kind=Symbol.for("TypeBox.Kind")});var nn=T(Rz=>{"use strict";f();var lNs=Rz&&Rz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),uNs=Rz&&Rz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&lNs(e,t,r)};Object.defineProperty(Rz,"__esModule",{value:!0});uNs(AIe(),Rz)});var Do=T(Qn=>{"use strict";f();var dNs=Qn&&Qn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fNs=Qn&&Qn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pNs=Qn&&Qn.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var SNs=wn&&wn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),INs=wn&&wn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xNs=wn&&wn.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=7&&r<=13||r===27||r===127)return!1}return!0}a(mtr,"IsControlCharacterFree");function uVn(t){return gtr(t)||Oh(t)}a(uVn,"IsAdditionalProperties");function EIe(t){return On.IsUndefined(t)||On.IsBigInt(t)}a(EIe,"IsOptionalBigInt");function $c(t){return On.IsUndefined(t)||On.IsNumber(t)}a($c,"IsOptionalNumber");function gtr(t){return On.IsUndefined(t)||On.IsBoolean(t)}a(gtr,"IsOptionalBoolean");function cc(t){return On.IsUndefined(t)||On.IsString(t)}a(cc,"IsOptionalString");function PNs(t){return On.IsUndefined(t)||On.IsString(t)&&mtr(t)&&lVn(t)}a(PNs,"IsOptionalPattern");function kNs(t){return On.IsUndefined(t)||On.IsString(t)&&mtr(t)}a(kNs,"IsOptionalFormat");function dVn(t){return On.IsUndefined(t)||Oh(t)}a(dVn,"IsOptionalSchema");function DNs(t){return On.IsObject(t)&&t[hD.ReadonlyKind]==="Readonly"}a(DNs,"IsReadonly");function NNs(t){return On.IsObject(t)&&t[hD.OptionalKind]==="Optional"}a(NNs,"IsOptional");function fVn(t){return es(t,"Any")&&cc(t.$id)}a(fVn,"IsAny");function pVn(t){return es(t,"Argument")&&On.IsNumber(t.index)}a(pVn,"IsArgument");function hVn(t){return es(t,"Array")&&t.type==="array"&&cc(t.$id)&&Oh(t.items)&&$c(t.minItems)&&$c(t.maxItems)&>r(t.uniqueItems)&&dVn(t.contains)&&$c(t.minContains)&&$c(t.maxContains)}a(hVn,"IsArray");function mVn(t){return es(t,"AsyncIterator")&&t.type==="AsyncIterator"&&cc(t.$id)&&Oh(t.items)}a(mVn,"IsAsyncIterator");function gVn(t){return es(t,"BigInt")&&t.type==="bigint"&&cc(t.$id)&&EIe(t.exclusiveMaximum)&&EIe(t.exclusiveMinimum)&&EIe(t.maximum)&&EIe(t.minimum)&&EIe(t.multipleOf)}a(gVn,"IsBigInt");function AVn(t){return es(t,"Boolean")&&t.type==="boolean"&&cc(t.$id)}a(AVn,"IsBoolean");function yVn(t){return es(t,"Computed")&&On.IsString(t.target)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Oh(e))}a(yVn,"IsComputed");function EVn(t){return es(t,"Constructor")&&t.type==="Constructor"&&cc(t.$id)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Oh(e))&&Oh(t.returns)}a(EVn,"IsConstructor");function _Vn(t){return es(t,"Date")&&t.type==="Date"&&cc(t.$id)&&$c(t.exclusiveMaximumTimestamp)&&$c(t.exclusiveMinimumTimestamp)&&$c(t.maximumTimestamp)&&$c(t.minimumTimestamp)&&$c(t.multipleOfTimestamp)}a(_Vn,"IsDate");function CVn(t){return es(t,"Function")&&t.type==="Function"&&cc(t.$id)&&On.IsArray(t.parameters)&&t.parameters.every(e=>Oh(e))&&Oh(t.returns)}a(CVn,"IsFunction");function MNs(t){return es(t,"Import")&&On.HasPropertyKey(t,"$defs")&&On.IsObject(t.$defs)&&zrt(t.$defs)&&On.HasPropertyKey(t,"$ref")&&On.IsString(t.$ref)&&t.$ref in t.$defs}a(MNs,"IsImport");function vVn(t){return es(t,"Integer")&&t.type==="integer"&&cc(t.$id)&&$c(t.exclusiveMaximum)&&$c(t.exclusiveMinimum)&&$c(t.maximum)&&$c(t.minimum)&&$c(t.multipleOf)}a(vVn,"IsInteger");function zrt(t){return On.IsObject(t)&&Object.entries(t).every(([e,r])=>mtr(e)&&Oh(r))}a(zrt,"IsProperties");function bVn(t){return es(t,"Intersect")&&!(On.IsString(t.type)&&t.type!=="object")&&On.IsArray(t.allOf)&&t.allOf.every(e=>Oh(e)&&!HVn(e))&&cc(t.type)&&(gtr(t.unevaluatedProperties)||dVn(t.unevaluatedProperties))&&cc(t.$id)}a(bVn,"IsIntersect");function TVn(t){return es(t,"Iterator")&&t.type==="Iterator"&&cc(t.$id)&&Oh(t.items)}a(TVn,"IsIterator");function es(t,e){return On.IsObject(t)&&hD.Kind in t&&t[hD.Kind]===e}a(es,"IsKindOf");function SVn(t){return _Ie(t)&&On.IsString(t.const)}a(SVn,"IsLiteralString");function IVn(t){return _Ie(t)&&On.IsNumber(t.const)}a(IVn,"IsLiteralNumber");function ONs(t){return _Ie(t)&&On.IsBoolean(t.const)}a(ONs,"IsLiteralBoolean");function _Ie(t){return es(t,"Literal")&&cc(t.$id)&&xVn(t.const)}a(_Ie,"IsLiteral");function xVn(t){return On.IsBoolean(t)||On.IsNumber(t)||On.IsString(t)}a(xVn,"IsLiteralValue");function wVn(t){return es(t,"MappedKey")&&On.IsArray(t.keys)&&t.keys.every(e=>On.IsNumber(e)||On.IsString(e))}a(wVn,"IsMappedKey");function RVn(t){return es(t,"MappedResult")&&zrt(t.properties)}a(RVn,"IsMappedResult");function PVn(t){return es(t,"Never")&&On.IsObject(t.not)&&Object.getOwnPropertyNames(t.not).length===0}a(PVn,"IsNever");function kVn(t){return es(t,"Not")&&Oh(t.not)}a(kVn,"IsNot");function DVn(t){return es(t,"Null")&&t.type==="null"&&cc(t.$id)}a(DVn,"IsNull");function NVn(t){return es(t,"Number")&&t.type==="number"&&cc(t.$id)&&$c(t.exclusiveMaximum)&&$c(t.exclusiveMinimum)&&$c(t.maximum)&&$c(t.minimum)&&$c(t.multipleOf)}a(NVn,"IsNumber");function MVn(t){return es(t,"Object")&&t.type==="object"&&cc(t.$id)&&zrt(t.properties)&&uVn(t.additionalProperties)&&$c(t.minProperties)&&$c(t.maxProperties)}a(MVn,"IsObject");function OVn(t){return es(t,"Promise")&&t.type==="Promise"&&cc(t.$id)&&Oh(t.item)}a(OVn,"IsPromise");function BVn(t){return es(t,"Record")&&t.type==="object"&&cc(t.$id)&&uVn(t.additionalProperties)&&On.IsObject(t.patternProperties)&&(e=>{let r=Object.getOwnPropertyNames(e.patternProperties);return r.length===1&&lVn(r[0])&&On.IsObject(e.patternProperties)&&Oh(e.patternProperties[r[0]])})(t)}a(BVn,"IsRecord");function BNs(t){return On.IsObject(t)&&hD.Hint in t&&t[hD.Hint]==="Recursive"}a(BNs,"IsRecursive");function LVn(t){return es(t,"Ref")&&cc(t.$id)&&On.IsString(t.$ref)}a(LVn,"IsRef");function FVn(t){return es(t,"RegExp")&&cc(t.$id)&&On.IsString(t.source)&&On.IsString(t.flags)&&$c(t.maxLength)&&$c(t.minLength)}a(FVn,"IsRegExp");function UVn(t){return es(t,"String")&&t.type==="string"&&cc(t.$id)&&$c(t.minLength)&&$c(t.maxLength)&&PNs(t.pattern)&&kNs(t.format)}a(UVn,"IsString");function QVn(t){return es(t,"Symbol")&&t.type==="symbol"&&cc(t.$id)}a(QVn,"IsSymbol");function qVn(t){return es(t,"TemplateLiteral")&&t.type==="string"&&On.IsString(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}a(qVn,"IsTemplateLiteral");function GVn(t){return es(t,"This")&&cc(t.$id)&&On.IsString(t.$ref)}a(GVn,"IsThis");function HVn(t){return On.IsObject(t)&&hD.TransformKind in t}a(HVn,"IsTransform");function jVn(t){return es(t,"Tuple")&&t.type==="array"&&cc(t.$id)&&On.IsNumber(t.minItems)&&On.IsNumber(t.maxItems)&&t.minItems===t.maxItems&&(On.IsUndefined(t.items)&&On.IsUndefined(t.additionalItems)&&t.minItems===0||On.IsArray(t.items)&&t.items.every(e=>Oh(e)))}a(jVn,"IsTuple");function $Vn(t){return es(t,"Undefined")&&t.type==="undefined"&&cc(t.$id)}a($Vn,"IsUndefined");function LNs(t){return Atr(t)&&t.anyOf.every(e=>SVn(e)||IVn(e))}a(LNs,"IsUnionLiteral");function Atr(t){return es(t,"Union")&&cc(t.$id)&&On.IsObject(t)&&On.IsArray(t.anyOf)&&t.anyOf.every(e=>Oh(e))}a(Atr,"IsUnion");function VVn(t){return es(t,"Uint8Array")&&t.type==="Uint8Array"&&cc(t.$id)&&$c(t.minByteLength)&&$c(t.maxByteLength)}a(VVn,"IsUint8Array");function WVn(t){return es(t,"Unknown")&&cc(t.$id)}a(WVn,"IsUnknown");function zVn(t){return es(t,"Unsafe")}a(zVn,"IsUnsafe");function YVn(t){return es(t,"Void")&&t.type==="void"&&cc(t.$id)}a(YVn,"IsVoid");function KVn(t){return On.IsObject(t)&&hD.Kind in t&&On.IsString(t[hD.Kind])&&!RNs.includes(t[hD.Kind])}a(KVn,"IsKind");function Oh(t){return On.IsObject(t)&&(fVn(t)||pVn(t)||hVn(t)||AVn(t)||gVn(t)||mVn(t)||yVn(t)||EVn(t)||_Vn(t)||CVn(t)||vVn(t)||bVn(t)||TVn(t)||_Ie(t)||wVn(t)||RVn(t)||PVn(t)||kVn(t)||DVn(t)||NVn(t)||MVn(t)||OVn(t)||BVn(t)||LVn(t)||FVn(t)||UVn(t)||QVn(t)||qVn(t)||GVn(t)||jVn(t)||$Vn(t)||Atr(t)||VVn(t)||WVn(t)||zVn(t)||YVn(t)||KVn(t))}a(Oh,"IsSchema")});var Etr=T(X_=>{"use strict";f();var FNs=X_&&X_.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UNs=X_&&X_.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ytr=X_&&X_.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(_tr,"__esModule",{value:!0});_tr.Increment=QNs;function QNs(t){return(parseInt(t)+1).toString()}a(QNs,"Increment")});var ZVn=T(Pz=>{"use strict";f();var qNs=Pz&&Pz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),GNs=Pz&&Pz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qNs(e,t,r)};Object.defineProperty(Pz,"__esModule",{value:!0});GNs(XVn(),Pz)});var eWn=T($d=>{"use strict";f();Object.defineProperty($d,"__esModule",{value:!0});$d.PatternNeverExact=$d.PatternStringExact=$d.PatternNumberExact=$d.PatternBooleanExact=$d.PatternNever=$d.PatternString=$d.PatternNumber=$d.PatternBoolean=void 0;$d.PatternBoolean="(true|false)";$d.PatternNumber="(0|[1-9][0-9]*)";$d.PatternString="(.*)";$d.PatternNever="(?!.*)";$d.PatternBooleanExact=`^${$d.PatternBoolean}$`;$d.PatternNumberExact=`^${$d.PatternNumber}$`;$d.PatternStringExact=`^${$d.PatternString}$`;$d.PatternNeverExact=`^${$d.PatternNever}$`});var CIe=T(kz=>{"use strict";f();var HNs=kz&&kz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jNs=kz&&kz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&HNs(e,t,r)};Object.defineProperty(kz,"__esModule",{value:!0});jNs(eWn(),kz)});var tWn=T($7=>{"use strict";f();Object.defineProperty($7,"__esModule",{value:!0});$7.Entries=$Ns;$7.Clear=VNs;$7.Delete=WNs;$7.Has=zNs;$7.Set=YNs;$7.Get=KNs;var xle=new Map;function $Ns(){return new Map(xle)}a($Ns,"Entries");function VNs(){return xle.clear()}a(VNs,"Clear");function WNs(t){return xle.delete(t)}a(WNs,"Delete");function zNs(t){return xle.has(t)}a(zNs,"Has");function YNs(t,e){xle.set(t,e)}a(YNs,"Set");function KNs(t){return xle.get(t)}a(KNs,"Get")});var rWn=T(V7=>{"use strict";f();Object.defineProperty(V7,"__esModule",{value:!0});V7.Entries=JNs;V7.Clear=XNs;V7.Delete=ZNs;V7.Has=eMs;V7.Set=tMs;V7.Get=rMs;var wle=new Map;function JNs(){return new Map(wle)}a(JNs,"Entries");function XNs(){return wle.clear()}a(XNs,"Clear");function ZNs(t){return wle.delete(t)}a(ZNs,"Delete");function eMs(t){return wle.has(t)}a(eMs,"Has");function tMs(t,e){wle.set(t,e)}a(tMs,"Set");function rMs(t){return wle.get(t)}a(rMs,"Get")});var Rle=T(FS=>{"use strict";f();var nMs=FS&&FS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iMs=FS&&FS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nWn=FS&&FS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(mD,"__esModule",{value:!0});mD.SetIncludes=iWn;mD.SetIsSubset=oMs;mD.SetDistinct=sMs;mD.SetIntersect=oWn;mD.SetUnion=aMs;mD.SetComplement=cMs;mD.SetIntersectMany=uMs;mD.SetUnionMany=dMs;function iWn(t,e){return t.includes(e)}a(iWn,"SetIncludes");function oMs(t,e){return t.every(r=>iWn(e,r))}a(oMs,"SetIsSubset");function sMs(t){return[...new Set(t)]}a(sMs,"SetDistinct");function oWn(t,e){return t.filter(r=>e.includes(r))}a(oWn,"SetIntersect");function aMs(t,e){return[...t,...e]}a(aMs,"SetUnion");function cMs(t,e){return t.filter(r=>!e.includes(r))}a(cMs,"SetComplement");function lMs(t,e){return t.reduce((r,n)=>oWn(r,n),e)}a(lMs,"SetIntersectManyResolve");function uMs(t){return t.length===1?t[0]:t.length>1?lMs(t.slice(1),t[0]):[]}a(uMs,"SetIntersectMany");function dMs(t){let e=[];for(let r of t)e.push(...r);return e}a(dMs,"SetUnionMany")});var vIe=T(Dz=>{"use strict";f();var fMs=Dz&&Dz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pMs=Dz&&Dz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fMs(e,t,r)};Object.defineProperty(Dz,"__esModule",{value:!0});pMs(sWn(),Dz)});var aWn=T(Ctr=>{"use strict";f();Object.defineProperty(Ctr,"__esModule",{value:!0});Ctr.Any=gMs;var hMs=JO(),mMs=nn();function gMs(t){return(0,hMs.CreateType)({[mMs.Kind]:"Any"},t)}a(gMs,"Any")});var Ple=T(Nz=>{"use strict";f();var AMs=Nz&&Nz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yMs=Nz&&Nz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AMs(e,t,r)};Object.defineProperty(Nz,"__esModule",{value:!0});yMs(aWn(),Nz)});var cWn=T(vtr=>{"use strict";f();Object.defineProperty(vtr,"__esModule",{value:!0});vtr.Array=CMs;var EMs=Xn(),_Ms=nn();function CMs(t,e){return(0,EMs.CreateType)({[_Ms.Kind]:"Array",type:"array",items:t},e)}a(CMs,"Array")});var kle=T(Mz=>{"use strict";f();var vMs=Mz&&Mz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bMs=Mz&&Mz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&vMs(e,t,r)};Object.defineProperty(Mz,"__esModule",{value:!0});bMs(cWn(),Mz)});var lWn=T(btr=>{"use strict";f();Object.defineProperty(btr,"__esModule",{value:!0});btr.Argument=IMs;var TMs=Xn(),SMs=nn();function IMs(t){return(0,TMs.CreateType)({[SMs.Kind]:"Argument",index:t})}a(IMs,"Argument")});var Yrt=T(Oz=>{"use strict";f();var xMs=Oz&&Oz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wMs=Oz&&Oz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xMs(e,t,r)};Object.defineProperty(Oz,"__esModule",{value:!0});wMs(lWn(),Oz)});var uWn=T(Ttr=>{"use strict";f();Object.defineProperty(Ttr,"__esModule",{value:!0});Ttr.AsyncIterator=kMs;var RMs=nn(),PMs=Xn();function kMs(t,e){return(0,PMs.CreateType)({[RMs.Kind]:"AsyncIterator",type:"AsyncIterator",items:t},e)}a(kMs,"AsyncIterator")});var Dle=T(Bz=>{"use strict";f();var DMs=Bz&&Bz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NMs=Bz&&Bz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&DMs(e,t,r)};Object.defineProperty(Bz,"__esModule",{value:!0});NMs(uWn(),Bz)});var dWn=T(Str=>{"use strict";f();Object.defineProperty(Str,"__esModule",{value:!0});Str.Computed=BMs;var MMs=JO(),OMs=AIe();function BMs(t,e,r){return(0,MMs.CreateType)({[OMs.Kind]:"Computed",target:t,parameters:e},r)}a(BMs,"Computed")});var W7=T(Lz=>{"use strict";f();var LMs=Lz&&Lz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FMs=Lz&&Lz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&LMs(e,t,r)};Object.defineProperty(Lz,"__esModule",{value:!0});FMs(dWn(),Lz)});var Krt=T(Itr=>{"use strict";f();Object.defineProperty(Itr,"__esModule",{value:!0});Itr.Discard=QMs;function UMs(t,e){let{[e]:r,...n}=t;return n}a(UMs,"DiscardKey");function QMs(t,e){return e.reduce((r,n)=>UMs(r,n),t)}a(QMs,"Discard")});var ZO=T(Fz=>{"use strict";f();var qMs=Fz&&Fz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),GMs=Fz&&Fz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qMs(e,t,r)};Object.defineProperty(Fz,"__esModule",{value:!0});GMs(Krt(),Fz)});var fWn=T(xtr=>{"use strict";f();Object.defineProperty(xtr,"__esModule",{value:!0});xtr.Never=$Ms;var HMs=Xn(),jMs=nn();function $Ms(t){return(0,HMs.CreateType)({[jMs.Kind]:"Never",not:{}},t)}a($Ms,"Never")});var M0=T(Uz=>{"use strict";f();var VMs=Uz&&Uz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),WMs=Uz&&Uz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&VMs(e,t,r)};Object.defineProperty(Uz,"__esModule",{value:!0});WMs(fWn(),Uz)});var pWn=T(wtr=>{"use strict";f();Object.defineProperty(wtr,"__esModule",{value:!0});wtr.MappedKey=KMs;var zMs=Xn(),YMs=nn();function KMs(t){return(0,zMs.CreateType)({[YMs.Kind]:"MappedKey",keys:t})}a(KMs,"MappedKey")});var Ptr=T(Rtr=>{"use strict";f();Object.defineProperty(Rtr,"__esModule",{value:!0});Rtr.MappedResult=ZMs;var JMs=Xn(),XMs=nn();function ZMs(t){return(0,JMs.CreateType)({[XMs.Kind]:"MappedResult",properties:t})}a(ZMs,"MappedResult")});var hWn=T(ktr=>{"use strict";f();Object.defineProperty(ktr,"__esModule",{value:!0});ktr.Constructor=r4s;var e4s=Xn(),t4s=nn();function r4s(t,e,r){return(0,e4s.CreateType)({[t4s.Kind]:"Constructor",type:"Constructor",parameters:t,returns:e},r)}a(r4s,"Constructor")});var Nle=T(Qz=>{"use strict";f();var n4s=Qz&&Qz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),i4s=Qz&&Qz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&n4s(e,t,r)};Object.defineProperty(Qz,"__esModule",{value:!0});i4s(hWn(),Qz)});var mWn=T(Dtr=>{"use strict";f();Object.defineProperty(Dtr,"__esModule",{value:!0});Dtr.Function=a4s;var o4s=Xn(),s4s=nn();function a4s(t,e,r){return(0,o4s.CreateType)({[s4s.Kind]:"Function",type:"Function",parameters:t,returns:e},r)}a(a4s,"Function")});var z7=T(qz=>{"use strict";f();var c4s=qz&&qz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),l4s=qz&&qz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&c4s(e,t,r)};Object.defineProperty(qz,"__esModule",{value:!0});l4s(mWn(),qz)});var Mtr=T(Ntr=>{"use strict";f();Object.defineProperty(Ntr,"__esModule",{value:!0});Ntr.UnionCreate=f4s;var u4s=Xn(),d4s=nn();function f4s(t,e){return(0,u4s.CreateType)({[d4s.Kind]:"Union",anyOf:t},e)}a(f4s,"UnionCreate")});var EWn=T(Otr=>{"use strict";f();Object.defineProperty(Otr,"__esModule",{value:!0});Otr.UnionEvaluated=C4s;var p4s=Xn(),h4s=nn(),m4s=ZO(),g4s=M0(),A4s=gD(),gWn=Mtr(),yWn=Do();function y4s(t){return t.some(e=>(0,yWn.IsOptional)(e))}a(y4s,"IsUnionOptional");function AWn(t){return t.map(e=>(0,yWn.IsOptional)(e)?E4s(e):e)}a(AWn,"RemoveOptionalFromRest");function E4s(t){return(0,m4s.Discard)(t,[h4s.OptionalKind])}a(E4s,"RemoveOptionalFromType");function _4s(t,e){return y4s(t)?(0,A4s.Optional)((0,gWn.UnionCreate)(AWn(t),e)):(0,gWn.UnionCreate)(AWn(t),e)}a(_4s,"ResolveUnion");function C4s(t,e){return t.length===1?(0,p4s.CreateType)(t[0],e):t.length===0?(0,g4s.Never)(e):_4s(t,e)}a(C4s,"UnionEvaluated")});var CWn=T(_Wn=>{"use strict";f();Object.defineProperty(_Wn,"__esModule",{value:!0});var jBd=nn()});var vWn=T(Btr=>{"use strict";f();Object.defineProperty(Btr,"__esModule",{value:!0});Btr.Union=S4s;var v4s=M0(),b4s=Xn(),T4s=Mtr();function S4s(t,e){return t.length===0?(0,v4s.Never)(e):t.length===1?(0,b4s.CreateType)(t[0],e):(0,T4s.UnionCreate)(t,e)}a(S4s,"Union")});var Vd=T(eB=>{"use strict";f();var I4s=eB&&eB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ltr=eB&&eB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&I4s(e,t,r)};Object.defineProperty(eB,"__esModule",{value:!0});Ltr(EWn(),eB);Ltr(CWn(),eB);Ltr(vWn(),eB)});var Jrt=T(Mle=>{"use strict";f();Object.defineProperty(Mle,"__esModule",{value:!0});Mle.TemplateLiteralParserError=void 0;Mle.TemplateLiteralParse=Gz;Mle.TemplateLiteralParseExact=O4s;var x4s=sd(),bIe=class extends x4s.TypeBoxError{static{a(this,"TemplateLiteralParserError")}};Mle.TemplateLiteralParserError=bIe;function w4s(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}a(w4s,"Unescape");function Ftr(t,e,r){return t[e]===r&&t.charCodeAt(e-1)!==92}a(Ftr,"IsNonEscaped");function tB(t,e){return Ftr(t,e,"(")}a(tB,"IsOpenParen");function TIe(t,e){return Ftr(t,e,")")}a(TIe,"IsCloseParen");function bWn(t,e){return Ftr(t,e,"|")}a(bWn,"IsSeparator");function R4s(t){if(!(tB(t,0)&&TIe(t,t.length-1)))return!1;let e=0;for(let r=0;r0&&n.push(Gz(c)),r=s+1}let o=t.slice(r);return o.length>0&&n.push(Gz(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}a(N4s,"Or");function M4s(t){function e(o,s){if(!tB(o,s))throw new bIe("TemplateLiteralParser: Index must point to open parens");let c=0;for(let l=s;l0&&n.push(Gz(l)),o=c-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}a(M4s,"And");function Gz(t){return R4s(t)?Gz(P4s(t)):k4s(t)?N4s(t):D4s(t)?M4s(t):{type:"const",const:w4s(t)}}a(Gz,"TemplateLiteralParse");function O4s(t){return Gz(t.slice(1,t.length-1))}a(O4s,"TemplateLiteralParseExact")});var Utr=T(Ole=>{"use strict";f();Object.defineProperty(Ole,"__esModule",{value:!0});Ole.TemplateLiteralFiniteError=void 0;Ole.IsTemplateLiteralExpressionFinite=Zrt;Ole.IsTemplateLiteralFinite=q4s;var B4s=Jrt(),L4s=sd(),Xrt=class extends L4s.TypeBoxError{static{a(this,"TemplateLiteralFiniteError")}};Ole.TemplateLiteralFiniteError=Xrt;function F4s(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}a(F4s,"IsNumberExpression");function U4s(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}a(U4s,"IsBooleanExpression");function Q4s(t){return t.type==="const"&&t.const===".*"}a(Q4s,"IsStringExpression");function Zrt(t){return F4s(t)||Q4s(t)?!1:U4s(t)?!0:t.type==="and"?t.expr.every(e=>Zrt(e)):t.type==="or"?t.expr.every(e=>Zrt(e)):t.type==="const"?!0:(()=>{throw new Xrt("Unknown expression type")})()}a(Zrt,"IsTemplateLiteralExpressionFinite");function q4s(t){let e=(0,B4s.TemplateLiteralParseExact)(t.pattern);return Zrt(e)}a(q4s,"IsTemplateLiteralFinite")});var Qtr=T(Ble=>{"use strict";f();Object.defineProperty(Ble,"__esModule",{value:!0});Ble.TemplateLiteralGenerateError=void 0;Ble.TemplateLiteralExpressionGenerate=tnt;Ble.TemplateLiteralGenerate=z4s;var G4s=Utr(),H4s=Jrt(),j4s=sd(),ent=class extends j4s.TypeBoxError{static{a(this,"TemplateLiteralGenerateError")}};Ble.TemplateLiteralGenerateError=ent;function*TWn(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let r of TWn(t.slice(1)))yield`${e}${r}`}a(TWn,"GenerateReduce");function*$4s(t){return yield*TWn(t.expr.map(e=>[...tnt(e)]))}a($4s,"GenerateAnd");function*V4s(t){for(let e of t.expr)yield*tnt(e)}a(V4s,"GenerateOr");function*W4s(t){return yield t.const}a(W4s,"GenerateConst");function*tnt(t){return t.type==="and"?yield*$4s(t):t.type==="or"?yield*V4s(t):t.type==="const"?yield*W4s(t):(()=>{throw new ent("Unknown expression")})()}a(tnt,"TemplateLiteralExpressionGenerate");function z4s(t){let e=(0,H4s.TemplateLiteralParseExact)(t.pattern);return(0,G4s.IsTemplateLiteralExpressionFinite)(e)?[...tnt(e)]:[]}a(z4s,"TemplateLiteralGenerate")});var SWn=T(qtr=>{"use strict";f();Object.defineProperty(qtr,"__esModule",{value:!0});qtr.Literal=J4s;var Y4s=Xn(),K4s=nn();function J4s(t,e){return(0,Y4s.CreateType)({[K4s.Kind]:"Literal",const:t,type:typeof t},e)}a(J4s,"Literal")});var lA=T(Hz=>{"use strict";f();var X4s=Hz&&Hz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Z4s=Hz&&Hz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&X4s(e,t,r)};Object.defineProperty(Hz,"__esModule",{value:!0});Z4s(SWn(),Hz)});var IWn=T(Gtr=>{"use strict";f();Object.defineProperty(Gtr,"__esModule",{value:!0});Gtr.Boolean=rOs;var eOs=nn(),tOs=JO();function rOs(t){return(0,tOs.CreateType)({[eOs.Kind]:"Boolean",type:"boolean"},t)}a(rOs,"Boolean")});var SIe=T(jz=>{"use strict";f();var nOs=jz&&jz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iOs=jz&&jz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nOs(e,t,r)};Object.defineProperty(jz,"__esModule",{value:!0});iOs(IWn(),jz)});var xWn=T(Htr=>{"use strict";f();Object.defineProperty(Htr,"__esModule",{value:!0});Htr.BigInt=aOs;var oOs=nn(),sOs=JO();function aOs(t){return(0,sOs.CreateType)({[oOs.Kind]:"BigInt",type:"bigint"},t)}a(aOs,"BigInt")});var Lle=T($z=>{"use strict";f();var cOs=$z&&$z.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lOs=$z&&$z.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cOs(e,t,r)};Object.defineProperty($z,"__esModule",{value:!0});lOs(xWn(),$z)});var wWn=T(jtr=>{"use strict";f();Object.defineProperty(jtr,"__esModule",{value:!0});jtr.Number=fOs;var uOs=Xn(),dOs=nn();function fOs(t){return(0,uOs.CreateType)({[dOs.Kind]:"Number",type:"number"},t)}a(fOs,"Number")});var Y7=T(Vz=>{"use strict";f();var pOs=Vz&&Vz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hOs=Vz&&Vz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pOs(e,t,r)};Object.defineProperty(Vz,"__esModule",{value:!0});hOs(wWn(),Vz)});var RWn=T($tr=>{"use strict";f();Object.defineProperty($tr,"__esModule",{value:!0});$tr.String=AOs;var mOs=Xn(),gOs=nn();function AOs(t){return(0,mOs.CreateType)({[gOs.Kind]:"String",type:"string"},t)}a(AOs,"String")});var K7=T(Wz=>{"use strict";f();var yOs=Wz&&Wz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),EOs=Wz&&Wz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yOs(e,t,r)};Object.defineProperty(Wz,"__esModule",{value:!0});EOs(RWn(),Wz)});var ztr=T(Wtr=>{"use strict";f();Object.defineProperty(Wtr,"__esModule",{value:!0});Wtr.TemplateLiteralSyntax=wOs;var IIe=lA(),_Os=SIe(),COs=Lle(),vOs=Y7(),bOs=K7(),TOs=Vd(),SOs=M0();function*IOs(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield(0,_Os.Boolean)():e==="number"?yield(0,vOs.Number)():e==="bigint"?yield(0,COs.BigInt)():e==="string"?yield(0,bOs.String)():yield(()=>{let r=e.split("|").map(n=>(0,IIe.Literal)(n.trim()));return r.length===0?(0,SOs.Never)():r.length===1?r[0]:(0,TOs.UnionEvaluated)(r)})()}a(IOs,"FromUnion");function*xOs(t){if(t[1]!=="{"){let e=(0,IIe.Literal)("$"),r=Vtr(t.slice(1));return yield*[e,...r]}for(let e=2;e{"use strict";f();Object.defineProperty(wIe,"__esModule",{value:!0});wIe.TemplateLiteralPatternError=void 0;wIe.TemplateLiteralPattern=DOs;var xIe=CIe(),ROs=nn(),POs=sd(),J7=Do(),rnt=class extends POs.TypeBoxError{static{a(this,"TemplateLiteralPatternError")}};wIe.TemplateLiteralPatternError=rnt;function kOs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(kOs,"Escape");function PWn(t,e){return(0,J7.IsTemplateLiteral)(t)?t.pattern.slice(1,t.pattern.length-1):(0,J7.IsUnion)(t)?`(${t.anyOf.map(r=>PWn(r,e)).join("|")})`:(0,J7.IsNumber)(t)?`${e}${xIe.PatternNumber}`:(0,J7.IsInteger)(t)?`${e}${xIe.PatternNumber}`:(0,J7.IsBigInt)(t)?`${e}${xIe.PatternNumber}`:(0,J7.IsString)(t)?`${e}${xIe.PatternString}`:(0,J7.IsLiteral)(t)?`${e}${kOs(t.const.toString())}`:(0,J7.IsBoolean)(t)?`${e}${xIe.PatternBoolean}`:(()=>{throw new rnt(`Unexpected Kind '${t[ROs.Kind]}'`)})()}a(PWn,"Visit");function DOs(t){return`^${t.map(e=>PWn(e,"")).join("")}$`}a(DOs,"TemplateLiteralPattern")});var kWn=T(Ktr=>{"use strict";f();Object.defineProperty(Ktr,"__esModule",{value:!0});Ktr.TemplateLiteralToUnion=BOs;var NOs=Vd(),MOs=lA(),OOs=Qtr();function BOs(t){let r=(0,OOs.TemplateLiteralGenerate)(t).map(n=>(0,MOs.Literal)(n));return(0,NOs.UnionEvaluated)(r)}a(BOs,"TemplateLiteralToUnion")});var NWn=T(Jtr=>{"use strict";f();Object.defineProperty(Jtr,"__esModule",{value:!0});Jtr.TemplateLiteral=qOs;var LOs=Xn(),FOs=ztr(),DWn=Ytr(),UOs=Ny(),QOs=nn();function qOs(t,e){let r=(0,UOs.IsString)(t)?(0,DWn.TemplateLiteralPattern)((0,FOs.TemplateLiteralSyntax)(t)):(0,DWn.TemplateLiteralPattern)(t);return(0,LOs.CreateType)({[QOs.Kind]:"TemplateLiteral",type:"string",pattern:r},e)}a(qOs,"TemplateLiteral")});var Xw=T(qv=>{"use strict";f();var GOs=qv&&qv.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zz=qv&&qv.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&GOs(e,t,r)};Object.defineProperty(qv,"__esModule",{value:!0});zz(Utr(),qv);zz(Qtr(),qv);zz(ztr(),qv);zz(Jrt(),qv);zz(Ytr(),qv);zz(kWn(),qv);zz(NWn(),qv)});var nnt=T(Xtr=>{"use strict";f();Object.defineProperty(Xtr,"__esModule",{value:!0});Xtr.IndexPropertyKeys=MWn;var HOs=Xw(),RIe=Do();function jOs(t){return(0,HOs.TemplateLiteralGenerate)(t).map(r=>r.toString())}a(jOs,"FromTemplateLiteral");function $Os(t){let e=[];for(let r of t)e.push(...MWn(r));return e}a($Os,"FromUnion");function VOs(t){return[t.toString()]}a(VOs,"FromLiteral");function MWn(t){return[...new Set((0,RIe.IsTemplateLiteral)(t)?jOs(t):(0,RIe.IsUnion)(t)?$Os(t.anyOf):(0,RIe.IsLiteral)(t)?VOs(t.const):(0,RIe.IsNumber)(t)?["[number]"]:(0,RIe.IsInteger)(t)?["[number]"]:[])]}a(MWn,"IndexPropertyKeys")});var trr=T(Ztr=>{"use strict";f();Object.defineProperty(Ztr,"__esModule",{value:!0});Ztr.IndexFromMappedResult=XOs;var WOs=O0(),zOs=nnt(),YOs=Zw();function KOs(t,e,r){let n={};for(let o of Object.getOwnPropertyNames(e))n[o]=(0,YOs.Index)(t,(0,zOs.IndexPropertyKeys)(e[o]),r);return n}a(KOs,"FromProperties");function JOs(t,e,r){return KOs(t,e.properties,r)}a(JOs,"FromMappedResult");function XOs(t,e,r){let n=JOs(t,e,r);return(0,WOs.MappedResult)(n)}a(XOs,"IndexFromMappedResult")});var ont=T(Fle=>{"use strict";f();Object.defineProperty(Fle,"__esModule",{value:!0});Fle.IndexFromPropertyKey=nrr;Fle.IndexFromPropertyKeys=FWn;Fle.IndexFromComputed=fBs;Fle.Index=pBs;var ZOs=Xn(),eBs=sd(),BWn=W7(),int=M0(),tBs=Gv(),rrr=Vd(),rBs=nnt(),nBs=irr(),iBs=trr(),Z_=Do();function LWn(t,e){return t.map(r=>nrr(r,e))}a(LWn,"FromRest");function oBs(t){return t.filter(e=>!(0,Z_.IsNever)(e))}a(oBs,"FromIntersectRest");function sBs(t,e){return(0,tBs.IntersectEvaluated)(oBs(LWn(t,e)))}a(sBs,"FromIntersect");function aBs(t){return t.some(e=>(0,Z_.IsNever)(e))?[]:t}a(aBs,"FromUnionRest");function cBs(t,e){return(0,rrr.UnionEvaluated)(aBs(LWn(t,e)))}a(cBs,"FromUnion");function lBs(t,e){return e in t?t[e]:e==="[number]"?(0,rrr.UnionEvaluated)(t):(0,int.Never)()}a(lBs,"FromTuple");function uBs(t,e){return e==="[number]"?t:(0,int.Never)()}a(uBs,"FromArray");function dBs(t,e){return e in t?t[e]:(0,int.Never)()}a(dBs,"FromProperty");function nrr(t,e){return(0,Z_.IsIntersect)(t)?sBs(t.allOf,e):(0,Z_.IsUnion)(t)?cBs(t.anyOf,e):(0,Z_.IsTuple)(t)?lBs(t.items??[],e):(0,Z_.IsArray)(t)?uBs(t.items,e):(0,Z_.IsObject)(t)?dBs(t.properties,e):(0,int.Never)()}a(nrr,"IndexFromPropertyKey");function FWn(t,e){return e.map(r=>nrr(t,r))}a(FWn,"IndexFromPropertyKeys");function OWn(t,e){return(0,rrr.UnionEvaluated)(FWn(t,e))}a(OWn,"FromSchema");function fBs(t,e){return(0,BWn.Computed)("Index",[t,e])}a(fBs,"IndexFromComputed");function pBs(t,e,r){if((0,Z_.IsRef)(t)||(0,Z_.IsRef)(e)){let n="Index types using Ref parameters require both Type and Key to be of TSchema";if(!(0,Z_.IsSchema)(t)||!(0,Z_.IsSchema)(e))throw new eBs.TypeBoxError(n);return(0,BWn.Computed)("Index",[t,e])}return(0,Z_.IsMappedResult)(e)?(0,iBs.IndexFromMappedResult)(t,e,r):(0,Z_.IsMappedKey)(e)?(0,nBs.IndexFromMappedKey)(t,e,r):(0,ZOs.CreateType)((0,Z_.IsSchema)(e)?OWn(t,(0,rBs.IndexPropertyKeys)(e)):OWn(t,e),r)}a(pBs,"Index")});var irr=T(orr=>{"use strict";f();Object.defineProperty(orr,"__esModule",{value:!0});orr.IndexFromMappedKey=_Bs;var hBs=ont(),mBs=O0(),gBs=K_();function ABs(t,e,r){return{[e]:(0,hBs.Index)(t,[e],(0,gBs.Clone)(r))}}a(ABs,"MappedIndexPropertyKey");function yBs(t,e,r){return e.reduce((n,o)=>({...n,...ABs(t,o,r)}),{})}a(yBs,"MappedIndexPropertyKeys");function EBs(t,e,r){return yBs(t,e.keys,r)}a(EBs,"MappedIndexProperties");function _Bs(t,e,r){let n=EBs(t,e,r);return(0,mBs.MappedResult)(n)}a(_Bs,"IndexFromMappedKey")});var Zw=T(AD=>{"use strict";f();var CBs=AD&&AD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),snt=AD&&AD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&CBs(e,t,r)};Object.defineProperty(AD,"__esModule",{value:!0});snt(irr(),AD);snt(trr(),AD);snt(nnt(),AD);snt(ont(),AD)});var UWn=T(srr=>{"use strict";f();Object.defineProperty(srr,"__esModule",{value:!0});srr.Iterator=TBs;var vBs=Xn(),bBs=nn();function TBs(t,e){return(0,vBs.CreateType)({[bBs.Kind]:"Iterator",type:"Iterator",items:t},e)}a(TBs,"Iterator")});var Ule=T(Yz=>{"use strict";f();var SBs=Yz&&Yz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),IBs=Yz&&Yz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&SBs(e,t,r)};Object.defineProperty(Yz,"__esModule",{value:!0});IBs(UWn(),Yz)});var qWn=T(ant=>{"use strict";f();Object.defineProperty(ant,"__esModule",{value:!0});ant.Object=void 0;var xBs=Xn(),QWn=nn(),wBs=Do();function RBs(t){let e=[];for(let r in t)(0,wBs.IsOptional)(t[r])||e.push(r);return e}a(RBs,"RequiredKeys");function PBs(t,e){let r=RBs(t),n=r.length>0?{[QWn.Kind]:"Object",type:"object",properties:t,required:r}:{[QWn.Kind]:"Object",type:"object",properties:t};return(0,xBs.CreateType)(n,e)}a(PBs,"_Object");ant.Object=PBs});var My=T(Kz=>{"use strict";f();var kBs=Kz&&Kz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),DBs=Kz&&Kz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kBs(e,t,r)};Object.defineProperty(Kz,"__esModule",{value:!0});DBs(qWn(),Kz)});var GWn=T(arr=>{"use strict";f();Object.defineProperty(arr,"__esModule",{value:!0});arr.Promise=OBs;var NBs=Xn(),MBs=nn();function OBs(t,e){return(0,NBs.CreateType)({[MBs.Kind]:"Promise",type:"Promise",item:t},e)}a(OBs,"Promise")});var PIe=T(Jz=>{"use strict";f();var BBs=Jz&&Jz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LBs=Jz&&Jz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BBs(e,t,r)};Object.defineProperty(Jz,"__esModule",{value:!0});LBs(GWn(),Jz)});var lrr=T(crr=>{"use strict";f();Object.defineProperty(crr,"__esModule",{value:!0});crr.Readonly=jBs;var HWn=Xn(),jWn=nn(),FBs=ZO(),UBs=urr(),QBs=Do();function qBs(t){return(0,HWn.CreateType)((0,FBs.Discard)(t,[jWn.ReadonlyKind]))}a(qBs,"RemoveReadonly");function GBs(t){return(0,HWn.CreateType)({...t,[jWn.ReadonlyKind]:"Readonly"})}a(GBs,"AddReadonly");function HBs(t,e){return e===!1?qBs(t):GBs(t)}a(HBs,"ReadonlyWithFlag");function jBs(t,e){let r=e??!0;return(0,QBs.IsMappedResult)(t)?(0,UBs.ReadonlyFromMappedResult)(t,r):HBs(t,r)}a(jBs,"Readonly")});var urr=T(drr=>{"use strict";f();Object.defineProperty(drr,"__esModule",{value:!0});drr.ReadonlyFromMappedResult=YBs;var $Bs=O0(),VBs=lrr();function WBs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,VBs.Readonly)(t[n],e);return r}a(WBs,"FromProperties");function zBs(t,e){return WBs(t.properties,e)}a(zBs,"FromMappedResult");function YBs(t,e){let r=zBs(t,e);return(0,$Bs.MappedResult)(r)}a(YBs,"ReadonlyFromMappedResult")});var Z7=T(X7=>{"use strict";f();var KBs=X7&&X7.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$Wn=X7&&X7.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&KBs(e,t,r)};Object.defineProperty(X7,"__esModule",{value:!0});$Wn(urr(),X7);$Wn(lrr(),X7)});var WWn=T(frr=>{"use strict";f();Object.defineProperty(frr,"__esModule",{value:!0});frr.Tuple=XBs;var JBs=Xn(),VWn=nn();function XBs(t,e){return(0,JBs.CreateType)(t.length>0?{[VWn.Kind]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[VWn.Kind]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}a(XBs,"Tuple")});var rB=T(Xz=>{"use strict";f();var ZBs=Xz&&Xz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),e3s=Xz&&Xz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZBs(e,t,r)};Object.defineProperty(Xz,"__esModule",{value:!0});e3s(WWn(),Xz)});var ZWn=T(cnt=>{"use strict";f();Object.defineProperty(cnt,"__esModule",{value:!0});cnt.MappedFunctionReturnType=XWn;cnt.Mapped=_3s;var prr=nn(),zWn=ZO(),t3s=kle(),r3s=Dle(),n3s=Nle(),i3s=z7(),o3s=Zw(),s3s=Gv(),a3s=Ule(),YWn=lA(),KWn=My(),c3s=gD(),l3s=PIe(),u3s=Z7(),d3s=rB(),f3s=Vd(),p3s=vIe(),h3s=Ptr(),Oy=Do();function JWn(t,e){return t in e?US(t,e[t]):(0,h3s.MappedResult)(e)}a(JWn,"FromMappedResult");function m3s(t){return{[t]:(0,YWn.Literal)(t)}}a(m3s,"MappedKeyToKnownMappedResultProperties");function g3s(t){let e={};for(let r of t)e[r]=(0,YWn.Literal)(r);return e}a(g3s,"MappedKeyToUnknownMappedResultProperties");function A3s(t,e){return(0,p3s.SetIncludes)(e,t)?m3s(t):g3s(e)}a(A3s,"MappedKeyToMappedResultProperties");function y3s(t,e){let r=A3s(t,e);return JWn(t,r)}a(y3s,"FromMappedKey");function kIe(t,e){return e.map(r=>US(t,r))}a(kIe,"FromRest");function E3s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=US(t,e[n]);return r}a(E3s,"FromProperties");function US(t,e){let r={...e};return(0,Oy.IsOptional)(e)?(0,c3s.Optional)(US(t,(0,zWn.Discard)(e,[prr.OptionalKind]))):(0,Oy.IsReadonly)(e)?(0,u3s.Readonly)(US(t,(0,zWn.Discard)(e,[prr.ReadonlyKind]))):(0,Oy.IsMappedResult)(e)?JWn(t,e.properties):(0,Oy.IsMappedKey)(e)?y3s(t,e.keys):(0,Oy.IsConstructor)(e)?(0,n3s.Constructor)(kIe(t,e.parameters),US(t,e.returns),r):(0,Oy.IsFunction)(e)?(0,i3s.Function)(kIe(t,e.parameters),US(t,e.returns),r):(0,Oy.IsAsyncIterator)(e)?(0,r3s.AsyncIterator)(US(t,e.items),r):(0,Oy.IsIterator)(e)?(0,a3s.Iterator)(US(t,e.items),r):(0,Oy.IsIntersect)(e)?(0,s3s.Intersect)(kIe(t,e.allOf),r):(0,Oy.IsUnion)(e)?(0,f3s.Union)(kIe(t,e.anyOf),r):(0,Oy.IsTuple)(e)?(0,d3s.Tuple)(kIe(t,e.items??[]),r):(0,Oy.IsObject)(e)?(0,KWn.Object)(E3s(t,e.properties),r):(0,Oy.IsArray)(e)?(0,t3s.Array)(US(t,e.items),r):(0,Oy.IsPromise)(e)?(0,l3s.Promise)(US(t,e.item),r):e}a(US,"FromSchemaType");function XWn(t,e){let r={};for(let n of t)r[n]=US(n,e);return r}a(XWn,"MappedFunctionReturnType");function _3s(t,e,r){let n=(0,Oy.IsSchema)(t)?(0,o3s.IndexPropertyKeys)(t):t,o=e({[prr.Kind]:"MappedKey",keys:n}),s=XWn(n,o);return(0,KWn.Object)(s,r)}a(_3s,"Mapped")});var O0=T(nB=>{"use strict";f();var C3s=nB&&nB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hrr=nB&&nB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&C3s(e,t,r)};Object.defineProperty(nB,"__esModule",{value:!0});hrr(pWn(),nB);hrr(Ptr(),nB);hrr(ZWn(),nB)});var grr=T(mrr=>{"use strict";f();Object.defineProperty(mrr,"__esModule",{value:!0});mrr.Optional=w3s;var ezn=Xn(),tzn=nn(),v3s=ZO(),b3s=Arr(),T3s=Do();function S3s(t){return(0,ezn.CreateType)((0,v3s.Discard)(t,[tzn.OptionalKind]))}a(S3s,"RemoveOptional");function I3s(t){return(0,ezn.CreateType)({...t,[tzn.OptionalKind]:"Optional"})}a(I3s,"AddOptional");function x3s(t,e){return e===!1?S3s(t):I3s(t)}a(x3s,"OptionalWithFlag");function w3s(t,e){let r=e??!0;return(0,T3s.IsMappedResult)(t)?(0,b3s.OptionalFromMappedResult)(t,r):x3s(t,r)}a(w3s,"Optional")});var Arr=T(yrr=>{"use strict";f();Object.defineProperty(yrr,"__esModule",{value:!0});yrr.OptionalFromMappedResult=N3s;var R3s=O0(),P3s=grr();function k3s(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,P3s.Optional)(t[n],e);return r}a(k3s,"FromProperties");function D3s(t,e){return k3s(t.properties,e)}a(D3s,"FromMappedResult");function N3s(t,e){let r=D3s(t,e);return(0,R3s.MappedResult)(r)}a(N3s,"OptionalFromMappedResult")});var gD=T(eU=>{"use strict";f();var M3s=eU&&eU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rzn=eU&&eU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&M3s(e,t,r)};Object.defineProperty(eU,"__esModule",{value:!0});rzn(Arr(),eU);rzn(grr(),eU)});var Crr=T(_rr=>{"use strict";f();Object.defineProperty(_rr,"__esModule",{value:!0});_rr.IntersectCreate=B3s;var O3s=Xn(),nzn=nn(),Err=Do();function B3s(t,e={}){let r=t.every(o=>(0,Err.IsObject)(o)),n=(0,Err.IsSchema)(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return(0,O3s.CreateType)(e.unevaluatedProperties===!1||(0,Err.IsSchema)(e.unevaluatedProperties)||r?{...n,[nzn.Kind]:"Intersect",type:"object",allOf:t}:{...n,[nzn.Kind]:"Intersect",allOf:t},e)}a(B3s,"IntersectCreate")});var szn=T(brr=>{"use strict";f();Object.defineProperty(brr,"__esModule",{value:!0});brr.IntersectEvaluated=$3s;var L3s=nn(),F3s=Xn(),U3s=ZO(),Q3s=M0(),q3s=gD(),izn=Crr(),vrr=Do();function G3s(t){return t.every(e=>(0,vrr.IsOptional)(e))}a(G3s,"IsIntersectOptional");function H3s(t){return(0,U3s.Discard)(t,[L3s.OptionalKind])}a(H3s,"RemoveOptionalFromType");function ozn(t){return t.map(e=>(0,vrr.IsOptional)(e)?H3s(e):e)}a(ozn,"RemoveOptionalFromRest");function j3s(t,e){return G3s(t)?(0,q3s.Optional)((0,izn.IntersectCreate)(ozn(t),e)):(0,izn.IntersectCreate)(ozn(t),e)}a(j3s,"ResolveIntersect");function $3s(t,e={}){if(t.length===1)return(0,F3s.CreateType)(t[0],e);if(t.length===0)return(0,Q3s.Never)(e);if(t.some(r=>(0,vrr.IsTransform)(r)))throw new Error("Cannot intersect transform types");return j3s(t,e)}a($3s,"IntersectEvaluated")});var czn=T(azn=>{"use strict";f();Object.defineProperty(azn,"__esModule",{value:!0});var h8d=nn()});var lzn=T(Trr=>{"use strict";f();Object.defineProperty(Trr,"__esModule",{value:!0});Trr.Intersect=K3s;var V3s=Xn(),W3s=M0(),z3s=Crr(),Y3s=Do();function K3s(t,e){if(t.length===1)return(0,V3s.CreateType)(t[0],e);if(t.length===0)return(0,W3s.Never)(e);if(t.some(r=>(0,Y3s.IsTransform)(r)))throw new Error("Cannot intersect transform types");return(0,z3s.IntersectCreate)(t,e)}a(K3s,"Intersect")});var Gv=T(iB=>{"use strict";f();var J3s=iB&&iB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Srr=iB&&iB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&J3s(e,t,r)};Object.defineProperty(iB,"__esModule",{value:!0});Srr(szn(),iB);Srr(czn(),iB);Srr(lzn(),iB)});var uzn=T(Irr=>{"use strict";f();Object.defineProperty(Irr,"__esModule",{value:!0});Irr.Ref=tLs;var X3s=sd(),Z3s=Xn(),eLs=nn();function tLs(...t){let[e,r]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new X3s.TypeBoxError("Ref: $ref must be a string");return(0,Z3s.CreateType)({[eLs.Kind]:"Ref",$ref:e},r)}a(tLs,"Ref")});var tU=T(Zz=>{"use strict";f();var rLs=Zz&&Zz.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nLs=Zz&&Zz.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rLs(e,t,r)};Object.defineProperty(Zz,"__esModule",{value:!0});nLs(uzn(),Zz)});var fzn=T(Rrr=>{"use strict";f();Object.defineProperty(Rrr,"__esModule",{value:!0});Rrr.Awaited=wrr;var iLs=Xn(),xrr=W7(),oLs=Gv(),sLs=Vd(),aLs=tU(),DIe=Do();function cLs(t,e){return(0,xrr.Computed)("Awaited",[(0,xrr.Computed)(t,e)])}a(cLs,"FromComputed");function lLs(t){return(0,xrr.Computed)("Awaited",[(0,aLs.Ref)(t)])}a(lLs,"FromRef");function uLs(t){return(0,oLs.Intersect)(dzn(t))}a(uLs,"FromIntersect");function dLs(t){return(0,sLs.Union)(dzn(t))}a(dLs,"FromUnion");function fLs(t){return wrr(t)}a(fLs,"FromPromise");function dzn(t){return t.map(e=>wrr(e))}a(dzn,"FromRest");function wrr(t,e){return(0,iLs.CreateType)((0,DIe.IsComputed)(t)?cLs(t.target,t.parameters):(0,DIe.IsIntersect)(t)?uLs(t.allOf):(0,DIe.IsUnion)(t)?dLs(t.anyOf):(0,DIe.IsPromise)(t)?fLs(t.item):(0,DIe.IsRef)(t)?lLs(t.$ref):t,e)}a(wrr,"Awaited")});var NIe=T(eY=>{"use strict";f();var pLs=eY&&eY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hLs=eY&&eY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pLs(e,t,r)};Object.defineProperty(eY,"__esModule",{value:!0});hLs(fzn(),eY)});var unt=T(lnt=>{"use strict";f();Object.defineProperty(lnt,"__esModule",{value:!0});lnt.KeyOfPropertyKeys=krr;lnt.KeyOfPattern=CLs;var pzn=vIe(),Qle=Do();function hzn(t){let e=[];for(let r of t)e.push(krr(r));return e}a(hzn,"FromRest");function mLs(t){let e=hzn(t);return(0,pzn.SetUnionMany)(e)}a(mLs,"FromIntersect");function gLs(t){let e=hzn(t);return(0,pzn.SetIntersectMany)(e)}a(gLs,"FromUnion");function ALs(t){return t.map((e,r)=>r.toString())}a(ALs,"FromTuple");function yLs(t){return["[number]"]}a(yLs,"FromArray");function ELs(t){return globalThis.Object.getOwnPropertyNames(t)}a(ELs,"FromProperties");function _Ls(t){return Prr?globalThis.Object.getOwnPropertyNames(t).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}a(_Ls,"FromPatternProperties");function krr(t){return(0,Qle.IsIntersect)(t)?mLs(t.allOf):(0,Qle.IsUnion)(t)?gLs(t.anyOf):(0,Qle.IsTuple)(t)?ALs(t.items??[]):(0,Qle.IsArray)(t)?yLs(t.items):(0,Qle.IsObject)(t)?ELs(t.properties):(0,Qle.IsRecord)(t)?_Ls(t.patternProperties):[]}a(krr,"KeyOfPropertyKeys");var Prr=!1;function CLs(t){Prr=!0;let e=krr(t);return Prr=!1,`^(${e.map(n=>`(${n})`).join("|")})$`}a(CLs,"KeyOfPattern")});var Mrr=T(dnt=>{"use strict";f();Object.defineProperty(dnt,"__esModule",{value:!0});dnt.KeyOfPropertyKeysToRest=mzn;dnt.KeyOf=DLs;var vLs=Xn(),bLs=lA(),TLs=Y7(),Nrr=W7(),SLs=tU(),ILs=unt(),xLs=Vd(),wLs=Orr(),Drr=Do();function RLs(t,e){return(0,Nrr.Computed)("KeyOf",[(0,Nrr.Computed)(t,e)])}a(RLs,"FromComputed");function PLs(t){return(0,Nrr.Computed)("KeyOf",[(0,SLs.Ref)(t)])}a(PLs,"FromRef");function kLs(t,e){let r=(0,ILs.KeyOfPropertyKeys)(t),n=mzn(r),o=(0,xLs.UnionEvaluated)(n);return(0,vLs.CreateType)(o,e)}a(kLs,"KeyOfFromType");function mzn(t){return t.map(e=>e==="[number]"?(0,TLs.Number)():(0,bLs.Literal)(e))}a(mzn,"KeyOfPropertyKeysToRest");function DLs(t,e){return(0,Drr.IsComputed)(t)?RLs(t.target,t.parameters):(0,Drr.IsRef)(t)?PLs(t.$ref):(0,Drr.IsMappedResult)(t)?(0,wLs.KeyOfFromMappedResult)(t,e):kLs(t,e)}a(DLs,"KeyOf")});var Orr=T(Brr=>{"use strict";f();Object.defineProperty(Brr,"__esModule",{value:!0});Brr.KeyOfFromMappedResult=FLs;var NLs=O0(),MLs=Mrr(),OLs=K_();function BLs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,MLs.KeyOf)(t[n],(0,OLs.Clone)(e));return r}a(BLs,"FromProperties");function LLs(t,e){return BLs(t.properties,e)}a(LLs,"FromMappedResult");function FLs(t,e){let r=LLs(t,e);return(0,NLs.MappedResult)(r)}a(FLs,"KeyOfFromMappedResult")});var gzn=T(Lrr=>{"use strict";f();Object.defineProperty(Lrr,"__esModule",{value:!0});Lrr.KeyOfPropertyEntries=qLs;var ULs=ont(),QLs=unt();function qLs(t){let e=(0,QLs.KeyOfPropertyKeys)(t),r=(0,ULs.IndexFromPropertyKeys)(t,e);return e.map((n,o)=>[e[o],r[o]])}a(qLs,"KeyOfPropertyEntries")});var eR=T(yD=>{"use strict";f();var GLs=yD&&yD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fnt=yD&&yD.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&GLs(e,t,r)};Object.defineProperty(yD,"__esModule",{value:!0});fnt(Orr(),yD);fnt(gzn(),yD);fnt(unt(),yD);fnt(Mrr(),yD)});var Azn=T(Frr=>{"use strict";f();Object.defineProperty(Frr,"__esModule",{value:!0});Frr.Composite=ZLs;var HLs=Gv(),jLs=Zw(),$Ls=eR(),VLs=My(),WLs=vIe(),zLs=Do();function YLs(t){let e=[];for(let r of t)e.push(...(0,$Ls.KeyOfPropertyKeys)(r));return(0,WLs.SetDistinct)(e)}a(YLs,"CompositeKeys");function KLs(t){return t.filter(e=>!(0,zLs.IsNever)(e))}a(KLs,"FilterNever");function JLs(t,e){let r=[];for(let n of t)r.push(...(0,jLs.IndexFromPropertyKeys)(n,[e]));return KLs(r)}a(JLs,"CompositeProperty");function XLs(t,e){let r={};for(let n of e)r[n]=(0,HLs.IntersectEvaluated)(JLs(t,n));return r}a(XLs,"CompositeProperties");function ZLs(t,e){let r=YLs(t),n=XLs(t,r);return(0,VLs.Object)(n,e)}a(ZLs,"Composite")});var pnt=T(tY=>{"use strict";f();var e8s=tY&&tY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),t8s=tY&&tY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&e8s(e,t,r)};Object.defineProperty(tY,"__esModule",{value:!0});t8s(Azn(),tY)});var yzn=T(Urr=>{"use strict";f();Object.defineProperty(Urr,"__esModule",{value:!0});Urr.Date=i8s;var r8s=nn(),n8s=Xn();function i8s(t){return(0,n8s.CreateType)({[r8s.Kind]:"Date",type:"Date"},t)}a(i8s,"Date")});var MIe=T(rY=>{"use strict";f();var o8s=rY&&rY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),s8s=rY&&rY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&o8s(e,t,r)};Object.defineProperty(rY,"__esModule",{value:!0});s8s(yzn(),rY)});var Ezn=T(Qrr=>{"use strict";f();Object.defineProperty(Qrr,"__esModule",{value:!0});Qrr.Null=l8s;var a8s=Xn(),c8s=nn();function l8s(t){return(0,a8s.CreateType)({[c8s.Kind]:"Null",type:"null"},t)}a(l8s,"Null")});var OIe=T(nY=>{"use strict";f();var u8s=nY&&nY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),d8s=nY&&nY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&u8s(e,t,r)};Object.defineProperty(nY,"__esModule",{value:!0});d8s(Ezn(),nY)});var _zn=T(qrr=>{"use strict";f();Object.defineProperty(qrr,"__esModule",{value:!0});qrr.Symbol=h8s;var f8s=Xn(),p8s=nn();function h8s(t){return(0,f8s.CreateType)({[p8s.Kind]:"Symbol",type:"symbol"},t)}a(h8s,"Symbol")});var BIe=T(iY=>{"use strict";f();var m8s=iY&&iY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),g8s=iY&&iY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&m8s(e,t,r)};Object.defineProperty(iY,"__esModule",{value:!0});g8s(_zn(),iY)});var Czn=T(Grr=>{"use strict";f();Object.defineProperty(Grr,"__esModule",{value:!0});Grr.Undefined=E8s;var A8s=Xn(),y8s=nn();function E8s(t){return(0,A8s.CreateType)({[y8s.Kind]:"Undefined",type:"undefined"},t)}a(E8s,"Undefined")});var LIe=T(oY=>{"use strict";f();var _8s=oY&&oY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),C8s=oY&&oY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_8s(e,t,r)};Object.defineProperty(oY,"__esModule",{value:!0});C8s(Czn(),oY)});var vzn=T(Hrr=>{"use strict";f();Object.defineProperty(Hrr,"__esModule",{value:!0});Hrr.Uint8Array=T8s;var v8s=Xn(),b8s=nn();function T8s(t){return(0,v8s.CreateType)({[b8s.Kind]:"Uint8Array",type:"Uint8Array"},t)}a(T8s,"Uint8Array")});var FIe=T(sY=>{"use strict";f();var S8s=sY&&sY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),I8s=sY&&sY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&S8s(e,t,r)};Object.defineProperty(sY,"__esModule",{value:!0});I8s(vzn(),sY)});var bzn=T(jrr=>{"use strict";f();Object.defineProperty(jrr,"__esModule",{value:!0});jrr.Unknown=R8s;var x8s=Xn(),w8s=nn();function R8s(t){return(0,x8s.CreateType)({[w8s.Kind]:"Unknown"},t)}a(R8s,"Unknown")});var rU=T(aY=>{"use strict";f();var P8s=aY&&aY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),k8s=aY&&aY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&P8s(e,t,r)};Object.defineProperty(aY,"__esModule",{value:!0});k8s(bzn(),aY)});var Izn=T(zrr=>{"use strict";f();Object.defineProperty(zrr,"__esModule",{value:!0});zrr.Const=j8s;var Tzn=Ple(),D8s=Lle(),N8s=MIe(),M8s=z7(),$rr=lA(),O8s=OIe(),Szn=My(),B8s=BIe(),L8s=rB(),Vrr=Z7(),F8s=LIe(),U8s=FIe(),Q8s=rU(),q8s=JO(),eC=Ny();function G8s(t){return t.map(e=>Wrr(e,!1))}a(G8s,"FromArray");function H8s(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=(0,Vrr.Readonly)(Wrr(t[r],!1));return e}a(H8s,"FromProperties");function hnt(t,e){return e===!0?t:(0,Vrr.Readonly)(t)}a(hnt,"ConditionalReadonly");function Wrr(t,e){return(0,eC.IsAsyncIterator)(t)||(0,eC.IsIterator)(t)?hnt((0,Tzn.Any)(),e):(0,eC.IsArray)(t)?(0,Vrr.Readonly)((0,L8s.Tuple)(G8s(t))):(0,eC.IsUint8Array)(t)?(0,U8s.Uint8Array)():(0,eC.IsDate)(t)?(0,N8s.Date)():(0,eC.IsObject)(t)?hnt((0,Szn.Object)(H8s(t)),e):(0,eC.IsFunction)(t)?hnt((0,M8s.Function)([],(0,Q8s.Unknown)()),e):(0,eC.IsUndefined)(t)?(0,F8s.Undefined)():(0,eC.IsNull)(t)?(0,O8s.Null)():(0,eC.IsSymbol)(t)?(0,B8s.Symbol)():(0,eC.IsBigInt)(t)?(0,D8s.BigInt)():(0,eC.IsNumber)(t)||(0,eC.IsBoolean)(t)||(0,eC.IsString)(t)?(0,$rr.Literal)(t):(0,Szn.Object)({})}a(Wrr,"FromValue");function j8s(t,e){return(0,q8s.CreateType)(Wrr(t,!0),e)}a(j8s,"Const")});var mnt=T(cY=>{"use strict";f();var $8s=cY&&cY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),V8s=cY&&cY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$8s(e,t,r)};Object.defineProperty(cY,"__esModule",{value:!0});V8s(Izn(),cY)});var xzn=T(oB=>{"use strict";f();var W8s=oB&&oB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),z8s=oB&&oB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Y8s=oB&&oB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var e6s=lY&&lY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),t6s=lY&&lY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&e6s(e,t,r)};Object.defineProperty(lY,"__esModule",{value:!0});t6s(xzn(),lY)});var wzn=T(Yrr=>{"use strict";f();Object.defineProperty(Yrr,"__esModule",{value:!0});Yrr.Enum=s6s;var r6s=lA(),n6s=nn(),i6s=Vd(),o6s=Ny();function s6s(t,e){if((0,o6s.IsUndefined)(t))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]),o=[...new Set(r)].map(s=>(0,r6s.Literal)(s));return(0,i6s.Union)(o,{...e,[n6s.Hint]:"Enum"})}a(s6s,"Enum")});var Ant=T(uY=>{"use strict";f();var a6s=uY&&uY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),c6s=uY&&uY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&a6s(e,t,r)};Object.defineProperty(uY,"__esModule",{value:!0});c6s(wzn(),uY)});var nnr=T(dY=>{"use strict";f();Object.defineProperty(dY,"__esModule",{value:!0});dY.ExtendsResult=dY.ExtendsResolverError=void 0;dY.ExtendsCheck=J6s;var Rzn=Ple(),l6s=z7(),enr=Y7(),Jrr=K7(),u6s=rU(),Pzn=Xw(),qle=CIe(),Ozn=nn(),d6s=sd(),Fe=Etr(),ynt=class extends d6s.TypeBoxError{static{a(this,"ExtendsResolverError")}};dY.ExtendsResolverError=ynt;var Tt;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(Tt||(dY.ExtendsResult=Tt={}));function QS(t){return t===Tt.False?t:Tt.True}a(QS,"IntoBooleanResult");function Gle(t){throw new ynt(t)}a(Gle,"Throw");function B0(t){return Fe.TypeGuard.IsNever(t)||Fe.TypeGuard.IsIntersect(t)||Fe.TypeGuard.IsUnion(t)||Fe.TypeGuard.IsUnknown(t)||Fe.TypeGuard.IsAny(t)}a(B0,"IsStructuralRight");function L0(t,e){return Fe.TypeGuard.IsNever(e)?Fzn(t,e):Fe.TypeGuard.IsIntersect(e)?Ent(t,e):Fe.TypeGuard.IsUnion(e)?rnr(t,e):Fe.TypeGuard.IsUnknown(e)?Gzn(t,e):Fe.TypeGuard.IsAny(e)?tnr(t,e):Gle("StructuralRight")}a(L0,"StructuralRight");function tnr(t,e){return Tt.True}a(tnr,"FromAnyRight");function f6s(t,e){return Fe.TypeGuard.IsIntersect(e)?Ent(t,e):Fe.TypeGuard.IsUnion(e)&&e.anyOf.some(r=>Fe.TypeGuard.IsAny(r)||Fe.TypeGuard.IsUnknown(r))?Tt.True:Fe.TypeGuard.IsUnion(e)?Tt.Union:Fe.TypeGuard.IsUnknown(e)||Fe.TypeGuard.IsAny(e)?Tt.True:Tt.Union}a(f6s,"FromAny");function p6s(t,e){return Fe.TypeGuard.IsUnknown(t)?Tt.False:Fe.TypeGuard.IsAny(t)?Tt.Union:Fe.TypeGuard.IsNever(t)?Tt.True:Tt.False}a(p6s,"FromArrayRight");function h6s(t,e){return Fe.TypeGuard.IsObject(e)&&_nt(e)?Tt.True:B0(e)?L0(t,e):Fe.TypeGuard.IsArray(e)?QS(lc(t.items,e.items)):Tt.False}a(h6s,"FromArray");function m6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsAsyncIterator(e)?QS(lc(t.items,e.items)):Tt.False}a(m6s,"FromAsyncIterator");function g6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsBigInt(e)?Tt.True:Tt.False}a(g6s,"FromBigInt");function Bzn(t,e){return Fe.TypeGuard.IsLiteralBoolean(t)||Fe.TypeGuard.IsBoolean(t)?Tt.True:Tt.False}a(Bzn,"FromBooleanRight");function A6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsBoolean(e)?Tt.True:Tt.False}a(A6s,"FromBoolean");function y6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsConstructor(e)?t.parameters.length>e.parameters.length?Tt.False:t.parameters.every((r,n)=>QS(lc(e.parameters[n],r))===Tt.True)?QS(lc(t.returns,e.returns)):Tt.False:Tt.False}a(y6s,"FromConstructor");function E6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsDate(e)?Tt.True:Tt.False}a(E6s,"FromDate");function _6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsFunction(e)?t.parameters.length>e.parameters.length?Tt.False:t.parameters.every((r,n)=>QS(lc(e.parameters[n],r))===Tt.True)?QS(lc(t.returns,e.returns)):Tt.False:Tt.False}a(_6s,"FromFunction");function Lzn(t,e){return Fe.TypeGuard.IsLiteral(t)&&Fe.ValueGuard.IsNumber(t.const)||Fe.TypeGuard.IsNumber(t)||Fe.TypeGuard.IsInteger(t)?Tt.True:Tt.False}a(Lzn,"FromIntegerRight");function C6s(t,e){return Fe.TypeGuard.IsInteger(e)||Fe.TypeGuard.IsNumber(e)?Tt.True:B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Tt.False}a(C6s,"FromInteger");function Ent(t,e){return e.allOf.every(r=>lc(t,r)===Tt.True)?Tt.True:Tt.False}a(Ent,"FromIntersectRight");function v6s(t,e){return t.allOf.some(r=>lc(r,e)===Tt.True)?Tt.True:Tt.False}a(v6s,"FromIntersect");function b6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsIterator(e)?QS(lc(t.items,e.items)):Tt.False}a(b6s,"FromIterator");function T6s(t,e){return Fe.TypeGuard.IsLiteral(e)&&e.const===t.const?Tt.True:B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsString(e)?qzn(t,e):Fe.TypeGuard.IsNumber(e)?Uzn(t,e):Fe.TypeGuard.IsInteger(e)?Lzn(t,e):Fe.TypeGuard.IsBoolean(e)?Bzn(t,e):Tt.False}a(T6s,"FromLiteral");function Fzn(t,e){return Tt.False}a(Fzn,"FromNeverRight");function S6s(t,e){return Tt.True}a(S6s,"FromNever");function kzn(t){let[e,r]=[t,0];for(;Fe.TypeGuard.IsNot(e);)e=e.not,r+=1;return r%2===0?e:(0,u6s.Unknown)()}a(kzn,"UnwrapTNot");function I6s(t,e){return Fe.TypeGuard.IsNot(t)?lc(kzn(t),e):Fe.TypeGuard.IsNot(e)?lc(t,kzn(e)):Gle("Invalid fallthrough for Not")}a(I6s,"FromNot");function x6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsNull(e)?Tt.True:Tt.False}a(x6s,"FromNull");function Uzn(t,e){return Fe.TypeGuard.IsLiteralNumber(t)||Fe.TypeGuard.IsNumber(t)||Fe.TypeGuard.IsInteger(t)?Tt.True:Tt.False}a(Uzn,"FromNumberRight");function w6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsInteger(e)||Fe.TypeGuard.IsNumber(e)?Tt.True:Tt.False}a(w6s,"FromNumber");function tC(t,e){return Object.getOwnPropertyNames(t.properties).length===e}a(tC,"IsObjectPropertyCount");function Dzn(t){return _nt(t)}a(Dzn,"IsObjectStringLike");function Nzn(t){return tC(t,0)||tC(t,1)&&"description"in t.properties&&Fe.TypeGuard.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(Fe.TypeGuard.IsString(t.properties.description.anyOf[0])&&Fe.TypeGuard.IsUndefined(t.properties.description.anyOf[1])||Fe.TypeGuard.IsString(t.properties.description.anyOf[1])&&Fe.TypeGuard.IsUndefined(t.properties.description.anyOf[0]))}a(Nzn,"IsObjectSymbolLike");function Krr(t){return tC(t,0)}a(Krr,"IsObjectNumberLike");function Mzn(t){return tC(t,0)}a(Mzn,"IsObjectBooleanLike");function R6s(t){return tC(t,0)}a(R6s,"IsObjectBigIntLike");function P6s(t){return tC(t,0)}a(P6s,"IsObjectDateLike");function k6s(t){return _nt(t)}a(k6s,"IsObjectUint8ArrayLike");function D6s(t){let e=(0,enr.Number)();return tC(t,0)||tC(t,1)&&"length"in t.properties&&QS(lc(t.properties.length,e))===Tt.True}a(D6s,"IsObjectFunctionLike");function N6s(t){return tC(t,0)}a(N6s,"IsObjectConstructorLike");function _nt(t){let e=(0,enr.Number)();return tC(t,0)||tC(t,1)&&"length"in t.properties&&QS(lc(t.properties.length,e))===Tt.True}a(_nt,"IsObjectArrayLike");function M6s(t){let e=(0,l6s.Function)([(0,Rzn.Any)()],(0,Rzn.Any)());return tC(t,0)||tC(t,1)&&"then"in t.properties&&QS(lc(t.properties.then,e))===Tt.True}a(M6s,"IsObjectPromiseLike");function Qzn(t,e){return lc(t,e)===Tt.False||Fe.TypeGuard.IsOptional(t)&&!Fe.TypeGuard.IsOptional(e)?Tt.False:Tt.True}a(Qzn,"Property");function uA(t,e){return Fe.TypeGuard.IsUnknown(t)?Tt.False:Fe.TypeGuard.IsAny(t)?Tt.Union:Fe.TypeGuard.IsNever(t)||Fe.TypeGuard.IsLiteralString(t)&&Dzn(e)||Fe.TypeGuard.IsLiteralNumber(t)&&Krr(e)||Fe.TypeGuard.IsLiteralBoolean(t)&&Mzn(e)||Fe.TypeGuard.IsSymbol(t)&&Nzn(e)||Fe.TypeGuard.IsBigInt(t)&&R6s(e)||Fe.TypeGuard.IsString(t)&&Dzn(e)||Fe.TypeGuard.IsSymbol(t)&&Nzn(e)||Fe.TypeGuard.IsNumber(t)&&Krr(e)||Fe.TypeGuard.IsInteger(t)&&Krr(e)||Fe.TypeGuard.IsBoolean(t)&&Mzn(e)||Fe.TypeGuard.IsUint8Array(t)&&k6s(e)||Fe.TypeGuard.IsDate(t)&&P6s(e)||Fe.TypeGuard.IsConstructor(t)&&N6s(e)||Fe.TypeGuard.IsFunction(t)&&D6s(e)?Tt.True:Fe.TypeGuard.IsRecord(t)&&Fe.TypeGuard.IsString(Xrr(t))?e[Ozn.Hint]==="Record"?Tt.True:Tt.False:Fe.TypeGuard.IsRecord(t)&&Fe.TypeGuard.IsNumber(Xrr(t))&&tC(e,0)?Tt.True:Tt.False}a(uA,"FromObjectRight");function O6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsObject(e)?(()=>{for(let r of Object.getOwnPropertyNames(e.properties)){if(!(r in t.properties)&&!Fe.TypeGuard.IsOptional(e.properties[r]))return Tt.False;if(Fe.TypeGuard.IsOptional(e.properties[r]))return Tt.True;if(Qzn(t.properties[r],e.properties[r])===Tt.False)return Tt.False}return Tt.True})():Tt.False}a(O6s,"FromObject");function B6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)&&M6s(e)?Tt.True:Fe.TypeGuard.IsPromise(e)?QS(lc(t.item,e.item)):Tt.False}a(B6s,"FromPromise");function Xrr(t){return qle.PatternNumberExact in t.patternProperties?(0,enr.Number)():qle.PatternStringExact in t.patternProperties?(0,Jrr.String)():Gle("Unknown record key pattern")}a(Xrr,"RecordKey");function Zrr(t){return qle.PatternNumberExact in t.patternProperties?t.patternProperties[qle.PatternNumberExact]:qle.PatternStringExact in t.patternProperties?t.patternProperties[qle.PatternStringExact]:Gle("Unable to get record value schema")}a(Zrr,"RecordValue");function qS(t,e){let[r,n]=[Xrr(e),Zrr(e)];return Fe.TypeGuard.IsLiteralString(t)&&Fe.TypeGuard.IsNumber(r)&&QS(lc(t,n))===Tt.True?Tt.True:Fe.TypeGuard.IsUint8Array(t)&&Fe.TypeGuard.IsNumber(r)||Fe.TypeGuard.IsString(t)&&Fe.TypeGuard.IsNumber(r)||Fe.TypeGuard.IsArray(t)&&Fe.TypeGuard.IsNumber(r)?lc(t,n):Fe.TypeGuard.IsObject(t)?(()=>{for(let o of Object.getOwnPropertyNames(t.properties))if(Qzn(n,t.properties[o])===Tt.False)return Tt.False;return Tt.True})():Tt.False}a(qS,"FromRecordRight");function L6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?lc(Zrr(t),Zrr(e)):Tt.False}a(L6s,"FromRecord");function F6s(t,e){let r=Fe.TypeGuard.IsRegExp(t)?(0,Jrr.String)():t,n=Fe.TypeGuard.IsRegExp(e)?(0,Jrr.String)():e;return lc(r,n)}a(F6s,"FromRegExp");function qzn(t,e){return Fe.TypeGuard.IsLiteral(t)&&Fe.ValueGuard.IsString(t.const)||Fe.TypeGuard.IsString(t)?Tt.True:Tt.False}a(qzn,"FromStringRight");function U6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsString(e)?Tt.True:Tt.False}a(U6s,"FromString");function Q6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsSymbol(e)?Tt.True:Tt.False}a(Q6s,"FromSymbol");function q6s(t,e){return Fe.TypeGuard.IsTemplateLiteral(t)?lc((0,Pzn.TemplateLiteralToUnion)(t),e):Fe.TypeGuard.IsTemplateLiteral(e)?lc(t,(0,Pzn.TemplateLiteralToUnion)(e)):Gle("Invalid fallthrough for TemplateLiteral")}a(q6s,"FromTemplateLiteral");function G6s(t,e){return Fe.TypeGuard.IsArray(e)&&t.items!==void 0&&t.items.every(r=>lc(r,e.items)===Tt.True)}a(G6s,"IsArrayOfTuple");function H6s(t,e){return Fe.TypeGuard.IsNever(t)?Tt.True:Fe.TypeGuard.IsUnknown(t)?Tt.False:Fe.TypeGuard.IsAny(t)?Tt.Union:Tt.False}a(H6s,"FromTupleRight");function j6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)&&_nt(e)||Fe.TypeGuard.IsArray(e)&&G6s(t,e)?Tt.True:Fe.TypeGuard.IsTuple(e)?Fe.ValueGuard.IsUndefined(t.items)&&!Fe.ValueGuard.IsUndefined(e.items)||!Fe.ValueGuard.IsUndefined(t.items)&&Fe.ValueGuard.IsUndefined(e.items)?Tt.False:Fe.ValueGuard.IsUndefined(t.items)&&!Fe.ValueGuard.IsUndefined(e.items)||t.items.every((r,n)=>lc(r,e.items[n])===Tt.True)?Tt.True:Tt.False:Tt.False}a(j6s,"FromTuple");function $6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsUint8Array(e)?Tt.True:Tt.False}a($6s,"FromUint8Array");function V6s(t,e){return B0(e)?L0(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsRecord(e)?qS(t,e):Fe.TypeGuard.IsVoid(e)?Y6s(t,e):Fe.TypeGuard.IsUndefined(e)?Tt.True:Tt.False}a(V6s,"FromUndefined");function rnr(t,e){return e.anyOf.some(r=>lc(t,r)===Tt.True)?Tt.True:Tt.False}a(rnr,"FromUnionRight");function W6s(t,e){return t.anyOf.every(r=>lc(r,e)===Tt.True)?Tt.True:Tt.False}a(W6s,"FromUnion");function Gzn(t,e){return Tt.True}a(Gzn,"FromUnknownRight");function z6s(t,e){return Fe.TypeGuard.IsNever(e)?Fzn(t,e):Fe.TypeGuard.IsIntersect(e)?Ent(t,e):Fe.TypeGuard.IsUnion(e)?rnr(t,e):Fe.TypeGuard.IsAny(e)?tnr(t,e):Fe.TypeGuard.IsString(e)?qzn(t,e):Fe.TypeGuard.IsNumber(e)?Uzn(t,e):Fe.TypeGuard.IsInteger(e)?Lzn(t,e):Fe.TypeGuard.IsBoolean(e)?Bzn(t,e):Fe.TypeGuard.IsArray(e)?p6s(t,e):Fe.TypeGuard.IsTuple(e)?H6s(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsUnknown(e)?Tt.True:Tt.False}a(z6s,"FromUnknown");function Y6s(t,e){return Fe.TypeGuard.IsUndefined(t)||Fe.TypeGuard.IsUndefined(t)?Tt.True:Tt.False}a(Y6s,"FromVoidRight");function K6s(t,e){return Fe.TypeGuard.IsIntersect(e)?Ent(t,e):Fe.TypeGuard.IsUnion(e)?rnr(t,e):Fe.TypeGuard.IsUnknown(e)?Gzn(t,e):Fe.TypeGuard.IsAny(e)?tnr(t,e):Fe.TypeGuard.IsObject(e)?uA(t,e):Fe.TypeGuard.IsVoid(e)?Tt.True:Tt.False}a(K6s,"FromVoid");function lc(t,e){return Fe.TypeGuard.IsTemplateLiteral(t)||Fe.TypeGuard.IsTemplateLiteral(e)?q6s(t,e):Fe.TypeGuard.IsRegExp(t)||Fe.TypeGuard.IsRegExp(e)?F6s(t,e):Fe.TypeGuard.IsNot(t)||Fe.TypeGuard.IsNot(e)?I6s(t,e):Fe.TypeGuard.IsAny(t)?f6s(t,e):Fe.TypeGuard.IsArray(t)?h6s(t,e):Fe.TypeGuard.IsBigInt(t)?g6s(t,e):Fe.TypeGuard.IsBoolean(t)?A6s(t,e):Fe.TypeGuard.IsAsyncIterator(t)?m6s(t,e):Fe.TypeGuard.IsConstructor(t)?y6s(t,e):Fe.TypeGuard.IsDate(t)?E6s(t,e):Fe.TypeGuard.IsFunction(t)?_6s(t,e):Fe.TypeGuard.IsInteger(t)?C6s(t,e):Fe.TypeGuard.IsIntersect(t)?v6s(t,e):Fe.TypeGuard.IsIterator(t)?b6s(t,e):Fe.TypeGuard.IsLiteral(t)?T6s(t,e):Fe.TypeGuard.IsNever(t)?S6s(t,e):Fe.TypeGuard.IsNull(t)?x6s(t,e):Fe.TypeGuard.IsNumber(t)?w6s(t,e):Fe.TypeGuard.IsObject(t)?O6s(t,e):Fe.TypeGuard.IsRecord(t)?L6s(t,e):Fe.TypeGuard.IsString(t)?U6s(t,e):Fe.TypeGuard.IsSymbol(t)?Q6s(t,e):Fe.TypeGuard.IsTuple(t)?j6s(t,e):Fe.TypeGuard.IsPromise(t)?B6s(t,e):Fe.TypeGuard.IsUint8Array(t)?$6s(t,e):Fe.TypeGuard.IsUndefined(t)?V6s(t,e):Fe.TypeGuard.IsUnion(t)?W6s(t,e):Fe.TypeGuard.IsUnknown(t)?z6s(t,e):Fe.TypeGuard.IsVoid(t)?K6s(t,e):Gle(`Unknown left type operand '${t[Ozn.Kind]}'`)}a(lc,"Visit");function J6s(t,e){return lc(t,e)}a(J6s,"ExtendsCheck")});var onr=T(inr=>{"use strict";f();Object.defineProperty(inr,"__esModule",{value:!0});inr.ExtendsFromMappedResult=nFs;var X6s=O0(),Z6s=Cnt(),eFs=K_();function tFs(t,e,r,n,o){let s={};for(let c of globalThis.Object.getOwnPropertyNames(t))s[c]=(0,Z6s.Extends)(t[c],e,r,n,(0,eFs.Clone)(o));return s}a(tFs,"FromProperties");function rFs(t,e,r,n,o){return tFs(t.properties,e,r,n,o)}a(rFs,"FromMappedResult");function nFs(t,e,r,n,o){let s=rFs(t,e,r,n,o);return(0,X6s.MappedResult)(s)}a(nFs,"ExtendsFromMappedResult")});var Cnt=T(anr=>{"use strict";f();Object.defineProperty(anr,"__esModule",{value:!0});anr.Extends=cFs;var Hzn=Xn(),iFs=Vd(),snr=nnr(),oFs=cnr(),sFs=onr(),jzn=Do();function aFs(t,e,r,n){let o=(0,snr.ExtendsCheck)(t,e);return o===snr.ExtendsResult.Union?(0,iFs.Union)([r,n]):o===snr.ExtendsResult.True?r:n}a(aFs,"ExtendsResolve");function cFs(t,e,r,n,o){return(0,jzn.IsMappedResult)(t)?(0,sFs.ExtendsFromMappedResult)(t,e,r,n,o):(0,jzn.IsMappedKey)(t)?(0,Hzn.CreateType)((0,oFs.ExtendsFromMappedKey)(t,e,r,n,o)):(0,Hzn.CreateType)(aFs(t,e,r,n),o)}a(cFs,"Extends")});var cnr=T(lnr=>{"use strict";f();Object.defineProperty(lnr,"__esModule",{value:!0});lnr.ExtendsFromMappedKey=gFs;var lFs=O0(),uFs=lA(),dFs=Cnt(),fFs=K_();function pFs(t,e,r,n,o){return{[t]:(0,dFs.Extends)((0,uFs.Literal)(t),e,r,n,(0,fFs.Clone)(o))}}a(pFs,"FromPropertyKey");function hFs(t,e,r,n,o){return t.reduce((s,c)=>({...s,...pFs(c,e,r,n,o)}),{})}a(hFs,"FromPropertyKeys");function mFs(t,e,r,n,o){return hFs(t.keys,e,r,n,o)}a(mFs,"FromMappedKey");function gFs(t,e,r,n,o){let s=mFs(t,e,r,n,o);return(0,lFs.MappedResult)(s)}a(gFs,"ExtendsFromMappedKey")});var dnr=T(unr=>{"use strict";f();Object.defineProperty(unr,"__esModule",{value:!0});unr.ExtendsUndefinedCheck=bnt;var vnt=nn();function AFs(t){return t.allOf.every(e=>bnt(e))}a(AFs,"Intersect");function yFs(t){return t.anyOf.some(e=>bnt(e))}a(yFs,"Union");function EFs(t){return!bnt(t.not)}a(EFs,"Not");function bnt(t){return t[vnt.Kind]==="Intersect"?AFs(t):t[vnt.Kind]==="Union"?yFs(t):t[vnt.Kind]==="Not"?EFs(t):t[vnt.Kind]==="Undefined"}a(bnt,"ExtendsUndefinedCheck")});var fY=T(tR=>{"use strict";f();var _Fs=tR&&tR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UIe=tR&&tR.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_Fs(e,t,r)};Object.defineProperty(tR,"__esModule",{value:!0});UIe(nnr(),tR);UIe(cnr(),tR);UIe(onr(),tR);UIe(dnr(),tR);UIe(Cnt(),tR)});var pnr=T(fnr=>{"use strict";f();Object.defineProperty(fnr,"__esModule",{value:!0});fnr.ExcludeFromTemplateLiteral=bFs;var CFs=Tnt(),vFs=Xw();function bFs(t,e){return(0,CFs.Exclude)((0,vFs.TemplateLiteralToUnion)(t),e)}a(bFs,"ExcludeFromTemplateLiteral")});var Tnt=T(gnr=>{"use strict";f();Object.defineProperty(gnr,"__esModule",{value:!0});gnr.Exclude=RFs;var hnr=Xn(),TFs=Vd(),SFs=M0(),Snt=fY(),IFs=Anr(),xFs=pnr(),mnr=Do();function wFs(t,e){let r=t.filter(n=>(0,Snt.ExtendsCheck)(n,e)===Snt.ExtendsResult.False);return r.length===1?r[0]:(0,TFs.Union)(r)}a(wFs,"ExcludeRest");function RFs(t,e,r={}){return(0,mnr.IsTemplateLiteral)(t)?(0,hnr.CreateType)((0,xFs.ExcludeFromTemplateLiteral)(t,e),r):(0,mnr.IsMappedResult)(t)?(0,hnr.CreateType)((0,IFs.ExcludeFromMappedResult)(t,e),r):(0,hnr.CreateType)((0,mnr.IsUnion)(t)?wFs(t.anyOf,e):(0,Snt.ExtendsCheck)(t,e)!==Snt.ExtendsResult.False?(0,SFs.Never)():t,r)}a(RFs,"Exclude")});var Anr=T(ynr=>{"use strict";f();Object.defineProperty(ynr,"__esModule",{value:!0});ynr.ExcludeFromMappedResult=MFs;var PFs=O0(),kFs=Tnt();function DFs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,kFs.Exclude)(t[n],e);return r}a(DFs,"FromProperties");function NFs(t,e){return DFs(t.properties,e)}a(NFs,"FromMappedResult");function MFs(t,e){let r=NFs(t,e);return(0,PFs.MappedResult)(r)}a(MFs,"ExcludeFromMappedResult")});var Int=T(sB=>{"use strict";f();var OFs=sB&&sB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Enr=sB&&sB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&OFs(e,t,r)};Object.defineProperty(sB,"__esModule",{value:!0});Enr(Anr(),sB);Enr(pnr(),sB);Enr(Tnt(),sB)});var Cnr=T(_nr=>{"use strict";f();Object.defineProperty(_nr,"__esModule",{value:!0});_nr.ExtractFromTemplateLiteral=FFs;var BFs=xnt(),LFs=Xw();function FFs(t,e){return(0,BFs.Extract)((0,LFs.TemplateLiteralToUnion)(t),e)}a(FFs,"ExtractFromTemplateLiteral")});var xnt=T(Tnr=>{"use strict";f();Object.defineProperty(Tnr,"__esModule",{value:!0});Tnr.Extract=jFs;var vnr=Xn(),UFs=Vd(),QFs=M0(),wnt=fY(),qFs=Snr(),GFs=Cnr(),bnr=Do();function HFs(t,e){let r=t.filter(n=>(0,wnt.ExtendsCheck)(n,e)!==wnt.ExtendsResult.False);return r.length===1?r[0]:(0,UFs.Union)(r)}a(HFs,"ExtractRest");function jFs(t,e,r){return(0,bnr.IsTemplateLiteral)(t)?(0,vnr.CreateType)((0,GFs.ExtractFromTemplateLiteral)(t,e),r):(0,bnr.IsMappedResult)(t)?(0,vnr.CreateType)((0,qFs.ExtractFromMappedResult)(t,e),r):(0,vnr.CreateType)((0,bnr.IsUnion)(t)?HFs(t.anyOf,e):(0,wnt.ExtendsCheck)(t,e)!==wnt.ExtendsResult.False?t:(0,QFs.Never)(),r)}a(jFs,"Extract")});var Snr=T(Inr=>{"use strict";f();Object.defineProperty(Inr,"__esModule",{value:!0});Inr.ExtractFromMappedResult=YFs;var $Fs=O0(),VFs=xnt();function WFs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,VFs.Extract)(t[n],e);return r}a(WFs,"FromProperties");function zFs(t,e){return WFs(t.properties,e)}a(zFs,"FromMappedResult");function YFs(t,e){let r=zFs(t,e);return(0,$Fs.MappedResult)(r)}a(YFs,"ExtractFromMappedResult")});var Rnt=T(aB=>{"use strict";f();var KFs=aB&&aB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xnr=aB&&aB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&KFs(e,t,r)};Object.defineProperty(aB,"__esModule",{value:!0});xnr(Snr(),aB);xnr(Cnr(),aB);xnr(xnt(),aB)});var $zn=T(cB=>{"use strict";f();var JFs=cB&&cB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),XFs=cB&&cB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ZFs=cB&&cB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var i9s=pY&&pY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o9s=pY&&pY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&i9s(e,t,r)};Object.defineProperty(pY,"__esModule",{value:!0});o9s($zn(),pY)});var Vzn=T(wnr=>{"use strict";f();Object.defineProperty(wnr,"__esModule",{value:!0});wnr.ReadonlyOptional=c9s;var s9s=Z7(),a9s=gD();function c9s(t){return(0,s9s.Readonly)((0,a9s.Optional)(t))}a(c9s,"ReadonlyOptional")});var QIe=T(hY=>{"use strict";f();var l9s=hY&&hY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),u9s=hY&&hY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&l9s(e,t,r)};Object.defineProperty(hY,"__esModule",{value:!0});u9s(Vzn(),hY)});var Jzn=T(Hle=>{"use strict";f();Object.defineProperty(Hle,"__esModule",{value:!0});Hle.Record=x9s;Hle.RecordPattern=Pnr;Hle.RecordKey=w9s;Hle.RecordValue=R9s;var d9s=Xn(),zzn=nn(),f9s=M0(),p9s=Y7(),Yzn=My(),Wzn=K7(),h9s=Vd(),m9s=Xw(),mY=CIe(),Kzn=Zw(),g9s=Ny(),ED=Do();function gY(t,e,r){return(0,d9s.CreateType)({[zzn.Kind]:"Record",type:"object",patternProperties:{[t]:e}},r)}a(gY,"RecordCreateFromPattern");function Rnr(t,e,r){let n={};for(let o of t)n[o]=e;return(0,Yzn.Object)(n,{...r,[zzn.Hint]:"Record"})}a(Rnr,"RecordCreateFromKeys");function A9s(t,e,r){return(0,m9s.IsTemplateLiteralFinite)(t)?Rnr((0,Kzn.IndexPropertyKeys)(t),e,r):gY(t.pattern,e,r)}a(A9s,"FromTemplateLiteralKey");function y9s(t,e,r){return Rnr((0,Kzn.IndexPropertyKeys)((0,h9s.Union)(t)),e,r)}a(y9s,"FromUnionKey");function E9s(t,e,r){return Rnr([t.toString()],e,r)}a(E9s,"FromLiteralKey");function _9s(t,e,r){return gY(t.source,e,r)}a(_9s,"FromRegExpKey");function C9s(t,e,r){let n=(0,g9s.IsUndefined)(t.pattern)?mY.PatternStringExact:t.pattern;return gY(n,e,r)}a(C9s,"FromStringKey");function v9s(t,e,r){return gY(mY.PatternStringExact,e,r)}a(v9s,"FromAnyKey");function b9s(t,e,r){return gY(mY.PatternNeverExact,e,r)}a(b9s,"FromNeverKey");function T9s(t,e,r){return(0,Yzn.Object)({true:e,false:e},r)}a(T9s,"FromBooleanKey");function S9s(t,e,r){return gY(mY.PatternNumberExact,e,r)}a(S9s,"FromIntegerKey");function I9s(t,e,r){return gY(mY.PatternNumberExact,e,r)}a(I9s,"FromNumberKey");function x9s(t,e,r={}){return(0,ED.IsUnion)(t)?y9s(t.anyOf,e,r):(0,ED.IsTemplateLiteral)(t)?A9s(t,e,r):(0,ED.IsLiteral)(t)?E9s(t.const,e,r):(0,ED.IsBoolean)(t)?T9s(t,e,r):(0,ED.IsInteger)(t)?S9s(t,e,r):(0,ED.IsNumber)(t)?I9s(t,e,r):(0,ED.IsRegExp)(t)?_9s(t,e,r):(0,ED.IsString)(t)?C9s(t,e,r):(0,ED.IsAny)(t)?v9s(t,e,r):(0,ED.IsNever)(t)?b9s(t,e,r):(0,f9s.Never)(r)}a(x9s,"Record");function Pnr(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}a(Pnr,"RecordPattern");function w9s(t){let e=Pnr(t);return e===mY.PatternStringExact?(0,Wzn.String)():e===mY.PatternNumberExact?(0,p9s.Number)():(0,Wzn.String)({pattern:e})}a(w9s,"RecordKey");function R9s(t){return t.patternProperties[Pnr(t)]}a(R9s,"RecordValue")});var jle=T(AY=>{"use strict";f();var P9s=AY&&AY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),k9s=AY&&AY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&P9s(e,t,r)};Object.defineProperty(AY,"__esModule",{value:!0});k9s(Jzn(),AY)});var Zzn=T(_D=>{"use strict";f();var D9s=_D&&_D.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N9s=_D&&_D.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xzn=_D&&_D.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o({...r,[n]:Z9s(t,e[n])}),{})}a(e7s,"FromProperties");function $le(t,e){return e.map(r=>rR(t,r))}a($le,"FromTypes");function rR(t,e){return rC.IsConstructor(e)?q9s(t,e):rC.IsFunction(e)?G9s(t,e):rC.IsIntersect(e)?H9s(t,e):rC.IsUnion(e)?j9s(t,e):rC.IsTuple(e)?$9s(t,e):rC.IsArray(e)?V9s(t,e):rC.IsAsyncIterator(e)?W9s(t,e):rC.IsIterator(e)?z9s(t,e):rC.IsPromise(e)?Y9s(t,e):rC.IsObject(e)?K9s(t,e):rC.IsRecord(e)?J9s(t,e):rC.IsArgument(e)?X9s(t,e):e}a(rR,"FromType");function t7s(t,e){return rR(e,(0,M9s.CloneType)(t))}a(t7s,"Instantiate")});var knt=T(yY=>{"use strict";f();var r7s=yY&&yY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),n7s=yY&&yY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&r7s(e,t,r)};Object.defineProperty(yY,"__esModule",{value:!0});n7s(Zzn(),yY)});var eYn=T(Dnr=>{"use strict";f();Object.defineProperty(Dnr,"__esModule",{value:!0});Dnr.Integer=s7s;var i7s=Xn(),o7s=nn();function s7s(t){return(0,i7s.CreateType)({[o7s.Kind]:"Integer",type:"integer"},t)}a(s7s,"Integer")});var Dnt=T(EY=>{"use strict";f();var a7s=EY&&EY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),c7s=EY&&EY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&a7s(e,t,r)};Object.defineProperty(EY,"__esModule",{value:!0});c7s(eYn(),EY)});var Mnr=T(Nnr=>{"use strict";f();Object.defineProperty(Nnr,"__esModule",{value:!0});Nnr.IntrinsicFromMappedKey=g7s;var l7s=O0(),u7s=_Y(),d7s=lA(),f7s=K_();function p7s(t,e,r){return{[t]:(0,u7s.Intrinsic)((0,d7s.Literal)(t),e,(0,f7s.Clone)(r))}}a(p7s,"MappedIntrinsicPropertyKey");function h7s(t,e,r){return t.reduce((o,s)=>({...o,...p7s(s,e,r)}),{})}a(h7s,"MappedIntrinsicPropertyKeys");function m7s(t,e,r){return h7s(t.keys,e,r)}a(m7s,"MappedIntrinsicProperties");function g7s(t,e,r){let n=m7s(t,e,r);return(0,l7s.MappedResult)(n)}a(g7s,"IntrinsicFromMappedKey")});var _Y=T(Onr=>{"use strict";f();Object.defineProperty(Onr,"__esModule",{value:!0});Onr.Intrinsic=oYn;var A7s=Xn(),Nnt=Xw(),y7s=Mnr(),tYn=lA(),rYn=Vd(),Mnt=Do();function E7s(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),r].join("")}a(E7s,"ApplyUncapitalize");function _7s(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),r].join("")}a(_7s,"ApplyCapitalize");function C7s(t){return t.toUpperCase()}a(C7s,"ApplyUppercase");function v7s(t){return t.toLowerCase()}a(v7s,"ApplyLowercase");function b7s(t,e,r){let n=(0,Nnt.TemplateLiteralParseExact)(t.pattern);if(!(0,Nnt.IsTemplateLiteralExpressionFinite)(n))return{...t,pattern:nYn(t.pattern,e)};let c=[...(0,Nnt.TemplateLiteralExpressionGenerate)(n)].map(d=>(0,tYn.Literal)(d)),l=iYn(c,e),u=(0,rYn.Union)(l);return(0,Nnt.TemplateLiteral)([u],r)}a(b7s,"FromTemplateLiteral");function nYn(t,e){return typeof t=="string"?e==="Uncapitalize"?E7s(t):e==="Capitalize"?_7s(t):e==="Uppercase"?C7s(t):e==="Lowercase"?v7s(t):t:t.toString()}a(nYn,"FromLiteralValue");function iYn(t,e){return t.map(r=>oYn(r,e))}a(iYn,"FromRest");function oYn(t,e,r={}){return(0,Mnt.IsMappedKey)(t)?(0,y7s.IntrinsicFromMappedKey)(t,e,r):(0,Mnt.IsTemplateLiteral)(t)?b7s(t,e,r):(0,Mnt.IsUnion)(t)?(0,rYn.Union)(iYn(t.anyOf,e),r):(0,Mnt.IsLiteral)(t)?(0,tYn.Literal)(nYn(t.const,e),r):(0,A7s.CreateType)(t,r)}a(oYn,"Intrinsic")});var sYn=T(Bnr=>{"use strict";f();Object.defineProperty(Bnr,"__esModule",{value:!0});Bnr.Capitalize=S7s;var T7s=_Y();function S7s(t,e={}){return(0,T7s.Intrinsic)(t,"Capitalize",e)}a(S7s,"Capitalize")});var aYn=T(Lnr=>{"use strict";f();Object.defineProperty(Lnr,"__esModule",{value:!0});Lnr.Lowercase=x7s;var I7s=_Y();function x7s(t,e={}){return(0,I7s.Intrinsic)(t,"Lowercase",e)}a(x7s,"Lowercase")});var cYn=T(Fnr=>{"use strict";f();Object.defineProperty(Fnr,"__esModule",{value:!0});Fnr.Uncapitalize=R7s;var w7s=_Y();function R7s(t,e={}){return(0,w7s.Intrinsic)(t,"Uncapitalize",e)}a(R7s,"Uncapitalize")});var lYn=T(Unr=>{"use strict";f();Object.defineProperty(Unr,"__esModule",{value:!0});Unr.Uppercase=k7s;var P7s=_Y();function k7s(t,e={}){return(0,P7s.Intrinsic)(t,"Uppercase",e)}a(k7s,"Uppercase")});var Ont=T(GS=>{"use strict";f();var D7s=GS&&GS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Vle=GS&&GS.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&D7s(e,t,r)};Object.defineProperty(GS,"__esModule",{value:!0});Vle(sYn(),GS);Vle(Mnr(),GS);Vle(_Y(),GS);Vle(aYn(),GS);Vle(cYn(),GS);Vle(lYn(),GS)});var qnr=T(Qnr=>{"use strict";f();Object.defineProperty(Qnr,"__esModule",{value:!0});Qnr.OmitFromMappedResult=F7s;var N7s=O0(),M7s=Bnt(),O7s=K_();function B7s(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=(0,M7s.Omit)(t[o],e,(0,O7s.Clone)(r));return n}a(B7s,"FromProperties");function L7s(t,e,r){return B7s(t.properties,e,r)}a(L7s,"FromMappedResult");function F7s(t,e,r){let n=L7s(t,e,r);return(0,N7s.MappedResult)(n)}a(F7s,"OmitFromMappedResult")});var Bnt=T(jnr=>{"use strict";f();Object.defineProperty(jnr,"__esModule",{value:!0});jnr.Omit=eUs;var U7s=Xn(),Q7s=Krt(),q7s=AIe(),Gnr=W7(),G7s=lA(),H7s=Zw(),j7s=Gv(),uYn=Vd(),dYn=My(),$7s=$nr(),V7s=qnr(),lB=Do(),W7s=Ny();function z7s(t,e){return t.map(r=>Hnr(r,e))}a(z7s,"FromIntersect");function Y7s(t,e){return t.map(r=>Hnr(r,e))}a(Y7s,"FromUnion");function K7s(t,e){let{[e]:r,...n}=t;return n}a(K7s,"FromProperty");function J7s(t,e){return e.reduce((r,n)=>K7s(r,n),t)}a(J7s,"FromProperties");function X7s(t,e){let r=(0,Q7s.Discard)(t,[q7s.TransformKind,"$id","required","properties"]),n=J7s(t.properties,e);return(0,dYn.Object)(n,r)}a(X7s,"FromObject");function Z7s(t){let e=t.reduce((r,n)=>(0,lB.IsLiteralValue)(n)?[...r,(0,G7s.Literal)(n)]:r,[]);return(0,uYn.Union)(e)}a(Z7s,"UnionFromPropertyKeys");function Hnr(t,e){return(0,lB.IsIntersect)(t)?(0,j7s.Intersect)(z7s(t.allOf,e)):(0,lB.IsUnion)(t)?(0,uYn.Union)(Y7s(t.anyOf,e)):(0,lB.IsObject)(t)?X7s(t,e):(0,dYn.Object)({})}a(Hnr,"OmitResolve");function eUs(t,e,r){let n=(0,W7s.IsArray)(e)?Z7s(e):e,o=(0,lB.IsSchema)(e)?(0,H7s.IndexPropertyKeys)(e):e,s=(0,lB.IsRef)(t),c=(0,lB.IsRef)(e);return(0,lB.IsMappedResult)(t)?(0,V7s.OmitFromMappedResult)(t,o,r):(0,lB.IsMappedKey)(e)?(0,$7s.OmitFromMappedKey)(t,e,r):s&&c?(0,Gnr.Computed)("Omit",[t,n],r):!s&&c?(0,Gnr.Computed)("Omit",[t,n],r):s&&!c?(0,Gnr.Computed)("Omit",[t,n],r):(0,U7s.CreateType)({...Hnr(t,o),...r})}a(eUs,"Omit")});var $nr=T(Vnr=>{"use strict";f();Object.defineProperty(Vnr,"__esModule",{value:!0});Vnr.OmitFromMappedKey=aUs;var tUs=O0(),rUs=Bnt(),nUs=K_();function iUs(t,e,r){return{[e]:(0,rUs.Omit)(t,[e],(0,nUs.Clone)(r))}}a(iUs,"FromPropertyKey");function oUs(t,e,r){return e.reduce((n,o)=>({...n,...iUs(t,o,r)}),{})}a(oUs,"FromPropertyKeys");function sUs(t,e,r){return oUs(t,e.keys,r)}a(sUs,"FromMappedKey");function aUs(t,e,r){let n=sUs(t,e,r);return(0,tUs.MappedResult)(n)}a(aUs,"OmitFromMappedKey")});var qIe=T(uB=>{"use strict";f();var cUs=uB&&uB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wnr=uB&&uB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cUs(e,t,r)};Object.defineProperty(uB,"__esModule",{value:!0});Wnr($nr(),uB);Wnr(qnr(),uB);Wnr(Bnt(),uB)});var Ynr=T(znr=>{"use strict";f();Object.defineProperty(znr,"__esModule",{value:!0});znr.PickFromMappedResult=hUs;var lUs=O0(),uUs=Lnt(),dUs=K_();function fUs(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=(0,uUs.Pick)(t[o],e,(0,dUs.Clone)(r));return n}a(fUs,"FromProperties");function pUs(t,e,r){return fUs(t.properties,e,r)}a(pUs,"FromMappedResult");function hUs(t,e,r){let n=pUs(t,e,r);return(0,lUs.MappedResult)(n)}a(hUs,"PickFromMappedResult")});var Lnt=T(Xnr=>{"use strict";f();Object.defineProperty(Xnr,"__esModule",{value:!0});Xnr.Pick=RUs;var mUs=Xn(),gUs=Krt(),Knr=W7(),AUs=Gv(),yUs=lA(),fYn=My(),pYn=Vd(),EUs=Zw(),_Us=AIe(),dB=Do(),CUs=Ny(),vUs=Znr(),bUs=Ynr();function TUs(t,e){return t.map(r=>Jnr(r,e))}a(TUs,"FromIntersect");function SUs(t,e){return t.map(r=>Jnr(r,e))}a(SUs,"FromUnion");function IUs(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}a(IUs,"FromProperties");function xUs(t,e){let r=(0,gUs.Discard)(t,[_Us.TransformKind,"$id","required","properties"]),n=IUs(t.properties,e);return(0,fYn.Object)(n,r)}a(xUs,"FromObject");function wUs(t){let e=t.reduce((r,n)=>(0,dB.IsLiteralValue)(n)?[...r,(0,yUs.Literal)(n)]:r,[]);return(0,pYn.Union)(e)}a(wUs,"UnionFromPropertyKeys");function Jnr(t,e){return(0,dB.IsIntersect)(t)?(0,AUs.Intersect)(TUs(t.allOf,e)):(0,dB.IsUnion)(t)?(0,pYn.Union)(SUs(t.anyOf,e)):(0,dB.IsObject)(t)?xUs(t,e):(0,fYn.Object)({})}a(Jnr,"PickResolve");function RUs(t,e,r){let n=(0,CUs.IsArray)(e)?wUs(e):e,o=(0,dB.IsSchema)(e)?(0,EUs.IndexPropertyKeys)(e):e,s=(0,dB.IsRef)(t),c=(0,dB.IsRef)(e);return(0,dB.IsMappedResult)(t)?(0,bUs.PickFromMappedResult)(t,o,r):(0,dB.IsMappedKey)(e)?(0,vUs.PickFromMappedKey)(t,e,r):s&&c?(0,Knr.Computed)("Pick",[t,n],r):!s&&c?(0,Knr.Computed)("Pick",[t,n],r):s&&!c?(0,Knr.Computed)("Pick",[t,n],r):(0,mUs.CreateType)({...Jnr(t,o),...r})}a(RUs,"Pick")});var Znr=T(eir=>{"use strict";f();Object.defineProperty(eir,"__esModule",{value:!0});eir.PickFromMappedKey=BUs;var PUs=O0(),kUs=Lnt(),DUs=K_();function NUs(t,e,r){return{[e]:(0,kUs.Pick)(t,[e],(0,DUs.Clone)(r))}}a(NUs,"FromPropertyKey");function MUs(t,e,r){return e.reduce((n,o)=>({...n,...NUs(t,o,r)}),{})}a(MUs,"FromPropertyKeys");function OUs(t,e,r){return MUs(t,e.keys,r)}a(OUs,"FromMappedKey");function BUs(t,e,r){let n=OUs(t,e,r);return(0,PUs.MappedResult)(n)}a(BUs,"PickFromMappedKey")});var GIe=T(fB=>{"use strict";f();var LUs=fB&&fB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),tir=fB&&fB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&LUs(e,t,r)};Object.defineProperty(fB,"__esModule",{value:!0});tir(Znr(),fB);tir(Ynr(),fB);tir(Lnt(),fB)});var nir=T(pB=>{"use strict";f();var FUs=pB&&pB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UUs=pB&&pB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QUs=pB&&pB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ogYn(e))}a(hYn,"FromRest");function gYn(t){return By.IsComputed(t)?YUs(t.target,t.parameters):By.IsRef(t)?KUs(t.$ref):By.IsIntersect(t)?(0,HUs.Intersect)(hYn(t.allOf)):By.IsUnion(t)?(0,jUs.Union)(hYn(t.anyOf)):By.IsObject(t)?XUs(t):By.IsBigInt(t)||By.IsBoolean(t)||By.IsInteger(t)||By.IsLiteral(t)||By.IsNull(t)||By.IsNumber(t)||By.IsString(t)||By.IsSymbol(t)||By.IsUndefined(t)?t:(0,mYn.Object)({})}a(gYn,"PartialResolve");function ZUs(t,e){return By.IsMappedResult(t)?(0,zUs.PartialFromMappedResult)(t,e):(0,qUs.CreateType)({...gYn(t),...e})}a(ZUs,"Partial")});var iir=T(oir=>{"use strict";f();Object.defineProperty(oir,"__esModule",{value:!0});oir.PartialFromMappedResult=oQs;var eQs=O0(),tQs=nir(),rQs=K_();function nQs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,tQs.Partial)(t[n],(0,rQs.Clone)(e));return r}a(nQs,"FromProperties");function iQs(t,e){return nQs(t.properties,e)}a(iQs,"FromMappedResult");function oQs(t,e){let r=iQs(t,e);return(0,eQs.MappedResult)(r)}a(oQs,"PartialFromMappedResult")});var HIe=T(nU=>{"use strict";f();var sQs=nU&&nU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),AYn=nU&&nU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sQs(e,t,r)};Object.defineProperty(nU,"__esModule",{value:!0});AYn(iir(),nU);AYn(nir(),nU)});var air=T(hB=>{"use strict";f();var aQs=hB&&hB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cQs=hB&&hB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lQs=hB&&hB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ovYn(e))}a(yYn,"FromRest");function vYn(t){return Ly.IsComputed(t)?mQs(t.target,t.parameters):Ly.IsRef(t)?gQs(t.$ref):Ly.IsIntersect(t)?(0,dQs.Intersect)(yYn(t.allOf)):Ly.IsUnion(t)?(0,fQs.Union)(yYn(t.anyOf)):Ly.IsObject(t)?yQs(t):Ly.IsBigInt(t)||Ly.IsBoolean(t)||Ly.IsInteger(t)||Ly.IsLiteral(t)||Ly.IsNull(t)||Ly.IsNumber(t)||Ly.IsString(t)||Ly.IsSymbol(t)||Ly.IsUndefined(t)?t:(0,EYn.Object)({})}a(vYn,"RequiredResolve");function EQs(t,e){return Ly.IsMappedResult(t)?(0,hQs.RequiredFromMappedResult)(t,e):(0,uQs.CreateType)({...vYn(t),...e})}a(EQs,"Required")});var cir=T(lir=>{"use strict";f();Object.defineProperty(lir,"__esModule",{value:!0});lir.RequiredFromMappedResult=TQs;var _Qs=O0(),CQs=air();function vQs(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=(0,CQs.Required)(t[n],e);return r}a(vQs,"FromProperties");function bQs(t,e){return vQs(t.properties,e)}a(bQs,"FromMappedResult");function TQs(t,e){let r=bQs(t,e);return(0,_Qs.MappedResult)(r)}a(TQs,"RequiredFromMappedResult")});var jIe=T(iU=>{"use strict";f();var SQs=iU&&iU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bYn=iU&&iU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&SQs(e,t,r)};Object.defineProperty(iU,"__esModule",{value:!0});bYn(cir(),iU);bYn(air(),iU)});var xYn=T(nR=>{"use strict";f();var IQs=nR&&nR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xQs=nR&&nR.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wQs=nR&&nR.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ojm.IsRef(r)?dir(t,r.$ref):iC(t,r))}a(VQs,"DereferenceParameters");function dir(t,e){return e in t?jm.IsRef(t[e])?dir(t,t[e].$ref):iC(t,t[e]):(0,uir.Never)()}a(dir,"Dereference");function WQs(t){return(0,kQs.Awaited)(t[0])}a(WQs,"FromAwaited");function zQs(t){return(0,MQs.Index)(t[0],t[1])}a(zQs,"FromIndex");function YQs(t){return(0,FQs.KeyOf)(t[0])}a(YQs,"FromKeyOf");function KQs(t){return(0,GQs.Partial)(t[0])}a(KQs,"FromPartial");function JQs(t){return(0,QQs.Omit)(t[0],t[1])}a(JQs,"FromOmit");function XQs(t){return(0,qQs.Pick)(t[0],t[1])}a(XQs,"FromPick");function ZQs(t){return(0,HQs.Required)(t[0])}a(ZQs,"FromRequired");function eqs(t,e,r){let n=VQs(t,r);return e==="Awaited"?WQs(n):e==="Index"?zQs(n):e==="KeyOf"?YQs(n):e==="Partial"?KQs(n):e==="Omit"?JQs(n):e==="Pick"?XQs(n):e==="Required"?ZQs(n):(0,uir.Never)()}a(eqs,"FromComputed");function tqs(t,e){return(0,PQs.Array)(iC(t,e))}a(tqs,"FromArray");function rqs(t,e){return(0,DQs.AsyncIterator)(iC(t,e))}a(rqs,"FromAsyncIterator");function nqs(t,e,r){return(0,NQs.Constructor)($Ie(t,e),iC(t,r))}a(nqs,"FromConstructor");function iqs(t,e,r){return(0,OQs.Function)($Ie(t,e),iC(t,r))}a(iqs,"FromFunction");function oqs(t,e){return(0,BQs.Intersect)($Ie(t,e))}a(oqs,"FromIntersect");function sqs(t,e){return(0,LQs.Iterator)(iC(t,e))}a(sqs,"FromIterator");function aqs(t,e){return(0,UQs.Object)(globalThis.Object.keys(e).reduce((r,n)=>({...r,[n]:iC(t,e[n])}),{}))}a(aqs,"FromObject");function cqs(t,e){let[r,n]=[iC(t,(0,SYn.RecordValue)(e)),(0,SYn.RecordPattern)(e)],o=(0,RQs.CloneType)(e);return o.patternProperties[n]=r,o}a(cqs,"FromRecord");function lqs(t,e){return jm.IsRef(e)?{...dir(t,e.$ref),[Fnt.TransformKind]:e[Fnt.TransformKind]}:e}a(lqs,"FromTransform");function uqs(t,e){return(0,jQs.Tuple)($Ie(t,e))}a(uqs,"FromTuple");function dqs(t,e){return(0,$Qs.Union)($Ie(t,e))}a(dqs,"FromUnion");function $Ie(t,e){return e.map(r=>iC(t,r))}a($Ie,"FromTypes");function iC(t,e){return jm.IsOptional(e)?(0,nC.CreateType)(iC(t,(0,TYn.Discard)(e,[Fnt.OptionalKind])),e):jm.IsReadonly(e)?(0,nC.CreateType)(iC(t,(0,TYn.Discard)(e,[Fnt.ReadonlyKind])),e):jm.IsTransform(e)?(0,nC.CreateType)(lqs(t,e),e):jm.IsArray(e)?(0,nC.CreateType)(tqs(t,e.items),e):jm.IsAsyncIterator(e)?(0,nC.CreateType)(rqs(t,e.items),e):jm.IsComputed(e)?(0,nC.CreateType)(eqs(t,e.target,e.parameters)):jm.IsConstructor(e)?(0,nC.CreateType)(nqs(t,e.parameters,e.returns),e):jm.IsFunction(e)?(0,nC.CreateType)(iqs(t,e.parameters,e.returns),e):jm.IsIntersect(e)?(0,nC.CreateType)(oqs(t,e.allOf),e):jm.IsIterator(e)?(0,nC.CreateType)(sqs(t,e.items),e):jm.IsObject(e)?(0,nC.CreateType)(aqs(t,e.properties),e):jm.IsRecord(e)?(0,nC.CreateType)(cqs(t,e)):jm.IsTuple(e)?(0,nC.CreateType)(uqs(t,e.items||[]),e):jm.IsUnion(e)?(0,nC.CreateType)(dqs(t,e.anyOf),e):e}a(iC,"FromType");function IYn(t,e){return e in t?iC(t,t[e]):(0,uir.Never)()}a(IYn,"ComputeType");function fqs(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,r)=>({...e,[r]:IYn(t,r)}),{})}a(fqs,"ComputeModuleProperties")});var RYn=T(VIe=>{"use strict";f();Object.defineProperty(VIe,"__esModule",{value:!0});VIe.TModule=void 0;VIe.Module=mqs;var wYn=JO(),pqs=nn(),hqs=xYn(),Unt=class{static{a(this,"TModule")}constructor(e){let r=(0,hqs.ComputeModuleProperties)(e),n=this.WithIdentifiers(r);this.$defs=n}Import(e,r){let n={...this.$defs,[e]:(0,wYn.CreateType)(this.$defs[e],r)};return(0,wYn.CreateType)({[pqs.Kind]:"Import",$defs:n,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:{...e[n],$id:n}}),{})}};VIe.TModule=Unt;function mqs(t){return new Unt(t)}a(mqs,"Module")});var Qnt=T(CY=>{"use strict";f();var gqs=CY&&CY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Aqs=CY&&CY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&gqs(e,t,r)};Object.defineProperty(CY,"__esModule",{value:!0});Aqs(RYn(),CY)});var PYn=T(fir=>{"use strict";f();Object.defineProperty(fir,"__esModule",{value:!0});fir.Not=_qs;var yqs=Xn(),Eqs=nn();function _qs(t,e){return(0,yqs.CreateType)({[Eqs.Kind]:"Not",not:t},e)}a(_qs,"Not")});var qnt=T(vY=>{"use strict";f();var Cqs=vY&&vY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vqs=vY&&vY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Cqs(e,t,r)};Object.defineProperty(vY,"__esModule",{value:!0});vqs(PYn(),vY)});var kYn=T(mB=>{"use strict";f();var bqs=mB&&mB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Tqs=mB&&mB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sqs=mB&&mB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var Pqs=bY&&bY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kqs=bY&&bY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Pqs(e,t,r)};Object.defineProperty(bY,"__esModule",{value:!0});kqs(kYn(),bY)});var NYn=T(pir=>{"use strict";f();Object.defineProperty(pir,"__esModule",{value:!0});pir.Recursive=Bqs;var Dqs=Grt(),Nqs=Xn(),Mqs=Ny(),DYn=nn(),Oqs=0;function Bqs(t,e={}){(0,Mqs.IsUndefined)(e.$id)&&(e.$id=`T${Oqs++}`);let r=(0,Dqs.CloneType)(t({[DYn.Kind]:"This",$ref:`${e.$id}`}));return r.$id=e.$id,(0,Nqs.CreateType)({[DYn.Hint]:"Recursive",...r},e)}a(Bqs,"Recursive")});var Hnt=T(TY=>{"use strict";f();var Lqs=TY&&TY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fqs=TY&&TY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lqs(e,t,r)};Object.defineProperty(TY,"__esModule",{value:!0});Fqs(NYn(),TY)});var MYn=T(hir=>{"use strict";f();Object.defineProperty(hir,"__esModule",{value:!0});hir.RegExp=Gqs;var Uqs=Xn(),Qqs=Ny(),qqs=nn();function Gqs(t,e){let r=(0,Qqs.IsString)(t)?new globalThis.RegExp(t):t;return(0,Uqs.CreateType)({[qqs.Kind]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},e)}a(Gqs,"RegExp")});var jnt=T(SY=>{"use strict";f();var Hqs=SY&&SY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jqs=SY&&SY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Hqs(e,t,r)};Object.defineProperty(SY,"__esModule",{value:!0});jqs(MYn(),SY)});var OYn=T(gir=>{"use strict";f();Object.defineProperty(gir,"__esModule",{value:!0});gir.Rest=Vqs;var mir=Do();function $qs(t){return(0,mir.IsIntersect)(t)?t.allOf:(0,mir.IsUnion)(t)?t.anyOf:(0,mir.IsTuple)(t)?t.items??[]:[]}a($qs,"RestResolve");function Vqs(t){return $qs(t)}a(Vqs,"Rest")});var $nt=T(IY=>{"use strict";f();var Wqs=IY&&IY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zqs=IY&&IY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wqs(e,t,r)};Object.defineProperty(IY,"__esModule",{value:!0});zqs(OYn(),IY)});var BYn=T(gB=>{"use strict";f();var Yqs=gB&&gB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kqs=gB&&gB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jqs=gB&&gB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var rGs=xY&&xY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nGs=xY&&xY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rGs(e,t,r)};Object.defineProperty(xY,"__esModule",{value:!0});nGs(BYn(),xY)});var FYn=T(LYn=>{"use strict";f();Object.defineProperty(LYn,"__esModule",{value:!0})});var QYn=T(UYn=>{"use strict";f();Object.defineProperty(UYn,"__esModule",{value:!0});var vUd=nn()});var GYn=T(oU=>{"use strict";f();var iGs=oU&&oU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qYn=oU&&oU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iGs(e,t,r)};Object.defineProperty(oU,"__esModule",{value:!0});qYn(FYn(),oU);qYn(QYn(),oU)});var jYn=T(HYn=>{"use strict";f();Object.defineProperty(HYn,"__esModule",{value:!0})});var $Yn=T(wY=>{"use strict";f();var oGs=wY&&wY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sGs=wY&&wY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oGs(e,t,r)};Object.defineProperty(wY,"__esModule",{value:!0});sGs(jYn(),wY)});var VYn=T(RY=>{"use strict";f();Object.defineProperty(RY,"__esModule",{value:!0});RY.TransformEncodeBuilder=RY.TransformDecodeBuilder=void 0;RY.Transform=cGs;var Wnt=nn(),aGs=Do(),znt=class{static{a(this,"TransformDecodeBuilder")}constructor(e){this.schema=e}Decode(e){return new Ynt(this.schema,e)}};RY.TransformDecodeBuilder=znt;var Ynt=class{static{a(this,"TransformEncodeBuilder")}constructor(e,r){this.schema=e,this.decode=r}EncodeTransform(e,r){let s={Encode:a(c=>r[Wnt.TransformKind].Encode(e(c)),"Encode"),Decode:a(c=>this.decode(r[Wnt.TransformKind].Decode(c)),"Decode")};return{...r,[Wnt.TransformKind]:s}}EncodeSchema(e,r){let n={Decode:this.decode,Encode:e};return{...r,[Wnt.TransformKind]:n}}Encode(e){return(0,aGs.IsTransform)(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};RY.TransformEncodeBuilder=Ynt;function cGs(t){return new znt(t)}a(cGs,"Transform")});var Knt=T(PY=>{"use strict";f();var lGs=PY&&PY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),uGs=PY&&PY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&lGs(e,t,r)};Object.defineProperty(PY,"__esModule",{value:!0});uGs(VYn(),PY)});var zYn=T(Air=>{"use strict";f();Object.defineProperty(Air,"__esModule",{value:!0});Air.Unsafe=fGs;var dGs=Xn(),WYn=nn();function fGs(t={}){return(0,dGs.CreateType)({[WYn.Kind]:t[WYn.Kind]??"Unsafe"},t)}a(fGs,"Unsafe")});var WIe=T(kY=>{"use strict";f();var pGs=kY&&kY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hGs=kY&&kY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pGs(e,t,r)};Object.defineProperty(kY,"__esModule",{value:!0});hGs(zYn(),kY)});var YYn=T(yir=>{"use strict";f();Object.defineProperty(yir,"__esModule",{value:!0});yir.Void=AGs;var mGs=Xn(),gGs=nn();function AGs(t){return(0,mGs.CreateType)({[gGs.Kind]:"Void",type:"void"},t)}a(AGs,"Void")});var Jnt=T(DY=>{"use strict";f();var yGs=DY&&DY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),EGs=DY&&DY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yGs(e,t,r)};Object.defineProperty(DY,"__esModule",{value:!0});EGs(YYn(),DY)});var _ir=T(Znt=>{"use strict";f();Object.defineProperty(Znt,"__esModule",{value:!0});Znt.JsonTypeBuilder=void 0;var _Gs=Ple(),CGs=kle(),vGs=SIe(),bGs=pnt(),TGs=mnt(),SGs=Ant(),IGs=Int(),xGs=fY(),wGs=Rnt(),RGs=Zw(),PGs=Dnt(),kGs=Gv(),Xnt=Ont(),DGs=eR(),NGs=lA(),MGs=O0(),OGs=M0(),BGs=qnt(),LGs=OIe(),FGs=Qnt(),UGs=Y7(),QGs=My(),qGs=qIe(),GGs=gD(),HGs=HIe(),jGs=GIe(),$Gs=Z7(),VGs=QIe(),WGs=jle(),zGs=Hnt(),YGs=tU(),KGs=jIe(),JGs=$nt(),XGs=K7(),ZGs=Xw(),eHs=Knt(),tHs=rB(),rHs=Vd(),nHs=rU(),iHs=WIe(),Eir=class{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(e){return(0,VGs.ReadonlyOptional)(e)}Readonly(e,r){return(0,$Gs.Readonly)(e,r??!0)}Optional(e,r){return(0,GGs.Optional)(e,r??!0)}Any(e){return(0,_Gs.Any)(e)}Array(e,r){return(0,CGs.Array)(e,r)}Boolean(e){return(0,vGs.Boolean)(e)}Capitalize(e,r){return(0,Xnt.Capitalize)(e,r)}Composite(e,r){return(0,bGs.Composite)(e,r)}Const(e,r){return(0,TGs.Const)(e,r)}Enum(e,r){return(0,SGs.Enum)(e,r)}Exclude(e,r,n){return(0,IGs.Exclude)(e,r,n)}Extends(e,r,n,o,s){return(0,xGs.Extends)(e,r,n,o,s)}Extract(e,r,n){return(0,wGs.Extract)(e,r,n)}Index(e,r,n){return(0,RGs.Index)(e,r,n)}Integer(e){return(0,PGs.Integer)(e)}Intersect(e,r){return(0,kGs.Intersect)(e,r)}KeyOf(e,r){return(0,DGs.KeyOf)(e,r)}Literal(e,r){return(0,NGs.Literal)(e,r)}Lowercase(e,r){return(0,Xnt.Lowercase)(e,r)}Mapped(e,r,n){return(0,MGs.Mapped)(e,r,n)}Module(e){return(0,FGs.Module)(e)}Never(e){return(0,OGs.Never)(e)}Not(e,r){return(0,BGs.Not)(e,r)}Null(e){return(0,LGs.Null)(e)}Number(e){return(0,UGs.Number)(e)}Object(e,r){return(0,QGs.Object)(e,r)}Omit(e,r,n){return(0,qGs.Omit)(e,r,n)}Partial(e,r){return(0,HGs.Partial)(e,r)}Pick(e,r,n){return(0,jGs.Pick)(e,r,n)}Record(e,r,n){return(0,WGs.Record)(e,r,n)}Recursive(e,r){return(0,zGs.Recursive)(e,r)}Ref(...e){return(0,YGs.Ref)(e[0],e[1])}Required(e,r){return(0,KGs.Required)(e,r)}Rest(e){return(0,JGs.Rest)(e)}String(e){return(0,XGs.String)(e)}TemplateLiteral(e,r){return(0,ZGs.TemplateLiteral)(e,r)}Transform(e){return(0,eHs.Transform)(e)}Tuple(e,r){return(0,tHs.Tuple)(e,r)}Uncapitalize(e,r){return(0,Xnt.Uncapitalize)(e,r)}Union(e,r){return(0,rHs.Union)(e,r)}Unknown(e){return(0,nHs.Unknown)(e)}Unsafe(e){return(0,iHs.Unsafe)(e)}Uppercase(e,r){return(0,Xnt.Uppercase)(e,r)}};Znt.JsonTypeBuilder=Eir});var KYn=T(bt=>{"use strict";f();Object.defineProperty(bt,"__esModule",{value:!0});bt.Rest=bt.Required=bt.RegExp=bt.Ref=bt.Recursive=bt.Record=bt.ReadonlyOptional=bt.Readonly=bt.Promise=bt.Pick=bt.Partial=bt.Parameters=bt.Optional=bt.Omit=bt.Object=bt.Number=bt.Null=bt.Not=bt.Never=bt.Module=bt.Mapped=bt.Literal=bt.KeyOf=bt.Iterator=bt.Uppercase=bt.Lowercase=bt.Uncapitalize=bt.Capitalize=bt.Intersect=bt.Integer=bt.Instantiate=bt.InstanceType=bt.Index=bt.Function=bt.Extract=bt.Extends=bt.Exclude=bt.Enum=bt.Date=bt.ConstructorParameters=bt.Constructor=bt.Const=bt.Composite=bt.Boolean=bt.BigInt=bt.Awaited=bt.AsyncIterator=bt.Array=bt.Argument=bt.Any=void 0;bt.Void=bt.Unsafe=bt.Unknown=bt.Union=bt.Undefined=bt.Uint8Array=bt.Tuple=bt.Transform=bt.TemplateLiteral=bt.Symbol=bt.String=bt.ReturnType=void 0;var oHs=Ple();Object.defineProperty(bt,"Any",{enumerable:!0,get:a(function(){return oHs.Any},"get")});var sHs=Yrt();Object.defineProperty(bt,"Argument",{enumerable:!0,get:a(function(){return sHs.Argument},"get")});var aHs=kle();Object.defineProperty(bt,"Array",{enumerable:!0,get:a(function(){return aHs.Array},"get")});var cHs=Dle();Object.defineProperty(bt,"AsyncIterator",{enumerable:!0,get:a(function(){return cHs.AsyncIterator},"get")});var lHs=NIe();Object.defineProperty(bt,"Awaited",{enumerable:!0,get:a(function(){return lHs.Awaited},"get")});var uHs=Lle();Object.defineProperty(bt,"BigInt",{enumerable:!0,get:a(function(){return uHs.BigInt},"get")});var dHs=SIe();Object.defineProperty(bt,"Boolean",{enumerable:!0,get:a(function(){return dHs.Boolean},"get")});var fHs=pnt();Object.defineProperty(bt,"Composite",{enumerable:!0,get:a(function(){return fHs.Composite},"get")});var pHs=mnt();Object.defineProperty(bt,"Const",{enumerable:!0,get:a(function(){return pHs.Const},"get")});var hHs=Nle();Object.defineProperty(bt,"Constructor",{enumerable:!0,get:a(function(){return hHs.Constructor},"get")});var mHs=gnt();Object.defineProperty(bt,"ConstructorParameters",{enumerable:!0,get:a(function(){return mHs.ConstructorParameters},"get")});var gHs=MIe();Object.defineProperty(bt,"Date",{enumerable:!0,get:a(function(){return gHs.Date},"get")});var AHs=Ant();Object.defineProperty(bt,"Enum",{enumerable:!0,get:a(function(){return AHs.Enum},"get")});var yHs=Int();Object.defineProperty(bt,"Exclude",{enumerable:!0,get:a(function(){return yHs.Exclude},"get")});var EHs=fY();Object.defineProperty(bt,"Extends",{enumerable:!0,get:a(function(){return EHs.Extends},"get")});var _Hs=Rnt();Object.defineProperty(bt,"Extract",{enumerable:!0,get:a(function(){return _Hs.Extract},"get")});var CHs=z7();Object.defineProperty(bt,"Function",{enumerable:!0,get:a(function(){return CHs.Function},"get")});var vHs=Zw();Object.defineProperty(bt,"Index",{enumerable:!0,get:a(function(){return vHs.Index},"get")});var bHs=Pnt();Object.defineProperty(bt,"InstanceType",{enumerable:!0,get:a(function(){return bHs.InstanceType},"get")});var THs=knt();Object.defineProperty(bt,"Instantiate",{enumerable:!0,get:a(function(){return THs.Instantiate},"get")});var SHs=Dnt();Object.defineProperty(bt,"Integer",{enumerable:!0,get:a(function(){return SHs.Integer},"get")});var IHs=Gv();Object.defineProperty(bt,"Intersect",{enumerable:!0,get:a(function(){return IHs.Intersect},"get")});var eit=Ont();Object.defineProperty(bt,"Capitalize",{enumerable:!0,get:a(function(){return eit.Capitalize},"get")});Object.defineProperty(bt,"Uncapitalize",{enumerable:!0,get:a(function(){return eit.Uncapitalize},"get")});Object.defineProperty(bt,"Lowercase",{enumerable:!0,get:a(function(){return eit.Lowercase},"get")});Object.defineProperty(bt,"Uppercase",{enumerable:!0,get:a(function(){return eit.Uppercase},"get")});var xHs=Ule();Object.defineProperty(bt,"Iterator",{enumerable:!0,get:a(function(){return xHs.Iterator},"get")});var wHs=eR();Object.defineProperty(bt,"KeyOf",{enumerable:!0,get:a(function(){return wHs.KeyOf},"get")});var RHs=lA();Object.defineProperty(bt,"Literal",{enumerable:!0,get:a(function(){return RHs.Literal},"get")});var PHs=O0();Object.defineProperty(bt,"Mapped",{enumerable:!0,get:a(function(){return PHs.Mapped},"get")});var kHs=Qnt();Object.defineProperty(bt,"Module",{enumerable:!0,get:a(function(){return kHs.Module},"get")});var DHs=M0();Object.defineProperty(bt,"Never",{enumerable:!0,get:a(function(){return DHs.Never},"get")});var NHs=qnt();Object.defineProperty(bt,"Not",{enumerable:!0,get:a(function(){return NHs.Not},"get")});var MHs=OIe();Object.defineProperty(bt,"Null",{enumerable:!0,get:a(function(){return MHs.Null},"get")});var OHs=Y7();Object.defineProperty(bt,"Number",{enumerable:!0,get:a(function(){return OHs.Number},"get")});var BHs=My();Object.defineProperty(bt,"Object",{enumerable:!0,get:a(function(){return BHs.Object},"get")});var LHs=qIe();Object.defineProperty(bt,"Omit",{enumerable:!0,get:a(function(){return LHs.Omit},"get")});var FHs=gD();Object.defineProperty(bt,"Optional",{enumerable:!0,get:a(function(){return FHs.Optional},"get")});var UHs=Gnt();Object.defineProperty(bt,"Parameters",{enumerable:!0,get:a(function(){return UHs.Parameters},"get")});var QHs=HIe();Object.defineProperty(bt,"Partial",{enumerable:!0,get:a(function(){return QHs.Partial},"get")});var qHs=GIe();Object.defineProperty(bt,"Pick",{enumerable:!0,get:a(function(){return qHs.Pick},"get")});var GHs=PIe();Object.defineProperty(bt,"Promise",{enumerable:!0,get:a(function(){return GHs.Promise},"get")});var HHs=Z7();Object.defineProperty(bt,"Readonly",{enumerable:!0,get:a(function(){return HHs.Readonly},"get")});var jHs=QIe();Object.defineProperty(bt,"ReadonlyOptional",{enumerable:!0,get:a(function(){return jHs.ReadonlyOptional},"get")});var $Hs=jle();Object.defineProperty(bt,"Record",{enumerable:!0,get:a(function(){return $Hs.Record},"get")});var VHs=Hnt();Object.defineProperty(bt,"Recursive",{enumerable:!0,get:a(function(){return VHs.Recursive},"get")});var WHs=tU();Object.defineProperty(bt,"Ref",{enumerable:!0,get:a(function(){return WHs.Ref},"get")});var zHs=jnt();Object.defineProperty(bt,"RegExp",{enumerable:!0,get:a(function(){return zHs.RegExp},"get")});var YHs=jIe();Object.defineProperty(bt,"Required",{enumerable:!0,get:a(function(){return YHs.Required},"get")});var KHs=$nt();Object.defineProperty(bt,"Rest",{enumerable:!0,get:a(function(){return KHs.Rest},"get")});var JHs=Vnt();Object.defineProperty(bt,"ReturnType",{enumerable:!0,get:a(function(){return JHs.ReturnType},"get")});var XHs=K7();Object.defineProperty(bt,"String",{enumerable:!0,get:a(function(){return XHs.String},"get")});var ZHs=BIe();Object.defineProperty(bt,"Symbol",{enumerable:!0,get:a(function(){return ZHs.Symbol},"get")});var ejs=Xw();Object.defineProperty(bt,"TemplateLiteral",{enumerable:!0,get:a(function(){return ejs.TemplateLiteral},"get")});var tjs=Knt();Object.defineProperty(bt,"Transform",{enumerable:!0,get:a(function(){return tjs.Transform},"get")});var rjs=rB();Object.defineProperty(bt,"Tuple",{enumerable:!0,get:a(function(){return rjs.Tuple},"get")});var njs=FIe();Object.defineProperty(bt,"Uint8Array",{enumerable:!0,get:a(function(){return njs.Uint8Array},"get")});var ijs=LIe();Object.defineProperty(bt,"Undefined",{enumerable:!0,get:a(function(){return ijs.Undefined},"get")});var ojs=Vd();Object.defineProperty(bt,"Union",{enumerable:!0,get:a(function(){return ojs.Union},"get")});var sjs=rU();Object.defineProperty(bt,"Unknown",{enumerable:!0,get:a(function(){return sjs.Unknown},"get")});var ajs=WIe();Object.defineProperty(bt,"Unsafe",{enumerable:!0,get:a(function(){return ajs.Unsafe},"get")});var cjs=Jnt();Object.defineProperty(bt,"Void",{enumerable:!0,get:a(function(){return cjs.Void},"get")})});var JYn=T(tit=>{"use strict";f();Object.defineProperty(tit,"__esModule",{value:!0});tit.JavaScriptTypeBuilder=void 0;var ljs=_ir(),ujs=Yrt(),djs=Dle(),fjs=NIe(),pjs=Lle(),hjs=Nle(),mjs=gnt(),gjs=MIe(),Ajs=z7(),yjs=Pnt(),Ejs=knt(),_js=Ule(),Cjs=Gnt(),vjs=PIe(),bjs=jnt(),Tjs=Vnt(),Sjs=BIe(),Ijs=FIe(),xjs=LIe(),wjs=Jnt(),Cir=class extends ljs.JsonTypeBuilder{static{a(this,"JavaScriptTypeBuilder")}Argument(e){return(0,ujs.Argument)(e)}AsyncIterator(e,r){return(0,djs.AsyncIterator)(e,r)}Awaited(e,r){return(0,fjs.Awaited)(e,r)}BigInt(e){return(0,pjs.BigInt)(e)}ConstructorParameters(e,r){return(0,mjs.ConstructorParameters)(e,r)}Constructor(e,r,n){return(0,hjs.Constructor)(e,r,n)}Date(e={}){return(0,gjs.Date)(e)}Function(e,r,n){return(0,Ajs.Function)(e,r,n)}InstanceType(e,r){return(0,yjs.InstanceType)(e,r)}Instantiate(e,r){return(0,Ejs.Instantiate)(e,r)}Iterator(e,r){return(0,_js.Iterator)(e,r)}Parameters(e,r){return(0,Cjs.Parameters)(e,r)}Promise(e,r){return(0,vjs.Promise)(e,r)}RegExp(e,r){return(0,bjs.RegExp)(e,r)}ReturnType(e,r){return(0,Tjs.ReturnType)(e,r)}Symbol(e){return(0,Sjs.Symbol)(e)}Undefined(e){return(0,xjs.Undefined)(e)}Uint8Array(e){return(0,Ijs.Uint8Array)(e)}Void(e){return(0,wjs.Void)(e)}};tit.JavaScriptTypeBuilder=Cir});var XYn=T(oC=>{"use strict";f();var Rjs=oC&&oC.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Pjs=oC&&oC.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kjs=oC&&oC.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var Bjs=Lr&&Lr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zr=Lr&&Lr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Bjs(e,t,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Zr(utr(),Lr);Zr(JO(),Lr);Zr(sd(),Lr);Zr(Etr(),Lr);Zr(ZVn(),Lr);Zr(CIe(),Lr);Zr(Rle(),Lr);Zr(vIe(),Lr);Zr(nn(),Lr);Zr(Ple(),Lr);Zr(kle(),Lr);Zr(Yrt(),Lr);Zr(Dle(),Lr);Zr(NIe(),Lr);Zr(Lle(),Lr);Zr(SIe(),Lr);Zr(pnt(),Lr);Zr(mnt(),Lr);Zr(Nle(),Lr);Zr(gnt(),Lr);Zr(MIe(),Lr);Zr(Ant(),Lr);Zr(Int(),Lr);Zr(fY(),Lr);Zr(Rnt(),Lr);Zr(z7(),Lr);Zr(Zw(),Lr);Zr(Pnt(),Lr);Zr(knt(),Lr);Zr(Dnt(),Lr);Zr(Gv(),Lr);Zr(Ule(),Lr);Zr(Ont(),Lr);Zr(eR(),Lr);Zr(lA(),Lr);Zr(Qnt(),Lr);Zr(O0(),Lr);Zr(M0(),Lr);Zr(qnt(),Lr);Zr(OIe(),Lr);Zr(Y7(),Lr);Zr(My(),Lr);Zr(qIe(),Lr);Zr(gD(),Lr);Zr(Gnt(),Lr);Zr(HIe(),Lr);Zr(GIe(),Lr);Zr(PIe(),Lr);Zr(Z7(),Lr);Zr(QIe(),Lr);Zr(jle(),Lr);Zr(Hnt(),Lr);Zr(tU(),Lr);Zr(jnt(),Lr);Zr(jIe(),Lr);Zr($nt(),Lr);Zr(Vnt(),Lr);Zr(GYn(),Lr);Zr($Yn(),Lr);Zr(K7(),Lr);Zr(BIe(),Lr);Zr(Xw(),Lr);Zr(Knt(),Lr);Zr(rB(),Lr);Zr(FIe(),Lr);Zr(LIe(),Lr);Zr(Vd(),Lr);Zr(rU(),Lr);Zr(WIe(),Lr);Zr(Jnt(),Lr);Zr(XYn(),Lr)});var eKn=T(HS=>{"use strict";f();var Ljs=HS&&HS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fjs=HS&&HS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ujs=HS&&HS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var qjs=CD&&CD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gjs=CD&&CD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hjs=CD&&CD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(nit,"__esModule",{value:!0});nit.ContextItemOrigin=void 0;var nKn;(function(t){function e(r){return r==="request"||r==="update"}a(e,"is"),t.is=e})(nKn||(nit.ContextItemOrigin=nKn={}))});var sKn=T(yl=>{"use strict";f();Object.defineProperty(yl,"__esModule",{value:!0});yl.RangeSchema=yl.WorkspaceFolder=yl.VersionedTextDocumentIdentifier=yl.TextEdit=yl.TextDocumentItem=yl.Range=yl.Position=yl.DocumentUri=yl.Disposable=yl.Command=yl.CancellationTokenSource=yl.CancellationToken=void 0;var iit=rit(),iR=Dn();Object.defineProperty(yl,"CancellationToken",{enumerable:!0,get:a(function(){return iR.CancellationToken},"get")});Object.defineProperty(yl,"CancellationTokenSource",{enumerable:!0,get:a(function(){return iR.CancellationTokenSource},"get")});Object.defineProperty(yl,"Command",{enumerable:!0,get:a(function(){return iR.Command},"get")});Object.defineProperty(yl,"Disposable",{enumerable:!0,get:a(function(){return iR.Disposable},"get")});Object.defineProperty(yl,"DocumentUri",{enumerable:!0,get:a(function(){return iR.DocumentUri},"get")});Object.defineProperty(yl,"Position",{enumerable:!0,get:a(function(){return iR.Position},"get")});Object.defineProperty(yl,"Range",{enumerable:!0,get:a(function(){return iR.Range},"get")});Object.defineProperty(yl,"TextDocumentItem",{enumerable:!0,get:a(function(){return iR.TextDocumentItem},"get")});Object.defineProperty(yl,"TextEdit",{enumerable:!0,get:a(function(){return iR.TextEdit},"get")});Object.defineProperty(yl,"VersionedTextDocumentIdentifier",{enumerable:!0,get:a(function(){return iR.VersionedTextDocumentIdentifier},"get")});Object.defineProperty(yl,"WorkspaceFolder",{enumerable:!0,get:a(function(){return iR.WorkspaceFolder},"get")});var oKn=iit.Type.Object({line:iit.Type.Integer({minimum:0}),character:iit.Type.Integer({minimum:0})});yl.RangeSchema=iit.Type.Object({start:oKn,end:oKn})});var cKn=T(aKn=>{"use strict";f();Object.defineProperty(aKn,"__esModule",{value:!0})});var YIe=T(ad=>{"use strict";f();var $js=ad&&ad.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zIe=ad&&ad.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$js(e,t,r)};Object.defineProperty(ad,"__esModule",{value:!0});ad.TextEdit=ad.Range=ad.Position=ad.Disposable=ad.CancellationTokenSource=ad.CancellationToken=void 0;var Wle=Dn();Object.defineProperty(ad,"CancellationToken",{enumerable:!0,get:a(function(){return Wle.CancellationToken},"get")});Object.defineProperty(ad,"CancellationTokenSource",{enumerable:!0,get:a(function(){return Wle.CancellationTokenSource},"get")});Object.defineProperty(ad,"Disposable",{enumerable:!0,get:a(function(){return Wle.Disposable},"get")});Object.defineProperty(ad,"Position",{enumerable:!0,get:a(function(){return Wle.Position},"get")});Object.defineProperty(ad,"Range",{enumerable:!0,get:a(function(){return Wle.Range},"get")});Object.defineProperty(ad,"TextEdit",{enumerable:!0,get:a(function(){return Wle.TextEdit},"get")});zIe(eKn(),ad);zIe(rKn(),ad);zIe(iKn(),ad);zIe(sKn(),ad);zIe(cKn(),ad)});var bir=T(Hv=>{"use strict";f();var Vjs=Hv&&Hv.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},lKn=Hv&&Hv.__param||function(t,e){return function(r,n){e(r,n,t)}},Wjs=Hv&&Hv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Hv,"__esModule",{value:!0});Hv.CompletionNotifier=Hv.ICompletionsNotifierService=void 0;var zjs=Wjs(require("events")),Yjs=qr(),Kjs=Sz(),Jjs=YIe(),Xjs=xp(),Zjs=uIe(),oit="CompletionRequested";Hv.ICompletionsNotifierService=(0,Yjs.createServiceIdentifier)("ICompletionsNotifierService");var vir=class{static{a(this,"CompletionNotifier")}#e=new zjs.default;constructor(e,r){this.completionsPromiseQueue=e,this.completionsTelemetryService=r}notifyRequest(e,r,n,o,s){return this.#e.emit(oit,{completionId:r,completionState:e,telemetryData:n,cancellationToken:o,options:s})}onRequest(e){let r=(0,Xjs.telemetryCatch)(this.completionsTelemetryService,this.completionsPromiseQueue,e,`event.${oit}`);return this.#e.on(oit,r),Jjs.Disposable.create(()=>this.#e.off(oit,r))}};Hv.CompletionNotifier=vir;Hv.CompletionNotifier=vir=Vjs([lKn(0,Zjs.ICompletionsPromiseQueueService),lKn(1,Kjs.ICompletionsTelemetryService)],vir)});var Tir=T(sit=>{"use strict";f();Object.defineProperty(sit,"__esModule",{value:!0});sit.ICompletionsObservableWorkspace=void 0;var e$s=Po();sit.ICompletionsObservableWorkspace=(0,e$s.createDecorator)("ICompletionsObservableWorkspace")});var uc=T(oR=>{"use strict";f();Object.defineProperty(oR,"__esModule",{value:!0});oR.logger=oR.Logger=oR.ICompletionsLogTargetService=oR.LogLevel=void 0;var t$s=qr(),r$s=Sz(),n$s=xp(),NY;(function(t){t[t.DEBUG=4]="DEBUG",t[t.INFO=3]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=1]="ERROR"})(NY||(oR.LogLevel=NY={}));oR.ICompletionsLogTargetService=(0,t$s.createServiceIdentifier)("ICompletionsLogTargetService");var ait=class{static{a(this,"Logger")}constructor(e){this.category=e}log(e,r,...n){e.logIt(r,this.category,...n)}debug(e,...r){this.log(e,NY.DEBUG,...r)}info(e,...r){this.log(e,NY.INFO,...r)}warn(e,...r){this.log(e,NY.WARN,...r)}error(e,...r){this.log(e,NY.ERROR,...r)}exception(e,r,n){if(r instanceof Error&&r.name==="Canceled"&&r.message==="Canceled")return;let o=n;n.startsWith(".")&&(o=n.substring(1),n=`${this.category}${n}`),(0,n$s.telemetryException)(e.get(r$s.ICompletionsTelemetryService),r,n);let s=r instanceof Error?r:new Error(`Non-error thrown: ${String(r)}`);this.log(e.get(oR.ICompletionsLogTargetService),NY.ERROR,`${o}:`,s)}};oR.Logger=ait;oR.logger=new ait("default")});var dKn=T(sU=>{"use strict";f();Object.defineProperty(sU,"__esModule",{value:!0});sU.INotificationService=sU.NullNotificationService=sU.ProgressLocation=void 0;var i$s=qr(),o$s=n4(),uKn;(function(t){t[t.SourceControl=1]="SourceControl",t[t.Window=10]="Window",t[t.Notification=15]="Notification"})(uKn||(sU.ProgressLocation=uKn={}));var Sir=class{static{a(this,"NullNotificationService")}showInformationMessage(e,r,...n){return Promise.resolve(void 0)}showWarningMessage(e,...r){return Promise.resolve(void 0)}showQuotaExceededDialog(e){return Promise.resolve()}withProgress(e,r){return Promise.resolve(r({report:a(()=>{},"report")},o$s.CancellationToken.None))}};sU.NullNotificationService=Sir;sU.INotificationService=(0,i$s.createServiceIdentifier)("INotificationService")});var xir=T(sR=>{"use strict";f();var s$s=sR&&sR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},a$s=sR&&sR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(sR,"__esModule",{value:!0});sR.ExtensionNotificationSender=sR.ICompletionsNotificationSender=void 0;var c$s=dKn(),l$s=qr();sR.ICompletionsNotificationSender=(0,l$s.createServiceIdentifier)("ICompletionsNotificationSender");var Iir=class{static{a(this,"ExtensionNotificationSender")}constructor(e){this.notificationService=e}async showWarningMessage(e,...r){let n=await this.notificationService.showWarningMessage(e,...r.map(o=>o.title));if(n!==void 0)return{title:n}}};sR.ExtensionNotificationSender=Iir;sR.ExtensionNotificationSender=Iir=s$s([a$s(0,c$s.INotificationService)],Iir)});var Pir=T(aR=>{"use strict";f();var u$s=aR&&aR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},wir=aR&&aR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(aR,"__esModule",{value:!0});aR.UserErrorNotifier=aR.ICompletionsUserErrorNotifierService=void 0;var d$s=Ww(),f$s=qr(),p$s=Eu(),hKn=uc(),h$s=xir(),m$s=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"],fKn="Your proxy connection requires a trusted certificate. Please make sure the proxy certificate and any issuers are configured correctly and trusted by your operating system.",pKn="https://gh.io/copilot-network-errors";aR.ICompletionsUserErrorNotifierService=(0,f$s.createServiceIdentifier)("ICompletionsUserErrorNotifierService");var Rir=class{static{a(this,"UserErrorNotifier")}constructor(e,r,n){this._logTarget=e,this._notificationSender=r,this._env=n,this.notifiedErrorCodes=[]}notifyUser(e){if(!(e instanceof Error))return;let r=e;r.code&&m$s.includes(r.code)&&!this.didNotifyBefore(r.code)&&(this.notifiedErrorCodes.push(r.code),this.displayCertificateErrorNotification(r))}async displayCertificateErrorNotification(e){new hKn.Logger("certificates").error(this._logTarget,`${fKn} Please visit ${pKn} to learn more. Original cause:`,e);let r={title:"Learn more"};return this._notificationSender.showWarningMessage(fKn,r).then(n=>{if(n?.title===r.title)return this._env.openExternal(p$s.URI.parse(pKn))})}didNotifyBefore(e){return this.notifiedErrorCodes.indexOf(e)!==-1}};aR.UserErrorNotifier=Rir;aR.UserErrorNotifier=Rir=u$s([wir(0,hKn.ICompletionsLogTargetService),wir(1,h$s.ICompletionsNotificationSender),wir(2,d$s.IEnvService)],Rir)});var cd=T(zle=>{"use strict";f();Object.defineProperty(zle,"__esModule",{value:!0});zle.NullExperimentationService=zle.IExperimentationService=void 0;var g$s=qr(),A$s=Xa();zle.IExperimentationService=(0,g$s.createServiceIdentifier)("IExperimentationService");var kir=class{static{a(this,"NullExperimentationService")}constructor(){this._onDidTreatmentsChange=new A$s.Emitter,this.onDidTreatmentsChange=this._onDidTreatmentsChange.event}async hasTreatments(){return Promise.resolve()}async hasAccountBasedTreatments(){return Promise.resolve()}getTreatmentVariable(e){}async setCompletionsFilters(e){}};zle.NullExperimentationService=kir});var aU=T(sC=>{"use strict";f();Object.defineProperty(sC,"__esModule",{value:!0});sC.DEFAULT_PROMPT_ALLOCATION_PERCENT=sC.DEFAULT_SUFFIX_MATCH_THRESHOLD=sC.DEFAULT_NUM_SNIPPETS=sC.DEFAULT_MAX_PROMPT_LENGTH=sC.DEFAULT_MAX_COMPLETION_LENGTH=void 0;sC.normalizeLanguageId=E$s;sC.DEFAULT_MAX_COMPLETION_LENGTH=500;sC.DEFAULT_MAX_PROMPT_LENGTH=8192-sC.DEFAULT_MAX_COMPLETION_LENGTH;sC.DEFAULT_NUM_SNIPPETS=4;sC.DEFAULT_SUFFIX_MATCH_THRESHOLD=10;sC.DEFAULT_PROMPT_ALLOCATION_PERCENT={prefix:35,suffix:15,stableContext:35,volatileContext:15};var y$s={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor",c:"cpp"};function E$s(t){return t=t.toLowerCase(),y$s[t]??t}a(E$s,"normalizeLanguageId")});var mKn=T(Dir=>{"use strict";f();Object.defineProperty(Dir,"__esModule",{value:!0});Dir.getUserKind=C$s;function _$s(t){return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","faef89d9169d5eacf1d8c8dde3412e37","4535c7beffc844b46bb1ed4aa04d759a"].find(r=>t.includes(r))}a(_$s,"findKnownOrg");function C$s(t){let e=t.organizationList??[];return _$s(e)??""}a(C$s,"getUserKind")});var KIe=T(vD=>{"use strict";f();Object.defineProperty(vD,"__esModule",{value:!0});vD.IEndpointProvider=vD.ModelSupportedEndpoint=void 0;vD.isEndpointEditToolName=T$s;vD.isChatModelInformation=S$s;vD.isEmbeddingModelInformation=I$s;vD.isCompletionModelInformation=x$s;var v$s=qr(),b$s=new Set(["find-replace","multi-find-replace","apply-patch","code-rewrite"]);function T$s(t){return b$s.has(t)}a(T$s,"isEndpointEditToolName");var gKn;(function(t){t.ChatCompletions="/chat/completions",t.Responses="/responses",t.WebSocketResponses="ws:/responses",t.Messages="/v1/messages"})(gKn||(vD.ModelSupportedEndpoint=gKn={}));function S$s(t){return t.capabilities.type==="chat"}a(S$s,"isChatModelInformation");function I$s(t){return t.capabilities.type==="embeddings"}a(I$s,"isEmbeddingModelInformation");function x$s(t){return t.capabilities.type==="completion"}a(x$s,"isCompletionModelInformation");vD.IEndpointProvider=(0,v$s.createServiceIdentifier)("IEndpointProvider")});var yKn=T(Nir=>{"use strict";f();Object.defineProperty(Nir,"__esModule",{value:!0});Nir.getUserSelectedModelConfiguration=w$s;var AKn=Gm();function w$s(t){let e=(0,AKn.getConfig)(t,AKn.ConfigKey.UserSelectedCompletionModel);return typeof e=="string"&&e.length>0?e:null}a(w$s,"getUserSelectedModelConfiguration")});var _Kn=T($m=>{"use strict";f();Object.defineProperty($m,"__esModule",{value:!0});$m.isReadable=P$s;$m.isReadableStream=EKn;$m.isReadableBufferedStream=k$s;$m.newWriteableStream=JIe;$m.consumeReadable=D$s;$m.peekReadable=N$s;$m.consumeStream=M$s;$m.listenStream=lit;$m.peekStream=O$s;$m.toStream=B$s;$m.emptyStream=L$s;$m.toReadable=F$s;$m.transform=U$s;$m.prefixedReadable=Q$s;$m.prefixedStream=q$s;var R$s=Ko(),cit=ro();function P$s(t){let e=t;return e?typeof e.read=="function":!1}a(P$s,"isReadable");function EKn(t){let e=t;return e?[e.on,e.pause,e.resume,e.destroy].every(r=>typeof r=="function"):!1}a(EKn,"isReadableStream");function k$s(t){let e=t;return e?EKn(e.stream)&&Array.isArray(e.buffer)&&typeof e.ended=="boolean":!1}a(k$s,"isReadableBufferedStream");function JIe(t,e){return new Mir(t,e)}a(JIe,"newWriteableStream");var Mir=class{static{a(this,"WriteableStreamImpl")}constructor(e,r){this.reducer=e,this.options=r,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(e){if(!this.state.destroyed){if(this.state.flowing)this.emitData(e);else if(this.buffer.data.push(e),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(r=>this.pendingWritePromises.push(r))}}error(e){this.state.destroyed||(this.state.flowing?this.emitError(e):this.buffer.error.push(e))}end(e){this.state.destroyed||(typeof e<"u"&&this.write(e),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(e){this.listeners.data.slice(0).forEach(r=>r(e))}emitError(e){this.listeners.error.length===0?(0,R$s.onUnexpectedError)(e):this.listeners.error.slice(0).forEach(r=>r(e))}emitEnd(){this.listeners.end.slice(0).forEach(e=>e())}on(e,r){if(!this.state.destroyed)switch(e){case"data":this.listeners.data.push(r),this.resume();break;case"end":this.listeners.end.push(r),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(r),this.state.flowing&&this.flowErrors();break}}removeListener(e,r){if(this.state.destroyed)return;let n;switch(e){case"data":n=this.listeners.data;break;case"end":n=this.listeners.end;break;case"error":n=this.listeners.error;break}if(n){let o=n.indexOf(r);o>=0&&n.splice(o,1)}}flowData(){if(this.buffer.data.length===0)return;if(typeof this.reducer=="function"){let r=this.reducer(this.buffer.data);this.emitData(r)}else for(let r of this.buffer.data)this.emitData(r);this.buffer.data.length=0;let e=[...this.pendingWritePromises];this.pendingWritePromises.length=0,e.forEach(r=>r())}flowErrors(){if(this.listeners.error.length>0){for(let e of this.buffer.error)this.emitError(e);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}};function D$s(t,e){let r=[],n;for(;(n=t.read())!==null;)r.push(n);return e(r)}a(D$s,"consumeReadable");function N$s(t,e,r){let n=[],o;for(;(o=t.read())!==null&&n.length0?e(n):{read:a(()=>{if(n.length>0)return n.shift();if(typeof o<"u"){let s=o;return o=void 0,s}return t.read()},"read")}}a(N$s,"peekReadable");function M$s(t,e){return new Promise((r,n)=>{let o=[];lit(t,{onData:a(s=>{e&&o.push(s)},"onData"),onError:a(s=>{e?n(s):r(void 0)},"onError"),onEnd:a(()=>{r(e?e(o):void 0)},"onEnd")})})}a(M$s,"consumeStream");function lit(t,e,r){t.on("error",n=>{r?.isCancellationRequested||e.onError(n)}),t.on("end",()=>{r?.isCancellationRequested||e.onEnd()}),t.on("data",n=>{r?.isCancellationRequested||e.onData(n)})}a(lit,"listenStream");function O$s(t,e){return new Promise((r,n)=>{let o=new cit.DisposableStore,s=[],c=a(d=>{if(s.push(d),s.length>e)return o.dispose(),t.pause(),r({stream:t,buffer:s,ended:!1})},"dataListener"),l=a(d=>(o.dispose(),n(d)),"errorListener"),u=a(()=>(o.dispose(),r({stream:t,buffer:s,ended:!0})),"endListener");o.add((0,cit.toDisposable)(()=>t.removeListener("error",l))),t.on("error",l),o.add((0,cit.toDisposable)(()=>t.removeListener("end",u))),t.on("end",u),o.add((0,cit.toDisposable)(()=>t.removeListener("data",c))),t.on("data",c)})}a(O$s,"peekStream");function B$s(t,e){let r=JIe(e);return r.end(t),r}a(B$s,"toStream");function L$s(){let t=JIe(()=>{throw new Error("not supported")});return t.end(),t}a(L$s,"emptyStream");function F$s(t){let e=!1;return{read:a(()=>e?null:(e=!0,t),"read")}}a(F$s,"toReadable");function U$s(t,e,r){let n=JIe(r);return lit(t,{onData:a(o=>n.write(e.data(o)),"onData"),onError:a(o=>n.error(e.error?e.error(o):o),"onError"),onEnd:a(()=>n.end(),"onEnd")}),n}a(U$s,"transform");function Q$s(t,e,r){let n=!1;return{read:a(()=>{let o=e.read();return n?o:(n=!0,o!==null?r([t,o]):t)},"read")}}a(Q$s,"prefixedReadable");function q$s(t,e,r){let n=!1,o=JIe(r);return lit(e,{onData:a(s=>n?o.write(s):(n=!0,o.write(r([t,s]))),"onData"),onError:a(s=>o.error(s),"onError"),onEnd:a(()=>{n||(n=!0,o.write(t)),o.end()},"onEnd")}),o}a(q$s,"prefixedStream")});var lU=T(va=>{"use strict";f();var G$s=va&&va.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),H$s=va&&va.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),j$s=va&&va.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;onew Uint8Array(256)),Oir,Bir,dA=class t{static{a(this,"VSBuffer")}static alloc(e){return XIe?new t(Buffer.allocUnsafe(e)):new t(new Uint8Array(e))}static wrap(e){return XIe&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new t(e)}static fromString(e,r){return!(r?.dontUseNodeBuffer||!1)&&XIe?new t(Buffer.from(e)):(Oir||(Oir=new TextEncoder),new t(Oir.encode(e)))}static fromByteArray(e){let r=t.alloc(e.length);for(let n=0,o=e.length;n"u"){r=0;for(let s=0,c=e.length;sr===e.buffer[n])}};va.VSBuffer=dA;function bKn(t,e,r=0){let n=e.byteLength,o=t.byteLength;if(n===0)return 0;if(n===1)return t.indexOf(e[0],r);if(n>o-r)return-1;let s=V$s.value;s.fill(e.length);for(let d=0;d>>0|t[e+1]<<8>>>0}a(W$s,"readUInt16LE");function z$s(t,e,r){t[r+0]=e&255,e=e>>>8,t[r+1]=e&255}a(z$s,"writeUInt16LE");function TKn(t,e){return t[e]*2**24+t[e+1]*2**16+t[e+2]*2**8+t[e+3]}a(TKn,"readUInt32BE");function SKn(t,e,r){t[r+3]=e,e=e>>>8,t[r+2]=e,e=e>>>8,t[r+1]=e,e=e>>>8,t[r]=e}a(SKn,"writeUInt32BE");function IKn(t,e){return t[e+0]<<0>>>0|t[e+1]<<8>>>0|t[e+2]<<16>>>0|t[e+3]<<24>>>0}a(IKn,"readUInt32LE");function xKn(t,e,r){t[r+0]=e&255,e=e>>>8,t[r+1]=e&255,e=e>>>8,t[r+2]=e&255,e=e>>>8,t[r+3]=e&255}a(xKn,"writeUInt32LE");function wKn(t,e){return t[e]}a(wKn,"readUInt8");function RKn(t,e,r){t[r]=e}a(RKn,"writeUInt8");function Y$s(t){return cU.consumeReadable(t,e=>dA.concat(e))}a(Y$s,"readableToBuffer");function K$s(t){return cU.toReadable(t)}a(K$s,"bufferToReadable");function PKn(t){return cU.consumeStream(t,e=>dA.concat(e))}a(PKn,"streamToBuffer");async function J$s(t){return t.ended?dA.concat(t.buffer):dA.concat([...t.buffer,await PKn(t.stream)])}a(J$s,"bufferedStreamToBuffer");function X$s(t){return cU.toStream(t,e=>dA.concat(e))}a(X$s,"bufferToStream");function Z$s(t){return cU.transform(t,{data:a(e=>typeof e=="string"?dA.fromString(e):dA.wrap(e),"data")},e=>dA.concat(e))}a(Z$s,"streamToBufferReadableStream");function eVs(t){return cU.newWriteableStream(e=>dA.concat(e),t)}a(eVs,"newWriteableBufferStream");function tVs(t,e){return cU.prefixedReadable(t,e,r=>dA.concat(r))}a(tVs,"prefixedBufferReadable");function rVs(t,e){return cU.prefixedStream(t,e,r=>dA.concat(r))}a(rVs,"prefixedBufferStream");function nVs(t){let e=0,r=0,n=0,o=new Uint8Array(Math.floor(t.length/4*3)),s=a(l=>{switch(r){case 3:o[n++]=e|l,r=0;break;case 2:o[n++]=e|l>>>2,e=l<<6,r=3;break;case 1:o[n++]=e|l>>>4,e=l<<4,r=2;break;default:e=l<<2,r=1}},"append");for(let l=0;l=65&&u<=90)s(u-65);else if(u>=97&&u<=122)s(u-97+26);else if(u>=48&&u<=57)s(u-48+52);else if(u===43||u===45)s(62);else if(u===47||u===95)s(63);else{if(u===61)break;throw new SyntaxError(`Unexpected base64 character ${t[l]}`)}}let c=n;for(;r>0;)s(0);return dA.wrap(o).slice(0,c)}a(nVs,"decodeBase64");var iVs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oVs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function sVs({buffer:t},e=!0,r=!1){let n=r?oVs:iVs,o="",s=t.byteLength%3,c=0;for(;c>>2],o+=n[(l<<4|u>>>4)&63],o+=n[(u<<2|d>>>6)&63],o+=n[d&63]}if(s===1){let l=t[c+0];o+=n[l>>>2],o+=n[l<<4&63],e&&(o+="==")}else if(s===2){let l=t[c+0],u=t[c+1];o+=n[l>>>2],o+=n[(l<<4|u>>>4)&63],o+=n[u<<2&63],e&&(o+="=")}return o}a(sVs,"encodeBase64");var CKn="0123456789abcdef";function aVs({buffer:t}){let e="";for(let r=0;r>>4],e+=CKn[n&15]}return e}a(aVs,"encodeHex");function cVs(t){if(t.length%2!==0)throw new SyntaxError("Hex string must have an even length");let e=new Uint8Array(t.length>>1);for(let r=0;r>1]=vKn(t,r++)<<4|vKn(t,r++);return dA.wrap(e)}a(cVs,"decodeHex");function vKn(t,e){let r=t.charCodeAt(e);if(r>=48&&r<=57)return r-48;if(r>=97&&r<=102)return r-87;if(r>=65&&r<=70)return r-55;throw new SyntaxError(`Invalid hex character at position ${e}`)}a(vKn,"decodeHexChar")});var kKn=T(uit=>{"use strict";f();Object.defineProperty(uit,"__esModule",{value:!0});uit.readVariableLengthQuantity=uVs;uit.writeVariableLengthQuantity=dVs;var lVs=lU();function uVs(t,e){let r=0,n=0,o;do o=t.readUInt8(e+n),r|=(o&127)<>>=7,t!==0&&(r|=128),e.push(r)}while(t!==0);return lVs.VSBuffer.fromByteArray(e)}a(dVs,"writeVariableLengthQuantity")});var Lir=T(dit=>{"use strict";f();Object.defineProperty(dit,"__esModule",{value:!0});dit.parseTikTokenBinary=void 0;var fVs=require("fs"),pVs=kKn(),hVs=lU(),mVs=a(t=>{let e=(0,fVs.readFileSync)(t),r=new Map;for(let n=0;n{"use strict";f();Object.defineProperty(fit,"__esModule",{value:!0});fit.CopilotPromptLoadFailure=void 0;var Fir=class extends Error{static{a(this,"CopilotPromptLoadFailure")}constructor(e,r){super(e,{cause:r}),this.code="CopilotPromptLoadFailure"}};fit.CopilotPromptLoadFailure=Fir});var Qir=T(jS=>{"use strict";f();var gVs=jS&&jS.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),AVs=jS&&jS.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yVs=jS&&jS.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(cR,"__esModule",{value:!0});cR.initializeTokenizers=cR.ApproximateTokenizer=cR.TTokenizer=cR.TokenizerName=void 0;cR.getTokenizer=SVs;var qir=cLe(),vVs=Lir(),bVs=Uir(),TVs=Qir(),bD;(function(t){t.cl100k="cl100k_base",t.o200k="o200k_base",t.mock="mock"})(bD||(cR.TokenizerName=bD={}));var pit=new Map;function SVs(t=bD.o200k){let e=pit.get(t);return e!==void 0||(e=pit.get(bD.o200k),e!==void 0)?e:new mit}a(SVs,"getTokenizer");var hit=class t{static{a(this,"TTokenizer")}constructor(e){this._tokenizer=e}static async create(e){try{let r=(0,qir.createTokenizer)((0,vVs.parseTikTokenBinary)((0,TVs.locateFile)(`${e}.tiktoken`)),(0,qir.getSpecialTokensByEncoder)(e),(0,qir.getRegexByEncoder)(e),32768);return new t(r)}catch(r){throw r instanceof Error?new bVs.CopilotPromptLoadFailure("Could not load tokenizer",r):r}}tokenize(e){return this._tokenizer.encode(e)}detokenize(e){return this._tokenizer.decode(e)}tokenLength(e){return this.tokenize(e).length}tokenizeStrings(e){return this.tokenize(e).map(n=>this.detokenize([n]))}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=4,o=1,s=Math.min(e.length,r*n),c=e.slice(-s),l=this.tokenize(c);for(;l.length{let r=0;for(let n=0;nr.toString()).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,r){let n=this.tokenizeStrings(e).slice(-r);return{text:n.join(""),tokens:n.map(this.hash)}}takeFirstTokens(e,r){let n=this.tokenizeStrings(e).slice(0,r);return{text:n.join(""),tokens:n.map(this.hash)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` +`);return n.substring(o+1)}};cR.TTokenizer=hit;var Hir=class{static{a(this,"MockTokenizer")}constructor(){this.hash=e=>{let r=0;for(let n=0;nr.toString()).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,r){let n=this.tokenizeStrings(e).slice(-r);return{text:n.join(""),tokens:n.map(this.hash)}}takeFirstTokens(e,r){let n=this.tokenizeStrings(e).slice(0,r);return{text:n.join(""),tokens:n.map(this.hash)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` `)return n;let o=n.indexOf(` -`);return n.substring(o+1)}},Sjs={[OD.cl100k]:{python:3.99,typescript:4.54,typescriptreact:4.58,javascript:4.76,csharp:5.13,java:4.86,cpp:3.85,php:4.1,html:4.57,vue:4.22,go:3.93,dart:5.66,javascriptreact:4.81,css:3.37},[OD.o200k]:{python:4.05,typescript:4.12,typescriptreact:5.01,javascript:4.47,csharp:5.47,java:4.86,cpp:3.8,php:4.35,html:4.86,vue:4.3,go:4.21,dart:5.7,javascriptreact:4.83,css:3.33}},vir=4,aot=class{static{a(this,"ApproximateTokenizer")}constructor(e=OD.o200k,r){this.languageId=r,this.tokenizerName=e}tokenize(e){return this.tokenizeStrings(e).map(r=>{let n=0;for(let o=0;o{let n=[],o=r.toString();for(;o.length>0;){let s=o.slice(-vir),c=String.fromCharCode(parseInt(s));n.unshift(c),o=o.slice(0,-vir)}return n.join("")}).join("")}tokenizeStrings(e){return e.match(/.{1,4}/g)??[]}getEffectiveTokenLength(){return this.tokenizerName&&this.languageId?Sjs[this.tokenizerName]?.[this.languageId]??4:4}tokenLength(e){return Math.ceil(e.length/this.getEffectiveTokenLength())}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(-Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeFirstTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(0,Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` +`);return n.substring(o+1)}},IVs={[bD.cl100k]:{python:3.99,typescript:4.54,typescriptreact:4.58,javascript:4.76,csharp:5.13,java:4.86,cpp:3.85,php:4.1,html:4.57,vue:4.22,go:3.93,dart:5.66,javascriptreact:4.81,css:3.37},[bD.o200k]:{python:4.05,typescript:4.12,typescriptreact:5.01,javascript:4.47,csharp:5.47,java:4.86,cpp:3.8,php:4.35,html:4.86,vue:4.3,go:4.21,dart:5.7,javascriptreact:4.83,css:3.33}},Gir=4,mit=class{static{a(this,"ApproximateTokenizer")}constructor(e=bD.o200k,r){this.languageId=r,this.tokenizerName=e}tokenize(e){return this.tokenizeStrings(e).map(r=>{let n=0;for(let o=0;o{let n=[],o=r.toString();for(;o.length>0;){let s=o.slice(-Gir),c=String.fromCharCode(parseInt(s));n.unshift(c),o=o.slice(0,-Gir)}return n.join("")}).join("")}tokenizeStrings(e){return e.match(/.{1,4}/g)??[]}getEffectiveTokenLength(){return this.tokenizerName&&this.languageId?IVs[this.tokenizerName]?.[this.languageId]??4:4}tokenLength(e){return Math.ceil(e.length/this.getEffectiveTokenLength())}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(-Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeFirstTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(0,Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` `)return n;let o=n.indexOf(` -`);return n.substring(o+1)}};ER.ApproximateTokenizer=aot;async function OYn(t){try{let e=await sot.create(t);oot.set(t,e)}catch{}}a(OYn,"setTokenizer");ER.initializeTokenizers=(async()=>{oot.set(OD.mock,new bir),await Promise.all([OYn(OD.cl100k),OYn(OD.o200k)])})()});var Oue=T(wK=>{"use strict";f();var Ijs=wK&&wK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xjs=wK&&wK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ijs(e,t,r)};Object.defineProperty(wK,"__esModule",{value:!0});xjs(BYn(),wK)});var Sir=T(CR=>{"use strict";f();var wjs=CR&&CR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},rwe=CR&&CR.__param||function(t,e){return function(r,n){e(r,n,t)}},nwe;Object.defineProperty(CR,"__esModule",{value:!0});CR.AvailableModelsManager=CR.ICompletionsModelManagerService=void 0;var Rjs=gA(),Pjs=Zxe(),kjs=qr(),Njs=so(),Djs=Mo(),Mjs=EYn(),Ojs=Oue(),Bjs=WZt(),Ljs=wnt(),cot=Xm(),Fjs=Zm(),LYn=mc();CR.ICompletionsModelManagerService=(0,kjs.createServiceIdentifier)("ICompletionsModelManagerService");var Ujs="gpt-41-copilot",Tir=nwe=class extends Njs.Disposable{static{a(this,"AvailableModelsManager")}constructor(e=!0,r,n,o,s,c){super(),this._instantiationService=r,this._featuresService=n,this._endpointProvider=o,this._logService=c,this.fetchedModelData=[],this.customModels=[],this.editorPreviewFeaturesDisabled=!1,this._onDidChangeModels=this._register(new Bjs.Emitter),this.onDidChangeModels=this._onDidChangeModels.event,e&&this._register((0,Ljs.onCopilotToken)(s,()=>this.refreshAvailableModels()))}async refreshAvailableModels(){await this.refreshModels()}getDefaultModelId(){if(this.fetchedModelData){let e=nwe.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled)[0];if(e)return e.id}return Ujs}async refreshModels(){let e=await this._endpointProvider.getAllCompletionModels(!0);e&&(this.fetchedModelData=e,this._onDidChangeModels.fire())}getGenericCompletionModels(){let e=nwe.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled);return nwe.mapCompletionModels(e)}getTokenizerForModel(e){let n=this.getGenericCompletionModels().find(o=>o.modelId===e);return n?n.tokenizer:Ojs.TokenizerName.o200k}static filterCompletionModels(e,r){return e.filter(n=>n.capabilities.type==="completion").filter(n=>!r||n.preview===!1||n.preview===void 0)}static filterModelsWithEditorPreviewFeatures(e,r){return e.filter(n=>!r||n.preview===!1||n.preview===void 0)}static mapCompletionModels(e){return e.map(r=>({modelId:r.id,label:r.name,preview:!!r.preview,tokenizer:r.capabilities.tokenizer}))}getCurrentModelRequestInfo(e=void 0){let r=this.getDefaultModelId(),n=this._instantiationService.invokeFunction(Mjs.getUserSelectedModelConfiguration);if(n){let l=this.getGenericCompletionModels().map(u=>u.modelId);l.includes(n)||(l.length>0&&this._logService.logIt(LYn.LogLevel.INFO,`User selected model ${n} is not in the list of generic models: ${l.join(", ")}, falling back to default model.`),n=null),r===n&&(n=null)}let o=this._instantiationService.invokeFunction(cot.getConfig,cot.ConfigKey.DebugOverrideEngine)||this._instantiationService.invokeFunction(cot.getConfig,cot.ConfigKey.DebugOverrideEngineLegacy);if(o)return new LU(o,"override");let s=e?this._featuresService.customEngine(e):void 0,c=e?this._featuresService.customEngineTargetEngine(e):void 0;return n?s&&c&&n===c?new LU(s,"exp"):new LU(n,"modelpicker"):s?new LU(s,"exp"):this.customModels.length>0?new LU(this.customModels[0],"custommodel"):new LU(r,"default")}};CR.AvailableModelsManager=Tir;CR.AvailableModelsManager=Tir=nwe=wjs([rwe(1,Djs.IInstantiationService),rwe(2,Fjs.ICompletionsFeaturesService),rwe(3,Pjs.IEndpointProvider),rwe(4,Rjs.IAuthenticationService),rwe(5,LYn.ICompletionsLogTargetService)],Tir);var LU=class{static{a(this,"ModelRequestInfo")}constructor(e,r){this.modelId=e,this.modelChoiceSource=r}get headers(){return{}}}});var lot=T(Iir=>{"use strict";f();Object.defineProperty(Iir,"__esModule",{value:!0});Iir.getEngineRequestInfo=qjs;var Qjs=Sir();function qjs(t,e=void 0){let r=t.get(Qjs.ICompletionsModelManagerService),n=r.getCurrentModelRequestInfo(e),o=r.getTokenizerForModel(n.modelId);return{headers:n.headers,modelId:n.modelId,engineChoiceSource:n.modelChoiceSource,tokenizer:o}}a(qjs,"getEngineRequestInfo")});var qYn=T(uot=>{"use strict";f();Object.defineProperty(uot,"__esModule",{value:!0});uot.setupCompletionsExperimentationService=Vjs;uot.createCompletionsFilters=QYn;var Gjs=gA(),Hjs=gd(),jjs=Mo(),FYn=gYn(),FU=Xm(),$js=lot(),nI=rnt();function Vjs(t){let e=t.get(Gjs.IAuthenticationService),r=t.get(jjs.IInstantiationService),n=e.onDidAuthenticationChange(()=>{r.invokeFunction(UYn,e.copilotToken)});return UYn(t,e.copilotToken),n}a(Vjs,"setupCompletionsExperimentationService");function Wjs(t){return FU.BuildInfo.getBuildType()===FU.BuildType.NIGHTLY?nI.Release.Nightly:nI.Release.Stable}a(Wjs,"getPluginRelease");function UYn(t,e){let r=t.get(Hjs.IExperimentationService),n=QYn(t,e);r.setCompletionsFilters(n)}a(UYn,"updateCompletionsFilters");function QYn(t,e){let r=new Map;if(r.set(nI.Filter.ExtensionRelease,Wjs(t)),r.set(nI.Filter.CopilotOverrideEngine,(0,FU.getConfig)(t,FU.ConfigKey.DebugOverrideEngine)||(0,FU.getConfig)(t,FU.ConfigKey.DebugOverrideEngineLegacy)),r.set(nI.Filter.CopilotClientVersion,FU.BuildInfo.isProduction()?FU.BuildInfo.getVersion():"1.999.0"),e){let o=(0,FYn.getUserKind)(e),s=e.getTokenValue("ft")??"",c=e.getTokenValue("ol")??"",l=e.getTokenValue("cml")??"",u=e.getTokenValue("tid")??"";r.set(nI.Filter.CopilotUserKind,o),r.set(nI.Filter.CopilotCustomModel,s),r.set(nI.Filter.CopilotOrgs,c),r.set(nI.Filter.CopilotCustomModelNames,l),r.set(nI.Filter.CopilotTrackingId,u),r.set(nI.Filter.CopilotUserKind,(0,FYn.getUserKind)(e))}let n=(0,$js.getEngineRequestInfo)(t).modelId;return r.set(nI.Filter.CopilotEngine,n),r}a(QYn,"createCompletionsFilters")});var GYn=T(OB=>{"use strict";f();var zjs=OB&&OB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},xir=OB&&OB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(OB,"__esModule",{value:!0});OB.Features=void 0;var Yjs=L0(),Kjs=gd(),Jjs=Mo(),Bue=MU(),Xjs=due(),wir=Dp(),Zjs=qYn(),$s=ent(),e$s=rnt(),Rir=class{static{a(this,"Features")}constructor(e,r,n){this.instantiationService=e,this.experimentationService=r,this.copilotTokenManager=n,this.includeNeighboringFilesDefault=new Map,this.excludeRelatedFilesDefault=new Map}async updateExPValuesAndAssignments(e,r=wir.TelemetryData.createAndMarkAsIssued()){if(r instanceof wir.TelemetryWithExp)throw new Error("updateExPValuesAndAssignments should not be called with TelemetryWithExp");let n=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),{filters:o,exp:s}=this.createExpConfigAndFilters(n);return new wir.TelemetryWithExp(r.properties,r.measurements,r.issuedTime,{filters:o,exp:s})}async fetchTokenAndUpdateExPValuesAndAssignments(e,r){return await this.updateExPValuesAndAssignments(e,r)}createExpConfigAndFilters(e){let r={};for(let u of Object.values($s.ExpTreatmentVariables)){let d=this.experimentationService.getTreatmentVariable(u);d!==void 0&&(r[u]=d)}let n=Object.entries(r).map(([u,d])=>u+(d?"":"cf")),o=new $s.ExpConfig(r,n.join(";")),s=this.instantiationService.invokeFunction(Zjs.createCompletionsFilters,e),c={};for(let[u,d]of s.entries())c[u]=d;return{filters:new e$s.FilterSettings(c),exp:o}}async getFallbackExpAndFilters(){let e=this.copilotTokenManager.token??await this.copilotTokenManager.getToken();return this.createExpConfigAndFilters(e)}overrideBlockMode(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.OverrideBlockMode]||void 0}customEngine(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CustomEngine]??""}customEngineTargetEngine(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CustomEngineTargetEngine]}suffixPercent(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.SuffixPercent]??Bue.DEFAULT_PROMPT_ALLOCATION_PERCENT.suffix}suffixMatchThreshold(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.SuffixMatchThreshold]??Bue.DEFAULT_SUFFIX_MATCH_THRESHOLD}cppHeadersEnableSwitch(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CppHeadersEnableSwitch]??!1}relatedFilesVSCodeCSharp(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.RelatedFilesVSCodeCSharp]??!1}relatedFilesVSCodeTypeScript(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.RelatedFilesVSCodeTypeScript]??!1}relatedFilesVSCode(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.RelatedFilesVSCode]??!1}contextProviders(e){let r=e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ContextProviders]??"";return r?r.split(",").map(n=>n.trim()):[]}contextProviderTimeBudget(e,r){let n=r.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ContextProviderTimeBudget]??150;return n||(this.getContextProviderExpSettings(e)?.timeBudget??150)}setIncludeNeighboringFilesDefault(e,r){this.includeNeighboringFilesDefault.set(e,r)}includeNeighboringFiles(e,r){return r.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.IncludeNeighboringFiles]??!1?!0:this.getContextProviderExpSettings(e)?.includeNeighboringFiles??this.includeNeighboringFilesDefault.get(e)??!1}setExcludeRelatedFilesDefault(e,r){this.excludeRelatedFilesDefault.set(e,r)}excludeRelatedFiles(e,r){return r.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ExcludeRelatedFiles]??!1?!0:this.getContextProviderExpSettings(e)?.excludeRelatedFiles??this.excludeRelatedFilesDefault.get(e)??!1}getContextProviderExpSettings(e){let r=this.experimentationService.getTreatmentVariable(`config.github.copilot.chat.contextprovider.${e}`);if(typeof r=="string")try{let n=JSON.parse(r),o=this.getProviderIDs(n);return delete n.id,delete n.ids,Object.assign({ids:o},{includeNeighboringFiles:!1,excludeRelatedFiles:!1,timeBudget:150},n)}catch{this.instantiationService.invokeFunction(o=>{o.get(Yjs.ILogService).error(`Failed to parse context provider exp settings for language ${e}`)});return}else return}getProviderIDs(e){let r=[];if(typeof e.id=="string"&&e.id.length>0&&r.push(e.id),Array.isArray(e.ids))for(let n of e.ids)typeof n=="string"&&n.length>0&&r.push(n);return r}maxPromptCompletionTokens(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.MaxPromptCompletionTokens]??Bue.DEFAULT_MAX_PROMPT_LENGTH+Bue.DEFAULT_MAX_COMPLETION_LENGTH}stableContextPercent(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.StableContextPercent]??Bue.DEFAULT_PROMPT_ALLOCATION_PERCENT.stableContext}volatileContextPercent(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.VolatileContextPercent]??Bue.DEFAULT_PROMPT_ALLOCATION_PERCENT.volatileContext}cppContextProviderParams(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CppContextProviderParams]}csharpContextProviderParams(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CSharpContextProviderParams]}javaContextProviderParams(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.JavaContextProviderParams]}multiLanguageContextProviderParams(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.MultiLanguageContextProviderParams]}tsContextProviderParams(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.TsContextProviderParams]}completionsDebounce(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CompletionsDebounce]}enableElectronFetcher(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ElectronFetcher]??!1}enableFetchFetcher(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.FetchFetcher]??!1}asyncCompletionsTimeout(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.AsyncCompletionsTimeout]??200}enableProgressiveReveal(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ProgressiveReveal]??!1}modelAlwaysTerminatesSingleline(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ModelAlwaysTerminatesSingleline]??!0}longLookaheadSize(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ProgressiveRevealLongLookaheadSize]??9}shortLookaheadSize(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.ProgressiveRevealShortLookaheadSize]??3}maxMultilineTokens(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.MaxMultilineTokens]??200}multilineAfterAcceptLines(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.MultilineAfterAcceptLines]??1}completionsDelay(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.CompletionsDelay]??200}singleLineUnlessAccepted(e){return e.filtersAndExp.exp.variables[$s.ExpTreatmentVariables.SingleLineUnlessAccepted]??!1}};OB.Features=Rir;OB.Features=Rir=zjs([xir(0,Jjs.IInstantiationService),xir(1,Kjs.IExperimentationService),xir(2,Xjs.ICompletionsCopilotTokenManager)],Rir)});var UU=T(Lue=>{"use strict";f();Object.defineProperty(Lue,"__esModule",{value:!0});Lue.ICompletionsFileSystemService=Lue.FileType=void 0;var t$s=qr(),HYn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(HYn||(Lue.FileType=HYn={}));Lue.ICompletionsFileSystemService=(0,t$s.createServiceIdentifier)("ICompletionsFileSystemService")});var Pir=T(dot=>{"use strict";f();Object.defineProperty(dot,"__esModule",{value:!0});dot.knownLanguages=void 0;dot.knownLanguages={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}}});var $Yn=T(QU=>{"use strict";f();Object.defineProperty(QU,"__esModule",{value:!0});QU.knownFileExtensions=QU.templateLanguageLimitations=QU.knownTemplateLanguageExtensions=void 0;var jYn=Pir();QU.knownTemplateLanguageExtensions=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"];QU.templateLanguageLimitations={".php":[".blade"]};QU.knownFileExtensions=Object.keys(jYn.knownLanguages).flatMap(t=>jYn.knownLanguages[t].extensions)});var qU=T(_R=>{"use strict";f();Object.defineProperty(_R,"__esModule",{value:!0});_R.makeFsUri=s$s;_R.validateUri=a$s;_R.normalizeUri=c$s;_R.fsPath=YYn;_R.getFsPath=KYn;_R.getFsUri=l$s;_R.joinPath=u$s;_R.basename=p$s;_R.dirname=h$s;var r$s=require("os"),n$s=require("path"),i$s=Tk(),iwe=Ru();function WYn(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substring(0,3)+WYn(t.substring(3)):t}}a(WYn,"decodeURIComponentGraceful");var VYn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function o$s(t){return t.match(VYn)?t.replace(VYn,e=>WYn(e)):t}a(o$s,"percentDecode");function s$s(t){if(/^[A-Za-z][A-Za-z0-9+.-]+:/.test(t))throw new Error("Path must not contain a scheme");if(!t)throw new Error("Path must not be empty");return iwe.URI.file(t).toString()}a(s$s,"makeFsUri");function owe(t){if(typeof t!="string"&&(t=t.uri),/^[A-Za-z]:\\/.test(t))throw new Error(`Could not parse <${t}>: Windows-style path`);try{let e=t.match(/^(?:([^:/?#]+?:)?\/\/)(\/\/.*)$/);return e?iwe.URI.parse(e[1]+e[2],!0):iwe.URI.parse(t,!0)}catch(e){throw new Error(`Could not parse <${t}>`,{cause:e})}}a(owe,"parseUri");function a$s(t){return owe(t),t}a(a$s,"validateUri");function c$s(t){try{return owe(t).toString()}catch{return t}}a(c$s,"normalizeUri");var zYn=new Set(["file","notebook","vscode-notebook","vscode-notebook-cell"]);function YYn(t){let e=owe(t);if(!zYn.has(e.scheme))throw new Error(`Copilot currently does not support URI with scheme: ${e.scheme}`);if((0,r$s.platform)()==="win32"){let r=e.path;return e.authority?r=`//${e.authority}${e.path}`:/^\/[A-Za-z]:/.test(r)&&(r=r.substring(1)),(0,n$s.normalize)(r)}else{if(e.authority)throw new Error("Unsupported remote file path");return e.path}}a(YYn,"fsPath");function KYn(t){try{return YYn(t)}catch{return}}a(KYn,"getFsPath");function l$s(t){let e=KYn(t);if(e)return iwe.URI.file(e).toString()}a(l$s,"getFsUri");function u$s(t,...e){let r=iwe.URI.joinPath(owe(t),...e.map(d$s)).toString();return typeof t=="string"?r:{uri:r}}a(u$s,"joinPath");function d$s(t){return f$s(t)?t.replaceAll("\\","/"):t}a(d$s,"pathToURIPath");function f$s(t){return/^[^/\\]*\\/.test(t)}a(f$s,"isWinPath");function p$s(t){return o$s((typeof t=="string"?t:t.uri).replace(/[#?].*$/,"").replace(/\/$/,"").replace(/^.*[/:]/,""))}a(p$s,"basename");function h$s(t){let e=(0,i$s.dirname)(owe(t)),r;return zYn.has(e.scheme)&&e.scheme!=="file"?r=e.with({scheme:"file",fragment:""}).toString():r=e.toString(),typeof t=="string"?r:{uri:r}}a(h$s,"dirname")});var XYn=T(CA=>{"use strict";f();var m$s=CA&&CA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),g$s=CA&&CA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),A$s=CA&&CA.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o0&&kir.knownFileExtensions.includes(o)&&this.isExtensionValidForTemplateLanguage(r,o))return o}return r}isExtensionValidForTemplateLanguage(e,r){let n=kir.templateLanguageLimitations[e];return!n||n.includes(r)}detectLanguageId(e,r){if(Fue.has(e))return{languageId:Fue.get(e)[0],isGuess:!1};let n=Nir.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;e.includes(".");)if(e=e.replace(/\.[^.]*$/,""),Fue.has(e))return{languageId:Fue.get(e)[0],isGuess:!1}}computeFullyQualifiedExtension(e,r){return e!==r?r+e:e}},Mir=class extends Uue{static{a(this,"GroupingLanguageDetection")}constructor(e){super(),this.delegate=e}detectLanguage(e){let r=this.delegate.detectLanguage(e),n=r.languageId;return n==="c"||n==="cpp"?new RK("cpp",r.isGuess,r.fileExtension):r}},Oir=class extends Uue{static{a(this,"ClientProvidedLanguageDetection")}constructor(e){super(),this.delegate=e}detectLanguage(e){return e.uri.startsWith("untitled:")||e.uri.startsWith("vscode-notebook-cell:")?new RK(e.languageId,!0,""):this.delegate.detectLanguage(e)}};CA.languageDetection=new Mir(new Oir(new Dir));function C$s({uri:t,languageId:e}){let r=CA.languageDetection.detectLanguage({uri:t,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?e:r.languageId}a(C$s,"detectLanguage")});var que=T(Que=>{"use strict";f();Object.defineProperty(Que,"__esModule",{value:!0});Que.CopilotTextDocument=Que.LocationFactory=void 0;var _$s=XYn(),v$s=qU(),swe=(AIt(),ba(LFr)),GU=Jpe(),Bir=class{static{a(this,"LocationFactory")}static{this.range=GU.Range.create.bind(GU.Range)}static{this.position=GU.Position.create.bind(GU.Position)}};Que.LocationFactory=Bir;var Lir=class t{static{a(this,"CopilotTextDocument")}constructor(e,r,n){this.uri=e,this._textDocument=r,this.detectedLanguageId=n}static withChanges(e,r,n){let o=swe.TextDocument.create(e.clientUri,e.clientLanguageId,n,e.getText());return swe.TextDocument.update(o,r,n),new t(e.uri,o,e.detectedLanguageId)}applyEdits(e){let r=swe.TextDocument.create(this.clientUri,this.clientLanguageId,this.version,this.getText());return swe.TextDocument.update(r,e.map(n=>({text:n.newText,range:n.range})),this.version),new t(this.uri,r,this.detectedLanguageId)}static create(e,r,n,o,s=(0,_$s.detectLanguage)({uri:e,languageId:r})){return new t((0,v$s.normalizeUri)(e),swe.TextDocument.create(e,r,n,o),s)}get clientUri(){return this._textDocument.uri}get clientLanguageId(){return this._textDocument.languageId}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){let r=typeof e=="number"?e:e.line;if(r<0||r>=this.lineCount)throw new RangeError("Illegal value for lineNumber");let n=GU.Range.create(r,0,r+1,0),o=this.getText(n).replace(/\r\n$|\r$|\n$/g,""),s=GU.Range.create(GU.Position.create(r,0),GU.Position.create(r,o.length)),c=o.trim().length===0;return{text:o,range:s,isEmptyOrWhitespace:c}}};Que.CopilotTextDocument=Lir});var pot=T((XUd,rKn)=>{"use strict";f();var Fir=Object.defineProperty,b$s=Object.getOwnPropertyDescriptor,T$s=Object.getOwnPropertyNames,S$s=Object.prototype.hasOwnProperty,I$s=a((t,e)=>{for(var r in e)Fir(t,r,{get:e[r],enumerable:!0})},"__export"),x$s=a((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of T$s(e))!S$s.call(t,o)&&o!==r&&Fir(t,o,{get:a(()=>e[o],"get"),enumerable:!(n=b$s(e,o))||n.enumerable});return t},"__copyProps"),w$s=a(t=>x$s(Fir({},"__esModule",{value:!0}),t),"__toCommonJS"),eKn={};I$s(eKn,{config:a(()=>D$s,"config"),t:a(()=>tKn,"t")});rKn.exports=w$s(eKn);var R$s=require("fs"),P$s=require("fs/promises");async function k$s(t){if(t.protocol==="file:")return await(0,P$s.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let n=`Unexpected ${e.status} response while trying to read ${t}`;try{n+=`: ${await e.text()}`}catch{}throw new Error(n)}return await e.text()}throw new Error("Unsupported protocol")}a(k$s,"readFileFromUri");function N$s(t){return(0,R$s.readFileSync)(t,"utf8")}a(N$s,"readFileFromFsPath");var awe;function D$s(t){if("contents"in t){typeof t.contents=="string"?awe=JSON.parse(t.contents):awe=t.contents;return}if("fsPath"in t){let e=N$s(t.fsPath),r=JSON.parse(e);awe=ZYn(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,n)=>{k$s(e).then(o=>{try{let s=JSON.parse(o);awe=ZYn(s)?s.contents.bundle:s,r()}catch(s){n(s)}}).catch(o=>{n(o)})})}}a(D$s,"config");function tKn(...t){let e=t[0],r,n,o;if(typeof e=="string")r=e,n=e,t.splice(0,1),o=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let c=t.slice(1);if(e.length!==c.length+1)throw new Error("expected a string as the first argument to l10n.t");let l=e[0];for(let u=1;u0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),o=e.args??{};let s=awe?.[r];return s?typeof s=="string"?fot(s,o):s.comment?fot(s.message,o):fot(n,o):fot(n,o)}a(tKn,"t");var M$s=/{([^}]+)}/g;function fot(t,e){return Object.keys(e).length===0?t:t.replace(M$s,(r,n)=>e[n]??r)}a(fot,"format");function ZYn(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}a(ZYn,"isBuiltinExtension")});var PK=T(zy=>{"use strict";f();var O$s=zy&&zy.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),B$s=zy&&zy.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),L$s=zy&&zy.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{pit.set(bD.mock,new Hir),await Promise.all([MKn(bD.cl100k),MKn(bD.o200k)])})()});var Yle=T(OY=>{"use strict";f();var xVs=OY&&OY.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wVs=OY&&OY.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xVs(e,t,r)};Object.defineProperty(OY,"__esModule",{value:!0});wVs(OKn(),OY)});var $ir=T(lR=>{"use strict";f();var RVs=lR&&lR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},ZIe=lR&&lR.__param||function(t,e){return function(r,n){e(r,n,t)}},exe;Object.defineProperty(lR,"__esModule",{value:!0});lR.AvailableModelsManager=lR.ICompletionsModelManagerService=void 0;var PVs=cA(),kVs=KIe(),DVs=qr(),NVs=ro(),MVs=Po(),OVs=yKn(),BVs=Yle(),LVs=per(),FVs=Brt(),git=Gm(),UVs=Hm(),BKn=uc();lR.ICompletionsModelManagerService=(0,DVs.createServiceIdentifier)("ICompletionsModelManagerService");var QVs="gpt-41-copilot",jir=exe=class extends NVs.Disposable{static{a(this,"AvailableModelsManager")}constructor(e=!0,r,n,o,s,c){super(),this._instantiationService=r,this._featuresService=n,this._endpointProvider=o,this._logService=c,this.fetchedModelData=[],this.customModels=[],this.editorPreviewFeaturesDisabled=!1,this._onDidChangeModels=this._register(new LVs.Emitter),this.onDidChangeModels=this._onDidChangeModels.event,e&&this._register((0,FVs.onCopilotToken)(s,()=>this.refreshAvailableModels()))}async refreshAvailableModels(){await this.refreshModels()}getDefaultModelId(){if(this.fetchedModelData){let e=exe.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled)[0];if(e)return e.id}return QVs}async refreshModels(){let e=await this._endpointProvider.getAllCompletionModels(!0);e&&(this.fetchedModelData=e,this._onDidChangeModels.fire())}getGenericCompletionModels(){let e=exe.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled);return exe.mapCompletionModels(e)}getTokenizerForModel(e){let n=this.getGenericCompletionModels().find(o=>o.modelId===e);return n?n.tokenizer:BVs.TokenizerName.o200k}static filterCompletionModels(e,r){return e.filter(n=>n.capabilities.type==="completion").filter(n=>!r||n.preview===!1||n.preview===void 0)}static filterModelsWithEditorPreviewFeatures(e,r){return e.filter(n=>!r||n.preview===!1||n.preview===void 0)}static mapCompletionModels(e){return e.map(r=>({modelId:r.id,label:r.name,preview:!!r.preview,tokenizer:r.capabilities.tokenizer}))}getCurrentModelRequestInfo(e=void 0){let r=this.getDefaultModelId(),n=this._instantiationService.invokeFunction(OVs.getUserSelectedModelConfiguration);if(n){let l=this.getGenericCompletionModels().map(u=>u.modelId);l.includes(n)||(l.length>0&&this._logService.logIt(BKn.LogLevel.INFO,`User selected model ${n} is not in the list of generic models: ${l.join(", ")}, falling back to default model.`),n=null),r===n&&(n=null)}let o=this._instantiationService.invokeFunction(git.getConfig,git.ConfigKey.DebugOverrideEngine)||this._instantiationService.invokeFunction(git.getConfig,git.ConfigKey.DebugOverrideEngineLegacy);if(o)return new uU(o,"override");let s=e?this._featuresService.customEngine(e):void 0,c=e?this._featuresService.customEngineTargetEngine(e):void 0;return n?s&&c&&n===c?new uU(s,"exp"):new uU(n,"modelpicker"):s?new uU(s,"exp"):this.customModels.length>0?new uU(this.customModels[0],"custommodel"):new uU(r,"default")}};lR.AvailableModelsManager=jir;lR.AvailableModelsManager=jir=exe=RVs([ZIe(1,MVs.IInstantiationService),ZIe(2,UVs.ICompletionsFeaturesService),ZIe(3,kVs.IEndpointProvider),ZIe(4,PVs.IAuthenticationService),ZIe(5,BKn.ICompletionsLogTargetService)],jir);var uU=class{static{a(this,"ModelRequestInfo")}constructor(e,r){this.modelId=e,this.modelChoiceSource=r}get headers(){return{}}}});var Ait=T(Vir=>{"use strict";f();Object.defineProperty(Vir,"__esModule",{value:!0});Vir.getEngineRequestInfo=GVs;var qVs=$ir();function GVs(t,e=void 0){let r=t.get(qVs.ICompletionsModelManagerService),n=r.getCurrentModelRequestInfo(e),o=r.getTokenizerForModel(n.modelId);return{headers:n.headers,modelId:n.modelId,engineChoiceSource:n.modelChoiceSource,tokenizer:o}}a(GVs,"getEngineRequestInfo")});var QKn=T(yit=>{"use strict";f();Object.defineProperty(yit,"__esModule",{value:!0});yit.setupCompletionsExperimentationService=WVs;yit.createCompletionsFilters=UKn;var HVs=cA(),jVs=cd(),$Vs=Po(),LKn=mKn(),dU=Gm(),VVs=Ait(),$S=urt();function WVs(t){let e=t.get(HVs.IAuthenticationService),r=t.get($Vs.IInstantiationService),n=e.onDidAuthenticationChange(()=>{r.invokeFunction(FKn,e.copilotToken)});return FKn(t,e.copilotToken),n}a(WVs,"setupCompletionsExperimentationService");function zVs(t){return dU.BuildInfo.getBuildType()===dU.BuildType.NIGHTLY?$S.Release.Nightly:$S.Release.Stable}a(zVs,"getPluginRelease");function FKn(t,e){let r=t.get(jVs.IExperimentationService),n=UKn(t,e);r.setCompletionsFilters(n)}a(FKn,"updateCompletionsFilters");function UKn(t,e){let r=new Map;if(r.set($S.Filter.ExtensionRelease,zVs(t)),r.set($S.Filter.CopilotOverrideEngine,(0,dU.getConfig)(t,dU.ConfigKey.DebugOverrideEngine)||(0,dU.getConfig)(t,dU.ConfigKey.DebugOverrideEngineLegacy)),r.set($S.Filter.CopilotClientVersion,dU.BuildInfo.isProduction()?dU.BuildInfo.getVersion():"1.999.0"),e){let o=(0,LKn.getUserKind)(e),s=e.getTokenValue("ft")??"",c=e.getTokenValue("ol")??"",l=e.getTokenValue("cml")??"",u=e.getTokenValue("tid")??"";r.set($S.Filter.CopilotUserKind,o),r.set($S.Filter.CopilotCustomModel,s),r.set($S.Filter.CopilotOrgs,c),r.set($S.Filter.CopilotCustomModelNames,l),r.set($S.Filter.CopilotTrackingId,u),r.set($S.Filter.CopilotUserKind,(0,LKn.getUserKind)(e))}let n=(0,VVs.getEngineRequestInfo)(t).modelId;return r.set($S.Filter.CopilotEngine,n),r}a(UKn,"createCompletionsFilters")});var qKn=T(AB=>{"use strict";f();var YVs=AB&&AB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Wir=AB&&AB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(AB,"__esModule",{value:!0});AB.Features=void 0;var KVs=D0(),JVs=cd(),XVs=Po(),Kle=aU(),ZVs=Sle(),zir=xp(),eWs=QKn(),qs=crt(),tWs=urt(),Yir=class{static{a(this,"Features")}constructor(e,r,n){this.instantiationService=e,this.experimentationService=r,this.copilotTokenManager=n,this.includeNeighboringFilesDefault=new Map,this.excludeRelatedFilesDefault=new Map}async updateExPValuesAndAssignments(e,r=zir.TelemetryData.createAndMarkAsIssued()){if(r instanceof zir.TelemetryWithExp)throw new Error("updateExPValuesAndAssignments should not be called with TelemetryWithExp");let n=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),{filters:o,exp:s}=this.createExpConfigAndFilters(n);return new zir.TelemetryWithExp(r.properties,r.measurements,r.issuedTime,{filters:o,exp:s})}async fetchTokenAndUpdateExPValuesAndAssignments(e,r){return await this.updateExPValuesAndAssignments(e,r)}createExpConfigAndFilters(e){let r={};for(let u of Object.values(qs.ExpTreatmentVariables)){let d=this.experimentationService.getTreatmentVariable(u);d!==void 0&&(r[u]=d)}let n=Object.entries(r).map(([u,d])=>u+(d?"":"cf")),o=new qs.ExpConfig(r,n.join(";")),s=this.instantiationService.invokeFunction(eWs.createCompletionsFilters,e),c={};for(let[u,d]of s.entries())c[u]=d;return{filters:new tWs.FilterSettings(c),exp:o}}async getFallbackExpAndFilters(){let e=this.copilotTokenManager.token??await this.copilotTokenManager.getToken();return this.createExpConfigAndFilters(e)}overrideBlockMode(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.OverrideBlockMode]||void 0}customEngine(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CustomEngine]??""}customEngineTargetEngine(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CustomEngineTargetEngine]}suffixPercent(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.SuffixPercent]??Kle.DEFAULT_PROMPT_ALLOCATION_PERCENT.suffix}suffixMatchThreshold(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.SuffixMatchThreshold]??Kle.DEFAULT_SUFFIX_MATCH_THRESHOLD}cppHeadersEnableSwitch(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CppHeadersEnableSwitch]??!1}relatedFilesVSCodeCSharp(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.RelatedFilesVSCodeCSharp]??!1}relatedFilesVSCodeTypeScript(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.RelatedFilesVSCodeTypeScript]??!1}relatedFilesVSCode(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.RelatedFilesVSCode]??!1}contextProviders(e){let r=e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ContextProviders]??"";return r?r.split(",").map(n=>n.trim()):[]}contextProviderTimeBudget(e,r){let n=r.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ContextProviderTimeBudget]??150;return n||(this.getContextProviderExpSettings(e)?.timeBudget??150)}setIncludeNeighboringFilesDefault(e,r){this.includeNeighboringFilesDefault.set(e,r)}includeNeighboringFiles(e,r){return r.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.IncludeNeighboringFiles]??!1?!0:this.getContextProviderExpSettings(e)?.includeNeighboringFiles??this.includeNeighboringFilesDefault.get(e)??!1}setExcludeRelatedFilesDefault(e,r){this.excludeRelatedFilesDefault.set(e,r)}excludeRelatedFiles(e,r){return r.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ExcludeRelatedFiles]??!1?!0:this.getContextProviderExpSettings(e)?.excludeRelatedFiles??this.excludeRelatedFilesDefault.get(e)??!1}getContextProviderExpSettings(e){let r=this.experimentationService.getTreatmentVariable(`config.github.copilot.chat.contextprovider.${e}`);if(typeof r=="string")try{let n=JSON.parse(r),o=this.getProviderIDs(n);return delete n.id,delete n.ids,Object.assign({ids:o},{includeNeighboringFiles:!1,excludeRelatedFiles:!1,timeBudget:150},n)}catch{this.instantiationService.invokeFunction(o=>{o.get(KVs.ILogService).error(`Failed to parse context provider exp settings for language ${e}`)});return}else return}getProviderIDs(e){let r=[];if(typeof e.id=="string"&&e.id.length>0&&r.push(e.id),Array.isArray(e.ids))for(let n of e.ids)typeof n=="string"&&n.length>0&&r.push(n);return r}maxPromptCompletionTokens(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.MaxPromptCompletionTokens]??Kle.DEFAULT_MAX_PROMPT_LENGTH+Kle.DEFAULT_MAX_COMPLETION_LENGTH}stableContextPercent(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.StableContextPercent]??Kle.DEFAULT_PROMPT_ALLOCATION_PERCENT.stableContext}volatileContextPercent(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.VolatileContextPercent]??Kle.DEFAULT_PROMPT_ALLOCATION_PERCENT.volatileContext}cppContextProviderParams(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CppContextProviderParams]}csharpContextProviderParams(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CSharpContextProviderParams]}javaContextProviderParams(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.JavaContextProviderParams]}multiLanguageContextProviderParams(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.MultiLanguageContextProviderParams]}tsContextProviderParams(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.TsContextProviderParams]}completionsDebounce(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CompletionsDebounce]}enableElectronFetcher(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ElectronFetcher]??!1}enableFetchFetcher(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.FetchFetcher]??!1}asyncCompletionsTimeout(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.AsyncCompletionsTimeout]??200}enableProgressiveReveal(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ProgressiveReveal]??!1}modelAlwaysTerminatesSingleline(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ModelAlwaysTerminatesSingleline]??!0}longLookaheadSize(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ProgressiveRevealLongLookaheadSize]??9}shortLookaheadSize(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.ProgressiveRevealShortLookaheadSize]??3}maxMultilineTokens(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.MaxMultilineTokens]??200}multilineAfterAcceptLines(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.MultilineAfterAcceptLines]??1}completionsDelay(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.CompletionsDelay]??200}singleLineUnlessAccepted(e){return e.filtersAndExp.exp.variables[qs.ExpTreatmentVariables.SingleLineUnlessAccepted]??!1}};AB.Features=Yir;AB.Features=Yir=YVs([Wir(0,XVs.IInstantiationService),Wir(1,JVs.IExperimentationService),Wir(2,ZVs.ICompletionsCopilotTokenManager)],Yir)});var fU=T(Jle=>{"use strict";f();Object.defineProperty(Jle,"__esModule",{value:!0});Jle.ICompletionsFileSystemService=Jle.FileType=void 0;var rWs=qr(),GKn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(GKn||(Jle.FileType=GKn={}));Jle.ICompletionsFileSystemService=(0,rWs.createServiceIdentifier)("ICompletionsFileSystemService")});var Kir=T(Eit=>{"use strict";f();Object.defineProperty(Eit,"__esModule",{value:!0});Eit.knownLanguages=void 0;Eit.knownLanguages={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}}});var jKn=T(pU=>{"use strict";f();Object.defineProperty(pU,"__esModule",{value:!0});pU.knownFileExtensions=pU.templateLanguageLimitations=pU.knownTemplateLanguageExtensions=void 0;var HKn=Kir();pU.knownTemplateLanguageExtensions=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"];pU.templateLanguageLimitations={".php":[".blade"]};pU.knownFileExtensions=Object.keys(HKn.knownLanguages).flatMap(t=>HKn.knownLanguages[t].extensions)});var hU=T(uR=>{"use strict";f();Object.defineProperty(uR,"__esModule",{value:!0});uR.makeFsUri=aWs;uR.validateUri=cWs;uR.normalizeUri=lWs;uR.fsPath=zKn;uR.getFsPath=YKn;uR.getFsUri=uWs;uR.joinPath=dWs;uR.basename=hWs;uR.dirname=mWs;var nWs=require("os"),iWs=require("path"),oWs=fk(),txe=Eu();function VKn(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substring(0,3)+VKn(t.substring(3)):t}}a(VKn,"decodeURIComponentGraceful");var $Kn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function sWs(t){return t.match($Kn)?t.replace($Kn,e=>VKn(e)):t}a(sWs,"percentDecode");function aWs(t){if(/^[A-Za-z][A-Za-z0-9+.-]+:/.test(t))throw new Error("Path must not contain a scheme");if(!t)throw new Error("Path must not be empty");return txe.URI.file(t).toString()}a(aWs,"makeFsUri");function rxe(t){if(typeof t!="string"&&(t=t.uri),/^[A-Za-z]:\\/.test(t))throw new Error(`Could not parse <${t}>: Windows-style path`);try{let e=t.match(/^(?:([^:/?#]+?:)?\/\/)(\/\/.*)$/);return e?txe.URI.parse(e[1]+e[2],!0):txe.URI.parse(t,!0)}catch(e){throw new Error(`Could not parse <${t}>`,{cause:e})}}a(rxe,"parseUri");function cWs(t){return rxe(t),t}a(cWs,"validateUri");function lWs(t){try{return rxe(t).toString()}catch{return t}}a(lWs,"normalizeUri");var WKn=new Set(["file","notebook","vscode-notebook","vscode-notebook-cell"]);function zKn(t){let e=rxe(t);if(!WKn.has(e.scheme))throw new Error(`Copilot currently does not support URI with scheme: ${e.scheme}`);if((0,nWs.platform)()==="win32"){let r=e.path;return e.authority?r=`//${e.authority}${e.path}`:/^\/[A-Za-z]:/.test(r)&&(r=r.substring(1)),(0,iWs.normalize)(r)}else{if(e.authority)throw new Error("Unsupported remote file path");return e.path}}a(zKn,"fsPath");function YKn(t){try{return zKn(t)}catch{return}}a(YKn,"getFsPath");function uWs(t){let e=YKn(t);if(e)return txe.URI.file(e).toString()}a(uWs,"getFsUri");function dWs(t,...e){let r=txe.URI.joinPath(rxe(t),...e.map(fWs)).toString();return typeof t=="string"?r:{uri:r}}a(dWs,"joinPath");function fWs(t){return pWs(t)?t.replaceAll("\\","/"):t}a(fWs,"pathToURIPath");function pWs(t){return/^[^/\\]*\\/.test(t)}a(pWs,"isWinPath");function hWs(t){return sWs((typeof t=="string"?t:t.uri).replace(/[#?].*$/,"").replace(/\/$/,"").replace(/^.*[/:]/,""))}a(hWs,"basename");function mWs(t){let e=(0,oWs.dirname)(rxe(t)),r;return WKn.has(e.scheme)&&e.scheme!=="file"?r=e.with({scheme:"file",fragment:""}).toString():r=e.toString(),typeof t=="string"?r:{uri:r}}a(mWs,"dirname")});var JKn=T(fA=>{"use strict";f();var gWs=fA&&fA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),AWs=fA&&fA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yWs=fA&&fA.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o0&&Jir.knownFileExtensions.includes(o)&&this.isExtensionValidForTemplateLanguage(r,o))return o}return r}isExtensionValidForTemplateLanguage(e,r){let n=Jir.templateLanguageLimitations[e];return!n||n.includes(r)}detectLanguageId(e,r){if(Xle.has(e))return{languageId:Xle.get(e)[0],isGuess:!1};let n=Xir.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;e.includes(".");)if(e=e.replace(/\.[^.]*$/,""),Xle.has(e))return{languageId:Xle.get(e)[0],isGuess:!1}}computeFullyQualifiedExtension(e,r){return e!==r?r+e:e}},eor=class extends Zle{static{a(this,"GroupingLanguageDetection")}constructor(e){super(),this.delegate=e}detectLanguage(e){let r=this.delegate.detectLanguage(e),n=r.languageId;return n==="c"||n==="cpp"?new BY("cpp",r.isGuess,r.fileExtension):r}},tor=class extends Zle{static{a(this,"ClientProvidedLanguageDetection")}constructor(e){super(),this.delegate=e}detectLanguage(e){return e.uri.startsWith("untitled:")||e.uri.startsWith("vscode-notebook-cell:")?new BY(e.languageId,!0,""):this.delegate.detectLanguage(e)}};fA.languageDetection=new eor(new tor(new Zir));function CWs({uri:t,languageId:e}){let r=fA.languageDetection.detectLanguage({uri:t,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?e:r.languageId}a(CWs,"detectLanguage")});var tue=T(eue=>{"use strict";f();Object.defineProperty(eue,"__esModule",{value:!0});eue.CopilotTextDocument=eue.LocationFactory=void 0;var vWs=JKn(),bWs=hU(),nxe=(LIt(),Aa(B9r)),mU=dpe(),ror=class{static{a(this,"LocationFactory")}static{this.range=mU.Range.create.bind(mU.Range)}static{this.position=mU.Position.create.bind(mU.Position)}};eue.LocationFactory=ror;var nor=class t{static{a(this,"CopilotTextDocument")}constructor(e,r,n){this.uri=e,this._textDocument=r,this.detectedLanguageId=n}static withChanges(e,r,n){let o=nxe.TextDocument.create(e.clientUri,e.clientLanguageId,n,e.getText());return nxe.TextDocument.update(o,r,n),new t(e.uri,o,e.detectedLanguageId)}applyEdits(e){let r=nxe.TextDocument.create(this.clientUri,this.clientLanguageId,this.version,this.getText());return nxe.TextDocument.update(r,e.map(n=>({text:n.newText,range:n.range})),this.version),new t(this.uri,r,this.detectedLanguageId)}static create(e,r,n,o,s=(0,vWs.detectLanguage)({uri:e,languageId:r})){return new t((0,bWs.normalizeUri)(e),nxe.TextDocument.create(e,r,n,o),s)}get clientUri(){return this._textDocument.uri}get clientLanguageId(){return this._textDocument.languageId}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){let r=typeof e=="number"?e:e.line;if(r<0||r>=this.lineCount)throw new RangeError("Illegal value for lineNumber");let n=mU.Range.create(r,0,r+1,0),o=this.getText(n).replace(/\r\n$|\r$|\n$/g,""),s=mU.Range.create(mU.Position.create(r,0),mU.Position.create(r,o.length)),c=o.trim().length===0;return{text:o,range:s,isEmptyOrWhitespace:c}}};eue.CopilotTextDocument=nor});var Cit=T((lGd,tJn)=>{"use strict";f();var ior=Object.defineProperty,TWs=Object.getOwnPropertyDescriptor,SWs=Object.getOwnPropertyNames,IWs=Object.prototype.hasOwnProperty,xWs=a((t,e)=>{for(var r in e)ior(t,r,{get:e[r],enumerable:!0})},"__export"),wWs=a((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of SWs(e))!IWs.call(t,o)&&o!==r&&ior(t,o,{get:a(()=>e[o],"get"),enumerable:!(n=TWs(e,o))||n.enumerable});return t},"__copyProps"),RWs=a(t=>wWs(ior({},"__esModule",{value:!0}),t),"__toCommonJS"),ZKn={};xWs(ZKn,{config:a(()=>MWs,"config"),t:a(()=>eJn,"t")});tJn.exports=RWs(ZKn);var PWs=require("fs"),kWs=require("fs/promises");async function DWs(t){if(t.protocol==="file:")return await(0,kWs.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let n=`Unexpected ${e.status} response while trying to read ${t}`;try{n+=`: ${await e.text()}`}catch{}throw new Error(n)}return await e.text()}throw new Error("Unsupported protocol")}a(DWs,"readFileFromUri");function NWs(t){return(0,PWs.readFileSync)(t,"utf8")}a(NWs,"readFileFromFsPath");var ixe;function MWs(t){if("contents"in t){typeof t.contents=="string"?ixe=JSON.parse(t.contents):ixe=t.contents;return}if("fsPath"in t){let e=NWs(t.fsPath),r=JSON.parse(e);ixe=XKn(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,n)=>{DWs(e).then(o=>{try{let s=JSON.parse(o);ixe=XKn(s)?s.contents.bundle:s,r()}catch(s){n(s)}}).catch(o=>{n(o)})})}}a(MWs,"config");function eJn(...t){let e=t[0],r,n,o;if(typeof e=="string")r=e,n=e,t.splice(0,1),o=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let c=t.slice(1);if(e.length!==c.length+1)throw new Error("expected a string as the first argument to l10n.t");let l=e[0];for(let u=1;u0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),o=e.args??{};let s=ixe?.[r];return s?typeof s=="string"?_it(s,o):s.comment?_it(s.message,o):_it(n,o):_it(n,o)}a(eJn,"t");var OWs=/{([^}]+)}/g;function _it(t,e){return Object.keys(e).length===0?t:t.replace(OWs,(r,n)=>e[n]??r)}a(_it,"format");function XKn(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}a(XKn,"isBuiltinExtension")});var LY=T(Uy=>{"use strict";f();var BWs=Uy&&Uy.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LWs=Uy&&Uy.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),FWs=Uy&&Uy.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(Qir,"__esModule",{value:!0});Qir.isDocumentValid=H$s;var q$s=PK(),G$s=Ru();async function H$s(t,e){return await t.get(q$s.IIgnoreService).isCopilotIgnored(G$s.URI.parse(e.uri))?{status:"invalid",reason:"Document is blocked by repository policy"}:{status:"valid"}}a(H$s,"isDocumentValid")});var E_=T(vR=>{"use strict";f();var j$s=vR&&vR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},nKn=vR&&vR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(vR,"__esModule",{value:!0});vR.TextDocumentManager=vR.ICompletionsTextDocumentManagerService=void 0;var $$s=qr(),V$s=Mo(),W$s=UU(),iKn=qir(),Gue=qU();vR.ICompletionsTextDocumentManagerService=(0,$$s.createServiceIdentifier)("ICompletionsTextDocumentManagerService");var Gir=class{static{a(this,"TextDocumentManager")}constructor(e,r){this.instantiationService=e,this.fileSystem=r}async textDocuments(){let e=this.getTextDocumentsUnsafe(),r=[];for(let n of e)(await this.instantiationService.invokeFunction(iKn.isDocumentValid,n)).status==="valid"&&r.push(n);return r}getTextDocumentUnsafe(e){let r=(0,Gue.normalizeUri)(e.uri);return this.getTextDocumentsUnsafe().find(n=>n.uri===r)}async getTextDocument(e){return this.getTextDocumentWithValidation(e).then(r=>{if(r.status==="valid")return r.document})}async validateTextDocument(e){return await this.instantiationService.invokeFunction(iKn.isDocumentValid,e)}async getTextDocumentValidation(e){try{return await this.validateTextDocument(e)}catch{return this.notFoundResult(e)}}async getTextDocumentWithValidation(e){let r=this.getTextDocumentUnsafe(e);if(!r)return this.notFoundResult(e);let n=await this.validateTextDocument(e);return n.status==="valid"?{status:"valid",document:r}:n}notFoundResult({uri:e}){return{status:"notfound",message:`Document for URI could not be found: ${e}`}}async readTextDocumentFromDisk(e){try{if((await this.fileSystem.stat(e)).size>5*1024*1024)return}catch{return}return await this.fileSystem.readFileString(e)}getWorkspaceFolder(e){let r=(0,Gue.normalizeUri)(e.uri);return this.getWorkspaceFolders().find(n=>r.startsWith((0,Gue.normalizeUri)(n.uri)))}getRelativePath(e){if(e.uri.startsWith("untitled:"))return;let r=(0,Gue.normalizeUri)(e.uri);for(let n of this.getWorkspaceFolders()){let o=(0,Gue.normalizeUri)(n.uri).replace(/[#?].*/,"").replace(/\/?$/,"/");if(r.startsWith(o))return r.slice(o.length)}return(0,Gue.basename)(r)}};vR.TextDocumentManager=Gir;vR.TextDocumentManager=Gir=j$s([nKn(0,V$s.IInstantiationService),nKn(1,W$s.ICompletionsFileSystemService)],Gir)});var $ir=T(bR=>{"use strict";f();var z$s=bR&&bR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Hir=bR&&bR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(bR,"__esModule",{value:!0});bR.FileReader=bR.ICompletionsFileReaderService=void 0;var Y$s=qr(),K$s=Mo(),J$s=UU(),X$s=que(),Z$s=E_(),eVs=qir(),tVs=qU();bR.ICompletionsFileReaderService=(0,Y$s.createServiceIdentifier)("ICompletionsFileReaderService");var jir=class{static{a(this,"FileReader")}constructor(e,r,n){this.documentManagerService=e,this.instantiationService=r,this.fileSystemService=n}getRelativePath(e){return this.documentManagerService.getRelativePath(e)??(0,tVs.basename)(e.uri)}getOrReadTextDocument(e){return this.readFile(e.uri)}getOrReadTextDocumentWithFakeClientProperties(e){return this.readFile(e.uri)}async readFile(e){let r=await this.documentManagerService.getTextDocumentWithValidation({uri:e});if(r.status!=="notfound")return r;try{if(await this.getFileSizeMB(e)>1)return{status:"notfound",message:"File too large"};let o=await this.doReadFile(e),s=await this.instantiationService.invokeFunction(eVs.isDocumentValid,{uri:e});return s.status==="valid"?{status:"valid",document:X$s.CopilotTextDocument.create(e,"UNKNOWN",-1,o)}:s}catch{return{status:"notfound",message:"File not found"}}}async doReadFile(e){return await this.fileSystemService.readFileString(e)}async getFileSizeMB(e){return(await this.fileSystemService.stat(e)).size/1024/1024}};bR.FileReader=jir;bR.FileReader=jir=z$s([Hir(0,Z$s.ICompletionsTextDocumentManagerService),Hir(1,K$s.IInstantiationService),Hir(2,J$s.ICompletionsFileSystemService)],jir)});var BB=T(hot=>{"use strict";f();Object.defineProperty(hot,"__esModule",{value:!0});hot.LRUCacheMap=void 0;var Vir=class{static{a(this,"LRUCacheMap")}constructor(e=10){if(this.valueMap=new Map,e<1)throw new Error("Size limit must be at least 1");this.sizeLimit=e}set(e,r){if(this.has(e))this.valueMap.delete(e);else if(this.valueMap.size>=this.sizeLimit){let n=this.valueMap.keys().next().value;this.delete(n)}return this.valueMap.set(e,r),this}get(e){if(this.valueMap.has(e)){let r=this.valueMap.get(e);return this.valueMap.delete(e),this.valueMap.set(e,r),r}}delete(e){return this.valueMap.delete(e)}clear(){this.valueMap.clear()}get size(){return this.valueMap.size}keys(){return new Map(this.valueMap).keys()}values(){return new Map(this.valueMap).values()}entries(){return new Map(this.valueMap).entries()}[Symbol.iterator](){return this.entries()}has(e){return this.valueMap.has(e)}forEach(e,r){new Map(this.valueMap).forEach(e,r)}get[Symbol.toStringTag](){return"LRUCacheMap"}peek(e){return this.valueMap.get(e)}};hot.LRUCacheMap=Vir});var lwe=T(cwe=>{"use strict";f();Object.defineProperty(cwe,"__esModule",{value:!0});cwe.Deferred=void 0;cwe.delay=rVs;var Wir=class{static{a(this,"Deferred")}constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}};cwe.Deferred=Wir;function rVs(t,e=void 0){return new Promise(r=>setTimeout(()=>r(e),t))}a(rVs,"delay")});var oKn=T(Hue=>{"use strict";f();Object.defineProperty(Hue,"__esModule",{value:!0});Hue.ReplaySubject=Hue.Subject=void 0;var mot=class{static{a(this,"Subject")}constructor(){this.observers=new Set}subscribe(e){return this.observers.add(e),()=>this.observers.delete(e)}next(e){for(let r of this.observers)r.next(e)}error(e){for(let r of this.observers)r.error?.(e)}complete(){for(let e of this.observers)e.complete?.()}};Hue.Subject=mot;var zir=class extends mot{static{a(this,"ReplaySubject")}subscribe(e){let r=super.subscribe(e);return this._value!==void 0&&e.next(this._value),r}next(e){this._value=e,super.next(e)}};Hue.ReplaySubject=zir});var Jir=T(TR=>{"use strict";f();var nVs=TR&&TR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},sKn=TR&&TR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(TR,"__esModule",{value:!0});TR.AsyncCompletionManager=TR.ICompletionsAsyncManagerService=void 0;var iVs=qr(),oVs=Zm(),sVs=BB(),aKn=mc(),aVs=lwe(),cVs=oKn(),kK;(function(t){t[t.Completed=0]="Completed",t[t.Error=1]="Error",t[t.Pending=2]="Pending"})(kK||(kK={}));TR.ICompletionsAsyncManagerService=(0,iVs.createServiceIdentifier)("ICompletionsAsyncManagerService");var Kir=class{static{a(this,"AsyncCompletionManager")}#e;constructor(e,r){this.featuresService=e,this.logTarget=r,this.#e=new aKn.Logger("AsyncCompletionManager"),this.requests=new sVs.LRUCacheMap(100),this.mostRecentRequestId=""}clear(){this.requests.clear()}shouldWaitForAsyncCompletions(e,r){for(let[n,o]of this.requests)if(Yir(e,r,o))return!0;return!1}updateCompletion(e,r){let n=this.requests.get(e);n!==void 0&&(n.partialCompletionText=r,n.subject.next(n))}queueCompletionRequest(e,r,n,o,s){this.#e.debug(this.logTarget,`[${e}] Queueing async completion request:`,r.substring(r.lastIndexOf(` -`)+1));let c=new cVs.ReplaySubject;return this.requests.set(e,{state:kK.Pending,cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c}),s.then(l=>{if(this.requests.delete(e),l.type!=="success"){this.#e.debug(this.logTarget,`[${e}] Request failed with`,l.reason),c.error(l.reason);return}let u={cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c,choice:l.value[0],result:l,state:kK.Completed,allChoicesPromise:l.value[1]};this.requests.set(e,u),c.next(u),c.complete()}).catch(l=>{this.#e.error(this.logTarget,`[${e}] Request errored with`,l),this.requests.delete(e),c.error(l)})}getFirstMatchingRequestWithTimeout(e,r,n,o,s){let c=this.featuresService.asyncCompletionsTimeout(s);return c<0?(this.#e.debug(this.logTarget,`[${e}] Waiting for completions without timeout`),this.getFirstMatchingRequest(e,r,n,o)):(this.#e.debug(this.logTarget,`[${e}] Waiting for completions with timeout of ${c}ms`),Promise.race([this.getFirstMatchingRequest(e,r,n,o),new Promise(l=>setTimeout(()=>l(null),c))]).then(l=>{if(l===null){this.#e.debug(this.logTarget,`[${e}] Timed out waiting for completion`);return}return l}))}async getFirstMatchingRequest(e,r,n,o){o||(this.mostRecentRequestId=e);let s=!1,c=new aVs.Deferred,l=new Map,u=a(p=>()=>{let h=l.get(p);h!==void 0&&(h(),l.delete(p),!s&&l.size===0&&(s=!0,this.#e.debug(this.logTarget,`[${e}] No matching completions found`),c.resolve(void 0)))},"finishRequest"),d=a(p=>{if(Yir(r,n,p)){if(p.state===kK.Completed){let h=r.substring(p.prefix.length),{completionText:m}=p.choice;if(!m.startsWith(h)||m.length<=h.length){u(p.headerRequestId)();return}m=m.substring(h.length),p.choice.telemetryData.measurements.foundOffset=h.length,this.#e.debug(this.logTarget,`[${e}] Found completion at offset ${h.length}: ${JSON.stringify(m)}`),c.resolve([{...p.choice,completionText:m},p.allChoicesPromise]),s=!0}}else this.cancelRequest(e,p),u(p.headerRequestId)()},"next");for(let[p,h]of this.requests)Yir(r,n,h)?l.set(p,h.subject.subscribe({next:d,error:u(p),complete:u(p)})):this.cancelRequest(e,h);return c.promise.finally(()=>{for(let p of l.values())p()})}cancelRequest(e,r){e===this.mostRecentRequestId&&r.state!==kK.Completed&&(this.#e.debug(this.logTarget,`[${e}] Cancelling request: ${r.headerRequestId}`),r.cancellationTokenSource.cancel(),this.requests.delete(r.headerRequestId))}};TR.AsyncCompletionManager=Kir;TR.AsyncCompletionManager=Kir=nVs([sKn(0,oVs.ICompletionsFeaturesService),sKn(1,aKn.ICompletionsLogTargetService)],Kir);function Yir(t,e,r){if(r.prompt.suffix!==e.suffix||!t.startsWith(r.prefix))return!1;let n=t.substring(r.prefix.length);return r.state===kK.Completed?r.choice.completionText.startsWith(n)&&r.choice.completionText.trimEnd().length>n.length:r.partialCompletionText===void 0?!0:r.partialCompletionText.startsWith(n)}a(Yir,"isCandidate")});var cKn=T(got=>{"use strict";f();Object.defineProperty(got,"__esModule",{value:!0});got.LRURadixTrie=void 0;var Xir=class{static{a(this,"LRURadixTrie")}constructor(e){this.maxSize=e,this.root=new uwe,this.leafNodes=new Set}set(e,r){let{node:n,remainingKey:o}=this.findClosestNode(e);if(o.length>0){for(let[s,c]of n.children)if(s.startsWith(o)){let l=s.slice(0,o.length),u=new uwe;n.removeChild(s),n.addChild(l,u),u.addChild(s.slice(l.length),c),n=u,o=o.slice(l.length);break}if(o.length>0){let s=new uwe;n.addChild(o,s),n=s}}n.value=r,this.leafNodes.add(n),this.leafNodes.size>this.maxSize&&this.evictLeastRecentlyUsed()}findAll(e){return this.findClosestNode(e).stack.map(({node:r,remainingKey:n})=>r.value!==void 0?{remainingKey:n,value:r.value}:void 0).filter(r=>r!==void 0)}delete(e){let{node:r,remainingKey:n}=this.findClosestNode(e);n.length>0||this.deleteNode(r)}findClosestNode(e){let r=!0,n=this.root,o=[{node:n,remainingKey:e}];for(;e.length>0&&r;){r=!1;for(let[s,c]of n.children)if(e.startsWith(s)){e=e.slice(s.length),o.unshift({node:c,remainingKey:e}),n=c,r=!0;break}}return{node:n,remainingKey:e,stack:o}}deleteNode(e){if(e.value=void 0,this.leafNodes.delete(e),e.parent===void 0||e.childCount>1)return;let{node:r,edge:n}=e.parent;if(e.childCount===1){let[s,c]=Array.from(e.children)[0];e.removeChild(s),r.removeChild(n),r.addChild(n+s,c);return}if(r.removeChild(n),r.parent===void 0)return;let o=r.parent;if(r.value===void 0&&r.childCount===1){let[s,c]=Array.from(r.children)[0],l=o.edge+s;r.removeChild(s),o.node.removeChild(o.edge),o.node.addChild(l,c)}}evictLeastRecentlyUsed(){let e=this.findLeastRecentlyUsed();e&&this.deleteNode(e)}findLeastRecentlyUsed(){let e;for(let r of this.leafNodes)(e===void 0||r.touched{"use strict";f();Object.defineProperty(jue,"__esModule",{value:!0});jue.CompletionsCache=jue.ICompletionsCacheService=void 0;var lVs=qr(),lKn=cKn();jue.ICompletionsCacheService=(0,lVs.createServiceIdentifier)("ICompletionsCacheService");var Zir=class{static{a(this,"CompletionsCache")}constructor(){this.cache=new lKn.LRURadixTrie(100)}findAll(e,r){return this.cache.findAll(e).flatMap(({remainingKey:n,value:o})=>o.content.filter(s=>s.suffix===r&&s.choice.completionText.startsWith(n)&&s.choice.completionText.length>n.length).map(s=>({...s.choice,completionText:s.choice.completionText.slice(n.length),telemetryData:s.choice.telemetryData.extendedBy({},{foundOffset:n.length})})))}append(e,r,n){let o=this.cache.findAll(e);if(o.length>0&&o[0].remainingKey===""){let s=o[0].value.content;this.cache.set(e,{content:[...s,{suffix:r,choice:n}]})}else this.cache.set(e,{content:[{suffix:r,choice:n}]})}clear(){this.cache=new lKn.LRURadixTrie(100)}};jue.CompletionsCache=Zir});var uKn=T($ue=>{"use strict";f();Object.defineProperty($ue,"__esModule",{value:!0});$ue.BlockMode=void 0;$ue.shouldDoParsingTrimming=uVs;$ue.shouldDoServerTrimming=dVs;var NK;(function(t){t.Parsing="parsing",t.Server="server",t.ParsingAndServer="parsingandserver",t.MoreMultiline="moremultiline"})(NK||($ue.BlockMode=NK={}));function uVs(t){return[NK.Parsing,NK.ParsingAndServer,NK.MoreMultiline].includes(t)}a(uVs,"shouldDoParsingTrimming");function dVs(t){return[NK.Server,NK.ParsingAndServer].includes(t)}a(dVs,"shouldDoServerTrimming")});var DK=T(nb=>{"use strict";f();var fVs=nb&&nb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nb,"__esModule",{value:!0});nb.WASMLanguage=void 0;nb.isSupportedLanguageId=hVs;nb.languageIdToWasmLanguage=ior;nb.getLanguage=fKn;nb.parseTreeSitter=gVs;nb.parseTreeSitterIncludingVersion=pKn;nb.getBlockCloseToken=AVs;nb.queryPythonIsDocstring=CVs;var tor=fVs(bre()),pVs=Eir(),dKn=Cir(),uu;(function(t){t.Python="python",t.JavaScript="javascript",t.TypeScript="typescript",t.TSX="tsx",t.Go="go",t.Ruby="ruby",t.CSharp="c-sharp",t.Java="java",t.Php="php",t.Cpp="cpp"})(uu||(nb.WASMLanguage=uu={}));var ror={python:uu.Python,javascript:uu.JavaScript,javascriptreact:uu.JavaScript,jsx:uu.JavaScript,typescript:uu.TypeScript,typescriptreact:uu.TSX,go:uu.Go,ruby:uu.Ruby,csharp:uu.CSharp,java:uu.Java,php:uu.Php,c:uu.Cpp,cpp:uu.Cpp};function hVs(t){return t in ror&&t!=="csharp"&&t!=="java"&&t!=="php"&&t!=="c"&&t!=="cpp"}a(hVs,"isSupportedLanguageId");function ior(t){if(!(t in ror))throw new Error(`Unrecognized language: ${t}`);return ror[t]}a(ior,"languageIdToWasmLanguage");var eor=new Map;async function mVs(t){let e;try{e=await(0,dKn.readFile)(`tree-sitter-${t}.wasm`)}catch(r){throw r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.name==="Error"?new pVs.CopilotPromptLoadFailure(`Could not load tree-sitter-${t}.wasm`,r):r}return tor.default.Language.load(e)}a(mVs,"loadWasmLanguage");function fKn(t){let e=ior(t);if(!eor.has(e)){let r=mVs(e);eor.set(e,r)}return eor.get(e)}a(fKn,"getLanguage");var nor=class extends Error{static{a(this,"WrappedError")}constructor(e,r){super(e,{cause:r})}};async function gVs(t,e){return(await pKn(t,e))[0]}a(gVs,"parseTreeSitter");async function pKn(t,e){await tor.default.init({locateFile:a(s=>(0,dKn.locateFile)(s),"locateFile")});let r;try{r=new tor.default}catch(s){throw s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&s.message.includes("table index is out of bounds")?new nor(`Could not init Parse for language <${t}>`,s):s}let n=await fKn(t);r.setLanguage(n);let o=r.parse(e);return r.delete(),[o,n.version]}a(pKn,"parseTreeSitterIncludingVersion");function AVs(t){switch(ior(t)){case uu.Python:return null;case uu.JavaScript:case uu.TypeScript:case uu.TSX:case uu.Go:case uu.CSharp:case uu.Java:case uu.Php:case uu.Cpp:return"}";case uu.Ruby:return"end"}}a(AVs,"getBlockCloseToken");function yVs(t,e){let r=[];for(let n of t){if(!n[1]){let o=e.tree.getLanguage();n[1]=o.query(n[0])}r.push(...n[1].matches(e))}return r}a(yVs,"innerQuery");var EVs=[`[ +**Note:** Some files were excluded from the context due to content exclusion rules. Click [here](https://docs.github.com/en/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot) to learn more.`);Uy.IIgnoreService=(0,QWs.createServiceIdentifier)("IIgnoreService");var oor=class t{static{a(this,"NullIgnoreService")}static{this.Instance=new t}dispose(){}get isEnabled(){return!1}get isRegexExclusionsEnabled(){return!1}async init(){}async isCopilotIgnored(e){return!1}async asMinimatchPattern(){}};Uy.NullIgnoreService=oor;async function qWs(t,e){let r=[];for(let n of e)await t.isCopilotIgnored(n)||r.push(n);return r}a(qWs,"filterIngoredResources")});var aor=T(sor=>{"use strict";f();Object.defineProperty(sor,"__esModule",{value:!0});sor.isDocumentValid=jWs;var GWs=LY(),HWs=Eu();async function jWs(t,e){return await t.get(GWs.IIgnoreService).isCopilotIgnored(HWs.URI.parse(e.uri))?{status:"invalid",reason:"Document is blocked by repository policy"}:{status:"valid"}}a(jWs,"isDocumentValid")});var aC=T(dR=>{"use strict";f();var $Ws=dR&&dR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},rJn=dR&&dR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(dR,"__esModule",{value:!0});dR.TextDocumentManager=dR.ICompletionsTextDocumentManagerService=void 0;var VWs=qr(),WWs=Po(),zWs=fU(),nJn=aor(),rue=hU();dR.ICompletionsTextDocumentManagerService=(0,VWs.createServiceIdentifier)("ICompletionsTextDocumentManagerService");var cor=class{static{a(this,"TextDocumentManager")}constructor(e,r){this.instantiationService=e,this.fileSystem=r}async textDocuments(){let e=this.getTextDocumentsUnsafe(),r=[];for(let n of e)(await this.instantiationService.invokeFunction(nJn.isDocumentValid,n)).status==="valid"&&r.push(n);return r}getTextDocumentUnsafe(e){let r=(0,rue.normalizeUri)(e.uri);return this.getTextDocumentsUnsafe().find(n=>n.uri===r)}async getTextDocument(e){return this.getTextDocumentWithValidation(e).then(r=>{if(r.status==="valid")return r.document})}async validateTextDocument(e){return await this.instantiationService.invokeFunction(nJn.isDocumentValid,e)}async getTextDocumentValidation(e){try{return await this.validateTextDocument(e)}catch{return this.notFoundResult(e)}}async getTextDocumentWithValidation(e){let r=this.getTextDocumentUnsafe(e);if(!r)return this.notFoundResult(e);let n=await this.validateTextDocument(e);return n.status==="valid"?{status:"valid",document:r}:n}notFoundResult({uri:e}){return{status:"notfound",message:`Document for URI could not be found: ${e}`}}async readTextDocumentFromDisk(e){try{if((await this.fileSystem.stat(e)).size>5*1024*1024)return}catch{return}return await this.fileSystem.readFileString(e)}getWorkspaceFolder(e){let r=(0,rue.normalizeUri)(e.uri);return this.getWorkspaceFolders().find(n=>r.startsWith((0,rue.normalizeUri)(n.uri)))}getRelativePath(e){if(e.uri.startsWith("untitled:"))return;let r=(0,rue.normalizeUri)(e.uri);for(let n of this.getWorkspaceFolders()){let o=(0,rue.normalizeUri)(n.uri).replace(/[#?].*/,"").replace(/\/?$/,"/");if(r.startsWith(o))return r.slice(o.length)}return(0,rue.basename)(r)}};dR.TextDocumentManager=cor;dR.TextDocumentManager=cor=$Ws([rJn(0,WWs.IInstantiationService),rJn(1,zWs.ICompletionsFileSystemService)],cor)});var dor=T(fR=>{"use strict";f();var YWs=fR&&fR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},lor=fR&&fR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(fR,"__esModule",{value:!0});fR.FileReader=fR.ICompletionsFileReaderService=void 0;var KWs=qr(),JWs=Po(),XWs=fU(),ZWs=tue(),ezs=aC(),tzs=aor(),rzs=hU();fR.ICompletionsFileReaderService=(0,KWs.createServiceIdentifier)("ICompletionsFileReaderService");var uor=class{static{a(this,"FileReader")}constructor(e,r,n){this.documentManagerService=e,this.instantiationService=r,this.fileSystemService=n}getRelativePath(e){return this.documentManagerService.getRelativePath(e)??(0,rzs.basename)(e.uri)}getOrReadTextDocument(e){return this.readFile(e.uri)}getOrReadTextDocumentWithFakeClientProperties(e){return this.readFile(e.uri)}async readFile(e){let r=await this.documentManagerService.getTextDocumentWithValidation({uri:e});if(r.status!=="notfound")return r;try{if(await this.getFileSizeMB(e)>1)return{status:"notfound",message:"File too large"};let o=await this.doReadFile(e),s=await this.instantiationService.invokeFunction(tzs.isDocumentValid,{uri:e});return s.status==="valid"?{status:"valid",document:ZWs.CopilotTextDocument.create(e,"UNKNOWN",-1,o)}:s}catch{return{status:"notfound",message:"File not found"}}}async doReadFile(e){return await this.fileSystemService.readFileString(e)}async getFileSizeMB(e){return(await this.fileSystemService.stat(e)).size/1024/1024}};fR.FileReader=uor;fR.FileReader=uor=YWs([lor(0,ezs.ICompletionsTextDocumentManagerService),lor(1,JWs.IInstantiationService),lor(2,XWs.ICompletionsFileSystemService)],uor)});var yB=T(vit=>{"use strict";f();Object.defineProperty(vit,"__esModule",{value:!0});vit.LRUCacheMap=void 0;var por=class{static{a(this,"LRUCacheMap")}constructor(e=10){if(this.valueMap=new Map,e<1)throw new Error("Size limit must be at least 1");this.sizeLimit=e}set(e,r){if(this.has(e))this.valueMap.delete(e);else if(this.valueMap.size>=this.sizeLimit){let n=this.valueMap.keys().next().value;this.delete(n)}return this.valueMap.set(e,r),this}get(e){if(this.valueMap.has(e)){let r=this.valueMap.get(e);return this.valueMap.delete(e),this.valueMap.set(e,r),r}}delete(e){return this.valueMap.delete(e)}clear(){this.valueMap.clear()}get size(){return this.valueMap.size}keys(){return new Map(this.valueMap).keys()}values(){return new Map(this.valueMap).values()}entries(){return new Map(this.valueMap).entries()}[Symbol.iterator](){return this.entries()}has(e){return this.valueMap.has(e)}forEach(e,r){new Map(this.valueMap).forEach(e,r)}get[Symbol.toStringTag](){return"LRUCacheMap"}peek(e){return this.valueMap.get(e)}};vit.LRUCacheMap=por});var sxe=T(oxe=>{"use strict";f();Object.defineProperty(oxe,"__esModule",{value:!0});oxe.Deferred=void 0;oxe.delay=nzs;var hor=class{static{a(this,"Deferred")}constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}};oxe.Deferred=hor;function nzs(t,e=void 0){return new Promise(r=>setTimeout(()=>r(e),t))}a(nzs,"delay")});var iJn=T(nue=>{"use strict";f();Object.defineProperty(nue,"__esModule",{value:!0});nue.ReplaySubject=nue.Subject=void 0;var bit=class{static{a(this,"Subject")}constructor(){this.observers=new Set}subscribe(e){return this.observers.add(e),()=>this.observers.delete(e)}next(e){for(let r of this.observers)r.next(e)}error(e){for(let r of this.observers)r.error?.(e)}complete(){for(let e of this.observers)e.complete?.()}};nue.Subject=bit;var mor=class extends bit{static{a(this,"ReplaySubject")}subscribe(e){let r=super.subscribe(e);return this._value!==void 0&&e.next(this._value),r}next(e){this._value=e,super.next(e)}};nue.ReplaySubject=mor});var yor=T(pR=>{"use strict";f();var izs=pR&&pR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},oJn=pR&&pR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(pR,"__esModule",{value:!0});pR.AsyncCompletionManager=pR.ICompletionsAsyncManagerService=void 0;var ozs=qr(),szs=Hm(),azs=yB(),sJn=uc(),czs=sxe(),lzs=iJn(),FY;(function(t){t[t.Completed=0]="Completed",t[t.Error=1]="Error",t[t.Pending=2]="Pending"})(FY||(FY={}));pR.ICompletionsAsyncManagerService=(0,ozs.createServiceIdentifier)("ICompletionsAsyncManagerService");var Aor=class{static{a(this,"AsyncCompletionManager")}#e;constructor(e,r){this.featuresService=e,this.logTarget=r,this.#e=new sJn.Logger("AsyncCompletionManager"),this.requests=new azs.LRUCacheMap(100),this.mostRecentRequestId=""}clear(){this.requests.clear()}shouldWaitForAsyncCompletions(e,r){for(let[n,o]of this.requests)if(gor(e,r,o))return!0;return!1}updateCompletion(e,r){let n=this.requests.get(e);n!==void 0&&(n.partialCompletionText=r,n.subject.next(n))}queueCompletionRequest(e,r,n,o,s){this.#e.debug(this.logTarget,`[${e}] Queueing async completion request:`,r.substring(r.lastIndexOf(` +`)+1));let c=new lzs.ReplaySubject;return this.requests.set(e,{state:FY.Pending,cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c}),s.then(l=>{if(this.requests.delete(e),l.type!=="success"){this.#e.debug(this.logTarget,`[${e}] Request failed with`,l.reason),c.error(l.reason);return}let u={cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c,choice:l.value[0],result:l,state:FY.Completed,allChoicesPromise:l.value[1]};this.requests.set(e,u),c.next(u),c.complete()}).catch(l=>{this.#e.error(this.logTarget,`[${e}] Request errored with`,l),this.requests.delete(e),c.error(l)})}getFirstMatchingRequestWithTimeout(e,r,n,o,s){let c=this.featuresService.asyncCompletionsTimeout(s);return c<0?(this.#e.debug(this.logTarget,`[${e}] Waiting for completions without timeout`),this.getFirstMatchingRequest(e,r,n,o)):(this.#e.debug(this.logTarget,`[${e}] Waiting for completions with timeout of ${c}ms`),Promise.race([this.getFirstMatchingRequest(e,r,n,o),new Promise(l=>setTimeout(()=>l(null),c))]).then(l=>{if(l===null){this.#e.debug(this.logTarget,`[${e}] Timed out waiting for completion`);return}return l}))}async getFirstMatchingRequest(e,r,n,o){o||(this.mostRecentRequestId=e);let s=!1,c=new czs.Deferred,l=new Map,u=a(p=>()=>{let h=l.get(p);h!==void 0&&(h(),l.delete(p),!s&&l.size===0&&(s=!0,this.#e.debug(this.logTarget,`[${e}] No matching completions found`),c.resolve(void 0)))},"finishRequest"),d=a(p=>{if(gor(r,n,p)){if(p.state===FY.Completed){let h=r.substring(p.prefix.length),{completionText:m}=p.choice;if(!m.startsWith(h)||m.length<=h.length){u(p.headerRequestId)();return}m=m.substring(h.length),p.choice.telemetryData.measurements.foundOffset=h.length,this.#e.debug(this.logTarget,`[${e}] Found completion at offset ${h.length}: ${JSON.stringify(m)}`),c.resolve([{...p.choice,completionText:m},p.allChoicesPromise]),s=!0}}else this.cancelRequest(e,p),u(p.headerRequestId)()},"next");for(let[p,h]of this.requests)gor(r,n,h)?l.set(p,h.subject.subscribe({next:d,error:u(p),complete:u(p)})):this.cancelRequest(e,h);return c.promise.finally(()=>{for(let p of l.values())p()})}cancelRequest(e,r){e===this.mostRecentRequestId&&r.state!==FY.Completed&&(this.#e.debug(this.logTarget,`[${e}] Cancelling request: ${r.headerRequestId}`),r.cancellationTokenSource.cancel(),this.requests.delete(r.headerRequestId))}};pR.AsyncCompletionManager=Aor;pR.AsyncCompletionManager=Aor=izs([oJn(0,szs.ICompletionsFeaturesService),oJn(1,sJn.ICompletionsLogTargetService)],Aor);function gor(t,e,r){if(r.prompt.suffix!==e.suffix||!t.startsWith(r.prefix))return!1;let n=t.substring(r.prefix.length);return r.state===FY.Completed?r.choice.completionText.startsWith(n)&&r.choice.completionText.trimEnd().length>n.length:r.partialCompletionText===void 0?!0:r.partialCompletionText.startsWith(n)}a(gor,"isCandidate")});var aJn=T(Tit=>{"use strict";f();Object.defineProperty(Tit,"__esModule",{value:!0});Tit.LRURadixTrie=void 0;var Eor=class{static{a(this,"LRURadixTrie")}constructor(e){this.maxSize=e,this.root=new axe,this.leafNodes=new Set}set(e,r){let{node:n,remainingKey:o}=this.findClosestNode(e);if(o.length>0){for(let[s,c]of n.children)if(s.startsWith(o)){let l=s.slice(0,o.length),u=new axe;n.removeChild(s),n.addChild(l,u),u.addChild(s.slice(l.length),c),n=u,o=o.slice(l.length);break}if(o.length>0){let s=new axe;n.addChild(o,s),n=s}}n.value=r,this.leafNodes.add(n),this.leafNodes.size>this.maxSize&&this.evictLeastRecentlyUsed()}findAll(e){return this.findClosestNode(e).stack.map(({node:r,remainingKey:n})=>r.value!==void 0?{remainingKey:n,value:r.value}:void 0).filter(r=>r!==void 0)}delete(e){let{node:r,remainingKey:n}=this.findClosestNode(e);n.length>0||this.deleteNode(r)}findClosestNode(e){let r=!0,n=this.root,o=[{node:n,remainingKey:e}];for(;e.length>0&&r;){r=!1;for(let[s,c]of n.children)if(e.startsWith(s)){e=e.slice(s.length),o.unshift({node:c,remainingKey:e}),n=c,r=!0;break}}return{node:n,remainingKey:e,stack:o}}deleteNode(e){if(e.value=void 0,this.leafNodes.delete(e),e.parent===void 0||e.childCount>1)return;let{node:r,edge:n}=e.parent;if(e.childCount===1){let[s,c]=Array.from(e.children)[0];e.removeChild(s),r.removeChild(n),r.addChild(n+s,c);return}if(r.removeChild(n),r.parent===void 0)return;let o=r.parent;if(r.value===void 0&&r.childCount===1){let[s,c]=Array.from(r.children)[0],l=o.edge+s;r.removeChild(s),o.node.removeChild(o.edge),o.node.addChild(l,c)}}evictLeastRecentlyUsed(){let e=this.findLeastRecentlyUsed();e&&this.deleteNode(e)}findLeastRecentlyUsed(){let e;for(let r of this.leafNodes)(e===void 0||r.touched{"use strict";f();Object.defineProperty(iue,"__esModule",{value:!0});iue.CompletionsCache=iue.ICompletionsCacheService=void 0;var uzs=qr(),cJn=aJn();iue.ICompletionsCacheService=(0,uzs.createServiceIdentifier)("ICompletionsCacheService");var _or=class{static{a(this,"CompletionsCache")}constructor(){this.cache=new cJn.LRURadixTrie(100)}findAll(e,r){return this.cache.findAll(e).flatMap(({remainingKey:n,value:o})=>o.content.filter(s=>s.suffix===r&&s.choice.completionText.startsWith(n)&&s.choice.completionText.length>n.length).map(s=>({...s.choice,completionText:s.choice.completionText.slice(n.length),telemetryData:s.choice.telemetryData.extendedBy({},{foundOffset:n.length})})))}append(e,r,n){let o=this.cache.findAll(e);if(o.length>0&&o[0].remainingKey===""){let s=o[0].value.content;this.cache.set(e,{content:[...s,{suffix:r,choice:n}]})}else this.cache.set(e,{content:[{suffix:r,choice:n}]})}clear(){this.cache=new cJn.LRURadixTrie(100)}};iue.CompletionsCache=_or});var lJn=T(oue=>{"use strict";f();Object.defineProperty(oue,"__esModule",{value:!0});oue.BlockMode=void 0;oue.shouldDoParsingTrimming=dzs;oue.shouldDoServerTrimming=fzs;var UY;(function(t){t.Parsing="parsing",t.Server="server",t.ParsingAndServer="parsingandserver",t.MoreMultiline="moremultiline"})(UY||(oue.BlockMode=UY={}));function dzs(t){return[UY.Parsing,UY.ParsingAndServer,UY.MoreMultiline].includes(t)}a(dzs,"shouldDoParsingTrimming");function fzs(t){return[UY.Server,UY.ParsingAndServer].includes(t)}a(fzs,"shouldDoServerTrimming")});var QY=T(jv=>{"use strict";f();var pzs=jv&&jv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jv,"__esModule",{value:!0});jv.WASMLanguage=void 0;jv.isSupportedLanguageId=mzs;jv.languageIdToWasmLanguage=Sor;jv.getLanguage=dJn;jv.parseTreeSitter=Azs;jv.parseTreeSitterIncludingVersion=fJn;jv.getBlockCloseToken=yzs;jv.queryPythonIsDocstring=Czs;var vor=pzs(Fte()),hzs=Uir(),uJn=Qir(),ru;(function(t){t.Python="python",t.JavaScript="javascript",t.TypeScript="typescript",t.TSX="tsx",t.Go="go",t.Ruby="ruby",t.CSharp="c-sharp",t.Java="java",t.Php="php",t.Cpp="cpp"})(ru||(jv.WASMLanguage=ru={}));var bor={python:ru.Python,javascript:ru.JavaScript,javascriptreact:ru.JavaScript,jsx:ru.JavaScript,typescript:ru.TypeScript,typescriptreact:ru.TSX,go:ru.Go,ruby:ru.Ruby,csharp:ru.CSharp,java:ru.Java,php:ru.Php,c:ru.Cpp,cpp:ru.Cpp};function mzs(t){return t in bor&&t!=="csharp"&&t!=="java"&&t!=="php"&&t!=="c"&&t!=="cpp"}a(mzs,"isSupportedLanguageId");function Sor(t){if(!(t in bor))throw new Error(`Unrecognized language: ${t}`);return bor[t]}a(Sor,"languageIdToWasmLanguage");var Cor=new Map;async function gzs(t){let e;try{e=await(0,uJn.readFile)(`tree-sitter-${t}.wasm`)}catch(r){throw r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.name==="Error"?new hzs.CopilotPromptLoadFailure(`Could not load tree-sitter-${t}.wasm`,r):r}return vor.default.Language.load(e)}a(gzs,"loadWasmLanguage");function dJn(t){let e=Sor(t);if(!Cor.has(e)){let r=gzs(e);Cor.set(e,r)}return Cor.get(e)}a(dJn,"getLanguage");var Tor=class extends Error{static{a(this,"WrappedError")}constructor(e,r){super(e,{cause:r})}};async function Azs(t,e){return(await fJn(t,e))[0]}a(Azs,"parseTreeSitter");async function fJn(t,e){await vor.default.init({locateFile:a(s=>(0,uJn.locateFile)(s),"locateFile")});let r;try{r=new vor.default}catch(s){throw s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&s.message.includes("table index is out of bounds")?new Tor(`Could not init Parse for language <${t}>`,s):s}let n=await dJn(t);r.setLanguage(n);let o=r.parse(e);return r.delete(),[o,n.version]}a(fJn,"parseTreeSitterIncludingVersion");function yzs(t){switch(Sor(t)){case ru.Python:return null;case ru.JavaScript:case ru.TypeScript:case ru.TSX:case ru.Go:case ru.CSharp:case ru.Java:case ru.Php:case ru.Cpp:return"}";case ru.Ruby:return"end"}}a(yzs,"getBlockCloseToken");function Ezs(t,e){let r=[];for(let n of t){if(!n[1]){let o=e.tree.getLanguage();n[1]=o.query(n[0])}r.push(...n[1].matches(e))}return r}a(Ezs,"innerQuery");var _zs=[`[ (class_definition (block (expression_statement (string)))) (function_definition (block (expression_statement (string)))) -]`];function CVs(t){return yVs([EVs],t).length===1}a(CVs,"queryPythonIsDocstring")});var por=T(Yue=>{"use strict";f();Object.defineProperty(Yue,"__esModule",{value:!0});Yue.StatementTree=Yue.StatementNode=void 0;var _Vs=DK(),SR=class{static{a(this,"StatementNode")}constructor(e){this.node=e,this.children=[],this.collapsed=!1}addChild(e){e.parent=this,e.nextSibling=void 0,this.children.length>0&&(this.children[this.children.length-1].nextSibling=e),this.children.push(e)}childrenFinished(){}containsStatement(e){return this.node.startIndex<=e.node.startIndex&&this.node.endIndex>=e.node.endIndex}statementAt(e){if(this.node.startIndex>e||this.node.endIndex(r=n.statementAt(e),r!==void 0)),r??this}collapse(){this.children.length=0,this.collapsed=!0}get description(){return`${this.node.type} ([${this.node.startPosition.row},${this.node.startPosition.column}]..[${this.node.endPosition.row},${this.node.endPosition.column}]): ${JSON.stringify(this.node.text.length>33?this.node.text.substring(0,15)+"..."+this.node.text.slice(-15):this.node.text)}`}dump(e="",r=""){let n=[`${e}${this.description}`];return this.children.forEach(o=>{n.push(o.dump(`${r}+- `,o.nextSibling===void 0?`${r} `:`${r}| `))}),n.join(` +]`];function Czs(t){return Ezs([_zs],t).length===1}a(Czs,"queryPythonIsDocstring")});var Nor=T(lue=>{"use strict";f();Object.defineProperty(lue,"__esModule",{value:!0});lue.StatementTree=lue.StatementNode=void 0;var vzs=QY(),hR=class{static{a(this,"StatementNode")}constructor(e){this.node=e,this.children=[],this.collapsed=!1}addChild(e){e.parent=this,e.nextSibling=void 0,this.children.length>0&&(this.children[this.children.length-1].nextSibling=e),this.children.push(e)}childrenFinished(){}containsStatement(e){return this.node.startIndex<=e.node.startIndex&&this.node.endIndex>=e.node.endIndex}statementAt(e){if(this.node.startIndex>e||this.node.endIndex(r=n.statementAt(e),r!==void 0)),r??this}collapse(){this.children.length=0,this.collapsed=!0}get description(){return`${this.node.type} ([${this.node.startPosition.row},${this.node.startPosition.column}]..[${this.node.endPosition.row},${this.node.endPosition.column}]): ${JSON.stringify(this.node.text.length>33?this.node.text.substring(0,15)+"..."+this.node.text.slice(-15):this.node.text)}`}dump(e="",r=""){let n=[`${e}${this.description}`];return this.children.forEach(o=>{n.push(o.dump(`${r}+- `,o.nextSibling===void 0?`${r} `:`${r}| `))}),n.join(` `)}dumpPath(e="",r="",n=!1){if(this.parent){let o=this.parent.dumpPath(e,r,!0),s=o.length-o.lastIndexOf(` `)-1-r.length,c=" ".repeat(s),l=n?` ${r}${c}+- `:"";return o+this.description+l}else{let o=n?` -${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{static{a(this,"StatementTree")}static isSupported(e){return Vue.languageIds.has(e)||Wue.languageIds.has(e)||fwe.languageIds.has(e)||zue.languageIds.has(e)||pwe.languageIds.has(e)||hwe.languageIds.has(e)||mwe.languageIds.has(e)||gwe.languageIds.has(e)||Awe.languageIds.has(e)}static isTrimmedByDefault(e){return Vue.languageIds.has(e)||Wue.languageIds.has(e)||zue.languageIds.has(e)}static create(e,r,n,o){if(Vue.languageIds.has(e))return new Vue(e,r,n,o);if(Wue.languageIds.has(e))return new Wue(e,r,n,o);if(fwe.languageIds.has(e))return new fwe(e,r,n,o);if(zue.languageIds.has(e))return new zue(e,r,n,o);if(mwe.languageIds.has(e))return new mwe(e,r,n,o);if(pwe.languageIds.has(e))return new pwe(e,r,n,o);if(hwe.languageIds.has(e))return new hwe(e,r,n,o);if(gwe.languageIds.has(e))return new gwe(e,r,n,o);if(Awe.languageIds.has(e))return new Awe(e,r,n,o);throw new Error(`Unsupported languageId: ${e}`)}constructor(e,r,n,o){this.languageId=e,this.text=r,this.startOffset=n,this.endOffset=o,this.statements=[]}[Symbol.dispose](){this.tree&&(this.tree.delete(),this.tree=void 0)}clear(){this.statements.length=0}statementAt(e){let r;return this.statements.find(n=>(r=n.statementAt(e),r!==void 0)),r}async build(){let e=[];this.clear();let r=await this.parse();this.getStatementQuery(r).captures(r.rootNode,{startPosition:this.offsetToPosition(this.startOffset),endPosition:this.offsetToPosition(this.endOffset)}).forEach(o=>{let s=this.createNode(o.node);for(;e.length>0&&!e[0].containsStatement(s);)e.shift()?.childrenFinished();e.length>0?e[0].addChild(s):this.addStatement(s),e.unshift(s)}),e.forEach(o=>o.childrenFinished())}addStatement(e){e.parent=void 0,e.nextSibling=void 0,this.statements.length>0&&(this.statements[this.statements.length-1].nextSibling=e),this.statements.push(e)}async parse(){return this.tree||(this.tree=await(0,_Vs.parseTreeSitter)(this.languageId,this.text)),this.tree}getStatementQuery(e){return this.getQuery(e.getLanguage(),this.getStatementQueryText())}getQuery(e,r){return e.query(r)}offsetToPosition(e){let r=this.text.slice(0,e).split(` +${r}+- `:"";return e+this.description+o}}};lue.StatementNode=hR;var VS=class{static{a(this,"StatementTree")}static isSupported(e){return sue.languageIds.has(e)||aue.languageIds.has(e)||lxe.languageIds.has(e)||cue.languageIds.has(e)||uxe.languageIds.has(e)||dxe.languageIds.has(e)||fxe.languageIds.has(e)||pxe.languageIds.has(e)||hxe.languageIds.has(e)}static isTrimmedByDefault(e){return sue.languageIds.has(e)||aue.languageIds.has(e)||cue.languageIds.has(e)}static create(e,r,n,o){if(sue.languageIds.has(e))return new sue(e,r,n,o);if(aue.languageIds.has(e))return new aue(e,r,n,o);if(lxe.languageIds.has(e))return new lxe(e,r,n,o);if(cue.languageIds.has(e))return new cue(e,r,n,o);if(fxe.languageIds.has(e))return new fxe(e,r,n,o);if(uxe.languageIds.has(e))return new uxe(e,r,n,o);if(dxe.languageIds.has(e))return new dxe(e,r,n,o);if(pxe.languageIds.has(e))return new pxe(e,r,n,o);if(hxe.languageIds.has(e))return new hxe(e,r,n,o);throw new Error(`Unsupported languageId: ${e}`)}constructor(e,r,n,o){this.languageId=e,this.text=r,this.startOffset=n,this.endOffset=o,this.statements=[]}[Symbol.dispose](){this.tree&&(this.tree.delete(),this.tree=void 0)}clear(){this.statements.length=0}statementAt(e){let r;return this.statements.find(n=>(r=n.statementAt(e),r!==void 0)),r}async build(){let e=[];this.clear();let r=await this.parse();this.getStatementQuery(r).captures(r.rootNode,{startPosition:this.offsetToPosition(this.startOffset),endPosition:this.offsetToPosition(this.endOffset)}).forEach(o=>{let s=this.createNode(o.node);for(;e.length>0&&!e[0].containsStatement(s);)e.shift()?.childrenFinished();e.length>0?e[0].addChild(s):this.addStatement(s),e.unshift(s)}),e.forEach(o=>o.childrenFinished())}addStatement(e){e.parent=void 0,e.nextSibling=void 0,this.statements.length>0&&(this.statements[this.statements.length-1].nextSibling=e),this.statements.push(e)}async parse(){return this.tree||(this.tree=await(0,vzs.parseTreeSitter)(this.languageId,this.text)),this.tree}getStatementQuery(e){return this.getQuery(e.getLanguage(),this.getStatementQueryText())}getQuery(e,r){return e.query(r)}offsetToPosition(e){let r=this.text.slice(0,e).split(` `),n=r.length-1,o=r[r.length-1].length;return{row:n,column:o}}dump(e=""){let r=[];return this.statements.forEach((n,o)=>{let s=`[${o}]`,c=" ".repeat(s.length);r.push(n.dump(`${e} ${s} `,`${e} ${c} `))}),r.join(` -`)}};Yue.StatementTree=iI;var Aot=class t extends SR{static{a(this,"JSStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","generator_function_declaration","class_declaration","statement_block","if_statement","switch_statement","for_statement","for_in_statement","while_statement","do_statement","try_statement","with_statement","labeled_statement","method_definition","interface_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="statement_block"||this.children.length===2&&this.node.childForFieldName("alternative")!==null&&this.children[0].node.type!=="statement_block"&&this.children[1].node.type!=="statement_block"}},Vue=class extends iI{static{a(this,"JSStatementTree")}static{this.languageIds=new Set(["javascript","javascriptreact","jsx"])}createNode(e){return new Aot(e)}getStatementQueryText(){return`[ +`)}};lue.StatementTree=VS;var Sit=class t extends hR{static{a(this,"JSStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","generator_function_declaration","class_declaration","statement_block","if_statement","switch_statement","for_statement","for_in_statement","while_statement","do_statement","try_statement","with_statement","labeled_statement","method_definition","interface_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="statement_block"||this.children.length===2&&this.node.childForFieldName("alternative")!==null&&this.children[0].node.type!=="statement_block"&&this.children[1].node.type!=="statement_block"}},sue=class extends VS{static{a(this,"JSStatementTree")}static{this.languageIds=new Set(["javascript","javascriptreact","jsx"])}createNode(e){return new Sit(e)}getStatementQueryText(){return`[ (export_statement) (import_statement) (debugger_statement) @@ -818,7 +818,7 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (labeled_statement) (method_definition) (field_definition) - ] @statement`}},Wue=class extends iI{static{a(this,"TSStatementTree")}static{this.languageIds=new Set(["typescript","typescriptreact"])}createNode(e){return new Aot(e)}getStatementQueryText(){return`[ + ] @statement`}},aue=class extends VS{static{a(this,"TSStatementTree")}static{this.languageIds=new Set(["typescript","typescriptreact"])}createNode(e){return new Sit(e)}getStatementQueryText(){return`[ (export_statement) (import_statement) (debugger_statement) @@ -841,7 +841,7 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (labeled_statement) (method_definition) (public_field_definition) - ] @statement`}},oor=class t extends SR{static{a(this,"PyStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","for_statement","while_statement","try_statement","with_statement","function_definition","class_definition","decorated_definition","match_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"?!1:this.node.startPosition.row===this.node.endPosition.row}},fwe=class extends iI{static{a(this,"PyStatementTree")}static{this.languageIds=new Set(["python"])}createNode(e){return new oor(e)}getStatementQueryText(){return`[ + ] @statement`}},Ior=class t extends hR{static{a(this,"PyStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","for_statement","while_statement","try_statement","with_statement","function_definition","class_definition","decorated_definition","match_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"?!1:this.node.startPosition.row===this.node.endPosition.row}},lxe=class extends VS{static{a(this,"PyStatementTree")}static{this.languageIds=new Set(["python"])}createNode(e){return new Ior(e)}getStatementQueryText(){return`[ (future_import_statement) (import_statement) (import_from_statement) @@ -867,24 +867,24 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (decorated_definition) (match_statement) (block) - ] @statement`}},sor=class t extends SR{static{a(this,"GoStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","method_declaration","if_statement","for_statement","expression_switch_statement","type_switch_statement","select_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},zue=class extends iI{static{a(this,"GoStatementTree")}static{this.languageIds=new Set(["go"])}createNode(e){return new sor(e)}getStatementQueryText(){return`[ + ] @statement`}},xor=class t extends hR{static{a(this,"GoStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","method_declaration","if_statement","for_statement","expression_switch_statement","type_switch_statement","select_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},cue=class extends VS{static{a(this,"GoStatementTree")}static{this.languageIds=new Set(["go"])}createNode(e){return new xor(e)}getStatementQueryText(){return`[ (package_clause) (function_declaration) (method_declaration) (import_declaration) (_statement) (block) - ] @statement`}},aor=class t extends SR{static{a(this,"PhpStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","else_clause","else_if_clause","for_statement","foreach_statement","while_statement","do_statement","switch_statement","try_statement","catch_clause","finally_clause","anonymous_function","compound_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},pwe=class extends iI{static{a(this,"PhpStatementTree")}static{this.languageIds=new Set(["php"])}createNode(e){return new aor(e)}getStatementQueryText(){return`[ + ] @statement`}},wor=class t extends hR{static{a(this,"PhpStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","else_clause","else_if_clause","for_statement","foreach_statement","while_statement","do_statement","switch_statement","try_statement","catch_clause","finally_clause","anonymous_function","compound_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},uxe=class extends VS{static{a(this,"PhpStatementTree")}static{this.languageIds=new Set(["php"])}createNode(e){return new wor(e)}getStatementQueryText(){return`[ (statement) (compound_statement) (method_declaration) (property_declaration) (const_declaration) (use_declaration) - ] @statement`}},cor=class t extends SR{static{a(this,"RubyStatementNode")}static{this.compoundTypeNames=new Set(["if","case","while","until","for","begin","module","class","method"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},hwe=class extends iI{static{a(this,"RubyStatementTree")}static{this.languageIds=new Set(["ruby"])}createNode(e){return new cor(e)}getStatementQueryText(){return`[ + ] @statement`}},Ror=class t extends hR{static{a(this,"RubyStatementNode")}static{this.compoundTypeNames=new Set(["if","case","while","until","for","begin","module","class","method"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},dxe=class extends VS{static{a(this,"RubyStatementTree")}static{this.languageIds=new Set(["ruby"])}createNode(e){return new Ror(e)}getStatementQueryText(){return`[ (_statement) (when) - ] @statement`}},lor=class t extends SR{static{a(this,"JavaStatementNode")}static{this.compoundTypeNames=new Set(["block","do_statement","enhanced_for_statement","for_statement","if_statement","labeled_statement","switch_expression","synchronized_statement","try_statement","try_with_resources_statement","while_statement","interface_declaration","method_declaration","constructor_declaration","compact_constructor_declaration","class_declaration","annotation_type_declaration","static_initializer"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},mwe=class extends iI{static{a(this,"JavaStatementTree")}static{this.languageIds=new Set(["java"])}createNode(e){return new lor(e)}getStatementQueryText(){return`[ + ] @statement`}},Por=class t extends hR{static{a(this,"JavaStatementNode")}static{this.compoundTypeNames=new Set(["block","do_statement","enhanced_for_statement","for_statement","if_statement","labeled_statement","switch_expression","synchronized_statement","try_statement","try_with_resources_statement","while_statement","interface_declaration","method_declaration","constructor_declaration","compact_constructor_declaration","class_declaration","annotation_type_declaration","static_initializer"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},fxe=class extends VS{static{a(this,"JavaStatementTree")}static{this.languageIds=new Set(["java"])}createNode(e){return new Por(e)}getStatementQueryText(){return`[ (statement) (field_declaration) (record_declaration) @@ -897,7 +897,7 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (block) (static_initializer) (constructor_declaration) - ] @statement`}},uor=class t extends SR{static{a(this,"CSharpStatementNode")}static{this.compoundTypeNames=new Set(["block","checked_statement","class_declaration","constructor_declaration","destructor_declaration","do_statement","fixed_statement","for_statement","foreach_statement","if_statement","interface_declaration","lock_statement","method_declaration","struct_declaration","switch_statement","try_statement","unsafe_statement","while_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},gwe=class extends iI{static{a(this,"CSharpStatementTree")}static{this.languageIds=new Set(["csharp"])}createNode(e){return new uor(e)}getStatementQueryText(){return`[ + ] @statement`}},kor=class t extends hR{static{a(this,"CSharpStatementNode")}static{this.compoundTypeNames=new Set(["block","checked_statement","class_declaration","constructor_declaration","destructor_declaration","do_statement","fixed_statement","for_statement","foreach_statement","if_statement","interface_declaration","lock_statement","method_declaration","struct_declaration","switch_statement","try_statement","unsafe_statement","while_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},pxe=class extends VS{static{a(this,"CSharpStatementTree")}static{this.languageIds=new Set(["csharp"])}createNode(e){return new kor(e)}getStatementQueryText(){return`[ (extern_alias_directive) (using_directive) (global_attribute) @@ -909,7 +909,7 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (declaration) (accessor_declaration) (block) - ] @statement`}},dor=class t extends SR{static{a(this,"CStatementNode")}static{this.compoundTypeNames=new Set(["declaration","function_definition","enum_specifier","field_declaration_list","type_definition","compound_statement","if_statement","switch_statement","while_statement","for_statement","do_statement","preproc_if","preproc_ifdef","namespace_definition","class_specifier","field_declaration_list","concept_definition","template_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){(this.isSingleLineDeclarationStatement()||this.isSingleLineConceptDefinition())&&this.collapse()}isSingleLineDeclarationStatement(){return!(this.node.type!=="declaration"||this.node.startPosition.row!==this.node.endPosition.row)}isSingleLineConceptDefinition(){return!(this.node.type!=="concept_definition"||this.node.startPosition.row!==this.node.endPosition.row)}},Awe=class extends iI{static{a(this,"CStatementTree")}static{this.languageIds=new Set(["c","cpp"])}createNode(e){return new dor(e)}getStatementQueryText(){return`[ + ] @statement`}},Dor=class t extends hR{static{a(this,"CStatementNode")}static{this.compoundTypeNames=new Set(["declaration","function_definition","enum_specifier","field_declaration_list","type_definition","compound_statement","if_statement","switch_statement","while_statement","for_statement","do_statement","preproc_if","preproc_ifdef","namespace_definition","class_specifier","field_declaration_list","concept_definition","template_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){(this.isSingleLineDeclarationStatement()||this.isSingleLineConceptDefinition())&&this.collapse()}isSingleLineDeclarationStatement(){return!(this.node.type!=="declaration"||this.node.startPosition.row!==this.node.endPosition.row)}isSingleLineConceptDefinition(){return!(this.node.type!=="concept_definition"||this.node.startPosition.row!==this.node.endPosition.row)}},hxe=class extends VS{static{a(this,"CStatementTree")}static{this.languageIds=new Set(["c","cpp"])}createNode(e){return new Dor(e)}getStatementQueryText(){return`[ (declaration) (function_definition) (type_definition) @@ -946,30 +946,30 @@ ${r}+- `:"";return e+this.description+o}}};Yue.StatementNode=SR;var iI=class{sta (using_declaration) (alias_declaration) (static_assert_declaration) - ] @statement`}}});var Kue=T(IR=>{"use strict";f();Object.defineProperty(IR,"__esModule",{value:!0});IR.BlockPositionType=IR.TerseBlockTrimmer=IR.VerboseBlockTrimmer=IR.BlockTrimmer=void 0;IR.getBlockPositionType=vVs;var yot=por(),ywe=class{static{a(this,"BlockTrimmer")}static isSupported(e){return yot.StatementTree.isSupported(e)}static isTrimmedByDefault(e){return yot.StatementTree.isTrimmedByDefault(e)}constructor(e,r,n){this.languageId=e,this.prefix=r,this.completion=n}async withParsedStatementTree(e){let r=yot.StatementTree.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length);await r.build();try{return await e(r)}finally{r[Symbol.dispose]()}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};IR.BlockTrimmer=ywe;var hor=class extends ywe{static{a(this,"VerboseBlockTrimmer")}constructor(e,r,n,o=10){super(e,r,n),this.lineLimit=o;let s=[...this.completion.matchAll(/\n/g)];s.length>=this.lineLimit&&this.lineLimit>0?this.offsetLimit=s[this.lineLimit-1].index:this.offsetLimit=void 0}async getCompletionTrimOffset(){return await this.withParsedStatementTree(e=>{let r=this.getStatementAtCursor(e),n=this.getContainingBlockOffset(r);return this.isWithinLimit(n)||(n=this.trimToBlankLine(n)),this.isWithinLimit(n)||(n=this.trimToStatement(r,n)),n})}isWithinLimit(e){return this.offsetLimit===void 0||e!==void 0&&e<=this.offsetLimit}trimToBlankLine(e){let r=[...this.trimmedCompletion(e).matchAll(/\r?\n\s*\r?\n/g)].reverse();for(;r.length>0&&!this.isWithinLimit(e);)e=r.pop().index;return e}trimToStatement(e,r){let n=this.prefix.length,o=this.prefix.length+(this.offsetLimit??this.completion.length),s=e,c=e?.nextSibling;for(;c&&c.node.endIndex<=o&&!this.hasNonStatementContentAfter(s);)s=c,c=c.nextSibling;return s&&s===e&&s.node.endIndex<=n&&(s=c),s&&s.node.endIndex>o?this.trimToStatement(s.children[0],this.asCompletionOffset(s.node.endIndex)):this.asCompletionOffset(s?.node?.endIndex)??r}};IR.VerboseBlockTrimmer=hor;var mor=class extends ywe{static{a(this,"TerseBlockTrimmer")}constructor(e,r,n,o=3,s=7){super(e,r,n),this.lineLimit=o,this.lookAhead=s;let c=[...this.completion.matchAll(/\n/g)],l=this.lineLimit+this.lookAhead;c.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=c[this.lineLimit-1].index),c.length>=l&&l>0&&(this.lookAheadOffset=c[l-1].index)}async getCompletionTrimOffset(){return await this.withParsedStatementTree(e=>{let r=e.statementAt(this.stmtStartPos()),n=this.getContainingBlockOffset(r);return n=this.trimAtFirstBlankLine(n),r&&(n=this.trimAtStatementChange(r,n)),this.limitOffset&&this.lookAheadOffset&&(n===void 0||n>this.lookAheadOffset)?this.limitOffset:n})}stmtStartPos(){let e=this.completion.match(/\S/);return e&&e.index!==void 0?this.prefix.length+e.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(e){let r=[...this.trimmedCompletion(e).matchAll(/\r?\n\s*\r?\n/g)];for(;r.length>0&&(e===void 0||e>r[0].index);){let n=r.shift();if(this.completion.substring(0,n.index).trim()!=="")return n.index}return e}trimAtStatementChange(e,r){let n=this.prefix.length,o=this.prefix.length+(r??this.completion.length);if(e.node.endIndex>n&&this.isCompoundStatement(e))return e.nextSibling&&e.node.endIndexn&&s.node.endIndex{"use strict";f();var bVs=xR&&xR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},hKn=xR&&xR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(xR,"__esModule",{value:!0});xR.ConfigBlockModeConfig=xR.ICompletionsBlockModeConfig=void 0;var TVs=qr(),SVs=Mo(),BD=uKn(),gKn=DK(),mKn=Xm(),IVs=Zm(),xVs=Kue(),wVs=por();xR.ICompletionsBlockModeConfig=(0,TVs.createServiceIdentifier)("ICompletionsBlockModeConfig");var Aor=class{static{a(this,"ConfigBlockModeConfig")}constructor(e,r){this.instantiationService=e,this.featuresService=r}forLanguage(e,r){let n=this.featuresService.overrideBlockMode(r);if(n)return gor(n,e);let o=this.featuresService.enableProgressiveReveal(r);return(this.instantiationService.invokeFunction(mKn.getConfig,mKn.ConfigKey.AlwaysRequestMultiline)??o)||xVs.BlockTrimmer.isTrimmedByDefault(e)?gor(BD.BlockMode.MoreMultiline,e):e==="ruby"?BD.BlockMode.Parsing:(0,gKn.isSupportedLanguageId)(e)?BD.BlockMode.ParsingAndServer:BD.BlockMode.Server}};xR.ConfigBlockModeConfig=Aor;xR.ConfigBlockModeConfig=Aor=bVs([hKn(0,SVs.IInstantiationService),hKn(1,IVs.ICompletionsFeaturesService)],Aor);function RVs(t){return[BD.BlockMode.Parsing,BD.BlockMode.ParsingAndServer,BD.BlockMode.MoreMultiline].includes(t)}a(RVs,"blockModeRequiresTreeSitter");function gor(t,e){return t===BD.BlockMode.MoreMultiline&&wVs.StatementTree.isSupported(e)?t:RVs(t)&&!(0,gKn.isSupportedLanguageId)(e)?BD.BlockMode.Server:t}a(gor,"toApplicableBlockMode")});var HU=T(Eot=>{"use strict";f();Object.defineProperty(Eot,"__esModule",{value:!0});Eot.ResultType=void 0;var AKn;(function(t){t[t.Network=0]="Network",t[t.Cache=1]="Cache",t[t.TypingAsSuggested=2]="TypingAsSuggested",t[t.Cycling=3]="Cycling",t[t.Async=4]="Async"})(AKn||(Eot.ResultType=AKn={}))});var Cor=T(Jue=>{"use strict";f();Object.defineProperty(Jue,"__esModule",{value:!0});Jue.CurrentGhostText=Jue.ICompletionsCurrentGhostText=void 0;var PVs=qr(),kVs=HU();Jue.ICompletionsCurrentGhostText=(0,PVs.createServiceIdentifier)("ICompletionsCurrentGhostText");var Eor=class{static{a(this,"CurrentGhostText")}constructor(){this.choices=[]}get clientCompletionId(){return this.choices[0]?.clientCompletionId}setGhostText(e,r,n,o){o!==kVs.ResultType.TypingAsSuggested&&(this.prefix=e,this.suffix=r,this.choices=n)}getCompletionsForUserTyping(e,r){let n=this.getRemainingPrefix(e,r);if(n!==void 0&&yKn(this.choices[0].completionText,n))return NVs(this.choices,n)}hasAcceptedCurrentCompletion(e,r){let n=this.getRemainingPrefix(e,r);if(n===void 0)return!1;let o=n===this.choices?.[0].completionText,s=this.choices?.[0].finishReason;return o&&s==="stop"}getRemainingPrefix(e,r){if(!(this.prefix===void 0||this.suffix===void 0||this.choices.length===0)&&this.suffix===r&&e.startsWith(this.prefix))return e.substring(this.prefix.length)}};Jue.CurrentGhostText=Eor;function NVs(t,e){return t.filter(r=>yKn(r.completionText,e)).map(r=>({...r,completionText:r.completionText.substring(e.length)}))}a(NVs,"adjustChoicesStart");function yKn(t,e){return t.startsWith(e)&&t.length>e.length}a(yKn,"startsWithAndExceeds")});var EKn=T(FB=>{"use strict";f();var DVs=FB&&FB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},MVs=FB&&FB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(FB,"__esModule",{value:!0});FB.ChangeTracker=void 0;var OVs=E_(),_or=class{static{a(this,"ChangeTracker")}get offset(){return this._offset}constructor(e,r,n){this._referenceCount=0,this._isDisposed=!1,this._offset=r,this._tracker=n.onDidChangeTextDocument(o=>{if(o.document.uri===e){for(let s of o.contentChanges)if(s.rangeOffset+s.rangeLength<=this.offset){let c=s.text.length-s.rangeLength;this._offset=this._offset+c}}})}push(e,r){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout(()=>{e(),this._referenceCount--,this._referenceCount===0&&(this._tracker.dispose(),this._isDisposed=!0)},r)}};FB.ChangeTracker=_or;FB.ChangeTracker=_or=DVs([MVs(2,OVs.ICompletionsTextDocumentManagerService)],_or)});var bor=T(Ewe=>{"use strict";f();Object.defineProperty(Ewe,"__esModule",{value:!0});Ewe.CompletionState=void 0;Ewe.createCompletionState=BVs;var vor=Xxe(),Cot=class t{static{a(this,"CompletionState")}constructor(e,r,n=[],o,s,c){this._textDocument=e,this._position=r,this.originalPosition=o??vor.Position.create(r.line,r.character),this.originalVersion=s??e.version,this.originalOffset=c??e.offsetAt(this.originalPosition),this._editsWithPosition=[...n]}get textDocument(){return this._textDocument}get position(){return this._position}get editsWithPosition(){return[...this._editsWithPosition]}updateState(e,r,n){return new t(e,r,n??this.editsWithPosition,this.originalPosition,this.originalVersion,this.originalOffset)}updatePosition(e){return this.updateState(this._textDocument,e)}addSelectedCompletionInfo(e){if(this.editsWithPosition.find(n=>n.source==="selectedCompletionInfo"))throw new Error("Selected completion info already applied");let r={range:e.range,newText:e.text};return this.applyEdits([r],!0)}applyEdits(e,r=!1){if(r&&e.length>1)throw new Error("Selected completion info should be a single edit");let n=this._textDocument,o=this._position,s=n.offsetAt(o),c=this.editsWithPosition;for(let{range:l,newText:u}of e){let d=n.getText(l),p=n.offsetAt(l.end);if(n=n.applyEdits([{range:l,newText:u}]),s{"use strict";f();Object.defineProperty(Xue,"__esModule",{value:!0});Xue.SpeculativeRequestCache=Xue.ICompletionsSpeculativeRequestCache=void 0;var LVs=qr(),FVs=BB();Xue.ICompletionsSpeculativeRequestCache=(0,LVs.createServiceIdentifier)("ICompletionsSpeculativeRequestCache");var Tor=class{static{a(this,"SpeculativeRequestCache")}constructor(){this.cache=new FVs.LRUCacheMap(100)}set(e,r){this.cache.set(e,r)}async request(e){let r=this.cache.get(e);r!==void 0&&(this.cache.delete(e),await r())}};Xue.SpeculativeRequestCache=Tor});var Zue=T(Yy=>{"use strict";f();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.logger=Yy.GHOST_TEXT_CATEGORY=void 0;Yy.telemetryShown=QVs;Yy.telemetryAccepted=qVs;Yy.telemetryRejected=GVs;Yy.mkCanceledResultTelemetry=HVs;Yy.mkBasicResultTelemetry=jVs;Yy.handleGhostTextResultTelemetry=$Vs;Yy.resultTypeToString=Sor;var CKn=mc(),MK=Dp(),Cwe=HU(),UVs=_ot();Yy.GHOST_TEXT_CATEGORY="ghostText";Yy.logger=new CKn.Logger("getCompletions");function QVs(t,e){t.get(UVs.ICompletionsSpeculativeRequestCache).request(e.clientCompletionId),e.telemetry.markAsDisplayed(),e.telemetry.properties.reason=Sor(e.resultType),(0,MK.telemetry)(t,"ghostText.shown",e.telemetry)}a(QVs,"telemetryShown");function qVs(t,e,r){let n=e+".accepted";(0,MK.telemetry)(t,n,r)}a(qVs,"telemetryAccepted");function GVs(t,e,r){let n=e+".rejected";(0,MK.telemetry)(t,n,r)}a(GVs,"telemetryRejected");function HVs(t,e={}){return{...e,telemetryBlob:t}}a(HVs,"mkCanceledResultTelemetry");function jVs(t){let e={headerRequestId:t.properties.headerRequestId,copilot_trackingId:t.properties.copilot_trackingId};return t.properties.sku!==void 0&&(e.sku=t.properties.sku),t.properties.opportunityId!==void 0&&(e.opportunityId=t.properties.opportunityId),t.properties.organizations_list!==void 0&&(e.organizations_list=t.properties.organizations_list),t.properties.enterprise_list!==void 0&&(e.enterprise_list=t.properties.enterprise_list),t.properties.clientCompletionId!==void 0&&(e.clientCompletionId=t.properties.clientCompletionId),e}a(jVs,"mkBasicResultTelemetry");function $Vs(t,e){let r=t.get(CKn.ICompletionsLogTargetService);if(e.type!=="promptOnly"){if(e.type==="success"){let n=(0,MK.now)()-e.telemetryBlob.issuedTime,o=Sor(e.resultType),s=JSON.stringify(e.performanceMetrics),c={...e.telemetryData,reason:o,performanceMetrics:s},{foundOffset:l}=e.telemetryBlob.measurements,u=e.performanceMetrics?.map(([d,p])=>` -${p.toFixed(2)} ${d}`).join("")??"";return Yy.logger.debug(r,`ghostText produced from ${o} in ${Math.round(n)}ms with foundOffset ${l}${u}`),(0,MK.telemetryRaw)(t,"ghostText.produced",c,{timeToProduceMs:n,foundOffset:l}),e.value}if(Yy.logger.debug(r,"No ghostText produced -- "+e.type+": "+e.reason),e.type==="canceled"){(0,MK.telemetry)(t,"ghostText.canceled",e.telemetryData.telemetryBlob.extendedBy({reason:e.reason,cancelledNetworkRequest:e.telemetryData.cancelledNetworkRequest?"true":"false"}));return}(0,MK.telemetryRaw)(t,`ghostText.${e.type}`,{...e.telemetryData,reason:e.reason},{})}}a($Vs,"handleGhostTextResultTelemetry");function Sor(t){switch(t){case Cwe.ResultType.Network:return"network";case Cwe.ResultType.Cache:return"cache";case Cwe.ResultType.Cycling:return"cycling";case Cwe.ResultType.TypingAsSuggested:return"typingAsSuggested";case Cwe.ResultType.Async:return"async"}}a(Sor,"resultTypeToString")});var bKn=T(ede=>{"use strict";f();Object.defineProperty(ede,"__esModule",{value:!0});ede.getBlockParser=Tot;ede.isEmptyBlockStart=YVs;ede.isBlockBodyFinished=KVs;ede.getNodeStart=JVs;var jU=DK(),vot=class{static{a(this,"BaseBlockParser")}constructor(e,r,n){this.languageId=e,this.nodeMatch=r,this.nodeTypesWithBlockOrStmtChild=n}async getNodeMatchAtPosition(e,r,n){let o=await(0,jU.parseTreeSitter)(this.languageId,e);try{let c=o.rootNode.descendantForIndex(r);for(;c;){let l=this.nodeMatch[c.type];if(l){if(!this.nodeTypesWithBlockOrStmtChild.has(c.type))break;let u=this.nodeTypesWithBlockOrStmtChild.get(c.type);if((u===""?c.namedChildren[0]:c.childForFieldName(u))?.type===l)break}c=c.parent}return c?n(c):void 0}finally{o.delete()}}getNextBlockAtPosition(e,r,n){return this.getNodeMatchAtPosition(e,r,o=>{let s=o.children.reverse().find(c=>c.type===this.nodeMatch[o.type]);if(s){if(this.languageId==="python"&&s.parent){let c=s.parent.type===":"?s.parent.parent:s.parent,l=c?.nextSibling;for(;l&&l.type==="comment";){let u=l.startPosition.row===s.endPosition.row&&l.startPosition.column>=s.endPosition.column,d=l.startPosition.row>c.endPosition.row&&l.startPosition.column>c.startPosition.column;if(u||d)s=l,l=l.nextSibling;else break}}if(!(s.endIndex>=s.tree.rootNode.endIndex-1&&(s.hasError||s.parent.hasError)))return n(s)}})}async isBlockBodyFinished(e,r,n){let o=(e+r).trimEnd(),s=await this.getNextBlockAtPosition(o,n,c=>c.endIndex);if(s!==void 0&&s0?c:void 0}}getNodeStart(e,r){let n=e.trimEnd();return this.getNodeMatchAtPosition(n,r,o=>o.startIndex)}},bot=class extends vot{static{a(this,"RegexBasedBlockParser")}constructor(e,r,n,o,s){super(e,o,s),this.blockEmptyMatch=r,this.lineMatch=n}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,r){let n=await this.getNextBlockAtPosition(e,r,o=>{o.startIndex{"use strict";f();Object.defineProperty(mR,"__esModule",{value:!0});mR.BlockPositionType=mR.TerseBlockTrimmer=mR.VerboseBlockTrimmer=mR.BlockTrimmer=void 0;mR.getBlockPositionType=bzs;var Iit=Nor(),mxe=class{static{a(this,"BlockTrimmer")}static isSupported(e){return Iit.StatementTree.isSupported(e)}static isTrimmedByDefault(e){return Iit.StatementTree.isTrimmedByDefault(e)}constructor(e,r,n){this.languageId=e,this.prefix=r,this.completion=n}async withParsedStatementTree(e){let r=Iit.StatementTree.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length);await r.build();try{return await e(r)}finally{r[Symbol.dispose]()}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};mR.BlockTrimmer=mxe;var Mor=class extends mxe{static{a(this,"VerboseBlockTrimmer")}constructor(e,r,n,o=10){super(e,r,n),this.lineLimit=o;let s=[...this.completion.matchAll(/\n/g)];s.length>=this.lineLimit&&this.lineLimit>0?this.offsetLimit=s[this.lineLimit-1].index:this.offsetLimit=void 0}async getCompletionTrimOffset(){return await this.withParsedStatementTree(e=>{let r=this.getStatementAtCursor(e),n=this.getContainingBlockOffset(r);return this.isWithinLimit(n)||(n=this.trimToBlankLine(n)),this.isWithinLimit(n)||(n=this.trimToStatement(r,n)),n})}isWithinLimit(e){return this.offsetLimit===void 0||e!==void 0&&e<=this.offsetLimit}trimToBlankLine(e){let r=[...this.trimmedCompletion(e).matchAll(/\r?\n\s*\r?\n/g)].reverse();for(;r.length>0&&!this.isWithinLimit(e);)e=r.pop().index;return e}trimToStatement(e,r){let n=this.prefix.length,o=this.prefix.length+(this.offsetLimit??this.completion.length),s=e,c=e?.nextSibling;for(;c&&c.node.endIndex<=o&&!this.hasNonStatementContentAfter(s);)s=c,c=c.nextSibling;return s&&s===e&&s.node.endIndex<=n&&(s=c),s&&s.node.endIndex>o?this.trimToStatement(s.children[0],this.asCompletionOffset(s.node.endIndex)):this.asCompletionOffset(s?.node?.endIndex)??r}};mR.VerboseBlockTrimmer=Mor;var Oor=class extends mxe{static{a(this,"TerseBlockTrimmer")}constructor(e,r,n,o=3,s=7){super(e,r,n),this.lineLimit=o,this.lookAhead=s;let c=[...this.completion.matchAll(/\n/g)],l=this.lineLimit+this.lookAhead;c.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=c[this.lineLimit-1].index),c.length>=l&&l>0&&(this.lookAheadOffset=c[l-1].index)}async getCompletionTrimOffset(){return await this.withParsedStatementTree(e=>{let r=e.statementAt(this.stmtStartPos()),n=this.getContainingBlockOffset(r);return n=this.trimAtFirstBlankLine(n),r&&(n=this.trimAtStatementChange(r,n)),this.limitOffset&&this.lookAheadOffset&&(n===void 0||n>this.lookAheadOffset)?this.limitOffset:n})}stmtStartPos(){let e=this.completion.match(/\S/);return e&&e.index!==void 0?this.prefix.length+e.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(e){let r=[...this.trimmedCompletion(e).matchAll(/\r?\n\s*\r?\n/g)];for(;r.length>0&&(e===void 0||e>r[0].index);){let n=r.shift();if(this.completion.substring(0,n.index).trim()!=="")return n.index}return e}trimAtStatementChange(e,r){let n=this.prefix.length,o=this.prefix.length+(r??this.completion.length);if(e.node.endIndex>n&&this.isCompoundStatement(e))return e.nextSibling&&e.node.endIndexn&&s.node.endIndex{"use strict";f();var Tzs=gR&&gR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},pJn=gR&&gR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(gR,"__esModule",{value:!0});gR.ConfigBlockModeConfig=gR.ICompletionsBlockModeConfig=void 0;var Szs=qr(),Izs=Po(),TD=lJn(),mJn=QY(),hJn=Gm(),xzs=Hm(),wzs=uue(),Rzs=Nor();gR.ICompletionsBlockModeConfig=(0,Szs.createServiceIdentifier)("ICompletionsBlockModeConfig");var Lor=class{static{a(this,"ConfigBlockModeConfig")}constructor(e,r){this.instantiationService=e,this.featuresService=r}forLanguage(e,r){let n=this.featuresService.overrideBlockMode(r);if(n)return Bor(n,e);let o=this.featuresService.enableProgressiveReveal(r);return(this.instantiationService.invokeFunction(hJn.getConfig,hJn.ConfigKey.AlwaysRequestMultiline)??o)||wzs.BlockTrimmer.isTrimmedByDefault(e)?Bor(TD.BlockMode.MoreMultiline,e):e==="ruby"?TD.BlockMode.Parsing:(0,mJn.isSupportedLanguageId)(e)?TD.BlockMode.ParsingAndServer:TD.BlockMode.Server}};gR.ConfigBlockModeConfig=Lor;gR.ConfigBlockModeConfig=Lor=Tzs([pJn(0,Izs.IInstantiationService),pJn(1,xzs.ICompletionsFeaturesService)],Lor);function Pzs(t){return[TD.BlockMode.Parsing,TD.BlockMode.ParsingAndServer,TD.BlockMode.MoreMultiline].includes(t)}a(Pzs,"blockModeRequiresTreeSitter");function Bor(t,e){return t===TD.BlockMode.MoreMultiline&&Rzs.StatementTree.isSupported(e)?t:Pzs(t)&&!(0,mJn.isSupportedLanguageId)(e)?TD.BlockMode.Server:t}a(Bor,"toApplicableBlockMode")});var gU=T(xit=>{"use strict";f();Object.defineProperty(xit,"__esModule",{value:!0});xit.ResultType=void 0;var gJn;(function(t){t[t.Network=0]="Network",t[t.Cache=1]="Cache",t[t.TypingAsSuggested=2]="TypingAsSuggested",t[t.Cycling=3]="Cycling",t[t.Async=4]="Async"})(gJn||(xit.ResultType=gJn={}))});var Qor=T(due=>{"use strict";f();Object.defineProperty(due,"__esModule",{value:!0});due.CurrentGhostText=due.ICompletionsCurrentGhostText=void 0;var kzs=qr(),Dzs=gU();due.ICompletionsCurrentGhostText=(0,kzs.createServiceIdentifier)("ICompletionsCurrentGhostText");var Uor=class{static{a(this,"CurrentGhostText")}constructor(){this.choices=[]}get clientCompletionId(){return this.choices[0]?.clientCompletionId}setGhostText(e,r,n,o){o!==Dzs.ResultType.TypingAsSuggested&&(this.prefix=e,this.suffix=r,this.choices=n)}getCompletionsForUserTyping(e,r){let n=this.getRemainingPrefix(e,r);if(n!==void 0&&AJn(this.choices[0].completionText,n))return Nzs(this.choices,n)}hasAcceptedCurrentCompletion(e,r){let n=this.getRemainingPrefix(e,r);if(n===void 0)return!1;let o=n===this.choices?.[0].completionText,s=this.choices?.[0].finishReason;return o&&s==="stop"}getRemainingPrefix(e,r){if(!(this.prefix===void 0||this.suffix===void 0||this.choices.length===0)&&this.suffix===r&&e.startsWith(this.prefix))return e.substring(this.prefix.length)}};due.CurrentGhostText=Uor;function Nzs(t,e){return t.filter(r=>AJn(r.completionText,e)).map(r=>({...r,completionText:r.completionText.substring(e.length)}))}a(Nzs,"adjustChoicesStart");function AJn(t,e){return t.startsWith(e)&&t.length>e.length}a(AJn,"startsWithAndExceeds")});var yJn=T(_B=>{"use strict";f();var Mzs=_B&&_B.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Ozs=_B&&_B.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(_B,"__esModule",{value:!0});_B.ChangeTracker=void 0;var Bzs=aC(),qor=class{static{a(this,"ChangeTracker")}get offset(){return this._offset}constructor(e,r,n){this._referenceCount=0,this._isDisposed=!1,this._offset=r,this._tracker=n.onDidChangeTextDocument(o=>{if(o.document.uri===e){for(let s of o.contentChanges)if(s.rangeOffset+s.rangeLength<=this.offset){let c=s.text.length-s.rangeLength;this._offset=this._offset+c}}})}push(e,r){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout(()=>{e(),this._referenceCount--,this._referenceCount===0&&(this._tracker.dispose(),this._isDisposed=!0)},r)}};_B.ChangeTracker=qor;_B.ChangeTracker=qor=Mzs([Ozs(2,Bzs.ICompletionsTextDocumentManagerService)],qor)});var Hor=T(gxe=>{"use strict";f();Object.defineProperty(gxe,"__esModule",{value:!0});gxe.CompletionState=void 0;gxe.createCompletionState=Lzs;var Gor=YIe(),wit=class t{static{a(this,"CompletionState")}constructor(e,r,n=[],o,s,c){this._textDocument=e,this._position=r,this.originalPosition=o??Gor.Position.create(r.line,r.character),this.originalVersion=s??e.version,this.originalOffset=c??e.offsetAt(this.originalPosition),this._editsWithPosition=[...n]}get textDocument(){return this._textDocument}get position(){return this._position}get editsWithPosition(){return[...this._editsWithPosition]}updateState(e,r,n){return new t(e,r,n??this.editsWithPosition,this.originalPosition,this.originalVersion,this.originalOffset)}updatePosition(e){return this.updateState(this._textDocument,e)}addSelectedCompletionInfo(e){if(this.editsWithPosition.find(n=>n.source==="selectedCompletionInfo"))throw new Error("Selected completion info already applied");let r={range:e.range,newText:e.text};return this.applyEdits([r],!0)}applyEdits(e,r=!1){if(r&&e.length>1)throw new Error("Selected completion info should be a single edit");let n=this._textDocument,o=this._position,s=n.offsetAt(o),c=this.editsWithPosition;for(let{range:l,newText:u}of e){let d=n.getText(l),p=n.offsetAt(l.end);if(n=n.applyEdits([{range:l,newText:u}]),s{"use strict";f();Object.defineProperty(fue,"__esModule",{value:!0});fue.SpeculativeRequestCache=fue.ICompletionsSpeculativeRequestCache=void 0;var Fzs=qr(),Uzs=yB();fue.ICompletionsSpeculativeRequestCache=(0,Fzs.createServiceIdentifier)("ICompletionsSpeculativeRequestCache");var jor=class{static{a(this,"SpeculativeRequestCache")}constructor(){this.cache=new Uzs.LRUCacheMap(100)}set(e,r){this.cache.set(e,r)}async request(e){let r=this.cache.get(e);r!==void 0&&(this.cache.delete(e),await r())}};fue.SpeculativeRequestCache=jor});var pue=T(Qy=>{"use strict";f();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.logger=Qy.GHOST_TEXT_CATEGORY=void 0;Qy.telemetryShown=qzs;Qy.telemetryAccepted=Gzs;Qy.telemetryRejected=Hzs;Qy.mkCanceledResultTelemetry=jzs;Qy.mkBasicResultTelemetry=$zs;Qy.handleGhostTextResultTelemetry=Vzs;Qy.resultTypeToString=$or;var EJn=uc(),qY=xp(),Axe=gU(),Qzs=Rit();Qy.GHOST_TEXT_CATEGORY="ghostText";Qy.logger=new EJn.Logger("getCompletions");function qzs(t,e){t.get(Qzs.ICompletionsSpeculativeRequestCache).request(e.clientCompletionId),e.telemetry.markAsDisplayed(),e.telemetry.properties.reason=$or(e.resultType),(0,qY.telemetry)(t,"ghostText.shown",e.telemetry)}a(qzs,"telemetryShown");function Gzs(t,e,r){let n=e+".accepted";(0,qY.telemetry)(t,n,r)}a(Gzs,"telemetryAccepted");function Hzs(t,e,r){let n=e+".rejected";(0,qY.telemetry)(t,n,r)}a(Hzs,"telemetryRejected");function jzs(t,e={}){return{...e,telemetryBlob:t}}a(jzs,"mkCanceledResultTelemetry");function $zs(t){let e={headerRequestId:t.properties.headerRequestId,copilot_trackingId:t.properties.copilot_trackingId};return t.properties.sku!==void 0&&(e.sku=t.properties.sku),t.properties.opportunityId!==void 0&&(e.opportunityId=t.properties.opportunityId),t.properties.organizations_list!==void 0&&(e.organizations_list=t.properties.organizations_list),t.properties.enterprise_list!==void 0&&(e.enterprise_list=t.properties.enterprise_list),t.properties.clientCompletionId!==void 0&&(e.clientCompletionId=t.properties.clientCompletionId),e}a($zs,"mkBasicResultTelemetry");function Vzs(t,e){let r=t.get(EJn.ICompletionsLogTargetService);if(e.type!=="promptOnly"){if(e.type==="success"){let n=(0,qY.now)()-e.telemetryBlob.issuedTime,o=$or(e.resultType),s=JSON.stringify(e.performanceMetrics),c={...e.telemetryData,reason:o,performanceMetrics:s},{foundOffset:l}=e.telemetryBlob.measurements,u=e.performanceMetrics?.map(([d,p])=>` +${p.toFixed(2)} ${d}`).join("")??"";return Qy.logger.debug(r,`ghostText produced from ${o} in ${Math.round(n)}ms with foundOffset ${l}${u}`),(0,qY.telemetryRaw)(t,"ghostText.produced",c,{timeToProduceMs:n,foundOffset:l}),e.value}if(Qy.logger.debug(r,"No ghostText produced -- "+e.type+": "+e.reason),e.type==="canceled"){(0,qY.telemetry)(t,"ghostText.canceled",e.telemetryData.telemetryBlob.extendedBy({reason:e.reason,cancelledNetworkRequest:e.telemetryData.cancelledNetworkRequest?"true":"false"}));return}(0,qY.telemetryRaw)(t,`ghostText.${e.type}`,{...e.telemetryData,reason:e.reason},{})}}a(Vzs,"handleGhostTextResultTelemetry");function $or(t){switch(t){case Axe.ResultType.Network:return"network";case Axe.ResultType.Cache:return"cache";case Axe.ResultType.Cycling:return"cycling";case Axe.ResultType.TypingAsSuggested:return"typingAsSuggested";case Axe.ResultType.Async:return"async"}}a($or,"resultTypeToString")});var vJn=T(hue=>{"use strict";f();Object.defineProperty(hue,"__esModule",{value:!0});hue.getBlockParser=Dit;hue.isEmptyBlockStart=Kzs;hue.isBlockBodyFinished=Jzs;hue.getNodeStart=Xzs;var AU=QY(),Pit=class{static{a(this,"BaseBlockParser")}constructor(e,r,n){this.languageId=e,this.nodeMatch=r,this.nodeTypesWithBlockOrStmtChild=n}async getNodeMatchAtPosition(e,r,n){let o=await(0,AU.parseTreeSitter)(this.languageId,e);try{let c=o.rootNode.descendantForIndex(r);for(;c;){let l=this.nodeMatch[c.type];if(l){if(!this.nodeTypesWithBlockOrStmtChild.has(c.type))break;let u=this.nodeTypesWithBlockOrStmtChild.get(c.type);if((u===""?c.namedChildren[0]:c.childForFieldName(u))?.type===l)break}c=c.parent}return c?n(c):void 0}finally{o.delete()}}getNextBlockAtPosition(e,r,n){return this.getNodeMatchAtPosition(e,r,o=>{let s=o.children.reverse().find(c=>c.type===this.nodeMatch[o.type]);if(s){if(this.languageId==="python"&&s.parent){let c=s.parent.type===":"?s.parent.parent:s.parent,l=c?.nextSibling;for(;l&&l.type==="comment";){let u=l.startPosition.row===s.endPosition.row&&l.startPosition.column>=s.endPosition.column,d=l.startPosition.row>c.endPosition.row&&l.startPosition.column>c.startPosition.column;if(u||d)s=l,l=l.nextSibling;else break}}if(!(s.endIndex>=s.tree.rootNode.endIndex-1&&(s.hasError||s.parent.hasError)))return n(s)}})}async isBlockBodyFinished(e,r,n){let o=(e+r).trimEnd(),s=await this.getNextBlockAtPosition(o,n,c=>c.endIndex);if(s!==void 0&&s0?c:void 0}}getNodeStart(e,r){let n=e.trimEnd();return this.getNodeMatchAtPosition(n,r,o=>o.startIndex)}},kit=class extends Pit{static{a(this,"RegexBasedBlockParser")}constructor(e,r,n,o,s){super(e,o,s),this.blockEmptyMatch=r,this.lineMatch=n}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,r){let n=await this.getNextBlockAtPosition(e,r,o=>{o.startIndex0&&/\s/.test(t.charAt(r-1));)r--;return r}a(vKn,"rewindToNearestNonWs");function _Kn(t,e){let r=t.startIndex,n=t.startIndex-t.startPosition.column,o=e.substring(n,r);if(/^\s*$/.test(o))return o}a(_Kn,"indent");function WVs(t,e,r){if(e.startPosition.row<=t.startPosition.row)return!1;let n=_Kn(t,r),o=_Kn(e,r);return n!==void 0&&o!==void 0&&n.startsWith(o)}a(WVs,"outdented");var LD=class extends vot{static{a(this,"TreeSitterBasedBlockParser")}constructor(e,r,n,o,s,c,l){super(e,r,n),this.startKeywords=o,this.blockNodeType=s,this.emptyStatementType=c,this.curlyBraceLanguage=l}isBlockEmpty(e,r){let n=e.text.trim();return this.curlyBraceLanguage&&(n.startsWith("{")&&(n=n.slice(1)),n.endsWith("}")&&(n=n.slice(0,-1)),n=n.trim()),!!(n.length===0||this.languageId==="python"&&(e.parent?.type==="class_definition"||e.parent?.type==="function_definition")&&e.children.length===1&&(0,jU.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,r){if(r>e.length)throw new RangeError("Invalid offset");for(let s=r;sg.type===";")&&p.endIndex<=r}p=p.parent}}let c=null,l=null,u=null,d=s;for(;d!==null;){if(d.type===this.blockNodeType){l=d;break}if(this.nodeMatch[d.type]){u=d;break}if(d.type==="ERROR"){c=d;break}d=d.parent}if(l!==null){if(!l.parent||!this.nodeMatch[l.parent.type])return!1;if(this.languageId==="python"){let p=l.previousSibling;if(p!==null&&p.hasError&&(p.text.startsWith('"""')||p.text.startsWith("'''")))return!0}return this.isBlockEmpty(l,r)}if(c!==null){if(c.previousSibling?.type==="module"||c.previousSibling?.type==="internal_module"||c.previousSibling?.type==="def")return!0;if(this.languageId==="python"&&o>=14&&c.hasError&&(c.text.startsWith('"')||c.text.startsWith("'"))){let g=c.parent?.type;if(g==="function_definition"||g==="class_definition"||g==="module")return!0}let p=[...c.children].reverse(),h=p.find(g=>this.startKeywords.includes(g.type)),m=p.find(g=>g.type===this.blockNodeType);if(h){switch(this.languageId){case"python":{h.type==="try"&&s.type==="identifier"&&s.text.length>4&&(m=p.find(y=>y.hasError)?.children.find(y=>y.type==="block"));let g,A=0;for(let y of c.children){if(y.type===":"&&A===0){g=y;break}y.type==="("&&(A+=1),y.type===")"&&(A-=1)}if(g&&h.endIndex<=g.startIndex&&g.nextSibling){if(h.type==="def"){let y=g.nextSibling;if(y.type==='"'||y.type==="'"||y.type==="ERROR"&&(y.text==='"""'||y.text==="'''"))return!0}return!1}break}case"javascript":{if(h.type==="class")if(o<=13){if(p.find(E=>E.type==="formal_parameters"))return!0}else{let y=c.children;for(let E=0;Ey.type==="{");if(g&&g.startIndex>h.endIndex&&g.nextSibling!==null||p.find(y=>y.type==="do")&&h.type==="while"||h.type==="=>"&&h.nextSibling&&h.nextSibling.type!=="{")return!1;break}case"typescript":{let g=p.find(y=>y.type==="{");if(g&&g.startIndex>h.endIndex&&g.nextSibling!==null||p.find(y=>y.type==="do")&&h.type==="while"||h.type==="=>"&&h.nextSibling&&h.nextSibling.type!=="{")return!1;break}}return m&&m.startIndex>h.endIndex?this.isBlockEmpty(m,r):!0}}if(u!==null){let p=this.nodeMatch[u.type],h=u.children.slice().reverse().find(m=>m.type===p);if(h)return this.isBlockEmpty(h,r);if(this.nodeTypesWithBlockOrStmtChild.has(u.type)){let m=this.nodeTypesWithBlockOrStmtChild.get(u.type),g=m===""?u.children[0]:u.childForFieldName(m);if(g&&g.type!==this.blockNodeType&&g.type!==this.emptyStatementType)return!1}return!0}return!1}finally{n.delete()}}},zVs={python:new LD("python",{class_definition:"block",elif_clause:"block",else_clause:"block",except_clause:"block",finally_clause:"block",for_statement:"block",function_definition:"block",if_statement:"block",try_statement:"block",while_statement:"block",with_statement:"block"},new Map,["def","class","if","elif","else","for","while","try","except","finally","with"],"block",null,!1),javascript:new LD("javascript",{arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",method_definition:"statement_block",try_statement:"statement_block",while_statement:"statement_block",with_statement:"statement_block",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),typescript:new LD("typescript",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),tsx:new LD("typescriptreact",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),go:new bot("go","{}",/\b(func|if|else|for)\b/,{communication_case:"block",default_case:"block",expression_case:"block",for_statement:"block",func_literal:"block",function_declaration:"block",if_statement:"block",labeled_statement:"block",method_declaration:"block",type_case:"block"},new Map),ruby:new bot("ruby","end",/\b(BEGIN|END|case|class|def|do|else|elsif|for|if|module|unless|until|while)\b|->/,{begin_block:"}",block:"}",end_block:"}",lambda:"block",for:"do",until:"do",while:"do",case:"end",do:"end",if:"end",method:"end",module:"end",unless:"end",do_block:"end"},new Map),"c-sharp":new LD("csharp",{},new Map([]),[],"block",null,!0),java:new LD("java",{},new Map([]),[],"block",null,!0),php:new LD("php",{},new Map([]),[],"block",null,!0),cpp:new LD("cpp",{},new Map([]),[],"block",null,!0)};function Tot(t){if(!(0,jU.isSupportedLanguageId)(t))throw new Error(`Language ${t} is not supported`);return zVs[(0,jU.languageIdToWasmLanguage)(t)]}a(Tot,"getBlockParser");async function YVs(t,e,r){return(0,jU.isSupportedLanguageId)(t)?Tot(t).isEmptyBlockStart(e,r):!1}a(YVs,"isEmptyBlockStart");async function KVs(t,e,r,n){if((0,jU.isSupportedLanguageId)(t))return Tot(t).isBlockBodyFinished(e,r,n)}a(KVs,"isBlockBodyFinished");async function JVs(t,e,r){if((0,jU.isSupportedLanguageId)(t))return Tot(t).getNodeStart(e,r)}a(JVs,"getNodeStart")});var xot=T($U=>{"use strict";f();Object.defineProperty($U,"__esModule",{value:!0});$U.parsingBlockFinished=XVs;$U.isEmptyBlockStartUtil=ZVs;$U.getNodeStartUtil=eWs;$U.contextIndentation=iWs;$U.contextIndentationFromText=TKn;$U.indentationBlockFinished=aWs;var Ior=bKn(),Iot=que();function XVs(t,e){let r=t.getText(Iot.LocationFactory.range(Iot.LocationFactory.position(0,0),e)),n=t.offsetAt(e),o=t.detectedLanguageId;return s=>(0,Ior.isBlockBodyFinished)(o,r,s,n)}a(XVs,"parsingBlockFinished");function ZVs(t,e){return(0,Ior.isEmptyBlockStart)(t.detectedLanguageId,t.getText(),t.offsetAt(e))}a(ZVs,"isEmptyBlockStartUtil");async function eWs(t,e,r){let o=t.getText(Iot.LocationFactory.range(Iot.LocationFactory.position(0,0),e))+r,s=await(0,Ior.getNodeStart)(t.detectedLanguageId,o,t.offsetAt(e));if(s)return t.positionAt(s)}a(eWs,"getNodeStartUtil");var tWs=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map(t=>t+"\\b")),rWs=new RegExp(`^(${tWs.join("|")})`);function nWs(t){return rWs.test(t.trimLeft().toLowerCase())}a(nWs,"isContinuationLine");function Sot(t){let e=/^(\s*)([^]*)$/.exec(t);if(e&&e[2]&&e[2].length>0)return e[1].length}a(Sot,"indentationOfLine");function iWs(t,e){let r=t.getText(),n=t.offsetAt(e);return TKn(r,n,t.detectedLanguageId)}a(iWs,"contextIndentation");function TKn(t,e,r){let n=t.slice(0,e).split(` +`,e);return n<0&&(n=t.length),t.slice(r+1,n)}a(Wzs,"getLineAtOffset");function CJn(t,e){let r=e;for(;r>0&&/\s/.test(t.charAt(r-1));)r--;return r}a(CJn,"rewindToNearestNonWs");function _Jn(t,e){let r=t.startIndex,n=t.startIndex-t.startPosition.column,o=e.substring(n,r);if(/^\s*$/.test(o))return o}a(_Jn,"indent");function zzs(t,e,r){if(e.startPosition.row<=t.startPosition.row)return!1;let n=_Jn(t,r),o=_Jn(e,r);return n!==void 0&&o!==void 0&&n.startsWith(o)}a(zzs,"outdented");var SD=class extends Pit{static{a(this,"TreeSitterBasedBlockParser")}constructor(e,r,n,o,s,c,l){super(e,r,n),this.startKeywords=o,this.blockNodeType=s,this.emptyStatementType=c,this.curlyBraceLanguage=l}isBlockEmpty(e,r){let n=e.text.trim();return this.curlyBraceLanguage&&(n.startsWith("{")&&(n=n.slice(1)),n.endsWith("}")&&(n=n.slice(0,-1)),n=n.trim()),!!(n.length===0||this.languageId==="python"&&(e.parent?.type==="class_definition"||e.parent?.type==="function_definition")&&e.children.length===1&&(0,AU.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,r){if(r>e.length)throw new RangeError("Invalid offset");for(let s=r;sg.type===";")&&p.endIndex<=r}p=p.parent}}let c=null,l=null,u=null,d=s;for(;d!==null;){if(d.type===this.blockNodeType){l=d;break}if(this.nodeMatch[d.type]){u=d;break}if(d.type==="ERROR"){c=d;break}d=d.parent}if(l!==null){if(!l.parent||!this.nodeMatch[l.parent.type])return!1;if(this.languageId==="python"){let p=l.previousSibling;if(p!==null&&p.hasError&&(p.text.startsWith('"""')||p.text.startsWith("'''")))return!0}return this.isBlockEmpty(l,r)}if(c!==null){if(c.previousSibling?.type==="module"||c.previousSibling?.type==="internal_module"||c.previousSibling?.type==="def")return!0;if(this.languageId==="python"&&o>=14&&c.hasError&&(c.text.startsWith('"')||c.text.startsWith("'"))){let g=c.parent?.type;if(g==="function_definition"||g==="class_definition"||g==="module")return!0}let p=[...c.children].reverse(),h=p.find(g=>this.startKeywords.includes(g.type)),m=p.find(g=>g.type===this.blockNodeType);if(h){switch(this.languageId){case"python":{h.type==="try"&&s.type==="identifier"&&s.text.length>4&&(m=p.find(y=>y.hasError)?.children.find(y=>y.type==="block"));let g,A=0;for(let y of c.children){if(y.type===":"&&A===0){g=y;break}y.type==="("&&(A+=1),y.type===")"&&(A-=1)}if(g&&h.endIndex<=g.startIndex&&g.nextSibling){if(h.type==="def"){let y=g.nextSibling;if(y.type==='"'||y.type==="'"||y.type==="ERROR"&&(y.text==='"""'||y.text==="'''"))return!0}return!1}break}case"javascript":{if(h.type==="class")if(o<=13){if(p.find(E=>E.type==="formal_parameters"))return!0}else{let y=c.children;for(let E=0;Ey.type==="{");if(g&&g.startIndex>h.endIndex&&g.nextSibling!==null||p.find(y=>y.type==="do")&&h.type==="while"||h.type==="=>"&&h.nextSibling&&h.nextSibling.type!=="{")return!1;break}case"typescript":{let g=p.find(y=>y.type==="{");if(g&&g.startIndex>h.endIndex&&g.nextSibling!==null||p.find(y=>y.type==="do")&&h.type==="while"||h.type==="=>"&&h.nextSibling&&h.nextSibling.type!=="{")return!1;break}}return m&&m.startIndex>h.endIndex?this.isBlockEmpty(m,r):!0}}if(u!==null){let p=this.nodeMatch[u.type],h=u.children.slice().reverse().find(m=>m.type===p);if(h)return this.isBlockEmpty(h,r);if(this.nodeTypesWithBlockOrStmtChild.has(u.type)){let m=this.nodeTypesWithBlockOrStmtChild.get(u.type),g=m===""?u.children[0]:u.childForFieldName(m);if(g&&g.type!==this.blockNodeType&&g.type!==this.emptyStatementType)return!1}return!0}return!1}finally{n.delete()}}},Yzs={python:new SD("python",{class_definition:"block",elif_clause:"block",else_clause:"block",except_clause:"block",finally_clause:"block",for_statement:"block",function_definition:"block",if_statement:"block",try_statement:"block",while_statement:"block",with_statement:"block"},new Map,["def","class","if","elif","else","for","while","try","except","finally","with"],"block",null,!1),javascript:new SD("javascript",{arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",method_definition:"statement_block",try_statement:"statement_block",while_statement:"statement_block",with_statement:"statement_block",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),typescript:new SD("typescript",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),tsx:new SD("typescriptreact",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),go:new kit("go","{}",/\b(func|if|else|for)\b/,{communication_case:"block",default_case:"block",expression_case:"block",for_statement:"block",func_literal:"block",function_declaration:"block",if_statement:"block",labeled_statement:"block",method_declaration:"block",type_case:"block"},new Map),ruby:new kit("ruby","end",/\b(BEGIN|END|case|class|def|do|else|elsif|for|if|module|unless|until|while)\b|->/,{begin_block:"}",block:"}",end_block:"}",lambda:"block",for:"do",until:"do",while:"do",case:"end",do:"end",if:"end",method:"end",module:"end",unless:"end",do_block:"end"},new Map),"c-sharp":new SD("csharp",{},new Map([]),[],"block",null,!0),java:new SD("java",{},new Map([]),[],"block",null,!0),php:new SD("php",{},new Map([]),[],"block",null,!0),cpp:new SD("cpp",{},new Map([]),[],"block",null,!0)};function Dit(t){if(!(0,AU.isSupportedLanguageId)(t))throw new Error(`Language ${t} is not supported`);return Yzs[(0,AU.languageIdToWasmLanguage)(t)]}a(Dit,"getBlockParser");async function Kzs(t,e,r){return(0,AU.isSupportedLanguageId)(t)?Dit(t).isEmptyBlockStart(e,r):!1}a(Kzs,"isEmptyBlockStart");async function Jzs(t,e,r,n){if((0,AU.isSupportedLanguageId)(t))return Dit(t).isBlockBodyFinished(e,r,n)}a(Jzs,"isBlockBodyFinished");async function Xzs(t,e,r){if((0,AU.isSupportedLanguageId)(t))return Dit(t).getNodeStart(e,r)}a(Xzs,"getNodeStart")});var Oit=T(yU=>{"use strict";f();Object.defineProperty(yU,"__esModule",{value:!0});yU.parsingBlockFinished=Zzs;yU.isEmptyBlockStartUtil=eYs;yU.getNodeStartUtil=tYs;yU.contextIndentation=oYs;yU.contextIndentationFromText=bJn;yU.indentationBlockFinished=cYs;var Vor=vJn(),Mit=tue();function Zzs(t,e){let r=t.getText(Mit.LocationFactory.range(Mit.LocationFactory.position(0,0),e)),n=t.offsetAt(e),o=t.detectedLanguageId;return s=>(0,Vor.isBlockBodyFinished)(o,r,s,n)}a(Zzs,"parsingBlockFinished");function eYs(t,e){return(0,Vor.isEmptyBlockStart)(t.detectedLanguageId,t.getText(),t.offsetAt(e))}a(eYs,"isEmptyBlockStartUtil");async function tYs(t,e,r){let o=t.getText(Mit.LocationFactory.range(Mit.LocationFactory.position(0,0),e))+r,s=await(0,Vor.getNodeStart)(t.detectedLanguageId,o,t.offsetAt(e));if(s)return t.positionAt(s)}a(tYs,"getNodeStartUtil");var rYs=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map(t=>t+"\\b")),nYs=new RegExp(`^(${rYs.join("|")})`);function iYs(t){return nYs.test(t.trimLeft().toLowerCase())}a(iYs,"isContinuationLine");function Nit(t){let e=/^(\s*)([^]*)$/.exec(t);if(e&&e[2]&&e[2].length>0)return e[1].length}a(Nit,"indentationOfLine");function oYs(t,e){let r=t.getText(),n=t.offsetAt(e);return bJn(r,n,t.detectedLanguageId)}a(oYs,"contextIndentation");function bJn(t,e,r){let n=t.slice(0,e).split(` `),o=t.slice(e).split(` -`);function s(p,h,m){let g=h,A,y;for(;A===void 0&&g>=0&&g=0&&!p[g].trim().startsWith('"""');)g--;if(g>=0)for(A=void 0,g--;A===void 0&&g>=0;)A=Sot(p[g]),y=g,g--}}return[A,y]}a(s,"seekNonBlank");let[c,l]=s(n,n.length-1,-1),u=(()=>{if(!(c===void 0||l===void 0))for(let p=l-1;p>=0;p--){let h=Sot(n[p]);if(h!==void 0&&h=0&&g=0&&!p[g].trim().startsWith('"""');)g--;if(g>=0)for(A=void 0,g--;A===void 0&&g>=0;)A=Nit(p[g]),y=g,g--}}return[A,y]}a(s,"seekNonBlank");let[c,l]=s(n,n.length-1,-1),u=(()=>{if(!(c===void 0||l===void 0))for(let p=l-1;p>=0;p--){let h=Nit(n[p]);if(h!==void 0&&h{let n=sWs(r,t,e);return n==="continue"?void 0:n}}a(aWs,"indentationBlockFinished")});var _we=T(Hh=>{"use strict";f();Object.defineProperty(Hh,"__esModule",{value:!0});Hh.languageMarkers=void 0;Hh.mdCodeBlockLangToLanguageId=cWs;Hh.isShebangLine=dWs;Hh.hasLanguageMarker=IKn;Hh.comment=xKn;Hh.commentBlockAsSingles=fWs;Hh.getLanguageMarker=pWs;Hh.getPathMarker=hWs;Hh.newLineEnded=mWs;Hh.getLanguage=gWs;Hh.languageMarkers={abap:{lineComment:{start:'"',end:""},markdownLanguageIds:["abap","sap-abap"]},aspdotnet:{lineComment:{start:"<%--",end:"--%>"}},bat:{lineComment:{start:"REM",end:""}},bibtex:{lineComment:{start:"%",end:""},markdownLanguageIds:["bibtex"]},blade:{lineComment:{start:"#",end:""}},BluespecSystemVerilog:{lineComment:{start:"//",end:""}},c:{lineComment:{start:"//",end:""},markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";",end:""},markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["coffeescript","coffee","cson","iced"]},cpp:{lineComment:{start:"//",end:""},markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"]},csharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["csharp","cs"]},css:{lineComment:{start:"/*",end:"*/"}},cuda:{lineComment:{start:"//",end:""}},dart:{lineComment:{start:"//",end:""}},dockerfile:{lineComment:{start:"#",end:""},markdownLanguageIds:["dockerfile","docker"]},dotenv:{lineComment:{start:"#",end:""}},elixir:{lineComment:{start:"#",end:""}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%",end:""},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"]},go:{lineComment:{start:"//",end:""},markdownLanguageIds:["go","golang"]},graphql:{lineComment:{start:"#",end:""}},groovy:{lineComment:{start:"//",end:""}},haml:{lineComment:{start:"-#",end:""}},handlebars:{lineComment:{start:"{{!",end:"}}"},markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"]},haskell:{lineComment:{start:"--",end:""},markdownLanguageIds:["haskell","hs"]},hlsl:{lineComment:{start:"//",end:""}},html:{lineComment:{start:""},markdownLanguageIds:["html","xhtml"]},ini:{lineComment:{start:";",end:""}},java:{lineComment:{start:"//",end:""},markdownLanguageIds:["java","jsp"]},javascript:{lineComment:{start:"//",end:""},markdownLanguageIds:["javascript","js"]},javascriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},jsonc:{lineComment:{start:"//",end:""}},jsx:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#",end:""},markdownLanguageIds:["julia","jl"]},kotlin:{lineComment:{start:"//",end:""},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%",end:""},markdownLanguageIds:["tex"]},legend:{lineComment:{start:"//",end:""}},less:{lineComment:{start:"//",end:""}},lua:{lineComment:{start:"--",end:""},markdownLanguageIds:["lua","pluto"]},makefile:{lineComment:{start:"#",end:""},markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"[]: #",end:""},markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec","mm","objc","obj-c"]},"objective-cpp":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#",end:""},markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//",end:""}},powershell:{lineComment:{start:"#",end:""},markdownLanguageIds:["powershell","ps","ps1"]},pug:{lineComment:{start:"//",end:""}},python:{lineComment:{start:"#",end:""},markdownLanguageIds:["python","py","gyp"]},ql:{lineComment:{start:"//",end:""}},r:{lineComment:{start:"#",end:""}},razor:{lineComment:{start:""},markdownLanguageIds:["cshtml","razor","razor-cshtml"]},ruby:{lineComment:{start:"#",end:""},markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"]},rust:{lineComment:{start:"//",end:""},markdownLanguageIds:["rust","rs"]},sass:{lineComment:{start:"//",end:""}},scala:{lineComment:{start:"//",end:""}},scss:{lineComment:{start:"//",end:""}},shellscript:{lineComment:{start:"#",end:""},markdownLanguageIds:["bash","sh","zsh"]},slang:{lineComment:{start:"//",end:""}},slim:{lineComment:{start:"/",end:""}},solidity:{lineComment:{start:"//",end:""},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--",end:""}},stylus:{lineComment:{start:"//",end:""}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//",end:""}},systemverilog:{lineComment:{start:"//",end:""}},terraform:{lineComment:{start:"#",end:""}},tex:{lineComment:{start:"%",end:""}},typescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["typescript","ts"]},typescriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["tsx"]},vb:{lineComment:{start:"'",end:""},markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//",end:""}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//",end:""}},xml:{lineComment:{start:""}},xsl:{lineComment:{start:""}},yaml:{lineComment:{start:"#",end:""},markdownLanguageIds:["yaml","yml"]}};var xor={};for(let[t,e]of Object.entries(Hh.languageMarkers))if(e.markdownLanguageIds)for(let r of e.markdownLanguageIds)xor[r]=t;else xor[t]=t;function cWs(t){return xor[t]}a(cWs,"mdCodeBlockLangToLanguageId");var lWs={start:"//",end:""},uWs=["php","plaintext"],wor={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function dWs(t){return Object.values(wor).includes(t.trim())}a(dWs,"isShebangLine");function IKn({source:t}){return t.startsWith("#!")||t.startsWith("{let n=aYs(r,t,e);return n==="continue"?void 0:n}}a(cYs,"indentationBlockFinished")});var yxe=T(Bh=>{"use strict";f();Object.defineProperty(Bh,"__esModule",{value:!0});Bh.languageMarkers=void 0;Bh.mdCodeBlockLangToLanguageId=lYs;Bh.isShebangLine=fYs;Bh.hasLanguageMarker=SJn;Bh.comment=IJn;Bh.commentBlockAsSingles=pYs;Bh.getLanguageMarker=hYs;Bh.getPathMarker=mYs;Bh.newLineEnded=gYs;Bh.getLanguage=AYs;Bh.languageMarkers={abap:{lineComment:{start:'"',end:""},markdownLanguageIds:["abap","sap-abap"]},aspdotnet:{lineComment:{start:"<%--",end:"--%>"}},bat:{lineComment:{start:"REM",end:""}},bibtex:{lineComment:{start:"%",end:""},markdownLanguageIds:["bibtex"]},blade:{lineComment:{start:"#",end:""}},BluespecSystemVerilog:{lineComment:{start:"//",end:""}},c:{lineComment:{start:"//",end:""},markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";",end:""},markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["coffeescript","coffee","cson","iced"]},cpp:{lineComment:{start:"//",end:""},markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"]},csharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["csharp","cs"]},css:{lineComment:{start:"/*",end:"*/"}},cuda:{lineComment:{start:"//",end:""}},dart:{lineComment:{start:"//",end:""}},dockerfile:{lineComment:{start:"#",end:""},markdownLanguageIds:["dockerfile","docker"]},dotenv:{lineComment:{start:"#",end:""}},elixir:{lineComment:{start:"#",end:""}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%",end:""},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"]},go:{lineComment:{start:"//",end:""},markdownLanguageIds:["go","golang"]},graphql:{lineComment:{start:"#",end:""}},groovy:{lineComment:{start:"//",end:""}},haml:{lineComment:{start:"-#",end:""}},handlebars:{lineComment:{start:"{{!",end:"}}"},markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"]},haskell:{lineComment:{start:"--",end:""},markdownLanguageIds:["haskell","hs"]},hlsl:{lineComment:{start:"//",end:""}},html:{lineComment:{start:""},markdownLanguageIds:["html","xhtml"]},ini:{lineComment:{start:";",end:""}},java:{lineComment:{start:"//",end:""},markdownLanguageIds:["java","jsp"]},javascript:{lineComment:{start:"//",end:""},markdownLanguageIds:["javascript","js"]},javascriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},jsonc:{lineComment:{start:"//",end:""}},jsx:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#",end:""},markdownLanguageIds:["julia","jl"]},kotlin:{lineComment:{start:"//",end:""},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%",end:""},markdownLanguageIds:["tex"]},legend:{lineComment:{start:"//",end:""}},less:{lineComment:{start:"//",end:""}},lua:{lineComment:{start:"--",end:""},markdownLanguageIds:["lua","pluto"]},makefile:{lineComment:{start:"#",end:""},markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"[]: #",end:""},markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec","mm","objc","obj-c"]},"objective-cpp":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#",end:""},markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//",end:""}},powershell:{lineComment:{start:"#",end:""},markdownLanguageIds:["powershell","ps","ps1"]},pug:{lineComment:{start:"//",end:""}},python:{lineComment:{start:"#",end:""},markdownLanguageIds:["python","py","gyp"]},ql:{lineComment:{start:"//",end:""}},r:{lineComment:{start:"#",end:""}},razor:{lineComment:{start:""},markdownLanguageIds:["cshtml","razor","razor-cshtml"]},ruby:{lineComment:{start:"#",end:""},markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"]},rust:{lineComment:{start:"//",end:""},markdownLanguageIds:["rust","rs"]},sass:{lineComment:{start:"//",end:""}},scala:{lineComment:{start:"//",end:""}},scss:{lineComment:{start:"//",end:""}},shellscript:{lineComment:{start:"#",end:""},markdownLanguageIds:["bash","sh","zsh"]},slang:{lineComment:{start:"//",end:""}},slim:{lineComment:{start:"/",end:""}},solidity:{lineComment:{start:"//",end:""},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--",end:""}},stylus:{lineComment:{start:"//",end:""}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//",end:""}},systemverilog:{lineComment:{start:"//",end:""}},terraform:{lineComment:{start:"#",end:""}},tex:{lineComment:{start:"%",end:""}},typescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["typescript","ts"]},typescriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["tsx"]},vb:{lineComment:{start:"'",end:""},markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//",end:""}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//",end:""}},xml:{lineComment:{start:""}},xsl:{lineComment:{start:""}},yaml:{lineComment:{start:"#",end:""},markdownLanguageIds:["yaml","yml"]}};var Wor={};for(let[t,e]of Object.entries(Bh.languageMarkers))if(e.markdownLanguageIds)for(let r of e.markdownLanguageIds)Wor[r]=t;else Wor[t]=t;function lYs(t){return Wor[t]}a(lYs,"mdCodeBlockLangToLanguageId");var uYs={start:"//",end:""},dYs=["php","plaintext"],zor={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function fYs(t){return Object.values(zor).includes(t.trim())}a(fYs,"isShebangLine");function SJn({source:t}){return t.startsWith("#!")||t.startsWith("xKn(s,e)).join(` +`).map(s=>IJn(s,e)).join(` `);return r?o+` -`:o}a(fWs,"commentBlockAsSingles");function pWs(t){let{languageId:e}=t;return uWs.indexOf(e)===-1&&!IKn(t)?e in wor?wor[e]:`Language: ${e}`:""}a(pWs,"getLanguageMarker");function hWs(t){return t.relativePath?`Path: ${t.relativePath}`:""}a(hWs,"getPathMarker");function mWs(t){return t===""||t.endsWith(` +`:o}a(pYs,"commentBlockAsSingles");function hYs(t){let{languageId:e}=t;return dYs.indexOf(e)===-1&&!SJn(t)?e in zor?zor[e]:`Language: ${e}`:""}a(hYs,"getLanguageMarker");function mYs(t){return t.relativePath?`Path: ${t.relativePath}`:""}a(mYs,"getPathMarker");function gYs(t){return t===""||t.endsWith(` `)?t:t+` -`}a(mWs,"newLineEnded");function gWs(t){return SKn(typeof t=="string"?t:"plaintext")}a(gWs,"getLanguage");function SKn(t){return Hh.languageMarkers[t]!==void 0?{languageId:t,...Hh.languageMarkers[t]}:{languageId:t,lineComment:{start:"//",end:""}}}a(SKn,"_getLanguage")});var Por=T(Ror=>{"use strict";f();Object.defineProperty(Ror,"__esModule",{value:!0});Ror.getCursorContext=EWs;var wKn=Oue(),AWs={tokenizerName:wKn.TokenizerName.o200k};function yWs(t){return{...AWs,...t}}a(yWs,"cursorContextOptions");function EWs(t,e={}){let r=yWs(e),n=(0,wKn.getTokenizer)(r.tokenizerName);if(r.maxLineCount!==void 0&&r.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(r.maxTokenLength!==void 0&&r.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(r.maxLineCount===0||r.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:r.tokenizerName};let o=t.source.slice(0,t.offset);return r.maxLineCount!==void 0&&(o=o.split(` +`}a(gYs,"newLineEnded");function AYs(t){return TJn(typeof t=="string"?t:"plaintext")}a(AYs,"getLanguage");function TJn(t){return Bh.languageMarkers[t]!==void 0?{languageId:t,...Bh.languageMarkers[t]}:{languageId:t,lineComment:{start:"//",end:""}}}a(TJn,"_getLanguage")});var Kor=T(Yor=>{"use strict";f();Object.defineProperty(Yor,"__esModule",{value:!0});Yor.getCursorContext=_Ys;var xJn=Yle(),yYs={tokenizerName:xJn.TokenizerName.o200k};function EYs(t){return{...yYs,...t}}a(EYs,"cursorContextOptions");function _Ys(t,e={}){let r=EYs(e),n=(0,xJn.getTokenizer)(r.tokenizerName);if(r.maxLineCount!==void 0&&r.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(r.maxTokenLength!==void 0&&r.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(r.maxLineCount===0||r.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:r.tokenizerName};let o=t.source.slice(0,t.offset);return r.maxLineCount!==void 0&&(o=o.split(` `).slice(-r.maxLineCount).join(` `)),r.maxTokenLength!==void 0&&(o=n.takeLastLinesTokens(o,r.maxTokenLength)),{context:o,lineCount:o.split(` -`).length,tokenLength:n.tokenLength(o),tokenizerName:r.tokenizerName}}a(EWs,"getCursorContext")});var kor=T(OK=>{"use strict";f();Object.defineProperty(OK,"__esModule",{value:!0});OK.SnippetSemantics=OK.SnippetProviderType=void 0;OK.announceSnippet=_Ws;var RKn;(function(t){t.SimilarFiles="similar-files",t.Path="path"})(RKn||(OK.SnippetProviderType=RKn={}));var C_;(function(t){t.Function="function",t.Snippet="snippet",t.Snippets="snippets",t.Variable="variable",t.Parameter="parameter",t.Method="method",t.Class="class",t.Module="module",t.Alias="alias",t.Enum="enum member",t.Interface="interface"})(C_||(OK.SnippetSemantics=C_={}));var CWs={[C_.Function]:"function",[C_.Snippet]:"snippet",[C_.Snippets]:"snippets",[C_.Variable]:"variable",[C_.Parameter]:"parameter",[C_.Method]:"method",[C_.Class]:"class",[C_.Module]:"module",[C_.Alias]:"alias",[C_.Enum]:"enum member",[C_.Interface]:"interface"};function _Ws(t){let e=CWs[t.semantics],r=[C_.Snippets].includes(t.semantics)?"these":"this";return{headline:t.relativePath?`Compare ${r} ${e} from ${t.relativePath}:`:`Compare ${r} ${e}:`,snippet:t.snippet}}a(_Ws,"announceSnippet")});var Oor=T(LK=>{"use strict";f();Object.defineProperty(LK,"__esModule",{value:!0});LK.WindowedMatcher=LK.SortOptions=void 0;LK.splitIntoWords=NKn;var PKn=kor(),Nor=class{static{a(this,"FifoCache")}constructor(e){this.keys=[],this.cache={},this.size=e}put(e,r){if(this.cache[e]=r,this.keys.length>this.size){this.keys.push(e);let n=this.keys.shift()??"";delete this.cache[n]}}get(e){return this.cache[e]}},BK;(function(t){t.Ascending="ascending",t.Descending="descending",t.None="none"})(BK||(LK.SortOptions=BK={}));var Dor=class{static{a(this,"Tokenizer")}constructor(e){this.stopsForLanguage=TWs.get(e.languageId)??bWs}tokenize(e){return new Set(NKn(e).filter(r=>!this.stopsForLanguage.has(r)))}},kKn=new Nor(20),Mor=class{static{a(this,"WindowedMatcher")}constructor(e){this.referenceDoc=e,this.tokenizer=new Dor(e)}get referenceTokens(){return Promise.resolve(this.createReferenceTokens())}createReferenceTokens(){return this.referenceTokensCache??=this.tokenizer.tokenize(this._getCursorContextInfo(this.referenceDoc).context)}sortScoredSnippets(e,r=BK.Descending){return r===BK.Ascending?e.sort((n,o)=>n.score>o.score?1:-1):r===BK.Descending?e.sort((n,o)=>n.score>o.score?-1:1):e}async retrieveAllSnippets(e,r=BK.Descending){let n=[];if(e.source.length===0||(await this.referenceTokens).size===0)return n;let o=e.source.split(` -`),s=this.id()+":"+e.source,c=kKn.get(s)??[],l=c.length===0,u=l?o.map(d=>this.tokenizer.tokenize(d),this.tokenizer):[];for(let[d,[p,h]]of this.getWindowsDelineations(o).entries()){if(l){let A=new Set;u.slice(p,h).forEach(y=>y.forEach(E=>A.add(E),A)),c.push(A)}let m=c[d],g=this.similarityScore(m,await this.referenceTokens);if(n.length&&p>0&&n[n.length-1].endLine>p){n[n.length-1].scoree.length>0)}a(NKn,"splitIntoWords");var vWs=new Set(["we","our","you","it","its","they","them","their","this","that","these","those","is","are","was","were","be","been","being","have","has","had","having","do","does","did","doing","can","don","t","s","will","would","should","what","which","who","when","where","why","how","a","an","the","and","or","not","no","but","because","as","until","again","further","then","once","here","there","all","any","both","each","few","more","most","other","some","such","above","below","to","during","before","after","of","at","by","about","between","into","through","from","up","down","in","out","on","off","over","under","only","own","same","so","than","too","very","just","now"]),bWs=new Set(["if","then","else","for","while","with","def","function","return","TODO","import","try","catch","raise","finally","repeat","switch","case","match","assert","continue","break","const","class","enum","struct","static","new","super","this","var",...vWs]),TWs=new Map([])});var Bor=T(oI=>{"use strict";f();Object.defineProperty(oI,"__esModule",{value:!0});oI.virtualNode=SWs;oI.lineNode=IWs;oI.blankNode=xWs;oI.topNode=wWs;oI.isBlank=RWs;oI.isLine=PWs;oI.isVirtual=DKn;oI.isTop=MKn;oI.cutTreeAfterLine=kWs;oI.duplicateTree=NWs;function SWs(t,e,r){return{type:"virtual",indentation:t,subs:e,label:r}}a(SWs,"virtualNode");function IWs(t,e,r,n,o){if(r==="")throw new Error("Cannot create a line node with an empty source line");return{type:"line",indentation:t,lineNumber:e,sourceLine:r,subs:n,label:o}}a(IWs,"lineNode");function xWs(t){return{type:"blank",lineNumber:t,subs:[]}}a(xWs,"blankNode");function wWs(t){return{type:"top",indentation:-1,subs:t??[]}}a(wWs,"topNode");function RWs(t){return t.type==="blank"}a(RWs,"isBlank");function PWs(t){return t.type==="line"}a(PWs,"isLine");function DKn(t){return t.type==="virtual"}a(DKn,"isVirtual");function MKn(t){return t.type==="top"}a(MKn,"isTop");function kWs(t,e){function r(n){if(!DKn(n)&&!MKn(n)&&n.lineNumber===e)return n.subs=[],!0;for(let o=0;o{"use strict";f();Object.defineProperty(FD,"__esModule",{value:!0});FD.clearLabels=DWs;FD.clearLabelsIf=MWs;FD.mapLabels=For;FD.resetLineNumbers=OWs;FD.visitTree=vwe;FD.visitTreeConditionally=BWs;FD.foldTree=LWs;FD.rebuildTree=FWs;var Lor=Bor();function DWs(t){return vwe(t,e=>{e.label=void 0},"bottomUp"),t}a(DWs,"clearLabels");function MWs(t,e){return vwe(t,r=>{r.label=r.label?e(r.label)?void 0:r.label:void 0},"bottomUp"),t}a(MWs,"clearLabelsIf");function For(t,e){switch(t.type){case"line":case"virtual":{let r=t.subs.map(n=>For(n,e));return{...t,subs:r,label:t.label?e(t.label):void 0}}case"blank":return{...t,label:t.label?e(t.label):void 0};case"top":return{...t,subs:t.subs.map(r=>For(r,e)),label:t.label?e(t.label):void 0}}}a(For,"mapLabels");function OWs(t){let e=0;function r(n){!(0,Lor.isVirtual)(n)&&!(0,Lor.isTop)(n)&&(n.lineNumber=e,e++)}a(r,"visitor"),vwe(t,r,"topDown")}a(OWs,"resetLineNumbers");function vwe(t,e,r){function n(o){r==="topDown"&&e(o),o.subs.forEach(s=>{n(s)}),r==="bottomUp"&&e(o)}a(n,"_visit"),n(t)}a(vwe,"visitTree");function BWs(t,e,r){function n(o){if(r==="topDown"&&!e(o))return!1;let s=!0;return o.subs.forEach(c=>{s=s&&n(c)}),r==="bottomUp"&&(s=s&&e(o)),s}a(n,"_visit"),n(t)}a(BWs,"visitTreeConditionally");function LWs(t,e,r,n){let o=e;function s(c){o=r(c,o)}return a(s,"visitor"),vwe(t,s,n),o}a(LWs,"foldTree");function FWs(t,e,r){let n=a(s=>{if(r!==void 0&&r(s))return s;{let c=s.subs.map(n).filter(l=>l!==void 0);return s.subs=c,e(s)}},"rebuild"),o=n(t);return o!==void 0?o:(0,Lor.topNode)()}a(FWs,"rebuildTree")});var QKn=T(wR=>{"use strict";f();Object.defineProperty(wR,"__esModule",{value:!0});wR.parseRaw=OKn;wR.labelLines=BKn;wR.labelVirtualInherited=UWs;wR.buildLabelRules=LKn;wR.combineClosersAndOpeners=FKn;wR.groupBlocks=QWs;wR.flattenVirtual=qWs;wR.registerLanguageSpecificParser=jWs;wR.parseTree=$Ws;var jh=Bor(),tde=Uor();function OKn(t){let e=t.split(` -`),r=e.map(d=>d.match(/^\s*/)[0].length),n=e.map(d=>d.trimLeft());function o(d){let[p,h]=s(d+1,r[d]);return[(0,jh.lineNode)(r[d],d,n[d],p),h]}a(o,"parseNode");function s(d,p){let h,m=[],g=d,A;for(;gp);)if(n[g]==="")A===void 0&&(A=g),g+=1;else{if(A!==void 0){for(let y=A;ys.matches(n.sourceLine));o&&(n.label=o.label)}}a(r,"visitor"),(0,tde.visitTree)(t,r,"bottomUp")}a(BKn,"labelLines");function UWs(t){function e(r){if((0,jh.isVirtual)(r)&&r.label===void 0){let n=r.subs.filter(o=>!(0,jh.isBlank)(o));n.length===1&&(r.label=n[0].label)}}a(e,"visitor"),(0,tde.visitTree)(t,e,"bottomUp")}a(UWs,"labelVirtualInherited");function LKn(t){return Object.keys(t).map(e=>{let r;return t[e].test?r=a(n=>t[e].test(n),"matches"):r=t[e],{matches:r,label:e}})}a(LKn,"buildLabelRules");function FKn(t){let e=a(function(n){if(n.subs.length===0||n.subs.findIndex(c=>c.label==="closer"||c.label==="opener")===-1)return n;let o=[],s;for(let c=0;cu.subs.push(d)),l.subs=[];else if(l.label==="closer"&&s!==void 0&&((0,jh.isLine)(l)||(0,jh.isVirtual)(l))&&l.indentation>=s.indentation){let d=o.length-1;for(;d>0&&(0,jh.isBlank)(o[d]);)d-=1;if(s.subs.push(...o.splice(d+1)),l.subs.length>0){let p=s.subs.findIndex(A=>A.label!=="newVirtual"),h=s.subs.slice(0,p),m=s.subs.slice(p),g=m.length>0?[(0,jh.virtualNode)(l.indentation,m,"newVirtual")]:[];s.subs=[...h,...g,l]}else s.subs.push(l)}else o.push(l),(0,jh.isBlank)(l)||(s=l)}return n.subs=o,n},"rebuilder"),r=(0,tde.rebuildTree)(t,e);return(0,tde.clearLabelsIf)(t,n=>n==="newVirtual"),r}a(FKn,"combineClosersAndOpeners");function QWs(t,e=jh.isBlank,r){let n=a(function(o){if(o.subs.length<=1)return o;let s=[],c=[],l,u=!1;function d(p=!1){if(l!==void 0&&(s.length>0||!p)){let h=(0,jh.virtualNode)(l,c,r);s.push(h)}else c.forEach(h=>s.push(h))}a(d,"flushBlockIntoNewSubs");for(let p=0;p{"use strict";f();Object.defineProperty(wot,"__esModule",{value:!0});wot.getBasicWindowDelineations=WWs;wot.getIndentationWindowsDelineations=zWs;var qKn=Uor(),VWs=QKn();function WWs(t,e){let r=[],n=e.length;if(n===0)return[];if(n{if(c.type==="blank"){c.label={totalLength:1,firstLineAfter:c.lineNumber+1};return}let l=c.type==="line"?1:0,u=c.type==="line"?c.lineNumber+1:NaN;function d(A){return A===-1?u-l:c.subs[A].label.firstLineAfter-c.subs[A].label.totalLength}a(d,"getStartLine");function p(A,y){return A===0?y+1:c.subs[A-1].label.firstLineAfter}a(p,"getEndLine");let h=c.type==="line"?-1:0,m=c.type==="line"?1:0,g=0;for(let A=0;A=0&&hn){let y=d(h),E=p(A,y),_=g===A?E:p(g,y);for(r<=E-y&&o.push([y,_]);m>n;)m-=h===-1?c.type==="line"?1:0:c.subs[h].label.totalLength,h++}}if(hc[0]-l[0]||c[1]-l[1]).filter((c,l,u)=>l===0||c[0]!==u[l-1][0]||c[1]!==u[l-1][1])}a(zWs,"getIndentationWindowsDelineations")});var HKn=T(bwe=>{"use strict";f();Object.defineProperty(bwe,"__esModule",{value:!0});bwe.FixedWindowSizeJaccardMatcher=void 0;bwe.computeScore=GKn;var YWs=Por(),KWs=Oor(),JWs=Qor(),qor=class t extends KWs.WindowedMatcher{static{a(this,"FixedWindowSizeJaccardMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=e=>({to:a(r=>new t(r,e),"to")})}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return(0,JWs.getBasicWindowDelineations)(this.windowLength,e)}_getCursorContextInfo(e){return(0,YWs.getCursorContext)(e,{maxLineCount:this.windowLength})}similarityScore(e,r){return GKn(e,r)}};bwe.FixedWindowSizeJaccardMatcher=qor;function GKn(t,e){let r=new Set;return t.forEach(n=>{e.has(n)&&r.add(n)}),r.size/(t.size+e.size-r.size)}a(GKn,"computeScore")});var $Kn=T(Rot=>{"use strict";f();Object.defineProperty(Rot,"__esModule",{value:!0});Rot.BlockTokenSubsetMatcher=void 0;var XWs=DK(),jKn=Por(),ZWs=Oor(),ezs=Qor(),Gor=class t extends ZWs.WindowedMatcher{static{a(this,"BlockTokenSubsetMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=e=>({to:a(r=>new t(r,e),"to")})}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return(0,ezs.getBasicWindowDelineations)(this.windowLength,e)}_getCursorContextInfo(e){return(0,jKn.getCursorContext)(e,{maxLineCount:this.windowLength})}get referenceTokens(){return this.createReferenceTokensForLanguage()}async createReferenceTokensForLanguage(){return this.referenceTokensCache?this.referenceTokensCache:(this.referenceTokensCache=t.syntaxAwareSupportsLanguage(this.referenceDoc.languageId)?await this.syntaxAwareReferenceTokens():await super.referenceTokens,this.referenceTokensCache)}async syntaxAwareReferenceTokens(){let e=(await this.getEnclosingMemberStart(this.referenceDoc.source,this.referenceDoc.offset))?.startIndex,r=this.referenceDoc.offset,n=e?this.referenceDoc.source.slice(e,r):(0,jKn.getCursorContext)(this.referenceDoc,{maxLineCount:this.windowLength}).context;return this.tokenizer.tokenize(n)}static syntaxAwareSupportsLanguage(e){return e==="csharp"}similarityScore(e,r){return tzs(e,r)}async getEnclosingMemberStart(e,r){let n;try{n=await(0,XWs.parseTreeSitter)(this.referenceDoc.languageId,e);let o=n.rootNode.namedDescendantForIndex(r);for(;o&&!(t.isMember(o)||t.isBlock(o));)o=o.parent??void 0;return o}finally{n?.delete()}}static isMember(e){switch(e?.type){case"method_declaration":case"property_declaration":case"field_declaration":case"constructor_declaration":return!0;default:return!1}}static isBlock(e){switch(e?.type){case"class_declaration":case"struct_declaration":case"record_declaration":case"enum_declaration":case"interface_declaration":return!0;default:return!1}}};Rot.BlockTokenSubsetMatcher=Gor;function tzs(t,e){let r=new Set;return e.forEach(n=>{t.has(n)&&r.add(n)}),r.size}a(tzs,"computeScore")});var Pot=T(RR=>{"use strict";f();Object.defineProperty(RR,"__esModule",{value:!0});RR.defaultCppSimilarFilesOptions=RR.nullSimilarFilesOptions=RR.conservativeFilesOptions=RR.defaultSimilarFilesOptions=void 0;RR.getSimilarSnippets=lzs;var rzs=HKn(),nzs=$Kn(),izs=0,ozs=60,szs=4,azs=1,VKn=20,WKn=1e4;RR.defaultSimilarFilesOptions={snippetLength:ozs,threshold:izs,maxTopSnippets:szs,maxCharPerFile:WKn,maxNumberOfFiles:VKn,maxSnippetsPerFile:azs,useSubsetMatching:!1};RR.conservativeFilesOptions={snippetLength:10,threshold:.3,maxTopSnippets:1,maxCharPerFile:WKn,maxNumberOfFiles:VKn,maxSnippetsPerFile:1};RR.nullSimilarFilesOptions={snippetLength:0,threshold:1,maxTopSnippets:0,maxCharPerFile:0,maxNumberOfFiles:0,maxSnippetsPerFile:0};RR.defaultCppSimilarFilesOptions={snippetLength:60,threshold:0,maxTopSnippets:16,maxCharPerFile:1e5,maxNumberOfFiles:200,maxSnippetsPerFile:4};function czs(t,e){return(e.useSubsetMatching?nzs.BlockTokenSubsetMatcher.FACTORY(e.snippetLength):rzs.FixedWindowSizeJaccardMatcher.FACTORY(e.snippetLength)).to(t)}a(czs,"getMatcher");async function lzs(t,e,r){let n=czs(t,r);return r.maxTopSnippets===0?[]:(await e.filter(s=>s.source.length0).slice(0,r.maxNumberOfFiles).reduce(async(s,c)=>(await s).concat((await n.findMatches(c,r.maxSnippetsPerFile)).map(l=>({relativePath:c.relativePath,...l}))),Promise.resolve([]))).filter(s=>s.score&&s.snippet&&s.score>r.threshold).sort((s,c)=>s.score-c.score).slice(-r.maxTopSnippets)}a(lzs,"getSimilarSnippets")});var YKn=T(kot=>{"use strict";f();Object.defineProperty(kot,"__esModule",{value:!0});kot.getCppSimilarFilesOptions=dzs;kot.getCppNumberOfSnippets=fzs;var zKn=Pot(),uzs=Not();function dzs(t,e){return{...zKn.defaultCppSimilarFilesOptions,useSubsetMatching:(0,uzs.useSubsetMatching)(t,e)}}a(dzs,"getCppSimilarFilesOptions");function fzs(t){return zKn.defaultCppSimilarFilesOptions.maxTopSnippets}a(fzs,"getCppNumberOfSnippets")});var Not=T(Twe=>{"use strict";f();Object.defineProperty(Twe,"__esModule",{value:!0});Twe.getSimilarFilesOptions=Azs;Twe.getNumberOfSnippets=Ezs;Twe.useSubsetMatching=XKn;var pzs=MU(),hzs=Pot(),KKn=Xm(),mzs=ent(),JKn=YKn(),gzs=new Map([["cpp",JKn.getCppSimilarFilesOptions]]);function Azs(t,e,r){let n=gzs.get(r);return n?n(t,e):{...hzs.defaultSimilarFilesOptions,useSubsetMatching:XKn(t,e)}}a(Azs,"getSimilarFilesOptions");var yzs=new Map([["cpp",JKn.getCppNumberOfSnippets]]);function Ezs(t,e){let r=yzs.get(e);return r?r(t):pzs.DEFAULT_NUM_SNIPPETS}a(Ezs,"getNumberOfSnippets");function XKn(t,e){return(e.filtersAndExp.exp.variables[mzs.ExpTreatmentVariables.UseSubsetMatching]||(0,KKn.getConfig)(t,KKn.ConfigKey.UseSubsetMatching))??!1}a(XKn,"useSubsetMatching")});var rde=T(FK=>{"use strict";f();Object.defineProperty(FK,"__esModule",{value:!0});FK.convertToAPIChoice=bzs;FK.getTemperatureForSamples=Izs;FK.getStops=wzs;FK.getTopP=Rzs;FK.getMaxSolutionTokens=Pzs;var Czs=Np(),_zs=MU(),ZKn=mc(),vzs=Dp();function bzs(t,e,r,n,o,s,c){return(0,vzs.logEngineCompletion)(t,e,r,o,n),{completionText:e,meanLogProb:Tzs(t,r),meanAlternativeLogProb:Szs(t,r),choiceIndex:n,requestId:o,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:c,copilotAnnotations:r.copilot_annotations,clientCompletionId:(0,Czs.generateUuid)(),finishReason:r.finish_reason}}a(bzs,"convertToAPIChoice");function Tzs(t,e){if(e?.logprobs?.token_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--)r+=e.logprobs.token_logprobs[s],n+=1;return n>0?r/n:void 0}catch(r){ZKn.logger.exception(t,r,"Error calculating mean prob")}}a(Tzs,"calculateMeanLogProb");function Szs(t,e){if(e?.logprobs?.top_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--){let c={...e.logprobs.top_logprobs[s]};delete c[e.logprobs.tokens[s]],r+=Math.max(...Object.values(c)),n+=1}return n>0?r/n:void 0}catch(r){ZKn.logger.exception(t,r,"Error calculating mean prob")}}a(Szs,"calculateMeanAlternativeLogProb");function Izs(t,e){return t.isRunningInTest()||e<=1?0:e<10?.2:e<20?.4:.8}a(Izs,"getTemperatureForSamples");var xzs={markdown:[` +`).length,tokenLength:n.tokenLength(o),tokenizerName:r.tokenizerName}}a(_Ys,"getCursorContext")});var Jor=T(GY=>{"use strict";f();Object.defineProperty(GY,"__esModule",{value:!0});GY.SnippetSemantics=GY.SnippetProviderType=void 0;GY.announceSnippet=vYs;var wJn;(function(t){t.SimilarFiles="similar-files",t.Path="path"})(wJn||(GY.SnippetProviderType=wJn={}));var cC;(function(t){t.Function="function",t.Snippet="snippet",t.Snippets="snippets",t.Variable="variable",t.Parameter="parameter",t.Method="method",t.Class="class",t.Module="module",t.Alias="alias",t.Enum="enum member",t.Interface="interface"})(cC||(GY.SnippetSemantics=cC={}));var CYs={[cC.Function]:"function",[cC.Snippet]:"snippet",[cC.Snippets]:"snippets",[cC.Variable]:"variable",[cC.Parameter]:"parameter",[cC.Method]:"method",[cC.Class]:"class",[cC.Module]:"module",[cC.Alias]:"alias",[cC.Enum]:"enum member",[cC.Interface]:"interface"};function vYs(t){let e=CYs[t.semantics],r=[cC.Snippets].includes(t.semantics)?"these":"this";return{headline:t.relativePath?`Compare ${r} ${e} from ${t.relativePath}:`:`Compare ${r} ${e}:`,snippet:t.snippet}}a(vYs,"announceSnippet")});var tsr=T(jY=>{"use strict";f();Object.defineProperty(jY,"__esModule",{value:!0});jY.WindowedMatcher=jY.SortOptions=void 0;jY.splitIntoWords=kJn;var RJn=Jor(),Xor=class{static{a(this,"FifoCache")}constructor(e){this.keys=[],this.cache={},this.size=e}put(e,r){if(this.cache[e]=r,this.keys.length>this.size){this.keys.push(e);let n=this.keys.shift()??"";delete this.cache[n]}}get(e){return this.cache[e]}},HY;(function(t){t.Ascending="ascending",t.Descending="descending",t.None="none"})(HY||(jY.SortOptions=HY={}));var Zor=class{static{a(this,"Tokenizer")}constructor(e){this.stopsForLanguage=SYs.get(e.languageId)??TYs}tokenize(e){return new Set(kJn(e).filter(r=>!this.stopsForLanguage.has(r)))}},PJn=new Xor(20),esr=class{static{a(this,"WindowedMatcher")}constructor(e){this.referenceDoc=e,this.tokenizer=new Zor(e)}get referenceTokens(){return Promise.resolve(this.createReferenceTokens())}createReferenceTokens(){return this.referenceTokensCache??=this.tokenizer.tokenize(this._getCursorContextInfo(this.referenceDoc).context)}sortScoredSnippets(e,r=HY.Descending){return r===HY.Ascending?e.sort((n,o)=>n.score>o.score?1:-1):r===HY.Descending?e.sort((n,o)=>n.score>o.score?-1:1):e}async retrieveAllSnippets(e,r=HY.Descending){let n=[];if(e.source.length===0||(await this.referenceTokens).size===0)return n;let o=e.source.split(` +`),s=this.id()+":"+e.source,c=PJn.get(s)??[],l=c.length===0,u=l?o.map(d=>this.tokenizer.tokenize(d),this.tokenizer):[];for(let[d,[p,h]]of this.getWindowsDelineations(o).entries()){if(l){let A=new Set;u.slice(p,h).forEach(y=>y.forEach(E=>A.add(E),A)),c.push(A)}let m=c[d],g=this.similarityScore(m,await this.referenceTokens);if(n.length&&p>0&&n[n.length-1].endLine>p){n[n.length-1].scoree.length>0)}a(kJn,"splitIntoWords");var bYs=new Set(["we","our","you","it","its","they","them","their","this","that","these","those","is","are","was","were","be","been","being","have","has","had","having","do","does","did","doing","can","don","t","s","will","would","should","what","which","who","when","where","why","how","a","an","the","and","or","not","no","but","because","as","until","again","further","then","once","here","there","all","any","both","each","few","more","most","other","some","such","above","below","to","during","before","after","of","at","by","about","between","into","through","from","up","down","in","out","on","off","over","under","only","own","same","so","than","too","very","just","now"]),TYs=new Set(["if","then","else","for","while","with","def","function","return","TODO","import","try","catch","raise","finally","repeat","switch","case","match","assert","continue","break","const","class","enum","struct","static","new","super","this","var",...bYs]),SYs=new Map([])});var rsr=T(WS=>{"use strict";f();Object.defineProperty(WS,"__esModule",{value:!0});WS.virtualNode=IYs;WS.lineNode=xYs;WS.blankNode=wYs;WS.topNode=RYs;WS.isBlank=PYs;WS.isLine=kYs;WS.isVirtual=DJn;WS.isTop=NJn;WS.cutTreeAfterLine=DYs;WS.duplicateTree=NYs;function IYs(t,e,r){return{type:"virtual",indentation:t,subs:e,label:r}}a(IYs,"virtualNode");function xYs(t,e,r,n,o){if(r==="")throw new Error("Cannot create a line node with an empty source line");return{type:"line",indentation:t,lineNumber:e,sourceLine:r,subs:n,label:o}}a(xYs,"lineNode");function wYs(t){return{type:"blank",lineNumber:t,subs:[]}}a(wYs,"blankNode");function RYs(t){return{type:"top",indentation:-1,subs:t??[]}}a(RYs,"topNode");function PYs(t){return t.type==="blank"}a(PYs,"isBlank");function kYs(t){return t.type==="line"}a(kYs,"isLine");function DJn(t){return t.type==="virtual"}a(DJn,"isVirtual");function NJn(t){return t.type==="top"}a(NJn,"isTop");function DYs(t,e){function r(n){if(!DJn(n)&&!NJn(n)&&n.lineNumber===e)return n.subs=[],!0;for(let o=0;o{"use strict";f();Object.defineProperty(ID,"__esModule",{value:!0});ID.clearLabels=MYs;ID.clearLabelsIf=OYs;ID.mapLabels=isr;ID.resetLineNumbers=BYs;ID.visitTree=Exe;ID.visitTreeConditionally=LYs;ID.foldTree=FYs;ID.rebuildTree=UYs;var nsr=rsr();function MYs(t){return Exe(t,e=>{e.label=void 0},"bottomUp"),t}a(MYs,"clearLabels");function OYs(t,e){return Exe(t,r=>{r.label=r.label?e(r.label)?void 0:r.label:void 0},"bottomUp"),t}a(OYs,"clearLabelsIf");function isr(t,e){switch(t.type){case"line":case"virtual":{let r=t.subs.map(n=>isr(n,e));return{...t,subs:r,label:t.label?e(t.label):void 0}}case"blank":return{...t,label:t.label?e(t.label):void 0};case"top":return{...t,subs:t.subs.map(r=>isr(r,e)),label:t.label?e(t.label):void 0}}}a(isr,"mapLabels");function BYs(t){let e=0;function r(n){!(0,nsr.isVirtual)(n)&&!(0,nsr.isTop)(n)&&(n.lineNumber=e,e++)}a(r,"visitor"),Exe(t,r,"topDown")}a(BYs,"resetLineNumbers");function Exe(t,e,r){function n(o){r==="topDown"&&e(o),o.subs.forEach(s=>{n(s)}),r==="bottomUp"&&e(o)}a(n,"_visit"),n(t)}a(Exe,"visitTree");function LYs(t,e,r){function n(o){if(r==="topDown"&&!e(o))return!1;let s=!0;return o.subs.forEach(c=>{s=s&&n(c)}),r==="bottomUp"&&(s=s&&e(o)),s}a(n,"_visit"),n(t)}a(LYs,"visitTreeConditionally");function FYs(t,e,r,n){let o=e;function s(c){o=r(c,o)}return a(s,"visitor"),Exe(t,s,n),o}a(FYs,"foldTree");function UYs(t,e,r){let n=a(s=>{if(r!==void 0&&r(s))return s;{let c=s.subs.map(n).filter(l=>l!==void 0);return s.subs=c,e(s)}},"rebuild"),o=n(t);return o!==void 0?o:(0,nsr.topNode)()}a(UYs,"rebuildTree")});var UJn=T(AR=>{"use strict";f();Object.defineProperty(AR,"__esModule",{value:!0});AR.parseRaw=MJn;AR.labelLines=OJn;AR.labelVirtualInherited=QYs;AR.buildLabelRules=BJn;AR.combineClosersAndOpeners=LJn;AR.groupBlocks=qYs;AR.flattenVirtual=GYs;AR.registerLanguageSpecificParser=$Ys;AR.parseTree=VYs;var Lh=rsr(),mue=osr();function MJn(t){let e=t.split(` +`),r=e.map(d=>d.match(/^\s*/)[0].length),n=e.map(d=>d.trimLeft());function o(d){let[p,h]=s(d+1,r[d]);return[(0,Lh.lineNode)(r[d],d,n[d],p),h]}a(o,"parseNode");function s(d,p){let h,m=[],g=d,A;for(;gp);)if(n[g]==="")A===void 0&&(A=g),g+=1;else{if(A!==void 0){for(let y=A;ys.matches(n.sourceLine));o&&(n.label=o.label)}}a(r,"visitor"),(0,mue.visitTree)(t,r,"bottomUp")}a(OJn,"labelLines");function QYs(t){function e(r){if((0,Lh.isVirtual)(r)&&r.label===void 0){let n=r.subs.filter(o=>!(0,Lh.isBlank)(o));n.length===1&&(r.label=n[0].label)}}a(e,"visitor"),(0,mue.visitTree)(t,e,"bottomUp")}a(QYs,"labelVirtualInherited");function BJn(t){return Object.keys(t).map(e=>{let r;return t[e].test?r=a(n=>t[e].test(n),"matches"):r=t[e],{matches:r,label:e}})}a(BJn,"buildLabelRules");function LJn(t){let e=a(function(n){if(n.subs.length===0||n.subs.findIndex(c=>c.label==="closer"||c.label==="opener")===-1)return n;let o=[],s;for(let c=0;cu.subs.push(d)),l.subs=[];else if(l.label==="closer"&&s!==void 0&&((0,Lh.isLine)(l)||(0,Lh.isVirtual)(l))&&l.indentation>=s.indentation){let d=o.length-1;for(;d>0&&(0,Lh.isBlank)(o[d]);)d-=1;if(s.subs.push(...o.splice(d+1)),l.subs.length>0){let p=s.subs.findIndex(A=>A.label!=="newVirtual"),h=s.subs.slice(0,p),m=s.subs.slice(p),g=m.length>0?[(0,Lh.virtualNode)(l.indentation,m,"newVirtual")]:[];s.subs=[...h,...g,l]}else s.subs.push(l)}else o.push(l),(0,Lh.isBlank)(l)||(s=l)}return n.subs=o,n},"rebuilder"),r=(0,mue.rebuildTree)(t,e);return(0,mue.clearLabelsIf)(t,n=>n==="newVirtual"),r}a(LJn,"combineClosersAndOpeners");function qYs(t,e=Lh.isBlank,r){let n=a(function(o){if(o.subs.length<=1)return o;let s=[],c=[],l,u=!1;function d(p=!1){if(l!==void 0&&(s.length>0||!p)){let h=(0,Lh.virtualNode)(l,c,r);s.push(h)}else c.forEach(h=>s.push(h))}a(d,"flushBlockIntoNewSubs");for(let p=0;p{"use strict";f();Object.defineProperty(Bit,"__esModule",{value:!0});Bit.getBasicWindowDelineations=zYs;Bit.getIndentationWindowsDelineations=YYs;var QJn=osr(),WYs=UJn();function zYs(t,e){let r=[],n=e.length;if(n===0)return[];if(n{if(c.type==="blank"){c.label={totalLength:1,firstLineAfter:c.lineNumber+1};return}let l=c.type==="line"?1:0,u=c.type==="line"?c.lineNumber+1:NaN;function d(A){return A===-1?u-l:c.subs[A].label.firstLineAfter-c.subs[A].label.totalLength}a(d,"getStartLine");function p(A,y){return A===0?y+1:c.subs[A-1].label.firstLineAfter}a(p,"getEndLine");let h=c.type==="line"?-1:0,m=c.type==="line"?1:0,g=0;for(let A=0;A=0&&hn){let y=d(h),E=p(A,y),_=g===A?E:p(g,y);for(r<=E-y&&o.push([y,_]);m>n;)m-=h===-1?c.type==="line"?1:0:c.subs[h].label.totalLength,h++}}if(hc[0]-l[0]||c[1]-l[1]).filter((c,l,u)=>l===0||c[0]!==u[l-1][0]||c[1]!==u[l-1][1])}a(YYs,"getIndentationWindowsDelineations")});var GJn=T(_xe=>{"use strict";f();Object.defineProperty(_xe,"__esModule",{value:!0});_xe.FixedWindowSizeJaccardMatcher=void 0;_xe.computeScore=qJn;var KYs=Kor(),JYs=tsr(),XYs=ssr(),asr=class t extends JYs.WindowedMatcher{static{a(this,"FixedWindowSizeJaccardMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=e=>({to:a(r=>new t(r,e),"to")})}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return(0,XYs.getBasicWindowDelineations)(this.windowLength,e)}_getCursorContextInfo(e){return(0,KYs.getCursorContext)(e,{maxLineCount:this.windowLength})}similarityScore(e,r){return qJn(e,r)}};_xe.FixedWindowSizeJaccardMatcher=asr;function qJn(t,e){let r=new Set;return t.forEach(n=>{e.has(n)&&r.add(n)}),r.size/(t.size+e.size-r.size)}a(qJn,"computeScore")});var jJn=T(Lit=>{"use strict";f();Object.defineProperty(Lit,"__esModule",{value:!0});Lit.BlockTokenSubsetMatcher=void 0;var ZYs=QY(),HJn=Kor(),eKs=tsr(),tKs=ssr(),csr=class t extends eKs.WindowedMatcher{static{a(this,"BlockTokenSubsetMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=e=>({to:a(r=>new t(r,e),"to")})}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return(0,tKs.getBasicWindowDelineations)(this.windowLength,e)}_getCursorContextInfo(e){return(0,HJn.getCursorContext)(e,{maxLineCount:this.windowLength})}get referenceTokens(){return this.createReferenceTokensForLanguage()}async createReferenceTokensForLanguage(){return this.referenceTokensCache?this.referenceTokensCache:(this.referenceTokensCache=t.syntaxAwareSupportsLanguage(this.referenceDoc.languageId)?await this.syntaxAwareReferenceTokens():await super.referenceTokens,this.referenceTokensCache)}async syntaxAwareReferenceTokens(){let e=(await this.getEnclosingMemberStart(this.referenceDoc.source,this.referenceDoc.offset))?.startIndex,r=this.referenceDoc.offset,n=e?this.referenceDoc.source.slice(e,r):(0,HJn.getCursorContext)(this.referenceDoc,{maxLineCount:this.windowLength}).context;return this.tokenizer.tokenize(n)}static syntaxAwareSupportsLanguage(e){return e==="csharp"}similarityScore(e,r){return rKs(e,r)}async getEnclosingMemberStart(e,r){let n;try{n=await(0,ZYs.parseTreeSitter)(this.referenceDoc.languageId,e);let o=n.rootNode.namedDescendantForIndex(r);for(;o&&!(t.isMember(o)||t.isBlock(o));)o=o.parent??void 0;return o}finally{n?.delete()}}static isMember(e){switch(e?.type){case"method_declaration":case"property_declaration":case"field_declaration":case"constructor_declaration":return!0;default:return!1}}static isBlock(e){switch(e?.type){case"class_declaration":case"struct_declaration":case"record_declaration":case"enum_declaration":case"interface_declaration":return!0;default:return!1}}};Lit.BlockTokenSubsetMatcher=csr;function rKs(t,e){let r=new Set;return e.forEach(n=>{t.has(n)&&r.add(n)}),r.size}a(rKs,"computeScore")});var Fit=T(yR=>{"use strict";f();Object.defineProperty(yR,"__esModule",{value:!0});yR.defaultCppSimilarFilesOptions=yR.nullSimilarFilesOptions=yR.conservativeFilesOptions=yR.defaultSimilarFilesOptions=void 0;yR.getSimilarSnippets=uKs;var nKs=GJn(),iKs=jJn(),oKs=0,sKs=60,aKs=4,cKs=1,$Jn=20,VJn=1e4;yR.defaultSimilarFilesOptions={snippetLength:sKs,threshold:oKs,maxTopSnippets:aKs,maxCharPerFile:VJn,maxNumberOfFiles:$Jn,maxSnippetsPerFile:cKs,useSubsetMatching:!1};yR.conservativeFilesOptions={snippetLength:10,threshold:.3,maxTopSnippets:1,maxCharPerFile:VJn,maxNumberOfFiles:$Jn,maxSnippetsPerFile:1};yR.nullSimilarFilesOptions={snippetLength:0,threshold:1,maxTopSnippets:0,maxCharPerFile:0,maxNumberOfFiles:0,maxSnippetsPerFile:0};yR.defaultCppSimilarFilesOptions={snippetLength:60,threshold:0,maxTopSnippets:16,maxCharPerFile:1e5,maxNumberOfFiles:200,maxSnippetsPerFile:4};function lKs(t,e){return(e.useSubsetMatching?iKs.BlockTokenSubsetMatcher.FACTORY(e.snippetLength):nKs.FixedWindowSizeJaccardMatcher.FACTORY(e.snippetLength)).to(t)}a(lKs,"getMatcher");async function uKs(t,e,r){let n=lKs(t,r);return r.maxTopSnippets===0?[]:(await e.filter(s=>s.source.length0).slice(0,r.maxNumberOfFiles).reduce(async(s,c)=>(await s).concat((await n.findMatches(c,r.maxSnippetsPerFile)).map(l=>({relativePath:c.relativePath,...l}))),Promise.resolve([]))).filter(s=>s.score&&s.snippet&&s.score>r.threshold).sort((s,c)=>s.score-c.score).slice(-r.maxTopSnippets)}a(uKs,"getSimilarSnippets")});var zJn=T(Uit=>{"use strict";f();Object.defineProperty(Uit,"__esModule",{value:!0});Uit.getCppSimilarFilesOptions=fKs;Uit.getCppNumberOfSnippets=pKs;var WJn=Fit(),dKs=Qit();function fKs(t,e){return{...WJn.defaultCppSimilarFilesOptions,useSubsetMatching:(0,dKs.useSubsetMatching)(t,e)}}a(fKs,"getCppSimilarFilesOptions");function pKs(t){return WJn.defaultCppSimilarFilesOptions.maxTopSnippets}a(pKs,"getCppNumberOfSnippets")});var Qit=T(Cxe=>{"use strict";f();Object.defineProperty(Cxe,"__esModule",{value:!0});Cxe.getSimilarFilesOptions=yKs;Cxe.getNumberOfSnippets=_Ks;Cxe.useSubsetMatching=JJn;var hKs=aU(),mKs=Fit(),YJn=Gm(),gKs=crt(),KJn=zJn(),AKs=new Map([["cpp",KJn.getCppSimilarFilesOptions]]);function yKs(t,e,r){let n=AKs.get(r);return n?n(t,e):{...mKs.defaultSimilarFilesOptions,useSubsetMatching:JJn(t,e)}}a(yKs,"getSimilarFilesOptions");var EKs=new Map([["cpp",KJn.getCppNumberOfSnippets]]);function _Ks(t,e){let r=EKs.get(e);return r?r(t):hKs.DEFAULT_NUM_SNIPPETS}a(_Ks,"getNumberOfSnippets");function JJn(t,e){return(e.filtersAndExp.exp.variables[gKs.ExpTreatmentVariables.UseSubsetMatching]||(0,YJn.getConfig)(t,YJn.ConfigKey.UseSubsetMatching))??!1}a(JJn,"useSubsetMatching")});var gue=T($Y=>{"use strict";f();Object.defineProperty($Y,"__esModule",{value:!0});$Y.convertToAPIChoice=TKs;$Y.getTemperatureForSamples=xKs;$Y.getStops=RKs;$Y.getTopP=PKs;$Y.getMaxSolutionTokens=kKs;var CKs=Ip(),vKs=aU(),XJn=uc(),bKs=xp();function TKs(t,e,r,n,o,s,c){return(0,bKs.logEngineCompletion)(t,e,r,o,n),{completionText:e,meanLogProb:SKs(t,r),meanAlternativeLogProb:IKs(t,r),choiceIndex:n,requestId:o,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:c,copilotAnnotations:r.copilot_annotations,clientCompletionId:(0,CKs.generateUuid)(),finishReason:r.finish_reason}}a(TKs,"convertToAPIChoice");function SKs(t,e){if(e?.logprobs?.token_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--)r+=e.logprobs.token_logprobs[s],n+=1;return n>0?r/n:void 0}catch(r){XJn.logger.exception(t,r,"Error calculating mean prob")}}a(SKs,"calculateMeanLogProb");function IKs(t,e){if(e?.logprobs?.top_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--){let c={...e.logprobs.top_logprobs[s]};delete c[e.logprobs.tokens[s]],r+=Math.max(...Object.values(c)),n+=1}return n>0?r/n:void 0}catch(r){XJn.logger.exception(t,r,"Error calculating mean prob")}}a(IKs,"calculateMeanAlternativeLogProb");function xKs(t,e){return t.isRunningInTest()||e<=1?0:e<10?.2:e<20?.4:.8}a(xKs,"getTemperatureForSamples");var wKs={markdown:[` `],python:[` @@ -977,31 +977,31 @@ def `,` class `,` if `,` -#`]};function wzs(t){return xzs[t??""]??[` +#`]};function RKs(t){return wKs[t??""]??[` -`,"\n```"]}a(wzs,"getStops");function Rzs(){return 1}a(Rzs,"getTopP");function Pzs(){return _zs.DEFAULT_MAX_COMPLETION_LENGTH}a(Pzs,"getMaxSolutionTokens")});var UD=T(Swe=>{"use strict";f();Object.defineProperty(Swe,"__esModule",{value:!0});Swe.Fragment=tJn;Swe.jsx=eJn;Swe.jsxs=eJn;function eJn(t,e,r){let n=[];Array.isArray(e.children)?n=e.children:e.children&&(n=[e.children]);let o={...e,children:n};return r&&(o.key=r),{type:t,props:o}}a(eJn,"functionComponentFunction");function tJn(t){return{type:"f",children:t}}a(tJn,"fragmentFunction");tJn.isFragmentFunction=!0});var PR=T(Hor=>{"use strict";f();Object.defineProperty(Hor,"__esModule",{value:!0});Hor.es5ClassCompat=kzs;function kzs(t){return Object.assign(t,{apply:a(function(...r){if(r.length===0)return Reflect.construct(t,[]);{let n=r.length===1?[]:r[1];return Reflect.construct(t,n,r[0].constructor)}},"apply"),call:a(function(...r){if(r.length===0)return Reflect.construct(t,[]);{let[n,...o]=r;return Reflect.construct(t,o,n.constructor)}},"call")})}a(kzs,"es5ClassCompat")});var nde=T(QK=>{"use strict";f();var Nzs=QK&&QK.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},UK;Object.defineProperty(QK,"__esModule",{value:!0});QK.Position=void 0;var Dot=es(),Dzs=PR(),jor=UK=class{static{a(this,"Position")}static Min(...e){if(e.length===0)throw new TypeError;let r=e[0];for(let n=1;ne.line?1:this._charactere._character?1:0}translate(e,r=0){if(e===null||r===null)throw(0,Dot.illegalArgument)();let n;return typeof e>"u"?n=0:typeof e=="number"?n=e:(n=typeof e.lineDelta=="number"?e.lineDelta:0,r=typeof e.characterDelta=="number"?e.characterDelta:0),n===0&&r===0?this:new UK(this.line+n,this.character+r)}with(e,r=this.character){if(e===null||r===null)throw(0,Dot.illegalArgument)();let n;return typeof e>"u"?n=this.line:typeof e=="number"?n=e:(n=typeof e.line=="number"?e.line:this.line,r=typeof e.character=="number"?e.character:this.character),n===this.line&&r===this.character?this:new UK(n,r)}toJSON(){return{line:this.line,character:this.character}}[Symbol.for("debug.description")](){return`(${this.line}:${this.character})`}};QK.Position=jor;QK.Position=jor=UK=Nzs([Dzs.es5ClassCompat],jor)});var QB=T(VU=>{"use strict";f();var Mzs=VU&&VU.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},UB;Object.defineProperty(VU,"__esModule",{value:!0});VU.Range=void 0;VU.getDebugDescriptionOfRange=rJn;var Ozs=es(),Bzs=PR(),Ky=nde(),$or=UB=class{static{a(this,"Range")}static isRange(e){return e instanceof UB?!0:!e||typeof e!="object"?!1:Ky.Position.isPosition(e.start)&&Ky.Position.isPosition(e.end)}static of(e){if(e instanceof UB)return e;if(this.isRange(e))return new UB(e.start,e.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(e,r,n,o){let s,c;if(typeof e=="number"&&typeof r=="number"&&typeof n=="number"&&typeof o=="number"?(s=new Ky.Position(e,r),c=new Ky.Position(n,o)):Ky.Position.isPosition(e)&&Ky.Position.isPosition(r)&&(s=Ky.Position.of(e),c=Ky.Position.of(r)),!s||!c)throw new Error("Invalid arguments");s.isBefore(c)?(this._start=s,this._end=c):(this._start=c,this._end=s)}contains(e){return UB.isRange(e)?this.contains(e.start)&&this.contains(e.end):Ky.Position.isPosition(e)?!(Ky.Position.of(e).isBefore(this._start)||this._end.isBefore(e)):!1}isEqual(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)}intersection(e){let r=Ky.Position.Max(e.start,this._start),n=Ky.Position.Min(e.end,this._end);if(!r.isAfter(n))return new UB(r,n)}union(e){if(this.contains(e))return this;if(e.contains(this))return e;let r=Ky.Position.Min(e.start,this._start),n=Ky.Position.Max(e.end,this.end);return new UB(r,n)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(e,r=this.end){if(e===null||r===null)throw(0,Ozs.illegalArgument)();let n;return e?Ky.Position.isPosition(e)?n=e:(n=e.start||this.start,r=e.end||this.end):n=this.start,n.isEqual(this._start)&&r.isEqual(this.end)?this:new UB(n,r)}toJSON(){return[this.start,this.end]}[Symbol.for("debug.description")](){return rJn(this)}};VU.Range=$or;VU.Range=$or=UB=Mzs([Bzs.es5ClassCompat],$or);function rJn(t){return t.isEmpty?`[${t.start.line}:${t.start.character})`:`[${t.start.line}:${t.start.character} -> ${t.end.line}:${t.end.character})`}a(rJn,"getDebugDescriptionOfRange")});var cJn=T(__=>{"use strict";f();var oJn=__&&__.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(__,"__esModule",{value:!0});__.Diagnostic=__.DiagnosticRelatedInformation=__.DiagnosticSeverity=__.DiagnosticTag=void 0;var nJn=jc(),Lzs=Ru(),sJn=PR(),aJn=QB(),iJn;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(iJn||(__.DiagnosticTag=iJn={}));var Mot;(function(t){t[t.Hint=3]="Hint",t[t.Information=2]="Information",t[t.Warning=1]="Warning",t[t.Error=0]="Error"})(Mot||(__.DiagnosticSeverity=Mot={}));var Oot=class{static{a(this,"DiagnosticRelatedInformation")}static is(e){return e?typeof e.message=="string"&&e.location&&aJn.Range.isRange(e.location.range)&&Lzs.URI.isUri(e.location.uri):!1}constructor(e,r){this.location=e,this.message=r}static isEqual(e,r){return e===r?!0:!e||!r?!1:e.message===r.message&&e.location.range.isEqual(r.location.range)&&e.location.uri.toString()===r.location.uri.toString()}};__.DiagnosticRelatedInformation=Oot;__.DiagnosticRelatedInformation=Oot=oJn([sJn.es5ClassCompat],Oot);var Vor=class{static{a(this,"Diagnostic")}constructor(e,r,n=Mot.Error){if(!aJn.Range.isRange(e))throw new TypeError("range must be set");if(!r)throw new TypeError("message must be set");this.range=e,this.message=r,this.severity=n}toJSON(){return{severity:Mot[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(e,r){return e===r?!0:!e||!r?!1:e.message===r.message&&e.severity===r.severity&&e.code===r.code&&e.severity===r.severity&&e.source===r.source&&e.range.isEqual(r.range)&&(0,nJn.equals)(e.tags,r.tags)&&(0,nJn.equals)(e.relatedInformation,r.relatedInformation,Oot.isEqual)}};__.Diagnostic=Vor;__.Diagnostic=Vor=oJn([sJn.es5ClassCompat],Vor)});var Yor=T(qK=>{"use strict";f();var Fzs=qK&&qK.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Wor;Object.defineProperty(qK,"__esModule",{value:!0});qK.Location=void 0;var Uzs=Ru(),Qzs=PR(),qzs=nde(),Bot=QB(),zor=Wor=class{static{a(this,"Location")}static isLocation(e){return e instanceof Wor?!0:e?Bot.Range.isRange(e.range)&&Uzs.URI.isUri(e.uri):!1}constructor(e,r){if(this.uri=e,r)if(Bot.Range.isRange(r))this.range=Bot.Range.of(r);else if(qzs.Position.isPosition(r))this.range=new Bot.Range(r,r);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};qK.Location=zor;qK.Location=zor=Wor=Fzs([Qzs.es5ClassCompat],zor)});var lJn=T(Zor=>{"use strict";f();Object.defineProperty(Zor,"__esModule",{value:!0});Zor.getKoreanAltChars=Gzs;function Gzs(t){let e=Hzs(t);if(e&&e.length>0)return new Uint32Array(e)}a(Gzs,"getKoreanAltChars");var v_=0,WU=new Uint32Array(10);function Hzs(t){if(v_=0,QD(t,Kor,4352),v_>0||(QD(t,Jor,4449),v_>0)||(QD(t,Xor,4520),v_>0)||(QD(t,GK,12593),v_))return WU.subarray(0,v_);if(t>=44032&&t<=55203){let e=t-44032,r=e%588,n=Math.floor(e/588),o=Math.floor(r/28),s=r%28-1;if(n=0&&(s0)return WU.subarray(0,v_)}}a(Hzs,"disassembleKorean");function QD(t,e,r){t>=r&&t>8&&(WU[v_++]=t>>8&255),t>>16&&(WU[v_++]=t>>16&255))}a(jzs,"addCodesToBuffer");var Kor=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),Jor=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),Xor=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),GK=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});var fJn=T(ide=>{"use strict";f();Object.defineProperty(ide,"__esModule",{value:!0});ide.tryNormalizeToBase=void 0;ide.normalizeNFC=Vzs;ide.normalizeNFD=uJn;var esr=iw(),$zs=new esr.LRUCache(1e4);function Vzs(t){return dJn(t,"NFC",$zs)}a(Vzs,"normalizeNFC");var Wzs=new esr.LRUCache(1e4);function uJn(t){return dJn(t,"NFD",Wzs)}a(uJn,"normalizeNFD");var zzs=/[^\u0000-\u0080]/;function dJn(t,e,r){if(!t)return t;let n=r.get(t);if(n)return n;let o;return zzs.test(t)?o=t.normalize(e):o=t,r.set(t,o),o}a(dJn,"normalize");ide.tryNormalizeToBase=(function(){let t=new esr.LRUCache(1e4),e=/[\u0300-\u036f]/g;return function(r){let n=t.get(r);if(n)return n;let o=uJn(r).replace(e,""),s=(o.length===r.length?o:r).toLowerCase();return t.set(r,s),s}})()});var kJn=T(Ca=>{"use strict";f();var Yzs=Ca&&Ca.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kzs=Ca&&Ca.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jzs=Ca&&Ca.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o0?[{start:0,end:e.length}]:[]:null}a(yJn,"_matchesPrefix");function EJn(t,e){if(t.length>e.length)return null;let r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?null:[{start:r,end:r+t.length}]}a(EJn,"matchesContiguousSubString");function eYs(t,e){if(t.length>e.length)return null;t=(0,Uot.tryNormalizeToBase)(t),e=(0,Uot.tryNormalizeToBase)(e);let r=e.indexOf(t);return r===-1?null:[{start:r,end:r+t.length}]}a(eYs,"matchesBaseContiguousSubString");function CJn(t,e){return t.length>e.length?null:nsr(t.toLowerCase(),e.toLowerCase(),0,0)}a(CJn,"matchesSubString");function nsr(t,e,r,n){if(r===t.length)return[];if(n===e.length)return null;if(t[r]===e[n]){let o=null;return(o=nsr(t,e,r+1,n+1))?dsr({start:n,end:n+1},o):null}return nsr(t,e,r,n+1)}a(nsr,"_matchesSubString");function lsr(t){return 97<=t&&t<=122}a(lsr,"isLower");function wwe(t){return 65<=t&&t<=90}a(wwe,"isUpper");function usr(t){return 48<=t&&t<=57}a(usr,"isNumber");function _Jn(t){return t===32||t===9||t===10||t===13}a(_Jn,"isWhitespace");var vJn=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(t=>vJn.add(t.charCodeAt(0)));function Qot(t){return _Jn(t)||vJn.has(t)}a(Qot,"isWordSeparator");function pJn(t,e){return t===e||Qot(t)&&Qot(e)}a(pJn,"charactersMatch");var tsr=new Map;function hJn(t){if(tsr.has(t))return tsr.get(t);let e,r=(0,Zzs.getKoreanAltChars)(t);return r&&(e=r),tsr.set(t,e),e}a(hJn,"getAlternateCodes");function bJn(t){return lsr(t)||wwe(t)||usr(t)}a(bJn,"isAlphanumeric");function dsr(t,e){return e.length===0?e=[t]:t.end===e[0].start?e[0].start=t.start:e.unshift(t),e}a(dsr,"join");function TJn(t,e){for(let r=e;r0&&!bJn(t.charCodeAt(r-1)))return r}return t.length}a(TJn,"nextAnchor");function isr(t,e,r,n){if(r===t.length)return[];if(n===e.length)return null;if(t[r]!==e[n].toLowerCase())return null;{let o=null,s=n+1;for(o=isr(t,e,r+1,n+1);!o&&(s=TJn(e,s)).6}a(rYs,"isUpperCaseWord");function nYs(t){let{upperPercent:e,lowerPercent:r,alphaPercent:n,numericPercent:o}=t;return r>.2&&e<.8&&n>.6&&o<.2}a(nYs,"isCamelCaseWord");function iYs(t){let e=0,r=0,n=0,o=0;for(let s=0;s60&&(e=e.substring(0,60));let r=tYs(e);if(!nYs(r)){if(!rYs(r))return null;e=e.toLowerCase()}let n=null,o=0;for(t=t.toLowerCase();o0&&Qot(t.charCodeAt(r-1)))return r;return t.length}a(SJn,"nextWord");var sYs=csr(Ca.matchesPrefix,fsr,EJn),aYs=csr(Ca.matchesPrefix,fsr,CJn),mJn=new Xzs.LRUCache(1e4);function cYs(t,e,r=!1){if(typeof t!="string"||typeof e!="string")return null;let n=mJn.get(t);n||(n=new RegExp(asr.convertSimple2RegExpPattern(t),"i"),mJn.set(t,n));let o=n.exec(e);return o?[{start:o.index,end:o.index+o[0].length}]:r?aYs(t,e):sYs(t,e)}a(cYs,"matchesFuzzy");function lYs(t,e){let r=xwe(t,t.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?IJn(r):null}a(lYs,"matchesFuzzy2");function uYs(t,e,r,n,o,s){let c=Math.min(13,t.length);for(;r"u")return[];let e=[],r=t[1];for(let n=t.length-1;n>1;n--){let o=t[n]+r,s=e[e.length-1];s&&s.end===o?s.end=o+1:e.push({start:o,end:o+1})}return e}a(IJn,"createMatches");var YU=128;function psr(){let t=[],e=[];for(let r=0;r<=YU;r++)e[r]=0;for(let r=0;r<=YU;r++)t.push(e.slice(0));return t}a(psr,"initTable");function xJn(t){let e=[];for(let r=0;r<=t;r++)e[r]=0;return e}a(xJn,"initArr");var wJn=xJn(2*YU),ssr=xJn(2*YU),qD=psr(),zU=psr(),Iwe=psr(),dYs=!1;function rsr(t,e,r,n,o){function s(l,u,d=" "){for(;l.lengths(l,3)).join("|")} +`,"\n```"]}a(RKs,"getStops");function PKs(){return 1}a(PKs,"getTopP");function kKs(){return vKs.DEFAULT_MAX_COMPLETION_LENGTH}a(kKs,"getMaxSolutionTokens")});var xD=T(vxe=>{"use strict";f();Object.defineProperty(vxe,"__esModule",{value:!0});vxe.Fragment=eXn;vxe.jsx=ZJn;vxe.jsxs=ZJn;function ZJn(t,e,r){let n=[];Array.isArray(e.children)?n=e.children:e.children&&(n=[e.children]);let o={...e,children:n};return r&&(o.key=r),{type:t,props:o}}a(ZJn,"functionComponentFunction");function eXn(t){return{type:"f",children:t}}a(eXn,"fragmentFunction");eXn.isFragmentFunction=!0});var ER=T(lsr=>{"use strict";f();Object.defineProperty(lsr,"__esModule",{value:!0});lsr.es5ClassCompat=DKs;function DKs(t){return Object.assign(t,{apply:a(function(...r){if(r.length===0)return Reflect.construct(t,[]);{let n=r.length===1?[]:r[1];return Reflect.construct(t,n,r[0].constructor)}},"apply"),call:a(function(...r){if(r.length===0)return Reflect.construct(t,[]);{let[n,...o]=r;return Reflect.construct(t,o,n.constructor)}},"call")})}a(DKs,"es5ClassCompat")});var Aue=T(WY=>{"use strict";f();var NKs=WY&&WY.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},VY;Object.defineProperty(WY,"__esModule",{value:!0});WY.Position=void 0;var qit=Ko(),MKs=ER(),usr=VY=class{static{a(this,"Position")}static Min(...e){if(e.length===0)throw new TypeError;let r=e[0];for(let n=1;ne.line?1:this._charactere._character?1:0}translate(e,r=0){if(e===null||r===null)throw(0,qit.illegalArgument)();let n;return typeof e>"u"?n=0:typeof e=="number"?n=e:(n=typeof e.lineDelta=="number"?e.lineDelta:0,r=typeof e.characterDelta=="number"?e.characterDelta:0),n===0&&r===0?this:new VY(this.line+n,this.character+r)}with(e,r=this.character){if(e===null||r===null)throw(0,qit.illegalArgument)();let n;return typeof e>"u"?n=this.line:typeof e=="number"?n=e:(n=typeof e.line=="number"?e.line:this.line,r=typeof e.character=="number"?e.character:this.character),n===this.line&&r===this.character?this:new VY(n,r)}toJSON(){return{line:this.line,character:this.character}}[Symbol.for("debug.description")](){return`(${this.line}:${this.character})`}};WY.Position=usr;WY.Position=usr=VY=NKs([MKs.es5ClassCompat],usr)});var vB=T(EU=>{"use strict";f();var OKs=EU&&EU.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},CB;Object.defineProperty(EU,"__esModule",{value:!0});EU.Range=void 0;EU.getDebugDescriptionOfRange=tXn;var BKs=Ko(),LKs=ER(),qy=Aue(),dsr=CB=class{static{a(this,"Range")}static isRange(e){return e instanceof CB?!0:!e||typeof e!="object"?!1:qy.Position.isPosition(e.start)&&qy.Position.isPosition(e.end)}static of(e){if(e instanceof CB)return e;if(this.isRange(e))return new CB(e.start,e.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(e,r,n,o){let s,c;if(typeof e=="number"&&typeof r=="number"&&typeof n=="number"&&typeof o=="number"?(s=new qy.Position(e,r),c=new qy.Position(n,o)):qy.Position.isPosition(e)&&qy.Position.isPosition(r)&&(s=qy.Position.of(e),c=qy.Position.of(r)),!s||!c)throw new Error("Invalid arguments");s.isBefore(c)?(this._start=s,this._end=c):(this._start=c,this._end=s)}contains(e){return CB.isRange(e)?this.contains(e.start)&&this.contains(e.end):qy.Position.isPosition(e)?!(qy.Position.of(e).isBefore(this._start)||this._end.isBefore(e)):!1}isEqual(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)}intersection(e){let r=qy.Position.Max(e.start,this._start),n=qy.Position.Min(e.end,this._end);if(!r.isAfter(n))return new CB(r,n)}union(e){if(this.contains(e))return this;if(e.contains(this))return e;let r=qy.Position.Min(e.start,this._start),n=qy.Position.Max(e.end,this.end);return new CB(r,n)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(e,r=this.end){if(e===null||r===null)throw(0,BKs.illegalArgument)();let n;return e?qy.Position.isPosition(e)?n=e:(n=e.start||this.start,r=e.end||this.end):n=this.start,n.isEqual(this._start)&&r.isEqual(this.end)?this:new CB(n,r)}toJSON(){return[this.start,this.end]}[Symbol.for("debug.description")](){return tXn(this)}};EU.Range=dsr;EU.Range=dsr=CB=OKs([LKs.es5ClassCompat],dsr);function tXn(t){return t.isEmpty?`[${t.start.line}:${t.start.character})`:`[${t.start.line}:${t.start.character} -> ${t.end.line}:${t.end.character})`}a(tXn,"getDebugDescriptionOfRange")});var aXn=T(lC=>{"use strict";f();var iXn=lC&&lC.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(lC,"__esModule",{value:!0});lC.Diagnostic=lC.DiagnosticRelatedInformation=lC.DiagnosticSeverity=lC.DiagnosticTag=void 0;var rXn=Lc(),FKs=Eu(),oXn=ER(),sXn=vB(),nXn;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(nXn||(lC.DiagnosticTag=nXn={}));var Git;(function(t){t[t.Hint=3]="Hint",t[t.Information=2]="Information",t[t.Warning=1]="Warning",t[t.Error=0]="Error"})(Git||(lC.DiagnosticSeverity=Git={}));var Hit=class{static{a(this,"DiagnosticRelatedInformation")}static is(e){return e?typeof e.message=="string"&&e.location&&sXn.Range.isRange(e.location.range)&&FKs.URI.isUri(e.location.uri):!1}constructor(e,r){this.location=e,this.message=r}static isEqual(e,r){return e===r?!0:!e||!r?!1:e.message===r.message&&e.location.range.isEqual(r.location.range)&&e.location.uri.toString()===r.location.uri.toString()}};lC.DiagnosticRelatedInformation=Hit;lC.DiagnosticRelatedInformation=Hit=iXn([oXn.es5ClassCompat],Hit);var fsr=class{static{a(this,"Diagnostic")}constructor(e,r,n=Git.Error){if(!sXn.Range.isRange(e))throw new TypeError("range must be set");if(!r)throw new TypeError("message must be set");this.range=e,this.message=r,this.severity=n}toJSON(){return{severity:Git[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(e,r){return e===r?!0:!e||!r?!1:e.message===r.message&&e.severity===r.severity&&e.code===r.code&&e.severity===r.severity&&e.source===r.source&&e.range.isEqual(r.range)&&(0,rXn.equals)(e.tags,r.tags)&&(0,rXn.equals)(e.relatedInformation,r.relatedInformation,Hit.isEqual)}};lC.Diagnostic=fsr;lC.Diagnostic=fsr=iXn([oXn.es5ClassCompat],fsr)});var msr=T(zY=>{"use strict";f();var UKs=zY&&zY.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},psr;Object.defineProperty(zY,"__esModule",{value:!0});zY.Location=void 0;var QKs=Eu(),qKs=ER(),GKs=Aue(),jit=vB(),hsr=psr=class{static{a(this,"Location")}static isLocation(e){return e instanceof psr?!0:e?jit.Range.isRange(e.range)&&QKs.URI.isUri(e.uri):!1}constructor(e,r){if(this.uri=e,r)if(jit.Range.isRange(r))this.range=jit.Range.of(r);else if(GKs.Position.isPosition(r))this.range=new jit.Range(r,r);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};zY.Location=hsr;zY.Location=hsr=psr=UKs([qKs.es5ClassCompat],hsr)});var cXn=T(Esr=>{"use strict";f();Object.defineProperty(Esr,"__esModule",{value:!0});Esr.getKoreanAltChars=HKs;function HKs(t){let e=jKs(t);if(e&&e.length>0)return new Uint32Array(e)}a(HKs,"getKoreanAltChars");var uC=0,_U=new Uint32Array(10);function jKs(t){if(uC=0,wD(t,gsr,4352),uC>0||(wD(t,Asr,4449),uC>0)||(wD(t,ysr,4520),uC>0)||(wD(t,YY,12593),uC))return _U.subarray(0,uC);if(t>=44032&&t<=55203){let e=t-44032,r=e%588,n=Math.floor(e/588),o=Math.floor(r/28),s=r%28-1;if(n=0&&(s0)return _U.subarray(0,uC)}}a(jKs,"disassembleKorean");function wD(t,e,r){t>=r&&t>8&&(_U[uC++]=t>>8&255),t>>16&&(_U[uC++]=t>>16&255))}a($Ks,"addCodesToBuffer");var gsr=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),Asr=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),ysr=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),YY=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])});var dXn=T(yue=>{"use strict";f();Object.defineProperty(yue,"__esModule",{value:!0});yue.tryNormalizeToBase=void 0;yue.normalizeNFC=WKs;yue.normalizeNFD=lXn;var _sr=Wx(),VKs=new _sr.LRUCache(1e4);function WKs(t){return uXn(t,"NFC",VKs)}a(WKs,"normalizeNFC");var zKs=new _sr.LRUCache(1e4);function lXn(t){return uXn(t,"NFD",zKs)}a(lXn,"normalizeNFD");var YKs=/[^\u0000-\u0080]/;function uXn(t,e,r){if(!t)return t;let n=r.get(t);if(n)return n;let o;return YKs.test(t)?o=t.normalize(e):o=t,r.set(t,o),o}a(uXn,"normalize");yue.tryNormalizeToBase=(function(){let t=new _sr.LRUCache(1e4),e=/[\u0300-\u036f]/g;return function(r){let n=t.get(r);if(n)return n;let o=lXn(r).replace(e,""),s=(o.length===r.length?o:r).toLowerCase();return t.set(r,s),s}})()});var PXn=T(ha=>{"use strict";f();var KKs=ha&&ha.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),JKs=ha&&ha.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),XKs=ha&&ha.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o0?[{start:0,end:e.length}]:[]:null}a(AXn,"_matchesPrefix");function yXn(t,e){if(t.length>e.length)return null;let r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?null:[{start:r,end:r+t.length}]}a(yXn,"matchesContiguousSubString");function tJs(t,e){if(t.length>e.length)return null;t=(0,Wit.tryNormalizeToBase)(t),e=(0,Wit.tryNormalizeToBase)(e);let r=e.indexOf(t);return r===-1?null:[{start:r,end:r+t.length}]}a(tJs,"matchesBaseContiguousSubString");function EXn(t,e){return t.length>e.length?null:bsr(t.toLowerCase(),e.toLowerCase(),0,0)}a(EXn,"matchesSubString");function bsr(t,e,r,n){if(r===t.length)return[];if(n===e.length)return null;if(t[r]===e[n]){let o=null;return(o=bsr(t,e,r+1,n+1))?ksr({start:n,end:n+1},o):null}return bsr(t,e,r,n+1)}a(bsr,"_matchesSubString");function Rsr(t){return 97<=t&&t<=122}a(Rsr,"isLower");function Sxe(t){return 65<=t&&t<=90}a(Sxe,"isUpper");function Psr(t){return 48<=t&&t<=57}a(Psr,"isNumber");function _Xn(t){return t===32||t===9||t===10||t===13}a(_Xn,"isWhitespace");var CXn=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(t=>CXn.add(t.charCodeAt(0)));function zit(t){return _Xn(t)||CXn.has(t)}a(zit,"isWordSeparator");function fXn(t,e){return t===e||zit(t)&&zit(e)}a(fXn,"charactersMatch");var Csr=new Map;function pXn(t){if(Csr.has(t))return Csr.get(t);let e,r=(0,eJs.getKoreanAltChars)(t);return r&&(e=r),Csr.set(t,e),e}a(pXn,"getAlternateCodes");function vXn(t){return Rsr(t)||Sxe(t)||Psr(t)}a(vXn,"isAlphanumeric");function ksr(t,e){return e.length===0?e=[t]:t.end===e[0].start?e[0].start=t.start:e.unshift(t),e}a(ksr,"join");function bXn(t,e){for(let r=e;r0&&!vXn(t.charCodeAt(r-1)))return r}return t.length}a(bXn,"nextAnchor");function Tsr(t,e,r,n){if(r===t.length)return[];if(n===e.length)return null;if(t[r]!==e[n].toLowerCase())return null;{let o=null,s=n+1;for(o=Tsr(t,e,r+1,n+1);!o&&(s=bXn(e,s)).6}a(nJs,"isUpperCaseWord");function iJs(t){let{upperPercent:e,lowerPercent:r,alphaPercent:n,numericPercent:o}=t;return r>.2&&e<.8&&n>.6&&o<.2}a(iJs,"isCamelCaseWord");function oJs(t){let e=0,r=0,n=0,o=0;for(let s=0;s60&&(e=e.substring(0,60));let r=rJs(e);if(!iJs(r)){if(!nJs(r))return null;e=e.toLowerCase()}let n=null,o=0;for(t=t.toLowerCase();o0&&zit(t.charCodeAt(r-1)))return r;return t.length}a(TXn,"nextWord");var aJs=wsr(ha.matchesPrefix,Dsr,yXn),cJs=wsr(ha.matchesPrefix,Dsr,EXn),hXn=new ZKs.LRUCache(1e4);function lJs(t,e,r=!1){if(typeof t!="string"||typeof e!="string")return null;let n=hXn.get(t);n||(n=new RegExp(xsr.convertSimple2RegExpPattern(t),"i"),hXn.set(t,n));let o=n.exec(e);return o?[{start:o.index,end:o.index+o[0].length}]:r?cJs(t,e):aJs(t,e)}a(lJs,"matchesFuzzy");function uJs(t,e){let r=Txe(t,t.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?SXn(r):null}a(uJs,"matchesFuzzy2");function dJs(t,e,r,n,o,s){let c=Math.min(13,t.length);for(;r"u")return[];let e=[],r=t[1];for(let n=t.length-1;n>1;n--){let o=t[n]+r,s=e[e.length-1];s&&s.end===o?s.end=o+1:e.push({start:o,end:o+1})}return e}a(SXn,"createMatches");var vU=128;function Nsr(){let t=[],e=[];for(let r=0;r<=vU;r++)e[r]=0;for(let r=0;r<=vU;r++)t.push(e.slice(0));return t}a(Nsr,"initTable");function IXn(t){let e=[];for(let r=0;r<=t;r++)e[r]=0;return e}a(IXn,"initArr");var xXn=IXn(2*vU),Isr=IXn(2*vU),RD=Nsr(),CU=Nsr(),bxe=Nsr(),fJs=!1;function vsr(t,e,r,n,o){function s(l,u,d=" "){for(;l.lengths(l,3)).join("|")} `;for(let l=0;l<=r;l++)l===0?c+=" |":c+=`${e[l-1]}|`,c+=t[l].slice(0,o+1).map(u=>s(u.toString(),3)).join("|")+` -`;return c}a(rsr,"printTable");function fYs(t,e,r,n){t=t.substr(e),r=r.substr(n),console.log(rsr(zU,t,t.length,r,r.length)),console.log(rsr(Iwe,t,t.length,r,r.length)),console.log(rsr(qD,t,t.length,r,r.length))}a(fYs,"printTables");function Lot(t,e){if(e<0||e>=t.length)return!1;let r=t.codePointAt(e);switch(r){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!asr.isEmojiImprecise(r)}}a(Lot,"isSeparatorAtPos");function gJn(t,e){if(e<0||e>=t.length)return!1;switch(t.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}a(gJn,"isWhitespaceAtPos");function Fot(t,e,r){return e[t]!==r[t]}a(Fot,"isUpperCaseAtPos");function RJn(t,e,r,n,o,s,c=!1){for(;eYU?YU:t.length,u=n.length>YU?YU:n.length;if(r>=l||s>=u||l-r>u-s||!RJn(e,r,l,o,s,u,!0))return;pYs(l,u,r,s,e,o);let d=1,p=1,h=r,m=s,g=[!1];for(d=1,h=r;hv,k=P?zU[d][p-1]+(qD[d][p-1]>0?-5:0):0,Q=m>v+1&&qD[d][p-1]>0,M=Q?zU[d][p-2]+(qD[d][p-2]>0?-5:0):0;if(Q&&(!P||M>=k)&&(!R||M>=w))zU[d][p]=M,Iwe[d][p]=3,qD[d][p]=0;else if(P&&(!R||k>=w))zU[d][p]=k,Iwe[d][p]=2,qD[d][p]=0;else if(R)zU[d][p]=w,Iwe[d][p]=1,qD[d][p]=qD[d-1][p-1]+1;else throw new Error("not possible")}}if(dYs&&fYs(t,r,n,s),!g[0]&&!c.firstMatchCanBeWeak)return;d--,p--;let A=[zU[d][p],s],y=0,E=0;for(;d>=1;){let v=p;do{let b=Iwe[d][v];if(b===3)v=v-2;else if(b===2)v=v-1;else break}while(v>=1);y>1&&e[r+d-1]===o[s+p-1]&&!Fot(v+s-1,n,o)&&y+1>qD[d][v]&&(v=p),v===p?y++:y=1,E||(E=v),d--,p=v-1,A.push(p)}u-s===l&&c.boostFullMatch&&(A[0]+=2);let _=E-l;return A[0]-=_,A}a(xwe,"fuzzyScore");function pYs(t,e,r,n,o,s){let c=t-1,l=e-1;for(;c>=r&&l>=n;)o[c]===s[l]&&(ssr[c]=l,c--),l--}a(pYs,"_fillInMaxWordMatchPos");function hYs(t,e,r,n,o,s,c,l,u,d,p){if(e[r]!==s[c])return Number.MIN_SAFE_INTEGER;let h=1,m=!1;return c===r-n?h=t[r]===o[c]?7:5:Fot(c,o,s)&&(c===0||!Fot(c-1,o,s))?(h=t[r]===o[c]?7:5,m=!0):Lot(s,c)&&(c===0||!Lot(s,c-1))?h=5:(Lot(s,c-1)||gJn(s,c-1))&&(h=5,m=!0),h>1&&r===n&&(p[0]=!0),m||(m=Fot(c,o,s)||Lot(s,c-1)||gJn(s,c-1)),r===n?c>u&&(h-=m?3:5):d?h+=m?2:0:h+=m?0:1,c+1===l&&(h-=m?3:5),h}a(hYs,"_doScore");function mYs(t,e,r,n,o,s,c){return PJn(t,e,r,n,o,s,!0,c)}a(mYs,"fuzzyScoreGracefulAggressive");function gYs(t,e,r,n,o,s,c){return PJn(t,e,r,n,o,s,!1,c)}a(gYs,"fuzzyScoreGraceful");function PJn(t,e,r,n,o,s,c,l){let u=xwe(t,e,r,n,o,s,l);if(u&&!c)return u;if(t.length>=3){let d=Math.min(7,t.length-1);for(let p=r+1;pu[0])&&(u=m))}}}return u}a(PJn,"fuzzyScoreWithPermutations");function AYs(t,e){if(e+1>=t.length)return;let r=t[e],n=t[e+1];if(r!==n)return t.slice(0,e)+n+r+t.slice(e+2)}a(AYs,"nextTypoPermutation")});var DJn=T(KU=>{"use strict";f();Object.defineProperty(KU,"__esModule",{value:!0});KU.escapeIcons=_Ys;KU.markdownEscapeEscapedIcons=bYs;KU.stripIcons=SYs;KU.getCodiconAriaLabel=IYs;KU.parseLabelWithIcons=xYs;KU.matchesFuzzyIconAware=wYs;var NJn=kJn(),yYs=C0(),msr=TWt(),EYs="$(",gsr=new RegExp(`\\$\\(${msr.ThemeIcon.iconNameExpression}(?:${msr.ThemeIcon.iconModifierExpression})?\\)`,"g"),CYs=new RegExp(`(\\\\)?${gsr.source}`,"g");function _Ys(t){return t.replace(CYs,(e,r)=>r?e:`\\${e}`)}a(_Ys,"escapeIcons");var vYs=new RegExp(`\\\\${gsr.source}`,"g");function bYs(t){return t.replace(vYs,e=>`\\${e}`)}a(bYs,"markdownEscapeEscapedIcons");var TYs=new RegExp(`(\\s)?(\\\\)?${gsr.source}(\\s)?`,"g");function SYs(t){return t.indexOf(EYs)===-1?t:t.replace(TYs,(e,r,n,o)=>n?e:r||o||"")}a(SYs,"stripIcons");function IYs(t){return t?t.replace(/\$\((.*?)\)/g,(e,r)=>` ${r} `).trim():""}a(IYs,"getCodiconAriaLabel");var hsr=new RegExp(`\\$\\(${msr.ThemeIcon.iconNameCharacter}+\\)`,"g");function xYs(t){hsr.lastIndex=0;let e="",r=[],n=0;for(;;){let o=hsr.lastIndex,s=hsr.exec(t),c=t.substring(o,s?.index);if(c.length>0){e+=c;for(let l=0;l{"use strict";f();Object.defineProperty(Jy,"__esModule",{value:!0});Jy.MarkdownString=void 0;Jy.isEmptyMarkdownString=MJn;Jy.isMarkdownString=OJn;Jy.markdownStringEqual=MYs;Jy.escapeMarkdownSyntaxTokens=jot;Jy.appendEscapedMarkdownCodeBlockFence=BJn;Jy.escapeDoubleQuotes=OYs;Jy.removeMarkdownEscapes=BYs;Jy.parseHrefAndDimensions=LYs;Jy.createMarkdownLink=LJn;Jy.createMarkdownCommandLink=FYs;Jy.createCommandUri=FJn;var RYs=es(),PYs=DJn(),kYs=T$(),NYs=Tk(),DYs=C0(),Got=Ru(),Hot=class t{static{a(this,"MarkdownString")}static lift(e){let r=new t(e.value,e);return r.uris=e.uris,r.baseUri=e.baseUri?Got.URI.revive(e.baseUri):void 0,r}constructor(e="",r=!1){if(this.value=e,typeof this.value!="string")throw(0,RYs.illegalArgument)("value");typeof r=="boolean"?(this.isTrusted=r,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=r.isTrusted??void 0,this.supportThemeIcons=r.supportThemeIcons??!1,this.supportHtml=r.supportHtml??!1,this.supportAlertSyntax=r.supportAlertSyntax??!1)}appendText(e,r=0){return this.value+=jot(this.supportThemeIcons?(0,PYs.escapeIcons)(e):e).replace(/([ \t]+)/g,(n,o)=>" ".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,r===1?`\\ +`;return c}a(vsr,"printTable");function pJs(t,e,r,n){t=t.substr(e),r=r.substr(n),console.log(vsr(CU,t,t.length,r,r.length)),console.log(vsr(bxe,t,t.length,r,r.length)),console.log(vsr(RD,t,t.length,r,r.length))}a(pJs,"printTables");function $it(t,e){if(e<0||e>=t.length)return!1;let r=t.codePointAt(e);switch(r){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!xsr.isEmojiImprecise(r)}}a($it,"isSeparatorAtPos");function mXn(t,e){if(e<0||e>=t.length)return!1;switch(t.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}a(mXn,"isWhitespaceAtPos");function Vit(t,e,r){return e[t]!==r[t]}a(Vit,"isUpperCaseAtPos");function wXn(t,e,r,n,o,s,c=!1){for(;evU?vU:t.length,u=n.length>vU?vU:n.length;if(r>=l||s>=u||l-r>u-s||!wXn(e,r,l,o,s,u,!0))return;hJs(l,u,r,s,e,o);let d=1,p=1,h=r,m=s,g=[!1];for(d=1,h=r;hv,k=P?CU[d][p-1]+(RD[d][p-1]>0?-5:0):0,Q=m>v+1&&RD[d][p-1]>0,M=Q?CU[d][p-2]+(RD[d][p-2]>0?-5:0):0;if(Q&&(!P||M>=k)&&(!w||M>=R))CU[d][p]=M,bxe[d][p]=3,RD[d][p]=0;else if(P&&(!w||k>=R))CU[d][p]=k,bxe[d][p]=2,RD[d][p]=0;else if(w)CU[d][p]=R,bxe[d][p]=1,RD[d][p]=RD[d-1][p-1]+1;else throw new Error("not possible")}}if(fJs&&pJs(t,r,n,s),!g[0]&&!c.firstMatchCanBeWeak)return;d--,p--;let A=[CU[d][p],s],y=0,E=0;for(;d>=1;){let v=p;do{let b=bxe[d][v];if(b===3)v=v-2;else if(b===2)v=v-1;else break}while(v>=1);y>1&&e[r+d-1]===o[s+p-1]&&!Vit(v+s-1,n,o)&&y+1>RD[d][v]&&(v=p),v===p?y++:y=1,E||(E=v),d--,p=v-1,A.push(p)}u-s===l&&c.boostFullMatch&&(A[0]+=2);let _=E-l;return A[0]-=_,A}a(Txe,"fuzzyScore");function hJs(t,e,r,n,o,s){let c=t-1,l=e-1;for(;c>=r&&l>=n;)o[c]===s[l]&&(Isr[c]=l,c--),l--}a(hJs,"_fillInMaxWordMatchPos");function mJs(t,e,r,n,o,s,c,l,u,d,p){if(e[r]!==s[c])return Number.MIN_SAFE_INTEGER;let h=1,m=!1;return c===r-n?h=t[r]===o[c]?7:5:Vit(c,o,s)&&(c===0||!Vit(c-1,o,s))?(h=t[r]===o[c]?7:5,m=!0):$it(s,c)&&(c===0||!$it(s,c-1))?h=5:($it(s,c-1)||mXn(s,c-1))&&(h=5,m=!0),h>1&&r===n&&(p[0]=!0),m||(m=Vit(c,o,s)||$it(s,c-1)||mXn(s,c-1)),r===n?c>u&&(h-=m?3:5):d?h+=m?2:0:h+=m?0:1,c+1===l&&(h-=m?3:5),h}a(mJs,"_doScore");function gJs(t,e,r,n,o,s,c){return RXn(t,e,r,n,o,s,!0,c)}a(gJs,"fuzzyScoreGracefulAggressive");function AJs(t,e,r,n,o,s,c){return RXn(t,e,r,n,o,s,!1,c)}a(AJs,"fuzzyScoreGraceful");function RXn(t,e,r,n,o,s,c,l){let u=Txe(t,e,r,n,o,s,l);if(u&&!c)return u;if(t.length>=3){let d=Math.min(7,t.length-1);for(let p=r+1;pu[0])&&(u=m))}}}return u}a(RXn,"fuzzyScoreWithPermutations");function yJs(t,e){if(e+1>=t.length)return;let r=t[e],n=t[e+1];if(r!==n)return t.slice(0,e)+n+r+t.slice(e+2)}a(yJs,"nextTypoPermutation")});var DXn=T(bU=>{"use strict";f();Object.defineProperty(bU,"__esModule",{value:!0});bU.escapeIcons=vJs;bU.markdownEscapeEscapedIcons=TJs;bU.stripIcons=IJs;bU.getCodiconAriaLabel=xJs;bU.parseLabelWithIcons=wJs;bU.matchesFuzzyIconAware=RJs;var kXn=PXn(),EJs=m0(),Osr=jWt(),_Js="$(",Bsr=new RegExp(`\\$\\(${Osr.ThemeIcon.iconNameExpression}(?:${Osr.ThemeIcon.iconModifierExpression})?\\)`,"g"),CJs=new RegExp(`(\\\\)?${Bsr.source}`,"g");function vJs(t){return t.replace(CJs,(e,r)=>r?e:`\\${e}`)}a(vJs,"escapeIcons");var bJs=new RegExp(`\\\\${Bsr.source}`,"g");function TJs(t){return t.replace(bJs,e=>`\\${e}`)}a(TJs,"markdownEscapeEscapedIcons");var SJs=new RegExp(`(\\s)?(\\\\)?${Bsr.source}(\\s)?`,"g");function IJs(t){return t.indexOf(_Js)===-1?t:t.replace(SJs,(e,r,n,o)=>n?e:r||o||"")}a(IJs,"stripIcons");function xJs(t){return t?t.replace(/\$\((.*?)\)/g,(e,r)=>` ${r} `).trim():""}a(xJs,"getCodiconAriaLabel");var Msr=new RegExp(`\\$\\(${Osr.ThemeIcon.iconNameCharacter}+\\)`,"g");function wJs(t){Msr.lastIndex=0;let e="",r=[],n=0;for(;;){let o=Msr.lastIndex,s=Msr.exec(t),c=t.substring(o,s?.index);if(c.length>0){e+=c;for(let l=0;l{"use strict";f();Object.defineProperty(Gy,"__esModule",{value:!0});Gy.MarkdownString=void 0;Gy.isEmptyMarkdownString=NXn;Gy.isMarkdownString=MXn;Gy.markdownStringEqual=OJs;Gy.escapeMarkdownSyntaxTokens=Xit;Gy.appendEscapedMarkdownCodeBlockFence=OXn;Gy.escapeDoubleQuotes=BJs;Gy.removeMarkdownEscapes=LJs;Gy.parseHrefAndDimensions=FJs;Gy.createMarkdownLink=BXn;Gy.createMarkdownCommandLink=UJs;Gy.createCommandUri=LXn;var PJs=Ko(),kJs=DXn(),DJs=kj(),NJs=fk(),MJs=m0(),Kit=Eu(),Jit=class t{static{a(this,"MarkdownString")}static lift(e){let r=new t(e.value,e);return r.uris=e.uris,r.baseUri=e.baseUri?Kit.URI.revive(e.baseUri):void 0,r}constructor(e="",r=!1){if(this.value=e,typeof this.value!="string")throw(0,PJs.illegalArgument)("value");typeof r=="boolean"?(this.isTrusted=r,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=r.isTrusted??void 0,this.supportThemeIcons=r.supportThemeIcons??!1,this.supportHtml=r.supportHtml??!1,this.supportAlertSyntax=r.supportAlertSyntax??!1)}appendText(e,r=0){return this.value+=Xit(this.supportThemeIcons?(0,kJs.escapeIcons)(e):e).replace(/([ \t]+)/g,(n,o)=>" ".repeat(o.length)).replace(/\>/gm,"\\>").replace(/\n/g,r===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,r){return this.value+=` -${BJn(r,e)} -`,this}appendLink(e,r,n){return this.value+="[",this.value+=this._escape(r,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,r){let n=new RegExp((0,DYs.escapeRegExpCharacters)(r),"g");return e.replace(n,(o,s)=>e.charAt(s-1)!=="\\"?`\\${o}`:o)}};Jy.MarkdownString=Hot;function MJn(t){return OJn(t)?!t.value:Array.isArray(t)?t.every(MJn):!0}a(MJn,"isEmptyMarkdownString");function OJn(t){return t instanceof Hot?!0:t&&typeof t=="object"?typeof t.value=="string"&&(typeof t.isTrusted=="boolean"||typeof t.isTrusted=="object"||t.isTrusted===void 0)&&(typeof t.supportThemeIcons=="boolean"||t.supportThemeIcons===void 0)&&(typeof t.supportAlertSyntax=="boolean"||t.supportAlertSyntax===void 0):!1}a(OJn,"isMarkdownString");function MYs(t,e){return t===e?!0:!t||!e?!1:t.value===e.value&&t.isTrusted===e.isTrusted&&t.supportThemeIcons===e.supportThemeIcons&&t.supportHtml===e.supportHtml&&t.supportAlertSyntax===e.supportAlertSyntax&&(t.baseUri===e.baseUri||!!t.baseUri&&!!e.baseUri&&(0,NYs.isEqual)(Got.URI.from(t.baseUri),Got.URI.from(e.baseUri)))}a(MYs,"markdownStringEqual");function jot(t){return t.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}a(jot,"escapeMarkdownSyntaxTokens");function BJn(t,e){let r=t.match(/^`+/gm)?.reduce((o,s)=>o.length>s.length?o:s).length??0,n=r>=3?r+1:3;return[`${"`".repeat(n)}${e}`,t,`${"`".repeat(n)}`].join(` -`)}a(BJn,"appendEscapedMarkdownCodeBlockFence");function OYs(t){return t.replace(/"/g,""")}a(OYs,"escapeDoubleQuotes");function BYs(t){return t&&t.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}a(BYs,"removeMarkdownEscapes");function LYs(t){let e=[],r=t.split("|").map(o=>o.trim());t=r[0];let n=r[1];if(n){let o=/height=(\d+)/.exec(n),s=/width=(\d+)/.exec(n),c=o?o[1]:"",l=s?s[1]:"",u=isFinite(parseInt(l)),d=isFinite(parseInt(c));u&&e.push(`width="${l}"`),d&&e.push(`height="${c}"`)}return{href:t,dimensions:e}}a(LYs,"parseHrefAndDimensions");function LJn(t,e,r,n=!0){return`[${n?jot(t):t}](${e}${r?` "${jot(r)}"`:""})`}a(LJn,"createMarkdownLink");function FYs(t,e=!0){let r=FJn(t.id,...t.arguments||[]).toString();return LJn(t.title,r,t.tooltip,e)}a(FYs,"createMarkdownCommandLink");function FJn(t,...e){return Got.URI.from({scheme:kYs.Schemas.command,path:t,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}a(FJn,"createCommandUri")});var Esr=T(HK=>{"use strict";f();var UYs=HK&&HK.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Asr;Object.defineProperty(HK,"__esModule",{value:!0});HK.MarkdownString=void 0;var QYs=UJn(),qYs=PR(),ysr=Asr=class{static{a(this,"MarkdownString")}#e;static isMarkdownString(e){return e instanceof Asr?!0:!e||typeof e!="object"?!1:e.appendCodeblock&&e.appendMarkdown&&e.appendText&&e.value!==void 0}constructor(e,r=!1){this.#e=new QYs.MarkdownString(e,{supportThemeIcons:r})}get value(){return this.#e.value}set value(e){this.#e.value=e}get isTrusted(){return this.#e.isTrusted}set isTrusted(e){this.#e.isTrusted=e}get supportThemeIcons(){return this.#e.supportThemeIcons}set supportThemeIcons(e){this.#e.supportThemeIcons=e}get supportHtml(){return this.#e.supportHtml}set supportHtml(e){this.#e.supportHtml=e}get supportAlertSyntax(){return this.#e.supportAlertSyntax}set supportAlertSyntax(e){this.#e.supportAlertSyntax=e}get baseUri(){return this.#e.baseUri}set baseUri(e){this.#e.baseUri=e}appendText(e){return this.#e.appendText(e),this}appendMarkdown(e){return this.#e.appendMarkdown(e),this}appendCodeblock(e,r){return this.#e.appendCodeblock(r??"",e),this}};HK.MarkdownString=ysr;HK.MarkdownString=ysr=Asr=UYs([qYs.es5ClassCompat],ysr)});var GJn=T(qB=>{"use strict";f();Object.defineProperty(qB,"__esModule",{value:!0});qB.Mimes=void 0;qB.getMediaOrTextMime=HYs;qB.getMediaMime=qJn;qB.getExtensionForMimeType=jYs;qB.normalizeMimeType=VYs;qB.isTextStreamMime=WYs;var QJn=Im();qB.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"});var GYs={".css":"text/css",".csv":"text/csv",".htm":"text/html",".html":"text/html",".ics":"text/calendar",".js":"text/javascript",".mjs":"text/javascript",".txt":"text/plain",".xml":"text/xml"},Csr={".aac":"audio/x-aac",".avi":"video/x-msvideo",".bmp":"image/bmp",".flv":"video/x-flv",".gif":"image/gif",".ico":"image/x-icon",".jpe":["image/jpg","image/jpeg"],".jpeg":["image/jpg","image/jpeg"],".jpg":["image/jpg","image/jpeg"],".m1v":"video/mpeg",".m2a":"audio/mpeg",".m2v":"video/mpeg",".m3a":"audio/mpeg",".mid":"audio/midi",".midi":"audio/midi",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".mkv":"video/x-matroska",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4a":"audio/mp4",".mp4v":"video/mp4",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".opus":"audio/opus",".ogv":"video/ogg",".png":"image/png",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".spx":"audio/ogg",".svg":"image/svg+xml",".tga":"image/x-tga",".tif":"image/tiff",".tiff":"image/tiff",".wav":"audio/x-wav",".webm":"video/webm",".webp":"image/webp",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".woff":"application/font-woff"};function HYs(t){let e=(0,QJn.extname)(t),r=GYs[e.toLowerCase()];return r!==void 0?r:qJn(t)}a(HYs,"getMediaOrTextMime");function qJn(t){let e=(0,QJn.extname)(t),r=Csr[e.toLowerCase()];return Array.isArray(r)?r[0]:r}a(qJn,"getMediaMime");function jYs(t){for(let e in Csr){let r=Csr[e];if(Array.isArray(r)?r.includes(t):r===t)return e}}a(jYs,"getExtensionForMimeType");var $Ys=/^(.+)\/(.+?)(;.+)?$/;function VYs(t,e){let r=$Ys.exec(t);return r?`${r[1].toLowerCase()}/${r[2].toLowerCase()}${r[3]??""}`:e?void 0:t}a(VYs,"normalizeMimeType");function WYs(t){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(t)}a(WYs,"isTextStreamMime")});var $Jn=T(Bp=>{"use strict";f();var zYs=Bp&&Bp.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},JU;Object.defineProperty(Bp,"__esModule",{value:!0});Bp.NotebookCellOutput=Bp.NotebookCellOutputItem=Bp.NotebookEdit=Bp.NotebookData=Bp.NotebookCellData=Bp.NotebookRange=Bp.NotebookCellKind=void 0;var YYs=PR(),HJn=es(),$ot=GJn(),KYs=Np(),jJn;(function(t){t[t.Markup=1]="Markup",t[t.Code=2]="Code"})(jJn||(Bp.NotebookCellKind=jJn={}));var jK=class t{static{a(this,"NotebookRange")}static isNotebookRange(e){return e instanceof t?!0:e?typeof e.start=="number"&&typeof e.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(e,r){if(e<0)throw(0,HJn.illegalArgument)("start must be positive");if(r<0)throw(0,HJn.illegalArgument)("end must be positive");e<=r?(this._start=e,this._end=r):(this._start=r,this._end=e)}with(e){let r=this._start,n=this._end;return e.start!==void 0&&(r=e.start),e.end!==void 0&&(n=e.end),r===this._start&&n===this._end?this:new t(r,n)}};Bp.NotebookRange=jK;var _sr=class t{static{a(this,"NotebookCellData")}static validate(e){if(typeof e.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof e.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof e.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(e){return Array.isArray(e)&&e.every(r=>t.isNotebookCellData(r))}static isNotebookCellData(e){return!0}constructor(e,r,n,o,s,c,l){this.kind=e,this.value=r,this.languageId=n,this.mime=o,this.outputs=s??[],this.metadata=c,this.executionSummary=l,t.validate(this)}};Bp.NotebookCellData=_sr;var vsr=class{static{a(this,"NotebookData")}constructor(e){this.cells=e}};Bp.NotebookData=vsr;var bsr=JU=class{static{a(this,"NotebookEdit")}static isNotebookCellEdit(e){return e instanceof JU?!0:e?jK.isNotebookRange(e)&&Array.isArray(e.newCells):!1}static replaceCells(e,r){return new JU(e,r)}static insertCells(e,r){return new JU(new jK(e,e),r)}static deleteCells(e){return new JU(e,[])}static updateCellMetadata(e,r){let n=new JU(new jK(e,e),[]);return n.newCellMetadata=r,n}static updateNotebookMetadata(e){let r=new JU(new jK(0,0),[]);return r.newNotebookMetadata=e,r}constructor(e,r){this.range=e,this.newCells=r}};Bp.NotebookEdit=bsr;Bp.NotebookEdit=bsr=JU=zYs([YYs.es5ClassCompat],bsr);var Tsr=class t{static{a(this,"NotebookCellOutputItem")}static isNotebookCellOutputItem(e){return e instanceof t?!0:e?typeof e.mime=="string"&&e.data instanceof Uint8Array:!1}static error(e){let r={name:e.name,message:e.message,stack:e.stack};return t.json(r,"application/vnd.code.notebook.error")}static stdout(e){return t.text(e,"application/vnd.code.notebook.stdout")}static stderr(e){return t.text(e,"application/vnd.code.notebook.stderr")}static bytes(e,r="application/octet-stream"){return new t(e,r)}static#e=new TextEncoder;static text(e,r=$ot.Mimes.text){let n=t.#e.encode(String(e));return new t(n,r)}static json(e,r="text/x-json"){let n=JSON.stringify(e,void 0," ");return t.text(n,r)}constructor(e,r){this.data=e,this.mime=r;let n=(0,$ot.normalizeMimeType)(r,!0);if(!n)throw new Error(`INVALID mime type: ${r}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=n}};Bp.NotebookCellOutputItem=Tsr;var Ssr=class t{static{a(this,"NotebookCellOutput")}static isNotebookCellOutput(e){return e instanceof t?!0:!e||typeof e!="object"?!1:typeof e.id=="string"&&Array.isArray(e.items)}static ensureUniqueMimeTypes(e,r=!1){let n=new Set,o=new Set;for(let s=0;s!o.has(c))}constructor(e,r,n){this.items=t.ensureUniqueMimeTypes(e,!0),typeof r=="string"?(this.id=r,this.metadata=n):(this.id=(0,KYs.generateUuid)(),this.metadata=r??n)}};Bp.NotebookCellOutput=Ssr});var WJn=T(ZU=>{"use strict";f();var JYs=ZU&&ZU.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Isr;Object.defineProperty(ZU,"__esModule",{value:!0});ZU.Selection=void 0;ZU.getDebugDescriptionOfSelection=VJn;var XYs=PR(),XU=nde(),xsr=QB(),wsr=Isr=class extends xsr.Range{static{a(this,"Selection")}static isSelection(e){return e instanceof Isr?!0:!e||typeof e!="object"?!1:xsr.Range.isRange(e)&&XU.Position.isPosition(e.anchor)&&XU.Position.isPosition(e.active)&&typeof e.isReversed=="boolean"}get anchor(){return this._anchor}get active(){return this._active}constructor(e,r,n,o){let s,c;if(typeof e=="number"&&typeof r=="number"&&typeof n=="number"&&typeof o=="number"?(s=new XU.Position(e,r),c=new XU.Position(n,o)):XU.Position.isPosition(e)&&XU.Position.isPosition(r)&&(s=XU.Position.of(e),c=XU.Position.of(r)),!s||!c)throw new Error("Invalid arguments");super(s,c),this._anchor=s,this._active=c}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}[Symbol.for("debug.description")](){return VJn(this)}};ZU.Selection=wsr;ZU.Selection=wsr=Isr=JYs([XYs.es5ClassCompat],wsr);function VJn(t){let e=(0,xsr.getDebugDescriptionOfRange)(t);return t.isEmpty||(t.active.isEqual(t.start)?e=`|${e}`:e=`${e}|`),e}a(VJn,"getDebugDescriptionOfSelection")});var Psr=T(VK=>{"use strict";f();var ZYs=VK&&VK.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},$K;Object.defineProperty(VK,"__esModule",{value:!0});VK.SnippetString=void 0;var eKs=PR(),Rsr=$K=class{static{a(this,"SnippetString")}static isSnippetString(e){return e instanceof $K?!0:!e||typeof e!="object"?!1:typeof e.value=="string"}static _escape(e){return e.replace(/\$|}|\\/g,"\\$&")}constructor(e){this._tabstop=1,this.value=e||""}appendText(e){return this.value+=$K._escape(e),this}appendTabstop(e=this._tabstop++){return this.value+="$",this.value+=e,this}appendPlaceholder(e,r=this._tabstop++){if(typeof e=="function"){let n=new $K;n._tabstop=this._tabstop,e(n),this._tabstop=n._tabstop,e=n.value}else e=$K._escape(e);return this.value+="${",this.value+=r,this.value+=":",this.value+=e,this.value+="}",this}appendChoice(e,r=this._tabstop++){let n=e.map(o=>o.replaceAll(/[|\\,]/g,"\\$&")).join(",");return this.value+="${",this.value+=r,this.value+="|",this.value+=n,this.value+="|}",this}appendVariable(e,r){if(typeof r=="function"){let n=new $K;n._tabstop=this._tabstop,r(n),this._tabstop=n._tabstop,r=n.value}else typeof r=="string"&&(r=r.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=e,r&&(this.value+=":",this.value+=r),this.value+="}",this}};VK.SnippetString=Rsr;VK.SnippetString=Rsr=$K=ZYs([eKs.es5ClassCompat],Rsr)});var Nsr=T(Vot=>{"use strict";f();Object.defineProperty(Vot,"__esModule",{value:!0});Vot.SnippetTextEdit=void 0;var tKs=Psr(),zJn=QB(),ksr=class t{static{a(this,"SnippetTextEdit")}static isSnippetTextEdit(e){return e instanceof t?!0:e?zJn.Range.isRange(e.range)&&tKs.SnippetString.isSnippetString(e.snippet):!1}static replace(e,r){return new t(e,r)}static insert(e,r){return t.replace(new zJn.Range(e,e),r)}constructor(e,r){this.range=e,this.snippet=r}};Vot.SnippetTextEdit=ksr});var JJn=T(kR=>{"use strict";f();var rKs=kR&&kR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Dsr;Object.defineProperty(kR,"__esModule",{value:!0});kR.SymbolInformation=kR.SymbolTag=kR.SymbolKind=void 0;var nKs=PR(),YJn=Yor(),iKs=QB(),Msr;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Msr||(kR.SymbolKind=Msr={}));var KJn;(function(t){t[t.Deprecated=1]="Deprecated"})(KJn||(kR.SymbolTag=KJn={}));var Osr=Dsr=class{static{a(this,"SymbolInformation")}static validate(e){if(!e.name)throw new Error("name must not be falsy")}constructor(e,r,n,o,s){this.name=e,this.kind=r,this.containerName=s,typeof n=="string"&&(this.containerName=n),o instanceof YJn.Location?this.location=o:n instanceof iKs.Range&&(this.location=new YJn.Location(o,n)),Dsr.validate(this)}toJSON(){return{name:this.name,kind:Msr[this.kind],location:this.location,containerName:this.containerName}}};kR.SymbolInformation=Osr;kR.SymbolInformation=Osr=Dsr=rKs([nKs.es5ClassCompat],Osr)});var Fsr=T(GB=>{"use strict";f();var oKs=GB&&GB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},WK;Object.defineProperty(GB,"__esModule",{value:!0});GB.TextEdit=GB.EndOfLine=void 0;var Bsr=es(),sKs=PR(),XJn=nde(),Wot=QB(),ZJn;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(ZJn||(GB.EndOfLine=ZJn={}));var Lsr=WK=class{static{a(this,"TextEdit")}static isTextEdit(e){return e instanceof WK?!0:!e||typeof e!="object"?!1:Wot.Range.isRange(e)&&typeof e.newText=="string"}static replace(e,r){return new WK(e,r)}static insert(e,r){return WK.replace(new Wot.Range(e,e),r)}static delete(e){return WK.replace(e,"")}static setEndOfLine(e){let r=new WK(new Wot.Range(new XJn.Position(0,0),new XJn.Position(0,0)),"");return r.newEol=e,r}get range(){return this._range}set range(e){if(e&&!Wot.Range.isRange(e))throw(0,Bsr.illegalArgument)("range");this._range=e}get newText(){return this._newText||""}set newText(e){if(e&&typeof e!="string")throw(0,Bsr.illegalArgument)("newText");this._newText=e}get newEol(){return this._newEol}set newEol(e){if(e&&typeof e!="number")throw(0,Bsr.illegalArgument)("newEol");this._newEol=e}constructor(e,r){this._range=e,this._newText=r}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};GB.TextEdit=Lsr;GB.TextEdit=Lsr=WK=oKs([sKs.es5ClassCompat],Lsr)});var uXn=T(bt=>{"use strict";f();Object.defineProperty(bt,"__esModule",{value:!0});bt.LanguageModelToolMCPSource=bt.LanguageModelToolExtensionSource=bt.ChatResponseClearToPreviousToolInvocationReason=bt.ChatRequestEditedFileEventKind=bt.ChatErrorLevel=bt.AISearchKeyword=bt.TextSearchMatch2=bt.ExcludeSettingOptions=bt.LanguageModelPromptTsxPart=bt.ChatImageMimeType=bt.LanguageModelDataPart2=bt.LanguageModelDataPart=bt.LanguageModelThinkingPart=bt.LanguageModelTextPart2=bt.LanguageModelPartAudience=bt.LanguageModelTextPart=bt.LanguageModelToolResult2=bt.LanguageModelToolResult=bt.ChatReferenceBinaryData=bt.ChatReferenceDiagnostic=bt.ChatRequestNotebookData=bt.ChatRequestEditorData=bt.ChatResponseTurn=bt.ChatRequestTurn2=bt.ChatRequestTurn=bt.ChatResponseQuestionCarouselPart=bt.ChatQuestion=bt.ChatQuestionType=bt.ChatResponseConfirmationPart=bt.ChatResponseWorkspaceEditPart=bt.ChatResponseNotebookEditPart=bt.ChatResponseTextEditPart=bt.ChatResponseMarkdownWithVulnerabilitiesPart=bt.ChatResponseCommandButtonPart=bt.ChatResponseCodeCitationPart=bt.ChatResponsePullRequestPart=bt.ChatResponseExtensionsPart=bt.ChatResponseMovePart=bt.ChatResponseReferencePart2=bt.ChatResponseReferencePart=bt.ChatResponseWarningPart=bt.ChatResponseProgressPart2=bt.ChatResponseExternalEditPart=bt.ChatResponseHookPart=bt.ChatResponseThinkingProgressPart=bt.ChatResponseProgressPart=bt.ChatResponseAnchorPart=bt.ChatResponseFileTreePart=bt.ChatResponseCodeblockUriPart=bt.ChatResponseMarkdownPart=void 0;bt.McpHttpServerDefinition=bt.McpStdioServerDefinition=bt.ChatResource=bt.LanguageModelError=bt.ChatSessionStatus=bt.ChatResponseTurn2=bt.ChatSubagentToolInvocationData=bt.ChatToolInvocationPart=bt.McpToolInvocationContentData=bt.LanguageModelChatMessage=bt.LanguageModelChatToolMode=bt.LanguageModelChatMessageRole=bt.LanguageModelToolResultPart2=bt.LanguageModelToolResultPart=bt.LanguageModelToolCallPart=void 0;var eXn=BU(),Uar=Esr(),Usr=class{static{a(this,"ChatResponseMarkdownPart")}constructor(e){this.value=typeof e=="string"?new Uar.MarkdownString(e):e}};bt.ChatResponseMarkdownPart=Usr;var Qsr=class{static{a(this,"ChatResponseCodeblockUriPart")}constructor(e,r,n){this.value=e,this.undoStopId=n}};bt.ChatResponseCodeblockUriPart=Qsr;var qsr=class{static{a(this,"ChatResponseFileTreePart")}constructor(e,r){this.value=e,this.baseUri=r}};bt.ChatResponseFileTreePart=qsr;var Gsr=class{static{a(this,"ChatResponseAnchorPart")}constructor(e,r){this.value=e,this.title=r}};bt.ChatResponseAnchorPart=Gsr;var Hsr=class{static{a(this,"ChatResponseProgressPart")}constructor(e){this.value=e}};bt.ChatResponseProgressPart=Hsr;var jsr=class{static{a(this,"ChatResponseThinkingProgressPart")}constructor(e,r,n){this.value=e,this.id=r,this.metadata=n}};bt.ChatResponseThinkingProgressPart=jsr;var $sr=class{static{a(this,"ChatResponseHookPart")}constructor(e,r,n,o){this.hookType=e,this.stopReason=r,this.systemMessage=n,this.metadata=o}};bt.ChatResponseHookPart=$sr;var Vsr=class{static{a(this,"ChatResponseExternalEditPart")}constructor(e,r){this.uris=e,this.callback=r,this.applied=new Promise(n=>{this.didGetApplied=n})}};bt.ChatResponseExternalEditPart=Vsr;var Wsr=class{static{a(this,"ChatResponseProgressPart2")}constructor(e,r){this.value=e,this.task=r}};bt.ChatResponseProgressPart2=Wsr;var zsr=class{static{a(this,"ChatResponseWarningPart")}constructor(e){this.value=typeof e=="string"?new Uar.MarkdownString(e):e}};bt.ChatResponseWarningPart=zsr;var Ysr=class{static{a(this,"ChatResponseReferencePart")}constructor(e){this.value=e}};bt.ChatResponseReferencePart=Ysr;var Ksr=class{static{a(this,"ChatResponseReferencePart2")}constructor(e,r,n){this.value=e,this.iconPath=r,this.options=n}};bt.ChatResponseReferencePart2=Ksr;var Jsr=class{static{a(this,"ChatResponseMovePart")}constructor(e,r){this.uri=e,this.range=r}};bt.ChatResponseMovePart=Jsr;var Xsr=class{static{a(this,"ChatResponseExtensionsPart")}constructor(e){this.extensions=e}};bt.ChatResponseExtensionsPart=Xsr;var Zsr=class{static{a(this,"ChatResponsePullRequestPart")}constructor(e,r,n,o,s){"command"in e&&typeof e.command=="string"?this.command=e:(this.uri=e,this.command={title:"View Pull Request",command:"vscode.open",arguments:[e]}),this.title=r,this.description=n,this.author=o,this.linkTag=s}};bt.ChatResponsePullRequestPart=Zsr;var ear=class{static{a(this,"ChatResponseCodeCitationPart")}constructor(e,r,n){this.value=e,this.license=r,this.snippet=n}};bt.ChatResponseCodeCitationPart=ear;var tar=class{static{a(this,"ChatResponseCommandButtonPart")}constructor(e){this.value=e}};bt.ChatResponseCommandButtonPart=tar;var rar=class{static{a(this,"ChatResponseMarkdownWithVulnerabilitiesPart")}constructor(e,r){this.value=typeof e=="string"?new Uar.MarkdownString(e):e,this.vulnerabilities=r}};bt.ChatResponseMarkdownWithVulnerabilitiesPart=rar;var nar=class{static{a(this,"ChatResponseTextEditPart")}constructor(e,r){this.uri=e,r===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(r)?r:[r]}};bt.ChatResponseTextEditPart=nar;var iar=class{static{a(this,"ChatResponseNotebookEditPart")}constructor(e,r){this.uri=e,r===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(r)?r:[r]}};bt.ChatResponseNotebookEditPart=iar;var oar=class{static{a(this,"ChatResponseWorkspaceEditPart")}constructor(e){this.edits=e}};bt.ChatResponseWorkspaceEditPart=oar;var sar=class{static{a(this,"ChatResponseConfirmationPart")}constructor(e,r,n,o){this.title=e,this.message=r,this.data=n,this.buttons=o}};bt.ChatResponseConfirmationPart=sar;var tXn;(function(t){t[t.Text=1]="Text",t[t.SingleSelect=2]="SingleSelect",t[t.MultiSelect=3]="MultiSelect"})(tXn||(bt.ChatQuestionType=tXn={}));var aar=class{static{a(this,"ChatQuestion")}constructor(e,r,n,o){this.id=e,this.type=r,this.title=n,o&&(this.message=o.message,this.options=o.options,this.defaultValue=o.defaultValue,this.allowFreeformInput=o.allowFreeformInput)}};bt.ChatQuestion=aar;var car=class{static{a(this,"ChatResponseQuestionCarouselPart")}constructor(e,r){this.questions=e,this.allowSkip=r??!1}};bt.ChatResponseQuestionCarouselPart=car;var lar=class{static{a(this,"ChatRequestTurn")}constructor(e,r,n,o,s){this.prompt=e,this.command=r,this.references=n,this.participant=o,this.toolReferences=s}};bt.ChatRequestTurn=lar;var uar=class{static{a(this,"ChatRequestTurn2")}constructor(e,r,n,o,s,c,l,u,d){this.prompt=e,this.command=r,this.references=n,this.participant=o,this.toolReferences=s,this.editedFileEvents=c,this.id=l,this.modelId=u,this.modeInstructions2=d}};bt.ChatRequestTurn2=uar;var dar=class{static{a(this,"ChatResponseTurn")}constructor(e,r,n,o){this.response=e,this.result=r,this.participant=n,this.command=o}};bt.ChatResponseTurn=dar;var far=class{static{a(this,"ChatRequestEditorData")}constructor(e,r,n,o){this.editor=e,this.document=r,this.selection=n,this.wholeRange=o}};bt.ChatRequestEditorData=far;var par=class{static{a(this,"ChatRequestNotebookData")}constructor(e){this.cell=e}};bt.ChatRequestNotebookData=par;var har=class{static{a(this,"ChatReferenceDiagnostic")}constructor(e){this.diagnostics=e}};bt.ChatReferenceDiagnostic=har;var mar=class{static{a(this,"ChatReferenceBinaryData")}constructor(e,r){this.mimeType=e,this.data=r}};bt.ChatReferenceBinaryData=mar;var gar=class{static{a(this,"LanguageModelToolResult")}constructor(e){this.content=e}};bt.LanguageModelToolResult=gar;var Aar=class{static{a(this,"LanguageModelToolResult2")}constructor(e){this.content=e}};bt.LanguageModelToolResult2=Aar;var zot=class{static{a(this,"LanguageModelTextPart")}constructor(e){this.value=e}};bt.LanguageModelTextPart=zot;var rXn;(function(t){t[t.Assistant=0]="Assistant",t[t.User=1]="User",t[t.Extension=2]="Extension"})(rXn||(bt.LanguageModelPartAudience=rXn={}));var yar=class extends zot{static{a(this,"LanguageModelTextPart2")}constructor(e,r){super(e),this.audience=r}};bt.LanguageModelTextPart2=yar;var Ear=class{static{a(this,"LanguageModelThinkingPart")}constructor(e,r,n){this.value=e,this.id=r,this.metadata=n}};bt.LanguageModelThinkingPart=Ear;var Yot=class t{static{a(this,"LanguageModelDataPart")}constructor(e,r){this.mimeType=r,this.data=e}static image(e,r){return new t(e,r)}static json(e){let r=JSON.stringify(e,void 0," ");return new t(eXn.VSBuffer.fromString(r).buffer,"json")}static text(e){return new t(eXn.VSBuffer.fromString(e).buffer,"text/plain")}};bt.LanguageModelDataPart=Yot;var Car=class extends Yot{static{a(this,"LanguageModelDataPart2")}constructor(e,r,n){super(e,r),this.audience=n}};bt.LanguageModelDataPart2=Car;var nXn;(function(t){t.PNG="image/png",t.JPEG="image/jpeg",t.GIF="image/gif",t.WEBP="image/webp",t.BMP="image/bmp"})(nXn||(bt.ChatImageMimeType=nXn={}));var _ar=class{static{a(this,"LanguageModelPromptTsxPart")}constructor(e){this.value=e}};bt.LanguageModelPromptTsxPart=_ar;var iXn;(function(t){t[t.None=1]="None",t[t.FilesExclude=2]="FilesExclude",t[t.SearchAndFilesExclude=3]="SearchAndFilesExclude"})(iXn||(bt.ExcludeSettingOptions=iXn={}));var bar=class{static{a(this,"TextSearchMatch2")}constructor(e,r,n){this.uri=e,this.ranges=r,this.previewText=n}};bt.TextSearchMatch2=bar;var Tar=class{static{a(this,"AISearchKeyword")}constructor(e){this.keyword=e}};bt.AISearchKeyword=Tar;var oXn;(function(t){t[t.Info=0]="Info",t[t.Warning=1]="Warning",t[t.Error=2]="Error"})(oXn||(bt.ChatErrorLevel=oXn={}));var sXn;(function(t){t[t.Keep=1]="Keep",t[t.Undo=2]="Undo",t[t.UserModification=3]="UserModification"})(sXn||(bt.ChatRequestEditedFileEventKind=sXn={}));var aXn;(function(t){t[t.NoReason=0]="NoReason",t[t.FilteredContentRetry=1]="FilteredContentRetry",t[t.CopyrightContentRetry=2]="CopyrightContentRetry"})(aXn||(bt.ChatResponseClearToPreviousToolInvocationReason=aXn={}));var Sar=class{static{a(this,"LanguageModelToolExtensionSource")}constructor(e,r){this.id=e,this.label=r}};bt.LanguageModelToolExtensionSource=Sar;var Iar=class{static{a(this,"LanguageModelToolMCPSource")}constructor(e,r,n){this.label=e,this.name=r,this.instructions=n}};bt.LanguageModelToolMCPSource=Iar;var xar=class{static{a(this,"LanguageModelToolCallPart")}constructor(e,r,n){this.callId=e,this.name=r,this.input=n}};bt.LanguageModelToolCallPart=xar;var war=class{static{a(this,"LanguageModelToolResultPart")}constructor(e,r,n){this.callId=e,this.content=r,this.isError=n??!1}};bt.LanguageModelToolResultPart=war;var Rar=class{static{a(this,"LanguageModelToolResultPart2")}constructor(e,r,n){this.callId=e,this.content=r,this.isError=n??!1}};bt.LanguageModelToolResultPart2=Rar;var Kot;(function(t){t[t.User=1]="User",t[t.Assistant=2]="Assistant",t[t.System=3]="System"})(Kot||(bt.LanguageModelChatMessageRole=Kot={}));var cXn;(function(t){t[t.Auto=1]="Auto",t[t.Required=2]="Required"})(cXn||(bt.LanguageModelChatToolMode=cXn={}));var Par=class t{static{a(this,"LanguageModelChatMessage")}constructor(e,r,n){this.role=e,this.content=typeof r=="string"?[{type:"text",value:r}]:r,this.name=n}static User(e,r){return new t(Kot.User,e,r)}static Assistant(e,r){return new t(Kot.Assistant,e,r)}};bt.LanguageModelChatMessage=Par;var kar=class{static{a(this,"McpToolInvocationContentData")}constructor(e,r){this.data=e,this.mimeType=r}};bt.McpToolInvocationContentData=kar;var Nar=class{static{a(this,"ChatToolInvocationPart")}constructor(e,r,n){this.toolName=e,this.toolCallId=r,this.isError=typeof n=="string"?!0:n}};bt.ChatToolInvocationPart=Nar;var Dar=class{static{a(this,"ChatSubagentToolInvocationData")}constructor(e,r,n,o){this.description=e,this.agentName=r,this.prompt=n,this.result=o}};bt.ChatSubagentToolInvocationData=Dar;var Mar=class{static{a(this,"ChatResponseTurn2")}constructor(e,r,n,o){this.response=e,this.result=r,this.participant=n,this.command=o}};bt.ChatResponseTurn2=Mar;var lXn;(function(t){t[t.Failed=0]="Failed",t[t.Completed=1]="Completed",t[t.InProgress=2]="InProgress",t[t.NeedsInput=3]="NeedsInput"})(lXn||(bt.ChatSessionStatus=lXn={}));var Oar=class t extends Error{static{a(this,"LanguageModelError")}static#e="LanguageModelError";static NotFound(e){return new t(e,t.NotFound.name)}static NoPermissions(e){return new t(e,t.NoPermissions.name)}static Blocked(e){return new t(e,t.Blocked.name)}constructor(e,r,n){super(e,{cause:n}),this.name=t.#e,this.code=r??""}};bt.LanguageModelError=Oar;var Bar=class{static{a(this,"ChatResource")}constructor(e){this.uri=e}};bt.ChatResource=Bar;var Lar=class{static{a(this,"McpStdioServerDefinition")}constructor(e,r,n,o,s){this.label=e,this.command=r,this.args=n??[],this.env=o??{},this.version=s}};bt.McpStdioServerDefinition=Lar;var Far=class{static{a(this,"McpHttpServerDefinition")}constructor(e,r,n,o){this.label=e,this.uri=r,this.headers=n??{},this.version=o}};bt.McpHttpServerDefinition=Far});var pXn=T(eQ=>{"use strict";f();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.TextDocumentChangeReason=eQ.TextEditorSelectionChangeKind=eQ.WorkspaceEdit=void 0;var aKs=jc(),cKs=iw(),lKs=QB(),uKs=Nsr(),dKs=Fsr(),Qar=class{static{a(this,"WorkspaceEdit")}constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(e,r,n,o){this._edits.push({_type:1,from:e,to:r,options:n,metadata:o})}createFile(e,r,n){this._edits.push({_type:1,from:void 0,to:e,options:r,metadata:n})}deleteFile(e,r,n){this._edits.push({_type:1,from:e,to:void 0,options:r,metadata:n})}replace(e,r,n,o){this._edits.push({_type:2,uri:e,edit:new dKs.TextEdit(r,n),metadata:o})}insert(e,r,n,o){this.replace(e,new lKs.Range(r,r),n,o)}delete(e,r,n){this.replace(e,r,"",n)}has(e){return this._edits.some(r=>r._type===2&&r.uri.toString()===e.toString())}set(e,r){if(r)for(let n of r){if(!n)continue;let o,s;Array.isArray(n)?(o=n[0],s=n[1]):o=n,uKs.SnippetTextEdit.isSnippetTextEdit(o)?this._edits.push({_type:6,uri:e,range:o.range,edit:o.snippet,metadata:s}):this._edits.push({_type:2,uri:e,edit:o,metadata:s})}else{for(let n=0;n{"use strict";f();Object.defineProperty(rf,"__esModule",{value:!0});rf.FileType=rf.ChatSessionStatus=rf.ChatLocation=rf.ChatVariableLevel=rf.ExtensionMode=rf.DiagnosticSeverity=rf.TextEditorRevealType=rf.TextEditorLineNumbersStyle=rf.TextEditorCursorStyle=rf.InteractiveEditorResponseFeedbackKind=void 0;var hXn;(function(t){t[t.Unhelpful=0]="Unhelpful",t[t.Helpful=1]="Helpful",t[t.Undone=2]="Undone",t[t.Accepted=3]="Accepted",t[t.Bug=4]="Bug"})(hXn||(rf.InteractiveEditorResponseFeedbackKind=hXn={}));var mXn;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(mXn||(rf.TextEditorCursorStyle=mXn={}));var gXn;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval"})(gXn||(rf.TextEditorLineNumbersStyle=gXn={}));var AXn;(function(t){t[t.Default=0]="Default",t[t.InCenter=1]="InCenter",t[t.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",t[t.AtTop=3]="AtTop"})(AXn||(rf.TextEditorRevealType=AXn={}));var yXn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Information=2]="Information",t[t.Hint=3]="Hint"})(yXn||(rf.DiagnosticSeverity=yXn={}));var EXn;(function(t){t[t.Production=1]="Production",t[t.Development=2]="Development",t[t.Test=3]="Test"})(EXn||(rf.ExtensionMode=EXn={}));var CXn;(function(t){t[t.Short=1]="Short",t[t.Medium=2]="Medium",t[t.Full=3]="Full"})(CXn||(rf.ChatVariableLevel=CXn={}));var _Xn;(function(t){t[t.Panel=1]="Panel",t[t.Terminal=2]="Terminal",t[t.Notebook=3]="Notebook",t[t.Editor=4]="Editor"})(_Xn||(rf.ChatLocation=_Xn={}));var vXn;(function(t){t[t.Failed=0]="Failed",t[t.Completed=1]="Completed",t[t.InProgress=2]="InProgress"})(vXn||(rf.ChatSessionStatus=vXn={}));var bXn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(bXn||(rf.FileType=bXn={}))});var IXn=T(qar=>{"use strict";f();Object.defineProperty(qar,"__esModule",{value:!0});qar.t=fKs;function fKs(...t){if(typeof t[0]=="string"){let e=t.shift(),r=!t||typeof t[0]!="object"?t:t[0];return SXn({message:e,args:r})}return SXn(t[0])}a(fKs,"t");function SXn(t){let{message:e,args:r}=t;return hKs(e,r??{})}a(SXn,"getMessage");var pKs=/{([^}]+)}/g;function hKs(t,e){return t.replace(pKs,(r,n)=>e[n]??r)}a(hKs,"format2")});var RXn=T(tQ=>{"use strict";f();Object.defineProperty(tQ,"__esModule",{value:!0});tQ.NewSymbolName=tQ.NewSymbolNameTriggerKind=tQ.NewSymbolNameTag=void 0;var xXn;(function(t){t[t.AIGenerated=1]="AIGenerated"})(xXn||(tQ.NewSymbolNameTag=xXn={}));var wXn;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(wXn||(tQ.NewSymbolNameTriggerKind=wXn={}));var Gar=class{static{a(this,"NewSymbolName")}constructor(e,r){this.newSymbolName=e,this.tags=r}};tQ.NewSymbolName=Gar});var kXn=T(Jot=>{"use strict";f();Object.defineProperty(Jot,"__esModule",{value:!0});Jot.TerminalShellExecutionCommandLineConfidence=void 0;var PXn;(function(t){t[t.Low=0]="Low",t[t.Medium=1]="Medium",t[t.High=2]="High"})(PXn||(Jot.TerminalShellExecutionCommandLineConfidence=PXn={}))});var NXn=T(ode=>{"use strict";f();Object.defineProperty(ode,"__esModule",{value:!0});ode.ThemeColor=ode.ThemeIcon=void 0;var Har=class t{static{a(this,"ThemeIcon")}constructor(e,r){this.id=e,this.color=r}static isThemeIcon(e){return!(e instanceof t)}};ode.ThemeIcon=Har;var jar=class{static{a(this,"ThemeColor")}constructor(e){this.id=e}};ode.ThemeColor=jar});var Lp=T((qHd,BXn)=>{"use strict";f();var mKs=_O(),gKs=nc(),AKs=Ru(),DXn=cJn(),yKs=Yor(),EKs=Esr(),Rwe=$Jn(),CKs=nde(),_Ks=QB(),vKs=WJn(),bKs=Psr(),TKs=Nsr(),MXn=JJn(),OXn=Fsr(),mn=uXn(),$ar=pXn(),rQ=TXn(),SKs=IXn(),Var=RXn(),IKs=kXn(),xKs=NXn(),wKs={Position:CKs.Position,Range:_Ks.Range,Selection:vKs.Selection,EventEmitter:gKs.Emitter,CancellationTokenSource:mKs.CancellationTokenSource,Diagnostic:DXn.Diagnostic,Location:yKs.Location,DiagnosticRelatedInformation:DXn.DiagnosticRelatedInformation,TextEdit:OXn.TextEdit,WorkspaceEdit:$ar.WorkspaceEdit,Uri:AKs.URI,MarkdownString:EKs.MarkdownString,DiagnosticSeverity:rQ.DiagnosticSeverity,TextEditorCursorStyle:rQ.TextEditorCursorStyle,TextEditorLineNumbersStyle:rQ.TextEditorLineNumbersStyle,TextEditorRevealType:rQ.TextEditorRevealType,EndOfLine:OXn.EndOfLine,l10n:{t:SKs.t},ExtensionMode:rQ.ExtensionMode,ChatVariableLevel:rQ.ChatVariableLevel,ChatResponseClearToPreviousToolInvocationReason:mn.ChatResponseClearToPreviousToolInvocationReason,ChatResponseMarkdownPart:mn.ChatResponseMarkdownPart,ChatResponseFileTreePart:mn.ChatResponseFileTreePart,ChatResponseAnchorPart:mn.ChatResponseAnchorPart,ChatResponseMovePart:mn.ChatResponseMovePart,ChatResponseExtensionsPart:mn.ChatResponseExtensionsPart,ChatResponseProgressPart:mn.ChatResponseProgressPart,ChatResponseProgressPart2:mn.ChatResponseProgressPart2,ChatResponseWarningPart:mn.ChatResponseWarningPart,ChatResponseHookPart:mn.ChatResponseHookPart,ChatResponseReferencePart:mn.ChatResponseReferencePart,ChatResponseReferencePart2:mn.ChatResponseReferencePart2,ChatResponseCodeCitationPart:mn.ChatResponseCodeCitationPart,ChatResponseCommandButtonPart:mn.ChatResponseCommandButtonPart,ChatResponseExternalEditPart:mn.ChatResponseExternalEditPart,ChatResponseMarkdownWithVulnerabilitiesPart:mn.ChatResponseMarkdownWithVulnerabilitiesPart,ChatResponseCodeblockUriPart:mn.ChatResponseCodeblockUriPart,ChatResponseTextEditPart:mn.ChatResponseTextEditPart,ChatResponseNotebookEditPart:mn.ChatResponseNotebookEditPart,ChatResponseWorkspaceEditPart:mn.ChatResponseWorkspaceEditPart,ChatResponseConfirmationPart:mn.ChatResponseConfirmationPart,ChatQuestion:mn.ChatQuestion,ChatQuestionType:mn.ChatQuestionType,ChatResponseQuestionCarouselPart:mn.ChatResponseQuestionCarouselPart,ChatRequestTurn:mn.ChatRequestTurn,ChatResponseTurn:mn.ChatResponseTurn,ChatRequestEditorData:mn.ChatRequestEditorData,ChatRequestNotebookData:mn.ChatRequestNotebookData,NewSymbolName:Var.NewSymbolName,NewSymbolNameTag:Var.NewSymbolNameTag,NewSymbolNameTriggerKind:Var.NewSymbolNameTriggerKind,ChatLocation:rQ.ChatLocation,SymbolInformation:MXn.SymbolInformation,LanguageModelToolResult:mn.LanguageModelToolResult,ExtendedLanguageModelToolResult:mn.LanguageModelToolResult,LanguageModelToolResult2:mn.LanguageModelToolResult2,LanguageModelPromptTsxPart:mn.LanguageModelPromptTsxPart,LanguageModelTextPart:mn.LanguageModelTextPart,LanguageModelDataPart:mn.LanguageModelDataPart,LanguageModelToolExtensionSource:mn.LanguageModelToolExtensionSource,LanguageModelToolMCPSource:mn.LanguageModelToolMCPSource,ChatReferenceBinaryData:mn.ChatReferenceBinaryData,ChatReferenceDiagnostic:mn.ChatReferenceDiagnostic,TextSearchMatch2:mn.TextSearchMatch2,AISearchKeyword:mn.AISearchKeyword,ExcludeSettingOptions:mn.ExcludeSettingOptions,NotebookCellKind:Rwe.NotebookCellKind,NotebookRange:Rwe.NotebookRange,NotebookEdit:Rwe.NotebookEdit,NotebookCellData:Rwe.NotebookCellData,NotebookData:Rwe.NotebookData,ChatErrorLevel:mn.ChatErrorLevel,TerminalShellExecutionCommandLineConfidence:IKs.TerminalShellExecutionCommandLineConfidence,ChatRequestEditedFileEventKind:mn.ChatRequestEditedFileEventKind,ChatResponsePullRequestPart:mn.ChatResponsePullRequestPart,LanguageModelTextPart2:mn.LanguageModelTextPart2,LanguageModelDataPart2:mn.LanguageModelDataPart2,LanguageModelThinkingPart:mn.LanguageModelThinkingPart,LanguageModelPartAudience:mn.LanguageModelPartAudience,ChatResponseThinkingProgressPart:mn.ChatResponseThinkingProgressPart,LanguageModelToolCallPart:mn.LanguageModelToolCallPart,LanguageModelToolResultPart:mn.LanguageModelToolResultPart,LanguageModelToolResultPart2:mn.LanguageModelToolResultPart2,LanguageModelChatMessageRole:mn.LanguageModelChatMessageRole,LanguageModelChatMessage:mn.LanguageModelChatMessage,LanguageModelChatToolMode:mn.LanguageModelChatToolMode,TextEditorSelectionChangeKind:$ar.TextEditorSelectionChangeKind,TextDocumentChangeReason:$ar.TextDocumentChangeReason,ChatToolInvocationPart:mn.ChatToolInvocationPart,ChatSubagentToolInvocationData:mn.ChatSubagentToolInvocationData,McpToolInvocationContentData:mn.McpToolInvocationContentData,ChatResponseTurn2:mn.ChatResponseTurn2,ChatRequestTurn2:mn.ChatRequestTurn2,LanguageModelError:mn.LanguageModelError,SymbolKind:MXn.SymbolKind,SnippetString:bKs.SnippetString,SnippetTextEdit:TKs.SnippetTextEdit,FileType:rQ.FileType,ChatSessionStatus:mn.ChatSessionStatus,authentication:{getSession:a(async()=>{throw new Error("authentication.getSession not mocked in test")},"getSession")},McpHttpServerDefinition:mn.McpHttpServerDefinition,McpStdioServerDefinition:mn.McpStdioServerDefinition,ThemeIcon:xKs.ThemeIcon};BXn.exports=wKs});var LXn=T(sde=>{"use strict";f();Object.defineProperty(sde,"__esModule",{value:!0});sde.UseData=sde.UseState=void 0;var War=class{static{a(this,"UseState")}constructor(e){this.states=e,this.currentIndex=0,this.stateChanged=!1}useState(e){let r=this.currentIndex;if(this.states[r]===void 0){let o=typeof e=="function"?e():e;this.states[r]=o}let n=a(o=>{let s=typeof o=="function"?o(this.states[r]):o;this.states[r]=s,this.stateChanged=!0},"setState");return this.currentIndex++,[this.states[r],n]}hasChanged(){return this.stateChanged}};sde.UseState=War;var zar=class{static{a(this,"UseData")}constructor(e){this.measureUpdateTime=e,this.consumers=[]}useData(e,r){this.consumers.push(n=>{if(e(n))return r(n)})}async updateData(e){if(this.consumers.length>0){let r=performance.now();for(let n of this.consumers)await n(e);this.measureUpdateTime(performance.now()-r)}}};sde.UseData=zar});var UXn=T(Xot=>{"use strict";f();Object.defineProperty(Xot,"__esModule",{value:!0});Xot.VirtualPromptReconciler=void 0;var FXn=LXn(),Yar=class{static{a(this,"VirtualPromptReconciler")}constructor(e){this.lifecycleData=new Map,this.vTree=this.virtualizeElement(e,"$",0)}reconcile(e){if(!this.vTree)throw new Error("No tree to reconcile, make sure to pass a valid prompt");return e?.isCancellationRequested?this.vTree:(this.vTree=this.reconcileNode(this.vTree,"$",0,e),this.vTree)}reconcileNode(e,r,n,o){if(!e.children&&!e.lifecycle)return e;let s=e;if(e.lifecycle?.isRemountRequired()){let l=this.collectChildPaths(e);s=this.virtualizeElement(e.component,r,n);let u=this.collectChildPaths(s);this.cleanupState(l,u)}else if(e.children){let l=[];for(let u=0;u"u")){if(typeof e=="string"||typeof e=="number")return{name:typeof e,path:`${r}[${n}]`,props:{value:e},component:e};if(RKs(e.type)){let o=e.type(e.props.children),s=r!=="$"?`[${n}]`:"",c=`${r}${s}.${o.type}`,l=o.children.map((u,d)=>this.virtualizeElement(u,c,d));return this.ensureUniqueKeys(l),{name:o.type,path:c,children:l.flat().filter(u=>u!==void 0),component:e}}return this.virtualizeFunctionComponent(r,n,e,e.type)}}virtualizeFunctionComponent(e,r,n,o){let s=n.props.key?`["${n.props.key}"]`:`[${r}]`,c=`${e}${s}.${o.name}`,l=new Jar(this.getOrCreateLifecycleData(c)),u=o(n.props,l),h=(Array.isArray(u)?u:[u]).map((m,g)=>this.virtualizeElement(m,c,g)).flat().filter(m=>m!==void 0);return this.ensureUniqueKeys(h),{name:o.name,path:c,props:n.props,children:h,component:n,lifecycle:l}}ensureUniqueKeys(e){let r=new Map;for(let o of e){if(!o)continue;let s=o.props?.key;s&&r.set(s,(r.get(s)||0)+1)}let n=Array.from(r.entries()).filter(([o,s])=>s>1).map(([o])=>o);if(n.length>0)throw new Error(`Duplicate keys found: ${n.join(", ")}`)}collectChildPaths(e){let r=[];if(e?.children)for(let n of e.children)n&&(r.push(n.path),r.push(...this.collectChildPaths(n)));return r}cleanupState(e,r){for(let n of e)r.includes(n)||this.lifecycleData.delete(n)}getOrCreateLifecycleData(e){return this.lifecycleData.has(e)||this.lifecycleData.set(e,new Kar([])),this.lifecycleData.get(e)}createPipe(){return{pump:a(async e=>{await this.pumpData(e)},"pump")}}async pumpData(e){if(!this.vTree)throw new Error("No tree to pump data into. Pumping data before initializing?");await this.recursivelyPumpData(e,this.vTree)}async recursivelyPumpData(e,r){if(!r)throw new Error("Can't pump data into undefined node.");await r.lifecycle?.dataHook.updateData(e);for(let n of r.children||[])await this.recursivelyPumpData(e,n)}};Xot.VirtualPromptReconciler=Yar;var Kar=class{static{a(this,"PromptElementLifecycleData")}constructor(e){this.state=e,this._updateTimeMs=0}getUpdateTimeMsAndReset(){let e=this._updateTimeMs;return this._updateTimeMs=0,e}},Jar=class{static{a(this,"PromptElementLifecycle")}constructor(e){this.lifecycleData=e,this.stateHook=new FXn.UseState(e.state),this.dataHook=new FXn.UseData(r=>{e._updateTimeMs=r})}useState(e){return this.stateHook.useState(e)}useData(e,r){this.dataHook.useData(e,r)}isRemountRequired(){return this.stateHook.hasChanged()}};function RKs(t){return typeof t=="function"&&"isFragmentFunction"in t}a(RKs,"isFragmentFunction")});var QXn=T(Zot=>{"use strict";f();Object.defineProperty(Zot,"__esModule",{value:!0});Zot.VirtualPrompt=void 0;var PKs=UXn(),Xar=class{static{a(this,"VirtualPrompt")}constructor(e){this.reconciler=new PKs.VirtualPromptReconciler(e)}snapshotNode(e,r){if(!e)return;if(r?.isCancellationRequested)return"cancelled";let n=[];for(let o of e.children??[]){let s=this.snapshotNode(o,r);if(s==="cancelled")return"cancelled";s!==void 0&&n.push(s)}return{value:e.props?.value?.toString(),name:e.name,path:e.path,props:e.props,children:n,statistics:{updateDataTimeMs:e.lifecycle?.lifecycleData.getUpdateTimeMsAndReset()}}}snapshot(e){try{let r=this.reconciler.reconcile(e);if(e?.isCancellationRequested)return{snapshot:void 0,status:"cancelled"};if(!r)throw new Error("Invalid virtual prompt tree");let n=this.snapshotNode(r,e);return n==="cancelled"||e?.isCancellationRequested?{snapshot:void 0,status:"cancelled"}:{snapshot:n,status:"ok"}}catch(r){return{snapshot:void 0,status:"error",error:r}}}createPipe(){return this.reconciler.createPipe()}};Zot.VirtualPrompt=Xar});var HB=T(est=>{"use strict";f();Object.defineProperty(est,"__esModule",{value:!0});est.Text=kKs;est.Chunk=NKs;function kKs(t){if(t.children)return Array.isArray(t.children)?t.children.join(""):t.children}a(kKs,"Text");function NKs(t){return t.children}a(NKs,"Chunk")});var nQ=T(jB=>{"use strict";f();Object.defineProperty(jB,"__esModule",{value:!0});jB.PerCompletionContextProviderStatistics=jB.ContextProviderStatistics=jB.ICompletionsContextProviderService=void 0;jB.componentStatisticsToPromptMatcher=OKs;var DKs=qr(),MKs=BB();jB.ICompletionsContextProviderService=(0,DKs.createServiceIdentifier)("ICompletionsContextProviderService");var Zar=class{static{a(this,"ContextProviderStatistics")}constructor(e=()=>new tst){this.createStatistics=e,this.statistics=new MKs.LRUCacheMap(25)}getStatisticsForCompletion(e){let r=this.statistics.get(e);if(r)return r;let n=this.createStatistics();return this.statistics.set(e,n),n}getPreviousStatisticsForCompletion(e){let r=Array.from(this.statistics.keys());for(let n=r.length-1;n>=0;n--){let o=r[n];if(o!==e)return this.statistics.peek(o)}}};jB.ContextProviderStatistics=Zar;var tst=class{static{a(this,"PerCompletionContextProviderStatistics")}constructor(){this._expectations=new Map,this._lastResolution=new Map,this._statistics=new Map,this.opportunityId=void 0}addExpectations(e,r){let n=this._expectations.get(e)??[];this._expectations.set(e,[...n,...r])}clearExpectations(){this._expectations.clear()}setLastResolution(e,r){this._lastResolution.set(e,r)}setOpportunityId(e){this.opportunityId=e}get(e){return this._statistics.get(e)}getAllUsageStatistics(){return this._statistics.entries()}computeMatch(e){try{for(let[r,n]of this._expectations){if(n.length===0)continue;let o=this._lastResolution.get(r)??"none";if(o==="none"||o==="error"){this._statistics.set(r,{usage:"none",resolution:o});continue}let s=[];for(let[d,p]of n){let h={id:d.id,type:d.type};if(d.origin&&(h.origin=d.origin),p==="content_excluded"){s.push({...h,usage:"none_content_excluded"});continue}let m=e.find(g=>g.source===d);m===void 0?s.push({...h,usage:"error"}):s.push({...h,usage:m.expectedTokens>0&&m.expectedTokens===m.actualTokens?"full":m.actualTokens>0?"partial":"none",expectedTokens:m.expectedTokens,actualTokens:m.actualTokens})}let l=s.reduce((d,p)=>p.usage==="full"?d+1:p.usage==="partial"?d+.5:d,0)/n.length,u=l===1?"full":l===0?"none":"partial";this._statistics.set(r,{resolution:o,usage:u,usageDetails:s})}}finally{this.clearExpectations(),this._lastResolution.clear()}}};jB.PerCompletionContextProviderStatistics=tst;function OKs(t){return t.map(e=>{if(!(e.source===void 0||e.expectedTokens===void 0||e.actualTokens===void 0))return{source:e.source,expectedTokens:e.expectedTokens,actualTokens:e.actualTokens}}).filter(e=>e!==void 0)}a(OKs,"componentStatisticsToPromptMatcher")});var Nwe=T(kwe=>{"use strict";f();Object.defineProperty(kwe,"__esModule",{value:!0});kwe.filterContextItemsByType=UKs;kwe.filterSupportedContextItems=QKs;kwe.addOrValidateContextItemsIDs=GKs;var BKs=Lp(),LKs=Ru(),ecr=Np(),FKs=Xxe(),tcr=mc(),Pwe;(function(t){function e(r){return!(r.importance!==void 0&&(typeof r.importance!="number"||!Number.isInteger(r.importance)||r.importance<0||r.importance>100)||r.id!==void 0&&typeof r.id!="string"||r.origin!==void 0&&!FKs.ContextItemOrigin.is(r.origin))}a(e,"is"),t.is=e})(Pwe||(Pwe={}));var rcr;(function(t){function e(r){if(!Pwe.is(r))return!1;let n=r;return typeof n.name=="string"&&typeof n.value=="string"}a(e,"is"),t.is=e})(rcr||(rcr={}));var ncr;(function(t){function e(r){if(!Pwe.is(r))return!1;let n=r;if(typeof n.uri!="string"||typeof n.value!="string")return!1;if(n.additionalUris===void 0)return!0;if(!Array.isArray(n.additionalUris))return!1;for(let o of n.additionalUris)if(typeof o!="string")return!1;return!0}a(e,"is"),t.is=e})(ncr||(ncr={}));var icr;(function(t){function e(r){if(!Pwe.is(r))return!1;let n=r;if(!LKs.URI.isUri(n.uri)||!Array.isArray(n.values))return!1;for(let o of n.values)if(!(o instanceof BKs.Diagnostic))return!1;return!0}a(e,"is"),t.is=e})(icr||(icr={}));var ocr;(function(t){function e(r){if(rcr.is(r))return"Trait";if(ncr.is(r))return"CodeSnippet";if(icr.is(r))return"DiagnosticBag"}a(e,"is"),t.is=e})(ocr||(ocr={}));function UKs(t,e){return t.map(r=>{let n=r.data.filter(o=>o.type===e);return n.length>0?{...r,data:n}:void 0}).filter(r=>r!==void 0)}a(UKs,"filterContextItemsByType");function QKs(t){let e=[],r=0;return t.forEach(n=>{let o=ocr.is(n);o!==void 0?e.push({...n,type:o}):r++}),[e,r]}a(QKs,"filterSupportedContextItems");function qKs(t){return t.length>0&&t.replaceAll(/[^a-zA-Z0-9-]/g,"").length===t.length}a(qKs,"validateContextItemId");function GKs(t,e){let r=new Set,n=t.get(tcr.ICompletionsLogTargetService),o=[];for(let s of e){let c=s.id??(0,ecr.generateUuid)();if(!qKs(c)){let l=(0,ecr.generateUuid)();tcr.logger.error(n,`Invalid context item ID ${c}, replacing with ${l}`),c=l}if(r.has(c)){let l=(0,ecr.generateUuid)();tcr.logger.error(n,`Duplicate context item ID ${c}, replacing with ${l}`),c=l}r.add(c),o.push({...s,id:c})}return o}a(GKs,"addOrValidateContextItemsIDs")});var scr=T(rst=>{"use strict";f();Object.defineProperty(rst,"__esModule",{value:!0});rst.getCodeSnippetsFromContextItems=WKs;rst.addRelativePathToCodeSnippets=zKs;var HKs=E_(),jKs=nQ(),$Ks=Nwe(),VKs="content_excluded";async function WKs(t,e,r,n){let o=(0,$Ks.filterContextItemsByType)(r,"CodeSnippet");if(o.length===0)return[];let s=new Set,c=o.flatMap(h=>h.data.map(m=>(s.add(m.uri),m.additionalUris?.forEach(g=>s.add(g)),{providerId:h.providerId,data:m}))),l=t.get(jKs.ICompletionsContextProviderService),u=t.get(HKs.ICompletionsTextDocumentManagerService),d=new Map;await Promise.all(Array.from(s).map(async h=>{d.set(h,await u.getTextDocumentValidation({uri:h}))}));let p=l.getStatisticsForCompletion(e);return c.filter(h=>{let g=[h.data.uri,...h.data.additionalUris??[]].every(A=>d.get(A)?.status==="valid");return g?p.addExpectations(h.providerId,[[h.data,"included"]]):p.addExpectations(h.providerId,[[h.data,VKs]]),g}).map(h=>h.data)}a(WKs,"getCodeSnippetsFromContextItems");function zKs(t,e){return e.map(r=>({snippet:r,relativePath:t.getRelativePath(r)}))}a(zKs,"addRelativePathToCodeSnippets")});var acr=T(ost=>{"use strict";f();Object.defineProperty(ost,"__esModule",{value:!0});ost.CodeSnippets=void 0;var nst=UD(),ist=HB(),YKs=$B(),KKs=scr(),JKs=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(YKs.isCompletionRequestData,d=>{d.codeSnippets!==r&&n(d.codeSnippets),d.document.uri!==o?.uri&&s(d.document)}),!r||r.length===0||!o)return;let c=(0,KKs.addRelativePathToCodeSnippets)(t.tdms,r),l=new Map;for(let d of c){let p=d.relativePath??d.snippet.uri,h=l.get(p);h===void 0&&(h=[],l.set(p,h)),h.push(d)}let u=[];for(let[d,p]of l.entries()){let h=p.filter(m=>m.snippet.value.length>0);h.length>0&&u.push({chunkElements:h.map(m=>m.snippet),importance:Math.max(...h.map(m=>m.snippet.importance??0)),uri:d})}if(u.length!==0)return u.sort((d,p)=>p.importance-d.importance),u.reverse(),u.map(d=>{let p=[];return p.push((0,nst.jsx)(ist.Text,{children:`Compare ${d.chunkElements.length>1?"these snippets":"this snippet"} from ${d.uri}:`})),d.chunkElements.forEach((h,m)=>{p.push((0,nst.jsx)(ist.Text,{source:h,children:h.value},h.id)),d.chunkElements.length>1&&m{"use strict";f();Object.defineProperty(ade,"__esModule",{value:!0});ade.CompletionsContext=qXn;ade.StableCompletionsContext=GXn;ade.AdditionalCompletionsContext=HXn;ade.isContextNode=XKs;function qXn(t){return t.children}a(qXn,"CompletionsContext");function GXn(t){return t.children}a(GXn,"StableCompletionsContext");function HXn(t){return t.children}a(HXn,"AdditionalCompletionsContext");function XKs(t){return t.name===qXn.name||t.name===GXn.name||t.name===HXn.name}a(XKs,"isContextNode")});var lcr=T(Mwe=>{"use strict";f();Object.defineProperty(Mwe,"__esModule",{value:!0});Mwe.SnapshotWalker=void 0;Mwe.defaultTransformers=jXn;var ZKs=HB(),ccr=class{static{a(this,"SnapshotWalker")}constructor(e,r=jXn()){this.snapshot=e,this.transformers=r}walkSnapshot(e){this.walkSnapshotNode(this.snapshot,void 0,e,{})}walkSnapshotNode(e,r,n,o){let s=this.transformers.reduce((l,u)=>u(e,r,l),{...o});if(n(e,r,s))for(let l of e.children??[])this.walkSnapshotNode(l,e,n,s)}};Mwe.SnapshotWalker=ccr;function jXn(){return[(t,e,r)=>{r.weight===void 0&&(r.weight=1);let n=t.props?.weight??1,o=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,weight:o*r.weight}},(t,e,r)=>{if(t.name===ZKs.Chunk.name){let n=r.chunks?new Set(r.chunks):new Set;return n.add(t.path),{...r,chunks:n}}return r},(t,e,r)=>t.props?.source!==void 0?{...r,source:t.props.source}:r]}a(jXn,"defaultTransformers")});var $Xn=T(ucr=>{"use strict";f();Object.defineProperty(ucr,"__esModule",{value:!0});ucr.findEditDistanceScore=eJs;function eJs(t,e){if(t.length===0||e.length===0)return{score:t.length+e.length};let r=Array.from({length:t.length}).map(()=>Array.from({length:e.length}).map(()=>0));for(let n=0;n{"use strict";f();Object.defineProperty(NR,"__esModule",{value:!0});NR.MAX_EDIT_DISTANCE_LENGTH=void 0;NR.CurrentFile=iJs;NR.BeforeCursor=pcr;NR.AfterCursor=hcr;NR.DocumentPrefix=oJs;NR.DocumentSuffix=sJs;var sI=UD(),cde=HB(),tJs=MU(),rJs=$Xn(),nJs=Oue(),dcr=$B();NR.MAX_EDIT_DISTANCE_LENGTH=50;function fcr(t){let e=t*4,r=t*.1;return Math.floor(e+r)}a(fcr,"approximateMaxCharacters");function iJs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData(dcr.isCompletionRequestData,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=fcr(c);return(0,sI.jsxs)(sI.Fragment,{children:[(0,sI.jsx)(pcr,{document:r,position:o,maxCharacters:m}),(0,sI.jsx)(hcr,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})]})}a(iJs,"CurrentFile");function pcr(t){if(t.document===void 0||t.position===void 0)return(0,sI.jsx)(cde.Text,{});let e=t.document.getText({start:{line:0,character:0},end:t.position});return e.length>t.maxCharacters&&(e=e.slice(-t.maxCharacters)),(0,sI.jsx)(cde.Text,{children:e})}a(pcr,"BeforeCursor");function hcr(t,e){let[r,n]=e.useState("");if(t.document===void 0||t.position===void 0)return(0,sI.jsx)(cde.Text,{});let o=t.document.getText({start:t.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}});o.length>t.maxCharacters&&(o=o.slice(0,t.maxCharacters));let s=o.replace(/^.*/,"").trimStart();if(s==="")return(0,sI.jsx)(cde.Text,{});if(r===s)return(0,sI.jsx)(cde.Text,{children:r});let c=s;if(r!==""){let l=(0,nJs.getTokenizer)(t.tokenizer),u=l.takeFirstTokens(s,NR.MAX_EDIT_DISTANCE_LENGTH),d=l.takeFirstTokens(r,NR.MAX_EDIT_DISTANCE_LENGTH);u.tokens.length>0&&d.tokens.length>0&&u.tokens[0]===d.tokens[0]&&100*(0,rJs.findEditDistanceScore)(u.tokens,d.tokens)?.score<(t.suffixMatchThreshold??tJs.DEFAULT_SUFFIX_MATCH_THRESHOLD)*u.tokens.length&&(c=r)}return c!==r&&n(c),(0,sI.jsx)(cde.Text,{children:c})}a(hcr,"AfterCursor");function oJs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0);e.useData(dcr.isCompletionRequestData,d=>{let p=d.document;(d.document.uri!==r?.uri||p.getText()!==r?.getText())&&n(p),d.position!==o&&s(d.position),d.maxPromptTokens!==c&&l(d.maxPromptTokens)});let u=fcr(c);return(0,sI.jsx)(pcr,{document:r,position:o,maxCharacters:u})}a(oJs,"DocumentPrefix");function sJs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData(dcr.isCompletionRequestData,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=fcr(c);return(0,sI.jsx)(hcr,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})}a(sJs,"DocumentSuffix")});var gcr=T(zK=>{"use strict";f();Object.defineProperty(zK,"__esModule",{value:!0});zK.WishlistElision=void 0;zK.makePrompt=aJs;zK.makePrefixPrompt=cJs;zK.makeContextPrompt=lJs;var mcr=class{static{a(this,"WishlistElision")}elide(e,r,n,o,s){if(r<=0)throw new Error("Prefix limit must be greater than 0");let[c,l]=this.preparePrefixBlocks(e,s),{elidedSuffix:u,adjustedPrefixTokenLimit:d}=this.elideSuffix(n,o,r,l,s),p=this.elidePrefix(c,d,l,s);return{blocks:[u,...p],cycles:1}}preparePrefixBlocks(e,r){let n=0,o=new Set;return[e.map((c,l)=>{let u=0,p=c.value.split(/([^\n]*\n+)/).filter(m=>m!=="").map(m=>{let g=r.tokenLength(m);return u+=g,n+=g,{line:m,componentPath:c.componentPath,tokens:g}}),h=c.componentPath;if(o.has(h))throw new Error(`Duplicate component path in prefix blocks: ${h}`);return o.add(h),{...c,tokens:u,markedForRemoval:!1,originalIndex:l,lines:p}}),n]}elideSuffix(e,r,n,o,s){let c=e.value;if(c.length===0||r<=0)return{elidedSuffix:{...e,tokens:0,elidedValue:"",elidedTokens:0},adjustedPrefixTokenLimit:n+Math.max(0,r)};o!p.markedForRemoval).flatMap(p=>p.lines);if(c.length===0)return[];let[l,u]=this.trimPrefixLinesToFit(c,r,o),d=u;return s.map(p=>{if(p.markedForRemoval)return d+p.tokens<=r&&!p.chunks?(d+=p.tokens,{...p,elidedValue:p.value,elidedTokens:p.tokens}):{...p,elidedValue:"",elidedTokens:0};let h=l.filter(g=>g.componentPath===p.componentPath&&g.line!=="").map(g=>g.line).join(""),m=p.tokens;return h!==p.value&&(m=h!==""?o.tokenLength(h):0),{...p,elidedValue:h,elidedTokens:m}})}removeLowWeightPrefixBlocks(e,r,n){let o=n;e.sort((s,c)=>s.weight-c.weight);for(let s of e){if(o<=r)break;if(s.weight!==1&&!(s.chunks&&s.markedForRemoval))if(s.chunks&&s.chunks.size>0)for(let c of e)!c.markedForRemoval&&c.chunks&&[...s.chunks].every(l=>c.chunks?.has(l))&&(c.markedForRemoval=!0,o-=c.tokens);else s.markedForRemoval=!0,o-=s.tokens}return e.sort((s,c)=>s.originalIndex-c.originalIndex)}trimPrefixLinesToFit(e,r,n){let o=0,s=[];for(let c=e.length-1;c>=0;c--){let l=e[c],u=l.tokens;if(o+u<=r)s.unshift(l),o+=u;else break}if(s.length===0){let c=e[e.length-1];if(c&&c.line.length>0){let u=n.takeLastTokens(c.line,r);return s.push({line:u.text,componentPath:c.componentPath,tokens:u.tokens.length}),[s,u.tokens.length]}let l=`Cannot fit prefix within limit of ${r} tokens`;throw new Error(l)}return[s,o]}};zK.WishlistElision=mcr;function aJs(t){return t.map(e=>e.elidedValue).join("")}a(aJs,"makePrompt");function cJs(t){return t.filter(e=>e.type==="prefix").map(e=>e.elidedValue).join("")}a(cJs,"makePrefixPrompt");function lJs(t){if(t.length===0)return[];let e=new Map;for(let o of t)if(o.type==="context"&&o.index!==void 0){e.has(o.index)||e.set(o.index,[]);let s=o.elidedValue.trim();s.length>0&&e.get(o.index).push(s)}let r=Math.max(...Array.from(e.keys()),-1),n=[];for(let o=0;o<=r;o++){let s=e.get(o);if(s&&s.length>0){let c=s.join(` -`).trim();n.push(c)}else n.push("")}return n}a(lJs,"makeContextPrompt")});var Ecr=T(iQ=>{"use strict";f();Object.defineProperty(iQ,"__esModule",{value:!0});iQ.transformers=iQ.CompletionsPromptRenderer=void 0;iQ.normalizeLineEndings=ycr;var YXn=lcr(),VXn=_we(),WXn=Oue(),uJs=Dwe(),sst=Owe(),zXn=gcr(),dJs=5,Acr=class{static{a(this,"CompletionsPromptRenderer")}constructor(){this.renderId=0,this.formatPrefix=zXn.makePrompt}render(e,r,n){let o=this.renderId++,s=performance.now();try{if(n?.isCancellationRequested)return{status:"cancelled"};let c=r.delimiter??"",l=r.tokenizer??WXn.TokenizerName.o200k,{prefixBlocks:u,suffixBlock:d,componentStatistics:p}=this.processSnapshot(e,c,r.languageId),{prefixTokenLimit:h,suffixTokenLimit:m}=this.getPromptLimits(d,r),g=performance.now(),A=new zXn.WishlistElision,{blocks:[y,...E]}=A.elide(u,h,d,m,(0,WXn.getTokenizer)(l)),_=performance.now(),v=this.formatPrefix(E),b=this.formatContext?this.formatContext(E):void 0,I=y.elidedValue,x=E.reduce((R,w)=>R+w.elidedTokens,0);return p.push(...fJs([...E,y])),{prefix:v,prefixTokens:x,suffix:I,suffixTokens:y.elidedTokens,context:b,status:"ok",metadata:{renderId:o,rendererName:"c",tokenizer:l,elisionTimeMs:_-g,renderTimeMs:performance.now()-s,componentStatistics:p,updateDataTimeMs:p.reduce((R,w)=>R+(w.updateDataTimeMs??0),0)}}}catch(c){return{status:"error",error:c}}}getPromptLimits(e,r){let n=e?.value??"",o=r.promptTokenLimit,s=r.suffixPercent;if(n.length===0||s===0)return{prefixTokenLimit:o,suffixTokenLimit:0};o=n.length>0?o-dJs:o;let c=Math.ceil(o*(s/100));return{prefixTokenLimit:o-c,suffixTokenLimit:c}}processSnapshot(e,r,n){let o=[],s=[],c=[],l=!1;if(new YXn.SnapshotWalker(e,iQ.transformers).walkSnapshot((p,h,m)=>{if(p===e||(p.name===sst.CurrentFile.name&&(l=!0),p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.value===void 0||p.value===""))return!0;let g=m.chunks;if(m.type==="suffix")s.push({value:ycr(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let A=p.value.endsWith(r)?p.value:p.value+r,y=A;m.type==="prefix"?y=p.value:(0,VXn.isShebangLine)(p.value)?y=A:y=(0,VXn.commentBlockAsSingles)(A,n),o.push({type:m.type==="prefix"?"prefix":"context",value:ycr(y),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source})}return!0}),!l)throw new Error(`Node of type ${sst.CurrentFile.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}};iQ.CompletionsPromptRenderer=Acr;iQ.transformers=[...(0,YXn.defaultTransformers)(),(t,e,r)=>(0,uJs.isContextNode)(t)?{...r,type:"context"}:r,(t,e,r)=>t.name===sst.BeforeCursor.name?{...r,type:"prefix"}:r,(t,e,r)=>t.name===sst.AfterCursor.name?{...r,type:"suffix"}:r];function fJs(t){return t.map(e=>{let r={componentPath:e.componentPath};return e.tokens!==0&&(r.expectedTokens=e.tokens,r.actualTokens=e.elidedTokens),e.nodeStatistics.updateDataTimeMs!==void 0&&(r.updateDataTimeMs=e.nodeStatistics.updateDataTimeMs),e.source&&(r.source=e.source),r})}a(fJs,"computeComponentStatistics");function ycr(t){return t.replace(/\r\n?/g,` -`)}a(ycr,"normalizeLineEndings")});var ast=T(lde=>{"use strict";f();Object.defineProperty(lde,"__esModule",{value:!0});lde.ILanguageContextProviderService=lde.ProviderTarget=void 0;var pJs=qr(),KXn;(function(t){t.NES="nes",t.Completions="completions"})(KXn||(lde.ProviderTarget=KXn={}));lde.ILanguageContextProviderService=(0,pJs.createServiceIdentifier)("ILanguageContextProviderService")});var YK=T(ude=>{"use strict";f();Object.defineProperty(ude,"__esModule",{value:!0});ude.RuntimeMode=ude.ICompletionsRuntimeModeService=void 0;var hJs=qr();ude.ICompletionsRuntimeModeService=(0,hJs.createServiceIdentifier)("completionsRuntimeModeService");var Ccr=class t{static{a(this,"RuntimeMode")}constructor(e){this.flags=e}static fromEnvironment(e,r=process.argv,n=process.env){return new t({debug:JXn(r,n),verboseLogging:gJs(r,n),testMode:e,simulation:mJs(n)})}isRunningInTest(){return this.flags.testMode}shouldFailForDebugPurposes(){return this.isRunningInTest()}isDebugEnabled(){return this.flags.debug}isVerboseLoggingEnabled(){return this.flags.verboseLogging}isRunningInSimulation(){return this.flags.simulation}};ude.RuntimeMode=Ccr;function JXn(t,e){return t.includes("--debug")||_cr(e,"DEBUG")}a(JXn,"determineDebugFlag");function mJs(t){return _cr(t,"SIMULATION")}a(mJs,"determineSimulationFlag");function gJs(t,e){return e.COPILOT_AGENT_VERBOSE==="1"||e.COPILOT_AGENT_VERBOSE?.toLowerCase()==="true"||_cr(e,"VERBOSE")||JXn(t,e)}a(gJs,"determineVerboseLoggingEnabled");function _cr(t,e){for(let r of["GH_COPILOT_","GITHUB_COPILOT_"]){let n=t[`${r}${e}`];if(n)return n==="1"||n?.toLowerCase()==="true"}return!1}a(_cr,"determineEnvFlagEnabled")});var tZn=T(Bwe=>{"use strict";f();Object.defineProperty(Bwe,"__esModule",{value:!0});Bwe.eventToPromise=AJs;Bwe.isArrayOfT=eZn;Bwe.resolveAll=EJs;var XXn=lwe();async function AJs(t){let e=new XXn.Deferred,r=t(n=>{e.resolve(n),r.dispose()});return e.promise}a(AJs,"eventToPromise");async function yJs(t){if(t.isCancellationRequested)return;let e=new XXn.Deferred,r=t.onCancellationRequested(()=>{e.resolve(),r.dispose()});await e.promise}a(yJs,"cancellationTokenToPromise");async function ZXn(t,e){if(e){let r=yJs(e);await Promise.race([t,r])}else await t}a(ZXn,"raceCancellation");function eZn(t){return Array.isArray(t)}a(eZn,"isArrayOfT");async function EJs(t,e){let r=new Map,n=[];for(let[o,s]of t.entries()){let c=(async()=>{let l=await CJs(s,e);r.set(o,l)})();n.push(c)}return await Promise.allSettled(n.values()),r}a(EJs,"resolveAll");async function CJs(t,e){let r;return t instanceof Promise?r=await _Js(t,e):r=await vJs(t,e),r}a(CJs,"resolve");async function _Js(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{let s=await t;if(e?.isCancellationRequested)return;n={status:"full",resolutionTime:0,value:eZn(s)?[...s]:[s]}}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await ZXn(o,e),n.resolutionTime=performance.now()-r,n}a(_Js,"resolvePromise");async function vJs(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{for await(let s of t){if(e?.isCancellationRequested)return;n.status!=="partial"&&(n={status:"partial",resolutionTime:0,value:[]}),n.value.push(s)}e?.isCancellationRequested||(n.status!=="partial"?n={status:"full",resolutionTime:0,value:[]}:n.status="full")}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await ZXn(o,e),n.resolutionTime=performance.now()-r,n}a(vJs,"resolveIterable")});var rZn=T(bcr=>{"use strict";f();Object.defineProperty(bcr,"__esModule",{value:!0});bcr.fillInCppVSCodeActiveExperiments=IJs;var bJs=Zm(),vcr=mc(),TJs={maxSnippetLength:3e3,maxSnippetCount:7,enabledFeatures:"Deferred",timeBudgetMs:7,doAggregateSnippets:!0},SJs="ms-vscode.cpptools";function IJs(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(SJs))&&xJs(t,r,n)}a(IJs,"fillInCppVSCodeActiveExperiments");function xJs(t,e,r){try{let n=t.get(bJs.ICompletionsFeaturesService),o=t.get(vcr.ICompletionsLogTargetService),s=TJs,c=n.cppContextProviderParams(r);if(c)try{s=JSON.parse(c)}catch(l){vcr.logger.error(o,"Failed to parse cppContextProviderParams",l)}else{let l=n.getContextProviderExpSettings("cpp")?.params;l&&(s={...l})}for(let[l,u]of Object.entries(s))e.set(l,u)}catch(n){vcr.logger.exception(t,n,"fillInCppActiveExperiments")}}a(xJs,"addActiveExperiments")});var iZn=T(Tcr=>{"use strict";f();Object.defineProperty(Tcr,"__esModule",{value:!0});Tcr.fillInCSharpActiveExperiments=RJs;var wJs=Zm(),nZn=mc();function RJs(t,e,r){let n=t.get(wJs.ICompletionsFeaturesService),o=t.get(nZn.ICompletionsLogTargetService);try{let s=n.csharpContextProviderParams(r);if(s){let c=JSON.parse(s);for(let[l,u]of Object.entries(c))e.set(l,u)}else{let c=n.getContextProviderExpSettings("csharp")?.params;if(c)for(let[l,u]of Object.entries(c))e.set(l,u)}}catch(s){return nZn.logger.debug(o,"Failed to get the active C# experiments for the Context Provider API",s),!1}return!0}a(RJs,"fillInCSharpActiveExperiments")});var oZn=T(oQ=>{"use strict";f();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.multiLanguageContextProviderParamsDefault=void 0;oQ.fillInMultiLanguageActiveExperiments=NJs;oQ.getMultiLanguageContextProviderParamsFromActiveExperiments=OJs;var PJs=Zm(),Scr=mc(),kJs="fallbackContextProvider";oQ.multiLanguageContextProviderParamsDefault={mlcpMaxContextItems:20,mlcpMaxSymbolMatches:20,mlcpEnableImports:!1};function NJs(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(kJs))&&DJs(t,r,n)}a(NJs,"fillInMultiLanguageActiveExperiments");function DJs(t,e,r){try{let n=MJs(t,r);for(let[o,s]of Object.entries(n))e.set(o,s)}catch(n){Scr.logger.exception(t,n,"fillInMultiLanguageActiveExperiments")}}a(DJs,"addActiveExperiments");function MJs(t,e){let r=oQ.multiLanguageContextProviderParamsDefault,n=t.get(Scr.ICompletionsLogTargetService),s=t.get(PJs.ICompletionsFeaturesService).multiLanguageContextProviderParams(e);if(s)try{r=JSON.parse(s)}catch(c){Scr.logger.error(n,"Failed to parse multiLanguageContextProviderParams",c)}return r}a(MJs,"getMultiLanguageContextProviderParamsFromExp");function OJs(t){let e={...oQ.multiLanguageContextProviderParamsDefault};return t.has("mlcpMaxContextItems")&&(e.mlcpMaxContextItems=Number(t.get("mlcpMaxContextItems"))),t.has("mlcpMaxSymbolMatches")&&(e.mlcpMaxSymbolMatches=Number(t.get("mlcpMaxSymbolMatches"))),t.has("mlcpEnableImports")&&(e.mlcpEnableImports=String(t.get("mlcpEnableImports"))==="true"),e}a(OJs,"getMultiLanguageContextProviderParamsFromActiveExperiments")});var aZn=T(dde=>{"use strict";f();Object.defineProperty(dde,"__esModule",{value:!0});dde.TS_CONTEXT_PROVIDER_ID=void 0;dde.fillInTsActiveExperiments=LJs;var BJs=Zm(),sZn=mc();dde.TS_CONTEXT_PROVIDER_ID="typescript-ai-context-provider";function LJs(t,e,r,n){if(!(e.length===1&&e[0]==="*"||e.includes(dde.TS_CONTEXT_PROVIDER_ID)))return!1;let o=t.get(sZn.ICompletionsLogTargetService),s=t.get(BJs.ICompletionsFeaturesService);try{let c=s.tsContextProviderParams(n);if(c){let l=JSON.parse(c);for(let[u,d]of Object.entries(l))r.set(u,d)}else{let l=s.getContextProviderExpSettings("typescript")?.params;if(l)for(let[u,d]of Object.entries(l))r.set(u,d)}}catch(c){return sZn.logger.debug(o,"Failed to get the active TypeScript experiments for the Context Provider API",c),!1}return!0}a(LJs,"fillInTsActiveExperiments")});var ust=T(kc=>{"use strict";f();var Pcr=kc&&kc.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},DR=kc&&kc.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(kc,"__esModule",{value:!0});kc.DefaultDiagnosticSettings=kc.CachedContextProviderRegistry=kc.MutableContextProviderRegistry=kc.CoreContextProviderRegistry=kc.DefaultContextProvidersContainer=kc.ICompletionsDefaultContextProviders=kc.ICompletionsContextProviderRegistryService=void 0;kc.telemetrizeContextItems=VJs;kc.matchContextItems=WJs;kc.useContextProviderAPI=YJs;kc.getDefaultDiagnosticSettings=JJs;var FJs=Nn(),cZn=fc(),kcr=ast(),UJs=gd(),dZn=qr(),QJs=es(),Ncr=Mo(),cst=Xm(),fZn=Zm(),qJs=BB(),VB=mc(),Dcr=YK(),lZn=tZn(),GJs=rZn(),HJs=iZn(),jJs=oZn(),$Js=aZn(),uZn=Nwe(),pZn=nQ();kc.ICompletionsContextProviderRegistryService=(0,dZn.createServiceIdentifier)("ICompletionsContextProviderRegistryService");kc.ICompletionsDefaultContextProviders=(0,dZn.createServiceIdentifier)("ICompletionsDefaultContextProviders");var Icr=class{static{a(this,"DefaultContextProvidersContainer")}constructor(){this.ids=[]}add(e){this.ids.push(e)}getIds(){return this.ids}};kc.DefaultContextProvidersContainer=Icr;var lst=class{static{a(this,"CoreContextProviderRegistry")}constructor(e,r,n,o,s,c){this.match=e,this.registryService=r,this.runtimeMode=n,this.instantiationService=o,this.logTarget=s,this.contextProviderStatistics=c}registerContextProvider(e){throw new Error("Should not be call. Use ILanguageContextProviderService")}unregisterContextProvider(e){throw new Error("Should not be call. Use ILanguageContextProviderService")}get providers(){return this.registryService.getAllProviders([kcr.ProviderTarget.Completions]).slice()}async resolveAllProviders(e,r,n,o,s,c){if(s?.isCancellationRequested)return VB.logger.debug(this.logTarget,"Resolving context providers cancelled"),[];let l=new Map;this.instantiationService.invokeFunction(HJs.fillInCSharpActiveExperiments,l,o);let u=[],d=this.providers;if(d.length===0)return u;let p=await this.matchProviders(d,n,o),h=p.filter(x=>x[1]>0);if(p.filter(x=>x[1]<=0).forEach(([x,R])=>{let w={providerId:x.id,matchScore:R,resolution:"none",resolutionTimeMs:0,data:[]};u.push(w)}),h.length===0)return u;if(s?.isCancellationRequested)return VB.logger.debug(this.logTarget,"Resolving context providers cancelled"),[];this.instantiationService.invokeFunction(GJs.fillInCppVSCodeActiveExperiments,h.map(x=>x[0].id),l,o),this.instantiationService.invokeFunction(jJs.fillInMultiLanguageActiveExperiments,h.map(x=>x[0].id),l,o),this.instantiationService.invokeFunction($Js.fillInTsActiveExperiments,h.map(x=>x[0].id),l,o);let g=new FJs.CancellationTokenSource;if(s){let x=s.onCancellationRequested(R=>{g.cancel(),x.dispose()})}let A=this.runtimeMode.isDebugEnabled()&&!this.runtimeMode.isRunningInSimulation()?0:this.instantiationService.invokeFunction(KJs,n.languageId,o),y=A>0?Date.now()+A:Number.MAX_SAFE_INTEGER,E;A>0&&(E=setTimeout(()=>{g.cancel(),g.dispose()},A));let _=new Map,v={completionId:e,opportunityId:r,documentContext:n,activeExperiments:l,timeBudget:A,timeoutEnd:y,data:c};for(let[x]of h){let R=this.contextProviderStatistics.getPreviousStatisticsForCompletion(e)?.get(x.id);R&&(v.previousUsageStatistics=R);let w=x.resolver.resolve(v,g.token);_.set(x.id,w)}let b=this.contextProviderStatistics.getStatisticsForCompletion(e);b.setOpportunityId(r);let I=await(0,lZn.resolveAll)(_,g.token);E&&clearTimeout(E);for(let[x,R]of h){let w=I.get(x.id);if(w){if(w.status==="error")(0,QJs.isCancellationError)(w.reason)||VB.logger.error(this.logTarget,`Error resolving context from ${x.id}: `,w.reason),u.push({providerId:x.id,matchScore:R,resolution:w.status,resolutionTimeMs:w.resolutionTime,data:[]});else{let P=[...w.value??[]];if((w.status==="none"||w.status==="partial")&&(VB.logger.info(this.logTarget,`Context provider ${x.id} exceeded time budget of ${A}ms`),x.resolver.resolveOnTimeout))try{let G=x.resolver.resolveOnTimeout(v);(0,lZn.isArrayOfT)(G)?P.push(...G):G&&P.push(G),P.length>0&&(w.status="partial")}catch(G){VB.logger.error(this.logTarget,`Error in fallback logic for context provider ${x.id}: `,G)}let[k,Q]=(0,uZn.filterSupportedContextItems)(P);Q&&VB.logger.error(this.logTarget,`Dropped ${Q} context items from ${x.id} due to invalid schema`);let M=this.instantiationService.invokeFunction(uZn.addOrValidateContextItemsIDs,k),D={providerId:x.id,matchScore:R,resolution:w.status,resolutionTimeMs:w.resolutionTime,data:M};u.push(D)}b.setLastResolution(x.id,w.status)}else VB.logger.error(this.logTarget,`Context provider ${x.id} not found in results`)}return u.sort((x,R)=>R.matchScore-x.matchScore)}async matchProviders(e,r,n){let o=this.instantiationService.invokeFunction(hZn,r.languageId,n),s=o.length===1&&o[0]==="*";return await Promise.all(e.map(async l=>{if(!s&&!o.includes(l.id))return[l,0];let u=await this.match(this.instantiationService,l.selector,r);return[l,u]}))}};kc.CoreContextProviderRegistry=lst;kc.CoreContextProviderRegistry=lst=Pcr([DR(1,kcr.ILanguageContextProviderService),DR(2,Dcr.ICompletionsRuntimeModeService),DR(3,Ncr.IInstantiationService),DR(4,VB.ICompletionsLogTargetService),DR(5,pZn.ICompletionsContextProviderService)],lst);var xcr=class extends lst{static{a(this,"MutableContextProviderRegistry")}constructor(e,r,n,o,s,c){super(e,r,n,o,s,c),this._providers=[]}registerContextProvider(e){if(e.id.includes(",")||e.id.includes("*"))throw new Error(`A context provider id cannot contain a comma or an asterisk. The id ${e.id} is invalid.`);if(this._providers.find(r=>r.id===e.id))throw new Error(`A context provider with id ${e.id} has already been registered`);this._providers.push(e)}unregisterContextProvider(e){this._providers=this._providers.filter(r=>r.id!==e)}get providers(){return this._providers.slice().concat(super.providers)}};kc.MutableContextProviderRegistry=xcr;kc.MutableContextProviderRegistry=xcr=Pcr([DR(1,kcr.ILanguageContextProviderService),DR(2,Dcr.ICompletionsRuntimeModeService),DR(3,Ncr.IInstantiationService),DR(4,VB.ICompletionsLogTargetService),DR(5,pZn.ICompletionsContextProviderService)],xcr);var wcr=class{static{a(this,"CachedContextProviderRegistry")}constructor(e,r,n){this._cachedContextItems=new qJs.LRUCacheMap(5),this.delegate=n.createInstance(e,r)}registerContextProvider(e){this.delegate.registerContextProvider(e)}unregisterContextProvider(e){this.delegate.unregisterContextProvider(e)}get providers(){return this.delegate.providers}async resolveAllProviders(e,r,n,o,s,c){let l=this._cachedContextItems.get(e);if(e&&l&&l.length>0)return l;let u=await this.delegate.resolveAllProviders(e,r,n,o,s,c);return u.length>0&&e&&this._cachedContextItems.set(e,u),u}};kc.CachedContextProviderRegistry=wcr;kc.CachedContextProviderRegistry=wcr=Pcr([DR(2,Ncr.IInstantiationService)],wcr);function VJs(t,e,r){let n=t.getStatisticsForCompletion(e);return r.map(s=>{let{providerId:c,resolution:l,resolutionTimeMs:u,matchScore:d,data:p}=s,h=n.get(c),m=h?.usage??"none";(d<=0||l==="none"||l==="error")&&(m="none");let g={providerId:c,resolution:l,resolutionTimeMs:u,usage:m,usageDetails:h?.usageDetails,matched:d>0,numResolvedItems:p.length},A=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="full"||E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0,y=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0;return A!==void 0&&(g.numUsedItems=A),y!==void 0&&(g.numPartiallyUsedItems=y),g})}a(VJs,"telemetrizeContextItems");function WJs(t){return t.matchScore>0&&t.resolution!=="error"}a(WJs,"matchContextItems");function hZn(t,e,r){let n=zJs(t,e,r),o=(0,cst.getConfig)(t,cst.ConfigKey.ContextProviders)??[];if(n.length===1&&n[0]==="*"||o.length===1&&o[0]==="*")return["*"];let s=t.get(kc.ICompletionsDefaultContextProviders).getIds();return Array.from(new Set([...s,...n,...o]))}a(hZn,"getActiveContextProviders");function zJs(t,e,r){if(t.get(Dcr.ICompletionsRuntimeModeService).isDebugEnabled())return["*"];let n=t.get(fZn.ICompletionsFeaturesService),o=n.contextProviders(r),s=n.getContextProviderExpSettings(e);if(s!==void 0)for(let c of s.ids)o.includes(c)||o.push(c);return o}a(zJs,"getExpContextProviders");function YJs(t,e,r){return hZn(t,e,r).length>0}a(YJs,"useContextProviderAPI");function KJs(t,e,r){let n=(0,cst.getConfig)(t,cst.ConfigKey.ContextProviderTimeBudget);return n!==void 0&&typeof n=="number"?n:t.get(fZn.ICompletionsFeaturesService).contextProviderTimeBudget(e,r)}a(KJs,"getContextProviderTimeBudget");var Rcr;(function(t){function e(n){if(n)try{let o=JSON.parse(n);if(o.warnings===void 0&&o.maxDiagnostics===void 0&&o.maxLineDistance===void 0)return;let s=r(o),c=typeof o.maxLineDistance=="number"&&o.maxLineDistance>=0?o.maxLineDistance:10,l=typeof o.maxDiagnostics=="number"&&o.maxDiagnostics>0?o.maxDiagnostics:5;return{warnings:s,maxLineDistance:c,maxDiagnostics:l}}catch{return}}a(e,"from"),t.from=e;function r(n){let o=n?.warnings;return o==="yes"||o==="no"||o==="yesIfNoErrors"?o:"no"}a(r,"getWarnings")})(Rcr||(kc.DefaultDiagnosticSettings=Rcr={}));function JJs(t){let e=t.get(cZn.IConfigurationService),r=t.get(UJs.IExperimentationService),n=e.getExperimentBasedConfig(cZn.ConfigKey.TeamInternal.InlineCompletionsDefaultDiagnosticsOptions,r);if(typeof n=="string")return Rcr.from(n)}a(JJs,"getDefaultDiagnosticSettings")});var dst=T(MR=>{"use strict";f();var XJs=MR&&MR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},ZJs=MR&&MR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(MR,"__esModule",{value:!0});MR.ContextProviderBridge=MR.ICompletionsContextProviderBridgeService=void 0;var eXs=qr(),tXs=BB(),rXs=ust();MR.ICompletionsContextProviderBridgeService=(0,eXs.createServiceIdentifier)("ICompletionsContextProviderBridgeService");var Mcr=class{static{a(this,"ContextProviderBridge")}constructor(e){this.contextProviderRegistry=e,this.scheduledResolutions=new tXs.LRUCacheMap(25)}schedule(e,r,n,o,s,c){let{textDocument:l,originalPosition:u,originalOffset:d,originalVersion:p,editsWithPosition:h}=e,m=this.contextProviderRegistry.resolveAllProviders(r,n,{uri:l.uri,languageId:l.detectedLanguageId,version:p,offset:d,position:u,proposedEdits:h.length>0?h:void 0},o,s,c?.data);this.scheduledResolutions.set(r,m)}async resolution(e){let r=this.scheduledResolutions.get(e);return r?await r:[]}};MR.ContextProviderBridge=Mcr;MR.ContextProviderBridge=Mcr=XJs([ZJs(0,rXs.ICompletionsContextProviderRegistryService)],Mcr)});var Lcr=T(fst=>{"use strict";f();Object.defineProperty(fst,"__esModule",{value:!0});fst.Diagnostics=void 0;var Ocr=UD(),nXs=Lp(),Bcr=HB(),iXs=MU(),oXs=$B();function sXs(t){if(t.code!==void 0){if(typeof t.code=="string")return t.code;if(typeof t.code=="number")return t.code.toString();if(typeof t.code=="object"&&t.code!==null&&t.code.value)return t.code.value.toString()}}a(sXs,"getCode");function aXs(t,e){return t.getRelativePath({uri:e.uri.toString()})??e.uri.path}a(aXs,"getRelativePath");var cXs=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(),[u,d]=e.useState();if(e.useData(oXs.isCompletionRequestData,h=>{h.diagnostics!==r&&n(h.diagnostics);let m=(0,iXs.normalizeLanguageId)(h.document.detectedLanguageId);m!==o&&s(m),h.position!==c&&l(h.position),h.document.uri!==u?.uri&&d(h.document)}),!r||r.length===0||!o)return;let p=r.filter(h=>h.values.length>0);if(p.length!==0)return p.sort((h,m)=>(m.importance??0)-(h.importance??0)),p.reverse(),p.map(h=>{let m=[];m.push((0,Ocr.jsx)(Bcr.Text,{source:h,children:`Consider the following ${o} diagnostics from ${aXs(t.tdms,h)}:`},h.id));let g=h.values;return u!==void 0&&u.uri.toString()===h.uri.toString()&&c!==void 0&&(g=h.values.slice(),g.sort((A,y)=>{let E=Math.abs(A.range.start.line-c.line),_=Math.abs(y.range.start.line-c.line);return E-_})),g.forEach(A=>{let y="",E=sXs(A);E!==void 0&&(y=` ${A.source?A.source.toUpperCase():""}${E}`);let _=A.range.start;m.push((0,Ocr.jsx)(Bcr.Text,{children:`${_.line+1}:${_.character+1} - ${nXs.DiagnosticSeverity[A.severity].toLowerCase()}${y}: ${A.message}`}))}),(0,Ocr.jsx)(Bcr.Chunk,{children:m})})},"Diagnostics");fst.Diagnostics=cXs});var Fcr=T(hst=>{"use strict";f();Object.defineProperty(hst,"__esModule",{value:!0});hst.DocumentMarker=void 0;var pst=UD(),mZn=HB(),gZn=_we(),lXs=$B(),uXs=a((t,e)=>{let[r,n]=e.useState();if(e.useData(lXs.isCompletionRequestData,o=>{o.document.uri!==r?.uri&&n(o.document)}),r){let o=t.tdms.getRelativePath(r),s={uri:r.uri,source:r.getText(),relativePath:o,languageId:r.detectedLanguageId},c=t.tdms.findNotebook(r);return s.relativePath&&!c?(0,pst.jsx)(dXs,{docInfo:s}):(0,pst.jsx)(fXs,{docInfo:s})}},"DocumentMarker");hst.DocumentMarker=uXs;var dXs=a(t=>(0,pst.jsx)(mZn.Text,{children:(0,gZn.getPathMarker)(t.docInfo)}),"PathMarker"),fXs=a(t=>(0,pst.jsx)(mZn.Text,{children:(0,gZn.getLanguageMarker)(t.docInfo)}),"LanguageMarker")});var Ucr=T(Lwe=>{"use strict";f();Object.defineProperty(Lwe,"__esModule",{value:!0});Lwe.RecentEdits=void 0;Lwe.editIsTooCloseToCursor=EZn;var AZn=UD(),yZn=HB(),mst=_we(),pXs=$B();function EZn(t,e=!1,r=void 0,n){if(e&&(r===void 0||n===void 0))throw new Error("cursorLine and activeDocDistanceLimitFromCursor are required when filterByCursorLine is true");let o=t.startLine-1,s=t.endLine-1;return!!(e&&(Math.abs(o-r)<=n||Math.abs(s-r)<=n))}a(EZn,"editIsTooCloseToCursor");var hXs=a((t,e)=>{let[r,n]=e.useState();return e.useData(pXs.isCompletionRequestData,async o=>{if(!o.document)return;let s=t.recentEditsProvider;if(s.isEnabled())s.start();else return;let c=s.config,l=s.getRecentEdits(),u=new Set,d=t.tdms,p=[];for(let m=l.length-1;m>=0&&!(p.length>=c.maxEdits);m--){let g=l[m];if(!await d.getTextDocument({uri:g.file}))continue;let A=!u.has(g.file);if(u.size+(A?1:0)>c.maxFiles)break;let E=g.file===o.document?.uri,_=E?o.position.line:void 0;if(EZn(g,E,_,c.activeDocDistanceLimitFromCursor))continue;let b=s.getEditSummary(g);if(b){u.add(g.file);let I=d.getRelativePath({uri:g.file});p.unshift((0,mst.newLineEnded)(`File: ${I}`)+(0,mst.newLineEnded)(b))}}if(p.length===0){n(void 0);return}let h=(0,mst.newLineEnded)("These are recently edited files. Do not suggest code that has been deleted.")+p.join("")+(0,mst.newLineEnded)("End of recent edits");n(h)}),r?(0,AZn.jsx)(yZn.Chunk,{children:(0,AZn.jsx)(yZn.Text,{children:r})}):void 0},"RecentEdits");Lwe.RecentEdits=hXs});var CZn=T(GD=>{"use strict";f();Object.defineProperty(GD,"__esModule",{value:!0});GD.registerDocumentTracker=GD.accessTimes=void 0;GD.sortByAccessTimes=AXs;var mXs=BB(),gXs=E_();GD.accessTimes=new mXs.LRUCacheMap;function AXs(t){return[...t].sort((e,r)=>{let n=GD.accessTimes.get(e.uri)??0;return(GD.accessTimes.get(r.uri)??0)-n})}a(AXs,"sortByAccessTimes");var yXs=a(t=>t.get(gXs.ICompletionsTextDocumentManagerService).onDidFocusTextDocument(e=>{e.document&&GD.accessTimes.set(e.document.uri.toString(),Date.now())}),"registerDocumentTracker");GD.registerDocumentTracker=yXs});var _Zn=T(WB=>{"use strict";f();var EXs=WB&&WB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},CXs=WB&&WB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(WB,"__esModule",{value:!0});WB.OpenTabFiles=void 0;var _Xs=CZn(),vXs=E_(),Qcr=fde(),qcr=class{static{a(this,"OpenTabFiles")}constructor(e){this.docManager=e}truncateDocs(e,r,n,o){let s=new Map,c=0;for(let l of e)if(!(c+l.getText().length>Qcr.NeighborSource.MAX_NEIGHBOR_AGGREGATE_LENGTH)&&(l.uri.startsWith("file:")&&r.startsWith("file:")&&l.uri!==r&&(0,Qcr.considerNeighborFile)(n,l.detectedLanguageId)&&(s.set(l.uri.toString(),{uri:l.uri.toString(),relativePath:this.docManager.getRelativePath(l),source:l.getText()}),c+=l.getText().length),s.size>=o))break;return s}async getNeighborFiles(e,r,n){let o=new Map,s=new Map;return o=this.truncateDocs((0,_Xs.sortByAccessTimes)(await this.docManager.textDocuments()),e,r,n),s.set(Qcr.NeighboringFileType.OpenTabs,Array.from(o.keys()).map(c=>c.toString())),{docs:o,neighborSource:s}}};WB.OpenTabFiles=qcr;WB.OpenTabFiles=qcr=EXs([CXs(0,vXs.ICompletionsTextDocumentManagerService)],qcr)});var vZn=T(Gcr=>{"use strict";f();Object.defineProperty(Gcr,"__esModule",{value:!0});Gcr.shortCircuit=bXs;function bXs(t,e,r){return async function(...n){return await Promise.race([t.apply(this,n),new Promise(o=>{setTimeout(o,e,r)})])}}a(bXs,"shortCircuit")});var _st=T(Nc=>{"use strict";f();var TXs=Nc&&Nc.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},gst=Nc&&Nc.__param||function(t,e){return function(r,n){e(r,n,t)}},Hcr;Object.defineProperty(Nc,"__esModule",{value:!0});Nc.RelatedFilesProvider=Nc.ICompletionsRelatedFilesProviderService=Nc.relatedFilesLogger=Nc.PromiseExpirationCacheMap=Nc.EmptyRelatedFilesResponse=void 0;Nc.getRelatedFilesAndTraits=MXs;var SXs=PK(),IXs=qr(),xXs=Ru(),Vcr=Mo(),wXs=UU(),RXs=BB(),Cst=mc(),PXs=Dp(),kXs=vZn();Nc.EmptyRelatedFilesResponse={entries:[],traits:[]};var Ast={entries:new Map,traits:[]},yst=class extends RXs.LRUCacheMap{static{a(this,"PromiseExpirationCacheMap")}constructor(e,r=120*1e3){super(e),this.defaultEvictionTimeMs=r,this._cacheTimestamps=new Map}bumpRetryCount(e){let r=this._cacheTimestamps.get(e);return r?++r.retryCount:(this._cacheTimestamps.set(e,{timestamp:Date.now(),retryCount:0}),0)}has(e){return this.isValid(e)?super.has(e):(this.deleteExpiredEntry(e),!1)}get(e){let r=super.get(e);if(this.isValid(e))return r;this.deleteExpiredEntry(e)}set(e,r){let n=super.set(e,r);return this.isValid(e)||this._cacheTimestamps.set(e,{timestamp:Date.now(),retryCount:0}),n}clear(){super.clear(),this._cacheTimestamps.clear()}isValid(e){let r=this._cacheTimestamps.get(e);return r!==void 0&&Date.now()-r.timestampNc.relatedFilesLogger.exception(o,n,"isContentExcluded"))}return!0}static dropBOM(e){return e.charCodeAt(0)===65279?e.slice(1):e}};Nc.RelatedFilesProvider=jcr;Nc.RelatedFilesProvider=jcr=Hcr=TXs([gst(0,Vcr.IInstantiationService),gst(1,SXs.IIgnoreService),gst(2,Cst.ICompletionsLogTargetService),gst(3,wXs.ICompletionsFileSystemService)],jcr);var DXs=3,Fwe=new yst(NXs);async function bZn(t,e,r,n,o){let s=t.get(Vcr.IInstantiationService),c=t.get(Cst.ICompletionsLogTargetService),l=performance.now(),u;try{u=await o.getRelatedFiles(e,r,n)}catch(p){s.invokeFunction(h=>Nc.relatedFilesLogger.exception(h,p,".getRelatedFiles")),u=void 0}u===void 0&&(Fwe.bumpRetryCount(e.uri)>=DXs?u=Ast:u=void 0);let d=performance.now()-l;if(Nc.relatedFilesLogger.debug(c,u!==void 0?`Fetched ${[...u.entries.values()].map(p=>p.size).reduce((p,h)=>p+h,0)} related files for '${e.uri}' in ${d}ms.`:`Failing fetching files for '${e.uri}' in ${d}ms.`),u===void 0)throw new Est;return u}a(bZn,"getRelatedFiles");var $cr=a(function(t,e,r,n,o){let s=`${e.uri}`;if(Fwe.has(s))return Fwe.get(s);let c=bZn(t,e,r,n,o);return c instanceof Promise&&(c=c.catch(l=>{throw Fwe.delete(s),l})),Fwe.set(s,c),c},"getRelatedFilesWithCacheAndTimeout");$cr=(0,kXs.shortCircuit)($cr,200,Ast);async function MXs(t,e,r,n,o,s=!1){let c=t.get(Vcr.IInstantiationService),l=t.get(Cst.ICompletionsLogTargetService),u=t.get(Nc.ICompletionsRelatedFilesProviderService),d=Ast;try{let p={uri:e.uri,clientLanguageId:e.clientLanguageId,data:o};d=s?await c.invokeFunction(bZn,p,r,n,u):await c.invokeFunction($cr,p,r,n,u)}catch(p){d=Ast,p instanceof Est&&c.invokeFunction(PXs.telemetry,"getRelatedFilesList",r)}return Nc.relatedFilesLogger.debug(l,d!=null?`Fetched following traits ${d.traits.map(p=>`{${p.name} : ${p.value}}`).join("")} for '${e.uri}'`:`Failing fecthing traits for '${e.uri}'.`),d}a(MXs,"getRelatedFilesAndTraits")});var fde=T(sQ=>{"use strict";f();Object.defineProperty(sQ,"__esModule",{value:!0});sQ.NeighborSource=sQ.NeighboringFileType=void 0;sQ.considerNeighborFile=UXs;sQ.isIncludeNeighborFilesActive=QXs;var OXs=Mo(),TZn=MU(),IZn=Zm(),BXs=mc(),LXs=E_(),FXs=_Zn(),vst=_st(),SZn;(function(t){t.None="none",t.OpenTabs="opentabs",t.CursorMostRecent="cursormostrecent",t.CursorMostCount="cursormostcount",t.WorkspaceSharingSameFolder="workspacesharingsamefolder",t.WorkspaceSmallestPathDist="workspacesmallestpathdist",t.OpenTabsAndCocommitted="opentabsandcocommitted",t.RelatedCSharp="related/csharp",t.RelatedCSharpRoslyn="related/csharproslyn",t.RelatedCpp="related/cpp",t.RelatedTypeScript="related/typescript",t.RelatedCppSemanticCodeContext="related/cppsemanticcodecontext",t.RelatedOther="related/other"})(SZn||(sQ.NeighboringFileType=SZn={}));function UXs(t,e){return(0,TZn.normalizeLanguageId)(t)===(0,TZn.normalizeLanguageId)(e)}a(UXs,"considerNeighborFile");var Wcr=class t{static{a(this,"NeighborSource")}static{this.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5}static{this.MAX_NEIGHBOR_FILES=20}static{this.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"]}static defaultEmptyResult(){return{docs:new Map,neighborSource:new Map,traits:[]}}static reset(){t.instance=void 0}static async getNeighborFilesAndTraits(e,r,n,o,s,c,l){let u=e.get(IZn.ICompletionsFeaturesService),d=e.get(BXs.ICompletionsLogTargetService),p=e.get(OXs.IInstantiationService),h=e.get(LXs.ICompletionsTextDocumentManagerService);t.instance===void 0&&(t.instance=p.createInstance(FXs.OpenTabFiles));let m={...await t.instance.getNeighborFiles(r,n,t.MAX_NEIGHBOR_FILES),traits:[]};if(u.excludeRelatedFiles(n,o))return m;let g=await h.getTextDocument({uri:r});if(!g)return vst.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: failed to get the document ${r}`),m;let A=h.getWorkspaceFolder(g);if(!A)return vst.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: ${r} is not under the workspace folder`),m;let y=await p.invokeFunction(vst.getRelatedFilesAndTraits,g,o,s,c,l);return y.entries.size===0?(vst.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`0 related files found for ${r}`),m.traits.push(...y.traits),m):(y.entries.forEach((E,_)=>{let v=[];E.forEach((b,I)=>{let x=t.getRelativePath(I,A.uri);if(!x||m.docs.has(I))return;let R={relativePath:x,uri:I,source:b};v.unshift(R),m.docs.set(I,R)}),v.length>0&&m.neighborSource.set(_,v.map(b=>b.uri.toString()))}),m.traits.push(...y.traits),m)}static basename(e){return decodeURIComponent(e.replace(/[#?].*$/,"").replace(/^.*[/:]/,""))}static getRelativePath(e,r){let n=r.toString().replace(/[#?].*/,"").replace(/\/?$/,"/");return e.toString().startsWith(n)?e.toString().slice(n.length):t.basename(e)}};sQ.NeighborSource=Wcr;function QXs(t,e,r){return t.get(IZn.ICompletionsFeaturesService).includeNeighboringFiles(e,r)}a(QXs,"isIncludeNeighborFilesActive")});var Ycr=T(bst=>{"use strict";f();Object.defineProperty(bst,"__esModule",{value:!0});bst.SimilarFiles=void 0;var pde=UD(),zcr=HB(),qXs=Pot(),GXs=kor(),HXs=Not(),jXs=$B(),$Xs=hde(),xZn=fde(),VXs=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState([]);e.useData(jXs.isCompletionRequestData,async u=>{u.document.uri!==r?.uri&&s([]),n(u.document);let d=xZn.NeighborSource.defaultEmptyResult();u.turnOffSimilarFiles||(d=await t.instantiationService.invokeFunction(async h=>await xZn.NeighborSource.getNeighborFilesAndTraits(h,u.document.uri,u.document.detectedLanguageId,u.telemetryData,u.cancellationToken,u.data)));let p=await c(u.telemetryData,u.document,u,d);s(p)});async function c(u,d,p,h){let m=t.instantiationService.invokeFunction($Xs.getPromptOptions,u,d.detectedLanguageId);return(await l(m,u,d,p,h)).filter(A=>A.snippet.length>0).sort((A,y)=>A.score-y.score).map(A=>({...(0,GXs.announceSnippet)(A),score:A.score}))}a(c,"produceSimilarFiles");async function l(u,d,p,h,m){let g=u.similarFilesOptions||t.instantiationService.invokeFunction(HXs.getSimilarFilesOptions,d,p.detectedLanguageId),y=t.tdms.getRelativePath(p),E={uri:p.uri,source:p.getText(),offset:p.offsetAt(h.position),relativePath:y,languageId:p.detectedLanguageId};return await(0,qXs.getSimilarSnippets)(E,Array.from(m.docs.values()),g)}return a(l,"findSimilarSnippets"),(0,pde.jsxs)(pde.Fragment,{children:[...o.map((u,d)=>(0,pde.jsx)(WXs,{snippet:u}))]})},"SimilarFiles");bst.SimilarFiles=VXs;var WXs=a((t,e)=>(0,pde.jsxs)(zcr.Chunk,{children:[(0,pde.jsx)(zcr.Text,{children:t.snippet.headline}),(0,pde.jsx)(zcr.Text,{children:t.snippet.snippet})]}),"SimilarFile")});var OZn=T(ib=>{"use strict";f();Object.defineProperty(ib,"__esModule",{value:!0});ib.getAllRecentEditsByTimestamp=zXs;ib.findChangeSpan=Kcr;ib.getDiff=RZn;ib.unifiedDiff=PZn;ib.findReplaceDiff=kZn;ib.editsOverlap=NZn;ib.updateEdits=DZn;ib.buildIncomingEdit=Jcr;ib.trimOldFilesFromState=MZn;ib.recentEditsReducer=JXs;ib.summarizeEdit=XXs;function zXs(t){return Object.values(t).flatMap(e=>e.edits).sort((e,r)=>e.timestamp-r.timestamp)}a(zXs,"getAllRecentEditsByTimestamp");function Kcr(t,e){let r=0;for(;r=r&&o>=r&&t[n]===e[o];)n--,o--;return r>n&&r>o?null:{start:r,endPrev:n,endNew:o}}a(Kcr,"findChangeSpan");function RZn(t,e,r,n,o,s,c){let l=Math.max(0,n-c),u=Math.min(r.length,s+c+1);return{file:t,pre:l,post:u,before:e.slice(l,n),removed:e.slice(n,o+1),added:r.slice(n,s+1),after:r.slice(s+1,u)}}a(RZn,"getDiff");function YXs(t){return[...t.before,...t.removed,...t.added,...t.after].reduce((r,n)=>r+n.length+1,0)}a(YXs,"measureDiffSize");function PZn(t,e=!1,r=!1,n=!1){let o=[];o.push(`--- a/${t.file}`),o.push(`+++ b/${t.file}`);let s=t.before.length+t.removed.length+t.after.length,c=t.before.length+t.added.length+t.after.length;o.push(`@@ -${t.pre+1},${s} +${t.pre+1},${c} @@`);for(let l of t.before)o.push(" "+l);if(r)for(let l of t.added)o.push("+"+l);if(!e){let l=n?" --- IGNORE ---":"";for(let u of t.removed)o.push("-"+u+l)}if(!r)for(let l of t.added)o.push("+"+l);for(let l of t.after)o.push(" "+l);return o.join(` +${OXn(r,e)} +`,this}appendLink(e,r,n){return this.value+="[",this.value+=this._escape(r,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,r){let n=new RegExp((0,MJs.escapeRegExpCharacters)(r),"g");return e.replace(n,(o,s)=>e.charAt(s-1)!=="\\"?`\\${o}`:o)}};Gy.MarkdownString=Jit;function NXn(t){return MXn(t)?!t.value:Array.isArray(t)?t.every(NXn):!0}a(NXn,"isEmptyMarkdownString");function MXn(t){return t instanceof Jit?!0:t&&typeof t=="object"?typeof t.value=="string"&&(typeof t.isTrusted=="boolean"||typeof t.isTrusted=="object"||t.isTrusted===void 0)&&(typeof t.supportThemeIcons=="boolean"||t.supportThemeIcons===void 0)&&(typeof t.supportAlertSyntax=="boolean"||t.supportAlertSyntax===void 0):!1}a(MXn,"isMarkdownString");function OJs(t,e){return t===e?!0:!t||!e?!1:t.value===e.value&&t.isTrusted===e.isTrusted&&t.supportThemeIcons===e.supportThemeIcons&&t.supportHtml===e.supportHtml&&t.supportAlertSyntax===e.supportAlertSyntax&&(t.baseUri===e.baseUri||!!t.baseUri&&!!e.baseUri&&(0,NJs.isEqual)(Kit.URI.from(t.baseUri),Kit.URI.from(e.baseUri)))}a(OJs,"markdownStringEqual");function Xit(t){return t.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}a(Xit,"escapeMarkdownSyntaxTokens");function OXn(t,e){let r=t.match(/^`+/gm)?.reduce((o,s)=>o.length>s.length?o:s).length??0,n=r>=3?r+1:3;return[`${"`".repeat(n)}${e}`,t,`${"`".repeat(n)}`].join(` +`)}a(OXn,"appendEscapedMarkdownCodeBlockFence");function BJs(t){return t.replace(/"/g,""")}a(BJs,"escapeDoubleQuotes");function LJs(t){return t&&t.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}a(LJs,"removeMarkdownEscapes");function FJs(t){let e=[],r=t.split("|").map(o=>o.trim());t=r[0];let n=r[1];if(n){let o=/height=(\d+)/.exec(n),s=/width=(\d+)/.exec(n),c=o?o[1]:"",l=s?s[1]:"",u=isFinite(parseInt(l)),d=isFinite(parseInt(c));u&&e.push(`width="${l}"`),d&&e.push(`height="${c}"`)}return{href:t,dimensions:e}}a(FJs,"parseHrefAndDimensions");function BXn(t,e,r,n=!0){return`[${n?Xit(t):t}](${e}${r?` "${Xit(r)}"`:""})`}a(BXn,"createMarkdownLink");function UJs(t,e=!0){let r=LXn(t.id,...t.arguments||[]).toString();return BXn(t.title,r,t.tooltip,e)}a(UJs,"createMarkdownCommandLink");function LXn(t,...e){return Kit.URI.from({scheme:DJs.Schemas.command,path:t,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}a(LXn,"createCommandUri")});var Usr=T(KY=>{"use strict";f();var QJs=KY&&KY.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Lsr;Object.defineProperty(KY,"__esModule",{value:!0});KY.MarkdownString=void 0;var qJs=FXn(),GJs=ER(),Fsr=Lsr=class{static{a(this,"MarkdownString")}#e;static isMarkdownString(e){return e instanceof Lsr?!0:!e||typeof e!="object"?!1:e.appendCodeblock&&e.appendMarkdown&&e.appendText&&e.value!==void 0}constructor(e,r=!1){this.#e=new qJs.MarkdownString(e,{supportThemeIcons:r})}get value(){return this.#e.value}set value(e){this.#e.value=e}get isTrusted(){return this.#e.isTrusted}set isTrusted(e){this.#e.isTrusted=e}get supportThemeIcons(){return this.#e.supportThemeIcons}set supportThemeIcons(e){this.#e.supportThemeIcons=e}get supportHtml(){return this.#e.supportHtml}set supportHtml(e){this.#e.supportHtml=e}get supportAlertSyntax(){return this.#e.supportAlertSyntax}set supportAlertSyntax(e){this.#e.supportAlertSyntax=e}get baseUri(){return this.#e.baseUri}set baseUri(e){this.#e.baseUri=e}appendText(e){return this.#e.appendText(e),this}appendMarkdown(e){return this.#e.appendMarkdown(e),this}appendCodeblock(e,r){return this.#e.appendCodeblock(r??"",e),this}};KY.MarkdownString=Fsr;KY.MarkdownString=Fsr=Lsr=QJs([GJs.es5ClassCompat],Fsr)});var qXn=T(bB=>{"use strict";f();Object.defineProperty(bB,"__esModule",{value:!0});bB.Mimes=void 0;bB.getMediaOrTextMime=jJs;bB.getMediaMime=QXn;bB.getExtensionForMimeType=$Js;bB.normalizeMimeType=WJs;bB.isTextStreamMime=zJs;var UXn=gm();bB.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"});var HJs={".css":"text/css",".csv":"text/csv",".htm":"text/html",".html":"text/html",".ics":"text/calendar",".js":"text/javascript",".mjs":"text/javascript",".txt":"text/plain",".xml":"text/xml"},Qsr={".aac":"audio/x-aac",".avi":"video/x-msvideo",".bmp":"image/bmp",".flv":"video/x-flv",".gif":"image/gif",".ico":"image/x-icon",".jpe":["image/jpg","image/jpeg"],".jpeg":["image/jpg","image/jpeg"],".jpg":["image/jpg","image/jpeg"],".m1v":"video/mpeg",".m2a":"audio/mpeg",".m2v":"video/mpeg",".m3a":"audio/mpeg",".mid":"audio/midi",".midi":"audio/midi",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".mkv":"video/x-matroska",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4a":"audio/mp4",".mp4v":"video/mp4",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".opus":"audio/opus",".ogv":"video/ogg",".png":"image/png",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".spx":"audio/ogg",".svg":"image/svg+xml",".tga":"image/x-tga",".tif":"image/tiff",".tiff":"image/tiff",".wav":"audio/x-wav",".webm":"video/webm",".webp":"image/webp",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".woff":"application/font-woff"};function jJs(t){let e=(0,UXn.extname)(t),r=HJs[e.toLowerCase()];return r!==void 0?r:QXn(t)}a(jJs,"getMediaOrTextMime");function QXn(t){let e=(0,UXn.extname)(t),r=Qsr[e.toLowerCase()];return Array.isArray(r)?r[0]:r}a(QXn,"getMediaMime");function $Js(t){for(let e in Qsr){let r=Qsr[e];if(Array.isArray(r)?r.includes(t):r===t)return e}}a($Js,"getExtensionForMimeType");var VJs=/^(.+)\/(.+?)(;.+)?$/;function WJs(t,e){let r=VJs.exec(t);return r?`${r[1].toLowerCase()}/${r[2].toLowerCase()}${r[3]??""}`:e?void 0:t}a(WJs,"normalizeMimeType");function zJs(t){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(t)}a(zJs,"isTextStreamMime")});var jXn=T(Pp=>{"use strict";f();var YJs=Pp&&Pp.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},TU;Object.defineProperty(Pp,"__esModule",{value:!0});Pp.NotebookCellOutput=Pp.NotebookCellOutputItem=Pp.NotebookEdit=Pp.NotebookData=Pp.NotebookCellData=Pp.NotebookRange=Pp.NotebookCellKind=void 0;var KJs=ER(),GXn=Ko(),Zit=qXn(),JJs=Ip(),HXn;(function(t){t[t.Markup=1]="Markup",t[t.Code=2]="Code"})(HXn||(Pp.NotebookCellKind=HXn={}));var JY=class t{static{a(this,"NotebookRange")}static isNotebookRange(e){return e instanceof t?!0:e?typeof e.start=="number"&&typeof e.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(e,r){if(e<0)throw(0,GXn.illegalArgument)("start must be positive");if(r<0)throw(0,GXn.illegalArgument)("end must be positive");e<=r?(this._start=e,this._end=r):(this._start=r,this._end=e)}with(e){let r=this._start,n=this._end;return e.start!==void 0&&(r=e.start),e.end!==void 0&&(n=e.end),r===this._start&&n===this._end?this:new t(r,n)}};Pp.NotebookRange=JY;var qsr=class t{static{a(this,"NotebookCellData")}static validate(e){if(typeof e.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof e.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof e.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(e){return Array.isArray(e)&&e.every(r=>t.isNotebookCellData(r))}static isNotebookCellData(e){return!0}constructor(e,r,n,o,s,c,l){this.kind=e,this.value=r,this.languageId=n,this.mime=o,this.outputs=s??[],this.metadata=c,this.executionSummary=l,t.validate(this)}};Pp.NotebookCellData=qsr;var Gsr=class{static{a(this,"NotebookData")}constructor(e){this.cells=e}};Pp.NotebookData=Gsr;var Hsr=TU=class{static{a(this,"NotebookEdit")}static isNotebookCellEdit(e){return e instanceof TU?!0:e?JY.isNotebookRange(e)&&Array.isArray(e.newCells):!1}static replaceCells(e,r){return new TU(e,r)}static insertCells(e,r){return new TU(new JY(e,e),r)}static deleteCells(e){return new TU(e,[])}static updateCellMetadata(e,r){let n=new TU(new JY(e,e),[]);return n.newCellMetadata=r,n}static updateNotebookMetadata(e){let r=new TU(new JY(0,0),[]);return r.newNotebookMetadata=e,r}constructor(e,r){this.range=e,this.newCells=r}};Pp.NotebookEdit=Hsr;Pp.NotebookEdit=Hsr=TU=YJs([KJs.es5ClassCompat],Hsr);var jsr=class t{static{a(this,"NotebookCellOutputItem")}static isNotebookCellOutputItem(e){return e instanceof t?!0:e?typeof e.mime=="string"&&e.data instanceof Uint8Array:!1}static error(e){let r={name:e.name,message:e.message,stack:e.stack};return t.json(r,"application/vnd.code.notebook.error")}static stdout(e){return t.text(e,"application/vnd.code.notebook.stdout")}static stderr(e){return t.text(e,"application/vnd.code.notebook.stderr")}static bytes(e,r="application/octet-stream"){return new t(e,r)}static#e=new TextEncoder;static text(e,r=Zit.Mimes.text){let n=t.#e.encode(String(e));return new t(n,r)}static json(e,r="text/x-json"){let n=JSON.stringify(e,void 0," ");return t.text(n,r)}constructor(e,r){this.data=e,this.mime=r;let n=(0,Zit.normalizeMimeType)(r,!0);if(!n)throw new Error(`INVALID mime type: ${r}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=n}};Pp.NotebookCellOutputItem=jsr;var $sr=class t{static{a(this,"NotebookCellOutput")}static isNotebookCellOutput(e){return e instanceof t?!0:!e||typeof e!="object"?!1:typeof e.id=="string"&&Array.isArray(e.items)}static ensureUniqueMimeTypes(e,r=!1){let n=new Set,o=new Set;for(let s=0;s!o.has(c))}constructor(e,r,n){this.items=t.ensureUniqueMimeTypes(e,!0),typeof r=="string"?(this.id=r,this.metadata=n):(this.id=(0,JJs.generateUuid)(),this.metadata=r??n)}};Pp.NotebookCellOutput=$sr});var VXn=T(IU=>{"use strict";f();var XJs=IU&&IU.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Vsr;Object.defineProperty(IU,"__esModule",{value:!0});IU.Selection=void 0;IU.getDebugDescriptionOfSelection=$Xn;var ZJs=ER(),SU=Aue(),Wsr=vB(),zsr=Vsr=class extends Wsr.Range{static{a(this,"Selection")}static isSelection(e){return e instanceof Vsr?!0:!e||typeof e!="object"?!1:Wsr.Range.isRange(e)&&SU.Position.isPosition(e.anchor)&&SU.Position.isPosition(e.active)&&typeof e.isReversed=="boolean"}get anchor(){return this._anchor}get active(){return this._active}constructor(e,r,n,o){let s,c;if(typeof e=="number"&&typeof r=="number"&&typeof n=="number"&&typeof o=="number"?(s=new SU.Position(e,r),c=new SU.Position(n,o)):SU.Position.isPosition(e)&&SU.Position.isPosition(r)&&(s=SU.Position.of(e),c=SU.Position.of(r)),!s||!c)throw new Error("Invalid arguments");super(s,c),this._anchor=s,this._active=c}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}[Symbol.for("debug.description")](){return $Xn(this)}};IU.Selection=zsr;IU.Selection=zsr=Vsr=XJs([ZJs.es5ClassCompat],zsr);function $Xn(t){let e=(0,Wsr.getDebugDescriptionOfRange)(t);return t.isEmpty||(t.active.isEqual(t.start)?e=`|${e}`:e=`${e}|`),e}a($Xn,"getDebugDescriptionOfSelection")});var Ksr=T(ZY=>{"use strict";f();var eXs=ZY&&ZY.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},XY;Object.defineProperty(ZY,"__esModule",{value:!0});ZY.SnippetString=void 0;var tXs=ER(),Ysr=XY=class{static{a(this,"SnippetString")}static isSnippetString(e){return e instanceof XY?!0:!e||typeof e!="object"?!1:typeof e.value=="string"}static _escape(e){return e.replace(/\$|}|\\/g,"\\$&")}constructor(e){this._tabstop=1,this.value=e||""}appendText(e){return this.value+=XY._escape(e),this}appendTabstop(e=this._tabstop++){return this.value+="$",this.value+=e,this}appendPlaceholder(e,r=this._tabstop++){if(typeof e=="function"){let n=new XY;n._tabstop=this._tabstop,e(n),this._tabstop=n._tabstop,e=n.value}else e=XY._escape(e);return this.value+="${",this.value+=r,this.value+=":",this.value+=e,this.value+="}",this}appendChoice(e,r=this._tabstop++){let n=e.map(o=>o.replaceAll(/[|\\,]/g,"\\$&")).join(",");return this.value+="${",this.value+=r,this.value+="|",this.value+=n,this.value+="|}",this}appendVariable(e,r){if(typeof r=="function"){let n=new XY;n._tabstop=this._tabstop,r(n),this._tabstop=n._tabstop,r=n.value}else typeof r=="string"&&(r=r.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=e,r&&(this.value+=":",this.value+=r),this.value+="}",this}};ZY.SnippetString=Ysr;ZY.SnippetString=Ysr=XY=eXs([tXs.es5ClassCompat],Ysr)});var Xsr=T(eot=>{"use strict";f();Object.defineProperty(eot,"__esModule",{value:!0});eot.SnippetTextEdit=void 0;var rXs=Ksr(),WXn=vB(),Jsr=class t{static{a(this,"SnippetTextEdit")}static isSnippetTextEdit(e){return e instanceof t?!0:e?WXn.Range.isRange(e.range)&&rXs.SnippetString.isSnippetString(e.snippet):!1}static replace(e,r){return new t(e,r)}static insert(e,r){return t.replace(new WXn.Range(e,e),r)}constructor(e,r){this.range=e,this.snippet=r}};eot.SnippetTextEdit=Jsr});var KXn=T(_R=>{"use strict";f();var nXs=_R&&_R.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Zsr;Object.defineProperty(_R,"__esModule",{value:!0});_R.SymbolInformation=_R.SymbolTag=_R.SymbolKind=void 0;var iXs=ER(),zXn=msr(),oXs=vB(),ear;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(ear||(_R.SymbolKind=ear={}));var YXn;(function(t){t[t.Deprecated=1]="Deprecated"})(YXn||(_R.SymbolTag=YXn={}));var tar=Zsr=class{static{a(this,"SymbolInformation")}static validate(e){if(!e.name)throw new Error("name must not be falsy")}constructor(e,r,n,o,s){this.name=e,this.kind=r,this.containerName=s,typeof n=="string"&&(this.containerName=n),o instanceof zXn.Location?this.location=o:n instanceof oXs.Range&&(this.location=new zXn.Location(o,n)),Zsr.validate(this)}toJSON(){return{name:this.name,kind:ear[this.kind],location:this.location,containerName:this.containerName}}};_R.SymbolInformation=tar;_R.SymbolInformation=tar=Zsr=nXs([iXs.es5ClassCompat],tar)});var iar=T(TB=>{"use strict";f();var sXs=TB&&TB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},eK;Object.defineProperty(TB,"__esModule",{value:!0});TB.TextEdit=TB.EndOfLine=void 0;var rar=Ko(),aXs=ER(),JXn=Aue(),tot=vB(),XXn;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(XXn||(TB.EndOfLine=XXn={}));var nar=eK=class{static{a(this,"TextEdit")}static isTextEdit(e){return e instanceof eK?!0:!e||typeof e!="object"?!1:tot.Range.isRange(e)&&typeof e.newText=="string"}static replace(e,r){return new eK(e,r)}static insert(e,r){return eK.replace(new tot.Range(e,e),r)}static delete(e){return eK.replace(e,"")}static setEndOfLine(e){let r=new eK(new tot.Range(new JXn.Position(0,0),new JXn.Position(0,0)),"");return r.newEol=e,r}get range(){return this._range}set range(e){if(e&&!tot.Range.isRange(e))throw(0,rar.illegalArgument)("range");this._range=e}get newText(){return this._newText||""}set newText(e){if(e&&typeof e!="string")throw(0,rar.illegalArgument)("newText");this._newText=e}get newEol(){return this._newEol}set newEol(e){if(e&&typeof e!="number")throw(0,rar.illegalArgument)("newEol");this._newEol=e}constructor(e,r){this._range=e,this._newText=r}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};TB.TextEdit=nar;TB.TextEdit=nar=eK=sXs([aXs.es5ClassCompat],nar)});var lZn=T(_t=>{"use strict";f();Object.defineProperty(_t,"__esModule",{value:!0});_t.LanguageModelToolMCPSource=_t.LanguageModelToolExtensionSource=_t.ChatResponseClearToPreviousToolInvocationReason=_t.ChatRequestEditedFileEventKind=_t.ChatErrorLevel=_t.AISearchKeyword=_t.TextSearchMatch2=_t.ExcludeSettingOptions=_t.LanguageModelPromptTsxPart=_t.ChatImageMimeType=_t.LanguageModelDataPart2=_t.LanguageModelDataPart=_t.LanguageModelThinkingPart=_t.LanguageModelTextPart2=_t.LanguageModelPartAudience=_t.LanguageModelTextPart=_t.LanguageModelToolResult2=_t.LanguageModelToolResult=_t.ChatReferenceBinaryData=_t.ChatReferenceDiagnostic=_t.ChatRequestNotebookData=_t.ChatRequestEditorData=_t.ChatResponseTurn=_t.ChatRequestTurn2=_t.ChatRequestTurn=_t.ChatResponseQuestionCarouselPart=_t.ChatQuestion=_t.ChatQuestionType=_t.ChatResponseConfirmationPart=_t.ChatResponseWorkspaceEditPart=_t.ChatResponseNotebookEditPart=_t.ChatResponseTextEditPart=_t.ChatResponseMarkdownWithVulnerabilitiesPart=_t.ChatResponseCommandButtonPart=_t.ChatResponseCodeCitationPart=_t.ChatResponsePullRequestPart=_t.ChatResponseExtensionsPart=_t.ChatResponseMovePart=_t.ChatResponseReferencePart2=_t.ChatResponseReferencePart=_t.ChatResponseWarningPart=_t.ChatResponseProgressPart2=_t.ChatResponseExternalEditPart=_t.ChatResponseHookPart=_t.ChatResponseThinkingProgressPart=_t.ChatResponseProgressPart=_t.ChatResponseAnchorPart=_t.ChatResponseFileTreePart=_t.ChatResponseCodeblockUriPart=_t.ChatResponseMarkdownPart=void 0;_t.McpHttpServerDefinition=_t.McpStdioServerDefinition=_t.ChatResource=_t.LanguageModelError=_t.ChatSessionStatus=_t.ChatResponseTurn2=_t.ChatSubagentToolInvocationData=_t.ChatToolInvocationPart=_t.McpToolInvocationContentData=_t.LanguageModelChatMessage=_t.LanguageModelChatToolMode=_t.LanguageModelChatMessageRole=_t.LanguageModelToolResultPart2=_t.LanguageModelToolResultPart=_t.LanguageModelToolCallPart=void 0;var ZXn=lU(),ocr=Usr(),oar=class{static{a(this,"ChatResponseMarkdownPart")}constructor(e){this.value=typeof e=="string"?new ocr.MarkdownString(e):e}};_t.ChatResponseMarkdownPart=oar;var sar=class{static{a(this,"ChatResponseCodeblockUriPart")}constructor(e,r,n){this.value=e,this.undoStopId=n}};_t.ChatResponseCodeblockUriPart=sar;var aar=class{static{a(this,"ChatResponseFileTreePart")}constructor(e,r){this.value=e,this.baseUri=r}};_t.ChatResponseFileTreePart=aar;var car=class{static{a(this,"ChatResponseAnchorPart")}constructor(e,r){this.value=e,this.title=r}};_t.ChatResponseAnchorPart=car;var lar=class{static{a(this,"ChatResponseProgressPart")}constructor(e){this.value=e}};_t.ChatResponseProgressPart=lar;var uar=class{static{a(this,"ChatResponseThinkingProgressPart")}constructor(e,r,n){this.value=e,this.id=r,this.metadata=n}};_t.ChatResponseThinkingProgressPart=uar;var dar=class{static{a(this,"ChatResponseHookPart")}constructor(e,r,n,o){this.hookType=e,this.stopReason=r,this.systemMessage=n,this.metadata=o}};_t.ChatResponseHookPart=dar;var far=class{static{a(this,"ChatResponseExternalEditPart")}constructor(e,r){this.uris=e,this.callback=r,this.applied=new Promise(n=>{this.didGetApplied=n})}};_t.ChatResponseExternalEditPart=far;var par=class{static{a(this,"ChatResponseProgressPart2")}constructor(e,r){this.value=e,this.task=r}};_t.ChatResponseProgressPart2=par;var har=class{static{a(this,"ChatResponseWarningPart")}constructor(e){this.value=typeof e=="string"?new ocr.MarkdownString(e):e}};_t.ChatResponseWarningPart=har;var mar=class{static{a(this,"ChatResponseReferencePart")}constructor(e){this.value=e}};_t.ChatResponseReferencePart=mar;var gar=class{static{a(this,"ChatResponseReferencePart2")}constructor(e,r,n){this.value=e,this.iconPath=r,this.options=n}};_t.ChatResponseReferencePart2=gar;var Aar=class{static{a(this,"ChatResponseMovePart")}constructor(e,r){this.uri=e,this.range=r}};_t.ChatResponseMovePart=Aar;var yar=class{static{a(this,"ChatResponseExtensionsPart")}constructor(e){this.extensions=e}};_t.ChatResponseExtensionsPart=yar;var Ear=class{static{a(this,"ChatResponsePullRequestPart")}constructor(e,r,n,o,s){"command"in e&&typeof e.command=="string"?this.command=e:(this.uri=e,this.command={title:"View Pull Request",command:"vscode.open",arguments:[e]}),this.title=r,this.description=n,this.author=o,this.linkTag=s}};_t.ChatResponsePullRequestPart=Ear;var _ar=class{static{a(this,"ChatResponseCodeCitationPart")}constructor(e,r,n){this.value=e,this.license=r,this.snippet=n}};_t.ChatResponseCodeCitationPart=_ar;var Car=class{static{a(this,"ChatResponseCommandButtonPart")}constructor(e){this.value=e}};_t.ChatResponseCommandButtonPart=Car;var bar=class{static{a(this,"ChatResponseMarkdownWithVulnerabilitiesPart")}constructor(e,r){this.value=typeof e=="string"?new ocr.MarkdownString(e):e,this.vulnerabilities=r}};_t.ChatResponseMarkdownWithVulnerabilitiesPart=bar;var Tar=class{static{a(this,"ChatResponseTextEditPart")}constructor(e,r){this.uri=e,r===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(r)?r:[r]}};_t.ChatResponseTextEditPart=Tar;var Sar=class{static{a(this,"ChatResponseNotebookEditPart")}constructor(e,r){this.uri=e,r===!0?(this.isDone=!0,this.edits=[]):this.edits=Array.isArray(r)?r:[r]}};_t.ChatResponseNotebookEditPart=Sar;var Iar=class{static{a(this,"ChatResponseWorkspaceEditPart")}constructor(e){this.edits=e}};_t.ChatResponseWorkspaceEditPart=Iar;var xar=class{static{a(this,"ChatResponseConfirmationPart")}constructor(e,r,n,o){this.title=e,this.message=r,this.data=n,this.buttons=o}};_t.ChatResponseConfirmationPart=xar;var eZn;(function(t){t[t.Text=1]="Text",t[t.SingleSelect=2]="SingleSelect",t[t.MultiSelect=3]="MultiSelect"})(eZn||(_t.ChatQuestionType=eZn={}));var war=class{static{a(this,"ChatQuestion")}constructor(e,r,n,o){this.id=e,this.type=r,this.title=n,o&&(this.message=o.message,this.options=o.options,this.defaultValue=o.defaultValue,this.allowFreeformInput=o.allowFreeformInput)}};_t.ChatQuestion=war;var Rar=class{static{a(this,"ChatResponseQuestionCarouselPart")}constructor(e,r){this.questions=e,this.allowSkip=r??!1}};_t.ChatResponseQuestionCarouselPart=Rar;var Par=class{static{a(this,"ChatRequestTurn")}constructor(e,r,n,o,s){this.prompt=e,this.command=r,this.references=n,this.participant=o,this.toolReferences=s}};_t.ChatRequestTurn=Par;var kar=class{static{a(this,"ChatRequestTurn2")}constructor(e,r,n,o,s,c,l,u,d){this.prompt=e,this.command=r,this.references=n,this.participant=o,this.toolReferences=s,this.editedFileEvents=c,this.id=l,this.modelId=u,this.modeInstructions2=d}};_t.ChatRequestTurn2=kar;var Dar=class{static{a(this,"ChatResponseTurn")}constructor(e,r,n,o){this.response=e,this.result=r,this.participant=n,this.command=o}};_t.ChatResponseTurn=Dar;var Nar=class{static{a(this,"ChatRequestEditorData")}constructor(e,r,n,o){this.editor=e,this.document=r,this.selection=n,this.wholeRange=o}};_t.ChatRequestEditorData=Nar;var Mar=class{static{a(this,"ChatRequestNotebookData")}constructor(e){this.cell=e}};_t.ChatRequestNotebookData=Mar;var Oar=class{static{a(this,"ChatReferenceDiagnostic")}constructor(e){this.diagnostics=e}};_t.ChatReferenceDiagnostic=Oar;var Bar=class{static{a(this,"ChatReferenceBinaryData")}constructor(e,r){this.mimeType=e,this.data=r}};_t.ChatReferenceBinaryData=Bar;var Lar=class{static{a(this,"LanguageModelToolResult")}constructor(e){this.content=e}};_t.LanguageModelToolResult=Lar;var Far=class{static{a(this,"LanguageModelToolResult2")}constructor(e){this.content=e}};_t.LanguageModelToolResult2=Far;var rot=class{static{a(this,"LanguageModelTextPart")}constructor(e){this.value=e}};_t.LanguageModelTextPart=rot;var tZn;(function(t){t[t.Assistant=0]="Assistant",t[t.User=1]="User",t[t.Extension=2]="Extension"})(tZn||(_t.LanguageModelPartAudience=tZn={}));var Uar=class extends rot{static{a(this,"LanguageModelTextPart2")}constructor(e,r){super(e),this.audience=r}};_t.LanguageModelTextPart2=Uar;var Qar=class{static{a(this,"LanguageModelThinkingPart")}constructor(e,r,n){this.value=e,this.id=r,this.metadata=n}};_t.LanguageModelThinkingPart=Qar;var not=class t{static{a(this,"LanguageModelDataPart")}constructor(e,r){this.mimeType=r,this.data=e}static image(e,r){return new t(e,r)}static json(e){let r=JSON.stringify(e,void 0," ");return new t(ZXn.VSBuffer.fromString(r).buffer,"json")}static text(e){return new t(ZXn.VSBuffer.fromString(e).buffer,"text/plain")}};_t.LanguageModelDataPart=not;var qar=class extends not{static{a(this,"LanguageModelDataPart2")}constructor(e,r,n){super(e,r),this.audience=n}};_t.LanguageModelDataPart2=qar;var rZn;(function(t){t.PNG="image/png",t.JPEG="image/jpeg",t.GIF="image/gif",t.WEBP="image/webp",t.BMP="image/bmp"})(rZn||(_t.ChatImageMimeType=rZn={}));var Gar=class{static{a(this,"LanguageModelPromptTsxPart")}constructor(e){this.value=e}};_t.LanguageModelPromptTsxPart=Gar;var nZn;(function(t){t[t.None=1]="None",t[t.FilesExclude=2]="FilesExclude",t[t.SearchAndFilesExclude=3]="SearchAndFilesExclude"})(nZn||(_t.ExcludeSettingOptions=nZn={}));var Har=class{static{a(this,"TextSearchMatch2")}constructor(e,r,n){this.uri=e,this.ranges=r,this.previewText=n}};_t.TextSearchMatch2=Har;var jar=class{static{a(this,"AISearchKeyword")}constructor(e){this.keyword=e}};_t.AISearchKeyword=jar;var iZn;(function(t){t[t.Info=0]="Info",t[t.Warning=1]="Warning",t[t.Error=2]="Error"})(iZn||(_t.ChatErrorLevel=iZn={}));var oZn;(function(t){t[t.Keep=1]="Keep",t[t.Undo=2]="Undo",t[t.UserModification=3]="UserModification"})(oZn||(_t.ChatRequestEditedFileEventKind=oZn={}));var sZn;(function(t){t[t.NoReason=0]="NoReason",t[t.FilteredContentRetry=1]="FilteredContentRetry",t[t.CopyrightContentRetry=2]="CopyrightContentRetry"})(sZn||(_t.ChatResponseClearToPreviousToolInvocationReason=sZn={}));var $ar=class{static{a(this,"LanguageModelToolExtensionSource")}constructor(e,r){this.id=e,this.label=r}};_t.LanguageModelToolExtensionSource=$ar;var Var=class{static{a(this,"LanguageModelToolMCPSource")}constructor(e,r,n){this.label=e,this.name=r,this.instructions=n}};_t.LanguageModelToolMCPSource=Var;var War=class{static{a(this,"LanguageModelToolCallPart")}constructor(e,r,n){this.callId=e,this.name=r,this.input=n}};_t.LanguageModelToolCallPart=War;var zar=class{static{a(this,"LanguageModelToolResultPart")}constructor(e,r,n){this.callId=e,this.content=r,this.isError=n??!1}};_t.LanguageModelToolResultPart=zar;var Yar=class{static{a(this,"LanguageModelToolResultPart2")}constructor(e,r,n){this.callId=e,this.content=r,this.isError=n??!1}};_t.LanguageModelToolResultPart2=Yar;var iot;(function(t){t[t.User=1]="User",t[t.Assistant=2]="Assistant",t[t.System=3]="System"})(iot||(_t.LanguageModelChatMessageRole=iot={}));var aZn;(function(t){t[t.Auto=1]="Auto",t[t.Required=2]="Required"})(aZn||(_t.LanguageModelChatToolMode=aZn={}));var Kar=class t{static{a(this,"LanguageModelChatMessage")}constructor(e,r,n){this.role=e,this.content=typeof r=="string"?[{type:"text",value:r}]:r,this.name=n}static User(e,r){return new t(iot.User,e,r)}static Assistant(e,r){return new t(iot.Assistant,e,r)}};_t.LanguageModelChatMessage=Kar;var Jar=class{static{a(this,"McpToolInvocationContentData")}constructor(e,r){this.data=e,this.mimeType=r}};_t.McpToolInvocationContentData=Jar;var Xar=class{static{a(this,"ChatToolInvocationPart")}constructor(e,r,n){this.toolName=e,this.toolCallId=r,this.isError=typeof n=="string"?!0:n}};_t.ChatToolInvocationPart=Xar;var Zar=class{static{a(this,"ChatSubagentToolInvocationData")}constructor(e,r,n,o){this.description=e,this.agentName=r,this.prompt=n,this.result=o}};_t.ChatSubagentToolInvocationData=Zar;var ecr=class{static{a(this,"ChatResponseTurn2")}constructor(e,r,n,o){this.response=e,this.result=r,this.participant=n,this.command=o}};_t.ChatResponseTurn2=ecr;var cZn;(function(t){t[t.Failed=0]="Failed",t[t.Completed=1]="Completed",t[t.InProgress=2]="InProgress",t[t.NeedsInput=3]="NeedsInput"})(cZn||(_t.ChatSessionStatus=cZn={}));var tcr=class t extends Error{static{a(this,"LanguageModelError")}static#e="LanguageModelError";static NotFound(e){return new t(e,t.NotFound.name)}static NoPermissions(e){return new t(e,t.NoPermissions.name)}static Blocked(e){return new t(e,t.Blocked.name)}constructor(e,r,n){super(e,{cause:n}),this.name=t.#e,this.code=r??""}};_t.LanguageModelError=tcr;var rcr=class{static{a(this,"ChatResource")}constructor(e){this.uri=e}};_t.ChatResource=rcr;var ncr=class{static{a(this,"McpStdioServerDefinition")}constructor(e,r,n,o,s){this.label=e,this.command=r,this.args=n??[],this.env=o??{},this.version=s}};_t.McpStdioServerDefinition=ncr;var icr=class{static{a(this,"McpHttpServerDefinition")}constructor(e,r,n,o){this.label=e,this.uri=r,this.headers=n??{},this.version=o}};_t.McpHttpServerDefinition=icr});var fZn=T(xU=>{"use strict";f();Object.defineProperty(xU,"__esModule",{value:!0});xU.TextDocumentChangeReason=xU.TextEditorSelectionChangeKind=xU.WorkspaceEdit=void 0;var cXs=Lc(),lXs=Wx(),uXs=vB(),dXs=Xsr(),fXs=iar(),scr=class{static{a(this,"WorkspaceEdit")}constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(e,r,n,o){this._edits.push({_type:1,from:e,to:r,options:n,metadata:o})}createFile(e,r,n){this._edits.push({_type:1,from:void 0,to:e,options:r,metadata:n})}deleteFile(e,r,n){this._edits.push({_type:1,from:e,to:void 0,options:r,metadata:n})}replace(e,r,n,o){this._edits.push({_type:2,uri:e,edit:new fXs.TextEdit(r,n),metadata:o})}insert(e,r,n,o){this.replace(e,new uXs.Range(r,r),n,o)}delete(e,r,n){this.replace(e,r,"",n)}has(e){return this._edits.some(r=>r._type===2&&r.uri.toString()===e.toString())}set(e,r){if(r)for(let n of r){if(!n)continue;let o,s;Array.isArray(n)?(o=n[0],s=n[1]):o=n,dXs.SnippetTextEdit.isSnippetTextEdit(o)?this._edits.push({_type:6,uri:e,range:o.range,edit:o.snippet,metadata:s}):this._edits.push({_type:2,uri:e,edit:o,metadata:s})}else{for(let n=0;n{"use strict";f();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.FileType=Wd.ChatSessionStatus=Wd.ChatLocation=Wd.ChatVariableLevel=Wd.ExtensionMode=Wd.DiagnosticSeverity=Wd.TextEditorRevealType=Wd.TextEditorLineNumbersStyle=Wd.TextEditorCursorStyle=Wd.InteractiveEditorResponseFeedbackKind=void 0;var pZn;(function(t){t[t.Unhelpful=0]="Unhelpful",t[t.Helpful=1]="Helpful",t[t.Undone=2]="Undone",t[t.Accepted=3]="Accepted",t[t.Bug=4]="Bug"})(pZn||(Wd.InteractiveEditorResponseFeedbackKind=pZn={}));var hZn;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(hZn||(Wd.TextEditorCursorStyle=hZn={}));var mZn;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval"})(mZn||(Wd.TextEditorLineNumbersStyle=mZn={}));var gZn;(function(t){t[t.Default=0]="Default",t[t.InCenter=1]="InCenter",t[t.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",t[t.AtTop=3]="AtTop"})(gZn||(Wd.TextEditorRevealType=gZn={}));var AZn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Information=2]="Information",t[t.Hint=3]="Hint"})(AZn||(Wd.DiagnosticSeverity=AZn={}));var yZn;(function(t){t[t.Production=1]="Production",t[t.Development=2]="Development",t[t.Test=3]="Test"})(yZn||(Wd.ExtensionMode=yZn={}));var EZn;(function(t){t[t.Short=1]="Short",t[t.Medium=2]="Medium",t[t.Full=3]="Full"})(EZn||(Wd.ChatVariableLevel=EZn={}));var _Zn;(function(t){t[t.Panel=1]="Panel",t[t.Terminal=2]="Terminal",t[t.Notebook=3]="Notebook",t[t.Editor=4]="Editor"})(_Zn||(Wd.ChatLocation=_Zn={}));var CZn;(function(t){t[t.Failed=0]="Failed",t[t.Completed=1]="Completed",t[t.InProgress=2]="InProgress"})(CZn||(Wd.ChatSessionStatus=CZn={}));var vZn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(vZn||(Wd.FileType=vZn={}))});var SZn=T(acr=>{"use strict";f();Object.defineProperty(acr,"__esModule",{value:!0});acr.t=pXs;function pXs(...t){if(typeof t[0]=="string"){let e=t.shift(),r=!t||typeof t[0]!="object"?t:t[0];return TZn({message:e,args:r})}return TZn(t[0])}a(pXs,"t");function TZn(t){let{message:e,args:r}=t;return mXs(e,r??{})}a(TZn,"getMessage");var hXs=/{([^}]+)}/g;function mXs(t,e){return t.replace(hXs,(r,n)=>e[n]??r)}a(mXs,"format2")});var wZn=T(wU=>{"use strict";f();Object.defineProperty(wU,"__esModule",{value:!0});wU.NewSymbolName=wU.NewSymbolNameTriggerKind=wU.NewSymbolNameTag=void 0;var IZn;(function(t){t[t.AIGenerated=1]="AIGenerated"})(IZn||(wU.NewSymbolNameTag=IZn={}));var xZn;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(xZn||(wU.NewSymbolNameTriggerKind=xZn={}));var ccr=class{static{a(this,"NewSymbolName")}constructor(e,r){this.newSymbolName=e,this.tags=r}};wU.NewSymbolName=ccr});var PZn=T(oot=>{"use strict";f();Object.defineProperty(oot,"__esModule",{value:!0});oot.TerminalShellExecutionCommandLineConfidence=void 0;var RZn;(function(t){t[t.Low=0]="Low",t[t.Medium=1]="Medium",t[t.High=2]="High"})(RZn||(oot.TerminalShellExecutionCommandLineConfidence=RZn={}))});var kZn=T(Eue=>{"use strict";f();Object.defineProperty(Eue,"__esModule",{value:!0});Eue.ThemeColor=Eue.ThemeIcon=void 0;var lcr=class t{static{a(this,"ThemeIcon")}constructor(e,r){this.id=e,this.color=r}static isThemeIcon(e){return!(e instanceof t)}};Eue.ThemeIcon=lcr;var ucr=class{static{a(this,"ThemeColor")}constructor(e){this.id=e}};Eue.ThemeColor=ucr});var kp=T((X$d,OZn)=>{"use strict";f();var gXs=n4(),AXs=Xa(),yXs=Eu(),DZn=aXn(),EXs=msr(),_Xs=Usr(),Ixe=jXn(),CXs=Aue(),vXs=vB(),bXs=VXn(),TXs=Ksr(),SXs=Xsr(),NZn=KXn(),MZn=iar(),mn=lZn(),dcr=fZn(),RU=bZn(),IXs=SZn(),fcr=wZn(),xXs=PZn(),wXs=kZn(),RXs={Position:CXs.Position,Range:vXs.Range,Selection:bXs.Selection,EventEmitter:AXs.Emitter,CancellationTokenSource:gXs.CancellationTokenSource,Diagnostic:DZn.Diagnostic,Location:EXs.Location,DiagnosticRelatedInformation:DZn.DiagnosticRelatedInformation,TextEdit:MZn.TextEdit,WorkspaceEdit:dcr.WorkspaceEdit,Uri:yXs.URI,MarkdownString:_Xs.MarkdownString,DiagnosticSeverity:RU.DiagnosticSeverity,TextEditorCursorStyle:RU.TextEditorCursorStyle,TextEditorLineNumbersStyle:RU.TextEditorLineNumbersStyle,TextEditorRevealType:RU.TextEditorRevealType,EndOfLine:MZn.EndOfLine,l10n:{t:IXs.t},ExtensionMode:RU.ExtensionMode,ChatVariableLevel:RU.ChatVariableLevel,ChatResponseClearToPreviousToolInvocationReason:mn.ChatResponseClearToPreviousToolInvocationReason,ChatResponseMarkdownPart:mn.ChatResponseMarkdownPart,ChatResponseFileTreePart:mn.ChatResponseFileTreePart,ChatResponseAnchorPart:mn.ChatResponseAnchorPart,ChatResponseMovePart:mn.ChatResponseMovePart,ChatResponseExtensionsPart:mn.ChatResponseExtensionsPart,ChatResponseProgressPart:mn.ChatResponseProgressPart,ChatResponseProgressPart2:mn.ChatResponseProgressPart2,ChatResponseWarningPart:mn.ChatResponseWarningPart,ChatResponseHookPart:mn.ChatResponseHookPart,ChatResponseReferencePart:mn.ChatResponseReferencePart,ChatResponseReferencePart2:mn.ChatResponseReferencePart2,ChatResponseCodeCitationPart:mn.ChatResponseCodeCitationPart,ChatResponseCommandButtonPart:mn.ChatResponseCommandButtonPart,ChatResponseExternalEditPart:mn.ChatResponseExternalEditPart,ChatResponseMarkdownWithVulnerabilitiesPart:mn.ChatResponseMarkdownWithVulnerabilitiesPart,ChatResponseCodeblockUriPart:mn.ChatResponseCodeblockUriPart,ChatResponseTextEditPart:mn.ChatResponseTextEditPart,ChatResponseNotebookEditPart:mn.ChatResponseNotebookEditPart,ChatResponseWorkspaceEditPart:mn.ChatResponseWorkspaceEditPart,ChatResponseConfirmationPart:mn.ChatResponseConfirmationPart,ChatQuestion:mn.ChatQuestion,ChatQuestionType:mn.ChatQuestionType,ChatResponseQuestionCarouselPart:mn.ChatResponseQuestionCarouselPart,ChatRequestTurn:mn.ChatRequestTurn,ChatResponseTurn:mn.ChatResponseTurn,ChatRequestEditorData:mn.ChatRequestEditorData,ChatRequestNotebookData:mn.ChatRequestNotebookData,NewSymbolName:fcr.NewSymbolName,NewSymbolNameTag:fcr.NewSymbolNameTag,NewSymbolNameTriggerKind:fcr.NewSymbolNameTriggerKind,ChatLocation:RU.ChatLocation,SymbolInformation:NZn.SymbolInformation,LanguageModelToolResult:mn.LanguageModelToolResult,ExtendedLanguageModelToolResult:mn.LanguageModelToolResult,LanguageModelToolResult2:mn.LanguageModelToolResult2,LanguageModelPromptTsxPart:mn.LanguageModelPromptTsxPart,LanguageModelTextPart:mn.LanguageModelTextPart,LanguageModelDataPart:mn.LanguageModelDataPart,LanguageModelToolExtensionSource:mn.LanguageModelToolExtensionSource,LanguageModelToolMCPSource:mn.LanguageModelToolMCPSource,ChatReferenceBinaryData:mn.ChatReferenceBinaryData,ChatReferenceDiagnostic:mn.ChatReferenceDiagnostic,TextSearchMatch2:mn.TextSearchMatch2,AISearchKeyword:mn.AISearchKeyword,ExcludeSettingOptions:mn.ExcludeSettingOptions,NotebookCellKind:Ixe.NotebookCellKind,NotebookRange:Ixe.NotebookRange,NotebookEdit:Ixe.NotebookEdit,NotebookCellData:Ixe.NotebookCellData,NotebookData:Ixe.NotebookData,ChatErrorLevel:mn.ChatErrorLevel,TerminalShellExecutionCommandLineConfidence:xXs.TerminalShellExecutionCommandLineConfidence,ChatRequestEditedFileEventKind:mn.ChatRequestEditedFileEventKind,ChatResponsePullRequestPart:mn.ChatResponsePullRequestPart,LanguageModelTextPart2:mn.LanguageModelTextPart2,LanguageModelDataPart2:mn.LanguageModelDataPart2,LanguageModelThinkingPart:mn.LanguageModelThinkingPart,LanguageModelPartAudience:mn.LanguageModelPartAudience,ChatResponseThinkingProgressPart:mn.ChatResponseThinkingProgressPart,LanguageModelToolCallPart:mn.LanguageModelToolCallPart,LanguageModelToolResultPart:mn.LanguageModelToolResultPart,LanguageModelToolResultPart2:mn.LanguageModelToolResultPart2,LanguageModelChatMessageRole:mn.LanguageModelChatMessageRole,LanguageModelChatMessage:mn.LanguageModelChatMessage,LanguageModelChatToolMode:mn.LanguageModelChatToolMode,TextEditorSelectionChangeKind:dcr.TextEditorSelectionChangeKind,TextDocumentChangeReason:dcr.TextDocumentChangeReason,ChatToolInvocationPart:mn.ChatToolInvocationPart,ChatSubagentToolInvocationData:mn.ChatSubagentToolInvocationData,McpToolInvocationContentData:mn.McpToolInvocationContentData,ChatResponseTurn2:mn.ChatResponseTurn2,ChatRequestTurn2:mn.ChatRequestTurn2,LanguageModelError:mn.LanguageModelError,SymbolKind:NZn.SymbolKind,SnippetString:TXs.SnippetString,SnippetTextEdit:SXs.SnippetTextEdit,FileType:RU.FileType,ChatSessionStatus:mn.ChatSessionStatus,authentication:{getSession:a(async()=>{throw new Error("authentication.getSession not mocked in test")},"getSession")},McpHttpServerDefinition:mn.McpHttpServerDefinition,McpStdioServerDefinition:mn.McpStdioServerDefinition,ThemeIcon:wXs.ThemeIcon};OZn.exports=RXs});var BZn=T(_ue=>{"use strict";f();Object.defineProperty(_ue,"__esModule",{value:!0});_ue.UseData=_ue.UseState=void 0;var pcr=class{static{a(this,"UseState")}constructor(e){this.states=e,this.currentIndex=0,this.stateChanged=!1}useState(e){let r=this.currentIndex;if(this.states[r]===void 0){let o=typeof e=="function"?e():e;this.states[r]=o}let n=a(o=>{let s=typeof o=="function"?o(this.states[r]):o;this.states[r]=s,this.stateChanged=!0},"setState");return this.currentIndex++,[this.states[r],n]}hasChanged(){return this.stateChanged}};_ue.UseState=pcr;var hcr=class{static{a(this,"UseData")}constructor(e){this.measureUpdateTime=e,this.consumers=[]}useData(e,r){this.consumers.push(n=>{if(e(n))return r(n)})}async updateData(e){if(this.consumers.length>0){let r=performance.now();for(let n of this.consumers)await n(e);this.measureUpdateTime(performance.now()-r)}}};_ue.UseData=hcr});var FZn=T(sot=>{"use strict";f();Object.defineProperty(sot,"__esModule",{value:!0});sot.VirtualPromptReconciler=void 0;var LZn=BZn(),mcr=class{static{a(this,"VirtualPromptReconciler")}constructor(e){this.lifecycleData=new Map,this.vTree=this.virtualizeElement(e,"$",0)}reconcile(e){if(!this.vTree)throw new Error("No tree to reconcile, make sure to pass a valid prompt");return e?.isCancellationRequested?this.vTree:(this.vTree=this.reconcileNode(this.vTree,"$",0,e),this.vTree)}reconcileNode(e,r,n,o){if(!e.children&&!e.lifecycle)return e;let s=e;if(e.lifecycle?.isRemountRequired()){let l=this.collectChildPaths(e);s=this.virtualizeElement(e.component,r,n);let u=this.collectChildPaths(s);this.cleanupState(l,u)}else if(e.children){let l=[];for(let u=0;u"u")){if(typeof e=="string"||typeof e=="number")return{name:typeof e,path:`${r}[${n}]`,props:{value:e},component:e};if(PXs(e.type)){let o=e.type(e.props.children),s=r!=="$"?`[${n}]`:"",c=`${r}${s}.${o.type}`,l=o.children.map((u,d)=>this.virtualizeElement(u,c,d));return this.ensureUniqueKeys(l),{name:o.type,path:c,children:l.flat().filter(u=>u!==void 0),component:e}}return this.virtualizeFunctionComponent(r,n,e,e.type)}}virtualizeFunctionComponent(e,r,n,o){let s=n.props.key?`["${n.props.key}"]`:`[${r}]`,c=`${e}${s}.${o.name}`,l=new Acr(this.getOrCreateLifecycleData(c)),u=o(n.props,l),h=(Array.isArray(u)?u:[u]).map((m,g)=>this.virtualizeElement(m,c,g)).flat().filter(m=>m!==void 0);return this.ensureUniqueKeys(h),{name:o.name,path:c,props:n.props,children:h,component:n,lifecycle:l}}ensureUniqueKeys(e){let r=new Map;for(let o of e){if(!o)continue;let s=o.props?.key;s&&r.set(s,(r.get(s)||0)+1)}let n=Array.from(r.entries()).filter(([o,s])=>s>1).map(([o])=>o);if(n.length>0)throw new Error(`Duplicate keys found: ${n.join(", ")}`)}collectChildPaths(e){let r=[];if(e?.children)for(let n of e.children)n&&(r.push(n.path),r.push(...this.collectChildPaths(n)));return r}cleanupState(e,r){for(let n of e)r.includes(n)||this.lifecycleData.delete(n)}getOrCreateLifecycleData(e){return this.lifecycleData.has(e)||this.lifecycleData.set(e,new gcr([])),this.lifecycleData.get(e)}createPipe(){return{pump:a(async e=>{await this.pumpData(e)},"pump")}}async pumpData(e){if(!this.vTree)throw new Error("No tree to pump data into. Pumping data before initializing?");await this.recursivelyPumpData(e,this.vTree)}async recursivelyPumpData(e,r){if(!r)throw new Error("Can't pump data into undefined node.");await r.lifecycle?.dataHook.updateData(e);for(let n of r.children||[])await this.recursivelyPumpData(e,n)}};sot.VirtualPromptReconciler=mcr;var gcr=class{static{a(this,"PromptElementLifecycleData")}constructor(e){this.state=e,this._updateTimeMs=0}getUpdateTimeMsAndReset(){let e=this._updateTimeMs;return this._updateTimeMs=0,e}},Acr=class{static{a(this,"PromptElementLifecycle")}constructor(e){this.lifecycleData=e,this.stateHook=new LZn.UseState(e.state),this.dataHook=new LZn.UseData(r=>{e._updateTimeMs=r})}useState(e){return this.stateHook.useState(e)}useData(e,r){this.dataHook.useData(e,r)}isRemountRequired(){return this.stateHook.hasChanged()}};function PXs(t){return typeof t=="function"&&"isFragmentFunction"in t}a(PXs,"isFragmentFunction")});var UZn=T(aot=>{"use strict";f();Object.defineProperty(aot,"__esModule",{value:!0});aot.VirtualPrompt=void 0;var kXs=FZn(),ycr=class{static{a(this,"VirtualPrompt")}constructor(e){this.reconciler=new kXs.VirtualPromptReconciler(e)}snapshotNode(e,r){if(!e)return;if(r?.isCancellationRequested)return"cancelled";let n=[];for(let o of e.children??[]){let s=this.snapshotNode(o,r);if(s==="cancelled")return"cancelled";s!==void 0&&n.push(s)}return{value:e.props?.value?.toString(),name:e.name,path:e.path,props:e.props,children:n,statistics:{updateDataTimeMs:e.lifecycle?.lifecycleData.getUpdateTimeMsAndReset()}}}snapshot(e){try{let r=this.reconciler.reconcile(e);if(e?.isCancellationRequested)return{snapshot:void 0,status:"cancelled"};if(!r)throw new Error("Invalid virtual prompt tree");let n=this.snapshotNode(r,e);return n==="cancelled"||e?.isCancellationRequested?{snapshot:void 0,status:"cancelled"}:{snapshot:n,status:"ok"}}catch(r){return{snapshot:void 0,status:"error",error:r}}}createPipe(){return this.reconciler.createPipe()}};aot.VirtualPrompt=ycr});var SB=T(cot=>{"use strict";f();Object.defineProperty(cot,"__esModule",{value:!0});cot.Text=DXs;cot.Chunk=NXs;function DXs(t){if(t.children)return Array.isArray(t.children)?t.children.join(""):t.children}a(DXs,"Text");function NXs(t){return t.children}a(NXs,"Chunk")});var PU=T(IB=>{"use strict";f();Object.defineProperty(IB,"__esModule",{value:!0});IB.PerCompletionContextProviderStatistics=IB.ContextProviderStatistics=IB.ICompletionsContextProviderService=void 0;IB.componentStatisticsToPromptMatcher=BXs;var MXs=qr(),OXs=yB();IB.ICompletionsContextProviderService=(0,MXs.createServiceIdentifier)("ICompletionsContextProviderService");var Ecr=class{static{a(this,"ContextProviderStatistics")}constructor(e=()=>new lot){this.createStatistics=e,this.statistics=new OXs.LRUCacheMap(25)}getStatisticsForCompletion(e){let r=this.statistics.get(e);if(r)return r;let n=this.createStatistics();return this.statistics.set(e,n),n}getPreviousStatisticsForCompletion(e){let r=Array.from(this.statistics.keys());for(let n=r.length-1;n>=0;n--){let o=r[n];if(o!==e)return this.statistics.peek(o)}}};IB.ContextProviderStatistics=Ecr;var lot=class{static{a(this,"PerCompletionContextProviderStatistics")}constructor(){this._expectations=new Map,this._lastResolution=new Map,this._statistics=new Map,this.opportunityId=void 0}addExpectations(e,r){let n=this._expectations.get(e)??[];this._expectations.set(e,[...n,...r])}clearExpectations(){this._expectations.clear()}setLastResolution(e,r){this._lastResolution.set(e,r)}setOpportunityId(e){this.opportunityId=e}get(e){return this._statistics.get(e)}getAllUsageStatistics(){return this._statistics.entries()}computeMatch(e){try{for(let[r,n]of this._expectations){if(n.length===0)continue;let o=this._lastResolution.get(r)??"none";if(o==="none"||o==="error"){this._statistics.set(r,{usage:"none",resolution:o});continue}let s=[];for(let[d,p]of n){let h={id:d.id,type:d.type};if(d.origin&&(h.origin=d.origin),p==="content_excluded"){s.push({...h,usage:"none_content_excluded"});continue}let m=e.find(g=>g.source===d);m===void 0?s.push({...h,usage:"error"}):s.push({...h,usage:m.expectedTokens>0&&m.expectedTokens===m.actualTokens?"full":m.actualTokens>0?"partial":"none",expectedTokens:m.expectedTokens,actualTokens:m.actualTokens})}let l=s.reduce((d,p)=>p.usage==="full"?d+1:p.usage==="partial"?d+.5:d,0)/n.length,u=l===1?"full":l===0?"none":"partial";this._statistics.set(r,{resolution:o,usage:u,usageDetails:s})}}finally{this.clearExpectations(),this._lastResolution.clear()}}};IB.PerCompletionContextProviderStatistics=lot;function BXs(t){return t.map(e=>{if(!(e.source===void 0||e.expectedTokens===void 0||e.actualTokens===void 0))return{source:e.source,expectedTokens:e.expectedTokens,actualTokens:e.actualTokens}}).filter(e=>e!==void 0)}a(BXs,"componentStatisticsToPromptMatcher")});var Rxe=T(wxe=>{"use strict";f();Object.defineProperty(wxe,"__esModule",{value:!0});wxe.filterContextItemsByType=QXs;wxe.filterSupportedContextItems=qXs;wxe.addOrValidateContextItemsIDs=HXs;var LXs=kp(),FXs=Eu(),_cr=Ip(),UXs=YIe(),Ccr=uc(),xxe;(function(t){function e(r){return!(r.importance!==void 0&&(typeof r.importance!="number"||!Number.isInteger(r.importance)||r.importance<0||r.importance>100)||r.id!==void 0&&typeof r.id!="string"||r.origin!==void 0&&!UXs.ContextItemOrigin.is(r.origin))}a(e,"is"),t.is=e})(xxe||(xxe={}));var vcr;(function(t){function e(r){if(!xxe.is(r))return!1;let n=r;return typeof n.name=="string"&&typeof n.value=="string"}a(e,"is"),t.is=e})(vcr||(vcr={}));var bcr;(function(t){function e(r){if(!xxe.is(r))return!1;let n=r;if(typeof n.uri!="string"||typeof n.value!="string")return!1;if(n.additionalUris===void 0)return!0;if(!Array.isArray(n.additionalUris))return!1;for(let o of n.additionalUris)if(typeof o!="string")return!1;return!0}a(e,"is"),t.is=e})(bcr||(bcr={}));var Tcr;(function(t){function e(r){if(!xxe.is(r))return!1;let n=r;if(!FXs.URI.isUri(n.uri)||!Array.isArray(n.values))return!1;for(let o of n.values)if(!(o instanceof LXs.Diagnostic))return!1;return!0}a(e,"is"),t.is=e})(Tcr||(Tcr={}));var Scr;(function(t){function e(r){if(vcr.is(r))return"Trait";if(bcr.is(r))return"CodeSnippet";if(Tcr.is(r))return"DiagnosticBag"}a(e,"is"),t.is=e})(Scr||(Scr={}));function QXs(t,e){return t.map(r=>{let n=r.data.filter(o=>o.type===e);return n.length>0?{...r,data:n}:void 0}).filter(r=>r!==void 0)}a(QXs,"filterContextItemsByType");function qXs(t){let e=[],r=0;return t.forEach(n=>{let o=Scr.is(n);o!==void 0?e.push({...n,type:o}):r++}),[e,r]}a(qXs,"filterSupportedContextItems");function GXs(t){return t.length>0&&t.replaceAll(/[^a-zA-Z0-9-]/g,"").length===t.length}a(GXs,"validateContextItemId");function HXs(t,e){let r=new Set,n=t.get(Ccr.ICompletionsLogTargetService),o=[];for(let s of e){let c=s.id??(0,_cr.generateUuid)();if(!GXs(c)){let l=(0,_cr.generateUuid)();Ccr.logger.error(n,`Invalid context item ID ${c}, replacing with ${l}`),c=l}if(r.has(c)){let l=(0,_cr.generateUuid)();Ccr.logger.error(n,`Duplicate context item ID ${c}, replacing with ${l}`),c=l}r.add(c),o.push({...s,id:c})}return o}a(HXs,"addOrValidateContextItemsIDs")});var Icr=T(uot=>{"use strict";f();Object.defineProperty(uot,"__esModule",{value:!0});uot.getCodeSnippetsFromContextItems=zXs;uot.addRelativePathToCodeSnippets=YXs;var jXs=aC(),$Xs=PU(),VXs=Rxe(),WXs="content_excluded";async function zXs(t,e,r,n){let o=(0,VXs.filterContextItemsByType)(r,"CodeSnippet");if(o.length===0)return[];let s=new Set,c=o.flatMap(h=>h.data.map(m=>(s.add(m.uri),m.additionalUris?.forEach(g=>s.add(g)),{providerId:h.providerId,data:m}))),l=t.get($Xs.ICompletionsContextProviderService),u=t.get(jXs.ICompletionsTextDocumentManagerService),d=new Map;await Promise.all(Array.from(s).map(async h=>{d.set(h,await u.getTextDocumentValidation({uri:h}))}));let p=l.getStatisticsForCompletion(e);return c.filter(h=>{let g=[h.data.uri,...h.data.additionalUris??[]].every(A=>d.get(A)?.status==="valid");return g?p.addExpectations(h.providerId,[[h.data,"included"]]):p.addExpectations(h.providerId,[[h.data,WXs]]),g}).map(h=>h.data)}a(zXs,"getCodeSnippetsFromContextItems");function YXs(t,e){return e.map(r=>({snippet:r,relativePath:t.getRelativePath(r)}))}a(YXs,"addRelativePathToCodeSnippets")});var xcr=T(pot=>{"use strict";f();Object.defineProperty(pot,"__esModule",{value:!0});pot.CodeSnippets=void 0;var dot=xD(),fot=SB(),KXs=xB(),JXs=Icr(),XXs=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(KXs.isCompletionRequestData,d=>{d.codeSnippets!==r&&n(d.codeSnippets),d.document.uri!==o?.uri&&s(d.document)}),!r||r.length===0||!o)return;let c=(0,JXs.addRelativePathToCodeSnippets)(t.tdms,r),l=new Map;for(let d of c){let p=d.relativePath??d.snippet.uri,h=l.get(p);h===void 0&&(h=[],l.set(p,h)),h.push(d)}let u=[];for(let[d,p]of l.entries()){let h=p.filter(m=>m.snippet.value.length>0);h.length>0&&u.push({chunkElements:h.map(m=>m.snippet),importance:Math.max(...h.map(m=>m.snippet.importance??0)),uri:d})}if(u.length!==0)return u.sort((d,p)=>p.importance-d.importance),u.reverse(),u.map(d=>{let p=[];return p.push((0,dot.jsx)(fot.Text,{children:`Compare ${d.chunkElements.length>1?"these snippets":"this snippet"} from ${d.uri}:`})),d.chunkElements.forEach((h,m)=>{p.push((0,dot.jsx)(fot.Text,{source:h,children:h.value},h.id)),d.chunkElements.length>1&&m{"use strict";f();Object.defineProperty(Cue,"__esModule",{value:!0});Cue.CompletionsContext=QZn;Cue.StableCompletionsContext=qZn;Cue.AdditionalCompletionsContext=GZn;Cue.isContextNode=ZXs;function QZn(t){return t.children}a(QZn,"CompletionsContext");function qZn(t){return t.children}a(qZn,"StableCompletionsContext");function GZn(t){return t.children}a(GZn,"AdditionalCompletionsContext");function ZXs(t){return t.name===QZn.name||t.name===qZn.name||t.name===GZn.name}a(ZXs,"isContextNode")});var Rcr=T(kxe=>{"use strict";f();Object.defineProperty(kxe,"__esModule",{value:!0});kxe.SnapshotWalker=void 0;kxe.defaultTransformers=HZn;var eZs=SB(),wcr=class{static{a(this,"SnapshotWalker")}constructor(e,r=HZn()){this.snapshot=e,this.transformers=r}walkSnapshot(e){this.walkSnapshotNode(this.snapshot,void 0,e,{})}walkSnapshotNode(e,r,n,o){let s=this.transformers.reduce((l,u)=>u(e,r,l),{...o});if(n(e,r,s))for(let l of e.children??[])this.walkSnapshotNode(l,e,n,s)}};kxe.SnapshotWalker=wcr;function HZn(){return[(t,e,r)=>{r.weight===void 0&&(r.weight=1);let n=t.props?.weight??1,o=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,weight:o*r.weight}},(t,e,r)=>{if(t.name===eZs.Chunk.name){let n=r.chunks?new Set(r.chunks):new Set;return n.add(t.path),{...r,chunks:n}}return r},(t,e,r)=>t.props?.source!==void 0?{...r,source:t.props.source}:r]}a(HZn,"defaultTransformers")});var jZn=T(Pcr=>{"use strict";f();Object.defineProperty(Pcr,"__esModule",{value:!0});Pcr.findEditDistanceScore=tZs;function tZs(t,e){if(t.length===0||e.length===0)return{score:t.length+e.length};let r=Array.from({length:t.length}).map(()=>Array.from({length:e.length}).map(()=>0));for(let n=0;n{"use strict";f();Object.defineProperty(CR,"__esModule",{value:!0});CR.MAX_EDIT_DISTANCE_LENGTH=void 0;CR.CurrentFile=oZs;CR.BeforeCursor=Ncr;CR.AfterCursor=Mcr;CR.DocumentPrefix=sZs;CR.DocumentSuffix=aZs;var zS=xD(),vue=SB(),rZs=aU(),nZs=jZn(),iZs=Yle(),kcr=xB();CR.MAX_EDIT_DISTANCE_LENGTH=50;function Dcr(t){let e=t*4,r=t*.1;return Math.floor(e+r)}a(Dcr,"approximateMaxCharacters");function oZs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData(kcr.isCompletionRequestData,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=Dcr(c);return(0,zS.jsxs)(zS.Fragment,{children:[(0,zS.jsx)(Ncr,{document:r,position:o,maxCharacters:m}),(0,zS.jsx)(Mcr,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})]})}a(oZs,"CurrentFile");function Ncr(t){if(t.document===void 0||t.position===void 0)return(0,zS.jsx)(vue.Text,{});let e=t.document.getText({start:{line:0,character:0},end:t.position});return e.length>t.maxCharacters&&(e=e.slice(-t.maxCharacters)),(0,zS.jsx)(vue.Text,{children:e})}a(Ncr,"BeforeCursor");function Mcr(t,e){let[r,n]=e.useState("");if(t.document===void 0||t.position===void 0)return(0,zS.jsx)(vue.Text,{});let o=t.document.getText({start:t.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}});o.length>t.maxCharacters&&(o=o.slice(0,t.maxCharacters));let s=o.replace(/^.*/,"").trimStart();if(s==="")return(0,zS.jsx)(vue.Text,{});if(r===s)return(0,zS.jsx)(vue.Text,{children:r});let c=s;if(r!==""){let l=(0,iZs.getTokenizer)(t.tokenizer),u=l.takeFirstTokens(s,CR.MAX_EDIT_DISTANCE_LENGTH),d=l.takeFirstTokens(r,CR.MAX_EDIT_DISTANCE_LENGTH);u.tokens.length>0&&d.tokens.length>0&&u.tokens[0]===d.tokens[0]&&100*(0,nZs.findEditDistanceScore)(u.tokens,d.tokens)?.score<(t.suffixMatchThreshold??rZs.DEFAULT_SUFFIX_MATCH_THRESHOLD)*u.tokens.length&&(c=r)}return c!==r&&n(c),(0,zS.jsx)(vue.Text,{children:c})}a(Mcr,"AfterCursor");function sZs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0);e.useData(kcr.isCompletionRequestData,d=>{let p=d.document;(d.document.uri!==r?.uri||p.getText()!==r?.getText())&&n(p),d.position!==o&&s(d.position),d.maxPromptTokens!==c&&l(d.maxPromptTokens)});let u=Dcr(c);return(0,zS.jsx)(Ncr,{document:r,position:o,maxCharacters:u})}a(sZs,"DocumentPrefix");function aZs(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData(kcr.isCompletionRequestData,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=Dcr(c);return(0,zS.jsx)(Mcr,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})}a(aZs,"DocumentSuffix")});var Bcr=T(tK=>{"use strict";f();Object.defineProperty(tK,"__esModule",{value:!0});tK.WishlistElision=void 0;tK.makePrompt=cZs;tK.makePrefixPrompt=lZs;tK.makeContextPrompt=uZs;var Ocr=class{static{a(this,"WishlistElision")}elide(e,r,n,o,s){if(r<=0)throw new Error("Prefix limit must be greater than 0");let[c,l]=this.preparePrefixBlocks(e,s),{elidedSuffix:u,adjustedPrefixTokenLimit:d}=this.elideSuffix(n,o,r,l,s),p=this.elidePrefix(c,d,l,s);return{blocks:[u,...p],cycles:1}}preparePrefixBlocks(e,r){let n=0,o=new Set;return[e.map((c,l)=>{let u=0,p=c.value.split(/([^\n]*\n+)/).filter(m=>m!=="").map(m=>{let g=r.tokenLength(m);return u+=g,n+=g,{line:m,componentPath:c.componentPath,tokens:g}}),h=c.componentPath;if(o.has(h))throw new Error(`Duplicate component path in prefix blocks: ${h}`);return o.add(h),{...c,tokens:u,markedForRemoval:!1,originalIndex:l,lines:p}}),n]}elideSuffix(e,r,n,o,s){let c=e.value;if(c.length===0||r<=0)return{elidedSuffix:{...e,tokens:0,elidedValue:"",elidedTokens:0},adjustedPrefixTokenLimit:n+Math.max(0,r)};o!p.markedForRemoval).flatMap(p=>p.lines);if(c.length===0)return[];let[l,u]=this.trimPrefixLinesToFit(c,r,o),d=u;return s.map(p=>{if(p.markedForRemoval)return d+p.tokens<=r&&!p.chunks?(d+=p.tokens,{...p,elidedValue:p.value,elidedTokens:p.tokens}):{...p,elidedValue:"",elidedTokens:0};let h=l.filter(g=>g.componentPath===p.componentPath&&g.line!=="").map(g=>g.line).join(""),m=p.tokens;return h!==p.value&&(m=h!==""?o.tokenLength(h):0),{...p,elidedValue:h,elidedTokens:m}})}removeLowWeightPrefixBlocks(e,r,n){let o=n;e.sort((s,c)=>s.weight-c.weight);for(let s of e){if(o<=r)break;if(s.weight!==1&&!(s.chunks&&s.markedForRemoval))if(s.chunks&&s.chunks.size>0)for(let c of e)!c.markedForRemoval&&c.chunks&&[...s.chunks].every(l=>c.chunks?.has(l))&&(c.markedForRemoval=!0,o-=c.tokens);else s.markedForRemoval=!0,o-=s.tokens}return e.sort((s,c)=>s.originalIndex-c.originalIndex)}trimPrefixLinesToFit(e,r,n){let o=0,s=[];for(let c=e.length-1;c>=0;c--){let l=e[c],u=l.tokens;if(o+u<=r)s.unshift(l),o+=u;else break}if(s.length===0){let c=e[e.length-1];if(c&&c.line.length>0){let u=n.takeLastTokens(c.line,r);return s.push({line:u.text,componentPath:c.componentPath,tokens:u.tokens.length}),[s,u.tokens.length]}let l=`Cannot fit prefix within limit of ${r} tokens`;throw new Error(l)}return[s,o]}};tK.WishlistElision=Ocr;function cZs(t){return t.map(e=>e.elidedValue).join("")}a(cZs,"makePrompt");function lZs(t){return t.filter(e=>e.type==="prefix").map(e=>e.elidedValue).join("")}a(lZs,"makePrefixPrompt");function uZs(t){if(t.length===0)return[];let e=new Map;for(let o of t)if(o.type==="context"&&o.index!==void 0){e.has(o.index)||e.set(o.index,[]);let s=o.elidedValue.trim();s.length>0&&e.get(o.index).push(s)}let r=Math.max(...Array.from(e.keys()),-1),n=[];for(let o=0;o<=r;o++){let s=e.get(o);if(s&&s.length>0){let c=s.join(` +`).trim();n.push(c)}else n.push("")}return n}a(uZs,"makeContextPrompt")});var Ucr=T(kU=>{"use strict";f();Object.defineProperty(kU,"__esModule",{value:!0});kU.transformers=kU.CompletionsPromptRenderer=void 0;kU.normalizeLineEndings=Fcr;var zZn=Rcr(),$Zn=yxe(),VZn=Yle(),dZs=Pxe(),hot=Dxe(),WZn=Bcr(),fZs=5,Lcr=class{static{a(this,"CompletionsPromptRenderer")}constructor(){this.renderId=0,this.formatPrefix=WZn.makePrompt}render(e,r,n){let o=this.renderId++,s=performance.now();try{if(n?.isCancellationRequested)return{status:"cancelled"};let c=r.delimiter??"",l=r.tokenizer??VZn.TokenizerName.o200k,{prefixBlocks:u,suffixBlock:d,componentStatistics:p}=this.processSnapshot(e,c,r.languageId),{prefixTokenLimit:h,suffixTokenLimit:m}=this.getPromptLimits(d,r),g=performance.now(),A=new WZn.WishlistElision,{blocks:[y,...E]}=A.elide(u,h,d,m,(0,VZn.getTokenizer)(l)),_=performance.now(),v=this.formatPrefix(E),b=this.formatContext?this.formatContext(E):void 0,I=y.elidedValue,x=E.reduce((w,R)=>w+R.elidedTokens,0);return p.push(...pZs([...E,y])),{prefix:v,prefixTokens:x,suffix:I,suffixTokens:y.elidedTokens,context:b,status:"ok",metadata:{renderId:o,rendererName:"c",tokenizer:l,elisionTimeMs:_-g,renderTimeMs:performance.now()-s,componentStatistics:p,updateDataTimeMs:p.reduce((w,R)=>w+(R.updateDataTimeMs??0),0)}}}catch(c){return{status:"error",error:c}}}getPromptLimits(e,r){let n=e?.value??"",o=r.promptTokenLimit,s=r.suffixPercent;if(n.length===0||s===0)return{prefixTokenLimit:o,suffixTokenLimit:0};o=n.length>0?o-fZs:o;let c=Math.ceil(o*(s/100));return{prefixTokenLimit:o-c,suffixTokenLimit:c}}processSnapshot(e,r,n){let o=[],s=[],c=[],l=!1;if(new zZn.SnapshotWalker(e,kU.transformers).walkSnapshot((p,h,m)=>{if(p===e||(p.name===hot.CurrentFile.name&&(l=!0),p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.value===void 0||p.value===""))return!0;let g=m.chunks;if(m.type==="suffix")s.push({value:Fcr(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let A=p.value.endsWith(r)?p.value:p.value+r,y=A;m.type==="prefix"?y=p.value:(0,$Zn.isShebangLine)(p.value)?y=A:y=(0,$Zn.commentBlockAsSingles)(A,n),o.push({type:m.type==="prefix"?"prefix":"context",value:Fcr(y),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source})}return!0}),!l)throw new Error(`Node of type ${hot.CurrentFile.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}};kU.CompletionsPromptRenderer=Lcr;kU.transformers=[...(0,zZn.defaultTransformers)(),(t,e,r)=>(0,dZs.isContextNode)(t)?{...r,type:"context"}:r,(t,e,r)=>t.name===hot.BeforeCursor.name?{...r,type:"prefix"}:r,(t,e,r)=>t.name===hot.AfterCursor.name?{...r,type:"suffix"}:r];function pZs(t){return t.map(e=>{let r={componentPath:e.componentPath};return e.tokens!==0&&(r.expectedTokens=e.tokens,r.actualTokens=e.elidedTokens),e.nodeStatistics.updateDataTimeMs!==void 0&&(r.updateDataTimeMs=e.nodeStatistics.updateDataTimeMs),e.source&&(r.source=e.source),r})}a(pZs,"computeComponentStatistics");function Fcr(t){return t.replace(/\r\n?/g,` +`)}a(Fcr,"normalizeLineEndings")});var mot=T(bue=>{"use strict";f();Object.defineProperty(bue,"__esModule",{value:!0});bue.ILanguageContextProviderService=bue.ProviderTarget=void 0;var hZs=qr(),YZn;(function(t){t.NES="nes",t.Completions="completions"})(YZn||(bue.ProviderTarget=YZn={}));bue.ILanguageContextProviderService=(0,hZs.createServiceIdentifier)("ILanguageContextProviderService")});var rK=T(Tue=>{"use strict";f();Object.defineProperty(Tue,"__esModule",{value:!0});Tue.RuntimeMode=Tue.ICompletionsRuntimeModeService=void 0;var mZs=qr();Tue.ICompletionsRuntimeModeService=(0,mZs.createServiceIdentifier)("completionsRuntimeModeService");var Qcr=class t{static{a(this,"RuntimeMode")}constructor(e){this.flags=e}static fromEnvironment(e,r=process.argv,n=process.env){return new t({debug:KZn(r,n),verboseLogging:AZs(r,n),testMode:e,simulation:gZs(n)})}isRunningInTest(){return this.flags.testMode}shouldFailForDebugPurposes(){return this.isRunningInTest()}isDebugEnabled(){return this.flags.debug}isVerboseLoggingEnabled(){return this.flags.verboseLogging}isRunningInSimulation(){return this.flags.simulation}};Tue.RuntimeMode=Qcr;function KZn(t,e){return t.includes("--debug")||qcr(e,"DEBUG")}a(KZn,"determineDebugFlag");function gZs(t){return qcr(t,"SIMULATION")}a(gZs,"determineSimulationFlag");function AZs(t,e){return e.COPILOT_AGENT_VERBOSE==="1"||e.COPILOT_AGENT_VERBOSE?.toLowerCase()==="true"||qcr(e,"VERBOSE")||KZn(t,e)}a(AZs,"determineVerboseLoggingEnabled");function qcr(t,e){for(let r of["GH_COPILOT_","GITHUB_COPILOT_"]){let n=t[`${r}${e}`];if(n)return n==="1"||n?.toLowerCase()==="true"}return!1}a(qcr,"determineEnvFlagEnabled")});var eei=T(Nxe=>{"use strict";f();Object.defineProperty(Nxe,"__esModule",{value:!0});Nxe.eventToPromise=yZs;Nxe.isArrayOfT=ZZn;Nxe.resolveAll=_Zs;var JZn=sxe();async function yZs(t){let e=new JZn.Deferred,r=t(n=>{e.resolve(n),r.dispose()});return e.promise}a(yZs,"eventToPromise");async function EZs(t){if(t.isCancellationRequested)return;let e=new JZn.Deferred,r=t.onCancellationRequested(()=>{e.resolve(),r.dispose()});await e.promise}a(EZs,"cancellationTokenToPromise");async function XZn(t,e){if(e){let r=EZs(e);await Promise.race([t,r])}else await t}a(XZn,"raceCancellation");function ZZn(t){return Array.isArray(t)}a(ZZn,"isArrayOfT");async function _Zs(t,e){let r=new Map,n=[];for(let[o,s]of t.entries()){let c=(async()=>{let l=await CZs(s,e);r.set(o,l)})();n.push(c)}return await Promise.allSettled(n.values()),r}a(_Zs,"resolveAll");async function CZs(t,e){let r;return t instanceof Promise?r=await vZs(t,e):r=await bZs(t,e),r}a(CZs,"resolve");async function vZs(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{let s=await t;if(e?.isCancellationRequested)return;n={status:"full",resolutionTime:0,value:ZZn(s)?[...s]:[s]}}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await XZn(o,e),n.resolutionTime=performance.now()-r,n}a(vZs,"resolvePromise");async function bZs(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{for await(let s of t){if(e?.isCancellationRequested)return;n.status!=="partial"&&(n={status:"partial",resolutionTime:0,value:[]}),n.value.push(s)}e?.isCancellationRequested||(n.status!=="partial"?n={status:"full",resolutionTime:0,value:[]}:n.status="full")}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await XZn(o,e),n.resolutionTime=performance.now()-r,n}a(bZs,"resolveIterable")});var tei=T(Hcr=>{"use strict";f();Object.defineProperty(Hcr,"__esModule",{value:!0});Hcr.fillInCppVSCodeActiveExperiments=xZs;var TZs=Hm(),Gcr=uc(),SZs={maxSnippetLength:3e3,maxSnippetCount:7,enabledFeatures:"Deferred",timeBudgetMs:7,doAggregateSnippets:!0},IZs="ms-vscode.cpptools";function xZs(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(IZs))&&wZs(t,r,n)}a(xZs,"fillInCppVSCodeActiveExperiments");function wZs(t,e,r){try{let n=t.get(TZs.ICompletionsFeaturesService),o=t.get(Gcr.ICompletionsLogTargetService),s=SZs,c=n.cppContextProviderParams(r);if(c)try{s=JSON.parse(c)}catch(l){Gcr.logger.error(o,"Failed to parse cppContextProviderParams",l)}else{let l=n.getContextProviderExpSettings("cpp")?.params;l&&(s={...l})}for(let[l,u]of Object.entries(s))e.set(l,u)}catch(n){Gcr.logger.exception(t,n,"fillInCppActiveExperiments")}}a(wZs,"addActiveExperiments")});var nei=T(jcr=>{"use strict";f();Object.defineProperty(jcr,"__esModule",{value:!0});jcr.fillInCSharpActiveExperiments=PZs;var RZs=Hm(),rei=uc();function PZs(t,e,r){let n=t.get(RZs.ICompletionsFeaturesService),o=t.get(rei.ICompletionsLogTargetService);try{let s=n.csharpContextProviderParams(r);if(s){let c=JSON.parse(s);for(let[l,u]of Object.entries(c))e.set(l,u)}else{let c=n.getContextProviderExpSettings("csharp")?.params;if(c)for(let[l,u]of Object.entries(c))e.set(l,u)}}catch(s){return rei.logger.debug(o,"Failed to get the active C# experiments for the Context Provider API",s),!1}return!0}a(PZs,"fillInCSharpActiveExperiments")});var iei=T(DU=>{"use strict";f();Object.defineProperty(DU,"__esModule",{value:!0});DU.multiLanguageContextProviderParamsDefault=void 0;DU.fillInMultiLanguageActiveExperiments=NZs;DU.getMultiLanguageContextProviderParamsFromActiveExperiments=BZs;var kZs=Hm(),$cr=uc(),DZs="fallbackContextProvider";DU.multiLanguageContextProviderParamsDefault={mlcpMaxContextItems:20,mlcpMaxSymbolMatches:20,mlcpEnableImports:!1};function NZs(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(DZs))&&MZs(t,r,n)}a(NZs,"fillInMultiLanguageActiveExperiments");function MZs(t,e,r){try{let n=OZs(t,r);for(let[o,s]of Object.entries(n))e.set(o,s)}catch(n){$cr.logger.exception(t,n,"fillInMultiLanguageActiveExperiments")}}a(MZs,"addActiveExperiments");function OZs(t,e){let r=DU.multiLanguageContextProviderParamsDefault,n=t.get($cr.ICompletionsLogTargetService),s=t.get(kZs.ICompletionsFeaturesService).multiLanguageContextProviderParams(e);if(s)try{r=JSON.parse(s)}catch(c){$cr.logger.error(n,"Failed to parse multiLanguageContextProviderParams",c)}return r}a(OZs,"getMultiLanguageContextProviderParamsFromExp");function BZs(t){let e={...DU.multiLanguageContextProviderParamsDefault};return t.has("mlcpMaxContextItems")&&(e.mlcpMaxContextItems=Number(t.get("mlcpMaxContextItems"))),t.has("mlcpMaxSymbolMatches")&&(e.mlcpMaxSymbolMatches=Number(t.get("mlcpMaxSymbolMatches"))),t.has("mlcpEnableImports")&&(e.mlcpEnableImports=String(t.get("mlcpEnableImports"))==="true"),e}a(BZs,"getMultiLanguageContextProviderParamsFromActiveExperiments")});var sei=T(Sue=>{"use strict";f();Object.defineProperty(Sue,"__esModule",{value:!0});Sue.TS_CONTEXT_PROVIDER_ID=void 0;Sue.fillInTsActiveExperiments=FZs;var LZs=Hm(),oei=uc();Sue.TS_CONTEXT_PROVIDER_ID="typescript-ai-context-provider";function FZs(t,e,r,n){if(!(e.length===1&&e[0]==="*"||e.includes(Sue.TS_CONTEXT_PROVIDER_ID)))return!1;let o=t.get(oei.ICompletionsLogTargetService),s=t.get(LZs.ICompletionsFeaturesService);try{let c=s.tsContextProviderParams(n);if(c){let l=JSON.parse(c);for(let[u,d]of Object.entries(l))r.set(u,d)}else{let l=s.getContextProviderExpSettings("typescript")?.params;if(l)for(let[u,d]of Object.entries(l))r.set(u,d)}}catch(c){return oei.logger.debug(o,"Failed to get the active TypeScript experiments for the Context Provider API",c),!1}return!0}a(FZs,"fillInTsActiveExperiments")});var yot=T(Sc=>{"use strict";f();var Kcr=Sc&&Sc.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},vR=Sc&&Sc.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.DefaultDiagnosticSettings=Sc.CachedContextProviderRegistry=Sc.MutableContextProviderRegistry=Sc.CoreContextProviderRegistry=Sc.DefaultContextProvidersContainer=Sc.ICompletionsDefaultContextProviders=Sc.ICompletionsContextProviderRegistryService=void 0;Sc.telemetrizeContextItems=WZs;Sc.matchContextItems=zZs;Sc.useContextProviderAPI=KZs;Sc.getDefaultDiagnosticSettings=XZs;var UZs=Dn(),aei=ac(),Jcr=mot(),QZs=cd(),uei=qr(),qZs=Ko(),Xcr=Po(),got=Gm(),dei=Hm(),GZs=yB(),wB=uc(),Zcr=rK(),cei=eei(),HZs=tei(),jZs=nei(),$Zs=iei(),VZs=sei(),lei=Rxe(),fei=PU();Sc.ICompletionsContextProviderRegistryService=(0,uei.createServiceIdentifier)("ICompletionsContextProviderRegistryService");Sc.ICompletionsDefaultContextProviders=(0,uei.createServiceIdentifier)("ICompletionsDefaultContextProviders");var Vcr=class{static{a(this,"DefaultContextProvidersContainer")}constructor(){this.ids=[]}add(e){this.ids.push(e)}getIds(){return this.ids}};Sc.DefaultContextProvidersContainer=Vcr;var Aot=class{static{a(this,"CoreContextProviderRegistry")}constructor(e,r,n,o,s,c){this.match=e,this.registryService=r,this.runtimeMode=n,this.instantiationService=o,this.logTarget=s,this.contextProviderStatistics=c}registerContextProvider(e){throw new Error("Should not be call. Use ILanguageContextProviderService")}unregisterContextProvider(e){throw new Error("Should not be call. Use ILanguageContextProviderService")}get providers(){return this.registryService.getAllProviders([Jcr.ProviderTarget.Completions]).slice()}async resolveAllProviders(e,r,n,o,s,c){if(s?.isCancellationRequested)return wB.logger.debug(this.logTarget,"Resolving context providers cancelled"),[];let l=new Map;this.instantiationService.invokeFunction(jZs.fillInCSharpActiveExperiments,l,o);let u=[],d=this.providers;if(d.length===0)return u;let p=await this.matchProviders(d,n,o),h=p.filter(x=>x[1]>0);if(p.filter(x=>x[1]<=0).forEach(([x,w])=>{let R={providerId:x.id,matchScore:w,resolution:"none",resolutionTimeMs:0,data:[]};u.push(R)}),h.length===0)return u;if(s?.isCancellationRequested)return wB.logger.debug(this.logTarget,"Resolving context providers cancelled"),[];this.instantiationService.invokeFunction(HZs.fillInCppVSCodeActiveExperiments,h.map(x=>x[0].id),l,o),this.instantiationService.invokeFunction($Zs.fillInMultiLanguageActiveExperiments,h.map(x=>x[0].id),l,o),this.instantiationService.invokeFunction(VZs.fillInTsActiveExperiments,h.map(x=>x[0].id),l,o);let g=new UZs.CancellationTokenSource;if(s){let x=s.onCancellationRequested(w=>{g.cancel(),x.dispose()})}let A=this.runtimeMode.isDebugEnabled()&&!this.runtimeMode.isRunningInSimulation()?0:this.instantiationService.invokeFunction(JZs,n.languageId,o),y=A>0?Date.now()+A:Number.MAX_SAFE_INTEGER,E;A>0&&(E=setTimeout(()=>{g.cancel(),g.dispose()},A));let _=new Map,v={completionId:e,opportunityId:r,documentContext:n,activeExperiments:l,timeBudget:A,timeoutEnd:y,data:c};for(let[x]of h){let w=this.contextProviderStatistics.getPreviousStatisticsForCompletion(e)?.get(x.id);w&&(v.previousUsageStatistics=w);let R=x.resolver.resolve(v,g.token);_.set(x.id,R)}let b=this.contextProviderStatistics.getStatisticsForCompletion(e);b.setOpportunityId(r);let I=await(0,cei.resolveAll)(_,g.token);E&&clearTimeout(E);for(let[x,w]of h){let R=I.get(x.id);if(R){if(R.status==="error")(0,qZs.isCancellationError)(R.reason)||wB.logger.error(this.logTarget,`Error resolving context from ${x.id}: `,R.reason),u.push({providerId:x.id,matchScore:w,resolution:R.status,resolutionTimeMs:R.resolutionTime,data:[]});else{let P=[...R.value??[]];if((R.status==="none"||R.status==="partial")&&(wB.logger.info(this.logTarget,`Context provider ${x.id} exceeded time budget of ${A}ms`),x.resolver.resolveOnTimeout))try{let G=x.resolver.resolveOnTimeout(v);(0,cei.isArrayOfT)(G)?P.push(...G):G&&P.push(G),P.length>0&&(R.status="partial")}catch(G){wB.logger.error(this.logTarget,`Error in fallback logic for context provider ${x.id}: `,G)}let[k,Q]=(0,lei.filterSupportedContextItems)(P);Q&&wB.logger.error(this.logTarget,`Dropped ${Q} context items from ${x.id} due to invalid schema`);let M=this.instantiationService.invokeFunction(lei.addOrValidateContextItemsIDs,k),N={providerId:x.id,matchScore:w,resolution:R.status,resolutionTimeMs:R.resolutionTime,data:M};u.push(N)}b.setLastResolution(x.id,R.status)}else wB.logger.error(this.logTarget,`Context provider ${x.id} not found in results`)}return u.sort((x,w)=>w.matchScore-x.matchScore)}async matchProviders(e,r,n){let o=this.instantiationService.invokeFunction(pei,r.languageId,n),s=o.length===1&&o[0]==="*";return await Promise.all(e.map(async l=>{if(!s&&!o.includes(l.id))return[l,0];let u=await this.match(this.instantiationService,l.selector,r);return[l,u]}))}};Sc.CoreContextProviderRegistry=Aot;Sc.CoreContextProviderRegistry=Aot=Kcr([vR(1,Jcr.ILanguageContextProviderService),vR(2,Zcr.ICompletionsRuntimeModeService),vR(3,Xcr.IInstantiationService),vR(4,wB.ICompletionsLogTargetService),vR(5,fei.ICompletionsContextProviderService)],Aot);var Wcr=class extends Aot{static{a(this,"MutableContextProviderRegistry")}constructor(e,r,n,o,s,c){super(e,r,n,o,s,c),this._providers=[]}registerContextProvider(e){if(e.id.includes(",")||e.id.includes("*"))throw new Error(`A context provider id cannot contain a comma or an asterisk. The id ${e.id} is invalid.`);if(this._providers.find(r=>r.id===e.id))throw new Error(`A context provider with id ${e.id} has already been registered`);this._providers.push(e)}unregisterContextProvider(e){this._providers=this._providers.filter(r=>r.id!==e)}get providers(){return this._providers.slice().concat(super.providers)}};Sc.MutableContextProviderRegistry=Wcr;Sc.MutableContextProviderRegistry=Wcr=Kcr([vR(1,Jcr.ILanguageContextProviderService),vR(2,Zcr.ICompletionsRuntimeModeService),vR(3,Xcr.IInstantiationService),vR(4,wB.ICompletionsLogTargetService),vR(5,fei.ICompletionsContextProviderService)],Wcr);var zcr=class{static{a(this,"CachedContextProviderRegistry")}constructor(e,r,n){this._cachedContextItems=new GZs.LRUCacheMap(5),this.delegate=n.createInstance(e,r)}registerContextProvider(e){this.delegate.registerContextProvider(e)}unregisterContextProvider(e){this.delegate.unregisterContextProvider(e)}get providers(){return this.delegate.providers}async resolveAllProviders(e,r,n,o,s,c){let l=this._cachedContextItems.get(e);if(e&&l&&l.length>0)return l;let u=await this.delegate.resolveAllProviders(e,r,n,o,s,c);return u.length>0&&e&&this._cachedContextItems.set(e,u),u}};Sc.CachedContextProviderRegistry=zcr;Sc.CachedContextProviderRegistry=zcr=Kcr([vR(2,Xcr.IInstantiationService)],zcr);function WZs(t,e,r){let n=t.getStatisticsForCompletion(e);return r.map(s=>{let{providerId:c,resolution:l,resolutionTimeMs:u,matchScore:d,data:p}=s,h=n.get(c),m=h?.usage??"none";(d<=0||l==="none"||l==="error")&&(m="none");let g={providerId:c,resolution:l,resolutionTimeMs:u,usage:m,usageDetails:h?.usageDetails,matched:d>0,numResolvedItems:p.length},A=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="full"||E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0,y=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0;return A!==void 0&&(g.numUsedItems=A),y!==void 0&&(g.numPartiallyUsedItems=y),g})}a(WZs,"telemetrizeContextItems");function zZs(t){return t.matchScore>0&&t.resolution!=="error"}a(zZs,"matchContextItems");function pei(t,e,r){let n=YZs(t,e,r),o=(0,got.getConfig)(t,got.ConfigKey.ContextProviders)??[];if(n.length===1&&n[0]==="*"||o.length===1&&o[0]==="*")return["*"];let s=t.get(Sc.ICompletionsDefaultContextProviders).getIds();return Array.from(new Set([...s,...n,...o]))}a(pei,"getActiveContextProviders");function YZs(t,e,r){if(t.get(Zcr.ICompletionsRuntimeModeService).isDebugEnabled())return["*"];let n=t.get(dei.ICompletionsFeaturesService),o=n.contextProviders(r),s=n.getContextProviderExpSettings(e);if(s!==void 0)for(let c of s.ids)o.includes(c)||o.push(c);return o}a(YZs,"getExpContextProviders");function KZs(t,e,r){return pei(t,e,r).length>0}a(KZs,"useContextProviderAPI");function JZs(t,e,r){let n=(0,got.getConfig)(t,got.ConfigKey.ContextProviderTimeBudget);return n!==void 0&&typeof n=="number"?n:t.get(dei.ICompletionsFeaturesService).contextProviderTimeBudget(e,r)}a(JZs,"getContextProviderTimeBudget");var Ycr;(function(t){function e(n){if(n)try{let o=JSON.parse(n);if(o.warnings===void 0&&o.maxDiagnostics===void 0&&o.maxLineDistance===void 0)return;let s=r(o),c=typeof o.maxLineDistance=="number"&&o.maxLineDistance>=0?o.maxLineDistance:10,l=typeof o.maxDiagnostics=="number"&&o.maxDiagnostics>0?o.maxDiagnostics:5;return{warnings:s,maxLineDistance:c,maxDiagnostics:l}}catch{return}}a(e,"from"),t.from=e;function r(n){let o=n?.warnings;return o==="yes"||o==="no"||o==="yesIfNoErrors"?o:"no"}a(r,"getWarnings")})(Ycr||(Sc.DefaultDiagnosticSettings=Ycr={}));function XZs(t){let e=t.get(aei.IConfigurationService),r=t.get(QZs.IExperimentationService),n=e.getExperimentBasedConfig(aei.ConfigKey.TeamInternal.InlineCompletionsDefaultDiagnosticsOptions,r);if(typeof n=="string")return Ycr.from(n)}a(XZs,"getDefaultDiagnosticSettings")});var Eot=T(bR=>{"use strict";f();var ZZs=bR&&bR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},eea=bR&&bR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(bR,"__esModule",{value:!0});bR.ContextProviderBridge=bR.ICompletionsContextProviderBridgeService=void 0;var tea=qr(),rea=yB(),nea=yot();bR.ICompletionsContextProviderBridgeService=(0,tea.createServiceIdentifier)("ICompletionsContextProviderBridgeService");var elr=class{static{a(this,"ContextProviderBridge")}constructor(e){this.contextProviderRegistry=e,this.scheduledResolutions=new rea.LRUCacheMap(25)}schedule(e,r,n,o,s,c){let{textDocument:l,originalPosition:u,originalOffset:d,originalVersion:p,editsWithPosition:h}=e,m=this.contextProviderRegistry.resolveAllProviders(r,n,{uri:l.uri,languageId:l.detectedLanguageId,version:p,offset:d,position:u,proposedEdits:h.length>0?h:void 0},o,s,c?.data);this.scheduledResolutions.set(r,m)}async resolution(e){let r=this.scheduledResolutions.get(e);return r?await r:[]}};bR.ContextProviderBridge=elr;bR.ContextProviderBridge=elr=ZZs([eea(0,nea.ICompletionsContextProviderRegistryService)],elr)});var nlr=T(_ot=>{"use strict";f();Object.defineProperty(_ot,"__esModule",{value:!0});_ot.Diagnostics=void 0;var tlr=xD(),iea=kp(),rlr=SB(),oea=aU(),sea=xB();function aea(t){if(t.code!==void 0){if(typeof t.code=="string")return t.code;if(typeof t.code=="number")return t.code.toString();if(typeof t.code=="object"&&t.code!==null&&t.code.value)return t.code.value.toString()}}a(aea,"getCode");function cea(t,e){return t.getRelativePath({uri:e.uri.toString()})??e.uri.path}a(cea,"getRelativePath");var lea=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(),[u,d]=e.useState();if(e.useData(sea.isCompletionRequestData,h=>{h.diagnostics!==r&&n(h.diagnostics);let m=(0,oea.normalizeLanguageId)(h.document.detectedLanguageId);m!==o&&s(m),h.position!==c&&l(h.position),h.document.uri!==u?.uri&&d(h.document)}),!r||r.length===0||!o)return;let p=r.filter(h=>h.values.length>0);if(p.length!==0)return p.sort((h,m)=>(m.importance??0)-(h.importance??0)),p.reverse(),p.map(h=>{let m=[];m.push((0,tlr.jsx)(rlr.Text,{source:h,children:`Consider the following ${o} diagnostics from ${cea(t.tdms,h)}:`},h.id));let g=h.values;return u!==void 0&&u.uri.toString()===h.uri.toString()&&c!==void 0&&(g=h.values.slice(),g.sort((A,y)=>{let E=Math.abs(A.range.start.line-c.line),_=Math.abs(y.range.start.line-c.line);return E-_})),g.forEach(A=>{let y="",E=aea(A);E!==void 0&&(y=` ${A.source?A.source.toUpperCase():""}${E}`);let _=A.range.start;m.push((0,tlr.jsx)(rlr.Text,{children:`${_.line+1}:${_.character+1} - ${iea.DiagnosticSeverity[A.severity].toLowerCase()}${y}: ${A.message}`}))}),(0,tlr.jsx)(rlr.Chunk,{children:m})})},"Diagnostics");_ot.Diagnostics=lea});var ilr=T(vot=>{"use strict";f();Object.defineProperty(vot,"__esModule",{value:!0});vot.DocumentMarker=void 0;var Cot=xD(),hei=SB(),mei=yxe(),uea=xB(),dea=a((t,e)=>{let[r,n]=e.useState();if(e.useData(uea.isCompletionRequestData,o=>{o.document.uri!==r?.uri&&n(o.document)}),r){let o=t.tdms.getRelativePath(r),s={uri:r.uri,source:r.getText(),relativePath:o,languageId:r.detectedLanguageId},c=t.tdms.findNotebook(r);return s.relativePath&&!c?(0,Cot.jsx)(fea,{docInfo:s}):(0,Cot.jsx)(pea,{docInfo:s})}},"DocumentMarker");vot.DocumentMarker=dea;var fea=a(t=>(0,Cot.jsx)(hei.Text,{children:(0,mei.getPathMarker)(t.docInfo)}),"PathMarker"),pea=a(t=>(0,Cot.jsx)(hei.Text,{children:(0,mei.getLanguageMarker)(t.docInfo)}),"LanguageMarker")});var olr=T(Mxe=>{"use strict";f();Object.defineProperty(Mxe,"__esModule",{value:!0});Mxe.RecentEdits=void 0;Mxe.editIsTooCloseToCursor=yei;var gei=xD(),Aei=SB(),bot=yxe(),hea=xB();function yei(t,e=!1,r=void 0,n){if(e&&(r===void 0||n===void 0))throw new Error("cursorLine and activeDocDistanceLimitFromCursor are required when filterByCursorLine is true");let o=t.startLine-1,s=t.endLine-1;return!!(e&&(Math.abs(o-r)<=n||Math.abs(s-r)<=n))}a(yei,"editIsTooCloseToCursor");var mea=a((t,e)=>{let[r,n]=e.useState();return e.useData(hea.isCompletionRequestData,async o=>{if(!o.document)return;let s=t.recentEditsProvider;if(s.isEnabled())s.start();else return;let c=s.config,l=s.getRecentEdits(),u=new Set,d=t.tdms,p=[];for(let m=l.length-1;m>=0&&!(p.length>=c.maxEdits);m--){let g=l[m];if(!await d.getTextDocument({uri:g.file}))continue;let A=!u.has(g.file);if(u.size+(A?1:0)>c.maxFiles)break;let E=g.file===o.document?.uri,_=E?o.position.line:void 0;if(yei(g,E,_,c.activeDocDistanceLimitFromCursor))continue;let b=s.getEditSummary(g);if(b){u.add(g.file);let I=d.getRelativePath({uri:g.file});p.unshift((0,bot.newLineEnded)(`File: ${I}`)+(0,bot.newLineEnded)(b))}}if(p.length===0){n(void 0);return}let h=(0,bot.newLineEnded)("These are recently edited files. Do not suggest code that has been deleted.")+p.join("")+(0,bot.newLineEnded)("End of recent edits");n(h)}),r?(0,gei.jsx)(Aei.Chunk,{children:(0,gei.jsx)(Aei.Text,{children:r})}):void 0},"RecentEdits");Mxe.RecentEdits=mea});var Eei=T(PD=>{"use strict";f();Object.defineProperty(PD,"__esModule",{value:!0});PD.registerDocumentTracker=PD.accessTimes=void 0;PD.sortByAccessTimes=yea;var gea=yB(),Aea=aC();PD.accessTimes=new gea.LRUCacheMap;function yea(t){return[...t].sort((e,r)=>{let n=PD.accessTimes.get(e.uri)??0;return(PD.accessTimes.get(r.uri)??0)-n})}a(yea,"sortByAccessTimes");var Eea=a(t=>t.get(Aea.ICompletionsTextDocumentManagerService).onDidFocusTextDocument(e=>{e.document&&PD.accessTimes.set(e.document.uri.toString(),Date.now())}),"registerDocumentTracker");PD.registerDocumentTracker=Eea});var _ei=T(RB=>{"use strict";f();var _ea=RB&&RB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Cea=RB&&RB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(RB,"__esModule",{value:!0});RB.OpenTabFiles=void 0;var vea=Eei(),bea=aC(),slr=Iue(),alr=class{static{a(this,"OpenTabFiles")}constructor(e){this.docManager=e}truncateDocs(e,r,n,o){let s=new Map,c=0;for(let l of e)if(!(c+l.getText().length>slr.NeighborSource.MAX_NEIGHBOR_AGGREGATE_LENGTH)&&(l.uri.startsWith("file:")&&r.startsWith("file:")&&l.uri!==r&&(0,slr.considerNeighborFile)(n,l.detectedLanguageId)&&(s.set(l.uri.toString(),{uri:l.uri.toString(),relativePath:this.docManager.getRelativePath(l),source:l.getText()}),c+=l.getText().length),s.size>=o))break;return s}async getNeighborFiles(e,r,n){let o=new Map,s=new Map;return o=this.truncateDocs((0,vea.sortByAccessTimes)(await this.docManager.textDocuments()),e,r,n),s.set(slr.NeighboringFileType.OpenTabs,Array.from(o.keys()).map(c=>c.toString())),{docs:o,neighborSource:s}}};RB.OpenTabFiles=alr;RB.OpenTabFiles=alr=_ea([Cea(0,bea.ICompletionsTextDocumentManagerService)],alr)});var Cei=T(clr=>{"use strict";f();Object.defineProperty(clr,"__esModule",{value:!0});clr.shortCircuit=Tea;function Tea(t,e,r){return async function(...n){return await Promise.race([t.apply(this,n),new Promise(o=>{setTimeout(o,e,r)})])}}a(Tea,"shortCircuit")});var Rot=T(Ic=>{"use strict";f();var Sea=Ic&&Ic.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Tot=Ic&&Ic.__param||function(t,e){return function(r,n){e(r,n,t)}},llr;Object.defineProperty(Ic,"__esModule",{value:!0});Ic.RelatedFilesProvider=Ic.ICompletionsRelatedFilesProviderService=Ic.relatedFilesLogger=Ic.PromiseExpirationCacheMap=Ic.EmptyRelatedFilesResponse=void 0;Ic.getRelatedFilesAndTraits=Oea;var Iea=LY(),xea=qr(),wea=Eu(),flr=Po(),Rea=fU(),Pea=yB(),wot=uc(),kea=xp(),Dea=Cei();Ic.EmptyRelatedFilesResponse={entries:[],traits:[]};var Sot={entries:new Map,traits:[]},Iot=class extends Pea.LRUCacheMap{static{a(this,"PromiseExpirationCacheMap")}constructor(e,r=120*1e3){super(e),this.defaultEvictionTimeMs=r,this._cacheTimestamps=new Map}bumpRetryCount(e){let r=this._cacheTimestamps.get(e);return r?++r.retryCount:(this._cacheTimestamps.set(e,{timestamp:Date.now(),retryCount:0}),0)}has(e){return this.isValid(e)?super.has(e):(this.deleteExpiredEntry(e),!1)}get(e){let r=super.get(e);if(this.isValid(e))return r;this.deleteExpiredEntry(e)}set(e,r){let n=super.set(e,r);return this.isValid(e)||this._cacheTimestamps.set(e,{timestamp:Date.now(),retryCount:0}),n}clear(){super.clear(),this._cacheTimestamps.clear()}isValid(e){let r=this._cacheTimestamps.get(e);return r!==void 0&&Date.now()-r.timestampIc.relatedFilesLogger.exception(o,n,"isContentExcluded"))}return!0}static dropBOM(e){return e.charCodeAt(0)===65279?e.slice(1):e}};Ic.RelatedFilesProvider=ulr;Ic.RelatedFilesProvider=ulr=llr=Sea([Tot(0,flr.IInstantiationService),Tot(1,Iea.IIgnoreService),Tot(2,wot.ICompletionsLogTargetService),Tot(3,Rea.ICompletionsFileSystemService)],ulr);var Mea=3,Oxe=new Iot(Nea);async function vei(t,e,r,n,o){let s=t.get(flr.IInstantiationService),c=t.get(wot.ICompletionsLogTargetService),l=performance.now(),u;try{u=await o.getRelatedFiles(e,r,n)}catch(p){s.invokeFunction(h=>Ic.relatedFilesLogger.exception(h,p,".getRelatedFiles")),u=void 0}u===void 0&&(Oxe.bumpRetryCount(e.uri)>=Mea?u=Sot:u=void 0);let d=performance.now()-l;if(Ic.relatedFilesLogger.debug(c,u!==void 0?`Fetched ${[...u.entries.values()].map(p=>p.size).reduce((p,h)=>p+h,0)} related files for '${e.uri}' in ${d}ms.`:`Failing fetching files for '${e.uri}' in ${d}ms.`),u===void 0)throw new xot;return u}a(vei,"getRelatedFiles");var dlr=a(function(t,e,r,n,o){let s=`${e.uri}`;if(Oxe.has(s))return Oxe.get(s);let c=vei(t,e,r,n,o);return c instanceof Promise&&(c=c.catch(l=>{throw Oxe.delete(s),l})),Oxe.set(s,c),c},"getRelatedFilesWithCacheAndTimeout");dlr=(0,Dea.shortCircuit)(dlr,200,Sot);async function Oea(t,e,r,n,o,s=!1){let c=t.get(flr.IInstantiationService),l=t.get(wot.ICompletionsLogTargetService),u=t.get(Ic.ICompletionsRelatedFilesProviderService),d=Sot;try{let p={uri:e.uri,clientLanguageId:e.clientLanguageId,data:o};d=s?await c.invokeFunction(vei,p,r,n,u):await c.invokeFunction(dlr,p,r,n,u)}catch(p){d=Sot,p instanceof xot&&c.invokeFunction(kea.telemetry,"getRelatedFilesList",r)}return Ic.relatedFilesLogger.debug(l,d!=null?`Fetched following traits ${d.traits.map(p=>`{${p.name} : ${p.value}}`).join("")} for '${e.uri}'`:`Failing fecthing traits for '${e.uri}'.`),d}a(Oea,"getRelatedFilesAndTraits")});var Iue=T(NU=>{"use strict";f();Object.defineProperty(NU,"__esModule",{value:!0});NU.NeighborSource=NU.NeighboringFileType=void 0;NU.considerNeighborFile=Qea;NU.isIncludeNeighborFilesActive=qea;var Bea=Po(),bei=aU(),Sei=Hm(),Lea=uc(),Fea=aC(),Uea=_ei(),Pot=Rot(),Tei;(function(t){t.None="none",t.OpenTabs="opentabs",t.CursorMostRecent="cursormostrecent",t.CursorMostCount="cursormostcount",t.WorkspaceSharingSameFolder="workspacesharingsamefolder",t.WorkspaceSmallestPathDist="workspacesmallestpathdist",t.OpenTabsAndCocommitted="opentabsandcocommitted",t.RelatedCSharp="related/csharp",t.RelatedCSharpRoslyn="related/csharproslyn",t.RelatedCpp="related/cpp",t.RelatedTypeScript="related/typescript",t.RelatedCppSemanticCodeContext="related/cppsemanticcodecontext",t.RelatedOther="related/other"})(Tei||(NU.NeighboringFileType=Tei={}));function Qea(t,e){return(0,bei.normalizeLanguageId)(t)===(0,bei.normalizeLanguageId)(e)}a(Qea,"considerNeighborFile");var plr=class t{static{a(this,"NeighborSource")}static{this.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5}static{this.MAX_NEIGHBOR_FILES=20}static{this.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"]}static defaultEmptyResult(){return{docs:new Map,neighborSource:new Map,traits:[]}}static reset(){t.instance=void 0}static async getNeighborFilesAndTraits(e,r,n,o,s,c,l){let u=e.get(Sei.ICompletionsFeaturesService),d=e.get(Lea.ICompletionsLogTargetService),p=e.get(Bea.IInstantiationService),h=e.get(Fea.ICompletionsTextDocumentManagerService);t.instance===void 0&&(t.instance=p.createInstance(Uea.OpenTabFiles));let m={...await t.instance.getNeighborFiles(r,n,t.MAX_NEIGHBOR_FILES),traits:[]};if(u.excludeRelatedFiles(n,o))return m;let g=await h.getTextDocument({uri:r});if(!g)return Pot.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: failed to get the document ${r}`),m;let A=h.getWorkspaceFolder(g);if(!A)return Pot.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: ${r} is not under the workspace folder`),m;let y=await p.invokeFunction(Pot.getRelatedFilesAndTraits,g,o,s,c,l);return y.entries.size===0?(Pot.relatedFilesLogger.debug(d,"neighborFiles.getNeighborFilesAndTraits",`0 related files found for ${r}`),m.traits.push(...y.traits),m):(y.entries.forEach((E,_)=>{let v=[];E.forEach((b,I)=>{let x=t.getRelativePath(I,A.uri);if(!x||m.docs.has(I))return;let w={relativePath:x,uri:I,source:b};v.unshift(w),m.docs.set(I,w)}),v.length>0&&m.neighborSource.set(_,v.map(b=>b.uri.toString()))}),m.traits.push(...y.traits),m)}static basename(e){return decodeURIComponent(e.replace(/[#?].*$/,"").replace(/^.*[/:]/,""))}static getRelativePath(e,r){let n=r.toString().replace(/[#?].*/,"").replace(/\/?$/,"/");return e.toString().startsWith(n)?e.toString().slice(n.length):t.basename(e)}};NU.NeighborSource=plr;function qea(t,e,r){return t.get(Sei.ICompletionsFeaturesService).includeNeighboringFiles(e,r)}a(qea,"isIncludeNeighborFilesActive")});var mlr=T(kot=>{"use strict";f();Object.defineProperty(kot,"__esModule",{value:!0});kot.SimilarFiles=void 0;var xue=xD(),hlr=SB(),Gea=Fit(),Hea=Jor(),jea=Qit(),$ea=xB(),Vea=wue(),Iei=Iue(),Wea=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState([]);e.useData($ea.isCompletionRequestData,async u=>{u.document.uri!==r?.uri&&s([]),n(u.document);let d=Iei.NeighborSource.defaultEmptyResult();u.turnOffSimilarFiles||(d=await t.instantiationService.invokeFunction(async h=>await Iei.NeighborSource.getNeighborFilesAndTraits(h,u.document.uri,u.document.detectedLanguageId,u.telemetryData,u.cancellationToken,u.data)));let p=await c(u.telemetryData,u.document,u,d);s(p)});async function c(u,d,p,h){let m=t.instantiationService.invokeFunction(Vea.getPromptOptions,u,d.detectedLanguageId);return(await l(m,u,d,p,h)).filter(A=>A.snippet.length>0).sort((A,y)=>A.score-y.score).map(A=>({...(0,Hea.announceSnippet)(A),score:A.score}))}a(c,"produceSimilarFiles");async function l(u,d,p,h,m){let g=u.similarFilesOptions||t.instantiationService.invokeFunction(jea.getSimilarFilesOptions,d,p.detectedLanguageId),y=t.tdms.getRelativePath(p),E={uri:p.uri,source:p.getText(),offset:p.offsetAt(h.position),relativePath:y,languageId:p.detectedLanguageId};return await(0,Gea.getSimilarSnippets)(E,Array.from(m.docs.values()),g)}return a(l,"findSimilarSnippets"),(0,xue.jsxs)(xue.Fragment,{children:[...o.map((u,d)=>(0,xue.jsx)(zea,{snippet:u}))]})},"SimilarFiles");kot.SimilarFiles=Wea;var zea=a((t,e)=>(0,xue.jsxs)(hlr.Chunk,{children:[(0,xue.jsx)(hlr.Text,{children:t.snippet.headline}),(0,xue.jsx)(hlr.Text,{children:t.snippet.snippet})]}),"SimilarFile")});var Mei=T($v=>{"use strict";f();Object.defineProperty($v,"__esModule",{value:!0});$v.getAllRecentEditsByTimestamp=Yea;$v.findChangeSpan=glr;$v.getDiff=wei;$v.unifiedDiff=Rei;$v.findReplaceDiff=Pei;$v.editsOverlap=kei;$v.updateEdits=Dei;$v.buildIncomingEdit=Alr;$v.trimOldFilesFromState=Nei;$v.recentEditsReducer=Xea;$v.summarizeEdit=Zea;function Yea(t){return Object.values(t).flatMap(e=>e.edits).sort((e,r)=>e.timestamp-r.timestamp)}a(Yea,"getAllRecentEditsByTimestamp");function glr(t,e){let r=0;for(;r=r&&o>=r&&t[n]===e[o];)n--,o--;return r>n&&r>o?null:{start:r,endPrev:n,endNew:o}}a(glr,"findChangeSpan");function wei(t,e,r,n,o,s,c){let l=Math.max(0,n-c),u=Math.min(r.length,s+c+1);return{file:t,pre:l,post:u,before:e.slice(l,n),removed:e.slice(n,o+1),added:r.slice(n,s+1),after:r.slice(s+1,u)}}a(wei,"getDiff");function Kea(t){return[...t.before,...t.removed,...t.added,...t.after].reduce((r,n)=>r+n.length+1,0)}a(Kea,"measureDiffSize");function Rei(t,e=!1,r=!1,n=!1){let o=[];o.push(`--- a/${t.file}`),o.push(`+++ b/${t.file}`);let s=t.before.length+t.removed.length+t.after.length,c=t.before.length+t.added.length+t.after.length;o.push(`@@ -${t.pre+1},${s} +${t.pre+1},${c} @@`);for(let l of t.before)o.push(" "+l);if(r)for(let l of t.added)o.push("+"+l);if(!e){let l=n?" --- IGNORE ---":"";for(let u of t.removed)o.push("-"+u+l)}if(!r)for(let l of t.added)o.push("+"+l);for(let l of t.after)o.push(" "+l);return o.join(` `)+` -`}a(PZn,"unifiedDiff");function KXs(t,e=!1){let{before:r,removed:n,added:o,after:s}=t,c=[];return c.push(">>>>>>> SEARCH"),c.push(...r),e?c.push("..."):c.push(...n),c.push(...s),c.push("======="),c.push(...r),c.push(...o),c.push(...s),c.push("<<<<<<<<< REPLACE"),c.join(` -`)}a(KXs,"aidersDiff");function kZn(t,e=!1){let{before:r,removed:n,added:o,after:s}=t,c=e?["..."]:n.map(p=>`${p} --- DO NOT REPLY WITH CODE FROM THIS LINE ---`),l=[...r,...c,...s],u=[...r,...o,...s],d=[];return d.push("--- User edited code: ---"),d.push(...l),c.length===0?d.push(`--- and added ${o.length} line${o.length===1?"":"s"} to make: ---`):o.length===0?d.push(`--- and deleted ${c.length} line${c.length===1?"":"s"} to make: ---`):d.push("--- and replaced it with: ---"),d.push(...u),d.push("--- End of edit ---"),d.join(` -`)}a(kZn,"findReplaceDiff");function wZn(t,e){for(let r of e){let n=t.slice(0,r.startLine),o=t.slice(r.endLine+1),s=r.diff.added?r.diff.added:[];t=[...n,...s,...o]}return t}a(wZn,"applyEditsToLines");function NZn(t,e,r){let{added:n}=e.diff,o=e.startLine,s=e.startLine+n.length,c=t.startLine,l=t.endLine+1;return c<=s+r&&l>=o-r}a(NZn,"editsOverlap");function DZn(t,e,r,n,o){let s=[...e];if(s.length>0){let c=s[s.length-1];if(NZn(r,c,o.editMergeLineDistance)){let u=wZn(t.split(` -`),s.slice(0,-1)),d=Kcr(u,n);d&&(r=Jcr(r.file,u,n,d,o),s=[...s.slice(0,-1),r])}else s.push(r)}else s.push(r);if(s.length>o.maxEdits){let c=s.slice(0,s.length-o.maxEdits);s=s.slice(s.length-o.maxEdits,s.length),t=wZn(t.split(` +`}a(Rei,"unifiedDiff");function Jea(t,e=!1){let{before:r,removed:n,added:o,after:s}=t,c=[];return c.push(">>>>>>> SEARCH"),c.push(...r),e?c.push("..."):c.push(...n),c.push(...s),c.push("======="),c.push(...r),c.push(...o),c.push(...s),c.push("<<<<<<<<< REPLACE"),c.join(` +`)}a(Jea,"aidersDiff");function Pei(t,e=!1){let{before:r,removed:n,added:o,after:s}=t,c=e?["..."]:n.map(p=>`${p} --- DO NOT REPLY WITH CODE FROM THIS LINE ---`),l=[...r,...c,...s],u=[...r,...o,...s],d=[];return d.push("--- User edited code: ---"),d.push(...l),c.length===0?d.push(`--- and added ${o.length} line${o.length===1?"":"s"} to make: ---`):o.length===0?d.push(`--- and deleted ${c.length} line${c.length===1?"":"s"} to make: ---`):d.push("--- and replaced it with: ---"),d.push(...u),d.push("--- End of edit ---"),d.join(` +`)}a(Pei,"findReplaceDiff");function xei(t,e){for(let r of e){let n=t.slice(0,r.startLine),o=t.slice(r.endLine+1),s=r.diff.added?r.diff.added:[];t=[...n,...s,...o]}return t}a(xei,"applyEditsToLines");function kei(t,e,r){let{added:n}=e.diff,o=e.startLine,s=e.startLine+n.length,c=t.startLine,l=t.endLine+1;return c<=s+r&&l>=o-r}a(kei,"editsOverlap");function Dei(t,e,r,n,o){let s=[...e];if(s.length>0){let c=s[s.length-1];if(kei(r,c,o.editMergeLineDistance)){let u=xei(t.split(` +`),s.slice(0,-1)),d=glr(u,n);d&&(r=Alr(r.file,u,n,d,o),s=[...s.slice(0,-1),r])}else s.push(r)}else s.push(r);if(s.length>o.maxEdits){let c=s.slice(0,s.length-o.maxEdits);s=s.slice(s.length-o.maxEdits,s.length),t=xei(t.split(` `),c).join(` -`)}return{originalContent:t,edits:s}}a(DZn,"updateEdits");function Jcr(t,e,r,n,o){let{start:s,endPrev:c,endNew:l}=n;if(!o||typeof o.diffContextLines!="number")throw new Error("Invalid configuration passed to buildIncomingEdit");let u=RZn(t,e,r,s,c,l,o.diffContextLines);return{file:t,startLine:s,endLine:c,diff:u,timestamp:performance.now()}}a(Jcr,"buildIncomingEdit");function MZn(t,e){let r={...t},n=Object.entries(t).filter(([s])=>t[s].edits.length).sort(([s,c],[l,u])=>c.edits[c.edits.length-1].timestamp-u.edits[u.edits.length-1].timestamp),o=Math.max(0,n.length-e);if(o)for(let s=0;s2*1024*1024)return t;let o=t[e];if(!o)return{...t,[e]:{originalContent:r,currentContent:r,edits:[]}};if(o.currentContent===r)return t;let s=o.currentContent.split(` +`)}return{originalContent:t,edits:s}}a(Dei,"updateEdits");function Alr(t,e,r,n,o){let{start:s,endPrev:c,endNew:l}=n;if(!o||typeof o.diffContextLines!="number")throw new Error("Invalid configuration passed to buildIncomingEdit");let u=wei(t,e,r,s,c,l,o.diffContextLines);return{file:t,startLine:s,endLine:c,diff:u,timestamp:performance.now()}}a(Alr,"buildIncomingEdit");function Nei(t,e){let r={...t},n=Object.entries(t).filter(([s])=>t[s].edits.length).sort(([s,c],[l,u])=>c.edits[c.edits.length-1].timestamp-u.edits[u.edits.length-1].timestamp),o=Math.max(0,n.length-e);if(o)for(let s=0;s2*1024*1024)return t;let o=t[e];if(!o)return{...t,[e]:{originalContent:r,currentContent:r,edits:[]}};if(o.currentContent===r)return t;let s=o.currentContent.split(` `),c=r.split(` -`),l=Kcr(s,c);if(!l)return{...t,[e]:{...o,currentContent:r}};let u=Jcr(e,s,c,l,n);if(YXs(u.diff)>n.maxCharsPerEdit)return{...t,[e]:{originalContent:r,currentContent:r,edits:[]}};let{originalContent:d,edits:p}=DZn(o.originalContent,o.edits,u,c,n),h={...t,[e]:{originalContent:d,currentContent:r,edits:p}};return MZn(h,n.maxFiles)}a(JXs,"recentEditsReducer");function XXs(t,e){let r=t.diff.removed.filter(s=>s.trim().length>0),n=t.diff.added.filter(s=>s.trim().length>0),o;if(e.removeDeletedLines&&n.length===0)o=null;else if(r.length===0&&n.length===0)o=null;else if(r.join("").trim()===n.join("").trim())o=null;else if(t.diff.added.length>e.maxLinesPerEdit||t.diff.removed.length>e.maxLinesPerEdit)o=null;else if(e.summarizationFormat==="aiders-diff")o=KXs(t.diff);else if(e.summarizationFormat==="diff")o=PZn(t.diff,e.removeDeletedLines,e.insertionsBeforeDeletions,e.appendNoReplyMarker);else if(e.summarizationFormat==="find-replace")o=kZn(t.diff);else throw new Error(`Unknown summarization format: ${e.summarizationFormat}`);return o}a(XXs,"summarizeEdit")});var Tst=T(OR=>{"use strict";f();var ZXs=OR&&OR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},eZs=OR&&OR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(OR,"__esModule",{value:!0});OR.FullRecentEditsProvider=OR.ICompletionsRecentEditsProviderService=void 0;var tZs=KN(),rZs=qr(),nZs=so(),iZs=M4(),oZs=iir(),Xcr=OZn();OR.ICompletionsRecentEditsProviderService=(0,rZs.createServiceIdentifier)("ICompletionsRecentEditsProviderService");var sZs=Object.freeze({maxFiles:20,maxEdits:8,diffContextLines:3,editMergeLineDistance:1,maxCharsPerEdit:2e3,debounceTimeout:500,summarizationFormat:"diff",removeDeletedLines:!1,insertionsBeforeDeletions:!0,appendNoReplyMarker:!0,activeDocDistanceLimitFromCursor:100,maxLinesPerEdit:10}),Zcr=class extends nZs.Disposable{static{a(this,"FullRecentEditsProvider")}constructor(e,r){super(),this.observableWorkspace=r,this._started=!1,this.recentEditMap={},this.recentEdits=[],this.recentEditSummaries=new WeakMap,this.debounceTimeouts={},this._config=e??Object.assign({},sZs)}get config(){return this._config}isEnabled(){return!0}getRecentEdits(){return this.recentEdits}getEditSummary(e){return this.recentEditSummaries.get(e)??null}updateRecentEdits(e,r){this.recentEditMap=(0,Xcr.recentEditsReducer)(this.recentEditMap,e,r,this._config),this.recentEdits=(0,Xcr.getAllRecentEditsByTimestamp)(this.recentEditMap),this.recentEdits.forEach(n=>{if(!this.recentEditSummaries.has(n)){let o=(0,Xcr.summarizeEdit)(n,this._config);this.recentEditSummaries.set(n,o)}})}start(){this._started||(this._started=!0,(0,iZs.mapObservableArrayCached)(this,this.observableWorkspace.openDocuments,(e,r)=>{r.add((0,tZs.autorunWithChanges)(this,{value:e.value,selection:e.selection,languageId:e.languageId},n=>{if(n.value.changes.length>0){let o=n.value.previous?.value,s=n.value.value.value,c=e.id.toString();clearTimeout(this.debounceTimeouts[c]),!this.recentEditMap[c]&&o?this.updateRecentEdits(c,o):this._config.debounceTimeout===0?this.updateRecentEdits(c,s):this.debounceTimeouts[c]=setTimeout(()=>{this.updateRecentEdits(c,s)},this._config.debounceTimeout??500)}}))},e=>e.id).recomputeInitiallyAndOnChange(this._store))}};OR.FullRecentEditsProvider=Zcr;OR.FullRecentEditsProvider=Zcr=ZXs([eZs(1,oZs.ICompletionsObservableWorkspace)],Zcr)});var elr=T(Ist=>{"use strict";f();Object.defineProperty(Ist,"__esModule",{value:!0});Ist.Traits=void 0;var Sst=UD(),BZn=HB(),aZs=MU(),cZs=$B(),lZs=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(cZs.isCompletionRequestData,c=>{c.traits!==r&&n(c.traits);let l=(0,aZs.normalizeLanguageId)(c.document.detectedLanguageId);l!==o&&s(l)}),!(!r||r.length===0||!o))return(0,Sst.jsxs)(Sst.Fragment,{children:[(0,Sst.jsx)(BZn.Text,{children:`Consider this related information: -`}),...r.map(c=>(0,Sst.jsx)(BZn.Text,{source:c,children:`${c.name}: ${c.value}`},c.id))]})},"Traits");Ist.Traits=lZs});var UZn=T(tlr=>{"use strict";f();Object.defineProperty(tlr,"__esModule",{value:!0});tlr.splitContextCompletionsPrompt=EZs;var aI=UD(),uZs=Mo(),dZs=E_(),fZs=Tst(),pZs=acr(),LZn=Dwe(),FZn=Owe(),hZs=Lcr(),mZs=Fcr(),gZs=Ucr(),AZs=Ycr(),yZs=elr();function EZs(t){let e=t.get(uZs.IInstantiationService),r=t.get(dZs.ICompletionsTextDocumentManagerService),n=t.get(fZs.ICompletionsRecentEditsProviderService);return(0,aI.jsxs)(aI.Fragment,{children:[(0,aI.jsxs)(LZn.StableCompletionsContext,{children:[(0,aI.jsx)(mZs.DocumentMarker,{tdms:r,weight:.7}),(0,aI.jsx)(yZs.Traits,{weight:.6}),(0,aI.jsx)(hZs.Diagnostics,{tdms:r,weight:.65}),(0,aI.jsx)(pZs.CodeSnippets,{tdms:r,weight:.9}),(0,aI.jsx)(AZs.SimilarFiles,{tdms:r,instantiationService:e,weight:.8})]}),(0,aI.jsx)(FZn.DocumentSuffix,{weight:1}),(0,aI.jsx)(LZn.AdditionalCompletionsContext,{children:(0,aI.jsx)(gZs.RecentEdits,{tdms:r,recentEditsProvider:n,weight:.99})}),(0,aI.jsx)(FZn.DocumentPrefix,{weight:1})]})}a(EZs,"splitContextCompletionsPrompt")});var HZn=T(wst=>{"use strict";f();Object.defineProperty(wst,"__esModule",{value:!0});wst.SplitContextPromptRenderer=void 0;var CZs=lcr(),_Zs=Dwe(),xst=Ecr(),QZn=Owe(),qZn=gcr(),GZn=0;function vZs(){GZn=0}a(vZs,"resetContextIndex");function bZs(){return GZn++}a(bZs,"getNextContextIndex");var rlr=class extends xst.CompletionsPromptRenderer{static{a(this,"SplitContextPromptRenderer")}constructor(){super(...arguments),this.formatPrefix=qZn.makePrefixPrompt,this.formatContext=qZn.makeContextPrompt}processSnapshot(e,r){let n=[],o=[],s=[],c=!1;if(vZs(),new CZs.SnapshotWalker(e,TZs).walkSnapshot((d,p,h)=>{if(d===e||(d.statistics.updateDataTimeMs&&d.statistics.updateDataTimeMs>0&&s.push({componentPath:d.path,updateDataTimeMs:d.statistics.updateDataTimeMs}),d.name===QZn.BeforeCursor.name&&(c=!0),d.value===void 0||d.value===""))return!0;let m=h.chunks,g=h.type;if(g==="suffix")o.push({value:(0,xst.normalizeLineEndings)(d.value),type:"suffix",weight:h.weight,componentPath:d.path,nodeStatistics:d.statistics,chunks:m,source:h.source});else{let A=g==="prefix",y=A||d.value.endsWith(r)?d.value:d.value+r;n.push({type:A?"prefix":"context",value:(0,xst.normalizeLineEndings)(y),weight:h.weight,componentPath:d.path,nodeStatistics:d.statistics,chunks:m,source:h.source,index:A?void 0:h.index})}return!0}),!c)throw new Error(`Node of type ${QZn.BeforeCursor.name} not found`);if(o.length>1)throw new Error("Only one suffix is allowed");let u=o.length===1?o[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:n,suffixBlock:u,componentStatistics:s}}};wst.SplitContextPromptRenderer=rlr;var TZs=[...xst.transformers,(t,e,r)=>(0,_Zs.isContextNode)(t)?{...r,index:bZs()}:r]});var KK=T(zB=>{"use strict";f();Object.defineProperty(zB,"__esModule",{value:!0});zB.AbstractLanguageDiagnosticsService=zB.ILanguageDiagnosticsService=void 0;zB.rangeSpanningDiagnostics=xZs;zB.isError=wZs;zB.getDiagnosticsAtSelection=RZs;var SZs=qr(),IZs=Tk(),nlr=Lp();zB.ILanguageDiagnosticsService=(0,SZs.createServiceIdentifier)("ILanguageDiagnosticService");var ilr=class{static{a(this,"AbstractLanguageDiagnosticsService")}waitForNewDiagnostics(e,r,n=5e3){let o,s,c;return new Promise(l=>{o=r.onCancellationRequested(()=>l([])),c=setTimeout(()=>l(this.getDiagnostics(e)),n),s=this.onDidChangeDiagnostics(u=>{for(let d of u.uris)if((0,IZs.isEqual)(d,e)){l(this.getDiagnostics(e));break}})}).finally(()=>{o.dispose(),s.dispose(),clearTimeout(c)})}};zB.AbstractLanguageDiagnosticsService=ilr;function xZs(t){return t.map(e=>e.range).reduce((e,r)=>e.union(r))}a(xZs,"rangeSpanningDiagnostics");function wZs(t){return t.severity===nlr.DiagnosticSeverity.Error}a(wZs,"isError");function RZs(t,e,r=[nlr.DiagnosticSeverity.Error,nlr.DiagnosticSeverity.Warning]){return t.find(n=>n.range.contains(e)&&r.includes(n.severity))}a(RZs,"getDiagnosticsAtSelection")});var $Zn=T(olr=>{"use strict";f();Object.defineProperty(olr,"__esModule",{value:!0});olr.getDiagnosticsFromContextItems=DZs;var PZs=E_(),jZn=nQ(),kZs=Nwe(),NZs="content_excluded";async function DZs(t,e,r){let n=(0,kZs.filterContextItemsByType)(r,"DiagnosticBag");for(let h of n)MZs(t,e,h.data,h.providerId);let o=new Set,s=[];for(let h of n)for(let m of h.data)o.add(m.uri.toString()),s.push({providerId:h.providerId,bag:m});if(s.length===0)return[];let c=t.get(jZn.ICompletionsContextProviderService),l=t.get(PZs.ICompletionsTextDocumentManagerService),u=new Map;await Promise.all(Array.from(o).map(async h=>{u.set(h,await l.getTextDocumentValidation({uri:h}))}));let d=c.getStatisticsForCompletion(e);return s.filter(h=>{let m=u.get(h.bag.uri.toString())?.status==="valid";return m?d.addExpectations(h.providerId,[[h.bag,"included"]]):d.addExpectations(h.providerId,[[h.bag,NZs]]),m}).map(h=>h.bag).sort((h,m)=>(h.importance??0)-(m.importance??0))}a(DZs,"getDiagnosticsFromContextItems");function MZs(t,e,r,n){let o=t.get(jZn.ICompletionsContextProviderService).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a(MZs,"setupExpectationsForDiagnosticBags")});var VZn=T(Rst=>{"use strict";f();Object.defineProperty(Rst,"__esModule",{value:!0});Rst.getTraitsFromContextItems=FZs;Rst.ReportTraitsTelemetry=qZs;var OZs=Dp(),BZs=nQ(),LZs=Nwe();function FZs(t,e,r){let n=(0,LZs.filterContextItemsByType)(r,"Trait");for(let s of n)UZs(t,e,s.data,s.providerId);return n.flatMap(s=>s.data).sort((s,c)=>(s.importance??0)-(c.importance??0))}a(FZs,"getTraitsFromContextItems");function UZs(t,e,r,n){let o=t.get(BZs.ICompletionsContextProviderService).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a(UZs,"setupExpectationsForTraits");var QZs=new Map([["TargetFrameworks","targetFrameworks"],["LanguageVersion","languageVersion"]]);function qZs(t,e,r,n,o,s){if(r.length>0){let c={};c.detectedLanguageId=n,c.languageId=o;for(let u of r){let d=QZs.get(u.name);d&&(c[d]=u.value)}let l=s.extendedBy(c,{});return(0,OZs.telemetry)(t,e,l)}}a(qZs,"ReportTraitsTelemetry")});var $B=T(T_=>{"use strict";f();var KZn=T_&&T_.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},b_=T_&&T_.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(T_,"__esModule",{value:!0});T_.TestComponentsCompletionsPromptFactory=T_.ComponentsCompletionsPromptFactory=T_.PromptOrdering=void 0;T_.isCompletionRequestData=sea;var HD=UD(),WZn=Lp(),ulr=mc(),JZn=PK(),slr=Ru(),dlr=Mo(),XZn=yY(),zZn=QXn(),GZs=Dp(),HZs=E_(),jZs=acr(),$Zs=Dwe(),VZs=Ecr(),ZZn=dst(),WZs=Owe(),zZs=Lcr(),YZs=Fcr(),KZs=Ucr(),JZs=Ycr(),XZs=UZn(),ZZs=HZn(),eea=elr(),eei=KK(),tea=Np(),Uwe=ust(),rea=scr(),nea=$Zn(),YZn=VZn(),flr=nQ(),BR=hde(),iea=Tst(),oea=fde();function sea(t){if(!t||typeof t!="object")return!1;let e=t;return!(!e.document||!e.position||e.position.line===void 0||e.position.character===void 0||!e.telemetryData)}a(sea,"isCompletionRequestData");var aQ;(function(t){t.Default="default",t.SplitContext="splitContext"})(aQ||(T_.PromptOrdering=aQ={}));var alr={[aQ.Default]:{promptFunction:tei,renderer:VZs.CompletionsPromptRenderer},[aQ.SplitContext]:{promptFunction:XZs.splitContextCompletionsPrompt,renderer:ZZs.SplitContextPromptRenderer}};function tei(t){let e=t.get(HZs.ICompletionsTextDocumentManagerService),r=t.get(dlr.IInstantiationService),n=t.get(iea.ICompletionsRecentEditsProviderService);return(0,HD.jsxs)(HD.Fragment,{children:[(0,HD.jsxs)($Zs.CompletionsContext,{children:[(0,HD.jsx)(YZs.DocumentMarker,{tdms:e,weight:.7}),(0,HD.jsx)(eea.Traits,{weight:.6}),(0,HD.jsx)(zZs.Diagnostics,{tdms:e,weight:.65}),(0,HD.jsx)(jZs.CodeSnippets,{tdms:e,weight:.9}),(0,HD.jsx)(JZs.SimilarFiles,{tdms:e,instantiationService:r,weight:.8}),(0,HD.jsx)(KZs.RecentEdits,{tdms:e,recentEditsProvider:n,weight:.99})]}),(0,HD.jsx)(WZs.CurrentFile,{weight:1})]})}a(tei,"defaultCompletionsPrompt");var Pst=class{static{a(this,"BaseComponentsCompletionsPromptFactory")}constructor(e,r,n,o,s,c,l,u,d){this.instantiationService=n,this.completionsTelemetryService=o,this.ignoreService=s,this.contextProviderBridge=c,this.logTarget=l,this.contextProviderStatistics=u,this.languageDiagnosticsService=d,this.promptOrdering=r??aQ.Default,this.virtualPrompt=e??new zZn.VirtualPrompt(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe(),this.renderer=this.getRenderer()}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}async createPromptUnsafe({completionId:e,completionState:r,telemetryData:n,promptOpts:o},s){let{maxPromptLength:c,suffixPercent:l,suffixMatchThreshold:u}=this.instantiationService.invokeFunction(BR.getPromptOptions,n,r.textDocument.detectedLanguageId),d=await this.failFastPrompt(r.textDocument,r.position,l,s);if(d)return d;let p=o?.separateContext?aQ.SplitContext:aQ.Default;this.setPromptOrdering(p);let h=performance.now(),{traits:m,codeSnippets:g,diagnostics:A,turnOffSimilarFiles:y,resolvedContextItems:E}=await this.resolveContext(e,r,n,s,o);if(await this.updateComponentData(r.textDocument,r.position,m,g,A,n,y,c,s,o,u,o?.tokenizer),s?.isCancellationRequested)return BR._promptCancelled;let _=this.virtualPrompt.snapshot(s),v=_.status;if(v==="cancelled")return BR._promptCancelled;if(v==="error")return this.errorPrompt(_.error);let b=this.renderer.render(_.snapshot,{delimiter:` -`,tokenizer:o?.tokenizer,promptTokenLimit:c,suffixPercent:l,languageId:r.textDocument.detectedLanguageId},s);if(b.status==="cancelled")return BR._promptCancelled;if(b.status==="error")return this.errorPrompt(b.error);let[I,x]=(0,BR.trimLastLine)(b.prefix),R={...b,prefix:I},w,P=r.textDocument.detectedLanguageId;if(this.instantiationService.invokeFunction(Uwe.useContextProviderAPI,P,n)){let Q=(0,flr.componentStatisticsToPromptMatcher)(b.metadata.componentStatistics);this.contextProviderStatistics.getStatisticsForCompletion(e).computeMatch(Q),w=(0,Uwe.telemetrizeContextItems)(this.contextProviderStatistics,e,E),ulr.logger.debug(this.logTarget,`Context providers telemetry: '${JSON.stringify(w)}'`)}let k=performance.now();return this.resetIfEmpty(b),this.successPrompt(R,k,h,x,w)}async updateComponentData(e,r,n,o,s,c,l,u,d,p={},h,m){let g=this.createRequestData(e,r,c,d,p,u,n,o,s,l,h,m);await this.pipe.pump(g)}async resolveContext(e,r,n,o,s={}){let c=[],l,u,d,p=!1;if(this.instantiationService.invokeFunction(Uwe.useContextProviderAPI,r.textDocument.detectedLanguageId,n)){c=await this.contextProviderBridge.resolution(e);let{textDocument:m}=r,g=c.filter(Uwe.matchContextItems);this.instantiationService.invokeFunction(aea,m.detectedLanguageId,g,n)||(p=!0),l=await this.instantiationService.invokeFunction(YZn.getTraitsFromContextItems,e,g),this.instantiationService.invokeFunction(YZn.ReportTraitsTelemetry,"contextProvider.traits",l,m.detectedLanguageId,m.detectedLanguageId,n),u=await this.instantiationService.invokeFunction(rea.getCodeSnippetsFromContextItems,e,g,m.detectedLanguageId),d=await this.instantiationService.invokeFunction(nea.getDiagnosticsFromContextItems,e,g)}let h=this.instantiationService.invokeFunction(Uwe.getDefaultDiagnosticSettings);return d=this.addDefaultDiagnosticBag(c,d,e,r,h),{traits:l,codeSnippets:u,diagnostics:d,turnOffSimilarFiles:p,resolvedContextItems:c}}async failFastPrompt(e,r,n,o){if(o?.isCancellationRequested)return BR._promptCancelled;if(await this.ignoreService.isCopilotIgnored(slr.URI.parse(e.uri)))return BR._copilotContentExclusion;if((n>0?e.getText().length:e.offsetAt(r))0},computeTimeMs:r-n,trailingWs:o,neighborSource:new Map,metadata:e.metadata,contextProvidersTelemetry:s}}errorPrompt(e){return(0,GZs.telemetryException)(this.completionsTelemetryService,e,"PromptComponents.CompletionsPromptFactory"),this.reset(),BR._promptError}reset(){this.renderer=this.getRenderer(),this.virtualPrompt=new zZn.VirtualPrompt(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}setPromptOrdering(e){this.promptOrdering!==e&&(this.promptOrdering=e,this.reset())}completionsPrompt(){let e=alr[this.promptOrdering]?.promptFunction??tei;return this.instantiationService.invokeFunction(e)}getRenderer(){let e=alr[this.promptOrdering]??alr[aQ.Default];return new e.renderer}addDefaultDiagnosticBag(e,r,n,o,s){if(s===void 0)return r;let c=o.textDocument;if(r!==void 0&&r.some(_=>_.uri.toString()===c.uri))return r;let l=performance.now(),u=this.languageDiagnosticsService.getDiagnostics(slr.URI.parse(c.uri));if(u.length===0)return r;let d=[],p=[],h=s.warnings==="yes"||s.warnings==="yesIfNoErrors",m=o.position;for(let _ of u)Math.abs(_.range.start.line-m.line)<=s.maxLineDistance&&(_.severity===WZn.DiagnosticSeverity.Error?d.push(_):_.severity===WZn.DiagnosticSeverity.Warning&&h&&p.push(_));let g=[...d,...s.warnings==="yes"||s.warnings==="yesIfNoErrors"&&d.length===0?p:[]];if(g.length===0)return r;g.sort((_,v)=>{let b=Math.abs(_.range.start.line-m.line),I=Math.abs(v.range.start.line-m.line);return b-I});let A={type:"DiagnosticBag",uri:slr.URI.parse(c.uri),values:g.slice(0,s.maxDiagnostics),id:(0,tea.generateUuid)()},y="copilot.chat.defaultDiagnostics",E=this.contextProviderStatistics.getStatisticsForCompletion(n);return E.addExpectations(y,[[A,"included"]]),e.push({providerId:y,matchScore:10,resolution:"full",resolutionTimeMs:performance.now()-l,data:[A]}),E.setLastResolution(y,"full"),r===void 0?[A]:(r.push(A),r)}};Pst=KZn([b_(2,dlr.IInstantiationService),b_(3,XZn.ICompletionsTelemetryService),b_(4,JZn.IIgnoreService),b_(5,ZZn.ICompletionsContextProviderBridgeService),b_(6,ulr.ICompletionsLogTargetService),b_(7,flr.ICompletionsContextProviderService),b_(8,eei.ILanguageDiagnosticsService)],Pst);var clr=class extends Pst{static{a(this,"ComponentsCompletionsPromptFactory")}constructor(e,r,n,o,s,c,l){super(void 0,void 0,e,r,n,o,s,c,l)}};T_.ComponentsCompletionsPromptFactory=clr;T_.ComponentsCompletionsPromptFactory=clr=KZn([b_(0,dlr.IInstantiationService),b_(1,XZn.ICompletionsTelemetryService),b_(2,JZn.IIgnoreService),b_(3,ZZn.ICompletionsContextProviderBridgeService),b_(4,ulr.ICompletionsLogTargetService),b_(5,flr.ICompletionsContextProviderService),b_(6,eei.ILanguageDiagnosticsService)],clr);var llr=class extends Pst{static{a(this,"TestComponentsCompletionsPromptFactory")}};T_.TestComponentsCompletionsPromptFactory=llr;function aea(t,e,r,n){let o=["cpp","c"];return(0,oea.isIncludeNeighborFilesActive)(t,e,n)||o.includes(e)||!r.some(c=>c.data.some(l=>l.type==="CodeSnippet"))}a(aea,"similarFilesEnabled")});var ylr=T(_A=>{"use strict";f();var rei=_A&&_A.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},nei=_A&&_A.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(_A,"__esModule",{value:!0});_A.TestCompletionsPromptFactory=_A.CompletionsPromptFactory=_A.DEFAULT_PROMPT_TIMEOUT=_A.ICompletionsPromptFactoryService=void 0;var cea=Nn(),iei=Mo(),plr=hde(),lea=$B(),uea=qr();_A.ICompletionsPromptFactoryService=(0,uea.createServiceIdentifier)("ICompletionsPromptFactoryService");var hlr=class{static{a(this,"SequentialCompletionsPromptFactory")}constructor(e){this.delegate=e}async prompt(e,r){return this.lastPromise=this.promptAsync(e,r),this.lastPromise}async promptAsync(e,r){if(await this.lastPromise,r?.isCancellationRequested)return plr._promptCancelled;try{return await this.delegate.prompt(e,r)}catch{return plr._promptError}}};_A.DEFAULT_PROMPT_TIMEOUT=1200;var mlr=class{static{a(this,"TimeoutHandlingCompletionsPromptFactory")}constructor(e){this.delegate=e}async prompt(e,r){let n=new cea.CancellationTokenSource,o=n.token;return r?.onCancellationRequested(()=>{n.cancel()}),await Promise.race([this.delegate.prompt(e,o),new Promise(s=>{setTimeout(()=>{n.cancel(),s(plr._promptTimeout)},_A.DEFAULT_PROMPT_TIMEOUT)})])}},kst=class{static{a(this,"BaseComponentsCompletionsPromptFactory")}constructor(e,r,n){this.delegate=new hlr(new mlr(n.createInstance(lea.TestComponentsCompletionsPromptFactory,e,r)))}prompt(e,r){return this.delegate.prompt(e,r)}};kst=rei([nei(2,iei.IInstantiationService)],kst);var glr=class extends kst{static{a(this,"CompletionsPromptFactory")}constructor(e){super(void 0,void 0,e)}};_A.CompletionsPromptFactory=glr;_A.CompletionsPromptFactory=glr=rei([nei(0,iei.IInstantiationService)],glr);var Alr=class extends kst{static{a(this,"TestCompletionsPromptFactory")}};_A.TestCompletionsPromptFactory=Alr});var hde=T(Lf=>{"use strict";f();Object.defineProperty(Lf,"__esModule",{value:!0});Lf.PromptResponse=Lf._promptTimeout=Lf._promptCancelled=Lf._promptError=Lf._copilotContentExclusion=Lf._contextTooShort=Lf.MIN_PROMPT_EXCLUDED_LANGUAGE_IDS=Lf.MIN_PROMPT_CHARS=void 0;Lf.trimLastLine=Aea;Lf.extractPrompt=yea;Lf.getPromptOptions=_ea;var dea=_we(),fea=Zm(),oei=Not(),pea=rde(),hea=E_(),mea=ylr(),gea=fde();Lf.MIN_PROMPT_CHARS=10;Lf.MIN_PROMPT_EXCLUDED_LANGUAGE_IDS=["scminput"];Lf._contextTooShort={type:"contextTooShort"};Lf._copilotContentExclusion={type:"copilotContentExclusion"};Lf._promptError={type:"promptError"};Lf._promptCancelled={type:"promptCancelled"};Lf._promptTimeout={type:"promptTimeout"};var sei;(function(t){function e(r){return r.type==="prompt"?[{header:"PREFIX",content:r.prompt.prefix},{header:"SUFFIX",content:r.prompt.suffix},{header:"CONTEXT",content:(r.prompt.context||[]).join(` +`),l=glr(s,c);if(!l)return{...t,[e]:{...o,currentContent:r}};let u=Alr(e,s,c,l,n);if(Kea(u.diff)>n.maxCharsPerEdit)return{...t,[e]:{originalContent:r,currentContent:r,edits:[]}};let{originalContent:d,edits:p}=Dei(o.originalContent,o.edits,u,c,n),h={...t,[e]:{originalContent:d,currentContent:r,edits:p}};return Nei(h,n.maxFiles)}a(Xea,"recentEditsReducer");function Zea(t,e){let r=t.diff.removed.filter(s=>s.trim().length>0),n=t.diff.added.filter(s=>s.trim().length>0),o;if(e.removeDeletedLines&&n.length===0)o=null;else if(r.length===0&&n.length===0)o=null;else if(r.join("").trim()===n.join("").trim())o=null;else if(t.diff.added.length>e.maxLinesPerEdit||t.diff.removed.length>e.maxLinesPerEdit)o=null;else if(e.summarizationFormat==="aiders-diff")o=Jea(t.diff);else if(e.summarizationFormat==="diff")o=Rei(t.diff,e.removeDeletedLines,e.insertionsBeforeDeletions,e.appendNoReplyMarker);else if(e.summarizationFormat==="find-replace")o=Pei(t.diff);else throw new Error(`Unknown summarization format: ${e.summarizationFormat}`);return o}a(Zea,"summarizeEdit")});var Dot=T(TR=>{"use strict";f();var eta=TR&&TR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},tta=TR&&TR.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(TR,"__esModule",{value:!0});TR.FullRecentEditsProvider=TR.ICompletionsRecentEditsProviderService=void 0;var rta=F5(),nta=qr(),ita=ro(),ota=gO(),sta=Tir(),ylr=Mei();TR.ICompletionsRecentEditsProviderService=(0,nta.createServiceIdentifier)("ICompletionsRecentEditsProviderService");var ata=Object.freeze({maxFiles:20,maxEdits:8,diffContextLines:3,editMergeLineDistance:1,maxCharsPerEdit:2e3,debounceTimeout:500,summarizationFormat:"diff",removeDeletedLines:!1,insertionsBeforeDeletions:!0,appendNoReplyMarker:!0,activeDocDistanceLimitFromCursor:100,maxLinesPerEdit:10}),Elr=class extends ita.Disposable{static{a(this,"FullRecentEditsProvider")}constructor(e,r){super(),this.observableWorkspace=r,this._started=!1,this.recentEditMap={},this.recentEdits=[],this.recentEditSummaries=new WeakMap,this.debounceTimeouts={},this._config=e??Object.assign({},ata)}get config(){return this._config}isEnabled(){return!0}getRecentEdits(){return this.recentEdits}getEditSummary(e){return this.recentEditSummaries.get(e)??null}updateRecentEdits(e,r){this.recentEditMap=(0,ylr.recentEditsReducer)(this.recentEditMap,e,r,this._config),this.recentEdits=(0,ylr.getAllRecentEditsByTimestamp)(this.recentEditMap),this.recentEdits.forEach(n=>{if(!this.recentEditSummaries.has(n)){let o=(0,ylr.summarizeEdit)(n,this._config);this.recentEditSummaries.set(n,o)}})}start(){this._started||(this._started=!0,(0,ota.mapObservableArrayCached)(this,this.observableWorkspace.openDocuments,(e,r)=>{r.add((0,rta.autorunWithChanges)(this,{value:e.value,selection:e.selection,languageId:e.languageId},n=>{if(n.value.changes.length>0){let o=n.value.previous?.value,s=n.value.value.value,c=e.id.toString();clearTimeout(this.debounceTimeouts[c]),!this.recentEditMap[c]&&o?this.updateRecentEdits(c,o):this._config.debounceTimeout===0?this.updateRecentEdits(c,s):this.debounceTimeouts[c]=setTimeout(()=>{this.updateRecentEdits(c,s)},this._config.debounceTimeout??500)}}))},e=>e.id).recomputeInitiallyAndOnChange(this._store))}};TR.FullRecentEditsProvider=Elr;TR.FullRecentEditsProvider=Elr=eta([tta(1,sta.ICompletionsObservableWorkspace)],Elr)});var _lr=T(Mot=>{"use strict";f();Object.defineProperty(Mot,"__esModule",{value:!0});Mot.Traits=void 0;var Not=xD(),Oei=SB(),cta=aU(),lta=xB(),uta=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(lta.isCompletionRequestData,c=>{c.traits!==r&&n(c.traits);let l=(0,cta.normalizeLanguageId)(c.document.detectedLanguageId);l!==o&&s(l)}),!(!r||r.length===0||!o))return(0,Not.jsxs)(Not.Fragment,{children:[(0,Not.jsx)(Oei.Text,{children:`Consider this related information: +`}),...r.map(c=>(0,Not.jsx)(Oei.Text,{source:c,children:`${c.name}: ${c.value}`},c.id))]})},"Traits");Mot.Traits=uta});var Fei=T(Clr=>{"use strict";f();Object.defineProperty(Clr,"__esModule",{value:!0});Clr.splitContextCompletionsPrompt=_ta;var YS=xD(),dta=Po(),fta=aC(),pta=Dot(),hta=xcr(),Bei=Pxe(),Lei=Dxe(),mta=nlr(),gta=ilr(),Ata=olr(),yta=mlr(),Eta=_lr();function _ta(t){let e=t.get(dta.IInstantiationService),r=t.get(fta.ICompletionsTextDocumentManagerService),n=t.get(pta.ICompletionsRecentEditsProviderService);return(0,YS.jsxs)(YS.Fragment,{children:[(0,YS.jsxs)(Bei.StableCompletionsContext,{children:[(0,YS.jsx)(gta.DocumentMarker,{tdms:r,weight:.7}),(0,YS.jsx)(Eta.Traits,{weight:.6}),(0,YS.jsx)(mta.Diagnostics,{tdms:r,weight:.65}),(0,YS.jsx)(hta.CodeSnippets,{tdms:r,weight:.9}),(0,YS.jsx)(yta.SimilarFiles,{tdms:r,instantiationService:e,weight:.8})]}),(0,YS.jsx)(Lei.DocumentSuffix,{weight:1}),(0,YS.jsx)(Bei.AdditionalCompletionsContext,{children:(0,YS.jsx)(Ata.RecentEdits,{tdms:r,recentEditsProvider:n,weight:.99})}),(0,YS.jsx)(Lei.DocumentPrefix,{weight:1})]})}a(_ta,"splitContextCompletionsPrompt")});var Gei=T(Bot=>{"use strict";f();Object.defineProperty(Bot,"__esModule",{value:!0});Bot.SplitContextPromptRenderer=void 0;var Cta=Rcr(),vta=Pxe(),Oot=Ucr(),Uei=Dxe(),Qei=Bcr(),qei=0;function bta(){qei=0}a(bta,"resetContextIndex");function Tta(){return qei++}a(Tta,"getNextContextIndex");var vlr=class extends Oot.CompletionsPromptRenderer{static{a(this,"SplitContextPromptRenderer")}constructor(){super(...arguments),this.formatPrefix=Qei.makePrefixPrompt,this.formatContext=Qei.makeContextPrompt}processSnapshot(e,r){let n=[],o=[],s=[],c=!1;if(bta(),new Cta.SnapshotWalker(e,Sta).walkSnapshot((d,p,h)=>{if(d===e||(d.statistics.updateDataTimeMs&&d.statistics.updateDataTimeMs>0&&s.push({componentPath:d.path,updateDataTimeMs:d.statistics.updateDataTimeMs}),d.name===Uei.BeforeCursor.name&&(c=!0),d.value===void 0||d.value===""))return!0;let m=h.chunks,g=h.type;if(g==="suffix")o.push({value:(0,Oot.normalizeLineEndings)(d.value),type:"suffix",weight:h.weight,componentPath:d.path,nodeStatistics:d.statistics,chunks:m,source:h.source});else{let A=g==="prefix",y=A||d.value.endsWith(r)?d.value:d.value+r;n.push({type:A?"prefix":"context",value:(0,Oot.normalizeLineEndings)(y),weight:h.weight,componentPath:d.path,nodeStatistics:d.statistics,chunks:m,source:h.source,index:A?void 0:h.index})}return!0}),!c)throw new Error(`Node of type ${Uei.BeforeCursor.name} not found`);if(o.length>1)throw new Error("Only one suffix is allowed");let u=o.length===1?o[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:n,suffixBlock:u,componentStatistics:s}}};Bot.SplitContextPromptRenderer=vlr;var Sta=[...Oot.transformers,(t,e,r)=>(0,vta.isContextNode)(t)?{...r,index:Tta()}:r]});var nK=T(PB=>{"use strict";f();Object.defineProperty(PB,"__esModule",{value:!0});PB.AbstractLanguageDiagnosticsService=PB.ILanguageDiagnosticsService=void 0;PB.rangeSpanningDiagnostics=wta;PB.isError=Rta;PB.getDiagnosticsAtSelection=Pta;var Ita=qr(),xta=fk(),blr=kp();PB.ILanguageDiagnosticsService=(0,Ita.createServiceIdentifier)("ILanguageDiagnosticService");var Tlr=class{static{a(this,"AbstractLanguageDiagnosticsService")}waitForNewDiagnostics(e,r,n=5e3){let o,s,c;return new Promise(l=>{o=r.onCancellationRequested(()=>l([])),c=setTimeout(()=>l(this.getDiagnostics(e)),n),s=this.onDidChangeDiagnostics(u=>{for(let d of u.uris)if((0,xta.isEqual)(d,e)){l(this.getDiagnostics(e));break}})}).finally(()=>{o.dispose(),s.dispose(),clearTimeout(c)})}};PB.AbstractLanguageDiagnosticsService=Tlr;function wta(t){return t.map(e=>e.range).reduce((e,r)=>e.union(r))}a(wta,"rangeSpanningDiagnostics");function Rta(t){return t.severity===blr.DiagnosticSeverity.Error}a(Rta,"isError");function Pta(t,e,r=[blr.DiagnosticSeverity.Error,blr.DiagnosticSeverity.Warning]){return t.find(n=>n.range.contains(e)&&r.includes(n.severity))}a(Pta,"getDiagnosticsAtSelection")});var jei=T(Slr=>{"use strict";f();Object.defineProperty(Slr,"__esModule",{value:!0});Slr.getDiagnosticsFromContextItems=Mta;var kta=aC(),Hei=PU(),Dta=Rxe(),Nta="content_excluded";async function Mta(t,e,r){let n=(0,Dta.filterContextItemsByType)(r,"DiagnosticBag");for(let h of n)Ota(t,e,h.data,h.providerId);let o=new Set,s=[];for(let h of n)for(let m of h.data)o.add(m.uri.toString()),s.push({providerId:h.providerId,bag:m});if(s.length===0)return[];let c=t.get(Hei.ICompletionsContextProviderService),l=t.get(kta.ICompletionsTextDocumentManagerService),u=new Map;await Promise.all(Array.from(o).map(async h=>{u.set(h,await l.getTextDocumentValidation({uri:h}))}));let d=c.getStatisticsForCompletion(e);return s.filter(h=>{let m=u.get(h.bag.uri.toString())?.status==="valid";return m?d.addExpectations(h.providerId,[[h.bag,"included"]]):d.addExpectations(h.providerId,[[h.bag,Nta]]),m}).map(h=>h.bag).sort((h,m)=>(h.importance??0)-(m.importance??0))}a(Mta,"getDiagnosticsFromContextItems");function Ota(t,e,r,n){let o=t.get(Hei.ICompletionsContextProviderService).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a(Ota,"setupExpectationsForDiagnosticBags")});var $ei=T(Lot=>{"use strict";f();Object.defineProperty(Lot,"__esModule",{value:!0});Lot.getTraitsFromContextItems=Uta;Lot.ReportTraitsTelemetry=Gta;var Bta=xp(),Lta=PU(),Fta=Rxe();function Uta(t,e,r){let n=(0,Fta.filterContextItemsByType)(r,"Trait");for(let s of n)Qta(t,e,s.data,s.providerId);return n.flatMap(s=>s.data).sort((s,c)=>(s.importance??0)-(c.importance??0))}a(Uta,"getTraitsFromContextItems");function Qta(t,e,r,n){let o=t.get(Lta.ICompletionsContextProviderService).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a(Qta,"setupExpectationsForTraits");var qta=new Map([["TargetFrameworks","targetFrameworks"],["LanguageVersion","languageVersion"]]);function Gta(t,e,r,n,o,s){if(r.length>0){let c={};c.detectedLanguageId=n,c.languageId=o;for(let u of r){let d=qta.get(u.name);d&&(c[d]=u.value)}let l=s.extendedBy(c,{});return(0,Bta.telemetry)(t,e,l)}}a(Gta,"ReportTraitsTelemetry")});var xB=T(fC=>{"use strict";f();var Yei=fC&&fC.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},dC=fC&&fC.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(fC,"__esModule",{value:!0});fC.TestComponentsCompletionsPromptFactory=fC.ComponentsCompletionsPromptFactory=fC.PromptOrdering=void 0;fC.isCompletionRequestData=ara;var kD=xD(),Vei=kp(),Plr=uc(),Kei=LY(),Ilr=Eu(),klr=Po(),Jei=Sz(),Wei=UZn(),Hta=xp(),jta=aC(),$ta=xcr(),Vta=Pxe(),Wta=Ucr(),Xei=Eot(),zta=Dxe(),Yta=nlr(),Kta=ilr(),Jta=olr(),Xta=mlr(),Zta=Fei(),era=Gei(),tra=_lr(),Zei=nK(),rra=Ip(),Bxe=yot(),nra=Icr(),ira=jei(),zei=$ei(),Dlr=PU(),SR=wue(),ora=Dot(),sra=Iue();function ara(t){if(!t||typeof t!="object")return!1;let e=t;return!(!e.document||!e.position||e.position.line===void 0||e.position.character===void 0||!e.telemetryData)}a(ara,"isCompletionRequestData");var MU;(function(t){t.Default="default",t.SplitContext="splitContext"})(MU||(fC.PromptOrdering=MU={}));var xlr={[MU.Default]:{promptFunction:eti,renderer:Wta.CompletionsPromptRenderer},[MU.SplitContext]:{promptFunction:Zta.splitContextCompletionsPrompt,renderer:era.SplitContextPromptRenderer}};function eti(t){let e=t.get(jta.ICompletionsTextDocumentManagerService),r=t.get(klr.IInstantiationService),n=t.get(ora.ICompletionsRecentEditsProviderService);return(0,kD.jsxs)(kD.Fragment,{children:[(0,kD.jsxs)(Vta.CompletionsContext,{children:[(0,kD.jsx)(Kta.DocumentMarker,{tdms:e,weight:.7}),(0,kD.jsx)(tra.Traits,{weight:.6}),(0,kD.jsx)(Yta.Diagnostics,{tdms:e,weight:.65}),(0,kD.jsx)($ta.CodeSnippets,{tdms:e,weight:.9}),(0,kD.jsx)(Xta.SimilarFiles,{tdms:e,instantiationService:r,weight:.8}),(0,kD.jsx)(Jta.RecentEdits,{tdms:e,recentEditsProvider:n,weight:.99})]}),(0,kD.jsx)(zta.CurrentFile,{weight:1})]})}a(eti,"defaultCompletionsPrompt");var Fot=class{static{a(this,"BaseComponentsCompletionsPromptFactory")}constructor(e,r,n,o,s,c,l,u,d){this.instantiationService=n,this.completionsTelemetryService=o,this.ignoreService=s,this.contextProviderBridge=c,this.logTarget=l,this.contextProviderStatistics=u,this.languageDiagnosticsService=d,this.promptOrdering=r??MU.Default,this.virtualPrompt=e??new Wei.VirtualPrompt(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe(),this.renderer=this.getRenderer()}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}async createPromptUnsafe({completionId:e,completionState:r,telemetryData:n,promptOpts:o},s){let{maxPromptLength:c,suffixPercent:l,suffixMatchThreshold:u}=this.instantiationService.invokeFunction(SR.getPromptOptions,n,r.textDocument.detectedLanguageId),d=await this.failFastPrompt(r.textDocument,r.position,l,s);if(d)return d;let p=o?.separateContext?MU.SplitContext:MU.Default;this.setPromptOrdering(p);let h=performance.now(),{traits:m,codeSnippets:g,diagnostics:A,turnOffSimilarFiles:y,resolvedContextItems:E}=await this.resolveContext(e,r,n,s,o);if(await this.updateComponentData(r.textDocument,r.position,m,g,A,n,y,c,s,o,u,o?.tokenizer),s?.isCancellationRequested)return SR._promptCancelled;let _=this.virtualPrompt.snapshot(s),v=_.status;if(v==="cancelled")return SR._promptCancelled;if(v==="error")return this.errorPrompt(_.error);let b=this.renderer.render(_.snapshot,{delimiter:` +`,tokenizer:o?.tokenizer,promptTokenLimit:c,suffixPercent:l,languageId:r.textDocument.detectedLanguageId},s);if(b.status==="cancelled")return SR._promptCancelled;if(b.status==="error")return this.errorPrompt(b.error);let[I,x]=(0,SR.trimLastLine)(b.prefix),w={...b,prefix:I},R,P=r.textDocument.detectedLanguageId;if(this.instantiationService.invokeFunction(Bxe.useContextProviderAPI,P,n)){let Q=(0,Dlr.componentStatisticsToPromptMatcher)(b.metadata.componentStatistics);this.contextProviderStatistics.getStatisticsForCompletion(e).computeMatch(Q),R=(0,Bxe.telemetrizeContextItems)(this.contextProviderStatistics,e,E),Plr.logger.debug(this.logTarget,`Context providers telemetry: '${JSON.stringify(R)}'`)}let k=performance.now();return this.resetIfEmpty(b),this.successPrompt(w,k,h,x,R)}async updateComponentData(e,r,n,o,s,c,l,u,d,p={},h,m){let g=this.createRequestData(e,r,c,d,p,u,n,o,s,l,h,m);await this.pipe.pump(g)}async resolveContext(e,r,n,o,s={}){let c=[],l,u,d,p=!1;if(this.instantiationService.invokeFunction(Bxe.useContextProviderAPI,r.textDocument.detectedLanguageId,n)){c=await this.contextProviderBridge.resolution(e);let{textDocument:m}=r,g=c.filter(Bxe.matchContextItems);this.instantiationService.invokeFunction(cra,m.detectedLanguageId,g,n)||(p=!0),l=await this.instantiationService.invokeFunction(zei.getTraitsFromContextItems,e,g),this.instantiationService.invokeFunction(zei.ReportTraitsTelemetry,"contextProvider.traits",l,m.detectedLanguageId,m.detectedLanguageId,n),u=await this.instantiationService.invokeFunction(nra.getCodeSnippetsFromContextItems,e,g,m.detectedLanguageId),d=await this.instantiationService.invokeFunction(ira.getDiagnosticsFromContextItems,e,g)}let h=this.instantiationService.invokeFunction(Bxe.getDefaultDiagnosticSettings);return d=this.addDefaultDiagnosticBag(c,d,e,r,h),{traits:l,codeSnippets:u,diagnostics:d,turnOffSimilarFiles:p,resolvedContextItems:c}}async failFastPrompt(e,r,n,o){if(o?.isCancellationRequested)return SR._promptCancelled;if(await this.ignoreService.isCopilotIgnored(Ilr.URI.parse(e.uri)))return SR._copilotContentExclusion;if((n>0?e.getText().length:e.offsetAt(r))0},computeTimeMs:r-n,trailingWs:o,neighborSource:new Map,metadata:e.metadata,contextProvidersTelemetry:s}}errorPrompt(e){return(0,Hta.telemetryException)(this.completionsTelemetryService,e,"PromptComponents.CompletionsPromptFactory"),this.reset(),SR._promptError}reset(){this.renderer=this.getRenderer(),this.virtualPrompt=new Wei.VirtualPrompt(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}setPromptOrdering(e){this.promptOrdering!==e&&(this.promptOrdering=e,this.reset())}completionsPrompt(){let e=xlr[this.promptOrdering]?.promptFunction??eti;return this.instantiationService.invokeFunction(e)}getRenderer(){let e=xlr[this.promptOrdering]??xlr[MU.Default];return new e.renderer}addDefaultDiagnosticBag(e,r,n,o,s){if(s===void 0)return r;let c=o.textDocument;if(r!==void 0&&r.some(_=>_.uri.toString()===c.uri))return r;let l=performance.now(),u=this.languageDiagnosticsService.getDiagnostics(Ilr.URI.parse(c.uri));if(u.length===0)return r;let d=[],p=[],h=s.warnings==="yes"||s.warnings==="yesIfNoErrors",m=o.position;for(let _ of u)Math.abs(_.range.start.line-m.line)<=s.maxLineDistance&&(_.severity===Vei.DiagnosticSeverity.Error?d.push(_):_.severity===Vei.DiagnosticSeverity.Warning&&h&&p.push(_));let g=[...d,...s.warnings==="yes"||s.warnings==="yesIfNoErrors"&&d.length===0?p:[]];if(g.length===0)return r;g.sort((_,v)=>{let b=Math.abs(_.range.start.line-m.line),I=Math.abs(v.range.start.line-m.line);return b-I});let A={type:"DiagnosticBag",uri:Ilr.URI.parse(c.uri),values:g.slice(0,s.maxDiagnostics),id:(0,rra.generateUuid)()},y="copilot.chat.defaultDiagnostics",E=this.contextProviderStatistics.getStatisticsForCompletion(n);return E.addExpectations(y,[[A,"included"]]),e.push({providerId:y,matchScore:10,resolution:"full",resolutionTimeMs:performance.now()-l,data:[A]}),E.setLastResolution(y,"full"),r===void 0?[A]:(r.push(A),r)}};Fot=Yei([dC(2,klr.IInstantiationService),dC(3,Jei.ICompletionsTelemetryService),dC(4,Kei.IIgnoreService),dC(5,Xei.ICompletionsContextProviderBridgeService),dC(6,Plr.ICompletionsLogTargetService),dC(7,Dlr.ICompletionsContextProviderService),dC(8,Zei.ILanguageDiagnosticsService)],Fot);var wlr=class extends Fot{static{a(this,"ComponentsCompletionsPromptFactory")}constructor(e,r,n,o,s,c,l){super(void 0,void 0,e,r,n,o,s,c,l)}};fC.ComponentsCompletionsPromptFactory=wlr;fC.ComponentsCompletionsPromptFactory=wlr=Yei([dC(0,klr.IInstantiationService),dC(1,Jei.ICompletionsTelemetryService),dC(2,Kei.IIgnoreService),dC(3,Xei.ICompletionsContextProviderBridgeService),dC(4,Plr.ICompletionsLogTargetService),dC(5,Dlr.ICompletionsContextProviderService),dC(6,Zei.ILanguageDiagnosticsService)],wlr);var Rlr=class extends Fot{static{a(this,"TestComponentsCompletionsPromptFactory")}};fC.TestComponentsCompletionsPromptFactory=Rlr;function cra(t,e,r,n){let o=["cpp","c"];return(0,sra.isIncludeNeighborFilesActive)(t,e,n)||o.includes(e)||!r.some(c=>c.data.some(l=>l.type==="CodeSnippet"))}a(cra,"similarFilesEnabled")});var Flr=T(pA=>{"use strict";f();var tti=pA&&pA.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},rti=pA&&pA.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(pA,"__esModule",{value:!0});pA.TestCompletionsPromptFactory=pA.CompletionsPromptFactory=pA.DEFAULT_PROMPT_TIMEOUT=pA.ICompletionsPromptFactoryService=void 0;var lra=Dn(),nti=Po(),Nlr=wue(),ura=xB(),dra=qr();pA.ICompletionsPromptFactoryService=(0,dra.createServiceIdentifier)("ICompletionsPromptFactoryService");var Mlr=class{static{a(this,"SequentialCompletionsPromptFactory")}constructor(e){this.delegate=e}async prompt(e,r){return this.lastPromise=this.promptAsync(e,r),this.lastPromise}async promptAsync(e,r){if(await this.lastPromise,r?.isCancellationRequested)return Nlr._promptCancelled;try{return await this.delegate.prompt(e,r)}catch{return Nlr._promptError}}};pA.DEFAULT_PROMPT_TIMEOUT=1200;var Olr=class{static{a(this,"TimeoutHandlingCompletionsPromptFactory")}constructor(e){this.delegate=e}async prompt(e,r){let n=new lra.CancellationTokenSource,o=n.token;return r?.onCancellationRequested(()=>{n.cancel()}),await Promise.race([this.delegate.prompt(e,o),new Promise(s=>{setTimeout(()=>{n.cancel(),s(Nlr._promptTimeout)},pA.DEFAULT_PROMPT_TIMEOUT)})])}},Uot=class{static{a(this,"BaseComponentsCompletionsPromptFactory")}constructor(e,r,n){this.delegate=new Mlr(new Olr(n.createInstance(ura.TestComponentsCompletionsPromptFactory,e,r)))}prompt(e,r){return this.delegate.prompt(e,r)}};Uot=tti([rti(2,nti.IInstantiationService)],Uot);var Blr=class extends Uot{static{a(this,"CompletionsPromptFactory")}constructor(e){super(void 0,void 0,e)}};pA.CompletionsPromptFactory=Blr;pA.CompletionsPromptFactory=Blr=tti([rti(0,nti.IInstantiationService)],Blr);var Llr=class extends Uot{static{a(this,"TestCompletionsPromptFactory")}};pA.TestCompletionsPromptFactory=Llr});var wue=T(Pf=>{"use strict";f();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.PromptResponse=Pf._promptTimeout=Pf._promptCancelled=Pf._promptError=Pf._copilotContentExclusion=Pf._contextTooShort=Pf.MIN_PROMPT_EXCLUDED_LANGUAGE_IDS=Pf.MIN_PROMPT_CHARS=void 0;Pf.trimLastLine=yra;Pf.extractPrompt=Era;Pf.getPromptOptions=vra;var fra=yxe(),pra=Hm(),iti=Qit(),hra=gue(),mra=aC(),gra=Flr(),Ara=Iue();Pf.MIN_PROMPT_CHARS=10;Pf.MIN_PROMPT_EXCLUDED_LANGUAGE_IDS=["scminput"];Pf._contextTooShort={type:"contextTooShort"};Pf._copilotContentExclusion={type:"copilotContentExclusion"};Pf._promptError={type:"promptError"};Pf._promptCancelled={type:"promptCancelled"};Pf._promptTimeout={type:"promptTimeout"};var oti;(function(t){function e(r){return r.type==="prompt"?[{header:"PREFIX",content:r.prompt.prefix},{header:"SUFFIX",content:r.prompt.suffix},{header:"CONTEXT",content:(r.prompt.context||[]).join(` --- `)},{header:"FIM",content:"Is Fim enabled: "+r.prompt.isFimEnabled},{header:"TOKENS",content:`Prefix tokens: ${r.prompt.prefixTokens} Suffix tokens: ${r.prompt.suffixTokens}`},{header:"NEIGHBORS",content:Array.from(r.neighborSource.entries()).map(([n,o])=>`neighboring file type: ${n} @@ -1011,14 +1011,14 @@ ${o.join(", ")}`).join(` --- ${n.content} ---------------`).join(` -`):JSON.stringify(r,null," ")}a(e,"toString"),t.toString=e})(sei||(Lf.PromptResponse=sei={}));function Aea(t){let e=t.split(` -`),r=e[e.length-1],n=r.length-r.trimEnd().length,o=t.slice(0,t.length-n),s=t.slice(o.length);return[r.length===n?o:t,s]}a(Aea,"trimLastLine");function yea(t,e,r,n,o,s={}){let l=t.get(hea.ICompletionsTextDocumentManagerService).findNotebook(r.textDocument),u=l?.getCellFor(r.textDocument);return l&&u&&(r=Cea(r,l,u)),n.extendWithConfigProperties(t),n.sanitizeKeys(),t.get(mea.ICompletionsPromptFactoryService).prompt({completionId:e,completionState:r,telemetryData:n,promptOpts:{...s,separateContext:!0}},o)}a(yea,"extractPrompt");function Eea(t,e){let r=t.document.detectedLanguageId,n=t.document.getText();return r===e?n:(0,dea.commentBlockAsSingles)(n,e)}a(Eea,"addNeighboringCellsToPrompt");function Cea(t,e,r){let o=e.getCells().filter(l=>l.index0?o.map(l=>Eea(l,r.document.detectedLanguageId)).join(` +`):JSON.stringify(r,null," ")}a(e,"toString"),t.toString=e})(oti||(Pf.PromptResponse=oti={}));function yra(t){let e=t.split(` +`),r=e[e.length-1],n=r.length-r.trimEnd().length,o=t.slice(0,t.length-n),s=t.slice(o.length);return[r.length===n?o:t,s]}a(yra,"trimLastLine");function Era(t,e,r,n,o,s={}){let l=t.get(mra.ICompletionsTextDocumentManagerService).findNotebook(r.textDocument),u=l?.getCellFor(r.textDocument);return l&&u&&(r=Cra(r,l,u)),n.extendWithConfigProperties(t),n.sanitizeKeys(),t.get(gra.ICompletionsPromptFactoryService).prompt({completionId:e,completionState:r,telemetryData:n,promptOpts:{...s,separateContext:!0}},o)}a(Era,"extractPrompt");function _ra(t,e){let r=t.document.detectedLanguageId,n=t.document.getText();return r===e?n:(0,fra.commentBlockAsSingles)(n,e)}a(_ra,"addNeighboringCellsToPrompt");function Cra(t,e,r){let o=e.getCells().filter(l=>l.index0?o.map(l=>_ra(l,r.document.detectedLanguageId)).join(` `)+` -`:"",c={line:0,character:0};return t.applyEdits([{newText:s,range:{start:c,end:c}}])}a(Cea,"applyEditsForNotebook");function _ea(t,e,r){let n=t.get(fea.ICompletionsFeaturesService),s=n.maxPromptCompletionTokens(e)-(0,pea.getMaxSolutionTokens)(),c=(0,oei.getNumberOfSnippets)(e,r),l=(0,oei.getSimilarFilesOptions)(t,e,r),u=n.suffixPercent(e),d=n.suffixMatchThreshold(e);if(u<0||u>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${u}`);if(d<0||d>100)throw new Error(`suffixMatchThreshold must be between 0 and 100, but was ${d}`);return{maxPromptLength:s,similarFilesOptions:l,numberOfSnippets:c,suffixPercent:u,suffixMatchThreshold:d}}a(_ea,"getPromptOptions")});var lei=T(cQ=>{"use strict";f();Object.defineProperty(cQ,"__esModule",{value:!0});cQ.TypeSystem=cQ.TypeSystemDuplicateFormat=cQ.TypeSystemDuplicateTypeKind=void 0;var Nst=mue(),vea=Kxe(),bea=nn(),cei=hd(),Dst=class extends cei.TypeBoxError{static{a(this,"TypeSystemDuplicateTypeKind")}constructor(e){super(`Duplicate type kind '${e}' detected`)}};cQ.TypeSystemDuplicateTypeKind=Dst;var Mst=class extends cei.TypeBoxError{static{a(this,"TypeSystemDuplicateFormat")}constructor(e){super(`Duplicate string format '${e}' detected`)}};cQ.TypeSystemDuplicateFormat=Mst;var aei;(function(t){function e(n,o){if(Nst.TypeRegistry.Has(n))throw new Dst(n);return Nst.TypeRegistry.Set(n,o),(s={})=>(0,vea.Unsafe)({...s,[bea.Kind]:n})}a(e,"Type"),t.Type=e;function r(n,o){if(Nst.FormatRegistry.Has(n))throw new Mst(n);return Nst.FormatRegistry.Set(n,o),n}a(r,"Format"),t.Format=r})(aei||(cQ.TypeSystem=aei={}))});var Elr=T(lQ=>{"use strict";f();var Tea=lQ&&lQ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),uei=lQ&&lQ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tea(e,t,r)};Object.defineProperty(lQ,"__esModule",{value:!0});uei(yxe(),lQ);uei(lei(),lQ)});var Clr=T(Qwe=>{"use strict";f();Object.defineProperty(Qwe,"__esModule",{value:!0});Qwe.DefaultErrorFunction=dei;Qwe.SetErrorFunction=Iea;Qwe.GetErrorFunction=xea;var Sea=nn(),gn=_lr();function dei(t){switch(t.errorType){case gn.ValueErrorType.ArrayContains:return"Expected array to contain at least one matching value";case gn.ValueErrorType.ArrayMaxContains:return`Expected array to contain no more than ${t.schema.maxContains} matching values`;case gn.ValueErrorType.ArrayMinContains:return`Expected array to contain at least ${t.schema.minContains} matching values`;case gn.ValueErrorType.ArrayMaxItems:return`Expected array length to be less or equal to ${t.schema.maxItems}`;case gn.ValueErrorType.ArrayMinItems:return`Expected array length to be greater or equal to ${t.schema.minItems}`;case gn.ValueErrorType.ArrayUniqueItems:return"Expected array elements to be unique";case gn.ValueErrorType.Array:return"Expected array";case gn.ValueErrorType.AsyncIterator:return"Expected AsyncIterator";case gn.ValueErrorType.BigIntExclusiveMaximum:return`Expected bigint to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.BigIntMaximum:return`Expected bigint to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.BigIntMinimum:return`Expected bigint to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.BigIntMultipleOf:return`Expected bigint to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.BigInt:return"Expected bigint";case gn.ValueErrorType.Boolean:return"Expected boolean";case gn.ValueErrorType.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${t.schema.exclusiveMinimumTimestamp}`;case gn.ValueErrorType.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${t.schema.exclusiveMaximumTimestamp}`;case gn.ValueErrorType.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${t.schema.minimumTimestamp}`;case gn.ValueErrorType.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${t.schema.maximumTimestamp}`;case gn.ValueErrorType.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${t.schema.multipleOfTimestamp}`;case gn.ValueErrorType.Date:return"Expected Date";case gn.ValueErrorType.Function:return"Expected function";case gn.ValueErrorType.IntegerExclusiveMaximum:return`Expected integer to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.IntegerExclusiveMinimum:return`Expected integer to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.IntegerMaximum:return`Expected integer to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.IntegerMinimum:return`Expected integer to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.IntegerMultipleOf:return`Expected integer to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.Integer:return"Expected integer";case gn.ValueErrorType.IntersectUnevaluatedProperties:return"Unexpected property";case gn.ValueErrorType.Intersect:return"Expected all values to match";case gn.ValueErrorType.Iterator:return"Expected Iterator";case gn.ValueErrorType.Literal:return`Expected ${typeof t.schema.const=="string"?`'${t.schema.const}'`:t.schema.const}`;case gn.ValueErrorType.Never:return"Never";case gn.ValueErrorType.Not:return"Value should not match";case gn.ValueErrorType.Null:return"Expected null";case gn.ValueErrorType.NumberExclusiveMaximum:return`Expected number to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.NumberExclusiveMinimum:return`Expected number to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.NumberMaximum:return`Expected number to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.NumberMinimum:return`Expected number to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.NumberMultipleOf:return`Expected number to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.Number:return"Expected number";case gn.ValueErrorType.Object:return"Expected object";case gn.ValueErrorType.ObjectAdditionalProperties:return"Unexpected property";case gn.ValueErrorType.ObjectMaxProperties:return`Expected object to have no more than ${t.schema.maxProperties} properties`;case gn.ValueErrorType.ObjectMinProperties:return`Expected object to have at least ${t.schema.minProperties} properties`;case gn.ValueErrorType.ObjectRequiredProperty:return"Expected required property";case gn.ValueErrorType.Promise:return"Expected Promise";case gn.ValueErrorType.RegExp:return"Expected string to match regular expression";case gn.ValueErrorType.StringFormatUnknown:return`Unknown format '${t.schema.format}'`;case gn.ValueErrorType.StringFormat:return`Expected string to match '${t.schema.format}' format`;case gn.ValueErrorType.StringMaxLength:return`Expected string length less or equal to ${t.schema.maxLength}`;case gn.ValueErrorType.StringMinLength:return`Expected string length greater or equal to ${t.schema.minLength}`;case gn.ValueErrorType.StringPattern:return`Expected string to match '${t.schema.pattern}'`;case gn.ValueErrorType.String:return"Expected string";case gn.ValueErrorType.Symbol:return"Expected symbol";case gn.ValueErrorType.TupleLength:return`Expected tuple to have ${t.schema.maxItems||0} elements`;case gn.ValueErrorType.Tuple:return"Expected tuple";case gn.ValueErrorType.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${t.schema.maxByteLength}`;case gn.ValueErrorType.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${t.schema.minByteLength}`;case gn.ValueErrorType.Uint8Array:return"Expected Uint8Array";case gn.ValueErrorType.Undefined:return"Expected undefined";case gn.ValueErrorType.Union:return"Expected union value";case gn.ValueErrorType.Void:return"Expected void";case gn.ValueErrorType.Kind:return`Expected kind '${t.schema[Sea.Kind]}'`;default:return"Unknown error type"}}a(dei,"DefaultErrorFunction");var fei=dei;function Iea(t){fei=t}a(Iea,"SetErrorFunction");function xea(){return fei}a(xea,"GetErrorFunction")});var mei=T(mde=>{"use strict";f();Object.defineProperty(mde,"__esModule",{value:!0});mde.TypeDereferenceError=void 0;mde.Pushref=kea;mde.Deref=hei;var wea=hd(),pei=nn(),Rea=Ont(),Ost=class extends wea.TypeBoxError{static{a(this,"TypeDereferenceError")}constructor(e){super(`Unable to dereference schema with $id '${e.$ref}'`),this.schema=e}};mde.TypeDereferenceError=Ost;function Pea(t,e){let r=e.find(n=>n.$id===t.$ref);if(r===void 0)throw new Ost(t);return hei(r,e)}a(Pea,"Resolve");function kea(t,e){return!(0,Rea.IsString)(t.$id)||e.some(r=>r.$id===t.$id)||e.push(t),e}a(kea,"Pushref");function hei(t,e){return t[pei.Kind]==="This"||t[pei.Kind]==="Ref"?Pea(t,e):t}a(hei,"Deref")});var LR=T(JK=>{"use strict";f();var Nea=JK&&JK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Dea=JK&&JK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Nea(e,t,r)};Object.defineProperty(JK,"__esModule",{value:!0});Dea(mei(),JK)});var Eei=T(qwe=>{"use strict";f();Object.defineProperty(qwe,"__esModule",{value:!0});qwe.ValueHashError=void 0;qwe.Hash=Kea;var FR=Op(),Mea=hd(),Bst=class extends Mea.TypeBoxError{static{a(this,"ValueHashError")}constructor(e){super("Unable to hash value"),this.value=e}};qwe.ValueHashError=Bst;var ob;(function(t){t[t.Undefined=0]="Undefined",t[t.Null=1]="Null",t[t.Boolean=2]="Boolean",t[t.Number=3]="Number",t[t.String=4]="String",t[t.Object=5]="Object",t[t.Array=6]="Array",t[t.Date=7]="Date",t[t.Uint8Array=8]="Uint8Array",t[t.Symbol=9]="Symbol",t[t.BigInt=10]="BigInt"})(ob||(ob={}));var gde=BigInt("14695981039346656037"),[Oea,Bea]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Lea=Array.from({length:256}).map((t,e)=>BigInt(e)),gei=new Float64Array(1),Aei=new DataView(gei.buffer),yei=new Uint8Array(gei.buffer);function*Fea(t){let e=t===0?1:Math.ceil(Math.floor(Math.log2(t)+1)/8);for(let r=0;r>8*(e-1-r)&255}a(Fea,"NumberToBytes");function Uea(t){vA(ob.Array);for(let e of t)Ade(e)}a(Uea,"ArrayType");function Qea(t){vA(ob.Boolean),vA(t?1:0)}a(Qea,"BooleanType");function qea(t){vA(ob.BigInt),Aei.setBigInt64(0,t);for(let e of yei)vA(e)}a(qea,"BigIntType");function Gea(t){vA(ob.Date),Ade(t.getTime())}a(Gea,"DateType");function Hea(t){vA(ob.Null)}a(Hea,"NullType");function jea(t){vA(ob.Number),Aei.setFloat64(0,t);for(let e of yei)vA(e)}a(jea,"NumberType");function $ea(t){vA(ob.Object);for(let e of globalThis.Object.getOwnPropertyNames(t).sort())Ade(e),Ade(t[e])}a($ea,"ObjectType");function Vea(t){vA(ob.String);for(let e=0;e{"use strict";f();var Jea=XK&&XK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Xea=XK&&XK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Jea(e,t,r)};Object.defineProperty(XK,"__esModule",{value:!0});Xea(Eei(),XK)});var blr=T($we=>{"use strict";f();Object.defineProperty($we,"__esModule",{value:!0});$we.ValueCheckUnknownTypeError=void 0;$we.Check=Uta;var Hwe=Elr(),vlr=LR(),Zea=Gwe(),yde=nn(),Cei=dR(),eta=oK(),jwe=mue(),tta=hd(),rta=U0(),H0=Op(),nta=Bo(),Lst=class extends tta.TypeBoxError{static{a(this,"ValueCheckUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};$we.ValueCheckUnknownTypeError=Lst;function ita(t){return t[yde.Kind]==="Any"||t[yde.Kind]==="Unknown"}a(ita,"IsAnyOrUnknown");function gs(t){return t!==void 0}a(gs,"IsDefined");function ota(t,e,r){return!0}a(ota,"FromAny");function sta(t,e,r){return!0}a(sta,"FromArgument");function ata(t,e,r){if(!(0,H0.IsArray)(r)||gs(t.minItems)&&!(r.length>=t.minItems)||gs(t.maxItems)&&!(r.length<=t.maxItems)||!r.every(s=>$h(t.items,e,s))||t.uniqueItems===!0&&!(function(){let s=new Set;for(let c of r){let l=(0,Zea.Hash)(c);if(s.has(l))return!1;s.add(l)}return!0})())return!1;if(!(gs(t.contains)||(0,H0.IsNumber)(t.minContains)||(0,H0.IsNumber)(t.maxContains)))return!0;let n=gs(t.contains)?t.contains:(0,rta.Never)(),o=r.reduce((s,c)=>$h(n,e,c)?s+1:s,0);return!(o===0||(0,H0.IsNumber)(t.minContains)&&ot.maxContains)}a(ata,"FromArray");function cta(t,e,r){return(0,H0.IsAsyncIterator)(r)}a(cta,"FromAsyncIterator");function lta(t,e,r){return!(!(0,H0.IsBigInt)(r)||gs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||gs(t.maximum)&&!(r<=t.maximum)||gs(t.minimum)&&!(r>=t.minimum)||gs(t.multipleOf)&&r%t.multipleOf!==BigInt(0))}a(lta,"FromBigInt");function uta(t,e,r){return(0,H0.IsBoolean)(r)}a(uta,"FromBoolean");function dta(t,e,r){return $h(t.returns,e,r.prototype)}a(dta,"FromConstructor");function fta(t,e,r){return!(!(0,H0.IsDate)(r)||gs(t.exclusiveMaximumTimestamp)&&!(r.getTime()t.exclusiveMinimumTimestamp)||gs(t.maximumTimestamp)&&!(r.getTime()<=t.maximumTimestamp)||gs(t.minimumTimestamp)&&!(r.getTime()>=t.minimumTimestamp)||gs(t.multipleOfTimestamp)&&r.getTime()%t.multipleOfTimestamp!==0)}a(fta,"FromDate");function pta(t,e,r){return(0,H0.IsFunction)(r)}a(pta,"FromFunction");function hta(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return $h(o,[...e,...n],r)}a(hta,"FromImport");function mta(t,e,r){return!(!(0,H0.IsInteger)(r)||gs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||gs(t.maximum)&&!(r<=t.maximum)||gs(t.minimum)&&!(r>=t.minimum)||gs(t.multipleOf)&&r%t.multipleOf!==0)}a(mta,"FromInteger");function gta(t,e,r){let n=t.allOf.every(o=>$h(o,e,r));if(t.unevaluatedProperties===!1){let o=new RegExp((0,Cei.KeyOfPattern)(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c));return n&&s}else if((0,nta.IsSchema)(t.unevaluatedProperties)){let o=new RegExp((0,Cei.KeyOfPattern)(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c)||$h(t.unevaluatedProperties,e,r[c]));return n&&s}else return n}a(gta,"FromIntersect");function Ata(t,e,r){return(0,H0.IsIterator)(r)}a(Ata,"FromIterator");function yta(t,e,r){return r===t.const}a(yta,"FromLiteral");function Eta(t,e,r){return!1}a(Eta,"FromNever");function Cta(t,e,r){return!$h(t.not,e,r)}a(Cta,"FromNot");function _ta(t,e,r){return(0,H0.IsNull)(r)}a(_ta,"FromNull");function vta(t,e,r){return!(!Hwe.TypeSystemPolicy.IsNumberLike(r)||gs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||gs(t.minimum)&&!(r>=t.minimum)||gs(t.maximum)&&!(r<=t.maximum)||gs(t.multipleOf)&&r%t.multipleOf!==0)}a(vta,"FromNumber");function bta(t,e,r){if(!Hwe.TypeSystemPolicy.IsObjectLike(r)||gs(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||gs(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let n=Object.getOwnPropertyNames(t.properties);for(let o of n){let s=t.properties[o];if(t.required&&t.required.includes(o)){if(!$h(s,e,r[o])||((0,eta.ExtendsUndefinedCheck)(s)||ita(s))&&!(o in r))return!1}else if(Hwe.TypeSystemPolicy.IsExactOptionalProperty(r,o)&&!$h(s,e,r[o]))return!1}if(t.additionalProperties===!1){let o=Object.getOwnPropertyNames(r);return t.required&&t.required.length===n.length&&o.length===n.length?!0:o.every(s=>n.includes(s))}else return typeof t.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||$h(t.additionalProperties,e,r[s])):!0}a(bta,"FromObject");function Tta(t,e,r){return(0,H0.IsPromise)(r)}a(Tta,"FromPromise");function Sta(t,e,r){if(!Hwe.TypeSystemPolicy.IsRecordLike(r)||gs(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||gs(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let[n,o]=Object.entries(t.patternProperties)[0],s=new RegExp(n),c=Object.entries(r).every(([d,p])=>s.test(d)?$h(o,e,p):!0),l=typeof t.additionalProperties=="object"?Object.entries(r).every(([d,p])=>s.test(d)?!0:$h(t.additionalProperties,e,p)):!0,u=t.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return c&&l&&u}a(Sta,"FromRecord");function Ita(t,e,r){return $h((0,vlr.Deref)(t,e),e,r)}a(Ita,"FromRef");function xta(t,e,r){let n=new RegExp(t.source,t.flags);return gs(t.minLength)&&!(r.length>=t.minLength)||gs(t.maxLength)&&!(r.length<=t.maxLength)?!1:n.test(r)}a(xta,"FromRegExp");function wta(t,e,r){return!(0,H0.IsString)(r)||gs(t.minLength)&&!(r.length>=t.minLength)||gs(t.maxLength)&&!(r.length<=t.maxLength)||gs(t.pattern)&&!new RegExp(t.pattern).test(r)?!1:gs(t.format)?jwe.FormatRegistry.Has(t.format)?jwe.FormatRegistry.Get(t.format)(r):!1:!0}a(wta,"FromString");function Rta(t,e,r){return(0,H0.IsSymbol)(r)}a(Rta,"FromSymbol");function Pta(t,e,r){return(0,H0.IsString)(r)&&new RegExp(t.pattern).test(r)}a(Pta,"FromTemplateLiteral");function kta(t,e,r){return $h((0,vlr.Deref)(t,e),e,r)}a(kta,"FromThis");function Nta(t,e,r){if(!(0,H0.IsArray)(r)||t.items===void 0&&r.length!==0||r.length!==t.maxItems)return!1;if(!t.items)return!0;for(let n=0;n$h(n,e,r))}a(Mta,"FromUnion");function Ota(t,e,r){return!(!(0,H0.IsUint8Array)(r)||gs(t.maxByteLength)&&!(r.length<=t.maxByteLength)||gs(t.minByteLength)&&!(r.length>=t.minByteLength))}a(Ota,"FromUint8Array");function Bta(t,e,r){return!0}a(Bta,"FromUnknown");function Lta(t,e,r){return Hwe.TypeSystemPolicy.IsVoidLike(r)}a(Lta,"FromVoid");function Fta(t,e,r){return jwe.TypeRegistry.Has(t[yde.Kind])?jwe.TypeRegistry.Get(t[yde.Kind])(t,r):!1}a(Fta,"FromKind");function $h(t,e,r){let n=gs(t.$id)?(0,vlr.Pushref)(t,e):e,o=t;switch(o[yde.Kind]){case"Any":return ota(o,n,r);case"Argument":return sta(o,n,r);case"Array":return ata(o,n,r);case"AsyncIterator":return cta(o,n,r);case"BigInt":return lta(o,n,r);case"Boolean":return uta(o,n,r);case"Constructor":return dta(o,n,r);case"Date":return fta(o,n,r);case"Function":return pta(o,n,r);case"Import":return hta(o,n,r);case"Integer":return mta(o,n,r);case"Intersect":return gta(o,n,r);case"Iterator":return Ata(o,n,r);case"Literal":return yta(o,n,r);case"Never":return Eta(o,n,r);case"Not":return Cta(o,n,r);case"Null":return _ta(o,n,r);case"Number":return vta(o,n,r);case"Object":return bta(o,n,r);case"Promise":return Tta(o,n,r);case"Record":return Sta(o,n,r);case"Ref":return Ita(o,n,r);case"RegExp":return xta(o,n,r);case"String":return wta(o,n,r);case"Symbol":return Rta(o,n,r);case"TemplateLiteral":return Pta(o,n,r);case"This":return kta(o,n,r);case"Tuple":return Nta(o,n,r);case"Undefined":return Dta(o,n,r);case"Union":return Mta(o,n,r);case"Uint8Array":return Ota(o,n,r);case"Unknown":return Bta(o,n,r);case"Void":return Lta(o,n,r);default:if(!jwe.TypeRegistry.Has(o[yde.Kind]))throw new Lst(o);return Fta(o,n,r)}}a($h,"Visit");function Uta(...t){return t.length===3?$h(t[0],t[1],t[2]):$h(t[0],[],t[1])}a(Uta,"Check")});var sb=T(ZK=>{"use strict";f();var Qta=ZK&&ZK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qta=ZK&&ZK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Qta(e,t,r)};Object.defineProperty(ZK,"__esModule",{value:!0});qta(blr(),ZK)});var _lr=T(KB=>{"use strict";f();Object.defineProperty(KB,"__esModule",{value:!0});KB.ValueErrorIterator=KB.ValueErrorsUnknownTypeError=KB.ValueErrorType=void 0;KB.Errors=wra;var Vwe=Elr(),_ei=dR(),Fst=mue(),Gta=$rr(),Hta=Clr(),jta=hd(),vei=LR(),$ta=Gwe(),Vta=sb(),Tlr=nn(),Wta=U0(),Ff=Op(),Fr;(function(t){t[t.ArrayContains=0]="ArrayContains",t[t.ArrayMaxContains=1]="ArrayMaxContains",t[t.ArrayMaxItems=2]="ArrayMaxItems",t[t.ArrayMinContains=3]="ArrayMinContains",t[t.ArrayMinItems=4]="ArrayMinItems",t[t.ArrayUniqueItems=5]="ArrayUniqueItems",t[t.Array=6]="Array",t[t.AsyncIterator=7]="AsyncIterator",t[t.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",t[t.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",t[t.BigIntMaximum=10]="BigIntMaximum",t[t.BigIntMinimum=11]="BigIntMinimum",t[t.BigIntMultipleOf=12]="BigIntMultipleOf",t[t.BigInt=13]="BigInt",t[t.Boolean=14]="Boolean",t[t.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",t[t.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",t[t.DateMaximumTimestamp=17]="DateMaximumTimestamp",t[t.DateMinimumTimestamp=18]="DateMinimumTimestamp",t[t.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",t[t.Date=20]="Date",t[t.Function=21]="Function",t[t.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",t[t.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",t[t.IntegerMaximum=24]="IntegerMaximum",t[t.IntegerMinimum=25]="IntegerMinimum",t[t.IntegerMultipleOf=26]="IntegerMultipleOf",t[t.Integer=27]="Integer",t[t.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",t[t.Intersect=29]="Intersect",t[t.Iterator=30]="Iterator",t[t.Kind=31]="Kind",t[t.Literal=32]="Literal",t[t.Never=33]="Never",t[t.Not=34]="Not",t[t.Null=35]="Null",t[t.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",t[t.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",t[t.NumberMaximum=38]="NumberMaximum",t[t.NumberMinimum=39]="NumberMinimum",t[t.NumberMultipleOf=40]="NumberMultipleOf",t[t.Number=41]="Number",t[t.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",t[t.ObjectMaxProperties=43]="ObjectMaxProperties",t[t.ObjectMinProperties=44]="ObjectMinProperties",t[t.ObjectRequiredProperty=45]="ObjectRequiredProperty",t[t.Object=46]="Object",t[t.Promise=47]="Promise",t[t.RegExp=48]="RegExp",t[t.StringFormatUnknown=49]="StringFormatUnknown",t[t.StringFormat=50]="StringFormat",t[t.StringMaxLength=51]="StringMaxLength",t[t.StringMinLength=52]="StringMinLength",t[t.StringPattern=53]="StringPattern",t[t.String=54]="String",t[t.Symbol=55]="Symbol",t[t.TupleLength=56]="TupleLength",t[t.Tuple=57]="Tuple",t[t.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",t[t.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",t[t.Uint8Array=60]="Uint8Array",t[t.Undefined=61]="Undefined",t[t.Union=62]="Union",t[t.Void=63]="Void"})(Fr||(KB.ValueErrorType=Fr={}));var Ust=class extends jta.TypeBoxError{static{a(this,"ValueErrorsUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};KB.ValueErrorsUnknownTypeError=Ust;function YB(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}a(YB,"EscapeKey");function As(t){return t!==void 0}a(As,"IsDefined");var Wwe=class{static{a(this,"ValueErrorIterator")}constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){let e=this.iterator.next();return e.done?void 0:e.value}};KB.ValueErrorIterator=Wwe;function jr(t,e,r,n,o=[]){return{type:t,schema:e,path:r,value:n,message:(0,Hta.GetErrorFunction)()({errorType:t,path:r,schema:e,value:n,errors:o}),errors:o}}a(jr,"Create");function*zta(t,e,r,n){}a(zta,"FromAny");function*Yta(t,e,r,n){}a(Yta,"FromArgument");function*Kta(t,e,r,n){if(!(0,Ff.IsArray)(n))return yield jr(Fr.Array,t,r,n);As(t.minItems)&&!(n.length>=t.minItems)&&(yield jr(Fr.ArrayMinItems,t,r,n)),As(t.maxItems)&&!(n.length<=t.maxItems)&&(yield jr(Fr.ArrayMaxItems,t,r,n));for(let c=0;cVh(o,e,`${r}${u}`,l).next().done===!0?c+1:c,0);s===0&&(yield jr(Fr.ArrayContains,t,r,n)),(0,Ff.IsNumber)(t.minContains)&&st.maxContains&&(yield jr(Fr.ArrayMaxContains,t,r,n))}a(Kta,"FromArray");function*Jta(t,e,r,n){(0,Ff.IsAsyncIterator)(n)||(yield jr(Fr.AsyncIterator,t,r,n))}a(Jta,"FromAsyncIterator");function*Xta(t,e,r,n){if(!(0,Ff.IsBigInt)(n))return yield jr(Fr.BigInt,t,r,n);As(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.BigIntExclusiveMinimum,t,r,n)),As(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.BigIntMaximum,t,r,n)),As(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.BigIntMinimum,t,r,n)),As(t.multipleOf)&&n%t.multipleOf!==BigInt(0)&&(yield jr(Fr.BigIntMultipleOf,t,r,n))}a(Xta,"FromBigInt");function*Zta(t,e,r,n){(0,Ff.IsBoolean)(n)||(yield jr(Fr.Boolean,t,r,n))}a(Zta,"FromBoolean");function*era(t,e,r,n){yield*Vh(t.returns,e,r,n.prototype)}a(era,"FromConstructor");function*tra(t,e,r,n){if(!(0,Ff.IsDate)(n))return yield jr(Fr.Date,t,r,n);As(t.exclusiveMaximumTimestamp)&&!(n.getTime()t.exclusiveMinimumTimestamp)&&(yield jr(Fr.DateExclusiveMinimumTimestamp,t,r,n)),As(t.maximumTimestamp)&&!(n.getTime()<=t.maximumTimestamp)&&(yield jr(Fr.DateMaximumTimestamp,t,r,n)),As(t.minimumTimestamp)&&!(n.getTime()>=t.minimumTimestamp)&&(yield jr(Fr.DateMinimumTimestamp,t,r,n)),As(t.multipleOfTimestamp)&&n.getTime()%t.multipleOfTimestamp!==0&&(yield jr(Fr.DateMultipleOfTimestamp,t,r,n))}a(tra,"FromDate");function*rra(t,e,r,n){(0,Ff.IsFunction)(n)||(yield jr(Fr.Function,t,r,n))}a(rra,"FromFunction");function*nra(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref];yield*Vh(s,[...e,...o],r,n)}a(nra,"FromImport");function*ira(t,e,r,n){if(!(0,Ff.IsInteger)(n))return yield jr(Fr.Integer,t,r,n);As(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.IntegerExclusiveMinimum,t,r,n)),As(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.IntegerMaximum,t,r,n)),As(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.IntegerMinimum,t,r,n)),As(t.multipleOf)&&n%t.multipleOf!==0&&(yield jr(Fr.IntegerMultipleOf,t,r,n))}a(ira,"FromInteger");function*ora(t,e,r,n){let o=!1;for(let s of t.allOf)for(let c of Vh(s,e,r,n))o=!0,yield c;if(o)return yield jr(Fr.Intersect,t,r,n);if(t.unevaluatedProperties===!1){let s=new RegExp((0,_ei.KeyOfPattern)(t));for(let c of Object.getOwnPropertyNames(n))s.test(c)||(yield jr(Fr.IntersectUnevaluatedProperties,t,`${r}/${c}`,n))}if(typeof t.unevaluatedProperties=="object"){let s=new RegExp((0,_ei.KeyOfPattern)(t));for(let c of Object.getOwnPropertyNames(n))if(!s.test(c)){let l=Vh(t.unevaluatedProperties,e,`${r}/${c}`,n[c]).next();l.done||(yield l.value)}}}a(ora,"FromIntersect");function*sra(t,e,r,n){(0,Ff.IsIterator)(n)||(yield jr(Fr.Iterator,t,r,n))}a(sra,"FromIterator");function*ara(t,e,r,n){n!==t.const&&(yield jr(Fr.Literal,t,r,n))}a(ara,"FromLiteral");function*cra(t,e,r,n){yield jr(Fr.Never,t,r,n)}a(cra,"FromNever");function*lra(t,e,r,n){Vh(t.not,e,r,n).next().done===!0&&(yield jr(Fr.Not,t,r,n))}a(lra,"FromNot");function*ura(t,e,r,n){(0,Ff.IsNull)(n)||(yield jr(Fr.Null,t,r,n))}a(ura,"FromNull");function*dra(t,e,r,n){if(!Vwe.TypeSystemPolicy.IsNumberLike(n))return yield jr(Fr.Number,t,r,n);As(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.NumberExclusiveMinimum,t,r,n)),As(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.NumberMaximum,t,r,n)),As(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.NumberMinimum,t,r,n)),As(t.multipleOf)&&n%t.multipleOf!==0&&(yield jr(Fr.NumberMultipleOf,t,r,n))}a(dra,"FromNumber");function*fra(t,e,r,n){if(!Vwe.TypeSystemPolicy.IsObjectLike(n))return yield jr(Fr.Object,t,r,n);As(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield jr(Fr.ObjectMinProperties,t,r,n)),As(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield jr(Fr.ObjectMaxProperties,t,r,n));let o=Array.isArray(t.required)?t.required:[],s=Object.getOwnPropertyNames(t.properties),c=Object.getOwnPropertyNames(n);for(let l of o)c.includes(l)||(yield jr(Fr.ObjectRequiredProperty,t.properties[l],`${r}/${YB(l)}`,void 0));if(t.additionalProperties===!1)for(let l of c)s.includes(l)||(yield jr(Fr.ObjectAdditionalProperties,t,`${r}/${YB(l)}`,n[l]));if(typeof t.additionalProperties=="object")for(let l of c)s.includes(l)||(yield*Vh(t.additionalProperties,e,`${r}/${YB(l)}`,n[l]));for(let l of s){let u=t.properties[l];t.required&&t.required.includes(l)?(yield*Vh(u,e,`${r}/${YB(l)}`,n[l]),(0,Gta.ExtendsUndefinedCheck)(t)&&!(l in n)&&(yield jr(Fr.ObjectRequiredProperty,u,`${r}/${YB(l)}`,void 0))):Vwe.TypeSystemPolicy.IsExactOptionalProperty(n,l)&&(yield*Vh(u,e,`${r}/${YB(l)}`,n[l]))}}a(fra,"FromObject");function*pra(t,e,r,n){(0,Ff.IsPromise)(n)||(yield jr(Fr.Promise,t,r,n))}a(pra,"FromPromise");function*hra(t,e,r,n){if(!Vwe.TypeSystemPolicy.IsRecordLike(n))return yield jr(Fr.Object,t,r,n);As(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield jr(Fr.ObjectMinProperties,t,r,n)),As(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield jr(Fr.ObjectMaxProperties,t,r,n));let[o,s]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let[l,u]of Object.entries(n))c.test(l)&&(yield*Vh(s,e,`${r}/${YB(l)}`,u));if(typeof t.additionalProperties=="object")for(let[l,u]of Object.entries(n))c.test(l)||(yield*Vh(t.additionalProperties,e,`${r}/${YB(l)}`,u));if(t.additionalProperties===!1){for(let[l,u]of Object.entries(n))if(!c.test(l))return yield jr(Fr.ObjectAdditionalProperties,t,`${r}/${YB(l)}`,u)}}a(hra,"FromRecord");function*mra(t,e,r,n){yield*Vh((0,vei.Deref)(t,e),e,r,n)}a(mra,"FromRef");function*gra(t,e,r,n){if(!(0,Ff.IsString)(n))return yield jr(Fr.String,t,r,n);if(As(t.minLength)&&!(n.length>=t.minLength)&&(yield jr(Fr.StringMinLength,t,r,n)),As(t.maxLength)&&!(n.length<=t.maxLength)&&(yield jr(Fr.StringMaxLength,t,r,n)),!new RegExp(t.source,t.flags).test(n))return yield jr(Fr.RegExp,t,r,n)}a(gra,"FromRegExp");function*Ara(t,e,r,n){if(!(0,Ff.IsString)(n))return yield jr(Fr.String,t,r,n);As(t.minLength)&&!(n.length>=t.minLength)&&(yield jr(Fr.StringMinLength,t,r,n)),As(t.maxLength)&&!(n.length<=t.maxLength)&&(yield jr(Fr.StringMaxLength,t,r,n)),(0,Ff.IsString)(t.pattern)&&(new RegExp(t.pattern).test(n)||(yield jr(Fr.StringPattern,t,r,n))),(0,Ff.IsString)(t.format)&&(Fst.FormatRegistry.Has(t.format)?Fst.FormatRegistry.Get(t.format)(n)||(yield jr(Fr.StringFormat,t,r,n)):yield jr(Fr.StringFormatUnknown,t,r,n))}a(Ara,"FromString");function*yra(t,e,r,n){(0,Ff.IsSymbol)(n)||(yield jr(Fr.Symbol,t,r,n))}a(yra,"FromSymbol");function*Era(t,e,r,n){if(!(0,Ff.IsString)(n))return yield jr(Fr.String,t,r,n);new RegExp(t.pattern).test(n)||(yield jr(Fr.StringPattern,t,r,n))}a(Era,"FromTemplateLiteral");function*Cra(t,e,r,n){yield*Vh((0,vei.Deref)(t,e),e,r,n)}a(Cra,"FromThis");function*_ra(t,e,r,n){if(!(0,Ff.IsArray)(n))return yield jr(Fr.Tuple,t,r,n);if(t.items===void 0&&n.length!==0)return yield jr(Fr.TupleLength,t,r,n);if(n.length!==t.maxItems)return yield jr(Fr.TupleLength,t,r,n);if(t.items)for(let o=0;onew Wwe(Vh(s,e,r,n)));yield jr(Fr.Union,t,r,n,o)}a(bra,"FromUnion");function*Tra(t,e,r,n){if(!(0,Ff.IsUint8Array)(n))return yield jr(Fr.Uint8Array,t,r,n);As(t.maxByteLength)&&!(n.length<=t.maxByteLength)&&(yield jr(Fr.Uint8ArrayMaxByteLength,t,r,n)),As(t.minByteLength)&&!(n.length>=t.minByteLength)&&(yield jr(Fr.Uint8ArrayMinByteLength,t,r,n))}a(Tra,"FromUint8Array");function*Sra(t,e,r,n){}a(Sra,"FromUnknown");function*Ira(t,e,r,n){Vwe.TypeSystemPolicy.IsVoidLike(n)||(yield jr(Fr.Void,t,r,n))}a(Ira,"FromVoid");function*xra(t,e,r,n){Fst.TypeRegistry.Get(t[Tlr.Kind])(t,n)||(yield jr(Fr.Kind,t,r,n))}a(xra,"FromKind");function*Vh(t,e,r,n){let o=As(t.$id)?[...e,t]:e,s=t;switch(s[Tlr.Kind]){case"Any":return yield*zta(s,o,r,n);case"Argument":return yield*Yta(s,o,r,n);case"Array":return yield*Kta(s,o,r,n);case"AsyncIterator":return yield*Jta(s,o,r,n);case"BigInt":return yield*Xta(s,o,r,n);case"Boolean":return yield*Zta(s,o,r,n);case"Constructor":return yield*era(s,o,r,n);case"Date":return yield*tra(s,o,r,n);case"Function":return yield*rra(s,o,r,n);case"Import":return yield*nra(s,o,r,n);case"Integer":return yield*ira(s,o,r,n);case"Intersect":return yield*ora(s,o,r,n);case"Iterator":return yield*sra(s,o,r,n);case"Literal":return yield*ara(s,o,r,n);case"Never":return yield*cra(s,o,r,n);case"Not":return yield*lra(s,o,r,n);case"Null":return yield*ura(s,o,r,n);case"Number":return yield*dra(s,o,r,n);case"Object":return yield*fra(s,o,r,n);case"Promise":return yield*pra(s,o,r,n);case"Record":return yield*hra(s,o,r,n);case"Ref":return yield*mra(s,o,r,n);case"RegExp":return yield*gra(s,o,r,n);case"String":return yield*Ara(s,o,r,n);case"Symbol":return yield*yra(s,o,r,n);case"TemplateLiteral":return yield*Era(s,o,r,n);case"This":return yield*Cra(s,o,r,n);case"Tuple":return yield*_ra(s,o,r,n);case"Undefined":return yield*vra(s,o,r,n);case"Union":return yield*bra(s,o,r,n);case"Uint8Array":return yield*Tra(s,o,r,n);case"Unknown":return yield*Sra(s,o,r,n);case"Void":return yield*Ira(s,o,r,n);default:if(!Fst.TypeRegistry.Has(s[Tlr.Kind]))throw new Ust(t);return yield*xra(s,o,r,n)}}a(Vh,"Visit");function wra(...t){let e=t.length===3?Vh(t[0],t[1],"",t[2]):Vh(t[0],[],"",t[1]);return new Wwe(e)}a(wra,"Errors")});var Ede=T(uQ=>{"use strict";f();var Rra=uQ&&uQ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bei=uQ&&uQ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rra(e,t,r)};Object.defineProperty(uQ,"__esModule",{value:!0});bei(_lr(),uQ);bei(Clr(),uQ)});var wei=T(JB=>{"use strict";f();var Pra=JB&&JB.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Sei=JB&&JB.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Slr,Qst,Iei;Object.defineProperty(JB,"__esModule",{value:!0});JB.AssertError=void 0;JB.Assert=Dra;var xei=Ede(),kra=Wer(),Nra=blr(),qst=class extends kra.TypeBoxError{static{a(this,"AssertError")}constructor(e){let r=e.First();super(r===void 0?"Invalid Value":r.message),Slr.add(this),Qst.set(this,void 0),Pra(this,Qst,e,"f"),this.error=r}Errors(){return new xei.ValueErrorIterator(Sei(this,Slr,"m",Iei).call(this))}};JB.AssertError=qst;Qst=new WeakMap,Slr=new WeakSet,Iei=a(function*(){this.error&&(yield this.error),yield*Sei(this,Qst,"f")},"_AssertError_Iterator");function Tei(t,e,r){if(!(0,Nra.Check)(t,e,r))throw new qst((0,xei.Errors)(t,e,r))}a(Tei,"AssertValue");function Dra(...t){return t.length===3?Tei(t[0],t[1],t[2]):Tei(t[0],[],t[1])}a(Dra,"Assert")});var Gst=T(eJ=>{"use strict";f();var Mra=eJ&&eJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ora=eJ&&eJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Mra(e,t,r)};Object.defineProperty(eJ,"__esModule",{value:!0});Ora(wei(),eJ)});var Rei=T(Ilr=>{"use strict";f();Object.defineProperty(Ilr,"__esModule",{value:!0});Ilr.Clone=Cde;var tJ=Op();function Bra(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Cde(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Cde(t[r]);return e}a(Bra,"FromObject");function Lra(t){return t.map(e=>Cde(e))}a(Lra,"FromArray");function Fra(t){return t.slice()}a(Fra,"FromTypedArray");function Ura(t){return new Map(Cde([...t.entries()]))}a(Ura,"FromMap");function Qra(t){return new Set(Cde([...t.entries()]))}a(Qra,"FromSet");function qra(t){return new Date(t.toISOString())}a(qra,"FromDate");function Cde(t){if((0,tJ.IsArray)(t))return Lra(t);if((0,tJ.IsDate)(t))return qra(t);if((0,tJ.IsTypedArray)(t))return Fra(t);if((0,tJ.IsMap)(t))return Ura(t);if((0,tJ.IsSet)(t))return Qra(t);if((0,tJ.IsObject)(t))return Bra(t);if((0,tJ.IsValueType)(t))return t;throw new Error("ValueClone: Unable to clone value")}a(Cde,"Clone")});var UR=T(rJ=>{"use strict";f();var Gra=rJ&&rJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Hra=rJ&&rJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Gra(e,t,r)};Object.defineProperty(rJ,"__esModule",{value:!0});Hra(Rei(),rJ)});var Dei=T(zwe=>{"use strict";f();Object.defineProperty(zwe,"__esModule",{value:!0});zwe.ValueCreateError=void 0;zwe.Create=Pna;var Vs=Op(),jra=sb(),$ra=UR(),xlr=LR(),Pei=lR(),Vra=mue(),kei=nn(),Wra=hd(),zra=Ont(),S_=class extends Wra.TypeBoxError{static{a(this,"ValueCreateError")}constructor(e,r){super(r),this.schema=e}};zwe.ValueCreateError=S_;function ua(t){return(0,zra.IsFunction)(t)?t():(0,$ra.Clone)(t)}a(ua,"FromDefault");function Yra(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):{}}a(Yra,"FromAny");function Kra(t,e){return{}}a(Kra,"FromArgument");function Jra(t,e){if(t.uniqueItems===!0&&!(0,Vs.HasPropertyKey)(t,"default"))throw new S_(t,"Array with the uniqueItems constraint requires a default value");if("contains"in t&&!(0,Vs.HasPropertyKey)(t,"default"))throw new S_(t,"Array with the contains constraint requires a default value");return"default"in t?ua(t.default):t.minItems!==void 0?Array.from({length:t.minItems}).map(r=>ab(t.items,e)):[]}a(Jra,"FromArray");function Xra(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):(async function*(){})()}a(Xra,"FromAsyncIterator");function Zra(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):BigInt(0)}a(Zra,"FromBigInt");function ena(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):!1}a(ena,"FromBoolean");function tna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);{let r=ab(t.returns,e);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,o]of Object.entries(r)){let s=this;s[n]=o}}}:class{}}}a(tna,"FromConstructor");function rna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.minimumTimestamp!==void 0?new Date(t.minimumTimestamp):new Date}a(rna,"FromDate");function nna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):()=>ab(t.returns,e)}a(nna,"FromFunction");function ina(t,e){let r=globalThis.Object.values(t.$defs),n=t.$defs[t.$ref];return ab(n,[...e,...r])}a(ina,"FromImport");function ona(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.minimum!==void 0?t.minimum:0}a(ona,"FromInteger");function sna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);{let r=t.allOf.reduce((n,o)=>{let s=ab(o,e);return typeof s=="object"?{...n,...s}:s},{});if(!(0,jra.Check)(t,e,r))throw new S_(t,"Intersect produced invalid value. Consider using a default value.");return r}}a(sna,"FromIntersect");function ana(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):(function*(){})()}a(ana,"FromIterator");function cna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.const}a(cna,"FromLiteral");function lna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new S_(t,"Never types cannot be created. Consider using a default value.")}a(lna,"FromNever");function una(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new S_(t,"Not types must have a default value")}a(una,"FromNot");function dna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):null}a(dna,"FromNull");function fna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.minimum!==void 0?t.minimum:0}a(fna,"FromNumber");function pna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);{let r=new Set(t.required),n={};for(let[o,s]of Object.entries(t.properties))r.has(o)&&(n[o]=ab(s,e));return n}}a(pna,"FromObject");function hna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):Promise.resolve(ab(t.item,e))}a(hna,"FromPromise");function mna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):{}}a(mna,"FromRecord");function gna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):ab((0,xlr.Deref)(t,e),e)}a(gna,"FromRef");function Ana(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new S_(t,"RegExp types cannot be created. Consider using a default value.")}a(Ana,"FromRegExp");function yna(t,e){if(t.pattern!==void 0){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new S_(t,"String types with patterns must specify a default value")}else if(t.format!==void 0){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new S_(t,"String types with formats must specify a default value")}else return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.minLength!==void 0?Array.from({length:t.minLength}).map(()=>" ").join(""):""}a(yna,"FromString");function Ena(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):"value"in t?Symbol.for(t.value):Symbol()}a(Ena,"FromSymbol");function Cna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);if(!(0,Pei.IsTemplateLiteralFinite)(t))throw new S_(t,"Can only create template literals that produce a finite variants. Consider using a default value.");return(0,Pei.TemplateLiteralGenerate)(t)[0]}a(Cna,"FromTemplateLiteral");function _na(t,e){if(Nei++>Rna)throw new S_(t,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):ab((0,xlr.Deref)(t,e),e)}a(_na,"FromThis");function vna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.items===void 0?[]:Array.from({length:t.minItems}).map((r,n)=>ab(t.items[n],e))}a(vna,"FromTuple");function bna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default)}a(bna,"FromUndefined");function Tna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);if(t.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return ab(t.anyOf[0],e)}a(Tna,"FromUnion");function Sna(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):t.minByteLength!==void 0?new Uint8Array(t.minByteLength):new Uint8Array(0)}a(Sna,"FromUint8Array");function Ina(t,e){return(0,Vs.HasPropertyKey)(t,"default")?ua(t.default):{}}a(Ina,"FromUnknown");function xna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default)}a(xna,"FromVoid");function wna(t,e){if((0,Vs.HasPropertyKey)(t,"default"))return ua(t.default);throw new Error("User defined types must specify a default value")}a(wna,"FromKind");function ab(t,e){let r=(0,xlr.Pushref)(t,e),n=t;switch(n[kei.Kind]){case"Any":return Yra(n,r);case"Argument":return Kra(n,r);case"Array":return Jra(n,r);case"AsyncIterator":return Xra(n,r);case"BigInt":return Zra(n,r);case"Boolean":return ena(n,r);case"Constructor":return tna(n,r);case"Date":return rna(n,r);case"Function":return nna(n,r);case"Import":return ina(n,r);case"Integer":return ona(n,r);case"Intersect":return sna(n,r);case"Iterator":return ana(n,r);case"Literal":return cna(n,r);case"Never":return lna(n,r);case"Not":return una(n,r);case"Null":return dna(n,r);case"Number":return fna(n,r);case"Object":return pna(n,r);case"Promise":return hna(n,r);case"Record":return mna(n,r);case"Ref":return gna(n,r);case"RegExp":return Ana(n,r);case"String":return yna(n,r);case"Symbol":return Ena(n,r);case"TemplateLiteral":return Cna(n,r);case"This":return _na(n,r);case"Tuple":return vna(n,r);case"Undefined":return bna(n,r);case"Union":return Tna(n,r);case"Uint8Array":return Sna(n,r);case"Unknown":return Ina(n,r);case"Void":return xna(n,r);default:if(!Vra.TypeRegistry.Has(n[kei.Kind]))throw new S_(n,"Unknown type");return wna(n,r)}}a(ab,"Visit");var Rna=512,Nei=0;function Pna(...t){return Nei=0,t.length===2?ab(t[0],t[1]):ab(t[0],[])}a(Pna,"Create")});var Hst=T(nJ=>{"use strict";f();var kna=nJ&&nJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nna=nJ&&nJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kna(e,t,r)};Object.defineProperty(nJ,"__esModule",{value:!0});Nna(Dei(),nJ)});var Lei=T(Jwe=>{"use strict";f();Object.defineProperty(Jwe,"__esModule",{value:!0});Jwe.ValueCastError=void 0;Jwe.Cast=Bei;var cI=Op(),Dna=hd(),jst=nn(),dQ=Hst(),cb=sb(),iJ=UR(),Kwe=LR(),Ywe=class extends Dna.TypeBoxError{static{a(this,"ValueCastError")}constructor(e,r){super(r),this.schema=e}};Jwe.ValueCastError=Ywe;function Mei(t,e,r){if(t[jst.Kind]==="Object"&&typeof r=="object"&&!(0,cI.IsNull)(r)){let n=t,o=Object.getOwnPropertyNames(r);return Object.entries(n.properties).reduce((c,[l,u])=>{let d=u[jst.Kind]==="Literal"&&u.const===r[l]?100:0,p=(0,cb.Check)(u,e,r[l])?10:0,h=o.includes(l)?1:0;return c+(d+p+h)},0)}else if(t[jst.Kind]==="Union"){let o=t.anyOf.map(s=>(0,Kwe.Deref)(s,e)).map(s=>Mei(s,e,r));return Math.max(...o)}else return(0,cb.Check)(t,e,r)?1:0}a(Mei,"ScoreUnion");function Mna(t,e,r){let n=t.anyOf.map(c=>(0,Kwe.Deref)(c,e)),[o,s]=[n[0],0];for(let c of n){let l=Mei(c,e,r);l>s&&(o=c,s=l)}return o}a(Mna,"SelectUnion");function Ona(t,e,r){if("default"in t)return typeof r=="function"?t.default:(0,iJ.Clone)(t.default);{let n=Mna(t,e,r);return Bei(n,e,r)}}a(Ona,"CastUnion");function Bna(t,e,r){return(0,cb.Check)(t,e,r)?(0,iJ.Clone)(r):(0,dQ.Create)(t,e)}a(Bna,"DefaultClone");function Lna(t,e,r){return(0,cb.Check)(t,e,r)?r:(0,dQ.Create)(t,e)}a(Lna,"Default");function Fna(t,e,r){if((0,cb.Check)(t,e,r))return(0,iJ.Clone)(r);let n=(0,cI.IsArray)(r)?(0,iJ.Clone)(r):(0,dQ.Create)(t,e),o=(0,cI.IsNumber)(t.minItems)&&n.lengthnull)]:n,c=((0,cI.IsNumber)(t.maxItems)&&o.length>t.maxItems?o.slice(0,t.maxItems):o).map(u=>QR(t.items,e,u));if(t.uniqueItems!==!0)return c;let l=[...new Set(c)];if(!(0,cb.Check)(t,e,l))throw new Ywe(t,"Array cast produced invalid data due to uniqueItems constraint");return l}a(Fna,"FromArray");function Una(t,e,r){if((0,cb.Check)(t,e,r))return(0,dQ.Create)(t,e);let n=new Set(t.returns.required||[]),o=a(function(){},"result");for(let[s,c]of Object.entries(t.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(o.prototype[s]=QR(c,e,r.prototype[s]));return o}a(Una,"FromConstructor");function Qna(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return QR(o,[...e,...n],r)}a(Qna,"FromImport");function Oei(t,e){return(0,cI.IsObject)(t)&&!(0,cI.IsObject)(e)||!(0,cI.IsObject)(t)&&(0,cI.IsObject)(e)?t:!(0,cI.IsObject)(t)||!(0,cI.IsObject)(e)?e:globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>{let o=n in e?Oei(t[n],e[n]):t[n];return{...r,[n]:o}},{})}a(Oei,"IntersectAssign");function qna(t,e,r){if((0,cb.Check)(t,e,r))return r;let n=(0,dQ.Create)(t,e),o=Oei(n,r);return(0,cb.Check)(t,e,o)?o:n}a(qna,"FromIntersect");function Gna(t,e,r){throw new Ywe(t,"Never types cannot be cast")}a(Gna,"FromNever");function Hna(t,e,r){if((0,cb.Check)(t,e,r))return r;if(r===null||typeof r!="object")return(0,dQ.Create)(t,e);let n=new Set(t.required||[]),o={};for(let[s,c]of Object.entries(t.properties))!n.has(s)&&r[s]===void 0||(o[s]=QR(c,e,r[s]));if(typeof t.additionalProperties=="object"){let s=Object.getOwnPropertyNames(t.properties);for(let c of Object.getOwnPropertyNames(r))s.includes(c)||(o[c]=QR(t.additionalProperties,e,r[c]))}return o}a(Hna,"FromObject");function jna(t,e,r){if((0,cb.Check)(t,e,r))return(0,iJ.Clone)(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return(0,dQ.Create)(t,e);let n=Object.getOwnPropertyNames(t.patternProperties)[0],o=t.patternProperties[n],s={};for(let[c,l]of Object.entries(r))s[c]=QR(o,e,l);return s}a(jna,"FromRecord");function $na(t,e,r){return QR((0,Kwe.Deref)(t,e),e,r)}a($na,"FromRef");function Vna(t,e,r){return QR((0,Kwe.Deref)(t,e),e,r)}a(Vna,"FromThis");function Wna(t,e,r){return(0,cb.Check)(t,e,r)?(0,iJ.Clone)(r):(0,cI.IsArray)(r)?t.items===void 0?[]:t.items.map((n,o)=>QR(n,e,r[o])):(0,dQ.Create)(t,e)}a(Wna,"FromTuple");function zna(t,e,r){return(0,cb.Check)(t,e,r)?(0,iJ.Clone)(r):Ona(t,e,r)}a(zna,"FromUnion");function QR(t,e,r){let n=(0,cI.IsString)(t.$id)?(0,Kwe.Pushref)(t,e):e,o=t;switch(t[jst.Kind]){case"Array":return Fna(o,n,r);case"Constructor":return Una(o,n,r);case"Import":return Qna(o,n,r);case"Intersect":return qna(o,n,r);case"Never":return Gna(o,n,r);case"Object":return Hna(o,n,r);case"Record":return jna(o,n,r);case"Ref":return $na(o,n,r);case"This":return Vna(o,n,r);case"Tuple":return Wna(o,n,r);case"Union":return zna(o,n,r);case"Date":case"Symbol":case"Uint8Array":return Bna(t,e,r);default:return Lna(o,n,r)}}a(QR,"Visit");function Bei(...t){return t.length===3?QR(t[0],t[1],t[2]):QR(t[0],[],t[1])}a(Bei,"Cast")});var $st=T(oJ=>{"use strict";f();var Yna=oJ&&oJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kna=oJ&&oJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Yna(e,t,r)};Object.defineProperty(oJ,"__esModule",{value:!0});Kna(Lei(),oJ)});var Uei=T(Rlr=>{"use strict";f();Object.defineProperty(Rlr,"__esModule",{value:!0});Rlr.Clean=lia;var Jna=dR(),Vst=sb(),Xna=UR(),wlr=LR(),Fei=nn(),qR=Op(),Wst=Bo();function Zna(t){return(0,Wst.IsKind)(t)&&t[Fei.Kind]!=="Unsafe"}a(Zna,"IsCheckable");function eia(t,e,r){return(0,qR.IsArray)(r)?r.map(n=>I_(t.items,e,n)):r}a(eia,"FromArray");function tia(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return I_(o,[...e,...n],r)}a(tia,"FromImport");function ria(t,e,r){let n=t.unevaluatedProperties,s=t.allOf.map(l=>I_(l,e,(0,Xna.Clone)(r))).reduce((l,u)=>(0,qR.IsObject)(u)?{...l,...u}:u,{});if(!(0,qR.IsObject)(r)||!(0,qR.IsObject)(s)||!(0,Wst.IsKind)(n))return s;let c=(0,Jna.KeyOfPropertyKeys)(t);for(let l of Object.getOwnPropertyNames(r))c.includes(l)||(0,Vst.Check)(n,e,r[l])&&(s[l]=I_(n,e,r[l]));return s}a(ria,"FromIntersect");function nia(t,e,r){if(!(0,qR.IsObject)(r)||(0,qR.IsArray)(r))return r;let n=t.additionalProperties;for(let o of Object.getOwnPropertyNames(r)){if((0,qR.HasPropertyKey)(t.properties,o)){r[o]=I_(t.properties[o],e,r[o]);continue}if((0,Wst.IsKind)(n)&&(0,Vst.Check)(n,e,r[o])){r[o]=I_(n,e,r[o]);continue}delete r[o]}return r}a(nia,"FromObject");function iia(t,e,r){if(!(0,qR.IsObject)(r))return r;let n=t.additionalProperties,o=Object.getOwnPropertyNames(r),[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of o){if(l.test(u)){r[u]=I_(c,e,r[u]);continue}if((0,Wst.IsKind)(n)&&(0,Vst.Check)(n,e,r[u])){r[u]=I_(n,e,r[u]);continue}delete r[u]}return r}a(iia,"FromRecord");function oia(t,e,r){return I_((0,wlr.Deref)(t,e),e,r)}a(oia,"FromRef");function sia(t,e,r){return I_((0,wlr.Deref)(t,e),e,r)}a(sia,"FromThis");function aia(t,e,r){if(!(0,qR.IsArray)(r))return r;if((0,qR.IsUndefined)(t.items))return[];let n=Math.min(r.length,t.items.length);for(let o=0;on?r.slice(0,n):r}a(aia,"FromTuple");function cia(t,e,r){for(let n of t.anyOf)if(Zna(n)&&(0,Vst.Check)(n,e,r))return I_(n,e,r);return r}a(cia,"FromUnion");function I_(t,e,r){let n=(0,qR.IsString)(t.$id)?(0,wlr.Pushref)(t,e):e,o=t;switch(o[Fei.Kind]){case"Array":return eia(o,n,r);case"Import":return tia(o,n,r);case"Intersect":return ria(o,n,r);case"Object":return nia(o,n,r);case"Record":return iia(o,n,r);case"Ref":return oia(o,n,r);case"This":return sia(o,n,r);case"Tuple":return aia(o,n,r);case"Union":return cia(o,n,r);default:return r}}a(I_,"Visit");function lia(...t){return t.length===3?I_(t[0],t[1],t[2]):I_(t[0],[],t[1])}a(lia,"Clean")});var zst=T(sJ=>{"use strict";f();var uia=sJ&&sJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dia=sJ&&sJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&uia(e,t,r)};Object.defineProperty(sJ,"__esModule",{value:!0});dia(Uei(),sJ)});var jei=T(klr=>{"use strict";f();Object.defineProperty(klr,"__esModule",{value:!0});klr.Convert=zia;var fia=UR(),Qei=sb(),Plr=LR(),pia=nn(),Ws=Op();function Yst(t){return(0,Ws.IsString)(t)&&!isNaN(t)&&!isNaN(parseFloat(t))}a(Yst,"IsStringNumeric");function hia(t){return(0,Ws.IsBigInt)(t)||(0,Ws.IsBoolean)(t)||(0,Ws.IsNumber)(t)}a(hia,"IsValueToString");function Xwe(t){return t===!0||(0,Ws.IsNumber)(t)&&t===1||(0,Ws.IsBigInt)(t)&&t===BigInt("1")||(0,Ws.IsString)(t)&&(t.toLowerCase()==="true"||t==="1")}a(Xwe,"IsValueTrue");function Zwe(t){return t===!1||(0,Ws.IsNumber)(t)&&(t===0||Object.is(t,-0))||(0,Ws.IsBigInt)(t)&&t===BigInt("0")||(0,Ws.IsString)(t)&&(t.toLowerCase()==="false"||t==="0"||t==="-0")}a(Zwe,"IsValueFalse");function mia(t){return(0,Ws.IsString)(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(mia,"IsTimeStringWithTimeZone");function gia(t){return(0,Ws.IsString)(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(gia,"IsTimeStringWithoutTimeZone");function Aia(t){return(0,Ws.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(Aia,"IsDateTimeStringWithTimeZone");function yia(t){return(0,Ws.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(yia,"IsDateTimeStringWithoutTimeZone");function Eia(t){return(0,Ws.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(t)}a(Eia,"IsDateString");function Cia(t,e){let r=Gei(t);return r===e?r:t}a(Cia,"TryConvertLiteralString");function _ia(t,e){let r=Hei(t);return r===e?r:t}a(_ia,"TryConvertLiteralNumber");function via(t,e){let r=qei(t);return r===e?r:t}a(via,"TryConvertLiteralBoolean");function bia(t,e){return(0,Ws.IsString)(t.const)?Cia(e,t.const):(0,Ws.IsNumber)(t.const)?_ia(e,t.const):(0,Ws.IsBoolean)(t.const)?via(e,t.const):e}a(bia,"TryConvertLiteral");function qei(t){return Xwe(t)?!0:Zwe(t)?!1:t}a(qei,"TryConvertBoolean");function Tia(t){let e=a(r=>r.split(".")[0],"truncateInteger");return Yst(t)?BigInt(e(t)):(0,Ws.IsNumber)(t)?BigInt(Math.trunc(t)):Zwe(t)?BigInt(0):Xwe(t)?BigInt(1):t}a(Tia,"TryConvertBigInt");function Gei(t){return(0,Ws.IsSymbol)(t)&&t.description!==void 0?t.description.toString():hia(t)?t.toString():t}a(Gei,"TryConvertString");function Hei(t){return Yst(t)?parseFloat(t):Xwe(t)?1:Zwe(t)?0:t}a(Hei,"TryConvertNumber");function Sia(t){return Yst(t)?parseInt(t):(0,Ws.IsNumber)(t)?Math.trunc(t):Xwe(t)?1:Zwe(t)?0:t}a(Sia,"TryConvertInteger");function Iia(t){return(0,Ws.IsString)(t)&&t.toLowerCase()==="null"?null:t}a(Iia,"TryConvertNull");function xia(t){return(0,Ws.IsString)(t)&&t==="undefined"?void 0:t}a(xia,"TryConvertUndefined");function wia(t){return(0,Ws.IsDate)(t)?t:(0,Ws.IsNumber)(t)?new Date(t):Xwe(t)?new Date(1):Zwe(t)?new Date(0):Yst(t)?new Date(parseInt(t)):gia(t)?new Date(`1970-01-01T${t}.000Z`):mia(t)?new Date(`1970-01-01T${t}`):yia(t)?new Date(`${t}.000Z`):Aia(t)?new Date(t):Eia(t)?new Date(`${t}T00:00:00.000Z`):t}a(wia,"TryConvertDate");function Ria(t,e,r){return((0,Ws.IsArray)(r)?r:[r]).map(o=>GR(t.items,e,o))}a(Ria,"FromArray");function Pia(t,e,r){return Tia(r)}a(Pia,"FromBigInt");function kia(t,e,r){return qei(r)}a(kia,"FromBoolean");function Nia(t,e,r){return wia(r)}a(Nia,"FromDate");function Dia(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return GR(o,[...e,...n],r)}a(Dia,"FromImport");function Mia(t,e,r){return Sia(r)}a(Mia,"FromInteger");function Oia(t,e,r){return t.allOf.reduce((n,o)=>GR(o,e,n),r)}a(Oia,"FromIntersect");function Bia(t,e,r){return bia(t,r)}a(Bia,"FromLiteral");function Lia(t,e,r){return Iia(r)}a(Lia,"FromNull");function Fia(t,e,r){return Hei(r)}a(Fia,"FromNumber");function Uia(t,e,r){if(!(0,Ws.IsObject)(r)||(0,Ws.IsArray)(r))return r;for(let n of Object.getOwnPropertyNames(t.properties))(0,Ws.HasPropertyKey)(r,n)&&(r[n]=GR(t.properties[n],e,r[n]));return r}a(Uia,"FromObject");function Qia(t,e,r){if(!((0,Ws.IsObject)(r)&&!(0,Ws.IsArray)(r)))return r;let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=t.patternProperties[o];for(let[c,l]of Object.entries(r))r[c]=GR(s,e,l);return r}a(Qia,"FromRecord");function qia(t,e,r){return GR((0,Plr.Deref)(t,e),e,r)}a(qia,"FromRef");function Gia(t,e,r){return Gei(r)}a(Gia,"FromString");function Hia(t,e,r){return(0,Ws.IsString)(r)||(0,Ws.IsNumber)(r)?Symbol(r):r}a(Hia,"FromSymbol");function jia(t,e,r){return GR((0,Plr.Deref)(t,e),e,r)}a(jia,"FromThis");function $ia(t,e,r){return(0,Ws.IsArray)(r)&&!(0,Ws.IsUndefined)(t.items)?r.map((o,s)=>s{"use strict";f();var Yia=aJ&&aJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kia=aJ&&aJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Yia(e,t,r)};Object.defineProperty(aJ,"__esModule",{value:!0});Kia(jei(),aJ)});var zei=T(cJ=>{"use strict";f();Object.defineProperty(cJ,"__esModule",{value:!0});cJ.TransformDecodeError=cJ.TransformDecodeCheckError=void 0;cJ.TransformDecode=loa;var Jia=yxe(),$ei=nn(),Vei=hd(),Wei=dR(),Dlr=LR(),Xia=sb(),XB=Op(),eRe=Bo(),Nlr=class extends Vei.TypeBoxError{static{a(this,"TransformDecodeCheckError")}constructor(e,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=e,this.value=r,this.error=n}};cJ.TransformDecodeCheckError=Nlr;var Jst=class extends Vei.TypeBoxError{static{a(this,"TransformDecodeError")}constructor(e,r,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=e,this.path=r,this.value=n,this.error=o}};cJ.TransformDecodeError=Jst;function Qu(t,e,r){try{return(0,eRe.IsTransform)(t)?t[$ei.TransformKind].Decode(r):r}catch(n){throw new Jst(t,e,r,n)}}a(Qu,"Default");function Zia(t,e,r,n){return(0,XB.IsArray)(n)?Qu(t,r,n.map((o,s)=>HR(t.items,e,`${r}/${s}`,o))):Qu(t,r,n)}a(Zia,"FromArray");function eoa(t,e,r,n){if(!(0,XB.IsObject)(n)||(0,XB.IsValueType)(n))return Qu(t,r,n);let o=(0,Wei.KeyOfPropertyEntries)(t),s=o.map(p=>p[0]),c={...n};for(let[p,h]of o)p in c&&(c[p]=HR(h,e,`${r}/${p}`,c[p]));if(!(0,eRe.IsTransform)(t.unevaluatedProperties))return Qu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.unevaluatedProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=Qu(u,`${r}/${p}`,d[p]));return Qu(t,r,d)}a(eoa,"FromIntersect");function toa(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=HR(s,[...e,...o],r,n);return Qu(t,r,c)}a(toa,"FromImport");function roa(t,e,r,n){return Qu(t,r,HR(t.not,e,r,n))}a(roa,"FromNot");function noa(t,e,r,n){if(!(0,XB.IsObject)(n))return Qu(t,r,n);let o=(0,Wei.KeyOfPropertyKeys)(t),s={...n};for(let d of o)(0,XB.HasPropertyKey)(s,d)&&((0,XB.IsUndefined)(s[d])&&(!(0,eRe.IsUndefined)(t.properties[d])||Jia.TypeSystemPolicy.IsExactOptionalProperty(s,d))||(s[d]=HR(t.properties[d],e,`${r}/${d}`,s[d])));if(!(0,eRe.IsSchema)(t.additionalProperties))return Qu(t,r,s);let c=Object.getOwnPropertyNames(s),l=t.additionalProperties,u={...s};for(let d of c)o.includes(d)||(u[d]=Qu(l,`${r}/${d}`,u[d]));return Qu(t,r,u)}a(noa,"FromObject");function ioa(t,e,r,n){if(!(0,XB.IsObject)(n))return Qu(t,r,n);let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=new RegExp(o),c={...n};for(let p of Object.getOwnPropertyNames(n))s.test(p)&&(c[p]=HR(t.patternProperties[o],e,`${r}/${p}`,c[p]));if(!(0,eRe.IsSchema)(t.additionalProperties))return Qu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.test(p)||(d[p]=Qu(u,`${r}/${p}`,d[p]));return Qu(t,r,d)}a(ioa,"FromRecord");function ooa(t,e,r,n){let o=(0,Dlr.Deref)(t,e);return Qu(t,r,HR(o,e,r,n))}a(ooa,"FromRef");function soa(t,e,r,n){let o=(0,Dlr.Deref)(t,e);return Qu(t,r,HR(o,e,r,n))}a(soa,"FromThis");function aoa(t,e,r,n){return(0,XB.IsArray)(n)&&(0,XB.IsArray)(t.items)?Qu(t,r,t.items.map((o,s)=>HR(o,e,`${r}/${s}`,n[s]))):Qu(t,r,n)}a(aoa,"FromTuple");function coa(t,e,r,n){for(let o of t.anyOf){if(!(0,Xia.Check)(o,e,n))continue;let s=HR(o,e,r,n);return Qu(t,r,s)}return Qu(t,r,n)}a(coa,"FromUnion");function HR(t,e,r,n){let o=(0,Dlr.Pushref)(t,e),s=t;switch(t[$ei.Kind]){case"Array":return Zia(s,o,r,n);case"Import":return toa(s,o,r,n);case"Intersect":return eoa(s,o,r,n);case"Not":return roa(s,o,r,n);case"Object":return noa(s,o,r,n);case"Record":return ioa(s,o,r,n);case"Ref":return ooa(s,o,r,n);case"Symbol":return Qu(s,r,n);case"This":return soa(s,o,r,n);case"Tuple":return aoa(s,o,r,n);case"Union":return coa(s,o,r,n);default:return Qu(s,r,n)}}a(HR,"Visit");function loa(t,e,r){return HR(t,e,"",r)}a(loa,"TransformDecode")});var Zei=T(lJ=>{"use strict";f();Object.defineProperty(lJ,"__esModule",{value:!0});lJ.TransformEncodeError=lJ.TransformEncodeCheckError=void 0;lJ.TransformEncode=_oa;var uoa=yxe(),Kei=nn(),Jei=hd(),Xei=dR(),Olr=LR(),Yei=sb(),fQ=Op(),tRe=Bo(),Mlr=class extends Jei.TypeBoxError{static{a(this,"TransformEncodeCheckError")}constructor(e,r,n){super("The encoded value does not match the expected schema"),this.schema=e,this.value=r,this.error=n}};lJ.TransformEncodeCheckError=Mlr;var Xst=class extends Jei.TypeBoxError{static{a(this,"TransformEncodeError")}constructor(e,r,n,o){super(`${o instanceof Error?o.message:"Unknown error"}`),this.schema=e,this.path=r,this.value=n,this.error=o}};lJ.TransformEncodeError=Xst;function rg(t,e,r){try{return(0,tRe.IsTransform)(t)?t[Kei.TransformKind].Encode(r):r}catch(n){throw new Xst(t,e,r,n)}}a(rg,"Default");function doa(t,e,r,n){let o=rg(t,r,n);return(0,fQ.IsArray)(o)?o.map((s,c)=>jR(t.items,e,`${r}/${c}`,s)):o}a(doa,"FromArray");function foa(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=rg(t,r,n);return jR(s,[...e,...o],r,c)}a(foa,"FromImport");function poa(t,e,r,n){let o=rg(t,r,n);if(!(0,fQ.IsObject)(n)||(0,fQ.IsValueType)(n))return o;let s=(0,Xei.KeyOfPropertyEntries)(t),c=s.map(h=>h[0]),l={...o};for(let[h,m]of s)h in l&&(l[h]=jR(m,e,`${r}/${h}`,l[h]));if(!(0,tRe.IsTransform)(t.unevaluatedProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.unevaluatedProperties,p={...l};for(let h of u)c.includes(h)||(p[h]=rg(d,`${r}/${h}`,p[h]));return p}a(poa,"FromIntersect");function hoa(t,e,r,n){return rg(t.not,r,rg(t,r,n))}a(hoa,"FromNot");function moa(t,e,r,n){let o=rg(t,r,n);if(!(0,fQ.IsObject)(o))return o;let s=(0,Xei.KeyOfPropertyKeys)(t),c={...o};for(let p of s)(0,fQ.HasPropertyKey)(c,p)&&((0,fQ.IsUndefined)(c[p])&&(!(0,tRe.IsUndefined)(t.properties[p])||uoa.TypeSystemPolicy.IsExactOptionalProperty(c,p))||(c[p]=jR(t.properties[p],e,`${r}/${p}`,c[p])));if(!(0,tRe.IsSchema)(t.additionalProperties))return c;let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=rg(u,`${r}/${p}`,d[p]));return d}a(moa,"FromObject");function goa(t,e,r,n){let o=rg(t,r,n);if(!(0,fQ.IsObject)(n))return o;let s=Object.getOwnPropertyNames(t.patternProperties)[0],c=new RegExp(s),l={...o};for(let h of Object.getOwnPropertyNames(n))c.test(h)&&(l[h]=jR(t.patternProperties[s],e,`${r}/${h}`,l[h]));if(!(0,tRe.IsSchema)(t.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.additionalProperties,p={...l};for(let h of u)c.test(h)||(p[h]=rg(d,`${r}/${h}`,p[h]));return p}a(goa,"FromRecord");function Aoa(t,e,r,n){let o=(0,Olr.Deref)(t,e),s=jR(o,e,r,n);return rg(t,r,s)}a(Aoa,"FromRef");function yoa(t,e,r,n){let o=(0,Olr.Deref)(t,e),s=jR(o,e,r,n);return rg(t,r,s)}a(yoa,"FromThis");function Eoa(t,e,r,n){let o=rg(t,r,n);return(0,fQ.IsArray)(t.items)?t.items.map((s,c)=>jR(s,e,`${r}/${c}`,o[c])):[]}a(Eoa,"FromTuple");function Coa(t,e,r,n){for(let o of t.anyOf){if(!(0,Yei.Check)(o,e,n))continue;let s=jR(o,e,r,n);return rg(t,r,s)}for(let o of t.anyOf){let s=jR(o,e,r,n);if((0,Yei.Check)(t,e,s))return rg(t,r,s)}return rg(t,r,n)}a(Coa,"FromUnion");function jR(t,e,r,n){let o=(0,Olr.Pushref)(t,e),s=t;switch(t[Kei.Kind]){case"Array":return doa(s,o,r,n);case"Import":return foa(s,o,r,n);case"Intersect":return poa(s,o,r,n);case"Not":return hoa(s,o,r,n);case"Object":return moa(s,o,r,n);case"Record":return goa(s,o,r,n);case"Ref":return Aoa(s,o,r,n);case"This":return yoa(s,o,r,n);case"Tuple":return Eoa(s,o,r,n);case"Union":return Coa(s,o,r,n);default:return rg(s,r,n)}}a(jR,"Visit");function _oa(t,e,r){return jR(t,e,"",r)}a(_oa,"TransformEncode")});var eti=T(Flr=>{"use strict";f();Object.defineProperty(Flr,"__esModule",{value:!0});Flr.HasTransform=Uoa;var Llr=LR(),voa=nn(),j0=Bo(),boa=Op();function Toa(t,e){return(0,j0.IsTransform)(t)||Fp(t.items,e)}a(Toa,"FromArray");function Soa(t,e){return(0,j0.IsTransform)(t)||Fp(t.items,e)}a(Soa,"FromAsyncIterator");function Ioa(t,e){return(0,j0.IsTransform)(t)||Fp(t.returns,e)||t.parameters.some(r=>Fp(r,e))}a(Ioa,"FromConstructor");function xoa(t,e){return(0,j0.IsTransform)(t)||Fp(t.returns,e)||t.parameters.some(r=>Fp(r,e))}a(xoa,"FromFunction");function woa(t,e){return(0,j0.IsTransform)(t)||(0,j0.IsTransform)(t.unevaluatedProperties)||t.allOf.some(r=>Fp(r,e))}a(woa,"FromIntersect");function Roa(t,e){let r=globalThis.Object.getOwnPropertyNames(t.$defs).reduce((o,s)=>[...o,t.$defs[s]],[]),n=t.$defs[t.$ref];return(0,j0.IsTransform)(t)||Fp(n,[...r,...e])}a(Roa,"FromImport");function Poa(t,e){return(0,j0.IsTransform)(t)||Fp(t.items,e)}a(Poa,"FromIterator");function koa(t,e){return(0,j0.IsTransform)(t)||Fp(t.not,e)}a(koa,"FromNot");function Noa(t,e){return(0,j0.IsTransform)(t)||Object.values(t.properties).some(r=>Fp(r,e))||(0,j0.IsSchema)(t.additionalProperties)&&Fp(t.additionalProperties,e)}a(Noa,"FromObject");function Doa(t,e){return(0,j0.IsTransform)(t)||Fp(t.item,e)}a(Doa,"FromPromise");function Moa(t,e){let r=Object.getOwnPropertyNames(t.patternProperties)[0],n=t.patternProperties[r];return(0,j0.IsTransform)(t)||Fp(n,e)||(0,j0.IsSchema)(t.additionalProperties)&&(0,j0.IsTransform)(t.additionalProperties)}a(Moa,"FromRecord");function Ooa(t,e){return(0,j0.IsTransform)(t)?!0:Fp((0,Llr.Deref)(t,e),e)}a(Ooa,"FromRef");function Boa(t,e){return(0,j0.IsTransform)(t)?!0:Fp((0,Llr.Deref)(t,e),e)}a(Boa,"FromThis");function Loa(t,e){return(0,j0.IsTransform)(t)||!(0,boa.IsUndefined)(t.items)&&t.items.some(r=>Fp(r,e))}a(Loa,"FromTuple");function Foa(t,e){return(0,j0.IsTransform)(t)||t.anyOf.some(r=>Fp(r,e))}a(Foa,"FromUnion");function Fp(t,e){let r=(0,Llr.Pushref)(t,e),n=t;if(t.$id&&Blr.has(t.$id))return!1;switch(t.$id&&Blr.add(t.$id),t[voa.Kind]){case"Array":return Toa(n,r);case"AsyncIterator":return Soa(n,r);case"Constructor":return Ioa(n,r);case"Function":return xoa(n,r);case"Import":return Roa(n,r);case"Intersect":return woa(n,r);case"Iterator":return Poa(n,r);case"Not":return koa(n,r);case"Object":return Noa(n,r);case"Promise":return Doa(n,r);case"Record":return Moa(n,r);case"Ref":return Ooa(n,r);case"This":return Boa(n,r);case"Tuple":return Loa(n,r);case"Union":return Foa(n,r);default:return(0,j0.IsTransform)(t)}}a(Fp,"Visit");var Blr=new Set;function Uoa(t,e){return Blr.clear(),Fp(t,e)}a(Uoa,"HasTransform")});var rRe=T(ZB=>{"use strict";f();var Qoa=ZB&&ZB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ulr=ZB&&ZB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Qoa(e,t,r)};Object.defineProperty(ZB,"__esModule",{value:!0});Ulr(zei(),ZB);Ulr(Zei(),ZB);Ulr(eti(),ZB)});var tti=T(qlr=>{"use strict";f();Object.defineProperty(qlr,"__esModule",{value:!0});qlr.Decode=Hoa;var Qlr=rRe(),qoa=sb(),Goa=Ede();function Hoa(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]];if(!(0,qoa.Check)(e,r,n))throw new Qlr.TransformDecodeCheckError(e,n,(0,Goa.Errors)(e,r,n).First());return(0,Qlr.HasTransform)(e,r)?(0,Qlr.TransformDecode)(e,r,n):n}a(Hoa,"Decode")});var Glr=T(uJ=>{"use strict";f();var joa=uJ&&uJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$oa=uJ&&uJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&joa(e,t,r)};Object.defineProperty(uJ,"__esModule",{value:!0});$oa(tti(),uJ)});var nti=T($lr=>{"use strict";f();Object.defineProperty($lr,"__esModule",{value:!0});$lr.Default=osa;var Voa=sb(),rti=UR(),jlr=LR(),Woa=nn(),x_=Op(),zoa=Bo();function e3(t,e){let r=(0,x_.HasPropertyKey)(t,"default")?t.default:void 0,n=(0,x_.IsFunction)(r)?r():(0,rti.Clone)(r);return(0,x_.IsUndefined)(e)?n:(0,x_.IsObject)(e)&&(0,x_.IsObject)(n)?Object.assign(n,e):e}a(e3,"ValueOrDefault");function Hlr(t){return(0,zoa.IsKind)(t)&&"default"in t}a(Hlr,"HasDefaultProperty");function Yoa(t,e,r){if((0,x_.IsArray)(r)){for(let o=0;o{let c=Xy(s,e,n);return(0,x_.IsObject)(c)?{...o,...c}:c},{})}a(Xoa,"FromIntersect");function Zoa(t,e,r){let n=e3(t,r);if(!(0,x_.IsObject)(n))return n;let o=Object.getOwnPropertyNames(t.properties);for(let s of o){let c=Xy(t.properties[s],e,n[s]);(0,x_.IsUndefined)(c)||(n[s]=Xy(t.properties[s],e,n[s]))}if(!Hlr(t.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))o.includes(s)||(n[s]=Xy(t.additionalProperties,e,n[s]));return n}a(Zoa,"FromObject");function esa(t,e,r){let n=e3(t,r);if(!(0,x_.IsObject)(n))return n;let o=t.additionalProperties,[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of Object.getOwnPropertyNames(n))l.test(u)&&Hlr(c)&&(n[u]=Xy(c,e,n[u]));if(!Hlr(o))return n;for(let u of Object.getOwnPropertyNames(n))l.test(u)||(n[u]=Xy(o,e,n[u]));return n}a(esa,"FromRecord");function tsa(t,e,r){return Xy((0,jlr.Deref)(t,e),e,e3(t,r))}a(tsa,"FromRef");function rsa(t,e,r){return Xy((0,jlr.Deref)(t,e),e,r)}a(rsa,"FromThis");function nsa(t,e,r){let n=e3(t,r);if(!(0,x_.IsArray)(n)||(0,x_.IsUndefined)(t.items))return n;let[o,s]=[t.items,Math.max(t.items.length,n.length)];for(let c=0;c{"use strict";f();var ssa=dJ&&dJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),asa=dJ&&dJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ssa(e,t,r)};Object.defineProperty(dJ,"__esModule",{value:!0});asa(nti(),dJ)});var sti=T($R=>{"use strict";f();Object.defineProperty($R,"__esModule",{value:!0});$R.ValuePointerRootDeleteError=$R.ValuePointerRootSetError=void 0;$R.Format=nRe;$R.Set=csa;$R.Delete=lsa;$R.Has=usa;$R.Get=dsa;var oti=hd(),eat=class extends oti.TypeBoxError{static{a(this,"ValuePointerRootSetError")}constructor(e,r,n){super("Cannot set root value"),this.value=e,this.path=r,this.update=n}};$R.ValuePointerRootSetError=eat;var tat=class extends oti.TypeBoxError{static{a(this,"ValuePointerRootDeleteError")}constructor(e,r){super("Cannot delete root value"),this.value=e,this.path=r}};$R.ValuePointerRootDeleteError=tat;function iti(t){return t.indexOf("~")===-1?t:t.replace(/~1/g,"/").replace(/~0/g,"~")}a(iti,"Escape");function*nRe(t){if(t==="")return;let[e,r]=[0,0];for(let n=0;n{"use strict";f();var fsa=jD&&jD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),psa=jD&&jD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hsa=jD&&jD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(Vlr,"__esModule",{value:!0});Vlr.Equal=nat;var t3=Op();function msa(t,e){if(!(0,t3.IsObject)(e))return!1;let r=[...Object.keys(t),...Object.getOwnPropertySymbols(t)],n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)];return r.length!==n.length?!1:r.every(o=>nat(t[o],e[o]))}a(msa,"ObjectType");function gsa(t,e){return(0,t3.IsDate)(e)&&t.getTime()===e.getTime()}a(gsa,"DateType");function Asa(t,e){return!(0,t3.IsArray)(e)||t.length!==e.length?!1:t.every((r,n)=>nat(r,e[n]))}a(Asa,"ArrayType");function ysa(t,e){return!(0,t3.IsTypedArray)(e)||t.length!==e.length||Object.getPrototypeOf(t).constructor.name!==Object.getPrototypeOf(e).constructor.name?!1:t.every((r,n)=>nat(r,e[n]))}a(ysa,"TypedArrayType");function Esa(t,e){return t===e}a(Esa,"ValueType");function nat(t,e){if((0,t3.IsDate)(t))return gsa(t,e);if((0,t3.IsTypedArray)(t))return ysa(t,e);if((0,t3.IsArray)(t))return Asa(t,e);if((0,t3.IsObject)(t))return msa(t,e);if((0,t3.IsValueType)(t))return Esa(t,e);throw new Error("ValueEquals: Unable to compare value")}a(nat,"Equal")});var dti=T(ng=>{"use strict";f();Object.defineProperty(ng,"__esModule",{value:!0});ng.ValueDiffError=ng.Edit=ng.Delete=ng.Update=ng.Insert=void 0;ng.Diff=xsa;ng.Patch=Psa;var $D=Op(),zlr=rat(),Ylr=UR(),Csa=Wlr(),_sa=hd(),Klr=AA(),Jlr=Hy(),Xlr=bU(),cti=RU(),vsa=tf();ng.Insert=(0,Jlr.Object)({type:(0,Klr.Literal)("insert"),path:(0,Xlr.String)(),value:(0,cti.Unknown)()});ng.Update=(0,Jlr.Object)({type:(0,Klr.Literal)("update"),path:(0,Xlr.String)(),value:(0,cti.Unknown)()});ng.Delete=(0,Jlr.Object)({type:(0,Klr.Literal)("delete"),path:(0,Xlr.String)()});ng.Edit=(0,vsa.Union)([ng.Insert,ng.Update,ng.Delete]);var iRe=class extends _sa.TypeBoxError{static{a(this,"ValueDiffError")}constructor(e,r){super(r),this.value=e}};ng.ValueDiffError=iRe;function iat(t,e){return{type:"update",path:t,value:e}}a(iat,"CreateUpdate");function lti(t,e){return{type:"insert",path:t,value:e}}a(lti,"CreateInsert");function uti(t){return{type:"delete",path:t}}a(uti,"CreateDelete");function ati(t){if(globalThis.Object.getOwnPropertySymbols(t).length>0)throw new iRe(t,"Cannot diff objects with symbols")}a(ati,"AssertDiffable");function*bsa(t,e,r){if(ati(e),ati(r),!(0,$D.IsStandardObject)(r))return yield iat(t,r);let n=globalThis.Object.getOwnPropertyNames(e),o=globalThis.Object.getOwnPropertyNames(r);for(let s of o)(0,$D.HasPropertyKey)(e,s)||(yield lti(`${t}/${s}`,r[s]));for(let s of n)(0,$D.HasPropertyKey)(r,s)&&((0,Csa.Equal)(e,r)||(yield*oat(`${t}/${s}`,e[s],r[s])));for(let s of n)(0,$D.HasPropertyKey)(r,s)||(yield uti(`${t}/${s}`))}a(bsa,"ObjectType");function*Tsa(t,e,r){if(!(0,$D.IsArray)(r))return yield iat(t,r);for(let n=0;n=0;n--)n0&&t[0].path===""&&t[0].type==="update"}a(wsa,"IsRootUpdate");function Rsa(t){return t.length===0}a(Rsa,"IsIdentity");function Psa(t,e){if(wsa(e))return(0,Ylr.Clone)(e[0].value);if(Rsa(e))return(0,Ylr.Clone)(t);let r=(0,Ylr.Clone)(t);for(let n of e)switch(n.type){case"insert":{zlr.ValuePointer.Set(r,n.path,n.value);break}case"update":{zlr.ValuePointer.Set(r,n.path,n.value);break}case"delete":{zlr.ValuePointer.Delete(r,n.path);break}}return r}a(Psa,"Patch")});var Zlr=T(fJ=>{"use strict";f();var ksa=fJ&&fJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nsa=fJ&&fJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ksa(e,t,r)};Object.defineProperty(fJ,"__esModule",{value:!0});Nsa(dti(),fJ)});var fti=T(tur=>{"use strict";f();Object.defineProperty(tur,"__esModule",{value:!0});tur.Encode=Osa;var eur=rRe(),Dsa=sb(),Msa=Ede();function Osa(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]],o=(0,eur.HasTransform)(e,r)?(0,eur.TransformEncode)(e,r,n):n;if(!(0,Dsa.Check)(e,r,o))throw new eur.TransformEncodeCheckError(e,o,(0,Msa.Errors)(e,r,o).First());return o}a(Osa,"Encode")});var rur=T(pJ=>{"use strict";f();var Bsa=pJ&&pJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Lsa=pJ&&pJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Bsa(e,t,r)};Object.defineProperty(pJ,"__esModule",{value:!0});Lsa(fti(),pJ)});var nur=T(hJ=>{"use strict";f();var Fsa=hJ&&hJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Usa=hJ&&hJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Fsa(e,t,r)};Object.defineProperty(hJ,"__esModule",{value:!0});Usa(Wlr(),hJ)});var hti=T(sRe=>{"use strict";f();Object.defineProperty(sRe,"__esModule",{value:!0});sRe.ValueMutateError=void 0;sRe.Mutate=Vsa;var VR=Op(),aat=rat(),iur=UR(),Qsa=hd();function sat(t){return(0,VR.IsObject)(t)&&!(0,VR.IsArray)(t)}a(sat,"IsStandardObject");var oRe=class extends Qsa.TypeBoxError{static{a(this,"ValueMutateError")}constructor(e){super(e)}};sRe.ValueMutateError=oRe;function qsa(t,e,r,n){if(!sat(r))aat.ValuePointer.Set(t,e,(0,iur.Clone)(n));else{let o=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let c of o)s.includes(c)||delete r[c];for(let c of s)o.includes(c)||(r[c]=null);for(let c of s)our(t,`${e}/${c}`,r[c],n[c])}}a(qsa,"ObjectType");function Gsa(t,e,r,n){if(!(0,VR.IsArray)(r))aat.ValuePointer.Set(t,e,(0,iur.Clone)(n));else{for(let o=0;o{"use strict";f();var Wsa=mJ&&mJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zsa=mJ&&mJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Wsa(e,t,r)};Object.defineProperty(mJ,"__esModule",{value:!0});zsa(hti(),mJ)});var gti=T(WR=>{"use strict";f();Object.defineProperty(WR,"__esModule",{value:!0});WR.ParseDefault=WR.ParseRegistry=WR.ParseError=void 0;WR.Parse=naa;var Ysa=hd(),cat=rRe(),Ksa=Gst(),Jsa=$st(),Xsa=zst(),Zsa=UR(),eaa=Kst(),taa=Zst(),mti=Op(),aRe=class extends Ysa.TypeBoxError{static{a(this,"ParseError")}constructor(e){super(e)}};WR.ParseError=aRe;var aur;(function(t){let e=new Map([["Assert",(s,c,l)=>((0,Ksa.Assert)(s,c,l),l)],["Cast",(s,c,l)=>(0,Jsa.Cast)(s,c,l)],["Clean",(s,c,l)=>(0,Xsa.Clean)(s,c,l)],["Clone",(s,c,l)=>(0,Zsa.Clone)(l)],["Convert",(s,c,l)=>(0,eaa.Convert)(s,c,l)],["Decode",(s,c,l)=>(0,cat.HasTransform)(s,c)?(0,cat.TransformDecode)(s,c,l):l],["Default",(s,c,l)=>(0,taa.Default)(s,c,l)],["Encode",(s,c,l)=>(0,cat.HasTransform)(s,c)?(0,cat.TransformEncode)(s,c,l):l]]);function r(s){e.delete(s)}a(r,"Delete"),t.Delete=r;function n(s,c){e.set(s,c)}a(n,"Set"),t.Set=n;function o(s){return e.get(s)}a(o,"Get"),t.Get=o})(aur||(WR.ParseRegistry=aur={}));WR.ParseDefault=["Clone","Clean","Default","Convert","Assert","Decode"];function raa(t,e,r,n){return t.reduce((o,s)=>{let c=aur.Get(s);if((0,mti.IsUndefined)(c))throw new aRe(`Unable to find Parse operation '${s}'`);return c(e,r,o)},n)}a(raa,"ParseValue");function naa(...t){let[e,r,n,o]=t.length===4?[t[0],t[1],t[2],t[3]]:t.length===3?(0,mti.IsArray)(t[0])?[t[0],t[1],[],t[2]]:[WR.ParseDefault,t[0],t[1],t[2]]:t.length===2?[WR.ParseDefault,t[0],[],t[1]]:(()=>{throw new aRe("Invalid Arguments")})();return raa(e,r,n,o)}a(naa,"Parse")});var cur=T(gJ=>{"use strict";f();var iaa=gJ&&gJ.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oaa=gJ&&gJ.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iaa(e,t,r)};Object.defineProperty(gJ,"__esModule",{value:!0});oaa(gti(),gJ)});var yti=T(Lo=>{"use strict";f();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.Parse=Lo.Mutate=Lo.Hash=Lo.Equal=Lo.Encode=Lo.Edit=Lo.Patch=Lo.Diff=Lo.Default=Lo.Decode=Lo.Create=Lo.Convert=Lo.Clone=Lo.Clean=Lo.Check=Lo.Cast=Lo.Assert=Lo.ValueErrorIterator=Lo.Errors=void 0;var Ati=Ede();Object.defineProperty(Lo,"Errors",{enumerable:!0,get:a(function(){return Ati.Errors},"get")});Object.defineProperty(Lo,"ValueErrorIterator",{enumerable:!0,get:a(function(){return Ati.ValueErrorIterator},"get")});var saa=Gst();Object.defineProperty(Lo,"Assert",{enumerable:!0,get:a(function(){return saa.Assert},"get")});var aaa=$st();Object.defineProperty(Lo,"Cast",{enumerable:!0,get:a(function(){return aaa.Cast},"get")});var caa=sb();Object.defineProperty(Lo,"Check",{enumerable:!0,get:a(function(){return caa.Check},"get")});var laa=zst();Object.defineProperty(Lo,"Clean",{enumerable:!0,get:a(function(){return laa.Clean},"get")});var uaa=UR();Object.defineProperty(Lo,"Clone",{enumerable:!0,get:a(function(){return uaa.Clone},"get")});var daa=Kst();Object.defineProperty(Lo,"Convert",{enumerable:!0,get:a(function(){return daa.Convert},"get")});var faa=Hst();Object.defineProperty(Lo,"Create",{enumerable:!0,get:a(function(){return faa.Create},"get")});var paa=Glr();Object.defineProperty(Lo,"Decode",{enumerable:!0,get:a(function(){return paa.Decode},"get")});var haa=Zst();Object.defineProperty(Lo,"Default",{enumerable:!0,get:a(function(){return haa.Default},"get")});var lur=Zlr();Object.defineProperty(Lo,"Diff",{enumerable:!0,get:a(function(){return lur.Diff},"get")});Object.defineProperty(Lo,"Patch",{enumerable:!0,get:a(function(){return lur.Patch},"get")});Object.defineProperty(Lo,"Edit",{enumerable:!0,get:a(function(){return lur.Edit},"get")});var maa=rur();Object.defineProperty(Lo,"Encode",{enumerable:!0,get:a(function(){return maa.Encode},"get")});var gaa=nur();Object.defineProperty(Lo,"Equal",{enumerable:!0,get:a(function(){return gaa.Equal},"get")});var Aaa=Gwe();Object.defineProperty(Lo,"Hash",{enumerable:!0,get:a(function(){return Aaa.Hash},"get")});var yaa=sur();Object.defineProperty(Lo,"Mutate",{enumerable:!0,get:a(function(){return yaa.Mutate},"get")});var Eaa=cur();Object.defineProperty(Lo,"Parse",{enumerable:!0,get:a(function(){return Eaa.Parse},"get")})});var Eti=T(VD=>{"use strict";f();var Caa=VD&&VD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_aa=VD&&VD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vaa=VD&&VD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var baa=za&&za.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wh=za&&za.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&baa(e,t,r)};Object.defineProperty(za,"__esModule",{value:!0});za.Value=za.ValueErrorIterator=za.ValueErrorType=void 0;var Cti=Ede();Object.defineProperty(za,"ValueErrorType",{enumerable:!0,get:a(function(){return Cti.ValueErrorType},"get")});Object.defineProperty(za,"ValueErrorIterator",{enumerable:!0,get:a(function(){return Cti.ValueErrorIterator},"get")});Wh(Op(),za);Wh(Gst(),za);Wh($st(),za);Wh(sb(),za);Wh(zst(),za);Wh(UR(),za);Wh(Kst(),za);Wh(Hst(),za);Wh(Glr(),za);Wh(Zst(),za);Wh(Zlr(),za);Wh(rur(),za);Wh(nur(),za);Wh(Gwe(),za);Wh(sur(),za);Wh(cur(),za);Wh(rat(),za);Wh(rRe(),za);var Taa=Eti();Object.defineProperty(za,"Value",{enumerable:!0,get:a(function(){return Taa.Value},"get")})});var vti=T(lat=>{"use strict";f();Object.defineProperty(lat,"__esModule",{value:!0});lat.assertShape=void 0;var _ti=uur(),Saa=a((t,e)=>{if(_ti.Value.Check(t,e))return e;let r=`Typebox schema validation failed: -${[..._ti.Value.Errors(t,e)].map(n=>`${n.path} ${n.message}`).join(` -`)}`;throw new Error(r)},"assertShape");lat.assertShape=Saa});var _de={};Ri(_de,{CAPIClient:()=>kaa,RequestType:()=>Tti});async function Raa(t){if(!t)return;let e=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),r=Math.floor(Date.now()/1e3).toString(),n=new TextEncoder().encode(r),o=await crypto.subtle.sign("HMAC",e,n),s=Array.from(new Uint8Array(o)).map(c=>c.toString(16).padStart(2,"0")).join("");return`${r}.${s}`}function Paa(t){return new Set(["ChatCompletions","ChatResponses","ChatMessages","CAPIEmbeddings","Models","RemoteAgent","CodeReviewAgent","RemoteAgentChat","ListSkills","SearchSkill","ModelPolicy","ListModel","AutoModels","CopilotSessionLogs","CopilotSessionDetails","CopilotSessions","CopilotAgentJob","CCAModelsList","CopilotCustomAgents","CopilotAgentMemory","ModelRouter"]).has(t)}var Iaa,dur,cRe,xaa,waa,Tti,kaa,vde=Pe(()=>{f();Iaa=class{static{a(this,"g")}async fetch(t,e){let r={method:e.method||"GET",headers:e.headers,signal:e.signal};e.json?(r.body=JSON.stringify(e.json),r.headers={"Content-Type":"application/json",...r.headers}):e.body&&(r.body=e.body);let n,o;e.timeout&&!e.signal&&(o=new AbortController,r.signal=o.signal,n=setTimeout(()=>{o.abort()},e.timeout));try{let s=await fetch(t,r);return n&&clearTimeout(n),s}catch(s){throw n&&clearTimeout(n),s}}async fetchWithPagination(t,e){let r=[],n=e.pageSize??20,o=e.startPage??1,s=!1;do{let c=e.buildUrl(t,n,o),l=await this.fetch(c,e);if(!l.ok)return r;let u=await l.json(),d=e.getItemsFromResponse(u);r.push(...d),s=d.length===n,o++}while(s);return r}createWebSocket(t,e){return{webSocket:new WebSocket(t)}}},dur=class bti{static{a(this,"d")}constructor(){this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com",this._originTrackerUrl="https://origin-tracker.githubusercontent.com",this._dotcomAPIUrl=this._getDotComAPIUrl(),this._proxyBaseUrl=this._getProxyUrl(void 0),this._capiBaseUrl=this._getCAPIUrl(void 0)}updateDomains(e,r){let n=this._dotcomAPIUrl,o=this._capiBaseUrl,s=this._telemetryBaseUrl,c=this._proxyBaseUrl;return this._enterpriseUrlConfig!==r&&(this._enterpriseUrlConfig=r,this._dotcomAPIUrl=this._getDotComAPIUrl()),e?(this._proxyBaseUrl=this._getProxyUrl(e),this._capiBaseUrl=this._getCAPIUrl(e),this._telemetryBaseUrl=e.endpoints.telemetry||"https://copilot-telemetry.githubusercontent.com",e.endpoints["origin-tracker"]&&(this._originTrackerUrl=e.endpoints["origin-tracker"])):(this._capiBaseUrl="https://api.githubcopilot.com",this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com"),{dotcomUrlChanged:n!==this._dotcomAPIUrl,capiUrlChanged:o!==this._capiBaseUrl,telemetryUrlChanged:s!==this._telemetryBaseUrl,proxyUrlChanged:c!==this._proxyBaseUrl}}_getDotComAPIUrl(){if(this._enterpriseUrlConfig)try{let e=new URL(this._enterpriseUrlConfig);return`${e.protocol}//api.${e.hostname}${e.port?":"+e.port:""}`}catch(e){return console.warn("Failed to parse enterprise URL config:",this._enterpriseUrlConfig,e),"https://api.github.com"}return"https://api.github.com"}_getCAPIUrl(e){return e&&e.endpoints.api||"https://api.githubcopilot.com"}_getProxyUrl(e){return e&&e.endpoints.proxy||bti.DEFAULT_PROXY_BASE_URL}get proxyBaseURL(){return this._proxyBaseUrl}get capiBaseURL(){return this._capiBaseUrl}get capiChatURL(){return`${this._capiBaseUrl}/chat/completions`}get capiResponsesURL(){return`${this._capiBaseUrl}/responses`}get capiMessagesURL(){return`${this._capiBaseUrl}/v1/messages`}get capiEmbeddingsURL(){return`${this._capiBaseUrl}/embeddings`}get capiModelsURL(){return`${this._capiBaseUrl}/models`}get capiAutoModelURL(){return`${this.capiModelsURL}/session`}get capiModelRouterURL(){return`${this.capiAutoModelURL}/intent`}get embeddingsModelURL(){return`${this.embeddingsURL}/models`}get chunksURL(){return`${this.dotComAPIURL}/chunks`}get embeddingsURL(){return`${this.dotComAPIURL}/embeddings`}get embeddingsCodeSearchURL(){return`${this.dotComAPIURL}/embeddings/code/search`}get telemetryURL(){return`${this._telemetryBaseUrl}/telemetry`}get remoteAgentsURL(){return`${this._capiBaseUrl}/agents`}get listSkillsURL(){return`${this._capiBaseUrl}/skills`}get searchSkillURL(){return`${this._capiBaseUrl}/search`}get contentExclusionURL(){return`${this._dotcomAPIUrl}/copilot_internal/content_exclusion`}get copilotUserInfoURL(){return`${this._dotcomAPIUrl}/copilot_internal/user`}get tokenURL(){return this._dotcomAPIUrl+"/copilot_internal/v2/token"}get tokenNoAuthURL(){return`${this._dotcomAPIUrl}/copilot_internal/v2/nltoken`}get dotComAPIURL(){return this._dotcomAPIUrl}get originTrackerURL(){return this._originTrackerUrl}get chatAttachmentUploadURL(){return"https://uploads.github.com/copilot/chat/attachments"}get copilotAgentSessionsURL(){return`${this._capiBaseUrl}/agents/sessions`}get copilotAgentJobsURL(){return`${this._capiBaseUrl}/agents/swe`}get CCAModelsURL(){return`${this._capiBaseUrl}/agents/swe/models`}get copilotCustomAgentsURL(){return`${this._capiBaseUrl}/agents/swe/custom-agents`}get copilotAgentMemoryURL(){return`${this._capiBaseUrl}/agents/swe/internal/memory/v0`}};dur.DEFAULT_PROXY_BASE_URL="https://copilot-proxy.githubusercontent.com",dur.CAPI_MODEL_LAB_URL="https://api-model-lab.githubcopilot.com";cRe=dur,xaa=`The \u201C@vscode/copilot-api\u201D npm Module Terms and Conditions ("Terms") are a legal agreement between you (either as an individual or on behalf of an entity) and GitHub, Inc. regarding your use of \u201C@vscode/copilot-api\u201D npm library and associated documentation (collectively, the "Software"). By using the Software, you accept these Terms. Please read all of these Terms; in many cases, provisions set forth later in the Terms limit and qualify provisions set forth earlier in the Terms. If you do not accept these Terms, do not download, install, use, or copy the Software. +`:"",c={line:0,character:0};return t.applyEdits([{newText:s,range:{start:c,end:c}}])}a(Cra,"applyEditsForNotebook");function vra(t,e,r){let n=t.get(pra.ICompletionsFeaturesService),s=n.maxPromptCompletionTokens(e)-(0,hra.getMaxSolutionTokens)(),c=(0,iti.getNumberOfSnippets)(e,r),l=(0,iti.getSimilarFilesOptions)(t,e,r),u=n.suffixPercent(e),d=n.suffixMatchThreshold(e);if(u<0||u>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${u}`);if(d<0||d>100)throw new Error(`suffixMatchThreshold must be between 0 and 100, but was ${d}`);return{maxPromptLength:s,similarFilesOptions:l,numberOfSnippets:c,suffixPercent:u,suffixMatchThreshold:d}}a(vra,"getPromptOptions")});var cti=T(OU=>{"use strict";f();Object.defineProperty(OU,"__esModule",{value:!0});OU.TypeSystem=OU.TypeSystemDuplicateFormat=OU.TypeSystemDuplicateTypeKind=void 0;var Qot=Rle(),bra=WIe(),Tra=nn(),ati=sd(),qot=class extends ati.TypeBoxError{static{a(this,"TypeSystemDuplicateTypeKind")}constructor(e){super(`Duplicate type kind '${e}' detected`)}};OU.TypeSystemDuplicateTypeKind=qot;var Got=class extends ati.TypeBoxError{static{a(this,"TypeSystemDuplicateFormat")}constructor(e){super(`Duplicate string format '${e}' detected`)}};OU.TypeSystemDuplicateFormat=Got;var sti;(function(t){function e(n,o){if(Qot.TypeRegistry.Has(n))throw new qot(n);return Qot.TypeRegistry.Set(n,o),(s={})=>(0,bra.Unsafe)({...s,[Tra.Kind]:n})}a(e,"Type"),t.Type=e;function r(n,o){if(Qot.FormatRegistry.Has(n))throw new Got(n);return Qot.FormatRegistry.Set(n,o),n}a(r,"Format"),t.Format=r})(sti||(OU.TypeSystem=sti={}))});var Ulr=T(BU=>{"use strict";f();var Sra=BU&&BU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lti=BU&&BU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Sra(e,t,r)};Object.defineProperty(BU,"__esModule",{value:!0});lti(mIe(),BU);lti(cti(),BU)});var Qlr=T(Lxe=>{"use strict";f();Object.defineProperty(Lxe,"__esModule",{value:!0});Lxe.DefaultErrorFunction=uti;Lxe.SetErrorFunction=xra;Lxe.GetErrorFunction=wra;var Ira=nn(),gn=qlr();function uti(t){switch(t.errorType){case gn.ValueErrorType.ArrayContains:return"Expected array to contain at least one matching value";case gn.ValueErrorType.ArrayMaxContains:return`Expected array to contain no more than ${t.schema.maxContains} matching values`;case gn.ValueErrorType.ArrayMinContains:return`Expected array to contain at least ${t.schema.minContains} matching values`;case gn.ValueErrorType.ArrayMaxItems:return`Expected array length to be less or equal to ${t.schema.maxItems}`;case gn.ValueErrorType.ArrayMinItems:return`Expected array length to be greater or equal to ${t.schema.minItems}`;case gn.ValueErrorType.ArrayUniqueItems:return"Expected array elements to be unique";case gn.ValueErrorType.Array:return"Expected array";case gn.ValueErrorType.AsyncIterator:return"Expected AsyncIterator";case gn.ValueErrorType.BigIntExclusiveMaximum:return`Expected bigint to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.BigIntMaximum:return`Expected bigint to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.BigIntMinimum:return`Expected bigint to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.BigIntMultipleOf:return`Expected bigint to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.BigInt:return"Expected bigint";case gn.ValueErrorType.Boolean:return"Expected boolean";case gn.ValueErrorType.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${t.schema.exclusiveMinimumTimestamp}`;case gn.ValueErrorType.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${t.schema.exclusiveMaximumTimestamp}`;case gn.ValueErrorType.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${t.schema.minimumTimestamp}`;case gn.ValueErrorType.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${t.schema.maximumTimestamp}`;case gn.ValueErrorType.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${t.schema.multipleOfTimestamp}`;case gn.ValueErrorType.Date:return"Expected Date";case gn.ValueErrorType.Function:return"Expected function";case gn.ValueErrorType.IntegerExclusiveMaximum:return`Expected integer to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.IntegerExclusiveMinimum:return`Expected integer to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.IntegerMaximum:return`Expected integer to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.IntegerMinimum:return`Expected integer to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.IntegerMultipleOf:return`Expected integer to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.Integer:return"Expected integer";case gn.ValueErrorType.IntersectUnevaluatedProperties:return"Unexpected property";case gn.ValueErrorType.Intersect:return"Expected all values to match";case gn.ValueErrorType.Iterator:return"Expected Iterator";case gn.ValueErrorType.Literal:return`Expected ${typeof t.schema.const=="string"?`'${t.schema.const}'`:t.schema.const}`;case gn.ValueErrorType.Never:return"Never";case gn.ValueErrorType.Not:return"Value should not match";case gn.ValueErrorType.Null:return"Expected null";case gn.ValueErrorType.NumberExclusiveMaximum:return`Expected number to be less than ${t.schema.exclusiveMaximum}`;case gn.ValueErrorType.NumberExclusiveMinimum:return`Expected number to be greater than ${t.schema.exclusiveMinimum}`;case gn.ValueErrorType.NumberMaximum:return`Expected number to be less or equal to ${t.schema.maximum}`;case gn.ValueErrorType.NumberMinimum:return`Expected number to be greater or equal to ${t.schema.minimum}`;case gn.ValueErrorType.NumberMultipleOf:return`Expected number to be a multiple of ${t.schema.multipleOf}`;case gn.ValueErrorType.Number:return"Expected number";case gn.ValueErrorType.Object:return"Expected object";case gn.ValueErrorType.ObjectAdditionalProperties:return"Unexpected property";case gn.ValueErrorType.ObjectMaxProperties:return`Expected object to have no more than ${t.schema.maxProperties} properties`;case gn.ValueErrorType.ObjectMinProperties:return`Expected object to have at least ${t.schema.minProperties} properties`;case gn.ValueErrorType.ObjectRequiredProperty:return"Expected required property";case gn.ValueErrorType.Promise:return"Expected Promise";case gn.ValueErrorType.RegExp:return"Expected string to match regular expression";case gn.ValueErrorType.StringFormatUnknown:return`Unknown format '${t.schema.format}'`;case gn.ValueErrorType.StringFormat:return`Expected string to match '${t.schema.format}' format`;case gn.ValueErrorType.StringMaxLength:return`Expected string length less or equal to ${t.schema.maxLength}`;case gn.ValueErrorType.StringMinLength:return`Expected string length greater or equal to ${t.schema.minLength}`;case gn.ValueErrorType.StringPattern:return`Expected string to match '${t.schema.pattern}'`;case gn.ValueErrorType.String:return"Expected string";case gn.ValueErrorType.Symbol:return"Expected symbol";case gn.ValueErrorType.TupleLength:return`Expected tuple to have ${t.schema.maxItems||0} elements`;case gn.ValueErrorType.Tuple:return"Expected tuple";case gn.ValueErrorType.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${t.schema.maxByteLength}`;case gn.ValueErrorType.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${t.schema.minByteLength}`;case gn.ValueErrorType.Uint8Array:return"Expected Uint8Array";case gn.ValueErrorType.Undefined:return"Expected undefined";case gn.ValueErrorType.Union:return"Expected union value";case gn.ValueErrorType.Void:return"Expected void";case gn.ValueErrorType.Kind:return`Expected kind '${t.schema[Ira.Kind]}'`;default:return"Unknown error type"}}a(uti,"DefaultErrorFunction");var dti=uti;function xra(t){dti=t}a(xra,"SetErrorFunction");function wra(){return dti}a(wra,"GetErrorFunction")});var hti=T(Rue=>{"use strict";f();Object.defineProperty(Rue,"__esModule",{value:!0});Rue.TypeDereferenceError=void 0;Rue.Pushref=Dra;Rue.Deref=pti;var Rra=sd(),fti=nn(),Pra=Hrt(),Hot=class extends Rra.TypeBoxError{static{a(this,"TypeDereferenceError")}constructor(e){super(`Unable to dereference schema with $id '${e.$ref}'`),this.schema=e}};Rue.TypeDereferenceError=Hot;function kra(t,e){let r=e.find(n=>n.$id===t.$ref);if(r===void 0)throw new Hot(t);return pti(r,e)}a(kra,"Resolve");function Dra(t,e){return!(0,Pra.IsString)(t.$id)||e.some(r=>r.$id===t.$id)||e.push(t),e}a(Dra,"Pushref");function pti(t,e){return t[fti.Kind]==="This"||t[fti.Kind]==="Ref"?kra(t,e):t}a(pti,"Deref")});var IR=T(iK=>{"use strict";f();var Nra=iK&&iK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mra=iK&&iK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Nra(e,t,r)};Object.defineProperty(iK,"__esModule",{value:!0});Mra(hti(),iK)});var yti=T(Fxe=>{"use strict";f();Object.defineProperty(Fxe,"__esModule",{value:!0});Fxe.ValueHashError=void 0;Fxe.Hash=Jra;var xR=Rp(),Ora=sd(),jot=class extends Ora.TypeBoxError{static{a(this,"ValueHashError")}constructor(e){super("Unable to hash value"),this.value=e}};Fxe.ValueHashError=jot;var Vv;(function(t){t[t.Undefined=0]="Undefined",t[t.Null=1]="Null",t[t.Boolean=2]="Boolean",t[t.Number=3]="Number",t[t.String=4]="String",t[t.Object=5]="Object",t[t.Array=6]="Array",t[t.Date=7]="Date",t[t.Uint8Array=8]="Uint8Array",t[t.Symbol=9]="Symbol",t[t.BigInt=10]="BigInt"})(Vv||(Vv={}));var Pue=BigInt("14695981039346656037"),[Bra,Lra]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Fra=Array.from({length:256}).map((t,e)=>BigInt(e)),mti=new Float64Array(1),gti=new DataView(mti.buffer),Ati=new Uint8Array(mti.buffer);function*Ura(t){let e=t===0?1:Math.ceil(Math.floor(Math.log2(t)+1)/8);for(let r=0;r>8*(e-1-r)&255}a(Ura,"NumberToBytes");function Qra(t){hA(Vv.Array);for(let e of t)kue(e)}a(Qra,"ArrayType");function qra(t){hA(Vv.Boolean),hA(t?1:0)}a(qra,"BooleanType");function Gra(t){hA(Vv.BigInt),gti.setBigInt64(0,t);for(let e of Ati)hA(e)}a(Gra,"BigIntType");function Hra(t){hA(Vv.Date),kue(t.getTime())}a(Hra,"DateType");function jra(t){hA(Vv.Null)}a(jra,"NullType");function $ra(t){hA(Vv.Number),gti.setFloat64(0,t);for(let e of Ati)hA(e)}a($ra,"NumberType");function Vra(t){hA(Vv.Object);for(let e of globalThis.Object.getOwnPropertyNames(t).sort())kue(e),kue(t[e])}a(Vra,"ObjectType");function Wra(t){hA(Vv.String);for(let e=0;e{"use strict";f();var Xra=oK&&oK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Zra=oK&&oK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Xra(e,t,r)};Object.defineProperty(oK,"__esModule",{value:!0});Zra(yti(),oK)});var Hlr=T(Gxe=>{"use strict";f();Object.defineProperty(Gxe,"__esModule",{value:!0});Gxe.ValueCheckUnknownTypeError=void 0;Gxe.Check=Qna;var Qxe=Ulr(),Glr=IR(),ena=Uxe(),Due=nn(),Eti=eR(),tna=fY(),qxe=Rle(),rna=sd(),nna=M0(),F0=Rp(),ina=Do(),$ot=class extends rna.TypeBoxError{static{a(this,"ValueCheckUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};Gxe.ValueCheckUnknownTypeError=$ot;function ona(t){return t[Due.Kind]==="Any"||t[Due.Kind]==="Unknown"}a(ona,"IsAnyOrUnknown");function ds(t){return t!==void 0}a(ds,"IsDefined");function sna(t,e,r){return!0}a(sna,"FromAny");function ana(t,e,r){return!0}a(ana,"FromArgument");function cna(t,e,r){if(!(0,F0.IsArray)(r)||ds(t.minItems)&&!(r.length>=t.minItems)||ds(t.maxItems)&&!(r.length<=t.maxItems)||!r.every(s=>Fh(t.items,e,s))||t.uniqueItems===!0&&!(function(){let s=new Set;for(let c of r){let l=(0,ena.Hash)(c);if(s.has(l))return!1;s.add(l)}return!0})())return!1;if(!(ds(t.contains)||(0,F0.IsNumber)(t.minContains)||(0,F0.IsNumber)(t.maxContains)))return!0;let n=ds(t.contains)?t.contains:(0,nna.Never)(),o=r.reduce((s,c)=>Fh(n,e,c)?s+1:s,0);return!(o===0||(0,F0.IsNumber)(t.minContains)&&ot.maxContains)}a(cna,"FromArray");function lna(t,e,r){return(0,F0.IsAsyncIterator)(r)}a(lna,"FromAsyncIterator");function una(t,e,r){return!(!(0,F0.IsBigInt)(r)||ds(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||ds(t.maximum)&&!(r<=t.maximum)||ds(t.minimum)&&!(r>=t.minimum)||ds(t.multipleOf)&&r%t.multipleOf!==BigInt(0))}a(una,"FromBigInt");function dna(t,e,r){return(0,F0.IsBoolean)(r)}a(dna,"FromBoolean");function fna(t,e,r){return Fh(t.returns,e,r.prototype)}a(fna,"FromConstructor");function pna(t,e,r){return!(!(0,F0.IsDate)(r)||ds(t.exclusiveMaximumTimestamp)&&!(r.getTime()t.exclusiveMinimumTimestamp)||ds(t.maximumTimestamp)&&!(r.getTime()<=t.maximumTimestamp)||ds(t.minimumTimestamp)&&!(r.getTime()>=t.minimumTimestamp)||ds(t.multipleOfTimestamp)&&r.getTime()%t.multipleOfTimestamp!==0)}a(pna,"FromDate");function hna(t,e,r){return(0,F0.IsFunction)(r)}a(hna,"FromFunction");function mna(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return Fh(o,[...e,...n],r)}a(mna,"FromImport");function gna(t,e,r){return!(!(0,F0.IsInteger)(r)||ds(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||ds(t.maximum)&&!(r<=t.maximum)||ds(t.minimum)&&!(r>=t.minimum)||ds(t.multipleOf)&&r%t.multipleOf!==0)}a(gna,"FromInteger");function Ana(t,e,r){let n=t.allOf.every(o=>Fh(o,e,r));if(t.unevaluatedProperties===!1){let o=new RegExp((0,Eti.KeyOfPattern)(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c));return n&&s}else if((0,ina.IsSchema)(t.unevaluatedProperties)){let o=new RegExp((0,Eti.KeyOfPattern)(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c)||Fh(t.unevaluatedProperties,e,r[c]));return n&&s}else return n}a(Ana,"FromIntersect");function yna(t,e,r){return(0,F0.IsIterator)(r)}a(yna,"FromIterator");function Ena(t,e,r){return r===t.const}a(Ena,"FromLiteral");function _na(t,e,r){return!1}a(_na,"FromNever");function Cna(t,e,r){return!Fh(t.not,e,r)}a(Cna,"FromNot");function vna(t,e,r){return(0,F0.IsNull)(r)}a(vna,"FromNull");function bna(t,e,r){return!(!Qxe.TypeSystemPolicy.IsNumberLike(r)||ds(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||ds(t.minimum)&&!(r>=t.minimum)||ds(t.maximum)&&!(r<=t.maximum)||ds(t.multipleOf)&&r%t.multipleOf!==0)}a(bna,"FromNumber");function Tna(t,e,r){if(!Qxe.TypeSystemPolicy.IsObjectLike(r)||ds(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||ds(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let n=Object.getOwnPropertyNames(t.properties);for(let o of n){let s=t.properties[o];if(t.required&&t.required.includes(o)){if(!Fh(s,e,r[o])||((0,tna.ExtendsUndefinedCheck)(s)||ona(s))&&!(o in r))return!1}else if(Qxe.TypeSystemPolicy.IsExactOptionalProperty(r,o)&&!Fh(s,e,r[o]))return!1}if(t.additionalProperties===!1){let o=Object.getOwnPropertyNames(r);return t.required&&t.required.length===n.length&&o.length===n.length?!0:o.every(s=>n.includes(s))}else return typeof t.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||Fh(t.additionalProperties,e,r[s])):!0}a(Tna,"FromObject");function Sna(t,e,r){return(0,F0.IsPromise)(r)}a(Sna,"FromPromise");function Ina(t,e,r){if(!Qxe.TypeSystemPolicy.IsRecordLike(r)||ds(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||ds(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let[n,o]=Object.entries(t.patternProperties)[0],s=new RegExp(n),c=Object.entries(r).every(([d,p])=>s.test(d)?Fh(o,e,p):!0),l=typeof t.additionalProperties=="object"?Object.entries(r).every(([d,p])=>s.test(d)?!0:Fh(t.additionalProperties,e,p)):!0,u=t.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return c&&l&&u}a(Ina,"FromRecord");function xna(t,e,r){return Fh((0,Glr.Deref)(t,e),e,r)}a(xna,"FromRef");function wna(t,e,r){let n=new RegExp(t.source,t.flags);return ds(t.minLength)&&!(r.length>=t.minLength)||ds(t.maxLength)&&!(r.length<=t.maxLength)?!1:n.test(r)}a(wna,"FromRegExp");function Rna(t,e,r){return!(0,F0.IsString)(r)||ds(t.minLength)&&!(r.length>=t.minLength)||ds(t.maxLength)&&!(r.length<=t.maxLength)||ds(t.pattern)&&!new RegExp(t.pattern).test(r)?!1:ds(t.format)?qxe.FormatRegistry.Has(t.format)?qxe.FormatRegistry.Get(t.format)(r):!1:!0}a(Rna,"FromString");function Pna(t,e,r){return(0,F0.IsSymbol)(r)}a(Pna,"FromSymbol");function kna(t,e,r){return(0,F0.IsString)(r)&&new RegExp(t.pattern).test(r)}a(kna,"FromTemplateLiteral");function Dna(t,e,r){return Fh((0,Glr.Deref)(t,e),e,r)}a(Dna,"FromThis");function Nna(t,e,r){if(!(0,F0.IsArray)(r)||t.items===void 0&&r.length!==0||r.length!==t.maxItems)return!1;if(!t.items)return!0;for(let n=0;nFh(n,e,r))}a(Ona,"FromUnion");function Bna(t,e,r){return!(!(0,F0.IsUint8Array)(r)||ds(t.maxByteLength)&&!(r.length<=t.maxByteLength)||ds(t.minByteLength)&&!(r.length>=t.minByteLength))}a(Bna,"FromUint8Array");function Lna(t,e,r){return!0}a(Lna,"FromUnknown");function Fna(t,e,r){return Qxe.TypeSystemPolicy.IsVoidLike(r)}a(Fna,"FromVoid");function Una(t,e,r){return qxe.TypeRegistry.Has(t[Due.Kind])?qxe.TypeRegistry.Get(t[Due.Kind])(t,r):!1}a(Una,"FromKind");function Fh(t,e,r){let n=ds(t.$id)?(0,Glr.Pushref)(t,e):e,o=t;switch(o[Due.Kind]){case"Any":return sna(o,n,r);case"Argument":return ana(o,n,r);case"Array":return cna(o,n,r);case"AsyncIterator":return lna(o,n,r);case"BigInt":return una(o,n,r);case"Boolean":return dna(o,n,r);case"Constructor":return fna(o,n,r);case"Date":return pna(o,n,r);case"Function":return hna(o,n,r);case"Import":return mna(o,n,r);case"Integer":return gna(o,n,r);case"Intersect":return Ana(o,n,r);case"Iterator":return yna(o,n,r);case"Literal":return Ena(o,n,r);case"Never":return _na(o,n,r);case"Not":return Cna(o,n,r);case"Null":return vna(o,n,r);case"Number":return bna(o,n,r);case"Object":return Tna(o,n,r);case"Promise":return Sna(o,n,r);case"Record":return Ina(o,n,r);case"Ref":return xna(o,n,r);case"RegExp":return wna(o,n,r);case"String":return Rna(o,n,r);case"Symbol":return Pna(o,n,r);case"TemplateLiteral":return kna(o,n,r);case"This":return Dna(o,n,r);case"Tuple":return Nna(o,n,r);case"Undefined":return Mna(o,n,r);case"Union":return Ona(o,n,r);case"Uint8Array":return Bna(o,n,r);case"Unknown":return Lna(o,n,r);case"Void":return Fna(o,n,r);default:if(!qxe.TypeRegistry.Has(o[Due.Kind]))throw new $ot(o);return Una(o,n,r)}}a(Fh,"Visit");function Qna(...t){return t.length===3?Fh(t[0],t[1],t[2]):Fh(t[0],[],t[1])}a(Qna,"Check")});var Wv=T(sK=>{"use strict";f();var qna=sK&&sK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gna=sK&&sK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qna(e,t,r)};Object.defineProperty(sK,"__esModule",{value:!0});Gna(Hlr(),sK)});var qlr=T(DB=>{"use strict";f();Object.defineProperty(DB,"__esModule",{value:!0});DB.ValueErrorIterator=DB.ValueErrorsUnknownTypeError=DB.ValueErrorType=void 0;DB.Errors=Ria;var Hxe=Ulr(),_ti=eR(),Vot=Rle(),Hna=dnr(),jna=Qlr(),$na=sd(),Cti=IR(),Vna=Uxe(),Wna=Wv(),jlr=nn(),zna=M0(),kf=Rp(),Fr;(function(t){t[t.ArrayContains=0]="ArrayContains",t[t.ArrayMaxContains=1]="ArrayMaxContains",t[t.ArrayMaxItems=2]="ArrayMaxItems",t[t.ArrayMinContains=3]="ArrayMinContains",t[t.ArrayMinItems=4]="ArrayMinItems",t[t.ArrayUniqueItems=5]="ArrayUniqueItems",t[t.Array=6]="Array",t[t.AsyncIterator=7]="AsyncIterator",t[t.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",t[t.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",t[t.BigIntMaximum=10]="BigIntMaximum",t[t.BigIntMinimum=11]="BigIntMinimum",t[t.BigIntMultipleOf=12]="BigIntMultipleOf",t[t.BigInt=13]="BigInt",t[t.Boolean=14]="Boolean",t[t.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",t[t.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",t[t.DateMaximumTimestamp=17]="DateMaximumTimestamp",t[t.DateMinimumTimestamp=18]="DateMinimumTimestamp",t[t.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",t[t.Date=20]="Date",t[t.Function=21]="Function",t[t.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",t[t.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",t[t.IntegerMaximum=24]="IntegerMaximum",t[t.IntegerMinimum=25]="IntegerMinimum",t[t.IntegerMultipleOf=26]="IntegerMultipleOf",t[t.Integer=27]="Integer",t[t.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",t[t.Intersect=29]="Intersect",t[t.Iterator=30]="Iterator",t[t.Kind=31]="Kind",t[t.Literal=32]="Literal",t[t.Never=33]="Never",t[t.Not=34]="Not",t[t.Null=35]="Null",t[t.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",t[t.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",t[t.NumberMaximum=38]="NumberMaximum",t[t.NumberMinimum=39]="NumberMinimum",t[t.NumberMultipleOf=40]="NumberMultipleOf",t[t.Number=41]="Number",t[t.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",t[t.ObjectMaxProperties=43]="ObjectMaxProperties",t[t.ObjectMinProperties=44]="ObjectMinProperties",t[t.ObjectRequiredProperty=45]="ObjectRequiredProperty",t[t.Object=46]="Object",t[t.Promise=47]="Promise",t[t.RegExp=48]="RegExp",t[t.StringFormatUnknown=49]="StringFormatUnknown",t[t.StringFormat=50]="StringFormat",t[t.StringMaxLength=51]="StringMaxLength",t[t.StringMinLength=52]="StringMinLength",t[t.StringPattern=53]="StringPattern",t[t.String=54]="String",t[t.Symbol=55]="Symbol",t[t.TupleLength=56]="TupleLength",t[t.Tuple=57]="Tuple",t[t.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",t[t.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",t[t.Uint8Array=60]="Uint8Array",t[t.Undefined=61]="Undefined",t[t.Union=62]="Union",t[t.Void=63]="Void"})(Fr||(DB.ValueErrorType=Fr={}));var Wot=class extends $na.TypeBoxError{static{a(this,"ValueErrorsUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};DB.ValueErrorsUnknownTypeError=Wot;function kB(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}a(kB,"EscapeKey");function ps(t){return t!==void 0}a(ps,"IsDefined");var jxe=class{static{a(this,"ValueErrorIterator")}constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){let e=this.iterator.next();return e.done?void 0:e.value}};DB.ValueErrorIterator=jxe;function jr(t,e,r,n,o=[]){return{type:t,schema:e,path:r,value:n,message:(0,jna.GetErrorFunction)()({errorType:t,path:r,schema:e,value:n,errors:o}),errors:o}}a(jr,"Create");function*Yna(t,e,r,n){}a(Yna,"FromAny");function*Kna(t,e,r,n){}a(Kna,"FromArgument");function*Jna(t,e,r,n){if(!(0,kf.IsArray)(n))return yield jr(Fr.Array,t,r,n);ps(t.minItems)&&!(n.length>=t.minItems)&&(yield jr(Fr.ArrayMinItems,t,r,n)),ps(t.maxItems)&&!(n.length<=t.maxItems)&&(yield jr(Fr.ArrayMaxItems,t,r,n));for(let c=0;cUh(o,e,`${r}${u}`,l).next().done===!0?c+1:c,0);s===0&&(yield jr(Fr.ArrayContains,t,r,n)),(0,kf.IsNumber)(t.minContains)&&st.maxContains&&(yield jr(Fr.ArrayMaxContains,t,r,n))}a(Jna,"FromArray");function*Xna(t,e,r,n){(0,kf.IsAsyncIterator)(n)||(yield jr(Fr.AsyncIterator,t,r,n))}a(Xna,"FromAsyncIterator");function*Zna(t,e,r,n){if(!(0,kf.IsBigInt)(n))return yield jr(Fr.BigInt,t,r,n);ps(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.BigIntExclusiveMinimum,t,r,n)),ps(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.BigIntMaximum,t,r,n)),ps(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.BigIntMinimum,t,r,n)),ps(t.multipleOf)&&n%t.multipleOf!==BigInt(0)&&(yield jr(Fr.BigIntMultipleOf,t,r,n))}a(Zna,"FromBigInt");function*eia(t,e,r,n){(0,kf.IsBoolean)(n)||(yield jr(Fr.Boolean,t,r,n))}a(eia,"FromBoolean");function*tia(t,e,r,n){yield*Uh(t.returns,e,r,n.prototype)}a(tia,"FromConstructor");function*ria(t,e,r,n){if(!(0,kf.IsDate)(n))return yield jr(Fr.Date,t,r,n);ps(t.exclusiveMaximumTimestamp)&&!(n.getTime()t.exclusiveMinimumTimestamp)&&(yield jr(Fr.DateExclusiveMinimumTimestamp,t,r,n)),ps(t.maximumTimestamp)&&!(n.getTime()<=t.maximumTimestamp)&&(yield jr(Fr.DateMaximumTimestamp,t,r,n)),ps(t.minimumTimestamp)&&!(n.getTime()>=t.minimumTimestamp)&&(yield jr(Fr.DateMinimumTimestamp,t,r,n)),ps(t.multipleOfTimestamp)&&n.getTime()%t.multipleOfTimestamp!==0&&(yield jr(Fr.DateMultipleOfTimestamp,t,r,n))}a(ria,"FromDate");function*nia(t,e,r,n){(0,kf.IsFunction)(n)||(yield jr(Fr.Function,t,r,n))}a(nia,"FromFunction");function*iia(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref];yield*Uh(s,[...e,...o],r,n)}a(iia,"FromImport");function*oia(t,e,r,n){if(!(0,kf.IsInteger)(n))return yield jr(Fr.Integer,t,r,n);ps(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.IntegerExclusiveMinimum,t,r,n)),ps(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.IntegerMaximum,t,r,n)),ps(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.IntegerMinimum,t,r,n)),ps(t.multipleOf)&&n%t.multipleOf!==0&&(yield jr(Fr.IntegerMultipleOf,t,r,n))}a(oia,"FromInteger");function*sia(t,e,r,n){let o=!1;for(let s of t.allOf)for(let c of Uh(s,e,r,n))o=!0,yield c;if(o)return yield jr(Fr.Intersect,t,r,n);if(t.unevaluatedProperties===!1){let s=new RegExp((0,_ti.KeyOfPattern)(t));for(let c of Object.getOwnPropertyNames(n))s.test(c)||(yield jr(Fr.IntersectUnevaluatedProperties,t,`${r}/${c}`,n))}if(typeof t.unevaluatedProperties=="object"){let s=new RegExp((0,_ti.KeyOfPattern)(t));for(let c of Object.getOwnPropertyNames(n))if(!s.test(c)){let l=Uh(t.unevaluatedProperties,e,`${r}/${c}`,n[c]).next();l.done||(yield l.value)}}}a(sia,"FromIntersect");function*aia(t,e,r,n){(0,kf.IsIterator)(n)||(yield jr(Fr.Iterator,t,r,n))}a(aia,"FromIterator");function*cia(t,e,r,n){n!==t.const&&(yield jr(Fr.Literal,t,r,n))}a(cia,"FromLiteral");function*lia(t,e,r,n){yield jr(Fr.Never,t,r,n)}a(lia,"FromNever");function*uia(t,e,r,n){Uh(t.not,e,r,n).next().done===!0&&(yield jr(Fr.Not,t,r,n))}a(uia,"FromNot");function*dia(t,e,r,n){(0,kf.IsNull)(n)||(yield jr(Fr.Null,t,r,n))}a(dia,"FromNull");function*fia(t,e,r,n){if(!Hxe.TypeSystemPolicy.IsNumberLike(n))return yield jr(Fr.Number,t,r,n);ps(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield jr(Fr.NumberExclusiveMinimum,t,r,n)),ps(t.maximum)&&!(n<=t.maximum)&&(yield jr(Fr.NumberMaximum,t,r,n)),ps(t.minimum)&&!(n>=t.minimum)&&(yield jr(Fr.NumberMinimum,t,r,n)),ps(t.multipleOf)&&n%t.multipleOf!==0&&(yield jr(Fr.NumberMultipleOf,t,r,n))}a(fia,"FromNumber");function*pia(t,e,r,n){if(!Hxe.TypeSystemPolicy.IsObjectLike(n))return yield jr(Fr.Object,t,r,n);ps(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield jr(Fr.ObjectMinProperties,t,r,n)),ps(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield jr(Fr.ObjectMaxProperties,t,r,n));let o=Array.isArray(t.required)?t.required:[],s=Object.getOwnPropertyNames(t.properties),c=Object.getOwnPropertyNames(n);for(let l of o)c.includes(l)||(yield jr(Fr.ObjectRequiredProperty,t.properties[l],`${r}/${kB(l)}`,void 0));if(t.additionalProperties===!1)for(let l of c)s.includes(l)||(yield jr(Fr.ObjectAdditionalProperties,t,`${r}/${kB(l)}`,n[l]));if(typeof t.additionalProperties=="object")for(let l of c)s.includes(l)||(yield*Uh(t.additionalProperties,e,`${r}/${kB(l)}`,n[l]));for(let l of s){let u=t.properties[l];t.required&&t.required.includes(l)?(yield*Uh(u,e,`${r}/${kB(l)}`,n[l]),(0,Hna.ExtendsUndefinedCheck)(t)&&!(l in n)&&(yield jr(Fr.ObjectRequiredProperty,u,`${r}/${kB(l)}`,void 0))):Hxe.TypeSystemPolicy.IsExactOptionalProperty(n,l)&&(yield*Uh(u,e,`${r}/${kB(l)}`,n[l]))}}a(pia,"FromObject");function*hia(t,e,r,n){(0,kf.IsPromise)(n)||(yield jr(Fr.Promise,t,r,n))}a(hia,"FromPromise");function*mia(t,e,r,n){if(!Hxe.TypeSystemPolicy.IsRecordLike(n))return yield jr(Fr.Object,t,r,n);ps(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield jr(Fr.ObjectMinProperties,t,r,n)),ps(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield jr(Fr.ObjectMaxProperties,t,r,n));let[o,s]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let[l,u]of Object.entries(n))c.test(l)&&(yield*Uh(s,e,`${r}/${kB(l)}`,u));if(typeof t.additionalProperties=="object")for(let[l,u]of Object.entries(n))c.test(l)||(yield*Uh(t.additionalProperties,e,`${r}/${kB(l)}`,u));if(t.additionalProperties===!1){for(let[l,u]of Object.entries(n))if(!c.test(l))return yield jr(Fr.ObjectAdditionalProperties,t,`${r}/${kB(l)}`,u)}}a(mia,"FromRecord");function*gia(t,e,r,n){yield*Uh((0,Cti.Deref)(t,e),e,r,n)}a(gia,"FromRef");function*Aia(t,e,r,n){if(!(0,kf.IsString)(n))return yield jr(Fr.String,t,r,n);if(ps(t.minLength)&&!(n.length>=t.minLength)&&(yield jr(Fr.StringMinLength,t,r,n)),ps(t.maxLength)&&!(n.length<=t.maxLength)&&(yield jr(Fr.StringMaxLength,t,r,n)),!new RegExp(t.source,t.flags).test(n))return yield jr(Fr.RegExp,t,r,n)}a(Aia,"FromRegExp");function*yia(t,e,r,n){if(!(0,kf.IsString)(n))return yield jr(Fr.String,t,r,n);ps(t.minLength)&&!(n.length>=t.minLength)&&(yield jr(Fr.StringMinLength,t,r,n)),ps(t.maxLength)&&!(n.length<=t.maxLength)&&(yield jr(Fr.StringMaxLength,t,r,n)),(0,kf.IsString)(t.pattern)&&(new RegExp(t.pattern).test(n)||(yield jr(Fr.StringPattern,t,r,n))),(0,kf.IsString)(t.format)&&(Vot.FormatRegistry.Has(t.format)?Vot.FormatRegistry.Get(t.format)(n)||(yield jr(Fr.StringFormat,t,r,n)):yield jr(Fr.StringFormatUnknown,t,r,n))}a(yia,"FromString");function*Eia(t,e,r,n){(0,kf.IsSymbol)(n)||(yield jr(Fr.Symbol,t,r,n))}a(Eia,"FromSymbol");function*_ia(t,e,r,n){if(!(0,kf.IsString)(n))return yield jr(Fr.String,t,r,n);new RegExp(t.pattern).test(n)||(yield jr(Fr.StringPattern,t,r,n))}a(_ia,"FromTemplateLiteral");function*Cia(t,e,r,n){yield*Uh((0,Cti.Deref)(t,e),e,r,n)}a(Cia,"FromThis");function*via(t,e,r,n){if(!(0,kf.IsArray)(n))return yield jr(Fr.Tuple,t,r,n);if(t.items===void 0&&n.length!==0)return yield jr(Fr.TupleLength,t,r,n);if(n.length!==t.maxItems)return yield jr(Fr.TupleLength,t,r,n);if(t.items)for(let o=0;onew jxe(Uh(s,e,r,n)));yield jr(Fr.Union,t,r,n,o)}a(Tia,"FromUnion");function*Sia(t,e,r,n){if(!(0,kf.IsUint8Array)(n))return yield jr(Fr.Uint8Array,t,r,n);ps(t.maxByteLength)&&!(n.length<=t.maxByteLength)&&(yield jr(Fr.Uint8ArrayMaxByteLength,t,r,n)),ps(t.minByteLength)&&!(n.length>=t.minByteLength)&&(yield jr(Fr.Uint8ArrayMinByteLength,t,r,n))}a(Sia,"FromUint8Array");function*Iia(t,e,r,n){}a(Iia,"FromUnknown");function*xia(t,e,r,n){Hxe.TypeSystemPolicy.IsVoidLike(n)||(yield jr(Fr.Void,t,r,n))}a(xia,"FromVoid");function*wia(t,e,r,n){Vot.TypeRegistry.Get(t[jlr.Kind])(t,n)||(yield jr(Fr.Kind,t,r,n))}a(wia,"FromKind");function*Uh(t,e,r,n){let o=ps(t.$id)?[...e,t]:e,s=t;switch(s[jlr.Kind]){case"Any":return yield*Yna(s,o,r,n);case"Argument":return yield*Kna(s,o,r,n);case"Array":return yield*Jna(s,o,r,n);case"AsyncIterator":return yield*Xna(s,o,r,n);case"BigInt":return yield*Zna(s,o,r,n);case"Boolean":return yield*eia(s,o,r,n);case"Constructor":return yield*tia(s,o,r,n);case"Date":return yield*ria(s,o,r,n);case"Function":return yield*nia(s,o,r,n);case"Import":return yield*iia(s,o,r,n);case"Integer":return yield*oia(s,o,r,n);case"Intersect":return yield*sia(s,o,r,n);case"Iterator":return yield*aia(s,o,r,n);case"Literal":return yield*cia(s,o,r,n);case"Never":return yield*lia(s,o,r,n);case"Not":return yield*uia(s,o,r,n);case"Null":return yield*dia(s,o,r,n);case"Number":return yield*fia(s,o,r,n);case"Object":return yield*pia(s,o,r,n);case"Promise":return yield*hia(s,o,r,n);case"Record":return yield*mia(s,o,r,n);case"Ref":return yield*gia(s,o,r,n);case"RegExp":return yield*Aia(s,o,r,n);case"String":return yield*yia(s,o,r,n);case"Symbol":return yield*Eia(s,o,r,n);case"TemplateLiteral":return yield*_ia(s,o,r,n);case"This":return yield*Cia(s,o,r,n);case"Tuple":return yield*via(s,o,r,n);case"Undefined":return yield*bia(s,o,r,n);case"Union":return yield*Tia(s,o,r,n);case"Uint8Array":return yield*Sia(s,o,r,n);case"Unknown":return yield*Iia(s,o,r,n);case"Void":return yield*xia(s,o,r,n);default:if(!Vot.TypeRegistry.Has(s[jlr.Kind]))throw new Wot(t);return yield*wia(s,o,r,n)}}a(Uh,"Visit");function Ria(...t){let e=t.length===3?Uh(t[0],t[1],"",t[2]):Uh(t[0],[],"",t[1]);return new jxe(e)}a(Ria,"Errors")});var Nue=T(LU=>{"use strict";f();var Pia=LU&&LU.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vti=LU&&LU.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Pia(e,t,r)};Object.defineProperty(LU,"__esModule",{value:!0});vti(qlr(),LU);vti(Qlr(),LU)});var xti=T(NB=>{"use strict";f();var kia=NB&&NB.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Tti=NB&&NB.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$lr,zot,Sti;Object.defineProperty(NB,"__esModule",{value:!0});NB.AssertError=void 0;NB.Assert=Mia;var Iti=Nue(),Dia=ptr(),Nia=Hlr(),Yot=class extends Dia.TypeBoxError{static{a(this,"AssertError")}constructor(e){let r=e.First();super(r===void 0?"Invalid Value":r.message),$lr.add(this),zot.set(this,void 0),kia(this,zot,e,"f"),this.error=r}Errors(){return new Iti.ValueErrorIterator(Tti(this,$lr,"m",Sti).call(this))}};NB.AssertError=Yot;zot=new WeakMap,$lr=new WeakSet,Sti=a(function*(){this.error&&(yield this.error),yield*Tti(this,zot,"f")},"_AssertError_Iterator");function bti(t,e,r){if(!(0,Nia.Check)(t,e,r))throw new Yot((0,Iti.Errors)(t,e,r))}a(bti,"AssertValue");function Mia(...t){return t.length===3?bti(t[0],t[1],t[2]):bti(t[0],[],t[1])}a(Mia,"Assert")});var Kot=T(aK=>{"use strict";f();var Oia=aK&&aK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bia=aK&&aK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Oia(e,t,r)};Object.defineProperty(aK,"__esModule",{value:!0});Bia(xti(),aK)});var wti=T(Vlr=>{"use strict";f();Object.defineProperty(Vlr,"__esModule",{value:!0});Vlr.Clone=Mue;var cK=Rp();function Lia(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=Mue(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=Mue(t[r]);return e}a(Lia,"FromObject");function Fia(t){return t.map(e=>Mue(e))}a(Fia,"FromArray");function Uia(t){return t.slice()}a(Uia,"FromTypedArray");function Qia(t){return new Map(Mue([...t.entries()]))}a(Qia,"FromMap");function qia(t){return new Set(Mue([...t.entries()]))}a(qia,"FromSet");function Gia(t){return new Date(t.toISOString())}a(Gia,"FromDate");function Mue(t){if((0,cK.IsArray)(t))return Fia(t);if((0,cK.IsDate)(t))return Gia(t);if((0,cK.IsTypedArray)(t))return Uia(t);if((0,cK.IsMap)(t))return Qia(t);if((0,cK.IsSet)(t))return qia(t);if((0,cK.IsObject)(t))return Lia(t);if((0,cK.IsValueType)(t))return t;throw new Error("ValueClone: Unable to clone value")}a(Mue,"Clone")});var wR=T(lK=>{"use strict";f();var Hia=lK&&lK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jia=lK&&lK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Hia(e,t,r)};Object.defineProperty(lK,"__esModule",{value:!0});jia(wti(),lK)});var Dti=T($xe=>{"use strict";f();Object.defineProperty($xe,"__esModule",{value:!0});$xe.ValueCreateError=void 0;$xe.Create=koa;var Gs=Rp(),$ia=Wv(),Via=wR(),Wlr=IR(),Rti=Xw(),Wia=Rle(),Pti=nn(),zia=sd(),Yia=Hrt(),pC=class extends zia.TypeBoxError{static{a(this,"ValueCreateError")}constructor(e,r){super(r),this.schema=e}};$xe.ValueCreateError=pC;function ia(t){return(0,Yia.IsFunction)(t)?t():(0,Via.Clone)(t)}a(ia,"FromDefault");function Kia(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):{}}a(Kia,"FromAny");function Jia(t,e){return{}}a(Jia,"FromArgument");function Xia(t,e){if(t.uniqueItems===!0&&!(0,Gs.HasPropertyKey)(t,"default"))throw new pC(t,"Array with the uniqueItems constraint requires a default value");if("contains"in t&&!(0,Gs.HasPropertyKey)(t,"default"))throw new pC(t,"Array with the contains constraint requires a default value");return"default"in t?ia(t.default):t.minItems!==void 0?Array.from({length:t.minItems}).map(r=>zv(t.items,e)):[]}a(Xia,"FromArray");function Zia(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):(async function*(){})()}a(Zia,"FromAsyncIterator");function eoa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):BigInt(0)}a(eoa,"FromBigInt");function toa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):!1}a(toa,"FromBoolean");function roa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);{let r=zv(t.returns,e);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,o]of Object.entries(r)){let s=this;s[n]=o}}}:class{}}}a(roa,"FromConstructor");function noa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.minimumTimestamp!==void 0?new Date(t.minimumTimestamp):new Date}a(noa,"FromDate");function ioa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):()=>zv(t.returns,e)}a(ioa,"FromFunction");function ooa(t,e){let r=globalThis.Object.values(t.$defs),n=t.$defs[t.$ref];return zv(n,[...e,...r])}a(ooa,"FromImport");function soa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.minimum!==void 0?t.minimum:0}a(soa,"FromInteger");function aoa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);{let r=t.allOf.reduce((n,o)=>{let s=zv(o,e);return typeof s=="object"?{...n,...s}:s},{});if(!(0,$ia.Check)(t,e,r))throw new pC(t,"Intersect produced invalid value. Consider using a default value.");return r}}a(aoa,"FromIntersect");function coa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):(function*(){})()}a(coa,"FromIterator");function loa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.const}a(loa,"FromLiteral");function uoa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new pC(t,"Never types cannot be created. Consider using a default value.")}a(uoa,"FromNever");function doa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new pC(t,"Not types must have a default value")}a(doa,"FromNot");function foa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):null}a(foa,"FromNull");function poa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.minimum!==void 0?t.minimum:0}a(poa,"FromNumber");function hoa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);{let r=new Set(t.required),n={};for(let[o,s]of Object.entries(t.properties))r.has(o)&&(n[o]=zv(s,e));return n}}a(hoa,"FromObject");function moa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):Promise.resolve(zv(t.item,e))}a(moa,"FromPromise");function goa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):{}}a(goa,"FromRecord");function Aoa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):zv((0,Wlr.Deref)(t,e),e)}a(Aoa,"FromRef");function yoa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new pC(t,"RegExp types cannot be created. Consider using a default value.")}a(yoa,"FromRegExp");function Eoa(t,e){if(t.pattern!==void 0){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new pC(t,"String types with patterns must specify a default value")}else if(t.format!==void 0){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new pC(t,"String types with formats must specify a default value")}else return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.minLength!==void 0?Array.from({length:t.minLength}).map(()=>" ").join(""):""}a(Eoa,"FromString");function _oa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):"value"in t?Symbol.for(t.value):Symbol()}a(_oa,"FromSymbol");function Coa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);if(!(0,Rti.IsTemplateLiteralFinite)(t))throw new pC(t,"Can only create template literals that produce a finite variants. Consider using a default value.");return(0,Rti.TemplateLiteralGenerate)(t)[0]}a(Coa,"FromTemplateLiteral");function voa(t,e){if(kti++>Poa)throw new pC(t,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):zv((0,Wlr.Deref)(t,e),e)}a(voa,"FromThis");function boa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.items===void 0?[]:Array.from({length:t.minItems}).map((r,n)=>zv(t.items[n],e))}a(boa,"FromTuple");function Toa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default)}a(Toa,"FromUndefined");function Soa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);if(t.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return zv(t.anyOf[0],e)}a(Soa,"FromUnion");function Ioa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):t.minByteLength!==void 0?new Uint8Array(t.minByteLength):new Uint8Array(0)}a(Ioa,"FromUint8Array");function xoa(t,e){return(0,Gs.HasPropertyKey)(t,"default")?ia(t.default):{}}a(xoa,"FromUnknown");function woa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default)}a(woa,"FromVoid");function Roa(t,e){if((0,Gs.HasPropertyKey)(t,"default"))return ia(t.default);throw new Error("User defined types must specify a default value")}a(Roa,"FromKind");function zv(t,e){let r=(0,Wlr.Pushref)(t,e),n=t;switch(n[Pti.Kind]){case"Any":return Kia(n,r);case"Argument":return Jia(n,r);case"Array":return Xia(n,r);case"AsyncIterator":return Zia(n,r);case"BigInt":return eoa(n,r);case"Boolean":return toa(n,r);case"Constructor":return roa(n,r);case"Date":return noa(n,r);case"Function":return ioa(n,r);case"Import":return ooa(n,r);case"Integer":return soa(n,r);case"Intersect":return aoa(n,r);case"Iterator":return coa(n,r);case"Literal":return loa(n,r);case"Never":return uoa(n,r);case"Not":return doa(n,r);case"Null":return foa(n,r);case"Number":return poa(n,r);case"Object":return hoa(n,r);case"Promise":return moa(n,r);case"Record":return goa(n,r);case"Ref":return Aoa(n,r);case"RegExp":return yoa(n,r);case"String":return Eoa(n,r);case"Symbol":return _oa(n,r);case"TemplateLiteral":return Coa(n,r);case"This":return voa(n,r);case"Tuple":return boa(n,r);case"Undefined":return Toa(n,r);case"Union":return Soa(n,r);case"Uint8Array":return Ioa(n,r);case"Unknown":return xoa(n,r);case"Void":return woa(n,r);default:if(!Wia.TypeRegistry.Has(n[Pti.Kind]))throw new pC(n,"Unknown type");return Roa(n,r)}}a(zv,"Visit");var Poa=512,kti=0;function koa(...t){return kti=0,t.length===2?zv(t[0],t[1]):zv(t[0],[])}a(koa,"Create")});var Jot=T(uK=>{"use strict";f();var Doa=uK&&uK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Noa=uK&&uK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Doa(e,t,r)};Object.defineProperty(uK,"__esModule",{value:!0});Noa(Dti(),uK)});var Bti=T(zxe=>{"use strict";f();Object.defineProperty(zxe,"__esModule",{value:!0});zxe.ValueCastError=void 0;zxe.Cast=Oti;var KS=Rp(),Moa=sd(),Xot=nn(),FU=Jot(),Yv=Wv(),dK=wR(),Wxe=IR(),Vxe=class extends Moa.TypeBoxError{static{a(this,"ValueCastError")}constructor(e,r){super(r),this.schema=e}};zxe.ValueCastError=Vxe;function Nti(t,e,r){if(t[Xot.Kind]==="Object"&&typeof r=="object"&&!(0,KS.IsNull)(r)){let n=t,o=Object.getOwnPropertyNames(r);return Object.entries(n.properties).reduce((c,[l,u])=>{let d=u[Xot.Kind]==="Literal"&&u.const===r[l]?100:0,p=(0,Yv.Check)(u,e,r[l])?10:0,h=o.includes(l)?1:0;return c+(d+p+h)},0)}else if(t[Xot.Kind]==="Union"){let o=t.anyOf.map(s=>(0,Wxe.Deref)(s,e)).map(s=>Nti(s,e,r));return Math.max(...o)}else return(0,Yv.Check)(t,e,r)?1:0}a(Nti,"ScoreUnion");function Ooa(t,e,r){let n=t.anyOf.map(c=>(0,Wxe.Deref)(c,e)),[o,s]=[n[0],0];for(let c of n){let l=Nti(c,e,r);l>s&&(o=c,s=l)}return o}a(Ooa,"SelectUnion");function Boa(t,e,r){if("default"in t)return typeof r=="function"?t.default:(0,dK.Clone)(t.default);{let n=Ooa(t,e,r);return Oti(n,e,r)}}a(Boa,"CastUnion");function Loa(t,e,r){return(0,Yv.Check)(t,e,r)?(0,dK.Clone)(r):(0,FU.Create)(t,e)}a(Loa,"DefaultClone");function Foa(t,e,r){return(0,Yv.Check)(t,e,r)?r:(0,FU.Create)(t,e)}a(Foa,"Default");function Uoa(t,e,r){if((0,Yv.Check)(t,e,r))return(0,dK.Clone)(r);let n=(0,KS.IsArray)(r)?(0,dK.Clone)(r):(0,FU.Create)(t,e),o=(0,KS.IsNumber)(t.minItems)&&n.lengthnull)]:n,c=((0,KS.IsNumber)(t.maxItems)&&o.length>t.maxItems?o.slice(0,t.maxItems):o).map(u=>RR(t.items,e,u));if(t.uniqueItems!==!0)return c;let l=[...new Set(c)];if(!(0,Yv.Check)(t,e,l))throw new Vxe(t,"Array cast produced invalid data due to uniqueItems constraint");return l}a(Uoa,"FromArray");function Qoa(t,e,r){if((0,Yv.Check)(t,e,r))return(0,FU.Create)(t,e);let n=new Set(t.returns.required||[]),o=a(function(){},"result");for(let[s,c]of Object.entries(t.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(o.prototype[s]=RR(c,e,r.prototype[s]));return o}a(Qoa,"FromConstructor");function qoa(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return RR(o,[...e,...n],r)}a(qoa,"FromImport");function Mti(t,e){return(0,KS.IsObject)(t)&&!(0,KS.IsObject)(e)||!(0,KS.IsObject)(t)&&(0,KS.IsObject)(e)?t:!(0,KS.IsObject)(t)||!(0,KS.IsObject)(e)?e:globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>{let o=n in e?Mti(t[n],e[n]):t[n];return{...r,[n]:o}},{})}a(Mti,"IntersectAssign");function Goa(t,e,r){if((0,Yv.Check)(t,e,r))return r;let n=(0,FU.Create)(t,e),o=Mti(n,r);return(0,Yv.Check)(t,e,o)?o:n}a(Goa,"FromIntersect");function Hoa(t,e,r){throw new Vxe(t,"Never types cannot be cast")}a(Hoa,"FromNever");function joa(t,e,r){if((0,Yv.Check)(t,e,r))return r;if(r===null||typeof r!="object")return(0,FU.Create)(t,e);let n=new Set(t.required||[]),o={};for(let[s,c]of Object.entries(t.properties))!n.has(s)&&r[s]===void 0||(o[s]=RR(c,e,r[s]));if(typeof t.additionalProperties=="object"){let s=Object.getOwnPropertyNames(t.properties);for(let c of Object.getOwnPropertyNames(r))s.includes(c)||(o[c]=RR(t.additionalProperties,e,r[c]))}return o}a(joa,"FromObject");function $oa(t,e,r){if((0,Yv.Check)(t,e,r))return(0,dK.Clone)(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return(0,FU.Create)(t,e);let n=Object.getOwnPropertyNames(t.patternProperties)[0],o=t.patternProperties[n],s={};for(let[c,l]of Object.entries(r))s[c]=RR(o,e,l);return s}a($oa,"FromRecord");function Voa(t,e,r){return RR((0,Wxe.Deref)(t,e),e,r)}a(Voa,"FromRef");function Woa(t,e,r){return RR((0,Wxe.Deref)(t,e),e,r)}a(Woa,"FromThis");function zoa(t,e,r){return(0,Yv.Check)(t,e,r)?(0,dK.Clone)(r):(0,KS.IsArray)(r)?t.items===void 0?[]:t.items.map((n,o)=>RR(n,e,r[o])):(0,FU.Create)(t,e)}a(zoa,"FromTuple");function Yoa(t,e,r){return(0,Yv.Check)(t,e,r)?(0,dK.Clone)(r):Boa(t,e,r)}a(Yoa,"FromUnion");function RR(t,e,r){let n=(0,KS.IsString)(t.$id)?(0,Wxe.Pushref)(t,e):e,o=t;switch(t[Xot.Kind]){case"Array":return Uoa(o,n,r);case"Constructor":return Qoa(o,n,r);case"Import":return qoa(o,n,r);case"Intersect":return Goa(o,n,r);case"Never":return Hoa(o,n,r);case"Object":return joa(o,n,r);case"Record":return $oa(o,n,r);case"Ref":return Voa(o,n,r);case"This":return Woa(o,n,r);case"Tuple":return zoa(o,n,r);case"Union":return Yoa(o,n,r);case"Date":case"Symbol":case"Uint8Array":return Loa(t,e,r);default:return Foa(o,n,r)}}a(RR,"Visit");function Oti(...t){return t.length===3?RR(t[0],t[1],t[2]):RR(t[0],[],t[1])}a(Oti,"Cast")});var Zot=T(fK=>{"use strict";f();var Koa=fK&&fK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Joa=fK&&fK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Koa(e,t,r)};Object.defineProperty(fK,"__esModule",{value:!0});Joa(Bti(),fK)});var Fti=T(Ylr=>{"use strict";f();Object.defineProperty(Ylr,"__esModule",{value:!0});Ylr.Clean=usa;var Xoa=eR(),est=Wv(),Zoa=wR(),zlr=IR(),Lti=nn(),PR=Rp(),tst=Do();function esa(t){return(0,tst.IsKind)(t)&&t[Lti.Kind]!=="Unsafe"}a(esa,"IsCheckable");function tsa(t,e,r){return(0,PR.IsArray)(r)?r.map(n=>hC(t.items,e,n)):r}a(tsa,"FromArray");function rsa(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return hC(o,[...e,...n],r)}a(rsa,"FromImport");function nsa(t,e,r){let n=t.unevaluatedProperties,s=t.allOf.map(l=>hC(l,e,(0,Zoa.Clone)(r))).reduce((l,u)=>(0,PR.IsObject)(u)?{...l,...u}:u,{});if(!(0,PR.IsObject)(r)||!(0,PR.IsObject)(s)||!(0,tst.IsKind)(n))return s;let c=(0,Xoa.KeyOfPropertyKeys)(t);for(let l of Object.getOwnPropertyNames(r))c.includes(l)||(0,est.Check)(n,e,r[l])&&(s[l]=hC(n,e,r[l]));return s}a(nsa,"FromIntersect");function isa(t,e,r){if(!(0,PR.IsObject)(r)||(0,PR.IsArray)(r))return r;let n=t.additionalProperties;for(let o of Object.getOwnPropertyNames(r)){if((0,PR.HasPropertyKey)(t.properties,o)){r[o]=hC(t.properties[o],e,r[o]);continue}if((0,tst.IsKind)(n)&&(0,est.Check)(n,e,r[o])){r[o]=hC(n,e,r[o]);continue}delete r[o]}return r}a(isa,"FromObject");function osa(t,e,r){if(!(0,PR.IsObject)(r))return r;let n=t.additionalProperties,o=Object.getOwnPropertyNames(r),[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of o){if(l.test(u)){r[u]=hC(c,e,r[u]);continue}if((0,tst.IsKind)(n)&&(0,est.Check)(n,e,r[u])){r[u]=hC(n,e,r[u]);continue}delete r[u]}return r}a(osa,"FromRecord");function ssa(t,e,r){return hC((0,zlr.Deref)(t,e),e,r)}a(ssa,"FromRef");function asa(t,e,r){return hC((0,zlr.Deref)(t,e),e,r)}a(asa,"FromThis");function csa(t,e,r){if(!(0,PR.IsArray)(r))return r;if((0,PR.IsUndefined)(t.items))return[];let n=Math.min(r.length,t.items.length);for(let o=0;on?r.slice(0,n):r}a(csa,"FromTuple");function lsa(t,e,r){for(let n of t.anyOf)if(esa(n)&&(0,est.Check)(n,e,r))return hC(n,e,r);return r}a(lsa,"FromUnion");function hC(t,e,r){let n=(0,PR.IsString)(t.$id)?(0,zlr.Pushref)(t,e):e,o=t;switch(o[Lti.Kind]){case"Array":return tsa(o,n,r);case"Import":return rsa(o,n,r);case"Intersect":return nsa(o,n,r);case"Object":return isa(o,n,r);case"Record":return osa(o,n,r);case"Ref":return ssa(o,n,r);case"This":return asa(o,n,r);case"Tuple":return csa(o,n,r);case"Union":return lsa(o,n,r);default:return r}}a(hC,"Visit");function usa(...t){return t.length===3?hC(t[0],t[1],t[2]):hC(t[0],[],t[1])}a(usa,"Clean")});var rst=T(pK=>{"use strict";f();var dsa=pK&&pK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fsa=pK&&pK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dsa(e,t,r)};Object.defineProperty(pK,"__esModule",{value:!0});fsa(Fti(),pK)});var Hti=T(Jlr=>{"use strict";f();Object.defineProperty(Jlr,"__esModule",{value:!0});Jlr.Convert=Ysa;var psa=wR(),Uti=Wv(),Klr=IR(),hsa=nn(),Hs=Rp();function nst(t){return(0,Hs.IsString)(t)&&!isNaN(t)&&!isNaN(parseFloat(t))}a(nst,"IsStringNumeric");function msa(t){return(0,Hs.IsBigInt)(t)||(0,Hs.IsBoolean)(t)||(0,Hs.IsNumber)(t)}a(msa,"IsValueToString");function Yxe(t){return t===!0||(0,Hs.IsNumber)(t)&&t===1||(0,Hs.IsBigInt)(t)&&t===BigInt("1")||(0,Hs.IsString)(t)&&(t.toLowerCase()==="true"||t==="1")}a(Yxe,"IsValueTrue");function Kxe(t){return t===!1||(0,Hs.IsNumber)(t)&&(t===0||Object.is(t,-0))||(0,Hs.IsBigInt)(t)&&t===BigInt("0")||(0,Hs.IsString)(t)&&(t.toLowerCase()==="false"||t==="0"||t==="-0")}a(Kxe,"IsValueFalse");function gsa(t){return(0,Hs.IsString)(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(gsa,"IsTimeStringWithTimeZone");function Asa(t){return(0,Hs.IsString)(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(Asa,"IsTimeStringWithoutTimeZone");function ysa(t){return(0,Hs.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(ysa,"IsDateTimeStringWithTimeZone");function Esa(t){return(0,Hs.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(Esa,"IsDateTimeStringWithoutTimeZone");function _sa(t){return(0,Hs.IsString)(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(t)}a(_sa,"IsDateString");function Csa(t,e){let r=qti(t);return r===e?r:t}a(Csa,"TryConvertLiteralString");function vsa(t,e){let r=Gti(t);return r===e?r:t}a(vsa,"TryConvertLiteralNumber");function bsa(t,e){let r=Qti(t);return r===e?r:t}a(bsa,"TryConvertLiteralBoolean");function Tsa(t,e){return(0,Hs.IsString)(t.const)?Csa(e,t.const):(0,Hs.IsNumber)(t.const)?vsa(e,t.const):(0,Hs.IsBoolean)(t.const)?bsa(e,t.const):e}a(Tsa,"TryConvertLiteral");function Qti(t){return Yxe(t)?!0:Kxe(t)?!1:t}a(Qti,"TryConvertBoolean");function Ssa(t){let e=a(r=>r.split(".")[0],"truncateInteger");return nst(t)?BigInt(e(t)):(0,Hs.IsNumber)(t)?BigInt(Math.trunc(t)):Kxe(t)?BigInt(0):Yxe(t)?BigInt(1):t}a(Ssa,"TryConvertBigInt");function qti(t){return(0,Hs.IsSymbol)(t)&&t.description!==void 0?t.description.toString():msa(t)?t.toString():t}a(qti,"TryConvertString");function Gti(t){return nst(t)?parseFloat(t):Yxe(t)?1:Kxe(t)?0:t}a(Gti,"TryConvertNumber");function Isa(t){return nst(t)?parseInt(t):(0,Hs.IsNumber)(t)?Math.trunc(t):Yxe(t)?1:Kxe(t)?0:t}a(Isa,"TryConvertInteger");function xsa(t){return(0,Hs.IsString)(t)&&t.toLowerCase()==="null"?null:t}a(xsa,"TryConvertNull");function wsa(t){return(0,Hs.IsString)(t)&&t==="undefined"?void 0:t}a(wsa,"TryConvertUndefined");function Rsa(t){return(0,Hs.IsDate)(t)?t:(0,Hs.IsNumber)(t)?new Date(t):Yxe(t)?new Date(1):Kxe(t)?new Date(0):nst(t)?new Date(parseInt(t)):Asa(t)?new Date(`1970-01-01T${t}.000Z`):gsa(t)?new Date(`1970-01-01T${t}`):Esa(t)?new Date(`${t}.000Z`):ysa(t)?new Date(t):_sa(t)?new Date(`${t}T00:00:00.000Z`):t}a(Rsa,"TryConvertDate");function Psa(t,e,r){return((0,Hs.IsArray)(r)?r:[r]).map(o=>kR(t.items,e,o))}a(Psa,"FromArray");function ksa(t,e,r){return Ssa(r)}a(ksa,"FromBigInt");function Dsa(t,e,r){return Qti(r)}a(Dsa,"FromBoolean");function Nsa(t,e,r){return Rsa(r)}a(Nsa,"FromDate");function Msa(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return kR(o,[...e,...n],r)}a(Msa,"FromImport");function Osa(t,e,r){return Isa(r)}a(Osa,"FromInteger");function Bsa(t,e,r){return t.allOf.reduce((n,o)=>kR(o,e,n),r)}a(Bsa,"FromIntersect");function Lsa(t,e,r){return Tsa(t,r)}a(Lsa,"FromLiteral");function Fsa(t,e,r){return xsa(r)}a(Fsa,"FromNull");function Usa(t,e,r){return Gti(r)}a(Usa,"FromNumber");function Qsa(t,e,r){if(!(0,Hs.IsObject)(r)||(0,Hs.IsArray)(r))return r;for(let n of Object.getOwnPropertyNames(t.properties))(0,Hs.HasPropertyKey)(r,n)&&(r[n]=kR(t.properties[n],e,r[n]));return r}a(Qsa,"FromObject");function qsa(t,e,r){if(!((0,Hs.IsObject)(r)&&!(0,Hs.IsArray)(r)))return r;let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=t.patternProperties[o];for(let[c,l]of Object.entries(r))r[c]=kR(s,e,l);return r}a(qsa,"FromRecord");function Gsa(t,e,r){return kR((0,Klr.Deref)(t,e),e,r)}a(Gsa,"FromRef");function Hsa(t,e,r){return qti(r)}a(Hsa,"FromString");function jsa(t,e,r){return(0,Hs.IsString)(r)||(0,Hs.IsNumber)(r)?Symbol(r):r}a(jsa,"FromSymbol");function $sa(t,e,r){return kR((0,Klr.Deref)(t,e),e,r)}a($sa,"FromThis");function Vsa(t,e,r){return(0,Hs.IsArray)(r)&&!(0,Hs.IsUndefined)(t.items)?r.map((o,s)=>s{"use strict";f();var Ksa=hK&&hK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Jsa=hK&&hK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ksa(e,t,r)};Object.defineProperty(hK,"__esModule",{value:!0});Jsa(Hti(),hK)});var Wti=T(mK=>{"use strict";f();Object.defineProperty(mK,"__esModule",{value:!0});mK.TransformDecodeError=mK.TransformDecodeCheckError=void 0;mK.TransformDecode=uaa;var Xsa=mIe(),jti=nn(),$ti=sd(),Vti=eR(),Zlr=IR(),Zsa=Wv(),MB=Rp(),Jxe=Do(),Xlr=class extends $ti.TypeBoxError{static{a(this,"TransformDecodeCheckError")}constructor(e,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=e,this.value=r,this.error=n}};mK.TransformDecodeCheckError=Xlr;var ost=class extends $ti.TypeBoxError{static{a(this,"TransformDecodeError")}constructor(e,r,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=e,this.path=r,this.value=n,this.error=o}};mK.TransformDecodeError=ost;function Pu(t,e,r){try{return(0,Jxe.IsTransform)(t)?t[jti.TransformKind].Decode(r):r}catch(n){throw new ost(t,e,r,n)}}a(Pu,"Default");function eaa(t,e,r,n){return(0,MB.IsArray)(n)?Pu(t,r,n.map((o,s)=>DR(t.items,e,`${r}/${s}`,o))):Pu(t,r,n)}a(eaa,"FromArray");function taa(t,e,r,n){if(!(0,MB.IsObject)(n)||(0,MB.IsValueType)(n))return Pu(t,r,n);let o=(0,Vti.KeyOfPropertyEntries)(t),s=o.map(p=>p[0]),c={...n};for(let[p,h]of o)p in c&&(c[p]=DR(h,e,`${r}/${p}`,c[p]));if(!(0,Jxe.IsTransform)(t.unevaluatedProperties))return Pu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.unevaluatedProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=Pu(u,`${r}/${p}`,d[p]));return Pu(t,r,d)}a(taa,"FromIntersect");function raa(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=DR(s,[...e,...o],r,n);return Pu(t,r,c)}a(raa,"FromImport");function naa(t,e,r,n){return Pu(t,r,DR(t.not,e,r,n))}a(naa,"FromNot");function iaa(t,e,r,n){if(!(0,MB.IsObject)(n))return Pu(t,r,n);let o=(0,Vti.KeyOfPropertyKeys)(t),s={...n};for(let d of o)(0,MB.HasPropertyKey)(s,d)&&((0,MB.IsUndefined)(s[d])&&(!(0,Jxe.IsUndefined)(t.properties[d])||Xsa.TypeSystemPolicy.IsExactOptionalProperty(s,d))||(s[d]=DR(t.properties[d],e,`${r}/${d}`,s[d])));if(!(0,Jxe.IsSchema)(t.additionalProperties))return Pu(t,r,s);let c=Object.getOwnPropertyNames(s),l=t.additionalProperties,u={...s};for(let d of c)o.includes(d)||(u[d]=Pu(l,`${r}/${d}`,u[d]));return Pu(t,r,u)}a(iaa,"FromObject");function oaa(t,e,r,n){if(!(0,MB.IsObject)(n))return Pu(t,r,n);let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=new RegExp(o),c={...n};for(let p of Object.getOwnPropertyNames(n))s.test(p)&&(c[p]=DR(t.patternProperties[o],e,`${r}/${p}`,c[p]));if(!(0,Jxe.IsSchema)(t.additionalProperties))return Pu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.test(p)||(d[p]=Pu(u,`${r}/${p}`,d[p]));return Pu(t,r,d)}a(oaa,"FromRecord");function saa(t,e,r,n){let o=(0,Zlr.Deref)(t,e);return Pu(t,r,DR(o,e,r,n))}a(saa,"FromRef");function aaa(t,e,r,n){let o=(0,Zlr.Deref)(t,e);return Pu(t,r,DR(o,e,r,n))}a(aaa,"FromThis");function caa(t,e,r,n){return(0,MB.IsArray)(n)&&(0,MB.IsArray)(t.items)?Pu(t,r,t.items.map((o,s)=>DR(o,e,`${r}/${s}`,n[s]))):Pu(t,r,n)}a(caa,"FromTuple");function laa(t,e,r,n){for(let o of t.anyOf){if(!(0,Zsa.Check)(o,e,n))continue;let s=DR(o,e,r,n);return Pu(t,r,s)}return Pu(t,r,n)}a(laa,"FromUnion");function DR(t,e,r,n){let o=(0,Zlr.Pushref)(t,e),s=t;switch(t[jti.Kind]){case"Array":return eaa(s,o,r,n);case"Import":return raa(s,o,r,n);case"Intersect":return taa(s,o,r,n);case"Not":return naa(s,o,r,n);case"Object":return iaa(s,o,r,n);case"Record":return oaa(s,o,r,n);case"Ref":return saa(s,o,r,n);case"Symbol":return Pu(s,r,n);case"This":return aaa(s,o,r,n);case"Tuple":return caa(s,o,r,n);case"Union":return laa(s,o,r,n);default:return Pu(s,r,n)}}a(DR,"Visit");function uaa(t,e,r){return DR(t,e,"",r)}a(uaa,"TransformDecode")});var Xti=T(gK=>{"use strict";f();Object.defineProperty(gK,"__esModule",{value:!0});gK.TransformEncodeError=gK.TransformEncodeCheckError=void 0;gK.TransformEncode=vaa;var daa=mIe(),Yti=nn(),Kti=sd(),Jti=eR(),tur=IR(),zti=Wv(),UU=Rp(),Xxe=Do(),eur=class extends Kti.TypeBoxError{static{a(this,"TransformEncodeCheckError")}constructor(e,r,n){super("The encoded value does not match the expected schema"),this.schema=e,this.value=r,this.error=n}};gK.TransformEncodeCheckError=eur;var sst=class extends Kti.TypeBoxError{static{a(this,"TransformEncodeError")}constructor(e,r,n,o){super(`${o instanceof Error?o.message:"Unknown error"}`),this.schema=e,this.path=r,this.value=n,this.error=o}};gK.TransformEncodeError=sst;function Vm(t,e,r){try{return(0,Xxe.IsTransform)(t)?t[Yti.TransformKind].Encode(r):r}catch(n){throw new sst(t,e,r,n)}}a(Vm,"Default");function faa(t,e,r,n){let o=Vm(t,r,n);return(0,UU.IsArray)(o)?o.map((s,c)=>NR(t.items,e,`${r}/${c}`,s)):o}a(faa,"FromArray");function paa(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=Vm(t,r,n);return NR(s,[...e,...o],r,c)}a(paa,"FromImport");function haa(t,e,r,n){let o=Vm(t,r,n);if(!(0,UU.IsObject)(n)||(0,UU.IsValueType)(n))return o;let s=(0,Jti.KeyOfPropertyEntries)(t),c=s.map(h=>h[0]),l={...o};for(let[h,m]of s)h in l&&(l[h]=NR(m,e,`${r}/${h}`,l[h]));if(!(0,Xxe.IsTransform)(t.unevaluatedProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.unevaluatedProperties,p={...l};for(let h of u)c.includes(h)||(p[h]=Vm(d,`${r}/${h}`,p[h]));return p}a(haa,"FromIntersect");function maa(t,e,r,n){return Vm(t.not,r,Vm(t,r,n))}a(maa,"FromNot");function gaa(t,e,r,n){let o=Vm(t,r,n);if(!(0,UU.IsObject)(o))return o;let s=(0,Jti.KeyOfPropertyKeys)(t),c={...o};for(let p of s)(0,UU.HasPropertyKey)(c,p)&&((0,UU.IsUndefined)(c[p])&&(!(0,Xxe.IsUndefined)(t.properties[p])||daa.TypeSystemPolicy.IsExactOptionalProperty(c,p))||(c[p]=NR(t.properties[p],e,`${r}/${p}`,c[p])));if(!(0,Xxe.IsSchema)(t.additionalProperties))return c;let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=Vm(u,`${r}/${p}`,d[p]));return d}a(gaa,"FromObject");function Aaa(t,e,r,n){let o=Vm(t,r,n);if(!(0,UU.IsObject)(n))return o;let s=Object.getOwnPropertyNames(t.patternProperties)[0],c=new RegExp(s),l={...o};for(let h of Object.getOwnPropertyNames(n))c.test(h)&&(l[h]=NR(t.patternProperties[s],e,`${r}/${h}`,l[h]));if(!(0,Xxe.IsSchema)(t.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.additionalProperties,p={...l};for(let h of u)c.test(h)||(p[h]=Vm(d,`${r}/${h}`,p[h]));return p}a(Aaa,"FromRecord");function yaa(t,e,r,n){let o=(0,tur.Deref)(t,e),s=NR(o,e,r,n);return Vm(t,r,s)}a(yaa,"FromRef");function Eaa(t,e,r,n){let o=(0,tur.Deref)(t,e),s=NR(o,e,r,n);return Vm(t,r,s)}a(Eaa,"FromThis");function _aa(t,e,r,n){let o=Vm(t,r,n);return(0,UU.IsArray)(t.items)?t.items.map((s,c)=>NR(s,e,`${r}/${c}`,o[c])):[]}a(_aa,"FromTuple");function Caa(t,e,r,n){for(let o of t.anyOf){if(!(0,zti.Check)(o,e,n))continue;let s=NR(o,e,r,n);return Vm(t,r,s)}for(let o of t.anyOf){let s=NR(o,e,r,n);if((0,zti.Check)(t,e,s))return Vm(t,r,s)}return Vm(t,r,n)}a(Caa,"FromUnion");function NR(t,e,r,n){let o=(0,tur.Pushref)(t,e),s=t;switch(t[Yti.Kind]){case"Array":return faa(s,o,r,n);case"Import":return paa(s,o,r,n);case"Intersect":return haa(s,o,r,n);case"Not":return maa(s,o,r,n);case"Object":return gaa(s,o,r,n);case"Record":return Aaa(s,o,r,n);case"Ref":return yaa(s,o,r,n);case"This":return Eaa(s,o,r,n);case"Tuple":return _aa(s,o,r,n);case"Union":return Caa(s,o,r,n);default:return Vm(s,r,n)}}a(NR,"Visit");function vaa(t,e,r){return NR(t,e,"",r)}a(vaa,"TransformEncode")});var Zti=T(iur=>{"use strict";f();Object.defineProperty(iur,"__esModule",{value:!0});iur.HasTransform=Qaa;var nur=IR(),baa=nn(),U0=Do(),Taa=Rp();function Saa(t,e){return(0,U0.IsTransform)(t)||Dp(t.items,e)}a(Saa,"FromArray");function Iaa(t,e){return(0,U0.IsTransform)(t)||Dp(t.items,e)}a(Iaa,"FromAsyncIterator");function xaa(t,e){return(0,U0.IsTransform)(t)||Dp(t.returns,e)||t.parameters.some(r=>Dp(r,e))}a(xaa,"FromConstructor");function waa(t,e){return(0,U0.IsTransform)(t)||Dp(t.returns,e)||t.parameters.some(r=>Dp(r,e))}a(waa,"FromFunction");function Raa(t,e){return(0,U0.IsTransform)(t)||(0,U0.IsTransform)(t.unevaluatedProperties)||t.allOf.some(r=>Dp(r,e))}a(Raa,"FromIntersect");function Paa(t,e){let r=globalThis.Object.getOwnPropertyNames(t.$defs).reduce((o,s)=>[...o,t.$defs[s]],[]),n=t.$defs[t.$ref];return(0,U0.IsTransform)(t)||Dp(n,[...r,...e])}a(Paa,"FromImport");function kaa(t,e){return(0,U0.IsTransform)(t)||Dp(t.items,e)}a(kaa,"FromIterator");function Daa(t,e){return(0,U0.IsTransform)(t)||Dp(t.not,e)}a(Daa,"FromNot");function Naa(t,e){return(0,U0.IsTransform)(t)||Object.values(t.properties).some(r=>Dp(r,e))||(0,U0.IsSchema)(t.additionalProperties)&&Dp(t.additionalProperties,e)}a(Naa,"FromObject");function Maa(t,e){return(0,U0.IsTransform)(t)||Dp(t.item,e)}a(Maa,"FromPromise");function Oaa(t,e){let r=Object.getOwnPropertyNames(t.patternProperties)[0],n=t.patternProperties[r];return(0,U0.IsTransform)(t)||Dp(n,e)||(0,U0.IsSchema)(t.additionalProperties)&&(0,U0.IsTransform)(t.additionalProperties)}a(Oaa,"FromRecord");function Baa(t,e){return(0,U0.IsTransform)(t)?!0:Dp((0,nur.Deref)(t,e),e)}a(Baa,"FromRef");function Laa(t,e){return(0,U0.IsTransform)(t)?!0:Dp((0,nur.Deref)(t,e),e)}a(Laa,"FromThis");function Faa(t,e){return(0,U0.IsTransform)(t)||!(0,Taa.IsUndefined)(t.items)&&t.items.some(r=>Dp(r,e))}a(Faa,"FromTuple");function Uaa(t,e){return(0,U0.IsTransform)(t)||t.anyOf.some(r=>Dp(r,e))}a(Uaa,"FromUnion");function Dp(t,e){let r=(0,nur.Pushref)(t,e),n=t;if(t.$id&&rur.has(t.$id))return!1;switch(t.$id&&rur.add(t.$id),t[baa.Kind]){case"Array":return Saa(n,r);case"AsyncIterator":return Iaa(n,r);case"Constructor":return xaa(n,r);case"Function":return waa(n,r);case"Import":return Paa(n,r);case"Intersect":return Raa(n,r);case"Iterator":return kaa(n,r);case"Not":return Daa(n,r);case"Object":return Naa(n,r);case"Promise":return Maa(n,r);case"Record":return Oaa(n,r);case"Ref":return Baa(n,r);case"This":return Laa(n,r);case"Tuple":return Faa(n,r);case"Union":return Uaa(n,r);default:return(0,U0.IsTransform)(t)}}a(Dp,"Visit");var rur=new Set;function Qaa(t,e){return rur.clear(),Dp(t,e)}a(Qaa,"HasTransform")});var Zxe=T(OB=>{"use strict";f();var qaa=OB&&OB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),our=OB&&OB.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qaa(e,t,r)};Object.defineProperty(OB,"__esModule",{value:!0});our(Wti(),OB);our(Xti(),OB);our(Zti(),OB)});var eri=T(aur=>{"use strict";f();Object.defineProperty(aur,"__esModule",{value:!0});aur.Decode=jaa;var sur=Zxe(),Gaa=Wv(),Haa=Nue();function jaa(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]];if(!(0,Gaa.Check)(e,r,n))throw new sur.TransformDecodeCheckError(e,n,(0,Haa.Errors)(e,r,n).First());return(0,sur.HasTransform)(e,r)?(0,sur.TransformDecode)(e,r,n):n}a(jaa,"Decode")});var cur=T(AK=>{"use strict";f();var $aa=AK&&AK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Vaa=AK&&AK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$aa(e,t,r)};Object.defineProperty(AK,"__esModule",{value:!0});Vaa(eri(),AK)});var rri=T(dur=>{"use strict";f();Object.defineProperty(dur,"__esModule",{value:!0});dur.Default=sca;var Waa=Wv(),tri=wR(),uur=IR(),zaa=nn(),mC=Rp(),Yaa=Do();function BB(t,e){let r=(0,mC.HasPropertyKey)(t,"default")?t.default:void 0,n=(0,mC.IsFunction)(r)?r():(0,tri.Clone)(r);return(0,mC.IsUndefined)(e)?n:(0,mC.IsObject)(e)&&(0,mC.IsObject)(n)?Object.assign(n,e):e}a(BB,"ValueOrDefault");function lur(t){return(0,Yaa.IsKind)(t)&&"default"in t}a(lur,"HasDefaultProperty");function Kaa(t,e,r){if((0,mC.IsArray)(r)){for(let o=0;o{let c=Hy(s,e,n);return(0,mC.IsObject)(c)?{...o,...c}:c},{})}a(Zaa,"FromIntersect");function eca(t,e,r){let n=BB(t,r);if(!(0,mC.IsObject)(n))return n;let o=Object.getOwnPropertyNames(t.properties);for(let s of o){let c=Hy(t.properties[s],e,n[s]);(0,mC.IsUndefined)(c)||(n[s]=Hy(t.properties[s],e,n[s]))}if(!lur(t.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))o.includes(s)||(n[s]=Hy(t.additionalProperties,e,n[s]));return n}a(eca,"FromObject");function tca(t,e,r){let n=BB(t,r);if(!(0,mC.IsObject)(n))return n;let o=t.additionalProperties,[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of Object.getOwnPropertyNames(n))l.test(u)&&lur(c)&&(n[u]=Hy(c,e,n[u]));if(!lur(o))return n;for(let u of Object.getOwnPropertyNames(n))l.test(u)||(n[u]=Hy(o,e,n[u]));return n}a(tca,"FromRecord");function rca(t,e,r){return Hy((0,uur.Deref)(t,e),e,BB(t,r))}a(rca,"FromRef");function nca(t,e,r){return Hy((0,uur.Deref)(t,e),e,r)}a(nca,"FromThis");function ica(t,e,r){let n=BB(t,r);if(!(0,mC.IsArray)(n)||(0,mC.IsUndefined)(t.items))return n;let[o,s]=[t.items,Math.max(t.items.length,n.length)];for(let c=0;c{"use strict";f();var aca=yK&&yK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cca=yK&&yK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&aca(e,t,r)};Object.defineProperty(yK,"__esModule",{value:!0});cca(rri(),yK)});var ori=T(MR=>{"use strict";f();Object.defineProperty(MR,"__esModule",{value:!0});MR.ValuePointerRootDeleteError=MR.ValuePointerRootSetError=void 0;MR.Format=ewe;MR.Set=lca;MR.Delete=uca;MR.Has=dca;MR.Get=fca;var iri=sd(),cst=class extends iri.TypeBoxError{static{a(this,"ValuePointerRootSetError")}constructor(e,r,n){super("Cannot set root value"),this.value=e,this.path=r,this.update=n}};MR.ValuePointerRootSetError=cst;var lst=class extends iri.TypeBoxError{static{a(this,"ValuePointerRootDeleteError")}constructor(e,r){super("Cannot delete root value"),this.value=e,this.path=r}};MR.ValuePointerRootDeleteError=lst;function nri(t){return t.indexOf("~")===-1?t:t.replace(/~1/g,"/").replace(/~0/g,"~")}a(nri,"Escape");function*ewe(t){if(t==="")return;let[e,r]=[0,0];for(let n=0;n{"use strict";f();var pca=DD&&DD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hca=DD&&DD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mca=DD&&DD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(fur,"__esModule",{value:!0});fur.Equal=dst;var LB=Rp();function gca(t,e){if(!(0,LB.IsObject)(e))return!1;let r=[...Object.keys(t),...Object.getOwnPropertySymbols(t)],n=[...Object.keys(e),...Object.getOwnPropertySymbols(e)];return r.length!==n.length?!1:r.every(o=>dst(t[o],e[o]))}a(gca,"ObjectType");function Aca(t,e){return(0,LB.IsDate)(e)&&t.getTime()===e.getTime()}a(Aca,"DateType");function yca(t,e){return!(0,LB.IsArray)(e)||t.length!==e.length?!1:t.every((r,n)=>dst(r,e[n]))}a(yca,"ArrayType");function Eca(t,e){return!(0,LB.IsTypedArray)(e)||t.length!==e.length||Object.getPrototypeOf(t).constructor.name!==Object.getPrototypeOf(e).constructor.name?!1:t.every((r,n)=>dst(r,e[n]))}a(Eca,"TypedArrayType");function _ca(t,e){return t===e}a(_ca,"ValueType");function dst(t,e){if((0,LB.IsDate)(t))return Aca(t,e);if((0,LB.IsTypedArray)(t))return Eca(t,e);if((0,LB.IsArray)(t))return yca(t,e);if((0,LB.IsObject)(t))return gca(t,e);if((0,LB.IsValueType)(t))return _ca(t,e);throw new Error("ValueEquals: Unable to compare value")}a(dst,"Equal")});var uri=T(Wm=>{"use strict";f();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.ValueDiffError=Wm.Edit=Wm.Delete=Wm.Update=Wm.Insert=void 0;Wm.Diff=wca;Wm.Patch=kca;var ND=Rp(),hur=ust(),mur=wR(),Cca=pur(),vca=sd(),gur=lA(),Aur=My(),yur=K7(),ari=rU(),bca=Vd();Wm.Insert=(0,Aur.Object)({type:(0,gur.Literal)("insert"),path:(0,yur.String)(),value:(0,ari.Unknown)()});Wm.Update=(0,Aur.Object)({type:(0,gur.Literal)("update"),path:(0,yur.String)(),value:(0,ari.Unknown)()});Wm.Delete=(0,Aur.Object)({type:(0,gur.Literal)("delete"),path:(0,yur.String)()});Wm.Edit=(0,bca.Union)([Wm.Insert,Wm.Update,Wm.Delete]);var twe=class extends vca.TypeBoxError{static{a(this,"ValueDiffError")}constructor(e,r){super(r),this.value=e}};Wm.ValueDiffError=twe;function fst(t,e){return{type:"update",path:t,value:e}}a(fst,"CreateUpdate");function cri(t,e){return{type:"insert",path:t,value:e}}a(cri,"CreateInsert");function lri(t){return{type:"delete",path:t}}a(lri,"CreateDelete");function sri(t){if(globalThis.Object.getOwnPropertySymbols(t).length>0)throw new twe(t,"Cannot diff objects with symbols")}a(sri,"AssertDiffable");function*Tca(t,e,r){if(sri(e),sri(r),!(0,ND.IsStandardObject)(r))return yield fst(t,r);let n=globalThis.Object.getOwnPropertyNames(e),o=globalThis.Object.getOwnPropertyNames(r);for(let s of o)(0,ND.HasPropertyKey)(e,s)||(yield cri(`${t}/${s}`,r[s]));for(let s of n)(0,ND.HasPropertyKey)(r,s)&&((0,Cca.Equal)(e,r)||(yield*pst(`${t}/${s}`,e[s],r[s])));for(let s of n)(0,ND.HasPropertyKey)(r,s)||(yield lri(`${t}/${s}`))}a(Tca,"ObjectType");function*Sca(t,e,r){if(!(0,ND.IsArray)(r))return yield fst(t,r);for(let n=0;n=0;n--)n0&&t[0].path===""&&t[0].type==="update"}a(Rca,"IsRootUpdate");function Pca(t){return t.length===0}a(Pca,"IsIdentity");function kca(t,e){if(Rca(e))return(0,mur.Clone)(e[0].value);if(Pca(e))return(0,mur.Clone)(t);let r=(0,mur.Clone)(t);for(let n of e)switch(n.type){case"insert":{hur.ValuePointer.Set(r,n.path,n.value);break}case"update":{hur.ValuePointer.Set(r,n.path,n.value);break}case"delete":{hur.ValuePointer.Delete(r,n.path);break}}return r}a(kca,"Patch")});var Eur=T(EK=>{"use strict";f();var Dca=EK&&EK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nca=EK&&EK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Dca(e,t,r)};Object.defineProperty(EK,"__esModule",{value:!0});Nca(uri(),EK)});var dri=T(Cur=>{"use strict";f();Object.defineProperty(Cur,"__esModule",{value:!0});Cur.Encode=Bca;var _ur=Zxe(),Mca=Wv(),Oca=Nue();function Bca(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]],o=(0,_ur.HasTransform)(e,r)?(0,_ur.TransformEncode)(e,r,n):n;if(!(0,Mca.Check)(e,r,o))throw new _ur.TransformEncodeCheckError(e,o,(0,Oca.Errors)(e,r,o).First());return o}a(Bca,"Encode")});var vur=T(_K=>{"use strict";f();var Lca=_K&&_K.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fca=_K&&_K.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Lca(e,t,r)};Object.defineProperty(_K,"__esModule",{value:!0});Fca(dri(),_K)});var bur=T(CK=>{"use strict";f();var Uca=CK&&CK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Qca=CK&&CK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Uca(e,t,r)};Object.defineProperty(CK,"__esModule",{value:!0});Qca(pur(),CK)});var pri=T(nwe=>{"use strict";f();Object.defineProperty(nwe,"__esModule",{value:!0});nwe.ValueMutateError=void 0;nwe.Mutate=Wca;var OR=Rp(),mst=ust(),Tur=wR(),qca=sd();function hst(t){return(0,OR.IsObject)(t)&&!(0,OR.IsArray)(t)}a(hst,"IsStandardObject");var rwe=class extends qca.TypeBoxError{static{a(this,"ValueMutateError")}constructor(e){super(e)}};nwe.ValueMutateError=rwe;function Gca(t,e,r,n){if(!hst(r))mst.ValuePointer.Set(t,e,(0,Tur.Clone)(n));else{let o=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let c of o)s.includes(c)||delete r[c];for(let c of s)o.includes(c)||(r[c]=null);for(let c of s)Sur(t,`${e}/${c}`,r[c],n[c])}}a(Gca,"ObjectType");function Hca(t,e,r,n){if(!(0,OR.IsArray)(r))mst.ValuePointer.Set(t,e,(0,Tur.Clone)(n));else{for(let o=0;o{"use strict";f();var zca=vK&&vK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Yca=vK&&vK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&zca(e,t,r)};Object.defineProperty(vK,"__esModule",{value:!0});Yca(pri(),vK)});var mri=T(BR=>{"use strict";f();Object.defineProperty(BR,"__esModule",{value:!0});BR.ParseDefault=BR.ParseRegistry=BR.ParseError=void 0;BR.Parse=ila;var Kca=sd(),gst=Zxe(),Jca=Kot(),Xca=Zot(),Zca=rst(),ela=wR(),tla=ist(),rla=ast(),hri=Rp(),iwe=class extends Kca.TypeBoxError{static{a(this,"ParseError")}constructor(e){super(e)}};BR.ParseError=iwe;var xur;(function(t){let e=new Map([["Assert",(s,c,l)=>((0,Jca.Assert)(s,c,l),l)],["Cast",(s,c,l)=>(0,Xca.Cast)(s,c,l)],["Clean",(s,c,l)=>(0,Zca.Clean)(s,c,l)],["Clone",(s,c,l)=>(0,ela.Clone)(l)],["Convert",(s,c,l)=>(0,tla.Convert)(s,c,l)],["Decode",(s,c,l)=>(0,gst.HasTransform)(s,c)?(0,gst.TransformDecode)(s,c,l):l],["Default",(s,c,l)=>(0,rla.Default)(s,c,l)],["Encode",(s,c,l)=>(0,gst.HasTransform)(s,c)?(0,gst.TransformEncode)(s,c,l):l]]);function r(s){e.delete(s)}a(r,"Delete"),t.Delete=r;function n(s,c){e.set(s,c)}a(n,"Set"),t.Set=n;function o(s){return e.get(s)}a(o,"Get"),t.Get=o})(xur||(BR.ParseRegistry=xur={}));BR.ParseDefault=["Clone","Clean","Default","Convert","Assert","Decode"];function nla(t,e,r,n){return t.reduce((o,s)=>{let c=xur.Get(s);if((0,hri.IsUndefined)(c))throw new iwe(`Unable to find Parse operation '${s}'`);return c(e,r,o)},n)}a(nla,"ParseValue");function ila(...t){let[e,r,n,o]=t.length===4?[t[0],t[1],t[2],t[3]]:t.length===3?(0,hri.IsArray)(t[0])?[t[0],t[1],[],t[2]]:[BR.ParseDefault,t[0],t[1],t[2]]:t.length===2?[BR.ParseDefault,t[0],[],t[1]]:(()=>{throw new iwe("Invalid Arguments")})();return nla(e,r,n,o)}a(ila,"Parse")});var wur=T(bK=>{"use strict";f();var ola=bK&&bK.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sla=bK&&bK.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ola(e,t,r)};Object.defineProperty(bK,"__esModule",{value:!0});sla(mri(),bK)});var Ari=T(No=>{"use strict";f();Object.defineProperty(No,"__esModule",{value:!0});No.Parse=No.Mutate=No.Hash=No.Equal=No.Encode=No.Edit=No.Patch=No.Diff=No.Default=No.Decode=No.Create=No.Convert=No.Clone=No.Clean=No.Check=No.Cast=No.Assert=No.ValueErrorIterator=No.Errors=void 0;var gri=Nue();Object.defineProperty(No,"Errors",{enumerable:!0,get:a(function(){return gri.Errors},"get")});Object.defineProperty(No,"ValueErrorIterator",{enumerable:!0,get:a(function(){return gri.ValueErrorIterator},"get")});var ala=Kot();Object.defineProperty(No,"Assert",{enumerable:!0,get:a(function(){return ala.Assert},"get")});var cla=Zot();Object.defineProperty(No,"Cast",{enumerable:!0,get:a(function(){return cla.Cast},"get")});var lla=Wv();Object.defineProperty(No,"Check",{enumerable:!0,get:a(function(){return lla.Check},"get")});var ula=rst();Object.defineProperty(No,"Clean",{enumerable:!0,get:a(function(){return ula.Clean},"get")});var dla=wR();Object.defineProperty(No,"Clone",{enumerable:!0,get:a(function(){return dla.Clone},"get")});var fla=ist();Object.defineProperty(No,"Convert",{enumerable:!0,get:a(function(){return fla.Convert},"get")});var pla=Jot();Object.defineProperty(No,"Create",{enumerable:!0,get:a(function(){return pla.Create},"get")});var hla=cur();Object.defineProperty(No,"Decode",{enumerable:!0,get:a(function(){return hla.Decode},"get")});var mla=ast();Object.defineProperty(No,"Default",{enumerable:!0,get:a(function(){return mla.Default},"get")});var Rur=Eur();Object.defineProperty(No,"Diff",{enumerable:!0,get:a(function(){return Rur.Diff},"get")});Object.defineProperty(No,"Patch",{enumerable:!0,get:a(function(){return Rur.Patch},"get")});Object.defineProperty(No,"Edit",{enumerable:!0,get:a(function(){return Rur.Edit},"get")});var gla=vur();Object.defineProperty(No,"Encode",{enumerable:!0,get:a(function(){return gla.Encode},"get")});var Ala=bur();Object.defineProperty(No,"Equal",{enumerable:!0,get:a(function(){return Ala.Equal},"get")});var yla=Uxe();Object.defineProperty(No,"Hash",{enumerable:!0,get:a(function(){return yla.Hash},"get")});var Ela=Iur();Object.defineProperty(No,"Mutate",{enumerable:!0,get:a(function(){return Ela.Mutate},"get")});var _la=wur();Object.defineProperty(No,"Parse",{enumerable:!0,get:a(function(){return _la.Parse},"get")})});var yri=T(MD=>{"use strict";f();var Cla=MD&&MD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vla=MD&&MD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bla=MD&&MD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();var Tla=Ha&&Ha.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Qh=Ha&&Ha.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tla(e,t,r)};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.Value=Ha.ValueErrorIterator=Ha.ValueErrorType=void 0;var Eri=Nue();Object.defineProperty(Ha,"ValueErrorType",{enumerable:!0,get:a(function(){return Eri.ValueErrorType},"get")});Object.defineProperty(Ha,"ValueErrorIterator",{enumerable:!0,get:a(function(){return Eri.ValueErrorIterator},"get")});Qh(Rp(),Ha);Qh(Kot(),Ha);Qh(Zot(),Ha);Qh(Wv(),Ha);Qh(rst(),Ha);Qh(wR(),Ha);Qh(ist(),Ha);Qh(Jot(),Ha);Qh(cur(),Ha);Qh(ast(),Ha);Qh(Eur(),Ha);Qh(vur(),Ha);Qh(bur(),Ha);Qh(Uxe(),Ha);Qh(Iur(),Ha);Qh(wur(),Ha);Qh(ust(),Ha);Qh(Zxe(),Ha);var Sla=yri();Object.defineProperty(Ha,"Value",{enumerable:!0,get:a(function(){return Sla.Value},"get")})});var Cri=T(Ast=>{"use strict";f();Object.defineProperty(Ast,"__esModule",{value:!0});Ast.assertShape=void 0;var _ri=Pur(),Ila=a((t,e)=>{if(_ri.Value.Check(t,e))return e;let r=`Typebox schema validation failed: +${[..._ri.Value.Errors(t,e)].map(n=>`${n.path} ${n.message}`).join(` +`)}`;throw new Error(r)},"assertShape");Ast.assertShape=Ila});var Oue={};ui(Oue,{CAPIClient:()=>Dla,RequestType:()=>bri});async function Pla(t){if(!t)return;let e=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),r=Math.floor(Date.now()/1e3).toString(),n=new TextEncoder().encode(r),o=await crypto.subtle.sign("HMAC",e,n),s=Array.from(new Uint8Array(o)).map(c=>c.toString(16).padStart(2,"0")).join("");return`${r}.${s}`}function kla(t){return new Set(["ChatCompletions","ChatResponses","ChatMessages","CAPIEmbeddings","Models","RemoteAgent","CodeReviewAgent","RemoteAgentChat","ListSkills","SearchSkill","ModelPolicy","ListModel","AutoModels","CopilotSessionLogs","CopilotSessionDetails","CopilotSessions","CopilotAgentJob","CCAModelsList","CopilotCustomAgents","CopilotAgentMemory","ModelRouter"]).has(t)}var xla,kur,owe,wla,Rla,bri,Dla,Bue=Pe(()=>{f();xla=class{static{a(this,"g")}async fetch(t,e){let r={method:e.method||"GET",headers:e.headers,signal:e.signal};e.json?(r.body=JSON.stringify(e.json),r.headers={"Content-Type":"application/json",...r.headers}):e.body&&(r.body=e.body);let n,o;e.timeout&&!e.signal&&(o=new AbortController,r.signal=o.signal,n=setTimeout(()=>{o.abort()},e.timeout));try{let s=await fetch(t,r);return n&&clearTimeout(n),s}catch(s){throw n&&clearTimeout(n),s}}async fetchWithPagination(t,e){let r=[],n=e.pageSize??20,o=e.startPage??1,s=!1;do{let c=e.buildUrl(t,n,o),l=await this.fetch(c,e);if(!l.ok)return r;let u=await l.json(),d=e.getItemsFromResponse(u);r.push(...d),s=d.length===n,o++}while(s);return r}createWebSocket(t,e){return{webSocket:new WebSocket(t)}}},kur=class vri{static{a(this,"d")}constructor(){this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com",this._originTrackerUrl="https://origin-tracker.githubusercontent.com",this._dotcomAPIUrl=this._getDotComAPIUrl(),this._proxyBaseUrl=this._getProxyUrl(void 0),this._capiBaseUrl=this._getCAPIUrl(void 0)}updateDomains(e,r){let n=this._dotcomAPIUrl,o=this._capiBaseUrl,s=this._telemetryBaseUrl,c=this._proxyBaseUrl;return this._enterpriseUrlConfig!==r&&(this._enterpriseUrlConfig=r,this._dotcomAPIUrl=this._getDotComAPIUrl()),e?(this._proxyBaseUrl=this._getProxyUrl(e),this._capiBaseUrl=this._getCAPIUrl(e),this._telemetryBaseUrl=e.endpoints.telemetry||"https://copilot-telemetry.githubusercontent.com",e.endpoints["origin-tracker"]&&(this._originTrackerUrl=e.endpoints["origin-tracker"])):(this._capiBaseUrl="https://api.githubcopilot.com",this._telemetryBaseUrl="https://copilot-telemetry.githubusercontent.com"),{dotcomUrlChanged:n!==this._dotcomAPIUrl,capiUrlChanged:o!==this._capiBaseUrl,telemetryUrlChanged:s!==this._telemetryBaseUrl,proxyUrlChanged:c!==this._proxyBaseUrl}}_getDotComAPIUrl(){if(this._enterpriseUrlConfig)try{let e=new URL(this._enterpriseUrlConfig);return`${e.protocol}//api.${e.hostname}${e.port?":"+e.port:""}`}catch(e){return console.warn("Failed to parse enterprise URL config:",this._enterpriseUrlConfig,e),"https://api.github.com"}return"https://api.github.com"}_getCAPIUrl(e){return e&&e.endpoints.api||"https://api.githubcopilot.com"}_getProxyUrl(e){return e&&e.endpoints.proxy||vri.DEFAULT_PROXY_BASE_URL}get proxyBaseURL(){return this._proxyBaseUrl}get capiBaseURL(){return this._capiBaseUrl}get capiChatURL(){return`${this._capiBaseUrl}/chat/completions`}get capiResponsesURL(){return`${this._capiBaseUrl}/responses`}get capiMessagesURL(){return`${this._capiBaseUrl}/v1/messages`}get capiEmbeddingsURL(){return`${this._capiBaseUrl}/embeddings`}get capiModelsURL(){return`${this._capiBaseUrl}/models`}get capiAutoModelURL(){return`${this.capiModelsURL}/session`}get capiModelRouterURL(){return`${this.capiAutoModelURL}/intent`}get embeddingsModelURL(){return`${this.embeddingsURL}/models`}get chunksURL(){return`${this.dotComAPIURL}/chunks`}get embeddingsURL(){return`${this.dotComAPIURL}/embeddings`}get embeddingsCodeSearchURL(){return`${this.dotComAPIURL}/embeddings/code/search`}get telemetryURL(){return`${this._telemetryBaseUrl}/telemetry`}get remoteAgentsURL(){return`${this._capiBaseUrl}/agents`}get listSkillsURL(){return`${this._capiBaseUrl}/skills`}get searchSkillURL(){return`${this._capiBaseUrl}/search`}get contentExclusionURL(){return`${this._dotcomAPIUrl}/copilot_internal/content_exclusion`}get copilotUserInfoURL(){return`${this._dotcomAPIUrl}/copilot_internal/user`}get tokenURL(){return this._dotcomAPIUrl+"/copilot_internal/v2/token"}get tokenNoAuthURL(){return`${this._dotcomAPIUrl}/copilot_internal/v2/nltoken`}get dotComAPIURL(){return this._dotcomAPIUrl}get originTrackerURL(){return this._originTrackerUrl}get chatAttachmentUploadURL(){return"https://uploads.github.com/copilot/chat/attachments"}get copilotAgentSessionsURL(){return`${this._capiBaseUrl}/agents/sessions`}get copilotAgentJobsURL(){return`${this._capiBaseUrl}/agents/swe`}get CCAModelsURL(){return`${this._capiBaseUrl}/agents/swe/models`}get copilotCustomAgentsURL(){return`${this._capiBaseUrl}/agents/swe/custom-agents`}get copilotAgentMemoryURL(){return`${this._capiBaseUrl}/agents/swe/internal/memory/v0`}};kur.DEFAULT_PROXY_BASE_URL="https://copilot-proxy.githubusercontent.com",kur.CAPI_MODEL_LAB_URL="https://api-model-lab.githubcopilot.com";owe=kur,wla=`The \u201C@vscode/copilot-api\u201D npm Module Terms and Conditions ("Terms") are a legal agreement between you (either as an individual or on behalf of an entity) and GitHub, Inc. regarding your use of \u201C@vscode/copilot-api\u201D npm library and associated documentation (collectively, the "Software"). By using the Software, you accept these Terms. Please read all of these Terms; in many cases, provisions set forth later in the Terms limit and qualify provisions set forth earlier in the Terms. If you do not accept these Terms, do not download, install, use, or copy the Software. IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. @@ -1060,157 +1060,157 @@ Subject to the foregoing clause (ii), GitHub will only be liable for slight negl This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. -It also applies even if GitHub knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.`,waa=`I have read and agree to the following license terms: +It also applies even if GitHub knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.`,Rla=`I have read and agree to the following license terms: -${xaa} -`,Tti=(t=>(t.CopilotToken="CopilotToken",t.CopilotNLToken="CopilotNLToken",t.ChatCompletions="ChatCompletions",t.ChatResponses="ChatResponses",t.ChatMessages="ChatMessages",t.ProxyCompletions="ProxyCompletions",t.ProxyChatCompletions="ProxyChatCompletions",t.RemoteAgent="RemoteAgent",t.RemoteAgentChat="RemoteAgentChat",t.CodeReviewAgent="CodeReviewAgent",t.CAPIEmbeddings="CAPIEmbeddings",t.DotcomEmbeddings="DotcomEmbeddings",t.EmbeddingsModels="EmbeddingsModels",t.Models="Models",t.AutoModels="AutoModels",t.Chunks="Chunks",t.EmbeddingsCodeSearch="EmbeddingsCodeSearch",t.ListSkills="ListSkills",t.SearchSkill="SearchSkill",t.ContentExclusion="ContentExclusion",t.Telemetry="Telemetry",t.CopilotUserInfo="CopilotUserInfo",t.ModelPolicy="ModelPolicy",t.ListModel="ListModel",t.SnippyMatch="SnippyMatch",t.SnippyFilesForMatch="SnippyFlesForMatch",t.CodingGuidelines="CodingGuidelines",t.EmbeddingsIndex="EmbedingsIndex",t.ChatAttachmentUpload="ChatAttachmentUpload",t.CopilotSessionLogs="CopilotSessionLogs",t.CopilotSessionDetails="CopilotSessionDetails",t.CopilotSessions="CopilotSessions",t.CopilotAgentJob="CopilotAgentJob",t.CCAModelsList="CCAModelsList",t.CopilotCustomAgents="CopilotCustomAgents",t.CopilotCustomAgentsDetail="CopilotCustomAgentsDetail",t.OrgCustomInstructions="OrgCustomInstructions",t.CopilotAgentMemory="CopilotAgentMemory",t.CopilotAgentJobEnabled="CopilotAgentJobEnabled",t.ModelRouter="ModelRouter",t))(Tti||{});a(Raa,"y");a(Paa,"C");kaa=class{static{a(this,"m")}constructor(t,e,r,n,o){if(this._extensionInfo=t,this._integrationId=o,this._licenseCheckSucceeded=!1,e&&e===waa&&(this._licenseCheckSucceeded=!0),this._domainService=new cRe,this._fetcherService=r??new Iaa,this._hmacSecret=n,this._integrationId==="vscode-chat"||this._integrationId==="code-oss")throw new Error(`Integration ID ${this._integrationId} is reserved and cannot be used.`)}updateDomains(t,e){return t&&t.sku&&(this._copilotSku=t.sku),this._domainService.updateDomains(t,e)}async makeRequest(t,e){let{type:r}=e;await this._mixinHeaders(t,e);let n={...t,callSite:t.callSite??r};switch(r){case"CopilotToken":return this._fetcherService.fetch(this._domainService.tokenURL,n);case"CopilotNLToken":return this._fetcherService.fetch(this._domainService.tokenNoAuthURL,n);case"ProxyCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/v1/engines/gpt-4o-copilot/completions`,n);case"ProxyChatCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/chat/completions`,n);case"RemoteAgent":return this._fetcherService.fetch(this._domainService.remoteAgentsURL,n);case"CodeReviewAgent":return this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/github-code-review`,n);case"CAPIEmbeddings":return this._fetcherService.fetch(this._domainService.capiEmbeddingsURL,n);case"DotcomEmbeddings":return this._fetcherService.fetch(this._domainService.embeddingsURL,n);case"EmbeddingsModels":return this._fetcherService.fetch(this._domainService.embeddingsModelURL,n);case"Chunks":return this._fetcherService.fetch(this._domainService.chunksURL,n);case"EmbeddingsCodeSearch":return this._fetcherService.fetch(this._domainService.embeddingsCodeSearchURL,n);case"ListSkills":return this._fetcherService.fetch(this._domainService.listSkillsURL,n);case"Telemetry":return this._fetcherService.fetch(this._domainService.telemetryURL,n);case"CopilotUserInfo":return this._fetcherService.fetch(this._domainService.copilotUserInfoURL,n);case"SnippyMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/Match`,n);case"SnippyFlesForMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/FilesForMatch`,n);case"EmbedingsIndex":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for EmbeddingsIndex request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/embeddings_index`,n);case"CodingGuidelines":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for CodingGuidelines request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/coding_guidelines`,n);case"EmbeddingsModels":return this._fetcherService.fetch(this._domainService.embeddingsModelURL,n);case"AutoModels":return this._fetcherService.fetch(this._domainService.capiAutoModelURL,n);case"ModelRouter":return this._fetcherService.fetch(this._domainService.capiModelRouterURL,n);case"Models":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${cRe.CAPI_MODEL_LAB_URL}/models`,n):this._fetcherService.fetch(this._domainService.capiModelsURL,n);case"ChatCompletions":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${cRe.CAPI_MODEL_LAB_URL}/chat/completions`,n):this._fetcherService.fetch(this._domainService.capiChatURL,n);case"ChatResponses":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${cRe.CAPI_MODEL_LAB_URL}/responses`,n):this._fetcherService.fetch(this._domainService.capiResponsesURL,n);case"ChatMessages":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${cRe.CAPI_MODEL_LAB_URL}/v1/messages`,n):this._fetcherService.fetch(this._domainService.capiMessagesURL,n);case"ContentExclusion":if(!("repos"in e))throw new Error("Repos are required for ContentExclusion request");return this._fetcherService.fetch(this._prepareContentExclusionUrl(e.repos),n);case"RemoteAgentChat":return"slug"in e&&e.slug?this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/${e.slug}?chat`,n):this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/chat`,n);case"SearchSkill":if(!("slug"in e))throw new Error("Skill slug is required for SearchSkill request");return this._fetcherService.fetch(`${this._domainService.searchSkillURL}/${e.slug}`,n);case"ModelPolicy":if(!("modelId"in e))throw new Error("Model ID is required for ModelPolicy request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}/policy`,n);case"ListModel":if(!("modelId"in e))throw new Error("Model ID is required for ListModel request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}`,n);case"ChatAttachmentUpload":if(!("uploadName"in e)||!("mimeType"in e))throw new Error("uploadName and mimeType are required for ChatAttachmentUpload request");return this._fetcherService.fetch(`${this._domainService.chatAttachmentUploadURL}?name=${e.uploadName}&content_type=${e.mimeType}`,n);case"CopilotSessionLogs":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionLogs request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}/logs`,n);case"CopilotSessionDetails":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionDetails request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}`,n);case"CopilotSessions":let o={...n,getItemsFromResponse:a(s=>{let c=s;return c&&Array.isArray(c.sessions)?c.sessions:[]},"getItemsFromResponse"),buildUrl:a((s,c,l)=>{let u=new URL(s);return u.searchParams.set("page_size",c.toString()),u.searchParams.set("page_number",l.toString()),"resourceState"in e&&e.resourceState&&u.searchParams.set("resource_state",e.resourceState),"nwo"in e&&e.nwo&&u.searchParams.set("repo_nwo",e.nwo),u.toString()},"buildUrl")};return"prId"in e&&e.prId?this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/resource/pull/${e.prId}`,n):this._fetcherService.fetchWithPagination(this._domainService.copilotAgentSessionsURL,o);case"CopilotAgentJob":if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJob request");if("jobId"in e&&e.jobId){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}/${e.jobId}`,n)}if("sessionId"in e&&e.sessionId){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}/session/${e.sessionId}`,n)}if("payload"in e&&e.payload){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}`,n)}throw new Error("jobId or sessionId is required for CopilotAgentJob request");case"CCAModelsList":return this._fetcherService.fetch(this._domainService.CCAModelsURL,n);case"CopilotCustomAgents":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotCustomAgents request");let s=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}`);return"target"in e&&e.target&&s.searchParams.set("target",e.target),"exclude_invalid_config"in e&&e.exclude_invalid_config!==void 0&&s.searchParams.set("exclude_invalid_config",e.exclude_invalid_config.toString()),"dedupe"in e&&e.dedupe!==void 0&&s.searchParams.set("dedupe",e.dedupe.toString()),"include_sources"in e&&e.include_sources&&s.searchParams.set("include_sources",e.include_sources.join(",")),this._fetcherService.fetch(s.toString(),n)}case"CopilotCustomAgentsDetail":{if(!("owner"in e)||!("repo"in e)||!("customAgentName"in e))throw new Error("owner, repo and customAgentName are required for CopilotCustomAgents request");let s=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}/${e.customAgentName}`);return"version"in e&&e.version&&s.searchParams.set("version",e.version),this._fetcherService.fetch(s.toString(),n)}case"OrgCustomInstructions":if(!("orgLogin"in e))throw new Error("orgLogin is required for OrgCustomInstructions request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/copilot_internal/org_custom_instructions/${e.orgLogin}`,n);case"CopilotAgentMemory":{if(!("repo"in e))throw new Error("repo is required for CopilotAgentMemory request");let s="action"in e?e.action:"",c=`${this._domainService.copilotAgentMemoryURL}/${e.repo}`;return s&&(c+=`/${s}`,s==="recent"&&"limit"in e&&e.limit!==void 0&&(c+=`?limit=${e.limit}`)),this._fetcherService.fetch(c,n)}case"CopilotAgentJobEnabled":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJobEnabled request");return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/v1/jobs/${e.owner}/${e.repo}/enabled`,n)}default:throw new Error(`Unsupported request type: ${r}`)}}async createResponsesWebSocket(t){return await this._mixinHeaders(t,{type:"ChatResponses"}),this._fetcherService.createWebSocket(this._domainService.capiResponsesURL,t)}_prepareContentExclusionUrl(t){let e=t.join(","),r=new URL(this._domainService.contentExclusionURL);return t.length!==0&&r.searchParams.set("repos",e),r.searchParams.set("scope","repo"),r.toString()}async _mixinHeaders(t,e){if(!Paa(e.type))return;let r=t.headers||{};r["X-GitHub-Api-Version"]="2025-10-01",r["VScode-SessionId"]=this._extensionInfo.sessionId,r["VScode-MachineId"]=this._extensionInfo.machineId,r["Editor-Device-Id"]=this._extensionInfo.deviceId,r["Editor-Plugin-Version"]=`copilot-chat/${this._extensionInfo.version}`,r["Editor-Version"]=`vscode/${this._extensionInfo.vscodeVersion}`;let n="";t.suppressIntegrationId||(n="code-oss",this._integrationId&&this._hmacSecret?n=this._integrationId:this._copilotSku==="no_auth_limited_copilot"?n="vscode-nl":this._licenseCheckSucceeded&&this._extensionInfo.buildType==="prod"?n="vscode-chat":this._extensionInfo.buildType==="dev"&&this._hmacSecret&&(n="vscode-chat-dev"),r["Copilot-Integration-Id"]=n),n==="vscode-chat-dev"&&(r["Request-Hmac"]=await Raa(this._hmacSecret)),t.headers=r}get copilotTelemetryURL(){return this._domainService.telemetryURL}get dotcomAPIURL(){return this._domainService.dotComAPIURL}get capiPingURL(){return`${this._domainService.capiBaseURL}/_ping`}get proxyBaseURL(){return this._domainService.proxyBaseURL}get originTrackerURL(){return this._domainService.originTrackerURL}get snippyMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/Match"}get snippyFilesForMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/FilesForMatch"}}});var ig=T(Zy=>{"use strict";f();Object.defineProperty(Zy,"__esModule",{value:!0});Zy.DestroyableStream=Zy.HeadersImpl=Zy.Response=Zy.NO_FETCH_TELEMETRY=Zy.IFetcherService=void 0;Zy.jsonVerboseError=Daa;Zy.isAbortError=Sti;Zy.safeGetHostname=Maa;var Naa=qr();Zy.IFetcherService=(0,Naa.createServiceIdentifier)("IFetcherService");Zy.NO_FETCH_TELEMETRY="NO_FETCH_TELEMETRY";var fur=class t{static{a(this,"Response")}get bytesReceived(){return this._bytesReceived}constructor(e,r,n,o,s,c,l,u){this.status=e,this.statusText=r,this.headers=n,this.fetcher=s,this._reportEvent=c,this._internalId=l,this._hostname=u,this.ok=this.status>=200&&this.status<300,this._bytesReceived=0;let d={transform:a((m,g)=>{this._bytesReceived+=m.length,g.enqueue(m)},"transform"),flush:a(()=>{this._reportEvent({internalId:this._internalId,timestamp:Date.now(),outcome:"success",phase:"responseStreaming",fetcher:this.fetcher,hostname:this._hostname,bytesReceived:this._bytesReceived})},"flush"),cancel:a(m=>{let g=m&&!Sti(m)?"error":"cancel";this._reportEvent({internalId:this._internalId,timestamp:Date.now(),outcome:g,phase:"responseStreaming",fetcher:this.fetcher,hostname:this._hostname,reason:m,bytesReceived:this._bytesReceived})},"cancel")},p=new TransformStream(d),h=o??new ReadableStream({start(m){m.close()}});this.body=new uat(h.pipeThrough(p))}static fromText(e,r,n,o,s){return new t(e,r,n,new ReadableStream({start(c){c.enqueue(new TextEncoder().encode(o)),c.close()}}),s,()=>{},"in-memory","in-memory")}async text(){let e=[];for await(let s of this.body)e.push(s);let r=e.reduce((s,c)=>s+c.length,0),n=new Uint8Array(r),o=0;for(let s of e)n.set(s,o),o+=s.length;return new TextDecoder().decode(n)}async json(){return JSON.parse(await this.text())}};Zy.Response=fur;var pur=class t{static{a(this,"HeadersImpl")}constructor(e){this._record=e}static fromMap(e){return new t(Object.fromEntries(e))}get(e){let r=this._record[e];return Array.isArray(r)?r[0]:r??null}[Symbol.iterator](){let e=Object.keys(this._record),r=0;return{next:a(()=>{if(r>=e.length)return{done:!0,value:void 0};let n=e[r++];return{done:!1,value:[n,this.get(n)]}},"next")}}};Zy.HeadersImpl=pur;var uat=class t{static{a(this,"DestroyableStream")}constructor(e){this.stream=e}toReadableStream(){return this.stream}pipeThrough(e){let r=new t(this.stream.pipeThrough(e));return this.pipedHead=r,r}async*[Symbol.asyncIterator](){this.reader=this.stream.getReader();try{for(;;){let{done:e,value:r}=await this.reader.read();if(e)break;yield r}}finally{this.reader.releaseLock(),this.reader=void 0}}destroy(){return this.pipedHead?this.pipedHead.destroy():this.reader?this.reader.cancel():this.stream.cancel()}};Zy.DestroyableStream=uat;async function Daa(t){let e=await t.text();try{return JSON.parse(e)}catch(r){let n=e.split(` +${wla} +`,bri=(t=>(t.CopilotToken="CopilotToken",t.CopilotNLToken="CopilotNLToken",t.ChatCompletions="ChatCompletions",t.ChatResponses="ChatResponses",t.ChatMessages="ChatMessages",t.ProxyCompletions="ProxyCompletions",t.ProxyChatCompletions="ProxyChatCompletions",t.RemoteAgent="RemoteAgent",t.RemoteAgentChat="RemoteAgentChat",t.CodeReviewAgent="CodeReviewAgent",t.CAPIEmbeddings="CAPIEmbeddings",t.DotcomEmbeddings="DotcomEmbeddings",t.EmbeddingsModels="EmbeddingsModels",t.Models="Models",t.AutoModels="AutoModels",t.Chunks="Chunks",t.EmbeddingsCodeSearch="EmbeddingsCodeSearch",t.ListSkills="ListSkills",t.SearchSkill="SearchSkill",t.ContentExclusion="ContentExclusion",t.Telemetry="Telemetry",t.CopilotUserInfo="CopilotUserInfo",t.ModelPolicy="ModelPolicy",t.ListModel="ListModel",t.SnippyMatch="SnippyMatch",t.SnippyFilesForMatch="SnippyFlesForMatch",t.CodingGuidelines="CodingGuidelines",t.EmbeddingsIndex="EmbedingsIndex",t.ChatAttachmentUpload="ChatAttachmentUpload",t.CopilotSessionLogs="CopilotSessionLogs",t.CopilotSessionDetails="CopilotSessionDetails",t.CopilotSessions="CopilotSessions",t.CopilotAgentJob="CopilotAgentJob",t.CCAModelsList="CCAModelsList",t.CopilotCustomAgents="CopilotCustomAgents",t.CopilotCustomAgentsDetail="CopilotCustomAgentsDetail",t.OrgCustomInstructions="OrgCustomInstructions",t.CopilotAgentMemory="CopilotAgentMemory",t.CopilotAgentJobEnabled="CopilotAgentJobEnabled",t.ModelRouter="ModelRouter",t))(bri||{});a(Pla,"y");a(kla,"C");Dla=class{static{a(this,"m")}constructor(t,e,r,n,o){if(this._extensionInfo=t,this._integrationId=o,this._licenseCheckSucceeded=!1,e&&e===Rla&&(this._licenseCheckSucceeded=!0),this._domainService=new owe,this._fetcherService=r??new xla,this._hmacSecret=n,this._integrationId==="vscode-chat"||this._integrationId==="code-oss")throw new Error(`Integration ID ${this._integrationId} is reserved and cannot be used.`)}updateDomains(t,e){return t&&t.sku&&(this._copilotSku=t.sku),this._domainService.updateDomains(t,e)}async makeRequest(t,e){let{type:r}=e;await this._mixinHeaders(t,e);let n={...t,callSite:t.callSite??r};switch(r){case"CopilotToken":return this._fetcherService.fetch(this._domainService.tokenURL,n);case"CopilotNLToken":return this._fetcherService.fetch(this._domainService.tokenNoAuthURL,n);case"ProxyCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/v1/engines/gpt-4o-copilot/completions`,n);case"ProxyChatCompletions":return this._fetcherService.fetch(`${this._domainService.proxyBaseURL}/chat/completions`,n);case"RemoteAgent":return this._fetcherService.fetch(this._domainService.remoteAgentsURL,n);case"CodeReviewAgent":return this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/github-code-review`,n);case"CAPIEmbeddings":return this._fetcherService.fetch(this._domainService.capiEmbeddingsURL,n);case"DotcomEmbeddings":return this._fetcherService.fetch(this._domainService.embeddingsURL,n);case"EmbeddingsModels":return this._fetcherService.fetch(this._domainService.embeddingsModelURL,n);case"Chunks":return this._fetcherService.fetch(this._domainService.chunksURL,n);case"EmbeddingsCodeSearch":return this._fetcherService.fetch(this._domainService.embeddingsCodeSearchURL,n);case"ListSkills":return this._fetcherService.fetch(this._domainService.listSkillsURL,n);case"Telemetry":return this._fetcherService.fetch(this._domainService.telemetryURL,n);case"CopilotUserInfo":return this._fetcherService.fetch(this._domainService.copilotUserInfoURL,n);case"SnippyMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/Match`,n);case"SnippyFlesForMatch":return this._fetcherService.fetch(`${this._domainService.originTrackerURL}/twirp/github.snippy.v1.SnippyAPI/FilesForMatch`,n);case"EmbedingsIndex":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for EmbeddingsIndex request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/embeddings_index`,n);case"CodingGuidelines":if(!("repoWithOwner"in e))throw new Error("repoWithOwner is required for CodingGuidelines request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/repos/${e.repoWithOwner}/copilot_internal/coding_guidelines`,n);case"EmbeddingsModels":return this._fetcherService.fetch(this._domainService.embeddingsModelURL,n);case"AutoModels":return this._fetcherService.fetch(this._domainService.capiAutoModelURL,n);case"ModelRouter":return this._fetcherService.fetch(this._domainService.capiModelRouterURL,n);case"Models":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${owe.CAPI_MODEL_LAB_URL}/models`,n):this._fetcherService.fetch(this._domainService.capiModelsURL,n);case"ChatCompletions":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${owe.CAPI_MODEL_LAB_URL}/chat/completions`,n):this._fetcherService.fetch(this._domainService.capiChatURL,n);case"ChatResponses":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${owe.CAPI_MODEL_LAB_URL}/responses`,n):this._fetcherService.fetch(this._domainService.capiResponsesURL,n);case"ChatMessages":return"isModelLab"in e&&e.isModelLab?this._fetcherService.fetch(`${owe.CAPI_MODEL_LAB_URL}/v1/messages`,n):this._fetcherService.fetch(this._domainService.capiMessagesURL,n);case"ContentExclusion":if(!("repos"in e))throw new Error("Repos are required for ContentExclusion request");return this._fetcherService.fetch(this._prepareContentExclusionUrl(e.repos),n);case"RemoteAgentChat":return"slug"in e&&e.slug?this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/${e.slug}?chat`,n):this._fetcherService.fetch(`${this._domainService.remoteAgentsURL}/chat`,n);case"SearchSkill":if(!("slug"in e))throw new Error("Skill slug is required for SearchSkill request");return this._fetcherService.fetch(`${this._domainService.searchSkillURL}/${e.slug}`,n);case"ModelPolicy":if(!("modelId"in e))throw new Error("Model ID is required for ModelPolicy request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}/policy`,n);case"ListModel":if(!("modelId"in e))throw new Error("Model ID is required for ListModel request");return this._fetcherService.fetch(`${this._domainService.capiModelsURL}/${e.modelId}`,n);case"ChatAttachmentUpload":if(!("uploadName"in e)||!("mimeType"in e))throw new Error("uploadName and mimeType are required for ChatAttachmentUpload request");return this._fetcherService.fetch(`${this._domainService.chatAttachmentUploadURL}?name=${e.uploadName}&content_type=${e.mimeType}`,n);case"CopilotSessionLogs":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionLogs request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}/logs`,n);case"CopilotSessionDetails":if(!("sessionId"in e))throw new Error("sessionId is required for CopilotSessionDetails request");return this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/${e.sessionId}`,n);case"CopilotSessions":let o={...n,getItemsFromResponse:a(s=>{let c=s;return c&&Array.isArray(c.sessions)?c.sessions:[]},"getItemsFromResponse"),buildUrl:a((s,c,l)=>{let u=new URL(s);return u.searchParams.set("page_size",c.toString()),u.searchParams.set("page_number",l.toString()),"resourceState"in e&&e.resourceState&&u.searchParams.set("resource_state",e.resourceState),"nwo"in e&&e.nwo&&u.searchParams.set("repo_nwo",e.nwo),u.toString()},"buildUrl")};return"prId"in e&&e.prId?this._fetcherService.fetch(`${this._domainService.copilotAgentSessionsURL}/resource/pull/${e.prId}`,n):this._fetcherService.fetchWithPagination(this._domainService.copilotAgentSessionsURL,o);case"CopilotAgentJob":if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJob request");if("jobId"in e&&e.jobId){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}/${e.jobId}`,n)}if("sessionId"in e&&e.sessionId){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}/session/${e.sessionId}`,n)}if("payload"in e&&e.payload){let s="apiVersion"in e&&e.apiVersion||"v1";return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/${s}/jobs/${e.owner}/${e.repo}`,n)}throw new Error("jobId or sessionId is required for CopilotAgentJob request");case"CCAModelsList":return this._fetcherService.fetch(this._domainService.CCAModelsURL,n);case"CopilotCustomAgents":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotCustomAgents request");let s=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}`);return"target"in e&&e.target&&s.searchParams.set("target",e.target),"exclude_invalid_config"in e&&e.exclude_invalid_config!==void 0&&s.searchParams.set("exclude_invalid_config",e.exclude_invalid_config.toString()),"dedupe"in e&&e.dedupe!==void 0&&s.searchParams.set("dedupe",e.dedupe.toString()),"include_sources"in e&&e.include_sources&&s.searchParams.set("include_sources",e.include_sources.join(",")),this._fetcherService.fetch(s.toString(),n)}case"CopilotCustomAgentsDetail":{if(!("owner"in e)||!("repo"in e)||!("customAgentName"in e))throw new Error("owner, repo and customAgentName are required for CopilotCustomAgents request");let s=new URL(`${this._domainService.copilotCustomAgentsURL}/${e.owner}/${e.repo}/${e.customAgentName}`);return"version"in e&&e.version&&s.searchParams.set("version",e.version),this._fetcherService.fetch(s.toString(),n)}case"OrgCustomInstructions":if(!("orgLogin"in e))throw new Error("orgLogin is required for OrgCustomInstructions request");return this._fetcherService.fetch(`${this._domainService.dotComAPIURL}/copilot_internal/org_custom_instructions/${e.orgLogin}`,n);case"CopilotAgentMemory":{if(!("repo"in e))throw new Error("repo is required for CopilotAgentMemory request");let s="action"in e?e.action:"",c=`${this._domainService.copilotAgentMemoryURL}/${e.repo}`;return s&&(c+=`/${s}`,s==="recent"&&"limit"in e&&e.limit!==void 0&&(c+=`?limit=${e.limit}`)),this._fetcherService.fetch(c,n)}case"CopilotAgentJobEnabled":{if(!("owner"in e)||!("repo"in e))throw new Error("owner and repo are required for CopilotAgentJobEnabled request");return this._fetcherService.fetch(`${this._domainService.copilotAgentJobsURL}/v1/jobs/${e.owner}/${e.repo}/enabled`,n)}default:throw new Error(`Unsupported request type: ${r}`)}}async createResponsesWebSocket(t){return await this._mixinHeaders(t,{type:"ChatResponses"}),this._fetcherService.createWebSocket(this._domainService.capiResponsesURL,t)}_prepareContentExclusionUrl(t){let e=t.join(","),r=new URL(this._domainService.contentExclusionURL);return t.length!==0&&r.searchParams.set("repos",e),r.searchParams.set("scope","repo"),r.toString()}async _mixinHeaders(t,e){if(!kla(e.type))return;let r=t.headers||{};r["X-GitHub-Api-Version"]="2025-10-01",r["VScode-SessionId"]=this._extensionInfo.sessionId,r["VScode-MachineId"]=this._extensionInfo.machineId,r["Editor-Device-Id"]=this._extensionInfo.deviceId,r["Editor-Plugin-Version"]=`copilot-chat/${this._extensionInfo.version}`,r["Editor-Version"]=`vscode/${this._extensionInfo.vscodeVersion}`;let n="";t.suppressIntegrationId||(n="code-oss",this._integrationId&&this._hmacSecret?n=this._integrationId:this._copilotSku==="no_auth_limited_copilot"?n="vscode-nl":this._licenseCheckSucceeded&&this._extensionInfo.buildType==="prod"?n="vscode-chat":this._extensionInfo.buildType==="dev"&&this._hmacSecret&&(n="vscode-chat-dev"),r["Copilot-Integration-Id"]=n),n==="vscode-chat-dev"&&(r["Request-Hmac"]=await Pla(this._hmacSecret)),t.headers=r}get copilotTelemetryURL(){return this._domainService.telemetryURL}get dotcomAPIURL(){return this._domainService.dotComAPIURL}get capiPingURL(){return`${this._domainService.capiBaseURL}/_ping`}get proxyBaseURL(){return this._domainService.proxyBaseURL}get originTrackerURL(){return this._domainService.originTrackerURL}get snippyMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/Match"}get snippyFilesForMatchPath(){return"twirp/github.snippy.v1.SnippyAPI/FilesForMatch"}}});var zm=T(jy=>{"use strict";f();Object.defineProperty(jy,"__esModule",{value:!0});jy.DestroyableStream=jy.HeadersImpl=jy.Response=jy.NO_FETCH_TELEMETRY=jy.IFetcherService=void 0;jy.jsonVerboseError=Mla;jy.isAbortError=Tri;jy.safeGetHostname=Ola;var Nla=qr();jy.IFetcherService=(0,Nla.createServiceIdentifier)("IFetcherService");jy.NO_FETCH_TELEMETRY="NO_FETCH_TELEMETRY";var Dur=class t{static{a(this,"Response")}get bytesReceived(){return this._bytesReceived}constructor(e,r,n,o,s,c,l,u){this.status=e,this.statusText=r,this.headers=n,this.fetcher=s,this._reportEvent=c,this._internalId=l,this._hostname=u,this.ok=this.status>=200&&this.status<300,this._bytesReceived=0;let d={transform:a((m,g)=>{this._bytesReceived+=m.length,g.enqueue(m)},"transform"),flush:a(()=>{this._reportEvent({internalId:this._internalId,timestamp:Date.now(),outcome:"success",phase:"responseStreaming",fetcher:this.fetcher,hostname:this._hostname,bytesReceived:this._bytesReceived})},"flush"),cancel:a(m=>{let g=m&&!Tri(m)?"error":"cancel";this._reportEvent({internalId:this._internalId,timestamp:Date.now(),outcome:g,phase:"responseStreaming",fetcher:this.fetcher,hostname:this._hostname,reason:m,bytesReceived:this._bytesReceived})},"cancel")},p=new TransformStream(d),h=o??new ReadableStream({start(m){m.close()}});this.body=new yst(h.pipeThrough(p))}static fromText(e,r,n,o,s){return new t(e,r,n,new ReadableStream({start(c){c.enqueue(new TextEncoder().encode(o)),c.close()}}),s,()=>{},"in-memory","in-memory")}async text(){let e=[];for await(let s of this.body)e.push(s);let r=e.reduce((s,c)=>s+c.length,0),n=new Uint8Array(r),o=0;for(let s of e)n.set(s,o),o+=s.length;return new TextDecoder().decode(n)}async json(){return JSON.parse(await this.text())}};jy.Response=Dur;var Nur=class t{static{a(this,"HeadersImpl")}constructor(e){this._record=e}static fromMap(e){return new t(Object.fromEntries(e))}get(e){let r=this._record[e];return Array.isArray(r)?r[0]:r??null}[Symbol.iterator](){let e=Object.keys(this._record),r=0;return{next:a(()=>{if(r>=e.length)return{done:!0,value:void 0};let n=e[r++];return{done:!1,value:[n,this.get(n)]}},"next")}}};jy.HeadersImpl=Nur;var yst=class t{static{a(this,"DestroyableStream")}constructor(e){this.stream=e}toReadableStream(){return this.stream}pipeThrough(e){let r=new t(this.stream.pipeThrough(e));return this.pipedHead=r,r}async*[Symbol.asyncIterator](){this.reader=this.stream.getReader();try{for(;;){let{done:e,value:r}=await this.reader.read();if(e)break;yield r}}finally{this.reader.releaseLock(),this.reader=void 0}}destroy(){return this.pipedHead?this.pipedHead.destroy():this.reader?this.reader.cancel():this.stream.cancel()}};jy.DestroyableStream=yst;async function Mla(t){let e=await t.text();try{return JSON.parse(e)}catch(r){let n=e.split(` `),o=n.length>50?[...n.slice(0,25),"[...]",...n.slice(n.length-25)].join(` -`):e;throw r.message=`${r.message}. Response: ${o}`,r}}a(Daa,"jsonVerboseError");function Sti(t){return t&&t.name==="AbortError"}a(Sti,"isAbortError");function Maa(t){try{return new URL(t).hostname}catch{return"unknown"}}a(Maa,"safeGetHostname")});var Iti=T(dat=>{"use strict";f();Object.defineProperty(dat,"__esModule",{value:!0});dat.LICENSE_AGREEMENT=void 0;dat.LICENSE_AGREEMENT=void 0});var eE=T(bde=>{"use strict";f();Object.defineProperty(bde,"__esModule",{value:!0});bde.ICAPIClientService=bde.BaseCAPIClientService=void 0;var lRe=(vde(),ba(_de)),Oaa=qr(),Baa=ig(),Laa=Iti(),hur=class extends lRe.CAPIClient{static{a(this,"BaseCAPIClientService")}constructor(e,r,n,o){super({machineId:o.machineId,deviceId:o.devDeviceId,sessionId:o.sessionId,vscodeVersion:o.vscodeVersion,buildType:o.getBuildType(),name:o.getName(),version:o.getVersion()},Laa.LICENSE_AGREEMENT,n,e,r)}makeRequest(e,r){return this.abExpContext&&(e.headers||(e.headers={}),e.headers["VScode-ABExpContext"]=this.abExpContext),(r.type===lRe.RequestType.Telemetry||r.type===lRe.RequestType.ChatCompletions||r.type===lRe.RequestType.ChatMessages||r.type===lRe.RequestType.ChatResponses)&&(e.callSite=Baa.NO_FETCH_TELEMETRY),super.makeRequest(e,r)}};bde.BaseCAPIClientService=hur;bde.ICAPIClientService=(0,Oaa.createServiceIdentifier)("ICAPIClientService")});var pat=T(fat=>{"use strict";f();Object.defineProperty(fat,"__esModule",{value:!0});fat.getEndpointUrl=Haa;fat.getLastKnownEndpoints=jaa;var Faa=gA(),Uaa=eE(),pQ=Xm(),Qaa=YK(),qaa=qU();function wti(t){let e=t.get(Uaa.ICAPIClientService);return{proxy:e.proxyBaseURL,"origin-tracker":e.originTrackerURL}}a(wti,"getDefaultEndpoints");function xti(t,e,r){if(r!==void 0&&t.get(Qaa.ICompletionsRuntimeModeService).isRunningInTest()){for(let n of r){let o=(0,pQ.getConfig)(t,n);if(o)return o}return}for(let n of e){let o=(0,pQ.getConfig)(t,n);if(o)return o}}a(xti,"urlConfigOverride");function Gaa(t,e){switch(e){case"proxy":return xti(t,[pQ.ConfigKey.DebugOverrideProxyUrl,pQ.ConfigKey.DebugOverrideProxyUrlLegacy],[pQ.ConfigKey.DebugTestOverrideProxyUrl,pQ.ConfigKey.DebugTestOverrideProxyUrlLegacy]);case"origin-tracker":if(!pQ.BuildInfo.isProduction())return xti(t,[pQ.ConfigKey.DebugSnippyOverrideUrl])}}a(Gaa,"getEndpointOverrideUrl");function Haa(t,e,r,...n){let o=Gaa(t,r)??(e.endpoints?e.endpoints[r]:void 0)??wti(t)[r];return(0,qaa.joinPath)(o,...n)}a(Haa,"getEndpointUrl");function jaa(t){return t.get(Faa.IAuthenticationService).copilotToken?.endpoints??wti(t)}a(jaa,"getLastKnownEndpoints")});var gur=T(uRe=>{"use strict";f();Object.defineProperty(uRe,"__esModule",{value:!0});uRe.Response=void 0;uRe.isAbortError=Vaa;var $aa=ig();Object.defineProperty(uRe,"Response",{enumerable:!0,get:a(function(){return $aa.Response},"get")});var mur=class extends Error{static{a(this,"HttpTimeoutError")}constructor(e,r){super(e,{cause:r}),this.name="HttpTimeoutError"}};function Vaa(t){return!t||typeof t!="object"?!1:t instanceof mur||"name"in t&&t.name==="AbortError"||"code"in t&&t.code==="ABORT_ERR"}a(Vaa,"isAbortError")});var Tde=T(Uf=>{"use strict";f();var Waa=Uf&&Uf.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zaa=Uf&&Uf.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Yaa=Uf&&Uf.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Waa(e,t,r)},Aur=Uf&&Uf.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Uf,"__esModule",{value:!0});Uf.Fetcher=Uf.CompletionsFetcher=Uf.ICompletionsFetcherService=void 0;Uf.postRequest=eca;Uf.isInterruptedNetworkError=Nti;var Rti=Xm(),yur=Dp();Yaa(gur(),Uf);var kti=fc(),Pti=iR(),Kaa=ig(),Jaa=gd(),Xaa=qr(),Zaa=Mo();Uf.ICompletionsFetcherService=(0,Xaa.createServiceIdentifier)("ICompletionsFetcherService");var Eur=class{static{a(this,"CompletionsFetcher")}constructor(e,r,n){this.configurationService=e,this.fetcherService=r,this.experimentationService=n}getImplementation(){return this}fetch(e,r){let n=this.configurationService.getExperimentBasedConfig(kti.ConfigKey.CompletionsFetcher,this.experimentationService)||void 0,o=n?{...r,useFetcher:n}:r;return this.fetcherService.fetch(e,{...o,callSite:o.callSite??"completions-core"})}disconnectAll(){return this.fetcherService.disconnectAll()}};Uf.CompletionsFetcher=Eur;Uf.CompletionsFetcher=Eur=zaa([Aur(0,kti.IConfigurationService),Aur(1,Kaa.IFetcherService),Aur(2,Jaa.IExperimentationService)],Eur);var Cur=class{static{a(this,"Fetcher")}getImplementation(){return this}};Uf.Fetcher=Cur;function eca(t,e,r,n,o,s,c,l,u,d){let p=t.get(Uf.ICompletionsFetcherService),h=t.get(Zaa.IInstantiationService),m={...l,Authorization:`Bearer ${r}`,...h.invokeFunction(Rti.editorVersionHeaders)};d===void 0&&(m["Openai-Organization"]="github-copilot",m["X-Request-Id"]=o,m["VScode-SessionId"]=t.get(Pti.IEnvService).sessionId,m["VScode-MachineId"]=t.get(Pti.IEnvService).machineId,m["X-GitHub-Api-Version"]=Rti.apiVersion),n&&(m["OpenAI-Intent"]=n);let g={callSite:"completions-core-post",method:"POST",headers:m,json:s,timeout:u};if(c){let y=new AbortController;c.onCancellationRequested(()=>{h.invokeFunction(yur.telemetry,"networking.cancelRequest",yur.TelemetryData.createAndMarkAsIssued({headerRequestId:o})),y.abort()}),g.signal=y.signal}return p.fetch(e,g).catch(y=>{if(Nti(y))return h.invokeFunction(yur.telemetry,"networking.disconnectAll"),p.disconnectAll().then(()=>p.fetch(e,g));throw y})}a(eca,"postRequest");function Nti(t){return t instanceof Error?t.message==="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code==="ECONNRESET"||t.code==="ETIMEDOUT"||t.code==="ERR_HTTP2_INVALID_SESSION":!1:!1}a(Nti,"isInterruptedNetworkError")});var Dti=T(Sde=>{"use strict";f();Object.defineProperty(Sde,"__esModule",{value:!0});Sde.FeatureName=Sde.OutputPaneShowCommand=void 0;Sde.OutputPaneShowCommand="codereferencing.showOutputPane2";Sde.FeatureName="code-referencing"});var dRe=T(hat=>{"use strict";f();Object.defineProperty(hat,"__esModule",{value:!0});hat.codeReferenceLogger=void 0;var tca=mc(),rca=Dti();hat.codeReferenceLogger=new tca.Logger(rca.FeatureName)});var Bti=T(Aat=>{"use strict";f();Object.defineProperty(Aat,"__esModule",{value:!0});Aat.ConnectionState=void 0;var nca=Mo(),ica=mc(),oca=pat(),sca=Tde(),fRe=dRe(),aca=3e3,_ur=2,Mti=256,Oti=Math.log(Mti)/Math.log(_ur)/_ur,zR={connection:"disabled",maxAttempts:Oti,retryAttempts:0,initialWait:!1},mat,gat=[];function cca(){if(mat)return mat;function t(_){return gat.push(_),()=>{let v=gat.indexOf(_);v!==-1&&gat.splice(v,1)}}a(t,"subscribe");function e(){for(let _ of gat)_()}a(e,"afterUpdateConnection");function r(_){zR.connection!==_&&(zR.connection=_,e())}a(r,"updateConnection");function n(){return zR.connection==="connected"}a(n,"isConnected");function o(){return zR.connection==="disconnected"}a(o,"isDisconnected");function s(){return zR.connection==="retry"}a(s,"isRetrying");function c(){return zR.connection==="disabled"}a(c,"isDisabled");function l(){r("connected"),h(!1)}a(l,"setConnected");function u(){r("disconnected")}a(u,"setDisconnected");function d(){r("retry")}a(d,"setRetrying");function p(){r("disabled")}a(p,"setDisabled");function h(_){zR.initialWait!==_&&(zR.initialWait=_)}a(h,"setInitialWait");function m(_,v=aca){s()||(d(),h(!0),A(_,v))}a(m,"enableRetry");function g(){return zR.initialWait}a(g,"isInitialWait");async function A(_,v){let b=_.get(ica.ICompletionsLogTargetService),I=_.get(sca.ICompletionsFetcherService),x=_.get(nca.IInstantiationService);fRe.codeReferenceLogger.info(b,`Attempting to reconnect in ${v}ms.`),await y(v),h(!1);function R(w){if(w>Mti){fRe.codeReferenceLogger.info(b,"Max retry time reached, disabling."),p();return}let P=a(async()=>{zR.retryAttempts=Math.min(zR.retryAttempts+1,Oti);try{fRe.codeReferenceLogger.info(b,`Pinging service after ${w} second(s)`);let k=await I.fetch(new URL("_ping",x.invokeFunction(oca.getLastKnownEndpoints)["origin-tracker"]).href,{callSite:"snippy-ping",method:"GET",headers:{"content-type":"application/json"}});if(k.status!==200||!k.ok)R(w**2);else{fRe.codeReferenceLogger.info(b,"Successfully reconnected."),l();return}}catch{R(w**2)}},"tryAgain");setTimeout(()=>{P()},w*1e3)}a(R,"succeedOrRetry"),fRe.codeReferenceLogger.info(b,"Attempting to reconnect."),R(_ur)}a(A,"attemptToPing");let y=a(_=>new Promise(v=>setTimeout(v,_)),"timeout");function E(_){return{dispose:t(_)}}return a(E,"listen"),mat={setConnected:l,setDisconnected:u,setRetrying:d,setDisabled:p,enableRetry:m,listen:E,isConnected:n,isDisconnected:o,isRetrying:s,isDisabled:c,isInitialWait:g},mat}a(cca,"registerConnectionState");Aat.ConnectionState=cca()});var Fti=T(zh=>{"use strict";f();Object.defineProperty(zh,"__esModule",{value:!0});zh.ErrorMessages=zh.ErrorReasons=void 0;zh.getErrorType=Lti;zh.createErrorResponse=lca;zh.ErrorReasons={BadArguments:"BadArgumentsError",Unauthorized:"NotAuthorized",NotFound:"NotFoundError",RateLimit:"RateLimitError",InternalError:"InternalError",ConnectionError:"ConnectionError",Unknown:"UnknownError"};zh.ErrorMessages={[zh.ErrorReasons.Unauthorized]:"Invalid GitHub token. Please sign out from your GitHub account using VSCode UI and try again",[zh.ErrorReasons.InternalError]:"Internal error: matches to public code will not be detected. It is advised to disable Copilot completions until the service is reconnected.",[zh.ErrorReasons.RateLimit]:"You've reached your quota and limit, code matching will be unavailable until the limit resets"};function Lti(t){return t===401?zh.ErrorReasons.Unauthorized:t===400?zh.ErrorReasons.BadArguments:t===404?zh.ErrorReasons.NotFound:t===429?zh.ErrorReasons.RateLimit:t>=500&&t<600?zh.ErrorReasons.InternalError:t>=600?zh.ErrorReasons.ConnectionError:zh.ErrorReasons.Unknown}a(Lti,"getErrorType");function lca(t,e,r={}){return{kind:"failure",reason:Lti(Number(t)),code:Number(t),msg:e,meta:r}}a(lca,"createErrorResponse")});var Iur=T(WD=>{"use strict";f();Object.defineProperty(WD,"__esModule",{value:!0});WD.NoopTelemetryReporter=WD.snippyTelemetry=WD.matchNotificationTelemetry=WD.copilotOutputLogTelemetry=void 0;var uca=mc(),bA=Dp(),dca=dRe(),fca=/^[1-6][0-9][0-9]$/,pca=/([A-Z][a-z]+)/,hca="code_referencing",Ide=class{static{a(this,"CodeQuoteTelemetry")}constructor(e){this.baseKey=e}buildKey(...e){return[hca,this.baseKey,...e].join(".")}},vur=class extends Ide{static{a(this,"CopilotOutputLogTelemetry")}constructor(){super("github_copilot_log")}handleOpen({instantiationService:e}){let r=this.buildKey("open","count"),n=bA.TelemetryData.createAndMarkAsIssued();e.invokeFunction(bA.telemetry,r,n)}handleFocus({instantiationService:e}){let r=bA.TelemetryData.createAndMarkAsIssued(),n=this.buildKey("focus","count");e.invokeFunction(bA.telemetry,n,r)}handleWrite({instantiationService:e}){let r=bA.TelemetryData.createAndMarkAsIssued(),n=this.buildKey("write","count");e.invokeFunction(bA.telemetry,n,r)}};WD.copilotOutputLogTelemetry=new vur;var bur=class extends Ide{static{a(this,"MatchNotificationTelemetry")}constructor(){super("match_notification")}handleDoAction({instantiationService:e,actor:r}){let n=bA.TelemetryData.createAndMarkAsIssued({actor:r}),o=this.buildKey("acknowledge","count");e.invokeFunction(bA.telemetry,o,n)}handleDismiss({instantiationService:e,actor:r}){let n=bA.TelemetryData.createAndMarkAsIssued({actor:r}),o=this.buildKey("ignore","count");e.invokeFunction(bA.telemetry,o,n)}};WD.matchNotificationTelemetry=new bur;var Tur=class extends Ide{static{a(this,"SnippyTelemetry")}constructor(){super("snippy")}handleUnexpectedError({instantiationService:e,origin:r,reason:n}){let o=bA.TelemetryData.createAndMarkAsIssued({origin:r,reason:n});e.invokeFunction(bA.telemetryError,this.buildKey("unexpectedError"),o)}handleCompletionMissing({instantiationService:e,origin:r,reason:n}){let o=bA.TelemetryData.createAndMarkAsIssued({origin:r,reason:n});e.invokeFunction(bA.telemetryError,this.buildKey("completionMissing"),o)}handleSnippyNetworkError({instantiationService:e,origin:r,reason:n,message:o}){if(!r.match(fca)){e.invokeFunction(l=>dca.codeReferenceLogger.debug(l.get(uca.ICompletionsLogTargetService),"Invalid status code, not sending telemetry",{origin:r}));return}let s=n.split(pca).filter(l=>!!l).join("_").toLowerCase(),c=bA.TelemetryData.createAndMarkAsIssued({message:o});e.invokeFunction(bA.telemetryError,this.buildKey(s,r),c)}};WD.snippyTelemetry=new Tur;var Sur=class extends Ide{static{a(this,"NoopTelemetryReporter")}constructor(e=""){super(e)}telemetry(...e){}telemetryError(...e){}};WD.NoopTelemetryReporter=Sur});var Uti=T(xur=>{"use strict";f();Object.defineProperty(xur,"__esModule",{value:!0});xur.call=bca;var mca=Mo(),gca=due(),Aca=Xm(),yca=mc(),Eca=pat(),Cca=Tde(),xde=Bti(),Qf=Fti(),_ca=dRe(),vca=Iur();async function bca(t,e,r,n){let o,s=t.get(yca.ICompletionsLogTargetService),c=t.get(mca.IInstantiationService),l=t.get(gca.ICompletionsCopilotTokenManager);try{o=l.token??await l.getToken()}catch{return xde.ConnectionState.setDisconnected(),(0,Qf.createErrorResponse)(401,Qf.ErrorMessages[Qf.ErrorReasons.Unauthorized])}if(_ca.codeReferenceLogger.info(s,`Calling ${e}`),xde.ConnectionState.isRetrying())return(0,Qf.createErrorResponse)(600,"Attempting to reconnect to the public code matching service.");if(xde.ConnectionState.isDisconnected())return(0,Qf.createErrorResponse)(601,"The public code matching service is offline.");let u;try{u=await c.invokeFunction(_=>_.get(Cca.ICompletionsFetcherService).fetch((0,Eca.getEndpointUrl)(_,o,"origin-tracker",e),{callSite:"snippy-network",method:r.method,body:r.method==="POST"?JSON.stringify(r.body):void 0,headers:{"content-type":"application/json",authorization:`Bearer ${o.token}`,...(0,Aca.editorVersionHeaders)(_)},signal:n}))}catch{return c.invokeFunction(xde.ConnectionState.enableRetry),(0,Qf.createErrorResponse)(602,"Network error detected. Check your internet connection.")}let d;try{d=await u.json()}catch(_){let v=_.message;throw vca.snippyTelemetry.handleUnexpectedError({instantiationService:c,origin:"snippyNetwork",reason:v}),_}if(u.ok)return{kind:"success",...d};let p={...d,code:Number(u.status)},{code:h,msg:m,meta:g}=p,A=Number(h),y=(0,Qf.getErrorType)(A),E=m||"unknown error";switch(y){case Qf.ErrorReasons.Unauthorized:return(0,Qf.createErrorResponse)(h,Qf.ErrorMessages[Qf.ErrorReasons.Unauthorized],g);case Qf.ErrorReasons.BadArguments:return(0,Qf.createErrorResponse)(h,E,g);case Qf.ErrorReasons.RateLimit:return c.invokeFunction(_=>xde.ConnectionState.enableRetry(_,60*1e3)),(0,Qf.createErrorResponse)(h,Qf.ErrorMessages.RateLimitError,g);case Qf.ErrorReasons.InternalError:return c.invokeFunction(_=>xde.ConnectionState.enableRetry(_)),(0,Qf.createErrorResponse)(h,Qf.ErrorMessages[Qf.ErrorReasons.InternalError],g);default:return(0,Qf.createErrorResponse)(h,E,g)}}a(bca,"call")});var wur=T(w_=>{"use strict";f();Object.defineProperty(w_,"__esModule",{value:!0});w_.FileMatchResponse=w_.FileMatchRequest=w_.MatchResponse=w_.MatchRequest=w_.MatchError=void 0;var Ms=zit();w_.MatchError=Ms.Type.Object({kind:Ms.Type.Literal("failure"),reason:Ms.Type.String(),code:Ms.Type.Number(),msg:Ms.Type.String(),meta:Ms.Type.Optional(Ms.Type.Any())});var Tca=Ms.Type.Object({matched_source:Ms.Type.String(),occurrences:Ms.Type.String(),capped:Ms.Type.Boolean(),cursor:Ms.Type.String(),github_url:Ms.Type.String()});w_.MatchRequest=Ms.Type.Object({source:Ms.Type.String()});var Sca=Ms.Type.Object({snippets:Ms.Type.Array(Tca)});w_.MatchResponse=Ms.Type.Union([Sca,w_.MatchError]);w_.FileMatchRequest=Ms.Type.Object({cursor:Ms.Type.String()});var Ica=Ms.Type.Object({commit_id:Ms.Type.String(),license:Ms.Type.String(),nwo:Ms.Type.String(),path:Ms.Type.String(),url:Ms.Type.String()}),xca=Ms.Type.Object({has_next_page:Ms.Type.Boolean(),cursor:Ms.Type.String()}),wca=Ms.Type.Object({count:Ms.Type.Record(Ms.Type.String(),Ms.Type.String())}),Rca=Ms.Type.Object({file_matches:Ms.Type.Array(Ica),page_info:xca,license_stats:wca});w_.FileMatchResponse=Ms.Type.Union([Rca,w_.MatchError])});var Hti=T(zD=>{"use strict";f();var Pca=zD&&zD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kca=zD&&zD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qti=zD&&zD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(r3,"__esModule",{value:!0});r3.MinTokenLength=void 0;r3.lexemeLength=jti;r3.offsetLastLexemes=Oca;r3.hasMinLexemeLength=Bca;var pRe=new RegExp("[_\\p{L}\\p{Nd}]+|====+|----+|####+|////+|\\*\\*\\*\\*+|[\\p{P}\\p{S}]","gu");r3.MinTokenLength=65;function jti(t){let e=0,r;pRe.lastIndex=0;do if(r=pRe.exec(t),r&&(e+=1),e>=r3.MinTokenLength)break;while(r);return e}a(jti,"lexemeLength");function Mca(t,e){let r=0,n;pRe.lastIndex=0;do if(n=pRe.exec(t),n&&(r+=1,r>=e))return pRe.lastIndex;while(n);return t.length}a(Mca,"offsetFirstLexemes");function Oca(t,e){let r=t.split("").reverse().join(""),n=Mca(r,e);return r.length-n}a(Oca,"offsetLastLexemes");function Bca(t){return jti(t)>=r3.MinTokenLength}a(Bca,"hasMinLexemeLength")});var Jti=T(n3=>{"use strict";f();var Lca=n3&&n3.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Fca=n3&&n3.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yti=n3&&n3.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oWti(E,()=>Vti.Match(E,p)));if(!h||zti(h)||!h.snippets.length){Rur.codeReferenceLogger.info(s,"No match found");return}Rur.codeReferenceLogger.info(s,"Match found");let{snippets:m}=h,g=m.map(async E=>{let _=await o.invokeFunction(I=>Wti(I,()=>Vti.FilesForMatch(I,{cursor:E.cursor})));if(!_||zti(_))return;let v=_.file_matches,b=_.license_stats;return{match:E,files:v,licenseStats:b}}),y=(await Promise.all(g)).filter(E=>E!==void 0);if(y.length)for(let E of y){let _=new Set(Object.keys(E.licenseStats?.count??{}));_.has("NOASSERTION")&&(_.delete("NOASSERTION"),_.add("unknown"));let v=Array.from(_).sort(),b=n,I=n+E.match.matched_source.length,x=u.positionAt(b),R=u.positionAt(I);await l.handleIPCodeCitation({inDocumentUri:e,offsetStart:b,offsetEnd:I,version:u.version,location:{start:x,end:R},matchingText:p,details:v.map(w=>({license:w,url:E.match.github_url}))})}}a(Vca,"fetchCitations")});var nri=T(hQ=>{"use strict";f();Object.defineProperty(hQ,"__esModule",{value:!0});hQ.editDistance=Zti;hQ.emptyLexDictionary=eri;hQ.reverseLexDictionary=tri;hQ.lexGeneratorWords=rri;hQ.lexicalAnalyzer=Pur;hQ.lexEditDistance=Wca;function Zti(t,e,r=(n,o)=>n===o?0:1){if(e.length===0||t.length===0)return{distance:e.length,startOffset:0,endOffset:0};let n=new Array(e.length+1).fill(0),o=new Array(e.length+1).fill(0),s=new Array(t.length+1).fill(0),c=new Array(t.length+1).fill(0),l=e[0];for(let d=0;d0?d-1:0;for(let d=1;d0&&(yield e),e=o,n=s)}e.length>0&&(yield e)}a(rri,"lexGeneratorWords");function Pur(t,e,r,n){let o=[],s=0;for(let c of r(t))n(c)&&(e.has(c)||e.set(c,e.size),o.push([e.get(c),s])),s+=c.length;return[o,e]}a(Pur,"lexicalAnalyzer");function Xti(t){return t!==" "}a(Xti,"notSingleSpace");function Wca(t,e,r=rri){let[n,o]=Pur(t,eri(),r,Xti),[s,c]=Pur(e,o,r,Xti);if(s.length===0||n.length===0)return{lexDistance:s.length,startOffset:0,endOffset:0,haystackLexLength:n.length,needleLexLength:s.length};let l=tri(c),u=s.length,d=l[s[0][0]],p=l[s[u-1][0]];function h(y,E,_,v){if(v===0||v===u-1){let b=l[n[_][0]];return v===0&&b.endsWith(d)||v===u-1&&b.startsWith(p)?0:1}else return y===E?0:1}a(h,"compare");let m=Zti(n.map(y=>y[0]),s.map(y=>y[0]),h),g=n[m.startOffset][1],A=m.endOffset0&&t[A-1]===" "&&--A,{lexDistance:m.distance,startOffset:g,endOffset:A,haystackLexLength:n.length,needleLexLength:s.length}}a(Wca,"lexEditDistance")});var kur=T(AJ=>{"use strict";f();Object.defineProperty(AJ,"__esModule",{value:!0});AJ.PartialAcceptTriggerKind=void 0;AJ.computeCompCharLen=zca;AJ.countLines=Yca;AJ.computeCompletionText=Kca;var iri;(function(t){t[t.Unknown=0]="Unknown",t[t.Word=1]="Word",t[t.Line=2]="Line",t[t.Suggest=3]="Suggest"})(iri||(AJ.PartialAcceptTriggerKind=iri={}));function zca(t,e){return t.compType==="partial"?t.acceptedLength:e.length}a(zca,"computeCompCharLen");function Yca(t){return t.length===0?0:t.split(` -`).length}a(Yca,"countLines");function Kca(t,e){return e.compType==="partial"?t.substring(0,e.acceptedLength):t}a(Kca,"computeCompletionText")});var hri=T(vat=>{"use strict";f();Object.defineProperty(vat,"__esModule",{value:!0});vat.postRejectionTasks=cla;vat.postInsertionTasks=lla;var _at=Mo(),ari=yY(),Jca=due(),Cat=EKn(),Xca=knt(),Zca=bor(),cri=$ir(),lri=Zue(),Rde=mc(),ori=xot(),ela=hde(),tla=Jti(),sri=nri(),rla=kur(),mQ=Dp(),nla=E_(),uri=pxe(),ila=YK(),gQ=new Rde.Logger("postInsertion"),dri=[{seconds:15,captureCode:!1,captureRejection:!1},{seconds:30,captureCode:!0,captureRejection:!0},{seconds:120,captureCode:!1,captureRejection:!1},{seconds:300,captureCode:!1,captureRejection:!1},{seconds:600,captureCode:!1,captureRejection:!1}],fri=50,ola=1500,sla=.5,ala=500,Nur={triggerPostInsertionSynchroneously:!1,captureCode:!1,captureRejection:!1};async function pri(t,e,r,n,o){let s=t.get(_at.IInstantiationService),c=t.get(Rde.ICompletionsLogTargetService),l=await t.get(cri.ICompletionsFileReaderService).getOrReadTextDocumentWithFakeClientProperties({uri:e});if(l.status!=="valid")return gQ.info(c,`Could not get document for ${e}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1},capturedCode:"",terminationOffset:0};let u=l.document,d=u.getText(),p=d.substring(0,n),h=u.positionAt(n),m=await s.invokeFunction(ela.extractPrompt,r.properties.headerRequestId,(0,Zca.createCompletionState)(u,h),r),g=m.type==="prompt"?m.prompt:{prefix:p,suffix:"",isFimEnabled:!1};if(g.isFimEnabled&&o!==void 0){let A=d.substring(n,o);return g.suffix=d.substring(o),{prompt:g,capturedCode:A,terminationOffset:0}}else{let A=d.substring(n),y=(0,ori.contextIndentationFromText)(p,n,u.detectedLanguageId),_=(0,ori.indentationBlockFinished)(y,void 0)(A),v=Math.min(d.length,n+(_?_*2:ala)),b=d.substring(n,v);return{prompt:g,capturedCode:b,terminationOffset:_??-1}}}a(pri,"captureCode");function cla(t,e,r,n,o){let s=t.get(Rde.ICompletionsLogTargetService),c=t.get(_at.IInstantiationService),l=t.get(ari.ICompletionsTelemetryService),u=t.get(uri.ICompletionsPromiseQueueService);o.forEach(({completionText:m,completionTelemetryData:g})=>{gQ.debug(s,`${e}.rejected choiceIndex: ${g.properties.choiceIndex}`),c.invokeFunction(lri.telemetryRejected,e,g)});let d=c.createInstance(Cat.ChangeTracker,n,r-1),p=c.createInstance(Cat.ChangeTracker,n,r),h=a(async m=>{gQ.debug(s,`Original offset: ${r}, Tracked offset: ${d.offset}`);let{completionTelemetryData:g}=o[0],{prompt:A,capturedCode:y,terminationOffset:E}=await c.invokeFunction(pri,n,g,d.offset+1,p.offset),_={hypotheticalPromptJson:JSON.stringify({prefix:A.prefix,context:A.context}),hypotheticalPromptSuffixJson:JSON.stringify(A.suffix)},v=g.extendedBy({..._,capturedCodeJson:JSON.stringify(y)},{timeout:m.seconds,insertionOffset:r,trackedOffset:d.offset,terminationOffsetInCapturedCode:E});gQ.debug(s,`${e}.capturedAfterRejected choiceIndex: ${g.properties.choiceIndex}`,v),c.invokeFunction(mQ.telemetry,e+".capturedAfterRejected",v,mQ.TelemetryStore.Enhanced)},"checkInCode");dri.filter(m=>m.captureRejection).map(m=>d.push((0,mQ.telemetryCatch)(l,u,()=>h(m),"postRejectionTasks"),m.seconds*1e3))}a(cla,"postRejectionTasks");function lla(t,e,r,n,o,s,c,l){let u=t.get(Rde.ICompletionsLogTargetService),d=t.get(_at.IInstantiationService),p=t.get(uri.ICompletionsPromiseQueueService),h=t.get(ari.ICompletionsTelemetryService),m=t.get(ila.ICompletionsRuntimeModeService),g=s.extendedBy({compType:c.compType},{compCharLen:c.acceptedLength,numLines:c.acceptedLines});gQ.debug(u,`${e}.accepted choiceIndex: ${g.properties.choiceIndex}`),d.invokeFunction(lri.telemetryAccepted,e,g);let A=r;r=(0,rla.computeCompletionText)(r,c);let y=r.trim(),E=d.createInstance(Cat.ChangeTracker,o,n),_=d.createInstance(Cat.ChangeTracker,o,n+r.length),v=a(async b=>{await d.invokeFunction(pla,e,y,n,o,b,g,E,_)},"stillInCodeCheck");if(Nur.triggerPostInsertionSynchroneously&&m.isRunningInTest()){let b=v({seconds:0,captureCode:Nur.captureCode,captureRejection:Nur.captureRejection});p.register(b)}else dri.map(b=>E.push((0,mQ.telemetryCatch)(h,p,()=>v(b),"postInsertionTasks"),b.seconds*1e3));d.invokeFunction(b=>(0,mQ.telemetryCatch)(h,p,ula,"post insertion citation check")(b,o,A,r,n,l))}a(lla,"postInsertionTasks");async function ula(t,e,r,n,o,s){let c=t.get(Rde.ICompletionsLogTargetService),l=t.get(nla.ICompletionsTextDocumentManagerService),u=t.get(Jca.ICompletionsCopilotTokenManager),d=t.get(Xca.ICompletionsCitationManager);if(!s||(s.ip_code_citations?.length??0)<1){if(u.getLastToken()?.getTokenValue("sn")==="1")return;await(0,tla.fetchCitations)(t,e,n,o);return}let p=await l.getTextDocument({uri:e});if(p){let h=Dur(p.getText(),n,fri,o);h.stillInCodeHeuristic&&(o=h.foundOffset)}for(let h of s.ip_code_citations){let m=dla(r.length,n.length,h.start_offset);if(m===void 0){gQ.info(c,`Full completion for ${e} contains a reference matching public code, but the partially inserted text did not include the match.`);continue}let g=o+m,A=p?.positionAt(g),y=o+fla(r.length,n.length,h.stop_offset),E=p?.positionAt(y),_=A&&E?p?.getText({start:A,end:E}):"";await d.handleIPCodeCitation({inDocumentUri:e,offsetStart:g,offsetEnd:y,version:p?.version,location:A&&E?{start:A,end:E}:void 0,matchingText:_,details:h.details.citations})}}a(ula,"citationCheck");function dla(t,e,r){if(!(ee))return r}a(dla,"computeCitationStart");function fla(t,e,r){return e{"use strict";f();Object.defineProperty(og,"__esModule",{value:!0});og.LastGhostText=og.ICompletionsLastGhostText=void 0;og.rejectLastShown=Ari;og.setLastShown=Ala;og.handleGhostTextShown=yla;og.handleGhostTextPostInsert=Cla;og.handlePartialGhostTextPostInsert=_la;var hla=qr(),mri=mc(),Our=hri(),bat=kur(),gri=HU(),Bur=Zue(),mla=new mri.Logger("ghostText");og.ICompletionsLastGhostText=(0,hla.createServiceIdentifier)("ICompletionsLastGhostText");var Mur=class{static{a(this,"LastGhostText")}constructor(){this.#n=[],this.linesAccepted=0}#e;#t;#n;get position(){return this.#e}get shownCompletions(){return this.#n||[]}get uri(){return this.#t}resetState(){this.#t=void 0,this.#e=void 0,this.#n=[],this.resetPartialAcceptanceState()}setState({uri:e},r){this.#t=e,this.#e=r,this.#n=[]}resetPartialAcceptanceState(){this.partiallyAcceptedLength=0,this.totalLength=void 0,this.linesLeft=void 0,this.linesAccepted=0}};og.LastGhostText=Mur;function gla(t){let e=[];return t.shownCompletions.forEach(r=>{if(r.displayText&&r.telemetry){let n,o;t.partiallyAcceptedLength?(n=r.displayText.substring(t.partiallyAcceptedLength-1),o=r.telemetry.extendedBy({compType:"partial"},{compCharLen:n.length})):(n=r.displayText,o=r.telemetry);let s={completionText:n,completionTelemetryData:o,offset:r.offset};e.push(s)}}),e}a(gla,"computeRejectedCompletions");function Ari(t,e){let r=t.get(og.ICompletionsLastGhostText);if(!r.position||!r.uri)return;let n=gla(r);n.length>0&&(0,Our.postRejectionTasks)(t,"ghostText",e??n[0].offset,r.uri,n),r.resetState(),r.resetPartialAcceptanceState()}a(Ari,"rejectLastShown");function Ala(t,e,r,n){let o=t.get(og.ICompletionsLastGhostText);return o.position&&o.uri&&!(o.position.line===r.line&&o.position.character===r.character&&o.uri.toString()===e.uri.toString())&&n!==gri.ResultType.TypingAsSuggested&&Ari(t,e.offsetAt(o.position)),o.setState(e,r),o.index}a(Ala,"setLastShown");function yla(t,e){let r=t.get(mri.ICompletionsLogTargetService),n=t.get(og.ICompletionsLastGhostText);if(n.index=e.index,!n.shownCompletions.find(o=>o.index===e.index)&&(e.uri===n.uri&&n.position?.line===e.position.line&&n.position?.character===e.position.character&&n.shownCompletions.push(e),e.displayText)){let o=e.resultType!==gri.ResultType.Network;mla.debug(r,`[${e.telemetry.properties.headerRequestId}] shown choiceIndex: ${e.telemetry.properties.choiceIndex}, fromCache ${o}`),e.telemetry.measurements.compCharLen=e.displayText.length,(0,Bur.telemetryShown)(t,e)}}a(yla,"handleGhostTextShown");function Ela(t,e,r){let n=t.get(og.ICompletionsLastGhostText);n.linesLeft===void 0&&(n.linesAccepted=(0,bat.countLines)(e.insertText.substring(0,r)),n.linesLeft=(0,bat.countLines)(e.displayText));let o=(0,bat.countLines)(e.displayText);n.linesLeft>o&&(n.linesAccepted+=n.linesLeft-o,n.lastLineAcceptedLength=n.partiallyAcceptedLength,n.linesLeft=o),n.partiallyAcceptedLength=(n.lastLineAcceptedLength||0)+r}a(Ela,"handleLineAcceptance");function Cla(t,e){let r=t.get(og.ICompletionsLastGhostText),n;return r.partiallyAcceptedLength?n={compType:"full",acceptedLength:(r.partiallyAcceptedLength||0)+e.displayText.length,acceptedLines:r.linesAccepted+(r.linesLeft??0)}:n={compType:"full",acceptedLength:e.displayText.length,acceptedLines:(0,bat.countLines)(e.displayText)},r.resetState(),(0,Our.postInsertionTasks)(t,Bur.GHOST_TEXT_CATEGORY,e.displayText,e.offset,e.uri,e.telemetry,n,e.copilotAnnotations)}a(Cla,"handleGhostTextPostInsert");function _la(t,e,r){let n=t.get(og.ICompletionsLastGhostText);Ela(t,e,r);let o={compType:"partial",acceptedLength:n.partiallyAcceptedLength||0,acceptedLines:n.linesAccepted};return(0,Our.postInsertionTasks)(t,Bur.GHOST_TEXT_CATEGORY,e.displayText,e.offset,e.uri,e.telemetry,o,e.copilotAnnotations)}a(_la,"handlePartialGhostTextPostInsert")});var yri=T(Fur=>{"use strict";f();Object.defineProperty(Fur,"__esModule",{value:!0});Fur.normalizeIndentCharacter=vla;function vla(t,e,r){function n(s,c,l){let u=new RegExp(`^(${c})+`,"g");return s.split(` +`):e;throw r.message=`${r.message}. Response: ${o}`,r}}a(Mla,"jsonVerboseError");function Tri(t){return t&&t.name==="AbortError"}a(Tri,"isAbortError");function Ola(t){try{return new URL(t).hostname}catch{return"unknown"}}a(Ola,"safeGetHostname")});var Sri=T(Est=>{"use strict";f();Object.defineProperty(Est,"__esModule",{value:!0});Est.LICENSE_AGREEMENT=void 0;Est.LICENSE_AGREEMENT=void 0});var $y=T(Lue=>{"use strict";f();Object.defineProperty(Lue,"__esModule",{value:!0});Lue.ICAPIClientService=Lue.BaseCAPIClientService=void 0;var swe=(Bue(),Aa(Oue)),Bla=qr(),Lla=zm(),Fla=Sri(),Mur=class extends swe.CAPIClient{static{a(this,"BaseCAPIClientService")}constructor(e,r,n,o){super({machineId:o.machineId,deviceId:o.devDeviceId,sessionId:o.sessionId,vscodeVersion:o.vscodeVersion,buildType:o.getBuildType(),name:o.getName(),version:o.getVersion()},Fla.LICENSE_AGREEMENT,n,e,r)}makeRequest(e,r){return this.abExpContext&&(e.headers||(e.headers={}),e.headers["VScode-ABExpContext"]=this.abExpContext),(r.type===swe.RequestType.Telemetry||r.type===swe.RequestType.ChatCompletions||r.type===swe.RequestType.ChatMessages||r.type===swe.RequestType.ChatResponses)&&(e.callSite=Lla.NO_FETCH_TELEMETRY),super.makeRequest(e,r)}};Lue.BaseCAPIClientService=Mur;Lue.ICAPIClientService=(0,Bla.createServiceIdentifier)("ICAPIClientService")});var Cst=T(_st=>{"use strict";f();Object.defineProperty(_st,"__esModule",{value:!0});_st.getEndpointUrl=jla;_st.getLastKnownEndpoints=$la;var Ula=cA(),Qla=$y(),QU=Gm(),qla=rK(),Gla=hU();function xri(t){let e=t.get(Qla.ICAPIClientService);return{proxy:e.proxyBaseURL,"origin-tracker":e.originTrackerURL}}a(xri,"getDefaultEndpoints");function Iri(t,e,r){if(r!==void 0&&t.get(qla.ICompletionsRuntimeModeService).isRunningInTest()){for(let n of r){let o=(0,QU.getConfig)(t,n);if(o)return o}return}for(let n of e){let o=(0,QU.getConfig)(t,n);if(o)return o}}a(Iri,"urlConfigOverride");function Hla(t,e){switch(e){case"proxy":return Iri(t,[QU.ConfigKey.DebugOverrideProxyUrl,QU.ConfigKey.DebugOverrideProxyUrlLegacy],[QU.ConfigKey.DebugTestOverrideProxyUrl,QU.ConfigKey.DebugTestOverrideProxyUrlLegacy]);case"origin-tracker":if(!QU.BuildInfo.isProduction())return Iri(t,[QU.ConfigKey.DebugSnippyOverrideUrl])}}a(Hla,"getEndpointOverrideUrl");function jla(t,e,r,...n){let o=Hla(t,r)??(e.endpoints?e.endpoints[r]:void 0)??xri(t)[r];return(0,Gla.joinPath)(o,...n)}a(jla,"getEndpointUrl");function $la(t){return t.get(Ula.IAuthenticationService).copilotToken?.endpoints??xri(t)}a($la,"getLastKnownEndpoints")});var Bur=T(awe=>{"use strict";f();Object.defineProperty(awe,"__esModule",{value:!0});awe.Response=void 0;awe.isAbortError=Wla;var Vla=zm();Object.defineProperty(awe,"Response",{enumerable:!0,get:a(function(){return Vla.Response},"get")});var Our=class extends Error{static{a(this,"HttpTimeoutError")}constructor(e,r){super(e,{cause:r}),this.name="HttpTimeoutError"}};function Wla(t){return!t||typeof t!="object"?!1:t instanceof Our||"name"in t&&t.name==="AbortError"||"code"in t&&t.code==="ABORT_ERR"}a(Wla,"isAbortError")});var Fue=T(Df=>{"use strict";f();var zla=Df&&Df.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Yla=Df&&Df.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Kla=Df&&Df.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&zla(e,t,r)},Lur=Df&&Df.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Df,"__esModule",{value:!0});Df.Fetcher=Df.CompletionsFetcher=Df.ICompletionsFetcherService=void 0;Df.postRequest=tua;Df.isInterruptedNetworkError=kri;var wri=Gm(),Fur=xp();Kla(Bur(),Df);var Pri=ac(),Rri=Ww(),Jla=zm(),Xla=cd(),Zla=qr(),eua=Po();Df.ICompletionsFetcherService=(0,Zla.createServiceIdentifier)("ICompletionsFetcherService");var Uur=class{static{a(this,"CompletionsFetcher")}constructor(e,r,n){this.configurationService=e,this.fetcherService=r,this.experimentationService=n}getImplementation(){return this}fetch(e,r){let n=this.configurationService.getExperimentBasedConfig(Pri.ConfigKey.CompletionsFetcher,this.experimentationService)||void 0,o=n?{...r,useFetcher:n}:r;return this.fetcherService.fetch(e,{...o,callSite:o.callSite??"completions-core"})}disconnectAll(){return this.fetcherService.disconnectAll()}};Df.CompletionsFetcher=Uur;Df.CompletionsFetcher=Uur=Yla([Lur(0,Pri.IConfigurationService),Lur(1,Jla.IFetcherService),Lur(2,Xla.IExperimentationService)],Uur);var Qur=class{static{a(this,"Fetcher")}getImplementation(){return this}};Df.Fetcher=Qur;function tua(t,e,r,n,o,s,c,l,u,d){let p=t.get(Df.ICompletionsFetcherService),h=t.get(eua.IInstantiationService),m={...l,Authorization:`Bearer ${r}`,...h.invokeFunction(wri.editorVersionHeaders)};d===void 0&&(m["Openai-Organization"]="github-copilot",m["X-Request-Id"]=o,m["VScode-SessionId"]=t.get(Rri.IEnvService).sessionId,m["VScode-MachineId"]=t.get(Rri.IEnvService).machineId,m["X-GitHub-Api-Version"]=wri.apiVersion),n&&(m["OpenAI-Intent"]=n);let g={callSite:"completions-core-post",method:"POST",headers:m,json:s,timeout:u};if(c){let y=new AbortController;c.onCancellationRequested(()=>{h.invokeFunction(Fur.telemetry,"networking.cancelRequest",Fur.TelemetryData.createAndMarkAsIssued({headerRequestId:o})),y.abort()}),g.signal=y.signal}return p.fetch(e,g).catch(y=>{if(kri(y))return h.invokeFunction(Fur.telemetry,"networking.disconnectAll"),p.disconnectAll().then(()=>p.fetch(e,g));throw y})}a(tua,"postRequest");function kri(t){return t instanceof Error?t.message==="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code==="ECONNRESET"||t.code==="ETIMEDOUT"||t.code==="ERR_HTTP2_INVALID_SESSION":!1:!1}a(kri,"isInterruptedNetworkError")});var Dri=T(Uue=>{"use strict";f();Object.defineProperty(Uue,"__esModule",{value:!0});Uue.FeatureName=Uue.OutputPaneShowCommand=void 0;Uue.OutputPaneShowCommand="codereferencing.showOutputPane2";Uue.FeatureName="code-referencing"});var cwe=T(vst=>{"use strict";f();Object.defineProperty(vst,"__esModule",{value:!0});vst.codeReferenceLogger=void 0;var rua=uc(),nua=Dri();vst.codeReferenceLogger=new rua.Logger(nua.FeatureName)});var Ori=T(Sst=>{"use strict";f();Object.defineProperty(Sst,"__esModule",{value:!0});Sst.ConnectionState=void 0;var iua=Po(),oua=uc(),sua=Cst(),aua=Fue(),lwe=cwe(),cua=3e3,qur=2,Nri=256,Mri=Math.log(Nri)/Math.log(qur)/qur,LR={connection:"disabled",maxAttempts:Mri,retryAttempts:0,initialWait:!1},bst,Tst=[];function lua(){if(bst)return bst;function t(_){return Tst.push(_),()=>{let v=Tst.indexOf(_);v!==-1&&Tst.splice(v,1)}}a(t,"subscribe");function e(){for(let _ of Tst)_()}a(e,"afterUpdateConnection");function r(_){LR.connection!==_&&(LR.connection=_,e())}a(r,"updateConnection");function n(){return LR.connection==="connected"}a(n,"isConnected");function o(){return LR.connection==="disconnected"}a(o,"isDisconnected");function s(){return LR.connection==="retry"}a(s,"isRetrying");function c(){return LR.connection==="disabled"}a(c,"isDisabled");function l(){r("connected"),h(!1)}a(l,"setConnected");function u(){r("disconnected")}a(u,"setDisconnected");function d(){r("retry")}a(d,"setRetrying");function p(){r("disabled")}a(p,"setDisabled");function h(_){LR.initialWait!==_&&(LR.initialWait=_)}a(h,"setInitialWait");function m(_,v=cua){s()||(d(),h(!0),A(_,v))}a(m,"enableRetry");function g(){return LR.initialWait}a(g,"isInitialWait");async function A(_,v){let b=_.get(oua.ICompletionsLogTargetService),I=_.get(aua.ICompletionsFetcherService),x=_.get(iua.IInstantiationService);lwe.codeReferenceLogger.info(b,`Attempting to reconnect in ${v}ms.`),await y(v),h(!1);function w(R){if(R>Nri){lwe.codeReferenceLogger.info(b,"Max retry time reached, disabling."),p();return}let P=a(async()=>{LR.retryAttempts=Math.min(LR.retryAttempts+1,Mri);try{lwe.codeReferenceLogger.info(b,`Pinging service after ${R} second(s)`);let k=await I.fetch(new URL("_ping",x.invokeFunction(sua.getLastKnownEndpoints)["origin-tracker"]).href,{callSite:"snippy-ping",method:"GET",headers:{"content-type":"application/json"}});if(k.status!==200||!k.ok)w(R**2);else{lwe.codeReferenceLogger.info(b,"Successfully reconnected."),l();return}}catch{w(R**2)}},"tryAgain");setTimeout(()=>{P()},R*1e3)}a(w,"succeedOrRetry"),lwe.codeReferenceLogger.info(b,"Attempting to reconnect."),w(qur)}a(A,"attemptToPing");let y=a(_=>new Promise(v=>setTimeout(v,_)),"timeout");function E(_){return{dispose:t(_)}}return a(E,"listen"),bst={setConnected:l,setDisconnected:u,setRetrying:d,setDisabled:p,enableRetry:m,listen:E,isConnected:n,isDisconnected:o,isRetrying:s,isDisabled:c,isInitialWait:g},bst}a(lua,"registerConnectionState");Sst.ConnectionState=lua()});var Lri=T(qh=>{"use strict";f();Object.defineProperty(qh,"__esModule",{value:!0});qh.ErrorMessages=qh.ErrorReasons=void 0;qh.getErrorType=Bri;qh.createErrorResponse=uua;qh.ErrorReasons={BadArguments:"BadArgumentsError",Unauthorized:"NotAuthorized",NotFound:"NotFoundError",RateLimit:"RateLimitError",InternalError:"InternalError",ConnectionError:"ConnectionError",Unknown:"UnknownError"};qh.ErrorMessages={[qh.ErrorReasons.Unauthorized]:"Invalid GitHub token. Please sign out from your GitHub account using VSCode UI and try again",[qh.ErrorReasons.InternalError]:"Internal error: matches to public code will not be detected. It is advised to disable Copilot completions until the service is reconnected.",[qh.ErrorReasons.RateLimit]:"You've reached your quota and limit, code matching will be unavailable until the limit resets"};function Bri(t){return t===401?qh.ErrorReasons.Unauthorized:t===400?qh.ErrorReasons.BadArguments:t===404?qh.ErrorReasons.NotFound:t===429?qh.ErrorReasons.RateLimit:t>=500&&t<600?qh.ErrorReasons.InternalError:t>=600?qh.ErrorReasons.ConnectionError:qh.ErrorReasons.Unknown}a(Bri,"getErrorType");function uua(t,e,r={}){return{kind:"failure",reason:Bri(Number(t)),code:Number(t),msg:e,meta:r}}a(uua,"createErrorResponse")});var Vur=T(OD=>{"use strict";f();Object.defineProperty(OD,"__esModule",{value:!0});OD.NoopTelemetryReporter=OD.snippyTelemetry=OD.matchNotificationTelemetry=OD.copilotOutputLogTelemetry=void 0;var dua=uc(),mA=xp(),fua=cwe(),pua=/^[1-6][0-9][0-9]$/,hua=/([A-Z][a-z]+)/,mua="code_referencing",Que=class{static{a(this,"CodeQuoteTelemetry")}constructor(e){this.baseKey=e}buildKey(...e){return[mua,this.baseKey,...e].join(".")}},Gur=class extends Que{static{a(this,"CopilotOutputLogTelemetry")}constructor(){super("github_copilot_log")}handleOpen({instantiationService:e}){let r=this.buildKey("open","count"),n=mA.TelemetryData.createAndMarkAsIssued();e.invokeFunction(mA.telemetry,r,n)}handleFocus({instantiationService:e}){let r=mA.TelemetryData.createAndMarkAsIssued(),n=this.buildKey("focus","count");e.invokeFunction(mA.telemetry,n,r)}handleWrite({instantiationService:e}){let r=mA.TelemetryData.createAndMarkAsIssued(),n=this.buildKey("write","count");e.invokeFunction(mA.telemetry,n,r)}};OD.copilotOutputLogTelemetry=new Gur;var Hur=class extends Que{static{a(this,"MatchNotificationTelemetry")}constructor(){super("match_notification")}handleDoAction({instantiationService:e,actor:r}){let n=mA.TelemetryData.createAndMarkAsIssued({actor:r}),o=this.buildKey("acknowledge","count");e.invokeFunction(mA.telemetry,o,n)}handleDismiss({instantiationService:e,actor:r}){let n=mA.TelemetryData.createAndMarkAsIssued({actor:r}),o=this.buildKey("ignore","count");e.invokeFunction(mA.telemetry,o,n)}};OD.matchNotificationTelemetry=new Hur;var jur=class extends Que{static{a(this,"SnippyTelemetry")}constructor(){super("snippy")}handleUnexpectedError({instantiationService:e,origin:r,reason:n}){let o=mA.TelemetryData.createAndMarkAsIssued({origin:r,reason:n});e.invokeFunction(mA.telemetryError,this.buildKey("unexpectedError"),o)}handleCompletionMissing({instantiationService:e,origin:r,reason:n}){let o=mA.TelemetryData.createAndMarkAsIssued({origin:r,reason:n});e.invokeFunction(mA.telemetryError,this.buildKey("completionMissing"),o)}handleSnippyNetworkError({instantiationService:e,origin:r,reason:n,message:o}){if(!r.match(pua)){e.invokeFunction(l=>fua.codeReferenceLogger.debug(l.get(dua.ICompletionsLogTargetService),"Invalid status code, not sending telemetry",{origin:r}));return}let s=n.split(hua).filter(l=>!!l).join("_").toLowerCase(),c=mA.TelemetryData.createAndMarkAsIssued({message:o});e.invokeFunction(mA.telemetryError,this.buildKey(s,r),c)}};OD.snippyTelemetry=new jur;var $ur=class extends Que{static{a(this,"NoopTelemetryReporter")}constructor(e=""){super(e)}telemetry(...e){}telemetryError(...e){}};OD.NoopTelemetryReporter=$ur});var Fri=T(Wur=>{"use strict";f();Object.defineProperty(Wur,"__esModule",{value:!0});Wur.call=Tua;var gua=Po(),Aua=Sle(),yua=Gm(),Eua=uc(),_ua=Cst(),Cua=Fue(),que=Ori(),Nf=Lri(),vua=cwe(),bua=Vur();async function Tua(t,e,r,n){let o,s=t.get(Eua.ICompletionsLogTargetService),c=t.get(gua.IInstantiationService),l=t.get(Aua.ICompletionsCopilotTokenManager);try{o=l.token??await l.getToken()}catch{return que.ConnectionState.setDisconnected(),(0,Nf.createErrorResponse)(401,Nf.ErrorMessages[Nf.ErrorReasons.Unauthorized])}if(vua.codeReferenceLogger.info(s,`Calling ${e}`),que.ConnectionState.isRetrying())return(0,Nf.createErrorResponse)(600,"Attempting to reconnect to the public code matching service.");if(que.ConnectionState.isDisconnected())return(0,Nf.createErrorResponse)(601,"The public code matching service is offline.");let u;try{u=await c.invokeFunction(_=>_.get(Cua.ICompletionsFetcherService).fetch((0,_ua.getEndpointUrl)(_,o,"origin-tracker",e),{callSite:"snippy-network",method:r.method,body:r.method==="POST"?JSON.stringify(r.body):void 0,headers:{"content-type":"application/json",authorization:`Bearer ${o.token}`,...(0,yua.editorVersionHeaders)(_)},signal:n}))}catch{return c.invokeFunction(que.ConnectionState.enableRetry),(0,Nf.createErrorResponse)(602,"Network error detected. Check your internet connection.")}let d;try{d=await u.json()}catch(_){let v=_.message;throw bua.snippyTelemetry.handleUnexpectedError({instantiationService:c,origin:"snippyNetwork",reason:v}),_}if(u.ok)return{kind:"success",...d};let p={...d,code:Number(u.status)},{code:h,msg:m,meta:g}=p,A=Number(h),y=(0,Nf.getErrorType)(A),E=m||"unknown error";switch(y){case Nf.ErrorReasons.Unauthorized:return(0,Nf.createErrorResponse)(h,Nf.ErrorMessages[Nf.ErrorReasons.Unauthorized],g);case Nf.ErrorReasons.BadArguments:return(0,Nf.createErrorResponse)(h,E,g);case Nf.ErrorReasons.RateLimit:return c.invokeFunction(_=>que.ConnectionState.enableRetry(_,60*1e3)),(0,Nf.createErrorResponse)(h,Nf.ErrorMessages.RateLimitError,g);case Nf.ErrorReasons.InternalError:return c.invokeFunction(_=>que.ConnectionState.enableRetry(_)),(0,Nf.createErrorResponse)(h,Nf.ErrorMessages[Nf.ErrorReasons.InternalError],g);default:return(0,Nf.createErrorResponse)(h,E,g)}}a(Tua,"call")});var zur=T(gC=>{"use strict";f();Object.defineProperty(gC,"__esModule",{value:!0});gC.FileMatchResponse=gC.FileMatchRequest=gC.MatchResponse=gC.MatchRequest=gC.MatchError=void 0;var ws=rit();gC.MatchError=ws.Type.Object({kind:ws.Type.Literal("failure"),reason:ws.Type.String(),code:ws.Type.Number(),msg:ws.Type.String(),meta:ws.Type.Optional(ws.Type.Any())});var Sua=ws.Type.Object({matched_source:ws.Type.String(),occurrences:ws.Type.String(),capped:ws.Type.Boolean(),cursor:ws.Type.String(),github_url:ws.Type.String()});gC.MatchRequest=ws.Type.Object({source:ws.Type.String()});var Iua=ws.Type.Object({snippets:ws.Type.Array(Sua)});gC.MatchResponse=ws.Type.Union([Iua,gC.MatchError]);gC.FileMatchRequest=ws.Type.Object({cursor:ws.Type.String()});var xua=ws.Type.Object({commit_id:ws.Type.String(),license:ws.Type.String(),nwo:ws.Type.String(),path:ws.Type.String(),url:ws.Type.String()}),wua=ws.Type.Object({has_next_page:ws.Type.Boolean(),cursor:ws.Type.String()}),Rua=ws.Type.Object({count:ws.Type.Record(ws.Type.String(),ws.Type.String())}),Pua=ws.Type.Object({file_matches:ws.Type.Array(xua),page_info:wua,license_stats:Rua});gC.FileMatchResponse=ws.Type.Union([Pua,gC.MatchError])});var Gri=T(BD=>{"use strict";f();var kua=BD&&BD.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Dua=BD&&BD.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Uri=BD&&BD.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(FB,"__esModule",{value:!0});FB.MinTokenLength=void 0;FB.lexemeLength=Hri;FB.offsetLastLexemes=Bua;FB.hasMinLexemeLength=Lua;var uwe=new RegExp("[_\\p{L}\\p{Nd}]+|====+|----+|####+|////+|\\*\\*\\*\\*+|[\\p{P}\\p{S}]","gu");FB.MinTokenLength=65;function Hri(t){let e=0,r;uwe.lastIndex=0;do if(r=uwe.exec(t),r&&(e+=1),e>=FB.MinTokenLength)break;while(r);return e}a(Hri,"lexemeLength");function Oua(t,e){let r=0,n;uwe.lastIndex=0;do if(n=uwe.exec(t),n&&(r+=1,r>=e))return uwe.lastIndex;while(n);return t.length}a(Oua,"offsetFirstLexemes");function Bua(t,e){let r=t.split("").reverse().join(""),n=Oua(r,e);return r.length-n}a(Bua,"offsetLastLexemes");function Lua(t){return Hri(t)>=FB.MinTokenLength}a(Lua,"hasMinLexemeLength")});var Kri=T(UB=>{"use strict";f();var Fua=UB&&UB.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Uua=UB&&UB.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zri=UB&&UB.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oVri(E,()=>$ri.Match(E,p)));if(!h||Wri(h)||!h.snippets.length){Yur.codeReferenceLogger.info(s,"No match found");return}Yur.codeReferenceLogger.info(s,"Match found");let{snippets:m}=h,g=m.map(async E=>{let _=await o.invokeFunction(I=>Vri(I,()=>$ri.FilesForMatch(I,{cursor:E.cursor})));if(!_||Wri(_))return;let v=_.file_matches,b=_.license_stats;return{match:E,files:v,licenseStats:b}}),y=(await Promise.all(g)).filter(E=>E!==void 0);if(y.length)for(let E of y){let _=new Set(Object.keys(E.licenseStats?.count??{}));_.has("NOASSERTION")&&(_.delete("NOASSERTION"),_.add("unknown"));let v=Array.from(_).sort(),b=n,I=n+E.match.matched_source.length,x=u.positionAt(b),w=u.positionAt(I);await l.handleIPCodeCitation({inDocumentUri:e,offsetStart:b,offsetEnd:I,version:u.version,location:{start:x,end:w},matchingText:p,details:v.map(R=>({license:R,url:E.match.github_url}))})}}a(Wua,"fetchCitations")});var rni=T(qU=>{"use strict";f();Object.defineProperty(qU,"__esModule",{value:!0});qU.editDistance=Xri;qU.emptyLexDictionary=Zri;qU.reverseLexDictionary=eni;qU.lexGeneratorWords=tni;qU.lexicalAnalyzer=Kur;qU.lexEditDistance=zua;function Xri(t,e,r=(n,o)=>n===o?0:1){if(e.length===0||t.length===0)return{distance:e.length,startOffset:0,endOffset:0};let n=new Array(e.length+1).fill(0),o=new Array(e.length+1).fill(0),s=new Array(t.length+1).fill(0),c=new Array(t.length+1).fill(0),l=e[0];for(let d=0;d0?d-1:0;for(let d=1;d0&&(yield e),e=o,n=s)}e.length>0&&(yield e)}a(tni,"lexGeneratorWords");function Kur(t,e,r,n){let o=[],s=0;for(let c of r(t))n(c)&&(e.has(c)||e.set(c,e.size),o.push([e.get(c),s])),s+=c.length;return[o,e]}a(Kur,"lexicalAnalyzer");function Jri(t){return t!==" "}a(Jri,"notSingleSpace");function zua(t,e,r=tni){let[n,o]=Kur(t,Zri(),r,Jri),[s,c]=Kur(e,o,r,Jri);if(s.length===0||n.length===0)return{lexDistance:s.length,startOffset:0,endOffset:0,haystackLexLength:n.length,needleLexLength:s.length};let l=eni(c),u=s.length,d=l[s[0][0]],p=l[s[u-1][0]];function h(y,E,_,v){if(v===0||v===u-1){let b=l[n[_][0]];return v===0&&b.endsWith(d)||v===u-1&&b.startsWith(p)?0:1}else return y===E?0:1}a(h,"compare");let m=Xri(n.map(y=>y[0]),s.map(y=>y[0]),h),g=n[m.startOffset][1],A=m.endOffset0&&t[A-1]===" "&&--A,{lexDistance:m.distance,startOffset:g,endOffset:A,haystackLexLength:n.length,needleLexLength:s.length}}a(zua,"lexEditDistance")});var Jur=T(TK=>{"use strict";f();Object.defineProperty(TK,"__esModule",{value:!0});TK.PartialAcceptTriggerKind=void 0;TK.computeCompCharLen=Yua;TK.countLines=Kua;TK.computeCompletionText=Jua;var nni;(function(t){t[t.Unknown=0]="Unknown",t[t.Word=1]="Word",t[t.Line=2]="Line",t[t.Suggest=3]="Suggest"})(nni||(TK.PartialAcceptTriggerKind=nni={}));function Yua(t,e){return t.compType==="partial"?t.acceptedLength:e.length}a(Yua,"computeCompCharLen");function Kua(t){return t.length===0?0:t.split(` +`).length}a(Kua,"countLines");function Jua(t,e){return e.compType==="partial"?t.substring(0,e.acceptedLength):t}a(Jua,"computeCompletionText")});var pni=T(Pst=>{"use strict";f();Object.defineProperty(Pst,"__esModule",{value:!0});Pst.postRejectionTasks=lda;Pst.postInsertionTasks=uda;var Rst=Po(),sni=Sz(),Xua=Sle(),wst=yJn(),Zua=Urt(),eda=Hor(),ani=dor(),cni=pue(),Hue=uc(),ini=Oit(),tda=wue(),rda=Kri(),oni=rni(),nda=Jur(),GU=xp(),ida=aC(),lni=uIe(),oda=rK(),HU=new Hue.Logger("postInsertion"),uni=[{seconds:15,captureCode:!1,captureRejection:!1},{seconds:30,captureCode:!0,captureRejection:!0},{seconds:120,captureCode:!1,captureRejection:!1},{seconds:300,captureCode:!1,captureRejection:!1},{seconds:600,captureCode:!1,captureRejection:!1}],dni=50,sda=1500,ada=.5,cda=500,Xur={triggerPostInsertionSynchroneously:!1,captureCode:!1,captureRejection:!1};async function fni(t,e,r,n,o){let s=t.get(Rst.IInstantiationService),c=t.get(Hue.ICompletionsLogTargetService),l=await t.get(ani.ICompletionsFileReaderService).getOrReadTextDocumentWithFakeClientProperties({uri:e});if(l.status!=="valid")return HU.info(c,`Could not get document for ${e}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1},capturedCode:"",terminationOffset:0};let u=l.document,d=u.getText(),p=d.substring(0,n),h=u.positionAt(n),m=await s.invokeFunction(tda.extractPrompt,r.properties.headerRequestId,(0,eda.createCompletionState)(u,h),r),g=m.type==="prompt"?m.prompt:{prefix:p,suffix:"",isFimEnabled:!1};if(g.isFimEnabled&&o!==void 0){let A=d.substring(n,o);return g.suffix=d.substring(o),{prompt:g,capturedCode:A,terminationOffset:0}}else{let A=d.substring(n),y=(0,ini.contextIndentationFromText)(p,n,u.detectedLanguageId),_=(0,ini.indentationBlockFinished)(y,void 0)(A),v=Math.min(d.length,n+(_?_*2:cda)),b=d.substring(n,v);return{prompt:g,capturedCode:b,terminationOffset:_??-1}}}a(fni,"captureCode");function lda(t,e,r,n,o){let s=t.get(Hue.ICompletionsLogTargetService),c=t.get(Rst.IInstantiationService),l=t.get(sni.ICompletionsTelemetryService),u=t.get(lni.ICompletionsPromiseQueueService);o.forEach(({completionText:m,completionTelemetryData:g})=>{HU.debug(s,`${e}.rejected choiceIndex: ${g.properties.choiceIndex}`),c.invokeFunction(cni.telemetryRejected,e,g)});let d=c.createInstance(wst.ChangeTracker,n,r-1),p=c.createInstance(wst.ChangeTracker,n,r),h=a(async m=>{HU.debug(s,`Original offset: ${r}, Tracked offset: ${d.offset}`);let{completionTelemetryData:g}=o[0],{prompt:A,capturedCode:y,terminationOffset:E}=await c.invokeFunction(fni,n,g,d.offset+1,p.offset),_={hypotheticalPromptJson:JSON.stringify({prefix:A.prefix,context:A.context}),hypotheticalPromptSuffixJson:JSON.stringify(A.suffix)},v=g.extendedBy({..._,capturedCodeJson:JSON.stringify(y)},{timeout:m.seconds,insertionOffset:r,trackedOffset:d.offset,terminationOffsetInCapturedCode:E});HU.debug(s,`${e}.capturedAfterRejected choiceIndex: ${g.properties.choiceIndex}`,v),c.invokeFunction(GU.telemetry,e+".capturedAfterRejected",v,GU.TelemetryStore.Enhanced)},"checkInCode");uni.filter(m=>m.captureRejection).map(m=>d.push((0,GU.telemetryCatch)(l,u,()=>h(m),"postRejectionTasks"),m.seconds*1e3))}a(lda,"postRejectionTasks");function uda(t,e,r,n,o,s,c,l){let u=t.get(Hue.ICompletionsLogTargetService),d=t.get(Rst.IInstantiationService),p=t.get(lni.ICompletionsPromiseQueueService),h=t.get(sni.ICompletionsTelemetryService),m=t.get(oda.ICompletionsRuntimeModeService),g=s.extendedBy({compType:c.compType},{compCharLen:c.acceptedLength,numLines:c.acceptedLines});HU.debug(u,`${e}.accepted choiceIndex: ${g.properties.choiceIndex}`),d.invokeFunction(cni.telemetryAccepted,e,g);let A=r;r=(0,nda.computeCompletionText)(r,c);let y=r.trim(),E=d.createInstance(wst.ChangeTracker,o,n),_=d.createInstance(wst.ChangeTracker,o,n+r.length),v=a(async b=>{await d.invokeFunction(hda,e,y,n,o,b,g,E,_)},"stillInCodeCheck");if(Xur.triggerPostInsertionSynchroneously&&m.isRunningInTest()){let b=v({seconds:0,captureCode:Xur.captureCode,captureRejection:Xur.captureRejection});p.register(b)}else uni.map(b=>E.push((0,GU.telemetryCatch)(h,p,()=>v(b),"postInsertionTasks"),b.seconds*1e3));d.invokeFunction(b=>(0,GU.telemetryCatch)(h,p,dda,"post insertion citation check")(b,o,A,r,n,l))}a(uda,"postInsertionTasks");async function dda(t,e,r,n,o,s){let c=t.get(Hue.ICompletionsLogTargetService),l=t.get(ida.ICompletionsTextDocumentManagerService),u=t.get(Xua.ICompletionsCopilotTokenManager),d=t.get(Zua.ICompletionsCitationManager);if(!s||(s.ip_code_citations?.length??0)<1){if(u.getLastToken()?.getTokenValue("sn")==="1")return;await(0,rda.fetchCitations)(t,e,n,o);return}let p=await l.getTextDocument({uri:e});if(p){let h=Zur(p.getText(),n,dni,o);h.stillInCodeHeuristic&&(o=h.foundOffset)}for(let h of s.ip_code_citations){let m=fda(r.length,n.length,h.start_offset);if(m===void 0){HU.info(c,`Full completion for ${e} contains a reference matching public code, but the partially inserted text did not include the match.`);continue}let g=o+m,A=p?.positionAt(g),y=o+pda(r.length,n.length,h.stop_offset),E=p?.positionAt(y),_=A&&E?p?.getText({start:A,end:E}):"";await d.handleIPCodeCitation({inDocumentUri:e,offsetStart:g,offsetEnd:y,version:p?.version,location:A&&E?{start:A,end:E}:void 0,matchingText:_,details:h.details.citations})}}a(dda,"citationCheck");function fda(t,e,r){if(!(ee))return r}a(fda,"computeCitationStart");function pda(t,e,r){return e{"use strict";f();Object.defineProperty(Ym,"__esModule",{value:!0});Ym.LastGhostText=Ym.ICompletionsLastGhostText=void 0;Ym.rejectLastShown=gni;Ym.setLastShown=yda;Ym.handleGhostTextShown=Eda;Ym.handleGhostTextPostInsert=Cda;Ym.handlePartialGhostTextPostInsert=vda;var mda=qr(),hni=uc(),tdr=pni(),kst=Jur(),mni=gU(),rdr=pue(),gda=new hni.Logger("ghostText");Ym.ICompletionsLastGhostText=(0,mda.createServiceIdentifier)("ICompletionsLastGhostText");var edr=class{static{a(this,"LastGhostText")}constructor(){this.#n=[],this.linesAccepted=0}#e;#t;#n;get position(){return this.#e}get shownCompletions(){return this.#n||[]}get uri(){return this.#t}resetState(){this.#t=void 0,this.#e=void 0,this.#n=[],this.resetPartialAcceptanceState()}setState({uri:e},r){this.#t=e,this.#e=r,this.#n=[]}resetPartialAcceptanceState(){this.partiallyAcceptedLength=0,this.totalLength=void 0,this.linesLeft=void 0,this.linesAccepted=0}};Ym.LastGhostText=edr;function Ada(t){let e=[];return t.shownCompletions.forEach(r=>{if(r.displayText&&r.telemetry){let n,o;t.partiallyAcceptedLength?(n=r.displayText.substring(t.partiallyAcceptedLength-1),o=r.telemetry.extendedBy({compType:"partial"},{compCharLen:n.length})):(n=r.displayText,o=r.telemetry);let s={completionText:n,completionTelemetryData:o,offset:r.offset};e.push(s)}}),e}a(Ada,"computeRejectedCompletions");function gni(t,e){let r=t.get(Ym.ICompletionsLastGhostText);if(!r.position||!r.uri)return;let n=Ada(r);n.length>0&&(0,tdr.postRejectionTasks)(t,"ghostText",e??n[0].offset,r.uri,n),r.resetState(),r.resetPartialAcceptanceState()}a(gni,"rejectLastShown");function yda(t,e,r,n){let o=t.get(Ym.ICompletionsLastGhostText);return o.position&&o.uri&&!(o.position.line===r.line&&o.position.character===r.character&&o.uri.toString()===e.uri.toString())&&n!==mni.ResultType.TypingAsSuggested&&gni(t,e.offsetAt(o.position)),o.setState(e,r),o.index}a(yda,"setLastShown");function Eda(t,e){let r=t.get(hni.ICompletionsLogTargetService),n=t.get(Ym.ICompletionsLastGhostText);if(n.index=e.index,!n.shownCompletions.find(o=>o.index===e.index)&&(e.uri===n.uri&&n.position?.line===e.position.line&&n.position?.character===e.position.character&&n.shownCompletions.push(e),e.displayText)){let o=e.resultType!==mni.ResultType.Network;gda.debug(r,`[${e.telemetry.properties.headerRequestId}] shown choiceIndex: ${e.telemetry.properties.choiceIndex}, fromCache ${o}`),e.telemetry.measurements.compCharLen=e.displayText.length,(0,rdr.telemetryShown)(t,e)}}a(Eda,"handleGhostTextShown");function _da(t,e,r){let n=t.get(Ym.ICompletionsLastGhostText);n.linesLeft===void 0&&(n.linesAccepted=(0,kst.countLines)(e.insertText.substring(0,r)),n.linesLeft=(0,kst.countLines)(e.displayText));let o=(0,kst.countLines)(e.displayText);n.linesLeft>o&&(n.linesAccepted+=n.linesLeft-o,n.lastLineAcceptedLength=n.partiallyAcceptedLength,n.linesLeft=o),n.partiallyAcceptedLength=(n.lastLineAcceptedLength||0)+r}a(_da,"handleLineAcceptance");function Cda(t,e){let r=t.get(Ym.ICompletionsLastGhostText),n;return r.partiallyAcceptedLength?n={compType:"full",acceptedLength:(r.partiallyAcceptedLength||0)+e.displayText.length,acceptedLines:r.linesAccepted+(r.linesLeft??0)}:n={compType:"full",acceptedLength:e.displayText.length,acceptedLines:(0,kst.countLines)(e.displayText)},r.resetState(),(0,tdr.postInsertionTasks)(t,rdr.GHOST_TEXT_CATEGORY,e.displayText,e.offset,e.uri,e.telemetry,n,e.copilotAnnotations)}a(Cda,"handleGhostTextPostInsert");function vda(t,e,r){let n=t.get(Ym.ICompletionsLastGhostText);_da(t,e,r);let o={compType:"partial",acceptedLength:n.partiallyAcceptedLength||0,acceptedLines:n.linesAccepted};return(0,tdr.postInsertionTasks)(t,rdr.GHOST_TEXT_CATEGORY,e.displayText,e.offset,e.uri,e.telemetry,o,e.copilotAnnotations)}a(vda,"handlePartialGhostTextPostInsert")});var Ani=T(idr=>{"use strict";f();Object.defineProperty(idr,"__esModule",{value:!0});idr.normalizeIndentCharacter=bda;function bda(t,e,r){function n(s,c,l){let u=new RegExp(`^(${c})+`,"g");return s.split(` `).map(d=>{let p=d.replace(u,""),h=d.length-p.length;return l(h)+p}).join(` `)}a(n,"replace");let o;if(t.tabSize===void 0||typeof t.tabSize=="string"?o=4:o=t.tabSize,t.insertSpaces===!1){let s=a(c=>n(c," ",l=>" ".repeat(Math.floor(l/o))+" ".repeat(l%o)),"r");e.displayText=s(e.displayText),e.completionText=s(e.completionText)}else if(t.insertSpaces===!0){let s=a(c=>n(c," ",l=>" ".repeat(l*o)),"r");if(e.displayText=s(e.displayText),e.completionText=s(e.completionText),r){let c=a(l=>{if(l==="")return l;let u=l.split(` -`)[0],d=u.length-u.trimStart().length,p=d%o;if(p!==0&&d>0){let h=" ".repeat(p);return n(l,h,m=>" ".repeat((Math.floor(m/o)+1)*o))}else return l},"re");e.displayText=c(e.displayText),e.completionText=c(e.completionText)}}return e}a(vla,"normalizeIndentCharacter")});var Eri=T(Uur=>{"use strict";f();Object.defineProperty(Uur,"__esModule",{value:!0});Uur.completionsFromGhostTextResults=Ila;var bla=Np(),Tat=que(),Tla=yri(),Sla=HU();function Ila(t,e,r,n,o,s){let c=r.lineAt(n),l=t.map(u=>{let d=Tat.LocationFactory.range(Tat.LocationFactory.position(n.line,0),Tat.LocationFactory.position(n.line,n.character+u.suffixCoverage)),p="";if(o&&(u.completion=(0,Tla.normalizeIndentCharacter)(o,u.completion,c.isEmptyOrWhitespace)),c.isEmptyOrWhitespace&&(u.completion.displayNeedsWsOffset||u.completion.completionText.startsWith(c.text)))p=u.completion.completionText;else{let m=Tat.LocationFactory.range(d.start,n);p=r.getText(m)+u.completion.displayText}return{uuid:(0,bla.generateUuid)(),insertText:p,range:d,uri:r.uri,index:u.completion.completionIndex,telemetry:u.telemetry,displayText:u.completion.displayText,position:n,offset:r.offsetAt(n),resultType:e,copilotAnnotations:u.copilotAnnotations,clientCompletionId:u.clientCompletionId}});if(e===Sla.ResultType.TypingAsSuggested&&s!==void 0){let u=l.find(d=>d.index===s);if(u){let d=l.filter(p=>p.index!==s);l=[u,...d]}}return l}a(Ila,"completionsFromGhostTextResults")});var Gur=T(YR=>{"use strict";f();var xla=YR&&YR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wla=YR&&YR.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Rla=YR&&YR.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ou.toString(16).padStart(2,"0")).join("");return`${r}.${l}`}a(Pla,"createRequestHMAC");async function kla(t){let e=typeof t=="string"?new TextEncoder().encode(t):t,r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),o="";for(let s of n)o+=s.toString(16).padStart(2,"0");return o}a(kla,"createSha256Hash");var Qur=new Map;function Nla(t){if(Qur.has(t))return Qur.get(t);let e=Dla(t);return Qur.set(t,e),e}a(Nla,"getCachedSha256Hash");function Dla(t){let e=new qur;return e.update(t),e.digest()}a(Dla,"createSha256HashSyncInsecure");function AQ(t,e=32){return t instanceof ArrayBuffer?(0,Cri.encodeHex)(Cri.VSBuffer.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}a(AQ,"toHexString");function YD(t,e){return(t>>>e|t<<32-e)>>>0}a(YD,"rightRotate");var qur=class t{static{a(this,"StringSHA256Insecure")}static{this._k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]}static{this._bigBlock32=new DataView(new ArrayBuffer(256))}constructor(){this._h0=1779033703,this._h1=3144134277,this._h2=1013904242,this._h3=2773480762,this._h4=1359893119,this._h5=2600822924,this._h6=528734635,this._h7=1541459225,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let r=e.length;if(r===0)return;let n=this._buff,o=this._buffLen,s=this._leftoverHighSurrogate,c,l;for(s!==0?(c=s,l=-1,s=0):(c=e.charCodeAt(0),l=0);;){let u=c;if(Sat.isHighSurrogate(c))if(l+1>>6,e[r++]=128|(n&63)>>>0):n<65536?(e[r++]=224|(n&61440)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0):(e[r++]=240|(n&1835008)>>>18,e[r++]=128|(n&258048)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),AQ(this._h0)+AQ(this._h1)+AQ(this._h2)+AQ(this._h3)+AQ(this._h4)+AQ(this._h5)+AQ(this._h6)+AQ(this._h7)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,r=this._buffDV,n=t._k;for(let m=0;m<64;m+=4)e.setUint32(m,r.getUint32(m,!1),!1);for(let m=16;m<64;m++){let g=m*4,A=e.getUint32((m-15)*4,!1),y=e.getUint32((m-2)*4,!1),E=YD(A,7)^YD(A,18)^A>>>3,_=YD(y,17)^YD(y,19)^y>>>10,v=e.getUint32((m-16)*4,!1),b=e.getUint32((m-7)*4,!1);e.setUint32(g,v+E+b+_>>>0,!1)}let o=this._h0,s=this._h1,c=this._h2,l=this._h3,u=this._h4,d=this._h5,p=this._h6,h=this._h7;for(let m=0;m<64;m++){let g=YD(u,6)^YD(u,11)^YD(u,25),A=u&d^~u&p,y=h+g+A+n[m]+e.getUint32(m*4,!1)>>>0,E=YD(o,2)^YD(o,13)^YD(o,22),_=o&s^o&c^s&c,v=E+_>>>0;h=p,p=d,d=u,u=l+y>>>0,l=c,c=s,s=o,o=y+v>>>0}this._h0=this._h0+o>>>0,this._h1=this._h1+s>>>0,this._h2=this._h2+c>>>0,this._h3=this._h3+l>>>0,this._h4=this._h4+u>>>0,this._h5=this._h5+d>>>0,this._h6=this._h6+p>>>0,this._h7=this._h7+h>>>0}}});var Hur=T(Iat=>{"use strict";f();Object.defineProperty(Iat,"__esModule",{value:!0});Iat.isInlineSuggestionFromTextAfterCursor=_ri;Iat.isInlineSuggestion=Mla;function _ri(t){let e=Ola(t),r=Bla(t);if(!(e&&!r))return e&&r}a(_ri,"isInlineSuggestionFromTextAfterCursor");function Mla(t,e){let r=e.lineNumber-1,o=(t.lines[r]??"").substring(e.column-1);return _ri(o)}a(Mla,"isInlineSuggestion");function Ola(t){return t.trim().length!==0}a(Ola,"isMiddleOfTheLineFromTextAfterCursor");function Bla(t){let e=t.trim();return/^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(e)}a(Bla,"isValidMiddleOfTheLineFromTextAfterCursor")});var wat=T(yQ=>{"use strict";f();Object.defineProperty(yQ,"__esModule",{value:!0});yQ.NoOpStatusReporter=yQ.StatusReporter=yQ.ICompletionsStatusReporter=void 0;var Lla=qr();yQ.ICompletionsStatusReporter=(0,Lla.createServiceIdentifier)("ICompletionsStatusReporter");var xat=class{static{a(this,"StatusReporter")}#e=0;#t="Normal";#n;#r;#i=!0;get busy(){return this.#e>0}withProgress(e){return this.#t==="Warning"&&this.forceNormal(),this.#e++===0&&this.#o(),e().finally(()=>{--this.#e===0&&this.#o()})}forceStatus(e,r,n){this.#t===e&&this.#n===r&&!n&&!this.#r&&!this.#i||(this.#t=e,this.#n=r,this.#r=n,this.#i=!1,this.#o())}forceNormal(){this.#t!=="Inactive"&&this.forceStatus("Normal")}setError(e,r){this.forceStatus("Error",e,r)}setWarning(e){this.#t!=="Error"&&this.forceStatus("Warning",e)}setInactive(e){this.#t==="Error"||this.#t==="Warning"||this.forceStatus("Inactive",e)}clearInactive(){this.#t==="Inactive"&&this.forceStatus("Normal")}#o(){let e={kind:this.#t,message:this.#n,busy:this.busy,command:this.#r};this.didChange(e)}};yQ.StatusReporter=xat;var jur=class extends xat{static{a(this,"NoOpStatusReporter")}didChange(){}};yQ.NoOpStatusReporter=jur});var Tri=T(sg=>{"use strict";f();Object.defineProperty(sg,"__esModule",{value:!0});sg.AdoRepoId=sg.GithubRepoId=sg.IGitService=void 0;sg.getGitHubRepoInfoFromContext=Qla;sg.getOrderedRepoInfosFromContext=qla;sg.getOrderedRemoteUrlsFromContext=Vur;sg.parseRemoteUrl=Wur;sg.toGithubNwo=vri;sg.toGithubWebUrl=Gla;sg.getGithubRepoIdFromFetchUrl=zur;sg.getAdoRepoIdFromFetchUrl=bri;sg.normalizeFetchUrl=Hla;var Fla=qr(),$ur=C0(),Ula=Ru();sg.IGitService=(0,Fla.createServiceIdentifier)("IGitService");function Qla(t){for(let e of Vur(t))if(e){let r=zur(e);if(r)return{id:r,remoteUrl:e}}}a(Qla,"getGitHubRepoInfoFromContext");function*qla(t){for(let e of Vur(t)){let r=zur(e)??bri(e);r&&(yield{repoId:r,fetchUrl:e})}}a(qla,"getOrderedRepoInfosFromContext");function Vur(t){let e=new Set;if(t.remoteFetchUrls?.length===1)return e.add(t.remoteFetchUrls[0]),e;let r=t.remotes.findIndex(o=>o===t.upstreamRemote);if(r!==-1){let o=t.remoteFetchUrls?.[r];o&&e.add(o)}let n=t.remotes.findIndex(o=>o==="origin");if(n!==-1){let o=t.remoteFetchUrls?.[n];o&&e.add(o)}for(let o of t.remoteFetchUrls??[])o&&e.add(o);return e}a(Vur,"getOrderedRemoteUrlsFromContext");function Wur(t){t=t.trim();try{if(/^[\w\d\-]+@/i.test(t)){let u=t.split(":");if(u.length!==2)return;t="ssh://"+u[0]+"/"+u[1]}let e=Ula.URI.parse(t),r=e.authority,n=e.path;if(!((0,$ur.equalsIgnoreCase)(e.scheme,"ssh")||(0,$ur.equalsIgnoreCase)(e.scheme,"https")||(0,$ur.equalsIgnoreCase)(e.scheme,"http")))return;let o=r.split("@");if(o.length>2)return;let s=o.at(-1);if(!s)return;let c=s.toLowerCase().replace(/:\d+$/,"");return{host:c.replace(/^[\w\-]+-/,"").replace(/-[\w\-]+$/,""),rawHost:c,path:n}}catch{return}}a(Wur,"parseRemoteUrl");var Rat=class t{static{a(this,"GithubRepoId")}static parse(e){let r=e.split("/");if(r.length===2)return new t(r[0],r[1])}constructor(e,r,n="github.com"){this.org=e,this.repo=r,this.host=n,this.type="github"}toString(){return vri(this)}};sg.GithubRepoId=Rat;function vri(t){return`${t.org}/${t.repo}`.toLowerCase()}a(vri,"toGithubNwo");function Gla(t){return`https://${t.host}/${t.org}/${t.repo}`}a(Gla,"toGithubWebUrl");function zur(t){let e=Wur(t);if(!e)return;let n=["github.com","ghe.com"].find(c=>e.host===c||e.host.endsWith("."+c));if(!n)return;let o=n==="ghe.com"?e.rawHost:"github.com",s=e.path.match(/^\/?([^/]+)\/([^/]+?)(\/|\.git\/?)?$/i);return s?new Rat(s[1],s[2],o):void 0}a(zur,"getGithubRepoIdFromFetchUrl");var Pde=class{static{a(this,"AdoRepoId")}constructor(e,r,n){this.org=e,this.project=r,this.repo=n,this.type="ado"}toString(){return`${this.org}/${this.project}/${this.repo}`.toLowerCase()}};sg.AdoRepoId=Pde;function bri(t){let e=Wur(t);if(e){if(e.host==="dev.azure.com"){let r=e.path.match(/^\/?(?[^/]+)\/(?[^/]+?)\/_git\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return r?.groups?new Pde(r.groups.org,r.groups.project,r.groups.repo):void 0}if(e.host==="ssh.dev.azure.com"){let r=e.path.match(/^\/?v3\/(?[^/]+)\/(?[^/]+?)\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return r?.groups?new Pde(r.groups.org,r.groups.project,r.groups.repo):void 0}if(e.host.endsWith(".visualstudio.com")){let r=e.host.match(/^(?[^\.]+)\.visualstudio\.com$/i);if(!r?.groups)return;let n=e.path.match(/^\/(v3\/)(?[^/]+?)\/(?[^/]+?)\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i)??e.path.match(/^\/?((?[^/]+?)\/)?(?[^/]+?)\/_git\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return n?.groups?new Pde(r.groups.org,n.groups.project,n.groups.repo):void 0}}}a(bri,"getAdoRepoIdFromFetchUrl");function Hla(t){if(/^[\w\d\-]+@[\w\d\.\-]+:/.test(t))return t=t.replace(/([\w\d\-]+)@([\w\d\.\-]+):(.+)/,"https://$2/$3"),t;let e;try{e=new URL(t)}catch{return t}let r=e.pathname.match(/^\/scm\/scm\.git/),n=new URL("https://"+e.hostname+e.pathname);return!r&&/^\/scm\/[^/]/.test(n.pathname)&&(n.pathname=n.pathname.replace(/^\/scm\//,"/")),n.toString()}a(Hla,"normalizeFetchUrl")});var Jur=T(yJ=>{"use strict";f();Object.defineProperty(yJ,"__esModule",{value:!0});yJ.ComputationStatus=void 0;yJ.tryGetGitHubNWO=Vla;yJ.extractRepoInfoInBackground=Wla;yJ.extractRepoInfo=Sri;var Yur=Tri(),jla=UU(),$la=BB(),hRe=qU();function Vla(t){if(t!==void 0&&t!==mRe.PENDING&&t.repoId?.type==="github")return(t.repoId.org+"/"+t.repoId.repo).toLowerCase()}a(Vla,"tryGetGitHubNWO");function Wla(t,e){let r=(0,hRe.dirname)(e);return zla(t,r)}a(Wla,"extractRepoInfoInBackground");var zla=Xla(Sri,1e4);async function Sri(t,e){let r=t.get(jla.ICompletionsFileSystemService),n=(0,hRe.getFsUri)(e);if(!n)return;let o=await Kla(r,n);if(!o)return;let s=(0,hRe.joinPath)(o,".git","config"),c;try{c=await r.readFileString(s)}catch{return}let l=Jla(c)??"",u=Yla(l),d={uri:o};return u===void 0?{baseFolder:d,url:l,hostname:"",pathname:"",repoId:void 0}:{baseFolder:d,url:l,hostname:u.host,pathname:u.path,repoId:u.repoId}}a(Sri,"extractRepoInfo");function Yla(t){let e=(0,Yur.parseRemoteUrl)(t);if(!e)return;let r=(0,Yur.getGithubRepoIdFromFetchUrl)(t)??(0,Yur.getAdoRepoIdFromFetchUrl)(t);return{...e,repoId:r}}a(Yla,"parseRepoUrl");async function Kla(t,e){let r=e+"_add_to_make_longer";for(;e!=="file:///"&&e.length{let c=JSON.stringify(s),l=r.get(c);if(l)return l.result;if(n.has(c))return mRe.PENDING;let u=t(o,...s);return n.add(c),u.then(d=>{r.set(c,new Kur(d)),n.delete(c)}),mRe.PENDING}}a(Xla,"computeInBackgroundAndMemoize")});var xri=T(Xur=>{"use strict";f();Object.defineProperty(Xur,"__esModule",{value:!0});Xur.isRepetitive=eua;var Zla=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60}];function eua(t){let e=t.slice();return e.reverse(),Iri(e)||Iri(e.filter(r=>r.trim().length>0))}a(eua,"isRepetitive");function Iri(t){let e=tua(t);for(let r of Zla){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(tua,"kmp_prefix_function")});var Rri=T(gRe=>{"use strict";f();Object.defineProperty(gRe,"__esModule",{value:!0});gRe.maybeSnipCompletionImpl=wri;gRe.postProcessChoiceInContext=aua;gRe.checkSuffix=cua;var rua=DK(),EJ=Dp(),nua=xri();function iua(t,e,r,n){let o="}";try{o=(0,rua.getBlockCloseToken)(e.detectedLanguageId)??"}"}catch{}return wri({getLineText:a(s=>e.lineAt(s).text,"getLineText"),getLineCount:a(()=>e.lineCount,"getLineCount")},r,n,o)}a(iua,"maybeSnipCompletion");function wri(t,e,r,n){let o=oua(r),s=o.lines;if(s.length===1)return r;for(let c=1;c=t.getLineCount()?void 0:t.getLineText(y),h!==void 0&&h.trim()==="")u++;else break}let m,g;for(;m=c+p+d,g=m>=s.length?void 0:s[m],g!==void 0&&g.trim()==="";)d++;let A=m===s.length-1;if(!g||!(h&&(A?h.startsWith(g)||g.startsWith(h):h===g&&g.trim()===n))){l=!1;break}}if(l)return s.slice(0,c).join(o.newLineCharacter)}return r}a(wri,"maybeSnipCompletionImpl");function oua(t){let e=t.includes(`\r +`)[0],d=u.length-u.trimStart().length,p=d%o;if(p!==0&&d>0){let h=" ".repeat(p);return n(l,h,m=>" ".repeat((Math.floor(m/o)+1)*o))}else return l},"re");e.displayText=c(e.displayText),e.completionText=c(e.completionText)}}return e}a(bda,"normalizeIndentCharacter")});var yni=T(odr=>{"use strict";f();Object.defineProperty(odr,"__esModule",{value:!0});odr.completionsFromGhostTextResults=xda;var Tda=Ip(),Dst=tue(),Sda=Ani(),Ida=gU();function xda(t,e,r,n,o,s){let c=r.lineAt(n),l=t.map(u=>{let d=Dst.LocationFactory.range(Dst.LocationFactory.position(n.line,0),Dst.LocationFactory.position(n.line,n.character+u.suffixCoverage)),p="";if(o&&(u.completion=(0,Sda.normalizeIndentCharacter)(o,u.completion,c.isEmptyOrWhitespace)),c.isEmptyOrWhitespace&&(u.completion.displayNeedsWsOffset||u.completion.completionText.startsWith(c.text)))p=u.completion.completionText;else{let m=Dst.LocationFactory.range(d.start,n);p=r.getText(m)+u.completion.displayText}return{uuid:(0,Tda.generateUuid)(),insertText:p,range:d,uri:r.uri,index:u.completion.completionIndex,telemetry:u.telemetry,displayText:u.completion.displayText,position:n,offset:r.offsetAt(n),resultType:e,copilotAnnotations:u.copilotAnnotations,clientCompletionId:u.clientCompletionId}});if(e===Ida.ResultType.TypingAsSuggested&&s!==void 0){let u=l.find(d=>d.index===s);if(u){let d=l.filter(p=>p.index!==s);l=[u,...d]}}return l}a(xda,"completionsFromGhostTextResults")});var cdr=T(FR=>{"use strict";f();var wda=FR&&FR.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rda=FR&&FR.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pda=FR&&FR.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ou.toString(16).padStart(2,"0")).join("");return`${r}.${l}`}a(kda,"createRequestHMAC");async function Dda(t){let e=typeof t=="string"?new TextEncoder().encode(t):t,r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),o="";for(let s of n)o+=s.toString(16).padStart(2,"0");return o}a(Dda,"createSha256Hash");var sdr=new Map;function Nda(t){if(sdr.has(t))return sdr.get(t);let e=Mda(t);return sdr.set(t,e),e}a(Nda,"getCachedSha256Hash");function Mda(t){let e=new adr;return e.update(t),e.digest()}a(Mda,"createSha256HashSyncInsecure");function jU(t,e=32){return t instanceof ArrayBuffer?(0,Eni.encodeHex)(Eni.VSBuffer.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}a(jU,"toHexString");function LD(t,e){return(t>>>e|t<<32-e)>>>0}a(LD,"rightRotate");var adr=class t{static{a(this,"StringSHA256Insecure")}static{this._k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]}static{this._bigBlock32=new DataView(new ArrayBuffer(256))}constructor(){this._h0=1779033703,this._h1=3144134277,this._h2=1013904242,this._h3=2773480762,this._h4=1359893119,this._h5=2600822924,this._h6=528734635,this._h7=1541459225,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let r=e.length;if(r===0)return;let n=this._buff,o=this._buffLen,s=this._leftoverHighSurrogate,c,l;for(s!==0?(c=s,l=-1,s=0):(c=e.charCodeAt(0),l=0);;){let u=c;if(Nst.isHighSurrogate(c))if(l+1>>6,e[r++]=128|(n&63)>>>0):n<65536?(e[r++]=224|(n&61440)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0):(e[r++]=240|(n&1835008)>>>18,e[r++]=128|(n&258048)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),jU(this._h0)+jU(this._h1)+jU(this._h2)+jU(this._h3)+jU(this._h4)+jU(this._h5)+jU(this._h6)+jU(this._h7)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,r=this._buffDV,n=t._k;for(let m=0;m<64;m+=4)e.setUint32(m,r.getUint32(m,!1),!1);for(let m=16;m<64;m++){let g=m*4,A=e.getUint32((m-15)*4,!1),y=e.getUint32((m-2)*4,!1),E=LD(A,7)^LD(A,18)^A>>>3,_=LD(y,17)^LD(y,19)^y>>>10,v=e.getUint32((m-16)*4,!1),b=e.getUint32((m-7)*4,!1);e.setUint32(g,v+E+b+_>>>0,!1)}let o=this._h0,s=this._h1,c=this._h2,l=this._h3,u=this._h4,d=this._h5,p=this._h6,h=this._h7;for(let m=0;m<64;m++){let g=LD(u,6)^LD(u,11)^LD(u,25),A=u&d^~u&p,y=h+g+A+n[m]+e.getUint32(m*4,!1)>>>0,E=LD(o,2)^LD(o,13)^LD(o,22),_=o&s^o&c^s&c,v=E+_>>>0;h=p,p=d,d=u,u=l+y>>>0,l=c,c=s,s=o,o=y+v>>>0}this._h0=this._h0+o>>>0,this._h1=this._h1+s>>>0,this._h2=this._h2+c>>>0,this._h3=this._h3+l>>>0,this._h4=this._h4+u>>>0,this._h5=this._h5+d>>>0,this._h6=this._h6+p>>>0,this._h7=this._h7+h>>>0}}});var ldr=T(Mst=>{"use strict";f();Object.defineProperty(Mst,"__esModule",{value:!0});Mst.isInlineSuggestionFromTextAfterCursor=_ni;Mst.isInlineSuggestion=Oda;function _ni(t){let e=Bda(t),r=Lda(t);if(!(e&&!r))return e&&r}a(_ni,"isInlineSuggestionFromTextAfterCursor");function Oda(t,e){let r=e.lineNumber-1,o=(t.lines[r]??"").substring(e.column-1);return _ni(o)}a(Oda,"isInlineSuggestion");function Bda(t){return t.trim().length!==0}a(Bda,"isMiddleOfTheLineFromTextAfterCursor");function Lda(t){let e=t.trim();return/^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(e)}a(Lda,"isValidMiddleOfTheLineFromTextAfterCursor")});var Bst=T($U=>{"use strict";f();Object.defineProperty($U,"__esModule",{value:!0});$U.NoOpStatusReporter=$U.StatusReporter=$U.ICompletionsStatusReporter=void 0;var Fda=qr();$U.ICompletionsStatusReporter=(0,Fda.createServiceIdentifier)("ICompletionsStatusReporter");var Ost=class{static{a(this,"StatusReporter")}#e=0;#t="Normal";#n;#r;#i=!0;get busy(){return this.#e>0}withProgress(e){return this.#t==="Warning"&&this.forceNormal(),this.#e++===0&&this.#o(),e().finally(()=>{--this.#e===0&&this.#o()})}forceStatus(e,r,n){this.#t===e&&this.#n===r&&!n&&!this.#r&&!this.#i||(this.#t=e,this.#n=r,this.#r=n,this.#i=!1,this.#o())}forceNormal(){this.#t!=="Inactive"&&this.forceStatus("Normal")}setError(e,r){this.forceStatus("Error",e,r)}setWarning(e){this.#t!=="Error"&&this.forceStatus("Warning",e)}setInactive(e){this.#t==="Error"||this.#t==="Warning"||this.forceStatus("Inactive",e)}clearInactive(){this.#t==="Inactive"&&this.forceStatus("Normal")}#o(){let e={kind:this.#t,message:this.#n,busy:this.busy,command:this.#r};this.didChange(e)}};$U.StatusReporter=Ost;var udr=class extends Ost{static{a(this,"NoOpStatusReporter")}didChange(){}};$U.NoOpStatusReporter=udr});var bni=T(Km=>{"use strict";f();Object.defineProperty(Km,"__esModule",{value:!0});Km.AdoRepoId=Km.GithubRepoId=Km.IGitService=void 0;Km.getGitHubRepoInfoFromContext=qda;Km.getOrderedRepoInfosFromContext=Gda;Km.getOrderedRemoteUrlsFromContext=fdr;Km.parseRemoteUrl=pdr;Km.toGithubNwo=Cni;Km.toGithubWebUrl=Hda;Km.getGithubRepoIdFromFetchUrl=hdr;Km.getAdoRepoIdFromFetchUrl=vni;Km.normalizeFetchUrl=jda;var Uda=qr(),ddr=m0(),Qda=Eu();Km.IGitService=(0,Uda.createServiceIdentifier)("IGitService");function qda(t){for(let e of fdr(t))if(e){let r=hdr(e);if(r)return{id:r,remoteUrl:e}}}a(qda,"getGitHubRepoInfoFromContext");function*Gda(t){for(let e of fdr(t)){let r=hdr(e)??vni(e);r&&(yield{repoId:r,fetchUrl:e})}}a(Gda,"getOrderedRepoInfosFromContext");function fdr(t){let e=new Set;if(t.remoteFetchUrls?.length===1)return e.add(t.remoteFetchUrls[0]),e;let r=t.remotes.findIndex(o=>o===t.upstreamRemote);if(r!==-1){let o=t.remoteFetchUrls?.[r];o&&e.add(o)}let n=t.remotes.findIndex(o=>o==="origin");if(n!==-1){let o=t.remoteFetchUrls?.[n];o&&e.add(o)}for(let o of t.remoteFetchUrls??[])o&&e.add(o);return e}a(fdr,"getOrderedRemoteUrlsFromContext");function pdr(t){t=t.trim();try{if(/^[\w\d\-]+@/i.test(t)){let u=t.split(":");if(u.length!==2)return;t="ssh://"+u[0]+"/"+u[1]}let e=Qda.URI.parse(t),r=e.authority,n=e.path;if(!((0,ddr.equalsIgnoreCase)(e.scheme,"ssh")||(0,ddr.equalsIgnoreCase)(e.scheme,"https")||(0,ddr.equalsIgnoreCase)(e.scheme,"http")))return;let o=r.split("@");if(o.length>2)return;let s=o.at(-1);if(!s)return;let c=s.toLowerCase().replace(/:\d+$/,"");return{host:c.replace(/^[\w\-]+-/,"").replace(/-[\w\-]+$/,""),rawHost:c,path:n}}catch{return}}a(pdr,"parseRemoteUrl");var Lst=class t{static{a(this,"GithubRepoId")}static parse(e){let r=e.split("/");if(r.length===2)return new t(r[0],r[1])}constructor(e,r,n="github.com"){this.org=e,this.repo=r,this.host=n,this.type="github"}toString(){return Cni(this)}};Km.GithubRepoId=Lst;function Cni(t){return`${t.org}/${t.repo}`.toLowerCase()}a(Cni,"toGithubNwo");function Hda(t){return`https://${t.host}/${t.org}/${t.repo}`}a(Hda,"toGithubWebUrl");function hdr(t){let e=pdr(t);if(!e)return;let n=["github.com","ghe.com"].find(c=>e.host===c||e.host.endsWith("."+c));if(!n)return;let o=n==="ghe.com"?e.rawHost:"github.com",s=e.path.match(/^\/?([^/]+)\/([^/]+?)(\/|\.git\/?)?$/i);return s?new Lst(s[1],s[2],o):void 0}a(hdr,"getGithubRepoIdFromFetchUrl");var jue=class{static{a(this,"AdoRepoId")}constructor(e,r,n){this.org=e,this.project=r,this.repo=n,this.type="ado"}toString(){return`${this.org}/${this.project}/${this.repo}`.toLowerCase()}};Km.AdoRepoId=jue;function vni(t){let e=pdr(t);if(e){if(e.host==="dev.azure.com"){let r=e.path.match(/^\/?(?[^/]+)\/(?[^/]+?)\/_git\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return r?.groups?new jue(r.groups.org,r.groups.project,r.groups.repo):void 0}if(e.host==="ssh.dev.azure.com"){let r=e.path.match(/^\/?v3\/(?[^/]+)\/(?[^/]+?)\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return r?.groups?new jue(r.groups.org,r.groups.project,r.groups.repo):void 0}if(e.host.endsWith(".visualstudio.com")){let r=e.host.match(/^(?[^\.]+)\.visualstudio\.com$/i);if(!r?.groups)return;let n=e.path.match(/^\/(v3\/)(?[^/]+?)\/(?[^/]+?)\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i)??e.path.match(/^\/?((?[^/]+?)\/)?(?[^/]+?)\/_git\/(?:_(?:optimized|full)\/)?(?[^/]+?)(\.git|\/)?$/i);return n?.groups?new jue(r.groups.org,n.groups.project,n.groups.repo):void 0}}}a(vni,"getAdoRepoIdFromFetchUrl");function jda(t){if(/^[\w\d\-]+@[\w\d\.\-]+:/.test(t))return t=t.replace(/([\w\d\-]+)@([\w\d\.\-]+):(.+)/,"https://$2/$3"),t;let e;try{e=new URL(t)}catch{return t}let r=e.pathname.match(/^\/scm\/scm\.git/),n=new URL("https://"+e.hostname+e.pathname);return!r&&/^\/scm\/[^/]/.test(n.pathname)&&(n.pathname=n.pathname.replace(/^\/scm\//,"/")),n.toString()}a(jda,"normalizeFetchUrl")});var Adr=T(SK=>{"use strict";f();Object.defineProperty(SK,"__esModule",{value:!0});SK.ComputationStatus=void 0;SK.tryGetGitHubNWO=Wda;SK.extractRepoInfoInBackground=zda;SK.extractRepoInfo=Tni;var mdr=bni(),$da=fU(),Vda=yB(),dwe=hU();function Wda(t){if(t!==void 0&&t!==fwe.PENDING&&t.repoId?.type==="github")return(t.repoId.org+"/"+t.repoId.repo).toLowerCase()}a(Wda,"tryGetGitHubNWO");function zda(t,e){let r=(0,dwe.dirname)(e);return Yda(t,r)}a(zda,"extractRepoInfoInBackground");var Yda=Zda(Tni,1e4);async function Tni(t,e){let r=t.get($da.ICompletionsFileSystemService),n=(0,dwe.getFsUri)(e);if(!n)return;let o=await Jda(r,n);if(!o)return;let s=(0,dwe.joinPath)(o,".git","config"),c;try{c=await r.readFileString(s)}catch{return}let l=Xda(c)??"",u=Kda(l),d={uri:o};return u===void 0?{baseFolder:d,url:l,hostname:"",pathname:"",repoId:void 0}:{baseFolder:d,url:l,hostname:u.host,pathname:u.path,repoId:u.repoId}}a(Tni,"extractRepoInfo");function Kda(t){let e=(0,mdr.parseRemoteUrl)(t);if(!e)return;let r=(0,mdr.getGithubRepoIdFromFetchUrl)(t)??(0,mdr.getAdoRepoIdFromFetchUrl)(t);return{...e,repoId:r}}a(Kda,"parseRepoUrl");async function Jda(t,e){let r=e+"_add_to_make_longer";for(;e!=="file:///"&&e.length{let c=JSON.stringify(s),l=r.get(c);if(l)return l.result;if(n.has(c))return fwe.PENDING;let u=t(o,...s);return n.add(c),u.then(d=>{r.set(c,new gdr(d)),n.delete(c)}),fwe.PENDING}}a(Zda,"computeInBackgroundAndMemoize")});var Ini=T(ydr=>{"use strict";f();Object.defineProperty(ydr,"__esModule",{value:!0});ydr.isRepetitive=tfa;var efa=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60}];function tfa(t){let e=t.slice();return e.reverse(),Sni(e)||Sni(e.filter(r=>r.trim().length>0))}a(tfa,"isRepetitive");function Sni(t){let e=rfa(t);for(let r of efa){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(rfa,"kmp_prefix_function")});var wni=T(pwe=>{"use strict";f();Object.defineProperty(pwe,"__esModule",{value:!0});pwe.maybeSnipCompletionImpl=xni;pwe.postProcessChoiceInContext=cfa;pwe.checkSuffix=lfa;var nfa=QY(),IK=xp(),ifa=Ini();function ofa(t,e,r,n){let o="}";try{o=(0,nfa.getBlockCloseToken)(e.detectedLanguageId)??"}"}catch{}return xni({getLineText:a(s=>e.lineAt(s).text,"getLineText"),getLineCount:a(()=>e.lineCount,"getLineCount")},r,n,o)}a(ofa,"maybeSnipCompletion");function xni(t,e,r,n){let o=sfa(r),s=o.lines;if(s.length===1)return r;for(let c=1;c=t.getLineCount()?void 0:t.getLineText(y),h!==void 0&&h.trim()==="")u++;else break}let m,g;for(;m=c+p+d,g=m>=s.length?void 0:s[m],g!==void 0&&g.trim()==="";)d++;let A=m===s.length-1;if(!g||!(h&&(A?h.startsWith(g)||g.startsWith(h):h===g&&g.trim()===n))){l=!1;break}}if(l)return s.slice(0,c).join(o.newLineCharacter)}return r}a(xni,"maybeSnipCompletionImpl");function sfa(t){let e=t.includes(`\r `)?`\r `:` -`;return{lines:t.split(e),newLineCharacter:e}}a(oua,"splitByNewLine");function sua(t,e,r,n){let o="",s=e.line+1,c=n?r.trim():r;for(;o===""&&s0){if(r.completionText.indexOf(o)!==-1)return o.length;{let s=-1,c=0;for(let l of o){let u=r.completionText.indexOf(l,s+1);if(u>s)c++,s=u;else break}return c}}return 0}a(cua,"checkSuffix")});var Dri=T(EQ=>{"use strict";f();Object.defineProperty(EQ,"__esModule",{value:!0});EQ.DocumentLogEntry=void 0;EQ.serializeOffsetRange=lua;EQ.deserializeOffsetRange=uua;EQ.serializeEdit=dua;EQ.deserializeEdit=fua;var Pri=aA(),Nri=Fu(),kri;(function(t){function e(r){return!!r&&typeof r=="object"&&"id"in r&&"time"in r}a(e,"is"),t.is=e})(kri||(EQ.DocumentLogEntry=kri={}));function lua(t){return[t.start,t.endExclusive]}a(lua,"serializeOffsetRange");function uua(t){return new Nri.OffsetRange(t[0],t[1])}a(uua,"deserializeOffsetRange");function dua(t){return t.replacements.map(e=>[e.replaceRange.start,e.replaceRange.endExclusive,e.newText])}a(dua,"serializeEdit");function fua(t){return Pri.StringEdit.create(t.map(e=>Pri.StringReplacement.replace(new Nri.OffsetRange(e[0],e[1]),e[2])))}a(fua,"deserializeEdit")});var ARe=T(TA=>{"use strict";f();Object.defineProperty(TA,"__esModule",{value:!0});TA.StatelessNextEditTelemetryBuilder=TA.StatelessNextEditResult=TA.NoNextEditReason=TA.FilteredOutReason=TA.StatelessNextEditDocument=TA.StatelessNextEditRequest=TA.WithStatelessProviderTelemetry=void 0;var Mri=VT(),Zur=Jl(),pua=wc(),hua=_O(),mua=aA(),gua=Qv(),Aua=Dri(),yua=yWt(),edr=class{static{a(this,"WithStatelessProviderTelemetry")}constructor(e,r){this.v=e,this.telemetryBuilder=r}};TA.WithStatelessProviderTelemetry=edr;var tdr=class t{static{a(this,"StatelessNextEditRequest")}static{this.ID=0}get result(){return this._result.p}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g){this.headerRequestId=e,this.opportunityId=r,this.documentBeforeEdits=n,this.documents=o,this.activeDocumentIdx=s,this.xtabEditHistory=c,this.firstEdit=l,this.expandedEditWindowNLines=u,this.isSpeculative=d,this.logContext=p,this.recordingBookmark=h,this.recording=m,this.providerRequestStartDateTime=g,this.seqid=String(++t.ID),this.cancellationTokenSource=new hua.CancellationTokenSource,this.liveDependentants=0,this.fetchIssued=!1,this.intermediateUserEdit=mua.StringEdit.empty,this._result=new pua.DeferredPromise,(0,Zur.assert)(o.length>0),(0,Zur.assert)(s>=0&&sr.id===e)!==void 0}getActiveDocument(){return this.documents[this.activeDocumentIdx]}serialize(){return{id:this.headerRequestId,documents:this.documents.map(e=>e.serialize()),activeDocumentIdx:this.activeDocumentIdx,recording:this.recording}}toString(){return this.toMarkdown()}toMarkdown(){return`### StatelessNextEditRequest +`;return{lines:t.split(e),newLineCharacter:e}}a(sfa,"splitByNewLine");function afa(t,e,r,n){let o="",s=e.line+1,c=n?r.trim():r;for(;o===""&&s0){if(r.completionText.indexOf(o)!==-1)return o.length;{let s=-1,c=0;for(let l of o){let u=r.completionText.indexOf(l,s+1);if(u>s)c++,s=u;else break}return c}}return 0}a(lfa,"checkSuffix")});var Dni=T(VU=>{"use strict";f();Object.defineProperty(VU,"__esModule",{value:!0});VU.DocumentLogEntry=void 0;VU.serializeOffsetRange=ufa;VU.deserializeOffsetRange=dfa;VU.serializeEdit=ffa;VU.deserializeEdit=pfa;var Rni=Zg(),kni=wu(),Pni;(function(t){function e(r){return!!r&&typeof r=="object"&&"id"in r&&"time"in r}a(e,"is"),t.is=e})(Pni||(VU.DocumentLogEntry=Pni={}));function ufa(t){return[t.start,t.endExclusive]}a(ufa,"serializeOffsetRange");function dfa(t){return new kni.OffsetRange(t[0],t[1])}a(dfa,"deserializeOffsetRange");function ffa(t){return t.replacements.map(e=>[e.replaceRange.start,e.replaceRange.endExclusive,e.newText])}a(ffa,"serializeEdit");function pfa(t){return Rni.StringEdit.create(t.map(e=>Rni.StringReplacement.replace(new kni.OffsetRange(e[0],e[1]),e[2])))}a(pfa,"deserializeEdit")});var hwe=T(gA=>{"use strict";f();Object.defineProperty(gA,"__esModule",{value:!0});gA.StatelessNextEditTelemetryBuilder=gA.StatelessNextEditResult=gA.NoNextEditReason=gA.FilteredOutReason=gA.StatelessNextEditDocument=gA.StatelessNextEditRequest=gA.WithStatelessProviderTelemetry=void 0;var Nni=MT(),Edr=Hl(),hfa=vc(),mfa=n4(),gfa=Zg(),Afa=xv(),yfa=Dni(),Efa=FWt(),_dr=class{static{a(this,"WithStatelessProviderTelemetry")}constructor(e,r){this.v=e,this.telemetryBuilder=r}};gA.WithStatelessProviderTelemetry=_dr;var Cdr=class t{static{a(this,"StatelessNextEditRequest")}static{this.ID=0}get result(){return this._result.p}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g){this.headerRequestId=e,this.opportunityId=r,this.documentBeforeEdits=n,this.documents=o,this.activeDocumentIdx=s,this.xtabEditHistory=c,this.firstEdit=l,this.expandedEditWindowNLines=u,this.isSpeculative=d,this.logContext=p,this.recordingBookmark=h,this.recording=m,this.providerRequestStartDateTime=g,this.seqid=String(++t.ID),this.cancellationTokenSource=new mfa.CancellationTokenSource,this.liveDependentants=0,this.fetchIssued=!1,this.intermediateUserEdit=gfa.StringEdit.empty,this._result=new hfa.DeferredPromise,(0,Edr.assert)(o.length>0),(0,Edr.assert)(s>=0&&sr.id===e)!==void 0}getActiveDocument(){return this.documents[this.activeDocumentIdx]}serialize(){return{id:this.headerRequestId,documents:this.documents.map(e=>e.serialize()),activeDocumentIdx:this.activeDocumentIdx,recording:this.recording}}toString(){return this.toMarkdown()}toMarkdown(){return`### StatelessNextEditRequest ${this.documents.map((r,n)=>` * [${n+1}/${this.documents.length}] ${n===this.activeDocumentIdx?"(active document) ":""}`+r.toMarkdown()).join(` -`)}`}};TA.StatelessNextEditRequest=tdr;var rdr=class{static{a(this,"StatelessNextEditDocument")}constructor(e,r,n,o,s,c,l,u=void 0){this.id=e,this.workspaceRoot=r,this.languageId=n,this.documentLinesBeforeEdit=o,this.recentEdit=s,this.documentBeforeEdits=c,this.recentEdits=l,this.lastSelectionInAfterEdit=u,this.documentAfterEdits=new gua.StringText(this.recentEdits.apply(this.documentBeforeEdits.value)),this.documentAfterEditsLines=this.documentAfterEdits.getLines()}serialize(){return{id:this.id.uri,workspaceRoot:this.workspaceRoot?.toString(),languageId:this.languageId,documentLinesBeforeEdit:this.documentLinesBeforeEdit,recentEdit:this.recentEdit.serialize(),documentBeforeEdits:this.documentBeforeEdits.value,recentEdits:this.recentEdits.serialize(),lastSelectionInAfterEdit:this.lastSelectionInAfterEdit===void 0?void 0:(0,Aua.serializeOffsetRange)(this.lastSelectionInAfterEdit)}}toString(){return this.toMarkdown()}toMarkdown(){let e=[];return e.push(`StatelessNextEditDocument: **${this.id.uri}** +`)}`}};gA.StatelessNextEditRequest=Cdr;var vdr=class{static{a(this,"StatelessNextEditDocument")}constructor(e,r,n,o,s,c,l,u=void 0){this.id=e,this.workspaceRoot=r,this.languageId=n,this.documentLinesBeforeEdit=o,this.recentEdit=s,this.documentBeforeEdits=c,this.recentEdits=l,this.lastSelectionInAfterEdit=u,this.documentAfterEdits=new Afa.StringText(this.recentEdits.apply(this.documentBeforeEdits.value)),this.documentAfterEditsLines=this.documentAfterEdits.getLines()}serialize(){return{id:this.id.uri,workspaceRoot:this.workspaceRoot?.toString(),languageId:this.languageId,documentLinesBeforeEdit:this.documentLinesBeforeEdit,recentEdit:this.recentEdit.serialize(),documentBeforeEdits:this.documentBeforeEdits.value,recentEdits:this.recentEdits.serialize(),lastSelectionInAfterEdit:this.lastSelectionInAfterEdit===void 0?void 0:(0,yfa.serializeOffsetRange)(this.lastSelectionInAfterEdit)}}toString(){return this.toMarkdown()}toMarkdown(){let e=[];return e.push(`StatelessNextEditDocument: **${this.id.uri}** `),e.push("```patch"),e.push(this.recentEdit.humanReadablePatch(this.documentLinesBeforeEdit)),e.push("```"),e.push(""),e.join(` -`)}};TA.StatelessNextEditDocument=rdr;var Ori;(function(t){t.LowLogProbSuggestions="lowLogProbSuggestions",t.EnforcingNextEditOptions="enforcingNextEditOptions",t.PromptTooLarge="promptTooLarge",t.Uncategorized="uncategorized"})(Ori||(TA.FilteredOutReason=Ori={}));var KD;(function(t){class e{static{a(this,"NoNextEditReason")}}class r extends e{static{a(this,"ActiveDocumentHasNoEdits")}constructor(){super(...arguments),this.kind="activeDocumentHasNoEdits"}toString(){return this.kind}}t.ActiveDocumentHasNoEdits=r;class n extends e{static{a(this,"NoSuggestions")}constructor(h,m,g,A){super(),this.documentBeforeEdits=h,this.window=m,this.nextCursorPosition=g,this.nextCursorDocumentId=A,this.kind="noSuggestions"}toString(){return this.kind}}t.NoSuggestions=n;class o extends e{static{a(this,"GotCancelled")}constructor(h){super(),this.message=h,this.kind="gotCancelled"}toString(){return`${this.kind}:${this.message}`}}t.GotCancelled=o;class s extends e{static{a(this,"FetchFailure")}constructor(h){super(),this.error=h,this.kind="fetchFailure"}toString(){return`${this.kind}:${this.error.message}`}}t.FetchFailure=s;class c extends e{static{a(this,"FilteredOut")}constructor(h){super(),this.message=h,this.kind="filteredOut"}toString(){return`${this.kind}:${this.message}`}}t.FilteredOut=c;class l extends e{static{a(this,"PromptTooLarge")}constructor(h){super(),this.message=h,this.kind="promptTooLarge"}toString(){return`${this.kind}:${this.message}`}}t.PromptTooLarge=l;class u extends e{static{a(this,"Uncategorized")}constructor(h){super(),this.error=h,this.kind="uncategorized"}toString(){return`${this.kind}:${this.error.message}`}}t.Uncategorized=u;class d extends e{static{a(this,"Unexpected")}constructor(h){super(),this.error=h,this.kind="unexpected"}toString(){return`${this.kind}:${this.error.message}`}}t.Unexpected=d})(KD||(TA.NoNextEditReason=KD={}));var ndr=class t{static{a(this,"StatelessNextEditResult")}static noEdit(e,r){let n=Mri.Result.error(e),o=r.build(n);return new t(n,o)}static streaming(e){let r=Mri.Result.ok(void 0),n=e.build(r);return new t(r,n)}constructor(e,r){this.nextEdit=e,this.telemetry=r}};TA.StatelessNextEditResult=ndr;var idr=class{static{a(this,"StatelessNextEditTelemetryBuilder")}constructor(e){this._nextCursorPrediction={nextCursorLineError:void 0,nextCursorLineDistance:void 0,isCrossFile:void 0},this.startTime=Date.now(),this.requestUuid=e}build(e){let n=Date.now()-this.startTime,o=this._prompt?JSON.stringify(this._prompt.map(({role:p,content:h})=>({role:p,content:h}))):void 0,s=this._prompt?(0,yua.stringifyChatMessages)(this._prompt):void 0,c=s?.split(` -`).length,l=s?.length,u=e.isOk()?void 0:e.err.kind,d;return e.isError()&&(e.err instanceof KD.ActiveDocumentHasNoEdits||e.err instanceof KD.NoSuggestions||(e.err instanceof KD.GotCancelled||e.err instanceof KD.FilteredOut||e.err instanceof KD.PromptTooLarge?d=e.err.message:e.err instanceof KD.FetchFailure||e.err instanceof KD.Uncategorized||e.err instanceof KD.Unexpected?d=e.err.error.stack?e.err.error.stack:e.err.error.message:(0,Zur.assertNever)(e.err))),{hadStatelessNextEditProviderCall:!0,noNextEditReasonKind:u,noNextEditReasonMessage:d,statelessNextEditProviderDuration:n,logProbThreshold:this._logProbThreshold,mergeConflictExpanded:this._mergeConflictExpanded,nLinesOfCurrentFileInPrompt:this._nLinesOfCurrentFileInPrompt,modelName:this._modelName,prompt:o,promptLineCount:c,promptCharCount:l,isCursorAtEndOfLine:this._isCursorAtLineEnd,isInlineSuggestion:this._isInlineSuggestion,debounceTime:this._debounceTime,artificialDelay:this._artificialDelay,fetchStartedAt:this._fetchStartedAt,hadLowLogProbSuggestion:this._hadLowLogProbSuggestion,response:this._response,nEditsSuggested:this._nEditsSuggested,nextEditLogprob:this._nextEditLogProb,nextCursorPrediction:this._nextCursorPrediction,lineDistanceToMostRecentEdit:this._lineDistanceToMostRecentEdit,xtabAggressivenessLevel:this._xtabAggressivenessLevel,xtabUserHappinessScore:this._xtabUserHappinessScore,userAggressivenessSetting:this._userAggressivenessSetting,editIntent:this._editIntent,editIntentParseError:this._editIntentParseError,cursorJumpModelName:this._cursorJumpModelName,cursorJumpPrompt:this._cursorJumpPrompt?JSON.stringify(this._cursorJumpPrompt.map(({role:p,content:h})=>({role:p,content:h}))):void 0,cursorJumpResponse:this._cursorJumpResponse,nDiffsInPrompt:this._nDiffsInPrompt,diffTokensInPrompt:this._diffTokensInPrompt,lintErrors:this._lintErrors,terminalOutput:this._terminalOutput,similarFilesContext:this._similarFilesContext,modelConfig:this._modelConfig}}setLogProbThreshold(e){return this._logProbThreshold=e,this}setMergeConflictExpanded(e){return this._mergeConflictExpanded=e,this}setHadLowLogProbSuggestion(e){return this._hadLowLogProbSuggestion=e,this}setNLinesOfCurrentFileInPrompt(e){return this._nLinesOfCurrentFileInPrompt=e,this}setModelName(e){return this._modelName=e,this}setPrompt(e){return this._prompt=e,this}setIsCursorAtLineEnd(e){return this._isCursorAtLineEnd=e,this}setIsInlineSuggestion(e){return this._isInlineSuggestion=e,this}setDebounceTime(e){return this._debounceTime=e,this}setArtificialDelay(e){return this._artificialDelay=e,this}setFetchStartedAt(){return this._fetchStartedAt=Date.now(),this}get fetchStartedAt(){return this._fetchStartedAt}setResponse(e){return this._response=e.then(({response:r,ttft:n})=>{let o=Date.now()-this._fetchStartedAt,s=r.type;return{ttft:n,response:r,fetchTime:o,fetchResult:s}}),this}setCursorJumpModelName(e){return this._cursorJumpModelName=e,this}setCursorJumpPrompt(e){return this._cursorJumpPrompt=e,this}setCursorJumpResponse(e){return this._cursorJumpResponse=e,this}setNextEditLogProb(e){return this._nextEditLogProb=e,this}setNEditsSuggested(e){return this._nEditsSuggested=e,this}setLineDistanceToMostRecentEdit(e){return this._lineDistanceToMostRecentEdit=e,this}setNextCursorLineError(e){return this._nextCursorPrediction.nextCursorLineError=e,this}setNextCursorLineDistance(e){return this._nextCursorPrediction.nextCursorLineDistance=e,this}setNextCursorIsCrossFile(e){return this._nextCursorPrediction.isCrossFile=e,this}setXtabAggressivenessLevel(e){return this._xtabAggressivenessLevel=e,this}setXtabUserHappinessScore(e){return this._xtabUserHappinessScore=e,this}setUserAggressivenessSetting(e){return this._userAggressivenessSetting=e,this}setEditIntent(e){return this._editIntent=e,this}setEditIntentParseError(e){return this._editIntentParseError=e,this}setNDiffsInPrompt(e){return this._nDiffsInPrompt=e,this}setDiffTokensInPrompt(e){return this._diffTokensInPrompt=e,this}setLintErrors(e){return this._lintErrors=e,this}setTerminalOutput(e){return this._terminalOutput=e,this}setSimilarFilesContext(e){return this._similarFilesContext=e,this}setModelConfig(e){return this._modelConfig=e,this}};TA.StatelessNextEditTelemetryBuilder=idr});var sdr=T(Pat=>{"use strict";f();Object.defineProperty(Pat,"__esModule",{value:!0});Pat.StreamCopilotAnnotations=void 0;var odr=class{static{a(this,"StreamCopilotAnnotations")}constructor(){this.current={}}update(e){Object.entries(e).forEach(([r,n])=>{n.forEach(o=>this.update_namespace(r,o))})}update_namespace(e,r){this.current[e]||(this.current[e]=[]);let n=this.current[e],o=n.findIndex(s=>s.id===r.id);o>=0?n[o]=r:n.push(r)}for(e){return this.current[e]??[]}};Pat.StreamCopilotAnnotations=odr});var kat=T(CQ=>{"use strict";f();Object.defineProperty(CQ,"__esModule",{value:!0});CQ.ICompletionsFetchService=CQ.CompletionsFetchError=CQ.Completions=void 0;var Eua=qr(),Bri;(function(t){class e{static{a(this,"RequestCancelled")}constructor(){this.kind="cancelled"}}t.RequestCancelled=e;class r{static{a(this,"UnsuccessfulResponse")}constructor(s,c,l,u){this.status=s,this.statusText=c,this.headers=l,this.text=u,this.kind="not-200-status"}}t.UnsuccessfulResponse=r;class n{static{a(this,"Unexpected")}constructor(s){this.error=s,this.kind="unexpected"}}t.Unexpected=n})(Bri||(CQ.Completions=Bri={}));var adr=class extends Error{static{a(this,"CompletionsFetchError")}constructor(e,r,n){super(n),this.type=e,this.requestId=r}};CQ.CompletionsFetchError=adr;CQ.ICompletionsFetchService=(0,Eua.createServiceIdentifier)("ICompletionsFetchService")});var yRe=T(kde=>{"use strict";f();Object.defineProperty(kde,"__esModule",{value:!0});kde.CacheType=kde.CustomDataPartMimeTypes=void 0;var Lri;(function(t){t.CacheControl="cache_control",t.StatefulMarker="stateful_marker",t.ThinkingData="thinking",t.ContextManagement="context_management",t.PhaseData="phase_data"})(Lri||(kde.CustomDataPartMimeTypes=Lri={}));kde.CacheType="ephemeral"});var ldr=T(ERe=>{"use strict";f();Object.defineProperty(ERe,"__esModule",{value:!0});ERe.ThinkingDataContainer=void 0;ERe.rawPartAsThinkingData=_ua;var Cua=po(),Fri=yRe(),cdr=class extends Cua.PromptElement{static{a(this,"ThinkingDataContainer")}render(){let{thinking:e}=this.props,r={type:Fri.CustomDataPartMimeTypes.ThinkingData,thinking:e};return vscpp("opaque",{value:r,tokenUsage:e.tokens})}};ERe.ThinkingDataContainer=cdr;function _ua(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===Fri.CustomDataPartMimeTypes.ThinkingData&&r.thinking&&typeof r.thinking=="object")return r.thinking}a(_ua,"rawPartAsThinkingData")});var i3=T(tE=>{"use strict";f();Object.defineProperty(tE,"__esModule",{value:!0});tE.FilterReason=tE.FinishedCompletionReason=tE.ChatRole=tE.modelsWithoutResponsesContextManagement=tE.openAIContextManagementCompactionType=void 0;tE.isApiUsage=Tua;tE.getCAPITextPart=Gri;tE.rawMessageToCAPI=Hri;var Nat=po(),vua=FEe(),bua=ldr();function Tua(t){return typeof t.prompt_tokens=="number"&&typeof t.completion_tokens=="number"&&typeof t.total_tokens=="number"}a(Tua,"isApiUsage");tE.openAIContextManagementCompactionType="compaction";tE.modelsWithoutResponsesContextManagement=new Set(["gpt-5","gpt-5.1","gpt-5.2"]);var Uri;(function(t){t.System="system",t.User="user",t.Assistant="assistant",t.Function="function",t.Tool="tool"})(Uri||(tE.ChatRole=Uri={}));function Gri(t){return Array.isArray(t)?t.map(e=>Gri(e)).join(""):typeof t=="string"?t:typeof t=="object"&&"text"in t?t.text:""}a(Gri,"getCAPITextPart");function Hri(t,e){if(Array.isArray(t))return t.map(n=>Hri(n,e));let r=(0,Nat.toMode)(Nat.OutputMode.OpenAI,t);if("copilot_references"in t&&(r.copilot_references=t.copilot_references),"copilot_confirmations"in t&&(r.copilot_confirmations=t.copilot_confirmations),typeof r.content=="string")r.content=r.content.trimEnd();else for(let n=0;nn.type===vua.ChatCompletionContentPartKind.CacheBreakpoint)&&(r.copilot_cache_control={type:"ephemeral"});for(let n of t.content)if(n.type===Nat.Raw.ChatCompletionContentPartKind.Opaque){let o=(0,bua.rawPartAsThinkingData)(n);e&&o&&e(r,o)}return r}a(Hri,"rawMessageToCAPI");var Qri;(function(t){t.Stop="stop",t.Length="length",t.FunctionCall="function_call",t.ToolCalls="tool_calls",t.ContentFilter="content_filter",t.ServerError="error",t.ClientTrimmed="client-trimmed",t.ClientIterationDone="Iteration Done",t.ClientDone="DONE"})(Qri||(tE.FinishedCompletionReason=Qri={}));var qri;(function(t){t.Hate="hate",t.SelfHarm="self_harm",t.Sexual="sexual",t.Violence="violence",t.Copyright="snippy",t.Prompt="prompt"})(qri||(tE.FilterReason=qri={}))});var CJ=T(o3=>{"use strict";f();Object.defineProperty(o3,"__esModule",{value:!0});o3.getRequestId=Iua;o3.isCopilotAnnotation=xua;o3.isCodeCitationAnnotation=wua;o3.isCopilotWebReference=Rua;o3.isOpenAIContextManagementResponse=Pua;o3.isAnthropicContextManagementResponse=kua;o3.isOpenAiFunctionTool=Nua;var Sua=i3();function Iua(t,e){return{headerRequestId:t.get("x-request-id")||"",gitHubRequestId:t.get("x-github-request-id")||"",completionId:e&&e.id?e.id:"",created:e&&e.created?e.created:0,serverExperiments:t.get("X-Copilot-Experiment")||"",deploymentId:t.get("azureml-model-deployment")||""}}a(Iua,"getRequestId");function xua(t){if(typeof t!="object"||t===null||!("details"in t))return!1;let{details:e}=t;return typeof e=="object"&&e!==null&&"type"in e&&"description"in e&&typeof e.type=="string"&&typeof e.description=="string"}a(xua,"isCopilotAnnotation");function wua(t){if(typeof t!="object"||t===null||!("citations"in t))return!1;let{citations:e}=t;return typeof e=="object"&&e!==null&&"url"in e&&"license"in e&&typeof e.url=="string"&&typeof e.license=="string"}a(wua,"isCodeCitationAnnotation");function Rua(t){return typeof t=="object"&&!!t&&"title"in t&&"excerpt"in t&&"url"in t}a(Rua,"isCopilotWebReference");function Pua(t){return"type"in t&&t.type===Sua.openAIContextManagementCompactionType}a(Pua,"isOpenAIContextManagementResponse");function kua(t){return"applied_edits"in t}a(kua,"isAnthropicContextManagementResponse");function Nua(t){return t.function!==void 0}a(Nua,"isOpenAiFunctionTool")});var jri=T(KR=>{"use strict";f();Object.defineProperty(KR,"__esModule",{value:!0});KR.asyncIterableMap=Dua;KR.asyncIterableFilter=Mua;KR.asyncIterableMapFilter=Oua;KR.asyncIterableFromArray=Bua;KR.asyncIterableToArray=Lua;KR.asyncIterableConcat=Fua;KR.asyncIterableCount=Uua;KR.iterableMap=Qua;KR.iterableMapFilter=qua;async function*Dua(t,e){for await(let r of t)yield e(r)}a(Dua,"asyncIterableMap");async function*Mua(t,e){for await(let r of t)await e(r)&&(yield r)}a(Mua,"asyncIterableFilter");async function*Oua(t,e){for await(let r of t){let n=await e(r);n!==void 0&&(yield n)}}a(Oua,"asyncIterableMapFilter");async function*Bua(t){for(let e of t)yield Promise.resolve(e)}a(Bua,"asyncIterableFromArray");async function Lua(t){let e=[];for await(let r of t)e.push(r);return e}a(Lua,"asyncIterableToArray");async function*Fua(...t){for(let e of t)yield*e}a(Fua,"asyncIterableConcat");async function Uua(t){let e=0;for await(let r of t)e++;return e}a(Uua,"asyncIterableCount");function*Qua(t,e){for(let r of t)yield e(r)}a(Qua,"iterableMap");function*qua(t,e){for(let r of t){let n=e(r);n!==void 0&&(yield n)}}a(qua,"iterableMapFilter")});var $ri=T(udr=>{"use strict";f();Object.defineProperty(udr,"__esModule",{value:!0});udr.getKey=Hua;function Gua(t,e){return t!==null&&typeof t=="object"&&e in t}a(Gua,"hasKey");function Hua(t,e){return Gua(t,e)?t[e]:void 0}a(Hua,"getKey")});var Yri=T(JR=>{"use strict";f();var jua=JR&&JR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Vri=JR&&JR.__param||function(t,e){return function(r,n){e(r,n,t)}},ddr;Object.defineProperty(JR,"__esModule",{value:!0});JR.SSEProcessor=void 0;JR.splitChunk=zri;JR.prepareSolutionForReturn=Yua;var $ua=sdr(),Vua=CJ(),Wri=Mo(),Dat=mc(),Wua=lot(),zua=rde(),SA=new Dat.Logger("streamChoices"),fdr=class{static{a(this,"APIJsonDataStreaming")}constructor(){this.logprobs=[],this.top_logprobs=[],this.text=[],this.tokens=[],this.text_offset=[],this.copilot_annotations=new $ua.StreamCopilotAnnotations,this.tool_calls=new hdr,this.function_call=new mdr,this.copilot_references=[],this.yielded=!1}append(e){e.text&&this.text.push(e.text),e.delta?.content&&e.delta.role!=="function"&&this.text.push(e.delta.content),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[])),e.copilot_annotations&&this.copilot_annotations.update(e.copilot_annotations),e.delta?.copilot_annotations&&this.copilot_annotations.update(e.delta.copilot_annotations),e.delta?.tool_calls&&e.delta.tool_calls.length>0&&this.tool_calls.update(e.delta.tool_calls),e.delta?.function_call&&this.function_call.update(e.delta.function_call),e?.finish_reason&&(this.finish_reason=e.finish_reason)}};function zri(t){let e=t.split(` -`),r=e.pop();return[e.filter(n=>n!==""),r]}a(zri,"splitChunk");var pdr=class{static{a(this,"StreamingToolCall")}constructor(){this.arguments=[]}update(e){e.id&&(this.id=e.id),e.function.name&&(this.name=e.function.name),this.arguments.push(e.function.arguments)}},hdr=class{static{a(this,"StreamingToolCalls")}constructor(){this.toolCalls=[]}update(e){e.forEach(r=>{let n=this.toolCalls.length>0?this.toolCalls[this.toolCalls.length-1]:void 0;(!n||r.id&&n.id!==r.id)&&(n=new pdr,this.toolCalls.push(n)),n.update(r)})}getToolCalls(){return this.toolCalls}},mdr=class{static{a(this,"StreamingFunctionCall")}constructor(){this.arguments=[]}update(e){e.name&&(this.name=e.name),this.arguments.push(e.arguments)}},gdr=ddr=class{static{a(this,"SSEProcessor")}constructor(e,r,n,o,s,c=void 0,l,u){this.expectedNumChoices=e,this.response=r,this.body=n,this.telemetryData=o,this.dropCompletionReasons=s,this.cancellationToken=c,this.instantiationService=l,this.logTarget=u,this.requestId=(0,Vua.getRequestId)(this.response.headers),this.stats=new ydr,this.solutions={}}static async create(e,r,n,o,s,c){let l=e.get(Wri.IInstantiationService),u=e.get(Dat.ICompletionsLogTargetService),d=n.body.pipeThrough(new TextDecoderStream);return new ddr(r,n,d,o,s??[],c,l,u)}async*processSSE(e=()=>{}){try{yield*this.processSSEInner(e)}finally{await this.cancel(),SA.debug(this.logTarget,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),SA.debug(this.logTarget,"request stats:",this.stats)}}async*processSSEInner(e){let r="",n=null,o,s;e:for await(let c of this.body){if(await this.maybeCancel("after awaiting body chunk"))return;SA.debug(this.logTarget,"chunk",c.toString());let[l,u]=zri(r+c.toString());r=u;for(let d of l){let p=d.slice(5).trim();if(p==="[DONE]"){yield*this.finishSolutions(n,o,s,e);return}n=null;let h;try{h=JSON.parse(p)}catch{SA.error(this.logTarget,"Error parsing JSON stream data",d);continue}if(h.copilot_confirmation&&Kua(h.copilot_confirmation)&&await e("",{text:"",requestId:this.requestId,copilotConfirmation:h.copilot_confirmation}),h.copilot_references&&await e("",{text:"",requestId:this.requestId,copilotReferences:h.copilot_references}),h.choices===void 0){!h.copilot_references&&!h.copilot_confirmation&&(h.error!==void 0?SA.error(this.logTarget,"Error in response:",h.error.message):SA.error(this.logTarget,"Unexpected response with no choices or error: "+p)),h.copilot_errors&&await e("",{text:"",requestId:this.requestId,copilotErrors:h.copilot_errors});continue}if(o===void 0&&h.model&&(o=h.model),s===void 0&&h.usage&&(s=h.usage),this.allSolutionsDone()){r="";break e}for(let m=0;m({role:p,content:h}))):void 0,s=this._prompt?(0,Efa.stringifyChatMessages)(this._prompt):void 0,c=s?.split(` +`).length,l=s?.length,u=e.isOk()?void 0:e.err.kind,d;return e.isError()&&(e.err instanceof FD.ActiveDocumentHasNoEdits||e.err instanceof FD.NoSuggestions||(e.err instanceof FD.GotCancelled||e.err instanceof FD.FilteredOut||e.err instanceof FD.PromptTooLarge?d=e.err.message:e.err instanceof FD.FetchFailure||e.err instanceof FD.Uncategorized||e.err instanceof FD.Unexpected?d=e.err.error.stack?e.err.error.stack:e.err.error.message:(0,Edr.assertNever)(e.err))),{hadStatelessNextEditProviderCall:!0,noNextEditReasonKind:u,noNextEditReasonMessage:d,statelessNextEditProviderDuration:n,logProbThreshold:this._logProbThreshold,mergeConflictExpanded:this._mergeConflictExpanded,nLinesOfCurrentFileInPrompt:this._nLinesOfCurrentFileInPrompt,modelName:this._modelName,prompt:o,promptLineCount:c,promptCharCount:l,isCursorAtEndOfLine:this._isCursorAtLineEnd,isInlineSuggestion:this._isInlineSuggestion,debounceTime:this._debounceTime,artificialDelay:this._artificialDelay,fetchStartedAt:this._fetchStartedAt,hadLowLogProbSuggestion:this._hadLowLogProbSuggestion,response:this._response,nEditsSuggested:this._nEditsSuggested,nextEditLogprob:this._nextEditLogProb,nextCursorPrediction:this._nextCursorPrediction,lineDistanceToMostRecentEdit:this._lineDistanceToMostRecentEdit,xtabAggressivenessLevel:this._xtabAggressivenessLevel,xtabUserHappinessScore:this._xtabUserHappinessScore,userAggressivenessSetting:this._userAggressivenessSetting,editIntent:this._editIntent,editIntentParseError:this._editIntentParseError,cursorJumpModelName:this._cursorJumpModelName,cursorJumpPrompt:this._cursorJumpPrompt?JSON.stringify(this._cursorJumpPrompt.map(({role:p,content:h})=>({role:p,content:h}))):void 0,cursorJumpResponse:this._cursorJumpResponse,nDiffsInPrompt:this._nDiffsInPrompt,diffTokensInPrompt:this._diffTokensInPrompt,lintErrors:this._lintErrors,terminalOutput:this._terminalOutput,similarFilesContext:this._similarFilesContext,modelConfig:this._modelConfig}}setLogProbThreshold(e){return this._logProbThreshold=e,this}setMergeConflictExpanded(e){return this._mergeConflictExpanded=e,this}setHadLowLogProbSuggestion(e){return this._hadLowLogProbSuggestion=e,this}setNLinesOfCurrentFileInPrompt(e){return this._nLinesOfCurrentFileInPrompt=e,this}setModelName(e){return this._modelName=e,this}setPrompt(e){return this._prompt=e,this}setIsCursorAtLineEnd(e){return this._isCursorAtLineEnd=e,this}setIsInlineSuggestion(e){return this._isInlineSuggestion=e,this}setDebounceTime(e){return this._debounceTime=e,this}setArtificialDelay(e){return this._artificialDelay=e,this}setFetchStartedAt(){return this._fetchStartedAt=Date.now(),this}get fetchStartedAt(){return this._fetchStartedAt}setResponse(e){return this._response=e.then(({response:r,ttft:n})=>{let o=Date.now()-this._fetchStartedAt,s=r.type;return{ttft:n,response:r,fetchTime:o,fetchResult:s}}),this}setCursorJumpModelName(e){return this._cursorJumpModelName=e,this}setCursorJumpPrompt(e){return this._cursorJumpPrompt=e,this}setCursorJumpResponse(e){return this._cursorJumpResponse=e,this}setNextEditLogProb(e){return this._nextEditLogProb=e,this}setNEditsSuggested(e){return this._nEditsSuggested=e,this}setLineDistanceToMostRecentEdit(e){return this._lineDistanceToMostRecentEdit=e,this}setNextCursorLineError(e){return this._nextCursorPrediction.nextCursorLineError=e,this}setNextCursorLineDistance(e){return this._nextCursorPrediction.nextCursorLineDistance=e,this}setNextCursorIsCrossFile(e){return this._nextCursorPrediction.isCrossFile=e,this}setXtabAggressivenessLevel(e){return this._xtabAggressivenessLevel=e,this}setXtabUserHappinessScore(e){return this._xtabUserHappinessScore=e,this}setUserAggressivenessSetting(e){return this._userAggressivenessSetting=e,this}setEditIntent(e){return this._editIntent=e,this}setEditIntentParseError(e){return this._editIntentParseError=e,this}setNDiffsInPrompt(e){return this._nDiffsInPrompt=e,this}setDiffTokensInPrompt(e){return this._diffTokensInPrompt=e,this}setLintErrors(e){return this._lintErrors=e,this}setTerminalOutput(e){return this._terminalOutput=e,this}setSimilarFilesContext(e){return this._similarFilesContext=e,this}setModelConfig(e){return this._modelConfig=e,this}};gA.StatelessNextEditTelemetryBuilder=Tdr});var Idr=T(Fst=>{"use strict";f();Object.defineProperty(Fst,"__esModule",{value:!0});Fst.StreamCopilotAnnotations=void 0;var Sdr=class{static{a(this,"StreamCopilotAnnotations")}constructor(){this.current={}}update(e){Object.entries(e).forEach(([r,n])=>{n.forEach(o=>this.update_namespace(r,o))})}update_namespace(e,r){this.current[e]||(this.current[e]=[]);let n=this.current[e],o=n.findIndex(s=>s.id===r.id);o>=0?n[o]=r:n.push(r)}for(e){return this.current[e]??[]}};Fst.StreamCopilotAnnotations=Sdr});var Ust=T(WU=>{"use strict";f();Object.defineProperty(WU,"__esModule",{value:!0});WU.ICompletionsFetchService=WU.CompletionsFetchError=WU.Completions=void 0;var _fa=qr(),Oni;(function(t){class e{static{a(this,"RequestCancelled")}constructor(){this.kind="cancelled"}}t.RequestCancelled=e;class r{static{a(this,"UnsuccessfulResponse")}constructor(s,c,l,u){this.status=s,this.statusText=c,this.headers=l,this.text=u,this.kind="not-200-status"}}t.UnsuccessfulResponse=r;class n{static{a(this,"Unexpected")}constructor(s){this.error=s,this.kind="unexpected"}}t.Unexpected=n})(Oni||(WU.Completions=Oni={}));var xdr=class extends Error{static{a(this,"CompletionsFetchError")}constructor(e,r,n){super(n),this.type=e,this.requestId=r}};WU.CompletionsFetchError=xdr;WU.ICompletionsFetchService=(0,_fa.createServiceIdentifier)("ICompletionsFetchService")});var mwe=T($ue=>{"use strict";f();Object.defineProperty($ue,"__esModule",{value:!0});$ue.CacheType=$ue.CustomDataPartMimeTypes=void 0;var Bni;(function(t){t.CacheControl="cache_control",t.StatefulMarker="stateful_marker",t.ThinkingData="thinking",t.ContextManagement="context_management",t.PhaseData="phase_data"})(Bni||($ue.CustomDataPartMimeTypes=Bni={}));$ue.CacheType="ephemeral"});var Rdr=T(gwe=>{"use strict";f();Object.defineProperty(gwe,"__esModule",{value:!0});gwe.ThinkingDataContainer=void 0;gwe.rawPartAsThinkingData=vfa;var Cfa=co(),Lni=mwe(),wdr=class extends Cfa.PromptElement{static{a(this,"ThinkingDataContainer")}render(){let{thinking:e}=this.props,r={type:Lni.CustomDataPartMimeTypes.ThinkingData,thinking:e};return vscpp("opaque",{value:r,tokenUsage:e.tokens})}};gwe.ThinkingDataContainer=wdr;function vfa(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===Lni.CustomDataPartMimeTypes.ThinkingData&&r.thinking&&typeof r.thinking=="object")return r.thinking}a(vfa,"rawPartAsThinkingData")});var QB=T(Vy=>{"use strict";f();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.FilterReason=Vy.FinishedCompletionReason=Vy.ChatRole=Vy.modelsWithoutResponsesContextManagement=Vy.openAIContextManagementCompactionType=void 0;Vy.isApiUsage=Sfa;Vy.getCAPITextPart=qni;Vy.rawMessageToCAPI=Gni;var Qst=co(),bfa=Bye(),Tfa=Rdr();function Sfa(t){return typeof t.prompt_tokens=="number"&&typeof t.completion_tokens=="number"&&typeof t.total_tokens=="number"}a(Sfa,"isApiUsage");Vy.openAIContextManagementCompactionType="compaction";Vy.modelsWithoutResponsesContextManagement=new Set(["gpt-5","gpt-5.1","gpt-5.2"]);var Fni;(function(t){t.System="system",t.User="user",t.Assistant="assistant",t.Function="function",t.Tool="tool"})(Fni||(Vy.ChatRole=Fni={}));function qni(t){return Array.isArray(t)?t.map(e=>qni(e)).join(""):typeof t=="string"?t:typeof t=="object"&&"text"in t?t.text:""}a(qni,"getCAPITextPart");function Gni(t,e){if(Array.isArray(t))return t.map(n=>Gni(n,e));let r=(0,Qst.toMode)(Qst.OutputMode.OpenAI,t);if("copilot_references"in t&&(r.copilot_references=t.copilot_references),"copilot_confirmations"in t&&(r.copilot_confirmations=t.copilot_confirmations),typeof r.content=="string")r.content=r.content.trimEnd();else for(let n=0;nn.type===bfa.ChatCompletionContentPartKind.CacheBreakpoint)&&(r.copilot_cache_control={type:"ephemeral"});for(let n of t.content)if(n.type===Qst.Raw.ChatCompletionContentPartKind.Opaque){let o=(0,Tfa.rawPartAsThinkingData)(n);e&&o&&e(r,o)}return r}a(Gni,"rawMessageToCAPI");var Uni;(function(t){t.Stop="stop",t.Length="length",t.FunctionCall="function_call",t.ToolCalls="tool_calls",t.ContentFilter="content_filter",t.ServerError="error",t.ClientTrimmed="client-trimmed",t.ClientIterationDone="Iteration Done",t.ClientDone="DONE"})(Uni||(Vy.FinishedCompletionReason=Uni={}));var Qni;(function(t){t.Hate="hate",t.SelfHarm="self_harm",t.Sexual="sexual",t.Violence="violence",t.Copyright="snippy",t.Prompt="prompt"})(Qni||(Vy.FilterReason=Qni={}))});var xK=T(qB=>{"use strict";f();Object.defineProperty(qB,"__esModule",{value:!0});qB.getRequestId=xfa;qB.isCopilotAnnotation=wfa;qB.isCodeCitationAnnotation=Rfa;qB.isCopilotWebReference=Pfa;qB.isOpenAIContextManagementResponse=kfa;qB.isAnthropicContextManagementResponse=Dfa;qB.isOpenAiFunctionTool=Nfa;var Ifa=QB();function xfa(t,e){return{headerRequestId:t.get("x-request-id")||"",gitHubRequestId:t.get("x-github-request-id")||"",completionId:e&&e.id?e.id:"",created:e&&e.created?e.created:0,serverExperiments:t.get("X-Copilot-Experiment")||"",deploymentId:t.get("azureml-model-deployment")||""}}a(xfa,"getRequestId");function wfa(t){if(typeof t!="object"||t===null||!("details"in t))return!1;let{details:e}=t;return typeof e=="object"&&e!==null&&"type"in e&&"description"in e&&typeof e.type=="string"&&typeof e.description=="string"}a(wfa,"isCopilotAnnotation");function Rfa(t){if(typeof t!="object"||t===null||!("citations"in t))return!1;let{citations:e}=t;return typeof e=="object"&&e!==null&&"url"in e&&"license"in e&&typeof e.url=="string"&&typeof e.license=="string"}a(Rfa,"isCodeCitationAnnotation");function Pfa(t){return typeof t=="object"&&!!t&&"title"in t&&"excerpt"in t&&"url"in t}a(Pfa,"isCopilotWebReference");function kfa(t){return"type"in t&&t.type===Ifa.openAIContextManagementCompactionType}a(kfa,"isOpenAIContextManagementResponse");function Dfa(t){return"applied_edits"in t}a(Dfa,"isAnthropicContextManagementResponse");function Nfa(t){return t.function!==void 0}a(Nfa,"isOpenAiFunctionTool")});var Hni=T(UR=>{"use strict";f();Object.defineProperty(UR,"__esModule",{value:!0});UR.asyncIterableMap=Mfa;UR.asyncIterableFilter=Ofa;UR.asyncIterableMapFilter=Bfa;UR.asyncIterableFromArray=Lfa;UR.asyncIterableToArray=Ffa;UR.asyncIterableConcat=Ufa;UR.asyncIterableCount=Qfa;UR.iterableMap=qfa;UR.iterableMapFilter=Gfa;async function*Mfa(t,e){for await(let r of t)yield e(r)}a(Mfa,"asyncIterableMap");async function*Ofa(t,e){for await(let r of t)await e(r)&&(yield r)}a(Ofa,"asyncIterableFilter");async function*Bfa(t,e){for await(let r of t){let n=await e(r);n!==void 0&&(yield n)}}a(Bfa,"asyncIterableMapFilter");async function*Lfa(t){for(let e of t)yield Promise.resolve(e)}a(Lfa,"asyncIterableFromArray");async function Ffa(t){let e=[];for await(let r of t)e.push(r);return e}a(Ffa,"asyncIterableToArray");async function*Ufa(...t){for(let e of t)yield*e}a(Ufa,"asyncIterableConcat");async function Qfa(t){let e=0;for await(let r of t)e++;return e}a(Qfa,"asyncIterableCount");function*qfa(t,e){for(let r of t)yield e(r)}a(qfa,"iterableMap");function*Gfa(t,e){for(let r of t){let n=e(r);n!==void 0&&(yield n)}}a(Gfa,"iterableMapFilter")});var jni=T(Pdr=>{"use strict";f();Object.defineProperty(Pdr,"__esModule",{value:!0});Pdr.getKey=jfa;function Hfa(t,e){return t!==null&&typeof t=="object"&&e in t}a(Hfa,"hasKey");function jfa(t,e){return Hfa(t,e)?t[e]:void 0}a(jfa,"getKey")});var zni=T(QR=>{"use strict";f();var $fa=QR&&QR.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},$ni=QR&&QR.__param||function(t,e){return function(r,n){e(r,n,t)}},kdr;Object.defineProperty(QR,"__esModule",{value:!0});QR.SSEProcessor=void 0;QR.splitChunk=Wni;QR.prepareSolutionForReturn=Kfa;var Vfa=Idr(),Wfa=xK(),Vni=Po(),qst=uc(),zfa=Ait(),Yfa=gue(),AA=new qst.Logger("streamChoices"),Ddr=class{static{a(this,"APIJsonDataStreaming")}constructor(){this.logprobs=[],this.top_logprobs=[],this.text=[],this.tokens=[],this.text_offset=[],this.copilot_annotations=new Vfa.StreamCopilotAnnotations,this.tool_calls=new Mdr,this.function_call=new Odr,this.copilot_references=[],this.yielded=!1}append(e){e.text&&this.text.push(e.text),e.delta?.content&&e.delta.role!=="function"&&this.text.push(e.delta.content),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[])),e.copilot_annotations&&this.copilot_annotations.update(e.copilot_annotations),e.delta?.copilot_annotations&&this.copilot_annotations.update(e.delta.copilot_annotations),e.delta?.tool_calls&&e.delta.tool_calls.length>0&&this.tool_calls.update(e.delta.tool_calls),e.delta?.function_call&&this.function_call.update(e.delta.function_call),e?.finish_reason&&(this.finish_reason=e.finish_reason)}};function Wni(t){let e=t.split(` +`),r=e.pop();return[e.filter(n=>n!==""),r]}a(Wni,"splitChunk");var Ndr=class{static{a(this,"StreamingToolCall")}constructor(){this.arguments=[]}update(e){e.id&&(this.id=e.id),e.function.name&&(this.name=e.function.name),this.arguments.push(e.function.arguments)}},Mdr=class{static{a(this,"StreamingToolCalls")}constructor(){this.toolCalls=[]}update(e){e.forEach(r=>{let n=this.toolCalls.length>0?this.toolCalls[this.toolCalls.length-1]:void 0;(!n||r.id&&n.id!==r.id)&&(n=new Ndr,this.toolCalls.push(n)),n.update(r)})}getToolCalls(){return this.toolCalls}},Odr=class{static{a(this,"StreamingFunctionCall")}constructor(){this.arguments=[]}update(e){e.name&&(this.name=e.name),this.arguments.push(e.arguments)}},Bdr=kdr=class{static{a(this,"SSEProcessor")}constructor(e,r,n,o,s,c=void 0,l,u){this.expectedNumChoices=e,this.response=r,this.body=n,this.telemetryData=o,this.dropCompletionReasons=s,this.cancellationToken=c,this.instantiationService=l,this.logTarget=u,this.requestId=(0,Wfa.getRequestId)(this.response.headers),this.stats=new Fdr,this.solutions={}}static async create(e,r,n,o,s,c){let l=e.get(Vni.IInstantiationService),u=e.get(qst.ICompletionsLogTargetService),d=n.body.pipeThrough(new TextDecoderStream);return new kdr(r,n,d,o,s??[],c,l,u)}async*processSSE(e=()=>{}){try{yield*this.processSSEInner(e)}finally{await this.cancel(),AA.debug(this.logTarget,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),AA.debug(this.logTarget,"request stats:",this.stats)}}async*processSSEInner(e){let r="",n=null,o,s;e:for await(let c of this.body){if(await this.maybeCancel("after awaiting body chunk"))return;AA.debug(this.logTarget,"chunk",c.toString());let[l,u]=Wni(r+c.toString());r=u;for(let d of l){let p=d.slice(5).trim();if(p==="[DONE]"){yield*this.finishSolutions(n,o,s,e);return}n=null;let h;try{h=JSON.parse(p)}catch{AA.error(this.logTarget,"Error parsing JSON stream data",d);continue}if(h.copilot_confirmation&&Jfa(h.copilot_confirmation)&&await e("",{text:"",requestId:this.requestId,copilotConfirmation:h.copilot_confirmation}),h.copilot_references&&await e("",{text:"",requestId:this.requestId,copilotReferences:h.copilot_references}),h.choices===void 0){!h.copilot_references&&!h.copilot_confirmation&&(h.error!==void 0?AA.error(this.logTarget,"Error in response:",h.error.message):AA.error(this.logTarget,"Unexpected response with no choices or error: "+p)),h.copilot_errors&&await e("",{text:"",requestId:this.requestId,copilotErrors:h.copilot_errors});continue}if(o===void 0&&h.model&&(o=h.model),s===void 0&&h.usage&&(s=h.usage),this.allSolutionsDone()){r="";break e}for(let m=0;m-1||g.delta?.content?.indexOf(` -`)>-1;if(g.finish_reason||E){let v=A.text.join("");if(y=this.asSolutionDecision(await e(v,{text:v,index:g.index,requestId:this.requestId,annotations:A.copilot_annotations,copilotReferences:A.copilot_references,getAPIJsonData:a(()=>Adr(A),"getAPIJsonData"),finished:!!g.finish_reason,telemetryData:this.telemetryData})),await this.maybeCancel("after awaiting finishedCb"))return}if(g.finish_reason&&A.function_call.name!==void 0){n=g.finish_reason;continue}if(g.finish_reason&&(y.yieldSolution=!0,y.continueStreaming=!1),!y.yieldSolution)continue;let _=g.finish_reason??"client-trimmed";if(SA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:_,engineName:o??"",engineChoiceSource:this.instantiationService.invokeFunction(Wua.getEngineRequestInfo,this.telemetryData).engineChoiceSource})),this.dropCompletionReasons.includes(g.finish_reason)?this.solutions[g.index]=null:A.yielded||(this.stats.markYielded(g.index),yield{solution:A,finishOffset:y.finishOffset,reason:g.finish_reason,requestId:this.requestId,index:g.index,model:o,usage:s},A.yielded=!0),await this.maybeCancel("after yielding finished choice"))return;y.continueStreaming||(this.solutions[g.index]=null)}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!==null&&(SA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:"Iteration Done",engineName:o??""})),this.stats.markYielded(u),yield{solution:l,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:u,model:o,usage:s},await this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{let c=JSON.parse(r);c.error!==void 0&&SA.error(this.logTarget,`Error in response: ${c.error.message}`,c.error)}catch{SA.error(this.logTarget,`Error parsing extraData: ${r}`)}}asSolutionDecision(e){return e===void 0?{yieldSolution:!1,continueStreaming:!0}:typeof e=="number"?{yieldSolution:!0,continueStreaming:!1,finishOffset:e}:e}async*finishSolutions(e,r,n,o){for(let[s,c]of Object.entries(this.solutions)){let l=Number(s);if(c===null)continue;let u=c.text.join("");if(await o(u,{text:u,index:l,requestId:this.requestId,annotations:c.copilot_annotations,copilotReferences:c.copilot_references,getAPIJsonData:a(()=>Adr(c),"getAPIJsonData"),finished:!0,telemetryData:this.telemetryData}),!c.yielded&&(this.stats.markYielded(l),SA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:e??"DONE",engineName:r??""})),yield{solution:c,finishOffset:void 0,reason:e??"DONE",requestId:this.requestId,index:l,model:r,usage:n},await this.maybeCancel("after yielding on DONE")))return}}async maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(SA.debug(this.logTarget,"Cancelled: "+e),await this.cancel(),!0):!1}async cancel(){await this.body.destroy()}allSolutionsDone(){let e=Object.values(this.solutions);return e.length===this.expectedNumChoices&&e.every(r=>r===null)}};JR.SSEProcessor=gdr;JR.SSEProcessor=gdr=ddr=jua([Vri(6,Wri.IInstantiationService),Vri(7,Dat.ICompletionsLogTargetService)],gdr);function Yua(t,e,r){let n=t.get(Dat.ICompletionsLogTargetService),o=e.solution.text.join(""),s=!1;e.finishOffset!==void 0&&(SA.debug(n,`solution ${e.index}: early finish at offset ${e.finishOffset}`),o=o.substring(0,e.finishOffset),s=!0),SA.info(n,`solution ${e.index} returned. finish reason: [${e.reason}]`),SA.debug(n,`solution ${e.index} details: finishOffset: [${e.finishOffset}]`);let c=Adr(e.solution);return(0,zua.convertToAPIChoice)(t,o,c,e.index,e.requestId,s,r)}a(Yua,"prepareSolutionForReturn");function Adr(t){let e=t.text.join(""),r=t.copilot_annotations.current,n={text:e,tokens:t.text,copilot_annotations:r,finish_reason:t.finish_reason??"stop"};if(t.logprobs.length===0)return n;let o=t.logprobs.reduce((u,d)=>u.concat(d),[]),s=t.top_logprobs.reduce((u,d)=>u.concat(d),[]),c=t.text_offset.reduce((u,d)=>u.concat(d),[]),l=t.tokens.reduce((u,d)=>u.concat(d),[]);return{...n,logprobs:{token_logprobs:o,top_logprobs:s,text_offset:c,tokens:l}}}a(Adr,"convertToAPIJsonData");function Kua(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(Kua,"isCopilotConfirmation");var ydr=class{static{a(this,"ChunkStats")}constructor(){this.choices=new Map}getChoiceStats(e){let r=this.choices.get(e);return r||(r=new Edr,this.choices.set(e,r)),r}add(e){this.getChoiceStats(e).increment()}markYielded(e){this.getChoiceStats(e).markYielded()}toString(){return Array.from(this.choices.entries()).map(([e,r])=>`${e}: ${r.yieldedTokens} -> ${r.seenTokens}`).join(", ")}},Edr=class{static{a(this,"ChoiceStats")}constructor(){this.yieldedTokens=-1,this.seenTokens=0}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}}});var Idr=T($0=>{"use strict";f();var Jua=$0&&$0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},_Q=$0&&$0.__param||function(t,e){return function(r,n){e(r,n,t)}},Cdr;Object.defineProperty($0,"__esModule",{value:!0});$0.LiveOpenAIFetcher=$0.CMDQuotaExceeded=$0.OpenAIFetcher=$0.ICompletionsOpenAIFetcherService=$0.CopilotUiKind=void 0;$0.sanitizeRequestOptionTelemetry=Sdr;$0.postProcessChoices=_dr;var Xua=gA(),Zua=sdr(),eda=iR(),CRe=kat(),rni=CJ(),tda=qr(),rda=Jl(),nda=Ck(),ida=Np(),nni=Mo(),oda=due(),sda=wnt(),Kri=Xm(),ini=jri(),Tdr=mc(),ada=pat(),Mat=Tde(),oni=wat(),Jri=Jur(),qu=Dp(),Xri=lwe(),cda=YK(),JD=$ri(),vQ=rde(),Zri=Yri(),Il=new Tdr.Logger("fetchCompletions"),Oat;(function(t){t.GhostText="ghostText",t.Panel="synthesize"})(Oat||($0.CopilotUiKind=Oat={}));function eni(t){let e=t.get("openai-processing-ms");return e?parseInt(e,10):0}a(eni,"getProcessingTime");function sni(t){switch(t){case Oat.GhostText:return"copilot-ghost";case Oat.Panel:return"copilot-panel"}}a(sni,"uiKindToIntent");$0.ICompletionsOpenAIFetcherService=(0,tda.createServiceIdentifier)("ICompletionsOpenAIFetcherService");var Bat=class{static{a(this,"OpenAIFetcher")}};$0.OpenAIFetcher=Bat;function ani(t,e,r,n){return(0,ada.getEndpointUrl)(t,e,"proxy","v1/engines",r,n)}a(ani,"getProxyEngineUrl");function Sdr(t,e,r,n){for(let[o,s]of Object.entries(t)){if(r.includes(o))continue;let c=s;if(o==="extra"&&n){let l={...c};for(let u of n)delete l[u];c=l}e.properties[`request.option.${o}`]=JSON.stringify(c)??"undefined"}}a(Sdr,"sanitizeRequestOptionTelemetry");async function lda(t,e,r,n,o,s,c,l,u,d,p){let h=t.get(nni.IInstantiationService),m=t.get(Tdr.ICompletionsLogTargetService),g=t.get(oni.ICompletionsStatusReporter),A=h.invokeFunction(ani,c,r,n),y=u.extendedBy({endpoint:n,engineName:r,uiKind:l},(0,qu.telemetrizePromptLength)(e));Sdr(s,y,["prompt","suffix"],["context"]),y.properties.headerRequestId=o,h.invokeFunction(qu.telemetry,"request.sent",y);let E=(0,qu.now)(),_=sni(l);return h.invokeFunction(Mat.postRequest,A,c.token,_,o,s,d,p).then(v=>{let b=(0,rni.getRequestId)(v.headers);y.extendWithRequestId(b);let I=(0,qu.now)()-E;return y.measurements.totalTimeMs=I,Il.info(m,`Request ${o} at <${A}> finished with ${v.status} status after ${I}ms`),y.properties.status=String(v.status),Il.debug(m,"request.response properties",y.properties),Il.debug(m,"request.response measurements",y.measurements),Il.debug(m,"prompt:",e),h.invokeFunction(qu.telemetry,"request.response",y),v}).catch(v=>{if((0,Mat.isAbortError)(v))throw h.invokeFunction(qu.telemetry,"request.cancel",y),v;g.setWarning((0,JD.getKey)(v,"message")??"");let b=y.extendedBy({error:"Network exception"});h.invokeFunction(qu.telemetry,"request.shownWarning",b),y.properties.message=String((0,JD.getKey)(v,"name")??""),y.properties.code=String((0,JD.getKey)(v,"code")??""),y.properties.errno=String((0,JD.getKey)(v,"errno")??""),y.properties.type=String((0,JD.getKey)(v,"type")??"");let I=(0,qu.now)()-E;throw y.measurements.totalTimeMs=I,Il.info(m,`Request ${o} at <${A}> rejected with ${String(v)} after ${I}ms`),Il.debug(m,"request.error properties",y.properties),Il.debug(m,"request.error measurements",y.measurements),h.invokeFunction(qu.telemetry,"request.error",y),v}).finally(()=>{h.invokeFunction(qu.logEnginePrompt,e,y)})}a(lda,"fetchWithInstrumentation");function _dr(t){return(0,ini.asyncIterableFilter)(t,e=>e.completionText.trim().length>0)}a(_dr,"postProcessChoices");$0.CMDQuotaExceeded="github.copilot.completions.quotaExceeded";var vdr=Cdr=class extends Bat{static{a(this,"LiveOpenAIFetcher")}#e;constructor(e,r,n,o,s,c,l,u){super(),this.instantiationService=e,this.runtimeModeService=r,this.logTargetService=n,this.copilotTokenManager=o,this.statusReporter=s,this.authenticationService=c,this.fetchService=l,this.envService=u}async fetchAndStreamCompletions(e,r,n,o){if(this.#e)return{type:"canceled",reason:this.#e};let s="completions",c=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),l=await this.fetchWithParameters(s,e,c,r,o);if(l==="not-sent")return{type:"canceled",reason:"before fetch request"};if(o?.isCancellationRequested){try{await l.body.destroy()}catch(h){this.instantiationService.invokeFunction(m=>Il.exception(m,h,"Error destroying stream"))}return{type:"canceled",reason:"after fetch request"}}if(l.status!==200){let h=this.createTelemetryData(s,e);return this.handleError(this.statusReporter,h,l,c)}let d=(await this.instantiationService.invokeFunction(Zri.SSEProcessor.create,e.count,l,r,[],o)).processSSE(n),p=(0,ini.asyncIterableMap)(d,h=>this.instantiationService.invokeFunction(Zri.prepareSolutionForReturn,h,r));return{type:"success",choices:_dr(p),getProcessingTime:a(()=>eni(l.headers),"getProcessingTime")}}async fetchAndStreamCompletions2(e,r,n,o){if(this.#e)return{type:"canceled",reason:this.#e};let s="completions",c=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),l={prompt:e.prompt.prefix,suffix:e.prompt.suffix,max_tokens:(0,vQ.getMaxSolutionTokens)(),temperature:(0,vQ.getTemperatureForSamples)(this.runtimeModeService,e.count),top_p:(0,vQ.getTopP)(),n:e.count,stop:(0,vQ.getStops)(e.languageId),stream:!0,extra:e.extra};{e.requestLogProbs&&(l.logprobs=2);let u=(0,Jri.tryGetGitHubNWO)(e.repoInfo);if(u!==void 0&&(l.nwo=u),e.postOptions&&Object.assign(l,e.postOptions),e.prompt.context&&e.prompt.context.length>0&&(l.extra.context=e.prompt.context),await(0,Xri.delay)(0),o?.isCancellationRequested)return{type:"canceled",reason:"before fetch request"}}{let u=e.prompt,d=e.engineModelId,p=e.ourRequestId,h=r,m=e.uiKind,g=e.headers,A=this.instantiationService.invokeFunction(ani,c,d,s),y=h.extendedBy({endpoint:s,engineName:d,uiKind:m},(0,qu.telemetrizePromptLength)(u));Sdr(l,y,["prompt","suffix"],["context"]),y.properties.headerRequestId=p,this.instantiationService.invokeFunction(qu.telemetry,"request.sent",y);let E=sni(m),_;_={...g,...this.instantiationService.invokeFunction(Kri.editorVersionHeaders)},_["Openai-Organization"]="github-copilot",_["X-Request-Id"]=p,_["VScode-SessionId"]=this.envService.sessionId,_["VScode-MachineId"]=this.envService.machineId,_["X-GitHub-Api-Version"]=Kri.apiVersion,E&&(_["OpenAI-Intent"]=E);let v=new nda.StopWatch,b=await this.fetchService.fetch(A,c.token,l,p,o,_).then(I=>I.isError()&&I.err instanceof CRe.Completions.Unexpected&&(0,Mat.isInterruptedNetworkError)(I.err.error)?(this.instantiationService.invokeFunction(qu.telemetry,"networking.disconnectAll"),this.fetchService.disconnectAll().then(()=>this.fetchService.fetch(A,c.token,l,p,o,_))):I);try{if(b.isError()){let R=b.err;if(R instanceof CRe.Completions.RequestCancelled)return this.instantiationService.invokeFunction(qu.telemetry,"networking.cancelRequest",qu.TelemetryData.createAndMarkAsIssued({headerRequestId:p})),this.instantiationService.invokeFunction(qu.telemetry,"request.cancel",y),{type:"canceled",reason:"during fetch request"};if(R instanceof CRe.Completions.UnsuccessfulResponse){let w=(0,rni.getRequestId)(R.headers);y.extendWithRequestId(w);let P=v.elapsed();return y.measurements.totalTimeMs=P,y.properties.status=String(R.status),Il.info(this.logTargetService,`Request ${p} at <${A}> finished with ${R.status} status after ${P}ms`),Il.debug(this.logTargetService,"request.response properties",y.properties),Il.debug(this.logTargetService,"request.response measurements",y.measurements),Il.debug(this.logTargetService,"prompt:",u),this.instantiationService.invokeFunction(qu.telemetry,"request.response",y),this.handleError(this.statusReporter,y,{status:R.status,text:R.text,headers:R.headers},c)}else if(R instanceof CRe.Completions.Unexpected){let w=R.error;if((0,Mat.isAbortError)(w))throw this.instantiationService.invokeFunction(qu.telemetry,"request.cancel",y),w;this.statusReporter.setWarning((0,JD.getKey)(w,"message")??"");let P=y.extendedBy({error:"Network exception"});this.instantiationService.invokeFunction(qu.telemetry,"request.shownWarning",P),y.properties.message=String((0,JD.getKey)(w,"name")??""),y.properties.code=String((0,JD.getKey)(w,"code")??""),y.properties.errno=String((0,JD.getKey)(w,"errno")??""),y.properties.type=String((0,JD.getKey)(w,"type")??"");let k=v.elapsed();throw y.measurements.totalTimeMs=k,Il.info(this.logTargetService,`Request ${p} at <${A}> rejected with ${String(w)} after ${k}ms`),Il.debug(this.logTargetService,"request.error properties",y.properties),Il.debug(this.logTargetService,"request.error measurements",y.measurements),this.instantiationService.invokeFunction(qu.telemetry,"request.error",y),w}else(0,rda.assertNever)(R)}let I=b.val;{let R=I.requestId;y.extendWithRequestId(R);let w=v.elapsed();y.measurements.totalTimeMs=w;let P=200;Il.info(this.logTargetService,`Request ${p} at <${A}> finished with ${P} status after ${w}ms`),y.properties.status=String(P),Il.debug(this.logTargetService,"request.response properties",y.properties),Il.debug(this.logTargetService,"request.response measurements",y.measurements),Il.debug(this.logTargetService,"prompt:",u),this.instantiationService.invokeFunction(qu.telemetry,"request.response",y)}if(o.isCancellationRequested){try{await I.destroy()}catch(R){this.instantiationService.invokeFunction(w=>Il.exception(w,R,"Error destroying stream"))}return{type:"canceled",reason:"after fetch request"}}let x=Cdr.convertStreamToApiChoices(I,n,r,o);return{type:"success",choices:_dr(x),getProcessingTime:a(()=>eni(I.headers),"getProcessingTime")}}finally{this.instantiationService.invokeFunction(qu.logEnginePrompt,u,y)}}}createTelemetryData(e,r){return qu.TelemetryData.createAndMarkAsIssued({endpoint:e,engineName:r.engineModelId,uiKind:r.uiKind,headerRequestId:r.ourRequestId})}async fetchWithParameters(e,r,n,o,s){let c={prompt:r.prompt.prefix,suffix:r.prompt.suffix,max_tokens:(0,vQ.getMaxSolutionTokens)(),temperature:(0,vQ.getTemperatureForSamples)(this.runtimeModeService,r.count),top_p:(0,vQ.getTopP)(),n:r.count,stop:(0,vQ.getStops)(r.languageId),stream:!0,extra:r.extra};r.requestLogProbs&&(c.logprobs=2);let l=(0,Jri.tryGetGitHubNWO)(r.repoInfo);return l!==void 0&&(c.nwo=l),r.postOptions&&Object.assign(c,r.postOptions),r.prompt.context&&r.prompt.context.length>0&&(c.extra.context=r.prompt.context),await(0,Xri.delay)(0),s?.isCancellationRequested?"not-sent":await this.instantiationService.invokeFunction(lda,r.prompt,r.engineModelId,e,r.ourRequestId,c,n,r.uiKind,o,s,r.headers)}static async*convertStreamToApiChoices(e,r,n,o){let s=a((l,u,d,p,h)=>({choiceIndex:l,completionText:u,requestId:e.requestId,finishReason:d,tokens:p.chunks,numTokens:p.chunks.length,blockFinished:h,telemetryData:n,clientCompletionId:(0,ida.generateUuid)(),meanLogProb:void 0,meanAlternativeLogProb:void 0}),"createAPIChoice"),c=[];try{for await(let l of e.stream){if(o?.isCancellationRequested)return;for(let u=0;u-1,y;if((m||A)&&(y=await r(p.accumulator.responseSoFar,{index:d,text:p.accumulator.responseSoFar,finished:m,requestId:e.requestId,telemetryData:n,annotations:p.accumulator.annotations,getAPIJsonData:a(()=>({text:p.accumulator.responseSoFar,tokens:p.accumulator.chunks,finish_reason:p.accumulator.finishReason??"stop",copilot_annotations:p.accumulator.annotations.current}),"getAPIJsonData")}),o?.isCancellationRequested))return;if(m&&(y===void 0||typeof y!="object"?y={yieldSolution:!0,continueStreaming:!1}:(y.yieldSolution=!0,y.continueStreaming=!1)),y!==void 0&&(typeof y=="number"||y.yieldSolution)){let E=m||typeof y=="number"||y!==void 0&&!y.continueStreaming;p.isFinished=E;let _=l.choices[u].finish_reason;_&&(p.accumulator.finishReason=_);let v=typeof y=="number"?y:y&&y.finishOffset!==void 0?y.finishOffset:void 0,b=v===void 0?p.accumulator.responseSoFar:p.accumulator.responseSoFar.slice(0,v);if(p.yielded||(p.yielded=!0,yield s(d,b,p.accumulator.finishReason??"stop",p.accumulator,v!==void 0)),o?.isCancellationRequested)return}}}for(let[l,u]of c.entries())if(!u.isFinished){if(await r(u.accumulator.responseSoFar,{index:l,text:u.accumulator.responseSoFar,finished:!0,requestId:e.requestId,telemetryData:n,annotations:u.accumulator.annotations,getAPIJsonData:a(()=>({text:u.accumulator.responseSoFar,tokens:u.accumulator.chunks,finish_reason:u.accumulator.finishReason??"stop",copilot_annotations:u.accumulator.annotations.current}),"getAPIJsonData")}),o?.isCancellationRequested)return;if(u.yielded)continue;if(u.yielded=!0,yield s(l,u.accumulator.responseSoFar,u.accumulator.finishReason??"stop",u.accumulator,!1),o?.isCancellationRequested)return}}finally{try{await e.destroy()}catch{}}}async handleError(e,r,n,o){let s=await n.text();if(n.status===402){this.#e="monthly free code completions exhausted",e.setError("Completions limit reached",{command:$0.CMDQuotaExceeded,title:"Learn More"});let l=(0,sda.onCopilotToken)(this.authenticationService,u=>{this.#e=void 0,u.isCompletionsQuotaExceeded||(e.forceNormal(),l.dispose())});return{type:"failed",reason:this.#e}}if(n.status===466)return e.setError(s),Il.info(this.logTargetService,s),{type:"failed",reason:`client not supported: ${s}`};if(tni(n)&&!n.headers.get("x-github-request-id")){let c=`Last response was a ${n.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;Il.error(this.logTargetService,c),e.setWarning(c),r.properties.error=`Response status was ${n.status} with no x-github-request-id header`}else tni(n)?(Il.warn(this.logTargetService,`Response status was ${n.status}:`,s),e.setWarning(`Last response was a ${n.status} error: ${s}`),r.properties.error=`Response status was ${n.status}: ${s}`):(e.setWarning(`Last response was a ${n.status} error`),r.properties.error=`Response status was ${n.status}`);return r.properties.status=String(n.status),this.instantiationService.invokeFunction(qu.telemetry,"request.shownWarning",r),n.status===401||n.status===403?(this.copilotTokenManager.resetToken(n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`}):n.status===429?(setTimeout(()=>{this.#e=void 0},10*1e3),this.#e="rate limited",Il.warn(this.logTargetService,"Rate limited by server. Denying completions for the next 10 seconds."),{type:"failed",reason:this.#e}):n.status===499?(Il.info(this.logTargetService,"Cancelled by server"),{type:"failed",reason:"canceled by server"}):(Il.error(this.logTargetService,"Unhandled status from server:",n.status,s),{type:"failed",reason:`unhandled status from server: ${n.status} ${s}`})}};$0.LiveOpenAIFetcher=vdr;$0.LiveOpenAIFetcher=vdr=Cdr=Jua([_Q(0,nni.IInstantiationService),_Q(1,cda.ICompletionsRuntimeModeService),_Q(2,Tdr.ICompletionsLogTargetService),_Q(3,oda.ICompletionsCopilotTokenManager),_Q(4,oni.ICompletionsStatusReporter),_Q(5,Xua.IAuthenticationService),_Q(6,CRe.ICompletionsFetchService),_Q(7,eda.IEnvService)],vdr);function tni(t){return t.status>=400&&t.status<500}a(tni,"isClientError");var bdr=class{static{a(this,"CompletionAccumulator")}constructor(){this._chunks=[],this._responseSoFar="",this._finishReason=null,this.annotations=new Zua.StreamCopilotAnnotations}get responseSoFar(){return this._responseSoFar}get chunks(){return this._chunks}set finishReason(e){this._finishReason=e}get finishReason(){return this._finishReason}append(e){let r=e.text;r&&(this._chunks.push(r),this._responseSoFar=this._responseSoFar+r),e.copilot_annotations&&this.annotations.update(e.copilot_annotations)}}});var wdr=T(xdr=>{"use strict";f();Object.defineProperty(xdr,"__esModule",{value:!0});xdr.appendToCache=uda;function uda(t,e,r){t.append(e.prefix,e.prompt.suffix,r)}a(uda,"appendToCache")});var pni=T(Gu=>{"use strict";f();var dda=Gu&&Gu.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},s3=Gu&&Gu.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.CompletionsFromNetwork=Gu.logger=void 0;Gu.postProcessChoices=Lat;Gu.makeGhostAPIChoice=fni;Gu.telemetryPerformance=Ndr;var uni=fc(),_Re=ARe(),fda=gd(),pda=Ay(),vRe=VT(),hda=Jl(),mda=Qv(),gda=Mo(),cni=Xm(),Ada=uir(),yda=Zm(),dni=mc(),Eda=gur(),Pdr=Idr(),Cda=rde(),_da=Dp(),vda=YK(),bda=Kue(),Rdr=wdr(),Tda=dwe(),lni=HU(),XR=Zue();Gu.logger=new dni.Logger("ghostText");var kdr=class{static{a(this,"CompletionsFromNetwork")}constructor(e,r,n,o,s,c,l,u,d){this.instantiationService=e,this.fetcherService=r,this.featuresService=n,this.runtimeMode=o,this.logTarget=s,this.completionsCacheService=c,this.userErrorNotifier=l,this.configurationService=u,this.expService=d}async getCompletionsFromNetwork(e,r,n,o,s){return this.genericGetCompletionsFromNetwork(e,r,n,o,s,"completions",async(c,l,u)=>{let p=await u[Symbol.asyncIterator]().next();if(p.done)return Gu.logger.debug(this.logTarget,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:(0,XR.mkBasicResultTelemetry)(r)};if(n?.isCancellationRequested)return Gu.logger.debug(this.logTarget,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:(0,XR.mkCanceledResultTelemetry)(r)};let h=p.value;if(h===void 0)return Gu.logger.debug(this.logTarget,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:(0,XR.mkBasicResultTelemetry)(r)};this.instantiationService.invokeFunction(Ndr,"performance",h,c,l),Gu.logger.debug(this.logTarget,`Awaited first result, id: ${h.choiceIndex}`);let m=Lat(h);m&&((0,Rdr.appendToCache)(this.completionsCacheService,e,m),Gu.logger.debug(this.logTarget,`GhostText first completion (index ${m?.choiceIndex}): ${JSON.stringify(m?.completionText)}`));let g=(async()=>{let A=m!==void 0?[m]:[];for await(let y of u){if(y===void 0)continue;Gu.logger.debug(this.logTarget,`GhostText later completion (index ${y?.choiceIndex}): ${JSON.stringify(y.completionText)}`);let E=Lat(y,A);E&&(A.push(E),(0,Rdr.appendToCache)(this.completionsCacheService,e,E))}})();return this.runtimeMode.isRunningInTest()&&await g,m?{type:"success",value:[fni(m,{forceSingleLine:!1}),g],telemetryData:(0,XR.mkBasicResultTelemetry)(r),telemetryBlob:r,resultType:lni.ResultType.Network}:{type:"empty",reason:"got undefined processedFirstChoice",telemetryData:(0,XR.mkBasicResultTelemetry)(r)}})}async getAllCompletionsFromNetwork(e,r,n,o,s){return this.genericGetCompletionsFromNetwork(e,r,n,o,s,"all completions",async(c,l,u)=>{let d=[];for await(let p of u){if(n?.isCancellationRequested)return Gu.logger.debug(this.logTarget,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:(0,XR.mkCanceledResultTelemetry)(r)};let h=Lat(p,d);h&&d.push(h)}if(d.length>0){for(let p of d)(0,Rdr.appendToCache)(this.completionsCacheService,e,p);this.instantiationService.invokeFunction(Ndr,"cyclingPerformance",d[0],c,l)}return{type:"success",value:[d,Promise.resolve()],telemetryData:(0,XR.mkBasicResultTelemetry)(r),telemetryBlob:r,resultType:lni.ResultType.Cycling}})}async genericGetCompletionsFromNetwork(e,r,n,o,s,c,l){let u=new _Re.StatelessNextEditTelemetryBuilder(e.ourRequestId),d=await this._genericGetCompletionsFromNetwork(e,r,n,o,u,c,l),p;switch(d.type){case"success":p=vRe.Result.ok(void 0);break;case"canceled":p=vRe.Result.error(new _Re.NoNextEditReason.GotCancelled(d.reason));break;case"empty":p=vRe.Result.error(new _Re.NoNextEditReason.NoSuggestions(new mda.StringText(""),void 0));break;case"failed":p=vRe.Result.error(new _Re.NoNextEditReason.Uncategorized(pda.ErrorUtils.fromUnknown(d.reason)));break;case"abortedBeforeIssued":case"promptOnly":p=vRe.Result.error(new _Re.NoNextEditReason.GotCancelled(d.reason));break;default:(0,hda.assertNever)(d)}return s.setStatelessNextEditTelemetry(u.build(p)),d}async _genericGetCompletionsFromNetwork(e,r,n,o,s,c,l){Gu.logger.debug(this.logTarget,`Getting ${c} from network`),r=r.extendedBy(),s.setModelName(e.engineModelId);let u=e.isCycling?3:1,d=(0,Cda.getTemperatureForSamples)(this.runtimeMode,u),p={language:e.languageId,next_indent:e.indentation.next??0,trim_by_indentation:(0,cni.shouldDoServerTrimming)(e.blockMode),prompt_tokens:e.prompt.prefixTokens??0,suffix_tokens:e.prompt.suffixTokens??0},h={n:u,temperature:d,code_annotations:!1},m=this.featuresService.modelAlwaysTerminatesSingleline(r),g=e.blockMode===cni.BlockMode.MoreMultiline&&bda.BlockTrimmer.isSupported(e.languageId)&&!m;!e.multiline&&!g?h.stop=[` -`]:e.stop&&(h.stop=e.stop),e.maxTokens!==void 0&&(h.max_tokens=e.maxTokens);let A=Date.now(),y={endpoint:"completions",uiKind:Pdr.CopilotUiKind.GhostText,temperature:JSON.stringify(d),n:JSON.stringify(u),stop:JSON.stringify(h.stop)??"unset",logit_bias:JSON.stringify(null)};Object.assign(r.properties,y);try{let E={prompt:e.prompt,languageId:e.languageId,repoInfo:e.repoInfo,ourRequestId:e.ourRequestId,engineModelId:e.engineModelId,count:u,uiKind:Pdr.CopilotUiKind.GhostText,postOptions:h,headers:e.headers,extra:p},_=this.configurationService.getExperimentBasedConfig(uni.ConfigKey.TeamInternal.GhostTextUseCompletionsFetchService,this.expService)?await this.fetcherService.fetchAndStreamCompletions2(E,r,o,n):await this.fetcherService.fetchAndStreamCompletions(E,r,o,n);return _.type==="failed"?{type:"failed",reason:_.reason,telemetryData:(0,XR.mkBasicResultTelemetry)(r)}:_.type==="canceled"?(Gu.logger.debug(this.logTarget,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:_.reason,telemetryData:(0,XR.mkCanceledResultTelemetry)(r)}):l(A,_.getProcessingTime(),_.choices)}catch(E){if((0,Eda.isAbortError)(E))return{type:"canceled",reason:"network request aborted",telemetryData:(0,XR.mkCanceledResultTelemetry)(r,{cancelledNetworkRequest:!0})};if(this.instantiationService.invokeFunction(_=>Gu.logger.exception(_,E,"Error on ghost text request")),this.userErrorNotifier.notifyUser(E),this.runtimeMode.shouldFailForDebugPurposes())throw E;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:(0,XR.mkBasicResultTelemetry)(r)}}}};Gu.CompletionsFromNetwork=kdr;Gu.CompletionsFromNetwork=kdr=dda([s3(0,gda.IInstantiationService),s3(1,Pdr.ICompletionsOpenAIFetcherService),s3(2,yda.ICompletionsFeaturesService),s3(3,vda.ICompletionsRuntimeModeService),s3(4,dni.ICompletionsLogTargetService),s3(5,Tda.ICompletionsCacheService),s3(6,Ada.ICompletionsUserErrorNotifierService),s3(7,uni.IConfigurationService),s3(8,fda.IExperimentationService)],kdr);function Lat(t,e){if(e||(e=[]),t.completionText=t.completionText.trimEnd(),!!t.completionText&&e.findIndex(r=>r.completionText.trim()===t.completionText.trim())===-1)return t}a(Lat,"postProcessChoices");function fni(t,e){let r={...t};if(e.forceSingleLine){let{completionText:n}=r,o=n.match(/^\r?\n/);o?r.completionText=o[0]+n.split(` +`)>-1;if(g.finish_reason||E){let v=A.text.join("");if(y=this.asSolutionDecision(await e(v,{text:v,index:g.index,requestId:this.requestId,annotations:A.copilot_annotations,copilotReferences:A.copilot_references,getAPIJsonData:a(()=>Ldr(A),"getAPIJsonData"),finished:!!g.finish_reason,telemetryData:this.telemetryData})),await this.maybeCancel("after awaiting finishedCb"))return}if(g.finish_reason&&A.function_call.name!==void 0){n=g.finish_reason;continue}if(g.finish_reason&&(y.yieldSolution=!0,y.continueStreaming=!1),!y.yieldSolution)continue;let _=g.finish_reason??"client-trimmed";if(AA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:_,engineName:o??"",engineChoiceSource:this.instantiationService.invokeFunction(zfa.getEngineRequestInfo,this.telemetryData).engineChoiceSource})),this.dropCompletionReasons.includes(g.finish_reason)?this.solutions[g.index]=null:A.yielded||(this.stats.markYielded(g.index),yield{solution:A,finishOffset:y.finishOffset,reason:g.finish_reason,requestId:this.requestId,index:g.index,model:o,usage:s},A.yielded=!0),await this.maybeCancel("after yielding finished choice"))return;y.continueStreaming||(this.solutions[g.index]=null)}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!==null&&(AA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:"Iteration Done",engineName:o??""})),this.stats.markYielded(u),yield{solution:l,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:u,model:o,usage:s},await this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{let c=JSON.parse(r);c.error!==void 0&&AA.error(this.logTarget,`Error in response: ${c.error.message}`,c.error)}catch{AA.error(this.logTarget,`Error parsing extraData: ${r}`)}}asSolutionDecision(e){return e===void 0?{yieldSolution:!1,continueStreaming:!0}:typeof e=="number"?{yieldSolution:!0,continueStreaming:!1,finishOffset:e}:e}async*finishSolutions(e,r,n,o){for(let[s,c]of Object.entries(this.solutions)){let l=Number(s);if(c===null)continue;let u=c.text.join("");if(await o(u,{text:u,index:l,requestId:this.requestId,annotations:c.copilot_annotations,copilotReferences:c.copilot_references,getAPIJsonData:a(()=>Ldr(c),"getAPIJsonData"),finished:!0,telemetryData:this.telemetryData}),!c.yielded&&(this.stats.markYielded(l),AA.debug(this.logTarget,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:e??"DONE",engineName:r??""})),yield{solution:c,finishOffset:void 0,reason:e??"DONE",requestId:this.requestId,index:l,model:r,usage:n},await this.maybeCancel("after yielding on DONE")))return}}async maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(AA.debug(this.logTarget,"Cancelled: "+e),await this.cancel(),!0):!1}async cancel(){await this.body.destroy()}allSolutionsDone(){let e=Object.values(this.solutions);return e.length===this.expectedNumChoices&&e.every(r=>r===null)}};QR.SSEProcessor=Bdr;QR.SSEProcessor=Bdr=kdr=$fa([$ni(6,Vni.IInstantiationService),$ni(7,qst.ICompletionsLogTargetService)],Bdr);function Kfa(t,e,r){let n=t.get(qst.ICompletionsLogTargetService),o=e.solution.text.join(""),s=!1;e.finishOffset!==void 0&&(AA.debug(n,`solution ${e.index}: early finish at offset ${e.finishOffset}`),o=o.substring(0,e.finishOffset),s=!0),AA.info(n,`solution ${e.index} returned. finish reason: [${e.reason}]`),AA.debug(n,`solution ${e.index} details: finishOffset: [${e.finishOffset}]`);let c=Ldr(e.solution);return(0,Yfa.convertToAPIChoice)(t,o,c,e.index,e.requestId,s,r)}a(Kfa,"prepareSolutionForReturn");function Ldr(t){let e=t.text.join(""),r=t.copilot_annotations.current,n={text:e,tokens:t.text,copilot_annotations:r,finish_reason:t.finish_reason??"stop"};if(t.logprobs.length===0)return n;let o=t.logprobs.reduce((u,d)=>u.concat(d),[]),s=t.top_logprobs.reduce((u,d)=>u.concat(d),[]),c=t.text_offset.reduce((u,d)=>u.concat(d),[]),l=t.tokens.reduce((u,d)=>u.concat(d),[]);return{...n,logprobs:{token_logprobs:o,top_logprobs:s,text_offset:c,tokens:l}}}a(Ldr,"convertToAPIJsonData");function Jfa(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(Jfa,"isCopilotConfirmation");var Fdr=class{static{a(this,"ChunkStats")}constructor(){this.choices=new Map}getChoiceStats(e){let r=this.choices.get(e);return r||(r=new Udr,this.choices.set(e,r)),r}add(e){this.getChoiceStats(e).increment()}markYielded(e){this.getChoiceStats(e).markYielded()}toString(){return Array.from(this.choices.entries()).map(([e,r])=>`${e}: ${r.yieldedTokens} -> ${r.seenTokens}`).join(", ")}},Udr=class{static{a(this,"ChoiceStats")}constructor(){this.yieldedTokens=-1,this.seenTokens=0}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}}});var Vdr=T(Q0=>{"use strict";f();var Xfa=Q0&&Q0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},zU=Q0&&Q0.__param||function(t,e){return function(r,n){e(r,n,t)}},Qdr;Object.defineProperty(Q0,"__esModule",{value:!0});Q0.LiveOpenAIFetcher=Q0.CMDQuotaExceeded=Q0.OpenAIFetcher=Q0.ICompletionsOpenAIFetcherService=Q0.CopilotUiKind=void 0;Q0.sanitizeRequestOptionTelemetry=$dr;Q0.postProcessChoices=qdr;var Zfa=cA(),e0a=Idr(),t0a=Ww(),Awe=Ust(),tii=xK(),r0a=qr(),n0a=Hl(),i0a=ck(),o0a=Ip(),rii=Po(),s0a=Sle(),a0a=Brt(),Yni=Gm(),nii=Hni(),jdr=uc(),c0a=Cst(),Gst=Fue(),iii=Bst(),Kni=Adr(),ku=xp(),Jni=sxe(),l0a=rK(),UD=jni(),YU=gue(),Xni=zni(),El=new jdr.Logger("fetchCompletions"),Hst;(function(t){t.GhostText="ghostText",t.Panel="synthesize"})(Hst||(Q0.CopilotUiKind=Hst={}));function Zni(t){let e=t.get("openai-processing-ms");return e?parseInt(e,10):0}a(Zni,"getProcessingTime");function oii(t){switch(t){case Hst.GhostText:return"copilot-ghost";case Hst.Panel:return"copilot-panel"}}a(oii,"uiKindToIntent");Q0.ICompletionsOpenAIFetcherService=(0,r0a.createServiceIdentifier)("ICompletionsOpenAIFetcherService");var jst=class{static{a(this,"OpenAIFetcher")}};Q0.OpenAIFetcher=jst;function sii(t,e,r,n){return(0,c0a.getEndpointUrl)(t,e,"proxy","v1/engines",r,n)}a(sii,"getProxyEngineUrl");function $dr(t,e,r,n){for(let[o,s]of Object.entries(t)){if(r.includes(o))continue;let c=s;if(o==="extra"&&n){let l={...c};for(let u of n)delete l[u];c=l}e.properties[`request.option.${o}`]=JSON.stringify(c)??"undefined"}}a($dr,"sanitizeRequestOptionTelemetry");async function u0a(t,e,r,n,o,s,c,l,u,d,p){let h=t.get(rii.IInstantiationService),m=t.get(jdr.ICompletionsLogTargetService),g=t.get(iii.ICompletionsStatusReporter),A=h.invokeFunction(sii,c,r,n),y=u.extendedBy({endpoint:n,engineName:r,uiKind:l},(0,ku.telemetrizePromptLength)(e));$dr(s,y,["prompt","suffix"],["context"]),y.properties.headerRequestId=o,h.invokeFunction(ku.telemetry,"request.sent",y);let E=(0,ku.now)(),_=oii(l);return h.invokeFunction(Gst.postRequest,A,c.token,_,o,s,d,p).then(v=>{let b=(0,tii.getRequestId)(v.headers);y.extendWithRequestId(b);let I=(0,ku.now)()-E;return y.measurements.totalTimeMs=I,El.info(m,`Request ${o} at <${A}> finished with ${v.status} status after ${I}ms`),y.properties.status=String(v.status),El.debug(m,"request.response properties",y.properties),El.debug(m,"request.response measurements",y.measurements),El.debug(m,"prompt:",e),h.invokeFunction(ku.telemetry,"request.response",y),v}).catch(v=>{if((0,Gst.isAbortError)(v))throw h.invokeFunction(ku.telemetry,"request.cancel",y),v;g.setWarning((0,UD.getKey)(v,"message")??"");let b=y.extendedBy({error:"Network exception"});h.invokeFunction(ku.telemetry,"request.shownWarning",b),y.properties.message=String((0,UD.getKey)(v,"name")??""),y.properties.code=String((0,UD.getKey)(v,"code")??""),y.properties.errno=String((0,UD.getKey)(v,"errno")??""),y.properties.type=String((0,UD.getKey)(v,"type")??"");let I=(0,ku.now)()-E;throw y.measurements.totalTimeMs=I,El.info(m,`Request ${o} at <${A}> rejected with ${String(v)} after ${I}ms`),El.debug(m,"request.error properties",y.properties),El.debug(m,"request.error measurements",y.measurements),h.invokeFunction(ku.telemetry,"request.error",y),v}).finally(()=>{h.invokeFunction(ku.logEnginePrompt,e,y)})}a(u0a,"fetchWithInstrumentation");function qdr(t){return(0,nii.asyncIterableFilter)(t,e=>e.completionText.trim().length>0)}a(qdr,"postProcessChoices");Q0.CMDQuotaExceeded="github.copilot.completions.quotaExceeded";var Gdr=Qdr=class extends jst{static{a(this,"LiveOpenAIFetcher")}#e;constructor(e,r,n,o,s,c,l,u){super(),this.instantiationService=e,this.runtimeModeService=r,this.logTargetService=n,this.copilotTokenManager=o,this.statusReporter=s,this.authenticationService=c,this.fetchService=l,this.envService=u}async fetchAndStreamCompletions(e,r,n,o){if(this.#e)return{type:"canceled",reason:this.#e};let s="completions",c=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),l=await this.fetchWithParameters(s,e,c,r,o);if(l==="not-sent")return{type:"canceled",reason:"before fetch request"};if(o?.isCancellationRequested){try{await l.body.destroy()}catch(h){this.instantiationService.invokeFunction(m=>El.exception(m,h,"Error destroying stream"))}return{type:"canceled",reason:"after fetch request"}}if(l.status!==200){let h=this.createTelemetryData(s,e);return this.handleError(this.statusReporter,h,l,c)}let d=(await this.instantiationService.invokeFunction(Xni.SSEProcessor.create,e.count,l,r,[],o)).processSSE(n),p=(0,nii.asyncIterableMap)(d,h=>this.instantiationService.invokeFunction(Xni.prepareSolutionForReturn,h,r));return{type:"success",choices:qdr(p),getProcessingTime:a(()=>Zni(l.headers),"getProcessingTime")}}async fetchAndStreamCompletions2(e,r,n,o){if(this.#e)return{type:"canceled",reason:this.#e};let s="completions",c=this.copilotTokenManager.token??await this.copilotTokenManager.getToken(),l={prompt:e.prompt.prefix,suffix:e.prompt.suffix,max_tokens:(0,YU.getMaxSolutionTokens)(),temperature:(0,YU.getTemperatureForSamples)(this.runtimeModeService,e.count),top_p:(0,YU.getTopP)(),n:e.count,stop:(0,YU.getStops)(e.languageId),stream:!0,extra:e.extra};{e.requestLogProbs&&(l.logprobs=2);let u=(0,Kni.tryGetGitHubNWO)(e.repoInfo);if(u!==void 0&&(l.nwo=u),e.postOptions&&Object.assign(l,e.postOptions),e.prompt.context&&e.prompt.context.length>0&&(l.extra.context=e.prompt.context),await(0,Jni.delay)(0),o?.isCancellationRequested)return{type:"canceled",reason:"before fetch request"}}{let u=e.prompt,d=e.engineModelId,p=e.ourRequestId,h=r,m=e.uiKind,g=e.headers,A=this.instantiationService.invokeFunction(sii,c,d,s),y=h.extendedBy({endpoint:s,engineName:d,uiKind:m},(0,ku.telemetrizePromptLength)(u));$dr(l,y,["prompt","suffix"],["context"]),y.properties.headerRequestId=p,this.instantiationService.invokeFunction(ku.telemetry,"request.sent",y);let E=oii(m),_;_={...g,...this.instantiationService.invokeFunction(Yni.editorVersionHeaders)},_["Openai-Organization"]="github-copilot",_["X-Request-Id"]=p,_["VScode-SessionId"]=this.envService.sessionId,_["VScode-MachineId"]=this.envService.machineId,_["X-GitHub-Api-Version"]=Yni.apiVersion,E&&(_["OpenAI-Intent"]=E);let v=new i0a.StopWatch,b=await this.fetchService.fetch(A,c.token,l,p,o,_).then(I=>I.isError()&&I.err instanceof Awe.Completions.Unexpected&&(0,Gst.isInterruptedNetworkError)(I.err.error)?(this.instantiationService.invokeFunction(ku.telemetry,"networking.disconnectAll"),this.fetchService.disconnectAll().then(()=>this.fetchService.fetch(A,c.token,l,p,o,_))):I);try{if(b.isError()){let w=b.err;if(w instanceof Awe.Completions.RequestCancelled)return this.instantiationService.invokeFunction(ku.telemetry,"networking.cancelRequest",ku.TelemetryData.createAndMarkAsIssued({headerRequestId:p})),this.instantiationService.invokeFunction(ku.telemetry,"request.cancel",y),{type:"canceled",reason:"during fetch request"};if(w instanceof Awe.Completions.UnsuccessfulResponse){let R=(0,tii.getRequestId)(w.headers);y.extendWithRequestId(R);let P=v.elapsed();return y.measurements.totalTimeMs=P,y.properties.status=String(w.status),El.info(this.logTargetService,`Request ${p} at <${A}> finished with ${w.status} status after ${P}ms`),El.debug(this.logTargetService,"request.response properties",y.properties),El.debug(this.logTargetService,"request.response measurements",y.measurements),El.debug(this.logTargetService,"prompt:",u),this.instantiationService.invokeFunction(ku.telemetry,"request.response",y),this.handleError(this.statusReporter,y,{status:w.status,text:w.text,headers:w.headers},c)}else if(w instanceof Awe.Completions.Unexpected){let R=w.error;if((0,Gst.isAbortError)(R))throw this.instantiationService.invokeFunction(ku.telemetry,"request.cancel",y),R;this.statusReporter.setWarning((0,UD.getKey)(R,"message")??"");let P=y.extendedBy({error:"Network exception"});this.instantiationService.invokeFunction(ku.telemetry,"request.shownWarning",P),y.properties.message=String((0,UD.getKey)(R,"name")??""),y.properties.code=String((0,UD.getKey)(R,"code")??""),y.properties.errno=String((0,UD.getKey)(R,"errno")??""),y.properties.type=String((0,UD.getKey)(R,"type")??"");let k=v.elapsed();throw y.measurements.totalTimeMs=k,El.info(this.logTargetService,`Request ${p} at <${A}> rejected with ${String(R)} after ${k}ms`),El.debug(this.logTargetService,"request.error properties",y.properties),El.debug(this.logTargetService,"request.error measurements",y.measurements),this.instantiationService.invokeFunction(ku.telemetry,"request.error",y),R}else(0,n0a.assertNever)(w)}let I=b.val;{let w=I.requestId;y.extendWithRequestId(w);let R=v.elapsed();y.measurements.totalTimeMs=R;let P=200;El.info(this.logTargetService,`Request ${p} at <${A}> finished with ${P} status after ${R}ms`),y.properties.status=String(P),El.debug(this.logTargetService,"request.response properties",y.properties),El.debug(this.logTargetService,"request.response measurements",y.measurements),El.debug(this.logTargetService,"prompt:",u),this.instantiationService.invokeFunction(ku.telemetry,"request.response",y)}if(o.isCancellationRequested){try{await I.destroy()}catch(w){this.instantiationService.invokeFunction(R=>El.exception(R,w,"Error destroying stream"))}return{type:"canceled",reason:"after fetch request"}}let x=Qdr.convertStreamToApiChoices(I,n,r,o);return{type:"success",choices:qdr(x),getProcessingTime:a(()=>Zni(I.headers),"getProcessingTime")}}finally{this.instantiationService.invokeFunction(ku.logEnginePrompt,u,y)}}}createTelemetryData(e,r){return ku.TelemetryData.createAndMarkAsIssued({endpoint:e,engineName:r.engineModelId,uiKind:r.uiKind,headerRequestId:r.ourRequestId})}async fetchWithParameters(e,r,n,o,s){let c={prompt:r.prompt.prefix,suffix:r.prompt.suffix,max_tokens:(0,YU.getMaxSolutionTokens)(),temperature:(0,YU.getTemperatureForSamples)(this.runtimeModeService,r.count),top_p:(0,YU.getTopP)(),n:r.count,stop:(0,YU.getStops)(r.languageId),stream:!0,extra:r.extra};r.requestLogProbs&&(c.logprobs=2);let l=(0,Kni.tryGetGitHubNWO)(r.repoInfo);return l!==void 0&&(c.nwo=l),r.postOptions&&Object.assign(c,r.postOptions),r.prompt.context&&r.prompt.context.length>0&&(c.extra.context=r.prompt.context),await(0,Jni.delay)(0),s?.isCancellationRequested?"not-sent":await this.instantiationService.invokeFunction(u0a,r.prompt,r.engineModelId,e,r.ourRequestId,c,n,r.uiKind,o,s,r.headers)}static async*convertStreamToApiChoices(e,r,n,o){let s=a((l,u,d,p,h)=>({choiceIndex:l,completionText:u,requestId:e.requestId,finishReason:d,tokens:p.chunks,numTokens:p.chunks.length,blockFinished:h,telemetryData:n,clientCompletionId:(0,o0a.generateUuid)(),meanLogProb:void 0,meanAlternativeLogProb:void 0}),"createAPIChoice"),c=[];try{for await(let l of e.stream){if(o?.isCancellationRequested)return;for(let u=0;u-1,y;if((m||A)&&(y=await r(p.accumulator.responseSoFar,{index:d,text:p.accumulator.responseSoFar,finished:m,requestId:e.requestId,telemetryData:n,annotations:p.accumulator.annotations,getAPIJsonData:a(()=>({text:p.accumulator.responseSoFar,tokens:p.accumulator.chunks,finish_reason:p.accumulator.finishReason??"stop",copilot_annotations:p.accumulator.annotations.current}),"getAPIJsonData")}),o?.isCancellationRequested))return;if(m&&(y===void 0||typeof y!="object"?y={yieldSolution:!0,continueStreaming:!1}:(y.yieldSolution=!0,y.continueStreaming=!1)),y!==void 0&&(typeof y=="number"||y.yieldSolution)){let E=m||typeof y=="number"||y!==void 0&&!y.continueStreaming;p.isFinished=E;let _=l.choices[u].finish_reason;_&&(p.accumulator.finishReason=_);let v=typeof y=="number"?y:y&&y.finishOffset!==void 0?y.finishOffset:void 0,b=v===void 0?p.accumulator.responseSoFar:p.accumulator.responseSoFar.slice(0,v);if(p.yielded||(p.yielded=!0,yield s(d,b,p.accumulator.finishReason??"stop",p.accumulator,v!==void 0)),o?.isCancellationRequested)return}}}for(let[l,u]of c.entries())if(!u.isFinished){if(await r(u.accumulator.responseSoFar,{index:l,text:u.accumulator.responseSoFar,finished:!0,requestId:e.requestId,telemetryData:n,annotations:u.accumulator.annotations,getAPIJsonData:a(()=>({text:u.accumulator.responseSoFar,tokens:u.accumulator.chunks,finish_reason:u.accumulator.finishReason??"stop",copilot_annotations:u.accumulator.annotations.current}),"getAPIJsonData")}),o?.isCancellationRequested)return;if(u.yielded)continue;if(u.yielded=!0,yield s(l,u.accumulator.responseSoFar,u.accumulator.finishReason??"stop",u.accumulator,!1),o?.isCancellationRequested)return}}finally{try{await e.destroy()}catch{}}}async handleError(e,r,n,o){let s=await n.text();if(n.status===402){this.#e="monthly free code completions exhausted",e.setError("Completions limit reached",{command:Q0.CMDQuotaExceeded,title:"Learn More"});let l=(0,a0a.onCopilotToken)(this.authenticationService,u=>{this.#e=void 0,u.isCompletionsQuotaExceeded||(e.forceNormal(),l.dispose())});return{type:"failed",reason:this.#e}}if(n.status===466)return e.setError(s),El.info(this.logTargetService,s),{type:"failed",reason:`client not supported: ${s}`};if(eii(n)&&!n.headers.get("x-github-request-id")){let c=`Last response was a ${n.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;El.error(this.logTargetService,c),e.setWarning(c),r.properties.error=`Response status was ${n.status} with no x-github-request-id header`}else eii(n)?(El.warn(this.logTargetService,`Response status was ${n.status}:`,s),e.setWarning(`Last response was a ${n.status} error: ${s}`),r.properties.error=`Response status was ${n.status}: ${s}`):(e.setWarning(`Last response was a ${n.status} error`),r.properties.error=`Response status was ${n.status}`);return r.properties.status=String(n.status),this.instantiationService.invokeFunction(ku.telemetry,"request.shownWarning",r),n.status===401||n.status===403?(this.copilotTokenManager.resetToken(n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`}):n.status===429?(setTimeout(()=>{this.#e=void 0},10*1e3),this.#e="rate limited",El.warn(this.logTargetService,"Rate limited by server. Denying completions for the next 10 seconds."),{type:"failed",reason:this.#e}):n.status===499?(El.info(this.logTargetService,"Cancelled by server"),{type:"failed",reason:"canceled by server"}):(El.error(this.logTargetService,"Unhandled status from server:",n.status,s),{type:"failed",reason:`unhandled status from server: ${n.status} ${s}`})}};Q0.LiveOpenAIFetcher=Gdr;Q0.LiveOpenAIFetcher=Gdr=Qdr=Xfa([zU(0,rii.IInstantiationService),zU(1,l0a.ICompletionsRuntimeModeService),zU(2,jdr.ICompletionsLogTargetService),zU(3,s0a.ICompletionsCopilotTokenManager),zU(4,iii.ICompletionsStatusReporter),zU(5,Zfa.IAuthenticationService),zU(6,Awe.ICompletionsFetchService),zU(7,t0a.IEnvService)],Gdr);function eii(t){return t.status>=400&&t.status<500}a(eii,"isClientError");var Hdr=class{static{a(this,"CompletionAccumulator")}constructor(){this._chunks=[],this._responseSoFar="",this._finishReason=null,this.annotations=new e0a.StreamCopilotAnnotations}get responseSoFar(){return this._responseSoFar}get chunks(){return this._chunks}set finishReason(e){this._finishReason=e}get finishReason(){return this._finishReason}append(e){let r=e.text;r&&(this._chunks.push(r),this._responseSoFar=this._responseSoFar+r),e.copilot_annotations&&this.annotations.update(e.copilot_annotations)}}});var zdr=T(Wdr=>{"use strict";f();Object.defineProperty(Wdr,"__esModule",{value:!0});Wdr.appendToCache=d0a;function d0a(t,e,r){t.append(e.prefix,e.prompt.suffix,r)}a(d0a,"appendToCache")});var fii=T(Du=>{"use strict";f();var f0a=Du&&Du.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},GB=Du&&Du.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Du,"__esModule",{value:!0});Du.CompletionsFromNetwork=Du.logger=void 0;Du.postProcessChoices=$st;Du.makeGhostAPIChoice=dii;Du.telemetryPerformance=Xdr;var lii=ac(),ywe=hwe(),p0a=cd(),h0a=cy(),Ewe=MT(),m0a=Hl(),g0a=xv(),A0a=Po(),aii=Gm(),y0a=Pir(),E0a=Hm(),uii=uc(),_0a=Bur(),Kdr=Vdr(),C0a=gue(),v0a=xp(),b0a=rK(),T0a=uue(),Ydr=zdr(),S0a=cxe(),cii=gU(),qR=pue();Du.logger=new uii.Logger("ghostText");var Jdr=class{static{a(this,"CompletionsFromNetwork")}constructor(e,r,n,o,s,c,l,u,d){this.instantiationService=e,this.fetcherService=r,this.featuresService=n,this.runtimeMode=o,this.logTarget=s,this.completionsCacheService=c,this.userErrorNotifier=l,this.configurationService=u,this.expService=d}async getCompletionsFromNetwork(e,r,n,o,s){return this.genericGetCompletionsFromNetwork(e,r,n,o,s,"completions",async(c,l,u)=>{let p=await u[Symbol.asyncIterator]().next();if(p.done)return Du.logger.debug(this.logTarget,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:(0,qR.mkBasicResultTelemetry)(r)};if(n?.isCancellationRequested)return Du.logger.debug(this.logTarget,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:(0,qR.mkCanceledResultTelemetry)(r)};let h=p.value;if(h===void 0)return Du.logger.debug(this.logTarget,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:(0,qR.mkBasicResultTelemetry)(r)};this.instantiationService.invokeFunction(Xdr,"performance",h,c,l),Du.logger.debug(this.logTarget,`Awaited first result, id: ${h.choiceIndex}`);let m=$st(h);m&&((0,Ydr.appendToCache)(this.completionsCacheService,e,m),Du.logger.debug(this.logTarget,`GhostText first completion (index ${m?.choiceIndex}): ${JSON.stringify(m?.completionText)}`));let g=(async()=>{let A=m!==void 0?[m]:[];for await(let y of u){if(y===void 0)continue;Du.logger.debug(this.logTarget,`GhostText later completion (index ${y?.choiceIndex}): ${JSON.stringify(y.completionText)}`);let E=$st(y,A);E&&(A.push(E),(0,Ydr.appendToCache)(this.completionsCacheService,e,E))}})();return this.runtimeMode.isRunningInTest()&&await g,m?{type:"success",value:[dii(m,{forceSingleLine:!1}),g],telemetryData:(0,qR.mkBasicResultTelemetry)(r),telemetryBlob:r,resultType:cii.ResultType.Network}:{type:"empty",reason:"got undefined processedFirstChoice",telemetryData:(0,qR.mkBasicResultTelemetry)(r)}})}async getAllCompletionsFromNetwork(e,r,n,o,s){return this.genericGetCompletionsFromNetwork(e,r,n,o,s,"all completions",async(c,l,u)=>{let d=[];for await(let p of u){if(n?.isCancellationRequested)return Du.logger.debug(this.logTarget,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:(0,qR.mkCanceledResultTelemetry)(r)};let h=$st(p,d);h&&d.push(h)}if(d.length>0){for(let p of d)(0,Ydr.appendToCache)(this.completionsCacheService,e,p);this.instantiationService.invokeFunction(Xdr,"cyclingPerformance",d[0],c,l)}return{type:"success",value:[d,Promise.resolve()],telemetryData:(0,qR.mkBasicResultTelemetry)(r),telemetryBlob:r,resultType:cii.ResultType.Cycling}})}async genericGetCompletionsFromNetwork(e,r,n,o,s,c,l){let u=new ywe.StatelessNextEditTelemetryBuilder(e.ourRequestId),d=await this._genericGetCompletionsFromNetwork(e,r,n,o,u,c,l),p;switch(d.type){case"success":p=Ewe.Result.ok(void 0);break;case"canceled":p=Ewe.Result.error(new ywe.NoNextEditReason.GotCancelled(d.reason));break;case"empty":p=Ewe.Result.error(new ywe.NoNextEditReason.NoSuggestions(new g0a.StringText(""),void 0));break;case"failed":p=Ewe.Result.error(new ywe.NoNextEditReason.Uncategorized(h0a.ErrorUtils.fromUnknown(d.reason)));break;case"abortedBeforeIssued":case"promptOnly":p=Ewe.Result.error(new ywe.NoNextEditReason.GotCancelled(d.reason));break;default:(0,m0a.assertNever)(d)}return s.setStatelessNextEditTelemetry(u.build(p)),d}async _genericGetCompletionsFromNetwork(e,r,n,o,s,c,l){Du.logger.debug(this.logTarget,`Getting ${c} from network`),r=r.extendedBy(),s.setModelName(e.engineModelId);let u=e.isCycling?3:1,d=(0,C0a.getTemperatureForSamples)(this.runtimeMode,u),p={language:e.languageId,next_indent:e.indentation.next??0,trim_by_indentation:(0,aii.shouldDoServerTrimming)(e.blockMode),prompt_tokens:e.prompt.prefixTokens??0,suffix_tokens:e.prompt.suffixTokens??0},h={n:u,temperature:d,code_annotations:!1},m=this.featuresService.modelAlwaysTerminatesSingleline(r),g=e.blockMode===aii.BlockMode.MoreMultiline&&T0a.BlockTrimmer.isSupported(e.languageId)&&!m;!e.multiline&&!g?h.stop=[` +`]:e.stop&&(h.stop=e.stop),e.maxTokens!==void 0&&(h.max_tokens=e.maxTokens);let A=Date.now(),y={endpoint:"completions",uiKind:Kdr.CopilotUiKind.GhostText,temperature:JSON.stringify(d),n:JSON.stringify(u),stop:JSON.stringify(h.stop)??"unset",logit_bias:JSON.stringify(null)};Object.assign(r.properties,y);try{let E={prompt:e.prompt,languageId:e.languageId,repoInfo:e.repoInfo,ourRequestId:e.ourRequestId,engineModelId:e.engineModelId,count:u,uiKind:Kdr.CopilotUiKind.GhostText,postOptions:h,headers:e.headers,extra:p},_=this.configurationService.getExperimentBasedConfig(lii.ConfigKey.TeamInternal.GhostTextUseCompletionsFetchService,this.expService)?await this.fetcherService.fetchAndStreamCompletions2(E,r,o,n):await this.fetcherService.fetchAndStreamCompletions(E,r,o,n);return _.type==="failed"?{type:"failed",reason:_.reason,telemetryData:(0,qR.mkBasicResultTelemetry)(r)}:_.type==="canceled"?(Du.logger.debug(this.logTarget,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:_.reason,telemetryData:(0,qR.mkCanceledResultTelemetry)(r)}):l(A,_.getProcessingTime(),_.choices)}catch(E){if((0,_0a.isAbortError)(E))return{type:"canceled",reason:"network request aborted",telemetryData:(0,qR.mkCanceledResultTelemetry)(r,{cancelledNetworkRequest:!0})};if(this.instantiationService.invokeFunction(_=>Du.logger.exception(_,E,"Error on ghost text request")),this.userErrorNotifier.notifyUser(E),this.runtimeMode.shouldFailForDebugPurposes())throw E;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:(0,qR.mkBasicResultTelemetry)(r)}}}};Du.CompletionsFromNetwork=Jdr;Du.CompletionsFromNetwork=Jdr=f0a([GB(0,A0a.IInstantiationService),GB(1,Kdr.ICompletionsOpenAIFetcherService),GB(2,E0a.ICompletionsFeaturesService),GB(3,b0a.ICompletionsRuntimeModeService),GB(4,uii.ICompletionsLogTargetService),GB(5,S0a.ICompletionsCacheService),GB(6,y0a.ICompletionsUserErrorNotifierService),GB(7,lii.IConfigurationService),GB(8,p0a.IExperimentationService)],Jdr);function $st(t,e){if(e||(e=[]),t.completionText=t.completionText.trimEnd(),!!t.completionText&&e.findIndex(r=>r.completionText.trim()===t.completionText.trim())===-1)return t}a($st,"postProcessChoices");function dii(t,e){let r={...t};if(e.forceSingleLine){let{completionText:n}=r,o=n.match(/^\r?\n/);o?r.completionText=o[0]+n.split(` `)[1]:r.completionText=n.split(` -`)[0]}return r}a(fni,"makeGhostAPIChoice");function Ndr(t,e,r,n,o){let s=Date.now()-n,c=s-o,l=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:s,processingTimeMs:o,deltaMs:c,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN});l.extendWithRequestId(r.requestId),(0,_da.telemetry)(t,`ghostText.${e}`,l)}a(Ndr,"telemetryPerformance")});var hni=T(Fat=>{"use strict";f();Object.defineProperty(Fat,"__esModule",{value:!0});Fat.contextualFilterCharacterMap=void 0;Fat.contextualFilterCharacterMap={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95}});var mni=T(Ddr=>{"use strict";f();Object.defineProperty(Ddr,"__esModule",{value:!0});Ddr.multilineModelPredict=Sda;function Sda(t){let e;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>427.50000000000006?t[9]>13.500000000000002?t[121]>1e-35?e=-.3793786744885956:t[149]>1e-35?e=-.34717430705356905:e=-.26126834451035963:e=-.2431318366096852:t[5]>888.5000000000001?e=-.20600463586387135:e=-.2568037008471491:t[308]>1e-35?e=-.2363064824497454:t[8]>370.50000000000006?e=-.37470755210284723:e=-.321978453730494:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?e=-.26259136509758885:e=-.3096719634039438:t[4]>30.500000000000004?t[9]>18.500000000000004?e=-.34254903852890883:t[2]>98.50000000000001?e=-.41585250791146294:e=-.3673574858887241:t[9]>6.500000000000001?e=-.31688079287876225:t[31]>1e-35?e=-.29110977864003823:t[308]>1e-35?e=-.3201411739040839:e=-.36874023066055506:t[8]>691.5000000000001?t[82]>1e-35?e=-.41318393149040566:t[133]>1e-35?e=-.3741272613525161:t[32]>1e-35?e=-.4112378041027121:t[227]>1e-35?e=-.37726615155719356:t[10]>3.5000000000000004?e=-.3164502293560397:e=-.2930071546509045:t[9]>13.500000000000002?e=-.277366858539218:t[308]>1e-35?t[4]>10.500000000000002?e=-.30975610686807187:t[4]>1.5000000000000002?e=-.2549142136728043:e=-.3271325650785176:t[127]>1e-35?t[0]>1937.5000000000002?e=-.2533046188098832:e=-.325520883579:e=-.331628896481776;let r;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?t[9]>13.500000000000002?r=.031231253521808708:r=.05380836288014532:t[5]>423.00000000000006?t[8]>114.50000000000001?r=.06751619128429062:r=.09625089153176467:r=.027268163053989804:t[308]>1e-35?r=.060174483556283756:r=-.049062854038919135:t[3]>24.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?r=-.03969241799174589:r=.01086816842550381:t[31]>1e-35?r=-.003284694817583201:t[9]>6.500000000000001?t[4]>30.500000000000004?r=-.04224490699947552:r=-.011834162944360616:t[308]>1e-35?t[32]>1e-35?r=-.13448447971850278:r=-.019569456707046823:t[19]>1e-35?t[9]>1.5000000000000002?r=-.07256260662659254:t[4]>60.50000000000001?r=-.08227503453609311:r=-.020596416747563847:r=-.07396549241564149:t[8]>691.5000000000001?t[82]>1e-35?r=-.10046536995362734:t[133]>1e-35?r=-.06407649822752297:t[225]>1e-35?r=.08035785003303324:t[92]>1e-35?r=.018901360933204676:t[20]>1e-35?r=.05252546973665552:t[8]>2592.5000000000005?r=-.040543705016462955:r=-.011236043818320725:t[9]>17.500000000000004?r=.025560632674895334:t[308]>1e-35?t[0]>1847.5000000000002?r=.03527165701669741:r=-.0071847350825815035:t[127]>1e-35?r=.024373016379595405:t[9]>2.5000000000000004?r=-.0035090719709448288:r=-.03514829488063766;let n;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?n=.03848674861536988:t[5]>423.00000000000006?t[8]>114.50000000000001?t[9]>56.50000000000001?n=-.003764520033319488:n=.06570817919969299:t[4]>61.50000000000001?n=.028346156293069538:n=.0908154644362606:n=.02445594243234816:t[308]>1e-35?t[8]>65.50000000000001?n=.0019305229020073053:n=.09279357295883772:n=-.04458984161917124:t[3]>24.500000000000004?t[23]>1e-35?n=.0027405390271277013:t[4]>29.500000000000004?t[52]>1e-35?n=.044727478132905285:t[115]>1e-35?n=.10245804828855934:t[9]>17.500000000000004?n=-.03353173647469207:t[2]>98.50000000000001?n=-.10048106638102179:n=-.05484231104348874:t[31]>1e-35?n=.016807537467116516:t[9]>6.500000000000001?n=-.012113620535295137:t[4]>8.500000000000002?t[308]>1e-35?n=-.01882594250504289:n=-.05585658862796076:n=.04279591277938338:t[8]>691.5000000000001?t[82]>1e-35?n=-.09262278043707878:t[133]>1e-35?n=-.058454257768893625:t[32]>1e-35?n=-.09769348447126434:t[25]>1e-35?n=-.0725430043727677:t[122]>1e-35?n=-.10047841601578077:n=-.00580671054458958:t[9]>13.500000000000002?n=.021399199032818294:t[308]>1e-35?t[4]>10.500000000000002?n=-.0076376731757173515:n=.03394923033036848:t[127]>1e-35?n=.02070489091204209:n=-.02290162726126496;let o;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?o=.010230295672324606:o=.038540509248742805:t[8]>125.50000000000001?t[1]>49.50000000000001?o=.03086356292895467:o=.057128750867458604:t[5]>888.5000000000001?o=.07861602941396924:o=.030523262699070908:t[308]>1e-35?o=.048236117667577356:t[8]>370.50000000000006?o=-.05642125069212264:o=-.007232836777168195:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?o=.03640661467213915:o=-.005889820723907028:t[31]>1e-35?o=-.0009007166998276938:t[9]>6.500000000000001?o=-.022590340093882378:t[308]>1e-35?t[32]>1e-35?o=-.1215445089091064:o=-.01435612266219722:t[19]>1e-35?t[9]>1.5000000000000002?o=-.061555513040777825:t[4]>60.50000000000001?o=-.07053475504569347:o=-.013733369453963092:o=-.06302097189114152:t[227]>1e-35?o=-.05820440333190048:t[8]>683.5000000000001?t[82]>1e-35?o=-.08466979526809346:t[10]>24.500000000000004?o=-.017092159721119944:t[92]>1e-35?o=.03592901452463749:o=-.00359310519524756:t[5]>1809.5000000000002?t[243]>1e-35?o=-.03963116207386097:t[118]>1e-35?o=-.09483996283536394:t[217]>1e-35?o=-.03394542089519989:t[242]>1e-35?o=-.07985899422287938:o=.019706602160656964:t[9]>12.500000000000002?o=.014072998937735146:o=-.021156294523894684;let s;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?s=.009197756540516563:s=.03458896869535166:t[5]>5082.500000000001?s=.08265545468131008:t[131]>1e-35?s=.0740738432473315:s=.045159136632942756:t[8]>319.50000000000006?s=-.04653401534465376:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?s=-.011400839766681709:s=.11149800187510031:s=-.08683250977599462:s=.08355310136724753:t[4]>23.500000000000004?t[23]>1e-35?t[131]>1e-35?s=.040389083779932555:s=-.009887614274108602:t[52]>1e-35?s=.03705353499757327:t[9]>6.500000000000001?s=-.025401260429257562:t[2]>98.50000000000001?s=-.09237673187534504:s=-.04298556869281803:t[222]>1e-35?s=-.045221965895986184:t[8]>691.5000000000001?t[133]>1e-35?s=-.05435318330148897:t[128]>1e-35?s=-.08672907303184191:t[227]>1e-35?s=-.05568304584186561:t[122]>1e-35?s=-.09623059693538563:t[225]>1e-35?s=.07558331642202279:t[82]>1e-35?s=-.07360566227233566:s=-.005646164647395919:t[242]>1e-35?s=-.08203758341228108:t[9]>13.500000000000002?s=.018726123829696042:t[308]>1e-35?t[4]>10.500000000000002?s=-.011153942154062704:s=.03132858912391067:t[127]>1e-35?s=.021455228822345174:t[23]>1e-35?s=.01959966745346997:s=-.021764790177579325;let c;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>284.50000000000006?t[121]>1e-35?t[18]>1e-35?c=.07547602514276922:c=-.08529678832140396:c=.030314822344598043:t[5]>888.5000000000001?t[4]>61.50000000000001?c=.011143589009415464:c=.0654700456802118:c=.021794712646632755:t[308]>1e-35?c=.04231872551095028:c=-.034381999950549455:t[4]>23.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?c=-.03678981254332261:c=.010518160384496255:t[8]>825.5000000000001?c=-.04506534842082387:t[9]>38.50000000000001?c=.01004983052203438:c=-.030580958620701027:t[39]>1e-35?c=-.12802435021505382:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>6.500000000000001?c=.030426957004611704:c=-.0726407693060581:c=.017395521646964375:t[4]>7.500000000000001?t[0]>93.50000000000001?t[9]>7.500000000000001?c=-.008024349629981291:t[31]>1e-35?c=.01296539930850471:t[308]>1e-35?c=-.012855016509024084:c=-.04564527976851505:c=-.15681420504058596:t[10]>4.500000000000001?t[243]>1e-35?c=-.1012064426380198:c=-.0062808850924854194:c=.030706323726162416:t[9]>13.500000000000002?c=.017081636133736405:t[308]>1e-35?t[4]>10.500000000000002?c=-.009306613091760644:t[4]>1.5000000000000002?c=.03655523200850989:c=-.02671654212893341:t[127]>1e-35?c=.019261510468604387:c=-.017627818570628936;let l;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[308]>1e-35?l=.036100405995889276:l=.011709313297015793:t[0]>119.50000000000001?t[8]>125.50000000000001?l=.03622542297472574:l=.05595579157301536:l=-.02234751038146796:t[8]>319.50000000000006?l=-.040132029478400735:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?l=-.009306153573847916:l=.10058509567064988:l=-.0785668890966017:t[9]>28.500000000000004?l=-.04781977604130416:l=.09753292614937459:t[4]>23.500000000000004?t[131]>1e-35?l=.02372493254975127:t[148]>1e-35?l=.028103095989516644:t[4]>58.50000000000001?t[10]>1e-35?l=-.05000852203469597:l=.02922366846119705:t[23]>1e-35?l=-.0026335076988151292:l=-.03073993752935585:t[222]>1e-35?l=-.03867374428185713:t[32]>1e-35?l=-.07220729365053084:t[39]>1e-35?l=-.11624524614351733:t[8]>691.5000000000001?t[133]>1e-35?l=-.04836360271198036:t[8]>4968.500000000001?l=-.10873681915578029:t[149]>1e-35?l=-.11847484033769298:t[122]>1e-35?l=-.08916172460307559:t[82]>1e-35?l=-.06774726602152634:l=-.0033469147714351327:t[126]>1e-35?l=-.09474445392080015:t[8]>131.50000000000003?t[118]>1e-35?l=-.09002547031023511:l=.015475385187009489:t[25]>1e-35?l=-.08175501232759151:l=-.000429679055394914;let u;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?u=.021942996005324917:u=.042349138084484074:t[308]>1e-35?u=.036507270845732874:u=-.028981850556764995:t[3]>24.500000000000004?t[23]>1e-35?u=.00210930790963475:t[31]>1e-35?u=.006825358293027163:t[9]>6.500000000000001?u=-.013772084269062394:t[308]>1e-35?u=-.008307929099892574:t[19]>1e-35?u=-.027706313312904487:u=-.04891108984170914:t[134]>1e-35?u=-.0605730733844732:t[25]>1e-35?u=-.05347926493253117:t[227]>1e-35?u=-.049415829249003666:t[32]>1e-35?u=-.06807799662179595:t[308]>1e-35?t[4]>10.500000000000002?t[2]>13.500000000000002?u=-.00016302718260794637:u=-.10247095758122947:t[210]>1e-35?u=-.022149002072787024:t[95]>1e-35?u=.15222631630626304:u=.027393884520465712:t[9]>7.500000000000001?t[225]>1e-35?u=.13483346577752245:t[3]>9.500000000000002?t[243]>1e-35?u=-.045352728133789516:t[8]>683.5000000000001?u=.00474372227519902:u=.02635476098707525:t[92]>1e-35?u=.05659380819933452:t[105]>1e-35?u=.07431443210341222:t[186]>1e-35?u=.0915821133384904:u=-.016414750130401053:t[127]>1e-35?u=.011824693641866162:t[23]>1e-35?u=.0228468674288774:t[284]>1e-35?u=.06606936863302432:u=-.02872463273902358;let d;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>125.50000000000001?t[288]>1e-35?d=-.019844363904157558:t[1]>50.50000000000001?t[131]>1e-35?d=.044961338592245194:d=.003659599513761676:t[121]>1e-35?d=-.04057103630479994:d=.03158560697078578:t[0]>421.50000000000006?t[4]>61.50000000000001?d=-.0003708603406529278:d=.05331312264472391:d=.0006575958601218936:t[8]>319.50000000000006?d=-.034654694051901545:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?d=-.0076053515916517005:d=.09116695486305336:d=-.07137458699162028:d=.06633130654035282:t[4]>29.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?d=-.0308520802187302:d=.013156423968295541:t[115]>1e-35?d=.11581171687488252:t[52]>1e-35?t[10]>22.500000000000004?d=.12264179915175587:d=-.021905727233873535:t[8]>799.5000000000001?d=-.04181869575935412:d=-.023695901673350575:t[222]>1e-35?d=-.034612899265371776:t[8]>691.5000000000001?t[9]>98.50000000000001?d=-.06892116536821917:t[149]>1e-35?d=-.11194586444154514:t[133]>1e-35?d=-.04269583234000504:t[128]>1e-35?d=-.0644631966969502:t[8]>4968.500000000001?d=-.09650726096330133:d=-.004219129180139438:t[126]>1e-35?d=-.08038306745347751:t[5]>1809.5000000000002?d=.009265335288169993:t[9]>2.5000000000000004?d=.006447645462117438:d=-.021047132609551503;let p;t[13]>1e-35?t[3]>1.5000000000000002?t[9]>21.500000000000004?t[121]>1e-35?p=-.08436540015142402:t[8]>1861.5000000000002?p=-.01621425699342421:p=.01878613821895428:p=.031052879158242532:t[8]>319.50000000000006?p=-.031536619360997865:t[7]>3.5000000000000004?p=-.004510586962343298:p=.0596524941011746:t[4]>18.500000000000004?t[23]>1e-35?p=.004757490541310808:t[9]>6.500000000000001?p=-.008842393772207996:t[31]>1e-35?p=.0010536183837006993:t[308]>1e-35?p=-.008145882815435419:t[2]>98.50000000000001?p=-.08404937622173021:t[276]>1e-35?p=.0020072791321856663:t[19]>1e-35?p=-.023031820639490178:p=-.04553314326377875:t[8]>2134.5000000000005?p=-.02244583113572251:t[134]>1e-35?p=-.05592137394753121:t[308]>1e-35?t[49]>1e-35?p=.09989109704064947:t[4]>10.500000000000002?t[2]>13.500000000000002?p=-.00447733056482096:p=-.10191061664873849:p=.021765308380331864:t[9]>7.500000000000001?t[118]>1e-35?p=-.07570059131536411:t[243]>1e-35?p=-.040983393346598646:t[3]>9.500000000000002?p=.014763759061483812:t[92]>1e-35?p=.05136368898963024:p=-.008162398981149495:t[127]>1e-35?p=.013999119696708346:t[23]>1e-35?t[20]>1e-35?p=.14138985500120907:p=.008668274102844162:t[284]>1e-35?p=.06356484011042893:p=-.024781304572706303;let h;t[13]>1e-35?t[3]>8.500000000000002?t[8]>892.5000000000001?t[0]>384.50000000000006?h=.014387526569215037:t[8]>2266.5000000000005?h=-.1397298649743087:h=.007953931014097788:t[0]>119.50000000000001?t[4]>61.50000000000001?h=.0029819092211896296:t[218]>1e-35?h=.08450459375645737:h=.031646488019280654:h=-.03544960151460596:t[9]>9.500000000000002?h=-.026002317735915183:t[7]>1.5000000000000002?h=.005074258810794793:h=.0745247650477651:t[4]>29.500000000000004?t[131]>1e-35?h=.023269218675640847:t[148]>1e-35?h=.03812942399144545:t[115]>1e-35?h=.10512283476967227:h=-.02607307479736138:t[227]>1e-35?h=-.036576708299046294:t[101]>1e-35?h=.027948683650881864:t[149]>1e-35?h=-.08195628451594297:t[50]>1e-35?h=-.16997544922278504:t[8]>691.5000000000001?t[9]>101.50000000000001?h=-.06860333850762075:t[225]>1e-35?h=.06066641950951723:t[10]>22.500000000000004?t[1]>29.500000000000004?t[127]>1e-35?h=.028599705845427533:h=-.010746719511640914:t[0]>4877.500000000001?h=-.07251187886096228:h=-.021299712241446785:t[118]>1e-35?h=-.11902023760964736:h=15874469526809387e-21:t[8]>267.50000000000006?h=.01317292185402293:t[148]>1e-35?t[9]>20.500000000000004?h=.09614842415142123:h=.006049073167176467:t[189]>1e-35?h=.05562696451900713:h=-.006257541923837303;let m;t[13]>1e-35?t[9]>14.500000000000002?t[2]>11.500000000000002?t[1]>71.50000000000001?t[8]>1252.5000000000002?m=-.10069846585436666:m=-.010577995535809317:t[146]>1e-35?m=-.008877238274428668:t[280]>1e-35?m=.10076055897012692:t[6]>70.50000000000001?m=-.020603523042565547:t[7]>1.5000000000000002?m=.02819095420813202:m=-.1223354167911277:m=-.025073583348334844:t[8]>416.50000000000006?m=.01718560189149466:t[230]>1e-35?m=.12281803224342265:m=.03281276971308565:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?m=-.13070568109867683:t[4]>63.50000000000001?m=-.027221825262496814:m=.01530862490082352:t[9]>6.500000000000001?t[5]>4320.500000000001?t[2]>31.500000000000004?m=-.00605574271293711:m=.04739407327741249:m=-.012537528620315956:t[31]>1e-35?t[20]>1e-35?m=.1252215087035768:m=.003905888677601057:t[52]>1e-35?m=.045466299731038815:t[2]>100.50000000000001?m=-.07815624550168065:t[308]>1e-35?m=-.007715815250508057:t[276]>1e-35?t[9]>1.5000000000000002?m=-.03538265083203445:t[18]>1e-35?m=.1591211669800727:m=.015151475408241136:t[8]>557.5000000000001?m=-.04225569725456342:m=-.022455546324243267:t[308]>1e-35?m=.01325441736085826:t[197]>1e-35?m=.03752194600682512:t[225]>1e-35?m=.06583712394533976:m=-.005205289866839043;let g;t[13]>1e-35?t[9]>21.500000000000004?t[2]>12.500000000000002?g=.010264022580774884:g=-.02335958814489217:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?g=-.0936747137352166:t[0]>384.50000000000006?g=.019846244507320695:g=-.0751102554077272:g=-.026885329334203723:t[0]>966.5000000000001?t[10]>48.50000000000001?g=.11654906890054273:g=.0346250587613322:t[4]>39.50000000000001?g=-.08568002378645614:t[9]>16.500000000000004?g=-.12010535752923689:g=.021321923389033808:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?g=-.12056431231412057:t[131]>1e-35?g=.03652965550568472:g=.002563006128791669:t[9]>6.500000000000001?t[30]>1e-35?g=-.10141481732178981:g=-.003936457893178248:t[31]>1e-35?g=.008215898756249477:t[52]>1e-35?t[0]>4188.500000000001?g=.12972828769588213:g=-.003137412232297087:t[2]>100.50000000000001?g=-.0730872929087944:t[308]>1e-35?g=-.006958622747243333:t[35]>1e-35?t[0]>3707.5000000000005?g=.07934620723812878:g=-.018598568353702116:g=-.030635505446410763:t[128]>1e-35?g=-.06962290453843294:t[84]>1e-35?g=-.15290337844960322:t[308]>1e-35?t[8]>2543.5000000000005?g=-.034938657503885584:g=.016339322898966915:t[197]>1e-35?g=.03358907965870046:t[18]>1e-35?g=-.01754013791515288:g=-.0004944586067698557;let A;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?A=.005888790687820524:A=.0429676533834978:t[2]>7.500000000000001?t[0]>119.50000000000001?t[6]>79.50000000000001?A=-.0224319889201976:t[212]>1e-35?A=.06249587051783863:t[8]>963.5000000000001?t[8]>1156.5000000000002?A=.010357273289123324:A=-.029749145161304082:t[218]>1e-35?A=.06449336340743606:A=.018047654539345502:A=-.07350502390293116:A=-.019594829995832414:t[4]>39.50000000000001?A=-.019338083179859314:t[39]>1e-35?A=-.10427066919173111:t[222]>1e-35?t[0]>612.5000000000001?A=-.019197415255018464:A=-.0836562507048181:t[149]>1e-35?A=-.07679624472577429:t[32]>1e-35?A=-.05097506748590604:t[191]>1e-35?A=.04670476485250936:t[30]>1e-35?A=-.05313073892148652:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>8.500000000000002?A=.03930363008271334:A=-.06029171685615689:A=.016203086182431294:t[4]>7.500000000000001?A=-.013824248237085224:t[10]>4.500000000000001?t[94]>1e-35?A=-.09817668643367765:t[10]>40.50000000000001?A=-.023558078753593125:A=.0065113494780482326:t[8]>809.5000000000001?t[297]>1e-35?A=-.1352063548573715:A=.058203900441270634:A=-.035243959159285736:t[10]>59.50000000000001?t[1]>43.50000000000001?A=-.012552876807800442:A=.05991247777734298:A=.0035893102109330177;let y;t[13]>1e-35?t[9]>21.500000000000004?t[145]>1e-35?y=.03507251990078782:t[2]>14.500000000000002?y=.004905698363309292:t[8]>2421.5000000000005?y=-.10306119951984316:y=-.018951037816654928:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?y=-.08503171085833393:y=.015130974593044409:y=-.024425267075198206:y=.02624054905103126:t[4]>19.500000000000004?t[131]>1e-35?y=.02100191580704534:t[32]>1e-35?t[8]>2302.5000000000005?y=.09908783187786288:y=-.06920877329925636:t[8]>241.50000000000003?y=-.016756131804203496:t[9]>33.50000000000001?y=.04903179955263626:t[217]>1e-35?y=-.047416847619291644:y=-.0017200891991431119:t[39]>1e-35?y=-.10389927604977028:t[134]>1e-35?y=-.050480365434872866:t[178]>1e-35?y=-.05167855791556937:t[8]>2134.5000000000005?y=-.01663197335585307:t[242]>1e-35?y=-.05361323756615453:t[118]>1e-35?y=-.05299780866211368:t[10]>24.500000000000004?t[10]>55.50000000000001?t[8]>764.5000000000001?y=-.0016544848369620534:y=.04494144460483587:y=-.009283616456736156:t[121]>1e-35?t[0]>4463.500000000001?y=.051166688553608355:y=-.06623908820705383:t[84]>1e-35?y=-.12990936092409747:t[306]>1e-35?y=-.07020596855118943:t[49]>1e-35?y=.06272964802556856:t[192]>1e-35?y=.06540204627162581:y=.008277910531592885;let E;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?E=.003325460510319164:E=.037153108286272905:t[2]>12.500000000000002?t[1]>124.50000000000001?E=-.09880713344892134:t[7]>60.50000000000001?t[10]>71.50000000000001?E=.0697359767152808:t[230]>1e-35?E=.06513506845651572:E=-.02826625276613455:t[5]>246.50000000000003?t[8]>95.50000000000001?E=.013616385013146277:E=.04171540100223404:E=-.04360396575094823:t[212]>1e-35?E=.025945477945627522:E=-.019793208261535442:t[4]>39.50000000000001?t[25]>1e-35?E=-.07856453318384411:E=-.014803893522351739:t[39]>1e-35?E=-.09185452630751932:t[149]>1e-35?E=-.07122426086157027:t[134]>1e-35?E=-.04231052091434186:t[227]>1e-35?E=-.029815824273994197:t[50]>1e-35?E=-.15736496271211153:t[222]>1e-35?E=-.02360285356956629:t[128]>1e-35?E=-.03922080193836443:t[136]>1e-35?E=-.07219685327698587:t[10]>24.500000000000004?t[1]>8.500000000000002?E=-.0029736170756835783:E=-.06482902102259112:t[84]>1e-35?E=-.11340924635708383:t[94]>1e-35?E=-.03635703457792193:t[118]>1e-35?E=-.058181913914186034:t[126]>1e-35?E=-.062030576241517366:t[116]>1e-35?E=-.045086301850604006:t[25]>1e-35?E=-.031665223656767286:t[203]>1e-35?E=-.009444685731407691:E=.0112265153772187;let _;t[13]>1e-35?t[1]>64.50000000000001?t[9]>14.500000000000002?t[9]>54.50000000000001?_=.022717227245241684:_=-.049700413274686266:_=.007175776918589741:t[5]>50.50000000000001?t[8]>61.50000000000001?t[21]>1e-35?_=-.07927556792063156:t[3]>8.500000000000002?t[4]>23.500000000000004?t[281]>1e-35?_=-.12263724050601095:_=.0070743478891288035:t[288]>1e-35?_=-.050439138582109:_=.0255701593657891:_=-.005812703740580558:t[6]>49.50000000000001?_=-.008542694147899113:_=.035147383686665:_=-.0960461939274094:t[32]>1e-35?_=-.04555453745517765:t[222]>1e-35?t[0]>612.5000000000001?_=-.01800870272656664:_=-.07817304234604389:t[30]>1e-35?_=-.05227061750368981:t[25]>1e-35?t[0]>4449.500000000001?t[217]>1e-35?_=.08778416018479411:_=-.026563982720830256:_=-.05296139548112329:t[50]>1e-35?_=-.14926464875852247:t[8]>779.5000000000001?t[133]>1e-35?_=-.036572140520852024:t[183]>1e-35?_=-.10766853736801459:_=-.003966794968701808:t[217]>1e-35?t[5]>5237.500000000001?_=.09513215942486053:_=-.03641865277445567:t[10]>59.50000000000001?_=.03177172388687933:t[39]>1e-35?_=-.10234241303898953:t[243]>1e-35?_=-.02966738115984321:t[190]>1e-35?_=-.04312785336449181:t[118]>1e-35?_=-.05808521194081524:_=.006720381600740378;let v;t[308]>1e-35?t[5]>423.00000000000006?t[133]>1e-35?v=-.046284053681928526:t[210]>1e-35?v=49778070699847876e-21:t[13]>1e-35?v=.03328070054739309:t[128]>1e-35?v=-.054790214922938896:t[126]>1e-35?v=-.08524792218532945:v=.014414055975542446:t[1]>38.50000000000001?v=-.07287851335872973:v=.005263371501687163:t[9]>7.500000000000001?t[21]>1e-35?t[10]>4.500000000000001?v=-.12459748864088374:v=-.004626323021331593:t[298]>1e-35?t[4]>64.50000000000001?v=.13044981041138526:t[9]>71.50000000000001?v=-.056068402282406865:t[9]>12.500000000000002?v=.038957722962512764:v=-.04598815982492169:t[8]>691.5000000000001?t[126]>1e-35?v=-.0852126122372075:t[225]>1e-35?v=.10082066771689505:t[1]>161.50000000000003?v=-.11609832500613824:t[3]>8.500000000000002?t[8]>1685.5000000000002?v=-.010835400874777133:v=.004607419973807752:v=-.016989075258564062:v=.009205417251698097:t[23]>1e-35?t[20]>1e-35?v=.10184317139657878:t[0]>5724.500000000001?v=-.1163666496650542:t[1]>106.50000000000001?v=.1303850608190687:t[129]>1e-35?v=.10745031509534769:v=.006166901738036226:t[31]>1e-35?v=.010177092833155127:t[13]>1e-35?t[0]>213.50000000000003?v=.005004582564506611:v=-.10481581731668346:t[19]>1e-35?v=-.009850706427306281:v=-.02608226348051303;let b;t[13]>1e-35?t[1]>64.50000000000001?t[2]>4.500000000000001?b=-.0024117174588695603:b=-.058339700513831916:t[212]>1e-35?t[0]>2215.5000000000005?t[8]>847.5000000000001?t[10]>21.500000000000004?t[1]>39.50000000000001?b=.04575380761203418:b=-.10025595041353463:t[15]>1e-35?b=.17705790384964004:b=.0073813837628615014:b=.07676373681392407:b=-.027167992693885996:t[3]>11.500000000000002?t[280]>1e-35?b=.07078572910026419:t[4]>23.500000000000004?b=.005513918674164821:b=.0206586476926392:t[0]>5269.500000000001?b=.07706773525822633:b=-.010233826953776122:t[148]>1e-35?t[8]>1622.5000000000002?b=-.03204783603215824:b=.027405418223981973:t[4]>14.500000000000002?t[131]>1e-35?t[9]>1.5000000000000002?t[0]>5026.500000000001?b=-.0930246911392012:b=.011173087289703683:t[3]>24.500000000000004?b=.03281421918878597:b=.12449335091369843:t[204]>1e-35?b=.06634531187326123:b=-.011522999669353388:t[92]>1e-35?t[10]>42.50000000000001?b=-.041196758517013515:t[4]>7.500000000000001?b=-2942718111029724e-20:t[4]>6.500000000000001?b=.11953909558532852:b=.03188615019450534:t[122]>1e-35?b=-.0616037324662157:t[101]>1e-35?b=.027230889593349412:t[8]>4968.500000000001?b=-.1113986516540856:t[3]>2.5000000000000004?b=-.002045140426885727:t[129]>1e-35?b=.12641163374304432:b=.014909826232873194;let I;t[308]>1e-35?t[0]>7277.500000000001?I=-.09337446795435:t[5]>423.00000000000006?t[133]>1e-35?I=-.040884836258675006:t[210]>1e-35?I=-.0003719413278428804:t[13]>1e-35?I=.030287610160818174:I=.011174130013595384:t[1]>38.50000000000001?I=-.0662442170185784:I=.004332185707008564:t[9]>7.500000000000001?t[145]>1e-35?t[285]>1e-35?I=-.08092286307197555:I=.029866363328584986:t[21]>1e-35?t[10]>4.500000000000001?I=-.1155211149523894:I=-.0032903546638958538:t[149]>1e-35?I=-.03632198993199768:t[3]>9.500000000000002?t[8]>999.5000000000001?I=-.003507023626534306:t[128]>1e-35?t[4]>13.500000000000002?t[0]>3459.5000000000005?I=-.025416927789760076:I=.02777568919793122:I=-.10310351509769732:I=.013549608903688785:t[186]>1e-35?I=.08513865847420551:I=-.009306721292510369:t[31]>1e-35?I=.009780833952582307:t[23]>1e-35?I=.011143773934157629:t[210]>1e-35?I=.025354797285173356:t[17]>1e-35?t[10]>3.5000000000000004?I=-.04846287537743046:I=-.014647271080376757:t[2]>5.500000000000001?t[7]>57.50000000000001?I=-.034224938681445764:t[8]>1641.5000000000002?I=-.027298372075800673:t[191]>1e-35?t[10]>18.500000000000004?I=-.027950103994861836:I=.14575930827829034:I=-.007124740389354946:t[10]>22.500000000000004?I=.013173304107866726:I=-.11119620042551365;let x;t[131]>1e-35?x=.01892225243240137:t[308]>1e-35?t[5]>691.5000000000001?t[133]>1e-35?x=-.037118314390013646:t[1]>51.50000000000001?t[5]>3749.5000000000005?t[8]>58.50000000000001?x=-.022305242912035072:x=.024792895826340516:x=.013666137278072166:t[88]>1e-35?t[10]>27.500000000000004?x=.2080083584805785:x=.04247197078083379:t[10]>40.50000000000001?t[18]>1e-35?t[1]>27.500000000000004?x=.060783227455868206:x=-.056904865557409035:x=-.03278952553107572:t[192]>1e-35?x=.13117402617043625:x=.01647119888257836:x=-.01825870445636398:t[9]>6.500000000000001?t[298]>1e-35?x=.026536210945939682:t[8]>691.5000000000001?t[126]>1e-35?x=-.07927319604548912:t[10]>3.5000000000000004?t[21]>1e-35?x=-.11083976837572328:t[146]>1e-35?x=-.03359294484446772:x=-.0042815953591236475:t[190]>1e-35?x=-.09264239592903775:t[10]>1e-35?x=.022282638485105657:x=-.0205994057928458:t[5]>4918.500000000001?x=.03430715695199153:t[243]>1e-35?t[2]>57.50000000000001?x=.08935072241972036:x=-.03781647876237494:x=.0062655753179671515:t[31]>1e-35?x=.008603500300349887:t[230]>1e-35?x=.03350056932774173:t[23]>1e-35?t[241]>1e-35?x=.10277555508503314:x=.0017901817172993888:t[2]>98.50000000000001?x=-.05920081229672715:x=-.015722173275739208;let R;t[13]>1e-35?t[118]>1e-35?R=.07957905150112207:t[1]>125.50000000000001?R=-.0662620579858685:t[145]>1e-35?R=.029682040828779843:t[19]>1e-35?t[6]>15.500000000000002?R=-.0009597832580977798:R=-.081474760755753:t[212]>1e-35?R=.03637001492325179:R=.006912305498963309:t[32]>1e-35?R=-.03919900630910754:t[134]>1e-35?R=-.036225295529777886:t[4]>4.500000000000001?t[5]>384.50000000000006?t[204]>1e-35?R=.06671440854602108:t[136]>1e-35?R=-.07577364230133474:t[148]>1e-35?t[4]>7.500000000000001?R=.026430947016830915:R=-.04075501264495112:t[9]>93.50000000000001?R=-.04353169430417609:t[50]>1e-35?R=-.1411224537622882:t[17]>1e-35?t[49]>1e-35?R=.068392679163672:t[10]>1.5000000000000002?R=-.0209659792007492:R=-.0004393235559249831:t[133]>1e-35?t[9]>64.50000000000001?R=.07254524592323175:R=-.0319087835282534:R=.00037444813327793425:R=-.025138768151370408:t[243]>1e-35?R=-.050010891710502096:t[94]>1e-35?R=-.0817513550778599:t[122]>1e-35?R=-.061038875809822285:t[19]>1e-35?t[8]>1085.5000000000002?R=-.008408408775061623:t[2]>5.500000000000001?t[218]>1e-35?R=.1454877641381946:R=.053787998331240316:t[9]>33.50000000000001?R=.08602629796680285:R=-.03895127455803038:R=.008830878042315722;let w;t[131]>1e-35?w=.01687979707990516:t[8]>2915.5000000000005?t[297]>1e-35?w=.07473600489975568:t[0]>93.50000000000001?w=-.021596848506011502:w=-.13840802327735696:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?w=.10264284346448256:w=.031042487183181262:w=-.016653982936827776:t[4]>60.50000000000001?t[10]>75.50000000000001?w=.04226403420647408:t[10]>1e-35?t[0]>4733.500000000001?w=.006271403149804702:w=-.030013637555715046:t[0]>4449.500000000001?w=-.06556876058654929:w=.06437994816903034:t[32]>1e-35?w=-.043814577251655815:t[308]>1e-35?t[0]>7277.500000000001?w=-.09349726304052086:t[210]>1e-35?w=-.0035960132209098003:t[5]>691.5000000000001?t[133]>1e-35?w=-.029188394315052574:w=.017219308333820193:w=-.017378928852189585:t[9]>6.500000000000001?t[0]>2653.5000000000005?t[149]>1e-35?w=-.04428555753857688:w=.0001456106867817353:t[5]>213.50000000000003?w=.01740292726636365:w=-.011361718115556464:t[7]>4.500000000000001?t[0]>316.50000000000006?t[19]>1e-35?t[10]>54.50000000000001?w=.03410288911259329:t[121]>1e-35?w=-.06056527462120627:t[8]>2592.5000000000005?w=.12166808844363577:t[191]>1e-35?w=.11669879218998758:w=-.001664858391716235:w=-.01262927450503166:w=-.04506589951879664:t[227]>1e-35?w=-.08548904959752329:w=.02156080776537726;let P;t[306]>1e-35?t[149]>1e-35?P=-.1389218965136736:P=-.032218642644416894:t[13]>1e-35?P=.006465035217331847:t[50]>1e-35?P=-.1381687930130022:t[179]>1e-35?P=-.13112784985951215:t[148]>1e-35?t[8]>1726.5000000000002?P=-.03262719498763048:P=.023342916702125613:t[191]>1e-35?P=.030005484947580197:t[4]>4.500000000000001?t[204]>1e-35?P=.047767773119269434:t[136]>1e-35?t[0]>1937.5000000000002?P=-.09989343595668776:P=.06533942033334243:t[15]>1e-35?t[9]>86.50000000000001?P=-.10577989354150097:t[8]>668.5000000000001?t[126]>1e-35?P=-.09165257825246746:t[9]>32.50000000000001?P=.02484870392366004:P=-.008499493096971395:t[8]>24.500000000000004?P=.02459679192828244:P=-.010527978013140512:t[25]>1e-35?t[217]>1e-35?P=.0015644546318714849:P=-.06579524865022705:P=-.0060233890975120614:t[122]>1e-35?t[1]>36.50000000000001?P=.03331853632960164:P=-.09482264761126993:t[19]>1e-35?t[8]>1430.5000000000002?P=-.019091477207111116:P=.037878468575478504:t[94]>1e-35?P=-.08013082284576584:t[4]>2.5000000000000004?t[186]>1e-35?P=.16919658785098224:t[243]>1e-35?P=-.06580584936754524:P=.01567555159935563:t[129]>1e-35?P=.06721746994993226:t[10]>32.50000000000001?P=-.046394462507797975:P=-.006436180519584767;let k;t[131]>1e-35?k=.015039096856208693:t[8]>779.5000000000001?t[145]>1e-35?k=.019122095523977856:t[298]>1e-35?k=.023828936462317443:t[1]>23.500000000000004?t[5]>384.50000000000006?t[7]>59.50000000000001?k=-.026094309429557913:t[204]>1e-35?k=.09163404305658318:t[1]>27.500000000000004?t[149]>1e-35?t[6]>34.50000000000001?k=.012643810980689466:k=-.07884161741497837:k=-.0025267379810891104:t[2]>43.50000000000001?t[0]>2860.5000000000005?k=.04493082949897325:k=.18046359750455776:t[7]>18.500000000000004?k=-.018667348656891496:k=.02584325784698236:k=-.045696524897545915:t[0]>3321.5000000000005?t[201]>1e-35?k=.04749240016989375:k=-.0333334578246718:t[5]>3276.5000000000005?k=.11330554740098908:t[7]>94.50000000000001?k=.1296600395033268:k=-.003576436308940934:t[15]>1e-35?t[183]>1e-35?k=-.13787130789142835:t[0]>1847.5000000000002?k=.017915229729920556:t[10]>23.500000000000004?t[10]>31.500000000000004?t[6]>7.500000000000001?k=.028856848462727104:k=-.11197632885851168:k=.08169801342016791:t[1]>22.500000000000004?k=-.021052888644970163:k=.019048604298876753:t[7]>4.500000000000001?k=-.002603328695276418:t[7]>1.5000000000000002?t[2]>5.500000000000001?k=.03432638833359197:k=-.0036767863082454973:t[1]>48.50000000000001?k=.03087375270128195:t[2]>3.5000000000000004?k=-.04219917149740248:k=.018818493993207935;let Q;t[306]>1e-35?Q=-.04076858123502297:t[13]>1e-35?t[1]>67.50000000000001?t[9]>14.500000000000002?t[9]>53.50000000000001?t[8]>1971.5000000000002?Q=-.09091897542577475:Q=.04042943082645558:t[218]>1e-35?Q=.056254985867151:Q=-.053848117950183044:Q=.003881630017086845:t[5]>5152.500000000001?t[8]>857.5000000000001?t[6]>28.500000000000004?Q=.021581808008986944:Q=-.05639286496176611:Q=.052838875036198954:t[5]>50.50000000000001?t[5]>4082.5000000000005?t[17]>1e-35?Q=.023061479860228728:t[145]>1e-35?t[9]>10.500000000000002?Q=.023885302967553288:Q=.1617794086125622:t[212]>1e-35?Q=.04504545345658806:t[3]>17.500000000000004?t[4]>45.50000000000001?Q=-.03948072448245435:t[1]>47.50000000000001?t[9]>18.500000000000004?Q=.01894935813286188:Q=-.06449356357429188:Q=.012297239104320094:t[1]>26.500000000000004?t[8]>33.50000000000001?Q=-.034718828212885515:Q=.0898976288814321:t[1]>17.500000000000004?Q=-.15440137451988326:Q=-.03864183216821465:Q=.009988507307006308:Q=-.08540311947043305:t[50]>1e-35?Q=-.13323659732101975:t[134]>1e-35?Q=-.031820386486894385:t[32]>1e-35?t[8]>2302.5000000000005?Q=.08082476177379844:Q=-.041665761903645876:t[179]>1e-35?Q=-.12405023987936657:t[39]>1e-35?Q=-.06247416524997478:t[138]>1e-35?Q=-.10724031753676487:Q=-.0005423122305122404;let M;t[308]>1e-35?M=.006160742906729798:t[190]>1e-35?t[0]>2461.5000000000005?t[10]>22.500000000000004?M=.023223358334607133:M=-.04383410185346742:M=-.08542395045055405:t[297]>1e-35?t[8]>51.50000000000001?t[1]>13.500000000000002?M=.023406489302867494:M=-.085521220804058:M=-.02921899554854833:t[298]>1e-35?t[9]>12.500000000000002?M=.028120059780969632:M=-.04211009474298743:t[294]>1e-35?M=-.05040415676618239:t[86]>1e-35?t[1]>36.50000000000001?M=-.0993035220737934:M=-.0005384930611060366:t[230]>1e-35?t[4]>6.500000000000001?M=.029770210551187937:M=-.016272917551655715:t[4]>60.50000000000001?t[280]>1e-35?M=.06421359317599738:M=-.01963732469244167:t[218]>1e-35?t[3]>3.5000000000000004?M=.024368404612215164:M=-.04045232374803373:t[131]>1e-35?M=.017372701982485795:t[120]>1e-35?M=.08812710275150198:t[18]>1e-35?t[90]>1e-35?M=.18451364351180236:t[7]>33.50000000000001?M=-.03850813130183531:t[195]>1e-35?M=.06966114053446336:t[3]>16.500000000000004?M=-.0012869181693341211:t[0]>4242.500000000001?M=-.054625548611291035:M=-.014431095117473881:t[5]>4558.500000000001?t[8]>1.5000000000000002?M=.006302103427145562:M=.13967622319898698:t[121]>1e-35?M=-.038798585213145644:t[5]>4544.500000000001?M=-.08050498033009466:M=-.002986974112681435;let D;t[0]>384.50000000000006?t[2]>101.50000000000001?t[1]>16.500000000000004?D=-.03461119351456781:D=.05659026566680352:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?D=-.12404435523286539:D=-.0034376913880382956:D=-.09821622245095822:t[131]>1e-35?t[9]>1.5000000000000002?D=.0037507103585310234:D=.03610387965829944:t[8]>999.5000000000001?t[9]>137.50000000000003?D=-.11985021663179699:t[0]>1847.5000000000002?t[126]>1e-35?D=-.04832024079663151:t[37]>1e-35?D=-.037103393468366934:D=-.004248086592531705:t[8]>3084.0000000000005?t[9]>43.50000000000001?D=.032539071163832034:t[5]>1643.5000000000002?D=.036408625378035665:t[0]>1500.5000000000002?D=-.1346358322854993:D=-.027586559522081014:t[3]>1e-35?t[190]>1e-35?D=-.1133991164577881:t[9]>52.50000000000001?D=-.024478640359723122:D=.03673777861098756:D=-.1037451237591819:t[230]>1e-35?t[9]>48.50000000000001?t[10]>20.500000000000004?D=.002583438691776944:D=.10773520810108106:t[9]>12.500000000000002?t[1]>16.500000000000004?D=-.02141222346712401:D=.06392462314316179:t[4]>12.500000000000002?D=.08700122294434816:t[8]>267.50000000000006?D=.056923170082743224:D=-.07716309825583327:t[32]>1e-35?D=-.03961343943752142:D=.002674914122888783:t[1]>42.50000000000001?D=-.05217539654421676:t[145]>1e-35?D=.09553630282946368:D=-.009424791262477729;let G;t[183]>1e-35?G=-.05753337139158443:t[308]>1e-35?G=.00562436671450989:t[9]>7.500000000000001?t[21]>1e-35?t[10]>8.500000000000002?G=-.10477869875380448:G=-.0070301869937306055:t[3]>9.500000000000002?t[8]>1765.5000000000002?t[0]>4571.500000000001?G=-.12526505173232894:t[10]>1e-35?t[9]>71.50000000000001?G=-.04442302951713574:G=.00012409888451734224:G=-.092199119633697:t[225]>1e-35?G=.13773072450201831:t[0]>2882.5000000000005?G=.0028540012229920533:t[298]>1e-35?G=.07134486044361629:G=.014297412329837425:t[145]>1e-35?G=.05608385321902638:t[92]>1e-35?G=.038298413603926135:t[107]>1e-35?t[2]>6.500000000000001?G=-.0039957800609801315:G=.0776927564241081:t[203]>1e-35?G=-.05502900859432093:t[105]>1e-35?G=.06062892720841595:G=-.009574839629252128:t[31]>1e-35?G=.009488858841144216:t[23]>1e-35?t[20]>1e-35?G=.08818126313644752:t[8]>161.50000000000003?G=.014353968957885408:G=-.022240738532827903:t[210]>1e-35?G=.024648862719806694:t[2]>5.500000000000001?t[4]>4.500000000000001?t[17]>1e-35?t[10]>16.500000000000004?G=-.043902062079383485:G=-.014741559220396223:G=-.00934935734853194:t[6]>32.50000000000001?G=.1514593126307404:G=.010771222510801532:t[10]>22.500000000000004?G=.01412495209334078:G=-.08576940379502533;let O;t[0]>384.50000000000006?t[84]>1e-35?O=-.06647690967306838:t[2]>101.50000000000001?O=-.024451334501552457:t[306]>1e-35?O=-.034517188927733505:t[131]>1e-35?t[9]>1.5000000000000002?O=.0031858381443673127:O=.032574927024450646:t[204]>1e-35?t[1]>62.50000000000001?O=-.08601340441214533:t[1]>29.500000000000004?O=.10487598629539963:t[8]>597.5000000000001?O=-.0786529133673238:O=.08689436600511559:t[8]>779.5000000000001?t[10]>2.5000000000000004?t[9]>100.50000000000001?O=-.04883600353740688:t[126]>1e-35?O=-.03794042763348827:O=-.003358871967539988:t[210]>1e-35?O=.054991356498447566:t[6]>19.500000000000004?O=-.007418396981635549:O=.018032606049498613:t[18]>1e-35?t[7]>35.50000000000001?t[2]>44.50000000000001?O=-.02143003429501711:O=-.09016000554055564:t[1]>19.500000000000004?t[1]>42.50000000000001?t[8]>17.500000000000004?O=-.006636355416244082:O=-.06483095743431454:t[4]>21.500000000000004?O=-.028975965946833545:O=.022012264796522657:O=-.06653648243193663:t[5]>4593.500000000001?O=.01753551428088607:t[217]>1e-35?O=-.028864824937700297:t[94]>1e-35?O=-.04885192273020658:t[279]>1e-35?O=.08105715462329498:t[121]>1e-35?O=-.04576676034750651:O=.004795141324949362:t[1]>42.50000000000001?O=-.047446619702809195:t[145]>1e-35?O=.08400495571952321:O=-.00854528836489364;let N;t[294]>1e-35?N=-.042529778074638265:t[266]>1e-35?N=-.1180276669679798:t[134]>1e-35?N=-.026818144353279623:t[183]>1e-35?N=-.05120747503479363:t[227]>1e-35?t[8]>1641.5000000000002?N=-.07265906898294434:t[4]>12.500000000000002?t[17]>1e-35?N=-.027516137530797014:t[0]>4331.500000000001?t[1]>64.50000000000001?N=-.03049646619610203:t[1]>50.50000000000001?N=.20634590755061122:N=.06956378103625731:t[0]>3770.5000000000005?N=-.07946414366134913:t[19]>1e-35?N=.17083312065604694:t[2]>21.500000000000004?N=-.02327981978127724:N=.129717297518715:t[145]>1e-35?N=.006891245076133524:N=-.0789123467863741:t[3]>99.50000000000001?N=-.02022281202803071:t[302]>1e-35?t[10]>47.50000000000001?N=.06447639919732716:N=-.05457561977645972:t[306]>1e-35?N=-.029995903305383882:t[191]>1e-35?N=.030596508110850414:t[242]>1e-35?N=-.024085578702020216:t[8]>3198.5000000000005?t[297]>1e-35?N=.09518584795377832:N=-.018197744600833596:t[13]>1e-35?N=.006751790086127549:t[148]>1e-35?N=.01904174573618417:t[99]>1e-35?N=.025287735102561926:t[4]>14.500000000000002?N=-.004364337681643273:t[1]>15.500000000000002?t[35]>1e-35?N=-.09467943982430241:t[243]>1e-35?N=-.02521824751996268:N=.005437570718352172:N=-.022476214821960674;let F;t[0]>384.50000000000006?t[84]>1e-35?F=-.06088131453064195:t[147]>1e-35?F=-.05332792965930566:t[135]>1e-35?t[9]>32.50000000000001?F=.04219361472548491:F=-.07227529211725771:t[10]>4.500000000000001?t[21]>1e-35?F=-.0787279848043689:t[17]>1e-35?t[3]>18.500000000000004?t[188]>1e-35?F=-.054347604504400286:t[0]>3544.5000000000005?t[0]>5850.500000000001?F=-.11431764534511478:F=.013549717238356157:F=-.020987333767091276:t[6]>2.5000000000000004?F=-.02914877855133127:F=.08483464900160231:t[8]>58.50000000000001?t[183]>1e-35?F=-.10087072787978416:t[37]>1e-35?F=-.030467397753331196:t[229]>1e-35?F=-.1017559811057469:t[4]>20.500000000000004?F=-.00413177742240167:t[20]>1e-35?F=.05213315982685969:F=.0037921635866823133:t[8]>51.50000000000001?F=.07327913092421544:t[6]>49.50000000000001?F=-.03457694284156811:t[6]>18.500000000000004?t[7]>17.500000000000004?F=.02744420891894289:F=.11288946357194463:F=.003482908820966248:t[18]>1e-35?t[1]>20.500000000000004?t[7]>4.500000000000001?F=-.012329314369909049:F=.026816658655600168:F=-.0872405354618811:F=.007872673500247845:t[1]>42.50000000000001?F=-.04309044198258254:t[145]>1e-35?F=.07572529147860785:t[7]>5.500000000000001?F=-.013837187093264945:t[1]>17.500000000000004?F=.04208698439539668:F=-.06284346769019863;let U;t[294]>1e-35?U=-.0384794324818203:t[266]>1e-35?U=-.1087205883821061:t[32]>1e-35?t[8]>2302.5000000000005?U=.07432960094940501:U=-.035248735855751855:t[134]>1e-35?U=-.02456191365284949:t[121]>1e-35?t[0]>4720.500000000001?t[1]>39.50000000000001?U=-.01706896375068821:U=.08212247914968074:t[2]>59.50000000000001?U=-.09546478958824225:t[6]>53.50000000000001?U=.12317082897575611:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?U=.02816463285971267:U=.15449139016588445:U=-.10199787406123524:U=-.038068684323297096:t[223]>1e-35?t[8]>668.5000000000001?U=-.13924786681478077:U=-.0072772442570213335:t[39]>1e-35?U=-.05392786531177836:t[0]>93.50000000000001?t[40]>1e-35?U=-.054059371343144036:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?U=-.11174465335620831:U=.00013144040097180107:U=-.08493919336681105:t[42]>1e-35?U=-.11078582572836196:t[84]>1e-35?t[4]>17.500000000000004?U=-.015540659878839153:U=-.14442609417300142:t[21]>1e-35?U=-.025251979447574083:U=.0023698372645272847:t[18]>1e-35?U=.07269739695712212:t[8]>2592.5000000000005?U=-.1460388776448558:t[9]>30.500000000000004?t[1]>23.500000000000004?U=-.01835130329646532:t[9]>45.50000000000001?U=.02023047454629885:U=.16469378262221102:U=-.042975030085836426;let L;t[8]>2915.5000000000005?t[297]>1e-35?L=.06257393915394144:t[0]>93.50000000000001?t[4]>1.5000000000000002?L=-.01034964686484714:L=-.07357437440667927:L=-.11987794734779106:t[298]>1e-35?t[8]>81.50000000000001?t[0]>3370.5000000000005?t[8]>155.50000000000003?t[8]>660.5000000000001?t[8]>2134.5000000000005?L=-.09476398869062203:t[9]>72.50000000000001?L=-.0757383854264379:L=.02806542779508718:L=-.05147742568418084:L=.10212721564444344:L=.0518263760642861:L=-.08743405377022222:t[189]>1e-35?t[0]>5269.500000000001?L=-.10669213185972036:L=.027050434286384796:t[302]>1e-35?L=-.0407832394672723:t[116]>1e-35?t[10]>38.50000000000001?L=.06354599160071946:t[1]>67.50000000000001?L=.05317447949011187:L=-.059138165935307165:t[212]>1e-35?t[19]>1e-35?L=-.09369289448773599:t[0]>2215.5000000000005?L=.04077965380363924:t[0]>807.5000000000001?L=-.0591771776458298:L=.057315736906679376:t[308]>1e-35?t[1]>52.50000000000001?t[5]>3749.5000000000005?L=-.016323380219241672:L=.007291062979527741:t[210]>1e-35?t[8]>1641.5000000000002?L=.03720704290087811:L=-.008730548158766654:t[4]>80.50000000000001?L=-.05346644687473197:L=.014596824736762107:t[218]>1e-35?t[3]>3.5000000000000004?L=.019984510398089086:L=-.03917825025861855:t[9]>170.50000000000003?L=-.09759719821334525:L=-.0023586682752856298;let H;t[183]>1e-35?t[17]>1e-35?H=.030100940443356424:t[10]>1.5000000000000002?H=-.10861112216742408:H=.017680668976453255:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?H=-.032062878390325456:H=-.10808232631806887:t[8]>1641.5000000000002?H=-.06147013392655731:t[4]>12.500000000000002?H=.03324767551088266:t[145]>1e-35?H=.028851633810612017:H=-.054871239091792784:t[134]>1e-35?H=-.023813968121342108:t[266]>1e-35?H=-.10037039667146351:t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>1939.5000000000002?H=-.055566877553100726:t[2]>24.500000000000004?t[8]>182.50000000000003?t[10]>43.50000000000001?t[10]>55.50000000000001?H=-.025350325484720576:H=.1579024598549572:t[9]>2.5000000000000004?t[0]>3746.5000000000005?H=.056817276537534815:H=-.07674158463557636:H=-.06335553143454145:t[1]>56.50000000000001?H=.16390494217299284:H=-.0027330160430847177:t[10]>36.50000000000001?t[8]>1067.5000000000002?H=.041717597065890205:H=-.10357913492269129:t[10]>29.500000000000004?H=.1365512866715726:H=.020600048310575665:H=.09708785634773187:H=-.060427658852305666:t[126]>1e-35?t[10]>32.50000000000001?t[6]>24.500000000000004?t[8]>1146.5000000000002?H=-.03146213719547347:H=.11784024316238083:H=-.050940520532045355:H=-.047988344143075616:t[191]>1e-35?H=.028764654731460032:H=.0011911575567860023;let $;t[294]>1e-35?t[10]>50.50000000000001?$=-.11630092297244568:t[0]>2432.5000000000005?t[0]>4199.500000000001?$=-.05103908560370243:$=.05002066201169583:$=-.09976646725732496:t[32]>1e-35?t[0]>4242.500000000001?$=-.0648838712201258:t[5]>3721.5000000000005?t[9]>4.500000000000001?$=.127983140816313:$=-.05436534163636867:$=-.024514536544596455:t[121]>1e-35?t[0]>4449.500000000001?t[4]>9.500000000000002?$=-.009504203657088933:t[8]>819.5000000000001?$=.18689664822602375:$=.03635576744011826:$=-.029862411809998525:t[223]>1e-35?$=-.06474496692999487:t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?$=-.09405026597863717:t[0]>4153.500000000001?$=.053577663326799765:$=-.05062127873995668:$=.06512222894425874:t[39]>1e-35?$=-.04985311717827547:t[51]>1e-35?$=-.04541229517934797:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?$=-.02860634573675884:$=.08863753005590103:$=.11158892111063744:t[0]>655.5000000000001?$=-.031005736641654926:$=-.1439827004505974:t[222]>1e-35?t[1]>11.500000000000002?t[0]>612.5000000000001?$=-.00843386136334982:$=-.05273594615999777:$=.1060183822015004:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?$=-.015774115523598486:$=.10147367091236065:$=-.048307000563071016:$=.002118376117677254;let W;t[8]>1014.5000000000001?t[9]>137.50000000000003?W=-.10279096288817871:t[0]>93.50000000000001?t[8]>1067.5000000000002?t[227]>1e-35?W=-.03544332389470493:t[285]>1e-35?t[9]>64.50000000000001?W=.07211107542565391:W=-.041556776020476104:t[145]>1e-35?t[1]>66.50000000000001?W=-.0751486415451188:t[1]>59.50000000000001?W=.13459005084554104:W=.024184371850147466:t[0]>3072.5000000000005?t[95]>1e-35?W=.06715575425741895:W=-.005895690393702183:t[8]>2915.5000000000005?W=-.010205039411753762:t[9]>33.50000000000001?t[9]>47.50000000000001?W=-.00029068886245881074:W=.0613467393188786:t[148]>1e-35?W=-.06074463294936236:t[3]>1.5000000000000002?t[5]>1849.5000000000002?t[1]>15.500000000000002?W=.003887223773199377:W=-.08553893131979015:W=.025654192706396767:W=-.05651733979610658:W=-.02039913645229667:t[2]>7.500000000000001?W=-.1058450646728524:W=.02267192191610376:t[1]>120.50000000000001?t[2]>60.50000000000001?W=-.12304707569000428:t[1]>132.50000000000003?t[6]>41.50000000000001?W=.1283258201586378:W=-.01718135372229775:W=-.07702452408491414:t[125]>1e-35?W=-.0804612900572707:t[178]>1e-35?t[0]>4533.500000000001?W=.04273051857848212:W=-.04533122948101463:t[2]>196.50000000000003?W=-.10543331044088727:t[94]>1e-35?t[5]>4532.500000000001?W=.0231032972703664:W=-.04807386814498683:W=.002729435991332102;let j;t[179]>1e-35?j=-.08065315471211375:t[183]>1e-35?t[17]>1e-35?j=.026484626664041125:t[10]>1.5000000000000002?j=-.10187000872941615:j=.015274190652133752:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?j=.09574540795390041:j=-.06454986703691233:j=-.11411849349353141:t[266]>1e-35?j=-.09281838517322076:t[32]>1e-35?t[8]>2302.5000000000005?j=.06685250330182936:t[4]>67.50000000000001?t[2]>97.50000000000001?j=-.04403391373512386:j=.1132928075412222:t[2]>47.50000000000001?j=-.09700191391838056:j=-.02147184357182825:t[10]>4.500000000000001?t[21]>1e-35?j=-.0735617817957859:t[17]>1e-35?t[3]>18.500000000000004?j=-.001668912999010927:j=-.02363511102970245:t[8]>58.50000000000001?j=-.00035213368294640616:t[3]>17.500000000000004?t[2]>28.500000000000004?t[10]>23.500000000000004?t[1]>38.50000000000001?j=.0911011436534449:t[1]>28.500000000000004?j=-.07192390493729035:j=.06913818091291246:j=-.012312625373699222:j=.06784496312307986:j=-167756936027735e-19:t[18]>1e-35?t[8]>302.50000000000006?j=.0026564453057705273:j=-.025425772389361445:t[122]>1e-35?j=-.12046786388602149:t[0]>3183.5000000000005?j=.01162092842804907:t[91]>1e-35?j=.07000265526928563:t[1]>22.500000000000004?t[0]>576.5000000000001?j=-.0001647792543020228:j=-.023664538532907665:j=.01609078206180752;let ce;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4141.500000000001?ce=-.051473645433684705:t[0]>3030.5000000000005?t[1]>51.50000000000001?ce=-.017696526862422682:ce=.1450050954613223:ce=-.05406930069823832:ce=-.08308700260259043:t[120]>1e-35?ce=.058316269489189415:t[297]>1e-35?t[94]>1e-35?ce=-.07425512495167255:t[8]>51.50000000000001?t[1]>13.500000000000002?t[1]>33.50000000000001?t[19]>1e-35?t[0]>4498.500000000001?ce=.038431826961746934:ce=-.05937462906539856:t[9]>65.50000000000001?ce=.10814845712507865:t[4]>9.500000000000002?t[2]>22.500000000000004?t[1]>39.50000000000001?t[1]>44.50000000000001?t[10]>44.50000000000001?ce=.12297945639231944:t[0]>3796.5000000000005?t[4]>26.500000000000004?ce=-.09579030954062734:ce=.025064711572811746:ce=.02579440518821548:ce=.1044440128091862:ce=-.058348633139536844:ce=.07766788227934436:ce=-.01021229539092708:t[2]>2.5000000000000004?t[10]>29.500000000000004?t[0]>3770.5000000000005?t[0]>4438.500000000001?ce=.07463684068207214:ce=.18244269035484484:t[6]>39.50000000000001?ce=-.06050050067471004:ce=.05787759066913493:ce=.010783225857972171:ce=.1674891243602606:t[4]>9.500000000000002?ce=-.004814132027475892:ce=-.14543299413454813:ce=-.02935093398687923:t[116]>1e-35?t[9]>2.5000000000000004?t[8]>1218.5000000000002?ce=-.07634466313617769:ce=.0287825335169114:ce=-.06894721943300268:ce=-.00023988459059521937;let J;t[131]>1e-35?t[1]>93.50000000000001?J=-.05706887458825395:t[2]>1.5000000000000002?J=.011446637886629108:J=-.10616119878749211:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?J=.08424281276381033:t[3]>17.500000000000004?t[20]>1e-35?J=.11146885439601915:t[8]>61.50000000000001?t[0]>3530.5000000000005?t[9]>48.50000000000001?t[9]>61.50000000000001?J=.026278724448495064:J=.17053138400480508:t[0]>4463.500000000001?J=-.06482289890096041:J=.03026516489536295:J=-.031785170717683144:J=.1312690622980455:t[13]>1e-35?J=.14336922540461444:J=.03523850945454039:J=-.015407465968975714:t[39]>1e-35?J=-.054809635385158186:t[32]>1e-35?t[0]>4242.500000000001?J=-.0659975068798723:J=-.008386582621403979:t[4]>60.50000000000001?t[10]>75.50000000000001?t[3]>107.50000000000001?J=-.04225314193574262:t[3]>70.50000000000001?t[1]>29.500000000000004?J=.057409156184759516:J=.2024322059866388:J=-.030670938454461245:t[10]>1e-35?t[0]>4733.500000000001?J=.010648654146284154:t[308]>1e-35?J=.008728141696325391:t[4]>64.50000000000001?t[298]>1e-35?J=.12364025998551711:J=-.02247495081065243:t[1]>22.500000000000004?J=-.0726295464624251:J=.03481895086048152:t[0]>4331.500000000001?J=-.04775443357020673:J=.07172377425057568:t[2]>89.50000000000001?J=-.11782645274716962:J=.00010092665257989378;let Te;t[147]>1e-35?Te=-.041560228567115574:t[302]>1e-35?t[10]>47.50000000000001?Te=.062292114082780084:t[10]>5.500000000000001?t[7]>22.500000000000004?Te=-.016101990375700172:t[0]>2579.5000000000005?Te=-.13045089661551845:Te=-.02874367814784938:Te=.025835149631944995:t[167]>1e-35?t[0]>3928.5000000000005?Te=.17084176915326055:Te=-.019195947948312853:t[222]>1e-35?t[30]>1e-35?t[1]>36.50000000000001?t[8]>45.50000000000001?t[8]>578.5000000000001?t[1]>67.50000000000001?Te=.10591712319944074:Te=-.024082167264285:Te=.16497698867036126:Te=-.04985066326861431:t[0]>1937.5000000000002?t[2]>16.500000000000004?Te=-.021012910475524206:Te=-.13058422554298485:t[0]>1102.5000000000002?Te=.10955864175201457:Te=-.03566689354348996:t[1]>11.500000000000002?Te=-.02093884208606101:Te=.09107244766183857:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?Te=-.013861861436128482:Te=.09756849802202777:t[224]>1e-35?t[1]>51.50000000000001?Te=.10163873449625677:Te=-.02779270277623805:t[1]>26.500000000000004?Te=-.08035058228527389:Te=.0005719695099064484:t[191]>1e-35?t[9]>9.500000000000002?Te=-.007028075523033826:Te=.0489470913925288:t[1]>61.50000000000001?t[132]>1e-35?Te=.11230846723576784:t[0]>350.50000000000006?t[2]>1.5000000000000002?Te=-.0032075580718124892:Te=-.04442829143298883:Te=-.06597073245775804:Te=.0015594090939337751;let fe;t[223]>1e-35?t[8]>668.5000000000001?fe=-.12803889879260094:fe=.002171373740016862:t[121]>1e-35?t[0]>4720.500000000001?t[217]>1e-35?fe=.08967966612917375:t[1]>39.50000000000001?fe=-.059791671514498074:fe=.05648934961902822:t[2]>59.50000000000001?fe=-.08633234097449628:t[6]>53.50000000000001?fe=.11140345067444689:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?fe=.025606129643140924:fe=.13835395886271978:fe=-.09361630641448024:t[4]>7.500000000000001?t[1]>26.500000000000004?t[1]>49.50000000000001?fe=-.09975506556937946:t[10]>36.50000000000001?fe=-.09427724661655643:t[10]>24.500000000000004?fe=.07329330653410447:fe=-.02271182965807972:fe=-.09767874967639482:t[6]>13.500000000000002?t[10]>23.500000000000004?fe=-.05082091374050816:fe=.1687114435254966:t[0]>2314.5000000000005?fe=-.06422664016383926:fe=.0636688376664789:t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?fe=-.06857762517406195:t[9]>71.50000000000001?t[0]>4188.500000000001?fe=-.1274167728754332:fe=.01308079126447365:t[4]>73.50000000000001?fe=.13854015371106546:t[4]>48.50000000000001?fe=-.03684255740123261:t[6]>45.50000000000001?fe=.10329912215813097:t[10]>77.50000000000001?fe=-.08630788656925215:fe=.031022006843800853:t[1]>25.500000000000004?fe=-.08278381528048026:fe=.06664374548141594:t[84]>1e-35?fe=-.05624227409079396:fe=.00012184182357340415;let De;t[179]>1e-35?De=-.07443348719246982:t[40]>1e-35?t[0]>1937.5000000000002?De=-.07595415373151816:De=.054065040429292326:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[0]>1187.5000000000002?De=.022822510448266862:De=.17491569312933697:De=-.058362287133533565:t[2]>2.5000000000000004?De=-.03633895806364428:De=.06397808186120692:t[8]>4968.500000000001?t[1]>31.500000000000004?De=-.07294848747514579:De=.025053613105805606:t[230]>1e-35?t[4]>6.500000000000001?t[107]>1e-35?De=-.07009535282685533:t[8]>2640.0000000000005?De=-.051761240111316276:t[131]>1e-35?De=-.06245774419231631:De=.03495606662854905:De=-.013863522184803188:t[131]>1e-35?t[1]>93.50000000000001?t[1]>105.50000000000001?De=.0015036626973581122:De=-.12505706794835883:t[1]>48.50000000000001?t[276]>1e-35?De=.10435171369790015:t[0]>5026.500000000001?t[0]>5308.500000000001?De=.022343994371919224:De=-.14087991797693533:t[8]>1323.5000000000002?t[10]>49.50000000000001?De=.07724450228328664:t[0]>3853.5000000000005?De=-.15671707454435677:t[10]>28.500000000000004?De=-.10179090671841723:De=.014878216919760927:De=.03967665658164865:t[8]>2696.5000000000005?t[15]>1e-35?De=.14054154485273487:De=.01821247272493051:t[2]>5.500000000000001?t[2]>100.50000000000001?De=-.08632985141410315:De=.005524157938954954:De=-.08802502622523681:De=-.0004649168897260341;let Ve;t[86]>1e-35?t[8]>65.50000000000001?t[1]>32.50000000000001?t[4]>16.500000000000004?Ve=-.007458687464321174:Ve=-.09444966249102484:t[1]>23.500000000000004?Ve=.08564129697360716:Ve=-.07105002902845851:Ve=.05688756955238231:t[294]>1e-35?t[10]>50.50000000000001?Ve=-.10326216566705966:t[1]>26.500000000000004?Ve=.0050539832484585365:Ve=-.07080395606126953:t[306]>1e-35?t[149]>1e-35?Ve=-.10399433201474328:t[2]>14.500000000000002?t[9]>6.500000000000001?Ve=.05783632021087773:t[10]>17.500000000000004?Ve=-.06720598671764105:t[1]>47.50000000000001?Ve=.097495825172558:Ve=-.013372242800584872:Ve=-.06463226787713715:t[42]>1e-35?Ve=-.0885725817597767:t[204]>1e-35?t[1]>62.50000000000001?Ve=-.07496598696848249:t[1]>29.500000000000004?t[8]>446.50000000000006?Ve=.11051270080118503:Ve=.027719462817590454:t[8]>597.5000000000001?Ve=-.08441503592016869:Ve=.05534229430302502:t[223]>1e-35?t[8]>668.5000000000001?Ve=-.12190088985091102:Ve=-.0067442838156576345:t[148]>1e-35?t[9]>79.50000000000001?Ve=.09225972475904022:t[2]>10.500000000000002?t[1]>102.50000000000001?Ve=.11805676536334647:t[8]>1726.5000000000002?t[9]>10.500000000000002?Ve=.016585157185448045:Ve=-.11032043771149425:Ve=.01586986028570486:t[8]>388.50000000000006?Ve=-.10592413013261853:Ve=.04930703248769364:t[13]>1e-35?Ve=.003621937787920821:Ve=-.0013786331198611841;let Ue;t[145]>1e-35?t[1]>32.50000000000001?t[1]>38.50000000000001?t[10]>55.50000000000001?t[1]>54.50000000000001?Ue=.009769895322846493:Ue=-.10620052926943656:t[9]>19.500000000000004?Ue=.03781202525403449:t[9]>14.500000000000002?Ue=-.11485785321365344:t[9]>6.500000000000001?Ue=.07677177833073881:t[0]>4342.500000000001?Ue=-.07079285609687631:t[49]>1e-35?Ue=.06156814809246001:Ue=-.014788509042554625:Ue=-.032659201618470655:t[5]>5207.500000000001?Ue=-.09013500825185713:t[3]>10.500000000000002?t[8]>1787.5000000000002?Ue=-.03094160322187924:t[1]>29.500000000000004?Ue=.09474646043921069:Ue=.023445783928231618:Ue=.09342846694174194:t[0]>533.5000000000001?t[204]>1e-35?t[1]>62.50000000000001?Ue=-.07164443768784848:t[1]>29.500000000000004?Ue=.089473622509272:t[8]>597.5000000000001?Ue=-.08155349903101317:Ue=.07098423265024251:t[8]>691.5000000000001?t[5]>2252.5000000000005?Ue=-.004003900679358653:t[190]>1e-35?Ue=-.09236113461485262:t[8]>3198.5000000000005?Ue=-.0124130160451179:Ue=.018453070064009328:t[15]>1e-35?Ue=.012013209112857824:t[7]>4.500000000000001?t[7]>5.500000000000001?Ue=-.0009580759587680961:Ue=-.03227283036698222:Ue=.01369287669536875:t[1]>50.50000000000001?Ue=-.04213060332500437:t[35]>1e-35?Ue=-.11508095777767471:t[190]>1e-35?Ue=-.08611884672400155:t[297]>1e-35?Ue=.05723551879433584:Ue=-.004829340082311461;let Ke;t[183]>1e-35?Ke=-.037994150023203555:t[227]>1e-35?t[17]>1e-35?t[3]>20.500000000000004?t[10]>36.50000000000001?Ke=-.11753465135886734:Ke=-.007515490299047085:Ke=-.08576941990777916:t[8]>1641.5000000000002?t[10]>37.50000000000001?Ke=-.12371142493530439:t[1]>36.50000000000001?Ke=.032189417575190435:Ke=-.10339125953022954:t[3]>32.50000000000001?t[4]>27.500000000000004?t[1]>59.50000000000001?Ke=-.0784518658439288:t[2]>54.50000000000001?Ke=.12477882322370665:Ke=.000313468482399738:Ke=.12261955132611434:t[8]>81.50000000000001?t[23]>1e-35?Ke=.04969252946760318:t[8]>511.50000000000006?t[8]>1146.5000000000002?Ke=.0353146070135579:Ke=-.06327619611098285:Ke=.02813577701641991:Ke=-.12354390728506215:t[34]>1e-35?Ke=-.07664408516055397:t[3]>99.50000000000001?t[1]>16.500000000000004?t[1]>26.500000000000004?Ke=-.01245803535276381:Ke=-.07169472553475001:t[1]>11.500000000000002?Ke=.12989984824561698:Ke=-.01201544398886606:t[6]>91.50000000000001?t[1]>22.500000000000004?Ke=.010390226893521422:t[10]>14.500000000000002?Ke=.16790888126487719:Ke=.010614982228955577:t[4]>79.50000000000001?t[9]>44.50000000000001?t[0]>3853.5000000000005?Ke=-.043398307129729134:Ke=.09963544907820426:t[9]>30.500000000000004?Ke=-.13540713124984502:t[9]>17.500000000000004?Ke=.0509435850590757:Ke=-.04761897852404613:t[4]>78.50000000000001?Ke=.09197086656470652:Ke=.0006771050176682337;let X;t[122]>1e-35?t[6]>36.50000000000001?X=.05686884451670743:X=-.05334759543084309:t[266]>1e-35?X=-.08603579519816038:t[157]>1e-35?X=-.06736746113382097:t[302]>1e-35?t[0]>2579.5000000000005?X=-.0499592651503952:t[0]>725.5000000000001?X=.11780353905132664:X=-.05232097173108943:t[147]>1e-35?t[1]>53.50000000000001?X=-.11398297342629615:t[0]>2604.5000000000005?t[0]>3629.5000000000005?X=-.03190157229022304:X=.07985197845805492:X=-.0763078988943886:t[4]>41.50000000000001?t[280]>1e-35?X=.05162933940904835:t[11]>1e-35?t[0]>460.50000000000006?X=-.027174047777029083:X=.057117284879796476:t[3]>43.50000000000001?X=-.0016147040913107311:X=-.05856597304613519:t[2]>45.50000000000001?t[0]>4663.500000000001?t[18]>1e-35?X=-.04779247091640426:t[10]>25.500000000000004?t[9]>22.500000000000004?t[22]>1e-35?X=-.01466076988151239:X=.13375695925484857:X=-.04885873081899647:t[0]>5566.500000000001?X=.11086813028591343:t[8]>992.5000000000001?X=-.07622304217072383:X=.04316019272026325:t[10]>12.500000000000002?t[9]>36.50000000000001?t[9]>45.50000000000001?X=.03285858361708423:X=-.12354858211764992:X=.0672788301823281:t[15]>1e-35?X=.08658836986585006:X=-.02741484278509758:t[290]>1e-35?X=-.08161310335133287:t[135]>1e-35?X=-.04824156054814152:X=.0009156904299554183;let le;t[3]>7.500000000000001?le=.0006791852818377787:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?le=.03642374718166293:le=.16379973756366603:le=-.03946685266127979:t[186]>1e-35?le=.07618896623420895:t[96]>1e-35?le=.0680272261319657:t[107]>1e-35?t[1]>48.50000000000001?le=-.022822371600847505:le=.0501405836324949:t[203]>1e-35?t[1]>77.50000000000001?le=.044416424920571296:le=-.0648450593196238:t[5]>3921.5000000000005?t[1]>110.50000000000001?le=-.11110466767595227:t[9]>5.500000000000001?t[9]>52.50000000000001?t[1]>50.50000000000001?le=.1061937286809567:t[7]>54.50000000000001?le=.11487507743121311:t[8]>819.5000000000001?le=-.07181278009001418:t[10]>25.500000000000004?le=.13499019430369633:t[1]>31.500000000000004?le=.09032979489780704:le=-.12754166393372374:t[9]>37.50000000000001?le=-.05093963635361407:le=-.005026651151683848:t[9]>2.5000000000000004?le=.07619735785573735:le=.012363301341532136:t[26]>1e-35?le=-.10685800454968203:t[8]>125.50000000000001?t[8]>446.50000000000006?t[0]>3842.5000000000005?le=-.08783796894105043:t[282]>1e-35?t[1]>47.50000000000001?t[9]>40.50000000000001?le=-.10764172927882483:le=.01890760098464703:le=.06573095405846417:t[8]>634.5000000000001?le=-.00783575973273707:le=-.050612689680229306:t[1]>22.500000000000004?le=-.0016842490401359626:le=.0738227088444087:le=-.02663970950432175;let te;t[31]>1e-35?t[8]>17.500000000000004?te=.013678038624884814:t[1]>35.50000000000001?t[1]>51.50000000000001?te=.007191286124908192:te=-.09347881647636902:t[10]>1.5000000000000002?te=.07938758708008091:te=-.008702935600305113:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?te=.12321804057595996:te=-.018281109320672437:t[23]>1e-35?t[4]>62.50000000000001?te=-.04644244754790671:te=.024546310702263208:t[8]>862.5000000000001?t[0]>3429.5000000000005?t[4]>9.500000000000002?t[52]>1e-35?te=.0706108609273337:t[2]>40.50000000000001?te=-.028046629962303716:te=-.06497613993109329:te=.01076489668586676:t[1]>33.50000000000001?t[0]>966.5000000000001?t[2]>14.500000000000002?t[1]>38.50000000000001?te=-.03056331974267756:te=-.11886389712497057:te=.053364962175658184:t[8]>2233.5000000000005?te=-.0448152521157682:te=.1508651602190868:t[2]>33.50000000000001?t[0]>2882.5000000000005?t[0]>3183.5000000000005?te=.03818796510453344:te=.23673992112982362:te=.02858814226507374:t[10]>44.50000000000001?te=-.1125863771551199:te=.009129996952394916:t[1]>7.500000000000001?te=-.004374525302461639:te=-.07858519434925451:t[149]>1e-35?t[6]>23.500000000000004?te=.0005231594491642136:t[0]>4053.5000000000005?t[8]>660.5000000000001?te=-.13677189943034931:t[10]>2.5000000000000004?te=.039591891437078086:te=-.09312596849507347:te=-.02423172142089822:te=.0009836986075266283;let xe;t[189]>1e-35?t[0]>5269.500000000001?xe=-.103183298350443:t[2]>51.50000000000001?xe=.09784373530929913:t[10]>26.500000000000004?t[8]>764.5000000000001?xe=-.05186168947388339:xe=.0496996365539082:t[10]>23.500000000000004?xe=.1404445738719:t[93]>1e-35?xe=.0027146310074558505:t[5]>3821.5000000000005?xe=.002153033152069652:t[4]>2.5000000000000004?xe=.007663539551317215:xe=.13902616832015402:t[298]>1e-35?t[8]>81.50000000000001?t[4]>64.50000000000001?xe=.11498405722487515:t[2]>23.500000000000004?t[0]>2815.5000000000005?t[2]>44.50000000000001?t[4]>42.50000000000001?xe=-.021479467709980358:xe=.09336868994327292:t[1]>22.500000000000004?t[15]>1e-35?xe=.021660293256233334:xe=-.0927396152303864:xe=.0665074081601698:t[0]>1550.5000000000002?xe=.08972407105958534:xe=-.0380796411182682:t[6]>13.500000000000002?t[10]>2.5000000000000004?xe=.06761927942466854:xe=-.015762168112653286:t[17]>1e-35?xe=.10311304131145381:xe=-.017672785252336027:xe=-.08629805732772755:t[1]>24.500000000000004?t[138]>1e-35?xe=-.10638321435298535:xe=.0007073011744385905:t[18]>1e-35?xe=-.027056185501334325:t[145]>1e-35?xe=.023191199677450886:t[9]>33.50000000000001?t[201]>1e-35?xe=.09762140519655171:t[9]>110.50000000000001?xe=-.06581942957595835:t[6]>54.50000000000001?xe=.04959634035251596:xe=.0022616298654554207:xe=-.007437620924990854;let Z;t[179]>1e-35?Z=-.06961998209988884:t[167]>1e-35?t[0]>3928.5000000000005?Z=.1470294450403005:Z=-.01671476793947083:t[187]>1e-35?t[6]>13.500000000000002?t[4]>30.500000000000004?t[13]>1e-35?Z=.07448480853603114:t[0]>1012.5000000000001?t[5]>2883.5000000000005?t[0]>3682.5000000000005?t[5]>4031.5000000000005?t[23]>1e-35?Z=.07965955447707423:t[10]>10.500000000000002?Z=-.09236156404262426:Z=.03396273196231458:Z=-.13246465021467432:Z=.07092822261735353:Z=-.08753829085942:Z=.09409024840640956:t[1]>40.50000000000001?t[8]>984.5000000000001?t[8]>1514.5000000000002?t[8]>2134.5000000000005?Z=.004705878789890202:Z=.13775378964952867:Z=-.04770928980587811:t[10]>29.500000000000004?Z=.011221519891071544:t[0]>3853.5000000000005?Z=.06365381191628273:Z=.15506252245336827:t[1]>37.50000000000001?Z=-.07254777021042061:Z=.026514587757252385:t[308]>1e-35?Z=.04115804816617256:t[10]>26.500000000000004?Z=.02077721353011946:t[5]>3548.5000000000005?Z=-.1280907116663952:Z=-.021974774274438:t[306]>1e-35?Z=-.02700446558079895:t[297]>1e-35?t[212]>1e-35?Z=.07794139136748461:t[7]>5.500000000000001?t[19]>1e-35?Z=-.005710865560475598:t[94]>1e-35?Z=-.06751507982853555:Z=.027250040757588703:t[9]>52.50000000000001?Z=.07060357924595577:Z=-.030297760713011795:Z=-.0006005400085266517;let ae;t[113]>1e-35?ae=-.07311041707507712:t[40]>1e-35?t[0]>1937.5000000000002?ae=-.06996356565314456:ae=.04780211300352931:t[10]>52.50000000000001?t[49]>1e-35?ae=-.08317707559926495:t[21]>1e-35?ae=-.0817284654645976:t[15]>1e-35?t[2]>3.5000000000000004?ae=-.010538203005984922:ae=.08454819465349446:t[9]>124.50000000000001?ae=.09015659250299132:t[7]>15.500000000000002?t[5]>5732.500000000001?ae=-.08542251249346582:t[9]>50.50000000000001?ae=-.023428882537657472:ae=.010042500833979073:ae=.020697210754240154:t[10]>28.500000000000004?t[5]>423.00000000000006?t[148]>1e-35?ae=.03006025206979096:t[9]>108.50000000000001?ae=-.09153851322499747:t[145]>1e-35?t[5]>4814.500000000001?t[2]>38.50000000000001?ae=.04222035773042132:ae=-.09078149053947535:t[8]>568.5000000000001?t[1]>64.50000000000001?ae=-.07209095448054853:ae=.028065954981903313:ae=.08714651929917122:ae=-.006678820669279169:t[10]>40.50000000000001?ae=.006982396294941626:ae=-.07889649792011418:t[94]>1e-35?t[4]>30.500000000000004?ae=-.09351114982645548:t[4]>3.5000000000000004?ae=-.004837550129223451:ae=-.08324141237464677:t[303]>1e-35?ae=.10703037493990825:t[9]>156.50000000000003?ae=-.10803018621648303:t[116]>1e-35?ae=-.03208302566598311:t[212]>1e-35?t[243]>1e-35?ae=.10261721665006701:ae=.018994509090668264:ae=.0011244262442038839;let Ne;t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?Ne=-.08404263465005328:t[0]>3682.5000000000005?Ne=.041259223920298876:t[1]>29.500000000000004?Ne=-.09541257493441671:Ne=.001482192721625409:Ne=.051541427372951004:t[3]>7.500000000000001?t[157]>1e-35?Ne=-.08268996098437432:t[230]>1e-35?Ne=.015749498159959817:t[4]>7.500000000000001?t[3]>11.500000000000002?Ne=-913218977737457e-19:t[4]>10.500000000000002?Ne=-.056334165674005156:t[127]>1e-35?Ne=-.0784634021824036:t[2]>9.500000000000002?t[1]>62.50000000000001?Ne=-.04231200150318989:t[10]>42.50000000000001?Ne=.10182973257894812:Ne=.015934763950068445:Ne=-.03130938805859397:t[92]>1e-35?t[4]>6.500000000000001?t[1]>51.50000000000001?t[9]>19.500000000000004?Ne=-.041117068322885315:Ne=.1167767830037126:Ne=.13611206992387337:t[10]>41.50000000000001?Ne=-.07120286010564107:Ne=.022032788063345417:t[8]>1.5000000000000002?t[1]>51.50000000000001?t[9]>72.50000000000001?Ne=-.07702290997669524:t[198]>1e-35?Ne=.08776558554437136:Ne=-.008290740324975692:t[2]>32.50000000000001?Ne=.07198457624219955:Ne=.005463113714361629:Ne=.09414099512900526:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?Ne=.03295785445437507:Ne=.15140250150674536:Ne=-.035613213948910254:t[186]>1e-35?Ne=.06849425535860769:t[96]>1e-35?Ne=.06028225812727254:Ne=-.007582543288662308;let Y;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Y=.08396556264106572:Y=-.0562516995099192:Y=-.10593011018789432:t[183]>1e-35?t[15]>1e-35?Y=-.09705176473553752:t[7]>18.500000000000004?t[2]>37.50000000000001?Y=.0052017514017035915:Y=-.11194119432743639:Y=.03724337696163019:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?Y=-.025692451287403446:Y=-.09511862672123193:t[8]>1661.5000000000002?t[10]>37.50000000000001?Y=-.11892250746801664:t[10]>22.500000000000004?Y=.07548493166973796:Y=-.05973048107712209:t[4]>12.500000000000002?t[0]>4319.500000000001?t[10]>4.500000000000001?t[10]>37.50000000000001?Y=.13750699058082427:t[18]>1e-35?Y=.06535408879552801:Y=-.054118179035040674:Y=.1344282838979622:t[0]>3982.5000000000005?Y=-.10409582202467015:t[19]>1e-35?Y=.12672850705810795:t[8]>587.5000000000001?t[1]>35.50000000000001?Y=.012705935670766466:Y=.14149359442527545:Y=-.047977876173706004:t[20]>1e-35?Y=.057945228080337946:t[0]>3642.5000000000005?Y=-.008726535792122467:Y=-.08424769891378858:t[34]>1e-35?Y=-.0699329538228602:t[134]>1e-35?t[11]>1e-35?t[4]>15.500000000000002?t[0]>1187.5000000000002?Y=.01196849566739346:Y=.1614642278429876:Y=-.043022338150701625:t[3]>5.500000000000001?Y=-.03907848255033881:Y=.018280601026175593:Y=.0006654540402589085;let ee;t[31]>1e-35?t[2]>58.50000000000001?t[9]>1.5000000000000002?ee=-.01386103677247845:ee=.11386694333005128:t[4]>27.500000000000004?ee=-.021862617610091336:t[2]>31.500000000000004?ee=.0828858469030438:ee=.006483353475830127:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?ee=.11303635767048735:ee=-.01645525128352694:t[23]>1e-35?t[4]>62.50000000000001?ee=-.04238798044549342:ee=.022091190130494303:t[5]>5082.500000000001?ee=-.04287166152163786:t[8]>862.5000000000001?t[19]>1e-35?ee=.000660344696244351:t[4]>9.500000000000002?t[0]>1277.5000000000002?ee=-.04291104140431434:t[17]>1e-35?ee=.11256797532342613:ee=-.017206916368289193:ee=.026482035265709743:t[1]>8.500000000000002?t[11]>1e-35?ee=.04060606971664621:t[0]>4733.500000000001?t[8]>214.50000000000003?t[5]>4814.500000000001?ee=.03581712466863222:ee=.14770264307668884:t[8]>73.50000000000001?ee=-.13093289429740068:ee=.042461737442702936:t[52]>1e-35?ee=.0501831919044939:ee=-.010450249720465756:ee=-.0753365425372656:t[149]>1e-35?t[6]>23.500000000000004?ee=.0005381332165438493:ee=-.04549431717503909:t[133]>1e-35?t[2]>5.500000000000001?t[8]>698.5000000000001?t[282]>1e-35?ee=.04849637311285226:ee=-.036671377119808564:t[0]>421.50000000000006?ee=.00020968499911058945:ee=.11636422423182405:ee=-.12687837788222575:ee=.0012774367867215346;let Ee;t[120]>1e-35?Ee=.04776057572434719:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?Ee=-.042799574885345304:Ee=.07412430171193245:Ee=-.11248270469336048:t[193]>1e-35?Ee=-.060694220820603384:t[121]>1e-35?t[217]>1e-35?t[0]>4449.500000000001?t[4]>8.500000000000002?Ee=.028911612178122104:Ee=.12326369727728437:t[0]>4091.5000000000005?Ee=-.09370267064141052:t[0]>3519.5000000000005?t[8]>668.5000000000001?Ee=.1159839898100149:Ee=-.01924880886585737:t[8]>501.50000000000006?t[10]>16.500000000000004?Ee=-.0216343737351583:Ee=-.1220272260878369:t[2]>18.500000000000004?Ee=.09152924475072398:t[8]>55.50000000000001?Ee=.039508716651005665:Ee=-.11714436880423203:t[18]>1e-35?t[9]>2.5000000000000004?Ee=.06793009902674053:Ee=-.024060578029812988:t[4]>2.5000000000000004?t[2]>16.500000000000004?t[4]>11.500000000000002?Ee=-.04391068849624096:Ee=.04009967593394672:t[8]>1085.5000000000002?Ee=-.024773826356034825:Ee=-.13919707884246582:Ee=.06659278075192335:t[223]>1e-35?t[8]>668.5000000000001?Ee=-.11567917501901476:Ee=-.006813640337684114:t[3]>7.500000000000001?Ee=.0010671269682548076:t[7]>3.5000000000000004?t[1]>33.50000000000001?t[0]>1597.5000000000002?t[10]>1.5000000000000002?Ee=-.001754586408351048:Ee=-.055422422450722056:Ee=-.06090032532532226:t[0]>5269.500000000001?Ee=.11787981735983527:Ee=-.00198119768540783:Ee=.00210412924303036;let Ae;t[294]>1e-35?t[10]>50.50000000000001?Ae=-.09738558653332406:t[0]>2432.5000000000005?t[0]>4533.500000000001?Ae=-.06063239096209816:Ae=.03317022411417386:Ae=-.08607562321324262:t[120]>1e-35?t[4]>18.500000000000004?Ae=-.013608609329298802:Ae=.09078000157330264:t[99]>1e-35?Ae=.014828708581964632:t[10]>52.50000000000001?t[49]>1e-35?Ae=-.07536137260189814:Ae=.006253266595455118:t[10]>28.500000000000004?Ae=-.006106041147592768:t[9]>156.50000000000003?Ae=-.11828932797811101:t[94]>1e-35?Ae=-.02566078479505714:t[303]>1e-35?Ae=.09544850289775349:t[15]>1e-35?t[224]>1e-35?t[4]>56.50000000000001?Ae=-.08401252789168523:t[5]>4244.500000000001?Ae=.026372887658499107:t[1]>16.500000000000004?Ae=-.027836756345634026:Ae=.09205362097909099:Ae=.00934612788718244:t[203]>1e-35?Ae=-.016371658366767253:t[7]>26.500000000000004?t[0]>966.5000000000001?t[1]>38.50000000000001?t[146]>1e-35?t[9]>21.500000000000004?Ae=-.09580979052540028:t[1]>50.50000000000001?Ae=-.06402211827281554:Ae=.08342858760095972:t[2]>36.50000000000001?Ae=.008114897658204584:t[92]>1e-35?Ae=.09541587072672864:Ae=-.022342147210555434:Ae=-.01660492519175128:Ae=.014721622240945446:t[4]>25.500000000000004?t[11]>1e-35?Ae=.15846731118501817:Ae=.039498507912023195:t[245]>1e-35?Ae=.07008718676813333:Ae=.0019806389728814727;let ve;t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[0]>4188.500000000001?ve=-.01192072916082109:ve=.13888590840802637:t[1]>16.500000000000004?t[8]>2302.5000000000005?ve=.06874032717466054:t[4]>40.50000000000001?ve=-.07752510020707537:t[1]>76.50000000000001?ve=-.09944032260703917:t[8]>1381.5000000000002?ve=-.054466635810800745:t[1]>32.50000000000001?ve=.05974084520839573:ve=-.0384718740755954:ve=-.11374190719134032:t[0]>2151.5000000000005?ve=-.13703645155803298:ve=.004833344758654556:t[297]>1e-35?t[212]>1e-35?ve=.06954747264544993:t[7]>9.500000000000002?t[19]>1e-35?t[1]>30.500000000000004?t[0]>4242.500000000001?ve=.013539805885738608:ve=-.0692740641801559:t[0]>2653.5000000000005?t[10]>57.50000000000001?ve=.09941880179344399:ve=-.01608127391210995:ve=.08025226531247417:t[9]>67.50000000000001?ve=.13525448212444113:t[6]>61.50000000000001?ve=-.05511099182158894:t[94]>1e-35?ve=-.06821509831783572:t[128]>1e-35?ve=.11361314817714643:ve=.030160785008575566:t[1]>13.500000000000002?t[8]>17.500000000000004?t[16]>1e-35?ve=-.09954181329804547:t[197]>1e-35?ve=.10102833149755386:t[188]>1e-35?ve=.05584490988313965:t[9]>49.50000000000001?t[4]>5.500000000000001?ve=-.03781554214742005:ve=.09927933385592314:ve=-.020006000056720083:ve=-.10520473615957895:ve=-.12006990846253787:ve=-.00026111570975317574;let We;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[0]>1725.5000000000002?t[7]>14.500000000000002?t[2]>38.50000000000001?We=-.019188245509744628:We=-.13354864350075848:t[0]>2461.5000000000005?We=.051885477468354396:We=-.0833581968852119:We=.08233441701532287:We=-.10865584951212362:t[8]>2992.5000000000005?t[10]>49.50000000000001?t[10]>56.50000000000001?t[1]>45.50000000000001?t[0]>2041.5000000000002?We=.09926337893072812:We=-.027753610497327715:t[0]>1972.5000000000002?We=-.09780045823152517:We=.032380915168504935:We=.11502632261226381:t[17]>1e-35?We=-.06094965899579662:t[10]>40.50000000000001?We=-.07500475582440802:We=.006499832113084677:t[10]>4.500000000000001?t[4]>10.500000000000002?We=-.09584538995220808:We=-.00908705814304442:We=.03203281520813893:t[10]>49.50000000000001?We=-.03146271513986384:t[2]>63.50000000000001?We=.13172001315536286:t[224]>1e-35?We=.08945777550527927:t[0]>2282.5000000000005?t[4]>4.500000000000001?We=.09521549382082259:We=-.04414925613522197:t[0]>1847.5000000000002?We=-.09118580379557353:We=.009206744918282364:t[178]>1e-35?t[2]>25.500000000000004?t[1]>31.500000000000004?We=.03525144509943896:We=-.053340750721609057:t[0]>1057.5000000000002?t[10]>2.5000000000000004?We=-.04766112322938157:t[2]>10.500000000000002?We=.0728516504357201:We=-.05049625965272536:We=-.10868663055825774:We=.0005382613419948969;let Ze;t[147]>1e-35?t[1]>53.50000000000001?Ze=-.10615739288764095:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ze=-.030504020655417463:Ze=.07102458639110094:Ze=-.07058131985243714:t[302]>1e-35?t[10]>47.50000000000001?Ze=.055304563442710876:t[1]>53.50000000000001?Ze=.033723409577443623:t[8]>175.50000000000003?t[0]>2628.5000000000005?t[9]>40.50000000000001?Ze=-.1568835288372895:Ze=-.0279829124400056:Ze=.04493843959601833:Ze=-.11637042729644327:t[191]>1e-35?t[282]>1e-35?Ze=-.054133834303687026:t[9]>48.50000000000001?Ze=.11263810289007213:t[9]>9.500000000000002?Ze=-.02202034562838259:t[4]>45.50000000000001?Ze=-.03410927569045158:Ze=.04381615166534081:t[242]>1e-35?t[0]>3615.5000000000005?t[3]>19.500000000000004?t[1]>56.50000000000001?t[4]>28.500000000000004?Ze=-.029687297407295893:Ze=.10673602850001934:t[4]>42.50000000000001?Ze=.0036275562945108117:Ze=-.0760789221330622:Ze=-.10385623431741903:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Ze=.08274426793676076:Ze=-.07076234425516396:Ze=.13890177606150175:Ze=-.019863286503635686:t[53]>1e-35?t[18]>1e-35?Ze=-.09250637750836187:Ze=-.0031531727902009026:t[2]>107.50000000000001?t[4]>91.50000000000001?t[1]>16.500000000000004?Ze=-.01897867921812603:Ze=.04890781705365262:Ze=-.11569892307597907:t[2]>106.50000000000001?Ze=.09032697440623969:Ze=.00047935919155035045;let vt;t[115]>1e-35?vt=.05338335681275557:t[242]>1e-35?t[0]>3615.5000000000005?t[4]>42.50000000000001?t[4]>75.50000000000001?vt=-.10131179514695865:t[8]>938.5000000000001?vt=.10203729808015481:vt=-.015357944186835289:t[1]>56.50000000000001?t[2]>22.500000000000004?vt=.03574015165562999:vt=-.07763042506449493:vt=-.0813323116215548:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?vt=.0665706259130275:vt=-.06586817559309924:vt=.11925564412287476:vt=-.014170019267143326:t[1]>124.50000000000001?t[2]>30.500000000000004?t[8]>533.5000000000001?t[4]>41.50000000000001?t[8]>977.5000000000001?vt=.046017146627455346:vt=-.08623321630086885:t[8]>1765.5000000000002?vt=-.017990564319859934:t[10]>25.500000000000004?t[10]>48.50000000000001?vt=.11143827902215087:vt=-.01817808730473413:vt=.16980985030210127:vt=-.09357806298740017:t[10]>7.500000000000001?t[10]>54.50000000000001?vt=.010168994879727824:vt=-.09099594488792513:t[9]>1.5000000000000002?vt=.0533459678147928:vt=-.06886854808370108:t[99]>1e-35?t[17]>1e-35?t[9]>22.500000000000004?vt=-.062346959148773695:t[1]>47.50000000000001?vt=-.0021578343835599316:t[2]>27.500000000000004?vt=.19567373210166172:vt=.07851555379116423:t[18]>1e-35?vt=.03711549097804649:t[8]>359.50000000000006?vt=.012492346746905587:t[4]>20.500000000000004?vt=.047511695735697544:vt=-.07999269063948773:vt=6802045404471004e-20;let Nt;t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>2167.5000000000005?t[4]>25.500000000000004?Nt=.0011484728213539738:Nt=-.0936582904650763:t[2]>25.500000000000004?t[8]>182.50000000000003?t[10]>22.500000000000004?t[0]>5026.500000000001?Nt=-.09828874964938798:t[8]>1586.5000000000002?Nt=.13726397438080162:t[4]>48.50000000000001?t[2]>63.50000000000001?Nt=.011938269926919522:Nt=.17541983715953954:t[19]>1e-35?Nt=.023002786011088672:Nt=-.06221461272461431:t[9]>2.5000000000000004?t[0]>3818.5000000000005?Nt=.06508934844183291:Nt=-.10168553534835639:Nt=-.07755626499024171:t[2]>51.50000000000001?t[4]>65.50000000000001?Nt=.021140806225203937:Nt=-.1167833342453639:t[2]>33.50000000000001?Nt=.13163585734056618:Nt=-.00203273890889717:t[10]>36.50000000000001?t[8]>1067.5000000000002?Nt=.06314479201263888:Nt=-.09639088327091713:t[10]>29.500000000000004?Nt=.09225469303582386:t[0]>3129.5000000000005?t[0]>4091.5000000000005?t[0]>4354.500000000001?Nt=40577156464836036e-21:Nt=.12322387121810757:Nt=-.03697224045046014:t[1]>22.500000000000004?Nt=.016474835887320276:Nt=.16919298733903063:Nt=.07633203630214054:Nt=-.047438037934250644:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?Nt=.14150493354700563:Nt=-.01831155354975749:t[1]>28.500000000000004?Nt=-.07952557178685365:t[10]>28.500000000000004?Nt=.0665695554984927:Nt=-.053640139319277094:Nt=.0004754840665898665;let Gt;t[76]>1e-35?Gt=-.06814884255939921:t[179]>1e-35?Gt=-.06325743795510681:t[122]>1e-35?t[6]>36.50000000000001?Gt=.05052338063261613:t[8]>626.5000000000001?t[1]>38.50000000000001?Gt=.004193658608848433:Gt=-.1066968975983452:t[8]>302.50000000000006?Gt=.05476730110440451:Gt=-.06382970920394895:t[218]>1e-35?t[2]>3.5000000000000004?t[6]>13.500000000000002?t[2]>19.500000000000004?t[0]>3200.5000000000005?t[4]>91.50000000000001?Gt=-.12156071809840739:t[9]>21.500000000000004?t[5]>3883.5000000000005?t[8]>919.5000000000001?t[8]>1085.5000000000002?Gt=.013555772109446666:Gt=-.09856116699770784:Gt=.0284329611813383:t[2]>52.50000000000001?Gt=.04008708444763762:t[9]>29.500000000000004?Gt=-.1289599546008197:Gt=-.018566534248335896:t[8]>747.5000000000001?Gt=.02236484980076122:Gt=.1148871655157582:t[8]>3084.0000000000005?Gt=-.05573875952902531:t[10]>17.500000000000004?t[2]>51.50000000000001?Gt=.03164751204281298:Gt=.11752140436184891:t[9]>42.50000000000001?Gt=-.07180559595410106:t[22]>1e-35?Gt=.09325040416256854:Gt=-.016041122807939914:Gt=-.02765708954618808:t[1]>30.500000000000004?t[1]>66.50000000000001?Gt=-.010718250133458515:Gt=.09818827994853763:Gt=.010180038981174032:Gt=-.039472162599295535:t[9]>170.50000000000003?Gt=-.08536729235976731:t[189]>1e-35?t[0]>5269.500000000001?Gt=-.08674788057474031:Gt=.02077653508548371:Gt=-.0003536561382007414;let Qt;t[86]>1e-35?t[10]>6.500000000000001?t[0]>4376.500000000001?Qt=.018337297491457794:Qt=-.05926206443180149:Qt=.024026520855881126:t[288]>1e-35?t[184]>1e-35?Qt=.10747078482128616:t[126]>1e-35?Qt=-.10550625192391357:t[7]>71.50000000000001?Qt=-.07698346027863572:t[8]>302.50000000000006?t[6]>49.50000000000001?t[4]>47.50000000000001?t[1]>38.50000000000001?t[15]>1e-35?Qt=.1317396472229434:Qt=-.025035791351328947:Qt=-.0728334305864372:t[8]>963.5000000000001?Qt=.023642201723096064:Qt=.183010326734258:t[128]>1e-35?Qt=.04228920135648387:t[2]>34.50000000000001?t[15]>1e-35?Qt=.002801782941492993:t[3]>40.50000000000001?t[4]>39.50000000000001?Qt=-.1088876900335281:Qt=.02758317023002635:Qt=-.11886771300807207:t[9]>59.50000000000001?t[1]>33.50000000000001?Qt=-.01928020117446408:Qt=.10193718474139135:t[1]>48.50000000000001?t[4]>9.500000000000002?t[8]>932.5000000000001?Qt=.07893723375925096:Qt=-.009878929627026153:t[10]>2.5000000000000004?t[9]>20.500000000000004?Qt=-.10301657587280551:Qt=.005787463140224318:Qt=.07421364314695046:t[0]>2840.5000000000005?t[10]>29.500000000000004?Qt=-.019296977889522397:Qt=-.07274529751752634:t[1]>30.500000000000004?Qt=-.050368901143148286:Qt=.029630869489466655:t[2]>6.500000000000001?t[4]>9.500000000000002?Qt=.0015332402792773946:Qt=.09930153676749967:Qt=-.06370844564357069:Qt=.00042272155209927616;let ue;t[71]>1e-35?t[4]>17.500000000000004?ue=.12586844370423247:ue=-.006791999603126354:t[222]>1e-35?t[1]>10.500000000000002?t[30]>1e-35?t[1]>36.50000000000001?t[9]>1.5000000000000002?t[10]>25.500000000000004?ue=-.08474891624263797:t[8]>125.50000000000001?ue=.08125086980439704:ue=-.04082085238068532:t[0]>3863.5000000000005?ue=.020481535807469208:ue=.14810819386202126:t[0]>1937.5000000000002?t[2]>16.500000000000004?ue=-.019110200161573936:ue=-.12387719685855114:t[0]>1102.5000000000002?ue=.08376595701957407:ue=-.031821919580524834:t[9]>4.500000000000001?ue=-.08116383486497568:t[7]>8.500000000000002?t[2]>24.500000000000004?ue=-.02154820850475448:t[0]>3863.5000000000005?t[8]>902.5000000000001?ue=.1349841206807871:ue=.011864053595560297:t[1]>41.50000000000001?ue=-.08203662486612544:t[2]>18.500000000000004?ue=-.009541865642346947:ue=.08345043168501759:t[2]>10.500000000000002?ue=-.09585031818030947:ue=.019432330487099865:ue=.08399259524715129:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ue=.11951517733981365:ue=-.016651014735738538:t[1]>28.500000000000004?ue=-.07410922545030711:t[10]>28.500000000000004?ue=.05886430683844788:ue=-.04929626605117184:t[191]>1e-35?t[9]>9.500000000000002?t[9]>48.50000000000001?ue=.04802269879144705:ue=-.026208212831796737:t[4]>45.50000000000001?ue=-.03227476944664786:ue=.05124575625622705:ue=.00020506696916003137;let Be;t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?Be=-.03042091758483443:t[10]>14.500000000000002?Be=.09816619204768777:Be=.01332124067720947:t[8]>8.500000000000002?t[4]>15.500000000000002?Be=-.02381165060401718:Be=-.10950361804974783:Be=.03538211665111128:t[212]>1e-35?t[19]>1e-35?Be=-.09940014650006174:t[0]>2215.5000000000005?t[5]>5056.500000000001?t[3]>5.500000000000001?t[10]>25.500000000000004?Be=-.06371052144380579:Be=.0835500621252692:Be=-.10408255929333915:t[1]>74.50000000000001?Be=.13208968122712403:t[1]>64.50000000000001?Be=-.04778844603644965:t[8]>51.50000000000001?t[8]>201.50000000000003?t[8]>660.5000000000001?t[6]>4.500000000000001?t[9]>5.500000000000001?t[1]>29.500000000000004?t[0]>3830.5000000000005?Be=.09922816902423433:Be=.016366955328796718:Be=.1592412560903584:t[1]>39.50000000000001?Be=.05409467990258923:Be=-.08260633210459611:Be=-.06307205775247567:t[9]>36.50000000000001?Be=.040253940015648144:Be=.14202568969471283:Be=-.028761848341594044:Be=.08994073058773508:t[0]>807.5000000000001?Be=-.043427848826323195:Be=.04573516446846493:t[20]>1e-35?t[188]>1e-35?Be=-.0758877731600639:t[23]>1e-35?Be=.05913923322043199:t[8]>155.50000000000003?t[128]>1e-35?Be=.08124700978741987:Be=.013296063087086852:t[7]>5.500000000000001?Be=-.01640196088612987:Be=-.12685498840146067:Be=-.0004940792382459551;let et;t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?et=-.05584993681929434:t[9]>27.500000000000004?t[0]>3916.5000000000005?et=.08513773825688947:et=-.1184664832315282:et=.05676963535893477:et=.14263843210340613:et=.0005795003292924202:t[18]>1e-35?t[0]>5453.500000000001?t[1]>11.500000000000002?et=-.10669720555606924:et=.029016613003137307:t[2]>46.50000000000001?t[10]>9.500000000000002?et=.0664744575868955:et=-.08469256188890871:et=-.026746678040592144:t[281]>1e-35?et=-.07408427239006925:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?et=.012131807587207655:et=-.12776015795398743:et=.04320472481083551:et=.08390980661550446:t[10]>227.50000000000003?et=-.09771783809101153:t[10]>130.50000000000003?et=.11175201938704937:t[8]>779.5000000000001?t[5]>3325.5000000000005?t[128]>1e-35?et=-.07610698254064358:t[8]>902.5000000000001?et=-.03136381213599649:t[131]>1e-35?et=.0704821739127936:t[224]>1e-35?et=-.056961477774953785:t[10]>30.500000000000004?t[9]>43.50000000000001?et=.10431473040024908:t[8]>841.5000000000001?et=.07304745320500514:et=-.038011541882439825:et=-.01679746695007364:t[0]>3129.5000000000005?et=.05589952587431965:t[210]>1e-35?et=.06227198085800842:et=-.0011341890997947812:t[8]>740.5000000000001?et=.04817300084412584:et=-.000577001010789238;let ut;t[187]>1e-35?t[6]>12.500000000000002?t[10]>8.500000000000002?t[10]>16.500000000000004?t[8]>234.50000000000003?t[4]>43.50000000000001?t[0]>4476.500000000001?ut=-.10504730480402079:t[5]>3341.5000000000005?ut=.11087894671081754:ut=-.0406668834674614:ut=.03308382165616109:t[8]>104.50000000000001?ut=-.10431436764549162:ut=.0073928337244891455:t[4]>34.50000000000001?ut=-.10571751512748416:ut=-.006081128814142983:t[13]>1e-35?ut=.1299673566095023:t[4]>60.50000000000001?ut=-.06587492443829139:t[0]>2604.5000000000005?t[3]>19.500000000000004?ut=.04857126072645073:ut=-.03431365358104773:t[4]>16.500000000000004?ut=.04101865986596709:ut=.16480274980378218:t[10]>26.500000000000004?ut=.03673978504199255:t[10]>9.500000000000002?ut=-.10996402743800027:t[308]>1e-35?ut=.0553693735082498:ut=-.041600136235644125:t[306]>1e-35?t[8]>1156.5000000000002?t[4]>14.500000000000002?t[10]>21.500000000000004?ut=.010902983761213922:ut=.1325118659895645:ut=-.064362945508595:t[1]>66.50000000000001?ut=.033416767779331176:ut=-.054080316225040496:t[42]>1e-35?ut=-.07762364337810815:t[10]>1089.5000000000002?ut=-.08465599849125216:t[31]>1e-35?t[8]>30.500000000000004?ut=.012788520036013586:t[1]>32.50000000000001?t[1]>51.50000000000001?ut=.0220102041325908:ut=-.06516708740003069:ut=.012833498905748267:t[224]>1e-35?ut=-.007038418272997865:ut=.00037666304316290967;let ye;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?ye=.07554189644995735:ye=-.052089349455904946:ye=-.10148206848169845:t[113]>1e-35?ye=-.06666678653225779:t[39]>1e-35?t[9]>3.5000000000000004?t[0]>3670.5000000000005?ye=.07172653627995676:ye=-.07602959317610998:ye=-.08790686271287523:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?ye=-.0399322883690891:ye=.06523495517476098:ye=-.10358715295743802:t[193]>1e-35?ye=-.05551414334329124:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[10]>1.5000000000000002?ye=.015928764772252406:ye=.1341513061552287:ye=-.04975001987586173:t[10]>2.5000000000000004?t[3]>5.500000000000001?t[9]>2.5000000000000004?t[8]>310.50000000000006?ye=-.033592997607280156:ye=-.12432458028446665:t[1]>32.50000000000001?t[217]>1e-35?ye=-.08402551858097379:ye=.017401984506038796:t[1]>25.500000000000004?ye=.13337205393591278:ye=-.01160208350090984:ye=.06708317942315471:t[8]>227.50000000000003?ye=-.08486943882418681:ye=-.013970104864235007:t[8]>4968.500000000001?t[1]>31.500000000000004?t[9]>4.500000000000001?ye=-.10496268177586783:ye=-.020921489532370493:ye=.02629915927247642:t[7]>20.500000000000004?t[8]>251.50000000000003?t[115]>1e-35?ye=.11639296062157028:ye=-.004275784356569115:t[32]>1e-35?ye=-.07297384970166025:ye=.006026841626381599:ye=.002034611134960428;let Le;t[248]>1e-35?Le=.06091438745093315:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?Le=-.06455513326540585:t[1]>29.500000000000004?Le=.07718474591552532:t[4]>7.500000000000001?Le=.040139336931404826:Le=-.09685734690563386:Le=.00015327283570347363:t[9]>88.50000000000001?Le=.10079017954199324:t[1]>47.50000000000001?t[2]>20.500000000000004?t[2]>27.500000000000004?Le=-.04077257804338707:Le=.0739963982640615:t[9]>1.5000000000000002?t[17]>1e-35?Le=.03778141591008941:Le=-.06459919920634845:Le=-.11193190957880604:t[7]>6.500000000000001?t[11]>1e-35?t[18]>1e-35?Le=.14063930759326346:t[0]>179.50000000000003?Le=.07287482250668585:t[8]>1180.5000000000002?Le=-.14419393112726253:t[10]>28.500000000000004?Le=-.07993142770099469:t[17]>1e-35?Le=-.04702595410391655:t[7]>21.500000000000004?t[2]>26.500000000000004?Le=.05527969663610186:Le=-.10824385941441346:t[3]>11.500000000000002?Le=.12358502961047915:Le=-.017509147119622873:t[0]>74.50000000000001?Le=-.014907705458730486:t[8]>95.50000000000001?Le=-.02225118168342062:Le=-.1222374623708485:t[8]>1.5000000000000002?t[8]>950.5000000000001?Le=.06946188930925638:t[3]>6.500000000000001?t[10]>2.5000000000000004?t[19]>1e-35?Le=.04962819555610421:Le=-.07213577821855309:Le=.09139529824708481:t[19]>1e-35?Le=.013439401088345224:Le=-.049274647207292056:Le=.10531673719686951;let $e;t[40]>1e-35?t[0]>1937.5000000000002?$e=-.06421671152073961:$e=.04235421241226177:t[294]>1e-35?t[10]>50.50000000000001?$e=-.09100102290316286:t[0]>3030.5000000000005?t[0]>4177.500000000001?$e=-.03520420769287065:t[8]>1085.5000000000002?$e=-.019817352506127633:$e=.11444439424520964:$e=-.06854631664538167:t[120]>1e-35?t[4]>18.500000000000004?$e=-.010490117519863269:$e=.08104430117757461:t[121]>1e-35?t[243]>1e-35?$e=.16408304891242204:t[217]>1e-35?t[0]>4449.500000000001?$e=.06619344145920268:t[0]>4091.5000000000005?$e=-.08813353450871053:t[0]>3519.5000000000005?t[8]>668.5000000000001?$e=.10016091391222309:$e=-.017407607199427293:t[8]>501.50000000000006?t[10]>16.500000000000004?$e=-.019511460451434884:$e=-.11643672465055221:t[2]>18.500000000000004?$e=.07848228087333317:t[8]>55.50000000000001?$e=.032583027899956235:$e=-.11209832692153521:t[11]>1e-35?$e=.027482174104412567:t[10]>1.5000000000000002?t[6]>26.500000000000004?t[4]>19.500000000000004?t[9]>31.500000000000004?$e=-.09996887746328006:t[9]>2.5000000000000004?$e=.02157682011863397:$e=-.05247727848991843:$e=.07409150201483244:t[1]>38.50000000000001?$e=-.11378466075449625:t[224]>1e-35?$e=-.10741749127732923:t[1]>26.500000000000004?$e=.07343136534146562:$e=-.07013573628594773:t[25]>1e-35?$e=-.04626669734164317:$e=.05518333197956482:$e=.00032434010867555516;let rt;t[183]>1e-35?t[10]>1.5000000000000002?t[17]>1e-35?rt=.026313251010808853:rt=-.08997339150292381:rt=.025062509535227952:t[227]>1e-35?t[1]>6.500000000000001?t[2]>9.500000000000002?t[210]>1e-35?rt=.08071107515789745:t[23]>1e-35?t[1]>75.50000000000001?rt=.0905155504503746:t[8]>1049.5000000000002?rt=-.062312558183394054:t[8]>719.5000000000001?rt=.09583836191410239:t[0]>3719.5000000000005?rt=-.0778097309430818:rt=.04012012419054895:t[4]>12.500000000000002?t[8]>1496.5000000000002?t[10]>42.50000000000001?rt=-.12920865648544927:t[0]>2699.5000000000005?rt=-.07086587879041864:rt=.022614182502461846:t[4]>15.500000000000002?t[8]>55.50000000000001?t[1]>60.50000000000001?t[8]>652.5000000000001?rt=-.11377786322600797:rt=-.009486325820117998:t[1]>55.50000000000001?rt=.12430248795958142:t[0]>2952.5000000000005?t[0]>4331.500000000001?t[1]>38.50000000000001?rt=-.07938291201004219:t[2]>36.50000000000001?rt=.01520046732530246:rt=.13649854049662832:rt=-.07145015938528873:t[8]>407.50000000000006?rt=-.00350257360822279:rt=.11332047082193297:rt=-.10060624458629897:rt=.05429496612497562:t[8]>1446.5000000000002?rt=.006073419197482838:rt=-.08718676350883998:rt=-.11532497988252638:rt=.10766270463068293:t[34]>1e-35?rt=-.06345912440611544:t[131]>1e-35?t[9]>1.5000000000000002?rt=-.0004109812623829506:rt=.021601073497455662:rt=-7343540098965853e-20;let ot;t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?ot=-.06107663265515864:t[9]>70.50000000000001?t[10]>37.50000000000001?ot=.05995640200798119:t[0]>3443.5000000000005?ot=-.14698883458733583:ot=-.030039164579240187:t[189]>1e-35?ot=-.06086763220538141:t[1]>86.50000000000001?ot=-.05096727866142538:t[4]>64.50000000000001?ot=.11240554253834577:t[4]>45.50000000000001?ot=-.030279760168394117:t[6]>45.50000000000001?ot=.10161088917815142:t[10]>77.50000000000001?ot=-.0792333078055653:t[7]>23.500000000000004?t[0]>2882.5000000000005?ot=-.06672020005240323:ot=.08831457502630258:t[8]>2592.5000000000005?ot=-.052617701047376654:t[10]>29.500000000000004?ot=.08499327690298047:t[2]>12.500000000000002?t[9]>41.50000000000001?ot=.12880460816709416:t[9]>25.500000000000004?t[4]>11.500000000000002?ot=-.064099222705728:ot=.044332487521538365:t[0]>2882.5000000000005?ot=.031099546885005065:ot=.12938467051623853:t[0]>4221.500000000001?ot=-.0928676413498701:t[9]>30.500000000000004?ot=-.05781824812803708:ot=.07561268901778094:t[8]>711.5000000000001?t[2]>22.500000000000004?ot=-.06648105454098469:ot=.05985487552383097:ot=-.13070190291919334:t[116]>1e-35?t[10]>38.50000000000001?ot=.05282385499619401:t[1]>66.50000000000001?ot=.048802929108006314:t[2]>4.500000000000001?t[0]>4593.500000000001?ot=.027885690791379255:ot=-.08407126408362446:ot=.014432924125571093:ot=-9903435845205118e-20;let ft;t[76]>1e-35?ft=-.06307875292162934:t[21]>1e-35?t[7]>10.500000000000002?t[10]>4.500000000000001?t[8]>944.5000000000001?t[0]>3655.5000000000005?ft=.013633653464240465:ft=-.10164319411983509:ft=-.1228424374328996:t[1]>26.500000000000004?t[2]>28.500000000000004?ft=.00632864847804078:ft=-.08393000368134668:ft=.07870508617440916:t[284]>1e-35?ft=.1092302727710421:ft=-.0025505047582483234:t[248]>1e-35?ft=.07101822393621864:t[274]>1e-35?ft=-.06621099406425579:t[1]>26.500000000000004?t[1]>28.500000000000004?ft=.0003077044909372931:t[10]>2.5000000000000004?t[0]>3770.5000000000005?ft=.025081789181021243:ft=-.014813325803582618:t[9]>33.50000000000001?ft=-.033466921233840194:t[3]>12.500000000000002?t[23]>1e-35?ft=.11926990418060353:ft=.01852125513565268:ft=.0975367595927343:t[5]>3325.5000000000005?t[8]>892.5000000000001?t[133]>1e-35?ft=-.1178464984373743:t[283]>1e-35?ft=.043370859226927405:t[5]>4320.500000000001?ft=-.01103141226366587:t[8]>1104.5000000000002?ft=-.023053423988095886:ft=-.0734238953804657:t[6]>18.500000000000004?t[8]>85.50000000000001?ft=.000579145585864887:ft=.03389152834202143:t[128]>1e-35?ft=-.14527722052568462:t[210]>1e-35?ft=-.08915971541902741:t[7]>9.500000000000002?ft=-.03307314577076116:t[18]>1e-35?ft=-.05521712302023565:ft=.009315605032770029:ft=.0036332551852289933;let z;t[0]>689.5000000000001?t[5]>768.5000000000001?t[20]>1e-35?t[5]>4368.500000000001?z=-.07583539600416284:t[188]>1e-35?z=-.07042659515500142:t[23]>1e-35?t[0]>3807.5000000000005?z=-.011038193049597113:z=.08154028164397753:t[1]>85.50000000000001?z=.10259361975201933:z=.011640408330521594:z=-.00023319159023748508:t[92]>1e-35?z=.13771692859530546:z=.022860029819654806:t[1]>22.500000000000004?t[1]>24.500000000000004?t[2]>96.50000000000001?z=.09967230141007705:t[30]>1e-35?z=-.08888529037551285:z=-.008615931385397808:t[10]>5.500000000000001?t[4]>36.50000000000001?z=.08284665960761373:z=-.029292565021289504:t[7]>7.500000000000001?z=-.09945093355204493:z=-.008381393701708593:t[20]>1e-35?z=-.04218678460370465:t[10]>6.500000000000001?t[9]>2.5000000000000004?t[1]>13.500000000000002?t[8]>143.50000000000003?t[4]>7.500000000000001?t[2]>36.50000000000001?z=.07585582641438211:t[8]>284.50000000000006?z=-.029387993239886723:z=.07716738177321587:t[1]>18.500000000000004?z=.026745348497993746:z=.1427429617069753:t[9]>16.500000000000004?t[9]>33.50000000000001?z=.02337306890530338:z=-.10390355904767366:z=.07390521199638532:z=-.06788247515155237:z=-.04201446383470994:t[2]>25.500000000000004?t[2]>29.500000000000004?t[8]>227.50000000000003?z=-.06360325615644084:z=.04342192339836601:z=-.10598779152030145:z=.05253384605768211;let se;t[3]>7.500000000000001?t[157]>1e-35?se=-.07514182877923786:se=.000636205502279271:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?se=.028692053800951845:se=.14081686716133598:se=-.03316566526940354:t[186]>1e-35?t[0]>2653.5000000000005?se=.0037139292567243084:se=.12662311031652707:t[107]>1e-35?t[0]>612.5000000000001?se=.01202688580305612:se=.0993509141454483:t[203]>1e-35?t[1]>77.50000000000001?se=.043935495082738626:se=-.05639305759669704:t[247]>1e-35?se=-.06770766046891649:t[105]>1e-35?t[19]>1e-35?se=.10331836202616368:se=.0006926658459781341:t[96]>1e-35?se=.05361846065599475:t[127]>1e-35?t[0]>2723.5000000000005?t[1]>54.50000000000001?se=-.0741403257305367:se=.022900127535540854:t[7]>3.5000000000000004?se=.038110741403836294:se=.14618649985842758:t[5]>3921.5000000000005?t[1]>110.50000000000001?se=-.09552842289807008:t[1]>27.500000000000004?se=.012505935885798007:se=-.020509603428689526:t[282]>1e-35?t[9]>45.50000000000001?t[6]>5.500000000000001?se=-.1046104767723845:se=.031388606992301074:t[8]>114.50000000000001?t[9]>17.500000000000004?t[9]>22.500000000000004?t[1]>32.50000000000001?se=.023466328488582572:se=.11730925774586994:se=-.04771965631104874:se=.17059689880751394:se=-.08181850955999449:t[26]>1e-35?se=-.12727482696678769:se=-.014343123272734182;let Ce;t[147]>1e-35?t[1]>53.50000000000001?Ce=-.0993064321015924:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ce=-.02763546051134888:Ce=.06423344777499343:Ce=-.064606430904295:t[302]>1e-35?t[10]>2.5000000000000004?t[10]>47.50000000000001?Ce=.049825139823021586:t[7]>22.500000000000004?Ce=-.01131680751379858:t[0]>2579.5000000000005?Ce=-.10673674485369694:Ce=-.015387212937189957:Ce=.04347325151148724:t[179]>1e-35?Ce=-.05788885608624092:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Ce=.0650355590939066:Ce=-.0473332870892226:Ce=-.09699315983340703:t[288]>1e-35?t[88]>1e-35?Ce=.11139543329789044:t[126]>1e-35?Ce=-.09726928633696198:t[8]>149.50000000000003?t[9]>46.50000000000001?t[4]>1.5000000000000002?t[8]>1861.5000000000002?Ce=.06370903833231022:t[10]>29.500000000000004?Ce=.03415223859607161:t[10]>3.5000000000000004?Ce=-.07415518117873297:Ce=-.0014119203473324082:Ce=.12617652343819508:t[9]>41.50000000000001?Ce=-.10311145857176976:t[8]>2757.5000000000005?Ce=-.08106484219011428:t[7]>71.50000000000001?Ce=-.09783384432091176:t[1]>88.50000000000001?Ce=.06249739709782831:t[3]>9.500000000000002?t[5]>1601.5000000000002?Ce=-.008884084501608536:Ce=.061339437777743616:Ce=-.042490992675121846:t[2]>6.500000000000001?t[3]>10.500000000000002?Ce=.01526664064166223:Ce=.13534828515415498:Ce=-.06985484465894776:Ce=.0005758961943178744;let we;t[86]>1e-35?t[1]>23.500000000000004?t[1]>29.500000000000004?t[4]>16.500000000000004?t[2]>31.500000000000004?we=-.029152732370514342:we=.07173628916139178:t[1]>36.50000000000001?we=-.08859111297255318:we=.0018030071815630785:we=.13652461563759322:we=-.07550137680349367:t[10]>52.50000000000001?t[49]>1e-35?we=-.07145140450454163:t[21]>1e-35?we=-.07422841663493233:we=.006289319702780104:t[10]>40.50000000000001?t[9]>59.50000000000001?t[19]>1e-35?t[13]>1e-35?we=.11864240653986852:t[3]>33.50000000000001?we=-.08821209591953476:we=.05706392280054726:we=-.03600088051578915:t[18]>1e-35?t[1]>24.500000000000004?we=.01953613016837112:we=-.059781039130025006:t[148]>1e-35?we=.052668447861325476:t[3]>30.500000000000004?t[9]>49.50000000000001?we=.07207826841738371:t[202]>1e-35?we=.08163917539410503:we=-.01319846363832958:t[9]>35.50000000000001?t[5]>4134.500000000001?t[10]>44.50000000000001?we=-.06858280496900336:we=-.1781828899516648:we=-.04024620133969553:t[9]>10.500000000000002?t[1]>22.500000000000004?t[1]>37.50000000000001?we=.018232649414147116:we=-.04419781124222661:we=.05145485182416554:t[1]>23.500000000000004?t[0]>655.5000000000001?t[5]>4901.500000000001?t[10]>45.50000000000001?we=.11452368095776105:we=-.036496437259924026:we=-.040445338739465486:we=.0816572651001145:we=-.08968914517368663:we=.0002826343082585516;let je;t[189]>1e-35?t[0]>5269.500000000001?je=-.08839493050459957:t[10]>85.50000000000001?je=.10046908365702462:t[8]>2592.5000000000005?je=-.09632233975926387:t[8]>2000.5000000000002?je=.10282992953871627:t[8]>1266.5000000000002?t[9]>34.50000000000001?je=.035504970430426296:t[1]>31.500000000000004?je=-.1133764813142531:je=-.01138280942244812:t[8]>1125.5000000000002?je=.09800530246229806:je=.016170419267589393:t[218]>1e-35?t[9]>99.50000000000001?t[9]>101.50000000000001?t[9]>124.50000000000001?je=.07316772160107896:je=-.059095014819051765:je=.17859437315769733:t[2]>1.5000000000000002?t[9]>86.50000000000001?je=-.09150209066166894:t[8]>3084.0000000000005?je=-.05443972593168094:t[1]>65.50000000000001?t[10]>11.500000000000002?t[9]>33.50000000000001?je=-.04449234460408263:je=.05568837973347338:je=-.12362324875024472:t[1]>41.50000000000001?t[10]>12.500000000000002?t[8]>1336.5000000000002?je=.12741077850267066:je=.007372371864985329:t[2]>39.50000000000001?je=.02295917234617787:je=.14966532083907075:t[1]>39.50000000000001?je=-.06685557815340279:t[10]>22.500000000000004?t[2]>52.50000000000001?je=-.02511861881285652:t[1]>27.500000000000004?je=.08683660011672288:je=.02956214835267301:t[9]>15.500000000000002?je=-.016538805462996232:je=.04352738094981517:je=-.05561856645643868:t[9]>170.50000000000003?je=-.07996752635874248:t[179]>1e-35?je=-.09065975936933919:je=-.00042817975060427177;let Ye;t[39]>1e-35?t[4]>25.500000000000004?Ye=.03443173196222934:Ye=-.06554248341270724:t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[4]>86.50000000000001?Ye=-.0013415395759330318:Ye=.12950978489563347:t[1]>22.500000000000004?t[10]>19.500000000000004?t[4]>30.500000000000004?t[9]>41.50000000000001?Ye=.002297618040307216:Ye=-.12522800128774994:t[4]>8.500000000000002?t[8]>1075.5000000000002?Ye=-.015297257305397608:Ye=.09651828834062742:Ye=-.06636003334371929:t[10]>11.500000000000002?Ye=.17631616138309397:t[0]>1639.5000000000002?Ye=3804386478092585e-20:Ye=-.09099296398683193:Ye=-.06874415876172972:t[0]>2151.5000000000005?Ye=-.1311264883406766:Ye=.00809052010141122:t[253]>1e-35?Ye=-.06338558211939296:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?t[10]>10.500000000000002?t[0]>3615.5000000000005?Ye=.045038497754638605:Ye=-.07770167665661752:Ye=-.08596294280650517:Ye=.08538655727027213:Ye=.09829076418590559:t[1]>39.50000000000001?t[9]>1.5000000000000002?Ye=.054627956617973275:t[1]>61.50000000000001?Ye=-.11994465088415499:t[4]>8.500000000000002?Ye=.06676200239406452:Ye=-.027503148069376867:t[8]>676.5000000000001?Ye=-.10363964928357075:t[4]>8.500000000000002?Ye=-.07589816227175682:Ye=.034664436544646814:t[1]>159.50000000000003?t[6]>25.500000000000004?Ye=.009093153189012338:Ye=-.06119765876605404:Ye=.0004668642103528348;let gt;t[223]>1e-35?t[1]>31.500000000000004?t[8]>711.5000000000001?gt=-.10100794502567233:gt=.08000205636470442:gt=-.11945419826856896:t[113]>1e-35?gt=-.06105445938688056:t[167]>1e-35?t[0]>3928.5000000000005?gt=.1224302423880318:gt=-.01875566982911468:t[222]>1e-35?t[1]>8.500000000000002?t[1]>24.500000000000004?t[4]>3.5000000000000004?t[0]>725.5000000000001?t[0]>1682.5000000000002?t[0]>2860.5000000000005?gt=.0019277012166729114:t[1]>28.500000000000004?gt=-.054445821715687494:gt=.045645722976713245:t[30]>1e-35?gt=.13402660155331655:gt=.008921176001777645:gt=-.058547426505451076:gt=.08841202222426625:t[1]>22.500000000000004?t[10]>9.500000000000002?gt=-.13526418192218206:gt=-.03266013432583145:t[1]>20.500000000000004?t[4]>27.500000000000004?gt=.0007263224246135398:gt=.12450043268647056:t[1]>17.500000000000004?t[9]>1.5000000000000002?gt=-.11575657261278308:gt=-.01530376565862095:t[4]>13.500000000000002?t[4]>22.500000000000004?gt=-.01995960178292952:gt=.11216586049153021:gt=-.10050961087149474:gt=.08848063368485726:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?gt=.10303451081526649:gt=-.01375730267020699:t[1]>28.500000000000004?t[2]>20.500000000000004?gt=-.043799548968209395:gt=-.12451444314954115:t[4]>12.500000000000002?gt=-.03838117361958468:gt=.06504990789767144:t[57]>1e-35?gt=.06890006938293915:gt=.0003914274695562949;let xt;t[53]>1e-35?t[4]>11.500000000000002?t[8]>617.5000000000001?t[2]>41.50000000000001?xt=.004271749009686975:xt=-.10523878297127605:xt=.04633982158107851:xt=-.10349713975483057:t[183]>1e-35?t[15]>1e-35?xt=-.08655730561951676:t[8]>919.5000000000001?xt=-.0676453705610183:t[7]>18.500000000000004?xt=-.027787974193650575:xt=.08012784576991301:t[227]>1e-35?t[1]>6.500000000000001?t[3]>8.500000000000002?t[210]>1e-35?xt=.07185850683316512:t[8]>201.50000000000003?t[8]>348.50000000000006?t[23]>1e-35?t[8]>1049.5000000000002?xt=-.03473877164537313:t[8]>719.5000000000001?xt=.10471053866934404:xt=.008236107678382981:t[4]>57.50000000000001?xt=.09412219478825269:t[10]>66.50000000000001?xt=-.13884338641811986:t[10]>19.500000000000004?t[10]>22.500000000000004?t[0]>2490.5000000000005?xt=-.040681323751002293:xt=.06374650297561021:xt=.12884615227401788:t[10]>5.500000000000001?xt=-.0887517295786972:t[8]>597.5000000000001?t[18]>1e-35?xt=-.05474068967150784:xt=.03744700650806603:xt=-.07846396348680855:t[1]>42.50000000000001?xt=.018972315810821302:xt=.10953621007604744:t[5]>4439.500000000001?xt=.010999776705494586:t[1]>40.50000000000001?xt=-.12394200059775967:t[10]>2.5000000000000004?xt=.013528093962849453:xt=-.09222088417048682:xt=-.12662967149701485:xt=.09327296405849603:t[3]>99.50000000000001?xt=-.013581954439986752:xt=.0005526498251862075;let Bt;t[187]>1e-35?t[243]>1e-35?Bt=-.08392792551692502:t[10]>68.50000000000001?Bt=.07871769409454053:t[10]>8.500000000000002?t[10]>16.500000000000004?t[2]>17.500000000000004?t[3]>31.500000000000004?t[91]>1e-35?t[10]>21.500000000000004?t[10]>33.50000000000001?t[10]>48.50000000000001?Bt=-.0825306209711224:Bt=.049559996084532945:Bt=-.1064938580886302:Bt=.03353240732240275:Bt=.045985370399163464:t[1]>42.50000000000001?t[4]>20.500000000000004?Bt=.16966001471529374:t[1]>57.50000000000001?Bt=-.005772777673676247:Bt=.09383677041525058:t[8]>747.5000000000001?Bt=.054068175469351235:Bt=-.049968216310277036:t[8]>753.5000000000001?Bt=-.0679383555784074:t[4]>8.500000000000002?Bt=-.059757341189735386:Bt=.05701083682780414:Bt=-.052497281448921164:t[6]>12.500000000000002?t[8]>969.5000000000001?t[4]>23.500000000000004?Bt=.05820296128730006:Bt=-.1063042385102475:t[1]>49.50000000000001?t[8]>302.50000000000006?Bt=.15340611616954566:Bt=.04385036188666874:t[0]>4449.500000000001?Bt=-.02110897605541555:t[1]>24.500000000000004?t[2]>17.500000000000004?Bt=.004840354641006495:Bt=.09967827580276283:Bt=.11605363537391578:t[9]>19.500000000000004?Bt=-.0735831692725717:Bt=.019973331823355176:t[306]>1e-35?t[149]>1e-35?Bt=-.08968948874343531:t[8]>1094.5000000000002?t[10]>15.500000000000002?Bt=-.02442182361342386:Bt=.10334853004243093:Bt=-.030431948680167104:Bt=-956078595250818e-19;let Ct;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4078.5000000000005?Ct=-.040232505718244854:t[0]>3030.5000000000005?Ct=.0634109586813073:Ct=-.04043617034245621:Ct=-.06385323610738443:t[120]>1e-35?t[4]>18.500000000000004?Ct=-.007859096946435131:Ct=.07282728486115758:t[229]>1e-35?t[0]>2952.5000000000005?t[17]>1e-35?Ct=.05515771679628051:Ct=-.04214471312668263:Ct=-.09589322222261765:t[193]>1e-35?Ct=-.05056345906812831:t[121]>1e-35?t[243]>1e-35?Ct=.14857706653119385:t[4]>9.500000000000002?t[1]>26.500000000000004?t[2]>59.50000000000001?Ct=-.08152604001147906:t[11]>1e-35?Ct=.09132936522356462:t[15]>1e-35?t[4]>23.500000000000004?Ct=.13100930780107503:t[10]>25.500000000000004?Ct=.05921074710011526:Ct=-.07226005736695183:t[0]>3304.5000000000005?t[0]>3707.5000000000005?t[0]>4053.5000000000005?Ct=.0009447118243153454:Ct=-.09820565036865991:Ct=.057146909749745546:t[0]>2115.5000000000005?Ct=-.12331216726611678:Ct=.007281983677694285:t[2]>56.50000000000001?Ct=.012310154675612615:Ct=-.08873665774670461:t[6]>25.500000000000004?Ct=.134708740821879:t[9]>5.500000000000001?Ct=-.0805901581148979:t[224]>1e-35?Ct=-.063684477784257:t[7]>2.5000000000000004?t[19]>1e-35?Ct=.10842593386554122:t[2]>13.500000000000002?Ct=.06466798320378395:Ct=-.08578130788886655:Ct=-.03590892078300114:Ct=.0003499894043880708;let Ie;t[134]>1e-35?t[6]>50.50000000000001?t[0]>3601.5000000000005?Ie=.10839808814624702:Ie=-.028043875308180352:t[7]>30.500000000000004?t[8]>932.5000000000001?Ie=-.007478368069393829:Ie=-.09066751344326617:t[0]>3588.5000000000005?t[5]>4748.500000000001?Ie=.04035247751736232:t[0]>4255.500000000001?Ie=-.1310865624507367:t[0]>4004.5000000000005?Ie=.06647367311982634:Ie=-.08339693352955757:t[4]>10.500000000000002?t[1]>34.50000000000001?Ie=-.011618902907510411:Ie=.1114646660406691:t[10]>2.5000000000000004?t[0]>3072.5000000000005?Ie=.09356028223727986:Ie=-.03811765057032162:Ie=-.09456215497345526:t[280]>1e-35?t[7]>70.50000000000001?Ie=.10322956436499003:t[2]>22.500000000000004?t[1]>83.50000000000001?Ie=.1146142460964847:t[1]>62.50000000000001?Ie=-.09679869865322362:t[9]>71.50000000000001?Ie=-.07377580769927583:t[4]>19.500000000000004?t[0]>4571.500000000001?Ie=-.039046426387852974:Ie=.04558778688367152:Ie=.11220830937352602:t[7]>5.500000000000001?t[9]>17.500000000000004?t[8]>1067.5000000000002?Ie=.03261697816211156:t[15]>1e-35?Ie=.02586252542264368:t[2]>14.500000000000002?Ie=-.016420452667484604:Ie=-.1011799626006976:Ie=-.13787471318963773:t[6]>4.500000000000001?t[8]>427.50000000000006?t[10]>36.50000000000001?Ie=.010193588102560583:Ie=.11748729525930773:Ie=-.04468162226743652:Ie=-.028365274393617957:t[71]>1e-35?Ie=.05115139346588793:Ie=-.0001510425316936658;let K;t[298]>1e-35?t[8]>81.50000000000001?t[8]>119.50000000000001?t[4]>64.50000000000001?K=.09072192054181037:t[9]>72.50000000000001?t[8]>1094.5000000000002?K=.020637047900190317:K=-.1017300802134141:t[1]>23.500000000000004?t[9]>12.500000000000002?t[0]>2815.5000000000005?t[0]>3183.5000000000005?t[3]>23.500000000000004?t[3]>45.50000000000001?t[4]>48.50000000000001?K=-.04632587527094407:K=.08603684785510396:K=-.05101401015448496:K=.025466432054358498:K=-.07897811963329214:t[6]>13.500000000000002?t[10]>26.500000000000004?K=.020385355430046367:K=.12032592051335252:K=-.012387370292173013:t[2]>23.500000000000004?K=-.12568545484492677:K=-.022261190943521976:t[8]>634.5000000000001?t[8]>857.5000000000001?K=.043528764484784536:K=.14352071657196003:K=-.009332833816977268:K=.11186782227735846:K=-.0737365712425554:t[136]>1e-35?t[0]>1937.5000000000002?K=-.05649104643152564:K=.03884200719305747:t[42]>1e-35?K=-.07191700385792335:t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?K=-.04103416502526736:K=.04881823954656287:t[4]>15.500000000000002?K=.009342724662897898:t[0]>3969.5000000000005?K=-.025637309961309498:K=-.12574492012987865:t[212]>1e-35?t[19]>1e-35?K=-.08185697075265091:t[0]>2215.5000000000005?K=.030063975892297354:t[0]>807.5000000000001?K=-.03924325550733229:K=.0415330999189793:K=-.00024374664461674863;let pe;t[3]>7.500000000000001?pe=.0005117490419655908:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?pe=.025798416259686565:pe=.13251610353146012:pe=-.029900559552677654:t[1]>81.50000000000001?t[1]>110.50000000000001?t[0]>4242.500000000001?pe=-.11098564237775424:pe=25960925309712775e-21:t[0]>4177.500000000001?t[9]>35.50000000000001?pe=.15347826616466054:t[3]>4.500000000000001?pe=.10379320730958941:pe=-.008896303020010654:t[0]>3415.5000000000005?t[0]>3830.5000000000005?pe=.03159791088468647:pe=-.10612873364104258:pe=.05059856107348746:t[133]>1e-35?t[2]>5.500000000000001?pe=-.02335760775001469:pe=-.1379386577903324:t[1]>62.50000000000001?t[3]>2.5000000000000004?pe=-.011164334474672973:pe=-.06594044410501655:t[207]>1e-35?pe=-.1014214372326535:t[8]>3.5000000000000004?t[107]>1e-35?t[2]>6.500000000000001?pe=-.01725821503981916:pe=.05594086838700241:t[203]>1e-35?t[1]>44.50000000000001?t[1]>51.50000000000001?pe=-.04226531631656534:pe=-.14409800530171432:pe=-.03245576341206398:t[8]>4214.500000000001?pe=.0895409165534886:t[247]>1e-35?pe=-.06506383629143335:t[118]>1e-35?pe=-.07214270121257443:t[8]>546.5000000000001?pe=-.004385020865473831:pe=.009321812545248529:t[0]>1639.5000000000002?t[13]>1e-35?pe=.046278501133958524:pe=-.030835570926968044:t[0]>493.50000000000006?pe=-.12794504651610425:pe=.009415039807550776;let me;t[304]>1e-35?me=-.04717777269217453:t[76]>1e-35?me=-.05813439142128324:t[1]>59.50000000000001?t[0]>350.50000000000006?t[53]>1e-35?me=-.09648224457374217:t[132]>1e-35?me=.07089308107910267:t[0]>2248.5000000000005?t[5]>2525.5000000000005?t[9]>1.5000000000000002?t[114]>1e-35?me=-.08595213071749083:t[9]>14.500000000000002?t[9]>33.50000000000001?t[285]>1e-35?me=.10838431695638147:t[230]>1e-35?me=.06458713915750626:t[0]>3219.5000000000005?t[3]>23.500000000000004?t[9]>69.50000000000001?me=.050071316251979:me=-.006356941111525215:t[6]>8.500000000000002?me=-.0384814076434817:t[1]>73.50000000000001?t[0]>3746.5000000000005?me=.10217402850540398:me=-.048840949025349197:me=-.03668313197909846:t[7]>39.50000000000001?me=-.0562642841496003:t[10]>2.5000000000000004?me=.09749777369987417:me=-.04848223121417616:t[0]>5453.500000000001?me=.08316648226133942:me=-.0261979698267618:t[212]>1e-35?me=.09565573198318654:t[5]>4814.500000000001?t[8]>963.5000000000001?t[8]>1514.5000000000002?me=.04837009746506856:me=-.09184360565631328:me=.0032411047845613606:t[0]>4733.500000000001?me=.0977378556864798:me=.010776545559325588:me=-.012483310473120218:me=-.049284121449103935:me=.011962641341789565:t[1]>67.50000000000001?t[1]>77.50000000000001?me=-.08380361910948711:me=.07375088778585813:me=-.1084864186071348:me=.0007819503469605476;let ne;t[7]>17.500000000000004?t[115]>1e-35?ne=.08741852531696623:t[167]>1e-35?ne=.10078975495600809:ne=-.0018324767784017562:t[290]>1e-35?ne=-.0850089851255888:t[74]>1e-35?t[10]>16.500000000000004?ne=.1379733311640402:ne=-.0038500648529631075:t[6]>29.500000000000004?t[8]>876.5000000000001?t[0]>3129.5000000000005?t[9]>5.500000000000001?t[8]>1765.5000000000002?ne=-.09360083033774169:ne=.061471353193188374:t[10]>11.500000000000002?t[10]>31.500000000000004?ne=-.015599362579530679:t[0]>4593.500000000001?ne=-.12029549262691491:ne=-.018917032256501397:ne=.04632831686576592:ne=.06892347785444271:t[4]>8.500000000000002?t[10]>33.50000000000001?ne=-.05894883236412263:ne=.05213944998315824:ne=.12621779223564986:t[243]>1e-35?t[6]>16.500000000000004?t[0]>4141.500000000001?t[0]>5850.500000000001?ne=.07577412405680808:ne=-.053144737214742235:t[1]>29.500000000000004?t[9]>16.500000000000004?ne=-.0277076900736147:t[1]>65.50000000000001?ne=-.023587471585763506:ne=.10184896592433082:ne=-.057699270527916825:ne=-.041191811945739454:t[114]>1e-35?t[2]>23.500000000000004?ne=.06566902102799584:t[10]>25.500000000000004?ne=-.07033633753181047:ne=-.01599120398351932:t[242]>1e-35?t[0]>2402.5000000000005?ne=-.08108035861059537:ne=.04184690010531078:t[35]>1e-35?t[0]>2904.5000000000005?ne=-.12431182772561139:ne=.01886235886984271:ne=.0025579594894418116;let V;t[8]>2915.5000000000005?t[101]>1e-35?V=.08648323956719083:t[0]>93.50000000000001?t[196]>1e-35?V=-.09509320772734361:t[4]>1.5000000000000002?t[5]>1106.5000000000002?t[5]>1191.5000000000002?t[283]>1e-35?V=-.11268313808648661:t[10]>12.500000000000002?t[131]>1e-35?V=.0687641681341721:t[10]>102.50000000000001?V=-.09667920080214842:t[4]>15.500000000000002?t[8]>2992.5000000000005?t[1]>24.500000000000004?t[1]>71.50000000000001?V=-.06762578396473291:t[10]>65.50000000000001?V=-.05226727783610509:t[282]>1e-35?V=.09911438410640917:t[19]>1e-35?V=.06915156336429933:V=-.006565637886508241:V=-.08344300251849307:V=-.0928863907927501:t[1]>60.50000000000001?t[2]>17.500000000000004?V=.19428463865406298:V=.016073883020956765:t[13]>1e-35?V=.06864077097923665:V=-.01388867527034731:t[0]>1847.5000000000002?V=.004655280608161356:t[1]>40.50000000000001?V=.031406054057765996:V=.12798062439212832:V=.09859670536264255:t[10]>2.5000000000000004?t[9]>68.50000000000001?V=.08821759640665892:t[9]>32.50000000000001?t[8]>3960.0000000000005?t[1]>31.500000000000004?V=-.0706095614785733:V=.04227164041372561:V=-.1056906923176064:t[2]>8.500000000000002?t[19]>1e-35?V=-.07139533369873902:V=.008952586782921625:V=.06086212582180936:V=-.0816938490403437:V=-.051224901945956025:V=-.10525399124186095:V=.000270924147208224;let Re;t[122]>1e-35?t[0]>2461.5000000000005?t[2]>36.50000000000001?Re=.029186512383291244:t[7]>1.5000000000000002?Re=-.14984127276725573:t[1]>40.50000000000001?Re=.032757060730648144:Re=-.07675575422749602:t[6]>8.500000000000002?Re=.10599766037117893:Re=-.0541423394552156:t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?Re=-.051394622947855385:Re=.03237141302699347:Re=.12526173027943244:Re=.000579473126472788:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?Re=-.07383912482657777:t[0]>5147.500000000001?Re=.07008813937042091:t[10]>38.50000000000001?Re=-.06779203808365307:Re=-.013782769999524498:Re=.0880038869117715:Re=-.12846294176070952:t[281]>1e-35?Re=-.06810806903850834:t[10]>227.50000000000003?Re=-.08937977001661111:t[10]>130.50000000000003?Re=.10538920632708033:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?Re=.011036530162093841:Re=-.11500797478569702:Re=.03702229366129399:Re=.07242026683784307:t[189]>1e-35?Re=.03331407112090286:t[9]>33.50000000000001?t[201]>1e-35?Re=.08979610115743614:t[7]>57.50000000000001?t[1]>20.500000000000004?Re=-.02608892716555304:Re=.09609599320761308:t[9]>105.50000000000001?Re=-.06848127135991534:Re=.0023675721254089715:t[86]>1e-35?Re=-.11049635625500497:Re=-.004847764219432233;let ze;t[125]>1e-35?t[0]>3969.5000000000005?ze=-.09462233499115416:ze=.05235324508465096:t[17]>1e-35?t[49]>1e-35?t[10]>19.500000000000004?ze=-.030700661288166148:ze=.0870883677166864:t[10]>3.5000000000000004?t[3]>18.500000000000004?t[0]>3544.5000000000005?t[188]>1e-35?t[9]>7.500000000000001?ze=.03149547314036763:ze=-.08166208257451366:t[0]>5850.500000000001?ze=-.10228136324773157:t[102]>1e-35?ze=-.10572585290676295:t[8]>726.5000000000001?t[5]>3657.5000000000005?ze=.01782894842128785:t[13]>1e-35?ze=.002680190260979968:ze=.1773965720476949:t[2]>72.50000000000001?ze=.09090831938627947:t[1]>59.50000000000001?ze=-.12297206702816128:t[0]>4977.500000000001?ze=.09899015653118268:ze=-.022207141540838887:t[4]>32.50000000000001?t[1]>34.50000000000001?ze=-.0675900954187773:ze=.012336403425364092:ze=-.0017002325391924573:t[6]>7.500000000000001?t[1]>17.500000000000004?ze=-.02671721777458802:ze=-.09242452991958029:t[284]>1e-35?ze=-.08585691288582491:ze=.013332890564324447:t[4]>14.500000000000002?ze=-.005245022074799553:t[23]>1e-35?ze=-.020036720167235768:t[1]>29.500000000000004?t[114]>1e-35?ze=-.09289852307936758:t[116]>1e-35?ze=-.09686573010015055:t[8]>804.5000000000001?ze=.03812547148215318:ze=.005162744968176633:t[9]>43.50000000000001?ze=-.059246106396159376:ze=.050370113808135275:ze=.000794041852811028;let Mt;t[3]>7.500000000000001?Mt=.0004981426543104341:t[9]>114.50000000000001?Mt=.05666010099424601:t[129]>1e-35?t[6]>3.5000000000000004?Mt=-.019061766497948867:Mt=.07193491146561211:t[186]>1e-35?t[0]>2653.5000000000005?Mt=-.006044199577160493:Mt=.1147136801028133:t[6]>85.50000000000001?t[8]>847.5000000000001?Mt=.11486607015912494:t[9]>16.500000000000004?Mt=-.08686820858087294:Mt=.06119632492911875:t[127]>1e-35?t[0]>2723.5000000000005?t[0]>3682.5000000000005?t[1]>38.50000000000001?Mt=-.022230207980026437:Mt=.1056683690528792:Mt=-.05859530800943035:Mt=.06970608927597141:t[7]>3.5000000000000004?t[105]>1e-35?Mt=.08073568184886762:t[107]>1e-35?t[2]>6.500000000000001?Mt=-.05177544573528314:Mt=.05370469772149028:t[1]>35.50000000000001?t[0]>4106.500000000001?t[9]>46.50000000000001?t[0]>4633.500000000001?Mt=.15159657923771555:Mt=-.0060542654587671055:t[9]>5.500000000000001?Mt=-.042808028205051786:t[1]>48.50000000000001?Mt=-.010449538258110742:Mt=.10026907521968294:Mt=-.04249349329714756:t[9]>42.50000000000001?t[1]>19.500000000000004?t[8]>852.5000000000001?Mt=-.02272452389409874:Mt=-.11202691218244319:t[5]>1809.5000000000002?Mt=-.04460413584255906:Mt=.08196329474205256:t[10]>69.50000000000001?Mt=.10221481166238167:Mt=.0004063052701699382:t[243]>1e-35?Mt=-.07563941678849846:t[18]>1e-35?Mt=.02563513231103432:Mt=-.004740081147303786;let rr;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?rr=.057446442918106:rr=-.04404018270156349:rr=-.09282976714550464:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?rr=-.05930486238817954:t[1]>29.500000000000004?rr=.06955866121256543:t[8]>597.5000000000001?rr=-.06538593556505168:rr=.06212512595497445:rr=.00021102929959182257:t[9]>90.50000000000001?rr=.0958061289119631:t[102]>1e-35?rr=.07172059675638813:t[1]>47.50000000000001?rr=-.03879798603977766:t[297]>1e-35?rr=.054948234271956144:t[282]>1e-35?t[2]>6.500000000000001?rr=.003805910996312012:rr=.09304295674749524:t[11]>1e-35?t[18]>1e-35?rr=.11252376801858695:t[288]>1e-35?rr=-.10293901912180432:rr=.014669268837893872:t[1]>42.50000000000001?rr=-.05988274123836837:t[145]>1e-35?rr=.06142784665288495:t[3]>1.5000000000000002?t[4]>4.500000000000001?t[1]>21.500000000000004?t[1]>27.500000000000004?t[9]>24.500000000000004?rr=.038791154988529926:t[10]>22.500000000000004?t[2]>19.500000000000004?rr=-.03366718308159971:rr=.11936550608549797:t[1]>31.500000000000004?rr=-.07454716789539667:rr=.027859650621164217:t[10]>10.500000000000002?rr=-.11806374092321247:rr=-.03506042229223101:rr=-.0007080765837654515:t[10]>6.500000000000001?rr=-.028077713664996503:t[2]>7.500000000000001?rr=.15803724124216814:rr=.0351381284833169:rr=-.07877953381054767;let zt;t[131]>1e-35?t[282]>1e-35?t[4]>23.500000000000004?zt=.14144941521975005:zt=.0007727806714190652:t[9]>1.5000000000000002?t[8]>2134.5000000000005?t[2]>34.50000000000001?zt=.10514088112381886:t[7]>18.500000000000004?zt=-.10370643555956745:zt=.04093594315421388:t[6]>15.500000000000002?t[4]>9.500000000000002?t[10]>27.500000000000004?t[10]>71.50000000000001?zt=-.0508129468802936:t[224]>1e-35?zt=-.037816066368733595:t[10]>43.50000000000001?zt=.07793408602607932:zt=.017646166646099453:t[9]>3.5000000000000004?t[9]>29.500000000000004?t[17]>1e-35?zt=.036972453794202324:zt=-.08727431092411866:t[8]>427.50000000000006?t[8]>1278.5000000000002?zt=.09475302525132188:zt=-.03580104945898193:zt=.08349488283861875:t[10]>3.5000000000000004?t[0]>1847.5000000000002?t[0]>4280.500000000001?t[2]>27.500000000000004?zt=-.1282448778804823:zt=-.014395808269207212:zt=-.008940927190750592:zt=-.1459118815453748:t[0]>4897.500000000001?zt=-.09733068457286576:t[1]>57.50000000000001?zt=.06575271409540207:zt=-.019556422817450115:zt=-.10623959222984136:t[18]>1e-35?zt=.11280940901275241:t[8]>319.50000000000006?t[2]>6.500000000000001?zt=.008125645893104896:zt=-.11084368630465868:zt=.0584398731508786:t[0]>350.50000000000006?t[3]>83.50000000000001?zt=-.05854904579626861:t[4]>5.500000000000001?zt=.02985784951394175:zt=-.03247600140149334:zt=-.11152899295304973:zt=-.00035424577714215764;let gr;t[32]>1e-35?t[17]>1e-35?t[8]>359.50000000000006?t[8]>804.5000000000001?gr=-.06563670567578264:gr=.067656954313663:gr=-.10388217548685377:t[8]>2302.5000000000005?gr=.07190621943790435:t[4]>67.50000000000001?gr=.060020507643618604:t[4]>38.50000000000001?gr=-.08707253184321638:t[2]>11.500000000000002?t[2]>16.500000000000004?t[1]>31.500000000000004?t[1]>59.50000000000001?gr=-.06568134366461277:t[8]>1075.5000000000002?gr=-.004768057709758692:gr=.11785959165999467:gr=-.05080221682879267:gr=.14814206127494542:gr=-.07241946332311736:t[253]>1e-35?gr=-.058893562861261274:t[4]>61.50000000000001?t[283]>1e-35?t[10]>23.500000000000004?gr=-.02471195342450034:gr=.11866056464409412:t[10]>44.50000000000001?t[1]>16.500000000000004?t[8]>2640.0000000000005?gr=-.10741850739482771:gr=.010051635824944:gr=.12502069436017124:t[8]>1971.5000000000002?t[1]>23.500000000000004?t[308]>1e-35?gr=.10511236013756364:t[10]>10.500000000000002?t[1]>53.50000000000001?gr=-.08992396138178163:gr=.010944365997007212:gr=.06221307021813793:gr=.1286024087559141:t[127]>1e-35?gr=.06568148624531012:t[10]>40.50000000000001?gr=-.07567979134643352:t[5]>5647.500000000001?gr=.07594672895572069:gr=-.018158016446439187:t[6]>55.50000000000001?gr=.009293422430111872:t[4]>45.50000000000001?gr=-.017749818406964022:t[2]>46.50000000000001?gr=.01714136511113982:gr=-724762291423549e-19;let xr;t[1]>24.500000000000004?t[103]>1e-35?t[8]>48.50000000000001?t[17]>1e-35?xr=-.048689215588703864:t[9]>27.500000000000004?t[0]>3916.5000000000005?xr=.07084726276890757:xr=-.11232323677722932:xr=.04812773089510436:xr=.11757502216780046:t[5]>1464.5000000000002?t[5]>1505.5000000000002?t[167]>1e-35?xr=.07470606002425358:t[1]>53.50000000000001?t[132]>1e-35?xr=.0879462816013881:xr=-.002966662093626573:t[306]>1e-35?xr=-.04588085188342676:xr=.0031910005157084823:t[3]>10.500000000000002?t[10]>20.500000000000004?xr=-.006600332774461143:xr=.1272481351557754:xr=-.09030973597154808:t[284]>1e-35?t[1]>38.50000000000001?t[10]>2.5000000000000004?xr=.011884312066620044:xr=.11678751052403374:t[4]>8.500000000000002?xr=.03627129613273813:xr=-.12132783497902287:xr=-.006784372643244717:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?xr=-.06830131718398992:t[0]>5147.500000000001?xr=.062360406249609306:t[4]>4.500000000000001?xr=-.013162203864592055:xr=-.07153029184927609:xr=.07628618062271557:xr=-.12085065687320373:t[190]>1e-35?xr=-.045816889524231186:t[137]>1e-35?xr=-.07956001795911584:t[199]>1e-35?t[0]>3853.5000000000005?xr=.025895337822752502:xr=-.06503949350616421:t[10]>227.50000000000003?xr=-.09989456525790491:t[10]>130.50000000000003?xr=.08616651057030683:xr=.0001234981796706021;let wr;t[8]>1014.5000000000001?t[9]>137.50000000000003?wr=-.08778879924617534:t[8]>1022.5000000000001?t[285]>1e-35?t[9]>64.50000000000001?wr=.04955806187281689:t[0]>3670.5000000000005?t[10]>32.50000000000001?wr=-.141732381961068:wr=-.0317152307496497:wr=-.02074638849097191:t[0]>93.50000000000001?t[0]>3072.5000000000005?t[10]>100.50000000000001?t[4]>24.500000000000004?t[8]>1336.5000000000002?wr=.12191801556691254:wr=-.0003444689085397977:wr=.005739668504631604:t[146]>1e-35?t[308]>1e-35?wr=.015237524791728777:t[6]>61.50000000000001?t[4]>63.50000000000001?wr=-.05676033995381961:wr=.10933961076803381:t[4]>26.500000000000004?wr=-.11667582544549814:t[8]>1765.5000000000002?wr=.032174455312047705:wr=-.0755016390126608:t[293]>1e-35?wr=-.08234885407658332:t[9]>41.50000000000001?t[0]>3830.5000000000005?wr=.026571311956824436:t[15]>1e-35?wr=.06175459479851121:wr=-.018778084411148754:t[9]>40.50000000000001?wr=-.09420232889965811:wr=-.004578248021263184:t[2]>1.5000000000000002?wr=.005453714644971445:wr=-.03907138175699279:wr=-.055296364182154736:t[23]>1e-35?wr=.036555134842143476:t[0]>4188.500000000001?t[6]>29.500000000000004?wr=-.09358146510580179:wr=.060524657996178094:wr=-.11245101144669545:t[125]>1e-35?t[9]>1.5000000000000002?wr=-.12698331085931538:wr=.006059605604079918:t[2]>196.50000000000003?wr=-.09451315810804783:wr=.0011390147031687425;let Ut;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[8]>3794.5000000000005?Ut=.05517359070460923:Ut=-.04758751221404857:Ut=-.09482078194138792:t[8]>2992.5000000000005?t[1]>101.50000000000001?Ut=.1040436595565776:t[9]>21.500000000000004?Ut=.04032250517675179:t[107]>1e-35?Ut=.05978752253058374:t[210]>1e-35?t[4]>37.50000000000001?Ut=.1192453009230486:t[1]>51.50000000000001?Ut=.0443376336292195:Ut=-.07967674833321865:t[5]>2117.5000000000005?t[9]>10.500000000000002?Ut=-.10025078607591283:t[0]>2882.5000000000005?t[18]>1e-35?Ut=-.08999822408398037:Ut=.017533219253893447:t[9]>1.5000000000000002?t[4]>12.500000000000002?Ut=-.061850439226075:Ut=.08849196353361093:Ut=.10536348167793089:t[92]>1e-35?Ut=.04894947712119185:t[9]>16.500000000000004?Ut=.05900227903883853:t[9]>5.500000000000001?Ut=-.11946594348916476:Ut=-.03652096348071964:t[1]>41.50000000000001?Ut=-.07411603110840567:Ut=-.00021033247574340914:t[10]>22.500000000000004?t[9]>68.50000000000001?Ut=.08493634342741495:t[11]>1e-35?Ut=-.10899097825564363:Ut=-.006156708838964173:t[8]>3198.5000000000005?t[2]>41.50000000000001?Ut=.08356655906359918:t[7]>25.500000000000004?Ut=-.09475076526194888:t[10]>5.500000000000001?Ut=-.01999406228763778:Ut=.06696212545889428:t[6]>20.500000000000004?Ut=.14713592661393468:Ut=.0459917279002218:Ut=.00027445928493734093;let sr;t[223]>1e-35?t[1]>31.500000000000004?t[8]>634.5000000000001?sr=-.06904501553217077:sr=.05696231672035904:sr=-.1124703178077813:t[99]>1e-35?t[1]>89.50000000000001?sr=-.05074261170009721:t[1]>57.50000000000001?t[8]>969.5000000000001?sr=-.011419256378538392:t[0]>3830.5000000000005?sr=.140315841503076:sr=.02403434913963024:t[1]>31.500000000000004?t[8]>65.50000000000001?t[2]>10.500000000000002?sr=-.04027822909411164:sr=.03176085103667189:sr=.06779515865838849:t[4]>15.500000000000002?sr=.0762878389015175:t[8]>175.50000000000003?t[0]>3030.5000000000005?t[8]>1041.5000000000002?sr=.06124039747298539:sr=-.04312732764434027:sr=.09161522761808062:sr=-.09663512235460074:t[280]>1e-35?t[6]>45.50000000000001?t[1]>46.50000000000001?sr=.11211681010488772:t[13]>1e-35?sr=.06725735814960367:sr=-.046744031455827846:t[10]>44.50000000000001?t[0]>3400.5000000000005?t[0]>4004.5000000000005?t[2]>22.500000000000004?sr=.11743605068905603:sr=-.011309033539148687:sr=-.07896094707523052:sr=.12862714793172117:t[10]>1.5000000000000002?t[8]>455.50000000000006?t[0]>4706.500000000001?sr=-.09218756798869711:t[10]>19.500000000000004?t[0]>1894.5000000000002?t[0]>3719.5000000000005?sr=.02836295848998302:sr=.12210680366745175:sr=-.058302317470509096:t[5]>4144.500000000001?sr=.06123341960495106:sr=-.03840046906926525:sr=-.05221474543453495:sr=.03988215485860711:sr=-.00033074684693083496;let Hp=Ida(e+r+n+o+s+c+l+u+d+p+h+m+g+A+y+E+_+v+b+I+x+R+w+P+k+Q+M+D+G+O+N+F+U+L+H+$+W+j+ce+J+Te+fe+De+Ve+Ue+Ke+X+le+te+xe+Z+ae+Ne+Y+ee+Ee+Ae+ve+We+Ze+vt+Nt+Gt+Qt+ue+Be+et+ut+ye+Le+$e+rt+ot+ft+z+se+Ce+we+je+Ye+gt+xt+Bt+Ct+Ie+K+pe+me+ne+V+Re+ze+Mt+rr+zt+gr+xr+wr+Ut+sr);return[1-Hp,Hp]}a(Sda,"multilineModelPredict");function Ida(t){if(t<0){let e=Math.exp(t);return e/(1+e)}return 1/(1+Math.exp(-t))}a(Ida,"sigmoid")});var Ani=T(TQ=>{"use strict";f();Object.defineProperty(TQ,"__esModule",{value:!0});TQ.MultilineModelFeatures=TQ.PromptFeatures=void 0;TQ.hasComment=Mdr;TQ.requestMultilineScore=Pda;var bQ=hni(),xda=mni(),wda={javascript:["//"],typescript:["//"],typescriptreact:["//"],javascriptreact:["//"],vue:["//","-->"],php:["//","#"],dart:["//"],go:["//"],cpp:["//"],scss:["//"],csharp:["//"],java:["//"],c:["//"],rust:["//"],python:["#"],markdown:["#","-->"],css:["*/"]},gni={javascript:1,javascriptreact:2,typescript:3,typescriptreact:4,python:5,go:6,ruby:7};function Mdr(t,e,r,n=!0){let o=t.split(` -`);if(n&&(o=o.filter(l=>l.trim().length>0)),Math.abs(e)>o.length||e>=o.length)return!1;e<0&&(e=o.length+e);let s=o[e];return(wda[r]??[]).some(l=>s.includes(l))}a(Mdr,"hasComment");var bRe=class{static{a(this,"PromptFeatures")}constructor(e,r){let[n,o]=this.firstAndLast(e),s=this.firstAndLast(e.trimEnd());this.language=r,this.length=e.length,this.firstLineLength=n.length,this.lastLineLength=o.length,this.lastLineRstripLength=o.trimEnd().length,this.lastLineStripLength=o.trim().length,this.rstripLength=e.trimEnd().length,this.stripLength=e.trim().length,this.rstripLastLineLength=s[1].length,this.rstripLastLineStripLength=s[1].trim().length,this.secondToLastLineHasComment=Mdr(e,-2,r),this.rstripSecondToLastLineHasComment=Mdr(e.trimEnd(),-2,r),this.prefixEndsWithNewline=e.endsWith(` +`)[0]}return r}a(dii,"makeGhostAPIChoice");function Xdr(t,e,r,n,o){let s=Date.now()-n,c=s-o,l=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:s,processingTimeMs:o,deltaMs:c,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN});l.extendWithRequestId(r.requestId),(0,v0a.telemetry)(t,`ghostText.${e}`,l)}a(Xdr,"telemetryPerformance")});var pii=T(Vst=>{"use strict";f();Object.defineProperty(Vst,"__esModule",{value:!0});Vst.contextualFilterCharacterMap=void 0;Vst.contextualFilterCharacterMap={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95}});var hii=T(Zdr=>{"use strict";f();Object.defineProperty(Zdr,"__esModule",{value:!0});Zdr.multilineModelPredict=I0a;function I0a(t){let e;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>427.50000000000006?t[9]>13.500000000000002?t[121]>1e-35?e=-.3793786744885956:t[149]>1e-35?e=-.34717430705356905:e=-.26126834451035963:e=-.2431318366096852:t[5]>888.5000000000001?e=-.20600463586387135:e=-.2568037008471491:t[308]>1e-35?e=-.2363064824497454:t[8]>370.50000000000006?e=-.37470755210284723:e=-.321978453730494:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?e=-.26259136509758885:e=-.3096719634039438:t[4]>30.500000000000004?t[9]>18.500000000000004?e=-.34254903852890883:t[2]>98.50000000000001?e=-.41585250791146294:e=-.3673574858887241:t[9]>6.500000000000001?e=-.31688079287876225:t[31]>1e-35?e=-.29110977864003823:t[308]>1e-35?e=-.3201411739040839:e=-.36874023066055506:t[8]>691.5000000000001?t[82]>1e-35?e=-.41318393149040566:t[133]>1e-35?e=-.3741272613525161:t[32]>1e-35?e=-.4112378041027121:t[227]>1e-35?e=-.37726615155719356:t[10]>3.5000000000000004?e=-.3164502293560397:e=-.2930071546509045:t[9]>13.500000000000002?e=-.277366858539218:t[308]>1e-35?t[4]>10.500000000000002?e=-.30975610686807187:t[4]>1.5000000000000002?e=-.2549142136728043:e=-.3271325650785176:t[127]>1e-35?t[0]>1937.5000000000002?e=-.2533046188098832:e=-.325520883579:e=-.331628896481776;let r;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?t[9]>13.500000000000002?r=.031231253521808708:r=.05380836288014532:t[5]>423.00000000000006?t[8]>114.50000000000001?r=.06751619128429062:r=.09625089153176467:r=.027268163053989804:t[308]>1e-35?r=.060174483556283756:r=-.049062854038919135:t[3]>24.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?r=-.03969241799174589:r=.01086816842550381:t[31]>1e-35?r=-.003284694817583201:t[9]>6.500000000000001?t[4]>30.500000000000004?r=-.04224490699947552:r=-.011834162944360616:t[308]>1e-35?t[32]>1e-35?r=-.13448447971850278:r=-.019569456707046823:t[19]>1e-35?t[9]>1.5000000000000002?r=-.07256260662659254:t[4]>60.50000000000001?r=-.08227503453609311:r=-.020596416747563847:r=-.07396549241564149:t[8]>691.5000000000001?t[82]>1e-35?r=-.10046536995362734:t[133]>1e-35?r=-.06407649822752297:t[225]>1e-35?r=.08035785003303324:t[92]>1e-35?r=.018901360933204676:t[20]>1e-35?r=.05252546973665552:t[8]>2592.5000000000005?r=-.040543705016462955:r=-.011236043818320725:t[9]>17.500000000000004?r=.025560632674895334:t[308]>1e-35?t[0]>1847.5000000000002?r=.03527165701669741:r=-.0071847350825815035:t[127]>1e-35?r=.024373016379595405:t[9]>2.5000000000000004?r=-.0035090719709448288:r=-.03514829488063766;let n;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?n=.03848674861536988:t[5]>423.00000000000006?t[8]>114.50000000000001?t[9]>56.50000000000001?n=-.003764520033319488:n=.06570817919969299:t[4]>61.50000000000001?n=.028346156293069538:n=.0908154644362606:n=.02445594243234816:t[308]>1e-35?t[8]>65.50000000000001?n=.0019305229020073053:n=.09279357295883772:n=-.04458984161917124:t[3]>24.500000000000004?t[23]>1e-35?n=.0027405390271277013:t[4]>29.500000000000004?t[52]>1e-35?n=.044727478132905285:t[115]>1e-35?n=.10245804828855934:t[9]>17.500000000000004?n=-.03353173647469207:t[2]>98.50000000000001?n=-.10048106638102179:n=-.05484231104348874:t[31]>1e-35?n=.016807537467116516:t[9]>6.500000000000001?n=-.012113620535295137:t[4]>8.500000000000002?t[308]>1e-35?n=-.01882594250504289:n=-.05585658862796076:n=.04279591277938338:t[8]>691.5000000000001?t[82]>1e-35?n=-.09262278043707878:t[133]>1e-35?n=-.058454257768893625:t[32]>1e-35?n=-.09769348447126434:t[25]>1e-35?n=-.0725430043727677:t[122]>1e-35?n=-.10047841601578077:n=-.00580671054458958:t[9]>13.500000000000002?n=.021399199032818294:t[308]>1e-35?t[4]>10.500000000000002?n=-.0076376731757173515:n=.03394923033036848:t[127]>1e-35?n=.02070489091204209:n=-.02290162726126496;let o;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?o=.010230295672324606:o=.038540509248742805:t[8]>125.50000000000001?t[1]>49.50000000000001?o=.03086356292895467:o=.057128750867458604:t[5]>888.5000000000001?o=.07861602941396924:o=.030523262699070908:t[308]>1e-35?o=.048236117667577356:t[8]>370.50000000000006?o=-.05642125069212264:o=-.007232836777168195:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?o=.03640661467213915:o=-.005889820723907028:t[31]>1e-35?o=-.0009007166998276938:t[9]>6.500000000000001?o=-.022590340093882378:t[308]>1e-35?t[32]>1e-35?o=-.1215445089091064:o=-.01435612266219722:t[19]>1e-35?t[9]>1.5000000000000002?o=-.061555513040777825:t[4]>60.50000000000001?o=-.07053475504569347:o=-.013733369453963092:o=-.06302097189114152:t[227]>1e-35?o=-.05820440333190048:t[8]>683.5000000000001?t[82]>1e-35?o=-.08466979526809346:t[10]>24.500000000000004?o=-.017092159721119944:t[92]>1e-35?o=.03592901452463749:o=-.00359310519524756:t[5]>1809.5000000000002?t[243]>1e-35?o=-.03963116207386097:t[118]>1e-35?o=-.09483996283536394:t[217]>1e-35?o=-.03394542089519989:t[242]>1e-35?o=-.07985899422287938:o=.019706602160656964:t[9]>12.500000000000002?o=.014072998937735146:o=-.021156294523894684;let s;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?s=.009197756540516563:s=.03458896869535166:t[5]>5082.500000000001?s=.08265545468131008:t[131]>1e-35?s=.0740738432473315:s=.045159136632942756:t[8]>319.50000000000006?s=-.04653401534465376:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?s=-.011400839766681709:s=.11149800187510031:s=-.08683250977599462:s=.08355310136724753:t[4]>23.500000000000004?t[23]>1e-35?t[131]>1e-35?s=.040389083779932555:s=-.009887614274108602:t[52]>1e-35?s=.03705353499757327:t[9]>6.500000000000001?s=-.025401260429257562:t[2]>98.50000000000001?s=-.09237673187534504:s=-.04298556869281803:t[222]>1e-35?s=-.045221965895986184:t[8]>691.5000000000001?t[133]>1e-35?s=-.05435318330148897:t[128]>1e-35?s=-.08672907303184191:t[227]>1e-35?s=-.05568304584186561:t[122]>1e-35?s=-.09623059693538563:t[225]>1e-35?s=.07558331642202279:t[82]>1e-35?s=-.07360566227233566:s=-.005646164647395919:t[242]>1e-35?s=-.08203758341228108:t[9]>13.500000000000002?s=.018726123829696042:t[308]>1e-35?t[4]>10.500000000000002?s=-.011153942154062704:s=.03132858912391067:t[127]>1e-35?s=.021455228822345174:t[23]>1e-35?s=.01959966745346997:s=-.021764790177579325;let c;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>284.50000000000006?t[121]>1e-35?t[18]>1e-35?c=.07547602514276922:c=-.08529678832140396:c=.030314822344598043:t[5]>888.5000000000001?t[4]>61.50000000000001?c=.011143589009415464:c=.0654700456802118:c=.021794712646632755:t[308]>1e-35?c=.04231872551095028:c=-.034381999950549455:t[4]>23.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?c=-.03678981254332261:c=.010518160384496255:t[8]>825.5000000000001?c=-.04506534842082387:t[9]>38.50000000000001?c=.01004983052203438:c=-.030580958620701027:t[39]>1e-35?c=-.12802435021505382:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>6.500000000000001?c=.030426957004611704:c=-.0726407693060581:c=.017395521646964375:t[4]>7.500000000000001?t[0]>93.50000000000001?t[9]>7.500000000000001?c=-.008024349629981291:t[31]>1e-35?c=.01296539930850471:t[308]>1e-35?c=-.012855016509024084:c=-.04564527976851505:c=-.15681420504058596:t[10]>4.500000000000001?t[243]>1e-35?c=-.1012064426380198:c=-.0062808850924854194:c=.030706323726162416:t[9]>13.500000000000002?c=.017081636133736405:t[308]>1e-35?t[4]>10.500000000000002?c=-.009306613091760644:t[4]>1.5000000000000002?c=.03655523200850989:c=-.02671654212893341:t[127]>1e-35?c=.019261510468604387:c=-.017627818570628936;let l;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[308]>1e-35?l=.036100405995889276:l=.011709313297015793:t[0]>119.50000000000001?t[8]>125.50000000000001?l=.03622542297472574:l=.05595579157301536:l=-.02234751038146796:t[8]>319.50000000000006?l=-.040132029478400735:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?l=-.009306153573847916:l=.10058509567064988:l=-.0785668890966017:t[9]>28.500000000000004?l=-.04781977604130416:l=.09753292614937459:t[4]>23.500000000000004?t[131]>1e-35?l=.02372493254975127:t[148]>1e-35?l=.028103095989516644:t[4]>58.50000000000001?t[10]>1e-35?l=-.05000852203469597:l=.02922366846119705:t[23]>1e-35?l=-.0026335076988151292:l=-.03073993752935585:t[222]>1e-35?l=-.03867374428185713:t[32]>1e-35?l=-.07220729365053084:t[39]>1e-35?l=-.11624524614351733:t[8]>691.5000000000001?t[133]>1e-35?l=-.04836360271198036:t[8]>4968.500000000001?l=-.10873681915578029:t[149]>1e-35?l=-.11847484033769298:t[122]>1e-35?l=-.08916172460307559:t[82]>1e-35?l=-.06774726602152634:l=-.0033469147714351327:t[126]>1e-35?l=-.09474445392080015:t[8]>131.50000000000003?t[118]>1e-35?l=-.09002547031023511:l=.015475385187009489:t[25]>1e-35?l=-.08175501232759151:l=-.000429679055394914;let u;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?u=.021942996005324917:u=.042349138084484074:t[308]>1e-35?u=.036507270845732874:u=-.028981850556764995:t[3]>24.500000000000004?t[23]>1e-35?u=.00210930790963475:t[31]>1e-35?u=.006825358293027163:t[9]>6.500000000000001?u=-.013772084269062394:t[308]>1e-35?u=-.008307929099892574:t[19]>1e-35?u=-.027706313312904487:u=-.04891108984170914:t[134]>1e-35?u=-.0605730733844732:t[25]>1e-35?u=-.05347926493253117:t[227]>1e-35?u=-.049415829249003666:t[32]>1e-35?u=-.06807799662179595:t[308]>1e-35?t[4]>10.500000000000002?t[2]>13.500000000000002?u=-.00016302718260794637:u=-.10247095758122947:t[210]>1e-35?u=-.022149002072787024:t[95]>1e-35?u=.15222631630626304:u=.027393884520465712:t[9]>7.500000000000001?t[225]>1e-35?u=.13483346577752245:t[3]>9.500000000000002?t[243]>1e-35?u=-.045352728133789516:t[8]>683.5000000000001?u=.00474372227519902:u=.02635476098707525:t[92]>1e-35?u=.05659380819933452:t[105]>1e-35?u=.07431443210341222:t[186]>1e-35?u=.0915821133384904:u=-.016414750130401053:t[127]>1e-35?u=.011824693641866162:t[23]>1e-35?u=.0228468674288774:t[284]>1e-35?u=.06606936863302432:u=-.02872463273902358;let d;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>125.50000000000001?t[288]>1e-35?d=-.019844363904157558:t[1]>50.50000000000001?t[131]>1e-35?d=.044961338592245194:d=.003659599513761676:t[121]>1e-35?d=-.04057103630479994:d=.03158560697078578:t[0]>421.50000000000006?t[4]>61.50000000000001?d=-.0003708603406529278:d=.05331312264472391:d=.0006575958601218936:t[8]>319.50000000000006?d=-.034654694051901545:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?d=-.0076053515916517005:d=.09116695486305336:d=-.07137458699162028:d=.06633130654035282:t[4]>29.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?d=-.0308520802187302:d=.013156423968295541:t[115]>1e-35?d=.11581171687488252:t[52]>1e-35?t[10]>22.500000000000004?d=.12264179915175587:d=-.021905727233873535:t[8]>799.5000000000001?d=-.04181869575935412:d=-.023695901673350575:t[222]>1e-35?d=-.034612899265371776:t[8]>691.5000000000001?t[9]>98.50000000000001?d=-.06892116536821917:t[149]>1e-35?d=-.11194586444154514:t[133]>1e-35?d=-.04269583234000504:t[128]>1e-35?d=-.0644631966969502:t[8]>4968.500000000001?d=-.09650726096330133:d=-.004219129180139438:t[126]>1e-35?d=-.08038306745347751:t[5]>1809.5000000000002?d=.009265335288169993:t[9]>2.5000000000000004?d=.006447645462117438:d=-.021047132609551503;let p;t[13]>1e-35?t[3]>1.5000000000000002?t[9]>21.500000000000004?t[121]>1e-35?p=-.08436540015142402:t[8]>1861.5000000000002?p=-.01621425699342421:p=.01878613821895428:p=.031052879158242532:t[8]>319.50000000000006?p=-.031536619360997865:t[7]>3.5000000000000004?p=-.004510586962343298:p=.0596524941011746:t[4]>18.500000000000004?t[23]>1e-35?p=.004757490541310808:t[9]>6.500000000000001?p=-.008842393772207996:t[31]>1e-35?p=.0010536183837006993:t[308]>1e-35?p=-.008145882815435419:t[2]>98.50000000000001?p=-.08404937622173021:t[276]>1e-35?p=.0020072791321856663:t[19]>1e-35?p=-.023031820639490178:p=-.04553314326377875:t[8]>2134.5000000000005?p=-.02244583113572251:t[134]>1e-35?p=-.05592137394753121:t[308]>1e-35?t[49]>1e-35?p=.09989109704064947:t[4]>10.500000000000002?t[2]>13.500000000000002?p=-.00447733056482096:p=-.10191061664873849:p=.021765308380331864:t[9]>7.500000000000001?t[118]>1e-35?p=-.07570059131536411:t[243]>1e-35?p=-.040983393346598646:t[3]>9.500000000000002?p=.014763759061483812:t[92]>1e-35?p=.05136368898963024:p=-.008162398981149495:t[127]>1e-35?p=.013999119696708346:t[23]>1e-35?t[20]>1e-35?p=.14138985500120907:p=.008668274102844162:t[284]>1e-35?p=.06356484011042893:p=-.024781304572706303;let h;t[13]>1e-35?t[3]>8.500000000000002?t[8]>892.5000000000001?t[0]>384.50000000000006?h=.014387526569215037:t[8]>2266.5000000000005?h=-.1397298649743087:h=.007953931014097788:t[0]>119.50000000000001?t[4]>61.50000000000001?h=.0029819092211896296:t[218]>1e-35?h=.08450459375645737:h=.031646488019280654:h=-.03544960151460596:t[9]>9.500000000000002?h=-.026002317735915183:t[7]>1.5000000000000002?h=.005074258810794793:h=.0745247650477651:t[4]>29.500000000000004?t[131]>1e-35?h=.023269218675640847:t[148]>1e-35?h=.03812942399144545:t[115]>1e-35?h=.10512283476967227:h=-.02607307479736138:t[227]>1e-35?h=-.036576708299046294:t[101]>1e-35?h=.027948683650881864:t[149]>1e-35?h=-.08195628451594297:t[50]>1e-35?h=-.16997544922278504:t[8]>691.5000000000001?t[9]>101.50000000000001?h=-.06860333850762075:t[225]>1e-35?h=.06066641950951723:t[10]>22.500000000000004?t[1]>29.500000000000004?t[127]>1e-35?h=.028599705845427533:h=-.010746719511640914:t[0]>4877.500000000001?h=-.07251187886096228:h=-.021299712241446785:t[118]>1e-35?h=-.11902023760964736:h=15874469526809387e-21:t[8]>267.50000000000006?h=.01317292185402293:t[148]>1e-35?t[9]>20.500000000000004?h=.09614842415142123:h=.006049073167176467:t[189]>1e-35?h=.05562696451900713:h=-.006257541923837303;let m;t[13]>1e-35?t[9]>14.500000000000002?t[2]>11.500000000000002?t[1]>71.50000000000001?t[8]>1252.5000000000002?m=-.10069846585436666:m=-.010577995535809317:t[146]>1e-35?m=-.008877238274428668:t[280]>1e-35?m=.10076055897012692:t[6]>70.50000000000001?m=-.020603523042565547:t[7]>1.5000000000000002?m=.02819095420813202:m=-.1223354167911277:m=-.025073583348334844:t[8]>416.50000000000006?m=.01718560189149466:t[230]>1e-35?m=.12281803224342265:m=.03281276971308565:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?m=-.13070568109867683:t[4]>63.50000000000001?m=-.027221825262496814:m=.01530862490082352:t[9]>6.500000000000001?t[5]>4320.500000000001?t[2]>31.500000000000004?m=-.00605574271293711:m=.04739407327741249:m=-.012537528620315956:t[31]>1e-35?t[20]>1e-35?m=.1252215087035768:m=.003905888677601057:t[52]>1e-35?m=.045466299731038815:t[2]>100.50000000000001?m=-.07815624550168065:t[308]>1e-35?m=-.007715815250508057:t[276]>1e-35?t[9]>1.5000000000000002?m=-.03538265083203445:t[18]>1e-35?m=.1591211669800727:m=.015151475408241136:t[8]>557.5000000000001?m=-.04225569725456342:m=-.022455546324243267:t[308]>1e-35?m=.01325441736085826:t[197]>1e-35?m=.03752194600682512:t[225]>1e-35?m=.06583712394533976:m=-.005205289866839043;let g;t[13]>1e-35?t[9]>21.500000000000004?t[2]>12.500000000000002?g=.010264022580774884:g=-.02335958814489217:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?g=-.0936747137352166:t[0]>384.50000000000006?g=.019846244507320695:g=-.0751102554077272:g=-.026885329334203723:t[0]>966.5000000000001?t[10]>48.50000000000001?g=.11654906890054273:g=.0346250587613322:t[4]>39.50000000000001?g=-.08568002378645614:t[9]>16.500000000000004?g=-.12010535752923689:g=.021321923389033808:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?g=-.12056431231412057:t[131]>1e-35?g=.03652965550568472:g=.002563006128791669:t[9]>6.500000000000001?t[30]>1e-35?g=-.10141481732178981:g=-.003936457893178248:t[31]>1e-35?g=.008215898756249477:t[52]>1e-35?t[0]>4188.500000000001?g=.12972828769588213:g=-.003137412232297087:t[2]>100.50000000000001?g=-.0730872929087944:t[308]>1e-35?g=-.006958622747243333:t[35]>1e-35?t[0]>3707.5000000000005?g=.07934620723812878:g=-.018598568353702116:g=-.030635505446410763:t[128]>1e-35?g=-.06962290453843294:t[84]>1e-35?g=-.15290337844960322:t[308]>1e-35?t[8]>2543.5000000000005?g=-.034938657503885584:g=.016339322898966915:t[197]>1e-35?g=.03358907965870046:t[18]>1e-35?g=-.01754013791515288:g=-.0004944586067698557;let A;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?A=.005888790687820524:A=.0429676533834978:t[2]>7.500000000000001?t[0]>119.50000000000001?t[6]>79.50000000000001?A=-.0224319889201976:t[212]>1e-35?A=.06249587051783863:t[8]>963.5000000000001?t[8]>1156.5000000000002?A=.010357273289123324:A=-.029749145161304082:t[218]>1e-35?A=.06449336340743606:A=.018047654539345502:A=-.07350502390293116:A=-.019594829995832414:t[4]>39.50000000000001?A=-.019338083179859314:t[39]>1e-35?A=-.10427066919173111:t[222]>1e-35?t[0]>612.5000000000001?A=-.019197415255018464:A=-.0836562507048181:t[149]>1e-35?A=-.07679624472577429:t[32]>1e-35?A=-.05097506748590604:t[191]>1e-35?A=.04670476485250936:t[30]>1e-35?A=-.05313073892148652:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>8.500000000000002?A=.03930363008271334:A=-.06029171685615689:A=.016203086182431294:t[4]>7.500000000000001?A=-.013824248237085224:t[10]>4.500000000000001?t[94]>1e-35?A=-.09817668643367765:t[10]>40.50000000000001?A=-.023558078753593125:A=.0065113494780482326:t[8]>809.5000000000001?t[297]>1e-35?A=-.1352063548573715:A=.058203900441270634:A=-.035243959159285736:t[10]>59.50000000000001?t[1]>43.50000000000001?A=-.012552876807800442:A=.05991247777734298:A=.0035893102109330177;let y;t[13]>1e-35?t[9]>21.500000000000004?t[145]>1e-35?y=.03507251990078782:t[2]>14.500000000000002?y=.004905698363309292:t[8]>2421.5000000000005?y=-.10306119951984316:y=-.018951037816654928:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?y=-.08503171085833393:y=.015130974593044409:y=-.024425267075198206:y=.02624054905103126:t[4]>19.500000000000004?t[131]>1e-35?y=.02100191580704534:t[32]>1e-35?t[8]>2302.5000000000005?y=.09908783187786288:y=-.06920877329925636:t[8]>241.50000000000003?y=-.016756131804203496:t[9]>33.50000000000001?y=.04903179955263626:t[217]>1e-35?y=-.047416847619291644:y=-.0017200891991431119:t[39]>1e-35?y=-.10389927604977028:t[134]>1e-35?y=-.050480365434872866:t[178]>1e-35?y=-.05167855791556937:t[8]>2134.5000000000005?y=-.01663197335585307:t[242]>1e-35?y=-.05361323756615453:t[118]>1e-35?y=-.05299780866211368:t[10]>24.500000000000004?t[10]>55.50000000000001?t[8]>764.5000000000001?y=-.0016544848369620534:y=.04494144460483587:y=-.009283616456736156:t[121]>1e-35?t[0]>4463.500000000001?y=.051166688553608355:y=-.06623908820705383:t[84]>1e-35?y=-.12990936092409747:t[306]>1e-35?y=-.07020596855118943:t[49]>1e-35?y=.06272964802556856:t[192]>1e-35?y=.06540204627162581:y=.008277910531592885;let E;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?E=.003325460510319164:E=.037153108286272905:t[2]>12.500000000000002?t[1]>124.50000000000001?E=-.09880713344892134:t[7]>60.50000000000001?t[10]>71.50000000000001?E=.0697359767152808:t[230]>1e-35?E=.06513506845651572:E=-.02826625276613455:t[5]>246.50000000000003?t[8]>95.50000000000001?E=.013616385013146277:E=.04171540100223404:E=-.04360396575094823:t[212]>1e-35?E=.025945477945627522:E=-.019793208261535442:t[4]>39.50000000000001?t[25]>1e-35?E=-.07856453318384411:E=-.014803893522351739:t[39]>1e-35?E=-.09185452630751932:t[149]>1e-35?E=-.07122426086157027:t[134]>1e-35?E=-.04231052091434186:t[227]>1e-35?E=-.029815824273994197:t[50]>1e-35?E=-.15736496271211153:t[222]>1e-35?E=-.02360285356956629:t[128]>1e-35?E=-.03922080193836443:t[136]>1e-35?E=-.07219685327698587:t[10]>24.500000000000004?t[1]>8.500000000000002?E=-.0029736170756835783:E=-.06482902102259112:t[84]>1e-35?E=-.11340924635708383:t[94]>1e-35?E=-.03635703457792193:t[118]>1e-35?E=-.058181913914186034:t[126]>1e-35?E=-.062030576241517366:t[116]>1e-35?E=-.045086301850604006:t[25]>1e-35?E=-.031665223656767286:t[203]>1e-35?E=-.009444685731407691:E=.0112265153772187;let _;t[13]>1e-35?t[1]>64.50000000000001?t[9]>14.500000000000002?t[9]>54.50000000000001?_=.022717227245241684:_=-.049700413274686266:_=.007175776918589741:t[5]>50.50000000000001?t[8]>61.50000000000001?t[21]>1e-35?_=-.07927556792063156:t[3]>8.500000000000002?t[4]>23.500000000000004?t[281]>1e-35?_=-.12263724050601095:_=.0070743478891288035:t[288]>1e-35?_=-.050439138582109:_=.0255701593657891:_=-.005812703740580558:t[6]>49.50000000000001?_=-.008542694147899113:_=.035147383686665:_=-.0960461939274094:t[32]>1e-35?_=-.04555453745517765:t[222]>1e-35?t[0]>612.5000000000001?_=-.01800870272656664:_=-.07817304234604389:t[30]>1e-35?_=-.05227061750368981:t[25]>1e-35?t[0]>4449.500000000001?t[217]>1e-35?_=.08778416018479411:_=-.026563982720830256:_=-.05296139548112329:t[50]>1e-35?_=-.14926464875852247:t[8]>779.5000000000001?t[133]>1e-35?_=-.036572140520852024:t[183]>1e-35?_=-.10766853736801459:_=-.003966794968701808:t[217]>1e-35?t[5]>5237.500000000001?_=.09513215942486053:_=-.03641865277445567:t[10]>59.50000000000001?_=.03177172388687933:t[39]>1e-35?_=-.10234241303898953:t[243]>1e-35?_=-.02966738115984321:t[190]>1e-35?_=-.04312785336449181:t[118]>1e-35?_=-.05808521194081524:_=.006720381600740378;let v;t[308]>1e-35?t[5]>423.00000000000006?t[133]>1e-35?v=-.046284053681928526:t[210]>1e-35?v=49778070699847876e-21:t[13]>1e-35?v=.03328070054739309:t[128]>1e-35?v=-.054790214922938896:t[126]>1e-35?v=-.08524792218532945:v=.014414055975542446:t[1]>38.50000000000001?v=-.07287851335872973:v=.005263371501687163:t[9]>7.500000000000001?t[21]>1e-35?t[10]>4.500000000000001?v=-.12459748864088374:v=-.004626323021331593:t[298]>1e-35?t[4]>64.50000000000001?v=.13044981041138526:t[9]>71.50000000000001?v=-.056068402282406865:t[9]>12.500000000000002?v=.038957722962512764:v=-.04598815982492169:t[8]>691.5000000000001?t[126]>1e-35?v=-.0852126122372075:t[225]>1e-35?v=.10082066771689505:t[1]>161.50000000000003?v=-.11609832500613824:t[3]>8.500000000000002?t[8]>1685.5000000000002?v=-.010835400874777133:v=.004607419973807752:v=-.016989075258564062:v=.009205417251698097:t[23]>1e-35?t[20]>1e-35?v=.10184317139657878:t[0]>5724.500000000001?v=-.1163666496650542:t[1]>106.50000000000001?v=.1303850608190687:t[129]>1e-35?v=.10745031509534769:v=.006166901738036226:t[31]>1e-35?v=.010177092833155127:t[13]>1e-35?t[0]>213.50000000000003?v=.005004582564506611:v=-.10481581731668346:t[19]>1e-35?v=-.009850706427306281:v=-.02608226348051303;let b;t[13]>1e-35?t[1]>64.50000000000001?t[2]>4.500000000000001?b=-.0024117174588695603:b=-.058339700513831916:t[212]>1e-35?t[0]>2215.5000000000005?t[8]>847.5000000000001?t[10]>21.500000000000004?t[1]>39.50000000000001?b=.04575380761203418:b=-.10025595041353463:t[15]>1e-35?b=.17705790384964004:b=.0073813837628615014:b=.07676373681392407:b=-.027167992693885996:t[3]>11.500000000000002?t[280]>1e-35?b=.07078572910026419:t[4]>23.500000000000004?b=.005513918674164821:b=.0206586476926392:t[0]>5269.500000000001?b=.07706773525822633:b=-.010233826953776122:t[148]>1e-35?t[8]>1622.5000000000002?b=-.03204783603215824:b=.027405418223981973:t[4]>14.500000000000002?t[131]>1e-35?t[9]>1.5000000000000002?t[0]>5026.500000000001?b=-.0930246911392012:b=.011173087289703683:t[3]>24.500000000000004?b=.03281421918878597:b=.12449335091369843:t[204]>1e-35?b=.06634531187326123:b=-.011522999669353388:t[92]>1e-35?t[10]>42.50000000000001?b=-.041196758517013515:t[4]>7.500000000000001?b=-2942718111029724e-20:t[4]>6.500000000000001?b=.11953909558532852:b=.03188615019450534:t[122]>1e-35?b=-.0616037324662157:t[101]>1e-35?b=.027230889593349412:t[8]>4968.500000000001?b=-.1113986516540856:t[3]>2.5000000000000004?b=-.002045140426885727:t[129]>1e-35?b=.12641163374304432:b=.014909826232873194;let I;t[308]>1e-35?t[0]>7277.500000000001?I=-.09337446795435:t[5]>423.00000000000006?t[133]>1e-35?I=-.040884836258675006:t[210]>1e-35?I=-.0003719413278428804:t[13]>1e-35?I=.030287610160818174:I=.011174130013595384:t[1]>38.50000000000001?I=-.0662442170185784:I=.004332185707008564:t[9]>7.500000000000001?t[145]>1e-35?t[285]>1e-35?I=-.08092286307197555:I=.029866363328584986:t[21]>1e-35?t[10]>4.500000000000001?I=-.1155211149523894:I=-.0032903546638958538:t[149]>1e-35?I=-.03632198993199768:t[3]>9.500000000000002?t[8]>999.5000000000001?I=-.003507023626534306:t[128]>1e-35?t[4]>13.500000000000002?t[0]>3459.5000000000005?I=-.025416927789760076:I=.02777568919793122:I=-.10310351509769732:I=.013549608903688785:t[186]>1e-35?I=.08513865847420551:I=-.009306721292510369:t[31]>1e-35?I=.009780833952582307:t[23]>1e-35?I=.011143773934157629:t[210]>1e-35?I=.025354797285173356:t[17]>1e-35?t[10]>3.5000000000000004?I=-.04846287537743046:I=-.014647271080376757:t[2]>5.500000000000001?t[7]>57.50000000000001?I=-.034224938681445764:t[8]>1641.5000000000002?I=-.027298372075800673:t[191]>1e-35?t[10]>18.500000000000004?I=-.027950103994861836:I=.14575930827829034:I=-.007124740389354946:t[10]>22.500000000000004?I=.013173304107866726:I=-.11119620042551365;let x;t[131]>1e-35?x=.01892225243240137:t[308]>1e-35?t[5]>691.5000000000001?t[133]>1e-35?x=-.037118314390013646:t[1]>51.50000000000001?t[5]>3749.5000000000005?t[8]>58.50000000000001?x=-.022305242912035072:x=.024792895826340516:x=.013666137278072166:t[88]>1e-35?t[10]>27.500000000000004?x=.2080083584805785:x=.04247197078083379:t[10]>40.50000000000001?t[18]>1e-35?t[1]>27.500000000000004?x=.060783227455868206:x=-.056904865557409035:x=-.03278952553107572:t[192]>1e-35?x=.13117402617043625:x=.01647119888257836:x=-.01825870445636398:t[9]>6.500000000000001?t[298]>1e-35?x=.026536210945939682:t[8]>691.5000000000001?t[126]>1e-35?x=-.07927319604548912:t[10]>3.5000000000000004?t[21]>1e-35?x=-.11083976837572328:t[146]>1e-35?x=-.03359294484446772:x=-.0042815953591236475:t[190]>1e-35?x=-.09264239592903775:t[10]>1e-35?x=.022282638485105657:x=-.0205994057928458:t[5]>4918.500000000001?x=.03430715695199153:t[243]>1e-35?t[2]>57.50000000000001?x=.08935072241972036:x=-.03781647876237494:x=.0062655753179671515:t[31]>1e-35?x=.008603500300349887:t[230]>1e-35?x=.03350056932774173:t[23]>1e-35?t[241]>1e-35?x=.10277555508503314:x=.0017901817172993888:t[2]>98.50000000000001?x=-.05920081229672715:x=-.015722173275739208;let w;t[13]>1e-35?t[118]>1e-35?w=.07957905150112207:t[1]>125.50000000000001?w=-.0662620579858685:t[145]>1e-35?w=.029682040828779843:t[19]>1e-35?t[6]>15.500000000000002?w=-.0009597832580977798:w=-.081474760755753:t[212]>1e-35?w=.03637001492325179:w=.006912305498963309:t[32]>1e-35?w=-.03919900630910754:t[134]>1e-35?w=-.036225295529777886:t[4]>4.500000000000001?t[5]>384.50000000000006?t[204]>1e-35?w=.06671440854602108:t[136]>1e-35?w=-.07577364230133474:t[148]>1e-35?t[4]>7.500000000000001?w=.026430947016830915:w=-.04075501264495112:t[9]>93.50000000000001?w=-.04353169430417609:t[50]>1e-35?w=-.1411224537622882:t[17]>1e-35?t[49]>1e-35?w=.068392679163672:t[10]>1.5000000000000002?w=-.0209659792007492:w=-.0004393235559249831:t[133]>1e-35?t[9]>64.50000000000001?w=.07254524592323175:w=-.0319087835282534:w=.00037444813327793425:w=-.025138768151370408:t[243]>1e-35?w=-.050010891710502096:t[94]>1e-35?w=-.0817513550778599:t[122]>1e-35?w=-.061038875809822285:t[19]>1e-35?t[8]>1085.5000000000002?w=-.008408408775061623:t[2]>5.500000000000001?t[218]>1e-35?w=.1454877641381946:w=.053787998331240316:t[9]>33.50000000000001?w=.08602629796680285:w=-.03895127455803038:w=.008830878042315722;let R;t[131]>1e-35?R=.01687979707990516:t[8]>2915.5000000000005?t[297]>1e-35?R=.07473600489975568:t[0]>93.50000000000001?R=-.021596848506011502:R=-.13840802327735696:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?R=.10264284346448256:R=.031042487183181262:R=-.016653982936827776:t[4]>60.50000000000001?t[10]>75.50000000000001?R=.04226403420647408:t[10]>1e-35?t[0]>4733.500000000001?R=.006271403149804702:R=-.030013637555715046:t[0]>4449.500000000001?R=-.06556876058654929:R=.06437994816903034:t[32]>1e-35?R=-.043814577251655815:t[308]>1e-35?t[0]>7277.500000000001?R=-.09349726304052086:t[210]>1e-35?R=-.0035960132209098003:t[5]>691.5000000000001?t[133]>1e-35?R=-.029188394315052574:R=.017219308333820193:R=-.017378928852189585:t[9]>6.500000000000001?t[0]>2653.5000000000005?t[149]>1e-35?R=-.04428555753857688:R=.0001456106867817353:t[5]>213.50000000000003?R=.01740292726636365:R=-.011361718115556464:t[7]>4.500000000000001?t[0]>316.50000000000006?t[19]>1e-35?t[10]>54.50000000000001?R=.03410288911259329:t[121]>1e-35?R=-.06056527462120627:t[8]>2592.5000000000005?R=.12166808844363577:t[191]>1e-35?R=.11669879218998758:R=-.001664858391716235:R=-.01262927450503166:R=-.04506589951879664:t[227]>1e-35?R=-.08548904959752329:R=.02156080776537726;let P;t[306]>1e-35?t[149]>1e-35?P=-.1389218965136736:P=-.032218642644416894:t[13]>1e-35?P=.006465035217331847:t[50]>1e-35?P=-.1381687930130022:t[179]>1e-35?P=-.13112784985951215:t[148]>1e-35?t[8]>1726.5000000000002?P=-.03262719498763048:P=.023342916702125613:t[191]>1e-35?P=.030005484947580197:t[4]>4.500000000000001?t[204]>1e-35?P=.047767773119269434:t[136]>1e-35?t[0]>1937.5000000000002?P=-.09989343595668776:P=.06533942033334243:t[15]>1e-35?t[9]>86.50000000000001?P=-.10577989354150097:t[8]>668.5000000000001?t[126]>1e-35?P=-.09165257825246746:t[9]>32.50000000000001?P=.02484870392366004:P=-.008499493096971395:t[8]>24.500000000000004?P=.02459679192828244:P=-.010527978013140512:t[25]>1e-35?t[217]>1e-35?P=.0015644546318714849:P=-.06579524865022705:P=-.0060233890975120614:t[122]>1e-35?t[1]>36.50000000000001?P=.03331853632960164:P=-.09482264761126993:t[19]>1e-35?t[8]>1430.5000000000002?P=-.019091477207111116:P=.037878468575478504:t[94]>1e-35?P=-.08013082284576584:t[4]>2.5000000000000004?t[186]>1e-35?P=.16919658785098224:t[243]>1e-35?P=-.06580584936754524:P=.01567555159935563:t[129]>1e-35?P=.06721746994993226:t[10]>32.50000000000001?P=-.046394462507797975:P=-.006436180519584767;let k;t[131]>1e-35?k=.015039096856208693:t[8]>779.5000000000001?t[145]>1e-35?k=.019122095523977856:t[298]>1e-35?k=.023828936462317443:t[1]>23.500000000000004?t[5]>384.50000000000006?t[7]>59.50000000000001?k=-.026094309429557913:t[204]>1e-35?k=.09163404305658318:t[1]>27.500000000000004?t[149]>1e-35?t[6]>34.50000000000001?k=.012643810980689466:k=-.07884161741497837:k=-.0025267379810891104:t[2]>43.50000000000001?t[0]>2860.5000000000005?k=.04493082949897325:k=.18046359750455776:t[7]>18.500000000000004?k=-.018667348656891496:k=.02584325784698236:k=-.045696524897545915:t[0]>3321.5000000000005?t[201]>1e-35?k=.04749240016989375:k=-.0333334578246718:t[5]>3276.5000000000005?k=.11330554740098908:t[7]>94.50000000000001?k=.1296600395033268:k=-.003576436308940934:t[15]>1e-35?t[183]>1e-35?k=-.13787130789142835:t[0]>1847.5000000000002?k=.017915229729920556:t[10]>23.500000000000004?t[10]>31.500000000000004?t[6]>7.500000000000001?k=.028856848462727104:k=-.11197632885851168:k=.08169801342016791:t[1]>22.500000000000004?k=-.021052888644970163:k=.019048604298876753:t[7]>4.500000000000001?k=-.002603328695276418:t[7]>1.5000000000000002?t[2]>5.500000000000001?k=.03432638833359197:k=-.0036767863082454973:t[1]>48.50000000000001?k=.03087375270128195:t[2]>3.5000000000000004?k=-.04219917149740248:k=.018818493993207935;let Q;t[306]>1e-35?Q=-.04076858123502297:t[13]>1e-35?t[1]>67.50000000000001?t[9]>14.500000000000002?t[9]>53.50000000000001?t[8]>1971.5000000000002?Q=-.09091897542577475:Q=.04042943082645558:t[218]>1e-35?Q=.056254985867151:Q=-.053848117950183044:Q=.003881630017086845:t[5]>5152.500000000001?t[8]>857.5000000000001?t[6]>28.500000000000004?Q=.021581808008986944:Q=-.05639286496176611:Q=.052838875036198954:t[5]>50.50000000000001?t[5]>4082.5000000000005?t[17]>1e-35?Q=.023061479860228728:t[145]>1e-35?t[9]>10.500000000000002?Q=.023885302967553288:Q=.1617794086125622:t[212]>1e-35?Q=.04504545345658806:t[3]>17.500000000000004?t[4]>45.50000000000001?Q=-.03948072448245435:t[1]>47.50000000000001?t[9]>18.500000000000004?Q=.01894935813286188:Q=-.06449356357429188:Q=.012297239104320094:t[1]>26.500000000000004?t[8]>33.50000000000001?Q=-.034718828212885515:Q=.0898976288814321:t[1]>17.500000000000004?Q=-.15440137451988326:Q=-.03864183216821465:Q=.009988507307006308:Q=-.08540311947043305:t[50]>1e-35?Q=-.13323659732101975:t[134]>1e-35?Q=-.031820386486894385:t[32]>1e-35?t[8]>2302.5000000000005?Q=.08082476177379844:Q=-.041665761903645876:t[179]>1e-35?Q=-.12405023987936657:t[39]>1e-35?Q=-.06247416524997478:t[138]>1e-35?Q=-.10724031753676487:Q=-.0005423122305122404;let M;t[308]>1e-35?M=.006160742906729798:t[190]>1e-35?t[0]>2461.5000000000005?t[10]>22.500000000000004?M=.023223358334607133:M=-.04383410185346742:M=-.08542395045055405:t[297]>1e-35?t[8]>51.50000000000001?t[1]>13.500000000000002?M=.023406489302867494:M=-.085521220804058:M=-.02921899554854833:t[298]>1e-35?t[9]>12.500000000000002?M=.028120059780969632:M=-.04211009474298743:t[294]>1e-35?M=-.05040415676618239:t[86]>1e-35?t[1]>36.50000000000001?M=-.0993035220737934:M=-.0005384930611060366:t[230]>1e-35?t[4]>6.500000000000001?M=.029770210551187937:M=-.016272917551655715:t[4]>60.50000000000001?t[280]>1e-35?M=.06421359317599738:M=-.01963732469244167:t[218]>1e-35?t[3]>3.5000000000000004?M=.024368404612215164:M=-.04045232374803373:t[131]>1e-35?M=.017372701982485795:t[120]>1e-35?M=.08812710275150198:t[18]>1e-35?t[90]>1e-35?M=.18451364351180236:t[7]>33.50000000000001?M=-.03850813130183531:t[195]>1e-35?M=.06966114053446336:t[3]>16.500000000000004?M=-.0012869181693341211:t[0]>4242.500000000001?M=-.054625548611291035:M=-.014431095117473881:t[5]>4558.500000000001?t[8]>1.5000000000000002?M=.006302103427145562:M=.13967622319898698:t[121]>1e-35?M=-.038798585213145644:t[5]>4544.500000000001?M=-.08050498033009466:M=-.002986974112681435;let N;t[0]>384.50000000000006?t[2]>101.50000000000001?t[1]>16.500000000000004?N=-.03461119351456781:N=.05659026566680352:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?N=-.12404435523286539:N=-.0034376913880382956:N=-.09821622245095822:t[131]>1e-35?t[9]>1.5000000000000002?N=.0037507103585310234:N=.03610387965829944:t[8]>999.5000000000001?t[9]>137.50000000000003?N=-.11985021663179699:t[0]>1847.5000000000002?t[126]>1e-35?N=-.04832024079663151:t[37]>1e-35?N=-.037103393468366934:N=-.004248086592531705:t[8]>3084.0000000000005?t[9]>43.50000000000001?N=.032539071163832034:t[5]>1643.5000000000002?N=.036408625378035665:t[0]>1500.5000000000002?N=-.1346358322854993:N=-.027586559522081014:t[3]>1e-35?t[190]>1e-35?N=-.1133991164577881:t[9]>52.50000000000001?N=-.024478640359723122:N=.03673777861098756:N=-.1037451237591819:t[230]>1e-35?t[9]>48.50000000000001?t[10]>20.500000000000004?N=.002583438691776944:N=.10773520810108106:t[9]>12.500000000000002?t[1]>16.500000000000004?N=-.02141222346712401:N=.06392462314316179:t[4]>12.500000000000002?N=.08700122294434816:t[8]>267.50000000000006?N=.056923170082743224:N=-.07716309825583327:t[32]>1e-35?N=-.03961343943752142:N=.002674914122888783:t[1]>42.50000000000001?N=-.05217539654421676:t[145]>1e-35?N=.09553630282946368:N=-.009424791262477729;let G;t[183]>1e-35?G=-.05753337139158443:t[308]>1e-35?G=.00562436671450989:t[9]>7.500000000000001?t[21]>1e-35?t[10]>8.500000000000002?G=-.10477869875380448:G=-.0070301869937306055:t[3]>9.500000000000002?t[8]>1765.5000000000002?t[0]>4571.500000000001?G=-.12526505173232894:t[10]>1e-35?t[9]>71.50000000000001?G=-.04442302951713574:G=.00012409888451734224:G=-.092199119633697:t[225]>1e-35?G=.13773072450201831:t[0]>2882.5000000000005?G=.0028540012229920533:t[298]>1e-35?G=.07134486044361629:G=.014297412329837425:t[145]>1e-35?G=.05608385321902638:t[92]>1e-35?G=.038298413603926135:t[107]>1e-35?t[2]>6.500000000000001?G=-.0039957800609801315:G=.0776927564241081:t[203]>1e-35?G=-.05502900859432093:t[105]>1e-35?G=.06062892720841595:G=-.009574839629252128:t[31]>1e-35?G=.009488858841144216:t[23]>1e-35?t[20]>1e-35?G=.08818126313644752:t[8]>161.50000000000003?G=.014353968957885408:G=-.022240738532827903:t[210]>1e-35?G=.024648862719806694:t[2]>5.500000000000001?t[4]>4.500000000000001?t[17]>1e-35?t[10]>16.500000000000004?G=-.043902062079383485:G=-.014741559220396223:G=-.00934935734853194:t[6]>32.50000000000001?G=.1514593126307404:G=.010771222510801532:t[10]>22.500000000000004?G=.01412495209334078:G=-.08576940379502533;let O;t[0]>384.50000000000006?t[84]>1e-35?O=-.06647690967306838:t[2]>101.50000000000001?O=-.024451334501552457:t[306]>1e-35?O=-.034517188927733505:t[131]>1e-35?t[9]>1.5000000000000002?O=.0031858381443673127:O=.032574927024450646:t[204]>1e-35?t[1]>62.50000000000001?O=-.08601340441214533:t[1]>29.500000000000004?O=.10487598629539963:t[8]>597.5000000000001?O=-.0786529133673238:O=.08689436600511559:t[8]>779.5000000000001?t[10]>2.5000000000000004?t[9]>100.50000000000001?O=-.04883600353740688:t[126]>1e-35?O=-.03794042763348827:O=-.003358871967539988:t[210]>1e-35?O=.054991356498447566:t[6]>19.500000000000004?O=-.007418396981635549:O=.018032606049498613:t[18]>1e-35?t[7]>35.50000000000001?t[2]>44.50000000000001?O=-.02143003429501711:O=-.09016000554055564:t[1]>19.500000000000004?t[1]>42.50000000000001?t[8]>17.500000000000004?O=-.006636355416244082:O=-.06483095743431454:t[4]>21.500000000000004?O=-.028975965946833545:O=.022012264796522657:O=-.06653648243193663:t[5]>4593.500000000001?O=.01753551428088607:t[217]>1e-35?O=-.028864824937700297:t[94]>1e-35?O=-.04885192273020658:t[279]>1e-35?O=.08105715462329498:t[121]>1e-35?O=-.04576676034750651:O=.004795141324949362:t[1]>42.50000000000001?O=-.047446619702809195:t[145]>1e-35?O=.08400495571952321:O=-.00854528836489364;let D;t[294]>1e-35?D=-.042529778074638265:t[266]>1e-35?D=-.1180276669679798:t[134]>1e-35?D=-.026818144353279623:t[183]>1e-35?D=-.05120747503479363:t[227]>1e-35?t[8]>1641.5000000000002?D=-.07265906898294434:t[4]>12.500000000000002?t[17]>1e-35?D=-.027516137530797014:t[0]>4331.500000000001?t[1]>64.50000000000001?D=-.03049646619610203:t[1]>50.50000000000001?D=.20634590755061122:D=.06956378103625731:t[0]>3770.5000000000005?D=-.07946414366134913:t[19]>1e-35?D=.17083312065604694:t[2]>21.500000000000004?D=-.02327981978127724:D=.129717297518715:t[145]>1e-35?D=.006891245076133524:D=-.0789123467863741:t[3]>99.50000000000001?D=-.02022281202803071:t[302]>1e-35?t[10]>47.50000000000001?D=.06447639919732716:D=-.05457561977645972:t[306]>1e-35?D=-.029995903305383882:t[191]>1e-35?D=.030596508110850414:t[242]>1e-35?D=-.024085578702020216:t[8]>3198.5000000000005?t[297]>1e-35?D=.09518584795377832:D=-.018197744600833596:t[13]>1e-35?D=.006751790086127549:t[148]>1e-35?D=.01904174573618417:t[99]>1e-35?D=.025287735102561926:t[4]>14.500000000000002?D=-.004364337681643273:t[1]>15.500000000000002?t[35]>1e-35?D=-.09467943982430241:t[243]>1e-35?D=-.02521824751996268:D=.005437570718352172:D=-.022476214821960674;let F;t[0]>384.50000000000006?t[84]>1e-35?F=-.06088131453064195:t[147]>1e-35?F=-.05332792965930566:t[135]>1e-35?t[9]>32.50000000000001?F=.04219361472548491:F=-.07227529211725771:t[10]>4.500000000000001?t[21]>1e-35?F=-.0787279848043689:t[17]>1e-35?t[3]>18.500000000000004?t[188]>1e-35?F=-.054347604504400286:t[0]>3544.5000000000005?t[0]>5850.500000000001?F=-.11431764534511478:F=.013549717238356157:F=-.020987333767091276:t[6]>2.5000000000000004?F=-.02914877855133127:F=.08483464900160231:t[8]>58.50000000000001?t[183]>1e-35?F=-.10087072787978416:t[37]>1e-35?F=-.030467397753331196:t[229]>1e-35?F=-.1017559811057469:t[4]>20.500000000000004?F=-.00413177742240167:t[20]>1e-35?F=.05213315982685969:F=.0037921635866823133:t[8]>51.50000000000001?F=.07327913092421544:t[6]>49.50000000000001?F=-.03457694284156811:t[6]>18.500000000000004?t[7]>17.500000000000004?F=.02744420891894289:F=.11288946357194463:F=.003482908820966248:t[18]>1e-35?t[1]>20.500000000000004?t[7]>4.500000000000001?F=-.012329314369909049:F=.026816658655600168:F=-.0872405354618811:F=.007872673500247845:t[1]>42.50000000000001?F=-.04309044198258254:t[145]>1e-35?F=.07572529147860785:t[7]>5.500000000000001?F=-.013837187093264945:t[1]>17.500000000000004?F=.04208698439539668:F=-.06284346769019863;let U;t[294]>1e-35?U=-.0384794324818203:t[266]>1e-35?U=-.1087205883821061:t[32]>1e-35?t[8]>2302.5000000000005?U=.07432960094940501:U=-.035248735855751855:t[134]>1e-35?U=-.02456191365284949:t[121]>1e-35?t[0]>4720.500000000001?t[1]>39.50000000000001?U=-.01706896375068821:U=.08212247914968074:t[2]>59.50000000000001?U=-.09546478958824225:t[6]>53.50000000000001?U=.12317082897575611:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?U=.02816463285971267:U=.15449139016588445:U=-.10199787406123524:U=-.038068684323297096:t[223]>1e-35?t[8]>668.5000000000001?U=-.13924786681478077:U=-.0072772442570213335:t[39]>1e-35?U=-.05392786531177836:t[0]>93.50000000000001?t[40]>1e-35?U=-.054059371343144036:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?U=-.11174465335620831:U=.00013144040097180107:U=-.08493919336681105:t[42]>1e-35?U=-.11078582572836196:t[84]>1e-35?t[4]>17.500000000000004?U=-.015540659878839153:U=-.14442609417300142:t[21]>1e-35?U=-.025251979447574083:U=.0023698372645272847:t[18]>1e-35?U=.07269739695712212:t[8]>2592.5000000000005?U=-.1460388776448558:t[9]>30.500000000000004?t[1]>23.500000000000004?U=-.01835130329646532:t[9]>45.50000000000001?U=.02023047454629885:U=.16469378262221102:U=-.042975030085836426;let L;t[8]>2915.5000000000005?t[297]>1e-35?L=.06257393915394144:t[0]>93.50000000000001?t[4]>1.5000000000000002?L=-.01034964686484714:L=-.07357437440667927:L=-.11987794734779106:t[298]>1e-35?t[8]>81.50000000000001?t[0]>3370.5000000000005?t[8]>155.50000000000003?t[8]>660.5000000000001?t[8]>2134.5000000000005?L=-.09476398869062203:t[9]>72.50000000000001?L=-.0757383854264379:L=.02806542779508718:L=-.05147742568418084:L=.10212721564444344:L=.0518263760642861:L=-.08743405377022222:t[189]>1e-35?t[0]>5269.500000000001?L=-.10669213185972036:L=.027050434286384796:t[302]>1e-35?L=-.0407832394672723:t[116]>1e-35?t[10]>38.50000000000001?L=.06354599160071946:t[1]>67.50000000000001?L=.05317447949011187:L=-.059138165935307165:t[212]>1e-35?t[19]>1e-35?L=-.09369289448773599:t[0]>2215.5000000000005?L=.04077965380363924:t[0]>807.5000000000001?L=-.0591771776458298:L=.057315736906679376:t[308]>1e-35?t[1]>52.50000000000001?t[5]>3749.5000000000005?L=-.016323380219241672:L=.007291062979527741:t[210]>1e-35?t[8]>1641.5000000000002?L=.03720704290087811:L=-.008730548158766654:t[4]>80.50000000000001?L=-.05346644687473197:L=.014596824736762107:t[218]>1e-35?t[3]>3.5000000000000004?L=.019984510398089086:L=-.03917825025861855:t[9]>170.50000000000003?L=-.09759719821334525:L=-.0023586682752856298;let H;t[183]>1e-35?t[17]>1e-35?H=.030100940443356424:t[10]>1.5000000000000002?H=-.10861112216742408:H=.017680668976453255:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?H=-.032062878390325456:H=-.10808232631806887:t[8]>1641.5000000000002?H=-.06147013392655731:t[4]>12.500000000000002?H=.03324767551088266:t[145]>1e-35?H=.028851633810612017:H=-.054871239091792784:t[134]>1e-35?H=-.023813968121342108:t[266]>1e-35?H=-.10037039667146351:t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>1939.5000000000002?H=-.055566877553100726:t[2]>24.500000000000004?t[8]>182.50000000000003?t[10]>43.50000000000001?t[10]>55.50000000000001?H=-.025350325484720576:H=.1579024598549572:t[9]>2.5000000000000004?t[0]>3746.5000000000005?H=.056817276537534815:H=-.07674158463557636:H=-.06335553143454145:t[1]>56.50000000000001?H=.16390494217299284:H=-.0027330160430847177:t[10]>36.50000000000001?t[8]>1067.5000000000002?H=.041717597065890205:H=-.10357913492269129:t[10]>29.500000000000004?H=.1365512866715726:H=.020600048310575665:H=.09708785634773187:H=-.060427658852305666:t[126]>1e-35?t[10]>32.50000000000001?t[6]>24.500000000000004?t[8]>1146.5000000000002?H=-.03146213719547347:H=.11784024316238083:H=-.050940520532045355:H=-.047988344143075616:t[191]>1e-35?H=.028764654731460032:H=.0011911575567860023;let $;t[294]>1e-35?t[10]>50.50000000000001?$=-.11630092297244568:t[0]>2432.5000000000005?t[0]>4199.500000000001?$=-.05103908560370243:$=.05002066201169583:$=-.09976646725732496:t[32]>1e-35?t[0]>4242.500000000001?$=-.0648838712201258:t[5]>3721.5000000000005?t[9]>4.500000000000001?$=.127983140816313:$=-.05436534163636867:$=-.024514536544596455:t[121]>1e-35?t[0]>4449.500000000001?t[4]>9.500000000000002?$=-.009504203657088933:t[8]>819.5000000000001?$=.18689664822602375:$=.03635576744011826:$=-.029862411809998525:t[223]>1e-35?$=-.06474496692999487:t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?$=-.09405026597863717:t[0]>4153.500000000001?$=.053577663326799765:$=-.05062127873995668:$=.06512222894425874:t[39]>1e-35?$=-.04985311717827547:t[51]>1e-35?$=-.04541229517934797:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?$=-.02860634573675884:$=.08863753005590103:$=.11158892111063744:t[0]>655.5000000000001?$=-.031005736641654926:$=-.1439827004505974:t[222]>1e-35?t[1]>11.500000000000002?t[0]>612.5000000000001?$=-.00843386136334982:$=-.05273594615999777:$=.1060183822015004:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?$=-.015774115523598486:$=.10147367091236065:$=-.048307000563071016:$=.002118376117677254;let W;t[8]>1014.5000000000001?t[9]>137.50000000000003?W=-.10279096288817871:t[0]>93.50000000000001?t[8]>1067.5000000000002?t[227]>1e-35?W=-.03544332389470493:t[285]>1e-35?t[9]>64.50000000000001?W=.07211107542565391:W=-.041556776020476104:t[145]>1e-35?t[1]>66.50000000000001?W=-.0751486415451188:t[1]>59.50000000000001?W=.13459005084554104:W=.024184371850147466:t[0]>3072.5000000000005?t[95]>1e-35?W=.06715575425741895:W=-.005895690393702183:t[8]>2915.5000000000005?W=-.010205039411753762:t[9]>33.50000000000001?t[9]>47.50000000000001?W=-.00029068886245881074:W=.0613467393188786:t[148]>1e-35?W=-.06074463294936236:t[3]>1.5000000000000002?t[5]>1849.5000000000002?t[1]>15.500000000000002?W=.003887223773199377:W=-.08553893131979015:W=.025654192706396767:W=-.05651733979610658:W=-.02039913645229667:t[2]>7.500000000000001?W=-.1058450646728524:W=.02267192191610376:t[1]>120.50000000000001?t[2]>60.50000000000001?W=-.12304707569000428:t[1]>132.50000000000003?t[6]>41.50000000000001?W=.1283258201586378:W=-.01718135372229775:W=-.07702452408491414:t[125]>1e-35?W=-.0804612900572707:t[178]>1e-35?t[0]>4533.500000000001?W=.04273051857848212:W=-.04533122948101463:t[2]>196.50000000000003?W=-.10543331044088727:t[94]>1e-35?t[5]>4532.500000000001?W=.0231032972703664:W=-.04807386814498683:W=.002729435991332102;let j;t[179]>1e-35?j=-.08065315471211375:t[183]>1e-35?t[17]>1e-35?j=.026484626664041125:t[10]>1.5000000000000002?j=-.10187000872941615:j=.015274190652133752:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?j=.09574540795390041:j=-.06454986703691233:j=-.11411849349353141:t[266]>1e-35?j=-.09281838517322076:t[32]>1e-35?t[8]>2302.5000000000005?j=.06685250330182936:t[4]>67.50000000000001?t[2]>97.50000000000001?j=-.04403391373512386:j=.1132928075412222:t[2]>47.50000000000001?j=-.09700191391838056:j=-.02147184357182825:t[10]>4.500000000000001?t[21]>1e-35?j=-.0735617817957859:t[17]>1e-35?t[3]>18.500000000000004?j=-.001668912999010927:j=-.02363511102970245:t[8]>58.50000000000001?j=-.00035213368294640616:t[3]>17.500000000000004?t[2]>28.500000000000004?t[10]>23.500000000000004?t[1]>38.50000000000001?j=.0911011436534449:t[1]>28.500000000000004?j=-.07192390493729035:j=.06913818091291246:j=-.012312625373699222:j=.06784496312307986:j=-167756936027735e-19:t[18]>1e-35?t[8]>302.50000000000006?j=.0026564453057705273:j=-.025425772389361445:t[122]>1e-35?j=-.12046786388602149:t[0]>3183.5000000000005?j=.01162092842804907:t[91]>1e-35?j=.07000265526928563:t[1]>22.500000000000004?t[0]>576.5000000000001?j=-.0001647792543020228:j=-.023664538532907665:j=.01609078206180752;let ce;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4141.500000000001?ce=-.051473645433684705:t[0]>3030.5000000000005?t[1]>51.50000000000001?ce=-.017696526862422682:ce=.1450050954613223:ce=-.05406930069823832:ce=-.08308700260259043:t[120]>1e-35?ce=.058316269489189415:t[297]>1e-35?t[94]>1e-35?ce=-.07425512495167255:t[8]>51.50000000000001?t[1]>13.500000000000002?t[1]>33.50000000000001?t[19]>1e-35?t[0]>4498.500000000001?ce=.038431826961746934:ce=-.05937462906539856:t[9]>65.50000000000001?ce=.10814845712507865:t[4]>9.500000000000002?t[2]>22.500000000000004?t[1]>39.50000000000001?t[1]>44.50000000000001?t[10]>44.50000000000001?ce=.12297945639231944:t[0]>3796.5000000000005?t[4]>26.500000000000004?ce=-.09579030954062734:ce=.025064711572811746:ce=.02579440518821548:ce=.1044440128091862:ce=-.058348633139536844:ce=.07766788227934436:ce=-.01021229539092708:t[2]>2.5000000000000004?t[10]>29.500000000000004?t[0]>3770.5000000000005?t[0]>4438.500000000001?ce=.07463684068207214:ce=.18244269035484484:t[6]>39.50000000000001?ce=-.06050050067471004:ce=.05787759066913493:ce=.010783225857972171:ce=.1674891243602606:t[4]>9.500000000000002?ce=-.004814132027475892:ce=-.14543299413454813:ce=-.02935093398687923:t[116]>1e-35?t[9]>2.5000000000000004?t[8]>1218.5000000000002?ce=-.07634466313617769:ce=.0287825335169114:ce=-.06894721943300268:ce=-.00023988459059521937;let J;t[131]>1e-35?t[1]>93.50000000000001?J=-.05706887458825395:t[2]>1.5000000000000002?J=.011446637886629108:J=-.10616119878749211:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?J=.08424281276381033:t[3]>17.500000000000004?t[20]>1e-35?J=.11146885439601915:t[8]>61.50000000000001?t[0]>3530.5000000000005?t[9]>48.50000000000001?t[9]>61.50000000000001?J=.026278724448495064:J=.17053138400480508:t[0]>4463.500000000001?J=-.06482289890096041:J=.03026516489536295:J=-.031785170717683144:J=.1312690622980455:t[13]>1e-35?J=.14336922540461444:J=.03523850945454039:J=-.015407465968975714:t[39]>1e-35?J=-.054809635385158186:t[32]>1e-35?t[0]>4242.500000000001?J=-.0659975068798723:J=-.008386582621403979:t[4]>60.50000000000001?t[10]>75.50000000000001?t[3]>107.50000000000001?J=-.04225314193574262:t[3]>70.50000000000001?t[1]>29.500000000000004?J=.057409156184759516:J=.2024322059866388:J=-.030670938454461245:t[10]>1e-35?t[0]>4733.500000000001?J=.010648654146284154:t[308]>1e-35?J=.008728141696325391:t[4]>64.50000000000001?t[298]>1e-35?J=.12364025998551711:J=-.02247495081065243:t[1]>22.500000000000004?J=-.0726295464624251:J=.03481895086048152:t[0]>4331.500000000001?J=-.04775443357020673:J=.07172377425057568:t[2]>89.50000000000001?J=-.11782645274716962:J=.00010092665257989378;let Te;t[147]>1e-35?Te=-.041560228567115574:t[302]>1e-35?t[10]>47.50000000000001?Te=.062292114082780084:t[10]>5.500000000000001?t[7]>22.500000000000004?Te=-.016101990375700172:t[0]>2579.5000000000005?Te=-.13045089661551845:Te=-.02874367814784938:Te=.025835149631944995:t[167]>1e-35?t[0]>3928.5000000000005?Te=.17084176915326055:Te=-.019195947948312853:t[222]>1e-35?t[30]>1e-35?t[1]>36.50000000000001?t[8]>45.50000000000001?t[8]>578.5000000000001?t[1]>67.50000000000001?Te=.10591712319944074:Te=-.024082167264285:Te=.16497698867036126:Te=-.04985066326861431:t[0]>1937.5000000000002?t[2]>16.500000000000004?Te=-.021012910475524206:Te=-.13058422554298485:t[0]>1102.5000000000002?Te=.10955864175201457:Te=-.03566689354348996:t[1]>11.500000000000002?Te=-.02093884208606101:Te=.09107244766183857:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?Te=-.013861861436128482:Te=.09756849802202777:t[224]>1e-35?t[1]>51.50000000000001?Te=.10163873449625677:Te=-.02779270277623805:t[1]>26.500000000000004?Te=-.08035058228527389:Te=.0005719695099064484:t[191]>1e-35?t[9]>9.500000000000002?Te=-.007028075523033826:Te=.0489470913925288:t[1]>61.50000000000001?t[132]>1e-35?Te=.11230846723576784:t[0]>350.50000000000006?t[2]>1.5000000000000002?Te=-.0032075580718124892:Te=-.04442829143298883:Te=-.06597073245775804:Te=.0015594090939337751;let fe;t[223]>1e-35?t[8]>668.5000000000001?fe=-.12803889879260094:fe=.002171373740016862:t[121]>1e-35?t[0]>4720.500000000001?t[217]>1e-35?fe=.08967966612917375:t[1]>39.50000000000001?fe=-.059791671514498074:fe=.05648934961902822:t[2]>59.50000000000001?fe=-.08633234097449628:t[6]>53.50000000000001?fe=.11140345067444689:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?fe=.025606129643140924:fe=.13835395886271978:fe=-.09361630641448024:t[4]>7.500000000000001?t[1]>26.500000000000004?t[1]>49.50000000000001?fe=-.09975506556937946:t[10]>36.50000000000001?fe=-.09427724661655643:t[10]>24.500000000000004?fe=.07329330653410447:fe=-.02271182965807972:fe=-.09767874967639482:t[6]>13.500000000000002?t[10]>23.500000000000004?fe=-.05082091374050816:fe=.1687114435254966:t[0]>2314.5000000000005?fe=-.06422664016383926:fe=.0636688376664789:t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?fe=-.06857762517406195:t[9]>71.50000000000001?t[0]>4188.500000000001?fe=-.1274167728754332:fe=.01308079126447365:t[4]>73.50000000000001?fe=.13854015371106546:t[4]>48.50000000000001?fe=-.03684255740123261:t[6]>45.50000000000001?fe=.10329912215813097:t[10]>77.50000000000001?fe=-.08630788656925215:fe=.031022006843800853:t[1]>25.500000000000004?fe=-.08278381528048026:fe=.06664374548141594:t[84]>1e-35?fe=-.05624227409079396:fe=.00012184182357340415;let Ne;t[179]>1e-35?Ne=-.07443348719246982:t[40]>1e-35?t[0]>1937.5000000000002?Ne=-.07595415373151816:Ne=.054065040429292326:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[0]>1187.5000000000002?Ne=.022822510448266862:Ne=.17491569312933697:Ne=-.058362287133533565:t[2]>2.5000000000000004?Ne=-.03633895806364428:Ne=.06397808186120692:t[8]>4968.500000000001?t[1]>31.500000000000004?Ne=-.07294848747514579:Ne=.025053613105805606:t[230]>1e-35?t[4]>6.500000000000001?t[107]>1e-35?Ne=-.07009535282685533:t[8]>2640.0000000000005?Ne=-.051761240111316276:t[131]>1e-35?Ne=-.06245774419231631:Ne=.03495606662854905:Ne=-.013863522184803188:t[131]>1e-35?t[1]>93.50000000000001?t[1]>105.50000000000001?Ne=.0015036626973581122:Ne=-.12505706794835883:t[1]>48.50000000000001?t[276]>1e-35?Ne=.10435171369790015:t[0]>5026.500000000001?t[0]>5308.500000000001?Ne=.022343994371919224:Ne=-.14087991797693533:t[8]>1323.5000000000002?t[10]>49.50000000000001?Ne=.07724450228328664:t[0]>3853.5000000000005?Ne=-.15671707454435677:t[10]>28.500000000000004?Ne=-.10179090671841723:Ne=.014878216919760927:Ne=.03967665658164865:t[8]>2696.5000000000005?t[15]>1e-35?Ne=.14054154485273487:Ne=.01821247272493051:t[2]>5.500000000000001?t[2]>100.50000000000001?Ne=-.08632985141410315:Ne=.005524157938954954:Ne=-.08802502622523681:Ne=-.0004649168897260341;let Ve;t[86]>1e-35?t[8]>65.50000000000001?t[1]>32.50000000000001?t[4]>16.500000000000004?Ve=-.007458687464321174:Ve=-.09444966249102484:t[1]>23.500000000000004?Ve=.08564129697360716:Ve=-.07105002902845851:Ve=.05688756955238231:t[294]>1e-35?t[10]>50.50000000000001?Ve=-.10326216566705966:t[1]>26.500000000000004?Ve=.0050539832484585365:Ve=-.07080395606126953:t[306]>1e-35?t[149]>1e-35?Ve=-.10399433201474328:t[2]>14.500000000000002?t[9]>6.500000000000001?Ve=.05783632021087773:t[10]>17.500000000000004?Ve=-.06720598671764105:t[1]>47.50000000000001?Ve=.097495825172558:Ve=-.013372242800584872:Ve=-.06463226787713715:t[42]>1e-35?Ve=-.0885725817597767:t[204]>1e-35?t[1]>62.50000000000001?Ve=-.07496598696848249:t[1]>29.500000000000004?t[8]>446.50000000000006?Ve=.11051270080118503:Ve=.027719462817590454:t[8]>597.5000000000001?Ve=-.08441503592016869:Ve=.05534229430302502:t[223]>1e-35?t[8]>668.5000000000001?Ve=-.12190088985091102:Ve=-.0067442838156576345:t[148]>1e-35?t[9]>79.50000000000001?Ve=.09225972475904022:t[2]>10.500000000000002?t[1]>102.50000000000001?Ve=.11805676536334647:t[8]>1726.5000000000002?t[9]>10.500000000000002?Ve=.016585157185448045:Ve=-.11032043771149425:Ve=.01586986028570486:t[8]>388.50000000000006?Ve=-.10592413013261853:Ve=.04930703248769364:t[13]>1e-35?Ve=.003621937787920821:Ve=-.0013786331198611841;let Ue;t[145]>1e-35?t[1]>32.50000000000001?t[1]>38.50000000000001?t[10]>55.50000000000001?t[1]>54.50000000000001?Ue=.009769895322846493:Ue=-.10620052926943656:t[9]>19.500000000000004?Ue=.03781202525403449:t[9]>14.500000000000002?Ue=-.11485785321365344:t[9]>6.500000000000001?Ue=.07677177833073881:t[0]>4342.500000000001?Ue=-.07079285609687631:t[49]>1e-35?Ue=.06156814809246001:Ue=-.014788509042554625:Ue=-.032659201618470655:t[5]>5207.500000000001?Ue=-.09013500825185713:t[3]>10.500000000000002?t[8]>1787.5000000000002?Ue=-.03094160322187924:t[1]>29.500000000000004?Ue=.09474646043921069:Ue=.023445783928231618:Ue=.09342846694174194:t[0]>533.5000000000001?t[204]>1e-35?t[1]>62.50000000000001?Ue=-.07164443768784848:t[1]>29.500000000000004?Ue=.089473622509272:t[8]>597.5000000000001?Ue=-.08155349903101317:Ue=.07098423265024251:t[8]>691.5000000000001?t[5]>2252.5000000000005?Ue=-.004003900679358653:t[190]>1e-35?Ue=-.09236113461485262:t[8]>3198.5000000000005?Ue=-.0124130160451179:Ue=.018453070064009328:t[15]>1e-35?Ue=.012013209112857824:t[7]>4.500000000000001?t[7]>5.500000000000001?Ue=-.0009580759587680961:Ue=-.03227283036698222:Ue=.01369287669536875:t[1]>50.50000000000001?Ue=-.04213060332500437:t[35]>1e-35?Ue=-.11508095777767471:t[190]>1e-35?Ue=-.08611884672400155:t[297]>1e-35?Ue=.05723551879433584:Ue=-.004829340082311461;let Ke;t[183]>1e-35?Ke=-.037994150023203555:t[227]>1e-35?t[17]>1e-35?t[3]>20.500000000000004?t[10]>36.50000000000001?Ke=-.11753465135886734:Ke=-.007515490299047085:Ke=-.08576941990777916:t[8]>1641.5000000000002?t[10]>37.50000000000001?Ke=-.12371142493530439:t[1]>36.50000000000001?Ke=.032189417575190435:Ke=-.10339125953022954:t[3]>32.50000000000001?t[4]>27.500000000000004?t[1]>59.50000000000001?Ke=-.0784518658439288:t[2]>54.50000000000001?Ke=.12477882322370665:Ke=.000313468482399738:Ke=.12261955132611434:t[8]>81.50000000000001?t[23]>1e-35?Ke=.04969252946760318:t[8]>511.50000000000006?t[8]>1146.5000000000002?Ke=.0353146070135579:Ke=-.06327619611098285:Ke=.02813577701641991:Ke=-.12354390728506215:t[34]>1e-35?Ke=-.07664408516055397:t[3]>99.50000000000001?t[1]>16.500000000000004?t[1]>26.500000000000004?Ke=-.01245803535276381:Ke=-.07169472553475001:t[1]>11.500000000000002?Ke=.12989984824561698:Ke=-.01201544398886606:t[6]>91.50000000000001?t[1]>22.500000000000004?Ke=.010390226893521422:t[10]>14.500000000000002?Ke=.16790888126487719:Ke=.010614982228955577:t[4]>79.50000000000001?t[9]>44.50000000000001?t[0]>3853.5000000000005?Ke=-.043398307129729134:Ke=.09963544907820426:t[9]>30.500000000000004?Ke=-.13540713124984502:t[9]>17.500000000000004?Ke=.0509435850590757:Ke=-.04761897852404613:t[4]>78.50000000000001?Ke=.09197086656470652:Ke=.0006771050176682337;let X;t[122]>1e-35?t[6]>36.50000000000001?X=.05686884451670743:X=-.05334759543084309:t[266]>1e-35?X=-.08603579519816038:t[157]>1e-35?X=-.06736746113382097:t[302]>1e-35?t[0]>2579.5000000000005?X=-.0499592651503952:t[0]>725.5000000000001?X=.11780353905132664:X=-.05232097173108943:t[147]>1e-35?t[1]>53.50000000000001?X=-.11398297342629615:t[0]>2604.5000000000005?t[0]>3629.5000000000005?X=-.03190157229022304:X=.07985197845805492:X=-.0763078988943886:t[4]>41.50000000000001?t[280]>1e-35?X=.05162933940904835:t[11]>1e-35?t[0]>460.50000000000006?X=-.027174047777029083:X=.057117284879796476:t[3]>43.50000000000001?X=-.0016147040913107311:X=-.05856597304613519:t[2]>45.50000000000001?t[0]>4663.500000000001?t[18]>1e-35?X=-.04779247091640426:t[10]>25.500000000000004?t[9]>22.500000000000004?t[22]>1e-35?X=-.01466076988151239:X=.13375695925484857:X=-.04885873081899647:t[0]>5566.500000000001?X=.11086813028591343:t[8]>992.5000000000001?X=-.07622304217072383:X=.04316019272026325:t[10]>12.500000000000002?t[9]>36.50000000000001?t[9]>45.50000000000001?X=.03285858361708423:X=-.12354858211764992:X=.0672788301823281:t[15]>1e-35?X=.08658836986585006:X=-.02741484278509758:t[290]>1e-35?X=-.08161310335133287:t[135]>1e-35?X=-.04824156054814152:X=.0009156904299554183;let le;t[3]>7.500000000000001?le=.0006791852818377787:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?le=.03642374718166293:le=.16379973756366603:le=-.03946685266127979:t[186]>1e-35?le=.07618896623420895:t[96]>1e-35?le=.0680272261319657:t[107]>1e-35?t[1]>48.50000000000001?le=-.022822371600847505:le=.0501405836324949:t[203]>1e-35?t[1]>77.50000000000001?le=.044416424920571296:le=-.0648450593196238:t[5]>3921.5000000000005?t[1]>110.50000000000001?le=-.11110466767595227:t[9]>5.500000000000001?t[9]>52.50000000000001?t[1]>50.50000000000001?le=.1061937286809567:t[7]>54.50000000000001?le=.11487507743121311:t[8]>819.5000000000001?le=-.07181278009001418:t[10]>25.500000000000004?le=.13499019430369633:t[1]>31.500000000000004?le=.09032979489780704:le=-.12754166393372374:t[9]>37.50000000000001?le=-.05093963635361407:le=-.005026651151683848:t[9]>2.5000000000000004?le=.07619735785573735:le=.012363301341532136:t[26]>1e-35?le=-.10685800454968203:t[8]>125.50000000000001?t[8]>446.50000000000006?t[0]>3842.5000000000005?le=-.08783796894105043:t[282]>1e-35?t[1]>47.50000000000001?t[9]>40.50000000000001?le=-.10764172927882483:le=.01890760098464703:le=.06573095405846417:t[8]>634.5000000000001?le=-.00783575973273707:le=-.050612689680229306:t[1]>22.500000000000004?le=-.0016842490401359626:le=.0738227088444087:le=-.02663970950432175;let te;t[31]>1e-35?t[8]>17.500000000000004?te=.013678038624884814:t[1]>35.50000000000001?t[1]>51.50000000000001?te=.007191286124908192:te=-.09347881647636902:t[10]>1.5000000000000002?te=.07938758708008091:te=-.008702935600305113:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?te=.12321804057595996:te=-.018281109320672437:t[23]>1e-35?t[4]>62.50000000000001?te=-.04644244754790671:te=.024546310702263208:t[8]>862.5000000000001?t[0]>3429.5000000000005?t[4]>9.500000000000002?t[52]>1e-35?te=.0706108609273337:t[2]>40.50000000000001?te=-.028046629962303716:te=-.06497613993109329:te=.01076489668586676:t[1]>33.50000000000001?t[0]>966.5000000000001?t[2]>14.500000000000002?t[1]>38.50000000000001?te=-.03056331974267756:te=-.11886389712497057:te=.053364962175658184:t[8]>2233.5000000000005?te=-.0448152521157682:te=.1508651602190868:t[2]>33.50000000000001?t[0]>2882.5000000000005?t[0]>3183.5000000000005?te=.03818796510453344:te=.23673992112982362:te=.02858814226507374:t[10]>44.50000000000001?te=-.1125863771551199:te=.009129996952394916:t[1]>7.500000000000001?te=-.004374525302461639:te=-.07858519434925451:t[149]>1e-35?t[6]>23.500000000000004?te=.0005231594491642136:t[0]>4053.5000000000005?t[8]>660.5000000000001?te=-.13677189943034931:t[10]>2.5000000000000004?te=.039591891437078086:te=-.09312596849507347:te=-.02423172142089822:te=.0009836986075266283;let xe;t[189]>1e-35?t[0]>5269.500000000001?xe=-.103183298350443:t[2]>51.50000000000001?xe=.09784373530929913:t[10]>26.500000000000004?t[8]>764.5000000000001?xe=-.05186168947388339:xe=.0496996365539082:t[10]>23.500000000000004?xe=.1404445738719:t[93]>1e-35?xe=.0027146310074558505:t[5]>3821.5000000000005?xe=.002153033152069652:t[4]>2.5000000000000004?xe=.007663539551317215:xe=.13902616832015402:t[298]>1e-35?t[8]>81.50000000000001?t[4]>64.50000000000001?xe=.11498405722487515:t[2]>23.500000000000004?t[0]>2815.5000000000005?t[2]>44.50000000000001?t[4]>42.50000000000001?xe=-.021479467709980358:xe=.09336868994327292:t[1]>22.500000000000004?t[15]>1e-35?xe=.021660293256233334:xe=-.0927396152303864:xe=.0665074081601698:t[0]>1550.5000000000002?xe=.08972407105958534:xe=-.0380796411182682:t[6]>13.500000000000002?t[10]>2.5000000000000004?xe=.06761927942466854:xe=-.015762168112653286:t[17]>1e-35?xe=.10311304131145381:xe=-.017672785252336027:xe=-.08629805732772755:t[1]>24.500000000000004?t[138]>1e-35?xe=-.10638321435298535:xe=.0007073011744385905:t[18]>1e-35?xe=-.027056185501334325:t[145]>1e-35?xe=.023191199677450886:t[9]>33.50000000000001?t[201]>1e-35?xe=.09762140519655171:t[9]>110.50000000000001?xe=-.06581942957595835:t[6]>54.50000000000001?xe=.04959634035251596:xe=.0022616298654554207:xe=-.007437620924990854;let Z;t[179]>1e-35?Z=-.06961998209988884:t[167]>1e-35?t[0]>3928.5000000000005?Z=.1470294450403005:Z=-.01671476793947083:t[187]>1e-35?t[6]>13.500000000000002?t[4]>30.500000000000004?t[13]>1e-35?Z=.07448480853603114:t[0]>1012.5000000000001?t[5]>2883.5000000000005?t[0]>3682.5000000000005?t[5]>4031.5000000000005?t[23]>1e-35?Z=.07965955447707423:t[10]>10.500000000000002?Z=-.09236156404262426:Z=.03396273196231458:Z=-.13246465021467432:Z=.07092822261735353:Z=-.08753829085942:Z=.09409024840640956:t[1]>40.50000000000001?t[8]>984.5000000000001?t[8]>1514.5000000000002?t[8]>2134.5000000000005?Z=.004705878789890202:Z=.13775378964952867:Z=-.04770928980587811:t[10]>29.500000000000004?Z=.011221519891071544:t[0]>3853.5000000000005?Z=.06365381191628273:Z=.15506252245336827:t[1]>37.50000000000001?Z=-.07254777021042061:Z=.026514587757252385:t[308]>1e-35?Z=.04115804816617256:t[10]>26.500000000000004?Z=.02077721353011946:t[5]>3548.5000000000005?Z=-.1280907116663952:Z=-.021974774274438:t[306]>1e-35?Z=-.02700446558079895:t[297]>1e-35?t[212]>1e-35?Z=.07794139136748461:t[7]>5.500000000000001?t[19]>1e-35?Z=-.005710865560475598:t[94]>1e-35?Z=-.06751507982853555:Z=.027250040757588703:t[9]>52.50000000000001?Z=.07060357924595577:Z=-.030297760713011795:Z=-.0006005400085266517;let ae;t[113]>1e-35?ae=-.07311041707507712:t[40]>1e-35?t[0]>1937.5000000000002?ae=-.06996356565314456:ae=.04780211300352931:t[10]>52.50000000000001?t[49]>1e-35?ae=-.08317707559926495:t[21]>1e-35?ae=-.0817284654645976:t[15]>1e-35?t[2]>3.5000000000000004?ae=-.010538203005984922:ae=.08454819465349446:t[9]>124.50000000000001?ae=.09015659250299132:t[7]>15.500000000000002?t[5]>5732.500000000001?ae=-.08542251249346582:t[9]>50.50000000000001?ae=-.023428882537657472:ae=.010042500833979073:ae=.020697210754240154:t[10]>28.500000000000004?t[5]>423.00000000000006?t[148]>1e-35?ae=.03006025206979096:t[9]>108.50000000000001?ae=-.09153851322499747:t[145]>1e-35?t[5]>4814.500000000001?t[2]>38.50000000000001?ae=.04222035773042132:ae=-.09078149053947535:t[8]>568.5000000000001?t[1]>64.50000000000001?ae=-.07209095448054853:ae=.028065954981903313:ae=.08714651929917122:ae=-.006678820669279169:t[10]>40.50000000000001?ae=.006982396294941626:ae=-.07889649792011418:t[94]>1e-35?t[4]>30.500000000000004?ae=-.09351114982645548:t[4]>3.5000000000000004?ae=-.004837550129223451:ae=-.08324141237464677:t[303]>1e-35?ae=.10703037493990825:t[9]>156.50000000000003?ae=-.10803018621648303:t[116]>1e-35?ae=-.03208302566598311:t[212]>1e-35?t[243]>1e-35?ae=.10261721665006701:ae=.018994509090668264:ae=.0011244262442038839;let De;t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?De=-.08404263465005328:t[0]>3682.5000000000005?De=.041259223920298876:t[1]>29.500000000000004?De=-.09541257493441671:De=.001482192721625409:De=.051541427372951004:t[3]>7.500000000000001?t[157]>1e-35?De=-.08268996098437432:t[230]>1e-35?De=.015749498159959817:t[4]>7.500000000000001?t[3]>11.500000000000002?De=-913218977737457e-19:t[4]>10.500000000000002?De=-.056334165674005156:t[127]>1e-35?De=-.0784634021824036:t[2]>9.500000000000002?t[1]>62.50000000000001?De=-.04231200150318989:t[10]>42.50000000000001?De=.10182973257894812:De=.015934763950068445:De=-.03130938805859397:t[92]>1e-35?t[4]>6.500000000000001?t[1]>51.50000000000001?t[9]>19.500000000000004?De=-.041117068322885315:De=.1167767830037126:De=.13611206992387337:t[10]>41.50000000000001?De=-.07120286010564107:De=.022032788063345417:t[8]>1.5000000000000002?t[1]>51.50000000000001?t[9]>72.50000000000001?De=-.07702290997669524:t[198]>1e-35?De=.08776558554437136:De=-.008290740324975692:t[2]>32.50000000000001?De=.07198457624219955:De=.005463113714361629:De=.09414099512900526:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?De=.03295785445437507:De=.15140250150674536:De=-.035613213948910254:t[186]>1e-35?De=.06849425535860769:t[96]>1e-35?De=.06028225812727254:De=-.007582543288662308;let Y;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Y=.08396556264106572:Y=-.0562516995099192:Y=-.10593011018789432:t[183]>1e-35?t[15]>1e-35?Y=-.09705176473553752:t[7]>18.500000000000004?t[2]>37.50000000000001?Y=.0052017514017035915:Y=-.11194119432743639:Y=.03724337696163019:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?Y=-.025692451287403446:Y=-.09511862672123193:t[8]>1661.5000000000002?t[10]>37.50000000000001?Y=-.11892250746801664:t[10]>22.500000000000004?Y=.07548493166973796:Y=-.05973048107712209:t[4]>12.500000000000002?t[0]>4319.500000000001?t[10]>4.500000000000001?t[10]>37.50000000000001?Y=.13750699058082427:t[18]>1e-35?Y=.06535408879552801:Y=-.054118179035040674:Y=.1344282838979622:t[0]>3982.5000000000005?Y=-.10409582202467015:t[19]>1e-35?Y=.12672850705810795:t[8]>587.5000000000001?t[1]>35.50000000000001?Y=.012705935670766466:Y=.14149359442527545:Y=-.047977876173706004:t[20]>1e-35?Y=.057945228080337946:t[0]>3642.5000000000005?Y=-.008726535792122467:Y=-.08424769891378858:t[34]>1e-35?Y=-.0699329538228602:t[134]>1e-35?t[11]>1e-35?t[4]>15.500000000000002?t[0]>1187.5000000000002?Y=.01196849566739346:Y=.1614642278429876:Y=-.043022338150701625:t[3]>5.500000000000001?Y=-.03907848255033881:Y=.018280601026175593:Y=.0006654540402589085;let ee;t[31]>1e-35?t[2]>58.50000000000001?t[9]>1.5000000000000002?ee=-.01386103677247845:ee=.11386694333005128:t[4]>27.500000000000004?ee=-.021862617610091336:t[2]>31.500000000000004?ee=.0828858469030438:ee=.006483353475830127:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?ee=.11303635767048735:ee=-.01645525128352694:t[23]>1e-35?t[4]>62.50000000000001?ee=-.04238798044549342:ee=.022091190130494303:t[5]>5082.500000000001?ee=-.04287166152163786:t[8]>862.5000000000001?t[19]>1e-35?ee=.000660344696244351:t[4]>9.500000000000002?t[0]>1277.5000000000002?ee=-.04291104140431434:t[17]>1e-35?ee=.11256797532342613:ee=-.017206916368289193:ee=.026482035265709743:t[1]>8.500000000000002?t[11]>1e-35?ee=.04060606971664621:t[0]>4733.500000000001?t[8]>214.50000000000003?t[5]>4814.500000000001?ee=.03581712466863222:ee=.14770264307668884:t[8]>73.50000000000001?ee=-.13093289429740068:ee=.042461737442702936:t[52]>1e-35?ee=.0501831919044939:ee=-.010450249720465756:ee=-.0753365425372656:t[149]>1e-35?t[6]>23.500000000000004?ee=.0005381332165438493:ee=-.04549431717503909:t[133]>1e-35?t[2]>5.500000000000001?t[8]>698.5000000000001?t[282]>1e-35?ee=.04849637311285226:ee=-.036671377119808564:t[0]>421.50000000000006?ee=.00020968499911058945:ee=.11636422423182405:ee=-.12687837788222575:ee=.0012774367867215346;let Ee;t[120]>1e-35?Ee=.04776057572434719:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?Ee=-.042799574885345304:Ee=.07412430171193245:Ee=-.11248270469336048:t[193]>1e-35?Ee=-.060694220820603384:t[121]>1e-35?t[217]>1e-35?t[0]>4449.500000000001?t[4]>8.500000000000002?Ee=.028911612178122104:Ee=.12326369727728437:t[0]>4091.5000000000005?Ee=-.09370267064141052:t[0]>3519.5000000000005?t[8]>668.5000000000001?Ee=.1159839898100149:Ee=-.01924880886585737:t[8]>501.50000000000006?t[10]>16.500000000000004?Ee=-.0216343737351583:Ee=-.1220272260878369:t[2]>18.500000000000004?Ee=.09152924475072398:t[8]>55.50000000000001?Ee=.039508716651005665:Ee=-.11714436880423203:t[18]>1e-35?t[9]>2.5000000000000004?Ee=.06793009902674053:Ee=-.024060578029812988:t[4]>2.5000000000000004?t[2]>16.500000000000004?t[4]>11.500000000000002?Ee=-.04391068849624096:Ee=.04009967593394672:t[8]>1085.5000000000002?Ee=-.024773826356034825:Ee=-.13919707884246582:Ee=.06659278075192335:t[223]>1e-35?t[8]>668.5000000000001?Ee=-.11567917501901476:Ee=-.006813640337684114:t[3]>7.500000000000001?Ee=.0010671269682548076:t[7]>3.5000000000000004?t[1]>33.50000000000001?t[0]>1597.5000000000002?t[10]>1.5000000000000002?Ee=-.001754586408351048:Ee=-.055422422450722056:Ee=-.06090032532532226:t[0]>5269.500000000001?Ee=.11787981735983527:Ee=-.00198119768540783:Ee=.00210412924303036;let Ae;t[294]>1e-35?t[10]>50.50000000000001?Ae=-.09738558653332406:t[0]>2432.5000000000005?t[0]>4533.500000000001?Ae=-.06063239096209816:Ae=.03317022411417386:Ae=-.08607562321324262:t[120]>1e-35?t[4]>18.500000000000004?Ae=-.013608609329298802:Ae=.09078000157330264:t[99]>1e-35?Ae=.014828708581964632:t[10]>52.50000000000001?t[49]>1e-35?Ae=-.07536137260189814:Ae=.006253266595455118:t[10]>28.500000000000004?Ae=-.006106041147592768:t[9]>156.50000000000003?Ae=-.11828932797811101:t[94]>1e-35?Ae=-.02566078479505714:t[303]>1e-35?Ae=.09544850289775349:t[15]>1e-35?t[224]>1e-35?t[4]>56.50000000000001?Ae=-.08401252789168523:t[5]>4244.500000000001?Ae=.026372887658499107:t[1]>16.500000000000004?Ae=-.027836756345634026:Ae=.09205362097909099:Ae=.00934612788718244:t[203]>1e-35?Ae=-.016371658366767253:t[7]>26.500000000000004?t[0]>966.5000000000001?t[1]>38.50000000000001?t[146]>1e-35?t[9]>21.500000000000004?Ae=-.09580979052540028:t[1]>50.50000000000001?Ae=-.06402211827281554:Ae=.08342858760095972:t[2]>36.50000000000001?Ae=.008114897658204584:t[92]>1e-35?Ae=.09541587072672864:Ae=-.022342147210555434:Ae=-.01660492519175128:Ae=.014721622240945446:t[4]>25.500000000000004?t[11]>1e-35?Ae=.15846731118501817:Ae=.039498507912023195:t[245]>1e-35?Ae=.07008718676813333:Ae=.0019806389728814727;let ve;t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[0]>4188.500000000001?ve=-.01192072916082109:ve=.13888590840802637:t[1]>16.500000000000004?t[8]>2302.5000000000005?ve=.06874032717466054:t[4]>40.50000000000001?ve=-.07752510020707537:t[1]>76.50000000000001?ve=-.09944032260703917:t[8]>1381.5000000000002?ve=-.054466635810800745:t[1]>32.50000000000001?ve=.05974084520839573:ve=-.0384718740755954:ve=-.11374190719134032:t[0]>2151.5000000000005?ve=-.13703645155803298:ve=.004833344758654556:t[297]>1e-35?t[212]>1e-35?ve=.06954747264544993:t[7]>9.500000000000002?t[19]>1e-35?t[1]>30.500000000000004?t[0]>4242.500000000001?ve=.013539805885738608:ve=-.0692740641801559:t[0]>2653.5000000000005?t[10]>57.50000000000001?ve=.09941880179344399:ve=-.01608127391210995:ve=.08025226531247417:t[9]>67.50000000000001?ve=.13525448212444113:t[6]>61.50000000000001?ve=-.05511099182158894:t[94]>1e-35?ve=-.06821509831783572:t[128]>1e-35?ve=.11361314817714643:ve=.030160785008575566:t[1]>13.500000000000002?t[8]>17.500000000000004?t[16]>1e-35?ve=-.09954181329804547:t[197]>1e-35?ve=.10102833149755386:t[188]>1e-35?ve=.05584490988313965:t[9]>49.50000000000001?t[4]>5.500000000000001?ve=-.03781554214742005:ve=.09927933385592314:ve=-.020006000056720083:ve=-.10520473615957895:ve=-.12006990846253787:ve=-.00026111570975317574;let We;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[0]>1725.5000000000002?t[7]>14.500000000000002?t[2]>38.50000000000001?We=-.019188245509744628:We=-.13354864350075848:t[0]>2461.5000000000005?We=.051885477468354396:We=-.0833581968852119:We=.08233441701532287:We=-.10865584951212362:t[8]>2992.5000000000005?t[10]>49.50000000000001?t[10]>56.50000000000001?t[1]>45.50000000000001?t[0]>2041.5000000000002?We=.09926337893072812:We=-.027753610497327715:t[0]>1972.5000000000002?We=-.09780045823152517:We=.032380915168504935:We=.11502632261226381:t[17]>1e-35?We=-.06094965899579662:t[10]>40.50000000000001?We=-.07500475582440802:We=.006499832113084677:t[10]>4.500000000000001?t[4]>10.500000000000002?We=-.09584538995220808:We=-.00908705814304442:We=.03203281520813893:t[10]>49.50000000000001?We=-.03146271513986384:t[2]>63.50000000000001?We=.13172001315536286:t[224]>1e-35?We=.08945777550527927:t[0]>2282.5000000000005?t[4]>4.500000000000001?We=.09521549382082259:We=-.04414925613522197:t[0]>1847.5000000000002?We=-.09118580379557353:We=.009206744918282364:t[178]>1e-35?t[2]>25.500000000000004?t[1]>31.500000000000004?We=.03525144509943896:We=-.053340750721609057:t[0]>1057.5000000000002?t[10]>2.5000000000000004?We=-.04766112322938157:t[2]>10.500000000000002?We=.0728516504357201:We=-.05049625965272536:We=-.10868663055825774:We=.0005382613419948969;let Ze;t[147]>1e-35?t[1]>53.50000000000001?Ze=-.10615739288764095:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ze=-.030504020655417463:Ze=.07102458639110094:Ze=-.07058131985243714:t[302]>1e-35?t[10]>47.50000000000001?Ze=.055304563442710876:t[1]>53.50000000000001?Ze=.033723409577443623:t[8]>175.50000000000003?t[0]>2628.5000000000005?t[9]>40.50000000000001?Ze=-.1568835288372895:Ze=-.0279829124400056:Ze=.04493843959601833:Ze=-.11637042729644327:t[191]>1e-35?t[282]>1e-35?Ze=-.054133834303687026:t[9]>48.50000000000001?Ze=.11263810289007213:t[9]>9.500000000000002?Ze=-.02202034562838259:t[4]>45.50000000000001?Ze=-.03410927569045158:Ze=.04381615166534081:t[242]>1e-35?t[0]>3615.5000000000005?t[3]>19.500000000000004?t[1]>56.50000000000001?t[4]>28.500000000000004?Ze=-.029687297407295893:Ze=.10673602850001934:t[4]>42.50000000000001?Ze=.0036275562945108117:Ze=-.0760789221330622:Ze=-.10385623431741903:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Ze=.08274426793676076:Ze=-.07076234425516396:Ze=.13890177606150175:Ze=-.019863286503635686:t[53]>1e-35?t[18]>1e-35?Ze=-.09250637750836187:Ze=-.0031531727902009026:t[2]>107.50000000000001?t[4]>91.50000000000001?t[1]>16.500000000000004?Ze=-.01897867921812603:Ze=.04890781705365262:Ze=-.11569892307597907:t[2]>106.50000000000001?Ze=.09032697440623969:Ze=.00047935919155035045;let Et;t[115]>1e-35?Et=.05338335681275557:t[242]>1e-35?t[0]>3615.5000000000005?t[4]>42.50000000000001?t[4]>75.50000000000001?Et=-.10131179514695865:t[8]>938.5000000000001?Et=.10203729808015481:Et=-.015357944186835289:t[1]>56.50000000000001?t[2]>22.500000000000004?Et=.03574015165562999:Et=-.07763042506449493:Et=-.0813323116215548:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Et=.0665706259130275:Et=-.06586817559309924:Et=.11925564412287476:Et=-.014170019267143326:t[1]>124.50000000000001?t[2]>30.500000000000004?t[8]>533.5000000000001?t[4]>41.50000000000001?t[8]>977.5000000000001?Et=.046017146627455346:Et=-.08623321630086885:t[8]>1765.5000000000002?Et=-.017990564319859934:t[10]>25.500000000000004?t[10]>48.50000000000001?Et=.11143827902215087:Et=-.01817808730473413:Et=.16980985030210127:Et=-.09357806298740017:t[10]>7.500000000000001?t[10]>54.50000000000001?Et=.010168994879727824:Et=-.09099594488792513:t[9]>1.5000000000000002?Et=.0533459678147928:Et=-.06886854808370108:t[99]>1e-35?t[17]>1e-35?t[9]>22.500000000000004?Et=-.062346959148773695:t[1]>47.50000000000001?Et=-.0021578343835599316:t[2]>27.500000000000004?Et=.19567373210166172:Et=.07851555379116423:t[18]>1e-35?Et=.03711549097804649:t[8]>359.50000000000006?Et=.012492346746905587:t[4]>20.500000000000004?Et=.047511695735697544:Et=-.07999269063948773:Et=6802045404471004e-20;let Rt;t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>2167.5000000000005?t[4]>25.500000000000004?Rt=.0011484728213539738:Rt=-.0936582904650763:t[2]>25.500000000000004?t[8]>182.50000000000003?t[10]>22.500000000000004?t[0]>5026.500000000001?Rt=-.09828874964938798:t[8]>1586.5000000000002?Rt=.13726397438080162:t[4]>48.50000000000001?t[2]>63.50000000000001?Rt=.011938269926919522:Rt=.17541983715953954:t[19]>1e-35?Rt=.023002786011088672:Rt=-.06221461272461431:t[9]>2.5000000000000004?t[0]>3818.5000000000005?Rt=.06508934844183291:Rt=-.10168553534835639:Rt=-.07755626499024171:t[2]>51.50000000000001?t[4]>65.50000000000001?Rt=.021140806225203937:Rt=-.1167833342453639:t[2]>33.50000000000001?Rt=.13163585734056618:Rt=-.00203273890889717:t[10]>36.50000000000001?t[8]>1067.5000000000002?Rt=.06314479201263888:Rt=-.09639088327091713:t[10]>29.500000000000004?Rt=.09225469303582386:t[0]>3129.5000000000005?t[0]>4091.5000000000005?t[0]>4354.500000000001?Rt=40577156464836036e-21:Rt=.12322387121810757:Rt=-.03697224045046014:t[1]>22.500000000000004?Rt=.016474835887320276:Rt=.16919298733903063:Rt=.07633203630214054:Rt=-.047438037934250644:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?Rt=.14150493354700563:Rt=-.01831155354975749:t[1]>28.500000000000004?Rt=-.07952557178685365:t[10]>28.500000000000004?Rt=.0665695554984927:Rt=-.053640139319277094:Rt=.0004754840665898665;let Qt;t[76]>1e-35?Qt=-.06814884255939921:t[179]>1e-35?Qt=-.06325743795510681:t[122]>1e-35?t[6]>36.50000000000001?Qt=.05052338063261613:t[8]>626.5000000000001?t[1]>38.50000000000001?Qt=.004193658608848433:Qt=-.1066968975983452:t[8]>302.50000000000006?Qt=.05476730110440451:Qt=-.06382970920394895:t[218]>1e-35?t[2]>3.5000000000000004?t[6]>13.500000000000002?t[2]>19.500000000000004?t[0]>3200.5000000000005?t[4]>91.50000000000001?Qt=-.12156071809840739:t[9]>21.500000000000004?t[5]>3883.5000000000005?t[8]>919.5000000000001?t[8]>1085.5000000000002?Qt=.013555772109446666:Qt=-.09856116699770784:Qt=.0284329611813383:t[2]>52.50000000000001?Qt=.04008708444763762:t[9]>29.500000000000004?Qt=-.1289599546008197:Qt=-.018566534248335896:t[8]>747.5000000000001?Qt=.02236484980076122:Qt=.1148871655157582:t[8]>3084.0000000000005?Qt=-.05573875952902531:t[10]>17.500000000000004?t[2]>51.50000000000001?Qt=.03164751204281298:Qt=.11752140436184891:t[9]>42.50000000000001?Qt=-.07180559595410106:t[22]>1e-35?Qt=.09325040416256854:Qt=-.016041122807939914:Qt=-.02765708954618808:t[1]>30.500000000000004?t[1]>66.50000000000001?Qt=-.010718250133458515:Qt=.09818827994853763:Qt=.010180038981174032:Qt=-.039472162599295535:t[9]>170.50000000000003?Qt=-.08536729235976731:t[189]>1e-35?t[0]>5269.500000000001?Qt=-.08674788057474031:Qt=.02077653508548371:Qt=-.0003536561382007414;let Ft;t[86]>1e-35?t[10]>6.500000000000001?t[0]>4376.500000000001?Ft=.018337297491457794:Ft=-.05926206443180149:Ft=.024026520855881126:t[288]>1e-35?t[184]>1e-35?Ft=.10747078482128616:t[126]>1e-35?Ft=-.10550625192391357:t[7]>71.50000000000001?Ft=-.07698346027863572:t[8]>302.50000000000006?t[6]>49.50000000000001?t[4]>47.50000000000001?t[1]>38.50000000000001?t[15]>1e-35?Ft=.1317396472229434:Ft=-.025035791351328947:Ft=-.0728334305864372:t[8]>963.5000000000001?Ft=.023642201723096064:Ft=.183010326734258:t[128]>1e-35?Ft=.04228920135648387:t[2]>34.50000000000001?t[15]>1e-35?Ft=.002801782941492993:t[3]>40.50000000000001?t[4]>39.50000000000001?Ft=-.1088876900335281:Ft=.02758317023002635:Ft=-.11886771300807207:t[9]>59.50000000000001?t[1]>33.50000000000001?Ft=-.01928020117446408:Ft=.10193718474139135:t[1]>48.50000000000001?t[4]>9.500000000000002?t[8]>932.5000000000001?Ft=.07893723375925096:Ft=-.009878929627026153:t[10]>2.5000000000000004?t[9]>20.500000000000004?Ft=-.10301657587280551:Ft=.005787463140224318:Ft=.07421364314695046:t[0]>2840.5000000000005?t[10]>29.500000000000004?Ft=-.019296977889522397:Ft=-.07274529751752634:t[1]>30.500000000000004?Ft=-.050368901143148286:Ft=.029630869489466655:t[2]>6.500000000000001?t[4]>9.500000000000002?Ft=.0015332402792773946:Ft=.09930153676749967:Ft=-.06370844564357069:Ft=.00042272155209927616;let ue;t[71]>1e-35?t[4]>17.500000000000004?ue=.12586844370423247:ue=-.006791999603126354:t[222]>1e-35?t[1]>10.500000000000002?t[30]>1e-35?t[1]>36.50000000000001?t[9]>1.5000000000000002?t[10]>25.500000000000004?ue=-.08474891624263797:t[8]>125.50000000000001?ue=.08125086980439704:ue=-.04082085238068532:t[0]>3863.5000000000005?ue=.020481535807469208:ue=.14810819386202126:t[0]>1937.5000000000002?t[2]>16.500000000000004?ue=-.019110200161573936:ue=-.12387719685855114:t[0]>1102.5000000000002?ue=.08376595701957407:ue=-.031821919580524834:t[9]>4.500000000000001?ue=-.08116383486497568:t[7]>8.500000000000002?t[2]>24.500000000000004?ue=-.02154820850475448:t[0]>3863.5000000000005?t[8]>902.5000000000001?ue=.1349841206807871:ue=.011864053595560297:t[1]>41.50000000000001?ue=-.08203662486612544:t[2]>18.500000000000004?ue=-.009541865642346947:ue=.08345043168501759:t[2]>10.500000000000002?ue=-.09585031818030947:ue=.019432330487099865:ue=.08399259524715129:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ue=.11951517733981365:ue=-.016651014735738538:t[1]>28.500000000000004?ue=-.07410922545030711:t[10]>28.500000000000004?ue=.05886430683844788:ue=-.04929626605117184:t[191]>1e-35?t[9]>9.500000000000002?t[9]>48.50000000000001?ue=.04802269879144705:ue=-.026208212831796737:t[4]>45.50000000000001?ue=-.03227476944664786:ue=.05124575625622705:ue=.00020506696916003137;let Be;t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?Be=-.03042091758483443:t[10]>14.500000000000002?Be=.09816619204768777:Be=.01332124067720947:t[8]>8.500000000000002?t[4]>15.500000000000002?Be=-.02381165060401718:Be=-.10950361804974783:Be=.03538211665111128:t[212]>1e-35?t[19]>1e-35?Be=-.09940014650006174:t[0]>2215.5000000000005?t[5]>5056.500000000001?t[3]>5.500000000000001?t[10]>25.500000000000004?Be=-.06371052144380579:Be=.0835500621252692:Be=-.10408255929333915:t[1]>74.50000000000001?Be=.13208968122712403:t[1]>64.50000000000001?Be=-.04778844603644965:t[8]>51.50000000000001?t[8]>201.50000000000003?t[8]>660.5000000000001?t[6]>4.500000000000001?t[9]>5.500000000000001?t[1]>29.500000000000004?t[0]>3830.5000000000005?Be=.09922816902423433:Be=.016366955328796718:Be=.1592412560903584:t[1]>39.50000000000001?Be=.05409467990258923:Be=-.08260633210459611:Be=-.06307205775247567:t[9]>36.50000000000001?Be=.040253940015648144:Be=.14202568969471283:Be=-.028761848341594044:Be=.08994073058773508:t[0]>807.5000000000001?Be=-.043427848826323195:Be=.04573516446846493:t[20]>1e-35?t[188]>1e-35?Be=-.0758877731600639:t[23]>1e-35?Be=.05913923322043199:t[8]>155.50000000000003?t[128]>1e-35?Be=.08124700978741987:Be=.013296063087086852:t[7]>5.500000000000001?Be=-.01640196088612987:Be=-.12685498840146067:Be=-.0004940792382459551;let et;t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?et=-.05584993681929434:t[9]>27.500000000000004?t[0]>3916.5000000000005?et=.08513773825688947:et=-.1184664832315282:et=.05676963535893477:et=.14263843210340613:et=.0005795003292924202:t[18]>1e-35?t[0]>5453.500000000001?t[1]>11.500000000000002?et=-.10669720555606924:et=.029016613003137307:t[2]>46.50000000000001?t[10]>9.500000000000002?et=.0664744575868955:et=-.08469256188890871:et=-.026746678040592144:t[281]>1e-35?et=-.07408427239006925:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?et=.012131807587207655:et=-.12776015795398743:et=.04320472481083551:et=.08390980661550446:t[10]>227.50000000000003?et=-.09771783809101153:t[10]>130.50000000000003?et=.11175201938704937:t[8]>779.5000000000001?t[5]>3325.5000000000005?t[128]>1e-35?et=-.07610698254064358:t[8]>902.5000000000001?et=-.03136381213599649:t[131]>1e-35?et=.0704821739127936:t[224]>1e-35?et=-.056961477774953785:t[10]>30.500000000000004?t[9]>43.50000000000001?et=.10431473040024908:t[8]>841.5000000000001?et=.07304745320500514:et=-.038011541882439825:et=-.01679746695007364:t[0]>3129.5000000000005?et=.05589952587431965:t[210]>1e-35?et=.06227198085800842:et=-.0011341890997947812:t[8]>740.5000000000001?et=.04817300084412584:et=-.000577001010789238;let lt;t[187]>1e-35?t[6]>12.500000000000002?t[10]>8.500000000000002?t[10]>16.500000000000004?t[8]>234.50000000000003?t[4]>43.50000000000001?t[0]>4476.500000000001?lt=-.10504730480402079:t[5]>3341.5000000000005?lt=.11087894671081754:lt=-.0406668834674614:lt=.03308382165616109:t[8]>104.50000000000001?lt=-.10431436764549162:lt=.0073928337244891455:t[4]>34.50000000000001?lt=-.10571751512748416:lt=-.006081128814142983:t[13]>1e-35?lt=.1299673566095023:t[4]>60.50000000000001?lt=-.06587492443829139:t[0]>2604.5000000000005?t[3]>19.500000000000004?lt=.04857126072645073:lt=-.03431365358104773:t[4]>16.500000000000004?lt=.04101865986596709:lt=.16480274980378218:t[10]>26.500000000000004?lt=.03673978504199255:t[10]>9.500000000000002?lt=-.10996402743800027:t[308]>1e-35?lt=.0553693735082498:lt=-.041600136235644125:t[306]>1e-35?t[8]>1156.5000000000002?t[4]>14.500000000000002?t[10]>21.500000000000004?lt=.010902983761213922:lt=.1325118659895645:lt=-.064362945508595:t[1]>66.50000000000001?lt=.033416767779331176:lt=-.054080316225040496:t[42]>1e-35?lt=-.07762364337810815:t[10]>1089.5000000000002?lt=-.08465599849125216:t[31]>1e-35?t[8]>30.500000000000004?lt=.012788520036013586:t[1]>32.50000000000001?t[1]>51.50000000000001?lt=.0220102041325908:lt=-.06516708740003069:lt=.012833498905748267:t[224]>1e-35?lt=-.007038418272997865:lt=.00037666304316290967;let ye;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?ye=.07554189644995735:ye=-.052089349455904946:ye=-.10148206848169845:t[113]>1e-35?ye=-.06666678653225779:t[39]>1e-35?t[9]>3.5000000000000004?t[0]>3670.5000000000005?ye=.07172653627995676:ye=-.07602959317610998:ye=-.08790686271287523:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?ye=-.0399322883690891:ye=.06523495517476098:ye=-.10358715295743802:t[193]>1e-35?ye=-.05551414334329124:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[10]>1.5000000000000002?ye=.015928764772252406:ye=.1341513061552287:ye=-.04975001987586173:t[10]>2.5000000000000004?t[3]>5.500000000000001?t[9]>2.5000000000000004?t[8]>310.50000000000006?ye=-.033592997607280156:ye=-.12432458028446665:t[1]>32.50000000000001?t[217]>1e-35?ye=-.08402551858097379:ye=.017401984506038796:t[1]>25.500000000000004?ye=.13337205393591278:ye=-.01160208350090984:ye=.06708317942315471:t[8]>227.50000000000003?ye=-.08486943882418681:ye=-.013970104864235007:t[8]>4968.500000000001?t[1]>31.500000000000004?t[9]>4.500000000000001?ye=-.10496268177586783:ye=-.020921489532370493:ye=.02629915927247642:t[7]>20.500000000000004?t[8]>251.50000000000003?t[115]>1e-35?ye=.11639296062157028:ye=-.004275784356569115:t[32]>1e-35?ye=-.07297384970166025:ye=.006026841626381599:ye=.002034611134960428;let Le;t[248]>1e-35?Le=.06091438745093315:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?Le=-.06455513326540585:t[1]>29.500000000000004?Le=.07718474591552532:t[4]>7.500000000000001?Le=.040139336931404826:Le=-.09685734690563386:Le=.00015327283570347363:t[9]>88.50000000000001?Le=.10079017954199324:t[1]>47.50000000000001?t[2]>20.500000000000004?t[2]>27.500000000000004?Le=-.04077257804338707:Le=.0739963982640615:t[9]>1.5000000000000002?t[17]>1e-35?Le=.03778141591008941:Le=-.06459919920634845:Le=-.11193190957880604:t[7]>6.500000000000001?t[11]>1e-35?t[18]>1e-35?Le=.14063930759326346:t[0]>179.50000000000003?Le=.07287482250668585:t[8]>1180.5000000000002?Le=-.14419393112726253:t[10]>28.500000000000004?Le=-.07993142770099469:t[17]>1e-35?Le=-.04702595410391655:t[7]>21.500000000000004?t[2]>26.500000000000004?Le=.05527969663610186:Le=-.10824385941441346:t[3]>11.500000000000002?Le=.12358502961047915:Le=-.017509147119622873:t[0]>74.50000000000001?Le=-.014907705458730486:t[8]>95.50000000000001?Le=-.02225118168342062:Le=-.1222374623708485:t[8]>1.5000000000000002?t[8]>950.5000000000001?Le=.06946188930925638:t[3]>6.500000000000001?t[10]>2.5000000000000004?t[19]>1e-35?Le=.04962819555610421:Le=-.07213577821855309:Le=.09139529824708481:t[19]>1e-35?Le=.013439401088345224:Le=-.049274647207292056:Le=.10531673719686951;let $e;t[40]>1e-35?t[0]>1937.5000000000002?$e=-.06421671152073961:$e=.04235421241226177:t[294]>1e-35?t[10]>50.50000000000001?$e=-.09100102290316286:t[0]>3030.5000000000005?t[0]>4177.500000000001?$e=-.03520420769287065:t[8]>1085.5000000000002?$e=-.019817352506127633:$e=.11444439424520964:$e=-.06854631664538167:t[120]>1e-35?t[4]>18.500000000000004?$e=-.010490117519863269:$e=.08104430117757461:t[121]>1e-35?t[243]>1e-35?$e=.16408304891242204:t[217]>1e-35?t[0]>4449.500000000001?$e=.06619344145920268:t[0]>4091.5000000000005?$e=-.08813353450871053:t[0]>3519.5000000000005?t[8]>668.5000000000001?$e=.10016091391222309:$e=-.017407607199427293:t[8]>501.50000000000006?t[10]>16.500000000000004?$e=-.019511460451434884:$e=-.11643672465055221:t[2]>18.500000000000004?$e=.07848228087333317:t[8]>55.50000000000001?$e=.032583027899956235:$e=-.11209832692153521:t[11]>1e-35?$e=.027482174104412567:t[10]>1.5000000000000002?t[6]>26.500000000000004?t[4]>19.500000000000004?t[9]>31.500000000000004?$e=-.09996887746328006:t[9]>2.5000000000000004?$e=.02157682011863397:$e=-.05247727848991843:$e=.07409150201483244:t[1]>38.50000000000001?$e=-.11378466075449625:t[224]>1e-35?$e=-.10741749127732923:t[1]>26.500000000000004?$e=.07343136534146562:$e=-.07013573628594773:t[25]>1e-35?$e=-.04626669734164317:$e=.05518333197956482:$e=.00032434010867555516;let rt;t[183]>1e-35?t[10]>1.5000000000000002?t[17]>1e-35?rt=.026313251010808853:rt=-.08997339150292381:rt=.025062509535227952:t[227]>1e-35?t[1]>6.500000000000001?t[2]>9.500000000000002?t[210]>1e-35?rt=.08071107515789745:t[23]>1e-35?t[1]>75.50000000000001?rt=.0905155504503746:t[8]>1049.5000000000002?rt=-.062312558183394054:t[8]>719.5000000000001?rt=.09583836191410239:t[0]>3719.5000000000005?rt=-.0778097309430818:rt=.04012012419054895:t[4]>12.500000000000002?t[8]>1496.5000000000002?t[10]>42.50000000000001?rt=-.12920865648544927:t[0]>2699.5000000000005?rt=-.07086587879041864:rt=.022614182502461846:t[4]>15.500000000000002?t[8]>55.50000000000001?t[1]>60.50000000000001?t[8]>652.5000000000001?rt=-.11377786322600797:rt=-.009486325820117998:t[1]>55.50000000000001?rt=.12430248795958142:t[0]>2952.5000000000005?t[0]>4331.500000000001?t[1]>38.50000000000001?rt=-.07938291201004219:t[2]>36.50000000000001?rt=.01520046732530246:rt=.13649854049662832:rt=-.07145015938528873:t[8]>407.50000000000006?rt=-.00350257360822279:rt=.11332047082193297:rt=-.10060624458629897:rt=.05429496612497562:t[8]>1446.5000000000002?rt=.006073419197482838:rt=-.08718676350883998:rt=-.11532497988252638:rt=.10766270463068293:t[34]>1e-35?rt=-.06345912440611544:t[131]>1e-35?t[9]>1.5000000000000002?rt=-.0004109812623829506:rt=.021601073497455662:rt=-7343540098965853e-20;let it;t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?it=-.06107663265515864:t[9]>70.50000000000001?t[10]>37.50000000000001?it=.05995640200798119:t[0]>3443.5000000000005?it=-.14698883458733583:it=-.030039164579240187:t[189]>1e-35?it=-.06086763220538141:t[1]>86.50000000000001?it=-.05096727866142538:t[4]>64.50000000000001?it=.11240554253834577:t[4]>45.50000000000001?it=-.030279760168394117:t[6]>45.50000000000001?it=.10161088917815142:t[10]>77.50000000000001?it=-.0792333078055653:t[7]>23.500000000000004?t[0]>2882.5000000000005?it=-.06672020005240323:it=.08831457502630258:t[8]>2592.5000000000005?it=-.052617701047376654:t[10]>29.500000000000004?it=.08499327690298047:t[2]>12.500000000000002?t[9]>41.50000000000001?it=.12880460816709416:t[9]>25.500000000000004?t[4]>11.500000000000002?it=-.064099222705728:it=.044332487521538365:t[0]>2882.5000000000005?it=.031099546885005065:it=.12938467051623853:t[0]>4221.500000000001?it=-.0928676413498701:t[9]>30.500000000000004?it=-.05781824812803708:it=.07561268901778094:t[8]>711.5000000000001?t[2]>22.500000000000004?it=-.06648105454098469:it=.05985487552383097:it=-.13070190291919334:t[116]>1e-35?t[10]>38.50000000000001?it=.05282385499619401:t[1]>66.50000000000001?it=.048802929108006314:t[2]>4.500000000000001?t[0]>4593.500000000001?it=.027885690791379255:it=-.08407126408362446:it=.014432924125571093:it=-9903435845205118e-20;let dt;t[76]>1e-35?dt=-.06307875292162934:t[21]>1e-35?t[7]>10.500000000000002?t[10]>4.500000000000001?t[8]>944.5000000000001?t[0]>3655.5000000000005?dt=.013633653464240465:dt=-.10164319411983509:dt=-.1228424374328996:t[1]>26.500000000000004?t[2]>28.500000000000004?dt=.00632864847804078:dt=-.08393000368134668:dt=.07870508617440916:t[284]>1e-35?dt=.1092302727710421:dt=-.0025505047582483234:t[248]>1e-35?dt=.07101822393621864:t[274]>1e-35?dt=-.06621099406425579:t[1]>26.500000000000004?t[1]>28.500000000000004?dt=.0003077044909372931:t[10]>2.5000000000000004?t[0]>3770.5000000000005?dt=.025081789181021243:dt=-.014813325803582618:t[9]>33.50000000000001?dt=-.033466921233840194:t[3]>12.500000000000002?t[23]>1e-35?dt=.11926990418060353:dt=.01852125513565268:dt=.0975367595927343:t[5]>3325.5000000000005?t[8]>892.5000000000001?t[133]>1e-35?dt=-.1178464984373743:t[283]>1e-35?dt=.043370859226927405:t[5]>4320.500000000001?dt=-.01103141226366587:t[8]>1104.5000000000002?dt=-.023053423988095886:dt=-.0734238953804657:t[6]>18.500000000000004?t[8]>85.50000000000001?dt=.000579145585864887:dt=.03389152834202143:t[128]>1e-35?dt=-.14527722052568462:t[210]>1e-35?dt=-.08915971541902741:t[7]>9.500000000000002?dt=-.03307314577076116:t[18]>1e-35?dt=-.05521712302023565:dt=.009315605032770029:dt=.0036332551852289933;let z;t[0]>689.5000000000001?t[5]>768.5000000000001?t[20]>1e-35?t[5]>4368.500000000001?z=-.07583539600416284:t[188]>1e-35?z=-.07042659515500142:t[23]>1e-35?t[0]>3807.5000000000005?z=-.011038193049597113:z=.08154028164397753:t[1]>85.50000000000001?z=.10259361975201933:z=.011640408330521594:z=-.00023319159023748508:t[92]>1e-35?z=.13771692859530546:z=.022860029819654806:t[1]>22.500000000000004?t[1]>24.500000000000004?t[2]>96.50000000000001?z=.09967230141007705:t[30]>1e-35?z=-.08888529037551285:z=-.008615931385397808:t[10]>5.500000000000001?t[4]>36.50000000000001?z=.08284665960761373:z=-.029292565021289504:t[7]>7.500000000000001?z=-.09945093355204493:z=-.008381393701708593:t[20]>1e-35?z=-.04218678460370465:t[10]>6.500000000000001?t[9]>2.5000000000000004?t[1]>13.500000000000002?t[8]>143.50000000000003?t[4]>7.500000000000001?t[2]>36.50000000000001?z=.07585582641438211:t[8]>284.50000000000006?z=-.029387993239886723:z=.07716738177321587:t[1]>18.500000000000004?z=.026745348497993746:z=.1427429617069753:t[9]>16.500000000000004?t[9]>33.50000000000001?z=.02337306890530338:z=-.10390355904767366:z=.07390521199638532:z=-.06788247515155237:z=-.04201446383470994:t[2]>25.500000000000004?t[2]>29.500000000000004?t[8]>227.50000000000003?z=-.06360325615644084:z=.04342192339836601:z=-.10598779152030145:z=.05253384605768211;let se;t[3]>7.500000000000001?t[157]>1e-35?se=-.07514182877923786:se=.000636205502279271:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?se=.028692053800951845:se=.14081686716133598:se=-.03316566526940354:t[186]>1e-35?t[0]>2653.5000000000005?se=.0037139292567243084:se=.12662311031652707:t[107]>1e-35?t[0]>612.5000000000001?se=.01202688580305612:se=.0993509141454483:t[203]>1e-35?t[1]>77.50000000000001?se=.043935495082738626:se=-.05639305759669704:t[247]>1e-35?se=-.06770766046891649:t[105]>1e-35?t[19]>1e-35?se=.10331836202616368:se=.0006926658459781341:t[96]>1e-35?se=.05361846065599475:t[127]>1e-35?t[0]>2723.5000000000005?t[1]>54.50000000000001?se=-.0741403257305367:se=.022900127535540854:t[7]>3.5000000000000004?se=.038110741403836294:se=.14618649985842758:t[5]>3921.5000000000005?t[1]>110.50000000000001?se=-.09552842289807008:t[1]>27.500000000000004?se=.012505935885798007:se=-.020509603428689526:t[282]>1e-35?t[9]>45.50000000000001?t[6]>5.500000000000001?se=-.1046104767723845:se=.031388606992301074:t[8]>114.50000000000001?t[9]>17.500000000000004?t[9]>22.500000000000004?t[1]>32.50000000000001?se=.023466328488582572:se=.11730925774586994:se=-.04771965631104874:se=.17059689880751394:se=-.08181850955999449:t[26]>1e-35?se=-.12727482696678769:se=-.014343123272734182;let _e;t[147]>1e-35?t[1]>53.50000000000001?_e=-.0993064321015924:t[0]>2604.5000000000005?t[0]>3629.5000000000005?_e=-.02763546051134888:_e=.06423344777499343:_e=-.064606430904295:t[302]>1e-35?t[10]>2.5000000000000004?t[10]>47.50000000000001?_e=.049825139823021586:t[7]>22.500000000000004?_e=-.01131680751379858:t[0]>2579.5000000000005?_e=-.10673674485369694:_e=-.015387212937189957:_e=.04347325151148724:t[179]>1e-35?_e=-.05788885608624092:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?_e=.0650355590939066:_e=-.0473332870892226:_e=-.09699315983340703:t[288]>1e-35?t[88]>1e-35?_e=.11139543329789044:t[126]>1e-35?_e=-.09726928633696198:t[8]>149.50000000000003?t[9]>46.50000000000001?t[4]>1.5000000000000002?t[8]>1861.5000000000002?_e=.06370903833231022:t[10]>29.500000000000004?_e=.03415223859607161:t[10]>3.5000000000000004?_e=-.07415518117873297:_e=-.0014119203473324082:_e=.12617652343819508:t[9]>41.50000000000001?_e=-.10311145857176976:t[8]>2757.5000000000005?_e=-.08106484219011428:t[7]>71.50000000000001?_e=-.09783384432091176:t[1]>88.50000000000001?_e=.06249739709782831:t[3]>9.500000000000002?t[5]>1601.5000000000002?_e=-.008884084501608536:_e=.061339437777743616:_e=-.042490992675121846:t[2]>6.500000000000001?t[3]>10.500000000000002?_e=.01526664064166223:_e=.13534828515415498:_e=-.06985484465894776:_e=.0005758961943178744;let we;t[86]>1e-35?t[1]>23.500000000000004?t[1]>29.500000000000004?t[4]>16.500000000000004?t[2]>31.500000000000004?we=-.029152732370514342:we=.07173628916139178:t[1]>36.50000000000001?we=-.08859111297255318:we=.0018030071815630785:we=.13652461563759322:we=-.07550137680349367:t[10]>52.50000000000001?t[49]>1e-35?we=-.07145140450454163:t[21]>1e-35?we=-.07422841663493233:we=.006289319702780104:t[10]>40.50000000000001?t[9]>59.50000000000001?t[19]>1e-35?t[13]>1e-35?we=.11864240653986852:t[3]>33.50000000000001?we=-.08821209591953476:we=.05706392280054726:we=-.03600088051578915:t[18]>1e-35?t[1]>24.500000000000004?we=.01953613016837112:we=-.059781039130025006:t[148]>1e-35?we=.052668447861325476:t[3]>30.500000000000004?t[9]>49.50000000000001?we=.07207826841738371:t[202]>1e-35?we=.08163917539410503:we=-.01319846363832958:t[9]>35.50000000000001?t[5]>4134.500000000001?t[10]>44.50000000000001?we=-.06858280496900336:we=-.1781828899516648:we=-.04024620133969553:t[9]>10.500000000000002?t[1]>22.500000000000004?t[1]>37.50000000000001?we=.018232649414147116:we=-.04419781124222661:we=.05145485182416554:t[1]>23.500000000000004?t[0]>655.5000000000001?t[5]>4901.500000000001?t[10]>45.50000000000001?we=.11452368095776105:we=-.036496437259924026:we=-.040445338739465486:we=.0816572651001145:we=-.08968914517368663:we=.0002826343082585516;let je;t[189]>1e-35?t[0]>5269.500000000001?je=-.08839493050459957:t[10]>85.50000000000001?je=.10046908365702462:t[8]>2592.5000000000005?je=-.09632233975926387:t[8]>2000.5000000000002?je=.10282992953871627:t[8]>1266.5000000000002?t[9]>34.50000000000001?je=.035504970430426296:t[1]>31.500000000000004?je=-.1133764813142531:je=-.01138280942244812:t[8]>1125.5000000000002?je=.09800530246229806:je=.016170419267589393:t[218]>1e-35?t[9]>99.50000000000001?t[9]>101.50000000000001?t[9]>124.50000000000001?je=.07316772160107896:je=-.059095014819051765:je=.17859437315769733:t[2]>1.5000000000000002?t[9]>86.50000000000001?je=-.09150209066166894:t[8]>3084.0000000000005?je=-.05443972593168094:t[1]>65.50000000000001?t[10]>11.500000000000002?t[9]>33.50000000000001?je=-.04449234460408263:je=.05568837973347338:je=-.12362324875024472:t[1]>41.50000000000001?t[10]>12.500000000000002?t[8]>1336.5000000000002?je=.12741077850267066:je=.007372371864985329:t[2]>39.50000000000001?je=.02295917234617787:je=.14966532083907075:t[1]>39.50000000000001?je=-.06685557815340279:t[10]>22.500000000000004?t[2]>52.50000000000001?je=-.02511861881285652:t[1]>27.500000000000004?je=.08683660011672288:je=.02956214835267301:t[9]>15.500000000000002?je=-.016538805462996232:je=.04352738094981517:je=-.05561856645643868:t[9]>170.50000000000003?je=-.07996752635874248:t[179]>1e-35?je=-.09065975936933919:je=-.00042817975060427177;let Ye;t[39]>1e-35?t[4]>25.500000000000004?Ye=.03443173196222934:Ye=-.06554248341270724:t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[4]>86.50000000000001?Ye=-.0013415395759330318:Ye=.12950978489563347:t[1]>22.500000000000004?t[10]>19.500000000000004?t[4]>30.500000000000004?t[9]>41.50000000000001?Ye=.002297618040307216:Ye=-.12522800128774994:t[4]>8.500000000000002?t[8]>1075.5000000000002?Ye=-.015297257305397608:Ye=.09651828834062742:Ye=-.06636003334371929:t[10]>11.500000000000002?Ye=.17631616138309397:t[0]>1639.5000000000002?Ye=3804386478092585e-20:Ye=-.09099296398683193:Ye=-.06874415876172972:t[0]>2151.5000000000005?Ye=-.1311264883406766:Ye=.00809052010141122:t[253]>1e-35?Ye=-.06338558211939296:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?t[10]>10.500000000000002?t[0]>3615.5000000000005?Ye=.045038497754638605:Ye=-.07770167665661752:Ye=-.08596294280650517:Ye=.08538655727027213:Ye=.09829076418590559:t[1]>39.50000000000001?t[9]>1.5000000000000002?Ye=.054627956617973275:t[1]>61.50000000000001?Ye=-.11994465088415499:t[4]>8.500000000000002?Ye=.06676200239406452:Ye=-.027503148069376867:t[8]>676.5000000000001?Ye=-.10363964928357075:t[4]>8.500000000000002?Ye=-.07589816227175682:Ye=.034664436544646814:t[1]>159.50000000000003?t[6]>25.500000000000004?Ye=.009093153189012338:Ye=-.06119765876605404:Ye=.0004668642103528348;let ht;t[223]>1e-35?t[1]>31.500000000000004?t[8]>711.5000000000001?ht=-.10100794502567233:ht=.08000205636470442:ht=-.11945419826856896:t[113]>1e-35?ht=-.06105445938688056:t[167]>1e-35?t[0]>3928.5000000000005?ht=.1224302423880318:ht=-.01875566982911468:t[222]>1e-35?t[1]>8.500000000000002?t[1]>24.500000000000004?t[4]>3.5000000000000004?t[0]>725.5000000000001?t[0]>1682.5000000000002?t[0]>2860.5000000000005?ht=.0019277012166729114:t[1]>28.500000000000004?ht=-.054445821715687494:ht=.045645722976713245:t[30]>1e-35?ht=.13402660155331655:ht=.008921176001777645:ht=-.058547426505451076:ht=.08841202222426625:t[1]>22.500000000000004?t[10]>9.500000000000002?ht=-.13526418192218206:ht=-.03266013432583145:t[1]>20.500000000000004?t[4]>27.500000000000004?ht=.0007263224246135398:ht=.12450043268647056:t[1]>17.500000000000004?t[9]>1.5000000000000002?ht=-.11575657261278308:ht=-.01530376565862095:t[4]>13.500000000000002?t[4]>22.500000000000004?ht=-.01995960178292952:ht=.11216586049153021:ht=-.10050961087149474:ht=.08848063368485726:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ht=.10303451081526649:ht=-.01375730267020699:t[1]>28.500000000000004?t[2]>20.500000000000004?ht=-.043799548968209395:ht=-.12451444314954115:t[4]>12.500000000000002?ht=-.03838117361958468:ht=.06504990789767144:t[57]>1e-35?ht=.06890006938293915:ht=.0003914274695562949;let St;t[53]>1e-35?t[4]>11.500000000000002?t[8]>617.5000000000001?t[2]>41.50000000000001?St=.004271749009686975:St=-.10523878297127605:St=.04633982158107851:St=-.10349713975483057:t[183]>1e-35?t[15]>1e-35?St=-.08655730561951676:t[8]>919.5000000000001?St=-.0676453705610183:t[7]>18.500000000000004?St=-.027787974193650575:St=.08012784576991301:t[227]>1e-35?t[1]>6.500000000000001?t[3]>8.500000000000002?t[210]>1e-35?St=.07185850683316512:t[8]>201.50000000000003?t[8]>348.50000000000006?t[23]>1e-35?t[8]>1049.5000000000002?St=-.03473877164537313:t[8]>719.5000000000001?St=.10471053866934404:St=.008236107678382981:t[4]>57.50000000000001?St=.09412219478825269:t[10]>66.50000000000001?St=-.13884338641811986:t[10]>19.500000000000004?t[10]>22.500000000000004?t[0]>2490.5000000000005?St=-.040681323751002293:St=.06374650297561021:St=.12884615227401788:t[10]>5.500000000000001?St=-.0887517295786972:t[8]>597.5000000000001?t[18]>1e-35?St=-.05474068967150784:St=.03744700650806603:St=-.07846396348680855:t[1]>42.50000000000001?St=.018972315810821302:St=.10953621007604744:t[5]>4439.500000000001?St=.010999776705494586:t[1]>40.50000000000001?St=-.12394200059775967:t[10]>2.5000000000000004?St=.013528093962849453:St=-.09222088417048682:St=-.12662967149701485:St=.09327296405849603:t[3]>99.50000000000001?St=-.013581954439986752:St=.0005526498251862075;let Mt;t[187]>1e-35?t[243]>1e-35?Mt=-.08392792551692502:t[10]>68.50000000000001?Mt=.07871769409454053:t[10]>8.500000000000002?t[10]>16.500000000000004?t[2]>17.500000000000004?t[3]>31.500000000000004?t[91]>1e-35?t[10]>21.500000000000004?t[10]>33.50000000000001?t[10]>48.50000000000001?Mt=-.0825306209711224:Mt=.049559996084532945:Mt=-.1064938580886302:Mt=.03353240732240275:Mt=.045985370399163464:t[1]>42.50000000000001?t[4]>20.500000000000004?Mt=.16966001471529374:t[1]>57.50000000000001?Mt=-.005772777673676247:Mt=.09383677041525058:t[8]>747.5000000000001?Mt=.054068175469351235:Mt=-.049968216310277036:t[8]>753.5000000000001?Mt=-.0679383555784074:t[4]>8.500000000000002?Mt=-.059757341189735386:Mt=.05701083682780414:Mt=-.052497281448921164:t[6]>12.500000000000002?t[8]>969.5000000000001?t[4]>23.500000000000004?Mt=.05820296128730006:Mt=-.1063042385102475:t[1]>49.50000000000001?t[8]>302.50000000000006?Mt=.15340611616954566:Mt=.04385036188666874:t[0]>4449.500000000001?Mt=-.02110897605541555:t[1]>24.500000000000004?t[2]>17.500000000000004?Mt=.004840354641006495:Mt=.09967827580276283:Mt=.11605363537391578:t[9]>19.500000000000004?Mt=-.0735831692725717:Mt=.019973331823355176:t[306]>1e-35?t[149]>1e-35?Mt=-.08968948874343531:t[8]>1094.5000000000002?t[10]>15.500000000000002?Mt=-.02442182361342386:Mt=.10334853004243093:Mt=-.030431948680167104:Mt=-956078595250818e-19;let At;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4078.5000000000005?At=-.040232505718244854:t[0]>3030.5000000000005?At=.0634109586813073:At=-.04043617034245621:At=-.06385323610738443:t[120]>1e-35?t[4]>18.500000000000004?At=-.007859096946435131:At=.07282728486115758:t[229]>1e-35?t[0]>2952.5000000000005?t[17]>1e-35?At=.05515771679628051:At=-.04214471312668263:At=-.09589322222261765:t[193]>1e-35?At=-.05056345906812831:t[121]>1e-35?t[243]>1e-35?At=.14857706653119385:t[4]>9.500000000000002?t[1]>26.500000000000004?t[2]>59.50000000000001?At=-.08152604001147906:t[11]>1e-35?At=.09132936522356462:t[15]>1e-35?t[4]>23.500000000000004?At=.13100930780107503:t[10]>25.500000000000004?At=.05921074710011526:At=-.07226005736695183:t[0]>3304.5000000000005?t[0]>3707.5000000000005?t[0]>4053.5000000000005?At=.0009447118243153454:At=-.09820565036865991:At=.057146909749745546:t[0]>2115.5000000000005?At=-.12331216726611678:At=.007281983677694285:t[2]>56.50000000000001?At=.012310154675612615:At=-.08873665774670461:t[6]>25.500000000000004?At=.134708740821879:t[9]>5.500000000000001?At=-.0805901581148979:t[224]>1e-35?At=-.063684477784257:t[7]>2.5000000000000004?t[19]>1e-35?At=.10842593386554122:t[2]>13.500000000000002?At=.06466798320378395:At=-.08578130788886655:At=-.03590892078300114:At=.0003499894043880708;let Ie;t[134]>1e-35?t[6]>50.50000000000001?t[0]>3601.5000000000005?Ie=.10839808814624702:Ie=-.028043875308180352:t[7]>30.500000000000004?t[8]>932.5000000000001?Ie=-.007478368069393829:Ie=-.09066751344326617:t[0]>3588.5000000000005?t[5]>4748.500000000001?Ie=.04035247751736232:t[0]>4255.500000000001?Ie=-.1310865624507367:t[0]>4004.5000000000005?Ie=.06647367311982634:Ie=-.08339693352955757:t[4]>10.500000000000002?t[1]>34.50000000000001?Ie=-.011618902907510411:Ie=.1114646660406691:t[10]>2.5000000000000004?t[0]>3072.5000000000005?Ie=.09356028223727986:Ie=-.03811765057032162:Ie=-.09456215497345526:t[280]>1e-35?t[7]>70.50000000000001?Ie=.10322956436499003:t[2]>22.500000000000004?t[1]>83.50000000000001?Ie=.1146142460964847:t[1]>62.50000000000001?Ie=-.09679869865322362:t[9]>71.50000000000001?Ie=-.07377580769927583:t[4]>19.500000000000004?t[0]>4571.500000000001?Ie=-.039046426387852974:Ie=.04558778688367152:Ie=.11220830937352602:t[7]>5.500000000000001?t[9]>17.500000000000004?t[8]>1067.5000000000002?Ie=.03261697816211156:t[15]>1e-35?Ie=.02586252542264368:t[2]>14.500000000000002?Ie=-.016420452667484604:Ie=-.1011799626006976:Ie=-.13787471318963773:t[6]>4.500000000000001?t[8]>427.50000000000006?t[10]>36.50000000000001?Ie=.010193588102560583:Ie=.11748729525930773:Ie=-.04468162226743652:Ie=-.028365274393617957:t[71]>1e-35?Ie=.05115139346588793:Ie=-.0001510425316936658;let K;t[298]>1e-35?t[8]>81.50000000000001?t[8]>119.50000000000001?t[4]>64.50000000000001?K=.09072192054181037:t[9]>72.50000000000001?t[8]>1094.5000000000002?K=.020637047900190317:K=-.1017300802134141:t[1]>23.500000000000004?t[9]>12.500000000000002?t[0]>2815.5000000000005?t[0]>3183.5000000000005?t[3]>23.500000000000004?t[3]>45.50000000000001?t[4]>48.50000000000001?K=-.04632587527094407:K=.08603684785510396:K=-.05101401015448496:K=.025466432054358498:K=-.07897811963329214:t[6]>13.500000000000002?t[10]>26.500000000000004?K=.020385355430046367:K=.12032592051335252:K=-.012387370292173013:t[2]>23.500000000000004?K=-.12568545484492677:K=-.022261190943521976:t[8]>634.5000000000001?t[8]>857.5000000000001?K=.043528764484784536:K=.14352071657196003:K=-.009332833816977268:K=.11186782227735846:K=-.0737365712425554:t[136]>1e-35?t[0]>1937.5000000000002?K=-.05649104643152564:K=.03884200719305747:t[42]>1e-35?K=-.07191700385792335:t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?K=-.04103416502526736:K=.04881823954656287:t[4]>15.500000000000002?K=.009342724662897898:t[0]>3969.5000000000005?K=-.025637309961309498:K=-.12574492012987865:t[212]>1e-35?t[19]>1e-35?K=-.08185697075265091:t[0]>2215.5000000000005?K=.030063975892297354:t[0]>807.5000000000001?K=-.03924325550733229:K=.0415330999189793:K=-.00024374664461674863;let pe;t[3]>7.500000000000001?pe=.0005117490419655908:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?pe=.025798416259686565:pe=.13251610353146012:pe=-.029900559552677654:t[1]>81.50000000000001?t[1]>110.50000000000001?t[0]>4242.500000000001?pe=-.11098564237775424:pe=25960925309712775e-21:t[0]>4177.500000000001?t[9]>35.50000000000001?pe=.15347826616466054:t[3]>4.500000000000001?pe=.10379320730958941:pe=-.008896303020010654:t[0]>3415.5000000000005?t[0]>3830.5000000000005?pe=.03159791088468647:pe=-.10612873364104258:pe=.05059856107348746:t[133]>1e-35?t[2]>5.500000000000001?pe=-.02335760775001469:pe=-.1379386577903324:t[1]>62.50000000000001?t[3]>2.5000000000000004?pe=-.011164334474672973:pe=-.06594044410501655:t[207]>1e-35?pe=-.1014214372326535:t[8]>3.5000000000000004?t[107]>1e-35?t[2]>6.500000000000001?pe=-.01725821503981916:pe=.05594086838700241:t[203]>1e-35?t[1]>44.50000000000001?t[1]>51.50000000000001?pe=-.04226531631656534:pe=-.14409800530171432:pe=-.03245576341206398:t[8]>4214.500000000001?pe=.0895409165534886:t[247]>1e-35?pe=-.06506383629143335:t[118]>1e-35?pe=-.07214270121257443:t[8]>546.5000000000001?pe=-.004385020865473831:pe=.009321812545248529:t[0]>1639.5000000000002?t[13]>1e-35?pe=.046278501133958524:pe=-.030835570926968044:t[0]>493.50000000000006?pe=-.12794504651610425:pe=.009415039807550776;let me;t[304]>1e-35?me=-.04717777269217453:t[76]>1e-35?me=-.05813439142128324:t[1]>59.50000000000001?t[0]>350.50000000000006?t[53]>1e-35?me=-.09648224457374217:t[132]>1e-35?me=.07089308107910267:t[0]>2248.5000000000005?t[5]>2525.5000000000005?t[9]>1.5000000000000002?t[114]>1e-35?me=-.08595213071749083:t[9]>14.500000000000002?t[9]>33.50000000000001?t[285]>1e-35?me=.10838431695638147:t[230]>1e-35?me=.06458713915750626:t[0]>3219.5000000000005?t[3]>23.500000000000004?t[9]>69.50000000000001?me=.050071316251979:me=-.006356941111525215:t[6]>8.500000000000002?me=-.0384814076434817:t[1]>73.50000000000001?t[0]>3746.5000000000005?me=.10217402850540398:me=-.048840949025349197:me=-.03668313197909846:t[7]>39.50000000000001?me=-.0562642841496003:t[10]>2.5000000000000004?me=.09749777369987417:me=-.04848223121417616:t[0]>5453.500000000001?me=.08316648226133942:me=-.0261979698267618:t[212]>1e-35?me=.09565573198318654:t[5]>4814.500000000001?t[8]>963.5000000000001?t[8]>1514.5000000000002?me=.04837009746506856:me=-.09184360565631328:me=.0032411047845613606:t[0]>4733.500000000001?me=.0977378556864798:me=.010776545559325588:me=-.012483310473120218:me=-.049284121449103935:me=.011962641341789565:t[1]>67.50000000000001?t[1]>77.50000000000001?me=-.08380361910948711:me=.07375088778585813:me=-.1084864186071348:me=.0007819503469605476;let ne;t[7]>17.500000000000004?t[115]>1e-35?ne=.08741852531696623:t[167]>1e-35?ne=.10078975495600809:ne=-.0018324767784017562:t[290]>1e-35?ne=-.0850089851255888:t[74]>1e-35?t[10]>16.500000000000004?ne=.1379733311640402:ne=-.0038500648529631075:t[6]>29.500000000000004?t[8]>876.5000000000001?t[0]>3129.5000000000005?t[9]>5.500000000000001?t[8]>1765.5000000000002?ne=-.09360083033774169:ne=.061471353193188374:t[10]>11.500000000000002?t[10]>31.500000000000004?ne=-.015599362579530679:t[0]>4593.500000000001?ne=-.12029549262691491:ne=-.018917032256501397:ne=.04632831686576592:ne=.06892347785444271:t[4]>8.500000000000002?t[10]>33.50000000000001?ne=-.05894883236412263:ne=.05213944998315824:ne=.12621779223564986:t[243]>1e-35?t[6]>16.500000000000004?t[0]>4141.500000000001?t[0]>5850.500000000001?ne=.07577412405680808:ne=-.053144737214742235:t[1]>29.500000000000004?t[9]>16.500000000000004?ne=-.0277076900736147:t[1]>65.50000000000001?ne=-.023587471585763506:ne=.10184896592433082:ne=-.057699270527916825:ne=-.041191811945739454:t[114]>1e-35?t[2]>23.500000000000004?ne=.06566902102799584:t[10]>25.500000000000004?ne=-.07033633753181047:ne=-.01599120398351932:t[242]>1e-35?t[0]>2402.5000000000005?ne=-.08108035861059537:ne=.04184690010531078:t[35]>1e-35?t[0]>2904.5000000000005?ne=-.12431182772561139:ne=.01886235886984271:ne=.0025579594894418116;let V;t[8]>2915.5000000000005?t[101]>1e-35?V=.08648323956719083:t[0]>93.50000000000001?t[196]>1e-35?V=-.09509320772734361:t[4]>1.5000000000000002?t[5]>1106.5000000000002?t[5]>1191.5000000000002?t[283]>1e-35?V=-.11268313808648661:t[10]>12.500000000000002?t[131]>1e-35?V=.0687641681341721:t[10]>102.50000000000001?V=-.09667920080214842:t[4]>15.500000000000002?t[8]>2992.5000000000005?t[1]>24.500000000000004?t[1]>71.50000000000001?V=-.06762578396473291:t[10]>65.50000000000001?V=-.05226727783610509:t[282]>1e-35?V=.09911438410640917:t[19]>1e-35?V=.06915156336429933:V=-.006565637886508241:V=-.08344300251849307:V=-.0928863907927501:t[1]>60.50000000000001?t[2]>17.500000000000004?V=.19428463865406298:V=.016073883020956765:t[13]>1e-35?V=.06864077097923665:V=-.01388867527034731:t[0]>1847.5000000000002?V=.004655280608161356:t[1]>40.50000000000001?V=.031406054057765996:V=.12798062439212832:V=.09859670536264255:t[10]>2.5000000000000004?t[9]>68.50000000000001?V=.08821759640665892:t[9]>32.50000000000001?t[8]>3960.0000000000005?t[1]>31.500000000000004?V=-.0706095614785733:V=.04227164041372561:V=-.1056906923176064:t[2]>8.500000000000002?t[19]>1e-35?V=-.07139533369873902:V=.008952586782921625:V=.06086212582180936:V=-.0816938490403437:V=-.051224901945956025:V=-.10525399124186095:V=.000270924147208224;let Re;t[122]>1e-35?t[0]>2461.5000000000005?t[2]>36.50000000000001?Re=.029186512383291244:t[7]>1.5000000000000002?Re=-.14984127276725573:t[1]>40.50000000000001?Re=.032757060730648144:Re=-.07675575422749602:t[6]>8.500000000000002?Re=.10599766037117893:Re=-.0541423394552156:t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?Re=-.051394622947855385:Re=.03237141302699347:Re=.12526173027943244:Re=.000579473126472788:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?Re=-.07383912482657777:t[0]>5147.500000000001?Re=.07008813937042091:t[10]>38.50000000000001?Re=-.06779203808365307:Re=-.013782769999524498:Re=.0880038869117715:Re=-.12846294176070952:t[281]>1e-35?Re=-.06810806903850834:t[10]>227.50000000000003?Re=-.08937977001661111:t[10]>130.50000000000003?Re=.10538920632708033:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?Re=.011036530162093841:Re=-.11500797478569702:Re=.03702229366129399:Re=.07242026683784307:t[189]>1e-35?Re=.03331407112090286:t[9]>33.50000000000001?t[201]>1e-35?Re=.08979610115743614:t[7]>57.50000000000001?t[1]>20.500000000000004?Re=-.02608892716555304:Re=.09609599320761308:t[9]>105.50000000000001?Re=-.06848127135991534:Re=.0023675721254089715:t[86]>1e-35?Re=-.11049635625500497:Re=-.004847764219432233;let ze;t[125]>1e-35?t[0]>3969.5000000000005?ze=-.09462233499115416:ze=.05235324508465096:t[17]>1e-35?t[49]>1e-35?t[10]>19.500000000000004?ze=-.030700661288166148:ze=.0870883677166864:t[10]>3.5000000000000004?t[3]>18.500000000000004?t[0]>3544.5000000000005?t[188]>1e-35?t[9]>7.500000000000001?ze=.03149547314036763:ze=-.08166208257451366:t[0]>5850.500000000001?ze=-.10228136324773157:t[102]>1e-35?ze=-.10572585290676295:t[8]>726.5000000000001?t[5]>3657.5000000000005?ze=.01782894842128785:t[13]>1e-35?ze=.002680190260979968:ze=.1773965720476949:t[2]>72.50000000000001?ze=.09090831938627947:t[1]>59.50000000000001?ze=-.12297206702816128:t[0]>4977.500000000001?ze=.09899015653118268:ze=-.022207141540838887:t[4]>32.50000000000001?t[1]>34.50000000000001?ze=-.0675900954187773:ze=.012336403425364092:ze=-.0017002325391924573:t[6]>7.500000000000001?t[1]>17.500000000000004?ze=-.02671721777458802:ze=-.09242452991958029:t[284]>1e-35?ze=-.08585691288582491:ze=.013332890564324447:t[4]>14.500000000000002?ze=-.005245022074799553:t[23]>1e-35?ze=-.020036720167235768:t[1]>29.500000000000004?t[114]>1e-35?ze=-.09289852307936758:t[116]>1e-35?ze=-.09686573010015055:t[8]>804.5000000000001?ze=.03812547148215318:ze=.005162744968176633:t[9]>43.50000000000001?ze=-.059246106396159376:ze=.050370113808135275:ze=.000794041852811028;let Dt;t[3]>7.500000000000001?Dt=.0004981426543104341:t[9]>114.50000000000001?Dt=.05666010099424601:t[129]>1e-35?t[6]>3.5000000000000004?Dt=-.019061766497948867:Dt=.07193491146561211:t[186]>1e-35?t[0]>2653.5000000000005?Dt=-.006044199577160493:Dt=.1147136801028133:t[6]>85.50000000000001?t[8]>847.5000000000001?Dt=.11486607015912494:t[9]>16.500000000000004?Dt=-.08686820858087294:Dt=.06119632492911875:t[127]>1e-35?t[0]>2723.5000000000005?t[0]>3682.5000000000005?t[1]>38.50000000000001?Dt=-.022230207980026437:Dt=.1056683690528792:Dt=-.05859530800943035:Dt=.06970608927597141:t[7]>3.5000000000000004?t[105]>1e-35?Dt=.08073568184886762:t[107]>1e-35?t[2]>6.500000000000001?Dt=-.05177544573528314:Dt=.05370469772149028:t[1]>35.50000000000001?t[0]>4106.500000000001?t[9]>46.50000000000001?t[0]>4633.500000000001?Dt=.15159657923771555:Dt=-.0060542654587671055:t[9]>5.500000000000001?Dt=-.042808028205051786:t[1]>48.50000000000001?Dt=-.010449538258110742:Dt=.10026907521968294:Dt=-.04249349329714756:t[9]>42.50000000000001?t[1]>19.500000000000004?t[8]>852.5000000000001?Dt=-.02272452389409874:Dt=-.11202691218244319:t[5]>1809.5000000000002?Dt=-.04460413584255906:Dt=.08196329474205256:t[10]>69.50000000000001?Dt=.10221481166238167:Dt=.0004063052701699382:t[243]>1e-35?Dt=-.07563941678849846:t[18]>1e-35?Dt=.02563513231103432:Dt=-.004740081147303786;let tr;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?tr=.057446442918106:tr=-.04404018270156349:tr=-.09282976714550464:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?tr=-.05930486238817954:t[1]>29.500000000000004?tr=.06955866121256543:t[8]>597.5000000000001?tr=-.06538593556505168:tr=.06212512595497445:tr=.00021102929959182257:t[9]>90.50000000000001?tr=.0958061289119631:t[102]>1e-35?tr=.07172059675638813:t[1]>47.50000000000001?tr=-.03879798603977766:t[297]>1e-35?tr=.054948234271956144:t[282]>1e-35?t[2]>6.500000000000001?tr=.003805910996312012:tr=.09304295674749524:t[11]>1e-35?t[18]>1e-35?tr=.11252376801858695:t[288]>1e-35?tr=-.10293901912180432:tr=.014669268837893872:t[1]>42.50000000000001?tr=-.05988274123836837:t[145]>1e-35?tr=.06142784665288495:t[3]>1.5000000000000002?t[4]>4.500000000000001?t[1]>21.500000000000004?t[1]>27.500000000000004?t[9]>24.500000000000004?tr=.038791154988529926:t[10]>22.500000000000004?t[2]>19.500000000000004?tr=-.03366718308159971:tr=.11936550608549797:t[1]>31.500000000000004?tr=-.07454716789539667:tr=.027859650621164217:t[10]>10.500000000000002?tr=-.11806374092321247:tr=-.03506042229223101:tr=-.0007080765837654515:t[10]>6.500000000000001?tr=-.028077713664996503:t[2]>7.500000000000001?tr=.15803724124216814:tr=.0351381284833169:tr=-.07877953381054767;let Wt;t[131]>1e-35?t[282]>1e-35?t[4]>23.500000000000004?Wt=.14144941521975005:Wt=.0007727806714190652:t[9]>1.5000000000000002?t[8]>2134.5000000000005?t[2]>34.50000000000001?Wt=.10514088112381886:t[7]>18.500000000000004?Wt=-.10370643555956745:Wt=.04093594315421388:t[6]>15.500000000000002?t[4]>9.500000000000002?t[10]>27.500000000000004?t[10]>71.50000000000001?Wt=-.0508129468802936:t[224]>1e-35?Wt=-.037816066368733595:t[10]>43.50000000000001?Wt=.07793408602607932:Wt=.017646166646099453:t[9]>3.5000000000000004?t[9]>29.500000000000004?t[17]>1e-35?Wt=.036972453794202324:Wt=-.08727431092411866:t[8]>427.50000000000006?t[8]>1278.5000000000002?Wt=.09475302525132188:Wt=-.03580104945898193:Wt=.08349488283861875:t[10]>3.5000000000000004?t[0]>1847.5000000000002?t[0]>4280.500000000001?t[2]>27.500000000000004?Wt=-.1282448778804823:Wt=-.014395808269207212:Wt=-.008940927190750592:Wt=-.1459118815453748:t[0]>4897.500000000001?Wt=-.09733068457286576:t[1]>57.50000000000001?Wt=.06575271409540207:Wt=-.019556422817450115:Wt=-.10623959222984136:t[18]>1e-35?Wt=.11280940901275241:t[8]>319.50000000000006?t[2]>6.500000000000001?Wt=.008125645893104896:Wt=-.11084368630465868:Wt=.0584398731508786:t[0]>350.50000000000006?t[3]>83.50000000000001?Wt=-.05854904579626861:t[4]>5.500000000000001?Wt=.02985784951394175:Wt=-.03247600140149334:Wt=-.11152899295304973:Wt=-.00035424577714215764;let gr;t[32]>1e-35?t[17]>1e-35?t[8]>359.50000000000006?t[8]>804.5000000000001?gr=-.06563670567578264:gr=.067656954313663:gr=-.10388217548685377:t[8]>2302.5000000000005?gr=.07190621943790435:t[4]>67.50000000000001?gr=.060020507643618604:t[4]>38.50000000000001?gr=-.08707253184321638:t[2]>11.500000000000002?t[2]>16.500000000000004?t[1]>31.500000000000004?t[1]>59.50000000000001?gr=-.06568134366461277:t[8]>1075.5000000000002?gr=-.004768057709758692:gr=.11785959165999467:gr=-.05080221682879267:gr=.14814206127494542:gr=-.07241946332311736:t[253]>1e-35?gr=-.058893562861261274:t[4]>61.50000000000001?t[283]>1e-35?t[10]>23.500000000000004?gr=-.02471195342450034:gr=.11866056464409412:t[10]>44.50000000000001?t[1]>16.500000000000004?t[8]>2640.0000000000005?gr=-.10741850739482771:gr=.010051635824944:gr=.12502069436017124:t[8]>1971.5000000000002?t[1]>23.500000000000004?t[308]>1e-35?gr=.10511236013756364:t[10]>10.500000000000002?t[1]>53.50000000000001?gr=-.08992396138178163:gr=.010944365997007212:gr=.06221307021813793:gr=.1286024087559141:t[127]>1e-35?gr=.06568148624531012:t[10]>40.50000000000001?gr=-.07567979134643352:t[5]>5647.500000000001?gr=.07594672895572069:gr=-.018158016446439187:t[6]>55.50000000000001?gr=.009293422430111872:t[4]>45.50000000000001?gr=-.017749818406964022:t[2]>46.50000000000001?gr=.01714136511113982:gr=-724762291423549e-19;let xr;t[1]>24.500000000000004?t[103]>1e-35?t[8]>48.50000000000001?t[17]>1e-35?xr=-.048689215588703864:t[9]>27.500000000000004?t[0]>3916.5000000000005?xr=.07084726276890757:xr=-.11232323677722932:xr=.04812773089510436:xr=.11757502216780046:t[5]>1464.5000000000002?t[5]>1505.5000000000002?t[167]>1e-35?xr=.07470606002425358:t[1]>53.50000000000001?t[132]>1e-35?xr=.0879462816013881:xr=-.002966662093626573:t[306]>1e-35?xr=-.04588085188342676:xr=.0031910005157084823:t[3]>10.500000000000002?t[10]>20.500000000000004?xr=-.006600332774461143:xr=.1272481351557754:xr=-.09030973597154808:t[284]>1e-35?t[1]>38.50000000000001?t[10]>2.5000000000000004?xr=.011884312066620044:xr=.11678751052403374:t[4]>8.500000000000002?xr=.03627129613273813:xr=-.12132783497902287:xr=-.006784372643244717:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?xr=-.06830131718398992:t[0]>5147.500000000001?xr=.062360406249609306:t[4]>4.500000000000001?xr=-.013162203864592055:xr=-.07153029184927609:xr=.07628618062271557:xr=-.12085065687320373:t[190]>1e-35?xr=-.045816889524231186:t[137]>1e-35?xr=-.07956001795911584:t[199]>1e-35?t[0]>3853.5000000000005?xr=.025895337822752502:xr=-.06503949350616421:t[10]>227.50000000000003?xr=-.09989456525790491:t[10]>130.50000000000003?xr=.08616651057030683:xr=.0001234981796706021;let wr;t[8]>1014.5000000000001?t[9]>137.50000000000003?wr=-.08778879924617534:t[8]>1022.5000000000001?t[285]>1e-35?t[9]>64.50000000000001?wr=.04955806187281689:t[0]>3670.5000000000005?t[10]>32.50000000000001?wr=-.141732381961068:wr=-.0317152307496497:wr=-.02074638849097191:t[0]>93.50000000000001?t[0]>3072.5000000000005?t[10]>100.50000000000001?t[4]>24.500000000000004?t[8]>1336.5000000000002?wr=.12191801556691254:wr=-.0003444689085397977:wr=.005739668504631604:t[146]>1e-35?t[308]>1e-35?wr=.015237524791728777:t[6]>61.50000000000001?t[4]>63.50000000000001?wr=-.05676033995381961:wr=.10933961076803381:t[4]>26.500000000000004?wr=-.11667582544549814:t[8]>1765.5000000000002?wr=.032174455312047705:wr=-.0755016390126608:t[293]>1e-35?wr=-.08234885407658332:t[9]>41.50000000000001?t[0]>3830.5000000000005?wr=.026571311956824436:t[15]>1e-35?wr=.06175459479851121:wr=-.018778084411148754:t[9]>40.50000000000001?wr=-.09420232889965811:wr=-.004578248021263184:t[2]>1.5000000000000002?wr=.005453714644971445:wr=-.03907138175699279:wr=-.055296364182154736:t[23]>1e-35?wr=.036555134842143476:t[0]>4188.500000000001?t[6]>29.500000000000004?wr=-.09358146510580179:wr=.060524657996178094:wr=-.11245101144669545:t[125]>1e-35?t[9]>1.5000000000000002?wr=-.12698331085931538:wr=.006059605604079918:t[2]>196.50000000000003?wr=-.09451315810804783:wr=.0011390147031687425;let Lt;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[8]>3794.5000000000005?Lt=.05517359070460923:Lt=-.04758751221404857:Lt=-.09482078194138792:t[8]>2992.5000000000005?t[1]>101.50000000000001?Lt=.1040436595565776:t[9]>21.500000000000004?Lt=.04032250517675179:t[107]>1e-35?Lt=.05978752253058374:t[210]>1e-35?t[4]>37.50000000000001?Lt=.1192453009230486:t[1]>51.50000000000001?Lt=.0443376336292195:Lt=-.07967674833321865:t[5]>2117.5000000000005?t[9]>10.500000000000002?Lt=-.10025078607591283:t[0]>2882.5000000000005?t[18]>1e-35?Lt=-.08999822408398037:Lt=.017533219253893447:t[9]>1.5000000000000002?t[4]>12.500000000000002?Lt=-.061850439226075:Lt=.08849196353361093:Lt=.10536348167793089:t[92]>1e-35?Lt=.04894947712119185:t[9]>16.500000000000004?Lt=.05900227903883853:t[9]>5.500000000000001?Lt=-.11946594348916476:Lt=-.03652096348071964:t[1]>41.50000000000001?Lt=-.07411603110840567:Lt=-.00021033247574340914:t[10]>22.500000000000004?t[9]>68.50000000000001?Lt=.08493634342741495:t[11]>1e-35?Lt=-.10899097825564363:Lt=-.006156708838964173:t[8]>3198.5000000000005?t[2]>41.50000000000001?Lt=.08356655906359918:t[7]>25.500000000000004?Lt=-.09475076526194888:t[10]>5.500000000000001?Lt=-.01999406228763778:Lt=.06696212545889428:t[6]>20.500000000000004?Lt=.14713592661393468:Lt=.0459917279002218:Lt=.00027445928493734093;let sr;t[223]>1e-35?t[1]>31.500000000000004?t[8]>634.5000000000001?sr=-.06904501553217077:sr=.05696231672035904:sr=-.1124703178077813:t[99]>1e-35?t[1]>89.50000000000001?sr=-.05074261170009721:t[1]>57.50000000000001?t[8]>969.5000000000001?sr=-.011419256378538392:t[0]>3830.5000000000005?sr=.140315841503076:sr=.02403434913963024:t[1]>31.500000000000004?t[8]>65.50000000000001?t[2]>10.500000000000002?sr=-.04027822909411164:sr=.03176085103667189:sr=.06779515865838849:t[4]>15.500000000000002?sr=.0762878389015175:t[8]>175.50000000000003?t[0]>3030.5000000000005?t[8]>1041.5000000000002?sr=.06124039747298539:sr=-.04312732764434027:sr=.09161522761808062:sr=-.09663512235460074:t[280]>1e-35?t[6]>45.50000000000001?t[1]>46.50000000000001?sr=.11211681010488772:t[13]>1e-35?sr=.06725735814960367:sr=-.046744031455827846:t[10]>44.50000000000001?t[0]>3400.5000000000005?t[0]>4004.5000000000005?t[2]>22.500000000000004?sr=.11743605068905603:sr=-.011309033539148687:sr=-.07896094707523052:sr=.12862714793172117:t[10]>1.5000000000000002?t[8]>455.50000000000006?t[0]>4706.500000000001?sr=-.09218756798869711:t[10]>19.500000000000004?t[0]>1894.5000000000002?t[0]>3719.5000000000005?sr=.02836295848998302:sr=.12210680366745175:sr=-.058302317470509096:t[5]>4144.500000000001?sr=.06123341960495106:sr=-.03840046906926525:sr=-.05221474543453495:sr=.03988215485860711:sr=-.00033074684693083496;let Lp=x0a(e+r+n+o+s+c+l+u+d+p+h+m+g+A+y+E+_+v+b+I+x+w+R+P+k+Q+M+N+G+O+D+F+U+L+H+$+W+j+ce+J+Te+fe+Ne+Ve+Ue+Ke+X+le+te+xe+Z+ae+De+Y+ee+Ee+Ae+ve+We+Ze+Et+Rt+Qt+Ft+ue+Be+et+lt+ye+Le+$e+rt+it+dt+z+se+_e+we+je+Ye+ht+St+Mt+At+Ie+K+pe+me+ne+V+Re+ze+Dt+tr+Wt+gr+xr+wr+Lt+sr);return[1-Lp,Lp]}a(I0a,"multilineModelPredict");function x0a(t){if(t<0){let e=Math.exp(t);return e/(1+e)}return 1/(1+Math.exp(-t))}a(x0a,"sigmoid")});var gii=T(JU=>{"use strict";f();Object.defineProperty(JU,"__esModule",{value:!0});JU.MultilineModelFeatures=JU.PromptFeatures=void 0;JU.hasComment=efr;JU.requestMultilineScore=k0a;var KU=pii(),w0a=hii(),R0a={javascript:["//"],typescript:["//"],typescriptreact:["//"],javascriptreact:["//"],vue:["//","-->"],php:["//","#"],dart:["//"],go:["//"],cpp:["//"],scss:["//"],csharp:["//"],java:["//"],c:["//"],rust:["//"],python:["#"],markdown:["#","-->"],css:["*/"]},mii={javascript:1,javascriptreact:2,typescript:3,typescriptreact:4,python:5,go:6,ruby:7};function efr(t,e,r,n=!0){let o=t.split(` +`);if(n&&(o=o.filter(l=>l.trim().length>0)),Math.abs(e)>o.length||e>=o.length)return!1;e<0&&(e=o.length+e);let s=o[e];return(R0a[r]??[]).some(l=>s.includes(l))}a(efr,"hasComment");var _we=class{static{a(this,"PromptFeatures")}constructor(e,r){let[n,o]=this.firstAndLast(e),s=this.firstAndLast(e.trimEnd());this.language=r,this.length=e.length,this.firstLineLength=n.length,this.lastLineLength=o.length,this.lastLineRstripLength=o.trimEnd().length,this.lastLineStripLength=o.trim().length,this.rstripLength=e.trimEnd().length,this.stripLength=e.trim().length,this.rstripLastLineLength=s[1].length,this.rstripLastLineStripLength=s[1].trim().length,this.secondToLastLineHasComment=efr(e,-2,r),this.rstripSecondToLastLineHasComment=efr(e.trimEnd(),-2,r),this.prefixEndsWithNewline=e.endsWith(` `),this.lastChar=e.slice(-1),this.rstripLastChar=e.trimEnd().slice(-1),this.firstChar=e[0],this.lstripFirstChar=e.trimStart().slice(0,1)}firstAndLast(e){let r=e.split(` -`),n=r.length,o=r[0],s=r[n-1];return s===""&&n>1&&(s=r[n-2]),[o,s]}};TQ.PromptFeatures=bRe;var Uat=class{static{a(this,"MultilineModelFeatures")}constructor(e,r,n){this.language=n,this.prefixFeatures=new bRe(e,n),this.suffixFeatures=new bRe(r,n)}constructFeatures(){let e=new Array(14).fill(0);e[0]=this.prefixFeatures.length,e[1]=this.prefixFeatures.firstLineLength,e[2]=this.prefixFeatures.lastLineLength,e[3]=this.prefixFeatures.lastLineRstripLength,e[4]=this.prefixFeatures.lastLineStripLength,e[5]=this.prefixFeatures.rstripLength,e[6]=this.prefixFeatures.rstripLastLineLength,e[7]=this.prefixFeatures.rstripLastLineStripLength,e[8]=this.suffixFeatures.length,e[9]=this.suffixFeatures.firstLineLength,e[10]=this.suffixFeatures.lastLineLength,e[11]=this.prefixFeatures.secondToLastLineHasComment?1:0,e[12]=this.prefixFeatures.rstripSecondToLastLineHasComment?1:0,e[13]=this.prefixFeatures.prefixEndsWithNewline?1:0;let r=new Array(Object.keys(gni).length+1).fill(0);r[gni[this.language]??0]=1;let n=new Array(Object.keys(bQ.contextualFilterCharacterMap).length+1).fill(0);n[bQ.contextualFilterCharacterMap[this.prefixFeatures.lastChar]??0]=1;let o=new Array(Object.keys(bQ.contextualFilterCharacterMap).length+1).fill(0);o[bQ.contextualFilterCharacterMap[this.prefixFeatures.rstripLastChar]??0]=1;let s=new Array(Object.keys(bQ.contextualFilterCharacterMap).length+1).fill(0);s[bQ.contextualFilterCharacterMap[this.suffixFeatures.firstChar]??0]=1;let c=new Array(Object.keys(bQ.contextualFilterCharacterMap).length+1).fill(0);return c[bQ.contextualFilterCharacterMap[this.suffixFeatures.lstripFirstChar]??0]=1,e.concat(r,n,o,s,c)}};TQ.MultilineModelFeatures=Uat;function Rda(t,e){return new Uat(t.prefix,t.suffix,e)}a(Rda,"constructMultilineFeatures");function Pda(t,e){let r=Rda(t,e).constructFeatures();return(0,xda.multilineModelPredict)(r)[1]}a(Pda,"requestMultilineScore")});var yni=T(a3=>{"use strict";f();var kda=a3&&a3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Nda=a3&&a3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(a3,"__esModule",{value:!0});a3.StreamedCompletionSplitter=void 0;var Dda=Mo(),Mda=rde(),Oda=Kue(),Odr=class t{static{a(this,"StreamingCompletion")}constructor(e,r){this.index=e,this.documentPrefix=r,this.startOffset=0,this.text="",this.trimCount=0}updateText(e){this.text=e}get addedToPrefix(){return this.text.substring(0,this.startOffset)}get effectivePrefix(){return this.documentPrefix+this.addedToPrefix}get effectiveText(){return this.text.substring(this.startOffset)}get isFirstCompletion(){return this.trimCount===0}get firstNewlineOffset(){let e=[...this.text.matchAll(/\r?\n/g)];return e.length>0&&e[0].index===0&&e.shift(),e.length>0?e[0].index:-1}trimAt(e){let r=new t(this.index,this.documentPrefix);return r.startOffset=this.startOffset,r.text=this.text.substring(0,this.startOffset+e),r.trimCount=this.trimCount,this.startOffset+=e,this.trimCount++,r}},Bdr=class{static{a(this,"StreamedCompletionSplitter")}constructor(e,r,n,o,s,c){this.prefix=e,this.languageId=r,this.initialSingleLine=n,this.trimmerLookahead=o,this.cacheFunction=s,this.instantiationService=c,this.lineLimit=3,this.completions=new Map}getFinishedCallback(){return async(e,r)=>{let n=r.index??0,o=this.getCompletion(n,e);if(o.isFirstCompletion&&this.initialSingleLine&&o.firstNewlineOffset>=0){let s={yieldSolution:!0,continueStreaming:!0,finishOffset:o.firstNewlineOffset};return o.trimAt(s.finishOffset),r.finished&&await this.trimAll(r,o),s}return r.finished?await this.trimAll(r,o):await this.trimOnce(r,o)}}getCompletion(e,r){let n=this.completions.get(e);return n||(n=new Odr(e,this.prefix),this.completions.set(e,n)),n.updateText(r),n}async trimOnce(e,r){let n=await this.trim(r);return n===void 0?{yieldSolution:!1,continueStreaming:!0}:r.isFirstCompletion?(r.trimAt(n),{yieldSolution:!0,continueStreaming:!0,finishOffset:n}):(this.cacheCompletion(e,r,n),{yieldSolution:!1,continueStreaming:!0})}async trimAll(e,r){let n,o;do n=await this.trim(r),r.isFirstCompletion?(o=n,r.trimAt(n??r.effectiveText.length)):this.cacheCompletion(e,r,n);while(n!==void 0);return o!==void 0?{yieldSolution:!0,continueStreaming:!0,finishOffset:o}:{yieldSolution:!1,continueStreaming:!0}}async trim(e){return await new Oda.TerseBlockTrimmer(this.languageId,e.effectivePrefix,e.effectiveText,this.lineLimit,this.trimmerLookahead).getCompletionTrimOffset()}cacheCompletion(e,r,n){let o=r.trimAt(n??r.effectiveText.length);if(o.effectiveText.trim()==="")return;let s=this.instantiationService.invokeFunction(Mda.convertToAPIChoice,o.effectiveText.trimEnd(),e.getAPIJsonData(),o.index,e.requestId,n!==void 0,e.telemetryData);s.copilotAnnotations=this.adjustedAnnotations(s,r,o),s.generatedChoiceIndex=o.trimCount,this.cacheFunction(o.addedToPrefix,s)}adjustedAnnotations(e,r,n){if(e.copilotAnnotations===void 0)return;let o=n.addedToPrefix.length,c=o+e.completionText.length>=r.text.length,l={};for(let[u,d]of Object.entries(e.copilotAnnotations)){let p=d.filter(h=>h.start_offset-o0).map(h=>{let m={...h};return m.start_offset-=o,m.stop_offset-=o,c||(m.stop_offset=Math.min(m.stop_offset,e.completionText.length)),m});p.length>0&&(l[u]=p)}return Object.keys(l).length>0?l:void 0}};a3.StreamedCompletionSplitter=Bdr;a3.StreamedCompletionSplitter=Bdr=kda([Nda(5,Dda.IInstantiationService)],Bdr)});var Ini=T(Ldr=>{"use strict";f();Object.defineProperty(Ldr,"__esModule",{value:!0});Ldr.getGhostTextStrategy=Gda;var Tni=Mo(),Eni=DK(),ZR=Xm(),Sni=Zm(),Qat=xot(),Cni=Dp(),Bda=que(),TRe=Kue(),Lda=wdr(),Fda=dwe(),Uda=yor(),Qda=Ani(),qda=yni(),_ni=20;function vni(t){return e=>{let r=e?.split(` +`),n=r.length,o=r[0],s=r[n-1];return s===""&&n>1&&(s=r[n-2]),[o,s]}};JU.PromptFeatures=_we;var Wst=class{static{a(this,"MultilineModelFeatures")}constructor(e,r,n){this.language=n,this.prefixFeatures=new _we(e,n),this.suffixFeatures=new _we(r,n)}constructFeatures(){let e=new Array(14).fill(0);e[0]=this.prefixFeatures.length,e[1]=this.prefixFeatures.firstLineLength,e[2]=this.prefixFeatures.lastLineLength,e[3]=this.prefixFeatures.lastLineRstripLength,e[4]=this.prefixFeatures.lastLineStripLength,e[5]=this.prefixFeatures.rstripLength,e[6]=this.prefixFeatures.rstripLastLineLength,e[7]=this.prefixFeatures.rstripLastLineStripLength,e[8]=this.suffixFeatures.length,e[9]=this.suffixFeatures.firstLineLength,e[10]=this.suffixFeatures.lastLineLength,e[11]=this.prefixFeatures.secondToLastLineHasComment?1:0,e[12]=this.prefixFeatures.rstripSecondToLastLineHasComment?1:0,e[13]=this.prefixFeatures.prefixEndsWithNewline?1:0;let r=new Array(Object.keys(mii).length+1).fill(0);r[mii[this.language]??0]=1;let n=new Array(Object.keys(KU.contextualFilterCharacterMap).length+1).fill(0);n[KU.contextualFilterCharacterMap[this.prefixFeatures.lastChar]??0]=1;let o=new Array(Object.keys(KU.contextualFilterCharacterMap).length+1).fill(0);o[KU.contextualFilterCharacterMap[this.prefixFeatures.rstripLastChar]??0]=1;let s=new Array(Object.keys(KU.contextualFilterCharacterMap).length+1).fill(0);s[KU.contextualFilterCharacterMap[this.suffixFeatures.firstChar]??0]=1;let c=new Array(Object.keys(KU.contextualFilterCharacterMap).length+1).fill(0);return c[KU.contextualFilterCharacterMap[this.suffixFeatures.lstripFirstChar]??0]=1,e.concat(r,n,o,s,c)}};JU.MultilineModelFeatures=Wst;function P0a(t,e){return new Wst(t.prefix,t.suffix,e)}a(P0a,"constructMultilineFeatures");function k0a(t,e){let r=P0a(t,e).constructFeatures();return(0,w0a.multilineModelPredict)(r)[1]}a(k0a,"requestMultilineScore")});var Aii=T(HB=>{"use strict";f();var D0a=HB&&HB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},N0a=HB&&HB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(HB,"__esModule",{value:!0});HB.StreamedCompletionSplitter=void 0;var M0a=Po(),O0a=gue(),B0a=uue(),tfr=class t{static{a(this,"StreamingCompletion")}constructor(e,r){this.index=e,this.documentPrefix=r,this.startOffset=0,this.text="",this.trimCount=0}updateText(e){this.text=e}get addedToPrefix(){return this.text.substring(0,this.startOffset)}get effectivePrefix(){return this.documentPrefix+this.addedToPrefix}get effectiveText(){return this.text.substring(this.startOffset)}get isFirstCompletion(){return this.trimCount===0}get firstNewlineOffset(){let e=[...this.text.matchAll(/\r?\n/g)];return e.length>0&&e[0].index===0&&e.shift(),e.length>0?e[0].index:-1}trimAt(e){let r=new t(this.index,this.documentPrefix);return r.startOffset=this.startOffset,r.text=this.text.substring(0,this.startOffset+e),r.trimCount=this.trimCount,this.startOffset+=e,this.trimCount++,r}},rfr=class{static{a(this,"StreamedCompletionSplitter")}constructor(e,r,n,o,s,c){this.prefix=e,this.languageId=r,this.initialSingleLine=n,this.trimmerLookahead=o,this.cacheFunction=s,this.instantiationService=c,this.lineLimit=3,this.completions=new Map}getFinishedCallback(){return async(e,r)=>{let n=r.index??0,o=this.getCompletion(n,e);if(o.isFirstCompletion&&this.initialSingleLine&&o.firstNewlineOffset>=0){let s={yieldSolution:!0,continueStreaming:!0,finishOffset:o.firstNewlineOffset};return o.trimAt(s.finishOffset),r.finished&&await this.trimAll(r,o),s}return r.finished?await this.trimAll(r,o):await this.trimOnce(r,o)}}getCompletion(e,r){let n=this.completions.get(e);return n||(n=new tfr(e,this.prefix),this.completions.set(e,n)),n.updateText(r),n}async trimOnce(e,r){let n=await this.trim(r);return n===void 0?{yieldSolution:!1,continueStreaming:!0}:r.isFirstCompletion?(r.trimAt(n),{yieldSolution:!0,continueStreaming:!0,finishOffset:n}):(this.cacheCompletion(e,r,n),{yieldSolution:!1,continueStreaming:!0})}async trimAll(e,r){let n,o;do n=await this.trim(r),r.isFirstCompletion?(o=n,r.trimAt(n??r.effectiveText.length)):this.cacheCompletion(e,r,n);while(n!==void 0);return o!==void 0?{yieldSolution:!0,continueStreaming:!0,finishOffset:o}:{yieldSolution:!1,continueStreaming:!0}}async trim(e){return await new B0a.TerseBlockTrimmer(this.languageId,e.effectivePrefix,e.effectiveText,this.lineLimit,this.trimmerLookahead).getCompletionTrimOffset()}cacheCompletion(e,r,n){let o=r.trimAt(n??r.effectiveText.length);if(o.effectiveText.trim()==="")return;let s=this.instantiationService.invokeFunction(O0a.convertToAPIChoice,o.effectiveText.trimEnd(),e.getAPIJsonData(),o.index,e.requestId,n!==void 0,e.telemetryData);s.copilotAnnotations=this.adjustedAnnotations(s,r,o),s.generatedChoiceIndex=o.trimCount,this.cacheFunction(o.addedToPrefix,s)}adjustedAnnotations(e,r,n){if(e.copilotAnnotations===void 0)return;let o=n.addedToPrefix.length,c=o+e.completionText.length>=r.text.length,l={};for(let[u,d]of Object.entries(e.copilotAnnotations)){let p=d.filter(h=>h.start_offset-o0).map(h=>{let m={...h};return m.start_offset-=o,m.stop_offset-=o,c||(m.stop_offset=Math.min(m.stop_offset,e.completionText.length)),m});p.length>0&&(l[u]=p)}return Object.keys(l).length>0?l:void 0}};HB.StreamedCompletionSplitter=rfr;HB.StreamedCompletionSplitter=rfr=D0a([N0a(5,M0a.IInstantiationService)],rfr)});var Sii=T(nfr=>{"use strict";f();Object.defineProperty(nfr,"__esModule",{value:!0});nfr.getGhostTextStrategy=H0a;var bii=Po(),yii=QY(),GR=Gm(),Tii=Hm(),zst=Oit(),Eii=xp(),L0a=tue(),Cwe=uue(),F0a=zdr(),U0a=cxe(),Q0a=For(),q0a=gii(),G0a=Aii(),_ii=20;function Cii(t){return e=>{let r=e?.split(` `)??[];if(r.length>t+1)return r.slice(0,t+1).join(` -`).length}}a(vni,"takeNLines");async function Gda(t,e,r,n,o,s,c){let l=t.get(Tni.IInstantiationService),u=t.get(Sni.ICompletionsFeaturesService),d=t.get(Uda.ICompletionsBlockModeConfig),p=u.multilineAfterAcceptLines(c),h=d.forLanguage(e.textDocument.detectedLanguageId,c);switch(h){case ZR.BlockMode.Server:return s?{blockMode:ZR.BlockMode.Parsing,requestMultiline:!0,finishedCb:vni(p),stop:[` +`).length}}a(Cii,"takeNLines");async function H0a(t,e,r,n,o,s,c){let l=t.get(bii.IInstantiationService),u=t.get(Tii.ICompletionsFeaturesService),d=t.get(Q0a.ICompletionsBlockModeConfig),p=u.multilineAfterAcceptLines(c),h=d.forLanguage(e.textDocument.detectedLanguageId,c);switch(h){case GR.BlockMode.Server:return s?{blockMode:GR.BlockMode.Parsing,requestMultiline:!0,finishedCb:Cii(p),stop:[` -`],maxTokens:_ni*p}:{blockMode:ZR.BlockMode.Server,requestMultiline:!0,finishedCb:a(m=>{},"finishedCb")};case ZR.BlockMode.Parsing:case ZR.BlockMode.ParsingAndServer:case ZR.BlockMode.MoreMultiline:default:{let m;try{m=await l.invokeFunction(Hda,h,e.textDocument,e.position,o,s,n)}catch{m={requestMultiline:!1}}if(!s&&m.requestMultiline&&u.singleLineUnlessAccepted(c)&&(m.requestMultiline=!1),m.requestMultiline){let g;return n.trailingWs.length>0&&!n.prompt.prefix.endsWith(n.trailingWs)?g=Bda.LocationFactory.position(e.position.line,Math.max(e.position.character-n.trailingWs.length,0)):g=e.position,{blockMode:h,requestMultiline:!0,...l.invokeFunction(bni,h,e.textDocument,g,m.blockPosition,r,!0,n.prompt,c)}}if(s){let g={blockMode:ZR.BlockMode.Parsing,requestMultiline:!0,finishedCb:vni(p),stop:[` +`],maxTokens:_ii*p}:{blockMode:GR.BlockMode.Server,requestMultiline:!0,finishedCb:a(m=>{},"finishedCb")};case GR.BlockMode.Parsing:case GR.BlockMode.ParsingAndServer:case GR.BlockMode.MoreMultiline:default:{let m;try{m=await l.invokeFunction(j0a,h,e.textDocument,e.position,o,s,n)}catch{m={requestMultiline:!1}}if(!s&&m.requestMultiline&&u.singleLineUnlessAccepted(c)&&(m.requestMultiline=!1),m.requestMultiline){let g;return n.trailingWs.length>0&&!n.prompt.prefix.endsWith(n.trailingWs)?g=L0a.LocationFactory.position(e.position.line,Math.max(e.position.character-n.trailingWs.length,0)):g=e.position,{blockMode:h,requestMultiline:!0,...l.invokeFunction(vii,h,e.textDocument,g,m.blockPosition,r,!0,n.prompt,c)}}if(s){let g={blockMode:GR.BlockMode.Parsing,requestMultiline:!0,finishedCb:Cii(p),stop:[` -`],maxTokens:_ni*p};return h===ZR.BlockMode.MoreMultiline&&(g.blockMode=ZR.BlockMode.MoreMultiline),g}return{blockMode:h,requestMultiline:!1,...l.invokeFunction(bni,h,e.textDocument,e.position,m.blockPosition,r,!1,n.prompt,c)}}}}a(Gda,"getGhostTextStrategy");function bni(t,e,r,n,o,s,c,l,u){let d=t.get(Sni.ICompletionsFeaturesService),p=t.get(Tni.IInstantiationService);if(c&&e===ZR.BlockMode.MoreMultiline&&TRe.BlockTrimmer.isSupported(r.detectedLanguageId)){let h=o===TRe.BlockPositionType.EmptyBlock||o===TRe.BlockPositionType.BlockEnd?d.longLookaheadSize(u):d.shortLookaheadSize(u),m=t.get(Fda.ICompletionsCacheService);return{finishedCb:p.createInstance(qda.StreamedCompletionSplitter,s,r.detectedLanguageId,!1,h,(A,y)=>{let E={prefix:s+A,prompt:{...l,prefix:l.prefix+A}};(0,Lda.appendToCache)(m,E,y)}).getFinishedCallback(),maxTokens:d.maxMultilineTokens(u)}}return{finishedCb:c?(0,Qat.parsingBlockFinished)(r,n):h=>{}}}a(bni,"buildFinishedCallback");async function Hda(t,e,r,n,o,s,c){if(r.lineCount>=8e3)(0,Cni.telemetry)(t,"ghostText.longFileMultilineSkip",Cni.TelemetryData.createAndMarkAsIssued({languageId:r.detectedLanguageId,lineCount:String(r.lineCount),currentLine:String(n.line)}));else{if(e===ZR.BlockMode.MoreMultiline&&TRe.BlockTrimmer.isSupported(r.detectedLanguageId))return s?{requestMultiline:!0,blockPosition:await(0,TRe.getBlockPositionType)(r,n)}:{requestMultiline:!1};if(["typescript","typescriptreact"].includes(r.detectedLanguageId)&&jda(n,r))return{requestMultiline:!0};let u=!1;return!o&&(0,Eni.isSupportedLanguageId)(r.detectedLanguageId)?u=await(0,Qat.isEmptyBlockStartUtil)(r,n):o&&(0,Eni.isSupportedLanguageId)(r.detectedLanguageId)&&(u=await(0,Qat.isEmptyBlockStartUtil)(r,n)||await(0,Qat.isEmptyBlockStartUtil)(r,r.lineAt(n).range.end)),u||["javascript","javascriptreact","python"].includes(r.detectedLanguageId)&&(u=(0,Qda.requestMultilineScore)(c.prompt,r.detectedLanguageId)>.5),{requestMultiline:u}}return{requestMultiline:!1}}a(Hda,"shouldRequestMultiline");function jda(t,e){return e.lineAt(t).text.trim().length===0}a(jda,"isNewLine")});var Nni=T(lI=>{"use strict";f();var $da=lI&&lI.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},e2=lI&&lI.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(lI,"__esModule",{value:!0});lI.ForceMultiLine=lI.GhostTextComputer=void 0;lI.getGhostText=ffa;var wni=L0(),Vda=Rp(),Wda=Gur(),zda=Np(),Rni=Mo(),Yda=Hur(),Kda=Oue(),Jda=Xxe(),Xda=nir(),IRe=Xm(),Hdr=Zm(),Zda=mc(),efa=Tde(),tfa=lot(),rfa=wat(),nfa=dst(),ifa=nQ(),ofa=xot(),Fdr=hde(),Qdr=Jur(),Udr=Rri(),Nde=Dp(),qat=que(),xni=lwe(),sfa=Jir(),afa=Kue(),cfa=dwe(),qdr=pni(),Pni=Cor(),lfa=Ini(),SQ=HU(),qf=Zue(),ufa={isCycling:!1,promptOnly:!1,isSpeculative:!1};function dfa(t,e,r){let n=t.get(Hdr.ICompletionsFeaturesService),o=(0,IRe.getConfig)(t,IRe.ConfigKey.CompletionsDebounce)??n.completionsDebounce(r)??e.debounceMs;if(o===void 0)return 0;let s=(0,Nde.now)()-r.issuedTime;return Math.max(0,o-s)}a(dfa,"getRemainingDebounceMs");function SRe(t,e,r){return r?.isCancellationRequested||e!==t.currentRequestId}a(SRe,"isCompletionRequestCancelled");var Gat=class{static{a(this,"GhostTextComputer")}constructor(e,r,n,o,s,c,l,u,d,p,h){this.instantiationService=e,this.telemetryService=r,this.notifierService=n,this.contextProviderBridge=o,this.currentGhostText=s,this.contextproviderStatistics=c,this.asyncCompletionManager=l,this.completionsFeaturesService=u,this.logTarget=d,this.statusReporter=p,this.logService=h}async getGhostText(e,r,n,o,s,c){let l=(0,zda.generateUuid)(),u=c.createSubLogger(["GhostTextComputer#getGhostText"]);this.currentGhostText.currentRequestId=l;let d=await this.instantiationService.invokeFunction(Afa,e.textDocument,l,n);await Kda.initializeTokenizers.catch(()=>{});try{this.contextProviderBridge.schedule(e,l,n?.opportunityId??"",d,r,n),this.notifierService.notifyRequest(e,l,d,r,n);let p=await this.getGhostTextWithoutAbortHandling(e,l,d,r,n,o,s,u),h=this.contextproviderStatistics.getStatisticsForCompletion(l),m=n?.opportunityId??"unknown";for(let[g,A]of h.getAllUsageStatistics())this.telemetryService.sendMSFTTelemetryEvent("context-provider.completion-stats",{requestId:l,opportunityId:m,providerId:g,resolution:A.resolution,usage:A.usage,usageDetails:JSON.stringify(A.usageDetails)},{});return p}catch(p){if((0,efa.isAbortError)(p))return{type:"canceled",reason:"aborted at unknown location",telemetryData:(0,qf.mkCanceledResultTelemetry)(d,{cancelledNetworkRequest:!0})};throw p}}async getGhostTextWithoutAbortHandling(e,r,n,o,s,c,l,u){let d=u.createSubLogger(["GhostTextComputer#getGhostTextWithoutAbortHandling"]),p=n.issuedTime,h=[];function m(v){let b=(0,Nde.now)();h.push([v,b-p]),p=b}if(a(m,"recordPerformance"),m("telemetry"),SRe(this.currentGhostText,r,o))return{type:"abortedBeforeIssued",reason:"cancelled before extractPrompt",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};let g=hfa(e.textDocument,e.position);if(g===void 0)return d.debug("Completions do not trigger in the middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};let A=this.instantiationService.invokeFunction(tfa.getEngineRequestInfo,n),y={...ufa,...s,tokenizer:A.tokenizer},E=await this.instantiationService.invokeFunction(Fdr.extractPrompt,r,e,n,void 0,y);if(m("prompt"),c.setPrompt(Fdr.PromptResponse.toString(E)),E.type==="copilotContentExclusion")return d.debug("Copilot not available, due to content exclusion"),{type:"abortedBeforeIssued",reason:"Copilot not available due to content exclusion",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};if(E.type==="contextTooShort")return d.debug("Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};if(E.type==="promptError")return d.debug("Error while building the prompt"),{type:"abortedBeforeIssued",reason:"Error while building the prompt",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};if(y.promptOnly)return{type:"promptOnly",reason:"Breaking, promptOnly set to true",prompt:E};if(E.type==="promptCancelled")return d.debug("Cancelled during extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled during extractPrompt",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};if(E.type==="promptTimeout")return d.debug("Timeout during extractPrompt"),{type:"abortedBeforeIssued",reason:"Timeout",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};if(E.prompt.prefix.length===0&&E.prompt.suffix.length===0)return d.debug("Error empty prompt"),{type:"abortedBeforeIssued",reason:"Empty prompt",telemetryData:(0,qf.mkBasicResultTelemetry)(n)};let _=this.instantiationService.invokeFunction(dfa,y,n);return _>0&&(d.debug(`Debouncing ghost text request for ${_}ms`),await(0,xni.delay)(_),SRe(this.currentGhostText,r,o))?{type:"abortedBeforeIssued",reason:"cancelled after debounce",telemetryData:(0,qf.mkBasicResultTelemetry)(n)}:this.statusReporter.withProgress(async()=>{let[v]=(0,Fdr.trimLastLine)(e.textDocument.getText(qat.LocationFactory.range(qat.LocationFactory.position(0,0),e.position)));d.trace(`Starting ghost text computation, prefix length: ${v.length}`);let b=this.currentGhostText.hasAcceptedCurrentCompletion(v,E.prompt.suffix);d.trace(`hasAcceptedCurrentCompletion: ${b}`);let I=E.prompt,x=await this.instantiationService.invokeFunction(lfa.getGhostTextStrategy,e,v,E,g,b,n);m("strategy"),d.trace(`Ghost text strategy: blockMode=${x.blockMode}, requestMultiline=${x.requestMultiline}, stop=${x.stop}, maxTokens=${x.maxTokens}`);let R=this.instantiationService.invokeFunction(pfa,v,I,x.requestMultiline);d.trace(`Local cache lookup: ${R?`found ${R[0].length} choices`:"no cached choices"}`),m("cache");let w=this.instantiationService.invokeFunction(Qdr.extractRepoInfoInBackground,e.textDocument.uri),P={blockMode:x.blockMode,languageId:e.textDocument.detectedLanguageId,repoInfo:w,engineModelId:A.modelId,ourRequestId:r,prefix:v,prompt:E.prompt,multiline:x.requestMultiline,indentation:(0,ofa.contextIndentation)(e.textDocument,e.position),isCycling:y.isCycling,headers:A.headers,stop:x.stop,maxTokens:x.maxTokens,afterAccept:b};P.headers={...P.headers,"X-Copilot-Async":"true","X-Copilot-Speculative":y.isSpeculative?"true":"false"};let k=this.instantiationService.invokeFunction(Efa,e.textDocument,P,e.position,E,n,A,y);if(R===void 0&&!y.isCycling&&this.asyncCompletionManager.shouldWaitForAsyncCompletions(v,E.prompt)){d.trace("No cached choices, waiting for async completions from in-flight request");let L=await this.asyncCompletionManager.getFirstMatchingRequestWithTimeout(r,v,E.prompt,y.isSpeculative,k);if(m("asyncWait"),L){d.trace("Received choice from async completion");let H=!x.requestMultiline;R=[[(0,qdr.makeGhostAPIChoice)(L[0],{forceSingleLine:H})],SQ.ResultType.Async]}else d.trace("No matching async completion found within timeout");if(SRe(this.currentGhostText,r,o))return d.debug("Cancelled before requesting a new completion"),{type:"abortedBeforeIssued",reason:"Cancelled after waiting for async completion",telemetryData:(0,qf.mkBasicResultTelemetry)(k)}}else d.trace("Skipping wait for async completions");let Q=x.blockMode===IRe.BlockMode.MoreMultiline&&afa.BlockTrimmer.isSupported(e.textDocument.detectedLanguageId);if(R!==void 0&&(d.trace(`Post-processing ${R[0].length} cached choices, isMoreMultiline=${Q}`),R[0]=R[0].map(L=>this.instantiationService.invokeFunction(Udr.postProcessChoiceInContext,e.textDocument,e.position,L,Q,d)).filter(L=>L!==void 0)),R&&(R[1]===SQ.ResultType.Cache||R[1]===SQ.ResultType.TypingAsSuggested)&&(l.setIsFromCache(),c.markAsFromCache()),R!==void 0&&R[0].length===0)return d.trace(`Found empty inline suggestions locally via ${(0,qf.resultTypeToString)(R[1])}`),{type:"empty",reason:"cached results empty after post-processing",telemetryData:(0,qf.mkBasicResultTelemetry)(k)};if(R!==void 0&&R[0].length>0&&(!y.isCycling||R[0].length>1))d.trace(`Found inline suggestions locally via ${(0,qf.resultTypeToString)(R[1])}`);else{d.trace(`Going to network, isCycling=${y.isCycling}`);let L=this.instantiationService.createInstance(qdr.CompletionsFromNetwork);if(y.isCycling){d.trace("Fetching all completions for cycling request");let H=await L.getAllCompletionsFromNetwork(P,k,o,x.finishedCb,l);if(H.type==="success"){d.trace(`Cycling network request returned ${H.value[0].length} choices`);let $=R?.[0]??[];H.value[0].forEach(W=>{$.findIndex(j=>j.completionText.trim()===W.completionText.trim())===-1&&$.push(W)}),d.trace(`After deduplication: ${$.length} unique choices`),R=[$,SQ.ResultType.Cycling]}else if(R===void 0)return H}else{d.trace("Initiating network request for completions");let H=a((ce,J)=>(this.asyncCompletionManager.updateCompletion(r,ce),x.finishedCb(ce,J)),"finishedCb"),$=new Jda.CancellationTokenSource,W=L.getCompletionsFromNetwork(P,k,$.token,H,l);this.asyncCompletionManager.queueCompletionRequest(r,v,E.prompt,$,W);let j=await this.asyncCompletionManager.getFirstMatchingRequest(r,v,E.prompt,y.isSpeculative);if(j===void 0)return d.trace("Network request returned no results"),{type:"empty",reason:"received no results from async completions",telemetryData:(0,qf.mkBasicResultTelemetry)(k)};d.trace("Received completion from network request"),R=[[j[0]],SQ.ResultType.Async]}m("network")}if(R===void 0)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:(0,qf.mkBasicResultTelemetry)(k)};let[M,D]=R;d.trace(`Final choices: ${M.length} from ${(0,qf.resultTypeToString)(D)}`);let G=M.map(L=>this.instantiationService.invokeFunction(Udr.postProcessChoiceInContext,e.textDocument,e.position,L,Q,d)).filter(L=>L!==void 0);d.trace(`Post-processed to ${G.length} choices`);let O=this.instantiationService.invokeFunction(IRe.getConfig,IRe.ConfigKey.CompletionsDelay)??this.completionsFeaturesService.completionsDelay(n),N=(0,Nde.now)()-n.issuedTime,F=Math.max(O-N,0);if(D!==SQ.ResultType.TypingAsSuggested&&!y.isCycling&&F>0&&(d.debug(`Waiting ${F}ms before returning completion`),await(0,xni.delay)(F),SRe(this.currentGhostText,r,o)))return d.debug("Cancelled after completions delay"),{type:"canceled",reason:"after completions delay",telemetryData:(0,qf.mkCanceledResultTelemetry)(k)};let U=[];for(let L of G){let H=yfa(e.textDocument,P,L,k),$=g?(0,Udr.checkSuffix)(e.textDocument,e.position,L):0,j={completion:mfa(L.choiceIndex,L.completionText,E.trailingWs),telemetry:H,isMiddleOfTheLine:g,suffixCoverage:$,copilotAnnotations:L.copilotAnnotations,clientCompletionId:L.clientCompletionId};U.push(j)}return k.properties.clientCompletionId=U[0]?.clientCompletionId,k.measurements.foundOffset=U?.[0]?.telemetry?.measurements?.foundOffset??-1,d.debug(`Produced ${U.length} results from ${(0,qf.resultTypeToString)(D)} at ${k.measurements.foundOffset} offset`),SRe(this.currentGhostText,r,o)?{type:"canceled",reason:"after post processing completions",telemetryData:(0,qf.mkCanceledResultTelemetry)(k)}:(y.isSpeculative||(d.trace("Updating current ghost text as request is not speculative"),this.currentGhostText.setGhostText(v,E.prompt.suffix,G,D)),m("complete"),d.trace(`Ghost text computation complete, returning ${U.length} results`),{type:"success",value:[U,D],telemetryData:(0,qf.mkBasicResultTelemetry)(k),telemetryBlob:k,resultType:D,performanceMetrics:h})})}};lI.GhostTextComputer=Gat;lI.GhostTextComputer=Gat=$da([e2(0,Rni.IInstantiationService),e2(1,Vda.ITelemetryService),e2(2,Xda.ICompletionsNotifierService),e2(3,nfa.ICompletionsContextProviderBridgeService),e2(4,Pni.ICompletionsCurrentGhostText),e2(5,ifa.ICompletionsContextProviderService),e2(6,sfa.ICompletionsAsyncManagerService),e2(7,Hdr.ICompletionsFeaturesService),e2(8,Zda.ICompletionsLogTargetService),e2(9,rfa.ICompletionsStatusReporter),e2(10,wni.ILogService)],Gat);async function ffa(t,e,r,n,o,s,c){return t.get(Rni.IInstantiationService).createInstance(Gat).getGhostText(e,r,n,o,s,c)}a(ffa,"getGhostText");function pfa(t,e,r,n){let s=t.get(Pni.ICompletionsCurrentGhostText).getCompletionsForUserTyping(e,r.suffix),c=gfa(t,e,r.suffix,n);if(s&&s.length>0){let l=(c??[]).filter(u=>!s.some(d=>d.completionText===u.completionText));return[s.concat(l),SQ.ResultType.TypingAsSuggested]}if(c&&c.length>0)return[c,SQ.ResultType.Cache]}a(pfa,"getLocalInlineSuggestion");function hfa(t,e){let n=t.lineAt(e).text.substring(e.character);return(0,Yda.isInlineSuggestionFromTextAfterCursor)(n)}a(hfa,"isInlineSuggestion");var Gdr=class t{static{a(this,"ForceMultiLine")}static{this.default=new t}constructor(e=!1){this.requestMultilineOverride=e}};lI.ForceMultiLine=Gdr;function mfa(t,e,r){if(r.length>0){if(e.startsWith(r))return{completionIndex:t,completionText:e,displayText:e.substring(r.length),displayNeedsWsOffset:!1};{let n=e.substring(0,e.length-e.trimStart().length);return r.startsWith(n)?{completionIndex:t,completionText:e,displayText:e.trimStart(),displayNeedsWsOffset:!0}:{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}}else return{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}a(mfa,"adjustLeadingWhitespace");function gfa(t,e,r,n){let o=t.get(wni.ILogService).createSubLogger(["getCompletionsFromCache"]),s=t.get(cfa.ICompletionsCacheService).findAll(e,r);return s.length===0?(o.debug("Found no completions in cache"),[]):(o.debug(`Found ${s.length} completions in cache`),s.map(c=>(0,qdr.makeGhostAPIChoice)(c,{forceSingleLine:!n})))}a(gfa,"getCompletionsFromCache");async function Afa(t,e,r,n){let o=t.get(Hdr.ICompletionsFeaturesService),s={headerRequestId:r};n?.opportunityId&&(s.opportunityId=n.opportunityId),n?.selectedCompletionInfo?.text&&(s.completionsActive="true"),n?.isSpeculative&&(s.reason="speculative");let c=Nde.TelemetryData.createAndMarkAsIssued(s);return await o.updateExPValuesAndAssignments({uri:e.uri,languageId:e.detectedLanguageId},c)}a(Afa,"createTelemetryWithExp");function yfa(t,e,r,n){let o=r.requestId,s={choiceIndex:r.choiceIndex.toString(),clientCompletionId:r.clientCompletionId};r.generatedChoiceIndex!==void 0&&(s.originalChoiceIndex=s.choiceIndex,s.choiceIndex=(1e4*(r.generatedChoiceIndex+1)+r.choiceIndex).toString());let c={compCharLen:r.completionText.length,numLines:r.completionText.trim().split(` -`).length};r.meanLogProb&&(c.meanLogProb=r.meanLogProb),r.meanAlternativeLogProb&&(c.meanAlternativeLogProb=r.meanAlternativeLogProb);let l=r.telemetryData.extendedBy(s,c);return l.issuedTime=n.issuedTime,l.measurements.timeToProduceMs=performance.now()-n.issuedTime,kni(l,t),l.extendWithRequestId(o),l}a(yfa,"telemetryWithAddData");function Efa(t,e,r,n,o,s,c,l){let u={languageId:e.detectedLanguageId};u.afterAccept=r.afterAccept.toString(),u.isSpeculative=l.isSpeculative.toString();let d=s.extendedBy(u);kni(d,e);let p=r.repoInfo;d.properties.gitRepoInformation=p===void 0?"unavailable":p===Qdr.ComputationStatus.PENDING?"pending":"available",p!==void 0&&p!==Qdr.ComputationStatus.PENDING&&(d.properties.gitRepoUrl=p.url,d.properties.gitRepoHost=p.hostname,p.repoId?.type==="github"?(d.properties.gitRepoOwner=p.repoId.org,d.properties.gitRepoName=p.repoId.repo):p.repoId?.type==="ado"&&(d.properties.gitRepoOwner=p.repoId.project,d.properties.gitRepoName=p.repoId.repo),d.properties.gitRepoPath=p.pathname),d.properties.engineName=c.modelId,d.properties.engineChoiceSource=c.engineChoiceSource,d.properties.isMultiline=JSON.stringify(r.multiline),d.properties.isCycling=JSON.stringify(r.isCycling);let h=e.lineAt(n.line),m=e.getText(qat.LocationFactory.range(h.range.start,n)),g=e.getText(qat.LocationFactory.range(n,h.range.end)),A=Array.from(o.neighborSource.entries()).map(v=>[v[0],v[1].map(b=>(0,Wda.createSha256Hash)(b).toString())]),y={beforeCursorWhitespace:JSON.stringify(m.trim()===""),afterCursorWhitespace:JSON.stringify(g.trim()===""),neighborSource:JSON.stringify(A),blockMode:r.blockMode},E={...(0,Nde.telemetrizePromptLength)(o.prompt),promptEndPos:e.offsetAt(n),promptComputeTimeMs:o.computeTimeMs};o.metadata&&(y.promptMetadata=JSON.stringify(o.metadata)),o.contextProvidersTelemetry&&(y.contextProviders=JSON.stringify(o.contextProvidersTelemetry));let _=d.extendedBy(y,E);return(0,Nde.telemetry)(t,"ghostText.issued",_),d}a(Efa,"telemetryIssued");function kni(t,e){t.measurements.documentLength=e.getText().length,t.measurements.documentLineCount=e.lineCount}a(kni,"addDocumentTelemetry")});var Bni=T(c3=>{"use strict";f();var Cfa=c3&&c3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},jdr=c3&&c3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(c3,"__esModule",{value:!0});c3.GhostText=void 0;var Dni=Nn(),_fa=Mo(),vfa=bor(),bfa=Eri(),Mni=Nni(),Tfa=Lur(),Sfa=HU(),Ifa=_ot(),Oni=Zue(),xfa=mc(),$dr=class{static{a(this,"GhostText")}constructor(e,r,n){this.instantiationService=e,this.logTargetService=r,this.speculativeRequestCache=n}async getInlineCompletions(e,r,n,o={},s,c,l){wfa(this.logTargetService,e,r);let u=await this.getInlineCompletionsResult((0,vfa.createCompletionState)(e,r),n,o,s,c,l);return this.instantiationService.invokeFunction(Oni.handleGhostTextResultTelemetry,u)}async getInlineCompletionsResult(e,r,n={},o,s,c){let l=0;n.selectedCompletionInfo?.text&&!n.selectedCompletionInfo.text.includes(")")&&(e=e.addSelectedCompletionInfo(n.selectedCompletionInfo),l=e.position.character-n.selectedCompletionInfo.range.end.character);let u=await this.instantiationService.invokeFunction(Mni.getGhostText,e,r,n,o,s,c);if(u.type!=="success")return u;let[d,p]=u.value;if(r.isCancellationRequested)return{type:"canceled",reason:"after getGhostText",telemetryData:{telemetryBlob:u.telemetryBlob}};let h=this.instantiationService.invokeFunction(Tfa.setLastShown,e.textDocument,e.position,p),m=(0,bfa.completionsFromGhostTextResults)(d,p,e.textDocument,e.position,n.formattingOptions,h);if(m.length===0)return{type:"empty",reason:"no completions in final result",telemetryData:u.telemetryData};if(p!==Sfa.ResultType.TypingAsSuggested){e=e.applyEdits([{newText:m[0].insertText,range:m[0].range}]);let A={isSpeculative:!0,opportunityId:n.opportunityId},y=a(()=>this.instantiationService.invokeFunction(Mni.getGhostText,e,void 0,A,o,s,c),"fn");this.speculativeRequestCache.set(m[0].clientCompletionId,y)}let g=m.map(A=>{let{start:y,end:E}=A.range,_=Dni.Range.create(y,Dni.Position.create(E.line,E.character-l));return{...A,range:_}});return{...u,value:g}}};c3.GhostText=$dr;c3.GhostText=$dr=Cfa([jdr(0,_fa.IInstantiationService),jdr(1,xfa.ICompletionsLogTargetService),jdr(2,Ifa.ICompletionsSpeculativeRequestCache)],$dr);function wfa(t,e,r){let n=e.getText({start:{line:Math.max(r.line-1,0),character:0},end:r}),o=e.getText({start:r,end:{line:Math.min(r.line+2,e.lineCount-1),character:e.lineCount-1>r.line?0:r.character}});Oni.logger.debug(t,`Requesting for ${e.uri} at ${r.line}:${r.character}`,`between ${JSON.stringify(n)} and ${JSON.stringify(o)}.`)}a(wfa,"logCompletionLocation")});var Lni=T($at=>{"use strict";f();Object.defineProperty($at,"__esModule",{value:!0});$at.LocalFileSystem=void 0;var Hat=require("fs"),Rfa=require("path"),jat=UU(),Vdr=qU(),Wdr=class{static{a(this,"LocalFileSystem")}async readFileString(e){return(await Hat.promises.readFile((0,Vdr.fsPath)(e))).toString()}async stat(e){let{targetStat:r,lstat:n,stat:o}=await this.statWithLink((0,Vdr.fsPath)(e));return{ctime:r.ctimeMs,mtime:r.mtimeMs,size:r.size,type:this.getFileType(r,n,o)}}async readDirectory(e){let r=(0,Vdr.fsPath)(e),n=await Hat.promises.readdir(r,{withFileTypes:!0}),o=[];for(let s of n){let{targetStat:c,lstat:l,stat:u}=await this.statWithLink((0,Rfa.join)(r,s.name));o.push([s.name,this.getFileType(c,l,u)])}return o}async statWithLink(e){let r=await Hat.promises.lstat(e);if(r.isSymbolicLink())try{let n=await Hat.promises.stat(e);return{lstat:r,stat:n,targetStat:n}}catch{}return{lstat:r,targetStat:r}}getFileType(e,r,n){let o=jat.FileType.Unknown;return e.isFile()&&(o=jat.FileType.File),e.isDirectory()&&(o=jat.FileType.Directory),r.isSymbolicLink()&&n&&(o|=jat.FileType.SymbolicLink),o}};$at.LocalFileSystem=Wdr});var qni=T(l3=>{"use strict";f();var Pfa=l3&&l3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},xRe=l3&&l3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(l3,"__esModule",{value:!0});l3.CompositeRelatedFilesProvider=void 0;var kfa=PK(),Nfa=Mo(),Dde=Xm(),Dfa=Zm(),Mfa=UU(),Ofa=mc(),wRe=fde(),_J=_st(),Fni=["cpp","c","cuda-cpp"],Uni=["typescript","javascript","typescriptreact","javascriptreact"],Qni=["csharp"],Bfa=new Map([...Fni.map(t=>[t,wRe.NeighboringFileType.RelatedCpp]),...Uni.map(t=>[t,wRe.NeighboringFileType.RelatedTypeScript]),...Qni.map(t=>[t,wRe.NeighboringFileType.RelatedCSharpRoslyn])]);function Lfa(t){return Bfa.get(t)??wRe.NeighboringFileType.RelatedOther}a(Lfa,"getNeighboringFileType");var zdr=class extends _J.RelatedFilesProvider{static{a(this,"CompositeRelatedFilesProvider")}constructor(e,r,n,o,s){super(e,r,o,s),this.featuresService=n,this.providers=new Map,this.telemetrySent=!1,this.reportedUnknownProviders=new Set}async getRelatedFilesResponse(e,r,n){let o=Date.now(),s=e.clientLanguageId.toLowerCase();if(Lfa(s)===wRe.NeighboringFileType.RelatedOther&&!this.reportedUnknownProviders.has(s)&&(this.reportedUnknownProviders.add(s),_J.relatedFilesLogger.warn(this.logTarget,`unknown language ${s}`)),this.relatedFilesTelemetry(r),_J.relatedFilesLogger.debug(this.logTarget,`Fetching related files for ${e.uri}`),!this.isActive(s,r))return _J.relatedFilesLogger.debug(this.logTarget,"language-server related-files experiment is not active."),_J.EmptyRelatedFilesResponse;let l=this.providers.get(s);if(!l)return _J.EmptyRelatedFilesResponse;try{return this.convert(e.uri,l,o,r,n)}catch{this.relatedFileNonresponseTelemetry(s,r);return}}async convert(e,r,n,o,s){s||(s={isCancellationRequested:!1,onCancellationRequested:a(()=>({dispose(){}}),"onCancellationRequested")});let c={entries:[],traits:[]},l=r.size>0;for(let u of r.values()){let d=await u.callback(e,{flags:{}},s);if(d){l=!1,c.entries.push(...d.entries),d.traits&&c.traits.push(...d.traits);for(let p of d.entries)for(let h of p.uris)_J.relatedFilesLogger.debug(this.logTarget,h.toString())}}return this.performanceTelemetry(Date.now()-n,o),l?void 0:c}registerRelatedFilesProvider(e,r,n){let o=this.providers.get(r);o?o.set(e,{extensionId:e,languageId:r,callback:n}):this.providers.set(r,new Map([[e,{extensionId:e,languageId:r,callback:n}]]))}unregisterRelatedFilesProvider(e,r,n){let o=this.providers.get(r);if(o){let s=o.get(e);s&&s.callback===n&&o.delete(e)}}isActive(e,r){return Qni.includes(e)?this.featuresService.relatedFilesVSCodeCSharp(r)||this.instantiationService.invokeFunction(Dde.getConfig,Dde.ConfigKey.RelatedFilesVSCodeCSharp):Uni.includes(e)?this.featuresService.relatedFilesVSCodeTypeScript(r)||this.instantiationService.invokeFunction(Dde.getConfig,Dde.ConfigKey.RelatedFilesVSCodeTypeScript):Fni.includes(e)?this.featuresService.cppHeadersEnableSwitch(r):this.featuresService.relatedFilesVSCode(r)||this.instantiationService.invokeFunction(Dde.getConfig,Dde.ConfigKey.RelatedFilesVSCode)}relatedFilesTelemetry(e){}relatedFileNonresponseTelemetry(e,r){}performanceTelemetry(e,r){}};l3.CompositeRelatedFilesProvider=zdr;l3.CompositeRelatedFilesProvider=zdr=Pfa([xRe(0,Nfa.IInstantiationService),xRe(1,kfa.IIgnoreService),xRe(2,Dfa.ICompletionsFeaturesService),xRe(3,Ofa.ICompletionsLogTargetService),xRe(4,Mfa.ICompletionsFileSystemService)],zdr)});var $ni=T(vJ=>{"use strict";f();Object.defineProperty(vJ,"__esModule",{value:!0});vJ.PositionOffsetTransformer=vJ.PositionOffsetTransformerBase=void 0;vJ.ensureDependenciesAreSet=Qfa;var Gni=aA(),Hni=axe(),Ffa=tJe(),Ufa=Vae(),jni=tJe();Object.defineProperty(vJ,"PositionOffsetTransformerBase",{enumerable:!0,get:a(function(){return jni.PositionOffsetTransformerBase},"get")});Object.defineProperty(vJ,"PositionOffsetTransformer",{enumerable:!0,get:a(function(){return jni.PositionOffsetTransformer},"get")});(0,Ffa._setPositionOffsetTransformerDependencies)({StringEdit:Gni.StringEdit,StringReplacement:Gni.StringReplacement,TextReplacement:Hni.TextReplacement,TextEdit:Hni.TextEdit,TextLength:Ufa.TextLength});function Qfa(){}a(Qfa,"ensureDependenciesAreSet")});var Wat=T(Vat=>{"use strict";f();Object.defineProperty(Vat,"__esModule",{value:!0});Vat.RootedLineEdit=void 0;var Vni=mY(),qfa=$ni(),Gfa=t2();(0,qfa.ensureDependenciesAreSet)();var Ydr=class t{static{a(this,"RootedLineEdit")}static fromEdit(e){let r=Vni.LineEdit.fromStringEdit(e.edit,e.base);return new t(e.base,r)}constructor(e,r){this.base=e,this.edit=r}toString(){return this.edit.humanReadablePatch(this.base.getLines())}toEdit(){return this.edit.toEdit(this.base)}toRootedEdit(){return new Gfa.RootedEdit(this.base,this.toEdit())}getEditedState(){let e=this.base.getLines();return this.edit.apply(e)}removeCommonSuffixPrefixLines(){let e=a(n=>!n.lineRange.isEmpty||n.newLines.length>0,"isNotEmptyEdit"),r=this.edit.replacements.map(n=>n.removeCommonSuffixPrefixLines(this.base)).filter(n=>e(n));return new t(this.base,new Vni.LineEdit(r))}};Vat.RootedLineEdit=Ydr});var t2=T(IQ=>{"use strict";f();Object.defineProperty(IQ,"__esModule",{value:!0});IQ.Edits=IQ.SingleEdits=IQ.RootedEdit=void 0;var Wni=Jl(),Hfa=mY(),Mde=aA(),zni=Jdr(),jfa=Wat(),RRe=class t{static{a(this,"RootedEdit")}static toLineEdit(e){return Hfa.LineEdit.fromStringEdit(e.edit,e.base)}constructor(e,r){this.base=e,this.edit=r}getEditedState(){return this.edit.applyOnText(this.base)}rebase(e){return(0,Wni.assertFn)(()=>null.base.equals(e.applyOnText(this.base))),(0,Wni.assertFn)(()=>null.edit.applyOnText(null.base).equals(this.edit.applyOnText(e.applyOnText(this.base)))),null}toString(){return jfa.RootedLineEdit.fromEdit(this).toString()}normalize(){return new t(this.base,this.edit.normalizeOnSource(this.base.value))}equals(e){return this.base.equals(e.base)&&this.edit.equals(e.edit)}};IQ.RootedEdit=RRe;var Kdr=class{static{a(this,"SingleEdits")}constructor(e){this.edits=e}compose(){return Mde.StringEdit.compose(this.edits.map(e=>e.toEdit()))}apply(e){return this.compose().apply(e)}isEmpty(){return this.edits.length===0}toEdits(){return new zat(Mde.StringEdit,this.edits.map(e=>e.toEdit()))}};IQ.SingleEdits=Kdr;var zat=class t{static{a(this,"Edits")}static single(e){return new t(Mde.StringEdit,[e])}constructor(e,r){this._editType=e,this.edits=r}compose(){let e=new this._editType([]);for(let r of this.edits)e=e.compose(r);return e}add(e){return new t(this._editType,[...this.edits,e])}apply(e){return this.compose().apply(e)}isEmpty(){return this.edits.length===0}swap(e){let r=e,n=[];for(let o of this.edits){let s=Mde.BaseStringEdit.trySwap(r,o);if(!s)return;n.push(s.e1),r=s.e2}return{edits:new t(Mde.StringEdit,n),editLast:r}}serialize(){return this.edits.map(e=>(0,zni.serializeStringEdit)(e))}static deserialize(e){return new t(Mde.StringEdit,e.map(r=>(0,zni.deserializeStringEdit)(r)))}toHumanReadablePatch(e){let r=e,n=[];for(let o of this.edits){let s=RRe.toLineEdit(new RRe(r,o));n.push(s.humanReadablePatch(r.getLines())),r=o.applyOnText(r)}return n.join(` +`],maxTokens:_ii*p};return h===GR.BlockMode.MoreMultiline&&(g.blockMode=GR.BlockMode.MoreMultiline),g}return{blockMode:h,requestMultiline:!1,...l.invokeFunction(vii,h,e.textDocument,e.position,m.blockPosition,r,!1,n.prompt,c)}}}}a(H0a,"getGhostTextStrategy");function vii(t,e,r,n,o,s,c,l,u){let d=t.get(Tii.ICompletionsFeaturesService),p=t.get(bii.IInstantiationService);if(c&&e===GR.BlockMode.MoreMultiline&&Cwe.BlockTrimmer.isSupported(r.detectedLanguageId)){let h=o===Cwe.BlockPositionType.EmptyBlock||o===Cwe.BlockPositionType.BlockEnd?d.longLookaheadSize(u):d.shortLookaheadSize(u),m=t.get(U0a.ICompletionsCacheService);return{finishedCb:p.createInstance(G0a.StreamedCompletionSplitter,s,r.detectedLanguageId,!1,h,(A,y)=>{let E={prefix:s+A,prompt:{...l,prefix:l.prefix+A}};(0,F0a.appendToCache)(m,E,y)}).getFinishedCallback(),maxTokens:d.maxMultilineTokens(u)}}return{finishedCb:c?(0,zst.parsingBlockFinished)(r,n):h=>{}}}a(vii,"buildFinishedCallback");async function j0a(t,e,r,n,o,s,c){if(r.lineCount>=8e3)(0,Eii.telemetry)(t,"ghostText.longFileMultilineSkip",Eii.TelemetryData.createAndMarkAsIssued({languageId:r.detectedLanguageId,lineCount:String(r.lineCount),currentLine:String(n.line)}));else{if(e===GR.BlockMode.MoreMultiline&&Cwe.BlockTrimmer.isSupported(r.detectedLanguageId))return s?{requestMultiline:!0,blockPosition:await(0,Cwe.getBlockPositionType)(r,n)}:{requestMultiline:!1};if(["typescript","typescriptreact"].includes(r.detectedLanguageId)&&$0a(n,r))return{requestMultiline:!0};let u=!1;return!o&&(0,yii.isSupportedLanguageId)(r.detectedLanguageId)?u=await(0,zst.isEmptyBlockStartUtil)(r,n):o&&(0,yii.isSupportedLanguageId)(r.detectedLanguageId)&&(u=await(0,zst.isEmptyBlockStartUtil)(r,n)||await(0,zst.isEmptyBlockStartUtil)(r,r.lineAt(n).range.end)),u||["javascript","javascriptreact","python"].includes(r.detectedLanguageId)&&(u=(0,q0a.requestMultilineScore)(c.prompt,r.detectedLanguageId)>.5),{requestMultiline:u}}return{requestMultiline:!1}}a(j0a,"shouldRequestMultiline");function $0a(t,e){return e.lineAt(t).text.trim().length===0}a($0a,"isNewLine")});var kii=T(JS=>{"use strict";f();var V0a=JS&&JS.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},HR=JS&&JS.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(JS,"__esModule",{value:!0});JS.ForceMultiLine=JS.GhostTextComputer=void 0;JS.getGhostText=ppa;var xii=D0(),W0a=bp(),z0a=cdr(),Y0a=Ip(),wii=Po(),K0a=ldr(),J0a=Yle(),X0a=YIe(),Z0a=bir(),bwe=Gm(),lfr=Hm(),epa=uc(),tpa=Fue(),rpa=Ait(),npa=Bst(),ipa=Eot(),opa=PU(),spa=Oit(),ifr=wue(),sfr=Adr(),ofr=wni(),Vue=xp(),Yst=tue(),Iii=sxe(),apa=yor(),cpa=uue(),lpa=cxe(),afr=fii(),Rii=Qor(),upa=Sii(),XU=gU(),Mf=pue(),dpa={isCycling:!1,promptOnly:!1,isSpeculative:!1};function fpa(t,e,r){let n=t.get(lfr.ICompletionsFeaturesService),o=(0,bwe.getConfig)(t,bwe.ConfigKey.CompletionsDebounce)??n.completionsDebounce(r)??e.debounceMs;if(o===void 0)return 0;let s=(0,Vue.now)()-r.issuedTime;return Math.max(0,o-s)}a(fpa,"getRemainingDebounceMs");function vwe(t,e,r){return r?.isCancellationRequested||e!==t.currentRequestId}a(vwe,"isCompletionRequestCancelled");var Kst=class{static{a(this,"GhostTextComputer")}constructor(e,r,n,o,s,c,l,u,d,p,h){this.instantiationService=e,this.telemetryService=r,this.notifierService=n,this.contextProviderBridge=o,this.currentGhostText=s,this.contextproviderStatistics=c,this.asyncCompletionManager=l,this.completionsFeaturesService=u,this.logTarget=d,this.statusReporter=p,this.logService=h}async getGhostText(e,r,n,o,s,c){let l=(0,Y0a.generateUuid)(),u=c.createSubLogger(["GhostTextComputer#getGhostText"]);this.currentGhostText.currentRequestId=l;let d=await this.instantiationService.invokeFunction(ypa,e.textDocument,l,n);await J0a.initializeTokenizers.catch(()=>{});try{this.contextProviderBridge.schedule(e,l,n?.opportunityId??"",d,r,n),this.notifierService.notifyRequest(e,l,d,r,n);let p=await this.getGhostTextWithoutAbortHandling(e,l,d,r,n,o,s,u),h=this.contextproviderStatistics.getStatisticsForCompletion(l),m=n?.opportunityId??"unknown";for(let[g,A]of h.getAllUsageStatistics())this.telemetryService.sendMSFTTelemetryEvent("context-provider.completion-stats",{requestId:l,opportunityId:m,providerId:g,resolution:A.resolution,usage:A.usage,usageDetails:JSON.stringify(A.usageDetails)},{});return p}catch(p){if((0,tpa.isAbortError)(p))return{type:"canceled",reason:"aborted at unknown location",telemetryData:(0,Mf.mkCanceledResultTelemetry)(d,{cancelledNetworkRequest:!0})};throw p}}async getGhostTextWithoutAbortHandling(e,r,n,o,s,c,l,u){let d=u.createSubLogger(["GhostTextComputer#getGhostTextWithoutAbortHandling"]),p=n.issuedTime,h=[];function m(v){let b=(0,Vue.now)();h.push([v,b-p]),p=b}if(a(m,"recordPerformance"),m("telemetry"),vwe(this.currentGhostText,r,o))return{type:"abortedBeforeIssued",reason:"cancelled before extractPrompt",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};let g=mpa(e.textDocument,e.position);if(g===void 0)return d.debug("Completions do not trigger in the middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};let A=this.instantiationService.invokeFunction(rpa.getEngineRequestInfo,n),y={...dpa,...s,tokenizer:A.tokenizer},E=await this.instantiationService.invokeFunction(ifr.extractPrompt,r,e,n,void 0,y);if(m("prompt"),c.setPrompt(ifr.PromptResponse.toString(E)),E.type==="copilotContentExclusion")return d.debug("Copilot not available, due to content exclusion"),{type:"abortedBeforeIssued",reason:"Copilot not available due to content exclusion",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};if(E.type==="contextTooShort")return d.debug("Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};if(E.type==="promptError")return d.debug("Error while building the prompt"),{type:"abortedBeforeIssued",reason:"Error while building the prompt",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};if(y.promptOnly)return{type:"promptOnly",reason:"Breaking, promptOnly set to true",prompt:E};if(E.type==="promptCancelled")return d.debug("Cancelled during extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled during extractPrompt",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};if(E.type==="promptTimeout")return d.debug("Timeout during extractPrompt"),{type:"abortedBeforeIssued",reason:"Timeout",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};if(E.prompt.prefix.length===0&&E.prompt.suffix.length===0)return d.debug("Error empty prompt"),{type:"abortedBeforeIssued",reason:"Empty prompt",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)};let _=this.instantiationService.invokeFunction(fpa,y,n);return _>0&&(d.debug(`Debouncing ghost text request for ${_}ms`),await(0,Iii.delay)(_),vwe(this.currentGhostText,r,o))?{type:"abortedBeforeIssued",reason:"cancelled after debounce",telemetryData:(0,Mf.mkBasicResultTelemetry)(n)}:this.statusReporter.withProgress(async()=>{let[v]=(0,ifr.trimLastLine)(e.textDocument.getText(Yst.LocationFactory.range(Yst.LocationFactory.position(0,0),e.position)));d.trace(`Starting ghost text computation, prefix length: ${v.length}`);let b=this.currentGhostText.hasAcceptedCurrentCompletion(v,E.prompt.suffix);d.trace(`hasAcceptedCurrentCompletion: ${b}`);let I=E.prompt,x=await this.instantiationService.invokeFunction(upa.getGhostTextStrategy,e,v,E,g,b,n);m("strategy"),d.trace(`Ghost text strategy: blockMode=${x.blockMode}, requestMultiline=${x.requestMultiline}, stop=${x.stop}, maxTokens=${x.maxTokens}`);let w=this.instantiationService.invokeFunction(hpa,v,I,x.requestMultiline);d.trace(`Local cache lookup: ${w?`found ${w[0].length} choices`:"no cached choices"}`),m("cache");let R=this.instantiationService.invokeFunction(sfr.extractRepoInfoInBackground,e.textDocument.uri),P={blockMode:x.blockMode,languageId:e.textDocument.detectedLanguageId,repoInfo:R,engineModelId:A.modelId,ourRequestId:r,prefix:v,prompt:E.prompt,multiline:x.requestMultiline,indentation:(0,spa.contextIndentation)(e.textDocument,e.position),isCycling:y.isCycling,headers:A.headers,stop:x.stop,maxTokens:x.maxTokens,afterAccept:b};P.headers={...P.headers,"X-Copilot-Async":"true","X-Copilot-Speculative":y.isSpeculative?"true":"false"};let k=this.instantiationService.invokeFunction(_pa,e.textDocument,P,e.position,E,n,A,y);if(w===void 0&&!y.isCycling&&this.asyncCompletionManager.shouldWaitForAsyncCompletions(v,E.prompt)){d.trace("No cached choices, waiting for async completions from in-flight request");let L=await this.asyncCompletionManager.getFirstMatchingRequestWithTimeout(r,v,E.prompt,y.isSpeculative,k);if(m("asyncWait"),L){d.trace("Received choice from async completion");let H=!x.requestMultiline;w=[[(0,afr.makeGhostAPIChoice)(L[0],{forceSingleLine:H})],XU.ResultType.Async]}else d.trace("No matching async completion found within timeout");if(vwe(this.currentGhostText,r,o))return d.debug("Cancelled before requesting a new completion"),{type:"abortedBeforeIssued",reason:"Cancelled after waiting for async completion",telemetryData:(0,Mf.mkBasicResultTelemetry)(k)}}else d.trace("Skipping wait for async completions");let Q=x.blockMode===bwe.BlockMode.MoreMultiline&&cpa.BlockTrimmer.isSupported(e.textDocument.detectedLanguageId);if(w!==void 0&&(d.trace(`Post-processing ${w[0].length} cached choices, isMoreMultiline=${Q}`),w[0]=w[0].map(L=>this.instantiationService.invokeFunction(ofr.postProcessChoiceInContext,e.textDocument,e.position,L,Q,d)).filter(L=>L!==void 0)),w&&(w[1]===XU.ResultType.Cache||w[1]===XU.ResultType.TypingAsSuggested)&&(l.setIsFromCache(),c.markAsFromCache()),w!==void 0&&w[0].length===0)return d.trace(`Found empty inline suggestions locally via ${(0,Mf.resultTypeToString)(w[1])}`),{type:"empty",reason:"cached results empty after post-processing",telemetryData:(0,Mf.mkBasicResultTelemetry)(k)};if(w!==void 0&&w[0].length>0&&(!y.isCycling||w[0].length>1))d.trace(`Found inline suggestions locally via ${(0,Mf.resultTypeToString)(w[1])}`);else{d.trace(`Going to network, isCycling=${y.isCycling}`);let L=this.instantiationService.createInstance(afr.CompletionsFromNetwork);if(y.isCycling){d.trace("Fetching all completions for cycling request");let H=await L.getAllCompletionsFromNetwork(P,k,o,x.finishedCb,l);if(H.type==="success"){d.trace(`Cycling network request returned ${H.value[0].length} choices`);let $=w?.[0]??[];H.value[0].forEach(W=>{$.findIndex(j=>j.completionText.trim()===W.completionText.trim())===-1&&$.push(W)}),d.trace(`After deduplication: ${$.length} unique choices`),w=[$,XU.ResultType.Cycling]}else if(w===void 0)return H}else{d.trace("Initiating network request for completions");let H=a((ce,J)=>(this.asyncCompletionManager.updateCompletion(r,ce),x.finishedCb(ce,J)),"finishedCb"),$=new X0a.CancellationTokenSource,W=L.getCompletionsFromNetwork(P,k,$.token,H,l);this.asyncCompletionManager.queueCompletionRequest(r,v,E.prompt,$,W);let j=await this.asyncCompletionManager.getFirstMatchingRequest(r,v,E.prompt,y.isSpeculative);if(j===void 0)return d.trace("Network request returned no results"),{type:"empty",reason:"received no results from async completions",telemetryData:(0,Mf.mkBasicResultTelemetry)(k)};d.trace("Received completion from network request"),w=[[j[0]],XU.ResultType.Async]}m("network")}if(w===void 0)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:(0,Mf.mkBasicResultTelemetry)(k)};let[M,N]=w;d.trace(`Final choices: ${M.length} from ${(0,Mf.resultTypeToString)(N)}`);let G=M.map(L=>this.instantiationService.invokeFunction(ofr.postProcessChoiceInContext,e.textDocument,e.position,L,Q,d)).filter(L=>L!==void 0);d.trace(`Post-processed to ${G.length} choices`);let O=this.instantiationService.invokeFunction(bwe.getConfig,bwe.ConfigKey.CompletionsDelay)??this.completionsFeaturesService.completionsDelay(n),D=(0,Vue.now)()-n.issuedTime,F=Math.max(O-D,0);if(N!==XU.ResultType.TypingAsSuggested&&!y.isCycling&&F>0&&(d.debug(`Waiting ${F}ms before returning completion`),await(0,Iii.delay)(F),vwe(this.currentGhostText,r,o)))return d.debug("Cancelled after completions delay"),{type:"canceled",reason:"after completions delay",telemetryData:(0,Mf.mkCanceledResultTelemetry)(k)};let U=[];for(let L of G){let H=Epa(e.textDocument,P,L,k),$=g?(0,ofr.checkSuffix)(e.textDocument,e.position,L):0,j={completion:gpa(L.choiceIndex,L.completionText,E.trailingWs),telemetry:H,isMiddleOfTheLine:g,suffixCoverage:$,copilotAnnotations:L.copilotAnnotations,clientCompletionId:L.clientCompletionId};U.push(j)}return k.properties.clientCompletionId=U[0]?.clientCompletionId,k.measurements.foundOffset=U?.[0]?.telemetry?.measurements?.foundOffset??-1,d.debug(`Produced ${U.length} results from ${(0,Mf.resultTypeToString)(N)} at ${k.measurements.foundOffset} offset`),vwe(this.currentGhostText,r,o)?{type:"canceled",reason:"after post processing completions",telemetryData:(0,Mf.mkCanceledResultTelemetry)(k)}:(y.isSpeculative||(d.trace("Updating current ghost text as request is not speculative"),this.currentGhostText.setGhostText(v,E.prompt.suffix,G,N)),m("complete"),d.trace(`Ghost text computation complete, returning ${U.length} results`),{type:"success",value:[U,N],telemetryData:(0,Mf.mkBasicResultTelemetry)(k),telemetryBlob:k,resultType:N,performanceMetrics:h})})}};JS.GhostTextComputer=Kst;JS.GhostTextComputer=Kst=V0a([HR(0,wii.IInstantiationService),HR(1,W0a.ITelemetryService),HR(2,Z0a.ICompletionsNotifierService),HR(3,ipa.ICompletionsContextProviderBridgeService),HR(4,Rii.ICompletionsCurrentGhostText),HR(5,opa.ICompletionsContextProviderService),HR(6,apa.ICompletionsAsyncManagerService),HR(7,lfr.ICompletionsFeaturesService),HR(8,epa.ICompletionsLogTargetService),HR(9,npa.ICompletionsStatusReporter),HR(10,xii.ILogService)],Kst);async function ppa(t,e,r,n,o,s,c){return t.get(wii.IInstantiationService).createInstance(Kst).getGhostText(e,r,n,o,s,c)}a(ppa,"getGhostText");function hpa(t,e,r,n){let s=t.get(Rii.ICompletionsCurrentGhostText).getCompletionsForUserTyping(e,r.suffix),c=Apa(t,e,r.suffix,n);if(s&&s.length>0){let l=(c??[]).filter(u=>!s.some(d=>d.completionText===u.completionText));return[s.concat(l),XU.ResultType.TypingAsSuggested]}if(c&&c.length>0)return[c,XU.ResultType.Cache]}a(hpa,"getLocalInlineSuggestion");function mpa(t,e){let n=t.lineAt(e).text.substring(e.character);return(0,K0a.isInlineSuggestionFromTextAfterCursor)(n)}a(mpa,"isInlineSuggestion");var cfr=class t{static{a(this,"ForceMultiLine")}static{this.default=new t}constructor(e=!1){this.requestMultilineOverride=e}};JS.ForceMultiLine=cfr;function gpa(t,e,r){if(r.length>0){if(e.startsWith(r))return{completionIndex:t,completionText:e,displayText:e.substring(r.length),displayNeedsWsOffset:!1};{let n=e.substring(0,e.length-e.trimStart().length);return r.startsWith(n)?{completionIndex:t,completionText:e,displayText:e.trimStart(),displayNeedsWsOffset:!0}:{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}}else return{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}a(gpa,"adjustLeadingWhitespace");function Apa(t,e,r,n){let o=t.get(xii.ILogService).createSubLogger(["getCompletionsFromCache"]),s=t.get(lpa.ICompletionsCacheService).findAll(e,r);return s.length===0?(o.debug("Found no completions in cache"),[]):(o.debug(`Found ${s.length} completions in cache`),s.map(c=>(0,afr.makeGhostAPIChoice)(c,{forceSingleLine:!n})))}a(Apa,"getCompletionsFromCache");async function ypa(t,e,r,n){let o=t.get(lfr.ICompletionsFeaturesService),s={headerRequestId:r};n?.opportunityId&&(s.opportunityId=n.opportunityId),n?.selectedCompletionInfo?.text&&(s.completionsActive="true"),n?.isSpeculative&&(s.reason="speculative");let c=Vue.TelemetryData.createAndMarkAsIssued(s);return await o.updateExPValuesAndAssignments({uri:e.uri,languageId:e.detectedLanguageId},c)}a(ypa,"createTelemetryWithExp");function Epa(t,e,r,n){let o=r.requestId,s={choiceIndex:r.choiceIndex.toString(),clientCompletionId:r.clientCompletionId};r.generatedChoiceIndex!==void 0&&(s.originalChoiceIndex=s.choiceIndex,s.choiceIndex=(1e4*(r.generatedChoiceIndex+1)+r.choiceIndex).toString());let c={compCharLen:r.completionText.length,numLines:r.completionText.trim().split(` +`).length};r.meanLogProb&&(c.meanLogProb=r.meanLogProb),r.meanAlternativeLogProb&&(c.meanAlternativeLogProb=r.meanAlternativeLogProb);let l=r.telemetryData.extendedBy(s,c);return l.issuedTime=n.issuedTime,l.measurements.timeToProduceMs=performance.now()-n.issuedTime,Pii(l,t),l.extendWithRequestId(o),l}a(Epa,"telemetryWithAddData");function _pa(t,e,r,n,o,s,c,l){let u={languageId:e.detectedLanguageId};u.afterAccept=r.afterAccept.toString(),u.isSpeculative=l.isSpeculative.toString();let d=s.extendedBy(u);Pii(d,e);let p=r.repoInfo;d.properties.gitRepoInformation=p===void 0?"unavailable":p===sfr.ComputationStatus.PENDING?"pending":"available",p!==void 0&&p!==sfr.ComputationStatus.PENDING&&(d.properties.gitRepoUrl=p.url,d.properties.gitRepoHost=p.hostname,p.repoId?.type==="github"?(d.properties.gitRepoOwner=p.repoId.org,d.properties.gitRepoName=p.repoId.repo):p.repoId?.type==="ado"&&(d.properties.gitRepoOwner=p.repoId.project,d.properties.gitRepoName=p.repoId.repo),d.properties.gitRepoPath=p.pathname),d.properties.engineName=c.modelId,d.properties.engineChoiceSource=c.engineChoiceSource,d.properties.isMultiline=JSON.stringify(r.multiline),d.properties.isCycling=JSON.stringify(r.isCycling);let h=e.lineAt(n.line),m=e.getText(Yst.LocationFactory.range(h.range.start,n)),g=e.getText(Yst.LocationFactory.range(n,h.range.end)),A=Array.from(o.neighborSource.entries()).map(v=>[v[0],v[1].map(b=>(0,z0a.createSha256Hash)(b).toString())]),y={beforeCursorWhitespace:JSON.stringify(m.trim()===""),afterCursorWhitespace:JSON.stringify(g.trim()===""),neighborSource:JSON.stringify(A),blockMode:r.blockMode},E={...(0,Vue.telemetrizePromptLength)(o.prompt),promptEndPos:e.offsetAt(n),promptComputeTimeMs:o.computeTimeMs};o.metadata&&(y.promptMetadata=JSON.stringify(o.metadata)),o.contextProvidersTelemetry&&(y.contextProviders=JSON.stringify(o.contextProvidersTelemetry));let _=d.extendedBy(y,E);return(0,Vue.telemetry)(t,"ghostText.issued",_),d}a(_pa,"telemetryIssued");function Pii(t,e){t.measurements.documentLength=e.getText().length,t.measurements.documentLineCount=e.lineCount}a(Pii,"addDocumentTelemetry")});var Oii=T(jB=>{"use strict";f();var Cpa=jB&&jB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},ufr=jB&&jB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(jB,"__esModule",{value:!0});jB.GhostText=void 0;var Dii=Dn(),vpa=Po(),bpa=Hor(),Tpa=yni(),Nii=kii(),Spa=ndr(),Ipa=gU(),xpa=Rit(),Mii=pue(),wpa=uc(),dfr=class{static{a(this,"GhostText")}constructor(e,r,n){this.instantiationService=e,this.logTargetService=r,this.speculativeRequestCache=n}async getInlineCompletions(e,r,n,o={},s,c,l){Rpa(this.logTargetService,e,r);let u=await this.getInlineCompletionsResult((0,bpa.createCompletionState)(e,r),n,o,s,c,l);return this.instantiationService.invokeFunction(Mii.handleGhostTextResultTelemetry,u)}async getInlineCompletionsResult(e,r,n={},o,s,c){let l=0;n.selectedCompletionInfo?.text&&!n.selectedCompletionInfo.text.includes(")")&&(e=e.addSelectedCompletionInfo(n.selectedCompletionInfo),l=e.position.character-n.selectedCompletionInfo.range.end.character);let u=await this.instantiationService.invokeFunction(Nii.getGhostText,e,r,n,o,s,c);if(u.type!=="success")return u;let[d,p]=u.value;if(r.isCancellationRequested)return{type:"canceled",reason:"after getGhostText",telemetryData:{telemetryBlob:u.telemetryBlob}};let h=this.instantiationService.invokeFunction(Spa.setLastShown,e.textDocument,e.position,p),m=(0,Tpa.completionsFromGhostTextResults)(d,p,e.textDocument,e.position,n.formattingOptions,h);if(m.length===0)return{type:"empty",reason:"no completions in final result",telemetryData:u.telemetryData};if(p!==Ipa.ResultType.TypingAsSuggested){e=e.applyEdits([{newText:m[0].insertText,range:m[0].range}]);let A={isSpeculative:!0,opportunityId:n.opportunityId},y=a(()=>this.instantiationService.invokeFunction(Nii.getGhostText,e,void 0,A,o,s,c),"fn");this.speculativeRequestCache.set(m[0].clientCompletionId,y)}let g=m.map(A=>{let{start:y,end:E}=A.range,_=Dii.Range.create(y,Dii.Position.create(E.line,E.character-l));return{...A,range:_}});return{...u,value:g}}};jB.GhostText=dfr;jB.GhostText=dfr=Cpa([ufr(0,vpa.IInstantiationService),ufr(1,wpa.ICompletionsLogTargetService),ufr(2,xpa.ICompletionsSpeculativeRequestCache)],dfr);function Rpa(t,e,r){let n=e.getText({start:{line:Math.max(r.line-1,0),character:0},end:r}),o=e.getText({start:r,end:{line:Math.min(r.line+2,e.lineCount-1),character:e.lineCount-1>r.line?0:r.character}});Mii.logger.debug(t,`Requesting for ${e.uri} at ${r.line}:${r.character}`,`between ${JSON.stringify(n)} and ${JSON.stringify(o)}.`)}a(Rpa,"logCompletionLocation")});var Bii=T(Zst=>{"use strict";f();Object.defineProperty(Zst,"__esModule",{value:!0});Zst.LocalFileSystem=void 0;var Jst=require("fs"),Ppa=require("path"),Xst=fU(),ffr=hU(),pfr=class{static{a(this,"LocalFileSystem")}async readFileString(e){return(await Jst.promises.readFile((0,ffr.fsPath)(e))).toString()}async stat(e){let{targetStat:r,lstat:n,stat:o}=await this.statWithLink((0,ffr.fsPath)(e));return{ctime:r.ctimeMs,mtime:r.mtimeMs,size:r.size,type:this.getFileType(r,n,o)}}async readDirectory(e){let r=(0,ffr.fsPath)(e),n=await Jst.promises.readdir(r,{withFileTypes:!0}),o=[];for(let s of n){let{targetStat:c,lstat:l,stat:u}=await this.statWithLink((0,Ppa.join)(r,s.name));o.push([s.name,this.getFileType(c,l,u)])}return o}async statWithLink(e){let r=await Jst.promises.lstat(e);if(r.isSymbolicLink())try{let n=await Jst.promises.stat(e);return{lstat:r,stat:n,targetStat:n}}catch{}return{lstat:r,targetStat:r}}getFileType(e,r,n){let o=Xst.FileType.Unknown;return e.isFile()&&(o=Xst.FileType.File),e.isDirectory()&&(o=Xst.FileType.Directory),r.isSymbolicLink()&&n&&(o|=Xst.FileType.SymbolicLink),o}};Zst.LocalFileSystem=pfr});var Qii=T($B=>{"use strict";f();var kpa=$B&&$B.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Twe=$B&&$B.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty($B,"__esModule",{value:!0});$B.CompositeRelatedFilesProvider=void 0;var Dpa=LY(),Npa=Po(),Wue=Gm(),Mpa=Hm(),Opa=fU(),Bpa=uc(),Swe=Iue(),wK=Rot(),Lii=["cpp","c","cuda-cpp"],Fii=["typescript","javascript","typescriptreact","javascriptreact"],Uii=["csharp"],Lpa=new Map([...Lii.map(t=>[t,Swe.NeighboringFileType.RelatedCpp]),...Fii.map(t=>[t,Swe.NeighboringFileType.RelatedTypeScript]),...Uii.map(t=>[t,Swe.NeighboringFileType.RelatedCSharpRoslyn])]);function Fpa(t){return Lpa.get(t)??Swe.NeighboringFileType.RelatedOther}a(Fpa,"getNeighboringFileType");var hfr=class extends wK.RelatedFilesProvider{static{a(this,"CompositeRelatedFilesProvider")}constructor(e,r,n,o,s){super(e,r,o,s),this.featuresService=n,this.providers=new Map,this.telemetrySent=!1,this.reportedUnknownProviders=new Set}async getRelatedFilesResponse(e,r,n){let o=Date.now(),s=e.clientLanguageId.toLowerCase();if(Fpa(s)===Swe.NeighboringFileType.RelatedOther&&!this.reportedUnknownProviders.has(s)&&(this.reportedUnknownProviders.add(s),wK.relatedFilesLogger.warn(this.logTarget,`unknown language ${s}`)),this.relatedFilesTelemetry(r),wK.relatedFilesLogger.debug(this.logTarget,`Fetching related files for ${e.uri}`),!this.isActive(s,r))return wK.relatedFilesLogger.debug(this.logTarget,"language-server related-files experiment is not active."),wK.EmptyRelatedFilesResponse;let l=this.providers.get(s);if(!l)return wK.EmptyRelatedFilesResponse;try{return this.convert(e.uri,l,o,r,n)}catch{this.relatedFileNonresponseTelemetry(s,r);return}}async convert(e,r,n,o,s){s||(s={isCancellationRequested:!1,onCancellationRequested:a(()=>({dispose(){}}),"onCancellationRequested")});let c={entries:[],traits:[]},l=r.size>0;for(let u of r.values()){let d=await u.callback(e,{flags:{}},s);if(d){l=!1,c.entries.push(...d.entries),d.traits&&c.traits.push(...d.traits);for(let p of d.entries)for(let h of p.uris)wK.relatedFilesLogger.debug(this.logTarget,h.toString())}}return this.performanceTelemetry(Date.now()-n,o),l?void 0:c}registerRelatedFilesProvider(e,r,n){let o=this.providers.get(r);o?o.set(e,{extensionId:e,languageId:r,callback:n}):this.providers.set(r,new Map([[e,{extensionId:e,languageId:r,callback:n}]]))}unregisterRelatedFilesProvider(e,r,n){let o=this.providers.get(r);if(o){let s=o.get(e);s&&s.callback===n&&o.delete(e)}}isActive(e,r){return Uii.includes(e)?this.featuresService.relatedFilesVSCodeCSharp(r)||this.instantiationService.invokeFunction(Wue.getConfig,Wue.ConfigKey.RelatedFilesVSCodeCSharp):Fii.includes(e)?this.featuresService.relatedFilesVSCodeTypeScript(r)||this.instantiationService.invokeFunction(Wue.getConfig,Wue.ConfigKey.RelatedFilesVSCodeTypeScript):Lii.includes(e)?this.featuresService.cppHeadersEnableSwitch(r):this.featuresService.relatedFilesVSCode(r)||this.instantiationService.invokeFunction(Wue.getConfig,Wue.ConfigKey.RelatedFilesVSCode)}relatedFilesTelemetry(e){}relatedFileNonresponseTelemetry(e,r){}performanceTelemetry(e,r){}};$B.CompositeRelatedFilesProvider=hfr;$B.CompositeRelatedFilesProvider=hfr=kpa([Twe(0,Npa.IInstantiationService),Twe(1,Dpa.IIgnoreService),Twe(2,Mpa.ICompletionsFeaturesService),Twe(3,Bpa.ICompletionsLogTargetService),Twe(4,Opa.ICompletionsFileSystemService)],hfr)});var jii=T(RK=>{"use strict";f();Object.defineProperty(RK,"__esModule",{value:!0});RK.PositionOffsetTransformer=RK.PositionOffsetTransformerBase=void 0;RK.ensureDependenciesAreSet=qpa;var qii=Zg(),Gii=iIe(),Upa=lKe(),Qpa=sae(),Hii=lKe();Object.defineProperty(RK,"PositionOffsetTransformerBase",{enumerable:!0,get:a(function(){return Hii.PositionOffsetTransformerBase},"get")});Object.defineProperty(RK,"PositionOffsetTransformer",{enumerable:!0,get:a(function(){return Hii.PositionOffsetTransformer},"get")});(0,Upa._setPositionOffsetTransformerDependencies)({StringEdit:qii.StringEdit,StringReplacement:qii.StringReplacement,TextReplacement:Gii.TextReplacement,TextEdit:Gii.TextEdit,TextLength:Qpa.TextLength});function qpa(){}a(qpa,"ensureDependenciesAreSet")});var tat=T(eat=>{"use strict";f();Object.defineProperty(eat,"__esModule",{value:!0});eat.RootedLineEdit=void 0;var $ii=vz(),Gpa=jii(),Hpa=jR();(0,Gpa.ensureDependenciesAreSet)();var mfr=class t{static{a(this,"RootedLineEdit")}static fromEdit(e){let r=$ii.LineEdit.fromStringEdit(e.edit,e.base);return new t(e.base,r)}constructor(e,r){this.base=e,this.edit=r}toString(){return this.edit.humanReadablePatch(this.base.getLines())}toEdit(){return this.edit.toEdit(this.base)}toRootedEdit(){return new Hpa.RootedEdit(this.base,this.toEdit())}getEditedState(){let e=this.base.getLines();return this.edit.apply(e)}removeCommonSuffixPrefixLines(){let e=a(n=>!n.lineRange.isEmpty||n.newLines.length>0,"isNotEmptyEdit"),r=this.edit.replacements.map(n=>n.removeCommonSuffixPrefixLines(this.base)).filter(n=>e(n));return new t(this.base,new $ii.LineEdit(r))}};eat.RootedLineEdit=mfr});var jR=T(ZU=>{"use strict";f();Object.defineProperty(ZU,"__esModule",{value:!0});ZU.Edits=ZU.SingleEdits=ZU.RootedEdit=void 0;var Vii=Hl(),jpa=vz(),zue=Zg(),Wii=Afr(),$pa=tat(),Iwe=class t{static{a(this,"RootedEdit")}static toLineEdit(e){return jpa.LineEdit.fromStringEdit(e.edit,e.base)}constructor(e,r){this.base=e,this.edit=r}getEditedState(){return this.edit.applyOnText(this.base)}rebase(e){return(0,Vii.assertFn)(()=>null.base.equals(e.applyOnText(this.base))),(0,Vii.assertFn)(()=>null.edit.applyOnText(null.base).equals(this.edit.applyOnText(e.applyOnText(this.base)))),null}toString(){return $pa.RootedLineEdit.fromEdit(this).toString()}normalize(){return new t(this.base,this.edit.normalizeOnSource(this.base.value))}equals(e){return this.base.equals(e.base)&&this.edit.equals(e.edit)}};ZU.RootedEdit=Iwe;var gfr=class{static{a(this,"SingleEdits")}constructor(e){this.edits=e}compose(){return zue.StringEdit.compose(this.edits.map(e=>e.toEdit()))}apply(e){return this.compose().apply(e)}isEmpty(){return this.edits.length===0}toEdits(){return new rat(zue.StringEdit,this.edits.map(e=>e.toEdit()))}};ZU.SingleEdits=gfr;var rat=class t{static{a(this,"Edits")}static single(e){return new t(zue.StringEdit,[e])}constructor(e,r){this._editType=e,this.edits=r}compose(){let e=new this._editType([]);for(let r of this.edits)e=e.compose(r);return e}add(e){return new t(this._editType,[...this.edits,e])}apply(e){return this.compose().apply(e)}isEmpty(){return this.edits.length===0}swap(e){let r=e,n=[];for(let o of this.edits){let s=zue.BaseStringEdit.trySwap(r,o);if(!s)return;n.push(s.e1),r=s.e2}return{edits:new t(zue.StringEdit,n),editLast:r}}serialize(){return this.edits.map(e=>(0,Wii.serializeStringEdit)(e))}static deserialize(e){return new t(zue.StringEdit,e.map(r=>(0,Wii.deserializeStringEdit)(r)))}toHumanReadablePatch(e){let r=e,n=[];for(let o of this.edits){let s=Iwe.toLineEdit(new Iwe(r,o));n.push(s.humanReadablePatch(r.getLines())),r=o.applyOnText(r)}return n.join(` --- -`)}};IQ.Edits=zat});var Jdr=T(Ode=>{"use strict";f();Object.defineProperty(Ode,"__esModule",{value:!0});Ode.serializeStringEdit=Wfa;Ode.serializeSingleEdit=Jni;Ode.deserializeStringEdit=zfa;Ode.decomposeStringEdit=Kfa;var $fa=es(),Kni=aA(),Vfa=Fu(),Yni=t2();function Wfa(t){return t.replacements.map(e=>Jni(e))}a(Wfa,"serializeStringEdit");function Jni(t){return[t.replaceRange.start,t.replaceRange.endExclusive,t.newText]}a(Jni,"serializeSingleEdit");function zfa(t){return new Kni.StringEdit(t.map(e=>Yfa(e)))}a(zfa,"deserializeStringEdit");function Yfa(t){return new Kni.StringReplacement(new Vfa.OffsetRange(t[0],t[1]),t[2])}a(Yfa,"deserializeSingleEdit");function Kfa(t,e){if(e===void 0){let o=[],s=0;for(let c of t.replacements)o.push(c.delta(s)),s+=c.newText.length-c.replaceRange.length;return new Yni.SingleEdits(o)}if(t.replacements.length!==e.arrayLength)throw(0,$fa.illegalArgument)(`Number of edits ${t.replacements.length} does not match ${e.arrayLength}`);let r=[],n=t.replacements.slice();for(let o=0;o{"use strict";f();Object.defineProperty(Yat,"__esModule",{value:!0});Yat.DebugRecorderBookmark=void 0;var Xdr=class{static{a(this,"DebugRecorderBookmark")}constructor(e){this.timeMs=e}};Yat.DebugRecorderBookmark=Xdr});var tii=T(Kat=>{"use strict";f();Object.defineProperty(Kat,"__esModule",{value:!0});Kat.DebugRecorder=void 0;var Jfa=Jdr(),Xfa=Xni(),Zfa=KN(),e0a=oSe(),Zni=jc(),eii=so(),t0a=T$(),r0a=M4(),n0a=Im(),i0a=Np(),o0a=Qv(),Zdr=class extends eii.Disposable{static{a(this,"DebugRecorder")}constructor(e,r=e0a.now){super(),this._workspace=e,this.getNow=r,this._id=0,this._documentHistories=new Map,(0,r0a.mapObservableArrayCached)(this,this._workspace.openDocuments,(n,o)=>{let s=this._workspace.getWorkspaceRoot(n.id);if(!s)return;if(!this._workspaceRoot)this._workspaceRoot=s;else if(this._workspaceRoot.toString()!==s.toString())return;let c=new efr(s,n.id,n.value.get().value,this._id++,n.languageId.get(),()=>this.getTimestamp());this._documentHistories.set(c.docId,c),o.add((0,Zfa.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},l=>{l.languageId.changes.length>0&&(c.languageId=l.languageId.value);for(let u of l.value.changes)c.handleEdit(u);l.selection.changes.length>0&&c.handleSelections(l.selection.value)})),o.add((0,eii.toDisposable)(()=>{this._documentHistories.delete(n.id)}))},n=>n.id).recomputeInitiallyAndOnChange(this._store)}getTimestamp(){let e=this.getNow();return this._lastTimestamp!==void 0&&e<=this._lastTimestamp&&(e=this._lastTimestamp+1),this._lastTimestamp=e,e}getRecentLog(e=void 0){if(!this._workspaceRoot)return;let r=[];r.push({entry:{documentType:"workspaceRecording@1.0",kind:"header",repoRootUri:this._workspaceRoot.toString(),time:this.getNow(),uuid:(0,i0a.generateUuid)()},sortTime:0});for(let n of this._documentHistories.values())r.push(...n.getDocumentLog(e));return r.sort((0,Zni.compareBy)(n=>n.sortTime,Zni.numberComparator)),r.map(n=>n.entry)}createBookmark(){return new Xfa.DebugRecorderBookmark(this.getNow())}};Kat.DebugRecorder=Zdr;var efr=class{static{a(this,"DocumentHistory")}constructor(e,r,n,o,s,c){this.workspaceUri=e,this.docId=r,this.id=o,this.languageId=s,this.getNow=c,this._edits=[],this.relativePath=(()=>{let l=(0,n0a.relative)(this.workspaceUri.path,this.docId.path);return this.docId.toUri().scheme===t0a.Schemas.vscodeNotebookCell?`${l}#${this.docId.fragment}`:l})(),this._baseValue=new o0a.StringText(n),this.creationTime=this.getNow(),this._baseValueTime=this.creationTime}handleSelections(e){this._edits.push({kind:"selections",selections:e,instant:this.getNow()})}handleEdit(e){e.isEmpty()||(this._edits.push({kind:"edit",edit:e,instant:this.getNow()}),this.cleanUpHistory())}cleanUpHistory(){let r=this.getNow()-3e5;for(;this._edits.length>0&&this._edits[0].instante.timeMs)break;if(n++,o.kind==="selections"){let s=o.selections.map(c=>[c.start,c.endExclusive]);r.push({entry:{kind:"selectionChanged",id:this.id,selection:s,time:o.instant},sortTime:o.instant})}else r.push({entry:{kind:"changed",id:this.id,v:n,edit:(0,Jfa.serializeStringEdit)(o.edit),time:o.instant},sortTime:o.instant})}return r}}});var rii=T(Jat=>{"use strict";f();Object.defineProperty(Jat,"__esModule",{value:!0});Jat.CapturingToken=void 0;var tfr=class{static{a(this,"CapturingToken")}constructor(e,r,n,o,s,c,l){this.label=e,this.icon=r,this.subAgentInvocationId=n,this.subAgentName=o,this.chatSessionId=s,this.parentChatSessionId=c,this.debugLogLabel=l}};Jat.CapturingToken=tfr});var nii=T(rfr=>{"use strict";f();Object.defineProperty(rfr,"__esModule",{value:!0});rfr.secondsToHumanReadableTime=s0a;function s0a(t){if(t<90)return`${t} seconds`;let e=Math.floor(t/60);if(t<=5400)return`${e} minutes`;let r=Math.floor(e/60),n=e%60,o=`${r} hours`;return n>0&&(o+=` ${n} minutes`),o}a(s0a,"secondsToHumanReadableTime")});var XD=T(Ad=>{"use strict";f();var a0a=Ad&&Ad.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),c0a=Ad&&Ad.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),l0a=Ad&&Ad.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(Yue,"__esModule",{value:!0});Yue.serializeStringEdit=zpa;Yue.serializeSingleEdit=Kii;Yue.deserializeStringEdit=Ypa;Yue.decomposeStringEdit=Jpa;var Vpa=Ko(),Yii=Zg(),Wpa=wu(),zii=jR();function zpa(t){return t.replacements.map(e=>Kii(e))}a(zpa,"serializeStringEdit");function Kii(t){return[t.replaceRange.start,t.replaceRange.endExclusive,t.newText]}a(Kii,"serializeSingleEdit");function Ypa(t){return new Yii.StringEdit(t.map(e=>Kpa(e)))}a(Ypa,"deserializeStringEdit");function Kpa(t){return new Yii.StringReplacement(new Wpa.OffsetRange(t[0],t[1]),t[2])}a(Kpa,"deserializeSingleEdit");function Jpa(t,e){if(e===void 0){let o=[],s=0;for(let c of t.replacements)o.push(c.delta(s)),s+=c.newText.length-c.replaceRange.length;return new zii.SingleEdits(o)}if(t.replacements.length!==e.arrayLength)throw(0,Vpa.illegalArgument)(`Number of edits ${t.replacements.length} does not match ${e.arrayLength}`);let r=[],n=t.replacements.slice();for(let o=0;o{"use strict";f();Object.defineProperty(nat,"__esModule",{value:!0});nat.DebugRecorderBookmark=void 0;var yfr=class{static{a(this,"DebugRecorderBookmark")}constructor(e){this.timeMs=e}};nat.DebugRecorderBookmark=yfr});var eoi=T(iat=>{"use strict";f();Object.defineProperty(iat,"__esModule",{value:!0});iat.DebugRecorder=void 0;var Xpa=Afr(),Zpa=Jii(),eha=F5(),tha=rTe(),Xii=Lc(),Zii=ro(),rha=kj(),nha=gO(),iha=gm(),oha=Ip(),sha=xv(),Efr=class extends Zii.Disposable{static{a(this,"DebugRecorder")}constructor(e,r=tha.now){super(),this._workspace=e,this.getNow=r,this._id=0,this._documentHistories=new Map,(0,nha.mapObservableArrayCached)(this,this._workspace.openDocuments,(n,o)=>{let s=this._workspace.getWorkspaceRoot(n.id);if(!s)return;if(!this._workspaceRoot)this._workspaceRoot=s;else if(this._workspaceRoot.toString()!==s.toString())return;let c=new _fr(s,n.id,n.value.get().value,this._id++,n.languageId.get(),()=>this.getTimestamp());this._documentHistories.set(c.docId,c),o.add((0,eha.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},l=>{l.languageId.changes.length>0&&(c.languageId=l.languageId.value);for(let u of l.value.changes)c.handleEdit(u);l.selection.changes.length>0&&c.handleSelections(l.selection.value)})),o.add((0,Zii.toDisposable)(()=>{this._documentHistories.delete(n.id)}))},n=>n.id).recomputeInitiallyAndOnChange(this._store)}getTimestamp(){let e=this.getNow();return this._lastTimestamp!==void 0&&e<=this._lastTimestamp&&(e=this._lastTimestamp+1),this._lastTimestamp=e,e}getRecentLog(e=void 0){if(!this._workspaceRoot)return;let r=[];r.push({entry:{documentType:"workspaceRecording@1.0",kind:"header",repoRootUri:this._workspaceRoot.toString(),time:this.getNow(),uuid:(0,oha.generateUuid)()},sortTime:0});for(let n of this._documentHistories.values())r.push(...n.getDocumentLog(e));return r.sort((0,Xii.compareBy)(n=>n.sortTime,Xii.numberComparator)),r.map(n=>n.entry)}createBookmark(){return new Zpa.DebugRecorderBookmark(this.getNow())}};iat.DebugRecorder=Efr;var _fr=class{static{a(this,"DocumentHistory")}constructor(e,r,n,o,s,c){this.workspaceUri=e,this.docId=r,this.id=o,this.languageId=s,this.getNow=c,this._edits=[],this.relativePath=(()=>{let l=(0,iha.relative)(this.workspaceUri.path,this.docId.path);return this.docId.toUri().scheme===rha.Schemas.vscodeNotebookCell?`${l}#${this.docId.fragment}`:l})(),this._baseValue=new sha.StringText(n),this.creationTime=this.getNow(),this._baseValueTime=this.creationTime}handleSelections(e){this._edits.push({kind:"selections",selections:e,instant:this.getNow()})}handleEdit(e){e.isEmpty()||(this._edits.push({kind:"edit",edit:e,instant:this.getNow()}),this.cleanUpHistory())}cleanUpHistory(){let r=this.getNow()-3e5;for(;this._edits.length>0&&this._edits[0].instante.timeMs)break;if(n++,o.kind==="selections"){let s=o.selections.map(c=>[c.start,c.endExclusive]);r.push({entry:{kind:"selectionChanged",id:this.id,selection:s,time:o.instant},sortTime:o.instant})}else r.push({entry:{kind:"changed",id:this.id,v:n,edit:(0,Xpa.serializeStringEdit)(o.edit),time:o.instant},sortTime:o.instant})}return r}}});var toi=T(oat=>{"use strict";f();Object.defineProperty(oat,"__esModule",{value:!0});oat.CapturingToken=void 0;var Cfr=class{static{a(this,"CapturingToken")}constructor(e,r,n,o,s,c,l){this.label=e,this.icon=r,this.subAgentInvocationId=n,this.subAgentName=o,this.chatSessionId=s,this.parentChatSessionId=c,this.debugLogLabel=l}};oat.CapturingToken=Cfr});var roi=T(vfr=>{"use strict";f();Object.defineProperty(vfr,"__esModule",{value:!0});vfr.secondsToHumanReadableTime=aha;function aha(t){if(t<90)return`${t} seconds`;let e=Math.floor(t/60);if(t<=5400)return`${e} minutes`;let r=Math.floor(e/60),n=e%60,o=`${r} hours`;return n>0&&(o+=` ${n} minutes`),o}a(aha,"secondsToHumanReadableTime")});var QD=T(ld=>{"use strict";f();var cha=ld&&ld.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lha=ld&&ld.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uha=ld&&ld.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{"use strict";f();Object.defineProperty(IA,"__esModule",{value:!0});IA.PendingLoggedChatRequest=IA.AbstractRequestLogger=IA.IRequestLogger=IA.ChatRequestScheme=void 0;IA.resolveMarkdownContent=E0a;IA.resolveMarkdownIcon=C0a;IA.getCurrentCapturingToken=_0a;IA.storeCapturingTokenForCorrelation=v0a;IA.retrieveCapturingTokenByCorrelation=b0a;IA.runWithCapturingToken=T0a;var m0a=require("async_hooks"),aii=XD(),g0a=qr(),A0a=so(),y0a=Fu(),nfr=class t{static{a(this,"ChatRequestScheme")}static{this.chatRequestScheme="ccreq"}static buildUri(e,r="markdown"){let n;return r==="markdown"?n="copilotmd":r==="json"?n="json":n="request.json",e.kind==="latest"?`${t.chatRequestScheme}:latest.${n}`:`${t.chatRequestScheme}:${e.id}.${n}`}static parseUri(e){if(e===this.buildUri({kind:"latest"},"markdown"))return{data:{kind:"latest"},format:"markdown"};if(e===this.buildUri({kind:"latest"},"json"))return{data:{kind:"latest"},format:"json"};if(e===this.buildUri({kind:"latest"},"rawrequest"))return{data:{kind:"latest"},format:"rawrequest"};let r=e.match(/ccreq:([^\s]+)\.copilotmd/);if(r)return{data:{kind:"request",id:r[1]},format:"markdown"};let n=e.match(/ccreq:([^\s]+)\.request\.json/);if(n)return{data:{kind:"request",id:n[1]},format:"rawrequest"};let o=e.match(/ccreq:([^\s]+)\.json/);if(o)return{data:{kind:"request",id:o[1]},format:"json"}}static findAllUris(e){let r=/(ccreq:[^\s]+\.(copilotmd|json|request\.json))/g;return[...e.matchAll(r)].map(n=>{let o=n[1];return{uri:o,range:new y0a.OffsetRange(n.index,n.index+o.length)}})}};IA.ChatRequestScheme=nfr;IA.IRequestLogger=(0,g0a.createServiceIdentifier)("IRequestLogger");function E0a(t){return typeof t.markdownContent=="function"?t.markdownContent():t.markdownContent}a(E0a,"resolveMarkdownContent");function C0a(t){return typeof t.icon=="function"?t.icon():t.icon}a(C0a,"resolveMarkdownIcon");var PRe=new m0a.AsyncLocalStorage,ifr=new Map;function _0a(){return PRe.getStore()}a(_0a,"getCurrentCapturingToken");function v0a(t){let e=PRe.getStore();e&&ifr.set(t,e)}a(v0a,"storeCapturingTokenForCorrelation");function b0a(t){let e=ifr.get(t);return e&&ifr.delete(t),e}a(b0a,"retrieveCapturingTokenByCorrelation");function T0a(t,e){return PRe.run(t,e)}a(T0a,"runWithCapturingToken");var ofr=class extends A0a.Disposable{static{a(this,"AbstractRequestLogger")}get promptRendererTracing(){return!1}captureInvocation(e,r){return PRe.run(e,()=>r())}logContentExclusionRules(e,r,n){}logChatRequest(e,r,n){return new Zat(this,e,r,n)}enableWorkspaceEditTracing(){}disableWorkspaceEditTracing(){}get currentRequest(){return PRe.getStore()}};IA.AbstractRequestLogger=ofr;var sfr=class{static{a(this,"AbstractPendingLoggedRequest")}constructor(e,r,n,o){this._logbook=e,this._debugName=r,this._chatEndpoint=n,this._chatParams=o,this._timeToFirstToken=void 0,this._time=new Date}markTimeToFirstToken(e){this._timeToFirstToken=e}resolveWithCancelation(){this._logbook.addEntry({type:"ChatMLCancelation",debugName:this._debugName,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata})}},Zat=class extends sfr{static{a(this,"PendingLoggedChatRequest")}constructor(e,r,n,o){super(e,r,n,o)}resolve(e,r){e.type===aii.ChatFetchResponseType.Success?this._logbook.addEntry({type:"ChatMLSuccess",debugName:this._debugName,usage:e.usage,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,timeToFirstToken:this._timeToFirstToken,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata,result:e,deltas:r}):this._logbook.addEntry({type:e.type===aii.ChatFetchResponseType.Canceled?"ChatMLCancelation":"ChatMLFailure",debugName:this._debugName,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,timeToFirstToken:this._timeToFirstToken,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata,result:e})}};IA.PendingLoggedChatRequest=Zat});var cfr=T(Lde=>{"use strict";f();Object.defineProperty(Lde,"__esModule",{value:!0});Lde.NullSnippyService=Lde.ISnippyService=void 0;var S0a=qr();Lde.ISnippyService=(0,S0a.createServiceIdentifier)("ISnippyService");var afr=class{static{a(this,"NullSnippyService")}async handlePostInsertion(){}};Lde.NullSnippyService=afr});var dfr=T(Fde=>{"use strict";f();Object.defineProperty(Fde,"__esModule",{value:!0});Fde.MovedText=Fde.LinesDiff=void 0;var lfr=class{static{a(this,"LinesDiff")}constructor(e,r,n){this.changes=e,this.moves=r,this.hitTimeout=n}};Fde.LinesDiff=lfr;var ufr=class t{static{a(this,"MovedText")}constructor(e,r){this.lineRangeMapping=e,this.changes=r}flip(){return new t(this.lineRangeMapping.flip(),this.changes.map(e=>e.flip()))}};Fde.MovedText=ufr});var tct=T(n2=>{"use strict";f();Object.defineProperty(n2,"__esModule",{value:!0});n2.RangeMapping=n2.DetailedLineRangeMapping=n2.LineRangeMapping=void 0;n2.lineRangeMappingFromRangeMappings=x0a;n2.getLineRangeMapping=dii;n2.lineRangeMappingFromChange=w0a;var I0a=jc(),cii=Jl(),ect=es(),R_=$N(),r2=ZE(),ZD=Ef(),uii=axe(),kRe=class t{static{a(this,"LineRangeMapping")}static inverse(e,r,n){let o=[],s=1,c=1;for(let u of e){let d=new t(new R_.LineRange(s,u.original.startLineNumber),new R_.LineRange(c,u.modified.startLineNumber));d.modified.isEmpty||o.push(d),s=u.original.endLineNumberExclusive,c=u.modified.endLineNumberExclusive}let l=new t(new R_.LineRange(s,r+1),new R_.LineRange(c,n+1));return l.modified.isEmpty||o.push(l),o}static clip(e,r,n){let o=[];for(let s of e){let c=s.original.intersect(r),l=s.modified.intersect(n);c&&!c.isEmpty&&l&&!l.isEmpty&&o.push(new t(c,l))}return o}constructor(e,r){this.original=e,this.modified=r}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}get changedLineCount(){return Math.max(this.original.length,this.modified.length)}toRangeMapping(){let e=this.original.toInclusiveRange(),r=this.modified.toInclusiveRange();if(e&&r)return new u3(e,r);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new ect.BugIndicatingError("not a valid diff");return new u3(new ZD.Range(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ZD.Range(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new u3(new ZD.Range(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new ZD.Range(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,r){if(lii(this.original.endLineNumberExclusive,e)&&lii(this.modified.endLineNumberExclusive,r))return new u3(new ZD.Range(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ZD.Range(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new u3(ZD.Range.fromPositions(new r2.Position(this.original.startLineNumber,1),Ude(new r2.Position(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ZD.Range.fromPositions(new r2.Position(this.modified.startLineNumber,1),Ude(new r2.Position(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new u3(ZD.Range.fromPositions(Ude(new r2.Position(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Ude(new r2.Position(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ZD.Range.fromPositions(Ude(new r2.Position(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),r),Ude(new r2.Position(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));throw new ect.BugIndicatingError}};n2.LineRangeMapping=kRe;function Ude(t,e){if(t.lineNumber<1)return new r2.Position(1,1);if(t.lineNumber>e.length)return new r2.Position(e.length,e[e.length-1].length+1);let r=e[t.lineNumber-1];return t.column>r.length+1?new r2.Position(t.lineNumber,r.length+1):t}a(Ude,"normalizePosition");function lii(t,e){return t>=1&&t<=e.length}a(lii,"isValidLineNumber");var NRe=class t extends kRe{static{a(this,"DetailedLineRangeMapping")}static toTextEdit(e,r){let n=[];for(let o of e)for(let s of o.innerChanges??[]){let c=s.toTextEdit(r);n.push(c)}return new uii.TextEdit(n)}static fromRangeMappings(e){let r=R_.LineRange.join(e.map(o=>R_.LineRange.fromRangeInclusive(o.originalRange))),n=R_.LineRange.join(e.map(o=>R_.LineRange.fromRangeInclusive(o.modifiedRange)));return new t(r,n,e)}constructor(e,r,n){super(e,r),this.innerChanges=n}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}};n2.DetailedLineRangeMapping=NRe;var u3=class t{static{a(this,"RangeMapping")}static fromEdit(e){let r=e.getNewRanges();return e.replacements.map((o,s)=>new t(o.range,r[s]))}static fromEditJoin(e){let r=e.getNewRanges(),n=e.replacements.map((o,s)=>new t(o.range,r[s]));return t.join(n)}static join(e){if(e.length===0)throw new ect.BugIndicatingError("Cannot join an empty list of range mappings");let r=e[0];for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let r=e.getValueOfRange(this.modifiedRange);return new uii.TextReplacement(this.originalRange,r)}join(e){return new t(this.originalRange.plusRange(e.originalRange),this.modifiedRange.plusRange(e.modifiedRange))}};n2.RangeMapping=u3;function x0a(t,e,r,n=!1){let o=[];for(let s of(0,I0a.groupAdjacentBy)(t.map(c=>dii(c,e,r)),(c,l)=>c.original.intersectsOrTouches(l.original)||c.modified.intersectsOrTouches(l.modified))){let c=s[0],l=s[s.length-1];o.push(new NRe(c.original.join(l.original),c.modified.join(l.modified),s.map(u=>u.innerChanges[0])))}return(0,cii.assertFn)(()=>!n&&o.length>0&&(o[0].modified.startLineNumber!==o[0].original.startLineNumber||r.length.lineCount-o[o.length-1].modified.endLineNumberExclusive!==e.length.lineCount-o[o.length-1].original.endLineNumberExclusive)?!1:(0,cii.checkAdjacentItems)(o,(s,c)=>c.original.startLineNumber-s.original.endLineNumberExclusive===c.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=r.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+o&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+o&&(n=1);let s=new R_.LineRange(t.originalRange.startLineNumber+n,t.originalRange.endLineNumber+1+o),c=new R_.LineRange(t.modifiedRange.startLineNumber+n,t.modifiedRange.endLineNumber+1+o);return new NRe(s,c,[t])}a(dii,"getLineRangeMapping");function w0a(t){let e;t.originalEndLineNumber===0?e=new R_.LineRange(t.originalStartLineNumber+1,t.originalStartLineNumber+1):e=new R_.LineRange(t.originalStartLineNumber,t.originalEndLineNumber+1);let r;return t.modifiedEndLineNumber===0?r=new R_.LineRange(t.modifiedStartLineNumber+1,t.modifiedStartLineNumber+1):r=new R_.LineRange(t.modifiedStartLineNumber,t.modifiedEndLineNumber+1),new kRe(e,r)}a(w0a,"lineRangeMappingFromChange")});var qde=T(uI=>{"use strict";f();Object.defineProperty(uI,"__esModule",{value:!0});uI.DateTimeout=uI.InfiniteTimeout=uI.OffsetPair=uI.SequenceDiff=uI.DiffAlgorithmResult=void 0;var R0a=jc(),fii=es(),Qde=Fu(),ffr=class t{static{a(this,"DiffAlgorithmResult")}static trivial(e,r){return new t([new DRe(Qde.OffsetRange.ofLength(e.length),Qde.OffsetRange.ofLength(r.length))],!1)}static trivialTimedOut(e,r){return new t([new DRe(Qde.OffsetRange.ofLength(e.length),Qde.OffsetRange.ofLength(r.length))],!0)}constructor(e,r){this.diffs=e,this.hitTimeout=r}};uI.DiffAlgorithmResult=ffr;var DRe=class t{static{a(this,"SequenceDiff")}static invert(e,r){let n=[];return(0,R0a.forEachAdjacent)(e,(o,s)=>{n.push(t.fromOffsetPairs(o?o.getEndExclusives():bJ.zero,s?s.getStarts():new bJ(r,(o?o.seq2Range.endExclusive-o.seq1Range.endExclusive:0)+r)))}),n}static fromOffsetPairs(e,r){return new t(new Qde.OffsetRange(e.offset1,r.offset1),new Qde.OffsetRange(e.offset2,r.offset2))}static assertSorted(e){let r;for(let n of e){if(r&&!(r.seq1Range.endExclusive<=n.seq1Range.start&&r.seq2Range.endExclusive<=n.seq2Range.start))throw new fii.BugIndicatingError("Sequence diffs must be sorted");r=n}}constructor(e,r){this.seq1Range=e,this.seq2Range=r}swap(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new t(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new t(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new t(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new t(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersectsOrTouches(e){return this.seq1Range.intersectsOrTouches(e.seq1Range)||this.seq2Range.intersectsOrTouches(e.seq2Range)}intersect(e){let r=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!r||!n))return new t(r,n)}getStarts(){return new bJ(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new bJ(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}};uI.SequenceDiff=DRe;var bJ=class t{static{a(this,"OffsetPair")}static{this.zero=new t(0,0)}static{this.max=new t(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,r){this.offset1=e,this.offset2=r}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new t(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};uI.OffsetPair=bJ;var pfr=class t{static{a(this,"InfiniteTimeout")}static{this.instance=new t}isValid(){return!0}};uI.InfiniteTimeout=pfr;var hfr=class{static{a(this,"DateTimeout")}constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new fii.BugIndicatingError("timeout must be positive")}isValid(){return!(Date.now()-this.startTime!0,this.valid=!0}};uI.DateTimeout=hfr});var rct=T(TJ=>{"use strict";f();Object.defineProperty(TJ,"__esModule",{value:!0});TJ.LineRangeFragment=TJ.Array2D=void 0;TJ.isSpace=P0a;var mfr=class{static{a(this,"Array2D")}constructor(e,r){this.width=e,this.height=r,this.array=[],this.array=new Array(e*r)}get(e,r){return this.array[e+r*this.width]}set(e,r,n){this.array[e+r*this.width]=n}};TJ.Array2D=mfr;function P0a(t){return t===32||t===9}a(P0a,"isSpace");var gfr=class t{static{a(this,"LineRangeFragment")}static{this.chrKeys=new Map}static getKey(e){let r=this.chrKeys.get(e);return r===void 0&&(r=this.chrKeys.size,this.chrKeys.set(e,r)),r}constructor(e,r,n){this.range=e,this.lines=r,this.source=n,this.histogram=[];let o=0;for(let s=e.startLineNumber-1;s{"use strict";f();Object.defineProperty(nct,"__esModule",{value:!0});nct.DynamicProgrammingDiffing=void 0;var pii=Fu(),MRe=qde(),Afr=rct(),yfr=class{static{a(this,"DynamicProgrammingDiffing")}compute(e,r,n=MRe.InfiniteTimeout.instance,o){if(e.length===0||r.length===0)return MRe.DiffAlgorithmResult.trivial(e,r);let s=new Afr.Array2D(e.length,r.length),c=new Afr.Array2D(e.length,r.length),l=new Afr.Array2D(e.length,r.length);for(let A=0;A0&&y>0&&c.get(A-1,y-1)===3&&(v+=l.get(A-1,y-1)),v+=o?o(A,y):1):v=-1;let b=Math.max(E,_,v);if(b===v){let I=A>0&&y>0?l.get(A-1,y-1):0;l.set(A,y,I+1),c.set(A,y,3)}else b===E?(l.set(A,y,0),c.set(A,y,1)):b===_&&(l.set(A,y,0),c.set(A,y,2));s.set(A,y,b)}let u=[],d=e.length,p=r.length;function h(A,y){(A+1!==d||y+1!==p)&&u.push(new MRe.SequenceDiff(new pii.OffsetRange(A+1,d),new pii.OffsetRange(y+1,p))),d=A,p=y}a(h,"reportDecreasingAligningPositions");let m=e.length-1,g=r.length-1;for(;m>=0&&g>=0;)c.get(m,g)===3?(h(m,g),m--,g--):c.get(m,g)===1?m--:g--;return h(-1,-1),u.reverse(),new MRe.DiffAlgorithmResult(u,!1)}};nct.DynamicProgrammingDiffing=yfr});var vfr=T(oct=>{"use strict";f();Object.defineProperty(oct,"__esModule",{value:!0});oct.MyersDiffAlgorithm=void 0;var mii=Fu(),ORe=qde(),Efr=class{static{a(this,"MyersDiffAlgorithm")}compute(e,r,n=ORe.InfiniteTimeout.instance){if(e.length===0||r.length===0)return ORe.DiffAlgorithmResult.trivial(e,r);let o=e,s=r;function c(y,E){for(;yo.length||x>s.length)continue;let R=c(I,x);u.set(p,R);let w=I===v?d.get(p+1):d.get(p-1);if(d.set(p,R!==I?new ict(w,I,x,R-I):w),u.get(p)===o.length&&u.get(p)-p===s.length)break e}}let h=d.get(p),m=[],g=o.length,A=s.length;for(;;){let y=h?h.x+h.length:0,E=h?h.y+h.length:0;if((y!==g||E!==A)&&m.push(new ORe.SequenceDiff(new mii.OffsetRange(y,g),new mii.OffsetRange(E,A))),!h)break;g=h.x,A=h.y,h=h.prev}return m.reverse(),new ORe.DiffAlgorithmResult(m,!1)}};oct.MyersDiffAlgorithm=Efr;var ict=class{static{a(this,"SnakePath")}constructor(e,r,n,o){this.prev=e,this.x=r,this.y=n,this.length=o}},Cfr=class{static{a(this,"FastInt32Array")}constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,r){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=r}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=r}}},_fr=class{static{a(this,"FastArrayNegativeIndices")}constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,r){e<0?(e=-e-1,this.negativeArr[e]=r):this.positiveArr[e]=r}}});var Sfr=T(act=>{"use strict";f();Object.defineProperty(act,"__esModule",{value:!0});act.LinesSliceCharSequence=void 0;var bfr=wF(),sct=Fu(),k0a=ZE(),gii=Ef(),N0a=rct(),Tfr=class{static{a(this,"LinesSliceCharSequence")}constructor(e,r,n){this.lines=e,this.range=r,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let o=this.range.startLineNumber;o<=this.range.endLineNumber;o++){let s=e[o-1],c=0;o===this.range.startLineNumber&&this.range.startColumn>1&&(c=this.range.startColumn-1,s=s.substring(c)),this.lineStartOffsets.push(c);let l=0;if(!n){let d=s.trimStart();l=s.length-d.length,s=d.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let u=o===this.range.endLineNumber?Math.min(this.range.endColumn-1-c-l,s.length):s.length;for(let d=0;dString.fromCharCode(r)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let r=Eii(e>0?this.elements[e-1]:-1),n=Eii(es<=e),o=e-this.firstElementOffsetByLineIdx[n];return new k0a.Position(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+o+(o===0&&r==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){let r=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(r)?gii.Range.fromPositions(n,n):gii.Range.fromPositions(r,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!Gde(this.elements[e]))return;let r=e;for(;r>0&&Gde(this.elements[r-1]);)r--;let n=e;for(;n=this.elements.length||!Gde(this.elements[e]))return;let r=e;for(;r>0&&Gde(this.elements[r-1])&&!Aii(this.elements[r]);)r--;let n=e;for(;no<=e.start)??0,n=(0,bfr.findFirstMonotonous)(this.firstElementOffsetByLineIdx,o=>e.endExclusive<=o)??this.elements.length;return new sct.OffsetRange(r,n)}};act.LinesSliceCharSequence=Tfr;function Gde(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}a(Gde,"isWordChar");function Aii(t){return t>=65&&t<=90}a(Aii,"isUpperCase");var D0a={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function yii(t){return D0a[t]}a(yii,"getCategoryBoundaryScore");function Eii(t){return t===10?8:t===13?7:(0,N0a.isSpace)(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}a(Eii,"getCategory")});var bii=T(Ifr=>{"use strict";f();Object.defineProperty(Ifr,"__esModule",{value:!0});Ifr.computeMovedLines=L0a;var M0a=qde(),cct=tct(),e5=jc(),BRe=wF(),O0a=iw(),P_=$N(),Cii=Sfr(),lct=rct(),B0a=vfr(),_ii=Ef();function L0a(t,e,r,n,o,s){let{moves:c,excludedChanges:l}=U0a(t,e,r,s);if(!s.isValid())return[];let u=t.filter(p=>!l.has(p)),d=Q0a(u,n,o,e,r,s);return(0,e5.pushMany)(c,d),c=q0a(c),c=c.filter(p=>{let h=p.original.toOffsetRange().slice(e).map(g=>g.trim());return h.join(` -`).length>=15&&F0a(h,g=>g.length>=2)>=2}),c=G0a(t,c),c}a(L0a,"computeMovedLines");function F0a(t,e){let r=0;for(let n of t)e(n)&&r++;return r}a(F0a,"countWhere");function U0a(t,e,r,n){let o=[],s=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new lct.LineRangeFragment(u.original,e,u)),c=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new lct.LineRangeFragment(u.modified,r,u))),l=new Set;for(let u of s){let d=-1,p;for(let h of c){let m=u.computeSimilarity(h);m>d&&(d=m,p=h)}if(d>.9&&p&&(c.delete(p),o.push(new cct.LineRangeMapping(u.range,p.range)),l.add(u.source),l.add(p.source)),!n.isValid())return{moves:o,excludedChanges:l}}return{moves:o,excludedChanges:l}}a(U0a,"computeMovesFromSimpleDeletionsToSimpleInsertions");function Q0a(t,e,r,n,o,s){let c=[],l=new O0a.SetMap;for(let m of t)for(let g=m.original.startLineNumber;gm.modified.startLineNumber,e5.numberComparator));for(let m of t){let g=[];for(let A=m.modified.startLineNumber;A{for(let I of g)if(I.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&I.modifiedLineRange.endLineNumberExclusive+1===E.endLineNumberExclusive){I.originalLineRange=new P_.LineRange(I.originalLineRange.startLineNumber,v.endLineNumberExclusive),I.modifiedLineRange=new P_.LineRange(I.modifiedLineRange.startLineNumber,E.endLineNumberExclusive),_.push(I);return}let b={modifiedLineRange:E,originalLineRange:v};u.push(b),_.push(b)}),g=_}if(!s.isValid())return[]}u.sort((0,e5.reverseOrder)((0,e5.compareBy)(m=>m.modifiedLineRange.length,e5.numberComparator)));let d=new P_.LineRangeSet,p=new P_.LineRangeSet;for(let m of u){let g=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,A=d.subtractFrom(m.modifiedLineRange),y=p.subtractFrom(m.originalLineRange).getWithDelta(g),E=A.getIntersection(y);for(let _ of E.ranges){if(_.length<3)continue;let v=_,b=_.delta(-g);c.push(new cct.LineRangeMapping(b,v)),d.addRange(v),p.addRange(b)}}c.sort((0,e5.compareBy)(m=>m.original.startLineNumber,e5.numberComparator));let h=new BRe.MonotonousArray(t);for(let m=0;mR.original.startLineNumber<=g.original.startLineNumber),y=(0,BRe.findLastMonotonous)(t,R=>R.modified.startLineNumber<=g.modified.startLineNumber),E=Math.max(g.original.startLineNumber-A.original.startLineNumber,g.modified.startLineNumber-y.modified.startLineNumber),_=h.findLastMonotonous(R=>R.original.startLineNumberR.modified.startLineNumbern.length||w>o.length||d.contains(w)||p.contains(R)||!vii(n[R-1],o[w-1],s))break}I>0&&(p.addRange(new P_.LineRange(g.original.startLineNumber-I,g.original.startLineNumber)),d.addRange(new P_.LineRange(g.modified.startLineNumber-I,g.modified.startLineNumber)));let x;for(x=0;xn.length||w>o.length||d.contains(w)||p.contains(R)||!vii(n[R-1],o[w-1],s))break}x>0&&(p.addRange(new P_.LineRange(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+x)),d.addRange(new P_.LineRange(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+x))),(I>0||x>0)&&(c[m]=new cct.LineRangeMapping(new P_.LineRange(g.original.startLineNumber-I,g.original.endLineNumberExclusive+x),new P_.LineRange(g.modified.startLineNumber-I,g.modified.endLineNumberExclusive+x)))}return c}a(Q0a,"computeUnchangedMoves");function vii(t,e,r){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let o=new B0a.MyersDiffAlgorithm().compute(new Cii.LinesSliceCharSequence([t],new _ii.Range(1,1,1,t.length),!1),new Cii.LinesSliceCharSequence([e],new _ii.Range(1,1,1,e.length),!1),r),s=0,c=M0a.SequenceDiff.invert(o.diffs,t.length);for(let p of c)p.seq1Range.forEach(h=>{(0,lct.isSpace)(t.charCodeAt(h))||s++});function l(p){let h=0;for(let m=0;me.length?t:e);return s/u>.6&&u>10}a(vii,"areLinesSimilar");function q0a(t){if(t.length===0)return t;t.sort((0,e5.compareBy)(r=>r.original.startLineNumber,e5.numberComparator));let e=[t[0]];for(let r=1;r=0&&c>=0&&s+c<=2){e[e.length-1]=n.join(o);continue}e.push(o)}return e}a(q0a,"joinCloseConsecutiveMoves");function G0a(t,e){let r=new BRe.MonotonousArray(t);return e=e.filter(n=>{let o=r.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber{"use strict";f();Object.defineProperty(SJ,"__esModule",{value:!0});SJ.optimizeSequenceDiffs=j0a;SJ.removeShortMatches=V0a;SJ.extendDiffsToEntireWordIfAppropriate=W0a;SJ.removeVeryShortMatchingLinesBetweenDiffs=Y0a;SJ.removeVeryShortMatchingTextBetweenLongDiffs=K0a;var H0a=jc(),t5=Fu(),r5=qde();function j0a(t,e,r){let n=r;return n=Tii(t,e,n),n=Tii(t,e,n),n=$0a(t,e,n),n}a(j0a,"optimizeSequenceDiffs");function Tii(t,e,r){if(r.length===0)return r;let n=[];n.push(r[0]);for(let s=1;s0&&(l=l.delta(d))}o.push(l)}return n.length>0&&o.push(n[n.length-1]),o}a(Tii,"joinSequenceDiffsByShifting");function $0a(t,e,r){if(!t.getBoundaryScore||!e.getBoundaryScore)return r;for(let n=0;n0?r[n-1]:void 0,s=r[n],c=n+1=n.start&&t.seq2Range.start-c>=o.start&&r.isStronglyEqual(t.seq2Range.start-c,t.seq2Range.endExclusive-c)&&c<100;)c++;c--;let l=0;for(;t.seq1Range.start+ld&&(d=A,u=p)}return t.delta(u)}a(Sii,"shiftDiffToBetterPosition");function V0a(t,e,r){let n=[];for(let o of r){let s=n[n.length-1];if(!s){n.push(o);continue}o.seq1Range.start-s.seq1Range.endExclusive<=2||o.seq2Range.start-s.seq2Range.endExclusive<=2?n[n.length-1]=new r5.SequenceDiff(s.seq1Range.join(o.seq1Range),s.seq2Range.join(o.seq2Range)):n.push(o)}return n}a(V0a,"removeShortMatches");function W0a(t,e,r,n,o=!1){let s=r5.SequenceDiff.invert(r,t.length),c=[],l=new r5.OffsetPair(0,0);function u(p,h){if(p.offset10;){let v=s[0];if(!(v.seq1Range.intersects(A.seq1Range)||v.seq2Range.intersects(A.seq2Range)))break;let I=n(t,v.seq1Range.start),x=n(e,v.seq2Range.start),R=new r5.SequenceDiff(I,x),w=R.intersect(v);if(E+=w.seq1Range.length,_+=w.seq2Range.length,A=A.join(R),A.seq1Range.endExclusive>=v.seq1Range.endExclusive)s.shift();else break}(o&&E+_0;){let p=s.shift();p.seq1Range.isEmpty||(u(p.getStarts(),p),u(p.getEndExclusives().delta(-1),p))}return z0a(r,c)}a(W0a,"extendDiffsToEntireWordIfAppropriate");function z0a(t,e){let r=[];for(;t.length>0||e.length>0;){let n=t[0],o=e[0],s;n&&(!o||n.seq1Range.start0&&r[r.length-1].seq1Range.endExclusive>=s.seq1Range.start?r[r.length-1]=r[r.length-1].join(s):r.push(s)}return r}a(z0a,"mergeSequenceDiffs");function Y0a(t,e,r){let n=r;if(n.length===0)return n;let o=0,s;do{s=!1;let c=[n[0]];for(let l=1;l5||g.seq1Range.length+g.seq2Range.length>5)};a(p,"shouldJoinDiffs");let u=n[l],d=c[c.length-1];p(d,u)?(s=!0,c[c.length-1]=c[c.length-1].join(u)):c.push(u)}n=c}while(o++<10&&s);return n}a(Y0a,"removeVeryShortMatchingLinesBetweenDiffs");function K0a(t,e,r){let n=r;if(n.length===0)return n;let o=0,s;do{s=!1;let l=[n[0]];for(let u=1;u5||y.length>500)return!1;let _=t.getText(y).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let v=t.countLinesIn(g.seq1Range),b=g.seq1Range.length,I=e.countLinesIn(g.seq2Range),x=g.seq2Range.length,R=t.countLinesIn(A.seq1Range),w=A.seq1Range.length,P=e.countLinesIn(A.seq2Range),k=A.seq2Range.length,Q=130;function M(D){return Math.min(D,Q)}return a(M,"cap"),Math.pow(Math.pow(M(v*40+b),1.5)+Math.pow(M(I*40+x),1.5),1.5)+Math.pow(Math.pow(M(R*40+w),1.5)+Math.pow(M(P*40+k),1.5),1.5)>(Q**1.5)**1.5*1.3};a(h,"shouldJoinDiffs");let d=n[u],p=l[l.length-1];h(p,d)?(s=!0,l[l.length-1]=l[l.length-1].join(d)):l.push(d)}n=l}while(o++<10&&s);let c=[];return(0,H0a.forEachWithNeighbors)(n,(l,u,d)=>{let p=u;function h(_){return _.length>0&&_.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}a(h,"shouldMarkAsChanged");let m=t.extendToFullLines(u.seq1Range),g=t.getText(new t5.OffsetRange(m.start,u.seq1Range.start));h(g)&&(p=p.deltaStart(-g.length));let A=t.getText(new t5.OffsetRange(u.seq1Range.endExclusive,m.endExclusive));h(A)&&(p=p.deltaEnd(A.length));let y=r5.SequenceDiff.fromOffsetPairs(l?l.getEndExclusives():r5.OffsetPair.zero,d?d.getStarts():r5.OffsetPair.max),E=p.intersect(y);c.length>0&&E.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(E):c.push(E)}),c}a(K0a,"removeVeryShortMatchingTextBetweenLongDiffs")});var wii=T(uct=>{"use strict";f();Object.defineProperty(uct,"__esModule",{value:!0});uct.LineSequence=void 0;var xfr=class{static{a(this,"LineSequence")}constructor(e,r){this.trimmedHash=e,this.lines=r}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let r=e===0?0:xii(this.lines[e-1]),n=e===this.lines.length?0:xii(this.lines[e]);return 1e3-(r+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,r){return this.lines[e]===this.lines[r]}};uct.LineSequence=xfr;function xii(t){let e=0;for(;e{"use strict";f();Object.defineProperty(hct,"__esModule",{value:!0});hct.DefaultLinesDiffComputer=void 0;var J0a=jc(),Rii=Jl(),pct=$N(),Pii=Fu(),kii=Ef(),dct=Qv(),fct=dfr(),xJ=tct(),n5=qde(),X0a=hii(),Z0a=vfr(),epa=bii(),IJ=Iii(),Nii=wii(),Dii=Sfr(),wfr=class{static{a(this,"DefaultLinesDiffComputer")}constructor(){this.dynamicProgrammingDiffing=new X0a.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new Z0a.MyersDiffAlgorithm}computeDiff(e,r,n){if(e.length<=1&&(0,J0a.equals)(e,r,(w,P)=>w===P))return new fct.LinesDiff([],[],!1);if(e.length===1&&e[0].length===0||r.length===1&&r[0].length===0)return new fct.LinesDiff([new xJ.DetailedLineRangeMapping(new pct.LineRange(1,e.length+1),new pct.LineRange(1,r.length+1),[new xJ.RangeMapping(new kii.Range(1,1,e.length,e[e.length-1].length+1),new kii.Range(1,1,r.length,r[r.length-1].length+1))])],[],!1);let o=n.maxComputationTimeMs===0?n5.InfiniteTimeout.instance:new n5.DateTimeout(n.maxComputationTimeMs),s=!n.ignoreTrimWhitespace,c=new Map;function l(w){let P=c.get(w);return P===void 0&&(P=c.size,c.set(w,P)),P}a(l,"getOrCreateHash");let u=e.map(w=>l(w.trim())),d=r.map(w=>l(w.trim())),p=new Nii.LineSequence(u,e),h=new Nii.LineSequence(d,r),m=p.length+h.length<1700?this.dynamicProgrammingDiffing.compute(p,h,o,(w,P)=>e[w]===r[P]?r[P].length===0?.1:1+Math.log(1+r[P].length):.99):this.myersDiffingAlgorithm.compute(p,h,o),g=m.diffs,A=m.hitTimeout;g=(0,IJ.optimizeSequenceDiffs)(p,h,g),g=(0,IJ.removeVeryShortMatchingLinesBetweenDiffs)(p,h,g);let y=[],E=a(w=>{if(s)for(let P=0;Pw.seq1Range.start-_===w.seq2Range.start-v);let P=w.seq1Range.start-_;E(P),_=w.seq1Range.endExclusive,v=w.seq2Range.endExclusive;let k=this.refineDiff(e,r,w,o,s,n);k.hitTimeout&&(A=!0);for(let Q of k.mappings)y.push(Q)}E(e.length-_);let b=new dct.ArrayText(e),I=new dct.ArrayText(r),x=(0,xJ.lineRangeMappingFromRangeMappings)(y,b,I),R=[];return n.computeMoves&&(R=this.computeMoves(x,e,r,u,d,o,s,n)),(0,Rii.assertFn)(()=>{function w(k,Q){if(k.lineNumber<1||k.lineNumber>Q.length)return!1;let M=Q[k.lineNumber-1];return!(k.column<1||k.column>M.length+1)}a(w,"validatePosition");function P(k,Q){return!(k.startLineNumber<1||k.startLineNumber>Q.length+1||k.endLineNumberExclusive<1||k.endLineNumberExclusive>Q.length+1)}a(P,"validateRange");for(let k of x){if(!k.innerChanges)return!1;for(let Q of k.innerChanges)if(!(w(Q.modifiedRange.getStartPosition(),r)&&w(Q.modifiedRange.getEndPosition(),r)&&w(Q.originalRange.getStartPosition(),e)&&w(Q.originalRange.getEndPosition(),e)))return!1;if(!P(k.modified,r)||!P(k.original,e))return!1}return!0}),new fct.LinesDiff(x,R,A)}computeMoves(e,r,n,o,s,c,l,u){return(0,epa.computeMovedLines)(e,r,n,o,s,c).map(h=>{let m=this.refineDiff(r,n,new n5.SequenceDiff(h.original.toOffsetRange(),h.modified.toOffsetRange()),c,l,u),g=(0,xJ.lineRangeMappingFromRangeMappings)(m.mappings,new dct.ArrayText(r),new dct.ArrayText(n),!0);return new fct.MovedText(h,g)})}refineDiff(e,r,n,o,s,c){let u=tpa(n).toRangeMapping2(e,r),d=new Dii.LinesSliceCharSequence(e,u.originalRange,s),p=new Dii.LinesSliceCharSequence(r,u.modifiedRange,s),h=d.length+p.length<500?this.dynamicProgrammingDiffing.compute(d,p,o):this.myersDiffingAlgorithm.compute(d,p,o),m=!1,g=h.diffs;m&&n5.SequenceDiff.assertSorted(g),g=(0,IJ.optimizeSequenceDiffs)(d,p,g),m&&n5.SequenceDiff.assertSorted(g),g=(0,IJ.extendDiffsToEntireWordIfAppropriate)(d,p,g,(y,E)=>y.findWordContaining(E)),m&&n5.SequenceDiff.assertSorted(g),c.extendToSubwords&&(g=(0,IJ.extendDiffsToEntireWordIfAppropriate)(d,p,g,(y,E)=>y.findSubWordContaining(E),!0),m&&n5.SequenceDiff.assertSorted(g)),g=(0,IJ.removeShortMatches)(d,p,g),m&&n5.SequenceDiff.assertSorted(g),g=(0,IJ.removeVeryShortMatchingTextBetweenLongDiffs)(d,p,g),m&&n5.SequenceDiff.assertSorted(g);let A=g.map(y=>new xJ.RangeMapping(d.translateRange(y.seq1Range),p.translateRange(y.seq2Range)));return m&&xJ.RangeMapping.assertSorted(A),{mappings:A,hitTimeout:h.hitTimeout}}};hct.DefaultLinesDiffComputer=wfr;function tpa(t){return new xJ.LineRangeMapping(new pct.LineRange(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new pct.LineRange(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}a(tpa,"toLineRangeMapping")});var Pfr=T(lb=>{"use strict";f();Object.defineProperty(lb,"__esModule",{value:!0});lb.maxImperfectAgreementLength=lb.maxAgreementOffset=lb.EditDataWithIndex=void 0;lb.tryRebase=spa;lb.checkEditConsistency=Oii;lb.tryRebaseStringEdits=cpa;var rpa=t2(),npa=Ay(),rE=aA(),LRe=Fu(),Mii=Qv(),ipa=Rfr(),opa=!1,mct=class{static{a(this,"EditDataWithIndex")}constructor(e){this.index=e}join(e){if(this.index===e.index)return this}};lb.EditDataWithIndex=mct;function spa(t,e,r,n,o,s,c,l,u,d={}){let p=Date.now();try{return apa(t,e,r,n,o,s,c,l,u,d)}catch(h){return u.trace(`Rebase error: ${npa.ErrorUtils.toString(h)}`),"error"}finally{u.trace(`Rebase duration: ${Date.now()-p}ms`)}}a(spa,"tryRebase");function apa(t,e,r,n,o,s,c,l,u,d){if(!Oii(t,o,s,u,!0))return"inconsistentEdits";let p=o.removeCommonSuffixAndPrefix(t),h=c[0];if(e&&h&&!p.applyToOffsetRangeOrUndefined(e)?.containsRange(h))return"outsideEditWindow";if(n.lengthrE.AnnotatedStringEdit.create(E))),g=Bii(t,m,p,l,d);if(!g)return"rebaseFailed";let A=g.replacements.reduce((E,_)=>((E[_.data.index]||=[]).push(_),E),[]),y=[];for(let E=0;ER>0?s.substring(w[R-1].replaceRange.endExclusive,x.replaceRange.start)+x.newText:x.newText).join(""),I=rE.StringReplacement.replace(v,b);I.removeCommonSuffixAndPrefix(s).isEmpty||y.push({rebasedEdit:I,rebasedEditIndex:E})}return l==="strict"&&y.length>0&&new rpa.SingleEdits(r).apply(t)!==rE.StringEdit.create(y.map(E=>E.rebasedEdit)).apply(s)?(u.trace("Result consistency check failed"),"inconsistentEdits"):y}a(apa,"_tryRebase");function Oii(t,e,r,n,o=opa){if(!o)return!0;let s=e.apply(t)===r;return s||n.trace("Edit consistency check failed"),s}a(Oii,"checkEditConsistency");function cpa(t,e,r,n,o={}){return Bii(t,e.mapData(s=>new rE.VoidEditData),r,n,o)?.toStringEdit()}a(cpa,"tryRebaseStringEdits");function Bii(t,e,r,n,o){let s=r.removeCommonSuffixAndPrefix(t),c=[],l=0,u=0,d=0;for(;up.replaceRange.start){let g=t.substring(p.replaceRange.start,m.replaceRange.start),A=g+m.newText;A.endsWith(g)&&(m=new rE.AnnotatedStringReplacement(LRe.OffsetRange.fromTo(p.replaceRange.start,m.replaceRange.endExclusive-g.length),A.substring(0,A.length-g.length),m.data))}else if(u===e.replacements.length-1&&m.replaceRange.endExclusive=p.newText.length){let g=0,A=0,y=p,E;for(;y&&m.replaceRange.containsRange(y.replaceRange);){if(A=fpa(t,m,y,E,A,n,o),A===-1)return;g+=y.newText.length-y.replaceRange.length,E=y,y=s.replacements[++l]}c.push(new rE.AnnotatedStringReplacement(new LRe.OffsetRange(m.replaceRange.start+d,m.replaceRange.endExclusive+d+g),m.newText,m.data)),u++,d+=g}else return;else if(h.replaceRange.start",'""',"''","``"]);function dpa(t){return upa.has(t)}a(dpa,"isAutoClosePair");function fpa(t,e,r,n,o,s,c){let l=r.newText,u=n?n.replaceRange.endExclusive:e.replaceRange.start;ulb.maxAgreementOffset||d>0&&r.newText.length>lb.maxImperfectAgreementLength);return d!==-1&&!p?d+r.newText.length:c.absorbSubsequenceTyping&&dpa(l)&&lpa(l,e.newText.substring(o))?o:-1}a(fpa,"agreementIndexOf");function ppa(t,e,r,n,o){let s=t.split(/\r\n|\r|\n/),c=e.split(/\r\n|\r|\n/),u=new ipa.DefaultLinesDiffComputer().computeDiff(s,c,o);if(u.hitTimeout)return;let d=new Mii.StringText(t),p=new Mii.StringText(e);return u.changes.map(h=>(h.innerChanges||[]).map(m=>{let g=d.getTransformer().getOffsetRange(m.originalRange),A=p.getValueOfRange(m.modifiedRange);return new rE.AnnotatedStringReplacement(g.delta(r),A,n)})).flat()}a(ppa,"computeDiff")});var Fii=T(gct=>{"use strict";f();Object.defineProperty(gct,"__esModule",{value:!0});gct.RejectionCollector=void 0;var hpa=KN(),Lii=so(),mpa=Gw(),kfr=class extends Lii.Disposable{static{a(this,"RejectionCollector")}constructor(e,r){super(),this.workspace=e,this._garbageCollector=this._register(new Mfr(20)),this._documentCaches=new Map,this._logger=r.createSubLogger(["NES","RejectionCollector"]),(0,mpa.mapObservableArrayCached)(this,e.openDocuments,(n,o)=>{let s=new Nfr(n,this._garbageCollector,this._logger);this._documentCaches.set(s.doc.id,s),o.add((0,hpa.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},c=>{for(let l of c.value.changes)s.handleEdit(l,c.value.value)})),o.add((0,Lii.toDisposable)(()=>{this._documentCaches.delete(n.id)}))}).recomputeInitiallyAndOnChange(this._store)}reject(e,r){let n=this._documentCaches.get(e);if(!n){this._logger.trace(`Rejecting, no document cache: ${r}`);return}let o=r.removeCommonSuffixAndPrefix(n.doc.value.get().value);this._logger.trace(`Rejecting: ${o}`),n.reject(o)}isRejected(e,r){let n=this._documentCaches.get(e);if(!n)return this._logger.trace(`Checking rejection, no document cache: ${r}`),!1;let o=r.removeCommonSuffixAndPrefix(n.doc.value.get().value),s=n.isRejected(o);return this._logger.trace(`Checking rejection, ${s?"rejected":"not rejected"}: ${o}`),s}clear(){this._garbageCollector.clear()}};gct.RejectionCollector=kfr;var Nfr=class{static{a(this,"DocumentRejectionTracker")}constructor(e,r,n){this.doc=e,this._garbageCollector=r,this._logger=n,this._rejectedEdits=new Set}handleEdit(e,r){for(let n of[...this._rejectedEdits])n.handleEdit(e,r)}reject(e){if(this.isRejected(e))return;let r=new Dfr(e.toEdit(),()=>{this._logger.trace(`Evicting: ${e}`),this._rejectedEdits.delete(r)});this._rejectedEdits.add(r),this._garbageCollector.put(r)}isRejected(e){for(let r of this._rejectedEdits)if(r.isRejected(e))return!0;return!1}},Dfr=class{static{a(this,"RejectedEdit")}constructor(e,r){this._edit=e,this._onDispose=r}handleEdit(e,r){let n=this._edit.tryRebase(e);n?this._edit=n.removeCommonSuffixAndPrefix(r.value):this.dispose()}isRejected(e){return this._edit.equals(e.toEdit())}dispose(){this._onDispose()}},Mfr=class{static{a(this,"LRUGarbageCollector")}constructor(e){this._maxSize=e,this._disposables=[]}put(e){this._disposables.push(e),this._disposables.length>this._maxSize&&this._disposables.shift().dispose()}clear(){for(let e of this._disposables)e.dispose();this._disposables=[]}dispose(){this.clear()}}});var Bfr=T(Hde=>{"use strict";f();Object.defineProperty(Hde,"__esModule",{value:!0});Hde.DisposablesLRUCache=Hde.LRUCache=void 0;var FRe=class{static{a(this,"Node")}constructor(e,r){this.prev=null,this.next=null,this.key=e,this.value=r}},Act=class{static{a(this,"LRUCache")}constructor(e=10){if(e<1)throw new Error("Cache size must be at least 1");this._capacity=e,this._cache=new Map,this._head=new FRe("",null),this._tail=new FRe("",null),this._head.next=this._tail,this._tail.prev=this._head}_addNode(e){e.prev=this._head,e.next=this._head.next,this._head.next.prev=e,this._head.next=e}_removeNode(e){let r=e.prev,n=e.next;r.next=n,n.prev=r}_moveToHead(e){this._removeNode(e),this._addNode(e)}_popTail(){let e=this._tail.prev;return this._removeNode(e),e}clear(){this._cache.clear(),this._head.next=this._tail,this._tail.prev=this._head}deleteKey(e){let r=this._cache.get(e);if(r)return this._removeNode(r),this._cache.delete(e),r.value}get(e){let r=this._cache.get(e);if(r)return this._moveToHead(r),r.value}keys(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push(r.key),r=r.next;return e}getValues(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push(r.value),r=r.next;return e}put(e,r){let n=this._cache.get(e);if(n)n.value=r,this._moveToHead(n);else if(n=new FRe(e,r),this._cache.set(e,n),this._addNode(n),this._cache.size>this._capacity){let o=this._popTail();return this._cache.delete(o.key),[o.key,o.value]}}entries(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push([r.key,r.value]),r=r.next;return e}};Hde.LRUCache=Act;var Ofr=class{static{a(this,"DisposablesLRUCache")}constructor(e){this.actual=new Act(e)}dispose(){this.clear()}clear(){let e=this.actual.getValues();for(let r of e)r.dispose();this.actual.clear()}deleteKey(e){let r=this.actual.deleteKey(e);r&&r.dispose()}get(e){return this.actual.get(e)}keys(){return this.actual.keys()}getValues(){return this.actual.getValues()}put(e,r){let n=this.actual.put(e,r);n&&n[1].dispose()}};Hde.DisposablesLRUCache=Ofr});var Uii=T(Ect=>{"use strict";f();Object.defineProperty(Ect,"__esModule",{value:!0});Ect.RebaseFailureInfo=void 0;var gpa=aA(),Lfr=class{static{a(this,"RebaseFailureInfo")}constructor(e,r,n,o,s,c,l){this.originalDocument=e,this.editWindow=r,this.originalEdits=n,this.userEditSince=o,this.currentDocument=s,this.currentSelection=c,this.nesRebaseConfigs=l}toMarkdown(){let e=[];e.push("### Original Document"),e.push("```"),e.push(this.originalDocument),e.push("```"),e.push(""),e.push("### Suggested Edits");for(let r=0;r0&&(e.push(""),e.push(`### Cursor: ${this.currentSelection.map(r=>r.toString()).join(", ")}`)),e.push(""),e.push("### Document Intended After Suggested Edits"),e.push("```");try{let r=new gpa.StringEdit(this.originalEdits.slice()).apply(this.originalDocument);e.push(r)}catch{e.push("")}return e.push("```"),e.push(""),e.push("### Copy-Pasteable Test"),e.push("```typescript"),e.push(this._generateTest()),e.push("```"),e.join(` -`)}_generateTest(){let e=[];e.push("test('rebase failure (auto-generated)', () => {"),e.push(` const originalDocument = ${yct(this.originalDocument)};`),e.push(" const originalEdits = [");for(let n of this.originalEdits)e.push(` StringReplacement.replace(new OffsetRange(${n.replaceRange.start}, ${n.replaceRange.endExclusive}), ${yct(n.newText)}),`);e.push(" ];"),e.push(" const userEditSince = StringEdit.create([");for(let n of this.userEditSince.replacements)e.push(` StringReplacement.replace(new OffsetRange(${n.replaceRange.start}, ${n.replaceRange.endExclusive}), ${yct(n.newText)}),`);e.push(" ]);"),e.push(` const currentDocumentContent = ${yct(this.currentDocument)};`),this.editWindow?e.push(` const editWindow = new OffsetRange(${this.editWindow.start}, ${this.editWindow.endExclusive});`):e.push(" const editWindow = undefined;"),e.push(` const currentSelection = [${this.currentSelection.map(n=>`new OffsetRange(${n.start}, ${n.endExclusive})`).join(", ")}];`),this.nesRebaseConfigs.absorbSubsequenceTyping&&e.push(` const nesConfigs = { absorbSubsequenceTyping: ${this.nesRebaseConfigs.absorbSubsequenceTyping} };`),e.push(""),e.push(" const logger = new TestLogService();"),e.push(" expect(userEditSince.apply(originalDocument)).toBe(currentDocumentContent);");let r=this.nesRebaseConfigs.absorbSubsequenceTyping?", nesConfigs":"";return e.push(` expect(tryRebase(originalDocument, editWindow, originalEdits, [], userEditSince, currentDocumentContent, currentSelection, 'strict', logger${r})).toMatchInlineSnapshot();`),e.push("});"),e.join(` -`)}};Ect.RebaseFailureInfo=Lfr;function yct(t){return"`"+t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`"}a(yct,"toBacktickLiteral")});var Gii=T(_ct=>{"use strict";f();Object.defineProperty(_ct,"__esModule",{value:!0});_ct.NextEditCache=void 0;var Qii=fc(),Apa=KN(),ypa=Bfr(),qii=so(),Epa=M4(),Cct=Pfr(),Cpa=Uii(),Ffr=class extends qii.Disposable{static{a(this,"NextEditCache")}constructor(e,r,n,o){super(),this.workspace=e,this._logService=r,this._configService=n,this._expService=o,this._documentCaches=new Map,this._sharedCache=new ypa.LRUCache(50),(0,Epa.mapObservableArrayCached)(this,e.openDocuments,(s,c)=>{let l=new Ufr(this,s.id,s,this._sharedCache,this._logService);this._documentCaches.set(l.docId,l),c.add((0,Apa.autorunWithChanges)(this,{value:s.value},u=>{for(let d of u.value.changes)d.isEmpty()||l.handleEdit(d);if(this._configService.getExperimentBasedConfig(Qii.ConfigKey.Advanced.InlineEditsTriggerOnEditorChangeAfterSeconds,this._expService)!==void 0)for(let[d,p]of this._sharedCache.entries())p.docId!==s.id&&this._sharedCache.deleteKey(d)})),c.add((0,qii.toDisposable)(()=>{this._documentCaches.delete(s.id)}))}).recomputeInitiallyAndOnChange(this._store)}setKthNextEdit(e,r,n,o,s,c,l,u,d){let p=this._documentCaches.get(e);if(p)return p.setKthNextEdit(r,n,o,c,l,s,u,d)}setNoNextEdit(e,r,n,o){let s=this._documentCaches.get(e);s&&s.setNoNextEdit(r,n,o)}_getNesRebaseConfigs(){return{absorbSubsequenceTyping:this._configService.getExperimentBasedConfig(Qii.ConfigKey.TeamInternal.InlineEditsAbsorbSubsequenceTyping,this._expService)}}lookupNextEdit(e,r,n){let o=this._documentCaches.get(e);if(o)return o.lookupNextEdit(r,n,this._getNesRebaseConfigs())}tryRebaseCacheEntry(e,r,n){let o=this._documentCaches.get(e.docId);return o?o.tryRebaseCacheEntry(e,r,n,this._getNesRebaseConfigs()):{edit:void 0}}rejectedNextEdit(e){this._sharedCache.getValues().filter(r=>r.source.headerRequestId===e).forEach(r=>r.rejected=!0)}isRejectedNextEdit(e,r,n){let o=this._documentCaches.get(e);return o?o.isRejectedNextEdit(r,n):!1}evictedCachedEdit(e){let r=this._documentCaches.get(e.docId);r&&r.evictedCachedEdit(e)}clear(){this._documentCaches.forEach(e=>e.clear()),this._sharedCache.clear()}};_ct.NextEditCache=Ffr;var Ufr=class{static{a(this,"DocumentEditCache")}constructor(e,r,n,o,s){this._nextEditCache=e,this.docId=r,this._doc=n,this._sharedCache=o,this._trackedCachedEdits=[],this._logger=s.createSubLogger(["NES","DocumentEditCache"])}handleEdit(e){let r=this._logger.createSubLogger("handleEdit");for(let n of this._trackedCachedEdits)n.userEditSince&&(n.userEditSince=n.userEditSince.compose(e),n.rebaseFailed=!1,(0,Cct.checkEditConsistency)(n.documentBeforeEdit.value,n.userEditSince,this._doc.value.get().value,r)||(n.userEditSince=void 0))}evictedCachedEdit(e){let r=this._trackedCachedEdits.indexOf(e);r!==-1&&this._trackedCachedEdits.splice(r,1)}clear(){this._trackedCachedEdits.length=0}setKthNextEdit(e,r,n,o,s,c,l,u){let d=this._getKey(e.value),p={docId:this.docId,edit:n,edits:o,detailedEdits:[],userEditSince:s,subsequentN:c,source:l,documentBeforeEdit:e,editWindow:r,originalEditWindow:u.originalEditWindow,cacheTime:Date.now(),isFromCursorJump:u.isFromCursorJump};s&&((0,Cct.checkEditConsistency)(p.documentBeforeEdit.value,s,this._doc.value.get().value,this._logger.createSubLogger("setKthNextEdit"))?this._trackedCachedEdits.unshift(p):p.userEditSince=void 0);let h=this._sharedCache.get(d);h&&this.evictedCachedEdit(h);let m=this._sharedCache.put(d,p);return m&&this._nextEditCache.evictedCachedEdit(m[1]),p}setNoNextEdit(e,r,n){let o=this._getKey(e.value),s={docId:this.docId,edit:void 0,edits:[],detailedEdits:[],source:n,documentBeforeEdit:e,editWindow:r,cacheTime:Date.now(),isFromCursorJump:!1},c=this._sharedCache.get(o);c&&this.evictedCachedEdit(c);let l=this._sharedCache.put(o,s);l&&this._nextEditCache.evictedCachedEdit(l[1])}lookupNextEdit(e,r,n){let o=this._getKey(e.value),s=this._sharedCache.get(o);if(s){let c=s.editWindow,l=s.originalEditWindow,u=r[0],d=c?.containsRange(u),p=l?.containsRange(u);return c&&!d&&!p?void 0:s}for(let c of this._trackedCachedEdits){let l=this.tryRebaseCacheEntry(c,e,r,n);if(l.edit)return l.edit}}tryRebaseCacheEntry(e,r,n,o){let s=this._logger.createSubLogger("tryRebaseCacheEntry");if(e.userEditSince&&!e.rebaseFailed){let c=e.edits||(e.edit?[e.edit]:[]),l=e.originalEditWindow?[e.editWindow,e.originalEditWindow]:[e.editWindow];for(let u of l){let d=(0,Cct.tryRebase)(e.documentBeforeEdit.value,u,c,e.detailedEdits,e.userEditSince,r.value,n,"strict",s,o);if(d==="rebaseFailed")return e.rebaseFailed=!0,{edit:void 0,failureInfo:new Cpa.RebaseFailureInfo(e.documentBeforeEdit.value,u,c,e.userEditSince,r.value,n,o)};if(d==="inconsistentEdits"||d==="error")return e.userEditSince=void 0,{edit:void 0};if(d==="outsideEditWindow")continue;if(d.length)return!e.rejected&&this.isRejectedNextEdit(r,d[0].rebasedEdit)&&(e.rejected=!0),{edit:{...e,...d[0]}};if(!c.length)return{edit:e}}}return{edit:void 0}}isRejectedNextEdit(e,r){let n=this._logger.createSubLogger("isRejectedNextEdit"),o=r.removeCommonSuffixAndPrefix(e.value);for(let s of this._trackedCachedEdits.filter(c=>c.rejected)){if(!s.userEditSince)continue;let c=s.edits||(s.edit?[s.edit]:[]);if(!c.length)continue;let l=(0,Cct.tryRebase)(s.documentBeforeEdit.value,void 0,c,s.detailedEdits,s.userEditSince,e.value,[],"lenient",n);if(typeof l=="string")continue;if(l.some(d=>d.rebasedEdit.removeCommonSuffixAndPrefix(e.value).equals(o)))return n.trace("Found rejected edit that matches current edit"),!0}return!1}_getKey(e){return JSON.stringify([this.docId.uri,e])}}});var Hii=T(vct=>{"use strict";f();Object.defineProperty(vct,"__esModule",{value:!0});vct.NextEditResult=void 0;var Qfr=class{static{a(this,"NextEditResult")}constructor(e,r,n){this.requestId=e,this.source=r,this.result=n}};vct.NextEditResult=Qfr});var Xii=T(ub=>{"use strict";f();var _pa=ub&&ub.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},URe=ub&&ub.__param||function(t,e){return function(r,n){e(r,n,t)}},Gfr;Object.defineProperty(ub,"__esModule",{value:!0});ub.NextEditFetchRequest=ub.NextEditProvider=ub.NesOutcome=void 0;var vpa=require("path"),nE=fc(),jde=t2(),GRe=Wat(),QRe=Qy(),bpa=nZe(),nf=ARe(),Tpa=KN(),Hfr=L0(),Spa=rii(),Ipa=Bde(),xpa=cfr(),wpa=gd(),qRe=Ay(),Yh=VT(),jii=Jl(),bct=wc(),Rpa=PQe(),Vfr=es(),qfr=so(),$ii=Gw(),Vii=Ck(),Ppa=sv(),Jii=Np(),Wii=mY(),HRe=aA(),kpa=ZE(),jfr=Fu(),zii=Qv(),Npa=Pfr(),Dpa=Fii(),Mpa=Gii(),Tct=Hii();function Opa(t,e,r){if(!e)return t;let n=e.endExclusive,o=r.getTransformer(),s=o.getPosition(n),c=o.getOffset(s.with(void 0,1)),l=o.getOffset(s.with(void 0,o.getLineLength(s.lineNumber)+1)),u=o.getOffset(o.getPosition(t.start).delta(1)),d=o.getPosition(t.endExclusive).delta(-2),p=o.getOffset(d.column>1?d.with(void 0,o.getLineLength(d.lineNumber)+1):d);return new jfr.OffsetRange(Math.min(u,c),Math.max(p,l))}a(Opa,"computeReducedWindow");function Yii(t,e){return new GRe.RootedLineEdit(e,t).toEdit()}a(Yii,"convertLineEditToEdit");function Kii(t,e){return new Rpa.CachedFunction(n=>{let o=t.find(s=>s.nextEditDoc.id===n);if(!o){for(let s=e.length-1;s>=0;s--){let c=e[s];if(c.docId===n&&c.kind==="edit"){let l=c.edit.getEditedState();return{baseDocState:l,docContents:l,editsSoFar:HRe.StringEdit.empty,nextEdits:[],docId:n}}}throw new Vfr.BugIndicatingError}return{baseDocState:o.documentAfterEdits,docContents:o.documentAfterEdits,editsSoFar:HRe.StringEdit.empty,nextEdits:[],docId:n}})}a(Kii,"createDocStateLookupMap");var jRe;(function(t){t.Accepted="accepted",t.Rejected="rejected",t.Ignored="ignored"})(jRe||(ub.NesOutcome=jRe={}));var $fr=Gfr=class extends qfr.Disposable{static{a(this,"NextEditProvider")}get lastRejectionTime(){return this._lastRejectionTime}get lastTriggerTime(){return this._lastTriggerTime}get lastOutcome(){return this._lastOutcome}constructor(e,r,n,o,s,c,l,u,d,p){super(),this._workspace=e,this._statelessNextEditProvider=r,this._historyContextProvider=n,this._xtabHistoryTracker=o,this._debugRecorder=s,this._configService=c,this._snippyService=l,this._logService=u,this._expService=d,this._requestLogger=p,this.ID=this._statelessNextEditProvider.ID,this._rejectionCollector=this._register(new Dpa.RejectionCollector(this._workspace,this._logService)),this._pendingStatelessNextEditRequest=null,this._speculativePendingRequest=null,this._scheduledSpeculativeRequest=null,this._lastShownTime=0,this._lastShownSuggestionId=void 0,this._lastRejectionTime=0,this._lastTriggerTime=0,this._shouldExpandEditWindow=!1,this._logger=this._logService.createSubLogger(["NES","NextEditProvider"]),this._nextEditCache=new Mpa.NextEditCache(this._workspace,this._logService,this._configService,this._expService),(0,$ii.mapObservableArrayCached)(this,this._workspace.openDocuments,(h,m)=>{m.add((0,$ii.runOnChange)(h.value,g=>{this._cancelPendingRequestDueToDocChange(h.id,g)}))}).recomputeInitiallyAndOnChange(this._store)}_cancelSpeculativeRequest(){this._scheduledSpeculativeRequest=null,this._speculativePendingRequest&&(this._speculativePendingRequest.request.cancellationTokenSource.cancel(),this._speculativePendingRequest=null)}_cancelPendingRequestDueToDocChange(e,r){if(this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsAsyncCompletions,this._expService)||this._pendingStatelessNextEditRequest===null)return;let o=this._pendingStatelessNextEditRequest.getActiveDocument();o.id===e&&o.documentAfterEdits.value!==r.value&&this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel()}async getNextEdit(e,r,n,o,s){let c=Date.now();this._lastTriggerTime=c;let l=new Vii.StopWatch,u=this._logger.createSubLogger(r.requestUuid.substring(4,8)).withExtraTarget(Hfr.LogTarget.fromCallback((h,m)=>{n.trace(`[${Math.floor(l.elapsed()).toString().padStart(4," ")}ms] ${m}`)})),d=this._shouldExpandEditWindow;n.setStatelessNextEditProviderId(this._statelessNextEditProvider.ID);let p;try{p=await this._getNextEditCanThrow(e,r,c,d,u,n,o,s)}catch(h){throw n.setError(h),s.setNextEditProviderError(qRe.ErrorUtils.toString(h)),h}finally{s.markEndTime()}return this._lastNextEditResult=p,p}async _getNextEditCanThrow(e,r,n,o,s,c,l,u){let d=s.createSubLogger("_getNextEdit");d.trace(`invoked with trigger id = ${r.changeHint===void 0?"undefined":`uuid = ${r.changeHint.data.uuid}, reason = ${r.changeHint.data.reason}`}`);let p=this._workspace.getDocument(e);if(!p)throw d.trace(`Document "${e.baseName}" not found`),new Vfr.BugIndicatingError(`Document "${e.baseName}" not found`);let h=p.value.get(),m=p.selection.get(),g=this.determineNesConfigs(u,c),A=this._nextEditCache.lookupNextEdit(e,h,m);if(A?.rejected)return d.trace("cached edit was previously rejected"),u.setStatus("previouslyRejectedCache"),u.setWasPreviouslyRejected(),new Tct.NextEditResult(c.requestId,A.source,void 0);let y,E,_,v,b=e,I=!1,x=!1,R=!1;if(A){d.trace("using cached edit");let Q=A.rebasedEdit||A.edit;Q&&(y={actualEdit:Q,isFromCursorJump:A.isFromCursorJump}),I=!!A.rebasedEdit,x=A.subsequentN!==void 0&&A.subsequentN>0,v=A.source,c.setIsCachedResult(A.source.log),E=h,u.setHeaderRequestId(v.headerRequestId),u.setIsFromCache(),u.setSubsequentEditOrder(A.rebasedEditIndex??A.subsequentN),c.recordingBookmark=v.log.recordingBookmark}else{d.trace(`fetching next edit with shouldExpandEditWindow=${o}`);let Q=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsDebounceUseCoreRequestTime,this._expService)?r.requestIssuedDateTime??void 0:void 0;v=new $Re(r.requestUuid,c,Q,!1),u.setHeaderRequestId(v.headerRequestId);let M=p.value.get();d.trace("awaiting firstEdit promise");let D=await this.fetchNextEdit(v,p,g,o,d,u,l);d.trace("resolved firstEdit promise");let G=`First edit latency: ${Date.now()-this._lastTriggerTime} ms`;if(c.addLog(G),d.trace(G),D.isError())d.trace(`failed to fetch next edit ${D.err.toString()}`),u.setStatus(`noEdit:${D.err.kind}`),_=D.err;else if(b=D.val.docId??b,E=(b?this._workspace.getDocument(b):p).value.get(),b===p.id&&M.value!==E.value)d.trace("document changed while fetching next edit"),u.setStatus("docChanged"),c.setIsSkipped();else{let F=D.val.rebasedEdit||D.val.edit;F?(d.trace("fetch succeeded"),c.setResponseResults([F]),y={actualEdit:F,isFromCursorJump:D.val.isFromCursorJump},R=D.val.isFromSpeculativeRequest??!1):(d.trace("empty edits"),u.setStatus("emptyEdits"))}}if(_ instanceof nf.NoNextEditReason.FetchFailure||_ instanceof nf.NoNextEditReason.Unexpected)throw d.trace(`has throwing error: ${_.error}`),_.error;if(_ instanceof nf.NoNextEditReason.NoSuggestions)if(_.nextCursorPosition===void 0)c.markAsNoSuggestions();else return u.setStatus("emptyEditsButHasNextCursorPosition"),new Tct.NextEditResult(c.requestId,v,{jumpToPosition:_.nextCursorPosition,targetDocumentId:_.nextCursorDocumentId,documentBeforeEdits:h,isFromCursorJump:!1,isSubsequentEdit:!1});let w=new Tct.NextEditResult(c.requestId,v,void 0);if(!y)return d.trace("had no edit"),w;if(l.isCancellationRequested)return d.trace("cancelled"),u.setStatus("noEdit:gotCancelled"),w;if(this._rejectionCollector.isRejected(b,y.actualEdit)||E&&this._nextEditCache.isRejectedNextEdit(b,E,y.actualEdit))return d.trace("edit was previously rejected"),u.setStatus("previouslyRejected"),u.setWasPreviouslyRejected(),w;c.setResult(GRe.RootedLineEdit.fromEdit(new jde.RootedEdit(h,new HRe.StringEdit([y.actualEdit])))),(0,jii.assert)(E!==void 0,"should be defined if edit is defined"),u.setStatus("notAccepted");let P=new Tct.NextEditResult(c.requestId,v,{edit:y.actualEdit,isFromCursorJump:y.isFromCursorJump,documentBeforeEdits:E,targetDocumentId:b,isSubsequentEdit:x});u.setHasNextEdit(!0);let k=this.computeMinimumResponseDelay({triggerTime:n,isRebasedCachedEdit:I,isSubsequentCachedEdit:x,isFromSpeculativeRequest:R,enforceCacheDelay:r.enforceCacheDelay},d);return k>0&&(await(0,bct.timeout)(k),l.isCancellationRequested)?(d.trace("cancelled"),u.setStatus("noEdit:gotCancelled"),w):(d.trace("returning next edit result"),P)}determineNesConfigs(e,r){let n={isAsyncCompletions:this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsAsyncCompletions,this._expService),isEagerBackupRequest:this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsEagerBackupRequest,this._expService)};return e.setNESConfigs({...n}),r.addCodeblockToLog(JSON.stringify(n,null," ")),n}_processDoc(e){let r=e.lastEdit.base.getLines(),n=e.lastEdits,o=GRe.RootedLineEdit.fromEdit(new jde.RootedEdit(e.lastEdit.base,e.lastEdits.compose())).removeCommonSuffixPrefixLines().edit,s=e.lastEdit.base,c=e.lastSelection,l=this._workspace.getWorkspaceRoot(e.docId),u=new nf.StatelessNextEditDocument(e.docId,l,e.languageId,r,o,s,n,c);return{recentEdit:e.lastEdit,nextEditDoc:u,documentAfterEdits:u.documentAfterEdits}}async fetchNextEdit(e,r,n,o,s,c,l){let u=r.id,d=s.createSubLogger("fetchNextEdit"),p=this._historyContextProvider.getHistoryContext(u);if(!p)return Yh.Result.error(new nf.NoNextEditReason.Unexpected(new Error("DocumentMissingInHistoryContext")));let h=r.value.get(),m=r.selection.get(),g=e.log;g.setRecentEdit(p);let A=h.value===this._pendingStatelessNextEditRequest?.documentBeforeEdits.value,y=(A||n.isAsyncCompletions)&&!this._pendingStatelessNextEditRequest?.cancellationTokenSource.token.isCancellationRequested&&this._pendingStatelessNextEditRequest||void 0,E=this._speculativePendingRequest?.docId===u&&this._speculativePendingRequest?.postEditContent===h.value&&!this._speculativePendingRequest.request.cancellationTokenSource.token.isCancellationRequested,_=E?this._speculativePendingRequest?.request:void 0,v=_??y;if(v){_?(d.trace(`reusing speculative pending request (opportunityId=${_.opportunityId}, headerRequestId=${_.headerRequestId})`),this._speculativePendingRequest=null):d.trace(`reusing in-flight pending request (opportunityId=${v.opportunityId}, headerRequestId=${v.headerRequestId})`);let R=_?E:A,w=_?"speculative":"async";if(R){let P=await this._joinNextEditRequest(v,w,c,g,l);return c.setStatelessNextEditTelemetry(P.telemetry),_?(await v.firstEdit.p).map(Q=>({...Q,isFromSpeculativeRequest:!0})):P.nextEdit.isError()?P.nextEdit:v.firstEdit.p}else if(n.isEagerBackupRequest){d.trace("starting eager backup request in parallel with rebase attempt"),this._pendingStatelessNextEditRequest=null;let P=this._executeNewNextEditRequest(e,r,p,n,o,d,c,l),k=a(()=>{P.then(G=>G.nextEditRequest.cancellationTokenSource.cancel()).catch(()=>{})},"cancelBackupRequest"),Q=await this._joinNextEditRequest(v,w,c,g,l),M=await v.firstEdit.p;if(M.isOk()&&M.val.edit){let G=this._nextEditCache.tryRebaseCacheEntry(M.val,h,m);if(G.edit)return d.trace("rebase succeeded, cancelling eager backup request"),k(),c.setStatelessNextEditTelemetry(Q.telemetry),Yh.Result.ok(G.edit);this._logRebaseFailure(G.failureInfo,g)}if(l.isCancellationRequested)return d.trace("cancelled after rebase failed (eager backup path)"),k(),c.setStatelessNextEditTelemetry(Q.telemetry),Yh.Result.error(new nf.NoNextEditReason.GotCancelled("afterFailedRebase"));d.trace("rebase failed, using eager backup request");let D=await P;return c.setStatelessNextEditTelemetry(D.nextEditResult.telemetry),D.nextEditResult.nextEdit.isError()?D.nextEditResult.nextEdit:D.nextEditRequest.firstEdit.p}else{let P=await this._joinNextEditRequest(v,w,c,g,l),k=await v.firstEdit.p;if(k.isOk()&&k.val.edit){let D=this._nextEditCache.tryRebaseCacheEntry(k.val,h,m);if(D.edit)return c.setStatelessNextEditTelemetry(P.telemetry),Yh.Result.ok(D.edit);this._logRebaseFailure(D.failureInfo,g)}if(l.isCancellationRequested)return d.trace("document changed after rebase failed"),c.setStatelessNextEditTelemetry(P.telemetry),Yh.Result.error(new nf.NoNextEditReason.GotCancelled("afterFailedRebase"));let M=h.value===this._pendingStatelessNextEditRequest?.documentBeforeEdits.value&&!this._pendingStatelessNextEditRequest?.cancellationTokenSource.token.isCancellationRequested&&this._pendingStatelessNextEditRequest||void 0;if(M){d.trace("reusing 2nd existing next edit request after rebase failed");let D=await this._joinNextEditRequest(M,"async",c,g,l);return c.setStatelessNextEditTelemetry(D.telemetry),D.nextEdit.isError()?D.nextEdit:M.firstEdit.p}d.trace("creating new next edit request after rebase failed")}}let b=await this._executeNewNextEditRequest(e,r,p,n,o,d,c,l),I=b.nextEditRequest,x=b.nextEditResult;return c.setStatelessNextEditTelemetry(x.telemetry),x.nextEdit.isError()?x.nextEdit:I.firstEdit.p}async _joinNextEditRequest(e,r,n,o,s){n.setHeaderRequestId(e.headerRequestId),n.setReusedRequest(r),n.setRequest(e),o.setRequestInput(e),o.setIsCachedResult(e.logContext);let c=this._hookupCancellation(e,s);try{return await e.result}finally{c.dispose()}}_logRebaseFailure(e,r){e&&r.setRebaseFailure(e)}async _executeNewNextEditRequest(e,r,n,o,s,c,l,u){let d=r.id,p=c.createSubLogger("_executeNewNextEditRequest"),h=this._debugRecorder?.getRecentLog(),m=e.log,g=Bpa(n.getDocumentAndIdx(d)),A=r.selection.get()[0],y=n.documents.map(D=>this._processDoc(D)),E=this._xtabHistoryTracker.getHistory(),_=new bct.DeferredPromise,v=s?this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService):void 0,b=new nf.StatelessNextEditRequest(e.headerRequestId,e.opportunityId,r.value.get(),y.map(D=>D.nextEditDoc),g.idx,E,_,v,!1,m,e.log.recordingBookmark,h,e.providerRequestStartDateTime),I;this._pendingStatelessNextEditRequest&&(this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel(),this._pendingStatelessNextEditRequest=null,this._scheduledSpeculativeRequest=null),this._speculativePendingRequest&&(this._speculativePendingRequest.docId!==d||this._speculativePendingRequest.postEditContent!==b.documentBeforeEdits.value)&&this._cancelSpeculativeRequest(),this._pendingStatelessNextEditRequest=b;let x=a(()=>{this._pendingStatelessNextEditRequest===b&&(this._pendingStatelessNextEditRequest=null)},"removeFromPending");l.setRequest(b),l.setStatus("requested"),m.setRequestInput(b);let R=this._hookupCancellation(b,u,o.isAsyncCompletions?(0,Tpa.autorunWithChanges)(this,{value:r.value},D=>{D.value.changes.forEach(G=>{b.intermediateUserEdit&&!G.isEmpty()&&(b.intermediateUserEdit=b.intermediateUserEdit.compose(G),(0,Npa.checkEditConsistency)(b.documentBeforeEdits.value,b.intermediateUserEdit,D.value.value.value,p)||(b.intermediateUserEdit=void 0))})}):void 0),w=Kii(y,E),P=this._statelessNextEditProvider.provideNextEdit(b,p,m,b.cancellationTokenSource.token),k=-1,Q=a((D,G)=>{++k;let O=p.createSubLogger("processEdit");O.trace(`processing edit #${k} (starts at 0)`),O.trace("resetting shouldExpandEditWindow to false due to receiving an edit"),this._shouldExpandEditWindow=!1;let N=w.get(D.targetDocument??d),F=D.edit,U=new Wii.LineEdit([F]),H=Yii(U,N.baseDocState).tryRebase(N.editsSoFar);if(H===void 0){O.trace(`edit ${k} is undefined after rebasing`),_.isSettled||_.complete(Yh.Result.error(new nf.NoNextEditReason.Uncategorized(new Error("Rebased edit is undefined"))));return}N.editsSoFar=N.editsSoFar.compose(H);let $;if(H.replacements.length===0)O.trace(`WARNING: ${k} has no edits`);else if(H.replacements.length>1)O.trace(`WARNING: ${k} has ${H.replacements.length} edits, but expected only 1`);else{let W=H.replacements[0];N.nextEdits.push(W),$=this._nextEditCache.setKthNextEdit(N.docId,N.docContents,k===0?D.window:void 0,W,k,k===0?N.nextEdits:void 0,k===0?b.intermediateUserEdit:void 0,e,{isFromCursorJump:D.isFromCursorJump,originalEditWindow:D.originalWindow}),O.trace(`populated cache for ${k}`)}return _.isSettled||(O.trace("resolving firstEdit promise"),m.setResult(new GRe.RootedLineEdit(N.docContents,U)),_.complete($?Yh.Result.ok($):Yh.Result.error(new nf.NoNextEditReason.Unexpected(new Error("No cached edit"))))),N.docContents=H.applyOnText(N.docContents),$},"processEdit"),M=a((D,G)=>{let O=p.createSubLogger("streamEnd");if(k===-1&&D instanceof nf.NoNextEditReason.NoSuggestions&&(O.trace("resetting shouldExpandEditWindow to false due to NoSuggestions"),this._shouldExpandEditWindow=!1),w.get(d).nextEdits.length)O.trace(`${w.get(d).nextEdits.length} edits returned`);else if(O.trace(`no edit, reason: ${D.kind}`),D instanceof nf.NoNextEditReason.NoSuggestions){let{documentBeforeEdits:L,window:H}=D,$=H?Opa(H,A,L):void 0;this._nextEditCache.setNoNextEdit(d,L,$,e)}_.isSettled||_.complete(Yh.Result.error(D));let F=w.get(d).nextEdits.length>0?Yh.Result.ok(void 0):Yh.Result.error(D),U=new nf.StatelessNextEditResult(F,G);if(b.setResult(U),R.dispose(),x(),this._scheduledSpeculativeRequest?.headerRequestId===b.headerRequestId){let L=this._scheduledSpeculativeRequest;this._scheduledSpeculativeRequest=null,this._triggerSpeculativeRequest(L.suggestion)}return U},"handleStreamEnd");try{let D=await P.next();if(D.done){let G=D.value.v;I=M(G,D.value.telemetryBuilder)}else{let G=D.value.v,O=D.value.telemetryBuilder;Q(G,O),(async()=>{try{for(D=await P.next();!D.done;){let F=D.value.v;Q(F,D.value.telemetryBuilder),this._scheduledSpeculativeRequest?.headerRequestId===b.headerRequestId&&(this._scheduledSpeculativeRequest=null),D=await P.next()}let N=D.value.v;M(N,D.value.telemetryBuilder)}catch(N){p.trace(`Error while streaming further edits: ${qRe.ErrorUtils.toString(N)}`);let F=new nf.NoNextEditReason.Unexpected(qRe.ErrorUtils.fromUnknown(N));M(F,O)}})(),I=new nf.StatelessNextEditResult(Yh.Result.ok(void 0),O)}}catch(D){throw b.setResultError(D),D}return{nextEditRequest:b,nextEditResult:I}}_hookupCancellation(e,r,n){let o=new qfr.DisposableStore,s=!1,c=a(()=>{s||(s=!0,e.liveDependentants--)},"removeDependant"),l=o.add(new bct.TimeoutTimer);return o.add(r.onCancellationRequested(()=>{if(c(),!(e.liveDependentants>0)){if(!e.fetchIssued){e.cancellationTokenSource.cancel(),n?.dispose();return}l.setIfNotSet(()=>{e.liveDependentants>0||(e.cancellationTokenSource.cancel(),n?.dispose())},1e3)}})),o.add((0,qfr.toDisposable)(()=>{c(),e.liveDependentants===0&&n?.dispose()})),e.liveDependentants++,o}computeMinimumResponseDelay({triggerTime:e,isRebasedCachedEdit:r,isSubsequentCachedEdit:n,isFromSpeculativeRequest:o,enforceCacheDelay:s},c){if(!s)return c.trace("[minimumDelay] no minimum delay enforced due to enforceCacheDelay being false"),0;let l=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsCacheDelay,this._expService),u=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsRebasedCacheDelay,this._expService),d=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsSubsequentCacheDelay,this._expService),p=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestDelay,this._expService),h=l;r&&u!==void 0?h=u:n&&d!==void 0?h=d:o&&p!==void 0&&(h=p);let m=Date.now()-e,g=Math.max(0,h-m);return c.trace(`[minimumDelay] expected delay: ${h}ms, effective delay: ${g}. isRebasedCachedEdit: ${r} (rebasedCacheDelay: ${u}), isSubsequentCachedEdit: ${n} (subsequentCacheDelay: ${d}), isFromSpeculativeRequest: ${o} (speculativeRequestDelay: ${p})`),g}handleShown(e){if(this._lastShownTime=Date.now(),this._lastShownSuggestionId=e.requestId,this._lastOutcome=void 0,this._scheduledSpeculativeRequest=null,this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsSpeculativeRequests,this._expService)===QRe.SpeculativeRequestsEnablement.On){let n=this._pendingStatelessNextEditRequest;n&&n.headerRequestId===e.source.headerRequestId?this._scheduledSpeculativeRequest={suggestion:e,headerRequestId:n.headerRequestId}:this._triggerSpeculativeRequest(e)}}async _triggerSpeculativeRequest(e){let r=e.result;if(!r?.edit)return;let n=r.targetDocumentId;if(!n)return;let o=new bpa.InlineEditRequestLogContext(n.uri,0,void 0),s=new Vii.StopWatch,c=this._logger.createSubLogger("_triggerSpeculativeRequest").withExtraTarget(Hfr.LogTarget.fromCallback((b,I)=>{o.trace(`[${Math.floor(s.elapsed()).toString().padStart(4," ")}ms] ${I}`)})),l=r.edit.replace(r.documentBeforeEdits.value),u=r.edit.removeCommonSuffixPrefix(r.documentBeforeEdits.value),d=u.replaceRange.start+u.newText.length,p=new jfr.OffsetRange(d,d),h=[p],m=new jde.RootedEdit(r.documentBeforeEdits,new HRe.StringEdit([r.edit])),g=new zii.StringText(l),A=this._nextEditCache.lookupNextEdit(n,g,h),y=p;if(A)if(A.edit){c.trace("already have cached edit for post-edit state");return}else if(A.editWindow){c.trace("have cached no-suggestions entry for post-edit state, but it has an edit window. Checking if shifting selection based on cursor placement config can yield a cached edit");let b=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestsCursorPlacement,this._expService);if(b===QRe.SpeculativeRequestsCursorPlacement.AfterEditWindow)if(c.trace("cursor placement config is AfterEditWindow, shifting selection to after edit window"),y=Gfr.shiftSelectionAfterEditWindow(g,A.editWindow),A=this._nextEditCache.lookupNextEdit(n,g,[y]),A?.edit){c.trace("already have cached edit for post-edit state (after shifting selection)");return}else c.trace("no cached edit even after shifting selection");else c.trace(`cursor placement config is ${b}, not shifting selection`)}else{c.trace("already have cached no-suggestions entry for post-edit state");return}if(this._pendingStatelessNextEditRequest?.documentBeforeEdits.value===l){c.trace("already have pending request for post-edit state");return}if(this._speculativePendingRequest?.docId===n&&this._speculativePendingRequest?.postEditContent===l){c.trace("already have speculative request for post-edit state");return}let E=this._workspace.getDocument(n);if(!E){c.trace("document not found for speculative request");return}this._cancelSpeculativeRequest();let _=this._historyContextProvider.getHistoryContext(n);if(!_){c.trace("no history context for speculative request");return}let v=new $Re(`sp-${e.source.opportunityId}`,o,void 0,!0,`sp-${(0,Jii.generateUuid)()}`);c.trace(`triggering speculative request for post-edit state (opportunityId=${v.opportunityId}, headerRequestId=${v.headerRequestId})`);try{let b=await this._createSpeculativeRequest(v,E,y,_,l,m,r.edit,{triggeredBySpeculativeRequest:e.source.isSpeculative,isSubsequentEdit:e.result?.isSubsequentEdit??!1},c);b&&(this._speculativePendingRequest={request:b,docId:n,postEditContent:l})}catch(b){c.trace(`speculative request failed: ${qRe.ErrorUtils.toString(b)}`)}}async _createSpeculativeRequest(e,r,n,o,s,c,l,{triggeredBySpeculativeRequest:u,isSubsequentEdit:d},p){let h=r.id,m=this._debugRecorder?.getRecentLog(),g=e.log;g.setStatelessNextEditProviderId(this._statelessNextEditProvider.ID);let A=p.createSubLogger("_createSpeculativeRequest"),y=o.getDocumentAndIdx(h);if(!y){A.trace("active doc not found in history context");return}let E=new zii.StringText(s),_=o.documents.map(Q=>{if(Q.docId!==h)return this._processDoc(Q);{let M=this._workspace.getWorkspaceRoot(h),D=new HRe.StringEdit([l]),G=GRe.RootedLineEdit.fromEdit(new jde.RootedEdit(r.value.get(),D)).removeCommonSuffixPrefixLines().edit,O=new nf.StatelessNextEditDocument(h,M,Q.languageId,r.value.get().getLines(),G,r.value.get(),jde.Edits.single(D),n);return{recentEdit:new jde.RootedEdit(r.value.get(),D),nextEditDoc:O,documentAfterEdits:E}}}),v=this._xtabHistoryTracker.getHistory(),b={kind:"edit",docId:h,edit:c};v.push(b);let I=new bct.DeferredPromise,x=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestsAutoExpandEditWindowLines,this._expService),R;switch(x){case QRe.SpeculativeRequestsAutoExpandEditWindowLines.Off:R=void 0;break;case QRe.SpeculativeRequestsAutoExpandEditWindowLines.Always:R=this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService);break;case QRe.SpeculativeRequestsAutoExpandEditWindowLines.Smart:{R=u||d?this._configService.getExperimentBasedConfig(nE.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService):void 0;break}default:(0,jii.assertNever)(x)}let w=new nf.StatelessNextEditRequest(e.headerRequestId,e.opportunityId,E,_.map(Q=>Q.nextEditDoc),y.idx,v,I,R,!0,g,void 0,m,void 0);g.setRequestInput(w),A.trace("starting speculative provider call");let P=`NES | spec | ${(0,vpa.basename)(r.id.toUri().fsPath)} (v${r.version.get()})`,k=new Spa.CapturingToken(P,void 0);return this._requestLogger.captureInvocation(k,async()=>{try{await this._runSpeculativeProviderCall(w,_,h,e,A)}finally{this._addLogContextEntry(g,P)}}),w}async _runSpeculativeProviderCall(e,r,n,o,s){let c=s.createSubLogger("_runSpeculativeProviderCall"),l=e.xtabEditHistory,u=Kii(r,l),d=o.log,p=this._statelessNextEditProvider.provideNextEdit(e,c,d,e.cancellationTokenSource.token),h=-1;try{let m=await p.next();m.done?(e.firstEdit.complete(Yh.Result.error(m.value.v)),e.setResult(new nf.StatelessNextEditResult(Yh.Result.error(m.value.v),m.value.telemetryBuilder)),c.trace("speculative request completed with no edits")):(async()=>{for(;!m.done;){++h;let g=m.value.v,A=u.get(g.targetDocument??n),y=g.edit,E=new Wii.LineEdit([y]),v=Yii(E,A.baseDocState).tryRebase(A.editsSoFar);if(v===void 0){c.trace(`speculative edit ${h} rebasing failed`),m=await p.next();continue}if(A.editsSoFar=A.editsSoFar.compose(v),v.replacements.length===1){let b=v.replacements[0];A.nextEdits.push(b);let I=this._nextEditCache.setKthNextEdit(A.docId,A.docContents,h===0?g.window:void 0,b,h,h===0?A.nextEdits:void 0,void 0,o,{isFromCursorJump:g.isFromCursorJump,originalEditWindow:g.originalWindow});!e.firstEdit.isSettled&&I&&(e.firstEdit.complete(Yh.Result.ok(I)),e.setResult(new nf.StatelessNextEditResult(Yh.Result.ok(void 0),m.value.telemetryBuilder))),c.trace(`cached speculative edit ${h}`)}A.docContents=v.applyOnText(A.docContents),m=await p.next()}})().finally(()=>{e.firstEdit.isSettled||(e.firstEdit.complete(Yh.Result.error(new nf.NoNextEditReason.Uncategorized(new Error("Speculative request ended without edits")))),e.setResult(new nf.StatelessNextEditResult(Yh.Result.error(new nf.NoNextEditReason.Uncategorized(new Error("Speculative request ended without edits"))),m.value.telemetryBuilder)))}),c.trace(`speculative request completed with ${h+1} edits`)}catch(m){c.trace(`speculative provider call error: ${qRe.ErrorUtils.toString(m)}`)}}static shiftSelectionAfterEditWindow(e,r){let n=e.getTransformer(),o=n.getPosition(r.endExclusive-1),s=o.lineNumber+11e3&&r.result.edit&&(this._rejectionCollector.reject(e,r.result.edit),this._nextEditCache.rejectedNextEdit(r.source.headerRequestId)),this._lastRejectionTime=Date.now(),this._lastOutcome=jRe.Rejected,this._statelessNextEditProvider.handleRejection?.()}handleIgnored(e,r,n){this._lastOutcome=jRe.Ignored,this._lastShownSuggestionId===r.requestId&&!(n!==void 0)&&(this._cancelSpeculativeRequest(),this._statelessNextEditProvider.handleIgnored?.())}async runSnippy(e,r){r.result===void 0||r.result.edit===void 0||this._snippyService.handlePostInsertion(e.toUri(),r.result.documentBeforeEdits,r.result.edit)}_addLogContextEntry(e,r){e.includeInLogTree&&this._requestLogger.addEntry({type:"MarkdownContentRequest",debugName:r??e.getDebugName(),icon:e.getIcon(),startTimeMs:e.time,markdownContent:e.toLogDocument()})}clearCache(){this._nextEditCache.clear(),this._rejectionCollector.clear()}};ub.NextEditProvider=$fr;ub.NextEditProvider=$fr=Gfr=_pa([URe(5,nE.IConfigurationService),URe(6,xpa.ISnippyService),URe(7,Hfr.ILogService),URe(8,wpa.IExperimentationService),URe(9,Ipa.IRequestLogger)],$fr);function Bpa(t){if(!t)throw new Vfr.BugIndicatingError("expected value to be defined, but it was not");return t}a(Bpa,"assertDefined");var $Re=class{static{a(this,"NextEditFetchRequest")}constructor(e,r,n,o,s=(0,Jii.generateUuid)()){this.opportunityId=e,this.log=r,this.providerRequestStartDateTime=n,this.isSpeculative=o,this.headerRequestId=s}};ub.NextEditFetchRequest=$Re});var aoi=T(Gf=>{"use strict";f();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.GLOB_SPLIT=Gf.GLOBSTAR=void 0;Gf.getEmptyExpression=qpa;Gf.splitGlobAware=Yfr;Gf.isEmptyPattern=Ypa;Gf.match=eha;Gf.parse=ioi;Gf.isRelativePattern=ooi;Gf.getBasenameTerms=tha;Gf.getPathTerms=rha;Gf.patternsEquals=oha;var Lpa=jc(),zfr=wc(),Fpa=aNt(),Upa=iw(),xQ=Im(),Qpa=PF(),VRe=C0();function qpa(){return Object.create(null)}a(qpa,"getEmptyExpression");Gf.GLOBSTAR="**";Gf.GLOB_SPLIT="/";var Sct="[/\\\\]",Ict="[^/\\\\]",Gpa=/\//g;function Zii(t,e){switch(t){case 0:return"";case 1:return`${Ict}*?`;default:return`(?:${Sct}|${Ict}+${Sct}${e?`|${Sct}${Ict}+`:""})*?`}}a(Zii,"starsToRegExp");function Yfr(t,e){if(!t)return[];let r=[],n=!1,o=!1,s="";for(let c of t){switch(c){case e:if(!n&&!o){r.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=c}return s&&r.push(s),r}a(Yfr,"splitGlobAware");function noi(t){if(!t)return"";let e="",r=Yfr(t,Gf.GLOB_SPLIT);if(r.every(n=>n===Gf.GLOBSTAR))e=".*";else{let n=!1;r.forEach((o,s)=>{if(o===Gf.GLOBSTAR){if(n)return;e+=Zii(2,s===r.length-1)}else{let c=!1,l="",u=!1,d="";for(let p of o){if(p!=="}"&&c){l+=p;continue}if(u&&(p!=="]"||!d)){let h;p==="-"?h=p:(p==="^"||p==="!")&&!d?h="^":p===Gf.GLOB_SPLIT?h="":h=(0,VRe.escapeRegExpCharacters)(p),d+=h;continue}switch(p){case"{":c=!0;continue;case"[":u=!0;continue;case"}":{let m=`(?:${Yfr(l,",").map(g=>noi(g)).join("|")})`;e+=m,c=!1,l="";break}case"]":{e+="["+d+"]",u=!1,d="";break}case"?":e+=Ict;continue;case"*":e+=Zii(1);continue;default:e+=(0,VRe.escapeRegExpCharacters)(p)}}su===d,endsWith:n?VRe.endsWithIgnoreCase:(u,d)=>u.endsWith(d),isEqualOrParent:a((u,d)=>(0,Fpa.isEqualOrParent)(u,d,!Qpa.isLinux||n),"isEqualOrParent")},s=`${n?r.toLowerCase():r}_${!!e.trimForExclusions}_${n}`,c=eoi.get(s);if(c)return toi(c,t,o);let l;return Hpa.test(r)?c=Kpa(r.substring(4),r,o):(l=jpa.exec(Wfr(r,o)))?c=Jpa(l[1],r,o):(e.trimForExclusions?Vpa:$pa).test(r)?c=Xpa(r,o):(l=Wpa.exec(Wfr(r,o)))?c=roi(l[1].substring(1),r,!0,o):(l=zpa.exec(Wfr(r,o)))?c=roi(l[1],r,!1,o):c=Zpa(r,o),eoi.set(s,c),toi(c,t,o)}a(Jfr,"parsePattern");function toi(t,e,r){if(typeof e=="string")return t;let n=a(function(o,s){return r.isEqualOrParent(o,e.base)?t((0,VRe.ltrim)(o.substring(e.base.length),xQ.sep),s):null},"wrappedPattern");return n.allBasenames=t.allBasenames,n.allPaths=t.allPaths,n.basenames=t.basenames,n.patterns=t.patterns,n}a(toi,"wrapRelativePattern");function Wfr(t,e){return e.trimForExclusions&&t.endsWith("/**")?t.substring(0,t.length-2):t}a(Wfr,"trimForExclusions");function Kpa(t,e,r){return function(n,o){return typeof n=="string"&&r.endsWith(n,t)?e:null}}a(Kpa,"trivia1");function Jpa(t,e,r){let n=`/${t}`,o=`\\${t}`,s=a(function(l,u){return typeof l!="string"?null:u?r.equals(u,t)?e:null:r.equals(l,t)||r.endsWith(l,n)||r.endsWith(l,o)?e:null},"parsedPattern"),c=[t];return s.basenames=c,s.patterns=[e],s.allBasenames=c,s}a(Jpa,"trivia2");function Xpa(t,e){let r=soi(t.slice(1,-1).split(",").map(l=>Jfr(l,e)).filter(l=>l!==i2),t),n=r.length;if(!n)return i2;if(n===1)return r[0];let o=a(function(l,u){for(let d=0,p=r.length;d!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(Xpa,"trivia3");function roi(t,e,r,n){let o=xQ.sep===xQ.posix.sep,s=o?t:t.replace(Gpa,xQ.sep),c=xQ.sep+s,l=xQ.posix.sep+t,u;return r?u=a(function(d,p){return typeof d=="string"&&(n.equals(d,s)||n.endsWith(d,c)||!o&&(n.equals(d,t)||n.endsWith(d,l)))?e:null},"parsedPattern"):u=a(function(d,p){return typeof d=="string"&&(n.equals(d,s)||!o&&n.equals(d,t))?e:null},"parsedPattern"),u.allPaths=[(r?"*/":"./")+t],u}a(roi,"trivia4and5");function Zpa(t,e){try{let r=new RegExp(`^${noi(t)}$`,e.ignoreCase?"i":void 0);return function(n){return r.lastIndex=0,typeof n=="string"&&r.test(n)?t:null}}catch{return i2}}a(Zpa,"toRegExp");function eha(t,e,r){return!t||typeof e!="string"?!1:ioi(t,r)(e)}a(eha,"match");function ioi(t,e={}){if(!t)return Kfr;if(typeof t=="string"||ooi(t)){let r=Jfr(t,e);if(r===i2)return Kfr;let n=a(function(o,s){return!!r(o,s)},"resultPattern");return r.allBasenames&&(n.allBasenames=r.allBasenames),r.allPaths&&(n.allPaths=r.allPaths),n}return nha(t,e)}a(ioi,"parse");function ooi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(ooi,"isRelativePattern");function tha(t){return t.allBasenames||[]}a(tha,"getBasenameTerms");function rha(t){return t.allPaths||[]}a(rha,"getPathTerms");function nha(t,e){let r=soi(Object.getOwnPropertyNames(t).map(l=>iha(l,t[l],e)).filter(l=>l!==i2)),n=r.length;if(!n)return i2;if(!r.some(l=>!!l.requiresSiblings)){if(n===1)return r[0];let l=a(function(p,h){let m;for(let g=0,A=r.length;g{for(let g of m){let A=await g;if(typeof A=="string")return A}return null})():null},"resultExpression"),u=r.find(p=>!!p.allBasenames);u&&(l.allBasenames=u.allBasenames);let d=r.reduce((p,h)=>h.allPaths?p.concat(h.allPaths):p,[]);return d.length&&(l.allPaths=d),l}let o=a(function(l,u,d){let p,h;for(let m=0,g=r.length;m{for(let m of h){let g=await m;if(typeof g=="string")return g}return null})():null},"resultExpression"),s=r.find(l=>!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(nha,"parsedExpression");function iha(t,e,r){if(e===!1)return i2;let n=Jfr(t,r);if(n===i2)return i2;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let s=a((c,l,u,d)=>{if(!d||!n(c,l))return null;let p=o.replace("$(basename)",()=>u),h=d(p);return(0,zfr.isThenable)(h)?h.then(m=>m?t:null):h?t:null},"result");return s.requiresSiblings=!0,s}}return n}a(iha,"parseExpressionPattern");function soi(t,e){let r=t.filter(l=>!!l.basenames);if(r.length<2)return t;let n=r.reduce((l,u)=>{let d=u.basenames;return d?l.concat(d):l},[]),o;if(e){o=[];for(let l=0,u=n.length;l{let d=u.patterns;return d?l.concat(d):l},[]);let s=a(function(l,u){if(typeof l!="string")return null;if(!u){let p;for(p=l.length;p>0;p--){let h=l.charCodeAt(p-1);if(h===47||h===92)break}u=l.substring(p)}let d=n.indexOf(u);return d!==-1?o[d]:null},"aggregate");s.basenames=n,s.patterns=o,s.allBasenames=n;let c=t.filter(l=>!l.basenames);return c.push(s),c}a(soi,"aggregateBasenameMatches");function oha(t,e){return(0,Lpa.equals)(t,e,(r,n)=>typeof r=="string"&&typeof n=="string"?r===n:typeof r!="string"&&typeof n!="string"?r.base===n.base&&r.pattern===n.pattern:!1)}a(oha,"patternsEquals")});var wct=T(Dc=>{"use strict";f();var sha=Dc&&Dc.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aha=Dc&&Dc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cha=Dc&&Dc.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o(0,coi.isEqual)(r.uri,t)||r.uri.path===t.path||Zfr(t,r))}a(Xfr,"findNotebook");function Zfr(t,e){if(t.scheme===WRe.Schemas.vscodeNotebookCell||t.scheme===WRe.Schemas.vscodeNotebookCellOutput){let r=e.getCells().findIndex(n=>(0,coi.isEqual)(n.document.uri,t)||n.document.uri.fragment===t.fragment&&n.document.uri.path===t.path);if(r!==-1)return e.getCells()[r]}}a(Zfr,"findCell");function lha(t,e){if(t.scheme!==WRe.Schemas.vscodeNotebookCellOutput)return;let r=new URLSearchParams(t.query),[n,o]=loi(t,e);if(!o||!o.outputs.length)return;let s=(r.get("outputIndex")?parseInt(r.get("outputIndex")||"",10):void 0)||0;if(!(s>o.outputs.length-1))return[n,o,o.outputs[s]]}a(lha,"getNotebookCellOutput");function loi(t,e){let r=Xfr(t,e)||e.find(o=>o.uri.path===t.path);if(!r)return[void 0,void 0];let n=Zfr(t,r);return n===void 0?[r,void 0]:[r,n]}a(loi,"getNotebookAndCellFromUri");function uha(t){return t.scheme===WRe.Schemas.vscodeNotebookCell||t.scheme==="untitled"&&t.fragment.startsWith("notebook-chat-input")}a(uha,"isNotebookCellOrNotebookChatInput");function dha(t){return t.scheme===WRe.Schemas.vscodeNotebookCell}a(dha,"isNotebookCell");function fha(t){return t.path.endsWith(".ipynb")}a(fha,"isJupyterNotebookUri");function pha(t){return t.notebookType==="jupyter-notebook"}a(pha,"isJupyterNotebook");function hha(t,e={}){return JSON.stringify({cells:t.getCells().map(r=>({uri_fragment:e.cell_uri_fragment?r.document.uri.fragment:void 0,cell_type:r.kind,source:r.document.getText().split(/\r?\n/)}))})}a(hha,"serializeNotebookDocument");function mha(t){try{let e=t.replace(/\n/g,""),n=/```(?:json)?(.+)/g.exec(e);if(n){let o=n[1],s=o.indexOf("```"),c=s===-1?o:o.substring(0,s);return JSON.parse(c)}}catch{}}a(mha,"extractNotebookOutline");function uoi(t){let e=t;return typeof e=="object"&&e!==null&&(typeof e.include=="string"||foi(e.include))}a(uoi,"isDocumentExcludePattern");function doi(t){let e=t;return typeof e=="object"&&e!==null&&typeof e.filenamePattern=="string"}a(doi,"isFilenamePattern");function foi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(foi,"isRelativePattern");function gha(t){let e=t;return!!e&&!!e.type&&!!e.displayName&&!!e.selector}a(gha,"isNotebookEditorContribution");function Aha(t){let e=[];for(let[r,n]of Object.entries(t))n&&e.push({filenamePattern:r,viewType:n});return e}a(Aha,"extractEditorAssociation");function poi(t,e){if(typeof e=="string"&&$de.match(e.toLowerCase(),(0,Vde.basename)(t.fsPath).toLowerCase()))return!0;if(uoi(e)){let r=e.include,n=e.exclude;if(!r)return!1;if($de.match(r,(0,Vde.basename)(t.fsPath).toLowerCase()))return!(n&&$de.match(n,(0,Vde.basename)(t.fsPath).toLowerCase()))}return doi(e)&&$de.match(e.filenamePattern,(0,Vde.basename)(t.fsPath).toLowerCase())?!(e.excludeFileNamePattern&&$de.match(e.excludeFileNamePattern,(0,Vde.basename)(t.fsPath).toLowerCase())):!1}a(poi,"notebookSelectorMatches");function hoi(t,e){let r=[];for(let n of e)n.filenamePattern&&$de.match(n.filenamePattern.toLowerCase(),(0,Vde.basename)(t.fsPath).toLowerCase())&&r.push({filenamePattern:n.filenamePattern,viewType:n.viewType});return r}a(hoi,"getNotebookEditorAssociations");function yha(t,e,r,n){if(Xfr(t,e))return!0;let o=r.filter(c=>c.selector.some(l=>poi(t,l)));if(o.length===0)return!1;let s=hoi(t,n);for(let c of s)if(o.some(l=>l.type===c.viewType))return!0;return!!o.some(c=>(c.priority??xct.default)===xct.default)}a(yha,"_hasSupportedNotebooks")});var Eoi=T(iE=>{"use strict";f();var Eha=iE&&iE.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Cha=iE&&iE.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(iE,"__esModule",{value:!0});iE.TelemetrySender=iE.NextEditProviderTelemetryBuilder=iE.DiagnosticsTelemetryBuilder=iE.LlmNESTelemetryBuilder=void 0;var moi=XD(),_ha=KN(),yoi=Rp(),vha=wct(),bha=wc(),Rct=so(),Tha=T$(),goi=M4(),Aoi=Lp(),Pct=class extends Rct.Disposable{static{a(this,"LlmNESTelemetryBuilder")}build(e){let r,n,o,s,c,l=!1,u,d,p;if(this._request){let g=this._request.getActiveDocument();r=this._request.documents.length,n=this._request.documents.reduce((y,E)=>y+E.recentEdits.edits.length,0),o=g.recentEdits.edits.length,s=g.languageId,c=g.documentAfterEditsLines.length,l=g.id.toUri().scheme===Tha.Schemas.vscodeNotebookCell||this._notebookService?.hasSupportedNotebooks(g.id.toUri())||!1,u=this._workspaceService===void 0?void 0:(0,vha.findNotebook)(g.id.toUri(),this._workspaceService.notebookDocuments)?.notebookType;let A=this._gitExtensionService?.getExtensionApi();if(A){let y=A.getRepository(Aoi.Uri.parse(g.id.uri));if(y){let v=y.state.HEAD?.upstream?.remote,b=y.state.remotes.find(I=>I.name===v);b?.fetchUrl&&(d=b.pushUrl||b.fetchUrl)}let E=new Set,_=[...new Set(this._request.documents.map(v=>A.getRepository(Aoi.Uri.parse(v.id.uri))).filter(Boolean))];for(let v of _){let b=v?.state.HEAD?.upstream?.remote,I=v?.state.remotes.find(x=>x.name===b);I?.fetchUrl&&E.add(I.fetchUrl),I?.pushUrl&&E.add(I.pushUrl)}p=[...E]}}let h;if(e&&this.editCollectingInfo!==void 0){let g=this.editCollectingInfo.originalDoc.value,A;if(this._debugRecorder&&this._requestBookmark){let y=this._debugRecorder.getRecentLog(),E=JSON.stringify(y)?.length||0;A={entries:E>200*1024?void 0:y,entriesSize:E,requestTime:this._requestBookmark.timeMs}}h={text:g.length>200*1024?void 0:g,textLength:g.length,selection:this.editCollectingInfo.originalSelection.map(y=>({start:y.start,endExclusive:y.endExclusive})),edits:this.editCollectingInfo.edits.map(y=>y.edit.replacements.map(E=>({time:y.time.toISOString(),start:E.replaceRange.start,endExclusive:E.replaceRange.endExclusive,newText:E.newText}))).flat(),tags:[],recording:A}}let m=this._statelessNextEditTelemetry?.fetchStartedAt===void 0?void 0:this._statelessNextEditTelemetry.fetchStartedAt-this._startTime;return{providerId:this._providerId,headerRequestId:this._headerRequestId,nextEditProviderDuration:this._duration,isFromCache:this._isFromCache,reusedRequest:this._reusedRequest,subsequentEditOrder:this._subsequentEditOrder,documentsCount:r,editsCount:n,activeDocumentEditsCount:o,activeDocumentLanguageId:s,activeDocumentOriginalLineCount:c,fetchStartedAfterMs:m,hasNextEdit:this._hasNextEdit,wasPreviouslyRejected:this._wasPreviouslyRejected,isNotebook:l,notebookType:u,status:this._status,nextEditProviderError:this._nextEditProviderError,alternativeAction:h,...this._statelessNextEditTelemetry,activeDocumentRepository:d,repositoryUrls:p,nesConfigs:this._nesConfigs}}get originalSelectionLine(){return this.editCollectingInfo?.originalSelectionLine}constructor(e,r,n,o,s,c,l){super(),this._gitExtensionService=e,this._notebookService=r,this._workspaceService=n,this._providerId=o,this._doc=s,this._debugRecorder=c,this._requestBookmark=l,this._isFromCache=!1,this._hasNextEdit=!1,this._wasPreviouslyRejected=!1,this._status="new",this._startTime=Date.now(),this._doc&&(this.editCollectingInfo={originalDoc:this._doc.value.get(),originalSelection:this._doc.selection.get(),originalSelectionLine:this._doc.primarySelectionLine.get(),edits:[]},this._store.add((0,_ha.autorunWithChanges)(this,{value:this._doc.value},u=>{let d=new Date;u.value.changes.forEach(p=>{this.editCollectingInfo?.edits.push({time:d,edit:p})})})))}setNESConfigs(e){return this._nesConfigs=e,this}setHeaderRequestId(e){return this._headerRequestId=e,this}setIsFromCache(){return this._isFromCache=!0,this}setReusedRequest(e){return this._reusedRequest=e,this}setSubsequentEditOrder(e){return this._subsequentEditOrder=e,this}setRequest(e){return this._request=e,this}setStatelessNextEditTelemetry(e){return this._statelessNextEditTelemetry=e,this}setHasNextEdit(e){return this._hasNextEdit=e,this}setWasPreviouslyRejected(){return this._wasPreviouslyRejected=!0,this}markEndTime(){return this._duration=Date.now()-this._startTime,this}setStatus(e){return this._status=e,this}setNextEditProviderError(e){return this._nextEditProviderError=e,this}};iE.LlmNESTelemetryBuilder=Pct;var kct=class{static{a(this,"DiagnosticsTelemetryBuilder")}constructor(){this._droppedReasons=[]}build(){let e=this._droppedReasons.length>0?JSON.stringify(this._droppedReasons):void 0;return{diagnosticType:this._type,diagnosticDroppedReasons:e,diagnosticAlternativeImportsCount:this._diagnosticRunTelemetry?.alternativeImportsCount,diagnosticHasExistingSameFileImport:this._diagnosticRunTelemetry?.hasExistingSameFileImport,diagnosticIsLocalImport:this._diagnosticRunTelemetry?.isLocalImport,diagnosticDistanceToUnknownDiagnostic:this._diagnosticRunTelemetry?.distanceToUnknownDiagnostic,diagnosticDistanceToAlternativeDiagnostic:this._diagnosticRunTelemetry?.distanceToAlternativeDiagnostic,diagnosticHasAlternativeDiagnosticForSameRange:this._diagnosticRunTelemetry?.hasAlternativeDiagnosticForSameRange}}populate(e){this._droppedReasons.forEach(r=>e.addDroppedReason(r)),this._type&&e.setType(this._type),this._diagnosticRunTelemetry&&e.setDiagnosticRunTelemetry(this._diagnosticRunTelemetry)}setType(e){return this._type=e,this}addDroppedReason(e){return this._droppedReasons.push(e),this}setDiagnosticRunTelemetry(e){return this._diagnosticRunTelemetry=e,this}};iE.DiagnosticsTelemetryBuilder=kct;var e0r=class t extends Rct.Disposable{static{a(this,"NextEditProviderTelemetryBuilder")}static{this.providerIdToReqN=new Map}get isSent(){return this._isSent}markAsSent(){this._isSent=!0}build(e){let r=this._nesBuilder.build(e),n=this._diagnosticsBuilder.build();return{...r,...n,opportunityId:this._opportunityId||"",requestN:this._requestN,isShown:this._isShown,acceptance:this._acceptance,disposalReason:this._disposalReason,supersededByOpportunityId:this._supersededByOpportunityId,pickedNES:this._nesTypePicked,hadLlmNES:this._hadLlmNES,isMultilineEdit:this._isMultilineEdit,isEolDifferent:this._isEolDifferent,isActiveDocument:this._isActiveDocument,isNextEditorVisible:this._isNextEditorVisible,isNextEditorRangeVisible:this._isNextEditorRangeVisible,isNESForAnotherDoc:this._isNESForAnotherDoc,notebookId:this._notebookId,notebookCellLines:this._notebookCellLines,notebookCellMarkerCount:this._notebookCellMarkerCount,notebookCellMarkerIndex:this._notebookCellMarkerIndex,hadDiagnosticsNES:this._hadDiagnosticsNES,configIsDiagnosticsNESEnabled:this._configIsDiagnosticsNESEnabled,isNaturalLanguageDominated:this._isNaturalLanguageDominated,postProcessingOutcome:this._postProcessingOutcome,userTypingDisagreed:this._userTypingDisagreed}}get nesBuilder(){return this._nesBuilder}get diagnosticsBuilder(){return this._diagnosticsBuilder}constructor(e,r,n,o,s,c,l){super(),this.doc=s,this._isSent=!1,this._isShown=!1,this._acceptance="notAccepted",this._disposalReason=void 0,this._supersededByOpportunityId=void 0,this._userTypingDisagreed=void 0,this._notebookCellMarkerCount=0,this._notebookCellMarkerIndex=-1,this._isNESForAnotherDoc=!1,this._hadLlmNES=!1,this._hadDiagnosticsNES=!1,this._configIsDiagnosticsNESEnabled=!1,this._isNaturalLanguageDominated=!1;let u=t.providerIdToReqN.get(o)||0;this._requestN=++u,t.providerIdToReqN.set(o,u),this._nesBuilder=this._register(new Pct(e,r,n,o,s,c,l)),this._diagnosticsBuilder=new kct}setOpportunityId(e){return this._opportunityId=e,this}setAsShown(){return this._isShown=!0,this}setAcceptance(e){return this._acceptance=e,this}setDisposalReason(e){return this._disposalReason=e,this}setSupersededBy(e){return this._supersededByOpportunityId=e,this}setUserTypingDisagreed(e){return this._userTypingDisagreed=e,this}setPickedNESType(e){return this._nesTypePicked=e,this}setIsActiveDocument(e){return this._isActiveDocument=e,this}setNotebookCellMarkerCount(e){return this._notebookCellMarkerCount=e,this}setIsMultilineEdit(e){return this._isMultilineEdit=e,this}setIsEolDifferent(e){return this._isEolDifferent=e,this}setIsNextEditorVisible(e){return this._isNextEditorVisible=e,this}setIsNextEditorRangeVisible(e){return this._isNextEditorRangeVisible=e,this}setNotebookId(e){return this._notebookId=e,this}setNotebookCellLines(e){return this._notebookCellLines=e,this}setNotebookCellMarkerIndex(e){return this._notebookCellMarkerIndex=e,this}setIsNESForOtherEditor(e){return this._isNESForAnotherDoc=e,this}setHadLlmNES(e){return this._hadLlmNES=e,this}setHadDiagnosticsNES(e){return this._hadDiagnosticsNES=e,this}setStatus(e){return this._nesBuilder.setStatus(e),this}setConfigIsDiagnosticsNESEnabled(e){return this._configIsDiagnosticsNESEnabled=e,this}setIsNaturalLanguageDominated(e){return this._isNaturalLanguageDominated=e,this}setPostProcessingOutcome(e){let r=e.displayLocation?{label:e.displayLocation.label,range:e.displayLocation.range.toString()}:void 0;return this._postProcessingOutcome=JSON.stringify({suggestedEdit:e.edit.toString(),isInlineCompletion:e.isInlineCompletion,displayLocation:r}),this}};iE.NextEditProviderTelemetryBuilder=e0r;var t0r=class{static{a(this,"IdleDetector")}get isDisposed(){return this._store.isDisposed}constructor(e,r,n){this._onIdle=r,this._onUserJump=n,this._store=new Rct.DisposableStore,this._disposalTracker=new Rct.RefCountedDisposable(this._store),this._selectionSnapshots=new Map,this._lastEditTime=0;let o=5e3,s=this._store.add(new bha.RunOnceScheduler(()=>{this._onIdle(o)},o));this._idleScheduler=s;let c=!0;this._store.add((0,goi.autorun)(u=>{if(e.onDidOpenDocumentChange.read(u),c){c=!1;return}this._lastEditTime=Date.now(),s.schedule()}));let l=!0;this._store.add((0,goi.autorunHandleChanges)({owner:this,changeTracker:{createChangeSummary:a(()=>({removed:[]}),"createChangeSummary"),handleChange:a((u,d)=>(u.didChange(e.openDocuments)&&(d.removed=u.change.removed),!0),"handleChange")}},(u,d)=>{if(this._store.isDisposed)return;let p=e.openDocuments.read(u);for(let h of p)h.primarySelectionLine.read(u);if(l){l=!1;for(let h of p)this._selectionSnapshots.set(h.id.uri,h.primarySelectionLine.get());return}for(let h of d.removed)this._selectionSnapshots.delete(h.id.uri);if(!(Date.now()-this._lastEditTime<200))for(let h of p){let m=h.id.uri,g=h.primarySelectionLine.get();if(this._selectionSnapshots.get(m)!==g){this._selectionSnapshots.set(m,g),this._onUserJump(m,g);return}}}))}scheduleIdleTimer(){this._idleScheduler?.schedule()}acquire(){this._disposalTracker.acquire()}release(){this._disposalTracker.release()}forceDispose(){this._store.dispose()}},r0r=class{static{a(this,"TelemetrySender")}constructor(e,r){this._workspace=e,this._telemetryService=r,this._map=new Map}scheduleSendingEnhancedTelemetry(e,r){let n=this._map.get(e);n&&(n.builder!==r&&n.builder.dispose(),this._removeEntry(e,n));let o=setTimeout(()=>{this._enterIdleDetection(e,r)},120*1e3);this._map.set(e,{builder:r,timeout:o})}_enterIdleDetection(e,r){let n=this._workspace;if(!n){this._buildAndSendEnhancedTelemetry(e,r,{reason:"idle",details:{idleTimeoutMs:0}});return}this._idleDetector?this._idleDetector.acquire():this._idleDetector=new t0r(n,l=>this._sendAllPendingInIdlePhase({reason:"idle",details:{idleTimeoutMs:l}}),(l,u)=>this._sendAllPendingInIdlePhaseWithJump(l,u)),this._idleDetector.scheduleIdleTimer();let o=3e4,s=setTimeout(()=>{this._sendForEntry(e,{reason:"hard_cap",details:{hardCapTimeoutMs:o}})},o),c=this._map.get(e);c&&(c.hardCapTimeout=s)}_releaseIdleDetector(){this._idleDetector?.release(),this._idleDetector?.isDisposed&&(this._idleDetector=void 0)}_sendAllPendingInIdlePhase(e){let r=[];for(let[n,o]of this._map)o.hardCapTimeout!==void 0&&r.push(n);for(let n of r)this._sendForEntry(n,e)}_sendAllPendingInIdlePhaseWithJump(e,r){let n=[];for(let[o,s]of this._map)s.hardCapTimeout!==void 0&&n.push([o,s.builder]);for(let[o,s]of n){let c=s.doc?.id.uri,l=s.nesBuilder.originalSelectionLine,u=c!==void 0&&l!==void 0?{file:c,line:l}:void 0;this._sendForEntry(o,{reason:"user_jump",details:{from:u,to:{file:e,line:r}}})}}_sendForEntry(e,r){let n=this._map.get(e);if(!n)return;n.hardCapTimeout!==void 0&&(clearTimeout(n.hardCapTimeout),this._releaseIdleDetector()),this._map.delete(e);let o;try{o=n.builder.build(!0)}finally{n.builder.dispose()}this._doSendEnhancedTelemetry(o,r)}_removeEntry(e,r){clearTimeout(r.timeout),r.hardCapTimeout!==void 0&&(clearTimeout(r.hardCapTimeout),this._releaseIdleDetector()),this._map.delete(e)}_buildAndSendEnhancedTelemetry(e,r,n){let o;this._map.delete(e);try{o=r.build(!0)}finally{r.dispose()}this._doSendEnhancedTelemetry(o,n)}sendTelemetry(e,r){if(e){let o=this._map.get(e);o&&this._removeEntry(e,o)}let n=r.build(!0);r.isSent||(this._doSendTelemetry(n),r.markAsSent()),this._doSendEnhancedTelemetry(n,void 0)}sendTelemetryForBuilder(e){if(e.isSent)return;let r=e.build(!1);this._doSendTelemetry(r),e.markAsSent()}async _doSendTelemetry(e){let{opportunityId:r,headerRequestId:n,requestN:o,providerId:s,modelName:c,hadStatelessNextEditProviderCall:l,statelessNextEditProviderDuration:u,nextEditProviderDuration:d,isFromCache:p,reusedRequest:h,subsequentEditOrder:m,activeDocumentLanguageId:g,activeDocumentOriginalLineCount:A,nLinesOfCurrentFileInPrompt:y,wasPreviouslyRejected:E,isShown:_,isNotebook:v,notebookType:b,isNESForAnotherDoc:I,isActiveDocument:x,isEolDifferent:R,isMultilineEdit:w,isNextEditorRangeVisible:P,isNextEditorVisible:k,acceptance:Q,disposalReason:M,logProbThreshold:D,documentsCount:G,editsCount:O,activeDocumentEditsCount:N,promptLineCount:F,promptCharCount:U,hadLowLogProbSuggestion:L,nEditsSuggested:H,lineDistanceToMostRecentEdit:$,isCursorAtEndOfLine:W,isInlineSuggestion:j,debounceTime:ce,artificialDelay:J,hasNextEdit:Te,notebookCellMarkerCount:fe,notebookCellMarkerIndex:De,notebookId:Ve,notebookCellLines:Ue,nextEditLogprob:Ke,supersededByOpportunityId:X,noNextEditReasonKind:le,noNextEditReasonMessage:te,fetchStartedAfterMs:xe,response:Z,configIsDiagnosticsNESEnabled:ae,isNaturalLanguageDominated:Ne,diagnosticType:Y,diagnosticDroppedReasons:ee,diagnosticHasExistingSameFileImport:Ee,diagnosticIsLocalImport:Ae,diagnosticAlternativeImportsCount:ve,diagnosticDistanceToUnknownDiagnostic:We,diagnosticDistanceToAlternativeDiagnostic:Ze,diagnosticHasAlternativeDiagnosticForSameRange:vt,hadDiagnosticsNES:Nt,hadLlmNES:Gt,pickedNES:Qt,xtabAggressivenessLevel:ue,xtabUserHappinessScore:Be,userAggressivenessSetting:et,modelConfig:ut}=e,ye,Le,$e,rt;if(Z!==void 0){let{response:ot,ttft:ft,fetchResult:z,fetchTime:se}=await Z;ot.type===moi.ChatFetchResponseType.Success&&(ye=ot.usage),Le=ft,$e=z,rt=se}this._sendTelemetryToBoth({opportunityId:r,headerRequestId:n,providerId:s,modelName:c,activeDocumentLanguageId:g,mergeConflictExpanded:e.mergeConflictExpanded,acceptance:Q,disposalReason:M,supersededByOpportunityId:X,noNextEditReasonKind:le,noNextEditReasonMessage:te,fetchResult:$e,nextEditProviderError:e.nextEditProviderError,reusedRequest:h,diagnosticType:Y,diagnosticDroppedReasons:ee,pickedNES:Qt,notebookType:b,notebookId:Ve,notebookCellLines:Ue,nextCursorLineError:e.nextCursorPrediction?.nextCursorLineError,xtabAggressivenessLevel:ue,userAggressivenessSetting:et,modelConfig:ut},{requestN:o,hadStatelessNextEditProviderCall:this._boolToNum(l),statelessNextEditProviderDuration:u,nextEditProviderDuration:d,isFromCache:this._boolToNum(p),subsequentEditOrder:m,activeDocumentOriginalLineCount:A,activeDocumentNLinesInPrompt:y,wasPreviouslyRejected:this._boolToNum(E),isShown:this._boolToNum(_),isNotebook:this._boolToNum(v),isNESForAnotherDoc:this._boolToNum(I),isActiveDocument:this._boolToNum(x),isEolDifferent:this._boolToNum(R),isMultilineEdit:this._boolToNum(w),isNextEditorRangeVisible:this._boolToNum(P),isNextEditorVisible:this._boolToNum(k),hasNotebookCellMarker:fe>0?1:0,notebookCellMarkerCount:fe,notebookCellMarkerIndex:De,logProbThreshold:D,documentsCount:G,editsCount:O,activeDocumentEditsCount:N,promptLineCount:F,promptCharCount:U,hadLowLogProbSuggestion:this._boolToNum(L),nEditsSuggested:H,lineDistanceToMostRecentEdit:$,isCursorAtEndOfLine:this._boolToNum(W),isInlineSuggestion:this._boolToNum(j),debounceTime:ce,artificialDelay:J,fetchStartedAfterMs:xe,ttft:Le,fetchTime:rt,promptTokens:ye?.prompt_tokens,responseTokens:ye?.completion_tokens,cachedTokens:ye?.prompt_tokens_details?.cached_tokens,acceptedPredictionTokens:ye?.completion_tokens_details?.accepted_prediction_tokens,rejectedPredictionTokens:ye?.completion_tokens_details?.rejected_prediction_tokens,hasNextEdit:this._boolToNum(Te),userTypingDisagreed:this._boolToNum(e.userTypingDisagreed),nextEditLogprob:Ke,hadDiagnosticsNES:this._boolToNum(Nt),hadLlmNES:this._boolToNum(Gt),configIsDiagnosticsNESEnabled:this._boolToNum(ae),isNaturalLanguageDominated:this._boolToNum(Ne),diagnosticHasExistingSameFileImport:this._boolToNum(Ee),diagnosticIsLocalImport:this._boolToNum(Ae),diagnosticAlternativeImportsCount:ve,diagnosticDistanceToUnknownDiagnostic:We,diagnosticDistanceToAlternativeDiagnostic:Ze,diagnosticHasAlternativeDiagnosticForSameRange:this._boolToNum(vt),nextCursorLineDistance:e.nextCursorPrediction?.nextCursorLineDistance,xtabUserHappinessScore:Be,nDiffsInPrompt:e.nDiffsInPrompt,diffTokensInPrompt:e.diffTokensInPrompt})}_sendTelemetryToBoth(e,r){this._telemetryService.sendMSFTTelemetryEvent("provideInlineEdit",e,r),this._telemetryService.sendGHTelemetryEvent("copilot-nes/provideInlineEdit",e,r)}async _doSendEnhancedTelemetry(e,r){let{opportunityId:n,headerRequestId:o,providerId:s,activeDocumentLanguageId:c,status:l,modelName:u,prompt:d,response:p,alternativeAction:h,postProcessingOutcome:m,activeDocumentRepository:g,repositoryUrls:A,cursorJumpModelName:y,cursorJumpPrompt:E,cursorJumpResponse:_,lintErrors:v,terminalOutput:b,similarFilesContext:I,modelConfig:x,isFromCache:R}=e,w=p===void 0?p:await p,P=await I?.catch(()=>{});this._telemetryService.sendEnhancedGHTelemetryEvent("copilot-nes/provideInlineEdit",(0,yoi.multiplexProperties)({opportunityId:n,headerRequestId:o,providerId:s,activeDocumentLanguageId:c,suggestionStatus:l,modelName:u,prompt:d,modelResponse:w===void 0||w.response.type!==moi.ChatFetchResponseType.Success?void 0:w.response.value,alternativeAction:h?JSON.stringify({...h,enhancedTelemetrySendingReason:r}):void 0,enhancedTelemetrySendingReason:!h&&r?JSON.stringify(r):void 0,postProcessingOutcome:m,activeDocumentRepository:g,repositories:JSON.stringify(A),cursorJumpModelName:y,cursorJumpPrompt:E,cursorJumpResponse:_,lintErrors:v,terminalOutput:b,similarFilesContext:P,modelConfig:x}),{isFromCache:this._boolToNum(R)})}_boolToNum(e){return e===void 0?void 0:e?1:0}dispose(){for(let e of this._map.values())clearTimeout(e.timeout),e.hardCapTimeout!==void 0&&clearTimeout(e.hardCapTimeout),e.builder.dispose();this._map.clear(),this._idleDetector&&(this._idleDetector.forceDispose(),this._idleDetector=void 0)}};iE.TelemetrySender=r0r;iE.TelemetrySender=r0r=Eha([Cha(1,yoi.ITelemetryService)],r0r)});var i0r=T(Wde=>{"use strict";f();Object.defineProperty(Wde,"__esModule",{value:!0});Wde.NullPowerService=Wde.IPowerService=void 0;var Coi=nc(),Sha=Mo();Wde.IPowerService=(0,Sha.createDecorator)("IPowerService");var n0r=class{static{a(this,"NullPowerService")}constructor(){this.onDidSuspend=Coi.Event.None,this.onDidResume=Coi.Event.None}acquirePowerSaveBlocker(){return{dispose:a(()=>{},"dispose")}}};Wde.NullPowerService=n0r});var d3=T(wQ=>{"use strict";f();Object.defineProperty(wQ,"__esModule",{value:!0});wQ.FetchStreamRecorder=wQ.FetchStreamSource=wQ.IChatMLFetcher=void 0;var Iha=qr(),xha=wc();wQ.IChatMLFetcher=(0,Iha.createServiceIdentifier)("IChatMLFetcher");var o0r=class{static{a(this,"FetchStreamSource")}get stream(){return this._stream.asyncIterable}constructor(){this._stream=new xha.AsyncIterableSource,this._seenAnnotationTypes=new Set}pause(){this._paused??=[]}unpause(){let e=this._paused;if(e){this._paused=void 0;for(let r of e)r?this.update(r.text,r.delta):this.resolve()}}update(e,r){if(this._paused){this._paused.push({text:e,delta:r});return}r.codeVulnAnnotations&&(!((e.match(/(^|\n)```/g)?.length??0)%2===1)||e.match(/(^|\n)```\w*\s*$/))&&(r.codeVulnAnnotations=void 0),r.codeVulnAnnotations&&(r.codeVulnAnnotations=r.codeVulnAnnotations.filter(n=>!this._seenAnnotationTypes.has(n.details.type)),r.codeVulnAnnotations.forEach(n=>this._seenAnnotationTypes.add(n.details.type))),this._stream.emitOne({delta:r})}resolve(){if(this._paused){this._paused.push(void 0);return}this._stream.resolve()}};wQ.FetchStreamSource=o0r;var s0r=class{static{a(this,"FetchStreamRecorder")}get firstTokenEmittedTime(){return this._firstTokenEmittedTime}constructor(e){this.deltas=[],this.callback=async(r,n,o)=>{this._firstTokenEmittedTime===void 0&&(o.text||o.beginToolCalls||typeof o.thinking?.text=="string"&&o.thinking?.text||o.thinking?.text?.length||o.copilotToolCalls||o.copilotToolCallStreamUpdates)&&(this._firstTokenEmittedTime=Date.now());let s=e?await e(r,n,o):void 0;return this.deltas.push(o),s}}};wQ.FetchStreamRecorder=s0r});var a0r=T(Nct=>{"use strict";f();Object.defineProperty(Nct,"__esModule",{value:!0});Nct.IChatQuotaService=void 0;var wha=qr();Nct.IChatQuotaService=(0,wha.createServiceIdentifier)("IChatQuotaService")});var c0r=T(Dct=>{"use strict";f();Object.defineProperty(Dct,"__esModule",{value:!0});Dct.IConversationOptions=void 0;var Rha=qr();Dct.IConversationOptions=(0,Rha.createServiceIdentifier)("ConversationOptions")});var zRe=T(zde=>{"use strict";f();Object.defineProperty(zde,"__esModule",{value:!0});zde.getTextPart=kha;zde.toTextPart=_oi;zde.toTextParts=Nha;zde.roleToString=Dha;var wJ=po(),Pha=Jl();function kha(t){return t?typeof t=="string"?t:Array.isArray(t)?t.map(e=>e.type===wJ.Raw.ChatCompletionContentPartKind.Text||e.type==="text"?e.text:"").join(""):t.type===wJ.Raw.ChatCompletionContentPartKind.Text?t.text:"":""}a(kha,"getTextPart");function _oi(t){return{type:wJ.Raw.ChatCompletionContentPartKind.Text,text:t}}a(_oi,"toTextPart");function Nha(t){return[_oi(t)]}a(Nha,"toTextParts");function Dha(t){switch(t){case wJ.Raw.ChatRole.System:return"system";case wJ.Raw.ChatRole.User:return"user";case wJ.Raw.ChatRole.Assistant:return"assistant";case wJ.Raw.ChatRole.Tool:return"tool";default:(0,Pha.assertNever)(t,`unknown role (${t})`)}}a(Dha,"roleToString")});var u0r=T(Yde=>{"use strict";f();Object.defineProperty(Yde,"__esModule",{value:!0});Yde.InteractionService=Yde.IInteractionService=void 0;var Mha=qr(),voi=Np();Yde.IInteractionService=(0,Mha.createServiceIdentifier)("IInteractionService");var l0r=class{static{a(this,"InteractionService")}constructor(){this._interactionId=(0,voi.generateUuid)()}startInteraction(){this._interactionId=(0,voi.generateUuid)()}get interactionId(){return this._interactionId}};Yde.InteractionService=l0r});var boi=T(Mct=>{"use strict";f();Object.defineProperty(Mct,"__esModule",{value:!0});Mct.ChatWebSocketTelemetrySender=void 0;var d0r=class{static{a(this,"ChatWebSocketTelemetrySender")}static sendConnectedTelemetry(e,r){e.sendTelemetryEvent("websocket.connected",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId},{connectDurationMs:r.connectDurationMs})}static sendConnectErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.connectError",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error,responseStatusText:r.responseStatusText},{connectDurationMs:r.connectDurationMs,responseStatusCode:r.responseStatusCode})}static sendCloseTelemetry(e,r){e.sendTelemetryEvent("websocket.close",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,closeReason:r.closeReason,closeEventReason:r.closeEventReason,closeEventWasClean:r.closeEventWasClean},{closeCode:r.closeCode,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.error",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error},{totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendCloseDuringSetupTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.closeDuringSetup",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,closeReason:r.closeReason,closeEventReason:r.closeEventReason,closeEventWasClean:r.closeEventWasClean},{closeCode:r.closeCode,connectDurationMs:r.connectDurationMs})}static sendRequestSentTelemetry(e,r){e.sendTelemetryEvent("websocket.requestSent",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId},{statefulMarkerMatched:r.statefulMarkerMatched?1:0,previousResponseIdUnset:r.previousResponseIdUnset?1:0,hasCompactionData:r.hasCompactionData?1:0,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,sentMessageCharacters:r.sentMessageCharacters,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendMessageParseErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.messageParseError",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error},{totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,receivedMessageCharacters:r.receivedMessageCharacters,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendRequestOutcomeTelemetry(e,r){e.sendTelemetryEvent("websocket.requestOutcome",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,requestOutcome:r.requestOutcome,closeReason:r.closeReason,serverErrorMessage:r.serverErrorMessage,serverErrorCode:r.serverErrorCode},{statefulMarkerMatched:r.statefulMarkerMatched?1:0,previousResponseIdUnset:r.previousResponseIdUnset?1:0,hasCompactionData:r.hasCompactionData?1:0,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,requestSentMessageCount:r.requestSentMessageCount,requestReceivedMessageCount:r.requestReceivedMessageCount,requestSentCharacters:r.requestSentCharacters,requestReceivedCharacters:r.requestReceivedCharacters,connectionDurationMs:r.connectionDurationMs,requestDurationMs:r.requestDurationMs,closeCode:r.closeCode})}};Mct.ChatWebSocketTelemetrySender=d0r});var PQ=T(oE=>{"use strict";f();var Oha=oE&&oE.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Oct=oE&&oE.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(oE,"__esModule",{value:!0});oE.ChatWebSocketManager=oE.NullChatWebSocketManager=oE.IChatWebSocketManager=void 0;oE.isCAPIWebSocketError=g0r;oE.getStreamTerminatingOutcome=Ioi;var Bha=qr(),Lha=es(),Bct=nc(),Toi=so(),Soi=fc(),Fha=eE(),YRe=L0(),Uha=Rp(),Qha=ig(),RQ=boi();oE.IChatWebSocketManager=(0,Bha.createServiceIdentifier)("IChatWebSocketManager");var f0r=class{static{a(this,"NullChatWebSocketManager")}getOrCreateConnection(e,r,n){throw new Error("WebSocket not available")}hasActiveConnection(e,r){return!1}closeConnection(e,r){}closeAll(){}};oE.NullChatWebSocketManager=f0r;function g0r(t){return t.type==="error"&&"error"in t&&typeof t.error?.code=="string"}a(g0r,"isCAPIWebSocketError");var qha={"response.completed":"completed","response.failed":"response_failed","response.incomplete":"response_incomplete","response.cancelled":"response_cancelled",error:"upstream_error"};function Ioi(t){return qha[t.type]}a(Ioi,"getStreamTerminatingOutcome");var p0r=class extends Toi.Disposable{static{a(this,"ChatWebSocketManager")}constructor(e,r,n,o){super(),this._logService=e,this._capiClientService=r,this._telemetryService=n,this._configurationService=o,this._connections=new Map}getOrCreateConnection(e,r,n){let o=this._connections.get(e);if(o?.turnId===r&&o.connection.isOpen)return this._logService.debug(`[ChatWebSocketManager] Reusing connection for conversation ${e} turn ${r}`),o.connection;o&&(this._logService.debug(`[ChatWebSocketManager] Closing previous connection for conversation ${e} (turn changed)`),o.connection.dispose(),this._connections.delete(e));let s=new h0r(this._capiClientService,this._logService,this._telemetryService,this._configurationService,e,r,n);return this._logService.debug(`[ChatWebSocketManager] Creating new connection for conversation ${e} turn ${r}`),this._connections.set(e,{turnId:r,connection:s}),s.onDidDispose(()=>{this._connections.get(e)?.connection===s&&this._connections.delete(e)}),s}hasActiveConnection(e,r){let n=this._connections.get(e);return!!n&&n.turnId===r&&n.connection.isOpen}closeConnection(e,r){let n=this._connections.get(e);if(n){if(r&&n.turnId!==r){this._logService.debug(`[ChatWebSocketManager] Not closing connection for conversation ${e}: requested turn ${r} does not match active turn ${n.turnId}`);return}this._logService.debug(`[ChatWebSocketManager] Closing connection for conversation ${e} turn ${r}`),n.connection.dispose(),this._connections.delete(e)}}closeAll(){for(let e of this._connections.values())e.connection.dispose();this._connections.clear()}dispose(){this.closeAll(),super.dispose()}};oE.ChatWebSocketManager=p0r;oE.ChatWebSocketManager=p0r=Oha([Oct(0,YRe.ILogService),Oct(1,Fha.ICAPIClientService),Oct(2,Uha.ITelemetryService),Oct(3,Soi.IConfigurationService)],p0r);function Lct(t){switch(t){case 1e3:return"Normal Closure";case 1001:return"Going Away";case 1002:return"Protocol Error";case 1003:return"Unsupported Data";case 1005:return"No Status Received";case 1006:return"Abnormal Closure";case 1007:return"Invalid Payload";case 1008:return"Policy Violation";case 1009:return"Message Too Big";case 1010:return"Missing Extension";case 1011:return"Internal Error";case 1012:return"Service Restart";case 1013:return"Try Again Later";case 1014:return"Bad Gateway";case 1015:return"TLS Handshake Failed";default:return"Unknown"}}a(Lct,"wsCloseCodeToString");var h0r=class extends Toi.Disposable{static{a(this,"ChatWebSocketConnection")}constructor(e,r,n,o,s,c,l){super(),this._capiClientService=e,this._logService=r,this._telemetryService=n,this._configurationService=o,this._conversationId=s,this._turnId=c,this._headers=l,this._state=2,this._onDidDispose=this._register(new Bct.Emitter),this.onDidDispose=this._onDidDispose.event,this._totalSentMessageCount=0,this._totalReceivedMessageCount=0,this._totalSentCharacters=0,this._totalReceivedCharacters=0,this._responseHeaders=new Qha.HeadersImpl({})}get isOpen(){return this._state===1&&!!this._ws}get statefulMarker(){return this._statefulMarker}get responseHeaders(){return this._responseHeaders}get responseStatusCode(){return this._responseStatusCode}get responseStatusText(){return this._responseStatusText}get requestId(){return this._responseHeaders.get("x-request-id")||Object.entries(this._headers).find(([e])=>e.toLowerCase()==="x-request-id")?.[1]||""}get gitHubRequestId(){return this._responseHeaders.get("x-github-request-id")||""}async connect(){if(this._state===1)return;this._state=0,this._connectStartTime=Date.now(),this._logService.debug(`[ChatWebSocketManager] Connecting WebSocket for conversation ${this._conversationId} turn ${this._turnId}`);let e=await this._capiClientService.createResponsesWebSocket({headers:this._headers});return new Promise((r,n)=>{let o=e.webSocket,s=a(()=>{u(),this._state=1,this._connectedTime=Date.now(),this._ws=o,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText,this._setupMessageHandlers(o);let d=this._connectedTime-(this._connectStartTime??this._connectedTime);this._logService.debug(`[ChatWebSocketManager] Connected for conversation ${this._conversationId} turn ${this._turnId}`),RQ.ChatWebSocketTelemetrySender.sendConnectedTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,connectDurationMs:d}),r()},"onOpen"),c=a(d=>{u(),this._state=2,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText;let p=d.error?`${d.message}: ${(0,YRe.collectSingleLineErrorMessage)(d.error)}`:d.message||"WebSocket error",h=Date.now()-(this._connectStartTime??Date.now());this._logService.error(`[ChatWebSocketManager] Connection error for conversation ${this._conversationId} turn ${this._turnId}: ${p}`),RQ.ChatWebSocketTelemetrySender.sendConnectErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:p,connectDurationMs:h,responseStatusCode:this._responseStatusCode,responseStatusText:this._responseStatusText}),n(new Error(p))},"onError"),l=a(d=>{u(),this._state=2,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText;let p=Date.now()-(this._connectStartTime??Date.now()),h=Lct(d.code);this._logService.debug(`[ChatWebSocketManager] Connection closed during setup for conversation ${this._conversationId} turn ${this._turnId} (code: ${d.code} ${h}, reason: ${d.reason||""}, wasClean: ${d.wasClean})`),RQ.ChatWebSocketTelemetrySender.sendCloseDuringSetupTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,closeCode:d.code,closeReason:h,closeEventReason:d.reason,closeEventWasClean:String(d.wasClean),connectDurationMs:p}),n(new Error("WebSocket closed during connection setup"))},"onClose"),u=a(()=>{o.removeEventListener("open",s),o.removeEventListener("error",c),o.removeEventListener("close",l)},"cleanup");o.addEventListener("open",s),o.addEventListener("error",c),o.addEventListener("close",l)})}_setupMessageHandlers(e){e.addEventListener("message",r=>{if(typeof r.data!="string")return;let n=r.data.length;this._totalReceivedMessageCount+=1,this._totalReceivedCharacters+=n;let o=Date.now()-(this._connectedTime??Date.now()),s;try{s=JSON.parse(r.data)}catch(c){let l=(0,YRe.collectSingleLineErrorMessage)(c)||"Failed to parse websocket message";this._logService.error(`[ChatWebSocketManager] Failed to parse message for conversation ${this._conversationId} turn ${this._turnId}: ${l}`),RQ.ChatWebSocketTelemetrySender.sendMessageParseErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:l,connectionDurationMs:o,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,receivedMessageCharacters:n,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters});return}!g0r(s)&&s.type==="response.completed"&&(this._statefulMarker=s.response.id),this._activeRequest?.handleEvent(s)}),e.addEventListener("close",r=>{this._state=2;let n=Date.now()-(this._connectedTime??Date.now()),o=Lct(r.code);this._logService.debug(`[ChatWebSocketManager] Connection closed for conversation ${this._conversationId} turn ${this._turnId} (code: ${r.code} ${o}, reason: ${r.reason||""}, wasClean: ${r.wasClean})`),RQ.ChatWebSocketTelemetrySender.sendCloseTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,closeCode:r.code,closeReason:o,closeEventReason:r.reason,closeEventWasClean:String(r.wasClean),connectionDurationMs:n,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters});let s=this._pendingErrorMessage;this._pendingErrorMessage=void 0,this._activeRequest?.handleConnectionClose(r.code,r.reason,s),this._activeRequest=void 0}),e.addEventListener("error",r=>{let n=r.error?`${r.message}: ${(0,YRe.collectSingleLineErrorMessage)(r.error)}`:r.message||"WebSocket error",o=Date.now()-(this._connectedTime??Date.now());this._logService.error(`[ChatWebSocketManager] Error for conversation ${this._conversationId} turn ${this._turnId}: ${n}`),RQ.ChatWebSocketTelemetrySender.sendErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:n,connectionDurationMs:o,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters}),this._pendingErrorMessage??=n})}sendRequest(e,r,n){if(!this._ws||this._state!==1)throw new Error("WebSocket is not connected");let o=this._statefulMarker===e.previous_response_id,s=e.previous_response_id===void 0,c=e.input?.some(R=>R?.type==="compaction")??!1,l=this._statefulMarker?.slice(0,5).concat("...")??"",u=e.previous_response_id?.slice(0,5).concat("...")??"";o?this._logService.trace(`[ChatWebSocketManager] WebSocket stateful marker matches previous_response_id (${u})`):this._logService.info(`[ChatWebSocketManager] WebSocket stateful marker (${l}) does not match previous_response_id (${u})`),this._activeRequest?.handleSuperseded();let d=Date.now(),p=this._totalSentMessageCount,h=this._totalReceivedMessageCount,m=this._totalSentCharacters,g=this._totalReceivedCharacters,A=new m0r(this._configurationService,this._logService);A.onDidSettle(({outcome:R,closeCode:w,closeReason:P,serverErrorMessage:k,serverErrorCode:Q})=>{let M=Date.now()-(this._connectedTime??Date.now()),D=Date.now()-d,G=this._totalSentMessageCount-p,O=this._totalReceivedMessageCount-h,N=this._totalSentCharacters-m,F=this._totalReceivedCharacters-g;RQ.ChatWebSocketTelemetrySender.sendRequestOutcomeTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,requestOutcome:R,statefulMarkerMatched:o,previousResponseIdUnset:s,hasCompactionData:c,connectionDurationMs:M,requestDurationMs:D,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters,requestSentMessageCount:G,requestReceivedMessageCount:O,requestSentCharacters:N,requestReceivedCharacters:F,closeCode:w,closeReason:P,serverErrorMessage:k,serverErrorCode:Q})}),this._activeRequest=A;let y=n.onCancellationRequested(()=>{this._activeRequest===A&&(A.handleCancellation(),this._activeRequest=void 0)});A.done.finally(()=>y.dispose()).catch(()=>{});let{stream:E,..._}=e,v={type:"response.create",..._,initiator:r.userInitiated?"user":"agent"},b=JSON.stringify(v),I=b.length;this._totalSentMessageCount+=1,this._totalSentCharacters+=I;let x=Date.now()-(this._connectedTime??Date.now());return this._logService.debug(`[ChatWebSocketManager] Sending request for conversation ${this._conversationId} turn ${this._turnId} (totalSentMessageCount: ${this._totalSentMessageCount}, sentMessageCharacters: ${I})`),RQ.ChatWebSocketTelemetrySender.sendRequestSentTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,statefulMarkerMatched:o,previousResponseIdUnset:s,hasCompactionData:c,connectionDurationMs:x,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,sentMessageCharacters:I,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters}),this._ws.send(b),A}dispose(){this._activeRequest?.handleConnectionDisposed(),this._activeRequest=void 0,this._ws&&(this._ws.close(),this._ws=void 0),this._state=2,this._onDidDispose.fire(),super.dispose()}},m0r=class{static{a(this,"ChatWebSocketActiveRequest")}constructor(e,r){this._configurationService=e,this._logService=r,this._onEvent=new Bct.Emitter,this.onEvent=this._onEvent.event,this._onCAPIError=new Bct.Emitter,this.onCAPIError=this._onCAPIError.event,this._onError=new Bct.Emitter,this.onError=this._onError.event,this._firstEventSettled=!1,this._settled=!1,this.done=new Promise((n,o)=>{this._resolve=n,this._reject=o}),this.firstEvent=new Promise((n,o)=>{this._resolveFirstEvent=n,this._rejectFirstEvent=o})}onDidSettle(e){this._onDidSettle=e}handleEvent(e){if(this._settled)return;let r=this._configurationService.getConfig(Soi.ConfigKey.TeamInternal.DebugSimulateWebSocketResponse);if(r)try{e=JSON.parse(r),this._logService.info(`[ChatWebSocketManager] Simulating WebSocket response event: ${r}`)}catch(o){this._logService.error(`[ChatWebSocketManager] Failed to parse simulated WebSocket response: ${(0,YRe.collectSingleLineErrorMessage)(o)}`)}if(this._firstEventSettled||(this._firstEventSettled=!0,this._resolveFirstEvent(e)),g0r(e)){this._finalizeCAPIError(e);return}this._onEvent.fire(e);let n=Ioi(e);n&&this._finalizeSuccess(n)}handleConnectionClose(e,r,n){if(this._settled)return;let o=n?new Error(`${n} (close code: ${e} ${Lct(e)}${r?`, reason: ${r}`:""})`):new Error(`WebSocket closed (code: ${e} ${Lct(e)}${r?`, reason: ${r}`:""})`);this._finalizeError("connection_closed",o,e,r)}handleSuperseded(){this._settled||this._finalizeError("superseded",new Error("Request superseded by new request"))}handleCancellation(){this._settled||this._finalizeError("canceled",new Lha.CancellationError)}handleConnectionDisposed(){this._settled||this._finalizeError("connection_disposed",new Error("Connection disposed"))}_finalizeSuccess(e){this._settled=!0,this._onDidSettle?.({outcome:e}),this._resolve(),this._dispose()}_finalizeCAPIError(e){let{code:r,message:n}=e.error;this._onCAPIError.fire(e),this._settled=!0,this._onDidSettle?.({outcome:"error_response",serverErrorMessage:n,serverErrorCode:r}),this._reject(new Error(`${n} (${r})`)),this._dispose()}_finalizeError(e,r,n,o,s,c){this._firstEventSettled||(this._firstEventSettled=!0,this._rejectFirstEvent(r)),this._onError.fire(r),this._settled=!0,this._onDidSettle?.({outcome:e,closeCode:n,closeReason:o,serverErrorMessage:s,serverErrorCode:c}),this._reject(r),this._dispose()}_dispose(){this._onEvent.dispose(),this._onCAPIError.dispose(),this._onError.dispose()}}});var Noi=T(f3=>{"use strict";f();Object.defineProperty(f3,"__esModule",{value:!0});f3.getImageDimensions=Gha;f3.getPngDimensions=xoi;f3.getGifDimensions=woi;f3.getJpegDimensions=Roi;f3.getWebPDimensions=Poi;f3.getMimeType=koi;f3.extractImageAttributes=Hha;function Gha(t){if(!t.startsWith("data:image/"))throw new Error("Could not read image: invalid base64 image string");let e=t.split(",")[1];switch(koi(e)){case"image/png":return xoi(e);case"image/gif":return woi(e);case"image/jpeg":case"image/jpg":return Roi(e);case"image/webp":return Poi(e);default:throw new Error("Unsupported image format")}}a(Gha,"getImageDimensions");function xoi(t){let e=atob(t.slice(0,50)).slice(16,24),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint32(0,!1),height:n.getUint32(4,!1)}}a(xoi,"getPngDimensions");function woi(t){let e=atob(t.slice(0,50)),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint16(6,!0),height:n.getUint16(8,!0)}}a(woi,"getGifDimensions");function Roi(t){let e=atob(t),r=Uint8Array.from(e,s=>s.charCodeAt(0)),n=r.length,o=2;for(;o=65472&&s<=65474){let l=new DataView(r.buffer,o+5,4);return{height:l.getUint16(0,!1),width:l.getUint16(2,!1)}}o+=2+c}throw new Error("JPEG dimensions not found")}a(Roi,"getJpegDimensions");function Poi(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o]+?)>?\)/,n=/{"use strict";f();Object.defineProperty(Fct,"__esModule",{value:!0});Fct.TokenizerType=void 0;var Doi;(function(t){t.CL100K="cl100k_base",t.O200K="o200k_base",t.Llama3="llama3"})(Doi||(Fct.TokenizerType=Doi={}))});var y0r=T(RJ=>{"use strict";f();Object.defineProperty(RJ,"__esModule",{value:!0});RJ.WorkerWithRpcProxy=RJ.RcpResponseHandler=void 0;RJ.createRpcProxy=Moi;var jha=require("worker_threads"),Uct=class{static{a(this,"RcpResponseHandler")}constructor(){this.nextId=1,this.handlers=new Map}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};RJ.RcpResponseHandler=Uct;function Moi(t){let e={get:a((r,n)=>(typeof n=="string"&&!r[n]&&(r[n]=(...o)=>t(n,o)),r[n]),"get")};return new Proxy(Object.create(null),e)}a(Moi,"createRpcProxy");var A0r=class{static{a(this,"WorkerWithRpcProxy")}constructor(e,r,n){this.responseHandler=new Uct,this.worker=new jha.Worker(e,r),this.worker.on("message",async o=>{if("fn"in o)try{let s=await n?.[o.fn].apply(n,o.args);this.worker.postMessage({id:o.id,res:s})}catch(s){this.worker.postMessage({id:o.id,err:s})}else this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=Moi((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}terminate(){this.worker.removeAllListeners(),this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};RJ.WorkerWithRpcProxy=A0r});var Ooi=T(dI=>{"use strict";f();Object.defineProperty(dI,"__esModule",{value:!0});dI.SlidingWindowAverage=dI.MovingAverage=dI.Counter=void 0;dI.clamp=Vha;dI.rot=Wha;dI.isPointWithinTriangle=zha;dI.randomChance=Yha;var $ha=Jl();function Vha(t,e,r){return Math.min(Math.max(t,e),r)}a(Vha,"clamp");function Wha(t,e){return(e+t%e)%e}a(Wha,"rot");var E0r=class{static{a(this,"Counter")}constructor(){this._next=0}getNext(){return this._next++}};dI.Counter=E0r;var C0r=class{static{a(this,"MovingAverage")}constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}};dI.MovingAverage=C0r;var _0r=class{static{a(this,"SlidingWindowAverage")}constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let r=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=r,this._sum+=e,this._n=0&&x>=0&&I+x<1}a(zha,"isPointWithinTriangle");function Yha(t){return(0,$ha.assert)(t>=0&&t<=1,"p must be between 0 and 1"),Math.random(){"use strict";f();Object.defineProperty(qct,"__esModule",{value:!0});qct.TikTokenImpl=void 0;var v0r=e8e(),Qct=Ooi(),Kha=Ck(),Jha=Air(),b0r=class t{static{a(this,"TikTokenImpl")}constructor(){this._values=[],this._stats={encodeDuration:new Qct.MovingAverage,textLength:new Qct.MovingAverage,callCount:0}}static get instance(){return this._instance||(this._instance=new t),this._instance}init(e,r,n){let o=this._values.length,s=n?Jha.parseTikTokenBinary:c=>c;return this._values.push((0,v0r.createTokenizer)(s(e),(0,v0r.getSpecialTokensByEncoder)(r),(0,v0r.getRegexByEncoder)(r),64e3)),o}encode(e,r,n){let o=Kha.StopWatch.create(!0),s=this._values[e].encode(r,n);return this._stats.callCount+=1,this._stats.encodeDuration.update(o.elapsed()),this._stats.textLength.update(r.length),s}destroy(e){this._values[e]=void 0}resetStats(){let e=this._stats,r={callCount:e.callCount,encodeDuration:e.encodeDuration.value,textLength:e.textLength.value};return this._stats.encodeDuration=new Qct.MovingAverage,this._stats.textLength=new Qct.MovingAverage,this._stats.callCount=0,r}};qct.TikTokenImpl=b0r});var PJ=T(of=>{"use strict";f();var Uoi=of&&of.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Qoi=of&&of.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(of,"__esModule",{value:!0});of.TokenizerProvider=of.BaseTokensPerName=of.BaseTokensPerMessage=of.BaseTokensPerCompletion=of.ITokenizerProvider=void 0;of.calculateImageTokenCost=x0r;of.estimateDocumentTokenCost=Goi;var kQ=po(),Xha=Bfr(),Zha=Noi(),ema=qr(),Loi=Kde(),tma=y0r(),rma=Jl(),Foi=IO(),T0r=so(),Gct=Im(),qoi=Rp(),S0r=Boi();of.ITokenizerProvider=(0,ema.createServiceIdentifier)("ITokenizerProvider");of.BaseTokensPerCompletion=3;of.BaseTokensPerMessage=3;of.BaseTokensPerName=1;var I0r=class{static{a(this,"TokenizerProvider")}constructor(e,r){this._cl100kTokenizer=new Foi.Lazy(()=>new Hct(e,(0,Gct.join)(__dirname,"./cl100k_base.tiktoken"),"cl100k_base",r)),this._o200kTokenizer=new Foi.Lazy(()=>new Hct(e,(0,Gct.join)(__dirname,"./o200k_base.tiktoken"),"o200k_base",r))}dispose(){this._cl100kTokenizer.rawValue?.dispose(),this._o200kTokenizer.rawValue?.dispose()}acquireTokenizer(e){switch(e.tokenizer){case Loi.TokenizerType.CL100K:return this._cl100kTokenizer.value;case Loi.TokenizerType.O200K:return this._o200kTokenizer.value;default:throw new Error(`Unknown tokenizer: ${e.tokenizer}`)}}};of.TokenizerProvider=I0r;of.TokenizerProvider=I0r=Uoi([Qoi(1,qoi.ITelemetryService)],I0r);var Hct=class extends T0r.Disposable{static{a(this,"BPETokenizer")}constructor(e,r,n,o){super(),this._useWorker=e,this._tokenFilePath=r,this._encoderName=n,this._telemetryService=o,this._cache=new Xha.LRUCache(5e3),this.baseTokensPerMessage=of.BaseTokensPerMessage,this.baseTokensPerName=of.BaseTokensPerName,this.mode=kQ.OutputMode.Raw}async countMessagesTokens(e){let r=of.BaseTokensPerMessage;for(let n of e)r+=await this.countMessageTokens(n);return r}async tokenize(e){return(await this.ensureTokenizer()).encode(e)}async tokenLength(e){if(typeof e=="string")return this._textTokenLength(e);switch(e.type){case kQ.Raw.ChatCompletionContentPartKind.Text:return this._textTokenLength(e.text);case kQ.Raw.ChatCompletionContentPartKind.Opaque:return e.tokenUsage||0;case kQ.Raw.ChatCompletionContentPartKind.Image:if(e.imageUrl.url.startsWith("data:image/"))try{return x0r(e.imageUrl.url,e.imageUrl.detail)}catch{return this._textTokenLength(e.imageUrl.url)}return this._textTokenLength(e.imageUrl.url);case kQ.Raw.ChatCompletionContentPartKind.CacheBreakpoint:return 0;case kQ.Raw.ChatCompletionContentPartKind.Document:return Goi(e.documentData.data);default:(0,rma.assertNever)(e,`unknown content part (${JSON.stringify(e)})`)}}async _textTokenLength(e){if(!e)return 0;let r=this._cache.get(e);return r||(r=(await this.tokenize(e)).length,this._cache.put(e,r)),r}async countMessageTokens(e){return this.baseTokensPerMessage+await this.countMessageObjectTokens((0,kQ.toMode)(kQ.OutputMode.OpenAI,e))}async countToolTokens(e){let n=0;e.length&&(n+=16);let o=8;for(let s of e)n+=o,n+=await this.countObjectTokens({name:s.name,description:s.description,parameters:s.inputSchema});return Math.floor(n*1.1)}async countMessageObjectTokens(e){let r=0;for(let[n,o]of Object.entries(e))if(o){if(typeof o=="string")r+=await this.tokenLength(o);else if(o){let s=o;if(s.type==="text")r+=await this.tokenLength(s.text);else if(s.type==="image_url"&&s.image_url)if(s.image_url.url.startsWith("data:image/"))try{r+=x0r(s.image_url.url,s.image_url.detail)}catch{r+=await this.tokenLength(s.image_url.url)}else r+=await this.tokenLength(s.image_url.url);else{let c=await this.countMessageObjectTokens(o);n==="tool_calls"&&(c=Math.floor(c*1.5)),r+=c}}n==="name"&&o!==void 0&&(r+=this.baseTokensPerName)}return r}async countObjectTokens(e){let r=0;for(let[n,o]of Object.entries(e))o&&(r+=await this.tokenLength(n),typeof o=="string"?r+=await this.tokenLength(o):o&&(r+=await this.countMessageObjectTokens(o)));return r}ensureTokenizer(){return this._tokenizer??=this.doInitTokenizer(),this._tokenizer}async doInitTokenizer(){let e=(0,Gct.basename)(__dirname)==="dist";if(this._useWorker){let r=(0,Gct.join)(__dirname,"tikTokenizerWorker.js"),n=new tma.WorkerWithRpcProxy(r,{name:`TikToken worker (${this._encoderName})`}),o=await n.proxy.init(this._tokenFilePath,this._encoderName,e),s=(0,T0r.toDisposable)(()=>{n.terminate(),this._store.deleteAndLeak(s),this._tokenizer=void 0}),c;return{encode:a((l,u)=>{let d=n.proxy.encode(o,l,u);return clearTimeout(c),c=setTimeout(()=>s.dispose(),15e3),Math.random()<1/1e3&&n.proxy.resetStats().then(p=>{this._telemetryService.sendMSFTTelemetryEvent("tokenizer.stats",void 0,p)}),d},"encode")}}else{let r=S0r.TikTokenImpl.instance.init(this._tokenFilePath,this._encoderName,e),n=(0,T0r.toDisposable)(()=>{S0r.TikTokenImpl.instance.destroy(r),this._store.deleteAndLeak(n),this._tokenizer=void 0});return this._store.add(n),{encode:a(async(o,s)=>S0r.TikTokenImpl.instance.encode(r,o,s),"encode")}}}};Hct=Uoi([Qoi(3,qoi.ITelemetryService)],Hct);function x0r(t,e){let{width:r,height:n}=(0,Zha.getImageDimensions)(t);if(e==="low")return 85;if(r>2048||n>2048){let c=2048/Math.max(r,n);r=Math.round(r*c),n=Math.round(n*c)}let o=768/Math.min(r,n);return r=Math.round(r*o),n=Math.round(n*o),Math.ceil(r/512)*Math.ceil(n/512)*170+85}a(x0r,"calculateImageTokenCost");function Goi(t){if(!t)return 0;let e=t.length,r=Math.floor(e*3/4);return Math.ceil(r/8)}a(Goi,"estimateDocumentTokenCost")});var NQ=T(Jde=>{"use strict";f();Object.defineProperty(Jde,"__esModule",{value:!0});Jde.IDomainService=Jde.FEEDBACK_URL=void 0;var nma=qr();Jde.FEEDBACK_URL="https://aka.ms/microsoft/vscode-copilot-release";Jde.IDomainService=(0,nma.createServiceIdentifier)("IDomainService")});var jct=T(W0=>{"use strict";f();Object.defineProperty(W0,"__esModule",{value:!0});W0.TOOL_SEARCH_SUPPORTED_MODELS=W0.CUSTOM_TOOL_SEARCH_NAME=W0.TOOL_SEARCH_TOOL_TYPE=W0.TOOL_SEARCH_TOOL_NAME=void 0;W0.modelSupportsContextEditing=Hoi;W0.modelSupportsInterleavedThinking=ima;W0.modelSupportsMemory=joi;W0.isAnthropicToolSearchEnabled=$oi;W0.isAnthropicCustomToolSearchEnabled=oma;W0.isAnthropicContextEditingEnabled=sma;W0.isAnthropicMemoryToolEnabled=ama;W0.buildContextManagement=Voi;W0.getContextManagementFromConfig=cma;var KRe=fc();W0.TOOL_SEARCH_TOOL_NAME="tool_search_tool_regex";W0.TOOL_SEARCH_TOOL_TYPE="tool_search_tool_regex_20251119";W0.CUSTOM_TOOL_SEARCH_NAME="tool_search";W0.TOOL_SEARCH_SUPPORTED_MODELS=["claude-sonnet-4.5","claude-sonnet-4.6","claude-opus-4.5","claude-opus-4.6"];function Hoi(t){let e=t.toLowerCase().replace(/\./g,"-");return e.includes("1m")?!1:e.startsWith("claude-haiku-4-5")||e.startsWith("claude-sonnet-4-6")||e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-opus-4-6")||e.startsWith("claude-opus-4-5")||e.startsWith("claude-opus-4-1")||e.startsWith("claude-opus-4")}a(Hoi,"modelSupportsContextEditing");function ima(t){let e=t.toLowerCase().replace(/\./g,"-");return e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-haiku-4-5")||e.startsWith("claude-opus-4-5")}a(ima,"modelSupportsInterleavedThinking");function joi(t){let e=t.toLowerCase().replace(/\./g,"-");return e.startsWith("claude-haiku-4-5")||e.startsWith("claude-sonnet-4-6")||e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-opus-4-6")||e.startsWith("claude-opus-4-5")||e.startsWith("claude-opus-4-1")||e.startsWith("claude-opus-4")}a(joi,"modelSupportsMemory");function $oi(t,e){let r=typeof t=="string"?t:t.model;return W0.TOOL_SEARCH_SUPPORTED_MODELS.some(n=>r.toLowerCase().startsWith(n))?e.getConfig(KRe.ConfigKey.AnthropicToolSearchEnabled):!1}a($oi,"isAnthropicToolSearchEnabled");function oma(t,e,r){return $oi(t,e)?e.getExperimentBasedConfig(KRe.ConfigKey.AnthropicToolSearchMode,r)==="client":!1}a(oma,"isAnthropicCustomToolSearchEnabled");function sma(t,e,r){let n=typeof t=="string"?t:t.model;return Hoi(n)?e.getExperimentBasedConfig(KRe.ConfigKey.AnthropicContextEditingMode,r)!=="off":!1}a(sma,"isAnthropicContextEditingEnabled");function ama(t,e,r){let n=typeof t=="string"?t:t.model;return joi(n)?e.getExperimentBasedConfig(KRe.ConfigKey.MemoryToolEnabled,r):!1}a(ama,"isAnthropicMemoryToolEnabled");function Voi(t,e){if(t==="off")return;let r=[];return(t==="clear-thinking"||t==="clear-both")&&e&&r.push({type:"clear_thinking_20251015",keep:{type:"thinking_turns",value:1}}),(t==="clear-tooluse"||t==="clear-both")&&r.push({type:"clear_tool_uses_20250919",trigger:{type:"input_tokens",value:1e5},keep:{type:"tool_uses",value:3}}),r.length>0?{edits:r}:void 0}a(Voi,"buildContextManagement");function cma(t,e,r){let n=t.getExperimentBasedConfig(KRe.ConfigKey.AnthropicContextEditingMode,e);return Voi(n,r)}a(cma,"getContextManagementFromConfig")});var $ct=T(db=>{"use strict";f();Object.defineProperty(db,"__esModule",{value:!0});db.HeaderContributors=db.IHeaderContributors=db.userAgentLibraryHeader=void 0;db.stringifyUrlOrRequestMetadata=Ama;db.createCapiRequestBody=yma;db.canRetryOnceNetworkError=zoi;db.postRequest=Ema;db.getRequest=Cma;var lma=qr(),uma=Kde(),dma=es(),fma=eE(),pma=Rp(),hma=ig(),mma=i3();db.userAgentLibraryHeader="X-VSCode-User-Agent-Library-Version";var gma=30*1e3;function Ama(t){return typeof t=="string"?t:JSON.stringify(t)}a(Ama,"stringifyUrlOrRequestMetadata");function yma(t,e,r){let n={messages:(0,mma.rawMessageToCAPI)(t.messages,r),model:e};return t.postOptions&&Object.assign(n,t.postOptions),n}a(yma,"createCapiRequestBody");function Woi(t,e){let r=t.get(hma.IFetcherService),n=t.get(pma.ITelemetryService),o=t.get(fma.ICAPIClientService),{requestType:s,endpointOrUrl:c,secretKey:l,intent:u,requestId:d,body:p,additionalHeaders:h,cancelToken:m,useFetcher:g,canRetryOnce:A=!0,location:y}=e,E=typeof c=="string"||"type"in c?{modelMaxPromptTokens:0,urlOrRequestMetadata:c,family:"",tokenizer:uma.TokenizerType.O200K,acquireTokenizer:a(()=>{throw new Error("Method not implemented.")},"acquireTokenizer"),name:"",version:""}:c,_=e.requestKindOptions?.kind==="subagent"?"conversation-subagent":e.requestKindOptions?.kind==="background"?"conversation-background":u,v={Authorization:`Bearer ${l}`,"X-Request-Id":d,"OpenAI-Intent":u,"X-GitHub-Api-Version":"2025-05-01",...h,...E.getExtraHeaders?E.getExtraHeaders(y):{}};v["X-Interaction-Type"]=_,v["X-Agent-Task-Id"]=d,E.interceptBody&&E.interceptBody(p);let b=E.getEndpointFetchOptions?.(),I={callSite:`network-request-${u}`,method:s,headers:v,json:p,timeout:gma,useFetcher:g,suppressIntegrationId:b?.suppressIntegrationId};if(m){let x=r.makeAbortController();m.onCancellationRequested(()=>{n.sendGHTelemetryEvent("networking.cancelRequest",{headerRequestId:d}),x.abort()}),I.signal=x.signal}return typeof E.urlOrRequestMetadata=="string"?r.fetch(E.urlOrRequestMetadata,I).catch(R=>{if(A&&zoi(R))return n.sendGHTelemetryEvent("networking.disconnectAll"),r.disconnectAll().then(()=>r.fetch(E.urlOrRequestMetadata,I));throw r.isAbortError(R)?new dma.CancellationError:R}):o.makeRequest(I,E.urlOrRequestMetadata)}a(Woi,"networkRequest");function zoi(t){return["ECONNRESET","ETIMEDOUT","ERR_CONNECTION_RESET","ERR_NETWORK_CHANGED","ERR_HTTP2_INVALID_SESSION","ERR_HTTP2_STREAM_CANCEL","ERR_HTTP2_GOAWAY_SESSION","ERR_HTTP2_PROTOCOL_ERROR","ERR_FAILED"].includes(t?.code)}a(zoi,"canRetryOnceNetworkError");function Ema(t,e){return Woi(t,{...e,requestType:"POST"})}a(Ema,"postRequest");function Cma(t,e){return Woi(t,{...e,requestType:"GET"})}a(Cma,"getRequest");db.IHeaderContributors=(0,lma.createServiceIdentifier)("headerContributors");var w0r=class{static{a(this,"HeaderContributors")}constructor(){this.contributors=[]}add(e){this.contributors.push(e)}remove(e){let r=this.contributors.indexOf(e);r!==-1&&this.contributors.splice(r,1)}contributeHeaders(e){for(let r of this.contributors)r.contributeHeaderValues(e)}size(){return this.contributors.length}};db.HeaderContributors=w0r});var N0r=T(xA=>{"use strict";f();var _ma=xA&&xA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vma=xA&&xA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bma=xA&&xA.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;ozct(n,r),e)}a(Ima,"arrayHash");function xma(t,e){return e=i5(181387,e),Object.keys(t).sort().reduce((r,n)=>(r=k0r(n,r),zct(t[n],r)),e)}a(xma,"objectHash");var wma=a(t=>{if(typeof t=="string"&&t.length<250){let r=new Wct;return r.update(t),Promise.resolve(r.digest())}let e;return typeof t=="string"?e=new TextEncoder().encode(t):t instanceof P0r.VSBuffer?e=t.buffer:e=t,crypto.subtle.digest("sha-1",e).then(Xde)},"hashAsync");xA.hashAsync=wma;function R0r(t,e,r=32){let n=r-e,o=~((1<>>n)>>>0}a(R0r,"leftRotate");function Xde(t,e=32){return t instanceof ArrayBuffer?(0,P0r.encodeHex)(P0r.VSBuffer.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}a(Xde,"toHexString");var Wct=class t{static{a(this,"StringSHA1")}static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let r=e.length;if(r===0)return;let n=this._buff,o=this._buffLen,s=this._leftoverHighSurrogate,c,l;for(s!==0?(c=s,l=-1,s=0):(c=e.charCodeAt(0),l=0);;){let u=c;if(Vct.isHighSurrogate(c))if(l+1>>6,e[r++]=128|(n&63)>>>0):n<65536?(e[r++]=224|(n&61440)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0):(e[r++]=240|(n&1835008)>>>18,e[r++]=128|(n&258048)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Xde(this._h0)+Xde(this._h1)+Xde(this._h2)+Xde(this._h3)+Xde(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,r=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,r.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)e.setUint32(h,R0r(e.getUint32(h-12,!1)^e.getUint32(h-32,!1)^e.getUint32(h-56,!1)^e.getUint32(h-64,!1),1),!1);let n=this._h0,o=this._h1,s=this._h2,c=this._h3,l=this._h4,u,d,p;for(let h=0;h<80;h++)h<20?(u=o&s|~o&c,d=1518500249):h<40?(u=o^s^c,d=1859775393):h<60?(u=o&s|o&c|s&c,d=2400959708):(u=o^s^c,d=3395469782),p=R0r(n,5)+u+l+d+e.getUint32(h*4,!1)&4294967295,l=c,c=s,s=R0r(o,30),o=n,n=p;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+l&4294967295}};xA.StringSHA1=Wct});var Zde=T(JRe=>{"use strict";f();Object.defineProperty(JRe,"__esModule",{value:!0});JRe.TelemetryData=void 0;JRe.eventPropertiesToSimpleObject=Pma;var Rma=Np(),D0r=class t{static{a(this,"TelemetryData")}static{this.keysExemptedFromSanitization=["VSCode.ABExp.Features","abexp.assignmentcontext"]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},Date.now())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=Date.now())}extendWithEditorAgnosticFields(e){this.properties.editor_version=e.getEditorInfo().format(),this.properties.editor_plugin_version=e.getEditorPluginInfo().format(),this.properties.client_machineid=e.machineId,this.properties.client_sessionid=e.sessionId,this.properties.copilot_version=`copilot/${e.getVersion()}`,this.properties.common_extname=e.getEditorPluginInfo().name,this.properties.common_extversion=e.getEditorPluginInfo().version,this.properties.common_vscodeversion=e.getEditorInfo().format()}extendWithConfigProperties(e,r,n){let o=e.dumpConfig();o["copilot.build"]=r.getBuild(),o["copilot.buildType"]=r.getBuildType(),n.trackingId&&(o["copilot.trackingId"]=n.trackingId),n.organizationsList&&(o.organizations_list=n.organizationsList),n.enterpriseList&&(o.enterprise_list=n.enterpriseList),this.properties={...this.properties,...o}}extendWithRequestId(e){let r={completionId:e.completionId,created:e.created.toString(),headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetry=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromPropertiesHack(e,r){if(e)return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetry.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}updateTimeSinceIssuedAndDisplayed(){let e=Date.now()-this.issuedTime;if(this.measurements.timeSinceIssuedMs===void 0&&(this.measurements.timeSinceIssuedMs=e),this.measurements.timeSinceDisplayedMs===void 0&&this.displayedTime!==void 0){let r=Date.now()-this.displayedTime;this.measurements.timeSinceDisplayedMs=r}}makeReadyForSending(e,r,n){this.extendWithConfigProperties(e,r,n),this.extendWithEditorAgnosticFields(r),this.sanitizeKeys(),this.updateTimeSinceIssuedAndDisplayed();for(let o in this.properties)this.properties[o]===void 0&&delete this.properties[o];kma(r,this.properties)}};JRe.TelemetryData=D0r;function Pma(t){if(!t)return;let e={};for(let r in t){let n=t[r];n&&(n.value?e[r]=n.value:e[r]=n)}return e}a(Pma,"eventPropertiesToSimpleObject");function kma(t,e){e.unique_id=(0,Rma.generateUuid)(),e.common_extname=t.getEditorPluginInfo().name,e.common_extversion=t.getEditorPluginInfo().version,e.common_vscodeversion=t.getEditorInfo().format()}a(kma,"addRequiredProperties")});var Yoi=T(M0r=>{"use strict";f();Object.defineProperty(M0r,"__esModule",{value:!0});M0r.extractThinkingDeltaFromChoice=Mma;function Nma(t){if(!t)return"";if(t.cot_summary)return t.cot_summary;if(t.reasoning_text)return t.reasoning_text;if(t.thinking)return t.thinking}a(Nma,"getThinkingDeltaText");function Dma(t){if(t){if(t.cot_id)return t.cot_id;if(t.reasoning_opaque)return t.reasoning_opaque;if(t.signature)return t.signature}}a(Dma,"getThinkingDeltaId");function Mma(t){let e=t.message||t.delta;if(!e)return;let r=Dma(e),n=Nma(e);if(e.reasoning_opaque)return{id:e.reasoning_opaque,text:n,encrypted:e.reasoning_opaque};if(r&&n)return{id:r,text:n};if(n)return{text:n};if(r)return{id:r}}a(Mma,"extractThinkingDeltaFromChoice")});var Jct=T(kJ=>{"use strict";f();Object.defineProperty(kJ,"__esModule",{value:!0});kJ.SSEProcessor=void 0;kJ.splitChunk=Joi;kJ.convertToAPIJsonData=Lma;kJ.sendCommunicationErrorTelemetry=efe;var Yct=L0(),Koi=Zde(),Oma=Yoi(),Kct=CJ(),z0=i3(),XRe=class t{static{a(this,"APIJsonDataStreaming")}constructor(e){this.model=e,this._text=[],this._newText=[]}get text(){return this._text}append(e){if(e.text){let r=t._removeCR(e.text);this._text.push(r),this._newText.push(r)}if(e.delta?.content){let r=t._removeCR(e.delta.content);this._text.push(r),this._newText.push(r)}if(e.delta?.function_call&&(e.delta.function_call.name||e.delta.function_call.arguments)){let r=t._removeCR(e.delta.function_call.arguments);this._text.push(r),this._newText.push(r)}}flush(){let e=this._newText.join("");return this._newText=[],e}static _removeCR(e){return e.replace(/\r$/g,"")}toJSON(){return{text:this._text,newText:this._newText}}},O0r=class{static{a(this,"StreamingToolCall")}constructor(){this.arguments=""}update(e){let r=!1;return e.id&&(this.id=e.id),e.function?.name&&(this.name=e.function.name),e.function?.arguments&&(this.arguments+=e.function.arguments,r=!0),r}},B0r=class{static{a(this,"StreamingToolCalls")}constructor(){this.toolCalls=[]}getToolCalls(){return this.toolCalls.map(e=>({name:e.name,arguments:e.arguments,id:e.id}))}hasToolCalls(){return this.toolCalls.length>0}update(e){let r=[];return e.delta?.tool_calls?.forEach(n=>{let o;n.id&&(o=this.toolCalls.find(c=>c.id===n.id)),o||(o=this.toolCalls.at(-1)),(!o||n.id&&o.id&&o.id!==n.id)&&(o=new O0r,this.toolCalls.push(o)),o.update(n)&&o.name&&r.push({name:o.name,arguments:o.arguments,id:o.id})}),r}};function Joi(t){let e=t.split(` -`),r=e.pop();return[e.filter(n=>n!==""),r]}a(Joi,"splitChunk");var L0r=class t{static{a(this,"SSEProcessor")}constructor(e,r,n,o,s,c){this.logService=e,this.telemetryService=r,this.expectedNumChoices=n,this.response=o,this.body=s,this.cancellationToken=c,this.requestId=(0,Kct.getRequestId)(this.response.headers),this.solutions={},this.completedFunctionCallIdxs=new Map,this.functionCalls={},this.toolCalls=new B0r,this.functionCallName=void 0}static async create(e,r,n,o,s){let c=o.body.pipeThrough(new TextDecoderStream);return new t(e,r,n,o,c,s)}async*processSSE(e=async()=>{}){try{if(this.expectedNumChoices>1)for await(let r of this.processSSEInner(e))(0,z0.isApiUsage)(r)||(yield r);else{let r,n;for await(let o of this.processSSEInner(e))(0,z0.isApiUsage)(o)?n=o:r=o;if(await this.maybeCancel("after receiving the completion, but maybe before we got the usage"))return;r&&(r.usage=n,yield r)}}finally{await this.cancel(),this.logService.info(`request done: requestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`)}}async*processSSEInner(e){let r="",n=!1,o=!0,s=!1;for await(let c of this.body){if(await this.maybeCancel("after awaiting body chunk"))return;let[l,u]=Joi(r+c.toString());r=u;for(let d of l){if(d.startsWith(":"))continue;let p=d.slice(5).trim();if(p==="[DONE]"){yield*this.finishSolutions();return}let h;try{h=JSON.parse(p)}catch{this.logService.error(`Error parsing JSON stream data for request id ${this.requestId.headerRequestId}:${d}`),efe(this.telemetryService,`Error parsing JSON stream data for request id ${this.requestId.headerRequestId}:`,d);continue}if(h.usage&&(yield h.usage),h.copilot_confirmation&&Bma(h.copilot_confirmation)&&await e("",0,{text:"",copilotConfirmation:h.copilot_confirmation}),!h.choices){!h.copilot_references&&!h.copilot_confirmation&&(h.error!==void 0?(this.logService.error(`Error in response for request id ${this.requestId.headerRequestId}:${h.error.message}`),efe(this.telemetryService,`Error in response for request id ${this.requestId.headerRequestId}:`,h.error.message),yield{index:0,finishOffset:void 0,solution:new XRe(h.model||""),reason:z0.FinishedCompletionReason.ServerError,error:h.error,requestId:this.requestId}):(this.logService.error(`Unexpected response with no choices or error for request id ${this.requestId.headerRequestId}`),efe(this.telemetryService,`Unexpected response with no choices or error for request id ${this.requestId.headerRequestId}`))),h.copilot_errors&&await e("",0,{text:"",copilotErrors:h.copilot_errors}),h.copilot_references&&await e("",0,{text:"",copilotReferences:h.copilot_references});continue}this.requestId.created===0&&(this.requestId=(0,Kct.getRequestId)(this.response.headers,h),this.requestId.created===0&&h.choices?.length&&(this.requestId.created=Math.floor(Date.now()/1e3)));for(let m=0;m(I?.vulnAnnotations&&(!Array.isArray(I.vulnAnnotations)||!I.vulnAnnotations.every(x=>(0,Kct.isCopilotAnnotation)(x)))&&(I.vulnAnnotations=void 0),I?.ipCodeCitations&&(!Array.isArray(I.ipCodeCitations)||!I.ipCodeCitations.every(Kct.isCodeCitationAnnotation))&&(I.ipCodeCitations=void 0),E=await e(y.text.join(""),g.index,{text:y.flush(),logprobs:g.logprobs,codeVulnAnnotations:I?.vulnAnnotations,ipCitations:I?.ipCodeCitations,copilotReferences:I?.references,copilotToolCalls:I?.toolCalls,copilotToolCallStreamUpdates:I?.toolCallStreamUpdates,_deprecatedCopilotFunctionCalls:I?.functionCalls,beginToolCalls:I?.beginToolCalls,copilotErrors:I?.errors,thinking:A??I?.thinking}),E!==void 0&&(n=!0),await this.maybeCancel("after awaiting finishedCb")),"emitSolution"),v=!0;if(g.delta?.tool_calls){if(!this.toolCalls.hasToolCalls()){let R=g.delta.tool_calls.at(0),w=R?.function?.name;if(w&&(y.text.length&&y.append({index:0,delta:{content:" "}}),await _({beginToolCalls:[{name:w,id:R?.id}]})))continue}let x=this.toolCalls.update(g);if(x.length&&await _({toolCallStreamUpdates:x}))continue}else if(g.delta?.copilot_annotations?.CodeVulnerability||g.delta?.copilot_annotations?.IPCodeCitations){if(await _()||!n&&(y.append(g),await _({vulnAnnotations:g.delta?.copilot_annotations?.CodeVulnerability,ipCodeCitations:g.delta?.copilot_annotations?.IPCodeCitations})))continue}else if(g.delta?.role==="function"){if(g.delta.content)try{let I=JSON.parse(g.delta.content);if(Array.isArray(I)&&await _({references:I}))continue}catch(I){this.logService.error(`Error parsing function references: ${JSON.stringify(I)}`)}}else if(g.delta?.function_call&&(g.delta.function_call.name||g.delta.function_call.arguments))o=!1,this.functionCallName??=g.delta.function_call.name,this.functionCalls[this.functionCallName]??=new XRe(h.model),this.functionCalls[this.functionCallName].append(g);else if((g.finish_reason===z0.FinishedCompletionReason.FunctionCall||g.finish_reason===z0.FinishedCompletionReason.Stop)&&this.functionCallName){let I=this.functionCalls[this.functionCallName],x={name:this.functionCallName,arguments:I.flush()};this.completedFunctionCallIdxs.set(g.index,"function");try{if(await _({functionCalls:[x]}))continue}catch(R){this.logService.error(R)}if(this.functionCalls[this.functionCallName]=null,this.functionCallName=void 0,g.finish_reason===z0.FinishedCompletionReason.FunctionCall)continue}else v=!1;if((g.finish_reason===z0.FinishedCompletionReason.ToolCalls||g.finish_reason===z0.FinishedCompletionReason.Stop)&&this.toolCalls.hasToolCalls()){v=!0;let I=this.toolCalls.getToolCalls();this.completedFunctionCallIdxs.set(g.index,"tool");let x=I.length>0?I[0].id:void 0;try{if(await _({toolCalls:I,thinking:x&&s?{metadata:{toolId:x}}:void 0}))continue}catch(R){this.logService.error(R)}}if(!(!v&&(y.append(g),await _())||!(g.finish_reason||E!==void 0))){if(yield{solution:y,finishOffset:E,reason:g.finish_reason??z0.FinishedCompletionReason.ClientTrimmed,filterReason:Fma(g),requestId:this.requestId,index:g.index},await this.maybeCancel("after yielding finished choice"))return;o&&(this.solutions[g.index]=null)}}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!==null&&(yield{solution:l,finishOffset:void 0,reason:z0.FinishedCompletionReason.ClientIterationDone,requestId:this.requestId,index:u},await this.maybeCancel("after yielding after iteration done")))return}if(r.length>0&&!n)try{let c=JSON.parse(r);c.error!==void 0&&(this.logService.error(c.error,`Error in response: ${c.error.message}`),efe(this.telemetryService,`Error in response: ${c.error.message}`,c.error))}catch{this.logService.error(`Error parsing extraData for request id ${this.requestId.headerRequestId}: ${r}`),efe(this.telemetryService,`Error parsing extraData for request id ${this.requestId.headerRequestId}: ${r}`)}}async*finishSolutions(){for(let[e,r]of Object.entries(this.solutions)){let n=Number(e);if(r!==null){if(this.completedFunctionCallIdxs.has(n)){yield{solution:r,finishOffset:void 0,reason:this.completedFunctionCallIdxs.get(n)==="function"?z0.FinishedCompletionReason.FunctionCall:z0.FinishedCompletionReason.ToolCalls,requestId:this.requestId,index:n};continue}if(yield{solution:r,finishOffset:void 0,reason:z0.FinishedCompletionReason.ClientDone,requestId:this.requestId,index:n},await this.maybeCancel("after yielding on DONE"))return}}}async maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(this.logService.debug("Cancelled: "+e),await this.cancel(),!0):!1}async cancel(){await this.response.body.destroy()}logChoice(e){let r={...e};delete r.index,delete r.content_filter_results,delete r.content_filter_offsets,this.logService.trace(`choice ${JSON.stringify(r)}`)}};kJ.SSEProcessor=L0r;function Bma(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(Bma,"isCopilotConfirmation");function Lma(t){return{text:t.text.join(""),tokens:t.text}}a(Lma,"convertToAPIJsonData");function Fma(t){if(t.finish_reason===z0.FinishedCompletionReason.ContentFilter){if(t.delta?.copilot_annotations?.TextCopyright)return z0.FilterReason.Copyright;if(t.delta?.copilot_annotations?.Sexual||t.delta?.copilot_annotations?.SexualPattern)return z0.FilterReason.Sexual;if(t.delta?.copilot_annotations?.Violence)return z0.FilterReason.Violence;if(t.delta?.copilot_annotations?.HateSpeech||t.delta?.copilot_annotations?.HateSpeechPattern)return z0.FilterReason.Hate;if(t.delta?.copilot_annotations?.SelfHarm)return z0.FilterReason.SelfHarm;if(t.delta?.copilot_annotations?.PromptPromBlockList)return z0.FilterReason.Prompt;if(t.content_filter_results){for(let e of Object.keys(t.content_filter_results))if(t.content_filter_results[e]?.filtered)return e}}}a(Fma,"choiceToFilterReason");function efe(t,e,r){let n=[e,r],o=n.length>0?JSON.stringify(n):"no msg",s=Koi.TelemetryData.createAndMarkAsIssued({context:"fetch",level:Yct.LogLevel[Yct.LogLevel.Error],message:o});t.sendEnhancedGHTelemetryErrorEvent("log",s.properties,s.measurements);let c=Koi.TelemetryData.createAndMarkAsIssued({context:"fetch",level:Yct.LogLevel[Yct.LogLevel.Error],message:"[redacted]"});t.sendGHTelemetryErrorEvent("log",c.properties,c.measurements)}a(efe,"sendCommunicationErrorTelemetry")});var r2e=T(t2e=>{"use strict";f();Object.defineProperty(t2e,"__esModule",{value:!0});t2e.sendEngineMessagesLengthTelemetry=rsi;t2e.sendEngineMessagesTelemetry=nsi;t2e.prepareChatCompletionForReturn=Kma;var Uma=po(),esi=N0r(),Zct=iw(),tsi=Np(),Qma=zRe(),U0r=Rp(),e2e=Zde(),qma=i3(),Gma=Jct();function rsi(t,e,r,n,o){let s=n?"output":"input",c=r.properties.modelCallId;if(!c){o?.warn("[TELEMETRY] modelCallId not found in telemetryData, input/output messages cannot be linked");return}let l=e.map(p=>{let h={...p,content:typeof p.content=="string"?p.content.length:Array.isArray(p.content)?p.content.reduce((m,g)=>typeof g=="string"?m+g.length:g.type==="text"?m+(g.text?.length||0):m,0):0};return"tool_calls"in p&&p.tool_calls&&Array.isArray(p.tool_calls)&&(h.tool_calls=p.tool_calls.map(m=>({...m,function:m.function?{...m.function,arguments:typeof m.function.arguments=="string"?m.function.arguments.length:m.function.arguments}:m.function}))),h}),u={};for(let[p,h]of Object.entries(r.properties))if(p.startsWith("request.option.tools"))if(typeof h=="string")try{let m=JSON.parse(h);Array.isArray(m)?u[p]=m.length.toString():u[p]=h.length.toString()}catch{u[p]=h.length.toString()}else Array.isArray(h)?u[p]=h.length.toString():u[p]="0";else u[p]=h;let d=e2e.TelemetryData.createAndMarkAsIssued({...u,messagesJson:JSON.stringify(l),message_direction:s,modelCallId:c},r.measurements);t.sendEnhancedGHTelemetryEvent("engine.messages.length",(0,U0r.multiplexProperties)(d.properties),d.measurements),t.sendInternalMSFTTelemetryEvent("engine.messages.length",(0,U0r.multiplexProperties)(d.properties),d.measurements)}a(rsi,"sendEngineMessagesLengthTelemetry");var Xoi=new Zct.LRUCache(1e3),Zoi=new Zct.LRUCache(500),ZRe=new Zct.LRUCache(1e3),Xct={headerRequestId:null},F0r=new Zct.LRUCache(100);function Hma(t){let e=ZRe.get(t);if(e!==void 0){let r=e+1;return ZRe.set(t,r),r}else return ZRe.set(t,1),1}a(Hma,"updateHeaderRequestIdTracker");function jma(t){let e=F0r.get(t);if(e!==void 0){let r=e+1;return F0r.set(t,r),r}else return F0r.set(t,1),1}a(jma,"updateConversationTracker");function $ma(t,e,r){let n={};for(let[h,m]of Object.entries(e.properties))h.startsWith("request.option.")&&(n[h]=m);if(Object.keys(n).length===0)return;let o=e.properties.conversationId||e.properties.sessionId||"unknown",s=e.properties.headerRequestId||"unknown",c=(0,esi.hash)(n).toString(),l=Zoi.get(c);if(!l)l=(0,tsi.generateUuid)(),Zoi.set(c,l);else return l;let u=JSON.stringify(n),d=8e3,p=[];for(let h=0;h{"use strict";f();Object.defineProperty(zo,"__esModule",{value:!0});zo.isHiddenModelA=rga;zo.isHiddenModelE=tlt;zo.isHiddenModelF=rlt;zo.isHiddenModelG=csi;zo.isHiddenFamilyH=nlt;zo.isGpt54=n2e;zo.isGpt54ConcisePromptExp=nga;zo.isGpt54LargePromptExp=iga;zo.isGpt53Codex=q0r;zo.isVSCModelA=ilt;zo.isVSCModelB=olt;zo.isVSCModelC=i2e;zo.isGpt52CodexFamily=G0r;zo.isGpt52Family=H0r;zo.modelPrefersInstructionsInUserMessage=oga;zo.modelPrefersInstructionsAfterHistory=sga;zo.modelSupportsApplyPatch=aga;zo.modelPrefersJsonNotebookRepresentation=cga;zo.modelSupportsReplaceString=lga;zo.modelSupportsMultiReplaceString=lsi;zo.modelCanUseReplaceStringExclusively=uga;zo.modelShouldUseReplaceStringHealing=dga;zo.modelCanUseMcpResultImageURL=fga;zo.modelCanUseImageURL=pga;zo.modelSupportsPDFDocuments=hga;zo.modelCanUseApplyPatchExclusively=mga;zo.modelNeedsStrongReplaceStringHint=gga;zo.modelSupportsSimplifiedApplyPatchInstructions=Aga;zo.isAnthropicFamily=o2e;zo.isGeminiFamily=yga;zo.isMinimaxFamily=slt;zo.isGpt5PlusFamily=j0r;zo.isGptCodexFamily=Ega;zo.isGpt5Family=Cga;zo.isGptFamily=_ga;zo.isGpt51Family=vga;zo.getVerbosityForModelSync=bga;var fI=Gur(),elt=fc(),asi=gd(),Jma=["a99dd17dfee04155d863268596b7f6dd36d0a6531cd326348dbe7416142a21a3","6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95"],isi=["6db59e9bfe6e2ce608c0ee0ade075c64e4d054f05305e3034481234703381bb5"],osi=["6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95","7b667eee9b3517fb9aae7061617fd9cec524859fcd6a20a605bfb142a6b0f14e","1d28f8e6e5af58c60e9a52385314a3c7bc61f7226e1444e31fe60c58c30e8235","e7cfc1a7adaf9e419044e731b7a9e21940a5280a438b472db0c46752dd70eab3","3104045f9b69dbb7a3d76cc8a0aa89eb05e10677c4dd914655ea87f4be000f4e"],ssi=["6db59e9bfe6e2ce608c0ee0ade075c64e4d054f05305e3034481234703381bb5","6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95","7b667eee9b3517fb9aae7061617fd9cec524859fcd6a20a605bfb142a6b0f14e","1d28f8e6e5af58c60e9a52385314a3c7bc61f7226e1444e31fe60c58c30e8235","e7cfc1a7adaf9e419044e731b7a9e21940a5280a438b472db0c46752dd70eab3","3104045f9b69dbb7a3d76cc8a0aa89eb05e10677c4dd914655ea87f4be000f4e"],Xma=["6013de0381f648b7f21518885c02b40b7583adfb33c6d9b64d3aed52c3934798"],Zma=["ab45e8474269b026f668d49860b36850122e18a50d5ea38f3fefdae08261865c","9542d5c077c2bc379f92be32272b14be8b94a8841323465db0d5b3d6f4f0dab0"],ega=["0a4346f806b28b3ce94905c3ac56fcd5ee2337d8613161696aba52eb0c3551cc","2a7b79b0151aa44a0abee17adc0e18df1c07d8d15d7affa989c3b3afb6bee0a0","f3c2984127dd2db50a555194925ca0d55c3c7b676e889c9406b2e6875a67e29c","5a81e6aa7556585ba7c569881d1103683adc9e0124ff7952df423afba2f167b5"],tga=["70fcded3f255d368e868cc807d8838a62108bfa5c86ce7d37966f58cda229e33"];function Q0r(t){return"id"in t?t.id:t.model}a(Q0r,"getModelId");function rga(t){let e=(0,fI.getCachedSha256Hash)(t.family);return Jma.includes(e)}a(rga,"isHiddenModelA");function tlt(t){let e=(0,fI.getCachedSha256Hash)(t.family);return Xma.includes(e)}a(tlt,"isHiddenModelE");function rlt(t){let e=(0,fI.getCachedSha256Hash)(t.family);return Zma.includes(e)}a(rlt,"isHiddenModelF");function csi(t){return(0,fI.getCachedSha256Hash)(t.family)==="0d90e0e579352b8502fc2a46b40961ee941adc26ce67c2b1438f0e4ea97d932f"}a(csi,"isHiddenModelG");function nlt(t){let e=(0,fI.getCachedSha256Hash)(t.family);return tga.includes(e)}a(nlt,"isHiddenFamilyH");function n2e(t){let e=(0,fI.getCachedSha256Hash)(typeof t=="string"?t:t.family);return(typeof t=="string"?t:t.family).startsWith("gpt-5.4")||ega.includes(e)}a(n2e,"isGpt54");function nga(t,e){let r=t.get(elt.IConfigurationService),n=t.get(asi.IExperimentationService);return n2e(e)&&r.getExperimentBasedConfig(elt.ConfigKey.EnableGpt54ConcisePromptExp,n)}a(nga,"isGpt54ConcisePromptExp");function iga(t,e){let r=t.get(elt.IConfigurationService),n=t.get(asi.IExperimentationService);return n2e(e)&&r.getExperimentBasedConfig(elt.ConfigKey.EnableGpt54LargePromptExp,n)}a(iga,"isGpt54LargePromptExp");function q0r(t){return(typeof t=="string"?t:t.family).startsWith("gpt-5.3-codex")}a(q0r,"isGpt53Codex");function ilt(t){let e=(0,fI.getCachedSha256Hash)(Q0r(t)),r=(0,fI.getCachedSha256Hash)(t.family);return isi.includes(e)||isi.includes(r)}a(ilt,"isVSCModelA");function olt(t){let e=(0,fI.getCachedSha256Hash)(Q0r(t)),r=(0,fI.getCachedSha256Hash)(t.family);return osi.includes(e)||osi.includes(r)}a(olt,"isVSCModelB");function i2e(t){let e=(0,fI.getCachedSha256Hash)(Q0r(t)),r=(0,fI.getCachedSha256Hash)(t.family);return ssi.includes(e)||ssi.includes(r)}a(i2e,"isVSCModelC");function G0r(t){return(typeof t=="string"?t:t.family)==="gpt-5.2-codex"}a(G0r,"isGpt52CodexFamily");function H0r(t){return(typeof t=="string"?t:t.family)==="gpt-5.2"}a(H0r,"isGpt52Family");function oga(t){return t.includes("claude-3.5-sonnet")}a(oga,"modelPrefersInstructionsInUserMessage");function sga(t){return t.includes("claude-3.5-sonnet")}a(sga,"modelPrefersInstructionsAfterHistory");function aga(t){return i2e(t)?!1:t.family.startsWith("gpt")&&!t.family.includes("gpt-4o")||t.family==="o4-mini"||G0r(t.family)||q0r(t.family)||ilt(t)||olt(t)||H0r(t.family)||n2e(t)}a(aga,"modelSupportsApplyPatch");function cga(t){return t.family.startsWith("gpt")&&!t.family.includes("gpt-4o")||t.family==="o4-mini"||G0r(t.family)||q0r(t.family)||H0r(t.family)||n2e(t)}a(cga,"modelPrefersJsonNotebookRepresentation");function lga(t){return t.family.toLowerCase().includes("gemini")||t.family.includes("grok-code")||lsi(t)||rlt(t)||slt(t)||nlt(t)}a(lga,"modelSupportsReplaceString");function lsi(t){return o2e(t)||tlt(t)||i2e(t)||slt(t)||nlt(t)}a(lsi,"modelSupportsMultiReplaceString");function uga(t){return o2e(t)||t.family.includes("grok-code")||tlt(t)||t.family.toLowerCase().includes("gemini-3")||i2e(t)||rlt(t)||slt(t)||nlt(t)}a(uga,"modelCanUseReplaceStringExclusively");function dga(t){return t.family.includes("gemini-2")}a(dga,"modelShouldUseReplaceStringHealing");function fga(t){return!o2e(t)&&!tlt(t)}a(fga,"modelCanUseMcpResultImageURL");function pga(t){return!0}a(pga,"modelCanUseImageURL");function hga(t){return o2e(t)}a(hga,"modelSupportsPDFDocuments");function mga(t){return i2e(t)?!1:j0r(t)||ilt(t)||olt(t)}a(mga,"modelCanUseApplyPatchExclusively");function gga(t){return t.family.toLowerCase().includes("gemini")||rlt(t)}a(gga,"modelNeedsStrongReplaceStringHint");function Aga(t){return j0r(t)||ilt(t)||olt(t)}a(Aga,"modelSupportsSimplifiedApplyPatchInstructions");function o2e(t){return t.family.startsWith("claude")||t.family.startsWith("Anthropic")||csi(t)}a(o2e,"isAnthropicFamily");function yga(t){return t.family.toLowerCase().startsWith("gemini")}a(yga,"isGeminiFamily");function slt(t){return t.family.toLowerCase().includes("minimax")}a(slt,"isMinimaxFamily");function j0r(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-5"):!1}a(j0r,"isGpt5PlusFamily");function Ega(t){if(!t)return!1;let e=typeof t=="string"?t:t.family;return!!e.startsWith("gpt-")&&e.includes("-codex")}a(Ega,"isGptCodexFamily");function Cga(t){if(!t)return!1;let e=typeof t=="string"?t:t.family;return e==="gpt-5"||e==="gpt-5-mini"||e==="gpt-5-codex"}a(Cga,"isGpt5Family");function _ga(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-"):!1}a(_ga,"isGptFamily");function vga(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-5.1"):!1}a(vga,"isGpt51Family");function bga(t){if(t.family==="gpt-5.1"||t.family==="gpt-5-mini")return"low"}a(bga,"getVerbosityForModelSync")});var V0r=T(clt=>{"use strict";f();Object.defineProperty(clt,"__esModule",{value:!0});clt.SSEParser=void 0;var $0r=class{static{a(this,"SSEParser")}constructor(e){this.dataBuffer="",this.eventTypeBuffer="",this.buffer=[],this.endedOnCR=!1,this.onEventHandler=e,this.decoder=new TextDecoder("utf-8")}getLastEventId(){return this.lastEventIdBuffer}getReconnectionTime(){return this.reconnectionTime}feed(e){if(e.length===0)return;let r=0;for(this.endedOnCR&&e[0]===10&&r++,this.endedOnCR=!1;r{"use strict";f();Object.defineProperty(yA,"__esModule",{value:!0});yA.PendingLoggedChatRequest=yA.AbstractRequestLogger=yA.IRequestLogger=yA.ChatRequestScheme=void 0;yA.resolveMarkdownContent=_ha;yA.resolveMarkdownIcon=Cha;yA.getCurrentCapturingToken=vha;yA.storeCapturingTokenForCorrelation=bha;yA.retrieveCapturingTokenByCorrelation=Tha;yA.runWithCapturingToken=Sha;var gha=require("async_hooks"),soi=QD(),Aha=qr(),yha=ro(),Eha=wu(),bfr=class t{static{a(this,"ChatRequestScheme")}static{this.chatRequestScheme="ccreq"}static buildUri(e,r="markdown"){let n;return r==="markdown"?n="copilotmd":r==="json"?n="json":n="request.json",e.kind==="latest"?`${t.chatRequestScheme}:latest.${n}`:`${t.chatRequestScheme}:${e.id}.${n}`}static parseUri(e){if(e===this.buildUri({kind:"latest"},"markdown"))return{data:{kind:"latest"},format:"markdown"};if(e===this.buildUri({kind:"latest"},"json"))return{data:{kind:"latest"},format:"json"};if(e===this.buildUri({kind:"latest"},"rawrequest"))return{data:{kind:"latest"},format:"rawrequest"};let r=e.match(/ccreq:([^\s]+)\.copilotmd/);if(r)return{data:{kind:"request",id:r[1]},format:"markdown"};let n=e.match(/ccreq:([^\s]+)\.request\.json/);if(n)return{data:{kind:"request",id:n[1]},format:"rawrequest"};let o=e.match(/ccreq:([^\s]+)\.json/);if(o)return{data:{kind:"request",id:o[1]},format:"json"}}static findAllUris(e){let r=/(ccreq:[^\s]+\.(copilotmd|json|request\.json))/g;return[...e.matchAll(r)].map(n=>{let o=n[1];return{uri:o,range:new Eha.OffsetRange(n.index,n.index+o.length)}})}};yA.ChatRequestScheme=bfr;yA.IRequestLogger=(0,Aha.createServiceIdentifier)("IRequestLogger");function _ha(t){return typeof t.markdownContent=="function"?t.markdownContent():t.markdownContent}a(_ha,"resolveMarkdownContent");function Cha(t){return typeof t.icon=="function"?t.icon():t.icon}a(Cha,"resolveMarkdownIcon");var xwe=new gha.AsyncLocalStorage,Tfr=new Map;function vha(){return xwe.getStore()}a(vha,"getCurrentCapturingToken");function bha(t){let e=xwe.getStore();e&&Tfr.set(t,e)}a(bha,"storeCapturingTokenForCorrelation");function Tha(t){let e=Tfr.get(t);return e&&Tfr.delete(t),e}a(Tha,"retrieveCapturingTokenByCorrelation");function Sha(t,e){return xwe.run(t,e)}a(Sha,"runWithCapturingToken");var Sfr=class extends yha.Disposable{static{a(this,"AbstractRequestLogger")}get promptRendererTracing(){return!1}captureInvocation(e,r){return xwe.run(e,()=>r())}logContentExclusionRules(e,r,n){}logChatRequest(e,r,n){return new aat(this,e,r,n)}enableWorkspaceEditTracing(){}disableWorkspaceEditTracing(){}get currentRequest(){return xwe.getStore()}};yA.AbstractRequestLogger=Sfr;var Ifr=class{static{a(this,"AbstractPendingLoggedRequest")}constructor(e,r,n,o){this._logbook=e,this._debugName=r,this._chatEndpoint=n,this._chatParams=o,this._timeToFirstToken=void 0,this._time=new Date}markTimeToFirstToken(e){this._timeToFirstToken=e}resolveWithCancelation(){this._logbook.addEntry({type:"ChatMLCancelation",debugName:this._debugName,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata})}},aat=class extends Ifr{static{a(this,"PendingLoggedChatRequest")}constructor(e,r,n,o){super(e,r,n,o)}resolve(e,r){e.type===soi.ChatFetchResponseType.Success?this._logbook.addEntry({type:"ChatMLSuccess",debugName:this._debugName,usage:e.usage,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,timeToFirstToken:this._timeToFirstToken,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata,result:e,deltas:r}):this._logbook.addEntry({type:e.type===soi.ChatFetchResponseType.Canceled?"ChatMLCancelation":"ChatMLFailure",debugName:this._debugName,chatEndpoint:this._chatEndpoint,chatParams:this._chatParams,startTime:this._time,endTime:new Date,timeToFirstToken:this._timeToFirstToken,isConversationRequest:this._chatParams.isConversationRequest,customMetadata:this._chatParams.customMetadata,result:e})}};yA.PendingLoggedChatRequest=aat});var wfr=T(Jue=>{"use strict";f();Object.defineProperty(Jue,"__esModule",{value:!0});Jue.NullSnippyService=Jue.ISnippyService=void 0;var Iha=qr();Jue.ISnippyService=(0,Iha.createServiceIdentifier)("ISnippyService");var xfr=class{static{a(this,"NullSnippyService")}async handlePostInsertion(){}};Jue.NullSnippyService=xfr});var kfr=T(Xue=>{"use strict";f();Object.defineProperty(Xue,"__esModule",{value:!0});Xue.MovedText=Xue.LinesDiff=void 0;var Rfr=class{static{a(this,"LinesDiff")}constructor(e,r,n){this.changes=e,this.moves=r,this.hitTimeout=n}};Xue.LinesDiff=Rfr;var Pfr=class t{static{a(this,"MovedText")}constructor(e,r){this.lineRangeMapping=e,this.changes=r}flip(){return new t(this.lineRangeMapping.flip(),this.changes.map(e=>e.flip()))}};Xue.MovedText=Pfr});var lat=T(VR=>{"use strict";f();Object.defineProperty(VR,"__esModule",{value:!0});VR.RangeMapping=VR.DetailedLineRangeMapping=VR.LineRangeMapping=void 0;VR.lineRangeMappingFromRangeMappings=wha;VR.getLineRangeMapping=uoi;VR.lineRangeMappingFromChange=Rha;var xha=Lc(),aoi=Hl(),cat=Ko(),AC=N5(),$R=qE(),qD=ff(),loi=iIe(),wwe=class t{static{a(this,"LineRangeMapping")}static inverse(e,r,n){let o=[],s=1,c=1;for(let u of e){let d=new t(new AC.LineRange(s,u.original.startLineNumber),new AC.LineRange(c,u.modified.startLineNumber));d.modified.isEmpty||o.push(d),s=u.original.endLineNumberExclusive,c=u.modified.endLineNumberExclusive}let l=new t(new AC.LineRange(s,r+1),new AC.LineRange(c,n+1));return l.modified.isEmpty||o.push(l),o}static clip(e,r,n){let o=[];for(let s of e){let c=s.original.intersect(r),l=s.modified.intersect(n);c&&!c.isEmpty&&l&&!l.isEmpty&&o.push(new t(c,l))}return o}constructor(e,r){this.original=e,this.modified=r}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}get changedLineCount(){return Math.max(this.original.length,this.modified.length)}toRangeMapping(){let e=this.original.toInclusiveRange(),r=this.modified.toInclusiveRange();if(e&&r)return new VB(e,r);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new cat.BugIndicatingError("not a valid diff");return new VB(new qD.Range(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new qD.Range(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new VB(new qD.Range(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new qD.Range(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,r){if(coi(this.original.endLineNumberExclusive,e)&&coi(this.modified.endLineNumberExclusive,r))return new VB(new qD.Range(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new qD.Range(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new VB(qD.Range.fromPositions(new $R.Position(this.original.startLineNumber,1),Zue(new $R.Position(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),qD.Range.fromPositions(new $R.Position(this.modified.startLineNumber,1),Zue(new $R.Position(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new VB(qD.Range.fromPositions(Zue(new $R.Position(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Zue(new $R.Position(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),qD.Range.fromPositions(Zue(new $R.Position(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),r),Zue(new $R.Position(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));throw new cat.BugIndicatingError}};VR.LineRangeMapping=wwe;function Zue(t,e){if(t.lineNumber<1)return new $R.Position(1,1);if(t.lineNumber>e.length)return new $R.Position(e.length,e[e.length-1].length+1);let r=e[t.lineNumber-1];return t.column>r.length+1?new $R.Position(t.lineNumber,r.length+1):t}a(Zue,"normalizePosition");function coi(t,e){return t>=1&&t<=e.length}a(coi,"isValidLineNumber");var Rwe=class t extends wwe{static{a(this,"DetailedLineRangeMapping")}static toTextEdit(e,r){let n=[];for(let o of e)for(let s of o.innerChanges??[]){let c=s.toTextEdit(r);n.push(c)}return new loi.TextEdit(n)}static fromRangeMappings(e){let r=AC.LineRange.join(e.map(o=>AC.LineRange.fromRangeInclusive(o.originalRange))),n=AC.LineRange.join(e.map(o=>AC.LineRange.fromRangeInclusive(o.modifiedRange)));return new t(r,n,e)}constructor(e,r,n){super(e,r),this.innerChanges=n}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}};VR.DetailedLineRangeMapping=Rwe;var VB=class t{static{a(this,"RangeMapping")}static fromEdit(e){let r=e.getNewRanges();return e.replacements.map((o,s)=>new t(o.range,r[s]))}static fromEditJoin(e){let r=e.getNewRanges(),n=e.replacements.map((o,s)=>new t(o.range,r[s]));return t.join(n)}static join(e){if(e.length===0)throw new cat.BugIndicatingError("Cannot join an empty list of range mappings");let r=e[0];for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let r=e.getValueOfRange(this.modifiedRange);return new loi.TextReplacement(this.originalRange,r)}join(e){return new t(this.originalRange.plusRange(e.originalRange),this.modifiedRange.plusRange(e.modifiedRange))}};VR.RangeMapping=VB;function wha(t,e,r,n=!1){let o=[];for(let s of(0,xha.groupAdjacentBy)(t.map(c=>uoi(c,e,r)),(c,l)=>c.original.intersectsOrTouches(l.original)||c.modified.intersectsOrTouches(l.modified))){let c=s[0],l=s[s.length-1];o.push(new Rwe(c.original.join(l.original),c.modified.join(l.modified),s.map(u=>u.innerChanges[0])))}return(0,aoi.assertFn)(()=>!n&&o.length>0&&(o[0].modified.startLineNumber!==o[0].original.startLineNumber||r.length.lineCount-o[o.length-1].modified.endLineNumberExclusive!==e.length.lineCount-o[o.length-1].original.endLineNumberExclusive)?!1:(0,aoi.checkAdjacentItems)(o,(s,c)=>c.original.startLineNumber-s.original.endLineNumberExclusive===c.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=r.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+o&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+o&&(n=1);let s=new AC.LineRange(t.originalRange.startLineNumber+n,t.originalRange.endLineNumber+1+o),c=new AC.LineRange(t.modifiedRange.startLineNumber+n,t.modifiedRange.endLineNumber+1+o);return new Rwe(s,c,[t])}a(uoi,"getLineRangeMapping");function Rha(t){let e;t.originalEndLineNumber===0?e=new AC.LineRange(t.originalStartLineNumber+1,t.originalStartLineNumber+1):e=new AC.LineRange(t.originalStartLineNumber,t.originalEndLineNumber+1);let r;return t.modifiedEndLineNumber===0?r=new AC.LineRange(t.modifiedStartLineNumber+1,t.modifiedStartLineNumber+1):r=new AC.LineRange(t.modifiedStartLineNumber,t.modifiedEndLineNumber+1),new wwe(e,r)}a(Rha,"lineRangeMappingFromChange")});var tde=T(XS=>{"use strict";f();Object.defineProperty(XS,"__esModule",{value:!0});XS.DateTimeout=XS.InfiniteTimeout=XS.OffsetPair=XS.SequenceDiff=XS.DiffAlgorithmResult=void 0;var Pha=Lc(),doi=Ko(),ede=wu(),Dfr=class t{static{a(this,"DiffAlgorithmResult")}static trivial(e,r){return new t([new Pwe(ede.OffsetRange.ofLength(e.length),ede.OffsetRange.ofLength(r.length))],!1)}static trivialTimedOut(e,r){return new t([new Pwe(ede.OffsetRange.ofLength(e.length),ede.OffsetRange.ofLength(r.length))],!0)}constructor(e,r){this.diffs=e,this.hitTimeout=r}};XS.DiffAlgorithmResult=Dfr;var Pwe=class t{static{a(this,"SequenceDiff")}static invert(e,r){let n=[];return(0,Pha.forEachAdjacent)(e,(o,s)=>{n.push(t.fromOffsetPairs(o?o.getEndExclusives():PK.zero,s?s.getStarts():new PK(r,(o?o.seq2Range.endExclusive-o.seq1Range.endExclusive:0)+r)))}),n}static fromOffsetPairs(e,r){return new t(new ede.OffsetRange(e.offset1,r.offset1),new ede.OffsetRange(e.offset2,r.offset2))}static assertSorted(e){let r;for(let n of e){if(r&&!(r.seq1Range.endExclusive<=n.seq1Range.start&&r.seq2Range.endExclusive<=n.seq2Range.start))throw new doi.BugIndicatingError("Sequence diffs must be sorted");r=n}}constructor(e,r){this.seq1Range=e,this.seq2Range=r}swap(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new t(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new t(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new t(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new t(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersectsOrTouches(e){return this.seq1Range.intersectsOrTouches(e.seq1Range)||this.seq2Range.intersectsOrTouches(e.seq2Range)}intersect(e){let r=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!r||!n))return new t(r,n)}getStarts(){return new PK(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new PK(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}};XS.SequenceDiff=Pwe;var PK=class t{static{a(this,"OffsetPair")}static{this.zero=new t(0,0)}static{this.max=new t(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,r){this.offset1=e,this.offset2=r}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new t(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};XS.OffsetPair=PK;var Nfr=class t{static{a(this,"InfiniteTimeout")}static{this.instance=new t}isValid(){return!0}};XS.InfiniteTimeout=Nfr;var Mfr=class{static{a(this,"DateTimeout")}constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new doi.BugIndicatingError("timeout must be positive")}isValid(){return!(Date.now()-this.startTime!0,this.valid=!0}};XS.DateTimeout=Mfr});var uat=T(kK=>{"use strict";f();Object.defineProperty(kK,"__esModule",{value:!0});kK.LineRangeFragment=kK.Array2D=void 0;kK.isSpace=kha;var Ofr=class{static{a(this,"Array2D")}constructor(e,r){this.width=e,this.height=r,this.array=[],this.array=new Array(e*r)}get(e,r){return this.array[e+r*this.width]}set(e,r,n){this.array[e+r*this.width]=n}};kK.Array2D=Ofr;function kha(t){return t===32||t===9}a(kha,"isSpace");var Bfr=class t{static{a(this,"LineRangeFragment")}static{this.chrKeys=new Map}static getKey(e){let r=this.chrKeys.get(e);return r===void 0&&(r=this.chrKeys.size,this.chrKeys.set(e,r)),r}constructor(e,r,n){this.range=e,this.lines=r,this.source=n,this.histogram=[];let o=0;for(let s=e.startLineNumber-1;s{"use strict";f();Object.defineProperty(dat,"__esModule",{value:!0});dat.DynamicProgrammingDiffing=void 0;var foi=wu(),kwe=tde(),Lfr=uat(),Ffr=class{static{a(this,"DynamicProgrammingDiffing")}compute(e,r,n=kwe.InfiniteTimeout.instance,o){if(e.length===0||r.length===0)return kwe.DiffAlgorithmResult.trivial(e,r);let s=new Lfr.Array2D(e.length,r.length),c=new Lfr.Array2D(e.length,r.length),l=new Lfr.Array2D(e.length,r.length);for(let A=0;A0&&y>0&&c.get(A-1,y-1)===3&&(v+=l.get(A-1,y-1)),v+=o?o(A,y):1):v=-1;let b=Math.max(E,_,v);if(b===v){let I=A>0&&y>0?l.get(A-1,y-1):0;l.set(A,y,I+1),c.set(A,y,3)}else b===E?(l.set(A,y,0),c.set(A,y,1)):b===_&&(l.set(A,y,0),c.set(A,y,2));s.set(A,y,b)}let u=[],d=e.length,p=r.length;function h(A,y){(A+1!==d||y+1!==p)&&u.push(new kwe.SequenceDiff(new foi.OffsetRange(A+1,d),new foi.OffsetRange(y+1,p))),d=A,p=y}a(h,"reportDecreasingAligningPositions");let m=e.length-1,g=r.length-1;for(;m>=0&&g>=0;)c.get(m,g)===3?(h(m,g),m--,g--):c.get(m,g)===1?m--:g--;return h(-1,-1),u.reverse(),new kwe.DiffAlgorithmResult(u,!1)}};dat.DynamicProgrammingDiffing=Ffr});var Gfr=T(pat=>{"use strict";f();Object.defineProperty(pat,"__esModule",{value:!0});pat.MyersDiffAlgorithm=void 0;var hoi=wu(),Dwe=tde(),Ufr=class{static{a(this,"MyersDiffAlgorithm")}compute(e,r,n=Dwe.InfiniteTimeout.instance){if(e.length===0||r.length===0)return Dwe.DiffAlgorithmResult.trivial(e,r);let o=e,s=r;function c(y,E){for(;yo.length||x>s.length)continue;let w=c(I,x);u.set(p,w);let R=I===v?d.get(p+1):d.get(p-1);if(d.set(p,w!==I?new fat(R,I,x,w-I):R),u.get(p)===o.length&&u.get(p)-p===s.length)break e}}let h=d.get(p),m=[],g=o.length,A=s.length;for(;;){let y=h?h.x+h.length:0,E=h?h.y+h.length:0;if((y!==g||E!==A)&&m.push(new Dwe.SequenceDiff(new hoi.OffsetRange(y,g),new hoi.OffsetRange(E,A))),!h)break;g=h.x,A=h.y,h=h.prev}return m.reverse(),new Dwe.DiffAlgorithmResult(m,!1)}};pat.MyersDiffAlgorithm=Ufr;var fat=class{static{a(this,"SnakePath")}constructor(e,r,n,o){this.prev=e,this.x=r,this.y=n,this.length=o}},Qfr=class{static{a(this,"FastInt32Array")}constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,r){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=r}else{if(e>=this.positiveArr.length){let n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=r}}},qfr=class{static{a(this,"FastArrayNegativeIndices")}constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,r){e<0?(e=-e-1,this.negativeArr[e]=r):this.positiveArr[e]=r}}});var $fr=T(mat=>{"use strict";f();Object.defineProperty(mat,"__esModule",{value:!0});mat.LinesSliceCharSequence=void 0;var Hfr=tF(),hat=wu(),Dha=qE(),moi=ff(),Nha=uat(),jfr=class{static{a(this,"LinesSliceCharSequence")}constructor(e,r,n){this.lines=e,this.range=r,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let o=this.range.startLineNumber;o<=this.range.endLineNumber;o++){let s=e[o-1],c=0;o===this.range.startLineNumber&&this.range.startColumn>1&&(c=this.range.startColumn-1,s=s.substring(c)),this.lineStartOffsets.push(c);let l=0;if(!n){let d=s.trimStart();l=s.length-d.length,s=d.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);let u=o===this.range.endLineNumber?Math.min(this.range.endColumn-1-c-l,s.length):s.length;for(let d=0;dString.fromCharCode(r)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let r=yoi(e>0?this.elements[e-1]:-1),n=yoi(es<=e),o=e-this.firstElementOffsetByLineIdx[n];return new Dha.Position(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+o+(o===0&&r==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){let r=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(r)?moi.Range.fromPositions(n,n):moi.Range.fromPositions(r,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!rde(this.elements[e]))return;let r=e;for(;r>0&&rde(this.elements[r-1]);)r--;let n=e;for(;n=this.elements.length||!rde(this.elements[e]))return;let r=e;for(;r>0&&rde(this.elements[r-1])&&!goi(this.elements[r]);)r--;let n=e;for(;no<=e.start)??0,n=(0,Hfr.findFirstMonotonous)(this.firstElementOffsetByLineIdx,o=>e.endExclusive<=o)??this.elements.length;return new hat.OffsetRange(r,n)}};mat.LinesSliceCharSequence=jfr;function rde(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}a(rde,"isWordChar");function goi(t){return t>=65&&t<=90}a(goi,"isUpperCase");var Mha={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Aoi(t){return Mha[t]}a(Aoi,"getCategoryBoundaryScore");function yoi(t){return t===10?8:t===13?7:(0,Nha.isSpace)(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}a(yoi,"getCategory")});var voi=T(Vfr=>{"use strict";f();Object.defineProperty(Vfr,"__esModule",{value:!0});Vfr.computeMovedLines=Fha;var Oha=tde(),gat=lat(),GD=Lc(),Nwe=tF(),Bha=Wx(),yC=N5(),Eoi=$fr(),Aat=uat(),Lha=Gfr(),_oi=ff();function Fha(t,e,r,n,o,s){let{moves:c,excludedChanges:l}=Qha(t,e,r,s);if(!s.isValid())return[];let u=t.filter(p=>!l.has(p)),d=qha(u,n,o,e,r,s);return(0,GD.pushMany)(c,d),c=Gha(c),c=c.filter(p=>{let h=p.original.toOffsetRange().slice(e).map(g=>g.trim());return h.join(` +`).length>=15&&Uha(h,g=>g.length>=2)>=2}),c=Hha(t,c),c}a(Fha,"computeMovedLines");function Uha(t,e){let r=0;for(let n of t)e(n)&&r++;return r}a(Uha,"countWhere");function Qha(t,e,r,n){let o=[],s=t.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Aat.LineRangeFragment(u.original,e,u)),c=new Set(t.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Aat.LineRangeFragment(u.modified,r,u))),l=new Set;for(let u of s){let d=-1,p;for(let h of c){let m=u.computeSimilarity(h);m>d&&(d=m,p=h)}if(d>.9&&p&&(c.delete(p),o.push(new gat.LineRangeMapping(u.range,p.range)),l.add(u.source),l.add(p.source)),!n.isValid())return{moves:o,excludedChanges:l}}return{moves:o,excludedChanges:l}}a(Qha,"computeMovesFromSimpleDeletionsToSimpleInsertions");function qha(t,e,r,n,o,s){let c=[],l=new Bha.SetMap;for(let m of t)for(let g=m.original.startLineNumber;gm.modified.startLineNumber,GD.numberComparator));for(let m of t){let g=[];for(let A=m.modified.startLineNumber;A{for(let I of g)if(I.originalLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive&&I.modifiedLineRange.endLineNumberExclusive+1===E.endLineNumberExclusive){I.originalLineRange=new yC.LineRange(I.originalLineRange.startLineNumber,v.endLineNumberExclusive),I.modifiedLineRange=new yC.LineRange(I.modifiedLineRange.startLineNumber,E.endLineNumberExclusive),_.push(I);return}let b={modifiedLineRange:E,originalLineRange:v};u.push(b),_.push(b)}),g=_}if(!s.isValid())return[]}u.sort((0,GD.reverseOrder)((0,GD.compareBy)(m=>m.modifiedLineRange.length,GD.numberComparator)));let d=new yC.LineRangeSet,p=new yC.LineRangeSet;for(let m of u){let g=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,A=d.subtractFrom(m.modifiedLineRange),y=p.subtractFrom(m.originalLineRange).getWithDelta(g),E=A.getIntersection(y);for(let _ of E.ranges){if(_.length<3)continue;let v=_,b=_.delta(-g);c.push(new gat.LineRangeMapping(b,v)),d.addRange(v),p.addRange(b)}}c.sort((0,GD.compareBy)(m=>m.original.startLineNumber,GD.numberComparator));let h=new Nwe.MonotonousArray(t);for(let m=0;mw.original.startLineNumber<=g.original.startLineNumber),y=(0,Nwe.findLastMonotonous)(t,w=>w.modified.startLineNumber<=g.modified.startLineNumber),E=Math.max(g.original.startLineNumber-A.original.startLineNumber,g.modified.startLineNumber-y.modified.startLineNumber),_=h.findLastMonotonous(w=>w.original.startLineNumberw.modified.startLineNumbern.length||R>o.length||d.contains(R)||p.contains(w)||!Coi(n[w-1],o[R-1],s))break}I>0&&(p.addRange(new yC.LineRange(g.original.startLineNumber-I,g.original.startLineNumber)),d.addRange(new yC.LineRange(g.modified.startLineNumber-I,g.modified.startLineNumber)));let x;for(x=0;xn.length||R>o.length||d.contains(R)||p.contains(w)||!Coi(n[w-1],o[R-1],s))break}x>0&&(p.addRange(new yC.LineRange(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+x)),d.addRange(new yC.LineRange(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+x))),(I>0||x>0)&&(c[m]=new gat.LineRangeMapping(new yC.LineRange(g.original.startLineNumber-I,g.original.endLineNumberExclusive+x),new yC.LineRange(g.modified.startLineNumber-I,g.modified.endLineNumberExclusive+x)))}return c}a(qha,"computeUnchangedMoves");function Coi(t,e,r){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let o=new Lha.MyersDiffAlgorithm().compute(new Eoi.LinesSliceCharSequence([t],new _oi.Range(1,1,1,t.length),!1),new Eoi.LinesSliceCharSequence([e],new _oi.Range(1,1,1,e.length),!1),r),s=0,c=Oha.SequenceDiff.invert(o.diffs,t.length);for(let p of c)p.seq1Range.forEach(h=>{(0,Aat.isSpace)(t.charCodeAt(h))||s++});function l(p){let h=0;for(let m=0;me.length?t:e);return s/u>.6&&u>10}a(Coi,"areLinesSimilar");function Gha(t){if(t.length===0)return t;t.sort((0,GD.compareBy)(r=>r.original.startLineNumber,GD.numberComparator));let e=[t[0]];for(let r=1;r=0&&c>=0&&s+c<=2){e[e.length-1]=n.join(o);continue}e.push(o)}return e}a(Gha,"joinCloseConsecutiveMoves");function Hha(t,e){let r=new Nwe.MonotonousArray(t);return e=e.filter(n=>{let o=r.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber{"use strict";f();Object.defineProperty(DK,"__esModule",{value:!0});DK.optimizeSequenceDiffs=$ha;DK.removeShortMatches=Wha;DK.extendDiffsToEntireWordIfAppropriate=zha;DK.removeVeryShortMatchingLinesBetweenDiffs=Kha;DK.removeVeryShortMatchingTextBetweenLongDiffs=Jha;var jha=Lc(),HD=wu(),jD=tde();function $ha(t,e,r){let n=r;return n=boi(t,e,n),n=boi(t,e,n),n=Vha(t,e,n),n}a($ha,"optimizeSequenceDiffs");function boi(t,e,r){if(r.length===0)return r;let n=[];n.push(r[0]);for(let s=1;s0&&(l=l.delta(d))}o.push(l)}return n.length>0&&o.push(n[n.length-1]),o}a(boi,"joinSequenceDiffsByShifting");function Vha(t,e,r){if(!t.getBoundaryScore||!e.getBoundaryScore)return r;for(let n=0;n0?r[n-1]:void 0,s=r[n],c=n+1=n.start&&t.seq2Range.start-c>=o.start&&r.isStronglyEqual(t.seq2Range.start-c,t.seq2Range.endExclusive-c)&&c<100;)c++;c--;let l=0;for(;t.seq1Range.start+ld&&(d=A,u=p)}return t.delta(u)}a(Toi,"shiftDiffToBetterPosition");function Wha(t,e,r){let n=[];for(let o of r){let s=n[n.length-1];if(!s){n.push(o);continue}o.seq1Range.start-s.seq1Range.endExclusive<=2||o.seq2Range.start-s.seq2Range.endExclusive<=2?n[n.length-1]=new jD.SequenceDiff(s.seq1Range.join(o.seq1Range),s.seq2Range.join(o.seq2Range)):n.push(o)}return n}a(Wha,"removeShortMatches");function zha(t,e,r,n,o=!1){let s=jD.SequenceDiff.invert(r,t.length),c=[],l=new jD.OffsetPair(0,0);function u(p,h){if(p.offset10;){let v=s[0];if(!(v.seq1Range.intersects(A.seq1Range)||v.seq2Range.intersects(A.seq2Range)))break;let I=n(t,v.seq1Range.start),x=n(e,v.seq2Range.start),w=new jD.SequenceDiff(I,x),R=w.intersect(v);if(E+=R.seq1Range.length,_+=R.seq2Range.length,A=A.join(w),A.seq1Range.endExclusive>=v.seq1Range.endExclusive)s.shift();else break}(o&&E+_0;){let p=s.shift();p.seq1Range.isEmpty||(u(p.getStarts(),p),u(p.getEndExclusives().delta(-1),p))}return Yha(r,c)}a(zha,"extendDiffsToEntireWordIfAppropriate");function Yha(t,e){let r=[];for(;t.length>0||e.length>0;){let n=t[0],o=e[0],s;n&&(!o||n.seq1Range.start0&&r[r.length-1].seq1Range.endExclusive>=s.seq1Range.start?r[r.length-1]=r[r.length-1].join(s):r.push(s)}return r}a(Yha,"mergeSequenceDiffs");function Kha(t,e,r){let n=r;if(n.length===0)return n;let o=0,s;do{s=!1;let c=[n[0]];for(let l=1;l5||g.seq1Range.length+g.seq2Range.length>5)};a(p,"shouldJoinDiffs");let u=n[l],d=c[c.length-1];p(d,u)?(s=!0,c[c.length-1]=c[c.length-1].join(u)):c.push(u)}n=c}while(o++<10&&s);return n}a(Kha,"removeVeryShortMatchingLinesBetweenDiffs");function Jha(t,e,r){let n=r;if(n.length===0)return n;let o=0,s;do{s=!1;let l=[n[0]];for(let u=1;u5||y.length>500)return!1;let _=t.getText(y).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let v=t.countLinesIn(g.seq1Range),b=g.seq1Range.length,I=e.countLinesIn(g.seq2Range),x=g.seq2Range.length,w=t.countLinesIn(A.seq1Range),R=A.seq1Range.length,P=e.countLinesIn(A.seq2Range),k=A.seq2Range.length,Q=130;function M(N){return Math.min(N,Q)}return a(M,"cap"),Math.pow(Math.pow(M(v*40+b),1.5)+Math.pow(M(I*40+x),1.5),1.5)+Math.pow(Math.pow(M(w*40+R),1.5)+Math.pow(M(P*40+k),1.5),1.5)>(Q**1.5)**1.5*1.3};a(h,"shouldJoinDiffs");let d=n[u],p=l[l.length-1];h(p,d)?(s=!0,l[l.length-1]=l[l.length-1].join(d)):l.push(d)}n=l}while(o++<10&&s);let c=[];return(0,jha.forEachWithNeighbors)(n,(l,u,d)=>{let p=u;function h(_){return _.length>0&&_.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}a(h,"shouldMarkAsChanged");let m=t.extendToFullLines(u.seq1Range),g=t.getText(new HD.OffsetRange(m.start,u.seq1Range.start));h(g)&&(p=p.deltaStart(-g.length));let A=t.getText(new HD.OffsetRange(u.seq1Range.endExclusive,m.endExclusive));h(A)&&(p=p.deltaEnd(A.length));let y=jD.SequenceDiff.fromOffsetPairs(l?l.getEndExclusives():jD.OffsetPair.zero,d?d.getStarts():jD.OffsetPair.max),E=p.intersect(y);c.length>0&&E.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(E):c.push(E)}),c}a(Jha,"removeVeryShortMatchingTextBetweenLongDiffs")});var xoi=T(yat=>{"use strict";f();Object.defineProperty(yat,"__esModule",{value:!0});yat.LineSequence=void 0;var Wfr=class{static{a(this,"LineSequence")}constructor(e,r){this.trimmedHash=e,this.lines=r}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let r=e===0?0:Ioi(this.lines[e-1]),n=e===this.lines.length?0:Ioi(this.lines[e]);return 1e3-(r+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,r){return this.lines[e]===this.lines[r]}};yat.LineSequence=Wfr;function Ioi(t){let e=0;for(;e{"use strict";f();Object.defineProperty(vat,"__esModule",{value:!0});vat.DefaultLinesDiffComputer=void 0;var Xha=Lc(),woi=Hl(),Cat=N5(),Roi=wu(),Poi=ff(),Eat=xv(),_at=kfr(),MK=lat(),$D=tde(),Zha=poi(),ema=Gfr(),tma=voi(),NK=Soi(),koi=xoi(),Doi=$fr(),zfr=class{static{a(this,"DefaultLinesDiffComputer")}constructor(){this.dynamicProgrammingDiffing=new Zha.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new ema.MyersDiffAlgorithm}computeDiff(e,r,n){if(e.length<=1&&(0,Xha.equals)(e,r,(R,P)=>R===P))return new _at.LinesDiff([],[],!1);if(e.length===1&&e[0].length===0||r.length===1&&r[0].length===0)return new _at.LinesDiff([new MK.DetailedLineRangeMapping(new Cat.LineRange(1,e.length+1),new Cat.LineRange(1,r.length+1),[new MK.RangeMapping(new Poi.Range(1,1,e.length,e[e.length-1].length+1),new Poi.Range(1,1,r.length,r[r.length-1].length+1))])],[],!1);let o=n.maxComputationTimeMs===0?$D.InfiniteTimeout.instance:new $D.DateTimeout(n.maxComputationTimeMs),s=!n.ignoreTrimWhitespace,c=new Map;function l(R){let P=c.get(R);return P===void 0&&(P=c.size,c.set(R,P)),P}a(l,"getOrCreateHash");let u=e.map(R=>l(R.trim())),d=r.map(R=>l(R.trim())),p=new koi.LineSequence(u,e),h=new koi.LineSequence(d,r),m=p.length+h.length<1700?this.dynamicProgrammingDiffing.compute(p,h,o,(R,P)=>e[R]===r[P]?r[P].length===0?.1:1+Math.log(1+r[P].length):.99):this.myersDiffingAlgorithm.compute(p,h,o),g=m.diffs,A=m.hitTimeout;g=(0,NK.optimizeSequenceDiffs)(p,h,g),g=(0,NK.removeVeryShortMatchingLinesBetweenDiffs)(p,h,g);let y=[],E=a(R=>{if(s)for(let P=0;PR.seq1Range.start-_===R.seq2Range.start-v);let P=R.seq1Range.start-_;E(P),_=R.seq1Range.endExclusive,v=R.seq2Range.endExclusive;let k=this.refineDiff(e,r,R,o,s,n);k.hitTimeout&&(A=!0);for(let Q of k.mappings)y.push(Q)}E(e.length-_);let b=new Eat.ArrayText(e),I=new Eat.ArrayText(r),x=(0,MK.lineRangeMappingFromRangeMappings)(y,b,I),w=[];return n.computeMoves&&(w=this.computeMoves(x,e,r,u,d,o,s,n)),(0,woi.assertFn)(()=>{function R(k,Q){if(k.lineNumber<1||k.lineNumber>Q.length)return!1;let M=Q[k.lineNumber-1];return!(k.column<1||k.column>M.length+1)}a(R,"validatePosition");function P(k,Q){return!(k.startLineNumber<1||k.startLineNumber>Q.length+1||k.endLineNumberExclusive<1||k.endLineNumberExclusive>Q.length+1)}a(P,"validateRange");for(let k of x){if(!k.innerChanges)return!1;for(let Q of k.innerChanges)if(!(R(Q.modifiedRange.getStartPosition(),r)&&R(Q.modifiedRange.getEndPosition(),r)&&R(Q.originalRange.getStartPosition(),e)&&R(Q.originalRange.getEndPosition(),e)))return!1;if(!P(k.modified,r)||!P(k.original,e))return!1}return!0}),new _at.LinesDiff(x,w,A)}computeMoves(e,r,n,o,s,c,l,u){return(0,tma.computeMovedLines)(e,r,n,o,s,c).map(h=>{let m=this.refineDiff(r,n,new $D.SequenceDiff(h.original.toOffsetRange(),h.modified.toOffsetRange()),c,l,u),g=(0,MK.lineRangeMappingFromRangeMappings)(m.mappings,new Eat.ArrayText(r),new Eat.ArrayText(n),!0);return new _at.MovedText(h,g)})}refineDiff(e,r,n,o,s,c){let u=rma(n).toRangeMapping2(e,r),d=new Doi.LinesSliceCharSequence(e,u.originalRange,s),p=new Doi.LinesSliceCharSequence(r,u.modifiedRange,s),h=d.length+p.length<500?this.dynamicProgrammingDiffing.compute(d,p,o):this.myersDiffingAlgorithm.compute(d,p,o),m=!1,g=h.diffs;m&&$D.SequenceDiff.assertSorted(g),g=(0,NK.optimizeSequenceDiffs)(d,p,g),m&&$D.SequenceDiff.assertSorted(g),g=(0,NK.extendDiffsToEntireWordIfAppropriate)(d,p,g,(y,E)=>y.findWordContaining(E)),m&&$D.SequenceDiff.assertSorted(g),c.extendToSubwords&&(g=(0,NK.extendDiffsToEntireWordIfAppropriate)(d,p,g,(y,E)=>y.findSubWordContaining(E),!0),m&&$D.SequenceDiff.assertSorted(g)),g=(0,NK.removeShortMatches)(d,p,g),m&&$D.SequenceDiff.assertSorted(g),g=(0,NK.removeVeryShortMatchingTextBetweenLongDiffs)(d,p,g),m&&$D.SequenceDiff.assertSorted(g);let A=g.map(y=>new MK.RangeMapping(d.translateRange(y.seq1Range),p.translateRange(y.seq2Range)));return m&&MK.RangeMapping.assertSorted(A),{mappings:A,hitTimeout:h.hitTimeout}}};vat.DefaultLinesDiffComputer=zfr;function rma(t){return new MK.LineRangeMapping(new Cat.LineRange(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new Cat.LineRange(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}a(rma,"toLineRangeMapping")});var Kfr=T(Kv=>{"use strict";f();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.maxImperfectAgreementLength=Kv.maxAgreementOffset=Kv.EditDataWithIndex=void 0;Kv.tryRebase=ama;Kv.checkEditConsistency=Moi;Kv.tryRebaseStringEdits=lma;var nma=jR(),ima=cy(),Wy=Zg(),Mwe=wu(),Noi=xv(),oma=Yfr(),sma=!1,bat=class{static{a(this,"EditDataWithIndex")}constructor(e){this.index=e}join(e){if(this.index===e.index)return this}};Kv.EditDataWithIndex=bat;function ama(t,e,r,n,o,s,c,l,u,d={}){let p=Date.now();try{return cma(t,e,r,n,o,s,c,l,u,d)}catch(h){return u.trace(`Rebase error: ${ima.ErrorUtils.toString(h)}`),"error"}finally{u.trace(`Rebase duration: ${Date.now()-p}ms`)}}a(ama,"tryRebase");function cma(t,e,r,n,o,s,c,l,u,d){if(!Moi(t,o,s,u,!0))return"inconsistentEdits";let p=o.removeCommonSuffixAndPrefix(t),h=c[0];if(e&&h&&!p.applyToOffsetRangeOrUndefined(e)?.containsRange(h))return"outsideEditWindow";if(n.lengthWy.AnnotatedStringEdit.create(E))),g=Ooi(t,m,p,l,d);if(!g)return"rebaseFailed";let A=g.replacements.reduce((E,_)=>((E[_.data.index]||=[]).push(_),E),[]),y=[];for(let E=0;Ew>0?s.substring(R[w-1].replaceRange.endExclusive,x.replaceRange.start)+x.newText:x.newText).join(""),I=Wy.StringReplacement.replace(v,b);I.removeCommonSuffixAndPrefix(s).isEmpty||y.push({rebasedEdit:I,rebasedEditIndex:E})}return l==="strict"&&y.length>0&&new nma.SingleEdits(r).apply(t)!==Wy.StringEdit.create(y.map(E=>E.rebasedEdit)).apply(s)?(u.trace("Result consistency check failed"),"inconsistentEdits"):y}a(cma,"_tryRebase");function Moi(t,e,r,n,o=sma){if(!o)return!0;let s=e.apply(t)===r;return s||n.trace("Edit consistency check failed"),s}a(Moi,"checkEditConsistency");function lma(t,e,r,n,o={}){return Ooi(t,e.mapData(s=>new Wy.VoidEditData),r,n,o)?.toStringEdit()}a(lma,"tryRebaseStringEdits");function Ooi(t,e,r,n,o){let s=r.removeCommonSuffixAndPrefix(t),c=[],l=0,u=0,d=0;for(;up.replaceRange.start){let g=t.substring(p.replaceRange.start,m.replaceRange.start),A=g+m.newText;A.endsWith(g)&&(m=new Wy.AnnotatedStringReplacement(Mwe.OffsetRange.fromTo(p.replaceRange.start,m.replaceRange.endExclusive-g.length),A.substring(0,A.length-g.length),m.data))}else if(u===e.replacements.length-1&&m.replaceRange.endExclusive=p.newText.length){let g=0,A=0,y=p,E;for(;y&&m.replaceRange.containsRange(y.replaceRange);){if(A=pma(t,m,y,E,A,n,o),A===-1)return;g+=y.newText.length-y.replaceRange.length,E=y,y=s.replacements[++l]}c.push(new Wy.AnnotatedStringReplacement(new Mwe.OffsetRange(m.replaceRange.start+d,m.replaceRange.endExclusive+d+g),m.newText,m.data)),u++,d+=g}else return;else if(h.replaceRange.start",'""',"''","``"]);function fma(t){return dma.has(t)}a(fma,"isAutoClosePair");function pma(t,e,r,n,o,s,c){let l=r.newText,u=n?n.replaceRange.endExclusive:e.replaceRange.start;uKv.maxAgreementOffset||d>0&&r.newText.length>Kv.maxImperfectAgreementLength);return d!==-1&&!p?d+r.newText.length:c.absorbSubsequenceTyping&&fma(l)&&uma(l,e.newText.substring(o))?o:-1}a(pma,"agreementIndexOf");function hma(t,e,r,n,o){let s=t.split(/\r\n|\r|\n/),c=e.split(/\r\n|\r|\n/),u=new oma.DefaultLinesDiffComputer().computeDiff(s,c,o);if(u.hitTimeout)return;let d=new Noi.StringText(t),p=new Noi.StringText(e);return u.changes.map(h=>(h.innerChanges||[]).map(m=>{let g=d.getTransformer().getOffsetRange(m.originalRange),A=p.getValueOfRange(m.modifiedRange);return new Wy.AnnotatedStringReplacement(g.delta(r),A,n)})).flat()}a(hma,"computeDiff")});var Loi=T(Tat=>{"use strict";f();Object.defineProperty(Tat,"__esModule",{value:!0});Tat.RejectionCollector=void 0;var mma=F5(),Boi=ro(),gma=kw(),Jfr=class extends Boi.Disposable{static{a(this,"RejectionCollector")}constructor(e,r){super(),this.workspace=e,this._garbageCollector=this._register(new e0r(20)),this._documentCaches=new Map,this._logger=r.createSubLogger(["NES","RejectionCollector"]),(0,gma.mapObservableArrayCached)(this,e.openDocuments,(n,o)=>{let s=new Xfr(n,this._garbageCollector,this._logger);this._documentCaches.set(s.doc.id,s),o.add((0,mma.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},c=>{for(let l of c.value.changes)s.handleEdit(l,c.value.value)})),o.add((0,Boi.toDisposable)(()=>{this._documentCaches.delete(n.id)}))}).recomputeInitiallyAndOnChange(this._store)}reject(e,r){let n=this._documentCaches.get(e);if(!n){this._logger.trace(`Rejecting, no document cache: ${r}`);return}let o=r.removeCommonSuffixAndPrefix(n.doc.value.get().value);this._logger.trace(`Rejecting: ${o}`),n.reject(o)}isRejected(e,r){let n=this._documentCaches.get(e);if(!n)return this._logger.trace(`Checking rejection, no document cache: ${r}`),!1;let o=r.removeCommonSuffixAndPrefix(n.doc.value.get().value),s=n.isRejected(o);return this._logger.trace(`Checking rejection, ${s?"rejected":"not rejected"}: ${o}`),s}clear(){this._garbageCollector.clear()}};Tat.RejectionCollector=Jfr;var Xfr=class{static{a(this,"DocumentRejectionTracker")}constructor(e,r,n){this.doc=e,this._garbageCollector=r,this._logger=n,this._rejectedEdits=new Set}handleEdit(e,r){for(let n of[...this._rejectedEdits])n.handleEdit(e,r)}reject(e){if(this.isRejected(e))return;let r=new Zfr(e.toEdit(),()=>{this._logger.trace(`Evicting: ${e}`),this._rejectedEdits.delete(r)});this._rejectedEdits.add(r),this._garbageCollector.put(r)}isRejected(e){for(let r of this._rejectedEdits)if(r.isRejected(e))return!0;return!1}},Zfr=class{static{a(this,"RejectedEdit")}constructor(e,r){this._edit=e,this._onDispose=r}handleEdit(e,r){let n=this._edit.tryRebase(e);n?this._edit=n.removeCommonSuffixAndPrefix(r.value):this.dispose()}isRejected(e){return this._edit.equals(e.toEdit())}dispose(){this._onDispose()}},e0r=class{static{a(this,"LRUGarbageCollector")}constructor(e){this._maxSize=e,this._disposables=[]}put(e){this._disposables.push(e),this._disposables.length>this._maxSize&&this._disposables.shift().dispose()}clear(){for(let e of this._disposables)e.dispose();this._disposables=[]}dispose(){this.clear()}}});var r0r=T(nde=>{"use strict";f();Object.defineProperty(nde,"__esModule",{value:!0});nde.DisposablesLRUCache=nde.LRUCache=void 0;var Owe=class{static{a(this,"Node")}constructor(e,r){this.prev=null,this.next=null,this.key=e,this.value=r}},Sat=class{static{a(this,"LRUCache")}constructor(e=10){if(e<1)throw new Error("Cache size must be at least 1");this._capacity=e,this._cache=new Map,this._head=new Owe("",null),this._tail=new Owe("",null),this._head.next=this._tail,this._tail.prev=this._head}_addNode(e){e.prev=this._head,e.next=this._head.next,this._head.next.prev=e,this._head.next=e}_removeNode(e){let r=e.prev,n=e.next;r.next=n,n.prev=r}_moveToHead(e){this._removeNode(e),this._addNode(e)}_popTail(){let e=this._tail.prev;return this._removeNode(e),e}clear(){this._cache.clear(),this._head.next=this._tail,this._tail.prev=this._head}deleteKey(e){let r=this._cache.get(e);if(r)return this._removeNode(r),this._cache.delete(e),r.value}get(e){let r=this._cache.get(e);if(r)return this._moveToHead(r),r.value}keys(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push(r.key),r=r.next;return e}getValues(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push(r.value),r=r.next;return e}put(e,r){let n=this._cache.get(e);if(n)n.value=r,this._moveToHead(n);else if(n=new Owe(e,r),this._cache.set(e,n),this._addNode(n),this._cache.size>this._capacity){let o=this._popTail();return this._cache.delete(o.key),[o.key,o.value]}}entries(){let e=[],r=this._head.next;for(;r!==this._tail;)e.push([r.key,r.value]),r=r.next;return e}};nde.LRUCache=Sat;var t0r=class{static{a(this,"DisposablesLRUCache")}constructor(e){this.actual=new Sat(e)}dispose(){this.clear()}clear(){let e=this.actual.getValues();for(let r of e)r.dispose();this.actual.clear()}deleteKey(e){let r=this.actual.deleteKey(e);r&&r.dispose()}get(e){return this.actual.get(e)}keys(){return this.actual.keys()}getValues(){return this.actual.getValues()}put(e,r){let n=this.actual.put(e,r);n&&n[1].dispose()}};nde.DisposablesLRUCache=t0r});var Foi=T(xat=>{"use strict";f();Object.defineProperty(xat,"__esModule",{value:!0});xat.RebaseFailureInfo=void 0;var Ama=Zg(),n0r=class{static{a(this,"RebaseFailureInfo")}constructor(e,r,n,o,s,c,l){this.originalDocument=e,this.editWindow=r,this.originalEdits=n,this.userEditSince=o,this.currentDocument=s,this.currentSelection=c,this.nesRebaseConfigs=l}toMarkdown(){let e=[];e.push("### Original Document"),e.push("```"),e.push(this.originalDocument),e.push("```"),e.push(""),e.push("### Suggested Edits");for(let r=0;r0&&(e.push(""),e.push(`### Cursor: ${this.currentSelection.map(r=>r.toString()).join(", ")}`)),e.push(""),e.push("### Document Intended After Suggested Edits"),e.push("```");try{let r=new Ama.StringEdit(this.originalEdits.slice()).apply(this.originalDocument);e.push(r)}catch{e.push("")}return e.push("```"),e.push(""),e.push("### Copy-Pasteable Test"),e.push("```typescript"),e.push(this._generateTest()),e.push("```"),e.join(` +`)}_generateTest(){let e=[];e.push("test('rebase failure (auto-generated)', () => {"),e.push(` const originalDocument = ${Iat(this.originalDocument)};`),e.push(" const originalEdits = [");for(let n of this.originalEdits)e.push(` StringReplacement.replace(new OffsetRange(${n.replaceRange.start}, ${n.replaceRange.endExclusive}), ${Iat(n.newText)}),`);e.push(" ];"),e.push(" const userEditSince = StringEdit.create([");for(let n of this.userEditSince.replacements)e.push(` StringReplacement.replace(new OffsetRange(${n.replaceRange.start}, ${n.replaceRange.endExclusive}), ${Iat(n.newText)}),`);e.push(" ]);"),e.push(` const currentDocumentContent = ${Iat(this.currentDocument)};`),this.editWindow?e.push(` const editWindow = new OffsetRange(${this.editWindow.start}, ${this.editWindow.endExclusive});`):e.push(" const editWindow = undefined;"),e.push(` const currentSelection = [${this.currentSelection.map(n=>`new OffsetRange(${n.start}, ${n.endExclusive})`).join(", ")}];`),this.nesRebaseConfigs.absorbSubsequenceTyping&&e.push(` const nesConfigs = { absorbSubsequenceTyping: ${this.nesRebaseConfigs.absorbSubsequenceTyping} };`),e.push(""),e.push(" const logger = new TestLogService();"),e.push(" expect(userEditSince.apply(originalDocument)).toBe(currentDocumentContent);");let r=this.nesRebaseConfigs.absorbSubsequenceTyping?", nesConfigs":"";return e.push(` expect(tryRebase(originalDocument, editWindow, originalEdits, [], userEditSince, currentDocumentContent, currentSelection, 'strict', logger${r})).toMatchInlineSnapshot();`),e.push("});"),e.join(` +`)}};xat.RebaseFailureInfo=n0r;function Iat(t){return"`"+t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`"}a(Iat,"toBacktickLiteral")});var qoi=T(Rat=>{"use strict";f();Object.defineProperty(Rat,"__esModule",{value:!0});Rat.NextEditCache=void 0;var Uoi=ac(),yma=F5(),Ema=r0r(),Qoi=ro(),_ma=gO(),wat=Kfr(),Cma=Foi(),i0r=class extends Qoi.Disposable{static{a(this,"NextEditCache")}constructor(e,r,n,o){super(),this.workspace=e,this._logService=r,this._configService=n,this._expService=o,this._documentCaches=new Map,this._sharedCache=new Ema.LRUCache(50),(0,_ma.mapObservableArrayCached)(this,e.openDocuments,(s,c)=>{let l=new o0r(this,s.id,s,this._sharedCache,this._logService);this._documentCaches.set(l.docId,l),c.add((0,yma.autorunWithChanges)(this,{value:s.value},u=>{for(let d of u.value.changes)d.isEmpty()||l.handleEdit(d);if(this._configService.getExperimentBasedConfig(Uoi.ConfigKey.Advanced.InlineEditsTriggerOnEditorChangeAfterSeconds,this._expService)!==void 0)for(let[d,p]of this._sharedCache.entries())p.docId!==s.id&&this._sharedCache.deleteKey(d)})),c.add((0,Qoi.toDisposable)(()=>{this._documentCaches.delete(s.id)}))}).recomputeInitiallyAndOnChange(this._store)}setKthNextEdit(e,r,n,o,s,c,l,u,d){let p=this._documentCaches.get(e);if(p)return p.setKthNextEdit(r,n,o,c,l,s,u,d)}setNoNextEdit(e,r,n,o){let s=this._documentCaches.get(e);s&&s.setNoNextEdit(r,n,o)}_getNesRebaseConfigs(){return{absorbSubsequenceTyping:this._configService.getExperimentBasedConfig(Uoi.ConfigKey.TeamInternal.InlineEditsAbsorbSubsequenceTyping,this._expService)}}lookupNextEdit(e,r,n){let o=this._documentCaches.get(e);if(o)return o.lookupNextEdit(r,n,this._getNesRebaseConfigs())}tryRebaseCacheEntry(e,r,n){let o=this._documentCaches.get(e.docId);return o?o.tryRebaseCacheEntry(e,r,n,this._getNesRebaseConfigs()):{edit:void 0}}rejectedNextEdit(e){this._sharedCache.getValues().filter(r=>r.source.headerRequestId===e).forEach(r=>r.rejected=!0)}isRejectedNextEdit(e,r,n){let o=this._documentCaches.get(e);return o?o.isRejectedNextEdit(r,n):!1}evictedCachedEdit(e){let r=this._documentCaches.get(e.docId);r&&r.evictedCachedEdit(e)}clear(){this._documentCaches.forEach(e=>e.clear()),this._sharedCache.clear()}};Rat.NextEditCache=i0r;var o0r=class{static{a(this,"DocumentEditCache")}constructor(e,r,n,o,s){this._nextEditCache=e,this.docId=r,this._doc=n,this._sharedCache=o,this._trackedCachedEdits=[],this._logger=s.createSubLogger(["NES","DocumentEditCache"])}handleEdit(e){let r=this._logger.createSubLogger("handleEdit");for(let n of this._trackedCachedEdits)n.userEditSince&&(n.userEditSince=n.userEditSince.compose(e),n.rebaseFailed=!1,(0,wat.checkEditConsistency)(n.documentBeforeEdit.value,n.userEditSince,this._doc.value.get().value,r)||(n.userEditSince=void 0))}evictedCachedEdit(e){let r=this._trackedCachedEdits.indexOf(e);r!==-1&&this._trackedCachedEdits.splice(r,1)}clear(){this._trackedCachedEdits.length=0}setKthNextEdit(e,r,n,o,s,c,l,u){let d=this._getKey(e.value),p={docId:this.docId,edit:n,edits:o,detailedEdits:[],userEditSince:s,subsequentN:c,source:l,documentBeforeEdit:e,editWindow:r,originalEditWindow:u.originalEditWindow,cacheTime:Date.now(),isFromCursorJump:u.isFromCursorJump};s&&((0,wat.checkEditConsistency)(p.documentBeforeEdit.value,s,this._doc.value.get().value,this._logger.createSubLogger("setKthNextEdit"))?this._trackedCachedEdits.unshift(p):p.userEditSince=void 0);let h=this._sharedCache.get(d);h&&this.evictedCachedEdit(h);let m=this._sharedCache.put(d,p);return m&&this._nextEditCache.evictedCachedEdit(m[1]),p}setNoNextEdit(e,r,n){let o=this._getKey(e.value),s={docId:this.docId,edit:void 0,edits:[],detailedEdits:[],source:n,documentBeforeEdit:e,editWindow:r,cacheTime:Date.now(),isFromCursorJump:!1},c=this._sharedCache.get(o);c&&this.evictedCachedEdit(c);let l=this._sharedCache.put(o,s);l&&this._nextEditCache.evictedCachedEdit(l[1])}lookupNextEdit(e,r,n){let o=this._getKey(e.value),s=this._sharedCache.get(o);if(s){let c=s.editWindow,l=s.originalEditWindow,u=r[0],d=c?.containsRange(u),p=l?.containsRange(u);return c&&!d&&!p?void 0:s}for(let c of this._trackedCachedEdits){let l=this.tryRebaseCacheEntry(c,e,r,n);if(l.edit)return l.edit}}tryRebaseCacheEntry(e,r,n,o){let s=this._logger.createSubLogger("tryRebaseCacheEntry");if(e.userEditSince&&!e.rebaseFailed){let c=e.edits||(e.edit?[e.edit]:[]),l=e.originalEditWindow?[e.editWindow,e.originalEditWindow]:[e.editWindow];for(let u of l){let d=(0,wat.tryRebase)(e.documentBeforeEdit.value,u,c,e.detailedEdits,e.userEditSince,r.value,n,"strict",s,o);if(d==="rebaseFailed")return e.rebaseFailed=!0,{edit:void 0,failureInfo:new Cma.RebaseFailureInfo(e.documentBeforeEdit.value,u,c,e.userEditSince,r.value,n,o)};if(d==="inconsistentEdits"||d==="error")return e.userEditSince=void 0,{edit:void 0};if(d==="outsideEditWindow")continue;if(d.length)return!e.rejected&&this.isRejectedNextEdit(r,d[0].rebasedEdit)&&(e.rejected=!0),{edit:{...e,...d[0]}};if(!c.length)return{edit:e}}}return{edit:void 0}}isRejectedNextEdit(e,r){let n=this._logger.createSubLogger("isRejectedNextEdit"),o=r.removeCommonSuffixAndPrefix(e.value);for(let s of this._trackedCachedEdits.filter(c=>c.rejected)){if(!s.userEditSince)continue;let c=s.edits||(s.edit?[s.edit]:[]);if(!c.length)continue;let l=(0,wat.tryRebase)(s.documentBeforeEdit.value,void 0,c,s.detailedEdits,s.userEditSince,e.value,[],"lenient",n);if(typeof l=="string")continue;if(l.some(d=>d.rebasedEdit.removeCommonSuffixAndPrefix(e.value).equals(o)))return n.trace("Found rejected edit that matches current edit"),!0}return!1}_getKey(e){return JSON.stringify([this.docId.uri,e])}}});var Goi=T(Pat=>{"use strict";f();Object.defineProperty(Pat,"__esModule",{value:!0});Pat.NextEditResult=void 0;var s0r=class{static{a(this,"NextEditResult")}constructor(e,r,n){this.requestId=e,this.source=r,this.result=n}};Pat.NextEditResult=s0r});var Joi=T(Jv=>{"use strict";f();var vma=Jv&&Jv.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Bwe=Jv&&Jv.__param||function(t,e){return function(r,n){e(r,n,t)}},c0r;Object.defineProperty(Jv,"__esModule",{value:!0});Jv.NextEditFetchRequest=Jv.NextEditProvider=Jv.NesOutcome=void 0;var bma=require("path"),zy=ac(),ide=jR(),Uwe=tat(),Lwe=ky(),Tma=dXe(),zd=hwe(),Sma=F5(),l0r=D0(),Ima=toi(),xma=Kue(),wma=wfr(),Rma=cd(),Fwe=cy(),Gh=MT(),Hoi=Hl(),kat=vc(),Pma=FUe(),f0r=Ko(),a0r=ro(),joi=kw(),$oi=ck(),kma=W1(),Koi=Ip(),Voi=vz(),Qwe=Zg(),Dma=qE(),u0r=wu(),Woi=xv(),Nma=Kfr(),Mma=Loi(),Oma=qoi(),Dat=Goi();function Bma(t,e,r){if(!e)return t;let n=e.endExclusive,o=r.getTransformer(),s=o.getPosition(n),c=o.getOffset(s.with(void 0,1)),l=o.getOffset(s.with(void 0,o.getLineLength(s.lineNumber)+1)),u=o.getOffset(o.getPosition(t.start).delta(1)),d=o.getPosition(t.endExclusive).delta(-2),p=o.getOffset(d.column>1?d.with(void 0,o.getLineLength(d.lineNumber)+1):d);return new u0r.OffsetRange(Math.min(u,c),Math.max(p,l))}a(Bma,"computeReducedWindow");function zoi(t,e){return new Uwe.RootedLineEdit(e,t).toEdit()}a(zoi,"convertLineEditToEdit");function Yoi(t,e){return new Pma.CachedFunction(n=>{let o=t.find(s=>s.nextEditDoc.id===n);if(!o){for(let s=e.length-1;s>=0;s--){let c=e[s];if(c.docId===n&&c.kind==="edit"){let l=c.edit.getEditedState();return{baseDocState:l,docContents:l,editsSoFar:Qwe.StringEdit.empty,nextEdits:[],docId:n}}}throw new f0r.BugIndicatingError}return{baseDocState:o.documentAfterEdits,docContents:o.documentAfterEdits,editsSoFar:Qwe.StringEdit.empty,nextEdits:[],docId:n}})}a(Yoi,"createDocStateLookupMap");var qwe;(function(t){t.Accepted="accepted",t.Rejected="rejected",t.Ignored="ignored"})(qwe||(Jv.NesOutcome=qwe={}));var d0r=c0r=class extends a0r.Disposable{static{a(this,"NextEditProvider")}get lastRejectionTime(){return this._lastRejectionTime}get lastTriggerTime(){return this._lastTriggerTime}get lastOutcome(){return this._lastOutcome}constructor(e,r,n,o,s,c,l,u,d,p){super(),this._workspace=e,this._statelessNextEditProvider=r,this._historyContextProvider=n,this._xtabHistoryTracker=o,this._debugRecorder=s,this._configService=c,this._snippyService=l,this._logService=u,this._expService=d,this._requestLogger=p,this.ID=this._statelessNextEditProvider.ID,this._rejectionCollector=this._register(new Mma.RejectionCollector(this._workspace,this._logService)),this._pendingStatelessNextEditRequest=null,this._speculativePendingRequest=null,this._scheduledSpeculativeRequest=null,this._lastShownTime=0,this._lastShownSuggestionId=void 0,this._lastRejectionTime=0,this._lastTriggerTime=0,this._shouldExpandEditWindow=!1,this._logger=this._logService.createSubLogger(["NES","NextEditProvider"]),this._nextEditCache=new Oma.NextEditCache(this._workspace,this._logService,this._configService,this._expService),(0,joi.mapObservableArrayCached)(this,this._workspace.openDocuments,(h,m)=>{m.add((0,joi.runOnChange)(h.value,g=>{this._cancelPendingRequestDueToDocChange(h.id,g)}))}).recomputeInitiallyAndOnChange(this._store)}_cancelSpeculativeRequest(){this._scheduledSpeculativeRequest=null,this._speculativePendingRequest&&(this._speculativePendingRequest.request.cancellationTokenSource.cancel(),this._speculativePendingRequest=null)}_cancelPendingRequestDueToDocChange(e,r){if(this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsAsyncCompletions,this._expService)||this._pendingStatelessNextEditRequest===null)return;let o=this._pendingStatelessNextEditRequest.getActiveDocument();o.id===e&&o.documentAfterEdits.value!==r.value&&this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel()}async getNextEdit(e,r,n,o,s){let c=Date.now();this._lastTriggerTime=c;let l=new $oi.StopWatch,u=this._logger.createSubLogger(r.requestUuid.substring(4,8)).withExtraTarget(l0r.LogTarget.fromCallback((h,m)=>{n.trace(`[${Math.floor(l.elapsed()).toString().padStart(4," ")}ms] ${m}`)})),d=this._shouldExpandEditWindow;n.setStatelessNextEditProviderId(this._statelessNextEditProvider.ID);let p;try{p=await this._getNextEditCanThrow(e,r,c,d,u,n,o,s)}catch(h){throw n.setError(h),s.setNextEditProviderError(Fwe.ErrorUtils.toString(h)),h}finally{s.markEndTime()}return this._lastNextEditResult=p,p}async _getNextEditCanThrow(e,r,n,o,s,c,l,u){let d=s.createSubLogger("_getNextEdit");d.trace(`invoked with trigger id = ${r.changeHint===void 0?"undefined":`uuid = ${r.changeHint.data.uuid}, reason = ${r.changeHint.data.reason}`}`);let p=this._workspace.getDocument(e);if(!p)throw d.trace(`Document "${e.baseName}" not found`),new f0r.BugIndicatingError(`Document "${e.baseName}" not found`);let h=p.value.get(),m=p.selection.get(),g=this.determineNesConfigs(u,c),A=this._nextEditCache.lookupNextEdit(e,h,m);if(A?.rejected)return d.trace("cached edit was previously rejected"),u.setStatus("previouslyRejectedCache"),u.setWasPreviouslyRejected(),new Dat.NextEditResult(c.requestId,A.source,void 0);let y,E,_,v,b=e,I=!1,x=!1,w=!1;if(A){d.trace("using cached edit");let Q=A.rebasedEdit||A.edit;Q&&(y={actualEdit:Q,isFromCursorJump:A.isFromCursorJump}),I=!!A.rebasedEdit,x=A.subsequentN!==void 0&&A.subsequentN>0,v=A.source,c.setIsCachedResult(A.source.log),E=h,u.setHeaderRequestId(v.headerRequestId),u.setIsFromCache(),u.setSubsequentEditOrder(A.rebasedEditIndex??A.subsequentN),c.recordingBookmark=v.log.recordingBookmark}else{d.trace(`fetching next edit with shouldExpandEditWindow=${o}`);let Q=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsDebounceUseCoreRequestTime,this._expService)?r.requestIssuedDateTime??void 0:void 0;v=new Gwe(r.requestUuid,c,Q,!1),u.setHeaderRequestId(v.headerRequestId);let M=p.value.get();d.trace("awaiting firstEdit promise");let N=await this.fetchNextEdit(v,p,g,o,d,u,l);d.trace("resolved firstEdit promise");let G=`First edit latency: ${Date.now()-this._lastTriggerTime} ms`;if(c.addLog(G),d.trace(G),N.isError())d.trace(`failed to fetch next edit ${N.err.toString()}`),u.setStatus(`noEdit:${N.err.kind}`),_=N.err;else if(b=N.val.docId??b,E=(b?this._workspace.getDocument(b):p).value.get(),b===p.id&&M.value!==E.value)d.trace("document changed while fetching next edit"),u.setStatus("docChanged"),c.setIsSkipped();else{let F=N.val.rebasedEdit||N.val.edit;F?(d.trace("fetch succeeded"),c.setResponseResults([F]),y={actualEdit:F,isFromCursorJump:N.val.isFromCursorJump},w=N.val.isFromSpeculativeRequest??!1):(d.trace("empty edits"),u.setStatus("emptyEdits"))}}if(_ instanceof zd.NoNextEditReason.FetchFailure||_ instanceof zd.NoNextEditReason.Unexpected)throw d.trace(`has throwing error: ${_.error}`),_.error;if(_ instanceof zd.NoNextEditReason.NoSuggestions)if(_.nextCursorPosition===void 0)c.markAsNoSuggestions();else return u.setStatus("emptyEditsButHasNextCursorPosition"),new Dat.NextEditResult(c.requestId,v,{jumpToPosition:_.nextCursorPosition,targetDocumentId:_.nextCursorDocumentId,documentBeforeEdits:h,isFromCursorJump:!1,isSubsequentEdit:!1});let R=new Dat.NextEditResult(c.requestId,v,void 0);if(!y)return d.trace("had no edit"),R;if(l.isCancellationRequested)return d.trace("cancelled"),u.setStatus("noEdit:gotCancelled"),R;if(this._rejectionCollector.isRejected(b,y.actualEdit)||E&&this._nextEditCache.isRejectedNextEdit(b,E,y.actualEdit))return d.trace("edit was previously rejected"),u.setStatus("previouslyRejected"),u.setWasPreviouslyRejected(),R;c.setResult(Uwe.RootedLineEdit.fromEdit(new ide.RootedEdit(h,new Qwe.StringEdit([y.actualEdit])))),(0,Hoi.assert)(E!==void 0,"should be defined if edit is defined"),u.setStatus("notAccepted");let P=new Dat.NextEditResult(c.requestId,v,{edit:y.actualEdit,isFromCursorJump:y.isFromCursorJump,documentBeforeEdits:E,targetDocumentId:b,isSubsequentEdit:x});u.setHasNextEdit(!0);let k=this.computeMinimumResponseDelay({triggerTime:n,isRebasedCachedEdit:I,isSubsequentCachedEdit:x,isFromSpeculativeRequest:w,enforceCacheDelay:r.enforceCacheDelay},d);return k>0&&(await(0,kat.timeout)(k),l.isCancellationRequested)?(d.trace("cancelled"),u.setStatus("noEdit:gotCancelled"),R):(d.trace("returning next edit result"),P)}determineNesConfigs(e,r){let n={isAsyncCompletions:this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsAsyncCompletions,this._expService),isEagerBackupRequest:this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsEagerBackupRequest,this._expService)};return e.setNESConfigs({...n}),r.addCodeblockToLog(JSON.stringify(n,null," ")),n}_processDoc(e){let r=e.lastEdit.base.getLines(),n=e.lastEdits,o=Uwe.RootedLineEdit.fromEdit(new ide.RootedEdit(e.lastEdit.base,e.lastEdits.compose())).removeCommonSuffixPrefixLines().edit,s=e.lastEdit.base,c=e.lastSelection,l=this._workspace.getWorkspaceRoot(e.docId),u=new zd.StatelessNextEditDocument(e.docId,l,e.languageId,r,o,s,n,c);return{recentEdit:e.lastEdit,nextEditDoc:u,documentAfterEdits:u.documentAfterEdits}}async fetchNextEdit(e,r,n,o,s,c,l){let u=r.id,d=s.createSubLogger("fetchNextEdit"),p=this._historyContextProvider.getHistoryContext(u);if(!p)return Gh.Result.error(new zd.NoNextEditReason.Unexpected(new Error("DocumentMissingInHistoryContext")));let h=r.value.get(),m=r.selection.get(),g=e.log;g.setRecentEdit(p);let A=h.value===this._pendingStatelessNextEditRequest?.documentBeforeEdits.value,y=(A||n.isAsyncCompletions)&&!this._pendingStatelessNextEditRequest?.cancellationTokenSource.token.isCancellationRequested&&this._pendingStatelessNextEditRequest||void 0,E=this._speculativePendingRequest?.docId===u&&this._speculativePendingRequest?.postEditContent===h.value&&!this._speculativePendingRequest.request.cancellationTokenSource.token.isCancellationRequested,_=E?this._speculativePendingRequest?.request:void 0,v=_??y;if(v){_?(d.trace(`reusing speculative pending request (opportunityId=${_.opportunityId}, headerRequestId=${_.headerRequestId})`),this._speculativePendingRequest=null):d.trace(`reusing in-flight pending request (opportunityId=${v.opportunityId}, headerRequestId=${v.headerRequestId})`);let w=_?E:A,R=_?"speculative":"async";if(w){let P=await this._joinNextEditRequest(v,R,c,g,l);return c.setStatelessNextEditTelemetry(P.telemetry),_?(await v.firstEdit.p).map(Q=>({...Q,isFromSpeculativeRequest:!0})):P.nextEdit.isError()?P.nextEdit:v.firstEdit.p}else if(n.isEagerBackupRequest){d.trace("starting eager backup request in parallel with rebase attempt"),this._pendingStatelessNextEditRequest=null;let P=this._executeNewNextEditRequest(e,r,p,n,o,d,c,l),k=a(()=>{P.then(G=>G.nextEditRequest.cancellationTokenSource.cancel()).catch(()=>{})},"cancelBackupRequest"),Q=await this._joinNextEditRequest(v,R,c,g,l),M=await v.firstEdit.p;if(M.isOk()&&M.val.edit){let G=this._nextEditCache.tryRebaseCacheEntry(M.val,h,m);if(G.edit)return d.trace("rebase succeeded, cancelling eager backup request"),k(),c.setStatelessNextEditTelemetry(Q.telemetry),Gh.Result.ok(G.edit);this._logRebaseFailure(G.failureInfo,g)}if(l.isCancellationRequested)return d.trace("cancelled after rebase failed (eager backup path)"),k(),c.setStatelessNextEditTelemetry(Q.telemetry),Gh.Result.error(new zd.NoNextEditReason.GotCancelled("afterFailedRebase"));d.trace("rebase failed, using eager backup request");let N=await P;return c.setStatelessNextEditTelemetry(N.nextEditResult.telemetry),N.nextEditResult.nextEdit.isError()?N.nextEditResult.nextEdit:N.nextEditRequest.firstEdit.p}else{let P=await this._joinNextEditRequest(v,R,c,g,l),k=await v.firstEdit.p;if(k.isOk()&&k.val.edit){let N=this._nextEditCache.tryRebaseCacheEntry(k.val,h,m);if(N.edit)return c.setStatelessNextEditTelemetry(P.telemetry),Gh.Result.ok(N.edit);this._logRebaseFailure(N.failureInfo,g)}if(l.isCancellationRequested)return d.trace("document changed after rebase failed"),c.setStatelessNextEditTelemetry(P.telemetry),Gh.Result.error(new zd.NoNextEditReason.GotCancelled("afterFailedRebase"));let M=h.value===this._pendingStatelessNextEditRequest?.documentBeforeEdits.value&&!this._pendingStatelessNextEditRequest?.cancellationTokenSource.token.isCancellationRequested&&this._pendingStatelessNextEditRequest||void 0;if(M){d.trace("reusing 2nd existing next edit request after rebase failed");let N=await this._joinNextEditRequest(M,"async",c,g,l);return c.setStatelessNextEditTelemetry(N.telemetry),N.nextEdit.isError()?N.nextEdit:M.firstEdit.p}d.trace("creating new next edit request after rebase failed")}}let b=await this._executeNewNextEditRequest(e,r,p,n,o,d,c,l),I=b.nextEditRequest,x=b.nextEditResult;return c.setStatelessNextEditTelemetry(x.telemetry),x.nextEdit.isError()?x.nextEdit:I.firstEdit.p}async _joinNextEditRequest(e,r,n,o,s){n.setHeaderRequestId(e.headerRequestId),n.setReusedRequest(r),n.setRequest(e),o.setRequestInput(e),o.setIsCachedResult(e.logContext);let c=this._hookupCancellation(e,s);try{return await e.result}finally{c.dispose()}}_logRebaseFailure(e,r){e&&r.setRebaseFailure(e)}async _executeNewNextEditRequest(e,r,n,o,s,c,l,u){let d=r.id,p=c.createSubLogger("_executeNewNextEditRequest"),h=this._debugRecorder?.getRecentLog(),m=e.log,g=Lma(n.getDocumentAndIdx(d)),A=r.selection.get()[0],y=n.documents.map(N=>this._processDoc(N)),E=this._xtabHistoryTracker.getHistory(),_=new kat.DeferredPromise,v=s?this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService):void 0,b=new zd.StatelessNextEditRequest(e.headerRequestId,e.opportunityId,r.value.get(),y.map(N=>N.nextEditDoc),g.idx,E,_,v,!1,m,e.log.recordingBookmark,h,e.providerRequestStartDateTime),I;this._pendingStatelessNextEditRequest&&(this._pendingStatelessNextEditRequest.cancellationTokenSource.cancel(),this._pendingStatelessNextEditRequest=null,this._scheduledSpeculativeRequest=null),this._speculativePendingRequest&&(this._speculativePendingRequest.docId!==d||this._speculativePendingRequest.postEditContent!==b.documentBeforeEdits.value)&&this._cancelSpeculativeRequest(),this._pendingStatelessNextEditRequest=b;let x=a(()=>{this._pendingStatelessNextEditRequest===b&&(this._pendingStatelessNextEditRequest=null)},"removeFromPending");l.setRequest(b),l.setStatus("requested"),m.setRequestInput(b);let w=this._hookupCancellation(b,u,o.isAsyncCompletions?(0,Sma.autorunWithChanges)(this,{value:r.value},N=>{N.value.changes.forEach(G=>{b.intermediateUserEdit&&!G.isEmpty()&&(b.intermediateUserEdit=b.intermediateUserEdit.compose(G),(0,Nma.checkEditConsistency)(b.documentBeforeEdits.value,b.intermediateUserEdit,N.value.value.value,p)||(b.intermediateUserEdit=void 0))})}):void 0),R=Yoi(y,E),P=this._statelessNextEditProvider.provideNextEdit(b,p,m,b.cancellationTokenSource.token),k=-1,Q=a((N,G)=>{++k;let O=p.createSubLogger("processEdit");O.trace(`processing edit #${k} (starts at 0)`),O.trace("resetting shouldExpandEditWindow to false due to receiving an edit"),this._shouldExpandEditWindow=!1;let D=R.get(N.targetDocument??d),F=N.edit,U=new Voi.LineEdit([F]),H=zoi(U,D.baseDocState).tryRebase(D.editsSoFar);if(H===void 0){O.trace(`edit ${k} is undefined after rebasing`),_.isSettled||_.complete(Gh.Result.error(new zd.NoNextEditReason.Uncategorized(new Error("Rebased edit is undefined"))));return}D.editsSoFar=D.editsSoFar.compose(H);let $;if(H.replacements.length===0)O.trace(`WARNING: ${k} has no edits`);else if(H.replacements.length>1)O.trace(`WARNING: ${k} has ${H.replacements.length} edits, but expected only 1`);else{let W=H.replacements[0];D.nextEdits.push(W),$=this._nextEditCache.setKthNextEdit(D.docId,D.docContents,k===0?N.window:void 0,W,k,k===0?D.nextEdits:void 0,k===0?b.intermediateUserEdit:void 0,e,{isFromCursorJump:N.isFromCursorJump,originalEditWindow:N.originalWindow}),O.trace(`populated cache for ${k}`)}return _.isSettled||(O.trace("resolving firstEdit promise"),m.setResult(new Uwe.RootedLineEdit(D.docContents,U)),_.complete($?Gh.Result.ok($):Gh.Result.error(new zd.NoNextEditReason.Unexpected(new Error("No cached edit"))))),D.docContents=H.applyOnText(D.docContents),$},"processEdit"),M=a((N,G)=>{let O=p.createSubLogger("streamEnd");if(k===-1&&N instanceof zd.NoNextEditReason.NoSuggestions&&(O.trace("resetting shouldExpandEditWindow to false due to NoSuggestions"),this._shouldExpandEditWindow=!1),R.get(d).nextEdits.length)O.trace(`${R.get(d).nextEdits.length} edits returned`);else if(O.trace(`no edit, reason: ${N.kind}`),N instanceof zd.NoNextEditReason.NoSuggestions){let{documentBeforeEdits:L,window:H}=N,$=H?Bma(H,A,L):void 0;this._nextEditCache.setNoNextEdit(d,L,$,e)}_.isSettled||_.complete(Gh.Result.error(N));let F=R.get(d).nextEdits.length>0?Gh.Result.ok(void 0):Gh.Result.error(N),U=new zd.StatelessNextEditResult(F,G);if(b.setResult(U),w.dispose(),x(),this._scheduledSpeculativeRequest?.headerRequestId===b.headerRequestId){let L=this._scheduledSpeculativeRequest;this._scheduledSpeculativeRequest=null,this._triggerSpeculativeRequest(L.suggestion)}return U},"handleStreamEnd");try{let N=await P.next();if(N.done){let G=N.value.v;I=M(G,N.value.telemetryBuilder)}else{let G=N.value.v,O=N.value.telemetryBuilder;Q(G,O),(async()=>{try{for(N=await P.next();!N.done;){let F=N.value.v;Q(F,N.value.telemetryBuilder),this._scheduledSpeculativeRequest?.headerRequestId===b.headerRequestId&&(this._scheduledSpeculativeRequest=null),N=await P.next()}let D=N.value.v;M(D,N.value.telemetryBuilder)}catch(D){p.trace(`Error while streaming further edits: ${Fwe.ErrorUtils.toString(D)}`);let F=new zd.NoNextEditReason.Unexpected(Fwe.ErrorUtils.fromUnknown(D));M(F,O)}})(),I=new zd.StatelessNextEditResult(Gh.Result.ok(void 0),O)}}catch(N){throw b.setResultError(N),N}return{nextEditRequest:b,nextEditResult:I}}_hookupCancellation(e,r,n){let o=new a0r.DisposableStore,s=!1,c=a(()=>{s||(s=!0,e.liveDependentants--)},"removeDependant"),l=o.add(new kat.TimeoutTimer);return o.add(r.onCancellationRequested(()=>{if(c(),!(e.liveDependentants>0)){if(!e.fetchIssued){e.cancellationTokenSource.cancel(),n?.dispose();return}l.setIfNotSet(()=>{e.liveDependentants>0||(e.cancellationTokenSource.cancel(),n?.dispose())},1e3)}})),o.add((0,a0r.toDisposable)(()=>{c(),e.liveDependentants===0&&n?.dispose()})),e.liveDependentants++,o}computeMinimumResponseDelay({triggerTime:e,isRebasedCachedEdit:r,isSubsequentCachedEdit:n,isFromSpeculativeRequest:o,enforceCacheDelay:s},c){if(!s)return c.trace("[minimumDelay] no minimum delay enforced due to enforceCacheDelay being false"),0;let l=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsCacheDelay,this._expService),u=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsRebasedCacheDelay,this._expService),d=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsSubsequentCacheDelay,this._expService),p=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestDelay,this._expService),h=l;r&&u!==void 0?h=u:n&&d!==void 0?h=d:o&&p!==void 0&&(h=p);let m=Date.now()-e,g=Math.max(0,h-m);return c.trace(`[minimumDelay] expected delay: ${h}ms, effective delay: ${g}. isRebasedCachedEdit: ${r} (rebasedCacheDelay: ${u}), isSubsequentCachedEdit: ${n} (subsequentCacheDelay: ${d}), isFromSpeculativeRequest: ${o} (speculativeRequestDelay: ${p})`),g}handleShown(e){if(this._lastShownTime=Date.now(),this._lastShownSuggestionId=e.requestId,this._lastOutcome=void 0,this._scheduledSpeculativeRequest=null,this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsSpeculativeRequests,this._expService)===Lwe.SpeculativeRequestsEnablement.On){let n=this._pendingStatelessNextEditRequest;n&&n.headerRequestId===e.source.headerRequestId?this._scheduledSpeculativeRequest={suggestion:e,headerRequestId:n.headerRequestId}:this._triggerSpeculativeRequest(e)}}async _triggerSpeculativeRequest(e){let r=e.result;if(!r?.edit)return;let n=r.targetDocumentId;if(!n)return;let o=new Tma.InlineEditRequestLogContext(n.uri,0,void 0),s=new $oi.StopWatch,c=this._logger.createSubLogger("_triggerSpeculativeRequest").withExtraTarget(l0r.LogTarget.fromCallback((b,I)=>{o.trace(`[${Math.floor(s.elapsed()).toString().padStart(4," ")}ms] ${I}`)})),l=r.edit.replace(r.documentBeforeEdits.value),u=r.edit.removeCommonSuffixPrefix(r.documentBeforeEdits.value),d=u.replaceRange.start+u.newText.length,p=new u0r.OffsetRange(d,d),h=[p],m=new ide.RootedEdit(r.documentBeforeEdits,new Qwe.StringEdit([r.edit])),g=new Woi.StringText(l),A=this._nextEditCache.lookupNextEdit(n,g,h),y=p;if(A)if(A.edit){c.trace("already have cached edit for post-edit state");return}else if(A.editWindow){c.trace("have cached no-suggestions entry for post-edit state, but it has an edit window. Checking if shifting selection based on cursor placement config can yield a cached edit");let b=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestsCursorPlacement,this._expService);if(b===Lwe.SpeculativeRequestsCursorPlacement.AfterEditWindow)if(c.trace("cursor placement config is AfterEditWindow, shifting selection to after edit window"),y=c0r.shiftSelectionAfterEditWindow(g,A.editWindow),A=this._nextEditCache.lookupNextEdit(n,g,[y]),A?.edit){c.trace("already have cached edit for post-edit state (after shifting selection)");return}else c.trace("no cached edit even after shifting selection");else c.trace(`cursor placement config is ${b}, not shifting selection`)}else{c.trace("already have cached no-suggestions entry for post-edit state");return}if(this._pendingStatelessNextEditRequest?.documentBeforeEdits.value===l){c.trace("already have pending request for post-edit state");return}if(this._speculativePendingRequest?.docId===n&&this._speculativePendingRequest?.postEditContent===l){c.trace("already have speculative request for post-edit state");return}let E=this._workspace.getDocument(n);if(!E){c.trace("document not found for speculative request");return}this._cancelSpeculativeRequest();let _=this._historyContextProvider.getHistoryContext(n);if(!_){c.trace("no history context for speculative request");return}let v=new Gwe(`sp-${e.source.opportunityId}`,o,void 0,!0,`sp-${(0,Koi.generateUuid)()}`);c.trace(`triggering speculative request for post-edit state (opportunityId=${v.opportunityId}, headerRequestId=${v.headerRequestId})`);try{let b=await this._createSpeculativeRequest(v,E,y,_,l,m,r.edit,{triggeredBySpeculativeRequest:e.source.isSpeculative,isSubsequentEdit:e.result?.isSubsequentEdit??!1},c);b&&(this._speculativePendingRequest={request:b,docId:n,postEditContent:l})}catch(b){c.trace(`speculative request failed: ${Fwe.ErrorUtils.toString(b)}`)}}async _createSpeculativeRequest(e,r,n,o,s,c,l,{triggeredBySpeculativeRequest:u,isSubsequentEdit:d},p){let h=r.id,m=this._debugRecorder?.getRecentLog(),g=e.log;g.setStatelessNextEditProviderId(this._statelessNextEditProvider.ID);let A=p.createSubLogger("_createSpeculativeRequest"),y=o.getDocumentAndIdx(h);if(!y){A.trace("active doc not found in history context");return}let E=new Woi.StringText(s),_=o.documents.map(Q=>{if(Q.docId!==h)return this._processDoc(Q);{let M=this._workspace.getWorkspaceRoot(h),N=new Qwe.StringEdit([l]),G=Uwe.RootedLineEdit.fromEdit(new ide.RootedEdit(r.value.get(),N)).removeCommonSuffixPrefixLines().edit,O=new zd.StatelessNextEditDocument(h,M,Q.languageId,r.value.get().getLines(),G,r.value.get(),ide.Edits.single(N),n);return{recentEdit:new ide.RootedEdit(r.value.get(),N),nextEditDoc:O,documentAfterEdits:E}}}),v=this._xtabHistoryTracker.getHistory(),b={kind:"edit",docId:h,edit:c};v.push(b);let I=new kat.DeferredPromise,x=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsSpeculativeRequestsAutoExpandEditWindowLines,this._expService),w;switch(x){case Lwe.SpeculativeRequestsAutoExpandEditWindowLines.Off:w=void 0;break;case Lwe.SpeculativeRequestsAutoExpandEditWindowLines.Always:w=this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService);break;case Lwe.SpeculativeRequestsAutoExpandEditWindowLines.Smart:{w=u||d?this._configService.getExperimentBasedConfig(zy.ConfigKey.TeamInternal.InlineEditsAutoExpandEditWindowLines,this._expService):void 0;break}default:(0,Hoi.assertNever)(x)}let R=new zd.StatelessNextEditRequest(e.headerRequestId,e.opportunityId,E,_.map(Q=>Q.nextEditDoc),y.idx,v,I,w,!0,g,void 0,m,void 0);g.setRequestInput(R),A.trace("starting speculative provider call");let P=`NES | spec | ${(0,bma.basename)(r.id.toUri().fsPath)} (v${r.version.get()})`,k=new Ima.CapturingToken(P,void 0);return this._requestLogger.captureInvocation(k,async()=>{try{await this._runSpeculativeProviderCall(R,_,h,e,A)}finally{this._addLogContextEntry(g,P)}}),R}async _runSpeculativeProviderCall(e,r,n,o,s){let c=s.createSubLogger("_runSpeculativeProviderCall"),l=e.xtabEditHistory,u=Yoi(r,l),d=o.log,p=this._statelessNextEditProvider.provideNextEdit(e,c,d,e.cancellationTokenSource.token),h=-1;try{let m=await p.next();m.done?(e.firstEdit.complete(Gh.Result.error(m.value.v)),e.setResult(new zd.StatelessNextEditResult(Gh.Result.error(m.value.v),m.value.telemetryBuilder)),c.trace("speculative request completed with no edits")):(async()=>{for(;!m.done;){++h;let g=m.value.v,A=u.get(g.targetDocument??n),y=g.edit,E=new Voi.LineEdit([y]),v=zoi(E,A.baseDocState).tryRebase(A.editsSoFar);if(v===void 0){c.trace(`speculative edit ${h} rebasing failed`),m=await p.next();continue}if(A.editsSoFar=A.editsSoFar.compose(v),v.replacements.length===1){let b=v.replacements[0];A.nextEdits.push(b);let I=this._nextEditCache.setKthNextEdit(A.docId,A.docContents,h===0?g.window:void 0,b,h,h===0?A.nextEdits:void 0,void 0,o,{isFromCursorJump:g.isFromCursorJump,originalEditWindow:g.originalWindow});!e.firstEdit.isSettled&&I&&(e.firstEdit.complete(Gh.Result.ok(I)),e.setResult(new zd.StatelessNextEditResult(Gh.Result.ok(void 0),m.value.telemetryBuilder))),c.trace(`cached speculative edit ${h}`)}A.docContents=v.applyOnText(A.docContents),m=await p.next()}})().finally(()=>{e.firstEdit.isSettled||(e.firstEdit.complete(Gh.Result.error(new zd.NoNextEditReason.Uncategorized(new Error("Speculative request ended without edits")))),e.setResult(new zd.StatelessNextEditResult(Gh.Result.error(new zd.NoNextEditReason.Uncategorized(new Error("Speculative request ended without edits"))),m.value.telemetryBuilder)))}),c.trace(`speculative request completed with ${h+1} edits`)}catch(m){c.trace(`speculative provider call error: ${Fwe.ErrorUtils.toString(m)}`)}}static shiftSelectionAfterEditWindow(e,r){let n=e.getTransformer(),o=n.getPosition(r.endExclusive-1),s=o.lineNumber+11e3&&r.result.edit&&(this._rejectionCollector.reject(e,r.result.edit),this._nextEditCache.rejectedNextEdit(r.source.headerRequestId)),this._lastRejectionTime=Date.now(),this._lastOutcome=qwe.Rejected,this._statelessNextEditProvider.handleRejection?.()}handleIgnored(e,r,n){this._lastOutcome=qwe.Ignored,this._lastShownSuggestionId===r.requestId&&!(n!==void 0)&&(this._cancelSpeculativeRequest(),this._statelessNextEditProvider.handleIgnored?.())}async runSnippy(e,r){r.result===void 0||r.result.edit===void 0||this._snippyService.handlePostInsertion(e.toUri(),r.result.documentBeforeEdits,r.result.edit)}_addLogContextEntry(e,r){e.includeInLogTree&&this._requestLogger.addEntry({type:"MarkdownContentRequest",debugName:r??e.getDebugName(),icon:e.getIcon(),startTimeMs:e.time,markdownContent:e.toLogDocument()})}clearCache(){this._nextEditCache.clear(),this._rejectionCollector.clear()}};Jv.NextEditProvider=d0r;Jv.NextEditProvider=d0r=c0r=vma([Bwe(5,zy.IConfigurationService),Bwe(6,wma.ISnippyService),Bwe(7,l0r.ILogService),Bwe(8,Rma.IExperimentationService),Bwe(9,xma.IRequestLogger)],d0r);function Lma(t){if(!t)throw new f0r.BugIndicatingError("expected value to be defined, but it was not");return t}a(Lma,"assertDefined");var Gwe=class{static{a(this,"NextEditFetchRequest")}constructor(e,r,n,o,s=(0,Koi.generateUuid)()){this.opportunityId=e,this.log=r,this.providerRequestStartDateTime=n,this.isSpeculative=o,this.headerRequestId=s}};Jv.NextEditFetchRequest=Gwe});var ssi=T(Of=>{"use strict";f();Object.defineProperty(Of,"__esModule",{value:!0});Of.GLOB_SPLIT=Of.GLOBSTAR=void 0;Of.getEmptyExpression=Gma;Of.splitGlobAware=m0r;Of.isEmptyPattern=Kma;Of.match=tga;Of.parse=nsi;Of.isRelativePattern=isi;Of.getBasenameTerms=rga;Of.getPathTerms=nga;Of.patternsEquals=sga;var Fma=Lc(),h0r=vc(),Uma=x5t(),Qma=Wx(),eQ=gm(),qma=nF(),Hwe=m0();function Gma(){return Object.create(null)}a(Gma,"getEmptyExpression");Of.GLOBSTAR="**";Of.GLOB_SPLIT="/";var Nat="[/\\\\]",Mat="[^/\\\\]",Hma=/\//g;function Xoi(t,e){switch(t){case 0:return"";case 1:return`${Mat}*?`;default:return`(?:${Nat}|${Mat}+${Nat}${e?`|${Nat}${Mat}+`:""})*?`}}a(Xoi,"starsToRegExp");function m0r(t,e){if(!t)return[];let r=[],n=!1,o=!1,s="";for(let c of t){switch(c){case e:if(!n&&!o){r.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=c}return s&&r.push(s),r}a(m0r,"splitGlobAware");function rsi(t){if(!t)return"";let e="",r=m0r(t,Of.GLOB_SPLIT);if(r.every(n=>n===Of.GLOBSTAR))e=".*";else{let n=!1;r.forEach((o,s)=>{if(o===Of.GLOBSTAR){if(n)return;e+=Xoi(2,s===r.length-1)}else{let c=!1,l="",u=!1,d="";for(let p of o){if(p!=="}"&&c){l+=p;continue}if(u&&(p!=="]"||!d)){let h;p==="-"?h=p:(p==="^"||p==="!")&&!d?h="^":p===Of.GLOB_SPLIT?h="":h=(0,Hwe.escapeRegExpCharacters)(p),d+=h;continue}switch(p){case"{":c=!0;continue;case"[":u=!0;continue;case"}":{let m=`(?:${m0r(l,",").map(g=>rsi(g)).join("|")})`;e+=m,c=!1,l="";break}case"]":{e+="["+d+"]",u=!1,d="";break}case"?":e+=Mat;continue;case"*":e+=Xoi(1);continue;default:e+=(0,Hwe.escapeRegExpCharacters)(p)}}su===d,endsWith:n?Hwe.endsWithIgnoreCase:(u,d)=>u.endsWith(d),isEqualOrParent:a((u,d)=>(0,Uma.isEqualOrParent)(u,d,!qma.isLinux||n),"isEqualOrParent")},s=`${n?r.toLowerCase():r}_${!!e.trimForExclusions}_${n}`,c=Zoi.get(s);if(c)return esi(c,t,o);let l;return jma.test(r)?c=Jma(r.substring(4),r,o):(l=$ma.exec(p0r(r,o)))?c=Xma(l[1],r,o):(e.trimForExclusions?Wma:Vma).test(r)?c=Zma(r,o):(l=zma.exec(p0r(r,o)))?c=tsi(l[1].substring(1),r,!0,o):(l=Yma.exec(p0r(r,o)))?c=tsi(l[1],r,!1,o):c=ega(r,o),Zoi.set(s,c),esi(c,t,o)}a(A0r,"parsePattern");function esi(t,e,r){if(typeof e=="string")return t;let n=a(function(o,s){return r.isEqualOrParent(o,e.base)?t((0,Hwe.ltrim)(o.substring(e.base.length),eQ.sep),s):null},"wrappedPattern");return n.allBasenames=t.allBasenames,n.allPaths=t.allPaths,n.basenames=t.basenames,n.patterns=t.patterns,n}a(esi,"wrapRelativePattern");function p0r(t,e){return e.trimForExclusions&&t.endsWith("/**")?t.substring(0,t.length-2):t}a(p0r,"trimForExclusions");function Jma(t,e,r){return function(n,o){return typeof n=="string"&&r.endsWith(n,t)?e:null}}a(Jma,"trivia1");function Xma(t,e,r){let n=`/${t}`,o=`\\${t}`,s=a(function(l,u){return typeof l!="string"?null:u?r.equals(u,t)?e:null:r.equals(l,t)||r.endsWith(l,n)||r.endsWith(l,o)?e:null},"parsedPattern"),c=[t];return s.basenames=c,s.patterns=[e],s.allBasenames=c,s}a(Xma,"trivia2");function Zma(t,e){let r=osi(t.slice(1,-1).split(",").map(l=>A0r(l,e)).filter(l=>l!==WR),t),n=r.length;if(!n)return WR;if(n===1)return r[0];let o=a(function(l,u){for(let d=0,p=r.length;d!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(Zma,"trivia3");function tsi(t,e,r,n){let o=eQ.sep===eQ.posix.sep,s=o?t:t.replace(Hma,eQ.sep),c=eQ.sep+s,l=eQ.posix.sep+t,u;return r?u=a(function(d,p){return typeof d=="string"&&(n.equals(d,s)||n.endsWith(d,c)||!o&&(n.equals(d,t)||n.endsWith(d,l)))?e:null},"parsedPattern"):u=a(function(d,p){return typeof d=="string"&&(n.equals(d,s)||!o&&n.equals(d,t))?e:null},"parsedPattern"),u.allPaths=[(r?"*/":"./")+t],u}a(tsi,"trivia4and5");function ega(t,e){try{let r=new RegExp(`^${rsi(t)}$`,e.ignoreCase?"i":void 0);return function(n){return r.lastIndex=0,typeof n=="string"&&r.test(n)?t:null}}catch{return WR}}a(ega,"toRegExp");function tga(t,e,r){return!t||typeof e!="string"?!1:nsi(t,r)(e)}a(tga,"match");function nsi(t,e={}){if(!t)return g0r;if(typeof t=="string"||isi(t)){let r=A0r(t,e);if(r===WR)return g0r;let n=a(function(o,s){return!!r(o,s)},"resultPattern");return r.allBasenames&&(n.allBasenames=r.allBasenames),r.allPaths&&(n.allPaths=r.allPaths),n}return iga(t,e)}a(nsi,"parse");function isi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(isi,"isRelativePattern");function rga(t){return t.allBasenames||[]}a(rga,"getBasenameTerms");function nga(t){return t.allPaths||[]}a(nga,"getPathTerms");function iga(t,e){let r=osi(Object.getOwnPropertyNames(t).map(l=>oga(l,t[l],e)).filter(l=>l!==WR)),n=r.length;if(!n)return WR;if(!r.some(l=>!!l.requiresSiblings)){if(n===1)return r[0];let l=a(function(p,h){let m;for(let g=0,A=r.length;g{for(let g of m){let A=await g;if(typeof A=="string")return A}return null})():null},"resultExpression"),u=r.find(p=>!!p.allBasenames);u&&(l.allBasenames=u.allBasenames);let d=r.reduce((p,h)=>h.allPaths?p.concat(h.allPaths):p,[]);return d.length&&(l.allPaths=d),l}let o=a(function(l,u,d){let p,h;for(let m=0,g=r.length;m{for(let m of h){let g=await m;if(typeof g=="string")return g}return null})():null},"resultExpression"),s=r.find(l=>!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(iga,"parsedExpression");function oga(t,e,r){if(e===!1)return WR;let n=A0r(t,r);if(n===WR)return WR;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let s=a((c,l,u,d)=>{if(!d||!n(c,l))return null;let p=o.replace("$(basename)",()=>u),h=d(p);return(0,h0r.isThenable)(h)?h.then(m=>m?t:null):h?t:null},"result");return s.requiresSiblings=!0,s}}return n}a(oga,"parseExpressionPattern");function osi(t,e){let r=t.filter(l=>!!l.basenames);if(r.length<2)return t;let n=r.reduce((l,u)=>{let d=u.basenames;return d?l.concat(d):l},[]),o;if(e){o=[];for(let l=0,u=n.length;l{let d=u.patterns;return d?l.concat(d):l},[]);let s=a(function(l,u){if(typeof l!="string")return null;if(!u){let p;for(p=l.length;p>0;p--){let h=l.charCodeAt(p-1);if(h===47||h===92)break}u=l.substring(p)}let d=n.indexOf(u);return d!==-1?o[d]:null},"aggregate");s.basenames=n,s.patterns=o,s.allBasenames=n;let c=t.filter(l=>!l.basenames);return c.push(s),c}a(osi,"aggregateBasenameMatches");function sga(t,e){return(0,Fma.equals)(t,e,(r,n)=>typeof r=="string"&&typeof n=="string"?r===n:typeof r!="string"&&typeof n!="string"?r.base===n.base&&r.pattern===n.pattern:!1)}a(sga,"patternsEquals")});var Bat=T(xc=>{"use strict";f();var aga=xc&&xc.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cga=xc&&xc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lga=xc&&xc.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o(0,asi.isEqual)(r.uri,t)||r.uri.path===t.path||E0r(t,r))}a(y0r,"findNotebook");function E0r(t,e){if(t.scheme===jwe.Schemas.vscodeNotebookCell||t.scheme===jwe.Schemas.vscodeNotebookCellOutput){let r=e.getCells().findIndex(n=>(0,asi.isEqual)(n.document.uri,t)||n.document.uri.fragment===t.fragment&&n.document.uri.path===t.path);if(r!==-1)return e.getCells()[r]}}a(E0r,"findCell");function uga(t,e){if(t.scheme!==jwe.Schemas.vscodeNotebookCellOutput)return;let r=new URLSearchParams(t.query),[n,o]=csi(t,e);if(!o||!o.outputs.length)return;let s=(r.get("outputIndex")?parseInt(r.get("outputIndex")||"",10):void 0)||0;if(!(s>o.outputs.length-1))return[n,o,o.outputs[s]]}a(uga,"getNotebookCellOutput");function csi(t,e){let r=y0r(t,e)||e.find(o=>o.uri.path===t.path);if(!r)return[void 0,void 0];let n=E0r(t,r);return n===void 0?[r,void 0]:[r,n]}a(csi,"getNotebookAndCellFromUri");function dga(t){return t.scheme===jwe.Schemas.vscodeNotebookCell||t.scheme==="untitled"&&t.fragment.startsWith("notebook-chat-input")}a(dga,"isNotebookCellOrNotebookChatInput");function fga(t){return t.scheme===jwe.Schemas.vscodeNotebookCell}a(fga,"isNotebookCell");function pga(t){return t.path.endsWith(".ipynb")}a(pga,"isJupyterNotebookUri");function hga(t){return t.notebookType==="jupyter-notebook"}a(hga,"isJupyterNotebook");function mga(t,e={}){return JSON.stringify({cells:t.getCells().map(r=>({uri_fragment:e.cell_uri_fragment?r.document.uri.fragment:void 0,cell_type:r.kind,source:r.document.getText().split(/\r?\n/)}))})}a(mga,"serializeNotebookDocument");function gga(t){try{let e=t.replace(/\n/g,""),n=/```(?:json)?(.+)/g.exec(e);if(n){let o=n[1],s=o.indexOf("```"),c=s===-1?o:o.substring(0,s);return JSON.parse(c)}}catch{}}a(gga,"extractNotebookOutline");function lsi(t){let e=t;return typeof e=="object"&&e!==null&&(typeof e.include=="string"||dsi(e.include))}a(lsi,"isDocumentExcludePattern");function usi(t){let e=t;return typeof e=="object"&&e!==null&&typeof e.filenamePattern=="string"}a(usi,"isFilenamePattern");function dsi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(dsi,"isRelativePattern");function Aga(t){let e=t;return!!e&&!!e.type&&!!e.displayName&&!!e.selector}a(Aga,"isNotebookEditorContribution");function yga(t){let e=[];for(let[r,n]of Object.entries(t))n&&e.push({filenamePattern:r,viewType:n});return e}a(yga,"extractEditorAssociation");function fsi(t,e){if(typeof e=="string"&&ode.match(e.toLowerCase(),(0,sde.basename)(t.fsPath).toLowerCase()))return!0;if(lsi(e)){let r=e.include,n=e.exclude;if(!r)return!1;if(ode.match(r,(0,sde.basename)(t.fsPath).toLowerCase()))return!(n&&ode.match(n,(0,sde.basename)(t.fsPath).toLowerCase()))}return usi(e)&&ode.match(e.filenamePattern,(0,sde.basename)(t.fsPath).toLowerCase())?!(e.excludeFileNamePattern&&ode.match(e.excludeFileNamePattern,(0,sde.basename)(t.fsPath).toLowerCase())):!1}a(fsi,"notebookSelectorMatches");function psi(t,e){let r=[];for(let n of e)n.filenamePattern&&ode.match(n.filenamePattern.toLowerCase(),(0,sde.basename)(t.fsPath).toLowerCase())&&r.push({filenamePattern:n.filenamePattern,viewType:n.viewType});return r}a(psi,"getNotebookEditorAssociations");function Ega(t,e,r,n){if(y0r(t,e))return!0;let o=r.filter(c=>c.selector.some(l=>fsi(t,l)));if(o.length===0)return!1;let s=psi(t,n);for(let c of s)if(o.some(l=>l.type===c.viewType))return!0;return!!o.some(c=>(c.priority??Oat.default)===Oat.default)}a(Ega,"_hasSupportedNotebooks")});var ysi=T(Yy=>{"use strict";f();var _ga=Yy&&Yy.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Cga=Yy&&Yy.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Yy,"__esModule",{value:!0});Yy.TelemetrySender=Yy.NextEditProviderTelemetryBuilder=Yy.DiagnosticsTelemetryBuilder=Yy.LlmNESTelemetryBuilder=void 0;var hsi=QD(),vga=F5(),Asi=bp(),bga=Bat(),Tga=vc(),Lat=ro(),Sga=kj(),msi=gO(),gsi=kp(),Fat=class extends Lat.Disposable{static{a(this,"LlmNESTelemetryBuilder")}build(e){let r,n,o,s,c,l=!1,u,d,p;if(this._request){let g=this._request.getActiveDocument();r=this._request.documents.length,n=this._request.documents.reduce((y,E)=>y+E.recentEdits.edits.length,0),o=g.recentEdits.edits.length,s=g.languageId,c=g.documentAfterEditsLines.length,l=g.id.toUri().scheme===Sga.Schemas.vscodeNotebookCell||this._notebookService?.hasSupportedNotebooks(g.id.toUri())||!1,u=this._workspaceService===void 0?void 0:(0,bga.findNotebook)(g.id.toUri(),this._workspaceService.notebookDocuments)?.notebookType;let A=this._gitExtensionService?.getExtensionApi();if(A){let y=A.getRepository(gsi.Uri.parse(g.id.uri));if(y){let v=y.state.HEAD?.upstream?.remote,b=y.state.remotes.find(I=>I.name===v);b?.fetchUrl&&(d=b.pushUrl||b.fetchUrl)}let E=new Set,_=[...new Set(this._request.documents.map(v=>A.getRepository(gsi.Uri.parse(v.id.uri))).filter(Boolean))];for(let v of _){let b=v?.state.HEAD?.upstream?.remote,I=v?.state.remotes.find(x=>x.name===b);I?.fetchUrl&&E.add(I.fetchUrl),I?.pushUrl&&E.add(I.pushUrl)}p=[...E]}}let h;if(e&&this.editCollectingInfo!==void 0){let g=this.editCollectingInfo.originalDoc.value,A;if(this._debugRecorder&&this._requestBookmark){let y=this._debugRecorder.getRecentLog(),E=JSON.stringify(y)?.length||0;A={entries:E>200*1024?void 0:y,entriesSize:E,requestTime:this._requestBookmark.timeMs}}h={text:g.length>200*1024?void 0:g,textLength:g.length,selection:this.editCollectingInfo.originalSelection.map(y=>({start:y.start,endExclusive:y.endExclusive})),edits:this.editCollectingInfo.edits.map(y=>y.edit.replacements.map(E=>({time:y.time.toISOString(),start:E.replaceRange.start,endExclusive:E.replaceRange.endExclusive,newText:E.newText}))).flat(),tags:[],recording:A}}let m=this._statelessNextEditTelemetry?.fetchStartedAt===void 0?void 0:this._statelessNextEditTelemetry.fetchStartedAt-this._startTime;return{providerId:this._providerId,headerRequestId:this._headerRequestId,nextEditProviderDuration:this._duration,isFromCache:this._isFromCache,reusedRequest:this._reusedRequest,subsequentEditOrder:this._subsequentEditOrder,documentsCount:r,editsCount:n,activeDocumentEditsCount:o,activeDocumentLanguageId:s,activeDocumentOriginalLineCount:c,fetchStartedAfterMs:m,hasNextEdit:this._hasNextEdit,wasPreviouslyRejected:this._wasPreviouslyRejected,isNotebook:l,notebookType:u,status:this._status,nextEditProviderError:this._nextEditProviderError,alternativeAction:h,...this._statelessNextEditTelemetry,activeDocumentRepository:d,repositoryUrls:p,nesConfigs:this._nesConfigs}}get originalSelectionLine(){return this.editCollectingInfo?.originalSelectionLine}constructor(e,r,n,o,s,c,l){super(),this._gitExtensionService=e,this._notebookService=r,this._workspaceService=n,this._providerId=o,this._doc=s,this._debugRecorder=c,this._requestBookmark=l,this._isFromCache=!1,this._hasNextEdit=!1,this._wasPreviouslyRejected=!1,this._status="new",this._startTime=Date.now(),this._doc&&(this.editCollectingInfo={originalDoc:this._doc.value.get(),originalSelection:this._doc.selection.get(),originalSelectionLine:this._doc.primarySelectionLine.get(),edits:[]},this._store.add((0,vga.autorunWithChanges)(this,{value:this._doc.value},u=>{let d=new Date;u.value.changes.forEach(p=>{this.editCollectingInfo?.edits.push({time:d,edit:p})})})))}setNESConfigs(e){return this._nesConfigs=e,this}setHeaderRequestId(e){return this._headerRequestId=e,this}setIsFromCache(){return this._isFromCache=!0,this}setReusedRequest(e){return this._reusedRequest=e,this}setSubsequentEditOrder(e){return this._subsequentEditOrder=e,this}setRequest(e){return this._request=e,this}setStatelessNextEditTelemetry(e){return this._statelessNextEditTelemetry=e,this}setHasNextEdit(e){return this._hasNextEdit=e,this}setWasPreviouslyRejected(){return this._wasPreviouslyRejected=!0,this}markEndTime(){return this._duration=Date.now()-this._startTime,this}setStatus(e){return this._status=e,this}setNextEditProviderError(e){return this._nextEditProviderError=e,this}};Yy.LlmNESTelemetryBuilder=Fat;var Uat=class{static{a(this,"DiagnosticsTelemetryBuilder")}constructor(){this._droppedReasons=[]}build(){let e=this._droppedReasons.length>0?JSON.stringify(this._droppedReasons):void 0;return{diagnosticType:this._type,diagnosticDroppedReasons:e,diagnosticAlternativeImportsCount:this._diagnosticRunTelemetry?.alternativeImportsCount,diagnosticHasExistingSameFileImport:this._diagnosticRunTelemetry?.hasExistingSameFileImport,diagnosticIsLocalImport:this._diagnosticRunTelemetry?.isLocalImport,diagnosticDistanceToUnknownDiagnostic:this._diagnosticRunTelemetry?.distanceToUnknownDiagnostic,diagnosticDistanceToAlternativeDiagnostic:this._diagnosticRunTelemetry?.distanceToAlternativeDiagnostic,diagnosticHasAlternativeDiagnosticForSameRange:this._diagnosticRunTelemetry?.hasAlternativeDiagnosticForSameRange}}populate(e){this._droppedReasons.forEach(r=>e.addDroppedReason(r)),this._type&&e.setType(this._type),this._diagnosticRunTelemetry&&e.setDiagnosticRunTelemetry(this._diagnosticRunTelemetry)}setType(e){return this._type=e,this}addDroppedReason(e){return this._droppedReasons.push(e),this}setDiagnosticRunTelemetry(e){return this._diagnosticRunTelemetry=e,this}};Yy.DiagnosticsTelemetryBuilder=Uat;var _0r=class t extends Lat.Disposable{static{a(this,"NextEditProviderTelemetryBuilder")}static{this.providerIdToReqN=new Map}get isSent(){return this._isSent}markAsSent(){this._isSent=!0}build(e){let r=this._nesBuilder.build(e),n=this._diagnosticsBuilder.build();return{...r,...n,opportunityId:this._opportunityId||"",requestN:this._requestN,isShown:this._isShown,acceptance:this._acceptance,disposalReason:this._disposalReason,supersededByOpportunityId:this._supersededByOpportunityId,pickedNES:this._nesTypePicked,hadLlmNES:this._hadLlmNES,isMultilineEdit:this._isMultilineEdit,isEolDifferent:this._isEolDifferent,isActiveDocument:this._isActiveDocument,isNextEditorVisible:this._isNextEditorVisible,isNextEditorRangeVisible:this._isNextEditorRangeVisible,isNESForAnotherDoc:this._isNESForAnotherDoc,notebookId:this._notebookId,notebookCellLines:this._notebookCellLines,notebookCellMarkerCount:this._notebookCellMarkerCount,notebookCellMarkerIndex:this._notebookCellMarkerIndex,hadDiagnosticsNES:this._hadDiagnosticsNES,configIsDiagnosticsNESEnabled:this._configIsDiagnosticsNESEnabled,isNaturalLanguageDominated:this._isNaturalLanguageDominated,postProcessingOutcome:this._postProcessingOutcome,userTypingDisagreed:this._userTypingDisagreed}}get nesBuilder(){return this._nesBuilder}get diagnosticsBuilder(){return this._diagnosticsBuilder}constructor(e,r,n,o,s,c,l){super(),this.doc=s,this._isSent=!1,this._isShown=!1,this._acceptance="notAccepted",this._disposalReason=void 0,this._supersededByOpportunityId=void 0,this._userTypingDisagreed=void 0,this._notebookCellMarkerCount=0,this._notebookCellMarkerIndex=-1,this._isNESForAnotherDoc=!1,this._hadLlmNES=!1,this._hadDiagnosticsNES=!1,this._configIsDiagnosticsNESEnabled=!1,this._isNaturalLanguageDominated=!1;let u=t.providerIdToReqN.get(o)||0;this._requestN=++u,t.providerIdToReqN.set(o,u),this._nesBuilder=this._register(new Fat(e,r,n,o,s,c,l)),this._diagnosticsBuilder=new Uat}setOpportunityId(e){return this._opportunityId=e,this}setAsShown(){return this._isShown=!0,this}setAcceptance(e){return this._acceptance=e,this}setDisposalReason(e){return this._disposalReason=e,this}setSupersededBy(e){return this._supersededByOpportunityId=e,this}setUserTypingDisagreed(e){return this._userTypingDisagreed=e,this}setPickedNESType(e){return this._nesTypePicked=e,this}setIsActiveDocument(e){return this._isActiveDocument=e,this}setNotebookCellMarkerCount(e){return this._notebookCellMarkerCount=e,this}setIsMultilineEdit(e){return this._isMultilineEdit=e,this}setIsEolDifferent(e){return this._isEolDifferent=e,this}setIsNextEditorVisible(e){return this._isNextEditorVisible=e,this}setIsNextEditorRangeVisible(e){return this._isNextEditorRangeVisible=e,this}setNotebookId(e){return this._notebookId=e,this}setNotebookCellLines(e){return this._notebookCellLines=e,this}setNotebookCellMarkerIndex(e){return this._notebookCellMarkerIndex=e,this}setIsNESForOtherEditor(e){return this._isNESForAnotherDoc=e,this}setHadLlmNES(e){return this._hadLlmNES=e,this}setHadDiagnosticsNES(e){return this._hadDiagnosticsNES=e,this}setStatus(e){return this._nesBuilder.setStatus(e),this}setConfigIsDiagnosticsNESEnabled(e){return this._configIsDiagnosticsNESEnabled=e,this}setIsNaturalLanguageDominated(e){return this._isNaturalLanguageDominated=e,this}setPostProcessingOutcome(e){let r=e.displayLocation?{label:e.displayLocation.label,range:e.displayLocation.range.toString()}:void 0;return this._postProcessingOutcome=JSON.stringify({suggestedEdit:e.edit.toString(),isInlineCompletion:e.isInlineCompletion,displayLocation:r}),this}};Yy.NextEditProviderTelemetryBuilder=_0r;var C0r=class{static{a(this,"IdleDetector")}get isDisposed(){return this._store.isDisposed}constructor(e,r,n){this._onIdle=r,this._onUserJump=n,this._store=new Lat.DisposableStore,this._disposalTracker=new Lat.RefCountedDisposable(this._store),this._selectionSnapshots=new Map,this._lastEditTime=0;let o=5e3,s=this._store.add(new Tga.RunOnceScheduler(()=>{this._onIdle(o)},o));this._idleScheduler=s;let c=!0;this._store.add((0,msi.autorun)(u=>{if(e.onDidOpenDocumentChange.read(u),c){c=!1;return}this._lastEditTime=Date.now(),s.schedule()}));let l=!0;this._store.add((0,msi.autorunHandleChanges)({owner:this,changeTracker:{createChangeSummary:a(()=>({removed:[]}),"createChangeSummary"),handleChange:a((u,d)=>(u.didChange(e.openDocuments)&&(d.removed=u.change.removed),!0),"handleChange")}},(u,d)=>{if(this._store.isDisposed)return;let p=e.openDocuments.read(u);for(let h of p)h.primarySelectionLine.read(u);if(l){l=!1;for(let h of p)this._selectionSnapshots.set(h.id.uri,h.primarySelectionLine.get());return}for(let h of d.removed)this._selectionSnapshots.delete(h.id.uri);if(!(Date.now()-this._lastEditTime<200))for(let h of p){let m=h.id.uri,g=h.primarySelectionLine.get();if(this._selectionSnapshots.get(m)!==g){this._selectionSnapshots.set(m,g),this._onUserJump(m,g);return}}}))}scheduleIdleTimer(){this._idleScheduler?.schedule()}acquire(){this._disposalTracker.acquire()}release(){this._disposalTracker.release()}forceDispose(){this._store.dispose()}},v0r=class{static{a(this,"TelemetrySender")}constructor(e,r){this._workspace=e,this._telemetryService=r,this._map=new Map}scheduleSendingEnhancedTelemetry(e,r){let n=this._map.get(e);n&&(n.builder!==r&&n.builder.dispose(),this._removeEntry(e,n));let o=setTimeout(()=>{this._enterIdleDetection(e,r)},120*1e3);this._map.set(e,{builder:r,timeout:o})}_enterIdleDetection(e,r){let n=this._workspace;if(!n){this._buildAndSendEnhancedTelemetry(e,r,{reason:"idle",details:{idleTimeoutMs:0}});return}this._idleDetector?this._idleDetector.acquire():this._idleDetector=new C0r(n,l=>this._sendAllPendingInIdlePhase({reason:"idle",details:{idleTimeoutMs:l}}),(l,u)=>this._sendAllPendingInIdlePhaseWithJump(l,u)),this._idleDetector.scheduleIdleTimer();let o=3e4,s=setTimeout(()=>{this._sendForEntry(e,{reason:"hard_cap",details:{hardCapTimeoutMs:o}})},o),c=this._map.get(e);c&&(c.hardCapTimeout=s)}_releaseIdleDetector(){this._idleDetector?.release(),this._idleDetector?.isDisposed&&(this._idleDetector=void 0)}_sendAllPendingInIdlePhase(e){let r=[];for(let[n,o]of this._map)o.hardCapTimeout!==void 0&&r.push(n);for(let n of r)this._sendForEntry(n,e)}_sendAllPendingInIdlePhaseWithJump(e,r){let n=[];for(let[o,s]of this._map)s.hardCapTimeout!==void 0&&n.push([o,s.builder]);for(let[o,s]of n){let c=s.doc?.id.uri,l=s.nesBuilder.originalSelectionLine,u=c!==void 0&&l!==void 0?{file:c,line:l}:void 0;this._sendForEntry(o,{reason:"user_jump",details:{from:u,to:{file:e,line:r}}})}}_sendForEntry(e,r){let n=this._map.get(e);if(!n)return;n.hardCapTimeout!==void 0&&(clearTimeout(n.hardCapTimeout),this._releaseIdleDetector()),this._map.delete(e);let o;try{o=n.builder.build(!0)}finally{n.builder.dispose()}this._doSendEnhancedTelemetry(o,r)}_removeEntry(e,r){clearTimeout(r.timeout),r.hardCapTimeout!==void 0&&(clearTimeout(r.hardCapTimeout),this._releaseIdleDetector()),this._map.delete(e)}_buildAndSendEnhancedTelemetry(e,r,n){let o;this._map.delete(e);try{o=r.build(!0)}finally{r.dispose()}this._doSendEnhancedTelemetry(o,n)}sendTelemetry(e,r){if(e){let o=this._map.get(e);o&&this._removeEntry(e,o)}let n=r.build(!0);r.isSent||(this._doSendTelemetry(n),r.markAsSent()),this._doSendEnhancedTelemetry(n,void 0)}sendTelemetryForBuilder(e){if(e.isSent)return;let r=e.build(!1);this._doSendTelemetry(r),e.markAsSent()}async _doSendTelemetry(e){let{opportunityId:r,headerRequestId:n,requestN:o,providerId:s,modelName:c,hadStatelessNextEditProviderCall:l,statelessNextEditProviderDuration:u,nextEditProviderDuration:d,isFromCache:p,reusedRequest:h,subsequentEditOrder:m,activeDocumentLanguageId:g,activeDocumentOriginalLineCount:A,nLinesOfCurrentFileInPrompt:y,wasPreviouslyRejected:E,isShown:_,isNotebook:v,notebookType:b,isNESForAnotherDoc:I,isActiveDocument:x,isEolDifferent:w,isMultilineEdit:R,isNextEditorRangeVisible:P,isNextEditorVisible:k,acceptance:Q,disposalReason:M,logProbThreshold:N,documentsCount:G,editsCount:O,activeDocumentEditsCount:D,promptLineCount:F,promptCharCount:U,hadLowLogProbSuggestion:L,nEditsSuggested:H,lineDistanceToMostRecentEdit:$,isCursorAtEndOfLine:W,isInlineSuggestion:j,debounceTime:ce,artificialDelay:J,hasNextEdit:Te,notebookCellMarkerCount:fe,notebookCellMarkerIndex:Ne,notebookId:Ve,notebookCellLines:Ue,nextEditLogprob:Ke,supersededByOpportunityId:X,noNextEditReasonKind:le,noNextEditReasonMessage:te,fetchStartedAfterMs:xe,response:Z,configIsDiagnosticsNESEnabled:ae,isNaturalLanguageDominated:De,diagnosticType:Y,diagnosticDroppedReasons:ee,diagnosticHasExistingSameFileImport:Ee,diagnosticIsLocalImport:Ae,diagnosticAlternativeImportsCount:ve,diagnosticDistanceToUnknownDiagnostic:We,diagnosticDistanceToAlternativeDiagnostic:Ze,diagnosticHasAlternativeDiagnosticForSameRange:Et,hadDiagnosticsNES:Rt,hadLlmNES:Qt,pickedNES:Ft,xtabAggressivenessLevel:ue,xtabUserHappinessScore:Be,userAggressivenessSetting:et,modelConfig:lt}=e,ye,Le,$e,rt;if(Z!==void 0){let{response:it,ttft:dt,fetchResult:z,fetchTime:se}=await Z;it.type===hsi.ChatFetchResponseType.Success&&(ye=it.usage),Le=dt,$e=z,rt=se}this._sendTelemetryToBoth({opportunityId:r,headerRequestId:n,providerId:s,modelName:c,activeDocumentLanguageId:g,mergeConflictExpanded:e.mergeConflictExpanded,acceptance:Q,disposalReason:M,supersededByOpportunityId:X,noNextEditReasonKind:le,noNextEditReasonMessage:te,fetchResult:$e,nextEditProviderError:e.nextEditProviderError,reusedRequest:h,diagnosticType:Y,diagnosticDroppedReasons:ee,pickedNES:Ft,notebookType:b,notebookId:Ve,notebookCellLines:Ue,nextCursorLineError:e.nextCursorPrediction?.nextCursorLineError,xtabAggressivenessLevel:ue,userAggressivenessSetting:et,modelConfig:lt},{requestN:o,hadStatelessNextEditProviderCall:this._boolToNum(l),statelessNextEditProviderDuration:u,nextEditProviderDuration:d,isFromCache:this._boolToNum(p),subsequentEditOrder:m,activeDocumentOriginalLineCount:A,activeDocumentNLinesInPrompt:y,wasPreviouslyRejected:this._boolToNum(E),isShown:this._boolToNum(_),isNotebook:this._boolToNum(v),isNESForAnotherDoc:this._boolToNum(I),isActiveDocument:this._boolToNum(x),isEolDifferent:this._boolToNum(w),isMultilineEdit:this._boolToNum(R),isNextEditorRangeVisible:this._boolToNum(P),isNextEditorVisible:this._boolToNum(k),hasNotebookCellMarker:fe>0?1:0,notebookCellMarkerCount:fe,notebookCellMarkerIndex:Ne,logProbThreshold:N,documentsCount:G,editsCount:O,activeDocumentEditsCount:D,promptLineCount:F,promptCharCount:U,hadLowLogProbSuggestion:this._boolToNum(L),nEditsSuggested:H,lineDistanceToMostRecentEdit:$,isCursorAtEndOfLine:this._boolToNum(W),isInlineSuggestion:this._boolToNum(j),debounceTime:ce,artificialDelay:J,fetchStartedAfterMs:xe,ttft:Le,fetchTime:rt,promptTokens:ye?.prompt_tokens,responseTokens:ye?.completion_tokens,cachedTokens:ye?.prompt_tokens_details?.cached_tokens,acceptedPredictionTokens:ye?.completion_tokens_details?.accepted_prediction_tokens,rejectedPredictionTokens:ye?.completion_tokens_details?.rejected_prediction_tokens,hasNextEdit:this._boolToNum(Te),userTypingDisagreed:this._boolToNum(e.userTypingDisagreed),nextEditLogprob:Ke,hadDiagnosticsNES:this._boolToNum(Rt),hadLlmNES:this._boolToNum(Qt),configIsDiagnosticsNESEnabled:this._boolToNum(ae),isNaturalLanguageDominated:this._boolToNum(De),diagnosticHasExistingSameFileImport:this._boolToNum(Ee),diagnosticIsLocalImport:this._boolToNum(Ae),diagnosticAlternativeImportsCount:ve,diagnosticDistanceToUnknownDiagnostic:We,diagnosticDistanceToAlternativeDiagnostic:Ze,diagnosticHasAlternativeDiagnosticForSameRange:this._boolToNum(Et),nextCursorLineDistance:e.nextCursorPrediction?.nextCursorLineDistance,xtabUserHappinessScore:Be,nDiffsInPrompt:e.nDiffsInPrompt,diffTokensInPrompt:e.diffTokensInPrompt})}_sendTelemetryToBoth(e,r){this._telemetryService.sendMSFTTelemetryEvent("provideInlineEdit",e,r),this._telemetryService.sendGHTelemetryEvent("copilot-nes/provideInlineEdit",e,r)}async _doSendEnhancedTelemetry(e,r){let{opportunityId:n,headerRequestId:o,providerId:s,activeDocumentLanguageId:c,status:l,modelName:u,prompt:d,response:p,alternativeAction:h,postProcessingOutcome:m,activeDocumentRepository:g,repositoryUrls:A,cursorJumpModelName:y,cursorJumpPrompt:E,cursorJumpResponse:_,lintErrors:v,terminalOutput:b,similarFilesContext:I,modelConfig:x,isFromCache:w}=e,R=p===void 0?p:await p,P=await I?.catch(()=>{});this._telemetryService.sendEnhancedGHTelemetryEvent("copilot-nes/provideInlineEdit",(0,Asi.multiplexProperties)({opportunityId:n,headerRequestId:o,providerId:s,activeDocumentLanguageId:c,suggestionStatus:l,modelName:u,prompt:d,modelResponse:R===void 0||R.response.type!==hsi.ChatFetchResponseType.Success?void 0:R.response.value,alternativeAction:h?JSON.stringify({...h,enhancedTelemetrySendingReason:r}):void 0,enhancedTelemetrySendingReason:!h&&r?JSON.stringify(r):void 0,postProcessingOutcome:m,activeDocumentRepository:g,repositories:JSON.stringify(A),cursorJumpModelName:y,cursorJumpPrompt:E,cursorJumpResponse:_,lintErrors:v,terminalOutput:b,similarFilesContext:P,modelConfig:x}),{isFromCache:this._boolToNum(w)})}_boolToNum(e){return e===void 0?void 0:e?1:0}dispose(){for(let e of this._map.values())clearTimeout(e.timeout),e.hardCapTimeout!==void 0&&clearTimeout(e.hardCapTimeout),e.builder.dispose();this._map.clear(),this._idleDetector&&(this._idleDetector.forceDispose(),this._idleDetector=void 0)}};Yy.TelemetrySender=v0r;Yy.TelemetrySender=v0r=_ga([Cga(1,Asi.ITelemetryService)],v0r)});var T0r=T(ade=>{"use strict";f();Object.defineProperty(ade,"__esModule",{value:!0});ade.NullPowerService=ade.IPowerService=void 0;var Esi=Xa(),Iga=Po();ade.IPowerService=(0,Iga.createDecorator)("IPowerService");var b0r=class{static{a(this,"NullPowerService")}constructor(){this.onDidSuspend=Esi.Event.None,this.onDidResume=Esi.Event.None}acquirePowerSaveBlocker(){return{dispose:a(()=>{},"dispose")}}};ade.NullPowerService=b0r});var WB=T(tQ=>{"use strict";f();Object.defineProperty(tQ,"__esModule",{value:!0});tQ.FetchStreamRecorder=tQ.FetchStreamSource=tQ.IChatMLFetcher=void 0;var xga=qr(),wga=vc();tQ.IChatMLFetcher=(0,xga.createServiceIdentifier)("IChatMLFetcher");var S0r=class{static{a(this,"FetchStreamSource")}get stream(){return this._stream.asyncIterable}constructor(){this._stream=new wga.AsyncIterableSource,this._seenAnnotationTypes=new Set}pause(){this._paused??=[]}unpause(){let e=this._paused;if(e){this._paused=void 0;for(let r of e)r?this.update(r.text,r.delta):this.resolve()}}update(e,r){if(this._paused){this._paused.push({text:e,delta:r});return}r.codeVulnAnnotations&&(!((e.match(/(^|\n)```/g)?.length??0)%2===1)||e.match(/(^|\n)```\w*\s*$/))&&(r.codeVulnAnnotations=void 0),r.codeVulnAnnotations&&(r.codeVulnAnnotations=r.codeVulnAnnotations.filter(n=>!this._seenAnnotationTypes.has(n.details.type)),r.codeVulnAnnotations.forEach(n=>this._seenAnnotationTypes.add(n.details.type))),this._stream.emitOne({delta:r})}resolve(){if(this._paused){this._paused.push(void 0);return}this._stream.resolve()}};tQ.FetchStreamSource=S0r;var I0r=class{static{a(this,"FetchStreamRecorder")}get firstTokenEmittedTime(){return this._firstTokenEmittedTime}constructor(e){this.deltas=[],this.callback=async(r,n,o)=>{this._firstTokenEmittedTime===void 0&&(o.text||o.beginToolCalls||typeof o.thinking?.text=="string"&&o.thinking?.text||o.thinking?.text?.length||o.copilotToolCalls||o.copilotToolCallStreamUpdates)&&(this._firstTokenEmittedTime=Date.now());let s=e?await e(r,n,o):void 0;return this.deltas.push(o),s}}};tQ.FetchStreamRecorder=I0r});var x0r=T(Qat=>{"use strict";f();Object.defineProperty(Qat,"__esModule",{value:!0});Qat.IChatQuotaService=void 0;var Rga=qr();Qat.IChatQuotaService=(0,Rga.createServiceIdentifier)("IChatQuotaService")});var w0r=T(qat=>{"use strict";f();Object.defineProperty(qat,"__esModule",{value:!0});qat.IConversationOptions=void 0;var Pga=qr();qat.IConversationOptions=(0,Pga.createServiceIdentifier)("ConversationOptions")});var $we=T(cde=>{"use strict";f();Object.defineProperty(cde,"__esModule",{value:!0});cde.getTextPart=Dga;cde.toTextPart=_si;cde.toTextParts=Nga;cde.roleToString=Mga;var OK=co(),kga=Hl();function Dga(t){return t?typeof t=="string"?t:Array.isArray(t)?t.map(e=>e.type===OK.Raw.ChatCompletionContentPartKind.Text||e.type==="text"?e.text:"").join(""):t.type===OK.Raw.ChatCompletionContentPartKind.Text?t.text:"":""}a(Dga,"getTextPart");function _si(t){return{type:OK.Raw.ChatCompletionContentPartKind.Text,text:t}}a(_si,"toTextPart");function Nga(t){return[_si(t)]}a(Nga,"toTextParts");function Mga(t){switch(t){case OK.Raw.ChatRole.System:return"system";case OK.Raw.ChatRole.User:return"user";case OK.Raw.ChatRole.Assistant:return"assistant";case OK.Raw.ChatRole.Tool:return"tool";default:(0,kga.assertNever)(t,`unknown role (${t})`)}}a(Mga,"roleToString")});var P0r=T(lde=>{"use strict";f();Object.defineProperty(lde,"__esModule",{value:!0});lde.InteractionService=lde.IInteractionService=void 0;var Oga=qr(),Csi=Ip();lde.IInteractionService=(0,Oga.createServiceIdentifier)("IInteractionService");var R0r=class{static{a(this,"InteractionService")}constructor(){this._interactionId=(0,Csi.generateUuid)()}startInteraction(){this._interactionId=(0,Csi.generateUuid)()}get interactionId(){return this._interactionId}};lde.InteractionService=R0r});var vsi=T(Gat=>{"use strict";f();Object.defineProperty(Gat,"__esModule",{value:!0});Gat.ChatWebSocketTelemetrySender=void 0;var k0r=class{static{a(this,"ChatWebSocketTelemetrySender")}static sendConnectedTelemetry(e,r){e.sendTelemetryEvent("websocket.connected",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId},{connectDurationMs:r.connectDurationMs})}static sendConnectErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.connectError",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error,responseStatusText:r.responseStatusText},{connectDurationMs:r.connectDurationMs,responseStatusCode:r.responseStatusCode})}static sendCloseTelemetry(e,r){e.sendTelemetryEvent("websocket.close",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,closeReason:r.closeReason,closeEventReason:r.closeEventReason,closeEventWasClean:r.closeEventWasClean},{closeCode:r.closeCode,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.error",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error},{totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendCloseDuringSetupTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.closeDuringSetup",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,closeReason:r.closeReason,closeEventReason:r.closeEventReason,closeEventWasClean:r.closeEventWasClean},{closeCode:r.closeCode,connectDurationMs:r.connectDurationMs})}static sendRequestSentTelemetry(e,r){e.sendTelemetryEvent("websocket.requestSent",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId},{statefulMarkerMatched:r.statefulMarkerMatched?1:0,previousResponseIdUnset:r.previousResponseIdUnset?1:0,hasCompactionData:r.hasCompactionData?1:0,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,sentMessageCharacters:r.sentMessageCharacters,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendMessageParseErrorTelemetry(e,r){e.sendTelemetryErrorEvent("websocket.messageParseError",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,error:r.error},{totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,receivedMessageCharacters:r.receivedMessageCharacters,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,connectionDurationMs:r.connectionDurationMs})}static sendRequestOutcomeTelemetry(e,r){e.sendTelemetryEvent("websocket.requestOutcome",{github:!0,microsoft:!0},{conversationId:r.conversationId,turnId:r.turnId,requestId:r.requestId,gitHubRequestId:r.gitHubRequestId,requestOutcome:r.requestOutcome,closeReason:r.closeReason,serverErrorMessage:r.serverErrorMessage,serverErrorCode:r.serverErrorCode},{statefulMarkerMatched:r.statefulMarkerMatched?1:0,previousResponseIdUnset:r.previousResponseIdUnset?1:0,hasCompactionData:r.hasCompactionData?1:0,totalSentMessageCount:r.totalSentMessageCount,totalReceivedMessageCount:r.totalReceivedMessageCount,totalSentCharacters:r.totalSentCharacters,totalReceivedCharacters:r.totalReceivedCharacters,requestSentMessageCount:r.requestSentMessageCount,requestReceivedMessageCount:r.requestReceivedMessageCount,requestSentCharacters:r.requestSentCharacters,requestReceivedCharacters:r.requestReceivedCharacters,connectionDurationMs:r.connectionDurationMs,requestDurationMs:r.requestDurationMs,closeCode:r.closeCode})}};Gat.ChatWebSocketTelemetrySender=k0r});var nQ=T(Ky=>{"use strict";f();var Bga=Ky&&Ky.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Hat=Ky&&Ky.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Ky,"__esModule",{value:!0});Ky.ChatWebSocketManager=Ky.NullChatWebSocketManager=Ky.IChatWebSocketManager=void 0;Ky.isCAPIWebSocketError=B0r;Ky.getStreamTerminatingOutcome=Ssi;var Lga=qr(),Fga=Ko(),jat=Xa(),bsi=ro(),Tsi=ac(),Uga=$y(),Vwe=D0(),Qga=bp(),qga=zm(),rQ=vsi();Ky.IChatWebSocketManager=(0,Lga.createServiceIdentifier)("IChatWebSocketManager");var D0r=class{static{a(this,"NullChatWebSocketManager")}getOrCreateConnection(e,r,n){throw new Error("WebSocket not available")}hasActiveConnection(e,r){return!1}closeConnection(e,r){}closeAll(){}};Ky.NullChatWebSocketManager=D0r;function B0r(t){return t.type==="error"&&"error"in t&&typeof t.error?.code=="string"}a(B0r,"isCAPIWebSocketError");var Gga={"response.completed":"completed","response.failed":"response_failed","response.incomplete":"response_incomplete","response.cancelled":"response_cancelled",error:"upstream_error"};function Ssi(t){return Gga[t.type]}a(Ssi,"getStreamTerminatingOutcome");var N0r=class extends bsi.Disposable{static{a(this,"ChatWebSocketManager")}constructor(e,r,n,o){super(),this._logService=e,this._capiClientService=r,this._telemetryService=n,this._configurationService=o,this._connections=new Map}getOrCreateConnection(e,r,n){let o=this._connections.get(e);if(o?.turnId===r&&o.connection.isOpen)return this._logService.debug(`[ChatWebSocketManager] Reusing connection for conversation ${e} turn ${r}`),o.connection;o&&(this._logService.debug(`[ChatWebSocketManager] Closing previous connection for conversation ${e} (turn changed)`),o.connection.dispose(),this._connections.delete(e));let s=new M0r(this._capiClientService,this._logService,this._telemetryService,this._configurationService,e,r,n);return this._logService.debug(`[ChatWebSocketManager] Creating new connection for conversation ${e} turn ${r}`),this._connections.set(e,{turnId:r,connection:s}),s.onDidDispose(()=>{this._connections.get(e)?.connection===s&&this._connections.delete(e)}),s}hasActiveConnection(e,r){let n=this._connections.get(e);return!!n&&n.turnId===r&&n.connection.isOpen}closeConnection(e,r){let n=this._connections.get(e);if(n){if(r&&n.turnId!==r){this._logService.debug(`[ChatWebSocketManager] Not closing connection for conversation ${e}: requested turn ${r} does not match active turn ${n.turnId}`);return}this._logService.debug(`[ChatWebSocketManager] Closing connection for conversation ${e} turn ${r}`),n.connection.dispose(),this._connections.delete(e)}}closeAll(){for(let e of this._connections.values())e.connection.dispose();this._connections.clear()}dispose(){this.closeAll(),super.dispose()}};Ky.ChatWebSocketManager=N0r;Ky.ChatWebSocketManager=N0r=Bga([Hat(0,Vwe.ILogService),Hat(1,Uga.ICAPIClientService),Hat(2,Qga.ITelemetryService),Hat(3,Tsi.IConfigurationService)],N0r);function $at(t){switch(t){case 1e3:return"Normal Closure";case 1001:return"Going Away";case 1002:return"Protocol Error";case 1003:return"Unsupported Data";case 1005:return"No Status Received";case 1006:return"Abnormal Closure";case 1007:return"Invalid Payload";case 1008:return"Policy Violation";case 1009:return"Message Too Big";case 1010:return"Missing Extension";case 1011:return"Internal Error";case 1012:return"Service Restart";case 1013:return"Try Again Later";case 1014:return"Bad Gateway";case 1015:return"TLS Handshake Failed";default:return"Unknown"}}a($at,"wsCloseCodeToString");var M0r=class extends bsi.Disposable{static{a(this,"ChatWebSocketConnection")}constructor(e,r,n,o,s,c,l){super(),this._capiClientService=e,this._logService=r,this._telemetryService=n,this._configurationService=o,this._conversationId=s,this._turnId=c,this._headers=l,this._state=2,this._onDidDispose=this._register(new jat.Emitter),this.onDidDispose=this._onDidDispose.event,this._totalSentMessageCount=0,this._totalReceivedMessageCount=0,this._totalSentCharacters=0,this._totalReceivedCharacters=0,this._responseHeaders=new qga.HeadersImpl({})}get isOpen(){return this._state===1&&!!this._ws}get statefulMarker(){return this._statefulMarker}get responseHeaders(){return this._responseHeaders}get responseStatusCode(){return this._responseStatusCode}get responseStatusText(){return this._responseStatusText}get requestId(){return this._responseHeaders.get("x-request-id")||Object.entries(this._headers).find(([e])=>e.toLowerCase()==="x-request-id")?.[1]||""}get gitHubRequestId(){return this._responseHeaders.get("x-github-request-id")||""}async connect(){if(this._state===1)return;this._state=0,this._connectStartTime=Date.now(),this._logService.debug(`[ChatWebSocketManager] Connecting WebSocket for conversation ${this._conversationId} turn ${this._turnId}`);let e=await this._capiClientService.createResponsesWebSocket({headers:this._headers});return new Promise((r,n)=>{let o=e.webSocket,s=a(()=>{u(),this._state=1,this._connectedTime=Date.now(),this._ws=o,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText,this._setupMessageHandlers(o);let d=this._connectedTime-(this._connectStartTime??this._connectedTime);this._logService.debug(`[ChatWebSocketManager] Connected for conversation ${this._conversationId} turn ${this._turnId}`),rQ.ChatWebSocketTelemetrySender.sendConnectedTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,connectDurationMs:d}),r()},"onOpen"),c=a(d=>{u(),this._state=2,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText;let p=d.error?`${d.message}: ${(0,Vwe.collectSingleLineErrorMessage)(d.error)}`:d.message||"WebSocket error",h=Date.now()-(this._connectStartTime??Date.now());this._logService.error(`[ChatWebSocketManager] Connection error for conversation ${this._conversationId} turn ${this._turnId}: ${p}`),rQ.ChatWebSocketTelemetrySender.sendConnectErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:p,connectDurationMs:h,responseStatusCode:this._responseStatusCode,responseStatusText:this._responseStatusText}),n(new Error(p))},"onError"),l=a(d=>{u(),this._state=2,this._responseHeaders=e.responseHeaders,this._responseStatusCode=e.responseStatusCode,this._responseStatusText=e.responseStatusText;let p=Date.now()-(this._connectStartTime??Date.now()),h=$at(d.code);this._logService.debug(`[ChatWebSocketManager] Connection closed during setup for conversation ${this._conversationId} turn ${this._turnId} (code: ${d.code} ${h}, reason: ${d.reason||""}, wasClean: ${d.wasClean})`),rQ.ChatWebSocketTelemetrySender.sendCloseDuringSetupTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,closeCode:d.code,closeReason:h,closeEventReason:d.reason,closeEventWasClean:String(d.wasClean),connectDurationMs:p}),n(new Error("WebSocket closed during connection setup"))},"onClose"),u=a(()=>{o.removeEventListener("open",s),o.removeEventListener("error",c),o.removeEventListener("close",l)},"cleanup");o.addEventListener("open",s),o.addEventListener("error",c),o.addEventListener("close",l)})}_setupMessageHandlers(e){e.addEventListener("message",r=>{if(typeof r.data!="string")return;let n=r.data.length;this._totalReceivedMessageCount+=1,this._totalReceivedCharacters+=n;let o=Date.now()-(this._connectedTime??Date.now()),s;try{s=JSON.parse(r.data)}catch(c){let l=(0,Vwe.collectSingleLineErrorMessage)(c)||"Failed to parse websocket message";this._logService.error(`[ChatWebSocketManager] Failed to parse message for conversation ${this._conversationId} turn ${this._turnId}: ${l}`),rQ.ChatWebSocketTelemetrySender.sendMessageParseErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:l,connectionDurationMs:o,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,receivedMessageCharacters:n,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters});return}!B0r(s)&&s.type==="response.completed"&&(this._statefulMarker=s.response.id),this._activeRequest?.handleEvent(s)}),e.addEventListener("close",r=>{this._state=2;let n=Date.now()-(this._connectedTime??Date.now()),o=$at(r.code);this._logService.debug(`[ChatWebSocketManager] Connection closed for conversation ${this._conversationId} turn ${this._turnId} (code: ${r.code} ${o}, reason: ${r.reason||""}, wasClean: ${r.wasClean})`),rQ.ChatWebSocketTelemetrySender.sendCloseTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,closeCode:r.code,closeReason:o,closeEventReason:r.reason,closeEventWasClean:String(r.wasClean),connectionDurationMs:n,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters});let s=this._pendingErrorMessage;this._pendingErrorMessage=void 0,this._activeRequest?.handleConnectionClose(r.code,r.reason,s),this._activeRequest=void 0}),e.addEventListener("error",r=>{let n=r.error?`${r.message}: ${(0,Vwe.collectSingleLineErrorMessage)(r.error)}`:r.message||"WebSocket error",o=Date.now()-(this._connectedTime??Date.now());this._logService.error(`[ChatWebSocketManager] Error for conversation ${this._conversationId} turn ${this._turnId}: ${n}`),rQ.ChatWebSocketTelemetrySender.sendErrorTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,error:n,connectionDurationMs:o,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters}),this._pendingErrorMessage??=n})}sendRequest(e,r,n){if(!this._ws||this._state!==1)throw new Error("WebSocket is not connected");let o=this._statefulMarker===e.previous_response_id,s=e.previous_response_id===void 0,c=e.input?.some(w=>w?.type==="compaction")??!1,l=this._statefulMarker?.slice(0,5).concat("...")??"",u=e.previous_response_id?.slice(0,5).concat("...")??"";o?this._logService.trace(`[ChatWebSocketManager] WebSocket stateful marker matches previous_response_id (${u})`):this._logService.info(`[ChatWebSocketManager] WebSocket stateful marker (${l}) does not match previous_response_id (${u})`),this._activeRequest?.handleSuperseded();let d=Date.now(),p=this._totalSentMessageCount,h=this._totalReceivedMessageCount,m=this._totalSentCharacters,g=this._totalReceivedCharacters,A=new O0r(this._configurationService,this._logService);A.onDidSettle(({outcome:w,closeCode:R,closeReason:P,serverErrorMessage:k,serverErrorCode:Q})=>{let M=Date.now()-(this._connectedTime??Date.now()),N=Date.now()-d,G=this._totalSentMessageCount-p,O=this._totalReceivedMessageCount-h,D=this._totalSentCharacters-m,F=this._totalReceivedCharacters-g;rQ.ChatWebSocketTelemetrySender.sendRequestOutcomeTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,requestOutcome:w,statefulMarkerMatched:o,previousResponseIdUnset:s,hasCompactionData:c,connectionDurationMs:M,requestDurationMs:N,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters,requestSentMessageCount:G,requestReceivedMessageCount:O,requestSentCharacters:D,requestReceivedCharacters:F,closeCode:R,closeReason:P,serverErrorMessage:k,serverErrorCode:Q})}),this._activeRequest=A;let y=n.onCancellationRequested(()=>{this._activeRequest===A&&(A.handleCancellation(),this._activeRequest=void 0)});A.done.finally(()=>y.dispose()).catch(()=>{});let{stream:E,..._}=e,v={type:"response.create",..._,initiator:r.userInitiated?"user":"agent"},b=JSON.stringify(v),I=b.length;this._totalSentMessageCount+=1,this._totalSentCharacters+=I;let x=Date.now()-(this._connectedTime??Date.now());return this._logService.debug(`[ChatWebSocketManager] Sending request for conversation ${this._conversationId} turn ${this._turnId} (totalSentMessageCount: ${this._totalSentMessageCount}, sentMessageCharacters: ${I})`),rQ.ChatWebSocketTelemetrySender.sendRequestSentTelemetry(this._telemetryService,{conversationId:this._conversationId,turnId:this._turnId,requestId:this.requestId,gitHubRequestId:this.gitHubRequestId,statefulMarkerMatched:o,previousResponseIdUnset:s,hasCompactionData:c,connectionDurationMs:x,totalSentMessageCount:this._totalSentMessageCount,totalReceivedMessageCount:this._totalReceivedMessageCount,sentMessageCharacters:I,totalSentCharacters:this._totalSentCharacters,totalReceivedCharacters:this._totalReceivedCharacters}),this._ws.send(b),A}dispose(){this._activeRequest?.handleConnectionDisposed(),this._activeRequest=void 0,this._ws&&(this._ws.close(),this._ws=void 0),this._state=2,this._onDidDispose.fire(),super.dispose()}},O0r=class{static{a(this,"ChatWebSocketActiveRequest")}constructor(e,r){this._configurationService=e,this._logService=r,this._onEvent=new jat.Emitter,this.onEvent=this._onEvent.event,this._onCAPIError=new jat.Emitter,this.onCAPIError=this._onCAPIError.event,this._onError=new jat.Emitter,this.onError=this._onError.event,this._firstEventSettled=!1,this._settled=!1,this.done=new Promise((n,o)=>{this._resolve=n,this._reject=o}),this.firstEvent=new Promise((n,o)=>{this._resolveFirstEvent=n,this._rejectFirstEvent=o})}onDidSettle(e){this._onDidSettle=e}handleEvent(e){if(this._settled)return;let r=this._configurationService.getConfig(Tsi.ConfigKey.TeamInternal.DebugSimulateWebSocketResponse);if(r)try{e=JSON.parse(r),this._logService.info(`[ChatWebSocketManager] Simulating WebSocket response event: ${r}`)}catch(o){this._logService.error(`[ChatWebSocketManager] Failed to parse simulated WebSocket response: ${(0,Vwe.collectSingleLineErrorMessage)(o)}`)}if(this._firstEventSettled||(this._firstEventSettled=!0,this._resolveFirstEvent(e)),B0r(e)){this._finalizeCAPIError(e);return}this._onEvent.fire(e);let n=Ssi(e);n&&this._finalizeSuccess(n)}handleConnectionClose(e,r,n){if(this._settled)return;let o=n?new Error(`${n} (close code: ${e} ${$at(e)}${r?`, reason: ${r}`:""})`):new Error(`WebSocket closed (code: ${e} ${$at(e)}${r?`, reason: ${r}`:""})`);this._finalizeError("connection_closed",o,e,r)}handleSuperseded(){this._settled||this._finalizeError("superseded",new Error("Request superseded by new request"))}handleCancellation(){this._settled||this._finalizeError("canceled",new Fga.CancellationError)}handleConnectionDisposed(){this._settled||this._finalizeError("connection_disposed",new Error("Connection disposed"))}_finalizeSuccess(e){this._settled=!0,this._onDidSettle?.({outcome:e}),this._resolve(),this._dispose()}_finalizeCAPIError(e){let{code:r,message:n}=e.error;this._onCAPIError.fire(e),this._settled=!0,this._onDidSettle?.({outcome:"error_response",serverErrorMessage:n,serverErrorCode:r}),this._reject(new Error(`${n} (${r})`)),this._dispose()}_finalizeError(e,r,n,o,s,c){this._firstEventSettled||(this._firstEventSettled=!0,this._rejectFirstEvent(r)),this._onError.fire(r),this._settled=!0,this._onDidSettle?.({outcome:e,closeCode:n,closeReason:o,serverErrorMessage:s,serverErrorCode:c}),this._reject(r),this._dispose()}_dispose(){this._onEvent.dispose(),this._onCAPIError.dispose(),this._onError.dispose()}}});var ksi=T(zB=>{"use strict";f();Object.defineProperty(zB,"__esModule",{value:!0});zB.getImageDimensions=Hga;zB.getPngDimensions=Isi;zB.getGifDimensions=xsi;zB.getJpegDimensions=wsi;zB.getWebPDimensions=Rsi;zB.getMimeType=Psi;zB.extractImageAttributes=jga;function Hga(t){if(!t.startsWith("data:image/"))throw new Error("Could not read image: invalid base64 image string");let e=t.split(",")[1];switch(Psi(e)){case"image/png":return Isi(e);case"image/gif":return xsi(e);case"image/jpeg":case"image/jpg":return wsi(e);case"image/webp":return Rsi(e);default:throw new Error("Unsupported image format")}}a(Hga,"getImageDimensions");function Isi(t){let e=atob(t.slice(0,50)).slice(16,24),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint32(0,!1),height:n.getUint32(4,!1)}}a(Isi,"getPngDimensions");function xsi(t){let e=atob(t.slice(0,50)),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint16(6,!0),height:n.getUint16(8,!0)}}a(xsi,"getGifDimensions");function wsi(t){let e=atob(t),r=Uint8Array.from(e,s=>s.charCodeAt(0)),n=r.length,o=2;for(;o=65472&&s<=65474){let l=new DataView(r.buffer,o+5,4);return{height:l.getUint16(0,!1),width:l.getUint16(2,!1)}}o+=2+c}throw new Error("JPEG dimensions not found")}a(wsi,"getJpegDimensions");function Rsi(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o]+?)>?\)/,n=/{"use strict";f();Object.defineProperty(Vat,"__esModule",{value:!0});Vat.TokenizerType=void 0;var Dsi;(function(t){t.CL100K="cl100k_base",t.O200K="o200k_base",t.Llama3="llama3"})(Dsi||(Vat.TokenizerType=Dsi={}))});var F0r=T(BK=>{"use strict";f();Object.defineProperty(BK,"__esModule",{value:!0});BK.WorkerWithRpcProxy=BK.RcpResponseHandler=void 0;BK.createRpcProxy=Nsi;var $ga=require("worker_threads"),Wat=class{static{a(this,"RcpResponseHandler")}constructor(){this.nextId=1,this.handlers=new Map}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};BK.RcpResponseHandler=Wat;function Nsi(t){let e={get:a((r,n)=>(typeof n=="string"&&!r[n]&&(r[n]=(...o)=>t(n,o)),r[n]),"get")};return new Proxy(Object.create(null),e)}a(Nsi,"createRpcProxy");var L0r=class{static{a(this,"WorkerWithRpcProxy")}constructor(e,r,n){this.responseHandler=new Wat,this.worker=new $ga.Worker(e,r),this.worker.on("message",async o=>{if("fn"in o)try{let s=await n?.[o.fn].apply(n,o.args);this.worker.postMessage({id:o.id,res:s})}catch(s){this.worker.postMessage({id:o.id,err:s})}else this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=Nsi((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}terminate(){this.worker.removeAllListeners(),this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};BK.WorkerWithRpcProxy=L0r});var Msi=T(ZS=>{"use strict";f();Object.defineProperty(ZS,"__esModule",{value:!0});ZS.SlidingWindowAverage=ZS.MovingAverage=ZS.Counter=void 0;ZS.clamp=Wga;ZS.rot=zga;ZS.isPointWithinTriangle=Yga;ZS.randomChance=Kga;var Vga=Hl();function Wga(t,e,r){return Math.min(Math.max(t,e),r)}a(Wga,"clamp");function zga(t,e){return(e+t%e)%e}a(zga,"rot");var U0r=class{static{a(this,"Counter")}constructor(){this._next=0}getNext(){return this._next++}};ZS.Counter=U0r;var Q0r=class{static{a(this,"MovingAverage")}constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}};ZS.MovingAverage=Q0r;var q0r=class{static{a(this,"SlidingWindowAverage")}constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){let r=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=r,this._sum+=e,this._n=0&&x>=0&&I+x<1}a(Yga,"isPointWithinTriangle");function Kga(t){return(0,Vga.assert)(t>=0&&t<=1,"p must be between 0 and 1"),Math.random(){"use strict";f();Object.defineProperty(Yat,"__esModule",{value:!0});Yat.TikTokenImpl=void 0;var G0r=cLe(),zat=Msi(),Jga=ck(),Xga=Lir(),H0r=class t{static{a(this,"TikTokenImpl")}constructor(){this._values=[],this._stats={encodeDuration:new zat.MovingAverage,textLength:new zat.MovingAverage,callCount:0}}static get instance(){return this._instance||(this._instance=new t),this._instance}init(e,r,n){let o=this._values.length,s=n?Xga.parseTikTokenBinary:c=>c;return this._values.push((0,G0r.createTokenizer)(s(e),(0,G0r.getSpecialTokensByEncoder)(r),(0,G0r.getRegexByEncoder)(r),64e3)),o}encode(e,r,n){let o=Jga.StopWatch.create(!0),s=this._values[e].encode(r,n);return this._stats.callCount+=1,this._stats.encodeDuration.update(o.elapsed()),this._stats.textLength.update(r.length),s}destroy(e){this._values[e]=void 0}resetStats(){let e=this._stats,r={callCount:e.callCount,encodeDuration:e.encodeDuration.value,textLength:e.textLength.value};return this._stats.encodeDuration=new zat.MovingAverage,this._stats.textLength=new zat.MovingAverage,this._stats.callCount=0,r}};Yat.TikTokenImpl=H0r});var LK=T(Yd=>{"use strict";f();var Fsi=Yd&&Yd.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Usi=Yd&&Yd.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Yd,"__esModule",{value:!0});Yd.TokenizerProvider=Yd.BaseTokensPerName=Yd.BaseTokensPerMessage=Yd.BaseTokensPerCompletion=Yd.ITokenizerProvider=void 0;Yd.calculateImageTokenCost=W0r;Yd.estimateDocumentTokenCost=qsi;var iQ=co(),Zga=r0r(),eAa=ksi(),tAa=qr(),Bsi=ude(),rAa=F0r(),nAa=Hl(),Lsi=c4(),j0r=ro(),Kat=gm(),Qsi=bp(),$0r=Osi();Yd.ITokenizerProvider=(0,tAa.createServiceIdentifier)("ITokenizerProvider");Yd.BaseTokensPerCompletion=3;Yd.BaseTokensPerMessage=3;Yd.BaseTokensPerName=1;var V0r=class{static{a(this,"TokenizerProvider")}constructor(e,r){this._cl100kTokenizer=new Lsi.Lazy(()=>new Jat(e,(0,Kat.join)(__dirname,"./cl100k_base.tiktoken"),"cl100k_base",r)),this._o200kTokenizer=new Lsi.Lazy(()=>new Jat(e,(0,Kat.join)(__dirname,"./o200k_base.tiktoken"),"o200k_base",r))}dispose(){this._cl100kTokenizer.rawValue?.dispose(),this._o200kTokenizer.rawValue?.dispose()}acquireTokenizer(e){switch(e.tokenizer){case Bsi.TokenizerType.CL100K:return this._cl100kTokenizer.value;case Bsi.TokenizerType.O200K:return this._o200kTokenizer.value;default:throw new Error(`Unknown tokenizer: ${e.tokenizer}`)}}};Yd.TokenizerProvider=V0r;Yd.TokenizerProvider=V0r=Fsi([Usi(1,Qsi.ITelemetryService)],V0r);var Jat=class extends j0r.Disposable{static{a(this,"BPETokenizer")}constructor(e,r,n,o){super(),this._useWorker=e,this._tokenFilePath=r,this._encoderName=n,this._telemetryService=o,this._cache=new Zga.LRUCache(5e3),this.baseTokensPerMessage=Yd.BaseTokensPerMessage,this.baseTokensPerName=Yd.BaseTokensPerName,this.mode=iQ.OutputMode.Raw}async countMessagesTokens(e){let r=Yd.BaseTokensPerMessage;for(let n of e)r+=await this.countMessageTokens(n);return r}async tokenize(e){return(await this.ensureTokenizer()).encode(e)}async tokenLength(e){if(typeof e=="string")return this._textTokenLength(e);switch(e.type){case iQ.Raw.ChatCompletionContentPartKind.Text:return this._textTokenLength(e.text);case iQ.Raw.ChatCompletionContentPartKind.Opaque:return e.tokenUsage||0;case iQ.Raw.ChatCompletionContentPartKind.Image:if(e.imageUrl.url.startsWith("data:image/"))try{return W0r(e.imageUrl.url,e.imageUrl.detail)}catch{return this._textTokenLength(e.imageUrl.url)}return this._textTokenLength(e.imageUrl.url);case iQ.Raw.ChatCompletionContentPartKind.CacheBreakpoint:return 0;case iQ.Raw.ChatCompletionContentPartKind.Document:return qsi(e.documentData.data);default:(0,nAa.assertNever)(e,`unknown content part (${JSON.stringify(e)})`)}}async _textTokenLength(e){if(!e)return 0;let r=this._cache.get(e);return r||(r=(await this.tokenize(e)).length,this._cache.put(e,r)),r}async countMessageTokens(e){return this.baseTokensPerMessage+await this.countMessageObjectTokens((0,iQ.toMode)(iQ.OutputMode.OpenAI,e))}async countToolTokens(e){let n=0;e.length&&(n+=16);let o=8;for(let s of e)n+=o,n+=await this.countObjectTokens({name:s.name,description:s.description,parameters:s.inputSchema});return Math.floor(n*1.1)}async countMessageObjectTokens(e){let r=0;for(let[n,o]of Object.entries(e))if(o){if(typeof o=="string")r+=await this.tokenLength(o);else if(o){let s=o;if(s.type==="text")r+=await this.tokenLength(s.text);else if(s.type==="image_url"&&s.image_url)if(s.image_url.url.startsWith("data:image/"))try{r+=W0r(s.image_url.url,s.image_url.detail)}catch{r+=await this.tokenLength(s.image_url.url)}else r+=await this.tokenLength(s.image_url.url);else{let c=await this.countMessageObjectTokens(o);n==="tool_calls"&&(c=Math.floor(c*1.5)),r+=c}}n==="name"&&o!==void 0&&(r+=this.baseTokensPerName)}return r}async countObjectTokens(e){let r=0;for(let[n,o]of Object.entries(e))o&&(r+=await this.tokenLength(n),typeof o=="string"?r+=await this.tokenLength(o):o&&(r+=await this.countMessageObjectTokens(o)));return r}ensureTokenizer(){return this._tokenizer??=this.doInitTokenizer(),this._tokenizer}async doInitTokenizer(){let e=(0,Kat.basename)(__dirname)==="dist";if(this._useWorker){let r=(0,Kat.join)(__dirname,"tikTokenizerWorker.js"),n=new rAa.WorkerWithRpcProxy(r,{name:`TikToken worker (${this._encoderName})`}),o=await n.proxy.init(this._tokenFilePath,this._encoderName,e),s=(0,j0r.toDisposable)(()=>{n.terminate(),this._store.deleteAndLeak(s),this._tokenizer=void 0}),c;return{encode:a((l,u)=>{let d=n.proxy.encode(o,l,u);return clearTimeout(c),c=setTimeout(()=>s.dispose(),15e3),Math.random()<1/1e3&&n.proxy.resetStats().then(p=>{this._telemetryService.sendMSFTTelemetryEvent("tokenizer.stats",void 0,p)}),d},"encode")}}else{let r=$0r.TikTokenImpl.instance.init(this._tokenFilePath,this._encoderName,e),n=(0,j0r.toDisposable)(()=>{$0r.TikTokenImpl.instance.destroy(r),this._store.deleteAndLeak(n),this._tokenizer=void 0});return this._store.add(n),{encode:a(async(o,s)=>$0r.TikTokenImpl.instance.encode(r,o,s),"encode")}}}};Jat=Fsi([Usi(3,Qsi.ITelemetryService)],Jat);function W0r(t,e){let{width:r,height:n}=(0,eAa.getImageDimensions)(t);if(e==="low")return 85;if(r>2048||n>2048){let c=2048/Math.max(r,n);r=Math.round(r*c),n=Math.round(n*c)}let o=768/Math.min(r,n);return r=Math.round(r*o),n=Math.round(n*o),Math.ceil(r/512)*Math.ceil(n/512)*170+85}a(W0r,"calculateImageTokenCost");function qsi(t){if(!t)return 0;let e=t.length,r=Math.floor(e*3/4);return Math.ceil(r/8)}a(qsi,"estimateDocumentTokenCost")});var oQ=T(dde=>{"use strict";f();Object.defineProperty(dde,"__esModule",{value:!0});dde.IDomainService=dde.FEEDBACK_URL=void 0;var iAa=qr();dde.FEEDBACK_URL="https://aka.ms/microsoft/vscode-copilot-release";dde.IDomainService=(0,iAa.createServiceIdentifier)("IDomainService")});var Xat=T(G0=>{"use strict";f();Object.defineProperty(G0,"__esModule",{value:!0});G0.TOOL_SEARCH_SUPPORTED_MODELS=G0.CUSTOM_TOOL_SEARCH_NAME=G0.TOOL_SEARCH_TOOL_TYPE=G0.TOOL_SEARCH_TOOL_NAME=void 0;G0.modelSupportsContextEditing=Gsi;G0.modelSupportsInterleavedThinking=oAa;G0.modelSupportsMemory=Hsi;G0.isAnthropicToolSearchEnabled=jsi;G0.isAnthropicCustomToolSearchEnabled=sAa;G0.isAnthropicContextEditingEnabled=aAa;G0.isAnthropicMemoryToolEnabled=cAa;G0.buildContextManagement=$si;G0.getContextManagementFromConfig=lAa;var Wwe=ac();G0.TOOL_SEARCH_TOOL_NAME="tool_search_tool_regex";G0.TOOL_SEARCH_TOOL_TYPE="tool_search_tool_regex_20251119";G0.CUSTOM_TOOL_SEARCH_NAME="tool_search";G0.TOOL_SEARCH_SUPPORTED_MODELS=["claude-sonnet-4.5","claude-sonnet-4.6","claude-opus-4.5","claude-opus-4.6"];function Gsi(t){let e=t.toLowerCase().replace(/\./g,"-");return e.includes("1m")?!1:e.startsWith("claude-haiku-4-5")||e.startsWith("claude-sonnet-4-6")||e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-opus-4-6")||e.startsWith("claude-opus-4-5")||e.startsWith("claude-opus-4-1")||e.startsWith("claude-opus-4")}a(Gsi,"modelSupportsContextEditing");function oAa(t){let e=t.toLowerCase().replace(/\./g,"-");return e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-haiku-4-5")||e.startsWith("claude-opus-4-5")}a(oAa,"modelSupportsInterleavedThinking");function Hsi(t){let e=t.toLowerCase().replace(/\./g,"-");return e.startsWith("claude-haiku-4-5")||e.startsWith("claude-sonnet-4-6")||e.startsWith("claude-sonnet-4-5")||e.startsWith("claude-sonnet-4")||e.startsWith("claude-opus-4-6")||e.startsWith("claude-opus-4-5")||e.startsWith("claude-opus-4-1")||e.startsWith("claude-opus-4")}a(Hsi,"modelSupportsMemory");function jsi(t,e){let r=typeof t=="string"?t:t.model;return G0.TOOL_SEARCH_SUPPORTED_MODELS.some(n=>r.toLowerCase().startsWith(n))?e.getConfig(Wwe.ConfigKey.AnthropicToolSearchEnabled):!1}a(jsi,"isAnthropicToolSearchEnabled");function sAa(t,e,r){return jsi(t,e)?e.getExperimentBasedConfig(Wwe.ConfigKey.AnthropicToolSearchMode,r)==="client":!1}a(sAa,"isAnthropicCustomToolSearchEnabled");function aAa(t,e,r){let n=typeof t=="string"?t:t.model;return Gsi(n)?e.getExperimentBasedConfig(Wwe.ConfigKey.AnthropicContextEditingMode,r)!=="off":!1}a(aAa,"isAnthropicContextEditingEnabled");function cAa(t,e,r){let n=typeof t=="string"?t:t.model;return Hsi(n)?e.getExperimentBasedConfig(Wwe.ConfigKey.MemoryToolEnabled,r):!1}a(cAa,"isAnthropicMemoryToolEnabled");function $si(t,e){if(t==="off")return;let r=[];return(t==="clear-thinking"||t==="clear-both")&&e&&r.push({type:"clear_thinking_20251015",keep:{type:"thinking_turns",value:1}}),(t==="clear-tooluse"||t==="clear-both")&&r.push({type:"clear_tool_uses_20250919",trigger:{type:"input_tokens",value:1e5},keep:{type:"tool_uses",value:3}}),r.length>0?{edits:r}:void 0}a($si,"buildContextManagement");function lAa(t,e,r){let n=t.getExperimentBasedConfig(Wwe.ConfigKey.AnthropicContextEditingMode,e);return $si(n,r)}a(lAa,"getContextManagementFromConfig")});var Zat=T(Xv=>{"use strict";f();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.HeaderContributors=Xv.IHeaderContributors=Xv.userAgentLibraryHeader=void 0;Xv.stringifyUrlOrRequestMetadata=yAa;Xv.createCapiRequestBody=EAa;Xv.canRetryOnceNetworkError=Wsi;Xv.postRequest=_Aa;Xv.getRequest=CAa;var uAa=qr(),dAa=ude(),fAa=Ko(),pAa=$y(),hAa=bp(),mAa=zm(),gAa=QB();Xv.userAgentLibraryHeader="X-VSCode-User-Agent-Library-Version";var AAa=30*1e3;function yAa(t){return typeof t=="string"?t:JSON.stringify(t)}a(yAa,"stringifyUrlOrRequestMetadata");function EAa(t,e,r){let n={messages:(0,gAa.rawMessageToCAPI)(t.messages,r),model:e};return t.postOptions&&Object.assign(n,t.postOptions),n}a(EAa,"createCapiRequestBody");function Vsi(t,e){let r=t.get(mAa.IFetcherService),n=t.get(hAa.ITelemetryService),o=t.get(pAa.ICAPIClientService),{requestType:s,endpointOrUrl:c,secretKey:l,intent:u,requestId:d,body:p,additionalHeaders:h,cancelToken:m,useFetcher:g,canRetryOnce:A=!0,location:y}=e,E=typeof c=="string"||"type"in c?{modelMaxPromptTokens:0,urlOrRequestMetadata:c,family:"",tokenizer:dAa.TokenizerType.O200K,acquireTokenizer:a(()=>{throw new Error("Method not implemented.")},"acquireTokenizer"),name:"",version:""}:c,_=e.requestKindOptions?.kind==="subagent"?"conversation-subagent":e.requestKindOptions?.kind==="background"?"conversation-background":u,v={Authorization:`Bearer ${l}`,"X-Request-Id":d,"OpenAI-Intent":u,"X-GitHub-Api-Version":"2025-05-01",...h,...E.getExtraHeaders?E.getExtraHeaders(y):{}};v["X-Interaction-Type"]=_,v["X-Agent-Task-Id"]=d,E.interceptBody&&E.interceptBody(p);let b=E.getEndpointFetchOptions?.(),I={callSite:`network-request-${u}`,method:s,headers:v,json:p,timeout:AAa,useFetcher:g,suppressIntegrationId:b?.suppressIntegrationId};if(m){let x=r.makeAbortController();m.onCancellationRequested(()=>{n.sendGHTelemetryEvent("networking.cancelRequest",{headerRequestId:d}),x.abort()}),I.signal=x.signal}return typeof E.urlOrRequestMetadata=="string"?r.fetch(E.urlOrRequestMetadata,I).catch(w=>{if(A&&Wsi(w))return n.sendGHTelemetryEvent("networking.disconnectAll"),r.disconnectAll().then(()=>r.fetch(E.urlOrRequestMetadata,I));throw r.isAbortError(w)?new fAa.CancellationError:w}):o.makeRequest(I,E.urlOrRequestMetadata)}a(Vsi,"networkRequest");function Wsi(t){return["ECONNRESET","ETIMEDOUT","ERR_CONNECTION_RESET","ERR_NETWORK_CHANGED","ERR_HTTP2_INVALID_SESSION","ERR_HTTP2_STREAM_CANCEL","ERR_HTTP2_GOAWAY_SESSION","ERR_HTTP2_PROTOCOL_ERROR","ERR_FAILED"].includes(t?.code)}a(Wsi,"canRetryOnceNetworkError");function _Aa(t,e){return Vsi(t,{...e,requestType:"POST"})}a(_Aa,"postRequest");function CAa(t,e){return Vsi(t,{...e,requestType:"GET"})}a(CAa,"getRequest");Xv.IHeaderContributors=(0,uAa.createServiceIdentifier)("headerContributors");var z0r=class{static{a(this,"HeaderContributors")}constructor(){this.contributors=[]}add(e){this.contributors.push(e)}remove(e){let r=this.contributors.indexOf(e);r!==-1&&this.contributors.splice(r,1)}contributeHeaders(e){for(let r of this.contributors)r.contributeHeaderValues(e)}size(){return this.contributors.length}};Xv.HeaderContributors=z0r});var X0r=T(EA=>{"use strict";f();var vAa=EA&&EA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bAa=EA&&EA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TAa=EA&&EA.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;orct(n,r),e)}a(xAa,"arrayHash");function wAa(t,e){return e=VD(181387,e),Object.keys(t).sort().reduce((r,n)=>(r=J0r(n,r),rct(t[n],r)),e)}a(wAa,"objectHash");var RAa=a(t=>{if(typeof t=="string"&&t.length<250){let r=new tct;return r.update(t),Promise.resolve(r.digest())}let e;return typeof t=="string"?e=new TextEncoder().encode(t):t instanceof K0r.VSBuffer?e=t.buffer:e=t,crypto.subtle.digest("sha-1",e).then(fde)},"hashAsync");EA.hashAsync=RAa;function Y0r(t,e,r=32){let n=r-e,o=~((1<>>n)>>>0}a(Y0r,"leftRotate");function fde(t,e=32){return t instanceof ArrayBuffer?(0,K0r.encodeHex)(K0r.VSBuffer.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}a(fde,"toHexString");var tct=class t{static{a(this,"StringSHA1")}static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let r=e.length;if(r===0)return;let n=this._buff,o=this._buffLen,s=this._leftoverHighSurrogate,c,l;for(s!==0?(c=s,l=-1,s=0):(c=e.charCodeAt(0),l=0);;){let u=c;if(ect.isHighSurrogate(c))if(l+1>>6,e[r++]=128|(n&63)>>>0):n<65536?(e[r++]=224|(n&61440)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0):(e[r++]=240|(n&1835008)>>>18,e[r++]=128|(n&258048)>>>12,e[r++]=128|(n&4032)>>>6,e[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),fde(this._h0)+fde(this._h1)+fde(this._h2)+fde(this._h3)+fde(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=t._bigBlock32,r=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,r.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)e.setUint32(h,Y0r(e.getUint32(h-12,!1)^e.getUint32(h-32,!1)^e.getUint32(h-56,!1)^e.getUint32(h-64,!1),1),!1);let n=this._h0,o=this._h1,s=this._h2,c=this._h3,l=this._h4,u,d,p;for(let h=0;h<80;h++)h<20?(u=o&s|~o&c,d=1518500249):h<40?(u=o^s^c,d=1859775393):h<60?(u=o&s|o&c|s&c,d=2400959708):(u=o^s^c,d=3395469782),p=Y0r(n,5)+u+l+d+e.getUint32(h*4,!1)&4294967295,l=c,c=s,s=Y0r(o,30),o=n,n=p;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+l&4294967295}};EA.StringSHA1=tct});var pde=T(zwe=>{"use strict";f();Object.defineProperty(zwe,"__esModule",{value:!0});zwe.TelemetryData=void 0;zwe.eventPropertiesToSimpleObject=kAa;var PAa=Ip(),Z0r=class t{static{a(this,"TelemetryData")}static{this.keysExemptedFromSanitization=["VSCode.ABExp.Features","abexp.assignmentcontext"]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},Date.now())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=Date.now())}extendWithEditorAgnosticFields(e){this.properties.editor_version=e.getEditorInfo().format(),this.properties.editor_plugin_version=e.getEditorPluginInfo().format(),this.properties.client_machineid=e.machineId,this.properties.client_sessionid=e.sessionId,this.properties.copilot_version=`copilot/${e.getVersion()}`,this.properties.common_extname=e.getEditorPluginInfo().name,this.properties.common_extversion=e.getEditorPluginInfo().version,this.properties.common_vscodeversion=e.getEditorInfo().format()}extendWithConfigProperties(e,r,n){let o=e.dumpConfig();o["copilot.build"]=r.getBuild(),o["copilot.buildType"]=r.getBuildType(),n.trackingId&&(o["copilot.trackingId"]=n.trackingId),n.organizationsList&&(o.organizations_list=n.organizationsList),n.enterpriseList&&(o.enterprise_list=n.enterpriseList),this.properties={...this.properties,...o}}extendWithRequestId(e){let r={completionId:e.completionId,created:e.created.toString(),headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetry=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromPropertiesHack(e,r){if(e)return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetry.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}updateTimeSinceIssuedAndDisplayed(){let e=Date.now()-this.issuedTime;if(this.measurements.timeSinceIssuedMs===void 0&&(this.measurements.timeSinceIssuedMs=e),this.measurements.timeSinceDisplayedMs===void 0&&this.displayedTime!==void 0){let r=Date.now()-this.displayedTime;this.measurements.timeSinceDisplayedMs=r}}makeReadyForSending(e,r,n){this.extendWithConfigProperties(e,r,n),this.extendWithEditorAgnosticFields(r),this.sanitizeKeys(),this.updateTimeSinceIssuedAndDisplayed();for(let o in this.properties)this.properties[o]===void 0&&delete this.properties[o];DAa(r,this.properties)}};zwe.TelemetryData=Z0r;function kAa(t){if(!t)return;let e={};for(let r in t){let n=t[r];n&&(n.value?e[r]=n.value:e[r]=n)}return e}a(kAa,"eventPropertiesToSimpleObject");function DAa(t,e){e.unique_id=(0,PAa.generateUuid)(),e.common_extname=t.getEditorPluginInfo().name,e.common_extversion=t.getEditorPluginInfo().version,e.common_vscodeversion=t.getEditorInfo().format()}a(DAa,"addRequiredProperties")});var zsi=T(epr=>{"use strict";f();Object.defineProperty(epr,"__esModule",{value:!0});epr.extractThinkingDeltaFromChoice=OAa;function NAa(t){if(!t)return"";if(t.cot_summary)return t.cot_summary;if(t.reasoning_text)return t.reasoning_text;if(t.thinking)return t.thinking}a(NAa,"getThinkingDeltaText");function MAa(t){if(t){if(t.cot_id)return t.cot_id;if(t.reasoning_opaque)return t.reasoning_opaque;if(t.signature)return t.signature}}a(MAa,"getThinkingDeltaId");function OAa(t){let e=t.message||t.delta;if(!e)return;let r=MAa(e),n=NAa(e);if(e.reasoning_opaque)return{id:e.reasoning_opaque,text:n,encrypted:e.reasoning_opaque};if(r&&n)return{id:r,text:n};if(n)return{text:n};if(r)return{id:r}}a(OAa,"extractThinkingDeltaFromChoice")});var oct=T(FK=>{"use strict";f();Object.defineProperty(FK,"__esModule",{value:!0});FK.SSEProcessor=void 0;FK.splitChunk=Ksi;FK.convertToAPIJsonData=FAa;FK.sendCommunicationErrorTelemetry=hde;var nct=D0(),Ysi=pde(),BAa=zsi(),ict=xK(),H0=QB(),Ywe=class t{static{a(this,"APIJsonDataStreaming")}constructor(e){this.model=e,this._text=[],this._newText=[]}get text(){return this._text}append(e){if(e.text){let r=t._removeCR(e.text);this._text.push(r),this._newText.push(r)}if(e.delta?.content){let r=t._removeCR(e.delta.content);this._text.push(r),this._newText.push(r)}if(e.delta?.function_call&&(e.delta.function_call.name||e.delta.function_call.arguments)){let r=t._removeCR(e.delta.function_call.arguments);this._text.push(r),this._newText.push(r)}}flush(){let e=this._newText.join("");return this._newText=[],e}static _removeCR(e){return e.replace(/\r$/g,"")}toJSON(){return{text:this._text,newText:this._newText}}},tpr=class{static{a(this,"StreamingToolCall")}constructor(){this.arguments=""}update(e){let r=!1;return e.id&&(this.id=e.id),e.function?.name&&(this.name=e.function.name),e.function?.arguments&&(this.arguments+=e.function.arguments,r=!0),r}},rpr=class{static{a(this,"StreamingToolCalls")}constructor(){this.toolCalls=[]}getToolCalls(){return this.toolCalls.map(e=>({name:e.name,arguments:e.arguments,id:e.id}))}hasToolCalls(){return this.toolCalls.length>0}update(e){let r=[];return e.delta?.tool_calls?.forEach(n=>{let o;n.id&&(o=this.toolCalls.find(c=>c.id===n.id)),o||(o=this.toolCalls.at(-1)),(!o||n.id&&o.id&&o.id!==n.id)&&(o=new tpr,this.toolCalls.push(o)),o.update(n)&&o.name&&r.push({name:o.name,arguments:o.arguments,id:o.id})}),r}};function Ksi(t){let e=t.split(` +`),r=e.pop();return[e.filter(n=>n!==""),r]}a(Ksi,"splitChunk");var npr=class t{static{a(this,"SSEProcessor")}constructor(e,r,n,o,s,c){this.logService=e,this.telemetryService=r,this.expectedNumChoices=n,this.response=o,this.body=s,this.cancellationToken=c,this.requestId=(0,ict.getRequestId)(this.response.headers),this.solutions={},this.completedFunctionCallIdxs=new Map,this.functionCalls={},this.toolCalls=new rpr,this.functionCallName=void 0}static async create(e,r,n,o,s){let c=o.body.pipeThrough(new TextDecoderStream);return new t(e,r,n,o,c,s)}async*processSSE(e=async()=>{}){try{if(this.expectedNumChoices>1)for await(let r of this.processSSEInner(e))(0,H0.isApiUsage)(r)||(yield r);else{let r,n;for await(let o of this.processSSEInner(e))(0,H0.isApiUsage)(o)?n=o:r=o;if(await this.maybeCancel("after receiving the completion, but maybe before we got the usage"))return;r&&(r.usage=n,yield r)}}finally{await this.cancel(),this.logService.info(`request done: requestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`)}}async*processSSEInner(e){let r="",n=!1,o=!0,s=!1;for await(let c of this.body){if(await this.maybeCancel("after awaiting body chunk"))return;let[l,u]=Ksi(r+c.toString());r=u;for(let d of l){if(d.startsWith(":"))continue;let p=d.slice(5).trim();if(p==="[DONE]"){yield*this.finishSolutions();return}let h;try{h=JSON.parse(p)}catch{this.logService.error(`Error parsing JSON stream data for request id ${this.requestId.headerRequestId}:${d}`),hde(this.telemetryService,`Error parsing JSON stream data for request id ${this.requestId.headerRequestId}:`,d);continue}if(h.usage&&(yield h.usage),h.copilot_confirmation&&LAa(h.copilot_confirmation)&&await e("",0,{text:"",copilotConfirmation:h.copilot_confirmation}),!h.choices){!h.copilot_references&&!h.copilot_confirmation&&(h.error!==void 0?(this.logService.error(`Error in response for request id ${this.requestId.headerRequestId}:${h.error.message}`),hde(this.telemetryService,`Error in response for request id ${this.requestId.headerRequestId}:`,h.error.message),yield{index:0,finishOffset:void 0,solution:new Ywe(h.model||""),reason:H0.FinishedCompletionReason.ServerError,error:h.error,requestId:this.requestId}):(this.logService.error(`Unexpected response with no choices or error for request id ${this.requestId.headerRequestId}`),hde(this.telemetryService,`Unexpected response with no choices or error for request id ${this.requestId.headerRequestId}`))),h.copilot_errors&&await e("",0,{text:"",copilotErrors:h.copilot_errors}),h.copilot_references&&await e("",0,{text:"",copilotReferences:h.copilot_references});continue}this.requestId.created===0&&(this.requestId=(0,ict.getRequestId)(this.response.headers,h),this.requestId.created===0&&h.choices?.length&&(this.requestId.created=Math.floor(Date.now()/1e3)));for(let m=0;m(I?.vulnAnnotations&&(!Array.isArray(I.vulnAnnotations)||!I.vulnAnnotations.every(x=>(0,ict.isCopilotAnnotation)(x)))&&(I.vulnAnnotations=void 0),I?.ipCodeCitations&&(!Array.isArray(I.ipCodeCitations)||!I.ipCodeCitations.every(ict.isCodeCitationAnnotation))&&(I.ipCodeCitations=void 0),E=await e(y.text.join(""),g.index,{text:y.flush(),logprobs:g.logprobs,codeVulnAnnotations:I?.vulnAnnotations,ipCitations:I?.ipCodeCitations,copilotReferences:I?.references,copilotToolCalls:I?.toolCalls,copilotToolCallStreamUpdates:I?.toolCallStreamUpdates,_deprecatedCopilotFunctionCalls:I?.functionCalls,beginToolCalls:I?.beginToolCalls,copilotErrors:I?.errors,thinking:A??I?.thinking}),E!==void 0&&(n=!0),await this.maybeCancel("after awaiting finishedCb")),"emitSolution"),v=!0;if(g.delta?.tool_calls){if(!this.toolCalls.hasToolCalls()){let w=g.delta.tool_calls.at(0),R=w?.function?.name;if(R&&(y.text.length&&y.append({index:0,delta:{content:" "}}),await _({beginToolCalls:[{name:R,id:w?.id}]})))continue}let x=this.toolCalls.update(g);if(x.length&&await _({toolCallStreamUpdates:x}))continue}else if(g.delta?.copilot_annotations?.CodeVulnerability||g.delta?.copilot_annotations?.IPCodeCitations){if(await _()||!n&&(y.append(g),await _({vulnAnnotations:g.delta?.copilot_annotations?.CodeVulnerability,ipCodeCitations:g.delta?.copilot_annotations?.IPCodeCitations})))continue}else if(g.delta?.role==="function"){if(g.delta.content)try{let I=JSON.parse(g.delta.content);if(Array.isArray(I)&&await _({references:I}))continue}catch(I){this.logService.error(`Error parsing function references: ${JSON.stringify(I)}`)}}else if(g.delta?.function_call&&(g.delta.function_call.name||g.delta.function_call.arguments))o=!1,this.functionCallName??=g.delta.function_call.name,this.functionCalls[this.functionCallName]??=new Ywe(h.model),this.functionCalls[this.functionCallName].append(g);else if((g.finish_reason===H0.FinishedCompletionReason.FunctionCall||g.finish_reason===H0.FinishedCompletionReason.Stop)&&this.functionCallName){let I=this.functionCalls[this.functionCallName],x={name:this.functionCallName,arguments:I.flush()};this.completedFunctionCallIdxs.set(g.index,"function");try{if(await _({functionCalls:[x]}))continue}catch(w){this.logService.error(w)}if(this.functionCalls[this.functionCallName]=null,this.functionCallName=void 0,g.finish_reason===H0.FinishedCompletionReason.FunctionCall)continue}else v=!1;if((g.finish_reason===H0.FinishedCompletionReason.ToolCalls||g.finish_reason===H0.FinishedCompletionReason.Stop)&&this.toolCalls.hasToolCalls()){v=!0;let I=this.toolCalls.getToolCalls();this.completedFunctionCallIdxs.set(g.index,"tool");let x=I.length>0?I[0].id:void 0;try{if(await _({toolCalls:I,thinking:x&&s?{metadata:{toolId:x}}:void 0}))continue}catch(w){this.logService.error(w)}}if(!(!v&&(y.append(g),await _())||!(g.finish_reason||E!==void 0))){if(yield{solution:y,finishOffset:E,reason:g.finish_reason??H0.FinishedCompletionReason.ClientTrimmed,filterReason:UAa(g),requestId:this.requestId,index:g.index},await this.maybeCancel("after yielding finished choice"))return;o&&(this.solutions[g.index]=null)}}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!==null&&(yield{solution:l,finishOffset:void 0,reason:H0.FinishedCompletionReason.ClientIterationDone,requestId:this.requestId,index:u},await this.maybeCancel("after yielding after iteration done")))return}if(r.length>0&&!n)try{let c=JSON.parse(r);c.error!==void 0&&(this.logService.error(c.error,`Error in response: ${c.error.message}`),hde(this.telemetryService,`Error in response: ${c.error.message}`,c.error))}catch{this.logService.error(`Error parsing extraData for request id ${this.requestId.headerRequestId}: ${r}`),hde(this.telemetryService,`Error parsing extraData for request id ${this.requestId.headerRequestId}: ${r}`)}}async*finishSolutions(){for(let[e,r]of Object.entries(this.solutions)){let n=Number(e);if(r!==null){if(this.completedFunctionCallIdxs.has(n)){yield{solution:r,finishOffset:void 0,reason:this.completedFunctionCallIdxs.get(n)==="function"?H0.FinishedCompletionReason.FunctionCall:H0.FinishedCompletionReason.ToolCalls,requestId:this.requestId,index:n};continue}if(yield{solution:r,finishOffset:void 0,reason:H0.FinishedCompletionReason.ClientDone,requestId:this.requestId,index:n},await this.maybeCancel("after yielding on DONE"))return}}}async maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(this.logService.debug("Cancelled: "+e),await this.cancel(),!0):!1}async cancel(){await this.response.body.destroy()}logChoice(e){let r={...e};delete r.index,delete r.content_filter_results,delete r.content_filter_offsets,this.logService.trace(`choice ${JSON.stringify(r)}`)}};FK.SSEProcessor=npr;function LAa(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(LAa,"isCopilotConfirmation");function FAa(t){return{text:t.text.join(""),tokens:t.text}}a(FAa,"convertToAPIJsonData");function UAa(t){if(t.finish_reason===H0.FinishedCompletionReason.ContentFilter){if(t.delta?.copilot_annotations?.TextCopyright)return H0.FilterReason.Copyright;if(t.delta?.copilot_annotations?.Sexual||t.delta?.copilot_annotations?.SexualPattern)return H0.FilterReason.Sexual;if(t.delta?.copilot_annotations?.Violence)return H0.FilterReason.Violence;if(t.delta?.copilot_annotations?.HateSpeech||t.delta?.copilot_annotations?.HateSpeechPattern)return H0.FilterReason.Hate;if(t.delta?.copilot_annotations?.SelfHarm)return H0.FilterReason.SelfHarm;if(t.delta?.copilot_annotations?.PromptPromBlockList)return H0.FilterReason.Prompt;if(t.content_filter_results){for(let e of Object.keys(t.content_filter_results))if(t.content_filter_results[e]?.filtered)return e}}}a(UAa,"choiceToFilterReason");function hde(t,e,r){let n=[e,r],o=n.length>0?JSON.stringify(n):"no msg",s=Ysi.TelemetryData.createAndMarkAsIssued({context:"fetch",level:nct.LogLevel[nct.LogLevel.Error],message:o});t.sendEnhancedGHTelemetryErrorEvent("log",s.properties,s.measurements);let c=Ysi.TelemetryData.createAndMarkAsIssued({context:"fetch",level:nct.LogLevel[nct.LogLevel.Error],message:"[redacted]"});t.sendGHTelemetryErrorEvent("log",c.properties,c.measurements)}a(hde,"sendCommunicationErrorTelemetry")});var Zwe=T(Xwe=>{"use strict";f();Object.defineProperty(Xwe,"__esModule",{value:!0});Xwe.sendEngineMessagesLengthTelemetry=tai;Xwe.sendEngineMessagesTelemetry=rai;Xwe.prepareChatCompletionForReturn=JAa;var QAa=co(),Zsi=X0r(),act=Wx(),eai=Ip(),qAa=$we(),opr=bp(),Jwe=pde(),GAa=QB(),HAa=oct();function tai(t,e,r,n,o){let s=n?"output":"input",c=r.properties.modelCallId;if(!c){o?.warn("[TELEMETRY] modelCallId not found in telemetryData, input/output messages cannot be linked");return}let l=e.map(p=>{let h={...p,content:typeof p.content=="string"?p.content.length:Array.isArray(p.content)?p.content.reduce((m,g)=>typeof g=="string"?m+g.length:g.type==="text"?m+(g.text?.length||0):m,0):0};return"tool_calls"in p&&p.tool_calls&&Array.isArray(p.tool_calls)&&(h.tool_calls=p.tool_calls.map(m=>({...m,function:m.function?{...m.function,arguments:typeof m.function.arguments=="string"?m.function.arguments.length:m.function.arguments}:m.function}))),h}),u={};for(let[p,h]of Object.entries(r.properties))if(p.startsWith("request.option.tools"))if(typeof h=="string")try{let m=JSON.parse(h);Array.isArray(m)?u[p]=m.length.toString():u[p]=h.length.toString()}catch{u[p]=h.length.toString()}else Array.isArray(h)?u[p]=h.length.toString():u[p]="0";else u[p]=h;let d=Jwe.TelemetryData.createAndMarkAsIssued({...u,messagesJson:JSON.stringify(l),message_direction:s,modelCallId:c},r.measurements);t.sendEnhancedGHTelemetryEvent("engine.messages.length",(0,opr.multiplexProperties)(d.properties),d.measurements),t.sendInternalMSFTTelemetryEvent("engine.messages.length",(0,opr.multiplexProperties)(d.properties),d.measurements)}a(tai,"sendEngineMessagesLengthTelemetry");var Jsi=new act.LRUCache(1e3),Xsi=new act.LRUCache(500),Kwe=new act.LRUCache(1e3),sct={headerRequestId:null},ipr=new act.LRUCache(100);function jAa(t){let e=Kwe.get(t);if(e!==void 0){let r=e+1;return Kwe.set(t,r),r}else return Kwe.set(t,1),1}a(jAa,"updateHeaderRequestIdTracker");function $Aa(t){let e=ipr.get(t);if(e!==void 0){let r=e+1;return ipr.set(t,r),r}else return ipr.set(t,1),1}a($Aa,"updateConversationTracker");function VAa(t,e,r){let n={};for(let[h,m]of Object.entries(e.properties))h.startsWith("request.option.")&&(n[h]=m);if(Object.keys(n).length===0)return;let o=e.properties.conversationId||e.properties.sessionId||"unknown",s=e.properties.headerRequestId||"unknown",c=(0,Zsi.hash)(n).toString(),l=Xsi.get(c);if(!l)l=(0,eai.generateUuid)(),Xsi.set(c,l);else return l;let u=JSON.stringify(n),d=8e3,p=[];for(let h=0;h{"use strict";f();Object.defineProperty(jo,"__esModule",{value:!0});jo.isHiddenModelA=nya;jo.isHiddenModelE=lct;jo.isHiddenModelF=uct;jo.isHiddenModelG=aai;jo.isHiddenFamilyH=dct;jo.isGpt54=eRe;jo.isGpt54ConcisePromptExp=iya;jo.isGpt54LargePromptExp=oya;jo.isGpt53Codex=apr;jo.isVSCModelA=fct;jo.isVSCModelB=pct;jo.isVSCModelC=tRe;jo.isGpt52CodexFamily=cpr;jo.isGpt52Family=lpr;jo.modelPrefersInstructionsInUserMessage=sya;jo.modelPrefersInstructionsAfterHistory=aya;jo.modelSupportsApplyPatch=cya;jo.modelPrefersJsonNotebookRepresentation=lya;jo.modelSupportsReplaceString=uya;jo.modelSupportsMultiReplaceString=cai;jo.modelCanUseReplaceStringExclusively=dya;jo.modelShouldUseReplaceStringHealing=fya;jo.modelCanUseMcpResultImageURL=pya;jo.modelCanUseImageURL=hya;jo.modelSupportsPDFDocuments=mya;jo.modelCanUseApplyPatchExclusively=gya;jo.modelNeedsStrongReplaceStringHint=Aya;jo.modelSupportsSimplifiedApplyPatchInstructions=yya;jo.isAnthropicFamily=rRe;jo.isGeminiFamily=Eya;jo.isMinimaxFamily=hct;jo.isGpt5PlusFamily=upr;jo.isGptCodexFamily=_ya;jo.isGpt5Family=Cya;jo.isGptFamily=vya;jo.isGpt51Family=bya;jo.getVerbosityForModelSync=Tya;var eI=cdr(),cct=ac(),sai=cd(),XAa=["a99dd17dfee04155d863268596b7f6dd36d0a6531cd326348dbe7416142a21a3","6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95"],nai=["6db59e9bfe6e2ce608c0ee0ade075c64e4d054f05305e3034481234703381bb5"],iai=["6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95","7b667eee9b3517fb9aae7061617fd9cec524859fcd6a20a605bfb142a6b0f14e","1d28f8e6e5af58c60e9a52385314a3c7bc61f7226e1444e31fe60c58c30e8235","e7cfc1a7adaf9e419044e731b7a9e21940a5280a438b472db0c46752dd70eab3","3104045f9b69dbb7a3d76cc8a0aa89eb05e10677c4dd914655ea87f4be000f4e"],oai=["6db59e9bfe6e2ce608c0ee0ade075c64e4d054f05305e3034481234703381bb5","6b0f165d0590bf8d508540a796b4fda77bf6a0a4ed4e8524d5451b1913100a95","7b667eee9b3517fb9aae7061617fd9cec524859fcd6a20a605bfb142a6b0f14e","1d28f8e6e5af58c60e9a52385314a3c7bc61f7226e1444e31fe60c58c30e8235","e7cfc1a7adaf9e419044e731b7a9e21940a5280a438b472db0c46752dd70eab3","3104045f9b69dbb7a3d76cc8a0aa89eb05e10677c4dd914655ea87f4be000f4e"],ZAa=["6013de0381f648b7f21518885c02b40b7583adfb33c6d9b64d3aed52c3934798"],eya=["ab45e8474269b026f668d49860b36850122e18a50d5ea38f3fefdae08261865c","9542d5c077c2bc379f92be32272b14be8b94a8841323465db0d5b3d6f4f0dab0"],tya=["0a4346f806b28b3ce94905c3ac56fcd5ee2337d8613161696aba52eb0c3551cc","2a7b79b0151aa44a0abee17adc0e18df1c07d8d15d7affa989c3b3afb6bee0a0","f3c2984127dd2db50a555194925ca0d55c3c7b676e889c9406b2e6875a67e29c","5a81e6aa7556585ba7c569881d1103683adc9e0124ff7952df423afba2f167b5"],rya=["70fcded3f255d368e868cc807d8838a62108bfa5c86ce7d37966f58cda229e33"];function spr(t){return"id"in t?t.id:t.model}a(spr,"getModelId");function nya(t){let e=(0,eI.getCachedSha256Hash)(t.family);return XAa.includes(e)}a(nya,"isHiddenModelA");function lct(t){let e=(0,eI.getCachedSha256Hash)(t.family);return ZAa.includes(e)}a(lct,"isHiddenModelE");function uct(t){let e=(0,eI.getCachedSha256Hash)(t.family);return eya.includes(e)}a(uct,"isHiddenModelF");function aai(t){return(0,eI.getCachedSha256Hash)(t.family)==="0d90e0e579352b8502fc2a46b40961ee941adc26ce67c2b1438f0e4ea97d932f"}a(aai,"isHiddenModelG");function dct(t){let e=(0,eI.getCachedSha256Hash)(t.family);return rya.includes(e)}a(dct,"isHiddenFamilyH");function eRe(t){let e=(0,eI.getCachedSha256Hash)(typeof t=="string"?t:t.family);return(typeof t=="string"?t:t.family).startsWith("gpt-5.4")||tya.includes(e)}a(eRe,"isGpt54");function iya(t,e){let r=t.get(cct.IConfigurationService),n=t.get(sai.IExperimentationService);return eRe(e)&&r.getExperimentBasedConfig(cct.ConfigKey.EnableGpt54ConcisePromptExp,n)}a(iya,"isGpt54ConcisePromptExp");function oya(t,e){let r=t.get(cct.IConfigurationService),n=t.get(sai.IExperimentationService);return eRe(e)&&r.getExperimentBasedConfig(cct.ConfigKey.EnableGpt54LargePromptExp,n)}a(oya,"isGpt54LargePromptExp");function apr(t){return(typeof t=="string"?t:t.family).startsWith("gpt-5.3-codex")}a(apr,"isGpt53Codex");function fct(t){let e=(0,eI.getCachedSha256Hash)(spr(t)),r=(0,eI.getCachedSha256Hash)(t.family);return nai.includes(e)||nai.includes(r)}a(fct,"isVSCModelA");function pct(t){let e=(0,eI.getCachedSha256Hash)(spr(t)),r=(0,eI.getCachedSha256Hash)(t.family);return iai.includes(e)||iai.includes(r)}a(pct,"isVSCModelB");function tRe(t){let e=(0,eI.getCachedSha256Hash)(spr(t)),r=(0,eI.getCachedSha256Hash)(t.family);return oai.includes(e)||oai.includes(r)}a(tRe,"isVSCModelC");function cpr(t){return(typeof t=="string"?t:t.family)==="gpt-5.2-codex"}a(cpr,"isGpt52CodexFamily");function lpr(t){return(typeof t=="string"?t:t.family)==="gpt-5.2"}a(lpr,"isGpt52Family");function sya(t){return t.includes("claude-3.5-sonnet")}a(sya,"modelPrefersInstructionsInUserMessage");function aya(t){return t.includes("claude-3.5-sonnet")}a(aya,"modelPrefersInstructionsAfterHistory");function cya(t){return tRe(t)?!1:t.family.startsWith("gpt")&&!t.family.includes("gpt-4o")||t.family==="o4-mini"||cpr(t.family)||apr(t.family)||fct(t)||pct(t)||lpr(t.family)||eRe(t)}a(cya,"modelSupportsApplyPatch");function lya(t){return t.family.startsWith("gpt")&&!t.family.includes("gpt-4o")||t.family==="o4-mini"||cpr(t.family)||apr(t.family)||lpr(t.family)||eRe(t)}a(lya,"modelPrefersJsonNotebookRepresentation");function uya(t){return t.family.toLowerCase().includes("gemini")||t.family.includes("grok-code")||cai(t)||uct(t)||hct(t)||dct(t)}a(uya,"modelSupportsReplaceString");function cai(t){return rRe(t)||lct(t)||tRe(t)||hct(t)||dct(t)}a(cai,"modelSupportsMultiReplaceString");function dya(t){return rRe(t)||t.family.includes("grok-code")||lct(t)||t.family.toLowerCase().includes("gemini-3")||tRe(t)||uct(t)||hct(t)||dct(t)}a(dya,"modelCanUseReplaceStringExclusively");function fya(t){return t.family.includes("gemini-2")}a(fya,"modelShouldUseReplaceStringHealing");function pya(t){return!rRe(t)&&!lct(t)}a(pya,"modelCanUseMcpResultImageURL");function hya(t){return!0}a(hya,"modelCanUseImageURL");function mya(t){return rRe(t)}a(mya,"modelSupportsPDFDocuments");function gya(t){return tRe(t)?!1:upr(t)||fct(t)||pct(t)}a(gya,"modelCanUseApplyPatchExclusively");function Aya(t){return t.family.toLowerCase().includes("gemini")||uct(t)}a(Aya,"modelNeedsStrongReplaceStringHint");function yya(t){return upr(t)||fct(t)||pct(t)}a(yya,"modelSupportsSimplifiedApplyPatchInstructions");function rRe(t){return t.family.startsWith("claude")||t.family.startsWith("Anthropic")||aai(t)}a(rRe,"isAnthropicFamily");function Eya(t){return t.family.toLowerCase().startsWith("gemini")}a(Eya,"isGeminiFamily");function hct(t){return t.family.toLowerCase().includes("minimax")}a(hct,"isMinimaxFamily");function upr(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-5"):!1}a(upr,"isGpt5PlusFamily");function _ya(t){if(!t)return!1;let e=typeof t=="string"?t:t.family;return!!e.startsWith("gpt-")&&e.includes("-codex")}a(_ya,"isGptCodexFamily");function Cya(t){if(!t)return!1;let e=typeof t=="string"?t:t.family;return e==="gpt-5"||e==="gpt-5-mini"||e==="gpt-5-codex"}a(Cya,"isGpt5Family");function vya(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-"):!1}a(vya,"isGptFamily");function bya(t){return t?!!(typeof t=="string"?t:t.family).startsWith("gpt-5.1"):!1}a(bya,"isGpt51Family");function Tya(t){if(t.family==="gpt-5.1"||t.family==="gpt-5-mini")return"low"}a(Tya,"getVerbosityForModelSync")});var fpr=T(gct=>{"use strict";f();Object.defineProperty(gct,"__esModule",{value:!0});gct.SSEParser=void 0;var dpr=class{static{a(this,"SSEParser")}constructor(e){this.dataBuffer="",this.eventTypeBuffer="",this.buffer=[],this.endedOnCR=!1,this.onEventHandler=e,this.decoder=new TextDecoder("utf-8")}getLastEventId(){return this.lastEventIdBuffer}getReconnectionTime(){return this.reconnectionTime}feed(e){if(e.length===0)return;let r=0;for(this.endedOnCR&&e[0]===10&&r++,this.endedOnCR=!1;r{"use strict";f();Object.defineProperty(llt,"__esModule",{value:!0});llt.IToolDeferralService=void 0;var Tga=qr();llt.IToolDeferralService=(0,Tga.createServiceIdentifier)("IToolDeferralService")});var ysi=T(k_=>{"use strict";f();var Sga=k_&&k_.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},dsi=k_&&k_.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(k_,"__esModule",{value:!0});k_.AnthropicMessagesProcessor=void 0;k_.buildToolInputSchema=hsi;k_.createMessagesRequestBody=kga;k_.rawMessagesToMessagesAPI=msi;k_.addToolsAndSystemCacheControl=Asi;k_.processResponseFromMessagesEndpoint=Mga;var o2=po(),Iga=wc(),xga=V0r(),Y0r=Np(),W0r=XD(),z0r=fc(),fsi=L0(),p3=jct(),dlt=i3(),wga=usi(),Rga=r2e(),Pga=gd(),psi=Rp();function hsi(t){if(!t)return{type:"object",properties:{}};let{$schema:e,...r}=t;return{type:"object",properties:{},...r}}a(hsi,"buildToolInputSchema");function kga(t,e,r,n){let o=t.get(z0r.IConfigurationService),s=t.get(Pga.IExperimentationService),c=t.get(wga.IToolDeferralService),l=(0,p3.isAnthropicToolSearchEnabled)(n,o),u=(0,p3.isAnthropicCustomToolSearchEnabled)(n,o,s),d=e.location===W0r.ChatLocation.Agent||e.location===W0r.ChatLocation.MessagesProxy,p=e.telemetryProperties?.subType?.startsWith("subagent")??!1,h=[],m=[];if(e.requestOptions?.tools)for(let P of e.requestOptions.tools){if(!P.function.name||P.function.name.length===0)continue;let k=l&&d&&!p&&!c.isNonDeferredTool(P.function.name),Q={name:P.function.name,description:P.function.description||"",input_schema:hsi(P.function.parameters),...k?{defer_loading:!0}:{}};(k?m:h).push(Q)}let g=[];d&&!p&&l&&!u&&g.push({name:p3.TOOL_SEARCH_TOOL_NAME,type:p3.TOOL_SEARCH_TOOL_TYPE,defer_loading:!1}),g.push(...h,...m);let A=e.reasoningEffort,y;if(e.enableThinking){let P=o.getConfig(z0r.ConfigKey.AnthropicThinkingBudget),k=P===0,Q=o.getExperimentBasedConfig(z0r.ConfigKey.AnthropicForceExtendedThinking,s);if(n.supportsAdaptiveThinking&&!k&&!Q)y={type:"adaptive"};else if(!k&&n.maxThinkingBudget&&n.minThinkingBudget){let M=e.postOptions.max_tokens??1024,D=n.minThinkingBudget??1024,G=P&&P>0?P0?new Set(g.map(P=>P.name)):void 0,R=msi(e.messages,u?x:void 0);Asi(g,R);let w=R.messages.at(-1);return w&&w.role==="assistant"&&(b.warn(`[messagesAPI] Trailing assistant message detected \u2014 appending synthetic user message to prevent prefill error. Total messages: ${R.messages.length}`),I.sendMSFTTelemetryEvent("messagesApi.trailingAssistantGuard",{model:r,location:W0r.ChatLocation.toString(e.location)},{messageCount:R.messages.length}),R.messages.push({role:"user",content:[{type:"text",text:"Please continue."}]})),{model:r,...R,stream:!0,tools:g.length>0?g:void 0,top_p:e.postOptions.top_p,max_tokens:e.postOptions.max_tokens,thinking:y,..._?{output_config:{effort:_}}:{},...v?{context_management:v}:{}}}a(kga,"createMessagesRequestBody");function msi(t,e){let r=[],n=[],o=new Map;for(let c of t)switch(c.role){case o2.Raw.ChatRole.System:{n.push(...ult(c.content).filter(l=>l.type==="text"));break}case o2.Raw.ChatRole.User:{let l=ult(c.content);l.length>0&&r.push({role:"user",content:l});break}case o2.Raw.ChatRole.Assistant:{let l=ult(c.content);if(c.toolCalls)for(let u of c.toolCalls){let d={};try{d=JSON.parse(u.function.arguments)}catch{}l.push({type:"tool_use",id:u.id,name:u.function.name,input:d}),o.set(u.id,u.function.name)}l.length>0&&r.push({role:"assistant",content:l});break}case o2.Raw.ChatRole.Tool:{if(c.toolCallId){let l=ult(c.content),u=!1;for(let g of l)gsi(g)&&g.cache_control&&(u=!0,delete g.cache_control);let h=(e&&o.get(c.toolCallId)===p3.CUSTOM_TOOL_SEARCH_NAME?Nga(l,e):void 0)??l.filter(g=>(g.type==="text"||g.type==="image"||g.type==="document")&&!(g.type==="text"&&g.text.trim()==="")),m={type:"tool_result",tool_use_id:c.toolCallId,content:h.length>0?h:void 0};u&&(m.cache_control={type:"ephemeral"}),r.push({role:"user",content:[m]})}break}}let s=[];for(let c of r){let l=s[s.length-1];if(l&&l.role===c.role){let u=Array.isArray(l.content)?l.content:[{type:"text",text:l.content}],d=Array.isArray(c.content)?c.content:[{type:"text",text:c.content}];l.content=[...u,...d]}else s.push(c)}return{messages:s,...n.length?{system:n}:{}}}a(msi,"rawMessagesToMessagesAPI");function Nga(t,e){if(t.length!==1||t[0].type!=="text")return;let r;try{r=JSON.parse(t[0].text)}catch{return}if(Array.isArray(r))return r.filter(n=>typeof n=="string"&&(!e||e.has(n))).map(n=>({type:"tool_reference",tool_name:n}))}a(Nga,"tryParseToolReferences");function ult(t){let e=[];for(let r of t)switch(r.type){case o2.Raw.ChatCompletionContentPartKind.Text:r.text.trim()&&e.push({type:"text",text:r.text});break;case o2.Raw.ChatCompletionContentPartKind.Image:{let n=r.imageUrl.url,o=n.match(/^data:(image\/(?:jpeg|png|gif|webp));base64,(.+)$/);o?e.push({type:"image",source:{type:"base64",media_type:o[1],data:o[2]}}):n.startsWith("https://")&&e.push({type:"image",source:{type:"url",url:n}});break}case o2.Raw.ChatCompletionContentPartKind.CacheBreakpoint:{let n=e.at(-1);n&&gsi(n)?n.cache_control={type:"ephemeral"}:e.push({type:"text",text:" ",cache_control:{type:"ephemeral"}});break}case o2.Raw.ChatCompletionContentPartKind.Document:{r.documentData.mediaType==="application/pdf"&&e.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:r.documentData.data}});break}case o2.Raw.ChatCompletionContentPartKind.Opaque:{if(r.value&&typeof r.value=="object"&&"type"in r.value){let n=r.value;if(n.type==="thinking"&&n.thinking){let o=Array.isArray(n.thinking.text)?n.thinking.text.join(""):n.thinking.text;o&&n.thinking.encrypted?e.push({type:"thinking",thinking:o,signature:n.thinking.encrypted}):n.thinking.encrypted&&!o&&e.push({type:"redacted_thinking",data:n.thinking.encrypted})}}break}}return e}a(ult,"rawContentToAnthropicContent");function gsi(t){return t.type!=="thinking"&&t.type!=="redacted_thinking"}a(gsi,"contentBlockSupportsCacheControl");var Dga=4;function Asi(t,e){let r=0;if(e.system)for(let c of e.system)c.cache_control&&r++;for(let c of e.messages)if(Array.isArray(c.content))for(let l of c.content)typeof l=="object"&&"cache_control"in l&&l.cache_control&&r++;let n=Dga-r;if(n<=0)return;let o;for(let c=t.length-1;c>=0;c--)if(!t[c].defer_loading){o=t[c];break}o&&n>0&&(o.cache_control={type:"ephemeral"},n--);let s=e.system?.at(-1);s&&!s.cache_control&&n>0&&(s.cache_control={type:"ephemeral"})}a(Asi,"addToolsAndSystemCacheControl");async function Mga(t,e,r,n,o,s){return new Iga.AsyncIterableObject(async c=>{let l=n.headers.get("X-Request-ID")??(0,Y0r.generateUuid)(),u=n.headers.get("x-github-request-id")??"",d=t.createInstance(flt,s,l,u),p=new xga.SSEParser(h=>{try{r.trace(`[messagesAPI]SSE: ${h.data}`);let m=h.data?.trim();if(!m||m==="[DONE]")return;let g=JSON.parse(m),A=g.type??h.type;if(!A)return;let y=d.push({...g,type:A},o);if(y){r.info(`[messagesAPI] message ${y.choiceIndex} returned. finish reason: [${y.finishReason}]`);let E=s.extendedBy({completionChoiceFinishReason:y.finishReason,headerRequestId:y.requestId.headerRequestId});e.sendGHTelemetryEvent("completion.finishReason",E.properties,E.measurements);let _=(0,dlt.rawMessageToCAPI)(y.message),v=s;y.usage&&(v=s.extendedBy({},{promptTokens:y.usage.prompt_tokens,completionTokens:y.usage.completion_tokens,totalTokens:y.usage.total_tokens})),(0,Rga.sendEngineMessagesTelemetry)(e,[_],v,!0,r),c.emitOne(y)}}catch(m){c.reject(m)}});for await(let h of n.body)p.feed(h)},async()=>{await n.body.destroy()})}a(Mga,"processResponseFromMessagesEndpoint");var flt=class{static{a(this,"AnthropicMessagesProcessor")}constructor(e,r,n,o,s){this.telemetryData=e,this.requestId=r,this.ghRequestId=n,this.logService=o,this.telemetryService=s,this.textAccumulator="",this.toolCallAccumulator=new Map,this.serverToolCallAccumulator=new Map,this.completedServerToolCalls=new Map,this.thinkingAccumulator=new Map,this.completedToolCalls=[],this.messageId="",this.model="",this.inputTokens=0,this.outputTokens=0,this.cacheCreationTokens=0,this.cacheReadTokens=0,this.toolSearchRequests=0}extractIPCodeCitations(e){if(!e?.IPCodeCitations?.length)return[];let r=new Set,n=[];for(let o of e.IPCodeCitations){let s=o.citations;if(!s)continue;let{url:c,license:l,snippet:u}=s;typeof c!="string"||c.trim()===""||typeof l!="string"||l.trim()===""||typeof u!="string"||u.trim()===""||r.has(c)||(r.add(c),n.push({citations:{url:c,license:l,snippet:u}}))}return n.length>0&&this.logService.trace(`[messagesAPI] IP code citations found: ${n.length} unique citations`),n}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,0,o)},"onProgress");switch(e.type){case"message_start":e.message&&(this.messageId=e.message.id,this.model=e.message.model,this.inputTokens=e.message.usage.input_tokens??0,this.outputTokens=e.message.usage.output_tokens??0,this.cacheCreationTokens=e.message.usage.cache_creation_input_tokens??0,this.cacheReadTokens=e.message.usage.cache_read_input_tokens??0,e.message.usage.server_tool_use?.tool_search_requests&&(this.toolSearchRequests=e.message.usage.server_tool_use.tool_search_requests));return;case"content_block_start":if(e.content_block?.type==="tool_use"&&e.index!==void 0){let o=e.content_block.id||(0,Y0r.generateUuid)();this.toolCallAccumulator.set(e.index,{id:o,name:e.content_block.name||"",arguments:""}),this.textAccumulator.length&&n({text:" "}),n({text:"",beginToolCalls:[{name:e.content_block.name||"",id:o}]})}else if(e.content_block?.type==="server_tool_use"&&e.index!==void 0){let o=e.content_block,s=o.id||(0,Y0r.generateUuid)();this.serverToolCallAccumulator.set(e.index,{id:s,name:o.name||"",arguments:""})}else if(e.content_block?.type==="tool_search_tool_result"&&e.index!==void 0){let o=e.content_block;if(o.content.type==="tool_search_tool_search_result"){let s=o.content.tool_references,c=s.map(d=>d.tool_name);this.logService.trace(`[messagesAPI] Tool search discovered ${c.length} tools: ${c.join(", ")}`),this.telemetryService.sendMSFTTelemetryEvent("toolSearchToolInvoked",{requestId:this.requestId,interactionId:this.requestId,validateOutcome:"unknown",invokeOutcome:"success",toolName:p3.TOOL_SEARCH_TOOL_NAME,model:this.model},{discoveredToolCount:c.length});let l=this.completedServerToolCalls.get(o.tool_use_id);this.completedServerToolCalls.delete(o.tool_use_id);let u;if(l?.arguments)try{u=JSON.parse(l.arguments)}catch{u=l.arguments}return n({text:"",serverToolCalls:[{id:o.tool_use_id,name:l?.name??"tool_search_tool_regex",args:u,isServer:!0,result:{tool_references:s}}]})}else if(o.content.type==="tool_search_tool_result_error"){this.logService.warn(`[messagesAPI] Tool search error: ${o.content.error_code}`),this.telemetryService.sendMSFTTelemetryEvent("toolSearchToolInvoked",{requestId:this.requestId,interactionId:this.requestId,validateOutcome:"unknown",invokeOutcome:"error",toolName:p3.TOOL_SEARCH_TOOL_NAME,model:this.model,errorCode:o.content.error_code},{discoveredToolCount:0});let s=this.completedServerToolCalls.get(o.tool_use_id);this.completedServerToolCalls.delete(o.tool_use_id);let c;if(s?.arguments)try{c=JSON.parse(s.arguments)}catch{c=s.arguments}return n({text:"",serverToolCalls:[{id:o.tool_use_id,name:s?.name??"tool_search_tool_regex",args:c,isServer:!0,result:{error:o.content.error_code}}]}),n({text:"",copilotErrors:[{agent:"anthropic",code:o.content.error_code,message:`Tool search error: ${o.content.error_code}`,type:"error",identifier:void 0}]})}}else if(e.content_block?.type==="thinking"&&e.index!==void 0)this.thinkingAccumulator.set(e.index,{thinking:"",signature:""});else if(e.content_block?.type==="redacted_thinking"&&e.index!==void 0){let o=e.content_block.data;n({text:"",thinking:{id:`thinking_${e.index}`,encrypted:o}})}return;case"content_block_delta":if(e.delta){if(e.delta.type==="text_delta"&&e.delta.text){let o=this.extractIPCodeCitations(e.copilot_annotations);return o.length>0?n({text:e.delta.text,ipCitations:o}):n({text:e.delta.text})}else if(e.delta.type==="thinking_delta"&&e.delta.thinking&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);return o&&(o.thinking+=e.delta.thinking),n({text:"",thinking:{id:`thinking_${e.index}`,text:e.delta.thinking}})}else if(e.delta.type==="signature_delta"&&e.delta.signature&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.signature+=e.delta.signature)}else if(e.delta.type==="input_json_delta"&&e.delta.partial_json&&e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(o.arguments+=e.delta.partial_json,n({text:"",copilotToolCallStreamUpdates:[{id:o.id,name:o.name,arguments:o.arguments}]}));let s=this.serverToolCallAccumulator.get(e.index);s&&(s.arguments+=e.delta.partial_json)}}return;case"content_block_stop":if(e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(this.completedToolCalls.push(o),n({text:"",copilotToolCalls:[{id:o.id,name:o.name,arguments:o.arguments}]}),this.toolCallAccumulator.delete(e.index));let s=this.serverToolCallAccumulator.get(e.index);s&&(this.completedServerToolCalls.set(s.id,s),this.serverToolCallAccumulator.delete(e.index));let c=this.thinkingAccumulator.get(e.index);c&&c.signature&&(n({text:"",thinking:{id:`thinking_${e.index}`,encrypted:c.signature}}),this.thinkingAccumulator.delete(e.index))}return;case"message_delta":if(e.usage&&(this.outputTokens=e.usage.output_tokens,this.inputTokens=e.usage.input_tokens??this.inputTokens,this.cacheCreationTokens=e.usage.cache_creation_input_tokens??this.cacheCreationTokens,this.cacheReadTokens=e.usage.cache_read_input_tokens??this.cacheReadTokens,e.usage.server_tool_use?.tool_search_requests&&(this.toolSearchRequests=e.usage.server_tool_use.tool_search_requests)),e.context_management)return this.contextManagementResponse=e.context_management,n({text:"",contextManagement:e.context_management});e.delta?.stop_reason&&(this.stopReason=e.delta.stop_reason);return;case"message_stop":{if(this.contextManagementResponse){let c=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_input_tokens||0),0),l=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_tool_uses||0),0),u=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_thinking_turns||0),0);this.logService.trace(`[messagesAPI] Anthropic context editing applied: cleared ${c} tokens, ${l} tool uses.`),this.telemetryService.sendMSFTTelemetryEvent("contextEditingApplied",{requestId:this.requestId,interactionId:this.requestId,model:this.model},{clearedTokens:c,clearedToolUses:l,clearedThinkingTurns:u})}this.toolSearchRequests>0&&(this.logService.trace(`[messagesAPI] Anthropic tool search requests: ${this.toolSearchRequests}.`),this.telemetryData.extendedBy({toolSearchUsed:"true",toolSearchRequests:this.toolSearchRequests.toString()}));let o;switch(this.stopReason){case"refusal":o=dlt.FinishedCompletionReason.ClientDone;break;case"max_tokens":case"model_context_window_exceeded":o=dlt.FinishedCompletionReason.Length;break;default:o=dlt.FinishedCompletionReason.Stop;break}let s=this.inputTokens+this.cacheCreationTokens+this.cacheReadTokens;return s0?{toolCalls:this.completedToolCalls.map(c=>({id:c.id,type:"function",function:{name:c.name,arguments:c.arguments}}))}:{}}}}case"error":{let o=e.error?.message||"Unknown error";return n({text:"",copilotErrors:[{agent:"anthropic",code:"unknown",message:o,type:"error",identifier:void 0}]})}}}};k_.AnthropicMessagesProcessor=flt;k_.AnthropicMessagesProcessor=flt=Sga([dsi(3,fsi.ILogService),dsi(4,psi.ITelemetryService)],flt)});var Csi=T(s2e=>{"use strict";f();Object.defineProperty(s2e,"__esModule",{value:!0});s2e.CompactionDataContainer=void 0;s2e.rawPartAsCompactionData=Bga;var Oga=po(),Esi=yRe(),K0r=class extends Oga.PromptElement{static{a(this,"CompactionDataContainer")}render(){let{compaction:e}=this.props,r={type:Esi.CustomDataPartMimeTypes.ContextManagement,compaction:e};return vscpp("opaque",{value:r})}};s2e.CompactionDataContainer=K0r;function Bga(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===Esi.CustomDataPartMimeTypes.ContextManagement&&r.compaction&&typeof r.compaction=="object")return r.compaction}a(Bga,"rawPartAsCompactionData")});var vsi=T(a2e=>{"use strict";f();Object.defineProperty(a2e,"__esModule",{value:!0});a2e.PhaseDataContainer=void 0;a2e.rawPartAsPhaseData=Fga;var Lga=po(),_si=yRe(),J0r=class extends Lga.PromptElement{static{a(this,"PhaseDataContainer")}render(){let{phase:e}=this.props,r={type:_si.CustomDataPartMimeTypes.PhaseData,phase:e};return vscpp("opaque",{value:r})}};a2e.PhaseDataContainer=J0r;function Fga(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===_si.CustomDataPartMimeTypes.PhaseData&&typeof r.phase=="string")return r.phase}a(Fga,"rawPartAsPhaseData")});var Isi=T(h3=>{"use strict";f();Object.defineProperty(h3,"__esModule",{value:!0});h3.StatefulMarkerContainer=void 0;h3.rawPartAsStatefulMarker=Tsi;h3.encodeStatefulMarker=Uga;h3.decodeStatefulMarker=Qga;h3.getAllStatefulMarkersAndIndicies=Ssi;h3.getStatefulMarkerAndIndex=qga;var X0r=po(),bsi=yRe(),Z0r=class extends X0r.PromptElement{static{a(this,"StatefulMarkerContainer")}render(){let{statefulMarker:e}=this.props,r={type:bsi.CustomDataPartMimeTypes.StatefulMarker,value:e};return vscpp("opaque",{value:r})}};h3.StatefulMarkerContainer=Z0r;function Tsi(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===bsi.CustomDataPartMimeTypes.StatefulMarker&&typeof r.value=="object")return r.value}a(Tsi,"rawPartAsStatefulMarker");function Uga(t,e){return new TextEncoder().encode(t+"\\"+e)}a(Uga,"encodeStatefulMarker");function Qga(t){let e=new TextDecoder().decode(t),[r,n]=e.split("\\");return{modelId:r,marker:n}}a(Qga,"decodeStatefulMarker");function*Ssi(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r.role===X0r.Raw.ChatRole.Assistant){for(let n of r.content)if(n.type===X0r.Raw.ChatCompletionContentPartKind.Opaque){let o=Tsi(n);o&&(yield{statefulMarker:o,index:e})}}}}a(Ssi,"getAllStatefulMarkersAndIndicies");function qga(t,e){for(let r of Ssi(e))if(r.statefulMarker.modelId===t)return{statefulMarker:r.statefulMarker.marker,index:r.index}}a(qga,"getStatefulMarkerAndIndex")});var rpr=T(MQ=>{"use strict";f();Object.defineProperty(MQ,"__esModule",{value:!0});MQ.OpenAIResponsesProcessor=void 0;MQ.createResponsesRequestBody=Zga;MQ.responseApiInputToRawMessagesForLogging=sAa;MQ.processResponseFromChatEndpoint=dAa;MQ.sendCompletionOutputTelemetry=Psi;var da=po(),tpr=jc(),Gga=wc(),Hga=BU(),jga=IO(),$ga=V0r(),DQ=sv(),Vga=Np(),c2e=fc(),NJ=i3(),Wga=r2e(),zga=gd(),Yga=alt(),Rsi=Csi(),Kga=vsi(),Jga=Isi(),Xga=ldr();function Zga(t,e,r,n){let o=t.get(c2e.IConfigurationService),s=t.get(zga.IExperimentationService),c=(0,Yga.getVerbosityForModelSync)(n),l={model:r,...eAa(r,e.messages,!!e.ignoreStatefulMarker),stream:!0,tools:e.requestOptions?.tools?.map(A=>({...A.function,type:"function",strict:!1,parameters:A.function.parameters||{}})),max_output_tokens:e.postOptions.max_tokens,tool_choice:typeof e.postOptions.tool_choice=="object"?{type:"function",name:e.postOptions.tool_choice.function.name}:e.postOptions.tool_choice,top_logprobs:e.postOptions.logprobs?3:void 0,store:!1,text:c?{verbosity:c}:void 0};if(o.getExperimentBasedConfig(c2e.ConfigKey.ResponsesApiContextManagementEnabled,s)&&!NJ.modelsWithoutResponsesContextManagement.has(n.family)){let A=n.modelMaxPromptTokens>0?Math.floor(n.modelMaxPromptTokens*.9):5e4;l.context_management=[{type:NJ.openAIContextManagementCompactionType,compact_threshold:A}]}l.truncation=o.getConfig(c2e.ConfigKey.Advanced.UseResponsesApiTruncation)?"auto":"disabled";let d=o.getExperimentBasedConfig(c2e.ConfigKey.ResponsesApiReasoningSummary,s),p=n.family==="gpt-5.3-codex-spark-preview",h=e.reasoningEffort||"medium",m=d==="off"||p?void 0:d;return(h||m)&&(l.reasoning={...h?{effort:h}:{},...m?{summary:m}:{}}),l.include=["reasoning.encrypted_content"],o.getExperimentBasedConfig(c2e.ConfigKey.ResponsesApiPromptCacheKeyEnabled,s)&&e.conversationId&&(l.prompt_cache_key=`${e.conversationId}:${n.family}`),l}a(Zga,"createResponsesRequestBody");function eAa(t,e,r){let n=tAa(e);n!==void 0&&(e=e.slice(n));let o=!r&&(0,Jga.getStatefulMarkerAndIndex)(t,e),s;n===void 0&&o&&(s=o.statefulMarker,e=e.slice(o.index+1));let c=[];for(let l of e)switch(l.role){case da.Raw.ChatRole.Assistant:if(l.content.length){c.push(...oAa(l.content)),c.push(...nAa(l.content));let u=l.content.map(rAa).filter(DQ.isDefined);if(u.length){let d={role:"assistant",content:u,id:"msg_123",status:"completed",type:"message",phase:iAa(l.content)};c.push(d)}}if(l.toolCalls)for(let u of l.toolCalls)c.push({type:"function_call",name:u.function.name,arguments:u.function.arguments,call_id:u.id});break;case da.Raw.ChatRole.Tool:if(l.toolCallId){let u=l.content.filter(p=>p.type===da.Raw.ChatCompletionContentPartKind.Text).map(p=>p.text).join(""),d=l.content.filter(p=>p.type===da.Raw.ChatCompletionContentPartKind.Image).map(p=>({type:"input_image",detail:p.imageUrl.detail||"auto",image_url:p.imageUrl.url}));c.push({type:"function_call_output",call_id:l.toolCallId,output:u}),d.length&&c.push({role:"user",content:[{type:"input_text",text:"Image associated with the above tool call:"},...d]})}break;case da.Raw.ChatRole.User:c.push({role:"user",content:l.content.map(xsi).filter(DQ.isDefined)});break;case da.Raw.ChatRole.System:c.push({role:"system",content:l.content.map(xsi).filter(DQ.isDefined)});break}return{input:c,previous_response_id:s}}a(eAa,"rawMessagesToResponseAPI");function tAa(t){for(let e=t.length-1;e>=0;e--){let r=t[e];for(let n of r.content)if(n.type===da.Raw.ChatCompletionContentPartKind.Opaque&&(0,Rsi.rawPartAsCompactionData)(n))return e}}a(tAa,"getLatestCompactionMessageIndex");function xsi(t){switch(t.type){case da.Raw.ChatCompletionContentPartKind.Text:return{type:"input_text",text:t.text};case da.Raw.ChatCompletionContentPartKind.Image:return{type:"input_image",detail:t.imageUrl.detail||"auto",image_url:t.imageUrl.url};case da.Raw.ChatCompletionContentPartKind.Opaque:{let e=t.value;if(e.type==="input_text"||e.type==="input_image"||e.type==="input_file")return e}}}a(xsi,"rawContentToResponsesContent");function rAa(t){switch(t.type){case da.Raw.ChatCompletionContentPartKind.Text:if(t.text.trim())return{type:"output_text",text:t.text,annotations:[]}}}a(rAa,"rawContentToResponsesOutputContent");function nAa(t){return(0,tpr.coalesce)(t.map(e=>{if(e.type===da.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,Xga.rawPartAsThinkingData)(e);if(r)return{type:"reasoning",id:r.id,summary:[],encrypted_content:r.encrypted}}}))}a(nAa,"extractThinkingData");function iAa(t){for(let e of t)if(e.type===da.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,Kga.rawPartAsPhaseData)(e);if(r)return r}}a(iAa,"extractPhaseData");function oAa(t){return(0,tpr.coalesce)(t.map(e=>{if(e.type===da.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,Rsi.rawPartAsCompactionData)(e);if(r)return{type:NJ.openAIContextManagementCompactionType,id:r.id,encrypted_content:r.encrypted_content}}}))}a(oAa,"extractCompactionData");function sAa(t){let e=[],r=[],n=a(()=>{r.length>0&&e.push({role:da.Raw.ChatRole.Assistant,content:[],toolCalls:r.splice(0)})},"flushPendingFunctionCalls");t.instructions&&e.push({role:da.Raw.ChatRole.System,content:[{type:da.Raw.ChatCompletionContentPartKind.Text,text:t.instructions}]});let o=typeof t.input=="string"?[{role:"user",content:t.input,type:"message"}]:t.input??[];for(let s of o)if("role"in s)switch(s.role){case"user":n(),e.push({role:da.Raw.ChatRole.User,content:epr(s.content).map(plt).filter(DQ.isDefined)});break;case"system":case"developer":n(),e.push({role:da.Raw.ChatRole.System,content:epr(s.content).map(plt).filter(DQ.isDefined)});break;case"assistant":n(),aAa(s)?e.push({role:da.Raw.ChatRole.Assistant,content:s.content.map(lAa).filter(DQ.isDefined)}):cAa(s)&&e.push({role:da.Raw.ChatRole.Assistant,content:epr(s.content).map(plt).filter(DQ.isDefined)});break}else if("type"in s)switch(s.type){case"function_call":r.push({id:s.call_id,type:"function",function:{name:s.name,arguments:s.arguments}});break;case"function_call_output":{n();let c=uAa(s.output);e.push({role:da.Raw.ChatRole.Tool,content:c,toolCallId:s.call_id});break}case"reasoning":n(),e.push({role:da.Raw.ChatRole.Assistant,content:[{type:da.Raw.ChatCompletionContentPartKind.Text,text:`Reasoning summary: ${s.summary.map(c=>c.text).join(` +`)&&(this.dataBuffer=this.dataBuffer.substring(0,this.dataBuffer.length-1));let e={type:this.eventTypeBuffer||"message",data:this.dataBuffer};this.currentEventId!==void 0&&(e.id=this.currentEventId),this.reconnectionTime!==void 0&&(e.retry=this.reconnectionTime),this.onEventHandler(e),this.reset()}reset(){this.dataBuffer="",this.eventTypeBuffer="",this.currentEventId=void 0}};gct.SSEParser=dpr});var lai=T(Act=>{"use strict";f();Object.defineProperty(Act,"__esModule",{value:!0});Act.IToolDeferralService=void 0;var Sya=qr();Act.IToolDeferralService=(0,Sya.createServiceIdentifier)("IToolDeferralService")});var Aai=T(EC=>{"use strict";f();var Iya=EC&&EC.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},uai=EC&&EC.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(EC,"__esModule",{value:!0});EC.AnthropicMessagesProcessor=void 0;EC.buildToolInputSchema=pai;EC.createMessagesRequestBody=Dya;EC.rawMessagesToMessagesAPI=hai;EC.addToolsAndSystemCacheControl=gai;EC.processResponseFromMessagesEndpoint=Oya;var zR=co(),xya=vc(),wya=fpr(),mpr=Ip(),ppr=QD(),hpr=ac(),dai=D0(),YB=Xat(),Ect=QB(),Rya=lai(),Pya=Zwe(),kya=cd(),fai=bp();function pai(t){if(!t)return{type:"object",properties:{}};let{$schema:e,...r}=t;return{type:"object",properties:{},...r}}a(pai,"buildToolInputSchema");function Dya(t,e,r,n){let o=t.get(hpr.IConfigurationService),s=t.get(kya.IExperimentationService),c=t.get(Rya.IToolDeferralService),l=(0,YB.isAnthropicToolSearchEnabled)(n,o),u=(0,YB.isAnthropicCustomToolSearchEnabled)(n,o,s),d=e.location===ppr.ChatLocation.Agent||e.location===ppr.ChatLocation.MessagesProxy,p=e.telemetryProperties?.subType?.startsWith("subagent")??!1,h=[],m=[];if(e.requestOptions?.tools)for(let P of e.requestOptions.tools){if(!P.function.name||P.function.name.length===0)continue;let k=l&&d&&!p&&!c.isNonDeferredTool(P.function.name),Q={name:P.function.name,description:P.function.description||"",input_schema:pai(P.function.parameters),...k?{defer_loading:!0}:{}};(k?m:h).push(Q)}let g=[];d&&!p&&l&&!u&&g.push({name:YB.TOOL_SEARCH_TOOL_NAME,type:YB.TOOL_SEARCH_TOOL_TYPE,defer_loading:!1}),g.push(...h,...m);let A=e.reasoningEffort,y;if(e.enableThinking){let P=o.getConfig(hpr.ConfigKey.AnthropicThinkingBudget),k=P===0,Q=o.getExperimentBasedConfig(hpr.ConfigKey.AnthropicForceExtendedThinking,s);if(n.supportsAdaptiveThinking&&!k&&!Q)y={type:"adaptive"};else if(!k&&n.maxThinkingBudget&&n.minThinkingBudget){let M=e.postOptions.max_tokens??1024,N=n.minThinkingBudget??1024,G=P&&P>0?P0?new Set(g.map(P=>P.name)):void 0,w=hai(e.messages,u?x:void 0);gai(g,w);let R=w.messages.at(-1);return R&&R.role==="assistant"&&(b.warn(`[messagesAPI] Trailing assistant message detected \u2014 appending synthetic user message to prevent prefill error. Total messages: ${w.messages.length}`),I.sendMSFTTelemetryEvent("messagesApi.trailingAssistantGuard",{model:r,location:ppr.ChatLocation.toString(e.location)},{messageCount:w.messages.length}),w.messages.push({role:"user",content:[{type:"text",text:"Please continue."}]})),{model:r,...w,stream:!0,tools:g.length>0?g:void 0,top_p:e.postOptions.top_p,max_tokens:e.postOptions.max_tokens,thinking:y,..._?{output_config:{effort:_}}:{},...v?{context_management:v}:{}}}a(Dya,"createMessagesRequestBody");function hai(t,e){let r=[],n=[],o=new Map;for(let c of t)switch(c.role){case zR.Raw.ChatRole.System:{n.push(...yct(c.content).filter(l=>l.type==="text"));break}case zR.Raw.ChatRole.User:{let l=yct(c.content);l.length>0&&r.push({role:"user",content:l});break}case zR.Raw.ChatRole.Assistant:{let l=yct(c.content);if(c.toolCalls)for(let u of c.toolCalls){let d={};try{d=JSON.parse(u.function.arguments)}catch{}l.push({type:"tool_use",id:u.id,name:u.function.name,input:d}),o.set(u.id,u.function.name)}l.length>0&&r.push({role:"assistant",content:l});break}case zR.Raw.ChatRole.Tool:{if(c.toolCallId){let l=yct(c.content),u=!1;for(let g of l)mai(g)&&g.cache_control&&(u=!0,delete g.cache_control);let h=(e&&o.get(c.toolCallId)===YB.CUSTOM_TOOL_SEARCH_NAME?Nya(l,e):void 0)??l.filter(g=>(g.type==="text"||g.type==="image"||g.type==="document")&&!(g.type==="text"&&g.text.trim()==="")),m={type:"tool_result",tool_use_id:c.toolCallId,content:h.length>0?h:void 0};u&&(m.cache_control={type:"ephemeral"}),r.push({role:"user",content:[m]})}break}}let s=[];for(let c of r){let l=s[s.length-1];if(l&&l.role===c.role){let u=Array.isArray(l.content)?l.content:[{type:"text",text:l.content}],d=Array.isArray(c.content)?c.content:[{type:"text",text:c.content}];l.content=[...u,...d]}else s.push(c)}return{messages:s,...n.length?{system:n}:{}}}a(hai,"rawMessagesToMessagesAPI");function Nya(t,e){if(t.length!==1||t[0].type!=="text")return;let r;try{r=JSON.parse(t[0].text)}catch{return}if(Array.isArray(r))return r.filter(n=>typeof n=="string"&&(!e||e.has(n))).map(n=>({type:"tool_reference",tool_name:n}))}a(Nya,"tryParseToolReferences");function yct(t){let e=[];for(let r of t)switch(r.type){case zR.Raw.ChatCompletionContentPartKind.Text:r.text.trim()&&e.push({type:"text",text:r.text});break;case zR.Raw.ChatCompletionContentPartKind.Image:{let n=r.imageUrl.url,o=n.match(/^data:(image\/(?:jpeg|png|gif|webp));base64,(.+)$/);o?e.push({type:"image",source:{type:"base64",media_type:o[1],data:o[2]}}):n.startsWith("https://")&&e.push({type:"image",source:{type:"url",url:n}});break}case zR.Raw.ChatCompletionContentPartKind.CacheBreakpoint:{let n=e.at(-1);n&&mai(n)?n.cache_control={type:"ephemeral"}:e.push({type:"text",text:" ",cache_control:{type:"ephemeral"}});break}case zR.Raw.ChatCompletionContentPartKind.Document:{r.documentData.mediaType==="application/pdf"&&e.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:r.documentData.data}});break}case zR.Raw.ChatCompletionContentPartKind.Opaque:{if(r.value&&typeof r.value=="object"&&"type"in r.value){let n=r.value;if(n.type==="thinking"&&n.thinking){let o=Array.isArray(n.thinking.text)?n.thinking.text.join(""):n.thinking.text;o&&n.thinking.encrypted?e.push({type:"thinking",thinking:o,signature:n.thinking.encrypted}):n.thinking.encrypted&&!o&&e.push({type:"redacted_thinking",data:n.thinking.encrypted})}}break}}return e}a(yct,"rawContentToAnthropicContent");function mai(t){return t.type!=="thinking"&&t.type!=="redacted_thinking"}a(mai,"contentBlockSupportsCacheControl");var Mya=4;function gai(t,e){let r=0;if(e.system)for(let c of e.system)c.cache_control&&r++;for(let c of e.messages)if(Array.isArray(c.content))for(let l of c.content)typeof l=="object"&&"cache_control"in l&&l.cache_control&&r++;let n=Mya-r;if(n<=0)return;let o;for(let c=t.length-1;c>=0;c--)if(!t[c].defer_loading){o=t[c];break}o&&n>0&&(o.cache_control={type:"ephemeral"},n--);let s=e.system?.at(-1);s&&!s.cache_control&&n>0&&(s.cache_control={type:"ephemeral"})}a(gai,"addToolsAndSystemCacheControl");async function Oya(t,e,r,n,o,s){return new xya.AsyncIterableObject(async c=>{let l=n.headers.get("X-Request-ID")??(0,mpr.generateUuid)(),u=n.headers.get("x-github-request-id")??"",d=t.createInstance(_ct,s,l,u),p=new wya.SSEParser(h=>{try{r.trace(`[messagesAPI]SSE: ${h.data}`);let m=h.data?.trim();if(!m||m==="[DONE]")return;let g=JSON.parse(m),A=g.type??h.type;if(!A)return;let y=d.push({...g,type:A},o);if(y){r.info(`[messagesAPI] message ${y.choiceIndex} returned. finish reason: [${y.finishReason}]`);let E=s.extendedBy({completionChoiceFinishReason:y.finishReason,headerRequestId:y.requestId.headerRequestId});e.sendGHTelemetryEvent("completion.finishReason",E.properties,E.measurements);let _=(0,Ect.rawMessageToCAPI)(y.message),v=s;y.usage&&(v=s.extendedBy({},{promptTokens:y.usage.prompt_tokens,completionTokens:y.usage.completion_tokens,totalTokens:y.usage.total_tokens})),(0,Pya.sendEngineMessagesTelemetry)(e,[_],v,!0,r),c.emitOne(y)}}catch(m){c.reject(m)}});for await(let h of n.body)p.feed(h)},async()=>{await n.body.destroy()})}a(Oya,"processResponseFromMessagesEndpoint");var _ct=class{static{a(this,"AnthropicMessagesProcessor")}constructor(e,r,n,o,s){this.telemetryData=e,this.requestId=r,this.ghRequestId=n,this.logService=o,this.telemetryService=s,this.textAccumulator="",this.toolCallAccumulator=new Map,this.serverToolCallAccumulator=new Map,this.completedServerToolCalls=new Map,this.thinkingAccumulator=new Map,this.completedToolCalls=[],this.messageId="",this.model="",this.inputTokens=0,this.outputTokens=0,this.cacheCreationTokens=0,this.cacheReadTokens=0,this.toolSearchRequests=0}extractIPCodeCitations(e){if(!e?.IPCodeCitations?.length)return[];let r=new Set,n=[];for(let o of e.IPCodeCitations){let s=o.citations;if(!s)continue;let{url:c,license:l,snippet:u}=s;typeof c!="string"||c.trim()===""||typeof l!="string"||l.trim()===""||typeof u!="string"||u.trim()===""||r.has(c)||(r.add(c),n.push({citations:{url:c,license:l,snippet:u}}))}return n.length>0&&this.logService.trace(`[messagesAPI] IP code citations found: ${n.length} unique citations`),n}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,0,o)},"onProgress");switch(e.type){case"message_start":e.message&&(this.messageId=e.message.id,this.model=e.message.model,this.inputTokens=e.message.usage.input_tokens??0,this.outputTokens=e.message.usage.output_tokens??0,this.cacheCreationTokens=e.message.usage.cache_creation_input_tokens??0,this.cacheReadTokens=e.message.usage.cache_read_input_tokens??0,e.message.usage.server_tool_use?.tool_search_requests&&(this.toolSearchRequests=e.message.usage.server_tool_use.tool_search_requests));return;case"content_block_start":if(e.content_block?.type==="tool_use"&&e.index!==void 0){let o=e.content_block.id||(0,mpr.generateUuid)();this.toolCallAccumulator.set(e.index,{id:o,name:e.content_block.name||"",arguments:""}),this.textAccumulator.length&&n({text:" "}),n({text:"",beginToolCalls:[{name:e.content_block.name||"",id:o}]})}else if(e.content_block?.type==="server_tool_use"&&e.index!==void 0){let o=e.content_block,s=o.id||(0,mpr.generateUuid)();this.serverToolCallAccumulator.set(e.index,{id:s,name:o.name||"",arguments:""})}else if(e.content_block?.type==="tool_search_tool_result"&&e.index!==void 0){let o=e.content_block;if(o.content.type==="tool_search_tool_search_result"){let s=o.content.tool_references,c=s.map(d=>d.tool_name);this.logService.trace(`[messagesAPI] Tool search discovered ${c.length} tools: ${c.join(", ")}`),this.telemetryService.sendMSFTTelemetryEvent("toolSearchToolInvoked",{requestId:this.requestId,interactionId:this.requestId,validateOutcome:"unknown",invokeOutcome:"success",toolName:YB.TOOL_SEARCH_TOOL_NAME,model:this.model},{discoveredToolCount:c.length});let l=this.completedServerToolCalls.get(o.tool_use_id);this.completedServerToolCalls.delete(o.tool_use_id);let u;if(l?.arguments)try{u=JSON.parse(l.arguments)}catch{u=l.arguments}return n({text:"",serverToolCalls:[{id:o.tool_use_id,name:l?.name??"tool_search_tool_regex",args:u,isServer:!0,result:{tool_references:s}}]})}else if(o.content.type==="tool_search_tool_result_error"){this.logService.warn(`[messagesAPI] Tool search error: ${o.content.error_code}`),this.telemetryService.sendMSFTTelemetryEvent("toolSearchToolInvoked",{requestId:this.requestId,interactionId:this.requestId,validateOutcome:"unknown",invokeOutcome:"error",toolName:YB.TOOL_SEARCH_TOOL_NAME,model:this.model,errorCode:o.content.error_code},{discoveredToolCount:0});let s=this.completedServerToolCalls.get(o.tool_use_id);this.completedServerToolCalls.delete(o.tool_use_id);let c;if(s?.arguments)try{c=JSON.parse(s.arguments)}catch{c=s.arguments}return n({text:"",serverToolCalls:[{id:o.tool_use_id,name:s?.name??"tool_search_tool_regex",args:c,isServer:!0,result:{error:o.content.error_code}}]}),n({text:"",copilotErrors:[{agent:"anthropic",code:o.content.error_code,message:`Tool search error: ${o.content.error_code}`,type:"error",identifier:void 0}]})}}else if(e.content_block?.type==="thinking"&&e.index!==void 0)this.thinkingAccumulator.set(e.index,{thinking:"",signature:""});else if(e.content_block?.type==="redacted_thinking"&&e.index!==void 0){let o=e.content_block.data;n({text:"",thinking:{id:`thinking_${e.index}`,encrypted:o}})}return;case"content_block_delta":if(e.delta){if(e.delta.type==="text_delta"&&e.delta.text){let o=this.extractIPCodeCitations(e.copilot_annotations);return o.length>0?n({text:e.delta.text,ipCitations:o}):n({text:e.delta.text})}else if(e.delta.type==="thinking_delta"&&e.delta.thinking&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);return o&&(o.thinking+=e.delta.thinking),n({text:"",thinking:{id:`thinking_${e.index}`,text:e.delta.thinking}})}else if(e.delta.type==="signature_delta"&&e.delta.signature&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.signature+=e.delta.signature)}else if(e.delta.type==="input_json_delta"&&e.delta.partial_json&&e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(o.arguments+=e.delta.partial_json,n({text:"",copilotToolCallStreamUpdates:[{id:o.id,name:o.name,arguments:o.arguments}]}));let s=this.serverToolCallAccumulator.get(e.index);s&&(s.arguments+=e.delta.partial_json)}}return;case"content_block_stop":if(e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(this.completedToolCalls.push(o),n({text:"",copilotToolCalls:[{id:o.id,name:o.name,arguments:o.arguments}]}),this.toolCallAccumulator.delete(e.index));let s=this.serverToolCallAccumulator.get(e.index);s&&(this.completedServerToolCalls.set(s.id,s),this.serverToolCallAccumulator.delete(e.index));let c=this.thinkingAccumulator.get(e.index);c&&c.signature&&(n({text:"",thinking:{id:`thinking_${e.index}`,encrypted:c.signature}}),this.thinkingAccumulator.delete(e.index))}return;case"message_delta":if(e.usage&&(this.outputTokens=e.usage.output_tokens,this.inputTokens=e.usage.input_tokens??this.inputTokens,this.cacheCreationTokens=e.usage.cache_creation_input_tokens??this.cacheCreationTokens,this.cacheReadTokens=e.usage.cache_read_input_tokens??this.cacheReadTokens,e.usage.server_tool_use?.tool_search_requests&&(this.toolSearchRequests=e.usage.server_tool_use.tool_search_requests)),e.context_management)return this.contextManagementResponse=e.context_management,n({text:"",contextManagement:e.context_management});e.delta?.stop_reason&&(this.stopReason=e.delta.stop_reason);return;case"message_stop":{if(this.contextManagementResponse){let c=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_input_tokens||0),0),l=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_tool_uses||0),0),u=this.contextManagementResponse.applied_edits.reduce((d,p)=>d+(p.cleared_thinking_turns||0),0);this.logService.trace(`[messagesAPI] Anthropic context editing applied: cleared ${c} tokens, ${l} tool uses.`),this.telemetryService.sendMSFTTelemetryEvent("contextEditingApplied",{requestId:this.requestId,interactionId:this.requestId,model:this.model},{clearedTokens:c,clearedToolUses:l,clearedThinkingTurns:u})}this.toolSearchRequests>0&&(this.logService.trace(`[messagesAPI] Anthropic tool search requests: ${this.toolSearchRequests}.`),this.telemetryData.extendedBy({toolSearchUsed:"true",toolSearchRequests:this.toolSearchRequests.toString()}));let o;switch(this.stopReason){case"refusal":o=Ect.FinishedCompletionReason.ClientDone;break;case"max_tokens":case"model_context_window_exceeded":o=Ect.FinishedCompletionReason.Length;break;default:o=Ect.FinishedCompletionReason.Stop;break}let s=this.inputTokens+this.cacheCreationTokens+this.cacheReadTokens;return s0?{toolCalls:this.completedToolCalls.map(c=>({id:c.id,type:"function",function:{name:c.name,arguments:c.arguments}}))}:{}}}}case"error":{let o=e.error?.message||"Unknown error";return n({text:"",copilotErrors:[{agent:"anthropic",code:"unknown",message:o,type:"error",identifier:void 0}]})}}}};EC.AnthropicMessagesProcessor=_ct;EC.AnthropicMessagesProcessor=_ct=Iya([uai(3,dai.ILogService),uai(4,fai.ITelemetryService)],_ct)});var Eai=T(nRe=>{"use strict";f();Object.defineProperty(nRe,"__esModule",{value:!0});nRe.CompactionDataContainer=void 0;nRe.rawPartAsCompactionData=Lya;var Bya=co(),yai=mwe(),gpr=class extends Bya.PromptElement{static{a(this,"CompactionDataContainer")}render(){let{compaction:e}=this.props,r={type:yai.CustomDataPartMimeTypes.ContextManagement,compaction:e};return vscpp("opaque",{value:r})}};nRe.CompactionDataContainer=gpr;function Lya(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===yai.CustomDataPartMimeTypes.ContextManagement&&r.compaction&&typeof r.compaction=="object")return r.compaction}a(Lya,"rawPartAsCompactionData")});var Cai=T(iRe=>{"use strict";f();Object.defineProperty(iRe,"__esModule",{value:!0});iRe.PhaseDataContainer=void 0;iRe.rawPartAsPhaseData=Uya;var Fya=co(),_ai=mwe(),Apr=class extends Fya.PromptElement{static{a(this,"PhaseDataContainer")}render(){let{phase:e}=this.props,r={type:_ai.CustomDataPartMimeTypes.PhaseData,phase:e};return vscpp("opaque",{value:r})}};iRe.PhaseDataContainer=Apr;function Uya(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===_ai.CustomDataPartMimeTypes.PhaseData&&typeof r.phase=="string")return r.phase}a(Uya,"rawPartAsPhaseData")});var Sai=T(KB=>{"use strict";f();Object.defineProperty(KB,"__esModule",{value:!0});KB.StatefulMarkerContainer=void 0;KB.rawPartAsStatefulMarker=bai;KB.encodeStatefulMarker=Qya;KB.decodeStatefulMarker=qya;KB.getAllStatefulMarkersAndIndicies=Tai;KB.getStatefulMarkerAndIndex=Gya;var ypr=co(),vai=mwe(),Epr=class extends ypr.PromptElement{static{a(this,"StatefulMarkerContainer")}render(){let{statefulMarker:e}=this.props,r={type:vai.CustomDataPartMimeTypes.StatefulMarker,value:e};return vscpp("opaque",{value:r})}};KB.StatefulMarkerContainer=Epr;function bai(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===vai.CustomDataPartMimeTypes.StatefulMarker&&typeof r.value=="object")return r.value}a(bai,"rawPartAsStatefulMarker");function Qya(t,e){return new TextEncoder().encode(t+"\\"+e)}a(Qya,"encodeStatefulMarker");function qya(t){let e=new TextDecoder().decode(t),[r,n]=e.split("\\");return{modelId:r,marker:n}}a(qya,"decodeStatefulMarker");function*Tai(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r.role===ypr.Raw.ChatRole.Assistant){for(let n of r.content)if(n.type===ypr.Raw.ChatCompletionContentPartKind.Opaque){let o=bai(n);o&&(yield{statefulMarker:o,index:e})}}}}a(Tai,"getAllStatefulMarkersAndIndicies");function Gya(t,e){for(let r of Tai(e))if(r.statefulMarker.modelId===t)return{statefulMarker:r.statefulMarker.marker,index:r.index}}a(Gya,"getStatefulMarkerAndIndex")});var vpr=T(aQ=>{"use strict";f();Object.defineProperty(aQ,"__esModule",{value:!0});aQ.OpenAIResponsesProcessor=void 0;aQ.createResponsesRequestBody=eEa;aQ.responseApiInputToRawMessagesForLogging=aEa;aQ.processResponseFromChatEndpoint=fEa;aQ.sendCompletionOutputTelemetry=Rai;var oa=co(),Cpr=Lc(),Hya=vc(),jya=lU(),$ya=c4(),Vya=fpr(),sQ=W1(),Wya=Ip(),oRe=ac(),UK=QB(),zya=Zwe(),Yya=cd(),Kya=mct(),wai=Eai(),Jya=Cai(),Xya=Sai(),Zya=Rdr();function eEa(t,e,r,n){let o=t.get(oRe.IConfigurationService),s=t.get(Yya.IExperimentationService),c=(0,Kya.getVerbosityForModelSync)(n),l={model:r,...tEa(r,e.messages,!!e.ignoreStatefulMarker),stream:!0,tools:e.requestOptions?.tools?.map(A=>({...A.function,type:"function",strict:!1,parameters:A.function.parameters||{}})),max_output_tokens:e.postOptions.max_tokens,tool_choice:typeof e.postOptions.tool_choice=="object"?{type:"function",name:e.postOptions.tool_choice.function.name}:e.postOptions.tool_choice,top_logprobs:e.postOptions.logprobs?3:void 0,store:!1,text:c?{verbosity:c}:void 0};if(o.getExperimentBasedConfig(oRe.ConfigKey.ResponsesApiContextManagementEnabled,s)&&!UK.modelsWithoutResponsesContextManagement.has(n.family)){let A=n.modelMaxPromptTokens>0?Math.floor(n.modelMaxPromptTokens*.9):5e4;l.context_management=[{type:UK.openAIContextManagementCompactionType,compact_threshold:A}]}l.truncation=o.getConfig(oRe.ConfigKey.Advanced.UseResponsesApiTruncation)?"auto":"disabled";let d=o.getExperimentBasedConfig(oRe.ConfigKey.ResponsesApiReasoningSummary,s),p=n.family==="gpt-5.3-codex-spark-preview",h=e.reasoningEffort||"medium",m=d==="off"||p?void 0:d;return(h||m)&&(l.reasoning={...h?{effort:h}:{},...m?{summary:m}:{}}),l.include=["reasoning.encrypted_content"],o.getExperimentBasedConfig(oRe.ConfigKey.ResponsesApiPromptCacheKeyEnabled,s)&&e.conversationId&&(l.prompt_cache_key=`${e.conversationId}:${n.family}`),l}a(eEa,"createResponsesRequestBody");function tEa(t,e,r){let n=rEa(e);n!==void 0&&(e=e.slice(n));let o=!r&&(0,Xya.getStatefulMarkerAndIndex)(t,e),s;n===void 0&&o&&(s=o.statefulMarker,e=e.slice(o.index+1));let c=[];for(let l of e)switch(l.role){case oa.Raw.ChatRole.Assistant:if(l.content.length){c.push(...sEa(l.content)),c.push(...iEa(l.content));let u=l.content.map(nEa).filter(sQ.isDefined);if(u.length){let d={role:"assistant",content:u,id:"msg_123",status:"completed",type:"message",phase:oEa(l.content)};c.push(d)}}if(l.toolCalls)for(let u of l.toolCalls)c.push({type:"function_call",name:u.function.name,arguments:u.function.arguments,call_id:u.id});break;case oa.Raw.ChatRole.Tool:if(l.toolCallId){let u=l.content.filter(p=>p.type===oa.Raw.ChatCompletionContentPartKind.Text).map(p=>p.text).join(""),d=l.content.filter(p=>p.type===oa.Raw.ChatCompletionContentPartKind.Image).map(p=>({type:"input_image",detail:p.imageUrl.detail||"auto",image_url:p.imageUrl.url}));c.push({type:"function_call_output",call_id:l.toolCallId,output:u}),d.length&&c.push({role:"user",content:[{type:"input_text",text:"Image associated with the above tool call:"},...d]})}break;case oa.Raw.ChatRole.User:c.push({role:"user",content:l.content.map(Iai).filter(sQ.isDefined)});break;case oa.Raw.ChatRole.System:c.push({role:"system",content:l.content.map(Iai).filter(sQ.isDefined)});break}return{input:c,previous_response_id:s}}a(tEa,"rawMessagesToResponseAPI");function rEa(t){for(let e=t.length-1;e>=0;e--){let r=t[e];for(let n of r.content)if(n.type===oa.Raw.ChatCompletionContentPartKind.Opaque&&(0,wai.rawPartAsCompactionData)(n))return e}}a(rEa,"getLatestCompactionMessageIndex");function Iai(t){switch(t.type){case oa.Raw.ChatCompletionContentPartKind.Text:return{type:"input_text",text:t.text};case oa.Raw.ChatCompletionContentPartKind.Image:return{type:"input_image",detail:t.imageUrl.detail||"auto",image_url:t.imageUrl.url};case oa.Raw.ChatCompletionContentPartKind.Opaque:{let e=t.value;if(e.type==="input_text"||e.type==="input_image"||e.type==="input_file")return e}}}a(Iai,"rawContentToResponsesContent");function nEa(t){switch(t.type){case oa.Raw.ChatCompletionContentPartKind.Text:if(t.text.trim())return{type:"output_text",text:t.text,annotations:[]}}}a(nEa,"rawContentToResponsesOutputContent");function iEa(t){return(0,Cpr.coalesce)(t.map(e=>{if(e.type===oa.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,Zya.rawPartAsThinkingData)(e);if(r)return{type:"reasoning",id:r.id,summary:[],encrypted_content:r.encrypted}}}))}a(iEa,"extractThinkingData");function oEa(t){for(let e of t)if(e.type===oa.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,Jya.rawPartAsPhaseData)(e);if(r)return r}}a(oEa,"extractPhaseData");function sEa(t){return(0,Cpr.coalesce)(t.map(e=>{if(e.type===oa.Raw.ChatCompletionContentPartKind.Opaque){let r=(0,wai.rawPartAsCompactionData)(e);if(r)return{type:UK.openAIContextManagementCompactionType,id:r.id,encrypted_content:r.encrypted_content}}}))}a(sEa,"extractCompactionData");function aEa(t){let e=[],r=[],n=a(()=>{r.length>0&&e.push({role:oa.Raw.ChatRole.Assistant,content:[],toolCalls:r.splice(0)})},"flushPendingFunctionCalls");t.instructions&&e.push({role:oa.Raw.ChatRole.System,content:[{type:oa.Raw.ChatCompletionContentPartKind.Text,text:t.instructions}]});let o=typeof t.input=="string"?[{role:"user",content:t.input,type:"message"}]:t.input??[];for(let s of o)if("role"in s)switch(s.role){case"user":n(),e.push({role:oa.Raw.ChatRole.User,content:_pr(s.content).map(Cct).filter(sQ.isDefined)});break;case"system":case"developer":n(),e.push({role:oa.Raw.ChatRole.System,content:_pr(s.content).map(Cct).filter(sQ.isDefined)});break;case"assistant":n(),cEa(s)?e.push({role:oa.Raw.ChatRole.Assistant,content:s.content.map(uEa).filter(sQ.isDefined)}):lEa(s)&&e.push({role:oa.Raw.ChatRole.Assistant,content:_pr(s.content).map(Cct).filter(sQ.isDefined)});break}else if("type"in s)switch(s.type){case"function_call":r.push({id:s.call_id,type:"function",function:{name:s.name,arguments:s.arguments}});break;case"function_call_output":{n();let c=dEa(s.output);e.push({role:oa.Raw.ChatRole.Tool,content:c,toolCallId:s.call_id});break}case"reasoning":n(),e.push({role:oa.Raw.ChatRole.Assistant,content:[{type:oa.Raw.ChatCompletionContentPartKind.Text,text:`Reasoning summary: ${s.summary.map(c=>c.text).join(` -`)}`}]});break}return r.length>0&&e.push({role:da.Raw.ChatRole.Assistant,content:[],toolCalls:r.splice(0)}),e}a(sAa,"responseApiInputToRawMessagesForLogging");function aAa(t){return"role"in t&&t.role==="assistant"&&"type"in t&&t.type==="message"&&"content"in t&&Array.isArray(t.content)}a(aAa,"isResponseOutputMessage");function cAa(t){return"role"in t&&t.role==="assistant"&&(!("type"in t)||t.type!=="message")}a(cAa,"isResponseInputItemMessage");function epr(t){return typeof t=="string"?[{type:"input_text",text:t}]:t}a(epr,"ensureContentArray");function plt(t){switch(t.type){case"input_text":return{type:da.Raw.ChatCompletionContentPartKind.Text,text:t.text};case"input_image":return{type:da.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:t.image_url||"",detail:t.detail==="auto"?void 0:t.detail??void 0}};case"input_file":return{type:da.Raw.ChatCompletionContentPartKind.Opaque,value:`[File Input - Filename: ${t.filename||"unknown"}]`}}}a(plt,"responseContentToRawContent");function lAa(t){switch(t.type){case"output_text":return{type:da.Raw.ChatCompletionContentPartKind.Text,text:t.text};case"refusal":return{type:da.Raw.ChatCompletionContentPartKind.Text,text:`[Refusal: ${t.refusal}]`}}}a(lAa,"responseOutputToRawContent");function uAa(t){return typeof t=="string"?[{type:da.Raw.ChatCompletionContentPartKind.Text,text:t}]:(0,tpr.coalesce)(t.map(plt))}a(uAa,"responseFunctionOutputToRawContents");async function dAa(t,e,r,n,o,s,c){return new Gga.AsyncIterableObject(async l=>{let u=n.headers.get("X-Request-ID")??(0,Vga.generateUuid)(),d=n.headers.get("x-github-request-id")??"",p=t.createInstance(hlt,c,u,d),h=new $ga.SSEParser(m=>{try{r.trace(`SSE: ${m.data}`);let g=p.push({type:m.type,...JSON.parse(m.data)},s);g&&(Psi(e,r,g,c),l.emitOne(g))}catch(g){l.reject(g)}});for await(let m of n.body)h.feed(m)},async()=>{await n.body.destroy()})}a(dAa,"processResponseFromChatEndpoint");function Psi(t,e,r,n){let o=(0,NJ.rawMessageToCAPI)(r.message),s=n;r.usage&&(s=n.extendedBy({},{promptTokens:r.usage.prompt_tokens,completionTokens:r.usage.completion_tokens,totalTokens:r.usage.total_tokens})),(0,Wga.sendEngineMessagesTelemetry)(t,[o],s,!0,e)}a(Psi,"sendCompletionOutputTelemetry");var hlt=class{static{a(this,"OpenAIResponsesProcessor")}constructor(e,r,n){this.telemetryData=e,this.requestId=r,this.ghRequestId=n,this.textAccumulator="",this.hasReceivedReasoningSummary=!1,this.toolCallInfo=new Map}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,0,o)},"onProgress");switch(e.type){case"error":return n({text:"",copilotErrors:[{agent:"openai",code:e.code||"unknown",message:e.message,type:"error",identifier:e.param||void 0}]});case"response.output_text.delta":{let o=e,s=new jga.Lazy(()=>new TextEncoder().encode(o.delta));return n({text:o.delta,logprobs:o.logprobs&&{content:o.logprobs.map(c=>({...wsi(s,c),top_logprobs:c.top_logprobs?.map(l=>wsi(s,l))||[]}))}})}case"response.output_item.added":e.item.type==="function_call"&&(this.toolCallInfo.set(e.output_index,{name:e.item.name,callId:e.item.call_id,arguments:""}),n({text:"",beginToolCalls:[{name:e.item.name,id:e.item.call_id}]}));return;case"response.function_call_arguments.delta":{let o=this.toolCallInfo.get(e.output_index);o&&(o.arguments+=e.delta,n({text:"",copilotToolCallStreamUpdates:[{id:o.callId,name:o.name,arguments:o.arguments}]}));return}case"response.output_item.done":if(e.item.type.toString()===NJ.openAIContextManagementCompactionType){let o=e.item;return n({text:"",contextManagement:{type:NJ.openAIContextManagementCompactionType,id:o.id,encrypted_content:o.encrypted_content}})}e.item.type==="function_call"?(this.toolCallInfo.delete(e.output_index),n({text:"",copilotToolCalls:[{id:e.item.call_id,name:e.item.name,arguments:e.item.arguments}],phase:e.item.phase})):e.item.type==="reasoning"?n({text:"",thinking:e.item.encrypted_content?{id:e.item.id,text:this.hasReceivedReasoningSummary?void 0:e.item.summary.map(o=>o.text),encrypted:e.item.encrypted_content}:void 0}):e.item.type==="message"&&n({text:"",phase:e.item.phase});return;case"response.reasoning_summary_text.delta":return this.hasReceivedReasoningSummary=!0,n({text:"",thinking:{id:e.item_id,text:e.delta}});case"response.reasoning_summary_part.done":return this.hasReceivedReasoningSummary=!0,n({text:"",thinking:{id:e.item_id}});case"response.completed":return n({text:"",statefulMarker:e.response.id}),{blockFinished:!0,choiceIndex:0,model:e.response.model,tokens:[],telemetryData:this.telemetryData,requestId:{headerRequestId:this.requestId,gitHubRequestId:this.ghRequestId,completionId:e.response.id,created:e.response.created_at,deploymentId:"",serverExperiments:""},usage:{prompt_tokens:e.response.usage?.input_tokens??0,completion_tokens:e.response.usage?.output_tokens??0,total_tokens:e.response.usage?.total_tokens??0,prompt_tokens_details:{cached_tokens:e.response.usage?.input_tokens_details.cached_tokens??0},completion_tokens_details:{reasoning_tokens:e.response.usage?.output_tokens_details.reasoning_tokens??0,accepted_prediction_tokens:0,rejected_prediction_tokens:0}},finishReason:NJ.FinishedCompletionReason.Stop,message:{role:da.Raw.ChatRole.Assistant,content:e.response.output.map(o=>{if(o.type==="message")return{type:da.Raw.ChatCompletionContentPartKind.Text,text:o.content.map(s=>s.type==="output_text"?s.text:s.refusal).join("")};if(o.type==="image_generation_call"&&o.result)return{type:da.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:o.result}}}).filter(DQ.isDefined)}}}}};MQ.OpenAIResponsesProcessor=hlt;function wsi(t,e){let r=[];if(e.token){let n=new TextEncoder().encode(e.token),o=t.value,s=(0,Hga.binaryIndexOf)(o,n);s!==-1&&(r=[s,s+n.length])}return{token:e.token,bytes:r,logprob:e.logprob}}a(wsi,"mapLogProp")});var MJ=T(K0=>{"use strict";f();var fAa=K0&&K0.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pAa=K0&&K0.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Osi=K0&&K0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},hAa=K0&&K0.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{let h=p.reason??"client-trimmed",m=s.extendedBy({completionChoiceFinishReason:h,headerRequestId:p.requestId.headerRequestId});return t.sendGHTelemetryEvent("completion.finishReason",m.properties,m.measurements),(0,_Aa.prepareChatCompletionForReturn)(t,e,p,s)})}a(cpr,"defaultChatResponseProcessor");async function jsi(t,e,r){let n=await t.text(),o=JSON.parse(n),s=[];for(let c=0;c<(o?.choices?.length||0);c++){let l=o.choices[c],u={role:l.message.role,content:l.message.content,name:l.message.name,toolCalls:l.message.toolCalls??l.message.tool_calls},d=(0,yAa.getTextPart)(u.content),p=t.headers.get("X-Request-ID")??(0,gAa.generateUuid)(),h=t.headers.get("x-github-request-id")??"",m={blockFinished:!1,choiceIndex:c,model:o.model,filterReason:void 0,finishReason:l.finish_reason,message:u,usage:o.usage,tokens:[],requestId:{headerRequestId:p,gitHubRequestId:h,completionId:o.id,created:o.created,deploymentId:"",serverExperiments:""},telemetryData:r},g=[];for(let A of u.toolCalls??[])g.push({name:A.function?.name??"",arguments:A.function?.arguments??"",id:A.id??""});await e(d,c,{text:d,copilotToolCalls:g}),s.push(m)}return Bsi.AsyncIterableObject.fromArray(s)}a(jsi,"defaultNonStreamChatResponseProcessor");var mlt=spr=class{static{a(this,"ChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d){this.modelMetadata=e,this._domainService=r,this._chatMLFetcher=n,this._tokenizerProvider=o,this._instantiationService=s,this._configurationService=c,this._expService=l,this._chatWebSocketService=u,this._maxTokens=e.capabilities.limits?.max_prompt_tokens??8192,this._maxOutputTokens=e.capabilities.limits?.max_output_tokens??4096,this.model=e.id,this.modelProvider=e.vendor,this.name=e.name,this.version=e.version,this.family=e.capabilities.family,this.tokenizer=e.capabilities.tokenizer,this.showInModelPicker=e.model_picker_enabled,this.isPremium=e.billing?.is_premium,this.multiplier=e.billing?.multiplier,this.restrictedToSkus=e.billing?.restricted_to,this.isFallback=e.is_chat_fallback,this.supportsToolCalls=!!e.capabilities.supports.tool_calls,this.supportsVision=!!e.capabilities.supports.vision,this.supportsPrediction=!!e.capabilities.supports.prediction,this.supportsAdaptiveThinking=e.capabilities.supports.adaptive_thinking,this.minThinkingBudget=e.capabilities.supports.min_thinking_budget,this.maxThinkingBudget=e.capabilities.supports.max_thinking_budget,this.supportsReasoningEffort=e.capabilities.supports.reasoning_effort,this._supportsStreaming=!!e.capabilities.supports.streaming,this.customModel=e.custom_model,this.maxPromptImages=e.capabilities.limits?.vision?.max_prompt_images}getExtraHeaders(e){let r={...this.modelMetadata.requestHeaders};if((e===opr.ChatLocation.Agent||e===opr.ChatLocation.MessagesProxy)&&this.useMessagesApi){let o=this._configurationService.getConfig(DJ.ConfigKey.TeamInternal.ModelProviderPreference);o&&(r["X-Model-Provider-Preference"]=o);let s=[];(!this.supportsAdaptiveThinking||this._configurationService.getExperimentBasedConfig(DJ.ConfigKey.AnthropicForceExtendedThinking,this._expService))&&s.push("interleaved-thinking-2025-05-14"),(0,Nsi.isAnthropicContextEditingEnabled)(this.model,this._configurationService,this._expService)&&s.push("context-management-2025-06-27"),(0,Nsi.isAnthropicToolSearchEnabled)(this.model,this._configurationService)&&s.push("advanced-tool-use-2025-11-20"),s.length>0&&(r["anthropic-beta"]=s.join(","))}return r}get modelMaxPromptTokens(){return this._maxTokens}get maxOutputTokens(){return this._maxOutputTokens}get urlOrRequestMetadata(){return this.modelMetadata.urlOrRequestMetadata??(this.useResponsesApi?{type:npr.RequestType.ChatResponses}:this.useMessagesApi?{type:npr.RequestType.ChatMessages}:{type:npr.RequestType.ChatCompletions})}get useResponsesApi(){return this.modelMetadata.supported_endpoints&&!this.modelMetadata.supported_endpoints.includes(l2e.ModelSupportedEndpoint.ChatCompletions)&&this.modelMetadata.supported_endpoints.includes(l2e.ModelSupportedEndpoint.Responses)?!0:!!this.modelMetadata.supported_endpoints?.includes(l2e.ModelSupportedEndpoint.Responses)}get useWebSocketResponsesApi(){return!!this.modelMetadata.supported_endpoints?.includes(l2e.ModelSupportedEndpoint.WebSocketResponses)}get useMessagesApi(){return!!(this._configurationService.getExperimentBasedConfig(DJ.ConfigKey.UseAnthropicMessagesApi,this._expService)&&this.modelMetadata.supported_endpoints?.includes(l2e.ModelSupportedEndpoint.Messages))}get degradationReason(){return this.modelMetadata.warning_messages?.at(0)?.message??this.modelMetadata.info_messages?.at(0)?.message}get apiType(){return this.useResponsesApi?"responses":this.useMessagesApi?"messages":"chatCompletions"}interceptBody(e){if(e&&!this.supportsToolCalls&&delete e.tools,e&&!this._supportsStreaming&&(e.stream=!1),e?.messages&&(this.family.startsWith("o1")||this.model==="o1"||this.model==="o1-mini")){let r=e.messages.map(n=>n.role===ipr.OpenAI.ChatRole.System?{role:ipr.OpenAI.ChatRole.User,content:n.content}:n);e.messages=r}}createRequestBody(e){if((0,SAa.isGeminiFamily)(this)&&this.maxPromptImages!==void 0){let r=this.countImages(e.messages,this.maxPromptImages);if(r>this.maxPromptImages){let n=mAa.t("Too many images in request: {0} images provided, but the model supports a maximum of {1} images.",r,this.maxPromptImages);throw new Error(n)}}if(this.useResponsesApi){let r=this._instantiationService.invokeFunction(Msi.createResponsesRequestBody,e,this.model,this);return this.customizeResponsesBody(r)}else if(this.useMessagesApi){let r=this._instantiationService.invokeFunction(Dsi.createMessagesRequestBody,e,this.model,this);return this.customizeMessagesBody(r)}else{let r=(0,CAa.createCapiRequestBody)(e,this.model,this.getCompletionsCallback());return this.customizeCapiBody(r,e)}}countImages(e,r){let n=0;for(let o of e)if(Array.isArray(o.content)){for(let s of o.content)if(s.type===ipr.Raw.ChatCompletionContentPartKind.Image&&(n++,r!==void 0&&n>r))return n}return n}getCompletionsCallback(){}customizeMessagesBody(e){return e}customizeResponsesBody(e){return e}customizeCapiBody(e,r){if(!!r.requestOptions?.tools?.length&&this.family.toLowerCase().includes("gemini-3")){let o=this._configurationService.getExperimentBasedConfig(DJ.ConfigKey.TeamInternal.GeminiFunctionCallingMode,this._expService);o&&typeof e.tool_choice!="object"&&(e.tool_choice=o)}return e}async processResponseFromChatEndpoint(e,r,n,o,s,c,l){return this.useResponsesApi?(0,Msi.processResponseFromChatEndpoint)(this._instantiationService,e,r,n,o,s,c):this.useMessagesApi?(0,Dsi.processResponseFromMessagesEndpoint)(this._instantiationService,e,r,n,s,c):this._supportsStreaming?cpr(e,r,n,o,s,c,l):jsi(n,s,c)}acquireTokenizer(){return this._tokenizerProvider.acquireTokenizer(this)}async makeChatRequest2(e,r){let n=e.useWebSocket??!!(e.turnId&&e.conversationId&&this.useWebSocketResponsesApi&&this._configurationService.getExperimentBasedConfig(DJ.ConfigKey.TeamInternal.ResponsesApiWebSocketEnabled,this._expService)),o=e.ignoreStatefulMarker??!(n&&e.conversationId&&e.turnId&&this._chatWebSocketService.hasActiveConnection(e.conversationId,e.turnId)),s=await this._makeChatRequest2({...e,useWebSocket:n,ignoreStatefulMarker:o},r);return s.type===opr.ChatFetchResponseType.InvalidStatefulMarker?this._makeChatRequest2({...e,useWebSocket:n,ignoreStatefulMarker:!0},r):s}async _makeChatRequest2(e,r){return this._chatMLFetcher.fetchOne({requestOptions:{},...e,endpoint:this},r)}async makeChatRequest(e,r,n,o,s,c,l,u,d){return this.makeChatRequest2({debugName:e,messages:r,finishedCb:n,location:s,source:c,requestOptions:l,userInitiatedRequest:u,telemetryProperties:d},o)}cloneWithTokenOverride(e){return this._instantiationService.createInstance(spr,(0,ksi.mixin)((0,ksi.deepClone)(this.modelMetadata),{capabilities:{limits:{max_prompt_tokens:e}}}))}};K0.ChatEndpoint=mlt;K0.ChatEndpoint=mlt=spr=Osi([Y0(1,Hsi.IDomainService),Y0(2,Fsi.IChatMLFetcher),Y0(3,Gsi.ITokenizerProvider),Y0(4,Lsi.IInstantiationService),Y0(5,DJ.IConfigurationService),Y0(6,qsi.IExperimentationService),Y0(7,Qsi.IChatWebSocketManager),Y0(8,Usi.ILogService)],mlt);var apr=class extends mlt{static{a(this,"RemoteAgentChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A){super(e,n,u,d,p,h,m,g,A),this._requestMetadata=r}processResponseFromChatEndpoint(e,r,n,o,s,c,l,u){return cpr(e,r,n,2,s,c,l)}get urlOrRequestMetadata(){return this._requestMetadata}};K0.RemoteAgentChatEndpoint=apr;K0.RemoteAgentChatEndpoint=apr=Osi([Y0(2,Hsi.IDomainService),Y0(3,TAa.ICAPIClientService),Y0(4,EAa.IFetcherService),Y0(5,bAa.ITelemetryService),Y0(6,AAa.IAuthenticationService),Y0(7,Fsi.IChatMLFetcher),Y0(8,Gsi.ITokenizerProvider),Y0(9,Lsi.IInstantiationService),Y0(10,DJ.IConfigurationService),Y0(11,qsi.IExperimentationService),Y0(12,Qsi.IChatWebSocketManager),Y0(13,Usi.ILogService)],apr)});var $si=T(m3=>{"use strict";f();var IAa=m3&&m3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},fb=m3&&m3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(m3,"__esModule",{value:!0});m3.CopilotChatEndpoint=void 0;var xAa=Mo(),wAa=gA(),RAa=d3(),PAa=fc(),kAa=iR(),NAa=L0(),DAa=ig(),MAa=PQ(),OAa=gd(),BAa=Rp(),LAa=PJ(),FAa=eE(),UAa=NQ(),QAa=MJ(),lpr=class extends QAa.ChatEndpoint{static{a(this,"CopilotChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A){super(e,r,u,d,p,h,m,g,A)}getCompletionsCallback(){return(e,r)=>{r&&r.id&&(e.reasoning_opaque=r.id,e.reasoning_text=Array.isArray(r.text)?r.text.join(""):r.text)}}};m3.CopilotChatEndpoint=lpr;m3.CopilotChatEndpoint=lpr=IAa([fb(1,UAa.IDomainService),fb(2,FAa.ICAPIClientService),fb(3,DAa.IFetcherService),fb(4,kAa.IEnvService),fb(5,BAa.ITelemetryService),fb(6,wAa.IAuthenticationService),fb(7,RAa.IChatMLFetcher),fb(8,LAa.ITokenizerProvider),fb(9,xAa.IInstantiationService),fb(10,PAa.IConfigurationService),fb(11,OAa.IExperimentationService),fb(12,MAa.IChatWebSocketManager),fb(13,NAa.ILogService)],lpr)});var upr=T(o5=>{"use strict";f();var qAa=o5&&o5.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},pb=o5&&o5.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(o5,"__esModule",{value:!0});o5.AutoChatEndpoint=void 0;o5.isAutoModel=iya;var GAa=Mo(),HAa=gA(),jAa=d3(),$Aa=fc(),VAa=iR(),WAa=L0(),zAa=ig(),YAa=PQ(),KAa=gd(),JAa=Rp(),XAa=PJ(),ZAa=eE(),eya=NQ(),tya=MJ(),rya=$si(),u2e=class extends rya.CopilotChatEndpoint{static{a(this,"AutoChatEndpoint")}static{this.pseudoModelId="auto"}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_){super(nya(e,r,n),s,c,l,u,d,p,h,m,g,A,y,E,_),this.discountRange=o}};o5.AutoChatEndpoint=u2e;o5.AutoChatEndpoint=u2e=qAa([pb(4,eya.IDomainService),pb(5,ZAa.ICAPIClientService),pb(6,zAa.IFetcherService),pb(7,VAa.IEnvService),pb(8,JAa.ITelemetryService),pb(9,HAa.IAuthenticationService),pb(10,jAa.IChatMLFetcher),pb(11,XAa.ITokenizerProvider),pb(12,GAa.IInstantiationService),pb(13,$Aa.IConfigurationService),pb(14,KAa.IExperimentationService),pb(15,YAa.IChatWebSocketManager),pb(16,WAa.ILogService)],u2e);function nya(t,e,r){let n;t instanceof tya.ChatEndpoint?n=t.modelMetadata:n={id:t.model,vendor:t.modelProvider,name:t.name,version:t.version,model_picker_enabled:t.showInModelPicker,is_chat_default:!0,is_chat_fallback:t.isFallback,capabilities:{type:"chat",family:t.family,tokenizer:t.tokenizer,limits:{max_prompt_tokens:t.modelMaxPromptTokens,max_output_tokens:t.maxOutputTokens},supports:{tool_calls:t.supportsToolCalls,vision:t.supportsVision,prediction:t.supportsPrediction,streaming:!0}},billing:t.isPremium!==void 0||t.multiplier!==void 0||t.restrictedToSkus!==void 0?{is_premium:t.isPremium??!1,multiplier:t.multiplier??0,restricted_to:t.restrictedToSkus}:void 0,custom_model:t.customModel};let o=Math.round((t.multiplier??0)*(1-r)*100)/100;return{...n,warning_messages:void 0,model_picker_enabled:!0,info_messages:void 0,billing:{is_premium:n.billing?.is_premium??!1,multiplier:o,restricted_to:n.billing?.restricted_to},requestHeaders:{...n.requestHeaders||{},"Copilot-Session-Token":e}}}a(nya,"calculateAutoModelInfo");function iya(t){return t&&(t.model===u2e.pseudoModelId||t instanceof u2e)?1:-1}a(iya,"isAutoModel")});var zsi=T(tfe=>{"use strict";f();Object.defineProperty(tfe,"__esModule",{value:!0});tfe.ChatFailKind=tfe.FetchResponseKind=void 0;var Vsi;(function(t){t.Success="success",t.Failed="failed",t.Canceled="canceled"})(Vsi||(tfe.FetchResponseKind=Vsi={}));var Wsi;(function(t){t.OffTopic="offTopic",t.TokenExpiredOrInvalid="tokenExpiredOrInvalid",t.ServerCanceled="serverCanceled",t.ClientNotSupported="clientNotSupported",t.RateLimited="rateLimited",t.QuotaExceeded="quotaExceeded",t.ExtensionBlocked="extensionBlocked",t.ServerError="serverError",t.ContentFilter="contentFilter",t.AgentUnauthorized="unauthorized",t.AgentFailedDependency="failedDependency",t.ValidationFailed="validationFailed",t.InvalidPreviousResponseId="invalidPreviousResponseId",t.NotFound="notFound",t.Unknown="unknown"})(Wsi||(tfe.ChatFailKind=Wsi={}))});var glt=T(wA=>{"use strict";f();Object.defineProperty(wA,"__esModule",{value:!0});wA.StdAttr=wA.CopilotChatAttr=wA.GenAiAttr=wA.GenAiToolType=wA.GenAiTokenType=wA.GenAiProviderName=wA.GenAiOperationName=void 0;wA.GenAiOperationName={CHAT:"chat",INVOKE_AGENT:"invoke_agent",EXECUTE_TOOL:"execute_tool",EMBEDDINGS:"embeddings",CONTENT_EVENT:"content_event",EXECUTE_HOOK:"execute_hook"};wA.GenAiProviderName={GITHUB:"github",OPENAI:"openai",ANTHROPIC:"anthropic",AZURE_AI_OPENAI:"azure.ai.openai"};wA.GenAiTokenType={INPUT:"input",OUTPUT:"output"};wA.GenAiToolType={FUNCTION:"function",EXTENSION:"extension"};wA.GenAiAttr={OPERATION_NAME:"gen_ai.operation.name",PROVIDER_NAME:"gen_ai.provider.name",REQUEST_MODEL:"gen_ai.request.model",REQUEST_TEMPERATURE:"gen_ai.request.temperature",REQUEST_MAX_TOKENS:"gen_ai.request.max_tokens",REQUEST_TOP_P:"gen_ai.request.top_p",REQUEST_FREQUENCY_PENALTY:"gen_ai.request.frequency_penalty",REQUEST_PRESENCE_PENALTY:"gen_ai.request.presence_penalty",REQUEST_SEED:"gen_ai.request.seed",REQUEST_STOP_SEQUENCES:"gen_ai.request.stop_sequences",RESPONSE_MODEL:"gen_ai.response.model",RESPONSE_ID:"gen_ai.response.id",RESPONSE_FINISH_REASONS:"gen_ai.response.finish_reasons",USAGE_INPUT_TOKENS:"gen_ai.usage.input_tokens",USAGE_OUTPUT_TOKENS:"gen_ai.usage.output_tokens",USAGE_CACHE_READ_INPUT_TOKENS:"gen_ai.usage.cache_read.input_tokens",USAGE_CACHE_CREATION_INPUT_TOKENS:"gen_ai.usage.cache_creation.input_tokens",USAGE_REASONING_TOKENS:"gen_ai.usage.reasoning_tokens",CONVERSATION_ID:"gen_ai.conversation.id",OUTPUT_TYPE:"gen_ai.output.type",TOKEN_TYPE:"gen_ai.token.type",AGENT_NAME:"gen_ai.agent.name",AGENT_ID:"gen_ai.agent.id",AGENT_VERSION:"gen_ai.agent.version",AGENT_DESCRIPTION:"gen_ai.agent.description",TOOL_NAME:"gen_ai.tool.name",TOOL_TYPE:"gen_ai.tool.type",TOOL_CALL_ID:"gen_ai.tool.call.id",TOOL_DESCRIPTION:"gen_ai.tool.description",TOOL_CALL_ARGUMENTS:"gen_ai.tool.call.arguments",TOOL_CALL_RESULT:"gen_ai.tool.call.result",INPUT_MESSAGES:"gen_ai.input.messages",OUTPUT_MESSAGES:"gen_ai.output.messages",SYSTEM_INSTRUCTIONS:"gen_ai.system_instructions",TOOL_DEFINITIONS:"gen_ai.tool.definitions"};wA.CopilotChatAttr={LOCATION:"copilot_chat.location",INTENT:"copilot_chat.intent",TURN_INDEX:"copilot_chat.turn.index",TURN_COUNT:"copilot_chat.turn_count",TOOL_CALL_ROUND:"copilot_chat.tool_call_round",API_TYPE:"copilot_chat.api_type",FETCHER:"copilot_chat.fetcher",DEBUG_NAME:"copilot_chat.debug_name",ENDPOINT_TYPE:"copilot_chat.endpoint_type",MAX_PROMPT_TOKENS:"copilot_chat.request.max_prompt_tokens",TIME_TO_FIRST_TOKEN:"copilot_chat.time_to_first_token",SESSION_ID:"copilot_chat.session_id",SERVER_REQUEST_ID:"copilot_chat.server_request_id",CANCELED:"copilot_chat.canceled",REASONING_CONTENT:"copilot_chat.reasoning_content",USER_REQUEST:"copilot_chat.user_request",PROMPT_CONTEXT:"copilot_chat.prompt_context",PROMPT_INSTRUCTIONS:"copilot_chat.prompt_instructions",CHAT_SESSION_ID:"copilot_chat.chat_session_id",PARENT_CHAT_SESSION_ID:"copilot_chat.parent_chat_session_id",DEBUG_LOG_LABEL:"copilot_chat.debug_log_label",MARKDOWN_CONTENT:"copilot_chat.markdown_content",EDIT_SOURCE:"copilot_chat.edit.source",EDIT_OUTCOME:"copilot_chat.edit.outcome",LANGUAGE_ID:"copilot_chat.language_id",TIME_DELAY_MS:"copilot_chat.time_delay_ms",HAS_REMAINING_EDITS:"copilot_chat.has_remaining_edits"};wA.StdAttr={ERROR_TYPE:"error.type",SERVER_ADDRESS:"server.address",SERVER_PORT:"server.port"}});var dpr=T(OJ=>{"use strict";f();Object.defineProperty(OJ,"__esModule",{value:!0});OJ.truncateForOTel=sya;OJ.toInputMessages=aya;OJ.toOutputMessages=cya;OJ.toSystemInstructions=lya;OJ.toToolDefinitions=uya;var oya=64e3;function sya(t,e=oya){if(t.length<=e)return t;let r=`...[truncated, original ${t.length} chars]`;return t.substring(0,e-r.length)+r}a(sya,"truncateForOTel");function aya(t){return t.map(e=>{let r=[];if(e.content&&r.push({type:"text",content:e.content}),e.tool_calls)for(let n of e.tool_calls){let o;try{o=JSON.parse(n.function.arguments)}catch{o=n.function.arguments}r.push({type:"tool_call",id:n.id,name:n.function.name,arguments:o})}return{role:e.role,parts:r}})}a(aya,"toInputMessages");function cya(t){return t.map(e=>{let r=[],n=e.message;if(n?.content&&r.push({type:"text",content:n.content}),n?.tool_calls)for(let o of n.tool_calls){let s;try{s=JSON.parse(o.function.arguments)}catch{s=o.function.arguments}r.push({type:"tool_call",id:o.id,name:o.function.name,arguments:s})}return{role:n?.role??"assistant",parts:r,finish_reason:e.finish_reason}})}a(cya,"toOutputMessages");function lya(t){if(t)return[{type:"text",content:t}]}a(lya,"toSystemInstructions");function uya(t){if(!(!t||t.length===0))return t.filter(e=>!!e.function).map(e=>({type:"function",name:e.function.name,description:e.function.description,parameters:e.function.parameters}))}a(uya,"toToolDefinitions")});var Ysi=T(pI=>{"use strict";f();Object.defineProperty(pI,"__esModule",{value:!0});pI.emitInferenceDetailsEvent=dya;pI.emitSessionStartEvent=fya;pI.emitToolCallEvent=pya;pI.emitAgentTurnEvent=hya;pI.emitEditFeedbackEvent=mya;pI.emitEditHunkActionEvent=gya;pI.emitInlineDoneEvent=Aya;pI.emitEditSurvivalEvent=yya;pI.emitUserFeedbackEvent=Eya;pI.emitCloudSessionInvokeEvent=Cya;var J0=glt(),fpr=dpr();function dya(t,e,r,n){let o={"event.name":"gen_ai.client.inference.operation.details",[J0.GenAiAttr.OPERATION_NAME]:J0.GenAiOperationName.CHAT,[J0.GenAiAttr.REQUEST_MODEL]:e.model};r&&(r.model&&(o[J0.GenAiAttr.RESPONSE_MODEL]=r.model),r.id&&(o[J0.GenAiAttr.RESPONSE_ID]=r.id),r.finishReasons&&(o[J0.GenAiAttr.RESPONSE_FINISH_REASONS]=r.finishReasons),r.inputTokens!==void 0&&(o[J0.GenAiAttr.USAGE_INPUT_TOKENS]=r.inputTokens),r.outputTokens!==void 0&&(o[J0.GenAiAttr.USAGE_OUTPUT_TOKENS]=r.outputTokens)),e.temperature!==void 0&&(o[J0.GenAiAttr.REQUEST_TEMPERATURE]=e.temperature),e.maxTokens!==void 0&&(o[J0.GenAiAttr.REQUEST_MAX_TOKENS]=e.maxTokens),n&&(o[J0.StdAttr.ERROR_TYPE]=n.type),t.config.captureContent&&(e.messages!==void 0&&(o[J0.GenAiAttr.INPUT_MESSAGES]=(0,fpr.truncateForOTel)(JSON.stringify(e.messages))),e.systemMessage!==void 0&&(o[J0.GenAiAttr.SYSTEM_INSTRUCTIONS]=(0,fpr.truncateForOTel)(JSON.stringify(e.systemMessage))),e.tools!==void 0&&(o[J0.GenAiAttr.TOOL_DEFINITIONS]=(0,fpr.truncateForOTel)(JSON.stringify(e.tools)))),t.emitLogRecord(`GenAI inference: ${e.model}`,o)}a(dya,"emitInferenceDetailsEvent");function fya(t,e,r,n){t.emitLogRecord("copilot_chat.session.start",{"event.name":"copilot_chat.session.start","session.id":e,[J0.GenAiAttr.REQUEST_MODEL]:r,[J0.GenAiAttr.AGENT_NAME]:n})}a(fya,"emitSessionStartEvent");function pya(t,e,r,n,o){t.emitLogRecord(`copilot_chat.tool.call: ${e}`,{"event.name":"copilot_chat.tool.call",[J0.GenAiAttr.TOOL_NAME]:e,duration_ms:r,success:n,...o?{[J0.StdAttr.ERROR_TYPE]:o}:{}})}a(pya,"emitToolCallEvent");function hya(t,e,r,n,o){t.emitLogRecord(`copilot_chat.agent.turn: ${e}`,{"event.name":"copilot_chat.agent.turn","turn.index":e,[J0.GenAiAttr.USAGE_INPUT_TOKENS]:r,[J0.GenAiAttr.USAGE_OUTPUT_TOKENS]:n,tool_call_count:o})}a(hya,"emitAgentTurnEvent");function mya(t,e,r,n,o,s,c,l){t.emitLogRecord(`copilot_chat.edit.feedback: ${e}`,{"event.name":"copilot_chat.edit.feedback",outcome:e,language_id:r,participant:n,request_id:o,edit_surface:s,has_remaining_edits:c,is_notebook:l})}a(mya,"emitEditFeedbackEvent");function gya(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.edit.hunk.action: ${e}`,{"event.name":"copilot_chat.edit.hunk.action",outcome:e,language_id:r,request_id:n,line_count:o,lines_added:s,lines_removed:c})}a(gya,"emitEditHunkActionEvent");function Aya(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.inline.done: ${e?"accepted":"rejected"}`,{"event.name":"copilot_chat.inline.done",accepted:e,language_id:r,edit_count:n,edit_line_count:o,reply_type:s,is_notebook:c})}a(Aya,"emitInlineDoneEvent");function yya(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.edit.survival: ${e}`,{"event.name":"copilot_chat.edit.survival",edit_source:e,survival_rate_four_gram:r,survival_rate_no_revert:n,time_delay_ms:o,did_branch_change:s,request_id:c})}a(yya,"emitEditSurvivalEvent");function Eya(t,e,r,n,o){t.emitLogRecord(`copilot_chat.user.feedback: ${e}`,{"event.name":"copilot_chat.user.feedback",rating:e,participant:r,conversation_id:n,request_id:o})}a(Eya,"emitUserFeedbackEvent");function Cya(t,e,r,n){t.emitLogRecord(`copilot_chat.cloud.session.invoke: ${e}`,{"event.name":"copilot_chat.cloud.session.invoke",partner_agent:e,model:r,request_id:n})}a(Cya,"emitCloudSessionInvokeEvent")});var Ksi=T(Alt=>{"use strict";f();Object.defineProperty(Alt,"__esModule",{value:!0});Alt.GenAiMetrics=void 0;var Ya=glt(),ppr=class{static{a(this,"GenAiMetrics")}static recordOperationDuration(e,r,n){e.recordMetric("gen_ai.client.operation.duration",r,{[Ya.GenAiAttr.OPERATION_NAME]:n.operationName,[Ya.GenAiAttr.PROVIDER_NAME]:n.providerName,[Ya.GenAiAttr.REQUEST_MODEL]:n.requestModel,...n.responseModel?{[Ya.GenAiAttr.RESPONSE_MODEL]:n.responseModel}:{},...n.serverAddress?{[Ya.StdAttr.SERVER_ADDRESS]:n.serverAddress}:{},...n.serverPort?{[Ya.StdAttr.SERVER_PORT]:n.serverPort}:{},...n.errorType?{[Ya.StdAttr.ERROR_TYPE]:n.errorType}:{}})}static recordTokenUsage(e,r,n,o){e.recordMetric("gen_ai.client.token.usage",r,{[Ya.GenAiAttr.OPERATION_NAME]:o.operationName,[Ya.GenAiAttr.PROVIDER_NAME]:o.providerName,[Ya.GenAiAttr.TOKEN_TYPE]:n,[Ya.GenAiAttr.REQUEST_MODEL]:o.requestModel,...o.responseModel?{[Ya.GenAiAttr.RESPONSE_MODEL]:o.responseModel}:{},...o.serverAddress?{[Ya.StdAttr.SERVER_ADDRESS]:o.serverAddress}:{}})}static recordToolCallCount(e,r,n){e.incrementCounter("copilot_chat.tool.call.count",1,{[Ya.GenAiAttr.TOOL_NAME]:r,success:n})}static recordToolCallDuration(e,r,n){e.recordMetric("copilot_chat.tool.call.duration",n,{[Ya.GenAiAttr.TOOL_NAME]:r})}static recordAgentDuration(e,r,n){e.recordMetric("copilot_chat.agent.invocation.duration",n,{[Ya.GenAiAttr.AGENT_NAME]:r})}static recordAgentTurnCount(e,r,n){e.recordMetric("copilot_chat.agent.turn.count",n,{[Ya.GenAiAttr.AGENT_NAME]:r})}static recordTimeToFirstToken(e,r,n){e.recordMetric("copilot_chat.time_to_first_token",n,{[Ya.GenAiAttr.REQUEST_MODEL]:r})}static incrementSessionCount(e){e.incrementCounter("copilot_chat.session.count")}static recordEditAcceptance(e,r,n,o){e.incrementCounter("copilot_chat.edit.acceptance.count",1,{[Ya.CopilotChatAttr.EDIT_SOURCE]:r,[Ya.CopilotChatAttr.EDIT_OUTCOME]:n,...o?{[Ya.CopilotChatAttr.LANGUAGE_ID]:o}:{}})}static recordChatEditOutcome(e,r,n,o,s){e.incrementCounter("copilot_chat.chat_edit.outcome.count",1,{[Ya.CopilotChatAttr.EDIT_SOURCE]:r,[Ya.CopilotChatAttr.EDIT_OUTCOME]:n,...o?{[Ya.CopilotChatAttr.LANGUAGE_ID]:o}:{},...s!==void 0?{[Ya.CopilotChatAttr.HAS_REMAINING_EDITS]:s}:{}})}static recordEditSurvivalFourGram(e,r,n,o){e.recordMetric("copilot_chat.edit.survival.four_gram",n,{[Ya.CopilotChatAttr.EDIT_SOURCE]:r,[Ya.CopilotChatAttr.TIME_DELAY_MS]:o})}static recordEditSurvivalNoRevert(e,r,n,o){e.recordMetric("copilot_chat.edit.survival.no_revert",n,{[Ya.CopilotChatAttr.EDIT_SOURCE]:r,[Ya.CopilotChatAttr.TIME_DELAY_MS]:o})}static incrementLinesOfCode(e,r,n,o){e.incrementCounter("copilot_chat.lines_of_code.count",o,{type:r,...n?{[Ya.CopilotChatAttr.LANGUAGE_ID]:n}:{}})}static incrementUserActionCount(e,r){e.incrementCounter("copilot_chat.user.action.count",1,{action:r})}static incrementUserFeedbackCount(e,r){e.incrementCounter("copilot_chat.user.feedback.count",1,{rating:r})}static incrementAgentEditResponseCount(e,r){e.incrementCounter("copilot_chat.agent.edit_response.count",1,{outcome:r})}static incrementAgentSummarizationCount(e,r){e.incrementCounter("copilot_chat.agent.summarization.count",1,{outcome:r})}static incrementPullRequestCount(e){e.incrementCounter("copilot_chat.pull_request.count")}static incrementCloudSessionCount(e,r){e.incrementCounter("copilot_chat.cloud.session.count",1,{partner_agent:r})}static incrementCloudPrReadyCount(e){e.incrementCounter("copilot_chat.cloud.pr_ready.count")}};Alt.GenAiMetrics=ppr});var mpr=T(ylt=>{"use strict";f();Object.defineProperty(ylt,"__esModule",{value:!0});ylt.NoopOTelService=void 0;var Jsi=nc(),Xsi={setAttribute(){},setAttributes(){},setStatus(){},recordException(){},addEvent(){},getSpanContext(){},end(){}},hpr=class{static{a(this,"NoopOTelService")}constructor(e){this.onDidCompleteSpan=Jsi.Event.None,this.onDidEmitSpanEvent=Jsi.Event.None,this.config=e}startSpan(e,r){return Xsi}startActiveSpan(e,r,n){return n(Xsi)}getActiveTraceContext(){}storeTraceContext(e,r){}getStoredTraceContext(e){}runWithTraceContext(e,r){return r()}recordMetric(e,r,n){}incrementCounter(e,r,n){}emitLogRecord(e,r){}async flush(){}async shutdown(){}injectCompletedSpan(e){}};ylt.NoopOTelService=hpr});var Apr=T(gpr=>{"use strict";f();Object.defineProperty(gpr,"__esModule",{value:!0});gpr.resolveOTelConfig=bya;function _ya(t){if(!t)return{};let e={};for(let r of t.split(",")){let n=r.indexOf("=");if(n>0){let o=r.substring(0,n).trim(),s=r.substring(n+1).trim();o&&(e[o]=s)}}return e}a(_ya,"parseResourceAttributes");function vya(t,e){if(!t)return;let r=t.replace(/^["']|["']$/g,"");try{let n=new URL(r);return e==="grpc"?n.origin:n.href}catch{return}}a(vya,"parseOtlpEndpoint");function bya(t){let{env:e}=t;if(t.vscodeTelemetryLevel==="off")return Zsi(t);let r=t.settingDbSpanExporter??!1,n=(Elt(e.COPILOT_OTEL_ENABLED)??t.settingEnabled??!!e.OTEL_EXPORTER_OTLP_ENDPOINT)||r,o=(Elt(e.COPILOT_OTEL_ENABLED)??t.settingEnabled??!!e.OTEL_EXPORTER_OTLP_ENDPOINT)===!0;if(!n)return Zsi(t);let c=(e.OTEL_EXPORTER_OTLP_PROTOCOL??e.COPILOT_OTEL_PROTOCOL)==="grpc"?"grpc":"http",l=e.COPILOT_OTEL_ENDPOINT??e.OTEL_EXPORTER_OTLP_ENDPOINT??t.settingOtlpEndpoint??"http://localhost:4318",u=vya(l,c)??"http://localhost:4318",d=e.COPILOT_OTEL_FILE_EXPORTER_PATH??t.settingOutfile,p;d?p="file":t.settingExporterType?p=t.settingExporterType:p=c==="grpc"?"otlp-grpc":"otlp-http";let h=Elt(e.COPILOT_OTEL_CAPTURE_CONTENT)??t.settingCaptureContent??!1,m=new Set(["trace","debug","info","warn","error"]),g=e.COPILOT_OTEL_LOG_LEVEL,A=g&&m.has(g)?g:"info",y=Elt(e.COPILOT_OTEL_HTTP_INSTRUMENTATION)??!1,E=e.OTEL_SERVICE_NAME??"copilot-chat",_=_ya(e.OTEL_RESOURCE_ATTRIBUTES);return Object.freeze({enabled:!0,enabledExplicitly:o,exporterType:p,otlpEndpoint:u,otlpProtocol:c,captureContent:h,fileExporterPath:d,dbSpanExporter:r,logLevel:A,httpInstrumentation:y,serviceName:E,serviceVersion:t.extensionVersion,sessionId:t.sessionId,resourceAttributes:_})}a(bya,"resolveOTelConfig");function Zsi(t){return Object.freeze({enabled:!1,enabledExplicitly:!1,exporterType:"otlp-http",otlpEndpoint:"",otlpProtocol:"http",captureContent:!1,dbSpanExporter:!1,logLevel:"info",httpInstrumentation:!1,serviceName:"copilot-chat",serviceVersion:t.extensionVersion,sessionId:t.sessionId,resourceAttributes:{}})}a(Zsi,"createDisabledConfig");function Elt(t){if(t!==void 0)return t==="true"||t==="1"}a(Elt,"envBool")});var _lt=T(Clt=>{"use strict";f();Object.defineProperty(Clt,"__esModule",{value:!0});Clt.IOTelService=void 0;var Tya=qr();Clt.IOTelService=(0,Tya.createServiceIdentifier)("IOTelService")});var eai=T(yo=>{"use strict";f();Object.defineProperty(yo,"__esModule",{value:!0});yo.IOTelService=yo.resolveOTelConfig=yo.NoopOTelService=yo.truncateForOTel=yo.toToolDefinitions=yo.toSystemInstructions=yo.toOutputMessages=yo.toInputMessages=yo.GenAiMetrics=yo.emitToolCallEvent=yo.emitSessionStartEvent=yo.emitInferenceDetailsEvent=yo.emitAgentTurnEvent=yo.StdAttr=yo.GenAiToolType=yo.GenAiTokenType=yo.GenAiProviderName=yo.GenAiOperationName=yo.GenAiAttr=yo.CopilotChatAttr=void 0;var BJ=glt();Object.defineProperty(yo,"CopilotChatAttr",{enumerable:!0,get:a(function(){return BJ.CopilotChatAttr},"get")});Object.defineProperty(yo,"GenAiAttr",{enumerable:!0,get:a(function(){return BJ.GenAiAttr},"get")});Object.defineProperty(yo,"GenAiOperationName",{enumerable:!0,get:a(function(){return BJ.GenAiOperationName},"get")});Object.defineProperty(yo,"GenAiProviderName",{enumerable:!0,get:a(function(){return BJ.GenAiProviderName},"get")});Object.defineProperty(yo,"GenAiTokenType",{enumerable:!0,get:a(function(){return BJ.GenAiTokenType},"get")});Object.defineProperty(yo,"GenAiToolType",{enumerable:!0,get:a(function(){return BJ.GenAiToolType},"get")});Object.defineProperty(yo,"StdAttr",{enumerable:!0,get:a(function(){return BJ.StdAttr},"get")});var vlt=Ysi();Object.defineProperty(yo,"emitAgentTurnEvent",{enumerable:!0,get:a(function(){return vlt.emitAgentTurnEvent},"get")});Object.defineProperty(yo,"emitInferenceDetailsEvent",{enumerable:!0,get:a(function(){return vlt.emitInferenceDetailsEvent},"get")});Object.defineProperty(yo,"emitSessionStartEvent",{enumerable:!0,get:a(function(){return vlt.emitSessionStartEvent},"get")});Object.defineProperty(yo,"emitToolCallEvent",{enumerable:!0,get:a(function(){return vlt.emitToolCallEvent},"get")});var Sya=Ksi();Object.defineProperty(yo,"GenAiMetrics",{enumerable:!0,get:a(function(){return Sya.GenAiMetrics},"get")});var d2e=dpr();Object.defineProperty(yo,"toInputMessages",{enumerable:!0,get:a(function(){return d2e.toInputMessages},"get")});Object.defineProperty(yo,"toOutputMessages",{enumerable:!0,get:a(function(){return d2e.toOutputMessages},"get")});Object.defineProperty(yo,"toSystemInstructions",{enumerable:!0,get:a(function(){return d2e.toSystemInstructions},"get")});Object.defineProperty(yo,"toToolDefinitions",{enumerable:!0,get:a(function(){return d2e.toToolDefinitions},"get")});Object.defineProperty(yo,"truncateForOTel",{enumerable:!0,get:a(function(){return d2e.truncateForOTel},"get")});var Iya=mpr();Object.defineProperty(yo,"NoopOTelService",{enumerable:!0,get:a(function(){return Iya.NoopOTelService},"get")});var xya=Apr();Object.defineProperty(yo,"resolveOTelConfig",{enumerable:!0,get:a(function(){return xya.resolveOTelConfig},"get")});var wya=_lt();Object.defineProperty(yo,"IOTelService",{enumerable:!0,get:a(function(){return wya.IOTelService},"get")})});var rai=T(blt=>{"use strict";f();Object.defineProperty(blt,"__esModule",{value:!0});blt.calculateLineRepetitionStats=Pya;blt.isRepetitive=kya;var Rya=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60},{max_token_sequence_length:60,last_tokens_to_consider:120}];function Pya(t){if(t.length===0)return{numberOfRepetitions:0,mostRepeatedLine:"",totalLines:0};let e=new Map,r=t.split(` -`);for(let s of r){if(s=s.trim(),s.length===0)continue;let c=e.get(s)||0;e.set(s,c+1)}let n="",o=0;for(let[s,c]of e.entries())c>o&&(o=c,n=s);return{numberOfRepetitions:o,mostRepeatedLine:n,totalLines:r.length}}a(Pya,"calculateLineRepetitionStats");function kya(t){let e=t.slice();return e.reverse(),tai(e)||tai(e.filter(r=>r.trim().length>0))}a(kya,"isRepetitive");function tai(t){let e=Nya(t);for(let r of Rya){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(Nya,"kmp_prefix_function")});var ypr=T(s5=>{"use strict";f();var Dya=s5&&s5.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},OQ=s5&&s5.__param||function(t,e){return function(r,n){e(r,n,t)}},hI;Object.defineProperty(s5,"__esModule",{value:!0});s5.OpenAIEndpoint=void 0;s5.isBYOKModel=Vya;var Mya=d3(),nai=XD(),Oya=fc(),Bya=NQ(),Lya=MJ(),Fya=L0(),Uya=CJ(),Qya=$ct(),qya=PQ(),Gya=gd(),Hya=PJ(),jya=Mo();function $ya(t){return t.type===nai.ChatFetchResponseType.Failed&&t.streamError?{type:t.type,requestId:t.requestId,serverRequestId:t.serverRequestId,reason:JSON.stringify(t.streamError)}:t.type===nai.ChatFetchResponseType.RateLimited?{type:t.type,requestId:t.requestId,serverRequestId:t.serverRequestId,reason:t.capiError?`Rate limit exceeded +`)}`}]});break}return r.length>0&&e.push({role:oa.Raw.ChatRole.Assistant,content:[],toolCalls:r.splice(0)}),e}a(aEa,"responseApiInputToRawMessagesForLogging");function cEa(t){return"role"in t&&t.role==="assistant"&&"type"in t&&t.type==="message"&&"content"in t&&Array.isArray(t.content)}a(cEa,"isResponseOutputMessage");function lEa(t){return"role"in t&&t.role==="assistant"&&(!("type"in t)||t.type!=="message")}a(lEa,"isResponseInputItemMessage");function _pr(t){return typeof t=="string"?[{type:"input_text",text:t}]:t}a(_pr,"ensureContentArray");function Cct(t){switch(t.type){case"input_text":return{type:oa.Raw.ChatCompletionContentPartKind.Text,text:t.text};case"input_image":return{type:oa.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:t.image_url||"",detail:t.detail==="auto"?void 0:t.detail??void 0}};case"input_file":return{type:oa.Raw.ChatCompletionContentPartKind.Opaque,value:`[File Input - Filename: ${t.filename||"unknown"}]`}}}a(Cct,"responseContentToRawContent");function uEa(t){switch(t.type){case"output_text":return{type:oa.Raw.ChatCompletionContentPartKind.Text,text:t.text};case"refusal":return{type:oa.Raw.ChatCompletionContentPartKind.Text,text:`[Refusal: ${t.refusal}]`}}}a(uEa,"responseOutputToRawContent");function dEa(t){return typeof t=="string"?[{type:oa.Raw.ChatCompletionContentPartKind.Text,text:t}]:(0,Cpr.coalesce)(t.map(Cct))}a(dEa,"responseFunctionOutputToRawContents");async function fEa(t,e,r,n,o,s,c){return new Hya.AsyncIterableObject(async l=>{let u=n.headers.get("X-Request-ID")??(0,Wya.generateUuid)(),d=n.headers.get("x-github-request-id")??"",p=t.createInstance(vct,c,u,d),h=new Vya.SSEParser(m=>{try{r.trace(`SSE: ${m.data}`);let g=p.push({type:m.type,...JSON.parse(m.data)},s);g&&(Rai(e,r,g,c),l.emitOne(g))}catch(g){l.reject(g)}});for await(let m of n.body)h.feed(m)},async()=>{await n.body.destroy()})}a(fEa,"processResponseFromChatEndpoint");function Rai(t,e,r,n){let o=(0,UK.rawMessageToCAPI)(r.message),s=n;r.usage&&(s=n.extendedBy({},{promptTokens:r.usage.prompt_tokens,completionTokens:r.usage.completion_tokens,totalTokens:r.usage.total_tokens})),(0,zya.sendEngineMessagesTelemetry)(t,[o],s,!0,e)}a(Rai,"sendCompletionOutputTelemetry");var vct=class{static{a(this,"OpenAIResponsesProcessor")}constructor(e,r,n){this.telemetryData=e,this.requestId=r,this.ghRequestId=n,this.textAccumulator="",this.hasReceivedReasoningSummary=!1,this.toolCallInfo=new Map}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,0,o)},"onProgress");switch(e.type){case"error":return n({text:"",copilotErrors:[{agent:"openai",code:e.code||"unknown",message:e.message,type:"error",identifier:e.param||void 0}]});case"response.output_text.delta":{let o=e,s=new $ya.Lazy(()=>new TextEncoder().encode(o.delta));return n({text:o.delta,logprobs:o.logprobs&&{content:o.logprobs.map(c=>({...xai(s,c),top_logprobs:c.top_logprobs?.map(l=>xai(s,l))||[]}))}})}case"response.output_item.added":e.item.type==="function_call"&&(this.toolCallInfo.set(e.output_index,{name:e.item.name,callId:e.item.call_id,arguments:""}),n({text:"",beginToolCalls:[{name:e.item.name,id:e.item.call_id}]}));return;case"response.function_call_arguments.delta":{let o=this.toolCallInfo.get(e.output_index);o&&(o.arguments+=e.delta,n({text:"",copilotToolCallStreamUpdates:[{id:o.callId,name:o.name,arguments:o.arguments}]}));return}case"response.output_item.done":if(e.item.type.toString()===UK.openAIContextManagementCompactionType){let o=e.item;return n({text:"",contextManagement:{type:UK.openAIContextManagementCompactionType,id:o.id,encrypted_content:o.encrypted_content}})}e.item.type==="function_call"?(this.toolCallInfo.delete(e.output_index),n({text:"",copilotToolCalls:[{id:e.item.call_id,name:e.item.name,arguments:e.item.arguments}],phase:e.item.phase})):e.item.type==="reasoning"?n({text:"",thinking:e.item.encrypted_content?{id:e.item.id,text:this.hasReceivedReasoningSummary?void 0:e.item.summary.map(o=>o.text),encrypted:e.item.encrypted_content}:void 0}):e.item.type==="message"&&n({text:"",phase:e.item.phase});return;case"response.reasoning_summary_text.delta":return this.hasReceivedReasoningSummary=!0,n({text:"",thinking:{id:e.item_id,text:e.delta}});case"response.reasoning_summary_part.done":return this.hasReceivedReasoningSummary=!0,n({text:"",thinking:{id:e.item_id}});case"response.completed":return n({text:"",statefulMarker:e.response.id}),{blockFinished:!0,choiceIndex:0,model:e.response.model,tokens:[],telemetryData:this.telemetryData,requestId:{headerRequestId:this.requestId,gitHubRequestId:this.ghRequestId,completionId:e.response.id,created:e.response.created_at,deploymentId:"",serverExperiments:""},usage:{prompt_tokens:e.response.usage?.input_tokens??0,completion_tokens:e.response.usage?.output_tokens??0,total_tokens:e.response.usage?.total_tokens??0,prompt_tokens_details:{cached_tokens:e.response.usage?.input_tokens_details.cached_tokens??0},completion_tokens_details:{reasoning_tokens:e.response.usage?.output_tokens_details.reasoning_tokens??0,accepted_prediction_tokens:0,rejected_prediction_tokens:0}},finishReason:UK.FinishedCompletionReason.Stop,message:{role:oa.Raw.ChatRole.Assistant,content:e.response.output.map(o=>{if(o.type==="message")return{type:oa.Raw.ChatCompletionContentPartKind.Text,text:o.content.map(s=>s.type==="output_text"?s.text:s.refusal).join("")};if(o.type==="image_generation_call"&&o.result)return{type:oa.Raw.ChatCompletionContentPartKind.Image,imageUrl:{url:o.result}}}).filter(sQ.isDefined)}}}}};aQ.OpenAIResponsesProcessor=vct;function xai(t,e){let r=[];if(e.token){let n=new TextEncoder().encode(e.token),o=t.value,s=(0,jya.binaryIndexOf)(o,n);s!==-1&&(r=[s,s+n.length])}return{token:e.token,bytes:r,logprob:e.logprob}}a(xai,"mapLogProp")});var qK=T($0=>{"use strict";f();var pEa=$0&&$0.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hEa=$0&&$0.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mai=$0&&$0.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},mEa=$0&&$0.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{let h=p.reason??"client-trimmed",m=s.extendedBy({completionChoiceFinishReason:h,headerRequestId:p.requestId.headerRequestId});return t.sendGHTelemetryEvent("completion.finishReason",m.properties,m.measurements),(0,vEa.prepareChatCompletionForReturn)(t,e,p,s)})}a(wpr,"defaultChatResponseProcessor");async function Hai(t,e,r){let n=await t.text(),o=JSON.parse(n),s=[];for(let c=0;c<(o?.choices?.length||0);c++){let l=o.choices[c],u={role:l.message.role,content:l.message.content,name:l.message.name,toolCalls:l.message.toolCalls??l.message.tool_calls},d=(0,EEa.getTextPart)(u.content),p=t.headers.get("X-Request-ID")??(0,AEa.generateUuid)(),h=t.headers.get("x-github-request-id")??"",m={blockFinished:!1,choiceIndex:c,model:o.model,filterReason:void 0,finishReason:l.finish_reason,message:u,usage:o.usage,tokens:[],requestId:{headerRequestId:p,gitHubRequestId:h,completionId:o.id,created:o.created,deploymentId:"",serverExperiments:""},telemetryData:r},g=[];for(let A of u.toolCalls??[])g.push({name:A.function?.name??"",arguments:A.function?.arguments??"",id:A.id??""});await e(d,c,{text:d,copilotToolCalls:g}),s.push(m)}return Oai.AsyncIterableObject.fromArray(s)}a(Hai,"defaultNonStreamChatResponseProcessor");var bct=Ipr=class{static{a(this,"ChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d){this.modelMetadata=e,this._domainService=r,this._chatMLFetcher=n,this._tokenizerProvider=o,this._instantiationService=s,this._configurationService=c,this._expService=l,this._chatWebSocketService=u,this._maxTokens=e.capabilities.limits?.max_prompt_tokens??8192,this._maxOutputTokens=e.capabilities.limits?.max_output_tokens??4096,this.model=e.id,this.modelProvider=e.vendor,this.name=e.name,this.version=e.version,this.family=e.capabilities.family,this.tokenizer=e.capabilities.tokenizer,this.showInModelPicker=e.model_picker_enabled,this.isPremium=e.billing?.is_premium,this.multiplier=e.billing?.multiplier,this.restrictedToSkus=e.billing?.restricted_to,this.isFallback=e.is_chat_fallback,this.supportsToolCalls=!!e.capabilities.supports.tool_calls,this.supportsVision=!!e.capabilities.supports.vision,this.supportsPrediction=!!e.capabilities.supports.prediction,this.supportsAdaptiveThinking=e.capabilities.supports.adaptive_thinking,this.minThinkingBudget=e.capabilities.supports.min_thinking_budget,this.maxThinkingBudget=e.capabilities.supports.max_thinking_budget,this.supportsReasoningEffort=e.capabilities.supports.reasoning_effort,this._supportsStreaming=!!e.capabilities.supports.streaming,this.customModel=e.custom_model,this.maxPromptImages=e.capabilities.limits?.vision?.max_prompt_images}getExtraHeaders(e){let r={...this.modelMetadata.requestHeaders};if((e===Spr.ChatLocation.Agent||e===Spr.ChatLocation.MessagesProxy)&&this.useMessagesApi){let o=this._configurationService.getConfig(QK.ConfigKey.TeamInternal.ModelProviderPreference);o&&(r["X-Model-Provider-Preference"]=o);let s=[];(!this.supportsAdaptiveThinking||this._configurationService.getExperimentBasedConfig(QK.ConfigKey.AnthropicForceExtendedThinking,this._expService))&&s.push("interleaved-thinking-2025-05-14"),(0,kai.isAnthropicContextEditingEnabled)(this.model,this._configurationService,this._expService)&&s.push("context-management-2025-06-27"),(0,kai.isAnthropicToolSearchEnabled)(this.model,this._configurationService)&&s.push("advanced-tool-use-2025-11-20"),s.length>0&&(r["anthropic-beta"]=s.join(","))}return r}get modelMaxPromptTokens(){return this._maxTokens}get maxOutputTokens(){return this._maxOutputTokens}get urlOrRequestMetadata(){return this.modelMetadata.urlOrRequestMetadata??(this.useResponsesApi?{type:bpr.RequestType.ChatResponses}:this.useMessagesApi?{type:bpr.RequestType.ChatMessages}:{type:bpr.RequestType.ChatCompletions})}get useResponsesApi(){return this.modelMetadata.supported_endpoints&&!this.modelMetadata.supported_endpoints.includes(sRe.ModelSupportedEndpoint.ChatCompletions)&&this.modelMetadata.supported_endpoints.includes(sRe.ModelSupportedEndpoint.Responses)?!0:!!this.modelMetadata.supported_endpoints?.includes(sRe.ModelSupportedEndpoint.Responses)}get useWebSocketResponsesApi(){return!!this.modelMetadata.supported_endpoints?.includes(sRe.ModelSupportedEndpoint.WebSocketResponses)}get useMessagesApi(){return!!(this._configurationService.getExperimentBasedConfig(QK.ConfigKey.UseAnthropicMessagesApi,this._expService)&&this.modelMetadata.supported_endpoints?.includes(sRe.ModelSupportedEndpoint.Messages))}get degradationReason(){return this.modelMetadata.warning_messages?.at(0)?.message??this.modelMetadata.info_messages?.at(0)?.message}get apiType(){return this.useResponsesApi?"responses":this.useMessagesApi?"messages":"chatCompletions"}interceptBody(e){if(e&&!this.supportsToolCalls&&delete e.tools,e&&!this._supportsStreaming&&(e.stream=!1),e?.messages&&(this.family.startsWith("o1")||this.model==="o1"||this.model==="o1-mini")){let r=e.messages.map(n=>n.role===Tpr.OpenAI.ChatRole.System?{role:Tpr.OpenAI.ChatRole.User,content:n.content}:n);e.messages=r}}createRequestBody(e){if((0,IEa.isGeminiFamily)(this)&&this.maxPromptImages!==void 0){let r=this.countImages(e.messages,this.maxPromptImages);if(r>this.maxPromptImages){let n=gEa.t("Too many images in request: {0} images provided, but the model supports a maximum of {1} images.",r,this.maxPromptImages);throw new Error(n)}}if(this.useResponsesApi){let r=this._instantiationService.invokeFunction(Nai.createResponsesRequestBody,e,this.model,this);return this.customizeResponsesBody(r)}else if(this.useMessagesApi){let r=this._instantiationService.invokeFunction(Dai.createMessagesRequestBody,e,this.model,this);return this.customizeMessagesBody(r)}else{let r=(0,CEa.createCapiRequestBody)(e,this.model,this.getCompletionsCallback());return this.customizeCapiBody(r,e)}}countImages(e,r){let n=0;for(let o of e)if(Array.isArray(o.content)){for(let s of o.content)if(s.type===Tpr.Raw.ChatCompletionContentPartKind.Image&&(n++,r!==void 0&&n>r))return n}return n}getCompletionsCallback(){}customizeMessagesBody(e){return e}customizeResponsesBody(e){return e}customizeCapiBody(e,r){if(!!r.requestOptions?.tools?.length&&this.family.toLowerCase().includes("gemini-3")){let o=this._configurationService.getExperimentBasedConfig(QK.ConfigKey.TeamInternal.GeminiFunctionCallingMode,this._expService);o&&typeof e.tool_choice!="object"&&(e.tool_choice=o)}return e}async processResponseFromChatEndpoint(e,r,n,o,s,c,l){return this.useResponsesApi?(0,Nai.processResponseFromChatEndpoint)(this._instantiationService,e,r,n,o,s,c):this.useMessagesApi?(0,Dai.processResponseFromMessagesEndpoint)(this._instantiationService,e,r,n,s,c):this._supportsStreaming?wpr(e,r,n,o,s,c,l):Hai(n,s,c)}acquireTokenizer(){return this._tokenizerProvider.acquireTokenizer(this)}async makeChatRequest2(e,r){let n=e.useWebSocket??!!(e.turnId&&e.conversationId&&this.useWebSocketResponsesApi&&this._configurationService.getExperimentBasedConfig(QK.ConfigKey.TeamInternal.ResponsesApiWebSocketEnabled,this._expService)),o=e.ignoreStatefulMarker??!(n&&e.conversationId&&e.turnId&&this._chatWebSocketService.hasActiveConnection(e.conversationId,e.turnId)),s=await this._makeChatRequest2({...e,useWebSocket:n,ignoreStatefulMarker:o},r);return s.type===Spr.ChatFetchResponseType.InvalidStatefulMarker?this._makeChatRequest2({...e,useWebSocket:n,ignoreStatefulMarker:!0},r):s}async _makeChatRequest2(e,r){return this._chatMLFetcher.fetchOne({requestOptions:{},...e,endpoint:this},r)}async makeChatRequest(e,r,n,o,s,c,l,u,d){return this.makeChatRequest2({debugName:e,messages:r,finishedCb:n,location:s,source:c,requestOptions:l,userInitiatedRequest:u,telemetryProperties:d},o)}cloneWithTokenOverride(e){return this._instantiationService.createInstance(Ipr,(0,Pai.mixin)((0,Pai.deepClone)(this.modelMetadata),{capabilities:{limits:{max_prompt_tokens:e}}}))}};$0.ChatEndpoint=bct;$0.ChatEndpoint=bct=Ipr=Mai([j0(1,Gai.IDomainService),j0(2,Lai.IChatMLFetcher),j0(3,qai.ITokenizerProvider),j0(4,Bai.IInstantiationService),j0(5,QK.IConfigurationService),j0(6,Qai.IExperimentationService),j0(7,Uai.IChatWebSocketManager),j0(8,Fai.ILogService)],bct);var xpr=class extends bct{static{a(this,"RemoteAgentChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A){super(e,n,u,d,p,h,m,g,A),this._requestMetadata=r}processResponseFromChatEndpoint(e,r,n,o,s,c,l,u){return wpr(e,r,n,2,s,c,l)}get urlOrRequestMetadata(){return this._requestMetadata}};$0.RemoteAgentChatEndpoint=xpr;$0.RemoteAgentChatEndpoint=xpr=Mai([j0(2,Gai.IDomainService),j0(3,SEa.ICAPIClientService),j0(4,_Ea.IFetcherService),j0(5,TEa.ITelemetryService),j0(6,yEa.IAuthenticationService),j0(7,Lai.IChatMLFetcher),j0(8,qai.ITokenizerProvider),j0(9,Bai.IInstantiationService),j0(10,QK.IConfigurationService),j0(11,Qai.IExperimentationService),j0(12,Uai.IChatWebSocketManager),j0(13,Fai.ILogService)],xpr)});var jai=T(JB=>{"use strict";f();var xEa=JB&&JB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Zv=JB&&JB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(JB,"__esModule",{value:!0});JB.CopilotChatEndpoint=void 0;var wEa=Po(),REa=cA(),PEa=WB(),kEa=ac(),DEa=Ww(),NEa=D0(),MEa=zm(),OEa=nQ(),BEa=cd(),LEa=bp(),FEa=LK(),UEa=$y(),QEa=oQ(),qEa=qK(),Rpr=class extends qEa.ChatEndpoint{static{a(this,"CopilotChatEndpoint")}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A){super(e,r,u,d,p,h,m,g,A)}getCompletionsCallback(){return(e,r)=>{r&&r.id&&(e.reasoning_opaque=r.id,e.reasoning_text=Array.isArray(r.text)?r.text.join(""):r.text)}}};JB.CopilotChatEndpoint=Rpr;JB.CopilotChatEndpoint=Rpr=xEa([Zv(1,QEa.IDomainService),Zv(2,UEa.ICAPIClientService),Zv(3,MEa.IFetcherService),Zv(4,DEa.IEnvService),Zv(5,LEa.ITelemetryService),Zv(6,REa.IAuthenticationService),Zv(7,PEa.IChatMLFetcher),Zv(8,FEa.ITokenizerProvider),Zv(9,wEa.IInstantiationService),Zv(10,kEa.IConfigurationService),Zv(11,BEa.IExperimentationService),Zv(12,OEa.IChatWebSocketManager),Zv(13,NEa.ILogService)],Rpr)});var Ppr=T(WD=>{"use strict";f();var GEa=WD&&WD.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},eb=WD&&WD.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(WD,"__esModule",{value:!0});WD.AutoChatEndpoint=void 0;WD.isAutoModel=o_a;var HEa=Po(),jEa=cA(),$Ea=WB(),VEa=ac(),WEa=Ww(),zEa=D0(),YEa=zm(),KEa=nQ(),JEa=cd(),XEa=bp(),ZEa=LK(),e_a=$y(),t_a=oQ(),r_a=qK(),n_a=jai(),aRe=class extends n_a.CopilotChatEndpoint{static{a(this,"AutoChatEndpoint")}static{this.pseudoModelId="auto"}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_){super(i_a(e,r,n),s,c,l,u,d,p,h,m,g,A,y,E,_),this.discountRange=o}};WD.AutoChatEndpoint=aRe;WD.AutoChatEndpoint=aRe=GEa([eb(4,t_a.IDomainService),eb(5,e_a.ICAPIClientService),eb(6,YEa.IFetcherService),eb(7,WEa.IEnvService),eb(8,XEa.ITelemetryService),eb(9,jEa.IAuthenticationService),eb(10,$Ea.IChatMLFetcher),eb(11,ZEa.ITokenizerProvider),eb(12,HEa.IInstantiationService),eb(13,VEa.IConfigurationService),eb(14,JEa.IExperimentationService),eb(15,KEa.IChatWebSocketManager),eb(16,zEa.ILogService)],aRe);function i_a(t,e,r){let n;t instanceof r_a.ChatEndpoint?n=t.modelMetadata:n={id:t.model,vendor:t.modelProvider,name:t.name,version:t.version,model_picker_enabled:t.showInModelPicker,is_chat_default:!0,is_chat_fallback:t.isFallback,capabilities:{type:"chat",family:t.family,tokenizer:t.tokenizer,limits:{max_prompt_tokens:t.modelMaxPromptTokens,max_output_tokens:t.maxOutputTokens},supports:{tool_calls:t.supportsToolCalls,vision:t.supportsVision,prediction:t.supportsPrediction,streaming:!0}},billing:t.isPremium!==void 0||t.multiplier!==void 0||t.restrictedToSkus!==void 0?{is_premium:t.isPremium??!1,multiplier:t.multiplier??0,restricted_to:t.restrictedToSkus}:void 0,custom_model:t.customModel};let o=Math.round((t.multiplier??0)*(1-r)*100)/100;return{...n,warning_messages:void 0,model_picker_enabled:!0,info_messages:void 0,billing:{is_premium:n.billing?.is_premium??!1,multiplier:o,restricted_to:n.billing?.restricted_to},requestHeaders:{...n.requestHeaders||{},"Copilot-Session-Token":e}}}a(i_a,"calculateAutoModelInfo");function o_a(t){return t&&(t.model===aRe.pseudoModelId||t instanceof aRe)?1:-1}a(o_a,"isAutoModel")});var Wai=T(mde=>{"use strict";f();Object.defineProperty(mde,"__esModule",{value:!0});mde.ChatFailKind=mde.FetchResponseKind=void 0;var $ai;(function(t){t.Success="success",t.Failed="failed",t.Canceled="canceled"})($ai||(mde.FetchResponseKind=$ai={}));var Vai;(function(t){t.OffTopic="offTopic",t.TokenExpiredOrInvalid="tokenExpiredOrInvalid",t.ServerCanceled="serverCanceled",t.ClientNotSupported="clientNotSupported",t.RateLimited="rateLimited",t.QuotaExceeded="quotaExceeded",t.ExtensionBlocked="extensionBlocked",t.ServerError="serverError",t.ContentFilter="contentFilter",t.AgentUnauthorized="unauthorized",t.AgentFailedDependency="failedDependency",t.ValidationFailed="validationFailed",t.InvalidPreviousResponseId="invalidPreviousResponseId",t.NotFound="notFound",t.Unknown="unknown"})(Vai||(mde.ChatFailKind=Vai={}))});var Tct=T(_A=>{"use strict";f();Object.defineProperty(_A,"__esModule",{value:!0});_A.StdAttr=_A.CopilotChatAttr=_A.GenAiAttr=_A.GenAiToolType=_A.GenAiTokenType=_A.GenAiProviderName=_A.GenAiOperationName=void 0;_A.GenAiOperationName={CHAT:"chat",INVOKE_AGENT:"invoke_agent",EXECUTE_TOOL:"execute_tool",EMBEDDINGS:"embeddings",CONTENT_EVENT:"content_event",EXECUTE_HOOK:"execute_hook"};_A.GenAiProviderName={GITHUB:"github",OPENAI:"openai",ANTHROPIC:"anthropic",AZURE_AI_OPENAI:"azure.ai.openai"};_A.GenAiTokenType={INPUT:"input",OUTPUT:"output"};_A.GenAiToolType={FUNCTION:"function",EXTENSION:"extension"};_A.GenAiAttr={OPERATION_NAME:"gen_ai.operation.name",PROVIDER_NAME:"gen_ai.provider.name",REQUEST_MODEL:"gen_ai.request.model",REQUEST_TEMPERATURE:"gen_ai.request.temperature",REQUEST_MAX_TOKENS:"gen_ai.request.max_tokens",REQUEST_TOP_P:"gen_ai.request.top_p",REQUEST_FREQUENCY_PENALTY:"gen_ai.request.frequency_penalty",REQUEST_PRESENCE_PENALTY:"gen_ai.request.presence_penalty",REQUEST_SEED:"gen_ai.request.seed",REQUEST_STOP_SEQUENCES:"gen_ai.request.stop_sequences",RESPONSE_MODEL:"gen_ai.response.model",RESPONSE_ID:"gen_ai.response.id",RESPONSE_FINISH_REASONS:"gen_ai.response.finish_reasons",USAGE_INPUT_TOKENS:"gen_ai.usage.input_tokens",USAGE_OUTPUT_TOKENS:"gen_ai.usage.output_tokens",USAGE_CACHE_READ_INPUT_TOKENS:"gen_ai.usage.cache_read.input_tokens",USAGE_CACHE_CREATION_INPUT_TOKENS:"gen_ai.usage.cache_creation.input_tokens",USAGE_REASONING_TOKENS:"gen_ai.usage.reasoning_tokens",CONVERSATION_ID:"gen_ai.conversation.id",OUTPUT_TYPE:"gen_ai.output.type",TOKEN_TYPE:"gen_ai.token.type",AGENT_NAME:"gen_ai.agent.name",AGENT_ID:"gen_ai.agent.id",AGENT_VERSION:"gen_ai.agent.version",AGENT_DESCRIPTION:"gen_ai.agent.description",TOOL_NAME:"gen_ai.tool.name",TOOL_TYPE:"gen_ai.tool.type",TOOL_CALL_ID:"gen_ai.tool.call.id",TOOL_DESCRIPTION:"gen_ai.tool.description",TOOL_CALL_ARGUMENTS:"gen_ai.tool.call.arguments",TOOL_CALL_RESULT:"gen_ai.tool.call.result",INPUT_MESSAGES:"gen_ai.input.messages",OUTPUT_MESSAGES:"gen_ai.output.messages",SYSTEM_INSTRUCTIONS:"gen_ai.system_instructions",TOOL_DEFINITIONS:"gen_ai.tool.definitions"};_A.CopilotChatAttr={LOCATION:"copilot_chat.location",INTENT:"copilot_chat.intent",TURN_INDEX:"copilot_chat.turn.index",TURN_COUNT:"copilot_chat.turn_count",TOOL_CALL_ROUND:"copilot_chat.tool_call_round",API_TYPE:"copilot_chat.api_type",FETCHER:"copilot_chat.fetcher",DEBUG_NAME:"copilot_chat.debug_name",ENDPOINT_TYPE:"copilot_chat.endpoint_type",MAX_PROMPT_TOKENS:"copilot_chat.request.max_prompt_tokens",TIME_TO_FIRST_TOKEN:"copilot_chat.time_to_first_token",SESSION_ID:"copilot_chat.session_id",SERVER_REQUEST_ID:"copilot_chat.server_request_id",CANCELED:"copilot_chat.canceled",REASONING_CONTENT:"copilot_chat.reasoning_content",USER_REQUEST:"copilot_chat.user_request",PROMPT_CONTEXT:"copilot_chat.prompt_context",PROMPT_INSTRUCTIONS:"copilot_chat.prompt_instructions",CHAT_SESSION_ID:"copilot_chat.chat_session_id",PARENT_CHAT_SESSION_ID:"copilot_chat.parent_chat_session_id",DEBUG_LOG_LABEL:"copilot_chat.debug_log_label",MARKDOWN_CONTENT:"copilot_chat.markdown_content",EDIT_SOURCE:"copilot_chat.edit.source",EDIT_OUTCOME:"copilot_chat.edit.outcome",LANGUAGE_ID:"copilot_chat.language_id",TIME_DELAY_MS:"copilot_chat.time_delay_ms",HAS_REMAINING_EDITS:"copilot_chat.has_remaining_edits"};_A.StdAttr={ERROR_TYPE:"error.type",SERVER_ADDRESS:"server.address",SERVER_PORT:"server.port"}});var kpr=T(GK=>{"use strict";f();Object.defineProperty(GK,"__esModule",{value:!0});GK.truncateForOTel=a_a;GK.toInputMessages=c_a;GK.toOutputMessages=l_a;GK.toSystemInstructions=u_a;GK.toToolDefinitions=d_a;var s_a=64e3;function a_a(t,e=s_a){if(t.length<=e)return t;let r=`...[truncated, original ${t.length} chars]`;return t.substring(0,e-r.length)+r}a(a_a,"truncateForOTel");function c_a(t){return t.map(e=>{let r=[];if(e.content&&r.push({type:"text",content:e.content}),e.tool_calls)for(let n of e.tool_calls){let o;try{o=JSON.parse(n.function.arguments)}catch{o=n.function.arguments}r.push({type:"tool_call",id:n.id,name:n.function.name,arguments:o})}return{role:e.role,parts:r}})}a(c_a,"toInputMessages");function l_a(t){return t.map(e=>{let r=[],n=e.message;if(n?.content&&r.push({type:"text",content:n.content}),n?.tool_calls)for(let o of n.tool_calls){let s;try{s=JSON.parse(o.function.arguments)}catch{s=o.function.arguments}r.push({type:"tool_call",id:o.id,name:o.function.name,arguments:s})}return{role:n?.role??"assistant",parts:r,finish_reason:e.finish_reason}})}a(l_a,"toOutputMessages");function u_a(t){if(t)return[{type:"text",content:t}]}a(u_a,"toSystemInstructions");function d_a(t){if(!(!t||t.length===0))return t.filter(e=>!!e.function).map(e=>({type:"function",name:e.function.name,description:e.function.description,parameters:e.function.parameters}))}a(d_a,"toToolDefinitions")});var zai=T(tI=>{"use strict";f();Object.defineProperty(tI,"__esModule",{value:!0});tI.emitInferenceDetailsEvent=f_a;tI.emitSessionStartEvent=p_a;tI.emitToolCallEvent=h_a;tI.emitAgentTurnEvent=m_a;tI.emitEditFeedbackEvent=g_a;tI.emitEditHunkActionEvent=A_a;tI.emitInlineDoneEvent=y_a;tI.emitEditSurvivalEvent=E_a;tI.emitUserFeedbackEvent=__a;tI.emitCloudSessionInvokeEvent=C_a;var V0=Tct(),Dpr=kpr();function f_a(t,e,r,n){let o={"event.name":"gen_ai.client.inference.operation.details",[V0.GenAiAttr.OPERATION_NAME]:V0.GenAiOperationName.CHAT,[V0.GenAiAttr.REQUEST_MODEL]:e.model};r&&(r.model&&(o[V0.GenAiAttr.RESPONSE_MODEL]=r.model),r.id&&(o[V0.GenAiAttr.RESPONSE_ID]=r.id),r.finishReasons&&(o[V0.GenAiAttr.RESPONSE_FINISH_REASONS]=r.finishReasons),r.inputTokens!==void 0&&(o[V0.GenAiAttr.USAGE_INPUT_TOKENS]=r.inputTokens),r.outputTokens!==void 0&&(o[V0.GenAiAttr.USAGE_OUTPUT_TOKENS]=r.outputTokens)),e.temperature!==void 0&&(o[V0.GenAiAttr.REQUEST_TEMPERATURE]=e.temperature),e.maxTokens!==void 0&&(o[V0.GenAiAttr.REQUEST_MAX_TOKENS]=e.maxTokens),n&&(o[V0.StdAttr.ERROR_TYPE]=n.type),t.config.captureContent&&(e.messages!==void 0&&(o[V0.GenAiAttr.INPUT_MESSAGES]=(0,Dpr.truncateForOTel)(JSON.stringify(e.messages))),e.systemMessage!==void 0&&(o[V0.GenAiAttr.SYSTEM_INSTRUCTIONS]=(0,Dpr.truncateForOTel)(JSON.stringify(e.systemMessage))),e.tools!==void 0&&(o[V0.GenAiAttr.TOOL_DEFINITIONS]=(0,Dpr.truncateForOTel)(JSON.stringify(e.tools)))),t.emitLogRecord(`GenAI inference: ${e.model}`,o)}a(f_a,"emitInferenceDetailsEvent");function p_a(t,e,r,n){t.emitLogRecord("copilot_chat.session.start",{"event.name":"copilot_chat.session.start","session.id":e,[V0.GenAiAttr.REQUEST_MODEL]:r,[V0.GenAiAttr.AGENT_NAME]:n})}a(p_a,"emitSessionStartEvent");function h_a(t,e,r,n,o){t.emitLogRecord(`copilot_chat.tool.call: ${e}`,{"event.name":"copilot_chat.tool.call",[V0.GenAiAttr.TOOL_NAME]:e,duration_ms:r,success:n,...o?{[V0.StdAttr.ERROR_TYPE]:o}:{}})}a(h_a,"emitToolCallEvent");function m_a(t,e,r,n,o){t.emitLogRecord(`copilot_chat.agent.turn: ${e}`,{"event.name":"copilot_chat.agent.turn","turn.index":e,[V0.GenAiAttr.USAGE_INPUT_TOKENS]:r,[V0.GenAiAttr.USAGE_OUTPUT_TOKENS]:n,tool_call_count:o})}a(m_a,"emitAgentTurnEvent");function g_a(t,e,r,n,o,s,c,l){t.emitLogRecord(`copilot_chat.edit.feedback: ${e}`,{"event.name":"copilot_chat.edit.feedback",outcome:e,language_id:r,participant:n,request_id:o,edit_surface:s,has_remaining_edits:c,is_notebook:l})}a(g_a,"emitEditFeedbackEvent");function A_a(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.edit.hunk.action: ${e}`,{"event.name":"copilot_chat.edit.hunk.action",outcome:e,language_id:r,request_id:n,line_count:o,lines_added:s,lines_removed:c})}a(A_a,"emitEditHunkActionEvent");function y_a(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.inline.done: ${e?"accepted":"rejected"}`,{"event.name":"copilot_chat.inline.done",accepted:e,language_id:r,edit_count:n,edit_line_count:o,reply_type:s,is_notebook:c})}a(y_a,"emitInlineDoneEvent");function E_a(t,e,r,n,o,s,c){t.emitLogRecord(`copilot_chat.edit.survival: ${e}`,{"event.name":"copilot_chat.edit.survival",edit_source:e,survival_rate_four_gram:r,survival_rate_no_revert:n,time_delay_ms:o,did_branch_change:s,request_id:c})}a(E_a,"emitEditSurvivalEvent");function __a(t,e,r,n,o){t.emitLogRecord(`copilot_chat.user.feedback: ${e}`,{"event.name":"copilot_chat.user.feedback",rating:e,participant:r,conversation_id:n,request_id:o})}a(__a,"emitUserFeedbackEvent");function C_a(t,e,r,n){t.emitLogRecord(`copilot_chat.cloud.session.invoke: ${e}`,{"event.name":"copilot_chat.cloud.session.invoke",partner_agent:e,model:r,request_id:n})}a(C_a,"emitCloudSessionInvokeEvent")});var Yai=T(Sct=>{"use strict";f();Object.defineProperty(Sct,"__esModule",{value:!0});Sct.GenAiMetrics=void 0;var ja=Tct(),Npr=class{static{a(this,"GenAiMetrics")}static recordOperationDuration(e,r,n){e.recordMetric("gen_ai.client.operation.duration",r,{[ja.GenAiAttr.OPERATION_NAME]:n.operationName,[ja.GenAiAttr.PROVIDER_NAME]:n.providerName,[ja.GenAiAttr.REQUEST_MODEL]:n.requestModel,...n.responseModel?{[ja.GenAiAttr.RESPONSE_MODEL]:n.responseModel}:{},...n.serverAddress?{[ja.StdAttr.SERVER_ADDRESS]:n.serverAddress}:{},...n.serverPort?{[ja.StdAttr.SERVER_PORT]:n.serverPort}:{},...n.errorType?{[ja.StdAttr.ERROR_TYPE]:n.errorType}:{}})}static recordTokenUsage(e,r,n,o){e.recordMetric("gen_ai.client.token.usage",r,{[ja.GenAiAttr.OPERATION_NAME]:o.operationName,[ja.GenAiAttr.PROVIDER_NAME]:o.providerName,[ja.GenAiAttr.TOKEN_TYPE]:n,[ja.GenAiAttr.REQUEST_MODEL]:o.requestModel,...o.responseModel?{[ja.GenAiAttr.RESPONSE_MODEL]:o.responseModel}:{},...o.serverAddress?{[ja.StdAttr.SERVER_ADDRESS]:o.serverAddress}:{}})}static recordToolCallCount(e,r,n){e.incrementCounter("copilot_chat.tool.call.count",1,{[ja.GenAiAttr.TOOL_NAME]:r,success:n})}static recordToolCallDuration(e,r,n){e.recordMetric("copilot_chat.tool.call.duration",n,{[ja.GenAiAttr.TOOL_NAME]:r})}static recordAgentDuration(e,r,n){e.recordMetric("copilot_chat.agent.invocation.duration",n,{[ja.GenAiAttr.AGENT_NAME]:r})}static recordAgentTurnCount(e,r,n){e.recordMetric("copilot_chat.agent.turn.count",n,{[ja.GenAiAttr.AGENT_NAME]:r})}static recordTimeToFirstToken(e,r,n){e.recordMetric("copilot_chat.time_to_first_token",n,{[ja.GenAiAttr.REQUEST_MODEL]:r})}static incrementSessionCount(e){e.incrementCounter("copilot_chat.session.count")}static recordEditAcceptance(e,r,n,o){e.incrementCounter("copilot_chat.edit.acceptance.count",1,{[ja.CopilotChatAttr.EDIT_SOURCE]:r,[ja.CopilotChatAttr.EDIT_OUTCOME]:n,...o?{[ja.CopilotChatAttr.LANGUAGE_ID]:o}:{}})}static recordChatEditOutcome(e,r,n,o,s){e.incrementCounter("copilot_chat.chat_edit.outcome.count",1,{[ja.CopilotChatAttr.EDIT_SOURCE]:r,[ja.CopilotChatAttr.EDIT_OUTCOME]:n,...o?{[ja.CopilotChatAttr.LANGUAGE_ID]:o}:{},...s!==void 0?{[ja.CopilotChatAttr.HAS_REMAINING_EDITS]:s}:{}})}static recordEditSurvivalFourGram(e,r,n,o){e.recordMetric("copilot_chat.edit.survival.four_gram",n,{[ja.CopilotChatAttr.EDIT_SOURCE]:r,[ja.CopilotChatAttr.TIME_DELAY_MS]:o})}static recordEditSurvivalNoRevert(e,r,n,o){e.recordMetric("copilot_chat.edit.survival.no_revert",n,{[ja.CopilotChatAttr.EDIT_SOURCE]:r,[ja.CopilotChatAttr.TIME_DELAY_MS]:o})}static incrementLinesOfCode(e,r,n,o){e.incrementCounter("copilot_chat.lines_of_code.count",o,{type:r,...n?{[ja.CopilotChatAttr.LANGUAGE_ID]:n}:{}})}static incrementUserActionCount(e,r){e.incrementCounter("copilot_chat.user.action.count",1,{action:r})}static incrementUserFeedbackCount(e,r){e.incrementCounter("copilot_chat.user.feedback.count",1,{rating:r})}static incrementAgentEditResponseCount(e,r){e.incrementCounter("copilot_chat.agent.edit_response.count",1,{outcome:r})}static incrementAgentSummarizationCount(e,r){e.incrementCounter("copilot_chat.agent.summarization.count",1,{outcome:r})}static incrementPullRequestCount(e){e.incrementCounter("copilot_chat.pull_request.count")}static incrementCloudSessionCount(e,r){e.incrementCounter("copilot_chat.cloud.session.count",1,{partner_agent:r})}static incrementCloudPrReadyCount(e){e.incrementCounter("copilot_chat.cloud.pr_ready.count")}};Sct.GenAiMetrics=Npr});var Opr=T(Ict=>{"use strict";f();Object.defineProperty(Ict,"__esModule",{value:!0});Ict.NoopOTelService=void 0;var Kai=Xa(),Jai={setAttribute(){},setAttributes(){},setStatus(){},recordException(){},addEvent(){},getSpanContext(){},end(){}},Mpr=class{static{a(this,"NoopOTelService")}constructor(e){this.onDidCompleteSpan=Kai.Event.None,this.onDidEmitSpanEvent=Kai.Event.None,this.config=e}startSpan(e,r){return Jai}startActiveSpan(e,r,n){return n(Jai)}getActiveTraceContext(){}storeTraceContext(e,r){}getStoredTraceContext(e){}runWithTraceContext(e,r){return r()}recordMetric(e,r,n){}incrementCounter(e,r,n){}emitLogRecord(e,r){}async flush(){}async shutdown(){}injectCompletedSpan(e){}};Ict.NoopOTelService=Mpr});var Lpr=T(Bpr=>{"use strict";f();Object.defineProperty(Bpr,"__esModule",{value:!0});Bpr.resolveOTelConfig=T_a;function v_a(t){if(!t)return{};let e={};for(let r of t.split(",")){let n=r.indexOf("=");if(n>0){let o=r.substring(0,n).trim(),s=r.substring(n+1).trim();o&&(e[o]=s)}}return e}a(v_a,"parseResourceAttributes");function b_a(t,e){if(!t)return;let r=t.replace(/^["']|["']$/g,"");try{let n=new URL(r);return e==="grpc"?n.origin:n.href}catch{return}}a(b_a,"parseOtlpEndpoint");function T_a(t){let{env:e}=t;if(t.vscodeTelemetryLevel==="off")return Xai(t);let r=t.settingDbSpanExporter??!1,n=(xct(e.COPILOT_OTEL_ENABLED)??t.settingEnabled??!!e.OTEL_EXPORTER_OTLP_ENDPOINT)||r,o=(xct(e.COPILOT_OTEL_ENABLED)??t.settingEnabled??!!e.OTEL_EXPORTER_OTLP_ENDPOINT)===!0;if(!n)return Xai(t);let c=(e.OTEL_EXPORTER_OTLP_PROTOCOL??e.COPILOT_OTEL_PROTOCOL)==="grpc"?"grpc":"http",l=e.COPILOT_OTEL_ENDPOINT??e.OTEL_EXPORTER_OTLP_ENDPOINT??t.settingOtlpEndpoint??"http://localhost:4318",u=b_a(l,c)??"http://localhost:4318",d=e.COPILOT_OTEL_FILE_EXPORTER_PATH??t.settingOutfile,p;d?p="file":t.settingExporterType?p=t.settingExporterType:p=c==="grpc"?"otlp-grpc":"otlp-http";let h=xct(e.COPILOT_OTEL_CAPTURE_CONTENT)??t.settingCaptureContent??!1,m=new Set(["trace","debug","info","warn","error"]),g=e.COPILOT_OTEL_LOG_LEVEL,A=g&&m.has(g)?g:"info",y=xct(e.COPILOT_OTEL_HTTP_INSTRUMENTATION)??!1,E=e.OTEL_SERVICE_NAME??"copilot-chat",_=v_a(e.OTEL_RESOURCE_ATTRIBUTES);return Object.freeze({enabled:!0,enabledExplicitly:o,exporterType:p,otlpEndpoint:u,otlpProtocol:c,captureContent:h,fileExporterPath:d,dbSpanExporter:r,logLevel:A,httpInstrumentation:y,serviceName:E,serviceVersion:t.extensionVersion,sessionId:t.sessionId,resourceAttributes:_})}a(T_a,"resolveOTelConfig");function Xai(t){return Object.freeze({enabled:!1,enabledExplicitly:!1,exporterType:"otlp-http",otlpEndpoint:"",otlpProtocol:"http",captureContent:!1,dbSpanExporter:!1,logLevel:"info",httpInstrumentation:!1,serviceName:"copilot-chat",serviceVersion:t.extensionVersion,sessionId:t.sessionId,resourceAttributes:{}})}a(Xai,"createDisabledConfig");function xct(t){if(t!==void 0)return t==="true"||t==="1"}a(xct,"envBool")});var Rct=T(wct=>{"use strict";f();Object.defineProperty(wct,"__esModule",{value:!0});wct.IOTelService=void 0;var S_a=qr();wct.IOTelService=(0,S_a.createServiceIdentifier)("IOTelService")});var Zai=T(ho=>{"use strict";f();Object.defineProperty(ho,"__esModule",{value:!0});ho.IOTelService=ho.resolveOTelConfig=ho.NoopOTelService=ho.truncateForOTel=ho.toToolDefinitions=ho.toSystemInstructions=ho.toOutputMessages=ho.toInputMessages=ho.GenAiMetrics=ho.emitToolCallEvent=ho.emitSessionStartEvent=ho.emitInferenceDetailsEvent=ho.emitAgentTurnEvent=ho.StdAttr=ho.GenAiToolType=ho.GenAiTokenType=ho.GenAiProviderName=ho.GenAiOperationName=ho.GenAiAttr=ho.CopilotChatAttr=void 0;var HK=Tct();Object.defineProperty(ho,"CopilotChatAttr",{enumerable:!0,get:a(function(){return HK.CopilotChatAttr},"get")});Object.defineProperty(ho,"GenAiAttr",{enumerable:!0,get:a(function(){return HK.GenAiAttr},"get")});Object.defineProperty(ho,"GenAiOperationName",{enumerable:!0,get:a(function(){return HK.GenAiOperationName},"get")});Object.defineProperty(ho,"GenAiProviderName",{enumerable:!0,get:a(function(){return HK.GenAiProviderName},"get")});Object.defineProperty(ho,"GenAiTokenType",{enumerable:!0,get:a(function(){return HK.GenAiTokenType},"get")});Object.defineProperty(ho,"GenAiToolType",{enumerable:!0,get:a(function(){return HK.GenAiToolType},"get")});Object.defineProperty(ho,"StdAttr",{enumerable:!0,get:a(function(){return HK.StdAttr},"get")});var Pct=zai();Object.defineProperty(ho,"emitAgentTurnEvent",{enumerable:!0,get:a(function(){return Pct.emitAgentTurnEvent},"get")});Object.defineProperty(ho,"emitInferenceDetailsEvent",{enumerable:!0,get:a(function(){return Pct.emitInferenceDetailsEvent},"get")});Object.defineProperty(ho,"emitSessionStartEvent",{enumerable:!0,get:a(function(){return Pct.emitSessionStartEvent},"get")});Object.defineProperty(ho,"emitToolCallEvent",{enumerable:!0,get:a(function(){return Pct.emitToolCallEvent},"get")});var I_a=Yai();Object.defineProperty(ho,"GenAiMetrics",{enumerable:!0,get:a(function(){return I_a.GenAiMetrics},"get")});var cRe=kpr();Object.defineProperty(ho,"toInputMessages",{enumerable:!0,get:a(function(){return cRe.toInputMessages},"get")});Object.defineProperty(ho,"toOutputMessages",{enumerable:!0,get:a(function(){return cRe.toOutputMessages},"get")});Object.defineProperty(ho,"toSystemInstructions",{enumerable:!0,get:a(function(){return cRe.toSystemInstructions},"get")});Object.defineProperty(ho,"toToolDefinitions",{enumerable:!0,get:a(function(){return cRe.toToolDefinitions},"get")});Object.defineProperty(ho,"truncateForOTel",{enumerable:!0,get:a(function(){return cRe.truncateForOTel},"get")});var x_a=Opr();Object.defineProperty(ho,"NoopOTelService",{enumerable:!0,get:a(function(){return x_a.NoopOTelService},"get")});var w_a=Lpr();Object.defineProperty(ho,"resolveOTelConfig",{enumerable:!0,get:a(function(){return w_a.resolveOTelConfig},"get")});var R_a=Rct();Object.defineProperty(ho,"IOTelService",{enumerable:!0,get:a(function(){return R_a.IOTelService},"get")})});var tci=T(kct=>{"use strict";f();Object.defineProperty(kct,"__esModule",{value:!0});kct.calculateLineRepetitionStats=k_a;kct.isRepetitive=D_a;var P_a=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60},{max_token_sequence_length:60,last_tokens_to_consider:120}];function k_a(t){if(t.length===0)return{numberOfRepetitions:0,mostRepeatedLine:"",totalLines:0};let e=new Map,r=t.split(` +`);for(let s of r){if(s=s.trim(),s.length===0)continue;let c=e.get(s)||0;e.set(s,c+1)}let n="",o=0;for(let[s,c]of e.entries())c>o&&(o=c,n=s);return{numberOfRepetitions:o,mostRepeatedLine:n,totalLines:r.length}}a(k_a,"calculateLineRepetitionStats");function D_a(t){let e=t.slice();return e.reverse(),eci(e)||eci(e.filter(r=>r.trim().length>0))}a(D_a,"isRepetitive");function eci(t){let e=N_a(t);for(let r of P_a){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(N_a,"kmp_prefix_function")});var Fpr=T(zD=>{"use strict";f();var M_a=zD&&zD.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},cQ=zD&&zD.__param||function(t,e){return function(r,n){e(r,n,t)}},rI;Object.defineProperty(zD,"__esModule",{value:!0});zD.OpenAIEndpoint=void 0;zD.isBYOKModel=W_a;var O_a=WB(),rci=QD(),B_a=ac(),L_a=oQ(),F_a=qK(),U_a=D0(),Q_a=xK(),q_a=Zat(),G_a=nQ(),H_a=cd(),j_a=LK(),$_a=Po();function V_a(t){return t.type===rci.ChatFetchResponseType.Failed&&t.streamError?{type:t.type,requestId:t.requestId,serverRequestId:t.serverRequestId,reason:JSON.stringify(t.streamError)}:t.type===rci.ChatFetchResponseType.RateLimited?{type:t.type,requestId:t.requestId,serverRequestId:t.serverRequestId,reason:t.capiError?`Rate limit exceeded -`+JSON.stringify(t.capiError):"Rate limit exceeded",rateLimitKey:"",retryAfter:void 0,isAuto:!1,capiError:t.capiError}:t}a($ya,"hydrateBYOKErrorMessages");function Vya(t){return t?t instanceof Tlt||t.isExtensionContributed?1:t.customModel?2:-1:-1}a(Vya,"isBYOKModel");var Tlt=class extends Lya.ChatEndpoint{static{a(this,"OpenAIEndpoint")}static{hI=this}static{this._reservedHeaders=new Set(["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","date","dnt","expect","host","keep-alive","origin","permissions-policy","referer","te","trailer","transfer-encoding","upgrade","user-agent","via","forwarded","x-forwarded-for","x-forwarded-host","x-forwarded-proto","api-key","authorization","content-type","openai-intent","x-github-api-version","x-initiator","x-interaction-id","x-interaction-type","x-onbehalf-extension-id","x-request-id","x-vscode-user-agent-library-version"])}static{this._validHeaderNamePattern=/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/}static{this._maxHeaderNameLength=256}static{this._maxHeaderValueLength=8192}static{this._maxCustomHeaderCount=20}constructor(e,r,n,o,s,c,l,u,d,p,h){super(e,o,s,c,l,u,d,p,h),this._apiKey=r,this._modelUrl=n,this.instantiationService=l,this.logService=h,this._customHeaders=this._sanitizeCustomHeaders(e.requestHeaders)}_sanitizeCustomHeaders(e){if(!e)return{};let r=Object.entries(e);r.length>hI._maxCustomHeaderCount&&this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has ${r.length} custom headers, exceeding limit of ${hI._maxCustomHeaderCount}. Only first ${hI._maxCustomHeaderCount} will be processed.`);let n={},o=0;for(let[s,c]of r){if(o>=hI._maxCustomHeaderCount)break;let l=s.trim();if(!l){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has empty header name, skipping.`);continue}if(l.length>hI._maxHeaderNameLength){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has header name exceeding ${hI._maxHeaderNameLength} characters, skipping.`);continue}if(!hI._validHeaderNamePattern.test(l)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has invalid header name format: '${l}', Skipping.`);continue}let u=l.toLowerCase();if(hI._reservedHeaders.has(u)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to override reserved header '${l}', skipping.`);continue}if(u.startsWith("proxy-")||u.startsWith("sec-")){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to set forbidden header pattern '${l}', skipping.`);continue}if(u==="x-http-method"||u==="x-http-method-override"||u==="x-method-override"){let p=["connect","trace","track"],h=String(c).toLowerCase().trim();if(p.includes(h)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to set forbidden method '${h}' in header '${l}', skipping.`);continue}}let d=this._sanitizeHeaderValue(c);if(d===void 0){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has invalid value for header '${l}': '${c}', skipping.`);continue}n[l]=d,o++}return n}_sanitizeHeaderValue(e){if(typeof e!="string")return;let r=e.trim();if(!(r.length>hI._maxHeaderValueLength)&&!/[\x00-\x1F\x7F]/.test(r)&&!/[\u200B-\u200D\u202A-\u202E\uFEFF]/.test(r))return r}createRequestBody(e){if(this.useResponsesApi){e.ignoreStatefulMarker=!1;let r=super.createRequestBody(e);return r.store=!0,r.n=void 0,r.stream_options=void 0,this.modelMetadata.capabilities.supports.thinking||(r.reasoning=void 0,r.include=void 0),r.previous_response_id&&(!r.previous_response_id.startsWith("resp_")||this.modelMetadata.zeroDataRetentionEnabled)&&(r.previous_response_id=void 0),r}else{let r=a((o,s)=>{s&&s.id&&(o.cot_id=s.id,o.cot_summary=Array.isArray(s.text)?s.text.join(""):s.text)},"callback");return(0,Qya.createCapiRequestBody)(e,this.model,r)}}interceptBody(e){super.interceptBody(e),e?.tools?.length===0&&delete e.tools,e?.tools&&(e.tools=e.tools.map(r=>((0,Uya.isOpenAiFunctionTool)(r)&&r.function.parameters===void 0&&(r.function.parameters={type:"object",properties:{}}),r))),e&&(this.modelMetadata.capabilities.supports.thinking&&(delete e.temperature,e.max_completion_tokens=e.max_tokens,delete e.max_tokens),delete e.max_tokens,!this.useResponsesApi&&e.stream&&(e.stream_options={include_usage:!0}))}get urlOrRequestMetadata(){return this._modelUrl}getExtraHeaders(){let e={"Content-Type":"application/json"};this._modelUrl.includes("openai.azure")?e["api-key"]=this._apiKey:e.Authorization=`Bearer ${this._apiKey}`;for(let[r,n]of Object.entries(this._customHeaders))e[r]=n;return e}cloneWithTokenOverride(e){let r={...this.modelMetadata,maxInputTokens:e};return this.instantiationService.createInstance(hI,r,this._apiKey,this._modelUrl)}async makeChatRequest2(e,r){let n={...e,ignoreStatefulMarker:!1},o=await super.makeChatRequest2(n,r);return $ya(o)}};s5.OpenAIEndpoint=Tlt;s5.OpenAIEndpoint=Tlt=hI=Dya([OQ(3,Bya.IDomainService),OQ(4,Mya.IChatMLFetcher),OQ(5,Hya.ITokenizerProvider),OQ(6,jya.IInstantiationService),OQ(7,Oya.IConfigurationService),OQ(8,Gya.IExperimentationService),OQ(9,qya.IChatWebSocketManager),OQ(10,Fya.ILogService)],Tlt)});var iai=T(s2=>{"use strict";f();Object.defineProperty(s2,"__esModule",{value:!0});s2.EXTENSION_ID=s2.agentsToCommands=s2.GITHUB_PLATFORM_AGENT=void 0;s2.getAgentForIntent=zya;var Wya=XD();s2.GITHUB_PLATFORM_AGENT="github.copilot-dynamic.platform";s2.agentsToCommands={editAgent:{explain:"explain",edit:"edit",review:"review",tests:"tests",fix:"fix",new:"new",newNotebook:"newNotebook",semanticSearch:"semanticSearch",setupTests:"setupTests",compact:"editAgent"},vscode:{search:"search"},terminal:{explain:"terminalExplain"},editor:{doc:"doc",fix:"fix",explain:"explain",review:"review",tests:"tests",edit:"edit",generate:"generate"}};function zya(t,e){if(Object.keys(s2.agentsToCommands).includes(t))return{agent:t};for(let[r,n]of Object.entries(s2.agentsToCommands))if(!(e===Wya.ChatLocation.Editor&&r!=="editor")&&Object.values(n).includes(t))return{agent:r,command:t}}a(zya,"getAgentForIntent");s2.EXTENSION_ID="GitHub.copilot-chat"});var aai=T(Slt=>{"use strict";f();Object.defineProperty(Slt,"__esModule",{value:!0});Slt.ChatMLFetcherTelemetrySender=void 0;var oai=upr(),sai=ypr(),Epr=class{static{a(this,"ChatMLFetcherTelemetrySender")}static sendSuccessTelemetry(e,{chatCompletion:r,baseTelemetry:n,userInitiatedRequest:o,chatEndpointInfo:s,requestBody:c,maxResponseTokens:l,promptTokenCount:u,timeToFirstToken:d,timeToFirstTokenEmitted:p,hasImageMessages:h,transport:m,fetcher:g,bytesReceived:A,suspendEventSeen:y,resumeEventSeen:E}){e.sendTelemetryEvent("response.success",{github:!0,microsoft:!0},{reason:r.finishReason,filterReason:r.filterReason,source:n?.properties.messageSource??"unknown",initiatorType:o?"user":"agent",model:s?.model,modelInvoked:r.model,apiType:s?.apiType,requestId:r.requestId.headerRequestId,gitHubRequestId:r.requestId.gitHubRequestId,associatedRequestId:n?.properties.associatedRequestId,reasoningEffort:c.reasoning?.effort,reasoningSummary:c.reasoning?.summary,...g?{fetcher:g}:{},transport:m,...n?.properties.retryAfterError?{retryAfterError:n.properties.retryAfterError}:{},...n?.properties.retryAfterErrorGitHubRequestId?{retryAfterErrorGitHubRequestId:n.properties.retryAfterErrorGitHubRequestId}:{},...n?.properties.connectivityTestError?{connectivityTestError:n.properties.connectivityTestError}:{},...n?.properties.connectivityTestErrorGitHubRequestId?{connectivityTestErrorGitHubRequestId:n.properties.connectivityTestErrorGitHubRequestId}:{},...n?.properties.retryAfterFilterCategory?{retryAfterFilterCategory:n.properties.retryAfterFilterCategory}:{}},{totalTokenMax:s?.modelMaxPromptTokens??-1,tokenCountMax:l,promptTokenCount:r.usage?.prompt_tokens,promptCacheTokenCount:r.usage?.prompt_tokens_details?.cached_tokens,clientPromptTokenCount:u,tokenCount:r.usage?.total_tokens,reasoningTokens:r.usage?.completion_tokens_details?.reasoning_tokens,acceptedPredictionTokens:r.usage?.completion_tokens_details?.accepted_prediction_tokens,rejectedPredictionTokens:r.usage?.completion_tokens_details?.rejected_prediction_tokens,completionTokens:r.usage?.completion_tokens,timeToFirstToken:d,timeToFirstTokenEmitted:p,timeToComplete:Date.now()-n.issuedTime,issuedTime:n.issuedTime,isVisionRequest:h?1:-1,isBYOK:(0,sai.isBYOKModel)(s),isAuto:(0,oai.isAutoModel)(s),bytesReceived:A,suspendEventSeen:y?1:0,resumeEventSeen:E?1:0})}static sendCancellationTelemetry(e,{source:r,requestId:n,model:o,apiType:s,transport:c,associatedRequestId:l,retryAfterError:u,retryAfterErrorGitHubRequestId:d,connectivityTestError:p,connectivityTestErrorGitHubRequestId:h,retryAfterFilterCategory:m,fetcher:g,suspendEventSeen:A,resumeEventSeen:y},{totalTokenMax:E,promptTokenCount:_,tokenCountMax:v,timeToFirstToken:b,timeToFirstTokenEmitted:I,timeToCancelled:x,isVisionRequest:R,isBYOK:w,isAuto:P,bytesReceived:k,issuedTime:Q}){e.sendTelemetryEvent("response.cancelled",{github:!0,microsoft:!0},{apiType:s,source:r,requestId:n,model:o,associatedRequestId:l,...g?{fetcher:g}:{},transport:c,...u?{retryAfterError:u}:{},...d?{retryAfterErrorGitHubRequestId:d}:{},...p?{connectivityTestError:p}:{},...h?{connectivityTestErrorGitHubRequestId:h}:{},...m?{retryAfterFilterCategory:m}:{}},{totalTokenMax:E,promptTokenCount:_,tokenCountMax:v,timeToFirstToken:b,timeToFirstTokenEmitted:I,timeToCancelled:x,timeToComplete:x,issuedTime:Q,isVisionRequest:R,isBYOK:w,isAuto:P,bytesReceived:k,suspendEventSeen:A?1:0,resumeEventSeen:y?1:0})}static sendResponseErrorTelemetry(e,{processed:r,telemetryProperties:n,chatEndpointInfo:o,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToFirstToken:u,isVisionRequest:d,transport:p,fetcher:h,bytesReceived:m,issuedTime:g,wasRetried:A,suspendEventSeen:y,resumeEventSeen:E}){e.sendTelemetryEvent("response.error",{github:!0,microsoft:!0},{type:r.type,reason:r.reasonDetail||r.reason,source:n?.messageSource??"unknown",requestId:r.requestId,gitHubRequestId:r.serverRequestId,model:o.model,apiType:o.apiType,reasoningEffort:s.reasoning?.effort,reasoningSummary:s.reasoning?.summary,...h?{fetcher:h}:{},transport:p,associatedRequestId:n?.associatedRequestId,...n?.retryAfterError?{retryAfterError:n.retryAfterError}:{},...n?.retryAfterErrorGitHubRequestId?{retryAfterErrorGitHubRequestId:n.retryAfterErrorGitHubRequestId}:{},...n?.connectivityTestError?{connectivityTestError:n.connectivityTestError}:{},...n?.connectivityTestErrorGitHubRequestId?{connectivityTestErrorGitHubRequestId:n.connectivityTestErrorGitHubRequestId}:{},...n?.retryAfterFilterCategory?{retryAfterFilterCategory:n.retryAfterFilterCategory}:{}},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:c,tokenCountMax:l,timeToFirstToken:u,timeToComplete:Date.now()-g,issuedTime:g,isVisionRequest:d?1:-1,isBYOK:(0,sai.isBYOKModel)(o),isAuto:(0,oai.isAutoModel)(o),wasRetried:A?1:0,bytesReceived:m,suspendEventSeen:y?1:0,resumeEventSeen:E?1:0})}};Slt.ChatMLFetcherTelemetrySender=Epr});var mai=T(mb=>{"use strict";f();var Yya=mb&&mb.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},sE=mb&&mb.__param||function(t,e){return function(r,n){e(r,n,t)}},bpr;Object.defineProperty(mb,"__esModule",{value:!0});mb.ChatMLFetcherImpl=mb.AbstractChatMLFetcher=void 0;mb.createTelemetryData=hai;mb.locationToIntent=Ipr;var Kya=po(),Jya=gA(),Xya=d3(),Zya=a0r(),Sn=XD(),eEa=c0r(),f2e=zRe(),tEa=u0r(),BQ=fc(),rEa=eE(),Ilt=upr(),xlt=rpr(),Tpr=L0(),nEa=jct(),Cpr=CJ(),iEa=ig(),wlt=$ct(),hb=i3(),cai=r2e(),pai=PQ(),lai=Jct(),Kr=zsi(),Ui=eai(),oEa=_lt(),Plt=Bde(),sEa=gd(),aEa=Rp(),nfe=Zde(),Rlt=rai(),cEa=Ay(),uai=wc(),dai=es(),lEa=nc(),uEa=so(),dEa=C0(),_pr=Np(),fEa=Mo(),fai=ypr(),pEa=iai(),hEa=i0r(),rfe=aai(),klt=class extends uEa.Disposable{static{a(this,"AbstractChatMLFetcher")}constructor(e){super(),this.options=e,this._onDidMakeChatMLRequest=this._register(new lEa.Emitter),this.onDidMakeChatMLRequest=this._onDidMakeChatMLRequest.event}preparePostOptions(e){return{temperature:this.options.temperature,top_p:this.options.topP,...e,stream:!0}}async fetchOne(e,r){let n=await this.fetchMany({...e,requestOptions:{...e.requestOptions,n:1}},r);return n.type===Sn.ChatFetchResponseType.Success?{...n,value:n.value[0]}:n}};mb.AbstractChatMLFetcher=klt;var Spr=class extends klt{static{a(this,"ChatMLFetcherImpl")}static{bpr=this}static{this._maxConsecutiveWebSocketFallbacks=3}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y){super(d),this._fetcherService=e,this._telemetryService=r,this._requestLogger=n,this._logService=o,this._authenticationService=s,this._interactionService=c,this._chatQuotaService=l,this._capiClientService=u,this._configurationService=p,this._experimentationService=h,this._powerService=m,this._instantiationService=g,this._webSocketManager=A,this._otelService=y,this.connectivityCheckDelays=[1e3,1e4,1e4],this._consecutiveWebSocketRetryFallbacks=0}async fetchMany(e,r){let{debugName:n,endpoint:o,finishedCb:s,location:c,messages:l,requestOptions:u,source:d,telemetryProperties:p,userInitiatedRequest:h,requestKindOptions:m,conversationId:g,turnId:A,useWebSocket:y,ignoreStatefulMarker:E}=e;y&&this._consecutiveWebSocketRetryFallbacks>=bpr._maxConsecutiveWebSocketFallbacks&&(this._logService.debug(`[ChatWebSocketManager] Disabling WebSocket for request due to ${this._consecutiveWebSocketRetryFallbacks} consecutive WebSocket failures with successful HTTP fallback.`),y=!1,E=!0),p||(p={}),p.messageSource||(p.messageSource=n);let _=y?"websocket":"http",v=p.requestId??p.messageId??(0,_pr.generateUuid)(),b=o.maxOutputTokens;u?.prediction||(u={max_tokens:b,...u}),u.prediction?.content||delete u.prediction;let I=this.preparePostOptions(u),x=o.createRequestBody({...e,ignoreStatefulMarker:E,requestId:v,postOptions:I}),R=nfe.TelemetryData.createAndMarkAsIssued({...p,baseModel:o.model,uiKind:Sn.ChatLocation.toString(c)}),w=this._requestLogger.logChatRequest(n,o,{messages:e.messages,model:o.model,ourRequestId:v,location:e.location,body:x,ignoreStatefulMarker:E,isConversationRequest:e.isConversationRequest,customMetadata:e.customMetadata}),P=-1,k=new Xya.FetchStreamRecorder(s),Q=e.enableRetryOnError??e.enableRetryOnFilter,M=e.canRetryOnceWithoutRollback??!(e.enableRetryOnFilter||e.enableRetryOnError),D,G,O,N,F,U,L;try{let H,$=mEa(e.messages,I,o,this._configurationService,this._experimentationService);if(!$.isValid)H={type:Kr.FetchResponseKind.Failed,modelRequestId:void 0,failKind:Kr.ChatFailKind.ValidationFailed,reason:$.reason};else{let j=await this._authenticationService.getCopilotToken();D=j.username;let ce=await this._fetchAndStreamChat(o,x,R,k.callback,u.secretKey,j,e.location,v,I.n,r,h,y,A,g,p,e.useFetcher,M,m);if(H=ce.result,G=ce.fetcher,O=ce.bytesReceived,N=ce.statusCode,F=ce.suspendEventSeen,U=ce.resumeEventSeen,L=ce.otelSpan,L?.setAttribute(Ui.GenAiAttr.AGENT_NAME,n),L){let Te=x.messages,fe=Te?.filter(Ue=>Ue.role==="user"),De=fe?.[fe.length-1];De?.content&&L.setAttribute(Ui.CopilotChatAttr.USER_REQUEST,De.content);let Ve=Te?.find(Ue=>Ue.role==="system");Ve?.content&&L.setAttribute(Ui.GenAiAttr.SYSTEM_INSTRUCTIONS,Ve.content)}if(L){let Te=x.messages;Te&&L.setAttribute(Ui.GenAiAttr.INPUT_MESSAGES,(0,Ui.truncateForOTel)(JSON.stringify((0,Ui.toInputMessages)(Te))))}P=await o.acquireTokenizer().countMessagesTokens(l);let J=d?.extensionId??pEa.EXTENSION_ID;this._onDidMakeChatMLRequest.fire({messages:l,model:o.model,source:{extensionId:J},tokenCount:P})}let W=Date.now()-R.issuedTime;switch(w?.markTimeToFirstToken(W),H.type){case Kr.FetchResponseKind.Success:{let j=await this.processSuccessfulResponse(H,l,x,v,b,P,W,k,R,o,h,_,G,O,F,U);if(j.type===Sn.ChatFetchResponseType.FilteredRetry){if(e.enableRetryOnFilter){k.callback("",0,{text:"",retryReason:j.category});let ce=j.value[0];if(ce){let J=j.category===hb.FilterReason.Copyright?`The previous response (copied below) was filtered due to being too similar to existing public code. Please suggest something similar in function that does not match public code. Here's the previous response: ${ce} +`+JSON.stringify(t.capiError):"Rate limit exceeded",rateLimitKey:"",retryAfter:void 0,isAuto:!1,capiError:t.capiError}:t}a(V_a,"hydrateBYOKErrorMessages");function W_a(t){return t?t instanceof Dct||t.isExtensionContributed?1:t.customModel?2:-1:-1}a(W_a,"isBYOKModel");var Dct=class extends F_a.ChatEndpoint{static{a(this,"OpenAIEndpoint")}static{rI=this}static{this._reservedHeaders=new Set(["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","date","dnt","expect","host","keep-alive","origin","permissions-policy","referer","te","trailer","transfer-encoding","upgrade","user-agent","via","forwarded","x-forwarded-for","x-forwarded-host","x-forwarded-proto","api-key","authorization","content-type","openai-intent","x-github-api-version","x-initiator","x-interaction-id","x-interaction-type","x-onbehalf-extension-id","x-request-id","x-vscode-user-agent-library-version"])}static{this._validHeaderNamePattern=/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/}static{this._maxHeaderNameLength=256}static{this._maxHeaderValueLength=8192}static{this._maxCustomHeaderCount=20}constructor(e,r,n,o,s,c,l,u,d,p,h){super(e,o,s,c,l,u,d,p,h),this._apiKey=r,this._modelUrl=n,this.instantiationService=l,this.logService=h,this._customHeaders=this._sanitizeCustomHeaders(e.requestHeaders)}_sanitizeCustomHeaders(e){if(!e)return{};let r=Object.entries(e);r.length>rI._maxCustomHeaderCount&&this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has ${r.length} custom headers, exceeding limit of ${rI._maxCustomHeaderCount}. Only first ${rI._maxCustomHeaderCount} will be processed.`);let n={},o=0;for(let[s,c]of r){if(o>=rI._maxCustomHeaderCount)break;let l=s.trim();if(!l){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has empty header name, skipping.`);continue}if(l.length>rI._maxHeaderNameLength){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has header name exceeding ${rI._maxHeaderNameLength} characters, skipping.`);continue}if(!rI._validHeaderNamePattern.test(l)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has invalid header name format: '${l}', Skipping.`);continue}let u=l.toLowerCase();if(rI._reservedHeaders.has(u)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to override reserved header '${l}', skipping.`);continue}if(u.startsWith("proxy-")||u.startsWith("sec-")){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to set forbidden header pattern '${l}', skipping.`);continue}if(u==="x-http-method"||u==="x-http-method-override"||u==="x-method-override"){let p=["connect","trace","track"],h=String(c).toLowerCase().trim();if(p.includes(h)){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' attempted to set forbidden method '${h}' in header '${l}', skipping.`);continue}}let d=this._sanitizeHeaderValue(c);if(d===void 0){this.logService.warn(`[OpenAIEndpoint] Model '${this.modelMetadata.id}' has invalid value for header '${l}': '${c}', skipping.`);continue}n[l]=d,o++}return n}_sanitizeHeaderValue(e){if(typeof e!="string")return;let r=e.trim();if(!(r.length>rI._maxHeaderValueLength)&&!/[\x00-\x1F\x7F]/.test(r)&&!/[\u200B-\u200D\u202A-\u202E\uFEFF]/.test(r))return r}createRequestBody(e){if(this.useResponsesApi){e.ignoreStatefulMarker=!1;let r=super.createRequestBody(e);return r.store=!0,r.n=void 0,r.stream_options=void 0,this.modelMetadata.capabilities.supports.thinking||(r.reasoning=void 0,r.include=void 0),r.previous_response_id&&(!r.previous_response_id.startsWith("resp_")||this.modelMetadata.zeroDataRetentionEnabled)&&(r.previous_response_id=void 0),r}else{let r=a((o,s)=>{s&&s.id&&(o.cot_id=s.id,o.cot_summary=Array.isArray(s.text)?s.text.join(""):s.text)},"callback");return(0,q_a.createCapiRequestBody)(e,this.model,r)}}interceptBody(e){super.interceptBody(e),e?.tools?.length===0&&delete e.tools,e?.tools&&(e.tools=e.tools.map(r=>((0,Q_a.isOpenAiFunctionTool)(r)&&r.function.parameters===void 0&&(r.function.parameters={type:"object",properties:{}}),r))),e&&(this.modelMetadata.capabilities.supports.thinking&&(delete e.temperature,e.max_completion_tokens=e.max_tokens,delete e.max_tokens),delete e.max_tokens,!this.useResponsesApi&&e.stream&&(e.stream_options={include_usage:!0}))}get urlOrRequestMetadata(){return this._modelUrl}getExtraHeaders(){let e={"Content-Type":"application/json"};this._modelUrl.includes("openai.azure")?e["api-key"]=this._apiKey:e.Authorization=`Bearer ${this._apiKey}`;for(let[r,n]of Object.entries(this._customHeaders))e[r]=n;return e}cloneWithTokenOverride(e){let r={...this.modelMetadata,maxInputTokens:e};return this.instantiationService.createInstance(rI,r,this._apiKey,this._modelUrl)}async makeChatRequest2(e,r){let n={...e,ignoreStatefulMarker:!1},o=await super.makeChatRequest2(n,r);return V_a(o)}};zD.OpenAIEndpoint=Dct;zD.OpenAIEndpoint=Dct=rI=M_a([cQ(3,L_a.IDomainService),cQ(4,O_a.IChatMLFetcher),cQ(5,j_a.ITokenizerProvider),cQ(6,$_a.IInstantiationService),cQ(7,B_a.IConfigurationService),cQ(8,H_a.IExperimentationService),cQ(9,G_a.IChatWebSocketManager),cQ(10,U_a.ILogService)],Dct)});var nci=T(YR=>{"use strict";f();Object.defineProperty(YR,"__esModule",{value:!0});YR.EXTENSION_ID=YR.agentsToCommands=YR.GITHUB_PLATFORM_AGENT=void 0;YR.getAgentForIntent=Y_a;var z_a=QD();YR.GITHUB_PLATFORM_AGENT="github.copilot-dynamic.platform";YR.agentsToCommands={editAgent:{explain:"explain",edit:"edit",review:"review",tests:"tests",fix:"fix",new:"new",newNotebook:"newNotebook",semanticSearch:"semanticSearch",setupTests:"setupTests",compact:"editAgent"},vscode:{search:"search"},terminal:{explain:"terminalExplain"},editor:{doc:"doc",fix:"fix",explain:"explain",review:"review",tests:"tests",edit:"edit",generate:"generate"}};function Y_a(t,e){if(Object.keys(YR.agentsToCommands).includes(t))return{agent:t};for(let[r,n]of Object.entries(YR.agentsToCommands))if(!(e===z_a.ChatLocation.Editor&&r!=="editor")&&Object.values(n).includes(t))return{agent:r,command:t}}a(Y_a,"getAgentForIntent");YR.EXTENSION_ID="GitHub.copilot-chat"});var sci=T(Nct=>{"use strict";f();Object.defineProperty(Nct,"__esModule",{value:!0});Nct.ChatMLFetcherTelemetrySender=void 0;var ici=Ppr(),oci=Fpr(),Upr=class{static{a(this,"ChatMLFetcherTelemetrySender")}static sendSuccessTelemetry(e,{chatCompletion:r,baseTelemetry:n,userInitiatedRequest:o,chatEndpointInfo:s,requestBody:c,maxResponseTokens:l,promptTokenCount:u,timeToFirstToken:d,timeToFirstTokenEmitted:p,hasImageMessages:h,transport:m,fetcher:g,bytesReceived:A,suspendEventSeen:y,resumeEventSeen:E}){e.sendTelemetryEvent("response.success",{github:!0,microsoft:!0},{reason:r.finishReason,filterReason:r.filterReason,source:n?.properties.messageSource??"unknown",initiatorType:o?"user":"agent",model:s?.model,modelInvoked:r.model,apiType:s?.apiType,requestId:r.requestId.headerRequestId,gitHubRequestId:r.requestId.gitHubRequestId,associatedRequestId:n?.properties.associatedRequestId,reasoningEffort:c.reasoning?.effort,reasoningSummary:c.reasoning?.summary,...g?{fetcher:g}:{},transport:m,...n?.properties.retryAfterError?{retryAfterError:n.properties.retryAfterError}:{},...n?.properties.retryAfterErrorGitHubRequestId?{retryAfterErrorGitHubRequestId:n.properties.retryAfterErrorGitHubRequestId}:{},...n?.properties.connectivityTestError?{connectivityTestError:n.properties.connectivityTestError}:{},...n?.properties.connectivityTestErrorGitHubRequestId?{connectivityTestErrorGitHubRequestId:n.properties.connectivityTestErrorGitHubRequestId}:{},...n?.properties.retryAfterFilterCategory?{retryAfterFilterCategory:n.properties.retryAfterFilterCategory}:{}},{totalTokenMax:s?.modelMaxPromptTokens??-1,tokenCountMax:l,promptTokenCount:r.usage?.prompt_tokens,promptCacheTokenCount:r.usage?.prompt_tokens_details?.cached_tokens,clientPromptTokenCount:u,tokenCount:r.usage?.total_tokens,reasoningTokens:r.usage?.completion_tokens_details?.reasoning_tokens,acceptedPredictionTokens:r.usage?.completion_tokens_details?.accepted_prediction_tokens,rejectedPredictionTokens:r.usage?.completion_tokens_details?.rejected_prediction_tokens,completionTokens:r.usage?.completion_tokens,timeToFirstToken:d,timeToFirstTokenEmitted:p,timeToComplete:Date.now()-n.issuedTime,issuedTime:n.issuedTime,isVisionRequest:h?1:-1,isBYOK:(0,oci.isBYOKModel)(s),isAuto:(0,ici.isAutoModel)(s),bytesReceived:A,suspendEventSeen:y?1:0,resumeEventSeen:E?1:0})}static sendCancellationTelemetry(e,{source:r,requestId:n,model:o,apiType:s,transport:c,associatedRequestId:l,retryAfterError:u,retryAfterErrorGitHubRequestId:d,connectivityTestError:p,connectivityTestErrorGitHubRequestId:h,retryAfterFilterCategory:m,fetcher:g,suspendEventSeen:A,resumeEventSeen:y},{totalTokenMax:E,promptTokenCount:_,tokenCountMax:v,timeToFirstToken:b,timeToFirstTokenEmitted:I,timeToCancelled:x,isVisionRequest:w,isBYOK:R,isAuto:P,bytesReceived:k,issuedTime:Q}){e.sendTelemetryEvent("response.cancelled",{github:!0,microsoft:!0},{apiType:s,source:r,requestId:n,model:o,associatedRequestId:l,...g?{fetcher:g}:{},transport:c,...u?{retryAfterError:u}:{},...d?{retryAfterErrorGitHubRequestId:d}:{},...p?{connectivityTestError:p}:{},...h?{connectivityTestErrorGitHubRequestId:h}:{},...m?{retryAfterFilterCategory:m}:{}},{totalTokenMax:E,promptTokenCount:_,tokenCountMax:v,timeToFirstToken:b,timeToFirstTokenEmitted:I,timeToCancelled:x,timeToComplete:x,issuedTime:Q,isVisionRequest:w,isBYOK:R,isAuto:P,bytesReceived:k,suspendEventSeen:A?1:0,resumeEventSeen:y?1:0})}static sendResponseErrorTelemetry(e,{processed:r,telemetryProperties:n,chatEndpointInfo:o,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToFirstToken:u,isVisionRequest:d,transport:p,fetcher:h,bytesReceived:m,issuedTime:g,wasRetried:A,suspendEventSeen:y,resumeEventSeen:E}){e.sendTelemetryEvent("response.error",{github:!0,microsoft:!0},{type:r.type,reason:r.reasonDetail||r.reason,source:n?.messageSource??"unknown",requestId:r.requestId,gitHubRequestId:r.serverRequestId,model:o.model,apiType:o.apiType,reasoningEffort:s.reasoning?.effort,reasoningSummary:s.reasoning?.summary,...h?{fetcher:h}:{},transport:p,associatedRequestId:n?.associatedRequestId,...n?.retryAfterError?{retryAfterError:n.retryAfterError}:{},...n?.retryAfterErrorGitHubRequestId?{retryAfterErrorGitHubRequestId:n.retryAfterErrorGitHubRequestId}:{},...n?.connectivityTestError?{connectivityTestError:n.connectivityTestError}:{},...n?.connectivityTestErrorGitHubRequestId?{connectivityTestErrorGitHubRequestId:n.connectivityTestErrorGitHubRequestId}:{},...n?.retryAfterFilterCategory?{retryAfterFilterCategory:n.retryAfterFilterCategory}:{}},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:c,tokenCountMax:l,timeToFirstToken:u,timeToComplete:Date.now()-g,issuedTime:g,isVisionRequest:d?1:-1,isBYOK:(0,oci.isBYOKModel)(o),isAuto:(0,ici.isAutoModel)(o),wasRetried:A?1:0,bytesReceived:m,suspendEventSeen:y?1:0,resumeEventSeen:E?1:0})}};Nct.ChatMLFetcherTelemetrySender=Upr});var hci=T(rb=>{"use strict";f();var K_a=rb&&rb.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Jy=rb&&rb.__param||function(t,e){return function(r,n){e(r,n,t)}},Hpr;Object.defineProperty(rb,"__esModule",{value:!0});rb.ChatMLFetcherImpl=rb.AbstractChatMLFetcher=void 0;rb.createTelemetryData=pci;rb.locationToIntent=Vpr;var J_a=co(),X_a=cA(),Z_a=WB(),eCa=x0r(),Sn=QD(),tCa=w0r(),lRe=$we(),rCa=P0r(),lQ=ac(),nCa=$y(),Mct=Ppr(),Oct=vpr(),jpr=D0(),iCa=Xat(),Qpr=xK(),oCa=zm(),Bct=Zat(),tb=QB(),aci=Zwe(),fci=nQ(),cci=oct(),Kr=Wai(),Li=Zai(),sCa=Rct(),Fct=Kue(),aCa=cd(),cCa=bp(),Ade=pde(),Lct=tci(),lCa=cy(),lci=vc(),uci=Ko(),uCa=Xa(),dCa=ro(),fCa=m0(),qpr=Ip(),pCa=Po(),dci=Fpr(),hCa=nci(),mCa=T0r(),gde=sci(),Uct=class extends dCa.Disposable{static{a(this,"AbstractChatMLFetcher")}constructor(e){super(),this.options=e,this._onDidMakeChatMLRequest=this._register(new uCa.Emitter),this.onDidMakeChatMLRequest=this._onDidMakeChatMLRequest.event}preparePostOptions(e){return{temperature:this.options.temperature,top_p:this.options.topP,...e,stream:!0}}async fetchOne(e,r){let n=await this.fetchMany({...e,requestOptions:{...e.requestOptions,n:1}},r);return n.type===Sn.ChatFetchResponseType.Success?{...n,value:n.value[0]}:n}};rb.AbstractChatMLFetcher=Uct;var $pr=class extends Uct{static{a(this,"ChatMLFetcherImpl")}static{Hpr=this}static{this._maxConsecutiveWebSocketFallbacks=3}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y){super(d),this._fetcherService=e,this._telemetryService=r,this._requestLogger=n,this._logService=o,this._authenticationService=s,this._interactionService=c,this._chatQuotaService=l,this._capiClientService=u,this._configurationService=p,this._experimentationService=h,this._powerService=m,this._instantiationService=g,this._webSocketManager=A,this._otelService=y,this.connectivityCheckDelays=[1e3,1e4,1e4],this._consecutiveWebSocketRetryFallbacks=0}async fetchMany(e,r){let{debugName:n,endpoint:o,finishedCb:s,location:c,messages:l,requestOptions:u,source:d,telemetryProperties:p,userInitiatedRequest:h,requestKindOptions:m,conversationId:g,turnId:A,useWebSocket:y,ignoreStatefulMarker:E}=e;y&&this._consecutiveWebSocketRetryFallbacks>=Hpr._maxConsecutiveWebSocketFallbacks&&(this._logService.debug(`[ChatWebSocketManager] Disabling WebSocket for request due to ${this._consecutiveWebSocketRetryFallbacks} consecutive WebSocket failures with successful HTTP fallback.`),y=!1,E=!0),p||(p={}),p.messageSource||(p.messageSource=n);let _=y?"websocket":"http",v=p.requestId??p.messageId??(0,qpr.generateUuid)(),b=o.maxOutputTokens;u?.prediction||(u={max_tokens:b,...u}),u.prediction?.content||delete u.prediction;let I=this.preparePostOptions(u),x=o.createRequestBody({...e,ignoreStatefulMarker:E,requestId:v,postOptions:I}),w=Ade.TelemetryData.createAndMarkAsIssued({...p,baseModel:o.model,uiKind:Sn.ChatLocation.toString(c)}),R=this._requestLogger.logChatRequest(n,o,{messages:e.messages,model:o.model,ourRequestId:v,location:e.location,body:x,ignoreStatefulMarker:E,isConversationRequest:e.isConversationRequest,customMetadata:e.customMetadata}),P=-1,k=new Z_a.FetchStreamRecorder(s),Q=e.enableRetryOnError??e.enableRetryOnFilter,M=e.canRetryOnceWithoutRollback??!(e.enableRetryOnFilter||e.enableRetryOnError),N,G,O,D,F,U,L;try{let H,$=gCa(e.messages,I,o,this._configurationService,this._experimentationService);if(!$.isValid)H={type:Kr.FetchResponseKind.Failed,modelRequestId:void 0,failKind:Kr.ChatFailKind.ValidationFailed,reason:$.reason};else{let j=await this._authenticationService.getCopilotToken();N=j.username;let ce=await this._fetchAndStreamChat(o,x,w,k.callback,u.secretKey,j,e.location,v,I.n,r,h,y,A,g,p,e.useFetcher,M,m);if(H=ce.result,G=ce.fetcher,O=ce.bytesReceived,D=ce.statusCode,F=ce.suspendEventSeen,U=ce.resumeEventSeen,L=ce.otelSpan,L?.setAttribute(Li.GenAiAttr.AGENT_NAME,n),L){let Te=x.messages,fe=Te?.filter(Ue=>Ue.role==="user"),Ne=fe?.[fe.length-1];Ne?.content&&L.setAttribute(Li.CopilotChatAttr.USER_REQUEST,Ne.content);let Ve=Te?.find(Ue=>Ue.role==="system");Ve?.content&&L.setAttribute(Li.GenAiAttr.SYSTEM_INSTRUCTIONS,Ve.content)}if(L){let Te=x.messages;Te&&L.setAttribute(Li.GenAiAttr.INPUT_MESSAGES,(0,Li.truncateForOTel)(JSON.stringify((0,Li.toInputMessages)(Te))))}P=await o.acquireTokenizer().countMessagesTokens(l);let J=d?.extensionId??hCa.EXTENSION_ID;this._onDidMakeChatMLRequest.fire({messages:l,model:o.model,source:{extensionId:J},tokenCount:P})}let W=Date.now()-w.issuedTime;switch(R?.markTimeToFirstToken(W),H.type){case Kr.FetchResponseKind.Success:{let j=await this.processSuccessfulResponse(H,l,x,v,b,P,W,k,w,o,h,_,G,O,F,U);if(j.type===Sn.ChatFetchResponseType.FilteredRetry){if(e.enableRetryOnFilter){k.callback("",0,{text:"",retryReason:j.category});let ce=j.value[0];if(ce){let J=j.category===tb.FilterReason.Copyright?`The previous response (copied below) was filtered due to being too similar to existing public code. Please suggest something similar in function that does not match public code. Here's the previous response: ${ce} `:`The previous response (copied below) was filtered due to triggering our content safety filters, which looks for hateful, self-harm, sexual, or violent content. Please suggest something similar in content that does not trigger these filters. Here's the previous response: ${ce} -`,Te=[...l,{role:Kya.Raw.ChatRole.User,content:(0,f2e.toTextParts)(J)}],fe=await this.fetchMany({...e,debugName:"retry-"+n,messages:Te,finishedCb:s,location:c,endpoint:o,source:d,requestOptions:u,userInitiatedRequest:!1,telemetryProperties:{...p,retryAfterFilterCategory:j.category??"uncategorized"},enableRetryOnFilter:!1,canRetryOnceWithoutRollback:!1,enableRetryOnError:Q},r);if(w?.resolve(fe,k.deltas),fe.type===Sn.ChatFetchResponseType.Success)return fe}}return{type:Sn.ChatFetchResponseType.Filtered,category:j.category,reason:"Response got filtered.",requestId:j.requestId,serverRequestId:j.serverRequestId}}if(w?.resolve(j,k.deltas),j.type===Sn.ChatFetchResponseType.Success&&j.usage){let ce={operationName:Ui.GenAiOperationName.CHAT,providerName:Ui.GenAiProviderName.GITHUB,requestModel:o.model,responseModel:j.resolvedModel};j.usage.prompt_tokens&&Ui.GenAiMetrics.recordTokenUsage(this._otelService,j.usage.prompt_tokens,"input",ce),j.usage.completion_tokens&&Ui.GenAiMetrics.recordTokenUsage(this._otelService,j.usage.completion_tokens,"output",ce),L?.setAttributes({[Ui.GenAiAttr.USAGE_INPUT_TOKENS]:j.usage.prompt_tokens??0,[Ui.GenAiAttr.USAGE_OUTPUT_TOKENS]:j.usage.completion_tokens??0,[Ui.GenAiAttr.RESPONSE_MODEL]:j.resolvedModel??o.model,[Ui.GenAiAttr.RESPONSE_ID]:j.requestId,[Ui.GenAiAttr.RESPONSE_FINISH_REASONS]:["stop"],...j.usage.prompt_tokens_details?.cached_tokens?{[Ui.GenAiAttr.USAGE_CACHE_READ_INPUT_TOKENS]:j.usage.prompt_tokens_details.cached_tokens}:{},[Ui.CopilotChatAttr.TIME_TO_FIRST_TOKEN]:W,...j.serverRequestId?{[Ui.CopilotChatAttr.SERVER_REQUEST_ID]:j.serverRequestId}:{},...j.usage.completion_tokens_details?.reasoning_tokens?{[Ui.GenAiAttr.USAGE_REASONING_TOKENS]:j.usage.completion_tokens_details.reasoning_tokens}:{}})}if(L&&j.type===Sn.ChatFetchResponseType.Success){let ce=k.deltas.map(fe=>fe.text).join(""),J=k.deltas.filter(fe=>fe.copilotToolCalls?.length).flatMap(fe=>fe.copilotToolCalls.map(De=>({type:"tool_call",id:De.id,name:De.name,arguments:De.arguments}))),Te=[];ce&&Te.push({type:"text",content:ce}),Te.push(...J),Te.length>0&&L.setAttribute(Ui.GenAiAttr.OUTPUT_MESSAGES,(0,Ui.truncateForOTel)(JSON.stringify([{role:"assistant",parts:Te}])))}return(0,Ui.emitInferenceDetailsEvent)(this._otelService,{model:o.model,temperature:u?.temperature,maxTokens:u?.max_tokens},j.type===Sn.ChatFetchResponseType.Success?{id:j.requestId,model:j.resolvedModel,finishReasons:["stop"],inputTokens:j.usage?.prompt_tokens,outputTokens:j.usage?.completion_tokens}:void 0),L?.end(),L=void 0,W>0&&Ui.GenAiMetrics.recordTimeToFirstToken(this._otelService,o.model,W/1e3),y&&j.type===Sn.ChatFetchResponseType.Success&&(this._consecutiveWebSocketRetryFallbacks=0),j}case Kr.FetchResponseKind.Canceled:return rfe.ChatMLFetcherTelemetrySender.sendCancellationTelemetry(this._telemetryService,{source:p.messageSource??"unknown",requestId:v,model:o.model,apiType:o.apiType,transport:_,associatedRequestId:p.associatedRequestId,retryAfterError:p.retryAfterError,retryAfterErrorGitHubRequestId:p.retryAfterErrorGitHubRequestId,connectivityTestError:p.connectivityTestError,connectivityTestErrorGitHubRequestId:p.connectivityTestErrorGitHubRequestId,retryAfterFilterCategory:p.retryAfterFilterCategory,fetcher:G,suspendEventSeen:F,resumeEventSeen:U},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:P,tokenCountMax:b,timeToFirstToken:W,timeToFirstTokenEmitted:R&&k.firstTokenEmittedTime?k.firstTokenEmittedTime-R.issuedTime:-1,timeToCancelled:Date.now()-R.issuedTime,isVisionRequest:this.filterImageMessages(l)?1:-1,isBYOK:(0,fai.isBYOKModel)(o),isAuto:(0,Ilt.isAutoModel)(o),bytesReceived:O,issuedTime:R.issuedTime}),w?.resolveWithCancelation(),L?.setAttributes({[Ui.GenAiAttr.RESPONSE_FINISH_REASONS]:["cancelled"],[Ui.CopilotChatAttr.CANCELED]:!0}),L?.end(),L=void 0,this.processCanceledResponse(H,v,k,p);case Kr.FetchResponseKind.Failed:{let j=this.processFailedResponse(H,v,(0,Ilt.isAutoModel)(o)===1),J=this._configurationService.getExperimentBasedConfig(BQ.ConfigKey.TeamInternal.RetryServerErrorStatusCodes,this._experimentationService).split(",").map(De=>parseInt(De.trim(),10)),Te=Q&&N!==void 0&&J.includes(N),fe=Q&&y&&(H.failKind===Kr.ChatFailKind.ServerError||H.failKind===Kr.ChatFailKind.Unknown);if(Te||fe){let{retryResult:De}=await this._retryAfterError({opts:e,processed:j,telemetryProperties:p,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToError:W,transport:_,actualFetcher:G,bytesReceived:O,baseTelemetry:R,streamRecorder:k,retryReason:"server_error",debugNamePrefix:"retry-server-error-",pendingLoggedChatRequest:w,token:r,usernameToScrub:D,suspendEventSeen:F,resumeEventSeen:U});if(De)return De}return rfe.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:j,telemetryProperties:p,chatEndpointInfo:o,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToFirstToken:W,isVisionRequest:this.filterImageMessages(l),transport:_,fetcher:G,bytesReceived:O,issuedTime:R.issuedTime,wasRetried:!1,suspendEventSeen:F,resumeEventSeen:U}),w?.resolve(j),j}}}catch(H){L&&(L.setStatus(2,H instanceof Error?H.message:String(H)),L.setAttribute(Ui.StdAttr.ERROR_TYPE,H instanceof Error?H.constructor.name:"Error"),L.setAttribute(Ui.GenAiAttr.RESPONSE_FINISH_REASONS,["error"]),L.recordException(H),L.end());let $=Date.now()-R.issuedTime;H.fetcherId&&(G=H.fetcherId),H.suspendEventSeen&&(F=!0),H.resumeEventSeen&&(U=!0);let W=this.processError(H,v,H.gitHubRequestId,D,(0,Ilt.isAutoModel)(o)===1),j=Q&&W.type===Sn.ChatFetchResponseType.NetworkError&&this._configurationService.getExperimentBasedConfig(BQ.ConfigKey.TeamInternal.RetryNetworkErrors,this._experimentationService),ce=Q&&y&&(W.type===Sn.ChatFetchResponseType.NetworkError||W.type===Sn.ChatFetchResponseType.Failed);if(j||ce){let{retryResult:J,connectivityTestError:Te,connectivityTestErrorGitHubRequestId:fe}=await this._retryAfterError({opts:e,processed:W,telemetryProperties:p,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToError:$,transport:_,actualFetcher:G,bytesReceived:H.bytesReceived,baseTelemetry:R,streamRecorder:k,retryReason:"network_error",debugNamePrefix:"retry-error-",pendingLoggedChatRequest:w,token:r,usernameToScrub:D,suspendEventSeen:F,resumeEventSeen:U});if(J)return J;p={...p,connectivityTestError:Te,connectivityTestErrorGitHubRequestId:fe}}return W.type===Sn.ChatFetchResponseType.Canceled?rfe.ChatMLFetcherTelemetrySender.sendCancellationTelemetry(this._telemetryService,{source:p.messageSource??"unknown",requestId:v,model:o.model,apiType:o.apiType,transport:_,associatedRequestId:p.associatedRequestId,retryAfterError:p.retryAfterError,retryAfterErrorGitHubRequestId:p.retryAfterErrorGitHubRequestId,connectivityTestError:p.connectivityTestError,connectivityTestErrorGitHubRequestId:p.connectivityTestErrorGitHubRequestId,retryAfterFilterCategory:p.retryAfterFilterCategory,fetcher:G,suspendEventSeen:F,resumeEventSeen:U},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:P,tokenCountMax:b,timeToFirstToken:void 0,timeToCancelled:$,isVisionRequest:this.filterImageMessages(l)?1:-1,isBYOK:(0,fai.isBYOKModel)(o),isAuto:(0,Ilt.isAutoModel)(o),bytesReceived:H.bytesReceived,issuedTime:R.issuedTime}):rfe.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:W,telemetryProperties:p,chatEndpointInfo:o,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToFirstToken:$,isVisionRequest:this.filterImageMessages(l),transport:_,fetcher:G,bytesReceived:H.bytesReceived,issuedTime:R.issuedTime,wasRetried:!1,suspendEventSeen:F,resumeEventSeen:U}),w?.resolve(W),W}}async _checkNetworkConnectivity(e){let r=this.connectivityCheckDelays,n,o;for(let s of r){this._logService.info(`Waiting ${s}ms before pinging CAPI to check network connectivity...`),await new Promise(c=>setTimeout(c,s));try{let c=this._capiClientService.dotcomAPIURL!=="https://api.github.com",l=this._capiClientService.capiPingURL,u=await this._getAuthHeaders(c,l),d=await this._fetcherService.fetch(l,{headers:u,useFetcher:e,callSite:"capi-ping"});if(d.status>=200&&d.status<300)return this._logService.info("CAPI ping successful, proceeding with chat request retry..."),{retryRequest:!0,connectivityTestError:n,connectivityTestErrorGitHubRequestId:o};n=`Status ${d.status}: ${d.statusText}`,o=d.headers.get("x-github-request-id")??"",this._logService.info(`CAPI ping returned status ${d.status}, retrying ping...`)}catch(c){n=(0,Tpr.collectSingleLineErrorMessage)(c,!0),o=void 0,this._logService.info(`CAPI ping failed with error, retrying ping: ${n}`)}}return{retryRequest:!1,connectivityTestError:n,connectivityTestErrorGitHubRequestId:o}}async _getAuthHeaders(e,r){let n={};if(e){let o="";if(r===this._capiClientService.dotcomAPIURL)o=this._authenticationService.anyGitHubSession?.accessToken||"";else try{o=(await this._authenticationService.getCopilotToken()).token}catch{o=""}n.Authorization=`Bearer ${o}`}return n}async _retryAfterError(e){let{opts:r,processed:n,telemetryProperties:o,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToError:u,transport:d,actualFetcher:p,bytesReceived:h,baseTelemetry:m,streamRecorder:g,retryReason:A,debugNamePrefix:y,pendingLoggedChatRequest:E,token:_,usernameToScrub:v,suspendEventSeen:b,resumeEventSeen:I}=e,x=["darwin","linux"].includes(process.platform)&&n.reason.indexOf("net::ERR_NETWORK_CHANGED")!==-1,R=this._configurationService.getExperimentBasedConfig(BQ.ConfigKey.TeamInternal.FallbackNodeFetchOnNetworkProcessCrash,this._experimentationService),w=n.type===Sn.ChatFetchResponseType.NetworkError&&n.isNetworkProcessCrash===!0&&R,P=x||w?"node-fetch":r.useFetcher;this._logService.info(`Retrying chat request with ${P||"default"} fetcher after: ${n.reasonDetail||n.reason}`);let k=await this._checkNetworkConnectivity(P),Q=k.connectivityTestError?this.scrubErrorDetail(k.connectivityTestError,v):void 0,M=k.connectivityTestErrorGitHubRequestId;if(!k.retryRequest)return this._logService.info("Not retrying chat request as network connectivity could not be re-established."),{connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M};rfe.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:n,telemetryProperties:o,chatEndpointInfo:r.endpoint,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToFirstToken:u,isVisionRequest:this.filterImageMessages(r.messages),transport:d,fetcher:p,bytesReceived:h,issuedTime:m.issuedTime,wasRetried:!0,suspendEventSeen:b,resumeEventSeen:I}),g.callback("",0,{text:"",retryReason:A});let D=await this.fetchMany({...r,useWebSocket:!1,ignoreStatefulMarker:r.useWebSocket||r.ignoreStatefulMarker,debugName:y+r.debugName,userInitiatedRequest:!1,telemetryProperties:{...o,retryAfterError:n.reasonDetail||n.reason,retryAfterErrorGitHubRequestId:n.serverRequestId,connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M},enableRetryOnError:!1,useFetcher:P},_);return E?.resolve(D,g.deltas),r.useWebSocket&&D.type===Sn.ChatFetchResponseType.Success&&(this._consecutiveWebSocketRetryFallbacks++,this._logService.info(`[ChatWebSocketManager] WebSocket request failed with successful HTTP fallback (${this._consecutiveWebSocketRetryFallbacks} consecutive).`),r.conversationId&&r.turnId&&this._webSocketManager.closeConnection(r.conversationId,r.turnId)),{retryResult:D,connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M}}async _fetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v){let I=this._configurationService.getExperimentBasedConfig(BQ.ConfigKey.TeamInternal.ChatRequestPowerSaveBlocker,this._experimentationService)&&l!==Sn.ChatLocation.Other?this._powerService.acquirePowerSaveBlocker():void 0,x=!1,R=!1,w=this._powerService.onDidSuspend(()=>{x=!0,this._logService.info(`System suspended during streaming request ${u} (${Sn.ChatLocation.toString(l)})`)}),P=this._powerService.onDidResume(()=>{R=!0,this._logService.info(`System resumed during streaming request ${u} (${Sn.ChatLocation.toString(l)})`)});try{return{...await this._doFetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v),suspendEventSeen:x||void 0,resumeEventSeen:R||void 0}}catch(k){throw x&&(k.suspendEventSeen=!0),R&&(k.resumeEventSeen=!0),k}finally{w.dispose(),P.dispose(),I?.dispose()}}async _doFetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v){if(p.isCancellationRequested)return{result:{type:Kr.FetchResponseKind.Canceled,reason:"before fetch request"}};let b=typeof e.urlOrRequestMetadata=="string"?(()=>{try{return new URL(e.urlOrRequestMetadata).hostname}catch{return}})():void 0,I=(0,Plt.getCurrentCapturingToken)()?.chatSessionId,x=(0,Plt.getCurrentCapturingToken)()?.parentChatSessionId,R=(0,Plt.getCurrentCapturingToken)()?.debugLogLabel,w=this._otelService.startSpan(`chat ${e.model}`,{kind:2,attributes:{[Ui.GenAiAttr.OPERATION_NAME]:Ui.GenAiOperationName.CHAT,[Ui.GenAiAttr.PROVIDER_NAME]:Ui.GenAiProviderName.GITHUB,[Ui.GenAiAttr.REQUEST_MODEL]:e.model,[Ui.GenAiAttr.CONVERSATION_ID]:y?.requestId??u,[Ui.GenAiAttr.REQUEST_MAX_TOKENS]:r.max_tokens??r.max_output_tokens??r.max_completion_tokens??2048,...r.temperature!==void 0?{[Ui.GenAiAttr.REQUEST_TEMPERATURE]:r.temperature}:{},...r.top_p!==void 0?{[Ui.GenAiAttr.REQUEST_TOP_P]:r.top_p}:{},[Ui.CopilotChatAttr.MAX_PROMPT_TOKENS]:e.modelMaxPromptTokens,...b?{[Ui.StdAttr.SERVER_ADDRESS]:b}:{},...A?{[Ui.CopilotChatAttr.SESSION_ID]:A}:{},...I?{[Ui.CopilotChatAttr.CHAT_SESSION_ID]:I}:{},...x?{[Ui.CopilotChatAttr.PARENT_CHAT_SESSION_ID]:x}:{},...R?{[Ui.CopilotChatAttr.DEBUG_LOG_LABEL]:R}:{}}}),P=Date.now();try{if(this._logService.debug(`modelMaxPromptTokens ${e.modelMaxPromptTokens}`),this._logService.debug(`modelMaxResponseTokens ${r.max_tokens??2048}`),this._logService.debug(`chat model ${e.model}`),s??=c.token,!s){let Q=(0,wlt.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata);return this._logService.error(`Failed to send request to ${Q} due to missing key`),(0,lai.sendCommunicationErrorTelemetry)(this._telemetryService,`Failed to send request to ${Q} due to missing key`),{result:{type:Kr.FetchResponseKind.Failed,modelRequestId:void 0,failKind:Kr.ChatFailKind.TokenExpiredOrInvalid,reason:"key is missing"}}}return m&&g&&A?{...await this._doFetchViaWebSocket(e,r,n,o,s,l,u,g,A,p,h,y,v),otelSpan:w}:{...await this._doFetchViaHttp(e,r,n,o,s,l,u,d,p,h,y,E,_,v),otelSpan:w}}catch(k){throw w.setStatus(2,k instanceof Error?k.message:String(k)),w.setAttribute(Ui.StdAttr.ERROR_TYPE,k instanceof Error?k.constructor.name:"Error"),w.recordException(k),k}finally{let k=(Date.now()-P)/1e3;Ui.GenAiMetrics.recordOperationDuration(this._otelService,k,{operationName:Ui.GenAiOperationName.CHAT,providerName:Ui.GenAiProviderName.GITHUB,requestModel:e.model})}}async _doFetchViaWebSocket(e,r,n,o,s,c,l,u,d,p,h,m,g){let A=Ipr(c),y=g?.kind==="subagent"?"conversation-subagent":g?.kind==="background"?"conversation-background":A==="conversation-agent"?A:void 0,E={Authorization:`Bearer ${s}`,"X-Request-Id":l,"OpenAI-Intent":A,"X-GitHub-Api-Version":"2025-05-01","X-Interaction-Id":this._interactionService.interactionId,...e.getExtraHeaders?e.getExtraHeaders(c):{}};y&&(E["X-Interaction-Type"]=y,E["X-Agent-Task-Id"]=l),r.messages?.some(M=>Array.isArray(M.content)?M.content.some(D=>"image_url"in D):!1)&&e.supportsVision&&(E["Copilot-Vision-Request"]="true");let _=this._webSocketManager.getOrCreateConnection(d,u,E);try{await _.connect()}catch(M){throw M.gitHubRequestId=_.gitHubRequestId,M}let v=(0,_pr.generateUuid)(),b=nfe.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(c),transport:"websocket",...m,modelCallId:v},{maxTokenWindow:e.modelMaxPromptTokens}),I=(0,Cpr.getRequestId)(_.responseHeaders);b.extendWithRequestId(I);for(let[M,D]of Object.entries(r))M==="messages"||M==="input"||(b.properties[`request.option.${M}`]=JSON.stringify(D)??"undefined");b.properties.headerRequestId=l,this._telemetryService.sendGHTelemetryEvent("request.sent",b.properties,b.measurements);let x=Date.now(),R=_.sendRequest(r,{userInitiated:!!h},p),w=n.extendedBy({modelCallId:v}),P=this._instantiationService.createInstance(xlt.OpenAIResponsesProcessor,w,I.headerRequestId,I.gitHubRequestId),k=new uai.AsyncIterableObject(async M=>{try{await new Promise((G,O)=>{R.onEvent(N=>{let F=P.push(N,o);if(F&&((0,xlt.sendCompletionOutputTelemetry)(this._telemetryService,this._logService,F,w),M.emitOne(F)),N.type==="response.completed"){let U=N.copilot_quota_snapshots;U&&typeof U=="object"&&this._chatQuotaService.processQuotaSnapshots(U)}}),R.onCAPIError(N=>{let F=new Error(`${N.error.message} (${N.error.code})`);F.gitHubRequestId=I.gitHubRequestId,F.capiWebSocketError=N,O(F)}),R.onError(N=>{if(N.gitHubRequestId=I.gitHubRequestId,(0,dai.isCancellationError)(N)){O(N);return}let F=b.extendedBy({error:N.message});this._telemetryService.sendGHTelemetryEvent("request.shownWarning",F.properties,F.measurements);let U=Date.now()-x;b.measurements.totalTimeMs=U,b.properties.error=N.message,this._logService.debug(`request.error: [websocket], took ${U} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",b.properties,b.measurements),O(N)}),R.done.then(G,O)});let D=Date.now()-x;b.measurements.totalTimeMs=D,this._logService.debug(`request.response: [websocket], took ${D} ms`),this._telemetryService.sendGHTelemetryEvent("request.response",b.properties,b.measurements)}finally{let D=r.messages;if((!D||D.length===0)&&r.input)try{let G=(0,xlt.responseApiInputToRawMessagesForLogging)(r);D=(0,hb.rawMessageToCAPI)(G)}catch(G){this._logService.error("Failed to convert Response API input to messages for telemetry:",G),D=[]}(0,cai.sendEngineMessagesTelemetry)(this._telemetryService,D??[],b,!1,this._logService)}}),Q=await R.firstEvent;if(p.isCancellationRequested)return{result:{type:Kr.FetchResponseKind.Canceled,reason:"after first WebSocket event"}};if((0,pai.isCAPIWebSocketError)(Q)){let M=Date.now()-x;return b.measurements.totalTimeMs=M,b.properties.error=`${Q.error.message} (${Q.error.code})`,this._logService.debug(`request.error: [websocket capi error], took ${M} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",b.properties,b.measurements),{result:await this._handleWebSocketCAPIError(Q,I)}}return this._authenticationService.copilotToken?.isFreeUser&&this._authenticationService.copilotToken?.isChatQuotaExceeded&&this._authenticationService.resetCopilotToken(),{result:{type:Kr.FetchResponseKind.Success,chatCompletions:k}}}async _doFetchViaHttp(e,r,n,o,s,c,l,u,d,p,h,m,g,A){let y=(0,_pr.generateUuid)(),E=await this._fetchWithInstrumentation(e,l,r,s,c,d,p,{...h,modelCallId:y},m,g,A);if(d.isCancellationRequested){try{await E.body.destroy()}catch(I){this._logService.error(I,"Error destroying stream"),this._telemetryService.sendGHTelemetryException(I,"Error destroying stream")}return{result:{type:Kr.FetchResponseKind.Canceled,reason:"after fetch request"},fetcher:E.fetcher,bytesReceived:E.bytesReceived}}if(E.status===200&&this._authenticationService.copilotToken?.isFreeUser&&this._authenticationService.copilotToken?.isChatQuotaExceeded&&this._authenticationService.resetCopilotToken(),E.status!==200){let I=hai(e,c,l);return this._logService.info("Request ID for failed request: "+l),{result:await this._handleError(I,E,l),fetcher:E.fetcher,bytesReceived:E.bytesReceived,statusCode:E.status}}let _=n.extendedBy({modelCallId:y}),v,b=E.headers.get("x-github-request-id")??"";try{let I=await e.processResponseFromChatEndpoint(this._telemetryService,this._logService,E,u??1,o,_,d,c);v=new uai.AsyncIterableObject(async x=>{try{for await(let R of I)x.emitOne(R)}catch(R){throw R.fetcherId=E.fetcher,R.gitHubRequestId=b,R.bytesReceived=E.bytesReceived,R}})}catch(I){throw I.fetcherId=E.fetcher,I.gitHubRequestId=b,I.bytesReceived=E.bytesReceived,I}return E.headers.get("Copilot-Edits-Session")&&(this._authenticationService.speculativeDecodingEndpointToken=E.headers.get("Copilot-Edits-Session")??void 0),this._chatQuotaService.processQuotaHeaders(E.headers),{result:{type:Kr.FetchResponseKind.Success,chatCompletions:v},fetcher:E.fetcher,bytesReceived:E.bytesReceived}}async _fetchWithInstrumentation(e,r,n,o,s,c,l,u,d,p,h){let m={"X-Interaction-Id":this._interactionService.interactionId,"X-Initiator":l?"user":"agent"};n.messages?.some(E=>Array.isArray(E.content)?E.content.some(_=>"image_url"in _):!1)&&e.supportsVision&&(m["Copilot-Vision-Request"]="true");let g=nfe.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(s),transport:"http",...u},{maxTokenWindow:e.modelMaxPromptTokens});for(let[E,_]of Object.entries(n))E==="messages"||E==="input"||(g.properties[`request.option.${E}`]=JSON.stringify(_)??"undefined");g.properties.headerRequestId=r,this._telemetryService.sendGHTelemetryEvent("request.sent",g.properties,g.measurements);let A=Date.now(),y=Ipr(s);return this._instantiationService.invokeFunction(wlt.postRequest,{endpointOrUrl:e,secretKey:o,intent:y,requestId:r,body:n,additionalHeaders:m,cancelToken:c,useFetcher:d,canRetryOnce:p,location:s,requestKindOptions:h}).then(E=>{let _=E.headers.get("apim-request-id");_&&this._logService.debug(`APIM request id: ${_}`);let v=E.headers.get("x-github-request-id");v&&this._logService.debug(`GH request id: ${v}`);let b=(0,Cpr.getRequestId)(E.headers);g.extendWithRequestId(b);let I=Date.now()-A;return g.measurements.totalTimeMs=I,this._logService.debug(`request.response: [${(0,wlt.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata)}], took ${I} ms`),this._telemetryService.sendGHTelemetryEvent("request.response",g.properties,g.measurements),E}).catch(E=>{if(this._fetcherService.isAbortError(E))throw E;let _=g.extendedBy({error:"Network exception"});this._telemetryService.sendGHTelemetryEvent("request.shownWarning",_.properties,_.measurements),g.properties.code=String(E.code??""),g.properties.errno=String(E.errno??""),g.properties.message=String(E.message??""),g.properties.type=String(E.type??"");let v=Date.now()-A;throw g.measurements.totalTimeMs=v,this._logService.debug(`request.response: [${(0,wlt.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata)}] took ${v} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",g.properties,g.measurements),E}).finally(()=>{let E=n.messages;if((!E||E.length===0)&&n.input)try{let _=(0,xlt.responseApiInputToRawMessagesForLogging)(n);E=(0,hb.rawMessageToCAPI)(_)}catch(_){this._logService.error("Failed to convert Response API input to messages for telemetry:",_),E=[]}(0,cai.sendEngineMessagesTelemetry)(this._telemetryService,E??[],g,!1,this._logService)})}async _handleError(e,r,n){let o=(0,Cpr.getRequestId)(r.headers);n=o.headerRequestId||n,o.headerRequestId=n,e.properties.error=`Response status was ${r.status}`,e.properties.status=String(r.status),this._telemetryService.sendGHTelemetryEvent("request.shownWarning",e.properties,e.measurements);let s=await r.text(),c;try{c=JSON.parse(s),c=c?.error??c}catch{}let l=`Server error: ${r.status}`,u=`${l} ${s}`;if(this._logService.error(u),400<=r.status&&r.status<500){if(r.status===400&&s.includes("off_topic"))return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.OffTopic,reason:"filtered as off_topic by intent classifier: message was not programming related"};if(r.status===401&&s.includes("authorize_url")&&c?.authorize_url)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.AgentUnauthorized,reason:r.statusText||r.statusText,data:c};if(r.status===400&&c?.code==="previous_response_not_found")return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.InvalidPreviousResponseId,reason:c.message||"Invalid previous response ID",data:c};if(r.status===401||r.status===403)return this._authenticationService.resetCopilotToken(r.status),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.TokenExpiredOrInvalid,reason:c?.message||`token expired or invalid: ${r.status}`};if(r.status===402){this._authenticationService.copilotToken?.isChatQuotaExceeded||(this._authenticationService.resetCopilotToken(r.status),await this._authenticationService.getCopilotToken());let d=r.headers.get("retry-after"),h=a(m=>{if(!m)return;let g=new Date(m);if(!isNaN(g.getDate()))return g;let A=parseInt(m,10);if(!isNaN(A))return new Date(Date.now()+A*1e3)},"convertToDate")(d);return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.QuotaExceeded,reason:c?.message??"Free tier quota exceeded",data:{capiError:c,retryAfter:h}}}if(r.status===404){let d;return c?d=JSON.stringify(c):d=s,{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.NotFound,reason:d}}if(r.status===422)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ContentFilter,reason:`Filtered by Responsible AI Service +`,Te=[...l,{role:J_a.Raw.ChatRole.User,content:(0,lRe.toTextParts)(J)}],fe=await this.fetchMany({...e,debugName:"retry-"+n,messages:Te,finishedCb:s,location:c,endpoint:o,source:d,requestOptions:u,userInitiatedRequest:!1,telemetryProperties:{...p,retryAfterFilterCategory:j.category??"uncategorized"},enableRetryOnFilter:!1,canRetryOnceWithoutRollback:!1,enableRetryOnError:Q},r);if(R?.resolve(fe,k.deltas),fe.type===Sn.ChatFetchResponseType.Success)return fe}}return{type:Sn.ChatFetchResponseType.Filtered,category:j.category,reason:"Response got filtered.",requestId:j.requestId,serverRequestId:j.serverRequestId}}if(R?.resolve(j,k.deltas),j.type===Sn.ChatFetchResponseType.Success&&j.usage){let ce={operationName:Li.GenAiOperationName.CHAT,providerName:Li.GenAiProviderName.GITHUB,requestModel:o.model,responseModel:j.resolvedModel};j.usage.prompt_tokens&&Li.GenAiMetrics.recordTokenUsage(this._otelService,j.usage.prompt_tokens,"input",ce),j.usage.completion_tokens&&Li.GenAiMetrics.recordTokenUsage(this._otelService,j.usage.completion_tokens,"output",ce),L?.setAttributes({[Li.GenAiAttr.USAGE_INPUT_TOKENS]:j.usage.prompt_tokens??0,[Li.GenAiAttr.USAGE_OUTPUT_TOKENS]:j.usage.completion_tokens??0,[Li.GenAiAttr.RESPONSE_MODEL]:j.resolvedModel??o.model,[Li.GenAiAttr.RESPONSE_ID]:j.requestId,[Li.GenAiAttr.RESPONSE_FINISH_REASONS]:["stop"],...j.usage.prompt_tokens_details?.cached_tokens?{[Li.GenAiAttr.USAGE_CACHE_READ_INPUT_TOKENS]:j.usage.prompt_tokens_details.cached_tokens}:{},[Li.CopilotChatAttr.TIME_TO_FIRST_TOKEN]:W,...j.serverRequestId?{[Li.CopilotChatAttr.SERVER_REQUEST_ID]:j.serverRequestId}:{},...j.usage.completion_tokens_details?.reasoning_tokens?{[Li.GenAiAttr.USAGE_REASONING_TOKENS]:j.usage.completion_tokens_details.reasoning_tokens}:{}})}if(L&&j.type===Sn.ChatFetchResponseType.Success){let ce=k.deltas.map(fe=>fe.text).join(""),J=k.deltas.filter(fe=>fe.copilotToolCalls?.length).flatMap(fe=>fe.copilotToolCalls.map(Ne=>({type:"tool_call",id:Ne.id,name:Ne.name,arguments:Ne.arguments}))),Te=[];ce&&Te.push({type:"text",content:ce}),Te.push(...J),Te.length>0&&L.setAttribute(Li.GenAiAttr.OUTPUT_MESSAGES,(0,Li.truncateForOTel)(JSON.stringify([{role:"assistant",parts:Te}])))}return(0,Li.emitInferenceDetailsEvent)(this._otelService,{model:o.model,temperature:u?.temperature,maxTokens:u?.max_tokens},j.type===Sn.ChatFetchResponseType.Success?{id:j.requestId,model:j.resolvedModel,finishReasons:["stop"],inputTokens:j.usage?.prompt_tokens,outputTokens:j.usage?.completion_tokens}:void 0),L?.end(),L=void 0,W>0&&Li.GenAiMetrics.recordTimeToFirstToken(this._otelService,o.model,W/1e3),y&&j.type===Sn.ChatFetchResponseType.Success&&(this._consecutiveWebSocketRetryFallbacks=0),j}case Kr.FetchResponseKind.Canceled:return gde.ChatMLFetcherTelemetrySender.sendCancellationTelemetry(this._telemetryService,{source:p.messageSource??"unknown",requestId:v,model:o.model,apiType:o.apiType,transport:_,associatedRequestId:p.associatedRequestId,retryAfterError:p.retryAfterError,retryAfterErrorGitHubRequestId:p.retryAfterErrorGitHubRequestId,connectivityTestError:p.connectivityTestError,connectivityTestErrorGitHubRequestId:p.connectivityTestErrorGitHubRequestId,retryAfterFilterCategory:p.retryAfterFilterCategory,fetcher:G,suspendEventSeen:F,resumeEventSeen:U},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:P,tokenCountMax:b,timeToFirstToken:W,timeToFirstTokenEmitted:w&&k.firstTokenEmittedTime?k.firstTokenEmittedTime-w.issuedTime:-1,timeToCancelled:Date.now()-w.issuedTime,isVisionRequest:this.filterImageMessages(l)?1:-1,isBYOK:(0,dci.isBYOKModel)(o),isAuto:(0,Mct.isAutoModel)(o),bytesReceived:O,issuedTime:w.issuedTime}),R?.resolveWithCancelation(),L?.setAttributes({[Li.GenAiAttr.RESPONSE_FINISH_REASONS]:["cancelled"],[Li.CopilotChatAttr.CANCELED]:!0}),L?.end(),L=void 0,this.processCanceledResponse(H,v,k,p);case Kr.FetchResponseKind.Failed:{let j=this.processFailedResponse(H,v,(0,Mct.isAutoModel)(o)===1),J=this._configurationService.getExperimentBasedConfig(lQ.ConfigKey.TeamInternal.RetryServerErrorStatusCodes,this._experimentationService).split(",").map(Ne=>parseInt(Ne.trim(),10)),Te=Q&&D!==void 0&&J.includes(D),fe=Q&&y&&(H.failKind===Kr.ChatFailKind.ServerError||H.failKind===Kr.ChatFailKind.Unknown);if(Te||fe){let{retryResult:Ne}=await this._retryAfterError({opts:e,processed:j,telemetryProperties:p,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToError:W,transport:_,actualFetcher:G,bytesReceived:O,baseTelemetry:w,streamRecorder:k,retryReason:"server_error",debugNamePrefix:"retry-server-error-",pendingLoggedChatRequest:R,token:r,usernameToScrub:N,suspendEventSeen:F,resumeEventSeen:U});if(Ne)return Ne}return gde.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:j,telemetryProperties:p,chatEndpointInfo:o,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToFirstToken:W,isVisionRequest:this.filterImageMessages(l),transport:_,fetcher:G,bytesReceived:O,issuedTime:w.issuedTime,wasRetried:!1,suspendEventSeen:F,resumeEventSeen:U}),R?.resolve(j),j}}}catch(H){L&&(L.setStatus(2,H instanceof Error?H.message:String(H)),L.setAttribute(Li.StdAttr.ERROR_TYPE,H instanceof Error?H.constructor.name:"Error"),L.setAttribute(Li.GenAiAttr.RESPONSE_FINISH_REASONS,["error"]),L.recordException(H),L.end());let $=Date.now()-w.issuedTime;H.fetcherId&&(G=H.fetcherId),H.suspendEventSeen&&(F=!0),H.resumeEventSeen&&(U=!0);let W=this.processError(H,v,H.gitHubRequestId,N,(0,Mct.isAutoModel)(o)===1),j=Q&&W.type===Sn.ChatFetchResponseType.NetworkError&&this._configurationService.getExperimentBasedConfig(lQ.ConfigKey.TeamInternal.RetryNetworkErrors,this._experimentationService),ce=Q&&y&&(W.type===Sn.ChatFetchResponseType.NetworkError||W.type===Sn.ChatFetchResponseType.Failed);if(j||ce){let{retryResult:J,connectivityTestError:Te,connectivityTestErrorGitHubRequestId:fe}=await this._retryAfterError({opts:e,processed:W,telemetryProperties:p,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToError:$,transport:_,actualFetcher:G,bytesReceived:H.bytesReceived,baseTelemetry:w,streamRecorder:k,retryReason:"network_error",debugNamePrefix:"retry-error-",pendingLoggedChatRequest:R,token:r,usernameToScrub:N,suspendEventSeen:F,resumeEventSeen:U});if(J)return J;p={...p,connectivityTestError:Te,connectivityTestErrorGitHubRequestId:fe}}return W.type===Sn.ChatFetchResponseType.Canceled?gde.ChatMLFetcherTelemetrySender.sendCancellationTelemetry(this._telemetryService,{source:p.messageSource??"unknown",requestId:v,model:o.model,apiType:o.apiType,transport:_,associatedRequestId:p.associatedRequestId,retryAfterError:p.retryAfterError,retryAfterErrorGitHubRequestId:p.retryAfterErrorGitHubRequestId,connectivityTestError:p.connectivityTestError,connectivityTestErrorGitHubRequestId:p.connectivityTestErrorGitHubRequestId,retryAfterFilterCategory:p.retryAfterFilterCategory,fetcher:G,suspendEventSeen:F,resumeEventSeen:U},{totalTokenMax:o.modelMaxPromptTokens??-1,promptTokenCount:P,tokenCountMax:b,timeToFirstToken:void 0,timeToCancelled:$,isVisionRequest:this.filterImageMessages(l)?1:-1,isBYOK:(0,dci.isBYOKModel)(o),isAuto:(0,Mct.isAutoModel)(o),bytesReceived:H.bytesReceived,issuedTime:w.issuedTime}):gde.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:W,telemetryProperties:p,chatEndpointInfo:o,requestBody:x,tokenCount:P,maxResponseTokens:b,timeToFirstToken:$,isVisionRequest:this.filterImageMessages(l),transport:_,fetcher:G,bytesReceived:H.bytesReceived,issuedTime:w.issuedTime,wasRetried:!1,suspendEventSeen:F,resumeEventSeen:U}),R?.resolve(W),W}}async _checkNetworkConnectivity(e){let r=this.connectivityCheckDelays,n,o;for(let s of r){this._logService.info(`Waiting ${s}ms before pinging CAPI to check network connectivity...`),await new Promise(c=>setTimeout(c,s));try{let c=this._capiClientService.dotcomAPIURL!=="https://api.github.com",l=this._capiClientService.capiPingURL,u=await this._getAuthHeaders(c,l),d=await this._fetcherService.fetch(l,{headers:u,useFetcher:e,callSite:"capi-ping"});if(d.status>=200&&d.status<300)return this._logService.info("CAPI ping successful, proceeding with chat request retry..."),{retryRequest:!0,connectivityTestError:n,connectivityTestErrorGitHubRequestId:o};n=`Status ${d.status}: ${d.statusText}`,o=d.headers.get("x-github-request-id")??"",this._logService.info(`CAPI ping returned status ${d.status}, retrying ping...`)}catch(c){n=(0,jpr.collectSingleLineErrorMessage)(c,!0),o=void 0,this._logService.info(`CAPI ping failed with error, retrying ping: ${n}`)}}return{retryRequest:!1,connectivityTestError:n,connectivityTestErrorGitHubRequestId:o}}async _getAuthHeaders(e,r){let n={};if(e){let o="";if(r===this._capiClientService.dotcomAPIURL)o=this._authenticationService.anyGitHubSession?.accessToken||"";else try{o=(await this._authenticationService.getCopilotToken()).token}catch{o=""}n.Authorization=`Bearer ${o}`}return n}async _retryAfterError(e){let{opts:r,processed:n,telemetryProperties:o,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToError:u,transport:d,actualFetcher:p,bytesReceived:h,baseTelemetry:m,streamRecorder:g,retryReason:A,debugNamePrefix:y,pendingLoggedChatRequest:E,token:_,usernameToScrub:v,suspendEventSeen:b,resumeEventSeen:I}=e,x=["darwin","linux"].includes(process.platform)&&n.reason.indexOf("net::ERR_NETWORK_CHANGED")!==-1,w=this._configurationService.getExperimentBasedConfig(lQ.ConfigKey.TeamInternal.FallbackNodeFetchOnNetworkProcessCrash,this._experimentationService),R=n.type===Sn.ChatFetchResponseType.NetworkError&&n.isNetworkProcessCrash===!0&&w,P=x||R?"node-fetch":r.useFetcher;this._logService.info(`Retrying chat request with ${P||"default"} fetcher after: ${n.reasonDetail||n.reason}`);let k=await this._checkNetworkConnectivity(P),Q=k.connectivityTestError?this.scrubErrorDetail(k.connectivityTestError,v):void 0,M=k.connectivityTestErrorGitHubRequestId;if(!k.retryRequest)return this._logService.info("Not retrying chat request as network connectivity could not be re-established."),{connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M};gde.ChatMLFetcherTelemetrySender.sendResponseErrorTelemetry(this._telemetryService,{processed:n,telemetryProperties:o,chatEndpointInfo:r.endpoint,requestBody:s,tokenCount:c,maxResponseTokens:l,timeToFirstToken:u,isVisionRequest:this.filterImageMessages(r.messages),transport:d,fetcher:p,bytesReceived:h,issuedTime:m.issuedTime,wasRetried:!0,suspendEventSeen:b,resumeEventSeen:I}),g.callback("",0,{text:"",retryReason:A});let N=await this.fetchMany({...r,useWebSocket:!1,ignoreStatefulMarker:r.useWebSocket||r.ignoreStatefulMarker,debugName:y+r.debugName,userInitiatedRequest:!1,telemetryProperties:{...o,retryAfterError:n.reasonDetail||n.reason,retryAfterErrorGitHubRequestId:n.serverRequestId,connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M},enableRetryOnError:!1,useFetcher:P},_);return E?.resolve(N,g.deltas),r.useWebSocket&&N.type===Sn.ChatFetchResponseType.Success&&(this._consecutiveWebSocketRetryFallbacks++,this._logService.info(`[ChatWebSocketManager] WebSocket request failed with successful HTTP fallback (${this._consecutiveWebSocketRetryFallbacks} consecutive).`),r.conversationId&&r.turnId&&this._webSocketManager.closeConnection(r.conversationId,r.turnId)),{retryResult:N,connectivityTestError:Q,connectivityTestErrorGitHubRequestId:M}}async _fetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v){let I=this._configurationService.getExperimentBasedConfig(lQ.ConfigKey.TeamInternal.ChatRequestPowerSaveBlocker,this._experimentationService)&&l!==Sn.ChatLocation.Other?this._powerService.acquirePowerSaveBlocker():void 0,x=!1,w=!1,R=this._powerService.onDidSuspend(()=>{x=!0,this._logService.info(`System suspended during streaming request ${u} (${Sn.ChatLocation.toString(l)})`)}),P=this._powerService.onDidResume(()=>{w=!0,this._logService.info(`System resumed during streaming request ${u} (${Sn.ChatLocation.toString(l)})`)});try{return{...await this._doFetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v),suspendEventSeen:x||void 0,resumeEventSeen:w||void 0}}catch(k){throw x&&(k.suspendEventSeen=!0),w&&(k.resumeEventSeen=!0),k}finally{R.dispose(),P.dispose(),I?.dispose()}}async _doFetchAndStreamChat(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v){if(p.isCancellationRequested)return{result:{type:Kr.FetchResponseKind.Canceled,reason:"before fetch request"}};let b=typeof e.urlOrRequestMetadata=="string"?(()=>{try{return new URL(e.urlOrRequestMetadata).hostname}catch{return}})():void 0,I=(0,Fct.getCurrentCapturingToken)()?.chatSessionId,x=(0,Fct.getCurrentCapturingToken)()?.parentChatSessionId,w=(0,Fct.getCurrentCapturingToken)()?.debugLogLabel,R=this._otelService.startSpan(`chat ${e.model}`,{kind:2,attributes:{[Li.GenAiAttr.OPERATION_NAME]:Li.GenAiOperationName.CHAT,[Li.GenAiAttr.PROVIDER_NAME]:Li.GenAiProviderName.GITHUB,[Li.GenAiAttr.REQUEST_MODEL]:e.model,[Li.GenAiAttr.CONVERSATION_ID]:y?.requestId??u,[Li.GenAiAttr.REQUEST_MAX_TOKENS]:r.max_tokens??r.max_output_tokens??r.max_completion_tokens??2048,...r.temperature!==void 0?{[Li.GenAiAttr.REQUEST_TEMPERATURE]:r.temperature}:{},...r.top_p!==void 0?{[Li.GenAiAttr.REQUEST_TOP_P]:r.top_p}:{},[Li.CopilotChatAttr.MAX_PROMPT_TOKENS]:e.modelMaxPromptTokens,...b?{[Li.StdAttr.SERVER_ADDRESS]:b}:{},...A?{[Li.CopilotChatAttr.SESSION_ID]:A}:{},...I?{[Li.CopilotChatAttr.CHAT_SESSION_ID]:I}:{},...x?{[Li.CopilotChatAttr.PARENT_CHAT_SESSION_ID]:x}:{},...w?{[Li.CopilotChatAttr.DEBUG_LOG_LABEL]:w}:{}}}),P=Date.now();try{if(this._logService.debug(`modelMaxPromptTokens ${e.modelMaxPromptTokens}`),this._logService.debug(`modelMaxResponseTokens ${r.max_tokens??2048}`),this._logService.debug(`chat model ${e.model}`),s??=c.token,!s){let Q=(0,Bct.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata);return this._logService.error(`Failed to send request to ${Q} due to missing key`),(0,cci.sendCommunicationErrorTelemetry)(this._telemetryService,`Failed to send request to ${Q} due to missing key`),{result:{type:Kr.FetchResponseKind.Failed,modelRequestId:void 0,failKind:Kr.ChatFailKind.TokenExpiredOrInvalid,reason:"key is missing"}}}return m&&g&&A?{...await this._doFetchViaWebSocket(e,r,n,o,s,l,u,g,A,p,h,y,v),otelSpan:R}:{...await this._doFetchViaHttp(e,r,n,o,s,l,u,d,p,h,y,E,_,v),otelSpan:R}}catch(k){throw R.setStatus(2,k instanceof Error?k.message:String(k)),R.setAttribute(Li.StdAttr.ERROR_TYPE,k instanceof Error?k.constructor.name:"Error"),R.recordException(k),k}finally{let k=(Date.now()-P)/1e3;Li.GenAiMetrics.recordOperationDuration(this._otelService,k,{operationName:Li.GenAiOperationName.CHAT,providerName:Li.GenAiProviderName.GITHUB,requestModel:e.model})}}async _doFetchViaWebSocket(e,r,n,o,s,c,l,u,d,p,h,m,g){let A=Vpr(c),y=g?.kind==="subagent"?"conversation-subagent":g?.kind==="background"?"conversation-background":A==="conversation-agent"?A:void 0,E={Authorization:`Bearer ${s}`,"X-Request-Id":l,"OpenAI-Intent":A,"X-GitHub-Api-Version":"2025-05-01","X-Interaction-Id":this._interactionService.interactionId,...e.getExtraHeaders?e.getExtraHeaders(c):{}};y&&(E["X-Interaction-Type"]=y,E["X-Agent-Task-Id"]=l),r.messages?.some(M=>Array.isArray(M.content)?M.content.some(N=>"image_url"in N):!1)&&e.supportsVision&&(E["Copilot-Vision-Request"]="true");let _=this._webSocketManager.getOrCreateConnection(d,u,E);try{await _.connect()}catch(M){throw M.gitHubRequestId=_.gitHubRequestId,M}let v=(0,qpr.generateUuid)(),b=Ade.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(c),transport:"websocket",...m,modelCallId:v},{maxTokenWindow:e.modelMaxPromptTokens}),I=(0,Qpr.getRequestId)(_.responseHeaders);b.extendWithRequestId(I);for(let[M,N]of Object.entries(r))M==="messages"||M==="input"||(b.properties[`request.option.${M}`]=JSON.stringify(N)??"undefined");b.properties.headerRequestId=l,this._telemetryService.sendGHTelemetryEvent("request.sent",b.properties,b.measurements);let x=Date.now(),w=_.sendRequest(r,{userInitiated:!!h},p),R=n.extendedBy({modelCallId:v}),P=this._instantiationService.createInstance(Oct.OpenAIResponsesProcessor,R,I.headerRequestId,I.gitHubRequestId),k=new lci.AsyncIterableObject(async M=>{try{await new Promise((G,O)=>{w.onEvent(D=>{let F=P.push(D,o);if(F&&((0,Oct.sendCompletionOutputTelemetry)(this._telemetryService,this._logService,F,R),M.emitOne(F)),D.type==="response.completed"){let U=D.copilot_quota_snapshots;U&&typeof U=="object"&&this._chatQuotaService.processQuotaSnapshots(U)}}),w.onCAPIError(D=>{let F=new Error(`${D.error.message} (${D.error.code})`);F.gitHubRequestId=I.gitHubRequestId,F.capiWebSocketError=D,O(F)}),w.onError(D=>{if(D.gitHubRequestId=I.gitHubRequestId,(0,uci.isCancellationError)(D)){O(D);return}let F=b.extendedBy({error:D.message});this._telemetryService.sendGHTelemetryEvent("request.shownWarning",F.properties,F.measurements);let U=Date.now()-x;b.measurements.totalTimeMs=U,b.properties.error=D.message,this._logService.debug(`request.error: [websocket], took ${U} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",b.properties,b.measurements),O(D)}),w.done.then(G,O)});let N=Date.now()-x;b.measurements.totalTimeMs=N,this._logService.debug(`request.response: [websocket], took ${N} ms`),this._telemetryService.sendGHTelemetryEvent("request.response",b.properties,b.measurements)}finally{let N=r.messages;if((!N||N.length===0)&&r.input)try{let G=(0,Oct.responseApiInputToRawMessagesForLogging)(r);N=(0,tb.rawMessageToCAPI)(G)}catch(G){this._logService.error("Failed to convert Response API input to messages for telemetry:",G),N=[]}(0,aci.sendEngineMessagesTelemetry)(this._telemetryService,N??[],b,!1,this._logService)}}),Q=await w.firstEvent;if(p.isCancellationRequested)return{result:{type:Kr.FetchResponseKind.Canceled,reason:"after first WebSocket event"}};if((0,fci.isCAPIWebSocketError)(Q)){let M=Date.now()-x;return b.measurements.totalTimeMs=M,b.properties.error=`${Q.error.message} (${Q.error.code})`,this._logService.debug(`request.error: [websocket capi error], took ${M} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",b.properties,b.measurements),{result:await this._handleWebSocketCAPIError(Q,I)}}return this._authenticationService.copilotToken?.isFreeUser&&this._authenticationService.copilotToken?.isChatQuotaExceeded&&this._authenticationService.resetCopilotToken(),{result:{type:Kr.FetchResponseKind.Success,chatCompletions:k}}}async _doFetchViaHttp(e,r,n,o,s,c,l,u,d,p,h,m,g,A){let y=(0,qpr.generateUuid)(),E=await this._fetchWithInstrumentation(e,l,r,s,c,d,p,{...h,modelCallId:y},m,g,A);if(d.isCancellationRequested){try{await E.body.destroy()}catch(I){this._logService.error(I,"Error destroying stream"),this._telemetryService.sendGHTelemetryException(I,"Error destroying stream")}return{result:{type:Kr.FetchResponseKind.Canceled,reason:"after fetch request"},fetcher:E.fetcher,bytesReceived:E.bytesReceived}}if(E.status===200&&this._authenticationService.copilotToken?.isFreeUser&&this._authenticationService.copilotToken?.isChatQuotaExceeded&&this._authenticationService.resetCopilotToken(),E.status!==200){let I=pci(e,c,l);return this._logService.info("Request ID for failed request: "+l),{result:await this._handleError(I,E,l),fetcher:E.fetcher,bytesReceived:E.bytesReceived,statusCode:E.status}}let _=n.extendedBy({modelCallId:y}),v,b=E.headers.get("x-github-request-id")??"";try{let I=await e.processResponseFromChatEndpoint(this._telemetryService,this._logService,E,u??1,o,_,d,c);v=new lci.AsyncIterableObject(async x=>{try{for await(let w of I)x.emitOne(w)}catch(w){throw w.fetcherId=E.fetcher,w.gitHubRequestId=b,w.bytesReceived=E.bytesReceived,w}})}catch(I){throw I.fetcherId=E.fetcher,I.gitHubRequestId=b,I.bytesReceived=E.bytesReceived,I}return E.headers.get("Copilot-Edits-Session")&&(this._authenticationService.speculativeDecodingEndpointToken=E.headers.get("Copilot-Edits-Session")??void 0),this._chatQuotaService.processQuotaHeaders(E.headers),{result:{type:Kr.FetchResponseKind.Success,chatCompletions:v},fetcher:E.fetcher,bytesReceived:E.bytesReceived}}async _fetchWithInstrumentation(e,r,n,o,s,c,l,u,d,p,h){let m={"X-Interaction-Id":this._interactionService.interactionId,"X-Initiator":l?"user":"agent"};n.messages?.some(E=>Array.isArray(E.content)?E.content.some(_=>"image_url"in _):!1)&&e.supportsVision&&(m["Copilot-Vision-Request"]="true");let g=Ade.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(s),transport:"http",...u},{maxTokenWindow:e.modelMaxPromptTokens});for(let[E,_]of Object.entries(n))E==="messages"||E==="input"||(g.properties[`request.option.${E}`]=JSON.stringify(_)??"undefined");g.properties.headerRequestId=r,this._telemetryService.sendGHTelemetryEvent("request.sent",g.properties,g.measurements);let A=Date.now(),y=Vpr(s);return this._instantiationService.invokeFunction(Bct.postRequest,{endpointOrUrl:e,secretKey:o,intent:y,requestId:r,body:n,additionalHeaders:m,cancelToken:c,useFetcher:d,canRetryOnce:p,location:s,requestKindOptions:h}).then(E=>{let _=E.headers.get("apim-request-id");_&&this._logService.debug(`APIM request id: ${_}`);let v=E.headers.get("x-github-request-id");v&&this._logService.debug(`GH request id: ${v}`);let b=(0,Qpr.getRequestId)(E.headers);g.extendWithRequestId(b);let I=Date.now()-A;return g.measurements.totalTimeMs=I,this._logService.debug(`request.response: [${(0,Bct.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata)}], took ${I} ms`),this._telemetryService.sendGHTelemetryEvent("request.response",g.properties,g.measurements),E}).catch(E=>{if(this._fetcherService.isAbortError(E))throw E;let _=g.extendedBy({error:"Network exception"});this._telemetryService.sendGHTelemetryEvent("request.shownWarning",_.properties,_.measurements),g.properties.code=String(E.code??""),g.properties.errno=String(E.errno??""),g.properties.message=String(E.message??""),g.properties.type=String(E.type??"");let v=Date.now()-A;throw g.measurements.totalTimeMs=v,this._logService.debug(`request.response: [${(0,Bct.stringifyUrlOrRequestMetadata)(e.urlOrRequestMetadata)}] took ${v} ms`),this._telemetryService.sendGHTelemetryEvent("request.error",g.properties,g.measurements),E}).finally(()=>{let E=n.messages;if((!E||E.length===0)&&n.input)try{let _=(0,Oct.responseApiInputToRawMessagesForLogging)(n);E=(0,tb.rawMessageToCAPI)(_)}catch(_){this._logService.error("Failed to convert Response API input to messages for telemetry:",_),E=[]}(0,aci.sendEngineMessagesTelemetry)(this._telemetryService,E??[],g,!1,this._logService)})}async _handleError(e,r,n){let o=(0,Qpr.getRequestId)(r.headers);n=o.headerRequestId||n,o.headerRequestId=n,e.properties.error=`Response status was ${r.status}`,e.properties.status=String(r.status),this._telemetryService.sendGHTelemetryEvent("request.shownWarning",e.properties,e.measurements);let s=await r.text(),c;try{c=JSON.parse(s),c=c?.error??c}catch{}let l=`Server error: ${r.status}`,u=`${l} ${s}`;if(this._logService.error(u),400<=r.status&&r.status<500){if(r.status===400&&s.includes("off_topic"))return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.OffTopic,reason:"filtered as off_topic by intent classifier: message was not programming related"};if(r.status===401&&s.includes("authorize_url")&&c?.authorize_url)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.AgentUnauthorized,reason:r.statusText||r.statusText,data:c};if(r.status===400&&c?.code==="previous_response_not_found")return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.InvalidPreviousResponseId,reason:c.message||"Invalid previous response ID",data:c};if(r.status===401||r.status===403)return this._authenticationService.resetCopilotToken(r.status),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.TokenExpiredOrInvalid,reason:c?.message||`token expired or invalid: ${r.status}`};if(r.status===402){this._authenticationService.copilotToken?.isChatQuotaExceeded||(this._authenticationService.resetCopilotToken(r.status),await this._authenticationService.getCopilotToken());let d=r.headers.get("retry-after"),h=a(m=>{if(!m)return;let g=new Date(m);if(!isNaN(g.getDate()))return g;let A=parseInt(m,10);if(!isNaN(A))return new Date(Date.now()+A*1e3)},"convertToDate")(d);return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.QuotaExceeded,reason:c?.message??"Free tier quota exceeded",data:{capiError:c,retryAfter:h}}}if(r.status===404){let d;return c?d=JSON.stringify(c):d=s,{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.NotFound,reason:d}}if(r.status===422)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ContentFilter,reason:`Filtered by Responsible AI Service -`+s};if(r.status===424)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.AgentFailedDependency,reason:s};if(r.status===429){let d=s;return d=c?.message??c?.code,s.includes("extension_blocked")&&c?.code==="extension_blocked"&&c?.type==="rate_limit_error"?{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ExtensionBlocked,reason:"Extension blocked",data:{...c?.message,retryAfter:r.headers.get("retry-after")}}:{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.RateLimited,reason:d,data:{retryAfter:r.headers.get("retry-after"),rateLimitKey:r.headers.get("x-ratelimit-exceeded"),capiError:c}}}if(r.status===466)return this._logService.info(s),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ClientNotSupported,reason:`client not supported: ${s}`};if(r.status===499)return this._logService.info("Cancelled by server"),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ServerCanceled,reason:"canceled by server"}}else if(500<=r.status&&r.status<600)return r.status===503?{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.RateLimited,reason:"Upstream provider rate limit hit",data:{retryAfter:null,rateLimitKey:null,capiError:{code:"upstream_provider_rate_limit",message:s}}}:{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ServerError,reason:l};return this._logService.error(`Request Failed: ${r.status} ${s}`),(0,lai.sendCommunicationErrorTelemetry)(this._telemetryService,"Unhandled status from server: "+r.status,s),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${r.status} ${s}`}}async processSuccessfulResponse(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E){let _=[];for await(let x of e.chatCompletions)rfe.ChatMLFetcherTelemetrySender.sendSuccessTelemetry(this._telemetryService,{chatCompletion:x,baseTelemetry:d,userInitiatedRequest:h,chatEndpointInfo:p,requestBody:n,maxResponseTokens:s,promptTokenCount:c,timeToFirstToken:l,timeToFirstTokenEmitted:d&&u.firstTokenEmittedTime?u.firstTokenEmittedTime-d.issuedTime:-1,hasImageMessages:this.filterImageMessages(r),transport:m,fetcher:g,bytesReceived:A,suspendEventSeen:y,resumeEventSeen:E}),this.isRepetitive(x,d?.properties)||_.push(x);let v=new Set([hb.FinishedCompletionReason.Stop,hb.FinishedCompletionReason.ClientTrimmed,hb.FinishedCompletionReason.FunctionCall,hb.FinishedCompletionReason.ToolCalls]),b=_.filter(x=>v.has(x.finishReason));if(b.length>=1)return{type:Sn.ChatFetchResponseType.Success,resolvedModel:b[0].model,usage:b.length===1?b[0].usage:void 0,value:b.map(x=>(0,f2e.getTextPart)(x.message.content)),requestId:o,serverRequestId:b[0].requestId.headerRequestId};let I=_.at(0);switch(I?.finishReason){case hb.FinishedCompletionReason.ContentFilter:return{type:Sn.ChatFetchResponseType.FilteredRetry,category:I.filterReason??hb.FilterReason.Copyright,reason:"Response got filtered.",value:_.map(x=>(0,f2e.getTextPart)(x.message.content)),requestId:o,serverRequestId:I.requestId.headerRequestId};case hb.FinishedCompletionReason.Length:return{type:Sn.ChatFetchResponseType.Length,reason:"Response too long.",requestId:o,serverRequestId:I.requestId.headerRequestId,truncatedValue:(0,f2e.getTextPart)(I.message.content)};case hb.FinishedCompletionReason.ServerError:return{type:Sn.ChatFetchResponseType.Failed,reason:"Server error. Stream terminated",requestId:o,serverRequestId:I.requestId.headerRequestId,streamError:I.error}}return{type:Sn.ChatFetchResponseType.Unknown,reason:Sn.RESPONSE_CONTAINED_NO_CHOICES,requestId:o,serverRequestId:I?.requestId.headerRequestId}}filterImageMessages(e){return e?.some(r=>Array.isArray(r.content)?r.content.some(n=>"imageUrl"in n):!1)}isRepetitive(e,r){let n=(0,Rlt.calculateLineRepetitionStats)((0,f2e.getTextPart)(e.message.content)),o=(0,Rlt.isRepetitive)(e.tokens);if(o){let s=nfe.TelemetryData.createAndMarkAsIssued();s.extendWithRequestId(e.requestId);let c=s.extendedBy(r);this._telemetryService.sendEnhancedGHTelemetryEvent("conversation.repetition.detected",c.properties,c.measurements)}return n.numberOfRepetitions>=10&&this._telemetryService.sendMSFTTelemetryEvent("conversation.repetition.detected",{requestId:e.requestId.headerRequestId,finishReason:e.finishReason},{numberOfRepetitions:n.numberOfRepetitions,lengthOfLine:n.mostRepeatedLine.length,totalLines:n.totalLines}),o}checkRepetitionInDeltas(e,r,n){let o=e.filter(u=>u.text?.length>0).map(u=>u.text).join("");if(!o||o.trim().length===0)return;let s=o.split(/\s+/).filter(u=>u.length>0),c=(0,Rlt.calculateLineRepetitionStats)(o);if((0,Rlt.isRepetitive)(s)){let d=nfe.TelemetryData.createAndMarkAsIssued().extendedBy(n);this._telemetryService.sendEnhancedGHTelemetryEvent("conversation.repetition.detected",d.properties,d.measurements)}c.numberOfRepetitions>=10&&this._telemetryService.sendMSFTTelemetryEvent("conversation.repetition.detected",{requestId:r,finishReason:"canceled"},{numberOfRepetitions:c.numberOfRepetitions,lengthOfLine:c.mostRepeatedLine.length,totalLines:c.totalLines})}processCanceledResponse(e,r,n,o){return n&&n.deltas.length>0&&this.checkRepetitionInDeltas(n.deltas,r,o),{type:Sn.ChatFetchResponseType.Canceled,reason:e.reason,requestId:r,serverRequestId:void 0}}processFailedResponse(e,r,n){let o=e.modelRequestId?.gitHubRequestId,s=e.reason;if(e.failKind===Kr.ChatFailKind.RateLimited)return{type:Sn.ChatFetchResponseType.RateLimited,reason:s,requestId:r,serverRequestId:o,retryAfter:e.data?.retryAfter,rateLimitKey:e.data?.rateLimitKey||"",isAuto:n,capiError:e.data?.capiError};if(e.failKind===Kr.ChatFailKind.QuotaExceeded)return{type:Sn.ChatFetchResponseType.QuotaExceeded,reason:s,requestId:r,serverRequestId:o,retryAfter:e.data?.retryAfter,capiError:e.data?.capiError};if(e.failKind===Kr.ChatFailKind.OffTopic)return{type:Sn.ChatFetchResponseType.OffTopic,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.TokenExpiredOrInvalid||e.failKind===Kr.ChatFailKind.ClientNotSupported||s.includes("Bad request: "))return{type:Sn.ChatFetchResponseType.BadRequest,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ServerError)return{type:Sn.ChatFetchResponseType.Failed,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ContentFilter)return{type:Sn.ChatFetchResponseType.PromptFiltered,reason:s,category:hb.FilterReason.Prompt,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.AgentUnauthorized)return{type:Sn.ChatFetchResponseType.AgentUnauthorized,reason:s,authorizationUrl:e.data.authorize_url,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.AgentFailedDependency)return{type:Sn.ChatFetchResponseType.AgentFailedDependency,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ExtensionBlocked){let c=typeof e.data?.retryAfter=="number"?e.data.retryAfter:300;return{type:Sn.ChatFetchResponseType.ExtensionBlocked,reason:s,requestId:r,retryAfter:c,learnMoreLink:e.data?.learnMoreLink??"",serverRequestId:o}}return e.failKind===Kr.ChatFailKind.NotFound?{type:Sn.ChatFetchResponseType.NotFound,reason:s,requestId:r,serverRequestId:o}:e.failKind===Kr.ChatFailKind.InvalidPreviousResponseId?{type:Sn.ChatFetchResponseType.InvalidStatefulMarker,reason:s,requestId:r,serverRequestId:o}:{type:Sn.ChatFetchResponseType.Failed,reason:s,requestId:r,serverRequestId:o}}processError(e,r,n,o,s){let c=e?.capiWebSocketError;if(c)return this._handleWebSocketError(c,r,n,s);let l=this._fetcherService;if(l.isAbortError(e))return{type:Sn.ChatFetchResponseType.Canceled,reason:"network request aborted",requestId:r,serverRequestId:n};if((0,dai.isCancellationError)(e))return{type:Sn.ChatFetchResponseType.Canceled,reason:"Got a cancellation error",requestId:r,serverRequestId:n};if(e&&(e instanceof Error&&e.message==="Premature close"||typeof e=="object"&&e.code==="ERR_STREAM_PREMATURE_CLOSE"))return{type:Sn.ChatFetchResponseType.Canceled,reason:"Stream closed prematurely",requestId:r,serverRequestId:n};this._logService.error(cEa.ErrorUtils.fromUnknown(e),"Error on conversation request"),this._telemetryService.sendGHTelemetryException(e,"Error on conversation request");let u=l.getUserMessageForFetcherError(e),d=(0,Tpr.collectSingleLineErrorMessage)(e,!0),p=this.scrubErrorDetail(d,o);if(l.isInternetDisconnectedError(e))return{type:Sn.ChatFetchResponseType.NetworkError,reason:"It appears you're not connected to the internet, please check your network connection and try again.",reasonDetail:p,requestId:r,serverRequestId:n};if(l.isFetcherError(e)){let h=l.isNetworkProcessCrashedError(e);return{type:Sn.ChatFetchResponseType.NetworkError,reason:u,reasonDetail:p,requestId:r,serverRequestId:n,...h?{isNetworkProcessCrash:!0}:{}}}else return{type:Sn.ChatFetchResponseType.Failed,reason:"Error on conversation request. Check the log for more details.",reasonDetail:p,requestId:r,serverRequestId:n}}async _handleWebSocketCAPIError(e,r){let{code:n,message:o}=e.error,s={code:n,message:o},c=n.split(":")[0];return this._logService.error(`WebSocket CAPI error: ${o} (${n})`),c==="rate_limited"||c==="user_model_rate_limited"||c==="user_global_rate_limited"||c==="integration_rate_limited"||c==="model_overloaded"||c==="agent_mode_limit_exceeded"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.RateLimited,reason:o,data:{capiError:s}}:c==="quota_exceeded"||c==="free_quota_exceeded"||c==="overage_limit_reached"||c==="billing_not_configured"?(this._authenticationService.copilotToken?.isChatQuotaExceeded||(this._authenticationService.resetCopilotToken(402),await this._authenticationService.getCopilotToken()),{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.QuotaExceeded,reason:o,data:{capiError:s}}):n==="content_filter"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ContentFilter,reason:o}:n==="not_found"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.NotFound,reason:o}:n==="request_too_large"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${n} ${o}`}:n==="service_unavailable"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ServerError,reason:`Request Failed: ${n} ${o}`}:n==="bad_request"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${n} ${o}`}:{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ServerError,reason:`Request Failed: ${n} ${o||"WebSocket server error"}`}}_handleWebSocketError(e,r,n,o){let{code:s,message:c}=e.error,l={code:s,message:c},u=s.split(":")[0];return u==="rate_limited"||u==="user_model_rate_limited"||u==="user_global_rate_limited"||u==="integration_rate_limited"||u==="model_overloaded"||u==="agent_mode_limit_exceeded"?{type:Sn.ChatFetchResponseType.RateLimited,reason:c,requestId:r,serverRequestId:n,retryAfter:void 0,rateLimitKey:"",isAuto:o,capiError:l}:u==="quota_exceeded"||u==="free_quota_exceeded"||u==="overage_limit_reached"||u==="billing_not_configured"?{type:Sn.ChatFetchResponseType.QuotaExceeded,reason:c,requestId:r,serverRequestId:n,capiError:l,retryAfter:void 0}:s==="content_filter"?{type:Sn.ChatFetchResponseType.PromptFiltered,reason:c,category:hb.FilterReason.Prompt,requestId:r,serverRequestId:n}:s==="not_found"?{type:Sn.ChatFetchResponseType.NotFound,reason:c,requestId:r,serverRequestId:n}:s==="bad_request"?{type:Sn.ChatFetchResponseType.BadRequest,reason:c,requestId:r,serverRequestId:n}:{type:Sn.ChatFetchResponseType.Failed,reason:`Request Failed: ${s} ${c||"WebSocket server error"}`,requestId:r,serverRequestId:n}}scrubErrorDetail(e,r){if(r){let n=new RegExp((0,dEa.escapeRegExpCharacters)(r),"ig");e=e.replaceAll(n,"")}return e.replaceAll(/(?<=logged in as )(?!)[^\s]+/ig,"!!")}};mb.ChatMLFetcherImpl=Spr;mb.ChatMLFetcherImpl=Spr=bpr=Yya([sE(0,iEa.IFetcherService),sE(1,aEa.ITelemetryService),sE(2,Plt.IRequestLogger),sE(3,Tpr.ILogService),sE(4,Jya.IAuthenticationService),sE(5,tEa.IInteractionService),sE(6,Zya.IChatQuotaService),sE(7,rEa.ICAPIClientService),sE(8,eEa.IConversationOptions),sE(9,BQ.IConfigurationService),sE(10,sEa.IExperimentationService),sE(11,hEa.IPowerService),sE(12,fEa.IInstantiationService),sE(13,pai.IChatWebSocketManager),sE(14,oEa.IOTelService)],Spr);function mEa(t,e,r,n,o){if(t.length===0)return{isValid:!1,reason:vpr("No messages provided")};if(e?.max_tokens&&e?.max_tokens<1)return{isValid:!1,reason:vpr("Invalid response token parameter")};let s=/^[a-zA-Z0-9_-]+$/;return e?.functions?.some(c=>!c.name.match(s))||e?.function_call?.name&&!e.function_call.name.match(s)?{isValid:!1,reason:vpr("Function names must match ^[a-zA-Z0-9_-]+$")}:e?.tools&&e.tools.length>BQ.HARD_TOOL_LIMIT&&!(0,nEa.isAnthropicToolSearchEnabled)(r,n)?{isValid:!1,reason:`Tool limit exceeded (${e.tools.length}/${BQ.HARD_TOOL_LIMIT}). Click "Configure Tools" in the chat input to disable ${e.tools.length-BQ.HARD_TOOL_LIMIT} tools and retry.`}:{isValid:!0,reason:""}}a(mEa,"isValidChatPayload");function vpr(t){return`Prompt failed validation with the reason: ${t}. Please file an issue.`}a(vpr,"asUnexpected");function hai(t,e,r){return nfe.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(e),headerRequestId:r})}a(hai,"createTelemetryData");function Ipr(t){switch(t){case Sn.ChatLocation.Panel:return"conversation-panel";case Sn.ChatLocation.Editor:return"conversation-inline";case Sn.ChatLocation.EditingSession:return"conversation-edits";case Sn.ChatLocation.Notebook:return"conversation-notebook";case Sn.ChatLocation.Terminal:return"conversation-terminal";case Sn.ChatLocation.Other:return"conversation-other";case Sn.ChatLocation.Agent:return"conversation-agent";case Sn.ChatLocation.ResponsesProxy:return"responses-proxy";case Sn.ChatLocation.MessagesProxy:return"messages-proxy"}}a(Ipr,"locationToIntent")});var xpr=T(Nlt=>{"use strict";f();Object.defineProperty(Nlt,"__esModule",{value:!0});Nlt.ISimilarFilesContextService=void 0;var gEa=qr();Nlt.ISimilarFilesContextService=(0,gEa.createServiceIdentifier)("ISimilarFilesContextService")});var wpr=T(Dlt=>{"use strict";f();Object.defineProperty(Dlt,"__esModule",{value:!0});Dlt.IDiffService=void 0;var AEa=qr();Dlt.IDiffService=(0,AEa.createServiceIdentifier)("IDiffService")});var gai=T(Rpr=>{"use strict";f();Object.defineProperty(Rpr,"__esModule",{value:!0});Rpr.createProxyXtabEndpoint=_Ea;var yEa=(vde(),ba(_de)),EEa=Kde(),CEa=MJ();function _Ea(t,e){let r={id:e??"copilot-nes-xtab",urlOrRequestMetadata:{type:yEa.RequestType.ProxyChatCompletions},name:"xtab-proxy",vendor:"xtab",model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"unknown",capabilities:{type:"chat",family:"xtab-proxy",tokenizer:EEa.TokenizerType.O200K,limits:{max_prompt_tokens:12285,max_output_tokens:4096},supports:{streaming:!0,parallel_tool_calls:!1,tool_calls:!1,vision:!1,prediction:!0}}};return t.createInstance(CEa.ChatEndpoint,r)}a(_Ea,"createProxyXtabEndpoint")});var LJ=T(Mlt=>{"use strict";f();Object.defineProperty(Mlt,"__esModule",{value:!0});Mlt.DocumentId=void 0;var vEa=PQe(),Aai=Im(),bEa=Ru(),Ppr=class t{static{a(this,"DocumentId")}static{this._cache=new vEa.CachedFunction({getCacheKey:JSON.stringify},e=>new t(e.uri))}static create(e){return t._cache.get({uri:e})}constructor(e){this.uri=e,this._uri=bEa.URI.parse(this.uri)}get path(){return this._uri.path}get fragment(){return this._uri.fragment}toString(){return this.uri}get baseName(){return(0,Aai.basename)(this.uri)}get extension(){return(0,Aai.extname)(this.uri)}toUri(){return this._uri}};Mlt.DocumentId=Ppr});var Olt=T(LQ=>{"use strict";f();Object.defineProperty(LQ,"__esModule",{value:!0});LQ.NullUndesiredModelsManager=LQ.IUndesiredModelsManager=LQ.IInlineEditsModelService=void 0;var yai=qr(),TEa=nc();LQ.IInlineEditsModelService=(0,yai.createServiceIdentifier)("IInlineEditsModelService");LQ.IUndesiredModelsManager=(0,yai.createServiceIdentifier)("IUndesiredModelsManager");var kpr=class{static{a(this,"NullUndesiredModelsManager")}constructor(){this.onDidChange=TEa.Event.None}isUndesiredModelId(e){return!1}addUndesiredModelId(e){return Promise.resolve()}removeUndesiredModelId(e){return Promise.resolve()}};LQ.NullUndesiredModelsManager=kpr});var Eai=T(g3=>{"use strict";f();Object.defineProperty(g3,"__esModule",{value:!0});g3.IgnoreWhitespaceOnlyChanges=g3.IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges=void 0;g3.editWouldDeleteWhatWasJustInserted=SEa;g3.editIsDeletion=Mpr;g3.editWouldDeleteWhatWasJustInserted2=IEa;var Npr=class t{static{a(this,"IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges")}static filterEdit(e,r){return r.filter(o=>!t._isWhitespaceOnlyChange(o,e.documentAfterEditsLines))}static _isWhitespaceOnlyChange(e,r){let n=e.lineRange.toOffsetRange().slice(r),o=e.newLines,s=o.length===0;if(s&&n.every(c=>c.trim()==="")||!s&&o.every(c=>c.trim()===""))return!0;if(n.length!==o.length)return!1;for(let c=0;c!t._isFormattingOnlyChange(e.documentAfterEditsLines,n))}static _isFormattingOnlyChange(e,r){let n=r.lineRange.toOffsetRange().slice(e).join("").replace(/\s/g,""),o=r.newLines.join("").replace(/\s/g,"");return n===o}};g3.IgnoreWhitespaceOnlyChanges=Dpr;function SEa(t,e){let r=e.toEdit(t.documentAfterEdits);if(r=r.normalizeOnSource(t.documentAfterEdits.value),!Mpr(r))return!1;for(let n=t.recentEdits.edits.length-1;n>=0;n--){let o=t.recentEdits.edits[n],s=r.tryRebase(o);if(!s)return!0;r=s}return!1}a(SEa,"editWouldDeleteWhatWasJustInserted");function Mpr(t){let e=t.replacements.reduce((n,o)=>n+o.replaceRange.length,0);return t.replacements.reduce((n,o)=>n+o.newText.length,0)===0&&e>0}a(Mpr,"editIsDeletion");function IEa(t,e){let r=e.toEdit(t.documentAfterEdits);if(r=r.normalizeOnSource(t.documentAfterEdits.value),!Mpr(r))return!1;let n=t.documentAfterEdits.value;for(let o=t.recentEdits.edits.length-1;o>=0;o--){let c=t.recentEdits.edits[o].inverse(n);if(c.equals(r))return!0;n=c.apply(n)}return!1}a(IEa,"editWouldDeleteWhatWasJustInserted2")});var Bpr=T(ife=>{"use strict";f();Object.defineProperty(ife,"__esModule",{value:!0});ife.NulSimulationTestContext=ife.ISimulationTestContext=void 0;var xEa=qr();ife.ISimulationTestContext=(0,xEa.createServiceIdentifier)("ISimulationTestContext");var Opr=class{static{a(this,"NulSimulationTestContext")}constructor(){this.isInSimulationTests=!1}async writeFile(e,r,n){return""}};ife.NulSimulationTestContext=Opr});function FJ(t,e=!1){let r=t.length,n=0,o="",s=0,c=16,l=0,u=0,d=0,p=0,h=0;function m(b,I){let x=0,R=0;for(;x=48&&w<=57)R=R*16+w-48;else if(w>=65&&w<=70)R=R*16+w-65+10;else if(w>=97&&w<=102)R=R*16+w-97+10;else break;n++,x++}return x=r){b+=t.substring(I,n),h=2;break}let x=t.charCodeAt(n);if(x===34){b+=t.substring(I,n),n++;break}if(x===92){if(b+=t.substring(I,n),n++,n>=r){h=2;break}switch(t.charCodeAt(n++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` -`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:let w=m(4,!0);w>=0?b+=String.fromCharCode(w):h=4;break;default:h=5}I=n;continue}if(x>=0&&x<=31)if(p2e(x)){b+=t.substring(I,n),h=2;break}else h=6;n++}return b}a(y,"scanString");function E(){if(o="",h=0,s=n,u=l,p=d,n>=r)return s=r,c=17;let b=t.charCodeAt(n);if(Lpr(b)){do n++,o+=String.fromCharCode(b),b=t.charCodeAt(n);while(Lpr(b));return c=15}if(p2e(b))return n++,o+=String.fromCharCode(b),b===13&&t.charCodeAt(n)===10&&(n++,o+=` -`),l++,d=n,c=14;switch(b){case 123:return n++,c=1;case 125:return n++,c=2;case 91:return n++,c=3;case 93:return n++,c=4;case 58:return n++,c=6;case 44:return n++,c=5;case 34:return n++,o=y(),c=10;case 47:let I=n-1;if(t.charCodeAt(n+1)===47){for(n+=2;n=12&&b<=15);return b}return a(v,"scanNextNonTrivia"),{setPosition:g,getPosition:a(()=>n,"getPosition"),scan:e?v:E,getToken:a(()=>c,"getToken"),getTokenValue:a(()=>o,"getTokenValue"),getTokenOffset:a(()=>s,"getTokenOffset"),getTokenLength:a(()=>n-s,"getTokenLength"),getTokenStartLine:a(()=>u,"getTokenStartLine"),getTokenStartCharacter:a(()=>s-p,"getTokenStartCharacter"),getTokenError:a(()=>h,"getTokenError")}}function Lpr(t){return t===32||t===9}function p2e(t){return t===10||t===13}function ofe(t){return t>=48&&t<=57}var Cai,Blt=Pe(()=>{"use strict";f();a(FJ,"createScanner");a(Lpr,"isWhiteSpace");a(p2e,"isLineBreak");a(ofe,"isDigit");(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Cai||(Cai={}))});var gb,sfe,Fpr,_ai,vai=Pe(()=>{f();gb=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),sfe=200,Fpr={" ":{"\n":new Array(sfe).fill(0).map((t,e)=>` -`+" ".repeat(e)),"\r":new Array(sfe).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(sfe).fill(0).map((t,e)=>`\r -`+" ".repeat(e))}," ":{"\n":new Array(sfe).fill(0).map((t,e)=>` -`+" ".repeat(e)),"\r":new Array(sfe).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(sfe).fill(0).map((t,e)=>`\r -`+" ".repeat(e))}},_ai=[` +`+s};if(r.status===424)return{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.AgentFailedDependency,reason:s};if(r.status===429){let d=s;return d=c?.message??c?.code,s.includes("extension_blocked")&&c?.code==="extension_blocked"&&c?.type==="rate_limit_error"?{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ExtensionBlocked,reason:"Extension blocked",data:{...c?.message,retryAfter:r.headers.get("retry-after")}}:{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.RateLimited,reason:d,data:{retryAfter:r.headers.get("retry-after"),rateLimitKey:r.headers.get("x-ratelimit-exceeded"),capiError:c}}}if(r.status===466)return this._logService.info(s),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ClientNotSupported,reason:`client not supported: ${s}`};if(r.status===499)return this._logService.info("Cancelled by server"),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ServerCanceled,reason:"canceled by server"}}else if(500<=r.status&&r.status<600)return r.status===503?{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.RateLimited,reason:"Upstream provider rate limit hit",data:{retryAfter:null,rateLimitKey:null,capiError:{code:"upstream_provider_rate_limit",message:s}}}:{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.ServerError,reason:l};return this._logService.error(`Request Failed: ${r.status} ${s}`),(0,cci.sendCommunicationErrorTelemetry)(this._telemetryService,"Unhandled status from server: "+r.status,s),{type:Kr.FetchResponseKind.Failed,modelRequestId:o,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${r.status} ${s}`}}async processSuccessfulResponse(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E){let _=[];for await(let x of e.chatCompletions)gde.ChatMLFetcherTelemetrySender.sendSuccessTelemetry(this._telemetryService,{chatCompletion:x,baseTelemetry:d,userInitiatedRequest:h,chatEndpointInfo:p,requestBody:n,maxResponseTokens:s,promptTokenCount:c,timeToFirstToken:l,timeToFirstTokenEmitted:d&&u.firstTokenEmittedTime?u.firstTokenEmittedTime-d.issuedTime:-1,hasImageMessages:this.filterImageMessages(r),transport:m,fetcher:g,bytesReceived:A,suspendEventSeen:y,resumeEventSeen:E}),this.isRepetitive(x,d?.properties)||_.push(x);let v=new Set([tb.FinishedCompletionReason.Stop,tb.FinishedCompletionReason.ClientTrimmed,tb.FinishedCompletionReason.FunctionCall,tb.FinishedCompletionReason.ToolCalls]),b=_.filter(x=>v.has(x.finishReason));if(b.length>=1)return{type:Sn.ChatFetchResponseType.Success,resolvedModel:b[0].model,usage:b.length===1?b[0].usage:void 0,value:b.map(x=>(0,lRe.getTextPart)(x.message.content)),requestId:o,serverRequestId:b[0].requestId.headerRequestId};let I=_.at(0);switch(I?.finishReason){case tb.FinishedCompletionReason.ContentFilter:return{type:Sn.ChatFetchResponseType.FilteredRetry,category:I.filterReason??tb.FilterReason.Copyright,reason:"Response got filtered.",value:_.map(x=>(0,lRe.getTextPart)(x.message.content)),requestId:o,serverRequestId:I.requestId.headerRequestId};case tb.FinishedCompletionReason.Length:return{type:Sn.ChatFetchResponseType.Length,reason:"Response too long.",requestId:o,serverRequestId:I.requestId.headerRequestId,truncatedValue:(0,lRe.getTextPart)(I.message.content)};case tb.FinishedCompletionReason.ServerError:return{type:Sn.ChatFetchResponseType.Failed,reason:"Server error. Stream terminated",requestId:o,serverRequestId:I.requestId.headerRequestId,streamError:I.error}}return{type:Sn.ChatFetchResponseType.Unknown,reason:Sn.RESPONSE_CONTAINED_NO_CHOICES,requestId:o,serverRequestId:I?.requestId.headerRequestId}}filterImageMessages(e){return e?.some(r=>Array.isArray(r.content)?r.content.some(n=>"imageUrl"in n):!1)}isRepetitive(e,r){let n=(0,Lct.calculateLineRepetitionStats)((0,lRe.getTextPart)(e.message.content)),o=(0,Lct.isRepetitive)(e.tokens);if(o){let s=Ade.TelemetryData.createAndMarkAsIssued();s.extendWithRequestId(e.requestId);let c=s.extendedBy(r);this._telemetryService.sendEnhancedGHTelemetryEvent("conversation.repetition.detected",c.properties,c.measurements)}return n.numberOfRepetitions>=10&&this._telemetryService.sendMSFTTelemetryEvent("conversation.repetition.detected",{requestId:e.requestId.headerRequestId,finishReason:e.finishReason},{numberOfRepetitions:n.numberOfRepetitions,lengthOfLine:n.mostRepeatedLine.length,totalLines:n.totalLines}),o}checkRepetitionInDeltas(e,r,n){let o=e.filter(u=>u.text?.length>0).map(u=>u.text).join("");if(!o||o.trim().length===0)return;let s=o.split(/\s+/).filter(u=>u.length>0),c=(0,Lct.calculateLineRepetitionStats)(o);if((0,Lct.isRepetitive)(s)){let d=Ade.TelemetryData.createAndMarkAsIssued().extendedBy(n);this._telemetryService.sendEnhancedGHTelemetryEvent("conversation.repetition.detected",d.properties,d.measurements)}c.numberOfRepetitions>=10&&this._telemetryService.sendMSFTTelemetryEvent("conversation.repetition.detected",{requestId:r,finishReason:"canceled"},{numberOfRepetitions:c.numberOfRepetitions,lengthOfLine:c.mostRepeatedLine.length,totalLines:c.totalLines})}processCanceledResponse(e,r,n,o){return n&&n.deltas.length>0&&this.checkRepetitionInDeltas(n.deltas,r,o),{type:Sn.ChatFetchResponseType.Canceled,reason:e.reason,requestId:r,serverRequestId:void 0}}processFailedResponse(e,r,n){let o=e.modelRequestId?.gitHubRequestId,s=e.reason;if(e.failKind===Kr.ChatFailKind.RateLimited)return{type:Sn.ChatFetchResponseType.RateLimited,reason:s,requestId:r,serverRequestId:o,retryAfter:e.data?.retryAfter,rateLimitKey:e.data?.rateLimitKey||"",isAuto:n,capiError:e.data?.capiError};if(e.failKind===Kr.ChatFailKind.QuotaExceeded)return{type:Sn.ChatFetchResponseType.QuotaExceeded,reason:s,requestId:r,serverRequestId:o,retryAfter:e.data?.retryAfter,capiError:e.data?.capiError};if(e.failKind===Kr.ChatFailKind.OffTopic)return{type:Sn.ChatFetchResponseType.OffTopic,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.TokenExpiredOrInvalid||e.failKind===Kr.ChatFailKind.ClientNotSupported||s.includes("Bad request: "))return{type:Sn.ChatFetchResponseType.BadRequest,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ServerError)return{type:Sn.ChatFetchResponseType.Failed,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ContentFilter)return{type:Sn.ChatFetchResponseType.PromptFiltered,reason:s,category:tb.FilterReason.Prompt,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.AgentUnauthorized)return{type:Sn.ChatFetchResponseType.AgentUnauthorized,reason:s,authorizationUrl:e.data.authorize_url,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.AgentFailedDependency)return{type:Sn.ChatFetchResponseType.AgentFailedDependency,reason:s,requestId:r,serverRequestId:o};if(e.failKind===Kr.ChatFailKind.ExtensionBlocked){let c=typeof e.data?.retryAfter=="number"?e.data.retryAfter:300;return{type:Sn.ChatFetchResponseType.ExtensionBlocked,reason:s,requestId:r,retryAfter:c,learnMoreLink:e.data?.learnMoreLink??"",serverRequestId:o}}return e.failKind===Kr.ChatFailKind.NotFound?{type:Sn.ChatFetchResponseType.NotFound,reason:s,requestId:r,serverRequestId:o}:e.failKind===Kr.ChatFailKind.InvalidPreviousResponseId?{type:Sn.ChatFetchResponseType.InvalidStatefulMarker,reason:s,requestId:r,serverRequestId:o}:{type:Sn.ChatFetchResponseType.Failed,reason:s,requestId:r,serverRequestId:o}}processError(e,r,n,o,s){let c=e?.capiWebSocketError;if(c)return this._handleWebSocketError(c,r,n,s);let l=this._fetcherService;if(l.isAbortError(e))return{type:Sn.ChatFetchResponseType.Canceled,reason:"network request aborted",requestId:r,serverRequestId:n};if((0,uci.isCancellationError)(e))return{type:Sn.ChatFetchResponseType.Canceled,reason:"Got a cancellation error",requestId:r,serverRequestId:n};if(e&&(e instanceof Error&&e.message==="Premature close"||typeof e=="object"&&e.code==="ERR_STREAM_PREMATURE_CLOSE"))return{type:Sn.ChatFetchResponseType.Canceled,reason:"Stream closed prematurely",requestId:r,serverRequestId:n};this._logService.error(lCa.ErrorUtils.fromUnknown(e),"Error on conversation request"),this._telemetryService.sendGHTelemetryException(e,"Error on conversation request");let u=l.getUserMessageForFetcherError(e),d=(0,jpr.collectSingleLineErrorMessage)(e,!0),p=this.scrubErrorDetail(d,o);if(l.isInternetDisconnectedError(e))return{type:Sn.ChatFetchResponseType.NetworkError,reason:"It appears you're not connected to the internet, please check your network connection and try again.",reasonDetail:p,requestId:r,serverRequestId:n};if(l.isFetcherError(e)){let h=l.isNetworkProcessCrashedError(e);return{type:Sn.ChatFetchResponseType.NetworkError,reason:u,reasonDetail:p,requestId:r,serverRequestId:n,...h?{isNetworkProcessCrash:!0}:{}}}else return{type:Sn.ChatFetchResponseType.Failed,reason:"Error on conversation request. Check the log for more details.",reasonDetail:p,requestId:r,serverRequestId:n}}async _handleWebSocketCAPIError(e,r){let{code:n,message:o}=e.error,s={code:n,message:o},c=n.split(":")[0];return this._logService.error(`WebSocket CAPI error: ${o} (${n})`),c==="rate_limited"||c==="user_model_rate_limited"||c==="user_global_rate_limited"||c==="integration_rate_limited"||c==="model_overloaded"||c==="agent_mode_limit_exceeded"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.RateLimited,reason:o,data:{capiError:s}}:c==="quota_exceeded"||c==="free_quota_exceeded"||c==="overage_limit_reached"||c==="billing_not_configured"?(this._authenticationService.copilotToken?.isChatQuotaExceeded||(this._authenticationService.resetCopilotToken(402),await this._authenticationService.getCopilotToken()),{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.QuotaExceeded,reason:o,data:{capiError:s}}):n==="content_filter"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ContentFilter,reason:o}:n==="not_found"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.NotFound,reason:o}:n==="request_too_large"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${n} ${o}`}:n==="service_unavailable"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ServerError,reason:`Request Failed: ${n} ${o}`}:n==="bad_request"?{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.Unknown,reason:`Request Failed: ${n} ${o}`}:{type:Kr.FetchResponseKind.Failed,modelRequestId:r,failKind:Kr.ChatFailKind.ServerError,reason:`Request Failed: ${n} ${o||"WebSocket server error"}`}}_handleWebSocketError(e,r,n,o){let{code:s,message:c}=e.error,l={code:s,message:c},u=s.split(":")[0];return u==="rate_limited"||u==="user_model_rate_limited"||u==="user_global_rate_limited"||u==="integration_rate_limited"||u==="model_overloaded"||u==="agent_mode_limit_exceeded"?{type:Sn.ChatFetchResponseType.RateLimited,reason:c,requestId:r,serverRequestId:n,retryAfter:void 0,rateLimitKey:"",isAuto:o,capiError:l}:u==="quota_exceeded"||u==="free_quota_exceeded"||u==="overage_limit_reached"||u==="billing_not_configured"?{type:Sn.ChatFetchResponseType.QuotaExceeded,reason:c,requestId:r,serverRequestId:n,capiError:l,retryAfter:void 0}:s==="content_filter"?{type:Sn.ChatFetchResponseType.PromptFiltered,reason:c,category:tb.FilterReason.Prompt,requestId:r,serverRequestId:n}:s==="not_found"?{type:Sn.ChatFetchResponseType.NotFound,reason:c,requestId:r,serverRequestId:n}:s==="bad_request"?{type:Sn.ChatFetchResponseType.BadRequest,reason:c,requestId:r,serverRequestId:n}:{type:Sn.ChatFetchResponseType.Failed,reason:`Request Failed: ${s} ${c||"WebSocket server error"}`,requestId:r,serverRequestId:n}}scrubErrorDetail(e,r){if(r){let n=new RegExp((0,fCa.escapeRegExpCharacters)(r),"ig");e=e.replaceAll(n,"")}return e.replaceAll(/(?<=logged in as )(?!)[^\s]+/ig,"!!")}};rb.ChatMLFetcherImpl=$pr;rb.ChatMLFetcherImpl=$pr=Hpr=K_a([Jy(0,oCa.IFetcherService),Jy(1,cCa.ITelemetryService),Jy(2,Fct.IRequestLogger),Jy(3,jpr.ILogService),Jy(4,X_a.IAuthenticationService),Jy(5,rCa.IInteractionService),Jy(6,eCa.IChatQuotaService),Jy(7,nCa.ICAPIClientService),Jy(8,tCa.IConversationOptions),Jy(9,lQ.IConfigurationService),Jy(10,aCa.IExperimentationService),Jy(11,mCa.IPowerService),Jy(12,pCa.IInstantiationService),Jy(13,fci.IChatWebSocketManager),Jy(14,sCa.IOTelService)],$pr);function gCa(t,e,r,n,o){if(t.length===0)return{isValid:!1,reason:Gpr("No messages provided")};if(e?.max_tokens&&e?.max_tokens<1)return{isValid:!1,reason:Gpr("Invalid response token parameter")};let s=/^[a-zA-Z0-9_-]+$/;return e?.functions?.some(c=>!c.name.match(s))||e?.function_call?.name&&!e.function_call.name.match(s)?{isValid:!1,reason:Gpr("Function names must match ^[a-zA-Z0-9_-]+$")}:e?.tools&&e.tools.length>lQ.HARD_TOOL_LIMIT&&!(0,iCa.isAnthropicToolSearchEnabled)(r,n)?{isValid:!1,reason:`Tool limit exceeded (${e.tools.length}/${lQ.HARD_TOOL_LIMIT}). Click "Configure Tools" in the chat input to disable ${e.tools.length-lQ.HARD_TOOL_LIMIT} tools and retry.`}:{isValid:!0,reason:""}}a(gCa,"isValidChatPayload");function Gpr(t){return`Prompt failed validation with the reason: ${t}. Please file an issue.`}a(Gpr,"asUnexpected");function pci(t,e,r){return Ade.TelemetryData.createAndMarkAsIssued({endpoint:"completions",engineName:"chat",uiKind:Sn.ChatLocation.toString(e),headerRequestId:r})}a(pci,"createTelemetryData");function Vpr(t){switch(t){case Sn.ChatLocation.Panel:return"conversation-panel";case Sn.ChatLocation.Editor:return"conversation-inline";case Sn.ChatLocation.EditingSession:return"conversation-edits";case Sn.ChatLocation.Notebook:return"conversation-notebook";case Sn.ChatLocation.Terminal:return"conversation-terminal";case Sn.ChatLocation.Other:return"conversation-other";case Sn.ChatLocation.Agent:return"conversation-agent";case Sn.ChatLocation.ResponsesProxy:return"responses-proxy";case Sn.ChatLocation.MessagesProxy:return"messages-proxy"}}a(Vpr,"locationToIntent")});var Wpr=T(Qct=>{"use strict";f();Object.defineProperty(Qct,"__esModule",{value:!0});Qct.ISimilarFilesContextService=void 0;var ACa=qr();Qct.ISimilarFilesContextService=(0,ACa.createServiceIdentifier)("ISimilarFilesContextService")});var zpr=T(qct=>{"use strict";f();Object.defineProperty(qct,"__esModule",{value:!0});qct.IDiffService=void 0;var yCa=qr();qct.IDiffService=(0,yCa.createServiceIdentifier)("IDiffService")});var mci=T(Ypr=>{"use strict";f();Object.defineProperty(Ypr,"__esModule",{value:!0});Ypr.createProxyXtabEndpoint=vCa;var ECa=(Bue(),Aa(Oue)),_Ca=ude(),CCa=qK();function vCa(t,e){let r={id:e??"copilot-nes-xtab",urlOrRequestMetadata:{type:ECa.RequestType.ProxyChatCompletions},name:"xtab-proxy",vendor:"xtab",model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"unknown",capabilities:{type:"chat",family:"xtab-proxy",tokenizer:_Ca.TokenizerType.O200K,limits:{max_prompt_tokens:12285,max_output_tokens:4096},supports:{streaming:!0,parallel_tool_calls:!1,tool_calls:!1,vision:!1,prediction:!0}}};return t.createInstance(CCa.ChatEndpoint,r)}a(vCa,"createProxyXtabEndpoint")});var jK=T(Gct=>{"use strict";f();Object.defineProperty(Gct,"__esModule",{value:!0});Gct.DocumentId=void 0;var bCa=FUe(),gci=gm(),TCa=Eu(),Kpr=class t{static{a(this,"DocumentId")}static{this._cache=new bCa.CachedFunction({getCacheKey:JSON.stringify},e=>new t(e.uri))}static create(e){return t._cache.get({uri:e})}constructor(e){this.uri=e,this._uri=TCa.URI.parse(this.uri)}get path(){return this._uri.path}get fragment(){return this._uri.fragment}toString(){return this.uri}get baseName(){return(0,gci.basename)(this.uri)}get extension(){return(0,gci.extname)(this.uri)}toUri(){return this._uri}};Gct.DocumentId=Kpr});var Hct=T(uQ=>{"use strict";f();Object.defineProperty(uQ,"__esModule",{value:!0});uQ.NullUndesiredModelsManager=uQ.IUndesiredModelsManager=uQ.IInlineEditsModelService=void 0;var Aci=qr(),SCa=Xa();uQ.IInlineEditsModelService=(0,Aci.createServiceIdentifier)("IInlineEditsModelService");uQ.IUndesiredModelsManager=(0,Aci.createServiceIdentifier)("IUndesiredModelsManager");var Jpr=class{static{a(this,"NullUndesiredModelsManager")}constructor(){this.onDidChange=SCa.Event.None}isUndesiredModelId(e){return!1}addUndesiredModelId(e){return Promise.resolve()}removeUndesiredModelId(e){return Promise.resolve()}};uQ.NullUndesiredModelsManager=Jpr});var yci=T(XB=>{"use strict";f();Object.defineProperty(XB,"__esModule",{value:!0});XB.IgnoreWhitespaceOnlyChanges=XB.IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges=void 0;XB.editWouldDeleteWhatWasJustInserted=ICa;XB.editIsDeletion=ehr;XB.editWouldDeleteWhatWasJustInserted2=xCa;var Xpr=class t{static{a(this,"IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges")}static filterEdit(e,r){return r.filter(o=>!t._isWhitespaceOnlyChange(o,e.documentAfterEditsLines))}static _isWhitespaceOnlyChange(e,r){let n=e.lineRange.toOffsetRange().slice(r),o=e.newLines,s=o.length===0;if(s&&n.every(c=>c.trim()==="")||!s&&o.every(c=>c.trim()===""))return!0;if(n.length!==o.length)return!1;for(let c=0;c!t._isFormattingOnlyChange(e.documentAfterEditsLines,n))}static _isFormattingOnlyChange(e,r){let n=r.lineRange.toOffsetRange().slice(e).join("").replace(/\s/g,""),o=r.newLines.join("").replace(/\s/g,"");return n===o}};XB.IgnoreWhitespaceOnlyChanges=Zpr;function ICa(t,e){let r=e.toEdit(t.documentAfterEdits);if(r=r.normalizeOnSource(t.documentAfterEdits.value),!ehr(r))return!1;for(let n=t.recentEdits.edits.length-1;n>=0;n--){let o=t.recentEdits.edits[n],s=r.tryRebase(o);if(!s)return!0;r=s}return!1}a(ICa,"editWouldDeleteWhatWasJustInserted");function ehr(t){let e=t.replacements.reduce((n,o)=>n+o.replaceRange.length,0);return t.replacements.reduce((n,o)=>n+o.newText.length,0)===0&&e>0}a(ehr,"editIsDeletion");function xCa(t,e){let r=e.toEdit(t.documentAfterEdits);if(r=r.normalizeOnSource(t.documentAfterEdits.value),!ehr(r))return!1;let n=t.documentAfterEdits.value;for(let o=t.recentEdits.edits.length-1;o>=0;o--){let c=t.recentEdits.edits[o].inverse(n);if(c.equals(r))return!0;n=c.apply(n)}return!1}a(xCa,"editWouldDeleteWhatWasJustInserted2")});var rhr=T(yde=>{"use strict";f();Object.defineProperty(yde,"__esModule",{value:!0});yde.NulSimulationTestContext=yde.ISimulationTestContext=void 0;var wCa=qr();yde.ISimulationTestContext=(0,wCa.createServiceIdentifier)("ISimulationTestContext");var thr=class{static{a(this,"NulSimulationTestContext")}constructor(){this.isInSimulationTests=!1}async writeFile(e,r,n){return""}};yde.NulSimulationTestContext=thr});function $K(t,e=!1){let r=t.length,n=0,o="",s=0,c=16,l=0,u=0,d=0,p=0,h=0;function m(b,I){let x=0,w=0;for(;x=48&&R<=57)w=w*16+R-48;else if(R>=65&&R<=70)w=w*16+R-65+10;else if(R>=97&&R<=102)w=w*16+R-97+10;else break;n++,x++}return x=r){b+=t.substring(I,n),h=2;break}let x=t.charCodeAt(n);if(x===34){b+=t.substring(I,n),n++;break}if(x===92){if(b+=t.substring(I,n),n++,n>=r){h=2;break}switch(t.charCodeAt(n++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` +`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:let R=m(4,!0);R>=0?b+=String.fromCharCode(R):h=4;break;default:h=5}I=n;continue}if(x>=0&&x<=31)if(uRe(x)){b+=t.substring(I,n),h=2;break}else h=6;n++}return b}a(y,"scanString");function E(){if(o="",h=0,s=n,u=l,p=d,n>=r)return s=r,c=17;let b=t.charCodeAt(n);if(nhr(b)){do n++,o+=String.fromCharCode(b),b=t.charCodeAt(n);while(nhr(b));return c=15}if(uRe(b))return n++,o+=String.fromCharCode(b),b===13&&t.charCodeAt(n)===10&&(n++,o+=` +`),l++,d=n,c=14;switch(b){case 123:return n++,c=1;case 125:return n++,c=2;case 91:return n++,c=3;case 93:return n++,c=4;case 58:return n++,c=6;case 44:return n++,c=5;case 34:return n++,o=y(),c=10;case 47:let I=n-1;if(t.charCodeAt(n+1)===47){for(n+=2;n=12&&b<=15);return b}return a(v,"scanNextNonTrivia"),{setPosition:g,getPosition:a(()=>n,"getPosition"),scan:e?v:E,getToken:a(()=>c,"getToken"),getTokenValue:a(()=>o,"getTokenValue"),getTokenOffset:a(()=>s,"getTokenOffset"),getTokenLength:a(()=>n-s,"getTokenLength"),getTokenStartLine:a(()=>u,"getTokenStartLine"),getTokenStartCharacter:a(()=>s-p,"getTokenStartCharacter"),getTokenError:a(()=>h,"getTokenError")}}function nhr(t){return t===32||t===9}function uRe(t){return t===10||t===13}function Ede(t){return t>=48&&t<=57}var Eci,jct=Pe(()=>{"use strict";f();a($K,"createScanner");a(nhr,"isWhiteSpace");a(uRe,"isLineBreak");a(Ede,"isDigit");(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Eci||(Eci={}))});var nb,_de,ihr,_ci,Cci=Pe(()=>{f();nb=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),_de=200,ihr={" ":{"\n":new Array(_de).fill(0).map((t,e)=>` +`+" ".repeat(e)),"\r":new Array(_de).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(_de).fill(0).map((t,e)=>`\r +`+" ".repeat(e))}," ":{"\n":new Array(_de).fill(0).map((t,e)=>` +`+" ".repeat(e)),"\r":new Array(_de).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(_de).fill(0).map((t,e)=>`\r +`+" ".repeat(e))}},_ci=[` `,"\r",`\r -`]});function Llt(t,e,r){let n,o,s,c,l;if(e){for(c=e.offset,l=c+e.length,s=c;s>0&&!h2e(t,s-1);)s--;let x=l;for(;x1)return afe(u,p)+afe(m,n+h);let x=m.length*(n+h);return!d||x>Fpr[g][u].length?u+afe(m,n+h):x<=0?u:Fpr[g][u][x]}a(E,"newLinesAndIndent");function _(){let x=A.scan();for(p=0;x===15||x===14;)x===14&&r.keepLines?p+=1:x===14&&(p=1),x=A.scan();return y=x===16||A.getTokenError()!==0,x}a(_,"scanNext");let v=[];function b(x,R,w){!y&&(!e||Rc)&&t.substring(R,w)!==x&&v.push({offset:R,length:w-R,content:x})}a(b,"addEdit");let I=_();if(r.keepLines&&p>0&&b(afe(u,p),0,0),I!==17){let x=A.getTokenOffset()+s,R=m.length*n<20&&r.insertSpaces?gb[m.length*n]:afe(m,n);b(R,s,x)}for(;I!==17;){let x=A.getTokenOffset()+A.getTokenLength()+s,R=_(),w="",P=!1;for(;p===0&&(R===12||R===13);){let Q=A.getTokenOffset()+s;b(gb[1],x,Q),x=A.getTokenOffset()+A.getTokenLength()+s,P=R===12,w=P?E():"",R=_()}if(R===2)I!==1&&h--,r.keepLines&&p>0||!r.keepLines&&I!==1?w=E():r.keepLines&&(w=gb[1]);else if(R===4)I!==3&&h--,r.keepLines&&p>0||!r.keepLines&&I!==3?w=E():r.keepLines&&(w=gb[1]);else{switch(I){case 3:case 1:h++,r.keepLines&&p>0||!r.keepLines?w=E():w=gb[1];break;case 5:r.keepLines&&p>0||!r.keepLines?w=E():w=gb[1];break;case 12:w=E();break;case 13:p>0?w=E():P||(w=gb[1]);break;case 6:r.keepLines&&p>0?w=E():P||(w=gb[1]);break;case 10:r.keepLines&&p>0?w=E():R===6&&!P&&(w="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&p>0?w=E():(R===12||R===13)&&!P?w=gb[1]:R!==5&&R!==17&&(y=!0);break;case 16:y=!0;break}p>0&&(R===12||R===13)&&(w=E())}R===17&&(r.keepLines&&p>0?w=E():w=r.insertFinalNewline?u:"");let k=A.getTokenOffset()+s;b(w,x,k),I=R}return v}function afe(t,e){let r="";for(let n=0;n0&&!dRe(t,s-1);)s--;let x=l;for(;x1)return Cde(u,p)+Cde(m,n+h);let x=m.length*(n+h);return!d||x>ihr[g][u].length?u+Cde(m,n+h):x<=0?u:ihr[g][u][x]}a(E,"newLinesAndIndent");function _(){let x=A.scan();for(p=0;x===15||x===14;)x===14&&r.keepLines?p+=1:x===14&&(p=1),x=A.scan();return y=x===16||A.getTokenError()!==0,x}a(_,"scanNext");let v=[];function b(x,w,R){!y&&(!e||wc)&&t.substring(w,R)!==x&&v.push({offset:w,length:R-w,content:x})}a(b,"addEdit");let I=_();if(r.keepLines&&p>0&&b(Cde(u,p),0,0),I!==17){let x=A.getTokenOffset()+s,w=m.length*n<20&&r.insertSpaces?nb[m.length*n]:Cde(m,n);b(w,s,x)}for(;I!==17;){let x=A.getTokenOffset()+A.getTokenLength()+s,w=_(),R="",P=!1;for(;p===0&&(w===12||w===13);){let Q=A.getTokenOffset()+s;b(nb[1],x,Q),x=A.getTokenOffset()+A.getTokenLength()+s,P=w===12,R=P?E():"",w=_()}if(w===2)I!==1&&h--,r.keepLines&&p>0||!r.keepLines&&I!==1?R=E():r.keepLines&&(R=nb[1]);else if(w===4)I!==3&&h--,r.keepLines&&p>0||!r.keepLines&&I!==3?R=E():r.keepLines&&(R=nb[1]);else{switch(I){case 3:case 1:h++,r.keepLines&&p>0||!r.keepLines?R=E():R=nb[1];break;case 5:r.keepLines&&p>0||!r.keepLines?R=E():R=nb[1];break;case 12:R=E();break;case 13:p>0?R=E():P||(R=nb[1]);break;case 6:r.keepLines&&p>0?R=E():P||(R=nb[1]);break;case 10:r.keepLines&&p>0?R=E():w===6&&!P&&(R="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&p>0?R=E():(w===12||w===13)&&!P?R=nb[1]:w!==5&&w!==17&&(y=!0);break;case 16:y=!0;break}p>0&&(w===12||w===13)&&(R=E())}w===17&&(r.keepLines&&p>0?R=E():R=r.insertFinalNewline?u:"");let k=A.getTokenOffset()+s;b(R,x,k),I=w}return v}function Cde(t,e){let r="";for(let n=0;n{"use strict";f();Blt();vai();a(Llt,"format");a(afe,"repeat");a(REa,"computeIndentLevel");a(PEa,"getEOL");a(h2e,"isEOL")});function bai(t,e){let r=[],n=new Object,o,s={value:{},offset:0,length:0,type:"object",parent:void 0},c=!1;function l(u,d,p,h){s.value=u,s.offset=d,s.length=p,s.type=h,s.colonOffset=void 0,o=s}a(l,"setPreviousNode");try{A2e(t,{onObjectBegin:a((u,d)=>{if(e<=u)throw n;o=void 0,c=e>u,r.push("")},"onObjectBegin"),onObjectProperty:a((u,d,p)=>{if(e{if(e<=u)throw n;o=void 0,r.pop()},"onObjectEnd"),onArrayBegin:a((u,d)=>{if(e<=u)throw n;o=void 0,r.push(0)},"onArrayBegin"),onArrayEnd:a((u,d)=>{if(e<=u)throw n;o=void 0,r.pop()},"onArrayEnd"),onLiteralValue:a((u,d,p)=>{if(e{if(e<=d)throw n;if(u===":"&&o&&o.type==="property")o.colonOffset=d,c=!1,o=void 0;else if(u===","){let h=r[r.length-1];typeof h=="number"?r[r.length-1]=h+1:(c=!0,r[r.length-1]=""),o=void 0}},"onSeparator")})}catch(u){if(u!==n)throw u}return{path:r,previousNode:o,isAtPropertyKey:c,matches:a(u=>{let d=0;for(let p=0;d{let u={};c(u),s.push(o),o=u,n=null},"onObjectBegin"),onObjectProperty:a(u=>{n=u},"onObjectProperty"),onObjectEnd:a(()=>{o=s.pop()},"onObjectEnd"),onArrayBegin:a(()=>{let u=[];c(u),s.push(o),o=u,n=null},"onArrayBegin"),onArrayEnd:a(()=>{o=s.pop()},"onArrayEnd"),onLiteralValue:c,onError:a((u,d,p)=>{e.push({error:u,offset:d,length:p})},"onError")},r),o[0]}function Ult(t,e=[],r=m2e.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(u){n.type==="property"&&(n.length=u-n.offset,n=n.parent)}a(o,"ensurePropertyComplete");function s(u){return n.children.push(u),u}a(s,"onValue"),A2e(t,{onObjectBegin:a(u=>{n=s({type:"object",offset:u,length:-1,parent:n,children:[]})},"onObjectBegin"),onObjectProperty:a((u,d,p)=>{n=s({type:"property",offset:d,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:u,offset:d,length:p,parent:n})},"onObjectProperty"),onObjectEnd:a((u,d)=>{o(u+d),n.length=u+d-n.offset,n=n.parent,o(u+d)},"onObjectEnd"),onArrayBegin:a((u,d)=>{n=s({type:"array",offset:u,length:-1,parent:n,children:[]})},"onArrayBegin"),onArrayEnd:a((u,d)=>{n.length=u+d-n.offset,n=n.parent,o(u+d)},"onArrayEnd"),onLiteralValue:a((u,d,p)=>{s({type:Iai(u),offset:d,length:p,parent:n,value:u}),o(d+p)},"onLiteralValue"),onSeparator:a((u,d,p)=>{n.type==="property"&&(u===":"?n.colonOffset=d:u===","&&o(d))},"onSeparator"),onError:a((u,d,p)=>{e.push({error:u,offset:d,length:p})},"onError")},r);let l=n.children[0];return l&&delete l.parent,l}function g2e(t,e){if(!t)return;let r=t;for(let n of e)if(typeof n=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let o=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){r=s.children[1],o=!0;break}if(!o)return}else{let o=n;if(r.type!=="array"||o<0||!Array.isArray(r.children)||o>=r.children.length)return;r=r.children[o]}return r}function Qpr(t){if(!t.parent||!t.parent.children)return[];let e=Qpr(t.parent);if(t.parent.type==="property"){let r=t.parent.children[0].value;e.push(r)}else if(t.parent.type==="array"){let r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function Flt(t){switch(t.type){case"array":return t.children.map(Flt);case"object":let e=Object.create(null);for(let r of t.children){let n=r.children[1];n&&(e[r.children[0].value]=Flt(n))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function NEa(t,e,r=!1){return e>=t.offset&&es===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}a(c,"toNoArgVisit");function l(O){return O?N=>s===0&&O(N,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}a(l,"toOneArgVisit");function u(O){return O?N=>s===0&&O(N,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}a(u,"toOneArgVisitWithPath");function d(O){return O?()=>{s>0?s++:O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice())===!1&&(s=1)}:()=>!0}a(d,"toBeginVisit");function p(O){return O?()=>{s>0&&s--,s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}a(p,"toEndVisit");let h=d(e.onObjectBegin),m=u(e.onObjectProperty),g=p(e.onObjectEnd),A=d(e.onArrayBegin),y=p(e.onArrayEnd),E=u(e.onLiteralValue),_=l(e.onSeparator),v=c(e.onComment),b=l(e.onError),I=r&&r.disallowComments,x=r&&r.allowTrailingComma;function R(){for(;;){let O=n.scan();switch(n.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:I||w(11);break;case 2:w(12);break;case 6:w(16);break}switch(O){case 12:case 13:I?w(10):v();break;case 16:w(1);break;case 15:case 14:break;default:return O}}}a(R,"scanNext");function w(O,N=[],F=[]){if(b(O),N.length+F.length>0){let U=n.getToken();for(;U!==17;){if(N.indexOf(U)!==-1){R();break}else if(F.indexOf(U)!==-1)break;U=R()}}}a(w,"handleError");function P(O){let N=n.getTokenValue();return O?E(N):(m(N),o.push(N)),R(),!0}a(P,"parseString");function k(){switch(n.getToken()){case 11:let O=n.getTokenValue(),N=Number(O);isNaN(N)&&(w(2),N=0),E(N);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return R(),!0}a(k,"parseLiteral");function Q(){return n.getToken()!==10?(w(3,[],[2,5]),!1):(P(!1),n.getToken()===6?(_(":"),R(),G()||w(4,[],[2,5])):w(5,[],[2,5]),o.pop(),!0)}a(Q,"parseProperty");function M(){h(),R();let O=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(O||w(4,[],[]),_(","),R(),n.getToken()===2&&x)break}else O&&w(6,[],[]);Q()||w(4,[],[2,5]),O=!0}return g(),n.getToken()!==2?w(7,[2],[]):R(),!0}a(M,"parseObject");function D(){A(),R();let O=!0,N=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(N||w(4,[],[]),_(","),R(),n.getToken()===4&&x)break}else N&&w(6,[],[]);O?(o.push(0),O=!1):o[o.length-1]++,G()||w(4,[],[4,5]),N=!0}return y(),O||o.pop(),n.getToken()!==4?w(8,[4],[]):R(),!0}a(D,"parseArray");function G(){switch(n.getToken()){case 3:return D();case 1:return M();case 10:return P(!0);default:return k()}}return a(G,"parseValue"),R(),n.getToken()===17?r.allowEmptyContent?!0:(w(4,[],[]),!1):G()?(n.getToken()!==17&&w(9,[],[]),!0):(w(4,[],[]),!1)}function Sai(t,e){let r=FJ(t),n=[],o,s=0,c;do switch(c=r.getPosition(),o=r.scan(),o){case 12:case 13:case 17:s!==c&&n.push(t.substring(s,c)),e!==void 0&&n.push(r.getTokenValue().replace(/[^\r\n]/g,e)),s=r.getPosition();break}while(o!==17);return n.join("")}function Iai(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}var m2e,Gpr=Pe(()=>{"use strict";f();Blt();(function(t){t.DEFAULT={allowTrailingComma:!1}})(m2e||(m2e={}));a(bai,"getLocation");a(Tai,"parse");a(Ult,"parseTree");a(g2e,"findNodeAtLocation");a(Qpr,"getNodePath");a(Flt,"getNodeValue");a(NEa,"contains");a(qpr,"findNodeAtOffset");a(A2e,"visit");a(Sai,"stripComments");a(Iai,"getNodeType")});function xai(t,e,r,n){let o=e.slice(),c=Ult(t,[]),l,u;for(;o.length>0&&(u=o.pop(),l=g2e(c,o),l===void 0&&r!==void 0);)typeof u=="string"?r={[u]:r}:r=[r];if(l)if(l.type==="object"&&typeof u=="string"&&Array.isArray(l.children)){let d=g2e(l,[u]);if(d!==void 0)if(r===void 0){if(!d.parent)throw new Error("Malformed AST");let p=l.children.indexOf(d.parent),h,m=d.parent.offset+d.parent.length;if(p>0){let g=l.children[p-1];h=g.offset+g.length}else h=l.offset+1,l.children.length>1&&(m=l.children[1].offset);return UJ(t,{offset:h,length:m-h,content:""},n)}else return UJ(t,{offset:d.offset,length:d.length,content:JSON.stringify(r)},n);else{if(r===void 0)return[];let p=`${JSON.stringify(u)}: ${JSON.stringify(r)}`,h=n.getInsertionIndex?n.getInsertionIndex(l.children.map(g=>g.children[0].value)):l.children.length,m;if(h>0){let g=l.children[h-1];m={offset:g.offset+g.length,length:0,content:","+p}}else l.children.length===0?m={offset:l.offset+1,length:0,content:p}:m={offset:l.offset+1,length:0,content:p+","};return UJ(t,m,n)}}else if(l.type==="array"&&typeof u=="number"&&Array.isArray(l.children)){let d=u;if(d===-1){let p=`${JSON.stringify(r)}`,h;if(l.children.length===0)h={offset:l.offset+1,length:0,content:p};else{let m=l.children[l.children.length-1];h={offset:m.offset+m.length,length:0,content:","+p}}return UJ(t,h,n)}else if(r===void 0&&l.children.length>=0){let p=u,h=l.children[p],m;if(l.children.length===1)m={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===p){let g=l.children[p-1],A=g.offset+g.length,y=l.offset+l.length;m={offset:A,length:y-2-A,content:""}}else m={offset:h.offset,length:l.children[p+1].offset-h.offset,content:""};return UJ(t,m,n)}else if(r!==void 0){let p,h=`${JSON.stringify(r)}`;if(!n.isArrayInsertion&&l.children.length>u){let m=l.children[u];p={offset:m.offset,length:m.length,content:h}}else if(l.children.length===0||u===0)p={offset:l.offset+1,length:0,content:l.children.length===0?h:h+","};else{let m=u>l.children.length?l.children.length:u,g=l.children[m-1];p={offset:g.offset+g.length,length:0,content:","+h}}return UJ(t,p,n)}else throw new Error(`Can not ${r===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${d} as length is not sufficient`)}else throw new Error(`Can not add ${typeof u!="number"?"index":"property"} to parent of type ${l.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return UJ(t,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(r)},n)}}function UJ(t,e,r){if(!r.formattingOptions)return[e];let n=Qlt(t,e),o=e.offset,s=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;o>0&&!h2e(n,o-1);)o--;for(;s=0;u--){let d=c[u];n=Qlt(n,d),o=Math.min(o,d.offset),s=Math.max(s,d.offset+d.length),s+=d.content.length-d.length}let l=t.length-(n.length-s)-o;return[{offset:o,length:l,content:n.substring(o,s)}]}function Qlt(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var wai=Pe(()=>{"use strict";f();Upr();Gpr();a(xai,"setProperty");a(UJ,"withFormatting");a(Qlt,"applyEdit")});var Rai={};Ri(Rai,{ParseErrorCode:()=>$pr,ScanError:()=>Hpr,SyntaxKind:()=>jpr,applyEdits:()=>zEa,createScanner:()=>OEa,findNodeAtLocation:()=>UEa,findNodeAtOffset:()=>QEa,format:()=>VEa,getLocation:()=>BEa,getNodePath:()=>qEa,getNodeValue:()=>GEa,modify:()=>WEa,parse:()=>LEa,parseTree:()=>FEa,printParseErrorCode:()=>$Ea,stripComments:()=>jEa,visit:()=>HEa});function $Ea(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}function VEa(t,e,r){return Llt(t,e,r)}function WEa(t,e,r,n){return xai(t,e,r,n)}function zEa(t,e){let r=e.slice(0).sort((o,s)=>{let c=o.offset-s.offset;return c===0?o.length-s.length:c}),n=t.length;for(let o=r.length-1;o>=0;o--){let s=r[o];if(s.offset+s.length<=n)t=Qlt(t,s);else throw new Error("Overlapping edit");n=s.offset}return t}var OEa,Hpr,jpr,BEa,LEa,FEa,UEa,QEa,qEa,GEa,HEa,jEa,$pr,Pai=Pe(()=>{"use strict";f();Upr();wai();Blt();Gpr();OEa=FJ;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(Hpr||(Hpr={}));(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(jpr||(jpr={}));BEa=bai,LEa=Tai,FEa=Ult,UEa=g2e,QEa=qpr,qEa=Qpr,GEa=Flt,HEa=A2e,jEa=Sai;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})($pr||($pr={}));a($Ea,"printParseErrorCode");a(VEa,"format");a(WEa,"modify");a(zEa,"applyEdits")});var Glt=T(qlt=>{"use strict";f();Object.defineProperty(qlt,"__esModule",{value:!0});qlt.BaseAlternativeNotebookContentProvider=void 0;var Vpr=class{static{a(this,"BaseAlternativeNotebookContentProvider")}constructor(e){this.kind=e}};qlt.BaseAlternativeNotebookContentProvider=Vpr});var zpr=T(a2=>{"use strict";f();Object.defineProperty(a2,"__esModule",{value:!0});a2.DEFAULT_WORD_REGEXP=a2.USUAL_WORD_SEPARATORS=void 0;a2.ensureValidWordDefinition=kai;a2.setDefaultGetWordAtTextConfig=ZEa;a2.getWordAtText=Nai;var YEa=Ekt(),KEa=so(),JEa=tie();a2.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function XEa(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let r of a2.USUAL_WORD_SEPARATORS)t.indexOf(r)>=0||(e+="\\"+r);return e+="\\s]+)",new RegExp(e,"g")}a(XEa,"createWordRegExp");a2.DEFAULT_WORD_REGEXP=XEa();function kai(t){let e=a2.DEFAULT_WORD_REGEXP;if(t&&t instanceof RegExp)if(t.global)e=t;else{let r="g";t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.unicode&&(r+="u"),e=new RegExp(t.source,r)}return e.lastIndex=0,e}a(kai,"ensureValidWordDefinition");var Wpr=new JEa.LinkedList;Wpr.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function ZEa(t){let e=Wpr.unshift(t);return(0,KEa.toDisposable)(e)}a(ZEa,"setDefaultGetWordAtTextConfig");function Nai(t,e,r,n,o){if(e=kai(e),o||(o=YEa.Iterable.first(Wpr)),r.length>o.maxLen){let d=t-o.maxLen/2;return d<0?d=0:n+=d,r=r.substring(d,t+o.maxLen/2),Nai(t,e,r,n,o)}let s=Date.now(),c=t-1-n,l=-1,u=null;for(let d=1;!(Date.now()-s>=o.timeBudget);d++){let p=c-o.windowSize*d;e.lastIndex=Math.max(0,p);let h=eCa(e,r,c,l);if(!h&&u||(u=h,p<=0))break;l=p}if(u){let d={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return e.lastIndex=0,d}return null}a(Nai,"getWordAtText");function eCa(t,e,r,n){let o;for(;o=t.exec(e);){let s=o.index||0;if(s<=r&&t.lastIndex>=r)return o;if(n>0&&s>n)return null}return null}a(eCa,"_findRegexMatchEnclosingPosition")});var Dai=T(Hlt=>{"use strict";f();Object.defineProperty(Hlt,"__esModule",{value:!0});Hlt.toUint8=tCa;Hlt.toUint32=rCa;function tCa(t){return t<0?0:t>255?255:t|0}a(tCa,"toUint8");function rCa(t){return t<0?0:t>4294967295?4294967295:t|0}a(rCa,"toUint32")});var Mai=T(FQ=>{"use strict";f();Object.defineProperty(FQ,"__esModule",{value:!0});FQ.PrefixSumIndexOfResult=FQ.ConstantTimePrefixSumComputer=FQ.PrefixSumComputer=void 0;var nCa=jc(),cfe=Dai(),Ypr=class{static{a(this,"PrefixSumComputer")}constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(e,r){e=(0,cfe.toUint32)(e);let n=this.values,o=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+s),this.values.set(r,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,r){return e=(0,cfe.toUint32)(e),r=(0,cfe.toUint32)(r),this.values[e]===r?!1:(this.values[e]=r,e-1=n.length)return!1;let s=n.length-e;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+r),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,cfe.toUint32)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),e>=this.values.length&&(e=this.values.length-1);for(let n=r;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let r=0,n=this.values.length-1,o=0,s=0,c=0;for(;r<=n;)if(o=r+(n-r)/2|0,s=this.prefixSum[o],c=s-this.values[o],e=s)r=o+1;else break;return new y2e(o,e-c)}};FQ.PrefixSumComputer=Ypr;var Kpr=class{static{a(this,"ConstantTimePrefixSumComputer")}constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let r=this._indexBySum[e],n=r>0?this._prefixSum[r-1]:0;return new y2e(r,e-n)}removeValues(e,r){this._values.splice(e,r),this._invalidate(e)}insertValues(e,r){this._values=(0,nCa.arrayInsert)(this._values,e,r),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,r=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=o+n;for(let s=0;s{"use strict";f();Object.defineProperty(jlt,"__esModule",{value:!0});jlt.PositionOffsetTransformer=void 0;var Oai=C0(),Bai=aA(),iCa=Fu(),oCa=Mai(),QJ=Lp(),Jpr=class{static{a(this,"PositionOffsetTransformer")}constructor(e){this._lines=(0,Oai.splitLines)(e),this._eol=e.charAt(this._lines[0].length)==="\r"?`\r +`}function dRe(t,e){return`\r +`.indexOf(t.charAt(e))!==-1}var ohr=Pe(()=>{"use strict";f();jct();Cci();a($ct,"format");a(Cde,"repeat");a(PCa,"computeIndentLevel");a(kCa,"getEOL");a(dRe,"isEOL")});function vci(t,e){let r=[],n=new Object,o,s={value:{},offset:0,length:0,type:"object",parent:void 0},c=!1;function l(u,d,p,h){s.value=u,s.offset=d,s.length=p,s.type=h,s.colonOffset=void 0,o=s}a(l,"setPreviousNode");try{hRe(t,{onObjectBegin:a((u,d)=>{if(e<=u)throw n;o=void 0,c=e>u,r.push("")},"onObjectBegin"),onObjectProperty:a((u,d,p)=>{if(e{if(e<=u)throw n;o=void 0,r.pop()},"onObjectEnd"),onArrayBegin:a((u,d)=>{if(e<=u)throw n;o=void 0,r.push(0)},"onArrayBegin"),onArrayEnd:a((u,d)=>{if(e<=u)throw n;o=void 0,r.pop()},"onArrayEnd"),onLiteralValue:a((u,d,p)=>{if(e{if(e<=d)throw n;if(u===":"&&o&&o.type==="property")o.colonOffset=d,c=!1,o=void 0;else if(u===","){let h=r[r.length-1];typeof h=="number"?r[r.length-1]=h+1:(c=!0,r[r.length-1]=""),o=void 0}},"onSeparator")})}catch(u){if(u!==n)throw u}return{path:r,previousNode:o,isAtPropertyKey:c,matches:a(u=>{let d=0;for(let p=0;d{let u={};c(u),s.push(o),o=u,n=null},"onObjectBegin"),onObjectProperty:a(u=>{n=u},"onObjectProperty"),onObjectEnd:a(()=>{o=s.pop()},"onObjectEnd"),onArrayBegin:a(()=>{let u=[];c(u),s.push(o),o=u,n=null},"onArrayBegin"),onArrayEnd:a(()=>{o=s.pop()},"onArrayEnd"),onLiteralValue:c,onError:a((u,d,p)=>{e.push({error:u,offset:d,length:p})},"onError")},r),o[0]}function Wct(t,e=[],r=fRe.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(u){n.type==="property"&&(n.length=u-n.offset,n=n.parent)}a(o,"ensurePropertyComplete");function s(u){return n.children.push(u),u}a(s,"onValue"),hRe(t,{onObjectBegin:a(u=>{n=s({type:"object",offset:u,length:-1,parent:n,children:[]})},"onObjectBegin"),onObjectProperty:a((u,d,p)=>{n=s({type:"property",offset:d,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:u,offset:d,length:p,parent:n})},"onObjectProperty"),onObjectEnd:a((u,d)=>{o(u+d),n.length=u+d-n.offset,n=n.parent,o(u+d)},"onObjectEnd"),onArrayBegin:a((u,d)=>{n=s({type:"array",offset:u,length:-1,parent:n,children:[]})},"onArrayBegin"),onArrayEnd:a((u,d)=>{n.length=u+d-n.offset,n=n.parent,o(u+d)},"onArrayEnd"),onLiteralValue:a((u,d,p)=>{s({type:Sci(u),offset:d,length:p,parent:n,value:u}),o(d+p)},"onLiteralValue"),onSeparator:a((u,d,p)=>{n.type==="property"&&(u===":"?n.colonOffset=d:u===","&&o(d))},"onSeparator"),onError:a((u,d,p)=>{e.push({error:u,offset:d,length:p})},"onError")},r);let l=n.children[0];return l&&delete l.parent,l}function pRe(t,e){if(!t)return;let r=t;for(let n of e)if(typeof n=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let o=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){r=s.children[1],o=!0;break}if(!o)return}else{let o=n;if(r.type!=="array"||o<0||!Array.isArray(r.children)||o>=r.children.length)return;r=r.children[o]}return r}function shr(t){if(!t.parent||!t.parent.children)return[];let e=shr(t.parent);if(t.parent.type==="property"){let r=t.parent.children[0].value;e.push(r)}else if(t.parent.type==="array"){let r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function Vct(t){switch(t.type){case"array":return t.children.map(Vct);case"object":let e=Object.create(null);for(let r of t.children){let n=r.children[1];n&&(e[r.children[0].value]=Vct(n))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function NCa(t,e,r=!1){return e>=t.offset&&es===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}a(c,"toNoArgVisit");function l(O){return O?D=>s===0&&O(D,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}a(l,"toOneArgVisit");function u(O){return O?D=>s===0&&O(D,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}a(u,"toOneArgVisitWithPath");function d(O){return O?()=>{s>0?s++:O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice())===!1&&(s=1)}:()=>!0}a(d,"toBeginVisit");function p(O){return O?()=>{s>0&&s--,s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}a(p,"toEndVisit");let h=d(e.onObjectBegin),m=u(e.onObjectProperty),g=p(e.onObjectEnd),A=d(e.onArrayBegin),y=p(e.onArrayEnd),E=u(e.onLiteralValue),_=l(e.onSeparator),v=c(e.onComment),b=l(e.onError),I=r&&r.disallowComments,x=r&&r.allowTrailingComma;function w(){for(;;){let O=n.scan();switch(n.getTokenError()){case 4:R(14);break;case 5:R(15);break;case 3:R(13);break;case 1:I||R(11);break;case 2:R(12);break;case 6:R(16);break}switch(O){case 12:case 13:I?R(10):v();break;case 16:R(1);break;case 15:case 14:break;default:return O}}}a(w,"scanNext");function R(O,D=[],F=[]){if(b(O),D.length+F.length>0){let U=n.getToken();for(;U!==17;){if(D.indexOf(U)!==-1){w();break}else if(F.indexOf(U)!==-1)break;U=w()}}}a(R,"handleError");function P(O){let D=n.getTokenValue();return O?E(D):(m(D),o.push(D)),w(),!0}a(P,"parseString");function k(){switch(n.getToken()){case 11:let O=n.getTokenValue(),D=Number(O);isNaN(D)&&(R(2),D=0),E(D);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return w(),!0}a(k,"parseLiteral");function Q(){return n.getToken()!==10?(R(3,[],[2,5]),!1):(P(!1),n.getToken()===6?(_(":"),w(),G()||R(4,[],[2,5])):R(5,[],[2,5]),o.pop(),!0)}a(Q,"parseProperty");function M(){h(),w();let O=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(O||R(4,[],[]),_(","),w(),n.getToken()===2&&x)break}else O&&R(6,[],[]);Q()||R(4,[],[2,5]),O=!0}return g(),n.getToken()!==2?R(7,[2],[]):w(),!0}a(M,"parseObject");function N(){A(),w();let O=!0,D=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(D||R(4,[],[]),_(","),w(),n.getToken()===4&&x)break}else D&&R(6,[],[]);O?(o.push(0),O=!1):o[o.length-1]++,G()||R(4,[],[4,5]),D=!0}return y(),O||o.pop(),n.getToken()!==4?R(8,[4],[]):w(),!0}a(N,"parseArray");function G(){switch(n.getToken()){case 3:return N();case 1:return M();case 10:return P(!0);default:return k()}}return a(G,"parseValue"),w(),n.getToken()===17?r.allowEmptyContent?!0:(R(4,[],[]),!1):G()?(n.getToken()!==17&&R(9,[],[]),!0):(R(4,[],[]),!1)}function Tci(t,e){let r=$K(t),n=[],o,s=0,c;do switch(c=r.getPosition(),o=r.scan(),o){case 12:case 13:case 17:s!==c&&n.push(t.substring(s,c)),e!==void 0&&n.push(r.getTokenValue().replace(/[^\r\n]/g,e)),s=r.getPosition();break}while(o!==17);return n.join("")}function Sci(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}var fRe,chr=Pe(()=>{"use strict";f();jct();(function(t){t.DEFAULT={allowTrailingComma:!1}})(fRe||(fRe={}));a(vci,"getLocation");a(bci,"parse");a(Wct,"parseTree");a(pRe,"findNodeAtLocation");a(shr,"getNodePath");a(Vct,"getNodeValue");a(NCa,"contains");a(ahr,"findNodeAtOffset");a(hRe,"visit");a(Tci,"stripComments");a(Sci,"getNodeType")});function Ici(t,e,r,n){let o=e.slice(),c=Wct(t,[]),l,u;for(;o.length>0&&(u=o.pop(),l=pRe(c,o),l===void 0&&r!==void 0);)typeof u=="string"?r={[u]:r}:r=[r];if(l)if(l.type==="object"&&typeof u=="string"&&Array.isArray(l.children)){let d=pRe(l,[u]);if(d!==void 0)if(r===void 0){if(!d.parent)throw new Error("Malformed AST");let p=l.children.indexOf(d.parent),h,m=d.parent.offset+d.parent.length;if(p>0){let g=l.children[p-1];h=g.offset+g.length}else h=l.offset+1,l.children.length>1&&(m=l.children[1].offset);return VK(t,{offset:h,length:m-h,content:""},n)}else return VK(t,{offset:d.offset,length:d.length,content:JSON.stringify(r)},n);else{if(r===void 0)return[];let p=`${JSON.stringify(u)}: ${JSON.stringify(r)}`,h=n.getInsertionIndex?n.getInsertionIndex(l.children.map(g=>g.children[0].value)):l.children.length,m;if(h>0){let g=l.children[h-1];m={offset:g.offset+g.length,length:0,content:","+p}}else l.children.length===0?m={offset:l.offset+1,length:0,content:p}:m={offset:l.offset+1,length:0,content:p+","};return VK(t,m,n)}}else if(l.type==="array"&&typeof u=="number"&&Array.isArray(l.children)){let d=u;if(d===-1){let p=`${JSON.stringify(r)}`,h;if(l.children.length===0)h={offset:l.offset+1,length:0,content:p};else{let m=l.children[l.children.length-1];h={offset:m.offset+m.length,length:0,content:","+p}}return VK(t,h,n)}else if(r===void 0&&l.children.length>=0){let p=u,h=l.children[p],m;if(l.children.length===1)m={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===p){let g=l.children[p-1],A=g.offset+g.length,y=l.offset+l.length;m={offset:A,length:y-2-A,content:""}}else m={offset:h.offset,length:l.children[p+1].offset-h.offset,content:""};return VK(t,m,n)}else if(r!==void 0){let p,h=`${JSON.stringify(r)}`;if(!n.isArrayInsertion&&l.children.length>u){let m=l.children[u];p={offset:m.offset,length:m.length,content:h}}else if(l.children.length===0||u===0)p={offset:l.offset+1,length:0,content:l.children.length===0?h:h+","};else{let m=u>l.children.length?l.children.length:u,g=l.children[m-1];p={offset:g.offset+g.length,length:0,content:","+h}}return VK(t,p,n)}else throw new Error(`Can not ${r===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${d} as length is not sufficient`)}else throw new Error(`Can not add ${typeof u!="number"?"index":"property"} to parent of type ${l.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return VK(t,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(r)},n)}}function VK(t,e,r){if(!r.formattingOptions)return[e];let n=zct(t,e),o=e.offset,s=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;o>0&&!dRe(n,o-1);)o--;for(;s=0;u--){let d=c[u];n=zct(n,d),o=Math.min(o,d.offset),s=Math.max(s,d.offset+d.length),s+=d.content.length-d.length}let l=t.length-(n.length-s)-o;return[{offset:o,length:l,content:n.substring(o,s)}]}function zct(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var xci=Pe(()=>{"use strict";f();ohr();chr();a(Ici,"setProperty");a(VK,"withFormatting");a(zct,"applyEdit")});var wci={};ui(wci,{ParseErrorCode:()=>dhr,ScanError:()=>lhr,SyntaxKind:()=>uhr,applyEdits:()=>YCa,createScanner:()=>BCa,findNodeAtLocation:()=>QCa,findNodeAtOffset:()=>qCa,format:()=>WCa,getLocation:()=>LCa,getNodePath:()=>GCa,getNodeValue:()=>HCa,modify:()=>zCa,parse:()=>FCa,parseTree:()=>UCa,printParseErrorCode:()=>VCa,stripComments:()=>$Ca,visit:()=>jCa});function VCa(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}function WCa(t,e,r){return $ct(t,e,r)}function zCa(t,e,r,n){return Ici(t,e,r,n)}function YCa(t,e){let r=e.slice(0).sort((o,s)=>{let c=o.offset-s.offset;return c===0?o.length-s.length:c}),n=t.length;for(let o=r.length-1;o>=0;o--){let s=r[o];if(s.offset+s.length<=n)t=zct(t,s);else throw new Error("Overlapping edit");n=s.offset}return t}var BCa,lhr,uhr,LCa,FCa,UCa,QCa,qCa,GCa,HCa,jCa,$Ca,dhr,Rci=Pe(()=>{"use strict";f();ohr();xci();jct();chr();BCa=$K;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(lhr||(lhr={}));(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(uhr||(uhr={}));LCa=vci,FCa=bci,UCa=Wct,QCa=pRe,qCa=ahr,GCa=shr,HCa=Vct,jCa=hRe,$Ca=Tci;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(dhr||(dhr={}));a(VCa,"printParseErrorCode");a(WCa,"format");a(zCa,"modify");a(YCa,"applyEdits")});var Kct=T(Yct=>{"use strict";f();Object.defineProperty(Yct,"__esModule",{value:!0});Yct.BaseAlternativeNotebookContentProvider=void 0;var fhr=class{static{a(this,"BaseAlternativeNotebookContentProvider")}constructor(e){this.kind=e}};Yct.BaseAlternativeNotebookContentProvider=fhr});var hhr=T(KR=>{"use strict";f();Object.defineProperty(KR,"__esModule",{value:!0});KR.DEFAULT_WORD_REGEXP=KR.USUAL_WORD_SEPARATORS=void 0;KR.ensureValidWordDefinition=Pci;KR.setDefaultGetWordAtTextConfig=e1a;KR.getWordAtText=kci;var KCa=Ukt(),JCa=ro(),XCa=hne();KR.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function ZCa(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let r of KR.USUAL_WORD_SEPARATORS)t.indexOf(r)>=0||(e+="\\"+r);return e+="\\s]+)",new RegExp(e,"g")}a(ZCa,"createWordRegExp");KR.DEFAULT_WORD_REGEXP=ZCa();function Pci(t){let e=KR.DEFAULT_WORD_REGEXP;if(t&&t instanceof RegExp)if(t.global)e=t;else{let r="g";t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.unicode&&(r+="u"),e=new RegExp(t.source,r)}return e.lastIndex=0,e}a(Pci,"ensureValidWordDefinition");var phr=new XCa.LinkedList;phr.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function e1a(t){let e=phr.unshift(t);return(0,JCa.toDisposable)(e)}a(e1a,"setDefaultGetWordAtTextConfig");function kci(t,e,r,n,o){if(e=Pci(e),o||(o=KCa.Iterable.first(phr)),r.length>o.maxLen){let d=t-o.maxLen/2;return d<0?d=0:n+=d,r=r.substring(d,t+o.maxLen/2),kci(t,e,r,n,o)}let s=Date.now(),c=t-1-n,l=-1,u=null;for(let d=1;!(Date.now()-s>=o.timeBudget);d++){let p=c-o.windowSize*d;e.lastIndex=Math.max(0,p);let h=t1a(e,r,c,l);if(!h&&u||(u=h,p<=0))break;l=p}if(u){let d={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return e.lastIndex=0,d}return null}a(kci,"getWordAtText");function t1a(t,e,r,n){let o;for(;o=t.exec(e);){let s=o.index||0;if(s<=r&&t.lastIndex>=r)return o;if(n>0&&s>n)return null}return null}a(t1a,"_findRegexMatchEnclosingPosition")});var Dci=T(Jct=>{"use strict";f();Object.defineProperty(Jct,"__esModule",{value:!0});Jct.toUint8=r1a;Jct.toUint32=n1a;function r1a(t){return t<0?0:t>255?255:t|0}a(r1a,"toUint8");function n1a(t){return t<0?0:t>4294967295?4294967295:t|0}a(n1a,"toUint32")});var Nci=T(dQ=>{"use strict";f();Object.defineProperty(dQ,"__esModule",{value:!0});dQ.PrefixSumIndexOfResult=dQ.ConstantTimePrefixSumComputer=dQ.PrefixSumComputer=void 0;var i1a=Lc(),vde=Dci(),mhr=class{static{a(this,"PrefixSumComputer")}constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(e,r){e=(0,vde.toUint32)(e);let n=this.values,o=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+s),this.values.set(r,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,r){return e=(0,vde.toUint32)(e),r=(0,vde.toUint32)(r),this.values[e]===r?!1:(this.values[e]=r,e-1=n.length)return!1;let s=n.length-e;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+r),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,vde.toUint32)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),e>=this.values.length&&(e=this.values.length-1);for(let n=r;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let r=0,n=this.values.length-1,o=0,s=0,c=0;for(;r<=n;)if(o=r+(n-r)/2|0,s=this.prefixSum[o],c=s-this.values[o],e=s)r=o+1;else break;return new mRe(o,e-c)}};dQ.PrefixSumComputer=mhr;var ghr=class{static{a(this,"ConstantTimePrefixSumComputer")}constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();let r=this._indexBySum[e],n=r>0?this._prefixSum[r-1]:0;return new mRe(r,e-n)}removeValues(e,r){this._values.splice(e,r),this._invalidate(e)}insertValues(e,r){this._values=(0,i1a.arrayInsert)(this._values,e,r),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,r=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=o+n;for(let s=0;s{"use strict";f();Object.defineProperty(Xct,"__esModule",{value:!0});Xct.PositionOffsetTransformer=void 0;var Mci=m0(),Oci=Zg(),o1a=wu(),s1a=Nci(),WK=kp(),Ahr=class{static{a(this,"PositionOffsetTransformer")}constructor(e){this._lines=(0,Mci.splitLines)(e),this._eol=e.charAt(this._lines[0].length)==="\r"?`\r `:` -`;let r=new Uint32Array(this._lines.length);for(let n=0;n=0;n--){let o=r[n],s=this.toRange(o.replaceRange);this._acceptDeleteRange(s),this._acceptInsertText(s.start,o.newText)}}_acceptDeleteRange(e){if(e.start.line===e.end.line){if(e.start.character===e.end.character)return;this._setLineText(e.start.line,this._lines[e.start.line].substring(0,e.start.character)+this._lines[e.start.line].substring(e.end.character));return}this._setLineText(e.start.line,this._lines[e.start.line].substring(0,e.start.character)+this._lines[e.end.line].substring(e.end.character)),this._lines.splice(e.start.line+1,e.end.line-e.start.line),this._lineStarts.removeValues(e.start.line+1,e.end.line-e.start.line)}_acceptInsertText(e,r){if(r.length===0)return;let n=(0,Oai.splitLines)(r);if(n.length===1){this._setLineText(e.line,this._lines[e.line].substring(0,e.character)+n[0]+this._lines[e.line].substring(e.character));return}n[n.length-1]+=this._lines[e.line].substring(e.character),this._setLineText(e.line,this._lines[e.line].substring(0,e.character)+n[0]);let o=new Uint32Array(n.length-1);for(let s=1;snew QJ.TextEdit(this.validateRange(n.range),n.newText));return new Bai.StringEdit(r.map(n=>new Bai.StringReplacement(this.toOffsetRange(n.range),n.newText)))}toTextEdits(e){return e.replacements.map(r=>new QJ.TextEdit(this.toRange(r.replaceRange),r.newText))}validatePosition(e){if(!(e instanceof QJ.Position))throw new Error("Invalid argument");if(this._lines.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this._lines.length)r=this._lines.length-1,n=this._lines[r].length,o=!0;else{let s=this._lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new QJ.Position(r,n):e}validateRange(e){return new QJ.Range(this.validatePosition(e.start),this.validatePosition(e.end))}};jlt.PositionOffsetTransformer=Jpr});var ehr=T(qJ=>{"use strict";f();Object.defineProperty(qJ,"__esModule",{value:!0});qJ.SnapshotDocumentLine=qJ.TextDocumentSnapshot=void 0;qJ.isTextDocumentSnapshotJSON=aCa;var $lt=sv(),Fai=Ru(),Lai=zpr(),lfe=Lp(),sCa=Xpr();function aCa(t){return!t||typeof t!="object"?!1:(0,Fai.isUriComponents)(t.uri)&&(0,$lt.isString)(t._text)&&(0,$lt.isString)(t.languageId)&&(0,$lt.isNumber)(t.version)&&(0,$lt.isNumber)(t.eol)}a(aCa,"isTextDocumentSnapshotJSON");var Zpr=class t{static{a(this,"TextDocumentSnapshot")}static create(e){return new t(e,e.uri,e.getText(),e.languageId,e.eol,e.version)}static fromNewText(e,r){return new t(r instanceof t?r.document:r,r.uri,e,r.languageId,r.eol,r.version+1)}static fromJSON(e,r){return new t(e,Fai.URI.from(r.uri),r._text,r.languageId,r.eol,r.version)}get transformer(){return this._transformer||(this._transformer=new sCa.PositionOffsetTransformer(this._text)),this._transformer}get fileName(){return this.uri.fsPath}get isUntitled(){return this.uri.scheme==="untitled"}get lineCount(){return this.lines.length}get lines(){return this._lines||(this._lines=this._text.split(/\r\n|\r|\n/g)),this._lines}constructor(e,r,n,o,s,c){this._transformer=null,this._lines=null,this.document=e,this.uri=r,this._text=n,this.languageId=o,this.eol=s,this.version=c}lineAt(e){let r;if(e instanceof lfe.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return new Vlt(r,this.lines[r],r===this.lines.length-1)}offsetAt(e){return this.version===this.document.version?this.document.offsetAt(e):(e=this.validatePosition(e),this.transformer.getOffset(e))}positionAt(e){return this.version===this.document.version?this.document.positionAt(e):(e=Math.floor(e),e=Math.max(0,e),this.transformer.getPosition(e))}getText(e){return e?this._getTextInRange(e):this._text}_getTextInRange(e){if(this.version===this.document.version)return this.document.getText(e);let r=this.validateRange(e);if(r.isEmpty)return"";let n=this.transformer.toOffsetRange(r);return this._text.substring(n.start,n.endExclusive)}getWordRangeAtPosition(e){let r=this.validatePosition(e),n=(0,Lai.getWordAtText)(r.character+1,Lai.DEFAULT_WORD_REGEXP,this.lines[r.line],0);if(n)return new lfe.Range(r.line,n.startColumn-1,r.line,n.endColumn-1)}validateRange(e){let r=this.validatePosition(e.start),n=this.validatePosition(e.end);return r===e.start&&n===e.end?e:new lfe.Range(r.line,r.character,n.line,n.character)}validatePosition(e){if(this._text.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this.lines.length)r=this.lines.length-1,n=this.lines[r].length,o=!0;else{let s=this.lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new lfe.Position(r,n):e}toJSON(){return{uri:this.uri.toJSON(),languageId:this.languageId,version:this.version,eol:this.eol,_text:this._text}}};qJ.TextDocumentSnapshot=Zpr;var Vlt=class{static{a(this,"SnapshotDocumentLine")}constructor(e,r,n){this._line=e,this._text=r,this._isLastLine=n}get lineNumber(){return this._line}get text(){return this._text}get range(){return new lfe.Range(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:new lfe.Range(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}};qJ.SnapshotDocumentLine=Vlt});var Ylt=T(zlt=>{"use strict";f();Object.defineProperty(zlt,"__esModule",{value:!0});zlt.AlternativeNotebookDocument=void 0;var Uai=zpr(),Wlt=Lp(),cCa=Xpr(),lCa=ehr(),thr=class{static{a(this,"AlternativeNotebookDocument")}get transformer(){return this._transformer||(this._transformer=new cCa.PositionOffsetTransformer(this._text)),this._transformer}getText(e){return e?this._getTextInRange(e):this._text}_getTextInRange(e){let r=this.validateRange(e);if(r.isEmpty)return"";let n=this.transformer.toOffsetRange(r);return this._text.substring(n.start,n.endExclusive)}constructor(e,r){this._text=e,this.notebook=r,this._transformer=null,this._lines=null}positionToOffset(e){return e=this.validatePosition(e),this.transformer.getOffset(e)}getWordRangeAtPosition(e){let r=this.validatePosition(e),n=(0,Uai.getWordAtText)(r.character+1,Uai.DEFAULT_WORD_REGEXP,this.lines[r.line],0);if(n)return new Wlt.Range(r.line,n.startColumn-1,r.line,n.endColumn-1)}get lines(){return this._lines||(this._lines=this._text.split(/\r\n|\r|\n/g)),this._lines}get lineCount(){return this.lines.length}lineAt(e){let r;if(e instanceof Wlt.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return new lCa.SnapshotDocumentLine(r,this.lines[r],r===this.lines.length-1)}offsetAt(e){return this.transformer.getOffset(e)}positionAt(e){return e=Math.floor(e),e=Math.max(0,e),this.transformer.getPosition(e)}validateRange(e){let r=this.validatePosition(e.start),n=this.validatePosition(e.end);return r===e.start&&n===e.end?e:new Wlt.Range(r.line,r.character,n.line,n.character)}validatePosition(e){if(this._text.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this.lines.length)r=this.lines.length-1,n=this.lines[r].length,o=!0;else{let s=this.lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new Wlt.Position(r,n):e}};zlt.AlternativeNotebookDocument=thr});var Klt=T(ufe=>{"use strict";f();Object.defineProperty(ufe,"__esModule",{value:!0});ufe.isUri=dCa;ufe.isLocation=rhr;ufe.toLocation=fCa;ufe.isSymbolInformation=pCa;var E2e=Lp(),uCa=Ru();function dCa(t){return uCa.URI.isUri(t)}a(dCa,"isUri");function rhr(t){return t&&typeof t=="object"&&"uri"in t&&"range"in t}a(rhr,"isLocation");function fCa(t){if(rhr(t)&&Array.isArray(t.range)&&t.range.length===2){let e=t.range[0],r=t.range[1];return new E2e.Location(t.uri,new E2e.Range(new E2e.Position(e.line,e.character),new E2e.Position(r.line,r.character)))}else if(rhr(t)&&t.range instanceof E2e.Range)return t}a(fCa,"toLocation");function pCa(t){return t&&typeof t=="object"&&"name"in t&&"containerName"in t}a(pCa,"isSymbolInformation")});var v2e=T(ag=>{"use strict";f();Object.defineProperty(ag,"__esModule",{value:!0});ag.CellIdPatternRe=ag.EOL=ag.LineOfText=void 0;ag.summarize=mCa;ag.notebookCellToCellData=gCa;ag.getCellIdMap=ACa;ag.normalizeCellId=yCa;ag.getNotebookId=ECa;ag.getCellId=ohr;ag.getDefaultLanguage=_Ca;ag.requestHasNotebookRefs=bCa;ag.parseAndCleanStack=TCa;var Qai=Klt(),jai=N0r(),hCa=C0(),qai=Ru(),ihr=Lp(),nhr=class{static{a(this,"LineOfText")}constructor(e){this.__lineOfTextBrand=void 0,this.value=e.replace(/\r$/,"")}};ag.LineOfText=nhr;ag.EOL=` -`;function mCa(t){let e=t.kind===ihr.NotebookCellKind.Code?"code":"markdown",r=ohr(t),n=CCa(t.document);return{cell_type:e,id:r,language:t.document.languageId,source:n,index:t.index}}a(mCa,"summarize");function gCa(t){let e=new ihr.NotebookCellData(t.kind,t.document.getText(),t.document.languageId);return e.metadata=t.metadata,e.executionSummary=t.executionSummary,t.outputs.length&&(e.outputs=[...t.outputs]),e}a(gCa,"notebookCellToCellData");function ACa(t){let e=new Map;return t.getCells().forEach(r=>{e.set(ohr(r),r)}),e}a(ACa,"getCellIdMap");var Gai=new WeakMap,_2e=8,C2e="#VSC-";ag.CellIdPatternRe=new RegExp(`(\\s+|^|\\b|\\W)(#VSC-[a-f0-9]{${_2e}})\\b`,"gi");function yCa(t){return t.startsWith(C2e)?t:t.startsWith("VSC-")?`#${t}`:t.startsWith("#V-")&&t.length===_2e+3?`${C2e}${t.substring(3)}`:t.toLowerCase().startsWith("vscode-")&&t.length===_2e+7?`${C2e}${t.substring(7)}`:t.startsWith("-")?`#VSC${t}`:t.length===_2e?`${C2e}${t}`:t}a(yCa,"normalizeCellId");var Hai=new WeakMap;function ECa(t){let e=Hai.get(t);if(e)return e;let r=new jai.StringSHA1;return r.update(t.uri.toString()),e=r.digest(),Hai.set(t,e),e}a(ECa,"getNotebookId");function ohr(t){let e=Gai.get(t);if(e)return e;let r=new jai.StringSHA1;return r.update(t.document.uri.toString()),e=`${C2e}${r.digest().substring(0,_2e)}`,Gai.set(t,e),e}a(ohr,"getCellId");function CCa(t){return t.lineCount===0?[]:new Array(t.lineCount).fill("").map((e,r)=>t.lineAt(r).text)}a(CCa,"getCellCode");function _Ca(t){let e=t.getCells().find(r=>r.kind===ihr.NotebookCellKind.Code);if(e)return e.document.languageId;if(t.notebookType==="jupyter-notebook")return t.metadata?.language_info?.name||t.metadata?.kernelspec?.language||"python"}a(_Ca,"getDefaultLanguage");var vCa=["jupyter","notebook","cell.","cells."," cell ","cells","notebook cell"];function bCa(t,e,r){let n=(t.prompt||"").toLowerCase();return r?.checkPromptAsWell&&vCa.some(o=>n.includes(o))?!0:t.references.some(o=>(0,Qai.isLocation)(o.value)?e.hasSupportedNotebooks(o.value.uri):(0,qai.isUriComponents)(o.value)?e.hasSupportedNotebooks(qai.URI.revive(o.value)):(0,Qai.isUri)(o.value)?e.hasSupportedNotebooks(o.value):!1)}a(bCa,"requestHasNotebookRefs");function TCa(t){try{let e=JSON.parse(t);return(0,hCa.removeAnsiEscapeCodes)(e?.stack||e.message||"")||e.message||e.name||t}catch{return t}}a(TCa,"parseAndCleanStack")});var Wai=T(b2e=>{"use strict";f();Object.defineProperty(b2e,"__esModule",{value:!0});b2e.AlternativeJsonNotebookContentProvider=void 0;b2e.isJsonContent=RCa;var SCa=(Pai(),ba(Rai)),ICa=wc(),$ai=Ru(),c2=Lp(),xCa=Glt(),wCa=Ylt(),dfe=v2e(),Vai=4;function RCa(t){return!!(t.startsWith("{")||t.trim().startsWith("{")||(t.includes("{")||t.includes("}"))&&t.includes('"source":')&&t.includes('"cell_type":'))}a(RCa,"isJsonContent");var Jlt=class extends wCa.AlternativeNotebookDocument{static{a(this,"AlternativeJsonDocument")}fromCellPosition(e,r){let n=(0,dfe.getCellId)(e),o=this.getText(),s=" ",c=`"id": "${n}",`,l=o.indexOf('"source": [',o.indexOf(c)),u=this.positionAt(l).line+1,d=e.document.getText(new c2.Range(r.line,0,r.line,r.character)),p=`${s}${JSON.stringify(d).slice(0,-1)}`,h=r.line+u;return new c2.Position(h,p.length)}toCellPosition(e){throw new Error("Method not implemented.")}},shr=class extends xCa.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeJsonNotebookContentProvider")}constructor(){super("json")}stripCellMarkers(e){return e}parseAlternateContent(e,r,n){return this.parseAlternateContentImpl(e,r,n)}getAlternativeDocumentFromText(e,r){return new Jlt(e,r)}getAlternativeDocument(e,r){let o={cells:e.getCells().filter(c=>r?c.kind!==c2.NotebookCellKind.Markup:!0).map(c=>{let l=(0,dfe.summarize)(c),u=PCa(c.document);return{cell_type:l.cell_type,id:l.id,metadata:{language:l.language},source:u}})},s=JSON.stringify(o,void 0,Vai);return new Jlt(s,e)}getSummaryOfStructure(e,r,n){let o=["{",' "cells: ['],s=`// ${n}`;return e.getCells().forEach(c=>{if(r.includes(c)){let l=(0,dfe.summarize)(c);l.source.length&&l.source[0].trim().length?l.source=[l.source[0],s]:l.source.length&&l.source.some(d=>d.trim().length)?l.source=[s,l.source.filter(d=>d.trim().length)[0],s]:l.source=[s];let u=JSON.stringify(l,void 0,Vai).split(/\r?\n/).map(d=>` ${d}`);o.push(...u),o.push(",")}else(!o.length||o[o.length-1]!==s)&&o.push(s)}),o.push(" ]"),o.push("}"),o.join(dfe.EOL)}parseAlternateContentImpl(e,r,n){return new ICa.AsyncIterableObject(async o=>{let s=$ai.URI.isUri(e)?new Map:(0,dfe.getCellIdMap)(e),c=new Set,l="",u=-1,d={index:-1,startOffset:-1,endOffset:-1,kind:c2.NotebookCellKind.Code,source:[]},p=$ai.URI.isUri(e)?"python":(0,dfe.getDefaultLanguage)(e),h=a(g=>{d.language=d.language||p,d.id&&s.get(d.id)?.document.languageId===d.language?c.has(d.id)?d.id="":c.add(d.id):d.id="";let A=s.get(d.id);d.uri=A?.document.uri,d.kind=A?.kind||(d.language==="markdown"?c2.NotebookCellKind.Markup:c2.NotebookCellKind.Code),o.emitOne({index:d.index,type:"start",kind:d.kind,language:d.language,uri:d.uri,id:d.id}),d.source.forEach(y=>o.emitOne({index:d.index,type:"line",line:y})),o.emitOne({index:d.index,type:"end"})},"emitCell"),m=0;for await(let g of r){if(n.isCancellationRequested)break;let A=g.value;l+=A,(0,SCa.visit)(l,{onObjectEnd(y,E,_,v){m=y},onLiteralValue:a((y,E,_,v,b,I)=>{if(u>=E)return;let x=I();if(x.length<2||x.shift()!=="cells")return;let R=x.shift();if(typeof R!="number")return;let w=x.shift();if(u=E,d.index!==-1&&d.index!==R&&(h(E),d.startOffset=E,d.id=void 0,d.kind=c2.NotebookCellKind.Code,d.source=[],d.uri=void 0,d.language=void 0),d.index=R,w==="cell_type")d.kind=y==="code"?c2.NotebookCellKind.Code:c2.NotebookCellKind.Markup,d.kind===c2.NotebookCellKind.Markup&&(d.language="markdown");else if(w==="id")d.id=y;else if(w==="metadata"&&x[0]==="id")d.id=y;else if(w==="metadata"&&x[0]==="language")d.language=y,d.language==="markdown"&&(d.kind=c2.NotebookCellKind.Markup);else if(w==="source"&&x.length&&typeof x[0]=="number"){x[0]===0&&(d.startOffset=E);let P=typeof y=="string"?y:`${y||""}`;P.endsWith(` -`)&&(P=P.substr(0,P.length-1)),d.source.push(P)}},"onLiteralValue")})}d.index!==-1&&h(m)})}};b2e.AlternativeJsonNotebookContentProvider=shr;function PCa(t){if(t.lineCount===0)return[];if(t.lineCount===1)return[t.lineAt(0).text];let e=t.lineCount;return new Array(e).fill("").map((r,n)=>t.lineAt(n).text)}a(PCa,"getCellCode")});var chr=T(UQ=>{"use strict";f();Object.defineProperty(UQ,"__esModule",{value:!0});UQ.wellKnownLanguages=void 0;UQ.getLanguage=zai;UQ.getLanguageForResource=DCa;var kCa=Tk(),NCa=Object.freeze({abap:{lineComment:{start:"'"},markdownLanguageIds:["abap","sap-abap"]},bat:{lineComment:{start:"REM"},alternativeLineComments:[{start:"::"}],aliases:["Batch","bat"],extensions:[".bat",".cmd"]},bibtex:{lineComment:{start:"%"},aliases:["BibTeX","bibtex"],extensions:[".bib"]},blade:{lineComment:{start:"#"}},c:{lineComment:{start:"//"},aliases:["C","c"],extensions:[".c",".i"],markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";"},aliases:["Clojure","clojure"],extensions:[".clj",".cljs",".cljc",".cljx",".clojure",".edn"],markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//"},aliases:["CoffeeScript","coffeescript","coffee"],extensions:[".coffee",".cson",".iced"],markdownLanguageIds:["coffeescript","coffee","cson","iced"],blockComment:["###","###"]},cpp:{lineComment:{start:"//"},aliases:["C++","Cpp","cpp"],extensions:[".cpp",".cc",".cxx",".c++",".hpp",".hh",".hxx",".h++",".h",".ii",".ino",".inl",".ipp",".ixx",".tpp",".txx",".hpp.in",".h.in"],markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"],blockComment:["/*","*/"]},csharp:{lineComment:{start:"//"},aliases:["C#","csharp"],extensions:[".cs",".csx",".cake"],markdownLanguageIds:["csharp","cs"],blockComment:["/*","*/"]},css:{lineComment:{start:"/*",end:"*/"},aliases:["CSS","css"],extensions:[".css"],blockComment:["/*","*/"]},dart:{lineComment:{start:"//"},aliases:["Dart"],extensions:[".dart"],blockComment:["/*","*/"]},dockerfile:{lineComment:{start:"#"},aliases:["Docker","Dockerfile","Containerfile"],extensions:[".dockerfile",".containerfile"],markdownLanguageIds:["dockerfile","docker"]},elixir:{lineComment:{start:"#"}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%"},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//"},aliases:["F#","FSharp","fsharp"],extensions:[".fs",".fsi",".fsx",".fsscript"],markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"],blockComment:["(*","*)"]},go:{lineComment:{start:"//"},aliases:["Go"],extensions:[".go"],markdownLanguageIds:["go","golang"],blockComment:["/*","*/"]},groovy:{lineComment:{start:"//"},aliases:["Groovy","groovy"],extensions:[".groovy",".gvy",".gradle",".jenkinsfile",".nf"],blockComment:["/*","*/"]},haml:{lineComment:{start:"-#"}},handlebars:{lineComment:{start:"{{!",end:"}}"},extensions:[".hbs",".handlebars"],markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"],blockComment:["{{!--","--}}"]},haskell:{lineComment:{start:"--"},markdownLanguageIds:["haskell","hs"]},html:{lineComment:{start:""},aliases:["HTML","htm","html","xhtml"],extensions:[".html",".htm",".shtml",".xhtml",".xht",".mdoc",".jsp",".asp",".aspx",".jshtm",".volt",".ejs",".rhtml"],markdownLanguageIds:["html","xhtml"],blockComment:[""]},ini:{lineComment:{start:";"},blockComment:[";"," "]},java:{lineComment:{start:"//"},extensions:[".java",".class"],markdownLanguageIds:["java","jsp"],blockComment:["/*","*/"]},javascript:{lineComment:{start:"//"},aliases:["JavaScript","javascript","js"],extensions:[".js",".es6",".mjs",".cjs",".pac"],markdownLanguageIds:["javascript","js"],blockComment:["/*","*/"]},javascriptreact:{lineComment:{start:"//"},aliases:["JavaScript JSX","JavaScript React","jsx"],extensions:[".jsx"],markdownLanguageIds:["jsx"]},json:{extensions:[".json"],lineComment:{start:"//"},blockComment:["/*","*/"]},jsonc:{lineComment:{start:"//"}},jsx:{lineComment:{start:"//"},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#"},aliases:["Julia","julia"],extensions:[".jl"],markdownLanguageIds:["julia","jl"],blockComment:["#=","=#"]},kotlin:{lineComment:{start:"//"},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%"},aliases:["LaTeX","latex"],extensions:[".tex",".ltx",".ctx"],markdownLanguageIds:["tex"]},less:{lineComment:{start:"//"},aliases:["Less","less"],extensions:[".less"],blockComment:["/*","*/"]},lua:{lineComment:{start:"--"},aliases:["Lua","lua"],extensions:[".lua"],markdownLanguageIds:["lua","pluto"],blockComment:["--[[","]]"]},makefile:{lineComment:{start:"#"},aliases:["Makefile","makefile"],extensions:[".mak",".mk"],markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:""},alternativeLineComments:[{start:"[]: #"}],aliases:["Markdown","markdown"],extensions:[".md",".mkd",".mdwn",".mdown",".markdown",".markdn",".mdtxt",".mdtext",".workbook"],markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//"},aliases:["Objective-C"],extensions:[".m"],markdownLanguageIds:["objectivec","mm","objc","obj-c"],blockComment:["/*","*/"]},"objective-cpp":{lineComment:{start:"//"},aliases:["Objective-C++"],extensions:[".mm"],markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#"},aliases:["Perl","perl"],extensions:[".pl",".pm",".pod",".t",".PL",".psgi"],markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//"},aliases:["PHP","php"],extensions:[".php",".php4",".php5",".phtml",".ctp"],blockComment:["/*","*/"]},powershell:{lineComment:{start:"#"},aliases:["PowerShell","powershell","ps","ps1"],extensions:[".ps1",".psm1",".psd1",".pssc",".psrc"],markdownLanguageIds:["powershell","ps","ps1"],blockComment:["<#","#>"]},pug:{lineComment:{start:"//"}},python:{lineComment:{start:"#"},aliases:["Python","py"],extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi",".pyi",".ipy",".pyt"],markdownLanguageIds:["python","py","gyp"],blockComment:['"""','"""']},ql:{lineComment:{start:"//"}},r:{lineComment:{start:"#"},aliases:["R","r"],extensions:[".r",".rhistory",".rprofile",".rt"]},razor:{lineComment:{start:""},aliases:["Razor","razor"],extensions:[".cshtml",".razor"],markdownLanguageIds:["cshtml","razor","razor-cshtml"],blockComment:[""]},ruby:{lineComment:{start:"#"},aliases:["Ruby","rb"],extensions:[".rb",".rbx",".rjs",".gemspec",".rake",".ru",".erb",".podspec",".rbi"],markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"],blockComment:["=begin","=end"]},rust:{lineComment:{start:"//"},aliases:["Rust","rust"],extensions:[".rs"],markdownLanguageIds:["rust","rs"],blockComment:["/*","*/"]},sass:{lineComment:{start:"//"}},scala:{lineComment:{start:"//"}},scss:{lineComment:{start:"//"},aliases:["SCSS","scss"],extensions:[".scss"],blockComment:["/*","*/"]},shellscript:{lineComment:{start:"#"},aliases:["Shell Script","shellscript","bash","fish","sh","zsh","ksh","csh"],extensions:[".sh",".bash",".bashrc",".bash_aliases",".bash_profile",".bash_login",".ebuild",".profile",".bash_logout",".xprofile",".xsession",".xsessionrc",".Xsession",".zsh",".zshrc",".zprofile",".zlogin",".zlogout",".zshenv",".zsh-theme",".fish",".ksh",".csh",".cshrc",".tcshrc",".yashrc",".yash_profile"],markdownLanguageIds:["bash","sh","zsh"]},slim:{lineComment:{start:"/"}},solidity:{lineComment:{start:"//"},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--"},aliases:["SQL"],extensions:[".sql",".dsql"],blockComment:["/*","*/"]},stylus:{lineComment:{start:"//"}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//"},aliases:["Swift","swift"],extensions:[".swift"],blockComment:["/*","*/"]},terraform:{lineComment:{start:"#"}},tex:{lineComment:{start:"%"},aliases:["TeX","tex"],extensions:[".sty",".cls",".bbx",".cbx"]},typescript:{lineComment:{start:"//"},aliases:["TypeScript","ts","typescript"],extensions:[".ts",".cts",".mts"],markdownLanguageIds:["typescript","ts"],blockComment:["/*","*/"]},typescriptreact:{lineComment:{start:"//"},aliases:["TypeScript JSX","TypeScript React","tsx"],extensions:[".tsx"],markdownLanguageIds:["tsx"],blockComment:["/*","*/"]},vb:{lineComment:{start:"'"},aliases:["Visual Basic","vb"],extensions:[".vb",".brs",".vbs",".bas",".vba"],markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//"}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//"},extensions:[".vue"]},xml:{lineComment:{start:""},aliases:["XML","xml"],extensions:[".xml",".xsd",".ascx",".atom",".axml",".axaml",".bpmn",".cpt",".csl",".csproj",".csproj.user",".dita",".ditamap",".dtd",".ent",".mod",".dtml",".fsproj",".fxml",".iml",".isml",".jmx",".launch",".menu",".mxml",".nuspec",".opml",".owl",".proj",".props",".pt",".publishsettings",".pubxml",".pubxml.user",".rbxlx",".rbxmx",".rdf",".rng",".rss",".shproj",".storyboard",".svg",".targets",".tld",".tmx",".vbproj",".vbproj.user",".vcxproj",".vcxproj.filters",".wsdl",".wxi",".wxl",".wxs",".xaml",".xbl",".xib",".xlf",".xliff",".xpdl",".xul",".xoml"],blockComment:[""]},xsl:{lineComment:{start:""},aliases:["XSL","xsl"],extensions:[".xsl",".xslt"]},yaml:{lineComment:{start:"#"},markdownLanguageIds:["yaml","yml"]}});UQ.wellKnownLanguages=new Map(Object.entries(NCa).map(([t,e])=>[t,{languageId:t,...e}]));function zai(t){return ahr(typeof t=="string"?t:typeof t>"u"?"plaintext":t.languageId)}a(zai,"getLanguage");function ahr(t){return UQ.wellKnownLanguages.get(t.toLowerCase())??{languageId:t,lineComment:{start:"//"}}}a(ahr,"_getLanguage");function DCa(t){let e=(0,kCa.extname)(t).toLowerCase();for(let r of UQ.wellKnownLanguages.values())if(r.extensions?.includes(e))return r;return zai("plaintext")}a(DCa,"getLanguageForResource")});var Jai=T(QQ=>{"use strict";f();Object.defineProperty(QQ,"__esModule",{value:!0});QQ.AlternativeTextNotebookContentProvider=void 0;QQ.generateCellTextMarker=dhr;QQ.lineMightHaveCellMarker=fhr;QQ.getBlockComment=pfe;QQ.getLineCommentStart=hfe;var uhr=chr(),MCa=Klt(),OCa=wF(),ffe=Lp(),BCa=Glt(),LCa=Ylt(),X0=v2e();function dhr(t,e){let r=t.id?`[id=${t.id}] `:"";return`${e}%% vscode.cell ${r}[language=${t.language}]`}a(dhr,"generateCellTextMarker");function fhr(t){return t.toLowerCase().includes("vscode.cell")}a(fhr,"lineMightHaveCellMarker");var Xlt=class extends LCa.AlternativeNotebookDocument{static{a(this,"AlternativeTextDocument")}constructor(e,r,n){super(e,n),this.cellOffsetMap=r}fromCellPosition(e,r){let n=(0,X0.summarize)(e),o=hfe(this.notebook),s=dhr(n,o),c=e.document.eol===ffe.EndOfLine.LF?1:2,l=pfe(this.notebook),u=this.getText(),d=e.document.offsetAt(r),p=e.kind===ffe.NotebookCellKind.Markup?l[0].length+c:0,h=u.indexOf(s)+s.length+c+p+d;return this.positionAt(h)}toCellPosition(e){let r=this.offsetAt(e),n=(0,OCa.findLast)(this.cellOffsetMap,s=>s.sourceOffset<=r);if(!n)return;let o=n.cell.document.positionAt(r-n.sourceOffset);return{cell:n.cell,position:o}}},lhr=class extends BCa.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeTextNotebookContentProvider")}constructor(){super("text")}stripCellMarkers(e){let r=e.split(X0.EOL);return r.length&&fhr(r[0])?(r.shift(),r.join(X0.EOL)):e}getSummaryOfStructure(e,r,n){let o=pfe(e),s=hfe(e),c=`${s} ${n}`,l=[];return e.getCells().forEach(u=>{if(r.includes(u)){let d=(0,X0.summarize)(u);d.source.length&&d.source[0].trim().length?d.source=[d.source[0],c]:d.source.length&&d.source.some(p=>p.trim().length)?d.source=[c,d.source.filter(p=>p.trim().length)[0],c]:d.source=[c],l.push(Yai(d,s,o).content)}else(!l.length||l[l.length-1]!==c)&&l.push(c)}),l.join(X0.EOL)}async*parseAlternateContent(e,r,n){let o=!(0,MCa.isUri)(e),s=o?(0,X0.getCellIdMap)(e):new Map,c=!1,l=!1,u=!1,d=!1,p=-1,h=hfe(o?e:void 0),m=pfe(o?e:void 0),g=o?(0,uhr.getLanguage)((0,X0.getDefaultLanguage)(e)).languageId:void 0,A=new Set;for await(let y of r){if(n.isCancellationRequested)break;let E=y.value,_=E.startsWith(`${h}%% [`)&&E.trimEnd().endsWith("]"),v=E.startsWith(`${h}%% vscode.cell`),b=v||_?Kai(E,g):void 0;if((v||_)&&b?.language){u&&(u=!1);let I={index:-1,uri:void 0,language:void 0,kind:ffe.NotebookCellKind.Code,emitted:!1,type:"start"};I.index=p+=1,I.emitted=!1,b.id&&s.get(b.id)?.document.languageId===b.language?A.has(b.id)?b.id="":A.add(b.id):b.id="";let x=s.get(b.id);I.id=b.id,I.language=b.language,I.uri=x?.document.uri,I.kind=x?.kind||(I.language==="markdown"?ffe.NotebookCellKind.Markup:ffe.NotebookCellKind.Code),c=I.language==="markdown",l=!1,d&&(yield{index:p-1,type:"end"}),d=!0,yield I;continue}d&&(c?l?E===m[1]?(l=!1,u=!0):yield{index:p,line:E,type:"line"}:E===m[0]?l=!0:yield{index:p,line:E,type:"line"}:yield{index:p,line:E,type:"line"})}d&&(yield{index:p,type:"end"})}getAlternativeDocumentFromText(e,r){let n=pfe(r),o=hfe(r),s=(0,X0.getCellIdMap)(r),c=[],l=e.split(X0.EOL),u=0;for(let d=0;dy.document.languageId===g.language&&!c.some(E=>E.cell===y));if(A){let y=u,E=X0.EOL.length,_=g.language==="markdown",v=y+p.length+E+(_?n[0].length+E:0);c.push({offset:y,sourceOffset:v,cell:A})}}}u+=p.length+X0.EOL.length}return new Xlt(e,c,r)}getAlternativeDocument(e,r){let n=e.getCells().filter(d=>r?d.kind!==ffe.NotebookCellKind.Markup:!0).map(d=>(0,X0.summarize)(d)),o=pfe(e),s=hfe(e),c=n.map(d=>({...Yai(d,s,o),cell:e.cellAt(d.index)})),l=c.map(d=>d.content).join(X0.EOL),u=c.map(d=>{let p=l.indexOf(d.content),h=p+d.prefix.length;return{offset:p,sourceOffset:h,cell:e.cellAt(d.cell.index)}});return new Xlt(l,u,e)}};QQ.AlternativeTextNotebookContentProvider=lhr;function Yai(t,e,r){let n=dhr(t,e),o=t.source.join(X0.EOL),s=t.language==="markdown"?`${n}${X0.EOL}${r[0]}${X0.EOL}`:`${n}${X0.EOL}`;return{content:t.language==="markdown"?`${s}${o}${X0.EOL}${r[1]}`:`${s}${o}`,prefix:s}}a(Yai,"generateAlternativeCellTextContent");function pfe(t){return t?(0,uhr.getLanguage)((0,X0.getDefaultLanguage)(t)).blockComment??["```","```"]:['"""','"""']}a(pfe,"getBlockComment");function hfe(t){return t&&(0,uhr.getLanguage)((0,X0.getDefaultLanguage)(t)).lineComment.start||"#"}a(hfe,"getLineCommentStart");function Kai(t,e){let r=t.match(/\[id=(.+?)\]/),n=t.match(/\[language=(.+?)\]/);return n?{id:r?r[1].trim():"",language:n[1].trim()}:fhr(t)&&typeof e=="string"?{id:r?r[1].trim():"",language:e}:void 0}a(Kai,"extractCellParts")});var eci=T(I2e=>{"use strict";f();Object.defineProperty(I2e,"__esModule",{value:!0});I2e.AlternativeXmlNotebookContentProvider=void 0;I2e.isXmlContent=Zai;var FCa=chr(),UCa=Klt(),QCa=wF(),T2e=Lp(),qCa=Glt(),GCa=Ylt(),RA=v2e(),S2e="`}a(phr,"generateCellMarker");function Zai(t){return t.includes(S2e)||t.includes(qQ)||t.includes(Zlt)}a(Zai,"isXmlContent");var eut=class extends GCa.AlternativeNotebookDocument{static{a(this,"AlternativeXmlDocument")}constructor(e,r,n){super(e,n),this.cellOffsetMap=r}fromCellPosition(e,r){let n=(0,RA.summarize)(e),o=phr(n),s=e.document.eol===T2e.EndOfLine.LF?1:2,c=this.getText(),l=e.document.offsetAt(r),u=c.indexOf(o)+o.length+s+l;return this.positionAt(u)}toCellPosition(e){let r=this.offsetAt(e),n=(0,QCa.findLast)(this.cellOffsetMap,s=>s.offset<=r);if(!n)return;let o=n.cell.document.positionAt(r-n.offset);return{cell:n.cell,position:o}}},hhr=class extends qCa.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeXmlNotebookContentProvider")}constructor(){super("xml")}stripCellMarkers(e){let r=e.split(RA.EOL);return r.length&&(r[0].startsWith(S2e)||r[0].startsWith(Zlt))&&r.shift(),r.length&&r[r.length-1].trim().endsWith(qQ)&&(r[r.length-1]=r[r.length-1].substring(0,r[r.length-1].lastIndexOf(qQ))),r.join(RA.EOL)}getSummaryOfStructure(e,r,n){let o=[],s=`// ${n}`;return e.getCells().forEach(c=>{if(r.includes(c)){let l=(0,RA.summarize)(c);o.push(phr(l)),l.source.length&&l.source[0].trim().length?(o.push(l.source[0]),o.push(s)):l.source.length&&l.source.some(u=>u.trim().length)?l.source=[s,l.source.filter(u=>u.trim().length)[0],s]:o.push(s),o.push(qQ)}else(!o.length||o[o.length-1]!==s)&&o.push(s)}),o.join(RA.EOL)}async*parseAlternateContent(e,r,n){let o=!(0,UCa.isUri)(e),s=o?(0,RA.getCellIdMap)(e):new Map,c=-1,l=!1,u=new Set,d=!1,p,h=o?(0,FCa.getLanguage)((0,RA.getDefaultLanguage)(e)).languageId:void 0;for await(let m of r){if(n.isCancellationRequested)break;let g=m.value;if((g.startsWith(S2e)||g.startsWith(Zlt))&&(c<0||l||d&&p)){!l&&d&&p&&(p.line=p.line.substring(0,p.line.lastIndexOf(qQ)),yield p,yield{type:"end",index:p.index}),d=!1,p=void 0,c+=1,l=!1;let A={type:"start",index:c,uri:void 0,language:void 0,kind:T2e.NotebookCellKind.Code},y=Xai(g,h);y.id&&s.get(y.id)?.document.languageId===y.language?u.has(y.id)?y.id="":u.add(y.id):y.id="";let E=s.get(y.id)?.document.languageId===y.language?s.get(y.id):void 0;A.id=y.id,A.language=y.language,A.uri=E?.document.uri,A.kind=E?.kind||(A.language==="markdown"?T2e.NotebookCellKind.Markup:T2e.NotebookCellKind.Code),yield A}else g.startsWith(qQ)?(d&&p&&(yield p),l=!0,d=!1,p=void 0,yield{type:"end",index:c}):c>=0&&(d&&p&&(yield p,p=void 0),d=g.endsWith(qQ),d?p={type:"line",index:c,line:g}:yield{type:"line",index:c,line:g})}}getAlternativeDocumentFromText(e,r){let n=(0,RA.getCellIdMap)(r),o=[],s=e.split(RA.EOL),c=0;for(let l=0;lh.document.languageId===d.language&&!o.some(m=>m.cell===h));if(p){let h=RA.EOL.length,m=c+u.length+h;o.push({offset:m,cell:p})}}c+=u.length+RA.EOL.length}return new eut(e,o,r)}getAlternativeDocument(e,r){let o=e.getCells().filter(l=>r?l.kind!==T2e.NotebookCellKind.Markup:!0).map(l=>(0,RA.summarize)(l)).map(l=>{let d=`${phr(l)}${RA.EOL}`;return{content:`${d}${l.source.join(RA.EOL)}${RA.EOL}${qQ}`,prefix:d,cell:e.cellAt(l.index)}}),s=o.map(l=>l.content).join(RA.EOL),c=o.map(l=>({offset:s.indexOf(l.content)+l.prefix.length,cell:l.cell}));return new eut(s,c,e)}};I2e.AlternativeXmlNotebookContentProvider=hhr;function Xai(t,e){let r=t.match(/id="([^"]+)"/),n=t.match(/language="([^"]+)"/);if(!n){if(Zai(t)&&typeof e=="string")return{id:r?r[1].trim():"",language:e};throw new Error(`Invalid cell part in ${t}`)}return{id:r?r[1].trim():"",language:n[1].trim()}}a(Xai,"extractCellParts")});var oci=T(N_=>{"use strict";f();var jCa=N_&&N_.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},tci=N_&&N_.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(N_,"__esModule",{value:!0});N_.AlternativeNotebookContentService=N_.IAlternativeNotebookContentService=void 0;N_.getAlternativeNotebookDocumentProvider=ghr;N_.inferAlternativeNotebookContentFormat=JCa;N_.getAltNotebookRange=XCa;var $Ca=wct(),VCa=qr(),WCa=Lp(),rci=fc(),zCa=alt(),YCa=gd(),nci=Wai(),KCa=Jai(),ici=eci();function ghr(t){switch(t){case"xml":return new ici.AlternativeXmlNotebookContentProvider;case"text":return new KCa.AlternativeTextNotebookContentProvider;case"json":return new nci.AlternativeJsonNotebookContentProvider;default:throw new Error(`Unsupported kind '${t}'`)}}a(ghr,"getAlternativeNotebookDocumentProvider");function JCa(t){return(0,ici.isXmlContent)(t)?"xml":(0,nci.isJsonContent)(t)?"json":"text"}a(JCa,"inferAlternativeNotebookContentFormat");N_.IAlternativeNotebookContentService=(0,VCa.createServiceIdentifier)("IAlternativeNotebookContentService");var mhr=class{static{a(this,"AlternativeNotebookContentService")}constructor(e,r){this.configurationService=e,this.experimentationService=r}getFormat(e){return e&&(0,zCa.modelPrefersJsonNotebookRepresentation)(e)?"json":this.configurationService.getExperimentBasedConfig(rci.ConfigKey.Advanced.NotebookAlternativeDocumentFormat,this.experimentationService)}create(e){return ghr(e)}};N_.AlternativeNotebookContentService=mhr;N_.AlternativeNotebookContentService=mhr=jCa([tci(0,rci.IConfigurationService),tci(1,YCa.IExperimentationService)],mhr);function XCa(t,e,r,n){let o=(0,$Ca.findCell)(e,r);if(!o)return;let s=ghr(n).getAlternativeDocument(r);return new WCa.Range(s.fromCellPosition(o,t.start),s.fromCellPosition(o,t.end))}a(XCa,"getAltNotebookRange")});var aci=T(x2e=>{"use strict";f();Object.defineProperty(x2e,"__esModule",{value:!0});x2e.NotebookDocumentSnapshot=void 0;x2e.isNotebookDocumentSnapshotJSON=t_a;var tut=sv(),ZCa=Ru(),Ahr=Lp(),sci=oci(),e_a=v2e();function t_a(t){return!t||typeof t!="object"?!1:t.type==="notebook"&&(0,ZCa.isUriComponents)(t.uri)&&(0,tut.isString)(t._text)&&(0,tut.isString)(t.languageId)&&(0,tut.isNumber)(t.version)&&(0,tut.isString)(t.alternativeFormat)}a(t_a,"isNotebookDocumentSnapshotJSON");var yhr=class t{static{a(this,"NotebookDocumentSnapshot")}static create(e,r){let n=e.uri,o=e.version,s=(0,sci.getAlternativeNotebookDocumentProvider)(r).getAlternativeDocument(e);return new t(e,n,o,r,s)}static fromNewText(e,r){let n=(0,sci.getAlternativeNotebookDocumentProvider)(r.alternativeFormat).getAlternativeDocumentFromText(e,r.document);return new t(r.document,r.uri,r.version,r.alternativeFormat,n)}static fromJSON(e,r){return t.create(e,r.alternativeFormat)}constructor(e,r,n,o,s){this.alternativeFormat=o,this._alternativeDocument=s,this.type="notebook",this.document=e,this.uri=r,this.version=n,this.languageId=o==="text"?(0,e_a.getDefaultLanguage)(e)||"python":o}getText(e){return this._alternativeDocument.getText(e)}getSelection(){return new Ahr.Selection(0,0,this.lineCount,0)}getWholeRange(){return new Ahr.Range(0,0,this.lineCount,0)}get lines(){return this._alternativeDocument.lines}get lineCount(){return this._alternativeDocument.lineCount}lineAt(e){let r;if(e instanceof Ahr.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return this._alternativeDocument.lineAt(r)}offsetAt(e){return this._alternativeDocument.offsetAt(e)}positionAt(e){return this._alternativeDocument.positionAt(e)}validateRange(e){return this._alternativeDocument.validateRange(e)}validatePosition(e){return this._alternativeDocument.validatePosition(e)}toJSON(){return{type:"notebook",uri:this.uri.toJSON(),languageId:this.languageId,version:this.version,_text:this._alternativeDocument.getText(),alternativeFormat:this.alternativeFormat}}};x2e.NotebookDocumentSnapshot=yhr});var Chr=T(aE=>{"use strict";f();var r_a=aE&&aE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),n_a=aE&&aE.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),i_a=aE&&aE.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o"u"&&(r=this.getWorkspaceFolders().length>1);let c=(0,cci.relativePath)(s,n);return r&&(c=`${this.getWorkspaceFolderName(s)}/${c}`),c}async openTextDocumentAndSnapshot(e){let r=await this.openTextDocument(e);return d_a.TextDocumentSnapshot.create(r)}async openNotebookDocumentAndSnapshot(e,r){let n=(0,o_a.findNotebook)(e,this.notebookDocuments)||await this.openNotebookDocument(e);return u_a.NotebookDocumentSnapshot.create(n,r)}getWorkspaceFolder(e){return this.getWorkspaceFolders().find(r=>cci.extUriBiasedIgnorePathCase.isEqualOrParent(e,r))}};aE.AbstractWorkspaceService=rut;function f_a(t,e){let r=t.getWorkspaceFolder(e);return r?c_a.posix.relative(r.path,e.path):e.path}a(f_a,"getWorkspaceFileDisplayPath");var Ehr=class extends rut{static{a(this,"NullWorkspaceService")}constructor(e=[],r=[],n=[]){super(),this.disposables=new a_a.DisposableStore,this.didOpenTextDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didCloseTextDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didOpenNotebookDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didCloseNotebookDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didChangeTextDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didChangeWorkspaceFoldersEmitter=this.disposables.add(new GQ.Emitter),this.didChangeNotebookDocumentEmitter=this.disposables.add(new GQ.Emitter),this.didChangeTextEditorSelectionEmitter=this.disposables.add(new GQ.Emitter),this.onDidChangeTextDocument=this.didChangeTextDocumentEmitter.event,this.onDidCloseTextDocument=this.didCloseTextDocumentEmitter.event,this.onDidOpenNotebookDocument=this.didOpenNotebookDocumentEmitter.event,this.onDidCloseNotebookDocument=this.didCloseNotebookDocumentEmitter.event,this.onDidOpenTextDocument=this.didOpenTextDocumentEmitter.event,this.onDidChangeWorkspaceFolders=this.didChangeWorkspaceFoldersEmitter.event,this.onDidChangeNotebookDocument=this.didChangeNotebookDocumentEmitter.event,this.onDidChangeTextEditorSelection=this.didChangeTextEditorSelectionEmitter.event,this._textDocuments=[],this._notebookDocuments=[],this.workspaceFolder=e,this._textDocuments=r,this._notebookDocuments=n}get textDocuments(){return this._textDocuments}showTextDocument(e){return Promise.resolve()}async openTextDocument(e){let r=this.textDocuments.find(n=>n.uri.toString()===e.toString());if(r)return r;throw new Error(`Unknown document: ${e}`)}async openNotebookDocument(e,r){if(typeof e=="string")throw new Error("Not implemented");{let n=this.notebookDocuments.find(o=>o.uri.toString()===e.toString());if(n)return n;throw new Error(`Unknown notebook: ${e}`)}}get notebookDocuments(){return this._notebookDocuments}getWorkspaceFolders(){return this.workspaceFolder}getWorkspaceFolderName(e){return"default"}ensureWorkspaceIsFullyLoaded(){return Promise.resolve()}showWorkspaceFolderPicker(){return Promise.resolve(void 0)}applyEdit(){return Promise.resolve(!0)}dispose(){this.disposables.dispose()}requestResourceTrust(e){return Promise.resolve(!0)}requestWorkspaceTrust(e){return Promise.resolve(!0)}};aE.NullWorkspaceService=Ehr});var Thr=T(GJ=>{"use strict";f();Object.defineProperty(GJ,"__esModule",{value:!0});GJ.BatchedProcessor=GJ.TaskQueue=void 0;GJ.raceFilter=p_a;var _hr=wc(),lci=es(),vhr=class{static{a(this,"TaskQueue")}constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){let r=new _hr.DeferredPromise;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),r.p}scheduleSkipIfCleared(e){let r=new _hr.DeferredPromise;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!0}),this._runIfNotRunning(),r.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingTasks.length===0)return;let e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new lci.BugIndicatingError;this._runningTask=e.task;try{let r=await e.task();e.deferred.complete(r)}catch(r){e.deferred.error(r)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){let e=this._pendingTasks;this._pendingTasks=[];for(let r of e)r.setUndefinedWhenCleared?r.deferred.complete(void 0):r.deferred.error(new lci.CancellationError)}};GJ.TaskQueue=vhr;var bhr=class{static{a(this,"BatchedProcessor")}constructor(e,r){this._fn=e,this._waitingTimeMs=r,this._queue=[],this._timeout=null}request(e){this._timeout===null&&(this._timeout=setTimeout(()=>this._flush(),this._waitingTimeMs));let r=new _hr.DeferredPromise;return this._queue.push({arg:e,promise:r}),r.p}async _flush(){let e=this._queue;this._queue=[],this._timeout=null;let r=e.map(o=>o.arg),n;try{n=await this._fn(r)}catch(o){for(let s of e)s.promise.error(o);return}for(let[o,s]of n.entries())e[o].promise.complete(s)}};GJ.BatchedProcessor=bhr;function p_a(t,e){return new Promise((r,n)=>{if(t.length===0){r(void 0);return}let o=!1,s=t.length;for(let c of t)c.then(l=>{s--,o||(e(l)?(o=!0,r(l)):s===0&&r(void 0))}).catch(n)})}a(p_a,"raceFilter")});var Shr=T(mfe=>{"use strict";f();Object.defineProperty(mfe,"__esModule",{value:!0});mfe.AsyncIterUtilsExt=mfe.AsyncIterUtils=void 0;var uci;(function(t){async function*e(d,p){for await(let h of d)yield p(h)}a(e,"map"),t.map=e;async function*r(d,p,h){let m=d[Symbol.asyncIterator](),g;for(;!(g=await m.next()).done;)yield p(g.value);return h(g.value)}a(r,"mapWithReturn"),t.mapWithReturn=r;async function*n(d,p){for await(let h of d)p(h)&&(yield h)}a(n,"filter"),t.filter=n;async function o(d){let p=[];for await(let h of d)p.push(h);return p}a(o,"toArray"),t.toArray=o;async function*s(d){for(let p of d)yield p}a(s,"fromArray"),t.fromArray=s;async function*c(d,p){for(let h of d)yield h;return p}a(c,"fromArrayWithReturn"),t.fromArrayWithReturn=c;async function l(d){let p=d[Symbol.asyncIterator](),h=[],m;for(;!(m=await p.next()).done;)h.push(m.value);return[h,m.value]}a(l,"toArrayWithReturn"),t.toArrayWithReturn=l;async function u(d){let p=d[Symbol.asyncIterator](),h;do h=await p.next();while(!h.done);return h.value}a(u,"drainUntilReturn"),t.drainUntilReturn=u})(uci||(mfe.AsyncIterUtils=uci={}));var dci;(function(t){async function*e(r){let n=null;for await(let o of r){n??="",n+=o;let s=n.split(/\r?\n/);n=s.pop()??"",yield*s}n!==null&&(yield n)}a(e,"splitLines"),t.splitLines=e})(dci||(mfe.AsyncIterUtilsExt=dci={}))});var pci=T(Ab=>{"use strict";f();Object.defineProperty(Ab,"__esModule",{value:!0});Ab.LineWithTokens=Ab.Token=void 0;Ab.getOrDeduceSelectionFromLastEdit=m_a;Ab.clipTokensToRange=fci;Ab.clipTokensToRangeAndAdjustOffsets=A_a;Ab.removeTokensInRangeAndAdjustOffsets=y_a;Ab.getTokensFromLogProbs=E_a;Ab.getTokensFromLinesWithTokens=C_a;Ab.mergeOffsetRangesAtDistance=__a;var h_a=es(),gfe=Fu();function m_a(t){let e=new gfe.OffsetRange(0,0);return t.lastSelectionInAfterEdit&&!t.lastSelectionInAfterEdit.equals(e)?t.documentAfterEdits.getTransformer().getRange(t.lastSelectionInAfterEdit):g_a(t)}a(m_a,"getOrDeduceSelectionFromLastEdit");function g_a(t){let e=t.recentEdits.edits.at(-1);if(e===void 0)return null;let r=e.replacements.at(-1);if(r===void 0)return null;let n=r.replaceRange,s=r.newText.length-n.length,c=n.endExclusive+s;return t.documentAfterEdits.getTransformer().getRange(new gfe.OffsetRange(c,c))}a(g_a,"deduceSelectionFromLastEdit");var nut=class t{static{a(this,"Token")}get id(){return this.text+"_"+this.range.toString()}constructor(e,r,n){this.text=e,this.value=r,this.range=new gfe.OffsetRange(n,n+e.length)}equals(e){return this.range.equals(e.range)&&this.text===e.text}deltaOffset(e){return new t(this.text,this.value,this.range.start+e)}};Ab.Token=nut;function fci(t,e){return t.filter(r=>e.intersects(r.range))}a(fci,"clipTokensToRange");function A_a(t,e){return fci(t,e).map(r=>r.deltaOffset(-e.start))}a(A_a,"clipTokensToRangeAndAdjustOffsets");function y_a(t,e){let r=[];for(let n of t)e.containsRange(n.range)||(n.range.start>e.start&&(n=n.deltaOffset(-e.length)),r.push(n));return r}a(y_a,"removeTokensInRangeAndAdjustOffsets");function E_a(t,e){let r=e;return t.content.map(n=>{let o=new nut(n.token,n.logprob,r);return r+=o.range.length,o})}a(E_a,"getTokensFromLogProbs");var Ihr=class t{static{a(this,"LineWithTokens")}static stringEquals(e,r){return e._text===r._text}static fromText(e,r){r=r??[];let n=[];for(;;){let o=e.indexOf(`\r +`;let r=new Uint32Array(this._lines.length);for(let n=0;n=0;n--){let o=r[n],s=this.toRange(o.replaceRange);this._acceptDeleteRange(s),this._acceptInsertText(s.start,o.newText)}}_acceptDeleteRange(e){if(e.start.line===e.end.line){if(e.start.character===e.end.character)return;this._setLineText(e.start.line,this._lines[e.start.line].substring(0,e.start.character)+this._lines[e.start.line].substring(e.end.character));return}this._setLineText(e.start.line,this._lines[e.start.line].substring(0,e.start.character)+this._lines[e.end.line].substring(e.end.character)),this._lines.splice(e.start.line+1,e.end.line-e.start.line),this._lineStarts.removeValues(e.start.line+1,e.end.line-e.start.line)}_acceptInsertText(e,r){if(r.length===0)return;let n=(0,Mci.splitLines)(r);if(n.length===1){this._setLineText(e.line,this._lines[e.line].substring(0,e.character)+n[0]+this._lines[e.line].substring(e.character));return}n[n.length-1]+=this._lines[e.line].substring(e.character),this._setLineText(e.line,this._lines[e.line].substring(0,e.character)+n[0]);let o=new Uint32Array(n.length-1);for(let s=1;snew WK.TextEdit(this.validateRange(n.range),n.newText));return new Oci.StringEdit(r.map(n=>new Oci.StringReplacement(this.toOffsetRange(n.range),n.newText)))}toTextEdits(e){return e.replacements.map(r=>new WK.TextEdit(this.toRange(r.replaceRange),r.newText))}validatePosition(e){if(!(e instanceof WK.Position))throw new Error("Invalid argument");if(this._lines.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this._lines.length)r=this._lines.length-1,n=this._lines[r].length,o=!0;else{let s=this._lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new WK.Position(r,n):e}validateRange(e){return new WK.Range(this.validatePosition(e.start),this.validatePosition(e.end))}};Xct.PositionOffsetTransformer=Ahr});var _hr=T(zK=>{"use strict";f();Object.defineProperty(zK,"__esModule",{value:!0});zK.SnapshotDocumentLine=zK.TextDocumentSnapshot=void 0;zK.isTextDocumentSnapshotJSON=c1a;var Zct=W1(),Lci=Eu(),Bci=hhr(),bde=kp(),a1a=yhr();function c1a(t){return!t||typeof t!="object"?!1:(0,Lci.isUriComponents)(t.uri)&&(0,Zct.isString)(t._text)&&(0,Zct.isString)(t.languageId)&&(0,Zct.isNumber)(t.version)&&(0,Zct.isNumber)(t.eol)}a(c1a,"isTextDocumentSnapshotJSON");var Ehr=class t{static{a(this,"TextDocumentSnapshot")}static create(e){return new t(e,e.uri,e.getText(),e.languageId,e.eol,e.version)}static fromNewText(e,r){return new t(r instanceof t?r.document:r,r.uri,e,r.languageId,r.eol,r.version+1)}static fromJSON(e,r){return new t(e,Lci.URI.from(r.uri),r._text,r.languageId,r.eol,r.version)}get transformer(){return this._transformer||(this._transformer=new a1a.PositionOffsetTransformer(this._text)),this._transformer}get fileName(){return this.uri.fsPath}get isUntitled(){return this.uri.scheme==="untitled"}get lineCount(){return this.lines.length}get lines(){return this._lines||(this._lines=this._text.split(/\r\n|\r|\n/g)),this._lines}constructor(e,r,n,o,s,c){this._transformer=null,this._lines=null,this.document=e,this.uri=r,this._text=n,this.languageId=o,this.eol=s,this.version=c}lineAt(e){let r;if(e instanceof bde.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return new elt(r,this.lines[r],r===this.lines.length-1)}offsetAt(e){return this.version===this.document.version?this.document.offsetAt(e):(e=this.validatePosition(e),this.transformer.getOffset(e))}positionAt(e){return this.version===this.document.version?this.document.positionAt(e):(e=Math.floor(e),e=Math.max(0,e),this.transformer.getPosition(e))}getText(e){return e?this._getTextInRange(e):this._text}_getTextInRange(e){if(this.version===this.document.version)return this.document.getText(e);let r=this.validateRange(e);if(r.isEmpty)return"";let n=this.transformer.toOffsetRange(r);return this._text.substring(n.start,n.endExclusive)}getWordRangeAtPosition(e){let r=this.validatePosition(e),n=(0,Bci.getWordAtText)(r.character+1,Bci.DEFAULT_WORD_REGEXP,this.lines[r.line],0);if(n)return new bde.Range(r.line,n.startColumn-1,r.line,n.endColumn-1)}validateRange(e){let r=this.validatePosition(e.start),n=this.validatePosition(e.end);return r===e.start&&n===e.end?e:new bde.Range(r.line,r.character,n.line,n.character)}validatePosition(e){if(this._text.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this.lines.length)r=this.lines.length-1,n=this.lines[r].length,o=!0;else{let s=this.lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new bde.Position(r,n):e}toJSON(){return{uri:this.uri.toJSON(),languageId:this.languageId,version:this.version,eol:this.eol,_text:this._text}}};zK.TextDocumentSnapshot=Ehr;var elt=class{static{a(this,"SnapshotDocumentLine")}constructor(e,r,n){this._line=e,this._text=r,this._isLastLine=n}get lineNumber(){return this._line}get text(){return this._text}get range(){return new bde.Range(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:new bde.Range(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}};zK.SnapshotDocumentLine=elt});var nlt=T(rlt=>{"use strict";f();Object.defineProperty(rlt,"__esModule",{value:!0});rlt.AlternativeNotebookDocument=void 0;var Fci=hhr(),tlt=kp(),l1a=yhr(),u1a=_hr(),Chr=class{static{a(this,"AlternativeNotebookDocument")}get transformer(){return this._transformer||(this._transformer=new l1a.PositionOffsetTransformer(this._text)),this._transformer}getText(e){return e?this._getTextInRange(e):this._text}_getTextInRange(e){let r=this.validateRange(e);if(r.isEmpty)return"";let n=this.transformer.toOffsetRange(r);return this._text.substring(n.start,n.endExclusive)}constructor(e,r){this._text=e,this.notebook=r,this._transformer=null,this._lines=null}positionToOffset(e){return e=this.validatePosition(e),this.transformer.getOffset(e)}getWordRangeAtPosition(e){let r=this.validatePosition(e),n=(0,Fci.getWordAtText)(r.character+1,Fci.DEFAULT_WORD_REGEXP,this.lines[r.line],0);if(n)return new tlt.Range(r.line,n.startColumn-1,r.line,n.endColumn-1)}get lines(){return this._lines||(this._lines=this._text.split(/\r\n|\r|\n/g)),this._lines}get lineCount(){return this.lines.length}lineAt(e){let r;if(e instanceof tlt.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return new u1a.SnapshotDocumentLine(r,this.lines[r],r===this.lines.length-1)}offsetAt(e){return this.transformer.getOffset(e)}positionAt(e){return e=Math.floor(e),e=Math.max(0,e),this.transformer.getPosition(e)}validateRange(e){let r=this.validatePosition(e.start),n=this.validatePosition(e.end);return r===e.start&&n===e.end?e:new tlt.Range(r.line,r.character,n.line,n.character)}validatePosition(e){if(this._text.length===0)return e.with(0,0);let{line:r,character:n}=e,o=!1;if(r<0)r=0,n=0,o=!0;else if(r>=this.lines.length)r=this.lines.length-1,n=this.lines[r].length,o=!0;else{let s=this.lines[r].length;n<0?(n=0,o=!0):n>s&&(n=s,o=!0)}return o?new tlt.Position(r,n):e}};rlt.AlternativeNotebookDocument=Chr});var ilt=T(Tde=>{"use strict";f();Object.defineProperty(Tde,"__esModule",{value:!0});Tde.isUri=f1a;Tde.isLocation=vhr;Tde.toLocation=p1a;Tde.isSymbolInformation=h1a;var gRe=kp(),d1a=Eu();function f1a(t){return d1a.URI.isUri(t)}a(f1a,"isUri");function vhr(t){return t&&typeof t=="object"&&"uri"in t&&"range"in t}a(vhr,"isLocation");function p1a(t){if(vhr(t)&&Array.isArray(t.range)&&t.range.length===2){let e=t.range[0],r=t.range[1];return new gRe.Location(t.uri,new gRe.Range(new gRe.Position(e.line,e.character),new gRe.Position(r.line,r.character)))}else if(vhr(t)&&t.range instanceof gRe.Range)return t}a(p1a,"toLocation");function h1a(t){return t&&typeof t=="object"&&"name"in t&&"containerName"in t}a(h1a,"isSymbolInformation")});var ERe=T(Jm=>{"use strict";f();Object.defineProperty(Jm,"__esModule",{value:!0});Jm.CellIdPatternRe=Jm.EOL=Jm.LineOfText=void 0;Jm.summarize=g1a;Jm.notebookCellToCellData=A1a;Jm.getCellIdMap=y1a;Jm.normalizeCellId=E1a;Jm.getNotebookId=_1a;Jm.getCellId=Shr;Jm.getDefaultLanguage=v1a;Jm.requestHasNotebookRefs=T1a;Jm.parseAndCleanStack=S1a;var Uci=ilt(),Hci=X0r(),m1a=m0(),Qci=Eu(),Thr=kp(),bhr=class{static{a(this,"LineOfText")}constructor(e){this.__lineOfTextBrand=void 0,this.value=e.replace(/\r$/,"")}};Jm.LineOfText=bhr;Jm.EOL=` +`;function g1a(t){let e=t.kind===Thr.NotebookCellKind.Code?"code":"markdown",r=Shr(t),n=C1a(t.document);return{cell_type:e,id:r,language:t.document.languageId,source:n,index:t.index}}a(g1a,"summarize");function A1a(t){let e=new Thr.NotebookCellData(t.kind,t.document.getText(),t.document.languageId);return e.metadata=t.metadata,e.executionSummary=t.executionSummary,t.outputs.length&&(e.outputs=[...t.outputs]),e}a(A1a,"notebookCellToCellData");function y1a(t){let e=new Map;return t.getCells().forEach(r=>{e.set(Shr(r),r)}),e}a(y1a,"getCellIdMap");var qci=new WeakMap,yRe=8,ARe="#VSC-";Jm.CellIdPatternRe=new RegExp(`(\\s+|^|\\b|\\W)(#VSC-[a-f0-9]{${yRe}})\\b`,"gi");function E1a(t){return t.startsWith(ARe)?t:t.startsWith("VSC-")?`#${t}`:t.startsWith("#V-")&&t.length===yRe+3?`${ARe}${t.substring(3)}`:t.toLowerCase().startsWith("vscode-")&&t.length===yRe+7?`${ARe}${t.substring(7)}`:t.startsWith("-")?`#VSC${t}`:t.length===yRe?`${ARe}${t}`:t}a(E1a,"normalizeCellId");var Gci=new WeakMap;function _1a(t){let e=Gci.get(t);if(e)return e;let r=new Hci.StringSHA1;return r.update(t.uri.toString()),e=r.digest(),Gci.set(t,e),e}a(_1a,"getNotebookId");function Shr(t){let e=qci.get(t);if(e)return e;let r=new Hci.StringSHA1;return r.update(t.document.uri.toString()),e=`${ARe}${r.digest().substring(0,yRe)}`,qci.set(t,e),e}a(Shr,"getCellId");function C1a(t){return t.lineCount===0?[]:new Array(t.lineCount).fill("").map((e,r)=>t.lineAt(r).text)}a(C1a,"getCellCode");function v1a(t){let e=t.getCells().find(r=>r.kind===Thr.NotebookCellKind.Code);if(e)return e.document.languageId;if(t.notebookType==="jupyter-notebook")return t.metadata?.language_info?.name||t.metadata?.kernelspec?.language||"python"}a(v1a,"getDefaultLanguage");var b1a=["jupyter","notebook","cell.","cells."," cell ","cells","notebook cell"];function T1a(t,e,r){let n=(t.prompt||"").toLowerCase();return r?.checkPromptAsWell&&b1a.some(o=>n.includes(o))?!0:t.references.some(o=>(0,Uci.isLocation)(o.value)?e.hasSupportedNotebooks(o.value.uri):(0,Qci.isUriComponents)(o.value)?e.hasSupportedNotebooks(Qci.URI.revive(o.value)):(0,Uci.isUri)(o.value)?e.hasSupportedNotebooks(o.value):!1)}a(T1a,"requestHasNotebookRefs");function S1a(t){try{let e=JSON.parse(t);return(0,m1a.removeAnsiEscapeCodes)(e?.stack||e.message||"")||e.message||e.name||t}catch{return t}}a(S1a,"parseAndCleanStack")});var Vci=T(_Re=>{"use strict";f();Object.defineProperty(_Re,"__esModule",{value:!0});_Re.AlternativeJsonNotebookContentProvider=void 0;_Re.isJsonContent=P1a;var I1a=(Rci(),Aa(wci)),x1a=vc(),jci=Eu(),JR=kp(),w1a=Kct(),R1a=nlt(),Sde=ERe(),$ci=4;function P1a(t){return!!(t.startsWith("{")||t.trim().startsWith("{")||(t.includes("{")||t.includes("}"))&&t.includes('"source":')&&t.includes('"cell_type":'))}a(P1a,"isJsonContent");var olt=class extends R1a.AlternativeNotebookDocument{static{a(this,"AlternativeJsonDocument")}fromCellPosition(e,r){let n=(0,Sde.getCellId)(e),o=this.getText(),s=" ",c=`"id": "${n}",`,l=o.indexOf('"source": [',o.indexOf(c)),u=this.positionAt(l).line+1,d=e.document.getText(new JR.Range(r.line,0,r.line,r.character)),p=`${s}${JSON.stringify(d).slice(0,-1)}`,h=r.line+u;return new JR.Position(h,p.length)}toCellPosition(e){throw new Error("Method not implemented.")}},Ihr=class extends w1a.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeJsonNotebookContentProvider")}constructor(){super("json")}stripCellMarkers(e){return e}parseAlternateContent(e,r,n){return this.parseAlternateContentImpl(e,r,n)}getAlternativeDocumentFromText(e,r){return new olt(e,r)}getAlternativeDocument(e,r){let o={cells:e.getCells().filter(c=>r?c.kind!==JR.NotebookCellKind.Markup:!0).map(c=>{let l=(0,Sde.summarize)(c),u=k1a(c.document);return{cell_type:l.cell_type,id:l.id,metadata:{language:l.language},source:u}})},s=JSON.stringify(o,void 0,$ci);return new olt(s,e)}getSummaryOfStructure(e,r,n){let o=["{",' "cells: ['],s=`// ${n}`;return e.getCells().forEach(c=>{if(r.includes(c)){let l=(0,Sde.summarize)(c);l.source.length&&l.source[0].trim().length?l.source=[l.source[0],s]:l.source.length&&l.source.some(d=>d.trim().length)?l.source=[s,l.source.filter(d=>d.trim().length)[0],s]:l.source=[s];let u=JSON.stringify(l,void 0,$ci).split(/\r?\n/).map(d=>` ${d}`);o.push(...u),o.push(",")}else(!o.length||o[o.length-1]!==s)&&o.push(s)}),o.push(" ]"),o.push("}"),o.join(Sde.EOL)}parseAlternateContentImpl(e,r,n){return new x1a.AsyncIterableObject(async o=>{let s=jci.URI.isUri(e)?new Map:(0,Sde.getCellIdMap)(e),c=new Set,l="",u=-1,d={index:-1,startOffset:-1,endOffset:-1,kind:JR.NotebookCellKind.Code,source:[]},p=jci.URI.isUri(e)?"python":(0,Sde.getDefaultLanguage)(e),h=a(g=>{d.language=d.language||p,d.id&&s.get(d.id)?.document.languageId===d.language?c.has(d.id)?d.id="":c.add(d.id):d.id="";let A=s.get(d.id);d.uri=A?.document.uri,d.kind=A?.kind||(d.language==="markdown"?JR.NotebookCellKind.Markup:JR.NotebookCellKind.Code),o.emitOne({index:d.index,type:"start",kind:d.kind,language:d.language,uri:d.uri,id:d.id}),d.source.forEach(y=>o.emitOne({index:d.index,type:"line",line:y})),o.emitOne({index:d.index,type:"end"})},"emitCell"),m=0;for await(let g of r){if(n.isCancellationRequested)break;let A=g.value;l+=A,(0,I1a.visit)(l,{onObjectEnd(y,E,_,v){m=y},onLiteralValue:a((y,E,_,v,b,I)=>{if(u>=E)return;let x=I();if(x.length<2||x.shift()!=="cells")return;let w=x.shift();if(typeof w!="number")return;let R=x.shift();if(u=E,d.index!==-1&&d.index!==w&&(h(E),d.startOffset=E,d.id=void 0,d.kind=JR.NotebookCellKind.Code,d.source=[],d.uri=void 0,d.language=void 0),d.index=w,R==="cell_type")d.kind=y==="code"?JR.NotebookCellKind.Code:JR.NotebookCellKind.Markup,d.kind===JR.NotebookCellKind.Markup&&(d.language="markdown");else if(R==="id")d.id=y;else if(R==="metadata"&&x[0]==="id")d.id=y;else if(R==="metadata"&&x[0]==="language")d.language=y,d.language==="markdown"&&(d.kind=JR.NotebookCellKind.Markup);else if(R==="source"&&x.length&&typeof x[0]=="number"){x[0]===0&&(d.startOffset=E);let P=typeof y=="string"?y:`${y||""}`;P.endsWith(` +`)&&(P=P.substr(0,P.length-1)),d.source.push(P)}},"onLiteralValue")})}d.index!==-1&&h(m)})}};_Re.AlternativeJsonNotebookContentProvider=Ihr;function k1a(t){if(t.lineCount===0)return[];if(t.lineCount===1)return[t.lineAt(0).text];let e=t.lineCount;return new Array(e).fill("").map((r,n)=>t.lineAt(n).text)}a(k1a,"getCellCode")});var whr=T(fQ=>{"use strict";f();Object.defineProperty(fQ,"__esModule",{value:!0});fQ.wellKnownLanguages=void 0;fQ.getLanguage=Wci;fQ.getLanguageForResource=M1a;var D1a=fk(),N1a=Object.freeze({abap:{lineComment:{start:"'"},markdownLanguageIds:["abap","sap-abap"]},bat:{lineComment:{start:"REM"},alternativeLineComments:[{start:"::"}],aliases:["Batch","bat"],extensions:[".bat",".cmd"]},bibtex:{lineComment:{start:"%"},aliases:["BibTeX","bibtex"],extensions:[".bib"]},blade:{lineComment:{start:"#"}},c:{lineComment:{start:"//"},aliases:["C","c"],extensions:[".c",".i"],markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";"},aliases:["Clojure","clojure"],extensions:[".clj",".cljs",".cljc",".cljx",".clojure",".edn"],markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//"},aliases:["CoffeeScript","coffeescript","coffee"],extensions:[".coffee",".cson",".iced"],markdownLanguageIds:["coffeescript","coffee","cson","iced"],blockComment:["###","###"]},cpp:{lineComment:{start:"//"},aliases:["C++","Cpp","cpp"],extensions:[".cpp",".cc",".cxx",".c++",".hpp",".hh",".hxx",".h++",".h",".ii",".ino",".inl",".ipp",".ixx",".tpp",".txx",".hpp.in",".h.in"],markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"],blockComment:["/*","*/"]},csharp:{lineComment:{start:"//"},aliases:["C#","csharp"],extensions:[".cs",".csx",".cake"],markdownLanguageIds:["csharp","cs"],blockComment:["/*","*/"]},css:{lineComment:{start:"/*",end:"*/"},aliases:["CSS","css"],extensions:[".css"],blockComment:["/*","*/"]},dart:{lineComment:{start:"//"},aliases:["Dart"],extensions:[".dart"],blockComment:["/*","*/"]},dockerfile:{lineComment:{start:"#"},aliases:["Docker","Dockerfile","Containerfile"],extensions:[".dockerfile",".containerfile"],markdownLanguageIds:["dockerfile","docker"]},elixir:{lineComment:{start:"#"}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%"},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//"},aliases:["F#","FSharp","fsharp"],extensions:[".fs",".fsi",".fsx",".fsscript"],markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"],blockComment:["(*","*)"]},go:{lineComment:{start:"//"},aliases:["Go"],extensions:[".go"],markdownLanguageIds:["go","golang"],blockComment:["/*","*/"]},groovy:{lineComment:{start:"//"},aliases:["Groovy","groovy"],extensions:[".groovy",".gvy",".gradle",".jenkinsfile",".nf"],blockComment:["/*","*/"]},haml:{lineComment:{start:"-#"}},handlebars:{lineComment:{start:"{{!",end:"}}"},extensions:[".hbs",".handlebars"],markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"],blockComment:["{{!--","--}}"]},haskell:{lineComment:{start:"--"},markdownLanguageIds:["haskell","hs"]},html:{lineComment:{start:""},aliases:["HTML","htm","html","xhtml"],extensions:[".html",".htm",".shtml",".xhtml",".xht",".mdoc",".jsp",".asp",".aspx",".jshtm",".volt",".ejs",".rhtml"],markdownLanguageIds:["html","xhtml"],blockComment:[""]},ini:{lineComment:{start:";"},blockComment:[";"," "]},java:{lineComment:{start:"//"},extensions:[".java",".class"],markdownLanguageIds:["java","jsp"],blockComment:["/*","*/"]},javascript:{lineComment:{start:"//"},aliases:["JavaScript","javascript","js"],extensions:[".js",".es6",".mjs",".cjs",".pac"],markdownLanguageIds:["javascript","js"],blockComment:["/*","*/"]},javascriptreact:{lineComment:{start:"//"},aliases:["JavaScript JSX","JavaScript React","jsx"],extensions:[".jsx"],markdownLanguageIds:["jsx"]},json:{extensions:[".json"],lineComment:{start:"//"},blockComment:["/*","*/"]},jsonc:{lineComment:{start:"//"}},jsx:{lineComment:{start:"//"},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#"},aliases:["Julia","julia"],extensions:[".jl"],markdownLanguageIds:["julia","jl"],blockComment:["#=","=#"]},kotlin:{lineComment:{start:"//"},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%"},aliases:["LaTeX","latex"],extensions:[".tex",".ltx",".ctx"],markdownLanguageIds:["tex"]},less:{lineComment:{start:"//"},aliases:["Less","less"],extensions:[".less"],blockComment:["/*","*/"]},lua:{lineComment:{start:"--"},aliases:["Lua","lua"],extensions:[".lua"],markdownLanguageIds:["lua","pluto"],blockComment:["--[[","]]"]},makefile:{lineComment:{start:"#"},aliases:["Makefile","makefile"],extensions:[".mak",".mk"],markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:""},alternativeLineComments:[{start:"[]: #"}],aliases:["Markdown","markdown"],extensions:[".md",".mkd",".mdwn",".mdown",".markdown",".markdn",".mdtxt",".mdtext",".workbook"],markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//"},aliases:["Objective-C"],extensions:[".m"],markdownLanguageIds:["objectivec","mm","objc","obj-c"],blockComment:["/*","*/"]},"objective-cpp":{lineComment:{start:"//"},aliases:["Objective-C++"],extensions:[".mm"],markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#"},aliases:["Perl","perl"],extensions:[".pl",".pm",".pod",".t",".PL",".psgi"],markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//"},aliases:["PHP","php"],extensions:[".php",".php4",".php5",".phtml",".ctp"],blockComment:["/*","*/"]},powershell:{lineComment:{start:"#"},aliases:["PowerShell","powershell","ps","ps1"],extensions:[".ps1",".psm1",".psd1",".pssc",".psrc"],markdownLanguageIds:["powershell","ps","ps1"],blockComment:["<#","#>"]},pug:{lineComment:{start:"//"}},python:{lineComment:{start:"#"},aliases:["Python","py"],extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi",".pyi",".ipy",".pyt"],markdownLanguageIds:["python","py","gyp"],blockComment:['"""','"""']},ql:{lineComment:{start:"//"}},r:{lineComment:{start:"#"},aliases:["R","r"],extensions:[".r",".rhistory",".rprofile",".rt"]},razor:{lineComment:{start:""},aliases:["Razor","razor"],extensions:[".cshtml",".razor"],markdownLanguageIds:["cshtml","razor","razor-cshtml"],blockComment:[""]},ruby:{lineComment:{start:"#"},aliases:["Ruby","rb"],extensions:[".rb",".rbx",".rjs",".gemspec",".rake",".ru",".erb",".podspec",".rbi"],markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"],blockComment:["=begin","=end"]},rust:{lineComment:{start:"//"},aliases:["Rust","rust"],extensions:[".rs"],markdownLanguageIds:["rust","rs"],blockComment:["/*","*/"]},sass:{lineComment:{start:"//"}},scala:{lineComment:{start:"//"}},scss:{lineComment:{start:"//"},aliases:["SCSS","scss"],extensions:[".scss"],blockComment:["/*","*/"]},shellscript:{lineComment:{start:"#"},aliases:["Shell Script","shellscript","bash","fish","sh","zsh","ksh","csh"],extensions:[".sh",".bash",".bashrc",".bash_aliases",".bash_profile",".bash_login",".ebuild",".profile",".bash_logout",".xprofile",".xsession",".xsessionrc",".Xsession",".zsh",".zshrc",".zprofile",".zlogin",".zlogout",".zshenv",".zsh-theme",".fish",".ksh",".csh",".cshrc",".tcshrc",".yashrc",".yash_profile"],markdownLanguageIds:["bash","sh","zsh"]},slim:{lineComment:{start:"/"}},solidity:{lineComment:{start:"//"},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--"},aliases:["SQL"],extensions:[".sql",".dsql"],blockComment:["/*","*/"]},stylus:{lineComment:{start:"//"}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//"},aliases:["Swift","swift"],extensions:[".swift"],blockComment:["/*","*/"]},terraform:{lineComment:{start:"#"}},tex:{lineComment:{start:"%"},aliases:["TeX","tex"],extensions:[".sty",".cls",".bbx",".cbx"]},typescript:{lineComment:{start:"//"},aliases:["TypeScript","ts","typescript"],extensions:[".ts",".cts",".mts"],markdownLanguageIds:["typescript","ts"],blockComment:["/*","*/"]},typescriptreact:{lineComment:{start:"//"},aliases:["TypeScript JSX","TypeScript React","tsx"],extensions:[".tsx"],markdownLanguageIds:["tsx"],blockComment:["/*","*/"]},vb:{lineComment:{start:"'"},aliases:["Visual Basic","vb"],extensions:[".vb",".brs",".vbs",".bas",".vba"],markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//"}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//"},extensions:[".vue"]},xml:{lineComment:{start:""},aliases:["XML","xml"],extensions:[".xml",".xsd",".ascx",".atom",".axml",".axaml",".bpmn",".cpt",".csl",".csproj",".csproj.user",".dita",".ditamap",".dtd",".ent",".mod",".dtml",".fsproj",".fxml",".iml",".isml",".jmx",".launch",".menu",".mxml",".nuspec",".opml",".owl",".proj",".props",".pt",".publishsettings",".pubxml",".pubxml.user",".rbxlx",".rbxmx",".rdf",".rng",".rss",".shproj",".storyboard",".svg",".targets",".tld",".tmx",".vbproj",".vbproj.user",".vcxproj",".vcxproj.filters",".wsdl",".wxi",".wxl",".wxs",".xaml",".xbl",".xib",".xlf",".xliff",".xpdl",".xul",".xoml"],blockComment:[""]},xsl:{lineComment:{start:""},aliases:["XSL","xsl"],extensions:[".xsl",".xslt"]},yaml:{lineComment:{start:"#"},markdownLanguageIds:["yaml","yml"]}});fQ.wellKnownLanguages=new Map(Object.entries(N1a).map(([t,e])=>[t,{languageId:t,...e}]));function Wci(t){return xhr(typeof t=="string"?t:typeof t>"u"?"plaintext":t.languageId)}a(Wci,"getLanguage");function xhr(t){return fQ.wellKnownLanguages.get(t.toLowerCase())??{languageId:t,lineComment:{start:"//"}}}a(xhr,"_getLanguage");function M1a(t){let e=(0,D1a.extname)(t).toLowerCase();for(let r of fQ.wellKnownLanguages.values())if(r.extensions?.includes(e))return r;return Wci("plaintext")}a(M1a,"getLanguageForResource")});var Kci=T(pQ=>{"use strict";f();Object.defineProperty(pQ,"__esModule",{value:!0});pQ.AlternativeTextNotebookContentProvider=void 0;pQ.generateCellTextMarker=khr;pQ.lineMightHaveCellMarker=Dhr;pQ.getBlockComment=xde;pQ.getLineCommentStart=wde;var Phr=whr(),O1a=ilt(),B1a=tF(),Ide=kp(),L1a=Kct(),F1a=nlt(),W0=ERe();function khr(t,e){let r=t.id?`[id=${t.id}] `:"";return`${e}%% vscode.cell ${r}[language=${t.language}]`}a(khr,"generateCellTextMarker");function Dhr(t){return t.toLowerCase().includes("vscode.cell")}a(Dhr,"lineMightHaveCellMarker");var slt=class extends F1a.AlternativeNotebookDocument{static{a(this,"AlternativeTextDocument")}constructor(e,r,n){super(e,n),this.cellOffsetMap=r}fromCellPosition(e,r){let n=(0,W0.summarize)(e),o=wde(this.notebook),s=khr(n,o),c=e.document.eol===Ide.EndOfLine.LF?1:2,l=xde(this.notebook),u=this.getText(),d=e.document.offsetAt(r),p=e.kind===Ide.NotebookCellKind.Markup?l[0].length+c:0,h=u.indexOf(s)+s.length+c+p+d;return this.positionAt(h)}toCellPosition(e){let r=this.offsetAt(e),n=(0,B1a.findLast)(this.cellOffsetMap,s=>s.sourceOffset<=r);if(!n)return;let o=n.cell.document.positionAt(r-n.sourceOffset);return{cell:n.cell,position:o}}},Rhr=class extends L1a.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeTextNotebookContentProvider")}constructor(){super("text")}stripCellMarkers(e){let r=e.split(W0.EOL);return r.length&&Dhr(r[0])?(r.shift(),r.join(W0.EOL)):e}getSummaryOfStructure(e,r,n){let o=xde(e),s=wde(e),c=`${s} ${n}`,l=[];return e.getCells().forEach(u=>{if(r.includes(u)){let d=(0,W0.summarize)(u);d.source.length&&d.source[0].trim().length?d.source=[d.source[0],c]:d.source.length&&d.source.some(p=>p.trim().length)?d.source=[c,d.source.filter(p=>p.trim().length)[0],c]:d.source=[c],l.push(zci(d,s,o).content)}else(!l.length||l[l.length-1]!==c)&&l.push(c)}),l.join(W0.EOL)}async*parseAlternateContent(e,r,n){let o=!(0,O1a.isUri)(e),s=o?(0,W0.getCellIdMap)(e):new Map,c=!1,l=!1,u=!1,d=!1,p=-1,h=wde(o?e:void 0),m=xde(o?e:void 0),g=o?(0,Phr.getLanguage)((0,W0.getDefaultLanguage)(e)).languageId:void 0,A=new Set;for await(let y of r){if(n.isCancellationRequested)break;let E=y.value,_=E.startsWith(`${h}%% [`)&&E.trimEnd().endsWith("]"),v=E.startsWith(`${h}%% vscode.cell`),b=v||_?Yci(E,g):void 0;if((v||_)&&b?.language){u&&(u=!1);let I={index:-1,uri:void 0,language:void 0,kind:Ide.NotebookCellKind.Code,emitted:!1,type:"start"};I.index=p+=1,I.emitted=!1,b.id&&s.get(b.id)?.document.languageId===b.language?A.has(b.id)?b.id="":A.add(b.id):b.id="";let x=s.get(b.id);I.id=b.id,I.language=b.language,I.uri=x?.document.uri,I.kind=x?.kind||(I.language==="markdown"?Ide.NotebookCellKind.Markup:Ide.NotebookCellKind.Code),c=I.language==="markdown",l=!1,d&&(yield{index:p-1,type:"end"}),d=!0,yield I;continue}d&&(c?l?E===m[1]?(l=!1,u=!0):yield{index:p,line:E,type:"line"}:E===m[0]?l=!0:yield{index:p,line:E,type:"line"}:yield{index:p,line:E,type:"line"})}d&&(yield{index:p,type:"end"})}getAlternativeDocumentFromText(e,r){let n=xde(r),o=wde(r),s=(0,W0.getCellIdMap)(r),c=[],l=e.split(W0.EOL),u=0;for(let d=0;dy.document.languageId===g.language&&!c.some(E=>E.cell===y));if(A){let y=u,E=W0.EOL.length,_=g.language==="markdown",v=y+p.length+E+(_?n[0].length+E:0);c.push({offset:y,sourceOffset:v,cell:A})}}}u+=p.length+W0.EOL.length}return new slt(e,c,r)}getAlternativeDocument(e,r){let n=e.getCells().filter(d=>r?d.kind!==Ide.NotebookCellKind.Markup:!0).map(d=>(0,W0.summarize)(d)),o=xde(e),s=wde(e),c=n.map(d=>({...zci(d,s,o),cell:e.cellAt(d.index)})),l=c.map(d=>d.content).join(W0.EOL),u=c.map(d=>{let p=l.indexOf(d.content),h=p+d.prefix.length;return{offset:p,sourceOffset:h,cell:e.cellAt(d.cell.index)}});return new slt(l,u,e)}};pQ.AlternativeTextNotebookContentProvider=Rhr;function zci(t,e,r){let n=khr(t,e),o=t.source.join(W0.EOL),s=t.language==="markdown"?`${n}${W0.EOL}${r[0]}${W0.EOL}`:`${n}${W0.EOL}`;return{content:t.language==="markdown"?`${s}${o}${W0.EOL}${r[1]}`:`${s}${o}`,prefix:s}}a(zci,"generateAlternativeCellTextContent");function xde(t){return t?(0,Phr.getLanguage)((0,W0.getDefaultLanguage)(t)).blockComment??["```","```"]:['"""','"""']}a(xde,"getBlockComment");function wde(t){return t&&(0,Phr.getLanguage)((0,W0.getDefaultLanguage)(t)).lineComment.start||"#"}a(wde,"getLineCommentStart");function Yci(t,e){let r=t.match(/\[id=(.+?)\]/),n=t.match(/\[language=(.+?)\]/);return n?{id:r?r[1].trim():"",language:n[1].trim()}:Dhr(t)&&typeof e=="string"?{id:r?r[1].trim():"",language:e}:void 0}a(Yci,"extractCellParts")});var Zci=T(bRe=>{"use strict";f();Object.defineProperty(bRe,"__esModule",{value:!0});bRe.AlternativeXmlNotebookContentProvider=void 0;bRe.isXmlContent=Xci;var U1a=whr(),Q1a=ilt(),q1a=tF(),CRe=kp(),G1a=Kct(),H1a=nlt(),CA=ERe(),vRe="`}a(Nhr,"generateCellMarker");function Xci(t){return t.includes(vRe)||t.includes(hQ)||t.includes(alt)}a(Xci,"isXmlContent");var clt=class extends H1a.AlternativeNotebookDocument{static{a(this,"AlternativeXmlDocument")}constructor(e,r,n){super(e,n),this.cellOffsetMap=r}fromCellPosition(e,r){let n=(0,CA.summarize)(e),o=Nhr(n),s=e.document.eol===CRe.EndOfLine.LF?1:2,c=this.getText(),l=e.document.offsetAt(r),u=c.indexOf(o)+o.length+s+l;return this.positionAt(u)}toCellPosition(e){let r=this.offsetAt(e),n=(0,q1a.findLast)(this.cellOffsetMap,s=>s.offset<=r);if(!n)return;let o=n.cell.document.positionAt(r-n.offset);return{cell:n.cell,position:o}}},Mhr=class extends G1a.BaseAlternativeNotebookContentProvider{static{a(this,"AlternativeXmlNotebookContentProvider")}constructor(){super("xml")}stripCellMarkers(e){let r=e.split(CA.EOL);return r.length&&(r[0].startsWith(vRe)||r[0].startsWith(alt))&&r.shift(),r.length&&r[r.length-1].trim().endsWith(hQ)&&(r[r.length-1]=r[r.length-1].substring(0,r[r.length-1].lastIndexOf(hQ))),r.join(CA.EOL)}getSummaryOfStructure(e,r,n){let o=[],s=`// ${n}`;return e.getCells().forEach(c=>{if(r.includes(c)){let l=(0,CA.summarize)(c);o.push(Nhr(l)),l.source.length&&l.source[0].trim().length?(o.push(l.source[0]),o.push(s)):l.source.length&&l.source.some(u=>u.trim().length)?l.source=[s,l.source.filter(u=>u.trim().length)[0],s]:o.push(s),o.push(hQ)}else(!o.length||o[o.length-1]!==s)&&o.push(s)}),o.join(CA.EOL)}async*parseAlternateContent(e,r,n){let o=!(0,Q1a.isUri)(e),s=o?(0,CA.getCellIdMap)(e):new Map,c=-1,l=!1,u=new Set,d=!1,p,h=o?(0,U1a.getLanguage)((0,CA.getDefaultLanguage)(e)).languageId:void 0;for await(let m of r){if(n.isCancellationRequested)break;let g=m.value;if((g.startsWith(vRe)||g.startsWith(alt))&&(c<0||l||d&&p)){!l&&d&&p&&(p.line=p.line.substring(0,p.line.lastIndexOf(hQ)),yield p,yield{type:"end",index:p.index}),d=!1,p=void 0,c+=1,l=!1;let A={type:"start",index:c,uri:void 0,language:void 0,kind:CRe.NotebookCellKind.Code},y=Jci(g,h);y.id&&s.get(y.id)?.document.languageId===y.language?u.has(y.id)?y.id="":u.add(y.id):y.id="";let E=s.get(y.id)?.document.languageId===y.language?s.get(y.id):void 0;A.id=y.id,A.language=y.language,A.uri=E?.document.uri,A.kind=E?.kind||(A.language==="markdown"?CRe.NotebookCellKind.Markup:CRe.NotebookCellKind.Code),yield A}else g.startsWith(hQ)?(d&&p&&(yield p),l=!0,d=!1,p=void 0,yield{type:"end",index:c}):c>=0&&(d&&p&&(yield p,p=void 0),d=g.endsWith(hQ),d?p={type:"line",index:c,line:g}:yield{type:"line",index:c,line:g})}}getAlternativeDocumentFromText(e,r){let n=(0,CA.getCellIdMap)(r),o=[],s=e.split(CA.EOL),c=0;for(let l=0;lh.document.languageId===d.language&&!o.some(m=>m.cell===h));if(p){let h=CA.EOL.length,m=c+u.length+h;o.push({offset:m,cell:p})}}c+=u.length+CA.EOL.length}return new clt(e,o,r)}getAlternativeDocument(e,r){let o=e.getCells().filter(l=>r?l.kind!==CRe.NotebookCellKind.Markup:!0).map(l=>(0,CA.summarize)(l)).map(l=>{let d=`${Nhr(l)}${CA.EOL}`;return{content:`${d}${l.source.join(CA.EOL)}${CA.EOL}${hQ}`,prefix:d,cell:e.cellAt(l.index)}}),s=o.map(l=>l.content).join(CA.EOL),c=o.map(l=>({offset:s.indexOf(l.content)+l.prefix.length,cell:l.cell}));return new clt(s,c,e)}};bRe.AlternativeXmlNotebookContentProvider=Mhr;function Jci(t,e){let r=t.match(/id="([^"]+)"/),n=t.match(/language="([^"]+)"/);if(!n){if(Xci(t)&&typeof e=="string")return{id:r?r[1].trim():"",language:e};throw new Error(`Invalid cell part in ${t}`)}return{id:r?r[1].trim():"",language:n[1].trim()}}a(Jci,"extractCellParts")});var ili=T(_C=>{"use strict";f();var $1a=_C&&_C.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},eli=_C&&_C.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(_C,"__esModule",{value:!0});_C.AlternativeNotebookContentService=_C.IAlternativeNotebookContentService=void 0;_C.getAlternativeNotebookDocumentProvider=Bhr;_C.inferAlternativeNotebookContentFormat=X1a;_C.getAltNotebookRange=Z1a;var V1a=Bat(),W1a=qr(),z1a=kp(),tli=ac(),Y1a=mct(),K1a=cd(),rli=Vci(),J1a=Kci(),nli=Zci();function Bhr(t){switch(t){case"xml":return new nli.AlternativeXmlNotebookContentProvider;case"text":return new J1a.AlternativeTextNotebookContentProvider;case"json":return new rli.AlternativeJsonNotebookContentProvider;default:throw new Error(`Unsupported kind '${t}'`)}}a(Bhr,"getAlternativeNotebookDocumentProvider");function X1a(t){return(0,nli.isXmlContent)(t)?"xml":(0,rli.isJsonContent)(t)?"json":"text"}a(X1a,"inferAlternativeNotebookContentFormat");_C.IAlternativeNotebookContentService=(0,W1a.createServiceIdentifier)("IAlternativeNotebookContentService");var Ohr=class{static{a(this,"AlternativeNotebookContentService")}constructor(e,r){this.configurationService=e,this.experimentationService=r}getFormat(e){return e&&(0,Y1a.modelPrefersJsonNotebookRepresentation)(e)?"json":this.configurationService.getExperimentBasedConfig(tli.ConfigKey.Advanced.NotebookAlternativeDocumentFormat,this.experimentationService)}create(e){return Bhr(e)}};_C.AlternativeNotebookContentService=Ohr;_C.AlternativeNotebookContentService=Ohr=$1a([eli(0,tli.IConfigurationService),eli(1,K1a.IExperimentationService)],Ohr);function Z1a(t,e,r,n){let o=(0,V1a.findCell)(e,r);if(!o)return;let s=Bhr(n).getAlternativeDocument(r);return new z1a.Range(s.fromCellPosition(o,t.start),s.fromCellPosition(o,t.end))}a(Z1a,"getAltNotebookRange")});var sli=T(TRe=>{"use strict";f();Object.defineProperty(TRe,"__esModule",{value:!0});TRe.NotebookDocumentSnapshot=void 0;TRe.isNotebookDocumentSnapshotJSON=rva;var llt=W1(),eva=Eu(),Lhr=kp(),oli=ili(),tva=ERe();function rva(t){return!t||typeof t!="object"?!1:t.type==="notebook"&&(0,eva.isUriComponents)(t.uri)&&(0,llt.isString)(t._text)&&(0,llt.isString)(t.languageId)&&(0,llt.isNumber)(t.version)&&(0,llt.isString)(t.alternativeFormat)}a(rva,"isNotebookDocumentSnapshotJSON");var Fhr=class t{static{a(this,"NotebookDocumentSnapshot")}static create(e,r){let n=e.uri,o=e.version,s=(0,oli.getAlternativeNotebookDocumentProvider)(r).getAlternativeDocument(e);return new t(e,n,o,r,s)}static fromNewText(e,r){let n=(0,oli.getAlternativeNotebookDocumentProvider)(r.alternativeFormat).getAlternativeDocumentFromText(e,r.document);return new t(r.document,r.uri,r.version,r.alternativeFormat,n)}static fromJSON(e,r){return t.create(e,r.alternativeFormat)}constructor(e,r,n,o,s){this.alternativeFormat=o,this._alternativeDocument=s,this.type="notebook",this.document=e,this.uri=r,this.version=n,this.languageId=o==="text"?(0,tva.getDefaultLanguage)(e)||"python":o}getText(e){return this._alternativeDocument.getText(e)}getSelection(){return new Lhr.Selection(0,0,this.lineCount,0)}getWholeRange(){return new Lhr.Range(0,0,this.lineCount,0)}get lines(){return this._alternativeDocument.lines}get lineCount(){return this._alternativeDocument.lineCount}lineAt(e){let r;if(e instanceof Lhr.Position)r=e.line;else if(typeof e=="number")r=e;else throw new Error("Invalid argument");if(r<0||r>=this.lines.length)throw new Error("Illegal value for `line`");return this._alternativeDocument.lineAt(r)}offsetAt(e){return this._alternativeDocument.offsetAt(e)}positionAt(e){return this._alternativeDocument.positionAt(e)}validateRange(e){return this._alternativeDocument.validateRange(e)}validatePosition(e){return this._alternativeDocument.validatePosition(e)}toJSON(){return{type:"notebook",uri:this.uri.toJSON(),languageId:this.languageId,version:this.version,_text:this._alternativeDocument.getText(),alternativeFormat:this.alternativeFormat}}};TRe.NotebookDocumentSnapshot=Fhr});var Qhr=T(Xy=>{"use strict";f();var nva=Xy&&Xy.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iva=Xy&&Xy.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ova=Xy&&Xy.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o"u"&&(r=this.getWorkspaceFolders().length>1);let c=(0,ali.relativePath)(s,n);return r&&(c=`${this.getWorkspaceFolderName(s)}/${c}`),c}async openTextDocumentAndSnapshot(e){let r=await this.openTextDocument(e);return fva.TextDocumentSnapshot.create(r)}async openNotebookDocumentAndSnapshot(e,r){let n=(0,sva.findNotebook)(e,this.notebookDocuments)||await this.openNotebookDocument(e);return dva.NotebookDocumentSnapshot.create(n,r)}getWorkspaceFolder(e){return this.getWorkspaceFolders().find(r=>ali.extUriBiasedIgnorePathCase.isEqualOrParent(e,r))}};Xy.AbstractWorkspaceService=ult;function pva(t,e){let r=t.getWorkspaceFolder(e);return r?lva.posix.relative(r.path,e.path):e.path}a(pva,"getWorkspaceFileDisplayPath");var Uhr=class extends ult{static{a(this,"NullWorkspaceService")}constructor(e=[],r=[],n=[]){super(),this.disposables=new cva.DisposableStore,this.didOpenTextDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didCloseTextDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didOpenNotebookDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didCloseNotebookDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didChangeTextDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didChangeWorkspaceFoldersEmitter=this.disposables.add(new mQ.Emitter),this.didChangeNotebookDocumentEmitter=this.disposables.add(new mQ.Emitter),this.didChangeTextEditorSelectionEmitter=this.disposables.add(new mQ.Emitter),this.onDidChangeTextDocument=this.didChangeTextDocumentEmitter.event,this.onDidCloseTextDocument=this.didCloseTextDocumentEmitter.event,this.onDidOpenNotebookDocument=this.didOpenNotebookDocumentEmitter.event,this.onDidCloseNotebookDocument=this.didCloseNotebookDocumentEmitter.event,this.onDidOpenTextDocument=this.didOpenTextDocumentEmitter.event,this.onDidChangeWorkspaceFolders=this.didChangeWorkspaceFoldersEmitter.event,this.onDidChangeNotebookDocument=this.didChangeNotebookDocumentEmitter.event,this.onDidChangeTextEditorSelection=this.didChangeTextEditorSelectionEmitter.event,this._textDocuments=[],this._notebookDocuments=[],this.workspaceFolder=e,this._textDocuments=r,this._notebookDocuments=n}get textDocuments(){return this._textDocuments}showTextDocument(e){return Promise.resolve()}async openTextDocument(e){let r=this.textDocuments.find(n=>n.uri.toString()===e.toString());if(r)return r;throw new Error(`Unknown document: ${e}`)}async openNotebookDocument(e,r){if(typeof e=="string")throw new Error("Not implemented");{let n=this.notebookDocuments.find(o=>o.uri.toString()===e.toString());if(n)return n;throw new Error(`Unknown notebook: ${e}`)}}get notebookDocuments(){return this._notebookDocuments}getWorkspaceFolders(){return this.workspaceFolder}getWorkspaceFolderName(e){return"default"}ensureWorkspaceIsFullyLoaded(){return Promise.resolve()}showWorkspaceFolderPicker(){return Promise.resolve(void 0)}applyEdit(){return Promise.resolve(!0)}dispose(){this.disposables.dispose()}requestResourceTrust(e){return Promise.resolve(!0)}requestWorkspaceTrust(e){return Promise.resolve(!0)}};Xy.NullWorkspaceService=Uhr});var jhr=T(YK=>{"use strict";f();Object.defineProperty(YK,"__esModule",{value:!0});YK.BatchedProcessor=YK.TaskQueue=void 0;YK.raceFilter=hva;var qhr=vc(),cli=Ko(),Ghr=class{static{a(this,"TaskQueue")}constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){let r=new qhr.DeferredPromise;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),r.p}scheduleSkipIfCleared(e){let r=new qhr.DeferredPromise;return this._pendingTasks.push({task:e,deferred:r,setUndefinedWhenCleared:!0}),this._runIfNotRunning(),r.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingTasks.length===0)return;let e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new cli.BugIndicatingError;this._runningTask=e.task;try{let r=await e.task();e.deferred.complete(r)}catch(r){e.deferred.error(r)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){let e=this._pendingTasks;this._pendingTasks=[];for(let r of e)r.setUndefinedWhenCleared?r.deferred.complete(void 0):r.deferred.error(new cli.CancellationError)}};YK.TaskQueue=Ghr;var Hhr=class{static{a(this,"BatchedProcessor")}constructor(e,r){this._fn=e,this._waitingTimeMs=r,this._queue=[],this._timeout=null}request(e){this._timeout===null&&(this._timeout=setTimeout(()=>this._flush(),this._waitingTimeMs));let r=new qhr.DeferredPromise;return this._queue.push({arg:e,promise:r}),r.p}async _flush(){let e=this._queue;this._queue=[],this._timeout=null;let r=e.map(o=>o.arg),n;try{n=await this._fn(r)}catch(o){for(let s of e)s.promise.error(o);return}for(let[o,s]of n.entries())e[o].promise.complete(s)}};YK.BatchedProcessor=Hhr;function hva(t,e){return new Promise((r,n)=>{if(t.length===0){r(void 0);return}let o=!1,s=t.length;for(let c of t)c.then(l=>{s--,o||(e(l)?(o=!0,r(l)):s===0&&r(void 0))}).catch(n)})}a(hva,"raceFilter")});var $hr=T(Rde=>{"use strict";f();Object.defineProperty(Rde,"__esModule",{value:!0});Rde.AsyncIterUtilsExt=Rde.AsyncIterUtils=void 0;var lli;(function(t){async function*e(d,p){for await(let h of d)yield p(h)}a(e,"map"),t.map=e;async function*r(d,p,h){let m=d[Symbol.asyncIterator](),g;for(;!(g=await m.next()).done;)yield p(g.value);return h(g.value)}a(r,"mapWithReturn"),t.mapWithReturn=r;async function*n(d,p){for await(let h of d)p(h)&&(yield h)}a(n,"filter"),t.filter=n;async function o(d){let p=[];for await(let h of d)p.push(h);return p}a(o,"toArray"),t.toArray=o;async function*s(d){for(let p of d)yield p}a(s,"fromArray"),t.fromArray=s;async function*c(d,p){for(let h of d)yield h;return p}a(c,"fromArrayWithReturn"),t.fromArrayWithReturn=c;async function l(d){let p=d[Symbol.asyncIterator](),h=[],m;for(;!(m=await p.next()).done;)h.push(m.value);return[h,m.value]}a(l,"toArrayWithReturn"),t.toArrayWithReturn=l;async function u(d){let p=d[Symbol.asyncIterator](),h;do h=await p.next();while(!h.done);return h.value}a(u,"drainUntilReturn"),t.drainUntilReturn=u})(lli||(Rde.AsyncIterUtils=lli={}));var uli;(function(t){async function*e(r){let n=null;for await(let o of r){n??="",n+=o;let s=n.split(/\r?\n/);n=s.pop()??"",yield*s}n!==null&&(yield n)}a(e,"splitLines"),t.splitLines=e})(uli||(Rde.AsyncIterUtilsExt=uli={}))});var fli=T(ib=>{"use strict";f();Object.defineProperty(ib,"__esModule",{value:!0});ib.LineWithTokens=ib.Token=void 0;ib.getOrDeduceSelectionFromLastEdit=gva;ib.clipTokensToRange=dli;ib.clipTokensToRangeAndAdjustOffsets=yva;ib.removeTokensInRangeAndAdjustOffsets=Eva;ib.getTokensFromLogProbs=_va;ib.getTokensFromLinesWithTokens=Cva;ib.mergeOffsetRangesAtDistance=vva;var mva=Ko(),Pde=wu();function gva(t){let e=new Pde.OffsetRange(0,0);return t.lastSelectionInAfterEdit&&!t.lastSelectionInAfterEdit.equals(e)?t.documentAfterEdits.getTransformer().getRange(t.lastSelectionInAfterEdit):Ava(t)}a(gva,"getOrDeduceSelectionFromLastEdit");function Ava(t){let e=t.recentEdits.edits.at(-1);if(e===void 0)return null;let r=e.replacements.at(-1);if(r===void 0)return null;let n=r.replaceRange,s=r.newText.length-n.length,c=n.endExclusive+s;return t.documentAfterEdits.getTransformer().getRange(new Pde.OffsetRange(c,c))}a(Ava,"deduceSelectionFromLastEdit");var dlt=class t{static{a(this,"Token")}get id(){return this.text+"_"+this.range.toString()}constructor(e,r,n){this.text=e,this.value=r,this.range=new Pde.OffsetRange(n,n+e.length)}equals(e){return this.range.equals(e.range)&&this.text===e.text}deltaOffset(e){return new t(this.text,this.value,this.range.start+e)}};ib.Token=dlt;function dli(t,e){return t.filter(r=>e.intersects(r.range))}a(dli,"clipTokensToRange");function yva(t,e){return dli(t,e).map(r=>r.deltaOffset(-e.start))}a(yva,"clipTokensToRangeAndAdjustOffsets");function Eva(t,e){let r=[];for(let n of t)e.containsRange(n.range)||(n.range.start>e.start&&(n=n.deltaOffset(-e.length)),r.push(n));return r}a(Eva,"removeTokensInRangeAndAdjustOffsets");function _va(t,e){let r=e;return t.content.map(n=>{let o=new dlt(n.token,n.logprob,r);return r+=o.range.length,o})}a(_va,"getTokensFromLogProbs");var Vhr=class t{static{a(this,"LineWithTokens")}static stringEquals(e,r){return e._text===r._text}static fromText(e,r){r=r??[];let n=[];for(;;){let o=e.indexOf(`\r `),s=e.indexOf(` `),c=o===-1?s:s===-1?o:Math.min(o,s),l=o!==-1?`\r `:s===-1?void 0:` `;if(l===void 0){n.push(new t(e,r,` -`));break}let u=c+l.length,d=e.substring(0,c),p=r.filter(h=>h.range.start0);n.push(new t(d,p,l)),e=e.substring(u),r=r.map(h=>h.deltaOffset(-u)).filter(h=>h.range.endExclusive>0)}return n}get text(){return this._text}get tokens(){return this._tokens}get length(){return this._text.length}get lengthWithEOL(){return this._text.length+this._eol.length}get eol(){return this._eol}constructor(e,r,n){this._text=e,this._tokens=r,this._eol=n}trim(){return this.trimStart().trimEnd()}trimStart(){let e=this._text.trimStart(),r=this._text.length-e.length,n=this._tokens.map(o=>o.deltaOffset(-r)).filter(o=>o.range.endExclusive>0);return new t(e,n,this._eol)}trimEnd(){let e=this._text.trimEnd(),r=this._tokens.filter(n=>n.range.starts.deltaOffset(-e)).filter(s=>s.range.endExclusive>0&&s.range.startr.equals(e.tokens[n]))}dropTokens(e){return new t(this._text,this._tokens.filter(r=>!e.some(n=>r.equals(n))),this._eol)}findTokens(e){return this._tokens.filter(e)}};Ab.LineWithTokens=Ihr;function C_a(t){let e=0,r=[];for(let s of t){let c=s.text+s.eol;r.push(...s.tokens.map(l=>l.deltaOffset(e))),e+=c.length}let n=[],o=new Set;for(let s of r)o.has(s.id)||(o.add(s.id),n.push(s));return n}a(C_a,"getTokensFromLinesWithTokens");function __a(t,e){if(e<0)throw new h_a.BugIndicatingError("Distance must be positive");let r=t.map(o=>new gfe.OffsetRange(o.start-e,o.endExclusive+e)),n=new gfe.OffsetRangeSet;for(let o of r)n.addRange(o);return n.ranges.map(o=>new gfe.OffsetRange(o.start+e,o.endExclusive-e))}a(__a,"mergeOffsetRangesAtDistance")});var hci=T(iut=>{"use strict";f();Object.defineProperty(iut,"__esModule",{value:!0});iut.DelaySession=void 0;var xhr=class{static{a(this,"DelaySession")}constructor(e,r,n=Date.now()){this.baseDebounceTime=e,this.expectedTotalTime=r,this.providerInvocationTime=n,this.extraDebounce=0}setExtraDebounce(e){this.extraDebounce=e}setBaseDebounceTime(e){this.baseDebounceTime=e}setExpectedTotalTime(e){this.expectedTotalTime=e}getDebounceTime(){let r=(this.expectedTotalTime===void 0?this.baseDebounceTime:Math.min(this.baseDebounceTime,this.expectedTotalTime))+this.extraDebounce,n=Date.now()-this.providerInvocationTime;return Math.max(0,r-n)}getArtificialDelay(){if(this.expectedTotalTime===void 0)return 0;let e=Date.now()-this.providerInvocationTime;return Math.max(0,this.expectedTotalTime-e)}};iut.DelaySession=xhr});var yci=T(sf=>{"use strict";f();var v_a=sf&&sf.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},sut=sf&&sf.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(sf,"__esModule",{value:!0});sf.UserInteractionMonitor=sf.MAX_INTERACTIONS_STORED=sf.MAX_INTERACTIONS_CONSIDERED=sf.ActionKind=void 0;sf.getWindowWithIgnoredLimit=gci;sf.getUserHappinessScore=Aci;var Afe=fc(),HJ=Qy(),b_a=L0(),T_a=gd(),S_a=Rp(),mci=Ay(),I_a=hci(),yb;(function(t){t.Accepted="accepted",t.Rejected="rejected",t.Ignored="ignored"})(yb||(sf.ActionKind=yb={}));sf.MAX_INTERACTIONS_CONSIDERED=10;sf.MAX_INTERACTIONS_STORED=30;function gci(t,e){let{limitConsecutiveIgnored:r,limitTotalIgnored:n,ignoredLimit:o}=e;if(!r&&!n)return t.slice(-sf.MAX_INTERACTIONS_CONSIDERED);let s=[],c=0,l=0;for(let u=t.length-1;u>=0&&s.length=o&&(p=!0),n&&l>=o&&(p=!0),p)continue;c++,l++}else c=0;s.push(d)}return s.reverse(),s}a(gci,"getWindowWithIgnoredLimit");function Aci(t,e){if(t.length===0)return .5;let r=gci(t,e);if(r.length===0)return .5;let n=0,o=0,s=0;for(let u=0;u0?n/o:.5,l=s/sf.MAX_INTERACTIONS_CONSIDERED;return .5+(c-.5)*l}a(Aci,"getUserHappinessScore");var whr=class{static{a(this,"UserInteractionMonitor")}constructor(e,r,n,o){this._configurationService=e,this._experimentationService=r,this._logService=n,this._telemetryService=o,this._recentUserActionsForAggressiveness=[],this._recentUserActionsForTiming=[],this._lastActionWasAcceptance=!1}handleAcceptance(){this._recordUserAction(yb.Accepted)}handleRejection(){this._recordUserAction(yb.Rejected)}handleIgnored(){this._recordUserAction(yb.Ignored)}get wasLastActionAcceptance(){return this._lastActionWasAcceptance}_recordUserAction(e){let r=Date.now();this._lastActionWasAcceptance=e===yb.Accepted,this._recentUserActionsForAggressiveness.push({time:r,kind:e}),this._recentUserActionsForAggressiveness=this._recentUserActionsForAggressiveness.slice(-sf.MAX_INTERACTIONS_STORED),e!==yb.Ignored&&(this._recentUserActionsForTiming.push({time:r,kind:e}),this._recentUserActionsForTiming=this._recentUserActionsForTiming.slice(-sf.MAX_INTERACTIONS_CONSIDERED))}createDelaySession(e){let r=this._configurationService.getExperimentBasedConfig(Afe.ConfigKey.TeamInternal.InlineEditsDebounce,this._experimentationService),o=this._configurationService.getExperimentBasedConfig(Afe.ConfigKey.TeamInternal.InlineEditsBackoffDebounceEnabled,this._experimentationService)?this._getExpectedTotalTime(r):void 0;return new I_a.DelaySession(r,o,e)}_getExpectedTotalTime(e){let l=Date.now(),u=1;for(let p of this._recentUserActionsForTiming){let h=l-p.time;if(h>6e5)continue;let m=Math.exp(-h/6e5),g=p.kind===yb.Rejected?1.5:.8;u*=1+(g-1)*m}let d=e*u;return d=Math.min(3e3,Math.max(50,d)),d}getAggressivenessLevel(){let e=this._configurationService.getExperimentBasedConfig(Afe.ConfigKey.Advanced.InlineEditsAggressiveness,this._experimentationService),r=HJ.AggressivenessSetting.toLevel(e);if(r!==void 0)return{aggressivenessLevel:r,userHappinessScore:void 0};let n=this._configurationService.getExperimentBasedConfig(Afe.ConfigKey.TeamInternal.InlineEditsXtabAggressivenessLevel,this._experimentationService);if(n!==void 0)return{aggressivenessLevel:n,userHappinessScore:void 0};let o,s=this._getUserHappinessScoreConfiguration(),c=this._getUserHappinessScore(s);return c>=s.highThreshold?o=HJ.AggressivenessLevel.High:c>=s.mediumThreshold?o=HJ.AggressivenessLevel.Medium:o=HJ.AggressivenessLevel.Low,{aggressivenessLevel:o,userHappinessScore:c}}_getUserHappinessScoreConfiguration(){let e=Afe.ConfigKey.TeamInternal.InlineEditsUserHappinessScoreConfigurationString,r=this._configurationService.getExperimentBasedConfig(e,this._experimentationService);if(r===void 0)return HJ.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION;try{return(0,HJ.parseUserHappinessScoreConfigurationString)(r)}catch(n){return this._logService.error(n,"Failed to parse user happiness score configuration, using default config"),this._telemetryService.sendMSFTTelemetryEvent("incorrectNesAdaptiveAggressivenessConfig",{configName:e.id,errorMessage:mci.ErrorUtils.toString(mci.ErrorUtils.fromUnknown(n)),configValue:r}),HJ.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION}}_getUserHappinessScore(e){return Aci(this._recentUserActionsForAggressiveness,e)}};sf.UserInteractionMonitor=whr;sf.UserInteractionMonitor=whr=v_a([sut(0,Afe.IConfigurationService),sut(1,T_a.IExperimentationService),sut(2,b_a.ILogService),sut(3,S_a.ITelemetryService)],whr)});var Eci=T(Rhr=>{"use strict";f();Object.defineProperty(Rhr,"__esModule",{value:!0});Rhr.isImportStatement=x_a;function x_a(t,e){switch(e){case"java":return!!t.match(/^\s*import\s/);case"typescript":case"typescriptreact":case"javascript":case"javascriptreact":return!!t.match(/^\s*import[\s{*]|^\s*[var|const|let].*=\s*require\(/);case"php":return!!t.match(/^\s*use/);case"rust":return!!t.match(/^\s*use\s+[\w:{}, ]+\s*(as\s+\w+)?;/);case"python":return!!t.match(/^\s*from\s+[\w.]+\s+import\s+[\w, *]+$/)||!!t.match(/^\s*import\s+[\w, ]+$/);default:return!1}}a(x_a,"isImportStatement")});var vci=T(aut=>{"use strict";f();Object.defineProperty(aut,"__esModule",{value:!0});aut.IgnoreImportChangesAspect=void 0;var Cci=rer(),w_a=jc(),_ci=Eci(),Phr=class t{static{a(this,"IgnoreImportChangesAspect")}static isImportChange(e,r,n){return e.newLines.some(o=>(0,_ci.isImportStatement)(o,r))||R_a(e,n).some(o=>(0,_ci.isImportStatement)(o,r))}static filterEdit(e,r,n=Cci.ImportChanges.None){if(n===Cci.ImportChanges.All)return r;let o=e.languageId,s=e.documentLinesBeforeEdit;return r.filter(l=>!t.isImportChange(l,o,s))}};aut.IgnoreImportChangesAspect=Phr;function R_a(t,e){return(0,w_a.coalesce)(t.lineRange.mapToLineArray(r=>e[r-1]))}a(R_a,"getOldLines")});var bci=T(cut=>{"use strict";f();Object.defineProperty(cut,"__esModule",{value:!0});cut.DiagnosticData=void 0;var P_a=Tk(),khr=class{static{a(this,"DiagnosticData")}constructor(e,r,n,o,s,c){this.documentUri=e,this.message=r,this.severity=n,this.range=o,this.code=s,this.source=c}toString(){return`${this.severity.toUpperCase()}: ${this.message} (${this.range})`}equals(e){return(0,P_a.isEqual)(this.documentUri,e.documentUri)&&this.message===e.message&&this.severity===e.severity&&this.range.equals(e.range)&&this.code===e.code&&this.source===e.source}};cut.DiagnosticData=khr});var jJ=T(yfe=>{"use strict";f();Object.defineProperty(yfe,"__esModule",{value:!0});yfe.ResponseTags=yfe.PromptTags=void 0;var Tci;(function(t){t.CURSOR="<|cursor|>";function e(n){return{start:`<|${n}|>`,end:`<|/${n}|>`}}a(e,"createTag"),t.EDIT_WINDOW=e("code_to_edit"),t.AREA_AROUND=e("area_around_code_to_edit"),t.CURRENT_FILE=e("current_file_content"),t.CURSOR_LOCATION=e("cursor_location"),t.EDIT_HISTORY=e("edit_diff_history"),t.RECENT_FILES=e("recently_viewed_code_snippets"),t.RECENT_FILE=e("recently_viewed_code_snippet");function r(n){return e(n)}a(r,"createLintTag"),t.createLintTag=r})(Tci||(yfe.PromptTags=Tci={}));var Sci;(function(t){t.NO_EDIT="",t.NO_CHANGE={start:""},t.EDIT={start:"",end:""},t.INSERT={start:"",end:""}})(Sci||(yfe.ResponseTags=Sci={}))});var Bhr=T(A3=>{"use strict";f();var k_a=A3&&A3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},N_a=A3&&A3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(A3,"__esModule",{value:!0});A3.LintErrors=void 0;var D_a=bci(),mI=Qy(),M_a=KK(),O_a=es(),Nhr=Tk(),B_a=Ef(),xci=Fu(),L_a=Lp(),F_a=jJ(),Mhr=class{static{a(this,"LintErrors")}constructor(e,r,n,o){this._documentId=e,this._document=r,this._langDiagService=n,this._xtabHistory=o}_diagnostics(e){let r=e?[[e,this._langDiagService.getDiagnostics(e)]]:this._langDiagService.getAllDiagnostics(),n=this._documentId.toUri();return r.map(o=>{let[s,c]=o;return c.map(l=>{let u=new B_a.Range(l.range.start.line+1,l.range.start.character+1,l.range.end.line+1,l.range.end.character+1),d=(0,Nhr.isEqual)(n,s)?uut.fromPositions(u.getStartPosition(),this._document.cursorPosition):void 0;return new Ohr(s,l.message,l.severity===L_a.DiagnosticSeverity.Error?"error":"warning",d,u,this._document.transformer.getOffsetRange(u),l.code&&typeof l.code!="number"&&typeof l.code!="string"?l.code.value:l.code,l.source)})}).flat()}_getRelevantDiagnostics(e,r){let n=this._diagnostics(r);return n=G_a(n,e.maxLineDistance),n=Ici(n),n=Dhr(n,e.warnings),n.slice(0,e.maxLints)}getFormattedLintErrors(e){let r=this._getRelevantDiagnostics(e,this._documentId.toUri()),n;if(e.nRecentFiles>0&&this._xtabHistory){let l=this._collectRecentFileUris(e.nRecentFiles),u=this._getRecentFileDiagnostics(l,e);n=[...r,...u].slice(0,e.maxLints)}else n=r;this._previousFormttedDiagnostics=n;let o=this._documentId.toUri(),s=n.map(l=>{let d=(0,Nhr.isEqual)(l.documentUri,o)?e:{...e,showCode:mI.LintOptionShowCode.NO};return lut(l,this._document.lines,d)}).join(` -`),c=F_a.PromptTags.createLintTag(e.tagName);return`${c.start} +`));break}let u=c+l.length,d=e.substring(0,c),p=r.filter(h=>h.range.start0);n.push(new t(d,p,l)),e=e.substring(u),r=r.map(h=>h.deltaOffset(-u)).filter(h=>h.range.endExclusive>0)}return n}get text(){return this._text}get tokens(){return this._tokens}get length(){return this._text.length}get lengthWithEOL(){return this._text.length+this._eol.length}get eol(){return this._eol}constructor(e,r,n){this._text=e,this._tokens=r,this._eol=n}trim(){return this.trimStart().trimEnd()}trimStart(){let e=this._text.trimStart(),r=this._text.length-e.length,n=this._tokens.map(o=>o.deltaOffset(-r)).filter(o=>o.range.endExclusive>0);return new t(e,n,this._eol)}trimEnd(){let e=this._text.trimEnd(),r=this._tokens.filter(n=>n.range.starts.deltaOffset(-e)).filter(s=>s.range.endExclusive>0&&s.range.startr.equals(e.tokens[n]))}dropTokens(e){return new t(this._text,this._tokens.filter(r=>!e.some(n=>r.equals(n))),this._eol)}findTokens(e){return this._tokens.filter(e)}};ib.LineWithTokens=Vhr;function Cva(t){let e=0,r=[];for(let s of t){let c=s.text+s.eol;r.push(...s.tokens.map(l=>l.deltaOffset(e))),e+=c.length}let n=[],o=new Set;for(let s of r)o.has(s.id)||(o.add(s.id),n.push(s));return n}a(Cva,"getTokensFromLinesWithTokens");function vva(t,e){if(e<0)throw new mva.BugIndicatingError("Distance must be positive");let r=t.map(o=>new Pde.OffsetRange(o.start-e,o.endExclusive+e)),n=new Pde.OffsetRangeSet;for(let o of r)n.addRange(o);return n.ranges.map(o=>new Pde.OffsetRange(o.start+e,o.endExclusive-e))}a(vva,"mergeOffsetRangesAtDistance")});var pli=T(flt=>{"use strict";f();Object.defineProperty(flt,"__esModule",{value:!0});flt.DelaySession=void 0;var Whr=class{static{a(this,"DelaySession")}constructor(e,r,n=Date.now()){this.baseDebounceTime=e,this.expectedTotalTime=r,this.providerInvocationTime=n,this.extraDebounce=0}setExtraDebounce(e){this.extraDebounce=e}setBaseDebounceTime(e){this.baseDebounceTime=e}setExpectedTotalTime(e){this.expectedTotalTime=e}getDebounceTime(){let r=(this.expectedTotalTime===void 0?this.baseDebounceTime:Math.min(this.baseDebounceTime,this.expectedTotalTime))+this.extraDebounce,n=Date.now()-this.providerInvocationTime;return Math.max(0,r-n)}getArtificialDelay(){if(this.expectedTotalTime===void 0)return 0;let e=Date.now()-this.providerInvocationTime;return Math.max(0,this.expectedTotalTime-e)}};flt.DelaySession=Whr});var Ali=T(Kd=>{"use strict";f();var bva=Kd&&Kd.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},plt=Kd&&Kd.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Kd,"__esModule",{value:!0});Kd.UserInteractionMonitor=Kd.MAX_INTERACTIONS_STORED=Kd.MAX_INTERACTIONS_CONSIDERED=Kd.ActionKind=void 0;Kd.getWindowWithIgnoredLimit=mli;Kd.getUserHappinessScore=gli;var kde=ac(),KK=ky(),Tva=D0(),Sva=cd(),Iva=bp(),hli=cy(),xva=pli(),ob;(function(t){t.Accepted="accepted",t.Rejected="rejected",t.Ignored="ignored"})(ob||(Kd.ActionKind=ob={}));Kd.MAX_INTERACTIONS_CONSIDERED=10;Kd.MAX_INTERACTIONS_STORED=30;function mli(t,e){let{limitConsecutiveIgnored:r,limitTotalIgnored:n,ignoredLimit:o}=e;if(!r&&!n)return t.slice(-Kd.MAX_INTERACTIONS_CONSIDERED);let s=[],c=0,l=0;for(let u=t.length-1;u>=0&&s.length=o&&(p=!0),n&&l>=o&&(p=!0),p)continue;c++,l++}else c=0;s.push(d)}return s.reverse(),s}a(mli,"getWindowWithIgnoredLimit");function gli(t,e){if(t.length===0)return .5;let r=mli(t,e);if(r.length===0)return .5;let n=0,o=0,s=0;for(let u=0;u0?n/o:.5,l=s/Kd.MAX_INTERACTIONS_CONSIDERED;return .5+(c-.5)*l}a(gli,"getUserHappinessScore");var zhr=class{static{a(this,"UserInteractionMonitor")}constructor(e,r,n,o){this._configurationService=e,this._experimentationService=r,this._logService=n,this._telemetryService=o,this._recentUserActionsForAggressiveness=[],this._recentUserActionsForTiming=[],this._lastActionWasAcceptance=!1}handleAcceptance(){this._recordUserAction(ob.Accepted)}handleRejection(){this._recordUserAction(ob.Rejected)}handleIgnored(){this._recordUserAction(ob.Ignored)}get wasLastActionAcceptance(){return this._lastActionWasAcceptance}_recordUserAction(e){let r=Date.now();this._lastActionWasAcceptance=e===ob.Accepted,this._recentUserActionsForAggressiveness.push({time:r,kind:e}),this._recentUserActionsForAggressiveness=this._recentUserActionsForAggressiveness.slice(-Kd.MAX_INTERACTIONS_STORED),e!==ob.Ignored&&(this._recentUserActionsForTiming.push({time:r,kind:e}),this._recentUserActionsForTiming=this._recentUserActionsForTiming.slice(-Kd.MAX_INTERACTIONS_CONSIDERED))}createDelaySession(e){let r=this._configurationService.getExperimentBasedConfig(kde.ConfigKey.TeamInternal.InlineEditsDebounce,this._experimentationService),o=this._configurationService.getExperimentBasedConfig(kde.ConfigKey.TeamInternal.InlineEditsBackoffDebounceEnabled,this._experimentationService)?this._getExpectedTotalTime(r):void 0;return new xva.DelaySession(r,o,e)}_getExpectedTotalTime(e){let l=Date.now(),u=1;for(let p of this._recentUserActionsForTiming){let h=l-p.time;if(h>6e5)continue;let m=Math.exp(-h/6e5),g=p.kind===ob.Rejected?1.5:.8;u*=1+(g-1)*m}let d=e*u;return d=Math.min(3e3,Math.max(50,d)),d}getAggressivenessLevel(){let e=this._configurationService.getExperimentBasedConfig(kde.ConfigKey.Advanced.InlineEditsAggressiveness,this._experimentationService),r=KK.AggressivenessSetting.toLevel(e);if(r!==void 0)return{aggressivenessLevel:r,userHappinessScore:void 0};let n=this._configurationService.getExperimentBasedConfig(kde.ConfigKey.TeamInternal.InlineEditsXtabAggressivenessLevel,this._experimentationService);if(n!==void 0)return{aggressivenessLevel:n,userHappinessScore:void 0};let o,s=this._getUserHappinessScoreConfiguration(),c=this._getUserHappinessScore(s);return c>=s.highThreshold?o=KK.AggressivenessLevel.High:c>=s.mediumThreshold?o=KK.AggressivenessLevel.Medium:o=KK.AggressivenessLevel.Low,{aggressivenessLevel:o,userHappinessScore:c}}_getUserHappinessScoreConfiguration(){let e=kde.ConfigKey.TeamInternal.InlineEditsUserHappinessScoreConfigurationString,r=this._configurationService.getExperimentBasedConfig(e,this._experimentationService);if(r===void 0)return KK.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION;try{return(0,KK.parseUserHappinessScoreConfigurationString)(r)}catch(n){return this._logService.error(n,"Failed to parse user happiness score configuration, using default config"),this._telemetryService.sendMSFTTelemetryEvent("incorrectNesAdaptiveAggressivenessConfig",{configName:e.id,errorMessage:hli.ErrorUtils.toString(hli.ErrorUtils.fromUnknown(n)),configValue:r}),KK.DEFAULT_USER_HAPPINESS_SCORE_CONFIGURATION}}_getUserHappinessScore(e){return gli(this._recentUserActionsForAggressiveness,e)}};Kd.UserInteractionMonitor=zhr;Kd.UserInteractionMonitor=zhr=bva([plt(0,kde.IConfigurationService),plt(1,Sva.IExperimentationService),plt(2,Tva.ILogService),plt(3,Iva.ITelemetryService)],zhr)});var yli=T(Yhr=>{"use strict";f();Object.defineProperty(Yhr,"__esModule",{value:!0});Yhr.isImportStatement=wva;function wva(t,e){switch(e){case"java":return!!t.match(/^\s*import\s/);case"typescript":case"typescriptreact":case"javascript":case"javascriptreact":return!!t.match(/^\s*import[\s{*]|^\s*[var|const|let].*=\s*require\(/);case"php":return!!t.match(/^\s*use/);case"rust":return!!t.match(/^\s*use\s+[\w:{}, ]+\s*(as\s+\w+)?;/);case"python":return!!t.match(/^\s*from\s+[\w.]+\s+import\s+[\w, *]+$/)||!!t.match(/^\s*import\s+[\w, ]+$/);default:return!1}}a(wva,"isImportStatement")});var Cli=T(hlt=>{"use strict";f();Object.defineProperty(hlt,"__esModule",{value:!0});hlt.IgnoreImportChangesAspect=void 0;var Eli=ver(),Rva=Lc(),_li=yli(),Khr=class t{static{a(this,"IgnoreImportChangesAspect")}static isImportChange(e,r,n){return e.newLines.some(o=>(0,_li.isImportStatement)(o,r))||Pva(e,n).some(o=>(0,_li.isImportStatement)(o,r))}static filterEdit(e,r,n=Eli.ImportChanges.None){if(n===Eli.ImportChanges.All)return r;let o=e.languageId,s=e.documentLinesBeforeEdit;return r.filter(l=>!t.isImportChange(l,o,s))}};hlt.IgnoreImportChangesAspect=Khr;function Pva(t,e){return(0,Rva.coalesce)(t.lineRange.mapToLineArray(r=>e[r-1]))}a(Pva,"getOldLines")});var vli=T(mlt=>{"use strict";f();Object.defineProperty(mlt,"__esModule",{value:!0});mlt.DiagnosticData=void 0;var kva=fk(),Jhr=class{static{a(this,"DiagnosticData")}constructor(e,r,n,o,s,c){this.documentUri=e,this.message=r,this.severity=n,this.range=o,this.code=s,this.source=c}toString(){return`${this.severity.toUpperCase()}: ${this.message} (${this.range})`}equals(e){return(0,kva.isEqual)(this.documentUri,e.documentUri)&&this.message===e.message&&this.severity===e.severity&&this.range.equals(e.range)&&this.code===e.code&&this.source===e.source}};mlt.DiagnosticData=Jhr});var JK=T(Dde=>{"use strict";f();Object.defineProperty(Dde,"__esModule",{value:!0});Dde.ResponseTags=Dde.PromptTags=void 0;var bli;(function(t){t.CURSOR="<|cursor|>";function e(n){return{start:`<|${n}|>`,end:`<|/${n}|>`}}a(e,"createTag"),t.EDIT_WINDOW=e("code_to_edit"),t.AREA_AROUND=e("area_around_code_to_edit"),t.CURRENT_FILE=e("current_file_content"),t.CURSOR_LOCATION=e("cursor_location"),t.EDIT_HISTORY=e("edit_diff_history"),t.RECENT_FILES=e("recently_viewed_code_snippets"),t.RECENT_FILE=e("recently_viewed_code_snippet");function r(n){return e(n)}a(r,"createLintTag"),t.createLintTag=r})(bli||(Dde.PromptTags=bli={}));var Tli;(function(t){t.NO_EDIT="",t.NO_CHANGE={start:""},t.EDIT={start:"",end:""},t.INSERT={start:"",end:""}})(Tli||(Dde.ResponseTags=Tli={}))});var rmr=T(ZB=>{"use strict";f();var Dva=ZB&&ZB.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Nva=ZB&&ZB.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(ZB,"__esModule",{value:!0});ZB.LintErrors=void 0;var Mva=vli(),nI=ky(),Ova=nK(),Bva=Ko(),Xhr=fk(),Lva=ff(),Ili=wu(),Fva=kp(),Uva=JK(),emr=class{static{a(this,"LintErrors")}constructor(e,r,n,o){this._documentId=e,this._document=r,this._langDiagService=n,this._xtabHistory=o}_diagnostics(e){let r=e?[[e,this._langDiagService.getDiagnostics(e)]]:this._langDiagService.getAllDiagnostics(),n=this._documentId.toUri();return r.map(o=>{let[s,c]=o;return c.map(l=>{let u=new Lva.Range(l.range.start.line+1,l.range.start.character+1,l.range.end.line+1,l.range.end.character+1),d=(0,Xhr.isEqual)(n,s)?Alt.fromPositions(u.getStartPosition(),this._document.cursorPosition):void 0;return new tmr(s,l.message,l.severity===Fva.DiagnosticSeverity.Error?"error":"warning",d,u,this._document.transformer.getOffsetRange(u),l.code&&typeof l.code!="number"&&typeof l.code!="string"?l.code.value:l.code,l.source)})}).flat()}_getRelevantDiagnostics(e,r){let n=this._diagnostics(r);return n=Hva(n,e.maxLineDistance),n=Sli(n),n=Zhr(n,e.warnings),n.slice(0,e.maxLints)}getFormattedLintErrors(e){let r=this._getRelevantDiagnostics(e,this._documentId.toUri()),n;if(e.nRecentFiles>0&&this._xtabHistory){let l=this._collectRecentFileUris(e.nRecentFiles),u=this._getRecentFileDiagnostics(l,e);n=[...r,...u].slice(0,e.maxLints)}else n=r;this._previousFormttedDiagnostics=n;let o=this._documentId.toUri(),s=n.map(l=>{let d=(0,Xhr.isEqual)(l.documentUri,o)?e:{...e,showCode:nI.LintOptionShowCode.NO};return glt(l,this._document.lines,d)}).join(` +`),c=Uva.PromptTags.createLintTag(e.tagName);return`${c.start} ${s} -${c.end}`}_collectRecentFileUris(e){if(!this._xtabHistory)return[];let r=[],n=new Set,o=this._documentId;for(let s=this._xtabHistory.length-1;s>=0;--s){let c=this._xtabHistory[s];if(!(c.docId===o||n.has(c.docId))&&(r.push(c.docId.toUri()),n.add(c.docId),r.length>=e))break}return r}_getRecentFileDiagnostics(e,r){let n=[];for(let o of e){let s=this._diagnostics(o);s=Dhr(s,r.warnings),s=s.slice().sort((c,l)=>c.documentRange.startLineNumber-l.documentRange.startLineNumber),n.push(...s)}return n}lineNumberInPreviousFormattedPrompt(e,r){if(!this._previousFormttedDiagnostics)throw new O_a.BugIndicatingError("No previous formatted diagnostics available to check line number against.");let n=this._documentId.toUri();for(let o of this._previousFormttedDiagnostics){if(!(0,Nhr.isEqual)(o.documentUri,n))continue;if(o.documentRange.getStartPosition().lineNumber-1===r)return!0;if(e.showCode===mI.LintOptionShowCode.NO)continue;if(wci(o.documentRange,e).contains(r))return!0}return!1}getData(){let e={tagName:"telemetry",warnings:mI.LintOptionWarning.YES,showCode:mI.LintOptionShowCode.NO,maxLints:Number.MAX_SAFE_INTEGER,maxLineDistance:Number.MAX_SAFE_INTEGER,nRecentFiles:0},r=this._diagnostics(void 0);r=Dhr(r,mI.LintOptionWarning.YES),r=Ici(r),r=r.slice(0,20);let n=r.map(o=>({uri:o.documentUri.toString(),line:o.documentRange.startLineNumber,column:o.documentRange.startColumn,endLine:o.documentRange.endLineNumber,endColumn:o.documentRange.endColumn,severity:o.severity,message:o.message,code:o.code,source:o.source,lineDistance:o.distance?.lineDistance,formatted:lut(o,this._document.lines,e),formattedCode:lut(o,this._document.lines,{...e,showCode:mI.LintOptionShowCode.YES}),formattedCodeWithSurrounding:lut(o,this._document.lines,{...e,showCode:mI.LintOptionShowCode.YES_WITH_SURROUNDING})}));return JSON.stringify(n)}};A3.LintErrors=Mhr;A3.LintErrors=Mhr=k_a([N_a(2,M_a.ILanguageDiagnosticsService)],Mhr);function lut(t,e,r){let n=U_a(t,t.documentRange);if(r.showCode===mI.LintOptionShowCode.NO)return n;let o=Q_a(t.documentRange,r,e);return n+` +${c.end}`}_collectRecentFileUris(e){if(!this._xtabHistory)return[];let r=[],n=new Set,o=this._documentId;for(let s=this._xtabHistory.length-1;s>=0;--s){let c=this._xtabHistory[s];if(!(c.docId===o||n.has(c.docId))&&(r.push(c.docId.toUri()),n.add(c.docId),r.length>=e))break}return r}_getRecentFileDiagnostics(e,r){let n=[];for(let o of e){let s=this._diagnostics(o);s=Zhr(s,r.warnings),s=s.slice().sort((c,l)=>c.documentRange.startLineNumber-l.documentRange.startLineNumber),n.push(...s)}return n}lineNumberInPreviousFormattedPrompt(e,r){if(!this._previousFormttedDiagnostics)throw new Bva.BugIndicatingError("No previous formatted diagnostics available to check line number against.");let n=this._documentId.toUri();for(let o of this._previousFormttedDiagnostics){if(!(0,Xhr.isEqual)(o.documentUri,n))continue;if(o.documentRange.getStartPosition().lineNumber-1===r)return!0;if(e.showCode===nI.LintOptionShowCode.NO)continue;if(xli(o.documentRange,e).contains(r))return!0}return!1}getData(){let e={tagName:"telemetry",warnings:nI.LintOptionWarning.YES,showCode:nI.LintOptionShowCode.NO,maxLints:Number.MAX_SAFE_INTEGER,maxLineDistance:Number.MAX_SAFE_INTEGER,nRecentFiles:0},r=this._diagnostics(void 0);r=Zhr(r,nI.LintOptionWarning.YES),r=Sli(r),r=r.slice(0,20);let n=r.map(o=>({uri:o.documentUri.toString(),line:o.documentRange.startLineNumber,column:o.documentRange.startColumn,endLine:o.documentRange.endLineNumber,endColumn:o.documentRange.endColumn,severity:o.severity,message:o.message,code:o.code,source:o.source,lineDistance:o.distance?.lineDistance,formatted:glt(o,this._document.lines,e),formattedCode:glt(o,this._document.lines,{...e,showCode:nI.LintOptionShowCode.YES}),formattedCodeWithSurrounding:glt(o,this._document.lines,{...e,showCode:nI.LintOptionShowCode.YES_WITH_SURROUNDING})}));return JSON.stringify(n)}};ZB.LintErrors=emr;ZB.LintErrors=emr=Dva([Nva(2,Ova.ILanguageDiagnosticsService)],emr);function glt(t,e,r){let n=Qva(t,t.documentRange);if(r.showCode===nI.LintOptionShowCode.NO)return n;let o=qva(t.documentRange,r,e);return n+` `+o.join(` -`)}a(lut,"formatSingleDiagnostic");function U_a(t,e){let r="";t.code&&(r=` ${t.source?t.source.toUpperCase():""}${t.code}`);let n=e.getStartPosition();return`${n.lineNumber-1}:${n.column-1} - ${t.severity}${r}: ${t.message}`}a(U_a,"formatDiagnosticMessage");function Q_a(t,e,r){let o=wci(t,e).intersect(new xci.OffsetRange(0,r.length));if(!o)return[];let s=[];for(let c=o.start;cr.distance?.lineDistance!==void 0&&r.distance.lineDistance<=e)}a(G_a,"filterDiagnosticsByDistance");function Ici(t){return t.slice().sort((e,r)=>e.distance===void 0&&r.distance===void 0?0:e.distance===void 0?1:r.distance===void 0?-1:uut.compareFn(e.distance,r.distance))}a(Ici,"sortDiagnosticsByDistance");function Dhr(t,e){switch(e){case mI.LintOptionWarning.NO:return t.filter(r=>r.severity==="error");case mI.LintOptionWarning.YES:return t.filter(r=>r.severity==="error"||r.severity==="warning");case mI.LintOptionWarning.YES_IF_NO_ERRORS:{let r=t.filter(n=>n.severity==="error");return r.length>0?r:t.filter(n=>n.severity==="error"||n.severity==="warning")}}}a(Dhr,"filterDiagnosticsBySeverity");var uut=class t{static{a(this,"CursorDistance")}static compareFn(e,r){return e.lineDistance!==r.lineDistance?e.lineDistance-r.lineDistance:e.columnDistance-r.columnDistance}static fromPositions(e,r){return new t(Math.abs(e.lineNumber-r.lineNumber),Math.abs(e.column-r.column))}constructor(e,r){this.lineDistance=e,this.columnDistance=r}},Ohr=class extends D_a.DiagnosticData{static{a(this,"DiagnosticDataWithDistance")}constructor(e,r,n,o,s,c,l,u){super(e,r,n,c,l,u),this.distance=o,this.documentRange=s}}});var Efe=T(dut=>{"use strict";f();Object.defineProperty(dut,"__esModule",{value:!0});dut.toUniquePath=j_a;dut.countTokensForLines=$_a;var H_a=T$();function j_a(t,e){let r=t.path,n=e===void 0?void 0:e.endsWith("/")?e:e+"/",o=n!==void 0&&r.startsWith(n)?r.substring(n.length):r;return t.toUri().scheme===H_a.Schemas.vscodeNotebookCell?`${o}#${t.fragment}`:o}a(j_a,"toUniquePath");function $_a(t,e){return t.reduce((r,n)=>r+e(n)+1,0)}a($_a,"countTokensForLines")});var Rci=T(Lhr=>{"use strict";f();Object.defineProperty(Lhr,"__esModule",{value:!0});Lhr.getEditDiffHistory=z_a;var V_a=t2(),HQ=jc(),W_a=Efe();function z_a(t,e,r,n,{onlyForDocsInPrompt:o,maxTokens:s,nEntries:c,useRelativePaths:l}){let u=l?t.workspaceRoot?.path:void 0,d=e.slice().reverse(),p=s,h=0,m=[];for(let y of d){if(m.length>=c)break;if(y.kind==="visibleRanges"||o&&!r.has(y.docId))continue;let E=Y_a(y,u);if(E===null)continue;let _=n(E);if(p-=_,p<0)break;h+=_,m.push(E)}let g=m.reverse(),A=g.join(` +`)}a(glt,"formatSingleDiagnostic");function Qva(t,e){let r="";t.code&&(r=` ${t.source?t.source.toUpperCase():""}${t.code}`);let n=e.getStartPosition();return`${n.lineNumber-1}:${n.column-1} - ${t.severity}${r}: ${t.message}`}a(Qva,"formatDiagnosticMessage");function qva(t,e,r){let o=xli(t,e).intersect(new Ili.OffsetRange(0,r.length));if(!o)return[];let s=[];for(let c=o.start;cr.distance?.lineDistance!==void 0&&r.distance.lineDistance<=e)}a(Hva,"filterDiagnosticsByDistance");function Sli(t){return t.slice().sort((e,r)=>e.distance===void 0&&r.distance===void 0?0:e.distance===void 0?1:r.distance===void 0?-1:Alt.compareFn(e.distance,r.distance))}a(Sli,"sortDiagnosticsByDistance");function Zhr(t,e){switch(e){case nI.LintOptionWarning.NO:return t.filter(r=>r.severity==="error");case nI.LintOptionWarning.YES:return t.filter(r=>r.severity==="error"||r.severity==="warning");case nI.LintOptionWarning.YES_IF_NO_ERRORS:{let r=t.filter(n=>n.severity==="error");return r.length>0?r:t.filter(n=>n.severity==="error"||n.severity==="warning")}}}a(Zhr,"filterDiagnosticsBySeverity");var Alt=class t{static{a(this,"CursorDistance")}static compareFn(e,r){return e.lineDistance!==r.lineDistance?e.lineDistance-r.lineDistance:e.columnDistance-r.columnDistance}static fromPositions(e,r){return new t(Math.abs(e.lineNumber-r.lineNumber),Math.abs(e.column-r.column))}constructor(e,r){this.lineDistance=e,this.columnDistance=r}},tmr=class extends Mva.DiagnosticData{static{a(this,"DiagnosticDataWithDistance")}constructor(e,r,n,o,s,c,l,u){super(e,r,n,c,l,u),this.distance=o,this.documentRange=s}}});var Nde=T(ylt=>{"use strict";f();Object.defineProperty(ylt,"__esModule",{value:!0});ylt.toUniquePath=$va;ylt.countTokensForLines=Vva;var jva=kj();function $va(t,e){let r=t.path,n=e===void 0?void 0:e.endsWith("/")?e:e+"/",o=n!==void 0&&r.startsWith(n)?r.substring(n.length):r;return t.toUri().scheme===jva.Schemas.vscodeNotebookCell?`${o}#${t.fragment}`:o}a($va,"toUniquePath");function Vva(t,e){return t.reduce((r,n)=>r+e(n)+1,0)}a(Vva,"countTokensForLines")});var wli=T(nmr=>{"use strict";f();Object.defineProperty(nmr,"__esModule",{value:!0});nmr.getEditDiffHistory=Yva;var Wva=jR(),gQ=Lc(),zva=Nde();function Yva(t,e,r,n,{onlyForDocsInPrompt:o,maxTokens:s,nEntries:c,useRelativePaths:l}){let u=l?t.workspaceRoot?.path:void 0,d=e.slice().reverse(),p=s,h=0,m=[];for(let y of d){if(m.length>=c)break;if(y.kind==="visibleRanges"||o&&!r.has(y.docId))continue;let E=Kva(y,u);if(E===null)continue;let _=n(E);if(p-=_,p<0)break;h+=_,m.push(E)}let g=m.reverse(),A=g.join(` `);return g.length>0&&(A+=` -`),{promptPiece:A,nDiffs:m.length,totalTokens:h}}a(z_a,"getEditDiffHistory");function Y_a(t,e){let r=[],n=V_a.RootedEdit.toLineEdit(t.edit),o=t.edit.base.getLines();for(let u of(0,HQ.groupAdjacentBy)(n.replacements,(d,p)=>d.lineRange.endLineNumberExclusive>=p.lineRange.startLineNumber)){let d=[],p=[],h=u[0].lineRange.startLineNumber;for(let g of u){if(hg.trim().length===0)&&p.every(g=>g.trim().length===0))continue;let m=u[0].lineRange.startLineNumber-1;r.push(`@@ -${m},${d.length} +${m},${p.length} @@`),(0,HQ.pushMany)(r,d.map(g=>`-${g}`)),(0,HQ.pushMany)(r,p.map(g=>`+${g}`))}if(r.length===0)return null;let s=(0,W_a.toUniquePath)(t.docId,e),c=[`--- ${s}`,`+++ ${s}`];return(0,HQ.pushMany)(c,r),c.join(` -`)}a(Y_a,"generateDocDiff")});var Fhr=T(jQ=>{"use strict";f();Object.defineProperty(jQ,"__esModule",{value:!0});jQ.count=K_a;jQ.findInsertionIndexInSortedArray=J_a;jQ.max=X_a;jQ.filterMap=Z_a;jQ.min=e1a;jQ.batchArrayElements=t1a;function K_a(t,e){let r=0;for(let n of t)e(n)&&r++;return r}a(K_a,"count");function J_a(t,e,r){let n=0,o=t.length;for(;n>>1;r(t[s],e)?n=s+1:o=s}return n}a(J_a,"findInsertionIndexInSortedArray");function X_a(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n0&&(r=o)}return r}a(X_a,"max");function Z_a(t,e){let r=[];for(let n of t){let o=e(n);o!=null&&r.push(o)}return r}a(Z_a,"filterMap");function e1a(t){if(t.length===0)return 1/0;let e=t[0];for(let r=1;r{"use strict";f();var r1a=Eb&&Eb.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),n1a=Eb&&Eb.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),i1a=Eb&&Eb.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oNci(m.entries)):u=p1a(e,t.id,s,c).map(m=>m1a(m,l));let{snippets:d,docsInPrompt:p}=Bci(u,n,o);return r&&g1a(r,d,o.languageContext.maxTokens,n,o.recentlyViewedDocuments.includeLineNumbers),{codeSnippets:d.join(` +`),{promptPiece:A,nDiffs:m.length,totalTokens:h}}a(Yva,"getEditDiffHistory");function Kva(t,e){let r=[],n=Wva.RootedEdit.toLineEdit(t.edit),o=t.edit.base.getLines();for(let u of(0,gQ.groupAdjacentBy)(n.replacements,(d,p)=>d.lineRange.endLineNumberExclusive>=p.lineRange.startLineNumber)){let d=[],p=[],h=u[0].lineRange.startLineNumber;for(let g of u){if(hg.trim().length===0)&&p.every(g=>g.trim().length===0))continue;let m=u[0].lineRange.startLineNumber-1;r.push(`@@ -${m},${d.length} +${m},${p.length} @@`),(0,gQ.pushMany)(r,d.map(g=>`-${g}`)),(0,gQ.pushMany)(r,p.map(g=>`+${g}`))}if(r.length===0)return null;let s=(0,zva.toUniquePath)(t.docId,e),c=[`--- ${s}`,`+++ ${s}`];return(0,gQ.pushMany)(c,r),c.join(` +`)}a(Kva,"generateDocDiff")});var imr=T(AQ=>{"use strict";f();Object.defineProperty(AQ,"__esModule",{value:!0});AQ.count=Jva;AQ.findInsertionIndexInSortedArray=Xva;AQ.max=Zva;AQ.filterMap=eba;AQ.min=tba;AQ.batchArrayElements=rba;function Jva(t,e){let r=0;for(let n of t)e(n)&&r++;return r}a(Jva,"count");function Xva(t,e,r){let n=0,o=t.length;for(;n>>1;r(t[s],e)?n=s+1:o=s}return n}a(Xva,"findInsertionIndexInSortedArray");function Zva(t,e){if(t.length===0)return;let r=t[0];for(let n=1;n0&&(r=o)}return r}a(Zva,"max");function eba(t,e){let r=[];for(let n of t){let o=e(n);o!=null&&r.push(o)}return r}a(eba,"filterMap");function tba(t){if(t.length===0)return 1/0;let e=t[0];for(let r=1;r{"use strict";f();var nba=sb&&sb.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iba=sb&&sb.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),oba=sb&&sb.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;okli(m.entries)):u=hba(e,t.id,s,c).map(m=>gba(m,l));let{snippets:d,docsInPrompt:p}=Oli(u,n,o);return r&&Aba(r,d,o.languageContext.maxTokens,n,o.recentlyViewedDocuments.includeLineNumbers),{codeSnippets:d.join(` -`),documents:p}}a(d1a,"getRecentCodeSnippets");function f1a(t,e,r){switch(e){case Uhr.IncludeLineNumbersOption.WithSpaceAfter:return t.map((n,o)=>`${r+o}| ${n}`);case Uhr.IncludeLineNumbersOption.WithoutSpace:return t.map((n,o)=>`${r+o}|${n}`);case Uhr.IncludeLineNumbersOption.None:return t;default:(0,a1a.assertNever)(e)}}a(f1a,"formatLinesWithLineNumbers");function qhr(t,e,r){let n=(0,Qhr.toUniquePath)(t,void 0),o=r.truncated?`code_snippet_file_path: ${n} (truncated)`:`code_snippet_file_path: ${n}`,c=f1a(e,r.includeLineNumbers,r.startLineOffset).join(` -`);return[Pci.PromptTags.RECENT_FILE.start,o,c,Pci.PromptTags.RECENT_FILE.end].join(` -`)}a(qhr,"formatCodeSnippet");function p1a(t,e,r,n){let o=[],s=new Set;for(let c=t.length-1;c>=0;--c){let l=t[c];if(!(!r&&l.kind==="visibleRanges")&&!(l.docId===e||s.has(l.docId))&&(o.push(l),s.add(l.docId),o.length>=n))break}return o}a(p1a,"collectRecentDocuments");function h1a(t,e,r,n){let o=[],s=new Map;for(let c=t.length-1;c>=0;--c){let l=t[c];if(!r&&l.kind==="visibleRanges"||l.docId===e)continue;let u=s.get(l.docId);if(u)u.push(l);else{if(o.length>=n)continue;o.push(l.docId),s.set(l.docId,[l])}}return o.map(c=>({docId:c,entries:s.get(c)}))}a(h1a,"collectRecentDocumentsGrouped");function Ghr(t,e,r){if(t.length<=1)return t;let n=[t[0]],o=e(t[0].start),s=e(Math.max(t[0].start,t[0].endExclusive-1));for(let c=1;cr)break;n.push(l),o=p,s=h}return n}a(Ghr,"selectFocalRangesWithinSpanCap");function m1a(t,e){if(t.kind==="edit"){let r=t.edit.edit.applyOnText(t.edit.base),n=e!==fut.RecentFileClippingStrategy.TopToBottom;return{id:t.docId,content:r,focalRanges:n?t.edit.edit.getNewRanges():void 0,editEntryCount:1}}return{id:t.docId,content:t.documentContent,focalRanges:t.visibleRanges}}a(m1a,"historyEntryToCodeSnippet");function Nci(t){let e=t[0],r=e.kind==="edit"?e.edit.edit.applyOnText(e.edit.base):e.documentContent,n=[];for(let s of t)s.kind==="edit"&&n.push(s);let o=[];for(let s=0;s=0;l--)c=c.map(u=>n[l].edit.edit.applyToOffsetRange(u));o.push(...c)}return{id:e.docId,content:r,focalRanges:o.length>0?o:void 0,editEntryCount:Math.max(n.length,1)}}a(Nci,"historyEntriesToCodeSnippet");function g1a(t,e,r,n,o){for(let s of t.items){if(s.onTimeout)continue;let c=s.context;if(c.kind===s1a.ContextKind.Snippet){let l=c.value,u=r-n(l);if(u<0)break;let d=o1a.DocumentId.create(c.uri.toString());e.push(qhr(d,l.split(/\r?\n/),{truncated:!1,includeLineNumbers:o,startLineOffset:0})),r=u}}}a(g1a,"appendLanguageContextSnippets");function Dci(t,e,r,n,o,s,c){let l=n,u=[];for(let d of e){let p=l-(0,Qhr.countTokensForLines)(d,o);if(p<0)break;u.push(...d),l=p}if(u.length>0){let d=u.length!==r;c.docsInPrompt.add(t.id),c.snippets.push(qhr(t.id,u,{truncated:d,includeLineNumbers:s,startLineOffset:0}))}return l}a(Dci,"clipFullDocument");function Mci(t,e,r,n){let o=t.getTransformer(),s=r*3,c=Ghr(e,y=>o.getPosition(y).lineNumber,s);if(c.length===0)return;let l=Math.min(...c.map(y=>y.start)),u=Math.max(...c.map(y=>y.endExclusive-1)),d=o.getPosition(l).lineNumber,p=o.getPosition(u).lineNumber,h=t.getLines(),m=Math.floor((d-1)/r),g=Math.floor((p-1)/r),A=0;for(let y=m;y<=g;y++){let E=y*r,_=Math.min(E+r,h.length);A+=(0,Qhr.countTokensForLines)(h.slice(E,_),n)}return A}a(Mci,"computeFocalPageCost");function Oci(t,e,r,n,o,s,c){if(n<=0)return;let l=t.content.getTransformer(),u=e*3,d=Ghr(t.focalRanges,b=>l.getPosition(b).lineNumber,u);if(d.length===0)return n;let p=Math.min(...d.map(b=>b.start)),h=Math.max(...d.map(b=>b.endExclusive-1)),m=l.getPosition(p),g=l.getPosition(h),{firstPageIdx:A,lastPageIdxIncl:y,budgetLeft:E}=(0,u1a.expandRangeToPageRange)(t.content.getLines(),new l1a.OffsetRange(m.lineNumber-1,g.lineNumber),e,n,o,!1);if(E===n||E<0)return;let _=A*e,v=t.content.getLines().slice(_,(y+1)*e);return c.docsInPrompt.add(t.id),c.snippets.push(qhr(t.id,v,{truncated:v.lengthy.focalRanges!==void 0&&y.focalRanges.length>0?Mci(y.content,y.focalRanges,n,e)??0:0),u=t.length,d=l.reduce((y,E)=>y+E,0);for(;u>0&&d>s;)u--,d-=l[u];if(u===0)return{snippets:[],docsInPrompt:new Set};let p=s-d,h=t.slice(0,u).map(y=>y.editEntryCount??1),m=h.reduce((y,E)=>y+E,0),g=h.map(y=>Math.floor(p*(y/m))),A=0;for(let y=0;y0)A=Oci(E,n,_.length,v,e,c,o)??v;else{let b=(0,kci.batchArrayElements)(_,n);A=Dci(E,b,_.length,v,e,c,o)}}return{snippets:o.snippets.reverse(),docsInPrompt:o.docsInPrompt}}a(y1a,"buildCodeSnippetsWithProportionalBudget")});var put=T(ju=>{"use strict";f();var E1a=ju&&ju.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),C1a=ju&&ju.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_1a=ju&&ju.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o`${r+o}| ${n}`);case omr.IncludeLineNumbersOption.WithoutSpace:return t.map((n,o)=>`${r+o}|${n}`);case omr.IncludeLineNumbersOption.None:return t;default:(0,cba.assertNever)(e)}}a(pba,"formatLinesWithLineNumbers");function amr(t,e,r){let n=(0,smr.toUniquePath)(t,void 0),o=r.truncated?`code_snippet_file_path: ${n} (truncated)`:`code_snippet_file_path: ${n}`,c=pba(e,r.includeLineNumbers,r.startLineOffset).join(` +`);return[Rli.PromptTags.RECENT_FILE.start,o,c,Rli.PromptTags.RECENT_FILE.end].join(` +`)}a(amr,"formatCodeSnippet");function hba(t,e,r,n){let o=[],s=new Set;for(let c=t.length-1;c>=0;--c){let l=t[c];if(!(!r&&l.kind==="visibleRanges")&&!(l.docId===e||s.has(l.docId))&&(o.push(l),s.add(l.docId),o.length>=n))break}return o}a(hba,"collectRecentDocuments");function mba(t,e,r,n){let o=[],s=new Map;for(let c=t.length-1;c>=0;--c){let l=t[c];if(!r&&l.kind==="visibleRanges"||l.docId===e)continue;let u=s.get(l.docId);if(u)u.push(l);else{if(o.length>=n)continue;o.push(l.docId),s.set(l.docId,[l])}}return o.map(c=>({docId:c,entries:s.get(c)}))}a(mba,"collectRecentDocumentsGrouped");function cmr(t,e,r){if(t.length<=1)return t;let n=[t[0]],o=e(t[0].start),s=e(Math.max(t[0].start,t[0].endExclusive-1));for(let c=1;cr)break;n.push(l),o=p,s=h}return n}a(cmr,"selectFocalRangesWithinSpanCap");function gba(t,e){if(t.kind==="edit"){let r=t.edit.edit.applyOnText(t.edit.base),n=e!==Elt.RecentFileClippingStrategy.TopToBottom;return{id:t.docId,content:r,focalRanges:n?t.edit.edit.getNewRanges():void 0,editEntryCount:1}}return{id:t.docId,content:t.documentContent,focalRanges:t.visibleRanges}}a(gba,"historyEntryToCodeSnippet");function kli(t){let e=t[0],r=e.kind==="edit"?e.edit.edit.applyOnText(e.edit.base):e.documentContent,n=[];for(let s of t)s.kind==="edit"&&n.push(s);let o=[];for(let s=0;s=0;l--)c=c.map(u=>n[l].edit.edit.applyToOffsetRange(u));o.push(...c)}return{id:e.docId,content:r,focalRanges:o.length>0?o:void 0,editEntryCount:Math.max(n.length,1)}}a(kli,"historyEntriesToCodeSnippet");function Aba(t,e,r,n,o){for(let s of t.items){if(s.onTimeout)continue;let c=s.context;if(c.kind===aba.ContextKind.Snippet){let l=c.value,u=r-n(l);if(u<0)break;let d=sba.DocumentId.create(c.uri.toString());e.push(amr(d,l.split(/\r?\n/),{truncated:!1,includeLineNumbers:o,startLineOffset:0})),r=u}}}a(Aba,"appendLanguageContextSnippets");function Dli(t,e,r,n,o,s,c){let l=n,u=[];for(let d of e){let p=l-(0,smr.countTokensForLines)(d,o);if(p<0)break;u.push(...d),l=p}if(u.length>0){let d=u.length!==r;c.docsInPrompt.add(t.id),c.snippets.push(amr(t.id,u,{truncated:d,includeLineNumbers:s,startLineOffset:0}))}return l}a(Dli,"clipFullDocument");function Nli(t,e,r,n){let o=t.getTransformer(),s=r*3,c=cmr(e,y=>o.getPosition(y).lineNumber,s);if(c.length===0)return;let l=Math.min(...c.map(y=>y.start)),u=Math.max(...c.map(y=>y.endExclusive-1)),d=o.getPosition(l).lineNumber,p=o.getPosition(u).lineNumber,h=t.getLines(),m=Math.floor((d-1)/r),g=Math.floor((p-1)/r),A=0;for(let y=m;y<=g;y++){let E=y*r,_=Math.min(E+r,h.length);A+=(0,smr.countTokensForLines)(h.slice(E,_),n)}return A}a(Nli,"computeFocalPageCost");function Mli(t,e,r,n,o,s,c){if(n<=0)return;let l=t.content.getTransformer(),u=e*3,d=cmr(t.focalRanges,b=>l.getPosition(b).lineNumber,u);if(d.length===0)return n;let p=Math.min(...d.map(b=>b.start)),h=Math.max(...d.map(b=>b.endExclusive-1)),m=l.getPosition(p),g=l.getPosition(h),{firstPageIdx:A,lastPageIdxIncl:y,budgetLeft:E}=(0,dba.expandRangeToPageRange)(t.content.getLines(),new uba.OffsetRange(m.lineNumber-1,g.lineNumber),e,n,o,!1);if(E===n||E<0)return;let _=A*e,v=t.content.getLines().slice(_,(y+1)*e);return c.docsInPrompt.add(t.id),c.snippets.push(amr(t.id,v,{truncated:v.lengthy.focalRanges!==void 0&&y.focalRanges.length>0?Nli(y.content,y.focalRanges,n,e)??0:0),u=t.length,d=l.reduce((y,E)=>y+E,0);for(;u>0&&d>s;)u--,d-=l[u];if(u===0)return{snippets:[],docsInPrompt:new Set};let p=s-d,h=t.slice(0,u).map(y=>y.editEntryCount??1),m=h.reduce((y,E)=>y+E,0),g=h.map(y=>Math.floor(p*(y/m))),A=0;for(let y=0;y0)A=Mli(E,n,_.length,v,e,c,o)??v;else{let b=(0,Pli.batchArrayElements)(_,n);A=Dli(E,b,_.length,v,e,c,o)}}return{snippets:o.snippets.reverse(),docsInPrompt:o.docsInPrompt}}a(Eba,"buildCodeSnippetsWithProportionalBudget")});var _lt=T(Mu=>{"use strict";f();var _ba=Mu&&Mu.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cba=Mu&&Mu.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vba=Mu&&Mu.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o=0&&t[s]===` +\`\`\``}a(wba,"wrapInBackticks");function Rba(t,e,r){return r==="before"?Fli(t,e,2):Fli(e,t,2)}a(Rba,"addRelatedInformation");function Fli(t,e,r){let n=0;for(let s=t.length-1;s>=0&&t[s]===` `;s--)n++;for(let s=0;s, , or . If you are making an edit, start with and then provide the rewritten code window followed by . If you are inserting new code, start with and then provide only the new code that will be inserted at the cursor position followed by . If no changes are necessary, reply only with . Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;break;case Up.PromptingStrategy.Nes41Miniv3:n=`The developer was working on a section of code within the tags <|code_to_edit|> in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`<|cursor|>\`, please continue the developer's work. Update the <|code_to_edit|> section by predicting and completing the changes they would have made next. Start your response with or . If you are making an edit, start with and then provide the rewritten code window followed by . If no changes are necessary, reply only with . Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;break;case Up.PromptingStrategy.Xtab275EditIntentShort:case Up.PromptingStrategy.Xtab275EditIntent:case Up.PromptingStrategy.Xtab275:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Hu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Hu.PromptTags.EDIT_WINDOW.start}\` and \`${Hu.PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy.`;break;case Up.PromptingStrategy.XtabAggressiveness:n=`<|aggressive|>${r}<|/aggressive|>`;break;case Up.PromptingStrategy.Xtab275Aggressiveness:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Hu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Hu.PromptTags.EDIT_WINDOW.start}\` and \`${Hu.PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy. -<|aggressive|>${r}<|/aggressive|>`;break;case Up.PromptingStrategy.PatchBased:n='Output a modified diff style format with the changes you want. Each change patch must start with `:` and then include some non empty "anchor lines" preceded by `-` and the new lines meant to replace them preceded by `+`. Put your changes in the order that makes the most sense, for example edits inside the code_to_edit region and near the user\'s <|cursor|> should always be prioritized. Output "" if you don\'t have a good edit candidate.';break;case Up.PromptingStrategy.SimplifiedSystemPrompt:case Up.PromptingStrategy.CopilotNesXtab:case void 0:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Hu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Hu.PromptTags.EDIT_WINDOW.start}\` and \`${Hu.PromptTags.EDIT_WINDOW.end}\` tags with the following format, but do not include the tags themselves. +`.repeat(o)+e).trim()}a(Fli,"appendWithNewLineIfNeeded");function Pba(t,e,r){let n;switch(t){case Np.PromptingStrategy.PatchBased01:case Np.PromptingStrategy.Codexv21NesUnified:break;case Np.PromptingStrategy.PatchBased02:n="The developer was working on a section of code within the `current_file_content` - carefully note their `cursor_location` marked with `<|cursor|>`. Using the given `recently_viewed_code_snippets`, `current_file_content`, `edit_diff_history`, and `cursor_location`, please continue the developer's work. Output a modified diff format with a sequence of intuitive next changes, where each patch must start with `:`. Order changes by priority and flow; for instance, edits adjacent to the user's cursor should always be prioritized, followed by lines near the cursor, followed by lines farther away. If there are no good edit candidates, output the empty string \"\". Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Adhere meticulously to the diff format.";break;case Np.PromptingStrategy.UnifiedModel:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Nu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Start your response with , , or . If you are making an edit, start with and then provide the rewritten code window followed by . If you are inserting new code, start with and then provide only the new code that will be inserted at the cursor position followed by . If no changes are necessary, reply only with . Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;break;case Np.PromptingStrategy.Nes41Miniv3:n=`The developer was working on a section of code within the tags <|code_to_edit|> in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`<|cursor|>\`, please continue the developer's work. Update the <|code_to_edit|> section by predicting and completing the changes they would have made next. Start your response with or . If you are making an edit, start with and then provide the rewritten code window followed by . If no changes are necessary, reply only with . Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;break;case Np.PromptingStrategy.Xtab275EditIntentShort:case Np.PromptingStrategy.Xtab275EditIntent:case Np.PromptingStrategy.Xtab275:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Nu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Nu.PromptTags.EDIT_WINDOW.start}\` and \`${Nu.PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy.`;break;case Np.PromptingStrategy.XtabAggressiveness:n=`<|aggressive|>${r}<|/aggressive|>`;break;case Np.PromptingStrategy.Xtab275Aggressiveness:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Nu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Nu.PromptTags.EDIT_WINDOW.start}\` and \`${Nu.PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy. +<|aggressive|>${r}<|/aggressive|>`;break;case Np.PromptingStrategy.PatchBased:n='Output a modified diff style format with the changes you want. Each change patch must start with `:` and then include some non empty "anchor lines" preceded by `-` and the new lines meant to replace them preceded by `+`. Put your changes in the order that makes the most sense, for example edits inside the code_to_edit region and near the user\'s <|cursor|> should always be prioritized. Output "" if you don\'t have a good edit candidate.';break;case Np.PromptingStrategy.SimplifiedSystemPrompt:case Np.PromptingStrategy.CopilotNesXtab:case void 0:n=`The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${e}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${Nu.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${Nu.PromptTags.EDIT_WINDOW.start}\` and \`${Nu.PromptTags.EDIT_WINDOW.end}\` tags with the following format, but do not include the tags themselves. \`\`\` // Your revised code goes here -\`\`\``;break;default:(0,Vhr.assertNever)(t)}return n===void 0?"":` +\`\`\``;break;default:(0,fmr.assertNever)(t)}return n===void 0?"":` -${n}`}a(R1a,"getPostScript");function P1a(t){if(t===void 0)return"";let e=t.items.filter(n=>n.context.kind===v1a.ContextKind.Trait).map(n=>n.context);if(e.length===0)return"";let r=[];for(let n of e)r.push(`${n.name}: ${n.value}`);return`Consider this related information: +${n}`}a(Pba,"getPostScript");function kba(t){if(t===void 0)return"";let e=t.items.filter(n=>n.context.kind===bba.ContextKind.Trait).map(n=>n.context);if(e.length===0)return"";let r=[];for(let n of e)r.push(`${n.name}: ${n.value}`);return`Consider this related information: ${r.join(` -`)}`}a(P1a,"getRelatedInformation");function k1a(t,e,r){if(!t.length)return[0,0];let n=r*4,o=0,s=e?t.length-1:0;for(;o=t.length)break;return e?[s+1,t.length]:[0,s]}a(k1a,"truncateCode");ju.N_LINES_ABOVE=2;ju.N_LINES_BELOW=5;ju.N_LINES_AS_CONTEXT=15;function qci(t,e,r,n,o,s){let c=Math.ceil(t.length/r);function l(m){let g=m*r,A=Math.min(g+r,t.length),y=t.slice(g,A);return(0,Whr.countTokensForLines)(y,o)}a(l,"computeTokensForPage");let u=Math.floor(e.start/r),d=Math.floor((e.endExclusive-1)/r),p=n-(0,b1a.range)(u,d+1).reduce((m,g)=>m+l(g),0);if(p<0)return{firstPageIdx:u,lastPageIdxIncl:d,budgetLeft:p};let h=p;if(s){h=p;for(let m=u-1;m>=0&&h>0;--m){let g=l(m),A=h-g;if(A<0)break;u=m,h=A}for(let m=d+1;m0;++m){let g=l(m),A=h-g;if(A<0)break;d=m,h=A}}else{let m=Math.floor(p/2);h=m;for(let g=u-1;g>=0&&h>0;--g){let A=l(g),y=h-A;if(y<0)break;u=g,h=y}h=m;for(let g=d+1;g0;++g){let A=l(g),y=h-A;if(y<0)break;d=g,h=y}}return{firstPageIdx:u,lastPageIdxIncl:d,budgetLeft:h}}a(qci,"expandRangeToPageRange");function Gci(t,e,r,n,o){let s=t.slice(e.start,e.endExclusive),c=o.maxTokens-(0,Whr.countTokensForLines)(s,r);if(c<0)return jhr.Result.error("outOfBudget");let{firstPageIdx:l,lastPageIdxIncl:u}=qci(t,e,n,c,r,o.prioritizeAboveCursor),d=l*n,p=(u+1)*n;return jhr.Result.ok(new Qci.OffsetRange(d,p))}a(Gci,"clipPreservingRange");var hut=class{static{a(this,"ClippedDocument")}constructor(e,r){this.lines=e,this.keptRange=r}};ju.ClippedDocument=hut;function Hci(t,e,r,n,o,s){let c=Gci(t,r,n,o,s);if(c.isError())return c;let l=c.val,u=[...t.slice(l.start,r.start),...e,...t.slice(r.endExclusive,l.endExclusive)],d=new Qci.OffsetRange(l.start,l.start+u.length);return jhr.Result.ok(new hut(u,d))}a(Hci,"createTaggedCurrentFileContentUsingPagedClipping");function Hhr(t,e){switch(e){case Cfe.IncludeLineNumbersOption.WithSpaceAfter:return t.map((r,n)=>`${n}| ${r}`);case Cfe.IncludeLineNumbersOption.WithoutSpace:return t.map((r,n)=>`${n}|${r}`);case Cfe.IncludeLineNumbersOption.None:return[...t];default:(0,Vhr.assertNever)(e)}}a(Hhr,"addLineNumbers");function N1a(t,e,r,n,o,s){let c=Fci.StringEdit.single(Fci.StringReplacement.insert(t.cursorOffset,Hu.PromptTags.CURSOR)).applyOnText(t.content).getLines(),l=Hhr(c,s.includeLineNumbers.areaAroundCodeToEdit),u=l.slice(e.start,e.endExclusive),d=[Hu.PromptTags.AREA_AROUND.start,...l.slice(r.start,e.start),Hu.PromptTags.EDIT_WINDOW.start,...u,Hu.PromptTags.EDIT_WINDOW.end,...l.slice(e.endExclusive,r.endExclusive),Hu.PromptTags.AREA_AROUND.end],p=n.currentFile.includeCursorTag?c:t.lines,h=Hhr(p,s.includeLineNumbers.currentFileContent),m=Hhr(t.lines,s.includeLineNumbers.currentFileContent),g;if(n.currentFile.includeTags&&s.includeLineNumbers.currentFileContent===s.includeLineNumbers.areaAroundCodeToEdit)g=d;else{let y=h.slice(e.start,e.endExclusive);g=[...h.slice(r.start,e.start),...y,...h.slice(e.endExclusive,r.endExclusive)]}return Hci(m,g,r,o,n.pagedClipping.pageSize,n.currentFile).map(y=>({clippedTaggedCurrentDoc:y,areaAroundCodeToEdit:d.join(` -`)}))}a(N1a,"constructTaggedFile")});var jci=T(gI=>{"use strict";f();Object.defineProperty(gI,"__esModule",{value:!0});gI.xtab275SystemPrompt=gI.simplifiedPrompt=gI.nes41Miniv3SystemPrompt=gI.unifiedModelSystemPrompt=gI.systemPromptTemplate=void 0;var $Q=jJ();gI.systemPromptTemplate=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the ${$Q.PromptTags.EDIT_WINDOW.start} and ${$Q.PromptTags.EDIT_WINDOW.end} tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. +`)}`}a(kba,"getRelatedInformation");function Dba(t,e,r){if(!t.length)return[0,0];let n=r*4,o=0,s=e?t.length-1:0;for(;o=t.length)break;return e?[s+1,t.length]:[0,s]}a(Dba,"truncateCode");Mu.N_LINES_ABOVE=2;Mu.N_LINES_BELOW=5;Mu.N_LINES_AS_CONTEXT=15;function Qli(t,e,r,n,o,s){let c=Math.ceil(t.length/r);function l(m){let g=m*r,A=Math.min(g+r,t.length),y=t.slice(g,A);return(0,pmr.countTokensForLines)(y,o)}a(l,"computeTokensForPage");let u=Math.floor(e.start/r),d=Math.floor((e.endExclusive-1)/r),p=n-(0,Tba.range)(u,d+1).reduce((m,g)=>m+l(g),0);if(p<0)return{firstPageIdx:u,lastPageIdxIncl:d,budgetLeft:p};let h=p;if(s){h=p;for(let m=u-1;m>=0&&h>0;--m){let g=l(m),A=h-g;if(A<0)break;u=m,h=A}for(let m=d+1;m0;++m){let g=l(m),A=h-g;if(A<0)break;d=m,h=A}}else{let m=Math.floor(p/2);h=m;for(let g=u-1;g>=0&&h>0;--g){let A=l(g),y=h-A;if(y<0)break;u=g,h=y}h=m;for(let g=d+1;g0;++g){let A=l(g),y=h-A;if(y<0)break;d=g,h=y}}return{firstPageIdx:u,lastPageIdxIncl:d,budgetLeft:h}}a(Qli,"expandRangeToPageRange");function qli(t,e,r,n,o){let s=t.slice(e.start,e.endExclusive),c=o.maxTokens-(0,pmr.countTokensForLines)(s,r);if(c<0)return umr.Result.error("outOfBudget");let{firstPageIdx:l,lastPageIdxIncl:u}=Qli(t,e,n,c,r,o.prioritizeAboveCursor),d=l*n,p=(u+1)*n;return umr.Result.ok(new Uli.OffsetRange(d,p))}a(qli,"clipPreservingRange");var Clt=class{static{a(this,"ClippedDocument")}constructor(e,r){this.lines=e,this.keptRange=r}};Mu.ClippedDocument=Clt;function Gli(t,e,r,n,o,s){let c=qli(t,r,n,o,s);if(c.isError())return c;let l=c.val,u=[...t.slice(l.start,r.start),...e,...t.slice(r.endExclusive,l.endExclusive)],d=new Uli.OffsetRange(l.start,l.start+u.length);return umr.Result.ok(new Clt(u,d))}a(Gli,"createTaggedCurrentFileContentUsingPagedClipping");function lmr(t,e){switch(e){case Mde.IncludeLineNumbersOption.WithSpaceAfter:return t.map((r,n)=>`${n}| ${r}`);case Mde.IncludeLineNumbersOption.WithoutSpace:return t.map((r,n)=>`${n}|${r}`);case Mde.IncludeLineNumbersOption.None:return[...t];default:(0,fmr.assertNever)(e)}}a(lmr,"addLineNumbers");function Nba(t,e,r,n,o,s){let c=Lli.StringEdit.single(Lli.StringReplacement.insert(t.cursorOffset,Nu.PromptTags.CURSOR)).applyOnText(t.content).getLines(),l=lmr(c,s.includeLineNumbers.areaAroundCodeToEdit),u=l.slice(e.start,e.endExclusive),d=[Nu.PromptTags.AREA_AROUND.start,...l.slice(r.start,e.start),Nu.PromptTags.EDIT_WINDOW.start,...u,Nu.PromptTags.EDIT_WINDOW.end,...l.slice(e.endExclusive,r.endExclusive),Nu.PromptTags.AREA_AROUND.end],p=n.currentFile.includeCursorTag?c:t.lines,h=lmr(p,s.includeLineNumbers.currentFileContent),m=lmr(t.lines,s.includeLineNumbers.currentFileContent),g;if(n.currentFile.includeTags&&s.includeLineNumbers.currentFileContent===s.includeLineNumbers.areaAroundCodeToEdit)g=d;else{let y=h.slice(e.start,e.endExclusive);g=[...h.slice(r.start,e.start),...y,...h.slice(e.endExclusive,r.endExclusive)]}return Gli(m,g,r,o,n.pagedClipping.pageSize,n.currentFile).map(y=>({clippedTaggedCurrentDoc:y,areaAroundCodeToEdit:d.join(` +`)}))}a(Nba,"constructTaggedFile")});var Hli=T(iI=>{"use strict";f();Object.defineProperty(iI,"__esModule",{value:!0});iI.xtab275SystemPrompt=iI.simplifiedPrompt=iI.nes41Miniv3SystemPrompt=iI.unifiedModelSystemPrompt=iI.systemPromptTemplate=void 0;var yQ=JK();iI.systemPromptTemplate=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the ${yQ.PromptTags.EDIT_WINDOW.start} and ${yQ.PromptTags.EDIT_WINDOW.end} tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. You have access to the following information to help you make informed suggestions: @@ -1218,9 +1218,9 @@ You have access to the following information to help you make informed suggestio - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code. Line numbers in the form #| are included to help you understand the edit diff history. - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change. - area_around_code_to_edit: The context showing the code surrounding the section to be edited. -- cursor position marked as ${$Q.PromptTags.CURSOR}: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on. +- cursor position marked as ${yQ.PromptTags.CURSOR}: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on. -Your task is to predict and complete the changes the developer would have made next in the ${$Q.PromptTags.EDIT_WINDOW.start} section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes. +Your task is to predict and complete the changes the developer would have made next in the ${yQ.PromptTags.EDIT_WINDOW.start} section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes. # Steps @@ -1231,9 +1231,9 @@ Your task is to predict and complete the changes the developer would have made n # Output Format -- Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the ${$Q.PromptTags.EDIT_WINDOW.start} and ${$Q.PromptTags.EDIT_WINDOW.end} tags. +- Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the ${yQ.PromptTags.EDIT_WINDOW.start} and ${yQ.PromptTags.EDIT_WINDOW.end} tags. - There are line numbers in the form #| in the code displayed to you above, but these are just for your reference. Please do not include the numbers of the form #| in your response. -- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the ${$Q.PromptTags.EDIT_WINDOW.start} or ${$Q.PromptTags.EDIT_WINDOW.end} tags. +- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the ${yQ.PromptTags.EDIT_WINDOW.start} or ${yQ.PromptTags.EDIT_WINDOW.end} tags. \`\`\` // Your revised code goes here @@ -1243,7 +1243,7 @@ Your task is to predict and complete the changes the developer would have made n - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines. - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. -- Don't include the line numbers of the form #| in your response.`;gI.unifiedModelSystemPrompt=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. +- Don't include the line numbers of the form #| in your response.`;iI.unifiedModelSystemPrompt=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. You have access to the following information to help you make informed suggestions: @@ -1272,7 +1272,7 @@ Your task is to predict and complete the changes the developer would have made n # Notes - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines. -- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;gI.nes41Miniv3SystemPrompt=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. +- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;iI.nes41Miniv3SystemPrompt=`Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights. You have access to the following information to help you make informed suggestions: @@ -1300,15 +1300,15 @@ Your task is to predict and complete the changes the developer would have made n # Notes - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines. -- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;gI.simplifiedPrompt="Predict next code edit based on the context given by the user.";gI.xtab275SystemPrompt=`Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: "Sorry, I can't assist with that."`});var gut=T(VQ=>{"use strict";f();Object.defineProperty(VQ,"__esModule",{value:!0});VQ.NullTerminalService=VQ.ITerminalService=void 0;VQ.isTerminalService=O1a;VQ.isNullTerminalService=B1a;var D1a=qr(),mut=nc(),M1a=so();VQ.ITerminalService=(0,D1a.createServiceIdentifier)("ITerminalService");var zhr=class t extends M1a.Disposable{static{a(this,"NullTerminalService")}constructor(){super(...arguments),this._onDidWriteTerminalData=this._register(new mut.Emitter),this.onDidWriteTerminalData=this._onDidWriteTerminalData.event,this._onDidChangeTerminalShellIntegration=this._register(new mut.Emitter),this.onDidChangeTerminalShellIntegration=this._onDidChangeTerminalShellIntegration.event,this._onDidEndTerminalShellExecution=this._register(new mut.Emitter),this.onDidEndTerminalShellExecution=this._onDidEndTerminalShellExecution.event,this._onDidCloseTerminal=this._register(new mut.Emitter),this.onDidCloseTerminal=this._onDidCloseTerminal.event}static{this.Instance=new t}get terminalBuffer(){return""}get terminalLastCommand(){}get terminalSelection(){return""}get terminalShellType(){return""}async getCwdForSession(e){return Promise.resolve(void 0)}async getCopilotTerminals(e){return Promise.resolve([])}getTerminalsWithSessionInfo(){throw new Error("Method not implemented.")}getToolTerminalForSession(e){throw new Error("Method not implemented.")}async associateTerminalWithSession(e,r,n){Promise.resolve()}createTerminal(e,r,n){return{}}get terminals(){return[]}getBufferForTerminal(e,r){return""}getBufferWithPid(e,r){return Promise.resolve("")}getLastCommandForTerminal(e){}contributePath(e,r,n,o){}removePathContribution(e){}};VQ.NullTerminalService=zhr;function O1a(t){return t&&typeof t.createTerminal=="function"}a(O1a,"isTerminalService");function B1a(t){return t&&typeof t.createTerminal=="function"&&t.createTerminal()===void 0}a(B1a,"isNullTerminalService")});var $ci=T(y3=>{"use strict";f();var L1a=y3&&y3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},F1a=y3&&y3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(y3,"__esModule",{value:!0});y3.TerminalMonitor=void 0;var U1a=gut(),Q1a=so(),w2e=2e3,Yhr=class extends Q1a.Disposable{static{a(this,"TerminalMonitor")}constructor(e){super(),this._terminalService=e,this._register(this._terminalService.onDidEndTerminalShellExecution(r=>{this._recordTerminalActivity(r)})),this._register(this._terminalService.onDidCloseTerminal(r=>{this._lastActivity?.terminal===r&&(this._lastActivity=void 0)}))}_recordTerminalActivity(e){let r=e.execution;this._lastActivity={terminal:e.terminal,terminalName:e.terminal.name,commandLine:r.commandLine?.value,cwd:q1a(r.cwd),exitCode:e.exitCode,timestamp:Date.now()}}getData(){let e=Date.now(),r=this._terminalService.terminals.length;if(!this._lastActivity)return JSON.stringify({terminalCount:r});let n=this._terminalService.getBufferForTerminal(this._lastActivity.terminal,w2e*2),o=e-this._lastActivity.timestamp,s={terminalName:this._lastActivity.terminalName,commandLine:this._lastActivity.commandLine,cwd:this._lastActivity.cwd,exitCode:this._lastActivity.exitCode,msAgo:o,buffer:n.length<=w2e?{fits:!0,content:n,length:n.length}:{fits:!1,contentStart:n.slice(0,w2e/2),contentEnd:n.slice(-w2e/2),length:n.length,truncatedChars:n.length-w2e},terminalCount:r};return JSON.stringify(s)}};y3.TerminalMonitor=Yhr;y3.TerminalMonitor=Yhr=L1a([F1a(0,U1a.ITerminalService)],Yhr);function q1a(t){if(t!==void 0)return typeof t=="string"?t:t.fsPath}a(q1a,"formatCwd")});var Vci=T(Aut=>{"use strict";f();Object.defineProperty(Aut,"__esModule",{value:!0});Aut.CurrentDocument=void 0;var Khr=class{static{a(this,"CurrentDocument")}constructor(e,r){this.content=e,this.cursorPosition=r,this.lines=e.getLines(),this.transformer=e.getTransformer(),this.cursorOffset=this.transformer.getOffset(r),this.cursorLineOffset=this.cursorPosition.lineNumber-1}};Aut.CurrentDocument=Khr});var Kci=T(Eut=>{"use strict";f();Object.defineProperty(Eut,"__esModule",{value:!0});Eut.XtabCustomDiffPatchResponseHandler=void 0;var Wci=LJ(),zci=ARe(),G1a=Ay(),H1a=Im(),Yci=Ru(),j1a=mY(),$1a=$N(),V1a=Efe(),W1a=jJ(),yut=class t{static{a(this,"Patch")}constructor(e,r){this.filePath=e,this.lineNumZeroBased=r,this.removedLines=[],this.addedLines=[]}static ofLine(e){let r=e.match(/^(.+):(\d+)$/);if(!r)return null;let[,n,o]=r;return new t(n,parseInt(o,10))}addLine(e){let r=e.slice(1);return e.startsWith("-")?(this.removedLines.push(r),!0):e.startsWith("+")?(this.addedLines.push(r),!0):!1}toString(){return[`${this.filePath}:${this.lineNumZeroBased}`,...this.removedLines.map(e=>`-${e}`),...this.addedLines.map(e=>`+${e}`)].join(` -`)}},Jhr=class t{static{a(this,"XtabCustomDiffPatchResponseHandler")}static async*handleResponse(e,r,n,o,s,c){let l=(0,V1a.toUniquePath)(n,o?.path);try{for await(let u of t.extractEdits(e)){let d=u.filePath===l?n:t.resolveTargetDocument(u.filePath,o)??n;yield{edit:t.resolveEdit(u),isFromCursorJump:!1,targetDocument:d,window:s}}}catch(u){let d=G1a.ErrorUtils.fromUnknown(u);return new zci.NoNextEditReason.Unexpected(d)}return new zci.NoNextEditReason.NoSuggestions(r,s,void 0)}static resolveEdit(e){return new j1a.LineReplacement(new $1a.LineRange(e.lineNumZeroBased+1,e.lineNumZeroBased+1+e.removedLines.length),e.addedLines)}static resolveTargetDocument(e,r){if((0,H1a.isAbsolute)(e))return Wci.DocumentId.create(Yci.URI.file(e).toString());if(r)return Wci.DocumentId.create(Yci.URI.joinPath(r,e).toString())}static async*extractEdits(e){let r=null;for await(let n of e){if(n.trim()===W1a.ResponseTags.NO_EDIT)break;if(r===null){r=yut.ofLine(n);continue}r.addLine(n)||(r&&(yield r),r=yut.ofLine(n))}r&&(yield r)}};Eut.XtabCustomDiffPatchResponseHandler=Jhr});var Jci=T(E3=>{"use strict";f();var z1a=E3&&E3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},AI=E3&&E3.__param||function(t,e){return function(r,n){e(r,n,t)}},Cut;Object.defineProperty(E3,"__esModule",{value:!0});E3.XtabEndpoint=void 0;var Y1a=gA(),K1a=d3(),Xhr=fc(),J1a=eE(),X1a=NQ(),Z1a=MJ(),eva=L0(),tva=ig(),rva=PQ(),nva=gd(),iva=Rp(),ova=PJ(),sva=Kde(),ava=Mo(),Zhr=class extends Z1a.ChatEndpoint{static{a(this,"XtabEndpoint")}static{Cut=this}static{this.chatModelInfo={id:"xtab-4o-mini-finetuned",name:"xtab-4o-mini-finetuned",vendor:"xtab",model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"unknown",capabilities:{type:"chat",family:"xtab-4o-mini-finetuned",tokenizer:sva.TokenizerType.O200K,limits:{max_prompt_tokens:12285,max_output_tokens:4096},supports:{streaming:!0,parallel_tool_calls:!1,tool_calls:!1,vision:!1,prediction:!0}}}}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y){let E=n?{...Cut.chatModelInfo,id:n}:Cut.chatModelInfo;super(E,s,p,h,m,o,g,A,y),this._url=e,this._apiKey=r,this._configService=o}get urlOrRequestMetadata(){return this._configService.getConfig(Xhr.ConfigKey.TeamInternal.InlineEditsXtabProviderUrl)||this._url}getExtraHeaders(){let e=this._configService.getConfig(Xhr.ConfigKey.TeamInternal.InlineEditsXtabProviderApiKey)||this._apiKey;if(!e){let r=`Missing API key for custom URL (${this.urlOrRequestMetadata}). Provide the API key using vscode setting \`github.copilot.chat.advanced.inlineEdits.xtabProvider.apiKey\` or, if in simulations using \`--nes-api-key\` or \`--config-file\``;throw console.error(r),new Error(r)}return{Authorization:`Bearer ${e}`,"api-key":e}}};E3.XtabEndpoint=Zhr;E3.XtabEndpoint=Zhr=Cut=z1a([AI(3,Xhr.IConfigurationService),AI(4,X1a.IDomainService),AI(5,tva.IFetcherService),AI(6,J1a.ICAPIClientService),AI(7,iva.ITelemetryService),AI(8,Y1a.IAuthenticationService),AI(9,K1a.IChatMLFetcher),AI(10,ova.ITokenizerProvider),AI(11,ava.IInstantiationService),AI(12,nva.IExperimentationService),AI(13,rva.IChatWebSocketManager),AI(14,eva.ILogService)],Zhr)});var Xci=T(emr=>{"use strict";f();Object.defineProperty(emr,"__esModule",{value:!0});emr.backwardCompatSetting=cva;function cva(t,e){return e(t)}a(cva,"backwardCompatSetting")});var rmr=T(R2e=>{"use strict";f();Object.defineProperty(R2e,"__esModule",{value:!0});R2e.linesWithBackticksRemoved=lva;R2e.constructMessages=uva;R2e.charCount=dva;var tmr=po(),Zci=zRe();async function*lva(t){let e=-1,r;for await(let n of t)if(++e,r&&(yield r,r=void 0),n.match(/^```[a-z]*$/)){if(e===0)continue;r=n}else yield n}a(lva,"linesWithBackticksRemoved");function uva({systemMsg:t,userMsg:e}){return[{role:tmr.Raw.ChatRole.System,content:(0,Zci.toTextParts)(t)},{role:tmr.Raw.ChatRole.User,content:(0,Zci.toTextParts)(e)}]}a(uva,"constructMessages");function dva(t){return t.reduce((r,n)=>r+n.content.reduce((o,s)=>o+(s.type===tmr.Raw.ChatCompletionContentPartKind.Text?s.text.length:0),0),0)}a(dva,"charCount")});var eli=T(cE=>{"use strict";f();var fva=cE&&cE.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pva=cE&&cE.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hva=cE&&cE.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},mva=cE&&cE.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;otypeof k=="boolean"?k?vut.IncludeLineNumbersOption.WithSpaceAfter:vut.IncludeLineNumbersOption.None:k),A=new imr.PromptPieces(e.currentDocument,e.editWindowLinesRange,e.areaAroundEditWindowLinesRange,e.activeDoc,e.xtabHistory,d.lines,p,e.langCtx,e.aggressivenessLevel,m,this.computeTokens,{...e.opts,includePostScript:!1,lintOptions:h,recentlyViewedDocuments:{...e.opts.recentlyViewedDocuments,includeLineNumbers:g}}),{prompt:y}=(0,imr.getUserPrompt)(A),E=(0,xva.constructMessages)({systemMsg:c,userMsg:y});n?.setCursorJumpPrompt(E);let _=this.configService.getExperimentBasedConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionModelName,this.expService);if(_===void 0)return s.trace("Model name for cursor prediction is not defined; skipping prediction"),yI.Result.fromString("modelNameNotDefined");n?.setCursorJumpModelName(_);let v=await this.resolveEndpoint(_,s);if(!v)return yI.Result.fromString("endpointNotResolved");let{endpoint:b,usesResponsesApi:I}=v,x=this.configService.getConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionApiKey),R=this.configService.getExperimentBasedConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionMaxResponseTokens,this.expService),w={max_tokens:I?Math.max(R,2048):R};x&&(w={...w,secretKey:x});let P=await b.makeChatRequest2({messages:E,debugName:"nes.nextCursorPosition",finishedCb:void 0,location:nmr.ChatLocation.Other,requestOptions:w},o);if(P.type!==nmr.ChatFetchResponseType.Success)return P.type===nmr.ChatFetchResponseType.NotFound&&(s.trace("Next cursor position prediction endpoint not found; disabling predictor for current session."),this.isDisabled=!0),yI.Result.fromString(`fetchError:${P.type}`);try{n?.setCursorJumpResponse(P.value);let k=P.value.trim();return this.parseResponse(k,d.keptRange)}catch(k){return s.trace(`Failed to parse predicted line number from response '${P.value}': ${k}`),yI.Result.fromString(`failedToParseLine:"${P.value}". Error ${vva.ErrorUtils.fromUnknown(k).message}`)}}async resolveEndpoint(e,r){if(this.configService.getConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionUseEndpointProvider)){let c=(await this.endpointProvider.getAllChatEndpoints()).find(u=>u.model===e||u.family===e);if(!c){r.trace(`Could not find endpoint for model '${e}' via endpoint provider`);return}let l=c.apiType==="responses";return{endpoint:c,usesResponsesApi:l}}let o=this.configService.getConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionUrl);return{endpoint:this.instaService.createInstance(yva.ChatEndpoint,{id:e,name:"nes.nextCursorPosition",vendor:e,urlOrRequestMetadata:o||{type:gva.RequestType.ProxyChatCompletions},model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"",capabilities:{type:"chat",family:"",tokenizer:bva.TokenizerType.CL100K,limits:void 0,supports:{parallel_tool_calls:!1,tool_calls:!1,streaming:!0,vision:!1,prediction:!1,thinking:!1}}}),usesResponsesApi:!1}}determineLintOptions(){let e=this.configService.getConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionLintOptions);if(e)return{...but.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS,...e};let r=this.configService.getExperimentBasedConfig(l2.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionLintOptionsString,this.expService);return r?(0,but.parseLintOptionString)(r,but.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS):but.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS}parseResponse(e,r){let n=parseInt(e,10);if(!isNaN(n)&&String(n)===e)return this.parseSameFileLineNumber(n,r);let o=e.lastIndexOf(":");if(o<=0)return yI.Result.fromString("gotNaN");let s=e.substring(0,o),c=e.substring(o+1),l=parseInt(c,10);return isNaN(l)||l<0?yI.Result.fromString("crossFileInvalidLineNumber"):s.trim().length===0?yI.Result.fromString("crossFileEmptyFilePath"):yI.Result.ok({kind:"differentFile",filePath:s.trim(),lineNumber:l})}parseSameFileLineNumber(e,r){return e<0?yI.Result.fromString("negativeLineNumber"):e{"use strict";f();var wva=xl&&xl.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rva=xl&&xl.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pva=xl&&xl.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},kva=xl&&xl.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oMath.floor(e.length/4)}constructor(e,r,n,o,s,c,l,u,d,p,h){this.modelService=e,this.simulationCtx=r,this.instaService=n,this.workspaceService=o,this.diffService=s,this.configService=c,this.expService=l,this.langCtxService=u,this.langDiagService=d,this.ignoreService=p,this.similarFilesContextService=h,this.ID=C3.ID,this.forceUseDefaultModel=!1,this.userInteractionMonitor=this.instaService.createInstance(Jva.UserInteractionMonitor),this.terminalMonitor=this.instaService.createInstance(rba.TerminalMonitor),this.nextCursorPredictor=this.instaService.createInstance(sba.XtabNextCursorPredictor,C3.computeTokens)}handleAcceptance(){this.userInteractionMonitor.handleAcceptance()}handleRejection(){this.userInteractionMonitor.handleRejection()}handleIgnored(){this.userInteractionMonitor.handleIgnored()}async*provideNextEdit(e,r,n,o){let s=new Fo.StatelessNextEditTelemetryBuilder(e.headerRequestId);n.setProviderStartTime();try{if(e.xtabEditHistory.length===0){let p=new Fo.NoNextEditReason.ActiveDocumentHasNoEdits;return new Fo.WithStatelessProviderTelemetry(p,s.build(Sut.Result.error(p)))}let c=this.userInteractionMonitor.createDelaySession(e.providerRequestStartDateTime),l=this.doGetNextEdit(e,c,r,n,o,s,KQ.NotRetrying.INSTANCE),u=await l.next();for(;!u.done;)yield new Fo.WithStatelessProviderTelemetry(u.value,s.build(Sut.Result.ok(void 0))),u=await l.next();let d=u.value;return d instanceof Fo.NoNextEditReason.GotCancelled&&n.setIsSkipped(),new Fo.WithStatelessProviderTelemetry(d,s.build(Sut.Result.error(d)))}catch(c){let l=zQ.ErrorUtils.fromUnknown(c),u=new Fo.NoNextEditReason.Unexpected(l);return new Fo.WithStatelessProviderTelemetry(u,s.build(Sut.Result.error(u)))}finally{n.setProviderEndTime()}}doGetNextEdit(e,r,n,o,s,c,l){return this.doGetNextEditWithSelection(e,(0,Kva.getOrDeduceSelectionFromLastEdit)(e.getActiveDocument()),r,n,o,s,c,l)}async*doGetNextEditWithSelection(e,r,n,o,s,c,l,u,d){let p=o.createSubLogger(["XtabProvider","doGetNextEditWithSelection"]),h=e.getActiveDocument();if(r===null)return new Fo.NoNextEditReason.Uncategorized(new Error("NoSelection"));let{promptOptions:m,modelServiceConfig:g}=this.determineModelConfiguration(h);l.setModelConfig(JSON.stringify(g));let A=this.getEndpoint(m.modelName);s.setEndpointInfo(typeof A.urlOrRequestMetadata=="string"?A.urlOrRequestMetadata:JSON.stringify(A.urlOrRequestMetadata.type),A.model),l.setModelName(A.model);let y=new smr.Position(r.endLineNumber,r.endColumn),E=new nba.CurrentDocument(h.documentAfterEdits,y),v=E.lines[E.cursorLineOffset].substring(y.column-1).match(/^\s*$/)!==null;l.setIsCursorAtLineEnd(v);let b=(0,Zva.isInlineSuggestion)(E,y);if(l.setIsInlineSuggestion(!!b),e.isSpeculative)p.trace("No extra debounce applied for speculative request");else{let X=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsExtraDebounceInlineSuggestion,this.expService);b&&X>0?(p.trace("Debouncing for inline suggestion position"),n.setExtraDebounce(X)):v?(p.trace("Debouncing for cursor at end of line"),n.setExtraDebounce(this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsExtraDebounceEndOfLine,this.expService))):p.trace("No extra debounce applied")}(0,$J.isAggressivenessStrategy)(m.promptingStrategy)||this._applyAggressivenessSettings(n,p);let I=lli(E),x=this.computeEditWindowLinesRange(E,e,p,l),R=Math.max(0,E.cursorLineOffset-x.start),w=E.transformer.getLineLength(x.endExclusive),P=E.transformer.getOffsetRange(new Iut.Range(x.start+1,1,x.endExclusive,w+1)),k=E.lines.slice(x.start,x.endExclusive),Q=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabEditWindowMaxTokens,this.expService);if(Q!==void 0&&(0,ali.countTokensForLines)(k,C3.computeTokens)>Q)return new Fo.NoNextEditReason.PromptTooLarge("editWindow");let D=!k.some(X=>X.includes(WQ.PromptTags.CURSOR)),G=(0,YQ.constructTaggedFile)(E,x,I,m,C3.computeTokens,{includeLineNumbers:{areaAroundCodeToEdit:Os.IncludeLineNumbersOption.None,currentFileContent:m.currentFile.includeLineNumbers}});if(G.isError())return new Fo.NoNextEditReason.PromptTooLarge("currentFile");let{clippedTaggedCurrentDoc:O,areaAroundCodeToEdit:N}=G.val;l.setNLinesOfCurrentFileInPrompt(O.lines.length);let{aggressivenessLevel:F,userHappinessScore:U}=this.userInteractionMonitor.getAggressivenessLevel(),L=this.configService.getExperimentBasedConfig(bi.ConfigKey.Advanced.InlineEditsAggressiveness,this.expService);L!==$J.AggressivenessSetting.Default&&l.setUserAggressivenessSetting(L),(0,$J.isAggressivenessStrategy)(m.promptingStrategy)&&(l.setXtabAggressivenessLevel(F),U!==void 0&&l.setXtabUserHappinessScore(U));let H=await this.getAndProcessLanguageContext(e,n,h,y,m,p,s,c);if(c.isCancellationRequested)return new Fo.NoNextEditReason.GotCancelled("afterLanguageContextAwait");let $=new eba.LintErrors(h.id,E,this.langDiagService,e.xtabEditHistory),W=new YQ.PromptPieces(E,x,I,h,e.xtabEditHistory,O.lines,N,H,F,$,C3.computeTokens,m),{prompt:j,nDiffsInPrompt:ce,diffTokensInPrompt:J}=(0,YQ.getUserPrompt)(W);l.setNDiffsInPrompt(ce),l.setDiffTokensInPrompt(J);let Te=Os.ResponseFormat.fromPromptingStrategy(m.promptingStrategy),fe=this.getPredictedOutput(h,k,Te),De=(0,amr.constructMessages)({systemMsg:uli(m.promptingStrategy),userMsg:j});s.setPrompt(De),l.setPrompt(De);let Ve=3e4*4;if((0,amr.charCount)(De)>Ve)return new Fo.NoNextEditReason.PromptTooLarge("final");if(await this.debounce(n,u,p,l,c),c.isCancellationRequested)return new Fo.NoNextEditReason.GotCancelled("afterDebounce");Promise.resolve().then(()=>{let X=$.getData();l.setLintErrors(X),s.setDiagnosticsData(X);let le=this.terminalMonitor.getData();l.setTerminalOutput(le),s.setTerminalData(le)}),l.setSimilarFilesContext(this.similarFilesContextService.compute(h.id.uri,h.languageId,h.documentAfterEdits.value,E.cursorOffset)),e.fetchIssued=!0;let Ke=y.column;return yield*this.streamEditsWithFiltering(e,A,g,De,E,O,P,k,R,Ke,x,W,fe,{shouldRemoveCursorTagFromResponse:D,responseFormat:Te,retryState:u,aggressivenessLevel:F,userHappinessScore:U},n,p,l,s,c,d)}_applyAggressivenessSettings(e,r){let n=this.configService.getExperimentBasedConfig(bi.ConfigKey.Advanced.InlineEditsAggressiveness,this.expService),s={[$J.AggressivenessSetting.Low]:{minResponseConfigKey:bi.ConfigKey.TeamInternal.InlineEditsAggressivenessLowMinResponseTimeMs},[$J.AggressivenessSetting.Medium]:{minResponseConfigKey:bi.ConfigKey.TeamInternal.InlineEditsAggressivenessMediumMinResponseTimeMs},[$J.AggressivenessSetting.High]:{debounceConfigKey:bi.ConfigKey.TeamInternal.InlineEditsAggressivenessHighDebounceMs},[$J.AggressivenessSetting.Default]:void 0}[n];if(s){if(s.debounceConfigKey){let c=this.configService.getExperimentBasedConfig(s.debounceConfigKey,this.expService);e.setBaseDebounceTime(c),r.trace(`Aggressiveness ${n}: debounce set to ${c}ms`)}if(s.minResponseConfigKey){if(this.userInteractionMonitor.wasLastActionAcceptance){r.trace(`Aggressiveness ${n}: skipping min response time (last action was acceptance)`);return}let c=this.configService.getExperimentBasedConfig(s.minResponseConfigKey,this.expService);e.setExpectedTotalTime(c),r.trace(`Aggressiveness ${n}: min response time set to ${c}ms`)}}}getAndProcessLanguageContext(e,r,n,o,s,c,l,u){let d=this.configService.getConfig(bi.ConfigKey.TeamInternal.InlineEditsLogContextRecorderEnabled);if(!s.languageContext.enabled&&!d)return Promise.resolve(void 0);let p=this.getLanguageContext(e,r,n,o,c,l,u);return d&&p.then(h=>{h&&l.setLanguageContext(h)}),s.languageContext.enabled?p:Promise.resolve(void 0)}async getLanguageContext(e,r,n,o,s,c,l){try{let u=this.workspaceService.textDocuments.find(b=>b.uri.toString()===n.id.uri);if(u===void 0||this.langCtxService.getContextProviders(u,sli.ProviderTarget.NES).length<1)return;let p=r.getDebounceTime(),h=new Yva.Position(o.lineNumber-1,o.column-1),m={opportunityId:e.opportunityId,completionId:e.headerRequestId,documentContext:{uri:u.uri.toString(),languageId:u.languageId,version:u.version,offset:u.offsetAt(h),position:h},activeExperiments:new Map,timeBudget:p,timeoutEnd:Date.now()+p,source:"nes"},g=a(async b=>{let I=[b.uri,...b.additionalUris??[]];return!!await(0,jva.raceFilter)(I.map(R=>this.ignoreService.isCopilotIgnored(R)),R=>R)},"isSnippetIgnored"),A=[],y=a(async()=>{let b=this.langCtxService.getContextItems(u,m,l);for await(let I of b)I.kind===rli.ContextKind.Snippet&&await g(I)||A.push({context:I,timeStamp:Date.now(),onTimeout:!1})},"getContextPromise"),E=Date.now();if(await(0,vfe.raceCancellation)((0,vfe.raceTimeout)(y(),p),l),l.isCancellationRequested)return;let _=Date.now(),v=this.langCtxService.getContextItemsOnTimeout(u,m);for(let b of v)b.kind===rli.ContextKind.Snippet&&await g(b)||A.push({context:b,timeStamp:_,onTimeout:!0});return{start:E,end:_,items:A}}catch(u){c.setError(zQ.ErrorUtils.fromUnknown(u)),s.trace(`Failed to fetch language context: ${u}`);return}}async*streamEditsWithFiltering(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I){let x=E.createSubLogger("streamEditsWithFiltering"),R=this.streamEdits(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,x,_,v,b,I),w=0,P=await R.next();for(;!P.done;){let k=P.value.edit;this.filterEdit(e.getActiveDocument(),[k]).length===0?x.trace(`Filtered out an edit: ${k.toString()}`):(x.trace(`Yielding an edit: ${k.toString()}`),yield P.value,w++),P=await R.next()}return w===0&&P.value instanceof Fo.NoNextEditReason.NoSuggestions?yield*this.doGetNextEditsWithCursorJump(e,n,l,m,y,E,v,b,_,A.retryState):P.value}async*streamEdits(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I){let x=E.createSubLogger("streamEdits"),R=e.getActiveDocument().id,w=this.configService.getExperimentBasedConfig(bi.ConfigKey.NextEditSuggestionsFetcher,this.expService)||void 0,P=new Nva.FetchStreamSource,k=new $va.StopWatch,Q="",M,D,G=new vfe.DeferredPromise;v.setHeaderRequestId(e.headerRequestId),_.setFetchStartedAt(),v.setFetchStartTime();let O=r.makeChatRequest2({debugName:C3.ID,messages:o,finishedCb:a(async(ce,J,Te)=>{G.isSettled||G.complete(),D===void 0&&ce!==""&&(D=k.elapsed(),v.addLog(`TTFT ${D} ms`)),P.update(ce,Te),Q=ce,v.setResponse(Q)},"finishedCb"),location:yd.ChatLocation.Other,source:void 0,requestOptions:{temperature:0,stream:!0,prediction:g},userInitiatedRequest:void 0,telemetryProperties:{requestId:e.headerRequestId},useFetcher:w,customMetadata:{aggressivenessLevel:A.aggressivenessLevel,userHappinessScore:A.userHappinessScore}},b);_.setResponse(O.then(ce=>({response:ce,ttft:D}))),v.setFullResponse(O.then(ce=>ce.type===yd.ChatFetchResponseType.Success?ce.value:void 0));let N=await Promise.race([G.p,O]);if(N&&N.type!==yd.ChatFetchResponseType.Success)return N.type===yd.ChatFetchResponseType.NotFound&&!this.forceUseDefaultModel?(this.forceUseDefaultModel=!0,yield*this.doGetNextEdit(e,y,x,v,b,_,A.retryState)):N.type===yd.ChatFetchResponseType.Unknown&&N.reason===yd.RESPONSE_CONTAINED_NO_CHOICES?new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l):umr(N);O.then(ce=>{M=ce.type!==yd.ChatFetchResponseType.Success?ce:void 0}).catch(ce=>{v.setError(zQ.ErrorUtils.fromUnknown(ce)),v.addLog("ChatMLFetcher fetch call threw -- this's UNEXPECTED!")}).finally(()=>{v.setFetchEndTime(),G.isSettled||G.complete(),P.resolve(),v.setResponse(Q)});let F=nli.AsyncIterUtilsExt.splitLines(nli.AsyncIterUtils.map(P.stream,ce=>ce.delta.text)),U=(async function*(){let ce=0;for await(let J of F){let Te=`Line ${ce++} emitted with latency ${k.elapsed()} ms`;x.trace(Te),yield A.shouldRemoveCursorTagFromResponse?J.replaceAll(WQ.PromptTags.CURSOR,""):J}})(),L=A.retryState instanceof KQ.Retrying&&A.retryState.reason==="cursorJump",H;if(A.responseFormat===Os.ResponseFormat.EditWindowOnly)H=U;else if(A.responseFormat===Os.ResponseFormat.EditWindowWithEditIntent||A.responseFormat===Os.ResponseFormat.EditWindowWithEditIntentShort){let ce=A.responseFormat===Os.ResponseFormat.EditWindowWithEditIntentShort?Tfe.ShortName:Tfe.Tags,{editIntent:J,remainingLinesStream:Te,parseError:fe}=await pli(U,x,ce);if(_.setEditIntent(J),fe&&_.setEditIntentParseError(fe),!Os.EditIntent.shouldShowEdit(J,m.aggressivenessLevel))return x.trace(`Filtered out edit due to edit intent "${J}" with aggressiveness "${m.aggressivenessLevel}"`),new Fo.NoNextEditReason.FilteredOut(`editIntent:${J} aggressivenessLevel:${m.aggressivenessLevel}`);H=Te}else if(A.responseFormat===Os.ResponseFormat.CustomDiffPatch){let ce=e.getActiveDocument(),Te=s.lines[c.keptRange.endExclusive-1].length,fe=s.transformer.getOffsetRange(new Iut.Range(c.keptRange.start+1,1,c.keptRange.endExclusive,Te+1));return yield*iba.XtabCustomDiffPatchResponseHandler.handleResponse(U,e.documentBeforeEdits,ce.id,ce.workspaceRoot,fe)}else if(A.responseFormat===Os.ResponseFormat.UnifiedWithXml){let ce=U[Symbol.asyncIterator](),J=await ce.next();if(M!==void 0)return new Fo.NoNextEditReason.Unexpected(zQ.ErrorUtils.fromUnknown(M));if(J.done)return new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l);let Te=J.value.trim();if(Te===WQ.ResponseTags.NO_CHANGE.start)return yield*this.doGetNextEditsWithCursorJump(e,n,l,m,y,x,v,b,_,A.retryState);if(Te===WQ.ResponseTags.INSERT.start){let fe=await ce.next();if(fe.done||fe.value.includes(WQ.ResponseTags.INSERT.end))return new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l);yield{edit:new bfe.LineReplacement(new xut.LineRange(h.start+d+1,h.start+d+2),[u[d].slice(0,p-1)+fe.value+u[d].slice(p-1)]),isFromCursorJump:L,window:l,originalWindow:I,targetDocument:R};let Ve=[],Ue=await ce.next();for(;!Ue.done&&!Ue.value.includes(WQ.ResponseTags.INSERT.end);)Ve.push(Ue.value),Ue=await ce.next();let Ke=h.start+d+2;return yield{edit:new bfe.LineReplacement(new xut.LineRange(Ke,Ke),Ve),isFromCursorJump:L,window:l,originalWindow:I,targetDocument:R},new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l)}if(Te===WQ.ResponseTags.EDIT.start)H=(async function*(){let fe=await ce.next();for(;!fe.done;){if(fe.value.includes(WQ.ResponseTags.EDIT.end))return;yield fe.value,fe=await ce.next()}})();else return new Fo.NoNextEditReason.Unexpected(new Error(`unexpected tag ${Te}`))}else A.responseFormat===Os.ResponseFormat.CodeBlock?H=(0,amr.linesWithBackticksRemoved)(U):(0,VJ.assertNever)(A.responseFormat);let $={emitFastCursorLineChange:tli.ResponseProcessor.mapEmitFastCursorLineChange(this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderEmitFastCursorLineChange,this.expService)),nLinesToConverge:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabNNonSignificantLinesToConverge,this.expService),nSignificantLinesToConverge:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabNSignificantLinesToConverge,this.expService)};x.trace(`starting to diff stream against edit window lines with latency ${k.elapsed()} ms`);let W=0,j=!1;try{for await(let ce of tli.ResponseProcessor.diff(u,H,d,$)){x.trace(`ResponseProcessor streamed edit #${W} with latency ${k.elapsed()} ms`);let J=[];if(ce.lineRange.startLineNumber===ce.lineRange.endLineNumberExclusive||ce.newLines.length===0||ce.lineRange.endLineNumberExclusive-ce.lineRange.startLineNumber===1&&ce.newLines.length===1){let Te=new bfe.LineReplacement(new xut.LineRange(ce.lineRange.startLineNumber+h.start,ce.lineRange.endLineNumberExclusive+h.start),ce.newLines);J.push(Te)}else{let Te=u.slice(ce.lineRange.startLineNumber-1,ce.lineRange.endLineNumberExclusive-1).join(` +- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;iI.simplifiedPrompt="Predict next code edit based on the context given by the user.";iI.xtab275SystemPrompt=`Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: "Sorry, I can't assist with that."`});var blt=T(EQ=>{"use strict";f();Object.defineProperty(EQ,"__esModule",{value:!0});EQ.NullTerminalService=EQ.ITerminalService=void 0;EQ.isTerminalService=Bba;EQ.isNullTerminalService=Lba;var Mba=qr(),vlt=Xa(),Oba=ro();EQ.ITerminalService=(0,Mba.createServiceIdentifier)("ITerminalService");var hmr=class t extends Oba.Disposable{static{a(this,"NullTerminalService")}constructor(){super(...arguments),this._onDidWriteTerminalData=this._register(new vlt.Emitter),this.onDidWriteTerminalData=this._onDidWriteTerminalData.event,this._onDidChangeTerminalShellIntegration=this._register(new vlt.Emitter),this.onDidChangeTerminalShellIntegration=this._onDidChangeTerminalShellIntegration.event,this._onDidEndTerminalShellExecution=this._register(new vlt.Emitter),this.onDidEndTerminalShellExecution=this._onDidEndTerminalShellExecution.event,this._onDidCloseTerminal=this._register(new vlt.Emitter),this.onDidCloseTerminal=this._onDidCloseTerminal.event}static{this.Instance=new t}get terminalBuffer(){return""}get terminalLastCommand(){}get terminalSelection(){return""}get terminalShellType(){return""}async getCwdForSession(e){return Promise.resolve(void 0)}async getCopilotTerminals(e){return Promise.resolve([])}getTerminalsWithSessionInfo(){throw new Error("Method not implemented.")}getToolTerminalForSession(e){throw new Error("Method not implemented.")}async associateTerminalWithSession(e,r,n){Promise.resolve()}createTerminal(e,r,n){return{}}get terminals(){return[]}getBufferForTerminal(e,r){return""}getBufferWithPid(e,r){return Promise.resolve("")}getLastCommandForTerminal(e){}contributePath(e,r,n,o){}removePathContribution(e){}};EQ.NullTerminalService=hmr;function Bba(t){return t&&typeof t.createTerminal=="function"}a(Bba,"isTerminalService");function Lba(t){return t&&typeof t.createTerminal=="function"&&t.createTerminal()===void 0}a(Lba,"isNullTerminalService")});var jli=T(e3=>{"use strict";f();var Fba=e3&&e3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Uba=e3&&e3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(e3,"__esModule",{value:!0});e3.TerminalMonitor=void 0;var Qba=blt(),qba=ro(),SRe=2e3,mmr=class extends qba.Disposable{static{a(this,"TerminalMonitor")}constructor(e){super(),this._terminalService=e,this._register(this._terminalService.onDidEndTerminalShellExecution(r=>{this._recordTerminalActivity(r)})),this._register(this._terminalService.onDidCloseTerminal(r=>{this._lastActivity?.terminal===r&&(this._lastActivity=void 0)}))}_recordTerminalActivity(e){let r=e.execution;this._lastActivity={terminal:e.terminal,terminalName:e.terminal.name,commandLine:r.commandLine?.value,cwd:Gba(r.cwd),exitCode:e.exitCode,timestamp:Date.now()}}getData(){let e=Date.now(),r=this._terminalService.terminals.length;if(!this._lastActivity)return JSON.stringify({terminalCount:r});let n=this._terminalService.getBufferForTerminal(this._lastActivity.terminal,SRe*2),o=e-this._lastActivity.timestamp,s={terminalName:this._lastActivity.terminalName,commandLine:this._lastActivity.commandLine,cwd:this._lastActivity.cwd,exitCode:this._lastActivity.exitCode,msAgo:o,buffer:n.length<=SRe?{fits:!0,content:n,length:n.length}:{fits:!1,contentStart:n.slice(0,SRe/2),contentEnd:n.slice(-SRe/2),length:n.length,truncatedChars:n.length-SRe},terminalCount:r};return JSON.stringify(s)}};e3.TerminalMonitor=mmr;e3.TerminalMonitor=mmr=Fba([Uba(0,Qba.ITerminalService)],mmr);function Gba(t){if(t!==void 0)return typeof t=="string"?t:t.fsPath}a(Gba,"formatCwd")});var $li=T(Tlt=>{"use strict";f();Object.defineProperty(Tlt,"__esModule",{value:!0});Tlt.CurrentDocument=void 0;var gmr=class{static{a(this,"CurrentDocument")}constructor(e,r){this.content=e,this.cursorPosition=r,this.lines=e.getLines(),this.transformer=e.getTransformer(),this.cursorOffset=this.transformer.getOffset(r),this.cursorLineOffset=this.cursorPosition.lineNumber-1}};Tlt.CurrentDocument=gmr});var Yli=T(Ilt=>{"use strict";f();Object.defineProperty(Ilt,"__esModule",{value:!0});Ilt.XtabCustomDiffPatchResponseHandler=void 0;var Vli=jK(),Wli=hwe(),Hba=cy(),jba=gm(),zli=Eu(),$ba=vz(),Vba=N5(),Wba=Nde(),zba=JK(),Slt=class t{static{a(this,"Patch")}constructor(e,r){this.filePath=e,this.lineNumZeroBased=r,this.removedLines=[],this.addedLines=[]}static ofLine(e){let r=e.match(/^(.+):(\d+)$/);if(!r)return null;let[,n,o]=r;return new t(n,parseInt(o,10))}addLine(e){let r=e.slice(1);return e.startsWith("-")?(this.removedLines.push(r),!0):e.startsWith("+")?(this.addedLines.push(r),!0):!1}toString(){return[`${this.filePath}:${this.lineNumZeroBased}`,...this.removedLines.map(e=>`-${e}`),...this.addedLines.map(e=>`+${e}`)].join(` +`)}},Amr=class t{static{a(this,"XtabCustomDiffPatchResponseHandler")}static async*handleResponse(e,r,n,o,s,c){let l=(0,Wba.toUniquePath)(n,o?.path);try{for await(let u of t.extractEdits(e)){let d=u.filePath===l?n:t.resolveTargetDocument(u.filePath,o)??n;yield{edit:t.resolveEdit(u),isFromCursorJump:!1,targetDocument:d,window:s}}}catch(u){let d=Hba.ErrorUtils.fromUnknown(u);return new Wli.NoNextEditReason.Unexpected(d)}return new Wli.NoNextEditReason.NoSuggestions(r,s,void 0)}static resolveEdit(e){return new $ba.LineReplacement(new Vba.LineRange(e.lineNumZeroBased+1,e.lineNumZeroBased+1+e.removedLines.length),e.addedLines)}static resolveTargetDocument(e,r){if((0,jba.isAbsolute)(e))return Vli.DocumentId.create(zli.URI.file(e).toString());if(r)return Vli.DocumentId.create(zli.URI.joinPath(r,e).toString())}static async*extractEdits(e){let r=null;for await(let n of e){if(n.trim()===zba.ResponseTags.NO_EDIT)break;if(r===null){r=Slt.ofLine(n);continue}r.addLine(n)||(r&&(yield r),r=Slt.ofLine(n))}r&&(yield r)}};Ilt.XtabCustomDiffPatchResponseHandler=Amr});var Kli=T(t3=>{"use strict";f();var Yba=t3&&t3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},oI=t3&&t3.__param||function(t,e){return function(r,n){e(r,n,t)}},xlt;Object.defineProperty(t3,"__esModule",{value:!0});t3.XtabEndpoint=void 0;var Kba=cA(),Jba=WB(),ymr=ac(),Xba=$y(),Zba=oQ(),eTa=qK(),tTa=D0(),rTa=zm(),nTa=nQ(),iTa=cd(),oTa=bp(),sTa=LK(),aTa=ude(),cTa=Po(),Emr=class extends eTa.ChatEndpoint{static{a(this,"XtabEndpoint")}static{xlt=this}static{this.chatModelInfo={id:"xtab-4o-mini-finetuned",name:"xtab-4o-mini-finetuned",vendor:"xtab",model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"unknown",capabilities:{type:"chat",family:"xtab-4o-mini-finetuned",tokenizer:aTa.TokenizerType.O200K,limits:{max_prompt_tokens:12285,max_output_tokens:4096},supports:{streaming:!0,parallel_tool_calls:!1,tool_calls:!1,vision:!1,prediction:!0}}}}constructor(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y){let E=n?{...xlt.chatModelInfo,id:n}:xlt.chatModelInfo;super(E,s,p,h,m,o,g,A,y),this._url=e,this._apiKey=r,this._configService=o}get urlOrRequestMetadata(){return this._configService.getConfig(ymr.ConfigKey.TeamInternal.InlineEditsXtabProviderUrl)||this._url}getExtraHeaders(){let e=this._configService.getConfig(ymr.ConfigKey.TeamInternal.InlineEditsXtabProviderApiKey)||this._apiKey;if(!e){let r=`Missing API key for custom URL (${this.urlOrRequestMetadata}). Provide the API key using vscode setting \`github.copilot.chat.advanced.inlineEdits.xtabProvider.apiKey\` or, if in simulations using \`--nes-api-key\` or \`--config-file\``;throw console.error(r),new Error(r)}return{Authorization:`Bearer ${e}`,"api-key":e}}};t3.XtabEndpoint=Emr;t3.XtabEndpoint=Emr=xlt=Yba([oI(3,ymr.IConfigurationService),oI(4,Zba.IDomainService),oI(5,rTa.IFetcherService),oI(6,Xba.ICAPIClientService),oI(7,oTa.ITelemetryService),oI(8,Kba.IAuthenticationService),oI(9,Jba.IChatMLFetcher),oI(10,sTa.ITokenizerProvider),oI(11,cTa.IInstantiationService),oI(12,iTa.IExperimentationService),oI(13,nTa.IChatWebSocketManager),oI(14,tTa.ILogService)],Emr)});var Jli=T(_mr=>{"use strict";f();Object.defineProperty(_mr,"__esModule",{value:!0});_mr.backwardCompatSetting=lTa;function lTa(t,e){return e(t)}a(lTa,"backwardCompatSetting")});var vmr=T(IRe=>{"use strict";f();Object.defineProperty(IRe,"__esModule",{value:!0});IRe.linesWithBackticksRemoved=uTa;IRe.constructMessages=dTa;IRe.charCount=fTa;var Cmr=co(),Xli=$we();async function*uTa(t){let e=-1,r;for await(let n of t)if(++e,r&&(yield r,r=void 0),n.match(/^```[a-z]*$/)){if(e===0)continue;r=n}else yield n}a(uTa,"linesWithBackticksRemoved");function dTa({systemMsg:t,userMsg:e}){return[{role:Cmr.Raw.ChatRole.System,content:(0,Xli.toTextParts)(t)},{role:Cmr.Raw.ChatRole.User,content:(0,Xli.toTextParts)(e)}]}a(dTa,"constructMessages");function fTa(t){return t.reduce((r,n)=>r+n.content.reduce((o,s)=>o+(s.type===Cmr.Raw.ChatCompletionContentPartKind.Text?s.text.length:0),0),0)}a(fTa,"charCount")});var Zli=T(Zy=>{"use strict";f();var pTa=Zy&&Zy.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hTa=Zy&&Zy.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mTa=Zy&&Zy.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},gTa=Zy&&Zy.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;otypeof k=="boolean"?k?Rlt.IncludeLineNumbersOption.WithSpaceAfter:Rlt.IncludeLineNumbersOption.None:k),A=new Tmr.PromptPieces(e.currentDocument,e.editWindowLinesRange,e.areaAroundEditWindowLinesRange,e.activeDoc,e.xtabHistory,d.lines,p,e.langCtx,e.aggressivenessLevel,m,this.computeTokens,{...e.opts,includePostScript:!1,lintOptions:h,recentlyViewedDocuments:{...e.opts.recentlyViewedDocuments,includeLineNumbers:g}}),{prompt:y}=(0,Tmr.getUserPrompt)(A),E=(0,wTa.constructMessages)({systemMsg:c,userMsg:y});n?.setCursorJumpPrompt(E);let _=this.configService.getExperimentBasedConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionModelName,this.expService);if(_===void 0)return s.trace("Model name for cursor prediction is not defined; skipping prediction"),sI.Result.fromString("modelNameNotDefined");n?.setCursorJumpModelName(_);let v=await this.resolveEndpoint(_,s);if(!v)return sI.Result.fromString("endpointNotResolved");let{endpoint:b,usesResponsesApi:I}=v,x=this.configService.getConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionApiKey),w=this.configService.getExperimentBasedConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionMaxResponseTokens,this.expService),R={max_tokens:I?Math.max(w,2048):w};x&&(R={...R,secretKey:x});let P=await b.makeChatRequest2({messages:E,debugName:"nes.nextCursorPosition",finishedCb:void 0,location:bmr.ChatLocation.Other,requestOptions:R},o);if(P.type!==bmr.ChatFetchResponseType.Success)return P.type===bmr.ChatFetchResponseType.NotFound&&(s.trace("Next cursor position prediction endpoint not found; disabling predictor for current session."),this.isDisabled=!0),sI.Result.fromString(`fetchError:${P.type}`);try{n?.setCursorJumpResponse(P.value);let k=P.value.trim();return this.parseResponse(k,d.keptRange)}catch(k){return s.trace(`Failed to parse predicted line number from response '${P.value}': ${k}`),sI.Result.fromString(`failedToParseLine:"${P.value}". Error ${bTa.ErrorUtils.fromUnknown(k).message}`)}}async resolveEndpoint(e,r){if(this.configService.getConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionUseEndpointProvider)){let c=(await this.endpointProvider.getAllChatEndpoints()).find(u=>u.model===e||u.family===e);if(!c){r.trace(`Could not find endpoint for model '${e}' via endpoint provider`);return}let l=c.apiType==="responses";return{endpoint:c,usesResponsesApi:l}}let o=this.configService.getConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionUrl);return{endpoint:this.instaService.createInstance(ETa.ChatEndpoint,{id:e,name:"nes.nextCursorPosition",vendor:e,urlOrRequestMetadata:o||{type:ATa.RequestType.ProxyChatCompletions},model_picker_enabled:!1,is_chat_default:!1,is_chat_fallback:!1,version:"",capabilities:{type:"chat",family:"",tokenizer:TTa.TokenizerType.CL100K,limits:void 0,supports:{parallel_tool_calls:!1,tool_calls:!1,streaming:!0,vision:!1,prediction:!1,thinking:!1}}}),usesResponsesApi:!1}}determineLintOptions(){let e=this.configService.getConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionLintOptions);if(e)return{...Plt.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS,...e};let r=this.configService.getExperimentBasedConfig(XR.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionLintOptionsString,this.expService);return r?(0,Plt.parseLintOptionString)(r,Plt.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS):Plt.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS}parseResponse(e,r){let n=parseInt(e,10);if(!isNaN(n)&&String(n)===e)return this.parseSameFileLineNumber(n,r);let o=e.lastIndexOf(":");if(o<=0)return sI.Result.fromString("gotNaN");let s=e.substring(0,o),c=e.substring(o+1),l=parseInt(c,10);return isNaN(l)||l<0?sI.Result.fromString("crossFileInvalidLineNumber"):s.trim().length===0?sI.Result.fromString("crossFileEmptyFilePath"):sI.Result.ok({kind:"differentFile",filePath:s.trim(),lineNumber:l})}parseSameFileLineNumber(e,r){return e<0?sI.Result.fromString("negativeLineNumber"):e{"use strict";f();var RTa=_l&&_l.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PTa=_l&&_l.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kTa=_l&&_l.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},DTa=_l&&_l.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;oMath.floor(e.length/4)}constructor(e,r,n,o,s,c,l,u,d,p,h){this.modelService=e,this.simulationCtx=r,this.instaService=n,this.workspaceService=o,this.diffService=s,this.configService=c,this.expService=l,this.langCtxService=u,this.langDiagService=d,this.ignoreService=p,this.similarFilesContextService=h,this.ID=r3.ID,this.forceUseDefaultModel=!1,this.userInteractionMonitor=this.instaService.createInstance(XTa.UserInteractionMonitor),this.terminalMonitor=this.instaService.createInstance(nSa.TerminalMonitor),this.nextCursorPredictor=this.instaService.createInstance(aSa.XtabNextCursorPredictor,r3.computeTokens)}handleAcceptance(){this.userInteractionMonitor.handleAcceptance()}handleRejection(){this.userInteractionMonitor.handleRejection()}handleIgnored(){this.userInteractionMonitor.handleIgnored()}async*provideNextEdit(e,r,n,o){let s=new Mo.StatelessNextEditTelemetryBuilder(e.headerRequestId);n.setProviderStartTime();try{if(e.xtabEditHistory.length===0){let p=new Mo.NoNextEditReason.ActiveDocumentHasNoEdits;return new Mo.WithStatelessProviderTelemetry(p,s.build(Dlt.Result.error(p)))}let c=this.userInteractionMonitor.createDelaySession(e.providerRequestStartDateTime),l=this.doGetNextEdit(e,c,r,n,o,s,bQ.NotRetrying.INSTANCE),u=await l.next();for(;!u.done;)yield new Mo.WithStatelessProviderTelemetry(u.value,s.build(Dlt.Result.ok(void 0))),u=await l.next();let d=u.value;return d instanceof Mo.NoNextEditReason.GotCancelled&&n.setIsSkipped(),new Mo.WithStatelessProviderTelemetry(d,s.build(Dlt.Result.error(d)))}catch(c){let l=CQ.ErrorUtils.fromUnknown(c),u=new Mo.NoNextEditReason.Unexpected(l);return new Mo.WithStatelessProviderTelemetry(u,s.build(Dlt.Result.error(u)))}finally{n.setProviderEndTime()}}doGetNextEdit(e,r,n,o,s,c,l){return this.doGetNextEditWithSelection(e,(0,JTa.getOrDeduceSelectionFromLastEdit)(e.getActiveDocument()),r,n,o,s,c,l)}async*doGetNextEditWithSelection(e,r,n,o,s,c,l,u,d){let p=o.createSubLogger(["XtabProvider","doGetNextEditWithSelection"]),h=e.getActiveDocument();if(r===null)return new Mo.NoNextEditReason.Uncategorized(new Error("NoSelection"));let{promptOptions:m,modelServiceConfig:g}=this.determineModelConfiguration(h);l.setModelConfig(JSON.stringify(g));let A=this.getEndpoint(m.modelName);s.setEndpointInfo(typeof A.urlOrRequestMetadata=="string"?A.urlOrRequestMetadata:JSON.stringify(A.urlOrRequestMetadata.type),A.model),l.setModelName(A.model);let y=new Imr.Position(r.endLineNumber,r.endColumn),E=new iSa.CurrentDocument(h.documentAfterEdits,y),v=E.lines[E.cursorLineOffset].substring(y.column-1).match(/^\s*$/)!==null;l.setIsCursorAtLineEnd(v);let b=(0,eSa.isInlineSuggestion)(E,y);if(l.setIsInlineSuggestion(!!b),e.isSpeculative)p.trace("No extra debounce applied for speculative request");else{let X=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsExtraDebounceInlineSuggestion,this.expService);b&&X>0?(p.trace("Debouncing for inline suggestion position"),n.setExtraDebounce(X)):v?(p.trace("Debouncing for cursor at end of line"),n.setExtraDebounce(this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsExtraDebounceEndOfLine,this.expService))):p.trace("No extra debounce applied")}(0,XK.isAggressivenessStrategy)(m.promptingStrategy)||this._applyAggressivenessSettings(n,p);let I=cui(E),x=this.computeEditWindowLinesRange(E,e,p,l),w=Math.max(0,E.cursorLineOffset-x.start),R=E.transformer.getLineLength(x.endExclusive),P=E.transformer.getOffsetRange(new Nlt.Range(x.start+1,1,x.endExclusive,R+1)),k=E.lines.slice(x.start,x.endExclusive),Q=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabEditWindowMaxTokens,this.expService);if(Q!==void 0&&(0,sui.countTokensForLines)(k,r3.computeTokens)>Q)return new Mo.NoNextEditReason.PromptTooLarge("editWindow");let N=!k.some(X=>X.includes(_Q.PromptTags.CURSOR)),G=(0,vQ.constructTaggedFile)(E,x,I,m,r3.computeTokens,{includeLineNumbers:{areaAroundCodeToEdit:Rs.IncludeLineNumbersOption.None,currentFileContent:m.currentFile.includeLineNumbers}});if(G.isError())return new Mo.NoNextEditReason.PromptTooLarge("currentFile");let{clippedTaggedCurrentDoc:O,areaAroundCodeToEdit:D}=G.val;l.setNLinesOfCurrentFileInPrompt(O.lines.length);let{aggressivenessLevel:F,userHappinessScore:U}=this.userInteractionMonitor.getAggressivenessLevel(),L=this.configService.getExperimentBasedConfig(vi.ConfigKey.Advanced.InlineEditsAggressiveness,this.expService);L!==XK.AggressivenessSetting.Default&&l.setUserAggressivenessSetting(L),(0,XK.isAggressivenessStrategy)(m.promptingStrategy)&&(l.setXtabAggressivenessLevel(F),U!==void 0&&l.setXtabUserHappinessScore(U));let H=await this.getAndProcessLanguageContext(e,n,h,y,m,p,s,c);if(c.isCancellationRequested)return new Mo.NoNextEditReason.GotCancelled("afterLanguageContextAwait");let $=new tSa.LintErrors(h.id,E,this.langDiagService,e.xtabEditHistory),W=new vQ.PromptPieces(E,x,I,h,e.xtabEditHistory,O.lines,D,H,F,$,r3.computeTokens,m),{prompt:j,nDiffsInPrompt:ce,diffTokensInPrompt:J}=(0,vQ.getUserPrompt)(W);l.setNDiffsInPrompt(ce),l.setDiffTokensInPrompt(J);let Te=Rs.ResponseFormat.fromPromptingStrategy(m.promptingStrategy),fe=this.getPredictedOutput(h,k,Te),Ne=(0,xmr.constructMessages)({systemMsg:lui(m.promptingStrategy),userMsg:j});s.setPrompt(Ne),l.setPrompt(Ne);let Ve=3e4*4;if((0,xmr.charCount)(Ne)>Ve)return new Mo.NoNextEditReason.PromptTooLarge("final");if(await this.debounce(n,u,p,l,c),c.isCancellationRequested)return new Mo.NoNextEditReason.GotCancelled("afterDebounce");Promise.resolve().then(()=>{let X=$.getData();l.setLintErrors(X),s.setDiagnosticsData(X);let le=this.terminalMonitor.getData();l.setTerminalOutput(le),s.setTerminalData(le)}),l.setSimilarFilesContext(this.similarFilesContextService.compute(h.id.uri,h.languageId,h.documentAfterEdits.value,E.cursorOffset)),e.fetchIssued=!0;let Ke=y.column;return yield*this.streamEditsWithFiltering(e,A,g,Ne,E,O,P,k,w,Ke,x,W,fe,{shouldRemoveCursorTagFromResponse:N,responseFormat:Te,retryState:u,aggressivenessLevel:F,userHappinessScore:U},n,p,l,s,c,d)}_applyAggressivenessSettings(e,r){let n=this.configService.getExperimentBasedConfig(vi.ConfigKey.Advanced.InlineEditsAggressiveness,this.expService),s={[XK.AggressivenessSetting.Low]:{minResponseConfigKey:vi.ConfigKey.TeamInternal.InlineEditsAggressivenessLowMinResponseTimeMs},[XK.AggressivenessSetting.Medium]:{minResponseConfigKey:vi.ConfigKey.TeamInternal.InlineEditsAggressivenessMediumMinResponseTimeMs},[XK.AggressivenessSetting.High]:{debounceConfigKey:vi.ConfigKey.TeamInternal.InlineEditsAggressivenessHighDebounceMs},[XK.AggressivenessSetting.Default]:void 0}[n];if(s){if(s.debounceConfigKey){let c=this.configService.getExperimentBasedConfig(s.debounceConfigKey,this.expService);e.setBaseDebounceTime(c),r.trace(`Aggressiveness ${n}: debounce set to ${c}ms`)}if(s.minResponseConfigKey){if(this.userInteractionMonitor.wasLastActionAcceptance){r.trace(`Aggressiveness ${n}: skipping min response time (last action was acceptance)`);return}let c=this.configService.getExperimentBasedConfig(s.minResponseConfigKey,this.expService);e.setExpectedTotalTime(c),r.trace(`Aggressiveness ${n}: min response time set to ${c}ms`)}}}getAndProcessLanguageContext(e,r,n,o,s,c,l,u){let d=this.configService.getConfig(vi.ConfigKey.TeamInternal.InlineEditsLogContextRecorderEnabled);if(!s.languageContext.enabled&&!d)return Promise.resolve(void 0);let p=this.getLanguageContext(e,r,n,o,c,l,u);return d&&p.then(h=>{h&&l.setLanguageContext(h)}),s.languageContext.enabled?p:Promise.resolve(void 0)}async getLanguageContext(e,r,n,o,s,c,l){try{let u=this.workspaceService.textDocuments.find(b=>b.uri.toString()===n.id.uri);if(u===void 0||this.langCtxService.getContextProviders(u,oui.ProviderTarget.NES).length<1)return;let p=r.getDebounceTime(),h=new KTa.Position(o.lineNumber-1,o.column-1),m={opportunityId:e.opportunityId,completionId:e.headerRequestId,documentContext:{uri:u.uri.toString(),languageId:u.languageId,version:u.version,offset:u.offsetAt(h),position:h},activeExperiments:new Map,timeBudget:p,timeoutEnd:Date.now()+p,source:"nes"},g=a(async b=>{let I=[b.uri,...b.additionalUris??[]];return!!await(0,$Ta.raceFilter)(I.map(w=>this.ignoreService.isCopilotIgnored(w)),w=>w)},"isSnippetIgnored"),A=[],y=a(async()=>{let b=this.langCtxService.getContextItems(u,m,l);for await(let I of b)I.kind===tui.ContextKind.Snippet&&await g(I)||A.push({context:I,timeStamp:Date.now(),onTimeout:!1})},"getContextPromise"),E=Date.now();if(await(0,Bde.raceCancellation)((0,Bde.raceTimeout)(y(),p),l),l.isCancellationRequested)return;let _=Date.now(),v=this.langCtxService.getContextItemsOnTimeout(u,m);for(let b of v)b.kind===tui.ContextKind.Snippet&&await g(b)||A.push({context:b,timeStamp:_,onTimeout:!0});return{start:E,end:_,items:A}}catch(u){c.setError(CQ.ErrorUtils.fromUnknown(u)),s.trace(`Failed to fetch language context: ${u}`);return}}async*streamEditsWithFiltering(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I){let x=E.createSubLogger("streamEditsWithFiltering"),w=this.streamEdits(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,x,_,v,b,I),R=0,P=await w.next();for(;!P.done;){let k=P.value.edit;this.filterEdit(e.getActiveDocument(),[k]).length===0?x.trace(`Filtered out an edit: ${k.toString()}`):(x.trace(`Yielding an edit: ${k.toString()}`),yield P.value,R++),P=await w.next()}return R===0&&P.value instanceof Mo.NoNextEditReason.NoSuggestions?yield*this.doGetNextEditsWithCursorJump(e,n,l,m,y,E,v,b,_,A.retryState):P.value}async*streamEdits(e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I){let x=E.createSubLogger("streamEdits"),w=e.getActiveDocument().id,R=this.configService.getExperimentBasedConfig(vi.ConfigKey.NextEditSuggestionsFetcher,this.expService)||void 0,P=new NTa.FetchStreamSource,k=new VTa.StopWatch,Q="",M,N,G=new Bde.DeferredPromise;v.setHeaderRequestId(e.headerRequestId),_.setFetchStartedAt(),v.setFetchStartTime();let O=r.makeChatRequest2({debugName:r3.ID,messages:o,finishedCb:a(async(ce,J,Te)=>{G.isSettled||G.complete(),N===void 0&&ce!==""&&(N=k.elapsed(),v.addLog(`TTFT ${N} ms`)),P.update(ce,Te),Q=ce,v.setResponse(Q)},"finishedCb"),location:ud.ChatLocation.Other,source:void 0,requestOptions:{temperature:0,stream:!0,prediction:g},userInitiatedRequest:void 0,telemetryProperties:{requestId:e.headerRequestId},useFetcher:R,customMetadata:{aggressivenessLevel:A.aggressivenessLevel,userHappinessScore:A.userHappinessScore}},b);_.setResponse(O.then(ce=>({response:ce,ttft:N}))),v.setFullResponse(O.then(ce=>ce.type===ud.ChatFetchResponseType.Success?ce.value:void 0));let D=await Promise.race([G.p,O]);if(D&&D.type!==ud.ChatFetchResponseType.Success)return D.type===ud.ChatFetchResponseType.NotFound&&!this.forceUseDefaultModel?(this.forceUseDefaultModel=!0,yield*this.doGetNextEdit(e,y,x,v,b,_,A.retryState)):D.type===ud.ChatFetchResponseType.Unknown&&D.reason===ud.RESPONSE_CONTAINED_NO_CHOICES?new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l):Pmr(D);O.then(ce=>{M=ce.type!==ud.ChatFetchResponseType.Success?ce:void 0}).catch(ce=>{v.setError(CQ.ErrorUtils.fromUnknown(ce)),v.addLog("ChatMLFetcher fetch call threw -- this's UNEXPECTED!")}).finally(()=>{v.setFetchEndTime(),G.isSettled||G.complete(),P.resolve(),v.setResponse(Q)});let F=rui.AsyncIterUtilsExt.splitLines(rui.AsyncIterUtils.map(P.stream,ce=>ce.delta.text)),U=(async function*(){let ce=0;for await(let J of F){let Te=`Line ${ce++} emitted with latency ${k.elapsed()} ms`;x.trace(Te),yield A.shouldRemoveCursorTagFromResponse?J.replaceAll(_Q.PromptTags.CURSOR,""):J}})(),L=A.retryState instanceof bQ.Retrying&&A.retryState.reason==="cursorJump",H;if(A.responseFormat===Rs.ResponseFormat.EditWindowOnly)H=U;else if(A.responseFormat===Rs.ResponseFormat.EditWindowWithEditIntent||A.responseFormat===Rs.ResponseFormat.EditWindowWithEditIntentShort){let ce=A.responseFormat===Rs.ResponseFormat.EditWindowWithEditIntentShort?Fde.ShortName:Fde.Tags,{editIntent:J,remainingLinesStream:Te,parseError:fe}=await fui(U,x,ce);if(_.setEditIntent(J),fe&&_.setEditIntentParseError(fe),!Rs.EditIntent.shouldShowEdit(J,m.aggressivenessLevel))return x.trace(`Filtered out edit due to edit intent "${J}" with aggressiveness "${m.aggressivenessLevel}"`),new Mo.NoNextEditReason.FilteredOut(`editIntent:${J} aggressivenessLevel:${m.aggressivenessLevel}`);H=Te}else if(A.responseFormat===Rs.ResponseFormat.CustomDiffPatch){let ce=e.getActiveDocument(),Te=s.lines[c.keptRange.endExclusive-1].length,fe=s.transformer.getOffsetRange(new Nlt.Range(c.keptRange.start+1,1,c.keptRange.endExclusive,Te+1));return yield*oSa.XtabCustomDiffPatchResponseHandler.handleResponse(U,e.documentBeforeEdits,ce.id,ce.workspaceRoot,fe)}else if(A.responseFormat===Rs.ResponseFormat.UnifiedWithXml){let ce=U[Symbol.asyncIterator](),J=await ce.next();if(M!==void 0)return new Mo.NoNextEditReason.Unexpected(CQ.ErrorUtils.fromUnknown(M));if(J.done)return new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l);let Te=J.value.trim();if(Te===_Q.ResponseTags.NO_CHANGE.start)return yield*this.doGetNextEditsWithCursorJump(e,n,l,m,y,x,v,b,_,A.retryState);if(Te===_Q.ResponseTags.INSERT.start){let fe=await ce.next();if(fe.done||fe.value.includes(_Q.ResponseTags.INSERT.end))return new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l);yield{edit:new Lde.LineReplacement(new Mlt.LineRange(h.start+d+1,h.start+d+2),[u[d].slice(0,p-1)+fe.value+u[d].slice(p-1)]),isFromCursorJump:L,window:l,originalWindow:I,targetDocument:w};let Ve=[],Ue=await ce.next();for(;!Ue.done&&!Ue.value.includes(_Q.ResponseTags.INSERT.end);)Ve.push(Ue.value),Ue=await ce.next();let Ke=h.start+d+2;return yield{edit:new Lde.LineReplacement(new Mlt.LineRange(Ke,Ke),Ve),isFromCursorJump:L,window:l,originalWindow:I,targetDocument:w},new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l)}if(Te===_Q.ResponseTags.EDIT.start)H=(async function*(){let fe=await ce.next();for(;!fe.done;){if(fe.value.includes(_Q.ResponseTags.EDIT.end))return;yield fe.value,fe=await ce.next()}})();else return new Mo.NoNextEditReason.Unexpected(new Error(`unexpected tag ${Te}`))}else A.responseFormat===Rs.ResponseFormat.CodeBlock?H=(0,xmr.linesWithBackticksRemoved)(U):(0,ZK.assertNever)(A.responseFormat);let $={emitFastCursorLineChange:eui.ResponseProcessor.mapEmitFastCursorLineChange(this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderEmitFastCursorLineChange,this.expService)),nLinesToConverge:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabNNonSignificantLinesToConverge,this.expService),nSignificantLinesToConverge:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabNSignificantLinesToConverge,this.expService)};x.trace(`starting to diff stream against edit window lines with latency ${k.elapsed()} ms`);let W=0,j=!1;try{for await(let ce of eui.ResponseProcessor.diff(u,H,d,$)){x.trace(`ResponseProcessor streamed edit #${W} with latency ${k.elapsed()} ms`);let J=[];if(ce.lineRange.startLineNumber===ce.lineRange.endLineNumberExclusive||ce.newLines.length===0||ce.lineRange.endLineNumberExclusive-ce.lineRange.startLineNumber===1&&ce.newLines.length===1){let Te=new Lde.LineReplacement(new Mlt.LineRange(ce.lineRange.startLineNumber+h.start,ce.lineRange.endLineNumberExclusive+h.start),ce.newLines);J.push(Te)}else{let Te=u.slice(ce.lineRange.startLineNumber-1,ce.lineRange.endLineNumberExclusive-1).join(` `),fe=await this.diffService.computeDiff(Te,ce.newLines.join(` -`),{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1});x.trace(`Ran diff for #${W} with latency ${k.elapsed()} ms`);let De=h.start+ce.lineRange.startLineNumber;for(let Ve of fe.changes){let Ue=new bfe.LineReplacement(new xut.LineRange(De+Ve.original.startLineNumber-1,De+Ve.original.endLineNumberExclusive-1),ce.newLines.slice(Ve.modified.startLineNumber-1,Ve.modified.endLineNumberExclusive-1));J.push(Ue)}}if(M)break;v.setResponse(Q);for(let Te of J){if(x.trace(`extracting edit #${W}: ${Te.toString()}`),!j){j=!0;let fe=this.determineArtificialDelayMs(y,x,_);if(fe&&(await(0,vfe.timeout)(fe),x.trace(`Artificial delay of ${fe} ms completed`),b.isCancellationRequested))return new Fo.NoNextEditReason.GotCancelled("afterArtificialDelay")}yield{edit:Te,isFromCursorJump:L,window:l,originalWindow:I,targetDocument:R},W++}}return M?umr(M):new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l)}catch(ce){return v.setError(ce),new Fo.NoNextEditReason.Unexpected(zQ.ErrorUtils.fromUnknown(ce))}}async*doGetNextEditsWithCursorJump(e,r,n,o,s,c,l,u,d,p){let h=new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,n),m=this.nextCursorPredictor.determineEnablement(r.supportsNextCursorLinePrediction);if(m===void 0||p instanceof KQ.Retrying)return h;if(cmr(e))return c.trace("Skipping cursor prediction: user typed during request"),new Fo.NoNextEditReason.GotCancelled("beforeNextCursorPredictionFetchUserTyped");let g=await this.nextCursorPredictor.predictNextCursorPosition(o,c,d,u);if(u.isCancellationRequested)return new Fo.NoNextEditReason.GotCancelled("afterNextCursorPredictionFetch");if(cmr(e))return c.trace("Skipping cursor prediction: user typed during prediction fetch"),new Fo.NoNextEditReason.GotCancelled("afterNextCursorPredictionFetchUserTyped");if(g.isError())return c.trace(`Predicted next cursor line error: ${g.err.message}`),d.setNextCursorLineError(g.err.message),h;let A=g.val;if(A.kind==="differentFile")return yield*this.handleCrossFilePrediction(A,m,e,n,o,s,c,l,u,d);let y=A.lineNumber,E=y-o.currentDocument.cursorLineOffset;if(d.setNextCursorLineDistance(E),d.setNextCursorIsCrossFile(!1),c.trace(`Predicted next cursor line: ${y}`),y>=o.currentDocument.lines.length)return c.trace("Predicted next cursor line error: exceedsDocumentLines"),d.setNextCursorLineError("exceedsDocumentLines"),h;if(o.editWindowLinesRange.contains(y))return c.trace("Predicted next cursor line error: withinEditWindow"),d.setNextCursorLineError("withinEditWindow"),h;let _=y+1,v=o.activeDoc.documentAfterEditsLines.at(y),b=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionCursorPlacement,this.expService),I=C3.getNextCursorColumn(v,b);switch(m){case _fe.NextCursorLinePrediction.Jump:{let x=new smr.Position(_,I);return new Fo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,n,x)}case _fe.NextCursorLinePrediction.OnlyWithEdit:return yield*this.doGetNextEditWithSelection(e,new Iut.Range(_,I,_,I),s,c,l,u,d,new KQ.Retrying("cursorJump"),n);default:(0,VJ.assertNever)(m)}}async*handleCrossFilePrediction(e,r,n,o,s,c,l,u,d,p){let h=s.activeDoc.workspaceRoot;if(!h&&!(0,ili.isAbsolute)(e.filePath))return l.trace("Predicted cross-file cursor jump error: noWorkspaceRoot"),p.setNextCursorLineError("crossFile:noWorkspaceRoot"),new Fo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o);let m=(0,ili.isAbsolute)(e.filePath)?oli.URI.file(e.filePath):oli.URI.joinPath(h,e.filePath),g=Bva.DocumentId.create(m.toString()),A=e.lineNumber+1,y=new smr.Position(A,1);switch(p.setNextCursorIsCrossFile(!0),l.trace(`Predicted cross-file cursor jump: ${e.filePath}:${e.lineNumber}`),r){case _fe.NextCursorLinePrediction.Jump:return new Fo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o,y,g);case _fe.NextCursorLinePrediction.OnlyWithEdit:{let E;try{E=await this.workspaceService.openTextDocument(m)}catch(I){return l.trace(`Failed to open target file for cross-file edit: ${zQ.ErrorUtils.fromUnknown(I).message}`),p.setNextCursorLineError("crossFile:failedToOpenFile"),new Fo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o,y,g)}if(d.isCancellationRequested)return new Fo.NoNextEditReason.GotCancelled("afterCrossFileOpenTextDocument");if(cmr(n))return l.trace("Skipping cross-file edit: user typed during openTextDocument"),new Fo.NoNextEditReason.GotCancelled("afterCrossFileOpenTextDocumentUserTyped");let _=new Wva.StringText(E.getText()),v=new Fo.StatelessNextEditDocument(g,s.activeDoc.workspaceRoot,Fva.LanguageId.create(E.languageId),_.getLines(),bfe.LineEdit.empty,_,new Lva.Edits(Vva.StringEdit,[])),b=new Fo.StatelessNextEditRequest(n.headerRequestId,n.opportunityId,_,[v],0,n.xtabEditHistory,new vfe.DeferredPromise,n.expandedEditWindowNLines,n.isSpeculative,n.logContext,n.recordingBookmark,n.recording,n.providerRequestStartDateTime);return yield*this.doGetNextEditWithSelection(b,new Iut.Range(A,1,A,1),c,l,u,d,p,new KQ.Retrying("cursorJump"),o)}default:(0,VJ.assertNever)(r)}}computeEditWindowLinesRange(e,r,n,o){let s=e.lines,c=e.cursorLineOffset,l;if(this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderUseVaryingLinesAbove,this.expService)){l=0;for(let g=0;g<8;++g){let A=c-g;if(A<0)break;if(s[A].trim()!==""){l=g;break}}}else l=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderNLinesAbove,this.expService)??YQ.N_LINES_ABOVE;let u;if(r.expandedEditWindowNLines!==void 0)n.trace(`Using expanded nLinesBelow: ${r.expandedEditWindowNLines}`),u=r.expandedEditWindowNLines;else{let m=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderNLinesBelow,this.expService);m!==void 0?(n.trace(`Using overridden nLinesBelow: ${m}`),u=m):(n.trace(`Using default nLinesBelow: ${YQ.N_LINES_BELOW}`),u=YQ.N_LINES_BELOW)}let d=Math.max(0,c-l),p=Math.min(s.length,c+u+1),h=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabMaxMergeConflictLines,this.expService);if(h){let m=new wut.OffsetRange(d,p),g=hli(s,m,h);if(g){let A=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabOnlyMergeConflictLines,this.expService);o.setMergeConflictExpanded(A?"only":"normal"),A?(n.trace(`Expanding edit window to include ONLY merge conflict markers: ${g.toString()}`),d=g.start,p=g.endExclusive):(n.trace(`Expanding edit window to include merge conflict markers: ${g.toString()}; edit window range [${d}, ${p})`),p=Math.max(p,g.endExclusive))}}return new wut.OffsetRange(d,p)}determineModelConfiguration(e){if(this.forceUseDefaultModel){let s={modelName:void 0,...Os.DEFAULT_OPTIONS},c=this.modelService.defaultModelConfiguration();return{promptOptions:dmr(s,c),modelServiceConfig:c}}let r={modelName:void 0,promptingStrategy:void 0,currentFile:{maxTokens:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabCurrentFileMaxTokens,this.expService),includeTags:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabIncludeTagsInCurrentFile,this.expService),includeLineNumbers:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabIncludeLineNumbersInCurrentFile,this.expService),includeCursorTag:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabIncludeCursorTagInCurrentFile,this.expService),prioritizeAboveCursor:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabPrioritizeAboveCursor,this.expService)},pagedClipping:{pageSize:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabPageSize,this.expService)},recentlyViewedDocuments:{nDocuments:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabNRecentlyViewedDocuments,this.expService),maxTokens:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedDocumentsMaxTokens,this.expService),includeViewedFiles:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabIncludeViewedFiles,this.expService),includeLineNumbers:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedIncludeLineNumbers,this.expService),clippingStrategy:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedClippingStrategy,this.expService)},languageContext:dli(e.languageId,{enabled:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextEnabled,this.expService),enabledLanguages:this.configService.getConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextEnabledLanguages),enableAllContextProviders:this.configService.getExperimentBasedConfig(bi.ConfigKey.Advanced.DiagnosticsContextProvider,this.expService)||this.configService.getExperimentBasedConfig(bi.ConfigKey.Advanced.ChatSessionContextProvider,this.expService),maxTokens:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextMaxTokens,this.expService),traitPosition:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextTraitsPosition,this.expService)}),diffHistory:{nEntries:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabDiffNEntries,this.expService),maxTokens:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabDiffMaxTokens,this.expService),onlyForDocsInPrompt:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabDiffOnlyForDocsInPrompt,this.expService),useRelativePaths:this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabDiffUseRelativePaths,this.expService)},lintOptions:void 0,includePostScript:!0},n=this.modelService.selectedModelConfiguration(),o=n.promptingStrategy===Os.PromptingStrategy.CopilotNesXtab?{...n,includeTagsInCurrentFile:!0}:n;return{promptOptions:dmr(r,o),modelServiceConfig:o}}getEndpoint(e){let r=this.configService.getConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderUrl),n=this.configService.getConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderApiKey);return r!==void 0&&n!==void 0?this.instaService.createInstance(oba.XtabEndpoint,r,n,e):(0,Mva.createProxyXtabEndpoint)(this.instaService,e)}getPredictedOutput(e,r,n){return this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsXtabProviderUsePrediction,this.expService)?{type:"content",content:fli(e,r,n)}:void 0}async debounce(e,r,n,o,s){if(this.simulationCtx.isInSimulationTests)return;if(r instanceof KQ.Retrying){n.trace("Skipping debounce on retry");return}let c=e.getDebounceTime();n.trace(`Debouncing for ${c} ms`),o.setDebounceTime(c);try{await(0,vfe.timeout)(c,s)}catch{}}determineArtificialDelayMs(e,r,n){if(this.simulationCtx.isInSimulationTests)return;let o=e.getArtificialDelay();if(!(o<=0))return r.trace(`Enforcing artificial delay of ${o} ms`),n.setArtificialDelay(o),o}filterEdit(e,r){let n=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsAllowImportChanges,this.expService),o=[l=>Xva.IgnoreImportChangesAspect.filterEdit(e,l,n),l=>Tut.IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges.filterEdit(e,l)];this.configService.getExperimentBasedConfig(bi.ConfigKey.InlineEditsAllowWhitespaceOnlyChanges,this.expService)||o.push(l=>Tut.IgnoreWhitespaceOnlyChanges.filterEdit(e,l));let s=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsUndoInsertionFiltering,this.expService);if(s!==void 0){let l;switch(s){case"v1":l=Tut.editWouldDeleteWhatWasJustInserted;break;case"v2":l=Tut.editWouldDeleteWhatWasJustInserted2;break;default:(0,VJ.assertNever)(s)}o.push(u=>l(e,new bfe.LineEdit(u))?[]:u)}let c=this.configService.getExperimentBasedConfig(bi.ConfigKey.TeamInternal.InlineEditsFilterOutEditsWithSubstrings,this.expService);if(c){let l=c.split(",").map(u=>u.trim()).filter(u=>u.length>0);o.push(u=>cli(u,l))}return o.reduce((l,u)=>u(l),r)}static getNextCursorColumn(e,r){let n;switch(r){case _fe.NextCursorLinePredictionCursorPlacement.BeforeLine:n=(e?.match(/^(\s*)/)?.at(1)?.length??0)+1;break;case _fe.NextCursorLinePredictionCursorPlacement.AfterLine:n=(e?.length??0)+1;break;default:(0,VJ.assertNever)(r)}return n}};xl.XtabProvider=lmr;xl.XtabProvider=lmr=C3=Pva([u2(0,Uva.IInlineEditsModelService),u2(1,qva.ISimulationTestContext),u2(2,zva.IInstantiationService),u2(3,Hva.IWorkspaceService),u2(4,Dva.IDiffService),u2(5,bi.IConfigurationService),u2(6,Gva.IExperimentationService),u2(7,sli.ILanguageContextProviderService),u2(8,Qva.ILanguageDiagnosticsService),u2(9,Ova.IIgnoreService),u2(10,tba.ISimilarFilesContextService)],lmr);function cli(t,e){return t.filter(r=>r.newLines.every(n=>e.every(o=>!n.includes(o))))}a(cli,"filterOutEditsWithSubstrings");function lli(t){let e=t.cursorLineOffset,r=Math.max(0,e-YQ.N_LINES_AS_CONTEXT),n=Math.min(t.lines.length,e+YQ.N_LINES_AS_CONTEXT+1);return new wut.OffsetRange(r,n)}a(lli,"computeAreaAroundEditWindowLinesRange");function umr(t){switch(t.type){case yd.ChatFetchResponseType.Canceled:return new Fo.NoNextEditReason.GotCancelled("afterFetchCall");case yd.ChatFetchResponseType.OffTopic:case yd.ChatFetchResponseType.Filtered:case yd.ChatFetchResponseType.PromptFiltered:case yd.ChatFetchResponseType.Length:case yd.ChatFetchResponseType.RateLimited:case yd.ChatFetchResponseType.QuotaExceeded:case yd.ChatFetchResponseType.ExtensionBlocked:case yd.ChatFetchResponseType.AgentUnauthorized:case yd.ChatFetchResponseType.AgentFailedDependency:case yd.ChatFetchResponseType.InvalidStatefulMarker:return new Fo.NoNextEditReason.Uncategorized(zQ.ErrorUtils.fromUnknown(t));case yd.ChatFetchResponseType.BadRequest:case yd.ChatFetchResponseType.NotFound:case yd.ChatFetchResponseType.Failed:case yd.ChatFetchResponseType.NetworkError:case yd.ChatFetchResponseType.Unknown:return new Fo.NoNextEditReason.FetchFailure(zQ.ErrorUtils.fromUnknown(t))}}a(umr,"mapChatFetcherErrorToNoNextEditReason");function dmr(t,e){return{...t,modelName:e.modelName,promptingStrategy:e.promptingStrategy,includePostScript:e.includePostScript??t.includePostScript,currentFile:{...t.currentFile,...e.currentFile,includeTags:e.includeTagsInCurrentFile},recentlyViewedDocuments:{...t.recentlyViewedDocuments,...e.recentlyViewedDocuments},lintOptions:e.lintOptions?cba(t.lintOptions,e.lintOptions):t.lintOptions}}a(dmr,"overrideModelConfig");var aba={...Os.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS,maxLineDistance:10};function cba(t,e){return{...t??aba,...e}}a(cba,"mergeLintOptions");function uli(t){switch(t){case Os.PromptingStrategy.UnifiedModel:return k2e.unifiedModelSystemPrompt;case Os.PromptingStrategy.Codexv21NesUnified:case Os.PromptingStrategy.SimplifiedSystemPrompt:return k2e.simplifiedPrompt;case Os.PromptingStrategy.PatchBased:case Os.PromptingStrategy.PatchBased01:case Os.PromptingStrategy.PatchBased02:case Os.PromptingStrategy.Xtab275:case Os.PromptingStrategy.XtabAggressiveness:case Os.PromptingStrategy.Xtab275Aggressiveness:case Os.PromptingStrategy.Xtab275EditIntent:case Os.PromptingStrategy.Xtab275EditIntentShort:return k2e.xtab275SystemPrompt;case Os.PromptingStrategy.Nes41Miniv3:return k2e.nes41Miniv3SystemPrompt;case Os.PromptingStrategy.CopilotNesXtab:case void 0:return k2e.systemPromptTemplate;default:(0,VJ.assertNever)(t)}}a(uli,"pickSystemPrompt");function dli(t,{enabled:e,enabledLanguages:r,maxTokens:n,enableAllContextProviders:o,traitPosition:s}){return t in r?{enabled:r[t],maxTokens:n,traitPosition:s}:o?{enabled:!0,maxTokens:n,traitPosition:s}:{enabled:e,maxTokens:n,traitPosition:s}}a(dli,"determineLanguageContextOptions");function fli(t,e,r){if(r===Os.ResponseFormat.UnifiedWithXml)return["",...e,""].join(` -`);if(r===Os.ResponseFormat.EditWindowOnly)return e.join(` -`);if(r===Os.ResponseFormat.EditWindowWithEditIntent)return["<|edit_intent|>high<|/edit_intent|>",...e].join(` -`);if(r===Os.ResponseFormat.EditWindowWithEditIntentShort)return["H",...e].join(` -`);if(r===Os.ResponseFormat.CodeBlock)return["```",...e,"```"].join(` -`);if(r===Os.ResponseFormat.CustomDiffPatch){let n=t.workspaceRoot?.path;return`${(0,ali.toUniquePath)(t.id,n)}:`}else(0,VJ.assertNever)(r)}a(fli,"getPredictionContents");var Tfe;(function(t){t.Tags="tags",t.ShortName="shortName"})(Tfe||(xl.EditIntentParseMode=Tfe={}));async function pli(t,e,r=Tfe.Tags){return r===Tfe.ShortName?lba(t,e):uba(t,e)}a(pli,"parseEditIntentFromStream");async function lba(t,e){let r=Os.EditIntent.High,n,o=t[Symbol.asyncIterator](),s=await o.next();if(s.done){n="emptyResponse",e.warn("Empty response stream, no edit_intent short name found");let d=(async function*(){})();return{editIntent:r,remainingLinesStream:d,parseError:n}}let c=s.value.trim(),l=Os.EditIntent.fromShortName(c);if(l!==void 0){r=l,e.trace(`Parsed edit_intent short name from first line: "${c}" -> ${r}`);let d=(async function*(){let p=await o.next();for(;!p.done;)yield p.value,p=await o.next()})();return{editIntent:r,remainingLinesStream:d,parseError:n}}n=`unknownIntentValue:${c}`,e.warn(`Edit intent parse error: ${n} (using Xtab275EditIntentShort prompting strategy). Defaulting to High (always show). First line was: "${c.substring(0,100)}..."`);let u=(async function*(){yield s.value;let d=await o.next();for(;!d.done;)yield d.value,d=await o.next()})();return{editIntent:r,remainingLinesStream:u,parseError:n}}a(lba,"parseEditIntentFromStreamShortName");async function uba(t,e){let r="<|edit_intent|>",n="<|/edit_intent|>",o=Os.EditIntent.High,s,c=t[Symbol.asyncIterator](),l=await c.next();if(l.done){s="emptyResponse",e.warn("Empty response stream, no edit_intent tag found");let m=(async function*(){})();return{editIntent:o,remainingLinesStream:m,parseError:s}}let u=l.value,d=u.indexOf(r),p=u.indexOf(n);if(d!==-1&&p!==-1&&p>d){let m=u.substring(d+r.length,p).trim().toLowerCase();["no_edit","low","medium","high"].includes(m)||(s=`unknownIntentValue:${m}`,e.warn(`Unknown edit_intent value: "${m}", defaulting to High`)),o=Os.EditIntent.fromString(m),e.trace(`Parsed edit_intent from first line: "${m}" -> ${o}`);let A=u.substring(p+n.length),y=(async function*(){A.trim()!==""&&(yield A);let E=await c.next();for(;!E.done;)yield E.value,E=await c.next()})();return{editIntent:o,remainingLinesStream:y,parseError:s}}d!==-1&&p===-1?s="malformedTag:startWithoutEnd":d===-1&&p!==-1?s="malformedTag:endWithoutStart":s="noTagFound",e.warn(`Edit intent parse error: ${s} (using Xtab275EditIntent prompting strategy). Defaulting to High (always show). First line was: "${u.substring(0,100)}..."`);let h=(async function*(){yield u;let m=await c.next();for(;!m.done;)yield m.value,m=await c.next()})();return{editIntent:o,remainingLinesStream:h,parseError:s}}a(uba,"parseEditIntentFromStreamTags");function hli(t,e,r){for(let n=e.start;n>>>>>>"))return new wut.OffsetRange(n,o+1)}}a(hli,"findMergeConflictMarkersRange")});var gli=T(a5=>{"use strict";f();var dba=a5&&a5.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Rut=a5&&a5.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(a5,"__esModule",{value:!0});a5.StaticGitHubAuthenticationService=void 0;a5.setCopilotToken=gba;var fba=fc(),pba=L0(),Put=gA(),hba=fxe(),mba=O7(),kut=class extends Put.BaseAuthenticationService{static{a(this,"StaticGitHubAuthenticationService")}constructor(e,r,n,o,s){super(r,n,o,s),this.tokenProvider=e;let c=this;this._anyGitHubSession=e?{get id(){return c.tokenProvider()},get accessToken(){return c.tokenProvider()},scopes:Put.GITHUB_SCOPE_USER_EMAIL,account:{id:"user",label:"User"}}:void 0,this._permissiveGitHubSession=e?{get id(){return c.tokenProvider()},get accessToken(){return c.tokenProvider()},scopes:Put.GITHUB_SCOPE_ALIGNED,account:{id:"user",label:"User"}}:void 0}async getGitHubSession(e,r){if(e==="permissive"){if(this.isMinimalMode){if(r.createIfNone||r.forceNewSession)throw new Put.MinimalModeError;return}return this._permissiveGitHubSession}else return this._anyGitHubSession}async getCopilotToken(e){return await super.getCopilotToken(e)}setCopilotToken(e){this._tokenStore.copilotToken=e,this.fireAuthenticationChange("setCopilotToken")}getAnyAdoSession(e){return Promise.resolve(void 0)}getAdoAccessTokenBase64(e){return Promise.resolve(void 0)}};a5.StaticGitHubAuthenticationService=kut;a5.StaticGitHubAuthenticationService=kut=dba([Rut(1,pba.ILogService),Rut(2,mba.ICopilotTokenStore),Rut(3,hba.ICopilotTokenManager),Rut(4,fba.IConfigurationService)],kut);function gba(t,e){if(!(t instanceof kut))throw new Error("This function should only be used with StaticGitHubAuthenticationService");t.setCopilotToken(e)}a(gba,"setCopilotToken")});var yli=T(EI=>{"use strict";f();Object.defineProperty(EI,"__esModule",{value:!0});EI.derivePullRequestState=Aba;EI.makeGitHubAPIRequest=Ali;EI.makeGitHubGraphQLRequest=Sfe;EI.makeSearchGraphQLRequest=yba;EI.getPullRequestFromGlobalId=Eba;EI.addPullRequestCommentGraphQLRequest=Cba;EI.closePullRequest=_ba;EI.makeGitHubAPIRequestWithPagination=vba;EI.getAssignableActorsWithSuggestedActors=bba;EI.getAssignableActorsWithAssignableUsers=Tba;function Aba(t){let e=t.state?.toUpperCase();return e==="MERGED"?"merged":e==="CLOSED"?"closed":t.isDraft?"draft":"open"}a(Aba,"derivePullRequestState");async function Ali(t,e,r,n,o,s,c,l){let{body:u,version:d,type:p="json",userAgent:h,returnStatusCodeOnError:m=!1,silent404:g=!1,callSite:A="github-api-rest"}=l??{},y={Accept:"application/vnd.github+json"};c&&(y.Authorization=`Bearer ${c}`),d&&(y["X-GitHub-Api-Version"]=d),h&&(y["User-Agent"]=h);let E=await t.fetch(`${n}/${o}`,{method:s,headers:y,body:u?JSON.stringify(u):void 0,callSite:A});if(!E.ok)return g&&E.status===404||e.error(`[GitHubAPI] ${s} ${n}/${o} - Status: ${E?.status}`),m?{status:E.status}:void 0;try{let _=p==="json"?await E.json():await E.text(),v=Number(E.headers.get("x-ratelimit-remaining")),b=`[RateLimit] REST rate limit remaining: ${v}, ${o}`;return v<1e3?(e.warn(b),r.sendMSFTTelemetryEvent("githubAPI.approachingRateLimit",{rateLimit:v.toString()})):e.debug(b),_}catch{return}}a(Ali,"makeGitHubAPIRequest");async function Sfe(t,e,r,n,o,s,c,l="github-api-graphql"){let u={Accept:"application/vnd.github+json","Content-Type":"application/json"};s&&(u.Authorization=`Bearer ${s}`);let d=JSON.stringify({query:o,variables:c}),p=await t.fetch(`${n}/graphql`,{method:"POST",headers:u,body:d,callSite:l});if(!p.ok){e.debug(`[GitHubAPI] GraphQL request to ${n}/graphql failed with status ${p.status}`);return}try{let h=await p.json(),m=Number(p.headers.get("x-ratelimit-remaining")),g=`[RateLimit] GraphQL rate limit remaining: ${m}, query: ${o}`;return m<1e3?(e.warn(g),r.sendMSFTTelemetryEvent("githubAPI.approachingRateLimit",{rateLimit:m.toString()})):e.debug(g),h}catch{return}}a(Sfe,"makeGitHubGraphQLRequest");async function yba(t,e,r,n,o,s,c=20){let l=` +`),{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1});x.trace(`Ran diff for #${W} with latency ${k.elapsed()} ms`);let Ne=h.start+ce.lineRange.startLineNumber;for(let Ve of fe.changes){let Ue=new Lde.LineReplacement(new Mlt.LineRange(Ne+Ve.original.startLineNumber-1,Ne+Ve.original.endLineNumberExclusive-1),ce.newLines.slice(Ve.modified.startLineNumber-1,Ve.modified.endLineNumberExclusive-1));J.push(Ue)}}if(M)break;v.setResponse(Q);for(let Te of J){if(x.trace(`extracting edit #${W}: ${Te.toString()}`),!j){j=!0;let fe=this.determineArtificialDelayMs(y,x,_);if(fe&&(await(0,Bde.timeout)(fe),x.trace(`Artificial delay of ${fe} ms completed`),b.isCancellationRequested))return new Mo.NoNextEditReason.GotCancelled("afterArtificialDelay")}yield{edit:Te,isFromCursorJump:L,window:l,originalWindow:I,targetDocument:w},W++}}return M?Pmr(M):new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,l)}catch(ce){return v.setError(ce),new Mo.NoNextEditReason.Unexpected(CQ.ErrorUtils.fromUnknown(ce))}}async*doGetNextEditsWithCursorJump(e,r,n,o,s,c,l,u,d,p){let h=new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,n),m=this.nextCursorPredictor.determineEnablement(r.supportsNextCursorLinePrediction);if(m===void 0||p instanceof bQ.Retrying)return h;if(wmr(e))return c.trace("Skipping cursor prediction: user typed during request"),new Mo.NoNextEditReason.GotCancelled("beforeNextCursorPredictionFetchUserTyped");let g=await this.nextCursorPredictor.predictNextCursorPosition(o,c,d,u);if(u.isCancellationRequested)return new Mo.NoNextEditReason.GotCancelled("afterNextCursorPredictionFetch");if(wmr(e))return c.trace("Skipping cursor prediction: user typed during prediction fetch"),new Mo.NoNextEditReason.GotCancelled("afterNextCursorPredictionFetchUserTyped");if(g.isError())return c.trace(`Predicted next cursor line error: ${g.err.message}`),d.setNextCursorLineError(g.err.message),h;let A=g.val;if(A.kind==="differentFile")return yield*this.handleCrossFilePrediction(A,m,e,n,o,s,c,l,u,d);let y=A.lineNumber,E=y-o.currentDocument.cursorLineOffset;if(d.setNextCursorLineDistance(E),d.setNextCursorIsCrossFile(!1),c.trace(`Predicted next cursor line: ${y}`),y>=o.currentDocument.lines.length)return c.trace("Predicted next cursor line error: exceedsDocumentLines"),d.setNextCursorLineError("exceedsDocumentLines"),h;if(o.editWindowLinesRange.contains(y))return c.trace("Predicted next cursor line error: withinEditWindow"),d.setNextCursorLineError("withinEditWindow"),h;let _=y+1,v=o.activeDoc.documentAfterEditsLines.at(y),b=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsNextCursorPredictionCursorPlacement,this.expService),I=r3.getNextCursorColumn(v,b);switch(m){case Ode.NextCursorLinePrediction.Jump:{let x=new Imr.Position(_,I);return new Mo.NoNextEditReason.NoSuggestions(e.documentBeforeEdits,n,x)}case Ode.NextCursorLinePrediction.OnlyWithEdit:return yield*this.doGetNextEditWithSelection(e,new Nlt.Range(_,I,_,I),s,c,l,u,d,new bQ.Retrying("cursorJump"),n);default:(0,ZK.assertNever)(m)}}async*handleCrossFilePrediction(e,r,n,o,s,c,l,u,d,p){let h=s.activeDoc.workspaceRoot;if(!h&&!(0,nui.isAbsolute)(e.filePath))return l.trace("Predicted cross-file cursor jump error: noWorkspaceRoot"),p.setNextCursorLineError("crossFile:noWorkspaceRoot"),new Mo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o);let m=(0,nui.isAbsolute)(e.filePath)?iui.URI.file(e.filePath):iui.URI.joinPath(h,e.filePath),g=LTa.DocumentId.create(m.toString()),A=e.lineNumber+1,y=new Imr.Position(A,1);switch(p.setNextCursorIsCrossFile(!0),l.trace(`Predicted cross-file cursor jump: ${e.filePath}:${e.lineNumber}`),r){case Ode.NextCursorLinePrediction.Jump:return new Mo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o,y,g);case Ode.NextCursorLinePrediction.OnlyWithEdit:{let E;try{E=await this.workspaceService.openTextDocument(m)}catch(I){return l.trace(`Failed to open target file for cross-file edit: ${CQ.ErrorUtils.fromUnknown(I).message}`),p.setNextCursorLineError("crossFile:failedToOpenFile"),new Mo.NoNextEditReason.NoSuggestions(n.documentBeforeEdits,o,y,g)}if(d.isCancellationRequested)return new Mo.NoNextEditReason.GotCancelled("afterCrossFileOpenTextDocument");if(wmr(n))return l.trace("Skipping cross-file edit: user typed during openTextDocument"),new Mo.NoNextEditReason.GotCancelled("afterCrossFileOpenTextDocumentUserTyped");let _=new zTa.StringText(E.getText()),v=new Mo.StatelessNextEditDocument(g,s.activeDoc.workspaceRoot,UTa.LanguageId.create(E.languageId),_.getLines(),Lde.LineEdit.empty,_,new FTa.Edits(WTa.StringEdit,[])),b=new Mo.StatelessNextEditRequest(n.headerRequestId,n.opportunityId,_,[v],0,n.xtabEditHistory,new Bde.DeferredPromise,n.expandedEditWindowNLines,n.isSpeculative,n.logContext,n.recordingBookmark,n.recording,n.providerRequestStartDateTime);return yield*this.doGetNextEditWithSelection(b,new Nlt.Range(A,1,A,1),c,l,u,d,p,new bQ.Retrying("cursorJump"),o)}default:(0,ZK.assertNever)(r)}}computeEditWindowLinesRange(e,r,n,o){let s=e.lines,c=e.cursorLineOffset,l;if(this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderUseVaryingLinesAbove,this.expService)){l=0;for(let g=0;g<8;++g){let A=c-g;if(A<0)break;if(s[A].trim()!==""){l=g;break}}}else l=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderNLinesAbove,this.expService)??vQ.N_LINES_ABOVE;let u;if(r.expandedEditWindowNLines!==void 0)n.trace(`Using expanded nLinesBelow: ${r.expandedEditWindowNLines}`),u=r.expandedEditWindowNLines;else{let m=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderNLinesBelow,this.expService);m!==void 0?(n.trace(`Using overridden nLinesBelow: ${m}`),u=m):(n.trace(`Using default nLinesBelow: ${vQ.N_LINES_BELOW}`),u=vQ.N_LINES_BELOW)}let d=Math.max(0,c-l),p=Math.min(s.length,c+u+1),h=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabMaxMergeConflictLines,this.expService);if(h){let m=new Olt.OffsetRange(d,p),g=pui(s,m,h);if(g){let A=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabOnlyMergeConflictLines,this.expService);o.setMergeConflictExpanded(A?"only":"normal"),A?(n.trace(`Expanding edit window to include ONLY merge conflict markers: ${g.toString()}`),d=g.start,p=g.endExclusive):(n.trace(`Expanding edit window to include merge conflict markers: ${g.toString()}; edit window range [${d}, ${p})`),p=Math.max(p,g.endExclusive))}}return new Olt.OffsetRange(d,p)}determineModelConfiguration(e){if(this.forceUseDefaultModel){let s={modelName:void 0,...Rs.DEFAULT_OPTIONS},c=this.modelService.defaultModelConfiguration();return{promptOptions:kmr(s,c),modelServiceConfig:c}}let r={modelName:void 0,promptingStrategy:void 0,currentFile:{maxTokens:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabCurrentFileMaxTokens,this.expService),includeTags:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabIncludeTagsInCurrentFile,this.expService),includeLineNumbers:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabIncludeLineNumbersInCurrentFile,this.expService),includeCursorTag:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabIncludeCursorTagInCurrentFile,this.expService),prioritizeAboveCursor:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabPrioritizeAboveCursor,this.expService)},pagedClipping:{pageSize:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabPageSize,this.expService)},recentlyViewedDocuments:{nDocuments:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabNRecentlyViewedDocuments,this.expService),maxTokens:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedDocumentsMaxTokens,this.expService),includeViewedFiles:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabIncludeViewedFiles,this.expService),includeLineNumbers:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedIncludeLineNumbers,this.expService),clippingStrategy:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabRecentlyViewedClippingStrategy,this.expService)},languageContext:uui(e.languageId,{enabled:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextEnabled,this.expService),enabledLanguages:this.configService.getConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextEnabledLanguages),enableAllContextProviders:this.configService.getExperimentBasedConfig(vi.ConfigKey.Advanced.DiagnosticsContextProvider,this.expService)||this.configService.getExperimentBasedConfig(vi.ConfigKey.Advanced.ChatSessionContextProvider,this.expService),maxTokens:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextMaxTokens,this.expService),traitPosition:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabLanguageContextTraitsPosition,this.expService)}),diffHistory:{nEntries:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabDiffNEntries,this.expService),maxTokens:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabDiffMaxTokens,this.expService),onlyForDocsInPrompt:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabDiffOnlyForDocsInPrompt,this.expService),useRelativePaths:this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabDiffUseRelativePaths,this.expService)},lintOptions:void 0,includePostScript:!0},n=this.modelService.selectedModelConfiguration(),o=n.promptingStrategy===Rs.PromptingStrategy.CopilotNesXtab?{...n,includeTagsInCurrentFile:!0}:n;return{promptOptions:kmr(r,o),modelServiceConfig:o}}getEndpoint(e){let r=this.configService.getConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderUrl),n=this.configService.getConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderApiKey);return r!==void 0&&n!==void 0?this.instaService.createInstance(sSa.XtabEndpoint,r,n,e):(0,OTa.createProxyXtabEndpoint)(this.instaService,e)}getPredictedOutput(e,r,n){return this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsXtabProviderUsePrediction,this.expService)?{type:"content",content:dui(e,r,n)}:void 0}async debounce(e,r,n,o,s){if(this.simulationCtx.isInSimulationTests)return;if(r instanceof bQ.Retrying){n.trace("Skipping debounce on retry");return}let c=e.getDebounceTime();n.trace(`Debouncing for ${c} ms`),o.setDebounceTime(c);try{await(0,Bde.timeout)(c,s)}catch{}}determineArtificialDelayMs(e,r,n){if(this.simulationCtx.isInSimulationTests)return;let o=e.getArtificialDelay();if(!(o<=0))return r.trace(`Enforcing artificial delay of ${o} ms`),n.setArtificialDelay(o),o}filterEdit(e,r){let n=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsAllowImportChanges,this.expService),o=[l=>ZTa.IgnoreImportChangesAspect.filterEdit(e,l,n),l=>klt.IgnoreEmptyLineAndLeadingTrailingWhitespaceChanges.filterEdit(e,l)];this.configService.getExperimentBasedConfig(vi.ConfigKey.InlineEditsAllowWhitespaceOnlyChanges,this.expService)||o.push(l=>klt.IgnoreWhitespaceOnlyChanges.filterEdit(e,l));let s=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsUndoInsertionFiltering,this.expService);if(s!==void 0){let l;switch(s){case"v1":l=klt.editWouldDeleteWhatWasJustInserted;break;case"v2":l=klt.editWouldDeleteWhatWasJustInserted2;break;default:(0,ZK.assertNever)(s)}o.push(u=>l(e,new Lde.LineEdit(u))?[]:u)}let c=this.configService.getExperimentBasedConfig(vi.ConfigKey.TeamInternal.InlineEditsFilterOutEditsWithSubstrings,this.expService);if(c){let l=c.split(",").map(u=>u.trim()).filter(u=>u.length>0);o.push(u=>aui(u,l))}return o.reduce((l,u)=>u(l),r)}static getNextCursorColumn(e,r){let n;switch(r){case Ode.NextCursorLinePredictionCursorPlacement.BeforeLine:n=(e?.match(/^(\s*)/)?.at(1)?.length??0)+1;break;case Ode.NextCursorLinePredictionCursorPlacement.AfterLine:n=(e?.length??0)+1;break;default:(0,ZK.assertNever)(r)}return n}};_l.XtabProvider=Rmr;_l.XtabProvider=Rmr=r3=kTa([ZR(0,QTa.IInlineEditsModelService),ZR(1,GTa.ISimulationTestContext),ZR(2,YTa.IInstantiationService),ZR(3,jTa.IWorkspaceService),ZR(4,MTa.IDiffService),ZR(5,vi.IConfigurationService),ZR(6,HTa.IExperimentationService),ZR(7,oui.ILanguageContextProviderService),ZR(8,qTa.ILanguageDiagnosticsService),ZR(9,BTa.IIgnoreService),ZR(10,rSa.ISimilarFilesContextService)],Rmr);function aui(t,e){return t.filter(r=>r.newLines.every(n=>e.every(o=>!n.includes(o))))}a(aui,"filterOutEditsWithSubstrings");function cui(t){let e=t.cursorLineOffset,r=Math.max(0,e-vQ.N_LINES_AS_CONTEXT),n=Math.min(t.lines.length,e+vQ.N_LINES_AS_CONTEXT+1);return new Olt.OffsetRange(r,n)}a(cui,"computeAreaAroundEditWindowLinesRange");function Pmr(t){switch(t.type){case ud.ChatFetchResponseType.Canceled:return new Mo.NoNextEditReason.GotCancelled("afterFetchCall");case ud.ChatFetchResponseType.OffTopic:case ud.ChatFetchResponseType.Filtered:case ud.ChatFetchResponseType.PromptFiltered:case ud.ChatFetchResponseType.Length:case ud.ChatFetchResponseType.RateLimited:case ud.ChatFetchResponseType.QuotaExceeded:case ud.ChatFetchResponseType.ExtensionBlocked:case ud.ChatFetchResponseType.AgentUnauthorized:case ud.ChatFetchResponseType.AgentFailedDependency:case ud.ChatFetchResponseType.InvalidStatefulMarker:return new Mo.NoNextEditReason.Uncategorized(CQ.ErrorUtils.fromUnknown(t));case ud.ChatFetchResponseType.BadRequest:case ud.ChatFetchResponseType.NotFound:case ud.ChatFetchResponseType.Failed:case ud.ChatFetchResponseType.NetworkError:case ud.ChatFetchResponseType.Unknown:return new Mo.NoNextEditReason.FetchFailure(CQ.ErrorUtils.fromUnknown(t))}}a(Pmr,"mapChatFetcherErrorToNoNextEditReason");function kmr(t,e){return{...t,modelName:e.modelName,promptingStrategy:e.promptingStrategy,includePostScript:e.includePostScript??t.includePostScript,currentFile:{...t.currentFile,...e.currentFile,includeTags:e.includeTagsInCurrentFile},recentlyViewedDocuments:{...t.recentlyViewedDocuments,...e.recentlyViewedDocuments},lintOptions:e.lintOptions?lSa(t.lintOptions,e.lintOptions):t.lintOptions}}a(kmr,"overrideModelConfig");var cSa={...Rs.DEFAULT_CURSOR_PREDICTION_LINT_OPTIONS,maxLineDistance:10};function lSa(t,e){return{...t??cSa,...e}}a(lSa,"mergeLintOptions");function lui(t){switch(t){case Rs.PromptingStrategy.UnifiedModel:return wRe.unifiedModelSystemPrompt;case Rs.PromptingStrategy.Codexv21NesUnified:case Rs.PromptingStrategy.SimplifiedSystemPrompt:return wRe.simplifiedPrompt;case Rs.PromptingStrategy.PatchBased:case Rs.PromptingStrategy.PatchBased01:case Rs.PromptingStrategy.PatchBased02:case Rs.PromptingStrategy.Xtab275:case Rs.PromptingStrategy.XtabAggressiveness:case Rs.PromptingStrategy.Xtab275Aggressiveness:case Rs.PromptingStrategy.Xtab275EditIntent:case Rs.PromptingStrategy.Xtab275EditIntentShort:return wRe.xtab275SystemPrompt;case Rs.PromptingStrategy.Nes41Miniv3:return wRe.nes41Miniv3SystemPrompt;case Rs.PromptingStrategy.CopilotNesXtab:case void 0:return wRe.systemPromptTemplate;default:(0,ZK.assertNever)(t)}}a(lui,"pickSystemPrompt");function uui(t,{enabled:e,enabledLanguages:r,maxTokens:n,enableAllContextProviders:o,traitPosition:s}){return t in r?{enabled:r[t],maxTokens:n,traitPosition:s}:o?{enabled:!0,maxTokens:n,traitPosition:s}:{enabled:e,maxTokens:n,traitPosition:s}}a(uui,"determineLanguageContextOptions");function dui(t,e,r){if(r===Rs.ResponseFormat.UnifiedWithXml)return["",...e,""].join(` +`);if(r===Rs.ResponseFormat.EditWindowOnly)return e.join(` +`);if(r===Rs.ResponseFormat.EditWindowWithEditIntent)return["<|edit_intent|>high<|/edit_intent|>",...e].join(` +`);if(r===Rs.ResponseFormat.EditWindowWithEditIntentShort)return["H",...e].join(` +`);if(r===Rs.ResponseFormat.CodeBlock)return["```",...e,"```"].join(` +`);if(r===Rs.ResponseFormat.CustomDiffPatch){let n=t.workspaceRoot?.path;return`${(0,sui.toUniquePath)(t.id,n)}:`}else(0,ZK.assertNever)(r)}a(dui,"getPredictionContents");var Fde;(function(t){t.Tags="tags",t.ShortName="shortName"})(Fde||(_l.EditIntentParseMode=Fde={}));async function fui(t,e,r=Fde.Tags){return r===Fde.ShortName?uSa(t,e):dSa(t,e)}a(fui,"parseEditIntentFromStream");async function uSa(t,e){let r=Rs.EditIntent.High,n,o=t[Symbol.asyncIterator](),s=await o.next();if(s.done){n="emptyResponse",e.warn("Empty response stream, no edit_intent short name found");let d=(async function*(){})();return{editIntent:r,remainingLinesStream:d,parseError:n}}let c=s.value.trim(),l=Rs.EditIntent.fromShortName(c);if(l!==void 0){r=l,e.trace(`Parsed edit_intent short name from first line: "${c}" -> ${r}`);let d=(async function*(){let p=await o.next();for(;!p.done;)yield p.value,p=await o.next()})();return{editIntent:r,remainingLinesStream:d,parseError:n}}n=`unknownIntentValue:${c}`,e.warn(`Edit intent parse error: ${n} (using Xtab275EditIntentShort prompting strategy). Defaulting to High (always show). First line was: "${c.substring(0,100)}..."`);let u=(async function*(){yield s.value;let d=await o.next();for(;!d.done;)yield d.value,d=await o.next()})();return{editIntent:r,remainingLinesStream:u,parseError:n}}a(uSa,"parseEditIntentFromStreamShortName");async function dSa(t,e){let r="<|edit_intent|>",n="<|/edit_intent|>",o=Rs.EditIntent.High,s,c=t[Symbol.asyncIterator](),l=await c.next();if(l.done){s="emptyResponse",e.warn("Empty response stream, no edit_intent tag found");let m=(async function*(){})();return{editIntent:o,remainingLinesStream:m,parseError:s}}let u=l.value,d=u.indexOf(r),p=u.indexOf(n);if(d!==-1&&p!==-1&&p>d){let m=u.substring(d+r.length,p).trim().toLowerCase();["no_edit","low","medium","high"].includes(m)||(s=`unknownIntentValue:${m}`,e.warn(`Unknown edit_intent value: "${m}", defaulting to High`)),o=Rs.EditIntent.fromString(m),e.trace(`Parsed edit_intent from first line: "${m}" -> ${o}`);let A=u.substring(p+n.length),y=(async function*(){A.trim()!==""&&(yield A);let E=await c.next();for(;!E.done;)yield E.value,E=await c.next()})();return{editIntent:o,remainingLinesStream:y,parseError:s}}d!==-1&&p===-1?s="malformedTag:startWithoutEnd":d===-1&&p!==-1?s="malformedTag:endWithoutStart":s="noTagFound",e.warn(`Edit intent parse error: ${s} (using Xtab275EditIntent prompting strategy). Defaulting to High (always show). First line was: "${u.substring(0,100)}..."`);let h=(async function*(){yield u;let m=await c.next();for(;!m.done;)yield m.value,m=await c.next()})();return{editIntent:o,remainingLinesStream:h,parseError:s}}a(dSa,"parseEditIntentFromStreamTags");function pui(t,e,r){for(let n=e.start;n>>>>>>"))return new Olt.OffsetRange(n,o+1)}}a(pui,"findMergeConflictMarkersRange")});var mui=T(YD=>{"use strict";f();var fSa=YD&&YD.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Blt=YD&&YD.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(YD,"__esModule",{value:!0});YD.StaticGitHubAuthenticationService=void 0;YD.setCopilotToken=ASa;var pSa=ac(),hSa=D0(),Llt=cA(),mSa=lIe(),gSa=c7(),Flt=class extends Llt.BaseAuthenticationService{static{a(this,"StaticGitHubAuthenticationService")}constructor(e,r,n,o,s){super(r,n,o,s),this.tokenProvider=e;let c=this;this._anyGitHubSession=e?{get id(){return c.tokenProvider()},get accessToken(){return c.tokenProvider()},scopes:Llt.GITHUB_SCOPE_USER_EMAIL,account:{id:"user",label:"User"}}:void 0,this._permissiveGitHubSession=e?{get id(){return c.tokenProvider()},get accessToken(){return c.tokenProvider()},scopes:Llt.GITHUB_SCOPE_ALIGNED,account:{id:"user",label:"User"}}:void 0}async getGitHubSession(e,r){if(e==="permissive"){if(this.isMinimalMode){if(r.createIfNone||r.forceNewSession)throw new Llt.MinimalModeError;return}return this._permissiveGitHubSession}else return this._anyGitHubSession}async getCopilotToken(e){return await super.getCopilotToken(e)}setCopilotToken(e){this._tokenStore.copilotToken=e,this.fireAuthenticationChange("setCopilotToken")}getAnyAdoSession(e){return Promise.resolve(void 0)}getAdoAccessTokenBase64(e){return Promise.resolve(void 0)}};YD.StaticGitHubAuthenticationService=Flt;YD.StaticGitHubAuthenticationService=Flt=fSa([Blt(1,hSa.ILogService),Blt(2,gSa.ICopilotTokenStore),Blt(3,mSa.ICopilotTokenManager),Blt(4,pSa.IConfigurationService)],Flt);function ASa(t,e){if(!(t instanceof Flt))throw new Error("This function should only be used with StaticGitHubAuthenticationService");t.setCopilotToken(e)}a(ASa,"setCopilotToken")});var Aui=T(aI=>{"use strict";f();Object.defineProperty(aI,"__esModule",{value:!0});aI.derivePullRequestState=ySa;aI.makeGitHubAPIRequest=gui;aI.makeGitHubGraphQLRequest=Ude;aI.makeSearchGraphQLRequest=ESa;aI.getPullRequestFromGlobalId=_Sa;aI.addPullRequestCommentGraphQLRequest=CSa;aI.closePullRequest=vSa;aI.makeGitHubAPIRequestWithPagination=bSa;aI.getAssignableActorsWithSuggestedActors=TSa;aI.getAssignableActorsWithAssignableUsers=SSa;function ySa(t){let e=t.state?.toUpperCase();return e==="MERGED"?"merged":e==="CLOSED"?"closed":t.isDraft?"draft":"open"}a(ySa,"derivePullRequestState");async function gui(t,e,r,n,o,s,c,l){let{body:u,version:d,type:p="json",userAgent:h,returnStatusCodeOnError:m=!1,silent404:g=!1,callSite:A="github-api-rest"}=l??{},y={Accept:"application/vnd.github+json"};c&&(y.Authorization=`Bearer ${c}`),d&&(y["X-GitHub-Api-Version"]=d),h&&(y["User-Agent"]=h);let E=await t.fetch(`${n}/${o}`,{method:s,headers:y,body:u?JSON.stringify(u):void 0,callSite:A});if(!E.ok)return g&&E.status===404||e.error(`[GitHubAPI] ${s} ${n}/${o} - Status: ${E?.status}`),m?{status:E.status}:void 0;try{let _=p==="json"?await E.json():await E.text(),v=Number(E.headers.get("x-ratelimit-remaining")),b=`[RateLimit] REST rate limit remaining: ${v}, ${o}`;return v<1e3?(e.warn(b),r.sendMSFTTelemetryEvent("githubAPI.approachingRateLimit",{rateLimit:v.toString()})):e.debug(b),_}catch{return}}a(gui,"makeGitHubAPIRequest");async function Ude(t,e,r,n,o,s,c,l="github-api-graphql"){let u={Accept:"application/vnd.github+json","Content-Type":"application/json"};s&&(u.Authorization=`Bearer ${s}`);let d=JSON.stringify({query:o,variables:c}),p=await t.fetch(`${n}/graphql`,{method:"POST",headers:u,body:d,callSite:l});if(!p.ok){e.debug(`[GitHubAPI] GraphQL request to ${n}/graphql failed with status ${p.status}`);return}try{let h=await p.json(),m=Number(p.headers.get("x-ratelimit-remaining")),g=`[RateLimit] GraphQL rate limit remaining: ${m}, query: ${o}`;return m<1e3?(e.warn(g),r.sendMSFTTelemetryEvent("githubAPI.approachingRateLimit",{rateLimit:m.toString()})):e.debug(g),h}catch{return}}a(Ude,"makeGitHubGraphQLRequest");async function ESa(t,e,r,n,o,s,c=20){let l=` query FetchCopilotAgentPullRequests($searchQuery: String!, $first: Int!, $after: String) { search(query: $searchQuery, type: ISSUE, first: $first, after: $after) { nodes { @@ -1349,7 +1349,7 @@ Your task is to predict and complete the changes the developer would have made n issueCount } } - `;e.debug(`[FolderRepositoryManager+0] Fetch pull request category ${s}`);let d=await Sfe(t,e,r,n,l,o,{searchQuery:s,first:c},"github-graphql-search-prs"),p=d?.data?.search?.nodes??[];return e.debug(`[GitHubAPI] FetchCopilotAgentPullRequests: host=${n}, searchQuery=${s}, resultCount=${p.length}, errors=${JSON.stringify(d?.errors)}`),p}a(yba,"makeSearchGraphQLRequest");async function Eba(t,e,r,n,o,s){let c=` + `;e.debug(`[FolderRepositoryManager+0] Fetch pull request category ${s}`);let d=await Ude(t,e,r,n,l,o,{searchQuery:s,first:c},"github-graphql-search-prs"),p=d?.data?.search?.nodes??[];return e.debug(`[GitHubAPI] FetchCopilotAgentPullRequests: host=${n}, searchQuery=${s}, resultCount=${p.length}, errors=${JSON.stringify(d?.errors)}`),p}a(ESa,"makeSearchGraphQLRequest");async function _Sa(t,e,r,n,o,s){let c=` query GetPullRequestGlobal($globalId: ID!) { node(id: $globalId) { ... on PullRequest { @@ -1383,7 +1383,7 @@ Your task is to predict and complete the changes the developer would have made n } } } - `;e.debug(`[GitHubAPI] Fetch pull request by global ID ${s}`);let u=await Sfe(t,e,r,n,c,o,{globalId:s},"github-graphql-get-pr-by-id"),d=u?.data?.node;return e.debug(`[GitHubAPI] GetPullRequestGlobal: host=${n}, globalId=${s}, found=${!!d}, prNumber=${d?.number}, errors=${JSON.stringify(u?.errors)}`),d}a(Eba,"getPullRequestFromGlobalId");async function Cba(t,e,r,n,o,s,c){let l=` + `;e.debug(`[GitHubAPI] Fetch pull request by global ID ${s}`);let u=await Ude(t,e,r,n,c,o,{globalId:s},"github-graphql-get-pr-by-id"),d=u?.data?.node;return e.debug(`[GitHubAPI] GetPullRequestGlobal: host=${n}, globalId=${s}, found=${!!d}, prNumber=${d?.number}, errors=${JSON.stringify(u?.errors)}`),d}a(_Sa,"getPullRequestFromGlobalId");async function CSa(t,e,r,n,o,s,c){let l=` mutation AddPullRequestComment($pullRequestId: ID!, $body: String!) { addComment(input: {subjectId: $pullRequestId, body: $body}) { commentEdge { @@ -1399,7 +1399,7 @@ Your task is to predict and complete the changes the developer would have made n } } } - `;return e.debug(`[GitHubAPI] Adding comment to pull request ${s}`),(await Sfe(t,e,r,n,l,o,{pullRequestId:s,body:c},"github-graphql-add-pr-comment"))?.data?.addComment?.commentEdge?.node||null}a(Cba,"addPullRequestCommentGraphQLRequest");async function _ba(t,e,r,n,o,s,c,l){e.debug(`[GitHubAPI] Closing pull request ${s}/${c}#${l}`);let u=await Ali(t,e,r,n,`repos/${s}/${c}/pulls/${l}`,"POST",o,{body:{state:"closed"},version:"2022-11-28",callSite:"github-rest-close-pr"}),d=u?.state==="closed";return d?e.debug(`[GitHubAPI] Successfully closed pull request ${s}/${c}#${l}`):e.error(`[GitHubAPI] Failed to close pull request ${s}/${c}#${l}. Its state is ${u?.state}`),d}a(_ba,"closePullRequest");async function vba(t,e,r,n,o,s){let c=!1,l=[],u=20,d=1;do{let p=await t.fetch(`${r}/${n}?page_size=${u}&page_number=${d}&resource_state=draft,open&repo_nwo=${o}`,{headers:{Authorization:`Bearer ${s}`,Accept:"application/json"},callSite:"github-api-sessions"});if(!p.ok)return e.error(`[GitHubAPI] Failed to fetch sessions: ${p.status} ${p.statusText}`),l;let h=await p.json();l.push(...h.sessions),c=h.sessions.length===u,d++}while(c);return l}a(vba,"makeGitHubAPIRequestWithPagination");async function bba(t,e,r,n,o,s,c){let l=` + `;return e.debug(`[GitHubAPI] Adding comment to pull request ${s}`),(await Ude(t,e,r,n,l,o,{pullRequestId:s,body:c},"github-graphql-add-pr-comment"))?.data?.addComment?.commentEdge?.node||null}a(CSa,"addPullRequestCommentGraphQLRequest");async function vSa(t,e,r,n,o,s,c,l){e.debug(`[GitHubAPI] Closing pull request ${s}/${c}#${l}`);let u=await gui(t,e,r,n,`repos/${s}/${c}/pulls/${l}`,"POST",o,{body:{state:"closed"},version:"2022-11-28",callSite:"github-rest-close-pr"}),d=u?.state==="closed";return d?e.debug(`[GitHubAPI] Successfully closed pull request ${s}/${c}#${l}`):e.error(`[GitHubAPI] Failed to close pull request ${s}/${c}#${l}. Its state is ${u?.state}`),d}a(vSa,"closePullRequest");async function bSa(t,e,r,n,o,s){let c=!1,l=[],u=20,d=1;do{let p=await t.fetch(`${r}/${n}?page_size=${u}&page_number=${d}&resource_state=draft,open&repo_nwo=${o}`,{headers:{Authorization:`Bearer ${s}`,Accept:"application/json"},callSite:"github-api-sessions"});if(!p.ok)return e.error(`[GitHubAPI] Failed to fetch sessions: ${p.status} ${p.statusText}`),l;let h=await p.json();l.push(...h.sessions),c=h.sessions.length===u,d++}while(c);return l}a(bSa,"makeGitHubAPIRequestWithPagination");async function TSa(t,e,r,n,o,s,c){let l=` query GetSuggestedActors($owner: String!, $name: String!, $first: Int!, $after: String) { repository(owner: $owner, name: $name) { suggestedActors( @@ -1420,7 +1420,7 @@ Your task is to predict and complete the changes the developer would have made n } } } - `,u=[],d=null,p=!0;for(;p;){let m=await Sfe(t,e,r,n,l,o,{owner:s,name:c,first:100,after:d},"github-graphql-suggested-actors");if(!m?.data?.repository?.suggestedActors)break;let g=m.data.repository.suggestedActors;u.push(...g.nodes),p=g.pageInfo.hasNextPage,d=g.pageInfo.endCursor}return u}a(bba,"getAssignableActorsWithSuggestedActors");async function Tba(t,e,r,n,o,s,c){let l=` + `,u=[],d=null,p=!0;for(;p;){let m=await Ude(t,e,r,n,l,o,{owner:s,name:c,first:100,after:d},"github-graphql-suggested-actors");if(!m?.data?.repository?.suggestedActors)break;let g=m.data.repository.suggestedActors;u.push(...g.nodes),p=g.pageInfo.hasNextPage,d=g.pageInfo.endCursor}return u}a(TSa,"getAssignableActorsWithSuggestedActors");async function SSa(t,e,r,n,o,s,c){let l=` query GetAssignableUsers($owner: String!, $name: String!, $first: Int!, $after: String) { repository(owner: $owner, name: $name) { assignableUsers(first: $first, after: $after) { @@ -1437,93 +1437,82 @@ Your task is to predict and complete the changes the developer would have made n } } } - `,u=[],d=null,p=!0;for(;p;){let m=await Sfe(t,e,r,n,l,o,{owner:s,name:c,first:100,after:d},"github-graphql-assignable-users");if(!m?.data?.repository?.assignableUsers)break;let g=m.data.repository.assignableUsers;u.push(...g.nodes),p=g.pageInfo.hasNextPage,d=g.pageInfo.endCursor}return u}a(Tba,"getAssignableActorsWithAssignableUsers")});var _li=T(CI=>{"use strict";f();Object.defineProperty(CI,"__esModule",{value:!0});CI.BaseOctoKitService=CI.PermissiveAuthRequiredError=CI.VSCodeTeamId=CI.IOctoKitService=CI.IGithubRepositoryService=void 0;var Cli=qr(),Eli=BU(),_3=yli();CI.IGithubRepositoryService=(0,Cli.createServiceIdentifier)("IGithubRepositoryService");CI.IOctoKitService=(0,Cli.createServiceIdentifier)("IOctoKitService");CI.VSCodeTeamId=1682102;var fmr=class extends Error{static{a(this,"PermissiveAuthRequiredError")}constructor(){super("Permissive authentication is required"),this.name="PermissiveAuthRequiredError"}};CI.PermissiveAuthRequiredError=fmr;var pmr=class t{static{a(this,"BaseOctoKitService")}static{this._outageStatusCacheTTL=300*1e3}constructor(e,r,n,o){this._capiClientService=e,this._fetcherService=r,this._logService=n,this._telemetryService=o}async getCurrentAuthedUserWithToken(e){return this._makeGHAPIRequest("user","GET",e,void 0,void 0,"github-rest-get-user")}async getGitHubOutageStatus(){let e=Date.now();if(this._cachedOutageStatus&&e-this._cachedOutageStatus.timestampl.headRefName===n)}async addPullRequestCommentWithToken(e,r,n){return(0,_3.addPullRequestCommentGraphQLRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,n,e,r)}async getPullRequestFromSessionWithToken(e,r){return(0,_3.getPullRequestFromGlobalId)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,r,e)}async getPullRequestFilesWithToken(e,r,n,o){return await(0,_3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,`repos/${e}/${r}/pulls/${n}/files`,"GET",o,{version:"2022-11-28",callSite:"github-rest-get-pr-files"})||[]}async closePullRequestWithToken(e,r,n,o){return(0,_3.closePullRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,o,e,r,n)}async getFileContentWithToken(e,r,n,o,s){let c=`repos/${e}/${r}/contents/${o}?ref=${encodeURIComponent(n)}`,l=await(0,_3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,c,"GET",s,{callSite:"github-rest-get-file-content"});if(!l||Array.isArray(l))throw new Error("Unable to fetch file content");let u=l;if(u.content&&u.encoding==="base64")return(0,Eli.decodeBase64)(u.content.replace(/\n/g,"")).toString();if(u.sha){let d=await this.getBlobContentWithToken(e,r,u.sha,s);if(d)return d}return this._logService.error(`Failed to get file content for ${e}/${r}/${o} at ref ${n}`),""}async getUserOrganizationsWithToken(e,r=100){let n=await this._makeGHAPIRequest(`user/orgs?per_page=${r}`,"GET",e,void 0,void 0,"github-rest-get-user-orgs");return!n||!Array.isArray(n)?[]:n.map(o=>o.login)}async isUserMemberOfOrgWithToken(e,r){try{let n=await this._makeGHAPIRequest(`user/memberships/orgs/${encodeURIComponent(e)}`,"GET",r,void 0,void 0,"github-rest-check-org-membership");return n&&(n.state==="active"||n.state==="pending")}catch{return!1}}async getOrganizationRepositoriesWithToken(e,r,n=100){let o=await this._makeGHAPIRequest(`orgs/${e}/repos?per_page=${n}&sort=updated`,"GET",r,void 0,{silent404:!0},"github-rest-get-org-repos");return!o||!Array.isArray(o)||o.length===0?[]:o.map(s=>s.name)}async getUserRepositoriesWithToken(e,r){if(r&&r.trim())return this.searchUserRepositoriesWithToken(e,r.trim());let n=await this._makeGHAPIRequest("user/repos?per_page=100&sort=updated&affiliation=owner,collaborator,organization_member","GET",e,void 0,void 0,"github-rest-get-user-repos");return!n||!Array.isArray(n)?[]:n.filter(s=>s.permissions?.push).map(s=>({owner:s.owner.login,name:s.name}))||[]}async searchUserRepositoriesWithToken(e,r){let n=encodeURIComponent(`${r} in:name fork:true`),o=await this._makeGHAPIRequest(`search/repositories?q=${n}&sort=updated&per_page=100`,"GET",e,void 0,void 0,"github-rest-search-repos");return!o||!o.items||!Array.isArray(o.items)?[]:o.items.filter(c=>c.permissions?.push).map(c=>({owner:c.owner.login,name:c.name}))||[]}async getRecentlyCommittedReposWithToken(e){let r=await this._makeGHAPIRequest("user","GET",e,void 0,void 0,"github-rest-get-user");if(!r||!r.login)return[];let n=await this._makeGHAPIRequest(`users/${r.login}/events?per_page=100`,"GET",e,void 0,void 0,"github-rest-get-user-events");if(!n||!Array.isArray(n))return[];let o=new Map;for(let c of n)if(c.type==="PushEvent"&&c.repo?.name){let[l,u]=c.repo.name.split("/");l&&u&&!o.has(c.repo.name)&&o.set(c.repo.name,{owner:l,name:u})}return Array.from(o.values())||[]}async getBlobContentWithToken(e,r,n,o){let s=`repos/${e}/${r}/git/blobs/${n}`,c=await(0,_3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,s,"GET",o,{version:"2022-11-28",callSite:"github-rest-get-blob"});if(!c||Array.isArray(c))return;let l=c;if(l.content&&l.encoding==="base64")return(0,Eli.decodeBase64)(l.content.replace(/\n/g,"")).toString()}};CI.BaseOctoKitService=pmr});var vli=T(Nut=>{"use strict";f();Object.defineProperty(Nut,"__esModule",{value:!0});Nut.NullBaseOctoKitService=void 0;var Sba=_li(),hmr=class extends Sba.BaseOctoKitService{static{a(this,"NullBaseOctoKitService")}async getGitHubOutageStatus(){return 0}async getCurrentAuthedUserWithToken(e){return{avatar_url:"",login:"NullUser",name:"Null User"}}async _makeGHAPIRequest(e,r,n,o,s,c){}};Nut.NullBaseOctoKitService=hmr});var Ili=T(Mc=>{"use strict";f();var Uut=Mc&&Mc.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},wl=Mc&&Mc.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(Mc,"__esModule",{value:!0});Mc.CopilotTokenManagerFromGitHubToken=Mc.CopilotTokenManagerFromDeviceId=Mc.RefreshableCopilotTokenManager=Mc.StaticExtendedTokenInfoCopilotTokenManager=Mc.FixedCopilotTokenManager=Mc.BaseCopilotTokenManager=Mc.tokenErrorString=void 0;Mc.createStaticGitHubTokenProvider=xba;Mc.getOrCreateTestingCopilotTokenManager=wba;var mmr=(vde(),ba(_de)),Iba=nc(),bli=so(),Dut=zXe(),Sli=fc(),Qut=eE(),qut=NQ(),xfe=iR(),Gut=vli(),Hut=L0(),D2e=ig(),jut=Rp(),Tli=Zde(),v3=Pnt(),Mut=fxe();Mc.tokenErrorString='Tests: either GITHUB_PAT, GITHUB_OAUTH_TOKEN, or GITHUB_OAUTH_TOKEN+VSCODE_COPILOT_CHAT_TOKEN must be set unless running from an IS_SCENARIO_AUTOMATION environment. Run "npm run get_token" to get credentials.';function xba(){let t=process.env.GITHUB_PAT,e=process.env.GITHUB_OAUTH_TOKEN;if(!(xfe.isScenarioAutomation&&!t&&!e))return()=>{if(t)return t;if(e)return e;throw new Error(Mc.tokenErrorString)}}a(xba,"createStaticGitHubTokenProvider");function wba(t){if(process.env.VSCODE_COPILOT_CHAT_TOKEN)return new Dut.SyncDescriptor(But,[process.env.VSCODE_COPILOT_CHAT_TOKEN]);if(process.env.GITHUB_OAUTH_TOKEN)return new Dut.SyncDescriptor(Fut,[process.env.GITHUB_OAUTH_TOKEN,"unknown"]);if(process.env.GITHUB_PAT)return new Dut.SyncDescriptor(Out,[process.env.GITHUB_PAT]);if(xfe.isScenarioAutomation)return new Dut.SyncDescriptor(Lut,[t]);throw new Error(Mc.tokenErrorString)}a(wba,"getOrCreateTestingCopilotTokenManager");var Ife=class extends bli.Disposable{static{a(this,"BaseCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(),this._baseOctokitservice=e,this._logService=r,this._telemetryService=n,this._domainService=o,this._capiClientService=s,this._fetcherService=c,this._envService=l,this._isDisposed=!1,this._copilotTokenRefreshEmitter=this._register(new Iba.Emitter),this.onDidCopilotTokenRefresh=this._copilotTokenRefreshEmitter.event,this._register((0,bli.toDisposable)(()=>this._isDisposed=!0))}get copilotToken(){return this._copilotToken}set copilotToken(e){e!==this._copilotToken&&(this._copilotToken=e,this._copilotTokenRefreshEmitter.fire())}resetCopilotToken(e){e!==void 0&&this._telemetryService.sendGHTelemetryEvent("auth.reset_token_"+e),this._logService.debug(`Resetting copilot token on HTTP error ${e||"unknown"}`),this.copilotToken=void 0}async authFromGitHubToken(e,r){return this.doAuthFromGitHubTokenOrDevDeviceId({githubToken:e,ghUsername:r})}async authFromDevDeviceId(e){return this.doAuthFromGitHubTokenOrDevDeviceId({devDeviceId:e})}async doAuthFromGitHubTokenOrDevDeviceId(e){this._telemetryService.sendGHTelemetryEvent("auth.new_login");let r,n,o;try{"githubToken"in e?(o=e.ghUsername,[r,n]=await Promise.all([this.fetchCopilotTokenFromGitHubToken(e.githubToken),this.fetchCopilotUserInfo(e.githubToken)])):r=await this.fetchCopilotTokenFromDevDeviceId(e.devDeviceId)}catch(p){return this._logService.warn("Failed to get copilot token due to fetch throwing: "+(p.message||String(p))),{kind:"failure",reason:"RequestFailed",message:p.message||String(p)}}if(!r.ok){this._logService.warn(`Failed to get copilot token due to status ${r.status} ${r.statusText}`);let p=Tli.TelemetryData.createAndMarkAsIssued({status:r.status.toString(),status_text:r.statusText});if(this._telemetryService.sendGHTelemetryErrorEvent("auth.invalid_token",p.properties,p.measurements),r.status===401)return this._logService.warn("Failed to get copilot token due to 401 status"),this._telemetryService.sendGHTelemetryErrorEvent("auth.unknown_401"),{kind:"failure",reason:"HTTP401"}}if(r.kind==="error-envelope")return this._logService.warn(`Failed to get copilot token due to: ${r.body.error_details.message}`),this._telemetryService.sendGHTelemetryErrorEvent("auth.request_read_failed"),{kind:"failure",reason:"NotAuthorized",...r.body.error_details};if(r.kind==="error")return r.body.message?.startsWith("API rate limit exceeded")?(this._logService.warn("Failed to get copilot token due to exceeding API rate limit"),this._telemetryService.sendGHTelemetryErrorEvent("auth.rate_limited"),{kind:"failure",reason:"RateLimited"}):(this._logService.warn(`Failed to get copilot token due to: ${r.body.message}`),{kind:"failure",reason:"NotAuthorized"});if(r.kind==="parse-failed")return this._logService.warn(`Failed to get copilot token due to: ${r.parseError}`),this._telemetryService.sendGHTelemetryErrorEvent("auth.request_read_failed"),{kind:"failure",reason:"ParseFailed",message:r.parseError};let s=r.body,c=s.expires_at;s.expires_at=(0,Mut.nowSeconds)()+s.refresh_in+60;let l=o??"unknown",u={...s,copilot_plan:n?.copilot_plan??s.sku??"",quota_snapshots:n?.quota_snapshots,quota_reset_date:n?.quota_reset_date,codex_agent_enabled:n?.codex_agent_enabled,organization_login_list:n?.organization_login_list??[],username:l,isVscodeTeamMember:(0,v3.containsVSCodeOrg)(s.organization_list??[])},d=Tli.TelemetryData.createAndMarkAsIssued({},{adjusted_expires_at:s.expires_at,expires_at:c,current_time:(0,Mut.nowSeconds)()});return this._telemetryService.sendGHTelemetryEvent("auth.new_token",d.properties,d.measurements),{kind:"success",...u}}async fetchCopilotTokenFromGitHubToken(e){let r={callSite:"copilot-token-github",headers:{Authorization:`token ${e}`,"X-GitHub-Api-Version":"2025-04-01"},retryFallbacks:!0,expectJSON:!0},n=await this._capiClientService.makeRequest(r,{type:mmr.RequestType.CopilotToken});return this.parseTokenResponse(n)}async fetchCopilotTokenFromDevDeviceId(e){let r={callSite:"copilot-token-device",headers:{"X-GitHub-Api-Version":"2025-04-01","Editor-Device-Id":`${e}`},retryFallbacks:!0,expectJSON:!0},n=await this._capiClientService.makeRequest(r,{type:mmr.RequestType.CopilotNLToken});return this.parseTokenResponse(n)}async parseTokenResponse(e){let r={ok:e.ok,status:e.status,statusText:e.statusText},n;try{n=await(0,D2e.jsonVerboseError)(e)}catch(s){return{...r,body:void 0,kind:"parse-failed",parseError:s.message||String(s)}}let o=(0,v3.validateTokenEnvelope)(n);return o.valid?(this.sendTokenValidationTelemetry(o),{...r,body:o.envelope,kind:"token"}):(0,v3.isErrorEnvelope)(n)?{...r,body:n,kind:"error-envelope"}:(0,v3.isStandardErrorEnvelope)(n)?{...r,body:n,kind:"error"}:(this.sendTokenValidationTelemetry(o),{...r,body:void 0,kind:"parse-failed",parseError:"Response is not valid: "+JSON.stringify(n)})}sendTokenValidationTelemetry(e){e.strategy!=="strict"&&this._telemetryService.sendMSFTTelemetryEvent("copilotTokenFetching.validation",{strategy:e.strategy,strictError:e.strictError,fallbackError:e.fallbackError})}async fetchCopilotUserInfo(e){let r={callSite:"copilot-token-user-info",headers:{Authorization:`token ${e}`,"X-GitHub-Api-Version":"2025-04-01"},retryFallbacks:!0,expectJSON:!0};return await(await this._capiClientService.makeRequest(r,{type:mmr.RequestType.CopilotUserInfo})).json()}};Mc.BaseCopilotTokenManager=Ife;var Out=class extends Ife{static{a(this,"FixedCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(new Gut.NullBaseOctoKitService(o,c,r,n),r,n,s,o,c,l),this._completionsToken=e,this.copilotToken=(0,v3.createTestExtendedTokenInfo)({token:e,username:"fixedTokenManager",copilot_plan:"unknown"})}set completionsToken(e){this._completionsToken=e,this.copilotToken=(0,v3.createTestExtendedTokenInfo)({token:e,username:"fixedTokenManager",copilot_plan:"unknown"})}get completionsToken(){return this._completionsToken}async getCopilotToken(){return new v3.CopilotToken(this.copilotToken)}async checkCopilotToken(){return{status:"OK"}}};Mc.FixedCopilotTokenManager=Out;Mc.FixedCopilotTokenManager=Out=Uut([wl(1,Hut.ILogService),wl(2,jut.ITelemetryService),wl(3,Qut.ICAPIClientService),wl(4,qut.IDomainService),wl(5,D2e.IFetcherService),wl(6,xfe.IEnvService)],Out);var But=class extends Ife{static{a(this,"StaticExtendedTokenInfoCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(new Gut.NullBaseOctoKitService(o,c,r,n),r,n,s,o,c,l);let u=Buffer.from(e,"base64").toString("utf8");this._initialToken=JSON.parse(u)}async getCopilotToken(){return this.copilotToken||(this.copilotToken={...this._initialToken}),new v3.CopilotToken(this._initialToken)}async checkCopilotToken(){return{status:"OK"}}};Mc.StaticExtendedTokenInfoCopilotTokenManager=But;Mc.StaticExtendedTokenInfoCopilotTokenManager=But=Uut([wl(1,Hut.ILogService),wl(2,jut.ITelemetryService),wl(3,Qut.ICAPIClientService),wl(4,qut.IDomainService),wl(5,D2e.IFetcherService),wl(6,xfe.IEnvService)],But);var N2e=class extends Ife{static{a(this,"RefreshableCopilotTokenManager")}async getCopilotToken(e){if(!this.copilotToken||this.copilotToken.expires_at<(0,Mut.nowSeconds)()+300||e){let r=await this.authenticateAndGetToken();if(r.kind==="failure")throw Error(`Failed to get copilot token: ${r.reason.toString()} ${r.message??""}`);this.copilotToken={...r}}return new v3.CopilotToken(this.copilotToken)}async checkCopilotToken(){if(!this.copilotToken||this.copilotToken.expires_at<(0,Mut.nowSeconds)()){let r=await this.authenticateAndGetToken();if(r.kind==="failure")return r;this.copilotToken={...r}}return{status:"OK"}}};Mc.RefreshableCopilotTokenManager=N2e;var Lut=class extends N2e{static{a(this,"CopilotTokenManagerFromDeviceId")}constructor(e,r,n,o,s,c,l,u){super(new Gut.NullBaseOctoKitService(s,c,r,n),r,n,o,s,c,l),this.deviceId=e,this.configurationService=u}async authenticateAndGetToken(){return this.authFromDevDeviceId(this.deviceId)}};Mc.CopilotTokenManagerFromDeviceId=Lut;Mc.CopilotTokenManagerFromDeviceId=Lut=Uut([wl(1,Hut.ILogService),wl(2,jut.ITelemetryService),wl(3,qut.IDomainService),wl(4,Qut.ICAPIClientService),wl(5,D2e.IFetcherService),wl(6,xfe.IEnvService),wl(7,Sli.IConfigurationService)],Lut);var Fut=class extends N2e{static{a(this,"CopilotTokenManagerFromGitHubToken")}constructor(e,r,n,o,s,c,l,u,d){super(new Gut.NullBaseOctoKitService(c,l,n,o),n,o,s,c,l,u),this.githubToken=e,this.githubUsername=r,this.configurationService=d}async authenticateAndGetToken(){return this.authFromGitHubToken(this.githubToken,this.githubUsername)}};Mc.CopilotTokenManagerFromGitHubToken=Fut;Mc.CopilotTokenManagerFromGitHubToken=Fut=Uut([wl(2,Hut.ILogService),wl(3,jut.ITelemetryService),wl(4,qut.IDomainService),wl(5,Qut.ICAPIClientService),wl(6,D2e.IFetcherService),wl(7,xfe.IEnvService),wl(8,Sli.IConfigurationService)],Fut)});var xli=T(b3=>{"use strict";f();var Rba=b3&&b3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Pba=b3&&b3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(b3,"__esModule",{value:!0});b3.ChatQuotaService=void 0;var kba=so(),Nba=gA(),gmr=class extends kba.Disposable{static{a(this,"ChatQuotaService")}constructor(e){super(),this._authService=e,this._register(this._authService.onDidAuthenticationChange(()=>{this.processUserInfoQuotaSnapshot(this._authService.copilotToken?.quotaInfo)}))}get quotaExhausted(){return this._quotaInfo?this._quotaInfo.used>=this._quotaInfo.quota&&!this._quotaInfo.overageEnabled&&!this._quotaInfo.unlimited:!1}get overagesEnabled(){return this._quotaInfo?this._quotaInfo.overageEnabled:!1}clearQuota(){this._quotaInfo=void 0}processQuotaHeaders(e){let r=this._authService.copilotToken?.isFreeUser?e.get("x-quota-snapshot-chat"):e.get("x-quota-snapshot-premium_models")||e.get("x-quota-snapshot-premium_interactions");if(r)try{let n=new URLSearchParams(r),o=parseInt(n.get("ent")||"0",10),s=parseFloat(n.get("ov")||"0.0"),c=n.get("ovPerm")==="true",l=parseFloat(n.get("rem")||"0.0"),u=n.get("rst"),d;u?d=new Date(u):(d=new Date,d.setMonth(d.getMonth()+1));let p=Math.max(0,o*(1-l/100));this._quotaInfo={quota:o,unlimited:o===-1,used:p,overageUsed:s,overageEnabled:c,resetDate:d}}catch(n){console.error("Failed to parse quota header",n)}}processQuotaSnapshots(e){let r=this._authService.copilotToken?.isFreeUser?e.chat:e.premium_models??e.premium_interactions;if(r)try{let n=parseInt(r.entitlement,10),o=r.reset_date?new Date(r.reset_date):(()=>{let c=new Date;return c.setMonth(c.getMonth()+1),c})(),s=Math.max(0,n*(1-r.percent_remaining/100));this._quotaInfo={quota:n,unlimited:n===-1,used:s,overageUsed:r.overage_count,overageEnabled:r.overage_permitted,resetDate:o}}catch(n){console.error("Failed to process quota snapshots",n)}}processUserInfoQuotaSnapshot(e){!e||!e.quota_snapshots||!e.quota_reset_date||(this._quotaInfo={unlimited:e.quota_snapshots.premium_interactions.unlimited,overageEnabled:e.quota_snapshots.premium_interactions.overage_permitted,overageUsed:e.quota_snapshots.premium_interactions.overage_count,quota:e.quota_snapshots.premium_interactions.entitlement,resetDate:new Date(e.quota_reset_date),used:Math.max(0,e.quota_snapshots.premium_interactions.entitlement*(1-e.quota_snapshots.premium_interactions.percent_remaining/100))})}};b3.ChatQuotaService=gmr;b3.ChatQuotaService=gmr=Rba([Pba(0,Nba.IAuthenticationService)],gmr)});var Rli=T($ut=>{"use strict";f();Object.defineProperty($ut,"__esModule",{value:!0});$ut.DefaultsOnlyConfigurationService=void 0;var wli=fc(),Amr=class extends wli.AbstractConfigurationService{static{a(this,"DefaultsOnlyConfigurationService")}getConfig(e){return this.getDefaultValue(e)}inspectConfig(e,r){return{defaultValue:this.getDefaultValue(e)}}setConfig(){return Promise.resolve()}getNonExtensionConfig(e){}getExperimentBasedConfig(e,r,n){if(e.experimentName){let c=r.getTreatmentVariable(e.experimentName);if(c!==void 0)return c}let o=r.getTreatmentVariable(`copilotchat.config.${e.id}`);if(o!==void 0)return o;let s=r.getTreatmentVariable(`config.${e.fullyQualifiedId}`);if(s!==void 0)return s;if(e.fullyQualifiedOldId){let c=r.getTreatmentVariable(`copilotchat.config.${e.oldId}`);if(c!==void 0)return c;let l=r.getTreatmentVariable(`config.${e.fullyQualifiedOldId}`);if(l!==void 0)return l}return this.getDefaultValue(e)}updateExperimentBasedConfiguration(e){e.length!==0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a((r,n)=>{if(e.some(s=>s.startsWith(`config.${r}`)))return!0;let o=wli.globalConfigRegistry.configs.get(r)?.fullyQualifiedOldId;return!!(o&&e.some(s=>s.startsWith(`config.${o}`)))},"affectsConfiguration")})}dumpConfig(){return{}}};$ut.DefaultsOnlyConfigurationService=Amr});var kli=T(Vut=>{"use strict";f();Object.defineProperty(Vut,"__esModule",{value:!0});Vut.computeDiff=Mba;Vut.computeDiffSync=Pli;var Dba=Rfr();async function Mba(t,e,r){return Pli(t,e,r)}a(Mba,"computeDiff");function Pli(t,e,r){let n=t.split(/\r\n|\r|\n/),o=e.split(/\r\n|\r|\n/),c=new Dba.DefaultLinesDiffComputer().computeDiff(n,o,r),l=c.changes.length>0?!1:t===e;function u(d){return d.map(p=>[p.original.startLineNumber,p.original.endLineNumberExclusive,p.modified.startLineNumber,p.modified.endLineNumberExclusive,p.innerChanges?.map(h=>[h.originalRange.startLineNumber,h.originalRange.startColumn,h.originalRange.endLineNumber,h.originalRange.endColumn,h.modifiedRange.startLineNumber,h.modifiedRange.startColumn,h.modifiedRange.endLineNumber,h.modifiedRange.endColumn])])}return a(u,"getLineChanges"),{identical:l,quitEarly:c.hitTimeout,changes:u(c.changes),moves:c.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,u(d.changes)])}}a(Pli,"computeDiffSync")});var Oli=T(d2=>{"use strict";f();var Oba=d2&&d2.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bba=d2&&d2.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mli=d2&&d2.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{let r=Gba([Nli.join(__dirname,"diffWorker.js"),Nli.join(__dirname,"../../../../dist/diffWorker.js")]);if(r===void 0)throw new Error("DiffServiceImpl: worker file not found");return new Lba.WorkerWithRpcProxy(r,{name:"Diff worker"})})}dispose(){this._worker.rawValue?.terminate()}async computeDiff(e,r,n){let o=this._useWorker?await this._worker.value.proxy.computeDiff(e,r,n):await qba.computeDiff(e,r,n);return{identical:o.identical,quitEarly:o.quitEarly,changes:Cmr(o.changes),moves:o.moves.map(c=>new Qba.MovedText(new ymr.LineRangeMapping(new Wut.LineRange(c[0],c[1]),new Wut.LineRange(c[2],c[3])),Cmr(c[4])))}}};d2.DiffServiceImpl=Emr;function Cmr(t){return t.map(e=>new ymr.DetailedLineRangeMapping(new Wut.LineRange(e[0],e[1]),new Wut.LineRange(e[2],e[3]),e[4]?.map(r=>new ymr.RangeMapping(new Dli.Range(r[0],r[1],r[2],r[3]),new Dli.Range(r[4],r[5],r[6],r[7])))))}a(Cmr,"toLineRangeMappings");function Gba(t){for(let e of t)if((0,Uba.existsSync)(e))return e}a(Gba,"firstExistingPath")});var Lli=T(T3=>{"use strict";f();var Hba=T3&&T3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Bli=T3&&T3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(T3,"__esModule",{value:!0});T3.CAPIClientImpl=void 0;var jba=iR(),$ba=ig(),Vba=eE(),_mr=class extends Vba.BaseCAPIClientService{static{a(this,"CAPIClientImpl")}constructor(e,r){super(process.env.HMAC_SECRET,process.env.VSCODE_COPILOT_INTEGRATION_ID,e,r)}};T3.CAPIClientImpl=_mr;T3.CAPIClientImpl=_mr=Hba([Bli(0,$ba.IFetcherService),Bli(1,jba.IEnvService)],_mr)});var Uli=T(S3=>{"use strict";f();var Wba=S3&&S3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},vmr=S3&&S3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(S3,"__esModule",{value:!0});S3.DomainService=void 0;var zba=nc(),Yba=so(),Kba=O7(),wfe=fc(),Jba=eE(),Fli="github-enterprise.uri",bmr=class extends Yba.Disposable{static{a(this,"DomainService")}constructor(e,r,n){super(),this._configurationService=e,this._tokenStore=r,this._capiClientService=n,this._onDidChangeDomains=this._register(new zba.Emitter),this.onDidChangeDomains=this._onDidChangeDomains.event,this._register(this._configurationService.onDidChangeConfiguration(o=>this._onDidConfigChangeHandler(o))),this._processCopilotToken(this._tokenStore.copilotToken),this._register(this._tokenStore.onDidStoreUpdate(()=>this._processCopilotToken(this._tokenStore.copilotToken)))}_onDidConfigChangeHandler(e){(e.affectsConfiguration(`${wfe.CopilotConfigPrefix}.advanced`)||e.affectsConfiguration(Fli))&&this._processCAPIModuleChange(this._tokenStore.copilotToken)}_processCAPIModuleChange(e){let r=this._configurationService.getConfig(wfe.ConfigKey.Shared.DebugOverrideCAPIUrl);r&&r.endsWith("/")&&(r=r.slice(0,-1));let n=this._configurationService.getConfig(wfe.ConfigKey.Shared.DebugOverrideProxyUrl);n&&(n=n.replace(/\/$/,""));let o=this._configurationService.getConfig(wfe.ConfigKey.Shared.AuthProvider)===wfe.AuthProviderId.GitHubEnterprise?this._configurationService.getNonExtensionConfig(Fli):void 0,s={endpoints:{api:r||e?.endpoints?.api,proxy:n||e?.endpoints?.proxy,telemetry:e?.endpoints?.telemetry,"origin-tracker":e?.endpoints?.["origin-tracker"]},sku:e?.sku||"unknown"},c=this._capiClientService.updateDomains(s,o);(c.capiUrlChanged||c.proxyUrlChanged||c.telemetryUrlChanged||c.dotcomUrlChanged)&&this._onDidChangeDomains.fire({capiUrlChanged:c.capiUrlChanged,telemetryUrlChanged:c.telemetryUrlChanged,proxyUrlChanged:c.proxyUrlChanged,dotcomUrlChanged:c.dotcomUrlChanged})}_processCopilotToken(e){this._processCAPIModuleChange(e)}};S3.DomainService=bmr;S3.DomainService=bmr=Wba([vmr(0,wfe.IConfigurationService),vmr(1,Kba.ICopilotTokenStore),vmr(2,Jba.ICAPIClientService)],bmr)});var Qli=T(Rfe=>{"use strict";f();Object.defineProperty(Rfe,"__esModule",{value:!0});Rfe.NullNativeEnvService=Rfe.NullEnvService=void 0;var Xba=nc(),Zba=Ru(),zut=iR(),eTa=txe(),Yut=class t extends zut.AbstractEnvService{static{a(this,"NullEnvService")}constructor(){super(...arguments),this.language="en"}static{this.Instance=new t}get extensionId(){return"test-extension-id"}get vscodeVersion(){return"test-version"}get isActive(){return!0}get onDidChangeWindowState(){return Xba.Event.None}get sessionId(){return"test-session"}get machineId(){return"test-machine"}get devDeviceId(){return"test-dev-device"}get remoteName(){}get uiKind(){return"desktop"}get uriScheme(){return"code-null"}get appRoot(){return""}get shell(){return"zsh"}get OS(){return zut.OperatingSystem.Linux}getEditorInfo(){return new zut.NameAndVersion("simulation-tests-editor",eTa.packageJson.engines.vscode.match(/\d+\.\d+/)?.[0]??"1.89")}getEditorPluginInfo(){return new zut.NameAndVersion("simulation-tests-plugin","2")}openExternal(e){return Promise.resolve(!1)}};Rfe.NullEnvService=Yut;var Tmr=class extends Yut{static{a(this,"NullNativeEnvService")}get userHome(){return Zba.URI.file("/home/testuser")}};Rfe.NullNativeEnvService=Tmr});var Smr=T(Kut=>{"use strict";f();Object.defineProperty(Kut,"__esModule",{value:!0});Kut.IGitExtensionService=void 0;var tTa=qr();Kut.IGitExtensionService=(0,tTa.createServiceIdentifier)("IGitExtensionService")});var qli=T(Jut=>{"use strict";f();Object.defineProperty(Jut,"__esModule",{value:!0});Jut.NullGitExtensionService=void 0;var rTa=nc(),Imr=class{static{a(this,"NullGitExtensionService")}constructor(){this.onDidChange=rTa.Event.None,this.extensionAvailable=!1}getExtensionApi(){}};Jut.NullGitExtensionService=Imr});var Gli=T(I3=>{"use strict";f();var nTa=I3&&I3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},iTa=I3&&I3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(I3,"__esModule",{value:!0});I3.ObservableGit=void 0;var oTa=so(),JQ=Gw(),sTa=Smr(),xmr=class extends oTa.Disposable{static{a(this,"ObservableGit")}constructor(e){super(),this._gitExtensionService=e,this._gitApi=(0,JQ.observableFromEvent)(this,r=>this._gitExtensionService.onDidChange(r),()=>this._gitExtensionService.getExtensionApi()),this.branch=(0,JQ.observableValue)("branchName",void 0),this.init()}async init(){let e=await(0,JQ.waitForState)(this._gitApi);if(this._store.isDisposed)return;let r=(0,JQ.observableFromEvent)(this,n=>e.onDidOpenRepository(n),()=>e.repositories);await(0,JQ.waitForState)(r,n=>n.length>0,void 0),!this._store.isDisposed&&(0,JQ.mapObservableArrayCached)(this,r,(n,o)=>{let s=(0,JQ.observableFromEvent)(c=>n.state.onDidChange(c),()=>n.state.HEAD?.name);o.add((0,JQ.autorunWithStore)((c,l)=>{this.branch.set(s.read(c),void 0)}))},n=>n.rootUri.toString()).recomputeInitiallyAndOnChange(this._store)}};I3.ObservableGit=xmr;I3.ObservableGit=xmr=nTa([iTa(0,sTa.IGitExtensionService)],xmr)});var Zut=T(Oc=>{"use strict";f();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.lengthZero=void 0;Oc.lengthDiff=lTa;Oc.lengthIsZero=uTa;Oc.toLength=WJ;Oc.lengthToObj=dTa;Oc.lengthGetLineCount=fTa;Oc.lengthGetColumnCountIfZeroLineCount=pTa;Oc.lengthAdd=jli;Oc.sumLengths=hTa;Oc.lengthEquals=mTa;Oc.lengthDiffNonNegative=gTa;Oc.lengthLessThan=ATa;Oc.lengthLessThanEqual=yTa;Oc.lengthGreaterThanEqual=ETa;Oc.lengthToPosition=CTa;Oc.positionToLength=_Ta;Oc.lengthsToRange=vTa;Oc.lengthOfRange=bTa;Oc.lengthCompare=TTa;Oc.lengthOfString=STa;Oc.lengthOfStringObj=ITa;Oc.lengthHash=xTa;Oc.lengthMax=wTa;var Hli=C0(),aTa=ZE(),cTa=Ef(),Xut=Vae();function lTa(t,e,r,n){return t!==r?WJ(r-t,n):WJ(0,n-e)}a(lTa,"lengthDiff");Oc.lengthZero=0;function uTa(t){return t===0}a(uTa,"lengthIsZero");var PA=2**26;function WJ(t,e){return t*PA+e}a(WJ,"toLength");function dTa(t){let e=t,r=Math.floor(e/PA),n=e-r*PA;return new Xut.TextLength(r,n)}a(dTa,"lengthToObj");function fTa(t){return Math.floor(t/PA)}a(fTa,"lengthGetLineCount");function pTa(t){return t}a(pTa,"lengthGetColumnCountIfZeroLineCount");function jli(t,e){let r=t+e;return e>=PA&&(r=r-t%PA),r}a(jli,"lengthAdd");function hTa(t,e){return t.reduce((r,n)=>jli(r,e(n)),Oc.lengthZero)}a(hTa,"sumLengths");function mTa(t,e){return t===e}a(mTa,"lengthEquals");function gTa(t,e){let r=t,n=e;if(n-r<=0)return Oc.lengthZero;let s=Math.floor(r/PA),c=Math.floor(n/PA),l=n-c*PA;if(s===c){let u=r-s*PA;return WJ(0,l-u)}else return WJ(c-s,l)}a(gTa,"lengthDiffNonNegative");function ATa(t,e){return t=e}a(ETa,"lengthGreaterThanEqual");function CTa(t){let e=t,r=Math.floor(e/PA),n=e-r*PA;return new aTa.Position(r+1,n+1)}a(CTa,"lengthToPosition");function _Ta(t){return WJ(t.lineNumber-1,t.column-1)}a(_Ta,"positionToLength");function vTa(t,e){let r=t,n=Math.floor(r/PA),o=r-n*PA,s=e,c=Math.floor(s/PA),l=s-c*PA;return new cTa.Range(n+1,o+1,c+1,l+1)}a(vTa,"lengthsToRange");function bTa(t){return t.startLineNumber===t.endLineNumber?new Xut.TextLength(0,t.endColumn-t.startColumn):new Xut.TextLength(t.endLineNumber-t.startLineNumber,t.endColumn-1)}a(bTa,"lengthOfRange");function TTa(t,e){return t-e}a(TTa,"lengthCompare");function STa(t){let e=(0,Hli.splitLines)(t);return WJ(e.length-1,e[e.length-1].length)}a(STa,"lengthOfString");function ITa(t){let e=(0,Hli.splitLines)(t);return new Xut.TextLength(e.length-1,e[e.length-1].length)}a(ITa,"lengthOfStringObj");function xTa(t){return t}a(xTa,"lengthHash");function wTa(t,e){return t>e?t:e}a(wTa,"lengthMax")});var Pmr=T(edt=>{"use strict";f();Object.defineProperty(edt,"__esModule",{value:!0});edt.TextEditInfo=void 0;var wmr=Zut(),Rmr=class{static{a(this,"TextEditInfo")}constructor(e,r,n){this.startOffset=e,this.endOffset=r,this.newLength=n}toString(){return`[${(0,wmr.lengthToObj)(this.startOffset)}...${(0,wmr.lengthToObj)(this.endOffset)}) -> ${(0,wmr.lengthToObj)(this.newLength)}`}};edt.TextEditInfo=Rmr});var Vli=T(kmr=>{"use strict";f();Object.defineProperty(kmr,"__esModule",{value:!0});kmr.combineTextEditInfos=kTa;var RTa=jc(),Qp=Zut(),PTa=Pmr();function kTa(t,e){if(t.length===0)return e;if(e.length===0)return t;let r=new RTa.ArrayQueue($li(t)),n=$li(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=r.dequeue();function s(d){if(d===void 0){let h=r.takeWhile(m=>!0)||[];return o&&h.unshift(o),h}let p=[];for(;o&&!(0,Qp.lengthIsZero)(d);){let[h,m]=o.splitAt(d);p.push(h),d=(0,Qp.lengthDiffNonNegative)(h.lengthAfter,d),o=m??r.dequeue()}return(0,Qp.lengthIsZero)(d)||p.push(new M2e(!1,d,d)),p}a(s,"nextS0ToS1MapWithS1LengthOf");let c=[];function l(d,p,h){if(c.length>0&&(0,Qp.lengthEquals)(c[c.length-1].endOffset,d)){let m=c[c.length-1];c[c.length-1]=new PTa.TextEditInfo(m.startOffset,p,(0,Qp.lengthAdd)(m.newLength,h))}else c.push({startOffset:d,endOffset:p,newLength:h})}a(l,"pushEdit");let u=Qp.lengthZero;for(let d of n){let p=s(d.lengthBefore);if(d.modified){let h=(0,Qp.sumLengths)(p,g=>g.lengthBefore),m=(0,Qp.lengthAdd)(u,h);l(u,m,d.lengthAfter),u=m}else for(let h of p){let m=u;u=(0,Qp.lengthAdd)(u,h.lengthBefore),h.modified&&l(m,u,h.lengthAfter)}}return c}a(kTa,"combineTextEditInfos");var M2e=class t{static{a(this,"LengthMapping")}constructor(e,r,n){this.modified=e,this.lengthBefore=r,this.lengthAfter=n}splitAt(e){let r=(0,Qp.lengthDiffNonNegative)(e,this.lengthAfter);return(0,Qp.lengthEquals)(r,Qp.lengthZero)?[this,void 0]:this.modified?[new t(this.modified,this.lengthBefore,e),new t(this.modified,Qp.lengthZero,r)]:[new t(this.modified,e,e),new t(this.modified,r,r)]}toString(){return`${this.modified?"M":"U"}:${(0,Qp.lengthToObj)(this.lengthBefore)} -> ${(0,Qp.lengthToObj)(this.lengthAfter)}`}};function $li(t){let e=[],r=Qp.lengthZero;for(let n of t){let o=(0,Qp.lengthDiffNonNegative)(r,n.startOffset);(0,Qp.lengthIsZero)(o)||e.push(new M2e(!1,o,o));let s=(0,Qp.lengthDiffNonNegative)(n.startOffset,n.endOffset);e.push(new M2e(!0,s,n.newLength)),r=n.endOffset}return e}a($li,"toLengthMapping")});var zli=T(Pfe=>{"use strict";f();Object.defineProperty(Pfe,"__esModule",{value:!0});Pfe.SingleTextEditLength=Pfe.TextLengthEdit=void 0;var NTa=Ef(),Wli=Vae(),DTa=Vli(),O2e=Zut(),MTa=Pmr(),Nmr=class t{static{a(this,"TextLengthEdit")}static{this.empty=new t([])}static fromTextEdit(e){let r=e.replacements.map(n=>new B2e(n.range,Wli.TextLength.ofText(n.text)));return new t(r)}static _fromTextEditInfo(e){let r=e.map(n=>{let o=(0,O2e.lengthToObj)(n.newLength);return new B2e((0,O2e.lengthsToRange)(n.startOffset,n.endOffset),new Wli.TextLength(o.lineCount,o.columnCount))});return new t(r)}constructor(e){this.edits=e}_toTextEditInfo(){return this.edits.map(e=>new MTa.TextEditInfo((0,O2e.toLength)(e.range.startLineNumber-1,e.range.startColumn-1),(0,O2e.toLength)(e.range.endLineNumber-1,e.range.endColumn-1),(0,O2e.toLength)(e.newLength.lineCount,e.newLength.columnCount)))}compose(e){let r=this._toTextEditInfo(),n=e._toTextEditInfo(),o=(0,DTa.combineTextEditInfos)(r,n);return t._fromTextEditInfo(o)}getRange(){if(this.edits.length!==0)return NTa.Range.fromPositions(this.edits[0].range.getStartPosition(),this.edits.at(-1).range.getEndPosition())}toString(){return`[${this.edits.join(", ")}]`}};Pfe.TextLengthEdit=Nmr;var B2e=class{static{a(this,"SingleTextEditLength")}constructor(e,r){this.range=e,this.newLength=r}toString(){return`{ range: ${this.range}, newLength: ${this.newLength} }`}};Pfe.SingleTextEditLength=B2e});var Yli=T(kfe=>{"use strict";f();Object.defineProperty(kfe,"__esModule",{value:!0});kfe.DocumentHistory=kfe.HistoryContext=void 0;var OTa=Jl(),BTa=t2(),Dmr=class{static{a(this,"HistoryContext")}constructor(e){this.documents=e,(0,OTa.assert)(e.length>0)}getMostRecentDocument(){return this.documents.at(-1)}getDocument(e){return this.documents.find(r=>r.docId===e)}getDocumentAndIdx(e){let r=this.documents.findIndex(n=>n.docId===e);if(r!==-1)return{doc:this.documents[r],idx:r}}};kfe.HistoryContext=Dmr;var Mmr=class{static{a(this,"DocumentHistory")}constructor(e,r,n,o,s){this.docId=e,this.languageId=r,this.base=n,this.lastEdits=o,this.lastSelection=s,this.lastEdit=new BTa.RootedEdit(this.base,this.lastEdits.compose())}};kfe.DocumentHistory=Mmr});var tui=T(Nfe=>{"use strict";f();Object.defineProperty(Nfe,"__esModule",{value:!0});Nfe.NesHistoryContextProvider=void 0;Nfe.sum=F2e;Nfe.editExtends=eui;var Kli=so(),Jli=Gw(),LTa=sv(),L2e=aA(),FTa=axe(),UTa=Qv(),tdt=t2(),QTa=Wat(),Xli=zli(),qTa=KN(),U2e=oSe(),Zli=Yli(),Omr=class extends Kli.Disposable{static{a(this,"NesHistoryContextProvider")}constructor(e,r){super(),this._documentState=new Map,this._lastDocuments=new Lmr(50),this._register((0,Jli.autorun)(n=>{n.readObservable(r.branch)!==void 0&&(this._lastGitCheckout=(0,U2e.now)(),this._documentState.forEach(s=>s.applyAllEdits()))})),(0,Jli.mapObservableArrayCached)(this,e.openDocuments,(n,o)=>{let s=n.selection.get().at(0),c=new Bmr(n.id,n.value.get().value,n.languageId.get(),s);this._documentState.set(c.docId,c),s&&this._lastDocuments.push(c),o.add((0,qTa.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},l=>{l.languageId.changes.length>0&&(c.languageId=l.languageId.value);let u=this._isAwaitingGitCheckoutCooldown();for(let d of l.value.changes)this._lastDocuments.push(c),c.handleEdit(d,u);l.selection.changes.length>0&&(c.handleSelection(l.selection.value.at(0)),this._lastDocuments.push(c))})),o.add((0,Kli.toDisposable)(()=>{let l=this._documentState.get(n.id);l&&this._lastDocuments.remove(l),this._documentState.delete(n.id)}))},n=>n.id).recomputeInitiallyAndOnChange(this._store)}getHistoryContext(e){let r=this._documentState.get(e);if(!r||!this._lastDocuments.has(r))return;let n=[],o=!1,s=5;for(let c of this._lastDocuments.getItemsReversed()){let l=c.getRecentEdit(s);if(l!==void 0&&(l.editCount===0&&o||(c.docId===e&&(o=!0),n.push(l.history),s-=l.editCount,s<=0)))break}if(n.reverse(),!!n.some(c=>c.docId===e))return new Zli.HistoryContext(n)}_isAwaitingGitCheckoutCooldown(){if(!this._lastGitCheckout)return!1;let e=(0,U2e.now)()-this._lastGitCheckout<2*1e3;return e||(this._lastGitCheckout=void 0),e}};Nfe.NesHistoryContextProvider=Omr;var Bmr=class t{static{a(this,"DocumentState")}static{this.MAX_EDITED_LINES_PER_EDIT=10}static{this.MAX_EDITED_CHARS_PER_EDIT=5e3}constructor(e,r,n,o){this.docId=e,this.languageId=n,this._edits=[],this._isUserDocument=!1,this._baseValue=new UTa.StringText(r),this._currentValue=this._baseValue,this.handleSelection(o)}getSelection(){return this._selection}handleSelection(e){e&&(this._isUserDocument=!0),this._selection=e}handleEdit(e,r){if(e.isEmpty())return;this._currentValue=e.applyOnText(this._currentValue);let n=FTa.TextEdit.fromStringEdit(e,this._currentValue),o=Xli.TextLengthEdit.fromTextEdit(n);if(r){this._baseValue=this._currentValue,this._edits=[];return}function s(l){return F2e(l.replacements,u=>u.newText.length)}a(s,"editInsertSize");let c=this._edits.at(-1);c&&s(c.edit)<200&&eui(e,c.edit)?(c.edit=c.edit.compose(e),c.textLengthEdit=c.textLengthEdit.compose(o),c.instant=(0,U2e.now)(),c.edit.isEmpty()&&this._edits.pop()):this._edits.push({edit:e,textLengthEdit:o,instant:(0,U2e.now)()})}getRecentEdit(e){if(!this._isUserDocument)return;let{editCount:r}=this._applyStaleEdits(e),n=new tdt.Edits(L2e.StringEdit,this._edits.map(o=>o.edit));return{history:new Zli.DocumentHistory(this.docId,this.languageId,this._baseValue,n,this._selection),editCount:r}}applyAllEdits(){this._baseValue=this._currentValue,this._edits=[]}_applyStaleEdits(e){let r=this._currentValue,n=L2e.StringEdit.empty,o=Xli.TextLengthEdit.empty,s,c=0,l=L2e.StringEdit.empty;for(s=this._edits.length-1;s>=0;s--){let u=this._edits[s];if((0,U2e.now)()-u.instant>600*1e3)break;let d=u.textLengthEdit.compose(o),p=d.getRange();if((0,LTa.assertType)(p,"we only compose non-empty Edits"),p.endLineNumber-p.startLineNumber>100)break;let h=F2e(u.textLengthEdit.edits,b=>b.range.endLineNumber-b.range.startLineNumber+b.newLength.lineCount);if(h>t.MAX_EDITED_LINES_PER_EDIT||F2e(u.edit.replacements,b=>b.newText.length)>t.MAX_EDITED_CHARS_PER_EDIT||F2e(u.edit.replacements,b=>b.replaceRange.length)>t.MAX_EDITED_CHARS_PER_EDIT)break;if(s===this._edits.length-1)l=u.edit;else{let b=L2e.StringEdit.trySwap(u.edit,l);if(b)l=b.e1;else{if(h>=2)break;l=u.edit.compose(l)}}r=u.edit.inverse(r.value).applyOnText(r);let y=u.edit.compose(n),E=tdt.RootedEdit.toLineEdit(new tdt.RootedEdit(r,y)),v=new QTa.RootedLineEdit(r,E).removeCommonSuffixPrefixLines().edit.replacements.length;if(v>e)break;c=v,n=y,o=d}for(let u=0;u<=s;u++){let d=this._edits[u];this._baseValue=d.edit.applyOnText(this._baseValue)}return this._edits=this._edits.slice(s+1),{editCount:c}}toString(){return new tdt.Edits(L2e.StringEdit,this._edits.map(e=>e.edit)).toHumanReadablePatch(this._baseValue)}};function F2e(t,e){let r=0;for(let n of t)r+=e(n);return r}a(F2e,"sum");function eui(t,e){let r=e.getNewRanges();return t.replacements.every(n=>GTa(n.replaceRange,r))}a(eui,"editExtends");function GTa(t,e){return e.some(r=>t.start===r.endExclusive||t.endExclusive===r.start)}a(GTa,"doesTouch");var Lmr=class{static{a(this,"FifoSet")}constructor(e){this.maxSize=e,this._arr=[]}push(e){let r=this._arr.indexOf(e);r!==-1?this._arr.splice(r,1):this._arr.length>=this.maxSize&&this._arr.shift(),this._arr.push(e)}remove(e){let r=this._arr.indexOf(e);r!==-1&&this._arr.splice(r,1)}getItemsReversed(){let e=[...this._arr];return e.reverse(),e}has(e){return this._arr.indexOf(e)!==-1}}});var iui=T(f2=>{"use strict";f();var HTa=f2&&f2.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},rui=f2&&f2.__param||function(t,e){return function(r,n){e(r,n,t)}},Umr;Object.defineProperty(f2,"__esModule",{value:!0});f2.NesXtabHistoryTracker=f2.XtabEditMergeStrategy=void 0;var Qmr=Jl(),jTa=so(),$Ta=tie(),VTa=Gw(),WTa=M4(),ndt=fc(),zTa=gd(),rdt=t2(),x3=ner(),YTa=KN(),Fmr=oSe(),qmr;(function(t){t.sameStartLine={kind:x3.DiffHistoryMergeStrategy.SameStartLine};function e(o){return{kind:x3.DiffHistoryMergeStrategy.Proximity,lineGap:o}}a(e,"proximity"),t.proximity=e;function r(o,s){return{kind:x3.DiffHistoryMergeStrategy.Hybrid,lineGap:o,splitAfterMs:s}}a(r,"hybrid"),t.hybrid=r;function n(o,s,c){switch(o){case x3.DiffHistoryMergeStrategy.Proximity:return e(s);case x3.DiffHistoryMergeStrategy.Hybrid:return r(s,c);case x3.DiffHistoryMergeStrategy.SameStartLine:return t.sameStartLine;default:(0,Qmr.assertNever)(o)}}a(n,"fromConfig"),t.fromConfig=n})(qmr||(f2.XtabEditMergeStrategy=qmr={}));function nui(t,e,r){if(t.isEmpty()||e.isEmpty())return!1;for(let n of t.replacements)if(!e.replacements.some(s=>n.lineRange.distanceToRange(s.lineRange)<=r))return!1;return!0}a(nui,"areLineEditsWithinProximity");var Gmr=class extends jTa.Disposable{static{a(this,"NesXtabHistoryTracker")}static{Umr=this}static{this.MAX_HISTORY_SIZE=50}constructor(e,r,n,o){super(),this._configurationService=n,this._expService=o,this.idToEntry=new Map,this.history=new $Ta.LinkedList,this.maxHistorySize=r??Umr.MAX_HISTORY_SIZE,this.mergeStrategy=(0,WTa.derived)(s=>qmr.fromConfig(this._configurationService.getExperimentBasedConfigObservable(ndt.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeStrategy,this._expService).read(s),this._configurationService.getExperimentBasedConfigObservable(ndt.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeLineGap,this._expService).read(s),this._configurationService.getExperimentBasedConfigObservable(ndt.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeSplitAfterMs,this._expService).read(s))),(0,VTa.mapObservableArrayCached)(this,e.openDocuments,(s,c)=>{c.add((0,YTa.autorunWithChanges)(this,{rootedEdits:s.value,visibleRanges:s.visibleRanges},l=>{l.rootedEdits.changes.length>0&&l.rootedEdits.previous!==void 0?this.handleEdits(s,l.rootedEdits):this.handleVisibleRangesChange(s,l.visibleRanges)}))},s=>s.id).recomputeInitiallyAndOnChange(this._store)}getHistory(){return[...this.history]}handleVisibleRangesChange(e,r){if(r.value.length===0)return;let n=this.idToEntry.get(e.id);if(n!==void 0){if(n.entry.kind==="edit")return;n.removeFromHistory()}let o={docId:e.id,kind:"visibleRanges",visibleRanges:r.value,documentContent:e.value.get()},s=this.history.push(o);this.idToEntry.set(e.id,{entry:o,removeFromHistory:s,lastEditTimestamp:(0,Fmr.now)()}),this.compactHistory()}shouldMerge(e,r,n){let o=this.mergeStrategy.get();switch(o.kind){case x3.DiffHistoryMergeStrategy.SameStartLine:return!r.isEmpty()&&!e.isEmpty()&&e.replacements[0].lineRange.startLineNumber===r.replacements[0].lineRange.startLineNumber;case x3.DiffHistoryMergeStrategy.Proximity:return nui(r,e,o.lineGap);case x3.DiffHistoryMergeStrategy.Hybrid:return(0,Fmr.now)()-n<=o.splitAfterMs&&nui(r,e,o.lineGap)}}handleEdits(e,r){(0,Qmr.assert)(r.previous!==void 0,"Document has previous version"),(0,Qmr.assert)(r.changes.length===1,`Expected 1 edit change but got ${r.changes.length}`);let n=r.changes[0];if(n.replacements.length===0)return;let o=this.idToEntry.get(e.id),s=r.previous,c=new rdt.RootedEdit(s,n);if(o===void 0){this.pushToHistory(e.id,c);return}if(o.entry.kind==="visibleRanges"){o.removeFromHistory(),this.pushToHistory(e.id,c);return}let l=o.entry.edit,u=rdt.RootedEdit.toLineEdit(l),d=rdt.RootedEdit.toLineEdit(c);if(this.shouldMerge(u,d,o.lastEditTimestamp)){o.removeFromHistory();let p=l.edit.compose(n),h=new rdt.RootedEdit(l.base,p);this.pushToHistory(e.id,h)}else this.pushToHistory(e.id,c)}pushToHistory(e,r){let n={docId:e,kind:"edit",edit:r},o=this.history.push(n);this.idToEntry.set(e,{entry:n,removeFromHistory:o,lastEditTimestamp:(0,Fmr.now)()}),this.compactHistory()}compactHistory(){if(this.history.size>this.maxHistorySize){let e=this.history.shift();if(e!==void 0){let r=this.idToEntry.get(e.docId);r!==void 0&&e===r.entry&&this.idToEntry.delete(e.docId)}}}};f2.NesXtabHistoryTracker=Gmr;f2.NesXtabHistoryTracker=Gmr=Umr=HTa([rui(2,ndt.IConfigurationService),rui(3,zTa.IExperimentationService)],Gmr)});var oui=T(idt=>{"use strict";f();Object.defineProperty(idt,"__esModule",{value:!0});idt.IVSCodeExtensionContext=void 0;var KTa=qr();idt.IVSCodeExtensionContext=(0,KTa.createServiceIdentifier)("IVSCodeExtensionContext")});var jmr=T(Dfe=>{"use strict";f();Object.defineProperty(Dfe,"__esModule",{value:!0});Dfe.NullProxyModelsService=Dfe.IProxyModelsService=void 0;var JTa=qr(),XTa=nc();Dfe.IProxyModelsService=(0,JTa.createServiceIdentifier)("IProxyModelsService");var Hmr=class{static{a(this,"NullProxyModelsService")}constructor(){this.onModelListUpdated=XTa.Event.None}get models(){}get nesModels(){}get instantApplyModels(){}};Dfe.NullProxyModelsService=Hmr});var pui=T(h2=>{"use strict";f();var lui=h2&&h2.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},XQ=h2&&h2.__param||function(t,e){return function(r,n){e(r,n,t)}},q2e;Object.defineProperty(h2,"__esModule",{value:!0});h2.UndesiredModels=h2.InlineEditsModelService=void 0;var ZTa=Fhr(),uui=Thr(),sui=Ay(),eSa=jc(),aui=Jl(),dui=nc(),fui=so(),Mfe=Gw(),tSa=O7(),p2=fc(),rSa=oui(),nSa=L0(),iSa=jmr(),oSa=gd(),sSa=Rp(),Q2e=Qy(),aSa=Olt(),Vmr=class extends fui.Disposable{static{a(this,"InlineEditsModelService")}static{q2e=this}static{this.COPILOT_NES_XTAB_MODEL={modelName:"copilot-nes-xtab",promptingStrategy:Q2e.PromptingStrategy.CopilotNesXtab,includeTagsInCurrentFile:!0,source:"hardCodedDefault",lintOptions:void 0}}static{this.COPILOT_NES_OCT={modelName:"copilot-nes-oct",promptingStrategy:Q2e.PromptingStrategy.Xtab275,includeTagsInCurrentFile:!1,source:"hardCodedDefault",lintOptions:void 0}}static{this.COPILOT_NES_CALLISTO={modelName:"nes-callisto",promptingStrategy:Q2e.PromptingStrategy.Xtab275,includeTagsInCurrentFile:!1,source:"hardCodedDefault",lintOptions:void 0}}constructor(e,r,n,o,s,c,l){super(),this._tokenStore=e,this._proxyModelsService=r,this._undesiredModelsManager=n,this._configService=o,this._expService=s,this._telemetryService=c,this._logService=l,this._copilotTokenObs=(0,Mfe.observableFromEvent)(this,this._tokenStore.onDidStoreUpdate,()=>this._tokenStore.copilotToken),this._fetchedModelsObs=(0,Mfe.observableFromEvent)(this,this._proxyModelsService.onModelListUpdated,()=>this._proxyModelsService.nesModels),this._preferredModelNameObs=this._configService.getExperimentBasedConfigObservable(p2.ConfigKey.Advanced.InlineEditsPreferredModel,this._expService),this._localModelConfigObs=this._configService.getConfigObservable(p2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfiguration),this._expBasedModelConfigObs=this._configService.getExperimentBasedConfigObservable(p2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfigurationString,this._expService),this._defaultModelConfigObs=this._configService.getExperimentBasedConfigObservable(p2.ConfigKey.TeamInternal.InlineEditsXtabProviderDefaultModelConfigurationString,this._expService),this._useSlashModelsObs=this._configService.getExperimentBasedConfigObservable(p2.ConfigKey.TeamInternal.InlineEditsUseSlashModels,this._expService),this._undesiredModelsObs=(0,Mfe.observableFromEvent)(this,this._undesiredModelsManager.onDidChange,()=>this._undesiredModelsManager),this._setModelQueue=new uui.TaskQueue,this._logger=l.createSubLogger(["NES","ModelsService"]);let u=this._logger.createSubLogger("constructor");this._modelsObs=(0,Mfe.derived)(d=>(u.trace("computing models"),this.aggregateModels({copilotToken:this._copilotTokenObs.read(d),fetchedNesModels:this._fetchedModelsObs.read(d),localModelConfig:this._localModelConfigObs.read(d),modelConfigString:this._expBasedModelConfigObs.read(d),defaultModelConfigString:this._defaultModelConfigObs.read(d),useSlashModels:this._useSlashModelsObs.read(d)}))).recomputeInitiallyAndOnChange(this._store),this._currentModelObs=(0,Mfe.derived)(d=>{u.trace("computing current model");let p=this._undesiredModelsObs.read(d);return this._pickModel({preferredModelName:this._preferredModelNameObs.read(d),models:this._modelsObs.read(d),undesiredModelsManager:p})}).recomputeInitiallyAndOnChange(this._store),this._modelInfoObs=(0,Mfe.derived)(d=>(u.trace("computing model info"),{models:this._modelsObs.read(d),currentModelId:this._currentModelObs.read(d).modelName})).recomputeInitiallyAndOnChange(this._store),this.onModelListUpdated=dui.Event.fromObservableLight(this._modelInfoObs)}get modelInfo(){let e=this._modelsObs.get().map(n=>({id:n.modelName,name:n.modelName})),r=this._currentModelObs.get();return{models:e,currentModelId:r.modelName}}setCurrentModelId(e){return this._setModelQueue.schedule(()=>this._setCurrentModelIdCore(e))}async _setCurrentModelIdCore(e){if(this._configService.getExperimentBasedConfig(p2.ConfigKey.Advanced.InlineEditsPreferredModel,this._expService)===e)return;let o=this._currentModelObs.get(),s=this._modelsObs.get(),c=s.find(u=>u.modelName===e);if(c===void 0){this._logService.error(`New preferred model id ${e} not found in model list.`);return}o.source==="expConfig"&&await this._undesiredModelsManager.addUndesiredModelId(o.modelName),this._undesiredModelsManager.isUndesiredModelId(e)&&await this._undesiredModelsManager.removeUndesiredModelId(e);let l=this._pickModel({preferredModelName:"none",models:s,undesiredModelsManager:this._undesiredModelsManager});c.source==="expConfig"||e===l.modelName&&!s.some(u=>u.source==="expConfig")?(this._logger.trace(`New preferred model id ${e} is the same as the default model, resetting user setting.`),await this._configService.setConfig(p2.ConfigKey.Advanced.InlineEditsPreferredModel,"none")):(this._logger.trace(`New preferred model id ${e} is different from the default model, updating user setting to ${e}.`),await this._configService.setConfig(p2.ConfigKey.Advanced.InlineEditsPreferredModel,e))}aggregateModels({copilotToken:e,fetchedNesModels:r,localModelConfig:n,modelConfigString:o,defaultModelConfigString:s,useSlashModels:c}){let l=this._logger.createSubLogger("aggregateModels"),u=[];if(n&&(u.some(d=>d.modelName===n.modelName)?l.trace("Local model configuration already exists in the model list, skipping."):(l.trace(`Adding local model configuration: ${n.modelName}`),u.push({...n,source:"localConfig"}))),o){l.trace("Parsing modelConfigurationString...");let d=this.parseModelConfigString(o,p2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfigurationString);d&&!u.some(p=>p.modelName===d.modelName)?(l.trace(`Adding model from modelConfigurationString: ${d.modelName}`),u.push({...d,source:"expConfig"})):l.trace("No valid model found in modelConfigurationString.")}if(c&&r&&r.length>0){l.trace(`Processing ${r.length} fetched models...`);let d=(0,ZTa.filterMap)(r,p=>{if((0,Q2e.isPromptingStrategy)(p.capabilities.promptStrategy)){if(u.some(h=>h.modelName===p.name)){l.trace(`Fetched model ${p.name} already exists in the model list, skipping.`);return}return{modelName:p.name,promptingStrategy:p.capabilities.promptStrategy,includeTagsInCurrentFile:!1,source:"fetched",lintOptions:void 0}}});l.trace(`Adding ${d.length} fetched models after filtering.`),(0,eSa.pushMany)(u,d)}else{l.trace(`adding built-in default model: useSlashModels ${c}, fetchedNesModels ${r?.length??"undefined"}`);let d=this.determineDefaultModel(e,s);d&&(u.some(p=>p.modelName===d.modelName)?l.trace("Default model configuration already exists in the model list, skipping."):(l.trace(`Adding default model configuration: ${d.modelName}`),u.push(d)))}return u}selectedModelConfiguration(){return $mr(this._currentModelObs.get())}defaultModelConfiguration(){let e=this._modelsObs.get();if(e&&e.length>0){let r=e.filter(n=>!this.isConfiguredModel(n));if(r.length>0)return $mr(r[0])}return $mr(this.determineDefaultModel(this._copilotTokenObs.get(),this._defaultModelConfigObs.get()))}isConfiguredModel(e){switch(e.source){case"localConfig":case"expConfig":case"expDefaultConfig":return!0;case"fetched":case"hardCodedDefault":return!1;default:(0,aui.assertNever)(e.source)}}determineDefaultModel(e,r){if(r){let n=this.parseModelConfigString(r,p2.ConfigKey.TeamInternal.InlineEditsXtabProviderDefaultModelConfigurationString);if(n)return{...n,source:"expDefaultConfig"}}return e?.isFcv1()?q2e.COPILOT_NES_XTAB_MODEL:e?.isFreeUser||e?.isNoAuthUser?q2e.COPILOT_NES_CALLISTO:q2e.COPILOT_NES_OCT}_pickModel({preferredModelName:e,models:r,undesiredModelsManager:n}){let o=r.find(l=>l.source==="expConfig");if(o)if(n.isUndesiredModelId(o.modelName))this._logger.trace(`Exp-configured model ${o.modelName} is marked as undesired by the user. Skipping.`);else return o;if(e!=="none"){let l=r.find(u=>u.modelName===e);if(l)return l}(0,aui.softAssert)(r.length>0,"InlineEdits model list should have at least one model");let c=r.at(0);return c||this.determineDefaultModel(this._copilotTokenObs.get(),this._defaultModelConfigObs.get())}parseModelConfigString(e,r){let n;try{let o=JSON.parse(e),s=Q2e.MODEL_CONFIGURATION_VALIDATOR.validate(o);if(!s.error)return s.content;n=s.error.message}catch(o){n=sui.ErrorUtils.toString(sui.ErrorUtils.fromUnknown(o))}this._telemetryService.sendMSFTTelemetryEvent("incorrectNesModelConfig",{configName:r.id,errorMessage:n,configValue:e})}};h2.InlineEditsModelService=Vmr;h2.InlineEditsModelService=Vmr=q2e=lui([XQ(0,tSa.ICopilotTokenStore),XQ(1,iSa.IProxyModelsService),XQ(2,aSa.IUndesiredModelsManager),XQ(3,p2.IConfigurationService),XQ(4,oSa.IExperimentationService),XQ(5,sSa.ITelemetryService),XQ(6,nSa.ILogService)],Vmr);function $mr(t){let{source:e,...r}=t;return r}a($mr,"toModelConfiguration");var cui;(function(t){let e="copilot.chat.nextEdits.undesiredModelIds",r=class extends fui.Disposable{static{a(this,"Manager")}constructor(o){super(),this._vscodeExtensionContext=o,this._onDidChange=this._register(new dui.Emitter),this.onDidChange=this._onDidChange.event,this._queue=new uui.TaskQueue}isUndesiredModelId(o){return this._getModels().includes(o)}addUndesiredModelId(o){return this._queue.schedule(async()=>{let s=this._getModels();s.includes(o)||(s.push(o),await this._setModels(s),this._onDidChange.fire())})}removeUndesiredModelId(o){return this._queue.schedule(async()=>{let s=this._getModels(),c=s.indexOf(o);c!==-1&&(s.splice(c,1),await this._setModels(s),this._onDidChange.fire())})}_getModels(){return this._vscodeExtensionContext.globalState.get(e)??[]}_setModels(o){return new Promise((s,c)=>{this._vscodeExtensionContext.globalState.update(e,o).then(s,c)})}};r=lui([XQ(0,rSa.IVSCodeExtensionContext)],r),t.Manager=r})(cui||(h2.UndesiredModels=cui={}))});var hui=T(odt=>{"use strict";f();Object.defineProperty(odt,"__esModule",{value:!0});odt.NullLanguageContextProviderService=void 0;var cSa=so(),Wmr=class{static{a(this,"NullLanguageContextProviderService")}registerContextProvider(e,r){return cSa.Disposable.None}getAllProviders(){return[]}getContextProviders(e){return[]}getContextItems(e,r,n){return{[Symbol.asyncIterator]:async function*(){}}}getContextItemsOnTimeout(e,r){return[]}};odt.NullLanguageContextProviderService=Wmr});var mui=T(sdt=>{"use strict";f();Object.defineProperty(sdt,"__esModule",{value:!0});sdt.TestLanguageDiagnosticsService=void 0;var lSa=nc(),uSa=iw(),dSa=KK(),zmr=class extends dSa.AbstractLanguageDiagnosticsService{static{a(this,"TestLanguageDiagnosticsService")}constructor(){super(...arguments),this.diagnosticsMap=new uSa.ResourceMap,this._onDidChangeDiagnostics=new lSa.Emitter,this.onDidChangeDiagnostics=this._onDidChangeDiagnostics.event}setDiagnostics(e,r){this.diagnosticsMap.set(e,r),this._onDidChangeDiagnostics.fire({uris:[e]})}getDiagnostics(e){return this.diagnosticsMap.get(e)||[]}getAllDiagnostics(){return Array.from(this.diagnosticsMap.entries())}};sdt.TestLanguageDiagnosticsService=zmr});var gui=T(cdt=>{"use strict";f();Object.defineProperty(cdt,"__esModule",{value:!0});cdt.ResponseStream=void 0;var fSa=Ay(),adt=VT(),pSa=wc(),hSa=sv(),Ymr=class t{static{a(this,"ResponseStream")}constructor(e,r,n,o){this.fetcherResponse=e,this.requestId=n,this.headers=o;let s=new pSa.DeferredPromise;this.aggregatedStream=s.p,this.response=this.aggregatedStream.then(c=>{if(c.isError())return c;try{return adt.Result.ok(t.aggregateCompletionsStream(c.val))}catch(l){return adt.Result.error(l)}}),this.stream=mSa(r,s)}async destroy(){await this.fetcherResponse.body.destroy()}static aggregateCompletionsStream(e){let r="",n=null,o=null,s;for(let d of e){let p=d.choices[0];r+=p.text??"",p.logprobs&&(o===null?o={tokens:[...p.logprobs.tokens],token_logprobs:[...p.logprobs.token_logprobs],text_offset:[...p.logprobs.text_offset],top_logprobs:[...p.logprobs.top_logprobs]}:(o.tokens.push(...p.logprobs.tokens),o.token_logprobs.push(...p.logprobs.token_logprobs),o.text_offset.push(...p.logprobs.text_offset),o.top_logprobs.push(...p.logprobs.top_logprobs))),d.usage&&(s===void 0?s={completion_tokens:d.usage.completion_tokens,prompt_tokens:d.usage.prompt_tokens,total_tokens:d.usage.total_tokens,completion_tokens_details:{audio_tokens:d.usage.completion_tokens_details.audio_tokens,reasoning_tokens:d.usage.completion_tokens_details.reasoning_tokens},prompt_tokens_details:{audio_tokens:d.usage.prompt_tokens_details.audio_tokens,reasoning_tokens:d.usage.prompt_tokens_details.reasoning_tokens}}:(s.completion_tokens+=d.usage.completion_tokens,s.prompt_tokens+=d.usage.prompt_tokens,s.total_tokens+=d.usage.total_tokens,s.completion_tokens_details.audio_tokens+=d.usage.completion_tokens_details.audio_tokens,s.completion_tokens_details.reasoning_tokens+=d.usage.completion_tokens_details.reasoning_tokens,s.prompt_tokens_details.audio_tokens+=d.usage.prompt_tokens_details.audio_tokens,s.prompt_tokens_details.reasoning_tokens+=d.usage.prompt_tokens_details.reasoning_tokens)),p.finish_reason&&((0,hSa.assertType)(n===null,"cannot already have finishReason if just seeing choice.finish_reason"),n=p.finish_reason)}if(e.length===0)throw new Error("Response is empty!");let c=e[0];return{choices:[{index:0,finish_reason:n,logprobs:o,text:r}],system_fingerprint:c.system_fingerprint,object:c.object,usage:s}}};cdt.ResponseStream=Ymr;async function*mSa(t,e){let r=[],n;try{for await(let o of t)r.push(o),yield o}catch(o){throw n=fSa.ErrorUtils.fromUnknown(o),n}finally{e.complete(n?adt.Result.error(n):adt.Result.ok(r))}}a(mSa,"streamWithAggregation")});var Aui=T(Kmr=>{"use strict";f();Object.defineProperty(Kmr,"__esModule",{value:!0});Kmr.jsonlStreamToCompletions=gSa;async function*gSa(t){for await(let e of t)if(e.trim()!=="data: [DONE]"&&e.startsWith("data: ")){let r=JSON.parse(e.substring(6));if(r.error)throw new Error(r.error.message);yield r}}a(gSa,"jsonlStreamToCompletions")});var Eui=T(w3=>{"use strict";f();var ASa=w3&&w3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Jmr=w3&&w3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(w3,"__esModule",{value:!0});w3.CompletionsFetchService=void 0;var ySa=Shr(),yui=Ay(),zJ=VT(),ESa=_Wt(),CSa=gA(),_Sa=CJ(),vSa=ig(),bSa=Bde(),ZQ=kat(),TSa=gui(),SSa=Aui(),Xmr=class{static{a(this,"CompletionsFetchService")}constructor(e,r,n){this.authService=e,this.fetcherService=r,this.requestLogger=n}disconnectAll(){return this.fetcherService.disconnectAll()}async fetch(e,r,n,o,s,c){let l=Date.now();if(s.isCancellationRequested){let p=zJ.Result.error(new ZQ.Completions.RequestCancelled);return this._logCompletionsRequest(e,n,o,l,p),p}let u={requestId:o,headers:this.getHeaders(o,r,c),body:JSON.stringify({...n,stream:!0})},d=await this._fetchFromUrl(e,u,s);if(d.isError())return this._logCompletionsRequest(e,n,o,l,d),d;if(d.val.status===200){let p=ySa.AsyncIterUtilsExt.splitLines(d.val.body),h=(0,SSa.jsonlStreamToCompletions)(p),m=new TSa.ResponseStream(d.val.response,h,d.val.requestId,d.val.headers),g=zJ.Result.ok(m);return this._logCompletionsRequest(e,n,o,l,g),g}else{let p=new ZQ.Completions.UnsuccessfulResponse(d.val.status,d.val.statusText,d.val.headers,()=>xSa(d.val.body).catch(()=>"")),h=zJ.Result.error(p);return this._logCompletionsRequest(e,n,o,l,h),h}}async _fetchFromUrl(e,r,n){let o=this.fetcherService.makeAbortController(),s=n.onCancellationRequested(()=>{o.abort()});try{let c={headers:r.headers,body:r.body,signal:o.signal,method:"POST",callSite:"nes-completions"},l=await this.fetcherService.fetch(e,c);if(l.status===200&&this.authService.copilotToken?.isFreeUser&&this.authService.copilotToken?.isChatQuotaExceeded&&this.authService.resetCopilotToken(),l.status!==200)return l.status===402&&(this.authService.copilotToken?.isCompletionsQuotaExceeded||(this.authService.resetCopilotToken(l.status),await this.authService.getCopilotToken())),zJ.Result.error(new ZQ.Completions.UnsuccessfulResponse(l.status,l.statusText,l.headers,()=>l.text().catch(()=>"")));let u=l.body.pipeThrough(new TextDecoderStream),d=ISa(u,s);return zJ.Result.ok({status:l.status,statusText:l.statusText,headers:l.headers,body:d,requestId:(0,_Sa.getRequestId)(l.headers),response:l})}catch(c){if(s.dispose(),c instanceof Error&&c.message==="This operation was aborted")return zJ.Result.error(new ZQ.Completions.RequestCancelled);let l=yui.ErrorUtils.fromUnknown(c);return zJ.Result.error(new ZQ.Completions.Unexpected(l))}}_logCompletionsRequest(e,r,n,o,s){if(s.isOk())s.val.response.then(l=>{let u=l.isOk()?"success":"failed";this._emitCompletionsLogEntry(e,r,n,o,u,l)});else{let c=s.err;c instanceof ZQ.Completions.RequestCancelled?this._emitCompletionsLogEntry(e,r,n,o,"cancelled",void 0):c instanceof ZQ.Completions.UnsuccessfulResponse?this._emitCompletionsLogEntry(e,r,n,o,"failed",void 0,`${c.status} ${c.statusText}`):c instanceof ZQ.Completions.Unexpected&&this._emitCompletionsLogEntry(e,r,n,o,"failed",void 0,c.error.message)}}_emitCompletionsLogEntry(e,r,n,o,s,c,l){let u=Date.now()-o,d=[];if(d.push("> \u{1F6A8} Note: This log may contain personal information such as the contents of your files. Please review the contents carefully before sharing."),d.push("# completions"),d.push(""),d.push("- [Metadata](#metadata)"),d.push("- [Prompt](#prompt)"),r.suffix&&d.push("- [Suffix](#suffix)"),d.push("- [Response](#response)"),d.push(""),d.push("## Metadata"),d.push("
"),d.push(`url              : ${e}`),d.push(`requestId        : ${n}`),d.push(`model            : ${r.model??"(default)"}`),d.push(`maxTokens        : ${r.max_tokens}`),d.push(`temperature      : ${r.temperature}`),d.push(`top_p            : ${r.top_p}`),d.push(`n                : ${r.n}`),d.push(`duration         : ${u}ms`),d.push("
"),d.push(""),d.push("## Prompt"),d.push("~~~"),d.push(r.prompt),d.push("~~~"),r.suffix&&(d.push(""),d.push("## Suffix"),d.push("~~~"),d.push(r.suffix),d.push("~~~")),d.push(""),d.push("## Response"),s==="cancelled")d.push("## CANCELED");else if(s==="failed")d.push(`## FAILED: ${l}`);else if(c)if(c.isOk()){let h=c.val,m=h.choices[0]?.text??"",g=h.choices[0]?.finish_reason??"unknown";d.push("~~~"),d.push(m||""),d.push("~~~"),d.push(""),d.push("
"),d.push(`finishReason     : ${g}`),h.usage&&(d.push(`promptTokens     : ${h.usage.prompt_tokens}`),d.push(`completionTokens : ${h.usage.completion_tokens}`),d.push(`totalTokens      : ${h.usage.total_tokens}`)),d.push("
")}else d.push(`## FAILED: stream error - ${c.err.message}`);let p=s==="success"?void 0:ESa.Codicon.error;this.requestLogger.addEntry({type:"MarkdownContentRequest",debugName:"Completions Request",startTimeMs:o,icon:p,markdownContent:d.join(` -`)})}getHeaders(e,r,n={}){return{"Content-Type":"application/json","x-policy-id":"nil",Authorization:"Bearer "+r,"X-Request-Id":e,"X-GitHub-Api-Version":"2025-04-01",...n}}};w3.CompletionsFetchService=Xmr;w3.CompletionsFetchService=Xmr=ASa([Jmr(0,CSa.IAuthenticationService),Jmr(1,vSa.IFetcherService),Jmr(2,bSa.IRequestLogger)],Xmr);async function*ISa(t,e){try{for await(let r of t)yield r}catch(r){throw yui.ErrorUtils.fromUnknown(r)}finally{e.dispose()}}a(ISa,"streamWithCleanup");async function xSa(t){let e=[];for await(let r of t)e.push(r);return e.join("")}a(xSa,"collectAsyncIterableToString")});var _ui=T(ldt=>{"use strict";f();Object.defineProperty(ldt,"__esModule",{value:!0});ldt.WireTypes=void 0;var eq=fB(),Cui;(function(t){let e;(function(o){function s(c){return!!c&&typeof c=="object"&&typeof c.promptStrategy=="string"}a(s,"is"),o.is=s,o.validator=(0,eq.vObj)({promptStrategy:(0,eq.vString)()})})(e=t.Capabilities||(t.Capabilities={}));let r;(function(o){o.validator=(0,eq.vObj)({serviceType:(0,eq.vString)(),name:(0,eq.vString)(),provider:(0,eq.vString)(),capabilities:e.validator});function s(c){return!!c&&typeof c=="object"&&typeof c.serviceType=="string"&&typeof c.name=="string"&&typeof c.provider=="string"&&e.is(c.capabilities)}a(s,"is"),o.is=s})(r=t.Model||(t.Model={}));let n;(function(o){o.validator=(0,eq.vObj)({models:(0,eq.vArray)(r.validator)});function s(c){return!!c&&typeof c=="object"&&Array.isArray(c.models)&&c.models.every(r.is)}a(s,"is"),o.is=s})(n=t.ModelList||(t.ModelList={}))})(Cui||(ldt.WireTypes=Cui={}))});var bui=T(R3=>{"use strict";f();var wSa=R3&&R3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},udt=R3&&R3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(R3,"__esModule",{value:!0});R3.ProxyModelsService=void 0;var RSa=require("util"),Zmr=Ay(),PSa=_O(),kSa=nc(),NSa=so(),vui=Gw(),DSa=O7(),MSa=eE(),OSa=_ui(),BSa=L0(),LSa=ig(),egr=class extends NSa.Disposable{static{a(this,"ProxyModelsService")}constructor(e,r,n,o){super(),this._tokenStore=e,this._capiClient=r,this._fetchService=n,this._logService=o,this._onModelListUpdated=this._register(new kSa.Emitter),this.onModelListUpdated=this._onModelListUpdated.event;let s=(0,vui.observableFromEvent)(this,this._tokenStore.onDidStoreUpdate,()=>this._tokenStore.copilotToken);this._register((0,vui.autorun)(c=>{let l=s.read(c),u=new PSa.CancellationTokenSource;this._fetchLatestModels(l,u.token).then(d=>{d!==void 0&&(u.token.isCancellationRequested||(0,RSa.isDeepStrictEqual)(this._models,d)||(this._models=d,this._onModelListUpdated.fire()))}).catch(d=>{let p=Zmr.ErrorUtils.fromUnknown(d);this._logService.error(p,"Failed to fetch models in autorun")}),c.store.add({dispose:a(()=>u.dispose(!0),"dispose")})}))}get models(){return this._models}get nesModels(){return this._models?.models.filter(e=>e.serviceType==="NESChat")}get instantApplyModels(){return this._models?.models.filter(e=>e.serviceType==="InstantApplyChat")}async _fetchLatestModels(e,r){if(!e)return;let n=`${this._capiClient.proxyBaseURL}/models`,o=this._fetchService.makeAbortController(),s=r.onCancellationRequested(()=>o.abort()),c;try{c=await this._fetchService.fetch(n,{headers:{Authorization:`Bearer ${e.token}`},method:"GET",timeout:1e4,callSite:"proxy-models",signal:o.signal})}catch(l){let u=Zmr.ErrorUtils.fromUnknown(l);this._logService.error(u,"Failed to fetch model list");return}finally{s.dispose()}if(!c.ok){this._logService.error(`Failed to fetch model list: ${c.status} ${c.statusText}`);return}try{let l=await c.json(),u=OSa.WireTypes.ModelList.validator.validate(l);if(u.error)throw new Error(`Invalid /models response data: ${u.error.message}`);return u.content}catch(l){let u=Zmr.ErrorUtils.fromUnknown(l);this._logService.error(u,"Failed to process /models response");return}}};R3.ProxyModelsService=egr;R3.ProxyModelsService=egr=wSa([udt(0,DSa.ICopilotTokenStore),udt(1,MSa.ICAPIClientService),udt(2,LSa.IFetcherService),udt(3,BSa.ILogService)],egr)});var Tui=T(ddt=>{"use strict";f();Object.defineProperty(ddt,"__esModule",{value:!0});ddt.NullRequestLogger=void 0;var FSa=Bde(),USa=nc(),tgr=class extends FSa.AbstractRequestLogger{static{a(this,"NullRequestLogger")}constructor(){super(...arguments),this.onDidChangeRequests=USa.Event.None}addPromptTrace(){}addEntry(e){}getRequests(){return[]}getRequestById(e){}logModelListCall(e,r,n){}logToolCall(e,r,n){}logServerToolCall(e,r,n,o){}};ddt.NullRequestLogger=tgr});var Agr=T(du=>{"use strict";f();var dgr=du&&du.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},P3=du&&du.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(du,"__esModule",{value:!0});du.SimpleExperimentationService=du.LogLevel=du.ILanguageContextProviderService=du.IIgnoreService=du.IExperimentationService=du.IEndpointProvider=du.ICAPIClientService=du.IAuthenticationService=void 0;du.createNESProvider=DIa;du.createInlineCompletionsProvider=OIa;var QSa=uRn(),Sui=yY(),Iui=ajn(),xui=due(),qSa=knt(),wui=nir(),GSa=iir(),Cb=Xm(),Rui=uir(),HSa=GYn(),jSa=Zm(),Pui=$ir(),$Sa=UU(),kui=Jir(),Nui=dwe(),Dui=yor(),Mui=Cor(),Oui=Lur(),ngr=_ot(),VSa=Bni(),WSa=Lni(),G2e=mc(),zSa=Tde(),YSa=air(),Bui=Idr(),Lui=Sir(),Fui=wat(),Uui=ylr(),Qui=dst(),H2e=ust(),qui=nQ(),Gui=Tst(),KSa=qni(),JSa=_st(),Hui=Ter(),jui=E_(),$ui=pxe(),Vui=YK(),XSa=tii(),ZSa=Xii(),igr=Eoi(),Wui=i0r(),eIa=mai(),tIa=xpr(),rIa=mli(),fgr=gA();Object.defineProperty(du,"IAuthenticationService",{enumerable:!0,get:a(function(){return fgr.IAuthenticationService},"get")});var nIa=fxe(),zui=O7(),iIa=gli(),oIa=Ili(),sIa=d3(),aIa=a0r(),cIa=xli(),lIa=c0r(),Yui=u0r(),V2e=fc(),uIa=Rli(),dIa=wpr(),fIa=Oli(),pgr=eE();Object.defineProperty(du,"ICAPIClientService",{enumerable:!0,get:a(function(){return pgr.ICAPIClientService},"get")});var pIa=NQ(),hgr=Zxe();Object.defineProperty(du,"IEndpointProvider",{enumerable:!0,get:a(function(){return hgr.IEndpointProvider},"get")});var rdi=Lli(),hIa=Uli(),YJ=iR(),mIa=Qli(),gIa=Smr(),ndi=qli(),j2e=PK();Object.defineProperty(du,"IIgnoreService",{enumerable:!0,get:a(function(){return j2e.IIgnoreService},"get")});var AIa=LJ(),yIa=nZe(),rgr=Olt(),EIa=Gli(),CIa=tui(),_Ia=iui(),vIa=pui(),mgr=ast();Object.defineProperty(du,"ILanguageContextProviderService",{enumerable:!0,get:a(function(){return mgr.ILanguageContextProviderService},"get")});var idi=hui(),odi=KK(),sdi=mui(),m2=L0(),bIa=kat(),TIa=Eui(),ggr=ig(),Kui=PQ(),SIa=mpr(),IIa=Apr(),xIa=_lt(),wIa=jmr(),RIa=bui(),adi=Tui(),cdi=Bde(),Jui=Bpr(),Xui=cfr(),W2e=gd();Object.defineProperty(du,"IExperimentationService",{enumerable:!0,get:a(function(){return W2e.IExperimentationService},"get")});var ldi=Rp(),Zui=Zde(),PIa=HZt(),edi=gut(),tdi=PJ(),ogr=Chr(),udi=qr(),kIa=_O(),$2e=nc(),mdt=so(),NIa=Np(),$n=zXe(),ddi=Mo(),KJ;(function(t){t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warning=4]="Warning",t[t.Error=5]="Error"})(KJ||(du.LogLevel=KJ={}));function DIa(t){return MIa(t).createInstance(sgr,t)}a(DIa,"createNESProvider");var sgr=class extends mdt.Disposable{static{a(this,"NESProvider")}constructor(e,r,n,o,s){super(),this._options=e,this._expService=n,this._configurationService=o,this._workspaceService=s;let c=r.createInstance(rIa.XtabProvider),l=r.createInstance(EIa.ObservableGit),u=new CIa.NesHistoryContextProvider(this._options.workspace,l),d=this._configurationService.getExperimentBasedConfig(V2e.ConfigKey.TeamInternal.InlineEditsXtabDiffNEntries,this._expService),p=new _Ia.NesXtabHistoryTracker(this._options.workspace,d,o,n);this._debugRecorder=this._register(new XSa.DebugRecorder(this._options.workspace)),this._nextEditProvider=r.createInstance(ZSa.NextEditProvider,this._options.workspace,c,u,p,this._debugRecorder),this._telemetrySender=this._register(r.createInstance(igr.TelemetrySender,this._options.workspace))}getId(){return this._nextEditProvider.ID}handleShown(e){e.telemetryBuilder.setAsShown(),this._nextEditProvider.handleShown(e.internalResult)}handleAcceptance(e){e.telemetryBuilder.setAcceptance("accepted"),e.telemetryBuilder.setStatus("accepted"),this._nextEditProvider.handleAcceptance(e.docId,e.internalResult),this.handleEndOfLifetime(e)}handleRejection(e){e.telemetryBuilder.setAcceptance("rejected"),e.telemetryBuilder.setStatus("rejected"),this._nextEditProvider.handleRejection(e.docId,e.internalResult),this.handleEndOfLifetime(e)}handleIgnored(e,r){r&&e.telemetryBuilder.setSupersededBy(r.requestUuid),this._nextEditProvider.handleIgnored(e.docId,e.internalResult,r?.internalResult),this.handleEndOfLifetime(e)}handleEndOfLifetime(e){try{this._telemetrySender.sendTelemetryForBuilder(e.telemetryBuilder)}finally{e.telemetryBuilder.dispose()}}async getNextEdit(e,r){let n=AIa.DocumentId.create(e.toString()),o={triggerKind:1,selectedCompletionInfo:void 0,requestUuid:(0,NIa.generateUuid)(),requestIssuedDateTime:Date.now(),earliestShownDateTime:Date.now()+200,enforceCacheDelay:!0},s=new yIa.InlineEditRequestLogContext(e.toString(),1,o),c=this._options.workspace.getDocument(n);if(!c)throw new Error("DocumentNotFound");let l=new igr.NextEditProviderTelemetryBuilder(new ndi.NullGitExtensionService,void 0,this._workspaceService,this._nextEditProvider.ID,c,this._debugRecorder,s.recordingBookmark);l.setOpportunityId(o.requestUuid);try{let u=await this._nextEditProvider.getNextEdit(n,o,s,r,l.nesBuilder);return{result:u.result?.edit?{newText:u.result.edit.newText,range:u.result.edit.replaceRange}:void 0,docId:n,requestUuid:o.requestUuid,internalResult:u,telemetryBuilder:l}}catch(u){try{this._telemetrySender.sendTelemetryForBuilder(l)}finally{l.dispose()}throw u}}updateTreatmentVariables(e){this._expService instanceof JJ&&this._expService.updateTreatmentVariables(e)}};sgr=dgr([P3(1,ddi.IInstantiationService),P3(2,W2e.IExperimentationService),P3(3,V2e.IConfigurationService),P3(4,ogr.IWorkspaceService)],sgr);function MIa(t){let{fetcher:e,copilotTokenManager:r,telemetrySender:n,logTarget:o}=t,s=new udi.InstantiationServiceBuilder;s.define(V2e.IConfigurationService,new $n.SyncDescriptor(fdt,[t.configOverrides??new Map])),s.define(W2e.IExperimentationService,new $n.SyncDescriptor(JJ,[t.waitForTreatmentVariables])),s.define(Jui.ISimulationTestContext,new $n.SyncDescriptor(Jui.NulSimulationTestContext)),s.define(ogr.IWorkspaceService,new $n.SyncDescriptor(ogr.NullWorkspaceService)),s.define(dIa.IDiffService,new $n.SyncDescriptor(fIa.DiffServiceImpl,[!1])),s.define(m2.ILogService,new $n.SyncDescriptor(m2.LogServiceImpl,[[o||new m2.ConsoleLog(void 0,m2.LogLevel.Trace)]])),s.define(gIa.IGitExtensionService,new $n.SyncDescriptor(ndi.NullGitExtensionService)),s.define(mgr.ILanguageContextProviderService,new $n.SyncDescriptor(idi.NullLanguageContextProviderService)),s.define(odi.ILanguageDiagnosticsService,new $n.SyncDescriptor(sdi.TestLanguageDiagnosticsService)),s.define(j2e.IIgnoreService,new $n.SyncDescriptor(j2e.NullIgnoreService)),s.define(Xui.ISnippyService,new $n.SyncDescriptor(Xui.NullSnippyService)),s.define(pIa.IDomainService,new $n.SyncDescriptor(hIa.DomainService)),s.define(pgr.ICAPIClientService,new $n.SyncDescriptor(rdi.CAPIClientImpl)),s.define(zui.ICopilotTokenStore,new $n.SyncDescriptor(zui.CopilotTokenStore)),s.define(YJ.IEnvService,new $n.SyncDescriptor(mIa.NullEnvService)),s.define(ggr.IFetcherService,new $n.SyncDescriptor(pdt,[e])),s.define(ldi.ITelemetryService,new $n.SyncDescriptor(hdt,[n])),s.define(fgr.IAuthenticationService,new $n.SyncDescriptor(iIa.StaticGitHubAuthenticationService,[(0,oIa.createStaticGitHubTokenProvider)()])),s.define(nIa.ICopilotTokenManager,r),s.define(Wui.IPowerService,new $n.SyncDescriptor(Wui.NullPowerService)),s.define(sIa.IChatMLFetcher,new $n.SyncDescriptor(eIa.ChatMLFetcherImpl)),s.define(Kui.IChatWebSocketManager,new $n.SyncDescriptor(Kui.NullChatWebSocketManager)),s.define(xIa.IOTelService,new SIa.NoopOTelService((0,IIa.resolveOTelConfig)({env:{},extensionVersion:"0.0.0",sessionId:"chatlib"}))),s.define(aIa.IChatQuotaService,new $n.SyncDescriptor(cIa.ChatQuotaService)),s.define(Yui.IInteractionService,new $n.SyncDescriptor(Yui.InteractionService)),s.define(cdi.IRequestLogger,new $n.SyncDescriptor(adi.NullRequestLogger)),s.define(tdi.ITokenizerProvider,new $n.SyncDescriptor(tdi.TokenizerProvider,[!1])),s.define(lIa.IConversationOptions,{_serviceBrand:void 0,maxResponseTokens:void 0,temperature:.1,topP:1,rejectionMessage:"Sorry, but I can only assist with programming related questions."}),s.define(wIa.IProxyModelsService,new $n.SyncDescriptor(RIa.ProxyModelsService)),s.define(rgr.IInlineEditsModelService,new $n.SyncDescriptor(vIa.InlineEditsModelService)),s.define(rgr.IUndesiredModelsManager,t.undesiredModelsManager||new $n.SyncDescriptor(rgr.NullUndesiredModelsManager)),s.define(edi.ITerminalService,t.terminalService||new $n.SyncDescriptor(edi.NullTerminalService)),s.define(tIa.ISimilarFilesContextService,new $n.SyncDescriptor(agr)),s.define(hgr.IEndpointProvider,new cgr);let c=new Cb.InMemoryConfigProvider(new Cb.DefaultsOnlyConfigProvider);return t.configOverrides&&c.setOverrides(t.configOverrides),s.define(Cb.ICompletionsConfigProvider,c),s.seal()}a(MIa,"setupServices");var fdt=class extends uIa.DefaultsOnlyConfigurationService{static{a(this,"OverridableConfigurationService")}constructor(e){super(),this._overrides=e}getConfig(e){if(this._overrides.has(e.id)){let r=this._overrides.get(e.id);if(e.validator){let n=e.validator.validate(r);return n.error?super.getConfig(e):n.content}return r}return super.getConfig(e)}getExperimentBasedConfig(e,r){if(this._overrides.has(e.id)){let n=this._overrides.get(e.id);if(e.validator){let o=e.validator.validate(n);return o.error?super.getExperimentBasedConfig(e,r):o.content}return n}return super.getExperimentBasedConfig(e,r)}inspectConfig(e){if(this._overrides.has(e.id)){let r=this._overrides.get(e.id);if(e.validator){let n=e.validator.validate(r);return n.error?super.inspectConfig(e):{defaultValue:n.content}}return{defaultValue:r}}return super.inspectConfig(e)}},agr=class{static{a(this,"NullSimilarFilesContextService")}async compute(){}},cgr=class{static{a(this,"NullEndpointProvider")}constructor(){this.onDidModelsRefresh=$2e.Event.None}async getAllCompletionModels(){return[]}async getAllChatEndpoints(){return[]}async getChatEndpoint(){throw new Error("not implemented")}async getEmbeddingsEndpoint(){throw new Error("not implemented")}},JJ=class extends mdt.Disposable{static{a(this,"SimpleExperimentationService")}constructor(e,r){if(super(),this._configurationService=r,this.variables={},this._onDidTreatmentsChange=this._register(new $2e.Emitter),this.onDidTreatmentsChange=this._onDidTreatmentsChange.event,e){let n;this.waitFor=new Promise(o=>{n=o}),this.resolveWaitFor=n}else this.waitFor=Promise.resolve(),this.resolveWaitFor=()=>{}}async hasTreatments(){return this.waitFor}getTreatmentVariable(e){return this.variables[e]}async setCompletionsFilters(e){}updateTreatmentVariables(e){let r=[];for(let[n,o]of Object.entries(e))this.variables[n]!==o&&(this.variables[n]=o,r.push(n));for(let n of Object.keys(this.variables))Object.hasOwn(e,n)||(delete this.variables[n],r.push(n));r.length>0&&(this._onDidTreatmentsChange.fire({affectedTreatmentVariables:r}),this._configurationService.updateExperimentBasedConfiguration(r)),this.resolveWaitFor()}};du.SimpleExperimentationService=JJ;du.SimpleExperimentationService=JJ=dgr([P3(1,V2e.IConfigurationService)],JJ);var pdt=class{static{a(this,"SingleFetcherService")}constructor(e){this._fetcher=e,this.onDidFetch=$2e.Event.None,this.onDidCompleteFetch=$2e.Event.None}fetchWithPagination(e,r){return this._fetcher.fetchWithPagination(e,r)}getUserAgentLibrary(){return this._fetcher.getUserAgentLibrary()}fetch(e,r){return this._fetcher.fetch(e,r)}createWebSocket(e,r){return{webSocket:new WebSocket(e,r),responseHeaders:new ggr.HeadersImpl({}),responseStatusCode:void 0,responseStatusText:void 0}}disconnectAll(){return this._fetcher.disconnectAll()}makeAbortController(){return this._fetcher.makeAbortController()}isAbortError(e){return this._fetcher.isAbortError(e)}isInternetDisconnectedError(e){return this._fetcher.isInternetDisconnectedError(e)}isFetcherError(e){return this._fetcher.isFetcherError(e)}isNetworkProcessCrashedError(e){return this._fetcher.isNetworkProcessCrashedError(e)}getUserMessageForFetcherError(e){return this._fetcher.getUserMessageForFetcherError(e)}},hdt=class{static{a(this,"SimpleTelemetryService")}constructor(e){this._telemetrySender=e}dispose(){}sendInternalMSFTTelemetryEvent(e,r,n){}sendMSFTTelemetryEvent(e,r,n){}sendMSFTTelemetryErrorEvent(e,r,n){}sendGHTelemetryEvent(e,r,n){this._telemetrySender.sendTelemetryEvent(e,(0,Zui.eventPropertiesToSimpleObject)(r),n)}sendGHTelemetryErrorEvent(e,r,n){}sendGHTelemetryException(e,r){}sendTelemetryEvent(e,r,n,o){}sendTelemetryErrorEvent(e,r,n,o){}setSharedProperty(e,r){}setAdditionalExpAssignments(e){}postEvent(e,r){}sendEnhancedGHTelemetryEvent(e,r,n){this._telemetrySender.sendEnhancedTelemetryEvent&&this._telemetrySender.sendEnhancedTelemetryEvent(e,(0,Zui.eventPropertiesToSimpleObject)(r),n)}sendEnhancedGHTelemetryErrorEvent(e,r,n){}};function OIa(t){return BIa(t).createInstance(lgr)}a(OIa,"createInlineCompletionsProvider");var lgr=class extends mdt.Disposable{static{a(this,"InlineCompletionsProvider")}constructor(e,r,n,o){super(),this._insta=e,this._expService=r,this._speculativeRequestCache=n,this._logService=o,this._register(e),this.ghostText=this._insta.createInstance(VSa.GhostText)}updateTreatmentVariables(e){this._expService instanceof JJ&&this._expService.updateTreatmentVariables(e)}async getInlineCompletions(e,r,n,o){let s=new igr.LlmNESTelemetryBuilder(void 0,void 0,void 0,"ghostText",void 0);return await this.ghostText.getInlineCompletions(e,r,n??kIa.CancellationToken.None,o,new QSa.GhostTextLogContext(e.uri,e.version,void 0),s,this._logService)}async inlineCompletionShown(e){return await this._speculativeRequestCache.request(e)}};lgr=dgr([P3(0,ddi.IInstantiationService),P3(1,W2e.IExperimentationService),P3(2,ngr.ICompletionsSpeculativeRequestCache),P3(3,m2.ILogService)],lgr);var ugr=class{static{a(this,"UnwrappingTelemetrySender")}constructor(e){this.sender=e}sendTelemetryEvent(e,r,n){this.sender.sendTelemetryEvent(this.normalizeEventName(e),r,n)}sendEnhancedTelemetryEvent(e,r,n){this.sender.sendEnhancedTelemetryEvent&&this.sender.sendEnhancedTelemetryEvent(this.normalizeEventName(e),r,n)}normalizeEventName(e){let r=(0,PIa.unwrapEventNameFromPrefix)(e),n=r.match(/^[^/]+\/(.*)/);return n?n[1]:r}};function BIa(t){let{fetcher:e,authService:r,statusHandler:n,documentManager:o,workspace:s,telemetrySender:c,urlOpener:l,editorSession:u}=t,d=t.logTarget||new m2.ConsoleLog(void 0,m2.LogLevel.Trace),p=new udi.InstantiationServiceBuilder;p.define(G2e.ICompletionsLogTargetService,new class{logIt(m,g,...A){d.logIt(this.toExternalLogLevel(m),g,...A)}toExternalLogLevel(m){switch(m){case G2e.LogLevel.DEBUG:return KJ.Debug;case G2e.LogLevel.INFO:return KJ.Info;case G2e.LogLevel.WARN:return KJ.Warning;case G2e.LogLevel.ERROR:return KJ.Error;default:return KJ.Info}}}),p.define(fgr.IAuthenticationService,r),p.define(m2.ILogService,new $n.SyncDescriptor(m2.LogServiceImpl,[[d||new m2.ConsoleLog(void 0,m2.LogLevel.Trace)]])),p.define(j2e.IIgnoreService,t.ignoreService||new j2e.NullIgnoreService),p.define(ldi.ITelemetryService,new $n.SyncDescriptor(hdt,[new ugr(c)])),p.define(V2e.IConfigurationService,new $n.SyncDescriptor(fdt,[t.configOverrides??new Map])),p.define(W2e.IExperimentationService,new $n.SyncDescriptor(JJ,[t.waitForTreatmentVariables])),p.define(hgr.IEndpointProvider,t.endpointProvider),p.define(pgr.ICAPIClientService,t.capiClientService||new $n.SyncDescriptor(rdi.CAPIClientImpl)),p.define(ggr.IFetcherService,new $n.SyncDescriptor(pdt,[e])),p.define(Sui.ICompletionsTelemetryService,new $n.SyncDescriptor(Sui.CompletionsTelemetryServiceBridge)),p.define(Vui.ICompletionsRuntimeModeService,Vui.RuntimeMode.fromEnvironment(t.isRunningInTest??!1)),p.define(Nui.ICompletionsCacheService,new Nui.CompletionsCache);let h=new Cb.InMemoryConfigProvider(new Cb.DefaultsOnlyConfigProvider);return t.configOverrides&&h.setOverrides(t.configOverrides),p.define(Cb.ICompletionsConfigProvider,h),p.define(Oui.ICompletionsLastGhostText,new Oui.LastGhostText),p.define(Mui.ICompletionsCurrentGhostText,new Mui.CurrentGhostText),p.define(ngr.ICompletionsSpeculativeRequestCache,new ngr.SpeculativeRequestCache),p.define(YSa.ICompletionsNotificationSender,new class{async showWarningMessage(m,...g){return await t.notificationSender.showWarningMessage(m,...g)}}),p.define(Cb.ICompletionsEditorAndPluginInfo,new class{getEditorInfo(){return t.editorInfo}getEditorPluginInfo(){return t.editorPluginInfo}getRelatedPluginInfo(){return t.relatedPluginInfo}}),p.define(Iui.ICompletionsExtensionStatus,new Iui.CopilotExtensionStatus),p.define(jSa.ICompletionsFeaturesService,new $n.SyncDescriptor(HSa.Features)),p.define(GSa.ICompletionsObservableWorkspace,new class{get openDocuments(){return s.openDocuments}getWorkspaceRoot(m){return s.getWorkspaceRoot(m)}getFirstOpenDocument(){return s.getFirstOpenDocument()}getDocument(m){return s.getDocument(m)}}),p.define(Fui.ICompletionsStatusReporter,new class extends Fui.StatusReporter{didChange(m){n.didChange(m)}}),p.define(xui.ICompletionsCopilotTokenManager,new $n.SyncDescriptor(xui.CopilotTokenManagerImpl,[!1])),p.define(jui.ICompletionsTextDocumentManagerService,new $n.SyncDescriptor(class extends jui.TextDocumentManager{constructor(){super(...arguments),this.onDidChangeTextDocument=o.onDidChangeTextDocument,this.onDidOpenTextDocument=o.onDidOpenTextDocument,this.onDidCloseTextDocument=o.onDidCloseTextDocument,this.onDidFocusTextDocument=o.onDidFocusTextDocument,this.onDidChangeWorkspaceFolders=o.onDidChangeWorkspaceFolders}getTextDocumentsUnsafe(){return o.getTextDocumentsUnsafe()}findNotebook(m){return o.findNotebook(m)}getWorkspaceFolders(){return o.getWorkspaceFolders()}})),p.define(Pui.ICompletionsFileReaderService,new $n.SyncDescriptor(Pui.FileReader)),p.define(Dui.ICompletionsBlockModeConfig,new $n.SyncDescriptor(Dui.ConfigBlockModeConfig)),p.define(Hui.ICompletionsTelemetryUserConfigService,new $n.SyncDescriptor(Hui.TelemetryUserConfig)),p.define(Gui.ICompletionsRecentEditsProviderService,new $n.SyncDescriptor(Gui.FullRecentEditsProvider,[void 0])),p.define(wui.ICompletionsNotifierService,new $n.SyncDescriptor(wui.CompletionNotifier)),p.define(Bui.ICompletionsOpenAIFetcherService,new $n.SyncDescriptor(Bui.LiveOpenAIFetcher)),p.define(bIa.ICompletionsFetchService,new $n.SyncDescriptor(TIa.CompletionsFetchService)),p.define(Lui.ICompletionsModelManagerService,new $n.SyncDescriptor(Lui.AvailableModelsManager,[!0])),p.define(kui.ICompletionsAsyncManagerService,new $n.SyncDescriptor(kui.AsyncCompletionManager)),p.define(Qui.ICompletionsContextProviderBridgeService,new $n.SyncDescriptor(Qui.ContextProviderBridge)),p.define(Rui.ICompletionsUserErrorNotifierService,new $n.SyncDescriptor(Rui.UserErrorNotifier)),p.define(JSa.ICompletionsRelatedFilesProviderService,new $n.SyncDescriptor(KSa.CompositeRelatedFilesProvider)),p.define($Sa.ICompletionsFileSystemService,new WSa.LocalFileSystem),p.define(H2e.ICompletionsContextProviderRegistryService,new $n.SyncDescriptor(H2e.CachedContextProviderRegistry,[H2e.CoreContextProviderRegistry,(m,g,A)=>t.contextProviderMatch(g,A)])),p.define($ui.ICompletionsPromiseQueueService,new $ui.PromiseQueue),p.define(qSa.ICompletionsCitationManager,new class{register(){return mdt.Disposable.None}async handleIPCodeCitation(m){if(t.citationHandler)return await t.citationHandler.handleIPCodeCitation(m)}}),p.define(qui.ICompletionsContextProviderService,new qui.ContextProviderStatistics),p.define(Uui.ICompletionsPromptFactoryService,new $n.SyncDescriptor(Uui.CompletionsPromptFactory)),p.define(zSa.ICompletionsFetcherService,new class{getImplementation(){return this}fetch(m,g){return e.fetch(m,g)}disconnectAll(){return e.disconnectAll()}}),p.define(H2e.ICompletionsDefaultContextProviders,new H2e.DefaultContextProvidersContainer),p.define(YJ.IEnvService,new class{constructor(){this.language=void 0,this.sessionId=u.sessionId,this.machineId=u.machineId,this.devDeviceId=u.machineId,this.vscodeVersion=t.editorInfo.version,this.isActive=!0,this.onDidChangeWindowState=$2e.Event.None,this.remoteName=u.remoteName,this.uiKind=u.uiKind==="web"?"web":"desktop",this.OS=process.platform==="darwin"?YJ.OperatingSystem.Macintosh:process.platform==="win32"?YJ.OperatingSystem.Windows:YJ.OperatingSystem.Linux,this.uriScheme="",this.extensionId=t.editorPluginInfo.name,this.appRoot=t.editorInfo.root??"",this.shell=""}isProduction(){return Cb.BuildInfo.isProduction()}isPreRelease(){return Cb.BuildInfo.isPreRelease()}isSimulation(){return t.isRunningInTest===!0}getBuildType(){return Cb.BuildInfo.getBuildType()===Cb.BuildType.DEV?"dev":"prod"}getVersion(){return Cb.BuildInfo.getVersion()}getBuild(){return Cb.BuildInfo.getBuild()}getName(){return t.editorInfo.name}getEditorInfo(){return new YJ.NameAndVersion(t.editorInfo.name,t.editorInfo.version)}getEditorPluginInfo(){return new YJ.NameAndVersion(t.editorPluginInfo.name,t.editorPluginInfo.version)}async openExternal(m){return await l.open(m.toString()),!0}}),p.define(mgr.ILanguageContextProviderService,t.languageContextProvider??new idi.NullLanguageContextProviderService),p.define(odi.ILanguageDiagnosticsService,new $n.SyncDescriptor(sdi.TestLanguageDiagnosticsService)),p.define(cdi.IRequestLogger,new $n.SyncDescriptor(adi.NullRequestLogger)),p.seal()}a(BIa,"setupCompletionServices")});var rpi=T((swf,RPe)=>{"use strict";f();var Sft=a(function(){},"NullObject");Sft.prototype=Object.create(null);var bft=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,Tft=/\\([\v\u0020-\u00ff])/gu,Z0i=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,sX={type:"",parameters:new Sft};Object.freeze(sX.parameters);Object.freeze(sX);function epi(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(Z0i.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new Sft};if(e===-1)return n;let o,s,c;for(bft.lastIndex=e;s=bft.exec(t);){if(s.index!==e)throw new TypeError("invalid parameter format");e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),Tft.test(c)&&(c=c.replace(Tft,"$1"))),n.parameters[o]=c}if(e!==t.length)throw new TypeError("invalid parameter format");return n}a(epi,"parse");function tpi(t){if(typeof t!="string")return sX;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(Z0i.test(r)===!1)return sX;let n={type:r.toLowerCase(),parameters:new Sft};if(e===-1)return n;let o,s,c;for(bft.lastIndex=e;s=bft.exec(t);){if(s.index!==e)return sX;e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),Tft.test(c)&&(c=c.replace(Tft,"$1"))),n.parameters[o]=c}return e!==t.length?sX:n}a(tpi,"safeParse");RPe.exports.default={parse:epi,safeParse:tpi};RPe.exports.parse=epi;RPe.exports.safeParse=tpi;RPe.exports.defaultContentType=sX});var GAr=T((n5f,rhi)=>{f();var BPe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,kka=typeof AbortController=="function",Fft=kka?AbortController:class{static{a(this,"AbortController")}constructor(){this.signal=new Zpi}abort(){this.signal.dispatchEvent("abort")}},Nka=typeof AbortSignal=="function",Dka=typeof Fft.AbortSignal=="function",Zpi=Nka?AbortSignal:Dka?Fft.AbortController:class{static{a(this,"AbortSignal")}constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if(e==="abort"){this.aborted=!0;let r={type:e,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},QAr=new Set,LAr=a((t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;Uft(r)&&qAr(r,`${t} option`,`options.${e}`,v0e)},"deprecatedOption"),FAr=a((t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(Uft(r)){let{prototype:n}=v0e,{get:o}=Object.getOwnPropertyDescriptor(n,t);qAr(r,`${t} method`,`cache.${e}()`,o)}},"deprecatedMethod"),Mka=a((t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(Uft(r)){let{prototype:n}=v0e,{get:o}=Object.getOwnPropertyDescriptor(n,t);qAr(r,`${t} property`,`cache.${e}`,o)}},"deprecatedProperty"),ehi=a((...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},"emitWarning"),Uft=a(t=>!QAr.has(t),"shouldWarn"),qAr=a((t,e,r,n)=>{QAr.add(t);let o=`The ${e} is deprecated. Please use ${r} instead.`;ehi(o,"DeprecationWarning",t,n)},"warn"),dX=a(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),thi=a(t=>dX(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_0e:null:null,"getUintArray"),_0e=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},UAr=class{static{a(this,"Stack")}constructor(e){if(e===0)return[];let r=thi(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},v0e=class t{static{a(this,"LRUCache")}constructor(e={}){let{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:s,updateAgeOnGet:c,updateAgeOnHas:l,allowStale:u,dispose:d,disposeAfter:p,noDisposeOnSet:h,noUpdateTTL:m,maxSize:g=0,sizeCalculation:A,fetchMethod:y,fetchContext:E,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:v}=e,{length:b,maxAge:I,stale:x}=e instanceof t?{}:e;if(r!==0&&!dX(r))throw new TypeError("max option must be a nonnegative integer");let R=r?thi(r):Array;if(!R)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=g,this.sizeCalculation=A||b,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=E,!this.fetchMethod&&E!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new R(r),this.prev=new R(r),this.head=0,this.tail=0,this.free=new UAr(r),this.initialFill=1,this.size=0,typeof d=="function"&&(this.dispose=d),typeof p=="function"?(this.disposeAfter=p,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!_,this.maxSize!==0){if(!dX(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!x,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!l,this.ttlResolution=dX(o)||o===0?o:1,this.ttlAutopurge=!!s,this.ttl=n||I||0,this.ttl){if(!dX(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let w="LRU_CACHE_UNBOUNDED";Uft(w)&&(QAr.add(w),ehi("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",w,t))}x&&LAr("stale","allowStale"),I&&LAr("maxAge","ttl"),b&&LAr("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new _0e(this.max),this.starts=new _0e(this.max),this.setItemTTL=(n,o,s=BPe.now())=>{if(this.starts[n]=o!==0?s:0,this.ttls[n]=o,o!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},o+1);c.unref&&c.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?BPe.now():0};let e=0,r=a(()=>{let n=BPe.now();if(this.ttlResolution>0){e=n;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return n},"getNow");this.getRemainingTTL=n=>{let o=this.keyMap.get(n);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new _0e(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,o)=>{if(!dX(n))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(n=o(r,e),!dX(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(e,r)=>{this.sizes[e]=r;let n=this.maxSize-this.sizes[e];for(;this.calculatedSize>n;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,o){if(n||o)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(let e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(let e of this.indexes())yield this.keyList[e]}*rkeys(){for(let e of this.rindexes())yield this.keyList[e]}*values(){for(let e of this.indexes())yield this.valList[e]}*rvalues(){for(let e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(e,r=this){for(let n of this.indexes())e.call(r,this.valList[n],this.keyList[n],this)}rforEach(e,r=this){for(let n of this.rindexes())e.call(r,this.valList[n],this.keyList[n],this)}get prune(){return FAr("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],o=this.valList[r],c={value:this.isBackgroundFetch(o)?o.__staleWhileFetching:o};if(this.ttls){c.ttl=this.ttls[r];let l=BPe.now()-this.starts[r];c.start=Math.floor(Date.now()-l)}this.sizes&&(c.size=this.sizes[r]),e.unshift([n,c])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let o=Date.now()-n.start;n.start=BPe.now()-o}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(c=this.requireSize(e,r,c,l),this.maxSize&&c>this.maxSize)return this;let d=this.size===0?void 0:this.keyMap.get(e);if(d===void 0)d=this.newIndex(),this.keyList[d]=e,this.valList[d]=r,this.keyMap.set(e,d),this.next[this.tail]=d,this.prev[d]=this.tail,this.tail=d,this.size++,this.addItemSize(d,c),u=!1;else{let p=this.valList[d];r!==p&&(this.isBackgroundFetch(p)?p.__abortController.abort():s||(this.dispose(p,e,"set"),this.disposeAfter&&this.disposed.push([p,e,"set"])),this.removeItemSize(d),this.valList[d]=r,this.addItemSize(d,c)),this.moveToTail(d)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(d,n,o),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],o=this.valList[r];return this.isBackgroundFetch(o)?o.__abortController.abort():(this.dispose(o,n,"evict"),this.disposeAfter&&this.disposed.push([o,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas}={}){let n=this.keyMap.get(e);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let o=this.valList[n];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,r,n,o){let s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;let c=new Fft,l={signal:c.signal,options:n,context:o},u=a(m=>(c.signal.aborted||this.set(e,m,l.options),m),"cb"),d=a(m=>{if(this.valList[r]===h&&(!n.noDeleteOnFetchRejection||h.__staleWhileFetching===void 0?this.delete(e):this.valList[r]=h.__staleWhileFetching),h.__returned===h)throw m},"eb"),p=a(m=>m(this.fetchMethod(e,s,l)),"pcall"),h=new Promise(p).then(u,d);return h.__abortController=c,h.__staleWhileFetching=s,h.__returned=null,r===void 0?(this.set(e,h,l.options),r=this.keyMap.get(e)):this.valList[r]=h,h}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,fetchContext:h=this.fetchContext,forceRefresh:m=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o});let g={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:p},A=this.keyMap.get(e);if(A===void 0){let y=this.backgroundFetch(e,A,g,h);return y.__returned=y}else{let y=this.valList[A];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!m&&!this.isStale(A))return this.moveToTail(A),n&&this.updateItemAge(A),y;let E=this.backgroundFetch(e,A,g,h);return r&&E.__staleWhileFetching!==void 0?E.__staleWhileFetching:E.__returned=E}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet}={}){let s=this.keyMap.get(e);if(s!==void 0){let c=this.valList[s],l=this.isBackgroundFetch(c);return this.isStale(s)?l?r?c.__staleWhileFetching:void 0:(o||this.delete(e),r?c:void 0):l?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),c)}}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return FAr("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let o=this.valList[n];this.isBackgroundFetch(o)?o.__abortController.abort():(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort();else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return FAr("reset","clear"),this.clear}get length(){return Mka("length","size"),this.size}static get AbortController(){return Fft}static get AbortSignal(){return Zpi}};rhi.exports=v0e});var $Ar=T((s5f,nhi)=>{"use strict";f();var LPe=class extends Error{static{a(this,"FetchBaseError")}constructor(e,r,n){super(e),this.type=r,this._name=n}get name(){return this._name}get[Symbol.toStringTag](){return this._name}},HAr=class extends LPe{static{a(this,"FetchError")}constructor(e,r,n){super(e,r,"FetchError"),n&&(this.code=n.code,this.errno=n.errno,this.erroredSysCall=n.syscall)}},jAr=class extends LPe{static{a(this,"AbortError")}constructor(e,r="aborted"){super(e,r,"AbortError")}};nhi.exports={FetchBaseError:LPe,FetchError:HAr,AbortError:jAr}});var q3=T((l5f,ohi)=>{"use strict";f();var{constants:{MAX_LENGTH:Oka}}=require("buffer"),{pipeline:Qft,PassThrough:Bka}=require("stream"),{promisify:Lka}=require("util"),{createGunzip:Fka,createInflate:Uka,createBrotliDecompress:Qka,constants:{Z_SYNC_FLUSH:ihi}}=require("zlib"),qka=Sx()("helix-fetch:utils"),Gka=Lka(Qft),Hka=a((t,e)=>t===204||t===304||+e["content-length"]==0?!1:/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(e["content-encoding"]),"canDecode"),jka=a((t,e,r,n)=>{if(!Hka(t,e))return r;let o=a(s=>{s&&(qka(`encountered error while decoding stream: ${s}`),n(s))},"cb");switch(e["content-encoding"].trim()){case"gzip":case"x-gzip":return Qft(r,Fka({flush:ihi,finishFlush:ihi}),o);case"deflate":case"x-deflate":return Qft(r,Uka(),o);case"br":return Qft(r,Qka(),o);default:return r}},"decodeStream"),$ka=a(t=>{if(!t||typeof t!="object"||Object.prototype.toString.call(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},"isPlainObject"),qft=a((t,e)=>{if(Buffer.isBuffer(t))return t.length;switch(typeof t){case"string":return t.length*2;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(t)?Symbol.keyFor(t).length*2:(t.toString().length-8)*2;case"object":return Array.isArray(t)?Vka(t,e):Wka(t,e);default:return 0}},"calcSize"),Vka=a((t,e)=>(e.add(t),t.map(r=>e.has(r)?0:qft(r,e)).reduce((r,n)=>r+n,0)),"calcArraySize"),Wka=a((t,e)=>{if(t==null)return 0;e.add(t);let r=0,n=[];for(let o in t)n.push(o);return n.push(...Object.getOwnPropertySymbols(t)),n.forEach(o=>{if(r+=qft(o,e),typeof t[o]=="object"&&t[o]!==null){if(e.has(t[o]))return;e.add(t[o])}r+=qft(t[o],e)}),r},"calcObjectSize"),zka=a(t=>qft(t,new WeakSet),"sizeof"),Yka=a(async t=>{let e=new Bka,r=0,n=[];return e.on("data",o=>{if(r+o.length>Oka)throw new Error("Buffer.constants.MAX_SIZE exceeded");n.push(o),r+=o.length}),await Gka(t,e),Buffer.concat(n,r)},"streamToBuffer");ohi.exports={decodeStream:jka,isPlainObject:$ka,sizeof:zka,streamToBuffer:Yka}});var Hft=T((f5f,lhi)=>{"use strict";f();var{PassThrough:shi,Readable:G3}=require("stream"),{types:{isAnyArrayBuffer:chi}}=require("util"),{FetchError:Kka,FetchBaseError:Jka}=$Ar(),{streamToBuffer:Xka}=q3(),Zka=Buffer.alloc(0),II=Symbol("Body internals"),eNa=a(t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),"toArrayBuffer"),ahi=a(async t=>{if(t[II].disturbed)throw new TypeError("Already read");if(t[II].error)throw new TypeError(`Stream had error: ${t[II].error.message}`);t[II].disturbed=!0;let{stream:e}=t[II];return e===null?Zka:Xka(e)},"consume"),Gft=class{static{a(this,"Body")}constructor(e){let r;e==null?r=null:e instanceof URLSearchParams?r=G3.from(e.toString()):e instanceof G3?r=e:Buffer.isBuffer(e)?r=G3.from(e):chi(e)?r=G3.from(Buffer.from(e)):typeof e=="string"||e instanceof String?r=G3.from(e):r=G3.from(String(e)),this[II]={stream:r,disturbed:!1,error:null},e instanceof G3&&r.on("error",n=>{let o=n instanceof Jka?n:new Kka(`Invalid response body while trying to fetch ${this.url}: ${n.message}`,"system",n);this[II].error=o})}get body(){return this[II].stream}get bodyUsed(){return this[II].disturbed}async buffer(){return ahi(this)}async arrayBuffer(){return eNa(await this.buffer())}async text(){return(await ahi(this)).toString()}async json(){return JSON.parse(await this.text())}};Object.defineProperties(Gft.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var tNa=a(t=>{if(t[II].disturbed)throw new TypeError("Cannot clone: already read");let{stream:e}=t[II],r=e;if(e instanceof G3){r=new shi;let n=new shi;e.pipe(r),e.pipe(n),t[II].stream=n}return r},"cloneStream"),rNa=a(t=>t===null?null:typeof t=="string"?"text/plain; charset=utf-8":t instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(t)||chi(t)||t instanceof G3?null:"text/plain; charset=utf-8","guessContentType");lhi.exports={Body:Gft,cloneStream:tNa,guessContentType:rNa}});var b0e=T((m5f,phi)=>{"use strict";f();var{validateHeaderName:uhi,validateHeaderValue:dhi}=require("http"),{isPlainObject:nNa}=q3(),H3=Symbol("Headers internals"),FPe=a(t=>{let e=typeof t!="string"?String(t):t;if(typeof uhi=="function")uhi(e);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let r=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),r}return e.toLowerCase()},"normalizeName"),fhi=a((t,e)=>{let r=typeof t!="string"?String(t):t;if(typeof dhi=="function")dhi(e,r);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){let n=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}return r},"normalizeValue"),jft=class t{static{a(this,"Headers")}constructor(e={}){if(this[H3]={map:new Map},e instanceof t)e.forEach((r,n)=>{this.append(n,r)});else if(Array.isArray(e))e.forEach(([r,n])=>{this.append(r,n)});else if(nNa(e))for(let[r,n]of Object.entries(e))this.append(r,n)}set(e,r){this[H3].map.set(FPe(e),fhi(r,e))}has(e){return this[H3].map.has(FPe(e))}get(e){let r=this[H3].map.get(FPe(e));return r===void 0?null:r}append(e,r){let n=FPe(e),o=fhi(r,e),s=this[H3].map.get(n);this[H3].map.set(n,s?`${s}, ${o}`:o)}delete(e){this[H3].map.delete(FPe(e))}forEach(e,r){for(let n of this.keys())e.call(r,this.get(n),n)}keys(){return Array.from(this[H3].map.keys()).sort()}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[H3].map)}};Object.defineProperties(jft.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));phi.exports={Headers:jft}});var VAr=T((y5f,hhi)=>{"use strict";f();var{EventEmitter:iNa}=require("events"),b2=Symbol("AbortSignal internals"),T0e=class{static{a(this,"AbortSignal")}constructor(){this[b2]={eventEmitter:new iNa,onabort:null,aborted:!1}}get aborted(){return this[b2].aborted}get onabort(){return this[b2].onabort}set onabort(e){this[b2].onabort=e}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(e,r){this[b2].eventEmitter.removeListener(e,r)}addEventListener(e,r){this[b2].eventEmitter.on(e,r)}dispatchEvent(e){let r={type:e,target:this},n=`on${e}`;typeof this[b2][n]=="function"&&this[n](r),this[b2].eventEmitter.emit(e,r)}fire(){this[b2].aborted=!0,this.dispatchEvent("abort")}};Object.defineProperties(T0e.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});var Vft=class extends T0e{static{a(this,"TimeoutSignal")}constructor(e){if(!Number.isInteger(e))throw new TypeError(`Expected an integer, got ${typeof e}`);super(),this[b2].timerId=setTimeout(()=>{this.fire()},e)}clear(){clearTimeout(this[b2].timerId)}};Object.defineProperties(Vft.prototype,{clear:{enumerable:!0}});var $ft=Symbol("AbortController internals"),Wft=class{static{a(this,"AbortController")}constructor(){this[$ft]={signal:new T0e}}get signal(){return this[$ft].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[$ft].signal.aborted||this[$ft].signal.fire()}};Object.defineProperties(Wft.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});hhi.exports={AbortController:Wft,AbortSignal:T0e,TimeoutSignal:Vft}});var UPe=T((_5f,Ahi)=>{"use strict";f();var{randomBytes:oNa}=require("crypto"),{Readable:sNa}=require("stream"),zAr=a(t=>typeof t=="object"&&["arrayBuffer","stream","text","slice","constructor"].map(e=>typeof t[e]).filter(e=>e!=="function").length===0&&typeof t.type=="string"&&typeof t.size=="number"&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),"isBlob"),aNa=a(t=>t!=null&&typeof t=="object"&&["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map(e=>typeof t[e]).filter(e=>e!=="function").length===0&&t[Symbol.toStringTag]==="FormData","isFormData"),mhi=a(t=>`--${t}--\r + `,u=[],d=null,p=!0;for(;p;){let m=await Ude(t,e,r,n,l,o,{owner:s,name:c,first:100,after:d},"github-graphql-assignable-users");if(!m?.data?.repository?.assignableUsers)break;let g=m.data.repository.assignableUsers;u.push(...g.nodes),p=g.pageInfo.hasNextPage,d=g.pageInfo.endCursor}return u}a(SSa,"getAssignableActorsWithAssignableUsers")});var _ui=T(cI=>{"use strict";f();Object.defineProperty(cI,"__esModule",{value:!0});cI.BaseOctoKitService=cI.PermissiveAuthRequiredError=cI.VSCodeTeamId=cI.IOctoKitService=cI.IGithubRepositoryService=void 0;var Eui=qr(),yui=lU(),n3=Aui();cI.IGithubRepositoryService=(0,Eui.createServiceIdentifier)("IGithubRepositoryService");cI.IOctoKitService=(0,Eui.createServiceIdentifier)("IOctoKitService");cI.VSCodeTeamId=1682102;var Dmr=class extends Error{static{a(this,"PermissiveAuthRequiredError")}constructor(){super("Permissive authentication is required"),this.name="PermissiveAuthRequiredError"}};cI.PermissiveAuthRequiredError=Dmr;var Nmr=class t{static{a(this,"BaseOctoKitService")}static{this._outageStatusCacheTTL=300*1e3}constructor(e,r,n,o){this._capiClientService=e,this._fetcherService=r,this._logService=n,this._telemetryService=o}async getCurrentAuthedUserWithToken(e){return this._makeGHAPIRequest("user","GET",e,void 0,void 0,"github-rest-get-user")}async getGitHubOutageStatus(){let e=Date.now();if(this._cachedOutageStatus&&e-this._cachedOutageStatus.timestampl.headRefName===n)}async addPullRequestCommentWithToken(e,r,n){return(0,n3.addPullRequestCommentGraphQLRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,n,e,r)}async getPullRequestFromSessionWithToken(e,r){return(0,n3.getPullRequestFromGlobalId)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,r,e)}async getPullRequestFilesWithToken(e,r,n,o){return await(0,n3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,`repos/${e}/${r}/pulls/${n}/files`,"GET",o,{version:"2022-11-28",callSite:"github-rest-get-pr-files"})||[]}async closePullRequestWithToken(e,r,n,o){return(0,n3.closePullRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,o,e,r,n)}async getFileContentWithToken(e,r,n,o,s){let c=`repos/${e}/${r}/contents/${o}?ref=${encodeURIComponent(n)}`,l=await(0,n3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,c,"GET",s,{callSite:"github-rest-get-file-content"});if(!l||Array.isArray(l))throw new Error("Unable to fetch file content");let u=l;if(u.content&&u.encoding==="base64")return(0,yui.decodeBase64)(u.content.replace(/\n/g,"")).toString();if(u.sha){let d=await this.getBlobContentWithToken(e,r,u.sha,s);if(d)return d}return this._logService.error(`Failed to get file content for ${e}/${r}/${o} at ref ${n}`),""}async getUserOrganizationsWithToken(e,r=100){let n=await this._makeGHAPIRequest(`user/orgs?per_page=${r}`,"GET",e,void 0,void 0,"github-rest-get-user-orgs");return!n||!Array.isArray(n)?[]:n.map(o=>o.login)}async isUserMemberOfOrgWithToken(e,r){try{let n=await this._makeGHAPIRequest(`user/memberships/orgs/${encodeURIComponent(e)}`,"GET",r,void 0,void 0,"github-rest-check-org-membership");return n&&(n.state==="active"||n.state==="pending")}catch{return!1}}async getOrganizationRepositoriesWithToken(e,r,n=100){let o=await this._makeGHAPIRequest(`orgs/${e}/repos?per_page=${n}&sort=updated`,"GET",r,void 0,{silent404:!0},"github-rest-get-org-repos");return!o||!Array.isArray(o)||o.length===0?[]:o.map(s=>s.name)}async getUserRepositoriesWithToken(e,r){if(r&&r.trim())return this.searchUserRepositoriesWithToken(e,r.trim());let n=await this._makeGHAPIRequest("user/repos?per_page=100&sort=updated&affiliation=owner,collaborator,organization_member","GET",e,void 0,void 0,"github-rest-get-user-repos");return!n||!Array.isArray(n)?[]:n.filter(s=>s.permissions?.push).map(s=>({owner:s.owner.login,name:s.name}))||[]}async searchUserRepositoriesWithToken(e,r){let n=encodeURIComponent(`${r} in:name fork:true`),o=await this._makeGHAPIRequest(`search/repositories?q=${n}&sort=updated&per_page=100`,"GET",e,void 0,void 0,"github-rest-search-repos");return!o||!o.items||!Array.isArray(o.items)?[]:o.items.filter(c=>c.permissions?.push).map(c=>({owner:c.owner.login,name:c.name}))||[]}async getRecentlyCommittedReposWithToken(e){let r=await this._makeGHAPIRequest("user","GET",e,void 0,void 0,"github-rest-get-user");if(!r||!r.login)return[];let n=await this._makeGHAPIRequest(`users/${r.login}/events?per_page=100`,"GET",e,void 0,void 0,"github-rest-get-user-events");if(!n||!Array.isArray(n))return[];let o=new Map;for(let c of n)if(c.type==="PushEvent"&&c.repo?.name){let[l,u]=c.repo.name.split("/");l&&u&&!o.has(c.repo.name)&&o.set(c.repo.name,{owner:l,name:u})}return Array.from(o.values())||[]}async getBlobContentWithToken(e,r,n,o){let s=`repos/${e}/${r}/git/blobs/${n}`,c=await(0,n3.makeGitHubAPIRequest)(this._fetcherService,this._logService,this._telemetryService,this._capiClientService.dotcomAPIURL,s,"GET",o,{version:"2022-11-28",callSite:"github-rest-get-blob"});if(!c||Array.isArray(c))return;let l=c;if(l.content&&l.encoding==="base64")return(0,yui.decodeBase64)(l.content.replace(/\n/g,"")).toString()}};cI.BaseOctoKitService=Nmr});var Cui=T(Ult=>{"use strict";f();Object.defineProperty(Ult,"__esModule",{value:!0});Ult.NullBaseOctoKitService=void 0;var ISa=_ui(),Mmr=class extends ISa.BaseOctoKitService{static{a(this,"NullBaseOctoKitService")}async getGitHubOutageStatus(){return 0}async getCurrentAuthedUserWithToken(e){return{avatar_url:"",login:"NullUser",name:"Null User"}}async _makeGHAPIRequest(e,r,n,o,s,c){}};Ult.NullBaseOctoKitService=Mmr});var Sui=T(wc=>{"use strict";f();var Vlt=wc&&wc.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Cl=wc&&wc.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(wc,"__esModule",{value:!0});wc.CopilotTokenManagerFromGitHubToken=wc.CopilotTokenManagerFromDeviceId=wc.RefreshableCopilotTokenManager=wc.StaticExtendedTokenInfoCopilotTokenManager=wc.FixedCopilotTokenManager=wc.BaseCopilotTokenManager=wc.tokenErrorString=void 0;wc.createStaticGitHubTokenProvider=wSa;wc.getOrCreateTestingCopilotTokenManager=RSa;var Omr=(Bue(),Aa(Oue)),xSa=Xa(),vui=ro(),Qlt=rXe(),Tui=ac(),Wlt=$y(),zlt=oQ(),qde=Ww(),Ylt=Cui(),Klt=D0(),PRe=zm(),Jlt=bp(),bui=pde(),i3=Frt(),qlt=lIe();wc.tokenErrorString='Tests: either GITHUB_PAT, GITHUB_OAUTH_TOKEN, or GITHUB_OAUTH_TOKEN+VSCODE_COPILOT_CHAT_TOKEN must be set unless running from an IS_SCENARIO_AUTOMATION environment. Run "npm run get_token" to get credentials.';function wSa(){let t=process.env.GITHUB_PAT,e=process.env.GITHUB_OAUTH_TOKEN;if(!(qde.isScenarioAutomation&&!t&&!e))return()=>{if(t)return t;if(e)return e;throw new Error(wc.tokenErrorString)}}a(wSa,"createStaticGitHubTokenProvider");function RSa(t){if(process.env.VSCODE_COPILOT_CHAT_TOKEN)return new Qlt.SyncDescriptor(Hlt,[process.env.VSCODE_COPILOT_CHAT_TOKEN]);if(process.env.GITHUB_OAUTH_TOKEN)return new Qlt.SyncDescriptor($lt,[process.env.GITHUB_OAUTH_TOKEN,"unknown"]);if(process.env.GITHUB_PAT)return new Qlt.SyncDescriptor(Glt,[process.env.GITHUB_PAT]);if(qde.isScenarioAutomation)return new Qlt.SyncDescriptor(jlt,[t]);throw new Error(wc.tokenErrorString)}a(RSa,"getOrCreateTestingCopilotTokenManager");var Qde=class extends vui.Disposable{static{a(this,"BaseCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(),this._baseOctokitservice=e,this._logService=r,this._telemetryService=n,this._domainService=o,this._capiClientService=s,this._fetcherService=c,this._envService=l,this._isDisposed=!1,this._copilotTokenRefreshEmitter=this._register(new xSa.Emitter),this.onDidCopilotTokenRefresh=this._copilotTokenRefreshEmitter.event,this._register((0,vui.toDisposable)(()=>this._isDisposed=!0))}get copilotToken(){return this._copilotToken}set copilotToken(e){e!==this._copilotToken&&(this._copilotToken=e,this._copilotTokenRefreshEmitter.fire())}resetCopilotToken(e){e!==void 0&&this._telemetryService.sendGHTelemetryEvent("auth.reset_token_"+e),this._logService.debug(`Resetting copilot token on HTTP error ${e||"unknown"}`),this.copilotToken=void 0}async authFromGitHubToken(e,r){return this.doAuthFromGitHubTokenOrDevDeviceId({githubToken:e,ghUsername:r})}async authFromDevDeviceId(e){return this.doAuthFromGitHubTokenOrDevDeviceId({devDeviceId:e})}async doAuthFromGitHubTokenOrDevDeviceId(e){this._telemetryService.sendGHTelemetryEvent("auth.new_login");let r,n,o;try{"githubToken"in e?(o=e.ghUsername,[r,n]=await Promise.all([this.fetchCopilotTokenFromGitHubToken(e.githubToken),this.fetchCopilotUserInfo(e.githubToken)])):r=await this.fetchCopilotTokenFromDevDeviceId(e.devDeviceId)}catch(p){return this._logService.warn("Failed to get copilot token due to fetch throwing: "+(p.message||String(p))),{kind:"failure",reason:"RequestFailed",message:p.message||String(p)}}if(!r.ok){this._logService.warn(`Failed to get copilot token due to status ${r.status} ${r.statusText}`);let p=bui.TelemetryData.createAndMarkAsIssued({status:r.status.toString(),status_text:r.statusText});if(this._telemetryService.sendGHTelemetryErrorEvent("auth.invalid_token",p.properties,p.measurements),r.status===401)return this._logService.warn("Failed to get copilot token due to 401 status"),this._telemetryService.sendGHTelemetryErrorEvent("auth.unknown_401"),{kind:"failure",reason:"HTTP401"}}if(r.kind==="error-envelope")return this._logService.warn(`Failed to get copilot token due to: ${r.body.error_details.message}`),this._telemetryService.sendGHTelemetryErrorEvent("auth.request_read_failed"),{kind:"failure",reason:"NotAuthorized",...r.body.error_details};if(r.kind==="error")return r.body.message?.startsWith("API rate limit exceeded")?(this._logService.warn("Failed to get copilot token due to exceeding API rate limit"),this._telemetryService.sendGHTelemetryErrorEvent("auth.rate_limited"),{kind:"failure",reason:"RateLimited"}):(this._logService.warn(`Failed to get copilot token due to: ${r.body.message}`),{kind:"failure",reason:"NotAuthorized"});if(r.kind==="parse-failed")return this._logService.warn(`Failed to get copilot token due to: ${r.parseError}`),this._telemetryService.sendGHTelemetryErrorEvent("auth.request_read_failed"),{kind:"failure",reason:"ParseFailed",message:r.parseError};let s=r.body,c=s.expires_at;s.expires_at=(0,qlt.nowSeconds)()+s.refresh_in+60;let l=o??"unknown",u={...s,copilot_plan:n?.copilot_plan??s.sku??"",quota_snapshots:n?.quota_snapshots,quota_reset_date:n?.quota_reset_date,codex_agent_enabled:n?.codex_agent_enabled,organization_login_list:n?.organization_login_list??[],username:l,isVscodeTeamMember:(0,i3.containsVSCodeOrg)(s.organization_list??[])},d=bui.TelemetryData.createAndMarkAsIssued({},{adjusted_expires_at:s.expires_at,expires_at:c,current_time:(0,qlt.nowSeconds)()});return this._telemetryService.sendGHTelemetryEvent("auth.new_token",d.properties,d.measurements),{kind:"success",...u}}async fetchCopilotTokenFromGitHubToken(e){let r={callSite:"copilot-token-github",headers:{Authorization:`token ${e}`,"X-GitHub-Api-Version":"2025-04-01"},retryFallbacks:!0,expectJSON:!0},n=await this._capiClientService.makeRequest(r,{type:Omr.RequestType.CopilotToken});return this.parseTokenResponse(n)}async fetchCopilotTokenFromDevDeviceId(e){let r={callSite:"copilot-token-device",headers:{"X-GitHub-Api-Version":"2025-04-01","Editor-Device-Id":`${e}`},retryFallbacks:!0,expectJSON:!0},n=await this._capiClientService.makeRequest(r,{type:Omr.RequestType.CopilotNLToken});return this.parseTokenResponse(n)}async parseTokenResponse(e){let r={ok:e.ok,status:e.status,statusText:e.statusText},n;try{n=await(0,PRe.jsonVerboseError)(e)}catch(s){return{...r,body:void 0,kind:"parse-failed",parseError:s.message||String(s)}}let o=(0,i3.validateTokenEnvelope)(n);return o.valid?(this.sendTokenValidationTelemetry(o),{...r,body:o.envelope,kind:"token"}):(0,i3.isErrorEnvelope)(n)?{...r,body:n,kind:"error-envelope"}:(0,i3.isStandardErrorEnvelope)(n)?{...r,body:n,kind:"error"}:(this.sendTokenValidationTelemetry(o),{...r,body:void 0,kind:"parse-failed",parseError:"Response is not valid: "+JSON.stringify(n)})}sendTokenValidationTelemetry(e){e.strategy!=="strict"&&this._telemetryService.sendMSFTTelemetryEvent("copilotTokenFetching.validation",{strategy:e.strategy,strictError:e.strictError,fallbackError:e.fallbackError})}async fetchCopilotUserInfo(e){let r={callSite:"copilot-token-user-info",headers:{Authorization:`token ${e}`,"X-GitHub-Api-Version":"2025-04-01"},retryFallbacks:!0,expectJSON:!0};return await(await this._capiClientService.makeRequest(r,{type:Omr.RequestType.CopilotUserInfo})).json()}};wc.BaseCopilotTokenManager=Qde;var Glt=class extends Qde{static{a(this,"FixedCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(new Ylt.NullBaseOctoKitService(o,c,r,n),r,n,s,o,c,l),this._completionsToken=e,this.copilotToken=(0,i3.createTestExtendedTokenInfo)({token:e,username:"fixedTokenManager",copilot_plan:"unknown"})}set completionsToken(e){this._completionsToken=e,this.copilotToken=(0,i3.createTestExtendedTokenInfo)({token:e,username:"fixedTokenManager",copilot_plan:"unknown"})}get completionsToken(){return this._completionsToken}async getCopilotToken(){return new i3.CopilotToken(this.copilotToken)}async checkCopilotToken(){return{status:"OK"}}};wc.FixedCopilotTokenManager=Glt;wc.FixedCopilotTokenManager=Glt=Vlt([Cl(1,Klt.ILogService),Cl(2,Jlt.ITelemetryService),Cl(3,Wlt.ICAPIClientService),Cl(4,zlt.IDomainService),Cl(5,PRe.IFetcherService),Cl(6,qde.IEnvService)],Glt);var Hlt=class extends Qde{static{a(this,"StaticExtendedTokenInfoCopilotTokenManager")}constructor(e,r,n,o,s,c,l){super(new Ylt.NullBaseOctoKitService(o,c,r,n),r,n,s,o,c,l);let u=Buffer.from(e,"base64").toString("utf8");this._initialToken=JSON.parse(u)}async getCopilotToken(){return this.copilotToken||(this.copilotToken={...this._initialToken}),new i3.CopilotToken(this._initialToken)}async checkCopilotToken(){return{status:"OK"}}};wc.StaticExtendedTokenInfoCopilotTokenManager=Hlt;wc.StaticExtendedTokenInfoCopilotTokenManager=Hlt=Vlt([Cl(1,Klt.ILogService),Cl(2,Jlt.ITelemetryService),Cl(3,Wlt.ICAPIClientService),Cl(4,zlt.IDomainService),Cl(5,PRe.IFetcherService),Cl(6,qde.IEnvService)],Hlt);var RRe=class extends Qde{static{a(this,"RefreshableCopilotTokenManager")}async getCopilotToken(e){if(!this.copilotToken||this.copilotToken.expires_at<(0,qlt.nowSeconds)()+300||e){let r=await this.authenticateAndGetToken();if(r.kind==="failure")throw Error(`Failed to get copilot token: ${r.reason.toString()} ${r.message??""}`);this.copilotToken={...r}}return new i3.CopilotToken(this.copilotToken)}async checkCopilotToken(){if(!this.copilotToken||this.copilotToken.expires_at<(0,qlt.nowSeconds)()){let r=await this.authenticateAndGetToken();if(r.kind==="failure")return r;this.copilotToken={...r}}return{status:"OK"}}};wc.RefreshableCopilotTokenManager=RRe;var jlt=class extends RRe{static{a(this,"CopilotTokenManagerFromDeviceId")}constructor(e,r,n,o,s,c,l,u){super(new Ylt.NullBaseOctoKitService(s,c,r,n),r,n,o,s,c,l),this.deviceId=e,this.configurationService=u}async authenticateAndGetToken(){return this.authFromDevDeviceId(this.deviceId)}};wc.CopilotTokenManagerFromDeviceId=jlt;wc.CopilotTokenManagerFromDeviceId=jlt=Vlt([Cl(1,Klt.ILogService),Cl(2,Jlt.ITelemetryService),Cl(3,zlt.IDomainService),Cl(4,Wlt.ICAPIClientService),Cl(5,PRe.IFetcherService),Cl(6,qde.IEnvService),Cl(7,Tui.IConfigurationService)],jlt);var $lt=class extends RRe{static{a(this,"CopilotTokenManagerFromGitHubToken")}constructor(e,r,n,o,s,c,l,u,d){super(new Ylt.NullBaseOctoKitService(c,l,n,o),n,o,s,c,l,u),this.githubToken=e,this.githubUsername=r,this.configurationService=d}async authenticateAndGetToken(){return this.authFromGitHubToken(this.githubToken,this.githubUsername)}};wc.CopilotTokenManagerFromGitHubToken=$lt;wc.CopilotTokenManagerFromGitHubToken=$lt=Vlt([Cl(2,Klt.ILogService),Cl(3,Jlt.ITelemetryService),Cl(4,zlt.IDomainService),Cl(5,Wlt.ICAPIClientService),Cl(6,PRe.IFetcherService),Cl(7,qde.IEnvService),Cl(8,Tui.IConfigurationService)],$lt)});var Iui=T(o3=>{"use strict";f();var PSa=o3&&o3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},kSa=o3&&o3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(o3,"__esModule",{value:!0});o3.ChatQuotaService=void 0;var DSa=ro(),NSa=cA(),Bmr=class extends DSa.Disposable{static{a(this,"ChatQuotaService")}constructor(e){super(),this._authService=e,this._register(this._authService.onDidAuthenticationChange(()=>{this.processUserInfoQuotaSnapshot(this._authService.copilotToken?.quotaInfo)}))}get quotaExhausted(){return this._quotaInfo?this._quotaInfo.used>=this._quotaInfo.quota&&!this._quotaInfo.overageEnabled&&!this._quotaInfo.unlimited:!1}get overagesEnabled(){return this._quotaInfo?this._quotaInfo.overageEnabled:!1}clearQuota(){this._quotaInfo=void 0}processQuotaHeaders(e){let r=this._authService.copilotToken?.isFreeUser?e.get("x-quota-snapshot-chat"):e.get("x-quota-snapshot-premium_models")||e.get("x-quota-snapshot-premium_interactions");if(r)try{let n=new URLSearchParams(r),o=parseInt(n.get("ent")||"0",10),s=parseFloat(n.get("ov")||"0.0"),c=n.get("ovPerm")==="true",l=parseFloat(n.get("rem")||"0.0"),u=n.get("rst"),d;u?d=new Date(u):(d=new Date,d.setMonth(d.getMonth()+1));let p=Math.max(0,o*(1-l/100));this._quotaInfo={quota:o,unlimited:o===-1,used:p,overageUsed:s,overageEnabled:c,resetDate:d}}catch(n){console.error("Failed to parse quota header",n)}}processQuotaSnapshots(e){let r=this._authService.copilotToken?.isFreeUser?e.chat:e.premium_models??e.premium_interactions;if(r)try{let n=parseInt(r.entitlement,10),o=r.reset_date?new Date(r.reset_date):(()=>{let c=new Date;return c.setMonth(c.getMonth()+1),c})(),s=Math.max(0,n*(1-r.percent_remaining/100));this._quotaInfo={quota:n,unlimited:n===-1,used:s,overageUsed:r.overage_count,overageEnabled:r.overage_permitted,resetDate:o}}catch(n){console.error("Failed to process quota snapshots",n)}}processUserInfoQuotaSnapshot(e){!e||!e.quota_snapshots||!e.quota_reset_date||(this._quotaInfo={unlimited:e.quota_snapshots.premium_interactions.unlimited,overageEnabled:e.quota_snapshots.premium_interactions.overage_permitted,overageUsed:e.quota_snapshots.premium_interactions.overage_count,quota:e.quota_snapshots.premium_interactions.entitlement,resetDate:new Date(e.quota_reset_date),used:Math.max(0,e.quota_snapshots.premium_interactions.entitlement*(1-e.quota_snapshots.premium_interactions.percent_remaining/100))})}};o3.ChatQuotaService=Bmr;o3.ChatQuotaService=Bmr=PSa([kSa(0,NSa.IAuthenticationService)],Bmr)});var wui=T(Xlt=>{"use strict";f();Object.defineProperty(Xlt,"__esModule",{value:!0});Xlt.DefaultsOnlyConfigurationService=void 0;var xui=ac(),Lmr=class extends xui.AbstractConfigurationService{static{a(this,"DefaultsOnlyConfigurationService")}getConfig(e){return this.getDefaultValue(e)}inspectConfig(e,r){return{defaultValue:this.getDefaultValue(e)}}setConfig(){return Promise.resolve()}getNonExtensionConfig(e){}getExperimentBasedConfig(e,r,n){if(e.experimentName){let c=r.getTreatmentVariable(e.experimentName);if(c!==void 0)return c}let o=r.getTreatmentVariable(`copilotchat.config.${e.id}`);if(o!==void 0)return o;let s=r.getTreatmentVariable(`config.${e.fullyQualifiedId}`);if(s!==void 0)return s;if(e.fullyQualifiedOldId){let c=r.getTreatmentVariable(`copilotchat.config.${e.oldId}`);if(c!==void 0)return c;let l=r.getTreatmentVariable(`config.${e.fullyQualifiedOldId}`);if(l!==void 0)return l}return this.getDefaultValue(e)}updateExperimentBasedConfiguration(e){e.length!==0&&this._onDidChangeConfiguration.fire({affectsConfiguration:a((r,n)=>{if(e.some(s=>s.startsWith(`config.${r}`)))return!0;let o=xui.globalConfigRegistry.configs.get(r)?.fullyQualifiedOldId;return!!(o&&e.some(s=>s.startsWith(`config.${o}`)))},"affectsConfiguration")})}dumpConfig(){return{}}};Xlt.DefaultsOnlyConfigurationService=Lmr});var Pui=T(Zlt=>{"use strict";f();Object.defineProperty(Zlt,"__esModule",{value:!0});Zlt.computeDiff=OSa;Zlt.computeDiffSync=Rui;var MSa=Yfr();async function OSa(t,e,r){return Rui(t,e,r)}a(OSa,"computeDiff");function Rui(t,e,r){let n=t.split(/\r\n|\r|\n/),o=e.split(/\r\n|\r|\n/),c=new MSa.DefaultLinesDiffComputer().computeDiff(n,o,r),l=c.changes.length>0?!1:t===e;function u(d){return d.map(p=>[p.original.startLineNumber,p.original.endLineNumberExclusive,p.modified.startLineNumber,p.modified.endLineNumberExclusive,p.innerChanges?.map(h=>[h.originalRange.startLineNumber,h.originalRange.startColumn,h.originalRange.endLineNumber,h.originalRange.endColumn,h.modifiedRange.startLineNumber,h.modifiedRange.startColumn,h.modifiedRange.endLineNumber,h.modifiedRange.endColumn])])}return a(u,"getLineChanges"),{identical:l,quitEarly:c.hitTimeout,changes:u(c.changes),moves:c.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,u(d.changes)])}}a(Rui,"computeDiffSync")});var Mui=T(e2=>{"use strict";f();var BSa=e2&&e2.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LSa=e2&&e2.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Nui=e2&&e2.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o{let r=HSa([kui.join(__dirname,"diffWorker.js"),kui.join(__dirname,"../../../../dist/diffWorker.js")]);if(r===void 0)throw new Error("DiffServiceImpl: worker file not found");return new FSa.WorkerWithRpcProxy(r,{name:"Diff worker"})})}dispose(){this._worker.rawValue?.terminate()}async computeDiff(e,r,n){let o=this._useWorker?await this._worker.value.proxy.computeDiff(e,r,n):await GSa.computeDiff(e,r,n);return{identical:o.identical,quitEarly:o.quitEarly,changes:Qmr(o.changes),moves:o.moves.map(c=>new qSa.MovedText(new Fmr.LineRangeMapping(new eut.LineRange(c[0],c[1]),new eut.LineRange(c[2],c[3])),Qmr(c[4])))}}};e2.DiffServiceImpl=Umr;function Qmr(t){return t.map(e=>new Fmr.DetailedLineRangeMapping(new eut.LineRange(e[0],e[1]),new eut.LineRange(e[2],e[3]),e[4]?.map(r=>new Fmr.RangeMapping(new Dui.Range(r[0],r[1],r[2],r[3]),new Dui.Range(r[4],r[5],r[6],r[7])))))}a(Qmr,"toLineRangeMappings");function HSa(t){for(let e of t)if((0,QSa.existsSync)(e))return e}a(HSa,"firstExistingPath")});var Bui=T(s3=>{"use strict";f();var jSa=s3&&s3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Oui=s3&&s3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(s3,"__esModule",{value:!0});s3.CAPIClientImpl=void 0;var $Sa=Ww(),VSa=zm(),WSa=$y(),qmr=class extends WSa.BaseCAPIClientService{static{a(this,"CAPIClientImpl")}constructor(e,r){super(process.env.HMAC_SECRET,process.env.VSCODE_COPILOT_INTEGRATION_ID,e,r)}};s3.CAPIClientImpl=qmr;s3.CAPIClientImpl=qmr=jSa([Oui(0,VSa.IFetcherService),Oui(1,$Sa.IEnvService)],qmr)});var Fui=T(a3=>{"use strict";f();var zSa=a3&&a3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Gmr=a3&&a3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(a3,"__esModule",{value:!0});a3.DomainService=void 0;var YSa=Xa(),KSa=ro(),JSa=c7(),Gde=ac(),XSa=$y(),Lui="github-enterprise.uri",Hmr=class extends KSa.Disposable{static{a(this,"DomainService")}constructor(e,r,n){super(),this._configurationService=e,this._tokenStore=r,this._capiClientService=n,this._onDidChangeDomains=this._register(new YSa.Emitter),this.onDidChangeDomains=this._onDidChangeDomains.event,this._register(this._configurationService.onDidChangeConfiguration(o=>this._onDidConfigChangeHandler(o))),this._processCopilotToken(this._tokenStore.copilotToken),this._register(this._tokenStore.onDidStoreUpdate(()=>this._processCopilotToken(this._tokenStore.copilotToken)))}_onDidConfigChangeHandler(e){(e.affectsConfiguration(`${Gde.CopilotConfigPrefix}.advanced`)||e.affectsConfiguration(Lui))&&this._processCAPIModuleChange(this._tokenStore.copilotToken)}_processCAPIModuleChange(e){let r=this._configurationService.getConfig(Gde.ConfigKey.Shared.DebugOverrideCAPIUrl);r&&r.endsWith("/")&&(r=r.slice(0,-1));let n=this._configurationService.getConfig(Gde.ConfigKey.Shared.DebugOverrideProxyUrl);n&&(n=n.replace(/\/$/,""));let o=this._configurationService.getConfig(Gde.ConfigKey.Shared.AuthProvider)===Gde.AuthProviderId.GitHubEnterprise?this._configurationService.getNonExtensionConfig(Lui):void 0,s={endpoints:{api:r||e?.endpoints?.api,proxy:n||e?.endpoints?.proxy,telemetry:e?.endpoints?.telemetry,"origin-tracker":e?.endpoints?.["origin-tracker"]},sku:e?.sku||"unknown"},c=this._capiClientService.updateDomains(s,o);(c.capiUrlChanged||c.proxyUrlChanged||c.telemetryUrlChanged||c.dotcomUrlChanged)&&this._onDidChangeDomains.fire({capiUrlChanged:c.capiUrlChanged,telemetryUrlChanged:c.telemetryUrlChanged,proxyUrlChanged:c.proxyUrlChanged,dotcomUrlChanged:c.dotcomUrlChanged})}_processCopilotToken(e){this._processCAPIModuleChange(e)}};a3.DomainService=Hmr;a3.DomainService=Hmr=zSa([Gmr(0,Gde.IConfigurationService),Gmr(1,JSa.ICopilotTokenStore),Gmr(2,XSa.ICAPIClientService)],Hmr)});var Uui=T(Hde=>{"use strict";f();Object.defineProperty(Hde,"__esModule",{value:!0});Hde.NullNativeEnvService=Hde.NullEnvService=void 0;var ZSa=Xa(),eIa=Eu(),tut=Ww(),tIa=XSe(),rut=class t extends tut.AbstractEnvService{static{a(this,"NullEnvService")}constructor(){super(...arguments),this.language="en"}static{this.Instance=new t}get extensionId(){return"test-extension-id"}get vscodeVersion(){return"test-version"}get isActive(){return!0}get onDidChangeWindowState(){return ZSa.Event.None}get sessionId(){return"test-session"}get machineId(){return"test-machine"}get devDeviceId(){return"test-dev-device"}get remoteName(){}get uiKind(){return"desktop"}get uriScheme(){return"code-null"}get appRoot(){return""}get shell(){return"zsh"}get OS(){return tut.OperatingSystem.Linux}getEditorInfo(){return new tut.NameAndVersion("simulation-tests-editor",tIa.packageJson.engines.vscode.match(/\d+\.\d+/)?.[0]??"1.89")}getEditorPluginInfo(){return new tut.NameAndVersion("simulation-tests-plugin","2")}openExternal(e){return Promise.resolve(!1)}};Hde.NullEnvService=rut;var jmr=class extends rut{static{a(this,"NullNativeEnvService")}get userHome(){return eIa.URI.file("/home/testuser")}};Hde.NullNativeEnvService=jmr});var $mr=T(nut=>{"use strict";f();Object.defineProperty(nut,"__esModule",{value:!0});nut.IGitExtensionService=void 0;var rIa=qr();nut.IGitExtensionService=(0,rIa.createServiceIdentifier)("IGitExtensionService")});var Qui=T(iut=>{"use strict";f();Object.defineProperty(iut,"__esModule",{value:!0});iut.NullGitExtensionService=void 0;var nIa=Xa(),Vmr=class{static{a(this,"NullGitExtensionService")}constructor(){this.onDidChange=nIa.Event.None,this.extensionAvailable=!1}getExtensionApi(){}};iut.NullGitExtensionService=Vmr});var qui=T(c3=>{"use strict";f();var iIa=c3&&c3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},oIa=c3&&c3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(c3,"__esModule",{value:!0});c3.ObservableGit=void 0;var sIa=ro(),TQ=kw(),aIa=$mr(),Wmr=class extends sIa.Disposable{static{a(this,"ObservableGit")}constructor(e){super(),this._gitExtensionService=e,this._gitApi=(0,TQ.observableFromEvent)(this,r=>this._gitExtensionService.onDidChange(r),()=>this._gitExtensionService.getExtensionApi()),this.branch=(0,TQ.observableValue)("branchName",void 0),this.init()}async init(){let e=await(0,TQ.waitForState)(this._gitApi);if(this._store.isDisposed)return;let r=(0,TQ.observableFromEvent)(this,n=>e.onDidOpenRepository(n),()=>e.repositories);await(0,TQ.waitForState)(r,n=>n.length>0,void 0),!this._store.isDisposed&&(0,TQ.mapObservableArrayCached)(this,r,(n,o)=>{let s=(0,TQ.observableFromEvent)(c=>n.state.onDidChange(c),()=>n.state.HEAD?.name);o.add((0,TQ.autorunWithStore)((c,l)=>{this.branch.set(s.read(c),void 0)}))},n=>n.rootUri.toString()).recomputeInitiallyAndOnChange(this._store)}};c3.ObservableGit=Wmr;c3.ObservableGit=Wmr=iIa([oIa(0,aIa.IGitExtensionService)],Wmr)});var aut=T(Rc=>{"use strict";f();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.lengthZero=void 0;Rc.lengthDiff=uIa;Rc.lengthIsZero=dIa;Rc.toLength=eJ;Rc.lengthToObj=fIa;Rc.lengthGetLineCount=pIa;Rc.lengthGetColumnCountIfZeroLineCount=hIa;Rc.lengthAdd=Hui;Rc.sumLengths=mIa;Rc.lengthEquals=gIa;Rc.lengthDiffNonNegative=AIa;Rc.lengthLessThan=yIa;Rc.lengthLessThanEqual=EIa;Rc.lengthGreaterThanEqual=_Ia;Rc.lengthToPosition=CIa;Rc.positionToLength=vIa;Rc.lengthsToRange=bIa;Rc.lengthOfRange=TIa;Rc.lengthCompare=SIa;Rc.lengthOfString=IIa;Rc.lengthOfStringObj=xIa;Rc.lengthHash=wIa;Rc.lengthMax=RIa;var Gui=m0(),cIa=qE(),lIa=ff(),sut=sae();function uIa(t,e,r,n){return t!==r?eJ(r-t,n):eJ(0,n-e)}a(uIa,"lengthDiff");Rc.lengthZero=0;function dIa(t){return t===0}a(dIa,"lengthIsZero");var vA=2**26;function eJ(t,e){return t*vA+e}a(eJ,"toLength");function fIa(t){let e=t,r=Math.floor(e/vA),n=e-r*vA;return new sut.TextLength(r,n)}a(fIa,"lengthToObj");function pIa(t){return Math.floor(t/vA)}a(pIa,"lengthGetLineCount");function hIa(t){return t}a(hIa,"lengthGetColumnCountIfZeroLineCount");function Hui(t,e){let r=t+e;return e>=vA&&(r=r-t%vA),r}a(Hui,"lengthAdd");function mIa(t,e){return t.reduce((r,n)=>Hui(r,e(n)),Rc.lengthZero)}a(mIa,"sumLengths");function gIa(t,e){return t===e}a(gIa,"lengthEquals");function AIa(t,e){let r=t,n=e;if(n-r<=0)return Rc.lengthZero;let s=Math.floor(r/vA),c=Math.floor(n/vA),l=n-c*vA;if(s===c){let u=r-s*vA;return eJ(0,l-u)}else return eJ(c-s,l)}a(AIa,"lengthDiffNonNegative");function yIa(t,e){return t=e}a(_Ia,"lengthGreaterThanEqual");function CIa(t){let e=t,r=Math.floor(e/vA),n=e-r*vA;return new cIa.Position(r+1,n+1)}a(CIa,"lengthToPosition");function vIa(t){return eJ(t.lineNumber-1,t.column-1)}a(vIa,"positionToLength");function bIa(t,e){let r=t,n=Math.floor(r/vA),o=r-n*vA,s=e,c=Math.floor(s/vA),l=s-c*vA;return new lIa.Range(n+1,o+1,c+1,l+1)}a(bIa,"lengthsToRange");function TIa(t){return t.startLineNumber===t.endLineNumber?new sut.TextLength(0,t.endColumn-t.startColumn):new sut.TextLength(t.endLineNumber-t.startLineNumber,t.endColumn-1)}a(TIa,"lengthOfRange");function SIa(t,e){return t-e}a(SIa,"lengthCompare");function IIa(t){let e=(0,Gui.splitLines)(t);return eJ(e.length-1,e[e.length-1].length)}a(IIa,"lengthOfString");function xIa(t){let e=(0,Gui.splitLines)(t);return new sut.TextLength(e.length-1,e[e.length-1].length)}a(xIa,"lengthOfStringObj");function wIa(t){return t}a(wIa,"lengthHash");function RIa(t,e){return t>e?t:e}a(RIa,"lengthMax")});var Kmr=T(cut=>{"use strict";f();Object.defineProperty(cut,"__esModule",{value:!0});cut.TextEditInfo=void 0;var zmr=aut(),Ymr=class{static{a(this,"TextEditInfo")}constructor(e,r,n){this.startOffset=e,this.endOffset=r,this.newLength=n}toString(){return`[${(0,zmr.lengthToObj)(this.startOffset)}...${(0,zmr.lengthToObj)(this.endOffset)}) -> ${(0,zmr.lengthToObj)(this.newLength)}`}};cut.TextEditInfo=Ymr});var $ui=T(Jmr=>{"use strict";f();Object.defineProperty(Jmr,"__esModule",{value:!0});Jmr.combineTextEditInfos=DIa;var PIa=Lc(),Mp=aut(),kIa=Kmr();function DIa(t,e){if(t.length===0)return e;if(e.length===0)return t;let r=new PIa.ArrayQueue(jui(t)),n=jui(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=r.dequeue();function s(d){if(d===void 0){let h=r.takeWhile(m=>!0)||[];return o&&h.unshift(o),h}let p=[];for(;o&&!(0,Mp.lengthIsZero)(d);){let[h,m]=o.splitAt(d);p.push(h),d=(0,Mp.lengthDiffNonNegative)(h.lengthAfter,d),o=m??r.dequeue()}return(0,Mp.lengthIsZero)(d)||p.push(new kRe(!1,d,d)),p}a(s,"nextS0ToS1MapWithS1LengthOf");let c=[];function l(d,p,h){if(c.length>0&&(0,Mp.lengthEquals)(c[c.length-1].endOffset,d)){let m=c[c.length-1];c[c.length-1]=new kIa.TextEditInfo(m.startOffset,p,(0,Mp.lengthAdd)(m.newLength,h))}else c.push({startOffset:d,endOffset:p,newLength:h})}a(l,"pushEdit");let u=Mp.lengthZero;for(let d of n){let p=s(d.lengthBefore);if(d.modified){let h=(0,Mp.sumLengths)(p,g=>g.lengthBefore),m=(0,Mp.lengthAdd)(u,h);l(u,m,d.lengthAfter),u=m}else for(let h of p){let m=u;u=(0,Mp.lengthAdd)(u,h.lengthBefore),h.modified&&l(m,u,h.lengthAfter)}}return c}a(DIa,"combineTextEditInfos");var kRe=class t{static{a(this,"LengthMapping")}constructor(e,r,n){this.modified=e,this.lengthBefore=r,this.lengthAfter=n}splitAt(e){let r=(0,Mp.lengthDiffNonNegative)(e,this.lengthAfter);return(0,Mp.lengthEquals)(r,Mp.lengthZero)?[this,void 0]:this.modified?[new t(this.modified,this.lengthBefore,e),new t(this.modified,Mp.lengthZero,r)]:[new t(this.modified,e,e),new t(this.modified,r,r)]}toString(){return`${this.modified?"M":"U"}:${(0,Mp.lengthToObj)(this.lengthBefore)} -> ${(0,Mp.lengthToObj)(this.lengthAfter)}`}};function jui(t){let e=[],r=Mp.lengthZero;for(let n of t){let o=(0,Mp.lengthDiffNonNegative)(r,n.startOffset);(0,Mp.lengthIsZero)(o)||e.push(new kRe(!1,o,o));let s=(0,Mp.lengthDiffNonNegative)(n.startOffset,n.endOffset);e.push(new kRe(!0,s,n.newLength)),r=n.endOffset}return e}a(jui,"toLengthMapping")});var Wui=T(jde=>{"use strict";f();Object.defineProperty(jde,"__esModule",{value:!0});jde.SingleTextEditLength=jde.TextLengthEdit=void 0;var NIa=ff(),Vui=sae(),MIa=$ui(),DRe=aut(),OIa=Kmr(),Xmr=class t{static{a(this,"TextLengthEdit")}static{this.empty=new t([])}static fromTextEdit(e){let r=e.replacements.map(n=>new NRe(n.range,Vui.TextLength.ofText(n.text)));return new t(r)}static _fromTextEditInfo(e){let r=e.map(n=>{let o=(0,DRe.lengthToObj)(n.newLength);return new NRe((0,DRe.lengthsToRange)(n.startOffset,n.endOffset),new Vui.TextLength(o.lineCount,o.columnCount))});return new t(r)}constructor(e){this.edits=e}_toTextEditInfo(){return this.edits.map(e=>new OIa.TextEditInfo((0,DRe.toLength)(e.range.startLineNumber-1,e.range.startColumn-1),(0,DRe.toLength)(e.range.endLineNumber-1,e.range.endColumn-1),(0,DRe.toLength)(e.newLength.lineCount,e.newLength.columnCount)))}compose(e){let r=this._toTextEditInfo(),n=e._toTextEditInfo(),o=(0,MIa.combineTextEditInfos)(r,n);return t._fromTextEditInfo(o)}getRange(){if(this.edits.length!==0)return NIa.Range.fromPositions(this.edits[0].range.getStartPosition(),this.edits.at(-1).range.getEndPosition())}toString(){return`[${this.edits.join(", ")}]`}};jde.TextLengthEdit=Xmr;var NRe=class{static{a(this,"SingleTextEditLength")}constructor(e,r){this.range=e,this.newLength=r}toString(){return`{ range: ${this.range}, newLength: ${this.newLength} }`}};jde.SingleTextEditLength=NRe});var zui=T($de=>{"use strict";f();Object.defineProperty($de,"__esModule",{value:!0});$de.DocumentHistory=$de.HistoryContext=void 0;var BIa=Hl(),LIa=jR(),Zmr=class{static{a(this,"HistoryContext")}constructor(e){this.documents=e,(0,BIa.assert)(e.length>0)}getMostRecentDocument(){return this.documents.at(-1)}getDocument(e){return this.documents.find(r=>r.docId===e)}getDocumentAndIdx(e){let r=this.documents.findIndex(n=>n.docId===e);if(r!==-1)return{doc:this.documents[r],idx:r}}};$de.HistoryContext=Zmr;var egr=class{static{a(this,"DocumentHistory")}constructor(e,r,n,o,s){this.docId=e,this.languageId=r,this.base=n,this.lastEdits=o,this.lastSelection=s,this.lastEdit=new LIa.RootedEdit(this.base,this.lastEdits.compose())}};$de.DocumentHistory=egr});var edi=T(Vde=>{"use strict";f();Object.defineProperty(Vde,"__esModule",{value:!0});Vde.NesHistoryContextProvider=void 0;Vde.sum=ORe;Vde.editExtends=Zui;var Yui=ro(),Kui=kw(),FIa=W1(),MRe=Zg(),UIa=iIe(),QIa=xv(),lut=jR(),qIa=tat(),Jui=Wui(),GIa=F5(),BRe=rTe(),Xui=zui(),tgr=class extends Yui.Disposable{static{a(this,"NesHistoryContextProvider")}constructor(e,r){super(),this._documentState=new Map,this._lastDocuments=new ngr(50),this._register((0,Kui.autorun)(n=>{n.readObservable(r.branch)!==void 0&&(this._lastGitCheckout=(0,BRe.now)(),this._documentState.forEach(s=>s.applyAllEdits()))})),(0,Kui.mapObservableArrayCached)(this,e.openDocuments,(n,o)=>{let s=n.selection.get().at(0),c=new rgr(n.id,n.value.get().value,n.languageId.get(),s);this._documentState.set(c.docId,c),s&&this._lastDocuments.push(c),o.add((0,GIa.autorunWithChanges)(this,{value:n.value,selection:n.selection,languageId:n.languageId},l=>{l.languageId.changes.length>0&&(c.languageId=l.languageId.value);let u=this._isAwaitingGitCheckoutCooldown();for(let d of l.value.changes)this._lastDocuments.push(c),c.handleEdit(d,u);l.selection.changes.length>0&&(c.handleSelection(l.selection.value.at(0)),this._lastDocuments.push(c))})),o.add((0,Yui.toDisposable)(()=>{let l=this._documentState.get(n.id);l&&this._lastDocuments.remove(l),this._documentState.delete(n.id)}))},n=>n.id).recomputeInitiallyAndOnChange(this._store)}getHistoryContext(e){let r=this._documentState.get(e);if(!r||!this._lastDocuments.has(r))return;let n=[],o=!1,s=5;for(let c of this._lastDocuments.getItemsReversed()){let l=c.getRecentEdit(s);if(l!==void 0&&(l.editCount===0&&o||(c.docId===e&&(o=!0),n.push(l.history),s-=l.editCount,s<=0)))break}if(n.reverse(),!!n.some(c=>c.docId===e))return new Xui.HistoryContext(n)}_isAwaitingGitCheckoutCooldown(){if(!this._lastGitCheckout)return!1;let e=(0,BRe.now)()-this._lastGitCheckout<2*1e3;return e||(this._lastGitCheckout=void 0),e}};Vde.NesHistoryContextProvider=tgr;var rgr=class t{static{a(this,"DocumentState")}static{this.MAX_EDITED_LINES_PER_EDIT=10}static{this.MAX_EDITED_CHARS_PER_EDIT=5e3}constructor(e,r,n,o){this.docId=e,this.languageId=n,this._edits=[],this._isUserDocument=!1,this._baseValue=new QIa.StringText(r),this._currentValue=this._baseValue,this.handleSelection(o)}getSelection(){return this._selection}handleSelection(e){e&&(this._isUserDocument=!0),this._selection=e}handleEdit(e,r){if(e.isEmpty())return;this._currentValue=e.applyOnText(this._currentValue);let n=UIa.TextEdit.fromStringEdit(e,this._currentValue),o=Jui.TextLengthEdit.fromTextEdit(n);if(r){this._baseValue=this._currentValue,this._edits=[];return}function s(l){return ORe(l.replacements,u=>u.newText.length)}a(s,"editInsertSize");let c=this._edits.at(-1);c&&s(c.edit)<200&&Zui(e,c.edit)?(c.edit=c.edit.compose(e),c.textLengthEdit=c.textLengthEdit.compose(o),c.instant=(0,BRe.now)(),c.edit.isEmpty()&&this._edits.pop()):this._edits.push({edit:e,textLengthEdit:o,instant:(0,BRe.now)()})}getRecentEdit(e){if(!this._isUserDocument)return;let{editCount:r}=this._applyStaleEdits(e),n=new lut.Edits(MRe.StringEdit,this._edits.map(o=>o.edit));return{history:new Xui.DocumentHistory(this.docId,this.languageId,this._baseValue,n,this._selection),editCount:r}}applyAllEdits(){this._baseValue=this._currentValue,this._edits=[]}_applyStaleEdits(e){let r=this._currentValue,n=MRe.StringEdit.empty,o=Jui.TextLengthEdit.empty,s,c=0,l=MRe.StringEdit.empty;for(s=this._edits.length-1;s>=0;s--){let u=this._edits[s];if((0,BRe.now)()-u.instant>600*1e3)break;let d=u.textLengthEdit.compose(o),p=d.getRange();if((0,FIa.assertType)(p,"we only compose non-empty Edits"),p.endLineNumber-p.startLineNumber>100)break;let h=ORe(u.textLengthEdit.edits,b=>b.range.endLineNumber-b.range.startLineNumber+b.newLength.lineCount);if(h>t.MAX_EDITED_LINES_PER_EDIT||ORe(u.edit.replacements,b=>b.newText.length)>t.MAX_EDITED_CHARS_PER_EDIT||ORe(u.edit.replacements,b=>b.replaceRange.length)>t.MAX_EDITED_CHARS_PER_EDIT)break;if(s===this._edits.length-1)l=u.edit;else{let b=MRe.StringEdit.trySwap(u.edit,l);if(b)l=b.e1;else{if(h>=2)break;l=u.edit.compose(l)}}r=u.edit.inverse(r.value).applyOnText(r);let y=u.edit.compose(n),E=lut.RootedEdit.toLineEdit(new lut.RootedEdit(r,y)),v=new qIa.RootedLineEdit(r,E).removeCommonSuffixPrefixLines().edit.replacements.length;if(v>e)break;c=v,n=y,o=d}for(let u=0;u<=s;u++){let d=this._edits[u];this._baseValue=d.edit.applyOnText(this._baseValue)}return this._edits=this._edits.slice(s+1),{editCount:c}}toString(){return new lut.Edits(MRe.StringEdit,this._edits.map(e=>e.edit)).toHumanReadablePatch(this._baseValue)}};function ORe(t,e){let r=0;for(let n of t)r+=e(n);return r}a(ORe,"sum");function Zui(t,e){let r=e.getNewRanges();return t.replacements.every(n=>HIa(n.replaceRange,r))}a(Zui,"editExtends");function HIa(t,e){return e.some(r=>t.start===r.endExclusive||t.endExclusive===r.start)}a(HIa,"doesTouch");var ngr=class{static{a(this,"FifoSet")}constructor(e){this.maxSize=e,this._arr=[]}push(e){let r=this._arr.indexOf(e);r!==-1?this._arr.splice(r,1):this._arr.length>=this.maxSize&&this._arr.shift(),this._arr.push(e)}remove(e){let r=this._arr.indexOf(e);r!==-1&&this._arr.splice(r,1)}getItemsReversed(){let e=[...this._arr];return e.reverse(),e}has(e){return this._arr.indexOf(e)!==-1}}});var ndi=T(t2=>{"use strict";f();var jIa=t2&&t2.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},tdi=t2&&t2.__param||function(t,e){return function(r,n){e(r,n,t)}},ogr;Object.defineProperty(t2,"__esModule",{value:!0});t2.NesXtabHistoryTracker=t2.XtabEditMergeStrategy=void 0;var sgr=Hl(),$Ia=ro(),VIa=hne(),WIa=kw(),zIa=gO(),dut=ac(),YIa=cd(),uut=jR(),l3=ber(),KIa=F5(),igr=rTe(),agr;(function(t){t.sameStartLine={kind:l3.DiffHistoryMergeStrategy.SameStartLine};function e(o){return{kind:l3.DiffHistoryMergeStrategy.Proximity,lineGap:o}}a(e,"proximity"),t.proximity=e;function r(o,s){return{kind:l3.DiffHistoryMergeStrategy.Hybrid,lineGap:o,splitAfterMs:s}}a(r,"hybrid"),t.hybrid=r;function n(o,s,c){switch(o){case l3.DiffHistoryMergeStrategy.Proximity:return e(s);case l3.DiffHistoryMergeStrategy.Hybrid:return r(s,c);case l3.DiffHistoryMergeStrategy.SameStartLine:return t.sameStartLine;default:(0,sgr.assertNever)(o)}}a(n,"fromConfig"),t.fromConfig=n})(agr||(t2.XtabEditMergeStrategy=agr={}));function rdi(t,e,r){if(t.isEmpty()||e.isEmpty())return!1;for(let n of t.replacements)if(!e.replacements.some(s=>n.lineRange.distanceToRange(s.lineRange)<=r))return!1;return!0}a(rdi,"areLineEditsWithinProximity");var cgr=class extends $Ia.Disposable{static{a(this,"NesXtabHistoryTracker")}static{ogr=this}static{this.MAX_HISTORY_SIZE=50}constructor(e,r,n,o){super(),this._configurationService=n,this._expService=o,this.idToEntry=new Map,this.history=new VIa.LinkedList,this.maxHistorySize=r??ogr.MAX_HISTORY_SIZE,this.mergeStrategy=(0,zIa.derived)(s=>agr.fromConfig(this._configurationService.getExperimentBasedConfigObservable(dut.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeStrategy,this._expService).read(s),this._configurationService.getExperimentBasedConfigObservable(dut.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeLineGap,this._expService).read(s),this._configurationService.getExperimentBasedConfigObservable(dut.ConfigKey.TeamInternal.InlineEditsXtabDiffMergeSplitAfterMs,this._expService).read(s))),(0,WIa.mapObservableArrayCached)(this,e.openDocuments,(s,c)=>{c.add((0,KIa.autorunWithChanges)(this,{rootedEdits:s.value,visibleRanges:s.visibleRanges},l=>{l.rootedEdits.changes.length>0&&l.rootedEdits.previous!==void 0?this.handleEdits(s,l.rootedEdits):this.handleVisibleRangesChange(s,l.visibleRanges)}))},s=>s.id).recomputeInitiallyAndOnChange(this._store)}getHistory(){return[...this.history]}handleVisibleRangesChange(e,r){if(r.value.length===0)return;let n=this.idToEntry.get(e.id);if(n!==void 0){if(n.entry.kind==="edit")return;n.removeFromHistory()}let o={docId:e.id,kind:"visibleRanges",visibleRanges:r.value,documentContent:e.value.get()},s=this.history.push(o);this.idToEntry.set(e.id,{entry:o,removeFromHistory:s,lastEditTimestamp:(0,igr.now)()}),this.compactHistory()}shouldMerge(e,r,n){let o=this.mergeStrategy.get();switch(o.kind){case l3.DiffHistoryMergeStrategy.SameStartLine:return!r.isEmpty()&&!e.isEmpty()&&e.replacements[0].lineRange.startLineNumber===r.replacements[0].lineRange.startLineNumber;case l3.DiffHistoryMergeStrategy.Proximity:return rdi(r,e,o.lineGap);case l3.DiffHistoryMergeStrategy.Hybrid:return(0,igr.now)()-n<=o.splitAfterMs&&rdi(r,e,o.lineGap)}}handleEdits(e,r){(0,sgr.assert)(r.previous!==void 0,"Document has previous version"),(0,sgr.assert)(r.changes.length===1,`Expected 1 edit change but got ${r.changes.length}`);let n=r.changes[0];if(n.replacements.length===0)return;let o=this.idToEntry.get(e.id),s=r.previous,c=new uut.RootedEdit(s,n);if(o===void 0){this.pushToHistory(e.id,c);return}if(o.entry.kind==="visibleRanges"){o.removeFromHistory(),this.pushToHistory(e.id,c);return}let l=o.entry.edit,u=uut.RootedEdit.toLineEdit(l),d=uut.RootedEdit.toLineEdit(c);if(this.shouldMerge(u,d,o.lastEditTimestamp)){o.removeFromHistory();let p=l.edit.compose(n),h=new uut.RootedEdit(l.base,p);this.pushToHistory(e.id,h)}else this.pushToHistory(e.id,c)}pushToHistory(e,r){let n={docId:e,kind:"edit",edit:r},o=this.history.push(n);this.idToEntry.set(e,{entry:n,removeFromHistory:o,lastEditTimestamp:(0,igr.now)()}),this.compactHistory()}compactHistory(){if(this.history.size>this.maxHistorySize){let e=this.history.shift();if(e!==void 0){let r=this.idToEntry.get(e.docId);r!==void 0&&e===r.entry&&this.idToEntry.delete(e.docId)}}}};t2.NesXtabHistoryTracker=cgr;t2.NesXtabHistoryTracker=cgr=ogr=jIa([tdi(2,dut.IConfigurationService),tdi(3,YIa.IExperimentationService)],cgr)});var idi=T(fut=>{"use strict";f();Object.defineProperty(fut,"__esModule",{value:!0});fut.IVSCodeExtensionContext=void 0;var JIa=qr();fut.IVSCodeExtensionContext=(0,JIa.createServiceIdentifier)("IVSCodeExtensionContext")});var ugr=T(Wde=>{"use strict";f();Object.defineProperty(Wde,"__esModule",{value:!0});Wde.NullProxyModelsService=Wde.IProxyModelsService=void 0;var XIa=qr(),ZIa=Xa();Wde.IProxyModelsService=(0,XIa.createServiceIdentifier)("IProxyModelsService");var lgr=class{static{a(this,"NullProxyModelsService")}constructor(){this.onModelListUpdated=ZIa.Event.None}get models(){}get nesModels(){}get instantApplyModels(){}};Wde.NullProxyModelsService=lgr});var fdi=T(n2=>{"use strict";f();var cdi=n2&&n2.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},SQ=n2&&n2.__param||function(t,e){return function(r,n){e(r,n,t)}},FRe;Object.defineProperty(n2,"__esModule",{value:!0});n2.UndesiredModels=n2.InlineEditsModelService=void 0;var exa=imr(),ldi=jhr(),odi=cy(),txa=Lc(),sdi=Hl(),udi=Xa(),ddi=ro(),zde=kw(),rxa=c7(),r2=ac(),nxa=idi(),ixa=D0(),oxa=ugr(),sxa=cd(),axa=bp(),LRe=ky(),cxa=Hct(),fgr=class extends ddi.Disposable{static{a(this,"InlineEditsModelService")}static{FRe=this}static{this.COPILOT_NES_XTAB_MODEL={modelName:"copilot-nes-xtab",promptingStrategy:LRe.PromptingStrategy.CopilotNesXtab,includeTagsInCurrentFile:!0,source:"hardCodedDefault",lintOptions:void 0}}static{this.COPILOT_NES_OCT={modelName:"copilot-nes-oct",promptingStrategy:LRe.PromptingStrategy.Xtab275,includeTagsInCurrentFile:!1,source:"hardCodedDefault",lintOptions:void 0}}static{this.COPILOT_NES_CALLISTO={modelName:"nes-callisto",promptingStrategy:LRe.PromptingStrategy.Xtab275,includeTagsInCurrentFile:!1,source:"hardCodedDefault",lintOptions:void 0}}constructor(e,r,n,o,s,c,l){super(),this._tokenStore=e,this._proxyModelsService=r,this._undesiredModelsManager=n,this._configService=o,this._expService=s,this._telemetryService=c,this._logService=l,this._copilotTokenObs=(0,zde.observableFromEvent)(this,this._tokenStore.onDidStoreUpdate,()=>this._tokenStore.copilotToken),this._fetchedModelsObs=(0,zde.observableFromEvent)(this,this._proxyModelsService.onModelListUpdated,()=>this._proxyModelsService.nesModels),this._preferredModelNameObs=this._configService.getExperimentBasedConfigObservable(r2.ConfigKey.Advanced.InlineEditsPreferredModel,this._expService),this._localModelConfigObs=this._configService.getConfigObservable(r2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfiguration),this._expBasedModelConfigObs=this._configService.getExperimentBasedConfigObservable(r2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfigurationString,this._expService),this._defaultModelConfigObs=this._configService.getExperimentBasedConfigObservable(r2.ConfigKey.TeamInternal.InlineEditsXtabProviderDefaultModelConfigurationString,this._expService),this._useSlashModelsObs=this._configService.getExperimentBasedConfigObservable(r2.ConfigKey.TeamInternal.InlineEditsUseSlashModels,this._expService),this._undesiredModelsObs=(0,zde.observableFromEvent)(this,this._undesiredModelsManager.onDidChange,()=>this._undesiredModelsManager),this._setModelQueue=new ldi.TaskQueue,this._logger=l.createSubLogger(["NES","ModelsService"]);let u=this._logger.createSubLogger("constructor");this._modelsObs=(0,zde.derived)(d=>(u.trace("computing models"),this.aggregateModels({copilotToken:this._copilotTokenObs.read(d),fetchedNesModels:this._fetchedModelsObs.read(d),localModelConfig:this._localModelConfigObs.read(d),modelConfigString:this._expBasedModelConfigObs.read(d),defaultModelConfigString:this._defaultModelConfigObs.read(d),useSlashModels:this._useSlashModelsObs.read(d)}))).recomputeInitiallyAndOnChange(this._store),this._currentModelObs=(0,zde.derived)(d=>{u.trace("computing current model");let p=this._undesiredModelsObs.read(d);return this._pickModel({preferredModelName:this._preferredModelNameObs.read(d),models:this._modelsObs.read(d),undesiredModelsManager:p})}).recomputeInitiallyAndOnChange(this._store),this._modelInfoObs=(0,zde.derived)(d=>(u.trace("computing model info"),{models:this._modelsObs.read(d),currentModelId:this._currentModelObs.read(d).modelName})).recomputeInitiallyAndOnChange(this._store),this.onModelListUpdated=udi.Event.fromObservableLight(this._modelInfoObs)}get modelInfo(){let e=this._modelsObs.get().map(n=>({id:n.modelName,name:n.modelName})),r=this._currentModelObs.get();return{models:e,currentModelId:r.modelName}}setCurrentModelId(e){return this._setModelQueue.schedule(()=>this._setCurrentModelIdCore(e))}async _setCurrentModelIdCore(e){if(this._configService.getExperimentBasedConfig(r2.ConfigKey.Advanced.InlineEditsPreferredModel,this._expService)===e)return;let o=this._currentModelObs.get(),s=this._modelsObs.get(),c=s.find(u=>u.modelName===e);if(c===void 0){this._logService.error(`New preferred model id ${e} not found in model list.`);return}o.source==="expConfig"&&await this._undesiredModelsManager.addUndesiredModelId(o.modelName),this._undesiredModelsManager.isUndesiredModelId(e)&&await this._undesiredModelsManager.removeUndesiredModelId(e);let l=this._pickModel({preferredModelName:"none",models:s,undesiredModelsManager:this._undesiredModelsManager});c.source==="expConfig"||e===l.modelName&&!s.some(u=>u.source==="expConfig")?(this._logger.trace(`New preferred model id ${e} is the same as the default model, resetting user setting.`),await this._configService.setConfig(r2.ConfigKey.Advanced.InlineEditsPreferredModel,"none")):(this._logger.trace(`New preferred model id ${e} is different from the default model, updating user setting to ${e}.`),await this._configService.setConfig(r2.ConfigKey.Advanced.InlineEditsPreferredModel,e))}aggregateModels({copilotToken:e,fetchedNesModels:r,localModelConfig:n,modelConfigString:o,defaultModelConfigString:s,useSlashModels:c}){let l=this._logger.createSubLogger("aggregateModels"),u=[];if(n&&(u.some(d=>d.modelName===n.modelName)?l.trace("Local model configuration already exists in the model list, skipping."):(l.trace(`Adding local model configuration: ${n.modelName}`),u.push({...n,source:"localConfig"}))),o){l.trace("Parsing modelConfigurationString...");let d=this.parseModelConfigString(o,r2.ConfigKey.TeamInternal.InlineEditsXtabProviderModelConfigurationString);d&&!u.some(p=>p.modelName===d.modelName)?(l.trace(`Adding model from modelConfigurationString: ${d.modelName}`),u.push({...d,source:"expConfig"})):l.trace("No valid model found in modelConfigurationString.")}if(c&&r&&r.length>0){l.trace(`Processing ${r.length} fetched models...`);let d=(0,exa.filterMap)(r,p=>{if((0,LRe.isPromptingStrategy)(p.capabilities.promptStrategy)){if(u.some(h=>h.modelName===p.name)){l.trace(`Fetched model ${p.name} already exists in the model list, skipping.`);return}return{modelName:p.name,promptingStrategy:p.capabilities.promptStrategy,includeTagsInCurrentFile:!1,source:"fetched",lintOptions:void 0}}});l.trace(`Adding ${d.length} fetched models after filtering.`),(0,txa.pushMany)(u,d)}else{l.trace(`adding built-in default model: useSlashModels ${c}, fetchedNesModels ${r?.length??"undefined"}`);let d=this.determineDefaultModel(e,s);d&&(u.some(p=>p.modelName===d.modelName)?l.trace("Default model configuration already exists in the model list, skipping."):(l.trace(`Adding default model configuration: ${d.modelName}`),u.push(d)))}return u}selectedModelConfiguration(){return dgr(this._currentModelObs.get())}defaultModelConfiguration(){let e=this._modelsObs.get();if(e&&e.length>0){let r=e.filter(n=>!this.isConfiguredModel(n));if(r.length>0)return dgr(r[0])}return dgr(this.determineDefaultModel(this._copilotTokenObs.get(),this._defaultModelConfigObs.get()))}isConfiguredModel(e){switch(e.source){case"localConfig":case"expConfig":case"expDefaultConfig":return!0;case"fetched":case"hardCodedDefault":return!1;default:(0,sdi.assertNever)(e.source)}}determineDefaultModel(e,r){if(r){let n=this.parseModelConfigString(r,r2.ConfigKey.TeamInternal.InlineEditsXtabProviderDefaultModelConfigurationString);if(n)return{...n,source:"expDefaultConfig"}}return e?.isFcv1()?FRe.COPILOT_NES_XTAB_MODEL:e?.isFreeUser||e?.isNoAuthUser?FRe.COPILOT_NES_CALLISTO:FRe.COPILOT_NES_OCT}_pickModel({preferredModelName:e,models:r,undesiredModelsManager:n}){let o=r.find(l=>l.source==="expConfig");if(o)if(n.isUndesiredModelId(o.modelName))this._logger.trace(`Exp-configured model ${o.modelName} is marked as undesired by the user. Skipping.`);else return o;if(e!=="none"){let l=r.find(u=>u.modelName===e);if(l)return l}(0,sdi.softAssert)(r.length>0,"InlineEdits model list should have at least one model");let c=r.at(0);return c||this.determineDefaultModel(this._copilotTokenObs.get(),this._defaultModelConfigObs.get())}parseModelConfigString(e,r){let n;try{let o=JSON.parse(e),s=LRe.MODEL_CONFIGURATION_VALIDATOR.validate(o);if(!s.error)return s.content;n=s.error.message}catch(o){n=odi.ErrorUtils.toString(odi.ErrorUtils.fromUnknown(o))}this._telemetryService.sendMSFTTelemetryEvent("incorrectNesModelConfig",{configName:r.id,errorMessage:n,configValue:e})}};n2.InlineEditsModelService=fgr;n2.InlineEditsModelService=fgr=FRe=cdi([SQ(0,rxa.ICopilotTokenStore),SQ(1,oxa.IProxyModelsService),SQ(2,cxa.IUndesiredModelsManager),SQ(3,r2.IConfigurationService),SQ(4,sxa.IExperimentationService),SQ(5,axa.ITelemetryService),SQ(6,ixa.ILogService)],fgr);function dgr(t){let{source:e,...r}=t;return r}a(dgr,"toModelConfiguration");var adi;(function(t){let e="copilot.chat.nextEdits.undesiredModelIds",r=class extends ddi.Disposable{static{a(this,"Manager")}constructor(o){super(),this._vscodeExtensionContext=o,this._onDidChange=this._register(new udi.Emitter),this.onDidChange=this._onDidChange.event,this._queue=new ldi.TaskQueue}isUndesiredModelId(o){return this._getModels().includes(o)}addUndesiredModelId(o){return this._queue.schedule(async()=>{let s=this._getModels();s.includes(o)||(s.push(o),await this._setModels(s),this._onDidChange.fire())})}removeUndesiredModelId(o){return this._queue.schedule(async()=>{let s=this._getModels(),c=s.indexOf(o);c!==-1&&(s.splice(c,1),await this._setModels(s),this._onDidChange.fire())})}_getModels(){return this._vscodeExtensionContext.globalState.get(e)??[]}_setModels(o){return new Promise((s,c)=>{this._vscodeExtensionContext.globalState.update(e,o).then(s,c)})}};r=cdi([SQ(0,nxa.IVSCodeExtensionContext)],r),t.Manager=r})(adi||(n2.UndesiredModels=adi={}))});var pdi=T(put=>{"use strict";f();Object.defineProperty(put,"__esModule",{value:!0});put.NullLanguageContextProviderService=void 0;var lxa=ro(),pgr=class{static{a(this,"NullLanguageContextProviderService")}registerContextProvider(e,r){return lxa.Disposable.None}getAllProviders(){return[]}getContextProviders(e){return[]}getContextItems(e,r,n){return{[Symbol.asyncIterator]:async function*(){}}}getContextItemsOnTimeout(e,r){return[]}};put.NullLanguageContextProviderService=pgr});var hdi=T(hut=>{"use strict";f();Object.defineProperty(hut,"__esModule",{value:!0});hut.TestLanguageDiagnosticsService=void 0;var uxa=Xa(),dxa=Wx(),fxa=nK(),hgr=class extends fxa.AbstractLanguageDiagnosticsService{static{a(this,"TestLanguageDiagnosticsService")}constructor(){super(...arguments),this.diagnosticsMap=new dxa.ResourceMap,this._onDidChangeDiagnostics=new uxa.Emitter,this.onDidChangeDiagnostics=this._onDidChangeDiagnostics.event}setDiagnostics(e,r){this.diagnosticsMap.set(e,r),this._onDidChangeDiagnostics.fire({uris:[e]})}getDiagnostics(e){return this.diagnosticsMap.get(e)||[]}getAllDiagnostics(){return Array.from(this.diagnosticsMap.entries())}};hut.TestLanguageDiagnosticsService=hgr});var mdi=T(gut=>{"use strict";f();Object.defineProperty(gut,"__esModule",{value:!0});gut.ResponseStream=void 0;var pxa=cy(),mut=MT(),hxa=vc(),mxa=W1(),mgr=class t{static{a(this,"ResponseStream")}constructor(e,r,n,o){this.fetcherResponse=e,this.requestId=n,this.headers=o;let s=new hxa.DeferredPromise;this.aggregatedStream=s.p,this.response=this.aggregatedStream.then(c=>{if(c.isError())return c;try{return mut.Result.ok(t.aggregateCompletionsStream(c.val))}catch(l){return mut.Result.error(l)}}),this.stream=gxa(r,s)}async destroy(){await this.fetcherResponse.body.destroy()}static aggregateCompletionsStream(e){let r="",n=null,o=null,s;for(let d of e){let p=d.choices[0];r+=p.text??"",p.logprobs&&(o===null?o={tokens:[...p.logprobs.tokens],token_logprobs:[...p.logprobs.token_logprobs],text_offset:[...p.logprobs.text_offset],top_logprobs:[...p.logprobs.top_logprobs]}:(o.tokens.push(...p.logprobs.tokens),o.token_logprobs.push(...p.logprobs.token_logprobs),o.text_offset.push(...p.logprobs.text_offset),o.top_logprobs.push(...p.logprobs.top_logprobs))),d.usage&&(s===void 0?s={completion_tokens:d.usage.completion_tokens,prompt_tokens:d.usage.prompt_tokens,total_tokens:d.usage.total_tokens,completion_tokens_details:{audio_tokens:d.usage.completion_tokens_details.audio_tokens,reasoning_tokens:d.usage.completion_tokens_details.reasoning_tokens},prompt_tokens_details:{audio_tokens:d.usage.prompt_tokens_details.audio_tokens,reasoning_tokens:d.usage.prompt_tokens_details.reasoning_tokens}}:(s.completion_tokens+=d.usage.completion_tokens,s.prompt_tokens+=d.usage.prompt_tokens,s.total_tokens+=d.usage.total_tokens,s.completion_tokens_details.audio_tokens+=d.usage.completion_tokens_details.audio_tokens,s.completion_tokens_details.reasoning_tokens+=d.usage.completion_tokens_details.reasoning_tokens,s.prompt_tokens_details.audio_tokens+=d.usage.prompt_tokens_details.audio_tokens,s.prompt_tokens_details.reasoning_tokens+=d.usage.prompt_tokens_details.reasoning_tokens)),p.finish_reason&&((0,mxa.assertType)(n===null,"cannot already have finishReason if just seeing choice.finish_reason"),n=p.finish_reason)}if(e.length===0)throw new Error("Response is empty!");let c=e[0];return{choices:[{index:0,finish_reason:n,logprobs:o,text:r}],system_fingerprint:c.system_fingerprint,object:c.object,usage:s}}};gut.ResponseStream=mgr;async function*gxa(t,e){let r=[],n;try{for await(let o of t)r.push(o),yield o}catch(o){throw n=pxa.ErrorUtils.fromUnknown(o),n}finally{e.complete(n?mut.Result.error(n):mut.Result.ok(r))}}a(gxa,"streamWithAggregation")});var gdi=T(ggr=>{"use strict";f();Object.defineProperty(ggr,"__esModule",{value:!0});ggr.jsonlStreamToCompletions=Axa;async function*Axa(t){for await(let e of t)if(e.trim()!=="data: [DONE]"&&e.startsWith("data: ")){let r=JSON.parse(e.substring(6));if(r.error)throw new Error(r.error.message);yield r}}a(Axa,"jsonlStreamToCompletions")});var ydi=T(u3=>{"use strict";f();var yxa=u3&&u3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},Agr=u3&&u3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(u3,"__esModule",{value:!0});u3.CompletionsFetchService=void 0;var Exa=$hr(),Adi=cy(),tJ=MT(),_xa=qWt(),Cxa=cA(),vxa=xK(),bxa=zm(),Txa=Kue(),IQ=Ust(),Sxa=mdi(),Ixa=gdi(),ygr=class{static{a(this,"CompletionsFetchService")}constructor(e,r,n){this.authService=e,this.fetcherService=r,this.requestLogger=n}disconnectAll(){return this.fetcherService.disconnectAll()}async fetch(e,r,n,o,s,c){let l=Date.now();if(s.isCancellationRequested){let p=tJ.Result.error(new IQ.Completions.RequestCancelled);return this._logCompletionsRequest(e,n,o,l,p),p}let u={requestId:o,headers:this.getHeaders(o,r,c),body:JSON.stringify({...n,stream:!0})},d=await this._fetchFromUrl(e,u,s);if(d.isError())return this._logCompletionsRequest(e,n,o,l,d),d;if(d.val.status===200){let p=Exa.AsyncIterUtilsExt.splitLines(d.val.body),h=(0,Ixa.jsonlStreamToCompletions)(p),m=new Sxa.ResponseStream(d.val.response,h,d.val.requestId,d.val.headers),g=tJ.Result.ok(m);return this._logCompletionsRequest(e,n,o,l,g),g}else{let p=new IQ.Completions.UnsuccessfulResponse(d.val.status,d.val.statusText,d.val.headers,()=>wxa(d.val.body).catch(()=>"")),h=tJ.Result.error(p);return this._logCompletionsRequest(e,n,o,l,h),h}}async _fetchFromUrl(e,r,n){let o=this.fetcherService.makeAbortController(),s=n.onCancellationRequested(()=>{o.abort()});try{let c={headers:r.headers,body:r.body,signal:o.signal,method:"POST",callSite:"nes-completions"},l=await this.fetcherService.fetch(e,c);if(l.status===200&&this.authService.copilotToken?.isFreeUser&&this.authService.copilotToken?.isChatQuotaExceeded&&this.authService.resetCopilotToken(),l.status!==200)return l.status===402&&(this.authService.copilotToken?.isCompletionsQuotaExceeded||(this.authService.resetCopilotToken(l.status),await this.authService.getCopilotToken())),tJ.Result.error(new IQ.Completions.UnsuccessfulResponse(l.status,l.statusText,l.headers,()=>l.text().catch(()=>"")));let u=l.body.pipeThrough(new TextDecoderStream),d=xxa(u,s);return tJ.Result.ok({status:l.status,statusText:l.statusText,headers:l.headers,body:d,requestId:(0,vxa.getRequestId)(l.headers),response:l})}catch(c){if(s.dispose(),c instanceof Error&&c.message==="This operation was aborted")return tJ.Result.error(new IQ.Completions.RequestCancelled);let l=Adi.ErrorUtils.fromUnknown(c);return tJ.Result.error(new IQ.Completions.Unexpected(l))}}_logCompletionsRequest(e,r,n,o,s){if(s.isOk())s.val.response.then(l=>{let u=l.isOk()?"success":"failed";this._emitCompletionsLogEntry(e,r,n,o,u,l)});else{let c=s.err;c instanceof IQ.Completions.RequestCancelled?this._emitCompletionsLogEntry(e,r,n,o,"cancelled",void 0):c instanceof IQ.Completions.UnsuccessfulResponse?this._emitCompletionsLogEntry(e,r,n,o,"failed",void 0,`${c.status} ${c.statusText}`):c instanceof IQ.Completions.Unexpected&&this._emitCompletionsLogEntry(e,r,n,o,"failed",void 0,c.error.message)}}_emitCompletionsLogEntry(e,r,n,o,s,c,l){let u=Date.now()-o,d=[];if(d.push("> \u{1F6A8} Note: This log may contain personal information such as the contents of your files. Please review the contents carefully before sharing."),d.push("# completions"),d.push(""),d.push("- [Metadata](#metadata)"),d.push("- [Prompt](#prompt)"),r.suffix&&d.push("- [Suffix](#suffix)"),d.push("- [Response](#response)"),d.push(""),d.push("## Metadata"),d.push("
"),d.push(`url              : ${e}`),d.push(`requestId        : ${n}`),d.push(`model            : ${r.model??"(default)"}`),d.push(`maxTokens        : ${r.max_tokens}`),d.push(`temperature      : ${r.temperature}`),d.push(`top_p            : ${r.top_p}`),d.push(`n                : ${r.n}`),d.push(`duration         : ${u}ms`),d.push("
"),d.push(""),d.push("## Prompt"),d.push("~~~"),d.push(r.prompt),d.push("~~~"),r.suffix&&(d.push(""),d.push("## Suffix"),d.push("~~~"),d.push(r.suffix),d.push("~~~")),d.push(""),d.push("## Response"),s==="cancelled")d.push("## CANCELED");else if(s==="failed")d.push(`## FAILED: ${l}`);else if(c)if(c.isOk()){let h=c.val,m=h.choices[0]?.text??"",g=h.choices[0]?.finish_reason??"unknown";d.push("~~~"),d.push(m||""),d.push("~~~"),d.push(""),d.push("
"),d.push(`finishReason     : ${g}`),h.usage&&(d.push(`promptTokens     : ${h.usage.prompt_tokens}`),d.push(`completionTokens : ${h.usage.completion_tokens}`),d.push(`totalTokens      : ${h.usage.total_tokens}`)),d.push("
")}else d.push(`## FAILED: stream error - ${c.err.message}`);let p=s==="success"?void 0:_xa.Codicon.error;this.requestLogger.addEntry({type:"MarkdownContentRequest",debugName:"Completions Request",startTimeMs:o,icon:p,markdownContent:d.join(` +`)})}getHeaders(e,r,n={}){return{"Content-Type":"application/json","x-policy-id":"nil",Authorization:"Bearer "+r,"X-Request-Id":e,"X-GitHub-Api-Version":"2025-04-01",...n}}};u3.CompletionsFetchService=ygr;u3.CompletionsFetchService=ygr=yxa([Agr(0,Cxa.IAuthenticationService),Agr(1,bxa.IFetcherService),Agr(2,Txa.IRequestLogger)],ygr);async function*xxa(t,e){try{for await(let r of t)yield r}catch(r){throw Adi.ErrorUtils.fromUnknown(r)}finally{e.dispose()}}a(xxa,"streamWithCleanup");async function wxa(t){let e=[];for await(let r of t)e.push(r);return e.join("")}a(wxa,"collectAsyncIterableToString")});var _di=T(Aut=>{"use strict";f();Object.defineProperty(Aut,"__esModule",{value:!0});Aut.WireTypes=void 0;var xQ=zO(),Edi;(function(t){let e;(function(o){function s(c){return!!c&&typeof c=="object"&&typeof c.promptStrategy=="string"}a(s,"is"),o.is=s,o.validator=(0,xQ.vObj)({promptStrategy:(0,xQ.vString)()})})(e=t.Capabilities||(t.Capabilities={}));let r;(function(o){o.validator=(0,xQ.vObj)({serviceType:(0,xQ.vString)(),name:(0,xQ.vString)(),provider:(0,xQ.vString)(),capabilities:e.validator});function s(c){return!!c&&typeof c=="object"&&typeof c.serviceType=="string"&&typeof c.name=="string"&&typeof c.provider=="string"&&e.is(c.capabilities)}a(s,"is"),o.is=s})(r=t.Model||(t.Model={}));let n;(function(o){o.validator=(0,xQ.vObj)({models:(0,xQ.vArray)(r.validator)});function s(c){return!!c&&typeof c=="object"&&Array.isArray(c.models)&&c.models.every(r.is)}a(s,"is"),o.is=s})(n=t.ModelList||(t.ModelList={}))})(Edi||(Aut.WireTypes=Edi={}))});var vdi=T(d3=>{"use strict";f();var Rxa=d3&&d3.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},yut=d3&&d3.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(d3,"__esModule",{value:!0});d3.ProxyModelsService=void 0;var Pxa=require("util"),Egr=cy(),kxa=n4(),Dxa=Xa(),Nxa=ro(),Cdi=kw(),Mxa=c7(),Oxa=$y(),Bxa=_di(),Lxa=D0(),Fxa=zm(),_gr=class extends Nxa.Disposable{static{a(this,"ProxyModelsService")}constructor(e,r,n,o){super(),this._tokenStore=e,this._capiClient=r,this._fetchService=n,this._logService=o,this._onModelListUpdated=this._register(new Dxa.Emitter),this.onModelListUpdated=this._onModelListUpdated.event;let s=(0,Cdi.observableFromEvent)(this,this._tokenStore.onDidStoreUpdate,()=>this._tokenStore.copilotToken);this._register((0,Cdi.autorun)(c=>{let l=s.read(c),u=new kxa.CancellationTokenSource;this._fetchLatestModels(l,u.token).then(d=>{d!==void 0&&(u.token.isCancellationRequested||(0,Pxa.isDeepStrictEqual)(this._models,d)||(this._models=d,this._onModelListUpdated.fire()))}).catch(d=>{let p=Egr.ErrorUtils.fromUnknown(d);this._logService.error(p,"Failed to fetch models in autorun")}),c.store.add({dispose:a(()=>u.dispose(!0),"dispose")})}))}get models(){return this._models}get nesModels(){return this._models?.models.filter(e=>e.serviceType==="NESChat")}get instantApplyModels(){return this._models?.models.filter(e=>e.serviceType==="InstantApplyChat")}async _fetchLatestModels(e,r){if(!e)return;let n=`${this._capiClient.proxyBaseURL}/models`,o=this._fetchService.makeAbortController(),s=r.onCancellationRequested(()=>o.abort()),c;try{c=await this._fetchService.fetch(n,{headers:{Authorization:`Bearer ${e.token}`},method:"GET",timeout:1e4,callSite:"proxy-models",signal:o.signal})}catch(l){let u=Egr.ErrorUtils.fromUnknown(l);this._logService.error(u,"Failed to fetch model list");return}finally{s.dispose()}if(!c.ok){this._logService.error(`Failed to fetch model list: ${c.status} ${c.statusText}`);return}try{let l=await c.json(),u=Bxa.WireTypes.ModelList.validator.validate(l);if(u.error)throw new Error(`Invalid /models response data: ${u.error.message}`);return u.content}catch(l){let u=Egr.ErrorUtils.fromUnknown(l);this._logService.error(u,"Failed to process /models response");return}}};d3.ProxyModelsService=_gr;d3.ProxyModelsService=_gr=Rxa([yut(0,Mxa.ICopilotTokenStore),yut(1,Oxa.ICAPIClientService),yut(2,Fxa.IFetcherService),yut(3,Lxa.ILogService)],_gr)});var bdi=T(Eut=>{"use strict";f();Object.defineProperty(Eut,"__esModule",{value:!0});Eut.NullRequestLogger=void 0;var Uxa=Kue(),Qxa=Xa(),Cgr=class extends Uxa.AbstractRequestLogger{static{a(this,"NullRequestLogger")}constructor(){super(...arguments),this.onDidChangeRequests=Qxa.Event.None}addPromptTrace(){}addEntry(e){}getRequests(){return[]}getRequestById(e){}logModelListCall(e,r,n){}logToolCall(e,r,n){}logServerToolCall(e,r,n,o){}};Eut.NullRequestLogger=Cgr});var Lgr=T(nu=>{"use strict";f();var kgr=nu&&nu.__decorate||function(t,e,r,n){var o=arguments.length,s=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(s=(o<3?c(s):o>3?c(e,r,s):c(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},f3=nu&&nu.__param||function(t,e){return function(r,n){e(r,n,t)}};Object.defineProperty(nu,"__esModule",{value:!0});nu.SimpleExperimentationService=nu.LogLevel=nu.ILanguageContextProviderService=nu.IIgnoreService=nu.IExperimentationService=nu.IEndpointProvider=nu.ICAPIClientService=nu.IAuthenticationService=void 0;nu.createNESProvider=Mwa;nu.createInlineCompletionsProvider=Bwa;var qxa=l2n(),Tdi=Sz(),Sdi=s$n(),Idi=Sle(),Gxa=Urt(),xdi=bir(),Hxa=Tir(),ab=Gm(),wdi=Pir(),jxa=qKn(),$xa=Hm(),Rdi=dor(),Vxa=fU(),Pdi=yor(),kdi=cxe(),Ddi=For(),Ndi=Qor(),Mdi=ndr(),bgr=Rit(),Wxa=Oii(),zxa=Bii(),URe=uc(),Yxa=Fue(),Kxa=xir(),Odi=Vdr(),Bdi=$ir(),Ldi=Bst(),Fdi=Flr(),Udi=Eot(),QRe=yot(),Qdi=PU(),qdi=Dot(),Jxa=Qii(),Xxa=Rot(),Gdi=jer(),Hdi=aC(),jdi=uIe(),$di=rK(),Zxa=eoi(),ewa=Joi(),Tgr=ysi(),Vdi=T0r(),twa=hci(),rwa=Wpr(),nwa=hui(),Dgr=cA();Object.defineProperty(nu,"IAuthenticationService",{enumerable:!0,get:a(function(){return Dgr.IAuthenticationService},"get")});var iwa=lIe(),Wdi=c7(),owa=mui(),swa=Sui(),awa=WB(),cwa=x0r(),lwa=Iui(),uwa=w0r(),zdi=P0r(),HRe=ac(),dwa=wui(),fwa=zpr(),pwa=Mui(),Ngr=$y();Object.defineProperty(nu,"ICAPIClientService",{enumerable:!0,get:a(function(){return Ngr.ICAPIClientService},"get")});var hwa=oQ(),Mgr=KIe();Object.defineProperty(nu,"IEndpointProvider",{enumerable:!0,get:a(function(){return Mgr.IEndpointProvider},"get")});var tfi=Bui(),mwa=Fui(),rJ=Ww(),gwa=Uui(),Awa=$mr(),rfi=Qui(),qRe=LY();Object.defineProperty(nu,"IIgnoreService",{enumerable:!0,get:a(function(){return qRe.IIgnoreService},"get")});var ywa=jK(),Ewa=dXe(),vgr=Hct(),_wa=qui(),Cwa=edi(),vwa=ndi(),bwa=fdi(),Ogr=mot();Object.defineProperty(nu,"ILanguageContextProviderService",{enumerable:!0,get:a(function(){return Ogr.ILanguageContextProviderService},"get")});var nfi=pdi(),ifi=nK(),ofi=hdi(),i2=D0(),Twa=Ust(),Swa=ydi(),Bgr=zm(),Ydi=nQ(),Iwa=Opr(),xwa=Lpr(),wwa=Rct(),Rwa=ugr(),Pwa=vdi(),sfi=bdi(),afi=Kue(),Kdi=rhr(),Jdi=wfr(),jRe=cd();Object.defineProperty(nu,"IExperimentationService",{enumerable:!0,get:a(function(){return jRe.IExperimentationService},"get")});var cfi=bp(),Xdi=pde(),kwa=ler(),Zdi=blt(),efi=LK(),Sgr=Qhr(),lfi=qr(),Dwa=n4(),GRe=Xa(),but=ro(),Nwa=Ip(),$n=rXe(),ufi=Po(),nJ;(function(t){t[t.Off=0]="Off",t[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warning=4]="Warning",t[t.Error=5]="Error"})(nJ||(nu.LogLevel=nJ={}));function Mwa(t){return Owa(t).createInstance(Igr,t)}a(Mwa,"createNESProvider");var Igr=class extends but.Disposable{static{a(this,"NESProvider")}constructor(e,r,n,o,s){super(),this._options=e,this._expService=n,this._configurationService=o,this._workspaceService=s;let c=r.createInstance(nwa.XtabProvider),l=r.createInstance(_wa.ObservableGit),u=new Cwa.NesHistoryContextProvider(this._options.workspace,l),d=this._configurationService.getExperimentBasedConfig(HRe.ConfigKey.TeamInternal.InlineEditsXtabDiffNEntries,this._expService),p=new vwa.NesXtabHistoryTracker(this._options.workspace,d,o,n);this._debugRecorder=this._register(new Zxa.DebugRecorder(this._options.workspace)),this._nextEditProvider=r.createInstance(ewa.NextEditProvider,this._options.workspace,c,u,p,this._debugRecorder),this._telemetrySender=this._register(r.createInstance(Tgr.TelemetrySender,this._options.workspace))}getId(){return this._nextEditProvider.ID}handleShown(e){e.telemetryBuilder.setAsShown(),this._nextEditProvider.handleShown(e.internalResult)}handleAcceptance(e){e.telemetryBuilder.setAcceptance("accepted"),e.telemetryBuilder.setStatus("accepted"),this._nextEditProvider.handleAcceptance(e.docId,e.internalResult),this.handleEndOfLifetime(e)}handleRejection(e){e.telemetryBuilder.setAcceptance("rejected"),e.telemetryBuilder.setStatus("rejected"),this._nextEditProvider.handleRejection(e.docId,e.internalResult),this.handleEndOfLifetime(e)}handleIgnored(e,r){r&&e.telemetryBuilder.setSupersededBy(r.requestUuid),this._nextEditProvider.handleIgnored(e.docId,e.internalResult,r?.internalResult),this.handleEndOfLifetime(e)}handleEndOfLifetime(e){try{this._telemetrySender.sendTelemetryForBuilder(e.telemetryBuilder)}finally{e.telemetryBuilder.dispose()}}async getNextEdit(e,r){let n=ywa.DocumentId.create(e.toString()),o={triggerKind:1,selectedCompletionInfo:void 0,requestUuid:(0,Nwa.generateUuid)(),requestIssuedDateTime:Date.now(),earliestShownDateTime:Date.now()+200,enforceCacheDelay:!0},s=new Ewa.InlineEditRequestLogContext(e.toString(),1,o),c=this._options.workspace.getDocument(n);if(!c)throw new Error("DocumentNotFound");let l=new Tgr.NextEditProviderTelemetryBuilder(new rfi.NullGitExtensionService,void 0,this._workspaceService,this._nextEditProvider.ID,c,this._debugRecorder,s.recordingBookmark);l.setOpportunityId(o.requestUuid);try{let u=await this._nextEditProvider.getNextEdit(n,o,s,r,l.nesBuilder);return{result:u.result?.edit?{newText:u.result.edit.newText,range:u.result.edit.replaceRange}:void 0,docId:n,requestUuid:o.requestUuid,internalResult:u,telemetryBuilder:l}}catch(u){try{this._telemetrySender.sendTelemetryForBuilder(l)}finally{l.dispose()}throw u}}updateTreatmentVariables(e){this._expService instanceof iJ&&this._expService.updateTreatmentVariables(e)}};Igr=kgr([f3(1,ufi.IInstantiationService),f3(2,jRe.IExperimentationService),f3(3,HRe.IConfigurationService),f3(4,Sgr.IWorkspaceService)],Igr);function Owa(t){let{fetcher:e,copilotTokenManager:r,telemetrySender:n,logTarget:o}=t,s=new lfi.InstantiationServiceBuilder;s.define(HRe.IConfigurationService,new $n.SyncDescriptor(_ut,[t.configOverrides??new Map])),s.define(jRe.IExperimentationService,new $n.SyncDescriptor(iJ,[t.waitForTreatmentVariables])),s.define(Kdi.ISimulationTestContext,new $n.SyncDescriptor(Kdi.NulSimulationTestContext)),s.define(Sgr.IWorkspaceService,new $n.SyncDescriptor(Sgr.NullWorkspaceService)),s.define(fwa.IDiffService,new $n.SyncDescriptor(pwa.DiffServiceImpl,[!1])),s.define(i2.ILogService,new $n.SyncDescriptor(i2.LogServiceImpl,[[o||new i2.ConsoleLog(void 0,i2.LogLevel.Trace)]])),s.define(Awa.IGitExtensionService,new $n.SyncDescriptor(rfi.NullGitExtensionService)),s.define(Ogr.ILanguageContextProviderService,new $n.SyncDescriptor(nfi.NullLanguageContextProviderService)),s.define(ifi.ILanguageDiagnosticsService,new $n.SyncDescriptor(ofi.TestLanguageDiagnosticsService)),s.define(qRe.IIgnoreService,new $n.SyncDescriptor(qRe.NullIgnoreService)),s.define(Jdi.ISnippyService,new $n.SyncDescriptor(Jdi.NullSnippyService)),s.define(hwa.IDomainService,new $n.SyncDescriptor(mwa.DomainService)),s.define(Ngr.ICAPIClientService,new $n.SyncDescriptor(tfi.CAPIClientImpl)),s.define(Wdi.ICopilotTokenStore,new $n.SyncDescriptor(Wdi.CopilotTokenStore)),s.define(rJ.IEnvService,new $n.SyncDescriptor(gwa.NullEnvService)),s.define(Bgr.IFetcherService,new $n.SyncDescriptor(Cut,[e])),s.define(cfi.ITelemetryService,new $n.SyncDescriptor(vut,[n])),s.define(Dgr.IAuthenticationService,new $n.SyncDescriptor(owa.StaticGitHubAuthenticationService,[(0,swa.createStaticGitHubTokenProvider)()])),s.define(iwa.ICopilotTokenManager,r),s.define(Vdi.IPowerService,new $n.SyncDescriptor(Vdi.NullPowerService)),s.define(awa.IChatMLFetcher,new $n.SyncDescriptor(twa.ChatMLFetcherImpl)),s.define(Ydi.IChatWebSocketManager,new $n.SyncDescriptor(Ydi.NullChatWebSocketManager)),s.define(wwa.IOTelService,new Iwa.NoopOTelService((0,xwa.resolveOTelConfig)({env:{},extensionVersion:"0.0.0",sessionId:"chatlib"}))),s.define(cwa.IChatQuotaService,new $n.SyncDescriptor(lwa.ChatQuotaService)),s.define(zdi.IInteractionService,new $n.SyncDescriptor(zdi.InteractionService)),s.define(afi.IRequestLogger,new $n.SyncDescriptor(sfi.NullRequestLogger)),s.define(efi.ITokenizerProvider,new $n.SyncDescriptor(efi.TokenizerProvider,[!1])),s.define(uwa.IConversationOptions,{_serviceBrand:void 0,maxResponseTokens:void 0,temperature:.1,topP:1,rejectionMessage:"Sorry, but I can only assist with programming related questions."}),s.define(Rwa.IProxyModelsService,new $n.SyncDescriptor(Pwa.ProxyModelsService)),s.define(vgr.IInlineEditsModelService,new $n.SyncDescriptor(bwa.InlineEditsModelService)),s.define(vgr.IUndesiredModelsManager,t.undesiredModelsManager||new $n.SyncDescriptor(vgr.NullUndesiredModelsManager)),s.define(Zdi.ITerminalService,t.terminalService||new $n.SyncDescriptor(Zdi.NullTerminalService)),s.define(rwa.ISimilarFilesContextService,new $n.SyncDescriptor(xgr)),s.define(Mgr.IEndpointProvider,new wgr);let c=new ab.InMemoryConfigProvider(new ab.DefaultsOnlyConfigProvider);return t.configOverrides&&c.setOverrides(t.configOverrides),s.define(ab.ICompletionsConfigProvider,c),s.seal()}a(Owa,"setupServices");var _ut=class extends dwa.DefaultsOnlyConfigurationService{static{a(this,"OverridableConfigurationService")}constructor(e){super(),this._overrides=e}getConfig(e){if(this._overrides.has(e.id)){let r=this._overrides.get(e.id);if(e.validator){let n=e.validator.validate(r);return n.error?super.getConfig(e):n.content}return r}return super.getConfig(e)}getExperimentBasedConfig(e,r){if(this._overrides.has(e.id)){let n=this._overrides.get(e.id);if(e.validator){let o=e.validator.validate(n);return o.error?super.getExperimentBasedConfig(e,r):o.content}return n}return super.getExperimentBasedConfig(e,r)}inspectConfig(e){if(this._overrides.has(e.id)){let r=this._overrides.get(e.id);if(e.validator){let n=e.validator.validate(r);return n.error?super.inspectConfig(e):{defaultValue:n.content}}return{defaultValue:r}}return super.inspectConfig(e)}},xgr=class{static{a(this,"NullSimilarFilesContextService")}async compute(){}},wgr=class{static{a(this,"NullEndpointProvider")}constructor(){this.onDidModelsRefresh=GRe.Event.None}async getAllCompletionModels(){return[]}async getAllChatEndpoints(){return[]}async getChatEndpoint(){throw new Error("not implemented")}async getEmbeddingsEndpoint(){throw new Error("not implemented")}},iJ=class extends but.Disposable{static{a(this,"SimpleExperimentationService")}constructor(e,r){if(super(),this._configurationService=r,this.variables={},this._onDidTreatmentsChange=this._register(new GRe.Emitter),this.onDidTreatmentsChange=this._onDidTreatmentsChange.event,e){let n;this.waitFor=new Promise(o=>{n=o}),this.resolveWaitFor=n}else this.waitFor=Promise.resolve(),this.resolveWaitFor=()=>{}}async hasTreatments(){return this.waitFor}getTreatmentVariable(e){return this.variables[e]}async setCompletionsFilters(e){}updateTreatmentVariables(e){let r=[];for(let[n,o]of Object.entries(e))this.variables[n]!==o&&(this.variables[n]=o,r.push(n));for(let n of Object.keys(this.variables))Object.hasOwn(e,n)||(delete this.variables[n],r.push(n));r.length>0&&(this._onDidTreatmentsChange.fire({affectedTreatmentVariables:r}),this._configurationService.updateExperimentBasedConfiguration(r)),this.resolveWaitFor()}};nu.SimpleExperimentationService=iJ;nu.SimpleExperimentationService=iJ=kgr([f3(1,HRe.IConfigurationService)],iJ);var Cut=class{static{a(this,"SingleFetcherService")}constructor(e){this._fetcher=e,this.onDidFetch=GRe.Event.None,this.onDidCompleteFetch=GRe.Event.None}fetchWithPagination(e,r){return this._fetcher.fetchWithPagination(e,r)}getUserAgentLibrary(){return this._fetcher.getUserAgentLibrary()}fetch(e,r){return this._fetcher.fetch(e,r)}createWebSocket(e,r){return{webSocket:new WebSocket(e,r),responseHeaders:new Bgr.HeadersImpl({}),responseStatusCode:void 0,responseStatusText:void 0}}disconnectAll(){return this._fetcher.disconnectAll()}makeAbortController(){return this._fetcher.makeAbortController()}isAbortError(e){return this._fetcher.isAbortError(e)}isInternetDisconnectedError(e){return this._fetcher.isInternetDisconnectedError(e)}isFetcherError(e){return this._fetcher.isFetcherError(e)}isNetworkProcessCrashedError(e){return this._fetcher.isNetworkProcessCrashedError(e)}getUserMessageForFetcherError(e){return this._fetcher.getUserMessageForFetcherError(e)}},vut=class{static{a(this,"SimpleTelemetryService")}constructor(e){this._telemetrySender=e}dispose(){}sendInternalMSFTTelemetryEvent(e,r,n){}sendMSFTTelemetryEvent(e,r,n){}sendMSFTTelemetryErrorEvent(e,r,n){}sendGHTelemetryEvent(e,r,n){this._telemetrySender.sendTelemetryEvent(e,(0,Xdi.eventPropertiesToSimpleObject)(r),n)}sendGHTelemetryErrorEvent(e,r,n){}sendGHTelemetryException(e,r){}sendTelemetryEvent(e,r,n,o){}sendTelemetryErrorEvent(e,r,n,o){}setSharedProperty(e,r){}setAdditionalExpAssignments(e){}postEvent(e,r){}sendEnhancedGHTelemetryEvent(e,r,n){this._telemetrySender.sendEnhancedTelemetryEvent&&this._telemetrySender.sendEnhancedTelemetryEvent(e,(0,Xdi.eventPropertiesToSimpleObject)(r),n)}sendEnhancedGHTelemetryErrorEvent(e,r,n){}};function Bwa(t){return Lwa(t).createInstance(Rgr)}a(Bwa,"createInlineCompletionsProvider");var Rgr=class extends but.Disposable{static{a(this,"InlineCompletionsProvider")}constructor(e,r,n,o){super(),this._insta=e,this._expService=r,this._speculativeRequestCache=n,this._logService=o,this._register(e),this.ghostText=this._insta.createInstance(Wxa.GhostText)}updateTreatmentVariables(e){this._expService instanceof iJ&&this._expService.updateTreatmentVariables(e)}async getInlineCompletions(e,r,n,o){let s=new Tgr.LlmNESTelemetryBuilder(void 0,void 0,void 0,"ghostText",void 0);return await this.ghostText.getInlineCompletions(e,r,n??Dwa.CancellationToken.None,o,new qxa.GhostTextLogContext(e.uri,e.version,void 0),s,this._logService)}async inlineCompletionShown(e){return await this._speculativeRequestCache.request(e)}};Rgr=kgr([f3(0,ufi.IInstantiationService),f3(1,jRe.IExperimentationService),f3(2,bgr.ICompletionsSpeculativeRequestCache),f3(3,i2.ILogService)],Rgr);var Pgr=class{static{a(this,"UnwrappingTelemetrySender")}constructor(e){this.sender=e}sendTelemetryEvent(e,r,n){this.sender.sendTelemetryEvent(this.normalizeEventName(e),r,n)}sendEnhancedTelemetryEvent(e,r,n){this.sender.sendEnhancedTelemetryEvent&&this.sender.sendEnhancedTelemetryEvent(this.normalizeEventName(e),r,n)}normalizeEventName(e){let r=(0,kwa.unwrapEventNameFromPrefix)(e),n=r.match(/^[^/]+\/(.*)/);return n?n[1]:r}};function Lwa(t){let{fetcher:e,authService:r,statusHandler:n,documentManager:o,workspace:s,telemetrySender:c,urlOpener:l,editorSession:u}=t,d=t.logTarget||new i2.ConsoleLog(void 0,i2.LogLevel.Trace),p=new lfi.InstantiationServiceBuilder;p.define(URe.ICompletionsLogTargetService,new class{logIt(m,g,...A){d.logIt(this.toExternalLogLevel(m),g,...A)}toExternalLogLevel(m){switch(m){case URe.LogLevel.DEBUG:return nJ.Debug;case URe.LogLevel.INFO:return nJ.Info;case URe.LogLevel.WARN:return nJ.Warning;case URe.LogLevel.ERROR:return nJ.Error;default:return nJ.Info}}}),p.define(Dgr.IAuthenticationService,r),p.define(i2.ILogService,new $n.SyncDescriptor(i2.LogServiceImpl,[[d||new i2.ConsoleLog(void 0,i2.LogLevel.Trace)]])),p.define(qRe.IIgnoreService,t.ignoreService||new qRe.NullIgnoreService),p.define(cfi.ITelemetryService,new $n.SyncDescriptor(vut,[new Pgr(c)])),p.define(HRe.IConfigurationService,new $n.SyncDescriptor(_ut,[t.configOverrides??new Map])),p.define(jRe.IExperimentationService,new $n.SyncDescriptor(iJ,[t.waitForTreatmentVariables])),p.define(Mgr.IEndpointProvider,t.endpointProvider),p.define(Ngr.ICAPIClientService,t.capiClientService||new $n.SyncDescriptor(tfi.CAPIClientImpl)),p.define(Bgr.IFetcherService,new $n.SyncDescriptor(Cut,[e])),p.define(Tdi.ICompletionsTelemetryService,new $n.SyncDescriptor(Tdi.CompletionsTelemetryServiceBridge)),p.define($di.ICompletionsRuntimeModeService,$di.RuntimeMode.fromEnvironment(t.isRunningInTest??!1)),p.define(kdi.ICompletionsCacheService,new kdi.CompletionsCache);let h=new ab.InMemoryConfigProvider(new ab.DefaultsOnlyConfigProvider);return t.configOverrides&&h.setOverrides(t.configOverrides),p.define(ab.ICompletionsConfigProvider,h),p.define(Mdi.ICompletionsLastGhostText,new Mdi.LastGhostText),p.define(Ndi.ICompletionsCurrentGhostText,new Ndi.CurrentGhostText),p.define(bgr.ICompletionsSpeculativeRequestCache,new bgr.SpeculativeRequestCache),p.define(Kxa.ICompletionsNotificationSender,new class{async showWarningMessage(m,...g){return await t.notificationSender.showWarningMessage(m,...g)}}),p.define(ab.ICompletionsEditorAndPluginInfo,new class{getEditorInfo(){return t.editorInfo}getEditorPluginInfo(){return t.editorPluginInfo}getRelatedPluginInfo(){return t.relatedPluginInfo}}),p.define(Sdi.ICompletionsExtensionStatus,new Sdi.CopilotExtensionStatus),p.define($xa.ICompletionsFeaturesService,new $n.SyncDescriptor(jxa.Features)),p.define(Hxa.ICompletionsObservableWorkspace,new class{get openDocuments(){return s.openDocuments}getWorkspaceRoot(m){return s.getWorkspaceRoot(m)}getFirstOpenDocument(){return s.getFirstOpenDocument()}getDocument(m){return s.getDocument(m)}}),p.define(Ldi.ICompletionsStatusReporter,new class extends Ldi.StatusReporter{didChange(m){n.didChange(m)}}),p.define(Idi.ICompletionsCopilotTokenManager,new $n.SyncDescriptor(Idi.CopilotTokenManagerImpl,[!1])),p.define(Hdi.ICompletionsTextDocumentManagerService,new $n.SyncDescriptor(class extends Hdi.TextDocumentManager{constructor(){super(...arguments),this.onDidChangeTextDocument=o.onDidChangeTextDocument,this.onDidOpenTextDocument=o.onDidOpenTextDocument,this.onDidCloseTextDocument=o.onDidCloseTextDocument,this.onDidFocusTextDocument=o.onDidFocusTextDocument,this.onDidChangeWorkspaceFolders=o.onDidChangeWorkspaceFolders}getTextDocumentsUnsafe(){return o.getTextDocumentsUnsafe()}findNotebook(m){return o.findNotebook(m)}getWorkspaceFolders(){return o.getWorkspaceFolders()}})),p.define(Rdi.ICompletionsFileReaderService,new $n.SyncDescriptor(Rdi.FileReader)),p.define(Ddi.ICompletionsBlockModeConfig,new $n.SyncDescriptor(Ddi.ConfigBlockModeConfig)),p.define(Gdi.ICompletionsTelemetryUserConfigService,new $n.SyncDescriptor(Gdi.TelemetryUserConfig)),p.define(qdi.ICompletionsRecentEditsProviderService,new $n.SyncDescriptor(qdi.FullRecentEditsProvider,[void 0])),p.define(xdi.ICompletionsNotifierService,new $n.SyncDescriptor(xdi.CompletionNotifier)),p.define(Odi.ICompletionsOpenAIFetcherService,new $n.SyncDescriptor(Odi.LiveOpenAIFetcher)),p.define(Twa.ICompletionsFetchService,new $n.SyncDescriptor(Swa.CompletionsFetchService)),p.define(Bdi.ICompletionsModelManagerService,new $n.SyncDescriptor(Bdi.AvailableModelsManager,[!0])),p.define(Pdi.ICompletionsAsyncManagerService,new $n.SyncDescriptor(Pdi.AsyncCompletionManager)),p.define(Udi.ICompletionsContextProviderBridgeService,new $n.SyncDescriptor(Udi.ContextProviderBridge)),p.define(wdi.ICompletionsUserErrorNotifierService,new $n.SyncDescriptor(wdi.UserErrorNotifier)),p.define(Xxa.ICompletionsRelatedFilesProviderService,new $n.SyncDescriptor(Jxa.CompositeRelatedFilesProvider)),p.define(Vxa.ICompletionsFileSystemService,new zxa.LocalFileSystem),p.define(QRe.ICompletionsContextProviderRegistryService,new $n.SyncDescriptor(QRe.CachedContextProviderRegistry,[QRe.CoreContextProviderRegistry,(m,g,A)=>t.contextProviderMatch(g,A)])),p.define(jdi.ICompletionsPromiseQueueService,new jdi.PromiseQueue),p.define(Gxa.ICompletionsCitationManager,new class{register(){return but.Disposable.None}async handleIPCodeCitation(m){if(t.citationHandler)return await t.citationHandler.handleIPCodeCitation(m)}}),p.define(Qdi.ICompletionsContextProviderService,new Qdi.ContextProviderStatistics),p.define(Fdi.ICompletionsPromptFactoryService,new $n.SyncDescriptor(Fdi.CompletionsPromptFactory)),p.define(Yxa.ICompletionsFetcherService,new class{getImplementation(){return this}fetch(m,g){return e.fetch(m,g)}disconnectAll(){return e.disconnectAll()}}),p.define(QRe.ICompletionsDefaultContextProviders,new QRe.DefaultContextProvidersContainer),p.define(rJ.IEnvService,new class{constructor(){this.language=void 0,this.sessionId=u.sessionId,this.machineId=u.machineId,this.devDeviceId=u.machineId,this.vscodeVersion=t.editorInfo.version,this.isActive=!0,this.onDidChangeWindowState=GRe.Event.None,this.remoteName=u.remoteName,this.uiKind=u.uiKind==="web"?"web":"desktop",this.OS=process.platform==="darwin"?rJ.OperatingSystem.Macintosh:process.platform==="win32"?rJ.OperatingSystem.Windows:rJ.OperatingSystem.Linux,this.uriScheme="",this.extensionId=t.editorPluginInfo.name,this.appRoot=t.editorInfo.root??"",this.shell=""}isProduction(){return ab.BuildInfo.isProduction()}isPreRelease(){return ab.BuildInfo.isPreRelease()}isSimulation(){return t.isRunningInTest===!0}getBuildType(){return ab.BuildInfo.getBuildType()===ab.BuildType.DEV?"dev":"prod"}getVersion(){return ab.BuildInfo.getVersion()}getBuild(){return ab.BuildInfo.getBuild()}getName(){return t.editorInfo.name}getEditorInfo(){return new rJ.NameAndVersion(t.editorInfo.name,t.editorInfo.version)}getEditorPluginInfo(){return new rJ.NameAndVersion(t.editorPluginInfo.name,t.editorPluginInfo.version)}async openExternal(m){return await l.open(m.toString()),!0}}),p.define(Ogr.ILanguageContextProviderService,t.languageContextProvider??new nfi.NullLanguageContextProviderService),p.define(ifi.ILanguageDiagnosticsService,new $n.SyncDescriptor(ofi.TestLanguageDiagnosticsService)),p.define(afi.IRequestLogger,new $n.SyncDescriptor(sfi.NullRequestLogger)),p.seal()}a(Lwa,"setupCompletionServices")});var thi=T((A2f,I2e)=>{"use strict";f();var Ndt=a(function(){},"NullObject");Ndt.prototype=Object.create(null);var kdt=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,Ddt=/\\([\v\u0020-\u00ff])/gu,Xpi=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,pJ={type:"",parameters:new Ndt};Object.freeze(pJ.parameters);Object.freeze(pJ);function Zpi(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(Xpi.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new Ndt};if(e===-1)return n;let o,s,c;for(kdt.lastIndex=e;s=kdt.exec(t);){if(s.index!==e)throw new TypeError("invalid parameter format");e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),Ddt.test(c)&&(c=c.replace(Ddt,"$1"))),n.parameters[o]=c}if(e!==t.length)throw new TypeError("invalid parameter format");return n}a(Zpi,"parse");function ehi(t){if(typeof t!="string")return pJ;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(Xpi.test(r)===!1)return pJ;let n={type:r.toLowerCase(),parameters:new Ndt};if(e===-1)return n;let o,s,c;for(kdt.lastIndex=e;s=kdt.exec(t);){if(s.index!==e)return pJ;e+=s[0].length,o=s[1].toLowerCase(),c=s[2],c[0]==='"'&&(c=c.slice(1,c.length-1),Ddt.test(c)&&(c=c.replace(Ddt,"$1"))),n.parameters[o]=c}return e!==t.length?pJ:n}a(ehi,"safeParse");I2e.exports.default={parse:Zpi,safeParse:ehi};I2e.exports.parse=Zpi;I2e.exports.safeParse=ehi;I2e.exports.defaultContentType=pJ});var cyr=T((T4f,tmi)=>{f();var N2e=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,MDa=typeof AbortController=="function",Vdt=MDa?AbortController:class{static{a(this,"AbortController")}constructor(){this.signal=new Xhi}abort(){this.signal.dispatchEvent("abort")}},ODa=typeof AbortSignal=="function",BDa=typeof Vdt.AbortSignal=="function",Xhi=ODa?AbortSignal:BDa?Vdt.AbortController:class{static{a(this,"AbortSignal")}constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if(e==="abort"){this.aborted=!0;let r={type:e,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},syr=new Set,nyr=a((t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;Wdt(r)&&ayr(r,`${t} option`,`options.${e}`,Bfe)},"deprecatedOption"),iyr=a((t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(Wdt(r)){let{prototype:n}=Bfe,{get:o}=Object.getOwnPropertyDescriptor(n,t);ayr(r,`${t} method`,`cache.${e}()`,o)}},"deprecatedMethod"),LDa=a((t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(Wdt(r)){let{prototype:n}=Bfe,{get:o}=Object.getOwnPropertyDescriptor(n,t);ayr(r,`${t} property`,`cache.${e}`,o)}},"deprecatedProperty"),Zhi=a((...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},"emitWarning"),Wdt=a(t=>!syr.has(t),"shouldWarn"),ayr=a((t,e,r,n)=>{syr.add(t);let o=`The ${e} is deprecated. Please use ${r} instead.`;Zhi(o,"DeprecationWarning",t,n)},"warn"),yJ=a(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),emi=a(t=>yJ(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Ofe:null:null,"getUintArray"),Ofe=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},oyr=class{static{a(this,"Stack")}constructor(e){if(e===0)return[];let r=emi(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Bfe=class t{static{a(this,"LRUCache")}constructor(e={}){let{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:s,updateAgeOnGet:c,updateAgeOnHas:l,allowStale:u,dispose:d,disposeAfter:p,noDisposeOnSet:h,noUpdateTTL:m,maxSize:g=0,sizeCalculation:A,fetchMethod:y,fetchContext:E,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:v}=e,{length:b,maxAge:I,stale:x}=e instanceof t?{}:e;if(r!==0&&!yJ(r))throw new TypeError("max option must be a nonnegative integer");let w=r?emi(r):Array;if(!w)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=g,this.sizeCalculation=A||b,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=E,!this.fetchMethod&&E!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new w(r),this.prev=new w(r),this.head=0,this.tail=0,this.free=new oyr(r),this.initialFill=1,this.size=0,typeof d=="function"&&(this.dispose=d),typeof p=="function"?(this.disposeAfter=p,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!_,this.maxSize!==0){if(!yJ(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!x,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!l,this.ttlResolution=yJ(o)||o===0?o:1,this.ttlAutopurge=!!s,this.ttl=n||I||0,this.ttl){if(!yJ(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let R="LRU_CACHE_UNBOUNDED";Wdt(R)&&(syr.add(R),Zhi("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,t))}x&&nyr("stale","allowStale"),I&&nyr("maxAge","ttl"),b&&nyr("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Ofe(this.max),this.starts=new Ofe(this.max),this.setItemTTL=(n,o,s=N2e.now())=>{if(this.starts[n]=o!==0?s:0,this.ttls[n]=o,o!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},o+1);c.unref&&c.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?N2e.now():0};let e=0,r=a(()=>{let n=N2e.now();if(this.ttlResolution>0){e=n;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return n},"getNow");this.getRemainingTTL=n=>{let o=this.keyMap.get(n);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ofe(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,o)=>{if(!yJ(n))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(n=o(r,e),!yJ(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(e,r)=>{this.sizes[e]=r;let n=this.maxSize-this.sizes[e];for(;this.calculatedSize>n;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,o){if(n||o)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(let e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(let e of this.indexes())yield this.keyList[e]}*rkeys(){for(let e of this.rindexes())yield this.keyList[e]}*values(){for(let e of this.indexes())yield this.valList[e]}*rvalues(){for(let e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(e,r=this){for(let n of this.indexes())e.call(r,this.valList[n],this.keyList[n],this)}rforEach(e,r=this){for(let n of this.rindexes())e.call(r,this.valList[n],this.keyList[n],this)}get prune(){return iyr("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],o=this.valList[r],c={value:this.isBackgroundFetch(o)?o.__staleWhileFetching:o};if(this.ttls){c.ttl=this.ttls[r];let l=N2e.now()-this.starts[r];c.start=Math.floor(Date.now()-l)}this.sizes&&(c.size=this.sizes[r]),e.unshift([n,c])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let o=Date.now()-n.start;n.start=N2e.now()-o}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(c=this.requireSize(e,r,c,l),this.maxSize&&c>this.maxSize)return this;let d=this.size===0?void 0:this.keyMap.get(e);if(d===void 0)d=this.newIndex(),this.keyList[d]=e,this.valList[d]=r,this.keyMap.set(e,d),this.next[this.tail]=d,this.prev[d]=this.tail,this.tail=d,this.size++,this.addItemSize(d,c),u=!1;else{let p=this.valList[d];r!==p&&(this.isBackgroundFetch(p)?p.__abortController.abort():s||(this.dispose(p,e,"set"),this.disposeAfter&&this.disposed.push([p,e,"set"])),this.removeItemSize(d),this.valList[d]=r,this.addItemSize(d,c)),this.moveToTail(d)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(d,n,o),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],o=this.valList[r];return this.isBackgroundFetch(o)?o.__abortController.abort():(this.dispose(o,n,"evict"),this.disposeAfter&&this.disposed.push([o,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas}={}){let n=this.keyMap.get(e);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let o=this.valList[n];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,r,n,o){let s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;let c=new Vdt,l={signal:c.signal,options:n,context:o},u=a(m=>(c.signal.aborted||this.set(e,m,l.options),m),"cb"),d=a(m=>{if(this.valList[r]===h&&(!n.noDeleteOnFetchRejection||h.__staleWhileFetching===void 0?this.delete(e):this.valList[r]=h.__staleWhileFetching),h.__returned===h)throw m},"eb"),p=a(m=>m(this.fetchMethod(e,s,l)),"pcall"),h=new Promise(p).then(u,d);return h.__abortController=c,h.__staleWhileFetching=s,h.__returned=null,r===void 0?(this.set(e,h,l.options),r=this.keyMap.get(e)):this.valList[r]=h,h}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,fetchContext:h=this.fetchContext,forceRefresh:m=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o});let g={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:p},A=this.keyMap.get(e);if(A===void 0){let y=this.backgroundFetch(e,A,g,h);return y.__returned=y}else{let y=this.valList[A];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!m&&!this.isStale(A))return this.moveToTail(A),n&&this.updateItemAge(A),y;let E=this.backgroundFetch(e,A,g,h);return r&&E.__staleWhileFetching!==void 0?E.__staleWhileFetching:E.__returned=E}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet}={}){let s=this.keyMap.get(e);if(s!==void 0){let c=this.valList[s],l=this.isBackgroundFetch(c);return this.isStale(s)?l?r?c.__staleWhileFetching:void 0:(o||this.delete(e),r?c:void 0):l?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),c)}}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return iyr("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let o=this.valList[n];this.isBackgroundFetch(o)?o.__abortController.abort():(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort();else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return iyr("reset","clear"),this.clear}get length(){return LDa("length","size"),this.size}static get AbortController(){return Vdt}static get AbortSignal(){return Xhi}};tmi.exports=Bfe});var dyr=T((x4f,rmi)=>{"use strict";f();var M2e=class extends Error{static{a(this,"FetchBaseError")}constructor(e,r,n){super(e),this.type=r,this._name=n}get name(){return this._name}get[Symbol.toStringTag](){return this._name}},lyr=class extends M2e{static{a(this,"FetchError")}constructor(e,r,n){super(e,r,"FetchError"),n&&(this.code=n.code,this.errno=n.errno,this.erroredSysCall=n.syscall)}},uyr=class extends M2e{static{a(this,"AbortError")}constructor(e,r="aborted"){super(e,r,"AbortError")}};rmi.exports={FetchBaseError:M2e,FetchError:lyr,AbortError:uyr}});var b3=T((P4f,imi)=>{"use strict";f();var{constants:{MAX_LENGTH:FDa}}=require("buffer"),{pipeline:zdt,PassThrough:UDa}=require("stream"),{promisify:QDa}=require("util"),{createGunzip:qDa,createInflate:GDa,createBrotliDecompress:HDa,constants:{Z_SYNC_FLUSH:nmi}}=require("zlib"),jDa=hx()("helix-fetch:utils"),$Da=QDa(zdt),VDa=a((t,e)=>t===204||t===304||+e["content-length"]==0?!1:/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(e["content-encoding"]),"canDecode"),WDa=a((t,e,r,n)=>{if(!VDa(t,e))return r;let o=a(s=>{s&&(jDa(`encountered error while decoding stream: ${s}`),n(s))},"cb");switch(e["content-encoding"].trim()){case"gzip":case"x-gzip":return zdt(r,qDa({flush:nmi,finishFlush:nmi}),o);case"deflate":case"x-deflate":return zdt(r,GDa(),o);case"br":return zdt(r,HDa(),o);default:return r}},"decodeStream"),zDa=a(t=>{if(!t||typeof t!="object"||Object.prototype.toString.call(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},"isPlainObject"),Ydt=a((t,e)=>{if(Buffer.isBuffer(t))return t.length;switch(typeof t){case"string":return t.length*2;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(t)?Symbol.keyFor(t).length*2:(t.toString().length-8)*2;case"object":return Array.isArray(t)?YDa(t,e):KDa(t,e);default:return 0}},"calcSize"),YDa=a((t,e)=>(e.add(t),t.map(r=>e.has(r)?0:Ydt(r,e)).reduce((r,n)=>r+n,0)),"calcArraySize"),KDa=a((t,e)=>{if(t==null)return 0;e.add(t);let r=0,n=[];for(let o in t)n.push(o);return n.push(...Object.getOwnPropertySymbols(t)),n.forEach(o=>{if(r+=Ydt(o,e),typeof t[o]=="object"&&t[o]!==null){if(e.has(t[o]))return;e.add(t[o])}r+=Ydt(t[o],e)}),r},"calcObjectSize"),JDa=a(t=>Ydt(t,new WeakSet),"sizeof"),XDa=a(async t=>{let e=new UDa,r=0,n=[];return e.on("data",o=>{if(r+o.length>FDa)throw new Error("Buffer.constants.MAX_SIZE exceeded");n.push(o),r+=o.length}),await $Da(t,e),Buffer.concat(n,r)},"streamToBuffer");imi.exports={decodeStream:WDa,isPlainObject:zDa,sizeof:JDa,streamToBuffer:XDa}});var Jdt=T((N4f,cmi)=>{"use strict";f();var{PassThrough:omi,Readable:T3}=require("stream"),{types:{isAnyArrayBuffer:ami}}=require("util"),{FetchError:ZDa,FetchBaseError:eNa}=dyr(),{streamToBuffer:tNa}=b3(),rNa=Buffer.alloc(0),hI=Symbol("Body internals"),nNa=a(t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),"toArrayBuffer"),smi=a(async t=>{if(t[hI].disturbed)throw new TypeError("Already read");if(t[hI].error)throw new TypeError(`Stream had error: ${t[hI].error.message}`);t[hI].disturbed=!0;let{stream:e}=t[hI];return e===null?rNa:tNa(e)},"consume"),Kdt=class{static{a(this,"Body")}constructor(e){let r;e==null?r=null:e instanceof URLSearchParams?r=T3.from(e.toString()):e instanceof T3?r=e:Buffer.isBuffer(e)?r=T3.from(e):ami(e)?r=T3.from(Buffer.from(e)):typeof e=="string"||e instanceof String?r=T3.from(e):r=T3.from(String(e)),this[hI]={stream:r,disturbed:!1,error:null},e instanceof T3&&r.on("error",n=>{let o=n instanceof eNa?n:new ZDa(`Invalid response body while trying to fetch ${this.url}: ${n.message}`,"system",n);this[hI].error=o})}get body(){return this[hI].stream}get bodyUsed(){return this[hI].disturbed}async buffer(){return smi(this)}async arrayBuffer(){return nNa(await this.buffer())}async text(){return(await smi(this)).toString()}async json(){return JSON.parse(await this.text())}};Object.defineProperties(Kdt.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var iNa=a(t=>{if(t[hI].disturbed)throw new TypeError("Cannot clone: already read");let{stream:e}=t[hI],r=e;if(e instanceof T3){r=new omi;let n=new omi;e.pipe(r),e.pipe(n),t[hI].stream=n}return r},"cloneStream"),oNa=a(t=>t===null?null:typeof t=="string"?"text/plain; charset=utf-8":t instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(t)||ami(t)||t instanceof T3?null:"text/plain; charset=utf-8","guessContentType");cmi.exports={Body:Kdt,cloneStream:iNa,guessContentType:oNa}});var Lfe=T((B4f,fmi)=>{"use strict";f();var{validateHeaderName:lmi,validateHeaderValue:umi}=require("http"),{isPlainObject:sNa}=b3(),S3=Symbol("Headers internals"),O2e=a(t=>{let e=typeof t!="string"?String(t):t;if(typeof lmi=="function")lmi(e);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let r=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),r}return e.toLowerCase()},"normalizeName"),dmi=a((t,e)=>{let r=typeof t!="string"?String(t):t;if(typeof umi=="function")umi(e,r);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){let n=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}return r},"normalizeValue"),Xdt=class t{static{a(this,"Headers")}constructor(e={}){if(this[S3]={map:new Map},e instanceof t)e.forEach((r,n)=>{this.append(n,r)});else if(Array.isArray(e))e.forEach(([r,n])=>{this.append(r,n)});else if(sNa(e))for(let[r,n]of Object.entries(e))this.append(r,n)}set(e,r){this[S3].map.set(O2e(e),dmi(r,e))}has(e){return this[S3].map.has(O2e(e))}get(e){let r=this[S3].map.get(O2e(e));return r===void 0?null:r}append(e,r){let n=O2e(e),o=dmi(r,e),s=this[S3].map.get(n);this[S3].map.set(n,s?`${s}, ${o}`:o)}delete(e){this[S3].map.delete(O2e(e))}forEach(e,r){for(let n of this.keys())e.call(r,this.get(n),n)}keys(){return Array.from(this[S3].map.keys()).sort()}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[S3].map)}};Object.defineProperties(Xdt.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));fmi.exports={Headers:Xdt}});var fyr=T((U4f,pmi)=>{"use strict";f();var{EventEmitter:aNa}=require("events"),f2=Symbol("AbortSignal internals"),Ffe=class{static{a(this,"AbortSignal")}constructor(){this[f2]={eventEmitter:new aNa,onabort:null,aborted:!1}}get aborted(){return this[f2].aborted}get onabort(){return this[f2].onabort}set onabort(e){this[f2].onabort=e}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(e,r){this[f2].eventEmitter.removeListener(e,r)}addEventListener(e,r){this[f2].eventEmitter.on(e,r)}dispatchEvent(e){let r={type:e,target:this},n=`on${e}`;typeof this[f2][n]=="function"&&this[n](r),this[f2].eventEmitter.emit(e,r)}fire(){this[f2].aborted=!0,this.dispatchEvent("abort")}};Object.defineProperties(Ffe.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});var eft=class extends Ffe{static{a(this,"TimeoutSignal")}constructor(e){if(!Number.isInteger(e))throw new TypeError(`Expected an integer, got ${typeof e}`);super(),this[f2].timerId=setTimeout(()=>{this.fire()},e)}clear(){clearTimeout(this[f2].timerId)}};Object.defineProperties(eft.prototype,{clear:{enumerable:!0}});var Zdt=Symbol("AbortController internals"),tft=class{static{a(this,"AbortController")}constructor(){this[Zdt]={signal:new Ffe}}get signal(){return this[Zdt].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[Zdt].signal.aborted||this[Zdt].signal.fire()}};Object.defineProperties(tft.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});pmi.exports={AbortController:tft,AbortSignal:Ffe,TimeoutSignal:eft}});var B2e=T((G4f,gmi)=>{"use strict";f();var{randomBytes:cNa}=require("crypto"),{Readable:lNa}=require("stream"),hyr=a(t=>typeof t=="object"&&["arrayBuffer","stream","text","slice","constructor"].map(e=>typeof t[e]).filter(e=>e!=="function").length===0&&typeof t.type=="string"&&typeof t.size=="number"&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),"isBlob"),uNa=a(t=>t!=null&&typeof t=="object"&&["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map(e=>typeof t[e]).filter(e=>e!=="function").length===0&&t[Symbol.toStringTag]==="FormData","isFormData"),hmi=a(t=>`--${t}--\r \r -`,"getFooter"),ghi=a((t,e,r)=>{let n="";return n+=`--${t}\r -`,n+=`Content-Disposition: form-data; name="${e}"`,zAr(r)&&(n+=`; filename="${r.name}"\r +`,"getFooter"),mmi=a((t,e,r)=>{let n="";return n+=`--${t}\r +`,n+=`Content-Disposition: form-data; name="${e}"`,hyr(r)&&(n+=`; filename="${r.name}"\r `,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}\r \r -`},"getHeader");async function*cNa(t,e){for(let[r,n]of t)yield ghi(e,r,n),zAr(n)?yield*n.stream():yield n,yield`\r -`;yield mhi(e)}a(cNa,"formDataIterator");var lNa=a((t,e)=>{let r=0;for(let[n,o]of t)r+=Buffer.byteLength(ghi(e,n,o)),r+=zAr(o)?o.size:Buffer.byteLength(String(o)),r+=Buffer.byteLength(`\r -`);return r+=Buffer.byteLength(mhi(e)),r},"getFormDataLength"),WAr=class{static{a(this,"FormDataSerializer")}constructor(e){this.fd=e,this.boundary=oNa(8).toString("hex")}length(){return typeof this._length>"u"&&(this._length=lNa(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return sNa.from(cNa(this.fd,this.boundary))}};Ahi.exports={isFormData:aNa,FormDataSerializer:WAr}});var Ehi=T((S5f,yhi)=>{"use strict";f();var{AbortSignal:T5f}=VAr(),{Body:uNa,cloneStream:dNa,guessContentType:fNa}=Hft(),{Headers:pNa}=b0e(),{isPlainObject:hNa}=q3(),{isFormData:mNa,FormDataSerializer:gNa}=UPe(),ANa=20,uq=Symbol("Request internals"),zft=class t extends uNa{static{a(this,"Request")}constructor(e,r={}){let n=e instanceof t?e:null,o=n?new URL(n.url):new URL(e),s=r.method||n&&n.method||"GET";if(s=s.toUpperCase(),(r.body!=null||n&&n.body!==null)&&["GET","HEAD"].includes(s))throw new TypeError("Request with GET/HEAD method cannot have body");let c=r.body||(n&&n.body?dNa(n):null),l=new pNa(r.headers||n&&n.headers||{});if(mNa(c)&&!l.has("content-type")){let h=new gNa(c);c=h.stream(),l.set("content-type",h.contentType()),!l.has("transfer-encoding")&&!l.has("content-length")&&l.set("content-length",h.length())}if(!l.has("content-type"))if(hNa(c))c=JSON.stringify(c),l.set("content-type","application/json");else{let h=fNa(c);h&&l.set("content-type",h)}super(c);let u=n?n.signal:null;"signal"in r&&(u=r.signal);let d=r.redirect||n&&n.redirect||"follow";if(!["follow","error","manual"].includes(d))throw new TypeError(`'${d}' is not a valid redirect option`);let p=r.cache||n&&n.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(p))throw new TypeError(`'${p}' is not a valid cache option`);this[uq]={init:{...r},method:s,redirect:d,cache:p,headers:l,parsedURL:o,signal:u},r.follow===void 0?!n||n.follow===void 0?this.follow=ANa:this.follow=n.follow:this.follow=r.follow,this.counter=r.counter||n&&n.counter||0,r.compress===void 0?!n||n.compress===void 0?this.compress=!0:this.compress=n.compress:this.compress=r.compress,r.decode===void 0?!n||n.decode===void 0?this.decode=!0:this.decode=n.decode:this.decode=r.decode}get method(){return this[uq].method}get url(){return this[uq].parsedURL.toString()}get headers(){return this[uq].headers}get redirect(){return this[uq].redirect}get cache(){return this[uq].cache}get signal(){return this[uq].signal}clone(){return new t(this)}get init(){return this[uq].init}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(zft.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});yhi.exports={Request:zft}});var YAr=T((w5f,Chi)=>{"use strict";f();var{Body:yNa,cloneStream:ENa,guessContentType:CNa}=Hft(),{Headers:_Na}=b0e(),{isPlainObject:vNa}=q3(),{isFormData:bNa,FormDataSerializer:TNa}=UPe(),T2=Symbol("Response internals"),Yft=class t extends yNa{static{a(this,"Response")}constructor(e=null,r={}){let n=new _Na(r.headers),o=e;if(bNa(o)&&!n.has("content-type")){let s=new TNa(o);o=s.stream(),n.set("content-type",s.contentType()),!n.has("transfer-encoding")&&!n.has("content-length")&&n.set("content-length",s.length())}if(o!==null&&!n.has("content-type"))if(vNa(o))o=JSON.stringify(o),n.set("content-type","application/json");else{let s=CNa(o);s&&n.set("content-type",s)}super(o),this[T2]={url:r.url,status:r.status||200,statusText:r.statusText||"",headers:n,httpVersion:r.httpVersion,decoded:r.decoded,counter:r.counter}}get url(){return this[T2].url||""}get status(){return this[T2].status}get statusText(){return this[T2].statusText}get ok(){return this[T2].status>=200&&this[T2].status<300}get redirected(){return this[T2].counter>0}get headers(){return this[T2].headers}get httpVersion(){return this[T2].httpVersion}get decoded(){return this[T2].decoded}static redirect(e,r=302){if(![301,302,303,307,308].includes(r))throw new RangeError("Invalid status code");return new t(null,{headers:{location:new URL(e).toString()},status:r})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new t(ENa(this),{...this[T2]})}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(Yft.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});Chi.exports={Response:Yft}});var vhi=T((N5f,_hi)=>{"use strict";f();var SNa=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),INa=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),xNa=new Set([500,502,503,504]),wNa={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},RNa={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function fX(t){let e=parseInt(t,10);return isFinite(e)?e:0}a(fX,"toNumberOrZero");function PNa(t){return t?xNa.has(t.status):!0}a(PNa,"isErrorResponse");function KAr(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[o,s]=n.split(/=/,2);e[o.trim()]=s===void 0?!0:s.trim().replace(/^"|"$/g,"")}return e}a(KAr,"parseCacheControl");function kNa(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}a(kNa,"formatCacheControl");_hi.exports=class{static{a(this,"CachePolicy")}constructor(e,r,{shared:n,cacheHeuristic:o,immutableMinTimeToLive:s,ignoreCargoCult:c,_fromObject:l}={}){if(l){this._fromObject(l);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=o!==void 0?o:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=KAr(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=KAr(e.headers["cache-control"]),c&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":kNa(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&INa.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||SNa.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=KAr(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let n in e)wNa[n]||(r[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let o of n)delete r[o]}if(r.warning){let n=r.warning.split(/,/).filter(o=>!/^\s*1[0-9][0-9]/.test(o));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return fX(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return fX(this._rescc["s-maxage"])}if(this._rescc["max-age"])return fX(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||nn)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+fX(this._rescc["stale-if-error"]),n=e+fX(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+fX(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+fX(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let o=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));o.length?r["if-none-match"]=o.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&PNa(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let o={};for(let c in this._resHeaders)o[c]=c in r.headers&&!RNa[c]?r.headers[c]:this._resHeaders[c];let s=Object.assign({},r,{status:this._status,method:this._method,headers:o});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var Ihi=T((O5f,Shi)=>{"use strict";f();var NNa=vhi(),{Headers:DNa}=b0e(),bhi=a(t=>({url:t.url,method:t.method,headers:t.headers.plain()}),"convertRequest"),Thi=a(t=>({status:t.status,headers:t.headers.plain()}),"convertResponse"),JAr=class{static{a(this,"CachePolicyWrapper")}constructor(e,r,n){this.policy=new NNa(bhi(e),Thi(r),n)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(e){return this.policy.satisfiesWithoutRevalidation(bhi(e))}responseHeaders(e){return new DNa(this.policy.responseHeaders(Thi(e)))}timeToLive(){return this.policy.timeToLive()}};Shi.exports=JAr});var Rhi=T((F5f,whi)=>{"use strict";f();var{Readable:MNa}=require("stream"),{Headers:xhi}=b0e(),{Response:ONa}=YAr(),dq=Symbol("CacheableResponse internals"),BNa=a(t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),"toArrayBuffer"),XAr=class t extends ONa{static{a(this,"CacheableResponse")}constructor(e,r){super(e,r);let n=new xhi(r.headers);this[dq]={headers:n,bufferedBody:e}}get headers(){return this[dq].headers}set headers(e){if(e instanceof xhi)this[dq].headers=e;else throw new TypeError("instance of Headers expected")}get body(){return MNa.from(this[dq].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[dq].bufferedBody}async arrayBuffer(){return BNa(this[dq].bufferedBody)}async text(){return this[dq].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){let{url:e,status:r,statusText:n,headers:o,httpVersion:s,decoded:c,counter:l}=this;return new t(this[dq].bufferedBody,{url:e,status:r,statusText:n,headers:o,httpVersion:s,decoded:c,counter:l})}get[Symbol.toStringTag](){return this.constructor.name}},LNa=a(async t=>{let e=await t.buffer(),{url:r,status:n,statusText:o,headers:s,httpVersion:c,decoded:l,counter:u}=t;return new XAr(e,{url:r,status:n,statusText:o,headers:s,httpVersion:c,decoded:l,counter:u})},"cacheableResponse");whi.exports={cacheableResponse:LNa}});var Kft=T((q5f,Phi)=>{"use strict";f();var ZAr=class extends Error{static{a(this,"RequestAbortedError")}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};Phi.exports={RequestAbortedError:ZAr}});var Ohi=T((j5f,Mhi)=>{"use strict";f();var Nhi=require("http"),Dhi=require("https"),{Readable:FNa}=require("stream"),j3=Sx()("helix-fetch:h1"),{RequestAbortedError:khi}=Kft(),{decodeStream:UNa}=q3(),QNa=a((t,e)=>{let{h1:r,options:{h1:n,rejectUnauthorized:o}}=t;return e==="https:"?r.httpsAgent?r.httpsAgent:n||typeof o=="boolean"?(r.httpsAgent=new Dhi.Agent(typeof o=="boolean"?{...n||{},rejectUnauthorized:o}:n),r.httpsAgent):void 0:r.httpAgent?r.httpAgent:n?(r.httpAgent=new Nhi.Agent(n),r.httpAgent):void 0},"getAgent"),qNa=a(t=>{t.h1={}},"setupContext"),GNa=a(async({h1:t})=>{t.httpAgent&&(j3("resetContext: destroying httpAgent"),t.httpAgent.destroy(),delete t.httpAgent),t.httpsAgent&&(j3("resetContext: destroying httpsAgent"),t.httpsAgent.destroy(),delete t.httpsAgent)},"resetContext"),HNa=a((t,e,r)=>{let{statusCode:n,statusMessage:o,httpVersion:s,httpVersionMajor:c,httpVersionMinor:l,headers:u}=t,d=e?UNa(n,u,t,r):t;return{statusCode:n,statusText:o,httpVersion:s,httpVersionMajor:c,httpVersionMinor:l,headers:u,readable:d,decoded:!!(e&&d!==t)}},"createResponse"),jNa=a(async(t,e,r)=>{let{request:n}=e.protocol==="https:"?Dhi:Nhi,o=QNa(t,e.protocol),s={...r,agent:o},{socket:c,body:l}=s;return c&&(delete s.socket,c.assigned||(c.assigned=!0,o?s.agent=new Proxy(o,{get:a((u,d)=>d==="createConnection"&&!c.inUse?(p,h)=>{j3(`agent reusing socket #${c.id} (${c.servername})`),c.inUse=!0,h(null,c)}:u[d],"get")}):s.createConnection=(u,d)=>{j3(`reusing socket #${c.id} (${c.servername})`),c.inUse=!0,d(null,c)})),new Promise((u,d)=>{j3(`${s.method} ${e.href}`);let p,{signal:h}=s,m=a(()=>{h.removeEventListener("abort",m),c&&!c.inUse&&(j3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),d(new khi),p&&p.abort()},"onAbortSignal");if(h){if(h.aborted){d(new khi);return}h.addEventListener("abort",m)}p=n(e,s),p.once("response",g=>{h&&h.removeEventListener("abort",m),c&&!c.inUse&&(j3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),u(HNa(g,s.decode,d))}),p.once("error",g=>{h&&h.removeEventListener("abort",m),c&&!c.inUse&&(j3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),p.aborted||(j3(`${s.method} ${e.href} failed with: ${g.message}`),p.abort(),d(g))}),l instanceof FNa?l.pipe(p):(l&&p.write(l),p.end())})},"h1Request");Mhi.exports={request:jNa,setupContext:qNa,resetContext:GNa}});var Uhi=T((W5f,Fhi)=>{"use strict";f();var{connect:$Na,constants:VNa}=require("http2"),{Readable:WNa}=require("stream"),fu=Sx()("helix-fetch:h2"),{RequestAbortedError:Bhi}=Kft(),{decodeStream:zNa}=q3(),{NGHTTP2_CANCEL:QPe}=VNa,YNa=300*1e3,KNa=5e3,JNa=a(t=>{t.h2={sessionCache:{}}},"setupContext"),XNa=a(async({h2:t})=>Promise.all(Object.values(t.sessionCache).map(e=>new Promise(r=>{e.on("close",r),fu(`resetContext: destroying session (socket #${e.socket&&e.socket.id}, ${e.socket&&e.socket.servername})`),e.destroy()}))),"resetContext"),Lhi=a((t,e,r,n=()=>{})=>{let o={...t},s=o[":status"];delete o[":status"];let c=r?zNa(s,t,e,n):e;return{statusCode:s,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:o,readable:c,decoded:!!(r&&c!==e)}},"createResponse"),ZNa=a((t,e,r,n,o,s)=>{let{options:{h2:{pushPromiseHandler:c,pushHandler:l,pushedStreamIdleTimeout:u=KNa}}}=t,d=o[":path"],p=`${e}${d}`;fu(`received PUSH_PROMISE: ${p}, stream #${n.id}, headers: ${JSON.stringify(o)}, flags: ${s}`),c&&c(p,o,a(()=>{n.close(QPe)},"rejectPush")),n.on("push",(h,m)=>{fu(`received push headers for ${e}${d}, stream #${n.id}, headers: ${JSON.stringify(h)}, flags: ${m}`),n.setTimeout(u,()=>{fu(`closing pushed stream #${n.id} after ${u} ms of inactivity`),n.close(QPe)}),l&&l(p,o,Lhi(h,n,r))}),n.on("aborted",()=>{fu(`pushed stream #${n.id} aborted`)}),n.on("error",h=>{fu(`pushed stream #${n.id} encountered error: ${h}`)}),n.on("frameError",(h,m,g)=>{fu(`pushed stream #${n.id} encountered frameError: type: ${h}, code: ${m}, id: ${g}`)})},"handlePush"),eDa=a(async(t,e,r)=>{let{origin:n,pathname:o,search:s,hash:c}=e,l=`${o}${s}${c}`,{options:{h2:u={}},h2:{sessionCache:d}}=t,{idleSessionTimeout:p=YNa,pushPromiseHandler:h,pushHandler:m}=u,g={...r},{method:A,headers:y,socket:E,body:_,decode:v}=g;return E&&delete g.socket,y.host&&(y[":authority"]=y.host,delete y.host),new Promise((b,I)=>{let x=d[n];if(!x||x.closed||x.destroyed){let Q=!(t.options.rejectUnauthorized===!1||u.rejectUnauthorized===!1),M={...u,rejectUnauthorized:Q};E&&!E.inUse&&(M.createConnection=()=>(fu(`reusing socket #${E.id} (${E.servername})`),E.inUse=!0,E)),x=$Na(n,{...M,settings:{enablePush:!!(h||m)}}),x.setMaxListeners(1e3),x.setTimeout(p,()=>{fu(`closing session ${n} after ${p} ms of inactivity`),x.close()}),x.once("connect",()=>{fu(`session ${n} established`),fu(`caching session ${n}`),d[n]=x}),x.on("localSettings",G=>{fu(`session ${n} localSettings: ${JSON.stringify(G)}`)}),x.on("remoteSettings",G=>{fu(`session ${n} remoteSettings: ${JSON.stringify(G)}`)}),x.once("close",()=>{fu(`session ${n} closed`),d[n]===x&&(fu(`discarding cached session ${n}`),delete d[n])}),x.once("error",G=>{fu(`session ${n} encountered error: ${G}`),d[n]===x&&(fu(`discarding cached session ${n}`),delete d[n])}),x.on("frameError",(G,O,N)=>{fu(`session ${n} encountered frameError: type: ${G}, code: ${O}, id: ${N}`)}),x.once("goaway",(G,O,N)=>{fu(`session ${n} received GOAWAY frame: errorCode: ${G}, lastStreamID: ${O}, opaqueData: ${N?N.toString():void 0}`)}),x.on("stream",(G,O,N)=>{ZNa(t,n,v,G,O,N)})}else E&&E.id!==x.socket.id&&!E.inUse&&(fu(`discarding redundant socket used for ALPN: #${E.id} ${E.servername}`),E.destroy());fu(`${A} ${e.host}${l}`);let R,{signal:w}=g,P=a(()=>{w.removeEventListener("abort",P),I(new Bhi),R&&R.close(QPe)},"onAbortSignal");if(w){if(w.aborted){I(new Bhi);return}w.addEventListener("abort",P)}let k=a(Q=>{fu(`session ${n} encountered error during ${g.method} ${e.href}: ${Q}`),I(Q)},"onSessionError");x.once("error",k),R=x.request({":method":A,":path":l,...y}),R.once("response",Q=>{x.off("error",k),w&&w.removeEventListener("abort",P),b(Lhi(Q,R,g.decode,I))}),R.once("error",Q=>{x.off("error",k),w&&w.removeEventListener("abort",P),R.rstCode!==QPe&&(fu(`${g.method} ${e.href} failed with: ${Q.message}`),R.close(QPe),I(Q))}),R.once("frameError",(Q,M,D)=>{x.off("error",k),fu(`encountered frameError during ${g.method} ${e.href}: type: ${Q}, code: ${M}, id: ${D}`)}),R.on("push",(Q,M)=>{fu(`received 'push' event: headers: ${JSON.stringify(Q)}, flags: ${M}`)}),_ instanceof WNa?_.pipe(R):(_&&R.write(_),R.end())})},"request");Fhi.exports={request:eDa,setupContext:JNa,resetContext:XNa}});var qhi=T((K5f,Qhi)=>{"use strict";f();var{EventEmitter:tDa}=require("events"),rDa=a(()=>{let t={},e=new tDa;return e.setMaxListeners(0),{acquire:a(r=>new Promise(n=>{if(!t[r]){t[r]=!0,n();return}let o=a(s=>{t[r]||(t[r]=!0,e.removeListener(r,o),n(s))},"tryAcquire");e.on(r,o)}),"acquire"),release:a((r,n)=>{Reflect.deleteProperty(t,r),setImmediate(()=>e.emit(r,n))},"release")}},"lock");Qhi.exports=rDa});var Ghi=T((Z5f,nDa)=>{nDa.exports={name:"@adobe/helix-fetch",version:"3.1.1",description:"Light-weight Fetch implementation transparently supporting both HTTP/1(.1) and HTTP/2",main:"src/index.js",scripts:{test:"nyc mocha",lint:"./node_modules/.bin/eslint .","semantic-release":"semantic-release"},mocha:{timeout:"5000",recursive:"true",reporter:"mocha-multi-reporters","reporter-options":"configFile=.mocha-multi.json"},engines:{node:">=12.0"},types:"src/index.d.ts",exports:{import:"./src/index.mjs",require:"./src/index.js"},repository:{type:"git",url:"https://github.com/adobe/helix-fetch"},author:"",license:"Apache-2.0",bugs:{url:"https://github.com/adobe/helix-fetch/issues"},homepage:"https://github.com/adobe/helix-fetch#readme",keywords:["fetch","whatwg","Fetch API","http","https","http2","h2","promise","async","request","RFC 7234","7234","caching","cache"],dependencies:{debug:"4.3.4","http-cache-semantics":"^4.1.1","lru-cache":"7.13.1"},devDependencies:{"@adobe/eslint-config-helix":"1.3.2","@semantic-release/changelog":"6.0.1","@semantic-release/git":"10.0.1",chai:"4.3.6","chai-as-promised":"7.1.1","chai-bytes":"0.1.2","chai-iterator":"3.0.2",eslint:"8.21.0","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","formdata-node":"4.3.3","lint-staged":"13.0.3",mocha:"10.0.0","mocha-multi-reporters":"1.5.1",nock:"13.2.9",nyc:"15.1.0","parse-cache-control":"1.0.1",pem:"1.14.6",proxy:"^1.0.2","semantic-release":"19.0.3",sinon:"14.0.0","stream-buffers":"3.0.2",tunnel:"^0.0.6"},"lint-staged":{"*.js":"eslint"},config:{commitizen:{path:"node_modules/cz-conventional-changelog"},ghooks:{"pre-commit":"npx lint-staged"}}}});var Whi=T((eMf,Vhi)=>{"use strict";f();var{Readable:iDa}=require("stream"),oDa=require("tls"),{types:{isAnyArrayBuffer:sDa}}=require("util"),aDa=GAr(),eyr=Sx()("helix-fetch:core"),{RequestAbortedError:Jft}=Kft(),tyr=Ohi(),Xft=Uhi(),cDa=qhi(),{isPlainObject:lDa}=q3(),{isFormData:uDa,FormDataSerializer:dDa}=UPe(),{version:fDa}=Ghi(),ryr="h2",nyr="h2c",iyr="http/1.0",pX="http/1.1",pDa=100,hDa=3600*1e3,mDa=[ryr,pX,iyr],gDa=`helix-fetch/${fDa}`,ADa={method:"GET",compress:!0,decode:!0},Hhi=0,jhi=cDa(),$hi=a((t,e)=>new Promise((r,n)=>{let{signal:o}=e,s,c=a(()=>{o.removeEventListener("abort",c);let d=new Jft;n(d),s&&s.destroy(d)},"onAbortSignal");if(o){if(o.aborted){n(new Jft);return}o.addEventListener("abort",c)}let l=+t.port||443,u=a(d=>{o&&o.removeEventListener("abort",c),d instanceof Jft||(eyr(`connecting to ${t.hostname}:${l} failed with: ${d.message}`),n(d))},"onError");s=oDa.connect(l,t.hostname,e),s.once("secureConnect",()=>{o&&o.removeEventListener("abort",c),s.off("error",u),Hhi+=1,s.id=Hhi,s.secureConnecting=!1,eyr(`established TLS connection: #${s.id} (${s.servername})`),r(s)}),s.once("error",u)}),"connectTLS"),yDa=a(async(t,e)=>{let r=await jhi.acquire(t.origin);try{return r||(r=await $hi(t,e)),r}finally{jhi.release(t.origin,r)}},"connect"),EDa=a(async(t,e,r)=>{let n=`${e.protocol}//${e.host}`,o=t.alpnCache.get(n);if(o)return{protocol:o};switch(e.protocol){case"http:":return o=pX,t.alpnCache.set(n,o),{protocol:o};case"http2:":return o=nyr,t.alpnCache.set(n,o),{protocol:o};case"https:":break;default:throw new TypeError(`unsupported protocol: ${e.protocol}`)}let{options:{rejectUnauthorized:s,h1:c={},h2:l={}}}=t,u=!(s===!1||c.rejectUnauthorized===!1||l.rejectUnauthorized===!1),d={servername:e.hostname,ALPNProtocols:t.alpnProtocols,signal:r,rejectUnauthorized:u};t.options.ca&&(d.ca=t.options.ca);let p=await yDa(e,d);return o=p.alpnProtocol,o||(o=pX),t.alpnCache.set(n,o),{protocol:o,socket:p}},"determineProtocol"),CDa=a(t=>{let e={};return Object.keys(t).forEach(r=>{e[r.toLowerCase()]=t[r]}),e},"sanitizeHeaders"),_Da=a(async(t,e,r,n)=>{let o=e.protocol==="https:",s;e.port?s=e.port:o?s=443:s=80;let c={...r,host:e.host,hostname:e.hostname,port:s},l=await t(c);if(o){let d={...c,ALPNProtocols:n};d.socket=l,d.servername=c.host;let p=await $hi(e,d);return{protocol:p.alpnProtocol||pX,socket:p}}return{protocol:l.alpnProtocol||pX,socket:l}},"getProtocolAndSocketFromFactory"),vDa=a(async(t,e,r)=>{let n=new URL(e),o={...ADa,...r||{}};typeof o.method=="string"&&(o.method=o.method.toUpperCase()),o.headers=CDa(o.headers||{}),o.headers.host===void 0&&(o.headers.host=n.host),t.userAgent&&o.headers["user-agent"]===void 0&&(o.headers["user-agent"]=t.userAgent);let s;if(o.body instanceof URLSearchParams)s="application/x-www-form-urlencoded; charset=utf-8",o.body=o.body.toString();else if(uDa(o.body)){let d=new dDa(o.body);s=d.contentType(),o.body=d.stream(),o.headers["transfer-encoding"]===void 0&&o.headers["content-length"]===void 0&&(o.headers["content-length"]=String(d.length()))}else typeof o.body=="string"||o.body instanceof String?s="text/plain; charset=utf-8":lDa(o.body)?(o.body=JSON.stringify(o.body),s="application/json"):sDa(o.body)&&(o.body=Buffer.from(o.body));o.headers["content-type"]===void 0&&s!==void 0&&(o.headers["content-type"]=s),o.body!=null&&(o.body instanceof iDa||(!(typeof o.body=="string"||o.body instanceof String)&&!Buffer.isBuffer(o.body)&&(o.body=String(o.body)),o.headers["transfer-encoding"]===void 0&&o.headers["content-length"]===void 0&&(o.headers["content-length"]=String(Buffer.isBuffer(o.body)?o.body.length:Buffer.byteLength(o.body,"utf-8"))))),o.headers.accept===void 0&&(o.headers.accept="*/*"),o.body==null&&["POST","PUT"].includes(o.method)&&(o.headers["content-length"]="0"),o.compress&&o.headers["accept-encoding"]===void 0&&(o.headers["accept-encoding"]="gzip,deflate,br");let{signal:c}=o,{protocol:l,socket:u=null}=t.socketFactory?await _Da(t.socketFactory,n,o,t.alpnProtocols):await EDa(t,n,c);switch(eyr(`${n.host} -> ${l}`),l){case ryr:try{return await Xft.request(t,n,u?{...o,socket:u}:o)}catch(d){let{code:p,message:h}=d;throw p==="ERR_HTTP2_ERROR"&&h==="Protocol error"&&t.alpnCache.delete(`${n.protocol}//${n.host}`),d}case nyr:return Xft.request(t,new URL(`http://${n.host}${n.pathname}${n.hash}${n.search}`),u?{...o,socket:u}:o);case iyr:case pX:return tyr.request(t,n,u?{...o,socket:u}:o);default:throw new TypeError(`unsupported protocol: ${l}`)}},"request"),bDa=a(async t=>(t.alpnCache.clear(),Promise.all([tyr.resetContext(t),Xft.resetContext(t)])),"resetContext"),TDa=a(t=>{let{options:{alpnProtocols:e=mDa,alpnCacheTTL:r=hDa,alpnCacheSize:n=pDa,userAgent:o=gDa,socketFactory:s}}=t;t.alpnProtocols=e,t.alpnCache=new aDa({max:n,ttl:r}),t.userAgent=o,t.socketFactory=s,tyr.setupContext(t),Xft.setupContext(t)},"setupContext");Vhi.exports={request:vDa,setupContext:TDa,resetContext:bDa,RequestAbortedError:Jft,ALPN_HTTP2:ryr,ALPN_HTTP2C:nyr,ALPN_HTTP1_1:pX,ALPN_HTTP1_0:iyr}});var Yhi=T((nMf,zhi)=>{"use strict";f();var SDa=Sx()("helix-fetch:core"),{request:IDa,setupContext:xDa,resetContext:wDa,RequestAbortedError:RDa,ALPN_HTTP2:PDa,ALPN_HTTP2C:kDa,ALPN_HTTP1_1:NDa,ALPN_HTTP1_0:DDa}=Whi(),oyr=class t{static{a(this,"RequestContext")}constructor(e){this.options={...e||{}},xDa(this)}api(){return{request:a(async(e,r)=>this.request(e,r),"request"),context:a((e={})=>new t(e).api(),"context"),setCA:a(e=>this.setCA(e),"setCA"),reset:a(async()=>this.reset(),"reset"),RequestAbortedError:RDa,ALPN_HTTP2:PDa,ALPN_HTTP2C:kDa,ALPN_HTTP1_1:NDa,ALPN_HTTP1_0:DDa}}async request(e,r){return IDa(this,e,r)}setCA(e){this.options.ca=e}async reset(){return SDa("resetting context"),wDa(this)}};zhi.exports=new oyr().api()});var emi=T((sMf,Zhi)=>{"use strict";f();var{EventEmitter:MDa}=require("events"),{Readable:qPe}=require("stream"),syr=Sx()("helix-fetch"),ODa=GAr(),{Body:BDa}=Hft(),{Headers:uyr}=b0e(),{Request:hX}=Ehi(),{Response:cyr}=YAr(),{FetchBaseError:LDa,FetchError:GPe,AbortError:Zft}=$Ar(),{AbortController:FDa,AbortSignal:UDa,TimeoutSignal:QDa}=VAr(),qDa=Ihi(),{cacheableResponse:GDa}=Rhi(),{sizeof:HDa}=q3(),{isFormData:jDa}=UPe(),{context:$Da,RequestAbortedError:VDa}=Yhi(),Khi=["GET","HEAD"],WDa=500,zDa=100*1024*1024,ayr="push",Jhi=a(async(t,e,r)=>{let{request:n}=t.context,o=e instanceof hX&&typeof r>"u"?e:new hX(e,r),{method:s,body:c,signal:l,compress:u,decode:d,follow:p,redirect:h,init:{body:m}}=o,g;if(l&&l.aborted){let x=new Zft("The operation was aborted.");throw o.init.body instanceof qPe&&o.init.body.destroy(x),x}try{g=await n(o.url,{...r,method:s,headers:o.headers.plain(),body:m&&!(m instanceof qPe)&&!jDa(m)?m:c,compress:u,decode:d,follow:p,redirect:h,signal:l})}catch(x){throw m instanceof qPe&&m.destroy(x),x instanceof TypeError?x:x instanceof VDa?new Zft("The operation was aborted."):new GPe(x.message,"system",x)}let A=a(()=>{l.removeEventListener("abort",A);let x=new Zft("The operation was aborted.");o.init.body instanceof qPe&&o.init.body.destroy(x),g.readable.emit("error",x)},"abortHandler");l&&l.addEventListener("abort",A);let{statusCode:y,statusText:E,httpVersion:_,headers:v,readable:b,decoded:I}=g;if([301,302,303,307,308].includes(y)){let{location:x}=v,R=x==null?null:new URL(x,o.url);switch(o.redirect){case"manual":break;case"error":throw l&&l.removeEventListener("abort",A),new GPe(`uri requested responds with a redirect, redirect mode is set to 'error': ${o.url}`,"no-redirect");case"follow":{if(R===null)break;if(o.counter>=o.follow)throw l&&l.removeEventListener("abort",A),new GPe(`maximum redirect reached at: ${o.url}`,"max-redirect");let w={headers:new uyr(o.headers),follow:o.follow,compress:o.compress,decode:o.decode,counter:o.counter+1,method:o.method,body:o.body,signal:o.signal};if(y!==303&&o.body&&o.init.body instanceof qPe)throw l&&l.removeEventListener("abort",A),new GPe("Cannot follow redirect with body being a readable stream","unsupported-redirect");return(y===303||(y===301||y===302)&&o.method==="POST")&&(w.method="GET",w.body=void 0,w.headers.delete("content-length")),l&&l.removeEventListener("abort",A),Jhi(t,new hX(R,w))}default:}}return l&&(b.once("end",()=>{l.removeEventListener("abort",A)}),b.once("error",()=>{l.removeEventListener("abort",A)})),new cyr(b,{url:o.url,status:y,statusText:E,headers:v,httpVersion:_,decoded:I,counter:o.counter})},"fetch"),Xhi=a(async(t,e,r)=>{if(t.options.maxCacheSize===0||!Khi.includes(e.method))return r;let n=new qDa(e,r,{shared:!1});if(n.storable()){let o=await GDa(r);return t.cache.set(e.url,{policy:n,response:o},n.timeToLive()),o}else return r},"cacheResponse"),YDa=a(async(t,e,r)=>{let n=new hX(e,r);if(t.options.maxCacheSize!==0&&Khi.includes(n.method)&&!["no-store","reload"].includes(n.cache)){let{policy:c,response:l}=t.cache.get(n.url)||{};if(c&&c.satisfiesWithoutRevalidation(n)){l.headers=new uyr(c.responseHeaders(l));let u=l.clone();return u.fromCache=!0,u}}let s=await Jhi(t,n);return n.cache!=="no-store"?Xhi(t,n,s):s},"cachingFetch"),KDa=a((t,e={})=>{let r=new URL(t);if(typeof e!="object"||Array.isArray(e))throw new TypeError("qs: object expected");return Object.entries(e).forEach(([n,o])=>{Array.isArray(o)?o.forEach(s=>r.searchParams.append(n,s)):r.searchParams.append(n,o)}),r.href},"createUrl"),JDa=a(t=>new QDa(t),"timeoutSignal"),lyr=class t{static{a(this,"FetchContext")}constructor(e){this.options={...e};let{maxCacheSize:r}=this.options,n=typeof r=="number"&&r>=0?r:zDa,o=WDa;n===0&&(n=1,o=1);let s=a(({response:l},u)=>HDa(l),"sizeCalculation");this.cache=new ODa({max:o,maxSize:n,sizeCalculation:s}),this.eventEmitter=new MDa,this.options.h2=this.options.h2||{},typeof this.options.h2.enablePush>"u"&&(this.options.h2.enablePush=!0);let{enablePush:c}=this.options.h2;c&&(this.options.h2.pushPromiseHandler=(l,u,d)=>{let p={...u};Object.keys(p).filter(h=>h.startsWith(":")).forEach(h=>delete p[h]),this.pushPromiseHandler(l,p,d)},this.options.h2.pushHandler=(l,u,d)=>{let p={...u};Object.keys(p).filter(_=>_.startsWith(":")).forEach(_=>delete p[_]);let{statusCode:h,statusText:m,httpVersion:g,headers:A,readable:y,decoded:E}=d;this.pushHandler(l,p,new cyr(y,{url:l,status:h,statusText:m,headers:A,httpVersion:g,decoded:E}))}),this.context=$Da(this.options)}api(){return{fetch:a(async(e,r)=>this.fetch(e,r),"fetch"),Body:BDa,Headers:uyr,Request:hX,Response:cyr,AbortController:FDa,AbortSignal:UDa,FetchBaseError:LDa,FetchError:GPe,AbortError:Zft,context:a((e={})=>new t(e).api(),"context"),setCA:a(e=>this.setCA(e),"setCA"),noCache:a((e={})=>new t({...e,maxCacheSize:0}).api(),"noCache"),h1:a((e={})=>new t({...e,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1"),keepAlive:a((e={})=>new t({...e,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAlive"),h1NoCache:a((e={})=>new t({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1NoCache"),keepAliveNoCache:a((e={})=>new t({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAliveNoCache"),reset:a(async()=>this.context.reset(),"reset"),onPush:a(e=>this.onPush(e),"onPush"),offPush:a(e=>this.offPush(e),"offPush"),createUrl:KDa,timeoutSignal:JDa,clearCache:a(()=>this.clearCache(),"clearCache"),cacheStats:a(()=>this.cacheStats(),"cacheStats"),ALPN_HTTP2:this.context.ALPN_HTTP2,ALPN_HTTP2C:this.context.ALPN_HTTP2C,ALPN_HTTP1_1:this.context.ALPN_HTTP1_1,ALPN_HTTP1_0:this.context.ALPN_HTTP1_0}}async fetch(e,r){return YDa(this,e,r)}setCA(e){this.options.ca=e,this.context.setCA(e)}onPush(e){return this.eventEmitter.on(ayr,e)}offPush(e){return this.eventEmitter.off(ayr,e)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(e,r,n){syr(`received server push promise: ${e}, headers: ${JSON.stringify(r)}`);let o=new hX(e,{headers:r}),{policy:s}=this.cache.get(e)||{};s&&s.satisfiesWithoutRevalidation(o)&&(syr(`already cached, reject push promise: ${e}, headers: ${JSON.stringify(r)}`),n())}async pushHandler(e,r,n){syr(`caching resource pushed by server: ${e}, reqHeaders: ${JSON.stringify(r)}, status: ${n.status}, respHeaders: ${JSON.stringify(n.headers)}`);let o=await Xhi(this,new hX(e,{headers:r}),n);this.eventEmitter.emit(ayr,e,o)}};Zhi.exports=new lyr().api()});var rmi=T((lMf,tmi)=>{"use strict";f();tmi.exports=emi()});var Ayr=T((hBf,Imi)=>{f();var gyr=require("fs"),l0t=require("path"),$Pe=l0t.join,T5a=l0t.dirname,Tmi=gyr.accessSync&&function(t){try{gyr.accessSync(t)}catch{return!1}return!0}||gyr.existsSync||l0t.existsSync,Smi={arrow:process.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","compiled","platform","arch","bindings"]]};function S5a(t){typeof t=="string"?t={bindings:t}:t||(t={}),Object.keys(Smi).map(function(u){u in t||(t[u]=Smi[u])}),t.module_root||(t.module_root=I5a(__filename)),l0t.extname(t.bindings)!=".node"&&(t.bindings+=".node");for(var e=typeof __webpack_require__=="function"?__non_webpack_require__:require,r=[],n=0,o=t.try.length,s,c,l;n{let r=0;for(let[n,o]of t)r+=Buffer.byteLength(mmi(e,n,o)),r+=hyr(o)?o.size:Buffer.byteLength(String(o)),r+=Buffer.byteLength(`\r +`);return r+=Buffer.byteLength(hmi(e)),r},"getFormDataLength"),pyr=class{static{a(this,"FormDataSerializer")}constructor(e){this.fd=e,this.boundary=cNa(8).toString("hex")}length(){return typeof this._length>"u"&&(this._length=fNa(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return lNa.from(dNa(this.fd,this.boundary))}};gmi.exports={isFormData:uNa,FormDataSerializer:pyr}});var ymi=T((V4f,Ami)=>{"use strict";f();var{AbortSignal:$4f}=fyr(),{Body:pNa,cloneStream:hNa,guessContentType:mNa}=Jdt(),{Headers:gNa}=Lfe(),{isPlainObject:ANa}=b3(),{isFormData:yNa,FormDataSerializer:ENa}=B2e(),_Na=20,LQ=Symbol("Request internals"),rft=class t extends pNa{static{a(this,"Request")}constructor(e,r={}){let n=e instanceof t?e:null,o=n?new URL(n.url):new URL(e),s=r.method||n&&n.method||"GET";if(s=s.toUpperCase(),(r.body!=null||n&&n.body!==null)&&["GET","HEAD"].includes(s))throw new TypeError("Request with GET/HEAD method cannot have body");let c=r.body||(n&&n.body?hNa(n):null),l=new gNa(r.headers||n&&n.headers||{});if(yNa(c)&&!l.has("content-type")){let h=new ENa(c);c=h.stream(),l.set("content-type",h.contentType()),!l.has("transfer-encoding")&&!l.has("content-length")&&l.set("content-length",h.length())}if(!l.has("content-type"))if(ANa(c))c=JSON.stringify(c),l.set("content-type","application/json");else{let h=mNa(c);h&&l.set("content-type",h)}super(c);let u=n?n.signal:null;"signal"in r&&(u=r.signal);let d=r.redirect||n&&n.redirect||"follow";if(!["follow","error","manual"].includes(d))throw new TypeError(`'${d}' is not a valid redirect option`);let p=r.cache||n&&n.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(p))throw new TypeError(`'${p}' is not a valid cache option`);this[LQ]={init:{...r},method:s,redirect:d,cache:p,headers:l,parsedURL:o,signal:u},r.follow===void 0?!n||n.follow===void 0?this.follow=_Na:this.follow=n.follow:this.follow=r.follow,this.counter=r.counter||n&&n.counter||0,r.compress===void 0?!n||n.compress===void 0?this.compress=!0:this.compress=n.compress:this.compress=r.compress,r.decode===void 0?!n||n.decode===void 0?this.decode=!0:this.decode=n.decode:this.decode=r.decode}get method(){return this[LQ].method}get url(){return this[LQ].parsedURL.toString()}get headers(){return this[LQ].headers}get redirect(){return this[LQ].redirect}get cache(){return this[LQ].cache}get signal(){return this[LQ].signal}clone(){return new t(this)}get init(){return this[LQ].init}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(rft.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});Ami.exports={Request:rft}});var myr=T((Y4f,Emi)=>{"use strict";f();var{Body:CNa,cloneStream:vNa,guessContentType:bNa}=Jdt(),{Headers:TNa}=Lfe(),{isPlainObject:SNa}=b3(),{isFormData:INa,FormDataSerializer:xNa}=B2e(),p2=Symbol("Response internals"),nft=class t extends CNa{static{a(this,"Response")}constructor(e=null,r={}){let n=new TNa(r.headers),o=e;if(INa(o)&&!n.has("content-type")){let s=new xNa(o);o=s.stream(),n.set("content-type",s.contentType()),!n.has("transfer-encoding")&&!n.has("content-length")&&n.set("content-length",s.length())}if(o!==null&&!n.has("content-type"))if(SNa(o))o=JSON.stringify(o),n.set("content-type","application/json");else{let s=bNa(o);s&&n.set("content-type",s)}super(o),this[p2]={url:r.url,status:r.status||200,statusText:r.statusText||"",headers:n,httpVersion:r.httpVersion,decoded:r.decoded,counter:r.counter}}get url(){return this[p2].url||""}get status(){return this[p2].status}get statusText(){return this[p2].statusText}get ok(){return this[p2].status>=200&&this[p2].status<300}get redirected(){return this[p2].counter>0}get headers(){return this[p2].headers}get httpVersion(){return this[p2].httpVersion}get decoded(){return this[p2].decoded}static redirect(e,r=302){if(![301,302,303,307,308].includes(r))throw new RangeError("Invalid status code");return new t(null,{headers:{location:new URL(e).toString()},status:r})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new t(vNa(this),{...this[p2]})}get[Symbol.toStringTag](){return this.constructor.name}};Object.defineProperties(nft.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});Emi.exports={Response:nft}});var Cmi=T((Z4f,_mi)=>{"use strict";f();var wNa=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),RNa=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),PNa=new Set([500,502,503,504]),kNa={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},DNa={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function EJ(t){let e=parseInt(t,10);return isFinite(e)?e:0}a(EJ,"toNumberOrZero");function NNa(t){return t?PNa.has(t.status):!0}a(NNa,"isErrorResponse");function gyr(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[o,s]=n.split(/=/,2);e[o.trim()]=s===void 0?!0:s.trim().replace(/^"|"$/g,"")}return e}a(gyr,"parseCacheControl");function MNa(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}a(MNa,"formatCacheControl");_mi.exports=class{static{a(this,"CachePolicy")}constructor(e,r,{shared:n,cacheHeuristic:o,immutableMinTimeToLive:s,ignoreCargoCult:c,_fromObject:l}={}){if(l){this._fromObject(l);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=o!==void 0?o:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=gyr(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=gyr(e.headers["cache-control"]),c&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":MNa(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&RNa.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||wNa.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=gyr(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let n in e)kNa[n]||(r[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let o of n)delete r[o]}if(r.warning){let n=r.warning.split(/,/).filter(o=>!/^\s*1[0-9][0-9]/.test(o));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return EJ(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return EJ(this._rescc["s-maxage"])}if(this._rescc["max-age"])return EJ(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||nn)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+EJ(this._rescc["stale-if-error"]),n=e+EJ(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+EJ(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+EJ(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let o=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));o.length?r["if-none-match"]=o.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&NNa(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let o={};for(let c in this._resHeaders)o[c]=c in r.headers&&!DNa[c]?r.headers[c]:this._resHeaders[c];let s=Object.assign({},r,{status:this._status,method:this._method,headers:o});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var Smi=T((rOf,Tmi)=>{"use strict";f();var ONa=Cmi(),{Headers:BNa}=Lfe(),vmi=a(t=>({url:t.url,method:t.method,headers:t.headers.plain()}),"convertRequest"),bmi=a(t=>({status:t.status,headers:t.headers.plain()}),"convertResponse"),Ayr=class{static{a(this,"CachePolicyWrapper")}constructor(e,r,n){this.policy=new ONa(vmi(e),bmi(r),n)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(e){return this.policy.satisfiesWithoutRevalidation(vmi(e))}responseHeaders(e){return new BNa(this.policy.responseHeaders(bmi(e)))}timeToLive(){return this.policy.timeToLive()}};Tmi.exports=Ayr});var wmi=T((oOf,xmi)=>{"use strict";f();var{Readable:LNa}=require("stream"),{Headers:Imi}=Lfe(),{Response:FNa}=myr(),FQ=Symbol("CacheableResponse internals"),UNa=a(t=>t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),"toArrayBuffer"),yyr=class t extends FNa{static{a(this,"CacheableResponse")}constructor(e,r){super(e,r);let n=new Imi(r.headers);this[FQ]={headers:n,bufferedBody:e}}get headers(){return this[FQ].headers}set headers(e){if(e instanceof Imi)this[FQ].headers=e;else throw new TypeError("instance of Headers expected")}get body(){return LNa.from(this[FQ].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[FQ].bufferedBody}async arrayBuffer(){return UNa(this[FQ].bufferedBody)}async text(){return this[FQ].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){let{url:e,status:r,statusText:n,headers:o,httpVersion:s,decoded:c,counter:l}=this;return new t(this[FQ].bufferedBody,{url:e,status:r,statusText:n,headers:o,httpVersion:s,decoded:c,counter:l})}get[Symbol.toStringTag](){return this.constructor.name}},QNa=a(async t=>{let e=await t.buffer(),{url:r,status:n,statusText:o,headers:s,httpVersion:c,decoded:l,counter:u}=t;return new yyr(e,{url:r,status:n,statusText:o,headers:s,httpVersion:c,decoded:l,counter:u})},"cacheableResponse");xmi.exports={cacheableResponse:QNa}});var ift=T((cOf,Rmi)=>{"use strict";f();var Eyr=class extends Error{static{a(this,"RequestAbortedError")}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};Rmi.exports={RequestAbortedError:Eyr}});var Mmi=T((dOf,Nmi)=>{"use strict";f();var kmi=require("http"),Dmi=require("https"),{Readable:qNa}=require("stream"),I3=hx()("helix-fetch:h1"),{RequestAbortedError:Pmi}=ift(),{decodeStream:GNa}=b3(),HNa=a((t,e)=>{let{h1:r,options:{h1:n,rejectUnauthorized:o}}=t;return e==="https:"?r.httpsAgent?r.httpsAgent:n||typeof o=="boolean"?(r.httpsAgent=new Dmi.Agent(typeof o=="boolean"?{...n||{},rejectUnauthorized:o}:n),r.httpsAgent):void 0:r.httpAgent?r.httpAgent:n?(r.httpAgent=new kmi.Agent(n),r.httpAgent):void 0},"getAgent"),jNa=a(t=>{t.h1={}},"setupContext"),$Na=a(async({h1:t})=>{t.httpAgent&&(I3("resetContext: destroying httpAgent"),t.httpAgent.destroy(),delete t.httpAgent),t.httpsAgent&&(I3("resetContext: destroying httpsAgent"),t.httpsAgent.destroy(),delete t.httpsAgent)},"resetContext"),VNa=a((t,e,r)=>{let{statusCode:n,statusMessage:o,httpVersion:s,httpVersionMajor:c,httpVersionMinor:l,headers:u}=t,d=e?GNa(n,u,t,r):t;return{statusCode:n,statusText:o,httpVersion:s,httpVersionMajor:c,httpVersionMinor:l,headers:u,readable:d,decoded:!!(e&&d!==t)}},"createResponse"),WNa=a(async(t,e,r)=>{let{request:n}=e.protocol==="https:"?Dmi:kmi,o=HNa(t,e.protocol),s={...r,agent:o},{socket:c,body:l}=s;return c&&(delete s.socket,c.assigned||(c.assigned=!0,o?s.agent=new Proxy(o,{get:a((u,d)=>d==="createConnection"&&!c.inUse?(p,h)=>{I3(`agent reusing socket #${c.id} (${c.servername})`),c.inUse=!0,h(null,c)}:u[d],"get")}):s.createConnection=(u,d)=>{I3(`reusing socket #${c.id} (${c.servername})`),c.inUse=!0,d(null,c)})),new Promise((u,d)=>{I3(`${s.method} ${e.href}`);let p,{signal:h}=s,m=a(()=>{h.removeEventListener("abort",m),c&&!c.inUse&&(I3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),d(new Pmi),p&&p.abort()},"onAbortSignal");if(h){if(h.aborted){d(new Pmi);return}h.addEventListener("abort",m)}p=n(e,s),p.once("response",g=>{h&&h.removeEventListener("abort",m),c&&!c.inUse&&(I3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),u(VNa(g,s.decode,d))}),p.once("error",g=>{h&&h.removeEventListener("abort",m),c&&!c.inUse&&(I3(`discarding redundant socket used for ALPN: #${c.id} ${c.servername}`),c.destroy()),p.aborted||(I3(`${s.method} ${e.href} failed with: ${g.message}`),p.abort(),d(g))}),l instanceof qNa?l.pipe(p):(l&&p.write(l),p.end())})},"h1Request");Nmi.exports={request:WNa,setupContext:jNa,resetContext:$Na}});var Fmi=T((hOf,Lmi)=>{"use strict";f();var{connect:zNa,constants:YNa}=require("http2"),{Readable:KNa}=require("stream"),iu=hx()("helix-fetch:h2"),{RequestAbortedError:Omi}=ift(),{decodeStream:JNa}=b3(),{NGHTTP2_CANCEL:L2e}=YNa,XNa=300*1e3,ZNa=5e3,eMa=a(t=>{t.h2={sessionCache:{}}},"setupContext"),tMa=a(async({h2:t})=>Promise.all(Object.values(t.sessionCache).map(e=>new Promise(r=>{e.on("close",r),iu(`resetContext: destroying session (socket #${e.socket&&e.socket.id}, ${e.socket&&e.socket.servername})`),e.destroy()}))),"resetContext"),Bmi=a((t,e,r,n=()=>{})=>{let o={...t},s=o[":status"];delete o[":status"];let c=r?JNa(s,t,e,n):e;return{statusCode:s,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:o,readable:c,decoded:!!(r&&c!==e)}},"createResponse"),rMa=a((t,e,r,n,o,s)=>{let{options:{h2:{pushPromiseHandler:c,pushHandler:l,pushedStreamIdleTimeout:u=ZNa}}}=t,d=o[":path"],p=`${e}${d}`;iu(`received PUSH_PROMISE: ${p}, stream #${n.id}, headers: ${JSON.stringify(o)}, flags: ${s}`),c&&c(p,o,a(()=>{n.close(L2e)},"rejectPush")),n.on("push",(h,m)=>{iu(`received push headers for ${e}${d}, stream #${n.id}, headers: ${JSON.stringify(h)}, flags: ${m}`),n.setTimeout(u,()=>{iu(`closing pushed stream #${n.id} after ${u} ms of inactivity`),n.close(L2e)}),l&&l(p,o,Bmi(h,n,r))}),n.on("aborted",()=>{iu(`pushed stream #${n.id} aborted`)}),n.on("error",h=>{iu(`pushed stream #${n.id} encountered error: ${h}`)}),n.on("frameError",(h,m,g)=>{iu(`pushed stream #${n.id} encountered frameError: type: ${h}, code: ${m}, id: ${g}`)})},"handlePush"),nMa=a(async(t,e,r)=>{let{origin:n,pathname:o,search:s,hash:c}=e,l=`${o}${s}${c}`,{options:{h2:u={}},h2:{sessionCache:d}}=t,{idleSessionTimeout:p=XNa,pushPromiseHandler:h,pushHandler:m}=u,g={...r},{method:A,headers:y,socket:E,body:_,decode:v}=g;return E&&delete g.socket,y.host&&(y[":authority"]=y.host,delete y.host),new Promise((b,I)=>{let x=d[n];if(!x||x.closed||x.destroyed){let Q=!(t.options.rejectUnauthorized===!1||u.rejectUnauthorized===!1),M={...u,rejectUnauthorized:Q};E&&!E.inUse&&(M.createConnection=()=>(iu(`reusing socket #${E.id} (${E.servername})`),E.inUse=!0,E)),x=zNa(n,{...M,settings:{enablePush:!!(h||m)}}),x.setMaxListeners(1e3),x.setTimeout(p,()=>{iu(`closing session ${n} after ${p} ms of inactivity`),x.close()}),x.once("connect",()=>{iu(`session ${n} established`),iu(`caching session ${n}`),d[n]=x}),x.on("localSettings",G=>{iu(`session ${n} localSettings: ${JSON.stringify(G)}`)}),x.on("remoteSettings",G=>{iu(`session ${n} remoteSettings: ${JSON.stringify(G)}`)}),x.once("close",()=>{iu(`session ${n} closed`),d[n]===x&&(iu(`discarding cached session ${n}`),delete d[n])}),x.once("error",G=>{iu(`session ${n} encountered error: ${G}`),d[n]===x&&(iu(`discarding cached session ${n}`),delete d[n])}),x.on("frameError",(G,O,D)=>{iu(`session ${n} encountered frameError: type: ${G}, code: ${O}, id: ${D}`)}),x.once("goaway",(G,O,D)=>{iu(`session ${n} received GOAWAY frame: errorCode: ${G}, lastStreamID: ${O}, opaqueData: ${D?D.toString():void 0}`)}),x.on("stream",(G,O,D)=>{rMa(t,n,v,G,O,D)})}else E&&E.id!==x.socket.id&&!E.inUse&&(iu(`discarding redundant socket used for ALPN: #${E.id} ${E.servername}`),E.destroy());iu(`${A} ${e.host}${l}`);let w,{signal:R}=g,P=a(()=>{R.removeEventListener("abort",P),I(new Omi),w&&w.close(L2e)},"onAbortSignal");if(R){if(R.aborted){I(new Omi);return}R.addEventListener("abort",P)}let k=a(Q=>{iu(`session ${n} encountered error during ${g.method} ${e.href}: ${Q}`),I(Q)},"onSessionError");x.once("error",k),w=x.request({":method":A,":path":l,...y}),w.once("response",Q=>{x.off("error",k),R&&R.removeEventListener("abort",P),b(Bmi(Q,w,g.decode,I))}),w.once("error",Q=>{x.off("error",k),R&&R.removeEventListener("abort",P),w.rstCode!==L2e&&(iu(`${g.method} ${e.href} failed with: ${Q.message}`),w.close(L2e),I(Q))}),w.once("frameError",(Q,M,N)=>{x.off("error",k),iu(`encountered frameError during ${g.method} ${e.href}: type: ${Q}, code: ${M}, id: ${N}`)}),w.on("push",(Q,M)=>{iu(`received 'push' event: headers: ${JSON.stringify(Q)}, flags: ${M}`)}),_ instanceof KNa?_.pipe(w):(_&&w.write(_),w.end())})},"request");Lmi.exports={request:nMa,setupContext:eMa,resetContext:tMa}});var Qmi=T((AOf,Umi)=>{"use strict";f();var{EventEmitter:iMa}=require("events"),oMa=a(()=>{let t={},e=new iMa;return e.setMaxListeners(0),{acquire:a(r=>new Promise(n=>{if(!t[r]){t[r]=!0,n();return}let o=a(s=>{t[r]||(t[r]=!0,e.removeListener(r,o),n(s))},"tryAcquire");e.on(r,o)}),"acquire"),release:a((r,n)=>{Reflect.deleteProperty(t,r),setImmediate(()=>e.emit(r,n))},"release")}},"lock");Umi.exports=oMa});var qmi=T((_Of,sMa)=>{sMa.exports={name:"@adobe/helix-fetch",version:"3.1.1",description:"Light-weight Fetch implementation transparently supporting both HTTP/1(.1) and HTTP/2",main:"src/index.js",scripts:{test:"nyc mocha",lint:"./node_modules/.bin/eslint .","semantic-release":"semantic-release"},mocha:{timeout:"5000",recursive:"true",reporter:"mocha-multi-reporters","reporter-options":"configFile=.mocha-multi.json"},engines:{node:">=12.0"},types:"src/index.d.ts",exports:{import:"./src/index.mjs",require:"./src/index.js"},repository:{type:"git",url:"https://github.com/adobe/helix-fetch"},author:"",license:"Apache-2.0",bugs:{url:"https://github.com/adobe/helix-fetch/issues"},homepage:"https://github.com/adobe/helix-fetch#readme",keywords:["fetch","whatwg","Fetch API","http","https","http2","h2","promise","async","request","RFC 7234","7234","caching","cache"],dependencies:{debug:"4.3.4","http-cache-semantics":"^4.1.1","lru-cache":"7.13.1"},devDependencies:{"@adobe/eslint-config-helix":"1.3.2","@semantic-release/changelog":"6.0.1","@semantic-release/git":"10.0.1",chai:"4.3.6","chai-as-promised":"7.1.1","chai-bytes":"0.1.2","chai-iterator":"3.0.2",eslint:"8.21.0","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.26.0","formdata-node":"4.3.3","lint-staged":"13.0.3",mocha:"10.0.0","mocha-multi-reporters":"1.5.1",nock:"13.2.9",nyc:"15.1.0","parse-cache-control":"1.0.1",pem:"1.14.6",proxy:"^1.0.2","semantic-release":"19.0.3",sinon:"14.0.0","stream-buffers":"3.0.2",tunnel:"^0.0.6"},"lint-staged":{"*.js":"eslint"},config:{commitizen:{path:"node_modules/cz-conventional-changelog"},ghooks:{"pre-commit":"npx lint-staged"}}}});var Vmi=T((COf,$mi)=>{"use strict";f();var{Readable:aMa}=require("stream"),cMa=require("tls"),{types:{isAnyArrayBuffer:lMa}}=require("util"),uMa=cyr(),_yr=hx()("helix-fetch:core"),{RequestAbortedError:oft}=ift(),Cyr=Mmi(),sft=Fmi(),dMa=Qmi(),{isPlainObject:fMa}=b3(),{isFormData:pMa,FormDataSerializer:hMa}=B2e(),{version:mMa}=qmi(),vyr="h2",byr="h2c",Tyr="http/1.0",_J="http/1.1",gMa=100,AMa=3600*1e3,yMa=[vyr,_J,Tyr],EMa=`helix-fetch/${mMa}`,_Ma={method:"GET",compress:!0,decode:!0},Gmi=0,Hmi=dMa(),jmi=a((t,e)=>new Promise((r,n)=>{let{signal:o}=e,s,c=a(()=>{o.removeEventListener("abort",c);let d=new oft;n(d),s&&s.destroy(d)},"onAbortSignal");if(o){if(o.aborted){n(new oft);return}o.addEventListener("abort",c)}let l=+t.port||443,u=a(d=>{o&&o.removeEventListener("abort",c),d instanceof oft||(_yr(`connecting to ${t.hostname}:${l} failed with: ${d.message}`),n(d))},"onError");s=cMa.connect(l,t.hostname,e),s.once("secureConnect",()=>{o&&o.removeEventListener("abort",c),s.off("error",u),Gmi+=1,s.id=Gmi,s.secureConnecting=!1,_yr(`established TLS connection: #${s.id} (${s.servername})`),r(s)}),s.once("error",u)}),"connectTLS"),CMa=a(async(t,e)=>{let r=await Hmi.acquire(t.origin);try{return r||(r=await jmi(t,e)),r}finally{Hmi.release(t.origin,r)}},"connect"),vMa=a(async(t,e,r)=>{let n=`${e.protocol}//${e.host}`,o=t.alpnCache.get(n);if(o)return{protocol:o};switch(e.protocol){case"http:":return o=_J,t.alpnCache.set(n,o),{protocol:o};case"http2:":return o=byr,t.alpnCache.set(n,o),{protocol:o};case"https:":break;default:throw new TypeError(`unsupported protocol: ${e.protocol}`)}let{options:{rejectUnauthorized:s,h1:c={},h2:l={}}}=t,u=!(s===!1||c.rejectUnauthorized===!1||l.rejectUnauthorized===!1),d={servername:e.hostname,ALPNProtocols:t.alpnProtocols,signal:r,rejectUnauthorized:u};t.options.ca&&(d.ca=t.options.ca);let p=await CMa(e,d);return o=p.alpnProtocol,o||(o=_J),t.alpnCache.set(n,o),{protocol:o,socket:p}},"determineProtocol"),bMa=a(t=>{let e={};return Object.keys(t).forEach(r=>{e[r.toLowerCase()]=t[r]}),e},"sanitizeHeaders"),TMa=a(async(t,e,r,n)=>{let o=e.protocol==="https:",s;e.port?s=e.port:o?s=443:s=80;let c={...r,host:e.host,hostname:e.hostname,port:s},l=await t(c);if(o){let d={...c,ALPNProtocols:n};d.socket=l,d.servername=c.host;let p=await jmi(e,d);return{protocol:p.alpnProtocol||_J,socket:p}}return{protocol:l.alpnProtocol||_J,socket:l}},"getProtocolAndSocketFromFactory"),SMa=a(async(t,e,r)=>{let n=new URL(e),o={..._Ma,...r||{}};typeof o.method=="string"&&(o.method=o.method.toUpperCase()),o.headers=bMa(o.headers||{}),o.headers.host===void 0&&(o.headers.host=n.host),t.userAgent&&o.headers["user-agent"]===void 0&&(o.headers["user-agent"]=t.userAgent);let s;if(o.body instanceof URLSearchParams)s="application/x-www-form-urlencoded; charset=utf-8",o.body=o.body.toString();else if(pMa(o.body)){let d=new hMa(o.body);s=d.contentType(),o.body=d.stream(),o.headers["transfer-encoding"]===void 0&&o.headers["content-length"]===void 0&&(o.headers["content-length"]=String(d.length()))}else typeof o.body=="string"||o.body instanceof String?s="text/plain; charset=utf-8":fMa(o.body)?(o.body=JSON.stringify(o.body),s="application/json"):lMa(o.body)&&(o.body=Buffer.from(o.body));o.headers["content-type"]===void 0&&s!==void 0&&(o.headers["content-type"]=s),o.body!=null&&(o.body instanceof aMa||(!(typeof o.body=="string"||o.body instanceof String)&&!Buffer.isBuffer(o.body)&&(o.body=String(o.body)),o.headers["transfer-encoding"]===void 0&&o.headers["content-length"]===void 0&&(o.headers["content-length"]=String(Buffer.isBuffer(o.body)?o.body.length:Buffer.byteLength(o.body,"utf-8"))))),o.headers.accept===void 0&&(o.headers.accept="*/*"),o.body==null&&["POST","PUT"].includes(o.method)&&(o.headers["content-length"]="0"),o.compress&&o.headers["accept-encoding"]===void 0&&(o.headers["accept-encoding"]="gzip,deflate,br");let{signal:c}=o,{protocol:l,socket:u=null}=t.socketFactory?await TMa(t.socketFactory,n,o,t.alpnProtocols):await vMa(t,n,c);switch(_yr(`${n.host} -> ${l}`),l){case vyr:try{return await sft.request(t,n,u?{...o,socket:u}:o)}catch(d){let{code:p,message:h}=d;throw p==="ERR_HTTP2_ERROR"&&h==="Protocol error"&&t.alpnCache.delete(`${n.protocol}//${n.host}`),d}case byr:return sft.request(t,new URL(`http://${n.host}${n.pathname}${n.hash}${n.search}`),u?{...o,socket:u}:o);case Tyr:case _J:return Cyr.request(t,n,u?{...o,socket:u}:o);default:throw new TypeError(`unsupported protocol: ${l}`)}},"request"),IMa=a(async t=>(t.alpnCache.clear(),Promise.all([Cyr.resetContext(t),sft.resetContext(t)])),"resetContext"),xMa=a(t=>{let{options:{alpnProtocols:e=yMa,alpnCacheTTL:r=AMa,alpnCacheSize:n=gMa,userAgent:o=EMa,socketFactory:s}}=t;t.alpnProtocols=e,t.alpnCache=new uMa({max:n,ttl:r}),t.userAgent=o,t.socketFactory=s,Cyr.setupContext(t),sft.setupContext(t)},"setupContext");$mi.exports={request:SMa,setupContext:xMa,resetContext:IMa,RequestAbortedError:oft,ALPN_HTTP2:vyr,ALPN_HTTP2C:byr,ALPN_HTTP1_1:_J,ALPN_HTTP1_0:Tyr}});var zmi=T((TOf,Wmi)=>{"use strict";f();var wMa=hx()("helix-fetch:core"),{request:RMa,setupContext:PMa,resetContext:kMa,RequestAbortedError:DMa,ALPN_HTTP2:NMa,ALPN_HTTP2C:MMa,ALPN_HTTP1_1:OMa,ALPN_HTTP1_0:BMa}=Vmi(),Syr=class t{static{a(this,"RequestContext")}constructor(e){this.options={...e||{}},PMa(this)}api(){return{request:a(async(e,r)=>this.request(e,r),"request"),context:a((e={})=>new t(e).api(),"context"),setCA:a(e=>this.setCA(e),"setCA"),reset:a(async()=>this.reset(),"reset"),RequestAbortedError:DMa,ALPN_HTTP2:NMa,ALPN_HTTP2C:MMa,ALPN_HTTP1_1:OMa,ALPN_HTTP1_0:BMa}}async request(e,r){return RMa(this,e,r)}setCA(e){this.options.ca=e}async reset(){return wMa("resetting context"),kMa(this)}};Wmi.exports=new Syr().api()});var Zmi=T((xOf,Xmi)=>{"use strict";f();var{EventEmitter:LMa}=require("events"),{Readable:F2e}=require("stream"),Iyr=hx()("helix-fetch"),FMa=cyr(),{Body:UMa}=Jdt(),{Headers:Pyr}=Lfe(),{Request:CJ}=ymi(),{Response:wyr}=myr(),{FetchBaseError:QMa,FetchError:U2e,AbortError:aft}=dyr(),{AbortController:qMa,AbortSignal:GMa,TimeoutSignal:HMa}=fyr(),jMa=Smi(),{cacheableResponse:$Ma}=wmi(),{sizeof:VMa}=b3(),{isFormData:WMa}=B2e(),{context:zMa,RequestAbortedError:YMa}=zmi(),Ymi=["GET","HEAD"],KMa=500,JMa=100*1024*1024,xyr="push",Kmi=a(async(t,e,r)=>{let{request:n}=t.context,o=e instanceof CJ&&typeof r>"u"?e:new CJ(e,r),{method:s,body:c,signal:l,compress:u,decode:d,follow:p,redirect:h,init:{body:m}}=o,g;if(l&&l.aborted){let x=new aft("The operation was aborted.");throw o.init.body instanceof F2e&&o.init.body.destroy(x),x}try{g=await n(o.url,{...r,method:s,headers:o.headers.plain(),body:m&&!(m instanceof F2e)&&!WMa(m)?m:c,compress:u,decode:d,follow:p,redirect:h,signal:l})}catch(x){throw m instanceof F2e&&m.destroy(x),x instanceof TypeError?x:x instanceof YMa?new aft("The operation was aborted."):new U2e(x.message,"system",x)}let A=a(()=>{l.removeEventListener("abort",A);let x=new aft("The operation was aborted.");o.init.body instanceof F2e&&o.init.body.destroy(x),g.readable.emit("error",x)},"abortHandler");l&&l.addEventListener("abort",A);let{statusCode:y,statusText:E,httpVersion:_,headers:v,readable:b,decoded:I}=g;if([301,302,303,307,308].includes(y)){let{location:x}=v,w=x==null?null:new URL(x,o.url);switch(o.redirect){case"manual":break;case"error":throw l&&l.removeEventListener("abort",A),new U2e(`uri requested responds with a redirect, redirect mode is set to 'error': ${o.url}`,"no-redirect");case"follow":{if(w===null)break;if(o.counter>=o.follow)throw l&&l.removeEventListener("abort",A),new U2e(`maximum redirect reached at: ${o.url}`,"max-redirect");let R={headers:new Pyr(o.headers),follow:o.follow,compress:o.compress,decode:o.decode,counter:o.counter+1,method:o.method,body:o.body,signal:o.signal};if(y!==303&&o.body&&o.init.body instanceof F2e)throw l&&l.removeEventListener("abort",A),new U2e("Cannot follow redirect with body being a readable stream","unsupported-redirect");return(y===303||(y===301||y===302)&&o.method==="POST")&&(R.method="GET",R.body=void 0,R.headers.delete("content-length")),l&&l.removeEventListener("abort",A),Kmi(t,new CJ(w,R))}default:}}return l&&(b.once("end",()=>{l.removeEventListener("abort",A)}),b.once("error",()=>{l.removeEventListener("abort",A)})),new wyr(b,{url:o.url,status:y,statusText:E,headers:v,httpVersion:_,decoded:I,counter:o.counter})},"fetch"),Jmi=a(async(t,e,r)=>{if(t.options.maxCacheSize===0||!Ymi.includes(e.method))return r;let n=new jMa(e,r,{shared:!1});if(n.storable()){let o=await $Ma(r);return t.cache.set(e.url,{policy:n,response:o},n.timeToLive()),o}else return r},"cacheResponse"),XMa=a(async(t,e,r)=>{let n=new CJ(e,r);if(t.options.maxCacheSize!==0&&Ymi.includes(n.method)&&!["no-store","reload"].includes(n.cache)){let{policy:c,response:l}=t.cache.get(n.url)||{};if(c&&c.satisfiesWithoutRevalidation(n)){l.headers=new Pyr(c.responseHeaders(l));let u=l.clone();return u.fromCache=!0,u}}let s=await Kmi(t,n);return n.cache!=="no-store"?Jmi(t,n,s):s},"cachingFetch"),ZMa=a((t,e={})=>{let r=new URL(t);if(typeof e!="object"||Array.isArray(e))throw new TypeError("qs: object expected");return Object.entries(e).forEach(([n,o])=>{Array.isArray(o)?o.forEach(s=>r.searchParams.append(n,s)):r.searchParams.append(n,o)}),r.href},"createUrl"),e4a=a(t=>new HMa(t),"timeoutSignal"),Ryr=class t{static{a(this,"FetchContext")}constructor(e){this.options={...e};let{maxCacheSize:r}=this.options,n=typeof r=="number"&&r>=0?r:JMa,o=KMa;n===0&&(n=1,o=1);let s=a(({response:l},u)=>VMa(l),"sizeCalculation");this.cache=new FMa({max:o,maxSize:n,sizeCalculation:s}),this.eventEmitter=new LMa,this.options.h2=this.options.h2||{},typeof this.options.h2.enablePush>"u"&&(this.options.h2.enablePush=!0);let{enablePush:c}=this.options.h2;c&&(this.options.h2.pushPromiseHandler=(l,u,d)=>{let p={...u};Object.keys(p).filter(h=>h.startsWith(":")).forEach(h=>delete p[h]),this.pushPromiseHandler(l,p,d)},this.options.h2.pushHandler=(l,u,d)=>{let p={...u};Object.keys(p).filter(_=>_.startsWith(":")).forEach(_=>delete p[_]);let{statusCode:h,statusText:m,httpVersion:g,headers:A,readable:y,decoded:E}=d;this.pushHandler(l,p,new wyr(y,{url:l,status:h,statusText:m,headers:A,httpVersion:g,decoded:E}))}),this.context=zMa(this.options)}api(){return{fetch:a(async(e,r)=>this.fetch(e,r),"fetch"),Body:UMa,Headers:Pyr,Request:CJ,Response:wyr,AbortController:qMa,AbortSignal:GMa,FetchBaseError:QMa,FetchError:U2e,AbortError:aft,context:a((e={})=>new t(e).api(),"context"),setCA:a(e=>this.setCA(e),"setCA"),noCache:a((e={})=>new t({...e,maxCacheSize:0}).api(),"noCache"),h1:a((e={})=>new t({...e,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1"),keepAlive:a((e={})=>new t({...e,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAlive"),h1NoCache:a((e={})=>new t({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),"h1NoCache"),keepAliveNoCache:a((e={})=>new t({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),"keepAliveNoCache"),reset:a(async()=>this.context.reset(),"reset"),onPush:a(e=>this.onPush(e),"onPush"),offPush:a(e=>this.offPush(e),"offPush"),createUrl:ZMa,timeoutSignal:e4a,clearCache:a(()=>this.clearCache(),"clearCache"),cacheStats:a(()=>this.cacheStats(),"cacheStats"),ALPN_HTTP2:this.context.ALPN_HTTP2,ALPN_HTTP2C:this.context.ALPN_HTTP2C,ALPN_HTTP1_1:this.context.ALPN_HTTP1_1,ALPN_HTTP1_0:this.context.ALPN_HTTP1_0}}async fetch(e,r){return XMa(this,e,r)}setCA(e){this.options.ca=e,this.context.setCA(e)}onPush(e){return this.eventEmitter.on(xyr,e)}offPush(e){return this.eventEmitter.off(xyr,e)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(e,r,n){Iyr(`received server push promise: ${e}, headers: ${JSON.stringify(r)}`);let o=new CJ(e,{headers:r}),{policy:s}=this.cache.get(e)||{};s&&s.satisfiesWithoutRevalidation(o)&&(Iyr(`already cached, reject push promise: ${e}, headers: ${JSON.stringify(r)}`),n())}async pushHandler(e,r,n){Iyr(`caching resource pushed by server: ${e}, reqHeaders: ${JSON.stringify(r)}, status: ${n.status}, respHeaders: ${JSON.stringify(n.headers)}`);let o=await Jmi(this,new CJ(e,{headers:r}),n);this.eventEmitter.emit(xyr,e,o)}};Xmi.exports=new Ryr().api()});var tgi=T((POf,egi)=>{"use strict";f();egi.exports=Zmi()});var Lyr=T((OLf,Sgi)=>{f();var Byr=require("fs"),Aft=require("path"),G2e=Aft.join,x4a=Aft.dirname,bgi=Byr.accessSync&&function(t){try{Byr.accessSync(t)}catch{return!1}return!0}||Byr.existsSync||Aft.existsSync,Tgi={arrow:process.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","compiled","platform","arch","bindings"]]};function w4a(t){typeof t=="string"?t={bindings:t}:t||(t={}),Object.keys(Tgi).map(function(u){u in t||(t[u]=Tgi[u])}),t.module_root||(t.module_root=R4a(__filename)),Aft.extname(t.bindings)!=".node"&&(t.bindings+=".node");for(var e=typeof __webpack_require__=="function"?__non_webpack_require__:require,r=[],n=0,o=t.try.length,s,c,l;n{"use strict";f();function xmi(t,e,r){let n=e[r];if(t==null&&n.required===!1)return;if(t==null)throw new TypeError(`Required parameter \`${n.name}\` missing`);let o=typeof t;if(n.type&&o!==n.type){if(n.required===!1&&e.slice(r).some(s=>s.type===o))return!1;throw new TypeError(`Invalid type for parameter \`${n.name}\`, expected \`${n.type}\` but found \`${typeof t}\``)}return!0}a(xmi,"validateParameter");function x5a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a(x5a,"hasOwnProperty");function w5a(t,e){return function(){let r=Array.prototype.slice.call(arguments),n=[];for(let s=0,c=0;s{n.push((l,u)=>{if(l)return c(l);s(u)}),t.apply(this,n)});t.apply(this,n)}}a(w5a,"defineOperation");wmi.exports={defineOperation:w5a,validateParameter:xmi}});var yyr=T((CBf,Nmi)=>{"use strict";f();var R0e=Ayr()("kerberos"),w0e=R0e.KerberosClient,Pmi=R0e.KerberosServer,pq=Rmi().defineOperation,R5a=1,P5a=2,k5a=4,N5a=8,D5a=16,M5a=32,O5a=64,B5a=128,L5a=256,kmi=0,F5a=9,U5a=6;w0e.prototype.step=pq(w0e.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);w0e.prototype.wrap=pq(w0e.prototype.wrap,[{name:"challenge",type:"string"},{name:"options",type:"object"},{name:"callback",type:"function",required:!1}]);w0e.prototype.unwrap=pq(w0e.prototype.unwrap,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);Pmi.prototype.step=pq(Pmi.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);var Q5a=pq(R0e.checkPassword,[{name:"username",type:"string"},{name:"password",type:"string"},{name:"service",type:"string"},{name:"defaultRealm",type:"string",required:!1},{name:"callback",type:"function",required:!1}]),q5a=pq(R0e.principalDetails,[{name:"service",type:"string"},{name:"hostname",type:"string"},{name:"callback",type:"function",required:!1}]),G5a=pq(R0e.initializeClient,[{name:"service",type:"string"},{name:"options",type:"object",default:{mechOID:kmi}},{name:"callback",type:"function",required:!1}]),H5a=pq(R0e.initializeServer,[{name:"service",type:"string"},{name:"callback",type:"function",required:!1}]);Nmi.exports={initializeClient:G5a,initializeServer:H5a,principalDetails:q5a,checkPassword:Q5a,GSS_C_DELEG_FLAG:R5a,GSS_C_MUTUAL_FLAG:P5a,GSS_C_REPLAY_FLAG:k5a,GSS_C_SEQUENCE_FLAG:N5a,GSS_C_CONF_FLAG:D5a,GSS_C_INTEG_FLAG:M5a,GSS_C_ANON_FLAG:O5a,GSS_C_PROT_READY_FLAG:B5a,GSS_C_TRANS_FLAG:L5a,GSS_C_NO_OID:kmi,GSS_MECH_OID_KRB5:F5a,GSS_MECH_OID_SPNEGO:U5a}});var Dmi=T((vBf,j5a)=>{j5a.exports={name:"kerberos",version:"2.2.0",description:"Kerberos library for Node.js",main:"lib/index.js",files:["lib","src","binding.gyp","HISTORY.md","README.md"],repository:{type:"git",url:"https://github.com/mongodb-js/kerberos.git"},keywords:["kerberos","security","authentication"],author:{name:"The MongoDB NodeJS Team",email:"dbx-node@mongodb.com"},bugs:{url:"https://jira.mongodb.org/projects/NODE/issues/"},dependencies:{bindings:"^1.5.0","node-addon-api":"^6.1.0","prebuild-install":"^7.1.2"},devDependencies:{"@types/node":"^22.2.0",chai:"^4.4.1","chai-string":"^1.5.0",chalk:"^4.1.2","clang-format":"^1.8.0","dmd-clear":"^0.1.2",eslint:"^9.9.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jsdoc-to-markdown":"^8.0.3",mocha:"^10.7.3",mongodb:"^6.8.0","node-gyp":"^10.1.0",prebuild:"^13.0.0",prettier:"^3.3.3",request:"^2.88.2"},overrides:{prebuild:{"node-gyp":"$node-gyp"}},scripts:{install:"prebuild-install --runtime napi || node-gyp rebuild","format-cxx":"clang-format -i 'src/**/*'","format-js":"ESLINT_USE_FLAT_CONFIG=false eslint lib test --fix","check:lint":"ESLINT_USE_FLAT_CONFIG=false eslint lib test",precommit:"check-clang-format",docs:"jsdoc2md --template etc/README.hbs --plugin dmd-clear --files lib/kerberos.js > README.md",test:"mocha test",prebuild:"prebuild --runtime napi --strip --verbose --all"},engines:{node:">=12.9.0"},binary:{napi_versions:[4]},license:"Apache-2.0",readmeFilename:"README.md"}});var Omi=T((bBf,Mmi)=>{"use strict";f();var $5a=require("dns"),V5a=yyr(),Eyr=class{static{a(this,"MongoAuthProcess")}constructor(e,r,n,o){o=o||{},this.host=e,this.port=r,this.serviceName=n||o.gssapiServiceName||"mongodb",this.canonicalizeHostName=typeof o.gssapiCanonicalizeHostName=="boolean"?o.gssapiCanonicalizeHostName:!1,this._transition=W5a(this),this.retries=10}init(e,r,n){let o=this;this.username=e,this.password=r;function s(c,l,u){if(!c)return u();$5a.resolveCname(l,(d,p)=>{if(d)return u(d);Array.isArray(p)&&p.length>0&&(o.host=p[0]),u()})}a(s,"performGssapiCanonicalizeHostName"),s(this.canonicalizeHostName,this.host,c=>{if(c)return n(c);let l={};r!=null&&Object.assign(l,{user:e,password:r});let u=process.platform==="win32"?`${this.serviceName}/${this.host}`:`${this.serviceName}@${this.host}`;V5a.initializeClient(u,l,(d,p)=>{if(d)return n(d,null);o.client=p,n(null,p)})})}transition(e,r){if(this._transition==null)return r(new Error("Transition finished"));this._transition(e,r)}};function W5a(t){return(e,r)=>{t.client.step("",(n,o)=>{if(n)return r(n);t._transition=z5a(t),r(null,o)})}}a(W5a,"firstTransition");function z5a(t){return(e,r)=>{t.client.step(e,(n,o)=>{if(n&&t.retries===0)return r(n);if(n)return t.retries=t.retries-1,t.transition(e,r);t._transition=Y5a(t),r(null,o||"")})}}a(z5a,"secondTransition");function Y5a(t){return(e,r)=>{t.client.unwrap(e,(n,o)=>{if(n)return r(n,!1);t.client.wrap(o,{user:t.username},(s,c)=>{if(s)return r(s,!1);t._transition=K5a(t),r(null,c)})})}}a(Y5a,"thirdTransition");function K5a(t){return(e,r)=>{t._transition=null,r(null,!0)}}a(K5a,"fourthTransition");Mmi.exports={MongoAuthProcess:Eyr}});var Lmi=T((IBf,VPe)=>{"use strict";f();var Bmi=yyr();VPe.exports=Bmi;VPe.exports.Kerberos=Bmi;VPe.exports.version=Dmi().version;VPe.exports.processes={MongoAuthProcess:Omi().MongoAuthProcess}});var hAi=T((Zyr,pAi)=>{f();Zyr.createWatcher=Ayr()("vscode-policy-watcher");if(require.main===pAi){let t=process.platform;Zyr.createWatcher(t==="darwin"?"com.visualstudio.code.oss":"CodeOSS",{UpdateMode:{type:"string"},SCMInputFontSize:{type:"number"},DisableFeedback:{type:"boolean"}},e=>console.log(e))}});var vke=T(va=>{"use strict";f();Object.defineProperty(va,"__esModule",{value:!0});va.regexpCode=va.getEsmExportName=va.getProperty=va.safeStringify=va.stringify=va.strConcat=va.addCodeArg=va.str=va._=va.nil=va._Code=va.Name=va.IDENTIFIER=va._CodeOrName=void 0;var Cke=class{static{a(this,"_CodeOrName")}};va._CodeOrName=Cke;va.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var vX=class extends Cke{static{a(this,"Name")}constructor(e){if(super(),!va.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};va.Name=vX;var PI=class extends Cke{static{a(this,"_Code")}constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof vX&&(r[n.str]=(r[n.str]||0)+1),r),{})}};va._Code=PI;va.nil=new PI("");function jAi(t,...e){let r=[t[0]],n=0;for(;n{"use strict";f();Object.defineProperty(B_,"__esModule",{value:!0});B_.ValueScope=B_.ValueScopeName=B_.Scope=B_.varKinds=B_.UsedValueState=void 0;var O_=vke(),DEr=class extends Error{static{a(this,"ValueError")}constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},xpt;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(xpt||(B_.UsedValueState=xpt={}));B_.varKinds={const:new O_.Name("const"),let:new O_.Name("let"),var:new O_.Name("var")};var wpt=class{static{a(this,"Scope")}constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof O_.Name?e:this.name(e)}name(e){return new O_.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};B_.Scope=wpt;var Rpt=class extends O_.Name{static{a(this,"ValueScopeName")}constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,O_._)`.${new O_.Name(r)}[${n}]`}};B_.ValueScopeName=Rpt;var lBa=(0,O_._)`\n`,MEr=class extends wpt{static{a(this,"ValueScope")}constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?lBa:O_.nil}}get(){return this._scope}name(e){return new Rpt(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:s}=o,c=(n=r.key)!==null&&n!==void 0?n:r.ref,l=this._values[s];if(l){let p=l.get(c);if(p)return p}else l=this._values[s]=new Map;l.set(c,o);let u=this._scope[s]||(this._scope[s]=[]),d=u.length;return u[d]=r.ref,o.setValue(r,{property:s,itemIndex:d}),o}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,O_._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(e,r,n={},o){let s=O_.nil;for(let c in e){let l=e[c];if(!l)continue;let u=n[c]=n[c]||new Map;l.forEach(d=>{if(u.has(d))return;u.set(d,xpt.Started);let p=r(d);if(p){let h=this.opts.es5?B_.varKinds.var:B_.varKinds.const;s=(0,O_._)`${s}${h} ${d} = ${p};${this.opts._n}`}else if(p=o?.(d))s=(0,O_._)`${s}${p}${this.opts._n}`;else throw new DEr(d);u.set(d,xpt.Completed)})}return s}};B_.ValueScope=MEr});var Uo=T(Yo=>{"use strict";f();Object.defineProperty(Yo,"__esModule",{value:!0});Yo.or=Yo.and=Yo.not=Yo.CodeGen=Yo.operators=Yo.varKinds=Yo.ValueScopeName=Yo.ValueScope=Yo.Scope=Yo.Name=Yo.regexpCode=Yo.stringify=Yo.getProperty=Yo.nil=Yo.strConcat=Yo.str=Yo._=void 0;var Ys=vke(),w2=OEr(),_q=vke();Object.defineProperty(Yo,"_",{enumerable:!0,get:a(function(){return _q._},"get")});Object.defineProperty(Yo,"str",{enumerable:!0,get:a(function(){return _q.str},"get")});Object.defineProperty(Yo,"strConcat",{enumerable:!0,get:a(function(){return _q.strConcat},"get")});Object.defineProperty(Yo,"nil",{enumerable:!0,get:a(function(){return _q.nil},"get")});Object.defineProperty(Yo,"getProperty",{enumerable:!0,get:a(function(){return _q.getProperty},"get")});Object.defineProperty(Yo,"stringify",{enumerable:!0,get:a(function(){return _q.stringify},"get")});Object.defineProperty(Yo,"regexpCode",{enumerable:!0,get:a(function(){return _q.regexpCode},"get")});Object.defineProperty(Yo,"Name",{enumerable:!0,get:a(function(){return _q.Name},"get")});var Dpt=OEr();Object.defineProperty(Yo,"Scope",{enumerable:!0,get:a(function(){return Dpt.Scope},"get")});Object.defineProperty(Yo,"ValueScope",{enumerable:!0,get:a(function(){return Dpt.ValueScope},"get")});Object.defineProperty(Yo,"ValueScopeName",{enumerable:!0,get:a(function(){return Dpt.ValueScopeName},"get")});Object.defineProperty(Yo,"varKinds",{enumerable:!0,get:a(function(){return Dpt.varKinds},"get")});Yo.operators={GT:new Ys._Code(">"),GTE:new Ys._Code(">="),LT:new Ys._Code("<"),LTE:new Ys._Code("<="),EQ:new Ys._Code("==="),NEQ:new Ys._Code("!=="),NOT:new Ys._Code("!"),OR:new Ys._Code("||"),AND:new Ys._Code("&&"),ADD:new Ys._Code("+")};var Y3=class{static{a(this,"Node")}optimizeNodes(){return this}optimizeNames(e,r){return this}},BEr=class extends Y3{static{a(this,"Def")}constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?w2.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=j0e(this.rhs,e,r)),this}get names(){return this.rhs instanceof Ys._CodeOrName?this.rhs.names:{}}},Ppt=class extends Y3{static{a(this,"Assign")}constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof Ys.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=j0e(this.rhs,e,r),this}get names(){let e=this.lhs instanceof Ys.Name?{}:{...this.lhs.names};return Npt(e,this.rhs)}},LEr=class extends Ppt{static{a(this,"AssignOp")}constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},FEr=class extends Y3{static{a(this,"Label")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},UEr=class extends Y3{static{a(this,"Break")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},QEr=class extends Y3{static{a(this,"Throw")}constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},qEr=class extends Y3{static{a(this,"AnyCode")}constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=j0e(this.code,e,r),this}get names(){return this.code instanceof Ys._CodeOrName?this.code.names:{}}},bke=class extends Y3{static{a(this,"ParentNode")}constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(e,r)||(uBa(e,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>SX(e,r.names),{})}},K3=class extends bke{static{a(this,"BlockNode")}render(e){return"{"+e._n+super.render(e)+"}"+e._n}},GEr=class extends bke{static{a(this,"Root")}},H0e=class extends K3{static{a(this,"Else")}};H0e.kind="else";var bX=class t extends K3{static{a(this,"If")}constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new H0e(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(VAi(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=j0e(this.condition,e,r),this}get names(){let e=super.names;return Npt(e,this.condition),this.else&&SX(e,this.else.names),e}};bX.kind="if";var TX=class extends K3{static{a(this,"For")}};TX.kind="for";var HEr=class extends TX{static{a(this,"ForLoop")}constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=j0e(this.iteration,e,r),this}get names(){return SX(super.names,this.iteration.names)}},jEr=class extends TX{static{a(this,"ForRange")}constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?w2.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Npt(super.names,this.from);return Npt(e,this.to)}},kpt=class extends TX{static{a(this,"ForIter")}constructor(e,r,n,o){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=j0e(this.iterable,e,r),this}get names(){return SX(super.names,this.iterable.names)}},Tke=class extends K3{static{a(this,"Func")}constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tke.kind="func";var Ske=class extends bke{static{a(this,"Return")}render(e){return"return "+super.render(e)}};Ske.kind="return";var $Er=class extends K3{static{a(this,"Try")}render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,o;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(o=this.finally)===null||o===void 0||o.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&SX(e,this.catch.names),this.finally&&SX(e,this.finally.names),e}},Ike=class extends K3{static{a(this,"Catch")}constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ike.kind="catch";var xke=class extends K3{static{a(this,"Finally")}render(e){return"finally"+super.render(e)}};xke.kind="finally";var VEr=class{static{a(this,"CodeGen")}constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` -`:""},this._extScope=e,this._scope=new w2.Scope({parent:e}),this._nodes=[new GEr]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new BEr(e,s,n)),s}const(e,r,n){return this._def(w2.varKinds.const,e,r,n)}let(e,r,n){return this._def(w2.varKinds.let,e,r,n)}var(e,r,n){return this._def(w2.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ppt(e,r,n))}add(e,r){return this._leafNode(new LEr(e,Yo.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==Ys.nil&&this._leafNode(new qEr(e)),this}object(...e){let r=["{"];for(let[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,Ys.addCodeArg)(r,o));return r.push("}"),new Ys._Code(r)}if(e,r,n){if(this._blockNode(new bX(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new bX(e))}else(){return this._elseNode(new H0e)}endIf(){return this._endBlockNode(bX,H0e)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new HEr(e),r)}forRange(e,r,n,o,s=this.opts.es5?w2.varKinds.var:w2.varKinds.let){let c=this._scope.toName(e);return this._for(new jEr(s,c,r,n),()=>o(c))}forOf(e,r,n,o=w2.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let c=r instanceof Ys.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Ys._)`${c}.length`,l=>{this.var(s,(0,Ys._)`${c}[${l}]`),n(s)})}return this._for(new kpt("of",o,s,r),()=>n(s))}forIn(e,r,n,o=this.opts.es5?w2.varKinds.var:w2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Ys._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new kpt("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(TX)}label(e){return this._leafNode(new FEr(e))}break(e){return this._leafNode(new UEr(e))}return(e){let r=new Ske;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ske)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new $Er;if(this._blockNode(o),this.code(e),r){let s=this.name("e");this._currNode=o.catch=new Ike(s),r(s)}return n&&(this._currNode=o.finally=new xke,this.code(n)),this._endBlockNode(Ike,xke)}throw(e){return this._leafNode(new QEr(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=Ys.nil,n,o){return this._blockNode(new Tke(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Tke)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof bX))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Yo.CodeGen=VEr;function SX(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}a(SX,"addNames");function Npt(t,e){return e instanceof Ys._CodeOrName?SX(t,e.names):t}a(Npt,"addExprNames");function j0e(t,e,r){if(t instanceof Ys.Name)return n(t);if(!o(t))return t;return new Ys._Code(t._items.reduce((s,c)=>(c instanceof Ys.Name&&(c=n(c)),c instanceof Ys._Code?s.push(...c._items):s.push(c),s),[]));function n(s){let c=r[s.str];return c===void 0||e[s.str]!==1?s:(delete e[s.str],c)}function o(s){return s instanceof Ys._Code&&s._items.some(c=>c instanceof Ys.Name&&e[c.str]===1&&r[c.str]!==void 0)}}a(j0e,"optimizeExpr");function uBa(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}a(uBa,"subtractNames");function VAi(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Ys._)`!${WEr(t)}`}a(VAi,"not");Yo.not=VAi;var dBa=WAi(Yo.operators.AND);function fBa(...t){return t.reduce(dBa)}a(fBa,"and");Yo.and=fBa;var pBa=WAi(Yo.operators.OR);function hBa(...t){return t.reduce(pBa)}a(hBa,"or");Yo.or=hBa;function WAi(t){return(e,r)=>e===Ys.nil?r:r===Ys.nil?e:(0,Ys._)`${WEr(e)} ${t} ${WEr(r)}`}a(WAi,"mappend");function WEr(t){return t instanceof Ys.Name?t:(0,Ys._)`(${t})`}a(WEr,"par")});var fa=T(os=>{"use strict";f();Object.defineProperty(os,"__esModule",{value:!0});os.checkStrictMode=os.getErrorPath=os.Type=os.useFunc=os.setEvaluated=os.evaluatedPropsToName=os.mergeEvaluated=os.eachItem=os.unescapeJsonPointer=os.escapeJsonPointer=os.escapeFragment=os.unescapeFragment=os.schemaRefOrVal=os.schemaHasRulesButRef=os.schemaHasRules=os.checkUnknownRules=os.alwaysValidSchema=os.toHash=void 0;var Zc=Uo(),mBa=vke();function gBa(t){let e={};for(let r of t)e[r]=!0;return e}a(gBa,"toHash");os.toHash=gBa;function ABa(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(KAi(t,e),!JAi(e,t.self.RULES.all))}a(ABa,"alwaysValidSchema");os.alwaysValidSchema=ABa;function KAi(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let o=n.RULES.keywords;for(let s in e)o[s]||eyi(t,`unknown keyword: "${s}"`)}a(KAi,"checkUnknownRules");os.checkUnknownRules=KAi;function JAi(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}a(JAi,"schemaHasRules");os.schemaHasRules=JAi;function yBa(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}a(yBa,"schemaHasRulesButRef");os.schemaHasRulesButRef=yBa;function EBa({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Zc._)`${r}`}return(0,Zc._)`${t}${e}${(0,Zc.getProperty)(n)}`}a(EBa,"schemaRefOrVal");os.schemaRefOrVal=EBa;function CBa(t){return XAi(decodeURIComponent(t))}a(CBa,"unescapeFragment");os.unescapeFragment=CBa;function _Ba(t){return encodeURIComponent(YEr(t))}a(_Ba,"escapeFragment");os.escapeFragment=_Ba;function YEr(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}a(YEr,"escapeJsonPointer");os.escapeJsonPointer=YEr;function XAi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}a(XAi,"unescapeJsonPointer");os.unescapeJsonPointer=XAi;function vBa(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}a(vBa,"eachItem");os.eachItem=vBa;function zAi({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,s,c,l)=>{let u=c===void 0?s:c instanceof Zc.Name?(s instanceof Zc.Name?t(o,s,c):e(o,s,c),c):s instanceof Zc.Name?(e(o,c,s),s):r(s,c);return l===Zc.Name&&!(u instanceof Zc.Name)?n(o,u):u}}a(zAi,"makeMergeEvaluated");os.mergeEvaluated={props:zAi({mergeNames:a((t,e,r)=>t.if((0,Zc._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Zc._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Zc._)`${r} || {}`).code((0,Zc._)`Object.assign(${r}, ${e})`))}),"mergeNames"),mergeToName:a((t,e,r)=>t.if((0,Zc._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Zc._)`${r} || {}`),KEr(t,r,e))}),"mergeToName"),mergeValues:a((t,e)=>t===!0?!0:{...t,...e},"mergeValues"),resultToName:ZAi}),items:zAi({mergeNames:a((t,e,r)=>t.if((0,Zc._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Zc._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),"mergeNames"),mergeToName:a((t,e,r)=>t.if((0,Zc._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Zc._)`${r} > ${e} ? ${r} : ${e}`)),"mergeToName"),mergeValues:a((t,e)=>t===!0?!0:Math.max(t,e),"mergeValues"),resultToName:a((t,e)=>t.var("items",e),"resultToName")})};function ZAi(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Zc._)`{}`);return e!==void 0&&KEr(t,r,e),r}a(ZAi,"evaluatedPropsToName");os.evaluatedPropsToName=ZAi;function KEr(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Zc._)`${e}${(0,Zc.getProperty)(n)}`,!0))}a(KEr,"setEvaluated");os.setEvaluated=KEr;var YAi={};function bBa(t,e){return t.scopeValue("func",{ref:e,code:YAi[e.code]||(YAi[e.code]=new mBa._Code(e.code))})}a(bBa,"useFunc");os.useFunc=bBa;var zEr;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(zEr||(os.Type=zEr={}));function TBa(t,e,r){if(t instanceof Zc.Name){let n=e===zEr.Num;return r?n?(0,Zc._)`"[" + ${t} + "]"`:(0,Zc._)`"['" + ${t} + "']"`:n?(0,Zc._)`"/" + ${t}`:(0,Zc._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Zc.getProperty)(t).toString():"/"+YEr(t)}a(TBa,"getErrorPath");os.getErrorPath=TBa;function eyi(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}a(eyi,"checkStrictMode");os.checkStrictMode=eyi});var J3=T(JEr=>{"use strict";f();Object.defineProperty(JEr,"__esModule",{value:!0});var BA=Uo(),SBa={data:new BA.Name("data"),valCxt:new BA.Name("valCxt"),instancePath:new BA.Name("instancePath"),parentData:new BA.Name("parentData"),parentDataProperty:new BA.Name("parentDataProperty"),rootData:new BA.Name("rootData"),dynamicAnchors:new BA.Name("dynamicAnchors"),vErrors:new BA.Name("vErrors"),errors:new BA.Name("errors"),this:new BA.Name("this"),self:new BA.Name("self"),scope:new BA.Name("scope"),json:new BA.Name("json"),jsonPos:new BA.Name("jsonPos"),jsonLen:new BA.Name("jsonLen"),jsonPart:new BA.Name("jsonPart")};JEr.default=SBa});var wke=T(LA=>{"use strict";f();Object.defineProperty(LA,"__esModule",{value:!0});LA.extendErrors=LA.resetErrorsCount=LA.reportExtraError=LA.reportError=LA.keyword$DataError=LA.keywordError=void 0;var pa=Uo(),Mpt=fa(),fE=J3();LA.keywordError={message:a(({keyword:t})=>(0,pa.str)`must pass "${t}" keyword validation`,"message")};LA.keyword$DataError={message:a(({keyword:t,schemaType:e})=>e?(0,pa.str)`"${t}" keyword must be ${e} ($data)`:(0,pa.str)`"${t}" keyword is invalid ($data)`,"message")};function IBa(t,e=LA.keywordError,r,n){let{it:o}=t,{gen:s,compositeRule:c,allErrors:l}=o,u=nyi(t,e,r);n??(c||l)?tyi(s,u):ryi(o,(0,pa._)`[${u}]`)}a(IBa,"reportError");LA.reportError=IBa;function xBa(t,e=LA.keywordError,r){let{it:n}=t,{gen:o,compositeRule:s,allErrors:c}=n,l=nyi(t,e,r);tyi(o,l),s||c||ryi(n,fE.default.vErrors)}a(xBa,"reportExtraError");LA.reportExtraError=xBa;function wBa(t,e){t.assign(fE.default.errors,e),t.if((0,pa._)`${fE.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,pa._)`${fE.default.vErrors}.length`,e),()=>t.assign(fE.default.vErrors,null)))}a(wBa,"resetErrorsCount");LA.resetErrorsCount=wBa;function RBa({gen:t,keyword:e,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let c=t.name("err");t.forRange("i",o,fE.default.errors,l=>{t.const(c,(0,pa._)`${fE.default.vErrors}[${l}]`),t.if((0,pa._)`${c}.instancePath === undefined`,()=>t.assign((0,pa._)`${c}.instancePath`,(0,pa.strConcat)(fE.default.instancePath,s.errorPath))),t.assign((0,pa._)`${c}.schemaPath`,(0,pa.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,pa._)`${c}.schema`,r),t.assign((0,pa._)`${c}.data`,n))})}a(RBa,"extendErrors");LA.extendErrors=RBa;function tyi(t,e){let r=t.const("err",e);t.if((0,pa._)`${fE.default.vErrors} === null`,()=>t.assign(fE.default.vErrors,(0,pa._)`[${r}]`),(0,pa._)`${fE.default.vErrors}.push(${r})`),t.code((0,pa._)`${fE.default.errors}++`)}a(tyi,"addError");function ryi(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,pa._)`new ${t.ValidationError}(${e})`):(r.assign((0,pa._)`${n}.errors`,e),r.return(!1))}a(ryi,"returnErrors");var IX={keyword:new pa.Name("keyword"),schemaPath:new pa.Name("schemaPath"),params:new pa.Name("params"),propertyName:new pa.Name("propertyName"),message:new pa.Name("message"),schema:new pa.Name("schema"),parentSchema:new pa.Name("parentSchema")};function nyi(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,pa._)`{}`:PBa(t,e,r)}a(nyi,"errorObjectCode");function PBa(t,e,r={}){let{gen:n,it:o}=t,s=[kBa(o,r),NBa(t,r)];return DBa(t,e,s),n.object(...s)}a(PBa,"errorObject");function kBa({errorPath:t},{instancePath:e}){let r=e?(0,pa.str)`${t}${(0,Mpt.getErrorPath)(e,Mpt.Type.Str)}`:t;return[fE.default.instancePath,(0,pa.strConcat)(fE.default.instancePath,r)]}a(kBa,"errorInstancePath");function NBa({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,pa.str)`${e}/${t}`;return r&&(o=(0,pa.str)`${o}${(0,Mpt.getErrorPath)(r,Mpt.Type.Str)}`),[IX.schemaPath,o]}a(NBa,"errorSchemaPath");function DBa(t,{params:e,message:r},n){let{keyword:o,data:s,schemaValue:c,it:l}=t,{opts:u,propertyName:d,topSchemaRef:p,schemaPath:h}=l;n.push([IX.keyword,o],[IX.params,typeof e=="function"?e(t):e||(0,pa._)`{}`]),u.messages&&n.push([IX.message,typeof r=="function"?r(t):r]),u.verbose&&n.push([IX.schema,c],[IX.parentSchema,(0,pa._)`${p}${h}`],[fE.default.data,s]),d&&n.push([IX.propertyName,d])}a(DBa,"extraErrorProps")});var oyi=T($0e=>{"use strict";f();Object.defineProperty($0e,"__esModule",{value:!0});$0e.boolOrEmptySchema=$0e.topBoolOrEmptySchema=void 0;var MBa=wke(),OBa=Uo(),BBa=J3(),LBa={message:"boolean schema is false"};function FBa(t){let{gen:e,schema:r,validateName:n}=t;r===!1?iyi(t,!1):typeof r=="object"&&r.$async===!0?e.return(BBa.default.data):(e.assign((0,OBa._)`${n}.errors`,null),e.return(!0))}a(FBa,"topBoolOrEmptySchema");$0e.topBoolOrEmptySchema=FBa;function UBa(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),iyi(t)):r.var(e,!0)}a(UBa,"boolOrEmptySchema");$0e.boolOrEmptySchema=UBa;function iyi(t,e){let{gen:r,data:n}=t,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,MBa.reportError)(o,LBa,void 0,e)}a(iyi,"falseSchemaError")});var XEr=T(V0e=>{"use strict";f();Object.defineProperty(V0e,"__esModule",{value:!0});V0e.getRules=V0e.isJSONType=void 0;var QBa=["string","number","integer","boolean","null","object","array"],qBa=new Set(QBa);function GBa(t){return typeof t=="string"&&qBa.has(t)}a(GBa,"isJSONType");V0e.isJSONType=GBa;function HBa(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}a(HBa,"getRules");V0e.getRules=HBa});var ZEr=T(vq=>{"use strict";f();Object.defineProperty(vq,"__esModule",{value:!0});vq.shouldUseRule=vq.shouldUseGroup=vq.schemaHasRulesForType=void 0;function jBa({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&syi(t,n)}a(jBa,"schemaHasRulesForType");vq.schemaHasRulesForType=jBa;function syi(t,e){return e.rules.some(r=>ayi(t,r))}a(syi,"shouldUseGroup");vq.shouldUseGroup=syi;function ayi(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}a(ayi,"shouldUseRule");vq.shouldUseRule=ayi});var Rke=T(FA=>{"use strict";f();Object.defineProperty(FA,"__esModule",{value:!0});FA.reportTypeError=FA.checkDataTypes=FA.checkDataType=FA.coerceAndCheckDataType=FA.getJSONTypes=FA.getSchemaTypes=FA.DataType=void 0;var $Ba=XEr(),VBa=ZEr(),WBa=wke(),xo=Uo(),cyi=fa(),W0e;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(W0e||(FA.DataType=W0e={}));function zBa(t){let e=lyi(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}a(zBa,"getSchemaTypes");FA.getSchemaTypes=zBa;function lyi(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every($Ba.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}a(lyi,"getJSONTypes");FA.getJSONTypes=lyi;function YBa(t,e){let{gen:r,data:n,opts:o}=t,s=KBa(e,o.coerceTypes),c=e.length>0&&!(s.length===0&&e.length===1&&(0,VBa.schemaHasRulesForType)(t,e[0]));if(c){let l=tCr(e,n,o.strictNumbers,W0e.Wrong);r.if(l,()=>{s.length?JBa(t,e,s):rCr(t)})}return c}a(YBa,"coerceAndCheckDataType");FA.coerceAndCheckDataType=YBa;var uyi=new Set(["string","number","integer","boolean","null"]);function KBa(t,e){return e?t.filter(r=>uyi.has(r)||e==="array"&&r==="array"):[]}a(KBa,"coerceToTypes");function JBa(t,e,r){let{gen:n,data:o,opts:s}=t,c=n.let("dataType",(0,xo._)`typeof ${o}`),l=n.let("coerced",(0,xo._)`undefined`);s.coerceTypes==="array"&&n.if((0,xo._)`${c} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,xo._)`${o}[0]`).assign(c,(0,xo._)`typeof ${o}`).if(tCr(e,o,s.strictNumbers),()=>n.assign(l,o))),n.if((0,xo._)`${l} !== undefined`);for(let d of r)(uyi.has(d)||d==="array"&&s.coerceTypes==="array")&&u(d);n.else(),rCr(t),n.endIf(),n.if((0,xo._)`${l} !== undefined`,()=>{n.assign(o,l),XBa(t,l)});function u(d){switch(d){case"string":n.elseIf((0,xo._)`${c} == "number" || ${c} == "boolean"`).assign(l,(0,xo._)`"" + ${o}`).elseIf((0,xo._)`${o} === null`).assign(l,(0,xo._)`""`);return;case"number":n.elseIf((0,xo._)`${c} == "boolean" || ${o} === null - || (${c} == "string" && ${o} && ${o} == +${o})`).assign(l,(0,xo._)`+${o}`);return;case"integer":n.elseIf((0,xo._)`${c} === "boolean" || ${o} === null - || (${c} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,(0,xo._)`+${o}`);return;case"boolean":n.elseIf((0,xo._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf((0,xo._)`${o} === "true" || ${o} === 1`).assign(l,!0);return;case"null":n.elseIf((0,xo._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(l,null);return;case"array":n.elseIf((0,xo._)`${c} === "string" || ${c} === "number" - || ${c} === "boolean" || ${o} === null`).assign(l,(0,xo._)`[${o}]`)}}a(u,"coerceSpecificType")}a(JBa,"coerceData");function XBa({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,xo._)`${e} !== undefined`,()=>t.assign((0,xo._)`${e}[${r}]`,n))}a(XBa,"assignParentData");function eCr(t,e,r,n=W0e.Correct){let o=n===W0e.Correct?xo.operators.EQ:xo.operators.NEQ,s;switch(t){case"null":return(0,xo._)`${e} ${o} null`;case"array":s=(0,xo._)`Array.isArray(${e})`;break;case"object":s=(0,xo._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=c((0,xo._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=c();break;default:return(0,xo._)`typeof ${e} ${o} ${t}`}return n===W0e.Correct?s:(0,xo.not)(s);function c(l=xo.nil){return(0,xo.and)((0,xo._)`typeof ${e} == "number"`,l,r?(0,xo._)`isFinite(${e})`:xo.nil)}}a(eCr,"checkDataType");FA.checkDataType=eCr;function tCr(t,e,r,n){if(t.length===1)return eCr(t[0],e,r,n);let o,s=(0,cyi.toHash)(t);if(s.array&&s.object){let c=(0,xo._)`typeof ${e} != "object"`;o=s.null?c:(0,xo._)`!${e} || ${c}`,delete s.null,delete s.array,delete s.object}else o=xo.nil;s.number&&delete s.integer;for(let c in s)o=(0,xo.and)(o,eCr(c,e,r,n));return o}a(tCr,"checkDataTypes");FA.checkDataTypes=tCr;var ZBa={message:a(({schema:t})=>`must be ${t}`,"message"),params:a(({schema:t,schemaValue:e})=>typeof t=="string"?(0,xo._)`{type: ${t}}`:(0,xo._)`{type: ${e}}`,"params")};function rCr(t){let e=e3a(t);(0,WBa.reportError)(e,ZBa)}a(rCr,"reportTypeError");FA.reportTypeError=rCr;function e3a(t){let{gen:e,data:r,schema:n}=t,o=(0,cyi.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}a(e3a,"getTypeErrorContext")});var fyi=T(Opt=>{"use strict";f();Object.defineProperty(Opt,"__esModule",{value:!0});Opt.assignDefaults=void 0;var z0e=Uo(),t3a=fa();function r3a(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)dyi(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>dyi(t,s,o.default))}a(r3a,"assignDefaults");Opt.assignDefaults=r3a;function dyi(t,e,r){let{gen:n,compositeRule:o,data:s,opts:c}=t;if(r===void 0)return;let l=(0,z0e._)`${s}${(0,z0e.getProperty)(e)}`;if(o){(0,t3a.checkStrictMode)(t,`default is ignored for: ${l}`);return}let u=(0,z0e._)`${l} === undefined`;c.useDefaults==="empty"&&(u=(0,z0e._)`${u} || ${l} === null || ${l} === ""`),n.if(u,(0,z0e._)`${l} = ${(0,z0e.stringify)(r)}`)}a(dyi,"assignDefault")});var kI=T(Bc=>{"use strict";f();Object.defineProperty(Bc,"__esModule",{value:!0});Bc.validateUnion=Bc.validateArray=Bc.usePattern=Bc.callValidateCode=Bc.schemaProperties=Bc.allSchemaProperties=Bc.noPropertyInData=Bc.propertyInData=Bc.isOwnProperty=Bc.hasPropFunc=Bc.reportMissingProp=Bc.checkMissingProp=Bc.checkReportMissingProp=void 0;var pu=Uo(),nCr=fa(),bq=J3(),n3a=fa();function i3a(t,e){let{gen:r,data:n,it:o}=t;r.if(oCr(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,pu._)`${e}`},!0),t.error()})}a(i3a,"checkReportMissingProp");Bc.checkReportMissingProp=i3a;function o3a({gen:t,data:e,it:{opts:r}},n,o){return(0,pu.or)(...n.map(s=>(0,pu.and)(oCr(t,e,s,r.ownProperties),(0,pu._)`${o} = ${s}`)))}a(o3a,"checkMissingProp");Bc.checkMissingProp=o3a;function s3a(t,e){t.setParams({missingProperty:e},!0),t.error()}a(s3a,"reportMissingProp");Bc.reportMissingProp=s3a;function pyi(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,pu._)`Object.prototype.hasOwnProperty`})}a(pyi,"hasPropFunc");Bc.hasPropFunc=pyi;function iCr(t,e,r){return(0,pu._)`${pyi(t)}.call(${e}, ${r})`}a(iCr,"isOwnProperty");Bc.isOwnProperty=iCr;function a3a(t,e,r,n){let o=(0,pu._)`${e}${(0,pu.getProperty)(r)} !== undefined`;return n?(0,pu._)`${o} && ${iCr(t,e,r)}`:o}a(a3a,"propertyInData");Bc.propertyInData=a3a;function oCr(t,e,r,n){let o=(0,pu._)`${e}${(0,pu.getProperty)(r)} === undefined`;return n?(0,pu.or)(o,(0,pu.not)(iCr(t,e,r))):o}a(oCr,"noPropertyInData");Bc.noPropertyInData=oCr;function hyi(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}a(hyi,"allSchemaProperties");Bc.allSchemaProperties=hyi;function c3a(t,e){return hyi(e).filter(r=>!(0,nCr.alwaysValidSchema)(t,e[r]))}a(c3a,"schemaProperties");Bc.schemaProperties=c3a;function l3a({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:c},l,u,d){let p=d?(0,pu._)`${t}, ${e}, ${n}${o}`:e,h=[[bq.default.instancePath,(0,pu.strConcat)(bq.default.instancePath,s)],[bq.default.parentData,c.parentData],[bq.default.parentDataProperty,c.parentDataProperty],[bq.default.rootData,bq.default.rootData]];c.opts.dynamicRef&&h.push([bq.default.dynamicAnchors,bq.default.dynamicAnchors]);let m=(0,pu._)`${p}, ${r.object(...h)}`;return u!==pu.nil?(0,pu._)`${l}.call(${u}, ${m})`:(0,pu._)`${l}(${m})`}a(l3a,"callValidateCode");Bc.callValidateCode=l3a;var u3a=(0,pu._)`new RegExp`;function d3a({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,pu._)`${o.code==="new RegExp"?u3a:(0,n3a.useFunc)(t,o)}(${r}, ${n})`})}a(d3a,"usePattern");Bc.usePattern=d3a;function f3a(t){let{gen:e,data:r,keyword:n,it:o}=t,s=e.name("valid");if(o.allErrors){let l=e.let("valid",!0);return c(()=>e.assign(l,!1)),l}return e.var(s,!0),c(()=>e.break()),s;function c(l){let u=e.const("len",(0,pu._)`${r}.length`);e.forRange("i",0,u,d=>{t.subschema({keyword:n,dataProp:d,dataPropType:nCr.Type.Num},s),e.if((0,pu.not)(s),l)})}a(c,"validateItems")}a(f3a,"validateArray");Bc.validateArray=f3a;function p3a(t){let{gen:e,schema:r,keyword:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,nCr.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let c=e.let("valid",!1),l=e.name("_valid");e.block(()=>r.forEach((u,d)=>{let p=t.subschema({keyword:n,schemaProp:d,compositeRule:!0},l);e.assign(c,(0,pu._)`${c} || ${l}`),t.mergeValidEvaluated(p,l)||e.if((0,pu.not)(c))})),t.result(c,()=>t.reset(),()=>t.error(!0))}a(p3a,"validateUnion");Bc.validateUnion=p3a});var Ayi=T(g5=>{"use strict";f();Object.defineProperty(g5,"__esModule",{value:!0});g5.validateKeywordUsage=g5.validSchemaType=g5.funcKeywordCode=g5.macroKeywordCode=void 0;var pE=Uo(),xX=J3(),h3a=kI(),m3a=wke();function g3a(t,e){let{gen:r,keyword:n,schema:o,parentSchema:s,it:c}=t,l=e.macro.call(c.self,o,s,c),u=gyi(r,n,l);c.opts.validateSchema!==!1&&c.self.validateSchema(l,!0);let d=r.name("valid");t.subschema({schema:l,schemaPath:pE.nil,errSchemaPath:`${c.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},d),t.pass(d,()=>t.error(!0))}a(g3a,"macroKeywordCode");g5.macroKeywordCode=g3a;function A3a(t,e){var r;let{gen:n,keyword:o,schema:s,parentSchema:c,$data:l,it:u}=t;E3a(u,e);let d=!l&&e.compile?e.compile.call(u.self,s,c,u):e.validate,p=gyi(n,o,d),h=n.let("valid");t.block$data(h,m),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function m(){if(e.errors===!1)y(),e.modifying&&myi(t),E(()=>t.error());else{let _=e.async?g():A();e.modifying&&myi(t),E(()=>y3a(t,_))}}a(m,"validateKeyword");function g(){let _=n.let("ruleErrs",null);return n.try(()=>y((0,pE._)`await `),v=>n.assign(h,!1).if((0,pE._)`${v} instanceof ${u.ValidationError}`,()=>n.assign(_,(0,pE._)`${v}.errors`),()=>n.throw(v))),_}a(g,"validateAsync");function A(){let _=(0,pE._)`${p}.errors`;return n.assign(_,null),y(pE.nil),_}a(A,"validateSync");function y(_=e.async?(0,pE._)`await `:pE.nil){let v=u.opts.passContext?xX.default.this:xX.default.self,b=!("compile"in e&&!l||e.schema===!1);n.assign(h,(0,pE._)`${_}${(0,h3a.callValidateCode)(t,p,v,b)}`,e.modifying)}a(y,"assignValid");function E(_){var v;n.if((0,pE.not)((v=e.valid)!==null&&v!==void 0?v:h),_)}a(E,"reportErrs")}a(A3a,"funcKeywordCode");g5.funcKeywordCode=A3a;function myi(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,pE._)`${n.parentData}[${n.parentDataProperty}]`))}a(myi,"modifyData");function y3a(t,e){let{gen:r}=t;r.if((0,pE._)`Array.isArray(${e})`,()=>{r.assign(xX.default.vErrors,(0,pE._)`${xX.default.vErrors} === null ? ${e} : ${xX.default.vErrors}.concat(${e})`).assign(xX.default.errors,(0,pE._)`${xX.default.vErrors}.length`),(0,m3a.extendErrors)(t)},()=>t.error())}a(y3a,"addErrs");function E3a({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}a(E3a,"checkAsyncKeyword");function gyi(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,pE.stringify)(r)})}a(gyi,"useKeyword");function C3a(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}a(C3a,"validSchemaType");g5.validSchemaType=C3a;function _3a({schema:t,opts:e,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let c=o.dependencies;if(c?.some(l=>!Object.prototype.hasOwnProperty.call(t,l)))throw new Error(`parent schema must have dependencies of ${s}: ${c.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}a(_3a,"validateKeywordUsage");g5.validateKeywordUsage=_3a});var Eyi=T(Tq=>{"use strict";f();Object.defineProperty(Tq,"__esModule",{value:!0});Tq.extendSubschemaMode=Tq.extendSubschemaData=Tq.getSubschema=void 0;var A5=Uo(),yyi=fa();function v3a(t,{keyword:e,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let l=t.schema[e];return r===void 0?{schema:l,schemaPath:(0,A5._)`${t.schemaPath}${(0,A5.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:l[r],schemaPath:(0,A5._)`${t.schemaPath}${(0,A5.getProperty)(e)}${(0,A5.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,yyi.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||c===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}a(v3a,"getSubschema");Tq.getSubschema=v3a;function b3a(t,e,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:l}=e;if(r!==void 0){let{errorPath:d,dataPathArr:p,opts:h}=e,m=l.let("data",(0,A5._)`${e.data}${(0,A5.getProperty)(r)}`,!0);u(m),t.errorPath=(0,A5.str)`${d}${(0,yyi.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,A5._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let d=o instanceof A5.Name?o:l.let("data",o,!0);u(d),c!==void 0&&(t.propertyName=c)}s&&(t.dataTypes=s);function u(d){t.data=d,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,d]}a(u,"dataContextProps")}a(b3a,"extendSubschemaData");Tq.extendSubschemaData=b3a;function T3a(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(t.compositeRule=n),o!==void 0&&(t.createErrors=o),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}a(T3a,"extendSubschemaMode");Tq.extendSubschemaMode=T3a});var sCr=T((on0,Cyi)=>{"use strict";f();Cyi.exports=a(function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var c=s[o];if(!t(e[c],r[c]))return!1}return!0}return e!==e&&r!==r},"equal")});var vyi=T((cn0,_yi)=>{"use strict";f();var Sq=_yi.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};Bpt(e,n,o,t,"",t)};Sq.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Sq.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Sq.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Sq.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Bpt(t,e,r,n,o,s,c,l,u,d){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,s,c,l,u,d);for(var p in n){var h=n[p];if(Array.isArray(h)){if(p in Sq.arrayKeywords)for(var m=0;m{"use strict";f();Object.defineProperty(L_,"__esModule",{value:!0});L_.getSchemaRefs=L_.resolveUrl=L_.normalizeId=L_._getFullPath=L_.getFullPath=L_.inlineRef=void 0;var I3a=fa(),x3a=sCr(),w3a=vyi(),R3a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P3a(t,e=!0){return typeof t=="boolean"?!0:e===!0?!aCr(t):e?byi(t)<=e:!1}a(P3a,"inlineRef");L_.inlineRef=P3a;var k3a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function aCr(t){for(let e in t){if(k3a.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(aCr)||typeof r=="object"&&aCr(r))return!0}return!1}a(aCr,"hasRef");function byi(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!R3a.has(r)&&(typeof t[r]=="object"&&(0,I3a.eachItem)(t[r],n=>e+=byi(n)),e===1/0))return 1/0}return e}a(byi,"countKeys");function Tyi(t,e="",r){r!==!1&&(e=Y0e(e));let n=t.parse(e);return Syi(t,n)}a(Tyi,"getFullPath");L_.getFullPath=Tyi;function Syi(t,e){return t.serialize(e).split("#")[0]+"#"}a(Syi,"_getFullPath");L_._getFullPath=Syi;var N3a=/#\/?$/;function Y0e(t){return t?t.replace(N3a,""):""}a(Y0e,"normalizeId");L_.normalizeId=Y0e;function D3a(t,e,r){return r=Y0e(r),t.resolve(e,r)}a(D3a,"resolveUrl");L_.resolveUrl=D3a;var M3a=/^[a-z_][-a-z0-9._]*$/i;function O3a(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Y0e(t[r]||e),s={"":o},c=Tyi(n,o,!1),l={},u=new Set;return w3a(t,{allKeys:!0},(h,m,g,A)=>{if(A===void 0)return;let y=c+m,E=s[A];typeof h[r]=="string"&&(E=_.call(this,h[r])),v.call(this,h.$anchor),v.call(this,h.$dynamicAnchor),s[m]=E;function _(b){let I=this.opts.uriResolver.resolve;if(b=Y0e(E?I(E,b):b),u.has(b))throw p(b);u.add(b);let x=this.refs[b];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?d(h,x.schema,b):b!==Y0e(y)&&(b[0]==="#"?(d(h,l[b],b),l[b]=h):this.refs[b]=y),b}a(_,"addRef");function v(b){if(typeof b=="string"){if(!M3a.test(b))throw new Error(`invalid anchor "${b}"`);_.call(this,`#${b}`)}}a(v,"addAnchor")}),l;function d(h,m,g){if(m!==void 0&&!x3a(h,m))throw p(g)}a(d,"checkAmbiguosRef");function p(h){return new Error(`reference "${h}" resolves to more than one schema`)}a(p,"ambiguos")}a(O3a,"getSchemaRefs");L_.getSchemaRefs=O3a});var Dke=T(Iq=>{"use strict";f();Object.defineProperty(Iq,"__esModule",{value:!0});Iq.getData=Iq.KeywordCxt=Iq.validateFunctionCode=void 0;var Pyi=oyi(),Iyi=Rke(),lCr=ZEr(),Lpt=Rke(),B3a=fyi(),Nke=Ayi(),cCr=Eyi(),Bn=Uo(),Qi=J3(),L3a=Pke(),X3=fa(),kke=wke();function F3a(t){if(Dyi(t)&&(Myi(t),Nyi(t))){q3a(t);return}kyi(t,()=>(0,Pyi.topBoolOrEmptySchema)(t))}a(F3a,"validateFunctionCode");Iq.validateFunctionCode=F3a;function kyi({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},s){o.code.es5?t.func(e,(0,Bn._)`${Qi.default.data}, ${Qi.default.valCxt}`,n.$async,()=>{t.code((0,Bn._)`"use strict"; ${xyi(r,o)}`),Q3a(t,o),t.code(s)}):t.func(e,(0,Bn._)`${Qi.default.data}, ${U3a(o)}`,n.$async,()=>t.code(xyi(r,o)).code(s))}a(kyi,"validateFunction");function U3a(t){return(0,Bn._)`{${Qi.default.instancePath}="", ${Qi.default.parentData}, ${Qi.default.parentDataProperty}, ${Qi.default.rootData}=${Qi.default.data}${t.dynamicRef?(0,Bn._)`, ${Qi.default.dynamicAnchors}={}`:Bn.nil}}={}`}a(U3a,"destructureValCxt");function Q3a(t,e){t.if(Qi.default.valCxt,()=>{t.var(Qi.default.instancePath,(0,Bn._)`${Qi.default.valCxt}.${Qi.default.instancePath}`),t.var(Qi.default.parentData,(0,Bn._)`${Qi.default.valCxt}.${Qi.default.parentData}`),t.var(Qi.default.parentDataProperty,(0,Bn._)`${Qi.default.valCxt}.${Qi.default.parentDataProperty}`),t.var(Qi.default.rootData,(0,Bn._)`${Qi.default.valCxt}.${Qi.default.rootData}`),e.dynamicRef&&t.var(Qi.default.dynamicAnchors,(0,Bn._)`${Qi.default.valCxt}.${Qi.default.dynamicAnchors}`)},()=>{t.var(Qi.default.instancePath,(0,Bn._)`""`),t.var(Qi.default.parentData,(0,Bn._)`undefined`),t.var(Qi.default.parentDataProperty,(0,Bn._)`undefined`),t.var(Qi.default.rootData,Qi.default.data),e.dynamicRef&&t.var(Qi.default.dynamicAnchors,(0,Bn._)`{}`)})}a(Q3a,"destructureValCxtES5");function q3a(t){let{schema:e,opts:r,gen:n}=t;kyi(t,()=>{r.$comment&&e.$comment&&Byi(t),V3a(t),n.let(Qi.default.vErrors,null),n.let(Qi.default.errors,0),r.unevaluated&&G3a(t),Oyi(t),Y3a(t)})}a(q3a,"topSchemaObjCode");function G3a(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Bn._)`${r}.evaluated`),e.if((0,Bn._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Bn._)`${t.evaluated}.props`,(0,Bn._)`undefined`)),e.if((0,Bn._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Bn._)`${t.evaluated}.items`,(0,Bn._)`undefined`))}a(G3a,"resetEvaluated");function xyi(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Bn._)`/*# sourceURL=${r} */`:Bn.nil}a(xyi,"funcSourceUrl");function H3a(t,e){if(Dyi(t)&&(Myi(t),Nyi(t))){j3a(t,e);return}(0,Pyi.boolOrEmptySchema)(t,e)}a(H3a,"subschemaCode");function Nyi({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}a(Nyi,"schemaCxtHasRules");function Dyi(t){return typeof t.schema!="boolean"}a(Dyi,"isSchemaObj");function j3a(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&Byi(t),W3a(t),z3a(t);let s=n.const("_errs",Qi.default.errors);Oyi(t,s),n.var(e,(0,Bn._)`${s} === ${Qi.default.errors}`)}a(j3a,"subSchemaObjCode");function Myi(t){(0,X3.checkUnknownRules)(t),$3a(t)}a(Myi,"checkKeywords");function Oyi(t,e){if(t.opts.jtd)return wyi(t,[],!1,e);let r=(0,Iyi.getSchemaTypes)(t.schema),n=(0,Iyi.coerceAndCheckDataType)(t,r);wyi(t,r,!n,e)}a(Oyi,"typeAndKeywords");function $3a(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,X3.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}a($3a,"checkRefsAndKeywords");function V3a(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,X3.checkStrictMode)(t,"default is ignored in the schema root")}a(V3a,"checkNoDefault");function W3a(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,L3a.resolveUrl)(t.opts.uriResolver,t.baseId,e))}a(W3a,"updateContext");function z3a(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}a(z3a,"checkAsyncSchema");function Byi({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)t.code((0,Bn._)`${Qi.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let c=(0,Bn.str)`${n}/$comment`,l=t.scopeValue("root",{ref:e.root});t.code((0,Bn._)`${Qi.default.self}.opts.$comment(${s}, ${c}, ${l}.schema)`)}}a(Byi,"commentKeyword");function Y3a(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=t;r.$async?e.if((0,Bn._)`${Qi.default.errors} === 0`,()=>e.return(Qi.default.data),()=>e.throw((0,Bn._)`new ${o}(${Qi.default.vErrors})`)):(e.assign((0,Bn._)`${n}.errors`,Qi.default.vErrors),s.unevaluated&&K3a(t),e.return((0,Bn._)`${Qi.default.errors} === 0`))}a(Y3a,"returnResults");function K3a({gen:t,evaluated:e,props:r,items:n}){r instanceof Bn.Name&&t.assign((0,Bn._)`${e}.props`,r),n instanceof Bn.Name&&t.assign((0,Bn._)`${e}.items`,n)}a(K3a,"assignEvaluated");function wyi(t,e,r,n){let{gen:o,schema:s,data:c,allErrors:l,opts:u,self:d}=t,{RULES:p}=d;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,X3.schemaHasRulesButRef)(s,p))){o.block(()=>Fyi(t,"$ref",p.all.$ref.definition));return}u.jtd||J3a(t,e),o.block(()=>{for(let m of p.rules)h(m);h(p.post)});function h(m){(0,lCr.shouldUseGroup)(s,m)&&(m.type?(o.if((0,Lpt.checkDataType)(m.type,c,u.strictNumbers)),Ryi(t,m),e.length===1&&e[0]===m.type&&r&&(o.else(),(0,Lpt.reportTypeError)(t)),o.endIf()):Ryi(t,m),l||o.if((0,Bn._)`${Qi.default.errors} === ${n||0}`))}a(h,"groupKeywords")}a(wyi,"schemaKeywords");function Ryi(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,B3a.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,lCr.shouldUseRule)(n,s)&&Fyi(t,s.keyword,s.definition,e.type)})}a(Ryi,"iterateKeywords");function J3a(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(X3a(t,e),t.opts.allowUnionTypes||Z3a(t,e),eLa(t,t.dataTypes))}a(J3a,"checkStrictTypes");function X3a(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Lyi(t.dataTypes,r)||uCr(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),rLa(t,e)}}a(X3a,"checkContextTypes");function Z3a(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&uCr(t,"use allowUnionTypes to allow union type keyword")}a(Z3a,"checkMultipleTypes");function eLa(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,lCr.shouldUseRule)(t.schema,o)){let{type:s}=o.definition;s.length&&!s.some(c=>tLa(e,c))&&uCr(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}a(eLa,"checkKeywordTypes");function tLa(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}a(tLa,"hasApplicableType");function Lyi(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}a(Lyi,"includesType");function rLa(t,e){let r=[];for(let n of t.dataTypes)Lyi(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}a(rLa,"narrowSchemaTypes");function uCr(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,X3.checkStrictMode)(t,e,t.opts.strictTypes)}a(uCr,"strictTypesError");var Fpt=class{static{a(this,"KeywordCxt")}constructor(e,r,n){if((0,Nke.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,X3.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Uyi(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Nke.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Qi.default.errors))}result(e,r,n){this.failResult((0,Bn.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Bn.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,Bn._)`${r} !== undefined && (${(0,Bn.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?kke.reportExtraError:kke.reportError)(this,this.def.error,r)}$dataError(){(0,kke.reportError)(this,this.def.$dataError||kke.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,kke.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Bn.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Bn.nil,r=Bn.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:c}=this;n.if((0,Bn.or)((0,Bn._)`${o} === undefined`,r)),e!==Bn.nil&&n.assign(e,!0),(s.length||c.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Bn.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,Bn.or)(c(),l());function c(){if(n.length){if(!(r instanceof Bn.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,Bn._)`${(0,Lpt.checkDataTypes)(u,r,s.opts.strictNumbers,Lpt.DataType.Wrong)}`}return Bn.nil}function l(){if(o.validateSchema){let u=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,Bn._)`!${u}(${r})`}return Bn.nil}}subschema(e,r){let n=(0,cCr.getSubschema)(this.it,e);(0,cCr.extendSubschemaData)(n,this.it,e),(0,cCr.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return H3a(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=X3.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=X3.mergeEvaluated.items(o,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(e,Bn.Name)),!0}};Iq.KeywordCxt=Fpt;function Fyi(t,e,r,n){let o=new Fpt(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Nke.funcKeywordCode)(o,r):"macro"in r?(0,Nke.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Nke.funcKeywordCode)(o,r)}a(Fyi,"keywordCode");var nLa=/^\/(?:[^~]|~0|~1)*$/,iLa=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Uyi(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,s;if(t==="")return Qi.default.rootData;if(t[0]==="/"){if(!nLa.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,s=Qi.default.rootData}else{let d=iLa.exec(t);if(!d)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+d[1];if(o=d[2],o==="#"){if(p>=e)throw new Error(u("property/index",p));return n[e-p]}if(p>e)throw new Error(u("data",p));if(s=r[e-p],!o)return s}let c=s,l=o.split("/");for(let d of l)d&&(s=(0,Bn._)`${s}${(0,Bn.getProperty)((0,X3.unescapeJsonPointer)(d))}`,c=(0,Bn._)`${c} && ${s}`);return c;function u(d,p){return`Cannot access ${d} ${p} levels up, current level is ${e}`}}a(Uyi,"getData");Iq.getData=Uyi});var Upt=T(fCr=>{"use strict";f();Object.defineProperty(fCr,"__esModule",{value:!0});var dCr=class extends Error{static{a(this,"ValidationError")}constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};fCr.default=dCr});var Mke=T(mCr=>{"use strict";f();Object.defineProperty(mCr,"__esModule",{value:!0});var pCr=Pke(),hCr=class extends Error{static{a(this,"MissingRefError")}constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,pCr.resolveUrl)(e,r,n),this.missingSchema=(0,pCr.normalizeId)((0,pCr.getFullPath)(e,this.missingRef))}};mCr.default=hCr});var qpt=T(NI=>{"use strict";f();Object.defineProperty(NI,"__esModule",{value:!0});NI.resolveSchema=NI.getCompilingSchema=NI.resolveRef=NI.compileSchema=NI.SchemaEnv=void 0;var R2=Uo(),oLa=Upt(),wX=J3(),P2=Pke(),Qyi=fa(),sLa=Dke(),K0e=class{static{a(this,"SchemaEnv")}constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,P2.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};NI.SchemaEnv=K0e;function ACr(t){let e=qyi.call(this,t);if(e)return e;let r=(0,P2.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,c=new R2.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),l;t.$async&&(l=c.scopeValue("Error",{ref:oLa.default,code:(0,R2._)`require("ajv/dist/runtime/validation_error").default`}));let u=c.scopeName("validate");t.validateName=u;let d={gen:c,allErrors:this.opts.allErrors,data:wX.default.data,parentData:wX.default.parentData,parentDataProperty:wX.default.parentDataProperty,dataNames:[wX.default.data],dataPathArr:[R2.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,R2.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:l,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:R2.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,R2._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,sLa.validateFunctionCode)(d),c.optimize(this.opts.code.optimize);let h=c.toString();p=`${c.scopeRefs(wX.default.scope)}return ${h}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let g=new Function(`${wX.default.self}`,`${wX.default.scope}`,p)(this,this.scope.get());if(this.scope.value(u,{ref:g}),g.errors=null,g.schema=t.schema,g.schemaEnv=t,t.$async&&(g.$async=!0),this.opts.code.source===!0&&(g.source={validateName:u,validateCode:h,scopeValues:c._values}),this.opts.unevaluated){let{props:A,items:y}=d;g.evaluated={props:A instanceof R2.Name?void 0:A,items:y instanceof R2.Name?void 0:y,dynamicProps:A instanceof R2.Name,dynamicItems:y instanceof R2.Name},g.source&&(g.source.evaluated=(0,R2.stringify)(g.evaluated))}return t.validate=g,t}catch(h){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),h}finally{this._compilations.delete(t)}}a(ACr,"compileSchema");NI.compileSchema=ACr;function aLa(t,e,r){var n;r=(0,P2.resolveUrl)(this.opts.uriResolver,e,r);let o=t.refs[r];if(o)return o;let s=uLa.call(this,t,r);if(s===void 0){let c=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:l}=this.opts;c&&(s=new K0e({schema:c,schemaId:l,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=cLa.call(this,s)}a(aLa,"resolveRef");NI.resolveRef=aLa;function cLa(t){return(0,P2.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:ACr.call(this,t)}a(cLa,"inlineOrCompile");function qyi(t){for(let e of this._compilations)if(lLa(e,t))return e}a(qyi,"getCompilingSchema");NI.getCompilingSchema=qyi;function lLa(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}a(lLa,"sameSchemaEnv");function uLa(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Qpt.call(this,t,e)}a(uLa,"resolve");function Qpt(t,e){let r=this.opts.uriResolver.parse(e),n=(0,P2._getFullPath)(this.opts.uriResolver,r),o=(0,P2.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===o)return gCr.call(this,r,t);let s=(0,P2.normalizeId)(n),c=this.refs[s]||this.schemas[s];if(typeof c=="string"){let l=Qpt.call(this,t,c);return typeof l?.schema!="object"?void 0:gCr.call(this,r,l)}if(typeof c?.schema=="object"){if(c.validate||ACr.call(this,c),s===(0,P2.normalizeId)(e)){let{schema:l}=c,{schemaId:u}=this.opts,d=l[u];return d&&(o=(0,P2.resolveUrl)(this.opts.uriResolver,o,d)),new K0e({schema:l,schemaId:u,root:t,baseId:o})}return gCr.call(this,r,c)}}a(Qpt,"resolveSchema");NI.resolveSchema=Qpt;var dLa=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function gCr(t,{baseId:e,schema:r,root:n}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let l of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,Qyi.unescapeFragment)(l)];if(u===void 0)return;r=u;let d=typeof r=="object"&&r[this.opts.schemaId];!dLa.has(l)&&d&&(e=(0,P2.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Qyi.schemaHasRulesButRef)(r,this.RULES)){let l=(0,P2.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=Qpt.call(this,n,l)}let{schemaId:c}=this.opts;if(s=s||new K0e({schema:r,schemaId:c,root:n,baseId:e}),s.schema!==s.root.schema)return s}a(gCr,"getJsonPointer")});var Gyi=T((In0,fLa)=>{fLa.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var jyi=T((xn0,Hyi)=>{"use strict";f();var pLa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Hyi.exports={HEX:pLa}});var Xyi=T((Rn0,Jyi)=>{"use strict";f();var{HEX:hLa}=jyi();function zyi(t){if(Kyi(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(/^(?:(?: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])$/u)||[],[r]=e;return r?{host:gLa(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}a(zyi,"normalizeIPv4");function yCr(t,e=!1){let r="",n=!0;for(let o of t){if(hLa[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return e&&r.length===0&&(r="0"),r}a(yCr,"stringArrayToHexStripped");function mLa(t){let e=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,c=!1,l=!1;function u(){if(o.length){if(s===!1){let d=yCr(o);if(d!==void 0)n.push(d);else return r.error=!0,!1}o.length=0}return!0}a(u,"consume");for(let d=0;d7){r.error=!0;break}d-1>=0&&t[d-1]===":"&&(c=!0);continue}else if(p==="%"){if(!u())break;s=!0}else{o.push(p);continue}}return o.length&&(s?r.zone=o.join(""):l?n.push(o.join("")):n.push(yCr(o))),r.address=n.join(""),r}a(mLa,"getIPV6");function Yyi(t,e={}){if(Kyi(t,":")<2)return{host:t,isIPV6:!1};let r=mLa(t);if(r.error)return{host:t,isIPV6:!1};{let n=r.address,o=r.address;return r.zone&&(n+="%"+r.zone,o+="%25"+r.zone),{host:n,escapedHost:o,isIPV6:!0}}}a(Yyi,"normalizeIPv6");function gLa(t,e){let r="",n=!0,o=t.length;for(let s=0;s{"use strict";f();var _La=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,vLa=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Zyi(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}a(Zyi,"isSecure");function eEi(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}a(eEi,"httpParse");function tEi(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}a(tEi,"httpSerialize");function bLa(t){return t.secure=Zyi(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}a(bLa,"wsParse");function TLa(t){if((t.port===(Zyi(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}a(TLa,"wsSerialize");function SLa(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(vLa);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let o=`${n}:${e.nid||t.nid}`,s=ECr[o];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}a(SLa,"urnParse");function ILa(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),o=`${r}:${e.nid||n}`,s=ECr[o];s&&(t=s.serialize(t,e));let c=t,l=t.nss;return c.path=`${n||e.nid}:${l}`,e.skipEscape=!0,c}a(ILa,"urnSerialize");function xLa(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!_La.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}a(xLa,"urnuuidParse");function wLa(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}a(wLa,"urnuuidSerialize");var rEi={scheme:"http",domainHost:!0,parse:eEi,serialize:tEi},RLa={scheme:"https",domainHost:rEi.domainHost,parse:eEi,serialize:tEi},Gpt={scheme:"ws",domainHost:!0,parse:bLa,serialize:TLa},PLa={scheme:"wss",domainHost:Gpt.domainHost,parse:Gpt.parse,serialize:Gpt.serialize},kLa={scheme:"urn",parse:SLa,serialize:ILa,skipNormalize:!0},NLa={scheme:"urn:uuid",parse:xLa,serialize:wLa,skipNormalize:!0},ECr={http:rEi,https:RLa,ws:Gpt,wss:PLa,urn:kLa,"urn:uuid":NLa};nEi.exports=ECr});var sEi=T((On0,jpt)=>{"use strict";f();var{normalizeIPv6:DLa,normalizeIPv4:MLa,removeDotSegments:Oke,recomposeAuthority:OLa,normalizeComponentEncoding:Hpt}=Xyi(),CCr=iEi();function BLa(t,e){return typeof t=="string"?t=y5(Z3(t,e),e):typeof t=="object"&&(t=Z3(y5(t,e),e)),t}a(BLa,"normalize");function LLa(t,e,r){let n=Object.assign({scheme:"null"},r),o=oEi(Z3(t,n),Z3(e,n),n,!0);return y5(o,{...n,skipEscape:!0})}a(LLa,"resolve");function oEi(t,e,r,n){let o={};return n||(t=Z3(y5(t,r),r),e=Z3(y5(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Oke(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Oke(e.path||""),o.query=e.query):(e.path?(e.path.charAt(0)==="/"?o.path=Oke(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=Oke(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}a(oEi,"resolveComponents");function FLa(t,e,r){return typeof t=="string"?(t=unescape(t),t=y5(Hpt(Z3(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=y5(Hpt(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=y5(Hpt(Z3(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=y5(Hpt(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}a(FLa,"equal");function y5(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),o=[],s=CCr[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&(o.push(r.scheme),o.push(":"));let c=OLa(r,n);if(c!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(c),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(l=Oke(l)),c===void 0&&(l=l.replace(/^\/\//u,"/%2F")),o.push(l)}return r.query!==void 0&&(o.push("?"),o.push(r.query)),r.fragment!==void 0&&(o.push("#"),o.push(r.fragment)),o.join("")}a(y5,"serialize");var ULa=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function QLa(t){let e=0;for(let r=0,n=t.length;r126||ULa[e])return!0;return!1}a(QLa,"nonSimpleDomain");var qLa=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Z3(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let c=t.match(qLa);if(c){if(n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]),n.host){let u=MLa(n.host);if(u.isIPV4===!1){let d=DLa(u.host,{isIPV4:!1});n.host=d.host.toLowerCase(),s=d.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=CCr[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&QLa(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!l||l&&!l.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}a(Z3,"parse");var _Cr={SCHEMES:CCr,normalize:BLa,resolve:LLa,resolveComponents:oEi,equal:FLa,serialize:y5,parse:Z3};jpt.exports=_Cr;jpt.exports.default=_Cr;jpt.exports.fastUri=_Cr});var cEi=T(vCr=>{"use strict";f();Object.defineProperty(vCr,"__esModule",{value:!0});var aEi=sEi();aEi.code='require("ajv/dist/runtime/uri").default';vCr.default=aEi});var gEi=T(hg=>{"use strict";f();Object.defineProperty(hg,"__esModule",{value:!0});hg.CodeGen=hg.Name=hg.nil=hg.stringify=hg.str=hg._=hg.KeywordCxt=void 0;var GLa=Dke();Object.defineProperty(hg,"KeywordCxt",{enumerable:!0,get:a(function(){return GLa.KeywordCxt},"get")});var J0e=Uo();Object.defineProperty(hg,"_",{enumerable:!0,get:a(function(){return J0e._},"get")});Object.defineProperty(hg,"str",{enumerable:!0,get:a(function(){return J0e.str},"get")});Object.defineProperty(hg,"stringify",{enumerable:!0,get:a(function(){return J0e.stringify},"get")});Object.defineProperty(hg,"nil",{enumerable:!0,get:a(function(){return J0e.nil},"get")});Object.defineProperty(hg,"Name",{enumerable:!0,get:a(function(){return J0e.Name},"get")});Object.defineProperty(hg,"CodeGen",{enumerable:!0,get:a(function(){return J0e.CodeGen},"get")});var HLa=Upt(),pEi=Mke(),jLa=XEr(),Bke=qpt(),$La=Uo(),Lke=Pke(),$pt=Rke(),TCr=fa(),lEi=Gyi(),VLa=cEi(),hEi=a((t,e)=>new RegExp(t,e),"defaultRegExp");hEi.code="new RegExp";var WLa=["removeAdditional","useDefaults","coerceTypes"],zLa=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),YLa={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},KLa={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},uEi=200;function JLa(t){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,R,w,P,k;let Q=t.strict,M=(e=t.code)===null||e===void 0?void 0:e.optimize,D=M===!0||M===void 0?1:M||0,G=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:hEi,O=(o=t.uriResolver)!==null&&o!==void 0?o:VLa.default;return{strictSchema:(c=(s=t.strictSchema)!==null&&s!==void 0?s:Q)!==null&&c!==void 0?c:!0,strictNumbers:(u=(l=t.strictNumbers)!==null&&l!==void 0?l:Q)!==null&&u!==void 0?u:!0,strictTypes:(p=(d=t.strictTypes)!==null&&d!==void 0?d:Q)!==null&&p!==void 0?p:"log",strictTuples:(m=(h=t.strictTuples)!==null&&h!==void 0?h:Q)!==null&&m!==void 0?m:"log",strictRequired:(A=(g=t.strictRequired)!==null&&g!==void 0?g:Q)!==null&&A!==void 0?A:!1,code:t.code?{...t.code,optimize:D,regExp:G}:{optimize:D,regExp:G},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:uEi,loopEnum:(E=t.loopEnum)!==null&&E!==void 0?E:uEi,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(b=t.inlineRefs)!==null&&b!==void 0?b:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(R=t.validateSchema)!==null&&R!==void 0?R:!0,validateFormats:(w=t.validateFormats)!==null&&w!==void 0?w:!0,unicodeRegExp:(P=t.unicodeRegExp)!==null&&P!==void 0?P:!0,int32range:(k=t.int32range)!==null&&k!==void 0?k:!0,uriResolver:O}}a(JLa,"requiredOptions");var Fke=class{static{a(this,"Ajv")}constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...JLa(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new $La.ValueScope({scope:{},prefixes:zLa,es5:r,lines:n}),this.logger=n8a(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,jLa.getRules)(),dEi.call(this,YLa,e,"NOT SUPPORTED"),dEi.call(this,KLa,e,"DEPRECATED","warn"),this._metaOpts=t8a.call(this),e.formats&&ZLa.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&e8a.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),XLa.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=lEi;n==="id"&&(o={...lEi},o.id=o.$id,delete o.$id),r&&e&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,r);async function o(p,h){await s.call(this,p.$schema);let m=this._addSchema(p,h);return m.validate||c.call(this,m)}async function s(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function c(p){try{return this._compileSchemaEnv(p)}catch(h){if(!(h instanceof pEi.default))throw h;return l.call(this,h),await u.call(this,h.missingSchema),c.call(this,p)}}function l({missingSchema:p,missingRef:h}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${h} cannot be resolved`)}async function u(p){let h=await d.call(this,p);this.refs[p]||await s.call(this,h.$schema),this.refs[p]||this.addSchema(h,p,r)}async function d(p){let h=this._loading[p];if(h)return h;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let c of e)this.addSchema(c,void 0,n,o);return this}let s;if(typeof e=="object"){let{schemaId:c}=this.opts;if(s=e[c],s!==void 0&&typeof s!="string")throw new Error(`schema ${c} must be string`)}return r=(0,Lke.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,o,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(e){let r;for(;typeof(r=fEi.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Bke.SchemaEnv({schema:{},schemaId:n});if(r=Bke.resolveSchema.call(this,o,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=fEi.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Lke.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(o8a.call(this,n,r),!r)return(0,TCr.eachItem)(n,s=>bCr.call(this,s)),this;a8a.call(this,r);let o={...r,type:(0,$pt.getJSONTypes)(r.type),schemaType:(0,$pt.getJSONTypes)(r.schemaType)};return(0,TCr.eachItem)(n,o.type.length===0?s=>bCr.call(this,s,o):s=>o.type.forEach(c=>bCr.call(this,s,o,c))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===e);o>=0&&n.rules.splice(o,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of r){let s=o.split("/").slice(1),c=e;for(let l of s)c=c[l];for(let l in n){let u=n[l];if(typeof u!="object")continue;let{$data:d}=u.definition,p=c[l];d&&p&&(c[l]=mEi(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let o=e[n];(!r||r.test(n))&&(typeof o=="string"?delete e[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[n]))}}_addSchema(e,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let c,{schemaId:l}=this.opts;if(typeof e=="object")c=e[l];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,Lke.normalizeId)(c||n);let d=Lke.getSchemaRefs.call(this,e,n);return u=new Bke.SchemaEnv({schema:e,schemaId:l,meta:r,baseId:n,localRefs:d}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Bke.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Bke.compileSchema.call(this,e)}finally{this.opts=r}}};Fke.ValidationError=HLa.default;Fke.MissingRefError=pEi.default;hg.default=Fke;function dEi(t,e,r,n="error"){for(let o in t){let s=o;s in e&&this.logger[n](`${r}: option ${o}. ${t[s]}`)}}a(dEi,"checkOptions");function fEi(t){return t=(0,Lke.normalizeId)(t),this.schemas[t]||this.refs[t]}a(fEi,"getSchEnv");function XLa(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}a(XLa,"addInitialSchemas");function ZLa(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}a(ZLa,"addInitialFormats");function e8a(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}a(e8a,"addInitialKeywords");function t8a(){let t={...this.opts};for(let e of WLa)delete t[e];return t}a(t8a,"getMetaSchemaOptions");var r8a={log(){},warn(){},error(){}};function n8a(t){if(t===!1)return r8a;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}a(n8a,"getLogger");var i8a=/^[a-z_$][a-z0-9_$:-]*$/i;function o8a(t,e){let{RULES:r}=this;if((0,TCr.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!i8a.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}a(o8a,"checkKeyword");function bCr(t,e,r){var n;let o=e?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,c=o?s.post:s.rules.find(({type:u})=>u===r);if(c||(c={type:r,rules:[]},s.rules.push(c)),s.keywords[t]=!0,!e)return;let l={keyword:t,definition:{...e,type:(0,$pt.getJSONTypes)(e.type),schemaType:(0,$pt.getJSONTypes)(e.schemaType)}};e.before?s8a.call(this,c,l,e.before):c.rules.push(l),s.all[t]=l,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}a(bCr,"addRule");function s8a(t,e,r){let n=t.rules.findIndex(o=>o.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}a(s8a,"addBeforeRule");function a8a(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=mEi(e)),t.validateSchema=this.compile(e,!0))}a(a8a,"keywordMetaschema");var c8a={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function mEi(t){return{anyOf:[t,c8a]}}a(mEi,"schemaOrData")});var AEi=T(SCr=>{"use strict";f();Object.defineProperty(SCr,"__esModule",{value:!0});var l8a={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};SCr.default=l8a});var _Ei=T(RX=>{"use strict";f();Object.defineProperty(RX,"__esModule",{value:!0});RX.callRef=RX.getValidate=void 0;var u8a=Mke(),yEi=kI(),F_=Uo(),X0e=J3(),EEi=qpt(),Vpt=fa(),d8a={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:o,schemaEnv:s,validateName:c,opts:l,self:u}=n,{root:d}=s;if((r==="#"||r==="#/")&&o===d.baseId)return h();let p=EEi.resolveRef.call(u,d,o,r);if(p===void 0)throw new u8a.default(n.opts.uriResolver,o,r);if(p instanceof EEi.SchemaEnv)return m(p);return g(p);function h(){if(s===d)return Wpt(t,c,s,s.$async);let A=e.scopeValue("root",{ref:d});return Wpt(t,(0,F_._)`${A}.validate`,d,d.$async)}function m(A){let y=CEi(t,A);Wpt(t,y,A,A.$async)}function g(A){let y=e.scopeValue("schema",l.code.source===!0?{ref:A,code:(0,F_.stringify)(A)}:{ref:A}),E=e.name("valid"),_=t.subschema({schema:A,dataTypes:[],schemaPath:F_.nil,topSchemaRef:y,errSchemaPath:r},E);t.mergeEvaluated(_),t.ok(E)}}};function CEi(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,F_._)`${r.scopeValue("wrapper",{ref:e})}.validate`}a(CEi,"getValidate");RX.getValidate=CEi;function Wpt(t,e,r,n){let{gen:o,it:s}=t,{allErrors:c,schemaEnv:l,opts:u}=s,d=u.passContext?X0e.default.this:F_.nil;n?p():h();function p(){if(!l.$async)throw new Error("async schema referenced by sync schema");let A=o.let("valid");o.try(()=>{o.code((0,F_._)`await ${(0,yEi.callValidateCode)(t,e,d)}`),g(e),c||o.assign(A,!0)},y=>{o.if((0,F_._)`!(${y} instanceof ${s.ValidationError})`,()=>o.throw(y)),m(y),c||o.assign(A,!1)}),t.ok(A)}a(p,"callAsyncRef");function h(){t.result((0,yEi.callValidateCode)(t,e,d),()=>g(e),()=>m(e))}a(h,"callSyncRef");function m(A){let y=(0,F_._)`${A}.errors`;o.assign(X0e.default.vErrors,(0,F_._)`${X0e.default.vErrors} === null ? ${y} : ${X0e.default.vErrors}.concat(${y})`),o.assign(X0e.default.errors,(0,F_._)`${X0e.default.vErrors}.length`)}a(m,"addErrorsFrom");function g(A){var y;if(!s.opts.unevaluated)return;let E=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(E&&!E.dynamicProps)E.props!==void 0&&(s.props=Vpt.mergeEvaluated.props(o,E.props,s.props));else{let _=o.var("props",(0,F_._)`${A}.evaluated.props`);s.props=Vpt.mergeEvaluated.props(o,_,s.props,F_.Name)}if(s.items!==!0)if(E&&!E.dynamicItems)E.items!==void 0&&(s.items=Vpt.mergeEvaluated.items(o,E.items,s.items));else{let _=o.var("items",(0,F_._)`${A}.evaluated.items`);s.items=Vpt.mergeEvaluated.items(o,_,s.items,F_.Name)}}a(g,"addEvaluatedFrom")}a(Wpt,"callRef");RX.callRef=Wpt;RX.default=d8a});var vEi=T(ICr=>{"use strict";f();Object.defineProperty(ICr,"__esModule",{value:!0});var f8a=AEi(),p8a=_Ei(),h8a=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",f8a.default,p8a.default];ICr.default=h8a});var bEi=T(xCr=>{"use strict";f();Object.defineProperty(xCr,"__esModule",{value:!0});var zpt=Uo(),xq=zpt.operators,Ypt={maximum:{okStr:"<=",ok:xq.LTE,fail:xq.GT},minimum:{okStr:">=",ok:xq.GTE,fail:xq.LT},exclusiveMaximum:{okStr:"<",ok:xq.LT,fail:xq.GTE},exclusiveMinimum:{okStr:">",ok:xq.GT,fail:xq.LTE}},m8a={message:a(({keyword:t,schemaCode:e})=>(0,zpt.str)`must be ${Ypt[t].okStr} ${e}`,"message"),params:a(({keyword:t,schemaCode:e})=>(0,zpt._)`{comparison: ${Ypt[t].okStr}, limit: ${e}}`,"params")},g8a={keyword:Object.keys(Ypt),type:"number",schemaType:"number",$data:!0,error:m8a,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,zpt._)`${r} ${Ypt[e].fail} ${n} || isNaN(${r})`)}};xCr.default=g8a});var TEi=T(wCr=>{"use strict";f();Object.defineProperty(wCr,"__esModule",{value:!0});var Uke=Uo(),A8a={message:a(({schemaCode:t})=>(0,Uke.str)`must be multiple of ${t}`,"message"),params:a(({schemaCode:t})=>(0,Uke._)`{multipleOf: ${t}}`,"params")},y8a={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:A8a,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,s=o.opts.multipleOfPrecision,c=e.let("res"),l=s?(0,Uke._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${s}`:(0,Uke._)`${c} !== parseInt(${c})`;t.fail$data((0,Uke._)`(${n} === 0 || (${c} = ${r}/${n}, ${l}))`)}};wCr.default=y8a});var IEi=T(RCr=>{"use strict";f();Object.defineProperty(RCr,"__esModule",{value:!0});function SEi(t){let e=t.length,r=0,n=0,o;for(;n=55296&&o<=56319&&n{"use strict";f();Object.defineProperty(PCr,"__esModule",{value:!0});var PX=Uo(),E8a=fa(),C8a=IEi(),_8a={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,PX.str)`must NOT have ${r} than ${e} characters`},params:a(({schemaCode:t})=>(0,PX._)`{limit: ${t}}`,"params")},v8a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_8a,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,s=e==="maxLength"?PX.operators.GT:PX.operators.LT,c=o.opts.unicode===!1?(0,PX._)`${r}.length`:(0,PX._)`${(0,E8a.useFunc)(t.gen,C8a.default)}(${r})`;t.fail$data((0,PX._)`${c} ${s} ${n}`)}};PCr.default=v8a});var wEi=T(kCr=>{"use strict";f();Object.defineProperty(kCr,"__esModule",{value:!0});var b8a=kI(),T8a=fa(),Z0e=Uo(),S8a={message:a(({schemaCode:t})=>(0,Z0e.str)`must match pattern "${t}"`,"message"),params:a(({schemaCode:t})=>(0,Z0e._)`{pattern: ${t}}`,"params")},I8a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:S8a,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:c}=t,l=c.opts.unicodeRegExp?"u":"";if(n){let{regExp:u}=c.opts.code,d=u.code==="new RegExp"?(0,Z0e._)`new RegExp`:(0,T8a.useFunc)(e,u),p=e.let("valid");e.try(()=>e.assign(p,(0,Z0e._)`${d}(${s}, ${l}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,Z0e._)`!${p}`)}else{let u=(0,b8a.usePattern)(t,o);t.fail$data((0,Z0e._)`!${u}.test(${r})`)}}};kCr.default=I8a});var REi=T(NCr=>{"use strict";f();Object.defineProperty(NCr,"__esModule",{value:!0});var Qke=Uo(),x8a={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Qke.str)`must NOT have ${r} than ${e} properties`},params:a(({schemaCode:t})=>(0,Qke._)`{limit: ${t}}`,"params")},w8a={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:x8a,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?Qke.operators.GT:Qke.operators.LT;t.fail$data((0,Qke._)`Object.keys(${r}).length ${o} ${n}`)}};NCr.default=w8a});var PEi=T(DCr=>{"use strict";f();Object.defineProperty(DCr,"__esModule",{value:!0});var qke=kI(),Gke=Uo(),R8a=fa(),P8a={message:a(({params:{missingProperty:t}})=>(0,Gke.str)`must have required property '${t}'`,"message"),params:a(({params:{missingProperty:t}})=>(0,Gke._)`{missingProperty: ${t}}`,"params")},k8a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:P8a,code(t){let{gen:e,schema:r,schemaCode:n,data:o,$data:s,it:c}=t,{opts:l}=c;if(!s&&r.length===0)return;let u=r.length>=l.loopRequired;if(c.allErrors?d():p(),l.strictRequired){let g=t.parentSchema.properties,{definedProperties:A}=t.it;for(let y of r)if(g?.[y]===void 0&&!A.has(y)){let E=c.schemaEnv.baseId+c.errSchemaPath,_=`required property "${y}" is not defined at "${E}" (strictRequired)`;(0,R8a.checkStrictMode)(c,_,c.opts.strictRequired)}}function d(){if(u||s)t.block$data(Gke.nil,h);else for(let g of r)(0,qke.checkReportMissingProp)(t,g)}a(d,"allErrorsMode");function p(){let g=e.let("missing");if(u||s){let A=e.let("valid",!0);t.block$data(A,()=>m(g,A)),t.ok(A)}else e.if((0,qke.checkMissingProp)(t,r,g)),(0,qke.reportMissingProp)(t,g),e.else()}a(p,"exitOnErrorMode");function h(){e.forOf("prop",n,g=>{t.setParams({missingProperty:g}),e.if((0,qke.noPropertyInData)(e,o,g,l.ownProperties),()=>t.error())})}a(h,"loopAllRequired");function m(g,A){t.setParams({missingProperty:g}),e.forOf(g,n,()=>{e.assign(A,(0,qke.propertyInData)(e,o,g,l.ownProperties)),e.if((0,Gke.not)(A),()=>{t.error(),e.break()})},Gke.nil)}a(m,"loopUntilMissing")}};DCr.default=k8a});var kEi=T(MCr=>{"use strict";f();Object.defineProperty(MCr,"__esModule",{value:!0});var Hke=Uo(),N8a={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Hke.str)`must NOT have ${r} than ${e} items`},params:a(({schemaCode:t})=>(0,Hke._)`{limit: ${t}}`,"params")},D8a={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:N8a,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?Hke.operators.GT:Hke.operators.LT;t.fail$data((0,Hke._)`${r}.length ${o} ${n}`)}};MCr.default=D8a});var Kpt=T(OCr=>{"use strict";f();Object.defineProperty(OCr,"__esModule",{value:!0});var NEi=sCr();NEi.code='require("ajv/dist/runtime/equal").default';OCr.default=NEi});var DEi=T(LCr=>{"use strict";f();Object.defineProperty(LCr,"__esModule",{value:!0});var BCr=Rke(),mg=Uo(),M8a=fa(),O8a=Kpt(),B8a={message:a(({params:{i:t,j:e}})=>(0,mg.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,"message"),params:a(({params:{i:t,j:e}})=>(0,mg._)`{i: ${t}, j: ${e}}`,"params")},L8a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:B8a,code(t){let{gen:e,data:r,$data:n,schema:o,parentSchema:s,schemaCode:c,it:l}=t;if(!n&&!o)return;let u=e.let("valid"),d=s.items?(0,BCr.getSchemaTypes)(s.items):[];t.block$data(u,p,(0,mg._)`${c} === false`),t.ok(u);function p(){let A=e.let("i",(0,mg._)`${r}.length`),y=e.let("j");t.setParams({i:A,j:y}),e.assign(u,!0),e.if((0,mg._)`${A} > 1`,()=>(h()?m:g)(A,y))}a(p,"validateUniqueItems");function h(){return d.length>0&&!d.some(A=>A==="object"||A==="array")}a(h,"canOptimize");function m(A,y){let E=e.name("item"),_=(0,BCr.checkDataTypes)(d,E,l.opts.strictNumbers,BCr.DataType.Wrong),v=e.const("indices",(0,mg._)`{}`);e.for((0,mg._)`;${A}--;`,()=>{e.let(E,(0,mg._)`${r}[${A}]`),e.if(_,(0,mg._)`continue`),d.length>1&&e.if((0,mg._)`typeof ${E} == "string"`,(0,mg._)`${E} += "_"`),e.if((0,mg._)`typeof ${v}[${E}] == "number"`,()=>{e.assign(y,(0,mg._)`${v}[${E}]`),t.error(),e.assign(u,!1).break()}).code((0,mg._)`${v}[${E}] = ${A}`)})}a(m,"loopN");function g(A,y){let E=(0,M8a.useFunc)(e,O8a.default),_=e.name("outer");e.label(_).for((0,mg._)`;${A}--;`,()=>e.for((0,mg._)`${y} = ${A}; ${y}--;`,()=>e.if((0,mg._)`${E}(${r}[${A}], ${r}[${y}])`,()=>{t.error(),e.assign(u,!1).break(_)})))}a(g,"loopN2")}};LCr.default=L8a});var MEi=T(UCr=>{"use strict";f();Object.defineProperty(UCr,"__esModule",{value:!0});var FCr=Uo(),F8a=fa(),U8a=Kpt(),Q8a={message:"must be equal to constant",params:a(({schemaCode:t})=>(0,FCr._)`{allowedValue: ${t}}`,"params")},q8a={keyword:"const",$data:!0,error:Q8a,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,FCr._)`!${(0,F8a.useFunc)(e,U8a.default)}(${r}, ${o})`):t.fail((0,FCr._)`${s} !== ${r}`)}};UCr.default=q8a});var OEi=T(QCr=>{"use strict";f();Object.defineProperty(QCr,"__esModule",{value:!0});var jke=Uo(),G8a=fa(),H8a=Kpt(),j8a={message:"must be equal to one of the allowed values",params:a(({schemaCode:t})=>(0,jke._)`{allowedValues: ${t}}`,"params")},$8a={keyword:"enum",schemaType:"array",$data:!0,error:j8a,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:c}=t;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let l=o.length>=c.opts.loopEnum,u,d=a(()=>u??(u=(0,G8a.useFunc)(e,H8a.default)),"getEql"),p;if(l||n)p=e.let("valid"),t.block$data(p,h);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let g=e.const("vSchema",s);p=(0,jke.or)(...o.map((A,y)=>m(g,y)))}t.pass(p);function h(){e.assign(p,!1),e.forOf("v",s,g=>e.if((0,jke._)`${d()}(${r}, ${g})`,()=>e.assign(p,!0).break()))}a(h,"loopEnum");function m(g,A){let y=o[A];return typeof y=="object"&&y!==null?(0,jke._)`${d()}(${r}, ${g}[${A}])`:(0,jke._)`${r} === ${y}`}a(m,"equalCode")}};QCr.default=$8a});var BEi=T(qCr=>{"use strict";f();Object.defineProperty(qCr,"__esModule",{value:!0});var V8a=bEi(),W8a=TEi(),z8a=xEi(),Y8a=wEi(),K8a=REi(),J8a=PEi(),X8a=kEi(),Z8a=DEi(),e6a=MEi(),t6a=OEi(),r6a=[V8a.default,W8a.default,z8a.default,Y8a.default,K8a.default,J8a.default,X8a.default,Z8a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},e6a.default,t6a.default];qCr.default=r6a});var HCr=T($ke=>{"use strict";f();Object.defineProperty($ke,"__esModule",{value:!0});$ke.validateAdditionalItems=void 0;var kX=Uo(),GCr=fa(),n6a={message:a(({params:{len:t}})=>(0,kX.str)`must NOT have more than ${t} items`,"message"),params:a(({params:{len:t}})=>(0,kX._)`{limit: ${t}}`,"params")},i6a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n6a,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,GCr.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}LEi(t,n)}};function LEi(t,e){let{gen:r,schema:n,data:o,keyword:s,it:c}=t;c.items=!0;let l=r.const("len",(0,kX._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,kX._)`${l} <= ${e.length}`);else if(typeof n=="object"&&!(0,GCr.alwaysValidSchema)(c,n)){let d=r.var("valid",(0,kX._)`${l} <= ${e.length}`);r.if((0,kX.not)(d),()=>u(d)),t.ok(d)}function u(d){r.forRange("i",e.length,l,p=>{t.subschema({keyword:s,dataProp:p,dataPropType:GCr.Type.Num},d),c.allErrors||r.if((0,kX.not)(d),()=>r.break())})}a(u,"validateItems")}a(LEi,"validateAdditionalItems");$ke.validateAdditionalItems=LEi;$ke.default=i6a});var jCr=T(Vke=>{"use strict";f();Object.defineProperty(Vke,"__esModule",{value:!0});Vke.validateTuple=void 0;var FEi=Uo(),Jpt=fa(),o6a=kI(),s6a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return UEi(t,"additionalItems",e);r.items=!0,!(0,Jpt.alwaysValidSchema)(r,e)&&t.ok((0,o6a.validateArray)(t))}};function UEi(t,e,r=t.schema){let{gen:n,parentSchema:o,data:s,keyword:c,it:l}=t;p(o),l.opts.unevaluated&&r.length&&l.items!==!0&&(l.items=Jpt.mergeEvaluated.items(n,r.length,l.items));let u=n.name("valid"),d=n.const("len",(0,FEi._)`${s}.length`);r.forEach((h,m)=>{(0,Jpt.alwaysValidSchema)(l,h)||(n.if((0,FEi._)`${d} > ${m}`,()=>t.subschema({keyword:c,schemaProp:m,dataProp:m},u)),t.ok(u))});function p(h){let{opts:m,errSchemaPath:g}=l,A=r.length,y=A===h.minItems&&(A===h.maxItems||h[e]===!1);if(m.strictTuples&&!y){let E=`"${c}" is ${A}-tuple, but minItems or maxItems/${e} are not specified or different at path "${g}"`;(0,Jpt.checkStrictMode)(l,E,m.strictTuples)}}a(p,"checkStrictTuple")}a(UEi,"validateTuple");Vke.validateTuple=UEi;Vke.default=s6a});var QEi=T($Cr=>{"use strict";f();Object.defineProperty($Cr,"__esModule",{value:!0});var a6a=jCr(),c6a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:a(t=>(0,a6a.validateTuple)(t,"items"),"code")};$Cr.default=c6a});var GEi=T(VCr=>{"use strict";f();Object.defineProperty(VCr,"__esModule",{value:!0});var qEi=Uo(),l6a=fa(),u6a=kI(),d6a=HCr(),f6a={message:a(({params:{len:t}})=>(0,qEi.str)`must NOT have more than ${t} items`,"message"),params:a(({params:{len:t}})=>(0,qEi._)`{limit: ${t}}`,"params")},p6a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:f6a,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,l6a.alwaysValidSchema)(n,e)&&(o?(0,d6a.validateAdditionalItems)(t,o):t.ok((0,u6a.validateArray)(t)))}};VCr.default=p6a});var HEi=T(WCr=>{"use strict";f();Object.defineProperty(WCr,"__esModule",{value:!0});var DI=Uo(),Xpt=fa(),h6a={message:a(({params:{min:t,max:e}})=>e===void 0?(0,DI.str)`must contain at least ${t} valid item(s)`:(0,DI.str)`must contain at least ${t} and no more than ${e} valid item(s)`,"message"),params:a(({params:{min:t,max:e}})=>e===void 0?(0,DI._)`{minContains: ${t}}`:(0,DI._)`{minContains: ${t}, maxContains: ${e}}`,"params")},m6a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:h6a,code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t,c,l,{minContains:u,maxContains:d}=n;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let p=e.const("len",(0,DI._)`${o}.length`);if(t.setParams({min:c,max:l}),l===void 0&&c===0){(0,Xpt.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&c>l){(0,Xpt.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Xpt.alwaysValidSchema)(s,r)){let y=(0,DI._)`${p} >= ${c}`;l!==void 0&&(y=(0,DI._)`${y} && ${p} <= ${l}`),t.pass(y);return}s.items=!0;let h=e.name("valid");l===void 0&&c===1?g(h,()=>e.if(h,()=>e.break())):c===0?(e.let(h,!0),l!==void 0&&e.if((0,DI._)`${o}.length > 0`,m)):(e.let(h,!1),m()),t.result(h,()=>t.reset());function m(){let y=e.name("_valid"),E=e.let("count",0);g(y,()=>e.if(y,()=>A(E)))}a(m,"validateItemsWithCount");function g(y,E){e.forRange("i",0,p,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Xpt.Type.Num,compositeRule:!0},y),E()})}a(g,"validateItems");function A(y){e.code((0,DI._)`${y}++`),l===void 0?e.if((0,DI._)`${y} >= ${c}`,()=>e.assign(h,!0).break()):(e.if((0,DI._)`${y} > ${l}`,()=>e.assign(h,!1).break()),c===1?e.assign(h,!0):e.if((0,DI._)`${y} >= ${c}`,()=>e.assign(h,!0)))}a(A,"checkLimits")}};WCr.default=m6a});var VEi=T(E5=>{"use strict";f();Object.defineProperty(E5,"__esModule",{value:!0});E5.validateSchemaDeps=E5.validatePropertyDeps=E5.error=void 0;var zCr=Uo(),g6a=fa(),Wke=kI();E5.error={message:a(({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,zCr.str)`must have ${n} ${r} when property ${t} is present`},"message"),params:a(({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,zCr._)`{property: ${t}, +`)),l.tries=r,l}a(w4a,"bindings");Sgi.exports=w4a;function R4a(t){for(var e=x4a(t),r;;){if(e==="."&&(e=process.cwd()),bgi(G2e(e,"dist")))return G2e(e,"dist");if(bgi(G2e(e,"compiled")))return e;if(r===e)throw new Error('Could not find module root given file: "'+t+'". Do you have a `dist` or `compiled` directory? ');r=e,e=G2e(e,"..")}}a(R4a,"getRoot")});var wgi=T((FLf,xgi)=>{"use strict";f();function Igi(t,e,r){let n=e[r];if(t==null&&n.required===!1)return;if(t==null)throw new TypeError(`Required parameter \`${n.name}\` missing`);let o=typeof t;if(n.type&&o!==n.type){if(n.required===!1&&e.slice(r).some(s=>s.type===o))return!1;throw new TypeError(`Invalid type for parameter \`${n.name}\`, expected \`${n.type}\` but found \`${typeof t}\``)}return!0}a(Igi,"validateParameter");function P4a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a(P4a,"hasOwnProperty");function k4a(t,e){return function(){let r=Array.prototype.slice.call(arguments),n=[];for(let s=0,c=0;s{n.push((l,u)=>{if(l)return c(l);s(u)}),t.apply(this,n)});t.apply(this,n)}}a(k4a,"defineOperation");xgi.exports={defineOperation:k4a,validateParameter:Igi}});var Fyr=T((qLf,kgi)=>{"use strict";f();var Hfe=Lyr()("kerberos"),Gfe=Hfe.KerberosClient,Rgi=Hfe.KerberosServer,QQ=wgi().defineOperation,D4a=1,N4a=2,M4a=4,O4a=8,B4a=16,L4a=32,F4a=64,U4a=128,Q4a=256,Pgi=0,q4a=9,G4a=6;Gfe.prototype.step=QQ(Gfe.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);Gfe.prototype.wrap=QQ(Gfe.prototype.wrap,[{name:"challenge",type:"string"},{name:"options",type:"object"},{name:"callback",type:"function",required:!1}]);Gfe.prototype.unwrap=QQ(Gfe.prototype.unwrap,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);Rgi.prototype.step=QQ(Rgi.prototype.step,[{name:"challenge",type:"string"},{name:"callback",type:"function",required:!1}]);var H4a=QQ(Hfe.checkPassword,[{name:"username",type:"string"},{name:"password",type:"string"},{name:"service",type:"string"},{name:"defaultRealm",type:"string",required:!1},{name:"callback",type:"function",required:!1}]),j4a=QQ(Hfe.principalDetails,[{name:"service",type:"string"},{name:"hostname",type:"string"},{name:"callback",type:"function",required:!1}]),$4a=QQ(Hfe.initializeClient,[{name:"service",type:"string"},{name:"options",type:"object",default:{mechOID:Pgi}},{name:"callback",type:"function",required:!1}]),V4a=QQ(Hfe.initializeServer,[{name:"service",type:"string"},{name:"callback",type:"function",required:!1}]);kgi.exports={initializeClient:$4a,initializeServer:V4a,principalDetails:j4a,checkPassword:H4a,GSS_C_DELEG_FLAG:D4a,GSS_C_MUTUAL_FLAG:N4a,GSS_C_REPLAY_FLAG:M4a,GSS_C_SEQUENCE_FLAG:O4a,GSS_C_CONF_FLAG:B4a,GSS_C_INTEG_FLAG:L4a,GSS_C_ANON_FLAG:F4a,GSS_C_PROT_READY_FLAG:U4a,GSS_C_TRANS_FLAG:Q4a,GSS_C_NO_OID:Pgi,GSS_MECH_OID_KRB5:q4a,GSS_MECH_OID_SPNEGO:G4a}});var Dgi=T((HLf,W4a)=>{W4a.exports={name:"kerberos",version:"2.2.0",description:"Kerberos library for Node.js",main:"lib/index.js",files:["lib","src","binding.gyp","HISTORY.md","README.md"],repository:{type:"git",url:"https://github.com/mongodb-js/kerberos.git"},keywords:["kerberos","security","authentication"],author:{name:"The MongoDB NodeJS Team",email:"dbx-node@mongodb.com"},bugs:{url:"https://jira.mongodb.org/projects/NODE/issues/"},dependencies:{bindings:"^1.5.0","node-addon-api":"^6.1.0","prebuild-install":"^7.1.2"},devDependencies:{"@types/node":"^22.2.0",chai:"^4.4.1","chai-string":"^1.5.0",chalk:"^4.1.2","clang-format":"^1.8.0","dmd-clear":"^0.1.2",eslint:"^9.9.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jsdoc-to-markdown":"^8.0.3",mocha:"^10.7.3",mongodb:"^6.8.0","node-gyp":"^10.1.0",prebuild:"^13.0.0",prettier:"^3.3.3",request:"^2.88.2"},overrides:{prebuild:{"node-gyp":"$node-gyp"}},scripts:{install:"prebuild-install --runtime napi || node-gyp rebuild","format-cxx":"clang-format -i 'src/**/*'","format-js":"ESLINT_USE_FLAT_CONFIG=false eslint lib test --fix","check:lint":"ESLINT_USE_FLAT_CONFIG=false eslint lib test",precommit:"check-clang-format",docs:"jsdoc2md --template etc/README.hbs --plugin dmd-clear --files lib/kerberos.js > README.md",test:"mocha test",prebuild:"prebuild --runtime napi --strip --verbose --all"},engines:{node:">=12.9.0"},binary:{napi_versions:[4]},license:"Apache-2.0",readmeFilename:"README.md"}});var Mgi=T((jLf,Ngi)=>{"use strict";f();var z4a=require("dns"),Y4a=Fyr(),Uyr=class{static{a(this,"MongoAuthProcess")}constructor(e,r,n,o){o=o||{},this.host=e,this.port=r,this.serviceName=n||o.gssapiServiceName||"mongodb",this.canonicalizeHostName=typeof o.gssapiCanonicalizeHostName=="boolean"?o.gssapiCanonicalizeHostName:!1,this._transition=K4a(this),this.retries=10}init(e,r,n){let o=this;this.username=e,this.password=r;function s(c,l,u){if(!c)return u();z4a.resolveCname(l,(d,p)=>{if(d)return u(d);Array.isArray(p)&&p.length>0&&(o.host=p[0]),u()})}a(s,"performGssapiCanonicalizeHostName"),s(this.canonicalizeHostName,this.host,c=>{if(c)return n(c);let l={};r!=null&&Object.assign(l,{user:e,password:r});let u=process.platform==="win32"?`${this.serviceName}/${this.host}`:`${this.serviceName}@${this.host}`;Y4a.initializeClient(u,l,(d,p)=>{if(d)return n(d,null);o.client=p,n(null,p)})})}transition(e,r){if(this._transition==null)return r(new Error("Transition finished"));this._transition(e,r)}};function K4a(t){return(e,r)=>{t.client.step("",(n,o)=>{if(n)return r(n);t._transition=J4a(t),r(null,o)})}}a(K4a,"firstTransition");function J4a(t){return(e,r)=>{t.client.step(e,(n,o)=>{if(n&&t.retries===0)return r(n);if(n)return t.retries=t.retries-1,t.transition(e,r);t._transition=X4a(t),r(null,o||"")})}}a(J4a,"secondTransition");function X4a(t){return(e,r)=>{t.client.unwrap(e,(n,o)=>{if(n)return r(n,!1);t.client.wrap(o,{user:t.username},(s,c)=>{if(s)return r(s,!1);t._transition=Z4a(t),r(null,c)})})}}a(X4a,"thirdTransition");function Z4a(t){return(e,r)=>{t._transition=null,r(null,!0)}}a(Z4a,"fourthTransition");Ngi.exports={MongoAuthProcess:Uyr}});var Bgi=T((WLf,H2e)=>{"use strict";f();var Ogi=Fyr();H2e.exports=Ogi;H2e.exports.Kerberos=Ogi;H2e.exports.version=Dgi().version;H2e.exports.processes={MongoAuthProcess:Mgi().MongoAuthProcess}});var hyi=T((yEr,pyi)=>{f();yEr.createWatcher=Lyr()("vscode-policy-watcher");if(require.main===pyi){let t=process.platform;yEr.createWatcher(t==="darwin"?"com.visualstudio.code.oss":"CodeOSS",{UpdateMode:{type:"string"},SCMInputFontSize:{type:"number"},DisableFeedback:{type:"boolean"}},e=>console.log(e))}});var EPe=T(ga=>{"use strict";f();Object.defineProperty(ga,"__esModule",{value:!0});ga.regexpCode=ga.getEsmExportName=ga.getProperty=ga.safeStringify=ga.stringify=ga.strConcat=ga.addCodeArg=ga.str=ga._=ga.nil=ga._Code=ga.Name=ga.IDENTIFIER=ga._CodeOrName=void 0;var APe=class{static{a(this,"_CodeOrName")}};ga._CodeOrName=APe;ga.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var RJ=class extends APe{static{a(this,"Name")}constructor(e){if(super(),!ga.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ga.Name=RJ;var yI=class extends APe{static{a(this,"_Code")}constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof RJ&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ga._Code=yI;ga.nil=new yI("");function jyi(t,...e){let r=[t[0]],n=0;for(;n{"use strict";f();Object.defineProperty(TC,"__esModule",{value:!0});TC.ValueScope=TC.ValueScopeName=TC.Scope=TC.varKinds=TC.UsedValueState=void 0;var bC=EPe(),XEr=class extends Error{static{a(this,"ValueError")}constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},O0t;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(O0t||(TC.UsedValueState=O0t={}));TC.varKinds={const:new bC.Name("const"),let:new bC.Name("let"),var:new bC.Name("var")};var B0t=class{static{a(this,"Scope")}constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof bC.Name?e:this.name(e)}name(e){return new bC.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};TC.Scope=B0t;var L0t=class extends bC.Name{static{a(this,"ValueScopeName")}constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,bC._)`.${new bC.Name(r)}[${n}]`}};TC.ValueScopeName=L0t;var fLa=(0,bC._)`\n`,ZEr=class extends B0t{static{a(this,"ValueScope")}constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?fLa:bC.nil}}get(){return this._scope}name(e){return new L0t(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:s}=o,c=(n=r.key)!==null&&n!==void 0?n:r.ref,l=this._values[s];if(l){let p=l.get(c);if(p)return p}else l=this._values[s]=new Map;l.set(c,o);let u=this._scope[s]||(this._scope[s]=[]),d=u.length;return u[d]=r.ref,o.setValue(r,{property:s,itemIndex:d}),o}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,bC._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(e,r,n={},o){let s=bC.nil;for(let c in e){let l=e[c];if(!l)continue;let u=n[c]=n[c]||new Map;l.forEach(d=>{if(u.has(d))return;u.set(d,O0t.Started);let p=r(d);if(p){let h=this.opts.es5?TC.varKinds.var:TC.varKinds.const;s=(0,bC._)`${s}${h} ${d} = ${p};${this.opts._n}`}else if(p=o?.(d))s=(0,bC._)`${s}${p}${this.opts._n}`;else throw new XEr(d);u.set(d,O0t.Completed)})}return s}};TC.ValueScope=ZEr});var Oo=T($o=>{"use strict";f();Object.defineProperty($o,"__esModule",{value:!0});$o.or=$o.and=$o.not=$o.CodeGen=$o.operators=$o.varKinds=$o.ValueScopeName=$o.ValueScope=$o.Scope=$o.Name=$o.regexpCode=$o.stringify=$o.getProperty=$o.nil=$o.strConcat=$o.str=$o._=void 0;var $s=EPe(),A2=e_r(),zQ=EPe();Object.defineProperty($o,"_",{enumerable:!0,get:a(function(){return zQ._},"get")});Object.defineProperty($o,"str",{enumerable:!0,get:a(function(){return zQ.str},"get")});Object.defineProperty($o,"strConcat",{enumerable:!0,get:a(function(){return zQ.strConcat},"get")});Object.defineProperty($o,"nil",{enumerable:!0,get:a(function(){return zQ.nil},"get")});Object.defineProperty($o,"getProperty",{enumerable:!0,get:a(function(){return zQ.getProperty},"get")});Object.defineProperty($o,"stringify",{enumerable:!0,get:a(function(){return zQ.stringify},"get")});Object.defineProperty($o,"regexpCode",{enumerable:!0,get:a(function(){return zQ.regexpCode},"get")});Object.defineProperty($o,"Name",{enumerable:!0,get:a(function(){return zQ.Name},"get")});var q0t=e_r();Object.defineProperty($o,"Scope",{enumerable:!0,get:a(function(){return q0t.Scope},"get")});Object.defineProperty($o,"ValueScope",{enumerable:!0,get:a(function(){return q0t.ValueScope},"get")});Object.defineProperty($o,"ValueScopeName",{enumerable:!0,get:a(function(){return q0t.ValueScopeName},"get")});Object.defineProperty($o,"varKinds",{enumerable:!0,get:a(function(){return q0t.varKinds},"get")});$o.operators={GT:new $s._Code(">"),GTE:new $s._Code(">="),LT:new $s._Code("<"),LTE:new $s._Code("<="),EQ:new $s._Code("==="),NEQ:new $s._Code("!=="),NOT:new $s._Code("!"),OR:new $s._Code("||"),AND:new $s._Code("&&"),ADD:new $s._Code("+")};var k3=class{static{a(this,"Node")}optimizeNodes(){return this}optimizeNames(e,r){return this}},t_r=class extends k3{static{a(this,"Def")}constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?A2.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=i0e(this.rhs,e,r)),this}get names(){return this.rhs instanceof $s._CodeOrName?this.rhs.names:{}}},F0t=class extends k3{static{a(this,"Assign")}constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof $s.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=i0e(this.rhs,e,r),this}get names(){let e=this.lhs instanceof $s.Name?{}:{...this.lhs.names};return Q0t(e,this.rhs)}},r_r=class extends F0t{static{a(this,"AssignOp")}constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},n_r=class extends k3{static{a(this,"Label")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},i_r=class extends k3{static{a(this,"Break")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},o_r=class extends k3{static{a(this,"Throw")}constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},s_r=class extends k3{static{a(this,"AnyCode")}constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=i0e(this.code,e,r),this}get names(){return this.code instanceof $s._CodeOrName?this.code.names:{}}},_Pe=class extends k3{static{a(this,"ParentNode")}constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(e,r)||(pLa(e,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>DJ(e,r.names),{})}},D3=class extends _Pe{static{a(this,"BlockNode")}render(e){return"{"+e._n+super.render(e)+"}"+e._n}},a_r=class extends _Pe{static{a(this,"Root")}},n0e=class extends D3{static{a(this,"Else")}};n0e.kind="else";var PJ=class t extends D3{static{a(this,"If")}constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new n0e(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Vyi(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=i0e(this.condition,e,r),this}get names(){let e=super.names;return Q0t(e,this.condition),this.else&&DJ(e,this.else.names),e}};PJ.kind="if";var kJ=class extends D3{static{a(this,"For")}};kJ.kind="for";var c_r=class extends kJ{static{a(this,"ForLoop")}constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=i0e(this.iteration,e,r),this}get names(){return DJ(super.names,this.iteration.names)}},l_r=class extends kJ{static{a(this,"ForRange")}constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?A2.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Q0t(super.names,this.from);return Q0t(e,this.to)}},U0t=class extends kJ{static{a(this,"ForIter")}constructor(e,r,n,o){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=i0e(this.iterable,e,r),this}get names(){return DJ(super.names,this.iterable.names)}},CPe=class extends D3{static{a(this,"Func")}constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};CPe.kind="func";var vPe=class extends _Pe{static{a(this,"Return")}render(e){return"return "+super.render(e)}};vPe.kind="return";var u_r=class extends D3{static{a(this,"Try")}render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,o;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(o=this.finally)===null||o===void 0||o.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&DJ(e,this.catch.names),this.finally&&DJ(e,this.finally.names),e}},bPe=class extends D3{static{a(this,"Catch")}constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};bPe.kind="catch";var TPe=class extends D3{static{a(this,"Finally")}render(e){return"finally"+super.render(e)}};TPe.kind="finally";var d_r=class{static{a(this,"CodeGen")}constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` +`:""},this._extScope=e,this._scope=new A2.Scope({parent:e}),this._nodes=[new a_r]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new t_r(e,s,n)),s}const(e,r,n){return this._def(A2.varKinds.const,e,r,n)}let(e,r,n){return this._def(A2.varKinds.let,e,r,n)}var(e,r,n){return this._def(A2.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new F0t(e,r,n))}add(e,r){return this._leafNode(new r_r(e,$o.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==$s.nil&&this._leafNode(new s_r(e)),this}object(...e){let r=["{"];for(let[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,$s.addCodeArg)(r,o));return r.push("}"),new $s._Code(r)}if(e,r,n){if(this._blockNode(new PJ(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new PJ(e))}else(){return this._elseNode(new n0e)}endIf(){return this._endBlockNode(PJ,n0e)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new c_r(e),r)}forRange(e,r,n,o,s=this.opts.es5?A2.varKinds.var:A2.varKinds.let){let c=this._scope.toName(e);return this._for(new l_r(s,c,r,n),()=>o(c))}forOf(e,r,n,o=A2.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let c=r instanceof $s.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,$s._)`${c}.length`,l=>{this.var(s,(0,$s._)`${c}[${l}]`),n(s)})}return this._for(new U0t("of",o,s,r),()=>n(s))}forIn(e,r,n,o=this.opts.es5?A2.varKinds.var:A2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,$s._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new U0t("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(kJ)}label(e){return this._leafNode(new n_r(e))}break(e){return this._leafNode(new i_r(e))}return(e){let r=new vPe;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(vPe)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new u_r;if(this._blockNode(o),this.code(e),r){let s=this.name("e");this._currNode=o.catch=new bPe(s),r(s)}return n&&(this._currNode=o.finally=new TPe,this.code(n)),this._endBlockNode(bPe,TPe)}throw(e){return this._leafNode(new o_r(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=$s.nil,n,o){return this._blockNode(new CPe(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(CPe)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof PJ))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};$o.CodeGen=d_r;function DJ(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}a(DJ,"addNames");function Q0t(t,e){return e instanceof $s._CodeOrName?DJ(t,e.names):t}a(Q0t,"addExprNames");function i0e(t,e,r){if(t instanceof $s.Name)return n(t);if(!o(t))return t;return new $s._Code(t._items.reduce((s,c)=>(c instanceof $s.Name&&(c=n(c)),c instanceof $s._Code?s.push(...c._items):s.push(c),s),[]));function n(s){let c=r[s.str];return c===void 0||e[s.str]!==1?s:(delete e[s.str],c)}function o(s){return s instanceof $s._Code&&s._items.some(c=>c instanceof $s.Name&&e[c.str]===1&&r[c.str]!==void 0)}}a(i0e,"optimizeExpr");function pLa(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}a(pLa,"subtractNames");function Vyi(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,$s._)`!${f_r(t)}`}a(Vyi,"not");$o.not=Vyi;var hLa=Wyi($o.operators.AND);function mLa(...t){return t.reduce(hLa)}a(mLa,"and");$o.and=mLa;var gLa=Wyi($o.operators.OR);function ALa(...t){return t.reduce(gLa)}a(ALa,"or");$o.or=ALa;function Wyi(t){return(e,r)=>e===$s.nil?r:r===$s.nil?e:(0,$s._)`${f_r(e)} ${t} ${f_r(r)}`}a(Wyi,"mappend");function f_r(t){return t instanceof $s.Name?t:(0,$s._)`(${t})`}a(f_r,"par")});var sa=T(ts=>{"use strict";f();Object.defineProperty(ts,"__esModule",{value:!0});ts.checkStrictMode=ts.getErrorPath=ts.Type=ts.useFunc=ts.setEvaluated=ts.evaluatedPropsToName=ts.mergeEvaluated=ts.eachItem=ts.unescapeJsonPointer=ts.escapeJsonPointer=ts.escapeFragment=ts.unescapeFragment=ts.schemaRefOrVal=ts.schemaHasRulesButRef=ts.schemaHasRules=ts.checkUnknownRules=ts.alwaysValidSchema=ts.toHash=void 0;var Vc=Oo(),yLa=EPe();function ELa(t){let e={};for(let r of t)e[r]=!0;return e}a(ELa,"toHash");ts.toHash=ELa;function _La(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Kyi(t,e),!Jyi(e,t.self.RULES.all))}a(_La,"alwaysValidSchema");ts.alwaysValidSchema=_La;function Kyi(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let o=n.RULES.keywords;for(let s in e)o[s]||eEi(t,`unknown keyword: "${s}"`)}a(Kyi,"checkUnknownRules");ts.checkUnknownRules=Kyi;function Jyi(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}a(Jyi,"schemaHasRules");ts.schemaHasRules=Jyi;function CLa(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}a(CLa,"schemaHasRulesButRef");ts.schemaHasRulesButRef=CLa;function vLa({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Vc._)`${r}`}return(0,Vc._)`${t}${e}${(0,Vc.getProperty)(n)}`}a(vLa,"schemaRefOrVal");ts.schemaRefOrVal=vLa;function bLa(t){return Xyi(decodeURIComponent(t))}a(bLa,"unescapeFragment");ts.unescapeFragment=bLa;function TLa(t){return encodeURIComponent(h_r(t))}a(TLa,"escapeFragment");ts.escapeFragment=TLa;function h_r(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}a(h_r,"escapeJsonPointer");ts.escapeJsonPointer=h_r;function Xyi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}a(Xyi,"unescapeJsonPointer");ts.unescapeJsonPointer=Xyi;function SLa(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}a(SLa,"eachItem");ts.eachItem=SLa;function zyi({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,s,c,l)=>{let u=c===void 0?s:c instanceof Vc.Name?(s instanceof Vc.Name?t(o,s,c):e(o,s,c),c):s instanceof Vc.Name?(e(o,c,s),s):r(s,c);return l===Vc.Name&&!(u instanceof Vc.Name)?n(o,u):u}}a(zyi,"makeMergeEvaluated");ts.mergeEvaluated={props:zyi({mergeNames:a((t,e,r)=>t.if((0,Vc._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Vc._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Vc._)`${r} || {}`).code((0,Vc._)`Object.assign(${r}, ${e})`))}),"mergeNames"),mergeToName:a((t,e,r)=>t.if((0,Vc._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Vc._)`${r} || {}`),m_r(t,r,e))}),"mergeToName"),mergeValues:a((t,e)=>t===!0?!0:{...t,...e},"mergeValues"),resultToName:Zyi}),items:zyi({mergeNames:a((t,e,r)=>t.if((0,Vc._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Vc._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),"mergeNames"),mergeToName:a((t,e,r)=>t.if((0,Vc._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Vc._)`${r} > ${e} ? ${r} : ${e}`)),"mergeToName"),mergeValues:a((t,e)=>t===!0?!0:Math.max(t,e),"mergeValues"),resultToName:a((t,e)=>t.var("items",e),"resultToName")})};function Zyi(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Vc._)`{}`);return e!==void 0&&m_r(t,r,e),r}a(Zyi,"evaluatedPropsToName");ts.evaluatedPropsToName=Zyi;function m_r(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Vc._)`${e}${(0,Vc.getProperty)(n)}`,!0))}a(m_r,"setEvaluated");ts.setEvaluated=m_r;var Yyi={};function ILa(t,e){return t.scopeValue("func",{ref:e,code:Yyi[e.code]||(Yyi[e.code]=new yLa._Code(e.code))})}a(ILa,"useFunc");ts.useFunc=ILa;var p_r;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(p_r||(ts.Type=p_r={}));function xLa(t,e,r){if(t instanceof Vc.Name){let n=e===p_r.Num;return r?n?(0,Vc._)`"[" + ${t} + "]"`:(0,Vc._)`"['" + ${t} + "']"`:n?(0,Vc._)`"/" + ${t}`:(0,Vc._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Vc.getProperty)(t).toString():"/"+h_r(t)}a(xLa,"getErrorPath");ts.getErrorPath=xLa;function eEi(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}a(eEi,"checkStrictMode");ts.checkStrictMode=eEi});var N3=T(g_r=>{"use strict";f();Object.defineProperty(g_r,"__esModule",{value:!0});var wA=Oo(),wLa={data:new wA.Name("data"),valCxt:new wA.Name("valCxt"),instancePath:new wA.Name("instancePath"),parentData:new wA.Name("parentData"),parentDataProperty:new wA.Name("parentDataProperty"),rootData:new wA.Name("rootData"),dynamicAnchors:new wA.Name("dynamicAnchors"),vErrors:new wA.Name("vErrors"),errors:new wA.Name("errors"),this:new wA.Name("this"),self:new wA.Name("self"),scope:new wA.Name("scope"),json:new wA.Name("json"),jsonPos:new wA.Name("jsonPos"),jsonLen:new wA.Name("jsonLen"),jsonPart:new wA.Name("jsonPart")};g_r.default=wLa});var SPe=T(RA=>{"use strict";f();Object.defineProperty(RA,"__esModule",{value:!0});RA.extendErrors=RA.resetErrorsCount=RA.reportExtraError=RA.reportError=RA.keyword$DataError=RA.keywordError=void 0;var aa=Oo(),G0t=sa(),nE=N3();RA.keywordError={message:a(({keyword:t})=>(0,aa.str)`must pass "${t}" keyword validation`,"message")};RA.keyword$DataError={message:a(({keyword:t,schemaType:e})=>e?(0,aa.str)`"${t}" keyword must be ${e} ($data)`:(0,aa.str)`"${t}" keyword is invalid ($data)`,"message")};function RLa(t,e=RA.keywordError,r,n){let{it:o}=t,{gen:s,compositeRule:c,allErrors:l}=o,u=nEi(t,e,r);n??(c||l)?tEi(s,u):rEi(o,(0,aa._)`[${u}]`)}a(RLa,"reportError");RA.reportError=RLa;function PLa(t,e=RA.keywordError,r){let{it:n}=t,{gen:o,compositeRule:s,allErrors:c}=n,l=nEi(t,e,r);tEi(o,l),s||c||rEi(n,nE.default.vErrors)}a(PLa,"reportExtraError");RA.reportExtraError=PLa;function kLa(t,e){t.assign(nE.default.errors,e),t.if((0,aa._)`${nE.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,aa._)`${nE.default.vErrors}.length`,e),()=>t.assign(nE.default.vErrors,null)))}a(kLa,"resetErrorsCount");RA.resetErrorsCount=kLa;function DLa({gen:t,keyword:e,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let c=t.name("err");t.forRange("i",o,nE.default.errors,l=>{t.const(c,(0,aa._)`${nE.default.vErrors}[${l}]`),t.if((0,aa._)`${c}.instancePath === undefined`,()=>t.assign((0,aa._)`${c}.instancePath`,(0,aa.strConcat)(nE.default.instancePath,s.errorPath))),t.assign((0,aa._)`${c}.schemaPath`,(0,aa.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,aa._)`${c}.schema`,r),t.assign((0,aa._)`${c}.data`,n))})}a(DLa,"extendErrors");RA.extendErrors=DLa;function tEi(t,e){let r=t.const("err",e);t.if((0,aa._)`${nE.default.vErrors} === null`,()=>t.assign(nE.default.vErrors,(0,aa._)`[${r}]`),(0,aa._)`${nE.default.vErrors}.push(${r})`),t.code((0,aa._)`${nE.default.errors}++`)}a(tEi,"addError");function rEi(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,aa._)`new ${t.ValidationError}(${e})`):(r.assign((0,aa._)`${n}.errors`,e),r.return(!1))}a(rEi,"returnErrors");var NJ={keyword:new aa.Name("keyword"),schemaPath:new aa.Name("schemaPath"),params:new aa.Name("params"),propertyName:new aa.Name("propertyName"),message:new aa.Name("message"),schema:new aa.Name("schema"),parentSchema:new aa.Name("parentSchema")};function nEi(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,aa._)`{}`:NLa(t,e,r)}a(nEi,"errorObjectCode");function NLa(t,e,r={}){let{gen:n,it:o}=t,s=[MLa(o,r),OLa(t,r)];return BLa(t,e,s),n.object(...s)}a(NLa,"errorObject");function MLa({errorPath:t},{instancePath:e}){let r=e?(0,aa.str)`${t}${(0,G0t.getErrorPath)(e,G0t.Type.Str)}`:t;return[nE.default.instancePath,(0,aa.strConcat)(nE.default.instancePath,r)]}a(MLa,"errorInstancePath");function OLa({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,aa.str)`${e}/${t}`;return r&&(o=(0,aa.str)`${o}${(0,G0t.getErrorPath)(r,G0t.Type.Str)}`),[NJ.schemaPath,o]}a(OLa,"errorSchemaPath");function BLa(t,{params:e,message:r},n){let{keyword:o,data:s,schemaValue:c,it:l}=t,{opts:u,propertyName:d,topSchemaRef:p,schemaPath:h}=l;n.push([NJ.keyword,o],[NJ.params,typeof e=="function"?e(t):e||(0,aa._)`{}`]),u.messages&&n.push([NJ.message,typeof r=="function"?r(t):r]),u.verbose&&n.push([NJ.schema,c],[NJ.parentSchema,(0,aa._)`${p}${h}`],[nE.default.data,s]),d&&n.push([NJ.propertyName,d])}a(BLa,"extraErrorProps")});var oEi=T(o0e=>{"use strict";f();Object.defineProperty(o0e,"__esModule",{value:!0});o0e.boolOrEmptySchema=o0e.topBoolOrEmptySchema=void 0;var LLa=SPe(),FLa=Oo(),ULa=N3(),QLa={message:"boolean schema is false"};function qLa(t){let{gen:e,schema:r,validateName:n}=t;r===!1?iEi(t,!1):typeof r=="object"&&r.$async===!0?e.return(ULa.default.data):(e.assign((0,FLa._)`${n}.errors`,null),e.return(!0))}a(qLa,"topBoolOrEmptySchema");o0e.topBoolOrEmptySchema=qLa;function GLa(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),iEi(t)):r.var(e,!0)}a(GLa,"boolOrEmptySchema");o0e.boolOrEmptySchema=GLa;function iEi(t,e){let{gen:r,data:n}=t,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,LLa.reportError)(o,QLa,void 0,e)}a(iEi,"falseSchemaError")});var A_r=T(s0e=>{"use strict";f();Object.defineProperty(s0e,"__esModule",{value:!0});s0e.getRules=s0e.isJSONType=void 0;var HLa=["string","number","integer","boolean","null","object","array"],jLa=new Set(HLa);function $La(t){return typeof t=="string"&&jLa.has(t)}a($La,"isJSONType");s0e.isJSONType=$La;function VLa(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}a(VLa,"getRules");s0e.getRules=VLa});var y_r=T(YQ=>{"use strict";f();Object.defineProperty(YQ,"__esModule",{value:!0});YQ.shouldUseRule=YQ.shouldUseGroup=YQ.schemaHasRulesForType=void 0;function WLa({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&sEi(t,n)}a(WLa,"schemaHasRulesForType");YQ.schemaHasRulesForType=WLa;function sEi(t,e){return e.rules.some(r=>aEi(t,r))}a(sEi,"shouldUseGroup");YQ.shouldUseGroup=sEi;function aEi(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}a(aEi,"shouldUseRule");YQ.shouldUseRule=aEi});var IPe=T(PA=>{"use strict";f();Object.defineProperty(PA,"__esModule",{value:!0});PA.reportTypeError=PA.checkDataTypes=PA.checkDataType=PA.coerceAndCheckDataType=PA.getJSONTypes=PA.getSchemaTypes=PA.DataType=void 0;var zLa=A_r(),YLa=y_r(),KLa=SPe(),bo=Oo(),cEi=sa(),a0e;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(a0e||(PA.DataType=a0e={}));function JLa(t){let e=lEi(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}a(JLa,"getSchemaTypes");PA.getSchemaTypes=JLa;function lEi(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(zLa.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}a(lEi,"getJSONTypes");PA.getJSONTypes=lEi;function XLa(t,e){let{gen:r,data:n,opts:o}=t,s=ZLa(e,o.coerceTypes),c=e.length>0&&!(s.length===0&&e.length===1&&(0,YLa.schemaHasRulesForType)(t,e[0]));if(c){let l=__r(e,n,o.strictNumbers,a0e.Wrong);r.if(l,()=>{s.length?e8a(t,e,s):C_r(t)})}return c}a(XLa,"coerceAndCheckDataType");PA.coerceAndCheckDataType=XLa;var uEi=new Set(["string","number","integer","boolean","null"]);function ZLa(t,e){return e?t.filter(r=>uEi.has(r)||e==="array"&&r==="array"):[]}a(ZLa,"coerceToTypes");function e8a(t,e,r){let{gen:n,data:o,opts:s}=t,c=n.let("dataType",(0,bo._)`typeof ${o}`),l=n.let("coerced",(0,bo._)`undefined`);s.coerceTypes==="array"&&n.if((0,bo._)`${c} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,bo._)`${o}[0]`).assign(c,(0,bo._)`typeof ${o}`).if(__r(e,o,s.strictNumbers),()=>n.assign(l,o))),n.if((0,bo._)`${l} !== undefined`);for(let d of r)(uEi.has(d)||d==="array"&&s.coerceTypes==="array")&&u(d);n.else(),C_r(t),n.endIf(),n.if((0,bo._)`${l} !== undefined`,()=>{n.assign(o,l),t8a(t,l)});function u(d){switch(d){case"string":n.elseIf((0,bo._)`${c} == "number" || ${c} == "boolean"`).assign(l,(0,bo._)`"" + ${o}`).elseIf((0,bo._)`${o} === null`).assign(l,(0,bo._)`""`);return;case"number":n.elseIf((0,bo._)`${c} == "boolean" || ${o} === null + || (${c} == "string" && ${o} && ${o} == +${o})`).assign(l,(0,bo._)`+${o}`);return;case"integer":n.elseIf((0,bo._)`${c} === "boolean" || ${o} === null + || (${c} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,(0,bo._)`+${o}`);return;case"boolean":n.elseIf((0,bo._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf((0,bo._)`${o} === "true" || ${o} === 1`).assign(l,!0);return;case"null":n.elseIf((0,bo._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(l,null);return;case"array":n.elseIf((0,bo._)`${c} === "string" || ${c} === "number" + || ${c} === "boolean" || ${o} === null`).assign(l,(0,bo._)`[${o}]`)}}a(u,"coerceSpecificType")}a(e8a,"coerceData");function t8a({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,bo._)`${e} !== undefined`,()=>t.assign((0,bo._)`${e}[${r}]`,n))}a(t8a,"assignParentData");function E_r(t,e,r,n=a0e.Correct){let o=n===a0e.Correct?bo.operators.EQ:bo.operators.NEQ,s;switch(t){case"null":return(0,bo._)`${e} ${o} null`;case"array":s=(0,bo._)`Array.isArray(${e})`;break;case"object":s=(0,bo._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=c((0,bo._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=c();break;default:return(0,bo._)`typeof ${e} ${o} ${t}`}return n===a0e.Correct?s:(0,bo.not)(s);function c(l=bo.nil){return(0,bo.and)((0,bo._)`typeof ${e} == "number"`,l,r?(0,bo._)`isFinite(${e})`:bo.nil)}}a(E_r,"checkDataType");PA.checkDataType=E_r;function __r(t,e,r,n){if(t.length===1)return E_r(t[0],e,r,n);let o,s=(0,cEi.toHash)(t);if(s.array&&s.object){let c=(0,bo._)`typeof ${e} != "object"`;o=s.null?c:(0,bo._)`!${e} || ${c}`,delete s.null,delete s.array,delete s.object}else o=bo.nil;s.number&&delete s.integer;for(let c in s)o=(0,bo.and)(o,E_r(c,e,r,n));return o}a(__r,"checkDataTypes");PA.checkDataTypes=__r;var r8a={message:a(({schema:t})=>`must be ${t}`,"message"),params:a(({schema:t,schemaValue:e})=>typeof t=="string"?(0,bo._)`{type: ${t}}`:(0,bo._)`{type: ${e}}`,"params")};function C_r(t){let e=n8a(t);(0,KLa.reportError)(e,r8a)}a(C_r,"reportTypeError");PA.reportTypeError=C_r;function n8a(t){let{gen:e,data:r,schema:n}=t,o=(0,cEi.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}a(n8a,"getTypeErrorContext")});var fEi=T(H0t=>{"use strict";f();Object.defineProperty(H0t,"__esModule",{value:!0});H0t.assignDefaults=void 0;var c0e=Oo(),i8a=sa();function o8a(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)dEi(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>dEi(t,s,o.default))}a(o8a,"assignDefaults");H0t.assignDefaults=o8a;function dEi(t,e,r){let{gen:n,compositeRule:o,data:s,opts:c}=t;if(r===void 0)return;let l=(0,c0e._)`${s}${(0,c0e.getProperty)(e)}`;if(o){(0,i8a.checkStrictMode)(t,`default is ignored for: ${l}`);return}let u=(0,c0e._)`${l} === undefined`;c.useDefaults==="empty"&&(u=(0,c0e._)`${u} || ${l} === null || ${l} === ""`),n.if(u,(0,c0e._)`${l} = ${(0,c0e.stringify)(r)}`)}a(dEi,"assignDefault")});var EI=T(Pc=>{"use strict";f();Object.defineProperty(Pc,"__esModule",{value:!0});Pc.validateUnion=Pc.validateArray=Pc.usePattern=Pc.callValidateCode=Pc.schemaProperties=Pc.allSchemaProperties=Pc.noPropertyInData=Pc.propertyInData=Pc.isOwnProperty=Pc.hasPropFunc=Pc.reportMissingProp=Pc.checkMissingProp=Pc.checkReportMissingProp=void 0;var ou=Oo(),v_r=sa(),KQ=N3(),s8a=sa();function a8a(t,e){let{gen:r,data:n,it:o}=t;r.if(T_r(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ou._)`${e}`},!0),t.error()})}a(a8a,"checkReportMissingProp");Pc.checkReportMissingProp=a8a;function c8a({gen:t,data:e,it:{opts:r}},n,o){return(0,ou.or)(...n.map(s=>(0,ou.and)(T_r(t,e,s,r.ownProperties),(0,ou._)`${o} = ${s}`)))}a(c8a,"checkMissingProp");Pc.checkMissingProp=c8a;function l8a(t,e){t.setParams({missingProperty:e},!0),t.error()}a(l8a,"reportMissingProp");Pc.reportMissingProp=l8a;function pEi(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ou._)`Object.prototype.hasOwnProperty`})}a(pEi,"hasPropFunc");Pc.hasPropFunc=pEi;function b_r(t,e,r){return(0,ou._)`${pEi(t)}.call(${e}, ${r})`}a(b_r,"isOwnProperty");Pc.isOwnProperty=b_r;function u8a(t,e,r,n){let o=(0,ou._)`${e}${(0,ou.getProperty)(r)} !== undefined`;return n?(0,ou._)`${o} && ${b_r(t,e,r)}`:o}a(u8a,"propertyInData");Pc.propertyInData=u8a;function T_r(t,e,r,n){let o=(0,ou._)`${e}${(0,ou.getProperty)(r)} === undefined`;return n?(0,ou.or)(o,(0,ou.not)(b_r(t,e,r))):o}a(T_r,"noPropertyInData");Pc.noPropertyInData=T_r;function hEi(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}a(hEi,"allSchemaProperties");Pc.allSchemaProperties=hEi;function d8a(t,e){return hEi(e).filter(r=>!(0,v_r.alwaysValidSchema)(t,e[r]))}a(d8a,"schemaProperties");Pc.schemaProperties=d8a;function f8a({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:c},l,u,d){let p=d?(0,ou._)`${t}, ${e}, ${n}${o}`:e,h=[[KQ.default.instancePath,(0,ou.strConcat)(KQ.default.instancePath,s)],[KQ.default.parentData,c.parentData],[KQ.default.parentDataProperty,c.parentDataProperty],[KQ.default.rootData,KQ.default.rootData]];c.opts.dynamicRef&&h.push([KQ.default.dynamicAnchors,KQ.default.dynamicAnchors]);let m=(0,ou._)`${p}, ${r.object(...h)}`;return u!==ou.nil?(0,ou._)`${l}.call(${u}, ${m})`:(0,ou._)`${l}(${m})`}a(f8a,"callValidateCode");Pc.callValidateCode=f8a;var p8a=(0,ou._)`new RegExp`;function h8a({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ou._)`${o.code==="new RegExp"?p8a:(0,s8a.useFunc)(t,o)}(${r}, ${n})`})}a(h8a,"usePattern");Pc.usePattern=h8a;function m8a(t){let{gen:e,data:r,keyword:n,it:o}=t,s=e.name("valid");if(o.allErrors){let l=e.let("valid",!0);return c(()=>e.assign(l,!1)),l}return e.var(s,!0),c(()=>e.break()),s;function c(l){let u=e.const("len",(0,ou._)`${r}.length`);e.forRange("i",0,u,d=>{t.subschema({keyword:n,dataProp:d,dataPropType:v_r.Type.Num},s),e.if((0,ou.not)(s),l)})}a(c,"validateItems")}a(m8a,"validateArray");Pc.validateArray=m8a;function g8a(t){let{gen:e,schema:r,keyword:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,v_r.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let c=e.let("valid",!1),l=e.name("_valid");e.block(()=>r.forEach((u,d)=>{let p=t.subschema({keyword:n,schemaProp:d,compositeRule:!0},l);e.assign(c,(0,ou._)`${c} || ${l}`),t.mergeValidEvaluated(p,l)||e.if((0,ou.not)(c))})),t.result(c,()=>t.reset(),()=>t.error(!0))}a(g8a,"validateUnion");Pc.validateUnion=g8a});var AEi=T(iN=>{"use strict";f();Object.defineProperty(iN,"__esModule",{value:!0});iN.validateKeywordUsage=iN.validSchemaType=iN.funcKeywordCode=iN.macroKeywordCode=void 0;var iE=Oo(),MJ=N3(),A8a=EI(),y8a=SPe();function E8a(t,e){let{gen:r,keyword:n,schema:o,parentSchema:s,it:c}=t,l=e.macro.call(c.self,o,s,c),u=gEi(r,n,l);c.opts.validateSchema!==!1&&c.self.validateSchema(l,!0);let d=r.name("valid");t.subschema({schema:l,schemaPath:iE.nil,errSchemaPath:`${c.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},d),t.pass(d,()=>t.error(!0))}a(E8a,"macroKeywordCode");iN.macroKeywordCode=E8a;function _8a(t,e){var r;let{gen:n,keyword:o,schema:s,parentSchema:c,$data:l,it:u}=t;v8a(u,e);let d=!l&&e.compile?e.compile.call(u.self,s,c,u):e.validate,p=gEi(n,o,d),h=n.let("valid");t.block$data(h,m),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function m(){if(e.errors===!1)y(),e.modifying&&mEi(t),E(()=>t.error());else{let _=e.async?g():A();e.modifying&&mEi(t),E(()=>C8a(t,_))}}a(m,"validateKeyword");function g(){let _=n.let("ruleErrs",null);return n.try(()=>y((0,iE._)`await `),v=>n.assign(h,!1).if((0,iE._)`${v} instanceof ${u.ValidationError}`,()=>n.assign(_,(0,iE._)`${v}.errors`),()=>n.throw(v))),_}a(g,"validateAsync");function A(){let _=(0,iE._)`${p}.errors`;return n.assign(_,null),y(iE.nil),_}a(A,"validateSync");function y(_=e.async?(0,iE._)`await `:iE.nil){let v=u.opts.passContext?MJ.default.this:MJ.default.self,b=!("compile"in e&&!l||e.schema===!1);n.assign(h,(0,iE._)`${_}${(0,A8a.callValidateCode)(t,p,v,b)}`,e.modifying)}a(y,"assignValid");function E(_){var v;n.if((0,iE.not)((v=e.valid)!==null&&v!==void 0?v:h),_)}a(E,"reportErrs")}a(_8a,"funcKeywordCode");iN.funcKeywordCode=_8a;function mEi(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,iE._)`${n.parentData}[${n.parentDataProperty}]`))}a(mEi,"modifyData");function C8a(t,e){let{gen:r}=t;r.if((0,iE._)`Array.isArray(${e})`,()=>{r.assign(MJ.default.vErrors,(0,iE._)`${MJ.default.vErrors} === null ? ${e} : ${MJ.default.vErrors}.concat(${e})`).assign(MJ.default.errors,(0,iE._)`${MJ.default.vErrors}.length`),(0,y8a.extendErrors)(t)},()=>t.error())}a(C8a,"addErrs");function v8a({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}a(v8a,"checkAsyncKeyword");function gEi(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,iE.stringify)(r)})}a(gEi,"useKeyword");function b8a(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}a(b8a,"validSchemaType");iN.validSchemaType=b8a;function T8a({schema:t,opts:e,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let c=o.dependencies;if(c?.some(l=>!Object.prototype.hasOwnProperty.call(t,l)))throw new Error(`parent schema must have dependencies of ${s}: ${c.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}a(T8a,"validateKeywordUsage");iN.validateKeywordUsage=T8a});var EEi=T(JQ=>{"use strict";f();Object.defineProperty(JQ,"__esModule",{value:!0});JQ.extendSubschemaMode=JQ.extendSubschemaData=JQ.getSubschema=void 0;var oN=Oo(),yEi=sa();function S8a(t,{keyword:e,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let l=t.schema[e];return r===void 0?{schema:l,schemaPath:(0,oN._)`${t.schemaPath}${(0,oN.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:l[r],schemaPath:(0,oN._)`${t.schemaPath}${(0,oN.getProperty)(e)}${(0,oN.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,yEi.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||c===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}a(S8a,"getSubschema");JQ.getSubschema=S8a;function I8a(t,e,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:l}=e;if(r!==void 0){let{errorPath:d,dataPathArr:p,opts:h}=e,m=l.let("data",(0,oN._)`${e.data}${(0,oN.getProperty)(r)}`,!0);u(m),t.errorPath=(0,oN.str)`${d}${(0,yEi.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,oN._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let d=o instanceof oN.Name?o:l.let("data",o,!0);u(d),c!==void 0&&(t.propertyName=c)}s&&(t.dataTypes=s);function u(d){t.data=d,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,d]}a(u,"dataContextProps")}a(I8a,"extendSubschemaData");JQ.extendSubschemaData=I8a;function x8a(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(t.compositeRule=n),o!==void 0&&(t.createErrors=o),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}a(x8a,"extendSubschemaMode");JQ.extendSubschemaMode=x8a});var S_r=T((Io0,_Ei)=>{"use strict";f();_Ei.exports=a(function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var c=s[o];if(!t(e[c],r[c]))return!1}return!0}return e!==e&&r!==r},"equal")});var vEi=T((Ro0,CEi)=>{"use strict";f();var XQ=CEi.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};j0t(e,n,o,t,"",t)};XQ.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};XQ.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};XQ.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};XQ.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function j0t(t,e,r,n,o,s,c,l,u,d){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,s,c,l,u,d);for(var p in n){var h=n[p];if(Array.isArray(h)){if(p in XQ.arrayKeywords)for(var m=0;m{"use strict";f();Object.defineProperty(SC,"__esModule",{value:!0});SC.getSchemaRefs=SC.resolveUrl=SC.normalizeId=SC._getFullPath=SC.getFullPath=SC.inlineRef=void 0;var R8a=sa(),P8a=S_r(),k8a=vEi(),D8a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function N8a(t,e=!0){return typeof t=="boolean"?!0:e===!0?!I_r(t):e?bEi(t)<=e:!1}a(N8a,"inlineRef");SC.inlineRef=N8a;var M8a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function I_r(t){for(let e in t){if(M8a.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(I_r)||typeof r=="object"&&I_r(r))return!0}return!1}a(I_r,"hasRef");function bEi(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!D8a.has(r)&&(typeof t[r]=="object"&&(0,R8a.eachItem)(t[r],n=>e+=bEi(n)),e===1/0))return 1/0}return e}a(bEi,"countKeys");function TEi(t,e="",r){r!==!1&&(e=l0e(e));let n=t.parse(e);return SEi(t,n)}a(TEi,"getFullPath");SC.getFullPath=TEi;function SEi(t,e){return t.serialize(e).split("#")[0]+"#"}a(SEi,"_getFullPath");SC._getFullPath=SEi;var O8a=/#\/?$/;function l0e(t){return t?t.replace(O8a,""):""}a(l0e,"normalizeId");SC.normalizeId=l0e;function B8a(t,e,r){return r=l0e(r),t.resolve(e,r)}a(B8a,"resolveUrl");SC.resolveUrl=B8a;var L8a=/^[a-z_][-a-z0-9._]*$/i;function F8a(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=l0e(t[r]||e),s={"":o},c=TEi(n,o,!1),l={},u=new Set;return k8a(t,{allKeys:!0},(h,m,g,A)=>{if(A===void 0)return;let y=c+m,E=s[A];typeof h[r]=="string"&&(E=_.call(this,h[r])),v.call(this,h.$anchor),v.call(this,h.$dynamicAnchor),s[m]=E;function _(b){let I=this.opts.uriResolver.resolve;if(b=l0e(E?I(E,b):b),u.has(b))throw p(b);u.add(b);let x=this.refs[b];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?d(h,x.schema,b):b!==l0e(y)&&(b[0]==="#"?(d(h,l[b],b),l[b]=h):this.refs[b]=y),b}a(_,"addRef");function v(b){if(typeof b=="string"){if(!L8a.test(b))throw new Error(`invalid anchor "${b}"`);_.call(this,`#${b}`)}}a(v,"addAnchor")}),l;function d(h,m,g){if(m!==void 0&&!P8a(h,m))throw p(g)}a(d,"checkAmbiguosRef");function p(h){return new Error(`reference "${h}" resolves to more than one schema`)}a(p,"ambiguos")}a(F8a,"getSchemaRefs");SC.getSchemaRefs=F8a});var PPe=T(ZQ=>{"use strict";f();Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.getData=ZQ.KeywordCxt=ZQ.validateFunctionCode=void 0;var PEi=oEi(),IEi=IPe(),w_r=y_r(),$0t=IPe(),U8a=fEi(),RPe=AEi(),x_r=EEi(),Bn=Oo(),Fi=N3(),Q8a=xPe(),M3=sa(),wPe=SPe();function q8a(t){if(NEi(t)&&(MEi(t),DEi(t))){j8a(t);return}kEi(t,()=>(0,PEi.topBoolOrEmptySchema)(t))}a(q8a,"validateFunctionCode");ZQ.validateFunctionCode=q8a;function kEi({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},s){o.code.es5?t.func(e,(0,Bn._)`${Fi.default.data}, ${Fi.default.valCxt}`,n.$async,()=>{t.code((0,Bn._)`"use strict"; ${xEi(r,o)}`),H8a(t,o),t.code(s)}):t.func(e,(0,Bn._)`${Fi.default.data}, ${G8a(o)}`,n.$async,()=>t.code(xEi(r,o)).code(s))}a(kEi,"validateFunction");function G8a(t){return(0,Bn._)`{${Fi.default.instancePath}="", ${Fi.default.parentData}, ${Fi.default.parentDataProperty}, ${Fi.default.rootData}=${Fi.default.data}${t.dynamicRef?(0,Bn._)`, ${Fi.default.dynamicAnchors}={}`:Bn.nil}}={}`}a(G8a,"destructureValCxt");function H8a(t,e){t.if(Fi.default.valCxt,()=>{t.var(Fi.default.instancePath,(0,Bn._)`${Fi.default.valCxt}.${Fi.default.instancePath}`),t.var(Fi.default.parentData,(0,Bn._)`${Fi.default.valCxt}.${Fi.default.parentData}`),t.var(Fi.default.parentDataProperty,(0,Bn._)`${Fi.default.valCxt}.${Fi.default.parentDataProperty}`),t.var(Fi.default.rootData,(0,Bn._)`${Fi.default.valCxt}.${Fi.default.rootData}`),e.dynamicRef&&t.var(Fi.default.dynamicAnchors,(0,Bn._)`${Fi.default.valCxt}.${Fi.default.dynamicAnchors}`)},()=>{t.var(Fi.default.instancePath,(0,Bn._)`""`),t.var(Fi.default.parentData,(0,Bn._)`undefined`),t.var(Fi.default.parentDataProperty,(0,Bn._)`undefined`),t.var(Fi.default.rootData,Fi.default.data),e.dynamicRef&&t.var(Fi.default.dynamicAnchors,(0,Bn._)`{}`)})}a(H8a,"destructureValCxtES5");function j8a(t){let{schema:e,opts:r,gen:n}=t;kEi(t,()=>{r.$comment&&e.$comment&&BEi(t),Y8a(t),n.let(Fi.default.vErrors,null),n.let(Fi.default.errors,0),r.unevaluated&&$8a(t),OEi(t),X8a(t)})}a(j8a,"topSchemaObjCode");function $8a(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Bn._)`${r}.evaluated`),e.if((0,Bn._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Bn._)`${t.evaluated}.props`,(0,Bn._)`undefined`)),e.if((0,Bn._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Bn._)`${t.evaluated}.items`,(0,Bn._)`undefined`))}a($8a,"resetEvaluated");function xEi(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Bn._)`/*# sourceURL=${r} */`:Bn.nil}a(xEi,"funcSourceUrl");function V8a(t,e){if(NEi(t)&&(MEi(t),DEi(t))){W8a(t,e);return}(0,PEi.boolOrEmptySchema)(t,e)}a(V8a,"subschemaCode");function DEi({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}a(DEi,"schemaCxtHasRules");function NEi(t){return typeof t.schema!="boolean"}a(NEi,"isSchemaObj");function W8a(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&BEi(t),K8a(t),J8a(t);let s=n.const("_errs",Fi.default.errors);OEi(t,s),n.var(e,(0,Bn._)`${s} === ${Fi.default.errors}`)}a(W8a,"subSchemaObjCode");function MEi(t){(0,M3.checkUnknownRules)(t),z8a(t)}a(MEi,"checkKeywords");function OEi(t,e){if(t.opts.jtd)return wEi(t,[],!1,e);let r=(0,IEi.getSchemaTypes)(t.schema),n=(0,IEi.coerceAndCheckDataType)(t,r);wEi(t,r,!n,e)}a(OEi,"typeAndKeywords");function z8a(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,M3.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}a(z8a,"checkRefsAndKeywords");function Y8a(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,M3.checkStrictMode)(t,"default is ignored in the schema root")}a(Y8a,"checkNoDefault");function K8a(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Q8a.resolveUrl)(t.opts.uriResolver,t.baseId,e))}a(K8a,"updateContext");function J8a(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}a(J8a,"checkAsyncSchema");function BEi({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)t.code((0,Bn._)`${Fi.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let c=(0,Bn.str)`${n}/$comment`,l=t.scopeValue("root",{ref:e.root});t.code((0,Bn._)`${Fi.default.self}.opts.$comment(${s}, ${c}, ${l}.schema)`)}}a(BEi,"commentKeyword");function X8a(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=t;r.$async?e.if((0,Bn._)`${Fi.default.errors} === 0`,()=>e.return(Fi.default.data),()=>e.throw((0,Bn._)`new ${o}(${Fi.default.vErrors})`)):(e.assign((0,Bn._)`${n}.errors`,Fi.default.vErrors),s.unevaluated&&Z8a(t),e.return((0,Bn._)`${Fi.default.errors} === 0`))}a(X8a,"returnResults");function Z8a({gen:t,evaluated:e,props:r,items:n}){r instanceof Bn.Name&&t.assign((0,Bn._)`${e}.props`,r),n instanceof Bn.Name&&t.assign((0,Bn._)`${e}.items`,n)}a(Z8a,"assignEvaluated");function wEi(t,e,r,n){let{gen:o,schema:s,data:c,allErrors:l,opts:u,self:d}=t,{RULES:p}=d;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,M3.schemaHasRulesButRef)(s,p))){o.block(()=>FEi(t,"$ref",p.all.$ref.definition));return}u.jtd||e6a(t,e),o.block(()=>{for(let m of p.rules)h(m);h(p.post)});function h(m){(0,w_r.shouldUseGroup)(s,m)&&(m.type?(o.if((0,$0t.checkDataType)(m.type,c,u.strictNumbers)),REi(t,m),e.length===1&&e[0]===m.type&&r&&(o.else(),(0,$0t.reportTypeError)(t)),o.endIf()):REi(t,m),l||o.if((0,Bn._)`${Fi.default.errors} === ${n||0}`))}a(h,"groupKeywords")}a(wEi,"schemaKeywords");function REi(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,U8a.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,w_r.shouldUseRule)(n,s)&&FEi(t,s.keyword,s.definition,e.type)})}a(REi,"iterateKeywords");function e6a(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(t6a(t,e),t.opts.allowUnionTypes||r6a(t,e),n6a(t,t.dataTypes))}a(e6a,"checkStrictTypes");function t6a(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{LEi(t.dataTypes,r)||R_r(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),o6a(t,e)}}a(t6a,"checkContextTypes");function r6a(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&R_r(t,"use allowUnionTypes to allow union type keyword")}a(r6a,"checkMultipleTypes");function n6a(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,w_r.shouldUseRule)(t.schema,o)){let{type:s}=o.definition;s.length&&!s.some(c=>i6a(e,c))&&R_r(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}a(n6a,"checkKeywordTypes");function i6a(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}a(i6a,"hasApplicableType");function LEi(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}a(LEi,"includesType");function o6a(t,e){let r=[];for(let n of t.dataTypes)LEi(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}a(o6a,"narrowSchemaTypes");function R_r(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,M3.checkStrictMode)(t,e,t.opts.strictTypes)}a(R_r,"strictTypesError");var V0t=class{static{a(this,"KeywordCxt")}constructor(e,r,n){if((0,RPe.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,M3.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",UEi(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,RPe.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Fi.default.errors))}result(e,r,n){this.failResult((0,Bn.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Bn.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,Bn._)`${r} !== undefined && (${(0,Bn.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?wPe.reportExtraError:wPe.reportError)(this,this.def.error,r)}$dataError(){(0,wPe.reportError)(this,this.def.$dataError||wPe.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,wPe.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Bn.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Bn.nil,r=Bn.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:c}=this;n.if((0,Bn.or)((0,Bn._)`${o} === undefined`,r)),e!==Bn.nil&&n.assign(e,!0),(s.length||c.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Bn.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,Bn.or)(c(),l());function c(){if(n.length){if(!(r instanceof Bn.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,Bn._)`${(0,$0t.checkDataTypes)(u,r,s.opts.strictNumbers,$0t.DataType.Wrong)}`}return Bn.nil}function l(){if(o.validateSchema){let u=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,Bn._)`!${u}(${r})`}return Bn.nil}}subschema(e,r){let n=(0,x_r.getSubschema)(this.it,e);(0,x_r.extendSubschemaData)(n,this.it,e),(0,x_r.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return V8a(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=M3.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=M3.mergeEvaluated.items(o,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(e,Bn.Name)),!0}};ZQ.KeywordCxt=V0t;function FEi(t,e,r,n){let o=new V0t(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,RPe.funcKeywordCode)(o,r):"macro"in r?(0,RPe.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,RPe.funcKeywordCode)(o,r)}a(FEi,"keywordCode");var s6a=/^\/(?:[^~]|~0|~1)*$/,a6a=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function UEi(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,s;if(t==="")return Fi.default.rootData;if(t[0]==="/"){if(!s6a.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,s=Fi.default.rootData}else{let d=a6a.exec(t);if(!d)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+d[1];if(o=d[2],o==="#"){if(p>=e)throw new Error(u("property/index",p));return n[e-p]}if(p>e)throw new Error(u("data",p));if(s=r[e-p],!o)return s}let c=s,l=o.split("/");for(let d of l)d&&(s=(0,Bn._)`${s}${(0,Bn.getProperty)((0,M3.unescapeJsonPointer)(d))}`,c=(0,Bn._)`${c} && ${s}`);return c;function u(d,p){return`Cannot access ${d} ${p} levels up, current level is ${e}`}}a(UEi,"getData");ZQ.getData=UEi});var W0t=T(k_r=>{"use strict";f();Object.defineProperty(k_r,"__esModule",{value:!0});var P_r=class extends Error{static{a(this,"ValidationError")}constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};k_r.default=P_r});var kPe=T(M_r=>{"use strict";f();Object.defineProperty(M_r,"__esModule",{value:!0});var D_r=xPe(),N_r=class extends Error{static{a(this,"MissingRefError")}constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,D_r.resolveUrl)(e,r,n),this.missingSchema=(0,D_r.normalizeId)((0,D_r.getFullPath)(e,this.missingRef))}};M_r.default=N_r});var Y0t=T(_I=>{"use strict";f();Object.defineProperty(_I,"__esModule",{value:!0});_I.resolveSchema=_I.getCompilingSchema=_I.resolveRef=_I.compileSchema=_I.SchemaEnv=void 0;var y2=Oo(),c6a=W0t(),OJ=N3(),E2=xPe(),QEi=sa(),l6a=PPe(),u0e=class{static{a(this,"SchemaEnv")}constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,E2.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};_I.SchemaEnv=u0e;function B_r(t){let e=qEi.call(this,t);if(e)return e;let r=(0,E2.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,c=new y2.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),l;t.$async&&(l=c.scopeValue("Error",{ref:c6a.default,code:(0,y2._)`require("ajv/dist/runtime/validation_error").default`}));let u=c.scopeName("validate");t.validateName=u;let d={gen:c,allErrors:this.opts.allErrors,data:OJ.default.data,parentData:OJ.default.parentData,parentDataProperty:OJ.default.parentDataProperty,dataNames:[OJ.default.data],dataPathArr:[y2.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,y2.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:l,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:y2.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,y2._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,l6a.validateFunctionCode)(d),c.optimize(this.opts.code.optimize);let h=c.toString();p=`${c.scopeRefs(OJ.default.scope)}return ${h}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let g=new Function(`${OJ.default.self}`,`${OJ.default.scope}`,p)(this,this.scope.get());if(this.scope.value(u,{ref:g}),g.errors=null,g.schema=t.schema,g.schemaEnv=t,t.$async&&(g.$async=!0),this.opts.code.source===!0&&(g.source={validateName:u,validateCode:h,scopeValues:c._values}),this.opts.unevaluated){let{props:A,items:y}=d;g.evaluated={props:A instanceof y2.Name?void 0:A,items:y instanceof y2.Name?void 0:y,dynamicProps:A instanceof y2.Name,dynamicItems:y instanceof y2.Name},g.source&&(g.source.evaluated=(0,y2.stringify)(g.evaluated))}return t.validate=g,t}catch(h){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),h}finally{this._compilations.delete(t)}}a(B_r,"compileSchema");_I.compileSchema=B_r;function u6a(t,e,r){var n;r=(0,E2.resolveUrl)(this.opts.uriResolver,e,r);let o=t.refs[r];if(o)return o;let s=p6a.call(this,t,r);if(s===void 0){let c=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:l}=this.opts;c&&(s=new u0e({schema:c,schemaId:l,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=d6a.call(this,s)}a(u6a,"resolveRef");_I.resolveRef=u6a;function d6a(t){return(0,E2.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:B_r.call(this,t)}a(d6a,"inlineOrCompile");function qEi(t){for(let e of this._compilations)if(f6a(e,t))return e}a(qEi,"getCompilingSchema");_I.getCompilingSchema=qEi;function f6a(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}a(f6a,"sameSchemaEnv");function p6a(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||z0t.call(this,t,e)}a(p6a,"resolve");function z0t(t,e){let r=this.opts.uriResolver.parse(e),n=(0,E2._getFullPath)(this.opts.uriResolver,r),o=(0,E2.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===o)return O_r.call(this,r,t);let s=(0,E2.normalizeId)(n),c=this.refs[s]||this.schemas[s];if(typeof c=="string"){let l=z0t.call(this,t,c);return typeof l?.schema!="object"?void 0:O_r.call(this,r,l)}if(typeof c?.schema=="object"){if(c.validate||B_r.call(this,c),s===(0,E2.normalizeId)(e)){let{schema:l}=c,{schemaId:u}=this.opts,d=l[u];return d&&(o=(0,E2.resolveUrl)(this.opts.uriResolver,o,d)),new u0e({schema:l,schemaId:u,root:t,baseId:o})}return O_r.call(this,r,c)}}a(z0t,"resolveSchema");_I.resolveSchema=z0t;var h6a=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function O_r(t,{baseId:e,schema:r,root:n}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let l of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,QEi.unescapeFragment)(l)];if(u===void 0)return;r=u;let d=typeof r=="object"&&r[this.opts.schemaId];!h6a.has(l)&&d&&(e=(0,E2.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,QEi.schemaHasRulesButRef)(r,this.RULES)){let l=(0,E2.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=z0t.call(this,n,l)}let{schemaId:c}=this.opts;if(s=s||new u0e({schema:r,schemaId:c,root:n,baseId:e}),s.schema!==s.root.schema)return s}a(O_r,"getJsonPointer")});var GEi=T((Wo0,m6a)=>{m6a.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var jEi=T((zo0,HEi)=>{"use strict";f();var g6a={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};HEi.exports={HEX:g6a}});var XEi=T((Ko0,JEi)=>{"use strict";f();var{HEX:A6a}=jEi();function zEi(t){if(KEi(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(/^(?:(?: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])$/u)||[],[r]=e;return r?{host:E6a(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}a(zEi,"normalizeIPv4");function L_r(t,e=!1){let r="",n=!0;for(let o of t){if(A6a[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return e&&r.length===0&&(r="0"),r}a(L_r,"stringArrayToHexStripped");function y6a(t){let e=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,c=!1,l=!1;function u(){if(o.length){if(s===!1){let d=L_r(o);if(d!==void 0)n.push(d);else return r.error=!0,!1}o.length=0}return!0}a(u,"consume");for(let d=0;d7){r.error=!0;break}d-1>=0&&t[d-1]===":"&&(c=!0);continue}else if(p==="%"){if(!u())break;s=!0}else{o.push(p);continue}}return o.length&&(s?r.zone=o.join(""):l?n.push(o.join("")):n.push(L_r(o))),r.address=n.join(""),r}a(y6a,"getIPV6");function YEi(t,e={}){if(KEi(t,":")<2)return{host:t,isIPV6:!1};let r=y6a(t);if(r.error)return{host:t,isIPV6:!1};{let n=r.address,o=r.address;return r.zone&&(n+="%"+r.zone,o+="%25"+r.zone),{host:n,escapedHost:o,isIPV6:!0}}}a(YEi,"normalizeIPv6");function E6a(t,e){let r="",n=!0,o=t.length;for(let s=0;s{"use strict";f();var T6a=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,S6a=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function ZEi(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}a(ZEi,"isSecure");function e_i(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}a(e_i,"httpParse");function t_i(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}a(t_i,"httpSerialize");function I6a(t){return t.secure=ZEi(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}a(I6a,"wsParse");function x6a(t){if((t.port===(ZEi(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}a(x6a,"wsSerialize");function w6a(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(S6a);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let o=`${n}:${e.nid||t.nid}`,s=F_r[o];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}a(w6a,"urnParse");function R6a(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),o=`${r}:${e.nid||n}`,s=F_r[o];s&&(t=s.serialize(t,e));let c=t,l=t.nss;return c.path=`${n||e.nid}:${l}`,e.skipEscape=!0,c}a(R6a,"urnSerialize");function P6a(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!T6a.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}a(P6a,"urnuuidParse");function k6a(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}a(k6a,"urnuuidSerialize");var r_i={scheme:"http",domainHost:!0,parse:e_i,serialize:t_i},D6a={scheme:"https",domainHost:r_i.domainHost,parse:e_i,serialize:t_i},K0t={scheme:"ws",domainHost:!0,parse:I6a,serialize:x6a},N6a={scheme:"wss",domainHost:K0t.domainHost,parse:K0t.parse,serialize:K0t.serialize},M6a={scheme:"urn",parse:w6a,serialize:R6a,skipNormalize:!0},O6a={scheme:"urn:uuid",parse:P6a,serialize:k6a,skipNormalize:!0},F_r={http:r_i,https:D6a,ws:K0t,wss:N6a,urn:M6a,"urn:uuid":O6a};n_i.exports=F_r});var s_i=T((rs0,X0t)=>{"use strict";f();var{normalizeIPv6:B6a,normalizeIPv4:L6a,removeDotSegments:DPe,recomposeAuthority:F6a,normalizeComponentEncoding:J0t}=XEi(),U_r=i_i();function U6a(t,e){return typeof t=="string"?t=sN(O3(t,e),e):typeof t=="object"&&(t=O3(sN(t,e),e)),t}a(U6a,"normalize");function Q6a(t,e,r){let n=Object.assign({scheme:"null"},r),o=o_i(O3(t,n),O3(e,n),n,!0);return sN(o,{...n,skipEscape:!0})}a(Q6a,"resolve");function o_i(t,e,r,n){let o={};return n||(t=O3(sN(t,r),r),e=O3(sN(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=DPe(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=DPe(e.path||""),o.query=e.query):(e.path?(e.path.charAt(0)==="/"?o.path=DPe(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=DPe(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}a(o_i,"resolveComponents");function q6a(t,e,r){return typeof t=="string"?(t=unescape(t),t=sN(J0t(O3(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=sN(J0t(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=sN(J0t(O3(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=sN(J0t(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}a(q6a,"equal");function sN(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),o=[],s=U_r[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&(o.push(r.scheme),o.push(":"));let c=F6a(r,n);if(c!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(c),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(l=DPe(l)),c===void 0&&(l=l.replace(/^\/\//u,"/%2F")),o.push(l)}return r.query!==void 0&&(o.push("?"),o.push(r.query)),r.fragment!==void 0&&(o.push("#"),o.push(r.fragment)),o.join("")}a(sN,"serialize");var G6a=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function H6a(t){let e=0;for(let r=0,n=t.length;r126||G6a[e])return!0;return!1}a(H6a,"nonSimpleDomain");var j6a=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function O3(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let c=t.match(j6a);if(c){if(n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]),n.host){let u=L6a(n.host);if(u.isIPV4===!1){let d=B6a(u.host,{isIPV4:!1});n.host=d.host.toLowerCase(),s=d.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=U_r[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&H6a(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!l||l&&!l.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}a(O3,"parse");var Q_r={SCHEMES:U_r,normalize:U6a,resolve:Q6a,resolveComponents:o_i,equal:q6a,serialize:sN,parse:O3};X0t.exports=Q_r;X0t.exports.default=Q_r;X0t.exports.fastUri=Q_r});var c_i=T(q_r=>{"use strict";f();Object.defineProperty(q_r,"__esModule",{value:!0});var a_i=s_i();a_i.code='require("ajv/dist/runtime/uri").default';q_r.default=a_i});var g_i=T(ig=>{"use strict";f();Object.defineProperty(ig,"__esModule",{value:!0});ig.CodeGen=ig.Name=ig.nil=ig.stringify=ig.str=ig._=ig.KeywordCxt=void 0;var $6a=PPe();Object.defineProperty(ig,"KeywordCxt",{enumerable:!0,get:a(function(){return $6a.KeywordCxt},"get")});var d0e=Oo();Object.defineProperty(ig,"_",{enumerable:!0,get:a(function(){return d0e._},"get")});Object.defineProperty(ig,"str",{enumerable:!0,get:a(function(){return d0e.str},"get")});Object.defineProperty(ig,"stringify",{enumerable:!0,get:a(function(){return d0e.stringify},"get")});Object.defineProperty(ig,"nil",{enumerable:!0,get:a(function(){return d0e.nil},"get")});Object.defineProperty(ig,"Name",{enumerable:!0,get:a(function(){return d0e.Name},"get")});Object.defineProperty(ig,"CodeGen",{enumerable:!0,get:a(function(){return d0e.CodeGen},"get")});var V6a=W0t(),p_i=kPe(),W6a=A_r(),NPe=Y0t(),z6a=Oo(),MPe=xPe(),Z0t=IPe(),H_r=sa(),l_i=GEi(),Y6a=c_i(),h_i=a((t,e)=>new RegExp(t,e),"defaultRegExp");h_i.code="new RegExp";var K6a=["removeAdditional","useDefaults","coerceTypes"],J6a=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),X6a={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Z6a={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},u_i=200;function eFa(t){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,w,R,P,k;let Q=t.strict,M=(e=t.code)===null||e===void 0?void 0:e.optimize,N=M===!0||M===void 0?1:M||0,G=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:h_i,O=(o=t.uriResolver)!==null&&o!==void 0?o:Y6a.default;return{strictSchema:(c=(s=t.strictSchema)!==null&&s!==void 0?s:Q)!==null&&c!==void 0?c:!0,strictNumbers:(u=(l=t.strictNumbers)!==null&&l!==void 0?l:Q)!==null&&u!==void 0?u:!0,strictTypes:(p=(d=t.strictTypes)!==null&&d!==void 0?d:Q)!==null&&p!==void 0?p:"log",strictTuples:(m=(h=t.strictTuples)!==null&&h!==void 0?h:Q)!==null&&m!==void 0?m:"log",strictRequired:(A=(g=t.strictRequired)!==null&&g!==void 0?g:Q)!==null&&A!==void 0?A:!1,code:t.code?{...t.code,optimize:N,regExp:G}:{optimize:N,regExp:G},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:u_i,loopEnum:(E=t.loopEnum)!==null&&E!==void 0?E:u_i,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(b=t.inlineRefs)!==null&&b!==void 0?b:!0,schemaId:(I=t.schemaId)!==null&&I!==void 0?I:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(R=t.validateFormats)!==null&&R!==void 0?R:!0,unicodeRegExp:(P=t.unicodeRegExp)!==null&&P!==void 0?P:!0,int32range:(k=t.int32range)!==null&&k!==void 0?k:!0,uriResolver:O}}a(eFa,"requiredOptions");var OPe=class{static{a(this,"Ajv")}constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...eFa(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new z6a.ValueScope({scope:{},prefixes:J6a,es5:r,lines:n}),this.logger=sFa(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,W6a.getRules)(),d_i.call(this,X6a,e,"NOT SUPPORTED"),d_i.call(this,Z6a,e,"DEPRECATED","warn"),this._metaOpts=iFa.call(this),e.formats&&rFa.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&nFa.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),tFa.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=l_i;n==="id"&&(o={...l_i},o.id=o.$id,delete o.$id),r&&e&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,r);async function o(p,h){await s.call(this,p.$schema);let m=this._addSchema(p,h);return m.validate||c.call(this,m)}async function s(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function c(p){try{return this._compileSchemaEnv(p)}catch(h){if(!(h instanceof p_i.default))throw h;return l.call(this,h),await u.call(this,h.missingSchema),c.call(this,p)}}function l({missingSchema:p,missingRef:h}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${h} cannot be resolved`)}async function u(p){let h=await d.call(this,p);this.refs[p]||await s.call(this,h.$schema),this.refs[p]||this.addSchema(h,p,r)}async function d(p){let h=this._loading[p];if(h)return h;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let c of e)this.addSchema(c,void 0,n,o);return this}let s;if(typeof e=="object"){let{schemaId:c}=this.opts;if(s=e[c],s!==void 0&&typeof s!="string")throw new Error(`schema ${c} must be string`)}return r=(0,MPe.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,o,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(e){let r;for(;typeof(r=f_i.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new NPe.SchemaEnv({schema:{},schemaId:n});if(r=NPe.resolveSchema.call(this,o,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=f_i.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,MPe.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(cFa.call(this,n,r),!r)return(0,H_r.eachItem)(n,s=>G_r.call(this,s)),this;uFa.call(this,r);let o={...r,type:(0,Z0t.getJSONTypes)(r.type),schemaType:(0,Z0t.getJSONTypes)(r.schemaType)};return(0,H_r.eachItem)(n,o.type.length===0?s=>G_r.call(this,s,o):s=>o.type.forEach(c=>G_r.call(this,s,o,c))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===e);o>=0&&n.rules.splice(o,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of r){let s=o.split("/").slice(1),c=e;for(let l of s)c=c[l];for(let l in n){let u=n[l];if(typeof u!="object")continue;let{$data:d}=u.definition,p=c[l];d&&p&&(c[l]=m_i(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let o=e[n];(!r||r.test(n))&&(typeof o=="string"?delete e[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[n]))}}_addSchema(e,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let c,{schemaId:l}=this.opts;if(typeof e=="object")c=e[l];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,MPe.normalizeId)(c||n);let d=MPe.getSchemaRefs.call(this,e,n);return u=new NPe.SchemaEnv({schema:e,schemaId:l,meta:r,baseId:n,localRefs:d}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):NPe.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{NPe.compileSchema.call(this,e)}finally{this.opts=r}}};OPe.ValidationError=V6a.default;OPe.MissingRefError=p_i.default;ig.default=OPe;function d_i(t,e,r,n="error"){for(let o in t){let s=o;s in e&&this.logger[n](`${r}: option ${o}. ${t[s]}`)}}a(d_i,"checkOptions");function f_i(t){return t=(0,MPe.normalizeId)(t),this.schemas[t]||this.refs[t]}a(f_i,"getSchEnv");function tFa(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}a(tFa,"addInitialSchemas");function rFa(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}a(rFa,"addInitialFormats");function nFa(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}a(nFa,"addInitialKeywords");function iFa(){let t={...this.opts};for(let e of K6a)delete t[e];return t}a(iFa,"getMetaSchemaOptions");var oFa={log(){},warn(){},error(){}};function sFa(t){if(t===!1)return oFa;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}a(sFa,"getLogger");var aFa=/^[a-z_$][a-z0-9_$:-]*$/i;function cFa(t,e){let{RULES:r}=this;if((0,H_r.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!aFa.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}a(cFa,"checkKeyword");function G_r(t,e,r){var n;let o=e?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,c=o?s.post:s.rules.find(({type:u})=>u===r);if(c||(c={type:r,rules:[]},s.rules.push(c)),s.keywords[t]=!0,!e)return;let l={keyword:t,definition:{...e,type:(0,Z0t.getJSONTypes)(e.type),schemaType:(0,Z0t.getJSONTypes)(e.schemaType)}};e.before?lFa.call(this,c,l,e.before):c.rules.push(l),s.all[t]=l,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}a(G_r,"addRule");function lFa(t,e,r){let n=t.rules.findIndex(o=>o.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}a(lFa,"addBeforeRule");function uFa(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=m_i(e)),t.validateSchema=this.compile(e,!0))}a(uFa,"keywordMetaschema");var dFa={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function m_i(t){return{anyOf:[t,dFa]}}a(m_i,"schemaOrData")});var A_i=T(j_r=>{"use strict";f();Object.defineProperty(j_r,"__esModule",{value:!0});var fFa={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};j_r.default=fFa});var C_i=T(BJ=>{"use strict";f();Object.defineProperty(BJ,"__esModule",{value:!0});BJ.callRef=BJ.getValidate=void 0;var pFa=kPe(),y_i=EI(),IC=Oo(),f0e=N3(),E_i=Y0t(),ept=sa(),hFa={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:o,schemaEnv:s,validateName:c,opts:l,self:u}=n,{root:d}=s;if((r==="#"||r==="#/")&&o===d.baseId)return h();let p=E_i.resolveRef.call(u,d,o,r);if(p===void 0)throw new pFa.default(n.opts.uriResolver,o,r);if(p instanceof E_i.SchemaEnv)return m(p);return g(p);function h(){if(s===d)return tpt(t,c,s,s.$async);let A=e.scopeValue("root",{ref:d});return tpt(t,(0,IC._)`${A}.validate`,d,d.$async)}function m(A){let y=__i(t,A);tpt(t,y,A,A.$async)}function g(A){let y=e.scopeValue("schema",l.code.source===!0?{ref:A,code:(0,IC.stringify)(A)}:{ref:A}),E=e.name("valid"),_=t.subschema({schema:A,dataTypes:[],schemaPath:IC.nil,topSchemaRef:y,errSchemaPath:r},E);t.mergeEvaluated(_),t.ok(E)}}};function __i(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,IC._)`${r.scopeValue("wrapper",{ref:e})}.validate`}a(__i,"getValidate");BJ.getValidate=__i;function tpt(t,e,r,n){let{gen:o,it:s}=t,{allErrors:c,schemaEnv:l,opts:u}=s,d=u.passContext?f0e.default.this:IC.nil;n?p():h();function p(){if(!l.$async)throw new Error("async schema referenced by sync schema");let A=o.let("valid");o.try(()=>{o.code((0,IC._)`await ${(0,y_i.callValidateCode)(t,e,d)}`),g(e),c||o.assign(A,!0)},y=>{o.if((0,IC._)`!(${y} instanceof ${s.ValidationError})`,()=>o.throw(y)),m(y),c||o.assign(A,!1)}),t.ok(A)}a(p,"callAsyncRef");function h(){t.result((0,y_i.callValidateCode)(t,e,d),()=>g(e),()=>m(e))}a(h,"callSyncRef");function m(A){let y=(0,IC._)`${A}.errors`;o.assign(f0e.default.vErrors,(0,IC._)`${f0e.default.vErrors} === null ? ${y} : ${f0e.default.vErrors}.concat(${y})`),o.assign(f0e.default.errors,(0,IC._)`${f0e.default.vErrors}.length`)}a(m,"addErrorsFrom");function g(A){var y;if(!s.opts.unevaluated)return;let E=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(E&&!E.dynamicProps)E.props!==void 0&&(s.props=ept.mergeEvaluated.props(o,E.props,s.props));else{let _=o.var("props",(0,IC._)`${A}.evaluated.props`);s.props=ept.mergeEvaluated.props(o,_,s.props,IC.Name)}if(s.items!==!0)if(E&&!E.dynamicItems)E.items!==void 0&&(s.items=ept.mergeEvaluated.items(o,E.items,s.items));else{let _=o.var("items",(0,IC._)`${A}.evaluated.items`);s.items=ept.mergeEvaluated.items(o,_,s.items,IC.Name)}}a(g,"addEvaluatedFrom")}a(tpt,"callRef");BJ.callRef=tpt;BJ.default=hFa});var v_i=T($_r=>{"use strict";f();Object.defineProperty($_r,"__esModule",{value:!0});var mFa=A_i(),gFa=C_i(),AFa=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",mFa.default,gFa.default];$_r.default=AFa});var b_i=T(V_r=>{"use strict";f();Object.defineProperty(V_r,"__esModule",{value:!0});var rpt=Oo(),eq=rpt.operators,npt={maximum:{okStr:"<=",ok:eq.LTE,fail:eq.GT},minimum:{okStr:">=",ok:eq.GTE,fail:eq.LT},exclusiveMaximum:{okStr:"<",ok:eq.LT,fail:eq.GTE},exclusiveMinimum:{okStr:">",ok:eq.GT,fail:eq.LTE}},yFa={message:a(({keyword:t,schemaCode:e})=>(0,rpt.str)`must be ${npt[t].okStr} ${e}`,"message"),params:a(({keyword:t,schemaCode:e})=>(0,rpt._)`{comparison: ${npt[t].okStr}, limit: ${e}}`,"params")},EFa={keyword:Object.keys(npt),type:"number",schemaType:"number",$data:!0,error:yFa,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,rpt._)`${r} ${npt[e].fail} ${n} || isNaN(${r})`)}};V_r.default=EFa});var T_i=T(W_r=>{"use strict";f();Object.defineProperty(W_r,"__esModule",{value:!0});var BPe=Oo(),_Fa={message:a(({schemaCode:t})=>(0,BPe.str)`must be multiple of ${t}`,"message"),params:a(({schemaCode:t})=>(0,BPe._)`{multipleOf: ${t}}`,"params")},CFa={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:_Fa,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,s=o.opts.multipleOfPrecision,c=e.let("res"),l=s?(0,BPe._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${s}`:(0,BPe._)`${c} !== parseInt(${c})`;t.fail$data((0,BPe._)`(${n} === 0 || (${c} = ${r}/${n}, ${l}))`)}};W_r.default=CFa});var I_i=T(z_r=>{"use strict";f();Object.defineProperty(z_r,"__esModule",{value:!0});function S_i(t){let e=t.length,r=0,n=0,o;for(;n=55296&&o<=56319&&n{"use strict";f();Object.defineProperty(Y_r,"__esModule",{value:!0});var LJ=Oo(),vFa=sa(),bFa=I_i(),TFa={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,LJ.str)`must NOT have ${r} than ${e} characters`},params:a(({schemaCode:t})=>(0,LJ._)`{limit: ${t}}`,"params")},SFa={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:TFa,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,s=e==="maxLength"?LJ.operators.GT:LJ.operators.LT,c=o.opts.unicode===!1?(0,LJ._)`${r}.length`:(0,LJ._)`${(0,vFa.useFunc)(t.gen,bFa.default)}(${r})`;t.fail$data((0,LJ._)`${c} ${s} ${n}`)}};Y_r.default=SFa});var w_i=T(K_r=>{"use strict";f();Object.defineProperty(K_r,"__esModule",{value:!0});var IFa=EI(),xFa=sa(),p0e=Oo(),wFa={message:a(({schemaCode:t})=>(0,p0e.str)`must match pattern "${t}"`,"message"),params:a(({schemaCode:t})=>(0,p0e._)`{pattern: ${t}}`,"params")},RFa={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:wFa,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:c}=t,l=c.opts.unicodeRegExp?"u":"";if(n){let{regExp:u}=c.opts.code,d=u.code==="new RegExp"?(0,p0e._)`new RegExp`:(0,xFa.useFunc)(e,u),p=e.let("valid");e.try(()=>e.assign(p,(0,p0e._)`${d}(${s}, ${l}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,p0e._)`!${p}`)}else{let u=(0,IFa.usePattern)(t,o);t.fail$data((0,p0e._)`!${u}.test(${r})`)}}};K_r.default=RFa});var R_i=T(J_r=>{"use strict";f();Object.defineProperty(J_r,"__esModule",{value:!0});var LPe=Oo(),PFa={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,LPe.str)`must NOT have ${r} than ${e} properties`},params:a(({schemaCode:t})=>(0,LPe._)`{limit: ${t}}`,"params")},kFa={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:PFa,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?LPe.operators.GT:LPe.operators.LT;t.fail$data((0,LPe._)`Object.keys(${r}).length ${o} ${n}`)}};J_r.default=kFa});var P_i=T(X_r=>{"use strict";f();Object.defineProperty(X_r,"__esModule",{value:!0});var FPe=EI(),UPe=Oo(),DFa=sa(),NFa={message:a(({params:{missingProperty:t}})=>(0,UPe.str)`must have required property '${t}'`,"message"),params:a(({params:{missingProperty:t}})=>(0,UPe._)`{missingProperty: ${t}}`,"params")},MFa={keyword:"required",type:"object",schemaType:"array",$data:!0,error:NFa,code(t){let{gen:e,schema:r,schemaCode:n,data:o,$data:s,it:c}=t,{opts:l}=c;if(!s&&r.length===0)return;let u=r.length>=l.loopRequired;if(c.allErrors?d():p(),l.strictRequired){let g=t.parentSchema.properties,{definedProperties:A}=t.it;for(let y of r)if(g?.[y]===void 0&&!A.has(y)){let E=c.schemaEnv.baseId+c.errSchemaPath,_=`required property "${y}" is not defined at "${E}" (strictRequired)`;(0,DFa.checkStrictMode)(c,_,c.opts.strictRequired)}}function d(){if(u||s)t.block$data(UPe.nil,h);else for(let g of r)(0,FPe.checkReportMissingProp)(t,g)}a(d,"allErrorsMode");function p(){let g=e.let("missing");if(u||s){let A=e.let("valid",!0);t.block$data(A,()=>m(g,A)),t.ok(A)}else e.if((0,FPe.checkMissingProp)(t,r,g)),(0,FPe.reportMissingProp)(t,g),e.else()}a(p,"exitOnErrorMode");function h(){e.forOf("prop",n,g=>{t.setParams({missingProperty:g}),e.if((0,FPe.noPropertyInData)(e,o,g,l.ownProperties),()=>t.error())})}a(h,"loopAllRequired");function m(g,A){t.setParams({missingProperty:g}),e.forOf(g,n,()=>{e.assign(A,(0,FPe.propertyInData)(e,o,g,l.ownProperties)),e.if((0,UPe.not)(A),()=>{t.error(),e.break()})},UPe.nil)}a(m,"loopUntilMissing")}};X_r.default=MFa});var k_i=T(Z_r=>{"use strict";f();Object.defineProperty(Z_r,"__esModule",{value:!0});var QPe=Oo(),OFa={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,QPe.str)`must NOT have ${r} than ${e} items`},params:a(({schemaCode:t})=>(0,QPe._)`{limit: ${t}}`,"params")},BFa={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:OFa,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?QPe.operators.GT:QPe.operators.LT;t.fail$data((0,QPe._)`${r}.length ${o} ${n}`)}};Z_r.default=BFa});var ipt=T(eCr=>{"use strict";f();Object.defineProperty(eCr,"__esModule",{value:!0});var D_i=S_r();D_i.code='require("ajv/dist/runtime/equal").default';eCr.default=D_i});var N_i=T(rCr=>{"use strict";f();Object.defineProperty(rCr,"__esModule",{value:!0});var tCr=IPe(),og=Oo(),LFa=sa(),FFa=ipt(),UFa={message:a(({params:{i:t,j:e}})=>(0,og.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,"message"),params:a(({params:{i:t,j:e}})=>(0,og._)`{i: ${t}, j: ${e}}`,"params")},QFa={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:UFa,code(t){let{gen:e,data:r,$data:n,schema:o,parentSchema:s,schemaCode:c,it:l}=t;if(!n&&!o)return;let u=e.let("valid"),d=s.items?(0,tCr.getSchemaTypes)(s.items):[];t.block$data(u,p,(0,og._)`${c} === false`),t.ok(u);function p(){let A=e.let("i",(0,og._)`${r}.length`),y=e.let("j");t.setParams({i:A,j:y}),e.assign(u,!0),e.if((0,og._)`${A} > 1`,()=>(h()?m:g)(A,y))}a(p,"validateUniqueItems");function h(){return d.length>0&&!d.some(A=>A==="object"||A==="array")}a(h,"canOptimize");function m(A,y){let E=e.name("item"),_=(0,tCr.checkDataTypes)(d,E,l.opts.strictNumbers,tCr.DataType.Wrong),v=e.const("indices",(0,og._)`{}`);e.for((0,og._)`;${A}--;`,()=>{e.let(E,(0,og._)`${r}[${A}]`),e.if(_,(0,og._)`continue`),d.length>1&&e.if((0,og._)`typeof ${E} == "string"`,(0,og._)`${E} += "_"`),e.if((0,og._)`typeof ${v}[${E}] == "number"`,()=>{e.assign(y,(0,og._)`${v}[${E}]`),t.error(),e.assign(u,!1).break()}).code((0,og._)`${v}[${E}] = ${A}`)})}a(m,"loopN");function g(A,y){let E=(0,LFa.useFunc)(e,FFa.default),_=e.name("outer");e.label(_).for((0,og._)`;${A}--;`,()=>e.for((0,og._)`${y} = ${A}; ${y}--;`,()=>e.if((0,og._)`${E}(${r}[${A}], ${r}[${y}])`,()=>{t.error(),e.assign(u,!1).break(_)})))}a(g,"loopN2")}};rCr.default=QFa});var M_i=T(iCr=>{"use strict";f();Object.defineProperty(iCr,"__esModule",{value:!0});var nCr=Oo(),qFa=sa(),GFa=ipt(),HFa={message:"must be equal to constant",params:a(({schemaCode:t})=>(0,nCr._)`{allowedValue: ${t}}`,"params")},jFa={keyword:"const",$data:!0,error:HFa,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,nCr._)`!${(0,qFa.useFunc)(e,GFa.default)}(${r}, ${o})`):t.fail((0,nCr._)`${s} !== ${r}`)}};iCr.default=jFa});var O_i=T(oCr=>{"use strict";f();Object.defineProperty(oCr,"__esModule",{value:!0});var qPe=Oo(),$Fa=sa(),VFa=ipt(),WFa={message:"must be equal to one of the allowed values",params:a(({schemaCode:t})=>(0,qPe._)`{allowedValues: ${t}}`,"params")},zFa={keyword:"enum",schemaType:"array",$data:!0,error:WFa,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:c}=t;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let l=o.length>=c.opts.loopEnum,u,d=a(()=>u??(u=(0,$Fa.useFunc)(e,VFa.default)),"getEql"),p;if(l||n)p=e.let("valid"),t.block$data(p,h);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let g=e.const("vSchema",s);p=(0,qPe.or)(...o.map((A,y)=>m(g,y)))}t.pass(p);function h(){e.assign(p,!1),e.forOf("v",s,g=>e.if((0,qPe._)`${d()}(${r}, ${g})`,()=>e.assign(p,!0).break()))}a(h,"loopEnum");function m(g,A){let y=o[A];return typeof y=="object"&&y!==null?(0,qPe._)`${d()}(${r}, ${g}[${A}])`:(0,qPe._)`${r} === ${y}`}a(m,"equalCode")}};oCr.default=zFa});var B_i=T(sCr=>{"use strict";f();Object.defineProperty(sCr,"__esModule",{value:!0});var YFa=b_i(),KFa=T_i(),JFa=x_i(),XFa=w_i(),ZFa=R_i(),e9a=P_i(),t9a=k_i(),r9a=N_i(),n9a=M_i(),i9a=O_i(),o9a=[YFa.default,KFa.default,JFa.default,XFa.default,ZFa.default,e9a.default,t9a.default,r9a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},n9a.default,i9a.default];sCr.default=o9a});var cCr=T(GPe=>{"use strict";f();Object.defineProperty(GPe,"__esModule",{value:!0});GPe.validateAdditionalItems=void 0;var FJ=Oo(),aCr=sa(),s9a={message:a(({params:{len:t}})=>(0,FJ.str)`must NOT have more than ${t} items`,"message"),params:a(({params:{len:t}})=>(0,FJ._)`{limit: ${t}}`,"params")},a9a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:s9a,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,aCr.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}L_i(t,n)}};function L_i(t,e){let{gen:r,schema:n,data:o,keyword:s,it:c}=t;c.items=!0;let l=r.const("len",(0,FJ._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,FJ._)`${l} <= ${e.length}`);else if(typeof n=="object"&&!(0,aCr.alwaysValidSchema)(c,n)){let d=r.var("valid",(0,FJ._)`${l} <= ${e.length}`);r.if((0,FJ.not)(d),()=>u(d)),t.ok(d)}function u(d){r.forRange("i",e.length,l,p=>{t.subschema({keyword:s,dataProp:p,dataPropType:aCr.Type.Num},d),c.allErrors||r.if((0,FJ.not)(d),()=>r.break())})}a(u,"validateItems")}a(L_i,"validateAdditionalItems");GPe.validateAdditionalItems=L_i;GPe.default=a9a});var lCr=T(HPe=>{"use strict";f();Object.defineProperty(HPe,"__esModule",{value:!0});HPe.validateTuple=void 0;var F_i=Oo(),opt=sa(),c9a=EI(),l9a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return U_i(t,"additionalItems",e);r.items=!0,!(0,opt.alwaysValidSchema)(r,e)&&t.ok((0,c9a.validateArray)(t))}};function U_i(t,e,r=t.schema){let{gen:n,parentSchema:o,data:s,keyword:c,it:l}=t;p(o),l.opts.unevaluated&&r.length&&l.items!==!0&&(l.items=opt.mergeEvaluated.items(n,r.length,l.items));let u=n.name("valid"),d=n.const("len",(0,F_i._)`${s}.length`);r.forEach((h,m)=>{(0,opt.alwaysValidSchema)(l,h)||(n.if((0,F_i._)`${d} > ${m}`,()=>t.subschema({keyword:c,schemaProp:m,dataProp:m},u)),t.ok(u))});function p(h){let{opts:m,errSchemaPath:g}=l,A=r.length,y=A===h.minItems&&(A===h.maxItems||h[e]===!1);if(m.strictTuples&&!y){let E=`"${c}" is ${A}-tuple, but minItems or maxItems/${e} are not specified or different at path "${g}"`;(0,opt.checkStrictMode)(l,E,m.strictTuples)}}a(p,"checkStrictTuple")}a(U_i,"validateTuple");HPe.validateTuple=U_i;HPe.default=l9a});var Q_i=T(uCr=>{"use strict";f();Object.defineProperty(uCr,"__esModule",{value:!0});var u9a=lCr(),d9a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:a(t=>(0,u9a.validateTuple)(t,"items"),"code")};uCr.default=d9a});var G_i=T(dCr=>{"use strict";f();Object.defineProperty(dCr,"__esModule",{value:!0});var q_i=Oo(),f9a=sa(),p9a=EI(),h9a=cCr(),m9a={message:a(({params:{len:t}})=>(0,q_i.str)`must NOT have more than ${t} items`,"message"),params:a(({params:{len:t}})=>(0,q_i._)`{limit: ${t}}`,"params")},g9a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:m9a,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,f9a.alwaysValidSchema)(n,e)&&(o?(0,h9a.validateAdditionalItems)(t,o):t.ok((0,p9a.validateArray)(t)))}};dCr.default=g9a});var H_i=T(fCr=>{"use strict";f();Object.defineProperty(fCr,"__esModule",{value:!0});var CI=Oo(),spt=sa(),A9a={message:a(({params:{min:t,max:e}})=>e===void 0?(0,CI.str)`must contain at least ${t} valid item(s)`:(0,CI.str)`must contain at least ${t} and no more than ${e} valid item(s)`,"message"),params:a(({params:{min:t,max:e}})=>e===void 0?(0,CI._)`{minContains: ${t}}`:(0,CI._)`{minContains: ${t}, maxContains: ${e}}`,"params")},y9a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:A9a,code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t,c,l,{minContains:u,maxContains:d}=n;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let p=e.const("len",(0,CI._)`${o}.length`);if(t.setParams({min:c,max:l}),l===void 0&&c===0){(0,spt.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(l!==void 0&&c>l){(0,spt.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,spt.alwaysValidSchema)(s,r)){let y=(0,CI._)`${p} >= ${c}`;l!==void 0&&(y=(0,CI._)`${y} && ${p} <= ${l}`),t.pass(y);return}s.items=!0;let h=e.name("valid");l===void 0&&c===1?g(h,()=>e.if(h,()=>e.break())):c===0?(e.let(h,!0),l!==void 0&&e.if((0,CI._)`${o}.length > 0`,m)):(e.let(h,!1),m()),t.result(h,()=>t.reset());function m(){let y=e.name("_valid"),E=e.let("count",0);g(y,()=>e.if(y,()=>A(E)))}a(m,"validateItemsWithCount");function g(y,E){e.forRange("i",0,p,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:spt.Type.Num,compositeRule:!0},y),E()})}a(g,"validateItems");function A(y){e.code((0,CI._)`${y}++`),l===void 0?e.if((0,CI._)`${y} >= ${c}`,()=>e.assign(h,!0).break()):(e.if((0,CI._)`${y} > ${l}`,()=>e.assign(h,!1).break()),c===1?e.assign(h,!0):e.if((0,CI._)`${y} >= ${c}`,()=>e.assign(h,!0)))}a(A,"checkLimits")}};fCr.default=y9a});var V_i=T(aN=>{"use strict";f();Object.defineProperty(aN,"__esModule",{value:!0});aN.validateSchemaDeps=aN.validatePropertyDeps=aN.error=void 0;var pCr=Oo(),E9a=sa(),jPe=EI();aN.error={message:a(({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,pCr.str)`must have ${n} ${r} when property ${t} is present`},"message"),params:a(({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,pCr._)`{property: ${t}, missingProperty: ${n}, depsCount: ${e}, - deps: ${r}}`,"params")};var A6a={keyword:"dependencies",type:"object",schemaType:"object",error:E5.error,code(t){let[e,r]=y6a(t);jEi(t,e),$Ei(t,r)}};function y6a({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let o=Array.isArray(t[n])?e:r;o[n]=t[n]}return[e,r]}a(y6a,"splitDependencies");function jEi(t,e=t.schema){let{gen:r,data:n,it:o}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let c in e){let l=e[c];if(l.length===0)continue;let u=(0,Wke.propertyInData)(r,n,c,o.opts.ownProperties);t.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),o.allErrors?r.if(u,()=>{for(let d of l)(0,Wke.checkReportMissingProp)(t,d)}):(r.if((0,zCr._)`${u} && (${(0,Wke.checkMissingProp)(t,l,s)})`),(0,Wke.reportMissingProp)(t,s),r.else())}}a(jEi,"validatePropertyDeps");E5.validatePropertyDeps=jEi;function $Ei(t,e=t.schema){let{gen:r,data:n,keyword:o,it:s}=t,c=r.name("valid");for(let l in e)(0,g6a.alwaysValidSchema)(s,e[l])||(r.if((0,Wke.propertyInData)(r,n,l,s.opts.ownProperties),()=>{let u=t.subschema({keyword:o,schemaProp:l},c);t.mergeValidEvaluated(u,c)},()=>r.var(c,!0)),t.ok(c))}a($Ei,"validateSchemaDeps");E5.validateSchemaDeps=$Ei;E5.default=A6a});var zEi=T(YCr=>{"use strict";f();Object.defineProperty(YCr,"__esModule",{value:!0});var WEi=Uo(),E6a=fa(),C6a={message:"property name must be valid",params:a(({params:t})=>(0,WEi._)`{propertyName: ${t.propertyName}}`,"params")},_6a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:C6a,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,E6a.alwaysValidSchema)(o,r))return;let s=e.name("valid");e.forIn("key",n,c=>{t.setParams({propertyName:c}),t.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},s),e.if((0,WEi.not)(s),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(s)}};YCr.default=_6a});var JCr=T(KCr=>{"use strict";f();Object.defineProperty(KCr,"__esModule",{value:!0});var Zpt=kI(),k2=Uo(),v6a=J3(),eht=fa(),b6a={message:"must NOT have additional properties",params:a(({params:t})=>(0,k2._)`{additionalProperty: ${t.additionalProperty}}`,"params")},T6a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:b6a,code(t){let{gen:e,schema:r,parentSchema:n,data:o,errsCount:s,it:c}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:l,opts:u}=c;if(c.props=!0,u.removeAdditional!=="all"&&(0,eht.alwaysValidSchema)(c,r))return;let d=(0,Zpt.allSchemaProperties)(n.properties),p=(0,Zpt.allSchemaProperties)(n.patternProperties);h(),t.ok((0,k2._)`${s} === ${v6a.default.errors}`);function h(){e.forIn("key",o,E=>{!d.length&&!p.length?A(E):e.if(m(E),()=>A(E))})}a(h,"checkAdditionalProperties");function m(E){let _;if(d.length>8){let v=(0,eht.schemaRefOrVal)(c,n.properties,"properties");_=(0,Zpt.isOwnProperty)(e,v,E)}else d.length?_=(0,k2.or)(...d.map(v=>(0,k2._)`${E} === ${v}`)):_=k2.nil;return p.length&&(_=(0,k2.or)(_,...p.map(v=>(0,k2._)`${(0,Zpt.usePattern)(t,v)}.test(${E})`))),(0,k2.not)(_)}a(m,"isAdditional");function g(E){e.code((0,k2._)`delete ${o}[${E}]`)}a(g,"deleteAdditional");function A(E){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){g(E);return}if(r===!1){t.setParams({additionalProperty:E}),t.error(),l||e.break();return}if(typeof r=="object"&&!(0,eht.alwaysValidSchema)(c,r)){let _=e.name("valid");u.removeAdditional==="failing"?(y(E,_,!1),e.if((0,k2.not)(_),()=>{t.reset(),g(E)})):(y(E,_),l||e.if((0,k2.not)(_),()=>e.break()))}}a(A,"additionalPropertyCode");function y(E,_,v){let b={keyword:"additionalProperties",dataProp:E,dataPropType:eht.Type.Str};v===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(b,_)}a(y,"applyAdditionalSchema")}};KCr.default=T6a});var JEi=T(ZCr=>{"use strict";f();Object.defineProperty(ZCr,"__esModule",{value:!0});var S6a=Dke(),YEi=kI(),XCr=fa(),KEi=JCr(),I6a={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&KEi.default.code(new S6a.KeywordCxt(s,KEi.default,"additionalProperties"));let c=(0,YEi.allSchemaProperties)(r);for(let h of c)s.definedProperties.add(h);s.opts.unevaluated&&c.length&&s.props!==!0&&(s.props=XCr.mergeEvaluated.props(e,(0,XCr.toHash)(c),s.props));let l=c.filter(h=>!(0,XCr.alwaysValidSchema)(s,r[h]));if(l.length===0)return;let u=e.name("valid");for(let h of l)d(h)?p(h):(e.if((0,YEi.propertyInData)(e,o,h,s.opts.ownProperties)),p(h),s.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(u);function d(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}a(d,"hasDefault");function p(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},u)}a(p,"applyPropertySchema")}};ZCr.default=I6a});var tCi=T(e_r=>{"use strict";f();Object.defineProperty(e_r,"__esModule",{value:!0});var XEi=kI(),tht=Uo(),ZEi=fa(),eCi=fa(),x6a={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:o,it:s}=t,{opts:c}=s,l=(0,XEi.allSchemaProperties)(r),u=l.filter(y=>(0,ZEi.alwaysValidSchema)(s,r[y]));if(l.length===0||u.length===l.length&&(!s.opts.unevaluated||s.props===!0))return;let d=c.strictSchema&&!c.allowMatchingProperties&&o.properties,p=e.name("valid");s.props!==!0&&!(s.props instanceof tht.Name)&&(s.props=(0,eCi.evaluatedPropsToName)(e,s.props));let{props:h}=s;m();function m(){for(let y of l)d&&g(y),s.allErrors?A(y):(e.var(p,!0),A(y),e.if(p))}a(m,"validatePatternProperties");function g(y){for(let E in d)new RegExp(y).test(E)&&(0,ZEi.checkStrictMode)(s,`property ${E} matches pattern ${y} (use allowMatchingProperties)`)}a(g,"checkMatchingProperties");function A(y){e.forIn("key",n,E=>{e.if((0,tht._)`${(0,XEi.usePattern)(t,y)}.test(${E})`,()=>{let _=u.includes(y);_||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:E,dataPropType:eCi.Type.Str},p),s.opts.unevaluated&&h!==!0?e.assign((0,tht._)`${h}[${E}]`,!0):!_&&!s.allErrors&&e.if((0,tht.not)(p),()=>e.break())})})}a(A,"validateProperties")}};e_r.default=x6a});var rCi=T(t_r=>{"use strict";f();Object.defineProperty(t_r,"__esModule",{value:!0});var w6a=fa(),R6a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,w6a.alwaysValidSchema)(n,r)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};t_r.default=R6a});var nCi=T(r_r=>{"use strict";f();Object.defineProperty(r_r,"__esModule",{value:!0});var P6a=kI(),k6a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:P6a.validateUnion,error:{message:"must match a schema in anyOf"}};r_r.default=k6a});var iCi=T(n_r=>{"use strict";f();Object.defineProperty(n_r,"__esModule",{value:!0});var rht=Uo(),N6a=fa(),D6a={message:"must match exactly one schema in oneOf",params:a(({params:t})=>(0,rht._)`{passingSchemas: ${t.passing}}`,"params")},M6a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:D6a,code(t){let{gen:e,schema:r,parentSchema:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,c=e.let("valid",!1),l=e.let("passing",null),u=e.name("_valid");t.setParams({passing:l}),e.block(d),t.result(c,()=>t.reset(),()=>t.error(!0));function d(){s.forEach((p,h)=>{let m;(0,N6a.alwaysValidSchema)(o,p)?e.var(u,!0):m=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},u),h>0&&e.if((0,rht._)`${u} && ${c}`).assign(c,!1).assign(l,(0,rht._)`[${l}, ${h}]`).else(),e.if(u,()=>{e.assign(c,!0),e.assign(l,h),m&&t.mergeEvaluated(m,rht.Name)})})}a(d,"validateOneOf")}};n_r.default=M6a});var oCi=T(i_r=>{"use strict";f();Object.defineProperty(i_r,"__esModule",{value:!0});var O6a=fa(),B6a={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=e.name("valid");r.forEach((s,c)=>{if((0,O6a.alwaysValidSchema)(n,s))return;let l=t.subschema({keyword:"allOf",schemaProp:c},o);t.ok(o),t.mergeEvaluated(l)})}};i_r.default=B6a});var cCi=T(o_r=>{"use strict";f();Object.defineProperty(o_r,"__esModule",{value:!0});var nht=Uo(),aCi=fa(),L6a={message:a(({params:t})=>(0,nht.str)`must match "${t.ifClause}" schema`,"message"),params:a(({params:t})=>(0,nht._)`{failingKeyword: ${t.ifClause}}`,"params")},F6a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:L6a,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,aCi.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=sCi(n,"then"),s=sCi(n,"else");if(!o&&!s)return;let c=e.let("valid",!0),l=e.name("_valid");if(u(),t.reset(),o&&s){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(l,d("then",p),d("else",p))}else o?e.if(l,d("then")):e.if((0,nht.not)(l),d("else"));t.pass(c,()=>t.error(!0));function u(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);t.mergeEvaluated(p)}a(u,"validateIf");function d(p,h){return()=>{let m=t.subschema({keyword:p},l);e.assign(c,l),t.mergeValidEvaluated(m,c),h?e.assign(h,(0,nht._)`${p}`):t.setParams({ifClause:p})}}a(d,"validateClause")}};function sCi(t,e){let r=t.schema[e];return r!==void 0&&!(0,aCi.alwaysValidSchema)(t,r)}a(sCi,"hasSchema");o_r.default=F6a});var lCi=T(s_r=>{"use strict";f();Object.defineProperty(s_r,"__esModule",{value:!0});var U6a=fa(),Q6a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,U6a.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};s_r.default=Q6a});var uCi=T(a_r=>{"use strict";f();Object.defineProperty(a_r,"__esModule",{value:!0});var q6a=HCr(),G6a=QEi(),H6a=jCr(),j6a=GEi(),$6a=HEi(),V6a=VEi(),W6a=zEi(),z6a=JCr(),Y6a=JEi(),K6a=tCi(),J6a=rCi(),X6a=nCi(),Z6a=iCi(),eFa=oCi(),tFa=cCi(),rFa=lCi();function nFa(t=!1){let e=[J6a.default,X6a.default,Z6a.default,eFa.default,tFa.default,rFa.default,W6a.default,z6a.default,V6a.default,Y6a.default,K6a.default];return t?e.push(G6a.default,j6a.default):e.push(q6a.default,H6a.default),e.push($6a.default),e}a(nFa,"getApplicator");a_r.default=nFa});var dCi=T(c_r=>{"use strict";f();Object.defineProperty(c_r,"__esModule",{value:!0});var Hf=Uo(),iFa={message:a(({schemaCode:t})=>(0,Hf.str)`must match format "${t}"`,"message"),params:a(({schemaCode:t})=>(0,Hf._)`{format: ${t}}`,"params")},oFa={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:iFa,code(t,e){let{gen:r,data:n,$data:o,schema:s,schemaCode:c,it:l}=t,{opts:u,errSchemaPath:d,schemaEnv:p,self:h}=l;if(!u.validateFormats)return;o?m():g();function m(){let A=r.scopeValue("formats",{ref:h.formats,code:u.code.formats}),y=r.const("fDef",(0,Hf._)`${A}[${c}]`),E=r.let("fType"),_=r.let("format");r.if((0,Hf._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(E,(0,Hf._)`${y}.type || "string"`).assign(_,(0,Hf._)`${y}.validate`),()=>r.assign(E,(0,Hf._)`"string"`).assign(_,y)),t.fail$data((0,Hf.or)(v(),b()));function v(){return u.strictSchema===!1?Hf.nil:(0,Hf._)`${c} && !${_}`}a(v,"unknownFmt");function b(){let I=p.$async?(0,Hf._)`(${y}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,Hf._)`${_}(${n})`,x=(0,Hf._)`(typeof ${_} == "function" ? ${I} : ${_}.test(${n}))`;return(0,Hf._)`${_} && ${_} !== true && ${E} === ${e} && !${x}`}a(b,"invalidFmt")}a(m,"validate$DataFormat");function g(){let A=h.formats[s];if(!A){v();return}if(A===!0)return;let[y,E,_]=b(A);y===e&&t.pass(I());function v(){if(u.strictSchema===!1){h.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${s}" ignored in schema at path "${d}"`}}a(v,"unknownFormat");function b(x){let R=x instanceof RegExp?(0,Hf.regexpCode)(x):u.code.formats?(0,Hf._)`${u.code.formats}${(0,Hf.getProperty)(s)}`:void 0,w=r.scopeValue("formats",{key:s,ref:x,code:R});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Hf._)`${w}.validate`]:["string",x,w]}a(b,"getFormat");function I(){if(typeof A=="object"&&!(A instanceof RegExp)&&A.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Hf._)`await ${_}(${n})`}return typeof E=="function"?(0,Hf._)`${_}(${n})`:(0,Hf._)`${_}.test(${n})`}a(I,"validCondition")}a(g,"validateFormat")}};c_r.default=oFa});var fCi=T(l_r=>{"use strict";f();Object.defineProperty(l_r,"__esModule",{value:!0});var sFa=dCi(),aFa=[sFa.default];l_r.default=aFa});var pCi=T(epe=>{"use strict";f();Object.defineProperty(epe,"__esModule",{value:!0});epe.contentVocabulary=epe.metadataVocabulary=void 0;epe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];epe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var mCi=T(u_r=>{"use strict";f();Object.defineProperty(u_r,"__esModule",{value:!0});var cFa=vEi(),lFa=BEi(),uFa=uCi(),dFa=fCi(),hCi=pCi(),fFa=[cFa.default,lFa.default,(0,uFa.default)(),dFa.default,hCi.metadataVocabulary,hCi.contentVocabulary];u_r.default=fFa});var ACi=T(iht=>{"use strict";f();Object.defineProperty(iht,"__esModule",{value:!0});iht.DiscrError=void 0;var gCi;(function(t){t.Tag="tag",t.Mapping="mapping"})(gCi||(iht.DiscrError=gCi={}))});var ECi=T(f_r=>{"use strict";f();Object.defineProperty(f_r,"__esModule",{value:!0});var tpe=Uo(),d_r=ACi(),yCi=qpt(),pFa=Mke(),hFa=fa(),mFa={message:a(({params:{discrError:t,tagName:e}})=>t===d_r.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,"message"),params:a(({params:{discrError:t,tag:e,tagName:r}})=>(0,tpe._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`,"params")},gFa={keyword:"discriminator",type:"object",schemaType:"object",error:mFa,code(t){let{gen:e,data:r,schema:n,parentSchema:o,it:s}=t,{oneOf:c}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!c)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),d=e.const("tag",(0,tpe._)`${r}${(0,tpe.getProperty)(l)}`);e.if((0,tpe._)`typeof ${d} == "string"`,()=>p(),()=>t.error(!1,{discrError:d_r.DiscrError.Tag,tag:d,tagName:l})),t.ok(u);function p(){let g=m();e.if(!1);for(let A in g)e.elseIf((0,tpe._)`${d} === ${A}`),e.assign(u,h(g[A]));e.else(),t.error(!1,{discrError:d_r.DiscrError.Mapping,tag:d,tagName:l}),e.endIf()}a(p,"validateMapping");function h(g){let A=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:g},A);return t.mergeEvaluated(y,tpe.Name),A}a(h,"applyTagSchema");function m(){var g;let A={},y=_(o),E=!0;for(let I=0;I{AFa.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var h_r=T((hu,p_r)=>{"use strict";f();Object.defineProperty(hu,"__esModule",{value:!0});hu.MissingRefError=hu.ValidationError=hu.CodeGen=hu.Name=hu.nil=hu.stringify=hu.str=hu._=hu.KeywordCxt=hu.Ajv=void 0;var yFa=gEi(),EFa=mCi(),CFa=ECi(),_Ci=CCi(),_Fa=["/properties"],oht="http://json-schema.org/draft-07/schema",rpe=class extends yFa.default{static{a(this,"Ajv")}_addVocabularies(){super._addVocabularies(),EFa.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(CFa.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(_Ci,_Fa):_Ci;this.addMetaSchema(e,oht,!1),this.refs["http://json-schema.org/schema"]=oht}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oht)?oht:void 0)}};hu.Ajv=rpe;p_r.exports=hu=rpe;p_r.exports.Ajv=rpe;Object.defineProperty(hu,"__esModule",{value:!0});hu.default=rpe;var vFa=Dke();Object.defineProperty(hu,"KeywordCxt",{enumerable:!0,get:a(function(){return vFa.KeywordCxt},"get")});var npe=Uo();Object.defineProperty(hu,"_",{enumerable:!0,get:a(function(){return npe._},"get")});Object.defineProperty(hu,"str",{enumerable:!0,get:a(function(){return npe.str},"get")});Object.defineProperty(hu,"stringify",{enumerable:!0,get:a(function(){return npe.stringify},"get")});Object.defineProperty(hu,"nil",{enumerable:!0,get:a(function(){return npe.nil},"get")});Object.defineProperty(hu,"Name",{enumerable:!0,get:a(function(){return npe.Name},"get")});Object.defineProperty(hu,"CodeGen",{enumerable:!0,get:a(function(){return npe.CodeGen},"get")});var bFa=Upt();Object.defineProperty(hu,"ValidationError",{enumerable:!0,get:a(function(){return bFa.default},"get")});var TFa=Mke();Object.defineProperty(hu,"MissingRefError",{enumerable:!0,get:a(function(){return TFa.default},"get")})});var RCi=T(_5=>{"use strict";f();Object.defineProperty(_5,"__esModule",{value:!0});_5.formatNames=_5.fastFormats=_5.fullFormats=void 0;function C5(t,e){return{validate:t,compare:e}}a(C5,"fmtDef");_5.fullFormats={date:C5(SCi,y_r),time:C5(g_r(!0),E_r),"date-time":C5(vCi(!0),xCi),"iso-time":C5(g_r(),ICi),"iso-date-time":C5(vCi(),wCi),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:PFa,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:LFa,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kFa,int32:{type:"number",validate:MFa},int64:{type:"number",validate:OFa},float:{type:"number",validate:TCi},double:{type:"number",validate:TCi},password:!0,binary:!0};_5.fastFormats={..._5.fullFormats,date:C5(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,y_r),time:C5(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E_r),"date-time":C5(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,xCi),"iso-time":C5(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ICi),"iso-date-time":C5(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,wCi),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};_5.formatNames=Object.keys(_5.fullFormats);function SFa(t){return t%4===0&&(t%100!==0||t%400===0)}a(SFa,"isLeapYear");var IFa=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xFa=[0,31,28,31,30,31,30,31,31,30,31,30,31];function SCi(t){let e=IFa.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],o=+e[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&SFa(r)?29:xFa[n])}a(SCi,"date");function y_r(t,e){if(t&&e)return t>e?1:t23||p>59||t&&!l)return!1;if(o<=23&&s<=59&&c<60)return!0;let h=s-p*u,m=o-d*u-(h<0?1:0);return(m===23||m===-1)&&(h===59||h===-1)&&c<61},"time")}a(g_r,"getTime");function E_r(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}a(E_r,"compareTime");function ICi(t,e){if(!(t&&e))return;let r=m_r.exec(t),n=m_r.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t=NFa}a(MFa,"validateInt32");function OFa(t){return Number.isInteger(t)}a(OFa,"validateInt64");function TCi(){return!0}a(TCi,"validateNumber");var BFa=/[^\\]\\Z/;function LFa(t){if(BFa.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}a(LFa,"regex")});var PCi=T(ipe=>{"use strict";f();Object.defineProperty(ipe,"__esModule",{value:!0});ipe.formatLimitDefinition=void 0;var FFa=h_r(),N2=Uo(),wq=N2.operators,sht={formatMaximum:{okStr:"<=",ok:wq.LTE,fail:wq.GT},formatMinimum:{okStr:">=",ok:wq.GTE,fail:wq.LT},formatExclusiveMaximum:{okStr:"<",ok:wq.LT,fail:wq.GTE},formatExclusiveMinimum:{okStr:">",ok:wq.GT,fail:wq.LTE}},UFa={message:a(({keyword:t,schemaCode:e})=>(0,N2.str)`should be ${sht[t].okStr} ${e}`,"message"),params:a(({keyword:t,schemaCode:e})=>(0,N2._)`{comparison: ${sht[t].okStr}, limit: ${e}}`,"params")};ipe.formatLimitDefinition={keyword:Object.keys(sht),type:"string",schemaType:"string",$data:!0,error:UFa,code(t){let{gen:e,data:r,schemaCode:n,keyword:o,it:s}=t,{opts:c,self:l}=s;if(!c.validateFormats)return;let u=new FFa.KeywordCxt(s,l.RULES.all.format.definition,"format");u.$data?d():p();function d(){let m=e.scopeValue("formats",{ref:l.formats,code:c.code.formats}),g=e.const("fmt",(0,N2._)`${m}[${u.schemaCode}]`);t.fail$data((0,N2.or)((0,N2._)`typeof ${g} != "object"`,(0,N2._)`${g} instanceof RegExp`,(0,N2._)`typeof ${g}.compare != "function"`,h(g)))}a(d,"validate$DataFormat");function p(){let m=u.schema,g=l.formats[m];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${o}": format "${m}" does not define "compare" function`);let A=e.scopeValue("formats",{key:m,ref:g,code:c.code.formats?(0,N2._)`${c.code.formats}${(0,N2.getProperty)(m)}`:void 0});t.fail$data(h(A))}a(p,"validateFormat");function h(m){return(0,N2._)`${m}.compare(${r}, ${n}) ${sht[o].fail} 0`}a(h,"compareCode")},dependencies:["format"]};var QFa=a(t=>(t.addKeyword(ipe.formatLimitDefinition),t),"formatLimitPlugin");ipe.default=QFa});var MCi=T((zke,DCi)=>{"use strict";f();Object.defineProperty(zke,"__esModule",{value:!0});var ope=RCi(),qFa=PCi(),C_r=Uo(),kCi=new C_r.Name("fullFormats"),GFa=new C_r.Name("fastFormats"),__r=a((t,e={keywords:!0})=>{if(Array.isArray(e))return NCi(t,e,ope.fullFormats,kCi),t;let[r,n]=e.mode==="fast"?[ope.fastFormats,GFa]:[ope.fullFormats,kCi],o=e.formats||ope.formatNames;return NCi(t,o,r,n),e.keywords&&(0,qFa.default)(t),t},"formatsPlugin");__r.get=(t,e="full")=>{let n=(e==="fast"?ope.fastFormats:ope.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function NCi(t,e,r,n){var o,s;(o=(s=t.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,C_r._)`require("ajv-formats/dist/formats").${n}`);for(let c of e)t.addFormat(c,r[c])}a(NCi,"addFormats");DCi.exports=zke=__r;Object.defineProperty(zke,"__esModule",{value:!0});zke.default=__r});var o_i=T((Ha0,i_i)=>{f();i_i.exports=n_i;n_i.sync=v9a;var t_i=require("fs");function _9a(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n{f();l_i.exports=a_i;a_i.sync=b9a;var s_i=require("fs");function a_i(t,e,r){s_i.stat(t,function(n,o){r(n,n?!1:c_i(o,e))})}a(a_i,"isexe");function b9a(t,e){return c_i(s_i.statSync(t),e)}a(b9a,"sync");function c_i(t,e){return t.isFile()&&T9a(t,e)}a(c_i,"checkStat");function T9a(t,e){var r=t.mode,n=t.uid,o=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),d=parseInt("001",8),p=l|u,h=r&d||r&u&&o===c||r&l&&n===s||r&p&&s===0;return h}a(T9a,"checkMode")});var f_i=T((Ka0,d_i)=>{f();var Ya0=require("fs"),Cht;process.platform==="win32"||global.TESTING_WINDOWS?Cht=o_i():Cht=u_i();d_i.exports=q_r;q_r.sync=S9a;function q_r(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){q_r(t,e||{},function(s,c){s?o(s):n(c)})})}Cht(t,e||{},function(n,o){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,o=!1),r(n,o)})}a(q_r,"isexe");function S9a(t,e){try{return Cht.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}a(S9a,"sync")});var E_i=T((Za0,y_i)=>{f();var ppe=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",p_i=require("path"),I9a=ppe?";":":",h_i=f_i(),m_i=a(t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),"getNotFoundError"),g_i=a((t,e)=>{let r=e.colon||I9a,n=t.match(/\//)||ppe&&t.match(/\\/)?[""]:[...ppe?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],o=ppe?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=ppe?o.split(r):[""];return ppe&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},"getPathInfo"),A_i=a((t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:o,pathExtExe:s}=g_i(t,e),c=[],l=a(d=>new Promise((p,h)=>{if(d===n.length)return e.all&&c.length?p(c):h(m_i(t));let m=n[d],g=/^".*"$/.test(m)?m.slice(1,-1):m,A=p_i.join(g,t),y=!g&&/^\.[\\\/]/.test(t)?t.slice(0,2)+A:A;p(u(y,d,0))}),"step"),u=a((d,p,h)=>new Promise((m,g)=>{if(h===o.length)return m(l(p+1));let A=o[h];h_i(d+A,{pathExt:s},(y,E)=>{if(!y&&E)if(e.all)c.push(d+A);else return m(d+A);return m(u(d,p,h+1))})}),"subStep");return r?l(0).then(d=>r(null,d),r):l(0)},"which"),x9a=a((t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=g_i(t,e),s=[];for(let c=0;c{"use strict";f();var C_i=a((t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");G_r.exports=C_i;G_r.exports.default=C_i});var S_i=T((oc0,T_i)=>{"use strict";f();var v_i=require("path"),w9a=E_i(),R9a=__i();function b_i(t,e){let r=t.options.env||process.env,n=process.cwd(),o=t.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let c;try{c=w9a.sync(t.command,{path:r[R9a({env:r})],pathExt:e?v_i.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return c&&(c=v_i.resolve(o?t.options.cwd:"",c)),c}a(b_i,"resolveCommandAttempt");function P9a(t){return b_i(t)||b_i(t,!0)}a(P9a,"resolveCommand");T_i.exports=P9a});var I_i=T((cc0,j_r)=>{"use strict";f();var H_r=/([()\][%!^"`<>&|;, *?])/g;function k9a(t){return t=t.replace(H_r,"^$1"),t}a(k9a,"escapeCommand");function N9a(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(H_r,"^$1"),e&&(t=t.replace(H_r,"^$1")),t}a(N9a,"escapeArgument");j_r.exports.command=k9a;j_r.exports.argument=N9a});var w_i=T((dc0,x_i)=>{"use strict";f();x_i.exports=/^#!(.*)/});var P_i=T((pc0,R_i)=>{"use strict";f();var D9a=w_i();R_i.exports=(t="")=>{let e=t.match(D9a);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var N_i=T((mc0,k_i)=>{"use strict";f();var $_r=require("fs"),M9a=P_i();function O9a(t){let r=Buffer.alloc(150),n;try{n=$_r.openSync(t,"r"),$_r.readSync(n,r,0,150,0),$_r.closeSync(n)}catch{}return M9a(r.toString())}a(O9a,"readShebang");k_i.exports=O9a});var B_i=T((yc0,O_i)=>{"use strict";f();var B9a=require("path"),D_i=S_i(),M_i=I_i(),L9a=N_i(),F9a=process.platform==="win32",U9a=/\.(?:com|exe)$/i,Q9a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function q9a(t){t.file=D_i(t);let e=t.file&&L9a(t.file);return e?(t.args.unshift(t.file),t.command=e,D_i(t)):t.file}a(q9a,"detectShebang");function G9a(t){if(!F9a)return t;let e=q9a(t),r=!U9a.test(e);if(t.options.forceShell||r){let n=Q9a.test(e);t.command=B9a.normalize(t.command),t.command=M_i.command(t.command),t.args=t.args.map(s=>M_i.argument(s,n));let o=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${o}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}a(G9a,"parseNonShell");function H9a(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:G9a(n)}a(H9a,"parse");O_i.exports=H9a});var U_i=T((_c0,F_i)=>{"use strict";f();var V_r=process.platform==="win32";function W_r(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}a(W_r,"notFoundError");function j9a(t,e){if(!V_r)return;let r=t.emit;t.emit=function(n,o){if(n==="exit"){let s=L_i(o,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}a(j9a,"hookChildProcess");function L_i(t,e){return V_r&&t===1&&!e.file?W_r(e.original,"spawn"):null}a(L_i,"verifyENOENT");function $9a(t,e){return V_r&&t===1&&!e.file?W_r(e.original,"spawnSync"):null}a($9a,"verifyENOENTSync");F_i.exports={hookChildProcess:j9a,verifyENOENT:L_i,verifyENOENTSync:$9a,notFoundError:W_r}});var G_i=T((Tc0,hpe)=>{"use strict";f();var Q_i=require("child_process"),z_r=B_i(),Y_r=U_i();function q_i(t,e,r){let n=z_r(t,e,r),o=Q_i.spawn(n.command,n.args,n.options);return Y_r.hookChildProcess(o,n),o}a(q_i,"spawn");function V9a(t,e,r){let n=z_r(t,e,r),o=Q_i.spawnSync(n.command,n.args,n.options);return o.error=o.error||Y_r.verifyENOENTSync(o.status,n),o}a(V9a,"spawnSync");hpe.exports=q_i;hpe.exports.spawn=q_i;hpe.exports.sync=V9a;hpe.exports._parse=z_r;hpe.exports._enoent=Y_r});var s7a={};Ri(s7a,{getTokenizer:()=>wo,getTokenizerAsync:()=>r8e,main:()=>p1i});module.exports=ba(s7a);f();f();B1r().install();f();f();f();var Cd=class{static{a(this,"LogTarget")}},S5=class{static{a(this,"TelemetryLogSender")}},Se=class{constructor(e){this.category=e}static{a(this,"Logger")}log(e,r,...n){e.get(Cd).logIt(e,r,this.category,...n)}debug(e,...r){this.log(e,4,...r)}info(e,...r){this.log(e,3,...r)}warn(e,...r){this.log(e,2,...r)}error(e,...r){this.log(e,1,...r)}exception(e,r,n){if(r instanceof Error&&r.name==="Canceled"&&r.message==="Canceled")return;let o=n;n.startsWith(".")&&(o=n.substring(1),n=`${this.category}${n}`),e.get(S5).sendException(e,r,n);let s=r instanceof Error?r:new Error(`Non-error thrown: ${String(r)}`);this.log(e,1,`${o}:`,s)}},_r=new Se("default");f();f();f();var pmt="github.copilot",L1r="github-enterprise";f();f();f();f();var vNe=class{constructor(e){this.userInfo=e}static{a(this,"CopilotUserInfoWrapper")}get sku(){return this.userInfo?.access_type_sku}get isFreeUser(){return this.sku==="free_limited_copilot"}get isIndividualUser(){return this.copilotPlan==="free"||this.copilotPlan==="individual"||this.copilotPlan==="individual_pro"}get copilotPlan(){if(this.isFreeUser)return"free";let e=this.userInfo?.copilot_plan;switch(e){case"individual":case"individual_pro":case"business":case"enterprise":return e;default:return"individual"}}get quotaInfo(){return{quota_snapshots:this.userInfo?.quota_snapshots,quota_reset_date:this.userInfo?.quota_reset_date}}get raw(){return this.userInfo}};f();function hmt(t){return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","faef89d9169d5eacf1d8c8dde3412e37","4535c7beffc844b46bb1ed4aa04d759a"].find(r=>t.includes(r))}a(hmt,"findKnownOrg");function F1r(t){let e=t.organization_list??[];return hmt(e)??""}a(F1r,"getUserKind");f();f();var bpe=class extends Error{static{a(this,"HttpTimeoutError")}constructor(e,r){super(e,{cause:r}),this.name="HttpTimeoutError"}};function ep(t){return!t||typeof t!="object"?!1:t instanceof bpe||"name"in t&&t.name==="AbortError"||"code"in t&&t.code==="ABORT_ERR"}a(ep,"isAbortError");var jX=class extends SyntaxError{constructor(r,n){super(r);this.code=n;this.name="JsonParseError"}static{a(this,"JsonParseError")}},O2=class extends Error{static{a(this,"FetchResponseError")}constructor(e,r=`HTTP ${e.status} ${e.statusText}`){super(r),this.name="FetchResponseError",this.code=`HTTP${e.status}`}},nvi=new Set(["ECONNABORTED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ENOTCONN","ENOTFOUND","ETIMEDOUT","ERR_HTTP2_STREAM_ERROR","ERR_SSL_BAD_DECRYPT","ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC","ERR_SSL_INVALID_LIBRARY_(0)","ERR_SSL_SSLV3_ALERT_BAD_RECORD_MAC","ERR_SSL_WRONG_VERSION_NUMBER","ERR_STREAM_PREMATURE_CLOSE","ERR_TLS_CERT_ALTNAME_INVALID"]);function Pb(t,e=!0){return t instanceof Error?e&&"cause"in t&&Pb(t.cause,!1)?!0:t.name==="EditorFetcherError"||t.name==="FetchError"||t instanceof jX||t instanceof O2||t?.message?.startsWith("net::")||nvi.has(t.code??""):!1}a(Pb,"isNetworkError");var B2=class{constructor(e,r,n,o,s){this.status=e;this.statusText=r;this.headers=n;this.getText=o;this.getBody=s;this.ok=this.status>=200&&this.status<300;this.clientError=this.status>=400&&this.status<500}static{a(this,"Response")}async text(){return this.getText()}async json(){let e=await this.text(),r=this.headers.get("content-type");if(!r||!r.includes("json"))throw new jX(`Response content-type is ${r??"missing"} (status=${this.status})`,`ContentType=${r}`);try{return JSON.parse(e)}catch(n){if(n instanceof SyntaxError){let o=n.message.match(/^(.*?) in JSON at position (\d+)(?: \(line \d+ column \d+\))?$/);if(o&&parseInt(o[2],10)==e.length||n.message==="Unexpected end of JSON input"){let s=new TextEncoder().encode(e).length,c=this.headers.get("content-length");throw c===null?new jX(`Response body truncated: actualLength=${s}`,"Truncated"):new jX(`Response body truncated: actualLength=${s}, headerLength=${c}`,"Truncated")}}throw n}}body(){return this.getBody()}};function bNe(t){let e=t.headers.get("retry-after");if(!e)return;let r=Number.parseFloat(e);if(Number.isFinite(r)&&r>=0)return r;let n=Date.parse(e);if(Number.isNaN(n))return;let o=n-Date.now();return o<=0?0:o/1e3}a(bNe,"parseRetryAfterSeconds");f();function TNe(){return typeof process>"u"}a(TNe,"isWeb");function BI(){return typeof process<"u"&&process.env.MSBENCH_MODE==="true"}a(BI,"isMsBenchModeEnabled");var mmt=class extends O2{static{a(this,"ProxiedResponseError")}constructor(e){super(e,`HTTP ${e.status} response does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`)}};async function mu(t,e,r,n={}){n={...n,headers:{Authorization:`Bearer ${e.accessToken}`,...TNe()?{}:mE(t),...n.headers}};let o=await t.get(dr).fetch(new URL(r,e.apiUrl).href,n);if(o.status>=500)throw new O2(o);if(!o.headers.get("x-github-request-id"))throw new mmt(o);return o}a(mu,"apiFetch");f();f();f();var Vvr=de(x5());var $r=class{constructor(e=10){this.valueMap=new Map;if(e<1)throw new Error("Size limit must be at least 1");this.sizeLimit=e}static{a(this,"LRUCacheMap")}set(e,r){if(this.has(e))this.valueMap.delete(e);else if(this.valueMap.size>=this.sizeLimit){let n=this.valueMap.keys().next().value;this.delete(n)}return this.valueMap.set(e,r),this}get(e){if(this.valueMap.has(e)){let r=this.valueMap.get(e);return this.valueMap.delete(e),this.valueMap.set(e,r),r}}delete(e){return this.valueMap.delete(e)}clear(){this.valueMap.clear()}get size(){return this.valueMap.size}keys(){return new Map(this.valueMap).keys()}values(){return new Map(this.valueMap).values()}entries(){return new Map(this.valueMap).entries()}[Symbol.iterator](){return this.entries()}has(e){return this.valueMap.has(e)}forEach(e,r){new Map(this.valueMap).forEach(e,r)}get[Symbol.toStringTag](){return"LRUCacheMap"}peek(e){return this.valueMap.get(e)}},LI=class extends $r{constructor(r,n=120*1e3){super(r);this.defaultTtl=n;this.expiration=new Map}static{a(this,"LRUExpirationCacheMap")}has(r){let n=!1,o=this.expiration.get(r);return o!==void 0&&(o>performance.now()&&(n=super.has(r)),n||this.delete(r)),n}get(r){let n=this.expiration.get(r);if(n!==void 0){if(n>performance.now())return super.get(r);this.delete(r)}}peek(r){let n=this.expiration.get(r);if(n!==void 0){if(n>performance.now())return super.peek(r);this.delete(r)}}set(r,n,o=this.defaultTtl){if(o<=0)throw new Error("TTL must be greater than 0");let s=super.set(r,n);return this.expiration.set(r,performance.now()+o),s}clear(){super.clear(),this.expiration.clear()}delete(r){return this.expiration.delete(r),super.delete(r)}get[Symbol.toStringTag](){return"LRUExpirationCacheMap"}},lDe=class extends $r{static{a(this,"LRUDisposableCacheMap")}delete(e){let r=this.peek(e);return r&&r.dispose(),super.delete(e)}clear(){for(let e of this.values())e.dispose();super.clear()}uncache(e){let r=this.peek(e);return super.delete(e),r}dispose(){this.clear()}};var gc=class{constructor(){this.recentNotifications=new $r(100)}static{a(this,"NotificationSender")}async showWarningMessageOnlyOnce(e,r,...n){if(!this.recentNotifications.has(e??r))return this.recentNotifications.set(e??r,!0),this.showWarningMessage(r,...n)}async showInformationMessageOnlyOnce(e,r,...n){if(!this.recentNotifications.has(e??r))return this.recentNotifications.set(e??r,!0),this.showInformationMessage(r,...n)}};f();var kb=class t{constructor(e){this.flags=e}static{a(this,"RuntimeMode")}static fromEnvironment(e,r=process.argv,n=process.env){return new t({debug:zvr(r,n),verboseLogging:ovi(r,n),testMode:e,simulation:ivi(n)})}};function q_(t){return t.get(kb).flags.testMode}a(q_,"isRunningInTest");function $X(t){return q_(t)}a($X,"shouldFailForDebugPurposes");function Spe(t){return t.get(kb).flags.debug}a(Spe,"isDebugEnabled");function Wvr(t){return t.get(kb).flags.verboseLogging}a(Wvr,"isVerboseLoggingEnabled");function zvr(t,e){return t.includes("--debug")||ymt(e,"DEBUG")}a(zvr,"determineDebugFlag");function ivi(t){return ymt(t,"SIMULATION")}a(ivi,"determineSimulationFlag");function uDe(t){return t.get(kb).flags.simulation}a(uDe,"isRunningInSimulation");function ovi(t,e){return e.COPILOT_AGENT_VERBOSE==="1"||e.COPILOT_AGENT_VERBOSE?.toLowerCase()==="true"||ymt(e,"VERBOSE")||zvr(t,e)}a(ovi,"determineVerboseLoggingEnabled");function ymt(t,e){for(let r of["GH_COPILOT_","GITHUB_COPILOT_"]){let n=t[`${r}${e}`];if(n)return n==="1"||n?.toLowerCase()==="true"}return!1}a(ymt,"determineEnvFlagEnabled");f();f();var tm=class t{static{a(this,"ContentProvider")}static{this.registeredSchemes=new Set}static registerSchemes(e){for(let r of e)t.registeredSchemes.add(r)}static isRegisteredScheme(e){return t.registeredSchemes.has(e)}};var Jvr=require("os"),dDe=require("path");f();var Yvr;(()=>{"use strict";var t={975:M=>{function D(N){if(typeof N!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(N))}a(D,"e");function G(N,F){for(var U,L="",H=0,$=-1,W=0,j=0;j<=N.length;++j){if(j2){var ce=L.lastIndexOf("/");if(ce!==L.length-1){ce===-1?(L="",H=0):H=(L=L.slice(0,ce)).length-1-L.lastIndexOf("/"),$=j,W=0;continue}}else if(L.length===2||L.length===1){L="",H=0,$=j,W=0;continue}}F&&(L.length>0?L+="/..":L="..",H=2)}else L.length>0?L+="/"+N.slice($+1,j):L=N.slice($+1,j),H=j-$-1;$=j,W=0}else U===46&&W!==-1?++W:W=-1}return L}a(G,"r");var O={resolve:a(function(){for(var N,F="",U=!1,L=arguments.length-1;L>=-1&&!U;L--){var H;L>=0?H=arguments[L]:(N===void 0&&(N=process.cwd()),H=N),D(H),H.length!==0&&(F=H+"/"+F,U=H.charCodeAt(0)===47)}return F=G(F,!U),U?F.length>0?"/"+F:"/":F.length>0?F:"."},"resolve"),normalize:a(function(N){if(D(N),N.length===0)return".";var F=N.charCodeAt(0)===47,U=N.charCodeAt(N.length-1)===47;return(N=G(N,!F)).length!==0||F||(N="."),N.length>0&&U&&(N+="/"),F?"/"+N:N},"normalize"),isAbsolute:a(function(N){return D(N),N.length>0&&N.charCodeAt(0)===47},"isAbsolute"),join:a(function(){if(arguments.length===0)return".";for(var N,F=0;F0&&(N===void 0?N=U:N+="/"+U)}return N===void 0?".":O.normalize(N)},"join"),relative:a(function(N,F){if(D(N),D(F),N===F||(N=O.resolve(N))===(F=O.resolve(F)))return"";for(var U=1;Uj){if(F.charCodeAt($+J)===47)return F.slice($+J+1);if(J===0)return F.slice($+J)}else H>j&&(N.charCodeAt(U+J)===47?ce=J:J===0&&(ce=0));break}var Te=N.charCodeAt(U+J);if(Te!==F.charCodeAt($+J))break;Te===47&&(ce=J)}var fe="";for(J=U+ce+1;J<=L;++J)J!==L&&N.charCodeAt(J)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+F.slice($+ce):($+=ce,F.charCodeAt($)===47&&++$,F.slice($))},"relative"),_makeLong:a(function(N){return N},"_makeLong"),dirname:a(function(N){if(D(N),N.length===0)return".";for(var F=N.charCodeAt(0),U=F===47,L=-1,H=!0,$=N.length-1;$>=1;--$)if((F=N.charCodeAt($))===47){if(!H){L=$;break}}else H=!1;return L===-1?U?"/":".":U&&L===1?"//":N.slice(0,L)},"dirname"),basename:a(function(N,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');D(N);var U,L=0,H=-1,$=!0;if(F!==void 0&&F.length>0&&F.length<=N.length){if(F.length===N.length&&F===N)return"";var W=F.length-1,j=-1;for(U=N.length-1;U>=0;--U){var ce=N.charCodeAt(U);if(ce===47){if(!$){L=U+1;break}}else j===-1&&($=!1,j=U+1),W>=0&&(ce===F.charCodeAt(W)?--W==-1&&(H=U):(W=-1,H=j))}return L===H?H=j:H===-1&&(H=N.length),N.slice(L,H)}for(U=N.length-1;U>=0;--U)if(N.charCodeAt(U)===47){if(!$){L=U+1;break}}else H===-1&&($=!1,H=U+1);return H===-1?"":N.slice(L,H)},"basename"),extname:a(function(N){D(N);for(var F=-1,U=0,L=-1,H=!0,$=0,W=N.length-1;W>=0;--W){var j=N.charCodeAt(W);if(j!==47)L===-1&&(H=!1,L=W+1),j===46?F===-1?F=W:$!==1&&($=1):F!==-1&&($=-1);else if(!H){U=W+1;break}}return F===-1||L===-1||$===0||$===1&&F===L-1&&F===U+1?"":N.slice(F,L)},"extname"),format:a(function(N){if(N===null||typeof N!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof N);return(function(F,U){var L=U.dir||U.root,H=U.base||(U.name||"")+(U.ext||"");return L?L===U.root?L+H:L+"/"+H:H})(0,N)},"format"),parse:a(function(N){D(N);var F={root:"",dir:"",base:"",ext:"",name:""};if(N.length===0)return F;var U,L=N.charCodeAt(0),H=L===47;H?(F.root="/",U=1):U=0;for(var $=-1,W=0,j=-1,ce=!0,J=N.length-1,Te=0;J>=U;--J)if((L=N.charCodeAt(J))!==47)j===-1&&(ce=!1,j=J+1),L===46?$===-1?$=J:Te!==1&&(Te=1):$!==-1&&(Te=-1);else if(!ce){W=J+1;break}return $===-1||j===-1||Te===0||Te===1&&$===j-1&&$===W+1?j!==-1&&(F.base=F.name=W===0&&H?N.slice(1,j):N.slice(W,j)):(W===0&&H?(F.name=N.slice(1,$),F.base=N.slice(1,j)):(F.name=N.slice(W,$),F.base=N.slice(W,j)),F.ext=N.slice($,j)),W>0?F.dir=N.slice(0,W-1):H&&(F.dir="/"),F},"parse"),sep:"/",delimiter:":",win32:null,posix:null};O.posix=O,M.exports=O}},e={};function r(M){var D=e[M];if(D!==void 0)return D.exports;var G=e[M]={exports:{}};return t[M](G,G.exports,r),G.exports}a(r,"r"),r.d=(M,D)=>{for(var G in D)r.o(D,G)&&!r.o(M,G)&&Object.defineProperty(M,G,{enumerable:!0,get:D[G]})},r.o=(M,D)=>Object.prototype.hasOwnProperty.call(M,D),r.r=M=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})};var n={};let o;r.r(n),r.d(n,{URI:a(()=>m,"URI"),Utils:a(()=>Q,"Utils")}),typeof process=="object"?o=process.platform==="win32":typeof navigator=="object"&&(o=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;function u(M,D){if(!M.scheme&&D)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!s.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!c.test(M.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}a(u,"a");let d="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static{a(this,"l")}static isUri(D){return D instanceof m||!!D&&typeof D.authority=="string"&&typeof D.fragment=="string"&&typeof D.path=="string"&&typeof D.query=="string"&&typeof D.scheme=="string"&&typeof D.fsPath=="string"&&typeof D.with=="function"&&typeof D.toString=="function"}scheme;authority;path;query;fragment;constructor(D,G,O,N,F,U=!1){typeof D=="object"?(this.scheme=D.scheme||d,this.authority=D.authority||d,this.path=D.path||d,this.query=D.query||d,this.fragment=D.fragment||d):(this.scheme=(function(L,H){return L||H?L:"file"})(D,U),this.authority=G||d,this.path=(function(L,H){switch(L){case"https":case"http":case"file":H?H[0]!==p&&(H=p+H):H=p}return H})(this.scheme,O||d),this.query=N||d,this.fragment=F||d,u(this,U))}get fsPath(){return v(this,!1)}with(D){if(!D)return this;let{scheme:G,authority:O,path:N,query:F,fragment:U}=D;return G===void 0?G=this.scheme:G===null&&(G=d),O===void 0?O=this.authority:O===null&&(O=d),N===void 0?N=this.path:N===null&&(N=d),F===void 0?F=this.query:F===null&&(F=d),U===void 0?U=this.fragment:U===null&&(U=d),G===this.scheme&&O===this.authority&&N===this.path&&F===this.query&&U===this.fragment?this:new A(G,O,N,F,U)}static parse(D,G=!1){let O=h.exec(D);return O?new A(O[2]||d,R(O[4]||d),R(O[5]||d),R(O[7]||d),R(O[9]||d),G):new A(d,d,d,d,d)}static file(D){let G=d;if(o&&(D=D.replace(/\\/g,p)),D[0]===p&&D[1]===p){let O=D.indexOf(p,2);O===-1?(G=D.substring(2),D=p):(G=D.substring(2,O),D=D.substring(O)||p)}return new A("file",G,D,d,d)}static from(D){let G=new A(D.scheme,D.authority,D.path,D.query,D.fragment);return u(G,!0),G}toString(D=!1){return b(this,D)}toJSON(){return this}static revive(D){if(D){if(D instanceof m)return D;{let G=new A(D);return G._formatted=D.external,G._fsPath=D._sep===g?D.fsPath:null,G}}return D}}let g=o?1:void 0;class A extends m{static{a(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(D=!1){return D?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){let D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=g),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function E(M,D,G){let O,N=-1;for(let F=0;F=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||D&&U===47||G&&U===91||G&&U===93||G&&U===58)N!==-1&&(O+=encodeURIComponent(M.substring(N,F)),N=-1),O!==void 0&&(O+=M.charAt(F));else{O===void 0&&(O=M.substr(0,F));let L=y[U];L!==void 0?(N!==-1&&(O+=encodeURIComponent(M.substring(N,F)),N=-1),O+=L):N===-1&&(N=F)}}return N!==-1&&(O+=encodeURIComponent(M.substring(N))),O!==void 0?O:M}a(E,"m");function _(M){let D;for(let G=0;G1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?D?M.path.substr(1):M.path[1].toLowerCase()+M.path.substr(2):M.path,o&&(G=G.replace(/\//g,"\\")),G}a(v,"v");function b(M,D){let G=D?_:E,O="",{scheme:N,authority:F,path:U,query:L,fragment:H}=M;if(N&&(O+=N,O+=":"),(F||N==="file")&&(O+=p,O+=p),F){let $=F.indexOf("@");if($!==-1){let W=F.substr(0,$);F=F.substr($+1),$=W.lastIndexOf(":"),$===-1?O+=G(W,!1,!1):(O+=G(W.substr(0,$),!1,!1),O+=":",O+=G(W.substr($+1),!1,!0)),O+="@"}F=F.toLowerCase(),$=F.lastIndexOf(":"),$===-1?O+=G(F,!1,!0):(O+=G(F.substr(0,$),!1,!0),O+=F.substr($))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let $=U.charCodeAt(1);$>=65&&$<=90&&(U=`/${String.fromCharCode($+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let $=U.charCodeAt(0);$>=65&&$<=90&&(U=`${String.fromCharCode($+32)}:${U.substr(2)}`)}O+=G(U,!0,!1)}return L&&(O+="?",O+=G(L,!1,!1)),H&&(O+="#",O+=D?H:E(H,!1,!1)),O}a(b,"b");function I(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+I(M.substr(3)):M}}a(I,"C");let x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(M){return M.match(x)?M.replace(x,(D=>I(D))):M}a(R,"w");var w=r(975);let P=w.posix||w,k="/";var Q;(function(M){M.joinPath=function(D,...G){return D.with({path:P.join(D.path,...G)})},M.resolvePath=function(D,...G){let O=D.path,N=!1;O[0]!==k&&(O=k+O,N=!0);let F=P.resolve(O,...G);return N&&F[0]===k&&!D.authority&&(F=F.substring(1)),D.with({path:F})},M.dirname=function(D){if(D.path.length===0||D.path===k)return D;let G=P.dirname(D.path);return G.length===1&&G.charCodeAt(0)===46&&(G=""),D.with({path:G})},M.basename=function(D){return P.basename(D.path)},M.extname=function(D){return P.extname(D.path)}})(Q||(Q={})),Yvr=n})();var{URI:aL,Utils:Ipe}=Yvr;function Xvr(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substring(0,3)+Xvr(t.substring(3)):t}}a(Xvr,"decodeURIComponentGraceful");var Kvr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Emt(t){return t.match(Kvr)?t.replace(Kvr,e=>Xvr(e)):t}a(Emt,"percentDecode");function Lc(t){if(/^[A-Za-z][A-Za-z0-9+.-]+:/.test(t))throw new Error("Path must not contain a scheme");if(!t)throw new Error("Path must not be empty");return aL.file(t).toString()}a(Lc,"makeFsUri");function Pl(t){if(typeof t!="string"&&(t=t.uri),/^[A-Za-z]:\\/.test(t))throw new Error(`Could not parse <${t}>: Windows-style path`);try{let e=t.match(/^(?:([^:/?#]+?:)?\/\/)(\/\/.*)$/);return e?aL.parse(e[1]+e[2],!0):aL.parse(t,!0)}catch(e){throw new Error(`Could not parse <${t}>`,{cause:e})}}a(Pl,"parseUri");function fDe(t){return Pl(t),t}a(fDe,"validateUri");function ha(t){try{return Pl(t).toString()}catch{return t}}a(ha,"normalizeUri");function VX(t){let e=ha(t);return e.endsWith("/")?e.slice(0,-1):e}a(VX,"normalizeUriNoTrailingSlash");var WX=new Set(["file","notebook","vscode-notebook","vscode-notebook-cell"]);function Qo(t){let e=Pl(t);if(!WX.has(e.scheme)&&!tm.isRegisteredScheme(e.scheme))throw new Error(`Copilot currently does not support URI with scheme: ${e.scheme}`);if((0,Jvr.platform)()==="win32"){let r=e.path;return e.authority?r=`//${e.authority}${e.path}`:/^\/[A-Za-z]:/.test(r)&&(r=r.substring(1)),(0,dDe.normalize)(r)}else{if(e.authority)throw new Error("Unsupported remote file path");return e.path}}a(Qo,"fsPath");function Eo(t){try{return Qo(t)}catch{return}}a(Eo,"getFsPath");function Zvr(t){let e=Eo(t);if(e)return aL.file(e).toString()}a(Zvr,"getFsUri");function Oq(t,...e){let r,n=Eo(t);return n?r=Lc((0,dDe.resolve)(n,...e)):r=Ipe.resolvePath(Pl(t),...e.map(o=>ebr(o))).toString(),typeof t=="string"?r:{uri:r}}a(Oq,"resolveFilePath");function Ti(t,...e){let r=Ipe.joinPath(Pl(t),...e.map(ebr)).toString();return typeof t=="string"?r:{uri:r}}a(Ti,"joinPath");function ebr(t){return svi(t)?t.replaceAll("\\","/"):t}a(ebr,"pathToURIPath");function svi(t){return/^[^/\\]*\\/.test(t)}a(svi,"isWinPath");function ei(t){return Emt((typeof t=="string"?t:t.uri).replace(/[#?].*$/,"").replace(/\/$/,"").replace(/^.*[/:]/,""))}a(ei,"basename");function Wu(t){let e=Ipe.dirname(Pl(t)),r;return WX.has(e.scheme)&&e.scheme!=="file"?r=e.with({scheme:"file",fragment:""}).toString():r=e.toString(),typeof t=="string"?r:{uri:r}}a(Wu,"dirname");function tbr(t){return Ipe.extname(Pl(t))}a(tbr,"extname");var jp=class{static{a(this,"NetworkConfiguration")}};function pDe(t,e){try{let r=new URL(e??"");if(r.protocol==="https:"||!_mt(t)&&r.protocol==="http:")return r.href}catch{}}a(pDe,"ensurePermittedUrl");var Bq={api:"https://api.githubcopilot.com",proxy:"https://copilot-proxy.githubusercontent.com",telemetry:"https://copilot-telemetry.githubusercontent.com","origin-tracker":"https://origin-tracker.githubusercontent.com"};function Cmt(t,e,r){if(r&&q_(t)){for(let n of r){let o=vr(t,n);if(o)return o}return}for(let n of e){let o=vr(t,n);if(o)return o}}a(Cmt,"urlConfigOverride");function avi(t,e){switch(e){case"api":return Cmt(t,[tt.DebugOverrideCapiUrl,tt.DebugOverrideCapiUrlLegacy],[tt.DebugTestOverrideCapiUrl,tt.DebugTestOverrideCapiUrlLegacy]);case"proxy":return Cmt(t,[tt.DebugOverrideProxyUrl,tt.DebugOverrideProxyUrlLegacy],[tt.DebugTestOverrideProxyUrl,tt.DebugTestOverrideProxyUrlLegacy]);case"origin-tracker":if(!_mt(t))return Cmt(t,[tt.DebugSnippyOverrideUrl])}}a(avi,"getEndpointOverrideUrl");function L2(t,e,r,...n){let o=avi(t,r)??e.endpoints[r];return Ti(o,...n)}a(L2,"getEndpointUrl");function zX(t){return cL(t)?.endpoints??Bq}a(zX,"getLastKnownEndpoints");function rbr(t,e){if(e&&!pDe(t,e)){t.get(gc).showWarningMessage(`Ignoring invalid or unsupported authentication URL "${e}".`);return}t.get(jp).setConfiguredUrls(t,{serverUrl:e})}a(rbr,"updateServerUrl");f();f();f();f();var FI=class{static{a(this,"InlineCompletionsUnification")}},cvi={codeUnification:!1,modelUnification:!1,expAssignments:[]},YX=class extends FI{constructor(){super(...arguments);this.inlineCompletionsUnificationState=cvi;this.onDidChangeState=a(()=>({dispose:a(()=>{},"dispose")}),"onDidChangeState")}static{a(this,"NullInlineCompletionsUnification")}};var gE=class t{static{a(this,"ExpConfig")}constructor(e,r,n){this.variables=e,this.assignmentContext=r,this.features=n}static createFallbackConfig(e,r){return hDe(e,{reason:r}),this.createEmptyConfig()}static createEmptyConfig(){return new t({},"","")}addToTelemetry(e,r){let o=e.get(FI).inlineCompletionsUnificationState.expAssignments.filter(c=>!this.assignmentContext.includes(c)),s=[this.assignmentContext,...o].filter(Boolean).join(";");r.properties["VSCode.ABExp.Features"]=this.features,r.properties["abexp.assignmentcontext"]=s}};f();var UA="X-Copilot-RelatedPluginVersion-",KX=(j=>(j.Market="X-MSEdge-Market",j.CorpNet="X-FD-Corpnet",j.Build="X-VSCode-Build",j.ApplicationVersion="X-VSCode-AppVersion",j.TargetPopulation="X-VSCode-TargetPopulation",j.ClientId="X-MSEdge-ClientId",j.DevDeviceId="X-VSCode-DevDeviceId",j.ExtensionName="X-VSCode-ExtensionName",j.ExtensionVersion="X-VSCode-ExtensionVersion",j.ExtensionRelease="X-VSCode-ExtensionRelease",j.CompletionsInChatExtensionVersion="X-VSCode-CompletionsInChatExtensionVersion",j.Language="X-VSCode-Language",j.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",j.CopilotEngine="X-Copilot-Engine",j.CopilotOverrideEngine="X-Copilot-OverrideEngine",j.CopilotRepository="X-Copilot-Repository",j.CopilotFileType="X-Copilot-FileType",j.CopilotUserKind="X-Copilot-UserKind",j.CopilotDogfood="X-Copilot-Dogfood",j.CopilotCustomModel="X-Copilot-CustomModel",j.CopilotOrgs="X-Copilot-Orgs",j.CopilotCustomModelNames="X-Copilot-CustomModelNames",j.CopilotTrackingId="X-Copilot-CopilotTrackingId",j.CopilotClientVersion="X-Copilot-ClientVersion",j.CopilotSku="X-Copilot-SKU",j.CopilotRelatedPluginVersionCppTools=UA+"msvscodecpptools",j.CopilotRelatedPluginVersionCMakeTools=UA+"msvscodecmaketools",j.CopilotRelatedPluginVersionMakefileTools=UA+"msvscodemakefiletools",j.CopilotRelatedPluginVersionCSharpDevKit=UA+"msdotnettoolscsdevkit",j.CopilotRelatedPluginVersionPython=UA+"mspythonpython",j.CopilotRelatedPluginVersionPylance=UA+"mspythonvscodepylance",j.CopilotRelatedPluginVersionJavaPack=UA+"vscjavavscodejavapack",j.CopilotRelatedPluginVersionJavaManager=UA+"vscjavavscodejavadependency",j.CopilotRelatedPluginVersionTypescript=UA+"vscodetypescriptlanguagefeatures",j.CopilotRelatedPluginVersionTypescriptNext=UA+"msvscodevscodetypescriptnext",j.CopilotRelatedPluginVersionCSharp=UA+"msdotnettoolscsharp",j.CopilotRelatedPluginVersionGithubCopilotChat=UA+"githubcopilotchat",j.CopilotRelatedPluginVersionGithubCopilot=UA+"githubcopilot",j))(KX||{});var lvi={"X-Copilot-ClientTimeBucket":"timeBucket","X-Copilot-OverrideEngine":"engine","X-Copilot-Repository":"repo","X-Copilot-FileType":"fileType","X-Copilot-UserKind":"userKind"},w5=class t{constructor(e){this.filters=e;for(let[r,n]of Object.entries(this.filters))n===""&&delete this.filters[r]}static{a(this,"FilterSettings")}extends(e){for(let[r,n]of Object.entries(e.filters))if(this.filters[r]!==n)return!1;return!0}addToTelemetry(e){for(let[r,n]of Object.entries(this.filters)){let o=lvi[r];o!==void 0&&(e.properties[o]=n)}}stringify(){let e=Object.keys(this.filters);return e.sort(),e.map(r=>`${r}:${this.filters[r]}`).join(";")}toHeaders(){return{...this.filters}}withChange(e,r){return new t({...this.filters,[e]:r})}};f();f();f();function ss(t,e){let r=$p(t,e,"event.CopilotToken");return t.get(Ot).onDidChangeTokenResult(n=>{n.copilotToken&&r(n.copilotToken)})}a(ss,"onCopilotToken");function bmt(t){let e=t.getTokenValue("tid"),r=t.organization_list,n=t.enterprise_list,o=t.getTokenValue("sku");if(!e)return;let s={copilot_trackingId:e};return r&&(s.organizations_list=r.toString()),n&&(s.enterprise_list=n.toString()),o&&(s.sku=o),s}a(bmt,"propertiesFromCopilotToken");var _d=class{constructor(e){this.#e={};this.optedIn=!1;this.ftFlag="";ss(e,r=>this.updateFromToken(r))}static{a(this,"TelemetryUserConfig")}#e;getProperties(){return this.#e}get trackingId(){return this.#e.copilot_trackingId}updateFromToken(e){let r=bmt(e);r&&(this.#e=r,this.optedIn=e.getTokenValue("rt")==="1",this.ftFlag=e.getTokenValue("ft")??"")}};var mDe=de(x5()),gDe=de(require("os"));var uvi=/^(\s+at)?(.*?)(@|\s\(|\s)([^(\n]+?)(:\d+)?(:\d+)?(\)?)$/;function dvi(t){let e={type:t.name,value:t.message},r=t.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,"");if(r?.startsWith(t.toString()+` -`)){e.stacktrace=[];for(let n of r.slice(t.toString().length+1).split(/\n/).reverse()){let o=n.match(uvi),s={filename:"",function:""};o&&(s.function=o[2]?.trim()?.replace(/^[^.]{1,2}(\.|$)/,"_$1")??s.function,s.filename=(o[4]?.trim()??s.filename).replace(/^\.\/dist\//,"/github-copilot/dist/"),o[5]&&o[5]!==":0"&&(s.lineno=o[5].slice(1)),o[6]&&o[5]!==":0"&&(s.colno=o[6].slice(1)),s.in_app=!/[[<:]|(?:^|\/)node_modules\//.test(s.filename)),e.stacktrace.push(s)}}return e}a(dvi,"buildExceptionDetail");function Tmt(t,e){let r=t.get(Nr),n=r.getEditorInfo(),o=t.get(_d),s={"#editor":n.devName??n.name,"#editor_version":G_({name:n.devName??n.name,version:n.version}),"#plugin":r.getEditorPluginInfo().name,"#plugin_version":G_(r.getEditorPluginInfo()),"#session_id":t.get(Ks).sessionId,"#machine_id":t.get(Ks).machineId,"#architecture":gDe.arch(),"#os_platform":gDe.platform(),...e};return o.trackingId&&(s.user=o.trackingId,s["#tracking_id"]=o.trackingId),s}a(Tmt,"buildContext");function nbr(t,e,r){let n=t.get(Ko),o=t.get(Nr).getEditorInfo(),s=typeof process<"u"?process.versions.node:"web",c={app:"copilot-client",rollup_id:"auto",platform:"node",release:n.getBuildType()!=="dev"?`copilot-client@${n.getVersion()}`:void 0,deployed_to:n.getBuildType(),catalog_service:o.name==="vscode"?"CopilotCompletionsVSCode":"CopilotLanguageServer",transaction:r,context:Tmt(t,{"#node_version":s}),sensitive_context:{}},l=[];c.exception_detail=[];let u=0,d=e;for(;d instanceof Error&&u<10;){let h=dvi(d);c.exception_detail.unshift(h),l.unshift([d,h]),u+=1,d=d.cause}let p=[];for(let[h,m]of l)if(m.stacktrace&&m.stacktrace.length>0){p.push(`${m.type}: ${h.code??""}`);let g=[...m.stacktrace].reverse();for(let y of g)if(y.filename?.startsWith("/github-copilot/"))return c;let A=!1;for(let y of g)if(y.in_app){A=!0,p.push(`${y.filename?.replace(/^\.\//,"")}:${y.lineno}:${y.colno}`);break}A||p.push(r),p.push(`${g[0].filename?.replace(/^\.\//,"")}`)}else return c;return c.exception_detail.length>0&&(c.rollup_id=(0,mDe.SHA256)(mDe.enc.Utf16.parse(p.join(` -`))).toString()),c}a(nbr,"buildPayload");f();var xpe=class{static{a(this,"FailingTelemetryReporter")}sendTelemetryEvent(e,r,n){throw new Error("Telemetry disabled")}sendTelemetryErrorEvent(e,r,n,o){throw new Error("Telemetry disabled")}dispose(){return Promise.resolve()}hackOptOutListener(){}};f();var obr=7*86400*1e3,F2=class{constructor(e=5){this.perWeek=e;this.cache=new $r(1e3)}static{a(this,"ExceptionRateLimiter")}isThrottled(e){let r=Date.now(),n=this.cache.get(e)||new Array(this.perWeek).fill(-obr);return r-n[0]t?.length>0&&t!==".").map(t=>t.includes("\\")?new RegExp(sbr(t.replace(/\\/g,"/")),"gi"):new RegExp(sbr(t),"gi"));function pvi(t,e){if(!t||!t.includes("/")&&!t.includes("\\"))return t;let r=t,n=[];for(let l of e)for(;;){let u=l.exec(t);if(!u)break;n.push([u.index,l.lastIndex])}let o=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,c=0;for(r="";;){let l=s.exec(t);if(!l)break;let u=n.some(([d,p])=>l.index",c=s.lastIndex)}return c`;return t}a(hvi,"removePropertiesWithPossibleUserInfo");function mvi(t){return t.replace(/([\s|(]|file:\/\/)(\/[^\s]+)/g,"$1[redacted]").replace(/([\s|(]|file:\/\/)([a-zA-Z]:[(\\|/){1,2}][^\s]+)/gi,"$1[redacted]").replace(/([\s|(]|file:\/\/)(\\[^\s]+)/gi,"$1[redacted]")}a(mvi,"redactPaths");function cbr(t,e=fvi){let r={};for(let[n,o]of Object.entries(t))if(typeof o=="string"){let s=o.replaceAll("%20"," "),c=hvi(s);if(c!==s){r[n]=c;continue}s=pvi(s,e);for(let l of e)s=s.replace(l,"");s=mvi(s),r[n]=s}return r}a(cbr,"sanitizeTelemetryProperties");function lL(t,e=Object.keys(t)){let r={};for(let n of e)t[n]!==void 0&&(r[n]=t[n]);return r}a(lL,"filterTelemetryProperties");f();var gu=class{constructor(){this.promises=new Set}static{a(this,"PromiseQueue")}register(e){this.promises.add(e),e.finally(()=>this.promises.delete(e))}async flush(){await Promise.allSettled(this.promises)}};f();var dbr=require("os"),fbr=de(require("path"));function wpe(t){return t.replace(/(file:\/\/)([^\s<>]+)/gi,"$1[redacted]").replace(/(^|[\s|:=(<'"`])((?:\/(?=[^/])|\\|[a-zA-Z]:[\\/])[^\s:)>'"`]+)/g,"$1[redacted]")}a(wpe,"redactPaths");var gvi=new Set(["Maximum call stack size exceeded","Set maximum size exceeded","Invalid arguments"]),Avi=[/^[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}.]+ is not a function[ \w]*$/u,/^Cannot read properties of undefined \(reading '[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]+'\)$/u];function xmt(t){if(gvi.has(t))return t;for(let e of Avi)if(e.test(t))return t;return wpe(t).replace(/\bDNS:(?:\*\.)?[\w.-]+/gi,"DNS:[redacted]")}a(xmt,"redactMessage");function yDe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(yDe,"escapeForRegExp");var yvi=new RegExp("(?<=^|[\\s|(\"'`]|file://)"+yDe((0,dbr.homedir)())+"(?=$|[\\\\/:\"'`])","gi");function Imt(t){return t.replace(yvi,"~")}a(Imt,"redactHomeDir");var pbr="[\\\\/]?([^:)]*)(?=:\\d)",lbr=new RegExp(yDe(fbr.sep),"g"),ubr=new RegExp(yDe(__dirname.replace(/[\\/]lib[\\/]src[\\/]util$|[\\/]dist$/,""))+pbr,"gi");function wmt(t,e,r=!1,n=[]){let o=new Error(e(t));o.name=t.name,typeof t.syscall=="string"&&(o.syscall=t.syscall),typeof t.code=="string"&&(o.code=t.code),typeof t.errno=="number"&&(o.errno=t.errno),o.stack=void 0;let s=t.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,""),c;for(let l of[t.toString(),`${t.name}: ${t.message}`])if(s?.startsWith(l+` -`)){c=s.slice(l.length+1).split(/\n/);break}if(c){o.stack=o.toString();for(let l of c)if(ubr.test(l))o.stack+=` -${wpe(l.replace(ubr,(u,d)=>"./"+d.replace(lbr,"/")))}`;else if(/[ (]node:|[ (]wasm:\/\/wasm\/| \(\)$/.test(l))o.stack+=` -${wpe(l)}`;else{let u=!1;for(let{prefix:d,path:p}of n){let h=new RegExp(yDe(p.replace(/[\\/]$/,""))+pbr,"gi");if(h.test(l)){o.stack+=` -${wpe(l.replace(h,(m,g)=>d+g.replace(lbr,"/")))}`,u=!0;break}}if(u)continue;r?o.stack+=` -${Imt(l)}`:o.stack+=` - at [redacted]:0:0`}}else r&&s&&(o.stack=Imt(s));return t.cause instanceof Error&&(o.cause=wmt(t.cause,e,r,n)),o}a(wmt,"cloneError");function hbr(t){let e=t.message;return typeof t.path=="string"&&t.path.length>0&&(e=e.replaceAll(t.path,"")),e}a(hbr,"errorMessageWithoutPath");function mbr(t,e){return wmt(t,a(function(n){return Imt(hbr(n))},"prepareMessage"),!0,e)}a(mbr,"prepareErrorForRestrictedTelemetry");function gbr(t,e,r=!1){return wmt(t,a(function(o){if(r)return xmt(hbr(o));let s="[redacted]";return typeof o.code=="string"&&(s=o.code+" "+s),typeof o.syscall=="string"?s=wpe(o.syscall)+" "+s:"erroredSysCall"in o&&typeof o.erroredSysCall=="string"&&(s=o.erroredSysCall+" "+s),s},"prepareMessage"),!1,e)}a(gbr,"redactError");f();f();var yg={};Ri(yg,{HasPropertyKey:()=>EDe,IsArray:()=>cf,IsAsyncIterator:()=>Rmt,IsBigInt:()=>Rpe,IsBoolean:()=>R5,IsDate:()=>Lq,IsFunction:()=>Pmt,IsIterator:()=>kmt,IsNull:()=>Nmt,IsNumber:()=>H_,IsObject:()=>Ja,IsRegExp:()=>Ppe,IsString:()=>Fc,IsSymbol:()=>Dmt,IsUint8Array:()=>P5,IsUndefined:()=>lf});f();function EDe(t,e){return e in t}a(EDe,"HasPropertyKey");function Rmt(t){return Ja(t)&&!cf(t)&&!P5(t)&&Symbol.asyncIterator in t}a(Rmt,"IsAsyncIterator");function cf(t){return Array.isArray(t)}a(cf,"IsArray");function Rpe(t){return typeof t=="bigint"}a(Rpe,"IsBigInt");function R5(t){return typeof t=="boolean"}a(R5,"IsBoolean");function Lq(t){return t instanceof globalThis.Date}a(Lq,"IsDate");function Pmt(t){return typeof t=="function"}a(Pmt,"IsFunction");function kmt(t){return Ja(t)&&!cf(t)&&!P5(t)&&Symbol.iterator in t}a(kmt,"IsIterator");function Nmt(t){return t===null}a(Nmt,"IsNull");function H_(t){return typeof t=="number"}a(H_,"IsNumber");function Ja(t){return typeof t=="object"&&t!==null}a(Ja,"IsObject");function Ppe(t){return t instanceof globalThis.RegExp}a(Ppe,"IsRegExp");function Fc(t){return typeof t=="string"}a(Fc,"IsString");function Dmt(t){return typeof t=="symbol"}a(Dmt,"IsSymbol");function P5(t){return t instanceof globalThis.Uint8Array}a(P5,"IsUint8Array");function lf(t){return t===void 0}a(lf,"IsUndefined");function Evi(t){return t.map(e=>CDe(e))}a(Evi,"ArrayType");function Cvi(t){return new Date(t.getTime())}a(Cvi,"DateType");function _vi(t){return new Uint8Array(t)}a(_vi,"Uint8ArrayType");function vvi(t){return new RegExp(t.source,t.flags)}a(vvi,"RegExpType");function bvi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=CDe(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=CDe(t[r]);return e}a(bvi,"ObjectType");function CDe(t){return cf(t)?Evi(t):Lq(t)?Cvi(t):P5(t)?_vi(t):Ppe(t)?vvi(t):Ja(t)?bvi(t):t}a(CDe,"Visit");function kl(t){return CDe(t)}a(kl,"Clone");function JX(t,e){return e===void 0?kl(t):kl({...e,...t})}a(JX,"CloneType");f();f();f();function _De(t){return Yi(t)&&globalThis.Symbol.asyncIterator in t}a(_De,"IsAsyncIterator");function vDe(t){return Yi(t)&&globalThis.Symbol.iterator in t}a(vDe,"IsIterator");function Mmt(t){return Yi(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}a(Mmt,"IsStandardObject");function bDe(t){return t instanceof globalThis.Promise}a(bDe,"IsPromise");function QA(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}a(QA,"IsDate");function Abr(t){return t instanceof globalThis.Map}a(Abr,"IsMap");function ybr(t){return t instanceof globalThis.Set}a(ybr,"IsSet");function Nb(t){return globalThis.ArrayBuffer.isView(t)}a(Nb,"IsTypedArray");function XX(t){return t instanceof globalThis.Uint8Array}a(XX,"IsUint8Array");function di(t,e){return e in t}a(di,"HasPropertyKey");function Yi(t){return t!==null&&typeof t=="object"}a(Yi,"IsObject");function ti(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}a(ti,"IsArray");function Nl(t){return t===void 0}a(Nl,"IsUndefined");function k5(t){return t===null}a(k5,"IsNull");function U2(t){return typeof t=="boolean"}a(U2,"IsBoolean");function Ln(t){return typeof t=="number"}a(Ln,"IsNumber");function TDe(t){return globalThis.Number.isInteger(t)}a(TDe,"IsInteger");function rm(t){return typeof t=="bigint"}a(rm,"IsBigInt");function Bs(t){return typeof t=="string"}a(Bs,"IsString");function uL(t){return typeof t=="function"}a(uL,"IsFunction");function N5(t){return typeof t=="symbol"}a(N5,"IsSymbol");function j_(t){return rm(t)||U2(t)||k5(t)||Ln(t)||Bs(t)||N5(t)||Nl(t)}a(j_,"IsValueType");var el;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(c,l){return t.ExactOptionalPropertyTypes?l in c:c[l]!==void 0}a(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function r(c){let l=Yi(c);return t.AllowArrayObject?l:l&&!ti(c)}a(r,"IsObjectLike"),t.IsObjectLike=r;function n(c){return r(c)&&!(c instanceof Date)&&!(c instanceof Uint8Array)}a(n,"IsRecordLike"),t.IsRecordLike=n;function o(c){return t.AllowNaN?Ln(c):Number.isFinite(c)}a(o,"IsNumberLike"),t.IsNumberLike=o;function s(c){let l=Nl(c);return t.AllowNullVoid?l||c===null:l}a(s,"IsVoidLike"),t.IsVoidLike=s})(el||(el={}));f();function Tvi(t){return globalThis.Object.freeze(t).map(e=>kpe(e))}a(Tvi,"ImmutableArray");function Svi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=kpe(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=kpe(t[r]);return globalThis.Object.freeze(e)}a(Svi,"ImmutableObject");function kpe(t){return cf(t)?Tvi(t):Lq(t)?t:P5(t)?t:Ppe(t)?t:Ja(t)?Svi(t):t}a(kpe,"Immutable");function Et(t,e){let r=e!==void 0?{...e,...t}:t;switch(el.InstanceMode){case"freeze":return kpe(r);case"clone":return kl(r);default:return r}}a(Et,"CreateType");f();var fi=class extends Error{static{a(this,"TypeBoxError")}constructor(e){super(e)}};f();f();f();var Au=Symbol.for("TypeBox.Transform"),UI=Symbol.for("TypeBox.Readonly"),nm=Symbol.for("TypeBox.Optional"),Db=Symbol.for("TypeBox.Hint"),mt=Symbol.for("TypeBox.Kind");function ZX(t){return Ja(t)&&t[UI]==="Readonly"}a(ZX,"IsReadonly");function AE(t){return Ja(t)&&t[nm]==="Optional"}a(AE,"IsOptional");function Omt(t){return Cs(t,"Any")}a(Omt,"IsAny");function Bmt(t){return Cs(t,"Argument")}a(Bmt,"IsArgument");function QI(t){return Cs(t,"Array")}a(QI,"IsArray");function Fq(t){return Cs(t,"AsyncIterator")}a(Fq,"IsAsyncIterator");function Uq(t){return Cs(t,"BigInt")}a(Uq,"IsBigInt");function D5(t){return Cs(t,"Boolean")}a(D5,"IsBoolean");function qI(t){return Cs(t,"Computed")}a(qI,"IsComputed");function GI(t){return Cs(t,"Constructor")}a(GI,"IsConstructor");function Ivi(t){return Cs(t,"Date")}a(Ivi,"IsDate");function HI(t){return Cs(t,"Function")}a(HI,"IsFunction");function jI(t){return Cs(t,"Integer")}a(jI,"IsInteger");function zu(t){return Cs(t,"Intersect")}a(zu,"IsIntersect");function Qq(t){return Cs(t,"Iterator")}a(Qq,"IsIterator");function Cs(t,e){return Ja(t)&&mt in t&&t[mt]===e}a(Cs,"IsKindOf");function SDe(t){return R5(t)||H_(t)||Fc(t)}a(SDe,"IsLiteralValue");function $_(t){return Cs(t,"Literal")}a($_,"IsLiteral");function V_(t){return Cs(t,"MappedKey")}a(V_,"IsMappedKey");function Dl(t){return Cs(t,"MappedResult")}a(Dl,"IsMappedResult");function dL(t){return Cs(t,"Never")}a(dL,"IsNever");function xvi(t){return Cs(t,"Not")}a(xvi,"IsNot");function Npe(t){return Cs(t,"Null")}a(Npe,"IsNull");function $I(t){return Cs(t,"Number")}a($I,"IsNumber");function uf(t){return Cs(t,"Object")}a(uf,"IsObject");function qq(t){return Cs(t,"Promise")}a(qq,"IsPromise");function Gq(t){return Cs(t,"Record")}a(Gq,"IsRecord");function vd(t){return Cs(t,"Ref")}a(vd,"IsRef");function Lmt(t){return Cs(t,"RegExp")}a(Lmt,"IsRegExp");function M5(t){return Cs(t,"String")}a(M5,"IsString");function Dpe(t){return Cs(t,"Symbol")}a(Dpe,"IsSymbol");function W_(t){return Cs(t,"TemplateLiteral")}a(W_,"IsTemplateLiteral");function wvi(t){return Cs(t,"This")}a(wvi,"IsThis");function ma(t){return Ja(t)&&Au in t}a(ma,"IsTransform");function z_(t){return Cs(t,"Tuple")}a(z_,"IsTuple");function O5(t){return Cs(t,"Undefined")}a(O5,"IsUndefined");function Ls(t){return Cs(t,"Union")}a(Ls,"IsUnion");function Rvi(t){return Cs(t,"Uint8Array")}a(Rvi,"IsUint8Array");function Pvi(t){return Cs(t,"Unknown")}a(Pvi,"IsUnknown");function kvi(t){return Cs(t,"Unsafe")}a(kvi,"IsUnsafe");function Nvi(t){return Cs(t,"Void")}a(Nvi,"IsVoid");function fL(t){return Ja(t)&&mt in t&&Fc(t[mt])}a(fL,"IsKind");function yu(t){return Omt(t)||Bmt(t)||QI(t)||D5(t)||Uq(t)||Fq(t)||qI(t)||GI(t)||Ivi(t)||HI(t)||jI(t)||zu(t)||Qq(t)||$_(t)||V_(t)||Dl(t)||dL(t)||xvi(t)||Npe(t)||$I(t)||uf(t)||qq(t)||Gq(t)||vd(t)||Lmt(t)||M5(t)||Dpe(t)||W_(t)||wvi(t)||z_(t)||O5(t)||Ls(t)||Rvi(t)||Pvi(t)||kvi(t)||Nvi(t)||fL(t)}a(yu,"IsSchema");var qe={};Ri(qe,{IsAny:()=>vbr,IsArgument:()=>bbr,IsArray:()=>Tbr,IsAsyncIterator:()=>Sbr,IsBigInt:()=>Ibr,IsBoolean:()=>xbr,IsComputed:()=>wbr,IsConstructor:()=>Rbr,IsDate:()=>Pbr,IsFunction:()=>kbr,IsImport:()=>Fvi,IsInteger:()=>Nbr,IsIntersect:()=>Dbr,IsIterator:()=>Mbr,IsKind:()=>sTr,IsKindOf:()=>Jo,IsLiteral:()=>Ope,IsLiteralBoolean:()=>Uvi,IsLiteralNumber:()=>Bbr,IsLiteralString:()=>Obr,IsLiteralValue:()=>Lbr,IsMappedKey:()=>Fbr,IsMappedResult:()=>Ubr,IsNever:()=>Qbr,IsNot:()=>qbr,IsNull:()=>Gbr,IsNumber:()=>Hbr,IsObject:()=>jbr,IsOptional:()=>Lvi,IsPromise:()=>$br,IsProperties:()=>IDe,IsReadonly:()=>Bvi,IsRecord:()=>Vbr,IsRecursive:()=>Qvi,IsRef:()=>Wbr,IsRegExp:()=>zbr,IsSchema:()=>Ml,IsString:()=>Ybr,IsSymbol:()=>Kbr,IsTemplateLiteral:()=>Jbr,IsThis:()=>Xbr,IsTransform:()=>Zbr,IsTuple:()=>eTr,IsUint8Array:()=>rTr,IsUndefined:()=>tTr,IsUnion:()=>qmt,IsUnionLiteral:()=>qvi,IsUnknown:()=>nTr,IsUnsafe:()=>iTr,IsVoid:()=>oTr,TypeGuardUnknownTypeError:()=>Fmt});f();var Fmt=class extends fi{static{a(this,"TypeGuardUnknownTypeError")}},Dvi=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function Ebr(t){try{return new RegExp(t),!0}catch{return!1}}a(Ebr,"IsPattern");function Umt(t){if(!Fc(t))return!1;for(let e=0;e=7&&r<=13||r===27||r===127)return!1}return!0}a(Umt,"IsControlCharacterFree");function Cbr(t){return Qmt(t)||Ml(t)}a(Cbr,"IsAdditionalProperties");function Mpe(t){return lf(t)||Rpe(t)}a(Mpe,"IsOptionalBigInt");function Uc(t){return lf(t)||H_(t)}a(Uc,"IsOptionalNumber");function Qmt(t){return lf(t)||R5(t)}a(Qmt,"IsOptionalBoolean");function Xa(t){return lf(t)||Fc(t)}a(Xa,"IsOptionalString");function Mvi(t){return lf(t)||Fc(t)&&Umt(t)&&Ebr(t)}a(Mvi,"IsOptionalPattern");function Ovi(t){return lf(t)||Fc(t)&&Umt(t)}a(Ovi,"IsOptionalFormat");function _br(t){return lf(t)||Ml(t)}a(_br,"IsOptionalSchema");function Bvi(t){return Ja(t)&&t[UI]==="Readonly"}a(Bvi,"IsReadonly");function Lvi(t){return Ja(t)&&t[nm]==="Optional"}a(Lvi,"IsOptional");function vbr(t){return Jo(t,"Any")&&Xa(t.$id)}a(vbr,"IsAny");function bbr(t){return Jo(t,"Argument")&&H_(t.index)}a(bbr,"IsArgument");function Tbr(t){return Jo(t,"Array")&&t.type==="array"&&Xa(t.$id)&&Ml(t.items)&&Uc(t.minItems)&&Uc(t.maxItems)&&Qmt(t.uniqueItems)&&_br(t.contains)&&Uc(t.minContains)&&Uc(t.maxContains)}a(Tbr,"IsArray");function Sbr(t){return Jo(t,"AsyncIterator")&&t.type==="AsyncIterator"&&Xa(t.$id)&&Ml(t.items)}a(Sbr,"IsAsyncIterator");function Ibr(t){return Jo(t,"BigInt")&&t.type==="bigint"&&Xa(t.$id)&&Mpe(t.exclusiveMaximum)&&Mpe(t.exclusiveMinimum)&&Mpe(t.maximum)&&Mpe(t.minimum)&&Mpe(t.multipleOf)}a(Ibr,"IsBigInt");function xbr(t){return Jo(t,"Boolean")&&t.type==="boolean"&&Xa(t.$id)}a(xbr,"IsBoolean");function wbr(t){return Jo(t,"Computed")&&Fc(t.target)&&cf(t.parameters)&&t.parameters.every(e=>Ml(e))}a(wbr,"IsComputed");function Rbr(t){return Jo(t,"Constructor")&&t.type==="Constructor"&&Xa(t.$id)&&cf(t.parameters)&&t.parameters.every(e=>Ml(e))&&Ml(t.returns)}a(Rbr,"IsConstructor");function Pbr(t){return Jo(t,"Date")&&t.type==="Date"&&Xa(t.$id)&&Uc(t.exclusiveMaximumTimestamp)&&Uc(t.exclusiveMinimumTimestamp)&&Uc(t.maximumTimestamp)&&Uc(t.minimumTimestamp)&&Uc(t.multipleOfTimestamp)}a(Pbr,"IsDate");function kbr(t){return Jo(t,"Function")&&t.type==="Function"&&Xa(t.$id)&&cf(t.parameters)&&t.parameters.every(e=>Ml(e))&&Ml(t.returns)}a(kbr,"IsFunction");function Fvi(t){return Jo(t,"Import")&&EDe(t,"$defs")&&Ja(t.$defs)&&IDe(t.$defs)&&EDe(t,"$ref")&&Fc(t.$ref)&&t.$ref in t.$defs}a(Fvi,"IsImport");function Nbr(t){return Jo(t,"Integer")&&t.type==="integer"&&Xa(t.$id)&&Uc(t.exclusiveMaximum)&&Uc(t.exclusiveMinimum)&&Uc(t.maximum)&&Uc(t.minimum)&&Uc(t.multipleOf)}a(Nbr,"IsInteger");function IDe(t){return Ja(t)&&Object.entries(t).every(([e,r])=>Umt(e)&&Ml(r))}a(IDe,"IsProperties");function Dbr(t){return Jo(t,"Intersect")&&!(Fc(t.type)&&t.type!=="object")&&cf(t.allOf)&&t.allOf.every(e=>Ml(e)&&!Zbr(e))&&Xa(t.type)&&(Qmt(t.unevaluatedProperties)||_br(t.unevaluatedProperties))&&Xa(t.$id)}a(Dbr,"IsIntersect");function Mbr(t){return Jo(t,"Iterator")&&t.type==="Iterator"&&Xa(t.$id)&&Ml(t.items)}a(Mbr,"IsIterator");function Jo(t,e){return Ja(t)&&mt in t&&t[mt]===e}a(Jo,"IsKindOf");function Obr(t){return Ope(t)&&Fc(t.const)}a(Obr,"IsLiteralString");function Bbr(t){return Ope(t)&&H_(t.const)}a(Bbr,"IsLiteralNumber");function Uvi(t){return Ope(t)&&R5(t.const)}a(Uvi,"IsLiteralBoolean");function Ope(t){return Jo(t,"Literal")&&Xa(t.$id)&&Lbr(t.const)}a(Ope,"IsLiteral");function Lbr(t){return R5(t)||H_(t)||Fc(t)}a(Lbr,"IsLiteralValue");function Fbr(t){return Jo(t,"MappedKey")&&cf(t.keys)&&t.keys.every(e=>H_(e)||Fc(e))}a(Fbr,"IsMappedKey");function Ubr(t){return Jo(t,"MappedResult")&&IDe(t.properties)}a(Ubr,"IsMappedResult");function Qbr(t){return Jo(t,"Never")&&Ja(t.not)&&Object.getOwnPropertyNames(t.not).length===0}a(Qbr,"IsNever");function qbr(t){return Jo(t,"Not")&&Ml(t.not)}a(qbr,"IsNot");function Gbr(t){return Jo(t,"Null")&&t.type==="null"&&Xa(t.$id)}a(Gbr,"IsNull");function Hbr(t){return Jo(t,"Number")&&t.type==="number"&&Xa(t.$id)&&Uc(t.exclusiveMaximum)&&Uc(t.exclusiveMinimum)&&Uc(t.maximum)&&Uc(t.minimum)&&Uc(t.multipleOf)}a(Hbr,"IsNumber");function jbr(t){return Jo(t,"Object")&&t.type==="object"&&Xa(t.$id)&&IDe(t.properties)&&Cbr(t.additionalProperties)&&Uc(t.minProperties)&&Uc(t.maxProperties)}a(jbr,"IsObject");function $br(t){return Jo(t,"Promise")&&t.type==="Promise"&&Xa(t.$id)&&Ml(t.item)}a($br,"IsPromise");function Vbr(t){return Jo(t,"Record")&&t.type==="object"&&Xa(t.$id)&&Cbr(t.additionalProperties)&&Ja(t.patternProperties)&&(e=>{let r=Object.getOwnPropertyNames(e.patternProperties);return r.length===1&&Ebr(r[0])&&Ja(e.patternProperties)&&Ml(e.patternProperties[r[0]])})(t)}a(Vbr,"IsRecord");function Qvi(t){return Ja(t)&&Db in t&&t[Db]==="Recursive"}a(Qvi,"IsRecursive");function Wbr(t){return Jo(t,"Ref")&&Xa(t.$id)&&Fc(t.$ref)}a(Wbr,"IsRef");function zbr(t){return Jo(t,"RegExp")&&Xa(t.$id)&&Fc(t.source)&&Fc(t.flags)&&Uc(t.maxLength)&&Uc(t.minLength)}a(zbr,"IsRegExp");function Ybr(t){return Jo(t,"String")&&t.type==="string"&&Xa(t.$id)&&Uc(t.minLength)&&Uc(t.maxLength)&&Mvi(t.pattern)&&Ovi(t.format)}a(Ybr,"IsString");function Kbr(t){return Jo(t,"Symbol")&&t.type==="symbol"&&Xa(t.$id)}a(Kbr,"IsSymbol");function Jbr(t){return Jo(t,"TemplateLiteral")&&t.type==="string"&&Fc(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}a(Jbr,"IsTemplateLiteral");function Xbr(t){return Jo(t,"This")&&Xa(t.$id)&&Fc(t.$ref)}a(Xbr,"IsThis");function Zbr(t){return Ja(t)&&Au in t}a(Zbr,"IsTransform");function eTr(t){return Jo(t,"Tuple")&&t.type==="array"&&Xa(t.$id)&&H_(t.minItems)&&H_(t.maxItems)&&t.minItems===t.maxItems&&(lf(t.items)&&lf(t.additionalItems)&&t.minItems===0||cf(t.items)&&t.items.every(e=>Ml(e)))}a(eTr,"IsTuple");function tTr(t){return Jo(t,"Undefined")&&t.type==="undefined"&&Xa(t.$id)}a(tTr,"IsUndefined");function qvi(t){return qmt(t)&&t.anyOf.every(e=>Obr(e)||Bbr(e))}a(qvi,"IsUnionLiteral");function qmt(t){return Jo(t,"Union")&&Xa(t.$id)&&Ja(t)&&cf(t.anyOf)&&t.anyOf.every(e=>Ml(e))}a(qmt,"IsUnion");function rTr(t){return Jo(t,"Uint8Array")&&t.type==="Uint8Array"&&Xa(t.$id)&&Uc(t.minByteLength)&&Uc(t.maxByteLength)}a(rTr,"IsUint8Array");function nTr(t){return Jo(t,"Unknown")&&Xa(t.$id)}a(nTr,"IsUnknown");function iTr(t){return Jo(t,"Unsafe")}a(iTr,"IsUnsafe");function oTr(t){return Jo(t,"Void")&&t.type==="void"&&Xa(t.$id)}a(oTr,"IsVoid");function sTr(t){return Ja(t)&&mt in t&&Fc(t[mt])&&!Dvi.includes(t[mt])}a(sTr,"IsKind");function Ml(t){return Ja(t)&&(vbr(t)||bbr(t)||Tbr(t)||xbr(t)||Ibr(t)||Sbr(t)||wbr(t)||Rbr(t)||Pbr(t)||kbr(t)||Nbr(t)||Dbr(t)||Mbr(t)||Ope(t)||Fbr(t)||Ubr(t)||Qbr(t)||qbr(t)||Gbr(t)||Hbr(t)||jbr(t)||$br(t)||Vbr(t)||Wbr(t)||zbr(t)||Ybr(t)||Kbr(t)||Jbr(t)||Xbr(t)||eTr(t)||tTr(t)||qmt(t)||rTr(t)||nTr(t)||iTr(t)||oTr(t)||sTr(t))}a(Ml,"IsSchema");f();var Gmt="(true|false)",Bpe="(0|[1-9][0-9]*)",Hmt="(.*)",Gvi="(?!.*)",UGa=`^${Gmt}$`,pL=`^${Bpe}$`,hL=`^${Hmt}$`,aTr=`^${Gvi}$`;f();var VI={};Ri(VI,{Clear:()=>jvi,Delete:()=>$vi,Entries:()=>Hvi,Get:()=>zvi,Has:()=>Vvi,Set:()=>Wvi});f();var eZ=new Map;function Hvi(){return new Map(eZ)}a(Hvi,"Entries");function jvi(){return eZ.clear()}a(jvi,"Clear");function $vi(t){return eZ.delete(t)}a($vi,"Delete");function Vvi(t){return eZ.has(t)}a(Vvi,"Has");function Wvi(t,e){eZ.set(t,e)}a(Wvi,"Set");function zvi(t){return eZ.get(t)}a(zvi,"Get");var qA={};Ri(qA,{Clear:()=>Kvi,Delete:()=>Jvi,Entries:()=>Yvi,Get:()=>ebi,Has:()=>Xvi,Set:()=>Zvi});f();var tZ=new Map;function Yvi(){return new Map(tZ)}a(Yvi,"Entries");function Kvi(){return tZ.clear()}a(Kvi,"Clear");function Jvi(t){return tZ.delete(t)}a(Jvi,"Delete");function Xvi(t){return tZ.has(t)}a(Xvi,"Has");function Zvi(t,e){tZ.set(t,e)}a(Zvi,"Set");function ebi(t){return tZ.get(t)}a(ebi,"Get");f();function cTr(t,e){return t.includes(e)}a(cTr,"SetIncludes");function lTr(t){return[...new Set(t)]}a(lTr,"SetDistinct");function tbi(t,e){return t.filter(r=>e.includes(r))}a(tbi,"SetIntersect");function rbi(t,e){return t.reduce((r,n)=>tbi(r,n),e)}a(rbi,"SetIntersectManyResolve");function uTr(t){return t.length===1?t[0]:t.length>1?rbi(t.slice(1),t[0]):[]}a(uTr,"SetIntersectMany");function dTr(t){let e=[];for(let r of t)e.push(...r);return e}a(dTr,"SetUnionMany");f();function mL(t){return Et({[mt]:"Any"},t)}a(mL,"Any");f();function rZ(t,e){return Et({[mt]:"Array",type:"array",items:t},e)}a(rZ,"Array");f();function fTr(t){return Et({[mt]:"Argument",index:t})}a(fTr,"Argument");f();function nZ(t,e){return Et({[mt]:"AsyncIterator",type:"AsyncIterator",items:t},e)}a(nZ,"AsyncIterator");f();f();function tl(t,e,r){return Et({[mt]:"Computed",target:t,parameters:e},r)}a(tl,"Computed");f();f();function nbi(t,e){let{[e]:r,...n}=t;return n}a(nbi,"DiscardKey");function Yu(t,e){return e.reduce((r,n)=>nbi(r,n),t)}a(Yu,"Discard");f();function Co(t){return Et({[mt]:"Never",not:{}},t)}a(Co,"Never");f();f();function Js(t){return Et({[mt]:"MappedResult",properties:t})}a(Js,"MappedResult");f();f();function iZ(t,e,r){return Et({[mt]:"Constructor",type:"Constructor",parameters:t,returns:e},r)}a(iZ,"Constructor");f();function Q2(t,e,r){return Et({[mt]:"Function",type:"Function",parameters:t,returns:e},r)}a(Q2,"Function");f();f();f();f();function Lpe(t,e){return Et({[mt]:"Union",anyOf:t},e)}a(Lpe,"UnionCreate");function ibi(t){return t.some(e=>AE(e))}a(ibi,"IsUnionOptional");function pTr(t){return t.map(e=>AE(e)?obi(e):e)}a(pTr,"RemoveOptionalFromRest");function obi(t){return Yu(t,[nm])}a(obi,"RemoveOptionalFromType");function sbi(t,e){return ibi(t)?Eg(Lpe(pTr(t),e)):Lpe(pTr(t),e)}a(sbi,"ResolveUnion");function q2(t,e){return t.length===1?Et(t[0],e):t.length===0?Co(e):sbi(t,e)}a(q2,"UnionEvaluated");f();function ga(t,e){return t.length===0?Co(e):t.length===1?Et(t[0],e):Lpe(t,e)}a(ga,"Union");f();f();f();var xDe=class extends fi{static{a(this,"TemplateLiteralParserError")}};function abi(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}a(abi,"Unescape");function jmt(t,e,r){return t[e]===r&&t.charCodeAt(e-1)!==92}a(jmt,"IsNonEscaped");function L5(t,e){return jmt(t,e,"(")}a(L5,"IsOpenParen");function Fpe(t,e){return jmt(t,e,")")}a(Fpe,"IsCloseParen");function hTr(t,e){return jmt(t,e,"|")}a(hTr,"IsSeparator");function cbi(t){if(!(L5(t,0)&&Fpe(t,t.length-1)))return!1;let e=0;for(let r=0;r0&&n.push(oZ(c)),r=s+1}let o=t.slice(r);return o.length>0&&n.push(oZ(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}a(fbi,"Or");function pbi(t){function e(o,s){if(!L5(o,s))throw new xDe("TemplateLiteralParser: Index must point to open parens");let c=0;for(let l=s;l0&&n.push(oZ(l)),o=c-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}a(pbi,"And");function oZ(t){return cbi(t)?oZ(lbi(t)):ubi(t)?fbi(t):dbi(t)?pbi(t):{type:"const",const:abi(t)}}a(oZ,"TemplateLiteralParse");function sZ(t){return oZ(t.slice(1,t.length-1))}a(sZ,"TemplateLiteralParseExact");var $mt=class extends fi{static{a(this,"TemplateLiteralFiniteError")}};function hbi(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}a(hbi,"IsNumberExpression");function mbi(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}a(mbi,"IsBooleanExpression");function gbi(t){return t.type==="const"&&t.const===".*"}a(gbi,"IsStringExpression");function Hq(t){return hbi(t)||gbi(t)?!1:mbi(t)?!0:t.type==="and"?t.expr.every(e=>Hq(e)):t.type==="or"?t.expr.every(e=>Hq(e)):t.type==="const"?!0:(()=>{throw new $mt("Unknown expression type")})()}a(Hq,"IsTemplateLiteralExpressionFinite");function wDe(t){let e=sZ(t.pattern);return Hq(e)}a(wDe,"IsTemplateLiteralFinite");f();var Vmt=class extends fi{static{a(this,"TemplateLiteralGenerateError")}};function*mTr(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let r of mTr(t.slice(1)))yield`${e}${r}`}a(mTr,"GenerateReduce");function*Abi(t){return yield*mTr(t.expr.map(e=>[...Upe(e)]))}a(Abi,"GenerateAnd");function*ybi(t){for(let e of t.expr)yield*Upe(e)}a(ybi,"GenerateOr");function*Ebi(t){return yield t.const}a(Ebi,"GenerateConst");function*Upe(t){return t.type==="and"?yield*Abi(t):t.type==="or"?yield*ybi(t):t.type==="const"?yield*Ebi(t):(()=>{throw new Vmt("Unknown expression")})()}a(Upe,"TemplateLiteralExpressionGenerate");function aZ(t){let e=sZ(t.pattern);return Hq(e)?[...Upe(e)]:[]}a(aZ,"TemplateLiteralGenerate");f();f();function _s(t,e){return Et({[mt]:"Literal",const:t,type:typeof t},e)}a(_s,"Literal");f();function RDe(t){return Et({[mt]:"Boolean",type:"boolean"},t)}a(RDe,"Boolean");f();function cZ(t){return Et({[mt]:"BigInt",type:"bigint"},t)}a(cZ,"BigInt");f();function Mb(t){return Et({[mt]:"Number",type:"number"},t)}a(Mb,"Number");f();function GA(t){return Et({[mt]:"String",type:"string"},t)}a(GA,"String");function*Cbi(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield RDe():e==="number"?yield Mb():e==="bigint"?yield cZ():e==="string"?yield GA():yield(()=>{let r=e.split("|").map(n=>_s(n.trim()));return r.length===0?Co():r.length===1?r[0]:q2(r)})()}a(Cbi,"FromUnion");function*_bi(t){if(t[1]!=="{"){let e=_s("$"),r=Wmt(t.slice(1));return yield*[e,...r]}for(let e=2;eATr(r,e)).join("|")})`:$I(t)?`${e}${Bpe}`:jI(t)?`${e}${Bpe}`:Uq(t)?`${e}${Bpe}`:M5(t)?`${e}${Hmt}`:$_(t)?`${e}${vbi(t.const.toString())}`:D5(t)?`${e}${Gmt}`:(()=>{throw new zmt(`Unexpected Kind '${t[mt]}'`)})()}a(ATr,"Visit");function Ymt(t){return`^${t.map(e=>ATr(e,"")).join("")}$`}a(Ymt,"TemplateLiteralPattern");f();function jq(t){let r=aZ(t).map(n=>_s(n));return q2(r)}a(jq,"TemplateLiteralToUnion");f();function PDe(t,e){let r=Fc(t)?Ymt(gTr(t)):Ymt(t);return Et({[mt]:"TemplateLiteral",type:"string",pattern:r},e)}a(PDe,"TemplateLiteral");function bbi(t){return aZ(t).map(r=>r.toString())}a(bbi,"FromTemplateLiteral");function Tbi(t){let e=[];for(let r of t)e.push(...yE(r));return e}a(Tbi,"FromUnion");function Sbi(t){return[t.toString()]}a(Sbi,"FromLiteral");function yE(t){return[...new Set(W_(t)?bbi(t):Ls(t)?Tbi(t.anyOf):$_(t)?Sbi(t.const):$I(t)?["[number]"]:jI(t)?["[number]"]:[])]}a(yE,"IndexPropertyKeys");f();function Ibi(t,e,r){let n={};for(let o of Object.getOwnPropertyNames(e))n[o]=gL(t,yE(e[o]),r);return n}a(Ibi,"FromProperties");function xbi(t,e,r){return Ibi(t,e.properties,r)}a(xbi,"FromMappedResult");function yTr(t,e,r){let n=xbi(t,e,r);return Js(n)}a(yTr,"IndexFromMappedResult");function CTr(t,e){return t.map(r=>_Tr(r,e))}a(CTr,"FromRest");function wbi(t){return t.filter(e=>!dL(e))}a(wbi,"FromIntersectRest");function Rbi(t,e){return kDe(wbi(CTr(t,e)))}a(Rbi,"FromIntersect");function Pbi(t){return t.some(e=>dL(e))?[]:t}a(Pbi,"FromUnionRest");function kbi(t,e){return q2(Pbi(CTr(t,e)))}a(kbi,"FromUnion");function Nbi(t,e){return e in t?t[e]:e==="[number]"?q2(t):Co()}a(Nbi,"FromTuple");function Dbi(t,e){return e==="[number]"?t:Co()}a(Dbi,"FromArray");function Mbi(t,e){return e in t?t[e]:Co()}a(Mbi,"FromProperty");function _Tr(t,e){return zu(t)?Rbi(t.allOf,e):Ls(t)?kbi(t.anyOf,e):z_(t)?Nbi(t.items??[],e):QI(t)?Dbi(t.items,e):uf(t)?Mbi(t.properties,e):Co()}a(_Tr,"IndexFromPropertyKey");function Qpe(t,e){return e.map(r=>_Tr(t,r))}a(Qpe,"IndexFromPropertyKeys");function ETr(t,e){return q2(Qpe(t,e))}a(ETr,"FromSchema");function gL(t,e,r){if(vd(t)||vd(e)){let n="Index types using Ref parameters require both Type and Key to be of TSchema";if(!yu(t)||!yu(e))throw new fi(n);return tl("Index",[t,e])}return Dl(e)?yTr(t,e,r):V_(e)?vTr(t,e,r):Et(yu(e)?ETr(t,yE(e)):ETr(t,e),r)}a(gL,"Index");function Obi(t,e,r){return{[e]:gL(t,[e],kl(r))}}a(Obi,"MappedIndexPropertyKey");function Bbi(t,e,r){return e.reduce((n,o)=>({...n,...Obi(t,o,r)}),{})}a(Bbi,"MappedIndexPropertyKeys");function Lbi(t,e,r){return Bbi(t,e.keys,r)}a(Lbi,"MappedIndexProperties");function vTr(t,e,r){let n=Lbi(t,e,r);return Js(n)}a(vTr,"IndexFromMappedKey");f();function lZ(t,e){return Et({[mt]:"Iterator",type:"Iterator",items:t},e)}a(lZ,"Iterator");f();function Fbi(t){let e=[];for(let r in t)AE(t[r])||e.push(r);return e}a(Fbi,"RequiredKeys");function Ubi(t,e){let r=Fbi(t),n=r.length>0?{[mt]:"Object",type:"object",properties:t,required:r}:{[mt]:"Object",type:"object",properties:t};return Et(n,e)}a(Ubi,"_Object");var Aa=Ubi;f();function NDe(t,e){return Et({[mt]:"Promise",type:"Promise",item:t},e)}a(NDe,"Promise");f();f();function Qbi(t){return Et(Yu(t,[UI]))}a(Qbi,"RemoveReadonly");function qbi(t){return Et({...t,[UI]:"Readonly"})}a(qbi,"AddReadonly");function Gbi(t,e){return e===!1?Qbi(t):qbi(t)}a(Gbi,"ReadonlyWithFlag");function EE(t,e){let r=e??!0;return Dl(t)?bTr(t,r):Gbi(t,r)}a(EE,"Readonly");function Hbi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=EE(t[n],e);return r}a(Hbi,"FromProperties");function jbi(t,e){return Hbi(t.properties,e)}a(jbi,"FromMappedResult");function bTr(t,e){let r=jbi(t,e);return Js(r)}a(bTr,"ReadonlyFromMappedResult");f();function Ob(t,e){return Et(t.length>0?{[mt]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[mt]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}a(Ob,"Tuple");function TTr(t,e){return t in e?Bb(t,e[t]):Js(e)}a(TTr,"FromMappedResult");function $bi(t){return{[t]:_s(t)}}a($bi,"MappedKeyToKnownMappedResultProperties");function Vbi(t){let e={};for(let r of t)e[r]=_s(r);return e}a(Vbi,"MappedKeyToUnknownMappedResultProperties");function Wbi(t,e){return cTr(e,t)?$bi(t):Vbi(e)}a(Wbi,"MappedKeyToMappedResultProperties");function zbi(t,e){let r=Wbi(t,e);return TTr(t,r)}a(zbi,"FromMappedKey");function qpe(t,e){return e.map(r=>Bb(t,r))}a(qpe,"FromRest");function Ybi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=Bb(t,e[n]);return r}a(Ybi,"FromProperties");function Bb(t,e){let r={...e};return AE(e)?Eg(Bb(t,Yu(e,[nm]))):ZX(e)?EE(Bb(t,Yu(e,[UI]))):Dl(e)?TTr(t,e.properties):V_(e)?zbi(t,e.keys):GI(e)?iZ(qpe(t,e.parameters),Bb(t,e.returns),r):HI(e)?Q2(qpe(t,e.parameters),Bb(t,e.returns),r):Fq(e)?nZ(Bb(t,e.items),r):Qq(e)?lZ(Bb(t,e.items),r):zu(e)?Cg(qpe(t,e.allOf),r):Ls(e)?ga(qpe(t,e.anyOf),r):z_(e)?Ob(qpe(t,e.items??[]),r):uf(e)?Aa(Ybi(t,e.properties),r):QI(e)?rZ(Bb(t,e.items),r):qq(e)?NDe(Bb(t,e.item),r):e}a(Bb,"FromSchemaType");function Kbi(t,e){let r={};for(let n of t)r[n]=Bb(n,e);return r}a(Kbi,"MappedFunctionReturnType");function STr(t,e,r){let n=yu(t)?yE(t):t,o=e({[mt]:"MappedKey",keys:n}),s=Kbi(n,o);return Aa(s,r)}a(STr,"Mapped");f();function Jbi(t){return Et(Yu(t,[nm]))}a(Jbi,"RemoveOptional");function Xbi(t){return Et({...t,[nm]:"Optional"})}a(Xbi,"AddOptional");function Zbi(t,e){return e===!1?Jbi(t):Xbi(t)}a(Zbi,"OptionalWithFlag");function Eg(t,e){let r=e??!0;return Dl(t)?ITr(t,r):Zbi(t,r)}a(Eg,"Optional");function eTi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=Eg(t[n],e);return r}a(eTi,"FromProperties");function tTi(t,e){return eTi(t.properties,e)}a(tTi,"FromMappedResult");function ITr(t,e){let r=tTi(t,e);return Js(r)}a(ITr,"OptionalFromMappedResult");f();function Gpe(t,e={}){let r=t.every(o=>uf(o)),n=yu(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return Et(e.unevaluatedProperties===!1||yu(e.unevaluatedProperties)||r?{...n,[mt]:"Intersect",type:"object",allOf:t}:{...n,[mt]:"Intersect",allOf:t},e)}a(Gpe,"IntersectCreate");function rTi(t){return t.every(e=>AE(e))}a(rTi,"IsIntersectOptional");function nTi(t){return Yu(t,[nm])}a(nTi,"RemoveOptionalFromType");function xTr(t){return t.map(e=>AE(e)?nTi(e):e)}a(xTr,"RemoveOptionalFromRest");function iTi(t,e){return rTi(t)?Eg(Gpe(xTr(t),e)):Gpe(xTr(t),e)}a(iTi,"ResolveIntersect");function kDe(t,e={}){if(t.length===1)return Et(t[0],e);if(t.length===0)return Co(e);if(t.some(r=>ma(r)))throw new Error("Cannot intersect transform types");return iTi(t,e)}a(kDe,"IntersectEvaluated");f();function Cg(t,e){if(t.length===1)return Et(t[0],e);if(t.length===0)return Co(e);if(t.some(r=>ma(r)))throw new Error("Cannot intersect transform types");return Gpe(t,e)}a(Cg,"Intersect");f();function Lb(...t){let[e,r]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new fi("Ref: $ref must be a string");return Et({[mt]:"Ref",$ref:e},r)}a(Lb,"Ref");function oTi(t,e){return tl("Awaited",[tl(t,e)])}a(oTi,"FromComputed");function sTi(t){return tl("Awaited",[Lb(t)])}a(sTi,"FromRef");function aTi(t){return Cg(wTr(t))}a(aTi,"FromIntersect");function cTi(t){return ga(wTr(t))}a(cTi,"FromUnion");function lTi(t){return uZ(t)}a(lTi,"FromPromise");function wTr(t){return t.map(e=>uZ(e))}a(wTr,"FromRest");function uZ(t,e){return Et(qI(t)?oTi(t.target,t.parameters):zu(t)?aTi(t.allOf):Ls(t)?cTi(t.anyOf):qq(t)?lTi(t.item):vd(t)?sTi(t.$ref):t,e)}a(uZ,"Awaited");f();f();f();f();function RTr(t){let e=[];for(let r of t)e.push(CE(r));return e}a(RTr,"FromRest");function uTi(t){let e=RTr(t);return dTr(e)}a(uTi,"FromIntersect");function dTi(t){let e=RTr(t);return uTr(e)}a(dTi,"FromUnion");function fTi(t){return t.map((e,r)=>r.toString())}a(fTi,"FromTuple");function pTi(t){return["[number]"]}a(pTi,"FromArray");function hTi(t){return globalThis.Object.getOwnPropertyNames(t)}a(hTi,"FromProperties");function mTi(t){return Kmt?globalThis.Object.getOwnPropertyNames(t).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}a(mTi,"FromPatternProperties");function CE(t){return zu(t)?uTi(t.allOf):Ls(t)?dTi(t.anyOf):z_(t)?fTi(t.items??[]):QI(t)?pTi(t.items):uf(t)?hTi(t.properties):Gq(t)?mTi(t.patternProperties):[]}a(CE,"KeyOfPropertyKeys");var Kmt=!1;function F5(t){Kmt=!0;let e=CE(t);return Kmt=!1,`^(${e.map(n=>`(${n})`).join("|")})$`}a(F5,"KeyOfPattern");function gTi(t,e){return tl("KeyOf",[tl(t,e)])}a(gTi,"FromComputed");function ATi(t){return tl("KeyOf",[Lb(t)])}a(ATi,"FromRef");function yTi(t,e){let r=CE(t),n=ETi(r),o=q2(n);return Et(o,e)}a(yTi,"KeyOfFromType");function ETi(t){return t.map(e=>e==="[number]"?Mb():_s(e))}a(ETi,"KeyOfPropertyKeysToRest");function dZ(t,e){return qI(t)?gTi(t.target,t.parameters):vd(t)?ATi(t.$ref):Dl(t)?PTr(t,e):yTi(t,e)}a(dZ,"KeyOf");function CTi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=dZ(t[n],kl(e));return r}a(CTi,"FromProperties");function _Ti(t,e){return CTi(t.properties,e)}a(_Ti,"FromMappedResult");function PTr(t,e){let r=_Ti(t,e);return Js(r)}a(PTr,"KeyOfFromMappedResult");f();function DDe(t){let e=CE(t),r=Qpe(t,e);return e.map((n,o)=>[e[o],r[o]])}a(DDe,"KeyOfPropertyEntries");function vTi(t){let e=[];for(let r of t)e.push(...CE(r));return lTr(e)}a(vTi,"CompositeKeys");function bTi(t){return t.filter(e=>!dL(e))}a(bTi,"FilterNever");function TTi(t,e){let r=[];for(let n of t)r.push(...Qpe(n,[e]));return bTi(r)}a(TTi,"CompositeProperty");function STi(t,e){let r={};for(let n of e)r[n]=kDe(TTi(t,n));return r}a(STi,"CompositeProperties");function kTr(t,e){let r=vTi(t),n=STi(t,r);return Aa(n,e)}a(kTr,"Composite");f();f();function MDe(t){return Et({[mt]:"Date",type:"Date"},t)}a(MDe,"Date");f();function ODe(t){return Et({[mt]:"Null",type:"null"},t)}a(ODe,"Null");f();function BDe(t){return Et({[mt]:"Symbol",type:"symbol"},t)}a(BDe,"Symbol");f();function LDe(t){return Et({[mt]:"Undefined",type:"undefined"},t)}a(LDe,"Undefined");f();function FDe(t){return Et({[mt]:"Uint8Array",type:"Uint8Array"},t)}a(FDe,"Uint8Array");f();function WI(t){return Et({[mt]:"Unknown"},t)}a(WI,"Unknown");function ITi(t){return t.map(e=>Jmt(e,!1))}a(ITi,"FromArray");function xTi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=EE(Jmt(t[r],!1));return e}a(xTi,"FromProperties");function UDe(t,e){return e===!0?t:EE(t)}a(UDe,"ConditionalReadonly");function Jmt(t,e){return Rmt(t)?UDe(mL(),e):kmt(t)?UDe(mL(),e):cf(t)?EE(Ob(ITi(t))):P5(t)?FDe():Lq(t)?MDe():Ja(t)?UDe(Aa(xTi(t)),e):Pmt(t)?UDe(Q2([],WI()),e):lf(t)?LDe():Nmt(t)?ODe():Dmt(t)?BDe():Rpe(t)?cZ():H_(t)?_s(t):R5(t)?_s(t):Fc(t)?_s(t):Aa({})}a(Jmt,"FromValue");function NTr(t,e){return Et(Jmt(t,!0),e)}a(NTr,"Const");f();function DTr(t,e){return GI(t)?Ob(t.parameters,e):Co(e)}a(DTr,"ConstructorParameters");f();function MTr(t,e){if(lf(t))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]),o=[...new Set(r)].map(s=>_s(s));return ga(o,{...e,[Db]:"Enum"})}a(MTr,"Enum");f();f();f();var Zmt=class extends fi{static{a(this,"ExtendsResolverError")}},_t;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(_t||(_t={}));function Fb(t){return t===_t.False?t:_t.True}a(Fb,"IntoBooleanResult");function fZ(t){throw new Zmt(t)}a(fZ,"Throw");function Vf(t){return qe.IsNever(t)||qe.IsIntersect(t)||qe.IsUnion(t)||qe.IsUnknown(t)||qe.IsAny(t)}a(Vf,"IsStructuralRight");function Wf(t,e){return qe.IsNever(e)?qTr(t,e):qe.IsIntersect(e)?QDe(t,e):qe.IsUnion(e)?ngt(t,e):qe.IsUnknown(e)?$Tr(t,e):qe.IsAny(e)?rgt(t,e):fZ("StructuralRight")}a(Wf,"StructuralRight");function rgt(t,e){return _t.True}a(rgt,"FromAnyRight");function wTi(t,e){return qe.IsIntersect(e)?QDe(t,e):qe.IsUnion(e)&&e.anyOf.some(r=>qe.IsAny(r)||qe.IsUnknown(r))?_t.True:qe.IsUnion(e)?_t.Union:qe.IsUnknown(e)||qe.IsAny(e)?_t.True:_t.Union}a(wTi,"FromAny");function RTi(t,e){return qe.IsUnknown(t)?_t.False:qe.IsAny(t)?_t.Union:qe.IsNever(t)?_t.True:_t.False}a(RTi,"FromArrayRight");function PTi(t,e){return qe.IsObject(e)&&qDe(e)?_t.True:Vf(e)?Wf(t,e):qe.IsArray(e)?Fb(Za(t.items,e.items)):_t.False}a(PTi,"FromArray");function kTi(t,e){return Vf(e)?Wf(t,e):qe.IsAsyncIterator(e)?Fb(Za(t.items,e.items)):_t.False}a(kTi,"FromAsyncIterator");function NTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsBigInt(e)?_t.True:_t.False}a(NTi,"FromBigInt");function UTr(t,e){return qe.IsLiteralBoolean(t)||qe.IsBoolean(t)?_t.True:_t.False}a(UTr,"FromBooleanRight");function DTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsBoolean(e)?_t.True:_t.False}a(DTi,"FromBoolean");function MTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsConstructor(e)?t.parameters.length>e.parameters.length?_t.False:t.parameters.every((r,n)=>Fb(Za(e.parameters[n],r))===_t.True)?Fb(Za(t.returns,e.returns)):_t.False:_t.False}a(MTi,"FromConstructor");function OTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsDate(e)?_t.True:_t.False}a(OTi,"FromDate");function BTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsFunction(e)?t.parameters.length>e.parameters.length?_t.False:t.parameters.every((r,n)=>Fb(Za(e.parameters[n],r))===_t.True)?Fb(Za(t.returns,e.returns)):_t.False:_t.False}a(BTi,"FromFunction");function QTr(t,e){return qe.IsLiteral(t)&&yg.IsNumber(t.const)||qe.IsNumber(t)||qe.IsInteger(t)?_t.True:_t.False}a(QTr,"FromIntegerRight");function LTi(t,e){return qe.IsInteger(e)||qe.IsNumber(e)?_t.True:Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):_t.False}a(LTi,"FromInteger");function QDe(t,e){return e.allOf.every(r=>Za(t,r)===_t.True)?_t.True:_t.False}a(QDe,"FromIntersectRight");function FTi(t,e){return t.allOf.some(r=>Za(r,e)===_t.True)?_t.True:_t.False}a(FTi,"FromIntersect");function UTi(t,e){return Vf(e)?Wf(t,e):qe.IsIterator(e)?Fb(Za(t.items,e.items)):_t.False}a(UTi,"FromIterator");function QTi(t,e){return qe.IsLiteral(e)&&e.const===t.const?_t.True:Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsString(e)?jTr(t,e):qe.IsNumber(e)?GTr(t,e):qe.IsInteger(e)?QTr(t,e):qe.IsBoolean(e)?UTr(t,e):_t.False}a(QTi,"FromLiteral");function qTr(t,e){return _t.False}a(qTr,"FromNeverRight");function qTi(t,e){return _t.True}a(qTi,"FromNever");function OTr(t){let[e,r]=[t,0];for(;qe.IsNot(e);)e=e.not,r+=1;return r%2===0?e:WI()}a(OTr,"UnwrapTNot");function GTi(t,e){return qe.IsNot(t)?Za(OTr(t),e):qe.IsNot(e)?Za(t,OTr(e)):fZ("Invalid fallthrough for Not")}a(GTi,"FromNot");function HTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsNull(e)?_t.True:_t.False}a(HTi,"FromNull");function GTr(t,e){return qe.IsLiteralNumber(t)||qe.IsNumber(t)||qe.IsInteger(t)?_t.True:_t.False}a(GTr,"FromNumberRight");function jTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsInteger(e)||qe.IsNumber(e)?_t.True:_t.False}a(jTi,"FromNumber");function _E(t,e){return Object.getOwnPropertyNames(t.properties).length===e}a(_E,"IsObjectPropertyCount");function BTr(t){return qDe(t)}a(BTr,"IsObjectStringLike");function LTr(t){return _E(t,0)||_E(t,1)&&"description"in t.properties&&qe.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(qe.IsString(t.properties.description.anyOf[0])&&qe.IsUndefined(t.properties.description.anyOf[1])||qe.IsString(t.properties.description.anyOf[1])&&qe.IsUndefined(t.properties.description.anyOf[0]))}a(LTr,"IsObjectSymbolLike");function Xmt(t){return _E(t,0)}a(Xmt,"IsObjectNumberLike");function FTr(t){return _E(t,0)}a(FTr,"IsObjectBooleanLike");function $Ti(t){return _E(t,0)}a($Ti,"IsObjectBigIntLike");function VTi(t){return _E(t,0)}a(VTi,"IsObjectDateLike");function WTi(t){return qDe(t)}a(WTi,"IsObjectUint8ArrayLike");function zTi(t){let e=Mb();return _E(t,0)||_E(t,1)&&"length"in t.properties&&Fb(Za(t.properties.length,e))===_t.True}a(zTi,"IsObjectFunctionLike");function YTi(t){return _E(t,0)}a(YTi,"IsObjectConstructorLike");function qDe(t){let e=Mb();return _E(t,0)||_E(t,1)&&"length"in t.properties&&Fb(Za(t.properties.length,e))===_t.True}a(qDe,"IsObjectArrayLike");function KTi(t){let e=Q2([mL()],mL());return _E(t,0)||_E(t,1)&&"then"in t.properties&&Fb(Za(t.properties.then,e))===_t.True}a(KTi,"IsObjectPromiseLike");function HTr(t,e){return Za(t,e)===_t.False||qe.IsOptional(t)&&!qe.IsOptional(e)?_t.False:_t.True}a(HTr,"Property");function _g(t,e){return qe.IsUnknown(t)?_t.False:qe.IsAny(t)?_t.Union:qe.IsNever(t)||qe.IsLiteralString(t)&&BTr(e)||qe.IsLiteralNumber(t)&&Xmt(e)||qe.IsLiteralBoolean(t)&&FTr(e)||qe.IsSymbol(t)&<r(e)||qe.IsBigInt(t)&&$Ti(e)||qe.IsString(t)&&BTr(e)||qe.IsSymbol(t)&<r(e)||qe.IsNumber(t)&&Xmt(e)||qe.IsInteger(t)&&Xmt(e)||qe.IsBoolean(t)&&FTr(e)||qe.IsUint8Array(t)&&WTi(e)||qe.IsDate(t)&&VTi(e)||qe.IsConstructor(t)&&YTi(e)||qe.IsFunction(t)&&zTi(e)?_t.True:qe.IsRecord(t)&&qe.IsString(egt(t))?e[Db]==="Record"?_t.True:_t.False:qe.IsRecord(t)&&qe.IsNumber(egt(t))&&_E(e,0)?_t.True:_t.False}a(_g,"FromObjectRight");function JTi(t,e){return Vf(e)?Wf(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsObject(e)?(()=>{for(let r of Object.getOwnPropertyNames(e.properties)){if(!(r in t.properties)&&!qe.IsOptional(e.properties[r]))return _t.False;if(qe.IsOptional(e.properties[r]))return _t.True;if(HTr(t.properties[r],e.properties[r])===_t.False)return _t.False}return _t.True})():_t.False}a(JTi,"FromObject");function XTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)&&KTi(e)?_t.True:qe.IsPromise(e)?Fb(Za(t.item,e.item)):_t.False}a(XTi,"FromPromise");function egt(t){return pL in t.patternProperties?Mb():hL in t.patternProperties?GA():fZ("Unknown record key pattern")}a(egt,"RecordKey");function tgt(t){return pL in t.patternProperties?t.patternProperties[pL]:hL in t.patternProperties?t.patternProperties[hL]:fZ("Unable to get record value schema")}a(tgt,"RecordValue");function Ub(t,e){let[r,n]=[egt(e),tgt(e)];return qe.IsLiteralString(t)&&qe.IsNumber(r)&&Fb(Za(t,n))===_t.True?_t.True:qe.IsUint8Array(t)&&qe.IsNumber(r)||qe.IsString(t)&&qe.IsNumber(r)||qe.IsArray(t)&&qe.IsNumber(r)?Za(t,n):qe.IsObject(t)?(()=>{for(let o of Object.getOwnPropertyNames(t.properties))if(HTr(n,t.properties[o])===_t.False)return _t.False;return _t.True})():_t.False}a(Ub,"FromRecordRight");function ZTi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Za(tgt(t),tgt(e)):_t.False}a(ZTi,"FromRecord");function eSi(t,e){let r=qe.IsRegExp(t)?GA():t,n=qe.IsRegExp(e)?GA():e;return Za(r,n)}a(eSi,"FromRegExp");function jTr(t,e){return qe.IsLiteral(t)&&yg.IsString(t.const)||qe.IsString(t)?_t.True:_t.False}a(jTr,"FromStringRight");function tSi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsString(e)?_t.True:_t.False}a(tSi,"FromString");function rSi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsSymbol(e)?_t.True:_t.False}a(rSi,"FromSymbol");function nSi(t,e){return qe.IsTemplateLiteral(t)?Za(jq(t),e):qe.IsTemplateLiteral(e)?Za(t,jq(e)):fZ("Invalid fallthrough for TemplateLiteral")}a(nSi,"FromTemplateLiteral");function iSi(t,e){return qe.IsArray(e)&&t.items!==void 0&&t.items.every(r=>Za(r,e.items)===_t.True)}a(iSi,"IsArrayOfTuple");function oSi(t,e){return qe.IsNever(t)?_t.True:qe.IsUnknown(t)?_t.False:qe.IsAny(t)?_t.Union:_t.False}a(oSi,"FromTupleRight");function sSi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)&&qDe(e)||qe.IsArray(e)&&iSi(t,e)?_t.True:qe.IsTuple(e)?yg.IsUndefined(t.items)&&!yg.IsUndefined(e.items)||!yg.IsUndefined(t.items)&&yg.IsUndefined(e.items)?_t.False:yg.IsUndefined(t.items)&&!yg.IsUndefined(e.items)||t.items.every((r,n)=>Za(r,e.items[n])===_t.True)?_t.True:_t.False:_t.False}a(sSi,"FromTuple");function aSi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsUint8Array(e)?_t.True:_t.False}a(aSi,"FromUint8Array");function cSi(t,e){return Vf(e)?Wf(t,e):qe.IsObject(e)?_g(t,e):qe.IsRecord(e)?Ub(t,e):qe.IsVoid(e)?dSi(t,e):qe.IsUndefined(e)?_t.True:_t.False}a(cSi,"FromUndefined");function ngt(t,e){return e.anyOf.some(r=>Za(t,r)===_t.True)?_t.True:_t.False}a(ngt,"FromUnionRight");function lSi(t,e){return t.anyOf.every(r=>Za(r,e)===_t.True)?_t.True:_t.False}a(lSi,"FromUnion");function $Tr(t,e){return _t.True}a($Tr,"FromUnknownRight");function uSi(t,e){return qe.IsNever(e)?qTr(t,e):qe.IsIntersect(e)?QDe(t,e):qe.IsUnion(e)?ngt(t,e):qe.IsAny(e)?rgt(t,e):qe.IsString(e)?jTr(t,e):qe.IsNumber(e)?GTr(t,e):qe.IsInteger(e)?QTr(t,e):qe.IsBoolean(e)?UTr(t,e):qe.IsArray(e)?RTi(t,e):qe.IsTuple(e)?oSi(t,e):qe.IsObject(e)?_g(t,e):qe.IsUnknown(e)?_t.True:_t.False}a(uSi,"FromUnknown");function dSi(t,e){return qe.IsUndefined(t)||qe.IsUndefined(t)?_t.True:_t.False}a(dSi,"FromVoidRight");function fSi(t,e){return qe.IsIntersect(e)?QDe(t,e):qe.IsUnion(e)?ngt(t,e):qe.IsUnknown(e)?$Tr(t,e):qe.IsAny(e)?rgt(t,e):qe.IsObject(e)?_g(t,e):qe.IsVoid(e)?_t.True:_t.False}a(fSi,"FromVoid");function Za(t,e){return qe.IsTemplateLiteral(t)||qe.IsTemplateLiteral(e)?nSi(t,e):qe.IsRegExp(t)||qe.IsRegExp(e)?eSi(t,e):qe.IsNot(t)||qe.IsNot(e)?GTi(t,e):qe.IsAny(t)?wTi(t,e):qe.IsArray(t)?PTi(t,e):qe.IsBigInt(t)?NTi(t,e):qe.IsBoolean(t)?DTi(t,e):qe.IsAsyncIterator(t)?kTi(t,e):qe.IsConstructor(t)?MTi(t,e):qe.IsDate(t)?OTi(t,e):qe.IsFunction(t)?BTi(t,e):qe.IsInteger(t)?LTi(t,e):qe.IsIntersect(t)?FTi(t,e):qe.IsIterator(t)?UTi(t,e):qe.IsLiteral(t)?QTi(t,e):qe.IsNever(t)?qTi(t,e):qe.IsNull(t)?HTi(t,e):qe.IsNumber(t)?jTi(t,e):qe.IsObject(t)?JTi(t,e):qe.IsRecord(t)?ZTi(t,e):qe.IsString(t)?tSi(t,e):qe.IsSymbol(t)?rSi(t,e):qe.IsTuple(t)?sSi(t,e):qe.IsPromise(t)?XTi(t,e):qe.IsUint8Array(t)?aSi(t,e):qe.IsUndefined(t)?cSi(t,e):qe.IsUnion(t)?lSi(t,e):qe.IsUnknown(t)?uSi(t,e):qe.IsVoid(t)?fSi(t,e):fZ(`Unknown left type operand '${t[mt]}'`)}a(Za,"Visit");function AL(t,e){return Za(t,e)}a(AL,"ExtendsCheck");f();f();f();function pSi(t,e,r,n,o){let s={};for(let c of globalThis.Object.getOwnPropertyNames(t))s[c]=pZ(t[c],e,r,n,kl(o));return s}a(pSi,"FromProperties");function hSi(t,e,r,n,o){return pSi(t.properties,e,r,n,o)}a(hSi,"FromMappedResult");function VTr(t,e,r,n,o){let s=hSi(t,e,r,n,o);return Js(s)}a(VTr,"ExtendsFromMappedResult");function mSi(t,e,r,n){let o=AL(t,e);return o===_t.Union?ga([r,n]):o===_t.True?r:n}a(mSi,"ExtendsResolve");function pZ(t,e,r,n,o){return Dl(t)?VTr(t,e,r,n,o):V_(t)?Et(WTr(t,e,r,n,o)):Et(mSi(t,e,r,n),o)}a(pZ,"Extends");function gSi(t,e,r,n,o){return{[t]:pZ(_s(t),e,r,n,kl(o))}}a(gSi,"FromPropertyKey");function ASi(t,e,r,n,o){return t.reduce((s,c)=>({...s,...gSi(c,e,r,n,o)}),{})}a(ASi,"FromPropertyKeys");function ySi(t,e,r,n,o){return ASi(t.keys,e,r,n,o)}a(ySi,"FromMappedKey");function WTr(t,e,r,n,o){let s=ySi(t,e,r,n,o);return Js(s)}a(WTr,"ExtendsFromMappedKey");f();function ESi(t){return t.allOf.every(e=>U5(e))}a(ESi,"Intersect");function CSi(t){return t.anyOf.some(e=>U5(e))}a(CSi,"Union");function _Si(t){return!U5(t.not)}a(_Si,"Not");function U5(t){return t[mt]==="Intersect"?ESi(t):t[mt]==="Union"?CSi(t):t[mt]==="Not"?_Si(t):t[mt]==="Undefined"}a(U5,"ExtendsUndefinedCheck");f();function zTr(t,e){return hZ(jq(t),e)}a(zTr,"ExcludeFromTemplateLiteral");function vSi(t,e){let r=t.filter(n=>AL(n,e)===_t.False);return r.length===1?r[0]:ga(r)}a(vSi,"ExcludeRest");function hZ(t,e,r={}){return W_(t)?Et(zTr(t,e),r):Dl(t)?Et(YTr(t,e),r):Et(Ls(t)?vSi(t.anyOf,e):AL(t,e)!==_t.False?Co():t,r)}a(hZ,"Exclude");function bSi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=hZ(t[n],e);return r}a(bSi,"FromProperties");function TSi(t,e){return bSi(t.properties,e)}a(TSi,"FromMappedResult");function YTr(t,e){let r=TSi(t,e);return Js(r)}a(YTr,"ExcludeFromMappedResult");f();f();f();function KTr(t,e){return mZ(jq(t),e)}a(KTr,"ExtractFromTemplateLiteral");function SSi(t,e){let r=t.filter(n=>AL(n,e)!==_t.False);return r.length===1?r[0]:ga(r)}a(SSi,"ExtractRest");function mZ(t,e,r){return W_(t)?Et(KTr(t,e),r):Dl(t)?Et(JTr(t,e),r):Et(Ls(t)?SSi(t.anyOf,e):AL(t,e)!==_t.False?t:Co(),r)}a(mZ,"Extract");function ISi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=mZ(t[n],e);return r}a(ISi,"FromProperties");function xSi(t,e){return ISi(t.properties,e)}a(xSi,"FromMappedResult");function JTr(t,e){let r=xSi(t,e);return Js(r)}a(JTr,"ExtractFromMappedResult");f();function XTr(t,e){return GI(t)?Et(t.returns,e):Co(e)}a(XTr,"InstanceType");f();f();function GDe(t){return EE(Eg(t))}a(GDe,"ReadonlyOptional");f();function $q(t,e,r){return Et({[mt]:"Record",type:"object",patternProperties:{[t]:e}},r)}a($q,"RecordCreateFromPattern");function igt(t,e,r){let n={};for(let o of t)n[o]=e;return Aa(n,{...r,[Db]:"Record"})}a(igt,"RecordCreateFromKeys");function wSi(t,e,r){return wDe(t)?igt(yE(t),e,r):$q(t.pattern,e,r)}a(wSi,"FromTemplateLiteralKey");function RSi(t,e,r){return igt(yE(ga(t)),e,r)}a(RSi,"FromUnionKey");function PSi(t,e,r){return igt([t.toString()],e,r)}a(PSi,"FromLiteralKey");function kSi(t,e,r){return $q(t.source,e,r)}a(kSi,"FromRegExpKey");function NSi(t,e,r){let n=lf(t.pattern)?hL:t.pattern;return $q(n,e,r)}a(NSi,"FromStringKey");function DSi(t,e,r){return $q(hL,e,r)}a(DSi,"FromAnyKey");function MSi(t,e,r){return $q(aTr,e,r)}a(MSi,"FromNeverKey");function OSi(t,e,r){return Aa({true:e,false:e},r)}a(OSi,"FromBooleanKey");function BSi(t,e,r){return $q(pL,e,r)}a(BSi,"FromIntegerKey");function LSi(t,e,r){return $q(pL,e,r)}a(LSi,"FromNumberKey");function HDe(t,e,r={}){return Ls(t)?RSi(t.anyOf,e,r):W_(t)?wSi(t,e,r):$_(t)?PSi(t.const,e,r):D5(t)?OSi(t,e,r):jI(t)?BSi(t,e,r):$I(t)?LSi(t,e,r):Lmt(t)?kSi(t,e,r):M5(t)?NSi(t,e,r):Omt(t)?DSi(t,e,r):dL(t)?MSi(t,e,r):Co(r)}a(HDe,"Record");function jDe(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}a(jDe,"RecordPattern");function ZTr(t){let e=jDe(t);return e===hL?GA():e===pL?Mb():GA({pattern:e})}a(ZTr,"RecordKey");function $De(t){return t.patternProperties[jDe(t)]}a($De,"RecordValue");function FSi(t,e){return e.parameters=Hpe(t,e.parameters),e.returns=zI(t,e.returns),e}a(FSi,"FromConstructor");function USi(t,e){return e.parameters=Hpe(t,e.parameters),e.returns=zI(t,e.returns),e}a(USi,"FromFunction");function QSi(t,e){return e.allOf=Hpe(t,e.allOf),e}a(QSi,"FromIntersect");function qSi(t,e){return e.anyOf=Hpe(t,e.anyOf),e}a(qSi,"FromUnion");function GSi(t,e){return lf(e.items)||(e.items=Hpe(t,e.items)),e}a(GSi,"FromTuple");function HSi(t,e){return e.items=zI(t,e.items),e}a(HSi,"FromArray");function jSi(t,e){return e.items=zI(t,e.items),e}a(jSi,"FromAsyncIterator");function $Si(t,e){return e.items=zI(t,e.items),e}a($Si,"FromIterator");function VSi(t,e){return e.item=zI(t,e.item),e}a(VSi,"FromPromise");function WSi(t,e){let r=JSi(t,e.properties);return{...e,...Aa(r)}}a(WSi,"FromObject");function zSi(t,e){let r=zI(t,ZTr(e)),n=zI(t,$De(e)),o=HDe(r,n);return{...e,...o}}a(zSi,"FromRecord");function YSi(t,e){return e.index in t?t[e.index]:WI()}a(YSi,"FromArgument");function KSi(t,e){let r=ZX(e),n=AE(e),o=zI(t,e);return r&&n?GDe(o):r&&!n?EE(o):!r&&n?Eg(o):o}a(KSi,"FromProperty");function JSi(t,e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:KSi(t,e[n])}),{})}a(JSi,"FromProperties");function Hpe(t,e){return e.map(r=>zI(t,r))}a(Hpe,"FromTypes");function zI(t,e){return GI(e)?FSi(t,e):HI(e)?USi(t,e):zu(e)?QSi(t,e):Ls(e)?qSi(t,e):z_(e)?GSi(t,e):QI(e)?HSi(t,e):Fq(e)?jSi(t,e):Qq(e)?$Si(t,e):qq(e)?VSi(t,e):uf(e)?WSi(t,e):Gq(e)?zSi(t,e):Bmt(e)?YSi(t,e):e}a(zI,"FromType");function eSr(t,e){return zI(e,JX(t))}a(eSr,"Instantiate");f();function tSr(t){return Et({[mt]:"Integer",type:"integer"},t)}a(tSr,"Integer");f();f();f();function XSi(t,e,r){return{[t]:YI(_s(t),e,kl(r))}}a(XSi,"MappedIntrinsicPropertyKey");function ZSi(t,e,r){return t.reduce((o,s)=>({...o,...XSi(s,e,r)}),{})}a(ZSi,"MappedIntrinsicPropertyKeys");function eIi(t,e,r){return ZSi(t.keys,e,r)}a(eIi,"MappedIntrinsicProperties");function rSr(t,e,r){let n=eIi(t,e,r);return Js(n)}a(rSr,"IntrinsicFromMappedKey");function tIi(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),r].join("")}a(tIi,"ApplyUncapitalize");function rIi(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),r].join("")}a(rIi,"ApplyCapitalize");function nIi(t){return t.toUpperCase()}a(nIi,"ApplyUppercase");function iIi(t){return t.toLowerCase()}a(iIi,"ApplyLowercase");function oIi(t,e,r){let n=sZ(t.pattern);if(!Hq(n))return{...t,pattern:nSr(t.pattern,e)};let c=[...Upe(n)].map(d=>_s(d)),l=iSr(c,e),u=ga(l);return PDe([u],r)}a(oIi,"FromTemplateLiteral");function nSr(t,e){return typeof t=="string"?e==="Uncapitalize"?tIi(t):e==="Capitalize"?rIi(t):e==="Uppercase"?nIi(t):e==="Lowercase"?iIi(t):t:t.toString()}a(nSr,"FromLiteralValue");function iSr(t,e){return t.map(r=>YI(r,e))}a(iSr,"FromRest");function YI(t,e,r={}){return V_(t)?rSr(t,e,r):W_(t)?oIi(t,e,r):Ls(t)?ga(iSr(t.anyOf,e),r):$_(t)?_s(nSr(t.const,e),r):Et(t,r)}a(YI,"Intrinsic");function oSr(t,e={}){return YI(t,"Capitalize",e)}a(oSr,"Capitalize");f();function sSr(t,e={}){return YI(t,"Lowercase",e)}a(sSr,"Lowercase");f();function aSr(t,e={}){return YI(t,"Uncapitalize",e)}a(aSr,"Uncapitalize");f();function cSr(t,e={}){return YI(t,"Uppercase",e)}a(cSr,"Uppercase");f();f();f();f();f();function sIi(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=yL(t[o],e,kl(r));return n}a(sIi,"FromProperties");function aIi(t,e,r){return sIi(t.properties,e,r)}a(aIi,"FromMappedResult");function lSr(t,e,r){let n=aIi(t,e,r);return Js(n)}a(lSr,"OmitFromMappedResult");function cIi(t,e){return t.map(r=>ogt(r,e))}a(cIi,"FromIntersect");function lIi(t,e){return t.map(r=>ogt(r,e))}a(lIi,"FromUnion");function uIi(t,e){let{[e]:r,...n}=t;return n}a(uIi,"FromProperty");function dIi(t,e){return e.reduce((r,n)=>uIi(r,n),t)}a(dIi,"FromProperties");function fIi(t,e){let r=Yu(t,[Au,"$id","required","properties"]),n=dIi(t.properties,e);return Aa(n,r)}a(fIi,"FromObject");function pIi(t){let e=t.reduce((r,n)=>SDe(n)?[...r,_s(n)]:r,[]);return ga(e)}a(pIi,"UnionFromPropertyKeys");function ogt(t,e){return zu(t)?Cg(cIi(t.allOf,e)):Ls(t)?ga(lIi(t.anyOf,e)):uf(t)?fIi(t,e):Aa({})}a(ogt,"OmitResolve");function yL(t,e,r){let n=cf(e)?pIi(e):e,o=yu(e)?yE(e):e,s=vd(t),c=vd(e);return Dl(t)?lSr(t,o,r):V_(e)?uSr(t,e,r):s&&c?tl("Omit",[t,n],r):!s&&c?tl("Omit",[t,n],r):s&&!c?tl("Omit",[t,n],r):Et({...ogt(t,o),...r})}a(yL,"Omit");function hIi(t,e,r){return{[e]:yL(t,[e],kl(r))}}a(hIi,"FromPropertyKey");function mIi(t,e,r){return e.reduce((n,o)=>({...n,...hIi(t,o,r)}),{})}a(mIi,"FromPropertyKeys");function gIi(t,e,r){return mIi(t,e.keys,r)}a(gIi,"FromMappedKey");function uSr(t,e,r){let n=gIi(t,e,r);return Js(n)}a(uSr,"OmitFromMappedKey");f();f();f();function AIi(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=EL(t[o],e,kl(r));return n}a(AIi,"FromProperties");function yIi(t,e,r){return AIi(t.properties,e,r)}a(yIi,"FromMappedResult");function dSr(t,e,r){let n=yIi(t,e,r);return Js(n)}a(dSr,"PickFromMappedResult");function EIi(t,e){return t.map(r=>sgt(r,e))}a(EIi,"FromIntersect");function CIi(t,e){return t.map(r=>sgt(r,e))}a(CIi,"FromUnion");function _Ii(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}a(_Ii,"FromProperties");function vIi(t,e){let r=Yu(t,[Au,"$id","required","properties"]),n=_Ii(t.properties,e);return Aa(n,r)}a(vIi,"FromObject");function bIi(t){let e=t.reduce((r,n)=>SDe(n)?[...r,_s(n)]:r,[]);return ga(e)}a(bIi,"UnionFromPropertyKeys");function sgt(t,e){return zu(t)?Cg(EIi(t.allOf,e)):Ls(t)?ga(CIi(t.anyOf,e)):uf(t)?vIi(t,e):Aa({})}a(sgt,"PickResolve");function EL(t,e,r){let n=cf(e)?bIi(e):e,o=yu(e)?yE(e):e,s=vd(t),c=vd(e);return Dl(t)?dSr(t,o,r):V_(e)?fSr(t,e,r):s&&c?tl("Pick",[t,n],r):!s&&c?tl("Pick",[t,n],r):s&&!c?tl("Pick",[t,n],r):Et({...sgt(t,o),...r})}a(EL,"Pick");function TIi(t,e,r){return{[e]:EL(t,[e],kl(r))}}a(TIi,"FromPropertyKey");function SIi(t,e,r){return e.reduce((n,o)=>({...n,...TIi(t,o,r)}),{})}a(SIi,"FromPropertyKeys");function IIi(t,e,r){return SIi(t,e.keys,r)}a(IIi,"FromMappedKey");function fSr(t,e,r){let n=IIi(t,e,r);return Js(n)}a(fSr,"PickFromMappedKey");f();f();function xIi(t,e){return tl("Partial",[tl(t,e)])}a(xIi,"FromComputed");function wIi(t){return tl("Partial",[Lb(t)])}a(wIi,"FromRef");function RIi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=Eg(t[r]);return e}a(RIi,"FromProperties");function PIi(t){let e=Yu(t,[Au,"$id","required","properties"]),r=RIi(t.properties);return Aa(r,e)}a(PIi,"FromObject");function pSr(t){return t.map(e=>hSr(e))}a(pSr,"FromRest");function hSr(t){return qI(t)?xIi(t.target,t.parameters):vd(t)?wIi(t.$ref):zu(t)?Cg(pSr(t.allOf)):Ls(t)?ga(pSr(t.anyOf)):uf(t)?PIi(t):Uq(t)||D5(t)||jI(t)||$_(t)||Npe(t)||$I(t)||M5(t)||Dpe(t)||O5(t)?t:Aa({})}a(hSr,"PartialResolve");function gZ(t,e){return Dl(t)?mSr(t,e):Et({...hSr(t),...e})}a(gZ,"Partial");function kIi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=gZ(t[n],kl(e));return r}a(kIi,"FromProperties");function NIi(t,e){return kIi(t.properties,e)}a(NIi,"FromMappedResult");function mSr(t,e){let r=NIi(t,e);return Js(r)}a(mSr,"PartialFromMappedResult");f();f();function DIi(t,e){return tl("Required",[tl(t,e)])}a(DIi,"FromComputed");function MIi(t){return tl("Required",[Lb(t)])}a(MIi,"FromRef");function OIi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=Yu(t[r],[nm]);return e}a(OIi,"FromProperties");function BIi(t){let e=Yu(t,[Au,"$id","required","properties"]),r=OIi(t.properties);return Aa(r,e)}a(BIi,"FromObject");function gSr(t){return t.map(e=>ASr(e))}a(gSr,"FromRest");function ASr(t){return qI(t)?DIi(t.target,t.parameters):vd(t)?MIi(t.$ref):zu(t)?Cg(gSr(t.allOf)):Ls(t)?ga(gSr(t.anyOf)):uf(t)?BIi(t):Uq(t)||D5(t)||jI(t)||$_(t)||Npe(t)||$I(t)||M5(t)||Dpe(t)||O5(t)?t:Aa({})}a(ASr,"RequiredResolve");function AZ(t,e){return Dl(t)?ySr(t,e):Et({...ASr(t),...e})}a(AZ,"Required");function LIi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=AZ(t[n],e);return r}a(LIi,"FromProperties");function FIi(t,e){return LIi(t.properties,e)}a(FIi,"FromMappedResult");function ySr(t,e){let r=FIi(t,e);return Js(r)}a(ySr,"RequiredFromMappedResult");function UIi(t,e){return e.map(r=>vd(r)?agt(t,r.$ref):Y_(t,r))}a(UIi,"DereferenceParameters");function agt(t,e){return e in t?vd(t[e])?agt(t,t[e].$ref):Y_(t,t[e]):Co()}a(agt,"Dereference");function QIi(t){return uZ(t[0])}a(QIi,"FromAwaited");function qIi(t){return gL(t[0],t[1])}a(qIi,"FromIndex");function GIi(t){return dZ(t[0])}a(GIi,"FromKeyOf");function HIi(t){return gZ(t[0])}a(HIi,"FromPartial");function jIi(t){return yL(t[0],t[1])}a(jIi,"FromOmit");function $Ii(t){return EL(t[0],t[1])}a($Ii,"FromPick");function VIi(t){return AZ(t[0])}a(VIi,"FromRequired");function WIi(t,e,r){let n=UIi(t,r);return e==="Awaited"?QIi(n):e==="Index"?qIi(n):e==="KeyOf"?GIi(n):e==="Partial"?HIi(n):e==="Omit"?jIi(n):e==="Pick"?$Ii(n):e==="Required"?VIi(n):Co()}a(WIi,"FromComputed");function zIi(t,e){return rZ(Y_(t,e))}a(zIi,"FromArray");function YIi(t,e){return nZ(Y_(t,e))}a(YIi,"FromAsyncIterator");function KIi(t,e,r){return iZ(jpe(t,e),Y_(t,r))}a(KIi,"FromConstructor");function JIi(t,e,r){return Q2(jpe(t,e),Y_(t,r))}a(JIi,"FromFunction");function XIi(t,e){return Cg(jpe(t,e))}a(XIi,"FromIntersect");function ZIi(t,e){return lZ(Y_(t,e))}a(ZIi,"FromIterator");function exi(t,e){return Aa(globalThis.Object.keys(e).reduce((r,n)=>({...r,[n]:Y_(t,e[n])}),{}))}a(exi,"FromObject");function txi(t,e){let[r,n]=[Y_(t,$De(e)),jDe(e)],o=JX(e);return o.patternProperties[n]=r,o}a(txi,"FromRecord");function rxi(t,e){return vd(e)?{...agt(t,e.$ref),[Au]:e[Au]}:e}a(rxi,"FromTransform");function nxi(t,e){return Ob(jpe(t,e))}a(nxi,"FromTuple");function ixi(t,e){return ga(jpe(t,e))}a(ixi,"FromUnion");function jpe(t,e){return e.map(r=>Y_(t,r))}a(jpe,"FromTypes");function Y_(t,e){return AE(e)?Et(Y_(t,Yu(e,[nm])),e):ZX(e)?Et(Y_(t,Yu(e,[UI])),e):ma(e)?Et(rxi(t,e),e):QI(e)?Et(zIi(t,e.items),e):Fq(e)?Et(YIi(t,e.items),e):qI(e)?Et(WIi(t,e.target,e.parameters)):GI(e)?Et(KIi(t,e.parameters,e.returns),e):HI(e)?Et(JIi(t,e.parameters,e.returns),e):zu(e)?Et(XIi(t,e.allOf),e):Qq(e)?Et(ZIi(t,e.items),e):uf(e)?Et(exi(t,e.properties),e):Gq(e)?Et(txi(t,e)):z_(e)?Et(nxi(t,e.items||[]),e):Ls(e)?Et(ixi(t,e.anyOf),e):e}a(Y_,"FromType");function oxi(t,e){return e in t?Y_(t,t[e]):Co()}a(oxi,"ComputeType");function ESr(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,r)=>({...e,[r]:oxi(t,r)}),{})}a(ESr,"ComputeModuleProperties");var cgt=class{static{a(this,"TModule")}constructor(e){let r=ESr(e),n=this.WithIdentifiers(r);this.$defs=n}Import(e,r){let n={...this.$defs,[e]:Et(this.$defs[e],r)};return Et({[mt]:"Import",$defs:n,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:{...e[n],$id:n}}),{})}};function CSr(t){return new cgt(t)}a(CSr,"Module");f();function _Sr(t,e){return Et({[mt]:"Not",not:t},e)}a(_Sr,"Not");f();function vSr(t,e){return HI(t)?Ob(t.parameters,e):Co()}a(vSr,"Parameters");f();var sxi=0;function bSr(t,e={}){lf(e.$id)&&(e.$id=`T${sxi++}`);let r=JX(t({[mt]:"This",$ref:`${e.$id}`}));return r.$id=e.$id,Et({[Db]:"Recursive",...r},e)}a(bSr,"Recursive");f();function TSr(t,e){let r=Fc(t)?new globalThis.RegExp(t):t;return Et({[mt]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},e)}a(TSr,"RegExp");f();function axi(t){return zu(t)?t.allOf:Ls(t)?t.anyOf:z_(t)?t.items??[]:[]}a(axi,"RestResolve");function SSr(t){return axi(t)}a(SSr,"Rest");f();function ISr(t,e){return HI(t)?Et(t.returns,e):Co(e)}a(ISr,"ReturnType");f();var lgt=class{static{a(this,"TransformDecodeBuilder")}constructor(e){this.schema=e}Decode(e){return new ugt(this.schema,e)}},ugt=class{static{a(this,"TransformEncodeBuilder")}constructor(e,r){this.schema=e,this.decode=r}EncodeTransform(e,r){let s={Encode:a(c=>r[Au].Encode(e(c)),"Encode"),Decode:a(c=>this.decode(r[Au].Decode(c)),"Decode")};return{...r,[Au]:s}}EncodeSchema(e,r){let n={Decode:this.decode,Encode:e};return{...r,[Au]:n}}Encode(e){return ma(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};function xSr(t){return new lgt(t)}a(xSr,"Transform");f();function wSr(t={}){return Et({[mt]:t[mt]??"Unsafe"},t)}a(wSr,"Unsafe");f();function RSr(t){return Et({[mt]:"Void",type:"void"},t)}a(RSr,"Void");f();var dgt={};Ri(dgt,{Any:()=>mL,Argument:()=>fTr,Array:()=>rZ,AsyncIterator:()=>nZ,Awaited:()=>uZ,BigInt:()=>cZ,Boolean:()=>RDe,Capitalize:()=>oSr,Composite:()=>kTr,Const:()=>NTr,Constructor:()=>iZ,ConstructorParameters:()=>DTr,Date:()=>MDe,Enum:()=>MTr,Exclude:()=>hZ,Extends:()=>pZ,Extract:()=>mZ,Function:()=>Q2,Index:()=>gL,InstanceType:()=>XTr,Instantiate:()=>eSr,Integer:()=>tSr,Intersect:()=>Cg,Iterator:()=>lZ,KeyOf:()=>dZ,Literal:()=>_s,Lowercase:()=>sSr,Mapped:()=>STr,Module:()=>CSr,Never:()=>Co,Not:()=>_Sr,Null:()=>ODe,Number:()=>Mb,Object:()=>Aa,Omit:()=>yL,Optional:()=>Eg,Parameters:()=>vSr,Partial:()=>gZ,Pick:()=>EL,Promise:()=>NDe,Readonly:()=>EE,ReadonlyOptional:()=>GDe,Record:()=>HDe,Recursive:()=>bSr,Ref:()=>Lb,RegExp:()=>TSr,Required:()=>AZ,Rest:()=>SSr,ReturnType:()=>ISr,String:()=>GA,Symbol:()=>BDe,TemplateLiteral:()=>PDe,Transform:()=>xSr,Tuple:()=>Ob,Uint8Array:()=>FDe,Uncapitalize:()=>aSr,Undefined:()=>LDe,Union:()=>ga,Unknown:()=>WI,Unsafe:()=>wSr,Uppercase:()=>cSr,Void:()=>RSr});f();var S=dgt;f();f();function cxi(t){switch(t.errorType){case ht.ArrayContains:return"Expected array to contain at least one matching value";case ht.ArrayMaxContains:return`Expected array to contain no more than ${t.schema.maxContains} matching values`;case ht.ArrayMinContains:return`Expected array to contain at least ${t.schema.minContains} matching values`;case ht.ArrayMaxItems:return`Expected array length to be less or equal to ${t.schema.maxItems}`;case ht.ArrayMinItems:return`Expected array length to be greater or equal to ${t.schema.minItems}`;case ht.ArrayUniqueItems:return"Expected array elements to be unique";case ht.Array:return"Expected array";case ht.AsyncIterator:return"Expected AsyncIterator";case ht.BigIntExclusiveMaximum:return`Expected bigint to be less than ${t.schema.exclusiveMaximum}`;case ht.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${t.schema.exclusiveMinimum}`;case ht.BigIntMaximum:return`Expected bigint to be less or equal to ${t.schema.maximum}`;case ht.BigIntMinimum:return`Expected bigint to be greater or equal to ${t.schema.minimum}`;case ht.BigIntMultipleOf:return`Expected bigint to be a multiple of ${t.schema.multipleOf}`;case ht.BigInt:return"Expected bigint";case ht.Boolean:return"Expected boolean";case ht.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${t.schema.exclusiveMinimumTimestamp}`;case ht.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${t.schema.exclusiveMaximumTimestamp}`;case ht.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${t.schema.minimumTimestamp}`;case ht.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${t.schema.maximumTimestamp}`;case ht.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${t.schema.multipleOfTimestamp}`;case ht.Date:return"Expected Date";case ht.Function:return"Expected function";case ht.IntegerExclusiveMaximum:return`Expected integer to be less than ${t.schema.exclusiveMaximum}`;case ht.IntegerExclusiveMinimum:return`Expected integer to be greater than ${t.schema.exclusiveMinimum}`;case ht.IntegerMaximum:return`Expected integer to be less or equal to ${t.schema.maximum}`;case ht.IntegerMinimum:return`Expected integer to be greater or equal to ${t.schema.minimum}`;case ht.IntegerMultipleOf:return`Expected integer to be a multiple of ${t.schema.multipleOf}`;case ht.Integer:return"Expected integer";case ht.IntersectUnevaluatedProperties:return"Unexpected property";case ht.Intersect:return"Expected all values to match";case ht.Iterator:return"Expected Iterator";case ht.Literal:return`Expected ${typeof t.schema.const=="string"?`'${t.schema.const}'`:t.schema.const}`;case ht.Never:return"Never";case ht.Not:return"Value should not match";case ht.Null:return"Expected null";case ht.NumberExclusiveMaximum:return`Expected number to be less than ${t.schema.exclusiveMaximum}`;case ht.NumberExclusiveMinimum:return`Expected number to be greater than ${t.schema.exclusiveMinimum}`;case ht.NumberMaximum:return`Expected number to be less or equal to ${t.schema.maximum}`;case ht.NumberMinimum:return`Expected number to be greater or equal to ${t.schema.minimum}`;case ht.NumberMultipleOf:return`Expected number to be a multiple of ${t.schema.multipleOf}`;case ht.Number:return"Expected number";case ht.Object:return"Expected object";case ht.ObjectAdditionalProperties:return"Unexpected property";case ht.ObjectMaxProperties:return`Expected object to have no more than ${t.schema.maxProperties} properties`;case ht.ObjectMinProperties:return`Expected object to have at least ${t.schema.minProperties} properties`;case ht.ObjectRequiredProperty:return"Expected required property";case ht.Promise:return"Expected Promise";case ht.RegExp:return"Expected string to match regular expression";case ht.StringFormatUnknown:return`Unknown format '${t.schema.format}'`;case ht.StringFormat:return`Expected string to match '${t.schema.format}' format`;case ht.StringMaxLength:return`Expected string length less or equal to ${t.schema.maxLength}`;case ht.StringMinLength:return`Expected string length greater or equal to ${t.schema.minLength}`;case ht.StringPattern:return`Expected string to match '${t.schema.pattern}'`;case ht.String:return"Expected string";case ht.Symbol:return"Expected symbol";case ht.TupleLength:return`Expected tuple to have ${t.schema.maxItems||0} elements`;case ht.Tuple:return"Expected tuple";case ht.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${t.schema.maxByteLength}`;case ht.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${t.schema.minByteLength}`;case ht.Uint8Array:return"Expected Uint8Array";case ht.Undefined:return"Expected undefined";case ht.Union:return"Expected union value";case ht.Void:return"Expected void";case ht.Kind:return`Expected kind '${t.schema[mt]}'`;default:return"Unknown error type"}}a(cxi,"DefaultErrorFunction");var lxi=cxi;function PSr(){return lxi}a(PSr,"GetErrorFunction");f();var fgt=class extends fi{static{a(this,"TypeDereferenceError")}constructor(e){super(`Unable to dereference schema with $id '${e.$ref}'`),this.schema=e}};function uxi(t,e){let r=e.find(n=>n.$id===t.$ref);if(r===void 0)throw new fgt(t);return Fs(r,e)}a(uxi,"Resolve");function Vp(t,e){return!Bs(t.$id)||e.some(r=>r.$id===t.$id)||e.push(t),e}a(Vp,"Pushref");function Fs(t,e){return t[mt]==="This"||t[mt]==="Ref"?uxi(t,e):t}a(Fs,"Deref");f();var pgt=class extends fi{static{a(this,"ValueHashError")}constructor(e){super("Unable to hash value"),this.value=e}},K_;(function(t){t[t.Undefined=0]="Undefined",t[t.Null=1]="Null",t[t.Boolean=2]="Boolean",t[t.Number=3]="Number",t[t.String=4]="String",t[t.Object=5]="Object",t[t.Array=6]="Array",t[t.Date=7]="Date",t[t.Uint8Array=8]="Uint8Array",t[t.Symbol=9]="Symbol",t[t.BigInt=10]="BigInt"})(K_||(K_={}));var yZ=BigInt("14695981039346656037"),[dxi,fxi]=[BigInt("1099511628211"),BigInt("18446744073709551616")],pxi=Array.from({length:256}).map((t,e)=>BigInt(e)),kSr=new Float64Array(1),NSr=new DataView(kSr.buffer),DSr=new Uint8Array(kSr.buffer);function*hxi(t){let e=t===0?1:Math.ceil(Math.floor(Math.log2(t)+1)/8);for(let r=0;r>8*(e-1-r)&255}a(hxi,"NumberToBytes");function mxi(t){vg(K_.Array);for(let e of t)EZ(e)}a(mxi,"ArrayType");function gxi(t){vg(K_.Boolean),vg(t?1:0)}a(gxi,"BooleanType");function Axi(t){vg(K_.BigInt),NSr.setBigInt64(0,t);for(let e of DSr)vg(e)}a(Axi,"BigIntType");function yxi(t){vg(K_.Date),EZ(t.getTime())}a(yxi,"DateType");function Exi(t){vg(K_.Null)}a(Exi,"NullType");function Cxi(t){vg(K_.Number),NSr.setFloat64(0,t);for(let e of DSr)vg(e)}a(Cxi,"NumberType");function _xi(t){vg(K_.Object);for(let e of globalThis.Object.getOwnPropertyNames(t).sort())EZ(e),EZ(t[e])}a(_xi,"ObjectType");function vxi(t){vg(K_.String);for(let e=0;e=t.minItems)||as(t.maxItems)&&!(r.length<=t.maxItems)||!r.every(s=>Wp(t.items,e,s))||t.uniqueItems===!0&&!(function(){let s=new Set;for(let c of r){let l=CL(c);if(s.has(l))return!1;s.add(l)}return!0})())return!1;if(!(as(t.contains)||Ln(t.minContains)||Ln(t.maxContains)))return!0;let n=as(t.contains)?t.contains:Co(),o=r.reduce((s,c)=>Wp(n,e,c)?s+1:s,0);return!(o===0||Ln(t.minContains)&&ot.maxContains)}a(Rxi,"FromArray");function Pxi(t,e,r){return _De(r)}a(Pxi,"FromAsyncIterator");function kxi(t,e,r){return!(!rm(r)||as(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||as(t.maximum)&&!(r<=t.maximum)||as(t.minimum)&&!(r>=t.minimum)||as(t.multipleOf)&&r%t.multipleOf!==BigInt(0))}a(kxi,"FromBigInt");function Nxi(t,e,r){return U2(r)}a(Nxi,"FromBoolean");function Dxi(t,e,r){return Wp(t.returns,e,r.prototype)}a(Dxi,"FromConstructor");function Mxi(t,e,r){return!(!QA(r)||as(t.exclusiveMaximumTimestamp)&&!(r.getTime()t.exclusiveMinimumTimestamp)||as(t.maximumTimestamp)&&!(r.getTime()<=t.maximumTimestamp)||as(t.minimumTimestamp)&&!(r.getTime()>=t.minimumTimestamp)||as(t.multipleOfTimestamp)&&r.getTime()%t.multipleOfTimestamp!==0)}a(Mxi,"FromDate");function Oxi(t,e,r){return uL(r)}a(Oxi,"FromFunction");function Bxi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return Wp(o,[...e,...n],r)}a(Bxi,"FromImport");function Lxi(t,e,r){return!(!TDe(r)||as(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||as(t.maximum)&&!(r<=t.maximum)||as(t.minimum)&&!(r>=t.minimum)||as(t.multipleOf)&&r%t.multipleOf!==0)}a(Lxi,"FromInteger");function Fxi(t,e,r){let n=t.allOf.every(o=>Wp(o,e,r));if(t.unevaluatedProperties===!1){let o=new RegExp(F5(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c));return n&&s}else if(yu(t.unevaluatedProperties)){let o=new RegExp(F5(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c)||Wp(t.unevaluatedProperties,e,r[c]));return n&&s}else return n}a(Fxi,"FromIntersect");function Uxi(t,e,r){return vDe(r)}a(Uxi,"FromIterator");function Qxi(t,e,r){return r===t.const}a(Qxi,"FromLiteral");function qxi(t,e,r){return!1}a(qxi,"FromNever");function Gxi(t,e,r){return!Wp(t.not,e,r)}a(Gxi,"FromNot");function Hxi(t,e,r){return k5(r)}a(Hxi,"FromNull");function jxi(t,e,r){return!(!el.IsNumberLike(r)||as(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||as(t.minimum)&&!(r>=t.minimum)||as(t.maximum)&&!(r<=t.maximum)||as(t.multipleOf)&&r%t.multipleOf!==0)}a(jxi,"FromNumber");function $xi(t,e,r){if(!el.IsObjectLike(r)||as(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||as(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let n=Object.getOwnPropertyNames(t.properties);for(let o of n){let s=t.properties[o];if(t.required&&t.required.includes(o)){if(!Wp(s,e,r[o])||(U5(s)||Ixi(s))&&!(o in r))return!1}else if(el.IsExactOptionalProperty(r,o)&&!Wp(s,e,r[o]))return!1}if(t.additionalProperties===!1){let o=Object.getOwnPropertyNames(r);return t.required&&t.required.length===n.length&&o.length===n.length?!0:o.every(s=>n.includes(s))}else return typeof t.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||Wp(t.additionalProperties,e,r[s])):!0}a($xi,"FromObject");function Vxi(t,e,r){return bDe(r)}a(Vxi,"FromPromise");function Wxi(t,e,r){if(!el.IsRecordLike(r)||as(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||as(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let[n,o]=Object.entries(t.patternProperties)[0],s=new RegExp(n),c=Object.entries(r).every(([d,p])=>s.test(d)?Wp(o,e,p):!0),l=typeof t.additionalProperties=="object"?Object.entries(r).every(([d,p])=>s.test(d)?!0:Wp(t.additionalProperties,e,p)):!0,u=t.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return c&&l&&u}a(Wxi,"FromRecord");function zxi(t,e,r){return Wp(Fs(t,e),e,r)}a(zxi,"FromRef");function Yxi(t,e,r){let n=new RegExp(t.source,t.flags);return as(t.minLength)&&!(r.length>=t.minLength)||as(t.maxLength)&&!(r.length<=t.maxLength)?!1:n.test(r)}a(Yxi,"FromRegExp");function Kxi(t,e,r){return!Bs(r)||as(t.minLength)&&!(r.length>=t.minLength)||as(t.maxLength)&&!(r.length<=t.maxLength)||as(t.pattern)&&!new RegExp(t.pattern).test(r)?!1:as(t.format)?VI.Has(t.format)?VI.Get(t.format)(r):!1:!0}a(Kxi,"FromString");function Jxi(t,e,r){return N5(r)}a(Jxi,"FromSymbol");function Xxi(t,e,r){return Bs(r)&&new RegExp(t.pattern).test(r)}a(Xxi,"FromTemplateLiteral");function Zxi(t,e,r){return Wp(Fs(t,e),e,r)}a(Zxi,"FromThis");function ewi(t,e,r){if(!ti(r)||t.items===void 0&&r.length!==0||r.length!==t.maxItems)return!1;if(!t.items)return!0;for(let n=0;nWp(n,e,r))}a(rwi,"FromUnion");function nwi(t,e,r){return!(!XX(r)||as(t.maxByteLength)&&!(r.length<=t.maxByteLength)||as(t.minByteLength)&&!(r.length>=t.minByteLength))}a(nwi,"FromUint8Array");function iwi(t,e,r){return!0}a(iwi,"FromUnknown");function owi(t,e,r){return el.IsVoidLike(r)}a(owi,"FromVoid");function swi(t,e,r){return qA.Has(t[mt])?qA.Get(t[mt])(t,r):!1}a(swi,"FromKind");function Wp(t,e,r){let n=as(t.$id)?Vp(t,e):e,o=t;switch(o[mt]){case"Any":return xxi(o,n,r);case"Argument":return wxi(o,n,r);case"Array":return Rxi(o,n,r);case"AsyncIterator":return Pxi(o,n,r);case"BigInt":return kxi(o,n,r);case"Boolean":return Nxi(o,n,r);case"Constructor":return Dxi(o,n,r);case"Date":return Mxi(o,n,r);case"Function":return Oxi(o,n,r);case"Import":return Bxi(o,n,r);case"Integer":return Lxi(o,n,r);case"Intersect":return Fxi(o,n,r);case"Iterator":return Uxi(o,n,r);case"Literal":return Qxi(o,n,r);case"Never":return qxi(o,n,r);case"Not":return Gxi(o,n,r);case"Null":return Hxi(o,n,r);case"Number":return jxi(o,n,r);case"Object":return $xi(o,n,r);case"Promise":return Vxi(o,n,r);case"Record":return Wxi(o,n,r);case"Ref":return zxi(o,n,r);case"RegExp":return Yxi(o,n,r);case"String":return Kxi(o,n,r);case"Symbol":return Jxi(o,n,r);case"TemplateLiteral":return Xxi(o,n,r);case"This":return Zxi(o,n,r);case"Tuple":return ewi(o,n,r);case"Undefined":return twi(o,n,r);case"Union":return rwi(o,n,r);case"Uint8Array":return nwi(o,n,r);case"Unknown":return iwi(o,n,r);case"Void":return owi(o,n,r);default:if(!qA.Has(o[mt]))throw new hgt(o);return swi(o,n,r)}}a(Wp,"Visit");function _o(...t){return t.length===3?Wp(t[0],t[1],t[2]):Wp(t[0],[],t[1])}a(_o,"Check");var ht;(function(t){t[t.ArrayContains=0]="ArrayContains",t[t.ArrayMaxContains=1]="ArrayMaxContains",t[t.ArrayMaxItems=2]="ArrayMaxItems",t[t.ArrayMinContains=3]="ArrayMinContains",t[t.ArrayMinItems=4]="ArrayMinItems",t[t.ArrayUniqueItems=5]="ArrayUniqueItems",t[t.Array=6]="Array",t[t.AsyncIterator=7]="AsyncIterator",t[t.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",t[t.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",t[t.BigIntMaximum=10]="BigIntMaximum",t[t.BigIntMinimum=11]="BigIntMinimum",t[t.BigIntMultipleOf=12]="BigIntMultipleOf",t[t.BigInt=13]="BigInt",t[t.Boolean=14]="Boolean",t[t.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",t[t.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",t[t.DateMaximumTimestamp=17]="DateMaximumTimestamp",t[t.DateMinimumTimestamp=18]="DateMinimumTimestamp",t[t.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",t[t.Date=20]="Date",t[t.Function=21]="Function",t[t.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",t[t.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",t[t.IntegerMaximum=24]="IntegerMaximum",t[t.IntegerMinimum=25]="IntegerMinimum",t[t.IntegerMultipleOf=26]="IntegerMultipleOf",t[t.Integer=27]="Integer",t[t.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",t[t.Intersect=29]="Intersect",t[t.Iterator=30]="Iterator",t[t.Kind=31]="Kind",t[t.Literal=32]="Literal",t[t.Never=33]="Never",t[t.Not=34]="Not",t[t.Null=35]="Null",t[t.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",t[t.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",t[t.NumberMaximum=38]="NumberMaximum",t[t.NumberMinimum=39]="NumberMinimum",t[t.NumberMultipleOf=40]="NumberMultipleOf",t[t.Number=41]="Number",t[t.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",t[t.ObjectMaxProperties=43]="ObjectMaxProperties",t[t.ObjectMinProperties=44]="ObjectMinProperties",t[t.ObjectRequiredProperty=45]="ObjectRequiredProperty",t[t.Object=46]="Object",t[t.Promise=47]="Promise",t[t.RegExp=48]="RegExp",t[t.StringFormatUnknown=49]="StringFormatUnknown",t[t.StringFormat=50]="StringFormat",t[t.StringMaxLength=51]="StringMaxLength",t[t.StringMinLength=52]="StringMinLength",t[t.StringPattern=53]="StringPattern",t[t.String=54]="String",t[t.Symbol=55]="Symbol",t[t.TupleLength=56]="TupleLength",t[t.Tuple=57]="Tuple",t[t.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",t[t.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",t[t.Uint8Array=60]="Uint8Array",t[t.Undefined=61]="Undefined",t[t.Union=62]="Union",t[t.Void=63]="Void"})(ht||(ht={}));var mgt=class extends fi{static{a(this,"ValueErrorsUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};function Q5(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}a(Q5,"EscapeKey");function cs(t){return t!==void 0}a(cs,"IsDefined");var _L=class{static{a(this,"ValueErrorIterator")}constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){let e=this.iterator.next();return e.done?void 0:e.value}};function Gr(t,e,r,n,o=[]){return{type:t,schema:e,path:r,value:n,message:PSr()({errorType:t,path:r,schema:e,value:n,errors:o}),errors:o}}a(Gr,"Create");function*awi(t,e,r,n){}a(awi,"FromAny");function*cwi(t,e,r,n){}a(cwi,"FromArgument");function*lwi(t,e,r,n){if(!ti(n))return yield Gr(ht.Array,t,r,n);cs(t.minItems)&&!(n.length>=t.minItems)&&(yield Gr(ht.ArrayMinItems,t,r,n)),cs(t.maxItems)&&!(n.length<=t.maxItems)&&(yield Gr(ht.ArrayMaxItems,t,r,n));for(let c=0;czp(o,e,`${r}${u}`,l).next().done===!0?c+1:c,0);s===0&&(yield Gr(ht.ArrayContains,t,r,n)),Ln(t.minContains)&&st.maxContains&&(yield Gr(ht.ArrayMaxContains,t,r,n))}a(lwi,"FromArray");function*uwi(t,e,r,n){_De(n)||(yield Gr(ht.AsyncIterator,t,r,n))}a(uwi,"FromAsyncIterator");function*dwi(t,e,r,n){if(!rm(n))return yield Gr(ht.BigInt,t,r,n);cs(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ht.BigIntExclusiveMinimum,t,r,n)),cs(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ht.BigIntMaximum,t,r,n)),cs(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ht.BigIntMinimum,t,r,n)),cs(t.multipleOf)&&n%t.multipleOf!==BigInt(0)&&(yield Gr(ht.BigIntMultipleOf,t,r,n))}a(dwi,"FromBigInt");function*fwi(t,e,r,n){U2(n)||(yield Gr(ht.Boolean,t,r,n))}a(fwi,"FromBoolean");function*pwi(t,e,r,n){yield*zp(t.returns,e,r,n.prototype)}a(pwi,"FromConstructor");function*hwi(t,e,r,n){if(!QA(n))return yield Gr(ht.Date,t,r,n);cs(t.exclusiveMaximumTimestamp)&&!(n.getTime()t.exclusiveMinimumTimestamp)&&(yield Gr(ht.DateExclusiveMinimumTimestamp,t,r,n)),cs(t.maximumTimestamp)&&!(n.getTime()<=t.maximumTimestamp)&&(yield Gr(ht.DateMaximumTimestamp,t,r,n)),cs(t.minimumTimestamp)&&!(n.getTime()>=t.minimumTimestamp)&&(yield Gr(ht.DateMinimumTimestamp,t,r,n)),cs(t.multipleOfTimestamp)&&n.getTime()%t.multipleOfTimestamp!==0&&(yield Gr(ht.DateMultipleOfTimestamp,t,r,n))}a(hwi,"FromDate");function*mwi(t,e,r,n){uL(n)||(yield Gr(ht.Function,t,r,n))}a(mwi,"FromFunction");function*gwi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref];yield*zp(s,[...e,...o],r,n)}a(gwi,"FromImport");function*Awi(t,e,r,n){if(!TDe(n))return yield Gr(ht.Integer,t,r,n);cs(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ht.IntegerExclusiveMinimum,t,r,n)),cs(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ht.IntegerMaximum,t,r,n)),cs(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ht.IntegerMinimum,t,r,n)),cs(t.multipleOf)&&n%t.multipleOf!==0&&(yield Gr(ht.IntegerMultipleOf,t,r,n))}a(Awi,"FromInteger");function*ywi(t,e,r,n){let o=!1;for(let s of t.allOf)for(let c of zp(s,e,r,n))o=!0,yield c;if(o)return yield Gr(ht.Intersect,t,r,n);if(t.unevaluatedProperties===!1){let s=new RegExp(F5(t));for(let c of Object.getOwnPropertyNames(n))s.test(c)||(yield Gr(ht.IntersectUnevaluatedProperties,t,`${r}/${c}`,n))}if(typeof t.unevaluatedProperties=="object"){let s=new RegExp(F5(t));for(let c of Object.getOwnPropertyNames(n))if(!s.test(c)){let l=zp(t.unevaluatedProperties,e,`${r}/${c}`,n[c]).next();l.done||(yield l.value)}}}a(ywi,"FromIntersect");function*Ewi(t,e,r,n){vDe(n)||(yield Gr(ht.Iterator,t,r,n))}a(Ewi,"FromIterator");function*Cwi(t,e,r,n){n!==t.const&&(yield Gr(ht.Literal,t,r,n))}a(Cwi,"FromLiteral");function*_wi(t,e,r,n){yield Gr(ht.Never,t,r,n)}a(_wi,"FromNever");function*vwi(t,e,r,n){zp(t.not,e,r,n).next().done===!0&&(yield Gr(ht.Not,t,r,n))}a(vwi,"FromNot");function*bwi(t,e,r,n){k5(n)||(yield Gr(ht.Null,t,r,n))}a(bwi,"FromNull");function*Twi(t,e,r,n){if(!el.IsNumberLike(n))return yield Gr(ht.Number,t,r,n);cs(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ht.NumberExclusiveMinimum,t,r,n)),cs(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ht.NumberMaximum,t,r,n)),cs(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ht.NumberMinimum,t,r,n)),cs(t.multipleOf)&&n%t.multipleOf!==0&&(yield Gr(ht.NumberMultipleOf,t,r,n))}a(Twi,"FromNumber");function*Swi(t,e,r,n){if(!el.IsObjectLike(n))return yield Gr(ht.Object,t,r,n);cs(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield Gr(ht.ObjectMinProperties,t,r,n)),cs(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield Gr(ht.ObjectMaxProperties,t,r,n));let o=Array.isArray(t.required)?t.required:[],s=Object.getOwnPropertyNames(t.properties),c=Object.getOwnPropertyNames(n);for(let l of o)c.includes(l)||(yield Gr(ht.ObjectRequiredProperty,t.properties[l],`${r}/${Q5(l)}`,void 0));if(t.additionalProperties===!1)for(let l of c)s.includes(l)||(yield Gr(ht.ObjectAdditionalProperties,t,`${r}/${Q5(l)}`,n[l]));if(typeof t.additionalProperties=="object")for(let l of c)s.includes(l)||(yield*zp(t.additionalProperties,e,`${r}/${Q5(l)}`,n[l]));for(let l of s){let u=t.properties[l];t.required&&t.required.includes(l)?(yield*zp(u,e,`${r}/${Q5(l)}`,n[l]),U5(t)&&!(l in n)&&(yield Gr(ht.ObjectRequiredProperty,u,`${r}/${Q5(l)}`,void 0))):el.IsExactOptionalProperty(n,l)&&(yield*zp(u,e,`${r}/${Q5(l)}`,n[l]))}}a(Swi,"FromObject");function*Iwi(t,e,r,n){bDe(n)||(yield Gr(ht.Promise,t,r,n))}a(Iwi,"FromPromise");function*xwi(t,e,r,n){if(!el.IsRecordLike(n))return yield Gr(ht.Object,t,r,n);cs(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield Gr(ht.ObjectMinProperties,t,r,n)),cs(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield Gr(ht.ObjectMaxProperties,t,r,n));let[o,s]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let[l,u]of Object.entries(n))c.test(l)&&(yield*zp(s,e,`${r}/${Q5(l)}`,u));if(typeof t.additionalProperties=="object")for(let[l,u]of Object.entries(n))c.test(l)||(yield*zp(t.additionalProperties,e,`${r}/${Q5(l)}`,u));if(t.additionalProperties===!1){for(let[l,u]of Object.entries(n))if(!c.test(l))return yield Gr(ht.ObjectAdditionalProperties,t,`${r}/${Q5(l)}`,u)}}a(xwi,"FromRecord");function*wwi(t,e,r,n){yield*zp(Fs(t,e),e,r,n)}a(wwi,"FromRef");function*Rwi(t,e,r,n){if(!Bs(n))return yield Gr(ht.String,t,r,n);if(cs(t.minLength)&&!(n.length>=t.minLength)&&(yield Gr(ht.StringMinLength,t,r,n)),cs(t.maxLength)&&!(n.length<=t.maxLength)&&(yield Gr(ht.StringMaxLength,t,r,n)),!new RegExp(t.source,t.flags).test(n))return yield Gr(ht.RegExp,t,r,n)}a(Rwi,"FromRegExp");function*Pwi(t,e,r,n){if(!Bs(n))return yield Gr(ht.String,t,r,n);cs(t.minLength)&&!(n.length>=t.minLength)&&(yield Gr(ht.StringMinLength,t,r,n)),cs(t.maxLength)&&!(n.length<=t.maxLength)&&(yield Gr(ht.StringMaxLength,t,r,n)),Bs(t.pattern)&&(new RegExp(t.pattern).test(n)||(yield Gr(ht.StringPattern,t,r,n))),Bs(t.format)&&(VI.Has(t.format)?VI.Get(t.format)(n)||(yield Gr(ht.StringFormat,t,r,n)):yield Gr(ht.StringFormatUnknown,t,r,n))}a(Pwi,"FromString");function*kwi(t,e,r,n){N5(n)||(yield Gr(ht.Symbol,t,r,n))}a(kwi,"FromSymbol");function*Nwi(t,e,r,n){if(!Bs(n))return yield Gr(ht.String,t,r,n);new RegExp(t.pattern).test(n)||(yield Gr(ht.StringPattern,t,r,n))}a(Nwi,"FromTemplateLiteral");function*Dwi(t,e,r,n){yield*zp(Fs(t,e),e,r,n)}a(Dwi,"FromThis");function*Mwi(t,e,r,n){if(!ti(n))return yield Gr(ht.Tuple,t,r,n);if(t.items===void 0&&n.length!==0)return yield Gr(ht.TupleLength,t,r,n);if(n.length!==t.maxItems)return yield Gr(ht.TupleLength,t,r,n);if(t.items)for(let o=0;onew _L(zp(s,e,r,n)));yield Gr(ht.Union,t,r,n,o)}a(Bwi,"FromUnion");function*Lwi(t,e,r,n){if(!XX(n))return yield Gr(ht.Uint8Array,t,r,n);cs(t.maxByteLength)&&!(n.length<=t.maxByteLength)&&(yield Gr(ht.Uint8ArrayMaxByteLength,t,r,n)),cs(t.minByteLength)&&!(n.length>=t.minByteLength)&&(yield Gr(ht.Uint8ArrayMinByteLength,t,r,n))}a(Lwi,"FromUint8Array");function*Fwi(t,e,r,n){}a(Fwi,"FromUnknown");function*Uwi(t,e,r,n){el.IsVoidLike(n)||(yield Gr(ht.Void,t,r,n))}a(Uwi,"FromVoid");function*Qwi(t,e,r,n){qA.Get(t[mt])(t,n)||(yield Gr(ht.Kind,t,r,n))}a(Qwi,"FromKind");function*zp(t,e,r,n){let o=cs(t.$id)?[...e,t]:e,s=t;switch(s[mt]){case"Any":return yield*awi(s,o,r,n);case"Argument":return yield*cwi(s,o,r,n);case"Array":return yield*lwi(s,o,r,n);case"AsyncIterator":return yield*uwi(s,o,r,n);case"BigInt":return yield*dwi(s,o,r,n);case"Boolean":return yield*fwi(s,o,r,n);case"Constructor":return yield*pwi(s,o,r,n);case"Date":return yield*hwi(s,o,r,n);case"Function":return yield*mwi(s,o,r,n);case"Import":return yield*gwi(s,o,r,n);case"Integer":return yield*Awi(s,o,r,n);case"Intersect":return yield*ywi(s,o,r,n);case"Iterator":return yield*Ewi(s,o,r,n);case"Literal":return yield*Cwi(s,o,r,n);case"Never":return yield*_wi(s,o,r,n);case"Not":return yield*vwi(s,o,r,n);case"Null":return yield*bwi(s,o,r,n);case"Number":return yield*Twi(s,o,r,n);case"Object":return yield*Swi(s,o,r,n);case"Promise":return yield*Iwi(s,o,r,n);case"Record":return yield*xwi(s,o,r,n);case"Ref":return yield*wwi(s,o,r,n);case"RegExp":return yield*Rwi(s,o,r,n);case"String":return yield*Pwi(s,o,r,n);case"Symbol":return yield*kwi(s,o,r,n);case"TemplateLiteral":return yield*Nwi(s,o,r,n);case"This":return yield*Dwi(s,o,r,n);case"Tuple":return yield*Mwi(s,o,r,n);case"Undefined":return yield*Owi(s,o,r,n);case"Union":return yield*Bwi(s,o,r,n);case"Uint8Array":return yield*Lwi(s,o,r,n);case"Unknown":return yield*Fwi(s,o,r,n);case"Void":return yield*Uwi(s,o,r,n);default:if(!qA.Has(s[mt]))throw new mgt(t);return yield*Qwi(s,o,r,n)}}a(zp,"Visit");function G2(...t){let e=t.length===3?zp(t[0],t[1],"",t[2]):zp(t[0],[],"",t[1]);return new _L(e)}a(G2,"Errors");f();f();var CZ=class extends fi{static{a(this,"TransformDecodeCheckError")}constructor(e,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=e,this.value=r,this.error=n}},ggt=class extends fi{static{a(this,"TransformDecodeError")}constructor(e,r,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=e,this.path=r,this.value=n,this.error=o}};function Eu(t,e,r){try{return ma(t)?t[Au].Decode(r):r}catch(n){throw new ggt(t,e,r,n)}}a(Eu,"Default");function qwi(t,e,r,n){return ti(n)?Eu(t,r,n.map((o,s)=>KI(t.items,e,`${r}/${s}`,o))):Eu(t,r,n)}a(qwi,"FromArray");function Gwi(t,e,r,n){if(!Yi(n)||j_(n))return Eu(t,r,n);let o=DDe(t),s=o.map(p=>p[0]),c={...n};for(let[p,h]of o)p in c&&(c[p]=KI(h,e,`${r}/${p}`,c[p]));if(!ma(t.unevaluatedProperties))return Eu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.unevaluatedProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=Eu(u,`${r}/${p}`,d[p]));return Eu(t,r,d)}a(Gwi,"FromIntersect");function Hwi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=KI(s,[...e,...o],r,n);return Eu(t,r,c)}a(Hwi,"FromImport");function jwi(t,e,r,n){return Eu(t,r,KI(t.not,e,r,n))}a(jwi,"FromNot");function $wi(t,e,r,n){if(!Yi(n))return Eu(t,r,n);let o=CE(t),s={...n};for(let d of o)di(s,d)&&(Nl(s[d])&&(!O5(t.properties[d])||el.IsExactOptionalProperty(s,d))||(s[d]=KI(t.properties[d],e,`${r}/${d}`,s[d])));if(!yu(t.additionalProperties))return Eu(t,r,s);let c=Object.getOwnPropertyNames(s),l=t.additionalProperties,u={...s};for(let d of c)o.includes(d)||(u[d]=Eu(l,`${r}/${d}`,u[d]));return Eu(t,r,u)}a($wi,"FromObject");function Vwi(t,e,r,n){if(!Yi(n))return Eu(t,r,n);let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=new RegExp(o),c={...n};for(let p of Object.getOwnPropertyNames(n))s.test(p)&&(c[p]=KI(t.patternProperties[o],e,`${r}/${p}`,c[p]));if(!yu(t.additionalProperties))return Eu(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.test(p)||(d[p]=Eu(u,`${r}/${p}`,d[p]));return Eu(t,r,d)}a(Vwi,"FromRecord");function Wwi(t,e,r,n){let o=Fs(t,e);return Eu(t,r,KI(o,e,r,n))}a(Wwi,"FromRef");function zwi(t,e,r,n){let o=Fs(t,e);return Eu(t,r,KI(o,e,r,n))}a(zwi,"FromThis");function Ywi(t,e,r,n){return ti(n)&&ti(t.items)?Eu(t,r,t.items.map((o,s)=>KI(o,e,`${r}/${s}`,n[s]))):Eu(t,r,n)}a(Ywi,"FromTuple");function Kwi(t,e,r,n){for(let o of t.anyOf){if(!_o(o,e,n))continue;let s=KI(o,e,r,n);return Eu(t,r,s)}return Eu(t,r,n)}a(Kwi,"FromUnion");function KI(t,e,r,n){let o=Vp(t,e),s=t;switch(t[mt]){case"Array":return qwi(s,o,r,n);case"Import":return Hwi(s,o,r,n);case"Intersect":return Gwi(s,o,r,n);case"Not":return jwi(s,o,r,n);case"Object":return $wi(s,o,r,n);case"Record":return Vwi(s,o,r,n);case"Ref":return Wwi(s,o,r,n);case"Symbol":return Eu(s,r,n);case"This":return zwi(s,o,r,n);case"Tuple":return Ywi(s,o,r,n);case"Union":return Kwi(s,o,r,n);default:return Eu(s,r,n)}}a(KI,"Visit");function _Z(t,e,r){return KI(t,e,"",r)}a(_Z,"TransformDecode");f();var vZ=class extends fi{static{a(this,"TransformEncodeCheckError")}constructor(e,r,n){super("The encoded value does not match the expected schema"),this.schema=e,this.value=r,this.error=n}},Agt=class extends fi{static{a(this,"TransformEncodeError")}constructor(e,r,n,o){super(`${o instanceof Error?o.message:"Unknown error"}`),this.schema=e,this.path=r,this.value=n,this.error=o}};function im(t,e,r){try{return ma(t)?t[Au].Encode(r):r}catch(n){throw new Agt(t,e,r,n)}}a(im,"Default");function Jwi(t,e,r,n){let o=im(t,r,n);return ti(o)?o.map((s,c)=>JI(t.items,e,`${r}/${c}`,s)):o}a(Jwi,"FromArray");function Xwi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=im(t,r,n);return JI(s,[...e,...o],r,c)}a(Xwi,"FromImport");function Zwi(t,e,r,n){let o=im(t,r,n);if(!Yi(n)||j_(n))return o;let s=DDe(t),c=s.map(h=>h[0]),l={...o};for(let[h,m]of s)h in l&&(l[h]=JI(m,e,`${r}/${h}`,l[h]));if(!ma(t.unevaluatedProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.unevaluatedProperties,p={...l};for(let h of u)c.includes(h)||(p[h]=im(d,`${r}/${h}`,p[h]));return p}a(Zwi,"FromIntersect");function eRi(t,e,r,n){return im(t.not,r,im(t,r,n))}a(eRi,"FromNot");function tRi(t,e,r,n){let o=im(t,r,n);if(!Yi(o))return o;let s=CE(t),c={...o};for(let p of s)di(c,p)&&(Nl(c[p])&&(!O5(t.properties[p])||el.IsExactOptionalProperty(c,p))||(c[p]=JI(t.properties[p],e,`${r}/${p}`,c[p])));if(!yu(t.additionalProperties))return c;let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=im(u,`${r}/${p}`,d[p]));return d}a(tRi,"FromObject");function rRi(t,e,r,n){let o=im(t,r,n);if(!Yi(n))return o;let s=Object.getOwnPropertyNames(t.patternProperties)[0],c=new RegExp(s),l={...o};for(let h of Object.getOwnPropertyNames(n))c.test(h)&&(l[h]=JI(t.patternProperties[s],e,`${r}/${h}`,l[h]));if(!yu(t.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.additionalProperties,p={...l};for(let h of u)c.test(h)||(p[h]=im(d,`${r}/${h}`,p[h]));return p}a(rRi,"FromRecord");function nRi(t,e,r,n){let o=Fs(t,e),s=JI(o,e,r,n);return im(t,r,s)}a(nRi,"FromRef");function iRi(t,e,r,n){let o=Fs(t,e),s=JI(o,e,r,n);return im(t,r,s)}a(iRi,"FromThis");function oRi(t,e,r,n){let o=im(t,r,n);return ti(t.items)?t.items.map((s,c)=>JI(s,e,`${r}/${c}`,o[c])):[]}a(oRi,"FromTuple");function sRi(t,e,r,n){for(let o of t.anyOf){if(!_o(o,e,n))continue;let s=JI(o,e,r,n);return im(t,r,s)}for(let o of t.anyOf){let s=JI(o,e,r,n);if(_o(t,e,s))return im(t,r,s)}return im(t,r,n)}a(sRi,"FromUnion");function JI(t,e,r,n){let o=Vp(t,e),s=t;switch(t[mt]){case"Array":return Jwi(s,o,r,n);case"Import":return Xwi(s,o,r,n);case"Intersect":return Zwi(s,o,r,n);case"Not":return eRi(s,o,r,n);case"Object":return tRi(s,o,r,n);case"Record":return rRi(s,o,r,n);case"Ref":return nRi(s,o,r,n);case"This":return iRi(s,o,r,n);case"Tuple":return oRi(s,o,r,n);case"Union":return sRi(s,o,r,n);default:return im(s,r,n)}}a(JI,"Visit");function bZ(t,e,r){return JI(t,e,"",r)}a(bZ,"TransformEncode");f();function aRi(t,e){return ma(t)||rp(t.items,e)}a(aRi,"FromArray");function cRi(t,e){return ma(t)||rp(t.items,e)}a(cRi,"FromAsyncIterator");function lRi(t,e){return ma(t)||rp(t.returns,e)||t.parameters.some(r=>rp(r,e))}a(lRi,"FromConstructor");function uRi(t,e){return ma(t)||rp(t.returns,e)||t.parameters.some(r=>rp(r,e))}a(uRi,"FromFunction");function dRi(t,e){return ma(t)||ma(t.unevaluatedProperties)||t.allOf.some(r=>rp(r,e))}a(dRi,"FromIntersect");function fRi(t,e){let r=globalThis.Object.getOwnPropertyNames(t.$defs).reduce((o,s)=>[...o,t.$defs[s]],[]),n=t.$defs[t.$ref];return ma(t)||rp(n,[...r,...e])}a(fRi,"FromImport");function pRi(t,e){return ma(t)||rp(t.items,e)}a(pRi,"FromIterator");function hRi(t,e){return ma(t)||rp(t.not,e)}a(hRi,"FromNot");function mRi(t,e){return ma(t)||Object.values(t.properties).some(r=>rp(r,e))||yu(t.additionalProperties)&&rp(t.additionalProperties,e)}a(mRi,"FromObject");function gRi(t,e){return ma(t)||rp(t.item,e)}a(gRi,"FromPromise");function ARi(t,e){let r=Object.getOwnPropertyNames(t.patternProperties)[0],n=t.patternProperties[r];return ma(t)||rp(n,e)||yu(t.additionalProperties)&&ma(t.additionalProperties)}a(ARi,"FromRecord");function yRi(t,e){return ma(t)?!0:rp(Fs(t,e),e)}a(yRi,"FromRef");function ERi(t,e){return ma(t)?!0:rp(Fs(t,e),e)}a(ERi,"FromThis");function CRi(t,e){return ma(t)||!Nl(t.items)&&t.items.some(r=>rp(r,e))}a(CRi,"FromTuple");function _Ri(t,e){return ma(t)||t.anyOf.some(r=>rp(r,e))}a(_Ri,"FromUnion");function rp(t,e){let r=Vp(t,e),n=t;if(t.$id&&ygt.has(t.$id))return!1;switch(t.$id&&ygt.add(t.$id),t[mt]){case"Array":return aRi(n,r);case"AsyncIterator":return cRi(n,r);case"Constructor":return lRi(n,r);case"Function":return uRi(n,r);case"Import":return fRi(n,r);case"Intersect":return dRi(n,r);case"Iterator":return pRi(n,r);case"Not":return hRi(n,r);case"Object":return mRi(n,r);case"Promise":return gRi(n,r);case"Record":return ARi(n,r);case"Ref":return yRi(n,r);case"This":return ERi(n,r);case"Tuple":return CRi(n,r);case"Union":return _Ri(n,r);default:return ma(t)}}a(rp,"Visit");var ygt=new Set;function q5(t,e){return ygt.clear(),rp(t,e)}a(q5,"HasTransform");var Egt=class{static{a(this,"TypeCheck")}constructor(e,r,n,o){this.schema=e,this.references=r,this.checkFunc=n,this.code=o,this.hasTransform=q5(e,r)}Code(){return this.code}Schema(){return this.schema}References(){return this.references}Errors(e){return G2(this.schema,this.references,e)}Check(e){return this.checkFunc(e)}Decode(e){if(!this.checkFunc(e))throw new CZ(this.schema,e,this.Errors(e).First());return this.hasTransform?_Z(this.schema,this.references,e):e}Encode(e){let r=this.hasTransform?bZ(this.schema,this.references,e):e;if(!this.checkFunc(r))throw new vZ(this.schema,e,this.Errors(e).First());return r}},G5;(function(t){function e(s){return s===36}a(e,"DollarSign"),t.DollarSign=e;function r(s){return s===95}a(r,"IsUnderscore"),t.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}a(n,"IsAlpha"),t.IsAlpha=n;function o(s){return s>=48&&s<=57}a(o,"IsNumeric"),t.IsNumeric=o})(G5||(G5={}));var VDe;(function(t){function e(s){return s.length===0?!1:G5.IsNumeric(s.charCodeAt(0))}a(e,"IsFirstCharacterNumeric");function r(s){if(e(s))return!1;for(let c=0;c= ${X.minItems}`);let ae=j(X.items,le,"value");if(yield`${te}.every((${xe}) => ${ae})`,Ml(X.contains)||Ln(X.minContains)||Ln(X.maxContains)){let Ne=Ml(X.contains)?X.contains:Co(),Y=j(Ne,le,"value"),ee=Ln(X.minContains)?[`(count >= ${X.minContains})`]:[],Ee=Ln(X.maxContains)?[`(count <= ${X.maxContains})`]:[],Ae=`const count = value.reduce((${Z}, ${xe}) => ${Y} ? acc + 1 : acc, 0)`,ve=["(count > 0)",...ee,...Ee].join(" && ");yield`((${xe}) => { ${Ae}; return ${ve}})(${te})`}X.uniqueItems===!0&&(yield`((${xe}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${te})`)}a(o,"FromArray");function*s(X,le,te){yield`(typeof value === 'object' && Symbol.asyncIterator in ${te})`}a(s,"FromAsyncIterator");function*c(X,le,te){yield`(typeof ${te} === 'bigint')`,rm(X.exclusiveMaximum)&&(yield`${te} < BigInt(${X.exclusiveMaximum})`),rm(X.exclusiveMinimum)&&(yield`${te} > BigInt(${X.exclusiveMinimum})`),rm(X.maximum)&&(yield`${te} <= BigInt(${X.maximum})`),rm(X.minimum)&&(yield`${te} >= BigInt(${X.minimum})`),rm(X.multipleOf)&&(yield`(${te} % BigInt(${X.multipleOf})) === 0`)}a(c,"FromBigInt");function*l(X,le,te){yield`(typeof ${te} === 'boolean')`}a(l,"FromBoolean");function*u(X,le,te){yield*$(X.returns,le,`${te}.prototype`)}a(u,"FromConstructor");function*d(X,le,te){yield`(${te} instanceof Date) && Number.isFinite(${te}.getTime())`,Ln(X.exclusiveMaximumTimestamp)&&(yield`${te}.getTime() < ${X.exclusiveMaximumTimestamp}`),Ln(X.exclusiveMinimumTimestamp)&&(yield`${te}.getTime() > ${X.exclusiveMinimumTimestamp}`),Ln(X.maximumTimestamp)&&(yield`${te}.getTime() <= ${X.maximumTimestamp}`),Ln(X.minimumTimestamp)&&(yield`${te}.getTime() >= ${X.minimumTimestamp}`),Ln(X.multipleOfTimestamp)&&(yield`(${te}.getTime() % ${X.multipleOfTimestamp}) === 0`)}a(d,"FromDate");function*p(X,le,te){yield`(typeof ${te} === 'function')`}a(p,"FromFunction");function*h(X,le,te){let xe=globalThis.Object.getOwnPropertyNames(X.$defs).reduce((Z,ae)=>[...Z,X.$defs[ae]],[]);yield*$(Lb(X.$ref),[...le,...xe],te)}a(h,"FromImport");function*m(X,le,te){yield`Number.isInteger(${te})`,Ln(X.exclusiveMaximum)&&(yield`${te} < ${X.exclusiveMaximum}`),Ln(X.exclusiveMinimum)&&(yield`${te} > ${X.exclusiveMinimum}`),Ln(X.maximum)&&(yield`${te} <= ${X.maximum}`),Ln(X.minimum)&&(yield`${te} >= ${X.minimum}`),Ln(X.multipleOf)&&(yield`(${te} % ${X.multipleOf}) === 0`)}a(m,"FromInteger");function*g(X,le,te){let xe=X.allOf.map(Z=>j(Z,le,te)).join(" && ");if(X.unevaluatedProperties===!1){let Z=J(`${new RegExp(F5(X))};`),ae=`Object.getOwnPropertyNames(${te}).every(key => ${Z}.test(key))`;yield`(${xe} && ${ae})`}else if(Ml(X.unevaluatedProperties)){let Z=J(`${new RegExp(F5(X))};`),ae=`Object.getOwnPropertyNames(${te}).every(key => ${Z}.test(key) || ${j(X.unevaluatedProperties,le,`${te}[key]`)})`;yield`(${xe} && ${ae})`}else yield`(${xe})`}a(g,"FromIntersect");function*A(X,le,te){yield`(typeof value === 'object' && Symbol.iterator in ${te})`}a(A,"FromIterator");function*y(X,le,te){typeof X.const=="number"||typeof X.const=="boolean"?yield`(${te} === ${X.const})`:yield`(${te} === '${_gt.Escape(X.const)}')`}a(y,"FromLiteral");function*E(X,le,te){yield"false"}a(E,"FromNever");function*_(X,le,te){yield`(!${j(X.not,le,te)})`}a(_,"FromNot");function*v(X,le,te){yield`(${te} === null)`}a(v,"FromNull");function*b(X,le,te){yield Vq.IsNumberLike(te),Ln(X.exclusiveMaximum)&&(yield`${te} < ${X.exclusiveMaximum}`),Ln(X.exclusiveMinimum)&&(yield`${te} > ${X.exclusiveMinimum}`),Ln(X.maximum)&&(yield`${te} <= ${X.maximum}`),Ln(X.minimum)&&(yield`${te} >= ${X.minimum}`),Ln(X.multipleOf)&&(yield`(${te} % ${X.multipleOf}) === 0`)}a(b,"FromNumber");function*I(X,le,te){yield Vq.IsObjectLike(te),Ln(X.minProperties)&&(yield`Object.getOwnPropertyNames(${te}).length >= ${X.minProperties}`),Ln(X.maxProperties)&&(yield`Object.getOwnPropertyNames(${te}).length <= ${X.maxProperties}`);let xe=Object.getOwnPropertyNames(X.properties);for(let Z of xe){let ae=VDe.Encode(te,Z),Ne=X.properties[Z];if(X.required&&X.required.includes(Z))yield*$(Ne,le,ae),(U5(Ne)||e(Ne))&&(yield`('${Z}' in ${te})`);else{let Y=j(Ne,le,ae);yield Vq.IsExactOptionalProperty(te,Z,Y)}}if(X.additionalProperties===!1)if(X.required&&X.required.length===xe.length)yield`Object.getOwnPropertyNames(${te}).length === ${xe.length}`;else{let Z=`[${xe.map(ae=>`'${ae}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${te}).every(key => ${Z}.includes(key))`}if(typeof X.additionalProperties=="object"){let Z=j(X.additionalProperties,le,`${te}[key]`),ae=`[${xe.map(Ne=>`'${Ne}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${te}).every(key => ${ae}.includes(key) || ${Z}))`}}a(I,"FromObject");function*x(X,le,te){yield`${te} instanceof Promise`}a(x,"FromPromise");function*R(X,le,te){yield Vq.IsRecordLike(te),Ln(X.minProperties)&&(yield`Object.getOwnPropertyNames(${te}).length >= ${X.minProperties}`),Ln(X.maxProperties)&&(yield`Object.getOwnPropertyNames(${te}).length <= ${X.maxProperties}`);let[xe,Z]=Object.entries(X.patternProperties)[0],ae=J(`${new RegExp(xe)}`),Ne=j(Z,le,"value"),Y=Ml(X.additionalProperties)?j(X.additionalProperties,le,te):X.additionalProperties===!1?"false":"true",ee=`(${ae}.test(key) ? ${Ne} : ${Y})`;yield`(Object.entries(${te}).every(([key, value]) => ${ee}))`}a(R,"FromRecord");function*w(X,le,te){let xe=Fs(X,le);if(W.functions.has(X.$ref))return yield`${ce(X.$ref)}(${te})`;yield*$(xe,le,te)}a(w,"FromRef");function*P(X,le,te){let xe=J(`${new RegExp(X.source,X.flags)};`);yield`(typeof ${te} === 'string')`,Ln(X.maxLength)&&(yield`${te}.length <= ${X.maxLength}`),Ln(X.minLength)&&(yield`${te}.length >= ${X.minLength}`),yield`${xe}.test(${te})`}a(P,"FromRegExp");function*k(X,le,te){yield`(typeof ${te} === 'string')`,Ln(X.maxLength)&&(yield`${te}.length <= ${X.maxLength}`),Ln(X.minLength)&&(yield`${te}.length >= ${X.minLength}`),X.pattern!==void 0&&(yield`${J(`${new RegExp(X.pattern)};`)}.test(${te})`),X.format!==void 0&&(yield`format('${X.format}', ${te})`)}a(k,"FromString");function*Q(X,le,te){yield`(typeof ${te} === 'symbol')`}a(Q,"FromSymbol");function*M(X,le,te){yield`(typeof ${te} === 'string')`,yield`${J(`${new RegExp(X.pattern)};`)}.test(${te})`}a(M,"FromTemplateLiteral");function*D(X,le,te){yield`${ce(X.$ref)}(${te})`}a(D,"FromThis");function*G(X,le,te){if(yield`Array.isArray(${te})`,X.items===void 0)return yield`${te}.length === 0`;yield`(${te}.length === ${X.maxItems})`;for(let xe=0;xej(Z,le,te)).join(" || ")})`}a(N,"FromUnion");function*F(X,le,te){yield`${te} instanceof Uint8Array`,Ln(X.maxByteLength)&&(yield`(${te}.length <= ${X.maxByteLength})`),Ln(X.minByteLength)&&(yield`(${te}.length >= ${X.minByteLength})`)}a(F,"FromUint8Array");function*U(X,le,te){yield"true"}a(U,"FromUnknown");function*L(X,le,te){yield Vq.IsVoidLike(te)}a(L,"FromVoid");function*H(X,le,te){let xe=W.instances.size;W.instances.set(xe,X),yield`kind('${X[mt]}', ${xe}, ${te})`}a(H,"FromKind");function*$(X,le,te,xe=!0){let Z=Bs(X.$id)?[...le,X]:le,ae=X;if(xe&&Bs(X.$id)){let Ne=ce(X.$id);if(W.functions.has(Ne))return yield`${Ne}(${te})`;{W.functions.set(Ne,"");let Y=Te(Ne,X,le,"value",!1);return W.functions.set(Ne,Y),yield`${Ne}(${te})`}}switch(ae[mt]){case"Any":return yield*r(ae,Z,te);case"Argument":return yield*n(ae,Z,te);case"Array":return yield*o(ae,Z,te);case"AsyncIterator":return yield*s(ae,Z,te);case"BigInt":return yield*c(ae,Z,te);case"Boolean":return yield*l(ae,Z,te);case"Constructor":return yield*u(ae,Z,te);case"Date":return yield*d(ae,Z,te);case"Function":return yield*p(ae,Z,te);case"Import":return yield*h(ae,Z,te);case"Integer":return yield*m(ae,Z,te);case"Intersect":return yield*g(ae,Z,te);case"Iterator":return yield*A(ae,Z,te);case"Literal":return yield*y(ae,Z,te);case"Never":return yield*E(ae,Z,te);case"Not":return yield*_(ae,Z,te);case"Null":return yield*v(ae,Z,te);case"Number":return yield*b(ae,Z,te);case"Object":return yield*I(ae,Z,te);case"Promise":return yield*x(ae,Z,te);case"Record":return yield*R(ae,Z,te);case"Ref":return yield*w(ae,Z,te);case"RegExp":return yield*P(ae,Z,te);case"String":return yield*k(ae,Z,te);case"Symbol":return yield*Q(ae,Z,te);case"TemplateLiteral":return yield*M(ae,Z,te);case"This":return yield*D(ae,Z,te);case"Tuple":return yield*G(ae,Z,te);case"Undefined":return yield*O(ae,Z,te);case"Union":return yield*N(ae,Z,te);case"Uint8Array":return yield*F(ae,Z,te);case"Unknown":return yield*U(ae,Z,te);case"Void":return yield*L(ae,Z,te);default:if(!qA.Has(ae[mt]))throw new vgt(X);return yield*H(ae,Z,te)}}a($,"Visit");let W={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function j(X,le,te,xe=!0){return`(${[...$(X,le,te,xe)].join(" && ")})`}a(j,"CreateExpression");function ce(X){return`check_${Cgt.Encode(X)}`}a(ce,"CreateFunctionName");function J(X){let le=`local_${W.variables.size}`;return W.variables.set(le,`const ${le} = ${X}`),le}a(J,"CreateVariable");function Te(X,le,te,xe,Z=!0){let[ae,Ne]=[` -`,Ae=>"".padStart(Ae," ")],Y=fe("value","any"),ee=De("boolean"),Ee=[...$(le,te,xe,Z)].map(Ae=>`${Ne(4)}${Ae}`).join(` &&${ae}`);return`function ${X}(${Y})${ee} {${ae}${Ne(2)}return (${ae}${Ee}${ae}${Ne(2)}) -}`}a(Te,"CreateFunction");function fe(X,le){let te=W.language==="typescript"?`: ${le}`:"";return`${X}${te}`}a(fe,"CreateParameter");function De(X){return W.language==="typescript"?`: ${X}`:""}a(De,"CreateReturns");function Ve(X,le,te){let xe=Te("check",X,le,"value"),Z=fe("value","any"),ae=De("boolean"),Ne=[...W.functions.values()],Y=[...W.variables.values()],ee=Bs(X.$id)?`return function check(${Z})${ae} { + deps: ${r}}`,"params")};var _9a={keyword:"dependencies",type:"object",schemaType:"object",error:aN.error,code(t){let[e,r]=C9a(t);j_i(t,e),$_i(t,r)}};function C9a({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let o=Array.isArray(t[n])?e:r;o[n]=t[n]}return[e,r]}a(C9a,"splitDependencies");function j_i(t,e=t.schema){let{gen:r,data:n,it:o}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let c in e){let l=e[c];if(l.length===0)continue;let u=(0,jPe.propertyInData)(r,n,c,o.opts.ownProperties);t.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),o.allErrors?r.if(u,()=>{for(let d of l)(0,jPe.checkReportMissingProp)(t,d)}):(r.if((0,pCr._)`${u} && (${(0,jPe.checkMissingProp)(t,l,s)})`),(0,jPe.reportMissingProp)(t,s),r.else())}}a(j_i,"validatePropertyDeps");aN.validatePropertyDeps=j_i;function $_i(t,e=t.schema){let{gen:r,data:n,keyword:o,it:s}=t,c=r.name("valid");for(let l in e)(0,E9a.alwaysValidSchema)(s,e[l])||(r.if((0,jPe.propertyInData)(r,n,l,s.opts.ownProperties),()=>{let u=t.subschema({keyword:o,schemaProp:l},c);t.mergeValidEvaluated(u,c)},()=>r.var(c,!0)),t.ok(c))}a($_i,"validateSchemaDeps");aN.validateSchemaDeps=$_i;aN.default=_9a});var z_i=T(hCr=>{"use strict";f();Object.defineProperty(hCr,"__esModule",{value:!0});var W_i=Oo(),v9a=sa(),b9a={message:"property name must be valid",params:a(({params:t})=>(0,W_i._)`{propertyName: ${t.propertyName}}`,"params")},T9a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:b9a,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,v9a.alwaysValidSchema)(o,r))return;let s=e.name("valid");e.forIn("key",n,c=>{t.setParams({propertyName:c}),t.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},s),e.if((0,W_i.not)(s),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(s)}};hCr.default=T9a});var gCr=T(mCr=>{"use strict";f();Object.defineProperty(mCr,"__esModule",{value:!0});var apt=EI(),_2=Oo(),S9a=N3(),cpt=sa(),I9a={message:"must NOT have additional properties",params:a(({params:t})=>(0,_2._)`{additionalProperty: ${t.additionalProperty}}`,"params")},x9a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:I9a,code(t){let{gen:e,schema:r,parentSchema:n,data:o,errsCount:s,it:c}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:l,opts:u}=c;if(c.props=!0,u.removeAdditional!=="all"&&(0,cpt.alwaysValidSchema)(c,r))return;let d=(0,apt.allSchemaProperties)(n.properties),p=(0,apt.allSchemaProperties)(n.patternProperties);h(),t.ok((0,_2._)`${s} === ${S9a.default.errors}`);function h(){e.forIn("key",o,E=>{!d.length&&!p.length?A(E):e.if(m(E),()=>A(E))})}a(h,"checkAdditionalProperties");function m(E){let _;if(d.length>8){let v=(0,cpt.schemaRefOrVal)(c,n.properties,"properties");_=(0,apt.isOwnProperty)(e,v,E)}else d.length?_=(0,_2.or)(...d.map(v=>(0,_2._)`${E} === ${v}`)):_=_2.nil;return p.length&&(_=(0,_2.or)(_,...p.map(v=>(0,_2._)`${(0,apt.usePattern)(t,v)}.test(${E})`))),(0,_2.not)(_)}a(m,"isAdditional");function g(E){e.code((0,_2._)`delete ${o}[${E}]`)}a(g,"deleteAdditional");function A(E){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){g(E);return}if(r===!1){t.setParams({additionalProperty:E}),t.error(),l||e.break();return}if(typeof r=="object"&&!(0,cpt.alwaysValidSchema)(c,r)){let _=e.name("valid");u.removeAdditional==="failing"?(y(E,_,!1),e.if((0,_2.not)(_),()=>{t.reset(),g(E)})):(y(E,_),l||e.if((0,_2.not)(_),()=>e.break()))}}a(A,"additionalPropertyCode");function y(E,_,v){let b={keyword:"additionalProperties",dataProp:E,dataPropType:cpt.Type.Str};v===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(b,_)}a(y,"applyAdditionalSchema")}};mCr.default=x9a});var J_i=T(yCr=>{"use strict";f();Object.defineProperty(yCr,"__esModule",{value:!0});var w9a=PPe(),Y_i=EI(),ACr=sa(),K_i=gCr(),R9a={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&K_i.default.code(new w9a.KeywordCxt(s,K_i.default,"additionalProperties"));let c=(0,Y_i.allSchemaProperties)(r);for(let h of c)s.definedProperties.add(h);s.opts.unevaluated&&c.length&&s.props!==!0&&(s.props=ACr.mergeEvaluated.props(e,(0,ACr.toHash)(c),s.props));let l=c.filter(h=>!(0,ACr.alwaysValidSchema)(s,r[h]));if(l.length===0)return;let u=e.name("valid");for(let h of l)d(h)?p(h):(e.if((0,Y_i.propertyInData)(e,o,h,s.opts.ownProperties)),p(h),s.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(u);function d(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}a(d,"hasDefault");function p(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},u)}a(p,"applyPropertySchema")}};yCr.default=R9a});var tCi=T(ECr=>{"use strict";f();Object.defineProperty(ECr,"__esModule",{value:!0});var X_i=EI(),lpt=Oo(),Z_i=sa(),eCi=sa(),P9a={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:o,it:s}=t,{opts:c}=s,l=(0,X_i.allSchemaProperties)(r),u=l.filter(y=>(0,Z_i.alwaysValidSchema)(s,r[y]));if(l.length===0||u.length===l.length&&(!s.opts.unevaluated||s.props===!0))return;let d=c.strictSchema&&!c.allowMatchingProperties&&o.properties,p=e.name("valid");s.props!==!0&&!(s.props instanceof lpt.Name)&&(s.props=(0,eCi.evaluatedPropsToName)(e,s.props));let{props:h}=s;m();function m(){for(let y of l)d&&g(y),s.allErrors?A(y):(e.var(p,!0),A(y),e.if(p))}a(m,"validatePatternProperties");function g(y){for(let E in d)new RegExp(y).test(E)&&(0,Z_i.checkStrictMode)(s,`property ${E} matches pattern ${y} (use allowMatchingProperties)`)}a(g,"checkMatchingProperties");function A(y){e.forIn("key",n,E=>{e.if((0,lpt._)`${(0,X_i.usePattern)(t,y)}.test(${E})`,()=>{let _=u.includes(y);_||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:E,dataPropType:eCi.Type.Str},p),s.opts.unevaluated&&h!==!0?e.assign((0,lpt._)`${h}[${E}]`,!0):!_&&!s.allErrors&&e.if((0,lpt.not)(p),()=>e.break())})})}a(A,"validateProperties")}};ECr.default=P9a});var rCi=T(_Cr=>{"use strict";f();Object.defineProperty(_Cr,"__esModule",{value:!0});var k9a=sa(),D9a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,k9a.alwaysValidSchema)(n,r)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};_Cr.default=D9a});var nCi=T(CCr=>{"use strict";f();Object.defineProperty(CCr,"__esModule",{value:!0});var N9a=EI(),M9a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:N9a.validateUnion,error:{message:"must match a schema in anyOf"}};CCr.default=M9a});var iCi=T(vCr=>{"use strict";f();Object.defineProperty(vCr,"__esModule",{value:!0});var upt=Oo(),O9a=sa(),B9a={message:"must match exactly one schema in oneOf",params:a(({params:t})=>(0,upt._)`{passingSchemas: ${t.passing}}`,"params")},L9a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:B9a,code(t){let{gen:e,schema:r,parentSchema:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,c=e.let("valid",!1),l=e.let("passing",null),u=e.name("_valid");t.setParams({passing:l}),e.block(d),t.result(c,()=>t.reset(),()=>t.error(!0));function d(){s.forEach((p,h)=>{let m;(0,O9a.alwaysValidSchema)(o,p)?e.var(u,!0):m=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},u),h>0&&e.if((0,upt._)`${u} && ${c}`).assign(c,!1).assign(l,(0,upt._)`[${l}, ${h}]`).else(),e.if(u,()=>{e.assign(c,!0),e.assign(l,h),m&&t.mergeEvaluated(m,upt.Name)})})}a(d,"validateOneOf")}};vCr.default=L9a});var oCi=T(bCr=>{"use strict";f();Object.defineProperty(bCr,"__esModule",{value:!0});var F9a=sa(),U9a={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=e.name("valid");r.forEach((s,c)=>{if((0,F9a.alwaysValidSchema)(n,s))return;let l=t.subschema({keyword:"allOf",schemaProp:c},o);t.ok(o),t.mergeEvaluated(l)})}};bCr.default=U9a});var cCi=T(TCr=>{"use strict";f();Object.defineProperty(TCr,"__esModule",{value:!0});var dpt=Oo(),aCi=sa(),Q9a={message:a(({params:t})=>(0,dpt.str)`must match "${t.ifClause}" schema`,"message"),params:a(({params:t})=>(0,dpt._)`{failingKeyword: ${t.ifClause}}`,"params")},q9a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Q9a,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,aCi.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=sCi(n,"then"),s=sCi(n,"else");if(!o&&!s)return;let c=e.let("valid",!0),l=e.name("_valid");if(u(),t.reset(),o&&s){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(l,d("then",p),d("else",p))}else o?e.if(l,d("then")):e.if((0,dpt.not)(l),d("else"));t.pass(c,()=>t.error(!0));function u(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);t.mergeEvaluated(p)}a(u,"validateIf");function d(p,h){return()=>{let m=t.subschema({keyword:p},l);e.assign(c,l),t.mergeValidEvaluated(m,c),h?e.assign(h,(0,dpt._)`${p}`):t.setParams({ifClause:p})}}a(d,"validateClause")}};function sCi(t,e){let r=t.schema[e];return r!==void 0&&!(0,aCi.alwaysValidSchema)(t,r)}a(sCi,"hasSchema");TCr.default=q9a});var lCi=T(SCr=>{"use strict";f();Object.defineProperty(SCr,"__esModule",{value:!0});var G9a=sa(),H9a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,G9a.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};SCr.default=H9a});var uCi=T(ICr=>{"use strict";f();Object.defineProperty(ICr,"__esModule",{value:!0});var j9a=cCr(),$9a=Q_i(),V9a=lCr(),W9a=G_i(),z9a=H_i(),Y9a=V_i(),K9a=z_i(),J9a=gCr(),X9a=J_i(),Z9a=tCi(),e7a=rCi(),t7a=nCi(),r7a=iCi(),n7a=oCi(),i7a=cCi(),o7a=lCi();function s7a(t=!1){let e=[e7a.default,t7a.default,r7a.default,n7a.default,i7a.default,o7a.default,K9a.default,J9a.default,Y9a.default,X9a.default,Z9a.default];return t?e.push($9a.default,W9a.default):e.push(j9a.default,V9a.default),e.push(z9a.default),e}a(s7a,"getApplicator");ICr.default=s7a});var dCi=T(xCr=>{"use strict";f();Object.defineProperty(xCr,"__esModule",{value:!0});var Bf=Oo(),a7a={message:a(({schemaCode:t})=>(0,Bf.str)`must match format "${t}"`,"message"),params:a(({schemaCode:t})=>(0,Bf._)`{format: ${t}}`,"params")},c7a={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:a7a,code(t,e){let{gen:r,data:n,$data:o,schema:s,schemaCode:c,it:l}=t,{opts:u,errSchemaPath:d,schemaEnv:p,self:h}=l;if(!u.validateFormats)return;o?m():g();function m(){let A=r.scopeValue("formats",{ref:h.formats,code:u.code.formats}),y=r.const("fDef",(0,Bf._)`${A}[${c}]`),E=r.let("fType"),_=r.let("format");r.if((0,Bf._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(E,(0,Bf._)`${y}.type || "string"`).assign(_,(0,Bf._)`${y}.validate`),()=>r.assign(E,(0,Bf._)`"string"`).assign(_,y)),t.fail$data((0,Bf.or)(v(),b()));function v(){return u.strictSchema===!1?Bf.nil:(0,Bf._)`${c} && !${_}`}a(v,"unknownFmt");function b(){let I=p.$async?(0,Bf._)`(${y}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,Bf._)`${_}(${n})`,x=(0,Bf._)`(typeof ${_} == "function" ? ${I} : ${_}.test(${n}))`;return(0,Bf._)`${_} && ${_} !== true && ${E} === ${e} && !${x}`}a(b,"invalidFmt")}a(m,"validate$DataFormat");function g(){let A=h.formats[s];if(!A){v();return}if(A===!0)return;let[y,E,_]=b(A);y===e&&t.pass(I());function v(){if(u.strictSchema===!1){h.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${s}" ignored in schema at path "${d}"`}}a(v,"unknownFormat");function b(x){let w=x instanceof RegExp?(0,Bf.regexpCode)(x):u.code.formats?(0,Bf._)`${u.code.formats}${(0,Bf.getProperty)(s)}`:void 0,R=r.scopeValue("formats",{key:s,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Bf._)`${R}.validate`]:["string",x,R]}a(b,"getFormat");function I(){if(typeof A=="object"&&!(A instanceof RegExp)&&A.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Bf._)`await ${_}(${n})`}return typeof E=="function"?(0,Bf._)`${_}(${n})`:(0,Bf._)`${_}.test(${n})`}a(I,"validCondition")}a(g,"validateFormat")}};xCr.default=c7a});var fCi=T(wCr=>{"use strict";f();Object.defineProperty(wCr,"__esModule",{value:!0});var l7a=dCi(),u7a=[l7a.default];wCr.default=u7a});var pCi=T(h0e=>{"use strict";f();Object.defineProperty(h0e,"__esModule",{value:!0});h0e.contentVocabulary=h0e.metadataVocabulary=void 0;h0e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];h0e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var mCi=T(RCr=>{"use strict";f();Object.defineProperty(RCr,"__esModule",{value:!0});var d7a=v_i(),f7a=B_i(),p7a=uCi(),h7a=fCi(),hCi=pCi(),m7a=[d7a.default,f7a.default,(0,p7a.default)(),h7a.default,hCi.metadataVocabulary,hCi.contentVocabulary];RCr.default=m7a});var ACi=T(fpt=>{"use strict";f();Object.defineProperty(fpt,"__esModule",{value:!0});fpt.DiscrError=void 0;var gCi;(function(t){t.Tag="tag",t.Mapping="mapping"})(gCi||(fpt.DiscrError=gCi={}))});var ECi=T(kCr=>{"use strict";f();Object.defineProperty(kCr,"__esModule",{value:!0});var m0e=Oo(),PCr=ACi(),yCi=Y0t(),g7a=kPe(),A7a=sa(),y7a={message:a(({params:{discrError:t,tagName:e}})=>t===PCr.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,"message"),params:a(({params:{discrError:t,tag:e,tagName:r}})=>(0,m0e._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`,"params")},E7a={keyword:"discriminator",type:"object",schemaType:"object",error:y7a,code(t){let{gen:e,data:r,schema:n,parentSchema:o,it:s}=t,{oneOf:c}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let l=n.propertyName;if(typeof l!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!c)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),d=e.const("tag",(0,m0e._)`${r}${(0,m0e.getProperty)(l)}`);e.if((0,m0e._)`typeof ${d} == "string"`,()=>p(),()=>t.error(!1,{discrError:PCr.DiscrError.Tag,tag:d,tagName:l})),t.ok(u);function p(){let g=m();e.if(!1);for(let A in g)e.elseIf((0,m0e._)`${d} === ${A}`),e.assign(u,h(g[A]));e.else(),t.error(!1,{discrError:PCr.DiscrError.Mapping,tag:d,tagName:l}),e.endIf()}a(p,"validateMapping");function h(g){let A=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:g},A);return t.mergeEvaluated(y,m0e.Name),A}a(h,"applyTagSchema");function m(){var g;let A={},y=_(o),E=!0;for(let I=0;I{_7a.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var NCr=T((su,DCr)=>{"use strict";f();Object.defineProperty(su,"__esModule",{value:!0});su.MissingRefError=su.ValidationError=su.CodeGen=su.Name=su.nil=su.stringify=su.str=su._=su.KeywordCxt=su.Ajv=void 0;var C7a=g_i(),v7a=mCi(),b7a=ECi(),CCi=_Ci(),T7a=["/properties"],ppt="http://json-schema.org/draft-07/schema",g0e=class extends C7a.default{static{a(this,"Ajv")}_addVocabularies(){super._addVocabularies(),v7a.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(b7a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(CCi,T7a):CCi;this.addMetaSchema(e,ppt,!1),this.refs["http://json-schema.org/schema"]=ppt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ppt)?ppt:void 0)}};su.Ajv=g0e;DCr.exports=su=g0e;DCr.exports.Ajv=g0e;Object.defineProperty(su,"__esModule",{value:!0});su.default=g0e;var S7a=PPe();Object.defineProperty(su,"KeywordCxt",{enumerable:!0,get:a(function(){return S7a.KeywordCxt},"get")});var A0e=Oo();Object.defineProperty(su,"_",{enumerable:!0,get:a(function(){return A0e._},"get")});Object.defineProperty(su,"str",{enumerable:!0,get:a(function(){return A0e.str},"get")});Object.defineProperty(su,"stringify",{enumerable:!0,get:a(function(){return A0e.stringify},"get")});Object.defineProperty(su,"nil",{enumerable:!0,get:a(function(){return A0e.nil},"get")});Object.defineProperty(su,"Name",{enumerable:!0,get:a(function(){return A0e.Name},"get")});Object.defineProperty(su,"CodeGen",{enumerable:!0,get:a(function(){return A0e.CodeGen},"get")});var I7a=W0t();Object.defineProperty(su,"ValidationError",{enumerable:!0,get:a(function(){return I7a.default},"get")});var x7a=kPe();Object.defineProperty(su,"MissingRefError",{enumerable:!0,get:a(function(){return x7a.default},"get")})});var RCi=T(lN=>{"use strict";f();Object.defineProperty(lN,"__esModule",{value:!0});lN.formatNames=lN.fastFormats=lN.fullFormats=void 0;function cN(t,e){return{validate:t,compare:e}}a(cN,"fmtDef");lN.fullFormats={date:cN(SCi,LCr),time:cN(OCr(!0),FCr),"date-time":cN(vCi(!0),xCi),"iso-time":cN(OCr(),ICi),"iso-date-time":cN(vCi(),wCi),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:N7a,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Q7a,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:M7a,int32:{type:"number",validate:L7a},int64:{type:"number",validate:F7a},float:{type:"number",validate:TCi},double:{type:"number",validate:TCi},password:!0,binary:!0};lN.fastFormats={...lN.fullFormats,date:cN(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,LCr),time:cN(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,FCr),"date-time":cN(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,xCi),"iso-time":cN(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ICi),"iso-date-time":cN(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,wCi),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};lN.formatNames=Object.keys(lN.fullFormats);function w7a(t){return t%4===0&&(t%100!==0||t%400===0)}a(w7a,"isLeapYear");var R7a=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,P7a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function SCi(t){let e=R7a.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],o=+e[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&w7a(r)?29:P7a[n])}a(SCi,"date");function LCr(t,e){if(t&&e)return t>e?1:t23||p>59||t&&!l)return!1;if(o<=23&&s<=59&&c<60)return!0;let h=s-p*u,m=o-d*u-(h<0?1:0);return(m===23||m===-1)&&(h===59||h===-1)&&c<61},"time")}a(OCr,"getTime");function FCr(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}a(FCr,"compareTime");function ICi(t,e){if(!(t&&e))return;let r=MCr.exec(t),n=MCr.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t=O7a}a(L7a,"validateInt32");function F7a(t){return Number.isInteger(t)}a(F7a,"validateInt64");function TCi(){return!0}a(TCi,"validateNumber");var U7a=/[^\\]\\Z/;function Q7a(t){if(U7a.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}a(Q7a,"regex")});var PCi=T(y0e=>{"use strict";f();Object.defineProperty(y0e,"__esModule",{value:!0});y0e.formatLimitDefinition=void 0;var q7a=NCr(),C2=Oo(),tq=C2.operators,hpt={formatMaximum:{okStr:"<=",ok:tq.LTE,fail:tq.GT},formatMinimum:{okStr:">=",ok:tq.GTE,fail:tq.LT},formatExclusiveMaximum:{okStr:"<",ok:tq.LT,fail:tq.GTE},formatExclusiveMinimum:{okStr:">",ok:tq.GT,fail:tq.LTE}},G7a={message:a(({keyword:t,schemaCode:e})=>(0,C2.str)`should be ${hpt[t].okStr} ${e}`,"message"),params:a(({keyword:t,schemaCode:e})=>(0,C2._)`{comparison: ${hpt[t].okStr}, limit: ${e}}`,"params")};y0e.formatLimitDefinition={keyword:Object.keys(hpt),type:"string",schemaType:"string",$data:!0,error:G7a,code(t){let{gen:e,data:r,schemaCode:n,keyword:o,it:s}=t,{opts:c,self:l}=s;if(!c.validateFormats)return;let u=new q7a.KeywordCxt(s,l.RULES.all.format.definition,"format");u.$data?d():p();function d(){let m=e.scopeValue("formats",{ref:l.formats,code:c.code.formats}),g=e.const("fmt",(0,C2._)`${m}[${u.schemaCode}]`);t.fail$data((0,C2.or)((0,C2._)`typeof ${g} != "object"`,(0,C2._)`${g} instanceof RegExp`,(0,C2._)`typeof ${g}.compare != "function"`,h(g)))}a(d,"validate$DataFormat");function p(){let m=u.schema,g=l.formats[m];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${o}": format "${m}" does not define "compare" function`);let A=e.scopeValue("formats",{key:m,ref:g,code:c.code.formats?(0,C2._)`${c.code.formats}${(0,C2.getProperty)(m)}`:void 0});t.fail$data(h(A))}a(p,"validateFormat");function h(m){return(0,C2._)`${m}.compare(${r}, ${n}) ${hpt[o].fail} 0`}a(h,"compareCode")},dependencies:["format"]};var H7a=a(t=>(t.addKeyword(y0e.formatLimitDefinition),t),"formatLimitPlugin");y0e.default=H7a});var MCi=T(($Pe,NCi)=>{"use strict";f();Object.defineProperty($Pe,"__esModule",{value:!0});var E0e=RCi(),j7a=PCi(),UCr=Oo(),kCi=new UCr.Name("fullFormats"),$7a=new UCr.Name("fastFormats"),QCr=a((t,e={keywords:!0})=>{if(Array.isArray(e))return DCi(t,e,E0e.fullFormats,kCi),t;let[r,n]=e.mode==="fast"?[E0e.fastFormats,$7a]:[E0e.fullFormats,kCi],o=e.formats||E0e.formatNames;return DCi(t,o,r,n),e.keywords&&(0,j7a.default)(t),t},"formatsPlugin");QCr.get=(t,e="full")=>{let n=(e==="fast"?E0e.fastFormats:E0e.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function DCi(t,e,r,n){var o,s;(o=(s=t.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,UCr._)`require("ajv-formats/dist/formats").${n}`);for(let c of e)t.addFormat(c,r[c])}a(DCi,"addFormats");NCi.exports=$Pe=QCr;Object.defineProperty($Pe,"__esModule",{value:!0});$Pe.default=QCr});var o1i=T((uu0,i1i)=>{f();i1i.exports=n1i;n1i.sync=SUa;var t1i=require("fs");function TUa(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n{f();l1i.exports=a1i;a1i.sync=IUa;var s1i=require("fs");function a1i(t,e,r){s1i.stat(t,function(n,o){r(n,n?!1:c1i(o,e))})}a(a1i,"isexe");function IUa(t,e){return c1i(s1i.statSync(t),e)}a(IUa,"sync");function c1i(t,e){return t.isFile()&&xUa(t,e)}a(c1i,"checkStat");function xUa(t,e){var r=t.mode,n=t.uid,o=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),d=parseInt("001",8),p=l|u,h=r&d||r&u&&o===c||r&l&&n===s||r&p&&s===0;return h}a(xUa,"checkMode")});var f1i=T((Au0,d1i)=>{f();var gu0=require("fs"),wpt;process.platform==="win32"||global.TESTING_WINDOWS?wpt=o1i():wpt=u1i();d1i.exports=s1r;s1r.sync=wUa;function s1r(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){s1r(t,e||{},function(s,c){s?o(s):n(c)})})}wpt(t,e||{},function(n,o){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,o=!1),r(n,o)})}a(s1r,"isexe");function wUa(t,e){try{return wpt.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}a(wUa,"sync")});var E1i=T((_u0,y1i)=>{f();var x0e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",p1i=require("path"),RUa=x0e?";":":",h1i=f1i(),m1i=a(t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),"getNotFoundError"),g1i=a((t,e)=>{let r=e.colon||RUa,n=t.match(/\//)||x0e&&t.match(/\\/)?[""]:[...x0e?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],o=x0e?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=x0e?o.split(r):[""];return x0e&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},"getPathInfo"),A1i=a((t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:o,pathExtExe:s}=g1i(t,e),c=[],l=a(d=>new Promise((p,h)=>{if(d===n.length)return e.all&&c.length?p(c):h(m1i(t));let m=n[d],g=/^".*"$/.test(m)?m.slice(1,-1):m,A=p1i.join(g,t),y=!g&&/^\.[\\\/]/.test(t)?t.slice(0,2)+A:A;p(u(y,d,0))}),"step"),u=a((d,p,h)=>new Promise((m,g)=>{if(h===o.length)return m(l(p+1));let A=o[h];h1i(d+A,{pathExt:s},(y,E)=>{if(!y&&E)if(e.all)c.push(d+A);else return m(d+A);return m(u(d,p,h+1))})}),"subStep");return r?l(0).then(d=>r(null,d),r):l(0)},"which"),PUa=a((t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=g1i(t,e),s=[];for(let c=0;c{"use strict";f();var _1i=a((t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");a1r.exports=_1i;a1r.exports.default=_1i});var S1i=T((Iu0,T1i)=>{"use strict";f();var v1i=require("path"),kUa=E1i(),DUa=C1i();function b1i(t,e){let r=t.options.env||process.env,n=process.cwd(),o=t.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let c;try{c=kUa.sync(t.command,{path:r[DUa({env:r})],pathExt:e?v1i.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return c&&(c=v1i.resolve(o?t.options.cwd:"",c)),c}a(b1i,"resolveCommandAttempt");function NUa(t){return b1i(t)||b1i(t,!0)}a(NUa,"resolveCommand");T1i.exports=NUa});var I1i=T((Ru0,l1r)=>{"use strict";f();var c1r=/([()\][%!^"`<>&|;, *?])/g;function MUa(t){return t=t.replace(c1r,"^$1"),t}a(MUa,"escapeCommand");function OUa(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(c1r,"^$1"),e&&(t=t.replace(c1r,"^$1")),t}a(OUa,"escapeArgument");l1r.exports.command=MUa;l1r.exports.argument=OUa});var w1i=T((Du0,x1i)=>{"use strict";f();x1i.exports=/^#!(.*)/});var P1i=T((Mu0,R1i)=>{"use strict";f();var BUa=w1i();R1i.exports=(t="")=>{let e=t.match(BUa);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var D1i=T((Bu0,k1i)=>{"use strict";f();var u1r=require("fs"),LUa=P1i();function FUa(t){let r=Buffer.alloc(150),n;try{n=u1r.openSync(t,"r"),u1r.readSync(n,r,0,150,0),u1r.closeSync(n)}catch{}return LUa(r.toString())}a(FUa,"readShebang");k1i.exports=FUa});var B1i=T((Uu0,O1i)=>{"use strict";f();var UUa=require("path"),N1i=S1i(),M1i=I1i(),QUa=D1i(),qUa=process.platform==="win32",GUa=/\.(?:com|exe)$/i,HUa=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function jUa(t){t.file=N1i(t);let e=t.file&&QUa(t.file);return e?(t.args.unshift(t.file),t.command=e,N1i(t)):t.file}a(jUa,"detectShebang");function $Ua(t){if(!qUa)return t;let e=jUa(t),r=!GUa.test(e);if(t.options.forceShell||r){let n=HUa.test(e);t.command=UUa.normalize(t.command),t.command=M1i.command(t.command),t.args=t.args.map(s=>M1i.argument(s,n));let o=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${o}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}a($Ua,"parseNonShell");function VUa(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:$Ua(n)}a(VUa,"parse");O1i.exports=VUa});var U1i=T((Gu0,F1i)=>{"use strict";f();var d1r=process.platform==="win32";function f1r(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}a(f1r,"notFoundError");function WUa(t,e){if(!d1r)return;let r=t.emit;t.emit=function(n,o){if(n==="exit"){let s=L1i(o,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}a(WUa,"hookChildProcess");function L1i(t,e){return d1r&&t===1&&!e.file?f1r(e.original,"spawn"):null}a(L1i,"verifyENOENT");function zUa(t,e){return d1r&&t===1&&!e.file?f1r(e.original,"spawnSync"):null}a(zUa,"verifyENOENTSync");F1i.exports={hookChildProcess:WUa,verifyENOENT:L1i,verifyENOENTSync:zUa,notFoundError:f1r}});var G1i=T(($u0,w0e)=>{"use strict";f();var Q1i=require("child_process"),p1r=B1i(),h1r=U1i();function q1i(t,e,r){let n=p1r(t,e,r),o=Q1i.spawn(n.command,n.args,n.options);return h1r.hookChildProcess(o,n),o}a(q1i,"spawn");function YUa(t,e,r){let n=p1r(t,e,r),o=Q1i.spawnSync(n.command,n.args,n.options);return o.error=o.error||h1r.verifyENOENTSync(o.status,n),o}a(YUa,"spawnSync");w0e.exports=q1i;w0e.exports.spawn=q1i;w0e.exports.sync=YUa;w0e.exports._parse=p1r;w0e.exports._enoent=h1r});var lQa={};ui(lQa,{getTokenizer:()=>To,getTokenizerAsync:()=>uLe,main:()=>pvi});module.exports=Aa(lQa);f();f();tvr().install();f();f();f();var fd=class{static{a(this,"LogTarget")}},pN=class{static{a(this,"TelemetryLogSender")}},Se=class{constructor(e){this.category=e}static{a(this,"Logger")}log(e,r,...n){e.get(fd).logIt(e,r,this.category,...n)}debug(e,...r){this.log(e,4,...r)}info(e,...r){this.log(e,3,...r)}warn(e,...r){this.log(e,2,...r)}error(e,...r){this.log(e,1,...r)}exception(e,r,n){if(r instanceof Error&&r.name==="Canceled"&&r.message==="Canceled")return;let o=n;n.startsWith(".")&&(o=n.substring(1),n=`${this.category}${n}`),e.get(pN).sendException(e,r,n);let s=r instanceof Error?r:new Error(`Non-error thrown: ${String(r)}`);this.log(e,1,`${o}:`,s)}},Cr=new Se("default");f();f();f();var Cht="github.copilot",rvr="github-enterprise";f();f();f();f();var Eke=class{constructor(e){this.userInfo=e}static{a(this,"CopilotUserInfoWrapper")}get sku(){return this.userInfo?.access_type_sku}get isFreeUser(){return this.sku==="free_limited_copilot"}get isIndividualUser(){return this.copilotPlan==="free"||this.copilotPlan==="individual"||this.copilotPlan==="individual_pro"}get copilotPlan(){if(this.isFreeUser)return"free";let e=this.userInfo?.copilot_plan;switch(e){case"individual":case"individual_pro":case"business":case"enterprise":return e;default:return"individual"}}get quotaInfo(){return{quota_snapshots:this.userInfo?.quota_snapshots,quota_reset_date:this.userInfo?.quota_reset_date}}get raw(){return this.userInfo}};f();function vht(t){return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","faef89d9169d5eacf1d8c8dde3412e37","4535c7beffc844b46bb1ed4aa04d759a"].find(r=>t.includes(r))}a(vht,"findKnownOrg");function nvr(t){let e=t.organization_list??[];return vht(e)??""}a(nvr,"getUserKind");f();f();var L0e=class extends Error{static{a(this,"HttpTimeoutError")}constructor(e,r){super(e,{cause:r}),this.name="HttpTimeoutError"}};function Y0(t){return!t||typeof t!="object"?!1:t instanceof L0e||"name"in t&&t.name==="AbortError"||"code"in t&&t.code==="ABORT_ERR"}a(Y0,"isAbortError");var JJ=class extends SyntaxError{constructor(r,n){super(r);this.code=n;this.name="JsonParseError"}static{a(this,"JsonParseError")}},T2=class extends Error{static{a(this,"FetchResponseError")}constructor(e,r=`HTTP ${e.status} ${e.statusText}`){super(r),this.name="FetchResponseError",this.code=`HTTP${e.status}`}},nbi=new Set(["ECONNABORTED","ECONNRESET","EHOSTUNREACH","ENETUNREACH","ENOTCONN","ENOTFOUND","ETIMEDOUT","ERR_HTTP2_STREAM_ERROR","ERR_SSL_BAD_DECRYPT","ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC","ERR_SSL_INVALID_LIBRARY_(0)","ERR_SSL_SSLV3_ALERT_BAD_RECORD_MAC","ERR_SSL_WRONG_VERSION_NUMBER","ERR_STREAM_PREMATURE_CLOSE","ERR_TLS_CERT_ALTNAME_INVALID"]);function Ab(t,e=!0){return t instanceof Error?e&&"cause"in t&&Ab(t.cause,!1)?!0:t.name==="EditorFetcherError"||t.name==="FetchError"||t instanceof JJ||t instanceof T2||t?.message?.startsWith("net::")||nbi.has(t.code??""):!1}a(Ab,"isNetworkError");var S2=class{constructor(e,r,n,o,s){this.status=e;this.statusText=r;this.headers=n;this.getText=o;this.getBody=s;this.ok=this.status>=200&&this.status<300;this.clientError=this.status>=400&&this.status<500}static{a(this,"Response")}async text(){return this.getText()}async json(){let e=await this.text(),r=this.headers.get("content-type");if(!r||!r.includes("json"))throw new JJ(`Response content-type is ${r??"missing"} (status=${this.status})`,`ContentType=${r}`);try{return JSON.parse(e)}catch(n){if(n instanceof SyntaxError){let o=n.message.match(/^(.*?) in JSON at position (\d+)(?: \(line \d+ column \d+\))?$/);if(o&&parseInt(o[2],10)==e.length||n.message==="Unexpected end of JSON input"){let s=new TextEncoder().encode(e).length,c=this.headers.get("content-length");throw c===null?new JJ(`Response body truncated: actualLength=${s}`,"Truncated"):new JJ(`Response body truncated: actualLength=${s}, headerLength=${c}`,"Truncated")}}throw n}}body(){return this.getBody()}};function _ke(t){let e=t.headers.get("retry-after");if(!e)return;let r=Number.parseFloat(e);if(Number.isFinite(r)&&r>=0)return r;let n=Date.parse(e);if(Number.isNaN(n))return;let o=n-Date.now();return o<=0?0:o/1e3}a(_ke,"parseRetryAfterSeconds");f();function Cke(){return typeof process>"u"}a(Cke,"isWeb");function TI(){return typeof process<"u"&&process.env.MSBENCH_MODE==="true"}a(TI,"isMsBenchModeEnabled");var bht=class extends T2{static{a(this,"ProxiedResponseError")}constructor(e){super(e,`HTTP ${e.status} response does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`)}};async function au(t,e,r,n={}){n={...n,headers:{Authorization:`Bearer ${e.accessToken}`,...Cke()?{}:sE(t),...n.headers}};let o=await t.get(dr).fetch(new URL(r,e.apiUrl).href,n);if(o.status>=500)throw new T2(o);if(!o.headers.get("x-github-request-id"))throw new bht(o);return o}a(au,"apiFetch");f();f();f();var dbr=de(mN());var $r=class{constructor(e=10){this.valueMap=new Map;if(e<1)throw new Error("Size limit must be at least 1");this.sizeLimit=e}static{a(this,"LRUCacheMap")}set(e,r){if(this.has(e))this.valueMap.delete(e);else if(this.valueMap.size>=this.sizeLimit){let n=this.valueMap.keys().next().value;this.delete(n)}return this.valueMap.set(e,r),this}get(e){if(this.valueMap.has(e)){let r=this.valueMap.get(e);return this.valueMap.delete(e),this.valueMap.set(e,r),r}}delete(e){return this.valueMap.delete(e)}clear(){this.valueMap.clear()}get size(){return this.valueMap.size}keys(){return new Map(this.valueMap).keys()}values(){return new Map(this.valueMap).values()}entries(){return new Map(this.valueMap).entries()}[Symbol.iterator](){return this.entries()}has(e){return this.valueMap.has(e)}forEach(e,r){new Map(this.valueMap).forEach(e,r)}get[Symbol.toStringTag](){return"LRUCacheMap"}peek(e){return this.valueMap.get(e)}},SI=class extends $r{constructor(r,n=120*1e3){super(r);this.defaultTtl=n;this.expiration=new Map}static{a(this,"LRUExpirationCacheMap")}has(r){let n=!1,o=this.expiration.get(r);return o!==void 0&&(o>performance.now()&&(n=super.has(r)),n||this.delete(r)),n}get(r){let n=this.expiration.get(r);if(n!==void 0){if(n>performance.now())return super.get(r);this.delete(r)}}peek(r){let n=this.expiration.get(r);if(n!==void 0){if(n>performance.now())return super.peek(r);this.delete(r)}}set(r,n,o=this.defaultTtl){if(o<=0)throw new Error("TTL must be greater than 0");let s=super.set(r,n);return this.expiration.set(r,performance.now()+o),s}clear(){super.clear(),this.expiration.clear()}delete(r){return this.expiration.delete(r),super.delete(r)}get[Symbol.toStringTag](){return"LRUExpirationCacheMap"}},s5e=class extends $r{static{a(this,"LRUDisposableCacheMap")}delete(e){let r=this.peek(e);return r&&r.dispose(),super.delete(e)}clear(){for(let e of this.values())e.dispose();super.clear()}uncache(e){let r=this.peek(e);return super.delete(e),r}dispose(){this.clear()}};var dc=class{constructor(){this.recentNotifications=new $r(100)}static{a(this,"NotificationSender")}async showWarningMessageOnlyOnce(e,r,...n){if(!this.recentNotifications.has(e??r))return this.recentNotifications.set(e??r,!0),this.showWarningMessage(r,...n)}async showInformationMessageOnlyOnce(e,r,...n){if(!this.recentNotifications.has(e??r))return this.recentNotifications.set(e??r,!0),this.showInformationMessage(r,...n)}};f();var yb=class t{constructor(e){this.flags=e}static{a(this,"RuntimeMode")}static fromEnvironment(e,r=process.argv,n=process.env){return new t({debug:pbr(r,n),verboseLogging:obi(r,n),testMode:e,simulation:ibi(n)})}};function RC(t){return t.get(yb).flags.testMode}a(RC,"isRunningInTest");function XJ(t){return RC(t)}a(XJ,"shouldFailForDebugPurposes");function U0e(t){return t.get(yb).flags.debug}a(U0e,"isDebugEnabled");function fbr(t){return t.get(yb).flags.verboseLogging}a(fbr,"isVerboseLoggingEnabled");function pbr(t,e){return t.includes("--debug")||Iht(e,"DEBUG")}a(pbr,"determineDebugFlag");function ibi(t){return Iht(t,"SIMULATION")}a(ibi,"determineSimulationFlag");function a5e(t){return t.get(yb).flags.simulation}a(a5e,"isRunningInSimulation");function obi(t,e){return e.COPILOT_AGENT_VERBOSE==="1"||e.COPILOT_AGENT_VERBOSE?.toLowerCase()==="true"||Iht(e,"VERBOSE")||pbr(t,e)}a(obi,"determineVerboseLoggingEnabled");function Iht(t,e){for(let r of["GH_COPILOT_","GITHUB_COPILOT_"]){let n=t[`${r}${e}`];if(n)return n==="1"||n?.toLowerCase()==="true"}return!1}a(Iht,"determineEnvFlagEnabled");f();f();var zh=class t{static{a(this,"ContentProvider")}static{this.registeredSchemes=new Set}static registerSchemes(e){for(let r of e)t.registeredSchemes.add(r)}static isRegisteredScheme(e){return t.registeredSchemes.has(e)}};var gbr=require("os"),c5e=require("path");f();var hbr;(()=>{"use strict";var t={975:M=>{function N(D){if(typeof D!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(D))}a(N,"e");function G(D,F){for(var U,L="",H=0,$=-1,W=0,j=0;j<=D.length;++j){if(j2){var ce=L.lastIndexOf("/");if(ce!==L.length-1){ce===-1?(L="",H=0):H=(L=L.slice(0,ce)).length-1-L.lastIndexOf("/"),$=j,W=0;continue}}else if(L.length===2||L.length===1){L="",H=0,$=j,W=0;continue}}F&&(L.length>0?L+="/..":L="..",H=2)}else L.length>0?L+="/"+D.slice($+1,j):L=D.slice($+1,j),H=j-$-1;$=j,W=0}else U===46&&W!==-1?++W:W=-1}return L}a(G,"r");var O={resolve:a(function(){for(var D,F="",U=!1,L=arguments.length-1;L>=-1&&!U;L--){var H;L>=0?H=arguments[L]:(D===void 0&&(D=process.cwd()),H=D),N(H),H.length!==0&&(F=H+"/"+F,U=H.charCodeAt(0)===47)}return F=G(F,!U),U?F.length>0?"/"+F:"/":F.length>0?F:"."},"resolve"),normalize:a(function(D){if(N(D),D.length===0)return".";var F=D.charCodeAt(0)===47,U=D.charCodeAt(D.length-1)===47;return(D=G(D,!F)).length!==0||F||(D="."),D.length>0&&U&&(D+="/"),F?"/"+D:D},"normalize"),isAbsolute:a(function(D){return N(D),D.length>0&&D.charCodeAt(0)===47},"isAbsolute"),join:a(function(){if(arguments.length===0)return".";for(var D,F=0;F0&&(D===void 0?D=U:D+="/"+U)}return D===void 0?".":O.normalize(D)},"join"),relative:a(function(D,F){if(N(D),N(F),D===F||(D=O.resolve(D))===(F=O.resolve(F)))return"";for(var U=1;Uj){if(F.charCodeAt($+J)===47)return F.slice($+J+1);if(J===0)return F.slice($+J)}else H>j&&(D.charCodeAt(U+J)===47?ce=J:J===0&&(ce=0));break}var Te=D.charCodeAt(U+J);if(Te!==F.charCodeAt($+J))break;Te===47&&(ce=J)}var fe="";for(J=U+ce+1;J<=L;++J)J!==L&&D.charCodeAt(J)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+F.slice($+ce):($+=ce,F.charCodeAt($)===47&&++$,F.slice($))},"relative"),_makeLong:a(function(D){return D},"_makeLong"),dirname:a(function(D){if(N(D),D.length===0)return".";for(var F=D.charCodeAt(0),U=F===47,L=-1,H=!0,$=D.length-1;$>=1;--$)if((F=D.charCodeAt($))===47){if(!H){L=$;break}}else H=!1;return L===-1?U?"/":".":U&&L===1?"//":D.slice(0,L)},"dirname"),basename:a(function(D,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');N(D);var U,L=0,H=-1,$=!0;if(F!==void 0&&F.length>0&&F.length<=D.length){if(F.length===D.length&&F===D)return"";var W=F.length-1,j=-1;for(U=D.length-1;U>=0;--U){var ce=D.charCodeAt(U);if(ce===47){if(!$){L=U+1;break}}else j===-1&&($=!1,j=U+1),W>=0&&(ce===F.charCodeAt(W)?--W==-1&&(H=U):(W=-1,H=j))}return L===H?H=j:H===-1&&(H=D.length),D.slice(L,H)}for(U=D.length-1;U>=0;--U)if(D.charCodeAt(U)===47){if(!$){L=U+1;break}}else H===-1&&($=!1,H=U+1);return H===-1?"":D.slice(L,H)},"basename"),extname:a(function(D){N(D);for(var F=-1,U=0,L=-1,H=!0,$=0,W=D.length-1;W>=0;--W){var j=D.charCodeAt(W);if(j!==47)L===-1&&(H=!1,L=W+1),j===46?F===-1?F=W:$!==1&&($=1):F!==-1&&($=-1);else if(!H){U=W+1;break}}return F===-1||L===-1||$===0||$===1&&F===L-1&&F===U+1?"":D.slice(F,L)},"extname"),format:a(function(D){if(D===null||typeof D!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof D);return(function(F,U){var L=U.dir||U.root,H=U.base||(U.name||"")+(U.ext||"");return L?L===U.root?L+H:L+"/"+H:H})(0,D)},"format"),parse:a(function(D){N(D);var F={root:"",dir:"",base:"",ext:"",name:""};if(D.length===0)return F;var U,L=D.charCodeAt(0),H=L===47;H?(F.root="/",U=1):U=0;for(var $=-1,W=0,j=-1,ce=!0,J=D.length-1,Te=0;J>=U;--J)if((L=D.charCodeAt(J))!==47)j===-1&&(ce=!1,j=J+1),L===46?$===-1?$=J:Te!==1&&(Te=1):$!==-1&&(Te=-1);else if(!ce){W=J+1;break}return $===-1||j===-1||Te===0||Te===1&&$===j-1&&$===W+1?j!==-1&&(F.base=F.name=W===0&&H?D.slice(1,j):D.slice(W,j)):(W===0&&H?(F.name=D.slice(1,$),F.base=D.slice(1,j)):(F.name=D.slice(W,$),F.base=D.slice(W,j)),F.ext=D.slice($,j)),W>0?F.dir=D.slice(0,W-1):H&&(F.dir="/"),F},"parse"),sep:"/",delimiter:":",win32:null,posix:null};O.posix=O,M.exports=O}},e={};function r(M){var N=e[M];if(N!==void 0)return N.exports;var G=e[M]={exports:{}};return t[M](G,G.exports,r),G.exports}a(r,"r"),r.d=(M,N)=>{for(var G in N)r.o(N,G)&&!r.o(M,G)&&Object.defineProperty(M,G,{enumerable:!0,get:N[G]})},r.o=(M,N)=>Object.prototype.hasOwnProperty.call(M,N),r.r=M=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})};var n={};let o;r.r(n),r.d(n,{URI:a(()=>m,"URI"),Utils:a(()=>Q,"Utils")}),typeof process=="object"?o=process.platform==="win32":typeof navigator=="object"&&(o=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;function u(M,N){if(!M.scheme&&N)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!s.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!c.test(M.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}a(u,"a");let d="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static{a(this,"l")}static isUri(N){return N instanceof m||!!N&&typeof N.authority=="string"&&typeof N.fragment=="string"&&typeof N.path=="string"&&typeof N.query=="string"&&typeof N.scheme=="string"&&typeof N.fsPath=="string"&&typeof N.with=="function"&&typeof N.toString=="function"}scheme;authority;path;query;fragment;constructor(N,G,O,D,F,U=!1){typeof N=="object"?(this.scheme=N.scheme||d,this.authority=N.authority||d,this.path=N.path||d,this.query=N.query||d,this.fragment=N.fragment||d):(this.scheme=(function(L,H){return L||H?L:"file"})(N,U),this.authority=G||d,this.path=(function(L,H){switch(L){case"https":case"http":case"file":H?H[0]!==p&&(H=p+H):H=p}return H})(this.scheme,O||d),this.query=D||d,this.fragment=F||d,u(this,U))}get fsPath(){return v(this,!1)}with(N){if(!N)return this;let{scheme:G,authority:O,path:D,query:F,fragment:U}=N;return G===void 0?G=this.scheme:G===null&&(G=d),O===void 0?O=this.authority:O===null&&(O=d),D===void 0?D=this.path:D===null&&(D=d),F===void 0?F=this.query:F===null&&(F=d),U===void 0?U=this.fragment:U===null&&(U=d),G===this.scheme&&O===this.authority&&D===this.path&&F===this.query&&U===this.fragment?this:new A(G,O,D,F,U)}static parse(N,G=!1){let O=h.exec(N);return O?new A(O[2]||d,w(O[4]||d),w(O[5]||d),w(O[7]||d),w(O[9]||d),G):new A(d,d,d,d,d)}static file(N){let G=d;if(o&&(N=N.replace(/\\/g,p)),N[0]===p&&N[1]===p){let O=N.indexOf(p,2);O===-1?(G=N.substring(2),N=p):(G=N.substring(2,O),N=N.substring(O)||p)}return new A("file",G,N,d,d)}static from(N){let G=new A(N.scheme,N.authority,N.path,N.query,N.fragment);return u(G,!0),G}toString(N=!1){return b(this,N)}toJSON(){return this}static revive(N){if(N){if(N instanceof m)return N;{let G=new A(N);return G._formatted=N.external,G._fsPath=N._sep===g?N.fsPath:null,G}}return N}}let g=o?1:void 0;class A extends m{static{a(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(N=!1){return N?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){let N={$mid:1};return this._fsPath&&(N.fsPath=this._fsPath,N._sep=g),this._formatted&&(N.external=this._formatted),this.path&&(N.path=this.path),this.scheme&&(N.scheme=this.scheme),this.authority&&(N.authority=this.authority),this.query&&(N.query=this.query),this.fragment&&(N.fragment=this.fragment),N}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function E(M,N,G){let O,D=-1;for(let F=0;F=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||N&&U===47||G&&U===91||G&&U===93||G&&U===58)D!==-1&&(O+=encodeURIComponent(M.substring(D,F)),D=-1),O!==void 0&&(O+=M.charAt(F));else{O===void 0&&(O=M.substr(0,F));let L=y[U];L!==void 0?(D!==-1&&(O+=encodeURIComponent(M.substring(D,F)),D=-1),O+=L):D===-1&&(D=F)}}return D!==-1&&(O+=encodeURIComponent(M.substring(D))),O!==void 0?O:M}a(E,"m");function _(M){let N;for(let G=0;G1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?N?M.path.substr(1):M.path[1].toLowerCase()+M.path.substr(2):M.path,o&&(G=G.replace(/\//g,"\\")),G}a(v,"v");function b(M,N){let G=N?_:E,O="",{scheme:D,authority:F,path:U,query:L,fragment:H}=M;if(D&&(O+=D,O+=":"),(F||D==="file")&&(O+=p,O+=p),F){let $=F.indexOf("@");if($!==-1){let W=F.substr(0,$);F=F.substr($+1),$=W.lastIndexOf(":"),$===-1?O+=G(W,!1,!1):(O+=G(W.substr(0,$),!1,!1),O+=":",O+=G(W.substr($+1),!1,!0)),O+="@"}F=F.toLowerCase(),$=F.lastIndexOf(":"),$===-1?O+=G(F,!1,!0):(O+=G(F.substr(0,$),!1,!0),O+=F.substr($))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let $=U.charCodeAt(1);$>=65&&$<=90&&(U=`/${String.fromCharCode($+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let $=U.charCodeAt(0);$>=65&&$<=90&&(U=`${String.fromCharCode($+32)}:${U.substr(2)}`)}O+=G(U,!0,!1)}return L&&(O+="?",O+=G(L,!1,!1)),H&&(O+="#",O+=N?H:E(H,!1,!1)),O}a(b,"b");function I(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+I(M.substr(3)):M}}a(I,"C");let x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(M){return M.match(x)?M.replace(x,(N=>I(N))):M}a(w,"w");var R=r(975);let P=R.posix||R,k="/";var Q;(function(M){M.joinPath=function(N,...G){return N.with({path:P.join(N.path,...G)})},M.resolvePath=function(N,...G){let O=N.path,D=!1;O[0]!==k&&(O=k+O,D=!0);let F=P.resolve(O,...G);return D&&F[0]===k&&!N.authority&&(F=F.substring(1)),N.with({path:F})},M.dirname=function(N){if(N.path.length===0||N.path===k)return N;let G=P.dirname(N.path);return G.length===1&&G.charCodeAt(0)===46&&(G=""),N.with({path:G})},M.basename=function(N){return P.basename(N.path)},M.extname=function(N){return P.extname(N.path)}})(Q||(Q={})),hbr=n})();var{URI:H3,Utils:Q0e}=hbr;function Abr(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substring(0,3)+Abr(t.substring(3)):t}}a(Abr,"decodeURIComponentGraceful");var mbr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function xht(t){return t.match(mbr)?t.replace(mbr,e=>Abr(e)):t}a(xht,"percentDecode");function kc(t){if(/^[A-Za-z][A-Za-z0-9+.-]+:/.test(t))throw new Error("Path must not contain a scheme");if(!t)throw new Error("Path must not be empty");return H3.file(t).toString()}a(kc,"makeFsUri");function bl(t){if(typeof t!="string"&&(t=t.uri),/^[A-Za-z]:\\/.test(t))throw new Error(`Could not parse <${t}>: Windows-style path`);try{let e=t.match(/^(?:([^:/?#]+?:)?\/\/)(\/\/.*)$/);return e?H3.parse(e[1]+e[2],!0):H3.parse(t,!0)}catch(e){throw new Error(`Could not parse <${t}>`,{cause:e})}}a(bl,"parseUri");function l5e(t){return bl(t),t}a(l5e,"validateUri");function ca(t){try{return bl(t).toString()}catch{return t}}a(ca,"normalizeUri");function ZJ(t){let e=ca(t);return e.endsWith("/")?e.slice(0,-1):e}a(ZJ,"normalizeUriNoTrailingSlash");var eX=new Set(["file","notebook","vscode-notebook","vscode-notebook-cell"]);function Bo(t){let e=bl(t);if(!eX.has(e.scheme)&&!zh.isRegisteredScheme(e.scheme))throw new Error(`Copilot currently does not support URI with scheme: ${e.scheme}`);if((0,gbr.platform)()==="win32"){let r=e.path;return e.authority?r=`//${e.authority}${e.path}`:/^\/[A-Za-z]:/.test(r)&&(r=r.substring(1)),(0,c5e.normalize)(r)}else{if(e.authority)throw new Error("Unsupported remote file path");return e.path}}a(Bo,"fsPath");function mo(t){try{return Bo(t)}catch{return}}a(mo,"getFsPath");function ybr(t){let e=mo(t);if(e)return H3.file(e).toString()}a(ybr,"getFsUri");function cq(t,...e){let r,n=mo(t);return n?r=kc((0,c5e.resolve)(n,...e)):r=Q0e.resolvePath(bl(t),...e.map(o=>Ebr(o))).toString(),typeof t=="string"?r:{uri:r}}a(cq,"resolveFilePath");function bi(t,...e){let r=Q0e.joinPath(bl(t),...e.map(Ebr)).toString();return typeof t=="string"?r:{uri:r}}a(bi,"joinPath");function Ebr(t){return sbi(t)?t.replaceAll("\\","/"):t}a(Ebr,"pathToURIPath");function sbi(t){return/^[^/\\]*\\/.test(t)}a(sbi,"isWinPath");function Zn(t){return xht((typeof t=="string"?t:t.uri).replace(/[#?].*$/,"").replace(/\/$/,"").replace(/^.*[/:]/,""))}a(Zn,"basename");function Lu(t){let e=Q0e.dirname(bl(t)),r;return eX.has(e.scheme)&&e.scheme!=="file"?r=e.with({scheme:"file",fragment:""}).toString():r=e.toString(),typeof t=="string"?r:{uri:r}}a(Lu,"dirname");function _br(t){return Q0e.extname(bl(t))}a(_br,"extname");var Fp=class{static{a(this,"NetworkConfiguration")}};function u5e(t,e){try{let r=new URL(e??"");if(r.protocol==="https:"||!Rht(t)&&r.protocol==="http:")return r.href}catch{}}a(u5e,"ensurePermittedUrl");var lq={api:"https://api.githubcopilot.com",proxy:"https://copilot-proxy.githubusercontent.com",telemetry:"https://copilot-telemetry.githubusercontent.com","origin-tracker":"https://origin-tracker.githubusercontent.com"};function wht(t,e,r){if(r&&RC(t)){for(let n of r){let o=vr(t,n);if(o)return o}return}for(let n of e){let o=vr(t,n);if(o)return o}}a(wht,"urlConfigOverride");function abi(t,e){switch(e){case"api":return wht(t,[tt.DebugOverrideCapiUrl,tt.DebugOverrideCapiUrlLegacy],[tt.DebugTestOverrideCapiUrl,tt.DebugTestOverrideCapiUrlLegacy]);case"proxy":return wht(t,[tt.DebugOverrideProxyUrl,tt.DebugOverrideProxyUrlLegacy],[tt.DebugTestOverrideProxyUrl,tt.DebugTestOverrideProxyUrlLegacy]);case"origin-tracker":if(!Rht(t))return wht(t,[tt.DebugSnippyOverrideUrl])}}a(abi,"getEndpointOverrideUrl");function I2(t,e,r,...n){let o=abi(t,r)??e.endpoints[r];return bi(o,...n)}a(I2,"getEndpointUrl");function tX(t){return j3(t)?.endpoints??lq}a(tX,"getLastKnownEndpoints");function Cbr(t,e){if(e&&!u5e(t,e)){t.get(dc).showWarningMessage(`Ignoring invalid or unsupported authentication URL "${e}".`);return}t.get(Fp).setConfiguredUrls(t,{serverUrl:e})}a(Cbr,"updateServerUrl");f();f();f();f();var II=class{static{a(this,"InlineCompletionsUnification")}},cbi={codeUnification:!1,modelUnification:!1,expAssignments:[]},rX=class extends II{constructor(){super(...arguments);this.inlineCompletionsUnificationState=cbi;this.onDidChangeState=a(()=>({dispose:a(()=>{},"dispose")}),"onDidChangeState")}static{a(this,"NullInlineCompletionsUnification")}};var aE=class t{static{a(this,"ExpConfig")}constructor(e,r,n){this.variables=e,this.assignmentContext=r,this.features=n}static createFallbackConfig(e,r){return d5e(e,{reason:r}),this.createEmptyConfig()}static createEmptyConfig(){return new t({},"","")}addToTelemetry(e,r){let o=e.get(II).inlineCompletionsUnificationState.expAssignments.filter(c=>!this.assignmentContext.includes(c)),s=[this.assignmentContext,...o].filter(Boolean).join(";");r.properties["VSCode.ABExp.Features"]=this.features,r.properties["abexp.assignmentcontext"]=s}};f();var kA="X-Copilot-RelatedPluginVersion-",nX=(j=>(j.Market="X-MSEdge-Market",j.CorpNet="X-FD-Corpnet",j.Build="X-VSCode-Build",j.ApplicationVersion="X-VSCode-AppVersion",j.TargetPopulation="X-VSCode-TargetPopulation",j.ClientId="X-MSEdge-ClientId",j.DevDeviceId="X-VSCode-DevDeviceId",j.ExtensionName="X-VSCode-ExtensionName",j.ExtensionVersion="X-VSCode-ExtensionVersion",j.ExtensionRelease="X-VSCode-ExtensionRelease",j.CompletionsInChatExtensionVersion="X-VSCode-CompletionsInChatExtensionVersion",j.Language="X-VSCode-Language",j.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",j.CopilotEngine="X-Copilot-Engine",j.CopilotOverrideEngine="X-Copilot-OverrideEngine",j.CopilotRepository="X-Copilot-Repository",j.CopilotFileType="X-Copilot-FileType",j.CopilotUserKind="X-Copilot-UserKind",j.CopilotDogfood="X-Copilot-Dogfood",j.CopilotCustomModel="X-Copilot-CustomModel",j.CopilotOrgs="X-Copilot-Orgs",j.CopilotCustomModelNames="X-Copilot-CustomModelNames",j.CopilotTrackingId="X-Copilot-CopilotTrackingId",j.CopilotClientVersion="X-Copilot-ClientVersion",j.CopilotSku="X-Copilot-SKU",j.CopilotRelatedPluginVersionCppTools=kA+"msvscodecpptools",j.CopilotRelatedPluginVersionCMakeTools=kA+"msvscodecmaketools",j.CopilotRelatedPluginVersionMakefileTools=kA+"msvscodemakefiletools",j.CopilotRelatedPluginVersionCSharpDevKit=kA+"msdotnettoolscsdevkit",j.CopilotRelatedPluginVersionPython=kA+"mspythonpython",j.CopilotRelatedPluginVersionPylance=kA+"mspythonvscodepylance",j.CopilotRelatedPluginVersionJavaPack=kA+"vscjavavscodejavapack",j.CopilotRelatedPluginVersionJavaManager=kA+"vscjavavscodejavadependency",j.CopilotRelatedPluginVersionTypescript=kA+"vscodetypescriptlanguagefeatures",j.CopilotRelatedPluginVersionTypescriptNext=kA+"msvscodevscodetypescriptnext",j.CopilotRelatedPluginVersionCSharp=kA+"msdotnettoolscsharp",j.CopilotRelatedPluginVersionGithubCopilotChat=kA+"githubcopilotchat",j.CopilotRelatedPluginVersionGithubCopilot=kA+"githubcopilot",j))(nX||{});var lbi={"X-Copilot-ClientTimeBucket":"timeBucket","X-Copilot-OverrideEngine":"engine","X-Copilot-Repository":"repo","X-Copilot-FileType":"fileType","X-Copilot-UserKind":"userKind"},gN=class t{constructor(e){this.filters=e;for(let[r,n]of Object.entries(this.filters))n===""&&delete this.filters[r]}static{a(this,"FilterSettings")}extends(e){for(let[r,n]of Object.entries(e.filters))if(this.filters[r]!==n)return!1;return!0}addToTelemetry(e){for(let[r,n]of Object.entries(this.filters)){let o=lbi[r];o!==void 0&&(e.properties[o]=n)}}stringify(){let e=Object.keys(this.filters);return e.sort(),e.map(r=>`${r}:${this.filters[r]}`).join(";")}toHeaders(){return{...this.filters}}withChange(e,r){return new t({...this.filters,[e]:r})}};f();f();f();function Ps(t,e){let r=Up(t,e,"event.CopilotToken");return t.get(Nt).onDidChangeTokenResult(n=>{n.copilotToken&&r(n.copilotToken)})}a(Ps,"onCopilotToken");function kht(t){let e=t.getTokenValue("tid"),r=t.organization_list,n=t.enterprise_list,o=t.getTokenValue("sku");if(!e)return;let s={copilot_trackingId:e};return r&&(s.organizations_list=r.toString()),n&&(s.enterprise_list=n.toString()),o&&(s.sku=o),s}a(kht,"propertiesFromCopilotToken");var pd=class{constructor(e){this.#e={};this.optedIn=!1;this.ftFlag="";Ps(e,r=>this.updateFromToken(r))}static{a(this,"TelemetryUserConfig")}#e;getProperties(){return this.#e}get trackingId(){return this.#e.copilot_trackingId}updateFromToken(e){let r=kht(e);r&&(this.#e=r,this.optedIn=e.getTokenValue("rt")==="1",this.ftFlag=e.getTokenValue("ft")??"")}};var f5e=de(mN()),p5e=de(require("os"));var ubi=/^(\s+at)?(.*?)(@|\s\(|\s)([^(\n]+?)(:\d+)?(:\d+)?(\)?)$/;function dbi(t){let e={type:t.name,value:t.message},r=t.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,"");if(r?.startsWith(t.toString()+` +`)){e.stacktrace=[];for(let n of r.slice(t.toString().length+1).split(/\n/).reverse()){let o=n.match(ubi),s={filename:"",function:""};o&&(s.function=o[2]?.trim()?.replace(/^[^.]{1,2}(\.|$)/,"_$1")??s.function,s.filename=(o[4]?.trim()??s.filename).replace(/^\.\/dist\//,"/github-copilot/dist/"),o[5]&&o[5]!==":0"&&(s.lineno=o[5].slice(1)),o[6]&&o[5]!==":0"&&(s.colno=o[6].slice(1)),s.in_app=!/[[<:]|(?:^|\/)node_modules\//.test(s.filename)),e.stacktrace.push(s)}}return e}a(dbi,"buildExceptionDetail");function Dht(t,e){let r=t.get(Dr),n=r.getEditorInfo(),o=t.get(pd),s={"#editor":n.devName??n.name,"#editor_version":PC({name:n.devName??n.name,version:n.version}),"#plugin":r.getEditorPluginInfo().name,"#plugin_version":PC(r.getEditorPluginInfo()),"#session_id":t.get(Vs).sessionId,"#machine_id":t.get(Vs).machineId,"#architecture":p5e.arch(),"#os_platform":p5e.platform(),...e};return o.trackingId&&(s.user=o.trackingId,s["#tracking_id"]=o.trackingId),s}a(Dht,"buildContext");function vbr(t,e,r){let n=t.get(Vo),o=t.get(Dr).getEditorInfo(),s=typeof process<"u"?process.versions.node:"web",c={app:"copilot-client",rollup_id:"auto",platform:"node",release:n.getBuildType()!=="dev"?`copilot-client@${n.getVersion()}`:void 0,deployed_to:n.getBuildType(),catalog_service:o.name==="vscode"?"CopilotCompletionsVSCode":"CopilotLanguageServer",transaction:r,context:Dht(t,{"#node_version":s}),sensitive_context:{}},l=[];c.exception_detail=[];let u=0,d=e;for(;d instanceof Error&&u<10;){let h=dbi(d);c.exception_detail.unshift(h),l.unshift([d,h]),u+=1,d=d.cause}let p=[];for(let[h,m]of l)if(m.stacktrace&&m.stacktrace.length>0){p.push(`${m.type}: ${h.code??""}`);let g=[...m.stacktrace].reverse();for(let y of g)if(y.filename?.startsWith("/github-copilot/"))return c;let A=!1;for(let y of g)if(y.in_app){A=!0,p.push(`${y.filename?.replace(/^\.\//,"")}:${y.lineno}:${y.colno}`);break}A||p.push(r),p.push(`${g[0].filename?.replace(/^\.\//,"")}`)}else return c;return c.exception_detail.length>0&&(c.rollup_id=(0,f5e.SHA256)(f5e.enc.Utf16.parse(p.join(` +`))).toString()),c}a(vbr,"buildPayload");f();var q0e=class{static{a(this,"FailingTelemetryReporter")}sendTelemetryEvent(e,r,n){throw new Error("Telemetry disabled")}sendTelemetryErrorEvent(e,r,n,o){throw new Error("Telemetry disabled")}dispose(){return Promise.resolve()}hackOptOutListener(){}};f();var Tbr=7*86400*1e3,x2=class{constructor(e=5){this.perWeek=e;this.cache=new $r(1e3)}static{a(this,"ExceptionRateLimiter")}isThrottled(e){let r=Date.now(),n=this.cache.get(e)||new Array(this.perWeek).fill(-Tbr);return r-n[0]t?.length>0&&t!==".").map(t=>t.includes("\\")?new RegExp(Sbr(t.replace(/\\/g,"/")),"gi"):new RegExp(Sbr(t),"gi"));function pbi(t,e){if(!t||!t.includes("/")&&!t.includes("\\"))return t;let r=t,n=[];for(let l of e)for(;;){let u=l.exec(t);if(!u)break;n.push([u.index,l.lastIndex])}let o=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,c=0;for(r="";;){let l=s.exec(t);if(!l)break;let u=n.some(([d,p])=>l.index",c=s.lastIndex)}return c`;return t}a(hbi,"removePropertiesWithPossibleUserInfo");function mbi(t){return t.replace(/([\s|(]|file:\/\/)(\/[^\s]+)/g,"$1[redacted]").replace(/([\s|(]|file:\/\/)([a-zA-Z]:[(\\|/){1,2}][^\s]+)/gi,"$1[redacted]").replace(/([\s|(]|file:\/\/)(\\[^\s]+)/gi,"$1[redacted]")}a(mbi,"redactPaths");function xbr(t,e=fbi){let r={};for(let[n,o]of Object.entries(t))if(typeof o=="string"){let s=o.replaceAll("%20"," "),c=hbi(s);if(c!==s){r[n]=c;continue}s=pbi(s,e);for(let l of e)s=s.replace(l,"");s=mbi(s),r[n]=s}return r}a(xbr,"sanitizeTelemetryProperties");function $3(t,e=Object.keys(t)){let r={};for(let n of e)t[n]!==void 0&&(r[n]=t[n]);return r}a($3,"filterTelemetryProperties");f();var cu=class{constructor(){this.promises=new Set}static{a(this,"PromiseQueue")}register(e){this.promises.add(e),e.finally(()=>this.promises.delete(e))}async flush(){await Promise.allSettled(this.promises)}};f();var Pbr=require("os"),kbr=de(require("path"));function G0e(t){return t.replace(/(file:\/\/)([^\s<>]+)/gi,"$1[redacted]").replace(/(^|[\s|:=(<'"`])((?:\/(?=[^/])|\\|[a-zA-Z]:[\\/])[^\s:)>'"`]+)/g,"$1[redacted]")}a(G0e,"redactPaths");var gbi=new Set(["Maximum call stack size exceeded","Set maximum size exceeded","Invalid arguments"]),Abi=[/^[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}.]+ is not a function[ \w]*$/u,/^Cannot read properties of undefined \(reading '[\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]+'\)$/u];function Oht(t){if(gbi.has(t))return t;for(let e of Abi)if(e.test(t))return t;return G0e(t).replace(/\bDNS:(?:\*\.)?[\w.-]+/gi,"DNS:[redacted]")}a(Oht,"redactMessage");function m5e(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(m5e,"escapeForRegExp");var ybi=new RegExp("(?<=^|[\\s|(\"'`]|file://)"+m5e((0,Pbr.homedir)())+"(?=$|[\\\\/:\"'`])","gi");function Mht(t){return t.replace(ybi,"~")}a(Mht,"redactHomeDir");var Dbr="[\\\\/]?([^:)]*)(?=:\\d)",wbr=new RegExp(m5e(kbr.sep),"g"),Rbr=new RegExp(m5e(__dirname.replace(/[\\/]lib[\\/]src[\\/]util$|[\\/]dist$/,""))+Dbr,"gi");function Bht(t,e,r=!1,n=[]){let o=new Error(e(t));o.name=t.name,typeof t.syscall=="string"&&(o.syscall=t.syscall),typeof t.code=="string"&&(o.code=t.code),typeof t.errno=="number"&&(o.errno=t.errno),o.stack=void 0;let s=t.stack?.replace(/^.*?:\d+\n.*\n *\^?\n\n/,""),c;for(let l of[t.toString(),`${t.name}: ${t.message}`])if(s?.startsWith(l+` +`)){c=s.slice(l.length+1).split(/\n/);break}if(c){o.stack=o.toString();for(let l of c)if(Rbr.test(l))o.stack+=` +${G0e(l.replace(Rbr,(u,d)=>"./"+d.replace(wbr,"/")))}`;else if(/[ (]node:|[ (]wasm:\/\/wasm\/| \(\)$/.test(l))o.stack+=` +${G0e(l)}`;else{let u=!1;for(let{prefix:d,path:p}of n){let h=new RegExp(m5e(p.replace(/[\\/]$/,""))+Dbr,"gi");if(h.test(l)){o.stack+=` +${G0e(l.replace(h,(m,g)=>d+g.replace(wbr,"/")))}`,u=!0;break}}if(u)continue;r?o.stack+=` +${Mht(l)}`:o.stack+=` + at [redacted]:0:0`}}else r&&s&&(o.stack=Mht(s));return t.cause instanceof Error&&(o.cause=Bht(t.cause,e,r,n)),o}a(Bht,"cloneError");function Nbr(t){let e=t.message;return typeof t.path=="string"&&t.path.length>0&&(e=e.replaceAll(t.path,"")),e}a(Nbr,"errorMessageWithoutPath");function Mbr(t,e){return Bht(t,a(function(n){return Mht(Nbr(n))},"prepareMessage"),!0,e)}a(Mbr,"prepareErrorForRestrictedTelemetry");function Obr(t,e,r=!1){return Bht(t,a(function(o){if(r)return Oht(Nbr(o));let s="[redacted]";return typeof o.code=="string"&&(s=o.code+" "+s),typeof o.syscall=="string"?s=G0e(o.syscall)+" "+s:"erroredSysCall"in o&&typeof o.erroredSysCall=="string"&&(s=o.erroredSysCall+" "+s),s},"prepareMessage"),!1,e)}a(Obr,"redactError");f();f();var cg={};ui(cg,{HasPropertyKey:()=>g5e,IsArray:()=>Xd,IsAsyncIterator:()=>Lht,IsBigInt:()=>H0e,IsBoolean:()=>AN,IsDate:()=>uq,IsFunction:()=>Fht,IsIterator:()=>Uht,IsNull:()=>Qht,IsNumber:()=>kC,IsObject:()=>Va,IsRegExp:()=>j0e,IsString:()=>Dc,IsSymbol:()=>qht,IsUint8Array:()=>yN,IsUndefined:()=>Zd});f();function g5e(t,e){return e in t}a(g5e,"HasPropertyKey");function Lht(t){return Va(t)&&!Xd(t)&&!yN(t)&&Symbol.asyncIterator in t}a(Lht,"IsAsyncIterator");function Xd(t){return Array.isArray(t)}a(Xd,"IsArray");function H0e(t){return typeof t=="bigint"}a(H0e,"IsBigInt");function AN(t){return typeof t=="boolean"}a(AN,"IsBoolean");function uq(t){return t instanceof globalThis.Date}a(uq,"IsDate");function Fht(t){return typeof t=="function"}a(Fht,"IsFunction");function Uht(t){return Va(t)&&!Xd(t)&&!yN(t)&&Symbol.iterator in t}a(Uht,"IsIterator");function Qht(t){return t===null}a(Qht,"IsNull");function kC(t){return typeof t=="number"}a(kC,"IsNumber");function Va(t){return typeof t=="object"&&t!==null}a(Va,"IsObject");function j0e(t){return t instanceof globalThis.RegExp}a(j0e,"IsRegExp");function Dc(t){return typeof t=="string"}a(Dc,"IsString");function qht(t){return typeof t=="symbol"}a(qht,"IsSymbol");function yN(t){return t instanceof globalThis.Uint8Array}a(yN,"IsUint8Array");function Zd(t){return t===void 0}a(Zd,"IsUndefined");function Ebi(t){return t.map(e=>A5e(e))}a(Ebi,"ArrayType");function _bi(t){return new Date(t.getTime())}a(_bi,"DateType");function Cbi(t){return new Uint8Array(t)}a(Cbi,"Uint8ArrayType");function vbi(t){return new RegExp(t.source,t.flags)}a(vbi,"RegExpType");function bbi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=A5e(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=A5e(t[r]);return e}a(bbi,"ObjectType");function A5e(t){return Xd(t)?Ebi(t):uq(t)?_bi(t):yN(t)?Cbi(t):j0e(t)?vbi(t):Va(t)?bbi(t):t}a(A5e,"Visit");function Tl(t){return A5e(t)}a(Tl,"Clone");function iX(t,e){return e===void 0?Tl(t):Tl({...e,...t})}a(iX,"CloneType");f();f();f();function y5e(t){return ji(t)&&globalThis.Symbol.asyncIterator in t}a(y5e,"IsAsyncIterator");function E5e(t){return ji(t)&&globalThis.Symbol.iterator in t}a(E5e,"IsIterator");function Ght(t){return ji(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}a(Ght,"IsStandardObject");function _5e(t){return t instanceof globalThis.Promise}a(_5e,"IsPromise");function DA(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}a(DA,"IsDate");function Bbr(t){return t instanceof globalThis.Map}a(Bbr,"IsMap");function Lbr(t){return t instanceof globalThis.Set}a(Lbr,"IsSet");function Eb(t){return globalThis.ArrayBuffer.isView(t)}a(Eb,"IsTypedArray");function oX(t){return t instanceof globalThis.Uint8Array}a(oX,"IsUint8Array");function di(t,e){return e in t}a(di,"HasPropertyKey");function ji(t){return t!==null&&typeof t=="object"}a(ji,"IsObject");function ei(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}a(ei,"IsArray");function Sl(t){return t===void 0}a(Sl,"IsUndefined");function EN(t){return t===null}a(EN,"IsNull");function w2(t){return typeof t=="boolean"}a(w2,"IsBoolean");function Ln(t){return typeof t=="number"}a(Ln,"IsNumber");function C5e(t){return globalThis.Number.isInteger(t)}a(C5e,"IsInteger");function Yh(t){return typeof t=="bigint"}a(Yh,"IsBigInt");function ks(t){return typeof t=="string"}a(ks,"IsString");function V3(t){return typeof t=="function"}a(V3,"IsFunction");function _N(t){return typeof t=="symbol"}a(_N,"IsSymbol");function DC(t){return Yh(t)||w2(t)||EN(t)||Ln(t)||ks(t)||_N(t)||Sl(t)}a(DC,"IsValueType");var Wc;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(c,l){return t.ExactOptionalPropertyTypes?l in c:c[l]!==void 0}a(e,"IsExactOptionalProperty"),t.IsExactOptionalProperty=e;function r(c){let l=ji(c);return t.AllowArrayObject?l:l&&!ei(c)}a(r,"IsObjectLike"),t.IsObjectLike=r;function n(c){return r(c)&&!(c instanceof Date)&&!(c instanceof Uint8Array)}a(n,"IsRecordLike"),t.IsRecordLike=n;function o(c){return t.AllowNaN?Ln(c):Number.isFinite(c)}a(o,"IsNumberLike"),t.IsNumberLike=o;function s(c){let l=Sl(c);return t.AllowNullVoid?l||c===null:l}a(s,"IsVoidLike"),t.IsVoidLike=s})(Wc||(Wc={}));f();function Tbi(t){return globalThis.Object.freeze(t).map(e=>$0e(e))}a(Tbi,"ImmutableArray");function Sbi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=$0e(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=$0e(t[r]);return globalThis.Object.freeze(e)}a(Sbi,"ImmutableObject");function $0e(t){return Xd(t)?Tbi(t):uq(t)?t:yN(t)?t:j0e(t)?t:Va(t)?Sbi(t):t}a($0e,"Immutable");function gt(t,e){let r=e!==void 0?{...e,...t}:t;switch(Wc.InstanceMode){case"freeze":return $0e(r);case"clone":return Tl(r);default:return r}}a(gt,"CreateType");f();var fi=class extends Error{static{a(this,"TypeBoxError")}constructor(e){super(e)}};f();f();f();var lu=Symbol.for("TypeBox.Transform"),xI=Symbol.for("TypeBox.Readonly"),Kh=Symbol.for("TypeBox.Optional"),_b=Symbol.for("TypeBox.Hint"),pt=Symbol.for("TypeBox.Kind");function sX(t){return Va(t)&&t[xI]==="Readonly"}a(sX,"IsReadonly");function cE(t){return Va(t)&&t[Kh]==="Optional"}a(cE,"IsOptional");function Hht(t){return gs(t,"Any")}a(Hht,"IsAny");function jht(t){return gs(t,"Argument")}a(jht,"IsArgument");function wI(t){return gs(t,"Array")}a(wI,"IsArray");function dq(t){return gs(t,"AsyncIterator")}a(dq,"IsAsyncIterator");function fq(t){return gs(t,"BigInt")}a(fq,"IsBigInt");function CN(t){return gs(t,"Boolean")}a(CN,"IsBoolean");function RI(t){return gs(t,"Computed")}a(RI,"IsComputed");function PI(t){return gs(t,"Constructor")}a(PI,"IsConstructor");function Ibi(t){return gs(t,"Date")}a(Ibi,"IsDate");function kI(t){return gs(t,"Function")}a(kI,"IsFunction");function DI(t){return gs(t,"Integer")}a(DI,"IsInteger");function Fu(t){return gs(t,"Intersect")}a(Fu,"IsIntersect");function pq(t){return gs(t,"Iterator")}a(pq,"IsIterator");function gs(t,e){return Va(t)&&pt in t&&t[pt]===e}a(gs,"IsKindOf");function v5e(t){return AN(t)||kC(t)||Dc(t)}a(v5e,"IsLiteralValue");function NC(t){return gs(t,"Literal")}a(NC,"IsLiteral");function MC(t){return gs(t,"MappedKey")}a(MC,"IsMappedKey");function Il(t){return gs(t,"MappedResult")}a(Il,"IsMappedResult");function W3(t){return gs(t,"Never")}a(W3,"IsNever");function xbi(t){return gs(t,"Not")}a(xbi,"IsNot");function V0e(t){return gs(t,"Null")}a(V0e,"IsNull");function NI(t){return gs(t,"Number")}a(NI,"IsNumber");function ef(t){return gs(t,"Object")}a(ef,"IsObject");function hq(t){return gs(t,"Promise")}a(hq,"IsPromise");function mq(t){return gs(t,"Record")}a(mq,"IsRecord");function hd(t){return gs(t,"Ref")}a(hd,"IsRef");function $ht(t){return gs(t,"RegExp")}a($ht,"IsRegExp");function vN(t){return gs(t,"String")}a(vN,"IsString");function W0e(t){return gs(t,"Symbol")}a(W0e,"IsSymbol");function OC(t){return gs(t,"TemplateLiteral")}a(OC,"IsTemplateLiteral");function wbi(t){return gs(t,"This")}a(wbi,"IsThis");function la(t){return Va(t)&&lu in t}a(la,"IsTransform");function BC(t){return gs(t,"Tuple")}a(BC,"IsTuple");function bN(t){return gs(t,"Undefined")}a(bN,"IsUndefined");function Ds(t){return gs(t,"Union")}a(Ds,"IsUnion");function Rbi(t){return gs(t,"Uint8Array")}a(Rbi,"IsUint8Array");function Pbi(t){return gs(t,"Unknown")}a(Pbi,"IsUnknown");function kbi(t){return gs(t,"Unsafe")}a(kbi,"IsUnsafe");function Dbi(t){return gs(t,"Void")}a(Dbi,"IsVoid");function z3(t){return Va(t)&&pt in t&&Dc(t[pt])}a(z3,"IsKind");function uu(t){return Hht(t)||jht(t)||wI(t)||CN(t)||fq(t)||dq(t)||RI(t)||PI(t)||Ibi(t)||kI(t)||DI(t)||Fu(t)||pq(t)||NC(t)||MC(t)||Il(t)||W3(t)||xbi(t)||V0e(t)||NI(t)||ef(t)||hq(t)||mq(t)||hd(t)||$ht(t)||vN(t)||W0e(t)||OC(t)||wbi(t)||BC(t)||bN(t)||Ds(t)||Rbi(t)||Pbi(t)||kbi(t)||Dbi(t)||z3(t)}a(uu,"IsSchema");var qe={};ui(qe,{IsAny:()=>qbr,IsArgument:()=>Gbr,IsArray:()=>Hbr,IsAsyncIterator:()=>jbr,IsBigInt:()=>$br,IsBoolean:()=>Vbr,IsComputed:()=>Wbr,IsConstructor:()=>zbr,IsDate:()=>Ybr,IsFunction:()=>Kbr,IsImport:()=>Fbi,IsInteger:()=>Jbr,IsIntersect:()=>Xbr,IsIterator:()=>Zbr,IsKind:()=>STr,IsKindOf:()=>Wo,IsLiteral:()=>Y0e,IsLiteralBoolean:()=>Ubi,IsLiteralNumber:()=>tTr,IsLiteralString:()=>eTr,IsLiteralValue:()=>rTr,IsMappedKey:()=>nTr,IsMappedResult:()=>iTr,IsNever:()=>oTr,IsNot:()=>sTr,IsNull:()=>aTr,IsNumber:()=>cTr,IsObject:()=>lTr,IsOptional:()=>Lbi,IsPromise:()=>uTr,IsProperties:()=>b5e,IsReadonly:()=>Bbi,IsRecord:()=>dTr,IsRecursive:()=>Qbi,IsRef:()=>fTr,IsRegExp:()=>pTr,IsSchema:()=>xl,IsString:()=>hTr,IsSymbol:()=>mTr,IsTemplateLiteral:()=>gTr,IsThis:()=>ATr,IsTransform:()=>yTr,IsTuple:()=>ETr,IsUint8Array:()=>CTr,IsUndefined:()=>_Tr,IsUnion:()=>Yht,IsUnionLiteral:()=>qbi,IsUnknown:()=>vTr,IsUnsafe:()=>bTr,IsVoid:()=>TTr,TypeGuardUnknownTypeError:()=>Vht});f();var Vht=class extends fi{static{a(this,"TypeGuardUnknownTypeError")}},Nbi=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function Fbr(t){try{return new RegExp(t),!0}catch{return!1}}a(Fbr,"IsPattern");function Wht(t){if(!Dc(t))return!1;for(let e=0;e=7&&r<=13||r===27||r===127)return!1}return!0}a(Wht,"IsControlCharacterFree");function Ubr(t){return zht(t)||xl(t)}a(Ubr,"IsAdditionalProperties");function z0e(t){return Zd(t)||H0e(t)}a(z0e,"IsOptionalBigInt");function Nc(t){return Zd(t)||kC(t)}a(Nc,"IsOptionalNumber");function zht(t){return Zd(t)||AN(t)}a(zht,"IsOptionalBoolean");function Wa(t){return Zd(t)||Dc(t)}a(Wa,"IsOptionalString");function Mbi(t){return Zd(t)||Dc(t)&&Wht(t)&&Fbr(t)}a(Mbi,"IsOptionalPattern");function Obi(t){return Zd(t)||Dc(t)&&Wht(t)}a(Obi,"IsOptionalFormat");function Qbr(t){return Zd(t)||xl(t)}a(Qbr,"IsOptionalSchema");function Bbi(t){return Va(t)&&t[xI]==="Readonly"}a(Bbi,"IsReadonly");function Lbi(t){return Va(t)&&t[Kh]==="Optional"}a(Lbi,"IsOptional");function qbr(t){return Wo(t,"Any")&&Wa(t.$id)}a(qbr,"IsAny");function Gbr(t){return Wo(t,"Argument")&&kC(t.index)}a(Gbr,"IsArgument");function Hbr(t){return Wo(t,"Array")&&t.type==="array"&&Wa(t.$id)&&xl(t.items)&&Nc(t.minItems)&&Nc(t.maxItems)&&zht(t.uniqueItems)&&Qbr(t.contains)&&Nc(t.minContains)&&Nc(t.maxContains)}a(Hbr,"IsArray");function jbr(t){return Wo(t,"AsyncIterator")&&t.type==="AsyncIterator"&&Wa(t.$id)&&xl(t.items)}a(jbr,"IsAsyncIterator");function $br(t){return Wo(t,"BigInt")&&t.type==="bigint"&&Wa(t.$id)&&z0e(t.exclusiveMaximum)&&z0e(t.exclusiveMinimum)&&z0e(t.maximum)&&z0e(t.minimum)&&z0e(t.multipleOf)}a($br,"IsBigInt");function Vbr(t){return Wo(t,"Boolean")&&t.type==="boolean"&&Wa(t.$id)}a(Vbr,"IsBoolean");function Wbr(t){return Wo(t,"Computed")&&Dc(t.target)&&Xd(t.parameters)&&t.parameters.every(e=>xl(e))}a(Wbr,"IsComputed");function zbr(t){return Wo(t,"Constructor")&&t.type==="Constructor"&&Wa(t.$id)&&Xd(t.parameters)&&t.parameters.every(e=>xl(e))&&xl(t.returns)}a(zbr,"IsConstructor");function Ybr(t){return Wo(t,"Date")&&t.type==="Date"&&Wa(t.$id)&&Nc(t.exclusiveMaximumTimestamp)&&Nc(t.exclusiveMinimumTimestamp)&&Nc(t.maximumTimestamp)&&Nc(t.minimumTimestamp)&&Nc(t.multipleOfTimestamp)}a(Ybr,"IsDate");function Kbr(t){return Wo(t,"Function")&&t.type==="Function"&&Wa(t.$id)&&Xd(t.parameters)&&t.parameters.every(e=>xl(e))&&xl(t.returns)}a(Kbr,"IsFunction");function Fbi(t){return Wo(t,"Import")&&g5e(t,"$defs")&&Va(t.$defs)&&b5e(t.$defs)&&g5e(t,"$ref")&&Dc(t.$ref)&&t.$ref in t.$defs}a(Fbi,"IsImport");function Jbr(t){return Wo(t,"Integer")&&t.type==="integer"&&Wa(t.$id)&&Nc(t.exclusiveMaximum)&&Nc(t.exclusiveMinimum)&&Nc(t.maximum)&&Nc(t.minimum)&&Nc(t.multipleOf)}a(Jbr,"IsInteger");function b5e(t){return Va(t)&&Object.entries(t).every(([e,r])=>Wht(e)&&xl(r))}a(b5e,"IsProperties");function Xbr(t){return Wo(t,"Intersect")&&!(Dc(t.type)&&t.type!=="object")&&Xd(t.allOf)&&t.allOf.every(e=>xl(e)&&!yTr(e))&&Wa(t.type)&&(zht(t.unevaluatedProperties)||Qbr(t.unevaluatedProperties))&&Wa(t.$id)}a(Xbr,"IsIntersect");function Zbr(t){return Wo(t,"Iterator")&&t.type==="Iterator"&&Wa(t.$id)&&xl(t.items)}a(Zbr,"IsIterator");function Wo(t,e){return Va(t)&&pt in t&&t[pt]===e}a(Wo,"IsKindOf");function eTr(t){return Y0e(t)&&Dc(t.const)}a(eTr,"IsLiteralString");function tTr(t){return Y0e(t)&&kC(t.const)}a(tTr,"IsLiteralNumber");function Ubi(t){return Y0e(t)&&AN(t.const)}a(Ubi,"IsLiteralBoolean");function Y0e(t){return Wo(t,"Literal")&&Wa(t.$id)&&rTr(t.const)}a(Y0e,"IsLiteral");function rTr(t){return AN(t)||kC(t)||Dc(t)}a(rTr,"IsLiteralValue");function nTr(t){return Wo(t,"MappedKey")&&Xd(t.keys)&&t.keys.every(e=>kC(e)||Dc(e))}a(nTr,"IsMappedKey");function iTr(t){return Wo(t,"MappedResult")&&b5e(t.properties)}a(iTr,"IsMappedResult");function oTr(t){return Wo(t,"Never")&&Va(t.not)&&Object.getOwnPropertyNames(t.not).length===0}a(oTr,"IsNever");function sTr(t){return Wo(t,"Not")&&xl(t.not)}a(sTr,"IsNot");function aTr(t){return Wo(t,"Null")&&t.type==="null"&&Wa(t.$id)}a(aTr,"IsNull");function cTr(t){return Wo(t,"Number")&&t.type==="number"&&Wa(t.$id)&&Nc(t.exclusiveMaximum)&&Nc(t.exclusiveMinimum)&&Nc(t.maximum)&&Nc(t.minimum)&&Nc(t.multipleOf)}a(cTr,"IsNumber");function lTr(t){return Wo(t,"Object")&&t.type==="object"&&Wa(t.$id)&&b5e(t.properties)&&Ubr(t.additionalProperties)&&Nc(t.minProperties)&&Nc(t.maxProperties)}a(lTr,"IsObject");function uTr(t){return Wo(t,"Promise")&&t.type==="Promise"&&Wa(t.$id)&&xl(t.item)}a(uTr,"IsPromise");function dTr(t){return Wo(t,"Record")&&t.type==="object"&&Wa(t.$id)&&Ubr(t.additionalProperties)&&Va(t.patternProperties)&&(e=>{let r=Object.getOwnPropertyNames(e.patternProperties);return r.length===1&&Fbr(r[0])&&Va(e.patternProperties)&&xl(e.patternProperties[r[0]])})(t)}a(dTr,"IsRecord");function Qbi(t){return Va(t)&&_b in t&&t[_b]==="Recursive"}a(Qbi,"IsRecursive");function fTr(t){return Wo(t,"Ref")&&Wa(t.$id)&&Dc(t.$ref)}a(fTr,"IsRef");function pTr(t){return Wo(t,"RegExp")&&Wa(t.$id)&&Dc(t.source)&&Dc(t.flags)&&Nc(t.maxLength)&&Nc(t.minLength)}a(pTr,"IsRegExp");function hTr(t){return Wo(t,"String")&&t.type==="string"&&Wa(t.$id)&&Nc(t.minLength)&&Nc(t.maxLength)&&Mbi(t.pattern)&&Obi(t.format)}a(hTr,"IsString");function mTr(t){return Wo(t,"Symbol")&&t.type==="symbol"&&Wa(t.$id)}a(mTr,"IsSymbol");function gTr(t){return Wo(t,"TemplateLiteral")&&t.type==="string"&&Dc(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}a(gTr,"IsTemplateLiteral");function ATr(t){return Wo(t,"This")&&Wa(t.$id)&&Dc(t.$ref)}a(ATr,"IsThis");function yTr(t){return Va(t)&&lu in t}a(yTr,"IsTransform");function ETr(t){return Wo(t,"Tuple")&&t.type==="array"&&Wa(t.$id)&&kC(t.minItems)&&kC(t.maxItems)&&t.minItems===t.maxItems&&(Zd(t.items)&&Zd(t.additionalItems)&&t.minItems===0||Xd(t.items)&&t.items.every(e=>xl(e)))}a(ETr,"IsTuple");function _Tr(t){return Wo(t,"Undefined")&&t.type==="undefined"&&Wa(t.$id)}a(_Tr,"IsUndefined");function qbi(t){return Yht(t)&&t.anyOf.every(e=>eTr(e)||tTr(e))}a(qbi,"IsUnionLiteral");function Yht(t){return Wo(t,"Union")&&Wa(t.$id)&&Va(t)&&Xd(t.anyOf)&&t.anyOf.every(e=>xl(e))}a(Yht,"IsUnion");function CTr(t){return Wo(t,"Uint8Array")&&t.type==="Uint8Array"&&Wa(t.$id)&&Nc(t.minByteLength)&&Nc(t.maxByteLength)}a(CTr,"IsUint8Array");function vTr(t){return Wo(t,"Unknown")&&Wa(t.$id)}a(vTr,"IsUnknown");function bTr(t){return Wo(t,"Unsafe")}a(bTr,"IsUnsafe");function TTr(t){return Wo(t,"Void")&&t.type==="void"&&Wa(t.$id)}a(TTr,"IsVoid");function STr(t){return Va(t)&&pt in t&&Dc(t[pt])&&!Nbi.includes(t[pt])}a(STr,"IsKind");function xl(t){return Va(t)&&(qbr(t)||Gbr(t)||Hbr(t)||Vbr(t)||$br(t)||jbr(t)||Wbr(t)||zbr(t)||Ybr(t)||Kbr(t)||Jbr(t)||Xbr(t)||Zbr(t)||Y0e(t)||nTr(t)||iTr(t)||oTr(t)||sTr(t)||aTr(t)||cTr(t)||lTr(t)||uTr(t)||dTr(t)||fTr(t)||pTr(t)||hTr(t)||mTr(t)||gTr(t)||ATr(t)||ETr(t)||_Tr(t)||Yht(t)||CTr(t)||vTr(t)||bTr(t)||TTr(t)||STr(t))}a(xl,"IsSchema");f();var Kht="(true|false)",K0e="(0|[1-9][0-9]*)",Jht="(.*)",Gbi="(?!.*)",Gja=`^${Kht}$`,Y3=`^${K0e}$`,K3=`^${Jht}$`,ITr=`^${Gbi}$`;f();var MI={};ui(MI,{Clear:()=>jbi,Delete:()=>$bi,Entries:()=>Hbi,Get:()=>zbi,Has:()=>Vbi,Set:()=>Wbi});f();var aX=new Map;function Hbi(){return new Map(aX)}a(Hbi,"Entries");function jbi(){return aX.clear()}a(jbi,"Clear");function $bi(t){return aX.delete(t)}a($bi,"Delete");function Vbi(t){return aX.has(t)}a(Vbi,"Has");function Wbi(t,e){aX.set(t,e)}a(Wbi,"Set");function zbi(t){return aX.get(t)}a(zbi,"Get");var NA={};ui(NA,{Clear:()=>Kbi,Delete:()=>Jbi,Entries:()=>Ybi,Get:()=>eTi,Has:()=>Xbi,Set:()=>Zbi});f();var cX=new Map;function Ybi(){return new Map(cX)}a(Ybi,"Entries");function Kbi(){return cX.clear()}a(Kbi,"Clear");function Jbi(t){return cX.delete(t)}a(Jbi,"Delete");function Xbi(t){return cX.has(t)}a(Xbi,"Has");function Zbi(t,e){cX.set(t,e)}a(Zbi,"Set");function eTi(t){return cX.get(t)}a(eTi,"Get");f();function xTr(t,e){return t.includes(e)}a(xTr,"SetIncludes");function wTr(t){return[...new Set(t)]}a(wTr,"SetDistinct");function tTi(t,e){return t.filter(r=>e.includes(r))}a(tTi,"SetIntersect");function rTi(t,e){return t.reduce((r,n)=>tTi(r,n),e)}a(rTi,"SetIntersectManyResolve");function RTr(t){return t.length===1?t[0]:t.length>1?rTi(t.slice(1),t[0]):[]}a(RTr,"SetIntersectMany");function PTr(t){let e=[];for(let r of t)e.push(...r);return e}a(PTr,"SetUnionMany");f();function J3(t){return gt({[pt]:"Any"},t)}a(J3,"Any");f();function lX(t,e){return gt({[pt]:"Array",type:"array",items:t},e)}a(lX,"Array");f();function kTr(t){return gt({[pt]:"Argument",index:t})}a(kTr,"Argument");f();function uX(t,e){return gt({[pt]:"AsyncIterator",type:"AsyncIterator",items:t},e)}a(uX,"AsyncIterator");f();f();function zc(t,e,r){return gt({[pt]:"Computed",target:t,parameters:e},r)}a(zc,"Computed");f();f();function nTi(t,e){let{[e]:r,...n}=t;return n}a(nTi,"DiscardKey");function Uu(t,e){return e.reduce((r,n)=>nTi(r,n),t)}a(Uu,"Discard");f();function go(t){return gt({[pt]:"Never",not:{}},t)}a(go,"Never");f();f();function Ws(t){return gt({[pt]:"MappedResult",properties:t})}a(Ws,"MappedResult");f();f();function dX(t,e,r){return gt({[pt]:"Constructor",type:"Constructor",parameters:t,returns:e},r)}a(dX,"Constructor");f();function R2(t,e,r){return gt({[pt]:"Function",type:"Function",parameters:t,returns:e},r)}a(R2,"Function");f();f();f();f();function J0e(t,e){return gt({[pt]:"Union",anyOf:t},e)}a(J0e,"UnionCreate");function iTi(t){return t.some(e=>cE(e))}a(iTi,"IsUnionOptional");function DTr(t){return t.map(e=>cE(e)?oTi(e):e)}a(DTr,"RemoveOptionalFromRest");function oTi(t){return Uu(t,[Kh])}a(oTi,"RemoveOptionalFromType");function sTi(t,e){return iTi(t)?lg(J0e(DTr(t),e)):J0e(DTr(t),e)}a(sTi,"ResolveUnion");function P2(t,e){return t.length===1?gt(t[0],e):t.length===0?go(e):sTi(t,e)}a(P2,"UnionEvaluated");f();function ua(t,e){return t.length===0?go(e):t.length===1?gt(t[0],e):J0e(t,e)}a(ua,"Union");f();f();f();var T5e=class extends fi{static{a(this,"TemplateLiteralParserError")}};function aTi(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}a(aTi,"Unescape");function Xht(t,e,r){return t[e]===r&&t.charCodeAt(e-1)!==92}a(Xht,"IsNonEscaped");function SN(t,e){return Xht(t,e,"(")}a(SN,"IsOpenParen");function X0e(t,e){return Xht(t,e,")")}a(X0e,"IsCloseParen");function NTr(t,e){return Xht(t,e,"|")}a(NTr,"IsSeparator");function cTi(t){if(!(SN(t,0)&&X0e(t,t.length-1)))return!1;let e=0;for(let r=0;r0&&n.push(fX(c)),r=s+1}let o=t.slice(r);return o.length>0&&n.push(fX(o)),n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"or",expr:n}}a(fTi,"Or");function pTi(t){function e(o,s){if(!SN(o,s))throw new T5e("TemplateLiteralParser: Index must point to open parens");let c=0;for(let l=s;l0&&n.push(fX(l)),o=c-1}return n.length===0?{type:"const",const:""}:n.length===1?n[0]:{type:"and",expr:n}}a(pTi,"And");function fX(t){return cTi(t)?fX(lTi(t)):uTi(t)?fTi(t):dTi(t)?pTi(t):{type:"const",const:aTi(t)}}a(fX,"TemplateLiteralParse");function pX(t){return fX(t.slice(1,t.length-1))}a(pX,"TemplateLiteralParseExact");var Zht=class extends fi{static{a(this,"TemplateLiteralFiniteError")}};function hTi(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}a(hTi,"IsNumberExpression");function mTi(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}a(mTi,"IsBooleanExpression");function gTi(t){return t.type==="const"&&t.const===".*"}a(gTi,"IsStringExpression");function gq(t){return hTi(t)||gTi(t)?!1:mTi(t)?!0:t.type==="and"?t.expr.every(e=>gq(e)):t.type==="or"?t.expr.every(e=>gq(e)):t.type==="const"?!0:(()=>{throw new Zht("Unknown expression type")})()}a(gq,"IsTemplateLiteralExpressionFinite");function S5e(t){let e=pX(t.pattern);return gq(e)}a(S5e,"IsTemplateLiteralFinite");f();var emt=class extends fi{static{a(this,"TemplateLiteralGenerateError")}};function*MTr(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let r of MTr(t.slice(1)))yield`${e}${r}`}a(MTr,"GenerateReduce");function*ATi(t){return yield*MTr(t.expr.map(e=>[...Z0e(e)]))}a(ATi,"GenerateAnd");function*yTi(t){for(let e of t.expr)yield*Z0e(e)}a(yTi,"GenerateOr");function*ETi(t){return yield t.const}a(ETi,"GenerateConst");function*Z0e(t){return t.type==="and"?yield*ATi(t):t.type==="or"?yield*yTi(t):t.type==="const"?yield*ETi(t):(()=>{throw new emt("Unknown expression")})()}a(Z0e,"TemplateLiteralExpressionGenerate");function hX(t){let e=pX(t.pattern);return gq(e)?[...Z0e(e)]:[]}a(hX,"TemplateLiteralGenerate");f();f();function As(t,e){return gt({[pt]:"Literal",const:t,type:typeof t},e)}a(As,"Literal");f();function I5e(t){return gt({[pt]:"Boolean",type:"boolean"},t)}a(I5e,"Boolean");f();function mX(t){return gt({[pt]:"BigInt",type:"bigint"},t)}a(mX,"BigInt");f();function Cb(t){return gt({[pt]:"Number",type:"number"},t)}a(Cb,"Number");f();function MA(t){return gt({[pt]:"String",type:"string"},t)}a(MA,"String");function*_Ti(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield I5e():e==="number"?yield Cb():e==="bigint"?yield mX():e==="string"?yield MA():yield(()=>{let r=e.split("|").map(n=>As(n.trim()));return r.length===0?go():r.length===1?r[0]:P2(r)})()}a(_Ti,"FromUnion");function*CTi(t){if(t[1]!=="{"){let e=As("$"),r=tmt(t.slice(1));return yield*[e,...r]}for(let e=2;eBTr(r,e)).join("|")})`:NI(t)?`${e}${K0e}`:DI(t)?`${e}${K0e}`:fq(t)?`${e}${K0e}`:vN(t)?`${e}${Jht}`:NC(t)?`${e}${vTi(t.const.toString())}`:CN(t)?`${e}${Kht}`:(()=>{throw new rmt(`Unexpected Kind '${t[pt]}'`)})()}a(BTr,"Visit");function nmt(t){return`^${t.map(e=>BTr(e,"")).join("")}$`}a(nmt,"TemplateLiteralPattern");f();function Aq(t){let r=hX(t).map(n=>As(n));return P2(r)}a(Aq,"TemplateLiteralToUnion");f();function x5e(t,e){let r=Dc(t)?nmt(OTr(t)):nmt(t);return gt({[pt]:"TemplateLiteral",type:"string",pattern:r},e)}a(x5e,"TemplateLiteral");function bTi(t){return hX(t).map(r=>r.toString())}a(bTi,"FromTemplateLiteral");function TTi(t){let e=[];for(let r of t)e.push(...lE(r));return e}a(TTi,"FromUnion");function STi(t){return[t.toString()]}a(STi,"FromLiteral");function lE(t){return[...new Set(OC(t)?bTi(t):Ds(t)?TTi(t.anyOf):NC(t)?STi(t.const):NI(t)?["[number]"]:DI(t)?["[number]"]:[])]}a(lE,"IndexPropertyKeys");f();function ITi(t,e,r){let n={};for(let o of Object.getOwnPropertyNames(e))n[o]=X3(t,lE(e[o]),r);return n}a(ITi,"FromProperties");function xTi(t,e,r){return ITi(t,e.properties,r)}a(xTi,"FromMappedResult");function LTr(t,e,r){let n=xTi(t,e,r);return Ws(n)}a(LTr,"IndexFromMappedResult");function UTr(t,e){return t.map(r=>QTr(r,e))}a(UTr,"FromRest");function wTi(t){return t.filter(e=>!W3(e))}a(wTi,"FromIntersectRest");function RTi(t,e){return w5e(wTi(UTr(t,e)))}a(RTi,"FromIntersect");function PTi(t){return t.some(e=>W3(e))?[]:t}a(PTi,"FromUnionRest");function kTi(t,e){return P2(PTi(UTr(t,e)))}a(kTi,"FromUnion");function DTi(t,e){return e in t?t[e]:e==="[number]"?P2(t):go()}a(DTi,"FromTuple");function NTi(t,e){return e==="[number]"?t:go()}a(NTi,"FromArray");function MTi(t,e){return e in t?t[e]:go()}a(MTi,"FromProperty");function QTr(t,e){return Fu(t)?RTi(t.allOf,e):Ds(t)?kTi(t.anyOf,e):BC(t)?DTi(t.items??[],e):wI(t)?NTi(t.items,e):ef(t)?MTi(t.properties,e):go()}a(QTr,"IndexFromPropertyKey");function epe(t,e){return e.map(r=>QTr(t,r))}a(epe,"IndexFromPropertyKeys");function FTr(t,e){return P2(epe(t,e))}a(FTr,"FromSchema");function X3(t,e,r){if(hd(t)||hd(e)){let n="Index types using Ref parameters require both Type and Key to be of TSchema";if(!uu(t)||!uu(e))throw new fi(n);return zc("Index",[t,e])}return Il(e)?LTr(t,e,r):MC(e)?qTr(t,e,r):gt(uu(e)?FTr(t,lE(e)):FTr(t,e),r)}a(X3,"Index");function OTi(t,e,r){return{[e]:X3(t,[e],Tl(r))}}a(OTi,"MappedIndexPropertyKey");function BTi(t,e,r){return e.reduce((n,o)=>({...n,...OTi(t,o,r)}),{})}a(BTi,"MappedIndexPropertyKeys");function LTi(t,e,r){return BTi(t,e.keys,r)}a(LTi,"MappedIndexProperties");function qTr(t,e,r){let n=LTi(t,e,r);return Ws(n)}a(qTr,"IndexFromMappedKey");f();function gX(t,e){return gt({[pt]:"Iterator",type:"Iterator",items:t},e)}a(gX,"Iterator");f();function FTi(t){let e=[];for(let r in t)cE(t[r])||e.push(r);return e}a(FTi,"RequiredKeys");function UTi(t,e){let r=FTi(t),n=r.length>0?{[pt]:"Object",type:"object",properties:t,required:r}:{[pt]:"Object",type:"object",properties:t};return gt(n,e)}a(UTi,"_Object");var da=UTi;f();function R5e(t,e){return gt({[pt]:"Promise",type:"Promise",item:t},e)}a(R5e,"Promise");f();f();function QTi(t){return gt(Uu(t,[xI]))}a(QTi,"RemoveReadonly");function qTi(t){return gt({...t,[xI]:"Readonly"})}a(qTi,"AddReadonly");function GTi(t,e){return e===!1?QTi(t):qTi(t)}a(GTi,"ReadonlyWithFlag");function uE(t,e){let r=e??!0;return Il(t)?GTr(t,r):GTi(t,r)}a(uE,"Readonly");function HTi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=uE(t[n],e);return r}a(HTi,"FromProperties");function jTi(t,e){return HTi(t.properties,e)}a(jTi,"FromMappedResult");function GTr(t,e){let r=jTi(t,e);return Ws(r)}a(GTr,"ReadonlyFromMappedResult");f();function vb(t,e){return gt(t.length>0?{[pt]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[pt]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}a(vb,"Tuple");function HTr(t,e){return t in e?bb(t,e[t]):Ws(e)}a(HTr,"FromMappedResult");function $Ti(t){return{[t]:As(t)}}a($Ti,"MappedKeyToKnownMappedResultProperties");function VTi(t){let e={};for(let r of t)e[r]=As(r);return e}a(VTi,"MappedKeyToUnknownMappedResultProperties");function WTi(t,e){return xTr(e,t)?$Ti(t):VTi(e)}a(WTi,"MappedKeyToMappedResultProperties");function zTi(t,e){let r=WTi(t,e);return HTr(t,r)}a(zTi,"FromMappedKey");function tpe(t,e){return e.map(r=>bb(t,r))}a(tpe,"FromRest");function YTi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(e))r[n]=bb(t,e[n]);return r}a(YTi,"FromProperties");function bb(t,e){let r={...e};return cE(e)?lg(bb(t,Uu(e,[Kh]))):sX(e)?uE(bb(t,Uu(e,[xI]))):Il(e)?HTr(t,e.properties):MC(e)?zTi(t,e.keys):PI(e)?dX(tpe(t,e.parameters),bb(t,e.returns),r):kI(e)?R2(tpe(t,e.parameters),bb(t,e.returns),r):dq(e)?uX(bb(t,e.items),r):pq(e)?gX(bb(t,e.items),r):Fu(e)?ug(tpe(t,e.allOf),r):Ds(e)?ua(tpe(t,e.anyOf),r):BC(e)?vb(tpe(t,e.items??[]),r):ef(e)?da(YTi(t,e.properties),r):wI(e)?lX(bb(t,e.items),r):hq(e)?R5e(bb(t,e.item),r):e}a(bb,"FromSchemaType");function KTi(t,e){let r={};for(let n of t)r[n]=bb(n,e);return r}a(KTi,"MappedFunctionReturnType");function jTr(t,e,r){let n=uu(t)?lE(t):t,o=e({[pt]:"MappedKey",keys:n}),s=KTi(n,o);return da(s,r)}a(jTr,"Mapped");f();function JTi(t){return gt(Uu(t,[Kh]))}a(JTi,"RemoveOptional");function XTi(t){return gt({...t,[Kh]:"Optional"})}a(XTi,"AddOptional");function ZTi(t,e){return e===!1?JTi(t):XTi(t)}a(ZTi,"OptionalWithFlag");function lg(t,e){let r=e??!0;return Il(t)?$Tr(t,r):ZTi(t,r)}a(lg,"Optional");function eSi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=lg(t[n],e);return r}a(eSi,"FromProperties");function tSi(t,e){return eSi(t.properties,e)}a(tSi,"FromMappedResult");function $Tr(t,e){let r=tSi(t,e);return Ws(r)}a($Tr,"OptionalFromMappedResult");f();function rpe(t,e={}){let r=t.every(o=>ef(o)),n=uu(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return gt(e.unevaluatedProperties===!1||uu(e.unevaluatedProperties)||r?{...n,[pt]:"Intersect",type:"object",allOf:t}:{...n,[pt]:"Intersect",allOf:t},e)}a(rpe,"IntersectCreate");function rSi(t){return t.every(e=>cE(e))}a(rSi,"IsIntersectOptional");function nSi(t){return Uu(t,[Kh])}a(nSi,"RemoveOptionalFromType");function VTr(t){return t.map(e=>cE(e)?nSi(e):e)}a(VTr,"RemoveOptionalFromRest");function iSi(t,e){return rSi(t)?lg(rpe(VTr(t),e)):rpe(VTr(t),e)}a(iSi,"ResolveIntersect");function w5e(t,e={}){if(t.length===1)return gt(t[0],e);if(t.length===0)return go(e);if(t.some(r=>la(r)))throw new Error("Cannot intersect transform types");return iSi(t,e)}a(w5e,"IntersectEvaluated");f();function ug(t,e){if(t.length===1)return gt(t[0],e);if(t.length===0)return go(e);if(t.some(r=>la(r)))throw new Error("Cannot intersect transform types");return rpe(t,e)}a(ug,"Intersect");f();function Tb(...t){let[e,r]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new fi("Ref: $ref must be a string");return gt({[pt]:"Ref",$ref:e},r)}a(Tb,"Ref");function oSi(t,e){return zc("Awaited",[zc(t,e)])}a(oSi,"FromComputed");function sSi(t){return zc("Awaited",[Tb(t)])}a(sSi,"FromRef");function aSi(t){return ug(WTr(t))}a(aSi,"FromIntersect");function cSi(t){return ua(WTr(t))}a(cSi,"FromUnion");function lSi(t){return AX(t)}a(lSi,"FromPromise");function WTr(t){return t.map(e=>AX(e))}a(WTr,"FromRest");function AX(t,e){return gt(RI(t)?oSi(t.target,t.parameters):Fu(t)?aSi(t.allOf):Ds(t)?cSi(t.anyOf):hq(t)?lSi(t.item):hd(t)?sSi(t.$ref):t,e)}a(AX,"Awaited");f();f();f();f();function zTr(t){let e=[];for(let r of t)e.push(dE(r));return e}a(zTr,"FromRest");function uSi(t){let e=zTr(t);return PTr(e)}a(uSi,"FromIntersect");function dSi(t){let e=zTr(t);return RTr(e)}a(dSi,"FromUnion");function fSi(t){return t.map((e,r)=>r.toString())}a(fSi,"FromTuple");function pSi(t){return["[number]"]}a(pSi,"FromArray");function hSi(t){return globalThis.Object.getOwnPropertyNames(t)}a(hSi,"FromProperties");function mSi(t){return imt?globalThis.Object.getOwnPropertyNames(t).map(r=>r[0]==="^"&&r[r.length-1]==="$"?r.slice(1,r.length-1):r):[]}a(mSi,"FromPatternProperties");function dE(t){return Fu(t)?uSi(t.allOf):Ds(t)?dSi(t.anyOf):BC(t)?fSi(t.items??[]):wI(t)?pSi(t.items):ef(t)?hSi(t.properties):mq(t)?mSi(t.patternProperties):[]}a(dE,"KeyOfPropertyKeys");var imt=!1;function IN(t){imt=!0;let e=dE(t);return imt=!1,`^(${e.map(n=>`(${n})`).join("|")})$`}a(IN,"KeyOfPattern");function gSi(t,e){return zc("KeyOf",[zc(t,e)])}a(gSi,"FromComputed");function ASi(t){return zc("KeyOf",[Tb(t)])}a(ASi,"FromRef");function ySi(t,e){let r=dE(t),n=ESi(r),o=P2(n);return gt(o,e)}a(ySi,"KeyOfFromType");function ESi(t){return t.map(e=>e==="[number]"?Cb():As(e))}a(ESi,"KeyOfPropertyKeysToRest");function yX(t,e){return RI(t)?gSi(t.target,t.parameters):hd(t)?ASi(t.$ref):Il(t)?YTr(t,e):ySi(t,e)}a(yX,"KeyOf");function _Si(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=yX(t[n],Tl(e));return r}a(_Si,"FromProperties");function CSi(t,e){return _Si(t.properties,e)}a(CSi,"FromMappedResult");function YTr(t,e){let r=CSi(t,e);return Ws(r)}a(YTr,"KeyOfFromMappedResult");f();function P5e(t){let e=dE(t),r=epe(t,e);return e.map((n,o)=>[e[o],r[o]])}a(P5e,"KeyOfPropertyEntries");function vSi(t){let e=[];for(let r of t)e.push(...dE(r));return wTr(e)}a(vSi,"CompositeKeys");function bSi(t){return t.filter(e=>!W3(e))}a(bSi,"FilterNever");function TSi(t,e){let r=[];for(let n of t)r.push(...epe(n,[e]));return bSi(r)}a(TSi,"CompositeProperty");function SSi(t,e){let r={};for(let n of e)r[n]=w5e(TSi(t,n));return r}a(SSi,"CompositeProperties");function KTr(t,e){let r=vSi(t),n=SSi(t,r);return da(n,e)}a(KTr,"Composite");f();f();function k5e(t){return gt({[pt]:"Date",type:"Date"},t)}a(k5e,"Date");f();function D5e(t){return gt({[pt]:"Null",type:"null"},t)}a(D5e,"Null");f();function N5e(t){return gt({[pt]:"Symbol",type:"symbol"},t)}a(N5e,"Symbol");f();function M5e(t){return gt({[pt]:"Undefined",type:"undefined"},t)}a(M5e,"Undefined");f();function O5e(t){return gt({[pt]:"Uint8Array",type:"Uint8Array"},t)}a(O5e,"Uint8Array");f();function OI(t){return gt({[pt]:"Unknown"},t)}a(OI,"Unknown");function ISi(t){return t.map(e=>omt(e,!1))}a(ISi,"FromArray");function xSi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=uE(omt(t[r],!1));return e}a(xSi,"FromProperties");function B5e(t,e){return e===!0?t:uE(t)}a(B5e,"ConditionalReadonly");function omt(t,e){return Lht(t)?B5e(J3(),e):Uht(t)?B5e(J3(),e):Xd(t)?uE(vb(ISi(t))):yN(t)?O5e():uq(t)?k5e():Va(t)?B5e(da(xSi(t)),e):Fht(t)?B5e(R2([],OI()),e):Zd(t)?M5e():Qht(t)?D5e():qht(t)?N5e():H0e(t)?mX():kC(t)?As(t):AN(t)?As(t):Dc(t)?As(t):da({})}a(omt,"FromValue");function JTr(t,e){return gt(omt(t,!0),e)}a(JTr,"Const");f();function XTr(t,e){return PI(t)?vb(t.parameters,e):go(e)}a(XTr,"ConstructorParameters");f();function ZTr(t,e){if(Zd(t))throw new Error("Enum undefined or empty");let r=globalThis.Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]),o=[...new Set(r)].map(s=>As(s));return ua(o,{...e,[_b]:"Enum"})}a(ZTr,"Enum");f();f();f();var amt=class extends fi{static{a(this,"ExtendsResolverError")}},yt;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(yt||(yt={}));function Sb(t){return t===yt.False?t:yt.True}a(Sb,"IntoBooleanResult");function EX(t){throw new amt(t)}a(EX,"Throw");function Uf(t){return qe.IsNever(t)||qe.IsIntersect(t)||qe.IsUnion(t)||qe.IsUnknown(t)||qe.IsAny(t)}a(Uf,"IsStructuralRight");function Qf(t,e){return qe.IsNever(e)?sSr(t,e):qe.IsIntersect(e)?L5e(t,e):qe.IsUnion(e)?dmt(t,e):qe.IsUnknown(e)?uSr(t,e):qe.IsAny(e)?umt(t,e):EX("StructuralRight")}a(Qf,"StructuralRight");function umt(t,e){return yt.True}a(umt,"FromAnyRight");function wSi(t,e){return qe.IsIntersect(e)?L5e(t,e):qe.IsUnion(e)&&e.anyOf.some(r=>qe.IsAny(r)||qe.IsUnknown(r))?yt.True:qe.IsUnion(e)?yt.Union:qe.IsUnknown(e)||qe.IsAny(e)?yt.True:yt.Union}a(wSi,"FromAny");function RSi(t,e){return qe.IsUnknown(t)?yt.False:qe.IsAny(t)?yt.Union:qe.IsNever(t)?yt.True:yt.False}a(RSi,"FromArrayRight");function PSi(t,e){return qe.IsObject(e)&&F5e(e)?yt.True:Uf(e)?Qf(t,e):qe.IsArray(e)?Sb(za(t.items,e.items)):yt.False}a(PSi,"FromArray");function kSi(t,e){return Uf(e)?Qf(t,e):qe.IsAsyncIterator(e)?Sb(za(t.items,e.items)):yt.False}a(kSi,"FromAsyncIterator");function DSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsBigInt(e)?yt.True:yt.False}a(DSi,"FromBigInt");function iSr(t,e){return qe.IsLiteralBoolean(t)||qe.IsBoolean(t)?yt.True:yt.False}a(iSr,"FromBooleanRight");function NSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsBoolean(e)?yt.True:yt.False}a(NSi,"FromBoolean");function MSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsConstructor(e)?t.parameters.length>e.parameters.length?yt.False:t.parameters.every((r,n)=>Sb(za(e.parameters[n],r))===yt.True)?Sb(za(t.returns,e.returns)):yt.False:yt.False}a(MSi,"FromConstructor");function OSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsDate(e)?yt.True:yt.False}a(OSi,"FromDate");function BSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsFunction(e)?t.parameters.length>e.parameters.length?yt.False:t.parameters.every((r,n)=>Sb(za(e.parameters[n],r))===yt.True)?Sb(za(t.returns,e.returns)):yt.False:yt.False}a(BSi,"FromFunction");function oSr(t,e){return qe.IsLiteral(t)&&cg.IsNumber(t.const)||qe.IsNumber(t)||qe.IsInteger(t)?yt.True:yt.False}a(oSr,"FromIntegerRight");function LSi(t,e){return qe.IsInteger(e)||qe.IsNumber(e)?yt.True:Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):yt.False}a(LSi,"FromInteger");function L5e(t,e){return e.allOf.every(r=>za(t,r)===yt.True)?yt.True:yt.False}a(L5e,"FromIntersectRight");function FSi(t,e){return t.allOf.some(r=>za(r,e)===yt.True)?yt.True:yt.False}a(FSi,"FromIntersect");function USi(t,e){return Uf(e)?Qf(t,e):qe.IsIterator(e)?Sb(za(t.items,e.items)):yt.False}a(USi,"FromIterator");function QSi(t,e){return qe.IsLiteral(e)&&e.const===t.const?yt.True:Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsString(e)?lSr(t,e):qe.IsNumber(e)?aSr(t,e):qe.IsInteger(e)?oSr(t,e):qe.IsBoolean(e)?iSr(t,e):yt.False}a(QSi,"FromLiteral");function sSr(t,e){return yt.False}a(sSr,"FromNeverRight");function qSi(t,e){return yt.True}a(qSi,"FromNever");function eSr(t){let[e,r]=[t,0];for(;qe.IsNot(e);)e=e.not,r+=1;return r%2===0?e:OI()}a(eSr,"UnwrapTNot");function GSi(t,e){return qe.IsNot(t)?za(eSr(t),e):qe.IsNot(e)?za(t,eSr(e)):EX("Invalid fallthrough for Not")}a(GSi,"FromNot");function HSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsNull(e)?yt.True:yt.False}a(HSi,"FromNull");function aSr(t,e){return qe.IsLiteralNumber(t)||qe.IsNumber(t)||qe.IsInteger(t)?yt.True:yt.False}a(aSr,"FromNumberRight");function jSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsInteger(e)||qe.IsNumber(e)?yt.True:yt.False}a(jSi,"FromNumber");function fE(t,e){return Object.getOwnPropertyNames(t.properties).length===e}a(fE,"IsObjectPropertyCount");function tSr(t){return F5e(t)}a(tSr,"IsObjectStringLike");function rSr(t){return fE(t,0)||fE(t,1)&&"description"in t.properties&&qe.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(qe.IsString(t.properties.description.anyOf[0])&&qe.IsUndefined(t.properties.description.anyOf[1])||qe.IsString(t.properties.description.anyOf[1])&&qe.IsUndefined(t.properties.description.anyOf[0]))}a(rSr,"IsObjectSymbolLike");function smt(t){return fE(t,0)}a(smt,"IsObjectNumberLike");function nSr(t){return fE(t,0)}a(nSr,"IsObjectBooleanLike");function $Si(t){return fE(t,0)}a($Si,"IsObjectBigIntLike");function VSi(t){return fE(t,0)}a(VSi,"IsObjectDateLike");function WSi(t){return F5e(t)}a(WSi,"IsObjectUint8ArrayLike");function zSi(t){let e=Cb();return fE(t,0)||fE(t,1)&&"length"in t.properties&&Sb(za(t.properties.length,e))===yt.True}a(zSi,"IsObjectFunctionLike");function YSi(t){return fE(t,0)}a(YSi,"IsObjectConstructorLike");function F5e(t){let e=Cb();return fE(t,0)||fE(t,1)&&"length"in t.properties&&Sb(za(t.properties.length,e))===yt.True}a(F5e,"IsObjectArrayLike");function KSi(t){let e=R2([J3()],J3());return fE(t,0)||fE(t,1)&&"then"in t.properties&&Sb(za(t.properties.then,e))===yt.True}a(KSi,"IsObjectPromiseLike");function cSr(t,e){return za(t,e)===yt.False||qe.IsOptional(t)&&!qe.IsOptional(e)?yt.False:yt.True}a(cSr,"Property");function dg(t,e){return qe.IsUnknown(t)?yt.False:qe.IsAny(t)?yt.Union:qe.IsNever(t)||qe.IsLiteralString(t)&&tSr(e)||qe.IsLiteralNumber(t)&&smt(e)||qe.IsLiteralBoolean(t)&&nSr(e)||qe.IsSymbol(t)&&rSr(e)||qe.IsBigInt(t)&&$Si(e)||qe.IsString(t)&&tSr(e)||qe.IsSymbol(t)&&rSr(e)||qe.IsNumber(t)&&smt(e)||qe.IsInteger(t)&&smt(e)||qe.IsBoolean(t)&&nSr(e)||qe.IsUint8Array(t)&&WSi(e)||qe.IsDate(t)&&VSi(e)||qe.IsConstructor(t)&&YSi(e)||qe.IsFunction(t)&&zSi(e)?yt.True:qe.IsRecord(t)&&qe.IsString(cmt(t))?e[_b]==="Record"?yt.True:yt.False:qe.IsRecord(t)&&qe.IsNumber(cmt(t))&&fE(e,0)?yt.True:yt.False}a(dg,"FromObjectRight");function JSi(t,e){return Uf(e)?Qf(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsObject(e)?(()=>{for(let r of Object.getOwnPropertyNames(e.properties)){if(!(r in t.properties)&&!qe.IsOptional(e.properties[r]))return yt.False;if(qe.IsOptional(e.properties[r]))return yt.True;if(cSr(t.properties[r],e.properties[r])===yt.False)return yt.False}return yt.True})():yt.False}a(JSi,"FromObject");function XSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)&&KSi(e)?yt.True:qe.IsPromise(e)?Sb(za(t.item,e.item)):yt.False}a(XSi,"FromPromise");function cmt(t){return Y3 in t.patternProperties?Cb():K3 in t.patternProperties?MA():EX("Unknown record key pattern")}a(cmt,"RecordKey");function lmt(t){return Y3 in t.patternProperties?t.patternProperties[Y3]:K3 in t.patternProperties?t.patternProperties[K3]:EX("Unable to get record value schema")}a(lmt,"RecordValue");function Ib(t,e){let[r,n]=[cmt(e),lmt(e)];return qe.IsLiteralString(t)&&qe.IsNumber(r)&&Sb(za(t,n))===yt.True?yt.True:qe.IsUint8Array(t)&&qe.IsNumber(r)||qe.IsString(t)&&qe.IsNumber(r)||qe.IsArray(t)&&qe.IsNumber(r)?za(t,n):qe.IsObject(t)?(()=>{for(let o of Object.getOwnPropertyNames(t.properties))if(cSr(n,t.properties[o])===yt.False)return yt.False;return yt.True})():yt.False}a(Ib,"FromRecordRight");function ZSi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?za(lmt(t),lmt(e)):yt.False}a(ZSi,"FromRecord");function eIi(t,e){let r=qe.IsRegExp(t)?MA():t,n=qe.IsRegExp(e)?MA():e;return za(r,n)}a(eIi,"FromRegExp");function lSr(t,e){return qe.IsLiteral(t)&&cg.IsString(t.const)||qe.IsString(t)?yt.True:yt.False}a(lSr,"FromStringRight");function tIi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsString(e)?yt.True:yt.False}a(tIi,"FromString");function rIi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsSymbol(e)?yt.True:yt.False}a(rIi,"FromSymbol");function nIi(t,e){return qe.IsTemplateLiteral(t)?za(Aq(t),e):qe.IsTemplateLiteral(e)?za(t,Aq(e)):EX("Invalid fallthrough for TemplateLiteral")}a(nIi,"FromTemplateLiteral");function iIi(t,e){return qe.IsArray(e)&&t.items!==void 0&&t.items.every(r=>za(r,e.items)===yt.True)}a(iIi,"IsArrayOfTuple");function oIi(t,e){return qe.IsNever(t)?yt.True:qe.IsUnknown(t)?yt.False:qe.IsAny(t)?yt.Union:yt.False}a(oIi,"FromTupleRight");function sIi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)&&F5e(e)||qe.IsArray(e)&&iIi(t,e)?yt.True:qe.IsTuple(e)?cg.IsUndefined(t.items)&&!cg.IsUndefined(e.items)||!cg.IsUndefined(t.items)&&cg.IsUndefined(e.items)?yt.False:cg.IsUndefined(t.items)&&!cg.IsUndefined(e.items)||t.items.every((r,n)=>za(r,e.items[n])===yt.True)?yt.True:yt.False:yt.False}a(sIi,"FromTuple");function aIi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsUint8Array(e)?yt.True:yt.False}a(aIi,"FromUint8Array");function cIi(t,e){return Uf(e)?Qf(t,e):qe.IsObject(e)?dg(t,e):qe.IsRecord(e)?Ib(t,e):qe.IsVoid(e)?dIi(t,e):qe.IsUndefined(e)?yt.True:yt.False}a(cIi,"FromUndefined");function dmt(t,e){return e.anyOf.some(r=>za(t,r)===yt.True)?yt.True:yt.False}a(dmt,"FromUnionRight");function lIi(t,e){return t.anyOf.every(r=>za(r,e)===yt.True)?yt.True:yt.False}a(lIi,"FromUnion");function uSr(t,e){return yt.True}a(uSr,"FromUnknownRight");function uIi(t,e){return qe.IsNever(e)?sSr(t,e):qe.IsIntersect(e)?L5e(t,e):qe.IsUnion(e)?dmt(t,e):qe.IsAny(e)?umt(t,e):qe.IsString(e)?lSr(t,e):qe.IsNumber(e)?aSr(t,e):qe.IsInteger(e)?oSr(t,e):qe.IsBoolean(e)?iSr(t,e):qe.IsArray(e)?RSi(t,e):qe.IsTuple(e)?oIi(t,e):qe.IsObject(e)?dg(t,e):qe.IsUnknown(e)?yt.True:yt.False}a(uIi,"FromUnknown");function dIi(t,e){return qe.IsUndefined(t)||qe.IsUndefined(t)?yt.True:yt.False}a(dIi,"FromVoidRight");function fIi(t,e){return qe.IsIntersect(e)?L5e(t,e):qe.IsUnion(e)?dmt(t,e):qe.IsUnknown(e)?uSr(t,e):qe.IsAny(e)?umt(t,e):qe.IsObject(e)?dg(t,e):qe.IsVoid(e)?yt.True:yt.False}a(fIi,"FromVoid");function za(t,e){return qe.IsTemplateLiteral(t)||qe.IsTemplateLiteral(e)?nIi(t,e):qe.IsRegExp(t)||qe.IsRegExp(e)?eIi(t,e):qe.IsNot(t)||qe.IsNot(e)?GSi(t,e):qe.IsAny(t)?wSi(t,e):qe.IsArray(t)?PSi(t,e):qe.IsBigInt(t)?DSi(t,e):qe.IsBoolean(t)?NSi(t,e):qe.IsAsyncIterator(t)?kSi(t,e):qe.IsConstructor(t)?MSi(t,e):qe.IsDate(t)?OSi(t,e):qe.IsFunction(t)?BSi(t,e):qe.IsInteger(t)?LSi(t,e):qe.IsIntersect(t)?FSi(t,e):qe.IsIterator(t)?USi(t,e):qe.IsLiteral(t)?QSi(t,e):qe.IsNever(t)?qSi(t,e):qe.IsNull(t)?HSi(t,e):qe.IsNumber(t)?jSi(t,e):qe.IsObject(t)?JSi(t,e):qe.IsRecord(t)?ZSi(t,e):qe.IsString(t)?tIi(t,e):qe.IsSymbol(t)?rIi(t,e):qe.IsTuple(t)?sIi(t,e):qe.IsPromise(t)?XSi(t,e):qe.IsUint8Array(t)?aIi(t,e):qe.IsUndefined(t)?cIi(t,e):qe.IsUnion(t)?lIi(t,e):qe.IsUnknown(t)?uIi(t,e):qe.IsVoid(t)?fIi(t,e):EX(`Unknown left type operand '${t[pt]}'`)}a(za,"Visit");function Z3(t,e){return za(t,e)}a(Z3,"ExtendsCheck");f();f();f();function pIi(t,e,r,n,o){let s={};for(let c of globalThis.Object.getOwnPropertyNames(t))s[c]=_X(t[c],e,r,n,Tl(o));return s}a(pIi,"FromProperties");function hIi(t,e,r,n,o){return pIi(t.properties,e,r,n,o)}a(hIi,"FromMappedResult");function dSr(t,e,r,n,o){let s=hIi(t,e,r,n,o);return Ws(s)}a(dSr,"ExtendsFromMappedResult");function mIi(t,e,r,n){let o=Z3(t,e);return o===yt.Union?ua([r,n]):o===yt.True?r:n}a(mIi,"ExtendsResolve");function _X(t,e,r,n,o){return Il(t)?dSr(t,e,r,n,o):MC(t)?gt(fSr(t,e,r,n,o)):gt(mIi(t,e,r,n),o)}a(_X,"Extends");function gIi(t,e,r,n,o){return{[t]:_X(As(t),e,r,n,Tl(o))}}a(gIi,"FromPropertyKey");function AIi(t,e,r,n,o){return t.reduce((s,c)=>({...s,...gIi(c,e,r,n,o)}),{})}a(AIi,"FromPropertyKeys");function yIi(t,e,r,n,o){return AIi(t.keys,e,r,n,o)}a(yIi,"FromMappedKey");function fSr(t,e,r,n,o){let s=yIi(t,e,r,n,o);return Ws(s)}a(fSr,"ExtendsFromMappedKey");f();function EIi(t){return t.allOf.every(e=>xN(e))}a(EIi,"Intersect");function _Ii(t){return t.anyOf.some(e=>xN(e))}a(_Ii,"Union");function CIi(t){return!xN(t.not)}a(CIi,"Not");function xN(t){return t[pt]==="Intersect"?EIi(t):t[pt]==="Union"?_Ii(t):t[pt]==="Not"?CIi(t):t[pt]==="Undefined"}a(xN,"ExtendsUndefinedCheck");f();function pSr(t,e){return CX(Aq(t),e)}a(pSr,"ExcludeFromTemplateLiteral");function vIi(t,e){let r=t.filter(n=>Z3(n,e)===yt.False);return r.length===1?r[0]:ua(r)}a(vIi,"ExcludeRest");function CX(t,e,r={}){return OC(t)?gt(pSr(t,e),r):Il(t)?gt(hSr(t,e),r):gt(Ds(t)?vIi(t.anyOf,e):Z3(t,e)!==yt.False?go():t,r)}a(CX,"Exclude");function bIi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=CX(t[n],e);return r}a(bIi,"FromProperties");function TIi(t,e){return bIi(t.properties,e)}a(TIi,"FromMappedResult");function hSr(t,e){let r=TIi(t,e);return Ws(r)}a(hSr,"ExcludeFromMappedResult");f();f();f();function mSr(t,e){return vX(Aq(t),e)}a(mSr,"ExtractFromTemplateLiteral");function SIi(t,e){let r=t.filter(n=>Z3(n,e)!==yt.False);return r.length===1?r[0]:ua(r)}a(SIi,"ExtractRest");function vX(t,e,r){return OC(t)?gt(mSr(t,e),r):Il(t)?gt(gSr(t,e),r):gt(Ds(t)?SIi(t.anyOf,e):Z3(t,e)!==yt.False?t:go(),r)}a(vX,"Extract");function IIi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=vX(t[n],e);return r}a(IIi,"FromProperties");function xIi(t,e){return IIi(t.properties,e)}a(xIi,"FromMappedResult");function gSr(t,e){let r=xIi(t,e);return Ws(r)}a(gSr,"ExtractFromMappedResult");f();function ASr(t,e){return PI(t)?gt(t.returns,e):go(e)}a(ASr,"InstanceType");f();f();function U5e(t){return uE(lg(t))}a(U5e,"ReadonlyOptional");f();function yq(t,e,r){return gt({[pt]:"Record",type:"object",patternProperties:{[t]:e}},r)}a(yq,"RecordCreateFromPattern");function fmt(t,e,r){let n={};for(let o of t)n[o]=e;return da(n,{...r,[_b]:"Record"})}a(fmt,"RecordCreateFromKeys");function wIi(t,e,r){return S5e(t)?fmt(lE(t),e,r):yq(t.pattern,e,r)}a(wIi,"FromTemplateLiteralKey");function RIi(t,e,r){return fmt(lE(ua(t)),e,r)}a(RIi,"FromUnionKey");function PIi(t,e,r){return fmt([t.toString()],e,r)}a(PIi,"FromLiteralKey");function kIi(t,e,r){return yq(t.source,e,r)}a(kIi,"FromRegExpKey");function DIi(t,e,r){let n=Zd(t.pattern)?K3:t.pattern;return yq(n,e,r)}a(DIi,"FromStringKey");function NIi(t,e,r){return yq(K3,e,r)}a(NIi,"FromAnyKey");function MIi(t,e,r){return yq(ITr,e,r)}a(MIi,"FromNeverKey");function OIi(t,e,r){return da({true:e,false:e},r)}a(OIi,"FromBooleanKey");function BIi(t,e,r){return yq(Y3,e,r)}a(BIi,"FromIntegerKey");function LIi(t,e,r){return yq(Y3,e,r)}a(LIi,"FromNumberKey");function Q5e(t,e,r={}){return Ds(t)?RIi(t.anyOf,e,r):OC(t)?wIi(t,e,r):NC(t)?PIi(t.const,e,r):CN(t)?OIi(t,e,r):DI(t)?BIi(t,e,r):NI(t)?LIi(t,e,r):$ht(t)?kIi(t,e,r):vN(t)?DIi(t,e,r):Hht(t)?NIi(t,e,r):W3(t)?MIi(t,e,r):go(r)}a(Q5e,"Record");function q5e(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}a(q5e,"RecordPattern");function ySr(t){let e=q5e(t);return e===K3?MA():e===Y3?Cb():MA({pattern:e})}a(ySr,"RecordKey");function G5e(t){return t.patternProperties[q5e(t)]}a(G5e,"RecordValue");function FIi(t,e){return e.parameters=npe(t,e.parameters),e.returns=BI(t,e.returns),e}a(FIi,"FromConstructor");function UIi(t,e){return e.parameters=npe(t,e.parameters),e.returns=BI(t,e.returns),e}a(UIi,"FromFunction");function QIi(t,e){return e.allOf=npe(t,e.allOf),e}a(QIi,"FromIntersect");function qIi(t,e){return e.anyOf=npe(t,e.anyOf),e}a(qIi,"FromUnion");function GIi(t,e){return Zd(e.items)||(e.items=npe(t,e.items)),e}a(GIi,"FromTuple");function HIi(t,e){return e.items=BI(t,e.items),e}a(HIi,"FromArray");function jIi(t,e){return e.items=BI(t,e.items),e}a(jIi,"FromAsyncIterator");function $Ii(t,e){return e.items=BI(t,e.items),e}a($Ii,"FromIterator");function VIi(t,e){return e.item=BI(t,e.item),e}a(VIi,"FromPromise");function WIi(t,e){let r=JIi(t,e.properties);return{...e,...da(r)}}a(WIi,"FromObject");function zIi(t,e){let r=BI(t,ySr(e)),n=BI(t,G5e(e)),o=Q5e(r,n);return{...e,...o}}a(zIi,"FromRecord");function YIi(t,e){return e.index in t?t[e.index]:OI()}a(YIi,"FromArgument");function KIi(t,e){let r=sX(e),n=cE(e),o=BI(t,e);return r&&n?U5e(o):r&&!n?uE(o):!r&&n?lg(o):o}a(KIi,"FromProperty");function JIi(t,e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:KIi(t,e[n])}),{})}a(JIi,"FromProperties");function npe(t,e){return e.map(r=>BI(t,r))}a(npe,"FromTypes");function BI(t,e){return PI(e)?FIi(t,e):kI(e)?UIi(t,e):Fu(e)?QIi(t,e):Ds(e)?qIi(t,e):BC(e)?GIi(t,e):wI(e)?HIi(t,e):dq(e)?jIi(t,e):pq(e)?$Ii(t,e):hq(e)?VIi(t,e):ef(e)?WIi(t,e):mq(e)?zIi(t,e):jht(e)?YIi(t,e):e}a(BI,"FromType");function ESr(t,e){return BI(e,iX(t))}a(ESr,"Instantiate");f();function _Sr(t){return gt({[pt]:"Integer",type:"integer"},t)}a(_Sr,"Integer");f();f();f();function XIi(t,e,r){return{[t]:LI(As(t),e,Tl(r))}}a(XIi,"MappedIntrinsicPropertyKey");function ZIi(t,e,r){return t.reduce((o,s)=>({...o,...XIi(s,e,r)}),{})}a(ZIi,"MappedIntrinsicPropertyKeys");function exi(t,e,r){return ZIi(t.keys,e,r)}a(exi,"MappedIntrinsicProperties");function CSr(t,e,r){let n=exi(t,e,r);return Ws(n)}a(CSr,"IntrinsicFromMappedKey");function txi(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),r].join("")}a(txi,"ApplyUncapitalize");function rxi(t){let[e,r]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),r].join("")}a(rxi,"ApplyCapitalize");function nxi(t){return t.toUpperCase()}a(nxi,"ApplyUppercase");function ixi(t){return t.toLowerCase()}a(ixi,"ApplyLowercase");function oxi(t,e,r){let n=pX(t.pattern);if(!gq(n))return{...t,pattern:vSr(t.pattern,e)};let c=[...Z0e(n)].map(d=>As(d)),l=bSr(c,e),u=ua(l);return x5e([u],r)}a(oxi,"FromTemplateLiteral");function vSr(t,e){return typeof t=="string"?e==="Uncapitalize"?txi(t):e==="Capitalize"?rxi(t):e==="Uppercase"?nxi(t):e==="Lowercase"?ixi(t):t:t.toString()}a(vSr,"FromLiteralValue");function bSr(t,e){return t.map(r=>LI(r,e))}a(bSr,"FromRest");function LI(t,e,r={}){return MC(t)?CSr(t,e,r):OC(t)?oxi(t,e,r):Ds(t)?ua(bSr(t.anyOf,e),r):NC(t)?As(vSr(t.const,e),r):gt(t,r)}a(LI,"Intrinsic");function TSr(t,e={}){return LI(t,"Capitalize",e)}a(TSr,"Capitalize");f();function SSr(t,e={}){return LI(t,"Lowercase",e)}a(SSr,"Lowercase");f();function ISr(t,e={}){return LI(t,"Uncapitalize",e)}a(ISr,"Uncapitalize");f();function xSr(t,e={}){return LI(t,"Uppercase",e)}a(xSr,"Uppercase");f();f();f();f();f();function sxi(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=eL(t[o],e,Tl(r));return n}a(sxi,"FromProperties");function axi(t,e,r){return sxi(t.properties,e,r)}a(axi,"FromMappedResult");function wSr(t,e,r){let n=axi(t,e,r);return Ws(n)}a(wSr,"OmitFromMappedResult");function cxi(t,e){return t.map(r=>pmt(r,e))}a(cxi,"FromIntersect");function lxi(t,e){return t.map(r=>pmt(r,e))}a(lxi,"FromUnion");function uxi(t,e){let{[e]:r,...n}=t;return n}a(uxi,"FromProperty");function dxi(t,e){return e.reduce((r,n)=>uxi(r,n),t)}a(dxi,"FromProperties");function fxi(t,e){let r=Uu(t,[lu,"$id","required","properties"]),n=dxi(t.properties,e);return da(n,r)}a(fxi,"FromObject");function pxi(t){let e=t.reduce((r,n)=>v5e(n)?[...r,As(n)]:r,[]);return ua(e)}a(pxi,"UnionFromPropertyKeys");function pmt(t,e){return Fu(t)?ug(cxi(t.allOf,e)):Ds(t)?ua(lxi(t.anyOf,e)):ef(t)?fxi(t,e):da({})}a(pmt,"OmitResolve");function eL(t,e,r){let n=Xd(e)?pxi(e):e,o=uu(e)?lE(e):e,s=hd(t),c=hd(e);return Il(t)?wSr(t,o,r):MC(e)?RSr(t,e,r):s&&c?zc("Omit",[t,n],r):!s&&c?zc("Omit",[t,n],r):s&&!c?zc("Omit",[t,n],r):gt({...pmt(t,o),...r})}a(eL,"Omit");function hxi(t,e,r){return{[e]:eL(t,[e],Tl(r))}}a(hxi,"FromPropertyKey");function mxi(t,e,r){return e.reduce((n,o)=>({...n,...hxi(t,o,r)}),{})}a(mxi,"FromPropertyKeys");function gxi(t,e,r){return mxi(t,e.keys,r)}a(gxi,"FromMappedKey");function RSr(t,e,r){let n=gxi(t,e,r);return Ws(n)}a(RSr,"OmitFromMappedKey");f();f();f();function Axi(t,e,r){let n={};for(let o of globalThis.Object.getOwnPropertyNames(t))n[o]=tL(t[o],e,Tl(r));return n}a(Axi,"FromProperties");function yxi(t,e,r){return Axi(t.properties,e,r)}a(yxi,"FromMappedResult");function PSr(t,e,r){let n=yxi(t,e,r);return Ws(n)}a(PSr,"PickFromMappedResult");function Exi(t,e){return t.map(r=>hmt(r,e))}a(Exi,"FromIntersect");function _xi(t,e){return t.map(r=>hmt(r,e))}a(_xi,"FromUnion");function Cxi(t,e){let r={};for(let n of e)n in t&&(r[n]=t[n]);return r}a(Cxi,"FromProperties");function vxi(t,e){let r=Uu(t,[lu,"$id","required","properties"]),n=Cxi(t.properties,e);return da(n,r)}a(vxi,"FromObject");function bxi(t){let e=t.reduce((r,n)=>v5e(n)?[...r,As(n)]:r,[]);return ua(e)}a(bxi,"UnionFromPropertyKeys");function hmt(t,e){return Fu(t)?ug(Exi(t.allOf,e)):Ds(t)?ua(_xi(t.anyOf,e)):ef(t)?vxi(t,e):da({})}a(hmt,"PickResolve");function tL(t,e,r){let n=Xd(e)?bxi(e):e,o=uu(e)?lE(e):e,s=hd(t),c=hd(e);return Il(t)?PSr(t,o,r):MC(e)?kSr(t,e,r):s&&c?zc("Pick",[t,n],r):!s&&c?zc("Pick",[t,n],r):s&&!c?zc("Pick",[t,n],r):gt({...hmt(t,o),...r})}a(tL,"Pick");function Txi(t,e,r){return{[e]:tL(t,[e],Tl(r))}}a(Txi,"FromPropertyKey");function Sxi(t,e,r){return e.reduce((n,o)=>({...n,...Txi(t,o,r)}),{})}a(Sxi,"FromPropertyKeys");function Ixi(t,e,r){return Sxi(t,e.keys,r)}a(Ixi,"FromMappedKey");function kSr(t,e,r){let n=Ixi(t,e,r);return Ws(n)}a(kSr,"PickFromMappedKey");f();f();function xxi(t,e){return zc("Partial",[zc(t,e)])}a(xxi,"FromComputed");function wxi(t){return zc("Partial",[Tb(t)])}a(wxi,"FromRef");function Rxi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=lg(t[r]);return e}a(Rxi,"FromProperties");function Pxi(t){let e=Uu(t,[lu,"$id","required","properties"]),r=Rxi(t.properties);return da(r,e)}a(Pxi,"FromObject");function DSr(t){return t.map(e=>NSr(e))}a(DSr,"FromRest");function NSr(t){return RI(t)?xxi(t.target,t.parameters):hd(t)?wxi(t.$ref):Fu(t)?ug(DSr(t.allOf)):Ds(t)?ua(DSr(t.anyOf)):ef(t)?Pxi(t):fq(t)||CN(t)||DI(t)||NC(t)||V0e(t)||NI(t)||vN(t)||W0e(t)||bN(t)?t:da({})}a(NSr,"PartialResolve");function bX(t,e){return Il(t)?MSr(t,e):gt({...NSr(t),...e})}a(bX,"Partial");function kxi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=bX(t[n],Tl(e));return r}a(kxi,"FromProperties");function Dxi(t,e){return kxi(t.properties,e)}a(Dxi,"FromMappedResult");function MSr(t,e){let r=Dxi(t,e);return Ws(r)}a(MSr,"PartialFromMappedResult");f();f();function Nxi(t,e){return zc("Required",[zc(t,e)])}a(Nxi,"FromComputed");function Mxi(t){return zc("Required",[Tb(t)])}a(Mxi,"FromRef");function Oxi(t){let e={};for(let r of globalThis.Object.getOwnPropertyNames(t))e[r]=Uu(t[r],[Kh]);return e}a(Oxi,"FromProperties");function Bxi(t){let e=Uu(t,[lu,"$id","required","properties"]),r=Oxi(t.properties);return da(r,e)}a(Bxi,"FromObject");function OSr(t){return t.map(e=>BSr(e))}a(OSr,"FromRest");function BSr(t){return RI(t)?Nxi(t.target,t.parameters):hd(t)?Mxi(t.$ref):Fu(t)?ug(OSr(t.allOf)):Ds(t)?ua(OSr(t.anyOf)):ef(t)?Bxi(t):fq(t)||CN(t)||DI(t)||NC(t)||V0e(t)||NI(t)||vN(t)||W0e(t)||bN(t)?t:da({})}a(BSr,"RequiredResolve");function TX(t,e){return Il(t)?LSr(t,e):gt({...BSr(t),...e})}a(TX,"Required");function Lxi(t,e){let r={};for(let n of globalThis.Object.getOwnPropertyNames(t))r[n]=TX(t[n],e);return r}a(Lxi,"FromProperties");function Fxi(t,e){return Lxi(t.properties,e)}a(Fxi,"FromMappedResult");function LSr(t,e){let r=Fxi(t,e);return Ws(r)}a(LSr,"RequiredFromMappedResult");function Uxi(t,e){return e.map(r=>hd(r)?mmt(t,r.$ref):LC(t,r))}a(Uxi,"DereferenceParameters");function mmt(t,e){return e in t?hd(t[e])?mmt(t,t[e].$ref):LC(t,t[e]):go()}a(mmt,"Dereference");function Qxi(t){return AX(t[0])}a(Qxi,"FromAwaited");function qxi(t){return X3(t[0],t[1])}a(qxi,"FromIndex");function Gxi(t){return yX(t[0])}a(Gxi,"FromKeyOf");function Hxi(t){return bX(t[0])}a(Hxi,"FromPartial");function jxi(t){return eL(t[0],t[1])}a(jxi,"FromOmit");function $xi(t){return tL(t[0],t[1])}a($xi,"FromPick");function Vxi(t){return TX(t[0])}a(Vxi,"FromRequired");function Wxi(t,e,r){let n=Uxi(t,r);return e==="Awaited"?Qxi(n):e==="Index"?qxi(n):e==="KeyOf"?Gxi(n):e==="Partial"?Hxi(n):e==="Omit"?jxi(n):e==="Pick"?$xi(n):e==="Required"?Vxi(n):go()}a(Wxi,"FromComputed");function zxi(t,e){return lX(LC(t,e))}a(zxi,"FromArray");function Yxi(t,e){return uX(LC(t,e))}a(Yxi,"FromAsyncIterator");function Kxi(t,e,r){return dX(ipe(t,e),LC(t,r))}a(Kxi,"FromConstructor");function Jxi(t,e,r){return R2(ipe(t,e),LC(t,r))}a(Jxi,"FromFunction");function Xxi(t,e){return ug(ipe(t,e))}a(Xxi,"FromIntersect");function Zxi(t,e){return gX(LC(t,e))}a(Zxi,"FromIterator");function ewi(t,e){return da(globalThis.Object.keys(e).reduce((r,n)=>({...r,[n]:LC(t,e[n])}),{}))}a(ewi,"FromObject");function twi(t,e){let[r,n]=[LC(t,G5e(e)),q5e(e)],o=iX(e);return o.patternProperties[n]=r,o}a(twi,"FromRecord");function rwi(t,e){return hd(e)?{...mmt(t,e.$ref),[lu]:e[lu]}:e}a(rwi,"FromTransform");function nwi(t,e){return vb(ipe(t,e))}a(nwi,"FromTuple");function iwi(t,e){return ua(ipe(t,e))}a(iwi,"FromUnion");function ipe(t,e){return e.map(r=>LC(t,r))}a(ipe,"FromTypes");function LC(t,e){return cE(e)?gt(LC(t,Uu(e,[Kh])),e):sX(e)?gt(LC(t,Uu(e,[xI])),e):la(e)?gt(rwi(t,e),e):wI(e)?gt(zxi(t,e.items),e):dq(e)?gt(Yxi(t,e.items),e):RI(e)?gt(Wxi(t,e.target,e.parameters)):PI(e)?gt(Kxi(t,e.parameters,e.returns),e):kI(e)?gt(Jxi(t,e.parameters,e.returns),e):Fu(e)?gt(Xxi(t,e.allOf),e):pq(e)?gt(Zxi(t,e.items),e):ef(e)?gt(ewi(t,e.properties),e):mq(e)?gt(twi(t,e)):BC(e)?gt(nwi(t,e.items||[]),e):Ds(e)?gt(iwi(t,e.anyOf),e):e}a(LC,"FromType");function owi(t,e){return e in t?LC(t,t[e]):go()}a(owi,"ComputeType");function FSr(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,r)=>({...e,[r]:owi(t,r)}),{})}a(FSr,"ComputeModuleProperties");var gmt=class{static{a(this,"TModule")}constructor(e){let r=FSr(e),n=this.WithIdentifiers(r);this.$defs=n}Import(e,r){let n={...this.$defs,[e]:gt(this.$defs[e],r)};return gt({[pt]:"Import",$defs:n,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((r,n)=>({...r,[n]:{...e[n],$id:n}}),{})}};function USr(t){return new gmt(t)}a(USr,"Module");f();function QSr(t,e){return gt({[pt]:"Not",not:t},e)}a(QSr,"Not");f();function qSr(t,e){return kI(t)?vb(t.parameters,e):go()}a(qSr,"Parameters");f();var swi=0;function GSr(t,e={}){Zd(e.$id)&&(e.$id=`T${swi++}`);let r=iX(t({[pt]:"This",$ref:`${e.$id}`}));return r.$id=e.$id,gt({[_b]:"Recursive",...r},e)}a(GSr,"Recursive");f();function HSr(t,e){let r=Dc(t)?new globalThis.RegExp(t):t;return gt({[pt]:"RegExp",type:"RegExp",source:r.source,flags:r.flags},e)}a(HSr,"RegExp");f();function awi(t){return Fu(t)?t.allOf:Ds(t)?t.anyOf:BC(t)?t.items??[]:[]}a(awi,"RestResolve");function jSr(t){return awi(t)}a(jSr,"Rest");f();function $Sr(t,e){return kI(t)?gt(t.returns,e):go(e)}a($Sr,"ReturnType");f();var Amt=class{static{a(this,"TransformDecodeBuilder")}constructor(e){this.schema=e}Decode(e){return new ymt(this.schema,e)}},ymt=class{static{a(this,"TransformEncodeBuilder")}constructor(e,r){this.schema=e,this.decode=r}EncodeTransform(e,r){let s={Encode:a(c=>r[lu].Encode(e(c)),"Encode"),Decode:a(c=>this.decode(r[lu].Decode(c)),"Decode")};return{...r,[lu]:s}}EncodeSchema(e,r){let n={Decode:this.decode,Encode:e};return{...r,[lu]:n}}Encode(e){return la(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};function VSr(t){return new Amt(t)}a(VSr,"Transform");f();function WSr(t={}){return gt({[pt]:t[pt]??"Unsafe"},t)}a(WSr,"Unsafe");f();function zSr(t){return gt({[pt]:"Void",type:"void"},t)}a(zSr,"Void");f();var Emt={};ui(Emt,{Any:()=>J3,Argument:()=>kTr,Array:()=>lX,AsyncIterator:()=>uX,Awaited:()=>AX,BigInt:()=>mX,Boolean:()=>I5e,Capitalize:()=>TSr,Composite:()=>KTr,Const:()=>JTr,Constructor:()=>dX,ConstructorParameters:()=>XTr,Date:()=>k5e,Enum:()=>ZTr,Exclude:()=>CX,Extends:()=>_X,Extract:()=>vX,Function:()=>R2,Index:()=>X3,InstanceType:()=>ASr,Instantiate:()=>ESr,Integer:()=>_Sr,Intersect:()=>ug,Iterator:()=>gX,KeyOf:()=>yX,Literal:()=>As,Lowercase:()=>SSr,Mapped:()=>jTr,Module:()=>USr,Never:()=>go,Not:()=>QSr,Null:()=>D5e,Number:()=>Cb,Object:()=>da,Omit:()=>eL,Optional:()=>lg,Parameters:()=>qSr,Partial:()=>bX,Pick:()=>tL,Promise:()=>R5e,Readonly:()=>uE,ReadonlyOptional:()=>U5e,Record:()=>Q5e,Recursive:()=>GSr,Ref:()=>Tb,RegExp:()=>HSr,Required:()=>TX,Rest:()=>jSr,ReturnType:()=>$Sr,String:()=>MA,Symbol:()=>N5e,TemplateLiteral:()=>x5e,Transform:()=>VSr,Tuple:()=>vb,Uint8Array:()=>O5e,Uncapitalize:()=>ISr,Undefined:()=>M5e,Union:()=>ua,Unknown:()=>OI,Unsafe:()=>WSr,Uppercase:()=>xSr,Void:()=>zSr});f();var S=Emt;f();f();function cwi(t){switch(t.errorType){case ft.ArrayContains:return"Expected array to contain at least one matching value";case ft.ArrayMaxContains:return`Expected array to contain no more than ${t.schema.maxContains} matching values`;case ft.ArrayMinContains:return`Expected array to contain at least ${t.schema.minContains} matching values`;case ft.ArrayMaxItems:return`Expected array length to be less or equal to ${t.schema.maxItems}`;case ft.ArrayMinItems:return`Expected array length to be greater or equal to ${t.schema.minItems}`;case ft.ArrayUniqueItems:return"Expected array elements to be unique";case ft.Array:return"Expected array";case ft.AsyncIterator:return"Expected AsyncIterator";case ft.BigIntExclusiveMaximum:return`Expected bigint to be less than ${t.schema.exclusiveMaximum}`;case ft.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${t.schema.exclusiveMinimum}`;case ft.BigIntMaximum:return`Expected bigint to be less or equal to ${t.schema.maximum}`;case ft.BigIntMinimum:return`Expected bigint to be greater or equal to ${t.schema.minimum}`;case ft.BigIntMultipleOf:return`Expected bigint to be a multiple of ${t.schema.multipleOf}`;case ft.BigInt:return"Expected bigint";case ft.Boolean:return"Expected boolean";case ft.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${t.schema.exclusiveMinimumTimestamp}`;case ft.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${t.schema.exclusiveMaximumTimestamp}`;case ft.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${t.schema.minimumTimestamp}`;case ft.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${t.schema.maximumTimestamp}`;case ft.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${t.schema.multipleOfTimestamp}`;case ft.Date:return"Expected Date";case ft.Function:return"Expected function";case ft.IntegerExclusiveMaximum:return`Expected integer to be less than ${t.schema.exclusiveMaximum}`;case ft.IntegerExclusiveMinimum:return`Expected integer to be greater than ${t.schema.exclusiveMinimum}`;case ft.IntegerMaximum:return`Expected integer to be less or equal to ${t.schema.maximum}`;case ft.IntegerMinimum:return`Expected integer to be greater or equal to ${t.schema.minimum}`;case ft.IntegerMultipleOf:return`Expected integer to be a multiple of ${t.schema.multipleOf}`;case ft.Integer:return"Expected integer";case ft.IntersectUnevaluatedProperties:return"Unexpected property";case ft.Intersect:return"Expected all values to match";case ft.Iterator:return"Expected Iterator";case ft.Literal:return`Expected ${typeof t.schema.const=="string"?`'${t.schema.const}'`:t.schema.const}`;case ft.Never:return"Never";case ft.Not:return"Value should not match";case ft.Null:return"Expected null";case ft.NumberExclusiveMaximum:return`Expected number to be less than ${t.schema.exclusiveMaximum}`;case ft.NumberExclusiveMinimum:return`Expected number to be greater than ${t.schema.exclusiveMinimum}`;case ft.NumberMaximum:return`Expected number to be less or equal to ${t.schema.maximum}`;case ft.NumberMinimum:return`Expected number to be greater or equal to ${t.schema.minimum}`;case ft.NumberMultipleOf:return`Expected number to be a multiple of ${t.schema.multipleOf}`;case ft.Number:return"Expected number";case ft.Object:return"Expected object";case ft.ObjectAdditionalProperties:return"Unexpected property";case ft.ObjectMaxProperties:return`Expected object to have no more than ${t.schema.maxProperties} properties`;case ft.ObjectMinProperties:return`Expected object to have at least ${t.schema.minProperties} properties`;case ft.ObjectRequiredProperty:return"Expected required property";case ft.Promise:return"Expected Promise";case ft.RegExp:return"Expected string to match regular expression";case ft.StringFormatUnknown:return`Unknown format '${t.schema.format}'`;case ft.StringFormat:return`Expected string to match '${t.schema.format}' format`;case ft.StringMaxLength:return`Expected string length less or equal to ${t.schema.maxLength}`;case ft.StringMinLength:return`Expected string length greater or equal to ${t.schema.minLength}`;case ft.StringPattern:return`Expected string to match '${t.schema.pattern}'`;case ft.String:return"Expected string";case ft.Symbol:return"Expected symbol";case ft.TupleLength:return`Expected tuple to have ${t.schema.maxItems||0} elements`;case ft.Tuple:return"Expected tuple";case ft.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${t.schema.maxByteLength}`;case ft.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${t.schema.minByteLength}`;case ft.Uint8Array:return"Expected Uint8Array";case ft.Undefined:return"Expected undefined";case ft.Union:return"Expected union value";case ft.Void:return"Expected void";case ft.Kind:return`Expected kind '${t.schema[pt]}'`;default:return"Unknown error type"}}a(cwi,"DefaultErrorFunction");var lwi=cwi;function YSr(){return lwi}a(YSr,"GetErrorFunction");f();var _mt=class extends fi{static{a(this,"TypeDereferenceError")}constructor(e){super(`Unable to dereference schema with $id '${e.$ref}'`),this.schema=e}};function uwi(t,e){let r=e.find(n=>n.$id===t.$ref);if(r===void 0)throw new _mt(t);return Ns(r,e)}a(uwi,"Resolve");function Qp(t,e){return!ks(t.$id)||e.some(r=>r.$id===t.$id)||e.push(t),e}a(Qp,"Pushref");function Ns(t,e){return t[pt]==="This"||t[pt]==="Ref"?uwi(t,e):t}a(Ns,"Deref");f();var Cmt=class extends fi{static{a(this,"ValueHashError")}constructor(e){super("Unable to hash value"),this.value=e}},FC;(function(t){t[t.Undefined=0]="Undefined",t[t.Null=1]="Null",t[t.Boolean=2]="Boolean",t[t.Number=3]="Number",t[t.String=4]="String",t[t.Object=5]="Object",t[t.Array=6]="Array",t[t.Date=7]="Date",t[t.Uint8Array=8]="Uint8Array",t[t.Symbol=9]="Symbol",t[t.BigInt=10]="BigInt"})(FC||(FC={}));var SX=BigInt("14695981039346656037"),[dwi,fwi]=[BigInt("1099511628211"),BigInt("18446744073709551616")],pwi=Array.from({length:256}).map((t,e)=>BigInt(e)),KSr=new Float64Array(1),JSr=new DataView(KSr.buffer),XSr=new Uint8Array(KSr.buffer);function*hwi(t){let e=t===0?1:Math.ceil(Math.floor(Math.log2(t)+1)/8);for(let r=0;r>8*(e-1-r)&255}a(hwi,"NumberToBytes");function mwi(t){fg(FC.Array);for(let e of t)IX(e)}a(mwi,"ArrayType");function gwi(t){fg(FC.Boolean),fg(t?1:0)}a(gwi,"BooleanType");function Awi(t){fg(FC.BigInt),JSr.setBigInt64(0,t);for(let e of XSr)fg(e)}a(Awi,"BigIntType");function ywi(t){fg(FC.Date),IX(t.getTime())}a(ywi,"DateType");function Ewi(t){fg(FC.Null)}a(Ewi,"NullType");function _wi(t){fg(FC.Number),JSr.setFloat64(0,t);for(let e of XSr)fg(e)}a(_wi,"NumberType");function Cwi(t){fg(FC.Object);for(let e of globalThis.Object.getOwnPropertyNames(t).sort())IX(e),IX(t[e])}a(Cwi,"ObjectType");function vwi(t){fg(FC.String);for(let e=0;e=t.minItems)||rs(t.maxItems)&&!(r.length<=t.maxItems)||!r.every(s=>qp(t.items,e,s))||t.uniqueItems===!0&&!(function(){let s=new Set;for(let c of r){let l=rL(c);if(s.has(l))return!1;s.add(l)}return!0})())return!1;if(!(rs(t.contains)||Ln(t.minContains)||Ln(t.maxContains)))return!0;let n=rs(t.contains)?t.contains:go(),o=r.reduce((s,c)=>qp(n,e,c)?s+1:s,0);return!(o===0||Ln(t.minContains)&&ot.maxContains)}a(Rwi,"FromArray");function Pwi(t,e,r){return y5e(r)}a(Pwi,"FromAsyncIterator");function kwi(t,e,r){return!(!Yh(r)||rs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||rs(t.maximum)&&!(r<=t.maximum)||rs(t.minimum)&&!(r>=t.minimum)||rs(t.multipleOf)&&r%t.multipleOf!==BigInt(0))}a(kwi,"FromBigInt");function Dwi(t,e,r){return w2(r)}a(Dwi,"FromBoolean");function Nwi(t,e,r){return qp(t.returns,e,r.prototype)}a(Nwi,"FromConstructor");function Mwi(t,e,r){return!(!DA(r)||rs(t.exclusiveMaximumTimestamp)&&!(r.getTime()t.exclusiveMinimumTimestamp)||rs(t.maximumTimestamp)&&!(r.getTime()<=t.maximumTimestamp)||rs(t.minimumTimestamp)&&!(r.getTime()>=t.minimumTimestamp)||rs(t.multipleOfTimestamp)&&r.getTime()%t.multipleOfTimestamp!==0)}a(Mwi,"FromDate");function Owi(t,e,r){return V3(r)}a(Owi,"FromFunction");function Bwi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return qp(o,[...e,...n],r)}a(Bwi,"FromImport");function Lwi(t,e,r){return!(!C5e(r)||rs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||rs(t.maximum)&&!(r<=t.maximum)||rs(t.minimum)&&!(r>=t.minimum)||rs(t.multipleOf)&&r%t.multipleOf!==0)}a(Lwi,"FromInteger");function Fwi(t,e,r){let n=t.allOf.every(o=>qp(o,e,r));if(t.unevaluatedProperties===!1){let o=new RegExp(IN(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c));return n&&s}else if(uu(t.unevaluatedProperties)){let o=new RegExp(IN(t)),s=Object.getOwnPropertyNames(r).every(c=>o.test(c)||qp(t.unevaluatedProperties,e,r[c]));return n&&s}else return n}a(Fwi,"FromIntersect");function Uwi(t,e,r){return E5e(r)}a(Uwi,"FromIterator");function Qwi(t,e,r){return r===t.const}a(Qwi,"FromLiteral");function qwi(t,e,r){return!1}a(qwi,"FromNever");function Gwi(t,e,r){return!qp(t.not,e,r)}a(Gwi,"FromNot");function Hwi(t,e,r){return EN(r)}a(Hwi,"FromNull");function jwi(t,e,r){return!(!Wc.IsNumberLike(r)||rs(t.exclusiveMaximum)&&!(rt.exclusiveMinimum)||rs(t.minimum)&&!(r>=t.minimum)||rs(t.maximum)&&!(r<=t.maximum)||rs(t.multipleOf)&&r%t.multipleOf!==0)}a(jwi,"FromNumber");function $wi(t,e,r){if(!Wc.IsObjectLike(r)||rs(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||rs(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let n=Object.getOwnPropertyNames(t.properties);for(let o of n){let s=t.properties[o];if(t.required&&t.required.includes(o)){if(!qp(s,e,r[o])||(xN(s)||Iwi(s))&&!(o in r))return!1}else if(Wc.IsExactOptionalProperty(r,o)&&!qp(s,e,r[o]))return!1}if(t.additionalProperties===!1){let o=Object.getOwnPropertyNames(r);return t.required&&t.required.length===n.length&&o.length===n.length?!0:o.every(s=>n.includes(s))}else return typeof t.additionalProperties=="object"?Object.getOwnPropertyNames(r).every(s=>n.includes(s)||qp(t.additionalProperties,e,r[s])):!0}a($wi,"FromObject");function Vwi(t,e,r){return _5e(r)}a(Vwi,"FromPromise");function Wwi(t,e,r){if(!Wc.IsRecordLike(r)||rs(t.minProperties)&&!(Object.getOwnPropertyNames(r).length>=t.minProperties)||rs(t.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=t.maxProperties))return!1;let[n,o]=Object.entries(t.patternProperties)[0],s=new RegExp(n),c=Object.entries(r).every(([d,p])=>s.test(d)?qp(o,e,p):!0),l=typeof t.additionalProperties=="object"?Object.entries(r).every(([d,p])=>s.test(d)?!0:qp(t.additionalProperties,e,p)):!0,u=t.additionalProperties===!1?Object.getOwnPropertyNames(r).every(d=>s.test(d)):!0;return c&&l&&u}a(Wwi,"FromRecord");function zwi(t,e,r){return qp(Ns(t,e),e,r)}a(zwi,"FromRef");function Ywi(t,e,r){let n=new RegExp(t.source,t.flags);return rs(t.minLength)&&!(r.length>=t.minLength)||rs(t.maxLength)&&!(r.length<=t.maxLength)?!1:n.test(r)}a(Ywi,"FromRegExp");function Kwi(t,e,r){return!ks(r)||rs(t.minLength)&&!(r.length>=t.minLength)||rs(t.maxLength)&&!(r.length<=t.maxLength)||rs(t.pattern)&&!new RegExp(t.pattern).test(r)?!1:rs(t.format)?MI.Has(t.format)?MI.Get(t.format)(r):!1:!0}a(Kwi,"FromString");function Jwi(t,e,r){return _N(r)}a(Jwi,"FromSymbol");function Xwi(t,e,r){return ks(r)&&new RegExp(t.pattern).test(r)}a(Xwi,"FromTemplateLiteral");function Zwi(t,e,r){return qp(Ns(t,e),e,r)}a(Zwi,"FromThis");function eRi(t,e,r){if(!ei(r)||t.items===void 0&&r.length!==0||r.length!==t.maxItems)return!1;if(!t.items)return!0;for(let n=0;nqp(n,e,r))}a(rRi,"FromUnion");function nRi(t,e,r){return!(!oX(r)||rs(t.maxByteLength)&&!(r.length<=t.maxByteLength)||rs(t.minByteLength)&&!(r.length>=t.minByteLength))}a(nRi,"FromUint8Array");function iRi(t,e,r){return!0}a(iRi,"FromUnknown");function oRi(t,e,r){return Wc.IsVoidLike(r)}a(oRi,"FromVoid");function sRi(t,e,r){return NA.Has(t[pt])?NA.Get(t[pt])(t,r):!1}a(sRi,"FromKind");function qp(t,e,r){let n=rs(t.$id)?Qp(t,e):e,o=t;switch(o[pt]){case"Any":return xwi(o,n,r);case"Argument":return wwi(o,n,r);case"Array":return Rwi(o,n,r);case"AsyncIterator":return Pwi(o,n,r);case"BigInt":return kwi(o,n,r);case"Boolean":return Dwi(o,n,r);case"Constructor":return Nwi(o,n,r);case"Date":return Mwi(o,n,r);case"Function":return Owi(o,n,r);case"Import":return Bwi(o,n,r);case"Integer":return Lwi(o,n,r);case"Intersect":return Fwi(o,n,r);case"Iterator":return Uwi(o,n,r);case"Literal":return Qwi(o,n,r);case"Never":return qwi(o,n,r);case"Not":return Gwi(o,n,r);case"Null":return Hwi(o,n,r);case"Number":return jwi(o,n,r);case"Object":return $wi(o,n,r);case"Promise":return Vwi(o,n,r);case"Record":return Wwi(o,n,r);case"Ref":return zwi(o,n,r);case"RegExp":return Ywi(o,n,r);case"String":return Kwi(o,n,r);case"Symbol":return Jwi(o,n,r);case"TemplateLiteral":return Xwi(o,n,r);case"This":return Zwi(o,n,r);case"Tuple":return eRi(o,n,r);case"Undefined":return tRi(o,n,r);case"Union":return rRi(o,n,r);case"Uint8Array":return nRi(o,n,r);case"Unknown":return iRi(o,n,r);case"Void":return oRi(o,n,r);default:if(!NA.Has(o[pt]))throw new vmt(o);return sRi(o,n,r)}}a(qp,"Visit");function Ao(...t){return t.length===3?qp(t[0],t[1],t[2]):qp(t[0],[],t[1])}a(Ao,"Check");var ft;(function(t){t[t.ArrayContains=0]="ArrayContains",t[t.ArrayMaxContains=1]="ArrayMaxContains",t[t.ArrayMaxItems=2]="ArrayMaxItems",t[t.ArrayMinContains=3]="ArrayMinContains",t[t.ArrayMinItems=4]="ArrayMinItems",t[t.ArrayUniqueItems=5]="ArrayUniqueItems",t[t.Array=6]="Array",t[t.AsyncIterator=7]="AsyncIterator",t[t.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",t[t.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",t[t.BigIntMaximum=10]="BigIntMaximum",t[t.BigIntMinimum=11]="BigIntMinimum",t[t.BigIntMultipleOf=12]="BigIntMultipleOf",t[t.BigInt=13]="BigInt",t[t.Boolean=14]="Boolean",t[t.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",t[t.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",t[t.DateMaximumTimestamp=17]="DateMaximumTimestamp",t[t.DateMinimumTimestamp=18]="DateMinimumTimestamp",t[t.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",t[t.Date=20]="Date",t[t.Function=21]="Function",t[t.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",t[t.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",t[t.IntegerMaximum=24]="IntegerMaximum",t[t.IntegerMinimum=25]="IntegerMinimum",t[t.IntegerMultipleOf=26]="IntegerMultipleOf",t[t.Integer=27]="Integer",t[t.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",t[t.Intersect=29]="Intersect",t[t.Iterator=30]="Iterator",t[t.Kind=31]="Kind",t[t.Literal=32]="Literal",t[t.Never=33]="Never",t[t.Not=34]="Not",t[t.Null=35]="Null",t[t.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",t[t.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",t[t.NumberMaximum=38]="NumberMaximum",t[t.NumberMinimum=39]="NumberMinimum",t[t.NumberMultipleOf=40]="NumberMultipleOf",t[t.Number=41]="Number",t[t.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",t[t.ObjectMaxProperties=43]="ObjectMaxProperties",t[t.ObjectMinProperties=44]="ObjectMinProperties",t[t.ObjectRequiredProperty=45]="ObjectRequiredProperty",t[t.Object=46]="Object",t[t.Promise=47]="Promise",t[t.RegExp=48]="RegExp",t[t.StringFormatUnknown=49]="StringFormatUnknown",t[t.StringFormat=50]="StringFormat",t[t.StringMaxLength=51]="StringMaxLength",t[t.StringMinLength=52]="StringMinLength",t[t.StringPattern=53]="StringPattern",t[t.String=54]="String",t[t.Symbol=55]="Symbol",t[t.TupleLength=56]="TupleLength",t[t.Tuple=57]="Tuple",t[t.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",t[t.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",t[t.Uint8Array=60]="Uint8Array",t[t.Undefined=61]="Undefined",t[t.Union=62]="Union",t[t.Void=63]="Void"})(ft||(ft={}));var bmt=class extends fi{static{a(this,"ValueErrorsUnknownTypeError")}constructor(e){super("Unknown type"),this.schema=e}};function wN(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}a(wN,"EscapeKey");function ns(t){return t!==void 0}a(ns,"IsDefined");var nL=class{static{a(this,"ValueErrorIterator")}constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){let e=this.iterator.next();return e.done?void 0:e.value}};function Gr(t,e,r,n,o=[]){return{type:t,schema:e,path:r,value:n,message:YSr()({errorType:t,path:r,schema:e,value:n,errors:o}),errors:o}}a(Gr,"Create");function*aRi(t,e,r,n){}a(aRi,"FromAny");function*cRi(t,e,r,n){}a(cRi,"FromArgument");function*lRi(t,e,r,n){if(!ei(n))return yield Gr(ft.Array,t,r,n);ns(t.minItems)&&!(n.length>=t.minItems)&&(yield Gr(ft.ArrayMinItems,t,r,n)),ns(t.maxItems)&&!(n.length<=t.maxItems)&&(yield Gr(ft.ArrayMaxItems,t,r,n));for(let c=0;cGp(o,e,`${r}${u}`,l).next().done===!0?c+1:c,0);s===0&&(yield Gr(ft.ArrayContains,t,r,n)),Ln(t.minContains)&&st.maxContains&&(yield Gr(ft.ArrayMaxContains,t,r,n))}a(lRi,"FromArray");function*uRi(t,e,r,n){y5e(n)||(yield Gr(ft.AsyncIterator,t,r,n))}a(uRi,"FromAsyncIterator");function*dRi(t,e,r,n){if(!Yh(n))return yield Gr(ft.BigInt,t,r,n);ns(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ft.BigIntExclusiveMinimum,t,r,n)),ns(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ft.BigIntMaximum,t,r,n)),ns(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ft.BigIntMinimum,t,r,n)),ns(t.multipleOf)&&n%t.multipleOf!==BigInt(0)&&(yield Gr(ft.BigIntMultipleOf,t,r,n))}a(dRi,"FromBigInt");function*fRi(t,e,r,n){w2(n)||(yield Gr(ft.Boolean,t,r,n))}a(fRi,"FromBoolean");function*pRi(t,e,r,n){yield*Gp(t.returns,e,r,n.prototype)}a(pRi,"FromConstructor");function*hRi(t,e,r,n){if(!DA(n))return yield Gr(ft.Date,t,r,n);ns(t.exclusiveMaximumTimestamp)&&!(n.getTime()t.exclusiveMinimumTimestamp)&&(yield Gr(ft.DateExclusiveMinimumTimestamp,t,r,n)),ns(t.maximumTimestamp)&&!(n.getTime()<=t.maximumTimestamp)&&(yield Gr(ft.DateMaximumTimestamp,t,r,n)),ns(t.minimumTimestamp)&&!(n.getTime()>=t.minimumTimestamp)&&(yield Gr(ft.DateMinimumTimestamp,t,r,n)),ns(t.multipleOfTimestamp)&&n.getTime()%t.multipleOfTimestamp!==0&&(yield Gr(ft.DateMultipleOfTimestamp,t,r,n))}a(hRi,"FromDate");function*mRi(t,e,r,n){V3(n)||(yield Gr(ft.Function,t,r,n))}a(mRi,"FromFunction");function*gRi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref];yield*Gp(s,[...e,...o],r,n)}a(gRi,"FromImport");function*ARi(t,e,r,n){if(!C5e(n))return yield Gr(ft.Integer,t,r,n);ns(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ft.IntegerExclusiveMinimum,t,r,n)),ns(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ft.IntegerMaximum,t,r,n)),ns(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ft.IntegerMinimum,t,r,n)),ns(t.multipleOf)&&n%t.multipleOf!==0&&(yield Gr(ft.IntegerMultipleOf,t,r,n))}a(ARi,"FromInteger");function*yRi(t,e,r,n){let o=!1;for(let s of t.allOf)for(let c of Gp(s,e,r,n))o=!0,yield c;if(o)return yield Gr(ft.Intersect,t,r,n);if(t.unevaluatedProperties===!1){let s=new RegExp(IN(t));for(let c of Object.getOwnPropertyNames(n))s.test(c)||(yield Gr(ft.IntersectUnevaluatedProperties,t,`${r}/${c}`,n))}if(typeof t.unevaluatedProperties=="object"){let s=new RegExp(IN(t));for(let c of Object.getOwnPropertyNames(n))if(!s.test(c)){let l=Gp(t.unevaluatedProperties,e,`${r}/${c}`,n[c]).next();l.done||(yield l.value)}}}a(yRi,"FromIntersect");function*ERi(t,e,r,n){E5e(n)||(yield Gr(ft.Iterator,t,r,n))}a(ERi,"FromIterator");function*_Ri(t,e,r,n){n!==t.const&&(yield Gr(ft.Literal,t,r,n))}a(_Ri,"FromLiteral");function*CRi(t,e,r,n){yield Gr(ft.Never,t,r,n)}a(CRi,"FromNever");function*vRi(t,e,r,n){Gp(t.not,e,r,n).next().done===!0&&(yield Gr(ft.Not,t,r,n))}a(vRi,"FromNot");function*bRi(t,e,r,n){EN(n)||(yield Gr(ft.Null,t,r,n))}a(bRi,"FromNull");function*TRi(t,e,r,n){if(!Wc.IsNumberLike(n))return yield Gr(ft.Number,t,r,n);ns(t.exclusiveMaximum)&&!(nt.exclusiveMinimum)&&(yield Gr(ft.NumberExclusiveMinimum,t,r,n)),ns(t.maximum)&&!(n<=t.maximum)&&(yield Gr(ft.NumberMaximum,t,r,n)),ns(t.minimum)&&!(n>=t.minimum)&&(yield Gr(ft.NumberMinimum,t,r,n)),ns(t.multipleOf)&&n%t.multipleOf!==0&&(yield Gr(ft.NumberMultipleOf,t,r,n))}a(TRi,"FromNumber");function*SRi(t,e,r,n){if(!Wc.IsObjectLike(n))return yield Gr(ft.Object,t,r,n);ns(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield Gr(ft.ObjectMinProperties,t,r,n)),ns(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield Gr(ft.ObjectMaxProperties,t,r,n));let o=Array.isArray(t.required)?t.required:[],s=Object.getOwnPropertyNames(t.properties),c=Object.getOwnPropertyNames(n);for(let l of o)c.includes(l)||(yield Gr(ft.ObjectRequiredProperty,t.properties[l],`${r}/${wN(l)}`,void 0));if(t.additionalProperties===!1)for(let l of c)s.includes(l)||(yield Gr(ft.ObjectAdditionalProperties,t,`${r}/${wN(l)}`,n[l]));if(typeof t.additionalProperties=="object")for(let l of c)s.includes(l)||(yield*Gp(t.additionalProperties,e,`${r}/${wN(l)}`,n[l]));for(let l of s){let u=t.properties[l];t.required&&t.required.includes(l)?(yield*Gp(u,e,`${r}/${wN(l)}`,n[l]),xN(t)&&!(l in n)&&(yield Gr(ft.ObjectRequiredProperty,u,`${r}/${wN(l)}`,void 0))):Wc.IsExactOptionalProperty(n,l)&&(yield*Gp(u,e,`${r}/${wN(l)}`,n[l]))}}a(SRi,"FromObject");function*IRi(t,e,r,n){_5e(n)||(yield Gr(ft.Promise,t,r,n))}a(IRi,"FromPromise");function*xRi(t,e,r,n){if(!Wc.IsRecordLike(n))return yield Gr(ft.Object,t,r,n);ns(t.minProperties)&&!(Object.getOwnPropertyNames(n).length>=t.minProperties)&&(yield Gr(ft.ObjectMinProperties,t,r,n)),ns(t.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=t.maxProperties)&&(yield Gr(ft.ObjectMaxProperties,t,r,n));let[o,s]=Object.entries(t.patternProperties)[0],c=new RegExp(o);for(let[l,u]of Object.entries(n))c.test(l)&&(yield*Gp(s,e,`${r}/${wN(l)}`,u));if(typeof t.additionalProperties=="object")for(let[l,u]of Object.entries(n))c.test(l)||(yield*Gp(t.additionalProperties,e,`${r}/${wN(l)}`,u));if(t.additionalProperties===!1){for(let[l,u]of Object.entries(n))if(!c.test(l))return yield Gr(ft.ObjectAdditionalProperties,t,`${r}/${wN(l)}`,u)}}a(xRi,"FromRecord");function*wRi(t,e,r,n){yield*Gp(Ns(t,e),e,r,n)}a(wRi,"FromRef");function*RRi(t,e,r,n){if(!ks(n))return yield Gr(ft.String,t,r,n);if(ns(t.minLength)&&!(n.length>=t.minLength)&&(yield Gr(ft.StringMinLength,t,r,n)),ns(t.maxLength)&&!(n.length<=t.maxLength)&&(yield Gr(ft.StringMaxLength,t,r,n)),!new RegExp(t.source,t.flags).test(n))return yield Gr(ft.RegExp,t,r,n)}a(RRi,"FromRegExp");function*PRi(t,e,r,n){if(!ks(n))return yield Gr(ft.String,t,r,n);ns(t.minLength)&&!(n.length>=t.minLength)&&(yield Gr(ft.StringMinLength,t,r,n)),ns(t.maxLength)&&!(n.length<=t.maxLength)&&(yield Gr(ft.StringMaxLength,t,r,n)),ks(t.pattern)&&(new RegExp(t.pattern).test(n)||(yield Gr(ft.StringPattern,t,r,n))),ks(t.format)&&(MI.Has(t.format)?MI.Get(t.format)(n)||(yield Gr(ft.StringFormat,t,r,n)):yield Gr(ft.StringFormatUnknown,t,r,n))}a(PRi,"FromString");function*kRi(t,e,r,n){_N(n)||(yield Gr(ft.Symbol,t,r,n))}a(kRi,"FromSymbol");function*DRi(t,e,r,n){if(!ks(n))return yield Gr(ft.String,t,r,n);new RegExp(t.pattern).test(n)||(yield Gr(ft.StringPattern,t,r,n))}a(DRi,"FromTemplateLiteral");function*NRi(t,e,r,n){yield*Gp(Ns(t,e),e,r,n)}a(NRi,"FromThis");function*MRi(t,e,r,n){if(!ei(n))return yield Gr(ft.Tuple,t,r,n);if(t.items===void 0&&n.length!==0)return yield Gr(ft.TupleLength,t,r,n);if(n.length!==t.maxItems)return yield Gr(ft.TupleLength,t,r,n);if(t.items)for(let o=0;onew nL(Gp(s,e,r,n)));yield Gr(ft.Union,t,r,n,o)}a(BRi,"FromUnion");function*LRi(t,e,r,n){if(!oX(n))return yield Gr(ft.Uint8Array,t,r,n);ns(t.maxByteLength)&&!(n.length<=t.maxByteLength)&&(yield Gr(ft.Uint8ArrayMaxByteLength,t,r,n)),ns(t.minByteLength)&&!(n.length>=t.minByteLength)&&(yield Gr(ft.Uint8ArrayMinByteLength,t,r,n))}a(LRi,"FromUint8Array");function*FRi(t,e,r,n){}a(FRi,"FromUnknown");function*URi(t,e,r,n){Wc.IsVoidLike(n)||(yield Gr(ft.Void,t,r,n))}a(URi,"FromVoid");function*QRi(t,e,r,n){NA.Get(t[pt])(t,n)||(yield Gr(ft.Kind,t,r,n))}a(QRi,"FromKind");function*Gp(t,e,r,n){let o=ns(t.$id)?[...e,t]:e,s=t;switch(s[pt]){case"Any":return yield*aRi(s,o,r,n);case"Argument":return yield*cRi(s,o,r,n);case"Array":return yield*lRi(s,o,r,n);case"AsyncIterator":return yield*uRi(s,o,r,n);case"BigInt":return yield*dRi(s,o,r,n);case"Boolean":return yield*fRi(s,o,r,n);case"Constructor":return yield*pRi(s,o,r,n);case"Date":return yield*hRi(s,o,r,n);case"Function":return yield*mRi(s,o,r,n);case"Import":return yield*gRi(s,o,r,n);case"Integer":return yield*ARi(s,o,r,n);case"Intersect":return yield*yRi(s,o,r,n);case"Iterator":return yield*ERi(s,o,r,n);case"Literal":return yield*_Ri(s,o,r,n);case"Never":return yield*CRi(s,o,r,n);case"Not":return yield*vRi(s,o,r,n);case"Null":return yield*bRi(s,o,r,n);case"Number":return yield*TRi(s,o,r,n);case"Object":return yield*SRi(s,o,r,n);case"Promise":return yield*IRi(s,o,r,n);case"Record":return yield*xRi(s,o,r,n);case"Ref":return yield*wRi(s,o,r,n);case"RegExp":return yield*RRi(s,o,r,n);case"String":return yield*PRi(s,o,r,n);case"Symbol":return yield*kRi(s,o,r,n);case"TemplateLiteral":return yield*DRi(s,o,r,n);case"This":return yield*NRi(s,o,r,n);case"Tuple":return yield*MRi(s,o,r,n);case"Undefined":return yield*ORi(s,o,r,n);case"Union":return yield*BRi(s,o,r,n);case"Uint8Array":return yield*LRi(s,o,r,n);case"Unknown":return yield*FRi(s,o,r,n);case"Void":return yield*URi(s,o,r,n);default:if(!NA.Has(s[pt]))throw new bmt(t);return yield*QRi(s,o,r,n)}}a(Gp,"Visit");function k2(...t){let e=t.length===3?Gp(t[0],t[1],"",t[2]):Gp(t[0],[],"",t[1]);return new nL(e)}a(k2,"Errors");f();f();var xX=class extends fi{static{a(this,"TransformDecodeCheckError")}constructor(e,r,n){super("Unable to decode value as it does not match the expected schema"),this.schema=e,this.value=r,this.error=n}},Tmt=class extends fi{static{a(this,"TransformDecodeError")}constructor(e,r,n,o){super(o instanceof Error?o.message:"Unknown error"),this.schema=e,this.path=r,this.value=n,this.error=o}};function du(t,e,r){try{return la(t)?t[lu].Decode(r):r}catch(n){throw new Tmt(t,e,r,n)}}a(du,"Default");function qRi(t,e,r,n){return ei(n)?du(t,r,n.map((o,s)=>FI(t.items,e,`${r}/${s}`,o))):du(t,r,n)}a(qRi,"FromArray");function GRi(t,e,r,n){if(!ji(n)||DC(n))return du(t,r,n);let o=P5e(t),s=o.map(p=>p[0]),c={...n};for(let[p,h]of o)p in c&&(c[p]=FI(h,e,`${r}/${p}`,c[p]));if(!la(t.unevaluatedProperties))return du(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.unevaluatedProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=du(u,`${r}/${p}`,d[p]));return du(t,r,d)}a(GRi,"FromIntersect");function HRi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=FI(s,[...e,...o],r,n);return du(t,r,c)}a(HRi,"FromImport");function jRi(t,e,r,n){return du(t,r,FI(t.not,e,r,n))}a(jRi,"FromNot");function $Ri(t,e,r,n){if(!ji(n))return du(t,r,n);let o=dE(t),s={...n};for(let d of o)di(s,d)&&(Sl(s[d])&&(!bN(t.properties[d])||Wc.IsExactOptionalProperty(s,d))||(s[d]=FI(t.properties[d],e,`${r}/${d}`,s[d])));if(!uu(t.additionalProperties))return du(t,r,s);let c=Object.getOwnPropertyNames(s),l=t.additionalProperties,u={...s};for(let d of c)o.includes(d)||(u[d]=du(l,`${r}/${d}`,u[d]));return du(t,r,u)}a($Ri,"FromObject");function VRi(t,e,r,n){if(!ji(n))return du(t,r,n);let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=new RegExp(o),c={...n};for(let p of Object.getOwnPropertyNames(n))s.test(p)&&(c[p]=FI(t.patternProperties[o],e,`${r}/${p}`,c[p]));if(!uu(t.additionalProperties))return du(t,r,c);let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.test(p)||(d[p]=du(u,`${r}/${p}`,d[p]));return du(t,r,d)}a(VRi,"FromRecord");function WRi(t,e,r,n){let o=Ns(t,e);return du(t,r,FI(o,e,r,n))}a(WRi,"FromRef");function zRi(t,e,r,n){let o=Ns(t,e);return du(t,r,FI(o,e,r,n))}a(zRi,"FromThis");function YRi(t,e,r,n){return ei(n)&&ei(t.items)?du(t,r,t.items.map((o,s)=>FI(o,e,`${r}/${s}`,n[s]))):du(t,r,n)}a(YRi,"FromTuple");function KRi(t,e,r,n){for(let o of t.anyOf){if(!Ao(o,e,n))continue;let s=FI(o,e,r,n);return du(t,r,s)}return du(t,r,n)}a(KRi,"FromUnion");function FI(t,e,r,n){let o=Qp(t,e),s=t;switch(t[pt]){case"Array":return qRi(s,o,r,n);case"Import":return HRi(s,o,r,n);case"Intersect":return GRi(s,o,r,n);case"Not":return jRi(s,o,r,n);case"Object":return $Ri(s,o,r,n);case"Record":return VRi(s,o,r,n);case"Ref":return WRi(s,o,r,n);case"Symbol":return du(s,r,n);case"This":return zRi(s,o,r,n);case"Tuple":return YRi(s,o,r,n);case"Union":return KRi(s,o,r,n);default:return du(s,r,n)}}a(FI,"Visit");function wX(t,e,r){return FI(t,e,"",r)}a(wX,"TransformDecode");f();var RX=class extends fi{static{a(this,"TransformEncodeCheckError")}constructor(e,r,n){super("The encoded value does not match the expected schema"),this.schema=e,this.value=r,this.error=n}},Smt=class extends fi{static{a(this,"TransformEncodeError")}constructor(e,r,n,o){super(`${o instanceof Error?o.message:"Unknown error"}`),this.schema=e,this.path=r,this.value=n,this.error=o}};function Jh(t,e,r){try{return la(t)?t[lu].Encode(r):r}catch(n){throw new Smt(t,e,r,n)}}a(Jh,"Default");function JRi(t,e,r,n){let o=Jh(t,r,n);return ei(o)?o.map((s,c)=>UI(t.items,e,`${r}/${c}`,s)):o}a(JRi,"FromArray");function XRi(t,e,r,n){let o=globalThis.Object.values(t.$defs),s=t.$defs[t.$ref],c=Jh(t,r,n);return UI(s,[...e,...o],r,c)}a(XRi,"FromImport");function ZRi(t,e,r,n){let o=Jh(t,r,n);if(!ji(n)||DC(n))return o;let s=P5e(t),c=s.map(h=>h[0]),l={...o};for(let[h,m]of s)h in l&&(l[h]=UI(m,e,`${r}/${h}`,l[h]));if(!la(t.unevaluatedProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.unevaluatedProperties,p={...l};for(let h of u)c.includes(h)||(p[h]=Jh(d,`${r}/${h}`,p[h]));return p}a(ZRi,"FromIntersect");function e2i(t,e,r,n){return Jh(t.not,r,Jh(t,r,n))}a(e2i,"FromNot");function t2i(t,e,r,n){let o=Jh(t,r,n);if(!ji(o))return o;let s=dE(t),c={...o};for(let p of s)di(c,p)&&(Sl(c[p])&&(!bN(t.properties[p])||Wc.IsExactOptionalProperty(c,p))||(c[p]=UI(t.properties[p],e,`${r}/${p}`,c[p])));if(!uu(t.additionalProperties))return c;let l=Object.getOwnPropertyNames(c),u=t.additionalProperties,d={...c};for(let p of l)s.includes(p)||(d[p]=Jh(u,`${r}/${p}`,d[p]));return d}a(t2i,"FromObject");function r2i(t,e,r,n){let o=Jh(t,r,n);if(!ji(n))return o;let s=Object.getOwnPropertyNames(t.patternProperties)[0],c=new RegExp(s),l={...o};for(let h of Object.getOwnPropertyNames(n))c.test(h)&&(l[h]=UI(t.patternProperties[s],e,`${r}/${h}`,l[h]));if(!uu(t.additionalProperties))return l;let u=Object.getOwnPropertyNames(l),d=t.additionalProperties,p={...l};for(let h of u)c.test(h)||(p[h]=Jh(d,`${r}/${h}`,p[h]));return p}a(r2i,"FromRecord");function n2i(t,e,r,n){let o=Ns(t,e),s=UI(o,e,r,n);return Jh(t,r,s)}a(n2i,"FromRef");function i2i(t,e,r,n){let o=Ns(t,e),s=UI(o,e,r,n);return Jh(t,r,s)}a(i2i,"FromThis");function o2i(t,e,r,n){let o=Jh(t,r,n);return ei(t.items)?t.items.map((s,c)=>UI(s,e,`${r}/${c}`,o[c])):[]}a(o2i,"FromTuple");function s2i(t,e,r,n){for(let o of t.anyOf){if(!Ao(o,e,n))continue;let s=UI(o,e,r,n);return Jh(t,r,s)}for(let o of t.anyOf){let s=UI(o,e,r,n);if(Ao(t,e,s))return Jh(t,r,s)}return Jh(t,r,n)}a(s2i,"FromUnion");function UI(t,e,r,n){let o=Qp(t,e),s=t;switch(t[pt]){case"Array":return JRi(s,o,r,n);case"Import":return XRi(s,o,r,n);case"Intersect":return ZRi(s,o,r,n);case"Not":return e2i(s,o,r,n);case"Object":return t2i(s,o,r,n);case"Record":return r2i(s,o,r,n);case"Ref":return n2i(s,o,r,n);case"This":return i2i(s,o,r,n);case"Tuple":return o2i(s,o,r,n);case"Union":return s2i(s,o,r,n);default:return Jh(s,r,n)}}a(UI,"Visit");function PX(t,e,r){return UI(t,e,"",r)}a(PX,"TransformEncode");f();function a2i(t,e){return la(t)||J0(t.items,e)}a(a2i,"FromArray");function c2i(t,e){return la(t)||J0(t.items,e)}a(c2i,"FromAsyncIterator");function l2i(t,e){return la(t)||J0(t.returns,e)||t.parameters.some(r=>J0(r,e))}a(l2i,"FromConstructor");function u2i(t,e){return la(t)||J0(t.returns,e)||t.parameters.some(r=>J0(r,e))}a(u2i,"FromFunction");function d2i(t,e){return la(t)||la(t.unevaluatedProperties)||t.allOf.some(r=>J0(r,e))}a(d2i,"FromIntersect");function f2i(t,e){let r=globalThis.Object.getOwnPropertyNames(t.$defs).reduce((o,s)=>[...o,t.$defs[s]],[]),n=t.$defs[t.$ref];return la(t)||J0(n,[...r,...e])}a(f2i,"FromImport");function p2i(t,e){return la(t)||J0(t.items,e)}a(p2i,"FromIterator");function h2i(t,e){return la(t)||J0(t.not,e)}a(h2i,"FromNot");function m2i(t,e){return la(t)||Object.values(t.properties).some(r=>J0(r,e))||uu(t.additionalProperties)&&J0(t.additionalProperties,e)}a(m2i,"FromObject");function g2i(t,e){return la(t)||J0(t.item,e)}a(g2i,"FromPromise");function A2i(t,e){let r=Object.getOwnPropertyNames(t.patternProperties)[0],n=t.patternProperties[r];return la(t)||J0(n,e)||uu(t.additionalProperties)&&la(t.additionalProperties)}a(A2i,"FromRecord");function y2i(t,e){return la(t)?!0:J0(Ns(t,e),e)}a(y2i,"FromRef");function E2i(t,e){return la(t)?!0:J0(Ns(t,e),e)}a(E2i,"FromThis");function _2i(t,e){return la(t)||!Sl(t.items)&&t.items.some(r=>J0(r,e))}a(_2i,"FromTuple");function C2i(t,e){return la(t)||t.anyOf.some(r=>J0(r,e))}a(C2i,"FromUnion");function J0(t,e){let r=Qp(t,e),n=t;if(t.$id&&Imt.has(t.$id))return!1;switch(t.$id&&Imt.add(t.$id),t[pt]){case"Array":return a2i(n,r);case"AsyncIterator":return c2i(n,r);case"Constructor":return l2i(n,r);case"Function":return u2i(n,r);case"Import":return f2i(n,r);case"Intersect":return d2i(n,r);case"Iterator":return p2i(n,r);case"Not":return h2i(n,r);case"Object":return m2i(n,r);case"Promise":return g2i(n,r);case"Record":return A2i(n,r);case"Ref":return y2i(n,r);case"This":return E2i(n,r);case"Tuple":return _2i(n,r);case"Union":return C2i(n,r);default:return la(t)}}a(J0,"Visit");var Imt=new Set;function RN(t,e){return Imt.clear(),J0(t,e)}a(RN,"HasTransform");var xmt=class{static{a(this,"TypeCheck")}constructor(e,r,n,o){this.schema=e,this.references=r,this.checkFunc=n,this.code=o,this.hasTransform=RN(e,r)}Code(){return this.code}Schema(){return this.schema}References(){return this.references}Errors(e){return k2(this.schema,this.references,e)}Check(e){return this.checkFunc(e)}Decode(e){if(!this.checkFunc(e))throw new xX(this.schema,e,this.Errors(e).First());return this.hasTransform?wX(this.schema,this.references,e):e}Encode(e){let r=this.hasTransform?PX(this.schema,this.references,e):e;if(!this.checkFunc(r))throw new RX(this.schema,e,this.Errors(e).First());return r}},PN;(function(t){function e(s){return s===36}a(e,"DollarSign"),t.DollarSign=e;function r(s){return s===95}a(r,"IsUnderscore"),t.IsUnderscore=r;function n(s){return s>=65&&s<=90||s>=97&&s<=122}a(n,"IsAlpha"),t.IsAlpha=n;function o(s){return s>=48&&s<=57}a(o,"IsNumeric"),t.IsNumeric=o})(PN||(PN={}));var H5e;(function(t){function e(s){return s.length===0?!1:PN.IsNumeric(s.charCodeAt(0))}a(e,"IsFirstCharacterNumeric");function r(s){if(e(s))return!1;for(let c=0;c= ${X.minItems}`);let ae=j(X.items,le,"value");if(yield`${te}.every((${xe}) => ${ae})`,xl(X.contains)||Ln(X.minContains)||Ln(X.maxContains)){let De=xl(X.contains)?X.contains:go(),Y=j(De,le,"value"),ee=Ln(X.minContains)?[`(count >= ${X.minContains})`]:[],Ee=Ln(X.maxContains)?[`(count <= ${X.maxContains})`]:[],Ae=`const count = value.reduce((${Z}, ${xe}) => ${Y} ? acc + 1 : acc, 0)`,ve=["(count > 0)",...ee,...Ee].join(" && ");yield`((${xe}) => { ${Ae}; return ${ve}})(${te})`}X.uniqueItems===!0&&(yield`((${xe}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${te})`)}a(o,"FromArray");function*s(X,le,te){yield`(typeof value === 'object' && Symbol.asyncIterator in ${te})`}a(s,"FromAsyncIterator");function*c(X,le,te){yield`(typeof ${te} === 'bigint')`,Yh(X.exclusiveMaximum)&&(yield`${te} < BigInt(${X.exclusiveMaximum})`),Yh(X.exclusiveMinimum)&&(yield`${te} > BigInt(${X.exclusiveMinimum})`),Yh(X.maximum)&&(yield`${te} <= BigInt(${X.maximum})`),Yh(X.minimum)&&(yield`${te} >= BigInt(${X.minimum})`),Yh(X.multipleOf)&&(yield`(${te} % BigInt(${X.multipleOf})) === 0`)}a(c,"FromBigInt");function*l(X,le,te){yield`(typeof ${te} === 'boolean')`}a(l,"FromBoolean");function*u(X,le,te){yield*$(X.returns,le,`${te}.prototype`)}a(u,"FromConstructor");function*d(X,le,te){yield`(${te} instanceof Date) && Number.isFinite(${te}.getTime())`,Ln(X.exclusiveMaximumTimestamp)&&(yield`${te}.getTime() < ${X.exclusiveMaximumTimestamp}`),Ln(X.exclusiveMinimumTimestamp)&&(yield`${te}.getTime() > ${X.exclusiveMinimumTimestamp}`),Ln(X.maximumTimestamp)&&(yield`${te}.getTime() <= ${X.maximumTimestamp}`),Ln(X.minimumTimestamp)&&(yield`${te}.getTime() >= ${X.minimumTimestamp}`),Ln(X.multipleOfTimestamp)&&(yield`(${te}.getTime() % ${X.multipleOfTimestamp}) === 0`)}a(d,"FromDate");function*p(X,le,te){yield`(typeof ${te} === 'function')`}a(p,"FromFunction");function*h(X,le,te){let xe=globalThis.Object.getOwnPropertyNames(X.$defs).reduce((Z,ae)=>[...Z,X.$defs[ae]],[]);yield*$(Tb(X.$ref),[...le,...xe],te)}a(h,"FromImport");function*m(X,le,te){yield`Number.isInteger(${te})`,Ln(X.exclusiveMaximum)&&(yield`${te} < ${X.exclusiveMaximum}`),Ln(X.exclusiveMinimum)&&(yield`${te} > ${X.exclusiveMinimum}`),Ln(X.maximum)&&(yield`${te} <= ${X.maximum}`),Ln(X.minimum)&&(yield`${te} >= ${X.minimum}`),Ln(X.multipleOf)&&(yield`(${te} % ${X.multipleOf}) === 0`)}a(m,"FromInteger");function*g(X,le,te){let xe=X.allOf.map(Z=>j(Z,le,te)).join(" && ");if(X.unevaluatedProperties===!1){let Z=J(`${new RegExp(IN(X))};`),ae=`Object.getOwnPropertyNames(${te}).every(key => ${Z}.test(key))`;yield`(${xe} && ${ae})`}else if(xl(X.unevaluatedProperties)){let Z=J(`${new RegExp(IN(X))};`),ae=`Object.getOwnPropertyNames(${te}).every(key => ${Z}.test(key) || ${j(X.unevaluatedProperties,le,`${te}[key]`)})`;yield`(${xe} && ${ae})`}else yield`(${xe})`}a(g,"FromIntersect");function*A(X,le,te){yield`(typeof value === 'object' && Symbol.iterator in ${te})`}a(A,"FromIterator");function*y(X,le,te){typeof X.const=="number"||typeof X.const=="boolean"?yield`(${te} === ${X.const})`:yield`(${te} === '${Rmt.Escape(X.const)}')`}a(y,"FromLiteral");function*E(X,le,te){yield"false"}a(E,"FromNever");function*_(X,le,te){yield`(!${j(X.not,le,te)})`}a(_,"FromNot");function*v(X,le,te){yield`(${te} === null)`}a(v,"FromNull");function*b(X,le,te){yield Eq.IsNumberLike(te),Ln(X.exclusiveMaximum)&&(yield`${te} < ${X.exclusiveMaximum}`),Ln(X.exclusiveMinimum)&&(yield`${te} > ${X.exclusiveMinimum}`),Ln(X.maximum)&&(yield`${te} <= ${X.maximum}`),Ln(X.minimum)&&(yield`${te} >= ${X.minimum}`),Ln(X.multipleOf)&&(yield`(${te} % ${X.multipleOf}) === 0`)}a(b,"FromNumber");function*I(X,le,te){yield Eq.IsObjectLike(te),Ln(X.minProperties)&&(yield`Object.getOwnPropertyNames(${te}).length >= ${X.minProperties}`),Ln(X.maxProperties)&&(yield`Object.getOwnPropertyNames(${te}).length <= ${X.maxProperties}`);let xe=Object.getOwnPropertyNames(X.properties);for(let Z of xe){let ae=H5e.Encode(te,Z),De=X.properties[Z];if(X.required&&X.required.includes(Z))yield*$(De,le,ae),(xN(De)||e(De))&&(yield`('${Z}' in ${te})`);else{let Y=j(De,le,ae);yield Eq.IsExactOptionalProperty(te,Z,Y)}}if(X.additionalProperties===!1)if(X.required&&X.required.length===xe.length)yield`Object.getOwnPropertyNames(${te}).length === ${xe.length}`;else{let Z=`[${xe.map(ae=>`'${ae}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${te}).every(key => ${Z}.includes(key))`}if(typeof X.additionalProperties=="object"){let Z=j(X.additionalProperties,le,`${te}[key]`),ae=`[${xe.map(De=>`'${De}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${te}).every(key => ${ae}.includes(key) || ${Z}))`}}a(I,"FromObject");function*x(X,le,te){yield`${te} instanceof Promise`}a(x,"FromPromise");function*w(X,le,te){yield Eq.IsRecordLike(te),Ln(X.minProperties)&&(yield`Object.getOwnPropertyNames(${te}).length >= ${X.minProperties}`),Ln(X.maxProperties)&&(yield`Object.getOwnPropertyNames(${te}).length <= ${X.maxProperties}`);let[xe,Z]=Object.entries(X.patternProperties)[0],ae=J(`${new RegExp(xe)}`),De=j(Z,le,"value"),Y=xl(X.additionalProperties)?j(X.additionalProperties,le,te):X.additionalProperties===!1?"false":"true",ee=`(${ae}.test(key) ? ${De} : ${Y})`;yield`(Object.entries(${te}).every(([key, value]) => ${ee}))`}a(w,"FromRecord");function*R(X,le,te){let xe=Ns(X,le);if(W.functions.has(X.$ref))return yield`${ce(X.$ref)}(${te})`;yield*$(xe,le,te)}a(R,"FromRef");function*P(X,le,te){let xe=J(`${new RegExp(X.source,X.flags)};`);yield`(typeof ${te} === 'string')`,Ln(X.maxLength)&&(yield`${te}.length <= ${X.maxLength}`),Ln(X.minLength)&&(yield`${te}.length >= ${X.minLength}`),yield`${xe}.test(${te})`}a(P,"FromRegExp");function*k(X,le,te){yield`(typeof ${te} === 'string')`,Ln(X.maxLength)&&(yield`${te}.length <= ${X.maxLength}`),Ln(X.minLength)&&(yield`${te}.length >= ${X.minLength}`),X.pattern!==void 0&&(yield`${J(`${new RegExp(X.pattern)};`)}.test(${te})`),X.format!==void 0&&(yield`format('${X.format}', ${te})`)}a(k,"FromString");function*Q(X,le,te){yield`(typeof ${te} === 'symbol')`}a(Q,"FromSymbol");function*M(X,le,te){yield`(typeof ${te} === 'string')`,yield`${J(`${new RegExp(X.pattern)};`)}.test(${te})`}a(M,"FromTemplateLiteral");function*N(X,le,te){yield`${ce(X.$ref)}(${te})`}a(N,"FromThis");function*G(X,le,te){if(yield`Array.isArray(${te})`,X.items===void 0)return yield`${te}.length === 0`;yield`(${te}.length === ${X.maxItems})`;for(let xe=0;xej(Z,le,te)).join(" || ")})`}a(D,"FromUnion");function*F(X,le,te){yield`${te} instanceof Uint8Array`,Ln(X.maxByteLength)&&(yield`(${te}.length <= ${X.maxByteLength})`),Ln(X.minByteLength)&&(yield`(${te}.length >= ${X.minByteLength})`)}a(F,"FromUint8Array");function*U(X,le,te){yield"true"}a(U,"FromUnknown");function*L(X,le,te){yield Eq.IsVoidLike(te)}a(L,"FromVoid");function*H(X,le,te){let xe=W.instances.size;W.instances.set(xe,X),yield`kind('${X[pt]}', ${xe}, ${te})`}a(H,"FromKind");function*$(X,le,te,xe=!0){let Z=ks(X.$id)?[...le,X]:le,ae=X;if(xe&&ks(X.$id)){let De=ce(X.$id);if(W.functions.has(De))return yield`${De}(${te})`;{W.functions.set(De,"");let Y=Te(De,X,le,"value",!1);return W.functions.set(De,Y),yield`${De}(${te})`}}switch(ae[pt]){case"Any":return yield*r(ae,Z,te);case"Argument":return yield*n(ae,Z,te);case"Array":return yield*o(ae,Z,te);case"AsyncIterator":return yield*s(ae,Z,te);case"BigInt":return yield*c(ae,Z,te);case"Boolean":return yield*l(ae,Z,te);case"Constructor":return yield*u(ae,Z,te);case"Date":return yield*d(ae,Z,te);case"Function":return yield*p(ae,Z,te);case"Import":return yield*h(ae,Z,te);case"Integer":return yield*m(ae,Z,te);case"Intersect":return yield*g(ae,Z,te);case"Iterator":return yield*A(ae,Z,te);case"Literal":return yield*y(ae,Z,te);case"Never":return yield*E(ae,Z,te);case"Not":return yield*_(ae,Z,te);case"Null":return yield*v(ae,Z,te);case"Number":return yield*b(ae,Z,te);case"Object":return yield*I(ae,Z,te);case"Promise":return yield*x(ae,Z,te);case"Record":return yield*w(ae,Z,te);case"Ref":return yield*R(ae,Z,te);case"RegExp":return yield*P(ae,Z,te);case"String":return yield*k(ae,Z,te);case"Symbol":return yield*Q(ae,Z,te);case"TemplateLiteral":return yield*M(ae,Z,te);case"This":return yield*N(ae,Z,te);case"Tuple":return yield*G(ae,Z,te);case"Undefined":return yield*O(ae,Z,te);case"Union":return yield*D(ae,Z,te);case"Uint8Array":return yield*F(ae,Z,te);case"Unknown":return yield*U(ae,Z,te);case"Void":return yield*L(ae,Z,te);default:if(!NA.Has(ae[pt]))throw new Pmt(X);return yield*H(ae,Z,te)}}a($,"Visit");let W={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function j(X,le,te,xe=!0){return`(${[...$(X,le,te,xe)].join(" && ")})`}a(j,"CreateExpression");function ce(X){return`check_${wmt.Encode(X)}`}a(ce,"CreateFunctionName");function J(X){let le=`local_${W.variables.size}`;return W.variables.set(le,`const ${le} = ${X}`),le}a(J,"CreateVariable");function Te(X,le,te,xe,Z=!0){let[ae,De]=[` +`,Ae=>"".padStart(Ae," ")],Y=fe("value","any"),ee=Ne("boolean"),Ee=[...$(le,te,xe,Z)].map(Ae=>`${De(4)}${Ae}`).join(` &&${ae}`);return`function ${X}(${Y})${ee} {${ae}${De(2)}return (${ae}${Ee}${ae}${De(2)}) +}`}a(Te,"CreateFunction");function fe(X,le){let te=W.language==="typescript"?`: ${le}`:"";return`${X}${te}`}a(fe,"CreateParameter");function Ne(X){return W.language==="typescript"?`: ${X}`:""}a(Ne,"CreateReturns");function Ve(X,le,te){let xe=Te("check",X,le,"value"),Z=fe("value","any"),ae=Ne("boolean"),De=[...W.functions.values()],Y=[...W.variables.values()],ee=ks(X.$id)?`return function check(${Z})${ae} { return ${ce(X.$id)}(value) -}`:`return ${xe}`;return[...Y,...Ne,ee].join(` -`)}a(Ve,"Build");function Ue(...X){let le={language:"javascript"},[te,xe,Z]=X.length===2&&ti(X[1])?[X[0],X[1],le]:X.length===2&&!ti(X[1])?[X[0],[],X[1]]:X.length===3?[X[0],X[1],X[2]]:X.length===1?[X[0],[],le]:[null,[],le];if(W.language=Z.language,W.variables.clear(),W.functions.clear(),W.instances.clear(),!Ml(te))throw new WDe(te);for(let ae of xe)if(!Ml(ae))throw new WDe(ae);return Ve(te,xe,Z)}a(Ue,"Code"),t.Code=Ue;function Ke(X,le=[]){let te=Ue(X,le,{language:"javascript"}),xe=globalThis.Function("kind","format","hash",te),Z=new Map(W.instances);function ae(Ee,Ae,ve){if(!qA.Has(Ee)||!Z.has(Ae))return!1;let We=qA.Get(Ee),Ze=Z.get(Ae);return We(Ze,ve)}a(ae,"typeRegistryFunction");function Ne(Ee,Ae){return VI.Has(Ee)?VI.Get(Ee)(Ae):!1}a(Ne,"formatRegistryFunction");function Y(Ee){return CL(Ee)}a(Y,"hashFunction");let ee=xe(ae,Ne,Y);return new Egt(X,le,ee,te)}a(Ke,"Compile"),t.Compile=Ke})(Ol||(Ol={}));var O5e=de(x5()),jZ=de(require("os"));f();f();var om=[];for(let t=0;t<256;++t)om.push((t+256).toString(16).slice(1));function MSr(t,e=0){return(om[t[e+0]]+om[t[e+1]]+om[t[e+2]]+om[t[e+3]]+"-"+om[t[e+4]]+om[t[e+5]]+"-"+om[t[e+6]]+om[t[e+7]]+"-"+om[t[e+8]]+om[t[e+9]]+"-"+om[t[e+10]]+om[t[e+11]]+om[t[e+12]]+om[t[e+13]]+om[t[e+14]]+om[t[e+15]]).toLowerCase()}a(MSr,"unsafeStringify");f();var OSr=require("crypto");var YDe=new Uint8Array(256),zDe=YDe.length;function bgt(){return zDe>YDe.length-16&&((0,OSr.randomFillSync)(YDe),zDe=0),YDe.slice(zDe,zDe+=16)}a(bgt,"rng");f();f();var BSr=require("crypto"),Tgt={randomUUID:BSr.randomUUID};function vRi(t,e,r){if(Tgt.randomUUID&&!e&&!t)return Tgt.randomUUID();t=t||{};let n=t.random??t.rng?.()??bgt();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)e[r+o]=n[o];return e}return MSr(n)}a(vRi,"v4");var yr=vRi;var B5e=de(Nn());function HZ(t){return t===1}a(HZ,"isRestricted");var I2i=["engine.prompt","engine.completion","ghostText.capturedAfterAccepted","ghostText.capturedAfterRejected"],the=8192,x2i=21;var np=class{static{a(this,"TelemetryReporters")}getReporter(e,r=0){return HZ(r)?this.getRestrictedReporter(e):this.reporter}getRestrictedReporter(e){if(VZ(e))return this.reporterRestricted;if($X(e))return new xpe}getMsft1pReporter(){return this.reporterMsft1p}getMsftReporter(){return this.reporterMsft}getFTReporter(e){if(fRr(e))return this.reporterFT;if($X(e))return new xpe}setReporter(e){this.reporter=e}setRestrictedReporter(e){this.reporterRestricted=e}setMsft1pReporter(e){this.reporterMsft1p=e}setMsftReporter(e){this.reporterMsft=e}setFTReporter(e){this.reporterFT=e}async deactivate(){let e=[this.reporter,this.reporterRestricted,this.reporterFT,this.reporterMsft1p,this.reporterMsft];this.reporter=this.reporterRestricted=this.reporterFT=this.reporterMsft1p=this.reporterMsft=void 0,await Promise.all(e.map(r=>r?.dispose()))}},w2i=S.Object({},{additionalProperties:S.String()}),R2i=S.Object({meanLogProb:S.Optional(S.Number()),meanAlternativeLogProb:S.Optional(S.Number())},{additionalProperties:S.Number()}),P2i=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function k2i(t){return P2i.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}a(k2i,"isOomError");function N2i(t){return Pb(t)?"network":k2i(t)||t.code==="EMFILE"||t.code==="ENFILE"||t.syscall==="uv_cwd"&&(t.code==="ENOENT"||t.code=="EIO")||t.code==="CopilotPromptLoadFailure"||`${t.code}`.startsWith("CopilotPromptWorkerExit")?"local":"exception"}a(N2i,"getErrorType");var yt=class t{static{a(this,"TelemetryData")}static{this.validateTelemetryProperties=Ol.Compile(w2i)}static{this.validateTelemetryMeasurements=Ol.Compile(R2i)}static{this.keysExemptedFromSanitization=["abexp.assignmentcontext","VSCode.ABExp.Features"]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},Ac())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=Ac())}async extendWithExpTelemetry(e){let{filters:r,exp:n}=await e.get(jt).getFallbackExpAndFilters();n.addToTelemetry(e,this),r.addToTelemetry(this)}extendWithEditorAgnosticFields(e){this.properties.editor_version=G_(e.get(Nr).getEditorInfo()),this.properties.editor_plugin_version=G_(e.get(Nr).getEditorPluginInfo());let r=e.get(Ks);this.properties.client_machineid=r.machineId,this.properties.client_sessionid=r.sessionId,this.properties.copilot_version=`copilot/${Z_(e)}`,typeof process<"u"&&(this.properties.runtime_version=`node/${process.versions.node}`);let n=e.get(Nr);this.properties.common_extname=n.getEditorPluginInfo().name,this.properties.common_extversion=n.getEditorPluginInfo().version,this.properties.common_vscodeversion=G_(n.getEditorInfo());let o=e.get(dr);this.properties.fetcher=o.name;let s=e.get(Qc).getHttpSettings();this.properties.proxy_enabled=s.proxy?"true":"false",this.properties.proxy_auth=s.proxyAuthorization?"true":"false",this.properties.proxy_kerberos_spn=s.proxyKerberosServicePrincipal?"true":"false",this.properties.reject_unauthorized=s.proxyStrictSSL!==!1?"true":"false"}extendWithConfigProperties(e){let r=yRr(e);r["copilot.build"]=ERr(e),r["copilot.buildType"]=kL(e),this.properties={...this.properties,...r}}extendWithRequestId(e){let r={headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetryHack=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromPropertiesHack(e,r){if(HZ(e))return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetryHack.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements);for(let e in this.measurements)isNaN(this.measurements[e])&&delete this.measurements[e]}multiplexProperties(){this.properties=t.multiplexProperties(this.properties)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}static multiplexProperties(e){let r={...e};for(let n in e){let o=e[n],s=o?.length??0;if(s>the){let c=0,l=0;for(;s>0&&l1&&(u=n+"_"+(l<10?"0":"")+l);let d=c+the;se+r.length,0)??0),promptSuffixCharLen:t.suffix.length}}a($Z,"telemetrizePromptLength");function Ac(){return performance.now()}a(Ac,"now");function L2i(t){return Math.floor(t/1e3)}a(L2i,"nowSeconds");function VZ(t){return t.get(_d).optedIn}a(VZ,"shouldSendRestricted");function fRr(t){return t.get(_d).ftFlag!==""}a(fRr,"shouldSendFinetuningTelemetry");function at(t,e,r,n){return t.get(gu).register(F2i(t,e,Ac(),r?.extendedBy(),n))}a(at,"telemetry");function Kn(t,e,r){return t.get(gu).register(L5e(t,e,r?.extendedBy()))}a(Kn,"telemetryMsft");function yi(t,e,r,n){let o=yt.createAndMarkAsIssued(r,n);return t.get(gu).register(L5e(t,e,o))}a(yi,"telemetryMs");function V2(t,e,r,n){let o=(n||yt.createAndMarkAsIssued()).extendedBy(pRr(r));return t.get(gu).register(L5e(t,e,o))}a(V2,"telemetryMsftWithError");function _u(t,e,r,n,o){let s={...n,...pRr(r)},c=yt.createAndMarkAsIssued(s,o);return t.get(gu).register(L5e(t,e,c))}a(_u,"telemetryMsWithError");function pRr(t){let e={};if(t){let r=q2i(t);e.errorName=r.name,e.errorMessage=r.message,e.errorStack=r.stack??""}return e}a(pRr,"buildErrorProperties");async function F2i(t,e,r,n,o=0){let s=n||yt.createAndMarkAsIssued({},{});await s.makeReadyForSending(t,o??!1,"IncludeExp",r),(!HZ(o)||VZ(t))&&rhe(t,o,e,s),HZ(o)&&I2i.includes(e)&&fRr(t)&&B2i(t,o,e,s),D2i(t,e,s)}a(F2i,"_telemetry");async function L5e(t,e,r){let n=r||yt.createAndMarkAsIssued({},{});await n.prepareForSendingToMsft(t),O2i(t,e,n)}a(L5e,"_telemetryMsft");function hDe(t,e){return t.get(gu).register(U2i(t,e,Ac()))}a(hDe,"telemetryExpProblem");async function U2i(t,e,r){let n="expProblem",o=yt.createAndMarkAsIssued(e,{});await o.makeReadyForSending(t,0,"SkipExp",r),rhe(t,0,n,o)}a(U2i,"_telemetryExpProblem");function WZ(t,e,r,n,o=0){let s={...r,...hRr(t)};rhe(t,o,e,{properties:s,measurements:n})}a(WZ,"telemetryRaw");function hRr(t){let e=t.get(Nr),r={unique_id:yr(),common_extname:e.getEditorPluginInfo().name,common_extversion:e.getEditorPluginInfo().version,common_vscodeversion:G_(e.getEditorInfo())};return{...t.get(_d).getProperties(),...r}}a(hRr,"createRequiredProperties");var XAt=class extends Error{static{a(this,"CopilotNonError")}constructor(e){let r;try{r=JSON.stringify(e)}catch{r=String(e)}super(r),this.name="CopilotNonError",this.code=(0,O5e.SHA256)(O5e.enc.Utf16.parse(this.message)).toString().slice(0,16)}};function qo(t,e,r,n,o){return t.get(gu).register(mRr(t,e,Ac(),r,{...n},o))}a(qo,"telemetryException");async function mRr(t,e,r,n,o,s){let c;if(e instanceof Error){if(c=e,c.name==="Canceled"&&c.message==="Canceled"||c.name==="CodeExpectedError"||ep(c)||c instanceof B5e.ConnectionError||c instanceof B5e.ResponseError||c.name==="CopilotAuthError"||c.name==="DeviceFlowError")return}else{if(c=new XAt(e),e&&typeof e=="object"&&e.name==="ExitStatus")return;if(c.stack?.startsWith(`${c} +}`:`return ${xe}`;return[...Y,...De,ee].join(` +`)}a(Ve,"Build");function Ue(...X){let le={language:"javascript"},[te,xe,Z]=X.length===2&&ei(X[1])?[X[0],X[1],le]:X.length===2&&!ei(X[1])?[X[0],[],X[1]]:X.length===3?[X[0],X[1],X[2]]:X.length===1?[X[0],[],le]:[null,[],le];if(W.language=Z.language,W.variables.clear(),W.functions.clear(),W.instances.clear(),!xl(te))throw new j5e(te);for(let ae of xe)if(!xl(ae))throw new j5e(ae);return Ve(te,xe,Z)}a(Ue,"Code"),t.Code=Ue;function Ke(X,le=[]){let te=Ue(X,le,{language:"javascript"}),xe=globalThis.Function("kind","format","hash",te),Z=new Map(W.instances);function ae(Ee,Ae,ve){if(!NA.Has(Ee)||!Z.has(Ae))return!1;let We=NA.Get(Ee),Ze=Z.get(Ae);return We(Ze,ve)}a(ae,"typeRegistryFunction");function De(Ee,Ae){return MI.Has(Ee)?MI.Get(Ee)(Ae):!1}a(De,"formatRegistryFunction");function Y(Ee){return rL(Ee)}a(Y,"hashFunction");let ee=xe(ae,De,Y);return new xmt(X,le,ee,te)}a(Ke,"Compile"),t.Compile=Ke})(wl||(wl={}));var DDe=de(mN()),JX=de(require("os"));f();f();var Xh=[];for(let t=0;t<256;++t)Xh.push((t+256).toString(16).slice(1));function ZSr(t,e=0){return(Xh[t[e+0]]+Xh[t[e+1]]+Xh[t[e+2]]+Xh[t[e+3]]+"-"+Xh[t[e+4]]+Xh[t[e+5]]+"-"+Xh[t[e+6]]+Xh[t[e+7]]+"-"+Xh[t[e+8]]+Xh[t[e+9]]+"-"+Xh[t[e+10]]+Xh[t[e+11]]+Xh[t[e+12]]+Xh[t[e+13]]+Xh[t[e+14]]+Xh[t[e+15]]).toLowerCase()}a(ZSr,"unsafeStringify");f();var eIr=require("crypto");var V5e=new Uint8Array(256),$5e=V5e.length;function kmt(){return $5e>V5e.length-16&&((0,eIr.randomFillSync)(V5e),$5e=0),V5e.slice($5e,$5e+=16)}a(kmt,"rng");f();f();var tIr=require("crypto"),Dmt={randomUUID:tIr.randomUUID};function v2i(t,e,r){if(Dmt.randomUUID&&!e&&!t)return Dmt.randomUUID();t=t||{};let n=t.random??t.rng?.()??kmt();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)e[r+o]=n[o];return e}return ZSr(n)}a(v2i,"v4");var yr=v2i;var NDe=de(Dn());function KX(t){return t===1}a(KX,"isRestricted");var IPi=["engine.prompt","engine.completion","ghostText.capturedAfterAccepted","ghostText.capturedAfterRejected"],mpe=8192,xPi=21;var X0=class{static{a(this,"TelemetryReporters")}getReporter(e,r=0){return KX(r)?this.getRestrictedReporter(e):this.reporter}getRestrictedReporter(e){if(ZX(e))return this.reporterRestricted;if(XJ(e))return new q0e}getMsft1pReporter(){return this.reporterMsft1p}getMsftReporter(){return this.reporterMsft}getFTReporter(e){if(kRr(e))return this.reporterFT;if(XJ(e))return new q0e}setReporter(e){this.reporter=e}setRestrictedReporter(e){this.reporterRestricted=e}setMsft1pReporter(e){this.reporterMsft1p=e}setMsftReporter(e){this.reporterMsft=e}setFTReporter(e){this.reporterFT=e}async deactivate(){let e=[this.reporter,this.reporterRestricted,this.reporterFT,this.reporterMsft1p,this.reporterMsft];this.reporter=this.reporterRestricted=this.reporterFT=this.reporterMsft1p=this.reporterMsft=void 0,await Promise.all(e.map(r=>r?.dispose()))}},wPi=S.Object({},{additionalProperties:S.String()}),RPi=S.Object({meanLogProb:S.Optional(S.Number()),meanAlternativeLogProb:S.Optional(S.Number())},{additionalProperties:S.Number()}),PPi=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function kPi(t){return PPi.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}a(kPi,"isOomError");function DPi(t){return Ab(t)?"network":kPi(t)||t.code==="EMFILE"||t.code==="ENFILE"||t.syscall==="uv_cwd"&&(t.code==="ENOENT"||t.code=="EIO")||t.code==="CopilotPromptLoadFailure"||`${t.code}`.startsWith("CopilotPromptWorkerExit")?"local":"exception"}a(DPi,"getErrorType");var Pt=class t{static{a(this,"TelemetryData")}static{this.validateTelemetryProperties=wl.Compile(wPi)}static{this.validateTelemetryMeasurements=wl.Compile(RPi)}static{this.keysExemptedFromSanitization=["abexp.assignmentcontext","VSCode.ABExp.Features"]}constructor(e,r,n){this.properties=e,this.measurements=r,this.issuedTime=n}static createAndMarkAsIssued(e,r){return new t(e||{},r||{},fc())}extendedBy(e,r){let n={...this.properties,...e},o={...this.measurements,...r},s=new t(n,o,this.issuedTime);return s.displayedTime=this.displayedTime,s}markAsDisplayed(){this.displayedTime===void 0&&(this.displayedTime=fc())}async extendWithExpTelemetry(e){let{filters:r,exp:n}=await e.get(Gt).getFallbackExpAndFilters();n.addToTelemetry(e,this),r.addToTelemetry(this)}extendWithEditorAgnosticFields(e){this.properties.editor_version=PC(e.get(Dr).getEditorInfo()),this.properties.editor_plugin_version=PC(e.get(Dr).getEditorPluginInfo());let r=e.get(Vs);this.properties.client_machineid=r.machineId,this.properties.client_sessionid=r.sessionId,this.properties.copilot_version=`copilot/${qC(e)}`,typeof process<"u"&&(this.properties.runtime_version=`node/${process.versions.node}`);let n=e.get(Dr);this.properties.common_extname=n.getEditorPluginInfo().name,this.properties.common_extversion=n.getEditorPluginInfo().version,this.properties.common_vscodeversion=PC(n.getEditorInfo());let o=e.get(dr);this.properties.fetcher=o.name;let s=e.get(Mc).getHttpSettings();this.properties.proxy_enabled=s.proxy?"true":"false",this.properties.proxy_auth=s.proxyAuthorization?"true":"false",this.properties.proxy_kerberos_spn=s.proxyKerberosServicePrincipal?"true":"false",this.properties.reject_unauthorized=s.proxyStrictSSL!==!1?"true":"false"}extendWithConfigProperties(e){let r=LRr(e);r["copilot.build"]=FRr(e),r["copilot.buildType"]=pL(e),this.properties={...this.properties,...r}}extendWithRequestId(e){let r={headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...r}}static{this.keysToRemoveFromStandardTelemetryHack=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo","userKind"]}static maybeRemoveRepoInfoFromPropertiesHack(e,r){if(KX(e))return r;let n={};for(let o in r)t.keysToRemoveFromStandardTelemetryHack.includes(o)||(n[o]=r[o]);return n}sanitizeKeys(){this.properties=t.sanitizeKeys(this.properties),this.measurements=t.sanitizeKeys(this.measurements);for(let e in this.measurements)isNaN(this.measurements[e])&&delete this.measurements[e]}multiplexProperties(){this.properties=t.multiplexProperties(this.properties)}static sanitizeKeys(e){e=e||{};let r={};for(let n in e){let o=t.keysExemptedFromSanitization.includes(n)?n:n.replace(/\./g,"_");r[o]=e[n]}return r}static multiplexProperties(e){let r={...e};for(let n in e){let o=e[n],s=o?.length??0;if(s>mpe){let c=0,l=0;for(;s>0&&l1&&(u=n+"_"+(l<10?"0":"")+l);let d=c+mpe;se+r.length,0)??0),promptSuffixCharLen:t.suffix.length}}a(XX,"telemetrizePromptLength");function fc(){return performance.now()}a(fc,"now");function LPi(t){return Math.floor(t/1e3)}a(LPi,"nowSeconds");function ZX(t){return t.get(pd).optedIn}a(ZX,"shouldSendRestricted");function kRr(t){return t.get(pd).ftFlag!==""}a(kRr,"shouldSendFinetuningTelemetry");function st(t,e,r,n){return t.get(cu).register(FPi(t,e,fc(),r?.extendedBy(),n))}a(st,"telemetry");function O2(t,e,r){return t.get(cu).register(ODe(t,e,r?.extendedBy()))}a(O2,"telemetryMsft");function rr(t,e,r,n){let o=Pt.createAndMarkAsIssued(r,n);return t.get(cu).register(ODe(t,e,o))}a(rr,"telemetryMs");function MDe(t,e,r,n){let o=(n||Pt.createAndMarkAsIssued()).extendedBy(DRr(r));return t.get(cu).register(ODe(t,e,o))}a(MDe,"telemetryMsftWithError");function Sa(t,e,r,n,o){let s=Pt.createAndMarkAsIssued({...n,...DRr(r)},o);return t.get(cu).register(ODe(t,e,s))}a(Sa,"telemetryMsWithError");function DRr(t){let e={};if(t){let r=qPi(t);e.errorName=r.name,e.errorMessage=r.message,e.errorStack=r.stack??""}return e}a(DRr,"buildErrorProperties");async function FPi(t,e,r,n,o=0){let s=n||Pt.createAndMarkAsIssued({},{});await s.makeReadyForSending(t,o??!1,"IncludeExp",r),(!KX(o)||ZX(t))&&gpe(t,o,e,s),KX(o)&&IPi.includes(e)&&kRr(t)&&BPi(t,o,e,s),NPi(t,e,s)}a(FPi,"_telemetry");async function ODe(t,e,r){let n=r||Pt.createAndMarkAsIssued({},{});await n.prepareForSendingToMsft(t),OPi(t,e,n)}a(ODe,"_telemetryMsft");function d5e(t,e){return t.get(cu).register(UPi(t,e,fc()))}a(d5e,"telemetryExpProblem");async function UPi(t,e,r){let n="expProblem",o=Pt.createAndMarkAsIssued(e,{});await o.makeReadyForSending(t,0,"SkipExp",r),gpe(t,0,n,o)}a(UPi,"_telemetryExpProblem");function eZ(t,e,r,n,o=0){let s={...r,...NRr(t)};gpe(t,o,e,{properties:s,measurements:n})}a(eZ,"telemetryRaw");function NRr(t){let e=t.get(Dr),r={unique_id:yr(),common_extname:e.getEditorPluginInfo().name,common_extversion:e.getEditorPluginInfo().version,common_vscodeversion:PC(e.getEditorInfo())};return{...t.get(pd).getProperties(),...r}}a(NRr,"createRequiredProperties");var sAt=class extends Error{static{a(this,"CopilotNonError")}constructor(e){let r;try{r=JSON.stringify(e)}catch{r=String(e)}super(r),this.name="CopilotNonError",this.code=(0,DDe.SHA256)(DDe.enc.Utf16.parse(this.message)).toString().slice(0,16)}};function Lo(t,e,r,n,o){return t.get(cu).register(MRr(t,e,fc(),r,{...n},o))}a(Lo,"telemetryException");async function MRr(t,e,r,n,o,s){let c;if(e instanceof Error){if(c=e,c.name==="Canceled"&&c.message==="Canceled"||c.name==="CodeExpectedError"||Y0(c)||c instanceof NDe.ConnectionError||c instanceof NDe.ResponseError||c.name==="CopilotAuthError"||c.name==="DeviceFlowError")return}else{if(c=new sAt(e),e&&typeof e=="object"&&e.name==="ExitStatus")return;if(c.stack?.startsWith(`${c} `)){let y=c.stack.slice(`${c} `.length).split(` `);/^\s*(?:at )?(?:\w+\.)*_telemetryException\b/.test(y[0]??"")&&y.shift(),/^\s*(?:at )?(?:\w+\.)*telemetryException\b/.test(y[0]??"")&&y.shift(),c.stack=`${c} ${y.join(` -`)}`}}let l=t.get(Nr).getEditorInfo(),u;l.root&&(u=[{prefix:`${l.name}:`,path:l.root}]);let d=VZ(t),p=gbr(c,u,d),h=N2i(c),m=h==="exception",g=yt.createAndMarkAsIssued({origin:n??"",type:c.name,code:`${c.code??""}`,reason:p.stack||p.toString(),message:p.message,...o});if(await g.makeReadyForSending(t,0,"IncludeExp",r),s?.exception_detail)for(let y of s.exception_detail)y.value&&(d?y.value=xmt(y.value):y.value="[redacted]");s??=nbr(t,p,n),s.context={...s.context,"copilot_event.unique_id":g.properties.unique_id,"#restricted_telemetry":d?"true":"false"},s.rollup_id!=="auto"&&(g.properties.errno=s.rollup_id),s.created_at=new Date(g.issuedTime).toISOString();let A=s.rollup_id==="auto"?c.stack??"":s.rollup_id;if(!t.get(F2).isThrottled(A)){if(d){let y=mbr(c,u),E=yt.createAndMarkAsIssued({origin:n??"",type:c.name,code:`${c.code??""}`,reason:y.stack||y.toString(),message:y.message,...o});s.rollup_id!=="auto"&&(E.properties.errno=s.rollup_id),await E.makeReadyForSending(t,1,"IncludeExp",r),E.properties.unique_id=g.properties.unique_id,g.properties.restricted_unique_id=E.properties.unique_id,rhe(t,1,`error.${h}`,E)}m&&(g.properties.failbot_payload=JSON.stringify(s)),rhe(t,0,`error.${h}`,g)}}a(mRr,"_telemetryException");function $p(t,e,r,n){let o=a(async(...s)=>{try{await e(...s)}catch(c){await mRr(t,c,Ac(),r,n)}},"wrapped");return(...s)=>t.get(gu).register(o(...s))}a($p,"telemetryCatch");function Kp(t,e,r,n){return t.get(gu).register(Q2i(t,e,Ac(),r?.extendedBy(),n))}a(Kp,"telemetryError");async function Q2i(t,e,r,n,o=0){if(HZ(o)&&!VZ(t))return;let s=n||yt.createAndMarkAsIssued({},{});await s.makeReadyForSending(t,o,"IncludeExp",r),M2i(t,o,e,s)}a(Q2i,"_telemetryError");function gRr(t,e,r,n,o){let s=yt.createAndMarkAsIssued({completionTextJson:JSON.stringify(e),choiceIndex:o.toString()});if(r.logprobs)for(let[c,l]of Object.entries(r.logprobs))s.properties["logprobs_"+c]=JSON.stringify(l)??"unset";return s.extendWithRequestId(n),at(t,"engine.completion",s,1)}a(gRr,"logEngineCompletion");function ARr(t,e,r){let n={promptJson:JSON.stringify({prefix:e.prefix,context:e.context}),promptSuffixJson:JSON.stringify(e.suffix)};if(e.context){let s=r.properties["request.option.extra"]?JSON.parse(r.properties["request.option.extra"]):{};s.context=e.context,n["request.option.extra"]=JSON.stringify(s)}let o=r.extendedBy(n);return at(t,"engine.prompt",o,1)}a(ARr,"logEnginePrompt");function q2i(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){let e=t,r;if(typeof e.message=="string")r=e.message;else try{r=JSON.stringify(e)}catch{r="Unknown error"}let n=new Error(r);return n.name=typeof e.name=="string"?e.name:typeof t,typeof e.stack=="string"&&(n.stack=e.stack),n}return new Error("Unknown error")}a(q2i,"buildErrorFromUnknown");f();var ip=class{static{a(this,"UrlOpener")}};var e1=new Se("auth"),U5e=60;var G2i=["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","1cb18ac6eedd49b43d74a1c5beb0b955","ea9395b9a9248c05ee6847cbd24355ed"],H2i="4535c7beffc844b46bb1ed4aa04d759a";function HA(t){let e=t.serverUrl?.match(/^https?:\/\//)?t.serverUrl:"",r=t.apiUrl?.match(/^https?:\/\//)?t.apiUrl:"";return e?r||=e.replace("://","://api."):r?.includes("://api.")&&(e||=r.replace("://api.","://")),(!e||!r)&&(e="https://github.com/",r="https://api.github.com/"),{apiUrl:r,serverUrl:e}}a(HA,"fillGitHubUrls");function CRr(){return Math.floor(Date.now()/1e3)}a(CRr,"nowSeconds");async function ZAt(t,e,r){let n=yt.createAndMarkAsIssued({},{});at(t,"auth.new_login");let o={"X-GitHub-Api-Version":"2024-12-15"};r?.hasKnownOrg&&(o["X-GitHub-Staff-Request"]="1");let s=e.devOverride?.copilotTokenUrl??"copilot_internal/v2/token",c=await mu(t,e,s,{timeout:12e4,headers:o}),l=await c.json(),u=l.user_notification;if(_Rr(t,u,e),c.status===401){let g="Failed to get copilot token due to 401 status. Please sign out and try again.";return e1.info(t,g),Kp(t,"auth.unknown_401",n),{failureKind:"HTTP401",message:g}}if(!c.ok||!l.token){e1.info(t,`Invalid copilot token: missing token: ${c.status} ${c.statusText}`),Kp(t,"auth.invalid_token",n.extendedBy({status:c.status.toString(),status_text:c.statusText}));let g=l.error_details;return g?.notification_id!=="not_signed_up"&&_Rr(t,g,e),{failureKind:"NotAuthorized",message:g?.message??"Could not retrieve token",canSignUpForLimited:l.can_signup_for_limited??!1}}let d=CRr()+l.refresh_in+U5e,p=await eyt(t,e),h;p.ok&&(h=await p.json());let m=new Xq(l,h,d);return at(t,"auth.new_token",n.extendedBy({...bmt(m)},{adjusted_expires_at:m.expiresAt,expires_at:l.expires_at,current_time:CRr()})),{copilotToken:m}}a(ZAt,"authFromGitHubSession");var Jp=class{static{a(this,"CopilotTokenFetcher")}},F5e=class extends Jp{static{a(this,"NetworkCopilotTokenFetcher")}async fetchTokenResult(e,r,n){return await ZAt(e,r,n)}};async function eyt(t,e){let r={"X-GitHub-Api-Version":"2025-05-01"},n=e.devOverride?.copilotUserInfoUrl??"copilot_internal/user";return await mu(t,e,n,{timeout:12e4,headers:r})}a(eyt,"fetchCopilotUserInfo");function _Rr(t,e,r){e&&t.get(gc).showWarningMessageOnlyOnce(e.notification_id,e.message,{title:e.title},{title:"Dismiss"}).then(async n=>{let o=n?.title===e.title,s=o||n?.title==="Dismiss";if(o){let c=t.get(Nr).getEditorPluginInfo(),l=e.url.replace("{EDITOR}",encodeURIComponent(c.name+"_"+c.version));await t.get(ip).open(l)}e.notification_id&&s&&await j2i(t,e.notification_id,r)}).catch(n=>{e1.exception(t,n,"copilotToken.notification")})}a(_Rr,"notifyUser");async function j2i(t,e,r){let n=r.devOverride?.notificationUrl??"copilot_internal/notification",o=await mu(t,r,n,{method:"POST",body:JSON.stringify({notification_id:e})});(!o||!o.ok)&&e1.error(t,`Failed to send notification result to GitHub: ${o?.status} ${o?.statusText}`)}a(j2i,"sendNotificationResultToGitHub");var Xq=class{constructor(e,r,n){this.envelope=e;this.expiresAt=n;this.token=e.token,this.organization_list=e.organization_list,this.enterprise_list=e.enterprise_list,this.tokenMap=this.parseToken(this.token),this.userInfo=new vNe(r)}static{a(this,"CopilotToken")}get endpoints(){return{...Bq,...this.envelope.endpoints??{}}}needsRefresh(){return(this.expiresAt-U5e)*1e3(this.organization_list??[]).includes(e))}isGitHubUser(){return(this.organization_list??[]).includes(H2i)}isInternalUser(){return this.isMicrosoftUser()||this.isGitHubUser()}};f();var no=class extends Error{static{a(this,"CopilotAuthError")}constructor(e,r){super(e,{cause:r}),this.name="CopilotAuthError"}},NL=class extends no{static{a(this,"NoBrowserAvailableError")}constructor(e="Browser not available for OAuth code flow"){super(e),this.name="NoBrowserAvailableError"}};function Q5e(t){let e=t.trim();if(!e)throw new no("Invalid GitHub server URL: value is empty or whitespace.");let r;try{r=new URL(e)}catch{throw new no("Invalid GitHub server URL: value is not a valid absolute URL.")}if(r.protocol!=="https:")throw new no("Invalid GitHub server URL: only HTTPS URLs are supported.");return r.toString()}a(Q5e,"validateGitHubServerUrl");f();f();var nhe="apps",q5e="hosts",$5=class{constructor(e,r){this.ctx=e;this.persistenceManager=r}static{a(this,"AuthPersistence")}async getAuthRecord(e){let r=e.authAuthority,n=e.githubAppId??this.ctx.get(qc).findAppIdToAuthenticate(),o=await this.persistenceManager.read(nhe,this.authRecordKey(this.ctx,{authAuthority:r,githubAppId:n}));if(o){let s={...o,oauth_token:o.access_token||o.oauth_token,user:o.login||o.user,githubAppId:n,authAuthority:r};if(s.oauth_token&&s.user)return s}return await this.legacyAuthRecordMaybe(r)}async legacyAuthRecordMaybe(e){let r=await this.persistenceManager.read(q5e,e);if(r)return{...r,githubAppId:ex}}async saveAuthRecord(e){await this.persistenceManager.update(nhe,this.authRecordKey(this.ctx,e),{user:e.user,oauth_token:e.oauth_token,githubAppId:e.githubAppId,scopes:e.scopes,dev_override:e.dev_override})}async deleteAuthRecord(e){let r=e.authAuthority,n=await this.getAuthRecord({authAuthority:r});n&&(n.githubAppId===ex&&await this.persistenceManager.delete(q5e,r),await this.persistenceManager.delete(nhe,this.authRecordKey(this.ctx,{authAuthority:r})),await this.persistenceManager.delete(nhe,this.authRecordKey(this.ctx,{authAuthority:r,githubAppId:ex})))}async deleteAllAuthRecords(){await this.persistenceManager.deleteSetting(nhe),await this.persistenceManager.deleteSetting(q5e)}async purgeLegacyAuthRecords(){await this.persistenceManager.deleteSetting(q5e)}authRecordKey(e,r){let n=r.githubAppId??e.get(qc).findAppIdToAuthenticate();return`${r.authAuthority}:${n}`}};f();f();f();f();f();f();f();f();function z5(t,e){return t||e}a(z5,"_pureAssign");function op(t,e){return t[e]}a(op,"_pureRef");var IE=void 0,Yf=null,myt="",Y5e="function",ohe="object",V5="prototype",pyt="__proto__",Zq="undefined",$5e="constructor",gyt="Symbol",$2i="_polyfill",eG="length",V5e="name",am="call",K5e="toString",Hb=z5(Object),Ayt=op(Hb,V5),xRr=z5(String),tG=op(xRr,V5),she=z5(Math),wRr=z5(Array),J5e=op(wRr,V5),W5=op(J5e,"slice");function Td(t,e){try{return{v:t.apply(this,e)}}catch(r){return{e:r}}}a(Td,"safe");function V2i(t,e){var r=Td(t);return r.e?e:r.v}a(V2i,"safeGet");var tyt;function X5e(t){return function(e){return typeof e===t}}a(X5e,"_createIs");function RRr(t){var e="[object "+t+"]";return function(r){return!!(r&&ahe(r)===e)}}a(RRr,"_createObjIs");function ahe(t){return Ayt[K5e].call(t)}a(ahe,"objToString");function ln(t){return typeof t===Zq||t===Zq}a(ln,"isUndefined");function W2i(t){return!KZ(t)}a(W2i,"isStrictUndefined");function Ht(t){return t===Yf||ln(t)}a(Ht,"isNullOrUndefined");function z2i(t){return t===Yf||!KZ(t)}a(z2i,"isStrictNullOrUndefined");function KZ(t){return!!t||t!==IE}a(KZ,"isDefined");function Y2i(t){return!tyt&&(tyt=["string","number","boolean",Zq,"symbol","bigint"]),t!==ohe&&tyt.indexOf(t)!==-1}a(Y2i,"isPrimitiveType");var Vn=X5e("string"),Er=X5e(Y5e);function Fl(t){return!t&&Ht(t)?!1:!!t&&typeof t===ohe}a(Fl,"isObject");var Jt=op(wRr,"isArray"),Z5e=RRr("Date"),Jf=X5e("number"),tx=X5e("boolean");var Y5=RRr("Error");function Xp(t){return!!(t&&t.then&&Er(t.then))}a(Xp,"isPromiseLike");function t1(t){return!(!t||V2i(function(){return!(t&&0+t)},!t))}a(t1,"isTruthy");var JZ=op(Hb,"getOwnPropertyDescriptor");function Zp(t,e){return!!t&&Ayt.hasOwnProperty[am](t,e)}a(Zp,"objHasOwnProperty");var cm=z5(op(Hb,"hasOwn"),K2i);function K2i(t,e){return Zp(t,e)||!!JZ(t,e)}a(K2i,"polyObjHasOwn");function Dr(t,e,r){if(t&&Fl(t)){for(var n in t)if(cm(t,n)&&e[am](r||t,n,t[n])===-1)break}}a(Dr,"objForEachKey");var G5e={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function J2i(t){var e={};if(e[G5e.c]=!0,e[G5e.e]=!0,t.l){e.get=function(){return t.l.v};var r=JZ(t.l,"v");r&&r.set&&(e.set=function(n){t.l.v=n})}return Dr(t,function(n,o){e[G5e[n]]=W2i(o)?e[G5e[n]]:o}),e}a(J2i,"_createProp");var jA=op(Hb,"defineProperty"),PRr=op(Hb,"defineProperties");function pi(t,e,r){return jA(t,e,J2i(r))}a(pi,"objDefine");function kRr(t,e,r,n,o){var s={};return Dr(t,function(c,l){W5e(s,c,e?l:c),W5e(s,l,r?l:c)}),n?n(s):s}a(kRr,"_createKeyValueMap");function W5e(t,e,r,n){jA(t,e,{value:r,enumerable:!0,writable:!1})}a(W5e,"_assignMapValue");var Ll=z5(xRr),X2i="[object Error]";function Xt(t,e){var r=myt,n=Ayt[K5e][am](t);n===X2i&&(t={stack:Ll(t.stack),message:Ll(t.message),name:Ll(t.name)});try{r=JSON.stringify(t,Yf,e?typeof e=="number"?e:4:IE),r=(r?r.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Yf)||Ll(t)}catch(o){r=" - "+Xt(o,e)}return n+": "+r}a(Xt,"dumpObj");function ec(t){throw new Error(t)}a(ec,"throwError");function sp(t){throw new TypeError(t)}a(sp,"throwTypeError");var NRr=op(Hb,"freeze");function Z2i(t){return t}a(Z2i,"_doNothing");function ePi(t){return t[pyt]||Yf}a(ePi,"_getProto");var K5=op(Hb,"assign"),Ul=op(Hb,"keys");function $A(t){return NRr&&Dr(t,function(e,r){(Jt(r)||Fl(r))&&$A(r)}),Xf(t)}a($A,"objDeepFreeze");var Xf=z5(NRr,Z2i);var hyt=z5(op(Hb,"getPrototypeOf"),ePi);function eMe(t){return kRr(t,1,0,Xf)}a(eMe,"createEnum");function tPi(t){return kRr(t,0,0,Xf)}a(tPi,"createEnumKeyMap");function rPi(t){var e={};return Dr(t,function(r,n){W5e(e,r,n[1]),W5e(e,n[0],n[1])}),Xf(e)}a(rPi,"createSimpleMap");function yyt(t){return rPi(t)}a(yyt,"createTypeMap");var DRr=tPi({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),vRr="__tsUtils$gblCfg",ryt;function MRr(){var t;return typeof globalThis!==Zq&&(t=globalThis),!t&&typeof self!==Zq&&(t=self),!t&&typeof window!==Zq&&(t=window),!t&&typeof global!==Zq&&(t=global),t}a(MRr,"_getGlobalValue");function ORr(){if(!ryt){var t=Td(MRr).v||{};ryt=t[vRr]=t[vRr]||{}}return ryt}a(ORr,"_getGlobalConfig");var XZ=che;function che(t,e,r){var n=e?e[t]:Yf;return function(o){var s=(o?o[t]:Yf)||n;if(s||r){var c=arguments;return(s||r).apply(o,s?W5[am](c,1):c)}sp('"'+Ll(t)+'" not defined for '+Xt(o))}}a(che,"_unwrapFunctionWithPoly");function nPi(t){return function(e){return e[t]}}a(nPi,"_unwrapProp");var DL=op(she,"min"),rx=op(she,"max"),bRr=XZ("slice",tG),Sd=XZ("substring",tG),tMe=che("substr",tG,iPi);function iPi(t,e,r){return Ht(t)&&sp("Invalid "+Xt(t)),r<0?myt:(e=e||0,e<0&&(e=rx(e+t[eG],0)),ln(r)?bRr(t,e):bRr(t,e,e+r))}a(iPi,"polyStrSubstr");function W2(t,e){return Sd(t,0,e)}a(W2,"strLeft");var TRr="_urid",nyt;function oPi(){if(!nyt){var t=ORr();nyt=t.gblSym=t.gblSym||{k:{},s:{}}}return nyt}a(oPi,"_globalSymbolRegistry");var H5e;function Eyt(t){var e={description:Ll(t),toString:a(function(){return gyt+"("+t+")"},"toString")};return e[$2i]=!0,e}a(Eyt,"polyNewSymbol");function sPi(t){var e=oPi();if(!cm(e.k,t)){var r=Eyt(t),n=Ul(e.s).length;r[TRr]=function(){return n+"_"+r[K5e]()},e.k[t]=r,e.s[r[TRr]()]=Ll(t)}return e.k[t]}a(sPi,"polySymbolFor");function aPi(t){!H5e&&(H5e={});var e,r=DRr[t];return r&&(e=H5e[r]=H5e[r]||Eyt(gyt+"."+r)),e}a(aPi,"polyGetKnownSymbol");var Kf;function ML(){Kf=ORr()}a(ML,"_initTestHooks");function rMe(t){var e={};return!Kf&&ML(),e.b=Kf.lzy,jA(e,"v",{configurable:!0,get:a(function(){var r=t();return Kf.lzy||jA(e,"v",{value:r}),e.b=Kf.lzy,r},"get")}),e}a(rMe,"getLazy");function r1(t){return jA({toJSON:a(function(){return t},"toJSON")},"v",{value:t})}a(r1,"createCachedValue");var BRr="window",ihe;function nMe(t,e){var r;return function(){return!Kf&&ML(),(!r||Kf.lzy)&&(r=r1(Td(t,e).v)),r.v}}a(nMe,"_getGlobalInstFn");function Ig(t){return!Kf&&ML(),(!ihe||t===!1||Kf.lzy)&&(ihe=r1(Td(MRr).v||Yf)),ihe.v}a(Ig,"getGlobal");function ri(t,e){var r;if(!ihe||e===!1?r=Ig(e):r=ihe.v,r&&r[t])return r[t];if(t===BRr)try{return window}catch{}return Yf}a(ri,"getInst");function J5(){return!!Ju()}a(J5,"hasDocument");var Ju=nMe(ri,["document"]);function ZZ(){return!!Xu()}a(ZZ,"hasWindow");var Xu=nMe(ri,[BRr]);function rG(){return!!Ql()}a(rG,"hasNavigator");var Ql=nMe(ri,["navigator"]);var LRr=nMe(function(){return!!Td(function(){return process&&(process.versions||{}).node}).v});var YZ,iyt;function iMe(){return YZ=r1(Td(ri,[gyt]).v),YZ}a(iMe,"_initSymbol");function cPi(t){var e=(Kf.lzy?0:YZ)||iMe();return e.v?e.v[t]:IE}a(cPi,"_getSymbolKey");function FRr(){return!!lPi()}a(FRr,"hasSymbol");function lPi(){return!Kf&&ML(),((Kf.lzy?0:YZ)||iMe()).v}a(lPi,"getSymbol");function lhe(t,e){var r=DRr[t];!Kf&&ML();var n=(Kf.lzy?0:YZ)||iMe();return n.v?n.v[r||t]:e?IE:aPi(t)}a(lhe,"getKnownSymbol");function jb(t,e){!Kf&&ML();var r=(Kf.lzy?0:YZ)||iMe();return r.v?r.v(t):e?Yf:Eyt(t)}a(jb,"newSymbol");function OL(t){return!Kf&&ML(),iyt=(Kf.lzy?0:iyt)||r1(Td(cPi,["for"]).v),(iyt.v||sPi)(t)}a(OL,"symbolFor");function z5e(t){return!!t&&Er(t.next)}a(z5e,"isIterator");function Cyt(t){return!z2i(t)&&Er(t[lhe(3)])}a(Cyt,"isIterable");var j5e;function oMe(t,e,r){if(t&&(z5e(t)||(!j5e&&(j5e=r1(lhe(3))),t=t[j5e.v]?t[j5e.v]():Yf),z5e(t))){var n=IE,o=IE;try{for(var s=0;!(o=t.next()).done&&e[am](r||t,o.value,s,t)!==-1;)s++}catch(c){n={e:c},t.throw&&(o=Yf,t.throw(n))}finally{try{o&&!o.done&&t.return&&t.return(o)}finally{if(n)throw n.e}}}}a(oMe,"iterForOf");function zZ(t,e,r){return t.apply(e,r)}a(zZ,"fnApply");function Zf(t,e){return!ln(e)&&t&&(Jt(e)?zZ(t.push,t,e):z5e(e)||Cyt(e)?oMe(e,function(r){t.push(r)}):t.push(e)),t}a(Zf,"arrAppend");function dt(t,e,r){if(t)for(var n=t[eG]>>>0,o=0;o0?r:0;return Sd(t,o,o+n[eG])===n}a(TPi,"polyStrStartsWith");var uyt="ref",dyt="unref",fyt="hasRef",SPi="enabled";function IPi(t,e,r){var n=!0,o=t?e(Yf):Yf,s;function c(){return n=!1,o&&o[dyt]&&o[dyt](),s}a(c,"_unref");function l(){o&&r(o),o=Yf}a(l,"_cancel");function u(){return o=e(o),n||c(),s}a(u,"_refresh");function d(p){!p&&o&&l(),p&&!o&&u()}return a(d,"_setEnabled"),s={cancel:l,refresh:u},s[fyt]=function(){return o&&o[fyt]?o[fyt]():n},s[uyt]=function(){return n=!0,o&&o[uyt]&&o[uyt](),s},s[dyt]=c,s=jA(s,SPi,{get:a(function(){return!!o},"get"),set:d}),{h:s,dn:a(function(){o=Yf},"dn")}}a(IPi,"_createTimerHandler");function vyt(t,e,r){var n=Jt(e),o=n?e.length:0,s=(o>0?e[0]:n?IE:e)||setTimeout,c=(o>1?e[1]:IE)||clearTimeout,l=r[0];r[0]=function(){u.dn(),zZ(l,IE,W5[am](arguments))};var u=IPi(t,function(d){if(d){if(d.refresh)return d.refresh(),d;zZ(c,IE,[d])}return zZ(s,IE,r)},function(d){zZ(c,IE,[d])});return u.h}a(vyt,"_createTimeoutWith");function df(t,e){return vyt(!0,IE,W5[am](arguments))}a(df,"scheduleTimeout");function jRr(t,e,r){return vyt(!0,t,W5[am](arguments,1))}a(jRr,"scheduleTimeoutWith");function sMe(t,e){return vyt(!1,IE,W5[am](arguments))}a(sMe,"createTimeout");var hhe=eMe,byt=yyt;f();var nx=hhe({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2});f();f();var ix="toLowerCase",Vr="length",ree="warnToConsole",eM="throwInternal",Y2="watch",LL="apply",ai="push",$b="splice",ql="logger",K2="cancel",tM="initialize",J2="identifier",nee="removeNotificationListener",iee="addNotificationListener",xE="isInitialized",mhe="getNotifyMgr",FL="getPlugin",i1="name",ap="processNext",aMe="getProcessTelContext",rM="value",UL="enabled",Tyt="stopPollingInternalLogs",Vb="unload",ghe="onComplete",cMe="version",lMe="loggingLevelConsole",X2="createNew",o1="teardown",oee="messageId",Z2="message",wE="diagLog",QL="_doTeardown",iG="update",s1="getNext",qL="setNextPlugin",Ahe="userAgent",Wb="split",ox="replace",yhe="substring",Ehe="indexOf",nM="type",Syt="evtName",sx="status",Iyt="getAllResponseHeaders",Che="isChildEvt",a1="data",oG="getCtx",ax="setCtx",xyt="itemsReceived",_he="headers",see="urlString",sG="timeout";var uMe="traceFlags";var wyt;function $Rr(t,e){wyt||(wyt=dhe("AggregationError",function(n,o){o[Vr]>1&&(n.errors=o[1])}));var r=t||"One or more errors occurred.";throw dt(e,function(n,o){r+=` -`.concat(o," > ").concat(Xt(n))}),new wyt(r,e||[])}a($Rr,"throwAggregationError");f();f();f();var aee="function",zb="object",c1="undefined",l1="prototype";var GL=Object,vhe=GL[l1];f();var hcc=(Ig()||{}).Symbol,mcc=(Ig()||{}).Reflect;var VRr="hasOwnProperty",wPi=a(function(t){for(var e,r=1,n=arguments.length;r0)for(var o=0;o=0;r--)if(t[r]===e)return!0;return!1}a(Qyt,"_hasVisited");function kPi(t,e,r,n){function o(u,d,p){var h=d[p];if(h[Nyt]&&n){var m=u[AMe]||{};m[bhe]!==!1&&(h=(m[d[cee]]||{})[p]||h)}return function(){return h.apply(u,arguments)}}a(o,"_instFuncProxy");var s=z2(null);yMe(r,function(u){s[u]=o(e,r,u)});for(var c=cG(t),l=[];c&&!Fyt(c)&&!Qyt(l,c);)yMe(c,function(u){!s[u]&&Uyt(c,u,!The)&&(s[u]=o(e,c,u))}),l.push(c),c=cG(c);return s}a(kPi,"_getBaseFuncs");function NPi(t,e,r,n){var o=null;if(t&&Zp(r,cee)){var s=t[AMe]||z2(null);if(o=(s[r[cee]]||z2(null))[e],o||EMe("Missing ["+e+"] "+gMe),!o[Dyt]&&s[bhe]!==!1){for(var c=!Zp(t,e),l=cG(t),u=[];c&&l&&!Fyt(l)&&!Qyt(u,l);){var d=l[e];if(d){c=d===n;break}u.push(l),l=cG(l)}try{c&&(t[e]=o),o[Dyt]=1}catch{s[bhe]=!1}}}return o}a(NPi,"_getInstFunc");function DPi(t,e,r){var n=e[t];return n===r&&(n=cG(e)[t]),typeof n!==gMe&&EMe("["+t+"] is not a "+gMe),n}a(DPi,"_getProtoFunc");function MPi(t,e,r,n,o){function s(u,d){var p=a(function(){var h=NPi(this,d,u,p)||DPi(d,u,p);return h.apply(this,arguments)},"dynProtoProxy");return p[Nyt]=1,p}if(a(s,"_createDynamicPrototype"),!hMe(t)){var c=r[AMe]=r[AMe]||z2(null);if(!hMe(c)){var l=c[e]=c[e]||z2(null);c[bhe]!==!1&&(c[bhe]=!!o),hMe(l)||yMe(r,function(u){Uyt(r,u,!1)&&r[u]!==n[u]&&(l[u]=r[u],delete r[u],(!Zp(t,u)||t[u]&&!t[u][Nyt])&&(t[u]=s(t,u)))})}}}a(MPi,"_populatePrototype");function OPi(t,e){if(The){for(var r=[],n=cG(e);n&&!Fyt(n)&&!Qyt(r,n);){if(n===t)return!0;r.push(n),n=cG(n)}return!1}return!0}a(OPi,"_checkPrototype");function kyt(t,e){return Zp(t,iM)?t.name||e||WRr:((t||{})[mMe]||{}).name||e||WRr}a(kyt,"_getObjName");function Jn(t,e,r,n){Zp(t,iM)||EMe("theClass is an invalid class definition.");var o=t[iM];OPi(o,e)||EMe("["+kyt(t)+"] not in hierarchy of ["+kyt(e)+"]");var s=null;Zp(o,cee)?s=o[cee]:(s=RPi+kyt(t,"_")+"$"+Oyt.n,Oyt.n++,o[cee]=s);var c=Jn[JRr],l=!!c[pMe];l&&n&&n[pMe]!==void 0&&(l=!!n[pMe]);var u=PPi(e),d=kPi(o,e,u,l);r(e,d);var p=!!The&&!!c[Myt];p&&n&&(p=!!n[Myt]),MPi(o,s,e,u,p!==!1)}a(Jn,"dynamicProto");Jn[JRr]=Oyt.o;f();var _Me="Promise";var zyt="rejected";function Ec(t,e){return vMe(t,function(r){return e?e({status:"fulfilled",rejected:!1,value:r}):r},function(r){return e?e({status:zyt,rejected:!0,reason:r}):r})}a(Ec,"doAwaitResponse");function vMe(t,e,r,n){var o=t;try{if(Xp(t))(e||r)&&(o=t.then(e,r));else try{e&&(o=e(t))}catch(s){if(r)o=r(s);else throw s}}finally{n&&BPi(o,n)}return o}a(vMe,"doAwait");function BPi(t,e){var r=t;return e&&(Xp(t)?t.finally?r=t.finally(e):r=t.then(function(n){return e(),n},function(n){throw e(),n}):e()),r}a(BPi,"doFinally");var qyt,Gyt,Hyt,XRr=!1;function LPi(t,e,r,n){qyt=qyt||{toString:a(function(){return"[[PromiseState]]"},"toString")},Gyt=Gyt||{toString:a(function(){return"[[PromiseResult]]"},"toString")},Hyt=Hyt||{toString:a(function(){return"[[PromiseIsHandled]]"},"toString")};var o={};o[qyt]={get:e},o[Gyt]={get:r},o[Hyt]={get:n},PRr(t,o)}a(LPi,"_addDebugState$1");var t2r=["pending","resolving","resolved",zyt],ZRr="dispatchEvent",CMe;function FPi(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}a(FPi,"_hasInitEventFn");function UPi(t,e,r,n){var o=Ju();!CMe&&(CMe=r1(!!Td(FPi,[o]).v));var s=CMe.v?o.createEvent("Event"):n?new Event(e):{};if(r&&r(s),CMe.v&&s.initEvent(e,!1,!0),s&&t[ZRr])t[ZRr](s);else{var c=t["on"+e];if(c)c(s);else{var l=ri("console");l&&(l.error||l.log)(e,Xt(s))}}}a(UPi,"emitEvent");var r2r="unhandledRejection",QPi=r2r.toLowerCase(),She=[],qPi=0,GPi=10;var jyt;function e2r(t){return Er(t)?t.toString():Xt(t)}a(e2r,"dumpFnObj");function n2r(t,e,r){var n=BL(arguments,3),o=0,s=!1,c,l=[],u=qPi++,d=She.length>0?She[She.length-1]:void 0,p=!1,h=null,m;function g(x,R){try{She.push(u),p=!0,h&&h.cancel(),h=null;var w=t(function(P,k){l.push(function(){try{var Q=o===2?x:R,M=ln(Q)?c:Er(Q)?Q(c):Q;Xp(M)?M.then(P,k):Q?P(M):o===3?k(M):P(M)}catch(D){k(D)}}),s&&_()},n);return w}finally{She.pop()}}a(g,"_then");function A(x){return g(void 0,x)}a(A,"_catch");function y(x){var R=x,w=x;return Er(x)&&(R=a(function(P){return x&&x(),P},"thenFinally"),w=a(function(P){throw x&&x(),P},"catchFinally")),g(R,w)}a(y,"_finally");function E(){return t2r[o]}a(E,"_strState");function _(){if(l.length>0){var x=l.slice();l=[],p=!0,h&&h.cancel(),h=null,e(x)}}a(_,"_processQueue");function v(x,R){return function(w){if(o===R){if(x===2&&Xp(w)){o=1,w.then(v(2,1),v(3,1));return}o=x,s=!0,c=w,_(),!p&&x===3&&!h&&(h=df(b,GPi))}}}a(v,"_createSettleIfFn");function b(){if(!p)if(p=!0,LRr())process.emit(r2r,c,m);else{var x=Xu()||Ig();!jyt&&(jyt=r1(Td(ri,[_Me+"RejectionEvent"]).v)),UPi(x,QPi,function(R){return pi(R,"promise",{g:a(function(){return m},"g")}),R.reason=c,R},!!jyt.v)}}a(b,"_notifyUnhandledRejection"),m={then:g,catch:A,finally:y},jA(m,"state",{get:E}),XRr&&LPi(m,E,function(){return ahe(c)},function(){return p}),FRr()&&(m[lhe(11)]="IPromise");function I(){return"IPromise"+(XRr?"["+u+(ln(d)?"":":"+d)+"]":"")+" "+E()+(s?" - "+e2r(c):"")}return a(I,"_toString"),m.toString=I,a((function(){Er(r)||sp(_Me+": executor is not a function - "+e2r(r));var R=v(3,0);try{r.call(m,v(2,0),R)}catch(w){R(w)}}),"_initialize")(),m}a(n2r,"_createPromise");function HPi(t){return function(e){var r=BL(arguments,1);return t(function(n,o){try{var s=[],c=1;oMe(e,function(l,u){l&&(c++,vMe(l,function(d){s[u]=d,--c===0&&n(s)},o))}),c--,c===0&&n(s)}catch(l){o(l)}},r)}}a(HPi,"_createAllPromise");function jPi(t){return r1(function(e){var r=BL(arguments,1);return t(function(n,o){var s=[],c=1;function l(u,d){c++,Ec(u,function(p){p.rejected?s[d]={status:zyt,reason:p.reason}:s[d]={status:"fulfilled",value:p.value},--c===0&&n(s)})}a(l,"processItem");try{Jt(e)?dt(e,l):Cyt(e)?oMe(e,l):sp("Input is not an iterable"),c--,c===0&&n(s)}catch(u){o(u)}},r)})}a(jPi,"_createAllSettledPromise");function i2r(t){dt(t,function(e){try{e()}catch{}})}a(i2r,"syncItemProcessor");function $Pi(t){var e=Jf(t)?t:0;return function(r){df(function(){i2r(r)},e)}}a($Pi,"timeoutItemProcessor");function o2r(t,e){return n2r(o2r,$Pi(e),t,e)}a(o2r,"createAsyncPromise");var $yt;function VPi(t,e){!$yt&&($yt=r1(Td(ri,[_Me]).v||null));var r=$yt.v;if(!r)return o2r(t);Er(t)||sp(_Me+": executor is not a function - "+Xt(t));var n=0;function o(){return t2r[n]}a(o,"_strState");var s=new r(function(c,l){function u(p){n=2,c(p)}a(u,"_resolve");function d(p){n=3,l(p)}a(d,"_reject"),t(u,d)});return jA(s,"state",{get:o}),s}a(VPi,"createNativePromise");var Vyt;function Ihe(t){return n2r(Ihe,i2r,t)}a(Ihe,"createSyncPromise");function bMe(t,e){return!Vyt&&(Vyt=jPi(Ihe)),Vyt.v(t,e)}a(bMe,"createSyncAllSettledPromise");var Wyt;function vu(t,e){return!Wyt&&(Wyt=r1(VPi)),Wyt.v.call(this,t,e)}a(vu,"createPromise");var TMe=HPi(vu);var zcc=lhe(11);f();f();f();f();var u1=void 0,Ki="",lG="channels",Id="core",SMe="createPerfMgr",xhe="disabled",oM="extensionConfig",uG="extensions",RE="processTelemetry",dG="priority",lee="eventsSent",HL="eventsDiscarded",uee="eventsSendRequest",eP="perfEvent",IMe="offlineEventsStored",xMe="offlineBatchSent",wMe="offlineBatchDrop",dee="getPerfMgr",RMe="domain",PMe="path",s2r="Not dynamic - ",a2r="REDACTED",Yyt=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"];var WPi="getPrototypeOf",zPi=/-([a-z])/g,YPi=/([^\w\d_$])/g,KPi=/^(\d+[\w\d_$])/,ilc=Object[WPi];function jL(t){return!Ht(t)}a(jL,"isNotNullOrUndefined");function whe(t){var e=t;return e&&Vn(e)&&(e=e[ox](zPi,function(r,n){return n.toUpperCase()}),e=e[ox](YPi,"_"),e=e[ox](KPi,function(r,n){return"_"+n})),e}a(whe,"normalizeJsName");function cp(t,e){return t&&e?nl(t,e)!==-1:!1}a(cp,"strContains");function $L(t){return t&&t.toISOString()||""}a($L,"toISOString");function ff(t){return Y5(t)?t[i1]:Ki}a(ff,"getExceptionName");function tP(t,e,r,n,o){var s=r;return t&&(s=t[e],s!==r&&(!o||o(s))&&(!n||n(r))&&(s=r,t[e]=s)),s}a(tP,"setValue");function Kyt(t,e,r){var n;return t?(n=t[e],!n&&Ht(n)&&(n=ln(r)?{}:r,t[e]=n)):n=ln(r)?{}:r,n}a(Kyt,"getSetValue");function JPi(t,e){var r=null,n=null;return Er(t)?r=t:n=t,function(){var o=arguments;if(r&&(n=r()),n)return n[e][LL](n,o)}}a(JPi,"_createProxyFunction");function fG(t,e,r,n,o){t&&e&&r&&(o!==!1||ln(t[e]))&&(t[e]=JPi(r,n))}a(fG,"proxyFunctionAs");function pG(t,e,r,n){return t&&e&&Fl(t)&&Jt(r)&&dt(r,function(o){Vn(o)&&fG(t,o,e,o,n)}),t}a(pG,"proxyFunctions");function Jyt(t){return(function(){function e(){var r=this;t&&Dr(t,function(n,o){r[n]=o})}return a(e,"class_1"),e})()}a(Jyt,"createClassFromInterface");function NMe(t){return t&&K5&&(t=GL(K5({},t))),t}a(NMe,"optimizeObject");function DMe(t,e,r,n,o,s){var c=arguments,l=c[0]||{},u=c[Vr],d=!1,p=1;for(u>0&&tx(l)&&(d=l,l=c[p]||{},p++),Fl(l)||(l={});p>>=0),Dhe=m2r+t&mG,Mhe=g2r-t&mG,A2r=!0}a(dki,"_mwcSeed");function fki(){try{var t=yc()&2147483647;dki((Math.random()*h2r^t)+t)}catch{}}a(fki,"_autoSeedMwc");function p2r(t){var e=0,r=sEt()||aEt();return r&&r.getRandomValues&&(e=r.getRandomValues(new Uint32Array(1))[0]&mG),e===0&&hee()&&(A2r||fki(),e=pki()&mG),e===0&&(e=n1(h2r*Math.random()|0)),t||(e>>>=0),e}a(p2r,"random32");function pki(t){Mhe=36969*(Mhe&65535)+(Mhe>>16)&mG,Dhe=18e3*(Dhe&65535)+(Dhe>>16)&mG;var e=(Mhe<<16)+(Dhe&65535)>>>0&mG|0;return t||(e>>>=0),e}a(pki,"mwcRandom32");function y2r(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=p2r()>>>0,n=0,o=Ki;o[Vr]>>=6,n===5&&(r=(p2r()<<2&4294967295|r&3)>>>0,n=0);return o}a(y2r,"newId");var E2r="3.3.11",hki="."+y2r(6),mki=0;function C2r(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}a(C2r,"_canAcceptData");function gki(t,e){var r=e[t.id];if(!r){r={};try{C2r(e)&&pi(e,t.id,{e:!1,v:r})}catch{}}return r}a(gki,"_getCache");function d1(t,e){return e===void 0&&(e=!1),whe(t+mki+++(e?"."+E2r:Ki)+hki)}a(d1,"createUniqueNamespace");function BMe(t){var e={id:d1("_aiData-"+(t||Ki)+"."+E2r),accept:a(function(r){return C2r(r)},"accept"),get:a(function(r,n,o,s){var c=r[e.id];return c?c[whe(n)]:(s&&(c=gki(e,r),c[whe(n)]=o),o)},"get"),kill:a(function(r,n){if(r&&r[n])try{delete r[n]}catch{}},"kill")};return e}a(BMe,"createElmNodeData");f();function LMe(t){return t&&Fl(t)&&!Jt(t)&&(t.isVal||t.fb||cm(t,"v")||cm(t,"mrg")||cm(t,"ref")||t.set)}a(LMe,"_isConfigDefaults");function _2r(t,e,r){var n,o=r.dfVal||KZ;if(e&&r.fb){var s=r.fb;Jt(s)||(s=[s]);for(var c=0;c0&&$Rr("Watcher error(s): ",A)}}a(p,"_notifyWatchers");function h(g){if(g&&g.h[Vr]>0){c||(c=[]),l||(l=df(function(){l=null,p()},0));for(var A=0;A0?Ec(sM(t[0],e),function(){GMe(BL(t,1),e,r)}):r(),n}a(GMe,"doUnloadAll");f();var I2r=500,pEt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";f();f();function Tki(t,e,r){return!t&&Ht(t)?e:tx(t)?t:Ll(t)[ix]()==="true"}a(Tki,"_stringToBoolOrDefault");function hEt(t){return{mrg:!0,v:t}}a(hEt,"cfgDfMerge");function gee(t,e,r){return{fb:r,isVal:t,v:e}}a(gee,"cfgDfValidate");function Jb(t,e){return{fb:e,set:Tki,v:!!t}}a(Jb,"cfgDfBoolean");f();f();var mEt=[lee,HL,uee,eP],jMe=null,HMe;function Ski(t,e){return function(){var r=arguments,n=gEt(e);if(n){var o=n.listener;o&&o[t]&&o[t][LL](o,r)}}}a(Ski,"_listenerProxyFunc");function Iki(){var t=ri("Microsoft");return t&&(jMe=t.ApplicationInsights),jMe}a(Iki,"_getExtensionNamespace");function gEt(t){var e=jMe;return!e&&t.disableDbgExt!==!0&&(e=jMe||Iki()),e?e.ChromeDbgExt:null}a(gEt,"getDebugExt");function x2r(t){if(!HMe){HMe={};for(var e=0;e=A&&(d[I](b[Z2]),n[x]=!0)}else o>=A&&d[I](b[Z2]);p(A,b)}},d.debugToConsole=function(A){AEt("debug",A),g("warning",A)},d[ree]=function(A){AEt("warn",A),g("warning",A)},d.errorToConsole=function(A){AEt("error",A),g("error",A)},d.resetInternalMessageCount=function(){r=0,n={}},d.logInternalMessage=p,d[Vb]=function(A){u&&u.rm(),u=null};function p(A,y){if(!m()){var E=!0,_=Rki+y[oee];if(n[_]?E=!1:n[_]=!0,E&&(A<=s&&(d.queue[ai](y),r++,g(A===1?"error":"warn",y)),r===c)){var v="Internal events throttle limit per PageView reached for this app.",b=new Qhe(23,v,!1);d.queue[ai](b),A===1?d.errorToConsole(v):d[ree](v)}}}a(p,"_logInternalMessage");function h(A){return Kb(e0(A,Pki,d).cfg,function(y){var E=y.cfg;o=E[lMe],s=E.loggingLevelTelemetry,c=E.maxMessageLimit,l=E.enableDebug})}a(h,"_setDefaultsFromConfig");function m(){return r>=c}a(m,"_areInternalMessagesThrottled");function g(A,y){var E=gEt(e||{});E&&E[wE]&&E[wE](A,y)}a(g,"_debugExtMsg")})}return a(t,"DiagnosticLogger"),t.__ieDyn=1,t})();function P2r(t){return t||new yee}a(P2r,"_getLogger");function Rr(t,e,r,n,o,s){s===void 0&&(s=!1),P2r(t)[eM](e,r,n,o,s)}a(Rr,"_throwInternal");function aM(t,e){P2r(t)[ree](e)}a(aM,"_warnToConsole");var yEt,zL,k2r="toGMTString",N2r="toUTCString",vEt="cookie",EEt="expires",D2r="isCookieUseDisabled",qhe="disableCookiesUsage",M2r="_ckMgr",$Me=null,CEt=null,O2r=null,nP,B2r={},L2r={},Nki=(yEt={cookieCfg:hEt((zL={},zL[RMe]={fb:"cookieDomain",dfVal:jL},zL.path={fb:"cookiePath",dfVal:jL},zL.enabled=u1,zL.ignoreCookies=u1,zL.blockedCookies=u1,zL.disableCookieDefer=!1,zL)),cookieDomain:u1,cookiePath:u1},yEt[qhe]=u1,yEt);function bEt(){!nP&&(nP=rMe(function(){return Ju()}))}a(bEt,"_getDoc");function VMe(t){return t?t.isEnabled():!0}a(VMe,"_isMgrEnabled");function H2r(t,e){return e&&t&&Jt(t.ignoreCookies)?uo(t.ignoreCookies,e)!==-1:!1}a(H2r,"_isIgnoredCookie");function F2r(t,e){return e&&t&&Jt(t.blockedCookies)&&uo(t.blockedCookies,e)!==-1?!0:H2r(t,e)}a(F2r,"_isBlockedCookie");function U2r(t,e){var r=e[UL];if(Ht(r)){var n=void 0;ln(t[D2r])||(n=!t[D2r]),ln(t[qhe])||(n=!t[qhe]),r=n}return r}a(U2r,"_isCfgEnabled");function j2r(t,e){var r,n,o,s,c,l,u,d,p=[];function h(E){var _,v=(_={},_[PMe]=E||"/",_[EEt]="Thu, 01 Jan 1970 00:00:01 GMT",_);return hee()||(v["max-age"]="0"),q2r(Ki,v)}a(h,"_formatDeletionValue");function m(E,_,v,b){var I={},x=ni(E||Ki),R=nl(x,";");if(R!==-1&&(x=ni(W2(E,R)),I=$2r(Sd(E,R+1))),tP(I,RMe,v||o,t1,ln),!Ht(_)){var w=hee();if(ln(I[EEt])){var P=yc(),k=P+_*1e3;if(k>0){var Q=new Date;Q.setTime(k),tP(I,EEt,Q2r(Q,w?k2r:N2r)||Q2r(Q,w?k2r:N2r)||Ki,t1)}}w||tP(I,"max-age",Ki+_,null,ln)}var M=khe();return M&&M.protocol==="https:"&&(tP(I,"secure",null,null,ln),CEt===null&&(CEt=!Mki((Ql()||{})[Ahe])),CEt&&tP(I,"SameSite","None",null,ln)),tP(I,PMe,b||n,null,ln),q2r(x,I)}a(m,"_formatSetCookieValue");function g(E){if(p)for(var _=p[Vr]-1;_>=0;_--)p[_].n===E&&p[$b](_,1)}a(g,"_removePendingCookie");function A(){_Et(e)&&p&&(dt(p,function(E){F2r(r,E.n)||(E.o===0?u(E.n,E.v):E.o===1&&d(E.n,E.v))}),p=[])}a(A,"_flushPendingCookies"),t=e0(t||L2r,null,e).cfg,s=Kb(t,function(E){E.setDf(E.cfg,Nki),r=E.ref(E.cfg,"cookieCfg"),n=r[PMe]||"/",o=r[RMe],r.disableCookieDefer?p=null:p===null&&(p=[]);var _=c;c=U2r(t,r)!==!1,l=r.getCookie||Dki,u=r.setCookie||G2r,d=r.delCookie||G2r,!_&&c&&p&&A()},e);var y={isEnabled:a(function(){var E=U2r(t,r)!==!1&&c&&_Et(e),_=L2r[M2r];return E&&_&&y!==_&&(E=VMe(_)),E},"isEnabled"),setEnabled:a(function(E){r[UL]=E,ln(t[qhe])||(t[qhe]=!E)},"setEnabled"),set:a(function(E,_,v,b,I){var x=!1,R=F2r(r,E);if(!R){var w=m(_,v,b,I);VMe(y)?(u(E,w),x=!0):p&&(g(E),p[ai]({n:E,o:0,v:w}),x=!0)}return x},"set"),get:a(function(E){var _=Ki,v=H2r(r,E);if(!v){if(VMe(y))_=l(E);else if(p)for(var b=p[Vr]-1;b>=0;b--){var I=p[b];if(I.n===E){if(I.o===0){var x=I.v,R=nl(x,";");_=R!==-1?ni(W2(x,R)):ni(x)}break}}}return _},"get"),del:a(function(E,_){var v=!1;return VMe(y)?v=y.purge(E,_):p&&(g(E),p[ai]({n:E,o:1,v:h(_)}),v=!0),v},"del"),purge:a(function(E,_){var v=!1;return _Et(e)&&(d(E,h(_)),v=!0),v},"purge"),unload:a(function(E){s&&s.rm(),s=null,p=null},"unload")};return y[M2r]=y,y}a(j2r,"createCookieMgr");function _Et(t){if($Me===null){$Me=!1,!nP&&bEt();try{var e=nP.v||{};$Me=e[vEt]!==void 0}catch(r){Rr(t,2,68,"Cannot access document.cookie - "+ff(r),{exception:Xt(r)})}}return $Me}a(_Et,"areCookiesSupported");function $2r(t){var e={};if(t&&t[Vr]){var r=ni(t)[Wb](";");dt(r,function(n){if(n=ni(n||Ki),n){var o=nl(n,"=");o===-1?e[n]=null:e[ni(W2(n,o))]=ni(Sd(n,o+1))}})}return e}a($2r,"_extractParts");function Q2r(t,e){return Er(t[e])?t[e]():null}a(Q2r,"_formatDate");function q2r(t,e){var r=t||Ki;return Dr(e,function(n,o){r+="; "+n+(Ht(o)?Ki:"="+o)}),r}a(q2r,"_formatCookieValue");function Dki(t){var e=Ki;if(!nP&&bEt(),nP.v){var r=nP.v[vEt]||Ki;O2r!==r&&(B2r=$2r(r),O2r=r),e=ni(B2r[t]||Ki)}return e}a(Dki,"_getCookieValue");function G2r(t,e){!nP&&bEt(),nP.v&&(nP.v[vEt]=t+"="+e)}a(G2r,"_setCookieValue");function Mki(t){return Vn(t)?!!(cp(t,"CPU iPhone OS 12")||cp(t,"iPad; CPU OS 12")||cp(t,"Macintosh; Intel Mac OS X 10_14")&&cp(t,"Version/")&&cp(t,"Safari")||cp(t,"Macintosh; Intel Mac OS X 10_14")&&Z5(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||cp(t,"Chrome/5")||cp(t,"Chrome/6")||cp(t,"UnrealEngine")&&!cp(t,"Chrome")||cp(t,"UCBrowser/12")||cp(t,"UCBrowser/11")):!1}a(Mki,"uaDisallowsSameSiteNone");f();var Oki={perfEvtsSendAll:!1};function Bki(t){t.h=null;var e=t.cb;t.cb=[],dt(e,function(r){Td(r.fn,[r.arg])})}a(Bki,"_runScheduledListeners");function YL(t,e,r,n){dt(t,function(o){o&&o[e]&&(r?(r.cb[ai]({fn:n,arg:o}),r.h=r.h||df(Bki,0,r)):Td(n,[o]))})}a(YL,"_runListeners");var V2r=(function(){function t(e){this.listeners=[];var r,n,o=[],s={h:null,cb:[]},c=e0(e,Oki);n=c[Y2](function(l){r=!!l.cfg.perfEvtsSendAll}),Jn(t,this,function(l){pi(l,"listeners",{g:a(function(){return o},"g")}),l[iee]=function(u){o[ai](u)},l[nee]=function(u){for(var d=uo(o,u);d>-1;)o[$b](d,1),d=uo(o,u)},l[lee]=function(u){YL(o,lee,s,function(d){d[lee](u)})},l[HL]=function(u,d,p){YL(o,HL,s,function(h){h[HL](u,d,p)})},l[uee]=function(u,d){YL(o,uee,d?s:null,function(p){p[uee](u,d)})},l[eP]=function(u){u&&(r||!u[Che]())&&YL(o,eP,null,function(d){u.isAsync?df(function(){return d[eP](u)},0):d[eP](u)})},l[IMe]=function(u){u&&u[Vr]&&YL(o,IMe,s,function(d){d[IMe](u)})},l[xMe]=function(u){u&&u[a1]&&YL(o,xMe,s,function(d){d[xMe](u)})},l[wMe]=function(u,d){if(u>0){var p=d||0;YL(o,wMe,s,function(h){h[wMe](u,p)})}},l[Vb]=function(u){var d=a(function(){n&&n.rm(),n=null,o=[],s.h&&s.h[K2](),s.h=null,s.cb=[]},"_finishUnload"),p;if(YL(o,"unload",null,function(h){var m=h[Vb](u);m&&(p||(p=[]),p[ai](m))}),p)return vu(function(h){return Ec(TMe(p),function(){d(),h()})});d()}})}return a(t,"NotificationManager"),t.__ieDyn=1,t})();f();var Eee="ctx",SEt="ParentContextKey",Ghe="ChildrenContextKey",Lki=null,WMe=(function(){function t(e,r,n){var o=this;if(o.start=yc(),o[i1]=e,o.isAsync=n,o[Che]=function(){return!1},Er(r)){var s;pi(o,"payload",{g:a(function(){return!s&&Er(r)&&(s=r(),r=null),s},"g")})}o[oG]=function(c){return c?c===t[SEt]||c===t[Ghe]?o[c]:(o[Eee]||{})[c]:null},o[ax]=function(c,l){if(c)if(c===t[SEt])o[c]||(o[Che]=function(){return!0}),o[c]=l;else if(c===t[Ghe])o[c]=l;else{var u=o[Eee]=o[Eee]||{};u[c]=l}},o.complete=function(){var c=0,l=o[oG](t[Ghe]);if(Jt(l))for(var u=0;u0&&(dt(A,function(y){try{y.func.call(y.self,y.args)}catch(E){Rr(r[ql],2,73,"Unexpected Exception during onComplete - "+Xt(E))}}),s=[])}return g}a(u,"_moveNext");function d(g,A){var y=null,E=e.cfg;if(E&&g){var _=E[oM];!_&&A&&(_={}),E[oM]=_,_=e.ref(E,oM),_&&(y=_[g],!y&&A&&(y={}),_[g]=y,y=e.ref(_,g))}return y}a(d,"_getExtCfg");function p(g,A){var y=d(g,!0);return A&&Dr(A,function(E,_){if(Ht(y[E])){var v=e.cfg[E];(v||!Ht(v))&&(y[E]=v)}Ohe(e,y,E,_)}),e.setDf(y,A)}a(p,"_resolveExtCfg");function h(g,A,y){y===void 0&&(y=!1);var E,_=d(g,!1),v=e.cfg;return _&&(_[A]||!Ht(_[A]))?E=_[A]:(v[A]||!Ht(v[A]))&&(E=v[A]),E||!Ht(E)?E:y}a(h,"_getConfig");function m(g){for(var A;A=c._next();){var y=A[FL]();y&&g(y)}}return a(m,"_iterateChain"),c}a(REt,"_createInternalContext");function cx(t,e,r,n){var o=e0(e),s=REt(t,o,r,n),c=s.ctx;function l(d){var p=s._next();return p&&p[RE](d,c),!p}a(l,"_processNext");function u(d,p){return d===void 0&&(d=null),Jt(d)&&(d=KL(d,o.cfg,r,p)),cx(d||c[s1](),o.cfg,r,p)}return a(u,"_createNew"),c[ap]=l,c[X2]=u,c}a(cx,"createProcessTelemetryContext");function Cee(t,e,r){var n=e0(e.config),o=REt(t,n,e,r),s=o.ctx;function c(u){var d=o._next();return d&&d[Vb](s,u),!d}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Jt(u)&&(u=KL(u,n.cfg,e,d)),Cee(u||s[s1](),e,d)}return a(l,"_createNew"),s[ap]=c,s[X2]=l,s}a(Cee,"createProcessTelemetryUnloadContext");function Hhe(t,e,r){var n=e0(e.config),o=REt(t,n,e,r),s=o.ctx;function c(u){return s.iterate(function(d){Er(d[iG])&&d[iG](s,u)})}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Jt(u)&&(u=KL(u,n.cfg,e,d)),Hhe(u||s[s1](),e,d)}return a(l,"_createNew"),s[ap]=c,s[X2]=l,s}a(Hhe,"createProcessTelemetryUpdateContext");function KL(t,e,r,n){var o=null,s=!n;if(Jt(t)&&t[Vr]>0){var c=null;dt(t,function(l){if(!s&&n===l&&(s=!0),s&&l&&Er(l[RE])){var u=Hki(l,e,r);o||(o=u),c&&c._setNext(u),c=u}})}return n&&!o?KL([n],e,r):o}a(KL,"createTelemetryProxyChain");function Hki(t,e,r){var n=null,o=Er(t[RE]),s=Er(t[qL]),c;t?c=t[J2]+"-"+t[dG]+"-"+Z2r++:c="Unknown-0-"+Z2r++;var l={getPlugin:a(function(){return t},"getPlugin"),getNext:a(function(){return n},"getNext"),processTelemetry:p,unload:h,update:m,_id:c,_setNext:a(function(g){n=g},"_setNext")};function u(){var g;return t&&Er(t[X2r])&&(g=t[X2r]()),g||(g=cx(l,e,r)),g}a(u,"_getTelCtx");function d(g,A,y,E,_){var v=!1,b=t?t[J2]:qki,I=g[J2r];return I||(I=g[J2r]={}),g.setNext(n),t&&zMe(g[Id](),function(){return b+":"+y},function(){I[c]=!0;try{var x=n?n._id:Ki;x&&(I[x]=!1),v=A(g)}catch(w){var R=n?I[n._id]:!0;R&&(v=!0),(!n||!R)&&Rr(g[wE](),1,73,"Plugin ["+b+"] failed during "+y+" - "+Xt(w)+", run flags: "+Xt(I))}},E,_),v}a(d,"_processChain");function p(g,A){A=A||u();function y(E){if(!t||!o)return!1;var _=cM(t);return _[o1]||_[xhe]?!1:(s&&t[qL](n),t[RE](g,E),!0)}a(y,"_callProcessTelemetry"),d(A,y,"processTelemetry",function(){return{item:g}},!g.sync)||A[ap](g)}a(p,"_processTelemetry");function h(g,A){function y(){var E=!1;if(t){var _=cM(t),v=t[Id]||_[Id];t&&(!v||v===g.core())&&!_[o1]&&(_[Id]=null,_[o1]=!0,_[xE]=!1,t[o1]&&t[o1](g,A)===!0&&(E=!0))}return E}a(y,"_callTeardown"),d(g,y,"unload",function(){},A.isAsync)||g[ap](A)}a(h,"_unloadPlugin");function m(g,A){function y(){var E=!1;if(t){var _=cM(t),v=t[Id]||_[Id];t&&(!v||v===g.core())&&!_[o1]&&t[iG]&&t[iG](g,A)===!0&&(E=!0)}return E}a(y,"_callUpdate"),d(g,y,"update",function(){},!1)||g[ap](A)}return a(m,"_updatePlugin"),Xf(l)}a(Hki,"createTelemetryPluginProxy");var jki=(function(){function t(e,r,n,o){var s=this,c=cx(e,r,n,o);pG(s,c,Ul(c))}return a(t,"ProcessTelemetryContext"),t})();f();f();f();function KMe(){var t=[];function e(n){n&&t[ai](n)}a(e,"_addHandler");function r(n,o){dt(t,function(s){try{s(n,o)}catch(c){Rr(n[wE](),2,73,"Unexpected error calling unload handler - "+Xt(c))}}),t=[]}return a(r,"_runHandlers"),{add:e,run:r}}a(KMe,"createUnloadHandlerContainer");f();var JMe,XMe;function ZMe(){var t=[];function e(n){var o=t;t=[],dt(o,function(s){try{(s.rm||s.remove).call(s)}catch(c){Rr(n,2,73,"Unloading:"+Xt(c))}}),JMe&&o[Vr]>JMe&&(XMe?XMe("doUnload",o):Rr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}a(e,"_doUnload");function r(n){n&&(Zf(t,n),JMe&&t[Vr]>JMe&&(XMe?XMe("Add",t):Rr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return a(r,"_addHook"),{run:e,add:r}}a(ZMe,"createUnloadHookContainer");var PEt,JL="getPlugin",$ki=(PEt={},PEt[oM]={isVal:jL,v:{}},PEt),jhe=(function(){function t(){var e=this,r,n,o,s,c;d(),Jn(t,e,function(p){p[tM]=function(h,m,g,A){u(h,m,A),r=!0},p[o1]=function(h,m){var g=p[Id];if(!g||h&&g!==h[Id]())return;var A,y=!1,E=h||Cee(null,g,o&&o[JL]?o[JL]():o),_=m||{reason:0,isAsync:!1};function v(){y||(y=!0,s.run(E,m),c.run(E[wE]()),A===!0&&E[ap](_),d())}return a(v,"_unloadCallback"),!p[QL]||p[QL](E,_,v)!==!0?v():A=!0,A},p[iG]=function(h,m){var g=p[Id];if(!g||h&&g!==h[Id]())return;var A,y=!1,E=h||Hhe(null,g,o&&o[JL]?o[JL]():o),_=m||{reason:0};function v(){y||(y=!0,u(E.getCfg(),E.core(),E[s1]()))}return a(v,"_updateCallback"),!p._doUpdate||p._doUpdate(E,_,v)!==!0?v():A=!0,A},fG(p,"_addUnloadCb",function(){return s},"add"),fG(p,"_addHook",function(){return c},"add"),pi(p,"_unloadHooks",{g:a(function(){return c},"g")})}),e[wE]=function(p){return l(p)[wE]()},e[xE]=function(){return r},e.setInitialized=function(p){r=p},e[qL]=function(p){o=p},e[ap]=function(p,h){h?h[ap](p):o&&Er(o[RE])&&o[RE](p,null)},e._getTelCtx=l;function l(p){p===void 0&&(p=null);var h=p;if(!h){var m=n||cx(null,{},e[Id]);o&&o[JL]?h=m[X2](null,o[JL]):h=m[X2](null,o)}return h}a(l,"_getTelCtx");function u(p,h,m){e0(p,$ki,gG(h)),!m&&h&&(m=h[aMe]()[s1]());var g=o;o&&o[JL]&&(g=o[JL]()),e[Id]=h,n=cx(m,p,h,g)}a(u,"_setDefaults");function d(){r=!1,e[Id]=null,n=null,o=null,c=ZMe(),s=KMe()}a(d,"_initDefaults")}return a(t,"BaseTelemetryPlugin"),t.__ieDyn=1,t})();function Vki(t,e,r){var n={id:e,fn:r};Zf(t,n);var o={remove:a(function(){dt(t,function(s,c){if(s.id===n.id)return t[$b](c,1),-1})},"remove")};return o}a(Vki,"_addInitializer");function Wki(t,e,r){for(var n=!1,o=t[Vr],s=0;s"},"v")})}a(nNi,"_createUnloadHook");var DEt=(function(){function t(){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,R,w,P,k,Q,M,D,G,O,N,F,U;Jn(t,this,function(L){Te(),L._getDbgPlgTargets=function(){return[w,o]},L[xE]=function(){return r},L.activeStatus=function(){return Q},L._setPendingStatus=function(){Q=3},L[tM]=function(Y,ee,Ee,Ae){g&&ec(tPr),L[xE]()&&ec("Core cannot be initialized more than once"),e=e0(Y,kEt,Ee||L[ql],!1),Y=e.cfg,Ne(e[Y2](function(Ze){var vt=Ze.cfg;D=vt.initInMemoMaxSize||Kki,H(vt);var Nt=Ze.ref(Ze.cfg,oM);Dr(Nt,function(Gt){Ze.ref(Nt,Gt)})})),s=Ae,b=rNi(e,v,s&&L[mhe](),b),te(),L[ql]=Ee;var ve=Y[uG];if(p=[],p[ai].apply(p,aG(aG([],ee,!1),ve,!1)),h=Y[lG],De(null),(!m||m[Vr]===0)&&ec("No "+lG+" available"),h&&h[Vr]>1){var We=L[FL]("TeeChannelController");(!We||!We.plugin)&&Rr(n,1,28,"TeeChannel required")}tNi(Y,R,n),R=null,r=!0,Q===nx.ACTIVE&&j()},L.getChannels=function(){var Y=[];return m&&dt(m,function(ee){Y[ai](ee)}),Xf(Y)},L.track=function(Y){zMe(L[dee](),function(){return"AppInsightsCore:track"},function(){Y===null&&(ae(Y),ec("Invalid telemetry item")),!Y[i1]&&Ht(Y[i1])&&(ae(Y),ec("telemetry name required")),Y.iKey=Y.iKey||x,Y.time=Y.time||$L(new Date),Y.ver=Y.ver||"4.0",!g&&L[xE]()&&Q===nx.ACTIVE?fe()[ap](Y):Q!==nx.INACTIVE&&o[Vr]<=D&&o[ai](Y)},function(){return{item:Y}},!Y.sync)},L[aMe]=fe,L[mhe]=function(){return s||(s=new V2r(e.cfg),L[zki]=s),s},L[iee]=function(Y){L.getNotifyMgr()[iee](Y)},L[nee]=function(Y){s&&s[nee](Y)},L.getCookieMgr=function(){return u||(u=j2r(e.cfg,L[ql])),u},L.setCookieMgr=function(Y){u!==Y&&(sM(u,!1),u=Y)},L[dee]=function(){return c||l||z2r()},L.setPerfMgr=function(Y){c=Y},L.eventCnt=function(){return o[Vr]},L.releaseQueue=function(){if(r&&o[Vr]>0){var Y=o;o=[],Q===2?dt(Y,function(ee){ee.iKey=ee.iKey||x,fe()[ap](ee)}):Rr(n,2,20,"core init status is not active")}},L.pollInternalLogs=function(Y){return y=Y||null,U=!1,N&&N[K2](),ce(!0)};function H(Y){var ee=Y.instrumentationKey,Ee=Y.endpointUrl;if(Q!==3){if(Ht(ee)){x=null,Q=nx.INACTIVE;var Ae="Please provide instrumentation key";r?(Rr(n,1,100,Ae),j()):ec(Ae);return}var ve=[];Xp(ee)?(ve[ai](ee),x=null):x=ee,Xp(Ee)?(ve[ai](Ee),M=null):M=Ee,ve[Vr]?$(Y,ve):W()}}a(H,"_handleIKeyEndpointPromises");function $(Y,ee){G=!1,Q=3;var Ee=jL(Y.initTimeOut)?Y.initTimeOut:Jki,Ae=bMe(ee);O&&O[K2](),O=df(function(){O=null,G||W()},Ee),Ec(Ae,function(ve){try{if(G)return;if(!ve.rejected){var We=ve[rM];if(We&&We[Vr]){var Ze=We[0];if(x=Ze&&Ze[rM],We[Vr]>1){var vt=We[1];M=vt&&vt[rM]}}x&&(Y.instrumentationKey=x,Y.endpointUrl=M)}W()}catch{G||W()}})}a($,"_waitForInitPromises");function W(){G=!0,Ht(x)?(Q=nx.INACTIVE,Rr(n,1,112,"ikey can't be resolved from promises")):Q=nx.ACTIVE,j()}a(W,"_setStatus");function j(){r&&(L.releaseQueue(),L.pollInternalLogs())}a(j,"_releaseQueues");function ce(Y){if((!N||!N[UL])&&!U){var ee=Y||n&&n.queue[Vr]>0;ee&&(F||(F=!0,Ne(e[Y2](function(Ee){var Ae=Ee.cfg.diagnosticLogInterval;(!Ae||!(Ae>0))&&(Ae=1e4);var ve=!1;N&&(ve=N[UL],N[K2]()),N=sMe(X,Ae),N.unref(),N[UL]=ve}))),N[UL]=!0)}return N}a(ce,"_startLogPoller"),L[Tyt]=function(){U=!0,N&&N[K2](),X()},pG(L,function(){return A},["addTelemetryInitializer"]),L[Vb]=function(Y,ee,Ee){Y===void 0&&(Y=!0),r||ec(Yki),g&&ec(tPr);var Ae={reason:50,isAsync:Y,flushComplete:!1},ve;Y&&!ee&&(ve=vu(function(vt){ee=vt}));var We=Cee(Ue(),L);We[ghe](function(){v.run(L[ql]),GMe([u,s,n],Y,function(){Te(),ee&&ee(Ae)})},L);function Ze(vt){Ae.flushComplete=vt,g=!0,_.run(We,Ae),L[Tyt](),We[ap](Ae)}return a(Ze,"_doUnload"),X(),le(Y,Ze,6,Ee)||Ze(!1),ve},L[FL]=Ve,L.addPlugin=function(Y,ee,Ee,Ae){if(!Y){Ae&&Ae(!1),Z(iPr);return}var ve=Ve(Y[J2]);if(ve&&!ee){Ae&&Ae(!1),Z("Plugin ["+Y[J2]+"] is already loaded!");return}var We={reason:16};function Ze(Gt){p[ai](Y),We.added=[Y],De(We),Ae&&Ae(!0)}if(a(Ze,"_addPlugin"),ve){var vt=[ve.plugin],Nt={reason:2,isAsync:!!Ee};Ke(vt,Nt,function(Gt){Gt?(We.removed=vt,We.reason|=32,Ze(!0)):Ae&&Ae(!1)})}else Ze(!1)},L.updateCfg=function(Y,ee){ee===void 0&&(ee=!0);var Ee;if(L[xE]()){Ee={reason:1,cfg:e.cfg,oldCfg:eee({},e.cfg),newConfig:eee({},Y),merge:ee},Y=Ee.newConfig;var Ae=e.cfg;Y[uG]=Ae[uG],Y[lG]=Ae[lG]}e._block(function(ve){var We=ve.cfg;NEt(ve,We,Y,ee),ee||Dr(We,function(Ze){cm(Y,Ze)||ve.set(We,Ze,u1)}),ve.setDf(We,kEt)},!0),e.notify(),Ee&&xe(Ee)},L.evtNamespace=function(){return E},L.flush=le,L.getTraceCtx=function(Y){return I||(I=K2r()),I},L.setTraceCtx=function(Y){I=Y||null},L.addUnloadHook=Ne,fG(L,"addUnloadCb",function(){return _},"add"),L.onCfgChange=function(Y){var ee;return r?ee=Kb(e.cfg,Y,L[ql]):ee=eNi(R,Y),nNi(ee)},L.getWParam=function(){return J5()||e.cfg.enableWParam?0:-1};function J(){var Y={};P=[];var ee=a(function(Ee){Ee&&dt(Ee,function(Ae){if(Ae[J2]&&Ae[cMe]&&!Y[Ae.identifier]){var ve=Ae[J2]+"="+Ae[cMe];P[ai](ve),Y[Ae.identifier]=Ae}})},"_addPluginVersions");ee(m),h&&dt(h,function(Ee){ee(Ee)}),ee(p)}a(J,"_setPluginVersions");function Te(){r=!1,e=e0({},kEt,L[ql]),e.cfg[lMe]=1,pi(L,"config",{g:a(function(){return e.cfg},"g"),s:a(function(ee){L.updateCfg(ee,!1)},"s")}),pi(L,"pluginVersionStringArr",{g:a(function(){return P||J(),P},"g")}),pi(L,"pluginVersionString",{g:a(function(){return k||(P||J(),k=P.join(";")),k||Ki},"g")}),pi(L,"logger",{g:a(function(){return n||(n=new yee(e.cfg),e[ql]=n),n},"g"),s:a(function(ee){e[ql]=ee,n!==ee&&(sM(n,!1),n=ee)},"s")}),L[ql]=new yee(e.cfg),w=[];var Y=L.config[uG]||[];Y.splice(0,Y[Vr]),Zf(Y,w),A=new ePr,o=[],sM(s,!1),s=null,c=null,l=null,sM(u,!1),u=null,d=null,p=[],h=null,m=null,g=!1,y=null,E=d1("AIBaseCore",!0),_=KMe(),I=null,x=null,v=ZMe(),R=[],k=null,P=null,U=!1,N=null,F=!1,Q=0,M=null,D=null,G=!1,O=null}a(Te,"_initDefaults");function fe(){var Y=cx(Ue(),e.cfg,L);return Y[ghe](ce),Y}a(fe,"_createTelCtx");function De(Y){var ee=Zki(L[ql],I2r,p);d=null,k=null,P=null,m=(h||[])[0]||[],m=YMe(Zf(m,ee[lG]));var Ee=Zf(YMe(ee[Id]),m);w=Xf(Ee);var Ae=L.config[uG]||[];Ae.splice(0,Ae[Vr]),Zf(Ae,w);var ve=fe();m&&m[Vr]>0&&wEt(ve[X2](m),Ee),wEt(ve,Ee),Y&&xe(Y)}a(De,"_initPluginChain");function Ve(Y){var ee=null,Ee=null,Ae=[];return dt(w,function(ve){if(ve[J2]===Y&&ve!==A)return Ee=ve,-1;ve.getChannel&&Ae[ai](ve)}),!Ee&&Ae[Vr]>0&&dt(Ae,function(ve){if(Ee=ve.getChannel(Y),!Ee)return-1}),Ee&&(ee={plugin:Ee,setEnabled:a(function(ve){cM(Ee)[xhe]=!ve},"setEnabled"),isEnabled:a(function(){var ve=cM(Ee);return!ve[o1]&&!ve[xhe]},"isEnabled"),remove:a(function(ve,We){ve===void 0&&(ve=!0);var Ze=[Ee],vt={reason:1,isAsync:ve};Ke(Ze,vt,function(Nt){Nt&&De({reason:32,removed:Ze}),We&&We(Nt)})},"remove")}),ee}a(Ve,"_getPlugin");function Ue(){if(!d){var Y=(w||[]).slice();uo(Y,A)===-1&&Y[ai](A),d=KL(YMe(Y),e.cfg,L)}return d}a(Ue,"_getPluginChain");function Ke(Y,ee,Ee){if(Y&&Y[Vr]>0){var Ae=KL(Y,e.cfg,L),ve=Cee(Ae,L);ve[ghe](function(){var We=!1,Ze=[];dt(p,function(Nt,Gt){rPr(Nt,Y)?We=!0:Ze[ai](Nt)}),p=Ze,k=null,P=null;var vt=[];h&&(dt(h,function(Nt,Gt){var Qt=[];dt(Nt,function(ue){rPr(ue,Y)?We=!0:Qt[ai](ue)}),vt[ai](Qt)}),h=vt),Ee&&Ee(We),ce()}),ve[ap](ee)}else Ee(!1)}a(Ke,"_removePlugins");function X(){if(n&&n.queue){var Y=n.queue.slice(0);n.queue[Vr]=0,dt(Y,function(ee){var Ee={name:y||"InternalMessageId: "+ee[oee],iKey:x,time:$L(new Date),baseType:Qhe.dataType,baseData:{message:ee[Z2]}};L.track(Ee)})}}a(X,"_flushInternalLogs");function le(Y,ee,Ee,Ae){var ve=1,We=!1,Ze=null;Ae=Ae||5e3;function vt(){ve--,We&&ve===0&&(Ze&&Ze[K2](),Ze=null,ee&&ee(We),ee=null)}if(a(vt,"doCallback"),m&&m[Vr]>0){var Nt=fe()[X2](m);Nt.iterate(function(Gt){if(Gt.flush){ve++;var Qt=!1;Gt.flush(Y,function(){Qt=!0,vt()},Ee)||Qt||(Y&&Ze==null?Ze=df(function(){Ze=null,vt()},Ae):vt())}})}return We=!0,vt(),!0}a(le,"_flushChannels");function te(){var Y;Ne(e[Y2](function(ee){var Ee=ee.cfg.enablePerfMgr;if(Ee){var Ae=ee.cfg[SMe];(Y!==Ae||!Y)&&(Ae||(Ae=Xki),Kyt(ee.cfg,SMe,Ae),Y=Ae,l=null),!c&&!l&&Er(Ae)&&(l=Ae(L,L[mhe]()))}else l=null,Y=null}))}a(te,"_initPerfManager");function xe(Y){var ee=Hhe(Ue(),L);ee[ghe](ce),(!L._updateHook||L._updateHook(ee,Y)!==!0)&&ee[ap](Y)}a(xe,"_doUpdate");function Z(Y){var ee=L[ql];ee?(Rr(ee,2,73,Y),ce()):ec(Y)}a(Z,"_logOrThrowError");function ae(Y){var ee=L[mhe]();ee&&ee[HL]([Y],2)}a(ae,"_notifyInvalidEvent");function Ne(Y){v.add(Y)}a(Ne,"_addUnloadHook")})}return a(t,"AppInsightsCore"),t.__ieDyn=1,t})();f();function $he(t,e){try{if(t&&t!==""){var r=VA().parse(t);if(r&&r[xyt]&&r[xyt]>=r.itemsAccepted&&r.itemsReceived-r.itemsAccepted===r.errors[Vr])return r}}catch(n){Rr(e,1,43,"Cannot parse the response. "+(n[i1]||Xt(n)),{response:t})}return null}a($he,"parseResponse");f();var lx="",iNi="NoResponseBody",oPr="&"+iNi+"=true",MEt="POST",OEt=(function(){function t(){var e=0,r,n,o,s,c,l,u,d,p,h,m,g,A,y;Jn(t,this,function(E,_){var v=!0;G(),E[tM]=function(O,N){o=N,n&&Rr(o,1,28,"Sender is already initialized"),E.SetConfig(O),n=!0},E._getDbgPlgTargets=function(){return[n,s,l,r]},E.SetConfig=function(O){try{if(c=O.senderOnCompleteCallBack||{},l=!!O.disableCredentials,u=O.fetchCredentials,s=!!O.isOneDs,r=!!O.enableSendPromise,p=!!O.disableXhr,h=!!O.disableBeacon,m=!!O.disableBeaconSync,y=O.timeWrapper,A=!!O.addNoResponse,g=!!O.disableFetchKeepAlive,d={sendPOST:Q},s||(v=!1),l){var N=khe();N&&N.protocol&&N.protocol[ix]()==="file:"&&(v=!1)}return!0}catch{}return!1},E.getSyncFetchPayload=function(){return e},E.getSenderInst=function(O,N){return O&&O[Vr]?R(O,N):null},E.getFallbackInst=function(){return d},E[QL]=function(O,N){G()},E.preparePayload=function(O,N,F,U){if(!N||U||!F[a1]){O(F);return}try{var L=ri("CompressionStream");if(!Er(L)){O(F);return}var H=new ReadableStream({start:a(function(Te){Te.enqueue(Vn(F[a1])?new TextEncoder().encode(F[a1]):F[a1]),Te.close()},"start")}),$=H.pipeThrough(new L("gzip")),W=$.getReader(),j=[],ce=0,J=!1;return Ec(W.read(),a(function Te(fe){if(!J&&!fe.rejected){var De=fe[rM];if(!De.done)return j[ai](De[rM]),ce+=De.value[Vr],Ec(W.read(),Te);for(var Ve=new Uint8Array(ce),Ue=0,Ke=0,X=j;Ke0&&(dt(Ul(Ve),function(te){J.append(te,Ve[te])}),Ue[_he]=J),u?Ue.credentials=u:v&&s&&(Ue.credentials="include"),F&&(Ue.keepalive=!0,e+=Te,s?O._sendReason===2&&(fe=!0,A&&(L+=oPr)):fe=!0);var Ke=new Request(L,Ue);try{Ke[pEt]=!0}catch{}if(!F&&r&&(W=vu(function(te,xe){j=te,ce=xe})),!L){x(N),j&&j(!1);return}function X(te,xe){xe?w(N,s?0:xe,{},s?lx:te):w(N,s?0:400,{},s?lx:te)}a(X,"_handleError");function le(te,xe,Z){var ae=te[sx],Ne=c.fetchOnComplete;Ne&&Er(Ne)?Ne(te,N,Z||lx,xe):w(N,ae,{},Z||lx)}a(le,"_onFetchComplete");try{Ec(fetch(s?L:Ke,s?Ue:null),function(te){if(F&&(e-=Te,Te=0),!De)if(De=!0,te.rejected)X(te.reason&&te.reason[Z2],499),ce&&ce(te.reason);else{var xe=te[rM];try{!s&&!xe.ok?(xe[sx]?X(xe.statusText,xe[sx]):X(xe.statusText,499),j&&j(!1)):s&&!xe.body?(le(xe,null,lx),j&&j(!0)):Ec(xe.text(),function(Z){le(xe,O,Z[rM]),j&&j(!0)})}catch(Z){xe&&xe[sx]?X(Xt(Z),xe[sx]):X(Xt(Z),499),ce&&ce(Z)}}})}catch(te){De||(X(Xt(te),499),ce&&ce(te))}return fe&&!De&&(De=!0,w(N,200,{}),j&&j(!0)),s&&!De&&O[sG]>0&&y&&y.set(function(){De||(De=!0,w(N,500,{}),j&&j(!0))},O[sG]),W}a(M,"_doFetchSender");function D(O,N,F){var U=Xu(),L=new XDomainRequest,H=O[a1];L.onload=function(){var J=fee(L),Te=c&&c.xdrOnComplete;Te&&Er(Te)?Te(L,N,O):w(N,200,{},J)},L.onerror=function(){w(N,400,{},s?lx:Rhe(L))},L.ontimeout=function(){w(N,500,{})},L.onprogress=function(){};var $=U&&U.location&&U.location.protocol||"",W=O[see];if(!W){x(N);return}if(!s&&W.lastIndexOf($,0)!==0){var j="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Rr(o,2,40,". "+j),I(j,N);return}var ce=s?W:W[ox](/^(https?:)/,"");L.open(MEt,ce),O[sG]&&(L[sG]=O[sG]),L.send(H),s&&F?y&&y.set(function(){L.send(H)},0):L.send(H)}a(D,"_xdrSender");function G(){e=0,n=!1,r=!1,o=null,s=null,c=null,l=null,u=null,d=null,p=!1,h=!1,m=!1,g=!1,A=!1,y=null}a(G,"_initDefaults")})}return a(t,"SenderPostManager"),t.__ieDyn=1,t})();f();var fPr="on",sPr="attachEvent",aPr="addEventListener",cPr="detachEvent",lPr="removeEventListener",BEt="events";var f0c=d1("aiEvtPageHide"),p0c=d1("aiEvtPageShow"),oNi=/\.[\.]+/g,sNi=/[\.]+$/,aNi=1,eOe=BMe("events"),cNi=/^([^.]*)(?:\.(.+)|)/;function uPr(t){return t&&t[ox]?t[ox](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Ki):t}a(uPr,"_normalizeNamespace");function LEt(t,e){if(e){var r=Ki;Jt(e)?(r=Ki,dt(e,function(o){o=uPr(o),o&&(o[0]!=="."&&(o="."+o),r+=o)})):r=uPr(e),r&&(r[0]!=="."&&(r="."+r),t=(t||Ki)+r)}var n=cNi.exec(t||Ki)||[];return{type:n[1],ns:(n[2]||Ki).replace(oNi,".").replace(sNi,Ki)[Wb](".").sort().join(".")}}a(LEt,"_getEvtNamespace");function pPr(t,e,r){r===void 0&&(r=!0);var n=eOe.get(t,BEt,{},r),o=n[e];return o||(o=n[e]=[]),o}a(pPr,"_getRegisteredEvents");function hPr(t,e,r,n){t&&e&&e[nM]&&(t[lPr]?t[lPr](e[nM],r,n):t[cPr]&&t[cPr](fPr+e[nM],r))}a(hPr,"_doDetach");function lNi(t,e,r,n){var o=!1;return t&&e&&e[nM]&&r&&(t[aPr]?(t[aPr](e[nM],r,n),o=!0):t[sPr]&&(t[sPr](fPr+e[nM],r),o=!0)),o}a(lNi,"_doAttach");function dPr(t,e,r,n){for(var o=e[Vr];o--;){var s=e[o];s&&(!r.ns||r.ns===s[Syt].ns)&&(!n||n(s))&&(hPr(t,s[Syt],s.handler,s.capture),e[$b](o,1))}}a(dPr,"_doUnregister");function uNi(t,e,r){if(e[nM])dPr(t,pPr(t,e[nM]),e,r);else{var n=eOe.get(t,BEt,{});Dr(n,function(o,s){dPr(t,s,e,r)}),Ul(n)[Vr]===0&&eOe.kill(t,BEt)}}a(uNi,"_unregisterEvents");function Vhe(t,e){var r;return e?(Jt(e)?r=[t].concat(e):r=[t,e],r=LEt("xx",r).ns[Wb](".")):r=t,r}a(Vhe,"mergeEvtNamespace");function tOe(t,e,r,n,o){o===void 0&&(o=!1);var s=!1;if(t)try{var c=LEt(e,n);if(s=lNi(t,c,r,o),s&&eOe.accept(t)){var l={guid:aNi++,evtName:c,handler:r,capture:o};pPr(t,c.type)[ai](l)}}catch{}return s}a(tOe,"eventOn");function FEt(t,e,r,n,o){if(o===void 0&&(o=!1),t)try{var s=LEt(e,n),c=!1;uNi(t,s,function(l){return s.ns&&!r||l.handler===r?(c=!0,!0):!1}),c||hPr(t,s,r,o)}catch{}}a(FEt,"eventOff");f();var Whe="sampleRate",zhe="ProcessLegacy",rOe="http.method",AG="https://dc.services.visualstudio.com",iP="/v2/track",wg="not_specified";f();var nOe=byt({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]});f();f();var yG="split",qi="length",EG="toLowerCase",ZL="ingestionendpoint",e8="toString",UEt="removeItem",_ee="message",_Pr="count";var Yhe="stringify",Khe="pathname",CG="match";var Rg="name";var lm="properties",Pg="measurements",Jhe="sizeInBytes",Xhe="typeName",vee="exceptions",_G="severityLevel",iOe="problemGroup",vG="parsedStack",Zhe="hasFullStack",eme="assembly",oP="fileName",bG="line",bee="aiDataContract",TG="duration";function QEt(t,e,r){var n=e[qi],o=vPr(t,e);if(o[qi]!==n){for(var s=0,c=o;r[c]!==void 0;)s++,c=Sd(o,0,147)+bPr(s);o=c}return o}a(QEt,"dataSanitizeKeyAndAddUniqueness");function vPr(t,e){var r;return e&&(e=ni(Ll(e)),e[qi]>150&&(r=Sd(e,0,150),Rr(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),r||e}a(vPr,"dataSanitizeKey");function il(t,e,r){r===void 0&&(r=1024);var n;return e&&(r=r||1024,e=ni(Ll(e)),e[qi]>r&&(n=Sd(e,0,r),Rr(t,2,61,"string value is too long. It has been truncated to "+r+" characters.",{value:e},!0))),n||e}a(il,"dataSanitizeString");function SG(t,e,r){return Vn(e)&&(e=uEt(e,r)),HEt(t,e,2048,66)}a(SG,"dataSanitizeUrl");function tme(t,e){var r;return e&&e[qi]>32768&&(r=Sd(e,0,32768),Rr(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),r||e}a(tme,"dataSanitizeMessage");function qEt(t,e){var r;if(e){var n=""+e;n[qi]>32768&&(r=Sd(n,0,32768),Rr(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return r||e}a(qEt,"dataSanitizeException");function WA(t,e){if(e){var r={};Dr(e,function(n,o){if(Fl(o)&&VL())try{o=VA()[Yhe](o)}catch(s){Rr(t,2,49,"custom property is not valid",{exception:s},!0)}o=il(t,o,8192),n=QEt(t,n,r),r[n]=o}),e=r}return e}a(WA,"dataSanitizeProperties");function zA(t,e){if(e){var r={};Dr(e,function(n,o){n=QEt(t,n,r),r[n]=o}),e=r}return e}a(zA,"dataSanitizeMeasurements");function GEt(t,e){return e&&HEt(t,e,128,69)[e8]()}a(GEt,"dataSanitizeId");function HEt(t,e,r,n){var o;return e&&(e=ni(Ll(e)),e[qi]>r&&(o=Sd(e,0,r),Rr(t,2,n,"input is too long, it has been truncated to "+r+" characters.",{data:e},!0))),o||e}a(HEt,"dataSanitizeInput");function bPr(t){var e="00"+t;return tMe(e,e[qi]-3)}a(bPr,"dsPadNumber");f();var TPr=Ju()||{},SPr=0,fNi=[null,null,null,null,null];function IPr(t){var e=SPr,r=fNi,n=r[e];return TPr.createElement?r[e]||(n=r[e]=TPr.createElement("a")):n={host:pNi(t,!0)},n.href=t,e++,e>=r[qi]&&(e=0),SPr=e,n}a(IPr,"urlParseUrl");function pNi(t,e){var r=xPr(t,e)||"";if(r){var n=r[CG](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[qi]>3&&Vn(n[2])&&n[2][qi]>0)return n[2]+(n[3]||"")}return r}a(pNi,"urlParseHost");function xPr(t,e){var r=null;if(t){var n=t[CG](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[qi]>2&&Vn(n[2])&&n[2][qi]>0&&(r=n[2]||"",e&&n[qi]>2)){var o=(n[1]||"")[EG](),s=n[3]||"";(o==="http"&&s===":80"||o==="https"&&s===":443")&&(s=""),r+=s}}return r}a(xPr,"urlParseFullHost");var hNi=[AG+iP,"https://breeze.aimon.applicationinsights.io"+iP,"https://dc-int.services.visualstudio.com"+iP];function oOe(t){return uo(hNi,t[EG]())!==-1}a(oOe,"isInternalApplicationInsightsEndpoint");function wPr(t,e,r,n){var o,s=n,c=n;if(e&&e[qi]>0){var l=IPr(e);if(o=l.host,!s)if(l[Khe]!=null){var u=l.pathname[qi]===0?"/":l[Khe];u.charAt(0)!=="/"&&(u="/"+u),c=l[Khe],s=il(t,r?r+" "+u:u)}else s=il(t,e)}else o=n,s=n;return{target:o,name:s,data:c}}a(wPr,"AjaxHelperParseDependencyPath");f();f();var sOe=hhe({LocalStorage:0,SessionStorage:1});var Tee=void 0,RPr="";function PPr(t){try{if(Ht(Ig()))return null;var e=new Date()[e8](),r=ri(t===sOe.LocalStorage?"localStorage":"sessionStorage"),n=RPr+e;r.setItem(n,e);var o=r.getItem(n)!==e;if(r[UEt](n),!o)return r}catch{}return null}a(PPr,"_getVerifiedStorageObject");function jEt(){return aOe()?PPr(sOe.SessionStorage):null}a(jEt,"_getSessionStorageObject");function $Et(t){RPr=t||""}a($Et,"utlSetStoragePrefix");function aOe(t){return(t||Tee===void 0)&&(Tee=!!PPr(sOe.SessionStorage)),Tee}a(aOe,"utlCanUseSessionStorage");function VEt(t,e){var r=jEt();if(r!==null)try{return r.getItem(e)}catch(n){Tee=!1,Rr(t,2,2,"Browser failed read of session storage. "+ff(n),{exception:Xt(n)})}return null}a(VEt,"utlGetSessionStorage");function WEt(t,e,r){var n=jEt();if(n!==null)try{return n.setItem(e,r),!0}catch(o){Tee=!1,Rr(t,2,4,"Browser failed write to session storage. "+ff(o),{exception:Xt(o)})}return!1}a(WEt,"utlSetSessionStorage");function zEt(t,e){var r=jEt();if(r!==null)try{return r[UEt](e),!0}catch(n){Tee=!1,Rr(t,2,6,"Browser failed removal of session storage item. "+ff(n),{exception:Xt(n)})}return!1}a(zEt,"utlRemoveSessionStorage");f();var mNi=";",gNi="=";function rme(t){if(!t)return{};var e=t[yG](mNi),r=uhe(e,function(o,s){var c=s[yG](gNi);if(c[qi]===2){var l=c[0][EG](),u=c[1];o[l]=u}return o},{});if(Ul(r)[qi]>0){if(r.endpointsuffix){var n=r.location?r.location+".":"";r[ZL]=r[ZL]||"https://"+n+"dc."+r.endpointsuffix}r[ZL]=r[ZL]||AG,Z5(r[ZL],"/")&&(r[ZL]=r[ZL].slice(0,-1))}return r}a(rme,"parseConnectionString");f();var YEt=(function(){function t(e,r,n){var o=this,s=this;s.ver=1,s.sampleRate=100,s.tags={},s[Rg]=il(e,n)||wg,s.data=r,s.time=$L(new Date),s[bee]={time:1,iKey:1,name:1,sampleRate:a(function(){return o.sampleRate===100?4:1},"sampleRate"),tags:1,data:1}}return a(t,"Envelope"),t})();f();var lM=(function(){function t(e,r,n,o){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var s=this;s.ver=2,s[Rg]=il(e,r)||wg,s[lm]=WA(e,n),s[Pg]=zA(e,o)}return a(t,"Event"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})();f();var ANi=58,yNi=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,ENi=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,CNi=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,_Ni=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,vNi=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,bNi=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,TNi=/([^\(\s\n]+):([0-9]+)$/,kPr="",See="error",Xb="stack",JEt="stackDetails",NPr="errorSrc",XEt="message",BPr="description",DPr=[{re:ENi,len:5,m:1,fn:2,ln:3,col:4},{chk:INi,pre:SNi,re:CNi,len:4,m:1,fn:2,ln:3},{re:_Ni,len:3,m:1,fn:2,hdl:OPr},{re:vNi,len:2,fn:1,hdl:OPr}];function SNi(t){return t.replace(/(\(anonymous\))/,"")}a(SNi,"_scrubAnonymous");function INi(t){return nl(t,"[native")<0}a(INi,"_ignoreNative");function ZEt(t,e){var r=t;return r&&!Vn(r)&&(JSON&&JSON[Yhe]?(r=JSON[Yhe](t),e&&(!r||r==="{}")&&(Er(t[e8])?r=t[e8]():r=""+t)):r=""+t+" - (Missing JSON.stringify)"),r||""}a(ZEt,"_stringify");function LPr(t,e){var r=t;return t&&(r&&!Vn(r)&&(r=t[XEt]||t[BPr]||r),r&&!Vn(r)&&(r=ZEt(r,!0)),t.filename&&(r=r+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&nl(r||"",e)===-1&&(r=e+": "+r),r||""}a(LPr,"_formatMessage");function xNi(t){try{if(Fl(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}a(xNi,"_isExceptionDetailsInternal");function wNi(t){try{if(Fl(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}a(wNi,"_isExceptionInternal");function MPr(t){return t&&t.src&&Vn(t.src)&&t.obj&&Jt(t.obj)}a(MPr,"_isStackDetails");function IG(t){var e=t||"";Vn(e)||(Vn(e[Xb])?e=e[Xb]:e=""+e);var r=e[yG](` -`);return{src:e,obj:r}}a(IG,"_convertStackObj");function RNi(t){for(var e=[],r=t[yG](` -`),n=0;n0){e=[];var n=0,o=!1,s=0;dt(r,function(y){if(o||ONi(y)){var E=Ll(y);o=!0;var _=BNi(E,n);_&&(s+=_[Jhe],e.push(_),n++)}});var c=32*1024;if(s>c)for(var l=0,u=e[qi]-1,d=0,p=l,h=u;lc){var A=h-p+1;e.splice(p,A);break}p=l,h=u,l++,u--}}return e}a(kNi,"_parseStack");function cOe(t){var e="";if(t&&(e=t.typeName||t[Rg]||"",!e))try{var r=/function (.{1,200})\(/,n=r.exec(t.constructor[e8]());e=n&&n[qi]>1?n[1]:""}catch{}return e}a(cOe,"_getErrorType");function KEt(t){if(t)try{if(!Vn(t)){var e=cOe(t),r=ZEt(t,!1);return(!r||r==="{}")&&(t[See]&&(t=t[See],e=cOe(t)),r=ZEt(t,!0)),nl(r,e)!==0&&e!=="String"?e+":"+r:r}}catch{}return""+(t||"")}a(KEt,"_formatErrorCode");var xG=(function(){function t(e,r,n,o,s,c){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var l=this;l.ver=2,wNi(r)?(l[vee]=r[vee]||[],l[lm]=r[lm],l[Pg]=r[Pg],r[_G]&&(l[_G]=r[_G]),r.id&&(l.id=r.id,r[lm].id=r.id),r[iOe]&&(l[iOe]=r[iOe]),Ht(r.isManual)||(l.isManual=r.isManual)):(n||(n={}),c&&(n.id=c),l[vee]=[UPr(e,r,n)],l[lm]=WA(e,n),l[Pg]=zA(e,o),s&&(l[_G]=s),c&&(l.id=c))}return a(t,"Exception"),t.CreateAutoException=function(e,r,n,o,s,c,l,u){var d=cOe(s||c||e);return{message:LPr(e,d),url:r,lineNumber:n,columnNumber:o,error:KEt(s||c||e),evt:KEt(c||e),typeName:d,stackDetails:FPr(l||s||c),errorSrc:u}},t.CreateFromInterface=function(e,r,n,o){var s=r[vee]&&X5(r[vee],function(l){return MNi(e,l)}),c=new t(e,Yb(Yb({},r),{exceptions:s}),n,o);return c},t.prototype.toInterface=function(){var e=this,r=e.exceptions,n=e.properties,o=e.measurements,s=e.severityLevel,c=e.problemGroup,l=e.id,u=e.isManual,d=r instanceof Array&&X5(r,function(p){return p.toInterface()})||void 0;return{ver:"4.0",exceptions:d,severityLevel:s,properties:n,measurements:o,problemGroup:c,id:l,isManual:u}},t.CreateSimpleException=function(e,r,n,o,s,c){var l;return{exceptions:[(l={},l[Zhe]=!0,l.message=e,l.stack=s,l.typeName=r,l)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=KEt,t})();var NNi=Xf({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function DNi(){var t=this,e=Jt(t[vG])&&X5(t[vG],function(n){return FNi(n)}),r={id:t.id,outerId:t.outerId,typeName:t[Xhe],message:t[_ee],hasFullStack:t[Zhe],stack:t[Xb],parsedStack:e||void 0};return r}a(DNi,"_toInterface");function UPr(t,e,r){var n,o,s,c,l,u,d,p;if(xNi(e))c=e[Xhe],l=e[_ee],d=e[Xb],p=e[vG]||[],u=e[Zhe];else{var h=e,m=h&&h.evt;Y5(h)||(h=h[See]||m||h),c=il(t,cOe(h))||wg,l=tme(t,LPr(e||h,c))||wg;var g=e[JEt]||FPr(e);p=kNi(g),Jt(p)&&X5(p,function(A){A[eme]=il(t,A[eme]),A[oP]=il(t,A[oP])}),d=qEt(t,PNi(g)),u=Jt(p)&&p[qi]>0,r&&(r[Xhe]=r[Xhe]||c)}return n={},n[bee]=NNi,n.id=o,n.outerId=s,n.typeName=c,n.message=l,n[Zhe]=u,n.stack=d,n.parsedStack=p,n.toInterface=DNi,n}a(UPr,"_createExceptionDetails");function MNi(t,e){var r=Jt(e[vG])&&X5(e[vG],function(o){return LNi(o)})||e[vG],n=UPr(t,Yb(Yb({},e),{parsedStack:r}));return n}a(MNi,"_createExDetailsFromInterface");function QPr(t,e){var r=e[CG](bNi);if(r&&r[qi]>=4)t[oP]=r[1],t[bG]=parseInt(r[2]);else{var n=e[CG](TNi);n&&n[qi]>=3?(t[oP]=n[1],t[bG]=parseInt(n[2])):t[oP]=e}}a(QPr,"_parseFilename");function OPr(t,e,r){var n=t[oP];e.fn&&r&&r[qi]>e.fn&&(e.ln&&r[qi]>e.ln?(n=ni(r[e.fn]||""),t[bG]=parseInt(ni(r[e.ln]||""))||0):n=ni(r[e.fn]||"")),n&&QPr(t,n)}a(OPr,"_handleFilename");function ONi(t){var e=!1;if(t&&Vn(t)){var r=ni(t);r&&(e=yNi.test(r))}return e}a(ONi,"_isStackFrame");var qPr=Xf({level:1,method:1,assembly:0,fileName:0,line:0});function BNi(t,e){var r,n;if(t&&Vn(t)&&ni(t)){n=(r={},r[bee]=qPr,r.level=e,r.assembly=ni(t),r.method=kPr,r.fileName="",r.line=0,r.sizeInBytes=0,r);for(var o=0;o=s.len){s.m&&(n.method=ni(c[s.m]||kPr)),s.hdl?s.hdl(n,s,c):s.fn&&(s.ln?(n[oP]=ni(c[s.fn]||""),n[bG]=parseInt(ni(c[s.ln]||""))||0):QPr(n,c[s.fn]||""));break}o++}}return GPr(n)}a(BNi,"_extractStackFrame");function LNi(t){var e,r=(e={},e[bee]=qPr,e.level=t.level,e.method=t.method,e.assembly=t[eme],e.fileName=t[oP],e.line=t[bG],e.sizeInBytes=0,e);return GPr(r)}a(LNi,"_stackFrameFromInterface");function GPr(t){var e=ANi;return t&&(e+=t.method[qi],e+=t.assembly[qi],e+=t.fileName[qi],e+=t.level.toString()[qi],e+=t.line.toString()[qi],t[Jhe]=e),t}a(GPr,"_populateFrameSizeInBytes");function FNi(t){return{level:t.level,method:t.method,assembly:t[eme],fileName:t[oP],line:t[bG]}}a(FNi,"_parsedFrameToInterface");f();f();var HPr=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return a(t,"DataPoint"),t})();var uM=(function(){function t(e,r,n,o,s,c,l,u,d){this.aiDataContract={ver:1,metrics:1,properties:0};var p=this;p.ver=2;var h=new HPr;h[_Pr]=o>0?o:void 0,h.max=isNaN(c)||c===null?void 0:c,h.min=isNaN(s)||s===null?void 0:s,h[Rg]=il(e,r)||wg,h.value=n,h.stdDev=isNaN(l)||l===null?void 0:l,p.metrics=[h],p[lm]=WA(e,u),p[Pg]=zA(e,d)}return a(t,"Metric"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})();f();f();var nme="";function lOe(t){(isNaN(t)||t<0)&&(t=0),t=HRr(t);var e=nme+t%1e3,r=nme+n1(t/1e3)%60,n=nme+n1(t/(1e3*60))%60,o=nme+n1(t/(1e3*60*60))%24,s=n1(t/(1e3*60*60*24));return e=e[qi]===1?"00"+e:e[qi]===2?"0"+e:e,r=r[qi]<2?"0"+r:r,n=n[qi]<2?"0"+n:n,o=o[qi]<2?"0"+o:o,(s>0?s+".":nme)+o+":"+n+":"+r+"."+e}a(lOe,"msToTimeSpan");var wG=(function(){function t(e,r,n,o,s,c,l){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var u=this;u.ver=2,u.id=GEt(e,l),u.url=SG(e,n),u[Rg]=il(e,r)||wg,isNaN(o)||(u[TG]=lOe(o)),u[lm]=WA(e,s),u[Pg]=zA(e,c)}return a(t,"PageView"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})();f();var RG=(function(){function t(e,r,n,o,s,c,l,u,d,p,h,m){d===void 0&&(d="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var g=this;g.ver=2,g.id=r,g[TG]=lOe(s),g.success=c,g.resultCode=l+"",g.type=il(e,d);var A=wPr(e,n,u,o);g.data=SG(e,o)||A.data,g.target=il(e,A.target),p&&(g.target="".concat(g.target," | ").concat(p)),g[Rg]=il(e,A[Rg]),g[lm]=WA(e,h),g[Pg]=zA(e,m)}return a(t,"RemoteDependencyData"),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})();f();var PG=(function(){function t(e,r,n,o,s){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var c=this;c.ver=2,r=r||wg,c[_ee]=tme(e,r),c[lm]=WA(e,o),c[Pg]=zA(e,s),n&&(c[_G]=n)}return a(t,"Trace"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})();f();var kG=(function(){function t(e,r,n,o,s,c,l){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var u=this;u.ver=2,u.url=SG(e,n),u[Rg]=il(e,r)||wg,u[lm]=WA(e,s),u[Pg]=zA(e,c),l&&(u.domProcessing=l.domProcessing,u[TG]=l[TG],u.networkConnect=l.networkConnect,u.perfTotal=l.perfTotal,u.receivedResponse=l.receivedResponse,u.sentRequest=l.sentRequest)}return a(t,"PageViewPerformance"),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})();f();var dM=(function(){function t(e,r){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=r}return a(t,"Data"),t})();f();function r8(t){var e="ai."+t+".";return function(r){return e+r}}a(r8,"_aiNameFunc");var ime=r8("application"),lp=r8("device"),uOe=r8("location"),Iee=r8("operation"),eCt=r8("session"),t8=r8("user"),NG=r8("cloud"),ome=r8("internal"),sme=(function(t){xg(e,t);function e(){return t.call(this)||this}return a(e,"ContextTagKeys"),e})(Jyt({applicationVersion:ime("ver"),applicationBuild:ime("build"),applicationTypeId:ime("typeId"),applicationId:ime("applicationId"),applicationLayer:ime("layer"),deviceId:lp("id"),deviceIp:lp("ip"),deviceLanguage:lp("language"),deviceLocale:lp("locale"),deviceModel:lp("model"),deviceFriendlyName:lp("friendlyName"),deviceNetwork:lp("network"),deviceNetworkName:lp("networkName"),deviceOEMName:lp("oemName"),deviceOS:lp("os"),deviceOSVersion:lp("osVersion"),deviceRoleInstance:lp("roleInstance"),deviceRoleName:lp("roleName"),deviceScreenResolution:lp("screenResolution"),deviceType:lp("type"),deviceMachineName:lp("machineName"),deviceVMName:lp("vmName"),deviceBrowser:lp("browser"),deviceBrowserVersion:lp("browserVersion"),locationIp:uOe("ip"),locationCountry:uOe("country"),locationProvince:uOe("province"),locationCity:uOe("city"),operationId:Iee("id"),operationName:Iee("name"),operationParentId:Iee("parentId"),operationRootId:Iee("rootId"),operationSyntheticSource:Iee("syntheticSource"),operationCorrelationVector:Iee("correlationVector"),sessionId:eCt("id"),sessionIsFirst:eCt("isFirst"),sessionIsNew:eCt("isNew"),userAccountAcquisitionDate:t8("accountAcquisitionDate"),userAccountId:t8("accountId"),userAgent:t8("userAgent"),userId:t8("id"),userStoreRegion:t8("storeRegion"),userAuthUserId:t8("authUserId"),userAnonymousUserAcquisitionDate:t8("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:t8("authUserAcquisitionDate"),cloudName:NG("name"),cloudRole:NG("role"),cloudRoleVer:NG("roleVer"),cloudRoleInstance:NG("roleInstance"),cloudEnvironment:NG("environment"),cloudLocation:NG("location"),cloudDeploymentUnit:NG("deploymentUnit"),internalNodeName:ome("nodeName"),internalSdkVersion:ome("sdkVersion"),internalAgentVersion:ome("agentVersion"),internalSnippet:ome("snippet"),internalSdkSrc:ome("sdkSrc")}));f();var t0=new sme;f();function jPr(t,e){FEt(t,null,null,e)}a(jPr,"_disableEvents");function tCt(t){var e=Ju(),r=Ql(),n=!1,o=[],s=1;r&&!Ht(r.onLine)&&!r.onLine&&(s=2);var c=0,l=m(),u=Vhe(d1("OfflineListener"),t);try{if(p(Xu())&&(n=!0),e){var d=e.body||e;d.ononline&&p(d)&&(n=!0)}}catch{n=!1}function p(b){var I=!1;return b&&(I=tOe(b,"online",y,u),I&&tOe(b,"offline",E,u)),I}a(p,"_enableEvents");function h(){return l}a(h,"_isOnline");function m(){return!(c===2||s===2)}a(m,"calCurrentState");function g(){var b=m();l!==b&&(l=b,dt(o,function(I){var x={isOnline:l,rState:s,uState:c};try{I(x)}catch{}}))}a(g,"listnerNoticeCheck");function A(b){c=b,g()}a(A,"setOnlineState");function y(){s=1,g()}a(y,"_setOnline");function E(){s=2,g()}a(E,"_setOffline");function _(){var b=Xu();if(b&&n){if(jPr(b,u),e){var I=e.body||e;ln(I.ononline)||jPr(I,u)}n=!1}}a(_,"_unload");function v(b){return o.push(b),{rm:a(function(){var I=o.indexOf(b);if(I>-1)return o.splice(I,1)},"rm")}}return a(v,"addListener"),{isOnline:h,isListening:a(function(){return n},"isListening"),unload:_,addListener:v,setOnlineState:A}}a(tCt,"createOfflineListener");var dOe="AppInsightsChannelPlugin";f();f();f();f();f();var n8="duration";f();var r0="tags",fOe="deviceType",PE="data",sP="name",DG="traceID",io="length",i8="stringify",o8="measurements",Zb="dataType",s8="envelopeType",fM="toString",pM="enqueue",hM="count",eT="push",ame="emitLineDelimitedJson",a8="clear",xee="markAsSent",MG="clearSent",cme="bufferOverride",wee="BUFFER_KEY",mM="SENT_BUFFER_KEY",c8="concat",Ree="MAX_BUFFER_SIZE",Pee="triggerSend",um="diagLog",pOe="initialize",kee="_sender",Nee="endpointUrl",Dee="instrumentationKey",hOe="customHeaders",rCt="maxBatchSizeInBytes",mOe="onunloadDisableBeacon",gOe="isBeaconApiDisabled",nCt="alwaysUseXhrOverride",iCt="enableSessionStorageBuffer",ux="_buffer",oCt="onunloadDisableFetch",sCt="disableSendBeaconSplit",lme="getSenderInst",l8="_onError",AOe="_onPartialSuccess",ume="_onSuccess",yOe="itemsReceived",EOe="itemsAccepted",COe="baseType",Mee="sampleRate",$Pr="getHashCodeScore";var aCt="baseType",bu="baseData",eh="properties",VPr="true";function pf(t,e,r){return tP(t,e,r,t1)}a(pf,"_setValueIf");function UNi(t,e,r){var n=r[r0]=r[r0]||{},o=e.ext=e.ext||{},s=e[r0]=e[r0]||[],c=o.user;c&&(pf(n,t0.userAuthUserId,c.authId),pf(n,t0.userId,c.id||c.localId));var l=o.app;l&&pf(n,t0.sessionId,l.sesId);var u=o.device;u&&(pf(n,t0.deviceId,u.id||u.localId),pf(n,t0[fOe],u.deviceClass),pf(n,t0.deviceIp,u.ip),pf(n,t0.deviceModel,u.model),pf(n,t0[fOe],u[fOe]));var d=e.ext.web;if(d){pf(n,t0.deviceLanguage,d.browserLang),pf(n,t0.deviceBrowserVersion,d.browserVer),pf(n,t0.deviceBrowser,d.browser);var p=r[PE]=r[PE]||{},h=p[bu]=p[bu]||{},m=h[eh]=h[eh]||{};pf(m,"domain",d.domain),pf(m,"isManual",d.isManual?VPr:null),pf(m,"screenRes",d.screenRes),pf(m,"userConsent",d.userConsent?VPr:null)}var g=o.os;g&&(pf(n,t0.deviceOS,g[sP]),pf(n,t0.deviceOSVersion,g.osVer));var A=o.trace;A&&(pf(n,t0.operationParentId,A.parentID),pf(n,t0.operationName,il(t,A[sP])),pf(n,t0.operationId,A[DG]));for(var y={},E=s[io]-1;E>=0;E--){var _=s[E];Dr(_,function(b,I){y[b]=I}),s.splice(E,1)}Dr(s,function(b,I){y[b]=I});var v=Yb(Yb({},n),y);v[t0.internalSdkVersion]||(v[t0.internalSdkVersion]=il(t,"javascript:".concat(QNi.Version),64)),r[r0]=NMe(v)}a(UNi,"_extractPartAExtensions");function u8(t,e,r){Ht(t)||Dr(t,function(n,o){Jf(o)?r[n]=o:Vn(o)?e[n]=o:VL()&&(e[n]=VA()[i8](o))})}a(u8,"_extractPropsAndMeasurements");function OG(t,e){Ht(t)||Dr(t,function(r,n){t[r]=n||e})}a(OG,"_convertPropsUndefinedToCustomDefinedValue");function BG(t,e,r,n){var o=new YEt(t,n,e);pf(o,"sampleRate",r[Whe]),(r[bu]||{}).startTime&&(o.time=$L(r[bu].startTime)),o.iKey=r.iKey;var s=r.iKey.replace(/-/g,"");return o[sP]=o[sP].replace("{0}",s),UNi(t,r,o),r[r0]=r[r0]||[],NMe(o)}a(BG,"_createEnvelope");function LG(t,e){Ht(e[bu])&&Rr(t,1,46,"telemetryItem.baseData cannot be null.")}a(LG,"EnvelopeCreatorInit");var QNi={Version:"3.3.11"};function WPr(t,e,r){LG(t,e);var n=e[bu][o8]||{},o=e[bu][eh]||{};u8(e[PE],o,n),Ht(r)||OG(o,r);var s=e[bu];if(Ht(s))return aM(t,"Invalid input for dependency data"),null;var c=s[eh]&&s[eh][rOe]?s[eh][rOe]:"GET",l=new RG(t,s.id,s.target,s[sP],s[n8],s.success,s.responseCode,c,s.type,s.correlationContext,o,n),u=new dM(RG[Zb],l);return BG(t,RG[s8],e,u)}a(WPr,"DependencyEnvelopeCreator");function cCt(t,e,r){LG(t,e);var n={},o={};e[aCt]!==lM[Zb]&&(n.baseTypeSource=e[aCt]),e[aCt]===lM[Zb]?(n=e[bu][eh]||{},o=e[bu][o8]||{}):e[bu]&&u8(e[bu],n,o),u8(e[PE],n,o),Ht(r)||OG(n,r);var s=e[bu][sP],c=new lM(t,s,n,o),l=new dM(lM[Zb],c);return BG(t,lM[s8],e,l)}a(cCt,"EventEnvelopeCreator");function zPr(t,e,r){LG(t,e);var n=e[bu][o8]||{},o=e[bu][eh]||{};u8(e[PE],o,n),Ht(r)||OG(o,r);var s=e[bu],c=xG.CreateFromInterface(t,s,o,n),l=new dM(xG[Zb],c);return BG(t,xG[s8],e,l)}a(zPr,"ExceptionEnvelopeCreator");function YPr(t,e,r){LG(t,e);var n=e[bu],o=n[eh]||{},s=n[o8]||{};u8(e[PE],o,s),Ht(r)||OG(o,r);var c=new uM(t,n[sP],n.average,n.sampleCount,n.min,n.max,n.stdDev,o,s),l=new dM(uM[Zb],c);return BG(t,uM[s8],e,l)}a(YPr,"MetricEnvelopeCreator");function KPr(t,e,r){LG(t,e);var n,o=e[bu];!Ht(o)&&!Ht(o[eh])&&!Ht(o[eh][n8])?(n=o[eh][n8],delete o[eh][n8]):!Ht(e[PE])&&!Ht(e[PE][n8])&&(n=e[PE][n8],delete e[PE][n8]);var s=e[bu],c;((e.ext||{}).trace||{})[DG]&&(c=e.ext.trace[DG]);var l=s.id||c,u=s[sP],d=s.uri,p=s[eh]||{},h=s[o8]||{};if(Ht(s.refUri)||(p.refUri=s.refUri),Ht(s.pageType)||(p.pageType=s.pageType),Ht(s.isLoggedIn)||(p.isLoggedIn=s.isLoggedIn[fM]()),!Ht(s[eh])){var m=s[eh];Dr(m,function(y,E){p[y]=E})}u8(e[PE],p,h),Ht(r)||OG(p,r);var g=new wG(t,u,d,n,p,h,l),A=new dM(wG[Zb],g);return BG(t,wG[s8],e,A)}a(KPr,"PageViewEnvelopeCreator");function JPr(t,e,r){LG(t,e);var n=e[bu],o=n[sP],s=n.uri||n.url,c=n[eh]||{},l=n[o8]||{};u8(e[PE],c,l),Ht(r)||OG(c,r);var u=new kG(t,o,s,void 0,c,l,n),d=new dM(kG[Zb],u);return BG(t,kG[s8],e,d)}a(JPr,"PageViewPerformanceEnvelopeCreator");function XPr(t,e,r){LG(t,e);var n=e[bu].message,o=e[bu].severityLevel,s=e[bu][eh]||{},c=e[bu][o8]||{};u8(e[PE],s,c),Ht(r)||OG(s,r);var l=new PG(t,n,o,s,c),u=new dM(PG[Zb],l);return BG(t,PG[s8],e,u)}a(XPr,"TraceEnvelopeCreator");f();var ZPr=(function(){function t(e,r){var n=[],o=!1,s=r.maxRetryCnt;this._get=function(){return n},this._set=function(c){return n=c,n},Jn(t,this,function(c){c[pM]=function(l){if(c[hM]()>=r.eventsLimitInMem){o||(Rr(e,2,105,"Maximum in-memory buffer size reached: "+c[hM](),!0),o=!0);return}l.cnt=l.cnt||0,!(!Ht(s)&&l.cnt>s)&&n[eT](l)},c[hM]=function(){return n[io]},c.size=function(){for(var l=n[io],u=0;u0){var u=[];dt(l,function(p){u[eT](p.item)});var d=r[ame]?u.join(` -`):"["+u.join(",")+"]";return d}return null},c.createNew=function(l,u,d){var p=n.slice(0);l=l||e,u=u||{};var h=d?new lCt(l,u):new _Oe(l,u);return dt(p,function(m){h[pM](m)}),h}})}return a(t,"BaseSendBuffer"),t.__ieDyn=1,t})(),_Oe=(function(t){xg(e,t);function e(r,n){var o=t.call(this,r,n)||this;return Jn(e,o,function(s,c){s[xee]=function(l){c[a8]()},s[MG]=function(l){}}),o}return a(e,"ArraySendBuffer"),e.__ieDyn=1,e})(ZPr);var qNi=["AI_buffer","AI_sentBuffer"],lCt=(function(t){xg(e,t);function e(n,o){var s=t.call(this,n,o)||this,c=!1,l=o?.namePrefix,u=o[cme]||{getItem:VEt,setItem:WEt},d=u.getItem,p=u.setItem,h=o.maxRetryCnt;return Jn(e,s,function(m,g){var A=I(e[wee]),y=I(e[mM]),E=w(),_=y[c8](E),v=m._set(A[c8](_));v[io]>e[Ree]&&(v[io]=e[Ree]),R(e[mM],[]),R(e[wee],v),m[pM]=function(k){if(m[hM]()>=e[Ree]){c||(Rr(n,2,67,"Maximum buffer size reached: "+m[hM](),!0),c=!0);return}k.cnt=k.cnt||0,!(!Ht(h)&&k.cnt>h)&&(g[pM](k),R(e[wee],m._get()))},m[a8]=function(){g[a8](),R(e[wee],m._get()),R(e[mM],[]),c=!1},m[xee]=function(k){R(e[wee],m._set(b(k,m._get())));var Q=I(e[mM]);Q instanceof Array&&k instanceof Array&&(Q=Q[c8](k),Q[io]>e[Ree]&&(Rr(n,1,67,"Sent buffer reached its maximum size: "+Q[io],!0),Q[io]=e[Ree]),R(e[mM],Q))},m[MG]=function(k){var Q=I(e[mM]);Q=b(k,Q),R(e[mM],Q)},m.createNew=function(k,Q,M){M=!!M;var D=m._get().slice(0),G=I(e[mM]).slice(0);k=k||n,Q=Q||{},m[a8]();var O=M?new e(k,Q):new _Oe(k,Q);return dt(D,function(N){O[pM](N)}),M&&O[xee](G),O};function b(k,Q){var M=[],D=[];return dt(k,function(G){D[eT](G.item)}),dt(Q,function(G){!Er(G)&&uo(D,G.item)===-1&&M[eT](G)}),M}a(b,"_removePayloadsFromBuffer");function I(k){var Q=k;return Q=l?l+"_"+Q:Q,x(Q)}a(I,"_getBuffer");function x(k){try{var Q=d(n,k);if(Q){var M=VA().parse(Q);if(Vn(M)&&(M=VA().parse(M)),M&&Jt(M))return M}}catch(D){Rr(n,1,42," storage key: "+k+", "+ff(D),{exception:Xt(D)})}return[]}a(x,"_getBufferBase");function R(k,Q){var M=k;try{M=l?l+"_"+M:M;var D=JSON[i8](Q);p(n,M,D)}catch(G){p(n,M,JSON[i8]([])),Rr(n,2,41," storage key: "+M+", "+ff(G)+". Buffer cleared",{exception:Xt(G)})}}a(R,"_setBuffer");function w(){var k=[];try{return dt(qNi,function(Q){var M=P(Q);if(k=k[c8](M),l){var D=l+"_"+Q,G=P(D);k=k[c8](G)}}),k}catch(Q){Rr(n,2,41,"Transfer events from previous buffers: "+ff(Q)+". previous Buffer items can not be removed",{exception:Xt(Q)})}return[]}a(w,"_getPreviousEvents");function P(k){try{var Q=x(k),M=[];return dt(Q,function(D){var G={item:D,cnt:0};M[eT](G)}),zEt(n,k),M}catch{}return[]}a(P,"_getItemsFromPreviousKey")}),s}a(e,"SessionStorageSendBuffer");var r;return r=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+r.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+r.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(ZPr);f();var ekr=(function(){function t(e){Jn(t,this,function(r){r.serialize=function(c){var l=n(c,"root");try{return VA()[i8](l)}catch(u){Rr(e,1,48,u&&Er(u[fM])?u[fM]():"Error serializing object",null,!0)}};function n(c,l){var u="__aiCircularRefCheck",d={};if(!c)return Rr(e,1,48,"cannot serialize object because it is null or undefined",{name:l},!0),d;if(c[u])return Rr(e,2,50,"Circular reference detected while serializing object",{name:l},!0),d;if(!c.aiDataContract){if(l==="measurements")d=s(c,"number",l);else if(l==="properties")d=s(c,"string",l);else if(l==="tags")d=s(c,"string",l);else if(Jt(c))d=o(c,l);else{Rr(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:l},!0);try{VA()[i8](c),d=c}catch(p){Rr(e,1,48,p&&Er(p[fM])?p[fM]():"Error serializing object",null,!0)}}return d}return c[u]=!0,Dr(c.aiDataContract,function(p,h){var m=Er(h)?h()&1:h&1,g=Er(h)?h()&4:h&4,A=h&2,y=c[p]!==void 0,E=Fl(c[p])&&c[p]!==null;if(m&&!y&&!A)Rr(e,1,24,"Missing required field specification. The field is required but not present on source",{field:p,name:l});else if(!g){var _=void 0;E?A?_=o(c[p],p):_=n(c[p],p):_=c[p],_!==void 0&&(d[p]=_)}}),delete c[u],d}a(n,"_serializeObject");function o(c,l){var u;if(c)if(!Jt(c))Rr(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r -`,{name:l},!0);else{u=[];for(var d=0;d100||e<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[Mee]=e,this.samplingScoreGenerator=new rkr}return a(t,"Sample"),t.prototype.isSampledIn=function(e){var r=this[Mee],n=!1;return r==null||r>=100||e.baseType===uM[Zb]?!0:(n=this.samplingScoreGenerator.getSamplingScore(e)0&&t<=100}a($Ni,"_chkSampling");var VNi=(gM={},gM[lM.dataType]=cCt,gM[PG.dataType]=XPr,gM[wG.dataType]=KPr,gM[kG.dataType]=JPr,gM[xG.dataType]=zPr,gM[uM.dataType]=YPr,gM[RG.dataType]=WPr,gM),uCt=(function(t){xg(e,t);function e(){var r=t.call(this)||this;r.priority=1001,r.identifier=dOe;var n,o,s,c,l,u,d,p,h=0,m,g,A,y,E,_,v,b,I,x,R,w,P,k,Q,M,D,G,O,N,F,U,L,H,$,W,j,ce;return Jn(e,r,function(J,Te){ft(),J.pause=function(){ye(),c=!0},J.resume=function(){c&&(c=!1,o=null,We(),ut())},J.flush=function(z,se,Ce){if(z===void 0&&(z=!0),!c){ye();try{var we=J[Pee](z,null,Ce||1);return Ec(we,function(je){return se?(se(!je.rejected),!0):z?vu(function(Ye){Ye(!je.rejected)}):we})}catch(je){Rr(J[um](),1,22,"flush failed, telemetry will not be collected: "+ff(je),{exception:Xt(je)})}}},J.onunloadFlush=function(){if(!c)if(v||N)try{return J[Pee](!0,Nt,2)}catch(z){Rr(J[um](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+ff(z),{exception:Xt(z)})}else J.flush(!1)},J.addHeader=function(z,se){p[z]=se},J[pOe]=function(z,se,Ce,we){J.isInitialized()&&Rr(J[um](),1,28,"Sender is already initialized"),Te[pOe](z,se,Ce,we);var je=J.identifier;u=new ekr(se.logger),n=0,o=null,s=0,J[kee]=null,d=0;var Ye=J[um]();A=Vhe(d1("Sender"),se.evtNamespace&&se.evtNamespace()),g=tCt(A),J._addHook(Kb(z,function(gt){var xt=gt.cfg;xt.storagePrefix&&$Et(xt.storagePrefix);var Bt=cx(null,xt,se),Ct=Bt.getExtCfg(je,skr),Ie=Ct[Nee];if(y&&Ie===y){var K=xt[Nee];K&&K!==Ie&&(Ct[Nee]=K)}var pe=ri("CompressionStream");ce=Xyt("zipPayload",xt,!1),Er(pe)||(ce=!1);var me=Ct.corsPolicy;me?(me==="same-origin"||me==="same-site"||me==="cross-origin")&&r.addHeader(akr,me):delete p[akr],Xp(Ct[Dee])&&(Ct[Dee]=xt[Dee]),pi(J,"_senderConfig",{g:a(function(){return Ct},"g")}),E!==Ct[Nee]&&(y=E=Ct[Nee]),se.activeStatus()===nx.PENDING?J.pause():se.activeStatus()===nx.ACTIVE&&J.resume(),x&&x!==Ct[hOe]&&dt(x,function(sr){delete p[sr.header]}),_=Ct[rCt],v=(Ct[mOe]===!1||Ct[gOe]===!1)&&WL(),b=Ct[mOe]===!1&&WL(),I=Ct[gOe]===!1&&WL(),N=Ct[nCt],F=!!Ct.disableXhr,j=Ct.retryCodes;var ne=Ct[cme],V=!!Ct[iCt]&&(!!ne||aOe()),Re=Ct.namePrefix,ze=V!==M||V&&G!==Re||V&&D!==ne;if(J[ux]){if(ze)try{J[ux]=J[ux].createNew(Ye,Ct,V)}catch(sr){Rr(J[um](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+ff(sr),{exception:Xt(sr)})}We()}else J[ux]=V?new lCt(Ye,Ct):new _Oe(Ye,Ct);G=Re,M=V,D=ne,U=!Ct[oCt]&&Nhe(!0),$=!!Ct[sCt],J._sample=new nkr(Ct.samplingPercentage,Ye),w=Ct[Dee],!Xp(w)&&!ot(w,xt)&&Rr(Ye,1,100,"Invalid Instrumentation key "+w),x=Ct[hOe],Vn(y)&&!oOe(y)&&x&&x[io]>0?dt(x,function(sr){r.addHeader(sr.header,sr.value)}):x=null,O=Ct.enableSendPromise;var Mt=De();W?W.SetConfig(Mt):(W=new OEt,W[pOe](Mt,Ye));var rr=Ct.httpXHROverride,zt=null,gr=null,xr=MMe([3,1,2],Ct.transports);zt=W&&W[lme](xr,!1);var wr=W&&W.getFallbackInst();L=a(function(sr,Hp){return Ee(wr,sr,Hp)},"_xhrSend"),H=a(function(sr,Hp){return Ee(wr,sr,Hp,!1)},"_fallbackSend"),zt=N?rr:zt||rr||wr,J[kee]=function(sr,Hp){return Ee(zt,sr,Hp)},U&&(m=ue);var Ut=MMe([3,1],Ct.unloadTransports);U||(Ut=Ut.filter(function(sr){return sr!==2})),gr=W&&W[lme](Ut,!0),gr=N?rr:gr||rr,(N||Ct.unloadTransports||!m)&&gr&&(m=a(function(sr,Hp){return Ee(gr,sr,Hp)},"_syncUnloadSender")),m||(m=L),R=Ct.disableTelemetry,P=Ct.convertUndefined||dx,k=Ct.isRetryDisabled,Q=Ct.maxBatchInterval}))},J.processTelemetry=function(z,se){se=J._getTelCtx(se);var Ce=se[um]();try{var we=te(z,Ce);if(!we)return;var je=xe(z,Ce);if(!je)return;var Ye=u.serialize(je),gt=J[ux];We(Ye);var xt={item:Ye,cnt:0};gt[pM](xt),ut()}catch(Bt){Rr(Ce,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ff(Bt),{exception:Xt(Bt)})}J.processNext(z,se)},J.isCompletelyIdle=function(){return!c&&h===0&&J._buffer[hM]()===0},J.getOfflineListener=function(){return g},J._xhrReadyStateChange=function(z,se,Ce){if(!Qt(se))return Ve(z,se,Ce)},J[Pee]=function(z,se,Ce){z===void 0&&(z=!0);var we;if(!c)try{var je=J[ux];if(R)je[a8]();else{if(je[hM]()>0){var Ye=je.getItems();rt(Ce||0,z),se?we=se.call(J,Ye,z):we=J[kee](Ye,z)}s=+new Date}ye()}catch(xt){var gt=cEt();(!gt||gt>9)&&Rr(J[um](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+ff(xt),{exception:Xt(xt)})}return we},J.getOfflineSupport=function(){return{getUrl:a(function(){return y},"getUrl"),createPayload:Ne,serialize:Z,batch:ae,shouldProcess:a(function(z){return!!te(z)},"shouldProcess")}},J._doTeardown=function(z,se){J.onunloadFlush(),sM(g,!1),ft()},J[l8]=function(z,se,Ce){if(!Qt(z))return Ue(z,se,Ce)},J[AOe]=function(z,se){if(!Qt(z))return Ke(z,se)},J[ume]=function(z,se){if(!Qt(z))return X(z,se)},J._xdrOnLoad=function(z,se){if(!Qt(se))return fe(z,se)};function fe(z,se){var Ce=okr(z);if(z&&(Ce+""=="200"||Ce===""))n=0,J[ume](se,0);else{var we=$he(Ce);we&&we[yOe]&&we[yOe]>we[EOe]&&!k?J[AOe](se,we):J[l8](se,Rhe(z))}}a(fe,"_xdrOnLoad");function De(){try{var z={xdrOnComplete:a(function(Ce,we,je){var Ye=le(je);if(Ye)return fe(Ce,Ye)},"xdrOnComplete"),fetchOnComplete:a(function(Ce,we,je,Ye){var gt=le(Ye);if(gt)return Ze(Ce.status,gt,Ce.url,gt[io],Ce.statusText,je||"")},"fetchOnComplete"),xhrOnComplete:a(function(Ce,we,je){var Ye=le(je);if(Ye)return Ve(Ce,Ye,Ye[io])},"xhrOnComplete"),beaconOnRetry:a(function(Ce,we,je){return Gt(Ce,we,je)},"beaconOnRetry")},se={enableSendPromise:O,isOneDs:!1,disableCredentials:!1,disableXhr:F,disableBeacon:!I,disableBeaconSync:!b,senderOnCompleteCallBack:z};return se}catch{}return null}a(De,"_getSendPostMgrConfig");function Ve(z,se,Ce){z.readyState===4&&Ze(z.status,se,z.responseURL,Ce,hG(z),okr(z)||z.response)}a(Ve,"_xhrReadyStateChange");function Ue(z,se,Ce){Rr(J[um](),2,26,"Failed to send telemetry.",{message:se}),J._buffer&&J._buffer[MG](z)}a(Ue,"_onError");function Ke(z,se){for(var Ce=[],we=[],je=se.errors.reverse(),Ye=0,gt=je;Ye0&&J[ume](z,se[EOe]),Ce[io]>0&&J[l8](Ce,hG(null,["partial success",se[EOe],"of",se.itemsReceived].join(" "))),we[io]>0&&(Be(we),Rr(J[um](),2,40,"Partial success. Delivered: "+z[io]+", Failed: "+Ce[io]+". Will retry to send "+we[io]+" our of "+se[yOe]+" items"))}a(Ke,"_onPartialSuccess");function X(z,se){J._buffer&&J._buffer[MG](z)}a(X,"_onSuccess");function le(z){try{if(z){var se=z,Ce=se.oriPayload;return Ce&&Ce[io]?Ce:null}}catch{}return null}a(le,"_getPayloadArr");function te(z,se){if(R)return!1;if(!z)return se&&Rr(se,1,7,"Cannot send empty telemetry"),!1;if(z.baseData&&!z[COe])return se&&Rr(se,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(z[COe]||(z[COe]="EventData"),!J[kee])return se&&Rr(se,1,28,"Sender was not initialized"),!1;if(Y(z))z[Whe]=J._sample[Mee];else return se&&Rr(se,2,33,"Telemetry item was sampled out and not sent",{SampleRate:J._sample[Mee]}),!1;return!0}a(te,"_validate");function xe(z,se){var Ce=z.iKey||w,we=e.constructEnvelope(z,Ce,se,P);if(!we){Rr(se,1,47,"Unable to create an AppInsights envelope");return}var je=!1;if(z[r0]&&z[r0][zhe]&&(dt(z[r0][zhe],function(Ye){try{Ye&&Ye(we)===!1&&(je=!0,aM(se,"Telemetry processor check returns false"))}catch(gt){Rr(se,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+ff(gt),{exception:Xt(gt)},!0)}}),delete z[r0][zhe]),!je)return we}a(xe,"_getEnvelope");function Z(z){var se=ikr,Ce=J[um]();try{var we=te(z,Ce),je=null;we&&(je=xe(z,Ce)),je&&(se=u.serialize(je))}catch{}return se}a(Z,"_serialize");function ae(z){var se=ikr;return z&&z[io]&&(se="["+z.join(",")+"]"),se}a(ae,"_batch");function Ne(z){var se=ve();return{urlString:y,data:z,headers:se}}a(Ne,"_createPayload");function Y(z){return J._sample.isSampledIn(z)}a(Y,"_isSampledIn");function ee(z,se,Ce,we){se===200&&z?J._onSuccess(z,z[io]):we&&J[l8](z,we)}a(ee,"_getOnComplete");function Ee(z,se,Ce,we){we===void 0&&(we=!0);var je=a(function(K,pe,me){return ee(se,K,pe,me)},"onComplete"),Ye=Ae(se),gt=z&&z.sendPOST;if(gt&&Ye){we&&J._buffer[xee](se);var xt,Bt=!1,Ct,Ie;return W.preparePayload(function(K){xt=gt(K,je,!Ce),Bt=!0,Ct&&vMe(xt,Ct,Ie)},ce,Ye,!Ce),Bt?xt:vu(function(K,pe){Ct=K,Ie=pe})}return null}a(Ee,"_doSend");function Ae(z){if(Jt(z)&&z[io]>0){var se=J[ux].batchPayloads(z),Ce=ve(),we={data:se,urlString:y,headers:Ce,disableXhrSync:F,disableFetchKeepAlive:!U,oriPayload:z};return we}return null}a(Ae,"_getPayload");function ve(){try{var z=p||{};return oOe(y)&&(z[nOe[6]]=nOe[7]),z}catch{}return null}a(ve,"_getHeaders");function We(z){var se=z?z[io]:0;return J[ux].size()+se>_?((!g||g.isOnline())&&J[Pee](!0,null,10),!0):!1}a(We,"_checkMaxSize");function Ze(z,se,Ce,we,je,Ye){var gt=null;if(J._appId||(gt=$he(Ye),gt&>.appId&&(J._appId=gt.appId)),(z<200||z>=300)&&z!==0){if((z===301||z===307||z===308)&&!vt(Ce)){J[l8](se,je);return}if(g&&!g.isOnline()){if(!k){var xt=10;Be(se,xt),Rr(J[um](),2,40,". Offline - Response Code: ".concat(z,". Offline status: ").concat(!g.isOnline(),". Will retry to send ").concat(se.length," items."))}return}!k&&Le(z)?(Be(se),Rr(J[um](),2,40,". Response code "+z+". Will retry to send "+se[io]+" items.")):J[l8](se,je)}else vt(Ce),z===206?(gt||(gt=$he(Ye)),gt&&!k?J[AOe](se,gt):J[l8](se,je)):(n=0,J[ume](se,we))}a(Ze,"_checkResponsStatus");function vt(z){return d>=10?!1:!Ht(z)&&z!==""&&z!==y?(y=z,++d,!0):!1}a(vt,"_checkAndUpdateEndPointUrl");function Nt(z,se){if(m)m(z,!1);else{var Ce=W&&W[lme]([3],!0);return Ee(Ce,z,se)}}a(Nt,"_doUnloadSend");function Gt(z,se,Ce){var we=z,je=we&&we.oriPayload;if($)H&&H(je,!0),Rr(J[um](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var Ye=[],gt=0;gt0&&(H&&H(Ye,!0),Rr(J[um](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}a(Gt,"_onBeaconRetry");function Qt(z){try{if(z&&z[io])return Vn(z[0])}catch{}return null}a(Qt,"_isStringArr");function ue(z,se){var Ce=null;if(Jt(z)){for(var we=z[io],je=0;je-1}a(Le,"_isRetriable");function $e(){var z="getNotifyMgr",se,Ce=J.core;return Ce&&(Ce[z]?se=Ce[z]():se=Ce._notificationManager),se}a($e,"_getNotifyMgr");function rt(z,se){var Ce=$e();if(Ce&&Ce.eventsSendRequest)try{Ce.eventsSendRequest(z,se)}catch(we){Rr(J[um](),1,74,"send request notification failed: "+ff(we),{exception:Xt(we)})}}a(rt,"_notifySendRequest");function ot(z,se){var Ce=se.disableInstrumentationKeyValidation,we=Ht(Ce)?!1:Ce;if(we)return!0;var je="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",Ye=new RegExp(je);return Ye.test(z)}a(ot,"_validateInstrumentationKey");function ft(){J[kee]=null,J[ux]=null,J._appId=null,J._sample=null,p={},g=null,n=0,o=null,s=null,c=!1,l=null,u=null,d=0,h=0,m=null,A=null,y=null,E=null,_=0,v=!1,x=null,R=!1,w=null,P=dx,k=!1,M=null,G=dx,F=!1,U=!1,$=!1,L=null,H=null,W=null,pi(J,"_senderConfig",{g:a(function(){return DMe({},skr)},"g")})}a(ft,"_initDefaults")}),r}return a(e,"Sender"),e.constructEnvelope=function(r,n,o,s){var c;n!==r.iKey&&!Ht(n)?c=Yb(Yb({},r),{iKey:n}):c=r;var l=VNi[c.baseType]||cCt;return l(o,c,s)},e})(jhe);f();var FG="instrumentationKey",dme="connectionString",Oee="endpointUrl",Bee="userOverrideEndpointUrl";var UG,dCt,fCt=void 0,WNi=(UG={diagnosticLogInterval:gee(zNi,1e4)},UG[dme]=fCt,UG.endpointUrl=fCt,UG[FG]=fCt,UG.featureOptIn=(dCt={},dCt.zipPayload={mode:1},dCt),UG.extensionConfig={},UG);function zNi(t){return t&&t>0}a(zNi,"_chkDiagLevel");var ckr=(function(){function t(e){var r=new DEt,n;(Ht(e)||Ht(e[FG])&&Ht(e[dme]))&&ec("Invalid input configuration"),Jn(t,this,function(s){pi(s,"config",{g:a(function(){return n},"g")}),c(),s.initialize=c,s.track=o,pG(s,r,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function c(){var l=e0(e||{},WNi);n=l.cfg,r.addUnloadHook(Kb(l,function(){var u=n[dme];if(Xp(u)){var d=Ihe(function(g,A){Ec(u,function(y){var E=y.value,_=n[FG];if(!y.rejected&&E){n[dme]=E;var v=rme(E);_=v.instrumentationkey||_}g(_)})}),p=Ihe(function(g,A){Ec(u,function(y){var E=y.value,_=n[Oee];if(!y.rejected&&E){var v=rme(E),b=v.ingestionendpoint;_=b?b+iP:_}g(_)})});n[FG]=d,n[Oee]=n[Bee]||p}if(Vn(u)){var h=rme(u),m=h.ingestionendpoint;n[Oee]=n[Bee]?n[Bee]:m+iP,n[FG]=h.instrumentationkey||n[FG]}n[Oee]=n[Bee]?n[Bee]:n[Oee]})),r.initialize(n,[new uCt])}a(c,"_initialize")});function o(s){s&&(s.baseData=s.baseData||{},s.baseType=s.baseType||"EventData"),r.track(s)}a(o,"_track")}return a(t,"ApplicationInsights"),t.__ieDyn=1,t})();var f1=de(require("os"));var QG=class{constructor(e,r,n,o){this.ctx=e;this.namespace=r;this.options=n;this.onCopilotToken=a(e=>{this.token=e,this.commonProperties["common.isinternal"]=e?.isInternalUser()?"true":"false";let r=e.getTokenValue("tid");r!==void 0&&(this.tags["ai.user.id"]=r)},"onCopilotToken");this.xhrOverride={sendPOST:a((e,r)=>{if(typeof e.data!="string")throw new Error(`AppInsightsReporter only supports string payloads, received ${typeof e.data}`);let n=e.headers??{};n["Content-Type"]="application/json",this.options?.includeAuthorizationHeader&&this.token&&(n.Authorization=`Bearer ${this.token.token}`);let o={method:"POST",headers:n,body:e.data};this.ctx.get(dr).fetch(e.urlString,o).then(s=>s.text().then(c=>{r(s.status,Object.fromEntries(s.headers),c)})).catch(s=>{_r.debug(this.ctx,"Error sending telemetry",s),r(0,{})})},"sendPOST")};this.client=new ckr({instrumentationKey:n.instrumentationKey,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,endpointUrl:n.endpointUrl,extensionConfig:{[dOe]:{alwaysUseXhrOverride:!0,httpXHROverride:this.xhrOverride}}}),this.tags=n?.excludeCommonTags?{}:YNi(e),this.commonProperties=n?.excludeCommonProperties?{}:KNi(e),this.#e=ss(e,this.onCopilotToken),o&&this.onCopilotToken(o)}static{a(this,"AppInsightsReporter")}#e;sendTelemetryEvent(e,r,n){r={...r,...this.commonProperties};let o=this.qualifyEventName(e);this.client.track({name:o,tags:this.tags,data:{...r,...n},baseType:"EventData",baseData:{name:o,properties:r,measurements:n}})}sendTelemetryErrorEvent(e,r,n){this.sendTelemetryEvent(this.qualifyEventName(e),r,n)}async dispose(){this.#e.dispose(),await this.client.unload(!0,void 0,200)}qualifyEventName(e){return e.startsWith(this.namespace)?e:`${this.namespace}/${e}`}};function YNi(t){let e={},r=t.get(Ks);e["ai.session.id"]=r.sessionId;let n=t.get(_d);return n.trackingId&&(e["ai.user.id"]=n.trackingId),e["ai.cloud.roleInstance"]="REDACTED",e["ai.device.osVersion"]=`${f1.type()} ${f1.release()}`,e["ai.device.osArchitecture"]=f1.arch(),e["ai.device.osPlatform"]=f1.platform(),e["ai.cloud.role"]="Web",e["ai.application.ver"]=t.get(Ko).getVersion(),e}a(YNi,"getTags");function KNi(t){let e={};e.common_os=f1.platform(),e.common_platformversion=f1.release(),e.common_arch=f1.arch(),e.common_cpu=Array.from(new Set(f1.cpus().map(n=>n.model))).join();let r=t.get(Ks);return e.common_vscodemachineid=r.machineId,e.common_vscodesessionid=r.sessionId,e.client_deviceid=r.devDeviceId,e.common_uikind=r.uiKind,e.common_remotename=r.remoteName,e.common_isnewappinstall="",e}a(KNi,"getCommonProperties");f();f();f();f();f();f();var fme=eMe;var aP=fme({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5});f();var d8=fme({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2});f();f();var qG="toLowerCase",on="length",Lee="warnToConsole",AM="throwInternal",cP="watch",f8="apply",Pi="push",tT="splice",Gl="logger",lP="cancel",yM="initialize",uP="identifier",Fee="removeNotificationListener",Uee="addNotificationListener",kE="isInitialized",pme="getNotifyMgr",p8="getPlugin",fx="name",up="processNext",vOe="getProcessTelContext",EM="value",h8="enabled",pCt="stopPollingInternalLogs",rT="unload",hme="onComplete",bOe="version",TOe="loggingLevelConsole",dP="createNew",p1="teardown",Qee="messageId",fP="message",NE="diagLog",m8="_doTeardown",GG="update",h1="getNext",g8="setNextPlugin",mme="userAgent",CM="split",px="replace",hCt="substring",SOe="indexOf",_M="type",mCt="evtName",hx="status",gCt="getAllResponseHeaders",gme="isChildEvt",m1="data",HG="getCtx",mx="setCtx";var Ame="headers",qee="urlString",jG="timeout";var IOe="traceFlags";var ACt;function lkr(t,e){ACt||(ACt=dhe("AggregationError",function(n,o){o[on]>1&&(n.errors=o[1])}));var r=t||"One or more errors occurred.";throw dt(e,function(n,o){r+=` -`.concat(o," > ").concat(Xt(n))}),new ACt(r,e||[])}a(lkr,"throwAggregationError");f();f();f();f();f();var g1=void 0,Go="",$G="channels",xd="core",xOe="createPerfMgr",yme="disabled",vM="extensionConfig",VG="extensions",DE="processTelemetry",WG="priority",Gee="eventsSent",A8="eventsDiscarded",Hee="eventsSendRequest",pP="perfEvent",wOe="offlineEventsStored",ROe="offlineBatchSent",POe="offlineBatchDrop",jee="getPerfMgr",kOe="domain",NOe="path",ukr="Not dynamic - ";var JNi="getPrototypeOf",XNi=/-([a-z])/g,ZNi=/([^\w\d_$])/g,eDi=/^(\d+[\w\d_$])/,oyc=Object[JNi];function y8(t){return!Ht(t)}a(y8,"isNotNullOrUndefined");function $ee(t){var e=t;return e&&Vn(e)&&(e=e[px](XNi,function(r,n){return n.toUpperCase()}),e=e[px](ZNi,"_"),e=e[px](eDi,function(r,n){return"_"+n})),e}a($ee,"normalizeJsName");function th(t,e){return t&&e?nl(t,e)!==-1:!1}a(th,"strContains");function Vee(t){return t&&t.toISOString()||""}a(Vee,"toISOString");function Wee(t){return Y5(t)?t[fx]:Go}a(Wee,"getExceptionName");function bM(t,e,r,n,o){var s=r;return t&&(s=t[e],s!==r&&(!o||o(s))&&(!n||n(r))&&(s=r,t[e]=s)),s}a(bM,"setValue");function DOe(t,e,r){var n;return t?(n=t[e],!n&&Ht(n)&&(n=ln(r)?{}:r,t[e]=n)):n=ln(r)?{}:r,n}a(DOe,"getSetValue");function tDi(t,e){var r=null,n=null;return Er(t)?r=t:n=t,function(){var o=arguments;if(r&&(n=r()),n)return n[e][f8](n,o)}}a(tDi,"_createProxyFunction");function E8(t,e,r,n,o){t&&e&&r&&(o!==!1||ln(t[e]))&&(t[e]=tDi(r,n))}a(E8,"proxyFunctionAs");function C8(t,e,r,n){return t&&e&&Fl(t)&&Jt(r)&&dt(r,function(o){Vn(o)&&E8(t,o,e,o,n)}),t}a(C8,"proxyFunctions");function hP(t){return t&&K5&&(t=GL(K5({},t))),t}a(hP,"optimizeObject");function MOe(t,e,r){var n=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&n){var o=n.mode;if(o===3)return!0;if(o===2)return!1}return r}a(MOe,"isFeatureEnabled");function mP(t){try{return t.responseText}catch{}return null}a(mP,"getResponseText");function OOe(t,e){return t?"XDomainRequest,Response:"+mP(t)||"":e}a(OOe,"formatErrorMessageXdr");function Cme(t,e){return t?"XMLHttpRequest,Status:"+t[hx]+",Response:"+mP(t)||t.response||"":e}a(Cme,"formatErrorMessageXhr");function _me(t,e){return e&&(Jf(e)?t=[e].concat(t):Jt(e)&&(t=e.concat(t))),t}a(_me,"prependTransports");var rDi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",dkr="withCredentials",nDi="timeout";function yCt(t,e,r,n,o,s){n===void 0&&(n=!1),o===void 0&&(o=!1);function c(u,d,p){try{u[d]=p}catch{}}a(c,"_wrapSetXhrProp");var l=new XMLHttpRequest;return n&&c(l,rDi,n),r&&c(l,dkr,r),l.open(t,e,!o),r&&c(l,dkr,r),!o&&s&&c(l,nDi,s),l}a(yCt,"openXhr");function ECt(t){var e={};if(Vn(t)){var r=ni(t)[CM](/[\r\n]+/);dt(r,function(n){if(n){var o=n[SOe](": ");if(o!==-1){var s=ni(n.substring(0,o))[qG](),c=ni(n[hCt](o+1));e[s]=c}else e[ni(n)]=1}})}return e}a(ECt,"convertAllHeadersToMap");function Eme(t,e,r){if(!t[r]&&e&&e.getResponseHeader){var n=e.getResponseHeader(r);n&&(t[r]=ni(n))}return t}a(Eme,"_appendHeader");var iDi="kill-duration",oDi="kill-duration-seconds",sDi="time-delta-millis";function _8(t,e){var r={};return t[gCt]?r=ECt(t[gCt]()):e&&(r=Eme(r,t,sDi),r=Eme(r,t,iDi),r=Eme(r,t,oDi)),r}a(_8,"_getAllResponseHeaders");f();f();var aDi="location",cDi="console",fkr="JSON",lDi="crypto",uDi="msCrypto",dDi="ReactNative",fDi="msie",pDi="trident/",pkr="XMLHttpRequest",CCt=null,_Ct=null,hDi=!1,zee=null,vCt=null;function hkr(t,e){var r=!1;if(t){try{if(r=e in t,!r){var n=t[l1];n&&(r=e in n)}}catch{}if(!r)try{var o=new t;r=!ln(o[e])}catch{}}return r}a(hkr,"_hasProperty");function Yee(t){if(t&&hDi){var e=ri("__mockLocation");if(e)return e}return typeof location===zb&&location?location:ri(aDi)}a(Yee,"getLocation");function BOe(){return typeof console!==c1?console:ri(cDi)}a(BOe,"getConsole");function vme(){return!!(typeof JSON===zb&&JSON||ri(fkr)!==null)}a(vme,"hasJSON");function LOe(){return vme()?JSON||ri(fkr):null}a(LOe,"getJSON");function FOe(){return ri(lDi)}a(FOe,"getCrypto");function UOe(){return ri(uDi)}a(UOe,"getMsCrypto");function Kee(){var t=Ql();return t&&t.product?t.product===dDi:!1}a(Kee,"isReactNative");function zG(){var t=Ql();if(t&&(t[mme]!==_Ct||CCt===null)){_Ct=t[mme];var e=(_Ct||Go)[qG]();CCt=th(e,fDi)||th(e,pDi)}return CCt}a(zG,"isIE");function Jee(t){return(vCt===null||t===!1)&&(vCt=rG()&&!!Ql().sendBeacon),vCt}a(Jee,"isBeaconsSupported");function Xee(t){var e=!1;try{e=!!ri("fetch");var r=ri("Request");e&&t&&r&&(e=hkr(r,"keepalive"))}catch{}return e}a(Xee,"isFetchSupported");function QOe(){return zee===null&&(zee=typeof XDomainRequest!==c1,zee&&bme()&&(zee=zee&&!hkr(ri(pkr),"withCredentials"))),zee}a(QOe,"useXDomainRequest");function bme(){var t=!1;try{var e=ri(pkr);t=!!e}catch{}return t}a(bme,"isXhrSupported");var mkr=4294967296,YG=4294967295,gkr=123456789,Akr=987654321,ykr=!1,Tme=gkr,Sme=Akr;function mDi(t){t<0&&(t>>>=0),Tme=gkr+t&YG,Sme=Akr-t&YG,ykr=!0}a(mDi,"_mwcSeed");function gDi(){try{var t=yc()&2147483647;mDi((Math.random()*mkr^t)+t)}catch{}}a(gDi,"_autoSeedMwc");function bCt(t){var e=0,r=FOe()||UOe();return r&&r.getRandomValues&&(e=r.getRandomValues(new Uint32Array(1))[0]&YG),e===0&&zG()&&(ykr||gDi(),e=ADi()&YG),e===0&&(e=n1(mkr*Math.random()|0)),t||(e>>>=0),e}a(bCt,"random32");function ADi(t){Sme=36969*(Sme&65535)+(Sme>>16)&YG,Tme=18e3*(Tme&65535)+(Tme>>16)&YG;var e=(Sme<<16)+(Tme&65535)>>>0&YG|0;return t||(e>>>=0),e}a(ADi,"mwcRandom32");function TCt(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=bCt()>>>0,n=0,o=Go;o[on]>>=6,n===5&&(r=(bCt()<<2&4294967295|r&3)>>>0,n=0);return o}a(TCt,"newId");var Ekr="3.3.10",yDi="."+TCt(6),EDi=0;function Ckr(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}a(Ckr,"_canAcceptData");function CDi(t,e){var r=e[t.id];if(!r){r={};try{Ckr(e)&&pi(e,t.id,{e:!1,v:r})}catch{}}return r}a(CDi,"_getCache");function nT(t,e){return e===void 0&&(e=!1),$ee(t+EDi+++(e?"."+Ekr:Go)+yDi)}a(nT,"createUniqueNamespace");function qOe(t){var e={id:nT("_aiData-"+(t||Go)+"."+Ekr),accept:a(function(r){return Ckr(r)},"accept"),get:a(function(r,n,o,s){var c=r[e.id];return c?c[$ee(n)]:(s&&(c=CDi(e,r),c[$ee(n)]=o),o)},"get"),kill:a(function(r,n){if(r&&r[n])try{delete r[n]}catch{}},"kill")};return e}a(qOe,"createElmNodeData");f();function GOe(t){return t&&Fl(t)&&!Jt(t)&&(t.isVal||t.fb||cm(t,"v")||cm(t,"mrg")||cm(t,"ref")||t.set)}a(GOe,"_isConfigDefaults");function _kr(t,e,r){var n,o=r.dfVal||KZ;if(e&&r.fb){var s=r.fb;Jt(s)||(s=[s]);for(var c=0;c0&&lkr("Watcher error(s): ",A)}}a(p,"_notifyWatchers");function h(g){if(g&&g.h[on]>0){c||(c=[]),l||(l=df(function(){l=null,p()},0));for(var A=0;A0?Ec(ete(t[0],e),function(){RCt(BL(t,1),e,r)}):r(),n}a(RCt,"doUnloadAll");f();var Tkr=500,PCt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";f();f();function Skr(t){return{mrg:!0,v:t}}a(Skr,"cfgDfMerge");f();f();var kCt=[Gee,A8,Hee,pP],zOe=null,WOe;function wDi(t,e){return function(){var r=arguments,n=NCt(e);if(n){var o=n.listener;o&&o[t]&&o[t][f8](o,r)}}}a(wDi,"_listenerProxyFunc");function RDi(){var t=ri("Microsoft");return t&&(zOe=t.ApplicationInsights),zOe}a(RDi,"_getExtensionNamespace");function NCt(t){var e=zOe;return!e&&t.disableDbgExt!==!0&&(e=zOe||RDi()),e?e.ChromeDbgExt:null}a(NCt,"getDebugExt");function Ikr(t){if(!WOe){WOe={};for(var e=0;e=A&&(d[I](b[fP]),n[x]=!0)}else o>=A&&d[I](b[fP]);p(A,b)}},d.debugToConsole=function(A){DCt("debug",A),g("warning",A)},d[Lee]=function(A){DCt("warn",A),g("warning",A)},d.errorToConsole=function(A){DCt("error",A),g("error",A)},d.resetInternalMessageCount=function(){r=0,n={}},d.logInternalMessage=p,d[rT]=function(A){u&&u.rm(),u=null};function p(A,y){if(!m()){var E=!0,_=NDi+y[Qee];if(n[_]?E=!1:n[_]=!0,E&&(A<=s&&(d.queue[Pi](y),r++,g(A===1?"error":"warn",y)),r===c)){var v="Internal events throttle limit per PageView reached for this app.",b=new rte(23,v,!1);d.queue[Pi](b),A===1?d.errorToConsole(v):d[Lee](v)}}}a(p,"_logInternalMessage");function h(A){return A1(hf(A,DDi,d).cfg,function(y){var E=y.cfg;o=E[TOe],s=E.loggingLevelTelemetry,c=E.maxMessageLimit,l=E.enableDebug})}a(h,"_setDefaultsFromConfig");function m(){return r>=c}a(m,"_areInternalMessagesThrottled");function g(A,y){var E=NCt(e||{});E&&E[NE]&&E[NE](A,y)}a(g,"_debugExtMsg")})}return a(t,"DiagnosticLogger"),t.__ieDyn=1,t})();function Rkr(t){return t||new KG}a(Rkr,"_getLogger");function Qs(t,e,r,n,o,s){s===void 0&&(s=!1),Rkr(t)[AM](e,r,n,o,s)}a(Qs,"_throwInternal");function AP(t,e){Rkr(t)[Lee](e)}a(AP,"_warnToConsole");var MCt,v8,Pkr="toGMTString",kkr="toUTCString",LCt="cookie",OCt="expires",Nkr="isCookieUseDisabled",Nme="disableCookiesUsage",Dkr="_ckMgr",YOe=null,BCt=null,Mkr=null,yP,Okr={},Bkr={},ODi=(MCt={cookieCfg:Skr((v8={},v8[kOe]={fb:"cookieDomain",dfVal:y8},v8.path={fb:"cookiePath",dfVal:y8},v8.enabled=g1,v8.ignoreCookies=g1,v8.blockedCookies=g1,v8.disableCookieDefer=!1,v8)),cookieDomain:g1,cookiePath:g1},MCt[Nme]=g1,MCt);function FCt(){!yP&&(yP=rMe(function(){return Ju()}))}a(FCt,"_getDoc");function KOe(t){return t?t.isEnabled():!0}a(KOe,"_isMgrEnabled");function Gkr(t,e){return e&&t&&Jt(t.ignoreCookies)?uo(t.ignoreCookies,e)!==-1:!1}a(Gkr,"_isIgnoredCookie");function Lkr(t,e){return e&&t&&Jt(t.blockedCookies)&&uo(t.blockedCookies,e)!==-1?!0:Gkr(t,e)}a(Lkr,"_isBlockedCookie");function Fkr(t,e){var r=e[h8];if(Ht(r)){var n=void 0;ln(t[Nkr])||(n=!t[Nkr]),ln(t[Nme])||(n=!t[Nme]),r=n}return r}a(Fkr,"_isCfgEnabled");function UCt(t,e){var r,n,o,s,c,l,u,d,p=[];function h(E){var _,v=(_={},_[NOe]=E||"/",_[OCt]="Thu, 01 Jan 1970 00:00:01 GMT",_);return zG()||(v["max-age"]="0"),Qkr(Go,v)}a(h,"_formatDeletionValue");function m(E,_,v,b){var I={},x=ni(E||Go),R=nl(x,";");if(R!==-1&&(x=ni(W2(E,R)),I=Hkr(Sd(E,R+1))),bM(I,kOe,v||o,t1,ln),!Ht(_)){var w=zG();if(ln(I[OCt])){var P=yc(),k=P+_*1e3;if(k>0){var Q=new Date;Q.setTime(k),bM(I,OCt,Ukr(Q,w?Pkr:kkr)||Ukr(Q,w?Pkr:kkr)||Go,t1)}}w||bM(I,"max-age",Go+_,null,ln)}var M=Yee();return M&&M.protocol==="https:"&&(bM(I,"secure",null,null,ln),BCt===null&&(BCt=!jkr((Ql()||{})[mme])),BCt&&bM(I,"SameSite","None",null,ln)),bM(I,NOe,b||n,null,ln),Qkr(x,I)}a(m,"_formatSetCookieValue");function g(E){if(p)for(var _=p[on]-1;_>=0;_--)p[_].n===E&&p[tT](_,1)}a(g,"_removePendingCookie");function A(){kme(e)&&p&&(dt(p,function(E){Lkr(r,E.n)||(E.o===0?u(E.n,E.v):E.o===1&&d(E.n,E.v))}),p=[])}a(A,"_flushPendingCookies"),t=hf(t||Bkr,null,e).cfg,s=A1(t,function(E){E.setDf(E.cfg,ODi),r=E.ref(E.cfg,"cookieCfg"),n=r[NOe]||"/",o=r[kOe],r.disableCookieDefer?p=null:p===null&&(p=[]);var _=c;c=Fkr(t,r)!==!1,l=r.getCookie||BDi,u=r.setCookie||qkr,d=r.delCookie||qkr,!_&&c&&p&&A()},e);var y={isEnabled:a(function(){var E=Fkr(t,r)!==!1&&c&&kme(e),_=Bkr[Dkr];return E&&_&&y!==_&&(E=KOe(_)),E},"isEnabled"),setEnabled:a(function(E){r[h8]=E,ln(t[Nme])||(t[Nme]=!E)},"setEnabled"),set:a(function(E,_,v,b,I){var x=!1,R=Lkr(r,E);if(!R){var w=m(_,v,b,I);KOe(y)?(u(E,w),x=!0):p&&(g(E),p[Pi]({n:E,o:0,v:w}),x=!0)}return x},"set"),get:a(function(E){var _=Go,v=Gkr(r,E);if(!v){if(KOe(y))_=l(E);else if(p)for(var b=p[on]-1;b>=0;b--){var I=p[b];if(I.n===E){if(I.o===0){var x=I.v,R=nl(x,";");_=R!==-1?ni(W2(x,R)):ni(x)}break}}}return _},"get"),del:a(function(E,_){var v=!1;return KOe(y)?v=y.purge(E,_):p&&(g(E),p[Pi]({n:E,o:1,v:h(_)}),v=!0),v},"del"),purge:a(function(E,_){var v=!1;return kme(e)&&(d(E,h(_)),v=!0),v},"purge"),unload:a(function(E){s&&s.rm(),s=null,p=null},"unload")};return y[Dkr]=y,y}a(UCt,"createCookieMgr");function kme(t){if(YOe===null){YOe=!1,!yP&&FCt();try{var e=yP.v||{};YOe=e[LCt]!==void 0}catch(r){Qs(t,2,68,"Cannot access document.cookie - "+Wee(r),{exception:Xt(r)})}}return YOe}a(kme,"areCookiesSupported");function Hkr(t){var e={};if(t&&t[on]){var r=ni(t)[CM](";");dt(r,function(n){if(n=ni(n||Go),n){var o=nl(n,"=");o===-1?e[n]=null:e[ni(W2(n,o))]=ni(Sd(n,o+1))}})}return e}a(Hkr,"_extractParts");function Ukr(t,e){return Er(t[e])?t[e]():null}a(Ukr,"_formatDate");function Qkr(t,e){var r=t||Go;return Dr(e,function(n,o){r+="; "+n+(Ht(o)?Go:"="+o)}),r}a(Qkr,"_formatCookieValue");function BDi(t){var e=Go;if(!yP&&FCt(),yP.v){var r=yP.v[LCt]||Go;Mkr!==r&&(Okr=Hkr(r),Mkr=r),e=ni(Okr[t]||Go)}return e}a(BDi,"_getCookieValue");function qkr(t,e){!yP&&FCt(),yP.v&&(yP.v[LCt]=t+"="+e)}a(qkr,"_setCookieValue");function jkr(t){return Vn(t)?!!(th(t,"CPU iPhone OS 12")||th(t,"iPad; CPU OS 12")||th(t,"Macintosh; Intel Mac OS X 10_14")&&th(t,"Version/")&&th(t,"Safari")||th(t,"Macintosh; Intel Mac OS X 10_14")&&Z5(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||th(t,"Chrome/5")||th(t,"Chrome/6")||th(t,"UnrealEngine")&&!th(t,"Chrome")||th(t,"UCBrowser/12")||th(t,"UCBrowser/11")):!1}a(jkr,"uaDisallowsSameSiteNone");f();var LDi={perfEvtsSendAll:!1};function FDi(t){t.h=null;var e=t.cb;t.cb=[],dt(e,function(r){Td(r.fn,[r.arg])})}a(FDi,"_runScheduledListeners");function b8(t,e,r,n){dt(t,function(o){o&&o[e]&&(r?(r.cb[Pi]({fn:n,arg:o}),r.h=r.h||df(FDi,0,r)):Td(n,[o]))})}a(b8,"_runListeners");var QCt=(function(){function t(e){this.listeners=[];var r,n,o=[],s={h:null,cb:[]},c=hf(e,LDi);n=c[cP](function(l){r=!!l.cfg.perfEvtsSendAll}),Jn(t,this,function(l){pi(l,"listeners",{g:a(function(){return o},"g")}),l[Uee]=function(u){o[Pi](u)},l[Fee]=function(u){for(var d=uo(o,u);d>-1;)o[tT](d,1),d=uo(o,u)},l[Gee]=function(u){b8(o,Gee,s,function(d){d[Gee](u)})},l[A8]=function(u,d){b8(o,A8,s,function(p){p[A8](u,d)})},l[Hee]=function(u,d){b8(o,Hee,d?s:null,function(p){p[Hee](u,d)})},l[pP]=function(u){u&&(r||!u[gme]())&&b8(o,pP,null,function(d){u.isAsync?df(function(){return d[pP](u)},0):d[pP](u)})},l[wOe]=function(u){u&&u[on]&&b8(o,wOe,s,function(d){d[wOe](u)})},l[ROe]=function(u){u&&u[m1]&&b8(o,ROe,s,function(d){d[ROe](u)})},l[POe]=function(u,d){if(u>0){var p=d||0;b8(o,POe,s,function(h){h[POe](u,p)})}},l[rT]=function(u){var d=a(function(){n&&n.rm(),n=null,o=[],s.h&&s.h[lP](),s.h=null,s.cb=[]},"_finishUnload"),p;if(b8(o,"unload",null,function(h){var m=h[rT](u);m&&(p||(p=[]),p[Pi](m))}),p)return vu(function(h){return Ec(TMe(p),function(){d(),h()})});d()}})}return a(t,"NotificationManager"),t.__ieDyn=1,t})();f();var ite="ctx",GCt="ParentContextKey",Dme="ChildrenContextKey",UDi=null,ote=(function(){function t(e,r,n){var o=this;if(o.start=yc(),o[fx]=e,o.isAsync=n,o[gme]=function(){return!1},Er(r)){var s;pi(o,"payload",{g:a(function(){return!s&&Er(r)&&(s=r(),r=null),s},"g")})}o[HG]=function(c){return c?c===t[GCt]||c===t[Dme]?o[c]:(o[ite]||{})[c]:null},o[mx]=function(c,l){if(c)if(c===t[GCt])o[c]||(o[gme]=function(){return!0}),o[c]=l;else if(c===t[Dme])o[c]=l;else{var u=o[ite]=o[ite]||{};u[c]=l}},o.complete=function(){var c=0,l=o[HG](t[Dme]);if(Jt(l))for(var u=0;u0&&(dt(A,function(y){try{y.func.call(y.self,y.args)}catch(E){Qs(r[Gl],2,73,"Unexpected Exception during onComplete - "+Xt(E))}}),s=[])}return g}a(u,"_moveNext");function d(g,A){var y=null,E=e.cfg;if(E&&g){var _=E[vM];!_&&A&&(_={}),E[vM]=_,_=e.ref(E,vM),_&&(y=_[g],!y&&A&&(y={}),_[g]=y,y=e.ref(_,g))}return y}a(d,"_getExtCfg");function p(g,A){var y=d(g,!0);return A&&Dr(A,function(E,_){if(Ht(y[E])){var v=e.cfg[E];(v||!Ht(v))&&(y[E]=v)}Ime(e,y,E,_)}),e.setDf(y,A)}a(p,"_resolveExtCfg");function h(g,A,y){y===void 0&&(y=!1);var E,_=d(g,!1),v=e.cfg;return _&&(_[A]||!Ht(_[A]))?E=_[A]:(v[A]||!Ht(v[A]))&&(E=v[A]),E||!Ht(E)?E:y}a(h,"_getConfig");function m(g){for(var A;A=c._next();){var y=A[p8]();y&&g(y)}}return a(m,"_iterateChain"),c}a(WCt,"_createInternalContext");function iT(t,e,r,n){var o=hf(e),s=WCt(t,o,r,n),c=s.ctx;function l(d){var p=s._next();return p&&p[DE](d,c),!p}a(l,"_processNext");function u(d,p){return d===void 0&&(d=null),Jt(d)&&(d=T8(d,o.cfg,r,p)),iT(d||c[h1](),o.cfg,r,p)}return a(u,"_createNew"),c[up]=l,c[dP]=u,c}a(iT,"createProcessTelemetryContext");function ste(t,e,r){var n=hf(e.config),o=WCt(t,n,e,r),s=o.ctx;function c(u){var d=o._next();return d&&d[rT](s,u),!d}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Jt(u)&&(u=T8(u,n.cfg,e,d)),ste(u||s[h1](),e,d)}return a(l,"_createNew"),s[up]=c,s[dP]=l,s}a(ste,"createProcessTelemetryUnloadContext");function Mme(t,e,r){var n=hf(e.config),o=WCt(t,n,e,r),s=o.ctx;function c(u){return s.iterate(function(d){Er(d[GG])&&d[GG](s,u)})}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Jt(u)&&(u=T8(u,n.cfg,e,d)),Mme(u||s[h1](),e,d)}return a(l,"_createNew"),s[up]=c,s[dP]=l,s}a(Mme,"createProcessTelemetryUpdateContext");function T8(t,e,r,n){var o=null,s=!n;if(Jt(t)&&t[on]>0){var c=null;dt(t,function(l){if(!s&&n===l&&(s=!0),s&&l&&Er(l[DE])){var u=$Di(l,e,r);o||(o=u),c&&c._setNext(u),c=u}})}return n&&!o?T8([n],e,r):o}a(T8,"createTelemetryProxyChain");function $Di(t,e,r){var n=null,o=Er(t[DE]),s=Er(t[g8]),c;t?c=t[uP]+"-"+t[WG]+"-"+Ykr++:c="Unknown-0-"+Ykr++;var l={getPlugin:a(function(){return t},"getPlugin"),getNext:a(function(){return n},"getNext"),processTelemetry:p,unload:h,update:m,_id:c,_setNext:a(function(g){n=g},"_setNext")};function u(){var g;return t&&Er(t[zkr])&&(g=t[zkr]()),g||(g=iT(l,e,r)),g}a(u,"_getTelCtx");function d(g,A,y,E,_){var v=!1,b=t?t[uP]:HDi,I=g[Wkr];return I||(I=g[Wkr]={}),g.setNext(n),t&&mf(g[xd](),function(){return b+":"+y},function(){I[c]=!0;try{var x=n?n._id:Go;x&&(I[x]=!1),v=A(g)}catch(w){var R=n?I[n._id]:!0;R&&(v=!0),(!n||!R)&&Qs(g[NE](),1,73,"Plugin ["+b+"] failed during "+y+" - "+Xt(w)+", run flags: "+Xt(I))}},E,_),v}a(d,"_processChain");function p(g,A){A=A||u();function y(E){if(!t||!o)return!1;var _=TM(t);return _[p1]||_[yme]?!1:(s&&t[g8](n),t[DE](g,E),!0)}a(y,"_callProcessTelemetry"),d(A,y,"processTelemetry",function(){return{item:g}},!g.sync)||A[up](g)}a(p,"_processTelemetry");function h(g,A){function y(){var E=!1;if(t){var _=TM(t),v=t[xd]||_[xd];t&&(!v||v===g.core())&&!_[p1]&&(_[xd]=null,_[p1]=!0,_[kE]=!1,t[p1]&&t[p1](g,A)===!0&&(E=!0))}return E}a(y,"_callTeardown"),d(g,y,"unload",function(){},A.isAsync)||g[up](A)}a(h,"_unloadPlugin");function m(g,A){function y(){var E=!1;if(t){var _=TM(t),v=t[xd]||_[xd];t&&(!v||v===g.core())&&!_[p1]&&t[GG]&&t[GG](g,A)===!0&&(E=!0)}return E}a(y,"_callUpdate"),d(g,y,"update",function(){},!1)||g[up](A)}return a(m,"_updatePlugin"),Xf(l)}a($Di,"createTelemetryPluginProxy");var Kkr=(function(){function t(e,r,n,o){var s=this,c=iT(e,r,n,o);C8(s,c,Ul(c))}return a(t,"ProcessTelemetryContext"),t})();f();f();f();function Ome(){var t=[];function e(n){n&&t[Pi](n)}a(e,"_addHandler");function r(n,o){dt(t,function(s){try{s(n,o)}catch(c){Qs(n[NE](),2,73,"Unexpected error calling unload handler - "+Xt(c))}}),t=[]}return a(r,"_runHandlers"),{add:e,run:r}}a(Ome,"createUnloadHandlerContainer");f();var ZOe,e4e;function t4e(){var t=[];function e(n){var o=t;t=[],dt(o,function(s){try{(s.rm||s.remove).call(s)}catch(c){Qs(n,2,73,"Unloading:"+Xt(c))}}),ZOe&&o[on]>ZOe&&(e4e?e4e("doUnload",o):Qs(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}a(e,"_doUnload");function r(n){n&&(Zf(t,n),ZOe&&t[on]>ZOe&&(e4e?e4e("Add",t):Qs(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return a(r,"_addHook"),{run:e,add:r}}a(t4e,"createUnloadHookContainer");var zCt,S8="getPlugin",VDi=(zCt={},zCt[vM]={isVal:y8,v:{}},zCt),ate=(function(){function t(){var e=this,r,n,o,s,c;d(),Jn(t,e,function(p){p[yM]=function(h,m,g,A){u(h,m,A),r=!0},p[p1]=function(h,m){var g=p[xd];if(!g||h&&g!==h[xd]())return;var A,y=!1,E=h||ste(null,g,o&&o[S8]?o[S8]():o),_=m||{reason:0,isAsync:!1};function v(){y||(y=!0,s.run(E,m),c.run(E[NE]()),A===!0&&E[up](_),d())}return a(v,"_unloadCallback"),!p[m8]||p[m8](E,_,v)!==!0?v():A=!0,A},p[GG]=function(h,m){var g=p[xd];if(!g||h&&g!==h[xd]())return;var A,y=!1,E=h||Mme(null,g,o&&o[S8]?o[S8]():o),_=m||{reason:0};function v(){y||(y=!0,u(E.getCfg(),E.core(),E[h1]()))}return a(v,"_updateCallback"),!p._doUpdate||p._doUpdate(E,_,v)!==!0?v():A=!0,A},E8(p,"_addUnloadCb",function(){return s},"add"),E8(p,"_addHook",function(){return c},"add"),pi(p,"_unloadHooks",{g:a(function(){return c},"g")})}),e[NE]=function(p){return l(p)[NE]()},e[kE]=function(){return r},e.setInitialized=function(p){r=p},e[g8]=function(p){o=p},e[up]=function(p,h){h?h[up](p):o&&Er(o[DE])&&o[DE](p,null)},e._getTelCtx=l;function l(p){p===void 0&&(p=null);var h=p;if(!h){var m=n||iT(null,{},e[xd]);o&&o[S8]?h=m[dP](null,o[S8]):h=m[dP](null,o)}return h}a(l,"_getTelCtx");function u(p,h,m){hf(p,VDi,nte(h)),!m&&h&&(m=h[vOe]()[h1]());var g=o;o&&o[S8]&&(g=o[S8]()),e[xd]=h,n=iT(m,p,h,g)}a(u,"_setDefaults");function d(){r=!1,e[xd]=null,n=null,o=null,c=t4e(),s=Ome()}a(d,"_initDefaults")}return a(t,"BaseTelemetryPlugin"),t.__ieDyn=1,t})();function WDi(t,e,r){var n={id:e,fn:r};Zf(t,n);var o={remove:a(function(){dt(t,function(s,c){if(s.id===n.id)return t[tT](c,1),-1})},"remove")};return o}a(WDi,"_addInitializer");function zDi(t,e,r){for(var n=!1,o=t[on],s=0;s"},"v")})}a(i5i,"_createUnloadHook");var r4e=(function(){function t(){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,R,w,P,k,Q,M,D,G,O,N,F,U;Jn(t,this,function(L){Te(),L._getDbgPlgTargets=function(){return[w,o]},L[kE]=function(){return r},L.activeStatus=function(){return Q},L._setPendingStatus=function(){Q=3},L[yM]=function(Y,ee,Ee,Ae){g&&ec(Xkr),L[kE]()&&ec("Core cannot be initialized more than once"),e=hf(Y,YCt,Ee||L[Gl],!1),Y=e.cfg,Ne(e[cP](function(Ze){var vt=Ze.cfg;D=vt.initInMemoMaxSize||JDi,H(vt);var Nt=Ze.ref(Ze.cfg,vM);Dr(Nt,function(Gt){Ze.ref(Nt,Gt)})})),s=Ae,b=n5i(e,v,s&&L[pme](),b),te(),L[Gl]=Ee;var ve=Y[VG];if(p=[],p[Pi].apply(p,aG(aG([],ee,!1),ve,!1)),h=Y[$G],De(null),(!m||m[on]===0)&&ec("No "+$G+" available"),h&&h[on]>1){var We=L[p8]("TeeChannelController");(!We||!We.plugin)&&Qs(n,1,28,"TeeChannel required")}r5i(Y,R,n),R=null,r=!0,Q===d8.ACTIVE&&j()},L.getChannels=function(){var Y=[];return m&&dt(m,function(ee){Y[Pi](ee)}),Xf(Y)},L.track=function(Y){mf(L[jee](),function(){return"AppInsightsCore:track"},function(){Y===null&&(ae(Y),ec("Invalid telemetry item")),!Y[fx]&&Ht(Y[fx])&&(ae(Y),ec("telemetry name required")),Y.iKey=Y.iKey||x,Y.time=Y.time||Vee(new Date),Y.ver=Y.ver||"4.0",!g&&L[kE]()&&Q===d8.ACTIVE?fe()[up](Y):Q!==d8.INACTIVE&&o[on]<=D&&o[Pi](Y)},function(){return{item:Y}},!Y.sync)},L[vOe]=fe,L[pme]=function(){return s||(s=new QCt(e.cfg),L[YDi]=s),s},L[Uee]=function(Y){L.getNotifyMgr()[Uee](Y)},L[Fee]=function(Y){s&&s[Fee](Y)},L.getCookieMgr=function(){return u||(u=UCt(e.cfg,L[Gl])),u},L.setCookieMgr=function(Y){u!==Y&&(ete(u,!1),u=Y)},L[jee]=function(){return c||l||HCt()},L.setPerfMgr=function(Y){c=Y},L.eventCnt=function(){return o[on]},L.releaseQueue=function(){if(r&&o[on]>0){var Y=o;o=[],Q===2?dt(Y,function(ee){ee.iKey=ee.iKey||x,fe()[up](ee)}):Qs(n,2,20,"core init status is not active")}},L.pollInternalLogs=function(Y){return y=Y||null,U=!1,N&&N[lP](),ce(!0)};function H(Y){var ee=Y.instrumentationKey,Ee=Y.endpointUrl;if(Q!==3){if(Ht(ee)){x=null,Q=d8.INACTIVE;var Ae="Please provide instrumentation key";r?(Qs(n,1,100,Ae),j()):ec(Ae);return}var ve=[];Xp(ee)?(ve[Pi](ee),x=null):x=ee,Xp(Ee)?(ve[Pi](Ee),M=null):M=Ee,ve[on]?$(Y,ve):W()}}a(H,"_handleIKeyEndpointPromises");function $(Y,ee){G=!1,Q=3;var Ee=y8(Y.initTimeOut)?Y.initTimeOut:XDi,Ae=bMe(ee);O&&O[lP](),O=df(function(){O=null,G||W()},Ee),Ec(Ae,function(ve){try{if(G)return;if(!ve.rejected){var We=ve[EM];if(We&&We[on]){var Ze=We[0];if(x=Ze&&Ze[EM],We[on]>1){var vt=We[1];M=vt&&vt[EM]}}x&&(Y.instrumentationKey=x,Y.endpointUrl=M)}W()}catch{G||W()}})}a($,"_waitForInitPromises");function W(){G=!0,Ht(x)?(Q=d8.INACTIVE,Qs(n,1,112,"ikey can't be resolved from promises")):Q=d8.ACTIVE,j()}a(W,"_setStatus");function j(){r&&(L.releaseQueue(),L.pollInternalLogs())}a(j,"_releaseQueues");function ce(Y){if((!N||!N[h8])&&!U){var ee=Y||n&&n.queue[on]>0;ee&&(F||(F=!0,Ne(e[cP](function(Ee){var Ae=Ee.cfg.diagnosticLogInterval;(!Ae||!(Ae>0))&&(Ae=1e4);var ve=!1;N&&(ve=N[h8],N[lP]()),N=sMe(X,Ae),N.unref(),N[h8]=ve}))),N[h8]=!0)}return N}a(ce,"_startLogPoller"),L[pCt]=function(){U=!0,N&&N[lP](),X()},C8(L,function(){return A},["addTelemetryInitializer"]),L[rT]=function(Y,ee,Ee){Y===void 0&&(Y=!0),r||ec(KDi),g&&ec(Xkr);var Ae={reason:50,isAsync:Y,flushComplete:!1},ve;Y&&!ee&&(ve=vu(function(vt){ee=vt}));var We=ste(Ue(),L);We[hme](function(){v.run(L[Gl]),RCt([u,s,n],Y,function(){Te(),ee&&ee(Ae)})},L);function Ze(vt){Ae.flushComplete=vt,g=!0,_.run(We,Ae),L[pCt](),We[up](Ae)}return a(Ze,"_doUnload"),X(),le(Y,Ze,6,Ee)||Ze(!1),ve},L[p8]=Ve,L.addPlugin=function(Y,ee,Ee,Ae){if(!Y){Ae&&Ae(!1),Z(tNr);return}var ve=Ve(Y[uP]);if(ve&&!ee){Ae&&Ae(!1),Z("Plugin ["+Y[uP]+"] is already loaded!");return}var We={reason:16};function Ze(Gt){p[Pi](Y),We.added=[Y],De(We),Ae&&Ae(!0)}if(a(Ze,"_addPlugin"),ve){var vt=[ve.plugin],Nt={reason:2,isAsync:!!Ee};Ke(vt,Nt,function(Gt){Gt?(We.removed=vt,We.reason|=32,Ze(!0)):Ae&&Ae(!1)})}else Ze(!1)},L.updateCfg=function(Y,ee){ee===void 0&&(ee=!0);var Ee;if(L[kE]()){Ee={reason:1,cfg:e.cfg,oldCfg:eee({},e.cfg),newConfig:eee({},Y),merge:ee},Y=Ee.newConfig;var Ae=e.cfg;Y[VG]=Ae[VG],Y[$G]=Ae[$G]}e._block(function(ve){var We=ve.cfg;KCt(ve,We,Y,ee),ee||Dr(We,function(Ze){cm(Y,Ze)||ve.set(We,Ze,g1)}),ve.setDf(We,YCt)},!0),e.notify(),Ee&&xe(Ee)},L.evtNamespace=function(){return E},L.flush=le,L.getTraceCtx=function(Y){return I||(I=Vkr()),I},L.setTraceCtx=function(Y){I=Y||null},L.addUnloadHook=Ne,E8(L,"addUnloadCb",function(){return _},"add"),L.onCfgChange=function(Y){var ee;return r?ee=A1(e.cfg,Y,L[Gl]):ee=t5i(R,Y),i5i(ee)},L.getWParam=function(){return J5()||e.cfg.enableWParam?0:-1};function J(){var Y={};P=[];var ee=a(function(Ee){Ee&&dt(Ee,function(Ae){if(Ae[uP]&&Ae[bOe]&&!Y[Ae.identifier]){var ve=Ae[uP]+"="+Ae[bOe];P[Pi](ve),Y[Ae.identifier]=Ae}})},"_addPluginVersions");ee(m),h&&dt(h,function(Ee){ee(Ee)}),ee(p)}a(J,"_setPluginVersions");function Te(){r=!1,e=hf({},YCt,L[Gl]),e.cfg[TOe]=1,pi(L,"config",{g:a(function(){return e.cfg},"g"),s:a(function(ee){L.updateCfg(ee,!1)},"s")}),pi(L,"pluginVersionStringArr",{g:a(function(){return P||J(),P},"g")}),pi(L,"pluginVersionString",{g:a(function(){return k||(P||J(),k=P.join(";")),k||Go},"g")}),pi(L,"logger",{g:a(function(){return n||(n=new KG(e.cfg),e[Gl]=n),n},"g"),s:a(function(ee){e[Gl]=ee,n!==ee&&(ete(n,!1),n=ee)},"s")}),L[Gl]=new KG(e.cfg),w=[];var Y=L.config[VG]||[];Y.splice(0,Y[on]),Zf(Y,w),A=new Jkr,o=[],ete(s,!1),s=null,c=null,l=null,ete(u,!1),u=null,d=null,p=[],h=null,m=null,g=!1,y=null,E=nT("AIBaseCore",!0),_=Ome(),I=null,x=null,v=t4e(),R=[],k=null,P=null,U=!1,N=null,F=!1,Q=0,M=null,D=null,G=!1,O=null}a(Te,"_initDefaults");function fe(){var Y=iT(Ue(),e.cfg,L);return Y[hme](ce),Y}a(fe,"_createTelCtx");function De(Y){var ee=e5i(L[Gl],Tkr,p);d=null,k=null,P=null,m=(h||[])[0]||[],m=XOe(Zf(m,ee[$G]));var Ee=Zf(XOe(ee[xd]),m);w=Xf(Ee);var Ae=L.config[VG]||[];Ae.splice(0,Ae[on]),Zf(Ae,w);var ve=fe();m&&m[on]>0&&VCt(ve[dP](m),Ee),VCt(ve,Ee),Y&&xe(Y)}a(De,"_initPluginChain");function Ve(Y){var ee=null,Ee=null,Ae=[];return dt(w,function(ve){if(ve[uP]===Y&&ve!==A)return Ee=ve,-1;ve.getChannel&&Ae[Pi](ve)}),!Ee&&Ae[on]>0&&dt(Ae,function(ve){if(Ee=ve.getChannel(Y),!Ee)return-1}),Ee&&(ee={plugin:Ee,setEnabled:a(function(ve){TM(Ee)[yme]=!ve},"setEnabled"),isEnabled:a(function(){var ve=TM(Ee);return!ve[p1]&&!ve[yme]},"isEnabled"),remove:a(function(ve,We){ve===void 0&&(ve=!0);var Ze=[Ee],vt={reason:1,isAsync:ve};Ke(Ze,vt,function(Nt){Nt&&De({reason:32,removed:Ze}),We&&We(Nt)})},"remove")}),ee}a(Ve,"_getPlugin");function Ue(){if(!d){var Y=(w||[]).slice();uo(Y,A)===-1&&Y[Pi](A),d=T8(XOe(Y),e.cfg,L)}return d}a(Ue,"_getPluginChain");function Ke(Y,ee,Ee){if(Y&&Y[on]>0){var Ae=T8(Y,e.cfg,L),ve=ste(Ae,L);ve[hme](function(){var We=!1,Ze=[];dt(p,function(Nt,Gt){Zkr(Nt,Y)?We=!0:Ze[Pi](Nt)}),p=Ze,k=null,P=null;var vt=[];h&&(dt(h,function(Nt,Gt){var Qt=[];dt(Nt,function(ue){Zkr(ue,Y)?We=!0:Qt[Pi](ue)}),vt[Pi](Qt)}),h=vt),Ee&&Ee(We),ce()}),ve[up](ee)}else Ee(!1)}a(Ke,"_removePlugins");function X(){if(n&&n.queue){var Y=n.queue.slice(0);n.queue[on]=0,dt(Y,function(ee){var Ee={name:y||"InternalMessageId: "+ee[Qee],iKey:x,time:Vee(new Date),baseType:rte.dataType,baseData:{message:ee[fP]}};L.track(Ee)})}}a(X,"_flushInternalLogs");function le(Y,ee,Ee,Ae){var ve=1,We=!1,Ze=null;Ae=Ae||5e3;function vt(){ve--,We&&ve===0&&(Ze&&Ze[lP](),Ze=null,ee&&ee(We),ee=null)}if(a(vt,"doCallback"),m&&m[on]>0){var Nt=fe()[dP](m);Nt.iterate(function(Gt){if(Gt.flush){ve++;var Qt=!1;Gt.flush(Y,function(){Qt=!0,vt()},Ee)||Qt||(Y&&Ze==null?Ze=df(function(){Ze=null,vt()},Ae):vt())}})}return We=!0,vt(),!0}a(le,"_flushChannels");function te(){var Y;Ne(e[cP](function(ee){var Ee=ee.cfg.enablePerfMgr;if(Ee){var Ae=ee.cfg[xOe];(Y!==Ae||!Y)&&(Ae||(Ae=ZDi),DOe(ee.cfg,xOe,Ae),Y=Ae,l=null),!c&&!l&&Er(Ae)&&(l=Ae(L,L[pme]()))}else l=null,Y=null}))}a(te,"_initPerfManager");function xe(Y){var ee=Mme(Ue(),L);ee[hme](ce),(!L._updateHook||L._updateHook(ee,Y)!==!0)&&ee[up](Y)}a(xe,"_doUpdate");function Z(Y){var ee=L[Gl];ee?(Qs(ee,2,73,Y),ce()):ec(Y)}a(Z,"_logOrThrowError");function ae(Y){var ee=L[pme]();ee&&ee[A8]([Y],2)}a(ae,"_notifyInvalidEvent");function Ne(Y){v.add(Y)}a(Ne,"_addUnloadHook")})}return a(t,"AppInsightsCore"),t.__ieDyn=1,t})();f();var gx="",o5i="NoResponseBody",rNr="&"+o5i+"=true",JCt="POST",n4e=(function(){function t(){var e=0,r,n,o,s,c,l,u,d,p,h,m,g,A,y;Jn(t,this,function(E,_){var v=!0;G(),E[yM]=function(O,N){o=N,n&&Qs(o,1,28,"Sender is already initialized"),E.SetConfig(O),n=!0},E._getDbgPlgTargets=function(){return[n,s,l,r]},E.SetConfig=function(O){try{if(c=O.senderOnCompleteCallBack||{},l=!!O.disableCredentials,u=O.fetchCredentials,s=!!O.isOneDs,r=!!O.enableSendPromise,p=!!O.disableXhr,h=!!O.disableBeacon,m=!!O.disableBeaconSync,y=O.timeWrapper,A=!!O.addNoResponse,g=!!O.disableFetchKeepAlive,d={sendPOST:Q},s||(v=!1),l){var N=Yee();N&&N.protocol&&N.protocol[qG]()==="file:"&&(v=!1)}return!0}catch{}return!1},E.getSyncFetchPayload=function(){return e},E.getSenderInst=function(O,N){return O&&O[on]?R(O,N):null},E.getFallbackInst=function(){return d},E[m8]=function(O,N){G()},E.preparePayload=function(O,N,F,U){if(!N||U||!F[m1]){O(F);return}try{var L=ri("CompressionStream");if(!Er(L)){O(F);return}var H=new ReadableStream({start:a(function(Te){Te.enqueue(Vn(F[m1])?new TextEncoder().encode(F[m1]):F[m1]),Te.close()},"start")}),$=H.pipeThrough(new L("gzip")),W=$.getReader(),j=[],ce=0,J=!1;return Ec(W.read(),a(function Te(fe){if(!J&&!fe.rejected){var De=fe[EM];if(!De.done)return j[Pi](De[EM]),ce+=De.value[on],Ec(W.read(),Te);for(var Ve=new Uint8Array(ce),Ue=0,Ke=0,X=j;Ke0&&(dt(Ul(Ve),function(te){J.append(te,Ve[te])}),Ue[Ame]=J),u?Ue.credentials=u:v&&s&&(Ue.credentials="include"),F&&(Ue.keepalive=!0,e+=Te,s?O._sendReason===2&&(fe=!0,A&&(L+=rNr)):fe=!0);var Ke=new Request(L,Ue);try{Ke[PCt]=!0}catch{}if(!F&&r&&(W=vu(function(te,xe){j=te,ce=xe})),!L){x(N),j&&j(!1);return}function X(te,xe){xe?w(N,s?0:xe,{},s?gx:te):w(N,s?0:400,{},s?gx:te)}a(X,"_handleError");function le(te,xe,Z){var ae=te[hx],Ne=c.fetchOnComplete;Ne&&Er(Ne)?Ne(te,N,Z||gx,xe):w(N,ae,{},Z||gx)}a(le,"_onFetchComplete");try{Ec(fetch(s?L:Ke,s?Ue:null),function(te){if(F&&(e-=Te,Te=0),!De)if(De=!0,te.rejected)X(te.reason&&te.reason[fP],499),ce&&ce(te.reason);else{var xe=te[EM];try{!s&&!xe.ok?(xe[hx]?X(xe.statusText,xe[hx]):X(xe.statusText,499),j&&j(!1)):s&&!xe.body?(le(xe,null,gx),j&&j(!0)):Ec(xe.text(),function(Z){le(xe,O,Z[EM]),j&&j(!0)})}catch(Z){xe&&xe[hx]?X(Xt(Z),xe[hx]):X(Xt(Z),499),ce&&ce(Z)}}})}catch(te){De||(X(Xt(te),499),ce&&ce(te))}return fe&&!De&&(De=!0,w(N,200,{}),j&&j(!0)),s&&!De&&O[jG]>0&&y&&y.set(function(){De||(De=!0,w(N,500,{}),j&&j(!0))},O[jG]),W}a(M,"_doFetchSender");function D(O,N,F){var U=Xu(),L=new XDomainRequest,H=O[m1];L.onload=function(){var J=mP(L),Te=c&&c.xdrOnComplete;Te&&Er(Te)?Te(L,N,O):w(N,200,{},J)},L.onerror=function(){w(N,400,{},s?gx:OOe(L))},L.ontimeout=function(){w(N,500,{})},L.onprogress=function(){};var $=U&&U.location&&U.location.protocol||"",W=O[qee];if(!W){x(N);return}if(!s&&W.lastIndexOf($,0)!==0){var j="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Qs(o,2,40,". "+j),I(j,N);return}var ce=s?W:W[px](/^(https?:)/,"");L.open(JCt,ce),O[jG]&&(L[jG]=O[jG]),L.send(H),s&&F?y&&y.set(function(){L.send(H)},0):L.send(H)}a(D,"_xdrSender");function G(){e=0,n=!1,r=!1,o=null,s=null,c=null,l=null,u=null,d=null,p=!1,h=!1,m=!1,g=!1,A=!1,y=null}a(G,"_initDefaults")})}return a(t,"SenderPostManager"),t.__ieDyn=1,t})();f();var lNr="on",nNr="attachEvent",iNr="addEventListener",oNr="detachEvent",sNr="removeEventListener",XCt="events",Fme="visibilitychange",o4e="pagehide",uNr="pageshow",dNr="unload",fNr="beforeunload",pNr=nT("aiEvtPageHide"),hNr=nT("aiEvtPageShow"),s5i=/\.[\.]+/g,a5i=/[\.]+$/,c5i=1,i4e=qOe("events"),l5i=/^([^.]*)(?:\.(.+)|)/;function aNr(t){return t&&t[px]?t[px](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Go):t}a(aNr,"_normalizeNamespace");function ZCt(t,e){if(e){var r=Go;Jt(e)?(r=Go,dt(e,function(o){o=aNr(o),o&&(o[0]!=="."&&(o="."+o),r+=o)})):r=aNr(e),r&&(r[0]!=="."&&(r="."+r),t=(t||Go)+r)}var n=l5i.exec(t||Go)||[];return{type:n[1],ns:(n[2]||Go).replace(s5i,".").replace(a5i,Go)[CM](".").sort().join(".")}}a(ZCt,"_getEvtNamespace");function mNr(t,e,r){r===void 0&&(r=!0);var n=i4e.get(t,XCt,{},r),o=n[e];return o||(o=n[e]=[]),o}a(mNr,"_getRegisteredEvents");function gNr(t,e,r,n){t&&e&&e[_M]&&(t[sNr]?t[sNr](e[_M],r,n):t[oNr]&&t[oNr](lNr+e[_M],r))}a(gNr,"_doDetach");function u5i(t,e,r,n){var o=!1;return t&&e&&e[_M]&&r&&(t[iNr]?(t[iNr](e[_M],r,n),o=!0):t[nNr]&&(t[nNr](lNr+e[_M],r),o=!0)),o}a(u5i,"_doAttach");function cNr(t,e,r,n){for(var o=e[on];o--;){var s=e[o];s&&(!r.ns||r.ns===s[mCt].ns)&&(!n||n(s))&&(gNr(t,s[mCt],s.handler,s.capture),e[tT](o,1))}}a(cNr,"_doUnregister");function d5i(t,e,r){if(e[_M])cNr(t,mNr(t,e[_M]),e,r);else{var n=i4e.get(t,XCt,{});Dr(n,function(o,s){cNr(t,s,e,r)}),Ul(n)[on]===0&&i4e.kill(t,XCt)}}a(d5i,"_unregisterEvents");function x8(t,e){var r;return e?(Jt(e)?r=[t].concat(e):r=[t,e],r=ZCt("xx",r).ns[CM](".")):r=t,r}a(x8,"mergeEvtNamespace");function Bme(t,e,r,n,o){o===void 0&&(o=!1);var s=!1;if(t)try{var c=ZCt(e,n);if(s=u5i(t,c,r,o),s&&i4e.accept(t)){var l={guid:c5i++,evtName:c,handler:r,capture:o};mNr(t,c.type)[Pi](l)}}catch{}return s}a(Bme,"eventOn");function Lme(t,e,r,n,o){if(o===void 0&&(o=!1),t)try{var s=ZCt(e,n),c=!1;d5i(t,s,function(l){return s.ns&&!r||l.handler===r?(c=!0,!0):!1}),c||gNr(t,s,r,o)}catch{}}a(Lme,"eventOff");function e_t(t,e,r){var n=!1,o=Xu();o&&(n=Bme(o,t,e,r),n=Bme(o.body,t,e,r)||n);var s=Ju();return s&&(n=Bme(s,t,e,r)||n),n}a(e_t,"addEventHandler");function t_t(t,e,r){var n=Xu();n&&(Lme(n,t,e,r),Lme(n.body,t,e,r));var o=Ju();o&&Lme(o,t,e,r)}a(t_t,"removeEventHandler");function cte(t,e,r,n){var o=!1;return e&&t&&t[on]>0&&dt(t,function(s){s&&(!r||uo(r,s)===-1)&&(o=e_t(s,e,n)||o)}),o}a(cte,"_addEventListeners");function r_t(t,e,r,n){var o=!1;return e&&t&&Jt(t)&&(o=cte(t,e,r,n),!o&&r&&r[on]>0&&(o=cte(t,e,null,n))),o}a(r_t,"addEventListeners");function JG(t,e,r){t&&Jt(t)&&dt(t,function(n){n&&t_t(n,e,r)})}a(JG,"removeEventListeners");function s4e(t,e,r){return r_t([fNr,dNr,o4e],t,e,r)}a(s4e,"addPageUnloadEventListener");function a4e(t,e){JG([fNr,dNr,o4e],t,e)}a(a4e,"removePageUnloadEventListener");function Ume(t,e,r){function n(c){var l=Ju();t&&l&&l.visibilityState==="hidden"&&t(c)}a(n,"_handlePageVisibility");var o=x8(pNr,r),s=cte([o4e],t,e,o);return(!e||uo(e,Fme)===-1)&&(s=cte([Fme],n,e,o)||s),!s&&e&&(s=Ume(t,null,r)),s}a(Ume,"addPageHideEventListener");function c4e(t,e){var r=x8(pNr,e);JG([o4e],t,r),JG([Fme],null,r)}a(c4e,"removePageHideEventListener");function Qme(t,e,r){function n(c){var l=Ju();t&&l&&l.visibilityState==="visible"&&t(c)}a(n,"_handlePageVisibility");var o=x8(hNr,r),s=cte([uNr],t,e,o);return s=cte([Fme],n,e,o)||s,!s&&e&&(s=Qme(t,null,r)),s}a(Qme,"addPageShowEventListener");function l4e(t,e){var r=x8(hNr,e);JG([uNr],t,r),JG([Fme],null,r)}a(l4e,"removePageShowEventListener");f();var lte="",ANr="https://browser.events.data.microsoft.com/OneCollector/1.0/",n_t="version",u4e="properties";f();f();var i_t="initialize",o_t="indexOf",EP="timings",s_t="pollInternalLogs",y1="value",d4e="length",f4e="processTelemetryStart";var SM,yNr="4.3.10",qme="1DS-Web-JS-"+yNr,ENr=vhe.hasOwnProperty;var _5i=(SM={},SM[0]=0,SM[2]=6,SM[1]=1,SM[3]=7,SM[4098]=6,SM[4097]=1,SM[4099]=7,SM);var v5i=J5(),b5i=ZZ();function oT(t){return!(t===lte||Ht(t))}a(oT,"isValueAssigned");function a_t(t){if(t){var e=nl(t,"-");if(e>-1)return W2(t,e)}return lte}a(a_t,"getTenantId");function c_t(t){return!!(t&&Jf(t)&&t>=1&&t<=4)}a(c_t,"isLatency");function l_t(t,e,r){if(!e&&!oT(e)||typeof t!="string")return null;var n=typeof e;if(n==="string"||n==="number"||n==="boolean"||Jt(e))e={value:e};else if(n==="object"&&!ENr.call(e,"value"))e={value:r?JSON.stringify(e):e};else if(Ht(e[y1])||e[y1]===lte||!Vn(e[y1])&&!Jf(e[y1])&&!tx(e[y1])&&!Jt(e[y1]))return null;if(Jt(e[y1])&&!_Nr(e[y1]))return null;if(!Ht(e.kind)){if(Jt(e[y1])||!CNr(e.kind))return null;e[y1]=e[y1].toString()}return e}a(l_t,"sanitizeProperty");function Gme(t,e,r){var n=-1;if(!ln(t))if(e>0&&(e===32?n=8192:e<=13&&(n=e<<5)),T5i(r))n===-1&&(n=0),n|=r;else{var o=_5i[p4e(t)]||-1;n!==-1&&o!==-1?n|=o:o===6&&(n=o)}return n}a(Gme,"getCommonSchemaMetaData");function ute(t,e,r,n,o){var s={},c=!1,l=0,u=arguments[d4e],d=arguments;for(tx(d[0])&&(c=d[0],l++);l0&&t<=13||t===32}a(CNr,"isValueKind");function T5i(t){return t>=0&&t<=9}a(T5i,"isDataType");function _Nr(t){return t[d4e]>0}a(_Nr,"isArrayValid");function h4e(t,e){var r=t;r[EP]=r[EP]||{},r[EP][f4e]=r[EP][f4e]||{},r[EP][f4e][e]=E1()}a(h4e,"setProcessTelemetryTimings");function p4e(t){var e=0;if(t!=null){var r=typeof t;r==="string"?e=1:r==="number"?e=2:r==="boolean"?e=3:r===zb&&(e=4,Jt(t)?(e=4096,t[d4e]>0&&(e|=p4e(t[0]))):ENr.call(t,"value")&&(e=8192|p4e(t[y1])))}return e}a(p4e,"getFieldValueType");function u_t(){return!!ri("chrome")}a(u_t,"isChromium");function XG(t){return t>0}a(XG,"isGreaterThanZero");var S5i=$A({endpointUrl:ANr,propertyStorageOverride:{isVal:I5i}});function I5i(t){return t&&(!t.getProperty||!t.setProperty)&&ec("Invalid property storage override passed."),!0}a(I5i,"_chkPropOverride");var d_t=(function(t){xg(e,t);function e(){var r=t.call(this)||this;return Jn(e,r,function(n,o){n[i_t]=function(s,c,l,u){mf(n,function(){return"AppInsightsCore.initialize"},function(){try{o[i_t](hf(s,S5i,l||n.logger,!1).cfg,c,l,u)}catch(h){var d=n.logger,p=Xt(h);p[o_t]("channels")!==-1&&(p+=` - - Channels must be provided through config.channels only!`),Qs(d,1,514,"SDK Initialization Failed - no telemetry will be sent: "+p)}},function(){return{config:s,extensions:c,logger:l,notificationManager:u}})},n.track=function(s){mf(n,function(){return"AppInsightsCore.track"},function(){var c=s;if(c){c[EP]=c[EP]||{},c[EP].trackStart=E1(),c_t(c.latency)||(c.latency=1);var l=c.ext=c.ext||{};l.sdk=l.sdk||{},l.sdk.ver=qme;var u=c.baseData=c.baseData||{};u[u4e]=u[u4e]||{};var d=u[u4e];d[n_t]=d[n_t]||n.pluginVersionString||lte}o.track(c)},function(){return{item:s}},!s.sync)},n[s_t]=function(s){return o[s_t](s||"InternalLog")}}),r}return a(e,"AppInsightsCore"),e.__ieDyn=1,e})(r4e);f();f();var Hme="REAL_TIME",vNr="NEAR_REAL_TIME",bNr="BEST_EFFORT";f();f();f();var Ax="";var m4e="drop",TNr="send",f_t="requeue",SNr="rspFail",INr="oth",p_t="no-cache, no-store",g4e="application/x-json-stream",jme="cache-control",dte="content-type",xNr="kill-tokens",wNr="kill-duration";var RNr="time-delta-millis",A4e="client-version",h_t="client-id",y4e="time-delta-to-apply-millis",E4e="upload-time",C4e="apikey",$me="AuthMsaDeviceTicket",m_t="WebAuthToken",g_t="AuthXToken";var PNr="NoResponseBody",fte="msfpc",A_t="trace",_4e="user";f();var Vme="allowRequestSending",v4e="shouldAddClockSkewHeaders",b4e="getClockSkewHeaderValue",Wme="setClockSkew",fo="length",CP="concat",C1="iKey",wd="count",_P="events",dp="push",vP="split",T4e="toLowerCase",ZG="hdrs",S4e="useHdrs",eH="initialize",I4e="setTimeoutOverride",x4e="clearTimeoutOverride",kNr="payloadPreprocessor",y_t="overrideEndpointUrl",E_t="avoidOptions",NNr="disableEventTimings",w4e="enableCompoundKey",C_t="disableXhrSync",__t="disableFetchKeepAlive",DNr="addNoResponse",v_t="useSendBeacon",b_t="fetchCredentials",T_t="alwaysUseXhrOverride",R4e="serializeOfflineEvt",P4e="getOfflineRequestDetails",k4e="createPayload",zme="createOneDSPayload",S_t="payloadBlob",yx="headers",pte="_thePayload",kg="batches",ME="sendType",Yme="canSendRequest",hte="sendQueuedRequests",Kme="setUnloading",MNr="isTenantKilled",N4e="sendSynchronousBatch",D4e="_transport",mte="getWParam",I_t="isBeacon",Jme="timings",M4e="isTeardown",O4e="_sendReason",B4e="setKillSwitchTenants",L4e="_backOffTransmission",Xme="identifier",ONr="ignoreMc1Ms0CookieProcessing",x_t="autoFlushEventsLimit",BNr="disableAutoBatchFlushLimit",LNr="overrideInstrumentationKey",Zme="sendAttempt",w8="latency",tH="sync";function UNr(t){var e=(t.ext||{}).intweb;return e&&oT(e[fte])?e[fte]:null}a(UNr,"_getEventMsfpc");function FNr(t){for(var e=null,r=0;e===null&&ryc()?!0:(delete s[c],!1)}})}return a(t,"KillSwitch"),t.__ieDyn=1,t})();f();var w5i=.8,R5i=1.2,GNr=3e3,P5i=6e5;function HNr(t){return!(t>=300&&t<500&&t!=429||t==501||t==505)}a(HNr,"retryPolicyShouldRetryForStatus");function F4e(t){var e=0,r=GNr*w5i,n=GNr*R5i,o=n1(Math.random()*(n-r))+r;return e=Math.pow(2,t)*o,DL(e,P5i)}a(F4e,"retryPolicyGetMillisToBackoffForRetry");f();var k5i=20,N5i=3145728,$Nr=65e3,VNr=2e6,D5i=DL(VNr,$Nr),jNr="metadata",U4e="f",M5i=/\./,WNr=(function(){function t(e,r,n,o,s,c,l){var u="data",d="baseData",p="ext",h=!!o,m=!0,g=r,A={},y=!!c,E=s||Gme,_=O5i(l),v=Q4e(_.requestLimit,N5i,0),b=Q4e(_.requestLimit,$Nr,1),I=Q4e(_.recordLimit,VNr,0),x=Math.min(Q4e(_.recordLimit,D5i,1),b);Jn(t,this,function(R){R.createPayload=function(k,Q,M,D,G,O){return{apiKeys:[],payloadBlob:Ax,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:k,isTeardown:Q,isSync:M,isBeacon:D,sendType:O,sendReason:G}},R.appendPayload=function(k,Q,M){var D=k&&Q&&!k.overflow;return D&&mf(e,function(){return"Serializer:appendPayload"},function(){for(var G=Q.events(),O=k.payloadBlob,N=k.numEvents,F=!1,U=[],L=[],H=k.isBeacon,$=H?b:v,W=H?x:I,j=0,ce=0;j=M){k.overflow=Q.split(j);break}var Te=R.getEventBlob(J);if(Te&&Te.length<=W){var fe=Te.length,De=O.length;if(De+fe>$){k.overflow=Q.split(j);break}O&&(O+=` -`),O+=Te,ce++,ce>k5i&&(tMe(O,0,1),ce=0),F=!0,N++}else Te?U.push(J):L.push(J),G.splice(j,1),j--}j++}if(U.length>0&&k.sizeExceed.push(R8.create(Q.iKey(),U)),L.length>0&&k.failedEvts.push(R8.create(Q.iKey(),L)),F){k.batches.push(Q),k.payloadBlob=O,k.numEvents=N;var Ve=Q.iKey();uo(k.apiKeys,Ve)===-1&&k.apiKeys.push(Ve)}},function(){return{payload:k,theBatch:{iKey:Q.iKey(),evts:Q.events()},max:M}}),D},R.getEventBlob=function(k){try{return mf(e,function(){return"Serializer.getEventBlob"},function(){var Q={};Q.name=k.name,Q.time=k.time,Q.ver=k.ver,Q.iKey="o:"+a_t(k.iKey);var M={},D;y||(D=a(function(F,U,L){B5i(E,M,F,U,L)},"_addMetadataCallback"));var G=k[p];G&&(Q[p]=M,Dr(G,function(F,U){var L=M[F]={};P(U,L,"ext."+F,!0,null,null,!0)}));var O=Q[u]={};O.baseType=k.baseType;var N=O[d]={};return P(k.baseData,N,d,!1,[d],D,m),P(k.data,O,u,!1,[],D,m),JSON.stringify(Q)},function(){return{item:k}})}catch{return null}};function w(k,Q){var M=A[k];return M===void 0&&(k.length>=7&&(M=tee(k,"ext.metadata")||tee(k,"ext.web")),A[k]=M),M}a(w,"_isReservedField");function P(k,Q,M,D,G,O,N){Dr(k,function(F,U){var L=null;if(U||oT(U)){var H=M,$=F,W=G,j=Q;if(h&&!D&&M5i.test(F)){var ce=F.split("."),J=ce.length;if(J>1){W&&(W=W.slice());for(var Te=0;Te0&&n<=e)return n}return e}a(Q4e,"_validateSizeLimit");function O5i(t){var e={};return t&&t.requestLimit?t.requestLimit:e}a(O5i,"_getSizeLimtCfg");function B5i(t,e,r,n,o){if(o&&e){var s=t(o.value,o.kind,o.propertyType);if(s>-1){var c=e[jNr];c||(c=e[jNr]={f:{}});var l=c[U4e];if(l||(l=c[U4e]={}),r)for(var u=0;u0)for(var o=e[T4e](),s=0;s0&&(n&&R_t[e]?(t[ZG][R_t[e]]=r,t[S4e]=!0):t.url+="&"+e+"="+r)}a(Ate,"_addRequestDetails");function Q5i(t,e,r){for(var n=0;n=0&&U.splice(Le,1)},"rm")}},J[R4e]=function(ye){try{if(b)return b.getEventBlob(ye)}catch{}return Ax},J[P4e]=function(){try{var ye=b&&b[k4e](0,!1,!1,!1,1,0);return Ae(ye,w)}catch{}return null},J[zme]=function(ye,Le){try{var $e=[];dt(ye,function(se){Le&&(se=hP(se));var Ce=R8.create(se[C1],[se]);$e[dp](Ce)});for(var rt=null;$e[fo]>0&&b;){var ot=$e.shift();ot&&ot[wd]()>0&&(rt=rt||b[k4e](0,!1,!1,!1,1,0),b.appendPayload(rt,ot,ce))}var ft=Ae(rt,w),z={data:rt[S_t],urlString:ft.url,headers:ft[ZG],timeout:P,disableXhrSync:Q,disableFetchKeepAlive:M};return w&&(q4e(z[yx],jme)||(z[yx][jme]=p_t),q4e(z[yx],dte)||(z[yx][dte]=g4e)),z}catch{}return null};function fe(ye,Le){try{return W&&W.getSenderInst(ye,Le)}catch{}return null}a(fe,"_getSenderInterface"),J._getDbgPlgTargets=function(){return[g[0],c,b,g,De(),s,ce]};function De(){try{var ye={xdrOnComplete:Ve,fetchOnComplete:Ke,xhrOnComplete:X,beaconOnRetry:te},Le={enableSendPromise:!1,isOneDs:!0,disableCredentials:!Te,fetchCredentials:j,disableXhr:!1,disableBeacon:!d,disableBeaconSync:!d,disableFetchKeepAlive:M,timeWrapper:H,addNoResponse:G,senderOnCompleteCallBack:ye};return Le}catch{}return null}a(De,"_getSendPostMgrConfig");function Ve(ye,Le,$e){var rt=mP(ye);le(Le,200,{},rt),Be(rt)}a(Ve,"_xdrOncomplete");function Ue(){var ye;s=null,c=new qNr,l=!1,u=new QNr,d=!1,p=0,h=null,m=null,g=null,A=null,y=!0,E=[],_={},v=[],b=null,I=!1,x=null,R=!1,w=!1,P=ye,Q=ye,M=ye,D=ye,G=ye,O=[],N=ye,F=ye,U=[],L=!1,H=gte(),$=!1,W=null,ce=null}a(Ue,"_initDefaults");function Ke(ye,Le,$e,rt){var ot=a(function(se,Ce,we){le(Le,se,Ce,we),Be(we)},"handleResponse"),ft={},z=ye[yx];z&&z.forEach(function(se,Ce){ft[Ce]=se}),ot(ye.status,ft,$e||Ax)}a(Ke,"_fetchOnComplete");function X(ye,Le,$e){var rt=mP(ye);le(Le,ye.status,_8(ye,!0),rt),Be(rt)}a(X,"_xhrOnComplete");function le(ye,Le,$e,rt){try{ye(Le,$e,rt)}catch(ot){Qs(m,2,518,Xt(ot))}}a(le,"_doOnComplete");function te(ye,Le,$e){var rt=ye,ot=200,ft=rt[pte],z=ye.urlString+(G?L5i:Ax);try{var se=Ql();if(ft){var Ce=!!A.getPlugin("LocalStorage"),we=[],je=[];dt(ft[kg],function(Ye){if(we&&Ye&&Ye[wd]()>0)for(var gt=Ye[_P](),xt=0;xt0&&(ft.sentEvts=je),Ce||et(we,8003,ft[ME],!0)}else ot=0}catch(Ye){AP(m,"Failed to send telemetry using sendBeacon API. Ex:"+Xt(Ye)),ot=0}finally{le(Le,ot,{},Ax)}}a(te,"_onBeaconRetry");function xe(ye){return ye===2||ye===3}a(xe,"_isBeaconPayload");function Z(ye){return R&&xe(ye)&&(ye=2),ye}a(Z,"_adjustSendType"),J.addHeader=function(ye,Le){_[ye]=Le},J.removeHeader=function(ye){delete _[ye]},J[Yme]=function(){return ae()&&u[Vme]()},J[hte]=function(ye,Le){ln(ye)&&(ye=0),R&&(ye=Z(ye),Le=2),Y(v,ye,0)&&Ee(Ne(),0,!1,ye,Le||0)},J.isCompletelyIdle=function(){return!l&&p===0&&v[fo]===0},J[Kme]=function(ye){R=ye},J.addBatch=function(ye){if(ye&&ye[wd]()>0){if(c.isTenantKilled(ye[C1]()))return!1;v[dp](ye)}return!0},J.teardown=function(){v[fo]>0&&Ee(Ne(),0,!0,2,2),dt(O,function(ye){ye&&ye.rm&&ye.rm()}),O=[]},J.pause=function(){l=!0},J.resume=function(){l=!1,J[hte](0,4)},J[N4e]=function(ye,Le,$e){ye&&ye[wd]()>0&&(Ht(Le)&&(Le=1),R&&(Le=Z(Le),$e=2),Ee([ye],0,!1,Le,$e||0))};function ae(){return!l&&p0&&!l&&g[Le]&&b&&(rt=Le!==0||ae()&&($e>0||u[Vme]())),rt}a(Y,"_canSendPayload");function ee(ye){var Le={};return ye&&dt(ye,function($e,rt){Le[rt]={iKey:$e[C1](),evts:$e[_P]()}}),Le}a(ee,"_createDebugBatches");function Ee(ye,Le,$e,rt,ot){if(!(!ye||ye[fo]===0)){if(l){et(ye,1,rt);return}rt=Z(rt);try{var ft=ye,z=rt!==0;mf(A,function(){return"HttpManager:_sendBatches"},function(se){se&&(ye=ye.slice(0));for(var Ce=[],we=null,je=E1(),Ye=g[rt]||(z?g[1]:g[0]),gt=Ye&&Ye[D4e],xt=D&&(R||xe(rt)||gt===3||Ye._isSync&>===2);Y(ye,rt,Le);){var Bt=ye.shift();Bt&&Bt[wd]()>0&&(c.isTenantKilled(Bt[C1]())?Ce[dp](Bt):(we=we||b[k4e](Le,$e,z,xt,ot,rt),b.appendPayload(we,Bt,ce)?we.overflow!==null&&(ye=[we.overflow][CP](ye),we.overflow=null,We(we,je,E1(),ot),je=E1(),we=null):(We(we,je,E1(),ot),je=E1(),ye=[Bt][CP](ye),we=null)))}we&&We(we,je,E1(),ot),ye[fo]>0&&(v=ye[CP](v)),et(Ce,8004,rt)},function(){return{batches:ee(ft),retryCount:Le,isTeardown:$e,isSynchronous:z,sendReason:ot,useSendBeacon:xe(rt),sendType:rt}},!z)}catch(se){Qs(m,2,48,"Unexpected Exception sending batch: "+Xt(se))}}}a(Ee,"_sendBatches");function Ae(ye,Le){var $e={url:s,hdrs:{},useHdrs:!1};Le?($e[ZG]=ute($e[ZG],_),$e.useHdrs=Ul($e.hdrs)[fo]>0):Dr(_,function(se,Ce){P_t[se]?Ate($e,P_t[se],Ce,!1):($e[ZG][se]=Ce,$e[S4e]=!0)}),Ate($e,h_t,"NO_AUTH",Le),Ate($e,A4e,qme,Le);var rt=Ax;dt(ye.apiKeys,function(se){rt[fo]>0&&(rt+=","),rt+=se}),Ate($e,C4e,rt,Le),Ate($e,E4e,yc().toString(),Le);var ot=ue(ye);if(oT(ot)&&($e.url+="&ext.intweb.msfpc="+ot),u[v4e]()&&Ate($e,y4e,u[b4e](),Le),A[mte]){var ft=A[mte]();ft>=0&&($e.url+="&w="+ft)}for(var z=0;z0){var ot=!!N,ft=g[ye.sendType];!xe(ye[ME])&&ye[I_t]&&ye.sendReason===2&&(ft=g[2]||g[3]||ft);var z=w;(ye.isBeacon||ft[D4e]===3)&&(z=!1);var se=Ae(ye,z);z=z||se[S4e];var Ce=E1();mf(A,function(){return"HttpManager:_doPayloadSend"},function(){for(var we=0;we0?xt[w_t]++:xt[w_t]=1}et(ye[kg],1e3+(rt||0),ye[ME],!0);var Ct={data:ye[S_t],urlString:se.url,headers:se[ZG],_thePayload:ye,_sendReason:rt,timeout:P,disableXhrSync:Q,disableFetchKeepAlive:M};z&&(q4e(Ct[yx],jme)||(Ct[yx][jme]=p_t),q4e(Ct[yx],dte)||(Ct[yx][dte]=g4e));var Ie=null;ft&&(Ie=a(function(K){u.firstRequestSent();var pe=a(function(ne,V){vt(ne,V,ye,rt)},"onComplete"),me=ye[M4e]||ye.isSync;W.preparePayload(function(ne){try{ft.sendPOST(ne,pe,me),F&&F(Ct,ne,me,ye[I_t])}catch(V){le(pe,0,{}),AP(m,"Unexpected exception sending payload. Ex:"+Xt(V))}},k,K,me)},"sender")),mf(A,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ie)if(ye[ME]===0&&p++,ot&&!ye.isBeacon&&ft[D4e]!==3){var K={data:Ct.data,urlString:Ct.urlString,headers:ute({},Ct[yx]),timeout:Ct.timeout,disableXhrSync:Ct[C_t],disableFetchKeepAlive:Ct[__t]},pe=!1;mf(A,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{N(K,function(me){pe=!0,!y&&!me[pte]&&(me[pte]=me[pte]||Ct[pte],me[O4e]=me[O4e]||Ct[O4e]),Ie(me)},ye.isSync||ye[M4e])}catch{pe||Ie(Ct)}})}else Ie(Ct)})},function(){return{thePayload:ye,serializationStart:Le,serializationCompleted:$e,sendReason:rt}},ye.isSync)}ye.sizeExceed&&ye.sizeExceed[fo]>0&&et(ye.sizeExceed,8003,ye[ME]),ye.failedEvts&&ye.failedEvts[fo]>0&&et(ye.failedEvts,8002,ye[ME])}a(We,"_doPayloadSend");function Ze(ye,Le){I&&dt(ye,function($e){var rt=$e[Jme]=$e[Jme]||{};ve(rt,"sendEventCompleted",Le)})}a(Ze,"_addEventCompletedTimings");function vt(ye,Le,$e,rt){var ot=9e3,ft=null,z=!1,se=!1;try{var Ce=!0;if(typeof ye!==c1){if(Le){u[Wme](Le[RNr]);var we=Le[wNr]||Le["kill-duration-seconds"];dt(c[B4e](Le[xNr],we),function(Ye){dt($e[kg],function(gt){if(gt[C1]()===Ye){ft=ft||[];var xt=gt[vP](0);$e.numEvents-=xt[wd](),ft[dp](xt)}})})}if(ye==200||ye==204){ot=200;return}(!HNr(ye)||$e.numEvents<=0)&&(Ce=!1),ot=9e3+ye%1e3}if(Ce){ot=100;var je=$e.retryCnt;$e[ME]===0&&(je0&&Ze($e[_P](),Le)})}}a(Gt,"_addCompleteTimings");function Qt(ye,Le,$e){Le?ye():H.set(ye,$e)}a(Qt,"_doAction");function ue(ye){for(var Le=0;Le0&&o){var ot=o[ut(Le)];if(ot){var ft=$e!==0;mf(A,function(){return"HttpManager:_sendBatchesNotification"},function(){Qt(function(){try{ot.call(o,ye,Le,ft,$e)}catch(z){Qs(m,1,74,"send request notification failed: "+z)}},rt||ft,0)},function(){return{batches:ee(ye),reason:Le,isSync:ft,sendSync:rt,sendType:$e}},!ft)}}}a(et,"_sendBatchesNotification");function ut(ye){var Le=U5i[ye];return oT(Le)||(Le=INr,ye>=9e3&&ye<=9999?Le=SNr:ye>=8e3&&ye<=8999?Le=m4e:ye>=1e3&&ye<=1999&&(Le=TNr)),Le}a(ut,"_getNotificationAction")})}return a(t,"HttpManager"),t.__ieDyn=1,t})();var G5i=.25,JNr=500,H5i=20,XNr=6,ZNr=2,j5i=4,YNr=2,$5i=1,k_t=1e4,iH="eventsDiscarded",KNr="",n0=void 0,V5i=$A({eventsLimitInMem:{isVal:XG,v:k_t},immediateEventLimit:{isVal:XG,v:500},autoFlushEventsLimit:{isVal:XG,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:W5i,v:n0},overrideInstrumentationKey:n0,overrideEndpointUrl:n0,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:n0,clearTimeoutOverride:n0,payloadPreprocessor:n0,payloadListener:n0,disableEventTimings:n0,valueSanitizer:n0,stringifyObjects:n0,enableCompoundKey:n0,disableOptimizeObj:!1,fetchCredentials:n0,transports:n0,unloadTransports:n0,useSendBeacon:n0,disableFetchKeepAlive:n0,avoidOptions:!1,xhrTimeout:n0,disableXhrSync:n0,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:Jf,v:XNr},maxUnloadEventRetryAttempts:{isVal:Jf,v:ZNr},addNoResponse:n0,maxEvtPerBatch:{isVal:Jf,v:JNr},excludeCsMetaData:n0,requestLimit:{}});function W5i(t){return t&&t.sendPOST}a(W5i,"isOverrideFn");var N_t=(function(t){xg(e,t);function e(){var r=t.call(this)||this;r.identifier="PostChannel",r.priority=1011,r.version="4.3.10";var n,o=!1,s=[],c,l=!1,u=0,d,p=0,h,m={},g=Hme,A,y,E,_,v,b,I,x,R,w,P,k,Q,M,D,G,O,N,F,U,L,H,$;return Jn(e,r,function(W,j){xe(),W._getDbgPlgTargets=function(){return[v,n]},W[eH]=function(z,se,Ce){mf(se,function(){return"PostChannel:initialize"},function(){j[eH](z,se,Ce),F=se.getNotifyMgr();try{D=x8(nT(W[Xme]),se.evtNamespace&&se.evtNamespace()),W._addHook(A1(z,function(we){var je=we.cfg,Ye=iT(null,je,se);n=Ye.getExtCfg(W[Xme],V5i),G=gte(n[I4e],n[x4e]),P=!n.disableOptimizeObj&&u_t(),O=n[ONr],J(se),h=n.eventsLimitInMem,d=n.immediateEventLimit,I=n[x_t],Q=n.maxEventRetryAttempts,M=n.maxUnloadEventRetryAttempts,N=n[BNr],$=n.maxEvtPerBatch,Xp(je.endpointUrl)?W.pause():l&&W.resume(),ft(),L=n[LNr],H=!!n.disableTelemetry,U&&ce();var gt=je.disablePageUnloadEvents||[];U=s4e(De,gt,D),U=Ume(De,gt,D)||U,U=Qme(Ve,je.disablePageShowEvents,D)||U})),v[eH](z,W.core,W)}catch(we){throw W.setInitialized(!1),we}},function(){return{theConfig:z,core:se,extensions:Ce}})},W.processTelemetry=function(z,se){h4e(z,W[Xme]),se=se||W._getTelCtx(se);var Ce=z;!H&&!o&&(L&&(Ce[C1]=L),Ke(Ce,!0),k?Ne(2,2):te()),W.processNext(Ce,se)},W.getOfflineSupport=function(){try{var z=v&&v[P4e]();if(v)return{getUrl:a(function(){return z?z.url:null},"getUrl"),serialize:fe,batch:Te,shouldProcess:a(function(se){return!H},"shouldProcess"),createPayload:a(function(se){return null},"createPayload"),createOneDSPayload:a(function(se){if(v[zme])return v[zme](se,P)},"createOneDSPayload")}}catch{}return null},W._doTeardown=function(z,se){Ne(2,2),o=!0,v.teardown(),ce(),xe()};function ce(){a4e(null,D),c4e(null,D),l4e(null,D)}a(ce,"_removeUnloadHandlers");function J(z){var se=z[mte];z[mte]=function(){var Ce=0;return O&&(Ce=Ce|2),Ce|se.call(z)}}a(J,"_hookWParam");function Te(z){var se=KNr;return z&&z[fo]&&dt(z,function(Ce){se&&(se+=` -`),se+=Ce}),se}a(Te,"_batch");function fe(z){var se=KNr;try{Ue(z),se=v[R4e](z)}catch{}return se}a(fe,"_serialize");function De(z){var se=z||Xu().event;se.type!=="beforeunload"&&(k=!0,v[Kme](k)),Ne(2,2)}a(De,"_handleUnloadEvents");function Ve(z){k=!1,v[Kme](k)}a(Ve,"_handleShowEvents");function Ue(z){z.ext&&z.ext[A_t]&&delete z.ext[A_t],z.ext&&z.ext[_4e]&&z.ext[_4e].id&&delete z.ext[_4e].id,P&&(z.ext=hP(z.ext),z.baseData&&(z.baseData=hP(z.baseData)),z.data&&(z.data=hP(z.data)))}a(Ue,"_cleanEvent");function Ke(z,se){if(z[Zme]||(z[Zme]=0),z[w8]||(z[w8]=1),Ue(z),z[tH]){if(E||l)z[w8]=3,z[tH]=!1;else if(v){P&&(z=hP(z)),v[N4e](R8.create(z[C1],[z]),z[tH]===!0?1:z[tH],3);return}}var Ce=z[w8],we=p,je=h;Ce===4&&(we=u,je=d);var Ye=!1;if(wez;if(!Ce&&x>0)for(var we=1;!Ce&&we<=3;we++){var je=b[we];je&&je[kg]&&dt(je[kg],function(Ye){Ye&&Ye[wd]()>=x&&(Ce=!0)})}Ee(!0,Ce)},W.pause=function(){ae(),l=!0,v&&v.pause()},W.resume=function(){l=!1,v&&v.resume(),te()},W._loadTransmitProfiles=function(z){Gt(),Dr(z,function(se,Ce){var we=Ce[fo];if(we>=2){var je=we>2?Ce[2]:0;if(Ce.splice(0,we-2),Ce[1]<0&&(Ce[0]=-1),Ce[1]>0&&Ce[0]>0){var Ye=Ce[0]/Ce[1];Ce[0]=QRr(Ye)*Ce[1]}je>=0&&Ce[1]>=0&&je>Ce[1]&&(je=Ce[1]),Ce[dp](je),m[se]=Ce}})},W.flush=function(z,se,Ce){z===void 0&&(z=!0);var we;if(!l)if(Ce=Ce||1,z)se||(we=vu(function(Ye){se=Ye})),c==null?(ae(),Ze(1,0,Ce),c=Z(function(){c=null,vt(se,Ce)},0)):s[dp](se);else{var je=ae();X(1,1,Ce),se&&se(),je&&te()}return we},W.setMsaAuthTicket=function(z){v.addHeader($me,z)},W.setAuthPluginHeader=function(z){v.addHeader(m_t,z)},W.removeAuthPluginHeader=function(){v.removeHeader(m_t)},W.hasEvents=le,W._setTransmitProfile=function(z){g!==z&&m[z]!==void 0&&(ae(),g=z,te())},C8(W,function(){return v},["addResponseHandler"]);function X(z,se,Ce){var we=Ze(z,se,Ce);return v[hte](se,Ce),we}a(X,"_sendEventsForLatencyAndAbove");function le(){return p>0}a(le,"_hasEvents");function te(){if(R>=0&&Ze(R,0,w)&&v[hte](0,w),u>0&&!y&&!l){var z=m[g][2];z>=0&&(y=Z(function(){y=null,X(4,0,1),te()},z))}var se=m[g][1];!A&&!c&&se>=0&&!l&&(le()?A=Z(function(){A=null,X(_===0?3:1,0,1),_++,_%=2,te()},se):_=0)}a(te,"_scheduleTimer"),W[L4e]=function(){E0&&p>I&&(se=!0),se&&c==null&&W.flush(z,function(){},20))}a(Ee,"_performAutoFlush");function Ae(z,se){P&&(z=hP(z));var Ce=z[w8],we=ee(z[C1],Ce,!0);return we.addEvent(z)?(Ce!==4?(p++,se&&z[Zme]===0&&Ee(!z.sync,x>0&&we[wd]()>=x)):u++,!0):!1}a(Ae,"_addEventToProperQueue");function ve(z,se,Ce,we){for(;Ce<=se;){var je=ee(z,se,!0);if(je&&je[wd]()>0){var Ye=je[vP](0,we),gt=Ye[wd]();if(gt>0)return Ce===4?u-=gt:p-=gt,ut(iH,[Ye],aP.QueueFull),!0}Ce++}return We(),!1}a(ve,"_dropEventWithLatencyOrLess");function We(){for(var z=0,se=0,Ce=a(function(je){var Ye=b[je];Ye&&Ye[kg]&&dt(Ye[kg],function(gt){je===4?z+=gt[wd]():se+=gt[wd]()})},"_loop_1"),we=1;we<=4;we++)Ce(we);p=se,u=z}a(We,"_resetQueueCounts");function Ze(z,se,Ce){var we=!1,je=se===0;return!je||v[Yme]()?mf(W.core,function(){return"PostChannel._queueBatches"},function(){for(var Ye=[],gt=4;gt>=z;){var xt=b[gt];xt&&xt.batches&&xt.batches[fo]>0&&(dt(xt[kg],function(Bt){v.addBatch(Bt)?we=we||Bt&&Bt[wd]()>0:Ye=Ye[CP](Bt[_P]()),gt===4?u-=Bt[wd]():p-=Bt[wd]()}),xt[kg]=[],xt.iKeyMap={}),gt--}Ye[fo]>0&&et(iH,Ye,aP.KillSwitch),we&&R>=z&&(R=-1,w=0)},function(){return{latency:z,sendType:se,sendReason:Ce}},!je):(R=R>=0?DL(R,z):z,w=rx(w,Ce)),we}a(Ze,"_queueBatches");function vt(z,se){X(1,0,se),We(),Nt(function(){z&&z(),s[fo]>0?c=Z(function(){c=null,vt(s.shift(),se)},0):(c=null,te())})}a(vt,"_flushImpl");function Nt(z){v.isCompletelyIdle()?z():c=Z(function(){c=null,Nt(z)},G5i)}a(Nt,"_waitForIdleManager");function Gt(){ae(),Qt(),g=Hme,te()}a(Gt,"_resetTransmitProfiles");function Qt(){m={},m[Hme]=[2,1,0],m[vNr]=[6,3,0],m[bNr]=[18,9,0]}a(Qt,"_initializeProfiles");function ue(z,se){var Ce=[],we=Q;k&&(we=M),dt(z,function(je){je&&je[wd]()>0&&dt(je[_P](),function(Ye){Ye&&(Ye[tH]&&(Ye[w8]=4,Ye[tH]=!1),Ye[Zme]0&&et(iH,Ce,aP.NonRetryableStatus),k&&Ne(2,2)}a(ue,"_requeueEvents");function Be(z,se){var Ce=F||{},we=Ce[z];if(we)try{we.apply(Ce,se)}catch(je){Qs(W.diagLog(),1,74,z+" notification failed: "+je)}}a(Be,"_callNotification");function et(z,se){for(var Ce=[],we=2;we0&&Be(z,[se][CP](Ce))}a(et,"_notifyEvents");function ut(z,se){for(var Ce=[],we=2;we0&&dt(se,function(je){je&&je[wd]()>0&&Be(z,[je.events()][CP](Ce))})}a(ut,"_notifyBatchEvents");function ye(z,se,Ce){z&&z[fo]>0&&Be("eventsSendRequest",[se>=1e3&&se<=1999?se-1e3:0,Ce!==!0])}a(ye,"_sendingEvent");function Le(z,se){ut("eventsSent",z,se),te()}a(Le,"_eventsSentEvent");function $e(z,se){ut(iH,z,se>=8e3&&se<=8999?se-8e3:aP.Unknown)}a($e,"_eventsDropped");function rt(z){ut(iH,z,aP.NonRetryableStatus),te()}a(rt,"_eventsResponseFail");function ot(z,se){ut(iH,z,aP.Unknown),te()}a(ot,"_otherEvent");function ft(){N?x=0:x=rx($*(YNr+1),h/6)}a(ft,"_setAutoLimits")}),r}return a(e,"PostChannel"),e.__ieDyn=1,e})(ate);var _1=de(require("os"));var G4e=class{constructor(e,r,n,o=!0,s){this.ctx=e;this.namespace=r;this.internalOnly=o;this.onCopilotToken=a(async e=>{this.token=e,this.commonProperties["common.isinternal"]=e?.isInternalUser()?"true":"false",await this.refreshGitHubHandleInCommonProperties();let r=e.getTokenValue("tid");r!==void 0&&(this.tags["ai.user.id"]=r)},"onCopilotToken");this.client=this.initializeClient(n),this.tags=z5i(e),this.commonProperties=Y5i(e),this.#e=ss(e,this.onCopilotToken),s&&this.onCopilotToken(s)}static{a(this,"Msft1dsReporter")}#e;initializeClient(e){try{let r=new d_t,n=new N_t,o={instrumentationKey:e,loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[n]]},s={alwaysUseXhrOverride:!0,httpXHROverride:this.createXhrOverride()};return o.extensionConfig={},o.extensionConfig[n.identifier]=s,r.initialize(o,[]),r.addTelemetryInitializer(c=>{let l=c.ext??{},u=l.web??{};u.consentDetails='{"GPC_DataSharingOptIn":false}',l.web=u,c.ext=l,c.tags={...c.tags??{},...this.tags}}),r}catch(r){_r.error(this.ctx,"Failed to initialize MSFT 1DS reporter",r)}}sendTelemetryEvent(e,r,n){if(!this.client||this.internalOnly&&!this.token?.isInternalUser())return;r={...r,...this.commonProperties};let o=this.qualifyEventName(e);try{this.client.track({name:o,baseData:{name:o,properties:r,measurements:n}})}catch(s){_r.debug(this.ctx,"Error tracking telemetry event",s)}}sendTelemetryErrorEvent(e,r,n){this.sendTelemetryEvent(this.qualifyEventName(e),r,n)}async dispose(){this.#e.dispose(),await this.client?.unload(!0,void 0,200)}qualifyEventName(e){return e.startsWith(this.namespace)?e:`${this.namespace}/${e}`}async refreshGitHubHandleInCommonProperties(){try{let e=await this.ctx.get(en).getSession();e?.login?this.commonProperties["common.github_handle"]=e.login:delete this.commonProperties["common.github_handle"]}catch(e){_r.debug(this.ctx,"Error resolving GitHub handle for telemetry",e)}}createXhrOverride(){return{sendPOST:a((e,r)=>{if(typeof e.data!="string")throw new Error(`Telemetry reporter only supports string payloads, received ${typeof e.data}`);let n=e.headers??{};n["Content-Type"]="application/json";let o={method:"POST",headers:n,body:e.data};this.ctx.get(dr).fetch(e.urlString,o).then(s=>s.text().then(c=>{r(s.status,Object.fromEntries(s.headers),c)})).catch(s=>{_r.debug(this.ctx,"Error sending telemetry",s),r(0,{})})},"sendPOST")}}};function z5i(t){let e={},r=t.get(Ks);e["ai.session.id"]=r.sessionId;let n=t.get(_d);return n.trackingId&&(e["ai.user.id"]=n.trackingId),e["ai.cloud.roleInstance"]="REDACTED",e["ai.device.osVersion"]=`${_1.type()} ${_1.release()}`,e["ai.device.osArchitecture"]=_1.arch(),e["ai.device.osPlatform"]=_1.platform(),e["ai.cloud.role"]="Web",e["ai.application.ver"]=t.get(Ko).getVersion(),e}a(z5i,"getTags");function Y5i(t){let e={};e.common_os=_1.platform(),e.common_platformversion=_1.release(),e.common_arch=_1.arch(),e.common_cpu=Array.from(new Set(_1.cpus().map(n=>n.model))).join();let r=t.get(Ks);return e.common_vscodemachineid=r.machineId,e.common_vscodesessionid=r.sessionId,e.client_deviceid=r.devDeviceId,e.common_uikind=r.uiKind,e.common_remotename=r.remoteName,e.common_isnewappinstall="",e}a(Y5i,"getCommonProperties");var K5i="7d7048df-6dd0-4048-bb23-b716c1461f8f",J5i="3fdd7f28-937a-48c8-9a21-ba337db23bd1",X5i="f0000000-0000-0000-0000-000000000000",Z5i="b73649cf-ca8f-4768-9e0e-b789d8529db5",eMi="ec712b3202c5462fb6877acae7f1f9d7-c19ad55e-3e3c-4f99-984b-827f6d95bd9e-6917";function eDr(t){return new URL(t).hostname==="github.com"?Bq.telemetry:t.replace("://","://copilot-telemetry-service.")}a(eDr,"getEndpointForServerUrl");var i0=class{constructor(e,r){this.ctx=e;this.namespace=r;this.serverUrl="https://github.com/";this.rootUrl=eDr(this.serverUrl);this.shuttingDown=new Set;ss(e,n=>{this.cachedToken=n,this.updateServiceEndpoints(n.endpoints)})}static{a(this,"TelemetryInitialization")}get endpointUrl(){return this.overrideEndpointUrlForTesting||new URL("telemetry",this.rootUrl).href}get isInitialized(){return this.initializedWith!==void 0}get isEnabled(){return this._enabled??!1}initialize(e){let r=this.ctx;this._enabled=e;let n=this.endpointUrl;if(!(this.initializedWith?.enabled===this._enabled&&this.initializedWith?.endpointUrl===this.endpointUrl)&&(this.shutdownWithoutWaiting(),this.initializedWith={endpointUrl:n,enabled:this._enabled},e)){let o=r.get(np);o.setReporter(new QG(r,this.namespace,{instrumentationKey:K5i,endpointUrl:n})),o.setRestrictedReporter(new QG(r,this.namespace,{instrumentationKey:J5i,endpointUrl:n})),o.setFTReporter(new QG(r,this.namespace,{instrumentationKey:X5i,endpointUrl:n,includeAuthorizationHeader:!0})),o.setMsftReporter(new QG(r,`copilot/${this.namespace}`,{instrumentationKey:Z5i,excludeCommonTags:!0,excludeCommonProperties:!0})),o.setMsft1pReporter(new G4e(r,"ThirdParty.copilot-chat",eMi,!0,this.cachedToken))}}setCustomReporters(e,r){this.shutdownWithoutWaiting();let n=this.ctx.get(np);n.setReporter(e),n.setRestrictedReporter(r)}async shutdown(){this.shutdownWithoutWaiting(),await Promise.all(this.shuttingDown)}shutdownWithoutWaiting(){this.initializedWith=void 0;let e=this.ctx.get(np).deactivate().finally(()=>{this.shuttingDown.delete(e)});this.shuttingDown.add(e)}updateSessionConfig(e){e?.serverUrl&&e.serverUrl!==this.serverUrl&&(this.serverUrl=e.serverUrl,this.rootUrl=eDr(e.serverUrl)),this.isInitialized&&this.initialize(this._enabled)}updateServiceEndpoints(e){this.rootUrl=e.telemetry,this.isInitialized&&this.initialize(this._enabled)}};async function tMi(t,e){let r="copilot_internal/subscribe_limited_user";try{return(await(await mu(t,e,r,{method:"POST",headers:{"X-GitHub-Api-Version":"2025-05-01"},body:JSON.stringify({restricted_telemetry:t.get(i0).isEnabled?"enabled":"disabled",public_code_suggestions:"enabled"})})).json()).subscribed}catch(n){return e1.exception(t,n,"signUpLimited failed"),!1}}a(tMi,"apiFetchSignUpLimited");async function M_t(t,e,r){let n=await t.get(Ot).getTokenResult();switch(n.failureKind){case void 0:return"OK";case"HTTP401":case"NotSignedIn":return"NotSignedIn";case"NotAuthorized":return r&&n.canSignUpForLimited&&await tMi(t,e)?M_t(t,e,!1):"NotAuthorized";case"Exception":throw n.exception}}a(M_t,"getTokenWithSignUpLimited");var en=class{constructor(e,r){this.ctx=e;this.env=r}static{a(this,"AuthManager")}hasTransientSession(){return this.transientSession!==void 0}get _copilotTokenManager(){return this.ctx.get(Ot)}getConfiguredUrls(){return this.ctx.get(jp).getConfiguredUrls()}async checkAndUpdateStatus(e){let r=e?.localChecksOnly??!1,n;return e?.githubAppId!==void 0?n=await this.getPersistedSession(e):n=await this.getSession(),n===void 0?(this._copilotTokenManager.resetToken("session_not_found"),await this._copilotTokenManager.primeToken(),{status:"NotSignedIn"}):r?{status:"MaybeOK",user:n.login}:(e?.forceRefresh&&this._copilotTokenManager.resetToken("force_refresh"),{status:await M_t(this.ctx,n,e?.freshSignIn??!1),user:n.login})}async getSession(){await this.ctx.get(Qc).requireReady();let e=O_t(this.env)??await this.transientSession;if(!(e&&e.accessToken===void 0))return e?{...e,...HA(e)}:await this.getPersistedSession()}setTransientSession(e){this.transientSession=e&&Promise.resolve(e),this._copilotTokenManager.resetToken("set_transient_session")}getAuthAuthority(){return this.ctx.get(jp).getAuthAuthority()}},H4e=class extends en{static{a(this,"PersistentAuthManager")}get authPersistence(){return this.ctx.get($5)}normalizeScopes(e){if(e)return typeof e=="string"?e.split(" ").filter(r=>r.length>0):e}async saveAndActivateSession(e){await this.authPersistence.saveAuthRecord(e),this.authPersistence.purgeLegacyAuthRecords().catch(()=>{});let r=!this.hasTransientSession();return await this.checkAndUpdateStatus({forceRefresh:r,freshSignIn:r})}async deleteAndDeactivateAllSessions(){return await this.authPersistence.deleteAllAuthRecords(),this.setTransientSession(void 0),await this.checkAndUpdateStatus({forceRefresh:!0})}async getPersistedSession(e){let r=await this.authPersistence.getAuthRecord({...e,authAuthority:this.getAuthAuthority()});if(r===void 0)return;let n={...this.getConfiguredUrls(),accessToken:r.oauth_token,login:r.user,githubAppId:r.githubAppId,scopes:this.normalizeScopes(r.scopes)};return r.dev_override&&kL(this.ctx)==="dev"&&(n.devOverride={copilotTokenUrl:r.dev_override.copilot_token_url,copilotUserInfoUrl:r.dev_override.copilot_user_info_url,notificationUrl:r.dev_override.notification_url,contentRestrictionsUrl:r.dev_override.content_restrictions_url}),n}};function O_t(t){if(t.GH_COPILOT_TOKEN&&!/=/.test(t.GH_COPILOT_TOKEN))return{...HA({apiUrl:t.GH_COPILOT_API_URL,serverUrl:t.GH_COPILOT_SERVER_URL}),login:"",accessToken:t.GH_COPILOT_TOKEN};if(t.GITHUB_COPILOT_TOKEN)return{...HA({apiUrl:t.GITHUB_COPILOT_API_URL,serverUrl:t.GITHUB_COPILOT_SERVER_URL}),login:"",accessToken:t.GITHUB_COPILOT_TOKEN};if(t.CODESPACES==="true"&&t.GITHUB_TOKEN)return{...HA({apiUrl:t.GITHUB_API_URL,serverUrl:t.GITHUB_SERVER_URL}),login:t.GITHUB_USER||"",accessToken:t.GITHUB_TOKEN}}a(O_t,"getSessionFromEnv");f();var rMi=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"],tDr="Your proxy connection requires a trusted certificate. Please make sure the proxy certificate and any issuers are configured correctly and trusted by your operating system.",rDr="https://gh.io/copilot-network-errors",OE=class{constructor(){this.notifiedErrorCodes=[]}static{a(this,"UserErrorNotifier")}notifyUser(e,r){if(!(r instanceof Error))return;let n=r;n.code&&rMi.includes(n.code)&&!this.didNotifyBefore(n.code)&&(this.notifiedErrorCodes.push(n.code),this.displayCertificateErrorNotification(e,n))}async displayCertificateErrorNotification(e,r){new Se("certificates").error(e,`${tDr} Please visit ${rDr} to learn more. Original cause:`,r);let n={title:"Learn more"};return e.get(gc).showWarningMessage(tDr,n).then(o=>{if(o?.title===n.title)return e.get(ip).open(rDr)})}didNotifyBefore(e){return this.notifiedErrorCodes.indexOf(e)!==-1}};f();var Xs=class{static{a(this,"StatusReporter")}#e=0;#t="Normal";#n;#r;#i=!0;get busy(){return this.#e>0}withProgress(e){return this.#t==="Warning"&&this.forceNormal(),this.#e++===0&&this.#o(),e().finally(()=>{--this.#e===0&&this.#o()})}forceStatus(e,r,n){this.#t===e&&this.#n===r&&!n&&!this.#r&&!this.#i||(this.#t=e,this.#n=r,this.#r=n,this.#i=!1,this.#o())}forceNormal(){this.#t!=="Inactive"&&this.forceStatus("Normal")}setError(e,r){this.forceStatus("Error",e,r)}setWarning(e){this.#t!=="Error"&&this.forceStatus("Warning",e)}setInactive(e){this.#t==="Error"||this.#t==="Warning"||this.forceStatus("Inactive",e)}clearInactive(){this.#t==="Inactive"&&this.forceStatus("Normal")}#o(){let e={kind:this.#t,message:this.#n,busy:this.busy,command:this.#r};this.didChange(e)}},j4e=class extends Xs{static{a(this,"NoOpStatusReporter")}didChange(){}};f();var nDr=de(Nn());var ki=class extends nDr.Emitter{static{a(this,"Emitter")}get event(){return super.event}};var B_t=class extends no{constructor(r){super("message"in r?r.message:`${r.failureKind}`);this.result=r}static{a(this,"TokenResultError")}},Ot=class{constructor(e,r=!1){this.ctx=e;this.primed=r;this.lastToken=void 0;this.activeToken=void 0;this.tokenPromise=void 0;this.tokenPrimingError=void 0;this.didChangeTokenResult=new ki;this.onDidChangeTokenResult=this.didChangeTokenResult.event;this.didResetToken=new ki;this.onDidResetToken=this.didResetToken.event}static{a(this,"CopilotTokenManager")}async getGitHubSession(){return await this.ctx.get(en).getSession()}primeToken(){if(this.tokenPrimingError)return Promise.reject(this.tokenPrimingError);this.primed=!0;try{return this.getToken().then(()=>!0,()=>!1)}catch{return Promise.resolve(!1)}}async fetchTokenResult(e){return await this.ctx.get(Jp).fetchTokenResult(this.ctx,e,this.lastToken)}setToken(e){this.activeToken=this.lastToken=e}async getTokenResult(){if(!this.primed){let e=new Error("Token requested before initialization");if($4e(this.ctx))throw this.tokenPrimingError=e,e;e1.exception(this.ctx,e,".getToken")}if(!this.tokenPromise&&(!this.activeToken||this.activeToken?.needsRefresh())){let r=this.getGitHubSession().then(async n=>n?await this.fetchTokenResult(n):{failureKind:"NotSignedIn"}).catch(n=>{if(!(n instanceof Error))throw n;return{failureKind:"Exception",message:String(n),exception:n}}).then(n=>(this.tokenPromise!==r||(this.tokenPromise=void 0,this.handleTokenResult(n)),n));this.tokenPromise=r}return this.activeToken&&!this.activeToken.isExpired()?{copilotToken:this.activeToken}:await this.tokenPromise}handleTokenResult(e){let r=this.ctx.get(Xs);switch(e.failureKind){case"NotSignedIn":r.setError("You are not signed into GitHub.",{command:"github.copilot.signIn",title:"Sign In"});break;case"HTTP401":r.setError("Your GitHub Copilot session has expired. You have been signed out. Please sign in again to continue using GitHub Copilot.",{command:"github.copilot.signIn",title:"Sign In"});break;case"NotAuthorized":r.setError(e.message);break;case"Exception":r.setWarning(e.message),this.ctx.get(OE).notifyUser(this.ctx,e.exception);break;case void 0:r.forceNormal(),this.setToken(e.copilotToken)}this.didChangeTokenResult.fire(e);let n={result:e.copilotToken?"success":"failure",errorCode:e.failureKind??""};"exception"in e&&e.exception?_u(this.ctx,"auth.token_reset_complete",e.exception,n):yi(this.ctx,"auth.token_reset_complete",n)}async getToken(){let e=await this.getTokenResult();if(e.copilotToken)return e.copilotToken;throw e.exception?e.exception:new B_t(e)}resetToken(e,r){r!==void 0?(at(this.ctx,"auth.reset_token_"+r),e1.debug(this.ctx,`Resetting copilot token on HTTP error ${r} (caller: ${e})`)):e1.debug(this.ctx,`Resetting copilot token (caller: ${e})`),yi(this.ctx,"auth.token_reset_trigger",{caller:e,httpStatus:r!==void 0?String(r):"",hadActiveToken:String(!!this.activeToken),hadPendingRefresh:String(!!this.tokenPromise)}),!(!this.activeToken&&!this.tokenPromise)&&(this.activeToken=void 0,this.tokenPromise=void 0,this.didResetToken.fire())}getLastToken(){return this.lastToken}};function cL(t){return t.get(Ot).getLastToken()}a(cL,"getLastCopilotToken");f();var bP=class{static{a(this,"Clock")}now(){return new Date}};f();var Ex=class{static{a(this,"ExpConfigMaker")}},ege=class extends Ex{constructor(r={}){super();this.defaultFilters=r}static{a(this,"ExpConfigFromTAS")}async fetchExperiments(r,n,o){let s=r.get(dr),c=Object.keys(o).length===0?this.defaultFilters:o,l=new URL("telemetry",n.telemetry).href,u;try{u=await s.fetch(l,{method:"GET",headers:c,timeout:5e3})}catch(m){return gE.createFallbackConfig(r,`Error fetching ExP config: ${String(m)}`)}if(!u.ok)return gE.createFallbackConfig(r,`ExP responded with ${u.status}`);let d;try{d=await u.json()}catch(m){if(m instanceof SyntaxError)return qo(r,m,"fetchExperiments"),gE.createFallbackConfig(r,"ExP responded with invalid JSON");throw m}let p=d.Configs.find(m=>m.Id==="vscode")??{Id:"vscode",Parameters:{}},h=Object.entries(p.Parameters).map(([m,g])=>m+(g?"":"cf"));return new gE(p.Parameters,d.AssignmentContext,h.join(";"))}},V4e=class extends Ex{static{a(this,"ExpConfigNone")}fetchExperiments(){return Promise.resolve(gE.createEmptyConfig())}};f();f();var W4e=class{constructor(e){this.prefix=e}static{a(this,"GranularityImplementation")}getCurrentAndUpComingValues(e){let r=this.getValue(e),n=this.getUpcomingValues(e);return[r,n]}},L_t=class extends W4e{static{a(this,"ConstantGranularity")}getValue(e){return this.prefix}getUpcomingValues(e){return[]}},iDr=a(t=>new L_t(t),"DEFAULT_GRANULARITY"),z4e=class extends W4e{constructor(r,n=.5,o=new Date().setUTCHours(0,0,0,0)){super(r);this.prefix=r;this.fetchBeforeFactor=n;this.anchor=o}static{a(this,"TimeBucketGranularity")}setTimePeriod(r){isNaN(r)?this.timePeriodLengthMs=void 0:this.timePeriodLengthMs=r}setByCallBuckets(r){isNaN(r)?this.numByCallBuckets=void 0:this.numByCallBuckets=r}getValue(r){return this.prefix+this.getTimePeriodBucketString(r)+(this.numByCallBuckets?this.timeHash(r):"")}getTimePeriodBucketString(r){return this.timePeriodLengthMs?this.dateToTimePartString(r):""}getUpcomingValues(r){let n=[],o=this.getUpcomingTimePeriodBucketStrings(r),s=this.getUpcomingByCallBucketStrings();for(let c of o)for(let l of s)n.push(this.prefix+c+l);return n}getUpcomingTimePeriodBucketStrings(r){if(this.timePeriodLengthMs===void 0)return[""];if((r.getTime()-this.anchor)%this.timePeriodLengthMsr.toString())}timeHash(r){return this.numByCallBuckets==null?0:7883*(r.getTime()%this.numByCallBuckets)%this.numByCallBuckets}dateToTimePartString(r){return this.timePeriodLengthMs==null?"":Math.floor((r.getTime()-this.anchor)/this.timePeriodLengthMs).toString()}};var oDr="X-Copilot-ClientTimeBucket",Y4e=class{constructor(e,r){this.specs=new Map;this.prefix=e,this.clock=r,this.defaultGranularity=iDr(e)}static{a(this,"GranularityDirectory")}selectGranularity(e){for(let[r,n]of this.specs.entries())if(e.extends(r))return n;return this.defaultGranularity}update(e,r,n){if(r=r>1?r:NaN,n=n>0?n:NaN,isNaN(r)&&isNaN(n))this.specs.delete(e);else{let o=new z4e(this.prefix);isNaN(r)||o.setByCallBuckets(r),isNaN(n)||o.setTimePeriod(n*3600*1e3),this.specs.set(e,o)}}extendFilters(e){let r=this.selectGranularity(e),[n,o]=r.getCurrentAndUpComingValues(this.clock.now());return{newFilterSettings:e.withChange(oDr,n),otherFilterSettingsToPrefetch:o.map(s=>e.withChange(oDr,s))}}};f();f();f();f();var F_t=new Map;async function nMi(t){if(F_t.has(t))return F_t.get(t);let e=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return F_t.set(t,e),e}a(nMi,"getCachedHmacKey");async function iMi(t){if(t)try{let e=await nMi(t),r=Math.floor(Date.now()/1e3).toString(),n=new TextEncoder().encode(r),o=await crypto.subtle.sign("HMAC",e,n),c=Array.from(new Uint8Array(o)).map(l=>l.toString(16).padStart(2,"0")).join("");return`${r}.${c}`}catch{return}}a(iMi,"createRequestHMAC");async function sDr(t,e){let r=await iMi(t);return r?{"Request-Hmac":r,"Copilot-Integration-Id":e??"jetbrains-chat-dev"}:{}}a(sDr,"createMsBenchHmacHeaders");f();f();f();f();var J4e="4.13.0",oH="04b07795-8ddb-461a-bbee-02f9e1bf7b46",aDr="common",K4e;(function(t){t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureGovernment="https://login.microsoftonline.us",t.AzurePublicCloud="https://login.microsoftonline.com"})(K4e||(K4e={}));var tge=K4e.AzurePublicCloud,cDr="login.microsoftonline.com",lDr=["*"],uDr="cae",dDr="nocae",fDr="msal.cache";var U_t;var oMi,X4e,hDr;function mDr(){return X4e!==void 0&&hDr!==void 0}a(mDr,"hasVSCodePlugin");function sMi(t){let e={cache:{},broker:{...t.brokerOptions,isEnabled:t.brokerOptions?.enabled??!1,enableMsaPassthrough:t.brokerOptions?.legacyEnableMsaPassthrough??!1}};if(t.tokenCachePersistenceOptions?.enabled){if(U_t===void 0)throw new Error(["Persistent token caching was requested, but no persistence provider was configured.","You must install the identity-cache-persistence plugin package (`npm install --save @azure/identity-cache-persistence`)","and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling","`useIdentityPlugin(cachePersistencePlugin)` before using `tokenCachePersistenceOptions`."].join(" "));let r=t.tokenCachePersistenceOptions.name||fDr;e.cache.cachePlugin=U_t({name:`${r}.${dDr}`,...t.tokenCachePersistenceOptions}),e.cache.cachePluginCae=U_t({name:`${r}.${uDr}`,...t.tokenCachePersistenceOptions})}return t.brokerOptions?.enabled&&(e.broker.nativeBrokerPlugin=cMi(t.isVSCodeCredential||!1)),e}a(sMi,"generatePluginConfiguration");var pDr={missing:a((t,e,r)=>[`${t} was requested, but no plugin was configured or no authentication record was found.`,`You must install the ${e} plugin package (npm install --save ${e})`,"and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling",`useIdentityPlugin(${r}) before using enableBroker.`].join(" "),"missing"),unavailable:a((t,e)=>[`${t} was requested, and the plugin is configured, but the broker is unavailable.`,`Ensure the ${t} plugin is properly installed and configured.`,"Check for missing native dependencies and ensure the package is properly installed.",`See the README for prerequisites on installing and using ${e}.`].join(" "),"unavailable")},aMi={vsCode:{credentialName:"Visual Studio Code Credential",packageName:"@azure/identity-vscode",pluginVar:"vsCodePlugin",get brokerInfo(){return hDr}},native:{credentialName:"Broker for WAM",packageName:"@azure/identity-broker",pluginVar:"nativeBrokerPlugin",get brokerInfo(){return oMi}}};function cMi(t){let{credentialName:e,packageName:r,pluginVar:n,brokerInfo:o}=aMi[t?"vsCode":"native"];if(o===void 0)throw new Error(pDr.missing(e,r,n));if(o.broker.isBrokerAvailable===!1)throw new Error(pDr.unavailable(e,r));return o.broker}a(cMi,"getBrokerPlugin");var gDr={generatePluginConfiguration:sMi};f();f();f();function lMi(t){return t&&typeof t.error=="string"&&typeof t.error_description=="string"}a(lMi,"isErrorResponse");var yDr="CredentialUnavailableError",un=class extends Error{static{a(this,"CredentialUnavailableError")}constructor(e,r){super(e,r),this.name=yDr}},Z4e="AuthenticationError",P8=class extends Error{static{a(this,"AuthenticationError")}statusCode;errorResponse;constructor(e,r,n){let o={error:"unknown",errorDescription:"An unknown error occurred and no additional details are available."};if(lMi(r))o=ADr(r);else if(typeof r=="string")try{let s=JSON.parse(r);o=ADr(s)}catch{e===400?o={error:"invalid_request",errorDescription:`The service indicated that the request was invalid. +`)}`}}let l=t.get(Dr).getEditorInfo(),u;l.root&&(u=[{prefix:`${l.name}:`,path:l.root}]);let d=ZX(t),p=Obr(c,u,d),h=DPi(c),m=h==="exception",g=Pt.createAndMarkAsIssued({origin:n??"",type:c.name,code:`${c.code??""}`,reason:p.stack||p.toString(),message:p.message,...o});if(await g.makeReadyForSending(t,0,"IncludeExp",r),s?.exception_detail)for(let y of s.exception_detail)y.value&&(d?y.value=Oht(y.value):y.value="[redacted]");s??=vbr(t,p,n),s.context={...s.context,"copilot_event.unique_id":g.properties.unique_id,"#restricted_telemetry":d?"true":"false"},s.rollup_id!=="auto"&&(g.properties.errno=s.rollup_id),s.created_at=new Date(g.issuedTime).toISOString();let A=s.rollup_id==="auto"?c.stack??"":s.rollup_id;if(!t.get(x2).isThrottled(A)){if(d){let y=Mbr(c,u),E=Pt.createAndMarkAsIssued({origin:n??"",type:c.name,code:`${c.code??""}`,reason:y.stack||y.toString(),message:y.message,...o});s.rollup_id!=="auto"&&(E.properties.errno=s.rollup_id),await E.makeReadyForSending(t,1,"IncludeExp",r),E.properties.unique_id=g.properties.unique_id,g.properties.restricted_unique_id=E.properties.unique_id,gpe(t,1,`error.${h}`,E)}m&&(g.properties.failbot_payload=JSON.stringify(s)),gpe(t,0,`error.${h}`,g)}}a(MRr,"_telemetryException");function Up(t,e,r,n){let o=a(async(...s)=>{try{await e(...s)}catch(c){await MRr(t,c,fc(),r,n)}},"wrapped");return(...s)=>t.get(cu).register(o(...s))}a(Up,"telemetryCatch");function jp(t,e,r,n){return t.get(cu).register(QPi(t,e,fc(),r?.extendedBy(),n))}a(jp,"telemetryError");async function QPi(t,e,r,n,o=0){if(KX(o)&&!ZX(t))return;let s=n||Pt.createAndMarkAsIssued({},{});await s.makeReadyForSending(t,o,"IncludeExp",r),MPi(t,o,e,s)}a(QPi,"_telemetryError");function ORr(t,e,r,n,o){let s=Pt.createAndMarkAsIssued({completionTextJson:JSON.stringify(e),choiceIndex:o.toString()});if(r.logprobs)for(let[c,l]of Object.entries(r.logprobs))s.properties["logprobs_"+c]=JSON.stringify(l)??"unset";return s.extendWithRequestId(n),st(t,"engine.completion",s,1)}a(ORr,"logEngineCompletion");function BRr(t,e,r){let n={promptJson:JSON.stringify({prefix:e.prefix,context:e.context}),promptSuffixJson:JSON.stringify(e.suffix)};if(e.context){let s=r.properties["request.option.extra"]?JSON.parse(r.properties["request.option.extra"]):{};s.context=e.context,n["request.option.extra"]=JSON.stringify(s)}let o=r.extendedBy(n);return st(t,"engine.prompt",o,1)}a(BRr,"logEnginePrompt");function qPi(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){let e=t,r;if(typeof e.message=="string")r=e.message;else try{r=JSON.stringify(e)}catch{r="Unknown error"}let n=new Error(r);return n.name=typeof e.name=="string"?e.name:typeof t,typeof e.stack=="string"&&(n.stack=e.stack),n}return new Error("Unknown error")}a(qPi,"buildErrorFromUnknown");f();var Z0=class{static{a(this,"UrlOpener")}};var AE=new Se("auth"),LDe=60;var GPi=["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","1cb18ac6eedd49b43d74a1c5beb0b955","ea9395b9a9248c05ee6847cbd24355ed"],HPi="4535c7beffc844b46bb1ed4aa04d759a";function OA(t){let e=t.serverUrl?.match(/^https?:\/\//)?t.serverUrl:"",r=t.apiUrl?.match(/^https?:\/\//)?t.apiUrl:"";return e?r||=e.replace("://","://api."):r?.includes("://api.")&&(e||=r.replace("://api.","://")),(!e||!r)&&(e="https://github.com/",r="https://api.github.com/"),{apiUrl:r,serverUrl:e}}a(OA,"fillGitHubUrls");function URr(){return Math.floor(Date.now()/1e3)}a(URr,"nowSeconds");async function aAt(t,e,r){let n=Pt.createAndMarkAsIssued({},{});st(t,"auth.new_login");let o={"X-GitHub-Api-Version":"2024-12-15"};r?.hasKnownOrg&&(o["X-GitHub-Staff-Request"]="1");let s=e.devOverride?.copilotTokenUrl??"copilot_internal/v2/token",c=await au(t,e,s,{timeout:12e4,headers:o}),l=await c.json(),u=l.user_notification;if(QRr(t,u,e),c.status===401){let g="Failed to get copilot token due to 401 status. Please sign out and try again.";return AE.info(t,g),jp(t,"auth.unknown_401",n),{failureKind:"HTTP401",message:g}}if(!c.ok||!l.token){AE.info(t,`Invalid copilot token: missing token: ${c.status} ${c.statusText}`),jp(t,"auth.invalid_token",n.extendedBy({status:c.status.toString(),status_text:c.statusText}));let g=l.error_details;return g?.notification_id!=="not_signed_up"&&QRr(t,g,e),{failureKind:"NotAuthorized",message:g?.message??"Could not retrieve token",canSignUpForLimited:l.can_signup_for_limited??!1}}let d=URr()+l.refresh_in+LDe,p=await cAt(t,e),h;p.ok&&(h=await p.json());let m=new Sq(l,h,d);return st(t,"auth.new_token",n.extendedBy({...kht(m)},{adjusted_expires_at:m.expiresAt,expires_at:l.expires_at,current_time:URr()})),{copilotToken:m}}a(aAt,"authFromGitHubSession");var $p=class{static{a(this,"CopilotTokenFetcher")}},BDe=class extends $p{static{a(this,"NetworkCopilotTokenFetcher")}async fetchTokenResult(e,r,n){return await aAt(e,r,n)}};async function cAt(t,e){let r={"X-GitHub-Api-Version":"2025-05-01"},n=e.devOverride?.copilotUserInfoUrl??"copilot_internal/user";return await au(t,e,n,{timeout:12e4,headers:r})}a(cAt,"fetchCopilotUserInfo");function QRr(t,e,r){e&&t.get(dc).showWarningMessageOnlyOnce(e.notification_id,e.message,{title:e.title},{title:"Dismiss"}).then(async n=>{let o=n?.title===e.title,s=o||n?.title==="Dismiss";if(o){let c=t.get(Dr).getEditorPluginInfo(),l=e.url.replace("{EDITOR}",encodeURIComponent(c.name+"_"+c.version));await t.get(Z0).open(l)}e.notification_id&&s&&await jPi(t,e.notification_id,r)}).catch(n=>{AE.exception(t,n,"copilotToken.notification")})}a(QRr,"notifyUser");async function jPi(t,e,r){let n=r.devOverride?.notificationUrl??"copilot_internal/notification",o=await au(t,r,n,{method:"POST",body:JSON.stringify({notification_id:e})});(!o||!o.ok)&&AE.error(t,`Failed to send notification result to GitHub: ${o?.status} ${o?.statusText}`)}a(jPi,"sendNotificationResultToGitHub");var Sq=class{constructor(e,r,n){this.envelope=e;this.expiresAt=n;this.token=e.token,this.organization_list=e.organization_list,this.enterprise_list=e.enterprise_list,this.tokenMap=this.parseToken(this.token),this.userInfo=new Eke(r)}static{a(this,"CopilotToken")}get endpoints(){return{...lq,...this.envelope.endpoints??{}}}needsRefresh(){return(this.expiresAt-LDe)*1e3(this.organization_list??[]).includes(e))}isGitHubUser(){return(this.organization_list??[]).includes(HPi)}isInternalUser(){return this.isMicrosoftUser()||this.isGitHubUser()}};f();var $i=class extends Error{static{a(this,"CopilotAuthError")}constructor(e,r){super(e,{cause:r}),this.name="CopilotAuthError"}},hL=class extends $i{static{a(this,"NoBrowserAvailableError")}constructor(e="Browser not available for OAuth code flow"){super(e),this.name="NoBrowserAvailableError"}};function FDe(t){let e=t.trim();if(!e)throw new $i("Invalid GitHub server URL: value is empty or whitespace.");let r;try{r=new URL(e)}catch{throw new $i("Invalid GitHub server URL: value is not a valid absolute URL.")}if(r.protocol!=="https:")throw new $i("Invalid GitHub server URL: only HTTPS URLs are supported.");return r.toString()}a(FDe,"validateGitHubServerUrl");f();f();var Ape="apps",UDe="hosts",NN=class{constructor(e,r){this.ctx=e;this.persistenceManager=r}static{a(this,"AuthPersistence")}async getAuthRecord(e){let r=e.authAuthority,n=e.githubAppId??this.ctx.get(Oc).findAppIdToAuthenticate(),o=await this.persistenceManager.read(Ape,this.authRecordKey(this.ctx,{authAuthority:r,githubAppId:n}));if(o){let s={...o,oauth_token:o.access_token||o.oauth_token,user:o.login||o.user,githubAppId:n,authAuthority:r};if(s.oauth_token&&s.user)return s}return await this.legacyAuthRecordMaybe(r)}async legacyAuthRecordMaybe(e){let r=await this.persistenceManager.read(UDe,e);if(r)return{...r,githubAppId:GI}}async saveAuthRecord(e){await this.persistenceManager.update(Ape,this.authRecordKey(this.ctx,e),{user:e.user,oauth_token:e.oauth_token,githubAppId:e.githubAppId,scopes:e.scopes,dev_override:e.dev_override})}async deleteAuthRecord(e){let r=e.authAuthority,n=await this.getAuthRecord({authAuthority:r});n&&(n.githubAppId===GI&&await this.persistenceManager.delete(UDe,r),await this.persistenceManager.delete(Ape,this.authRecordKey(this.ctx,{authAuthority:r})),await this.persistenceManager.delete(Ape,this.authRecordKey(this.ctx,{authAuthority:r,githubAppId:GI})))}async deleteAllAuthRecords(){await this.persistenceManager.deleteSetting(Ape),await this.persistenceManager.deleteSetting(UDe)}async purgeLegacyAuthRecords(){await this.persistenceManager.deleteSetting(UDe)}authRecordKey(e,r){let n=r.githubAppId??e.get(Oc).findAppIdToAuthenticate();return`${r.authAuthority}:${n}`}};f();f();f();f();f();f();f();f();function BN(t,e){return t||e}a(BN,"_pureAssign");function ep(t,e){return t[e]}a(ep,"_pureRef");var yE=void 0,Gf=null,bAt="",WDe="function",Epe="object",MN="prototype",CAt="__proto__",Iq="undefined",HDe="constructor",TAt="Symbol",$Pi="_polyfill",xq="length",jDe="name",em="call",zDe="toString",Pb=BN(Object),SAt=ep(Pb,MN),VRr=BN(String),wq=ep(VRr,MN),_pe=BN(Math),WRr=BN(Array),YDe=ep(WRr,MN),ON=ep(YDe,"slice");function gd(t,e){try{return{v:t.apply(this,e)}}catch(r){return{e:r}}}a(gd,"safe");function VPi(t,e){var r=gd(t);return r.e?e:r.v}a(VPi,"safeGet");var lAt;function KDe(t){return function(e){return typeof e===t}}a(KDe,"_createIs");function zRr(t){var e="[object "+t+"]";return function(r){return!!(r&&Cpe(r)===e)}}a(zRr,"_createObjIs");function Cpe(t){return SAt[zDe].call(t)}a(Cpe,"objToString");function ln(t){return typeof t===Iq||t===Iq}a(ln,"isUndefined");function WPi(t){return!nZ(t)}a(WPi,"isStrictUndefined");function qt(t){return t===Gf||ln(t)}a(qt,"isNullOrUndefined");function zPi(t){return t===Gf||!nZ(t)}a(zPi,"isStrictNullOrUndefined");function nZ(t){return!!t||t!==yE}a(nZ,"isDefined");function YPi(t){return!lAt&&(lAt=["string","number","boolean",Iq,"symbol","bigint"]),t!==Epe&&lAt.indexOf(t)!==-1}a(YPi,"isPrimitiveType");var Vn=KDe("string"),Er=KDe(WDe);function kl(t){return!t&&qt(t)?!1:!!t&&typeof t===Epe}a(kl,"isObject");var Kt=ep(WRr,"isArray"),JDe=zRr("Date"),jf=KDe("number"),HI=KDe("boolean");var LN=zRr("Error");function Vp(t){return!!(t&&t.then&&Er(t.then))}a(Vp,"isPromiseLike");function GC(t){return!(!t||VPi(function(){return!(t&&0+t)},!t))}a(GC,"isTruthy");var iZ=ep(Pb,"getOwnPropertyDescriptor");function Wp(t,e){return!!t&&SAt.hasOwnProperty[em](t,e)}a(Wp,"objHasOwnProperty");var tm=BN(ep(Pb,"hasOwn"),KPi);function KPi(t,e){return Wp(t,e)||!!iZ(t,e)}a(KPi,"polyObjHasOwn");function Nr(t,e,r){if(t&&kl(t)){for(var n in t)if(tm(t,n)&&e[em](r||t,n,t[n])===-1)break}}a(Nr,"objForEachKey");var QDe={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function JPi(t){var e={};if(e[QDe.c]=!0,e[QDe.e]=!0,t.l){e.get=function(){return t.l.v};var r=iZ(t.l,"v");r&&r.set&&(e.set=function(n){t.l.v=n})}return Nr(t,function(n,o){e[QDe[n]]=WPi(o)?e[QDe[n]]:o}),e}a(JPi,"_createProp");var BA=ep(Pb,"defineProperty"),YRr=ep(Pb,"defineProperties");function pi(t,e,r){return BA(t,e,JPi(r))}a(pi,"objDefine");function KRr(t,e,r,n,o){var s={};return Nr(t,function(c,l){$De(s,c,e?l:c),$De(s,l,r?l:c)}),n?n(s):s}a(KRr,"_createKeyValueMap");function $De(t,e,r,n){BA(t,e,{value:r,enumerable:!0,writable:!1})}a($De,"_assignMapValue");var Pl=BN(VRr),XPi="[object Error]";function Jt(t,e){var r=bAt,n=SAt[zDe][em](t);n===XPi&&(t={stack:Pl(t.stack),message:Pl(t.message),name:Pl(t.name)});try{r=JSON.stringify(t,Gf,e?typeof e=="number"?e:4:yE),r=(r?r.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Gf)||Pl(t)}catch(o){r=" - "+Jt(o,e)}return n+": "+r}a(Jt,"dumpObj");function Ya(t){throw new Error(t)}a(Ya,"throwError");function tp(t){throw new TypeError(t)}a(tp,"throwTypeError");var JRr=ep(Pb,"freeze");function ZPi(t){return t}a(ZPi,"_doNothing");function eki(t){return t[CAt]||Gf}a(eki,"_getProto");var FN=ep(Pb,"assign"),Dl=ep(Pb,"keys");function LA(t){return JRr&&Nr(t,function(e,r){(Kt(r)||kl(r))&&LA(r)}),$f(t)}a(LA,"objDeepFreeze");var $f=BN(JRr,ZPi);var vAt=BN(ep(Pb,"getPrototypeOf"),eki);function XDe(t){return KRr(t,1,0,$f)}a(XDe,"createEnum");function tki(t){return KRr(t,0,0,$f)}a(tki,"createEnumKeyMap");function rki(t){var e={};return Nr(t,function(r,n){$De(e,r,n[1]),$De(e,n[0],n[1])}),$f(e)}a(rki,"createSimpleMap");function IAt(t){return rki(t)}a(IAt,"createTypeMap");var XRr=tki({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),qRr="__tsUtils$gblCfg",uAt;function ZRr(){var t;return typeof globalThis!==Iq&&(t=globalThis),!t&&typeof self!==Iq&&(t=self),!t&&typeof window!==Iq&&(t=window),!t&&typeof global!==Iq&&(t=global),t}a(ZRr,"_getGlobalValue");function e2r(){if(!uAt){var t=gd(ZRr).v||{};uAt=t[qRr]=t[qRr]||{}}return uAt}a(e2r,"_getGlobalConfig");var oZ=vpe;function vpe(t,e,r){var n=e?e[t]:Gf;return function(o){var s=(o?o[t]:Gf)||n;if(s||r){var c=arguments;return(s||r).apply(o,s?ON[em](c,1):c)}tp('"'+Pl(t)+'" not defined for '+Jt(o))}}a(vpe,"_unwrapFunctionWithPoly");function nki(t){return function(e){return e[t]}}a(nki,"_unwrapProp");var mL=ep(_pe,"min"),jI=ep(_pe,"max"),GRr=oZ("slice",wq),Ad=oZ("substring",wq),ZDe=vpe("substr",wq,iki);function iki(t,e,r){return qt(t)&&tp("Invalid "+Jt(t)),r<0?bAt:(e=e||0,e<0&&(e=jI(e+t[xq],0)),ln(r)?GRr(t,e):GRr(t,e,e+r))}a(iki,"polyStrSubstr");function B2(t,e){return Ad(t,0,e)}a(B2,"strLeft");var HRr="_urid",dAt;function oki(){if(!dAt){var t=e2r();dAt=t.gblSym=t.gblSym||{k:{},s:{}}}return dAt}a(oki,"_globalSymbolRegistry");var qDe;function xAt(t){var e={description:Pl(t),toString:a(function(){return TAt+"("+t+")"},"toString")};return e[$Pi]=!0,e}a(xAt,"polyNewSymbol");function ski(t){var e=oki();if(!tm(e.k,t)){var r=xAt(t),n=Dl(e.s).length;r[HRr]=function(){return n+"_"+r[zDe]()},e.k[t]=r,e.s[r[HRr]()]=Pl(t)}return e.k[t]}a(ski,"polySymbolFor");function aki(t){!qDe&&(qDe={});var e,r=XRr[t];return r&&(e=qDe[r]=qDe[r]||xAt(TAt+"."+r)),e}a(aki,"polyGetKnownSymbol");var Hf;function gL(){Hf=e2r()}a(gL,"_initTestHooks");function eNe(t){var e={};return!Hf&&gL(),e.b=Hf.lzy,BA(e,"v",{configurable:!0,get:a(function(){var r=t();return Hf.lzy||BA(e,"v",{value:r}),e.b=Hf.lzy,r},"get")}),e}a(eNe,"getLazy");function HC(t){return BA({toJSON:a(function(){return t},"toJSON")},"v",{value:t})}a(HC,"createCachedValue");var t2r="window",ype;function tNe(t,e){var r;return function(){return!Hf&&gL(),(!r||Hf.lzy)&&(r=HC(gd(t,e).v)),r.v}}a(tNe,"_getGlobalInstFn");function gg(t){return!Hf&&gL(),(!ype||t===!1||Hf.lzy)&&(ype=HC(gd(ZRr).v||Gf)),ype.v}a(gg,"getGlobal");function ti(t,e){var r;if(!ype||e===!1?r=gg(e):r=ype.v,r&&r[t])return r[t];if(t===t2r)try{return window}catch{}return Gf}a(ti,"getInst");function UN(){return!!qu()}a(UN,"hasDocument");var qu=tNe(ti,["document"]);function sZ(){return!!Gu()}a(sZ,"hasWindow");var Gu=tNe(ti,[t2r]);function Rq(){return!!Nl()}a(Rq,"hasNavigator");var Nl=tNe(ti,["navigator"]);var r2r=tNe(function(){return!!gd(function(){return process&&(process.versions||{}).node}).v});var rZ,fAt;function rNe(){return rZ=HC(gd(ti,[TAt]).v),rZ}a(rNe,"_initSymbol");function cki(t){var e=(Hf.lzy?0:rZ)||rNe();return e.v?e.v[t]:yE}a(cki,"_getSymbolKey");function n2r(){return!!lki()}a(n2r,"hasSymbol");function lki(){return!Hf&&gL(),((Hf.lzy?0:rZ)||rNe()).v}a(lki,"getSymbol");function bpe(t,e){var r=XRr[t];!Hf&&gL();var n=(Hf.lzy?0:rZ)||rNe();return n.v?n.v[r||t]:e?yE:aki(t)}a(bpe,"getKnownSymbol");function kb(t,e){!Hf&&gL();var r=(Hf.lzy?0:rZ)||rNe();return r.v?r.v(t):e?Gf:xAt(t)}a(kb,"newSymbol");function AL(t){return!Hf&&gL(),fAt=(Hf.lzy?0:fAt)||HC(gd(cki,["for"]).v),(fAt.v||ski)(t)}a(AL,"symbolFor");function VDe(t){return!!t&&Er(t.next)}a(VDe,"isIterator");function wAt(t){return!zPi(t)&&Er(t[bpe(3)])}a(wAt,"isIterable");var GDe;function nNe(t,e,r){if(t&&(VDe(t)||(!GDe&&(GDe=HC(bpe(3))),t=t[GDe.v]?t[GDe.v]():Gf),VDe(t))){var n=yE,o=yE;try{for(var s=0;!(o=t.next()).done&&e[em](r||t,o.value,s,t)!==-1;)s++}catch(c){n={e:c},t.throw&&(o=Gf,t.throw(n))}finally{try{o&&!o.done&&t.return&&t.return(o)}finally{if(n)throw n.e}}}}a(nNe,"iterForOf");function tZ(t,e,r){return t.apply(e,r)}a(tZ,"fnApply");function Vf(t,e){return!ln(e)&&t&&(Kt(e)?tZ(t.push,t,e):VDe(e)||wAt(e)?nNe(e,function(r){t.push(r)}):t.push(e)),t}a(Vf,"arrAppend");function ut(t,e,r){if(t)for(var n=t[xq]>>>0,o=0;o0?r:0;return Ad(t,o,o+n[xq])===n}a(Tki,"polyStrStartsWith");var yAt="ref",EAt="unref",_At="hasRef",Ski="enabled";function Iki(t,e,r){var n=!0,o=t?e(Gf):Gf,s;function c(){return n=!1,o&&o[EAt]&&o[EAt](),s}a(c,"_unref");function l(){o&&r(o),o=Gf}a(l,"_cancel");function u(){return o=e(o),n||c(),s}a(u,"_refresh");function d(p){!p&&o&&l(),p&&!o&&u()}return a(d,"_setEnabled"),s={cancel:l,refresh:u},s[_At]=function(){return o&&o[_At]?o[_At]():n},s[yAt]=function(){return n=!0,o&&o[yAt]&&o[yAt](),s},s[EAt]=c,s=BA(s,Ski,{get:a(function(){return!!o},"get"),set:d}),{h:s,dn:a(function(){o=Gf},"dn")}}a(Iki,"_createTimerHandler");function PAt(t,e,r){var n=Kt(e),o=n?e.length:0,s=(o>0?e[0]:n?yE:e)||setTimeout,c=(o>1?e[1]:yE)||clearTimeout,l=r[0];r[0]=function(){u.dn(),tZ(l,yE,ON[em](arguments))};var u=Iki(t,function(d){if(d){if(d.refresh)return d.refresh(),d;tZ(c,yE,[d])}return tZ(s,yE,r)},function(d){tZ(c,yE,[d])});return u.h}a(PAt,"_createTimeoutWith");function tf(t,e){return PAt(!0,yE,ON[em](arguments))}a(tf,"scheduleTimeout");function l2r(t,e,r){return PAt(!0,t,ON[em](arguments,1))}a(l2r,"scheduleTimeoutWith");function iNe(t,e){return PAt(!1,yE,ON[em](arguments))}a(iNe,"createTimeout");var wpe=XDe,kAt=IAt;f();var $I=wpe({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2});f();f();var VI="toLowerCase",Vr="length",lZ="warnToConsole",GN="throwInternal",F2="watch",EL="apply",si="push",Db="splice",Ml="logger",U2="cancel",HN="initialize",Q2="identifier",uZ="removeNotificationListener",dZ="addNotificationListener",EE="isInitialized",Rpe="getNotifyMgr",_L="getPlugin",$C="name",rp="processNext",oNe="getProcessTelContext",jN="value",CL="enabled",DAt="stopPollingInternalLogs",Nb="unload",Ppe="onComplete",sNe="version",aNe="loggingLevelConsole",q2="createNew",VC="teardown",fZ="messageId",G2="message",_E="diagLog",vL="_doTeardown",kq="update",WC="getNext",bL="setNextPlugin",kpe="userAgent",Mb="split",WI="replace",Dpe="substring",Npe="indexOf",$N="type",NAt="evtName",zI="status",MAt="getAllResponseHeaders",Mpe="isChildEvt",zC="data",Dq="getCtx",YI="setCtx",OAt="itemsReceived",Ope="headers",pZ="urlString",Nq="timeout";var cNe="traceFlags";var BAt;function u2r(t,e){BAt||(BAt=Spe("AggregationError",function(n,o){o[Vr]>1&&(n.errors=o[1])}));var r=t||"One or more errors occurred.";throw ut(e,function(n,o){r+=` +`.concat(o," > ").concat(Jt(n))}),new BAt(r,e||[])}a(u2r,"throwAggregationError");f();f();f();var hZ="function",Ob="object",YC="undefined",KC="prototype";var TL=Object,Bpe=TL[KC];f();var Auc=(gg()||{}).Symbol,yuc=(gg()||{}).Reflect;var d2r="hasOwnProperty",wki=a(function(t){for(var e,r=1,n=arguments.length;r0)for(var o=0;o=0;r--)if(t[r]===e)return!0;return!1}a(zAt,"_hasVisited");function kki(t,e,r,n){function o(u,d,p){var h=d[p];if(h[QAt]&&n){var m=u[mNe]||{};m[Lpe]!==!1&&(h=(m[d[mZ]]||{})[p]||h)}return function(){return h.apply(u,arguments)}}a(o,"_instFuncProxy");var s=L2(null);gNe(r,function(u){s[u]=o(e,r,u)});for(var c=Oq(t),l=[];c&&!VAt(c)&&!zAt(l,c);)gNe(c,function(u){!s[u]&&WAt(c,u,!Fpe)&&(s[u]=o(e,c,u))}),l.push(c),c=Oq(c);return s}a(kki,"_getBaseFuncs");function Dki(t,e,r,n){var o=null;if(t&&Wp(r,mZ)){var s=t[mNe]||L2(null);if(o=(s[r[mZ]]||L2(null))[e],o||ANe("Missing ["+e+"] "+hNe),!o[qAt]&&s[Lpe]!==!1){for(var c=!Wp(t,e),l=Oq(t),u=[];c&&l&&!VAt(l)&&!zAt(u,l);){var d=l[e];if(d){c=d===n;break}u.push(l),l=Oq(l)}try{c&&(t[e]=o),o[qAt]=1}catch{s[Lpe]=!1}}}return o}a(Dki,"_getInstFunc");function Nki(t,e,r){var n=e[t];return n===r&&(n=Oq(e)[t]),typeof n!==hNe&&ANe("["+t+"] is not a "+hNe),n}a(Nki,"_getProtoFunc");function Mki(t,e,r,n,o){function s(u,d){var p=a(function(){var h=Dki(this,d,u,p)||Nki(d,u,p);return h.apply(this,arguments)},"dynProtoProxy");return p[QAt]=1,p}if(a(s,"_createDynamicPrototype"),!fNe(t)){var c=r[mNe]=r[mNe]||L2(null);if(!fNe(c)){var l=c[e]=c[e]||L2(null);c[Lpe]!==!1&&(c[Lpe]=!!o),fNe(l)||gNe(r,function(u){WAt(r,u,!1)&&r[u]!==n[u]&&(l[u]=r[u],delete r[u],(!Wp(t,u)||t[u]&&!t[u][QAt])&&(t[u]=s(t,u)))})}}}a(Mki,"_populatePrototype");function Oki(t,e){if(Fpe){for(var r=[],n=Oq(e);n&&!VAt(n)&&!zAt(r,n);){if(n===t)return!0;r.push(n),n=Oq(n)}return!1}return!0}a(Oki,"_checkPrototype");function UAt(t,e){return Wp(t,VN)?t.name||e||f2r:((t||{})[pNe]||{}).name||e||f2r}a(UAt,"_getObjName");function Kn(t,e,r,n){Wp(t,VN)||ANe("theClass is an invalid class definition.");var o=t[VN];Oki(o,e)||ANe("["+UAt(t)+"] not in hierarchy of ["+UAt(e)+"]");var s=null;Wp(o,mZ)?s=o[mZ]:(s=Rki+UAt(t,"_")+"$"+HAt.n,HAt.n++,o[mZ]=s);var c=Kn[g2r],l=!!c[dNe];l&&n&&n[dNe]!==void 0&&(l=!!n[dNe]);var u=Pki(e),d=kki(o,e,u,l);r(e,d);var p=!!Fpe&&!!c[GAt];p&&n&&(p=!!n[GAt]),Mki(o,s,e,u,p!==!1)}a(Kn,"dynamicProto");Kn[g2r]=HAt.o;f();var ENe="Promise";var ryt="rejected";function hc(t,e){return _Ne(t,function(r){return e?e({status:"fulfilled",rejected:!1,value:r}):r},function(r){return e?e({status:ryt,rejected:!0,reason:r}):r})}a(hc,"doAwaitResponse");function _Ne(t,e,r,n){var o=t;try{if(Vp(t))(e||r)&&(o=t.then(e,r));else try{e&&(o=e(t))}catch(s){if(r)o=r(s);else throw s}}finally{n&&Bki(o,n)}return o}a(_Ne,"doAwait");function Bki(t,e){var r=t;return e&&(Vp(t)?t.finally?r=t.finally(e):r=t.then(function(n){return e(),n},function(n){throw e(),n}):e()),r}a(Bki,"doFinally");var YAt,KAt,JAt,A2r=!1;function Lki(t,e,r,n){YAt=YAt||{toString:a(function(){return"[[PromiseState]]"},"toString")},KAt=KAt||{toString:a(function(){return"[[PromiseResult]]"},"toString")},JAt=JAt||{toString:a(function(){return"[[PromiseIsHandled]]"},"toString")};var o={};o[YAt]={get:e},o[KAt]={get:r},o[JAt]={get:n},YRr(t,o)}a(Lki,"_addDebugState$1");var _2r=["pending","resolving","resolved",ryt],y2r="dispatchEvent",yNe;function Fki(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}a(Fki,"_hasInitEventFn");function Uki(t,e,r,n){var o=qu();!yNe&&(yNe=HC(!!gd(Fki,[o]).v));var s=yNe.v?o.createEvent("Event"):n?new Event(e):{};if(r&&r(s),yNe.v&&s.initEvent(e,!1,!0),s&&t[y2r])t[y2r](s);else{var c=t["on"+e];if(c)c(s);else{var l=ti("console");l&&(l.error||l.log)(e,Jt(s))}}}a(Uki,"emitEvent");var C2r="unhandledRejection",Qki=C2r.toLowerCase(),Upe=[],qki=0,Gki=10;var XAt;function E2r(t){return Er(t)?t.toString():Jt(t)}a(E2r,"dumpFnObj");function v2r(t,e,r){var n=yL(arguments,3),o=0,s=!1,c,l=[],u=qki++,d=Upe.length>0?Upe[Upe.length-1]:void 0,p=!1,h=null,m;function g(x,w){try{Upe.push(u),p=!0,h&&h.cancel(),h=null;var R=t(function(P,k){l.push(function(){try{var Q=o===2?x:w,M=ln(Q)?c:Er(Q)?Q(c):Q;Vp(M)?M.then(P,k):Q?P(M):o===3?k(M):P(M)}catch(N){k(N)}}),s&&_()},n);return R}finally{Upe.pop()}}a(g,"_then");function A(x){return g(void 0,x)}a(A,"_catch");function y(x){var w=x,R=x;return Er(x)&&(w=a(function(P){return x&&x(),P},"thenFinally"),R=a(function(P){throw x&&x(),P},"catchFinally")),g(w,R)}a(y,"_finally");function E(){return _2r[o]}a(E,"_strState");function _(){if(l.length>0){var x=l.slice();l=[],p=!0,h&&h.cancel(),h=null,e(x)}}a(_,"_processQueue");function v(x,w){return function(R){if(o===w){if(x===2&&Vp(R)){o=1,R.then(v(2,1),v(3,1));return}o=x,s=!0,c=R,_(),!p&&x===3&&!h&&(h=tf(b,Gki))}}}a(v,"_createSettleIfFn");function b(){if(!p)if(p=!0,r2r())process.emit(C2r,c,m);else{var x=Gu()||gg();!XAt&&(XAt=HC(gd(ti,[ENe+"RejectionEvent"]).v)),Uki(x,Qki,function(w){return pi(w,"promise",{g:a(function(){return m},"g")}),w.reason=c,w},!!XAt.v)}}a(b,"_notifyUnhandledRejection"),m={then:g,catch:A,finally:y},BA(m,"state",{get:E}),A2r&&Lki(m,E,function(){return Cpe(c)},function(){return p}),n2r()&&(m[bpe(11)]="IPromise");function I(){return"IPromise"+(A2r?"["+u+(ln(d)?"":":"+d)+"]":"")+" "+E()+(s?" - "+E2r(c):"")}return a(I,"_toString"),m.toString=I,a((function(){Er(r)||tp(ENe+": executor is not a function - "+E2r(r));var w=v(3,0);try{r.call(m,v(2,0),w)}catch(R){w(R)}}),"_initialize")(),m}a(v2r,"_createPromise");function Hki(t){return function(e){var r=yL(arguments,1);return t(function(n,o){try{var s=[],c=1;nNe(e,function(l,u){l&&(c++,_Ne(l,function(d){s[u]=d,--c===0&&n(s)},o))}),c--,c===0&&n(s)}catch(l){o(l)}},r)}}a(Hki,"_createAllPromise");function jki(t){return HC(function(e){var r=yL(arguments,1);return t(function(n,o){var s=[],c=1;function l(u,d){c++,hc(u,function(p){p.rejected?s[d]={status:ryt,reason:p.reason}:s[d]={status:"fulfilled",value:p.value},--c===0&&n(s)})}a(l,"processItem");try{Kt(e)?ut(e,l):wAt(e)?nNe(e,l):tp("Input is not an iterable"),c--,c===0&&n(s)}catch(u){o(u)}},r)})}a(jki,"_createAllSettledPromise");function b2r(t){ut(t,function(e){try{e()}catch{}})}a(b2r,"syncItemProcessor");function $ki(t){var e=jf(t)?t:0;return function(r){tf(function(){b2r(r)},e)}}a($ki,"timeoutItemProcessor");function T2r(t,e){return v2r(T2r,$ki(e),t,e)}a(T2r,"createAsyncPromise");var ZAt;function Vki(t,e){!ZAt&&(ZAt=HC(gd(ti,[ENe]).v||null));var r=ZAt.v;if(!r)return T2r(t);Er(t)||tp(ENe+": executor is not a function - "+Jt(t));var n=0;function o(){return _2r[n]}a(o,"_strState");var s=new r(function(c,l){function u(p){n=2,c(p)}a(u,"_resolve");function d(p){n=3,l(p)}a(d,"_reject"),t(u,d)});return BA(s,"state",{get:o}),s}a(Vki,"createNativePromise");var eyt;function Qpe(t){return v2r(Qpe,b2r,t)}a(Qpe,"createSyncPromise");function CNe(t,e){return!eyt&&(eyt=jki(Qpe)),eyt.v(t,e)}a(CNe,"createSyncAllSettledPromise");var tyt;function pu(t,e){return!tyt&&(tyt=HC(Vki)),tyt.v.call(this,t,e)}a(pu,"createPromise");var vNe=Hki(pu);var Juc=bpe(11);f();f();f();f();var JC=void 0,Vi="",Bq="channels",yd="core",bNe="createPerfMgr",qpe="disabled",WN="extensionConfig",Lq="extensions",CE="processTelemetry",Fq="priority",gZ="eventsSent",SL="eventsDiscarded",AZ="eventsSendRequest",H2="perfEvent",TNe="offlineEventsStored",SNe="offlineBatchSent",INe="offlineBatchDrop",yZ="getPerfMgr",xNe="domain",wNe="path",S2r="Not dynamic - ",I2r="REDACTED",nyt=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"];var Wki="getPrototypeOf",zki=/-([a-z])/g,Yki=/([^\w\d_$])/g,Kki=/^(\d+[\w\d_$])/,adc=Object[Wki];function IL(t){return!qt(t)}a(IL,"isNotNullOrUndefined");function Gpe(t){var e=t;return e&&Vn(e)&&(e=e[WI](zki,function(r,n){return n.toUpperCase()}),e=e[WI](Yki,"_"),e=e[WI](Kki,function(r,n){return"_"+n})),e}a(Gpe,"normalizeJsName");function np(t,e){return t&&e?Kc(t,e)!==-1:!1}a(np,"strContains");function xL(t){return t&&t.toISOString()||""}a(xL,"toISOString");function rf(t){return LN(t)?t[$C]:Vi}a(rf,"getExceptionName");function j2(t,e,r,n,o){var s=r;return t&&(s=t[e],s!==r&&(!o||o(s))&&(!n||n(r))&&(s=r,t[e]=s)),s}a(j2,"setValue");function iyt(t,e,r){var n;return t?(n=t[e],!n&&qt(n)&&(n=ln(r)?{}:r,t[e]=n)):n=ln(r)?{}:r,n}a(iyt,"getSetValue");function Jki(t,e){var r=null,n=null;return Er(t)?r=t:n=t,function(){var o=arguments;if(r&&(n=r()),n)return n[e][EL](n,o)}}a(Jki,"_createProxyFunction");function Uq(t,e,r,n,o){t&&e&&r&&(o!==!1||ln(t[e]))&&(t[e]=Jki(r,n))}a(Uq,"proxyFunctionAs");function Qq(t,e,r,n){return t&&e&&kl(t)&&Kt(r)&&ut(r,function(o){Vn(o)&&Uq(t,o,e,o,n)}),t}a(Qq,"proxyFunctions");function oyt(t){return(function(){function e(){var r=this;t&&Nr(t,function(n,o){r[n]=o})}return a(e,"class_1"),e})()}a(oyt,"createClassFromInterface");function PNe(t){return t&&FN&&(t=TL(FN({},t))),t}a(PNe,"optimizeObject");function kNe(t,e,r,n,o,s){var c=arguments,l=c[0]||{},u=c[Vr],d=!1,p=1;for(u>0&&HI(l)&&(d=l,l=c[p]||{},p++),kl(l)||(l={});p>>=0),Wpe=M2r+t&Gq,zpe=O2r-t&Gq,B2r=!0}a(d5i,"_mwcSeed");function f5i(){try{var t=pc()&2147483647;d5i((Math.random()*N2r^t)+t)}catch{}}a(f5i,"_autoSeedMwc");function D2r(t){var e=0,r=hyt()||myt();return r&&r.getRandomValues&&(e=r.getRandomValues(new Uint32Array(1))[0]&Gq),e===0&&CZ()&&(B2r||f5i(),e=p5i()&Gq),e===0&&(e=jC(N2r*Math.random()|0)),t||(e>>>=0),e}a(D2r,"random32");function p5i(t){zpe=36969*(zpe&65535)+(zpe>>16)&Gq,Wpe=18e3*(Wpe&65535)+(Wpe>>16)&Gq;var e=(zpe<<16)+(Wpe&65535)>>>0&Gq|0;return t||(e>>>=0),e}a(p5i,"mwcRandom32");function L2r(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=D2r()>>>0,n=0,o=Vi;o[Vr]>>=6,n===5&&(r=(D2r()<<2&4294967295|r&3)>>>0,n=0);return o}a(L2r,"newId");var F2r="3.3.11",h5i="."+L2r(6),m5i=0;function U2r(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}a(U2r,"_canAcceptData");function g5i(t,e){var r=e[t.id];if(!r){r={};try{U2r(e)&&pi(e,t.id,{e:!1,v:r})}catch{}}return r}a(g5i,"_getCache");function XC(t,e){return e===void 0&&(e=!1),Gpe(t+m5i+++(e?"."+F2r:Vi)+h5i)}a(XC,"createUniqueNamespace");function MNe(t){var e={id:XC("_aiData-"+(t||Vi)+"."+F2r),accept:a(function(r){return U2r(r)},"accept"),get:a(function(r,n,o,s){var c=r[e.id];return c?c[Gpe(n)]:(s&&(c=g5i(e,r),c[Gpe(n)]=o),o)},"get"),kill:a(function(r,n){if(r&&r[n])try{delete r[n]}catch{}},"kill")};return e}a(MNe,"createElmNodeData");f();function ONe(t){return t&&kl(t)&&!Kt(t)&&(t.isVal||t.fb||tm(t,"v")||tm(t,"mrg")||tm(t,"ref")||t.set)}a(ONe,"_isConfigDefaults");function Q2r(t,e,r){var n,o=r.dfVal||nZ;if(e&&r.fb){var s=r.fb;Kt(s)||(s=[s]);for(var c=0;c0&&u2r("Watcher error(s): ",A)}}a(p,"_notifyWatchers");function h(g){if(g&&g.h[Vr]>0){c||(c=[]),l||(l=tf(function(){l=null,p()},0));for(var A=0;A0?hc(zN(t[0],e),function(){QNe(yL(t,1),e,r)}):r(),n}a(QNe,"doUnloadAll");f();var $2r=500,Cyt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";f();f();function T5i(t,e,r){return!t&&qt(t)?e:HI(t)?t:Pl(t)[VI]()==="true"}a(T5i,"_stringToBoolOrDefault");function vyt(t){return{mrg:!0,v:t}}a(vyt,"cfgDfMerge");function bZ(t,e,r){return{fb:r,isVal:t,v:e}}a(bZ,"cfgDfValidate");function Fb(t,e){return{fb:e,set:T5i,v:!!t}}a(Fb,"cfgDfBoolean");f();f();var byt=[gZ,SL,AZ,H2],GNe=null,qNe;function S5i(t,e){return function(){var r=arguments,n=Tyt(e);if(n){var o=n.listener;o&&o[t]&&o[t][EL](o,r)}}}a(S5i,"_listenerProxyFunc");function I5i(){var t=ti("Microsoft");return t&&(GNe=t.ApplicationInsights),GNe}a(I5i,"_getExtensionNamespace");function Tyt(t){var e=GNe;return!e&&t.disableDbgExt!==!0&&(e=GNe||I5i()),e?e.ChromeDbgExt:null}a(Tyt,"getDebugExt");function V2r(t){if(!qNe){qNe={};for(var e=0;e=A&&(d[I](b[G2]),n[x]=!0)}else o>=A&&d[I](b[G2]);p(A,b)}},d.debugToConsole=function(A){Syt("debug",A),g("warning",A)},d[lZ]=function(A){Syt("warn",A),g("warning",A)},d.errorToConsole=function(A){Syt("error",A),g("error",A)},d.resetInternalMessageCount=function(){r=0,n={}},d.logInternalMessage=p,d[Nb]=function(A){u&&u.rm(),u=null};function p(A,y){if(!m()){var E=!0,_=R5i+y[fZ];if(n[_]?E=!1:n[_]=!0,E&&(A<=s&&(d.queue[si](y),r++,g(A===1?"error":"warn",y)),r===c)){var v="Internal events throttle limit per PageView reached for this app.",b=new ehe(23,v,!1);d.queue[si](b),A===1?d.errorToConsole(v):d[lZ](v)}}}a(p,"_logInternalMessage");function h(A){return Lb(Wf(A,P5i,d).cfg,function(y){var E=y.cfg;o=E[aNe],s=E.loggingLevelTelemetry,c=E.maxMessageLimit,l=E.enableDebug})}a(h,"_setDefaultsFromConfig");function m(){return r>=c}a(m,"_areInternalMessagesThrottled");function g(A,y){var E=Tyt(e||{});E&&E[_E]&&E[_E](A,y)}a(g,"_debugExtMsg")})}return a(t,"DiagnosticLogger"),t.__ieDyn=1,t})();function Y2r(t){return t||new SZ}a(Y2r,"_getLogger");function Rr(t,e,r,n,o,s){s===void 0&&(s=!1),Y2r(t)[GN](e,r,n,o,s)}a(Rr,"_throwInternal");function YN(t,e){Y2r(t)[lZ](e)}a(YN,"_warnToConsole");var Iyt,PL,K2r="toGMTString",J2r="toUTCString",Pyt="cookie",xyt="expires",X2r="isCookieUseDisabled",the="disableCookiesUsage",Z2r="_ckMgr",HNe=null,wyt=null,ePr=null,V2,tPr={},rPr={},D5i=(Iyt={cookieCfg:vyt((PL={},PL[xNe]={fb:"cookieDomain",dfVal:IL},PL.path={fb:"cookiePath",dfVal:IL},PL.enabled=JC,PL.ignoreCookies=JC,PL.blockedCookies=JC,PL.disableCookieDefer=!1,PL)),cookieDomain:JC,cookiePath:JC},Iyt[the]=JC,Iyt);function kyt(){!V2&&(V2=eNe(function(){return qu()}))}a(kyt,"_getDoc");function jNe(t){return t?t.isEnabled():!0}a(jNe,"_isMgrEnabled");function cPr(t,e){return e&&t&&Kt(t.ignoreCookies)?so(t.ignoreCookies,e)!==-1:!1}a(cPr,"_isIgnoredCookie");function nPr(t,e){return e&&t&&Kt(t.blockedCookies)&&so(t.blockedCookies,e)!==-1?!0:cPr(t,e)}a(nPr,"_isBlockedCookie");function iPr(t,e){var r=e[CL];if(qt(r)){var n=void 0;ln(t[X2r])||(n=!t[X2r]),ln(t[the])||(n=!t[the]),r=n}return r}a(iPr,"_isCfgEnabled");function lPr(t,e){var r,n,o,s,c,l,u,d,p=[];function h(E){var _,v=(_={},_[wNe]=E||"/",_[xyt]="Thu, 01 Jan 1970 00:00:01 GMT",_);return CZ()||(v["max-age"]="0"),sPr(Vi,v)}a(h,"_formatDeletionValue");function m(E,_,v,b){var I={},x=ri(E||Vi),w=Kc(x,";");if(w!==-1&&(x=ri(B2(E,w)),I=uPr(Ad(E,w+1))),j2(I,xNe,v||o,GC,ln),!qt(_)){var R=CZ();if(ln(I[xyt])){var P=pc(),k=P+_*1e3;if(k>0){var Q=new Date;Q.setTime(k),j2(I,xyt,oPr(Q,R?K2r:J2r)||oPr(Q,R?K2r:J2r)||Vi,GC)}}R||j2(I,"max-age",Vi+_,null,ln)}var M=$pe();return M&&M.protocol==="https:"&&(j2(I,"secure",null,null,ln),wyt===null&&(wyt=!M5i((Nl()||{})[kpe])),wyt&&j2(I,"SameSite","None",null,ln)),j2(I,wNe,b||n,null,ln),sPr(x,I)}a(m,"_formatSetCookieValue");function g(E){if(p)for(var _=p[Vr]-1;_>=0;_--)p[_].n===E&&p[Db](_,1)}a(g,"_removePendingCookie");function A(){Ryt(e)&&p&&(ut(p,function(E){nPr(r,E.n)||(E.o===0?u(E.n,E.v):E.o===1&&d(E.n,E.v))}),p=[])}a(A,"_flushPendingCookies"),t=Wf(t||rPr,null,e).cfg,s=Lb(t,function(E){E.setDf(E.cfg,D5i),r=E.ref(E.cfg,"cookieCfg"),n=r[wNe]||"/",o=r[xNe],r.disableCookieDefer?p=null:p===null&&(p=[]);var _=c;c=iPr(t,r)!==!1,l=r.getCookie||N5i,u=r.setCookie||aPr,d=r.delCookie||aPr,!_&&c&&p&&A()},e);var y={isEnabled:a(function(){var E=iPr(t,r)!==!1&&c&&Ryt(e),_=rPr[Z2r];return E&&_&&y!==_&&(E=jNe(_)),E},"isEnabled"),setEnabled:a(function(E){r[CL]=E,ln(t[the])||(t[the]=!E)},"setEnabled"),set:a(function(E,_,v,b,I){var x=!1,w=nPr(r,E);if(!w){var R=m(_,v,b,I);jNe(y)?(u(E,R),x=!0):p&&(g(E),p[si]({n:E,o:0,v:R}),x=!0)}return x},"set"),get:a(function(E){var _=Vi,v=cPr(r,E);if(!v){if(jNe(y))_=l(E);else if(p)for(var b=p[Vr]-1;b>=0;b--){var I=p[b];if(I.n===E){if(I.o===0){var x=I.v,w=Kc(x,";");_=w!==-1?ri(B2(x,w)):ri(x)}break}}}return _},"get"),del:a(function(E,_){var v=!1;return jNe(y)?v=y.purge(E,_):p&&(g(E),p[si]({n:E,o:1,v:h(_)}),v=!0),v},"del"),purge:a(function(E,_){var v=!1;return Ryt(e)&&(d(E,h(_)),v=!0),v},"purge"),unload:a(function(E){s&&s.rm(),s=null,p=null},"unload")};return y[Z2r]=y,y}a(lPr,"createCookieMgr");function Ryt(t){if(HNe===null){HNe=!1,!V2&&kyt();try{var e=V2.v||{};HNe=e[Pyt]!==void 0}catch(r){Rr(t,2,68,"Cannot access document.cookie - "+rf(r),{exception:Jt(r)})}}return HNe}a(Ryt,"areCookiesSupported");function uPr(t){var e={};if(t&&t[Vr]){var r=ri(t)[Mb](";");ut(r,function(n){if(n=ri(n||Vi),n){var o=Kc(n,"=");o===-1?e[n]=null:e[ri(B2(n,o))]=ri(Ad(n,o+1))}})}return e}a(uPr,"_extractParts");function oPr(t,e){return Er(t[e])?t[e]():null}a(oPr,"_formatDate");function sPr(t,e){var r=t||Vi;return Nr(e,function(n,o){r+="; "+n+(qt(o)?Vi:"="+o)}),r}a(sPr,"_formatCookieValue");function N5i(t){var e=Vi;if(!V2&&kyt(),V2.v){var r=V2.v[Pyt]||Vi;ePr!==r&&(tPr=uPr(r),ePr=r),e=ri(tPr[t]||Vi)}return e}a(N5i,"_getCookieValue");function aPr(t,e){!V2&&kyt(),V2.v&&(V2.v[Pyt]=t+"="+e)}a(aPr,"_setCookieValue");function M5i(t){return Vn(t)?!!(np(t,"CPU iPhone OS 12")||np(t,"iPad; CPU OS 12")||np(t,"Macintosh; Intel Mac OS X 10_14")&&np(t,"Version/")&&np(t,"Safari")||np(t,"Macintosh; Intel Mac OS X 10_14")&&qN(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||np(t,"Chrome/5")||np(t,"Chrome/6")||np(t,"UnrealEngine")&&!np(t,"Chrome")||np(t,"UCBrowser/12")||np(t,"UCBrowser/11")):!1}a(M5i,"uaDisallowsSameSiteNone");f();var O5i={perfEvtsSendAll:!1};function B5i(t){t.h=null;var e=t.cb;t.cb=[],ut(e,function(r){gd(r.fn,[r.arg])})}a(B5i,"_runScheduledListeners");function kL(t,e,r,n){ut(t,function(o){o&&o[e]&&(r?(r.cb[si]({fn:n,arg:o}),r.h=r.h||tf(B5i,0,r)):gd(n,[o]))})}a(kL,"_runListeners");var dPr=(function(){function t(e){this.listeners=[];var r,n,o=[],s={h:null,cb:[]},c=Wf(e,O5i);n=c[F2](function(l){r=!!l.cfg.perfEvtsSendAll}),Kn(t,this,function(l){pi(l,"listeners",{g:a(function(){return o},"g")}),l[dZ]=function(u){o[si](u)},l[uZ]=function(u){for(var d=so(o,u);d>-1;)o[Db](d,1),d=so(o,u)},l[gZ]=function(u){kL(o,gZ,s,function(d){d[gZ](u)})},l[SL]=function(u,d,p){kL(o,SL,s,function(h){h[SL](u,d,p)})},l[AZ]=function(u,d){kL(o,AZ,d?s:null,function(p){p[AZ](u,d)})},l[H2]=function(u){u&&(r||!u[Mpe]())&&kL(o,H2,null,function(d){u.isAsync?tf(function(){return d[H2](u)},0):d[H2](u)})},l[TNe]=function(u){u&&u[Vr]&&kL(o,TNe,s,function(d){d[TNe](u)})},l[SNe]=function(u){u&&u[zC]&&kL(o,SNe,s,function(d){d[SNe](u)})},l[INe]=function(u,d){if(u>0){var p=d||0;kL(o,INe,s,function(h){h[INe](u,p)})}},l[Nb]=function(u){var d=a(function(){n&&n.rm(),n=null,o=[],s.h&&s.h[U2](),s.h=null,s.cb=[]},"_finishUnload"),p;if(kL(o,"unload",null,function(h){var m=h[Nb](u);m&&(p||(p=[]),p[si](m))}),p)return pu(function(h){return hc(vNe(p),function(){d(),h()})});d()}})}return a(t,"NotificationManager"),t.__ieDyn=1,t})();f();var IZ="ctx",Nyt="ParentContextKey",rhe="ChildrenContextKey",L5i=null,$Ne=(function(){function t(e,r,n){var o=this;if(o.start=pc(),o[$C]=e,o.isAsync=n,o[Mpe]=function(){return!1},Er(r)){var s;pi(o,"payload",{g:a(function(){return!s&&Er(r)&&(s=r(),r=null),s},"g")})}o[Dq]=function(c){return c?c===t[Nyt]||c===t[rhe]?o[c]:(o[IZ]||{})[c]:null},o[YI]=function(c,l){if(c)if(c===t[Nyt])o[c]||(o[Mpe]=function(){return!0}),o[c]=l;else if(c===t[rhe])o[c]=l;else{var u=o[IZ]=o[IZ]||{};u[c]=l}},o.complete=function(){var c=0,l=o[Dq](t[rhe]);if(Kt(l))for(var u=0;u0&&(ut(A,function(y){try{y.func.call(y.self,y.args)}catch(E){Rr(r[Ml],2,73,"Unexpected Exception during onComplete - "+Jt(E))}}),s=[])}return g}a(u,"_moveNext");function d(g,A){var y=null,E=e.cfg;if(E&&g){var _=E[WN];!_&&A&&(_={}),E[WN]=_,_=e.ref(E,WN),_&&(y=_[g],!y&&A&&(y={}),_[g]=y,y=e.ref(_,g))}return y}a(d,"_getExtCfg");function p(g,A){var y=d(g,!0);return A&&Nr(A,function(E,_){if(qt(y[E])){var v=e.cfg[E];(v||!qt(v))&&(y[E]=v)}Ype(e,y,E,_)}),e.setDf(y,A)}a(p,"_resolveExtCfg");function h(g,A,y){y===void 0&&(y=!1);var E,_=d(g,!1),v=e.cfg;return _&&(_[A]||!qt(_[A]))?E=_[A]:(v[A]||!qt(v[A]))&&(E=v[A]),E||!qt(E)?E:y}a(h,"_getConfig");function m(g){for(var A;A=c._next();){var y=A[_L]();y&&g(y)}}return a(m,"_iterateChain"),c}a(Lyt,"_createInternalContext");function KI(t,e,r,n){var o=Wf(e),s=Lyt(t,o,r,n),c=s.ctx;function l(d){var p=s._next();return p&&p[CE](d,c),!p}a(l,"_processNext");function u(d,p){return d===void 0&&(d=null),Kt(d)&&(d=DL(d,o.cfg,r,p)),KI(d||c[WC](),o.cfg,r,p)}return a(u,"_createNew"),c[rp]=l,c[q2]=u,c}a(KI,"createProcessTelemetryContext");function xZ(t,e,r){var n=Wf(e.config),o=Lyt(t,n,e,r),s=o.ctx;function c(u){var d=o._next();return d&&d[Nb](s,u),!d}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Kt(u)&&(u=DL(u,n.cfg,e,d)),xZ(u||s[WC](),e,d)}return a(l,"_createNew"),s[rp]=c,s[q2]=l,s}a(xZ,"createProcessTelemetryUnloadContext");function nhe(t,e,r){var n=Wf(e.config),o=Lyt(t,n,e,r),s=o.ctx;function c(u){return s.iterate(function(d){Er(d[kq])&&d[kq](s,u)})}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Kt(u)&&(u=DL(u,n.cfg,e,d)),nhe(u||s[WC](),e,d)}return a(l,"_createNew"),s[rp]=c,s[q2]=l,s}a(nhe,"createProcessTelemetryUpdateContext");function DL(t,e,r,n){var o=null,s=!n;if(Kt(t)&&t[Vr]>0){var c=null;ut(t,function(l){if(!s&&n===l&&(s=!0),s&&l&&Er(l[CE])){var u=H5i(l,e,r);o||(o=u),c&&c._setNext(u),c=u}})}return n&&!o?DL([n],e,r):o}a(DL,"createTelemetryProxyChain");function H5i(t,e,r){var n=null,o=Er(t[CE]),s=Er(t[bL]),c;t?c=t[Q2]+"-"+t[Fq]+"-"+yPr++:c="Unknown-0-"+yPr++;var l={getPlugin:a(function(){return t},"getPlugin"),getNext:a(function(){return n},"getNext"),processTelemetry:p,unload:h,update:m,_id:c,_setNext:a(function(g){n=g},"_setNext")};function u(){var g;return t&&Er(t[APr])&&(g=t[APr]()),g||(g=KI(l,e,r)),g}a(u,"_getTelCtx");function d(g,A,y,E,_){var v=!1,b=t?t[Q2]:q5i,I=g[gPr];return I||(I=g[gPr]={}),g.setNext(n),t&&VNe(g[yd](),function(){return b+":"+y},function(){I[c]=!0;try{var x=n?n._id:Vi;x&&(I[x]=!1),v=A(g)}catch(R){var w=n?I[n._id]:!0;w&&(v=!0),(!n||!w)&&Rr(g[_E](),1,73,"Plugin ["+b+"] failed during "+y+" - "+Jt(R)+", run flags: "+Jt(I))}},E,_),v}a(d,"_processChain");function p(g,A){A=A||u();function y(E){if(!t||!o)return!1;var _=KN(t);return _[VC]||_[qpe]?!1:(s&&t[bL](n),t[CE](g,E),!0)}a(y,"_callProcessTelemetry"),d(A,y,"processTelemetry",function(){return{item:g}},!g.sync)||A[rp](g)}a(p,"_processTelemetry");function h(g,A){function y(){var E=!1;if(t){var _=KN(t),v=t[yd]||_[yd];t&&(!v||v===g.core())&&!_[VC]&&(_[yd]=null,_[VC]=!0,_[EE]=!1,t[VC]&&t[VC](g,A)===!0&&(E=!0))}return E}a(y,"_callTeardown"),d(g,y,"unload",function(){},A.isAsync)||g[rp](A)}a(h,"_unloadPlugin");function m(g,A){function y(){var E=!1;if(t){var _=KN(t),v=t[yd]||_[yd];t&&(!v||v===g.core())&&!_[VC]&&t[kq]&&t[kq](g,A)===!0&&(E=!0)}return E}a(y,"_callUpdate"),d(g,y,"update",function(){},!1)||g[rp](A)}return a(m,"_updatePlugin"),$f(l)}a(H5i,"createTelemetryPluginProxy");var j5i=(function(){function t(e,r,n,o){var s=this,c=KI(e,r,n,o);Qq(s,c,Dl(c))}return a(t,"ProcessTelemetryContext"),t})();f();f();f();function zNe(){var t=[];function e(n){n&&t[si](n)}a(e,"_addHandler");function r(n,o){ut(t,function(s){try{s(n,o)}catch(c){Rr(n[_E](),2,73,"Unexpected error calling unload handler - "+Jt(c))}}),t=[]}return a(r,"_runHandlers"),{add:e,run:r}}a(zNe,"createUnloadHandlerContainer");f();var YNe,KNe;function JNe(){var t=[];function e(n){var o=t;t=[],ut(o,function(s){try{(s.rm||s.remove).call(s)}catch(c){Rr(n,2,73,"Unloading:"+Jt(c))}}),YNe&&o[Vr]>YNe&&(KNe?KNe("doUnload",o):Rr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}a(e,"_doUnload");function r(n){n&&(Vf(t,n),YNe&&t[Vr]>YNe&&(KNe?KNe("Add",t):Rr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return a(r,"_addHook"),{run:e,add:r}}a(JNe,"createUnloadHookContainer");var Fyt,NL="getPlugin",$5i=(Fyt={},Fyt[WN]={isVal:IL,v:{}},Fyt),ihe=(function(){function t(){var e=this,r,n,o,s,c;d(),Kn(t,e,function(p){p[HN]=function(h,m,g,A){u(h,m,A),r=!0},p[VC]=function(h,m){var g=p[yd];if(!g||h&&g!==h[yd]())return;var A,y=!1,E=h||xZ(null,g,o&&o[NL]?o[NL]():o),_=m||{reason:0,isAsync:!1};function v(){y||(y=!0,s.run(E,m),c.run(E[_E]()),A===!0&&E[rp](_),d())}return a(v,"_unloadCallback"),!p[vL]||p[vL](E,_,v)!==!0?v():A=!0,A},p[kq]=function(h,m){var g=p[yd];if(!g||h&&g!==h[yd]())return;var A,y=!1,E=h||nhe(null,g,o&&o[NL]?o[NL]():o),_=m||{reason:0};function v(){y||(y=!0,u(E.getCfg(),E.core(),E[WC]()))}return a(v,"_updateCallback"),!p._doUpdate||p._doUpdate(E,_,v)!==!0?v():A=!0,A},Uq(p,"_addUnloadCb",function(){return s},"add"),Uq(p,"_addHook",function(){return c},"add"),pi(p,"_unloadHooks",{g:a(function(){return c},"g")})}),e[_E]=function(p){return l(p)[_E]()},e[EE]=function(){return r},e.setInitialized=function(p){r=p},e[bL]=function(p){o=p},e[rp]=function(p,h){h?h[rp](p):o&&Er(o[CE])&&o[CE](p,null)},e._getTelCtx=l;function l(p){p===void 0&&(p=null);var h=p;if(!h){var m=n||KI(null,{},e[yd]);o&&o[NL]?h=m[q2](null,o[NL]):h=m[q2](null,o)}return h}a(l,"_getTelCtx");function u(p,h,m){Wf(p,$5i,Hq(h)),!m&&h&&(m=h[oNe]()[WC]());var g=o;o&&o[NL]&&(g=o[NL]()),e[yd]=h,n=KI(m,p,h,g)}a(u,"_setDefaults");function d(){r=!1,e[yd]=null,n=null,o=null,c=JNe(),s=zNe()}a(d,"_initDefaults")}return a(t,"BaseTelemetryPlugin"),t.__ieDyn=1,t})();function V5i(t,e,r){var n={id:e,fn:r};Vf(t,n);var o={remove:a(function(){ut(t,function(s,c){if(s.id===n.id)return t[Db](c,1),-1})},"remove")};return o}a(V5i,"_addInitializer");function W5i(t,e,r){for(var n=!1,o=t[Vr],s=0;s"},"v")})}a(nDi,"_createUnloadHook");var qyt=(function(){function t(){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,w,R,P,k,Q,M,N,G,O,D,F,U;Kn(t,this,function(L){Te(),L._getDbgPlgTargets=function(){return[R,o]},L[EE]=function(){return r},L.activeStatus=function(){return Q},L._setPendingStatus=function(){Q=3},L[HN]=function(Y,ee,Ee,Ae){g&&Ya(_Pr),L[EE]()&&Ya("Core cannot be initialized more than once"),e=Wf(Y,Uyt,Ee||L[Ml],!1),Y=e.cfg,De(e[F2](function(Ze){var Et=Ze.cfg;N=Et.initInMemoMaxSize||K5i,H(Et);var Rt=Ze.ref(Ze.cfg,WN);Nr(Rt,function(Qt){Ze.ref(Rt,Qt)})})),s=Ae,b=rDi(e,v,s&&L[Rpe](),b),te(),L[Ml]=Ee;var ve=Y[Lq];if(p=[],p[si].apply(p,Mq(Mq([],ee,!1),ve,!1)),h=Y[Bq],Ne(null),(!m||m[Vr]===0)&&Ya("No "+Bq+" available"),h&&h[Vr]>1){var We=L[_L]("TeeChannelController");(!We||!We.plugin)&&Rr(n,1,28,"TeeChannel required")}tDi(Y,w,n),w=null,r=!0,Q===$I.ACTIVE&&j()},L.getChannels=function(){var Y=[];return m&&ut(m,function(ee){Y[si](ee)}),$f(Y)},L.track=function(Y){VNe(L[yZ](),function(){return"AppInsightsCore:track"},function(){Y===null&&(ae(Y),Ya("Invalid telemetry item")),!Y[$C]&&qt(Y[$C])&&(ae(Y),Ya("telemetry name required")),Y.iKey=Y.iKey||x,Y.time=Y.time||xL(new Date),Y.ver=Y.ver||"4.0",!g&&L[EE]()&&Q===$I.ACTIVE?fe()[rp](Y):Q!==$I.INACTIVE&&o[Vr]<=N&&o[si](Y)},function(){return{item:Y}},!Y.sync)},L[oNe]=fe,L[Rpe]=function(){return s||(s=new dPr(e.cfg),L[z5i]=s),s},L[dZ]=function(Y){L.getNotifyMgr()[dZ](Y)},L[uZ]=function(Y){s&&s[uZ](Y)},L.getCookieMgr=function(){return u||(u=lPr(e.cfg,L[Ml])),u},L.setCookieMgr=function(Y){u!==Y&&(zN(u,!1),u=Y)},L[yZ]=function(){return c||l||pPr()},L.setPerfMgr=function(Y){c=Y},L.eventCnt=function(){return o[Vr]},L.releaseQueue=function(){if(r&&o[Vr]>0){var Y=o;o=[],Q===2?ut(Y,function(ee){ee.iKey=ee.iKey||x,fe()[rp](ee)}):Rr(n,2,20,"core init status is not active")}},L.pollInternalLogs=function(Y){return y=Y||null,U=!1,D&&D[U2](),ce(!0)};function H(Y){var ee=Y.instrumentationKey,Ee=Y.endpointUrl;if(Q!==3){if(qt(ee)){x=null,Q=$I.INACTIVE;var Ae="Please provide instrumentation key";r?(Rr(n,1,100,Ae),j()):Ya(Ae);return}var ve=[];Vp(ee)?(ve[si](ee),x=null):x=ee,Vp(Ee)?(ve[si](Ee),M=null):M=Ee,ve[Vr]?$(Y,ve):W()}}a(H,"_handleIKeyEndpointPromises");function $(Y,ee){G=!1,Q=3;var Ee=IL(Y.initTimeOut)?Y.initTimeOut:J5i,Ae=CNe(ee);O&&O[U2](),O=tf(function(){O=null,G||W()},Ee),hc(Ae,function(ve){try{if(G)return;if(!ve.rejected){var We=ve[jN];if(We&&We[Vr]){var Ze=We[0];if(x=Ze&&Ze[jN],We[Vr]>1){var Et=We[1];M=Et&&Et[jN]}}x&&(Y.instrumentationKey=x,Y.endpointUrl=M)}W()}catch{G||W()}})}a($,"_waitForInitPromises");function W(){G=!0,qt(x)?(Q=$I.INACTIVE,Rr(n,1,112,"ikey can't be resolved from promises")):Q=$I.ACTIVE,j()}a(W,"_setStatus");function j(){r&&(L.releaseQueue(),L.pollInternalLogs())}a(j,"_releaseQueues");function ce(Y){if((!D||!D[CL])&&!U){var ee=Y||n&&n.queue[Vr]>0;ee&&(F||(F=!0,De(e[F2](function(Ee){var Ae=Ee.cfg.diagnosticLogInterval;(!Ae||!(Ae>0))&&(Ae=1e4);var ve=!1;D&&(ve=D[CL],D[U2]()),D=iNe(X,Ae),D.unref(),D[CL]=ve}))),D[CL]=!0)}return D}a(ce,"_startLogPoller"),L[DAt]=function(){U=!0,D&&D[U2](),X()},Qq(L,function(){return A},["addTelemetryInitializer"]),L[Nb]=function(Y,ee,Ee){Y===void 0&&(Y=!0),r||Ya(Y5i),g&&Ya(_Pr);var Ae={reason:50,isAsync:Y,flushComplete:!1},ve;Y&&!ee&&(ve=pu(function(Et){ee=Et}));var We=xZ(Ue(),L);We[Ppe](function(){v.run(L[Ml]),QNe([u,s,n],Y,function(){Te(),ee&&ee(Ae)})},L);function Ze(Et){Ae.flushComplete=Et,g=!0,_.run(We,Ae),L[DAt](),We[rp](Ae)}return a(Ze,"_doUnload"),X(),le(Y,Ze,6,Ee)||Ze(!1),ve},L[_L]=Ve,L.addPlugin=function(Y,ee,Ee,Ae){if(!Y){Ae&&Ae(!1),Z(bPr);return}var ve=Ve(Y[Q2]);if(ve&&!ee){Ae&&Ae(!1),Z("Plugin ["+Y[Q2]+"] is already loaded!");return}var We={reason:16};function Ze(Qt){p[si](Y),We.added=[Y],Ne(We),Ae&&Ae(!0)}if(a(Ze,"_addPlugin"),ve){var Et=[ve.plugin],Rt={reason:2,isAsync:!!Ee};Ke(Et,Rt,function(Qt){Qt?(We.removed=Et,We.reason|=32,Ze(!0)):Ae&&Ae(!1)})}else Ze(!1)},L.updateCfg=function(Y,ee){ee===void 0&&(ee=!0);var Ee;if(L[EE]()){Ee={reason:1,cfg:e.cfg,oldCfg:aZ({},e.cfg),newConfig:aZ({},Y),merge:ee},Y=Ee.newConfig;var Ae=e.cfg;Y[Lq]=Ae[Lq],Y[Bq]=Ae[Bq]}e._block(function(ve){var We=ve.cfg;Qyt(ve,We,Y,ee),ee||Nr(We,function(Ze){tm(Y,Ze)||ve.set(We,Ze,JC)}),ve.setDf(We,Uyt)},!0),e.notify(),Ee&&xe(Ee)},L.evtNamespace=function(){return E},L.flush=le,L.getTraceCtx=function(Y){return I||(I=mPr()),I},L.setTraceCtx=function(Y){I=Y||null},L.addUnloadHook=De,Uq(L,"addUnloadCb",function(){return _},"add"),L.onCfgChange=function(Y){var ee;return r?ee=Lb(e.cfg,Y,L[Ml]):ee=eDi(w,Y),nDi(ee)},L.getWParam=function(){return UN()||e.cfg.enableWParam?0:-1};function J(){var Y={};P=[];var ee=a(function(Ee){Ee&&ut(Ee,function(Ae){if(Ae[Q2]&&Ae[sNe]&&!Y[Ae.identifier]){var ve=Ae[Q2]+"="+Ae[sNe];P[si](ve),Y[Ae.identifier]=Ae}})},"_addPluginVersions");ee(m),h&&ut(h,function(Ee){ee(Ee)}),ee(p)}a(J,"_setPluginVersions");function Te(){r=!1,e=Wf({},Uyt,L[Ml]),e.cfg[aNe]=1,pi(L,"config",{g:a(function(){return e.cfg},"g"),s:a(function(ee){L.updateCfg(ee,!1)},"s")}),pi(L,"pluginVersionStringArr",{g:a(function(){return P||J(),P},"g")}),pi(L,"pluginVersionString",{g:a(function(){return k||(P||J(),k=P.join(";")),k||Vi},"g")}),pi(L,"logger",{g:a(function(){return n||(n=new SZ(e.cfg),e[Ml]=n),n},"g"),s:a(function(ee){e[Ml]=ee,n!==ee&&(zN(n,!1),n=ee)},"s")}),L[Ml]=new SZ(e.cfg),R=[];var Y=L.config[Lq]||[];Y.splice(0,Y[Vr]),Vf(Y,R),A=new EPr,o=[],zN(s,!1),s=null,c=null,l=null,zN(u,!1),u=null,d=null,p=[],h=null,m=null,g=!1,y=null,E=XC("AIBaseCore",!0),_=zNe(),I=null,x=null,v=JNe(),w=[],k=null,P=null,U=!1,D=null,F=!1,Q=0,M=null,N=null,G=!1,O=null}a(Te,"_initDefaults");function fe(){var Y=KI(Ue(),e.cfg,L);return Y[Ppe](ce),Y}a(fe,"_createTelCtx");function Ne(Y){var ee=Z5i(L[Ml],$2r,p);d=null,k=null,P=null,m=(h||[])[0]||[],m=WNe(Vf(m,ee[Bq]));var Ee=Vf(WNe(ee[yd]),m);R=$f(Ee);var Ae=L.config[Lq]||[];Ae.splice(0,Ae[Vr]),Vf(Ae,R);var ve=fe();m&&m[Vr]>0&&Byt(ve[q2](m),Ee),Byt(ve,Ee),Y&&xe(Y)}a(Ne,"_initPluginChain");function Ve(Y){var ee=null,Ee=null,Ae=[];return ut(R,function(ve){if(ve[Q2]===Y&&ve!==A)return Ee=ve,-1;ve.getChannel&&Ae[si](ve)}),!Ee&&Ae[Vr]>0&&ut(Ae,function(ve){if(Ee=ve.getChannel(Y),!Ee)return-1}),Ee&&(ee={plugin:Ee,setEnabled:a(function(ve){KN(Ee)[qpe]=!ve},"setEnabled"),isEnabled:a(function(){var ve=KN(Ee);return!ve[VC]&&!ve[qpe]},"isEnabled"),remove:a(function(ve,We){ve===void 0&&(ve=!0);var Ze=[Ee],Et={reason:1,isAsync:ve};Ke(Ze,Et,function(Rt){Rt&&Ne({reason:32,removed:Ze}),We&&We(Rt)})},"remove")}),ee}a(Ve,"_getPlugin");function Ue(){if(!d){var Y=(R||[]).slice();so(Y,A)===-1&&Y[si](A),d=DL(WNe(Y),e.cfg,L)}return d}a(Ue,"_getPluginChain");function Ke(Y,ee,Ee){if(Y&&Y[Vr]>0){var Ae=DL(Y,e.cfg,L),ve=xZ(Ae,L);ve[Ppe](function(){var We=!1,Ze=[];ut(p,function(Rt,Qt){CPr(Rt,Y)?We=!0:Ze[si](Rt)}),p=Ze,k=null,P=null;var Et=[];h&&(ut(h,function(Rt,Qt){var Ft=[];ut(Rt,function(ue){CPr(ue,Y)?We=!0:Ft[si](ue)}),Et[si](Ft)}),h=Et),Ee&&Ee(We),ce()}),ve[rp](ee)}else Ee(!1)}a(Ke,"_removePlugins");function X(){if(n&&n.queue){var Y=n.queue.slice(0);n.queue[Vr]=0,ut(Y,function(ee){var Ee={name:y||"InternalMessageId: "+ee[fZ],iKey:x,time:xL(new Date),baseType:ehe.dataType,baseData:{message:ee[G2]}};L.track(Ee)})}}a(X,"_flushInternalLogs");function le(Y,ee,Ee,Ae){var ve=1,We=!1,Ze=null;Ae=Ae||5e3;function Et(){ve--,We&&ve===0&&(Ze&&Ze[U2](),Ze=null,ee&&ee(We),ee=null)}if(a(Et,"doCallback"),m&&m[Vr]>0){var Rt=fe()[q2](m);Rt.iterate(function(Qt){if(Qt.flush){ve++;var Ft=!1;Qt.flush(Y,function(){Ft=!0,Et()},Ee)||Ft||(Y&&Ze==null?Ze=tf(function(){Ze=null,Et()},Ae):Et())}})}return We=!0,Et(),!0}a(le,"_flushChannels");function te(){var Y;De(e[F2](function(ee){var Ee=ee.cfg.enablePerfMgr;if(Ee){var Ae=ee.cfg[bNe];(Y!==Ae||!Y)&&(Ae||(Ae=X5i),iyt(ee.cfg,bNe,Ae),Y=Ae,l=null),!c&&!l&&Er(Ae)&&(l=Ae(L,L[Rpe]()))}else l=null,Y=null}))}a(te,"_initPerfManager");function xe(Y){var ee=nhe(Ue(),L);ee[Ppe](ce),(!L._updateHook||L._updateHook(ee,Y)!==!0)&&ee[rp](Y)}a(xe,"_doUpdate");function Z(Y){var ee=L[Ml];ee?(Rr(ee,2,73,Y),ce()):Ya(Y)}a(Z,"_logOrThrowError");function ae(Y){var ee=L[Rpe]();ee&&ee[SL]([Y],2)}a(ae,"_notifyInvalidEvent");function De(Y){v.add(Y)}a(De,"_addUnloadHook")})}return a(t,"AppInsightsCore"),t.__ieDyn=1,t})();f();function ohe(t,e){try{if(t&&t!==""){var r=FA().parse(t);if(r&&r[OAt]&&r[OAt]>=r.itemsAccepted&&r.itemsReceived-r.itemsAccepted===r.errors[Vr])return r}}catch(n){Rr(e,1,43,"Cannot parse the response. "+(n[$C]||Jt(n)),{response:t})}return null}a(ohe,"parseResponse");f();var JI="",iDi="NoResponseBody",TPr="&"+iDi+"=true",Gyt="POST",Hyt=(function(){function t(){var e=0,r,n,o,s,c,l,u,d,p,h,m,g,A,y;Kn(t,this,function(E,_){var v=!0;G(),E[HN]=function(O,D){o=D,n&&Rr(o,1,28,"Sender is already initialized"),E.SetConfig(O),n=!0},E._getDbgPlgTargets=function(){return[n,s,l,r]},E.SetConfig=function(O){try{if(c=O.senderOnCompleteCallBack||{},l=!!O.disableCredentials,u=O.fetchCredentials,s=!!O.isOneDs,r=!!O.enableSendPromise,p=!!O.disableXhr,h=!!O.disableBeacon,m=!!O.disableBeaconSync,y=O.timeWrapper,A=!!O.addNoResponse,g=!!O.disableFetchKeepAlive,d={sendPOST:Q},s||(v=!1),l){var D=$pe();D&&D.protocol&&D.protocol[VI]()==="file:"&&(v=!1)}return!0}catch{}return!1},E.getSyncFetchPayload=function(){return e},E.getSenderInst=function(O,D){return O&&O[Vr]?w(O,D):null},E.getFallbackInst=function(){return d},E[vL]=function(O,D){G()},E.preparePayload=function(O,D,F,U){if(!D||U||!F[zC]){O(F);return}try{var L=ti("CompressionStream");if(!Er(L)){O(F);return}var H=new ReadableStream({start:a(function(Te){Te.enqueue(Vn(F[zC])?new TextEncoder().encode(F[zC]):F[zC]),Te.close()},"start")}),$=H.pipeThrough(new L("gzip")),W=$.getReader(),j=[],ce=0,J=!1;return hc(W.read(),a(function Te(fe){if(!J&&!fe.rejected){var Ne=fe[jN];if(!Ne.done)return j[si](Ne[jN]),ce+=Ne.value[Vr],hc(W.read(),Te);for(var Ve=new Uint8Array(ce),Ue=0,Ke=0,X=j;Ke0&&(ut(Dl(Ve),function(te){J.append(te,Ve[te])}),Ue[Ope]=J),u?Ue.credentials=u:v&&s&&(Ue.credentials="include"),F&&(Ue.keepalive=!0,e+=Te,s?O._sendReason===2&&(fe=!0,A&&(L+=TPr)):fe=!0);var Ke=new Request(L,Ue);try{Ke[Cyt]=!0}catch{}if(!F&&r&&(W=pu(function(te,xe){j=te,ce=xe})),!L){x(D),j&&j(!1);return}function X(te,xe){xe?R(D,s?0:xe,{},s?JI:te):R(D,s?0:400,{},s?JI:te)}a(X,"_handleError");function le(te,xe,Z){var ae=te[zI],De=c.fetchOnComplete;De&&Er(De)?De(te,D,Z||JI,xe):R(D,ae,{},Z||JI)}a(le,"_onFetchComplete");try{hc(fetch(s?L:Ke,s?Ue:null),function(te){if(F&&(e-=Te,Te=0),!Ne)if(Ne=!0,te.rejected)X(te.reason&&te.reason[G2],499),ce&&ce(te.reason);else{var xe=te[jN];try{!s&&!xe.ok?(xe[zI]?X(xe.statusText,xe[zI]):X(xe.statusText,499),j&&j(!1)):s&&!xe.body?(le(xe,null,JI),j&&j(!0)):hc(xe.text(),function(Z){le(xe,O,Z[jN]),j&&j(!0)})}catch(Z){xe&&xe[zI]?X(Jt(Z),xe[zI]):X(Jt(Z),499),ce&&ce(Z)}}})}catch(te){Ne||(X(Jt(te),499),ce&&ce(te))}return fe&&!Ne&&(Ne=!0,R(D,200,{}),j&&j(!0)),s&&!Ne&&O[Nq]>0&&y&&y.set(function(){Ne||(Ne=!0,R(D,500,{}),j&&j(!0))},O[Nq]),W}a(M,"_doFetchSender");function N(O,D,F){var U=Gu(),L=new XDomainRequest,H=O[zC];L.onload=function(){var J=EZ(L),Te=c&&c.xdrOnComplete;Te&&Er(Te)?Te(L,D,O):R(D,200,{},J)},L.onerror=function(){R(D,400,{},s?JI:Hpe(L))},L.ontimeout=function(){R(D,500,{})},L.onprogress=function(){};var $=U&&U.location&&U.location.protocol||"",W=O[pZ];if(!W){x(D);return}if(!s&&W.lastIndexOf($,0)!==0){var j="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Rr(o,2,40,". "+j),I(j,D);return}var ce=s?W:W[WI](/^(https?:)/,"");L.open(Gyt,ce),O[Nq]&&(L[Nq]=O[Nq]),L.send(H),s&&F?y&&y.set(function(){L.send(H)},0):L.send(H)}a(N,"_xdrSender");function G(){e=0,n=!1,r=!1,o=null,s=null,c=null,l=null,u=null,d=null,p=!1,h=!1,m=!1,g=!1,A=!1,y=null}a(G,"_initDefaults")})}return a(t,"SenderPostManager"),t.__ieDyn=1,t})();f();var kPr="on",SPr="attachEvent",IPr="addEventListener",xPr="detachEvent",wPr="removeEventListener",jyt="events";var mhc=XC("aiEvtPageHide"),ghc=XC("aiEvtPageShow"),oDi=/\.[\.]+/g,sDi=/[\.]+$/,aDi=1,XNe=MNe("events"),cDi=/^([^.]*)(?:\.(.+)|)/;function RPr(t){return t&&t[WI]?t[WI](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Vi):t}a(RPr,"_normalizeNamespace");function $yt(t,e){if(e){var r=Vi;Kt(e)?(r=Vi,ut(e,function(o){o=RPr(o),o&&(o[0]!=="."&&(o="."+o),r+=o)})):r=RPr(e),r&&(r[0]!=="."&&(r="."+r),t=(t||Vi)+r)}var n=cDi.exec(t||Vi)||[];return{type:n[1],ns:(n[2]||Vi).replace(oDi,".").replace(sDi,Vi)[Mb](".").sort().join(".")}}a($yt,"_getEvtNamespace");function DPr(t,e,r){r===void 0&&(r=!0);var n=XNe.get(t,jyt,{},r),o=n[e];return o||(o=n[e]=[]),o}a(DPr,"_getRegisteredEvents");function NPr(t,e,r,n){t&&e&&e[$N]&&(t[wPr]?t[wPr](e[$N],r,n):t[xPr]&&t[xPr](kPr+e[$N],r))}a(NPr,"_doDetach");function lDi(t,e,r,n){var o=!1;return t&&e&&e[$N]&&r&&(t[IPr]?(t[IPr](e[$N],r,n),o=!0):t[SPr]&&(t[SPr](kPr+e[$N],r),o=!0)),o}a(lDi,"_doAttach");function PPr(t,e,r,n){for(var o=e[Vr];o--;){var s=e[o];s&&(!r.ns||r.ns===s[NAt].ns)&&(!n||n(s))&&(NPr(t,s[NAt],s.handler,s.capture),e[Db](o,1))}}a(PPr,"_doUnregister");function uDi(t,e,r){if(e[$N])PPr(t,DPr(t,e[$N]),e,r);else{var n=XNe.get(t,jyt,{});Nr(n,function(o,s){PPr(t,s,e,r)}),Dl(n)[Vr]===0&&XNe.kill(t,jyt)}}a(uDi,"_unregisterEvents");function she(t,e){var r;return e?(Kt(e)?r=[t].concat(e):r=[t,e],r=$yt("xx",r).ns[Mb](".")):r=t,r}a(she,"mergeEvtNamespace");function ZNe(t,e,r,n,o){o===void 0&&(o=!1);var s=!1;if(t)try{var c=$yt(e,n);if(s=lDi(t,c,r,o),s&&XNe.accept(t)){var l={guid:aDi++,evtName:c,handler:r,capture:o};DPr(t,c.type)[si](l)}}catch{}return s}a(ZNe,"eventOn");function Vyt(t,e,r,n,o){if(o===void 0&&(o=!1),t)try{var s=$yt(e,n),c=!1;uDi(t,s,function(l){return s.ns&&!r||l.handler===r?(c=!0,!0):!1}),c||NPr(t,s,r,o)}catch{}}a(Vyt,"eventOff");f();var ahe="sampleRate",che="ProcessLegacy",eMe="http.method",jq="https://dc.services.visualstudio.com",W2="/v2/track",yg="not_specified";f();var tMe=kAt({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]});f();f();var $q="split",Ui="length",Vq="toLowerCase",OL="ingestionendpoint",BL="toString",Wyt="removeItem",wZ="message",QPr="count";var lhe="stringify",uhe="pathname",Wq="match";var Eg="name";var rm="properties",_g="measurements",dhe="sizeInBytes",fhe="typeName",RZ="exceptions",zq="severityLevel",rMe="problemGroup",Yq="parsedStack",phe="hasFullStack",hhe="assembly",z2="fileName",Kq="line",PZ="aiDataContract",Jq="duration";function zyt(t,e,r){var n=e[Ui],o=qPr(t,e);if(o[Ui]!==n){for(var s=0,c=o;r[c]!==void 0;)s++,c=Ad(o,0,147)+GPr(s);o=c}return o}a(zyt,"dataSanitizeKeyAndAddUniqueness");function qPr(t,e){var r;return e&&(e=ri(Pl(e)),e[Ui]>150&&(r=Ad(e,0,150),Rr(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),r||e}a(qPr,"dataSanitizeKey");function Jc(t,e,r){r===void 0&&(r=1024);var n;return e&&(r=r||1024,e=ri(Pl(e)),e[Ui]>r&&(n=Ad(e,0,r),Rr(t,2,61,"string value is too long. It has been truncated to "+r+" characters.",{value:e},!0))),n||e}a(Jc,"dataSanitizeString");function Xq(t,e,r){return Vn(e)&&(e=yyt(e,r)),Jyt(t,e,2048,66)}a(Xq,"dataSanitizeUrl");function mhe(t,e){var r;return e&&e[Ui]>32768&&(r=Ad(e,0,32768),Rr(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),r||e}a(mhe,"dataSanitizeMessage");function Yyt(t,e){var r;if(e){var n=""+e;n[Ui]>32768&&(r=Ad(n,0,32768),Rr(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return r||e}a(Yyt,"dataSanitizeException");function UA(t,e){if(e){var r={};Nr(e,function(n,o){if(kl(o)&&wL())try{o=FA()[lhe](o)}catch(s){Rr(t,2,49,"custom property is not valid",{exception:s},!0)}o=Jc(t,o,8192),n=zyt(t,n,r),r[n]=o}),e=r}return e}a(UA,"dataSanitizeProperties");function QA(t,e){if(e){var r={};Nr(e,function(n,o){n=zyt(t,n,r),r[n]=o}),e=r}return e}a(QA,"dataSanitizeMeasurements");function Kyt(t,e){return e&&Jyt(t,e,128,69)[BL]()}a(Kyt,"dataSanitizeId");function Jyt(t,e,r,n){var o;return e&&(e=ri(Pl(e)),e[Ui]>r&&(o=Ad(e,0,r),Rr(t,2,n,"input is too long, it has been truncated to "+r+" characters.",{data:e},!0))),o||e}a(Jyt,"dataSanitizeInput");function GPr(t){var e="00"+t;return ZDe(e,e[Ui]-3)}a(GPr,"dsPadNumber");f();var HPr=qu()||{},jPr=0,fDi=[null,null,null,null,null];function $Pr(t){var e=jPr,r=fDi,n=r[e];return HPr.createElement?r[e]||(n=r[e]=HPr.createElement("a")):n={host:pDi(t,!0)},n.href=t,e++,e>=r[Ui]&&(e=0),jPr=e,n}a($Pr,"urlParseUrl");function pDi(t,e){var r=VPr(t,e)||"";if(r){var n=r[Wq](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[Ui]>3&&Vn(n[2])&&n[2][Ui]>0)return n[2]+(n[3]||"")}return r}a(pDi,"urlParseHost");function VPr(t,e){var r=null;if(t){var n=t[Wq](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[Ui]>2&&Vn(n[2])&&n[2][Ui]>0&&(r=n[2]||"",e&&n[Ui]>2)){var o=(n[1]||"")[Vq](),s=n[3]||"";(o==="http"&&s===":80"||o==="https"&&s===":443")&&(s=""),r+=s}}return r}a(VPr,"urlParseFullHost");var hDi=[jq+W2,"https://breeze.aimon.applicationinsights.io"+W2,"https://dc-int.services.visualstudio.com"+W2];function nMe(t){return so(hDi,t[Vq]())!==-1}a(nMe,"isInternalApplicationInsightsEndpoint");function WPr(t,e,r,n){var o,s=n,c=n;if(e&&e[Ui]>0){var l=$Pr(e);if(o=l.host,!s)if(l[uhe]!=null){var u=l.pathname[Ui]===0?"/":l[uhe];u.charAt(0)!=="/"&&(u="/"+u),c=l[uhe],s=Jc(t,r?r+" "+u:u)}else s=Jc(t,e)}else o=n,s=n;return{target:o,name:s,data:c}}a(WPr,"AjaxHelperParseDependencyPath");f();f();var iMe=wpe({LocalStorage:0,SessionStorage:1});var kZ=void 0,zPr="";function YPr(t){try{if(qt(gg()))return null;var e=new Date()[BL](),r=ti(t===iMe.LocalStorage?"localStorage":"sessionStorage"),n=zPr+e;r.setItem(n,e);var o=r.getItem(n)!==e;if(r[Wyt](n),!o)return r}catch{}return null}a(YPr,"_getVerifiedStorageObject");function Xyt(){return oMe()?YPr(iMe.SessionStorage):null}a(Xyt,"_getSessionStorageObject");function Zyt(t){zPr=t||""}a(Zyt,"utlSetStoragePrefix");function oMe(t){return(t||kZ===void 0)&&(kZ=!!YPr(iMe.SessionStorage)),kZ}a(oMe,"utlCanUseSessionStorage");function eEt(t,e){var r=Xyt();if(r!==null)try{return r.getItem(e)}catch(n){kZ=!1,Rr(t,2,2,"Browser failed read of session storage. "+rf(n),{exception:Jt(n)})}return null}a(eEt,"utlGetSessionStorage");function tEt(t,e,r){var n=Xyt();if(n!==null)try{return n.setItem(e,r),!0}catch(o){kZ=!1,Rr(t,2,4,"Browser failed write to session storage. "+rf(o),{exception:Jt(o)})}return!1}a(tEt,"utlSetSessionStorage");function rEt(t,e){var r=Xyt();if(r!==null)try{return r[Wyt](e),!0}catch(n){kZ=!1,Rr(t,2,6,"Browser failed removal of session storage item. "+rf(n),{exception:Jt(n)})}return!1}a(rEt,"utlRemoveSessionStorage");f();var mDi=";",gDi="=";function ghe(t){if(!t)return{};var e=t[$q](mDi),r=Tpe(e,function(o,s){var c=s[$q](gDi);if(c[Ui]===2){var l=c[0][Vq](),u=c[1];o[l]=u}return o},{});if(Dl(r)[Ui]>0){if(r.endpointsuffix){var n=r.location?r.location+".":"";r[OL]=r[OL]||"https://"+n+"dc."+r.endpointsuffix}r[OL]=r[OL]||jq,qN(r[OL],"/")&&(r[OL]=r[OL].slice(0,-1))}return r}a(ghe,"parseConnectionString");f();var nEt=(function(){function t(e,r,n){var o=this,s=this;s.ver=1,s.sampleRate=100,s.tags={},s[Eg]=Jc(e,n)||yg,s.data=r,s.time=xL(new Date),s[PZ]={time:1,iKey:1,name:1,sampleRate:a(function(){return o.sampleRate===100?4:1},"sampleRate"),tags:1,data:1}}return a(t,"Envelope"),t})();f();var JN=(function(){function t(e,r,n,o){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var s=this;s.ver=2,s[Eg]=Jc(e,r)||yg,s[rm]=UA(e,n),s[_g]=QA(e,o)}return a(t,"Event"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})();f();var ADi=58,yDi=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,EDi=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,_Di=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,CDi=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,vDi=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,bDi=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,TDi=/([^\(\s\n]+):([0-9]+)$/,KPr="",DZ="error",Ub="stack",oEt="stackDetails",JPr="errorSrc",sEt="message",tkr="description",XPr=[{re:EDi,len:5,m:1,fn:2,ln:3,col:4},{chk:IDi,pre:SDi,re:_Di,len:4,m:1,fn:2,ln:3},{re:CDi,len:3,m:1,fn:2,hdl:ekr},{re:vDi,len:2,fn:1,hdl:ekr}];function SDi(t){return t.replace(/(\(anonymous\))/,"")}a(SDi,"_scrubAnonymous");function IDi(t){return Kc(t,"[native")<0}a(IDi,"_ignoreNative");function aEt(t,e){var r=t;return r&&!Vn(r)&&(JSON&&JSON[lhe]?(r=JSON[lhe](t),e&&(!r||r==="{}")&&(Er(t[BL])?r=t[BL]():r=""+t)):r=""+t+" - (Missing JSON.stringify)"),r||""}a(aEt,"_stringify");function rkr(t,e){var r=t;return t&&(r&&!Vn(r)&&(r=t[sEt]||t[tkr]||r),r&&!Vn(r)&&(r=aEt(r,!0)),t.filename&&(r=r+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&Kc(r||"",e)===-1&&(r=e+": "+r),r||""}a(rkr,"_formatMessage");function xDi(t){try{if(kl(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}a(xDi,"_isExceptionDetailsInternal");function wDi(t){try{if(kl(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}a(wDi,"_isExceptionInternal");function ZPr(t){return t&&t.src&&Vn(t.src)&&t.obj&&Kt(t.obj)}a(ZPr,"_isStackDetails");function Zq(t){var e=t||"";Vn(e)||(Vn(e[Ub])?e=e[Ub]:e=""+e);var r=e[$q](` +`);return{src:e,obj:r}}a(Zq,"_convertStackObj");function RDi(t){for(var e=[],r=t[$q](` +`),n=0;n0){e=[];var n=0,o=!1,s=0;ut(r,function(y){if(o||ODi(y)){var E=Pl(y);o=!0;var _=BDi(E,n);_&&(s+=_[dhe],e.push(_),n++)}});var c=32*1024;if(s>c)for(var l=0,u=e[Ui]-1,d=0,p=l,h=u;lc){var A=h-p+1;e.splice(p,A);break}p=l,h=u,l++,u--}}return e}a(kDi,"_parseStack");function sMe(t){var e="";if(t&&(e=t.typeName||t[Eg]||"",!e))try{var r=/function (.{1,200})\(/,n=r.exec(t.constructor[BL]());e=n&&n[Ui]>1?n[1]:""}catch{}return e}a(sMe,"_getErrorType");function iEt(t){if(t)try{if(!Vn(t)){var e=sMe(t),r=aEt(t,!1);return(!r||r==="{}")&&(t[DZ]&&(t=t[DZ],e=sMe(t)),r=aEt(t,!0)),Kc(r,e)!==0&&e!=="String"?e+":"+r:r}}catch{}return""+(t||"")}a(iEt,"_formatErrorCode");var eG=(function(){function t(e,r,n,o,s,c){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var l=this;l.ver=2,wDi(r)?(l[RZ]=r[RZ]||[],l[rm]=r[rm],l[_g]=r[_g],r[zq]&&(l[zq]=r[zq]),r.id&&(l.id=r.id,r[rm].id=r.id),r[rMe]&&(l[rMe]=r[rMe]),qt(r.isManual)||(l.isManual=r.isManual)):(n||(n={}),c&&(n.id=c),l[RZ]=[ikr(e,r,n)],l[rm]=UA(e,n),l[_g]=QA(e,o),s&&(l[zq]=s),c&&(l.id=c))}return a(t,"Exception"),t.CreateAutoException=function(e,r,n,o,s,c,l,u){var d=sMe(s||c||e);return{message:rkr(e,d),url:r,lineNumber:n,columnNumber:o,error:iEt(s||c||e),evt:iEt(c||e),typeName:d,stackDetails:nkr(l||s||c),errorSrc:u}},t.CreateFromInterface=function(e,r,n,o){var s=r[RZ]&&QN(r[RZ],function(l){return MDi(e,l)}),c=new t(e,Bb(Bb({},r),{exceptions:s}),n,o);return c},t.prototype.toInterface=function(){var e=this,r=e.exceptions,n=e.properties,o=e.measurements,s=e.severityLevel,c=e.problemGroup,l=e.id,u=e.isManual,d=r instanceof Array&&QN(r,function(p){return p.toInterface()})||void 0;return{ver:"4.0",exceptions:d,severityLevel:s,properties:n,measurements:o,problemGroup:c,id:l,isManual:u}},t.CreateSimpleException=function(e,r,n,o,s,c){var l;return{exceptions:[(l={},l[phe]=!0,l.message=e,l.stack=s,l.typeName=r,l)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=iEt,t})();var DDi=$f({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function NDi(){var t=this,e=Kt(t[Yq])&&QN(t[Yq],function(n){return FDi(n)}),r={id:t.id,outerId:t.outerId,typeName:t[fhe],message:t[wZ],hasFullStack:t[phe],stack:t[Ub],parsedStack:e||void 0};return r}a(NDi,"_toInterface");function ikr(t,e,r){var n,o,s,c,l,u,d,p;if(xDi(e))c=e[fhe],l=e[wZ],d=e[Ub],p=e[Yq]||[],u=e[phe];else{var h=e,m=h&&h.evt;LN(h)||(h=h[DZ]||m||h),c=Jc(t,sMe(h))||yg,l=mhe(t,rkr(e||h,c))||yg;var g=e[oEt]||nkr(e);p=kDi(g),Kt(p)&&QN(p,function(A){A[hhe]=Jc(t,A[hhe]),A[z2]=Jc(t,A[z2])}),d=Yyt(t,PDi(g)),u=Kt(p)&&p[Ui]>0,r&&(r[fhe]=r[fhe]||c)}return n={},n[PZ]=DDi,n.id=o,n.outerId=s,n.typeName=c,n.message=l,n[phe]=u,n.stack=d,n.parsedStack=p,n.toInterface=NDi,n}a(ikr,"_createExceptionDetails");function MDi(t,e){var r=Kt(e[Yq])&&QN(e[Yq],function(o){return LDi(o)})||e[Yq],n=ikr(t,Bb(Bb({},e),{parsedStack:r}));return n}a(MDi,"_createExDetailsFromInterface");function okr(t,e){var r=e[Wq](bDi);if(r&&r[Ui]>=4)t[z2]=r[1],t[Kq]=parseInt(r[2]);else{var n=e[Wq](TDi);n&&n[Ui]>=3?(t[z2]=n[1],t[Kq]=parseInt(n[2])):t[z2]=e}}a(okr,"_parseFilename");function ekr(t,e,r){var n=t[z2];e.fn&&r&&r[Ui]>e.fn&&(e.ln&&r[Ui]>e.ln?(n=ri(r[e.fn]||""),t[Kq]=parseInt(ri(r[e.ln]||""))||0):n=ri(r[e.fn]||"")),n&&okr(t,n)}a(ekr,"_handleFilename");function ODi(t){var e=!1;if(t&&Vn(t)){var r=ri(t);r&&(e=yDi.test(r))}return e}a(ODi,"_isStackFrame");var skr=$f({level:1,method:1,assembly:0,fileName:0,line:0});function BDi(t,e){var r,n;if(t&&Vn(t)&&ri(t)){n=(r={},r[PZ]=skr,r.level=e,r.assembly=ri(t),r.method=KPr,r.fileName="",r.line=0,r.sizeInBytes=0,r);for(var o=0;o=s.len){s.m&&(n.method=ri(c[s.m]||KPr)),s.hdl?s.hdl(n,s,c):s.fn&&(s.ln?(n[z2]=ri(c[s.fn]||""),n[Kq]=parseInt(ri(c[s.ln]||""))||0):okr(n,c[s.fn]||""));break}o++}}return akr(n)}a(BDi,"_extractStackFrame");function LDi(t){var e,r=(e={},e[PZ]=skr,e.level=t.level,e.method=t.method,e.assembly=t[hhe],e.fileName=t[z2],e.line=t[Kq],e.sizeInBytes=0,e);return akr(r)}a(LDi,"_stackFrameFromInterface");function akr(t){var e=ADi;return t&&(e+=t.method[Ui],e+=t.assembly[Ui],e+=t.fileName[Ui],e+=t.level.toString()[Ui],e+=t.line.toString()[Ui],t[dhe]=e),t}a(akr,"_populateFrameSizeInBytes");function FDi(t){return{level:t.level,method:t.method,assembly:t[hhe],fileName:t[z2],line:t[Kq]}}a(FDi,"_parsedFrameToInterface");f();f();var ckr=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return a(t,"DataPoint"),t})();var XN=(function(){function t(e,r,n,o,s,c,l,u,d){this.aiDataContract={ver:1,metrics:1,properties:0};var p=this;p.ver=2;var h=new ckr;h[QPr]=o>0?o:void 0,h.max=isNaN(c)||c===null?void 0:c,h.min=isNaN(s)||s===null?void 0:s,h[Eg]=Jc(e,r)||yg,h.value=n,h.stdDev=isNaN(l)||l===null?void 0:l,p.metrics=[h],p[rm]=UA(e,u),p[_g]=QA(e,d)}return a(t,"Metric"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})();f();f();var Ahe="";function aMe(t){(isNaN(t)||t<0)&&(t=0),t=c2r(t);var e=Ahe+t%1e3,r=Ahe+jC(t/1e3)%60,n=Ahe+jC(t/(1e3*60))%60,o=Ahe+jC(t/(1e3*60*60))%24,s=jC(t/(1e3*60*60*24));return e=e[Ui]===1?"00"+e:e[Ui]===2?"0"+e:e,r=r[Ui]<2?"0"+r:r,n=n[Ui]<2?"0"+n:n,o=o[Ui]<2?"0"+o:o,(s>0?s+".":Ahe)+o+":"+n+":"+r+"."+e}a(aMe,"msToTimeSpan");var tG=(function(){function t(e,r,n,o,s,c,l){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var u=this;u.ver=2,u.id=Kyt(e,l),u.url=Xq(e,n),u[Eg]=Jc(e,r)||yg,isNaN(o)||(u[Jq]=aMe(o)),u[rm]=UA(e,s),u[_g]=QA(e,c)}return a(t,"PageView"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})();f();var rG=(function(){function t(e,r,n,o,s,c,l,u,d,p,h,m){d===void 0&&(d="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var g=this;g.ver=2,g.id=r,g[Jq]=aMe(s),g.success=c,g.resultCode=l+"",g.type=Jc(e,d);var A=WPr(e,n,u,o);g.data=Xq(e,o)||A.data,g.target=Jc(e,A.target),p&&(g.target="".concat(g.target," | ").concat(p)),g[Eg]=Jc(e,A[Eg]),g[rm]=UA(e,h),g[_g]=QA(e,m)}return a(t,"RemoteDependencyData"),t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})();f();var nG=(function(){function t(e,r,n,o,s){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var c=this;c.ver=2,r=r||yg,c[wZ]=mhe(e,r),c[rm]=UA(e,o),c[_g]=QA(e,s),n&&(c[zq]=n)}return a(t,"Trace"),t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})();f();var iG=(function(){function t(e,r,n,o,s,c,l){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var u=this;u.ver=2,u.url=Xq(e,n),u[Eg]=Jc(e,r)||yg,u[rm]=UA(e,s),u[_g]=QA(e,c),l&&(u.domProcessing=l.domProcessing,u[Jq]=l[Jq],u.networkConnect=l.networkConnect,u.perfTotal=l.perfTotal,u.receivedResponse=l.receivedResponse,u.sentRequest=l.sentRequest)}return a(t,"PageViewPerformance"),t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})();f();var ZN=(function(){function t(e,r){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=r}return a(t,"Data"),t})();f();function FL(t){var e="ai."+t+".";return function(r){return e+r}}a(FL,"_aiNameFunc");var yhe=FL("application"),ip=FL("device"),cMe=FL("location"),NZ=FL("operation"),cEt=FL("session"),LL=FL("user"),oG=FL("cloud"),Ehe=FL("internal"),_he=(function(t){Ag(e,t);function e(){return t.call(this)||this}return a(e,"ContextTagKeys"),e})(oyt({applicationVersion:yhe("ver"),applicationBuild:yhe("build"),applicationTypeId:yhe("typeId"),applicationId:yhe("applicationId"),applicationLayer:yhe("layer"),deviceId:ip("id"),deviceIp:ip("ip"),deviceLanguage:ip("language"),deviceLocale:ip("locale"),deviceModel:ip("model"),deviceFriendlyName:ip("friendlyName"),deviceNetwork:ip("network"),deviceNetworkName:ip("networkName"),deviceOEMName:ip("oemName"),deviceOS:ip("os"),deviceOSVersion:ip("osVersion"),deviceRoleInstance:ip("roleInstance"),deviceRoleName:ip("roleName"),deviceScreenResolution:ip("screenResolution"),deviceType:ip("type"),deviceMachineName:ip("machineName"),deviceVMName:ip("vmName"),deviceBrowser:ip("browser"),deviceBrowserVersion:ip("browserVersion"),locationIp:cMe("ip"),locationCountry:cMe("country"),locationProvince:cMe("province"),locationCity:cMe("city"),operationId:NZ("id"),operationName:NZ("name"),operationParentId:NZ("parentId"),operationRootId:NZ("rootId"),operationSyntheticSource:NZ("syntheticSource"),operationCorrelationVector:NZ("correlationVector"),sessionId:cEt("id"),sessionIsFirst:cEt("isFirst"),sessionIsNew:cEt("isNew"),userAccountAcquisitionDate:LL("accountAcquisitionDate"),userAccountId:LL("accountId"),userAgent:LL("userAgent"),userId:LL("id"),userStoreRegion:LL("storeRegion"),userAuthUserId:LL("authUserId"),userAnonymousUserAcquisitionDate:LL("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:LL("authUserAcquisitionDate"),cloudName:oG("name"),cloudRole:oG("role"),cloudRoleVer:oG("roleVer"),cloudRoleInstance:oG("roleInstance"),cloudEnvironment:oG("environment"),cloudLocation:oG("location"),cloudDeploymentUnit:oG("deploymentUnit"),internalNodeName:Ehe("nodeName"),internalSdkVersion:Ehe("sdkVersion"),internalAgentVersion:Ehe("agentVersion"),internalSnippet:Ehe("snippet"),internalSdkSrc:Ehe("sdkSrc")}));f();var zf=new _he;f();function lkr(t,e){Vyt(t,null,null,e)}a(lkr,"_disableEvents");function lEt(t){var e=qu(),r=Nl(),n=!1,o=[],s=1;r&&!qt(r.onLine)&&!r.onLine&&(s=2);var c=0,l=m(),u=she(XC("OfflineListener"),t);try{if(p(Gu())&&(n=!0),e){var d=e.body||e;d.ononline&&p(d)&&(n=!0)}}catch{n=!1}function p(b){var I=!1;return b&&(I=ZNe(b,"online",y,u),I&&ZNe(b,"offline",E,u)),I}a(p,"_enableEvents");function h(){return l}a(h,"_isOnline");function m(){return!(c===2||s===2)}a(m,"calCurrentState");function g(){var b=m();l!==b&&(l=b,ut(o,function(I){var x={isOnline:l,rState:s,uState:c};try{I(x)}catch{}}))}a(g,"listnerNoticeCheck");function A(b){c=b,g()}a(A,"setOnlineState");function y(){s=1,g()}a(y,"_setOnline");function E(){s=2,g()}a(E,"_setOffline");function _(){var b=Gu();if(b&&n){if(lkr(b,u),e){var I=e.body||e;ln(I.ononline)||lkr(I,u)}n=!1}}a(_,"_unload");function v(b){return o.push(b),{rm:a(function(){var I=o.indexOf(b);if(I>-1)return o.splice(I,1)},"rm")}}return a(v,"addListener"),{isOnline:h,isListening:a(function(){return n},"isListening"),unload:_,addListener:v,setOnlineState:A}}a(lEt,"createOfflineListener");var lMe="AppInsightsChannelPlugin";f();f();f();f();f();var UL="duration";f();var Yf="tags",uMe="deviceType",vE="data",Y2="name",sG="traceID",Zi="length",QL="stringify",qL="measurements",Qb="dataType",GL="envelopeType",eM="toString",tM="enqueue",rM="count",qb="push",Che="emitLineDelimitedJson",HL="clear",MZ="markAsSent",aG="clearSent",vhe="bufferOverride",OZ="BUFFER_KEY",nM="SENT_BUFFER_KEY",jL="concat",BZ="MAX_BUFFER_SIZE",LZ="triggerSend",nm="diagLog",dMe="initialize",FZ="_sender",UZ="endpointUrl",QZ="instrumentationKey",fMe="customHeaders",uEt="maxBatchSizeInBytes",pMe="onunloadDisableBeacon",hMe="isBeaconApiDisabled",dEt="alwaysUseXhrOverride",fEt="enableSessionStorageBuffer",XI="_buffer",pEt="onunloadDisableFetch",hEt="disableSendBeaconSplit",bhe="getSenderInst",$L="_onError",mMe="_onPartialSuccess",The="_onSuccess",gMe="itemsReceived",AMe="itemsAccepted",yMe="baseType",qZ="sampleRate",ukr="getHashCodeScore";var mEt="baseType",hu="baseData",zp="properties",dkr="true";function nf(t,e,r){return j2(t,e,r,GC)}a(nf,"_setValueIf");function UDi(t,e,r){var n=r[Yf]=r[Yf]||{},o=e.ext=e.ext||{},s=e[Yf]=e[Yf]||[],c=o.user;c&&(nf(n,zf.userAuthUserId,c.authId),nf(n,zf.userId,c.id||c.localId));var l=o.app;l&&nf(n,zf.sessionId,l.sesId);var u=o.device;u&&(nf(n,zf.deviceId,u.id||u.localId),nf(n,zf[uMe],u.deviceClass),nf(n,zf.deviceIp,u.ip),nf(n,zf.deviceModel,u.model),nf(n,zf[uMe],u[uMe]));var d=e.ext.web;if(d){nf(n,zf.deviceLanguage,d.browserLang),nf(n,zf.deviceBrowserVersion,d.browserVer),nf(n,zf.deviceBrowser,d.browser);var p=r[vE]=r[vE]||{},h=p[hu]=p[hu]||{},m=h[zp]=h[zp]||{};nf(m,"domain",d.domain),nf(m,"isManual",d.isManual?dkr:null),nf(m,"screenRes",d.screenRes),nf(m,"userConsent",d.userConsent?dkr:null)}var g=o.os;g&&(nf(n,zf.deviceOS,g[Y2]),nf(n,zf.deviceOSVersion,g.osVer));var A=o.trace;A&&(nf(n,zf.operationParentId,A.parentID),nf(n,zf.operationName,Jc(t,A[Y2])),nf(n,zf.operationId,A[sG]));for(var y={},E=s[Zi]-1;E>=0;E--){var _=s[E];Nr(_,function(b,I){y[b]=I}),s.splice(E,1)}Nr(s,function(b,I){y[b]=I});var v=Bb(Bb({},n),y);v[zf.internalSdkVersion]||(v[zf.internalSdkVersion]=Jc(t,"javascript:".concat(QDi.Version),64)),r[Yf]=PNe(v)}a(UDi,"_extractPartAExtensions");function VL(t,e,r){qt(t)||Nr(t,function(n,o){jf(o)?r[n]=o:Vn(o)?e[n]=o:wL()&&(e[n]=FA()[QL](o))})}a(VL,"_extractPropsAndMeasurements");function cG(t,e){qt(t)||Nr(t,function(r,n){t[r]=n||e})}a(cG,"_convertPropsUndefinedToCustomDefinedValue");function lG(t,e,r,n){var o=new nEt(t,n,e);nf(o,"sampleRate",r[ahe]),(r[hu]||{}).startTime&&(o.time=xL(r[hu].startTime)),o.iKey=r.iKey;var s=r.iKey.replace(/-/g,"");return o[Y2]=o[Y2].replace("{0}",s),UDi(t,r,o),r[Yf]=r[Yf]||[],PNe(o)}a(lG,"_createEnvelope");function uG(t,e){qt(e[hu])&&Rr(t,1,46,"telemetryItem.baseData cannot be null.")}a(uG,"EnvelopeCreatorInit");var QDi={Version:"3.3.11"};function fkr(t,e,r){uG(t,e);var n=e[hu][qL]||{},o=e[hu][zp]||{};VL(e[vE],o,n),qt(r)||cG(o,r);var s=e[hu];if(qt(s))return YN(t,"Invalid input for dependency data"),null;var c=s[zp]&&s[zp][eMe]?s[zp][eMe]:"GET",l=new rG(t,s.id,s.target,s[Y2],s[UL],s.success,s.responseCode,c,s.type,s.correlationContext,o,n),u=new ZN(rG[Qb],l);return lG(t,rG[GL],e,u)}a(fkr,"DependencyEnvelopeCreator");function gEt(t,e,r){uG(t,e);var n={},o={};e[mEt]!==JN[Qb]&&(n.baseTypeSource=e[mEt]),e[mEt]===JN[Qb]?(n=e[hu][zp]||{},o=e[hu][qL]||{}):e[hu]&&VL(e[hu],n,o),VL(e[vE],n,o),qt(r)||cG(n,r);var s=e[hu][Y2],c=new JN(t,s,n,o),l=new ZN(JN[Qb],c);return lG(t,JN[GL],e,l)}a(gEt,"EventEnvelopeCreator");function pkr(t,e,r){uG(t,e);var n=e[hu][qL]||{},o=e[hu][zp]||{};VL(e[vE],o,n),qt(r)||cG(o,r);var s=e[hu],c=eG.CreateFromInterface(t,s,o,n),l=new ZN(eG[Qb],c);return lG(t,eG[GL],e,l)}a(pkr,"ExceptionEnvelopeCreator");function hkr(t,e,r){uG(t,e);var n=e[hu],o=n[zp]||{},s=n[qL]||{};VL(e[vE],o,s),qt(r)||cG(o,r);var c=new XN(t,n[Y2],n.average,n.sampleCount,n.min,n.max,n.stdDev,o,s),l=new ZN(XN[Qb],c);return lG(t,XN[GL],e,l)}a(hkr,"MetricEnvelopeCreator");function mkr(t,e,r){uG(t,e);var n,o=e[hu];!qt(o)&&!qt(o[zp])&&!qt(o[zp][UL])?(n=o[zp][UL],delete o[zp][UL]):!qt(e[vE])&&!qt(e[vE][UL])&&(n=e[vE][UL],delete e[vE][UL]);var s=e[hu],c;((e.ext||{}).trace||{})[sG]&&(c=e.ext.trace[sG]);var l=s.id||c,u=s[Y2],d=s.uri,p=s[zp]||{},h=s[qL]||{};if(qt(s.refUri)||(p.refUri=s.refUri),qt(s.pageType)||(p.pageType=s.pageType),qt(s.isLoggedIn)||(p.isLoggedIn=s.isLoggedIn[eM]()),!qt(s[zp])){var m=s[zp];Nr(m,function(y,E){p[y]=E})}VL(e[vE],p,h),qt(r)||cG(p,r);var g=new tG(t,u,d,n,p,h,l),A=new ZN(tG[Qb],g);return lG(t,tG[GL],e,A)}a(mkr,"PageViewEnvelopeCreator");function gkr(t,e,r){uG(t,e);var n=e[hu],o=n[Y2],s=n.uri||n.url,c=n[zp]||{},l=n[qL]||{};VL(e[vE],c,l),qt(r)||cG(c,r);var u=new iG(t,o,s,void 0,c,l,n),d=new ZN(iG[Qb],u);return lG(t,iG[GL],e,d)}a(gkr,"PageViewPerformanceEnvelopeCreator");function Akr(t,e,r){uG(t,e);var n=e[hu].message,o=e[hu].severityLevel,s=e[hu][zp]||{},c=e[hu][qL]||{};VL(e[vE],s,c),qt(r)||cG(s,r);var l=new nG(t,n,o,s,c),u=new ZN(nG[Qb],l);return lG(t,nG[GL],e,u)}a(Akr,"TraceEnvelopeCreator");f();var ykr=(function(){function t(e,r){var n=[],o=!1,s=r.maxRetryCnt;this._get=function(){return n},this._set=function(c){return n=c,n},Kn(t,this,function(c){c[tM]=function(l){if(c[rM]()>=r.eventsLimitInMem){o||(Rr(e,2,105,"Maximum in-memory buffer size reached: "+c[rM](),!0),o=!0);return}l.cnt=l.cnt||0,!(!qt(s)&&l.cnt>s)&&n[qb](l)},c[rM]=function(){return n[Zi]},c.size=function(){for(var l=n[Zi],u=0;u0){var u=[];ut(l,function(p){u[qb](p.item)});var d=r[Che]?u.join(` +`):"["+u.join(",")+"]";return d}return null},c.createNew=function(l,u,d){var p=n.slice(0);l=l||e,u=u||{};var h=d?new AEt(l,u):new EMe(l,u);return ut(p,function(m){h[tM](m)}),h}})}return a(t,"BaseSendBuffer"),t.__ieDyn=1,t})(),EMe=(function(t){Ag(e,t);function e(r,n){var o=t.call(this,r,n)||this;return Kn(e,o,function(s,c){s[MZ]=function(l){c[HL]()},s[aG]=function(l){}}),o}return a(e,"ArraySendBuffer"),e.__ieDyn=1,e})(ykr);var qDi=["AI_buffer","AI_sentBuffer"],AEt=(function(t){Ag(e,t);function e(n,o){var s=t.call(this,n,o)||this,c=!1,l=o?.namePrefix,u=o[vhe]||{getItem:eEt,setItem:tEt},d=u.getItem,p=u.setItem,h=o.maxRetryCnt;return Kn(e,s,function(m,g){var A=I(e[OZ]),y=I(e[nM]),E=R(),_=y[jL](E),v=m._set(A[jL](_));v[Zi]>e[BZ]&&(v[Zi]=e[BZ]),w(e[nM],[]),w(e[OZ],v),m[tM]=function(k){if(m[rM]()>=e[BZ]){c||(Rr(n,2,67,"Maximum buffer size reached: "+m[rM](),!0),c=!0);return}k.cnt=k.cnt||0,!(!qt(h)&&k.cnt>h)&&(g[tM](k),w(e[OZ],m._get()))},m[HL]=function(){g[HL](),w(e[OZ],m._get()),w(e[nM],[]),c=!1},m[MZ]=function(k){w(e[OZ],m._set(b(k,m._get())));var Q=I(e[nM]);Q instanceof Array&&k instanceof Array&&(Q=Q[jL](k),Q[Zi]>e[BZ]&&(Rr(n,1,67,"Sent buffer reached its maximum size: "+Q[Zi],!0),Q[Zi]=e[BZ]),w(e[nM],Q))},m[aG]=function(k){var Q=I(e[nM]);Q=b(k,Q),w(e[nM],Q)},m.createNew=function(k,Q,M){M=!!M;var N=m._get().slice(0),G=I(e[nM]).slice(0);k=k||n,Q=Q||{},m[HL]();var O=M?new e(k,Q):new EMe(k,Q);return ut(N,function(D){O[tM](D)}),M&&O[MZ](G),O};function b(k,Q){var M=[],N=[];return ut(k,function(G){N[qb](G.item)}),ut(Q,function(G){!Er(G)&&so(N,G.item)===-1&&M[qb](G)}),M}a(b,"_removePayloadsFromBuffer");function I(k){var Q=k;return Q=l?l+"_"+Q:Q,x(Q)}a(I,"_getBuffer");function x(k){try{var Q=d(n,k);if(Q){var M=FA().parse(Q);if(Vn(M)&&(M=FA().parse(M)),M&&Kt(M))return M}}catch(N){Rr(n,1,42," storage key: "+k+", "+rf(N),{exception:Jt(N)})}return[]}a(x,"_getBufferBase");function w(k,Q){var M=k;try{M=l?l+"_"+M:M;var N=JSON[QL](Q);p(n,M,N)}catch(G){p(n,M,JSON[QL]([])),Rr(n,2,41," storage key: "+M+", "+rf(G)+". Buffer cleared",{exception:Jt(G)})}}a(w,"_setBuffer");function R(){var k=[];try{return ut(qDi,function(Q){var M=P(Q);if(k=k[jL](M),l){var N=l+"_"+Q,G=P(N);k=k[jL](G)}}),k}catch(Q){Rr(n,2,41,"Transfer events from previous buffers: "+rf(Q)+". previous Buffer items can not be removed",{exception:Jt(Q)})}return[]}a(R,"_getPreviousEvents");function P(k){try{var Q=x(k),M=[];return ut(Q,function(N){var G={item:N,cnt:0};M[qb](G)}),rEt(n,k),M}catch{}return[]}a(P,"_getItemsFromPreviousKey")}),s}a(e,"SessionStorageSendBuffer");var r;return r=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+r.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+r.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(ykr);f();var Ekr=(function(){function t(e){Kn(t,this,function(r){r.serialize=function(c){var l=n(c,"root");try{return FA()[QL](l)}catch(u){Rr(e,1,48,u&&Er(u[eM])?u[eM]():"Error serializing object",null,!0)}};function n(c,l){var u="__aiCircularRefCheck",d={};if(!c)return Rr(e,1,48,"cannot serialize object because it is null or undefined",{name:l},!0),d;if(c[u])return Rr(e,2,50,"Circular reference detected while serializing object",{name:l},!0),d;if(!c.aiDataContract){if(l==="measurements")d=s(c,"number",l);else if(l==="properties")d=s(c,"string",l);else if(l==="tags")d=s(c,"string",l);else if(Kt(c))d=o(c,l);else{Rr(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:l},!0);try{FA()[QL](c),d=c}catch(p){Rr(e,1,48,p&&Er(p[eM])?p[eM]():"Error serializing object",null,!0)}}return d}return c[u]=!0,Nr(c.aiDataContract,function(p,h){var m=Er(h)?h()&1:h&1,g=Er(h)?h()&4:h&4,A=h&2,y=c[p]!==void 0,E=kl(c[p])&&c[p]!==null;if(m&&!y&&!A)Rr(e,1,24,"Missing required field specification. The field is required but not present on source",{field:p,name:l});else if(!g){var _=void 0;E?A?_=o(c[p],p):_=n(c[p],p):_=c[p],_!==void 0&&(d[p]=_)}}),delete c[u],d}a(n,"_serializeObject");function o(c,l){var u;if(c)if(!Kt(c))Rr(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r +`,{name:l},!0);else{u=[];for(var d=0;d100||e<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[qZ]=e,this.samplingScoreGenerator=new Ckr}return a(t,"Sample"),t.prototype.isSampledIn=function(e){var r=this[qZ],n=!1;return r==null||r>=100||e.baseType===XN[Qb]?!0:(n=this.samplingScoreGenerator.getSamplingScore(e)0&&t<=100}a($Di,"_chkSampling");var VDi=(iM={},iM[JN.dataType]=gEt,iM[nG.dataType]=Akr,iM[tG.dataType]=mkr,iM[iG.dataType]=gkr,iM[eG.dataType]=pkr,iM[XN.dataType]=hkr,iM[rG.dataType]=fkr,iM),yEt=(function(t){Ag(e,t);function e(){var r=t.call(this)||this;r.priority=1001,r.identifier=lMe;var n,o,s,c,l,u,d,p,h=0,m,g,A,y,E,_,v,b,I,x,w,R,P,k,Q,M,N,G,O,D,F,U,L,H,$,W,j,ce;return Kn(e,r,function(J,Te){dt(),J.pause=function(){ye(),c=!0},J.resume=function(){c&&(c=!1,o=null,We(),lt())},J.flush=function(z,se,_e){if(z===void 0&&(z=!0),!c){ye();try{var we=J[LZ](z,null,_e||1);return hc(we,function(je){return se?(se(!je.rejected),!0):z?pu(function(Ye){Ye(!je.rejected)}):we})}catch(je){Rr(J[nm](),1,22,"flush failed, telemetry will not be collected: "+rf(je),{exception:Jt(je)})}}},J.onunloadFlush=function(){if(!c)if(v||D)try{return J[LZ](!0,Rt,2)}catch(z){Rr(J[nm](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+rf(z),{exception:Jt(z)})}else J.flush(!1)},J.addHeader=function(z,se){p[z]=se},J[dMe]=function(z,se,_e,we){J.isInitialized()&&Rr(J[nm](),1,28,"Sender is already initialized"),Te[dMe](z,se,_e,we);var je=J.identifier;u=new Ekr(se.logger),n=0,o=null,s=0,J[FZ]=null,d=0;var Ye=J[nm]();A=she(XC("Sender"),se.evtNamespace&&se.evtNamespace()),g=lEt(A),J._addHook(Lb(z,function(ht){var St=ht.cfg;St.storagePrefix&&Zyt(St.storagePrefix);var Mt=KI(null,St,se),At=Mt.getExtCfg(je,Skr),Ie=At[UZ];if(y&&Ie===y){var K=St[UZ];K&&K!==Ie&&(At[UZ]=K)}var pe=ti("CompressionStream");ce=syt("zipPayload",St,!1),Er(pe)||(ce=!1);var me=At.corsPolicy;me?(me==="same-origin"||me==="same-site"||me==="cross-origin")&&r.addHeader(Ikr,me):delete p[Ikr],Vp(At[QZ])&&(At[QZ]=St[QZ]),pi(J,"_senderConfig",{g:a(function(){return At},"g")}),E!==At[UZ]&&(y=E=At[UZ]),se.activeStatus()===$I.PENDING?J.pause():se.activeStatus()===$I.ACTIVE&&J.resume(),x&&x!==At[fMe]&&ut(x,function(sr){delete p[sr.header]}),_=At[uEt],v=(At[pMe]===!1||At[hMe]===!1)&&RL(),b=At[pMe]===!1&&RL(),I=At[hMe]===!1&&RL(),D=At[dEt],F=!!At.disableXhr,j=At.retryCodes;var ne=At[vhe],V=!!At[fEt]&&(!!ne||oMe()),Re=At.namePrefix,ze=V!==M||V&&G!==Re||V&&N!==ne;if(J[XI]){if(ze)try{J[XI]=J[XI].createNew(Ye,At,V)}catch(sr){Rr(J[nm](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+rf(sr),{exception:Jt(sr)})}We()}else J[XI]=V?new AEt(Ye,At):new EMe(Ye,At);G=Re,M=V,N=ne,U=!At[pEt]&&Vpe(!0),$=!!At[hEt],J._sample=new vkr(At.samplingPercentage,Ye),R=At[QZ],!Vp(R)&&!it(R,St)&&Rr(Ye,1,100,"Invalid Instrumentation key "+R),x=At[fMe],Vn(y)&&!nMe(y)&&x&&x[Zi]>0?ut(x,function(sr){r.addHeader(sr.header,sr.value)}):x=null,O=At.enableSendPromise;var Dt=Ne();W?W.SetConfig(Dt):(W=new Hyt,W[dMe](Dt,Ye));var tr=At.httpXHROverride,Wt=null,gr=null,xr=DNe([3,1,2],At.transports);Wt=W&&W[bhe](xr,!1);var wr=W&&W.getFallbackInst();L=a(function(sr,Lp){return Ee(wr,sr,Lp)},"_xhrSend"),H=a(function(sr,Lp){return Ee(wr,sr,Lp,!1)},"_fallbackSend"),Wt=D?tr:Wt||tr||wr,J[FZ]=function(sr,Lp){return Ee(Wt,sr,Lp)},U&&(m=ue);var Lt=DNe([3,1],At.unloadTransports);U||(Lt=Lt.filter(function(sr){return sr!==2})),gr=W&&W[bhe](Lt,!0),gr=D?tr:gr||tr,(D||At.unloadTransports||!m)&&gr&&(m=a(function(sr,Lp){return Ee(gr,sr,Lp)},"_syncUnloadSender")),m||(m=L),w=At.disableTelemetry,P=At.convertUndefined||ZI,k=At.isRetryDisabled,Q=At.maxBatchInterval}))},J.processTelemetry=function(z,se){se=J._getTelCtx(se);var _e=se[nm]();try{var we=te(z,_e);if(!we)return;var je=xe(z,_e);if(!je)return;var Ye=u.serialize(je),ht=J[XI];We(Ye);var St={item:Ye,cnt:0};ht[tM](St),lt()}catch(Mt){Rr(_e,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+rf(Mt),{exception:Jt(Mt)})}J.processNext(z,se)},J.isCompletelyIdle=function(){return!c&&h===0&&J._buffer[rM]()===0},J.getOfflineListener=function(){return g},J._xhrReadyStateChange=function(z,se,_e){if(!Ft(se))return Ve(z,se,_e)},J[LZ]=function(z,se,_e){z===void 0&&(z=!0);var we;if(!c)try{var je=J[XI];if(w)je[HL]();else{if(je[rM]()>0){var Ye=je.getItems();rt(_e||0,z),se?we=se.call(J,Ye,z):we=J[FZ](Ye,z)}s=+new Date}ye()}catch(St){var ht=gyt();(!ht||ht>9)&&Rr(J[nm](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+rf(St),{exception:Jt(St)})}return we},J.getOfflineSupport=function(){return{getUrl:a(function(){return y},"getUrl"),createPayload:De,serialize:Z,batch:ae,shouldProcess:a(function(z){return!!te(z)},"shouldProcess")}},J._doTeardown=function(z,se){J.onunloadFlush(),zN(g,!1),dt()},J[$L]=function(z,se,_e){if(!Ft(z))return Ue(z,se,_e)},J[mMe]=function(z,se){if(!Ft(z))return Ke(z,se)},J[The]=function(z,se){if(!Ft(z))return X(z,se)},J._xdrOnLoad=function(z,se){if(!Ft(se))return fe(z,se)};function fe(z,se){var _e=Tkr(z);if(z&&(_e+""=="200"||_e===""))n=0,J[The](se,0);else{var we=ohe(_e);we&&we[gMe]&&we[gMe]>we[AMe]&&!k?J[mMe](se,we):J[$L](se,Hpe(z))}}a(fe,"_xdrOnLoad");function Ne(){try{var z={xdrOnComplete:a(function(_e,we,je){var Ye=le(je);if(Ye)return fe(_e,Ye)},"xdrOnComplete"),fetchOnComplete:a(function(_e,we,je,Ye){var ht=le(Ye);if(ht)return Ze(_e.status,ht,_e.url,ht[Zi],_e.statusText,je||"")},"fetchOnComplete"),xhrOnComplete:a(function(_e,we,je){var Ye=le(je);if(Ye)return Ve(_e,Ye,Ye[Zi])},"xhrOnComplete"),beaconOnRetry:a(function(_e,we,je){return Qt(_e,we,je)},"beaconOnRetry")},se={enableSendPromise:O,isOneDs:!1,disableCredentials:!1,disableXhr:F,disableBeacon:!I,disableBeaconSync:!b,senderOnCompleteCallBack:z};return se}catch{}return null}a(Ne,"_getSendPostMgrConfig");function Ve(z,se,_e){z.readyState===4&&Ze(z.status,se,z.responseURL,_e,qq(z),Tkr(z)||z.response)}a(Ve,"_xhrReadyStateChange");function Ue(z,se,_e){Rr(J[nm](),2,26,"Failed to send telemetry.",{message:se}),J._buffer&&J._buffer[aG](z)}a(Ue,"_onError");function Ke(z,se){for(var _e=[],we=[],je=se.errors.reverse(),Ye=0,ht=je;Ye0&&J[The](z,se[AMe]),_e[Zi]>0&&J[$L](_e,qq(null,["partial success",se[AMe],"of",se.itemsReceived].join(" "))),we[Zi]>0&&(Be(we),Rr(J[nm](),2,40,"Partial success. Delivered: "+z[Zi]+", Failed: "+_e[Zi]+". Will retry to send "+we[Zi]+" our of "+se[gMe]+" items"))}a(Ke,"_onPartialSuccess");function X(z,se){J._buffer&&J._buffer[aG](z)}a(X,"_onSuccess");function le(z){try{if(z){var se=z,_e=se.oriPayload;return _e&&_e[Zi]?_e:null}}catch{}return null}a(le,"_getPayloadArr");function te(z,se){if(w)return!1;if(!z)return se&&Rr(se,1,7,"Cannot send empty telemetry"),!1;if(z.baseData&&!z[yMe])return se&&Rr(se,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(z[yMe]||(z[yMe]="EventData"),!J[FZ])return se&&Rr(se,1,28,"Sender was not initialized"),!1;if(Y(z))z[ahe]=J._sample[qZ];else return se&&Rr(se,2,33,"Telemetry item was sampled out and not sent",{SampleRate:J._sample[qZ]}),!1;return!0}a(te,"_validate");function xe(z,se){var _e=z.iKey||R,we=e.constructEnvelope(z,_e,se,P);if(!we){Rr(se,1,47,"Unable to create an AppInsights envelope");return}var je=!1;if(z[Yf]&&z[Yf][che]&&(ut(z[Yf][che],function(Ye){try{Ye&&Ye(we)===!1&&(je=!0,YN(se,"Telemetry processor check returns false"))}catch(ht){Rr(se,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+rf(ht),{exception:Jt(ht)},!0)}}),delete z[Yf][che]),!je)return we}a(xe,"_getEnvelope");function Z(z){var se=bkr,_e=J[nm]();try{var we=te(z,_e),je=null;we&&(je=xe(z,_e)),je&&(se=u.serialize(je))}catch{}return se}a(Z,"_serialize");function ae(z){var se=bkr;return z&&z[Zi]&&(se="["+z.join(",")+"]"),se}a(ae,"_batch");function De(z){var se=ve();return{urlString:y,data:z,headers:se}}a(De,"_createPayload");function Y(z){return J._sample.isSampledIn(z)}a(Y,"_isSampledIn");function ee(z,se,_e,we){se===200&&z?J._onSuccess(z,z[Zi]):we&&J[$L](z,we)}a(ee,"_getOnComplete");function Ee(z,se,_e,we){we===void 0&&(we=!0);var je=a(function(K,pe,me){return ee(se,K,pe,me)},"onComplete"),Ye=Ae(se),ht=z&&z.sendPOST;if(ht&&Ye){we&&J._buffer[MZ](se);var St,Mt=!1,At,Ie;return W.preparePayload(function(K){St=ht(K,je,!_e),Mt=!0,At&&_Ne(St,At,Ie)},ce,Ye,!_e),Mt?St:pu(function(K,pe){At=K,Ie=pe})}return null}a(Ee,"_doSend");function Ae(z){if(Kt(z)&&z[Zi]>0){var se=J[XI].batchPayloads(z),_e=ve(),we={data:se,urlString:y,headers:_e,disableXhrSync:F,disableFetchKeepAlive:!U,oriPayload:z};return we}return null}a(Ae,"_getPayload");function ve(){try{var z=p||{};return nMe(y)&&(z[tMe[6]]=tMe[7]),z}catch{}return null}a(ve,"_getHeaders");function We(z){var se=z?z[Zi]:0;return J[XI].size()+se>_?((!g||g.isOnline())&&J[LZ](!0,null,10),!0):!1}a(We,"_checkMaxSize");function Ze(z,se,_e,we,je,Ye){var ht=null;if(J._appId||(ht=ohe(Ye),ht&&ht.appId&&(J._appId=ht.appId)),(z<200||z>=300)&&z!==0){if((z===301||z===307||z===308)&&!Et(_e)){J[$L](se,je);return}if(g&&!g.isOnline()){if(!k){var St=10;Be(se,St),Rr(J[nm](),2,40,". Offline - Response Code: ".concat(z,". Offline status: ").concat(!g.isOnline(),". Will retry to send ").concat(se.length," items."))}return}!k&&Le(z)?(Be(se),Rr(J[nm](),2,40,". Response code "+z+". Will retry to send "+se[Zi]+" items.")):J[$L](se,je)}else Et(_e),z===206?(ht||(ht=ohe(Ye)),ht&&!k?J[mMe](se,ht):J[$L](se,je)):(n=0,J[The](se,we))}a(Ze,"_checkResponsStatus");function Et(z){return d>=10?!1:!qt(z)&&z!==""&&z!==y?(y=z,++d,!0):!1}a(Et,"_checkAndUpdateEndPointUrl");function Rt(z,se){if(m)m(z,!1);else{var _e=W&&W[bhe]([3],!0);return Ee(_e,z,se)}}a(Rt,"_doUnloadSend");function Qt(z,se,_e){var we=z,je=we&&we.oriPayload;if($)H&&H(je,!0),Rr(J[nm](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var Ye=[],ht=0;ht0&&(H&&H(Ye,!0),Rr(J[nm](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}a(Qt,"_onBeaconRetry");function Ft(z){try{if(z&&z[Zi])return Vn(z[0])}catch{}return null}a(Ft,"_isStringArr");function ue(z,se){var _e=null;if(Kt(z)){for(var we=z[Zi],je=0;je-1}a(Le,"_isRetriable");function $e(){var z="getNotifyMgr",se,_e=J.core;return _e&&(_e[z]?se=_e[z]():se=_e._notificationManager),se}a($e,"_getNotifyMgr");function rt(z,se){var _e=$e();if(_e&&_e.eventsSendRequest)try{_e.eventsSendRequest(z,se)}catch(we){Rr(J[nm](),1,74,"send request notification failed: "+rf(we),{exception:Jt(we)})}}a(rt,"_notifySendRequest");function it(z,se){var _e=se.disableInstrumentationKeyValidation,we=qt(_e)?!1:_e;if(we)return!0;var je="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",Ye=new RegExp(je);return Ye.test(z)}a(it,"_validateInstrumentationKey");function dt(){J[FZ]=null,J[XI]=null,J._appId=null,J._sample=null,p={},g=null,n=0,o=null,s=null,c=!1,l=null,u=null,d=0,h=0,m=null,A=null,y=null,E=null,_=0,v=!1,x=null,w=!1,R=null,P=ZI,k=!1,M=null,G=ZI,F=!1,U=!1,$=!1,L=null,H=null,W=null,pi(J,"_senderConfig",{g:a(function(){return kNe({},Skr)},"g")})}a(dt,"_initDefaults")}),r}return a(e,"Sender"),e.constructEnvelope=function(r,n,o,s){var c;n!==r.iKey&&!qt(n)?c=Bb(Bb({},r),{iKey:n}):c=r;var l=VDi[c.baseType]||gEt;return l(o,c,s)},e})(ihe);f();var dG="instrumentationKey",She="connectionString",GZ="endpointUrl",HZ="userOverrideEndpointUrl";var fG,EEt,_Et=void 0,WDi=(fG={diagnosticLogInterval:bZ(zDi,1e4)},fG[She]=_Et,fG.endpointUrl=_Et,fG[dG]=_Et,fG.featureOptIn=(EEt={},EEt.zipPayload={mode:1},EEt),fG.extensionConfig={},fG);function zDi(t){return t&&t>0}a(zDi,"_chkDiagLevel");var xkr=(function(){function t(e){var r=new qyt,n;(qt(e)||qt(e[dG])&&qt(e[She]))&&Ya("Invalid input configuration"),Kn(t,this,function(s){pi(s,"config",{g:a(function(){return n},"g")}),c(),s.initialize=c,s.track=o,Qq(s,r,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function c(){var l=Wf(e||{},WDi);n=l.cfg,r.addUnloadHook(Lb(l,function(){var u=n[She];if(Vp(u)){var d=Qpe(function(g,A){hc(u,function(y){var E=y.value,_=n[dG];if(!y.rejected&&E){n[She]=E;var v=ghe(E);_=v.instrumentationkey||_}g(_)})}),p=Qpe(function(g,A){hc(u,function(y){var E=y.value,_=n[GZ];if(!y.rejected&&E){var v=ghe(E),b=v.ingestionendpoint;_=b?b+W2:_}g(_)})});n[dG]=d,n[GZ]=n[HZ]||p}if(Vn(u)){var h=ghe(u),m=h.ingestionendpoint;n[GZ]=n[HZ]?n[HZ]:m+W2,n[dG]=h.instrumentationkey||n[dG]}n[GZ]=n[HZ]?n[HZ]:n[GZ]})),r.initialize(n,[new yEt])}a(c,"_initialize")});function o(s){s&&(s.baseData=s.baseData||{},s.baseType=s.baseType||"EventData"),r.track(s)}a(o,"_track")}return a(t,"ApplicationInsights"),t.__ieDyn=1,t})();var ZC=de(require("os"));var pG=class{constructor(e,r,n,o){this.ctx=e;this.namespace=r;this.options=n;this.onCopilotToken=a(e=>{this.token=e,this.commonProperties["common.isinternal"]=e?.isInternalUser()?"true":"false";let r=e.getTokenValue("tid");r!==void 0&&(this.tags["ai.user.id"]=r)},"onCopilotToken");this.xhrOverride={sendPOST:a((e,r)=>{if(typeof e.data!="string")throw new Error(`AppInsightsReporter only supports string payloads, received ${typeof e.data}`);let n=e.headers??{};n["Content-Type"]="application/json",this.options?.includeAuthorizationHeader&&this.token&&(n.Authorization=`Bearer ${this.token.token}`);let o={method:"POST",headers:n,body:e.data};this.ctx.get(dr).fetch(e.urlString,o).then(s=>s.text().then(c=>{r(s.status,Object.fromEntries(s.headers),c)})).catch(s=>{Cr.debug(this.ctx,"Error sending telemetry",s),r(0,{})})},"sendPOST")};this.client=new xkr({instrumentationKey:n.instrumentationKey,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,endpointUrl:n.endpointUrl,extensionConfig:{[lMe]:{alwaysUseXhrOverride:!0,httpXHROverride:this.xhrOverride}}}),this.tags=n?.excludeCommonTags?{}:YDi(e),this.commonProperties=n?.excludeCommonProperties?{}:KDi(e),this.#e=Ps(e,this.onCopilotToken),o&&this.onCopilotToken(o)}static{a(this,"AppInsightsReporter")}#e;sendTelemetryEvent(e,r,n){r={...r,...this.commonProperties};let o=this.qualifyEventName(e);this.client.track({name:o,tags:this.tags,data:{...r,...n},baseType:"EventData",baseData:{name:o,properties:r,measurements:n}})}sendTelemetryErrorEvent(e,r,n){this.sendTelemetryEvent(this.qualifyEventName(e),r,n)}async dispose(){this.#e.dispose(),await this.client.unload(!0,void 0,200)}qualifyEventName(e){return e.startsWith(this.namespace)?e:`${this.namespace}/${e}`}};function YDi(t){let e={},r=t.get(Vs);e["ai.session.id"]=r.sessionId;let n=t.get(pd);return n.trackingId&&(e["ai.user.id"]=n.trackingId),e["ai.cloud.roleInstance"]="REDACTED",e["ai.device.osVersion"]=`${ZC.type()} ${ZC.release()}`,e["ai.device.osArchitecture"]=ZC.arch(),e["ai.device.osPlatform"]=ZC.platform(),e["ai.cloud.role"]="Web",e["ai.application.ver"]=t.get(Vo).getVersion(),e}a(YDi,"getTags");function KDi(t){let e={};e.common_os=ZC.platform(),e.common_platformversion=ZC.release(),e.common_arch=ZC.arch(),e.common_cpu=Array.from(new Set(ZC.cpus().map(n=>n.model))).join();let r=t.get(Vs);return e.common_vscodemachineid=r.machineId,e.common_vscodesessionid=r.sessionId,e.client_deviceid=r.devDeviceId,e.common_uikind=r.uiKind,e.common_remotename=r.remoteName,e.common_isnewappinstall="",e}a(KDi,"getCommonProperties");f();f();f();f();f();f();var Ihe=XDe;var K2=Ihe({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5});f();var WL=Ihe({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2});f();f();var hG="toLowerCase",on="length",jZ="warnToConsole",oM="throwInternal",J2="watch",zL="apply",wi="push",Gb="splice",Ol="logger",X2="cancel",sM="initialize",Z2="identifier",$Z="removeNotificationListener",VZ="addNotificationListener",bE="isInitialized",xhe="getNotifyMgr",YL="getPlugin",ex="name",op="processNext",_Me="getProcessTelContext",aM="value",KL="enabled",CEt="stopPollingInternalLogs",Hb="unload",whe="onComplete",CMe="version",vMe="loggingLevelConsole",eP="createNew",e1="teardown",WZ="messageId",tP="message",TE="diagLog",JL="_doTeardown",mG="update",t1="getNext",XL="setNextPlugin",Rhe="userAgent",cM="split",tx="replace",vEt="substring",bMe="indexOf",lM="type",bEt="evtName",rx="status",TEt="getAllResponseHeaders",Phe="isChildEvt",r1="data",gG="getCtx",nx="setCtx";var khe="headers",zZ="urlString",AG="timeout";var TMe="traceFlags";var SEt;function wkr(t,e){SEt||(SEt=Spe("AggregationError",function(n,o){o[on]>1&&(n.errors=o[1])}));var r=t||"One or more errors occurred.";throw ut(e,function(n,o){r+=` +`.concat(o," > ").concat(Jt(n))}),new SEt(r,e||[])}a(wkr,"throwAggregationError");f();f();f();f();f();var n1=void 0,Fo="",yG="channels",Ed="core",SMe="createPerfMgr",Dhe="disabled",uM="extensionConfig",EG="extensions",SE="processTelemetry",_G="priority",YZ="eventsSent",ZL="eventsDiscarded",KZ="eventsSendRequest",rP="perfEvent",IMe="offlineEventsStored",xMe="offlineBatchSent",wMe="offlineBatchDrop",JZ="getPerfMgr",RMe="domain",PMe="path",Rkr="Not dynamic - ";var JDi="getPrototypeOf",XDi=/-([a-z])/g,ZDi=/([^\w\d_$])/g,eNi=/^(\d+[\w\d_$])/,c_c=Object[JDi];function e8(t){return!qt(t)}a(e8,"isNotNullOrUndefined");function XZ(t){var e=t;return e&&Vn(e)&&(e=e[tx](XDi,function(r,n){return n.toUpperCase()}),e=e[tx](ZDi,"_"),e=e[tx](eNi,function(r,n){return"_"+n})),e}a(XZ,"normalizeJsName");function Yp(t,e){return t&&e?Kc(t,e)!==-1:!1}a(Yp,"strContains");function ZZ(t){return t&&t.toISOString()||""}a(ZZ,"toISOString");function eee(t){return LN(t)?t[ex]:Fo}a(eee,"getExceptionName");function dM(t,e,r,n,o){var s=r;return t&&(s=t[e],s!==r&&(!o||o(s))&&(!n||n(r))&&(s=r,t[e]=s)),s}a(dM,"setValue");function kMe(t,e,r){var n;return t?(n=t[e],!n&&qt(n)&&(n=ln(r)?{}:r,t[e]=n)):n=ln(r)?{}:r,n}a(kMe,"getSetValue");function tNi(t,e){var r=null,n=null;return Er(t)?r=t:n=t,function(){var o=arguments;if(r&&(n=r()),n)return n[e][zL](n,o)}}a(tNi,"_createProxyFunction");function t8(t,e,r,n,o){t&&e&&r&&(o!==!1||ln(t[e]))&&(t[e]=tNi(r,n))}a(t8,"proxyFunctionAs");function r8(t,e,r,n){return t&&e&&kl(t)&&Kt(r)&&ut(r,function(o){Vn(o)&&t8(t,o,e,o,n)}),t}a(r8,"proxyFunctions");function nP(t){return t&&FN&&(t=TL(FN({},t))),t}a(nP,"optimizeObject");function DMe(t,e,r){var n=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&n){var o=n.mode;if(o===3)return!0;if(o===2)return!1}return r}a(DMe,"isFeatureEnabled");function iP(t){try{return t.responseText}catch{}return null}a(iP,"getResponseText");function NMe(t,e){return t?"XDomainRequest,Response:"+iP(t)||"":e}a(NMe,"formatErrorMessageXdr");function Mhe(t,e){return t?"XMLHttpRequest,Status:"+t[rx]+",Response:"+iP(t)||t.response||"":e}a(Mhe,"formatErrorMessageXhr");function Ohe(t,e){return e&&(jf(e)?t=[e].concat(t):Kt(e)&&(t=e.concat(t))),t}a(Ohe,"prependTransports");var rNi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Pkr="withCredentials",nNi="timeout";function IEt(t,e,r,n,o,s){n===void 0&&(n=!1),o===void 0&&(o=!1);function c(u,d,p){try{u[d]=p}catch{}}a(c,"_wrapSetXhrProp");var l=new XMLHttpRequest;return n&&c(l,rNi,n),r&&c(l,Pkr,r),l.open(t,e,!o),r&&c(l,Pkr,r),!o&&s&&c(l,nNi,s),l}a(IEt,"openXhr");function xEt(t){var e={};if(Vn(t)){var r=ri(t)[cM](/[\r\n]+/);ut(r,function(n){if(n){var o=n[bMe](": ");if(o!==-1){var s=ri(n.substring(0,o))[hG](),c=ri(n[vEt](o+1));e[s]=c}else e[ri(n)]=1}})}return e}a(xEt,"convertAllHeadersToMap");function Nhe(t,e,r){if(!t[r]&&e&&e.getResponseHeader){var n=e.getResponseHeader(r);n&&(t[r]=ri(n))}return t}a(Nhe,"_appendHeader");var iNi="kill-duration",oNi="kill-duration-seconds",sNi="time-delta-millis";function n8(t,e){var r={};return t[TEt]?r=xEt(t[TEt]()):e&&(r=Nhe(r,t,sNi),r=Nhe(r,t,iNi),r=Nhe(r,t,oNi)),r}a(n8,"_getAllResponseHeaders");f();f();var aNi="location",cNi="console",kkr="JSON",lNi="crypto",uNi="msCrypto",dNi="ReactNative",fNi="msie",pNi="trident/",Dkr="XMLHttpRequest",wEt=null,REt=null,hNi=!1,tee=null,PEt=null;function Nkr(t,e){var r=!1;if(t){try{if(r=e in t,!r){var n=t[KC];n&&(r=e in n)}}catch{}if(!r)try{var o=new t;r=!ln(o[e])}catch{}}return r}a(Nkr,"_hasProperty");function ree(t){if(t&&hNi){var e=ti("__mockLocation");if(e)return e}return typeof location===Ob&&location?location:ti(aNi)}a(ree,"getLocation");function MMe(){return typeof console!==YC?console:ti(cNi)}a(MMe,"getConsole");function Bhe(){return!!(typeof JSON===Ob&&JSON||ti(kkr)!==null)}a(Bhe,"hasJSON");function OMe(){return Bhe()?JSON||ti(kkr):null}a(OMe,"getJSON");function BMe(){return ti(lNi)}a(BMe,"getCrypto");function LMe(){return ti(uNi)}a(LMe,"getMsCrypto");function nee(){var t=Nl();return t&&t.product?t.product===dNi:!1}a(nee,"isReactNative");function CG(){var t=Nl();if(t&&(t[Rhe]!==REt||wEt===null)){REt=t[Rhe];var e=(REt||Fo)[hG]();wEt=Yp(e,fNi)||Yp(e,pNi)}return wEt}a(CG,"isIE");function iee(t){return(PEt===null||t===!1)&&(PEt=Rq()&&!!Nl().sendBeacon),PEt}a(iee,"isBeaconsSupported");function oee(t){var e=!1;try{e=!!ti("fetch");var r=ti("Request");e&&t&&r&&(e=Nkr(r,"keepalive"))}catch{}return e}a(oee,"isFetchSupported");function FMe(){return tee===null&&(tee=typeof XDomainRequest!==YC,tee&&Lhe()&&(tee=tee&&!Nkr(ti(Dkr),"withCredentials"))),tee}a(FMe,"useXDomainRequest");function Lhe(){var t=!1;try{var e=ti(Dkr);t=!!e}catch{}return t}a(Lhe,"isXhrSupported");var Mkr=4294967296,vG=4294967295,Okr=123456789,Bkr=987654321,Lkr=!1,Fhe=Okr,Uhe=Bkr;function mNi(t){t<0&&(t>>>=0),Fhe=Okr+t&vG,Uhe=Bkr-t&vG,Lkr=!0}a(mNi,"_mwcSeed");function gNi(){try{var t=pc()&2147483647;mNi((Math.random()*Mkr^t)+t)}catch{}}a(gNi,"_autoSeedMwc");function kEt(t){var e=0,r=BMe()||LMe();return r&&r.getRandomValues&&(e=r.getRandomValues(new Uint32Array(1))[0]&vG),e===0&&CG()&&(Lkr||gNi(),e=ANi()&vG),e===0&&(e=jC(Mkr*Math.random()|0)),t||(e>>>=0),e}a(kEt,"random32");function ANi(t){Uhe=36969*(Uhe&65535)+(Uhe>>16)&vG,Fhe=18e3*(Fhe&65535)+(Fhe>>16)&vG;var e=(Uhe<<16)+(Fhe&65535)>>>0&vG|0;return t||(e>>>=0),e}a(ANi,"mwcRandom32");function DEt(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=kEt()>>>0,n=0,o=Fo;o[on]>>=6,n===5&&(r=(kEt()<<2&4294967295|r&3)>>>0,n=0);return o}a(DEt,"newId");var Fkr="3.3.10",yNi="."+DEt(6),ENi=0;function Ukr(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}a(Ukr,"_canAcceptData");function _Ni(t,e){var r=e[t.id];if(!r){r={};try{Ukr(e)&&pi(e,t.id,{e:!1,v:r})}catch{}}return r}a(_Ni,"_getCache");function jb(t,e){return e===void 0&&(e=!1),XZ(t+ENi+++(e?"."+Fkr:Fo)+yNi)}a(jb,"createUniqueNamespace");function UMe(t){var e={id:jb("_aiData-"+(t||Fo)+"."+Fkr),accept:a(function(r){return Ukr(r)},"accept"),get:a(function(r,n,o,s){var c=r[e.id];return c?c[XZ(n)]:(s&&(c=_Ni(e,r),c[XZ(n)]=o),o)},"get"),kill:a(function(r,n){if(r&&r[n])try{delete r[n]}catch{}},"kill")};return e}a(UMe,"createElmNodeData");f();function QMe(t){return t&&kl(t)&&!Kt(t)&&(t.isVal||t.fb||tm(t,"v")||tm(t,"mrg")||tm(t,"ref")||t.set)}a(QMe,"_isConfigDefaults");function Qkr(t,e,r){var n,o=r.dfVal||nZ;if(e&&r.fb){var s=r.fb;Kt(s)||(s=[s]);for(var c=0;c0&&wkr("Watcher error(s): ",A)}}a(p,"_notifyWatchers");function h(g){if(g&&g.h[on]>0){c||(c=[]),l||(l=tf(function(){l=null,p()},0));for(var A=0;A0?hc(aee(t[0],e),function(){LEt(yL(t,1),e,r)}):r(),n}a(LEt,"doUnloadAll");f();var Hkr=500,FEt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";f();f();function jkr(t){return{mrg:!0,v:t}}a(jkr,"cfgDfMerge");f();f();var UEt=[YZ,ZL,KZ,rP],VMe=null,$Me;function wNi(t,e){return function(){var r=arguments,n=QEt(e);if(n){var o=n.listener;o&&o[t]&&o[t][zL](o,r)}}}a(wNi,"_listenerProxyFunc");function RNi(){var t=ti("Microsoft");return t&&(VMe=t.ApplicationInsights),VMe}a(RNi,"_getExtensionNamespace");function QEt(t){var e=VMe;return!e&&t.disableDbgExt!==!0&&(e=VMe||RNi()),e?e.ChromeDbgExt:null}a(QEt,"getDebugExt");function $kr(t){if(!$Me){$Me={};for(var e=0;e=A&&(d[I](b[tP]),n[x]=!0)}else o>=A&&d[I](b[tP]);p(A,b)}},d.debugToConsole=function(A){qEt("debug",A),g("warning",A)},d[jZ]=function(A){qEt("warn",A),g("warning",A)},d.errorToConsole=function(A){qEt("error",A),g("error",A)},d.resetInternalMessageCount=function(){r=0,n={}},d.logInternalMessage=p,d[Hb]=function(A){u&&u.rm(),u=null};function p(A,y){if(!m()){var E=!0,_=DNi+y[WZ];if(n[_]?E=!1:n[_]=!0,E&&(A<=s&&(d.queue[wi](y),r++,g(A===1?"error":"warn",y)),r===c)){var v="Internal events throttle limit per PageView reached for this app.",b=new lee(23,v,!1);d.queue[wi](b),A===1?d.errorToConsole(v):d[jZ](v)}}}a(p,"_logInternalMessage");function h(A){return i1(of(A,NNi,d).cfg,function(y){var E=y.cfg;o=E[vMe],s=E.loggingLevelTelemetry,c=E.maxMessageLimit,l=E.enableDebug})}a(h,"_setDefaultsFromConfig");function m(){return r>=c}a(m,"_areInternalMessagesThrottled");function g(A,y){var E=QEt(e||{});E&&E[TE]&&E[TE](A,y)}a(g,"_debugExtMsg")})}return a(t,"DiagnosticLogger"),t.__ieDyn=1,t})();function zkr(t){return t||new bG}a(zkr,"_getLogger");function Os(t,e,r,n,o,s){s===void 0&&(s=!1),zkr(t)[oM](e,r,n,o,s)}a(Os,"_throwInternal");function sP(t,e){zkr(t)[jZ](e)}a(sP,"_warnToConsole");var GEt,i8,Ykr="toGMTString",Kkr="toUTCString",$Et="cookie",HEt="expires",Jkr="isCookieUseDisabled",Vhe="disableCookiesUsage",Xkr="_ckMgr",WMe=null,jEt=null,Zkr=null,aP,e5r={},t5r={},ONi=(GEt={cookieCfg:jkr((i8={},i8[RMe]={fb:"cookieDomain",dfVal:e8},i8.path={fb:"cookiePath",dfVal:e8},i8.enabled=n1,i8.ignoreCookies=n1,i8.blockedCookies=n1,i8.disableCookieDefer=!1,i8)),cookieDomain:n1,cookiePath:n1},GEt[Vhe]=n1,GEt);function VEt(){!aP&&(aP=eNe(function(){return qu()}))}a(VEt,"_getDoc");function zMe(t){return t?t.isEnabled():!0}a(zMe,"_isMgrEnabled");function a5r(t,e){return e&&t&&Kt(t.ignoreCookies)?so(t.ignoreCookies,e)!==-1:!1}a(a5r,"_isIgnoredCookie");function r5r(t,e){return e&&t&&Kt(t.blockedCookies)&&so(t.blockedCookies,e)!==-1?!0:a5r(t,e)}a(r5r,"_isBlockedCookie");function n5r(t,e){var r=e[KL];if(qt(r)){var n=void 0;ln(t[Jkr])||(n=!t[Jkr]),ln(t[Vhe])||(n=!t[Vhe]),r=n}return r}a(n5r,"_isCfgEnabled");function WEt(t,e){var r,n,o,s,c,l,u,d,p=[];function h(E){var _,v=(_={},_[PMe]=E||"/",_[HEt]="Thu, 01 Jan 1970 00:00:01 GMT",_);return CG()||(v["max-age"]="0"),o5r(Fo,v)}a(h,"_formatDeletionValue");function m(E,_,v,b){var I={},x=ri(E||Fo),w=Kc(x,";");if(w!==-1&&(x=ri(B2(E,w)),I=c5r(Ad(E,w+1))),dM(I,RMe,v||o,GC,ln),!qt(_)){var R=CG();if(ln(I[HEt])){var P=pc(),k=P+_*1e3;if(k>0){var Q=new Date;Q.setTime(k),dM(I,HEt,i5r(Q,R?Ykr:Kkr)||i5r(Q,R?Ykr:Kkr)||Fo,GC)}}R||dM(I,"max-age",Fo+_,null,ln)}var M=ree();return M&&M.protocol==="https:"&&(dM(I,"secure",null,null,ln),jEt===null&&(jEt=!l5r((Nl()||{})[Rhe])),jEt&&dM(I,"SameSite","None",null,ln)),dM(I,PMe,b||n,null,ln),o5r(x,I)}a(m,"_formatSetCookieValue");function g(E){if(p)for(var _=p[on]-1;_>=0;_--)p[_].n===E&&p[Gb](_,1)}a(g,"_removePendingCookie");function A(){$he(e)&&p&&(ut(p,function(E){r5r(r,E.n)||(E.o===0?u(E.n,E.v):E.o===1&&d(E.n,E.v))}),p=[])}a(A,"_flushPendingCookies"),t=of(t||t5r,null,e).cfg,s=i1(t,function(E){E.setDf(E.cfg,ONi),r=E.ref(E.cfg,"cookieCfg"),n=r[PMe]||"/",o=r[RMe],r.disableCookieDefer?p=null:p===null&&(p=[]);var _=c;c=n5r(t,r)!==!1,l=r.getCookie||BNi,u=r.setCookie||s5r,d=r.delCookie||s5r,!_&&c&&p&&A()},e);var y={isEnabled:a(function(){var E=n5r(t,r)!==!1&&c&&$he(e),_=t5r[Xkr];return E&&_&&y!==_&&(E=zMe(_)),E},"isEnabled"),setEnabled:a(function(E){r[KL]=E,ln(t[Vhe])||(t[Vhe]=!E)},"setEnabled"),set:a(function(E,_,v,b,I){var x=!1,w=r5r(r,E);if(!w){var R=m(_,v,b,I);zMe(y)?(u(E,R),x=!0):p&&(g(E),p[wi]({n:E,o:0,v:R}),x=!0)}return x},"set"),get:a(function(E){var _=Fo,v=a5r(r,E);if(!v){if(zMe(y))_=l(E);else if(p)for(var b=p[on]-1;b>=0;b--){var I=p[b];if(I.n===E){if(I.o===0){var x=I.v,w=Kc(x,";");_=w!==-1?ri(B2(x,w)):ri(x)}break}}}return _},"get"),del:a(function(E,_){var v=!1;return zMe(y)?v=y.purge(E,_):p&&(g(E),p[wi]({n:E,o:1,v:h(_)}),v=!0),v},"del"),purge:a(function(E,_){var v=!1;return $he(e)&&(d(E,h(_)),v=!0),v},"purge"),unload:a(function(E){s&&s.rm(),s=null,p=null},"unload")};return y[Xkr]=y,y}a(WEt,"createCookieMgr");function $he(t){if(WMe===null){WMe=!1,!aP&&VEt();try{var e=aP.v||{};WMe=e[$Et]!==void 0}catch(r){Os(t,2,68,"Cannot access document.cookie - "+eee(r),{exception:Jt(r)})}}return WMe}a($he,"areCookiesSupported");function c5r(t){var e={};if(t&&t[on]){var r=ri(t)[cM](";");ut(r,function(n){if(n=ri(n||Fo),n){var o=Kc(n,"=");o===-1?e[n]=null:e[ri(B2(n,o))]=ri(Ad(n,o+1))}})}return e}a(c5r,"_extractParts");function i5r(t,e){return Er(t[e])?t[e]():null}a(i5r,"_formatDate");function o5r(t,e){var r=t||Fo;return Nr(e,function(n,o){r+="; "+n+(qt(o)?Fo:"="+o)}),r}a(o5r,"_formatCookieValue");function BNi(t){var e=Fo;if(!aP&&VEt(),aP.v){var r=aP.v[$Et]||Fo;Zkr!==r&&(e5r=c5r(r),Zkr=r),e=ri(e5r[t]||Fo)}return e}a(BNi,"_getCookieValue");function s5r(t,e){!aP&&VEt(),aP.v&&(aP.v[$Et]=t+"="+e)}a(s5r,"_setCookieValue");function l5r(t){return Vn(t)?!!(Yp(t,"CPU iPhone OS 12")||Yp(t,"iPad; CPU OS 12")||Yp(t,"Macintosh; Intel Mac OS X 10_14")&&Yp(t,"Version/")&&Yp(t,"Safari")||Yp(t,"Macintosh; Intel Mac OS X 10_14")&&qN(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Yp(t,"Chrome/5")||Yp(t,"Chrome/6")||Yp(t,"UnrealEngine")&&!Yp(t,"Chrome")||Yp(t,"UCBrowser/12")||Yp(t,"UCBrowser/11")):!1}a(l5r,"uaDisallowsSameSiteNone");f();var LNi={perfEvtsSendAll:!1};function FNi(t){t.h=null;var e=t.cb;t.cb=[],ut(e,function(r){gd(r.fn,[r.arg])})}a(FNi,"_runScheduledListeners");function o8(t,e,r,n){ut(t,function(o){o&&o[e]&&(r?(r.cb[wi]({fn:n,arg:o}),r.h=r.h||tf(FNi,0,r)):gd(n,[o]))})}a(o8,"_runListeners");var zEt=(function(){function t(e){this.listeners=[];var r,n,o=[],s={h:null,cb:[]},c=of(e,LNi);n=c[J2](function(l){r=!!l.cfg.perfEvtsSendAll}),Kn(t,this,function(l){pi(l,"listeners",{g:a(function(){return o},"g")}),l[VZ]=function(u){o[wi](u)},l[$Z]=function(u){for(var d=so(o,u);d>-1;)o[Gb](d,1),d=so(o,u)},l[YZ]=function(u){o8(o,YZ,s,function(d){d[YZ](u)})},l[ZL]=function(u,d){o8(o,ZL,s,function(p){p[ZL](u,d)})},l[KZ]=function(u,d){o8(o,KZ,d?s:null,function(p){p[KZ](u,d)})},l[rP]=function(u){u&&(r||!u[Phe]())&&o8(o,rP,null,function(d){u.isAsync?tf(function(){return d[rP](u)},0):d[rP](u)})},l[IMe]=function(u){u&&u[on]&&o8(o,IMe,s,function(d){d[IMe](u)})},l[xMe]=function(u){u&&u[r1]&&o8(o,xMe,s,function(d){d[xMe](u)})},l[wMe]=function(u,d){if(u>0){var p=d||0;o8(o,wMe,s,function(h){h[wMe](u,p)})}},l[Hb]=function(u){var d=a(function(){n&&n.rm(),n=null,o=[],s.h&&s.h[X2](),s.h=null,s.cb=[]},"_finishUnload"),p;if(o8(o,"unload",null,function(h){var m=h[Hb](u);m&&(p||(p=[]),p[wi](m))}),p)return pu(function(h){return hc(vNe(p),function(){d(),h()})});d()}})}return a(t,"NotificationManager"),t.__ieDyn=1,t})();f();var dee="ctx",KEt="ParentContextKey",Whe="ChildrenContextKey",UNi=null,fee=(function(){function t(e,r,n){var o=this;if(o.start=pc(),o[ex]=e,o.isAsync=n,o[Phe]=function(){return!1},Er(r)){var s;pi(o,"payload",{g:a(function(){return!s&&Er(r)&&(s=r(),r=null),s},"g")})}o[gG]=function(c){return c?c===t[KEt]||c===t[Whe]?o[c]:(o[dee]||{})[c]:null},o[nx]=function(c,l){if(c)if(c===t[KEt])o[c]||(o[Phe]=function(){return!0}),o[c]=l;else if(c===t[Whe])o[c]=l;else{var u=o[dee]=o[dee]||{};u[c]=l}},o.complete=function(){var c=0,l=o[gG](t[Whe]);if(Kt(l))for(var u=0;u0&&(ut(A,function(y){try{y.func.call(y.self,y.args)}catch(E){Os(r[Ol],2,73,"Unexpected Exception during onComplete - "+Jt(E))}}),s=[])}return g}a(u,"_moveNext");function d(g,A){var y=null,E=e.cfg;if(E&&g){var _=E[uM];!_&&A&&(_={}),E[uM]=_,_=e.ref(E,uM),_&&(y=_[g],!y&&A&&(y={}),_[g]=y,y=e.ref(_,g))}return y}a(d,"_getExtCfg");function p(g,A){var y=d(g,!0);return A&&Nr(A,function(E,_){if(qt(y[E])){var v=e.cfg[E];(v||!qt(v))&&(y[E]=v)}Qhe(e,y,E,_)}),e.setDf(y,A)}a(p,"_resolveExtCfg");function h(g,A,y){y===void 0&&(y=!1);var E,_=d(g,!1),v=e.cfg;return _&&(_[A]||!qt(_[A]))?E=_[A]:(v[A]||!qt(v[A]))&&(E=v[A]),E||!qt(E)?E:y}a(h,"_getConfig");function m(g){for(var A;A=c._next();){var y=A[YL]();y&&g(y)}}return a(m,"_iterateChain"),c}a(t_t,"_createInternalContext");function $b(t,e,r,n){var o=of(e),s=t_t(t,o,r,n),c=s.ctx;function l(d){var p=s._next();return p&&p[SE](d,c),!p}a(l,"_processNext");function u(d,p){return d===void 0&&(d=null),Kt(d)&&(d=s8(d,o.cfg,r,p)),$b(d||c[t1](),o.cfg,r,p)}return a(u,"_createNew"),c[op]=l,c[eP]=u,c}a($b,"createProcessTelemetryContext");function pee(t,e,r){var n=of(e.config),o=t_t(t,n,e,r),s=o.ctx;function c(u){var d=o._next();return d&&d[Hb](s,u),!d}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Kt(u)&&(u=s8(u,n.cfg,e,d)),pee(u||s[t1](),e,d)}return a(l,"_createNew"),s[op]=c,s[eP]=l,s}a(pee,"createProcessTelemetryUnloadContext");function zhe(t,e,r){var n=of(e.config),o=t_t(t,n,e,r),s=o.ctx;function c(u){return s.iterate(function(d){Er(d[mG])&&d[mG](s,u)})}a(c,"_processNext");function l(u,d){return u===void 0&&(u=null),Kt(u)&&(u=s8(u,n.cfg,e,d)),zhe(u||s[t1](),e,d)}return a(l,"_createNew"),s[op]=c,s[eP]=l,s}a(zhe,"createProcessTelemetryUpdateContext");function s8(t,e,r,n){var o=null,s=!n;if(Kt(t)&&t[on]>0){var c=null;ut(t,function(l){if(!s&&n===l&&(s=!0),s&&l&&Er(l[SE])){var u=$Ni(l,e,r);o||(o=u),c&&c._setNext(u),c=u}})}return n&&!o?s8([n],e,r):o}a(s8,"createTelemetryProxyChain");function $Ni(t,e,r){var n=null,o=Er(t[SE]),s=Er(t[XL]),c;t?c=t[Z2]+"-"+t[_G]+"-"+h5r++:c="Unknown-0-"+h5r++;var l={getPlugin:a(function(){return t},"getPlugin"),getNext:a(function(){return n},"getNext"),processTelemetry:p,unload:h,update:m,_id:c,_setNext:a(function(g){n=g},"_setNext")};function u(){var g;return t&&Er(t[p5r])&&(g=t[p5r]()),g||(g=$b(l,e,r)),g}a(u,"_getTelCtx");function d(g,A,y,E,_){var v=!1,b=t?t[Z2]:HNi,I=g[f5r];return I||(I=g[f5r]={}),g.setNext(n),t&&sf(g[Ed](),function(){return b+":"+y},function(){I[c]=!0;try{var x=n?n._id:Fo;x&&(I[x]=!1),v=A(g)}catch(R){var w=n?I[n._id]:!0;w&&(v=!0),(!n||!w)&&Os(g[TE](),1,73,"Plugin ["+b+"] failed during "+y+" - "+Jt(R)+", run flags: "+Jt(I))}},E,_),v}a(d,"_processChain");function p(g,A){A=A||u();function y(E){if(!t||!o)return!1;var _=fM(t);return _[e1]||_[Dhe]?!1:(s&&t[XL](n),t[SE](g,E),!0)}a(y,"_callProcessTelemetry"),d(A,y,"processTelemetry",function(){return{item:g}},!g.sync)||A[op](g)}a(p,"_processTelemetry");function h(g,A){function y(){var E=!1;if(t){var _=fM(t),v=t[Ed]||_[Ed];t&&(!v||v===g.core())&&!_[e1]&&(_[Ed]=null,_[e1]=!0,_[bE]=!1,t[e1]&&t[e1](g,A)===!0&&(E=!0))}return E}a(y,"_callTeardown"),d(g,y,"unload",function(){},A.isAsync)||g[op](A)}a(h,"_unloadPlugin");function m(g,A){function y(){var E=!1;if(t){var _=fM(t),v=t[Ed]||_[Ed];t&&(!v||v===g.core())&&!_[e1]&&t[mG]&&t[mG](g,A)===!0&&(E=!0)}return E}a(y,"_callUpdate"),d(g,y,"update",function(){},!1)||g[op](A)}return a(m,"_updatePlugin"),$f(l)}a($Ni,"createTelemetryPluginProxy");var m5r=(function(){function t(e,r,n,o){var s=this,c=$b(e,r,n,o);r8(s,c,Dl(c))}return a(t,"ProcessTelemetryContext"),t})();f();f();f();function Yhe(){var t=[];function e(n){n&&t[wi](n)}a(e,"_addHandler");function r(n,o){ut(t,function(s){try{s(n,o)}catch(c){Os(n[TE](),2,73,"Unexpected error calling unload handler - "+Jt(c))}}),t=[]}return a(r,"_runHandlers"),{add:e,run:r}}a(Yhe,"createUnloadHandlerContainer");f();var JMe,XMe;function ZMe(){var t=[];function e(n){var o=t;t=[],ut(o,function(s){try{(s.rm||s.remove).call(s)}catch(c){Os(n,2,73,"Unloading:"+Jt(c))}}),JMe&&o[on]>JMe&&(XMe?XMe("doUnload",o):Os(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}a(e,"_doUnload");function r(n){n&&(Vf(t,n),JMe&&t[on]>JMe&&(XMe?XMe("Add",t):Os(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return a(r,"_addHook"),{run:e,add:r}}a(ZMe,"createUnloadHookContainer");var r_t,a8="getPlugin",VNi=(r_t={},r_t[uM]={isVal:e8,v:{}},r_t),hee=(function(){function t(){var e=this,r,n,o,s,c;d(),Kn(t,e,function(p){p[sM]=function(h,m,g,A){u(h,m,A),r=!0},p[e1]=function(h,m){var g=p[Ed];if(!g||h&&g!==h[Ed]())return;var A,y=!1,E=h||pee(null,g,o&&o[a8]?o[a8]():o),_=m||{reason:0,isAsync:!1};function v(){y||(y=!0,s.run(E,m),c.run(E[TE]()),A===!0&&E[op](_),d())}return a(v,"_unloadCallback"),!p[JL]||p[JL](E,_,v)!==!0?v():A=!0,A},p[mG]=function(h,m){var g=p[Ed];if(!g||h&&g!==h[Ed]())return;var A,y=!1,E=h||zhe(null,g,o&&o[a8]?o[a8]():o),_=m||{reason:0};function v(){y||(y=!0,u(E.getCfg(),E.core(),E[t1]()))}return a(v,"_updateCallback"),!p._doUpdate||p._doUpdate(E,_,v)!==!0?v():A=!0,A},t8(p,"_addUnloadCb",function(){return s},"add"),t8(p,"_addHook",function(){return c},"add"),pi(p,"_unloadHooks",{g:a(function(){return c},"g")})}),e[TE]=function(p){return l(p)[TE]()},e[bE]=function(){return r},e.setInitialized=function(p){r=p},e[XL]=function(p){o=p},e[op]=function(p,h){h?h[op](p):o&&Er(o[SE])&&o[SE](p,null)},e._getTelCtx=l;function l(p){p===void 0&&(p=null);var h=p;if(!h){var m=n||$b(null,{},e[Ed]);o&&o[a8]?h=m[eP](null,o[a8]):h=m[eP](null,o)}return h}a(l,"_getTelCtx");function u(p,h,m){of(p,VNi,uee(h)),!m&&h&&(m=h[_Me]()[t1]());var g=o;o&&o[a8]&&(g=o[a8]()),e[Ed]=h,n=$b(m,p,h,g)}a(u,"_setDefaults");function d(){r=!1,e[Ed]=null,n=null,o=null,c=ZMe(),s=Yhe()}a(d,"_initDefaults")}return a(t,"BaseTelemetryPlugin"),t.__ieDyn=1,t})();function WNi(t,e,r){var n={id:e,fn:r};Vf(t,n);var o={remove:a(function(){ut(t,function(s,c){if(s.id===n.id)return t[Gb](c,1),-1})},"remove")};return o}a(WNi,"_addInitializer");function zNi(t,e,r){for(var n=!1,o=t[on],s=0;s"},"v")})}a(iMi,"_createUnloadHook");var e4e=(function(){function t(){var e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E,_,v,b,I,x,w,R,P,k,Q,M,N,G,O,D,F,U;Kn(t,this,function(L){Te(),L._getDbgPlgTargets=function(){return[R,o]},L[bE]=function(){return r},L.activeStatus=function(){return Q},L._setPendingStatus=function(){Q=3},L[sM]=function(Y,ee,Ee,Ae){g&&Ya(A5r),L[bE]()&&Ya("Core cannot be initialized more than once"),e=of(Y,n_t,Ee||L[Ol],!1),Y=e.cfg,De(e[J2](function(Ze){var Et=Ze.cfg;N=Et.initInMemoMaxSize||JNi,H(Et);var Rt=Ze.ref(Ze.cfg,uM);Nr(Rt,function(Qt){Ze.ref(Rt,Qt)})})),s=Ae,b=nMi(e,v,s&&L[xhe](),b),te(),L[Ol]=Ee;var ve=Y[EG];if(p=[],p[wi].apply(p,Mq(Mq([],ee,!1),ve,!1)),h=Y[yG],Ne(null),(!m||m[on]===0)&&Ya("No "+yG+" available"),h&&h[on]>1){var We=L[YL]("TeeChannelController");(!We||!We.plugin)&&Os(n,1,28,"TeeChannel required")}rMi(Y,w,n),w=null,r=!0,Q===WL.ACTIVE&&j()},L.getChannels=function(){var Y=[];return m&&ut(m,function(ee){Y[wi](ee)}),$f(Y)},L.track=function(Y){sf(L[JZ](),function(){return"AppInsightsCore:track"},function(){Y===null&&(ae(Y),Ya("Invalid telemetry item")),!Y[ex]&&qt(Y[ex])&&(ae(Y),Ya("telemetry name required")),Y.iKey=Y.iKey||x,Y.time=Y.time||ZZ(new Date),Y.ver=Y.ver||"4.0",!g&&L[bE]()&&Q===WL.ACTIVE?fe()[op](Y):Q!==WL.INACTIVE&&o[on]<=N&&o[wi](Y)},function(){return{item:Y}},!Y.sync)},L[_Me]=fe,L[xhe]=function(){return s||(s=new zEt(e.cfg),L[YNi]=s),s},L[VZ]=function(Y){L.getNotifyMgr()[VZ](Y)},L[$Z]=function(Y){s&&s[$Z](Y)},L.getCookieMgr=function(){return u||(u=WEt(e.cfg,L[Ol])),u},L.setCookieMgr=function(Y){u!==Y&&(aee(u,!1),u=Y)},L[JZ]=function(){return c||l||JEt()},L.setPerfMgr=function(Y){c=Y},L.eventCnt=function(){return o[on]},L.releaseQueue=function(){if(r&&o[on]>0){var Y=o;o=[],Q===2?ut(Y,function(ee){ee.iKey=ee.iKey||x,fe()[op](ee)}):Os(n,2,20,"core init status is not active")}},L.pollInternalLogs=function(Y){return y=Y||null,U=!1,D&&D[X2](),ce(!0)};function H(Y){var ee=Y.instrumentationKey,Ee=Y.endpointUrl;if(Q!==3){if(qt(ee)){x=null,Q=WL.INACTIVE;var Ae="Please provide instrumentation key";r?(Os(n,1,100,Ae),j()):Ya(Ae);return}var ve=[];Vp(ee)?(ve[wi](ee),x=null):x=ee,Vp(Ee)?(ve[wi](Ee),M=null):M=Ee,ve[on]?$(Y,ve):W()}}a(H,"_handleIKeyEndpointPromises");function $(Y,ee){G=!1,Q=3;var Ee=e8(Y.initTimeOut)?Y.initTimeOut:XNi,Ae=CNe(ee);O&&O[X2](),O=tf(function(){O=null,G||W()},Ee),hc(Ae,function(ve){try{if(G)return;if(!ve.rejected){var We=ve[aM];if(We&&We[on]){var Ze=We[0];if(x=Ze&&Ze[aM],We[on]>1){var Et=We[1];M=Et&&Et[aM]}}x&&(Y.instrumentationKey=x,Y.endpointUrl=M)}W()}catch{G||W()}})}a($,"_waitForInitPromises");function W(){G=!0,qt(x)?(Q=WL.INACTIVE,Os(n,1,112,"ikey can't be resolved from promises")):Q=WL.ACTIVE,j()}a(W,"_setStatus");function j(){r&&(L.releaseQueue(),L.pollInternalLogs())}a(j,"_releaseQueues");function ce(Y){if((!D||!D[KL])&&!U){var ee=Y||n&&n.queue[on]>0;ee&&(F||(F=!0,De(e[J2](function(Ee){var Ae=Ee.cfg.diagnosticLogInterval;(!Ae||!(Ae>0))&&(Ae=1e4);var ve=!1;D&&(ve=D[KL],D[X2]()),D=iNe(X,Ae),D.unref(),D[KL]=ve}))),D[KL]=!0)}return D}a(ce,"_startLogPoller"),L[CEt]=function(){U=!0,D&&D[X2](),X()},r8(L,function(){return A},["addTelemetryInitializer"]),L[Hb]=function(Y,ee,Ee){Y===void 0&&(Y=!0),r||Ya(KNi),g&&Ya(A5r);var Ae={reason:50,isAsync:Y,flushComplete:!1},ve;Y&&!ee&&(ve=pu(function(Et){ee=Et}));var We=pee(Ue(),L);We[whe](function(){v.run(L[Ol]),LEt([u,s,n],Y,function(){Te(),ee&&ee(Ae)})},L);function Ze(Et){Ae.flushComplete=Et,g=!0,_.run(We,Ae),L[CEt](),We[op](Ae)}return a(Ze,"_doUnload"),X(),le(Y,Ze,6,Ee)||Ze(!1),ve},L[YL]=Ve,L.addPlugin=function(Y,ee,Ee,Ae){if(!Y){Ae&&Ae(!1),Z(_5r);return}var ve=Ve(Y[Z2]);if(ve&&!ee){Ae&&Ae(!1),Z("Plugin ["+Y[Z2]+"] is already loaded!");return}var We={reason:16};function Ze(Qt){p[wi](Y),We.added=[Y],Ne(We),Ae&&Ae(!0)}if(a(Ze,"_addPlugin"),ve){var Et=[ve.plugin],Rt={reason:2,isAsync:!!Ee};Ke(Et,Rt,function(Qt){Qt?(We.removed=Et,We.reason|=32,Ze(!0)):Ae&&Ae(!1)})}else Ze(!1)},L.updateCfg=function(Y,ee){ee===void 0&&(ee=!0);var Ee;if(L[bE]()){Ee={reason:1,cfg:e.cfg,oldCfg:aZ({},e.cfg),newConfig:aZ({},Y),merge:ee},Y=Ee.newConfig;var Ae=e.cfg;Y[EG]=Ae[EG],Y[yG]=Ae[yG]}e._block(function(ve){var We=ve.cfg;i_t(ve,We,Y,ee),ee||Nr(We,function(Ze){tm(Y,Ze)||ve.set(We,Ze,n1)}),ve.setDf(We,n_t)},!0),e.notify(),Ee&&xe(Ee)},L.evtNamespace=function(){return E},L.flush=le,L.getTraceCtx=function(Y){return I||(I=d5r()),I},L.setTraceCtx=function(Y){I=Y||null},L.addUnloadHook=De,t8(L,"addUnloadCb",function(){return _},"add"),L.onCfgChange=function(Y){var ee;return r?ee=i1(e.cfg,Y,L[Ol]):ee=tMi(w,Y),iMi(ee)},L.getWParam=function(){return UN()||e.cfg.enableWParam?0:-1};function J(){var Y={};P=[];var ee=a(function(Ee){Ee&&ut(Ee,function(Ae){if(Ae[Z2]&&Ae[CMe]&&!Y[Ae.identifier]){var ve=Ae[Z2]+"="+Ae[CMe];P[wi](ve),Y[Ae.identifier]=Ae}})},"_addPluginVersions");ee(m),h&&ut(h,function(Ee){ee(Ee)}),ee(p)}a(J,"_setPluginVersions");function Te(){r=!1,e=of({},n_t,L[Ol]),e.cfg[vMe]=1,pi(L,"config",{g:a(function(){return e.cfg},"g"),s:a(function(ee){L.updateCfg(ee,!1)},"s")}),pi(L,"pluginVersionStringArr",{g:a(function(){return P||J(),P},"g")}),pi(L,"pluginVersionString",{g:a(function(){return k||(P||J(),k=P.join(";")),k||Fo},"g")}),pi(L,"logger",{g:a(function(){return n||(n=new bG(e.cfg),e[Ol]=n),n},"g"),s:a(function(ee){e[Ol]=ee,n!==ee&&(aee(n,!1),n=ee)},"s")}),L[Ol]=new bG(e.cfg),R=[];var Y=L.config[EG]||[];Y.splice(0,Y[on]),Vf(Y,R),A=new g5r,o=[],aee(s,!1),s=null,c=null,l=null,aee(u,!1),u=null,d=null,p=[],h=null,m=null,g=!1,y=null,E=jb("AIBaseCore",!0),_=Yhe(),I=null,x=null,v=ZMe(),w=[],k=null,P=null,U=!1,D=null,F=!1,Q=0,M=null,N=null,G=!1,O=null}a(Te,"_initDefaults");function fe(){var Y=$b(Ue(),e.cfg,L);return Y[whe](ce),Y}a(fe,"_createTelCtx");function Ne(Y){var ee=eMi(L[Ol],Hkr,p);d=null,k=null,P=null,m=(h||[])[0]||[],m=KMe(Vf(m,ee[yG]));var Ee=Vf(KMe(ee[Ed]),m);R=$f(Ee);var Ae=L.config[EG]||[];Ae.splice(0,Ae[on]),Vf(Ae,R);var ve=fe();m&&m[on]>0&&e_t(ve[eP](m),Ee),e_t(ve,Ee),Y&&xe(Y)}a(Ne,"_initPluginChain");function Ve(Y){var ee=null,Ee=null,Ae=[];return ut(R,function(ve){if(ve[Z2]===Y&&ve!==A)return Ee=ve,-1;ve.getChannel&&Ae[wi](ve)}),!Ee&&Ae[on]>0&&ut(Ae,function(ve){if(Ee=ve.getChannel(Y),!Ee)return-1}),Ee&&(ee={plugin:Ee,setEnabled:a(function(ve){fM(Ee)[Dhe]=!ve},"setEnabled"),isEnabled:a(function(){var ve=fM(Ee);return!ve[e1]&&!ve[Dhe]},"isEnabled"),remove:a(function(ve,We){ve===void 0&&(ve=!0);var Ze=[Ee],Et={reason:1,isAsync:ve};Ke(Ze,Et,function(Rt){Rt&&Ne({reason:32,removed:Ze}),We&&We(Rt)})},"remove")}),ee}a(Ve,"_getPlugin");function Ue(){if(!d){var Y=(R||[]).slice();so(Y,A)===-1&&Y[wi](A),d=s8(KMe(Y),e.cfg,L)}return d}a(Ue,"_getPluginChain");function Ke(Y,ee,Ee){if(Y&&Y[on]>0){var Ae=s8(Y,e.cfg,L),ve=pee(Ae,L);ve[whe](function(){var We=!1,Ze=[];ut(p,function(Rt,Qt){y5r(Rt,Y)?We=!0:Ze[wi](Rt)}),p=Ze,k=null,P=null;var Et=[];h&&(ut(h,function(Rt,Qt){var Ft=[];ut(Rt,function(ue){y5r(ue,Y)?We=!0:Ft[wi](ue)}),Et[wi](Ft)}),h=Et),Ee&&Ee(We),ce()}),ve[op](ee)}else Ee(!1)}a(Ke,"_removePlugins");function X(){if(n&&n.queue){var Y=n.queue.slice(0);n.queue[on]=0,ut(Y,function(ee){var Ee={name:y||"InternalMessageId: "+ee[WZ],iKey:x,time:ZZ(new Date),baseType:lee.dataType,baseData:{message:ee[tP]}};L.track(Ee)})}}a(X,"_flushInternalLogs");function le(Y,ee,Ee,Ae){var ve=1,We=!1,Ze=null;Ae=Ae||5e3;function Et(){ve--,We&&ve===0&&(Ze&&Ze[X2](),Ze=null,ee&&ee(We),ee=null)}if(a(Et,"doCallback"),m&&m[on]>0){var Rt=fe()[eP](m);Rt.iterate(function(Qt){if(Qt.flush){ve++;var Ft=!1;Qt.flush(Y,function(){Ft=!0,Et()},Ee)||Ft||(Y&&Ze==null?Ze=tf(function(){Ze=null,Et()},Ae):Et())}})}return We=!0,Et(),!0}a(le,"_flushChannels");function te(){var Y;De(e[J2](function(ee){var Ee=ee.cfg.enablePerfMgr;if(Ee){var Ae=ee.cfg[SMe];(Y!==Ae||!Y)&&(Ae||(Ae=ZNi),kMe(ee.cfg,SMe,Ae),Y=Ae,l=null),!c&&!l&&Er(Ae)&&(l=Ae(L,L[xhe]()))}else l=null,Y=null}))}a(te,"_initPerfManager");function xe(Y){var ee=zhe(Ue(),L);ee[whe](ce),(!L._updateHook||L._updateHook(ee,Y)!==!0)&&ee[op](Y)}a(xe,"_doUpdate");function Z(Y){var ee=L[Ol];ee?(Os(ee,2,73,Y),ce()):Ya(Y)}a(Z,"_logOrThrowError");function ae(Y){var ee=L[xhe]();ee&&ee[ZL]([Y],2)}a(ae,"_notifyInvalidEvent");function De(Y){v.add(Y)}a(De,"_addUnloadHook")})}return a(t,"AppInsightsCore"),t.__ieDyn=1,t})();f();var ix="",oMi="NoResponseBody",C5r="&"+oMi+"=true",o_t="POST",t4e=(function(){function t(){var e=0,r,n,o,s,c,l,u,d,p,h,m,g,A,y;Kn(t,this,function(E,_){var v=!0;G(),E[sM]=function(O,D){o=D,n&&Os(o,1,28,"Sender is already initialized"),E.SetConfig(O),n=!0},E._getDbgPlgTargets=function(){return[n,s,l,r]},E.SetConfig=function(O){try{if(c=O.senderOnCompleteCallBack||{},l=!!O.disableCredentials,u=O.fetchCredentials,s=!!O.isOneDs,r=!!O.enableSendPromise,p=!!O.disableXhr,h=!!O.disableBeacon,m=!!O.disableBeaconSync,y=O.timeWrapper,A=!!O.addNoResponse,g=!!O.disableFetchKeepAlive,d={sendPOST:Q},s||(v=!1),l){var D=ree();D&&D.protocol&&D.protocol[hG]()==="file:"&&(v=!1)}return!0}catch{}return!1},E.getSyncFetchPayload=function(){return e},E.getSenderInst=function(O,D){return O&&O[on]?w(O,D):null},E.getFallbackInst=function(){return d},E[JL]=function(O,D){G()},E.preparePayload=function(O,D,F,U){if(!D||U||!F[r1]){O(F);return}try{var L=ti("CompressionStream");if(!Er(L)){O(F);return}var H=new ReadableStream({start:a(function(Te){Te.enqueue(Vn(F[r1])?new TextEncoder().encode(F[r1]):F[r1]),Te.close()},"start")}),$=H.pipeThrough(new L("gzip")),W=$.getReader(),j=[],ce=0,J=!1;return hc(W.read(),a(function Te(fe){if(!J&&!fe.rejected){var Ne=fe[aM];if(!Ne.done)return j[wi](Ne[aM]),ce+=Ne.value[on],hc(W.read(),Te);for(var Ve=new Uint8Array(ce),Ue=0,Ke=0,X=j;Ke0&&(ut(Dl(Ve),function(te){J.append(te,Ve[te])}),Ue[khe]=J),u?Ue.credentials=u:v&&s&&(Ue.credentials="include"),F&&(Ue.keepalive=!0,e+=Te,s?O._sendReason===2&&(fe=!0,A&&(L+=C5r)):fe=!0);var Ke=new Request(L,Ue);try{Ke[FEt]=!0}catch{}if(!F&&r&&(W=pu(function(te,xe){j=te,ce=xe})),!L){x(D),j&&j(!1);return}function X(te,xe){xe?R(D,s?0:xe,{},s?ix:te):R(D,s?0:400,{},s?ix:te)}a(X,"_handleError");function le(te,xe,Z){var ae=te[rx],De=c.fetchOnComplete;De&&Er(De)?De(te,D,Z||ix,xe):R(D,ae,{},Z||ix)}a(le,"_onFetchComplete");try{hc(fetch(s?L:Ke,s?Ue:null),function(te){if(F&&(e-=Te,Te=0),!Ne)if(Ne=!0,te.rejected)X(te.reason&&te.reason[tP],499),ce&&ce(te.reason);else{var xe=te[aM];try{!s&&!xe.ok?(xe[rx]?X(xe.statusText,xe[rx]):X(xe.statusText,499),j&&j(!1)):s&&!xe.body?(le(xe,null,ix),j&&j(!0)):hc(xe.text(),function(Z){le(xe,O,Z[aM]),j&&j(!0)})}catch(Z){xe&&xe[rx]?X(Jt(Z),xe[rx]):X(Jt(Z),499),ce&&ce(Z)}}})}catch(te){Ne||(X(Jt(te),499),ce&&ce(te))}return fe&&!Ne&&(Ne=!0,R(D,200,{}),j&&j(!0)),s&&!Ne&&O[AG]>0&&y&&y.set(function(){Ne||(Ne=!0,R(D,500,{}),j&&j(!0))},O[AG]),W}a(M,"_doFetchSender");function N(O,D,F){var U=Gu(),L=new XDomainRequest,H=O[r1];L.onload=function(){var J=iP(L),Te=c&&c.xdrOnComplete;Te&&Er(Te)?Te(L,D,O):R(D,200,{},J)},L.onerror=function(){R(D,400,{},s?ix:NMe(L))},L.ontimeout=function(){R(D,500,{})},L.onprogress=function(){};var $=U&&U.location&&U.location.protocol||"",W=O[zZ];if(!W){x(D);return}if(!s&&W.lastIndexOf($,0)!==0){var j="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";Os(o,2,40,". "+j),I(j,D);return}var ce=s?W:W[tx](/^(https?:)/,"");L.open(o_t,ce),O[AG]&&(L[AG]=O[AG]),L.send(H),s&&F?y&&y.set(function(){L.send(H)},0):L.send(H)}a(N,"_xdrSender");function G(){e=0,n=!1,r=!1,o=null,s=null,c=null,l=null,u=null,d=null,p=!1,h=!1,m=!1,g=!1,A=!1,y=null}a(G,"_initDefaults")})}return a(t,"SenderPostManager"),t.__ieDyn=1,t})();f();var w5r="on",v5r="attachEvent",b5r="addEventListener",T5r="detachEvent",S5r="removeEventListener",s_t="events",Xhe="visibilitychange",n4e="pagehide",R5r="pageshow",P5r="unload",k5r="beforeunload",D5r=jb("aiEvtPageHide"),N5r=jb("aiEvtPageShow"),sMi=/\.[\.]+/g,aMi=/[\.]+$/,cMi=1,r4e=UMe("events"),lMi=/^([^.]*)(?:\.(.+)|)/;function I5r(t){return t&&t[tx]?t[tx](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Fo):t}a(I5r,"_normalizeNamespace");function a_t(t,e){if(e){var r=Fo;Kt(e)?(r=Fo,ut(e,function(o){o=I5r(o),o&&(o[0]!=="."&&(o="."+o),r+=o)})):r=I5r(e),r&&(r[0]!=="."&&(r="."+r),t=(t||Fo)+r)}var n=lMi.exec(t||Fo)||[];return{type:n[1],ns:(n[2]||Fo).replace(sMi,".").replace(aMi,Fo)[cM](".").sort().join(".")}}a(a_t,"_getEvtNamespace");function M5r(t,e,r){r===void 0&&(r=!0);var n=r4e.get(t,s_t,{},r),o=n[e];return o||(o=n[e]=[]),o}a(M5r,"_getRegisteredEvents");function O5r(t,e,r,n){t&&e&&e[lM]&&(t[S5r]?t[S5r](e[lM],r,n):t[T5r]&&t[T5r](w5r+e[lM],r))}a(O5r,"_doDetach");function uMi(t,e,r,n){var o=!1;return t&&e&&e[lM]&&r&&(t[b5r]?(t[b5r](e[lM],r,n),o=!0):t[v5r]&&(t[v5r](w5r+e[lM],r),o=!0)),o}a(uMi,"_doAttach");function x5r(t,e,r,n){for(var o=e[on];o--;){var s=e[o];s&&(!r.ns||r.ns===s[bEt].ns)&&(!n||n(s))&&(O5r(t,s[bEt],s.handler,s.capture),e[Gb](o,1))}}a(x5r,"_doUnregister");function dMi(t,e,r){if(e[lM])x5r(t,M5r(t,e[lM]),e,r);else{var n=r4e.get(t,s_t,{});Nr(n,function(o,s){x5r(t,s,e,r)}),Dl(n)[on]===0&&r4e.kill(t,s_t)}}a(dMi,"_unregisterEvents");function l8(t,e){var r;return e?(Kt(e)?r=[t].concat(e):r=[t,e],r=a_t("xx",r).ns[cM](".")):r=t,r}a(l8,"mergeEvtNamespace");function Khe(t,e,r,n,o){o===void 0&&(o=!1);var s=!1;if(t)try{var c=a_t(e,n);if(s=uMi(t,c,r,o),s&&r4e.accept(t)){var l={guid:cMi++,evtName:c,handler:r,capture:o};M5r(t,c.type)[wi](l)}}catch{}return s}a(Khe,"eventOn");function Jhe(t,e,r,n,o){if(o===void 0&&(o=!1),t)try{var s=a_t(e,n),c=!1;dMi(t,s,function(l){return s.ns&&!r||l.handler===r?(c=!0,!0):!1}),c||O5r(t,s,r,o)}catch{}}a(Jhe,"eventOff");function c_t(t,e,r){var n=!1,o=Gu();o&&(n=Khe(o,t,e,r),n=Khe(o.body,t,e,r)||n);var s=qu();return s&&(n=Khe(s,t,e,r)||n),n}a(c_t,"addEventHandler");function l_t(t,e,r){var n=Gu();n&&(Jhe(n,t,e,r),Jhe(n.body,t,e,r));var o=qu();o&&Jhe(o,t,e,r)}a(l_t,"removeEventHandler");function mee(t,e,r,n){var o=!1;return e&&t&&t[on]>0&&ut(t,function(s){s&&(!r||so(r,s)===-1)&&(o=c_t(s,e,n)||o)}),o}a(mee,"_addEventListeners");function u_t(t,e,r,n){var o=!1;return e&&t&&Kt(t)&&(o=mee(t,e,r,n),!o&&r&&r[on]>0&&(o=mee(t,e,null,n))),o}a(u_t,"addEventListeners");function TG(t,e,r){t&&Kt(t)&&ut(t,function(n){n&&l_t(n,e,r)})}a(TG,"removeEventListeners");function i4e(t,e,r){return u_t([k5r,P5r,n4e],t,e,r)}a(i4e,"addPageUnloadEventListener");function o4e(t,e){TG([k5r,P5r,n4e],t,e)}a(o4e,"removePageUnloadEventListener");function Zhe(t,e,r){function n(c){var l=qu();t&&l&&l.visibilityState==="hidden"&&t(c)}a(n,"_handlePageVisibility");var o=l8(D5r,r),s=mee([n4e],t,e,o);return(!e||so(e,Xhe)===-1)&&(s=mee([Xhe],n,e,o)||s),!s&&e&&(s=Zhe(t,null,r)),s}a(Zhe,"addPageHideEventListener");function s4e(t,e){var r=l8(D5r,e);TG([n4e],t,r),TG([Xhe],null,r)}a(s4e,"removePageHideEventListener");function eme(t,e,r){function n(c){var l=qu();t&&l&&l.visibilityState==="visible"&&t(c)}a(n,"_handlePageVisibility");var o=l8(N5r,r),s=mee([R5r],t,e,o);return s=mee([Xhe],n,e,o)||s,!s&&e&&(s=eme(t,null,r)),s}a(eme,"addPageShowEventListener");function a4e(t,e){var r=l8(N5r,e);TG([R5r],t,r),TG([Xhe],null,r)}a(a4e,"removePageShowEventListener");f();var gee="",B5r="https://browser.events.data.microsoft.com/OneCollector/1.0/",d_t="version",c4e="properties";f();f();var f_t="initialize",p_t="indexOf",cP="timings",h_t="pollInternalLogs",o1="value",l4e="length",u4e="processTelemetryStart";var pM,L5r="4.3.10",tme="1DS-Web-JS-"+L5r,F5r=Bpe.hasOwnProperty;var CMi=(pM={},pM[0]=0,pM[2]=6,pM[1]=1,pM[3]=7,pM[4098]=6,pM[4097]=1,pM[4099]=7,pM);var vMi=UN(),bMi=sZ();function Vb(t){return!(t===gee||qt(t))}a(Vb,"isValueAssigned");function m_t(t){if(t){var e=Kc(t,"-");if(e>-1)return B2(t,e)}return gee}a(m_t,"getTenantId");function g_t(t){return!!(t&&jf(t)&&t>=1&&t<=4)}a(g_t,"isLatency");function A_t(t,e,r){if(!e&&!Vb(e)||typeof t!="string")return null;var n=typeof e;if(n==="string"||n==="number"||n==="boolean"||Kt(e))e={value:e};else if(n==="object"&&!F5r.call(e,"value"))e={value:r?JSON.stringify(e):e};else if(qt(e[o1])||e[o1]===gee||!Vn(e[o1])&&!jf(e[o1])&&!HI(e[o1])&&!Kt(e[o1]))return null;if(Kt(e[o1])&&!Q5r(e[o1]))return null;if(!qt(e.kind)){if(Kt(e[o1])||!U5r(e.kind))return null;e[o1]=e[o1].toString()}return e}a(A_t,"sanitizeProperty");function rme(t,e,r){var n=-1;if(!ln(t))if(e>0&&(e===32?n=8192:e<=13&&(n=e<<5)),TMi(r))n===-1&&(n=0),n|=r;else{var o=CMi[d4e(t)]||-1;n!==-1&&o!==-1?n|=o:o===6&&(n=o)}return n}a(rme,"getCommonSchemaMetaData");function Aee(t,e,r,n,o){var s={},c=!1,l=0,u=arguments[l4e],d=arguments;for(HI(d[0])&&(c=d[0],l++);l0&&t<=13||t===32}a(U5r,"isValueKind");function TMi(t){return t>=0&&t<=9}a(TMi,"isDataType");function Q5r(t){return t[l4e]>0}a(Q5r,"isArrayValid");function f4e(t,e){var r=t;r[cP]=r[cP]||{},r[cP][u4e]=r[cP][u4e]||{},r[cP][u4e][e]=s1()}a(f4e,"setProcessTelemetryTimings");function d4e(t){var e=0;if(t!=null){var r=typeof t;r==="string"?e=1:r==="number"?e=2:r==="boolean"?e=3:r===Ob&&(e=4,Kt(t)?(e=4096,t[l4e]>0&&(e|=d4e(t[0]))):F5r.call(t,"value")&&(e=8192|d4e(t[o1])))}return e}a(d4e,"getFieldValueType");function y_t(){return!!ti("chrome")}a(y_t,"isChromium");function SG(t){return t>0}a(SG,"isGreaterThanZero");var SMi=LA({endpointUrl:B5r,propertyStorageOverride:{isVal:IMi}});function IMi(t){return t&&(!t.getProperty||!t.setProperty)&&Ya("Invalid property storage override passed."),!0}a(IMi,"_chkPropOverride");var E_t=(function(t){Ag(e,t);function e(){var r=t.call(this)||this;return Kn(e,r,function(n,o){n[f_t]=function(s,c,l,u){sf(n,function(){return"AppInsightsCore.initialize"},function(){try{o[f_t](of(s,SMi,l||n.logger,!1).cfg,c,l,u)}catch(h){var d=n.logger,p=Jt(h);p[p_t]("channels")!==-1&&(p+=` + - Channels must be provided through config.channels only!`),Os(d,1,514,"SDK Initialization Failed - no telemetry will be sent: "+p)}},function(){return{config:s,extensions:c,logger:l,notificationManager:u}})},n.track=function(s){sf(n,function(){return"AppInsightsCore.track"},function(){var c=s;if(c){c[cP]=c[cP]||{},c[cP].trackStart=s1(),g_t(c.latency)||(c.latency=1);var l=c.ext=c.ext||{};l.sdk=l.sdk||{},l.sdk.ver=tme;var u=c.baseData=c.baseData||{};u[c4e]=u[c4e]||{};var d=u[c4e];d[d_t]=d[d_t]||n.pluginVersionString||gee}o.track(c)},function(){return{item:s}},!s.sync)},n[h_t]=function(s){return o[h_t](s||"InternalLog")}}),r}return a(e,"AppInsightsCore"),e.__ieDyn=1,e})(e4e);f();f();var nme="REAL_TIME",q5r="NEAR_REAL_TIME",G5r="BEST_EFFORT";f();f();f();var ox="";var p4e="drop",H5r="send",__t="requeue",j5r="rspFail",$5r="oth",C_t="no-cache, no-store",h4e="application/x-json-stream",ime="cache-control",yee="content-type",V5r="kill-tokens",W5r="kill-duration";var z5r="time-delta-millis",m4e="client-version",v_t="client-id",g4e="time-delta-to-apply-millis",A4e="upload-time",y4e="apikey",ome="AuthMsaDeviceTicket",b_t="WebAuthToken",T_t="AuthXToken";var Y5r="NoResponseBody",Eee="msfpc",S_t="trace",E4e="user";f();var sme="allowRequestSending",_4e="shouldAddClockSkewHeaders",C4e="getClockSkewHeaderValue",ame="setClockSkew",ao="length",lP="concat",a1="iKey",_d="count",uP="events",sp="push",dP="split",v4e="toLowerCase",IG="hdrs",b4e="useHdrs",xG="initialize",T4e="setTimeoutOverride",S4e="clearTimeoutOverride",K5r="payloadPreprocessor",I_t="overrideEndpointUrl",x_t="avoidOptions",J5r="disableEventTimings",I4e="enableCompoundKey",w_t="disableXhrSync",R_t="disableFetchKeepAlive",X5r="addNoResponse",P_t="useSendBeacon",k_t="fetchCredentials",D_t="alwaysUseXhrOverride",x4e="serializeOfflineEvt",w4e="getOfflineRequestDetails",R4e="createPayload",cme="createOneDSPayload",N_t="payloadBlob",sx="headers",_ee="_thePayload",Cg="batches",IE="sendType",lme="canSendRequest",Cee="sendQueuedRequests",ume="setUnloading",Z5r="isTenantKilled",P4e="sendSynchronousBatch",k4e="_transport",vee="getWParam",M_t="isBeacon",dme="timings",D4e="isTeardown",N4e="_sendReason",M4e="setKillSwitchTenants",O4e="_backOffTransmission",fme="identifier",eDr="ignoreMc1Ms0CookieProcessing",O_t="autoFlushEventsLimit",tDr="disableAutoBatchFlushLimit",rDr="overrideInstrumentationKey",pme="sendAttempt",u8="latency",wG="sync";function iDr(t){var e=(t.ext||{}).intweb;return e&&Vb(e[Eee])?e[Eee]:null}a(iDr,"_getEventMsfpc");function nDr(t){for(var e=null,r=0;e===null&&rpc()?!0:(delete s[c],!1)}})}return a(t,"KillSwitch"),t.__ieDyn=1,t})();f();var wMi=.8,RMi=1.2,aDr=3e3,PMi=6e5;function cDr(t){return!(t>=300&&t<500&&t!=429||t==501||t==505)}a(cDr,"retryPolicyShouldRetryForStatus");function B4e(t){var e=0,r=aDr*wMi,n=aDr*RMi,o=jC(Math.random()*(n-r))+r;return e=Math.pow(2,t)*o,mL(e,PMi)}a(B4e,"retryPolicyGetMillisToBackoffForRetry");f();var kMi=20,DMi=3145728,uDr=65e3,dDr=2e6,NMi=mL(dDr,uDr),lDr="metadata",L4e="f",MMi=/\./,fDr=(function(){function t(e,r,n,o,s,c,l){var u="data",d="baseData",p="ext",h=!!o,m=!0,g=r,A={},y=!!c,E=s||rme,_=OMi(l),v=F4e(_.requestLimit,DMi,0),b=F4e(_.requestLimit,uDr,1),I=F4e(_.recordLimit,dDr,0),x=Math.min(F4e(_.recordLimit,NMi,1),b);Kn(t,this,function(w){w.createPayload=function(k,Q,M,N,G,O){return{apiKeys:[],payloadBlob:ox,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:k,isTeardown:Q,isSync:M,isBeacon:N,sendType:O,sendReason:G}},w.appendPayload=function(k,Q,M){var N=k&&Q&&!k.overflow;return N&&sf(e,function(){return"Serializer:appendPayload"},function(){for(var G=Q.events(),O=k.payloadBlob,D=k.numEvents,F=!1,U=[],L=[],H=k.isBeacon,$=H?b:v,W=H?x:I,j=0,ce=0;j=M){k.overflow=Q.split(j);break}var Te=w.getEventBlob(J);if(Te&&Te.length<=W){var fe=Te.length,Ne=O.length;if(Ne+fe>$){k.overflow=Q.split(j);break}O&&(O+=` +`),O+=Te,ce++,ce>kMi&&(ZDe(O,0,1),ce=0),F=!0,D++}else Te?U.push(J):L.push(J),G.splice(j,1),j--}j++}if(U.length>0&&k.sizeExceed.push(d8.create(Q.iKey(),U)),L.length>0&&k.failedEvts.push(d8.create(Q.iKey(),L)),F){k.batches.push(Q),k.payloadBlob=O,k.numEvents=D;var Ve=Q.iKey();so(k.apiKeys,Ve)===-1&&k.apiKeys.push(Ve)}},function(){return{payload:k,theBatch:{iKey:Q.iKey(),evts:Q.events()},max:M}}),N},w.getEventBlob=function(k){try{return sf(e,function(){return"Serializer.getEventBlob"},function(){var Q={};Q.name=k.name,Q.time=k.time,Q.ver=k.ver,Q.iKey="o:"+m_t(k.iKey);var M={},N;y||(N=a(function(F,U,L){BMi(E,M,F,U,L)},"_addMetadataCallback"));var G=k[p];G&&(Q[p]=M,Nr(G,function(F,U){var L=M[F]={};P(U,L,"ext."+F,!0,null,null,!0)}));var O=Q[u]={};O.baseType=k.baseType;var D=O[d]={};return P(k.baseData,D,d,!1,[d],N,m),P(k.data,O,u,!1,[],N,m),JSON.stringify(Q)},function(){return{item:k}})}catch{return null}};function R(k,Q){var M=A[k];return M===void 0&&(k.length>=7&&(M=cZ(k,"ext.metadata")||cZ(k,"ext.web")),A[k]=M),M}a(R,"_isReservedField");function P(k,Q,M,N,G,O,D){Nr(k,function(F,U){var L=null;if(U||Vb(U)){var H=M,$=F,W=G,j=Q;if(h&&!N&&MMi.test(F)){var ce=F.split("."),J=ce.length;if(J>1){W&&(W=W.slice());for(var Te=0;Te0&&n<=e)return n}return e}a(F4e,"_validateSizeLimit");function OMi(t){var e={};return t&&t.requestLimit?t.requestLimit:e}a(OMi,"_getSizeLimtCfg");function BMi(t,e,r,n,o){if(o&&e){var s=t(o.value,o.kind,o.propertyType);if(s>-1){var c=e[lDr];c||(c=e[lDr]={f:{}});var l=c[L4e];if(l||(l=c[L4e]={}),r)for(var u=0;u0)for(var o=e[v4e](),s=0;s0&&(n&&L_t[e]?(t[IG][L_t[e]]=r,t[b4e]=!0):t.url+="&"+e+"="+r)}a(Tee,"_addRequestDetails");function QMi(t,e,r){for(var n=0;n=0&&U.splice(Le,1)},"rm")}},J[x4e]=function(ye){try{if(b)return b.getEventBlob(ye)}catch{}return ox},J[w4e]=function(){try{var ye=b&&b[R4e](0,!1,!1,!1,1,0);return Ae(ye,R)}catch{}return null},J[cme]=function(ye,Le){try{var $e=[];ut(ye,function(se){Le&&(se=nP(se));var _e=d8.create(se[a1],[se]);$e[sp](_e)});for(var rt=null;$e[ao]>0&&b;){var it=$e.shift();it&&it[_d]()>0&&(rt=rt||b[R4e](0,!1,!1,!1,1,0),b.appendPayload(rt,it,ce))}var dt=Ae(rt,R),z={data:rt[N_t],urlString:dt.url,headers:dt[IG],timeout:P,disableXhrSync:Q,disableFetchKeepAlive:M};return R&&(U4e(z[sx],ime)||(z[sx][ime]=C_t),U4e(z[sx],yee)||(z[sx][yee]=h4e)),z}catch{}return null};function fe(ye,Le){try{return W&&W.getSenderInst(ye,Le)}catch{}return null}a(fe,"_getSenderInterface"),J._getDbgPlgTargets=function(){return[g[0],c,b,g,Ne(),s,ce]};function Ne(){try{var ye={xdrOnComplete:Ve,fetchOnComplete:Ke,xhrOnComplete:X,beaconOnRetry:te},Le={enableSendPromise:!1,isOneDs:!0,disableCredentials:!Te,fetchCredentials:j,disableXhr:!1,disableBeacon:!d,disableBeaconSync:!d,disableFetchKeepAlive:M,timeWrapper:H,addNoResponse:G,senderOnCompleteCallBack:ye};return Le}catch{}return null}a(Ne,"_getSendPostMgrConfig");function Ve(ye,Le,$e){var rt=iP(ye);le(Le,200,{},rt),Be(rt)}a(Ve,"_xdrOncomplete");function Ue(){var ye;s=null,c=new sDr,l=!1,u=new oDr,d=!1,p=0,h=null,m=null,g=null,A=null,y=!0,E=[],_={},v=[],b=null,I=!1,x=null,w=!1,R=!1,P=ye,Q=ye,M=ye,N=ye,G=ye,O=[],D=ye,F=ye,U=[],L=!1,H=bee(),$=!1,W=null,ce=null}a(Ue,"_initDefaults");function Ke(ye,Le,$e,rt){var it=a(function(se,_e,we){le(Le,se,_e,we),Be(we)},"handleResponse"),dt={},z=ye[sx];z&&z.forEach(function(se,_e){dt[_e]=se}),it(ye.status,dt,$e||ox)}a(Ke,"_fetchOnComplete");function X(ye,Le,$e){var rt=iP(ye);le(Le,ye.status,n8(ye,!0),rt),Be(rt)}a(X,"_xhrOnComplete");function le(ye,Le,$e,rt){try{ye(Le,$e,rt)}catch(it){Os(m,2,518,Jt(it))}}a(le,"_doOnComplete");function te(ye,Le,$e){var rt=ye,it=200,dt=rt[_ee],z=ye.urlString+(G?LMi:ox);try{var se=Nl();if(dt){var _e=!!A.getPlugin("LocalStorage"),we=[],je=[];ut(dt[Cg],function(Ye){if(we&&Ye&&Ye[_d]()>0)for(var ht=Ye[uP](),St=0;St0&&(dt.sentEvts=je),_e||et(we,8003,dt[IE],!0)}else it=0}catch(Ye){sP(m,"Failed to send telemetry using sendBeacon API. Ex:"+Jt(Ye)),it=0}finally{le(Le,it,{},ox)}}a(te,"_onBeaconRetry");function xe(ye){return ye===2||ye===3}a(xe,"_isBeaconPayload");function Z(ye){return w&&xe(ye)&&(ye=2),ye}a(Z,"_adjustSendType"),J.addHeader=function(ye,Le){_[ye]=Le},J.removeHeader=function(ye){delete _[ye]},J[lme]=function(){return ae()&&u[sme]()},J[Cee]=function(ye,Le){ln(ye)&&(ye=0),w&&(ye=Z(ye),Le=2),Y(v,ye,0)&&Ee(De(),0,!1,ye,Le||0)},J.isCompletelyIdle=function(){return!l&&p===0&&v[ao]===0},J[ume]=function(ye){w=ye},J.addBatch=function(ye){if(ye&&ye[_d]()>0){if(c.isTenantKilled(ye[a1]()))return!1;v[sp](ye)}return!0},J.teardown=function(){v[ao]>0&&Ee(De(),0,!0,2,2),ut(O,function(ye){ye&&ye.rm&&ye.rm()}),O=[]},J.pause=function(){l=!0},J.resume=function(){l=!1,J[Cee](0,4)},J[P4e]=function(ye,Le,$e){ye&&ye[_d]()>0&&(qt(Le)&&(Le=1),w&&(Le=Z(Le),$e=2),Ee([ye],0,!1,Le,$e||0))};function ae(){return!l&&p0&&!l&&g[Le]&&b&&(rt=Le!==0||ae()&&($e>0||u[sme]())),rt}a(Y,"_canSendPayload");function ee(ye){var Le={};return ye&&ut(ye,function($e,rt){Le[rt]={iKey:$e[a1](),evts:$e[uP]()}}),Le}a(ee,"_createDebugBatches");function Ee(ye,Le,$e,rt,it){if(!(!ye||ye[ao]===0)){if(l){et(ye,1,rt);return}rt=Z(rt);try{var dt=ye,z=rt!==0;sf(A,function(){return"HttpManager:_sendBatches"},function(se){se&&(ye=ye.slice(0));for(var _e=[],we=null,je=s1(),Ye=g[rt]||(z?g[1]:g[0]),ht=Ye&&Ye[k4e],St=N&&(w||xe(rt)||ht===3||Ye._isSync&&ht===2);Y(ye,rt,Le);){var Mt=ye.shift();Mt&&Mt[_d]()>0&&(c.isTenantKilled(Mt[a1]())?_e[sp](Mt):(we=we||b[R4e](Le,$e,z,St,it,rt),b.appendPayload(we,Mt,ce)?we.overflow!==null&&(ye=[we.overflow][lP](ye),we.overflow=null,We(we,je,s1(),it),je=s1(),we=null):(We(we,je,s1(),it),je=s1(),ye=[Mt][lP](ye),we=null)))}we&&We(we,je,s1(),it),ye[ao]>0&&(v=ye[lP](v)),et(_e,8004,rt)},function(){return{batches:ee(dt),retryCount:Le,isTeardown:$e,isSynchronous:z,sendReason:it,useSendBeacon:xe(rt),sendType:rt}},!z)}catch(se){Os(m,2,48,"Unexpected Exception sending batch: "+Jt(se))}}}a(Ee,"_sendBatches");function Ae(ye,Le){var $e={url:s,hdrs:{},useHdrs:!1};Le?($e[IG]=Aee($e[IG],_),$e.useHdrs=Dl($e.hdrs)[ao]>0):Nr(_,function(se,_e){F_t[se]?Tee($e,F_t[se],_e,!1):($e[IG][se]=_e,$e[b4e]=!0)}),Tee($e,v_t,"NO_AUTH",Le),Tee($e,m4e,tme,Le);var rt=ox;ut(ye.apiKeys,function(se){rt[ao]>0&&(rt+=","),rt+=se}),Tee($e,y4e,rt,Le),Tee($e,A4e,pc().toString(),Le);var it=ue(ye);if(Vb(it)&&($e.url+="&ext.intweb.msfpc="+it),u[_4e]()&&Tee($e,g4e,u[C4e](),Le),A[vee]){var dt=A[vee]();dt>=0&&($e.url+="&w="+dt)}for(var z=0;z0){var it=!!D,dt=g[ye.sendType];!xe(ye[IE])&&ye[M_t]&&ye.sendReason===2&&(dt=g[2]||g[3]||dt);var z=R;(ye.isBeacon||dt[k4e]===3)&&(z=!1);var se=Ae(ye,z);z=z||se[b4e];var _e=s1();sf(A,function(){return"HttpManager:_doPayloadSend"},function(){for(var we=0;we0?St[B_t]++:St[B_t]=1}et(ye[Cg],1e3+(rt||0),ye[IE],!0);var At={data:ye[N_t],urlString:se.url,headers:se[IG],_thePayload:ye,_sendReason:rt,timeout:P,disableXhrSync:Q,disableFetchKeepAlive:M};z&&(U4e(At[sx],ime)||(At[sx][ime]=C_t),U4e(At[sx],yee)||(At[sx][yee]=h4e));var Ie=null;dt&&(Ie=a(function(K){u.firstRequestSent();var pe=a(function(ne,V){Et(ne,V,ye,rt)},"onComplete"),me=ye[D4e]||ye.isSync;W.preparePayload(function(ne){try{dt.sendPOST(ne,pe,me),F&&F(At,ne,me,ye[M_t])}catch(V){le(pe,0,{}),sP(m,"Unexpected exception sending payload. Ex:"+Jt(V))}},k,K,me)},"sender")),sf(A,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ie)if(ye[IE]===0&&p++,it&&!ye.isBeacon&&dt[k4e]!==3){var K={data:At.data,urlString:At.urlString,headers:Aee({},At[sx]),timeout:At.timeout,disableXhrSync:At[w_t],disableFetchKeepAlive:At[R_t]},pe=!1;sf(A,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{D(K,function(me){pe=!0,!y&&!me[_ee]&&(me[_ee]=me[_ee]||At[_ee],me[N4e]=me[N4e]||At[N4e]),Ie(me)},ye.isSync||ye[D4e])}catch{pe||Ie(At)}})}else Ie(At)})},function(){return{thePayload:ye,serializationStart:Le,serializationCompleted:$e,sendReason:rt}},ye.isSync)}ye.sizeExceed&&ye.sizeExceed[ao]>0&&et(ye.sizeExceed,8003,ye[IE]),ye.failedEvts&&ye.failedEvts[ao]>0&&et(ye.failedEvts,8002,ye[IE])}a(We,"_doPayloadSend");function Ze(ye,Le){I&&ut(ye,function($e){var rt=$e[dme]=$e[dme]||{};ve(rt,"sendEventCompleted",Le)})}a(Ze,"_addEventCompletedTimings");function Et(ye,Le,$e,rt){var it=9e3,dt=null,z=!1,se=!1;try{var _e=!0;if(typeof ye!==YC){if(Le){u[ame](Le[z5r]);var we=Le[W5r]||Le["kill-duration-seconds"];ut(c[M4e](Le[V5r],we),function(Ye){ut($e[Cg],function(ht){if(ht[a1]()===Ye){dt=dt||[];var St=ht[dP](0);$e.numEvents-=St[_d](),dt[sp](St)}})})}if(ye==200||ye==204){it=200;return}(!cDr(ye)||$e.numEvents<=0)&&(_e=!1),it=9e3+ye%1e3}if(_e){it=100;var je=$e.retryCnt;$e[IE]===0&&(je0&&Ze($e[uP](),Le)})}}a(Qt,"_addCompleteTimings");function Ft(ye,Le,$e){Le?ye():H.set(ye,$e)}a(Ft,"_doAction");function ue(ye){for(var Le=0;Le0&&o){var it=o[lt(Le)];if(it){var dt=$e!==0;sf(A,function(){return"HttpManager:_sendBatchesNotification"},function(){Ft(function(){try{it.call(o,ye,Le,dt,$e)}catch(z){Os(m,1,74,"send request notification failed: "+z)}},rt||dt,0)},function(){return{batches:ee(ye),reason:Le,isSync:dt,sendSync:rt,sendType:$e}},!dt)}}}a(et,"_sendBatchesNotification");function lt(ye){var Le=UMi[ye];return Vb(Le)||(Le=$5r,ye>=9e3&&ye<=9999?Le=j5r:ye>=8e3&&ye<=8999?Le=p4e:ye>=1e3&&ye<=1999&&(Le=H5r)),Le}a(lt,"_getNotificationAction")})}return a(t,"HttpManager"),t.__ieDyn=1,t})();var GMi=.25,gDr=500,HMi=20,ADr=6,yDr=2,jMi=4,hDr=2,$Mi=1,U_t=1e4,kG="eventsDiscarded",mDr="",Kf=void 0,VMi=LA({eventsLimitInMem:{isVal:SG,v:U_t},immediateEventLimit:{isVal:SG,v:500},autoFlushEventsLimit:{isVal:SG,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:WMi,v:Kf},overrideInstrumentationKey:Kf,overrideEndpointUrl:Kf,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:Kf,clearTimeoutOverride:Kf,payloadPreprocessor:Kf,payloadListener:Kf,disableEventTimings:Kf,valueSanitizer:Kf,stringifyObjects:Kf,enableCompoundKey:Kf,disableOptimizeObj:!1,fetchCredentials:Kf,transports:Kf,unloadTransports:Kf,useSendBeacon:Kf,disableFetchKeepAlive:Kf,avoidOptions:!1,xhrTimeout:Kf,disableXhrSync:Kf,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:jf,v:ADr},maxUnloadEventRetryAttempts:{isVal:jf,v:yDr},addNoResponse:Kf,maxEvtPerBatch:{isVal:jf,v:gDr},excludeCsMetaData:Kf,requestLimit:{}});function WMi(t){return t&&t.sendPOST}a(WMi,"isOverrideFn");var Q_t=(function(t){Ag(e,t);function e(){var r=t.call(this)||this;r.identifier="PostChannel",r.priority=1011,r.version="4.3.10";var n,o=!1,s=[],c,l=!1,u=0,d,p=0,h,m={},g=nme,A,y,E,_,v,b,I,x,w,R,P,k,Q,M,N,G,O,D,F,U,L,H,$;return Kn(e,r,function(W,j){xe(),W._getDbgPlgTargets=function(){return[v,n]},W[xG]=function(z,se,_e){sf(se,function(){return"PostChannel:initialize"},function(){j[xG](z,se,_e),F=se.getNotifyMgr();try{N=l8(jb(W[fme]),se.evtNamespace&&se.evtNamespace()),W._addHook(i1(z,function(we){var je=we.cfg,Ye=$b(null,je,se);n=Ye.getExtCfg(W[fme],VMi),G=bee(n[T4e],n[S4e]),P=!n.disableOptimizeObj&&y_t(),O=n[eDr],J(se),h=n.eventsLimitInMem,d=n.immediateEventLimit,I=n[O_t],Q=n.maxEventRetryAttempts,M=n.maxUnloadEventRetryAttempts,D=n[tDr],$=n.maxEvtPerBatch,Vp(je.endpointUrl)?W.pause():l&&W.resume(),dt(),L=n[rDr],H=!!n.disableTelemetry,U&&ce();var ht=je.disablePageUnloadEvents||[];U=i4e(Ne,ht,N),U=Zhe(Ne,ht,N)||U,U=eme(Ve,je.disablePageShowEvents,N)||U})),v[xG](z,W.core,W)}catch(we){throw W.setInitialized(!1),we}},function(){return{theConfig:z,core:se,extensions:_e}})},W.processTelemetry=function(z,se){f4e(z,W[fme]),se=se||W._getTelCtx(se);var _e=z;!H&&!o&&(L&&(_e[a1]=L),Ke(_e,!0),k?De(2,2):te()),W.processNext(_e,se)},W.getOfflineSupport=function(){try{var z=v&&v[w4e]();if(v)return{getUrl:a(function(){return z?z.url:null},"getUrl"),serialize:fe,batch:Te,shouldProcess:a(function(se){return!H},"shouldProcess"),createPayload:a(function(se){return null},"createPayload"),createOneDSPayload:a(function(se){if(v[cme])return v[cme](se,P)},"createOneDSPayload")}}catch{}return null},W._doTeardown=function(z,se){De(2,2),o=!0,v.teardown(),ce(),xe()};function ce(){o4e(null,N),s4e(null,N),a4e(null,N)}a(ce,"_removeUnloadHandlers");function J(z){var se=z[vee];z[vee]=function(){var _e=0;return O&&(_e=_e|2),_e|se.call(z)}}a(J,"_hookWParam");function Te(z){var se=mDr;return z&&z[ao]&&ut(z,function(_e){se&&(se+=` +`),se+=_e}),se}a(Te,"_batch");function fe(z){var se=mDr;try{Ue(z),se=v[x4e](z)}catch{}return se}a(fe,"_serialize");function Ne(z){var se=z||Gu().event;se.type!=="beforeunload"&&(k=!0,v[ume](k)),De(2,2)}a(Ne,"_handleUnloadEvents");function Ve(z){k=!1,v[ume](k)}a(Ve,"_handleShowEvents");function Ue(z){z.ext&&z.ext[S_t]&&delete z.ext[S_t],z.ext&&z.ext[E4e]&&z.ext[E4e].id&&delete z.ext[E4e].id,P&&(z.ext=nP(z.ext),z.baseData&&(z.baseData=nP(z.baseData)),z.data&&(z.data=nP(z.data)))}a(Ue,"_cleanEvent");function Ke(z,se){if(z[pme]||(z[pme]=0),z[u8]||(z[u8]=1),Ue(z),z[wG]){if(E||l)z[u8]=3,z[wG]=!1;else if(v){P&&(z=nP(z)),v[P4e](d8.create(z[a1],[z]),z[wG]===!0?1:z[wG],3);return}}var _e=z[u8],we=p,je=h;_e===4&&(we=u,je=d);var Ye=!1;if(wez;if(!_e&&x>0)for(var we=1;!_e&&we<=3;we++){var je=b[we];je&&je[Cg]&&ut(je[Cg],function(Ye){Ye&&Ye[_d]()>=x&&(_e=!0)})}Ee(!0,_e)},W.pause=function(){ae(),l=!0,v&&v.pause()},W.resume=function(){l=!1,v&&v.resume(),te()},W._loadTransmitProfiles=function(z){Qt(),Nr(z,function(se,_e){var we=_e[ao];if(we>=2){var je=we>2?_e[2]:0;if(_e.splice(0,we-2),_e[1]<0&&(_e[0]=-1),_e[1]>0&&_e[0]>0){var Ye=_e[0]/_e[1];_e[0]=o2r(Ye)*_e[1]}je>=0&&_e[1]>=0&&je>_e[1]&&(je=_e[1]),_e[sp](je),m[se]=_e}})},W.flush=function(z,se,_e){z===void 0&&(z=!0);var we;if(!l)if(_e=_e||1,z)se||(we=pu(function(Ye){se=Ye})),c==null?(ae(),Ze(1,0,_e),c=Z(function(){c=null,Et(se,_e)},0)):s[sp](se);else{var je=ae();X(1,1,_e),se&&se(),je&&te()}return we},W.setMsaAuthTicket=function(z){v.addHeader(ome,z)},W.setAuthPluginHeader=function(z){v.addHeader(b_t,z)},W.removeAuthPluginHeader=function(){v.removeHeader(b_t)},W.hasEvents=le,W._setTransmitProfile=function(z){g!==z&&m[z]!==void 0&&(ae(),g=z,te())},r8(W,function(){return v},["addResponseHandler"]);function X(z,se,_e){var we=Ze(z,se,_e);return v[Cee](se,_e),we}a(X,"_sendEventsForLatencyAndAbove");function le(){return p>0}a(le,"_hasEvents");function te(){if(w>=0&&Ze(w,0,R)&&v[Cee](0,R),u>0&&!y&&!l){var z=m[g][2];z>=0&&(y=Z(function(){y=null,X(4,0,1),te()},z))}var se=m[g][1];!A&&!c&&se>=0&&!l&&(le()?A=Z(function(){A=null,X(_===0?3:1,0,1),_++,_%=2,te()},se):_=0)}a(te,"_scheduleTimer"),W[O4e]=function(){E0&&p>I&&(se=!0),se&&c==null&&W.flush(z,function(){},20))}a(Ee,"_performAutoFlush");function Ae(z,se){P&&(z=nP(z));var _e=z[u8],we=ee(z[a1],_e,!0);return we.addEvent(z)?(_e!==4?(p++,se&&z[pme]===0&&Ee(!z.sync,x>0&&we[_d]()>=x)):u++,!0):!1}a(Ae,"_addEventToProperQueue");function ve(z,se,_e,we){for(;_e<=se;){var je=ee(z,se,!0);if(je&&je[_d]()>0){var Ye=je[dP](0,we),ht=Ye[_d]();if(ht>0)return _e===4?u-=ht:p-=ht,lt(kG,[Ye],K2.QueueFull),!0}_e++}return We(),!1}a(ve,"_dropEventWithLatencyOrLess");function We(){for(var z=0,se=0,_e=a(function(je){var Ye=b[je];Ye&&Ye[Cg]&&ut(Ye[Cg],function(ht){je===4?z+=ht[_d]():se+=ht[_d]()})},"_loop_1"),we=1;we<=4;we++)_e(we);p=se,u=z}a(We,"_resetQueueCounts");function Ze(z,se,_e){var we=!1,je=se===0;return!je||v[lme]()?sf(W.core,function(){return"PostChannel._queueBatches"},function(){for(var Ye=[],ht=4;ht>=z;){var St=b[ht];St&&St.batches&&St.batches[ao]>0&&(ut(St[Cg],function(Mt){v.addBatch(Mt)?we=we||Mt&&Mt[_d]()>0:Ye=Ye[lP](Mt[uP]()),ht===4?u-=Mt[_d]():p-=Mt[_d]()}),St[Cg]=[],St.iKeyMap={}),ht--}Ye[ao]>0&&et(kG,Ye,K2.KillSwitch),we&&w>=z&&(w=-1,R=0)},function(){return{latency:z,sendType:se,sendReason:_e}},!je):(w=w>=0?mL(w,z):z,R=jI(R,_e)),we}a(Ze,"_queueBatches");function Et(z,se){X(1,0,se),We(),Rt(function(){z&&z(),s[ao]>0?c=Z(function(){c=null,Et(s.shift(),se)},0):(c=null,te())})}a(Et,"_flushImpl");function Rt(z){v.isCompletelyIdle()?z():c=Z(function(){c=null,Rt(z)},GMi)}a(Rt,"_waitForIdleManager");function Qt(){ae(),Ft(),g=nme,te()}a(Qt,"_resetTransmitProfiles");function Ft(){m={},m[nme]=[2,1,0],m[q5r]=[6,3,0],m[G5r]=[18,9,0]}a(Ft,"_initializeProfiles");function ue(z,se){var _e=[],we=Q;k&&(we=M),ut(z,function(je){je&&je[_d]()>0&&ut(je[uP](),function(Ye){Ye&&(Ye[wG]&&(Ye[u8]=4,Ye[wG]=!1),Ye[pme]0&&et(kG,_e,K2.NonRetryableStatus),k&&De(2,2)}a(ue,"_requeueEvents");function Be(z,se){var _e=F||{},we=_e[z];if(we)try{we.apply(_e,se)}catch(je){Os(W.diagLog(),1,74,z+" notification failed: "+je)}}a(Be,"_callNotification");function et(z,se){for(var _e=[],we=2;we0&&Be(z,[se][lP](_e))}a(et,"_notifyEvents");function lt(z,se){for(var _e=[],we=2;we0&&ut(se,function(je){je&&je[_d]()>0&&Be(z,[je.events()][lP](_e))})}a(lt,"_notifyBatchEvents");function ye(z,se,_e){z&&z[ao]>0&&Be("eventsSendRequest",[se>=1e3&&se<=1999?se-1e3:0,_e!==!0])}a(ye,"_sendingEvent");function Le(z,se){lt("eventsSent",z,se),te()}a(Le,"_eventsSentEvent");function $e(z,se){lt(kG,z,se>=8e3&&se<=8999?se-8e3:K2.Unknown)}a($e,"_eventsDropped");function rt(z){lt(kG,z,K2.NonRetryableStatus),te()}a(rt,"_eventsResponseFail");function it(z,se){lt(kG,z,K2.Unknown),te()}a(it,"_otherEvent");function dt(){D?x=0:x=jI($*(hDr+1),h/6)}a(dt,"_setAutoLimits")}),r}return a(e,"PostChannel"),e.__ieDyn=1,e})(hee);var c1=de(require("os"));var Q4e=class{constructor(e,r,n,o=!0,s){this.ctx=e;this.namespace=r;this.internalOnly=o;this.onCopilotToken=a(async e=>{this.token=e,this.commonProperties["common.isinternal"]=e?.isInternalUser()?"true":"false",await this.refreshGitHubHandleInCommonProperties();let r=e.getTokenValue("tid");r!==void 0&&(this.tags["ai.user.id"]=r)},"onCopilotToken");this.client=this.initializeClient(n),this.tags=zMi(e),this.commonProperties=YMi(e),this.#e=Ps(e,this.onCopilotToken),s&&this.onCopilotToken(s)}static{a(this,"Msft1dsReporter")}#e;initializeClient(e){try{let r=new E_t,n=new Q_t,o={instrumentationKey:e,loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[n]]},s={alwaysUseXhrOverride:!0,httpXHROverride:this.createXhrOverride()};return o.extensionConfig={},o.extensionConfig[n.identifier]=s,r.initialize(o,[]),r.addTelemetryInitializer(c=>{let l=c.ext??{},u=l.web??{};u.consentDetails='{"GPC_DataSharingOptIn":false}',l.web=u,c.ext=l,c.tags={...c.tags??{},...this.tags}}),r}catch(r){Cr.error(this.ctx,"Failed to initialize MSFT 1DS reporter",r)}}sendTelemetryEvent(e,r,n){if(!this.client||this.internalOnly&&!this.token?.isInternalUser())return;r={...r,...this.commonProperties};let o=this.qualifyEventName(e);try{this.client.track({name:o,baseData:{name:o,properties:r,measurements:n}})}catch(s){Cr.debug(this.ctx,"Error tracking telemetry event",s)}}sendTelemetryErrorEvent(e,r,n){this.sendTelemetryEvent(this.qualifyEventName(e),r,n)}async dispose(){this.#e.dispose(),await this.client?.unload(!0,void 0,200)}qualifyEventName(e){return e.startsWith(this.namespace)?e:`${this.namespace}/${e}`}async refreshGitHubHandleInCommonProperties(){try{let e=await this.ctx.get(en).getSession();e?.login?this.commonProperties["common.github_handle"]=e.login:delete this.commonProperties["common.github_handle"]}catch(e){Cr.debug(this.ctx,"Error resolving GitHub handle for telemetry",e)}}createXhrOverride(){return{sendPOST:a((e,r)=>{if(typeof e.data!="string")throw new Error(`Telemetry reporter only supports string payloads, received ${typeof e.data}`);let n=e.headers??{};n["Content-Type"]="application/json";let o={method:"POST",headers:n,body:e.data};this.ctx.get(dr).fetch(e.urlString,o).then(s=>s.text().then(c=>{r(s.status,Object.fromEntries(s.headers),c)})).catch(s=>{Cr.debug(this.ctx,"Error sending telemetry",s),r(0,{})})},"sendPOST")}}};function zMi(t){let e={},r=t.get(Vs);e["ai.session.id"]=r.sessionId;let n=t.get(pd);return n.trackingId&&(e["ai.user.id"]=n.trackingId),e["ai.cloud.roleInstance"]="REDACTED",e["ai.device.osVersion"]=`${c1.type()} ${c1.release()}`,e["ai.device.osArchitecture"]=c1.arch(),e["ai.device.osPlatform"]=c1.platform(),e["ai.cloud.role"]="Web",e["ai.application.ver"]=t.get(Vo).getVersion(),e}a(zMi,"getTags");function YMi(t){let e={};e.common_os=c1.platform(),e.common_platformversion=c1.release(),e.common_arch=c1.arch(),e.common_cpu=Array.from(new Set(c1.cpus().map(n=>n.model))).join();let r=t.get(Vs);return e.common_vscodemachineid=r.machineId,e.common_vscodesessionid=r.sessionId,e.client_deviceid=r.devDeviceId,e.common_uikind=r.uiKind,e.common_remotename=r.remoteName,e.common_isnewappinstall="",e}a(YMi,"getCommonProperties");var KMi="7d7048df-6dd0-4048-bb23-b716c1461f8f",JMi="3fdd7f28-937a-48c8-9a21-ba337db23bd1",XMi="f0000000-0000-0000-0000-000000000000",ZMi="b73649cf-ca8f-4768-9e0e-b789d8529db5",e4i="ec712b3202c5462fb6877acae7f1f9d7-c19ad55e-3e3c-4f99-984b-827f6d95bd9e-6917";function EDr(t){return new URL(t).hostname==="github.com"?lq.telemetry:t.replace("://","://copilot-telemetry-service.")}a(EDr,"getEndpointForServerUrl");var Jf=class{constructor(e,r){this.ctx=e;this.namespace=r;this.serverUrl="https://github.com/";this.rootUrl=EDr(this.serverUrl);this.shuttingDown=new Set;Ps(e,n=>{this.cachedToken=n,this.updateServiceEndpoints(n.endpoints)})}static{a(this,"TelemetryInitialization")}get endpointUrl(){return this.overrideEndpointUrlForTesting||new URL("telemetry",this.rootUrl).href}get isInitialized(){return this.initializedWith!==void 0}get isEnabled(){return this._enabled??!1}initialize(e){let r=this.ctx;this._enabled=e;let n=this.endpointUrl;if(!(this.initializedWith?.enabled===this._enabled&&this.initializedWith?.endpointUrl===this.endpointUrl)&&(this.shutdownWithoutWaiting(),this.initializedWith={endpointUrl:n,enabled:this._enabled},e)){let o=r.get(X0);o.setReporter(new pG(r,this.namespace,{instrumentationKey:KMi,endpointUrl:n})),o.setRestrictedReporter(new pG(r,this.namespace,{instrumentationKey:JMi,endpointUrl:n})),o.setFTReporter(new pG(r,this.namespace,{instrumentationKey:XMi,endpointUrl:n,includeAuthorizationHeader:!0})),o.setMsftReporter(new pG(r,`copilot/${this.namespace}`,{instrumentationKey:ZMi,excludeCommonTags:!0,excludeCommonProperties:!0})),o.setMsft1pReporter(new Q4e(r,"ThirdParty.copilot-chat",e4i,!0,this.cachedToken))}}setCustomReporters(e,r){this.shutdownWithoutWaiting();let n=this.ctx.get(X0);n.setReporter(e),n.setRestrictedReporter(r)}async shutdown(){this.shutdownWithoutWaiting(),await Promise.all(this.shuttingDown)}shutdownWithoutWaiting(){this.initializedWith=void 0;let e=this.ctx.get(X0).deactivate().finally(()=>{this.shuttingDown.delete(e)});this.shuttingDown.add(e)}updateSessionConfig(e){e?.serverUrl&&e.serverUrl!==this.serverUrl&&(this.serverUrl=e.serverUrl,this.rootUrl=EDr(e.serverUrl)),this.isInitialized&&this.initialize(this._enabled)}updateServiceEndpoints(e){this.rootUrl=e.telemetry,this.isInitialized&&this.initialize(this._enabled)}};async function t4i(t,e){let r="copilot_internal/subscribe_limited_user";try{return(await(await au(t,e,r,{method:"POST",headers:{"X-GitHub-Api-Version":"2025-05-01"},body:JSON.stringify({restricted_telemetry:t.get(Jf).isEnabled?"enabled":"disabled",public_code_suggestions:"enabled"})})).json()).subscribed}catch(n){return AE.exception(t,n,"signUpLimited failed"),!1}}a(t4i,"apiFetchSignUpLimited");async function q_t(t,e,r){let n=await t.get(Nt).getTokenResult();switch(n.failureKind){case void 0:return"OK";case"HTTP401":case"NotSignedIn":return"NotSignedIn";case"NotAuthorized":return r&&n.canSignUpForLimited&&await t4i(t,e)?q_t(t,e,!1):"NotAuthorized";case"Exception":throw n.exception}}a(q_t,"getTokenWithSignUpLimited");var en=class{constructor(e,r){this.ctx=e;this.env=r}static{a(this,"AuthManager")}hasTransientSession(){return this.transientSession!==void 0}get _copilotTokenManager(){return this.ctx.get(Nt)}getConfiguredUrls(){return this.ctx.get(Fp).getConfiguredUrls()}async checkAndUpdateStatus(e){let r=e?.localChecksOnly??!1,n;return e?.githubAppId!==void 0?n=await this.getPersistedSession(e):n=await this.getSession(),n===void 0?(this._copilotTokenManager.resetToken("session_not_found"),await this._copilotTokenManager.primeToken(),{status:"NotSignedIn"}):r?{status:"MaybeOK",user:n.login}:(e?.forceRefresh&&this._copilotTokenManager.resetToken("force_refresh"),{status:await q_t(this.ctx,n,e?.freshSignIn??!1),user:n.login})}async getSession(){await this.ctx.get(Mc).requireReady();let e=G_t(this.env)??await this.transientSession;if(!(e&&e.accessToken===void 0))return e?{...e,...OA(e)}:await this.getPersistedSession()}setTransientSession(e){this.transientSession=e&&Promise.resolve(e),this._copilotTokenManager.resetToken("set_transient_session")}getAuthAuthority(){return this.ctx.get(Fp).getAuthAuthority()}},q4e=class extends en{static{a(this,"PersistentAuthManager")}get authPersistence(){return this.ctx.get(NN)}normalizeScopes(e){if(e)return typeof e=="string"?e.split(" ").filter(r=>r.length>0):e}async saveAndActivateSession(e){await this.authPersistence.saveAuthRecord(e),this.authPersistence.purgeLegacyAuthRecords().catch(()=>{});let r=!this.hasTransientSession();return await this.checkAndUpdateStatus({forceRefresh:r,freshSignIn:r})}async deleteAndDeactivateAllSessions(){return await this.authPersistence.deleteAllAuthRecords(),this.setTransientSession(void 0),await this.checkAndUpdateStatus({forceRefresh:!0})}async getPersistedSession(e){let r=await this.authPersistence.getAuthRecord({...e,authAuthority:this.getAuthAuthority()});if(r===void 0)return;let n={...this.getConfiguredUrls(),accessToken:r.oauth_token,login:r.user,githubAppId:r.githubAppId,scopes:this.normalizeScopes(r.scopes)};return r.dev_override&&pL(this.ctx)==="dev"&&(n.devOverride={copilotTokenUrl:r.dev_override.copilot_token_url,copilotUserInfoUrl:r.dev_override.copilot_user_info_url,notificationUrl:r.dev_override.notification_url,contentRestrictionsUrl:r.dev_override.content_restrictions_url}),n}};function G_t(t){if(t.GH_COPILOT_TOKEN&&!/=/.test(t.GH_COPILOT_TOKEN))return{...OA({apiUrl:t.GH_COPILOT_API_URL,serverUrl:t.GH_COPILOT_SERVER_URL}),login:"",accessToken:t.GH_COPILOT_TOKEN};if(t.GITHUB_COPILOT_TOKEN)return{...OA({apiUrl:t.GITHUB_COPILOT_API_URL,serverUrl:t.GITHUB_COPILOT_SERVER_URL}),login:"",accessToken:t.GITHUB_COPILOT_TOKEN};if(t.CODESPACES==="true"&&t.GITHUB_TOKEN)return{...OA({apiUrl:t.GITHUB_API_URL,serverUrl:t.GITHUB_SERVER_URL}),login:t.GITHUB_USER||"",accessToken:t.GITHUB_TOKEN}}a(G_t,"getSessionFromEnv");f();var r4i=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"],CDr="Your proxy connection requires a trusted certificate. Please make sure the proxy certificate and any issuers are configured correctly and trusted by your operating system.",vDr="https://gh.io/copilot-network-errors",xE=class{constructor(){this.notifiedErrorCodes=[]}static{a(this,"UserErrorNotifier")}notifyUser(e,r){if(!(r instanceof Error))return;let n=r;n.code&&r4i.includes(n.code)&&!this.didNotifyBefore(n.code)&&(this.notifiedErrorCodes.push(n.code),this.displayCertificateErrorNotification(e,n))}async displayCertificateErrorNotification(e,r){new Se("certificates").error(e,`${CDr} Please visit ${vDr} to learn more. Original cause:`,r);let n={title:"Learn more"};return e.get(dc).showWarningMessage(CDr,n).then(o=>{if(o?.title===n.title)return e.get(Z0).open(vDr)})}didNotifyBefore(e){return this.notifiedErrorCodes.indexOf(e)!==-1}};f();var Bs=class{static{a(this,"StatusReporter")}#e=0;#t="Normal";#n;#r;#i=!0;get busy(){return this.#e>0}withProgress(e){return this.#t==="Warning"&&this.forceNormal(),this.#e++===0&&this.#o(),e().finally(()=>{--this.#e===0&&this.#o()})}forceStatus(e,r,n){this.#t===e&&this.#n===r&&!n&&!this.#r&&!this.#i||(this.#t=e,this.#n=r,this.#r=n,this.#i=!1,this.#o())}forceNormal(){this.#t!=="Inactive"&&this.forceStatus("Normal")}setError(e,r){this.forceStatus("Error",e,r)}setWarning(e){this.#t!=="Error"&&this.forceStatus("Warning",e)}setInactive(e){this.#t==="Error"||this.#t==="Warning"||this.forceStatus("Inactive",e)}clearInactive(){this.#t==="Inactive"&&this.forceStatus("Normal")}#o(){let e={kind:this.#t,message:this.#n,busy:this.busy,command:this.#r};this.didChange(e)}},G4e=class extends Bs{static{a(this,"NoOpStatusReporter")}didChange(){}};f();var wE=class{constructor(){this.resolve=a(()=>{},"resolve");this.reject=a(()=>{},"reject");this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}static{a(this,"Deferred")}};function Wb(t,e=void 0){return new Promise(r=>setTimeout(()=>r(e),t))}a(Wb,"delay");function See(t,e){try{t()?.catch(r=>{try{e?.(r)}catch{}})}catch(r){try{e?.(r)}catch{}}}a(See,"fireAndForget");function Iee(t,e,r){try{return t()}catch(n){try{r?.(n)}catch{}return e}}a(Iee,"safeInit");f();var bDr=de(Dn());var Ri=class extends bDr.Emitter{static{a(this,"Emitter")}get event(){return super.event}};var j_t=class extends $i{constructor(r){super("message"in r?r.message:`${r.failureKind}`);this.result=r}static{a(this,"TokenResultError")}},Nt=class{constructor(e,r=!1){this.ctx=e;this.primed=r;this.lastToken=void 0;this.activeToken=void 0;this.tokenPromise=void 0;this.tokenPrimingError=void 0;this.refreshTimer=void 0;this.didChangeTokenResult=new Ri;this.onDidChangeTokenResult=this.didChangeTokenResult.event;this.didResetToken=new Ri;this.onDidResetToken=this.didResetToken.event}static{a(this,"CopilotTokenManager")}async getGitHubSession(){return await this.ctx.get(en).getSession()}primeToken(){if(this.tokenPrimingError)return Promise.reject(this.tokenPrimingError);this.primed=!0;try{return this.getToken().then(()=>!0,()=>!1)}catch{return Promise.resolve(!1)}}async fetchTokenResult(e){return await this.ctx.get($p).fetchTokenResult(this.ctx,e,this.lastToken)}setToken(e){this.activeToken=this.lastToken=e,this.scheduleProactiveRefresh(e)}scheduleProactiveRefresh(e){this.clearRefreshTimer();let r=e.envelope.refresh_in*1e3;r>0&&r<=2147483647&&(H_t(this.ctx,"scheduled",r),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,!this.tokenPromise&&(H_t(this.ctx,"started",r),this.startTokenRefresh(n=>{H_t(this.ctx,n.copilotToken?"success":"failure",r,n.failureKind??"","exception"in n?n.exception:void 0)}))},r))}clearRefreshTimer(){this.refreshTimer!==void 0&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}startTokenRefresh(e){let r=this.getGitHubSession().then(async n=>n?await this.fetchTokenResult(n):{failureKind:"NotSignedIn"}).catch(n=>{let o=n instanceof Error?n:new Error(String(n));return AE.exception(this.ctx,o,"tokenRefresh"),{failureKind:"Exception",message:String(n),exception:o}}).then(n=>(this.tokenPromise!==r||(this.tokenPromise=void 0,n.copilotToken&&(this.ctx.get(Bs).forceNormal(),this.setToken(n.copilotToken),this.didChangeTokenResult.fire(n)),e?.(n)),n));this.tokenPromise=r}async getTokenResult(){if(!this.primed){let e=new Error("Token requested before initialization");if(H4e(this.ctx))throw this.tokenPrimingError=e,e;AE.exception(this.ctx,e,".getToken")}if(!this.tokenPromise&&(!this.activeToken||this.activeToken?.needsRefresh())){let r=this.getGitHubSession().then(async n=>n?await this.fetchTokenResult(n):{failureKind:"NotSignedIn"}).catch(n=>{if(!(n instanceof Error))throw n;return{failureKind:"Exception",message:String(n),exception:n}}).then(n=>(this.tokenPromise!==r||(this.tokenPromise=void 0,this.handleTokenResult(n)),n));this.tokenPromise=r}return this.activeToken&&!this.activeToken.isExpired()?{copilotToken:this.activeToken}:await this.tokenPromise}handleTokenResult(e){let r=this.ctx.get(Bs);switch(e.failureKind){case"NotSignedIn":r.setError("You are not signed into GitHub.");break;case"HTTP401":r.setError("Your GitHub Copilot session has expired. You have been signed out. Please sign in again to continue using GitHub Copilot.",{command:"github.copilot.signIn",title:"Sign In"});break;case"NotAuthorized":r.setError(e.message);break;case"Exception":r.setWarning(e.message),this.ctx.get(xE).notifyUser(this.ctx,e.exception);break;case void 0:r.forceNormal(),this.setToken(e.copilotToken)}this.didChangeTokenResult.fire(e);let n={result:e.copilotToken?"success":"failure",errorCode:e.failureKind??""};"exception"in e&&e.exception?Sa(this.ctx,"auth.token_reset_complete",e.exception,n):rr(this.ctx,"auth.token_reset_complete",n)}async getToken(){let e=await this.getTokenResult();if(e.copilotToken)return e.copilotToken;throw e.exception?e.exception:new j_t(e)}resetToken(e,r){r!==void 0?(st(this.ctx,"auth.reset_token_"+r),AE.debug(this.ctx,`Resetting copilot token on HTTP error ${r} (caller: ${e})`)):AE.debug(this.ctx,`Resetting copilot token (caller: ${e})`),rr(this.ctx,"auth.token_reset_trigger",{caller:e,httpStatus:r!==void 0?String(r):"",hadActiveToken:String(!!this.activeToken),hadPendingRefresh:String(!!this.tokenPromise)}),!(!this.activeToken&&!this.tokenPromise)&&(this.clearRefreshTimer(),this.activeToken=void 0,this.tokenPromise=void 0,this.didResetToken.fire())}getLastToken(){return this.lastToken}};function j3(t){return t.get(Nt).getLastToken()}a(j3,"getLastCopilotToken");function H_t(t,e,r,n,o){let s={status:e,errorCode:n??""},c={delayMs:r};o?Sa(t,"auth.proactive_copilot_token_refresh",o,s,c):rr(t,"auth.proactive_copilot_token_refresh",s,c)}a(H_t,"telemetryProactiveCopilotTokenRefresh");f();var fP=class{static{a(this,"Clock")}now(){return new Date}};f();var ax=class{static{a(this,"ExpConfigMaker")}},hme=class extends ax{constructor(r={}){super();this.defaultFilters=r}static{a(this,"ExpConfigFromTAS")}async fetchExperiments(r,n,o){let s=r.get(dr),c=Object.keys(o).length===0?this.defaultFilters:o,l=new URL("telemetry",n.telemetry).href,u;try{u=await s.fetch(l,{method:"GET",headers:c,timeout:5e3})}catch(m){return aE.createFallbackConfig(r,`Error fetching ExP config: ${String(m)}`)}if(!u.ok)return aE.createFallbackConfig(r,`ExP responded with ${u.status}`);let d;try{d=await u.json()}catch(m){if(m instanceof SyntaxError)return Lo(r,m,"fetchExperiments"),aE.createFallbackConfig(r,"ExP responded with invalid JSON");throw m}let p=d.Configs.find(m=>m.Id==="vscode")??{Id:"vscode",Parameters:{}},h=Object.entries(p.Parameters).map(([m,g])=>m+(g?"":"cf"));return new aE(p.Parameters,d.AssignmentContext,h.join(";"))}},j4e=class extends ax{static{a(this,"ExpConfigNone")}fetchExperiments(){return Promise.resolve(aE.createEmptyConfig())}};f();f();var $4e=class{constructor(e){this.prefix=e}static{a(this,"GranularityImplementation")}getCurrentAndUpComingValues(e){let r=this.getValue(e),n=this.getUpcomingValues(e);return[r,n]}},$_t=class extends $4e{static{a(this,"ConstantGranularity")}getValue(e){return this.prefix}getUpcomingValues(e){return[]}},TDr=a(t=>new $_t(t),"DEFAULT_GRANULARITY"),V4e=class extends $4e{constructor(r,n=.5,o=new Date().setUTCHours(0,0,0,0)){super(r);this.prefix=r;this.fetchBeforeFactor=n;this.anchor=o}static{a(this,"TimeBucketGranularity")}setTimePeriod(r){isNaN(r)?this.timePeriodLengthMs=void 0:this.timePeriodLengthMs=r}setByCallBuckets(r){isNaN(r)?this.numByCallBuckets=void 0:this.numByCallBuckets=r}getValue(r){return this.prefix+this.getTimePeriodBucketString(r)+(this.numByCallBuckets?this.timeHash(r):"")}getTimePeriodBucketString(r){return this.timePeriodLengthMs?this.dateToTimePartString(r):""}getUpcomingValues(r){let n=[],o=this.getUpcomingTimePeriodBucketStrings(r),s=this.getUpcomingByCallBucketStrings();for(let c of o)for(let l of s)n.push(this.prefix+c+l);return n}getUpcomingTimePeriodBucketStrings(r){if(this.timePeriodLengthMs===void 0)return[""];if((r.getTime()-this.anchor)%this.timePeriodLengthMsr.toString())}timeHash(r){return this.numByCallBuckets==null?0:7883*(r.getTime()%this.numByCallBuckets)%this.numByCallBuckets}dateToTimePartString(r){return this.timePeriodLengthMs==null?"":Math.floor((r.getTime()-this.anchor)/this.timePeriodLengthMs).toString()}};var SDr="X-Copilot-ClientTimeBucket",W4e=class{constructor(e,r){this.specs=new Map;this.prefix=e,this.clock=r,this.defaultGranularity=TDr(e)}static{a(this,"GranularityDirectory")}selectGranularity(e){for(let[r,n]of this.specs.entries())if(e.extends(r))return n;return this.defaultGranularity}update(e,r,n){if(r=r>1?r:NaN,n=n>0?n:NaN,isNaN(r)&&isNaN(n))this.specs.delete(e);else{let o=new V4e(this.prefix);isNaN(r)||o.setByCallBuckets(r),isNaN(n)||o.setTimePeriod(n*3600*1e3),this.specs.set(e,o)}}extendFilters(e){let r=this.selectGranularity(e),[n,o]=r.getCurrentAndUpComingValues(this.clock.now());return{newFilterSettings:e.withChange(SDr,n),otherFilterSettingsToPrefetch:o.map(s=>e.withChange(SDr,s))}}};f();f();f();f();var V_t=new Map;async function i4i(t){if(V_t.has(t))return V_t.get(t);let e=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return V_t.set(t,e),e}a(i4i,"getCachedHmacKey");async function o4i(t){if(t)try{let e=await i4i(t),r=Math.floor(Date.now()/1e3).toString(),n=new TextEncoder().encode(r),o=await crypto.subtle.sign("HMAC",e,n),c=Array.from(new Uint8Array(o)).map(l=>l.toString(16).padStart(2,"0")).join("");return`${r}.${c}`}catch{return}}a(o4i,"createRequestHMAC");async function IDr(t,e){let r=await o4i(t);return r?{"Request-Hmac":r,"Copilot-Integration-Id":e??"jetbrains-chat-dev"}:{}}a(IDr,"createMsBenchHmacHeaders");f();f();f();f();var Y4e="4.13.1",DG="04b07795-8ddb-461a-bbee-02f9e1bf7b46",xDr="common",z4e;(function(t){t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureGovernment="https://login.microsoftonline.us",t.AzurePublicCloud="https://login.microsoftonline.com"})(z4e||(z4e={}));var mme=z4e.AzurePublicCloud,wDr="login.microsoftonline.com",RDr=["*"],PDr="cae",kDr="nocae",DDr="msal.cache";var W_t;var s4i,K4e,MDr;function ODr(){return K4e!==void 0&&MDr!==void 0}a(ODr,"hasVSCodePlugin");function a4i(t){let e={cache:{},broker:{...t.brokerOptions,isEnabled:t.brokerOptions?.enabled??!1,enableMsaPassthrough:t.brokerOptions?.legacyEnableMsaPassthrough??!1}};if(t.tokenCachePersistenceOptions?.enabled){if(W_t===void 0)throw new Error(["Persistent token caching was requested, but no persistence provider was configured.","You must install the identity-cache-persistence plugin package (`npm install --save @azure/identity-cache-persistence`)","and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling","`useIdentityPlugin(cachePersistencePlugin)` before using `tokenCachePersistenceOptions`."].join(" "));let r=t.tokenCachePersistenceOptions.name||DDr;e.cache.cachePlugin=W_t({name:`${r}.${kDr}`,...t.tokenCachePersistenceOptions}),e.cache.cachePluginCae=W_t({name:`${r}.${PDr}`,...t.tokenCachePersistenceOptions})}return t.brokerOptions?.enabled&&(e.broker.nativeBrokerPlugin=l4i(t.isVSCodeCredential||!1)),e}a(a4i,"generatePluginConfiguration");var NDr={missing:a((t,e,r)=>[`${t} was requested, but no plugin was configured or no authentication record was found.`,`You must install the ${e} plugin package (npm install --save ${e})`,"and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling",`useIdentityPlugin(${r}) before using enableBroker.`].join(" "),"missing"),unavailable:a((t,e)=>[`${t} was requested, and the plugin is configured, but the broker is unavailable.`,`Ensure the ${t} plugin is properly installed and configured.`,"Check for missing native dependencies and ensure the package is properly installed.",`See the README for prerequisites on installing and using ${e}.`].join(" "),"unavailable")},c4i={vsCode:{credentialName:"Visual Studio Code Credential",packageName:"@azure/identity-vscode",pluginVar:"vsCodePlugin",get brokerInfo(){return MDr}},native:{credentialName:"Broker for WAM",packageName:"@azure/identity-broker",pluginVar:"nativeBrokerPlugin",get brokerInfo(){return s4i}}};function l4i(t){let{credentialName:e,packageName:r,pluginVar:n,brokerInfo:o}=c4i[t?"vsCode":"native"];if(o===void 0)throw new Error(NDr.missing(e,r,n));if(o.broker.isBrokerAvailable===!1)throw new Error(NDr.unavailable(e,r));return o.broker}a(l4i,"getBrokerPlugin");var BDr={generatePluginConfiguration:a4i};f();f();f();function u4i(t){return t&&typeof t.error=="string"&&typeof t.error_description=="string"}a(u4i,"isErrorResponse");var FDr="CredentialUnavailableError",un=class extends Error{static{a(this,"CredentialUnavailableError")}constructor(e,r){super(e,r),this.name=FDr}},J4e="AuthenticationError",f8=class extends Error{static{a(this,"AuthenticationError")}statusCode;errorResponse;constructor(e,r,n){let o={error:"unknown",errorDescription:"An unknown error occurred and no additional details are available."};if(u4i(r))o=LDr(r);else if(typeof r=="string")try{let s=JSON.parse(r);o=LDr(s)}catch{e===400?o={error:"invalid_request",errorDescription:`The service indicated that the request was invalid. ${r}`}:o={error:"unknown_error",errorDescription:`An unknown error has occurred. Response body: ${r}`}}else o={error:"unknown_error",errorDescription:"An unknown error occurred and no additional details are available."};super(`${o.error} Status code: ${e} More details: -${o.errorDescription},`,n),this.statusCode=e,this.errorResponse=o,this.name=Z4e}},EDr="AggregateAuthenticationError",rge=class extends Error{static{a(this,"AggregateAuthenticationError")}errors;constructor(e,r){let n=e.join(` +${o.errorDescription},`,n),this.statusCode=e,this.errorResponse=o,this.name=J4e}},UDr="AggregateAuthenticationError",gme=class extends Error{static{a(this,"AggregateAuthenticationError")}errors;constructor(e,r){let n=e.join(` `);super(`${r} -${n}`),this.errors=e,this.name=EDr}};function ADr(t){return{error:t.error,errorDescription:t.error_description,correlationId:t.correlation_id,errorCodes:t.error_codes,timestamp:t.timestamp,traceId:t.trace_id}}a(ADr,"convertOAuthErrorResponseToErrorResponse");var sT=class extends Error{static{a(this,"AuthenticationRequiredError")}scopes;getTokenOptions;constructor(e){super(e.message,e.cause?{cause:e.cause}:void 0),this.scopes=e.scopes,this.getTokenOptions=e.getTokenOptions,this.name="AuthenticationRequiredError"}};f();f();f();f();var CDr=require("node:os"),_Dr=de(require("node:util"),1),vDr=de(require("node:process"),1);function bDr(t,...e){vDr.stderr.write(`${_Dr.default.format(t,...e)}${CDr.EOL}`)}a(bDr,"log");var TDr=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,SDr,Q_t=[],q_t=[],eBe=[];TDr&&G_t(TDr);var IDr=Object.assign(t=>xDr(t),{enable:G_t,enabled:H_t,disable:uMi,log:bDr});function G_t(t){SDr=t,Q_t=[],q_t=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?q_t.push(new RegExp(`^${n.substr(1)}$`)):Q_t.push(new RegExp(`^${n}$`));for(let n of eBe)n.enabled=H_t(n.namespace)}a(G_t,"enable");function H_t(t){if(t.endsWith("*"))return!0;for(let e of q_t)if(e.test(t))return!1;for(let e of Q_t)if(e.test(t))return!0;return!1}a(H_t,"enabled");function uMi(){let t=SDr||"";return G_t(""),t}a(uMi,"disable");function xDr(t){let e=Object.assign(r,{enabled:H_t(t),destroy:dMi,log:IDr.log,namespace:t,extend:fMi});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),eBe.push(e),e}a(xDr,"createDebugger");function dMi(){let t=eBe.indexOf(this);return t>=0?(eBe.splice(t,1),!0):!1}a(dMi,"destroy");function fMi(t){let e=xDr(`${this.namespace}:${t}`);return e.log=this.log,e}a(fMi,"extend");var yte=IDr;var RDr=new Set,tBe=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,nBe,j_t=yte("azure");j_t.log=(...t)=>{yte.log(...t)};var $_t=["verbose","info","warning","error"];tBe&&(NDr(tBe)?pMi(tBe):console.error(`AZURE_LOG_LEVEL set to unknown log level '${tBe}'; logging is not enabled. Acceptable values: ${$_t.join(", ")}.`));function pMi(t){if(t&&!NDr(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${$_t.join(",")}`);nBe=t;let e=[];for(let r of RDr)kDr(r)&&e.push(r.namespace);yte.enable(e.join(","))}a(pMi,"setLogLevel");function iBe(){return nBe}a(iBe,"getLogLevel");var wDr={verbose:400,info:300,warning:200,error:100};function k8(t){let e=j_t.extend(t);return PDr(j_t,e),{error:rBe(e,"error"),warning:rBe(e,"warning"),info:rBe(e,"info"),verbose:rBe(e,"verbose")}}a(k8,"createClientLogger");function PDr(t,e){e.log=(...r)=>{t.log(...r)}}a(PDr,"patchLogMethod");function rBe(t,e){let r=Object.assign(t.extend(e),{level:e});if(PDr(t,r),kDr(r)){let n=yte.disable();yte.enable(n+","+r.namespace)}return RDr.add(r),r}a(rBe,"createLogger");function kDr(t){return!!(nBe&&wDr[t.level]<=wDr[nBe])}a(kDr,"shouldEnable");function NDr(t){return $_t.includes(t)}a(NDr,"isAzureLogLevel");var v1=k8("identity");function oBe(t){return t.reduce((e,r)=>(process.env[r]?e.assigned.push(r):e.missing.push(r),e),{missing:[],assigned:[]})}a(oBe,"processEnvVars");function fp(t){return`SUCCESS. Scopes: ${Array.isArray(t)?t.join(", "):t}.`}a(fp,"formatSuccess");function Xo(t,e){let r="ERROR.";return t?.length&&(r+=` Scopes: ${Array.isArray(t)?t.join(", "):t}.`),`${r} Error message: ${typeof e=="string"?e:e.message}.`}a(Xo,"formatError");function DDr(t,e,r=v1){let n=e?`${e.fullTitle} ${t}`:t;function o(u){r.info(`${n} =>`,u)}a(o,"info");function s(u){r.warning(`${n} =>`,u)}a(s,"warning");function c(u){r.verbose(`${n} =>`,u)}a(c,"verbose");function l(u){r.error(`${n} =>`,u)}return a(l,"error"),{title:t,fullTitle:n,info:o,warning:s,verbose:c,error:l}}a(DDr,"credentialLoggerInstance");function Bi(t,e=v1){let r=DDr(t,void 0,e);return{...r,parent:e,getToken:DDr("=> getToken()",r,e)}}a(Bi,"credentialLogger");f();f();f();f();var Ete={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function MDr(t={}){let e=new V_t(t.parentContext);return t.span&&(e=e.setValue(Ete.span,t.span)),t.namespace&&(e=e.setValue(Ete.namespace,t.namespace)),e}a(MDr,"createTracingContext");var V_t=class t{static{a(this,"TracingContextImpl")}constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};f();var ODr=de(W_t(),1),aBe=ODr.state;function hMi(){return{end:a(()=>{},"end"),isRecording:a(()=>!1,"isRecording"),recordException:a(()=>{},"recordException"),setAttribute:a(()=>{},"setAttribute"),setStatus:a(()=>{},"setStatus"),addEvent:a(()=>{},"addEvent")}}a(hMi,"createDefaultTracingSpan");function mMi(){return{createRequestHeaders:a(()=>({}),"createRequestHeaders"),parseTraceparentHeader:a(()=>{},"parseTraceparentHeader"),startSpan:a((t,e)=>({span:hMi(),tracingContext:MDr({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}a(mMi,"createDefaultInstrumenter");function nge(){return aBe.instrumenterImplementation||(aBe.instrumenterImplementation=mMi()),aBe.instrumenterImplementation}a(nge,"getInstrumenter");f();function ige(t){let{namespace:e,packageName:r,packageVersion:n}=t;function o(d,p,h){var m;let g=nge().startSpan(d,Object.assign(Object.assign({},h),{packageName:r,packageVersion:n,tracingContext:(m=p?.tracingOptions)===null||m===void 0?void 0:m.tracingContext})),A=g.tracingContext,y=g.span;A.getValue(Ete.namespace)||(A=A.setValue(Ete.namespace,e)),y.setAttribute("az.namespace",A.getValue(Ete.namespace));let E=Object.assign({},p,{tracingOptions:Object.assign(Object.assign({},p?.tracingOptions),{tracingContext:A})});return{span:y,updatedOptions:E}}a(o,"startSpan");async function s(d,p,h,m){let{span:g,updatedOptions:A}=o(d,p,m);try{let y=await c(A.tracingOptions.tracingContext,()=>Promise.resolve(h(A,g)));return g.setStatus({status:"success"}),y}catch(y){throw g.setStatus({status:"error",error:y}),y}finally{g.end()}}a(s,"withSpan");function c(d,p,...h){return nge().withContext(d,p,...h)}a(c,"withContext");function l(d){return nge().parseTraceparentHeader(d)}a(l,"parseTraceparentHeader");function u(d){return nge().createRequestHeaders(d)}return a(u,"createRequestHeaders"),{startSpan:o,withSpan:s,withContext:c,parseTraceparentHeader:l,createRequestHeaders:u}}a(ige,"createTracingClient");var qa=ige({namespace:"Microsoft.AAD",packageName:"@azure/identity",packageVersion:J4e});var z_t=Bi("ChainedTokenCredential"),oge=class{static{a(this,"ChainedTokenCredential")}_sources=[];constructor(...e){this._sources=e}async getToken(e,r={}){let{token:n}=await this.getTokenInternal(e,r);return n}async getTokenInternal(e,r={}){let n=null,o,s=[];return qa.withSpan("ChainedTokenCredential.getToken",r,async c=>{for(let l=0;l0){let l=new rge(s,"ChainedTokenCredential authentication failed.");throw z_t.getToken.info(Xo(e,l)),l}if(z_t.getToken.info(`Result for ${o.constructor.name}: ${fp(e)}`),n===null)throw new un("Failed to retrieve a valid token");return{token:n,successfulCredential:o}})}};f();f();f();f();var w1={};Ri(w1,{AuthError:()=>Hi,AuthErrorCodes:()=>bte,AuthErrorMessage:()=>K_t,AzureCloudInstance:()=>kM,ClientApplication:()=>Z8,ClientAssertion:()=>UM,ClientAuthError:()=>U8,ClientAuthErrorCodes:()=>Cc,ClientAuthErrorMessage:()=>X_t,ClientConfigurationError:()=>Rte,ClientConfigurationErrorCodes:()=>wte,ClientConfigurationErrorMessage:()=>n1t,ClientCredentialClient:()=>e6,ConfidentialClientApplication:()=>Jte,CryptoProvider:()=>PP,DeviceCodeClient:()=>zte,DistributedCachePlugin:()=>B3e,InteractionRequiredAuthError:()=>S1,InteractionRequiredAuthErrorCodes:()=>kBe,InteractionRequiredAuthErrorMessage:()=>lvt,LogLevel:()=>Zu,Logger:()=>b1,ManagedIdentityApplication:()=>Xte,ManagedIdentitySourceNames:()=>Ni,OnBehalfOfClient:()=>Kte,PromptValue:()=>D8,ProtocolMode:()=>Ng,PublicClientApplication:()=>Yte,ResponseMode:()=>TP,ServerError:()=>XA,TokenCache:()=>Lte,TokenCacheContext:()=>I1,UsernamePasswordClient:()=>Wte,internals:()=>uvt,version:()=>bx});f();var uvt={};Ri(uvt,{Deserializer:()=>LM,Serializer:()=>N8});f();f();var N8=class{static{a(this,"Serializer")}static serializeJSONBlob(e){return JSON.stringify(e)}static serializeAccounts(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,realm:o.realm,local_account_id:o.localAccountId,username:o.username,authority_type:o.authorityType,name:o.name,client_info:o.clientInfo,last_modification_time:o.lastModificationTime,last_modification_app:o.lastModificationApp,tenantProfiles:o.tenantProfiles?.map(s=>JSON.stringify(s))}}),r}static serializeIdTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,realm:o.realm}}),r}static serializeAccessTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,realm:o.realm,target:o.target,cached_at:o.cachedAt,expires_on:o.expiresOn,extended_expires_on:o.extendedExpiresOn,refresh_on:o.refreshOn,key_id:o.keyId,token_type:o.tokenType,requestedClaims:o.requestedClaims,requestedClaimsHash:o.requestedClaimsHash,userAssertionHash:o.userAssertionHash}}),r}static serializeRefreshTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,family_id:o.familyId,target:o.target,realm:o.realm}}),r}static serializeAppMetadata(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={client_id:o.clientId,environment:o.environment,family_id:o.familyId}}),r}static serializeAllCache(e){return{Account:this.serializeAccounts(e.accounts),IdToken:this.serializeIdTokens(e.idTokens),AccessToken:this.serializeAccessTokens(e.accessTokens),RefreshToken:this.serializeRefreshTokens(e.refreshTokens),AppMetadata:this.serializeAppMetadata(e.appMetadata)}}};f();f();f();f();f();f();f();f();f();var pt={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Gi={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,GONE:410,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},BE=[pt.OPENID_SCOPE,pt.PROFILE_SCOPE,pt.OFFLINE_ACCESS_SCOPE],Y_t=[...BE,pt.EMAIL_SCOPE],sl={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"};var LE={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},sH={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},D8={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},cBe={PLAIN:"plain",S256:"S256"},Cte={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"};var TP={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},FE={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},aH={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},Rd={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Zs={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"};var sge="appmetadata",BDr="client_info",IM="1",_te={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},YA={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},pp={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},vs={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},SP={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},age={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},cge={username:"username",password:"password"},cH={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},lBe={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Gc={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"};var vte=300,dm={BASE64:"base64",HEX:"hex",UTF8:"utf-8"};var bte={};Ri(bte,{postRequestFailed:()=>uge,unexpectedError:()=>lge});f();var lge="unexpected_error",uge="post_request_failed";var uBe={[lge]:"Unexpected error in authentication.",[uge]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},K_t={unexpectedError:{code:lge,desc:uBe[lge]},postRequestFailed:{code:uge,desc:uBe[uge]}},Hi=class t extends Error{static{a(this,"AuthError")}constructor(e,r,n){let o=r?`${e}: ${r}`:e;super(o),Object.setPrototypeOf(this,t.prototype),this.errorCode=e||pt.EMPTY_STRING,this.errorMessage=r||pt.EMPTY_STRING,this.subError=n||pt.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}};function J_t(t,e){return new Hi(t,e?`${uBe[t]} ${e}`:uBe[t])}a(J_t,"createAuthError");var Cc={};Ri(Cc,{authTimeNotFound:()=>xM,authorizationCodeMissingFromServerResponse:()=>bH,bindingKeyNotRemoved:()=>_ge,cannotAppendScopeSet:()=>CH,cannotRemoveEmptyScope:()=>EH,clientInfoDecodingError:()=>M8,clientInfoEmptyError:()=>lH,deviceCodeExpired:()=>hge,deviceCodePollingCancelled:()=>pge,deviceCodeUnknownError:()=>mge,emptyInputScopeSet:()=>L8,endSessionEndpointNotSupported:()=>TH,endpointResolutionError:()=>KA,hashNotDeserialized:()=>pH,invalidAssertion:()=>yge,invalidCacheEnvironment:()=>RM,invalidCacheRecord:()=>_H,invalidClientCredential:()=>Ege,invalidState:()=>Cx,keyIdMissing:()=>SH,maxAgeTranspired:()=>gH,methodNotImplemented:()=>Ho,missingTenantIdError:()=>Tge,multipleMatchingAccounts:()=>fge,multipleMatchingAppMetadata:()=>AH,multipleMatchingTokens:()=>dge,nestedAppAuthBridgeDisabled:()=>Sge,networkError:()=>dH,noAccountFound:()=>gge,noAccountInSilentRequest:()=>wM,noCryptoObject:()=>F8,noNetworkConnectivity:()=>vge,nonceMismatch:()=>mH,nullOrEmptyToken:()=>uH,openIdConfigError:()=>fH,requestCannotBeMade:()=>yH,stateMismatch:()=>hH,stateNotFound:()=>B8,tokenClaimsCnfRequiredForSignedJwt:()=>vH,tokenParsingError:()=>O8,tokenRefreshRequired:()=>PM,unexpectedCredentialType:()=>Age,userCanceled:()=>bge,userTimeoutReached:()=>Cge});f();var M8="client_info_decoding_error",lH="client_info_empty_error",O8="token_parsing_error",uH="null_or_empty_token",KA="endpoints_resolution_error",dH="network_error",fH="openid_config_error",pH="hash_not_deserialized",Cx="invalid_state",hH="state_mismatch",B8="state_not_found",mH="nonce_mismatch",xM="auth_time_not_found",gH="max_age_transpired",dge="multiple_matching_tokens",fge="multiple_matching_accounts",AH="multiple_matching_appMetadata",yH="request_cannot_be_made",EH="cannot_remove_empty_scope",CH="cannot_append_scopeset",L8="empty_input_scopeset",pge="device_code_polling_cancelled",hge="device_code_expired",mge="device_code_unknown_error",wM="no_account_in_silent_request",_H="invalid_cache_record",RM="invalid_cache_environment",gge="no_account_found",F8="no_crypto_object",Age="unexpected_credential_type",yge="invalid_assertion",Ege="invalid_client_credential",PM="token_refresh_required",Cge="user_timeout_reached",vH="token_claims_cnf_required_for_signedjwt",bH="authorization_code_missing_from_server_response",_ge="binding_key_not_removed",TH="end_session_endpoint_not_supported",SH="key_id_missing",vge="no_network_connectivity",bge="user_canceled",Tge="missing_tenant_id_error",Ho="method_not_implemented",Sge="nested_app_auth_bridge_disabled";var ji={[M8]:"The client info could not be parsed/decoded correctly",[lH]:"The client info was empty",[O8]:"Token cannot be parsed",[uH]:"The token is null or empty",[KA]:"Endpoints cannot be resolved",[dH]:"Network request failed",[fH]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[pH]:"The hash parameters could not be deserialized",[Cx]:"State was not the expected format",[hH]:"State mismatch error",[B8]:"State not found",[mH]:"Nonce mismatch error",[xM]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[gH]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[dge]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[fge]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[AH]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[yH]:"Token request cannot be made without authorization code or refresh token.",[EH]:"Cannot remove null or empty scope from ScopeSet",[CH]:"Cannot append ScopeSet",[L8]:"Empty input ScopeSet cannot be processed",[pge]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[hge]:"Device code is expired.",[mge]:"Device code stopped polling for unknown reasons.",[wM]:"Please pass an account object, silent flow is not supported without account information",[_H]:"Cache record object was null or undefined.",[RM]:"Invalid environment when attempting to create cache entry",[gge]:"No account found in cache for given key.",[F8]:"No crypto object detected.",[Age]:"Unexpected credential type.",[yge]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Ege]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[PM]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Cge]:"User defined timeout for device code polling reached",[vH]:"Cannot generate a POP jwt if the token_claims are not populated",[bH]:"Server response does not contain an authorization code to proceed",[_ge]:"Could not remove the credential's binding key from storage.",[TH]:"The provided authority does not support logout",[SH]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[vge]:"No network connectivity. Check your internet connection.",[bge]:"User cancelled the flow.",[Tge]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ho]:"This method has not been implemented",[Sge]:"The nested app auth bridge is disabled"},X_t={clientInfoDecodingError:{code:M8,desc:ji[M8]},clientInfoEmptyError:{code:lH,desc:ji[lH]},tokenParsingError:{code:O8,desc:ji[O8]},nullOrEmptyToken:{code:uH,desc:ji[uH]},endpointResolutionError:{code:KA,desc:ji[KA]},networkError:{code:dH,desc:ji[dH]},unableToGetOpenidConfigError:{code:fH,desc:ji[fH]},hashNotDeserialized:{code:pH,desc:ji[pH]},invalidStateError:{code:Cx,desc:ji[Cx]},stateMismatchError:{code:hH,desc:ji[hH]},stateNotFoundError:{code:B8,desc:ji[B8]},nonceMismatchError:{code:mH,desc:ji[mH]},authTimeNotFoundError:{code:xM,desc:ji[xM]},maxAgeTranspired:{code:gH,desc:ji[gH]},multipleMatchingTokens:{code:dge,desc:ji[dge]},multipleMatchingAccounts:{code:fge,desc:ji[fge]},multipleMatchingAppMetadata:{code:AH,desc:ji[AH]},tokenRequestCannotBeMade:{code:yH,desc:ji[yH]},removeEmptyScopeError:{code:EH,desc:ji[EH]},appendScopeSetError:{code:CH,desc:ji[CH]},emptyInputScopeSetError:{code:L8,desc:ji[L8]},DeviceCodePollingCancelled:{code:pge,desc:ji[pge]},DeviceCodeExpired:{code:hge,desc:ji[hge]},DeviceCodeUnknownError:{code:mge,desc:ji[mge]},NoAccountInSilentRequest:{code:wM,desc:ji[wM]},invalidCacheRecord:{code:_H,desc:ji[_H]},invalidCacheEnvironment:{code:RM,desc:ji[RM]},noAccountFound:{code:gge,desc:ji[gge]},noCryptoObj:{code:F8,desc:ji[F8]},unexpectedCredentialType:{code:Age,desc:ji[Age]},invalidAssertion:{code:yge,desc:ji[yge]},invalidClientCredential:{code:Ege,desc:ji[Ege]},tokenRefreshRequired:{code:PM,desc:ji[PM]},userTimeoutReached:{code:Cge,desc:ji[Cge]},tokenClaimsRequired:{code:vH,desc:ji[vH]},noAuthorizationCodeFromServer:{code:bH,desc:ji[bH]},bindingKeyNotRemovedError:{code:_ge,desc:ji[_ge]},logoutNotSupported:{code:TH,desc:ji[TH]},keyIdMissing:{code:SH,desc:ji[SH]},noNetworkConnectivity:{code:vge,desc:ji[vge]},userCanceledError:{code:bge,desc:ji[bge]},missingTenantIdError:{code:Tge,desc:ji[Tge]},nestedAppAuthBridgeDisabled:{code:Sge,desc:ji[Sge]}},U8=class t extends Hi{static{a(this,"ClientAuthError")}constructor(e,r){super(e,r?`${ji[e]}: ${r}`:ji[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype)}};function Rt(t,e){return new U8(t,e)}a(Rt,"createClientAuthError");var Tte={createNewGuid:a(()=>{throw Rt(Ho)},"createNewGuid"),base64Decode:a(()=>{throw Rt(Ho)},"base64Decode"),base64Encode:a(()=>{throw Rt(Ho)},"base64Encode"),base64UrlEncode:a(()=>{throw Rt(Ho)},"base64UrlEncode"),encodeKid:a(()=>{throw Rt(Ho)},"encodeKid"),async getPublicKeyThumbprint(){throw Rt(Ho)},async removeTokenBindingKey(){throw Rt(Ho)},async clearKeystore(){throw Rt(Ho)},async signJwt(){throw Rt(Ho)},async hashString(){throw Rt(Ho)}};f();var Zu;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(Zu||(Zu={}));var b1=class t{static{a(this,"Logger")}constructor(e,r,n){this.level=Zu.Info;let o=a(()=>{},"defaultLoggerCallback"),s=e||t.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||o,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:Zu.Info,this.correlationId=s.correlationId||pt.EMPTY_STRING,this.packageName=r||pt.EMPTY_STRING,this.packageVersion=n||pt.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:Zu.Info}}clone(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)}logMessage(e,r){if(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)return;let s=`${`[${new Date().toUTCString()}] : [${r.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Zu[r.logLevel]} - ${e}`;this.executeCallback(r.logLevel,s,r.containsPii||!1)}executeCallback(e,r,n){this.localCallback&&this.localCallback(e,r,n)}error(e,r){this.logMessage(e,{logLevel:Zu.Error,containsPii:!1,correlationId:r||pt.EMPTY_STRING})}errorPii(e,r){this.logMessage(e,{logLevel:Zu.Error,containsPii:!0,correlationId:r||pt.EMPTY_STRING})}warning(e,r){this.logMessage(e,{logLevel:Zu.Warning,containsPii:!1,correlationId:r||pt.EMPTY_STRING})}warningPii(e,r){this.logMessage(e,{logLevel:Zu.Warning,containsPii:!0,correlationId:r||pt.EMPTY_STRING})}info(e,r){this.logMessage(e,{logLevel:Zu.Info,containsPii:!1,correlationId:r||pt.EMPTY_STRING})}infoPii(e,r){this.logMessage(e,{logLevel:Zu.Info,containsPii:!0,correlationId:r||pt.EMPTY_STRING})}verbose(e,r){this.logMessage(e,{logLevel:Zu.Verbose,containsPii:!1,correlationId:r||pt.EMPTY_STRING})}verbosePii(e,r){this.logMessage(e,{logLevel:Zu.Verbose,containsPii:!0,correlationId:r||pt.EMPTY_STRING})}trace(e,r){this.logMessage(e,{logLevel:Zu.Trace,containsPii:!1,correlationId:r||pt.EMPTY_STRING})}tracePii(e,r){this.logMessage(e,{logLevel:Zu.Trace,containsPii:!0,correlationId:r||pt.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};f();var dBe="@azure/msal-common",Ste="15.8.1";f();var kM={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};f();var hp={};Ri(hp,{createAccessTokenEntity:()=>t1t,createIdTokenEntity:()=>e1t,createRefreshTokenEntity:()=>r1t,generateAppMetadataKey:()=>wMi,generateAuthorityMetadataExpiresAt:()=>hBe,generateCredentialKey:()=>wge,isAccessTokenEntity:()=>yMi,isAppMetadataEntity:()=>RMi,isAuthorityMetadataEntity:()=>PMi,isAuthorityMetadataExpired:()=>mBe,isCredentialEntity:()=>pBe,isIdTokenEntity:()=>EMi,isRefreshTokenEntity:()=>CMi,isServerTelemetryEntity:()=>IMi,isThrottlingEntity:()=>xMi,updateAuthorityEndpointMetadata:()=>xte,updateCloudDiscoveryMetadata:()=>Rge});f();var fBe={};Ri(fBe,{checkMaxAge:()=>Ige,extractTokenClaims:()=>NM,getJWSPayload:()=>LDr});f();function NM(t,e){let r=LDr(t);try{let n=e(r);return JSON.parse(n)}catch{throw Rt(O8)}}a(NM,"extractTokenClaims");function LDr(t){if(!t)throw Rt(uH);let r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!r||r.length<4)throw Rt(O8);return r[2]}a(LDr,"getJWSPayload");function Ige(t,e){if(e===0||Date.now()-3e5>t+e)throw Rt(gH)}a(Ige,"checkMaxAge");var Hl={};Ri(Hl,{delay:()=>AMi,isTokenExpired:()=>Ite,nowSeconds:()=>T1,toDateFromSeconds:()=>xge,toSecondsFromDate:()=>gMi,wasClockTurnedBack:()=>Z_t});f();function T1(){return Math.round(new Date().getTime()/1e3)}a(T1,"nowSeconds");function gMi(t){return t.getTime()/1e3}a(gMi,"toSecondsFromDate");function xge(t){return t?new Date(Number(t)*1e3):new Date}a(xge,"toDateFromSeconds");function Ite(t,e){let r=Number(t)||0;return T1()+e>r}a(Ite,"isTokenExpired");function Z_t(t){return Number(t)>T1()}a(Z_t,"wasClockTurnedBack");function AMi(t,e){return new Promise(r=>setTimeout(()=>r(e),t))}a(AMi,"delay");function wge(t){return[_Mi(t),vMi(t),bMi(t),TMi(t),SMi(t)].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}a(wge,"generateCredentialKey");function e1t(t,e,r,n,o){return{credentialType:Zs.ID_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r,realm:o}}a(e1t,"createIdTokenEntity");function t1t(t,e,r,n,o,s,c,l,u,d,p,h,m,g,A){let y={homeAccountId:t,credentialType:Zs.ACCESS_TOKEN,secret:r,cachedAt:T1().toString(),expiresOn:c.toString(),extendedExpiresOn:l.toString(),environment:e,clientId:n,realm:o,target:s,tokenType:p||vs.BEARER};if(h&&(y.userAssertionHash=h),d&&(y.refreshOn=d.toString()),g&&(y.requestedClaims=g,y.requestedClaimsHash=A),y.tokenType?.toLowerCase()!==vs.BEARER.toLowerCase())switch(y.credentialType=Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case vs.POP:let E=NM(r,u);if(!E?.cnf?.kid)throw Rt(vH);y.keyId=E.cnf.kid;break;case vs.SSH:y.keyId=m}return y}a(t1t,"createAccessTokenEntity");function r1t(t,e,r,n,o,s,c){let l={credentialType:Zs.REFRESH_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r};return s&&(l.userAssertionHash=s),o&&(l.familyId=o),c&&(l.expiresOn=c.toString()),l}a(r1t,"createRefreshTokenEntity");function pBe(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}a(pBe,"isCredentialEntity");function yMi(t){return t?pBe(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===Zs.ACCESS_TOKEN||t.credentialType===Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}a(yMi,"isAccessTokenEntity");function EMi(t){return t?pBe(t)&&t.hasOwnProperty("realm")&&t.credentialType===Zs.ID_TOKEN:!1}a(EMi,"isIdTokenEntity");function CMi(t){return t?pBe(t)&&t.credentialType===Zs.REFRESH_TOKEN:!1}a(CMi,"isRefreshTokenEntity");function _Mi(t){return[t.homeAccountId,t.environment].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}a(_Mi,"generateAccountId");function vMi(t){let e=t.credentialType===Zs.REFRESH_TOKEN&&t.familyId||t.clientId;return[t.credentialType,e,t.realm||""].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}a(vMi,"generateCredentialId");function bMi(t){return(t.target||"").toLowerCase()}a(bMi,"generateTarget");function TMi(t){return(t.requestedClaimsHash||"").toLowerCase()}a(TMi,"generateClaimsHash");function SMi(t){return t.tokenType&&t.tokenType.toLowerCase()!==vs.BEARER.toLowerCase()?t.tokenType.toLowerCase():""}a(SMi,"generateScheme");function IMi(t,e){let r=t.indexOf(pp.CACHE_KEY)===0,n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),r&&n}a(IMi,"isServerTelemetryEntity");function xMi(t,e){let r=!1;t&&(r=t.indexOf(SP.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),r&&n}a(xMi,"isThrottlingEntity");function wMi({environment:t,clientId:e}){return[sge,t,e].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}a(wMi,"generateAppMetadataKey");function RMi(t,e){return e?t.indexOf(sge)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}a(RMi,"isAppMetadataEntity");function PMi(t,e){return e?t.indexOf(_te.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}a(PMi,"isAuthorityMetadataEntity");function hBe(){return T1()+_te.REFRESH_TIME_SECONDS}a(hBe,"generateAuthorityMetadataExpiresAt");function xte(t,e,r){t.authorization_endpoint=e.authorization_endpoint,t.token_endpoint=e.token_endpoint,t.end_session_endpoint=e.end_session_endpoint,t.issuer=e.issuer,t.endpointsFromNetwork=r,t.jwks_uri=e.jwks_uri}a(xte,"updateAuthorityEndpointMetadata");function Rge(t,e,r){t.aliases=e.aliases,t.preferred_cache=e.preferred_cache,t.preferred_network=e.preferred_network,t.aliasesFromNetwork=r}a(Rge,"updateCloudDiscoveryMetadata");function mBe(t){return t.expiresAt<=T1()}a(mBe,"isAuthorityMetadataExpired");f();f();var wte={};Ri(wte,{authorityMismatch:()=>Lge,authorityUriInsecure:()=>xH,cannotAllowPlatformBroker:()=>Bge,cannotSetOIDCOptions:()=>Oge,claimsRequestParsingError:()=>Pge,emptyInputScopesError:()=>RH,invalidAuthenticationHeader:()=>Mge,invalidAuthorityMetadata:()=>DH,invalidClaims:()=>Q8,invalidCloudDiscoveryMetadata:()=>q8,invalidCodeChallengeMethod:()=>kge,logoutRequestEmpty:()=>kH,missingNonceAuthenticationHeader:()=>Dge,missingSshJwk:()=>DM,missingSshKid:()=>Nge,pkceParamsMissing:()=>NH,redirectUriEmpty:()=>IH,tokenRequestEmpty:()=>PH,untrustedAuthority:()=>MH,urlEmptyError:()=>wH,urlParseError:()=>IP});f();var IH="redirect_uri_empty",Pge="claims_request_parsing_error",xH="authority_uri_insecure",IP="url_parse_error",wH="empty_url_error",RH="empty_input_scopes_error",Q8="invalid_claims",PH="token_request_empty",kH="logout_request_empty",kge="invalid_code_challenge_method",NH="pkce_params_missing",q8="invalid_cloud_discovery_metadata",DH="invalid_authority_metadata",MH="untrusted_authority",DM="missing_ssh_jwk",Nge="missing_ssh_kid",Dge="missing_nonce_authentication_header",Mge="invalid_authentication_header",Oge="cannot_set_OIDCOptions",Bge="cannot_allow_platform_broker",Lge="authority_mismatch";var Pd={[IH]:"A redirect URI is required for all calls, and none has been set.",[Pge]:"Could not parse the given claims request object.",[xH]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[IP]:"URL could not be parsed into appropriate segments.",[wH]:"URL was empty or null.",[RH]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Q8]:"Given claims parameter must be a stringified JSON object.",[PH]:"Token request was empty and not found in cache.",[kH]:"The logout request was null or undefined.",[kge]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[NH]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[q8]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[DH]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[MH]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[DM]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Nge]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Dge]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Mge]:"Invalid authentication header provided",[Oge]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Bge]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[Lge]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."},n1t={redirectUriNotSet:{code:IH,desc:Pd[IH]},claimsRequestParsingError:{code:Pge,desc:Pd[Pge]},authorityUriInsecure:{code:xH,desc:Pd[xH]},urlParseError:{code:IP,desc:Pd[IP]},urlEmptyError:{code:wH,desc:Pd[wH]},emptyScopesError:{code:RH,desc:Pd[RH]},invalidClaimsRequest:{code:Q8,desc:Pd[Q8]},tokenRequestEmptyError:{code:PH,desc:Pd[PH]},logoutRequestEmptyError:{code:kH,desc:Pd[kH]},invalidCodeChallengeMethod:{code:kge,desc:Pd[kge]},invalidCodeChallengeParams:{code:NH,desc:Pd[NH]},invalidCloudDiscoveryMetadata:{code:q8,desc:Pd[q8]},invalidAuthorityMetadata:{code:DH,desc:Pd[DH]},untrustedAuthority:{code:MH,desc:Pd[MH]},missingSshJwk:{code:DM,desc:Pd[DM]},missingSshKid:{code:Nge,desc:Pd[Nge]},missingNonceAuthenticationHeader:{code:Dge,desc:Pd[Dge]},invalidAuthenticationHeader:{code:Mge,desc:Pd[Mge]},cannotSetOIDCOptions:{code:Oge,desc:Pd[Oge]},cannotAllowPlatformBroker:{code:Bge,desc:Pd[Bge]},authorityMismatch:{code:Lge,desc:Pd[Lge]}},Rte=class t extends Hi{static{a(this,"ClientConfigurationError")}constructor(e){super(e,Pd[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype)}};function _c(t){return new Rte(t)}a(_c,"createClientConfigurationError");f();var Tu=class{static{a(this,"StringUtils")}static isEmptyObj(e){if(e)try{let r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0}static startsWith(e,r){return e.indexOf(r)===0}static endsWith(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length}static queryStringToObject(e){let r={},n=e.split("&"),o=a(s=>decodeURIComponent(s.replace(/\+/g," ")),"decode");return n.forEach(s=>{if(s.trim()){let[c,l]=s.split(/=(.+)/g,2);c&&l&&(r[o(c)]=o(l))}}),r}static trimArrayEntries(e){return e.map(r=>r.trim())}static removeEmptyStringsFromArray(e){return e.filter(r=>!!r)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,r){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(r)}};var o0=class t{static{a(this,"ScopeSet")}constructor(e){let r=e?Tu.trimArrayEntries([...e]):[],n=r?Tu.removeEmptyStringsFromArray(r):[];if(!n||!n.length)throw _c(RH);this.scopes=new Set,n.forEach(o=>this.scopes.add(o))}static fromString(e){let n=(e||pt.EMPTY_STRING).split(" ");return new t(n)}static createSearchScopes(e){let r=new t(e);return r.containsOnlyOIDCScopes()?r.removeScope(pt.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}containsScope(e){let r=this.printScopesLowerCase().split(" "),n=new t(r);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(r=>this.containsScope(r))}containsOnlyOIDCScopes(){let e=0;return Y_t.forEach(r=>{this.containsScope(r)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(r=>this.appendScope(r))}catch{throw Rt(CH)}}removeScope(e){if(!e)throw Rt(EH);this.scopes.delete(e.trim())}removeOIDCScopes(){Y_t.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Rt(L8);let r=new Set;return e.scopes.forEach(n=>r.add(n.toLowerCase())),this.scopes.forEach(n=>r.add(n.toLowerCase())),r}intersectingScopeSets(e){if(!e)throw Rt(L8);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();let r=this.unionScopeSets(e),n=e.getScopeCount(),o=this.getScopeCount();return r.sizee.push(r)),e}printScopes(){return this.scopes?this.asArray().join(" "):pt.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}};f();f();function Pte(t,e){if(!t)throw Rt(lH);try{let r=e(t);return JSON.parse(r)}catch{throw Rt(M8)}}a(Pte,"buildClientInfo");function xP(t){if(!t)throw Rt(M8);let e=t.split(Rd.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?pt.EMPTY_STRING:e[1]}}a(xP,"buildClientInfoFromHomeAccountId");f();function FDr(t,e){return!!t&&!!e&&t===e.split(".")[1]}a(FDr,"tenantIdMatchesHomeTenant");function Fge(t,e,r,n){if(n){let{oid:o,sub:s,tid:c,name:l,tfp:u,acr:d}=n,p=c||u||d||"";return{tenantId:p,localAccountId:o||s||"",name:l,isHomeTenant:FDr(p,t)}}else return{tenantId:r,localAccountId:e,isHomeTenant:FDr(r,t)}}a(Fge,"buildTenantProfile");function gBe(t,e,r,n){let o=t;if(e){let{isHomeTenant:s,...c}=e;o={...t,...c}}if(r){let{isHomeTenant:s,...c}=Fge(t.homeAccountId,t.localAccountId,t.tenantId,r);return o={...o,...c,idTokenClaims:r,idToken:n},o}return o}a(gBe,"updateAccountTenantProfileData");f();var aT={Default:0,Adfs:1,Dsts:2,Ciam:3};f();function ABe(t){return t&&(t.tid||t.tfp||t.acr)||null}a(ABe,"getTenantIdFromIdTokenClaims");f();var Ng={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"};var fm=class t{static{a(this,"AccountEntity")}generateAccountId(){return[this.homeAccountId,this.environment].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){let r=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",r||e.tenantId||""].join(Rd.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,r,n){let o=new t;r.authorityType===aT.Adfs?o.authorityType=aH.ADFS_ACCOUNT_TYPE:r.protocolMode===Ng.OIDC?o.authorityType=aH.GENERIC_ACCOUNT_TYPE:o.authorityType=aH.MSSTS_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=Pte(e.clientInfo,n)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;let c=e.environment||r&&r.getPreferredCache();if(!c)throw Rt(RM);o.environment=c,o.realm=s?.utid||ABe(e.idTokenClaims)||"",o.localAccountId=s?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";let l=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,u=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=l||u||"",o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{let d=Fge(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[d]}return o}static createFromAccountInfo(e,r,n){let o=new t;return o.authorityType=e.authorityType||aH.GENERIC_ACCOUNT_TYPE,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.cloudGraphHostName=r,o.msGraphHost=n,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,r,n,o,s){if(!(r===aT.Adfs||r===aT.Dsts)){if(e)try{let c=Pte(e,o.base64Decode);if(c.uid&&c.utid)return`${c.uid}.${c.utid}`}catch{}n.warning("No client info in response")}return s?.sub||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,r,n){if(!e||!r)return!1;let o=!0;if(n){let s=e.idTokenClaims||{},c=r.idTokenClaims||{};o=s.iat===c.iat&&s.nonce===c.nonce}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&o}};f();f();var pm={};Ri(pm,{getDeserializedResponse:()=>i1t,mapToQueryString:()=>wP,stripLeadingHashOrQuery:()=>UDr});f();function UDr(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}a(UDr,"stripLeadingHashOrQuery");function i1t(t){if(!t||t.indexOf("=")<0)return null;try{let e=UDr(t),r=Object.fromEntries(new URLSearchParams(e));if(r.code||r.ear_jwe||r.error||r.error_description||r.state)return r}catch{throw Rt(pH)}return null}a(i1t,"getDeserializedResponse");function wP(t,e=!0,r){let n=new Array;return t.forEach((o,s)=>{!e&&r&&s in r?n.push(`${s}=${o}`):n.push(`${s}=${encodeURIComponent(o)}`)}),n.join("&")}a(wP,"mapToQueryString");var jo=class t{static{a(this,"UrlString")}get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw _c(wH);e.includes("#")||(this._urlString=t.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let r=e.toLowerCase();return Tu.endsWith(r,"?")?r=r.slice(0,-1):Tu.endsWith(r,"?/")&&(r=r.slice(0,-2)),Tu.endsWith(r,"/")||(r+="/"),r}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw _c(IP)}if(!e.HostNameAndPort||!e.PathSegments)throw _c(IP);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw _c(xH)}static appendQueryString(e,r){return r?e.indexOf("?")<0?`${e}?${r}`:`${e}&${r}`:e}static removeHashFromUrl(e){return t.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){let r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===LE.COMMON||n[0]===LE.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)}getUrlComponents(){let e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw _c(IP);let n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},o=n.AbsolutePath.split("/");return o=o.filter(s=>s&&s.length>0),n.PathSegments=o,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){let r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw _c(IP);return n[2]}static getAbsoluteUrl(e,r){if(e[0]===pt.FORWARD_SLASH){let o=new t(r).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!i1t(e)}};var qDr={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},o1t=qDr.endpointMetadata,s1t=qDr.instanceDiscoveryMetadata,a1t=new Set;s1t.metadata.forEach(t=>{t.aliases.forEach(e=>{a1t.add(e)})});function GDr(t,e){let r,n=t.canonicalAuthority;if(n){let o=new jo(n).getUrlComponents().HostNameAndPort;r=QDr(o,t.cloudDiscoveryMetadata?.metadata,YA.CONFIG,e)||QDr(o,s1t.metadata,YA.HARDCODED_VALUES,e)||t.knownAuthorities}return r||[]}a(GDr,"getAliasesFromStaticSources");function QDr(t,e,r,n){if(n?.trace(`getAliasesFromMetadata called with source: ${r}`),t&&e){let o=Uge(e,t);if(o)return n?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),o.aliases;n?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}a(QDr,"getAliasesFromMetadata");function HDr(t){return Uge(s1t.metadata,t)}a(HDr,"getCloudDiscoveryMetadataFromHardcodedValues");function Uge(t,e){for(let r=0;r1?n.sort(s=>s.idTokenClaims?-1:1)[0]:n.length===1?n[0]:null}getBaseAccountInfo(e,r){let n=this.getAccountsFilteredBy(e,r);return n.length>0?n[0].getAccountInfo():null}buildTenantProfiles(e,r,n){return e.flatMap(o=>this.getTenantProfilesFromAccountEntity(o,r,n?.tenantId,n))}getTenantedAccountInfoByFilter(e,r,n,o,s){let c=null,l;if(s&&!this.tenantProfileMatchesFilter(n,s))return null;let u=this.getIdToken(e,o,r,n.tenantId);return u&&(l=NM(u.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,s))?null:(c=gBe(e,n,l,u?.secret),c)}getTenantProfilesFromAccountEntity(e,r,n,o){let s=e.getAccountInfo(),c=s.tenantProfiles||new Map,l=this.getTokenKeys();if(n){let d=c.get(n);if(d)c=new Map([[n,d]]);else return[]}let u=[];return c.forEach(d=>{let p=this.getTenantedAccountInfoByFilter(s,l,d,r,o);p&&u.push(p)}),u}tenantProfileMatchesFilter(e,r){return!(r.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,r.localAccountId)||r.name&&e.name!==r.name||r.isHomeTenant!==void 0&&e.isHomeTenant!==r.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,r){return!(r&&(r.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,r.localAccountId)||r.loginHint&&!this.matchLoginHintFromTokenClaims(e,r.loginHint)||r.username&&!this.matchUsername(e.preferred_username,r.username)||r.name&&!this.matchName(e,r.name)||r.sid&&!this.matchSid(e,r.sid)))}async saveCacheRecord(e,r,n){if(!e)throw Rt(_H);try{e.account&&await this.setAccount(e.account,r),e.idToken&&n?.idToken!==!1&&await this.setIdTokenCredential(e.idToken,r),e.accessToken&&n?.accessToken!==!1&&await this.saveAccessToken(e.accessToken,r),e.refreshToken&&n?.refreshToken!==!1&&await this.setRefreshTokenCredential(e.refreshToken,r),e.appMetadata&&this.setAppMetadata(e.appMetadata,r)}catch(o){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),o instanceof Hi?o:jDr(o)}}async saveAccessToken(e,r){let n={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),s=o0.fromString(e.target);o.accessToken.forEach(c=>{if(!this.accessTokenKeyMatchesFilter(c,n,!1))return;let l=this.getAccessTokenCredential(c,r);l&&this.credentialMatchesFilter(l,n)&&o0.fromString(l.target).intersectingScopeSets(s)&&this.removeAccessToken(c,r)}),await this.setAccessTokenCredential(e,r)}getAccountsFilteredBy(e,r){let n=this.getAccountKeys(),o=[];return n.forEach(s=>{if(!this.isAccountKey(s,e.homeAccountId))return;let c=this.getAccount(s,r);if(!c||e.homeAccountId&&!this.matchHomeAccountId(c,e.homeAccountId)||e.username&&!this.matchUsername(c.username,e.username)||e.environment&&!this.matchEnvironment(c,e.environment)||e.realm&&!this.matchRealm(c,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(c,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(c,e.authorityType))return;let l={localAccountId:e?.localAccountId,name:e?.name},u=c.tenantProfiles?.filter(d=>this.tenantProfileMatchesFilter(d,l));u&&u.length===0||o.push(c)}),o}isAccountKey(e,r,n){return!(e.split(Rd.CACHE_KEY_SEPARATOR).length<3||r&&!e.toLowerCase().includes(r.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(Rd.CACHE_KEY_SEPARATOR).length<6)return!1;let r=e.toLowerCase();if(r.indexOf(Zs.ID_TOKEN.toLowerCase())===-1&&r.indexOf(Zs.ACCESS_TOKEN.toLowerCase())===-1&&r.indexOf(Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&r.indexOf(Zs.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(r.indexOf(Zs.REFRESH_TOKEN.toLowerCase())>-1){let n=`${Zs.REFRESH_TOKEN}${Rd.CACHE_KEY_SEPARATOR}${this.clientId}${Rd.CACHE_KEY_SEPARATOR}`,o=`${Zs.REFRESH_TOKEN}${Rd.CACHE_KEY_SEPARATOR}${IM}${Rd.CACHE_KEY_SEPARATOR}`;if(r.indexOf(n.toLowerCase())===-1&&r.indexOf(o.toLowerCase())===-1)return!1}else if(r.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,r){return!(r.clientId&&!this.matchClientId(e,r.clientId)||r.userAssertionHash&&!this.matchUserAssertionHash(e,r.userAssertionHash)||typeof r.homeAccountId=="string"&&!this.matchHomeAccountId(e,r.homeAccountId)||r.environment&&!this.matchEnvironment(e,r.environment)||r.realm&&!this.matchRealm(e,r.realm)||r.credentialType&&!this.matchCredentialType(e,r.credentialType)||r.familyId&&!this.matchFamilyId(e,r.familyId)||r.target&&!this.matchTarget(e,r.target)||(r.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==r.requestedClaimsHash||e.credentialType===Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(r.tokenType&&!this.matchTokenType(e,r.tokenType)||r.tokenType===vs.SSH&&r.keyId&&!this.matchKeyId(e,r.keyId)))}getAppMetadataFilteredBy(e){let r=this.getKeys(),n={};return r.forEach(o=>{if(!this.isAppMetadata(o))return;let s=this.getAppMetadata(o);s&&(e.environment&&!this.matchEnvironment(s,e.environment)||e.clientId&&!this.matchClientId(s,e.clientId)||(n[o]=s))}),n}getAuthorityMetadataByAlias(e){let r=this.getAuthorityMetadataKeys(),n=null;return r.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;let s=this.getAuthorityMetadata(o);s&&s.aliases.indexOf(e)!==-1&&(n=s)}),n}removeAllAccounts(e){this.getAccountKeys().forEach(n=>{this.removeAccount(n,e)})}removeAccount(e,r){let n=this.getAccount(e,r);n&&(this.removeAccountContext(n,r),this.removeItem(e,r))}removeAccountContext(e,r){let n=this.getTokenKeys(),o=e.generateAccountId();n.idToken.forEach(s=>{s.indexOf(o)===0&&this.removeIdToken(s,r)}),n.accessToken.forEach(s=>{s.indexOf(o)===0&&this.removeAccessToken(s,r)}),n.refreshToken.forEach(s=>{s.indexOf(o)===0&&this.removeRefreshToken(s,r)})}removeAccessToken(e,r){let n=this.getAccessTokenCredential(e,r);if(this.removeItem(e,r),this.performanceClient.incrementFields({accessTokensRemoved:1},r),!n||n.credentialType.toLowerCase()!==Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||n.tokenType!==vs.POP)return;let o=n.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,r),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},r)})}removeAppMetadata(e){return this.getKeys().forEach(n=>{this.isAppMetadata(n)&&this.removeItem(n,e)}),!0}readAccountFromCache(e,r){let n=fm.generateAccountCacheKey(e);return this.getAccount(n,r)}getIdToken(e,r,n,o,s){this.commonLogger.trace("CacheManager - getIdToken called");let c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Zs.ID_TOKEN,clientId:this.clientId,realm:o},l=this.getIdTokensByFilter(c,r,n),u=l.size;if(u<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(u>1){let d=l;if(!o){let p=new Map;l.forEach((m,g)=>{m.realm===e.tenantId&&p.set(g,m)});let h=p.size;if(h<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),l.values().next().value;if(h===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),p.values().next().value;d=p}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),d.forEach((p,h)=>{this.removeIdToken(h,r)}),s&&r&&s.addFields({multiMatchedID:l.size},r),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),l.values().next().value}getIdTokensByFilter(e,r,n){let o=n&&n.idToken||this.getTokenKeys().idToken,s=new Map;return o.forEach(c=>{if(!this.idTokenKeyMatchesFilter(c,{clientId:this.clientId,...e}))return;let l=this.getIdTokenCredential(c,r);l&&this.credentialMatchesFilter(l,e)&&s.set(c,l)}),s}idTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return!(r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}removeIdToken(e,r){this.removeItem(e,r)}removeRefreshToken(e,r){this.removeItem(e,r)}getAccessToken(e,r,n,o){let s=r.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",s);let c=o0.createSearchScopes(r.scopes),l=r.authenticationScheme||vs.BEARER,u=l&&l.toLowerCase()!==vs.BEARER.toLowerCase()?Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME:Zs.ACCESS_TOKEN,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:u,clientId:this.clientId,realm:o||e.tenantId,target:c,tokenType:l,keyId:r.sshKid,requestedClaimsHash:r.requestedClaimsHash},p=n&&n.accessToken||this.getTokenKeys().accessToken,h=[];p.forEach(g=>{if(this.accessTokenKeyMatchesFilter(g,d,!0)){let A=this.getAccessTokenCredential(g,s);A&&this.credentialMatchesFilter(A,d)&&h.push(A)}});let m=h.length;return m<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",s),null):m>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",s),h.forEach(g=>{this.removeAccessToken(wge(g),s)}),this.performanceClient.addFields({multiMatchedAT:h.length},s),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",s),h[0])}accessTokenKeyMatchesFilter(e,r,n){let o=e.toLowerCase();if(r.clientId&&o.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&o.indexOf(r.homeAccountId.toLowerCase())===-1||r.realm&&o.indexOf(r.realm.toLowerCase())===-1||r.requestedClaimsHash&&o.indexOf(r.requestedClaimsHash.toLowerCase())===-1)return!1;if(r.target){let s=r.target.asArray();for(let c=0;c{if(!this.accessTokenKeyMatchesFilter(s,e,!0))return;let c=this.getAccessTokenCredential(s,r);c&&this.credentialMatchesFilter(c,e)&&o.push(c)}),o}getRefreshToken(e,r,n,o,s){this.commonLogger.trace("CacheManager - getRefreshToken called");let c=r?IM:void 0,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Zs.REFRESH_TOKEN,clientId:this.clientId,familyId:c},u=o&&o.refreshToken||this.getTokenKeys().refreshToken,d=[];u.forEach(h=>{if(this.refreshTokenKeyMatchesFilter(h,l)){let m=this.getRefreshTokenCredential(h,n);m&&this.credentialMatchesFilter(m,l)&&d.push(m)}});let p=d.length;return p<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(p>1&&s&&n&&s.addFields({multiMatchedRT:p},n),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),d[0])}refreshTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return!(r.familyId&&n.indexOf(r.familyId.toLowerCase())===-1||!r.familyId&&r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){let r={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(r),o=Object.keys(n).map(c=>n[c]),s=o.length;if(s<1)return null;if(s>1)throw Rt(AH);return o[0]}isAppMetadataFOCI(e){let r=this.readAppMetadataFromCache(e);return!!(r&&r.familyId===IM)}matchHomeAccountId(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,r){let n=e.oid||e.sub;return r===n}matchLocalAccountIdFromTenantProfile(e,r){return e.localAccountId===r}matchName(e,r){return r.toLowerCase()===e.name?.toLowerCase()}matchUsername(e,r){return!!(e&&typeof e=="string"&&r?.toLowerCase()===e.toLowerCase())}matchUserAssertionHash(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)}matchEnvironment(e,r){if(this.staticAuthorityOptions){let o=GDr(this.staticAuthorityOptions,this.commonLogger);if(o.includes(r)&&o.includes(e.environment))return!0}let n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,r){return!!(e.clientId&&r===e.clientId)}matchFamilyId(e,r){return!!(e.familyId&&r===e.familyId)}matchRealm(e,r){return e.realm?.toLowerCase()===r.toLowerCase()}matchNativeAccountId(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,r){return e.login_hint===r||e.preferred_username===r||e.upn===r}matchSid(e,r){return e.sid===r}matchAuthorityType(e,r){return!!(e.authorityType&&r.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,r){return e.credentialType!==Zs.ACCESS_TOKEN&&e.credentialType!==Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:o0.fromString(e.target).containsScopeSet(r)}matchTokenType(e,r){return!!(e.tokenType&&e.tokenType===r)}matchKeyId(e,r){return!!(e.keyId&&e.keyId===r)}isAppMetadata(e){return e.indexOf(sge)!==-1}isAuthorityMetadata(e){return e.indexOf(_te.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${_te.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,r){for(let n in r)e[n]=r[n];return e}},qge=class extends G8{static{a(this,"DefaultStorageClass")}async setAccount(){throw Rt(Ho)}getAccount(){throw Rt(Ho)}async setIdTokenCredential(){throw Rt(Ho)}getIdTokenCredential(){throw Rt(Ho)}async setAccessTokenCredential(){throw Rt(Ho)}getAccessTokenCredential(){throw Rt(Ho)}async setRefreshTokenCredential(){throw Rt(Ho)}getRefreshTokenCredential(){throw Rt(Ho)}setAppMetadata(){throw Rt(Ho)}getAppMetadata(){throw Rt(Ho)}setServerTelemetry(){throw Rt(Ho)}getServerTelemetry(){throw Rt(Ho)}setAuthorityMetadata(){throw Rt(Ho)}getAuthorityMetadata(){throw Rt(Ho)}getAuthorityMetadataKeys(){throw Rt(Ho)}setThrottlingCache(){throw Rt(Ho)}getThrottlingCache(){throw Rt(Ho)}removeItem(){throw Rt(Ho)}getKeys(){throw Rt(Ho)}getAccountKeys(){throw Rt(Ho)}getTokenKeys(){throw Rt(Ho)}};f();f();var it={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",InitializeCache:"initializeCache",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",GetAuthCodeUrl:"getAuthCodeUrl",GetStandardParams:"getStandardParams",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",HandleResponseEar:"handleResponseEar",HandleResponsePlatformBroker:"handleResponsePlatformBroker",HandleResponseCode:"handleResponseCode",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",ImportExistingCache:"importExistingCache",SetUserData:"setUserData",LocalStorageUpdated:"localStorageUpdated",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues",GenerateHKDF:"generateHKDF",GenerateBaseKey:"generateBaseKey",Base64Decode:"base64Decode",UrlEncodeArr:"urlEncodeArr",Encrypt:"encrypt",Decrypt:"decrypt",GenerateEarKey:"generateEarKey",DecryptEarResponse:"decryptEarResponse"},nRc=new Map([[it.AcquireTokenByCode,"ATByCode"],[it.AcquireTokenByRefreshToken,"ATByRT"],[it.AcquireTokenSilent,"ATS"],[it.AcquireTokenSilentAsync,"ATSAsync"],[it.AcquireTokenPopup,"ATPopup"],[it.AcquireTokenRedirect,"ATRedirect"],[it.CryptoOptsGetPublicKeyThumbprint,"CryptoGetPKThumb"],[it.CryptoOptsSignJwt,"CryptoSignJwt"],[it.SilentCacheClientAcquireToken,"SltCacheClientAT"],[it.SilentIframeClientAcquireToken,"SltIframeClientAT"],[it.SilentRefreshClientAcquireToken,"SltRClientAT"],[it.SsoSilent,"SsoSlt"],[it.StandardInteractionClientGetDiscoveredAuthority,"StdIntClientGetDiscAuth"],[it.FetchAccountIdWithNativeBroker,"FetchAccIdWithNtvBroker"],[it.NativeInteractionClientAcquireToken,"NtvIntClientAT"],[it.BaseClientCreateTokenRequestHeaders,"BaseClientCreateTReqHead"],[it.NetworkClientSendPostRequestAsync,"NetClientSendPost"],[it.RefreshTokenClientExecutePostToTokenEndpoint,"RTClientExecPost"],[it.AuthorizationCodeClientExecutePostToTokenEndpoint,"AuthCodeClientExecPost"],[it.BrokerHandhshake,"BrokerHandshake"],[it.AcquireTokenByRefreshTokenInBroker,"ATByRTInBroker"],[it.AcquireTokenByBroker,"ATByBroker"],[it.RefreshTokenClientExecuteTokenRequest,"RTClientExecTReq"],[it.RefreshTokenClientAcquireToken,"RTClientAT"],[it.RefreshTokenClientAcquireTokenWithCachedRefreshToken,"RTClientATWithCachedRT"],[it.RefreshTokenClientAcquireTokenByRefreshToken,"RTClientATByRT"],[it.RefreshTokenClientCreateTokenRequestBody,"RTClientCreateTReqBody"],[it.AcquireTokenFromCache,"ATFromCache"],[it.SilentFlowClientAcquireCachedToken,"SltFlowClientATCached"],[it.SilentFlowClientGenerateResultFromCacheRecord,"SltFlowClientGenResFromCache"],[it.AcquireTokenBySilentIframe,"ATBySltIframe"],[it.InitializeBaseRequest,"InitBaseReq"],[it.InitializeSilentRequest,"InitSltReq"],[it.InitializeClientApplication,"InitClientApplication"],[it.InitializeCache,"InitCache"],[it.ImportExistingCache,"importCache"],[it.SetUserData,"setUserData"],[it.LocalStorageUpdated,"localStorageUpdated"],[it.SilentIframeClientTokenHelper,"SIClientTHelper"],[it.SilentHandlerInitiateAuthRequest,"SHandlerInitAuthReq"],[it.SilentHandlerMonitorIframeForHash,"SltHandlerMonitorIframeForHash"],[it.SilentHandlerLoadFrame,"SHandlerLoadFrame"],[it.SilentHandlerLoadFrameSync,"SHandlerLoadFrameSync"],[it.StandardInteractionClientCreateAuthCodeClient,"StdIntClientCreateAuthCodeClient"],[it.StandardInteractionClientGetClientConfiguration,"StdIntClientGetClientConf"],[it.StandardInteractionClientInitializeAuthorizationRequest,"StdIntClientInitAuthReq"],[it.GetAuthCodeUrl,"GetAuthCodeUrl"],[it.HandleCodeResponseFromServer,"HandleCodeResFromServer"],[it.HandleCodeResponse,"HandleCodeResp"],[it.HandleResponseEar,"HandleRespEar"],[it.HandleResponseCode,"HandleRespCode"],[it.HandleResponsePlatformBroker,"HandleRespPlatBroker"],[it.UpdateTokenEndpointAuthority,"UpdTEndpointAuth"],[it.AuthClientAcquireToken,"AuthClientAT"],[it.AuthClientExecuteTokenRequest,"AuthClientExecTReq"],[it.AuthClientCreateTokenRequestBody,"AuthClientCreateTReqBody"],[it.PopTokenGenerateCnf,"PopTGenCnf"],[it.PopTokenGenerateKid,"PopTGenKid"],[it.HandleServerTokenResponse,"HandleServerTRes"],[it.DeserializeResponse,"DeserializeRes"],[it.AuthorityFactoryCreateDiscoveredInstance,"AuthFactCreateDiscInst"],[it.AuthorityResolveEndpointsAsync,"AuthResolveEndpointsAsync"],[it.AuthorityResolveEndpointsFromLocalSources,"AuthResolveEndpointsFromLocal"],[it.AuthorityGetCloudDiscoveryMetadataFromNetwork,"AuthGetCDMetaFromNet"],[it.AuthorityUpdateCloudDiscoveryMetadata,"AuthUpdCDMeta"],[it.AuthorityGetEndpointMetadataFromNetwork,"AuthUpdCDMetaFromNet"],[it.AuthorityUpdateEndpointMetadata,"AuthUpdEndpointMeta"],[it.AuthorityUpdateMetadataWithRegionalInformation,"AuthUpdMetaWithRegInfo"],[it.RegionDiscoveryDetectRegion,"RegDiscDetectReg"],[it.RegionDiscoveryGetRegionFromIMDS,"RegDiscGetRegFromIMDS"],[it.RegionDiscoveryGetCurrentVersion,"RegDiscGetCurrentVer"],[it.AcquireTokenByCodeAsync,"ATByCodeAsync"],[it.GetEndpointMetadataFromNetwork,"GetEndpointMetaFromNet"],[it.GetCloudDiscoveryMetadataFromNetworkMeasurement,"GetCDMetaFromNet"],[it.HandleRedirectPromiseMeasurement,"HandleRedirectPromise"],[it.HandleNativeRedirectPromiseMeasurement,"HandleNtvRedirectPromise"],[it.UpdateCloudDiscoveryMetadataMeasurement,"UpdateCDMeta"],[it.UsernamePasswordClientAcquireToken,"UserPassClientAT"],[it.NativeMessageHandlerHandshake,"NtvMsgHandlerHandshake"],[it.NativeGenerateAuthResult,"NtvGenAuthRes"],[it.RemoveHiddenIframe,"RemoveHiddenIframe"],[it.ClearTokensAndKeysWithClaims,"ClearTAndKeysWithClaims"],[it.CacheManagerGetRefreshToken,"CacheManagerGetRT"],[it.GeneratePkceCodes,"GenPkceCodes"],[it.GenerateCodeVerifier,"GenCodeVerifier"],[it.GenerateCodeChallengeFromVerifier,"GenCodeChallengeFromVerifier"],[it.Sha256Digest,"Sha256Digest"],[it.GetRandomValues,"GetRandomValues"],[it.GenerateHKDF,"genHKDF"],[it.GenerateBaseKey,"genBaseKey"],[it.Base64Decode,"b64Decode"],[it.UrlEncodeArr,"urlEncArr"],[it.Encrypt,"encrypt"],[it.Decrypt,"decrypt"],[it.GenerateEarKey,"genEarKey"],[it.DecryptEarResponse,"decryptEarResp"]]),$Dr={NotStarted:0,InProgress:1,Completed:2};var EBe=class{static{a(this,"StubPerformanceMeasurement")}startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}},OH=class{static{a(this,"StubPerformanceClient")}generateId(){return"callback-id"}startMeasurement(e,r){return{end:a(()=>null,"end"),discard:a(()=>{},"discard"),add:a(()=>{},"add"),increment:a(()=>{},"increment"),event:{eventId:this.generateId(),status:$Dr.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:r||""},measurement:new EBe}}startPerformanceMeasurement(){return new EBe}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}};var kMi={tokenRenewalOffsetSeconds:vte,preventCorsPreflight:!1},NMi={loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:Zu.Info,correlationId:pt.EMPTY_STRING},DMi={claimsBasedCachingEnabled:!1},MMi={async sendGetRequestAsync(){throw Rt(Ho)},async sendPostRequestAsync(){throw Rt(Ho)}},OMi={sku:pt.SKU,version:Ste,cpu:pt.EMPTY_STRING,os:pt.EMPTY_STRING},BMi={clientSecret:pt.EMPTY_STRING,clientAssertion:void 0},LMi={azureCloudInstance:kM.None,tenant:`${pt.DEFAULT_COMMON_TENANT}`},FMi={application:{appName:"",appVersion:""}};function VDr({authOptions:t,systemOptions:e,loggerOptions:r,cacheOptions:n,storageInterface:o,networkInterface:s,cryptoInterface:c,clientCredentials:l,libraryInfo:u,telemetry:d,serverTelemetryManager:p,persistencePlugin:h,serializableCache:m}){let g={...NMi,...r};return{authOptions:UMi(t),systemOptions:{...kMi,...e},loggerOptions:g,cacheOptions:{...DMi,...n},storageInterface:o||new qge(t.clientId,Tte,new b1(g),new OH),networkInterface:s||MMi,cryptoInterface:c||Tte,clientCredentials:l||BMi,libraryInfo:{...OMi,...u},telemetry:{...FMi,...d},serverTelemetryManager:p||null,persistencePlugin:h||null,serializableCache:m||null}}a(VDr,"buildClientConfiguration");function UMi(t){return{clientCapabilities:[],azureCloudOptions:LMi,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...t}}a(UMi,"buildAuthOptions");function CBe(t){return t.authOptions.authority.options.protocolMode===Ng.OIDC}a(CBe,"isOidcProtocolMode");f();var JA={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};var Hr={};Ri(Hr,{addApplicationTelemetry:()=>jge,addAuthorizationCode:()=>evt,addBrokerParameters:()=>BM,addCcsOid:()=>MM,addCcsUpn:()=>H8,addClaims:()=>qH,addClientAssertion:()=>Wge,addClientAssertionType:()=>zge,addClientCapabilitiesToClaims:()=>WDr,addClientId:()=>UH,addClientInfo:()=>HH,addClientSecret:()=>Vge,addCodeChallengeParams:()=>eOi,addCodeVerifier:()=>rvt,addCorrelationId:()=>GH,addDeviceCode:()=>tOi,addDomainHint:()=>J1t,addEARParameters:()=>sOi,addExtraQueryParameters:()=>OM,addGrantType:()=>Yge,addIdTokenHint:()=>K1t,addInstanceAware:()=>Kge,addLibraryInfo:()=>Hge,addLoginHint:()=>Nte,addLogoutHint:()=>nvt,addNativeBroker:()=>ZMi,addNonce:()=>Z1t,addOboAssertion:()=>rOi,addPassword:()=>oOi,addPopToken:()=>Jge,addPostLogoutRedirectUri:()=>Y1t,addPrompt:()=>X1t,addRedirectUri:()=>QH,addRefreshToken:()=>tvt,addRequestTokenUse:()=>nOi,addResponseMode:()=>z1t,addResponseType:()=>XMi,addScopes:()=>FH,addServerTelemetry:()=>Zge,addSid:()=>IBe,addSshJwk:()=>Xge,addState:()=>$ge,addThrottling:()=>eAe,addUsername:()=>iOi,instrumentBrokerParams:()=>LH});f();var BH={};Ri(BH,{ACCESS_TOKEN:()=>GMi,BROKER_CLIENT_ID:()=>Gge,BROKER_REDIRECT_URI:()=>SBe,CCS_HEADER:()=>KMi,CLAIMS:()=>p1t,CLIENT_ASSERTION:()=>L1t,CLIENT_ASSERTION_TYPE:()=>F1t,CLIENT_ID:()=>RP,CLIENT_INFO:()=>WMi,CLIENT_REQUEST_ID:()=>b1t,CLIENT_SECRET:()=>B1t,CODE:()=>E1t,CODE_CHALLENGE:()=>C1t,CODE_CHALLENGE_METHOD:()=>_1t,CODE_VERIFIER:()=>v1t,DEVICE_CODE:()=>O1t,DOMAIN_HINT:()=>$1t,EAR_JWE_CRYPTO:()=>W1t,EAR_JWK:()=>V1t,ERROR:()=>QMi,ERROR_DESCRIPTION:()=>qMi,EXPIRES_IN:()=>jMi,FOCI:()=>YMi,GRANT_TYPE:()=>f1t,ID_TOKEN:()=>HMi,ID_TOKEN_HINT:()=>M1t,INSTANCE_AWARE:()=>kte,LOGIN_HINT:()=>j1t,LOGOUT_HINT:()=>G1t,NATIVE_BROKER:()=>q1t,NONCE:()=>A1t,OBO_ASSERTION:()=>U1t,ON_BEHALF_OF:()=>zMi,POST_LOGOUT_URI:()=>D1t,PROMPT:()=>y1t,REDIRECT_URI:()=>_Be,REFRESH_TOKEN:()=>m1t,REFRESH_TOKEN_EXPIRES_IN:()=>$Mi,REQUESTED_TOKEN_USE:()=>Q1t,REQ_CNF:()=>bBe,RESPONSE_MODE:()=>d1t,RESPONSE_TYPE:()=>u1t,RETURN_SPA_CODE:()=>TBe,SCOPE:()=>h1t,SESSION_STATE:()=>VMi,SID:()=>H1t,STATE:()=>g1t,TOKEN_TYPE:()=>vBe,X_APP_NAME:()=>k1t,X_APP_VER:()=>N1t,X_CLIENT_CPU:()=>x1t,X_CLIENT_CURR_TELEM:()=>w1t,X_CLIENT_EXTRA_SKU:()=>JMi,X_CLIENT_LAST_TELEM:()=>R1t,X_CLIENT_OS:()=>I1t,X_CLIENT_SKU:()=>T1t,X_CLIENT_VER:()=>S1t,X_MS_LIB_CAPABILITY:()=>P1t});f();var RP="client_id",_Be="redirect_uri",u1t="response_type",d1t="response_mode",f1t="grant_type",p1t="claims",h1t="scope",QMi="error",qMi="error_description",GMi="access_token",HMi="id_token",m1t="refresh_token",jMi="expires_in",$Mi="refresh_token_expires_in",g1t="state",A1t="nonce",y1t="prompt",VMi="session_state",WMi="client_info",E1t="code",C1t="code_challenge",_1t="code_challenge_method",v1t="code_verifier",b1t="client-request-id",T1t="x-client-SKU",S1t="x-client-VER",I1t="x-client-OS",x1t="x-client-CPU",w1t="x-client-current-telemetry",R1t="x-client-last-telemetry",P1t="x-ms-lib-capability",k1t="x-app-name",N1t="x-app-ver",D1t="post_logout_redirect_uri",M1t="id_token_hint",O1t="device_code",B1t="client_secret",L1t="client_assertion",F1t="client_assertion_type",vBe="token_type",bBe="req_cnf",U1t="assertion",Q1t="requested_token_use",zMi="on_behalf_of",YMi="foci",KMi="X-AnchorMailbox",TBe="return_spa_code",q1t="nativebroker",G1t="logout_hint",H1t="sid",j1t="login_hint",$1t="domain_hint",JMi="x-client-xtra-sku",Gge="brk_client_id",SBe="brk_redirect_uri",kte="instance_aware",V1t="ear_jwk",W1t="ear_jwe_crypto";function LH(t,e,r){if(!e)return;let n=t.get(RP);n&&t.has(Gge)&&r?.addFields({embeddedClientId:n,embeddedRedirectUri:t.get(_Be)},e)}a(LH,"instrumentBrokerParams");function XMi(t,e){t.set(u1t,e)}a(XMi,"addResponseType");function z1t(t,e){t.set(d1t,e||TP.QUERY)}a(z1t,"addResponseMode");function ZMi(t){t.set(q1t,"1")}a(ZMi,"addNativeBroker");function FH(t,e,r=!0,n=BE){r&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");let o=r?[...e||[],...n]:e||[],s=new o0(o);t.set(h1t,s.printScopes())}a(FH,"addScopes");function UH(t,e){t.set(RP,e)}a(UH,"addClientId");function QH(t,e){t.set(_Be,e)}a(QH,"addRedirectUri");function Y1t(t,e){t.set(D1t,e)}a(Y1t,"addPostLogoutRedirectUri");function K1t(t,e){t.set(M1t,e)}a(K1t,"addIdTokenHint");function J1t(t,e){t.set($1t,e)}a(J1t,"addDomainHint");function Nte(t,e){t.set(j1t,e)}a(Nte,"addLoginHint");function H8(t,e){t.set(sl.CCS_HEADER,`UPN:${e}`)}a(H8,"addCcsUpn");function MM(t,e){t.set(sl.CCS_HEADER,`Oid:${e.uid}@${e.utid}`)}a(MM,"addCcsOid");function IBe(t,e){t.set("sid",e)}a(IBe,"addSid");function qH(t,e,r){let n=WDr(e,r);try{JSON.parse(n)}catch{throw _c(Q8)}t.set(p1t,n)}a(qH,"addClaims");function GH(t,e){t.set(b1t,e)}a(GH,"addCorrelationId");function Hge(t,e){t.set(T1t,e.sku),t.set(S1t,e.version),e.os&&t.set(I1t,e.os),e.cpu&&t.set(x1t,e.cpu)}a(Hge,"addLibraryInfo");function jge(t,e){e?.appName&&t.set(k1t,e.appName),e?.appVersion&&t.set(N1t,e.appVersion)}a(jge,"addApplicationTelemetry");function X1t(t,e){t.set(y1t,e)}a(X1t,"addPrompt");function $ge(t,e){e&&t.set(g1t,e)}a($ge,"addState");function Z1t(t,e){t.set(A1t,e)}a(Z1t,"addNonce");function eOi(t,e,r){if(e&&r)t.set(C1t,e),t.set(_1t,r);else throw _c(NH)}a(eOi,"addCodeChallengeParams");function evt(t,e){t.set(E1t,e)}a(evt,"addAuthorizationCode");function tOi(t,e){t.set(O1t,e)}a(tOi,"addDeviceCode");function tvt(t,e){t.set(m1t,e)}a(tvt,"addRefreshToken");function rvt(t,e){t.set(v1t,e)}a(rvt,"addCodeVerifier");function Vge(t,e){t.set(B1t,e)}a(Vge,"addClientSecret");function Wge(t,e){e&&t.set(L1t,e)}a(Wge,"addClientAssertion");function zge(t,e){e&&t.set(F1t,e)}a(zge,"addClientAssertionType");function rOi(t,e){t.set(U1t,e)}a(rOi,"addOboAssertion");function nOi(t,e){t.set(Q1t,e)}a(nOi,"addRequestTokenUse");function Yge(t,e){t.set(f1t,e)}a(Yge,"addGrantType");function HH(t){t.set(BDr,"1")}a(HH,"addClientInfo");function Kge(t){t.has(kte)||t.set(kte,"true")}a(Kge,"addInstanceAware");function OM(t,e){Object.entries(e).forEach(([r,n])=>{!t.has(r)&&n&&t.set(r,n)})}a(OM,"addExtraQueryParameters");function WDr(t,e){let r;if(!t)r={};else try{r=JSON.parse(t)}catch{throw _c(Q8)}return e&&e.length>0&&(r.hasOwnProperty(sH.ACCESS_TOKEN)||(r[sH.ACCESS_TOKEN]={}),r[sH.ACCESS_TOKEN][sH.XMS_CC]={values:e}),JSON.stringify(r)}a(WDr,"addClientCapabilitiesToClaims");function iOi(t,e){t.set(cge.username,e)}a(iOi,"addUsername");function oOi(t,e){t.set(cge.password,e)}a(oOi,"addPassword");function Jge(t,e){e&&(t.set(vBe,vs.POP),t.set(bBe,e))}a(Jge,"addPopToken");function Xge(t,e){e&&(t.set(vBe,vs.SSH),t.set(bBe,e))}a(Xge,"addSshJwk");function Zge(t,e){t.set(w1t,e.generateCurrentRequestHeaderValue()),t.set(R1t,e.generateLastRequestHeaderValue())}a(Zge,"addServerTelemetry");function eAe(t){t.set(P1t,SP.X_MS_LIB_CAPABILITY_VALUE)}a(eAe,"addThrottling");function nvt(t,e){t.set(G1t,e)}a(nvt,"addLogoutHint");function BM(t,e,r){t.has(Gge)||t.set(Gge,e),t.has(SBe)||t.set(SBe,r)}a(BM,"addBrokerParameters");function sOi(t,e){t.set(V1t,encodeURIComponent(e)),t.set(W1t,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}a(sOi,"addEARParameters");var wBe={};Ri(wBe,{createDiscoveredInstance:()=>ovt});f();f();f();function zDr(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}a(zDr,"isOpenIdConfigResponse");f();function YDr(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}a(YDr,"isCloudInstanceDiscoveryResponse");f();function KDr(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}a(KDr,"isCloudInstanceDiscoveryErrorResponse");f();f();var JDr=a((t,e,r,n,o)=>(...s)=>{r.trace(`Executing function ${e}`);let c=n?.startMeasurement(e,o);if(o){let l=e+"CallCount";n?.incrementFields({[l]:1},o)}try{let l=t(...s);return c?.end({success:!0}),r.trace(`Returning result from ${e}`),l}catch(l){r.trace(`Error occurred in ${e}`);try{r.trace(JSON.stringify(l))}catch{r.trace("Unable to print error message.")}throw c?.end({success:!1},l),l}},"invoke"),bs=a((t,e,r,n,o)=>(...s)=>{r.trace(`Executing function ${e}`);let c=n?.startMeasurement(e,o);if(o){let l=e+"CallCount";n?.incrementFields({[l]:1},o)}return n?.setPreQueueTime(e,o),t(...s).then(l=>(r.trace(`Returning result from ${e}`),c?.end({success:!0}),l)).catch(l=>{r.trace(`Error occurred in ${e}`);try{r.trace(JSON.stringify(l))}catch{r.trace("Unable to print error message.")}throw c?.end({success:!1},l),l})},"invokeAsync");var tAe=class t{static{a(this,"RegionDiscovery")}constructor(e,r,n,o){this.networkInterface=e,this.logger=r,this.performanceClient=n,this.correlationId=o}async detectRegion(e,r){this.performanceClient?.addQueueMeasurement(it.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)r.region_source=cH.ENVIRONMENT_VARIABLE;else{let o=t.IMDS_OPTIONS;try{let s=await bs(this.getRegionFromIMDS.bind(this),it.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(pt.IMDS_VERSION,o);if(s.status===Gi.SUCCESS&&(n=s.body,r.region_source=cH.IMDS),s.status===Gi.BAD_REQUEST){let c=await bs(this.getCurrentVersion.bind(this),it.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(o);if(!c)return r.region_source=cH.FAILED_AUTO_DETECTION,null;let l=await bs(this.getRegionFromIMDS.bind(this),it.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(c,o);l.status===Gi.SUCCESS&&(n=l.body,r.region_source=cH.IMDS)}}catch{return r.region_source=cH.FAILED_AUTO_DETECTION,null}}return n||(r.region_source=cH.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,r){return this.performanceClient?.addQueueMeasurement(it.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${pt.IMDS_ENDPOINT}?api-version=${e}&format=text`,r,pt.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(it.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let r=await this.networkInterface.sendGetRequestAsync(`${pt.IMDS_ENDPOINT}?format=json`,e);return r.status===Gi.BAD_REQUEST&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch{return null}}};tAe.IMDS_OPTIONS={headers:{Metadata:"true"}};var _x=class t{static{a(this,"Authority")}constructor(e,r,n,o,s,c,l,u){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=l,this.correlationId=c,this.managedIdentity=u||!1,this.regionDiscovery=new tAe(r,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(pt.CIAM_AUTH_URL))return aT.Ciam;let r=e.PathSegments;if(r.length)switch(r[0].toLowerCase()){case pt.ADFS:return aT.Adfs;case pt.DSTS:return aT.Dsts}return aT.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new jo(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Rt(KA)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Rt(KA)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Rt(KA)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Rt(TH);return this.replacePath(this.metadata.end_session_endpoint)}else throw Rt(KA)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Rt(KA)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Rt(KA)}canReplaceTenant(e){return e.PathSegments.length===1&&!t.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===aT.Default&&this.protocolMode!==Ng.OIDC}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let r=e,o=new jo(this.metadata.canonical_authority).getUrlComponents(),s=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((l,u)=>{let d=s[u];if(u===0&&this.canReplaceTenant(o)){let p=new jo(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];d!==p&&(this.logger.verbose(`Replacing tenant domain name ${d} with id ${p}`),d=p)}l!==d&&(r=r.replace(`/${d}/`,`/${l}/`))}),this.replaceTenant(r)}get defaultOpenIdConfigurationEndpoint(){let e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===aT.Adfs||this.protocolMode===Ng.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(it.AuthorityResolveEndpointsAsync,this.correlationId);let e=this.getCurrentMetadataEntity(),r=await bs(this.updateCloudDiscoveryMetadata.bind(this),it.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);let n=await bs(this.updateEndpointMetadata.bind(this),it.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,r,{source:n}),this.performanceClient?.addFields({cloudDiscoverySource:r,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:hBe(),jwks_uri:""}),e}updateCachedMetadata(e,r,n){r!==YA.CACHE&&n?.source!==YA.CACHE&&(e.expiresAt=hBe(),e.canonical_authority=this.canonicalAuthority);let o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(it.AuthorityUpdateEndpointMetadata,this.correlationId);let r=this.updateEndpointMetadataFromLocalSources(e);if(r){if(r.source===YA.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&r.metadata){let o=await bs(this.updateMetadataWithRegionalInformation.bind(this),it.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r.metadata);xte(e,o,!1),e.canonical_authority=this.canonicalAuthority}return r.source}let n=await bs(this.getEndpointMetadataFromNetwork.bind(this),it.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(n=await bs(this.updateMetadataWithRegionalInformation.bind(this),it.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),xte(e,n,!0),YA.NETWORK;throw Rt(fH,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");let r=this.getEndpointMetadataFromConfig();if(r)return this.logger.verbose("Found endpoint metadata in authority configuration"),xte(e,r,!1),{source:YA.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{let o=this.getEndpointMetadataFromHardcodedValues();if(o)return xte(e,o,!1),{source:YA.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}let n=mBe(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:YA.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new jo(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw _c(DH)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(it.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let e={},r=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${r}`);try{let n=await this.networkInterface.sendGetRequestAsync(r,e);return zDr(n.body)?n.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(n){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${n}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in o1t?o1t[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(it.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let r=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(r){if(r!==pt.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=lBe.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=r,t.replaceWithRegionalInformation(e,r);let n=await bs(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),it.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(n)return this.regionDiscoveryMetadata.region_outcome=lBe.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=n,t.replaceWithRegionalInformation(e,n);this.regionDiscoveryMetadata.region_outcome=lBe.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(it.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let r=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(r)return r;let n=await bs(this.getCloudDiscoveryMetadataFromNetwork.bind(this),it.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return Rge(e,n,!0),YA.NETWORK;throw _c(MH)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||pt.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||pt.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||pt.NOT_APPLICABLE}`);let r=this.getCloudDiscoveryMetadataFromConfig();if(r)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Rge(e,r,!1),YA.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{let o=HDr(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Rge(e,o,!1),YA.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}let n=mBe(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),YA.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===aT.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");let e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=Uge(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),r)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),r;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),_c(q8)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(it.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let e=`${pt.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,r={},n=null;try{let o=await this.networkInterface.sendGetRequestAsync(e,r),s,c;if(YDr(o.body))s=o.body,c=s.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${s.tenant_discovery_endpoint}`);else if(KDr(o.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),s=o.body,s.error===pt.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${s.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${s.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),c=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=Uge(c,this.hostnameAndPort)}catch(o){if(o instanceof Hi)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. -Error: ${o.errorCode} -Error Description: ${o.errorMessage}`);else{let s=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. -Error: ${s.name} -Error Description: ${s.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(r=>r&&jo.getDomainFromUrl(r).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,r){let n;if(r&&r.azureCloudInstance!==kM.None){let o=r.tenant?r.tenant:pt.DEFAULT_COMMON_TENANT;n=`${r.azureCloudInstance}/${o}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return pt.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Rt(KA)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return a1t.has(e)}static isPublicCloudAuthority(e){return pt.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,r,n){let o=new jo(e);o.validateAsUri();let s=o.getUrlComponents(),c=`${r}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(c=`${r}.${pt.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);let l=jo.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:c}).urlString;return n?`${l}?${n}`:l}static replaceWithRegionalInformation(e,r){let n={...e};return n.authorization_endpoint=t.buildRegionalAuthorityString(n.authorization_endpoint,r),n.token_endpoint=t.buildRegionalAuthorityString(n.token_endpoint,r),n.end_session_endpoint&&(n.end_session_endpoint=t.buildRegionalAuthorityString(n.end_session_endpoint,r)),n}static transformCIAMAuthority(e){let r=e,o=new jo(e).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(pt.CIAM_AUTH_URL)){let s=o.HostNameAndPort.split(".")[0];r=`${r}${s}${pt.AAD_TENANT_DOMAIN_SUFFIX}`}return r}};_x.reservedTenantDomains=new Set(["{tenant}","{tenantid}",LE.COMMON,LE.CONSUMERS,LE.ORGANIZATIONS]);function XDr(t){let n=new jo(t).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(n){case LE.COMMON:case LE.ORGANIZATIONS:case LE.CONSUMERS:return;default:return n}}a(XDr,"getTenantFromAuthorityString");function xBe(t){return t.endsWith(pt.FORWARD_SLASH)?t:`${t}${pt.FORWARD_SLASH}`}a(xBe,"formatAuthorityUri");function ivt(t){let e=t.cloudDiscoveryMetadata,r;if(e)try{r=JSON.parse(e)}catch{throw _c(q8)}return{canonicalAuthority:t.authority?xBe(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:r}}a(ivt,"buildStaticAuthorityOptions");async function ovt(t,e,r,n,o,s,c){c?.addQueueMeasurement(it.AuthorityFactoryCreateDiscoveredInstance,s);let l=_x.transformCIAMAuthority(xBe(t)),u=new _x(l,e,r,n,o,s,c);try{return await bs(u.resolveEndpointsAsync.bind(u),it.AuthorityResolveEndpointsAsync,o,c,s)(),u}catch{throw Rt(KA)}}a(ovt,"createDiscoveredInstance");f();f();var XA=class t extends Hi{static{a(this,"ServerError")}constructor(e,r,n,o,s){super(e,r,n),this.name="ServerError",this.errorNo=o,this.status=s,Object.setPrototypeOf(this,t.prototype)}};f();function Dte(t,e,r){return{clientId:t,authority:e.authority,scopes:e.scopes,homeAccountIdentifier:r,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,embeddedClientId:e.embeddedClientId||e.tokenBodyParameters?.clientId}}a(Dte,"getRequestThumbprint");var rAe=class t{static{a(this,"ThrottlingUtils")}static generateThrottlingStorageKey(e){return`${SP.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,r,n){let o=t.generateThrottlingStorageKey(r),s=e.getThrottlingCache(o);if(s){if(s.throttleTime=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(sl.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){let r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||SP.DEFAULT_THROTTLE_TIME_SECONDS),n+SP.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,r,n,o){let s=Dte(r,n,o),c=this.generateThrottlingStorageKey(s);e.removeItem(c,n.correlationId)}};f();var RBe=class t extends Hi{static{a(this,"NetworkError")}constructor(e,r,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.error=e,this.httpStatus=r,this.responseHeaders=n}};var hm=class{static{a(this,"BaseClient")}constructor(e,r){this.config=VDr(e),this.logger=new b1(this.config.loggerOptions,dBe,Ste),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}createTokenRequestHeaders(e){let r={};if(r[sl.CONTENT_TYPE]=pt.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case JA.HOME_ACCOUNT_ID:try{let n=xP(e.credential);r[sl.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case JA.UPN:r[sl.CCS_HEADER]=`UPN: ${e.credential}`;break}return r}async executePostToTokenEndpoint(e,r,n,o,s,c){c&&this.performanceClient?.addQueueMeasurement(c,s);let l=await this.sendPostRequest(o,e,{body:r,headers:n},s);return this.config.serverTelemetryManager&&l.status<500&&l.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),l}async sendPostRequest(e,r,n,o){rAe.preProcess(this.cacheManager,e,o);let s;try{s=await bs(this.networkClient.sendPostRequestAsync.bind(this.networkClient),it.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(r,n);let c=s.headers||{};this.performanceClient?.addFields({refreshTokenSize:s.body.refresh_token?.length||0,httpVerToken:c[sl.X_MS_HTTP_VERSION]||"",requestId:c[sl.X_MS_REQUEST_ID]||""},o)}catch(c){if(c instanceof RBe){let l=c.responseHeaders;throw l&&this.performanceClient?.addFields({httpVerToken:l[sl.X_MS_HTTP_VERSION]||"",requestId:l[sl.X_MS_REQUEST_ID]||"",contentTypeHeader:l[sl.CONTENT_TYPE]||void 0,contentLengthHeader:l[sl.CONTENT_LENGTH]||void 0,httpStatus:c.httpStatus},o),c.error}throw c instanceof Hi?c:Rt(dH)}return rAe.postProcess(this.cacheManager,e,s,o),s}async updateAuthority(e,r){this.performanceClient?.addQueueMeasurement(it.UpdateTokenEndpointAuthority,r);let n=`https://${e}/${this.authority.tenant}/`,o=await ovt(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,r,this.performanceClient);this.authority=o}createTokenQueryParameters(e){let r=new Map;return e.embeddedClientId&&BM(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&OM(r,e.tokenQueryParameters),GH(r,e.correlationId),LH(r,e.correlationId,this.performanceClient),wP(r)}};f();f();var kBe={};Ri(kBe,{badToken:()=>$8,consentRequired:()=>avt,interactionRequired:()=>svt,loginRequired:()=>cvt,nativeAccountUnavailable:()=>nAe,noTokensFound:()=>j8,refreshTokenExpired:()=>iAe,uxNotAllowed:()=>PBe});f();var j8="no_tokens_found",nAe="native_account_unavailable",iAe="refresh_token_expired",PBe="ux_not_allowed",svt="interaction_required",avt="consent_required",cvt="login_required",$8="bad_token";var ZDr=[svt,avt,cvt,$8,PBe],aOi=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],NBe={[j8]:"No refresh token found in the cache. Please sign-in.",[nAe]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[iAe]:"Refresh token has expired.",[$8]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[PBe]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."},lvt={noTokensFoundError:{code:j8,desc:NBe[j8]},native_account_unavailable:{code:nAe,desc:NBe[nAe]},bad_token:{code:$8,desc:NBe[$8]}},S1=class t extends Hi{static{a(this,"InteractionRequiredAuthError")}constructor(e,r,n,o,s,c,l,u){super(e,r,n),Object.setPrototypeOf(this,t.prototype),this.timestamp=o||pt.EMPTY_STRING,this.traceId=s||pt.EMPTY_STRING,this.correlationId=c||pt.EMPTY_STRING,this.claims=l||pt.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=u}};function DBe(t,e,r){let n=!!t&&ZDr.indexOf(t)>-1,o=!!r&&aOi.indexOf(r)>-1,s=!!e&&ZDr.some(c=>e.indexOf(c)>-1);return n||s||o}a(DBe,"isInteractionRequiredError");function MBe(t){return new S1(t,NBe[t])}a(MBe,"createInteractionRequiredAuthError");f();var OBe=class t{static{a(this,"ProtocolUtils")}static setRequestState(e,r,n){let o=t.generateLibraryState(e,n);return r?`${o}${pt.RESOURCE_DELIM}${r}`:o}static generateLibraryState(e,r){if(!e)throw Rt(F8);let n={id:e.createNewGuid()};r&&(n.meta=r);let o=JSON.stringify(n);return e.base64Encode(o)}static parseRequestState(e,r){if(!e)throw Rt(F8);if(!r)throw Rt(Cx);try{let n=r.split(pt.RESOURCE_DELIM),o=n[0],s=n.length>1?n.slice(1).join(pt.RESOURCE_DELIM):pt.EMPTY_STRING,c=e.base64Decode(o),l=JSON.parse(c);return{userRequestState:s||pt.EMPTY_STRING,libraryState:l}}catch{throw Rt(Cx)}}};f();var cOi={SW:"sw"},V8=class{static{a(this,"PopTokenGenerator")}constructor(e,r){this.cryptoUtils=e,this.performanceClient=r}async generateCnf(e,r){this.performanceClient?.addQueueMeasurement(it.PopTokenGenerateCnf,e.correlationId);let n=await bs(this.generateKid.bind(this),it.PopTokenGenerateCnf,r,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:o}}async generateKid(e){return this.performanceClient?.addQueueMeasurement(it.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:cOi.SW}}async signPopToken(e,r,n){return this.signPayload(e,r,n)}async signPayload(e,r,n,o){let{resourceRequestMethod:s,resourceRequestUri:c,shrClaims:l,shrNonce:u,shrOptions:d}=n,h=(c?new jo(c):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:T1(),m:s?.toUpperCase(),u:h?.HostNameAndPort,nonce:u||this.cryptoUtils.createNewGuid(),p:h?.AbsolutePath,q:h?.QueryString?[[],h.QueryString]:void 0,client_claims:l||void 0,...o},r,d,n.correlationId)}};f();var I1=class{static{a(this,"TokenCacheContext")}constructor(e,r){this.cache=e,this.hasChanged=r}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};var gf=class t{static{a(this,"ResponseHandler")}constructor(e,r,n,o,s,c,l){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=o,this.serializableCache=s,this.persistencePlugin=c,this.performanceClient=l}validateTokenResponse(e,r){if(e.error||e.error_description||e.suberror){let n=`Error(s): ${e.error_codes||pt.NOT_AVAILABLE} - Timestamp: ${e.timestamp||pt.NOT_AVAILABLE} - Description: ${e.error_description||pt.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||pt.NOT_AVAILABLE} - Trace ID: ${e.trace_id||pt.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,s=new XA(e.error,n,e.suberror,o,e.status);if(r&&e.status&&e.status>=Gi.SERVER_ERROR_RANGE_START&&e.status<=Gi.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. -${s}`);return}else if(r&&e.status&&e.status>=Gi.CLIENT_ERROR_RANGE_START&&e.status<=Gi.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. -${s}`);return}throw DBe(e.error,e.error_description,e.suberror)?new S1(e.error,e.error_description,e.suberror,e.timestamp||pt.EMPTY_STRING,e.trace_id||pt.EMPTY_STRING,e.correlation_id||pt.EMPTY_STRING,e.claims||pt.EMPTY_STRING,o):s}}async handleServerTokenResponse(e,r,n,o,s,c,l,u,d){this.performanceClient?.addQueueMeasurement(it.HandleServerTokenResponse,e.correlation_id);let p;if(e.id_token){if(p=NM(e.id_token||pt.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&p.nonce!==s.nonce)throw Rt(mH);if(o.maxAge||o.maxAge===0){let A=p.auth_time;if(!A)throw Rt(xM);Ige(A,o.maxAge)}}this.homeAccountIdentifier=fm.generateHomeAccountId(e.client_info||pt.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,p);let h;s&&s.state&&(h=OBe.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||o.sshKid||void 0;let m=this.generateCacheRecord(e,r,n,o,p,c,s),g;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),g=new I1(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(g)),l&&!u&&m.account){let A=m.account.generateAccountKey();if(!this.cacheStorage.getAccount(A,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await t.generateAuthenticationResult(this.cryptoObj,r,m,!1,o,p,h,void 0,d)}await this.cacheStorage.saveCacheRecord(m,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&g&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(g))}return t.generateAuthenticationResult(this.cryptoObj,r,m,!1,o,p,h,e,d)}generateCacheRecord(e,r,n,o,s,c,l){let u=r.getPreferredCache();if(!u)throw Rt(RM);let d=ABe(s),p,h;e.id_token&&s&&(p=e1t(this.homeAccountIdentifier,u,e.id_token,this.clientId,d||""),h=e5r(this.cacheStorage,r,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,s,e.client_info,u,d,l,void 0,this.logger));let m=null;if(e.access_token){let y=e.scope?o0.fromString(e.scope):new o0(o.scopes||[]),E=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,_=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,v=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,b=n+E,I=b+_,x=v&&v>0?n+v:void 0;m=t1t(this.homeAccountIdentifier,u,e.access_token,this.clientId,d||r.tenant||"",y.printScopes(),b,I,this.cryptoObj.base64Decode,x,e.token_type,c,e.key_id,o.claims,o.requestedClaimsHash)}let g=null;if(e.refresh_token){let y;if(e.refresh_token_expires_in){let E=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;y=n+E}g=r1t(this.homeAccountIdentifier,u,e.refresh_token,this.clientId,e.foci,c,y)}let A=null;return e.foci&&(A={clientId:this.clientId,environment:u,familyId:e.foci}),{account:h,idToken:p,accessToken:m,refreshToken:g,appMetadata:A}}static async generateAuthenticationResult(e,r,n,o,s,c,l,u,d){let p=pt.EMPTY_STRING,h=[],m=null,g,A,y=pt.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===vs.POP&&!s.popKid){let b=new V8(e),{secret:I,keyId:x}=n.accessToken;if(!x)throw Rt(SH);p=await b.signPopToken(I,x,s)}else p=n.accessToken.secret;h=o0.fromString(n.accessToken.target).asArray(),m=xge(n.accessToken.expiresOn),g=xge(n.accessToken.extendedExpiresOn),n.accessToken.refreshOn&&(A=xge(n.accessToken.refreshOn))}n.appMetadata&&(y=n.appMetadata.familyId===IM?IM:"");let E=c?.oid||c?.sub||"",_=c?.tid||"";u?.spa_accountid&&n.account&&(n.account.nativeAccountId=u?.spa_accountid);let v=n.account?gBe(n.account.getAccountInfo(),void 0,c,n.idToken?.secret):null;return{authority:r.canonicalAuthority,uniqueId:E,tenantId:_,scopes:h,account:v,idToken:n?.idToken?.secret||"",idTokenClaims:c||{},accessToken:p,fromCache:o,expiresOn:m,extExpiresOn:g,refreshOn:A,correlationId:s.correlationId,requestId:d||pt.EMPTY_STRING,familyId:y,tokenType:n.accessToken?.tokenType||pt.EMPTY_STRING,state:l?l.userRequestState:pt.EMPTY_STRING,cloudGraphHostName:n.account?.cloudGraphHostName||pt.EMPTY_STRING,msGraphHost:n.account?.msGraphHost||pt.EMPTY_STRING,code:u?.spa_code,fromNativeBroker:!1}}};function e5r(t,e,r,n,o,s,c,l,u,d,p,h){h?.verbose("setCachedAccount called");let g=t.getAccountKeys().find(v=>v.startsWith(r)),A=null;g&&(A=t.getAccount(g,o));let y=A||fm.createAccount({homeAccountId:r,idTokenClaims:s,clientInfo:c,environment:l,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:p},e,n),E=y.tenantProfiles||[],_=u||y.realm;if(_&&!E.find(v=>v.tenantId===_)){let v=Fge(r,y.localAccountId,_,s);E.push(v)}return y.tenantProfiles=E,y}a(e5r,"buildAccountToCache");f();async function ZA(t,e,r){return typeof t=="string"?t:t({clientId:e,tokenEndpoint:r})}a(ZA,"getClientAssertion");var oAe=class extends hm{static{a(this,"AuthorizationCodeClient")}constructor(e,r){super(e,r),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,r){if(this.performanceClient?.addQueueMeasurement(it.AuthClientAcquireToken,e.correlationId),!e.code)throw Rt(yH);let n=T1(),o=await bs(this.executeTokenRequest.bind(this),it.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=o.headers?.[sl.X_MS_REQUEST_ID],c=new gf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return c.validateTokenResponse(o.body),bs(c.handleServerTokenResponse.bind(c),it.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,n,e,r,void 0,void 0,void 0,s)}getLogoutUri(e){if(!e)throw _c(kH);let r=this.createLogoutUrlQueryString(e);return jo.appendQueryString(this.authority.endSessionEndpoint,r)}async executeTokenRequest(e,r){this.performanceClient?.addQueueMeasurement(it.AuthClientExecuteTokenRequest,r.correlationId);let n=this.createTokenQueryParameters(r),o=jo.appendQueryString(e.tokenEndpoint,n),s=await bs(this.createTokenRequestBody.bind(this),it.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,r.correlationId)(r),c;if(r.clientInfo)try{let d=Pte(r.clientInfo,this.cryptoUtils.base64Decode);c={credential:`${d.uid}${Rd.CLIENT_INFO_SEPARATOR}${d.utid}`,type:JA.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}let l=this.createTokenRequestHeaders(c||r.ccsCredential),u=Dte(this.config.authOptions.clientId,r);return bs(this.executePostToTokenEndpoint.bind(this),it.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,r.correlationId)(o,s,l,u,r.correlationId,it.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(it.AuthClientCreateTokenRequestBody,e.correlationId);let r=new Map;if(UH(r,e.embeddedClientId||e.tokenBodyParameters?.[RP]||this.config.authOptions.clientId),this.includeRedirectUri)QH(r,e.redirectUri);else if(!e.redirectUri)throw _c(IH);if(FH(r,e.scopes,!0,this.oidcDefaultScopes),evt(r,e.code),Hge(r,this.config.libraryInfo),jge(r,this.config.telemetry.application),eAe(r),this.serverTelemetryManager&&!CBe(this.config)&&Zge(r,this.serverTelemetryManager),e.codeVerifier&&rvt(r,e.codeVerifier),this.config.clientCredentials.clientSecret&&Vge(r,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let o=this.config.clientCredentials.clientAssertion;Wge(r,await ZA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),zge(r,o.assertionType)}if(Yge(r,FE.AUTHORIZATION_CODE_GRANT),HH(r),e.authenticationScheme===vs.POP){let o=new V8(this.cryptoUtils,this.performanceClient),s;e.popKid?s=this.cryptoUtils.encodeKid(e.popKid):s=(await bs(o.generateCnf.bind(o),it.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Jge(r,s)}else if(e.authenticationScheme===vs.SSH)if(e.sshJwk)Xge(r,e.sshJwk);else throw _c(DM);(!Tu.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&qH(r,e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{let o=Pte(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${o.uid}${Rd.CLIENT_INFO_SEPARATOR}${o.utid}`,type:JA.HOME_ACCOUNT_ID}}catch(o){this.logger.verbose("Could not parse client info for CCS Header: "+o)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case JA.HOME_ACCOUNT_ID:try{let o=xP(n.credential);MM(r,o)}catch(o){this.logger.verbose("Could not parse home account ID for CCS Header: "+o)}break;case JA.UPN:H8(r,n.credential);break}return e.embeddedClientId&&BM(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&OM(r,e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[TBe])&&OM(r,{[TBe]:"1"}),LH(r,e.correlationId,this.performanceClient),wP(r)}createLogoutUrlQueryString(e){let r=new Map;return e.postLogoutRedirectUri&&Y1t(r,e.postLogoutRedirectUri),e.correlationId&&GH(r,e.correlationId),e.idTokenHint&&K1t(r,e.idTokenHint),e.state&&$ge(r,e.state),e.logoutHint&&nvt(r,e.logoutHint),e.extraQueryParameters&&OM(r,e.extraQueryParameters),this.config.authOptions.instanceAware&&Kge(r),wP(r,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}};f();var lOi=300,jH=class extends hm{static{a(this,"RefreshTokenClient")}constructor(e,r){super(e,r)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(it.RefreshTokenClientAcquireToken,e.correlationId);let r=T1(),n=await bs(this.executeTokenRequest.bind(this),it.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=n.headers?.[sl.X_MS_REQUEST_ID],s=new gf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),bs(s.handleServerTokenResponse.bind(s),it.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,r,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw _c(PH);if(this.performanceClient?.addQueueMeasurement(it.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw Rt(wM);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await bs(this.acquireTokenWithCachedRefreshToken.bind(this),it.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(n){let o=n instanceof S1&&n.errorCode===j8,s=n instanceof XA&&n.errorCode===age.INVALID_GRANT_ERROR&&n.subError===age.CLIENT_MISMATCH_ERROR;if(o||s)return bs(this.acquireTokenWithCachedRefreshToken.bind(this),it.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw n}return bs(this.acquireTokenWithCachedRefreshToken.bind(this),it.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,r){this.performanceClient?.addQueueMeasurement(it.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);let n=JDr(this.cacheManager.getRefreshToken.bind(this.cacheManager),it.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,r,e.correlationId,void 0,this.performanceClient);if(!n)throw MBe(j8);if(n.expiresOn&&Ite(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||lOi))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(n.expiresOn)},e.correlationId),MBe(iAe);let o={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||vs.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:JA.HOME_ACCOUNT_ID}};try{return await bs(this.acquireToken.bind(this),it.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(o)}catch(s){if(s instanceof S1&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(n.expiresOn)},e.correlationId),s.subError===$8)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let c=wge(n);this.cacheManager.removeRefreshToken(c,e.correlationId)}throw s}}async executeTokenRequest(e,r){this.performanceClient?.addQueueMeasurement(it.RefreshTokenClientExecuteTokenRequest,e.correlationId);let n=this.createTokenQueryParameters(e),o=jo.appendQueryString(r.tokenEndpoint,n),s=await bs(this.createTokenRequestBody.bind(this),it.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),c=this.createTokenRequestHeaders(e.ccsCredential),l=Dte(this.config.authOptions.clientId,e);return bs(this.executePostToTokenEndpoint.bind(this),it.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,s,c,l,e.correlationId,it.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(it.RefreshTokenClientCreateTokenRequestBody,e.correlationId);let r=new Map;if(UH(r,e.embeddedClientId||e.tokenBodyParameters?.[RP]||this.config.authOptions.clientId),e.redirectUri&&QH(r,e.redirectUri),FH(r,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Yge(r,FE.REFRESH_TOKEN_GRANT),HH(r),Hge(r,this.config.libraryInfo),jge(r,this.config.telemetry.application),eAe(r),this.serverTelemetryManager&&!CBe(this.config)&&Zge(r,this.serverTelemetryManager),tvt(r,e.refreshToken),this.config.clientCredentials.clientSecret&&Vge(r,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let n=this.config.clientCredentials.clientAssertion;Wge(r,await ZA(n.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),zge(r,n.assertionType)}if(e.authenticationScheme===vs.POP){let n=new V8(this.cryptoUtils,this.performanceClient),o;e.popKid?o=this.cryptoUtils.encodeKid(e.popKid):o=(await bs(n.generateCnf.bind(n),it.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Jge(r,o)}else if(e.authenticationScheme===vs.SSH)if(e.sshJwk)Xge(r,e.sshJwk);else throw _c(DM);if((!Tu.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&qH(r,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case JA.HOME_ACCOUNT_ID:try{let n=xP(e.ccsCredential.credential);MM(r,n)}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case JA.UPN:H8(r,e.ccsCredential.credential);break}return e.embeddedClientId&&BM(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&OM(r,e.tokenBodyParameters),LH(r,e.correlationId,this.performanceClient),wP(r)}};f();var sAe=class extends hm{static{a(this,"SilentFlowClient")}constructor(e,r){super(e,r)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(it.SilentFlowClientAcquireCachedToken,e.correlationId);let r=Gc.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Tu.isEmptyObj(e.claims))throw this.setCacheOutcome(Gc.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Rt(PM);if(!e.account)throw Rt(wM);let n=e.account.tenantId||XDr(e.authority),o=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,o,n);if(s){if(Z_t(s.cachedAt)||Ite(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Gc.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Rt(PM);s.refreshOn&&Ite(s.refreshOn,0)&&(r=Gc.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Gc.NO_CACHED_ACCESS_TOKEN,e.correlationId),Rt(PM);let c=e.authority||this.authority.getPreferredCache(),l={account:this.cacheManager.readAccountFromCache(e.account,e.correlationId),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,n,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c)};return this.setCacheOutcome(r,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await bs(this.generateResultFromCacheRecord.bind(this),it.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(l,e),r]}setCacheOutcome(e,r){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},r),e!==Gc.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,r){this.performanceClient?.addQueueMeasurement(it.SilentFlowClientGenerateResultFromCacheRecord,r.correlationId);let n;if(e.idToken&&(n=NM(e.idToken.secret,this.config.cryptoInterface.base64Decode)),r.maxAge||r.maxAge===0){let o=n?.auth_time;if(!o)throw Rt(xM);Ige(o,r.maxAge)}return gf.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,r,n)}};var aAe={};Ri(aAe,{getAuthorizationCodePayload:()=>fOi,getAuthorizeUrl:()=>dOi,getStandardAuthorizeRequestParameters:()=>uOi,validateAuthorizationResponse:()=>t5r});f();function uOi(t,e,r,n){let o=e.correlationId,s=new Map;UH(s,e.embeddedClientId||e.extraQueryParameters?.[RP]||t.clientId);let c=[...e.scopes||[],...e.extraScopesToConsent||[]];if(FH(s,c,!0,t.authority.options.OIDCOptions?.defaultScopes),QH(s,e.redirectUri),GH(s,o),z1t(s,e.responseMode),HH(s),e.prompt&&(X1t(s,e.prompt),n?.addFields({prompt:e.prompt},o)),e.domainHint&&(J1t(s,e.domainHint),n?.addFields({domainHintFromRequest:!0},o)),e.prompt!==D8.SELECT_ACCOUNT)if(e.sid&&e.prompt===D8.NONE)r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),IBe(s,e.sid),n?.addFields({sidFromRequest:!0},o);else if(e.account){let l=hOi(e.account),u=mOi(e.account);if(u&&e.domainHint&&(r.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),u=null),u){r.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),Nte(s,u),n?.addFields({loginHintFromClaim:!0},o);try{let d=xP(e.account.homeAccountId);MM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(l&&e.prompt===D8.NONE){r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),IBe(s,l),n?.addFields({sidFromClaim:!0},o);try{let d=xP(e.account.homeAccountId);MM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)r.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),Nte(s,e.loginHint),H8(s,e.loginHint),n?.addFields({loginHintFromRequest:!0},o);else if(e.account.username){r.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),Nte(s,e.account.username),n?.addFields({loginHintFromUpn:!0},o);try{let d=xP(e.account.homeAccountId);MM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(r.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),Nte(s,e.loginHint),H8(s,e.loginHint),n?.addFields({loginHintFromRequest:!0},o));else r.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return e.nonce&&Z1t(s,e.nonce),e.state&&$ge(s,e.state),(e.claims||t.clientCapabilities&&t.clientCapabilities.length>0)&&qH(s,e.claims,t.clientCapabilities),e.embeddedClientId&&BM(s,t.clientId,t.redirectUri),t.instanceAware&&(!e.extraQueryParameters||!Object.keys(e.extraQueryParameters).includes(kte))&&Kge(s),s}a(uOi,"getStandardAuthorizeRequestParameters");function dOi(t,e,r,n){let o=wP(e,r,n);return jo.appendQueryString(t.authorizationEndpoint,o)}a(dOi,"getAuthorizeUrl");function fOi(t,e){if(t5r(t,e),!t.code)throw Rt(bH);return t}a(fOi,"getAuthorizationCodePayload");function t5r(t,e){if(!t.state||!e)throw t.state?Rt(B8,"Cached State"):Rt(B8,"Server State");let r,n;try{r=decodeURIComponent(t.state)}catch{throw Rt(Cx,t.state)}try{n=decodeURIComponent(e)}catch{throw Rt(Cx,t.state)}if(r!==n)throw Rt(hH);if(t.error||t.error_description||t.suberror){let o=pOi(t);throw DBe(t.error,t.error_description,t.suberror)?new S1(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||"",o):new XA(t.error||"",t.error_description,t.suberror,o)}}a(t5r,"validateAuthorizationResponse");function pOi(t){let e="code=",r=t.error_uri?.lastIndexOf(e);return r&&r>=0?t.error_uri?.substring(r+e.length):void 0}a(pOi,"parseServerErrorNo");function hOi(t){return t.idTokenClaims?.sid||null}a(hOi,"extractAccountSid");function mOi(t){return t.idTokenClaims?.login_hint||null}a(mOi,"extractLoginHint");f();var r5r=",",n5r="|";function gOi(t){let{skus:e,libraryName:r,libraryVersion:n,extensionName:o,extensionVersion:s}=t,c=new Map([[0,[r,n]],[2,[o,s]]]),l=[];if(e?.length){if(l=e.split(r5r),l.length<4)return e}else l=Array.from({length:4},()=>n5r);return c.forEach((u,d)=>{u.length===2&&u[0]?.length&&u[1]?.length&&AOi({skuArr:l,index:d,skuName:u[0],skuVersion:u[1]})}),l.join(r5r)}a(gOi,"makeExtraSkuString");function AOi(t){let{skuArr:e,index:r,skuName:n,skuVersion:o}=t;r>=e.length||(e[r]=[n,o].join(n5r))}a(AOi,"setSku");var $H=class t{static{a(this,"ServerTelemetryManager")}constructor(e,r){this.cacheOutcome=Gc.NOT_APPLICABLE,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||pt.EMPTY_STRING,this.wrapperVer=e.wrapperVer||pt.EMPTY_STRING,this.telemetryCacheKey=pp.CACHE_KEY+Rd.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){let e=`${this.apiId}${pp.VALUE_SEPARATOR}${this.cacheOutcome}`,r=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n?.length&&r.push(`broker_error=${n}`);let o=r.join(pp.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),c=[e,s].join(pp.VALUE_SEPARATOR);return[pp.SCHEMA_VERSION,c,o].join(pp.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(pp.VALUE_SEPARATOR),o=e.errors.slice(0,r).join(pp.VALUE_SEPARATOR),s=e.errors.length,c=r=pp.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Hi?e.subError?r.errors.push(e.subError):e.errorCode?r.errors.push(e.errorCode):r.errors.push(e.toString()):r.errors.push(e.toString()):r.errors.push(pp.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r,this.correlationId)}incrementCacheHits(){let e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){let e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let o={failedRequests:e.failedRequests.slice(r*2),errors:e.errors.slice(r),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let r,n=0,o=0,s=e.errors.length;for(r=0;rJSON.parse(l))},c=new fm;G8.toObject(c,s),r[n]=c}),r}static deserializeIdTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,realm:o.realm};r[n]=s}),r}static deserializeAccessTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,realm:o.realm,target:o.target,cachedAt:o.cached_at,expiresOn:o.expires_on,extendedExpiresOn:o.extended_expires_on,refreshOn:o.refresh_on,keyId:o.key_id,tokenType:o.token_type,requestedClaims:o.requestedClaims,requestedClaimsHash:o.requestedClaimsHash,userAssertionHash:o.userAssertionHash};r[n]=s}),r}static deserializeRefreshTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,familyId:o.family_id,target:o.target,realm:o.realm};r[n]=s}),r}static deserializeAppMetadata(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n];r[n]={clientId:o.client_id,environment:o.environment,familyId:o.family_id}}),r}static deserializeAllCache(e){return{accounts:e.Account?this.deserializeAccounts(e.Account):{},idTokens:e.IdToken?this.deserializeIdTokens(e.IdToken):{},accessTokens:e.AccessToken?this.deserializeAccessTokens(e.AccessToken):{},refreshTokens:e.RefreshToken?this.deserializeRefreshTokens(e.RefreshToken):{},appMetadata:e.AppMetadata?this.deserializeAppMetadata(e.AppMetadata):{}}}};f();f();var i5r="system_assigned_managed_identity",bOi="managed_identity",dvt=`https://login.microsoftonline.com/${bOi}/`,UE={AUTHORIZATION_HEADER_NAME:"Authorization",METADATA_HEADER_NAME:"Metadata",APP_SERVICE_SECRET_HEADER_NAME:"X-IDENTITY-HEADER",ML_AND_SF_SECRET_HEADER_NAME:"secret"},s0={API_VERSION:"api-version",RESOURCE:"resource",SHA256_TOKEN_TO_REFRESH:"token_sha256_to_refresh",XMS_CC:"xms_cc"},Ei={AZURE_POD_IDENTITY_AUTHORITY_HOST:"AZURE_POD_IDENTITY_AUTHORITY_HOST",DEFAULT_IDENTITY_CLIENT_ID:"DEFAULT_IDENTITY_CLIENT_ID",IDENTITY_ENDPOINT:"IDENTITY_ENDPOINT",IDENTITY_HEADER:"IDENTITY_HEADER",IDENTITY_SERVER_THUMBPRINT:"IDENTITY_SERVER_THUMBPRINT",IMDS_ENDPOINT:"IMDS_ENDPOINT",MSI_ENDPOINT:"MSI_ENDPOINT",MSI_SECRET:"MSI_SECRET"},Ni={APP_SERVICE:"AppService",AZURE_ARC:"AzureArc",CLOUD_SHELL:"CloudShell",DEFAULT_TO_IMDS:"DefaultToImds",IMDS:"Imds",MACHINE_LEARNING:"MachineLearning",SERVICE_FABRIC:"ServiceFabric"},ed={SYSTEM_ASSIGNED:"system-assigned",USER_ASSIGNED_CLIENT_ID:"user-assigned-client-id",USER_ASSIGNED_RESOURCE_ID:"user-assigned-resource-id",USER_ASSIGNED_OBJECT_ID:"user-assigned-object-id"},jl={GET:"get",POST:"post"},BBe={SUCCESS_RANGE_START:Gi.SUCCESS_RANGE_START,SUCCESS_RANGE_END:Gi.SUCCESS_RANGE_END,SERVER_ERROR:Gi.SERVER_ERROR},o5r="REGION_NAME",s5r="MSAL_FORCE_REGION",a5r=32,c5r={SHA256:"sha256"},LBe={CV_CHARSET:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"},mp={MSAL_SKU:"msal.js.node",JWT_BEARER_ASSERTION_TYPE:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",AUTHORIZATION_PENDING:"authorization_pending",HTTP_PROTOCOL:"http://",LOCALHOST:"localhost"},FM={acquireTokenSilent:62,acquireTokenByUsernamePassword:371,acquireTokenByDeviceCode:671,acquireTokenByClientCredential:771,acquireTokenByCode:871,acquireTokenByRefreshToken:872},cT={RSA_256:"RS256",PSS_256:"PS256",X5T_256:"x5t#S256",X5T:"x5t",X5C:"x5c",AUDIENCE:"aud",EXPIRATION_TIME:"exp",ISSUER:"iss",SUBJECT:"sub",NOT_BEFORE:"nbf",JWT_ID:"jti"},FBe={INTERVAL_MS:100,TIMEOUT_MS:5e3},l5r=4096;f();f();f();f();var Mte=class{static{a(this,"NetworkUtils")}static getNetworkResponse(e,r,n){return{headers:e,body:r,status:n}}static urlToHttpOptions(e){let r={protocol:e.protocol,hostname:e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname||""}${e.search||""}`,href:e.href};return e.port!==""&&(r.port=Number(e.port)),(e.username||e.password)&&(r.auth=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`),r}};var UBe=de(require("http"),1),fvt=de(require("https"),1);var Ote=class{static{a(this,"HttpClient")}constructor(e,r){this.proxyUrl=e||"",this.customAgentOptions=r||{}}async sendGetRequestAsync(e,r,n){return this.proxyUrl?u5r(e,this.proxyUrl,jl.GET,r,this.customAgentOptions,n):d5r(e,jl.GET,r,this.customAgentOptions,n)}async sendPostRequestAsync(e,r){return this.proxyUrl?u5r(e,this.proxyUrl,jl.POST,r,this.customAgentOptions):d5r(e,jl.POST,r,this.customAgentOptions)}},u5r=a((t,e,r,n,o,s)=>{let c=new URL(t),l=new URL(e),u=n?.headers||{},d={host:l.hostname,port:l.port,method:"CONNECT",path:c.hostname,headers:u};o&&Object.keys(o).length&&(d.agent=new UBe.default.Agent(o));let p="";if(r===jl.POST){let m=n?.body||"";p=`Content-Type: application/x-www-form-urlencoded\r -Content-Length: ${m.length}\r +${n}`),this.errors=e,this.name=UDr}};function LDr(t){return{error:t.error,errorDescription:t.error_description,correlationId:t.correlation_id,errorCodes:t.error_codes,timestamp:t.timestamp,traceId:t.trace_id}}a(LDr,"convertOAuthErrorResponseToErrorResponse");var zb=class extends Error{static{a(this,"AuthenticationRequiredError")}scopes;getTokenOptions;constructor(e){super(e.message,e.cause?{cause:e.cause}:void 0),this.scopes=e.scopes,this.getTokenOptions=e.getTokenOptions,this.name="AuthenticationRequiredError"}};f();f();f();f();var QDr=require("node:os"),qDr=de(require("node:util"),1),GDr=de(require("node:process"),1);function HDr(t,...e){GDr.stderr.write(`${qDr.default.format(t,...e)}${QDr.EOL}`)}a(HDr,"log");var jDr=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,$Dr,z_t=[],Y_t=[],X4e=[];jDr&&K_t(jDr);var VDr=Object.assign(t=>WDr(t),{enable:K_t,enabled:J_t,disable:d4i,log:HDr});function K_t(t){$Dr=t,z_t=[],Y_t=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?Y_t.push(new RegExp(`^${n.substr(1)}$`)):z_t.push(new RegExp(`^${n}$`));for(let n of X4e)n.enabled=J_t(n.namespace)}a(K_t,"enable");function J_t(t){if(t.endsWith("*"))return!0;for(let e of Y_t)if(e.test(t))return!1;for(let e of z_t)if(e.test(t))return!0;return!1}a(J_t,"enabled");function d4i(){let t=$Dr||"";return K_t(""),t}a(d4i,"disable");function WDr(t){let e=Object.assign(r,{enabled:J_t(t),destroy:f4i,log:VDr.log,namespace:t,extend:p4i});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),X4e.push(e),e}a(WDr,"createDebugger");function f4i(){let t=X4e.indexOf(this);return t>=0?(X4e.splice(t,1),!0):!1}a(f4i,"destroy");function p4i(t){let e=WDr(`${this.namespace}:${t}`);return e.log=this.log,e}a(p4i,"extend");var xee=VDr;var YDr=new Set,Z4e=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,tOe,X_t=xee("azure");X_t.log=(...t)=>{xee.log(...t)};var Z_t=["verbose","info","warning","error"];Z4e&&(XDr(Z4e)?h4i(Z4e):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Z4e}'; logging is not enabled. Acceptable values: ${Z_t.join(", ")}.`));function h4i(t){if(t&&!XDr(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${Z_t.join(",")}`);tOe=t;let e=[];for(let r of YDr)JDr(r)&&e.push(r.namespace);xee.enable(e.join(","))}a(h4i,"setLogLevel");function rOe(){return tOe}a(rOe,"getLogLevel");var zDr={verbose:400,info:300,warning:200,error:100};function p8(t){let e=X_t.extend(t);return KDr(X_t,e),{error:eOe(e,"error"),warning:eOe(e,"warning"),info:eOe(e,"info"),verbose:eOe(e,"verbose")}}a(p8,"createClientLogger");function KDr(t,e){e.log=(...r)=>{t.log(...r)}}a(KDr,"patchLogMethod");function eOe(t,e){let r=Object.assign(t.extend(e),{level:e});if(KDr(t,r),JDr(r)){let n=xee.disable();xee.enable(n+","+r.namespace)}return YDr.add(r),r}a(eOe,"createLogger");function JDr(t){return!!(tOe&&zDr[t.level]<=zDr[tOe])}a(JDr,"shouldEnable");function XDr(t){return Z_t.includes(t)}a(XDr,"isAzureLogLevel");var l1=p8("identity");function nOe(t){return t.reduce((e,r)=>(process.env[r]?e.assigned.push(r):e.missing.push(r),e),{missing:[],assigned:[]})}a(nOe,"processEnvVars");function ap(t){return`SUCCESS. Scopes: ${Array.isArray(t)?t.join(", "):t}.`}a(ap,"formatSuccess");function zo(t,e){let r="ERROR.";return t?.length&&(r+=` Scopes: ${Array.isArray(t)?t.join(", "):t}.`),`${r} Error message: ${typeof e=="string"?e:e.message}.`}a(zo,"formatError");function ZDr(t,e,r=l1){let n=e?`${e.fullTitle} ${t}`:t;function o(u){r.info(`${n} =>`,u)}a(o,"info");function s(u){r.warning(`${n} =>`,u)}a(s,"warning");function c(u){r.verbose(`${n} =>`,u)}a(c,"verbose");function l(u){r.error(`${n} =>`,u)}return a(l,"error"),{title:t,fullTitle:n,info:o,warning:s,verbose:c,error:l}}a(ZDr,"credentialLoggerInstance");function Mi(t,e=l1){let r=ZDr(t,void 0,e);return{...r,parent:e,getToken:ZDr("=> getToken()",r,e)}}a(Mi,"credentialLogger");f();f();f();f();var wee={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function eNr(t={}){let e=new eCt(t.parentContext);return t.span&&(e=e.setValue(wee.span,t.span)),t.namespace&&(e=e.setValue(wee.namespace,t.namespace)),e}a(eNr,"createTracingContext");var eCt=class t{static{a(this,"TracingContextImpl")}constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};f();var tNr=de(tCt(),1),oOe=tNr.state;function m4i(){return{end:a(()=>{},"end"),isRecording:a(()=>!1,"isRecording"),recordException:a(()=>{},"recordException"),setAttribute:a(()=>{},"setAttribute"),setStatus:a(()=>{},"setStatus"),addEvent:a(()=>{},"addEvent")}}a(m4i,"createDefaultTracingSpan");function g4i(){return{createRequestHeaders:a(()=>({}),"createRequestHeaders"),parseTraceparentHeader:a(()=>{},"parseTraceparentHeader"),startSpan:a((t,e)=>({span:m4i(),tracingContext:eNr({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}a(g4i,"createDefaultInstrumenter");function Ame(){return oOe.instrumenterImplementation||(oOe.instrumenterImplementation=g4i()),oOe.instrumenterImplementation}a(Ame,"getInstrumenter");f();function yme(t){let{namespace:e,packageName:r,packageVersion:n}=t;function o(d,p,h){var m;let g=Ame().startSpan(d,Object.assign(Object.assign({},h),{packageName:r,packageVersion:n,tracingContext:(m=p?.tracingOptions)===null||m===void 0?void 0:m.tracingContext})),A=g.tracingContext,y=g.span;A.getValue(wee.namespace)||(A=A.setValue(wee.namespace,e)),y.setAttribute("az.namespace",A.getValue(wee.namespace));let E=Object.assign({},p,{tracingOptions:Object.assign(Object.assign({},p?.tracingOptions),{tracingContext:A})});return{span:y,updatedOptions:E}}a(o,"startSpan");async function s(d,p,h,m){let{span:g,updatedOptions:A}=o(d,p,m);try{let y=await c(A.tracingOptions.tracingContext,()=>Promise.resolve(h(A,g)));return g.setStatus({status:"success"}),y}catch(y){throw g.setStatus({status:"error",error:y}),y}finally{g.end()}}a(s,"withSpan");function c(d,p,...h){return Ame().withContext(d,p,...h)}a(c,"withContext");function l(d){return Ame().parseTraceparentHeader(d)}a(l,"parseTraceparentHeader");function u(d){return Ame().createRequestHeaders(d)}return a(u,"createRequestHeaders"),{startSpan:o,withSpan:s,withContext:c,parseTraceparentHeader:l,createRequestHeaders:u}}a(yme,"createTracingClient");var Ba=yme({namespace:"Microsoft.AAD",packageName:"@azure/identity",packageVersion:Y4e});var rCt=Mi("ChainedTokenCredential"),Eme=class{static{a(this,"ChainedTokenCredential")}_sources=[];constructor(...e){this._sources=e}async getToken(e,r={}){let{token:n}=await this.getTokenInternal(e,r);return n}async getTokenInternal(e,r={}){let n=null,o,s=[];return Ba.withSpan("ChainedTokenCredential.getToken",r,async c=>{for(let l=0;l0){let l=new gme(s,"ChainedTokenCredential authentication failed.");throw rCt.getToken.info(zo(e,l)),l}if(rCt.getToken.info(`Result for ${o.constructor.name}: ${ap(e)}`),n===null)throw new un("Failed to retrieve a valid token");return{token:n,successfulCredential:o}})}};f();f();f();f();var m1={};ui(m1,{AuthError:()=>eo,AuthErrorCodes:()=>Yee,AzureCloudInstance:()=>AM,ClientAssertion:()=>CM,ClientAuthError:()=>A8,ClientAuthErrorCodes:()=>cf,ClientConfigurationError:()=>Bee,ClientConfigurationErrorCodes:()=>Fee,ConfidentialClientApplication:()=>fte,CryptoProvider:()=>AP,DistributedCachePlugin:()=>$Be,InteractionRequiredAuthError:()=>f1,InteractionRequiredAuthErrorCodes:()=>QOe,LogLevel:()=>ju,Logger:()=>lp,ManagedIdentityApplication:()=>pte,ManagedIdentitySourceNames:()=>Pi,PromptValue:()=>e7i,ProtocolMode:()=>bg,PublicClientApplication:()=>ute,ResponseMode:()=>t7i,ServerError:()=>GA,TokenCache:()=>Xee,TokenCacheContext:()=>u1,internals:()=>Rvt,version:()=>h1});f();var Rvt={};ui(Rvt,{Deserializer:()=>_M,Serializer:()=>h8});f();f();var h8=class{static{a(this,"Serializer")}static serializeJSONBlob(e){return JSON.stringify(e)}static serializeAccounts(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,realm:o.realm,local_account_id:o.localAccountId,username:o.username,authority_type:o.authorityType,name:o.name,client_info:o.clientInfo,last_modification_time:o.lastModificationTime,last_modification_app:o.lastModificationApp,tenantProfiles:o.tenantProfiles?.map(s=>JSON.stringify(s))}}),r}static serializeIdTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,realm:o.realm}}),r}static serializeAccessTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,realm:o.realm,target:o.target,cached_at:o.cachedAt,expires_on:o.expiresOn,extended_expires_on:o.extendedExpiresOn,refresh_on:o.refreshOn,key_id:o.keyId,token_type:o.tokenType,userAssertionHash:o.userAssertionHash,resource:o.resource}}),r}static serializeRefreshTokens(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={home_account_id:o.homeAccountId,environment:o.environment,credential_type:o.credentialType,client_id:o.clientId,secret:o.secret,family_id:o.familyId,target:o.target,realm:o.realm}}),r}static serializeAppMetadata(e){let r={};return Object.keys(e).map(function(n){let o=e[n];r[n]={client_id:o.clientId,environment:o.environment,family_id:o.familyId}}),r}static serializeAllCache(e){return{Account:this.serializeAccounts(e.accounts),IdToken:this.serializeIdTokens(e.idTokens),AccessToken:this.serializeAccessTokens(e.accessTokens),RefreshToken:this.serializeRefreshTokens(e.refreshTokens),AppMetadata:this.serializeAppMetadata(e.appMetadata)}}};f();f();f();var Hr={};ui(Hr,{addApplicationTelemetry:()=>Nme,addAuthorizationCode:()=>nvt,addBrokerParameters:()=>gM,addCcsOid:()=>hM,addCcsUpn:()=>y8,addClaims:()=>HG,addCliData:()=>svt,addClientAssertion:()=>Bme,addClientAssertionType:()=>Lme,addClientCapabilitiesToClaims:()=>sNr,addClientId:()=>qG,addClientInfo:()=>$G,addClientSecret:()=>Ome,addCodeChallengeParams:()=>vOi,addCodeVerifier:()=>ovt,addCorrelationId:()=>jG,addDeviceCode:()=>bOi,addDomainHint:()=>evt,addEARParameters:()=>wOi,addExtraParameters:()=>mM,addGrantType:()=>Fme,addIdTokenHint:()=>Z1t,addInstanceAware:()=>Ume,addLibraryInfo:()=>Dme,addLoginHint:()=>Qee,addLogoutHint:()=>avt,addNativeBroker:()=>COi,addNonce:()=>rvt,addOboAssertion:()=>TOi,addPassword:()=>xOi,addPopToken:()=>Qme,addPostLogoutRedirectUri:()=>X1t,addPrompt:()=>tvt,addRedirectUri:()=>GG,addRefreshToken:()=>ivt,addRequestTokenUse:()=>SOi,addResource:()=>jme,addResponseMode:()=>J1t,addResponseType:()=>_Oi,addScopes:()=>QG,addServerTelemetry:()=>Gme,addSid:()=>ROe,addSshJwk:()=>qme,addState:()=>Mme,addThrottling:()=>Hme,addUsername:()=>IOi,instrumentBrokerParams:()=>UG});f();var Ht={};ui(Ht,{AADAuthority:()=>cx,AAD_INSTANCE_DISCOVERY_ENDPT:()=>aCt,AAD_TENANT_DOMAIN_SUFFIX:()=>cCt,ADFS:()=>oCt,APP_METADATA:()=>Nee,AUTHORITY_METADATA_CACHE_KEY:()=>Mee,AUTHORITY_METADATA_REFRESH_TIME_SECONDS:()=>TCt,AUTHORIZATION_PENDING:()=>_4i,AZURE_REGION_AUTO_DISCOVER_FLAG:()=>fCt,AuthenticationScheme:()=>Hu,AuthorityMetadataSource:()=>vg,CACHE_ACCOUNT_TYPE_ADFS:()=>vCt,CACHE_ACCOUNT_TYPE_GENERIC:()=>pOe,CACHE_ACCOUNT_TYPE_MSAV1:()=>U4i,CACHE_ACCOUNT_TYPE_MSSTS:()=>CCt,CACHE_KEY_SEPARATOR:()=>MG,CIAM_AUTH_URL:()=>sOe,CLIENT_INFO:()=>bCt,CLIENT_INFO_SEPARATOR:()=>Dee,CLIENT_MISMATCH_ERROR:()=>MCt,CODE_GRANT_TYPE:()=>y4i,CONSUMER_UTID:()=>A4i,CacheOutcome:()=>lx,CacheType:()=>Q4i,ClaimsRequestKeys:()=>kee,CodeChallengeMethodValues:()=>L4i,CredentialType:()=>cp,DEFAULT_AUTHORITY:()=>rNr,DEFAULT_AUTHORITY_HOST:()=>iCt,DEFAULT_COMMON_TENANT:()=>_me,DEFAULT_MAX_THROTTLE_TIME_SECONDS:()=>kCt,DEFAULT_THROTTLE_TIME_SECONDS:()=>PCt,DEFAULT_TOKEN_RENEWAL_OFFSET_SEC:()=>OCt,DSTS:()=>sCt,EMAIL_SCOPE:()=>oNr,EncodingTypes:()=>j4i,FORWARD_SLASH:()=>Ree,GrantType:()=>bme,HTTP_BAD_REQUEST:()=>dOe,HTTP_CLIENT_ERROR:()=>S4i,HTTP_CLIENT_ERROR_RANGE_END:()=>ACt,HTTP_CLIENT_ERROR_RANGE_START:()=>gCt,HTTP_GATEWAY_TIMEOUT:()=>N4i,HTTP_GONE:()=>R4i,HTTP_MULTI_SIDED_ERROR:()=>M4i,HTTP_NOT_FOUND:()=>x4i,HTTP_REDIRECT:()=>T4i,HTTP_REQUEST_TIMEOUT:()=>w4i,HTTP_SERVER_ERROR:()=>k4i,HTTP_SERVER_ERROR_RANGE_END:()=>ECt,HTTP_SERVER_ERROR_RANGE_START:()=>yCt,HTTP_SERVICE_UNAVAILABLE:()=>D4i,HTTP_SUCCESS:()=>uOe,HTTP_SUCCESS_RANGE_END:()=>b4i,HTTP_SUCCESS_RANGE_START:()=>v4i,HTTP_TOO_MANY_REQUESTS:()=>P4i,HTTP_UNAUTHORIZED:()=>I4i,HeaderNames:()=>af,HttpMethod:()=>O4i,IMDS_ENDPOINT:()=>lOe,IMDS_TIMEOUT:()=>dCt,IMDS_VERSION:()=>uCt,INVALID_GRANT_ERROR:()=>NCt,INVALID_INSTANCE:()=>mCt,JsonWebTokenTypes:()=>G4i,KNOWN_PUBLIC_CLOUDS:()=>hCt,NOT_APPLICABLE:()=>Cme,NOT_AVAILABLE:()=>NG,OAuthResponseType:()=>F4i,OFFLINE_ACCESS_SCOPE:()=>cOe,OIDC_DEFAULT_SCOPES:()=>Pee,OIDC_SCOPES:()=>fOe,ONE_DAY_IN_MS:()=>H4i,OPENID_SCOPE:()=>nNr,PROFILE_SCOPE:()=>iNr,PasswordGrantConstants:()=>gOe,PersistentCacheKeys:()=>B4i,PromptValue:()=>vme,REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:()=>pCt,RESOURCE_DELIM:()=>aOe,RegionDiscoveryOutcomes:()=>Ime,RegionDiscoverySources:()=>g8,ResponseMode:()=>_Ct,S256_CODE_CHALLENGE_METHOD:()=>E4i,SERVER_TELEM_CACHE_KEY:()=>Tme,SERVER_TELEM_CATEGORY_SEPARATOR:()=>mOe,SERVER_TELEM_MAX_CACHED_ERRORS:()=>ICt,SERVER_TELEM_MAX_CUR_HEADER_BYTES:()=>q4i,SERVER_TELEM_MAX_LAST_HEADER_BYTES:()=>SCt,SERVER_TELEM_OVERFLOW_FALSE:()=>wCt,SERVER_TELEM_OVERFLOW_TRUE:()=>xCt,SERVER_TELEM_SCHEMA_VERSION:()=>hOe,SERVER_TELEM_UNKNOWN_ERROR:()=>RCt,SERVER_TELEM_VALUE_SEPARATOR:()=>m8,SHR_NONCE_VALIDITY:()=>C4i,SKU:()=>nCt,THE_FAMILY_ID:()=>OG,THROTTLING_PREFIX:()=>Sme,URL_FORM_CONTENT_TYPE:()=>lCt,X_MS_LIB_CAPABILITY_VALUE:()=>DCt});f();var nCt="msal.js.common",rNr="https://login.microsoftonline.com/common/",iCt="login.microsoftonline.com",_me="common",oCt="adfs",sCt="dstsv2",aCt=`${rNr}discovery/instance?api-version=1.1&authorization_endpoint=`,sOe=".ciamlogin.com",cCt=".onmicrosoft.com",aOe="|",A4i="9188040d-6c67-4c5b-b112-36a304b66dad",nNr="openid",iNr="profile",cOe="offline_access",oNr="email",y4i="authorization_code",E4i="S256",lCt="application/x-www-form-urlencoded;charset=utf-8",_4i="authorization_pending",Cme="N/A",NG="Not Available",Ree="/",lOe="http://169.254.169.254/metadata/instance/compute/location",uCt="2020-06-01",dCt=2e3,fCt="TryAutoDetect",pCt="login.microsoft.com",hCt=["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],C4i=240,mCt="invalid_instance",uOe=200,v4i=200,b4i=299,T4i=302,S4i=400,gCt=400,dOe=400,I4i=401,x4i=404,w4i=408,R4i=410,P4i=429,ACt=499,k4i=500,yCt=500,D4i=503,N4i=504,ECt=599,M4i=600,O4i={GET:"GET",POST:"POST"},Pee=[nNr,iNr,cOe],fOe=[...Pee,oNr],af={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},B4i={ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},cx={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},kee={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},vme={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},L4i={PLAIN:"plain",S256:"S256"},F4i={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},_Ct={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},bme={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},CCt="MSSTS",vCt="ADFS",U4i="MSA",pOe="Generic",MG="-",Dee=".",cp={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Q4i={ADFS:1001,MSA:1002,MSSTS:1003,GENERIC:1004,ACCESS_TOKEN:2001,REFRESH_TOKEN:2002,ID_TOKEN:2003,APP_METADATA:3001,UNDEFINED:9999},Nee="appmetadata",bCt="client_info",OG="1",Mee="authority-metadata",TCt=3600*24,vg={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},hOe=5,q4i=80,SCt=330,ICt=50,Tme="server-telemetry",mOe="|",m8=",",xCt="1",wCt="0",RCt="unknown_error",Hu={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},PCt=60,kCt=3600,Sme="throttling",DCt="retry-after, h429",NCt="invalid_grant",MCt="client_mismatch",gOe={username:"username",password:"password"},g8={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Ime={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},lx={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},G4i={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},H4i=864e5,OCt=300,j4i={BASE64:"base64",HEX:"hex",UTF8:"utf-8"};var BG={};ui(BG,{ACCESS_TOKEN:()=>W4i,BROKER_CLIENT_ID:()=>xme,BROKER_REDIRECT_URI:()=>COe,CCS_HEADER:()=>tOi,CLAIMS:()=>UCt,CLIENT_ASSERTION:()=>l1t,CLIENT_ASSERTION_TYPE:()=>u1t,CLIENT_ID:()=>pP,CLIENT_INFO:()=>X4i,CLIENT_REQUEST_ID:()=>YCt,CLIENT_SECRET:()=>c1t,CLI_DATA:()=>C1t,CODE:()=>$Ct,CODE_CHALLENGE:()=>VCt,CODE_CHALLENGE_METHOD:()=>WCt,CODE_VERIFIER:()=>zCt,DEVICE_CODE:()=>a1t,DOMAIN_HINT:()=>A1t,EAR_JWE_CRYPTO:()=>E1t,EAR_JWK:()=>y1t,ERROR:()=>$4i,ERROR_DESCRIPTION:()=>V4i,EXPIRES_IN:()=>Y4i,FOCI:()=>eOi,GRANT_TYPE:()=>FCt,ID_TOKEN:()=>z4i,ID_TOKEN_HINT:()=>s1t,INSTANCE_AWARE:()=>Oee,LOGIN_HINT:()=>g1t,LOGOUT_HINT:()=>h1t,NATIVE_BROKER:()=>p1t,NONCE:()=>HCt,OBO_ASSERTION:()=>d1t,ON_BEHALF_OF:()=>Z4i,POST_LOGOUT_URI:()=>o1t,PROMPT:()=>jCt,REDIRECT_URI:()=>AOe,REFRESH_TOKEN:()=>qCt,REFRESH_TOKEN_EXPIRES_IN:()=>K4i,REQUESTED_TOKEN_USE:()=>f1t,REQ_CNF:()=>EOe,RESOURCE:()=>_1t,RESPONSE_MODE:()=>LCt,RESPONSE_TYPE:()=>BCt,RETURN_SPA_CODE:()=>_Oe,SCOPE:()=>QCt,SESSION_STATE:()=>J4i,SID:()=>m1t,STATE:()=>GCt,TOKEN_TYPE:()=>yOe,X_APP_NAME:()=>n1t,X_APP_VER:()=>i1t,X_CLIENT_CPU:()=>ZCt,X_CLIENT_CURR_TELEM:()=>e1t,X_CLIENT_EXTRA_SKU:()=>rOi,X_CLIENT_LAST_TELEM:()=>t1t,X_CLIENT_OS:()=>XCt,X_CLIENT_SKU:()=>KCt,X_CLIENT_VER:()=>JCt,X_MS_LIB_CAPABILITY:()=>r1t});f();var pP="client_id",AOe="redirect_uri",BCt="response_type",LCt="response_mode",FCt="grant_type",UCt="claims",QCt="scope",$4i="error",V4i="error_description",W4i="access_token",z4i="id_token",qCt="refresh_token",Y4i="expires_in",K4i="refresh_token_expires_in",GCt="state",HCt="nonce",jCt="prompt",J4i="session_state",X4i="client_info",$Ct="code",VCt="code_challenge",WCt="code_challenge_method",zCt="code_verifier",YCt="client-request-id",KCt="x-client-SKU",JCt="x-client-VER",XCt="x-client-OS",ZCt="x-client-CPU",e1t="x-client-current-telemetry",t1t="x-client-last-telemetry",r1t="x-ms-lib-capability",n1t="x-app-name",i1t="x-app-ver",o1t="post_logout_redirect_uri",s1t="id_token_hint",a1t="device_code",c1t="client_secret",l1t="client_assertion",u1t="client_assertion_type",yOe="token_type",EOe="req_cnf",d1t="assertion",f1t="requested_token_use",Z4i="on_behalf_of",eOi="foci",tOi="X-AnchorMailbox",_Oe="return_spa_code",p1t="nativebroker",h1t="logout_hint",m1t="sid",g1t="login_hint",A1t="domain_hint",rOi="x-client-xtra-sku",xme="brk_client_id",COe="brk_redirect_uri",Oee="instance_aware",y1t="ear_jwk",E1t="ear_jwe_crypto",_1t="resource",C1t="clidata";f();f();f();function vOe(t){return`See https://aka.ms/msal.js.errors#${t} for details`}a(vOe,"getDefaultErrorMessage");var eo=class t extends Error{static{a(this,"AuthError")}constructor(e,r,n){let o=r||(e?vOe(e):""),s=o?`${e}: ${o}`:e;super(s),Object.setPrototypeOf(this,t.prototype),this.errorCode=e||"",this.errorMessage=o||"",this.subError=n||"",this.name="AuthError"}setCorrelationId(e){this.correlationId=e}};function LG(t,e){return new eo(t,e||vOe(t))}a(LG,"createAuthError");var Bee=class t extends eo{static{a(this,"ClientConfigurationError")}constructor(e){super(e),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype)}};function mc(t){return new Bee(t)}a(mc,"createClientConfigurationError");f();var Zc=class{static{a(this,"StringUtils")}static isEmptyObj(e){if(e)try{let r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0}static startsWith(e,r){return e.indexOf(r)===0}static endsWith(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length}static queryStringToObject(e){let r={},n=e.split("&"),o=a(s=>decodeURIComponent(s.replace(/\+/g," ")),"decode");return n.forEach(s=>{if(s.trim()){let[c,l]=s.split(/=(.+)/g,2);c&&l&&(r[o(c)]=o(l))}}),r}static trimArrayEntries(e){return e.map(r=>r.trim())}static removeEmptyStringsFromArray(e){return e.filter(r=>!!r)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}};f();var A8=class t extends eo{static{a(this,"ClientAuthError")}constructor(e,r){super(e,r),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype)}};function Ct(t,e){return new A8(t,e)}a(Ct,"createClientAuthError");var Fee={};ui(Fee,{authorityMismatch:()=>uOi,authorityUriInsecure:()=>b1t,cannotAllowPlatformBroker:()=>lOi,cannotSetOIDCOptions:()=>cOi,claimsRequestParsingError:()=>nOi,emptyInputScopesError:()=>S1t,invalidAuthenticationHeader:()=>aOi,invalidAuthorityMetadata:()=>R1t,invalidClaims:()=>bOe,invalidCloudDiscoveryMetadata:()=>TOe,invalidCodeChallengeMethod:()=>iOi,invalidRequestMethodForEAR:()=>dOi,logoutRequestEmpty:()=>x1t,missingNonceAuthenticationHeader:()=>sOi,missingSshJwk:()=>wme,missingSshKid:()=>oOi,pkceParamsMissing:()=>w1t,redirectUriEmpty:()=>v1t,tokenRequestEmpty:()=>I1t,untrustedAuthority:()=>P1t,urlEmptyError:()=>T1t,urlParseError:()=>Lee});f();var v1t="redirect_uri_empty",nOi="claims_request_parsing_error",b1t="authority_uri_insecure",Lee="url_parse_error",T1t="empty_url_error",S1t="empty_input_scopes_error",bOe="invalid_claims",I1t="token_request_empty",x1t="logout_request_empty",iOi="invalid_code_challenge_method",w1t="pkce_params_missing",TOe="invalid_cloud_discovery_metadata",R1t="invalid_authority_metadata",P1t="untrusted_authority",wme="missing_ssh_jwk",oOi="missing_ssh_kid",sOi="missing_nonce_authentication_header",aOi="invalid_authentication_header",cOi="cannot_set_OIDCOptions",lOi="cannot_allow_platform_broker",uOi="authority_mismatch",dOi="invalid_request_method_for_EAR";var cf={};ui(cf,{authTimeNotFound:()=>Rme,authorizationCodeMissingFromServerResponse:()=>V1t,bindingKeyNotRemoved:()=>mOi,cannotAppendScopeSet:()=>G1t,cannotRemoveEmptyScope:()=>q1t,clientInfoDecodingError:()=>SOe,clientInfoEmptyError:()=>k1t,emptyInputScopeSet:()=>wOe,endSessionEndpointNotSupported:()=>W1t,endpointResolutionError:()=>ux,hashNotDeserialized:()=>O1t,invalidCacheEnvironment:()=>kme,invalidCacheRecord:()=>H1t,invalidState:()=>FG,keyIdMissing:()=>z1t,maxAgeTranspired:()=>F1t,methodNotImplemented:()=>Uo,misplacedResourceParam:()=>K1t,multipleMatchingAppMetadata:()=>U1t,multipleMatchingTokens:()=>fOi,nestedAppAuthBridgeDisabled:()=>yOi,networkError:()=>N1t,noAccountFound:()=>pOi,noAccountInSilentRequest:()=>Pme,noCryptoObject:()=>j1t,noNetworkConnectivity:()=>gOi,nonceMismatch:()=>L1t,nullOrEmptyToken:()=>D1t,openIdConfigError:()=>M1t,platformBrokerError:()=>EOi,requestCannotBeMade:()=>Q1t,resourceParameterRequired:()=>Y1t,stateMismatch:()=>B1t,stateNotFound:()=>xOe,tokenClaimsCnfRequiredForSignedJwt:()=>$1t,tokenParsingError:()=>IOe,tokenRefreshRequired:()=>Uee,unexpectedCredentialType:()=>hOi,userCanceled:()=>AOi});f();var SOe="client_info_decoding_error",k1t="client_info_empty_error",IOe="token_parsing_error",D1t="null_or_empty_token",ux="endpoints_resolution_error",N1t="network_error",M1t="openid_config_error",O1t="hash_not_deserialized",FG="invalid_state",B1t="state_mismatch",xOe="state_not_found",L1t="nonce_mismatch",Rme="auth_time_not_found",F1t="max_age_transpired",fOi="multiple_matching_tokens",U1t="multiple_matching_appMetadata",Q1t="request_cannot_be_made",q1t="cannot_remove_empty_scope",G1t="cannot_append_scopeset",wOe="empty_input_scopeset",Pme="no_account_in_silent_request",H1t="invalid_cache_record",kme="invalid_cache_environment",pOi="no_account_found",j1t="no_crypto_object",hOi="unexpected_credential_type",Uee="token_refresh_required",$1t="token_claims_cnf_required_for_signedjwt",V1t="authorization_code_missing_from_server_response",mOi="binding_key_not_removed",W1t="end_session_endpoint_not_supported",z1t="key_id_missing",gOi="no_network_connectivity",AOi="user_canceled",Uo="method_not_implemented",yOi="nested_app_auth_bridge_disabled",EOi="platform_broker_error",Y1t="resource_parameter_required",K1t="misplaced_resource_parameter";var Xf=class t{static{a(this,"ScopeSet")}constructor(e){let r=e?Zc.trimArrayEntries([...e]):[],n=r?Zc.removeEmptyStringsFromArray(r):[];if(!n||!n.length)throw mc(S1t);this.scopes=new Set,n.forEach(o=>this.scopes.add(o))}static fromString(e){let n=(e||"").split(" ");return new t(n)}static createSearchScopes(e){let r=e&&e.length>0?e:[...Pee],n=new t(r);return n.containsOnlyOIDCScopes()?n.removeScope(cOe):n.removeOIDCScopes(),n}containsScope(e){let r=this.printScopesLowerCase().split(" "),n=new t(r);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(r=>this.containsScope(r))}containsOnlyOIDCScopes(){let e=0;return fOe.forEach(r=>{this.containsScope(r)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(r=>this.appendScope(r))}catch{throw Ct(G1t)}}removeScope(e){if(!e)throw Ct(q1t);this.scopes.delete(e.trim())}removeOIDCScopes(){fOe.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Ct(wOe);let r=new Set;return e.scopes.forEach(n=>r.add(n.toLowerCase())),this.scopes.forEach(n=>r.add(n.toLowerCase())),r}intersectingScopeSets(e){if(!e)throw Ct(wOe);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();let r=this.unionScopeSets(e),n=e.getScopeCount(),o=this.getScopeCount();return r.sizee.push(r)),e}printScopes(){return this.scopes?this.asArray().join(" "):""}printScopesLowerCase(){return this.printScopes().toLowerCase()}};function UG(t,e,r){if(!e)return;let n=t.get(pP);n&&t.has(xme)&&r?.addFields({embeddedClientId:n,embeddedRedirectUri:t.get(AOe)},e)}a(UG,"instrumentBrokerParams");function _Oi(t,e){t.set(BCt,e)}a(_Oi,"addResponseType");function J1t(t,e){t.set(LCt,e||_Ct.QUERY)}a(J1t,"addResponseMode");function COi(t){t.set(p1t,"1")}a(COi,"addNativeBroker");function QG(t,e,r=!0,n=Pee){r&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");let o=r?[...e||[],...n]:e||[],s=new Xf(o);t.set(QCt,s.printScopes())}a(QG,"addScopes");function qG(t,e){t.set(pP,e)}a(qG,"addClientId");function GG(t,e){t.set(AOe,e)}a(GG,"addRedirectUri");function X1t(t,e){t.set(o1t,e)}a(X1t,"addPostLogoutRedirectUri");function Z1t(t,e){t.set(s1t,e)}a(Z1t,"addIdTokenHint");function evt(t,e){t.set(A1t,e)}a(evt,"addDomainHint");function Qee(t,e){t.set(g1t,e)}a(Qee,"addLoginHint");function y8(t,e){t.set(af.CCS_HEADER,`UPN:${e}`)}a(y8,"addCcsUpn");function hM(t,e){t.set(af.CCS_HEADER,`Oid:${e.uid}@${e.utid}`)}a(hM,"addCcsOid");function ROe(t,e){t.set("sid",e)}a(ROe,"addSid");function HG(t,e,r){let n=sNr(e,r);try{JSON.parse(n)}catch{throw mc(bOe)}t.set(UCt,n)}a(HG,"addClaims");function jG(t,e){t.set(YCt,e)}a(jG,"addCorrelationId");function Dme(t,e){t.set(KCt,e.sku),t.set(JCt,e.version),e.os&&t.set(XCt,e.os),e.cpu&&t.set(ZCt,e.cpu)}a(Dme,"addLibraryInfo");function Nme(t,e){e?.appName&&t.set(n1t,e.appName),e?.appVersion&&t.set(i1t,e.appVersion)}a(Nme,"addApplicationTelemetry");function tvt(t,e){t.set(jCt,e)}a(tvt,"addPrompt");function Mme(t,e){e&&t.set(GCt,e)}a(Mme,"addState");function rvt(t,e){t.set(HCt,e)}a(rvt,"addNonce");function vOi(t,e,r){if(e&&r)t.set(VCt,e),t.set(WCt,r);else throw mc(w1t)}a(vOi,"addCodeChallengeParams");function nvt(t,e){t.set($Ct,e)}a(nvt,"addAuthorizationCode");function bOi(t,e){t.set(a1t,e)}a(bOi,"addDeviceCode");function ivt(t,e){t.set(qCt,e)}a(ivt,"addRefreshToken");function ovt(t,e){t.set(zCt,e)}a(ovt,"addCodeVerifier");function Ome(t,e){t.set(c1t,e)}a(Ome,"addClientSecret");function Bme(t,e){e&&t.set(l1t,e)}a(Bme,"addClientAssertion");function Lme(t,e){e&&t.set(u1t,e)}a(Lme,"addClientAssertionType");function TOi(t,e){t.set(d1t,e)}a(TOi,"addOboAssertion");function SOi(t,e){t.set(f1t,e)}a(SOi,"addRequestTokenUse");function Fme(t,e){t.set(FCt,e)}a(Fme,"addGrantType");function $G(t){t.set(bCt,"1")}a($G,"addClientInfo");function svt(t){t.set(C1t,"1")}a(svt,"addCliData");function Ume(t){t.has(Oee)||t.set(Oee,"true")}a(Ume,"addInstanceAware");function mM(t,e){Object.entries(e).forEach(([r,n])=>{!t.has(r)&&n&&t.set(r,n)})}a(mM,"addExtraParameters");function sNr(t,e){let r;if(!t)r={};else try{r=JSON.parse(t)}catch{throw mc(bOe)}return e&&e.length>0&&(r.hasOwnProperty(kee.ACCESS_TOKEN)||(r[kee.ACCESS_TOKEN]={}),r[kee.ACCESS_TOKEN][kee.XMS_CC]={values:e}),JSON.stringify(r)}a(sNr,"addClientCapabilitiesToClaims");function IOi(t,e){t.set(gOe.username,e)}a(IOi,"addUsername");function xOi(t,e){t.set(gOe.password,e)}a(xOi,"addPassword");function Qme(t,e){e&&(t.set(yOe,Hu.POP),t.set(EOe,e))}a(Qme,"addPopToken");function qme(t,e){e&&(t.set(yOe,Hu.SSH),t.set(EOe,e))}a(qme,"addSshJwk");function Gme(t,e){t.set(e1t,e.generateCurrentRequestHeaderValue()),t.set(t1t,e.generateLastRequestHeaderValue())}a(Gme,"addServerTelemetry");function Hme(t){t.set(r1t,DCt)}a(Hme,"addThrottling");function avt(t,e){t.set(h1t,e)}a(avt,"addLogoutHint");function gM(t,e,r){t.has(xme)||t.set(xme,e),t.has(COe)||t.set(COe,r)}a(gM,"addBrokerParameters");function wOi(t,e){t.set(y1t,encodeURIComponent(e)),t.set(E1t,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}a(wOi,"addEARParameters");function jme(t,e){e&&t.set(_1t,e)}a(jme,"addResource");var im={};ui(im,{getDeserializedResponse:()=>ROi,mapToQueryString:()=>hP,normalizeUrlForComparison:()=>POi,stripLeadingHashOrQuery:()=>cNr});f();function aNr(t){if(!t)return t;let e=t.toLowerCase();return Zc.endsWith(e,"?")?e=e.slice(0,-1):Zc.endsWith(e,"?/")&&(e=e.slice(0,-2)),Zc.endsWith(e,"/")||(e+="/"),e}a(aNr,"canonicalizeUrl");function cNr(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}a(cNr,"stripLeadingHashOrQuery");function ROi(t){if(!t||t.indexOf("=")<0)return null;try{let e=cNr(t),r=Object.fromEntries(new URLSearchParams(e));if(r.code||r.ear_jwe||r.error||r.error_description||r.state)return r}catch{throw Ct(O1t)}return null}a(ROi,"getDeserializedResponse");function hP(t){let e=new Array;return t.forEach((r,n)=>{e.push(`${n}=${encodeURIComponent(r)}`)}),e.join("&")}a(hP,"mapToQueryString");function POi(t){if(!t)return t;let e=t.split("#")[0];try{let r=new URL(e),n=r.origin+r.pathname+r.search;return aNr(n)}catch{return aNr(e)}}a(POi,"normalizeUrlForComparison");f();f();var qee={createNewGuid:a(()=>{throw Ct(Uo)},"createNewGuid"),base64Decode:a(()=>{throw Ct(Uo)},"base64Decode"),base64Encode:a(()=>{throw Ct(Uo)},"base64Encode"),base64UrlEncode:a(()=>{throw Ct(Uo)},"base64UrlEncode"),encodeKid:a(()=>{throw Ct(Uo)},"encodeKid"),async getPublicKeyThumbprint(){throw Ct(Uo)},async removeTokenBindingKey(){throw Ct(Uo)},async clearKeystore(){throw Ct(Uo)},async signJwt(){throw Ct(Uo)},async hashString(){throw Ct(Uo)}};f();var ju;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(ju||(ju={}));var kOi=50,DOi=500,VG=new Map;function NOi(t,e){VG.delete(t),VG.set(t,e)}a(NOi,"markAsRecentlyUsed");function MOi(t,e){let r=Date.now(),n=VG.get(t);if(n)NOi(t,n);else if(n={logs:[],firstEventTime:r},VG.set(t,n),VG.size>kOi){let o=VG.keys().next().value;o&&VG.delete(o)}n.logs.push({...e,milliseconds:r-n.firstEventTime}),n.logs.length>DOi&&n.logs.shift()}a(MOi,"addLogToCache");function OOi(t){if(t.length!==6)return!1;for(let e=0;e="a"&&r<="z"||r>="A"&&r<="Z"||r>="0"&&r<="9"))return!1}return!0}a(OOi,"isHashedString");var lp=class t{static{a(this,"Logger")}constructor(e,r,n){this.level=ju.Info;let o=a(()=>{},"defaultLoggerCallback"),s=e||t.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||o,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:ju.Info,this.packageName=r||"",this.packageVersion=n||""}static createDefaultLoggerOptions(){return{loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:ju.Info}}clone(e,r){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level},e,r)}logMessage(e,r){let n=r.correlationId;if(OOi(e)){let u={hash:e,level:r.logLevel,containsPii:r.containsPii||!1,milliseconds:0};MOi(n,u)}if(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)return;let l=`${`[${new Date().toUTCString()}] : [${n}]`} : ${this.packageName}@${this.packageVersion} : ${ju[r.logLevel]} - ${e}`;this.executeCallback(r.logLevel,l,r.containsPii||!1)}executeCallback(e,r,n){this.localCallback&&this.localCallback(e,r,n)}error(e,r){this.logMessage(e,{logLevel:ju.Error,containsPii:!1,correlationId:r})}errorPii(e,r){this.logMessage(e,{logLevel:ju.Error,containsPii:!0,correlationId:r})}warning(e,r){this.logMessage(e,{logLevel:ju.Warning,containsPii:!1,correlationId:r})}warningPii(e,r){this.logMessage(e,{logLevel:ju.Warning,containsPii:!0,correlationId:r})}info(e,r){this.logMessage(e,{logLevel:ju.Info,containsPii:!1,correlationId:r})}infoPii(e,r){this.logMessage(e,{logLevel:ju.Info,containsPii:!0,correlationId:r})}verbose(e,r){this.logMessage(e,{logLevel:ju.Verbose,containsPii:!1,correlationId:r})}verbosePii(e,r){this.logMessage(e,{logLevel:ju.Verbose,containsPii:!0,correlationId:r})}trace(e,r){this.logMessage(e,{logLevel:ju.Trace,containsPii:!1,correlationId:r})}tracePii(e,r){this.logMessage(e,{logLevel:ju.Trace,containsPii:!0,correlationId:r})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};f();var E8="@azure/msal-common",mP="16.4.1";f();var AM={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};f();f();function lNr(t,e){return!!t&&!!e&&t===e.split(".")[1]}a(lNr,"tenantIdMatchesHomeTenant");function WG(t,e,r,n){if(n){let{oid:o,sub:s,tid:c,name:l,tfp:u,acr:d,preferred_username:p,upn:h,login_hint:m}=n,g=c||u||d||"";return{tenantId:g,localAccountId:o||s||"",name:l,username:p||h||"",loginHint:m,isHomeTenant:lNr(g,t)}}else return{tenantId:r,localAccountId:e,username:"",isHomeTenant:lNr(r,t)}}a(WG,"buildTenantProfile");function POe(t,e,r,n){let o=t;if(e){let{isHomeTenant:s,...c}=e;o={...t,...c}}if(r){let{isHomeTenant:s,...c}=WG(t.homeAccountId,t.localAccountId,t.tenantId,r);return o={...o,...c,idTokenClaims:r,idToken:n},o}return o}a(POe,"updateAccountTenantProfileData");var kOe={};ui(kOe,{checkMaxAge:()=>$me,extractTokenClaims:()=>yM,getJWSPayload:()=>uNr,isKmsi:()=>cvt});f();function yM(t,e){let r=uNr(t);try{let n=e(r);return JSON.parse(n)}catch{throw Ct(IOe)}}a(yM,"extractTokenClaims");function cvt(t){if(!t.signin_state)return!1;let e=["kmsi","dvc_dmjd"];return t.signin_state.some(r=>e.includes(r.trim().toLowerCase()))}a(cvt,"isKmsi");function uNr(t){if(!t)throw Ct(D1t);let r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!r||r.length<4)throw Ct(IOe);return r[2]}a(uNr,"getJWSPayload");function $me(t,e){if(e===0||Date.now()-3e5>t+e)throw Ct(F1t)}a($me,"checkMaxAge");f();f();var Qo=class t{static{a(this,"UrlString")}get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw mc(T1t);e.includes("#")||(this._urlString=t.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let r=e.toLowerCase();return Zc.endsWith(r,"?")?r=r.slice(0,-1):Zc.endsWith(r,"?/")&&(r=r.slice(0,-2)),Zc.endsWith(r,"/")||(r+="/"),r}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw mc(Lee)}if(!e.HostNameAndPort||!e.PathSegments)throw mc(Lee);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw mc(b1t)}static appendQueryString(e,r){return r?e.indexOf("?")<0?`${e}?${r}`:`${e}&${r}`:e}static removeHashFromUrl(e){return t.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){let r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===cx.COMMON||n[0]===cx.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)}getUrlComponents(){let e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw mc(Lee);let n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},o=n.AbsolutePath.split("/");return o=o.filter(s=>s&&s.length>0),n.PathSegments=o,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){let r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw mc(Lee);return n[2]}static getAbsoluteUrl(e,r){if(e[0]===Ree){let o=new t(r).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}};var BOi=[{host:"login.microsoftonline.com"},{host:"login.chinacloudapi.cn",issuerHost:"login.partner.microsoftonline.cn"},{host:"login.microsoftonline.us"},{host:"login.sovcloud-identity.fr"},{host:"login.sovcloud-identity.de"},{host:"login.sovcloud-identity.sg"}];function LOi(t,e){return{token_endpoint:`https://${t}/{tenantid}/oauth2/v2.0/token`,jwks_uri:`https://${t}/{tenantid}/discovery/v2.0/keys`,issuer:`https://${e}/{tenantid}/v2.0`,authorization_endpoint:`https://${t}/{tenantid}/oauth2/v2.0/authorize`,end_session_endpoint:`https://${t}/{tenantid}/oauth2/v2.0/logout`}}a(LOi,"buildOpenIdConfig");var FOi=BOi.reduce((t,{host:e,issuerHost:r})=>(t[e]=LOi(e,r||e),t),{}),fNr={endpointMetadata:FOi,instanceDiscoveryMetadata:{metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]},{preferred_network:"login.sovcloud-identity.fr",preferred_cache:"login.sovcloud-identity.fr",aliases:["login.sovcloud-identity.fr"]},{preferred_network:"login.sovcloud-identity.de",preferred_cache:"login.sovcloud-identity.de",aliases:["login.sovcloud-identity.de"]},{preferred_network:"login.sovcloud-identity.sg",preferred_cache:"login.sovcloud-identity.sg",aliases:["login.sovcloud-identity.sg"]}]}},lvt=fNr.endpointMetadata,uvt=fNr.instanceDiscoveryMetadata,dvt=new Set;uvt.metadata.forEach(t=>{t.aliases.forEach(e=>{dvt.add(e)})});function pNr(t,e,r){let n,o=t.canonicalAuthority;if(o){let s=new Qo(o).getUrlComponents().HostNameAndPort;n=dNr(e,r,s,t.cloudDiscoveryMetadata?.metadata,vg.CONFIG)||dNr(e,r,s,uvt.metadata,vg.HARDCODED_VALUES)||t.knownAuthorities}return n||[]}a(pNr,"getAliasesFromStaticSources");function dNr(t,e,r,n,o){if(t.trace(`getAliasesFromMetadata called with source: '${o}'`,e),r&&n){let s=Vme(n,r);if(s)return t.trace(`getAliasesFromMetadata: found cloud discovery metadata in '${o}', returning aliases`,e),s.aliases;t.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in '${o}'`,e)}return null}a(dNr,"getAliasesFromMetadata");function hNr(t){return Vme(uvt.metadata,t)}a(hNr,"getCloudDiscoveryMetadataFromHardcodedValues");function Vme(t,e){for(let r=0;rfvt,createAccountEntityFromAccountInfo:()=>qOi,generateAccountId:()=>UOi,generateHomeAccountId:()=>pvt,getAccountInfo:()=>Hee,isAccountEntity:()=>GOi,isSingleTenant:()=>QOi});f();f();function Gee(t,e){if(!t)throw Ct(k1t);try{let r=e(t);return JSON.parse(r)}catch{throw Ct(SOe)}}a(Gee,"buildClientInfo");function gP(t){if(!t)throw Ct(SOe);let e=t.split(Dee,2);return{uid:e[0],utid:e.length<2?"":e[1]}}a(gP,"buildClientInfoFromHomeAccountId");f();var Yb={Default:0,Adfs:1,Dsts:2,Ciam:3};f();function DOe(t){return t&&(t.tid||t.tfp||t.acr)||null}a(DOe,"getTenantIdFromIdTokenClaims");f();var bg={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"};function UOi(t){return[t.homeAccountId,t.environment].join(MG).toLowerCase()}a(UOi,"generateAccountId");function Hee(t){let e=t.tenantProfiles||[];return e.length===0&&t.realm&&t.localAccountId&&e.push(WG(t.homeAccountId,t.localAccountId,t.realm)),{homeAccountId:t.homeAccountId,environment:t.environment,tenantId:t.realm,username:t.username,localAccountId:t.localAccountId,loginHint:t.loginHint,name:t.name,nativeAccountId:t.nativeAccountId,authorityType:t.authorityType,tenantProfiles:new Map(e.map(r=>[r.tenantId,r])),dataBoundary:t.dataBoundary}}a(Hee,"getAccountInfo");function QOi(t){return!t.tenantProfiles}a(QOi,"isSingleTenant");function fvt(t,e,r){let n;e.authorityType===Yb.Adfs?n=vCt:e.protocolMode===bg.OIDC?n=pOe:n=CCt;let o,s;t.clientInfo&&r&&(o=Gee(t.clientInfo,r),o.xms_tdbr&&(s=o.xms_tdbr==="EU"?"EU":"None"));let c=t.environment||e&&e.getPreferredCache();if(!c)throw Ct(kme);let l=t.idTokenClaims?.preferred_username||t.idTokenClaims?.upn,u=t.idTokenClaims?.emails?t.idTokenClaims.emails[0]:null,d=l||u||"",p=t.idTokenClaims?.login_hint,h=o?.utid||DOe(t.idTokenClaims)||"",m=o?.uid||t.idTokenClaims?.oid||t.idTokenClaims?.sub||"",g;return t.tenantProfiles?g=t.tenantProfiles:g=[WG(t.homeAccountId,m,h,t.idTokenClaims)],{homeAccountId:t.homeAccountId,environment:c,realm:h,localAccountId:m,username:d,authorityType:n,loginHint:p,clientInfo:t.clientInfo,name:t.idTokenClaims?.name||"",lastModificationTime:void 0,lastModificationApp:void 0,cloudGraphHostName:t.cloudGraphHostName,msGraphHost:t.msGraphHost,nativeAccountId:t.nativeAccountId,tenantProfiles:g,dataBoundary:s}}a(fvt,"createAccountEntity");function qOi(t,e,r){let n=Array.from(t.tenantProfiles?.values()||[]);return n.length===0&&t.tenantId&&t.localAccountId&&n.push(WG(t.homeAccountId,t.localAccountId,t.tenantId,t.idTokenClaims)),{authorityType:t.authorityType||pOe,homeAccountId:t.homeAccountId,localAccountId:t.localAccountId,nativeAccountId:t.nativeAccountId,realm:t.tenantId,environment:t.environment,username:t.username,loginHint:t.loginHint,name:t.name,cloudGraphHostName:e,msGraphHost:r,tenantProfiles:n,dataBoundary:t.dataBoundary}}a(qOi,"createAccountEntityFromAccountInfo");function pvt(t,e,r,n,o,s){if(!(e===Yb.Adfs||e===Yb.Dsts)){if(t)try{let c=Gee(t,n.base64Decode);if(c.uid&&c.utid)return`${c.uid}.${c.utid}`}catch{}r.warning("No client info in response",o)}return s?.sub||""}a(pvt,"generateHomeAccountId");function GOi(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("localAccountId")&&t.hasOwnProperty("username")&&t.hasOwnProperty("authorityType"):!1}a(GOi,"isAccountEntity");var _8=class{static{a(this,"CacheManager")}constructor(e,r,n,o,s){this.clientId=e,this.cryptoImpl=r,this.commonLogger=n.clone(E8,mP),this.staticAuthorityOptions=s,this.performanceClient=o}getAllAccounts(e={},r){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,r),r,e)}getAccountInfoFilteredBy(e,r){if(Object.keys(e).length===0||Object.values(e).every(o=>o==null||o===""))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null",r),null;let n=this.getAllAccounts(e,r);return n.length>1?n.sort(s=>s.idTokenClaims?-1:1)[0]:n.length===1?n[0]:null}getBaseAccountInfo(e,r){let n=this.getAccountsFilteredBy(e,r);return n.length>0?Hee(n[0]):null}buildTenantProfiles(e,r,n){return e.flatMap(o=>this.getTenantProfilesFromAccountEntity(o,r,n?.tenantId,n))}getTenantedAccountInfoByFilter(e,r,n,o,s){let c=null,l;if(s&&!this.tenantProfileMatchesFilter(n,s))return null;let u=this.getIdToken(e,o,r,n.tenantId);return u&&(l=yM(u.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,s))?null:(c=POe(e,n,l,u?.secret),c)}getTenantProfilesFromAccountEntity(e,r,n,o){let s=Hee(e),c=s.tenantProfiles||new Map,l=this.getTokenKeys();if(n){let d=c.get(n);if(d)c=new Map([[n,d]]);else return[]}let u=[];return c.forEach(d=>{let p=this.getTenantedAccountInfoByFilter(s,l,d,r,o);p&&u.push(p)}),u}tenantProfileMatchesFilter(e,r){return!(r.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,r.localAccountId)||r.name&&e.name!==r.name||r.isHomeTenant!==void 0&&e.isHomeTenant!==r.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,r){return!(r&&(r.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,r.localAccountId)||r.loginHint&&!this.matchLoginHintFromTokenClaims(e,r.loginHint)||r.username&&!this.matchUsername(e.preferred_username,r.username)||r.name&&!this.matchName(e,r.name)||r.sid&&!this.matchSid(e,r.sid)))}async saveCacheRecord(e,r,n,o,s){if(!e)throw Ct(H1t);try{e.account&&await this.setAccount(e.account,r,n,o),e.idToken&&s?.idToken!==!1&&await this.setIdTokenCredential(e.idToken,r,n),e.accessToken&&s?.accessToken!==!1&&await this.saveAccessToken(e.accessToken,r,n),e.refreshToken&&s?.refreshToken!==!1&&await this.setRefreshTokenCredential(e.refreshToken,r,n),e.appMetadata&&this.setAppMetadata(e.appMetadata,r)}catch(c){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed",r),c instanceof eo?c:ANr(c)}}async saveAccessToken(e,r,n){let o={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType},s=this.getTokenKeys(),c=Xf.fromString(e.target);s.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,o,!1))return;let u=this.getAccessTokenCredential(l,r);u&&this.credentialMatchesFilter(u,o,r)&&Xf.fromString(u.target).intersectingScopeSets(c)&&this.removeAccessToken(l,r)}),await this.setAccessTokenCredential(e,r,n)}getAccountsFilteredBy(e,r){let n=this.getAccountKeys(),o=[];return n.forEach(s=>{let c=this.getAccount(s,r);if(!c||e.homeAccountId&&!this.matchHomeAccountId(c,e.homeAccountId)||e.username&&!this.matchUsername(c.username,e.username)||e.environment&&!this.matchEnvironment(c,e.environment,r)||e.realm&&!this.matchRealm(c,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(c,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(c,e.authorityType))return;let l={localAccountId:e?.localAccountId,name:e?.name},u=c.tenantProfiles?.filter(d=>this.tenantProfileMatchesFilter(d,l));u&&u.length===0||o.push(c)}),o}credentialMatchesFilter(e,r,n){return!(r.clientId&&!this.matchClientId(e,r.clientId)||r.userAssertionHash&&!this.matchUserAssertionHash(e,r.userAssertionHash)||typeof r.homeAccountId=="string"&&!this.matchHomeAccountId(e,r.homeAccountId)||r.environment&&!this.matchEnvironment(e,r.environment,n)||r.realm&&!this.matchRealm(e,r.realm)||r.credentialType&&!this.matchCredentialType(e,r.credentialType)||r.familyId&&!this.matchFamilyId(e,r.familyId)||r.target&&!this.matchTarget(e,r.target)||e.credentialType===cp.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(r.tokenType&&!this.matchTokenType(e,r.tokenType)||r.tokenType===Hu.SSH&&r.keyId&&!this.matchKeyId(e,r.keyId)))}getAppMetadataFilteredBy(e,r){let n=this.getKeys(),o={};return n.forEach(s=>{if(!this.isAppMetadata(s))return;let c=this.getAppMetadata(s,r);c&&(e.environment&&!this.matchEnvironment(c,e.environment,r)||e.clientId&&!this.matchClientId(c,e.clientId)||(o[s]=c))}),o}getAuthorityMetadataByAlias(e,r){let n=this.getAuthorityMetadataKeys(),o=null;return n.forEach(s=>{if(!this.isAuthorityMetadata(s)||s.indexOf(this.clientId)===-1)return;let c=this.getAuthorityMetadata(s,r);c&&c.aliases.indexOf(e)!==-1&&(o=c)}),o}removeAllAccounts(e){this.getAllAccounts({},e).forEach(n=>{this.removeAccount(n,e)})}removeAccount(e,r){this.removeAccountContext(e,r);let n=this.getAccountKeys(),o=a(s=>s.includes(e.homeAccountId)&&s.includes(e.environment),"keyFilter");n.filter(o).forEach(s=>{this.removeItem(s,r),this.performanceClient.incrementFields({accountsRemoved:1},r)})}removeAccountContext(e,r){let n=this.getTokenKeys(),o=a(s=>s.includes(e.homeAccountId)&&s.includes(e.environment),"keyFilter");n.idToken.filter(o).forEach(s=>{this.removeIdToken(s,r)}),n.accessToken.filter(o).forEach(s=>{this.removeAccessToken(s,r)}),n.refreshToken.filter(o).forEach(s=>{this.removeRefreshToken(s,r)})}removeAccessToken(e,r){let n=this.getAccessTokenCredential(e,r);if(n&&(this.removeItem(e,r),this.performanceClient.incrementFields({accessTokensRemoved:1},r),n.credentialType.toLowerCase()===cp.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&n.tokenType===Hu.POP)){let s=n.keyId;s&&this.cryptoImpl.removeTokenBindingKey(s,r).catch(()=>{this.commonLogger.error(`Failed to remove token binding key '${s}'`,r),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},r)})}}removeAppMetadata(e){return this.getKeys().forEach(n=>{this.isAppMetadata(n)&&this.removeItem(n,e)}),!0}getIdToken(e,r,n,o){this.commonLogger.trace("CacheManager - getIdToken called",r);let s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:cp.ID_TOKEN,clientId:this.clientId,realm:o},c=this.getIdTokensByFilter(s,r,n),l=c.size;if(l<1)return this.commonLogger.info("CacheManager:getIdToken - No token found",r),null;if(l>1){let u=c;if(!o){let d=new Map;c.forEach((h,m)=>{h.realm===e.tenantId&&d.set(m,h)});let p=d.size;if(p<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result",r),c.values().next().value;if(p===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile",r),d.values().next().value;u=d}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them",r),u.forEach((d,p)=>{this.removeIdToken(p,r)}),this.performanceClient.addFields({multiMatchedID:c.size},r),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token",r),c.values().next().value}getIdTokensByFilter(e,r,n){let o=n&&n.idToken||this.getTokenKeys().idToken,s=new Map;return o.forEach(c=>{if(!this.idTokenKeyMatchesFilter(c,{clientId:this.clientId,...e}))return;let l=this.getIdTokenCredential(c,r);l&&this.credentialMatchesFilter(l,e,r)&&s.set(c,l)}),s}idTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return!(r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}removeIdToken(e,r){this.removeItem(e,r)}removeRefreshToken(e,r){this.removeItem(e,r)}getAccessToken(e,r,n,o){let s=r.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",s);let c=Xf.createSearchScopes(r.scopes),l=r.authenticationScheme||Hu.BEARER,u=l&&l.toLowerCase()!==Hu.BEARER.toLowerCase()?cp.ACCESS_TOKEN_WITH_AUTH_SCHEME:cp.ACCESS_TOKEN,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:u,clientId:this.clientId,realm:o||e.tenantId,target:c,tokenType:l,keyId:r.sshKid},p=n&&n.accessToken||this.getTokenKeys().accessToken,h=[];p.forEach(g=>{if(this.accessTokenKeyMatchesFilter(g,d,!0)){let A=this.getAccessTokenCredential(g,s);A&&this.credentialMatchesFilter(A,d,s)&&h.push(A)}});let m=h.length;return m<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",s),null):m>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",s),h.forEach(g=>{this.removeAccessToken(this.generateCredentialKey(g),s)}),this.performanceClient.addFields({multiMatchedAT:h.length},s),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",s),h[0])}accessTokenKeyMatchesFilter(e,r,n){let o=e.toLowerCase();if(r.clientId&&o.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&o.indexOf(r.homeAccountId.toLowerCase())===-1||r.realm&&o.indexOf(r.realm.toLowerCase())===-1)return!1;if(r.target){let s=r.target.asArray();for(let c=0;c{if(!this.accessTokenKeyMatchesFilter(s,e,!0))return;let c=this.getAccessTokenCredential(s,r);c&&this.credentialMatchesFilter(c,e,r)&&o.push(c)}),o}getRefreshToken(e,r,n,o){this.commonLogger.trace("CacheManager - getRefreshToken called",n);let s=r?OG:void 0,c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:cp.REFRESH_TOKEN,clientId:this.clientId,familyId:s},l=o&&o.refreshToken||this.getTokenKeys().refreshToken,u=[];l.forEach(p=>{if(this.refreshTokenKeyMatchesFilter(p,c)){let h=this.getRefreshTokenCredential(p,n);h&&this.credentialMatchesFilter(h,c,n)&&u.push(h)}});let d=u.length;return d<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found.",n),null):(d>1&&this.performanceClient.addFields({multiMatchedRT:d},n),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token",n),u[0])}refreshTokenKeyMatchesFilter(e,r){let n=e.toLowerCase();return!(r.familyId&&n.indexOf(r.familyId.toLowerCase())===-1||!r.familyId&&r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e,r){let n={environment:e,clientId:this.clientId},o=this.getAppMetadataFilteredBy(n,r),s=Object.keys(o).map(l=>o[l]),c=s.length;if(c<1)return null;if(c>1)throw Ct(U1t);return s[0]}isAppMetadataFOCI(e,r){let n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===OG)}matchHomeAccountId(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,r){let n=e.oid||e.sub;return r===n}matchLocalAccountIdFromTenantProfile(e,r){return e.localAccountId===r}matchName(e,r){return r.toLowerCase()===e.name?.toLowerCase()}matchUsername(e,r){return!!(e&&typeof e=="string"&&r?.toLowerCase()===e.toLowerCase())}matchUserAssertionHash(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)}matchEnvironment(e,r,n){if(this.staticAuthorityOptions){let s=pNr(this.staticAuthorityOptions,this.commonLogger,n);if(s.includes(r)&&s.includes(e.environment))return!0}let o=this.getAuthorityMetadataByAlias(r,n);return!!(o&&o.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,r){return!!(e.clientId&&r===e.clientId)}matchFamilyId(e,r){return!!(e.familyId&&r===e.familyId)}matchRealm(e,r){return e.realm?.toLowerCase()===r.toLowerCase()}matchNativeAccountId(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,r){return e.login_hint===r||e.preferred_username===r||e.upn===r}matchSid(e,r){return e.sid===r}matchAuthorityType(e,r){return!!(e.authorityType&&r.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,r){return e.credentialType!==cp.ACCESS_TOKEN&&e.credentialType!==cp.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Xf.fromString(e.target).containsScopeSet(r)}matchTokenType(e,r){return!!(e.tokenType&&e.tokenType===r)}matchKeyId(e,r){return!!(e.keyId&&e.keyId===r)}isAppMetadata(e){return e.indexOf(Nee)!==-1}isAuthorityMetadata(e){return e.indexOf(Mee)!==-1}generateAuthorityMetadataCacheKey(e){return`${Mee}-${this.clientId}-${e}`}static toObject(e,r){for(let n in r)e[n]=r[n];return e}},zme=class extends _8{static{a(this,"DefaultStorageClass")}async setAccount(){throw Ct(Uo)}getAccount(){throw Ct(Uo)}async setIdTokenCredential(){throw Ct(Uo)}getIdTokenCredential(){throw Ct(Uo)}async setAccessTokenCredential(){throw Ct(Uo)}getAccessTokenCredential(){throw Ct(Uo)}async setRefreshTokenCredential(){throw Ct(Uo)}getRefreshTokenCredential(){throw Ct(Uo)}setAppMetadata(){throw Ct(Uo)}getAppMetadata(){throw Ct(Uo)}setServerTelemetry(){throw Ct(Uo)}getServerTelemetry(){throw Ct(Uo)}setAuthorityMetadata(){throw Ct(Uo)}getAuthorityMetadata(){throw Ct(Uo)}getAuthorityMetadataKeys(){throw Ct(Uo)}setThrottlingCache(){throw Ct(Uo)}getThrottlingCache(){throw Ct(Uo)}removeItem(){throw Ct(Uo)}getKeys(){throw Ct(Uo)}getAccountKeys(){throw Ct(Uo)}getTokenKeys(){throw Ct(Uo)}generateCredentialKey(){throw Ct(Uo)}generateAccountKey(){throw Ct(Uo)}};f();f();var yNr={NotStarted:0,InProgress:1,Completed:2};var Zf=class{static{a(this,"StubPerformanceClient")}generateId(){return"callback-id"}startMeasurement(e,r){return{end:a(()=>null,"end"),discard:a(()=>{},"discard"),add:a(()=>{},"add"),increment:a(()=>{},"increment"),event:{eventId:this.generateId(),status:yNr.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:r||""}}}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}};var ENr={tokenRenewalOffsetSeconds:OCt,preventCorsPreflight:!1},HOi={loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:ju.Info,correlationId:""},jOi={async sendGetRequestAsync(){throw Ct(Uo)},async sendPostRequestAsync(){throw Ct(Uo)}},$Oi={sku:nCt,version:mP,cpu:"",os:""},VOi={clientSecret:"",clientAssertion:void 0},WOi={azureCloudInstance:AM.None,tenant:`${_me}`},zOi={application:{appName:"",appVersion:""}};function EM({authOptions:t,systemOptions:e,loggerOptions:r,storageInterface:n,networkInterface:o,cryptoInterface:s,clientCredentials:c,libraryInfo:l,telemetry:u,serverTelemetryManager:d,persistencePlugin:p,serializableCache:h}){let m={...HOi,...r};return{authOptions:YOi(t),systemOptions:{...ENr,...e},loggerOptions:m,storageInterface:n||new zme(t.clientId,qee,new lp(m),new Zf),networkInterface:o||jOi,cryptoInterface:s||qee,clientCredentials:c||VOi,libraryInfo:{...$Oi,...l},telemetry:{...zOi,...u},serverTelemetryManager:d||null,persistencePlugin:p||null,serializableCache:h||null}}a(EM,"buildClientConfiguration");function YOi(t){return{clientCapabilities:[],azureCloudOptions:WOi,instanceAware:!1,isMcp:!1,...t}}a(YOi,"buildAuthOptions");function NOe(t){return t.authOptions.authority.options.protocolMode===bg.OIDC}a(NOe,"isOidcProtocolMode");f();f();var u1=class{static{a(this,"TokenCacheContext")}constructor(e,r){this.cache=e,this.hasChanged=r}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};var qA={};ui(qA,{createAccessTokenEntity:()=>gvt,createIdTokenEntity:()=>mvt,createRefreshTokenEntity:()=>Avt,generateAppMetadataKey:()=>iBi,generateAuthorityMetadataExpiresAt:()=>OOe,isAccessTokenEntity:()=>ZOi,isAppMetadataEntity:()=>oBi,isAuthorityMetadataEntity:()=>sBi,isAuthorityMetadataExpired:()=>BOe,isCredentialEntity:()=>MOe,isIdTokenEntity:()=>eBi,isRefreshTokenEntity:()=>tBi,isServerTelemetryEntity:()=>rBi,isThrottlingEntity:()=>nBi,updateAuthorityEndpointMetadata:()=>$ee,updateCloudDiscoveryMetadata:()=>Kme});f();var Bl={};ui(Bl,{delay:()=>XOi,isCacheExpired:()=>JOi,isTokenExpired:()=>jee,nowSeconds:()=>d1,toDateFromSeconds:()=>Yme,toSecondsFromDate:()=>KOi,wasClockTurnedBack:()=>hvt});f();function d1(){return Math.round(new Date().getTime()/1e3)}a(d1,"nowSeconds");function KOi(t){return t.getTime()/1e3}a(KOi,"toSecondsFromDate");function Yme(t){return t?new Date(Number(t)*1e3):new Date}a(Yme,"toDateFromSeconds");function jee(t,e){let r=Number(t)||0;return d1()+e>r}a(jee,"isTokenExpired");function JOi(t,e){let r=Number(t)+e*24*60*60*1e3;return Date.now()>r}a(JOi,"isCacheExpired");function hvt(t){return Number(t)>d1()}a(hvt,"wasClockTurnedBack");function XOi(t,e){return new Promise(r=>setTimeout(()=>r(e),t))}a(XOi,"delay");function mvt(t,e,r,n,o){return{credentialType:cp.ID_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r,realm:o,lastUpdatedAt:Date.now().toString()}}a(mvt,"createIdTokenEntity");function gvt(t,e,r,n,o,s,c,l,u,d,p,h,m){let g={homeAccountId:t,credentialType:cp.ACCESS_TOKEN,secret:r,cachedAt:d1().toString(),expiresOn:c.toString(),extendedExpiresOn:l.toString(),environment:e,clientId:n,realm:o,target:s,tokenType:p||Hu.BEARER,lastUpdatedAt:Date.now().toString()};if(h&&(g.userAssertionHash=h),d&&(g.refreshOn=d.toString()),g.tokenType?.toLowerCase()!==Hu.BEARER.toLowerCase())switch(g.credentialType=cp.ACCESS_TOKEN_WITH_AUTH_SCHEME,g.tokenType){case Hu.POP:let A=yM(r,u);if(!A?.cnf?.kid)throw Ct($1t);g.keyId=A.cnf.kid;break;case Hu.SSH:g.keyId=m}return g}a(gvt,"createAccessTokenEntity");function Avt(t,e,r,n,o,s,c){let l={credentialType:cp.REFRESH_TOKEN,homeAccountId:t,environment:e,clientId:n,secret:r,lastUpdatedAt:Date.now().toString()};return s&&(l.userAssertionHash=s),o&&(l.familyId=o),c&&(l.expiresOn=c.toString()),l}a(Avt,"createRefreshTokenEntity");function MOe(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}a(MOe,"isCredentialEntity");function ZOi(t){return t?MOe(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===cp.ACCESS_TOKEN||t.credentialType===cp.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}a(ZOi,"isAccessTokenEntity");function eBi(t){return t?MOe(t)&&t.hasOwnProperty("realm")&&t.credentialType===cp.ID_TOKEN:!1}a(eBi,"isIdTokenEntity");function tBi(t){return t?MOe(t)&&t.credentialType===cp.REFRESH_TOKEN:!1}a(tBi,"isRefreshTokenEntity");function rBi(t,e){let r=t.indexOf(Tme)===0,n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),r&&n}a(rBi,"isServerTelemetryEntity");function nBi(t,e){let r=!1;t&&(r=t.indexOf(Sme)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),r&&n}a(nBi,"isThrottlingEntity");function iBi({environment:t,clientId:e}){return[Nee,t,e].join(MG).toLowerCase()}a(iBi,"generateAppMetadataKey");function oBi(t,e){return e?t.indexOf(Nee)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}a(oBi,"isAppMetadataEntity");function sBi(t,e){return e?t.indexOf(Mee)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}a(sBi,"isAuthorityMetadataEntity");function OOe(){return d1()+TCt}a(OOe,"generateAuthorityMetadataExpiresAt");function $ee(t,e,r){t.authorization_endpoint=e.authorization_endpoint,t.token_endpoint=e.token_endpoint,t.end_session_endpoint=e.end_session_endpoint,t.issuer=e.issuer,t.endpointsFromNetwork=r,t.jwks_uri=e.jwks_uri}a($ee,"updateAuthorityEndpointMetadata");function Kme(t,e,r){t.aliases=e.aliases,t.preferred_cache=e.preferred_cache,t.preferred_network=e.preferred_network,t.aliasesFromNetwork=r}a(Kme,"updateCloudDiscoveryMetadata");function BOe(t){return t.expiresAt<=d1()}a(BOe,"isAuthorityMetadataExpired");f();f();var _Nr="networkClientSendPostRequestAsync",CNr="refreshTokenClientExecutePostToTokenEndpoint",vNr="authorizationCodeClientExecutePostToTokenEndpoint",bNr="refreshTokenClientExecuteTokenRequest",TNr="refreshTokenClientAcquireToken",LOe="refreshTokenClientAcquireTokenWithCachedRefreshToken",SNr="refreshTokenClientCreateTokenRequestBody",INr="silentFlowClientGenerateResultFromCacheRecord";var xNr="authClientExecuteTokenRequest",wNr="authClientCreateTokenRequestBody",RNr="updateTokenEndpointAuthority",Vee="popTokenGenerateCnf",FOe="handleServerTokenResponse",PNr="authorityResolveEndpointsAsync",kNr="authorityGetCloudDiscoveryMetadataFromNetwork",DNr="authorityUpdateCloudDiscoveryMetadata",NNr="authorityGetEndpointMetadataFromNetwork",MNr="authorityUpdateEndpointMetadata",yvt="authorityUpdateMetadataWithRegionalInformation",ONr="regionDiscoveryDetectRegion",Evt="regionDiscoveryGetRegionFromIMDS",BNr="regionDiscoveryGetCurrentVersion",LNr="cacheManagerGetRefreshToken";f();var FNr=a((t,e,r,n,o)=>(...s)=>{r.trace(`Executing function '${e}'`,o);let c=n.startMeasurement(e,o);o&&n.incrementFields({[`ext.${e}CallCount`]:1},o);try{let l=t(...s);return c.end({success:!0}),r.trace(`Returning result from '${e}'`,o),l}catch(l){r.trace(`Error occurred in '${e}'`,o);try{r.trace(JSON.stringify(l),o)}catch{r.trace("Unable to print error message.",o)}throw c.end({success:!1},l),l}},"invoke"),is=a((t,e,r,n,o)=>(...s)=>{r.trace(`Executing function '${e}'`,o);let c=n.startMeasurement(e,o);return o&&n.incrementFields({[`ext.${e}CallCount`]:1},o),t(...s).then(l=>(r.trace(`Returning result from '${e}'`,o),c.end({success:!0}),l)).catch(l=>{r.trace(`Error occurred in '${e}'`,o);try{r.trace(JSON.stringify(l),o)}catch{r.trace("Unable to print error message.",o)}throw c.end({success:!1},l),l})},"invokeAsync");var aBi={SW:"sw"},C8=class{static{a(this,"PopTokenGenerator")}constructor(e,r){this.cryptoUtils=e,this.performanceClient=r}async generateCnf(e,r){let n=await is(this.generateKid.bind(this),Vee,r,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:o}}async generateKid(e){return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:aBi.SW}}async signPopToken(e,r,n){return this.signPayload(e,r,n)}async signPayload(e,r,n,o){let{resourceRequestMethod:s,resourceRequestUri:c,shrClaims:l,shrNonce:u,shrOptions:d}=n,h=(c?new Qo(c):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:d1(),m:s?.toUpperCase(),u:h?.HostNameAndPort,nonce:u||this.cryptoUtils.createNewGuid(),p:h?.AbsolutePath,q:h?.QueryString?[[],h.QueryString]:void 0,client_claims:l||void 0,...o},r,d,n.correlationId)}};f();var QOe={};ui(QOe,{badToken:()=>Jme,consentRequired:()=>bvt,interactionRequired:()=>vvt,interruptedUser:()=>Svt,loginRequired:()=>Tvt,nativeAccountUnavailable:()=>cBi,noTokensFound:()=>UOe,refreshTokenExpired:()=>_vt,uxNotAllowed:()=>Cvt});f();var UOe="no_tokens_found",cBi="native_account_unavailable",_vt="refresh_token_expired",Cvt="ux_not_allowed",vvt="interaction_required",bvt="consent_required",Tvt="login_required",Jme="bad_token",Svt="interrupted_user";var UNr=[vvt,bvt,Tvt,Jme,Cvt,Svt],lBi=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token","ux_not_allowed","interrupted_user"],f1=class t extends eo{static{a(this,"InteractionRequiredAuthError")}constructor(e,r,n,o,s,c,l,u){super(e,r,n),Object.setPrototypeOf(this,t.prototype),this.timestamp=o||"",this.traceId=s||"",this.correlationId=c||"",this.claims=l||"",this.name="InteractionRequiredAuthError",this.errorNo=u}};function qOe(t,e,r){let n=!!t&&UNr.indexOf(t)>-1,o=!!r&&lBi.indexOf(r)>-1,s=!!e&&UNr.some(c=>e.indexOf(c)>-1);return n||s||o}a(qOe,"isInteractionRequiredError");function GOe(t,e){return new f1(t,e)}a(GOe,"createInteractionRequiredAuthError");f();var GA=class t extends eo{static{a(this,"ServerError")}constructor(e,r,n,o,s){super(e,r,n),this.name="ServerError",this.errorNo=o,this.status=s,Object.setPrototypeOf(this,t.prototype)}};f();function QNr(t,e){if(!t)throw Ct(j1t);if(!e)throw Ct(FG);try{let r=e.split(aOe),n=r[0],o=r.length>1?r.slice(1).join(aOe):"",s=t(n),c=JSON.parse(s);return{userRequestState:o||"",libraryState:c}}catch{throw Ct(FG)}}a(QNr,"parseRequestState");var lf=class t{static{a(this,"ResponseHandler")}constructor(e,r,n,o,s,c,l){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=o,this.performanceClient=s,this.serializableCache=c,this.persistencePlugin=l}validateTokenResponse(e,r,n){if(e.error||e.error_description||e.suberror){let o=`Error(s): ${e.error_codes||NG} - Timestamp: ${e.timestamp||NG} - Description: ${e.error_description||NG} - Correlation ID: ${e.correlation_id||NG} - Trace ID: ${e.trace_id||NG}`,s=e.error_codes?.length?e.error_codes[0]:void 0,c=new GA(e.error,o,e.suberror,s,e.status);if(n&&e.status&&e.status>=yCt&&e.status<=ECt){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. +${c}`,r);return}else if(n&&e.status&&e.status>=gCt&&e.status<=ACt){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. +${c}`,r);return}throw qOe(e.error,e.error_description,e.suberror)?new f1(e.error,e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):c}}async handleServerTokenResponse(e,r,n,o,s,c,l,u,d,p){let h;if(e.id_token){if(h=yM(e.id_token||"",this.cryptoObj.base64Decode),c&&c.nonce&&h.nonce!==c.nonce)throw Ct(L1t);if(o.maxAge||o.maxAge===0){let y=h.auth_time;if(!y)throw Ct(Rme);$me(y,o.maxAge)}}this.homeAccountIdentifier=pvt(e.client_info||"",r.authorityType,this.logger,this.cryptoObj,o.correlationId,h);let m;c&&c.state&&(m=QNr(this.cryptoObj.base64Decode,c.state)),e.key_id=e.key_id||o.sshKid||void 0;let g=this.generateCacheRecord(e,r,n,o,h,l,c),A;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess",o.correlationId),A=new u1(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(A)),u&&!d&&g.account&&this.cacheStorage.getAllAccounts({homeAccountId:g.account.homeAccountId,environment:g.account.environment},o.correlationId).length<1)return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache",o.correlationId),this.performanceClient?.addFields({acntLoggedOut:!0},o.correlationId),await t.generateAuthenticationResult(this.cryptoObj,r,g,!1,o,this.performanceClient,h,m,void 0,p);await this.cacheStorage.saveCacheRecord(g,o.correlationId,cvt(h||{}),s,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&A&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess",o.correlationId),await this.persistencePlugin.afterCacheAccess(A))}return t.generateAuthenticationResult(this.cryptoObj,r,g,!1,o,this.performanceClient,h,m,e,p)}generateCacheRecord(e,r,n,o,s,c,l){let u=r.getPreferredCache();if(!u)throw Ct(kme);let d=DOe(s),p,h;e.id_token&&s&&(p=mvt(this.homeAccountIdentifier,u,e.id_token,this.clientId,d||""),h=qNr(this.cacheStorage,r,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,s,e.client_info,u,d,l,void 0,this.logger,this.performanceClient));let m=null;if(e.access_token){let y=e.scope?Xf.fromString(e.scope):new Xf(o.scopes||[]),E=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,_=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,v=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,b=n+E,I=b+_,x=v&&v>0?n+v:void 0;m=gvt(this.homeAccountIdentifier,u,e.access_token,this.clientId,d||r.tenant||"",y.printScopes(),b,I,this.cryptoObj.base64Decode,x,e.token_type,c,e.key_id);let w=o.resource||null;w&&(m.resource=w)}let g=null;if(e.refresh_token){let y;if(e.refresh_token_expires_in){let E=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;y=n+E,this.performanceClient?.addFields({ntwkRtExpiresOnSeconds:y},o.correlationId)}g=Avt(this.homeAccountIdentifier,u,e.refresh_token,this.clientId,e.foci,c,y)}let A=null;return e.foci&&(A={clientId:this.clientId,environment:u,familyId:e.foci}),{account:h,idToken:p,accessToken:m,refreshToken:g,appMetadata:A}}static async generateAuthenticationResult(e,r,n,o,s,c,l,u,d,p){let h="",m=[],g=null,A,y,E="";if(n.accessToken){if(n.accessToken.tokenType===Hu.POP&&!s.popKid){let I=new C8(e,c),{secret:x,keyId:w}=n.accessToken;if(!w)throw Ct(z1t);h=await I.signPopToken(x,w,s)}else h=n.accessToken.secret;m=Xf.fromString(n.accessToken.target).asArray(),g=Yme(n.accessToken.expiresOn),A=Yme(n.accessToken.extendedExpiresOn),n.accessToken.refreshOn&&(y=Yme(n.accessToken.refreshOn))}n.appMetadata&&(E=n.appMetadata.familyId===OG?OG:"");let _=l?.oid||l?.sub||"",v=l?.tid||"";d?.spa_accountid&&n.account&&(n.account.nativeAccountId=d?.spa_accountid);let b=n.account?POe(Hee(n.account),void 0,l,n.idToken?.secret):null;return{authority:r.canonicalAuthority,uniqueId:_,tenantId:v,scopes:m,account:b,idToken:n?.idToken?.secret||"",idTokenClaims:l||{},accessToken:h,fromCache:o,expiresOn:g,extExpiresOn:A,refreshOn:y,correlationId:s.correlationId,requestId:p||"",familyId:E,tokenType:n.accessToken?.tokenType||"",state:u?u.userRequestState:"",cloudGraphHostName:n.account?.cloudGraphHostName||"",msGraphHost:n.account?.msGraphHost||"",code:d?.spa_code,fromPlatformBroker:!1}}};function qNr(t,e,r,n,o,s,c,l,u,d,p,h,m){h?.verbose("setCachedAccount called",o);let g=l||e.getPreferredCache(),A=t.getAccountsFilteredBy({homeAccountId:r,environment:g},o);m?.addFields({cacheMatchedAccounts:A.length},o),A.length>1&&h?.warning("Multiple base accounts matched homeAccountId. Ignoring cached account and creating a new base account.",o);let E=(A.length===1?A[0]:null)||fvt({homeAccountId:r,idTokenClaims:s,clientInfo:c,environment:l,cloudGraphHostName:d?.cloud_graph_host_name,msGraphHost:d?.msgraph_host,nativeAccountId:p},e,n),_=E.tenantProfiles||[],v=u||E.realm;if(v&&!_.find(b=>b.tenantId===v)){let b=WG(r,E.localAccountId,v,s);_.push(b)}return E.tenantProfiles=_,E}a(qNr,"buildAccountToCache");f();var HA={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};f();async function jA(t,e,r){return typeof t=="string"?t:t({clientId:e,tokenEndpoint:r})}a(jA,"getClientAssertion");f();function Wee(t,e,r){return{clientId:t,authority:e.authority,scopes:e.scopes,homeAccountIdentifier:r,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,embeddedClientId:e.embeddedClientId||e.extraParameters?.clientId}}a(Wee,"getRequestThumbprint");var YG={};ui(YG,{createTokenQueryParameters:()=>ege,createTokenRequestHeaders:()=>Zme,executePostToTokenEndpoint:()=>tge,sendPostRequest:()=>GNr});f();f();var Xme=class t{static{a(this,"ThrottlingUtils")}static generateThrottlingStorageKey(e){return`${Sme}.${JSON.stringify(e)}`}static preProcess(e,r,n){let o=t.generateThrottlingStorageKey(r),s=e.getThrottlingCache(o,n);if(s){if(s.throttleTime=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(af.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){let r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||PCt),n+kCt)*1e3)}static removeThrottle(e,r,n,o){let s=Wee(r,n,o),c=this.generateThrottlingStorageKey(s);e.removeItem(c,n.correlationId)}};f();var zee=class t extends eo{static{a(this,"NetworkError")}constructor(e,r,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.error=e,this.httpStatus=r,this.responseHeaders=n}};function Ivt(t,e,r,n){return t.errorMessage=`${t.errorMessage}, additionalErrorInfo: error.name:${n?.name}, error.message:${n?.message}`,new zee(t,e,r)}a(Ivt,"createNetworkError");function Zme(t,e,r){let n={};if(n[af.CONTENT_TYPE]=lCt,!e&&r)switch(r.type){case HA.HOME_ACCOUNT_ID:try{let o=gP(r.credential);n[af.CCS_HEADER]=`Oid:${o.uid}@${o.utid}`}catch(o){t.verbose(`Could not parse home account ID for CCS Header: '${o}'`,"")}break;case HA.UPN:n[af.CCS_HEADER]=`UPN: ${r.credential}`;break}return n}a(Zme,"createTokenRequestHeaders");function ege(t,e,r,n){let o=new Map;return t.embeddedClientId&&gM(o,e,r),t.extraQueryParameters&&mM(o,t.extraQueryParameters),jG(o,t.correlationId),UG(o,t.correlationId,n),hP(o)}a(ege,"createTokenQueryParameters");async function tge(t,e,r,n,o,s,c,l,u,d){let p=await GNr(n,t,{body:e,headers:r},o,s,c,l,u);return d&&p.status<500&&p.status!==429&&d.clearTelemetryCache(),p}a(tge,"executePostToTokenEndpoint");async function GNr(t,e,r,n,o,s,c,l){Xme.preProcess(o,t,n);let u;try{u=await is(s.sendPostRequestAsync.bind(s),_Nr,c,l,n)(e,r);let d=u.headers||{};l?.addFields({refreshTokenSize:u.body.refresh_token?.length||0,httpVerToken:d[af.X_MS_HTTP_VERSION]||"",requestId:d[af.X_MS_REQUEST_ID]||""},n)}catch(d){if(d instanceof zee){let p=d.responseHeaders;throw p&&l?.addFields({httpVerToken:p[af.X_MS_HTTP_VERSION]||"",requestId:p[af.X_MS_REQUEST_ID]||"",contentTypeHeader:p[af.CONTENT_TYPE]||void 0,contentLengthHeader:p[af.CONTENT_LENGTH]||void 0,httpStatus:d.httpStatus},n),d.error}throw d instanceof eo?d:Ct(N1t)}return Xme.postProcess(o,t,u,n),u}a(GNr,"sendPostRequest");var jOe={};ui(jOe,{createDiscoveredInstance:()=>wvt});f();f();f();function HNr(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}a(HNr,"isOpenIdConfigResponse");f();function jNr(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}a(jNr,"isCloudInstanceDiscoveryResponse");f();function $Nr(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}a($Nr,"isCloudInstanceDiscoveryErrorResponse");f();var rge=class t{static{a(this,"RegionDiscovery")}constructor(e,r,n,o){this.networkInterface=e,this.logger=r,this.performanceClient=n,this.correlationId=o}async detectRegion(e,r){let n=e;if(n)r.region_source=g8.ENVIRONMENT_VARIABLE;else{let o=t.IMDS_OPTIONS;try{let s=await is(this.getRegionFromIMDS.bind(this),Evt,this.logger,this.performanceClient,this.correlationId)(uCt,o);if(s.status===uOe&&(n=s.body,r.region_source=g8.IMDS),s.status===dOe){let c=await is(this.getCurrentVersion.bind(this),BNr,this.logger,this.performanceClient,this.correlationId)(o);if(!c)return r.region_source=g8.FAILED_AUTO_DETECTION,null;let l=await is(this.getRegionFromIMDS.bind(this),Evt,this.logger,this.performanceClient,this.correlationId)(c,o);l.status===uOe&&(n=l.body,r.region_source=g8.IMDS)}}catch{return r.region_source=g8.FAILED_AUTO_DETECTION,null}}return n||(r.region_source=g8.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,r){return this.networkInterface.sendGetRequestAsync(`${lOe}?api-version=${e}&format=text`,r,dCt)}async getCurrentVersion(e){try{let r=await this.networkInterface.sendGetRequestAsync(`${lOe}?format=json`,e);return r.status===dOe&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch{return null}}};rge.IMDS_OPTIONS={headers:{Metadata:"true"}};var dx=class t{static{a(this,"Authority")}constructor(e,r,n,o,s,c,l,u){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=l,this.correlationId=c,this.managedIdentity=u||!1,this.regionDiscovery=new rge(r,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(sOe))return Yb.Ciam;let r=e.PathSegments;if(r.length)switch(r[0].toLowerCase()){case oCt:return Yb.Adfs;case sCt:return Yb.Dsts}return Yb.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new Qo(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Ct(ux)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Ct(ux)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Ct(ux)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Ct(W1t);return this.replacePath(this.metadata.end_session_endpoint)}else throw Ct(ux)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Ct(ux)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Ct(ux)}canReplaceTenant(e){return e.PathSegments.length===1&&!t.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Yb.Default&&this.protocolMode!==bg.OIDC}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let r=e,o=new Qo(this.metadata.canonical_authority).getUrlComponents(),s=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((l,u)=>{let d=s[u];if(u===0&&this.canReplaceTenant(o)){let p=new Qo(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];d!==p&&(this.logger.verbose(`Replacing tenant domain name '${d}' with id '${p}'`,this.correlationId),d=p)}l!==d&&(r=r.replace(`/${d}/`,`/${l}/`))}),this.replaceTenant(r)}get defaultOpenIdConfigurationEndpoint(){let e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Yb.Adfs||this.protocolMode===bg.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){let e=this.getCurrentMetadataEntity(),r=await is(this.updateCloudDiscoveryMetadata.bind(this),DNr,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);let n=await is(this.updateEndpointMetadata.bind(this),MNr,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,r,{source:n}),this.performanceClient?.addFields({cloudDiscoverySource:r,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort,this.correlationId);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:OOe(),jwks_uri:""}),e}updateCachedMetadata(e,r,n){r!==vg.CACHE&&n?.source!==vg.CACHE&&(e.expiresAt=OOe(),e.canonical_authority=this.canonicalAuthority);let o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache,this.correlationId);this.cacheManager.setAuthorityMetadata(o,e,this.correlationId),this.metadata=e}async updateEndpointMetadata(e){let r=this.updateEndpointMetadataFromLocalSources(e);if(r){if(r.source===vg.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&r.metadata){let o=await is(this.updateMetadataWithRegionalInformation.bind(this),yvt,this.logger,this.performanceClient,this.correlationId)(r.metadata);$ee(e,o,!1),e.canonical_authority=this.canonicalAuthority}return r.source}let n=await is(this.getEndpointMetadataFromNetwork.bind(this),NNr,this.logger,this.performanceClient,this.correlationId)();if(n)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(n=await is(this.updateMetadataWithRegionalInformation.bind(this),yvt,this.logger,this.performanceClient,this.correlationId)(n)),$ee(e,n,!0),vg.NETWORK;throw Ct(M1t,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration",this.correlationId);let r=this.getEndpointMetadataFromConfig();if(r)return this.logger.verbose("Found endpoint metadata in authority configuration",this.correlationId),$ee(e,r,!1),{source:vg.CONFIG};this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values.",this.correlationId);let n=this.getEndpointMetadataFromHardcodedValues();if(n)return $ee(e,n,!1),{source:vg.HARDCODED_VALUES,metadata:n};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.",this.correlationId);let o=BOe(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!o?(this.logger.verbose("Found endpoint metadata in the cache.",""),{source:vg.CACHE}):(o&&this.logger.verbose("The metadata entity is expired.",""),null)}isAuthoritySameType(e){return new Qo(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw mc(R1t)}return null}async getEndpointMetadataFromNetwork(){let e={},r=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from '${r}'`,this.correlationId);try{let n=await this.networkInterface.sendGetRequestAsync(r,e);return HNr(n.body)?n.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration",this.correlationId),null)}catch(n){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: '${n}'`,this.correlationId),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in lvt?lvt[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){let r=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(r){if(r!==fCt)return this.regionDiscoveryMetadata.region_outcome=Ime.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=r,t.replaceWithRegionalInformation(e,r);let n=await is(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),ONr,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(n)return this.regionDiscoveryMetadata.region_outcome=Ime.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=n,t.replaceWithRegionalInformation(e,n);this.regionDiscoveryMetadata.region_outcome=Ime.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){let r=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(r)return r;let n=await is(this.getCloudDiscoveryMetadataFromNetwork.bind(this),kNr,this.logger,this.performanceClient,this.correlationId)();if(n)return Kme(e,n,!0),vg.NETWORK;throw mc(P1t)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration",this.correlationId),this.logger.verbosePii(`Known Authorities: '${this.authorityOptions.knownAuthorities||Cme}'`,this.correlationId),this.logger.verbosePii(`Authority Metadata: '${this.authorityOptions.authorityMetadata||Cme}'`,this.correlationId),this.logger.verbosePii(`Canonical Authority: '${e.canonical_authority||Cme}'`,this.correlationId);let r=this.getCloudDiscoveryMetadataFromConfig();if(r)return this.logger.verbose("Found cloud discovery metadata in authority configuration",this.correlationId),Kme(e,r,!1),vg.CONFIG;this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values.",this.correlationId);let n=hNr(this.hostnameAndPort);if(n)return this.logger.verbose("Found cloud discovery metadata from hardcoded values.",this.correlationId),Kme(e,n,!1),vg.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.",this.correlationId);let o=BOe(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache.",""),vg.CACHE):(o&&this.logger.verbose("The metadata entity is expired.",""),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Yb.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host.",this.correlationId),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.",this.correlationId);try{this.logger.verbose("Attempting to parse the cloud discovery metadata.",this.correlationId);let e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=Vme(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata.",""),r)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata.",this.correlationId),r;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.",this.correlationId)}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error.",this.correlationId),mc(TOe)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host.",this.correlationId),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){let e=`${aCt}${this.canonicalAuthority}oauth2/v2.0/authorize`,r={},n=null;try{let o=await this.networkInterface.sendGetRequestAsync(e,r),s,c;if(jNr(o.body))s=o.body,c=s.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: '${s.tenant_discovery_endpoint}'`,this.correlationId);else if($Nr(o.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: '${o.status}'`,this.correlationId),s=o.body,s.error===mCt)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance.",this.correlationId),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is '${s.error}'`,this.correlationId),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is '${s.error_description}'`,this.correlationId),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network, correlationId) to []",this.correlationId),c=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse",this.correlationId),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request.",this.correlationId),n=Vme(c,this.hostnameAndPort)}catch(o){if(o instanceof eo)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. +Error: '${o.errorCode}' +Error Description: '${o.errorMessage}'`,this.correlationId);else{let s=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. +Error: '${s.name}' +Error Description: '${s.message}'`,this.correlationId)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request.",this.correlationId),this.logger.verbose("Creating custom Authority for custom domain scenario.",this.correlationId),n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(r=>r&&Qo.getDomainFromUrl(r).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,r){let n;if(r&&r.azureCloudInstance!==AM.None){let o=r.tenant?r.tenant:_me;n=`${r.azureCloudInstance}/${o}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return iCt;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Ct(ux)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return dvt.has(e)}static isPublicCloudAuthority(e){return hCt.indexOf(e)>=0}static buildRegionalAuthorityString(e,r,n){let o=new Qo(e);o.validateAsUri();let s=o.getUrlComponents(),c=`${r}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(c=`${r}.${pCt}`);let l=Qo.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:c}).urlString;return n?`${l}?${n}`:l}static replaceWithRegionalInformation(e,r){let n={...e};return n.authorization_endpoint=t.buildRegionalAuthorityString(n.authorization_endpoint,r),n.token_endpoint=t.buildRegionalAuthorityString(n.token_endpoint,r),n.end_session_endpoint&&(n.end_session_endpoint=t.buildRegionalAuthorityString(n.end_session_endpoint,r)),n}static transformCIAMAuthority(e){let r=e,o=new Qo(e).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(sOe)){let s=o.HostNameAndPort.split(".")[0];r=`${r}${s}${cCt}`}return r}};dx.reservedTenantDomains=new Set(["{tenant}","{tenantid}",cx.COMMON,cx.CONSUMERS,cx.ORGANIZATIONS]);function VNr(t){let n=new Qo(t).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(n){case cx.COMMON:case cx.ORGANIZATIONS:case cx.CONSUMERS:return;default:return n}}a(VNr,"getTenantFromAuthorityString");function HOe(t){return t.endsWith(Ree)?t:`${t}${Ree}`}a(HOe,"formatAuthorityUri");function xvt(t){let e=t.cloudDiscoveryMetadata,r;if(e)try{r=JSON.parse(e)}catch{throw mc(TOe)}return{canonicalAuthority:t.authority?HOe(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:r}}a(xvt,"buildStaticAuthorityOptions");async function wvt(t,e,r,n,o,s,c){let l=dx.transformCIAMAuthority(HOe(t)),u=new dx(l,e,r,n,o,s,c);try{return await is(u.resolveEndpointsAsync.bind(u),PNr,o,c,s)(),u}catch{throw Ct(ux)}}a(wvt,"createDiscoveredInstance");var nge=class{static{a(this,"AuthorizationCodeClient")}constructor(e,r){this.includeRedirectUri=!0,this.config=EM(e),this.logger=new lp(this.config.loggerOptions,E8,mP),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,r,n){if(!e.code)throw Ct(Q1t);n&&n.cloud_instance_host_name&&await is(this.updateTokenEndpointAuthority.bind(this),RNr,this.logger,this.performanceClient,e.correlationId)(n.cloud_instance_host_name,e.correlationId);let o=d1(),s=await is(this.executeTokenRequest.bind(this),xNr,this.logger,this.performanceClient,e.correlationId)(this.authority,e,this.serverTelemetryManager),c=s.headers?.[af.X_MS_REQUEST_ID],l=new lf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return l.validateTokenResponse(s.body,e.correlationId),is(l.handleServerTokenResponse.bind(l),FOe,this.logger,this.performanceClient,e.correlationId)(s.body,this.authority,o,e,r,n,void 0,void 0,void 0,c)}getLogoutUri(e){if(!e)throw mc(x1t);let r=this.createLogoutUrlQueryString(e);return Qo.appendQueryString(this.authority.endSessionEndpoint,r)}async executeTokenRequest(e,r,n){let o=ege(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri,this.performanceClient),s=Qo.appendQueryString(e.tokenEndpoint,o),c=await is(this.createTokenRequestBody.bind(this),wNr,this.logger,this.performanceClient,r.correlationId)(r),l;if(r.clientInfo)try{let p=Gee(r.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${p.uid}${Dee}${p.utid}`,type:HA.HOME_ACCOUNT_ID}}catch(p){this.logger.verbose(`Could not parse client info for CCS Header: '${p}'`,r.correlationId)}let u=Zme(this.logger,this.config.systemOptions.preventCorsPreflight,l||r.ccsCredential),d=Wee(this.config.authOptions.clientId,r);return is(tge,vNr,this.logger,this.performanceClient,r.correlationId)(s,c,u,d,r.correlationId,this.cacheManager,this.networkClient,this.logger,this.performanceClient,n)}async createTokenRequestBody(e){let r=new Map;if(qG(r,e.embeddedClientId||e.extraParameters?.[pP]||this.config.authOptions.clientId),this.includeRedirectUri)GG(r,e.redirectUri);else if(!e.redirectUri)throw mc(v1t);if(QG(r,e.scopes,!0,this.oidcDefaultScopes),jme(r,e.resource),nvt(r,e.code),Dme(r,this.config.libraryInfo),Nme(r,this.config.telemetry.application),Hme(r),this.serverTelemetryManager&&!NOe(this.config)&&Gme(r,this.serverTelemetryManager),e.codeVerifier&&ovt(r,e.codeVerifier),this.config.clientCredentials.clientSecret&&Ome(r,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let o=this.config.clientCredentials.clientAssertion;Bme(r,await jA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Lme(r,o.assertionType)}if(Fme(r,bme.AUTHORIZATION_CODE_GRANT),$G(r),e.authenticationScheme===Hu.POP){let o=new C8(this.cryptoUtils,this.performanceClient),s;e.popKid?s=this.cryptoUtils.encodeKid(e.popKid):s=(await is(o.generateCnf.bind(o),Vee,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Qme(r,s)}else if(e.authenticationScheme===Hu.SSH)if(e.sshJwk)qme(r,e.sshJwk);else throw mc(wme);(!Zc.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&HG(r,e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{let o=Gee(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${o.uid}${Dee}${o.utid}`,type:HA.HOME_ACCOUNT_ID}}catch(o){this.logger.verbose(`Could not parse client info for CCS Header: '${o}'`,e.correlationId)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case HA.HOME_ACCOUNT_ID:try{let o=gP(n.credential);hM(r,o)}catch(o){this.logger.verbose(`Could not parse home account ID for CCS Header: '${o}'`,e.correlationId)}break;case HA.UPN:y8(r,n.credential);break}return e.embeddedClientId&&gM(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.extraParameters&&mM(r,e.extraParameters),e.enableSpaAuthorizationCode&&(!e.extraParameters||!e.extraParameters[_Oe])&&mM(r,{[_Oe]:"1"}),UG(r,e.correlationId,this.performanceClient),hP(r)}createLogoutUrlQueryString(e){let r=new Map;return e.postLogoutRedirectUri&&X1t(r,e.postLogoutRedirectUri),e.correlationId&&jG(r,e.correlationId),e.idTokenHint&&Z1t(r,e.idTokenHint),e.state&&Mme(r,e.state),e.logoutHint&&avt(r,e.logoutHint),e.extraQueryParameters&&mM(r,e.extraQueryParameters),this.config.authOptions.instanceAware&&Ume(r),hP(r)}async updateTokenEndpointAuthority(e,r){let n=`https://${e}/${this.authority.tenant}/`,o=await wvt(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,r,this.performanceClient);this.authority=o}};f();var uBi=300,KG=class{static{a(this,"RefreshTokenClient")}constructor(e,r){this.config=EM(e),this.logger=new lp(this.config.loggerOptions,E8,mP),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}async acquireToken(e,r){let n=d1(),o=await is(this.executeTokenRequest.bind(this),bNr,this.logger,this.performanceClient,e.correlationId)(e,this.authority),s=o.headers?.[af.X_MS_REQUEST_ID],c=new lf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return c.validateTokenResponse(o.body,e.correlationId),is(c.handleServerTokenResponse.bind(c),FOe,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,n,e,r,void 0,void 0,!0,e.forceCache,s)}async acquireTokenByRefreshToken(e,r){if(!e)throw mc(I1t);if(!e.account)throw Ct(Pme);if(this.cacheManager.isAppMetadataFOCI(e.account.environment,e.correlationId))try{return await is(this.acquireTokenWithCachedRefreshToken.bind(this),LOe,this.logger,this.performanceClient,e.correlationId)(e,!0,r)}catch(o){let s=o instanceof f1&&o.errorCode===UOe,c=o instanceof GA&&o.errorCode===NCt&&o.subError===MCt;if(s||c)return is(this.acquireTokenWithCachedRefreshToken.bind(this),LOe,this.logger,this.performanceClient,e.correlationId)(e,!1,r);throw o}return is(this.acquireTokenWithCachedRefreshToken.bind(this),LOe,this.logger,this.performanceClient,e.correlationId)(e,!1,r)}async acquireTokenWithCachedRefreshToken(e,r,n){let o=FNr(this.cacheManager.getRefreshToken.bind(this.cacheManager),LNr,this.logger,this.performanceClient,e.correlationId)(e.account,r,e.correlationId,void 0);if(!o)throw GOe(UOe);if(o.expiresOn){let c=e.refreshTokenExpirationOffsetSeconds||uBi;if(this.performanceClient?.addFields({cacheRtExpiresOnSeconds:Number(o.expiresOn),rtOffsetSeconds:c},e.correlationId),jee(o.expiresOn,c))throw GOe(_vt)}let s={...e,refreshToken:o.secret,authenticationScheme:e.authenticationScheme||Hu.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:HA.HOME_ACCOUNT_ID}};try{return await is(this.acquireToken.bind(this),TNr,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(c){if(c instanceof f1&&c.subError===Jme){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache",e.correlationId);let l=this.cacheManager.generateCredentialKey(o);this.cacheManager.removeRefreshToken(l,e.correlationId)}throw c}}async executeTokenRequest(e,r){let n=ege(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri,this.performanceClient),o=Qo.appendQueryString(r.tokenEndpoint,n),s=await is(this.createTokenRequestBody.bind(this),SNr,this.logger,this.performanceClient,e.correlationId)(e),c=Zme(this.logger,this.config.systemOptions.preventCorsPreflight,e.ccsCredential),l=Wee(this.config.authOptions.clientId,e);return is(tge,CNr,this.logger,this.performanceClient,e.correlationId)(o,s,c,l,e.correlationId,this.cacheManager,this.networkClient,this.logger,this.performanceClient,this.serverTelemetryManager)}async createTokenRequestBody(e){let r=new Map;if(qG(r,e.embeddedClientId||e.extraParameters?.[pP]||this.config.authOptions.clientId),e.redirectUri&&GG(r,e.redirectUri),QG(r,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Fme(r,bme.REFRESH_TOKEN_GRANT),$G(r),Dme(r,this.config.libraryInfo),Nme(r,this.config.telemetry.application),Hme(r),this.serverTelemetryManager&&!NOe(this.config)&&Gme(r,this.serverTelemetryManager),ivt(r,e.refreshToken),this.config.clientCredentials.clientSecret&&Ome(r,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let n=this.config.clientCredentials.clientAssertion;Bme(r,await jA(n.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Lme(r,n.assertionType)}if(e.authenticationScheme===Hu.POP){let n=new C8(this.cryptoUtils,this.performanceClient),o;e.popKid?o=this.cryptoUtils.encodeKid(e.popKid):o=(await is(n.generateCnf.bind(n),Vee,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Qme(r,o)}else if(e.authenticationScheme===Hu.SSH)if(e.sshJwk)qme(r,e.sshJwk);else throw mc(wme);if((!Zc.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&HG(r,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case HA.HOME_ACCOUNT_ID:try{let n=gP(e.ccsCredential.credential);hM(r,n)}catch(n){this.logger.verbose(`Could not parse home account ID for CCS Header: '${n}'`,e.correlationId)}break;case HA.UPN:y8(r,e.ccsCredential.credential);break}return e.embeddedClientId&&gM(r,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.extraParameters&&mM(r,{...e.extraParameters}),UG(r,e.correlationId,this.performanceClient),hP(r)}};f();var ige=class{static{a(this,"SilentFlowClient")}constructor(e,r){this.config=EM(e),this.logger=new lp(this.config.loggerOptions,E8,mP),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}async acquireCachedToken(e){let r=lx.NOT_APPLICABLE;if(e.forceRefresh||!Zc.isEmptyObj(e.claims))throw this.setCacheOutcome(lx.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Ct(Uee);if(!e.account)throw Ct(Pme);let n=e.account.tenantId||VNr(e.authority),o=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,o,n);if(s){if(hvt(s.cachedAt)||jee(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(lx.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Ct(Uee);if(e.resource){if(s.resource!==e.resource)throw this.setCacheOutcome(lx.NO_CACHED_ACCESS_TOKEN,e.correlationId),Ct(Uee)}else s.refreshOn&&jee(s.refreshOn,0)&&(r=lx.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(lx.NO_CACHED_ACCESS_TOKEN,e.correlationId),Ct(Uee);let c=e.authority||this.authority.getPreferredCache(),l={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,n),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c,e.correlationId)};return this.setCacheOutcome(r,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await is(this.generateResultFromCacheRecord.bind(this),INr,this.logger,this.performanceClient,e.correlationId)(l,e),r]}setCacheOutcome(e,r){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},r),e!==lx.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: '${e}'`,r)}async generateResultFromCacheRecord(e,r){let n;if(e.idToken&&(n=yM(e.idToken.secret,this.config.cryptoInterface.base64Decode)),r.maxAge||r.maxAge===0){let o=n?.auth_time;if(!o)throw Ct(Rme);$me(o,r.maxAge)}return lf.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,r,this.performanceClient,n)}};var oge={};ui(oge,{getAuthorizationCodePayload:()=>pBi,getAuthorizeUrl:()=>fBi,getStandardAuthorizeRequestParameters:()=>dBi,validateAuthorizationResponse:()=>WNr});f();function dBi(t,e,r,n){let o=e.correlationId,s=new Map;qG(s,e.embeddedClientId||e.extraQueryParameters?.[pP]||t.clientId);let c=[...e.scopes||[],...e.extraScopesToConsent||[]];if(QG(s,c,!0,t.authority.options.OIDCOptions?.defaultScopes),jme(s,e.resource),GG(s,e.redirectUri),jG(s,o),J1t(s,e.responseMode),$G(s),svt(s),e.prompt&&(tvt(s,e.prompt),n?.addFields({prompt:e.prompt},o)),e.domainHint&&(evt(s,e.domainHint),n?.addFields({domainHintFromRequest:!0},o)),e.prompt!==vme.SELECT_ACCOUNT)if(e.sid&&e.prompt===vme.NONE)r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request",e.correlationId),ROe(s,e.sid),n?.addFields({sidFromRequest:!0},o);else if(e.account){let l=mBi(e.account),u=gBi(e.account);if(u&&e.domainHint&&(r.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint',e.correlationId),u=null),u){r.verbose("createAuthCodeUrlQueryString: login_hint claim present on account",e.correlationId),Qee(s,u),n?.addFields({loginHintFromClaim:!0},o);try{let d=gP(e.account.homeAccountId);hM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header",e.correlationId)}}else if(l&&e.prompt===vme.NONE){r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account",e.correlationId),ROe(s,l),n?.addFields({sidFromClaim:!0},o);try{let d=gP(e.account.homeAccountId);hM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header",e.correlationId)}}else if(e.loginHint)r.verbose("createAuthCodeUrlQueryString: Adding login_hint from request",e.correlationId),Qee(s,e.loginHint),y8(s,e.loginHint),n?.addFields({loginHintFromRequest:!0},o);else if(e.account.username){r.verbose("createAuthCodeUrlQueryString: Adding login_hint from account",e.correlationId),Qee(s,e.account.username),n?.addFields({loginHintFromUpn:!0},o);try{let d=gP(e.account.homeAccountId);hM(s,d)}catch{r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header",e.correlationId)}}}else e.loginHint&&(r.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request",e.correlationId),Qee(s,e.loginHint),y8(s,e.loginHint),n?.addFields({loginHintFromRequest:!0},o));else r.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints",e.correlationId);return e.nonce&&rvt(s,e.nonce),e.state&&Mme(s,e.state),(e.claims||t.clientCapabilities&&t.clientCapabilities.length>0)&&HG(s,e.claims,t.clientCapabilities),e.embeddedClientId&&gM(s,t.clientId,t.redirectUri),t.instanceAware&&(!e.extraQueryParameters||!Object.keys(e.extraQueryParameters).includes(Oee))&&Ume(s),s}a(dBi,"getStandardAuthorizeRequestParameters");function fBi(t,e){let r=hP(e);return Qo.appendQueryString(t.authorizationEndpoint,r)}a(fBi,"getAuthorizeUrl");function pBi(t,e){if(WNr(t,e),!t.code)throw Ct(V1t);return t}a(pBi,"getAuthorizationCodePayload");function WNr(t,e){if(!t.state||!e)throw t.state?Ct(xOe,"Cached State"):Ct(xOe,"Server State");let r,n;try{r=decodeURIComponent(t.state)}catch{throw Ct(FG,t.state)}try{n=decodeURIComponent(e)}catch{throw Ct(FG,t.state)}if(r!==n)throw Ct(B1t);if(t.error||t.error_description||t.suberror){let o=hBi(t);throw qOe(t.error,t.error_description,t.suberror)?new f1(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||"",o):new GA(t.error||"",t.error_description,t.suberror,o)}}a(WNr,"validateAuthorizationResponse");function hBi(t){let e="code=",r=t.error_uri?.lastIndexOf(e);return r&&r>=0?t.error_uri?.substring(r+e.length):void 0}a(hBi,"parseServerErrorNo");function mBi(t){return t.idTokenClaims?.sid||null}a(mBi,"extractAccountSid");function gBi(t){return t.loginHint||t.idTokenClaims?.login_hint||null}a(gBi,"extractLoginHint");f();function JG(t,e){if(t){if(e.resource&&(zNr(e.extraParameters)||zNr(e.extraQueryParameters)))throw Ct(K1t);if(!e.resource)throw Ct(Y1t)}}a(JG,"enforceResourceParameter");function zNr(t){return t?Object.prototype.hasOwnProperty.call(t,"resource"):!1}a(zNr,"containsResourceParam");var Yee={};ui(Yee,{postRequestFailed:()=>yBi,unexpectedError:()=>ABi});f();var ABi="unexpected_error",yBi="post_request_failed";f();var YNr=",",KNr="|";function EBi(t){let{skus:e,libraryName:r,libraryVersion:n,extensionName:o,extensionVersion:s}=t,c=new Map([[0,[r,n]],[2,[o,s]]]),l=[];if(e?.length){if(l=e.split(YNr),l.length<4)return e}else l=Array.from({length:4},()=>KNr);return c.forEach((u,d)=>{u.length===2&&u[0]?.length&&u[1]?.length&&_Bi({skuArr:l,index:d,skuName:u[0],skuVersion:u[1]})}),l.join(YNr)}a(EBi,"makeExtraSkuString");function _Bi(t){let{skuArr:e,index:r,skuName:n,skuVersion:o}=t;r>=e.length||(e[r]=[n,o].join(KNr))}a(_Bi,"setSku");var XG=class t{static{a(this,"ServerTelemetryManager")}constructor(e,r){this.cacheOutcome=lx.NOT_APPLICABLE,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||"",this.wrapperVer=e.wrapperVer||"",this.telemetryCacheKey=Tme+MG+e.clientId}generateCurrentRequestHeaderValue(){let e=`${this.apiId}${m8}${this.cacheOutcome}`,r=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n?.length&&r.push(`broker_error=${n}`);let o=r.join(m8),s=this.getRegionDiscoveryFields(),c=[e,s].join(m8);return[hOe,c,o].join(mOe)}generateLastRequestHeaderValue(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(m8),o=e.errors.slice(0,r).join(m8),s=e.errors.length,c=r=ICt&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof eo?e.subError?r.errors.push(e.subError):e.errorCode?r.errors.push(e.errorCode):r.errors.push(e.toString()):r.errors.push(e.toString()):r.errors.push(RCt),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r,this.correlationId)}incrementCacheHits(){let e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){let e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey,this.correlationId)||e}clearTelemetryCache(){let e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let o={failedRequests:e.failedRequests.slice(r*2),errors:e.errors.slice(r),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let r,n=0,o=0,s=e.errors.length;for(r=0;rJSON.parse(l)),lastUpdatedAt:Date.now().toString()},c={};_8.toObject(c,s),r[n]=c}),r}static deserializeIdTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,realm:o.realm,lastUpdatedAt:Date.now().toString()};r[n]=s}),r}static deserializeAccessTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,realm:o.realm,target:o.target,cachedAt:o.cached_at,expiresOn:o.expires_on,extendedExpiresOn:o.extended_expires_on,refreshOn:o.refresh_on,keyId:o.key_id,tokenType:o.token_type,userAssertionHash:o.userAssertionHash,resource:o.resource,lastUpdatedAt:Date.now().toString()};r[n]=s}),r}static deserializeRefreshTokens(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n],s={homeAccountId:o.home_account_id,environment:o.environment,credentialType:o.credential_type,clientId:o.client_id,secret:o.secret,familyId:o.family_id,target:o.target,realm:o.realm,lastUpdatedAt:Date.now().toString()};r[n]=s}),r}static deserializeAppMetadata(e){let r={};return e&&Object.keys(e).map(function(n){let o=e[n];r[n]={clientId:o.client_id,environment:o.environment,familyId:o.family_id}}),r}static deserializeAllCache(e){return{accounts:e.Account?this.deserializeAccounts(e.Account):{},idTokens:e.IdToken?this.deserializeIdTokens(e.IdToken):{},accessTokens:e.AccessToken?this.deserializeAccessTokens(e.AccessToken):{},refreshTokens:e.RefreshToken?this.deserializeRefreshTokens(e.RefreshToken):{},appMetadata:e.AppMetadata?this.deserializeAppMetadata(e.AppMetadata):{}}}};f();f();var JNr="system_assigned_managed_identity",CBi="managed_identity",Pvt=`https://login.microsoftonline.com/${CBi}/`,RE={AUTHORIZATION_HEADER_NAME:"Authorization",METADATA_HEADER_NAME:"Metadata",APP_SERVICE_SECRET_HEADER_NAME:"X-IDENTITY-HEADER",ML_AND_SF_SECRET_HEADER_NAME:"secret"},e0={API_VERSION:"api-version",RESOURCE:"resource",SHA256_TOKEN_TO_REFRESH:"token_sha256_to_refresh",XMS_CC:"xms_cc"},yi={AZURE_POD_IDENTITY_AUTHORITY_HOST:"AZURE_POD_IDENTITY_AUTHORITY_HOST",DEFAULT_IDENTITY_CLIENT_ID:"DEFAULT_IDENTITY_CLIENT_ID",IDENTITY_ENDPOINT:"IDENTITY_ENDPOINT",IDENTITY_HEADER:"IDENTITY_HEADER",IDENTITY_SERVER_THUMBPRINT:"IDENTITY_SERVER_THUMBPRINT",IMDS_ENDPOINT:"IMDS_ENDPOINT",MSI_ENDPOINT:"MSI_ENDPOINT",MSI_SECRET:"MSI_SECRET"},Pi={APP_SERVICE:"AppService",AZURE_ARC:"AzureArc",CLOUD_SHELL:"CloudShell",DEFAULT_TO_IMDS:"DefaultToImds",IMDS:"Imds",MACHINE_LEARNING:"MachineLearning",SERVICE_FABRIC:"ServiceFabric"},$u={SYSTEM_ASSIGNED:"system-assigned",USER_ASSIGNED_CLIENT_ID:"user-assigned-client-id",USER_ASSIGNED_RESOURCE_ID:"user-assigned-resource-id",USER_ASSIGNED_OBJECT_ID:"user-assigned-object-id"},Cd={GET:"GET",POST:"POST"},XNr="REGION_NAME",ZNr="MSAL_FORCE_REGION",eMr=32,tMr={SHA256:"sha256"},$Oe={CV_CHARSET:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"},kvt={KEY_SEPARATOR:"-"},Kb={MSAL_SKU:"msal.js.node",JWT_BEARER_ASSERTION_TYPE:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",HTTP_PROTOCOL:"http://",LOCALHOST:"localhost"},Vu={acquireTokenSilent:62,acquireTokenByUsernamePassword:371,acquireTokenByDeviceCode:671,acquireTokenByClientCredential:771,acquireTokenByOBO:772,acquireTokenWithManagedIdentity:773,acquireTokenByCode:871,acquireTokenByRefreshToken:872},Jb={RSA_256:"RS256",PSS_256:"PS256",X5T_256:"x5t#S256",X5T:"x5t",X5C:"x5c",AUDIENCE:"aud",EXPIRATION_TIME:"exp",ISSUER:"iss",SUBJECT:"sub",NOT_BEFORE:"nbf",JWT_ID:"jti"},VOe={INTERVAL_MS:100,TIMEOUT_MS:5e3},rMr=4096;f();f();f();var Kee=class{static{a(this,"HttpClient")}async sendGetRequestAsync(e,r,n){return this.sendRequest(e,Cd.GET,r,n)}async sendPostRequestAsync(e,r){return this.sendRequest(e,Cd.POST,r)}async sendRequest(e,r,n,o){let s=new AbortController,c;o&&(c=setTimeout(()=>{s.abort()},o));let l={method:r,headers:bBi(n),signal:s.signal};r===Cd.POST&&(l.body=n?.body||"");let u;try{u=await fetch(e,l)}catch(d){if(c&&clearTimeout(c),d instanceof Error&&d.name==="AbortError")throw LG(cf.networkError,"Request timeout");let p=LG(cf.networkError,`Network request failed: ${d instanceof Error?d.message:"unknown"}`);throw Ivt(p,void 0,void 0,d instanceof Error?d:void 0)}c&&clearTimeout(c);try{return{headers:vBi(u.headers),body:await u.json(),status:u.status}}catch(d){throw LG(cf.tokenParsingError,`Failed to parse response: ${d instanceof Error?d.message:"unknown"}`)}}};function vBi(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}a(vBi,"getHeaderDict");function bBi(t){let e=new Headers;return t&&t.headers&&Object.entries(t.headers).forEach(([r,n])=>{e.append(r,n)}),e}a(bBi,"getFetchHeaders");f();f();f();var WOe="invalid_file_extension",zOe="invalid_file_path",v8="invalid_managed_identity_id_type",YOe="invalid_secret",nMr="missing_client_id",iMr="network_unavailable",KOe="platform_not_supported",JOe="unable_to_create_azure_arc",XOe="unable_to_create_cloud_shell",ZOe="unable_to_create_source",sge="unable_to_read_secret_file",oMr="user_assigned_not_available_at_runtime",eBe="www_authenticate_header_missing",tBe="www_authenticate_header_unsupported_format",ZG={[yi.AZURE_POD_IDENTITY_AUTHORITY_HOST]:"azure_pod_identity_authority_host_url_malformed",[yi.IDENTITY_ENDPOINT]:"identity_endpoint_url_malformed",[yi.IMDS_ENDPOINT]:"imds_endpoint_url_malformed",[yi.MSI_ENDPOINT]:"msi_endpoint_url_malformed"};var TBi={[WOe]:"The file path in the WWW-Authenticate header does not contain a .key file.",[zOe]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[v8]:"More than one ManagedIdentityIdType was provided.",[YOe]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[KOe]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[nMr]:"A ManagedIdentityId id was not provided.",[ZG.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The Managed Identity's '${yi.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,[ZG.IDENTITY_ENDPOINT]:`The Managed Identity's '${yi.IDENTITY_ENDPOINT}' environment variable is malformed.`,[ZG.IMDS_ENDPOINT]:`The Managed Identity's '${yi.IMDS_ENDPOINT}' environment variable is malformed.`,[ZG.MSI_ENDPOINT]:`The Managed Identity's '${yi.MSI_ENDPOINT}' environment variable is malformed.`,[iMr]:"Authentication unavailable. The request to the managed identity endpoint timed out.",[JOe]:"Azure Arc Managed Identities can only be system assigned.",[XOe]:"Cloud Shell Managed Identities can only be system assigned.",[ZOe]:"Unable to create a Managed Identity source based on environment variables.",[sge]:"Unable to read the secret file.",[oMr]:"Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",[eBe]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",[tBe]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format."},Dvt=class t extends eo{static{a(this,"ManagedIdentityError")}constructor(e){super(e,TBi[e]),this.name="ManagedIdentityError",Object.setPrototypeOf(this,t.prototype)}};function uf(t){return new Dvt(t)}a(uf,"createManagedIdentityError");var rBe=class{static{a(this,"ManagedIdentityId")}get id(){return this._id}set id(e){this._id=e}get idType(){return this._idType}set idType(e){this._idType=e}constructor(e){let r=e?.userAssignedClientId,n=e?.userAssignedResourceId,o=e?.userAssignedObjectId;if(r){if(n||o)throw uf(v8);this.id=r,this.idType=$u.USER_ASSIGNED_CLIENT_ID}else if(n){if(r||o)throw uf(v8);this.id=n,this.idType=$u.USER_ASSIGNED_RESOURCE_ID}else if(o){if(r||n)throw uf(v8);this.id=o,this.idType=$u.USER_ASSIGNED_OBJECT_ID}else this.id=JNr,this.idType=$u.SYSTEM_ASSIGNED}};f();var t0={invalidLoopbackAddressType:{code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},unableToLoadRedirectUri:{code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},noAuthCodeInResponse:{code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},noLoopbackServerExists:{code:"no_loopback_server_exists",desc:"No loopback server exists yet."},loopbackServerAlreadyExists:{code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},loopbackServerTimeout:{code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},stateNotFoundError:{code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},thumbprintMissing:{code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."},redirectUriNotSupported:{code:"redirect_uri_not_supported",desc:"RedirectUri is not supported in this scenario. Please remove redirectUri from the request."}},Tg=class t extends eo{static{a(this,"NodeAuthError")}constructor(e,r){super(e,r),this.name="NodeAuthError"}static createInvalidLoopbackAddressTypeError(){return new t(t0.invalidLoopbackAddressType.code,`${t0.invalidLoopbackAddressType.desc}`)}static createUnableToLoadRedirectUrlError(){return new t(t0.unableToLoadRedirectUri.code,`${t0.unableToLoadRedirectUri.desc}`)}static createNoAuthCodeInResponseError(){return new t(t0.noAuthCodeInResponse.code,`${t0.noAuthCodeInResponse.desc}`)}static createNoLoopbackServerExistsError(){return new t(t0.noLoopbackServerExists.code,`${t0.noLoopbackServerExists.desc}`)}static createLoopbackServerAlreadyExistsError(){return new t(t0.loopbackServerAlreadyExists.code,`${t0.loopbackServerAlreadyExists.desc}`)}static createLoopbackServerTimeoutError(){return new t(t0.loopbackServerTimeout.code,`${t0.loopbackServerTimeout.desc}`)}static createStateNotFoundError(){return new t(t0.stateNotFoundError.code,t0.stateNotFoundError.desc)}static createThumbprintMissingError(){return new t(t0.thumbprintMissing.code,t0.thumbprintMissing.desc)}static createRedirectUriNotSupportedError(){return new t(t0.redirectUriNotSupported.code,t0.redirectUriNotSupported.desc)}};var SBi={clientId:"",authority:Ht.DEFAULT_AUTHORITY,clientSecret:"",clientAssertion:"",clientCertificate:{thumbprint:"",thumbprintSha256:"",privateKey:"",x5c:""},knownAuthorities:[],cloudDiscoveryMetadata:"",authorityMetadata:"",clientCapabilities:[],azureCloudOptions:{azureCloudInstance:AM.None,tenant:""},isMcp:!1},Nvt={loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:ju.Info},IBi={loggerOptions:Nvt,networkClient:new Kee,disableInternalRetries:!1,protocolMode:bg.AAD},xBi={application:{appName:"",appVersion:""}};function sMr({auth:t,broker:e,cache:r,system:n,telemetry:o}){let s={...IBi,networkClient:new Kee,loggerOptions:n?.loggerOptions||Nvt,disableInternalRetries:n?.disableInternalRetries||!1};if(t.clientCertificate&&!t.clientCertificate.thumbprint&&!t.clientCertificate.thumbprintSha256)throw Tg.createStateNotFoundError();return{auth:{...SBi,...t},broker:{...e},cache:{...r},system:{...s,...n},telemetry:{...xBi,...o}}}a(sMr,"buildAppConfiguration");function aMr({clientCapabilities:t,managedIdentityIdParams:e,system:r}){let n=new rBe(e),o=r?.loggerOptions||Nvt,s;return r?.networkClient?s=r.networkClient:s=new Kee,{clientCapabilities:t||[],managedIdentityId:n,system:{loggerOptions:o,networkClient:s},disableInternalRetries:r?.disableInternalRetries||!1}}a(aMr,"buildManagedIdentityConfiguration");f();f();f();f();var cMr=de(require("crypto"));var iBe=new Uint8Array(256),nBe=iBe.length;function Mvt(){return nBe>iBe.length-16&&(cMr.default.randomFillSync(iBe),nBe=0),iBe.slice(nBe,nBe+=16)}a(Mvt,"rng");f();f();f();var lMr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function wBi(t){return typeof t=="string"&&lMr.test(t)}a(wBi,"validate");var uMr=wBi;var om=[];for(let t=0;t<256;++t)om.push((t+256).toString(16).substr(1));function RBi(t,e=0){let r=(om[t[e+0]]+om[t[e+1]]+om[t[e+2]]+om[t[e+3]]+"-"+om[t[e+4]]+om[t[e+5]]+"-"+om[t[e+6]]+om[t[e+7]]+"-"+om[t[e+8]]+om[t[e+9]]+"-"+om[t[e+10]]+om[t[e+11]]+om[t[e+12]]+om[t[e+13]]+om[t[e+14]]+om[t[e+15]]).toLowerCase();if(!uMr(r))throw TypeError("Stringified UUID is invalid");return r}a(RBi,"stringify");var dMr=RBi;f();function PBi(t,e,r){t=t||{};let n=t.random||(t.rng||Mvt)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let o=0;o<16;++o)e[r+o]=n[o];return e}return dMr(n)}a(PBi,"v4");var Ovt=PBi;var Jee=class{static{a(this,"GuidGenerator")}generateGuid(){return Ovt()}isGuid(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}};f();var p1=class t{static{a(this,"EncodingUtils")}static base64Encode(e,r){return Buffer.from(e,r).toString(Ht.EncodingTypes.BASE64)}static base64EncodeUrl(e,r){return t.base64Encode(e,r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(e){return Buffer.from(e,Ht.EncodingTypes.BASE64).toString("utf8")}static base64DecodeUrl(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4;)r+="=";return t.base64Decode(r)}};f();f();var fMr=de(require("crypto"),1);var b8=class{static{a(this,"HashUtils")}sha256(e){return fMr.default.createHash(tMr.SHA256).update(e).digest()}};var pMr=de(require("crypto"),1);var oBe=class{static{a(this,"PkceGenerator")}constructor(){this.hashUtils=new b8}async generatePkceCodes(){let e=this.generateCodeVerifier(),r=this.generateCodeChallengeFromVerifier(e);return{verifier:e,challenge:r}}generateCodeVerifier(){let e=[],r=256-256%$Oe.CV_CHARSET.length;for(;e.length<=eMr;){let o=pMr.default.randomBytes(1)[0];if(o>=r)continue;let s=o%$Oe.CV_CHARSET.length;e.push($Oe.CV_CHARSET[s])}let n=e.join("");return p1.base64EncodeUrl(n)}generateCodeChallengeFromVerifier(e){return p1.base64EncodeUrl(this.hashUtils.sha256(e).toString(Ht.EncodingTypes.BASE64),Ht.EncodingTypes.BASE64)}};var AP=class{static{a(this,"CryptoProvider")}constructor(){this.pkceGenerator=new oBe,this.guidGenerator=new Jee,this.hashUtils=new b8}base64UrlEncode(){throw new Error("Method not implemented.")}encodeKid(){throw new Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(e){return p1.base64Encode(e)}base64Decode(e){return p1.base64Decode(e)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw new Error("Method not implemented.")}removeTokenBindingKey(){throw new Error("Method not implemented.")}clearKeystore(){throw new Error("Method not implemented.")}signJwt(){throw new Error("Method not implemented.")}async hashString(e){return p1.base64EncodeUrl(this.hashUtils.sha256(e).toString(Ht.EncodingTypes.BASE64),Ht.EncodingTypes.BASE64)}};f();f();function hMr(t){let e=t.credentialType===Ht.CredentialType.REFRESH_TOKEN&&t.familyId||t.clientId,r=t.tokenType&&t.tokenType.toLowerCase()!==Ht.AuthenticationScheme.BEARER.toLowerCase()?t.tokenType.toLowerCase():"";return[t.homeAccountId,t.environment,t.credentialType,e,t.realm||"",t.target||"",r].join(kvt.KEY_SEPARATOR).toLowerCase()}a(hMr,"generateCredentialKey");function mMr(t){let e=t.homeAccountId.split(".")[1];return[t.homeAccountId,t.environment,e||t.tenantId||""].join(kvt.KEY_SEPARATOR).toLowerCase()}a(mMr,"generateAccountKey");var T8=class extends _8{static{a(this,"NodeStorage")}constructor(e,r,n,o){super(r,n,e,new Zf,o),this.cache={},this.changeEmitters=[],this.logger=e}registerChangeEmitter(e){this.changeEmitters.push(e)}emitChange(){this.changeEmitters.forEach(e=>e.call(null))}cacheToInMemoryCache(e){let r={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(let n in e){let o=e[n];if(typeof o=="object")if(zG.isAccountEntity(o))r.accounts[n]=o;else if(qA.isIdTokenEntity(o))r.idTokens[n]=o;else if(qA.isAccessTokenEntity(o))r.accessTokens[n]=o;else if(qA.isRefreshTokenEntity(o))r.refreshTokens[n]=o;else if(qA.isAppMetadataEntity(n,o))r.appMetadata[n]=o;else continue}return r}inMemoryCacheToCache(e){let r=this.getCache();return r={...r,...e.accounts,...e.idTokens,...e.accessTokens,...e.refreshTokens,...e.appMetadata},r}getInMemoryCache(){return this.logger.trace("Getting in-memory cache",""),this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache","");let r=this.inMemoryCacheToCache(e);this.setCache(r),this.emitChange()}getCache(){return this.logger.trace("Getting cache key-value store",""),this.cache}setCache(e){this.logger.trace("Setting cache key value store",""),this.cache=e,this.emitChange()}getItem(e){return this.logger.tracePii(`Item key: ${e}`,""),this.getCache()[e]}setItem(e,r){this.logger.tracePii(`Item key: ${e}`,"");let n=this.getCache();n[e]=r,this.setCache(n)}generateCredentialKey(e){return hMr(e)}generateAccountKey(e){return mMr(e)}getAccountKeys(){let e=this.getInMemoryCache();return Object.keys(e.accounts)}getTokenKeys(){let e=this.getInMemoryCache();return{idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){let r=this.getItem(e);return r&&typeof r=="object"?{...r}:null}async setAccount(e){let r=this.generateAccountKey(zG.getAccountInfo(e));this.setItem(r,e)}getIdTokenCredential(e){let r=this.getItem(e);return qA.isIdTokenEntity(r)?r:null}async setIdTokenCredential(e){let r=this.generateCredentialKey(e);this.setItem(r,e)}getAccessTokenCredential(e){let r=this.getItem(e);return qA.isAccessTokenEntity(r)?r:null}async setAccessTokenCredential(e){let r=this.generateCredentialKey(e);this.setItem(r,e)}getRefreshTokenCredential(e){let r=this.getItem(e);return qA.isRefreshTokenEntity(r)?r:null}async setRefreshTokenCredential(e){let r=this.generateCredentialKey(e);this.setItem(r,e)}getAppMetadata(e){let r=this.getItem(e);return qA.isAppMetadataEntity(e,r)?r:null}setAppMetadata(e){let r=qA.generateAppMetadataKey(e);this.setItem(r,e)}getServerTelemetry(e){let r=this.getItem(e);return r&&qA.isServerTelemetryEntity(e,r)?r:null}setServerTelemetry(e,r){this.setItem(e,r)}getAuthorityMetadata(e){let r=this.getItem(e);return r&&qA.isAuthorityMetadataEntity(e,r)?r:null}getAuthorityMetadataKeys(){return this.getKeys().filter(e=>this.isAuthorityMetadata(e))}setAuthorityMetadata(e,r){this.setItem(e,r)}getThrottlingCache(e){let r=this.getItem(e);return r&&qA.isThrottlingEntity(e,r)?r:null}setThrottlingCache(e,r){this.setItem(e,r)}removeItem(e){this.logger.tracePii(`Item key: ${e}`,"");let r=!1,n=this.getCache();return n[e]&&(delete n[e],r=!0),r&&(this.setCache(n),this.emitChange()),r}removeOutdatedAccount(e){this.removeItem(e)}containsKey(e){return this.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys","");let e=this.getCache();return[...Object.keys(e)]}clear(){this.logger.trace("Clearing cache entries created by MSAL",""),this.getKeys().forEach(r=>{this.removeItem(r)}),this.emitChange()}static generateInMemoryCache(e){return _M.deserializeAllCache(_M.deserializeJSONBlob(e))}static generateJsonCache(e){return h8.serializeAllCache(e)}updateCredentialCacheKey(e,r){let n=this.generateCredentialKey(r);if(e!==n){let o=this.getItem(e);if(o)return this.removeItem(e),this.setItem(n,o),this.logger.verbose(`Updated an outdated ${r.credentialType} cache key`,""),n;this.logger.error(`Attempted to update an outdated ${r.credentialType} cache key but no item matching the outdated key was found in storage`,"")}return e}};f();var age={Account:{},IdToken:{},AccessToken:{},RefreshToken:{},AppMetadata:{}},Xee=class{static{a(this,"TokenCache")}constructor(e,r,n){this.cacheHasChanged=!1,this.storage=e,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),n&&(this.persistence=n),this.logger=r}hasChanged(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache","");let e=h8.serializeAllCache(this.storage.getInMemoryCache());return this.cacheSnapshot?(this.logger.trace("Reading cache snapshot from disk",""),e=this.mergeState(JSON.parse(this.cacheSnapshot),e)):this.logger.trace("No cache snapshot to merge",""),this.cacheHasChanged=!1,JSON.stringify(e)}deserialize(e){if(this.logger.trace("Deserializing JSON to in-memory cache",""),this.cacheSnapshot=e,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk","");let r=_M.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(r)}else this.logger.trace("No cache snapshot to deserialize","")}getKVStore(){return this.storage.getCache()}getCacheSnapshot(){let e=T8.generateInMemoryCache(this.cacheSnapshot);return this.storage.inMemoryCacheToCache(e)}async getAllAccounts(e=new AP().createNewGuid()){this.logger.trace("getAllAccounts called",e);let r;try{return this.persistence&&(r=new u1(this,!1),await this.persistence.beforeCacheAccess(r)),this.storage.getAllAccounts({},e)}finally{this.persistence&&r&&await this.persistence.afterCacheAccess(r)}}async getAccountByHomeId(e){let r=await this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.homeAccountId===e)[0]||null}async getAccountByLocalId(e){let r=await this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.localAccountId===e)[0]||null}async removeAccount(e,r){this.logger.trace("removeAccount called",r||"");let n;try{this.persistence&&(n=new u1(this,!0),await this.persistence.beforeCacheAccess(n)),this.storage.removeAccount(e,r||new Jee().generateGuid())}finally{this.persistence&&n&&await this.persistence.afterCacheAccess(n)}}async overwriteCache(){if(!this.persistence){this.logger.info("No persistence layer specified, cache cannot be overwritten","");return}this.logger.info("Overwriting in-memory cache with persistent cache",""),this.storage.clear();let e=new u1(this,!1);await this.persistence.beforeCacheAccess(e);let r=this.getCacheSnapshot();this.storage.setCache(r),await this.persistence.afterCacheAccess(e)}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(e,r){this.logger.trace("Merging in-memory cache with cache snapshot","");let n=this.mergeRemovals(e,r);return this.mergeUpdates(n,r)}mergeUpdates(e,r){return Object.keys(r).forEach(n=>{let o=r[n];if(!e.hasOwnProperty(n))o!==null&&(e[n]=o);else{let s=o!==null,c=typeof o=="object",l=!Array.isArray(o),u=typeof e[n]<"u"&&e[n]!==null;s&&c&&l&&u?this.mergeUpdates(e[n],o):e[n]=o}}),e}mergeRemovals(e,r){this.logger.trace("Remove updated entries in cache","");let n=e.Account?this.mergeRemovalsDict(e.Account,r.Account):e.Account,o=e.AccessToken?this.mergeRemovalsDict(e.AccessToken,r.AccessToken):e.AccessToken,s=e.RefreshToken?this.mergeRemovalsDict(e.RefreshToken,r.RefreshToken):e.RefreshToken,c=e.IdToken?this.mergeRemovalsDict(e.IdToken,r.IdToken):e.IdToken,l=e.AppMetadata?this.mergeRemovalsDict(e.AppMetadata,r.AppMetadata):e.AppMetadata;return{...e,Account:n,AccessToken:o,RefreshToken:s,IdToken:c,AppMetadata:l}}mergeRemovalsDict(e,r){let n={...e};return Object.keys(e).forEach(o=>{(!r||!r.hasOwnProperty(o))&&delete n[o]}),n}overlayDefaults(e){return this.logger.trace("Overlaying input cache with the default cache",""),{Account:{...age.Account,...e.Account},IdToken:{...age.IdToken,...e.IdToken},AccessToken:{...age.AccessToken,...e.AccessToken},RefreshToken:{...age.RefreshToken,...e.RefreshToken},AppMetadata:{...age.AppMetadata,...e.AppMetadata}}}};f();var JBr=de(jBr(),1);f();var $Br="missing_tenant_id_error",VBr="user_timeout_reached",WBr="invalid_assertion",Tbt="invalid_client_credential",zBr="device_code_polling_cancelled",YBr="device_code_expired",KBr="device_code_unknown_error";var CM=class t{static{a(this,"ClientAssertion")}static fromAssertion(e){let r=new t;return r.jwt=e,r}static fromCertificate(e,r,n){let o=new t;return o.privateKey=r,o.thumbprint=e,o.useSha256=!1,n&&(o.publicCertificate=this.parseCertificate(n)),o}static fromCertificateWithSha256Thumbprint(e,r,n){let o=new t;return o.privateKey=r,o.thumbprint=e,o.useSha256=!0,n&&(o.publicCertificate=this.parseCertificate(n)),o}getJwt(e,r,n){if(this.privateKey&&this.thumbprint)return this.jwt&&!this.isExpired()&&r===this.issuer&&n===this.jwtAudience?this.jwt:this.createJwt(e,r,n);if(this.jwt)return this.jwt;throw Ct(WBr)}createJwt(e,r,n){this.issuer=r,this.jwtAudience=n;let o=Bl.nowSeconds();this.expirationTime=o+600;let c={alg:this.useSha256?Jb.PSS_256:Jb.RSA_256},l=this.useSha256?Jb.X5T_256:Jb.X5T;Object.assign(c,{[l]:p1.base64EncodeUrl(this.thumbprint,Ht.EncodingTypes.HEX)}),this.publicCertificate&&Object.assign(c,{[Jb.X5C]:this.publicCertificate});let u={[Jb.AUDIENCE]:this.jwtAudience,[Jb.EXPIRATION_TIME]:this.expirationTime,[Jb.ISSUER]:this.issuer,[Jb.SUBJECT]:this.issuer,[Jb.NOT_BEFORE]:o,[Jb.JWT_ID]:e.createNewGuid()};return this.jwt=JBr.default.sign(u,this.privateKey,{header:c}),this.jwt}isExpired(){return this.expirationTime0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.username&&Hr.addCcsUpn(r,e.username),im.mapToQueryString(r)}};f();function XBr(t,e,r,n){let o=oge.getStandardAuthorizeRequestParameters({...t.auth,authority:e,redirectUri:r.redirectUri||""},r,n);return Hr.addLibraryInfo(o,{sku:Kb.MSAL_SKU,version:h1,cpu:process.arch||"",os:process.platform||""}),t.system.protocolMode!==bg.OIDC&&Hr.addApplicationTelemetry(o,t.telemetry.application),Hr.addResponseType(o,Ht.OAuthResponseType.CODE),r.codeChallenge&&r.codeChallengeMethod&&Hr.addCodeChallengeParams(o,r.codeChallenge,r.codeChallengeMethod),Hr.addExtraParameters(o,r.extraQueryParameters||{}),oge.getAuthorizeUrl(e,o)}a(XBr,"getAuthCodeRequestUrl");var lte=class{static{a(this,"ClientApplication")}constructor(e){this.config=sMr(e),this.cryptoProvider=new AP,this.logger=new lp(this.config.system.loggerOptions,cte,h1),this.storage=new T8(this.logger,this.config.auth.clientId,this.cryptoProvider,xvt(this.config.auth)),this.tokenCache=new Xee(this.storage,this.logger,this.config.cache.cachePlugin)}async getAuthCodeUrl(e){this.logger.info("getAuthCodeUrl called",e.correlationId||"");let r={...e,...await this.initializeBaseRequest(e),responseMode:e.responseMode||Ht.ResponseMode.QUERY,authenticationScheme:Ht.AuthenticationScheme.BEARER,state:e.state||"",nonce:e.nonce||""},n=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions);return XBr(this.config,n,r,this.logger)}async acquireTokenByCode(e,r){this.logger.info("acquireTokenByCode called",e.correlationId||""),e.state&&r&&(this.logger.info("acquireTokenByCode - validating state",e.correlationId||""),this.validateState(e.state,r.state||""),r={...r,state:""});let n={...e,...await this.initializeBaseRequest(e),authenticationScheme:Ht.AuthenticationScheme.BEARER},o=this.initializeServerTelemetryManager(Vu.acquireTokenByCode,n.correlationId);try{let s=await this.createAuthority(n.authority,n.correlationId,void 0,e.azureCloudOptions),c=await this.buildOauthClientConfiguration(s,n.correlationId,n.redirectUri,o),l=new nge(c,new Zf);return this.logger.verbose("Auth code client created",n.correlationId),await l.acquireToken(n,Vu.acquireTokenByCode,r)}catch(s){throw s instanceof eo&&s.setCorrelationId(n.correlationId),o.cacheFailedRequest(s),s}}async acquireTokenByRefreshToken(e){this.logger.info("acquireTokenByRefreshToken called",e.correlationId||"");let r={...e,...await this.initializeBaseRequest(e),authenticationScheme:Ht.AuthenticationScheme.BEARER},n=this.initializeServerTelemetryManager(Vu.acquireTokenByRefreshToken,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,r.redirectUri||"",n),c=new KG(s,new Zf);return this.logger.verbose("Refresh token client created",r.correlationId),await c.acquireToken(r,Vu.acquireTokenByRefreshToken)}catch(o){throw o instanceof eo&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireTokenSilent(e){let r={...e,...await this.initializeBaseRequest(e),forceRefresh:e.forceRefresh||!1},n=this.initializeServerTelemetryManager(Vu.acquireTokenSilent,r.correlationId,r.forceRefresh);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,r.redirectUri||"",n),c=new ige(s,new Zf);this.logger.verbose("Silent flow client created",r.correlationId);try{return await this.tokenCache.overwriteCache(),await this.acquireCachedTokenSilent(r,c,s)}catch(l){if(l instanceof A8&&l.errorCode===cf.tokenRefreshRequired)return new KG(s,new Zf).acquireTokenByRefreshToken(r,Vu.acquireTokenSilent);throw l}}catch(o){throw o instanceof eo&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireCachedTokenSilent(e,r,n){let[o,s]=await r.acquireCachedToken({...e,scopes:e.scopes?.length?e.scopes:[...Ht.OIDC_DEFAULT_SCOPES]});if(s===Ht.CacheOutcome.PROACTIVELY_REFRESHED){this.logger.info("ClientApplication:acquireCachedTokenSilent - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.",e.correlationId);let c=new KG(n,new Zf);try{await c.acquireTokenByRefreshToken(e,Vu.acquireTokenSilent)}catch{}}return o}async acquireTokenByUsernamePassword(e){this.logger.info("acquireTokenByUsernamePassword called",e.correlationId||"");let r={...e,...await this.initializeBaseRequest(e)},n=this.initializeServerTelemetryManager(Vu.acquireTokenByUsernamePassword,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,"",n),c=new OBe(s);return this.logger.verbose("Username password client created",r.correlationId),await c.acquireToken(r)}catch(o){throw o instanceof eo&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}getTokenCache(){return this.logger.info("getTokenCache called",""),this.tokenCache}validateState(e,r){if(!e)throw Tg.createStateNotFoundError();if(e!==r)throw Ct(cf.stateMismatch)}getLogger(){return this.logger}setLogger(e){this.logger=e}async buildOauthClientConfiguration(e,r,n,o){return this.logger.verbose("buildOauthClientConfiguration called",r),this.logger.info(`Building oauth client configuration with the following authority: ${e.tokenEndpoint}.`,r),o?.updateRegionDiscoveryMetadata(e.regionDiscoveryMetadata),{authOptions:{clientId:this.config.auth.clientId,authority:e,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:n,isMcp:this.config.auth.isMcp},loggerOptions:{logLevel:this.config.system.loggerOptions.logLevel,loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,correlationId:r},cryptoInterface:this.cryptoProvider,networkInterface:this.config.system.networkClient,storageInterface:this.storage,serverTelemetryManager:o,clientCredentials:{clientSecret:this.clientSecret,clientAssertion:await this.getClientAssertion(e)},libraryInfo:{sku:Kb.MSAL_SKU,version:h1,cpu:process.arch||"",os:process.platform||""},telemetry:this.config.telemetry,persistencePlugin:this.config.cache.cachePlugin,serializableCache:this.tokenCache}}async getClientAssertion(e){return this.developerProvidedClientAssertion&&(this.clientAssertion=CM.fromAssertion(await jA(this.developerProvidedClientAssertion,this.config.auth.clientId,e.tokenEndpoint))),this.clientAssertion&&{assertion:this.clientAssertion.getJwt(this.cryptoProvider,this.config.auth.clientId,e.tokenEndpoint),assertionType:Kb.JWT_BEARER_ASSERTION_TYPE}}async initializeBaseRequest(e){let r=e.correlationId||this.cryptoProvider.createNewGuid();return this.logger.verbose("initializeRequestScopes called",r),e.authenticationScheme&&e.authenticationScheme===Ht.AuthenticationScheme.POP&&this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request",r),e.authenticationScheme=Ht.AuthenticationScheme.BEARER,{...e,scopes:[...e&&e.scopes||[],...Ht.OIDC_DEFAULT_SCOPES],correlationId:r,authority:e.authority||this.config.auth.authority}}initializeServerTelemetryManager(e,r,n){let o={clientId:this.config.auth.clientId,correlationId:r,apiId:e,forceRefresh:n||!1};return new XG(o,this.storage)}async createAuthority(e,r,n,o){this.logger.verbose("createAuthority called",r);let s=dx.generateAuthority(e,o||this.config.auth.azureCloudOptions),c={protocolMode:this.config.system.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,azureRegionConfiguration:n};return jOe.createDiscoveredInstance(s,this.config.system.networkClient,this.storage,c,this.logger,r,new Zf)}clearCache(){this.storage.clear()}};f();var ZBr=de(require("http"),1);var BBe=class{static{a(this,"LoopbackClient")}async listenForAuthCode(e,r){if(this.server)throw Tg.createLoopbackServerAlreadyExistsError();return new Promise((n,o)=>{this.server=ZBr.default.createServer((s,c)=>{let l=s.url;if(l){if(l===Ht.FORWARD_SLASH){c.end(e||"Auth code was successfully acquired. You can close this window now.");return}}else{c.end(r||"Error occurred loading redirectUrl"),o(Tg.createUnableToLoadRedirectUrlError());return}let u=this.getRedirectUri(),d=new URL(l,u),p=im.getDeserializedResponse(d.search)||{};p.code&&(c.writeHead(Ht.HTTP_REDIRECT,{location:u}),c.end()),p.error&&c.end(r||`Error occurred: ${p.error}`),n(p)}),this.server.listen(0,"127.0.0.1")})}getRedirectUri(){if(!this.server||!this.server.listening)throw Tg.createNoLoopbackServerExistsError();let e=this.server.address();if(!e||typeof e=="string"||!e.port)throw this.closeServer(),Tg.createInvalidLoopbackAddressTypeError();let r=e&&e.port;return`${Kb.HTTP_PROTOCOL}${Kb.LOCALHOST}:${r}`}closeServer(){this.server&&(this.server.close(),typeof this.server.closeAllConnections=="function"&&this.server.closeAllConnections(),this.server.unref(),this.server=void 0)}};f();var LBe=class extends _P{static{a(this,"DeviceCodeClient")}constructor(e){super(e)}async acquireToken(e){let r=await this.getDeviceCode(e);e.deviceCodeCallback(r);let n=Bl.nowSeconds(),o=await this.acquireTokenWithDeviceCode(e,r),s=new lf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(o,e.correlationId),s.handleServerTokenResponse(o,this.authority,n,e,Vu.acquireTokenByDeviceCode)}async getDeviceCode(e){let r=this.createExtraQueryParameters(e),n=Qo.appendQueryString(this.authority.deviceCodeEndpoint,r),o=this.createQueryString(e),s=this.createTokenRequestHeaders(),c={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return this.executePostRequestToDeviceCodeEndpoint(n,o,s,c,e.correlationId)}createExtraQueryParameters(e){let r=new Map;return e.extraQueryParameters&&Hr.addExtraParameters(r,e.extraQueryParameters),im.mapToQueryString(r)}async executePostRequestToDeviceCodeEndpoint(e,r,n,o,s){let{body:{user_code:c,device_code:l,verification_uri:u,expires_in:d,interval:p,message:h}}=await this.sendPostRequest(o,e,{body:r,headers:n},s);return{userCode:c,deviceCode:l,verificationUri:u,expiresIn:d,interval:p,message:h}}createQueryString(e){let r=new Map;return Hr.addScopes(r,e.scopes),Hr.addClientId(r,this.config.authOptions.clientId),e.extraQueryParameters&&Hr.addExtraParameters(r,e.extraQueryParameters),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),im.mapToQueryString(r)}continuePolling(e,r,n){if(n)throw this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true",""),Ct(zBr);if(r&&rr)throw this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${r}`,""),Ct(VBr);if(Bl.nowSeconds()>e)throw r&&this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${r}`,""),this.logger.error(`Device code expired. Expiration time of device code was ${e}`,""),Ct(YBr);return!0}async acquireTokenWithDeviceCode(e,r){let n=this.createTokenQueryParameters(e),o=Qo.appendQueryString(this.authority.tokenEndpoint,n),s=this.createTokenRequestBody(e,r),c=this.createTokenRequestHeaders(),l=e.timeout?Bl.nowSeconds()+e.timeout:void 0,u=Bl.nowSeconds()+r.expiresIn,d=r.interval*1e3;for(;this.continuePolling(u,l,e.cancel);){let p={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},h=await this.executePostToTokenEndpoint(o,s,c,p,e.correlationId);if(h.body&&h.body.error)if(h.body.error===Ht.AUTHORIZATION_PENDING)this.logger.info("Authorization pending. Continue polling.",e.correlationId),await Bl.delay(d);else throw this.logger.info("Unexpected error in polling from the server",e.correlationId),LG(Yee.postRequestFailed,h.body.error);else return this.logger.verbose("Authorization completed successfully. Polling stopped.",e.correlationId),h.body}throw this.logger.error("Polling stopped for unknown reasons.",e.correlationId),Ct(KBr)}createTokenRequestBody(e,r){let n=new Map;Hr.addScopes(n,e.scopes),Hr.addClientId(n,this.config.authOptions.clientId),Hr.addGrantType(n,Ht.GrantType.DEVICE_CODE_GRANT),Hr.addDeviceCode(n,r.deviceCode);let o=e.correlationId||this.config.cryptoInterface.createNewGuid();return Hr.addCorrelationId(n,o),Hr.addClientInfo(n),Hr.addLibraryInfo(n,this.config.libraryInfo),Hr.addApplicationTelemetry(n,this.config.telemetry.application),Hr.addThrottling(n),this.serverTelemetryManager&&Hr.addServerTelemetry(n,this.serverTelemetryManager),(!Zc.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(n,e.claims,this.config.authOptions.clientCapabilities),im.mapToQueryString(n)}};var ute=class extends lte{static{a(this,"PublicClientApplication")}constructor(e){super(e),this.config.broker.nativeBrokerPlugin&&(this.config.broker.nativeBrokerPlugin.isBrokerAvailable?(this.nativeBrokerPlugin=this.config.broker.nativeBrokerPlugin,this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions)):this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.","")),this.skus=XG.makeExtraSkuString({libraryName:Kb.MSAL_SKU,libraryVersion:h1})}async acquireTokenByDeviceCode(e){this.logger.info("acquireTokenByDeviceCode called",e.correlationId||""),JG(this.config.auth.isMcp,e);let r=Object.assign(e,await this.initializeBaseRequest(e)),n=this.initializeServerTelemetryManager(Vu.acquireTokenByDeviceCode,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,"",n),c=new LBe(s);return this.logger.verbose("Device code client created",r.correlationId),await c.acquireToken(r)}catch(o){throw o instanceof eo&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireTokenInteractive(e){let r=e.correlationId||this.cryptoProvider.createNewGuid();this.logger.trace("acquireTokenInteractive called",r),JG(this.config.auth.isMcp,e);let{openBrowser:n,successTemplate:o,errorTemplate:s,windowHandle:c,loopbackClient:l,...u}=e;if(this.nativeBrokerPlugin){let A={...u,clientId:this.config.auth.clientId,scopes:e.scopes||Ht.OIDC_DEFAULT_SCOPES,redirectUri:e.redirectUri||"",authority:e.authority||this.config.auth.authority,correlationId:r,extraParameters:{...u.extraQueryParameters,...u.extraParameters,[BG.X_CLIENT_EXTRA_SKU]:this.skus},accountId:u.account?.nativeAccountId};return this.nativeBrokerPlugin.acquireTokenInteractive(A,c)}if(e.redirectUri){if(!this.config.broker.nativeBrokerPlugin)throw Tg.createRedirectUriNotSupportedError();e.redirectUri=""}let{verifier:d,challenge:p}=await this.cryptoProvider.generatePkceCodes(),h=l||new BBe,m={},g=null;try{let A=h.listenForAuthCode(o,s).then(I=>{m=I}).catch(I=>{g=I}),y=await this.waitForRedirectUri(h),E={...u,correlationId:r,scopes:e.scopes||Ht.OIDC_DEFAULT_SCOPES,redirectUri:y,responseMode:Ht.ResponseMode.QUERY,codeChallenge:p,codeChallengeMethod:Ht.CodeChallengeMethodValues.S256},_=await this.getAuthCodeUrl(E);if(await n(_),await A,g)throw g;if(m.error)throw new GA(m.error,m.error_description,m.suberror);if(!m.code)throw Tg.createNoAuthCodeInResponseError();let v=m.client_info,b={code:m.code,codeVerifier:d,clientInfo:v||"",...E};return await this.acquireTokenByCode(b)}finally{h.closeServer()}}async acquireTokenSilent(e){let r=e.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",r),JG(this.config.auth.isMcp,e),this.nativeBrokerPlugin){let n={...e,clientId:this.config.auth.clientId,scopes:e.scopes||Ht.OIDC_DEFAULT_SCOPES,redirectUri:e.redirectUri||"",authority:e.authority||this.config.auth.authority,correlationId:r,extraParameters:{...e.extraQueryParameters,...e.extraParameters,[BG.X_CLIENT_EXTRA_SKU]:this.skus},accountId:e.account.nativeAccountId,forceRefresh:e.forceRefresh||!1};return this.nativeBrokerPlugin.acquireTokenSilent(n)}if(e.redirectUri){if(!this.config.broker.nativeBrokerPlugin)throw Tg.createRedirectUriNotSupportedError();e.redirectUri=""}return super.acquireTokenSilent(e)}async acquireTokenByCode(e,r){return JG(this.config.auth.isMcp,e),super.acquireTokenByCode(e,r)}async acquireTokenByRefreshToken(e){return JG(this.config.auth.isMcp,e),super.acquireTokenByRefreshToken(e)}async signOut(e){if(this.nativeBrokerPlugin&&e.account.nativeAccountId){let r={clientId:this.config.auth.clientId,accountId:e.account.nativeAccountId,correlationId:e.correlationId||this.cryptoProvider.createNewGuid()};await this.nativeBrokerPlugin.signOut(r)}await this.getTokenCache().removeAccount(e.account,e.correlationId)}async getAllAccounts(){if(this.nativeBrokerPlugin){let e=this.cryptoProvider.createNewGuid();return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,e)}return this.getTokenCache().getAllAccounts()}async waitForRedirectUri(e){return new Promise((r,n)=>{let o=0,s=setInterval(()=>{if(VOe.TIMEOUT_MS/VOe.INTERVAL_MS1)throw Ct(cf.multipleMatchingTokens);return l[0]}async executeTokenRequest(e,r,n){let o,s;if(this.appTokenProvider){this.logger.info("Using appTokenProvider extensibility.",e.correlationId);let u={correlationId:e.correlationId,tenantId:this.config.authOptions.authority.tenant,scopes:e.scopes,claims:e.claims};s=Bl.nowSeconds();let d=await this.appTokenProvider(u);o={access_token:d.accessToken,expires_in:d.expiresInSeconds,refresh_in:d.refreshInSeconds,token_type:Ht.AuthenticationScheme.BEARER}}else{let u=this.createTokenQueryParameters(e),d=Qo.appendQueryString(r.tokenEndpoint,u),p=await this.createTokenRequestBody(e),h=this.createTokenRequestHeaders(),m={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};this.logger.info("Sending token request to endpoint: "+r.tokenEndpoint,e.correlationId),s=Bl.nowSeconds();let g=await this.executePostToTokenEndpoint(d,p,h,m,e.correlationId);o=g.body,o.status=g.status}let c=new lf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return c.validateTokenResponse(o,e.correlationId,n),await c.handleServerTokenResponse(o,this.authority,s,e,Vu.acquireTokenByClientCredential)}async createTokenRequestBody(e){let r=new Map;Hr.addClientId(r,this.config.authOptions.clientId),Hr.addScopes(r,e.scopes,!1),Hr.addGrantType(r,Ht.GrantType.CLIENT_CREDENTIALS_GRANT),Hr.addLibraryInfo(r,this.config.libraryInfo),Hr.addApplicationTelemetry(r,this.config.telemetry.application),Hr.addThrottling(r),this.serverTelemetryManager&&Hr.addServerTelemetry(r,this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();Hr.addCorrelationId(r,n),this.config.clientCredentials.clientSecret&&Hr.addClientSecret(r,this.config.clientCredentials.clientSecret);let o=e.clientAssertion||this.config.clientCredentials.clientAssertion;return o&&(Hr.addClientAssertion(r,await jA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Hr.addClientAssertionType(r,o.assertionType)),(!Zc.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),im.mapToQueryString(r)}};f();var FBe=class extends _P{static{a(this,"OnBehalfOfClient")}constructor(e){super(e)}async acquireToken(e){if(this.scopeSet=new Xf(e.scopes||[]),this.userAssertionHash=await this.cryptoUtils.hashString(e.oboAssertion),e.skipCache||e.claims)return this.executeTokenRequest(e,this.authority,this.userAssertionHash);try{return await this.getCachedAuthenticationResult(e)}catch{return await this.executeTokenRequest(e,this.authority,this.userAssertionHash)}}async getCachedAuthenticationResult(e){let r=this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId,e);if(r){if(Bl.isTokenExpired(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.serverTelemetryManager?.setCacheOutcome(Ht.CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`,e.correlationId),Ct(cf.tokenRefreshRequired)}else throw this.serverTelemetryManager?.setCacheOutcome(Ht.CacheOutcome.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties.",e.correlationId),Ct(cf.tokenRefreshRequired);let n=this.readIdTokenFromCacheForOBO(r.homeAccountId,e.correlationId),o,s=null;if(n){o=kOe.extractTokenClaims(n.secret,p1.base64Decode);let c=o.oid||o.sub,l={homeAccountId:n.homeAccountId,environment:n.environment,tenantId:n.realm,username:"",localAccountId:c||""};s=this.cacheManager.getAccount(this.cacheManager.generateAccountKey(l),e.correlationId)}return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),lf.generateAuthenticationResult(this.cryptoUtils,this.authority,{account:s,accessToken:r,idToken:n,refreshToken:null,appMetadata:null},!0,e,this.performanceClient,o)}readIdTokenFromCacheForOBO(e,r){let n={homeAccountId:e,environment:this.authority.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:Ht.CredentialType.ID_TOKEN,clientId:this.config.authOptions.clientId,realm:this.authority.tenant},o=this.cacheManager.getIdTokensByFilter(n,r);return Object.values(o).length<1?null:Object.values(o)[0]}readAccessTokenFromCacheForOBO(e,r){let n=r.authenticationScheme||Ht.AuthenticationScheme.BEARER,s={credentialType:n&&n.toLowerCase()!==Ht.AuthenticationScheme.BEARER.toLowerCase()?Ht.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:Ht.CredentialType.ACCESS_TOKEN,clientId:e,target:Xf.createSearchScopes(this.scopeSet.asArray()),tokenType:n,keyId:r.sshKid,userAssertionHash:this.userAssertionHash},c=this.cacheManager.getAccessTokensByFilter(s,r.correlationId),l=c.length;if(l<1)return null;if(l>1)throw Ct(cf.multipleMatchingTokens);return c[0]}async executeTokenRequest(e,r,n){let o=this.createTokenQueryParameters(e),s=Qo.appendQueryString(r.tokenEndpoint,o),c=await this.createTokenRequestBody(e),l=this.createTokenRequestHeaders(),u={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},d=Bl.nowSeconds(),p=await this.executePostToTokenEndpoint(s,c,l,u,e.correlationId),h=new lf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.performanceClient,this.config.serializableCache,this.config.persistencePlugin);return h.validateTokenResponse(p.body,e.correlationId),await h.handleServerTokenResponse(p.body,this.authority,d,e,Vu.acquireTokenByOBO,void 0,n)}async createTokenRequestBody(e){let r=new Map;Hr.addClientId(r,this.config.authOptions.clientId),Hr.addScopes(r,e.scopes),Hr.addGrantType(r,Ht.GrantType.JWT_BEARER),Hr.addClientInfo(r),Hr.addLibraryInfo(r,this.config.libraryInfo),Hr.addApplicationTelemetry(r,this.config.telemetry.application),Hr.addThrottling(r),this.serverTelemetryManager&&Hr.addServerTelemetry(r,this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();Hr.addCorrelationId(r,n),Hr.addRequestTokenUse(r,BG.ON_BEHALF_OF),Hr.addOboAssertion(r,e.oboAssertion),this.config.clientCredentials.clientSecret&&Hr.addClientSecret(r,this.config.clientCredentials.clientSecret);let o=this.config.clientCredentials.clientAssertion;return o&&(Hr.addClientAssertion(r,await jA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Hr.addClientAssertionType(r,o.assertionType)),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),im.mapToQueryString(r)}};var fte=class extends lte{static{a(this,"ConfidentialClientApplication")}constructor(e){super(e);let r=!!this.config.auth.clientSecret,n=!!this.config.auth.clientAssertion,o=(!!this.config.auth.clientCertificate?.thumbprint||!!this.config.auth.clientCertificate?.thumbprintSha256)&&!!this.config.auth.clientCertificate?.privateKey;if(!this.appTokenProvider){if(r&&n||n&&o||r&&o)throw Ct(Tbt);if(this.config.auth.clientSecret){this.clientSecret=this.config.auth.clientSecret;return}if(this.config.auth.clientAssertion){this.developerProvidedClientAssertion=this.config.auth.clientAssertion;return}if(o)this.clientAssertion=this.config.auth.clientCertificate.thumbprintSha256?CM.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c):CM.fromCertificate(this.config.auth.clientCertificate.thumbprint,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c);else throw Ct(Tbt);this.appTokenProvider=void 0}}SetAppTokenProvider(e){this.appTokenProvider=e}async acquireTokenByClientCredential(e){this.logger.info("acquireTokenByClientCredential called",e.correlationId||"");let r;e.clientAssertion&&(r={assertion:await jA(e.clientAssertion,this.config.auth.clientId),assertionType:Kb.JWT_BEARER_ASSERTION_TYPE});let n=await this.initializeBaseRequest(e),o={...n,scopes:n.scopes.filter(m=>!Ht.OIDC_DEFAULT_SCOPES.includes(m))},s={...e,...o,clientAssertion:r},l=new Qo(s.authority).getUrlComponents().PathSegments[0];if(Object.values(Ht.AADAuthority).includes(l))throw Ct($Br);let u=process.env[ZNr],d;s.azureRegion!=="DisableMsalForceRegion"&&(!s.azureRegion&&u?d=u:d=s.azureRegion);let p={azureRegion:d,environmentRegion:process.env[XNr]},h=this.initializeServerTelemetryManager(Vu.acquireTokenByClientCredential,s.correlationId,s.skipCache);try{let m=await this.createAuthority(s.authority,s.correlationId,p,e.azureCloudOptions),g=await this.buildOauthClientConfiguration(m,s.correlationId,"",h),A=new dte(g,this.appTokenProvider);return this.logger.verbose("Client credential client created",s.correlationId),await A.acquireToken(s)}catch(m){throw m instanceof eo&&m.setCorrelationId(s.correlationId),h.cacheFailedRequest(m),m}}async acquireTokenOnBehalfOf(e){this.logger.info("acquireTokenOnBehalfOf called",e.correlationId||"");let r={...e,...await this.initializeBaseRequest(e)};try{let n=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),o=await this.buildOauthClientConfiguration(n,r.correlationId,"",void 0),s=new FBe(o);return this.logger.verbose("On behalf of client created",r.correlationId),await s.acquireToken(r)}catch(n){throw n instanceof eo&&n.setCorrelationId(r.correlationId),n}}};f();f();f();f();f();function e3r(t){if(typeof t!="string")return!1;let e=new Date(t);return!isNaN(e.getTime())&&e.toISOString()===t}a(e3r,"isIso8601");f();var UBe=class{static{a(this,"HttpClientWithRetries")}constructor(e,r,n){this.httpClientNoRetries=e,this.retryPolicy=r,this.logger=n}async sendNetworkRequestAsyncHelper(e,r,n){return e===Cd.GET?this.httpClientNoRetries.sendGetRequestAsync(r,n):this.httpClientNoRetries.sendPostRequestAsync(r,n)}async sendNetworkRequestAsync(e,r,n){let o=await this.sendNetworkRequestAsyncHelper(e,r,n);"isNewRequest"in this.retryPolicy&&(this.retryPolicy.isNewRequest=!0);let s=0;for(;await this.retryPolicy.pauseForRetry(o.status,s,this.logger,o.headers[Ht.HeaderNames.RETRY_AFTER]);)o=await this.sendNetworkRequestAsyncHelper(e,r,n),s++;return o}async sendGetRequestAsync(e,r){return this.sendNetworkRequestAsync(Cd.GET,e,r)}async sendPostRequestAsync(e,r){return this.sendNetworkRequestAsync(Cd.POST,e,r)}};var nH={MANAGED_IDENTITY_CLIENT_ID_2017:"clientid",MANAGED_IDENTITY_CLIENT_ID:"client_id",MANAGED_IDENTITY_OBJECT_ID:"object_id",MANAGED_IDENTITY_RESOURCE_ID_IMDS:"msi_res_id",MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS:"mi_res_id"},WA=class{static{a(this,"BaseManagedIdentitySource")}constructor(e,r,n,o,s){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=o,this.disableInternalRetries=s}async getServerTokenResponseAsync(e,r,n,o){return this.getServerTokenResponse(e)}getServerTokenResponse(e){let r,n;return e.body.expires_on&&(e3r(e.body.expires_on)&&(e.body.expires_on=new Date(e.body.expires_on).getTime()/1e3),n=e.body.expires_on-Bl.nowSeconds(),n>2*3600&&(r=n/2)),{status:e.status,access_token:e.body.access_token,expires_in:n,scope:e.body.resource,token_type:e.body.token_type,refresh_in:r,correlation_id:e.body.correlation_id||e.body.correlationId,error:typeof e.body.error=="string"?e.body.error:e.body.error?.code,error_description:e.body.message||(typeof e.body.error=="string"?e.body.error_description:e.body.error?.message),error_codes:e.body.error_codes,timestamp:e.body.timestamp,trace_id:e.body.trace_id}}async acquireTokenWithManagedIdentity(e,r,n,o){let s=this.createRequest(e.resource,r);if(e.revokedTokenSha256Hash&&(this.logger.info(`[Managed Identity] The following claims are present in the request: ${e.claims}`,""),s.queryParameters[e0.SHA256_TOKEN_TO_REFRESH]=e.revokedTokenSha256Hash),e.clientCapabilities?.length){let g=e.clientCapabilities.toString();this.logger.info(`[Managed Identity] The following client capabilities are present in the request: ${g}`,""),s.queryParameters[e0.XMS_CC]=g}let c=s.headers;c[Ht.HeaderNames.CONTENT_TYPE]=Ht.URL_FORM_CONTENT_TYPE;let l={headers:c};Object.keys(s.bodyParameters).length&&(l.body=s.computeParametersBodyString());let u=this.disableInternalRetries?this.networkClient:new UBe(this.networkClient,s.retryPolicy,this.logger),d=Bl.nowSeconds(),p;try{s.httpMethod===Cd.POST?p=await u.sendPostRequestAsync(s.computeUri(),l):p=await u.sendGetRequestAsync(s.computeUri(),l)}catch(g){throw g instanceof eo?g:Ct(cf.networkError)}let h=new lf(r.id,this.nodeStorage,this.cryptoProvider,this.logger,new Zf,null,null),m=await this.getServerTokenResponseAsync(p,u,s,l);return h.validateTokenResponse(m,m.correlation_id||"",o),h.handleServerTokenResponse(m,n,d,e,Vu.acquireTokenWithManagedIdentity)}getManagedIdentityUserAssignedIdQueryParameterKey(e,r,n){switch(e){case $u.USER_ASSIGNED_CLIENT_ID:return this.logger.info(`[Managed Identity] [API version ${n?"2017+":"2019+"}] Adding user assigned client id to the request.`,""),n?nH.MANAGED_IDENTITY_CLIENT_ID_2017:nH.MANAGED_IDENTITY_CLIENT_ID;case $u.USER_ASSIGNED_RESOURCE_ID:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request.",""),r?nH.MANAGED_IDENTITY_RESOURCE_ID_IMDS:nH.MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS;case $u.USER_ASSIGNED_OBJECT_ID:return this.logger.info("[Managed Identity] Adding user assigned object id to the request.",""),nH.MANAGED_IDENTITY_OBJECT_ID;default:throw uf(v8)}}};WA.getValidatedEnvVariableUrlString=(t,e,r,n)=>{try{return new Qo(e).urlString}catch{throw n.info(`[Managed Identity] ${r} managed identity is unavailable because the '${t}' environment variable is malformed.`,""),uf(ZG[t])}};f();f();f();var QBe=class{static{a(this,"LinearRetryStrategy")}calculateDelay(e,r){if(!e)return r;let n=Math.round(parseFloat(e)*1e3);return isNaN(n)&&(n=new Date(e).valueOf()-new Date().valueOf()),Math.max(r,n)}};var O9i=3,B9i=1e3,L9i=[Ht.HTTP_NOT_FOUND,Ht.HTTP_REQUEST_TIMEOUT,Ht.HTTP_TOO_MANY_REQUESTS,Ht.HTTP_SERVER_ERROR,Ht.HTTP_SERVICE_UNAVAILABLE,Ht.HTTP_GATEWAY_TIMEOUT],qBe=class t{static{a(this,"DefaultManagedIdentityRetryPolicy")}constructor(){this.linearRetryStrategy=new QBe}static get DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS(){return B9i}async pauseForRetry(e,r,n,o){if(L9i.includes(e)&&rsetTimeout(c,s)),!0}return!1}};var kE=class{static{a(this,"ManagedIdentityRequestParameters")}constructor(e,r,n){this.httpMethod=e,this._baseEndpoint=r,this.headers={},this.bodyParameters={},this.queryParameters={},this.retryPolicy=n||new qBe}computeUri(){let e=new Map;this.queryParameters&&Hr.addExtraParameters(e,this.queryParameters);let r=im.mapToQueryString(e);return Qo.appendQueryString(this._baseEndpoint,r)}computeParametersBodyString(){let e=new Map;return this.bodyParameters&&Hr.addExtraParameters(e,this.bodyParameters),im.mapToQueryString(e)}};var F9i="2019-08-01",Ege=class t extends WA{static{a(this,"AppService")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.identityEndpoint=c,this.identityHeader=l}static getEnvironmentVariables(){let e=process.env[yi.IDENTITY_ENDPOINT],r=process.env[yi.IDENTITY_HEADER];return[e,r]}static tryCreate(e,r,n,o,s){let[c,l]=t.getEnvironmentVariables();if(!c||!l)return e.info(`[Managed Identity] ${Pi.APP_SERVICE} managed identity is unavailable because one or both of the '${yi.IDENTITY_HEADER}' and '${yi.IDENTITY_ENDPOINT}' environment variables are not defined.`,""),null;let u=t.getValidatedEnvVariableUrlString(yi.IDENTITY_ENDPOINT,c,Pi.APP_SERVICE,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Pi.APP_SERVICE} managed identity. Endpoint URI: ${u}. Creating ${Pi.APP_SERVICE} managed identity.`,""),new t(e,r,n,o,s,c,l)}createRequest(e,r){let n=new kE(Cd.GET,this.identityEndpoint);return n.headers[RE.APP_SERVICE_SECRET_HEADER_NAME]=this.identityHeader,n.queryParameters[e0.API_VERSION]=F9i,n.queryParameters[e0.RESOURCE]=e,r.idType!==$u.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};f();var vM=require("fs"),i3r=de(require("path"),1);var U9i="2019-11-01",t3r="http://127.0.0.1:40342/metadata/identity/oauth2/token",r3r="N/A: himds executable exists",n3r={win32:`${process.env.ProgramData}\\AzureConnectedMachineAgent\\Tokens\\`,linux:"/var/opt/azcmagent/tokens/"},Q9i={win32:`${process.env.ProgramFiles}\\AzureConnectedMachineAgent\\himds.exe`,linux:"/opt/azcmagent/bin/himds"},_ge=class t extends WA{static{a(this,"AzureArc")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.identityEndpoint=c}static getEnvironmentVariables(){let e=process.env[yi.IDENTITY_ENDPOINT],r=process.env[yi.IMDS_ENDPOINT];if(!e||!r){let n=Q9i[process.platform];try{(0,vM.accessSync)(n,vM.constants.F_OK|vM.constants.R_OK),e=t3r,r=r3r}catch{}}return[e,r]}static tryCreate(e,r,n,o,s,c){let[l,u]=t.getEnvironmentVariables();if(!l||!u)return e.info(`[Managed Identity] ${Pi.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${yi.IDENTITY_ENDPOINT}' and '${yi.IMDS_ENDPOINT}' are not defined. ${Pi.AZURE_ARC} managed identity is also unavailable through file detection.`,""),null;if(u===r3r)e.info(`[Managed Identity] ${Pi.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${Pi.AZURE_ARC} endpoint: ${t3r}. Creating ${Pi.AZURE_ARC} managed identity.`,"");else{let d=t.getValidatedEnvVariableUrlString(yi.IDENTITY_ENDPOINT,l,Pi.AZURE_ARC,e);d.endsWith("/")&&d.slice(0,-1),t.getValidatedEnvVariableUrlString(yi.IMDS_ENDPOINT,u,Pi.AZURE_ARC,e),e.info(`[Managed Identity] Environment variables validation passed for ${Pi.AZURE_ARC} managed identity. Endpoint URI: ${d}. Creating ${Pi.AZURE_ARC} managed identity.`,"")}if(c.idType!==$u.SYSTEM_ASSIGNED)throw uf(JOe);return new t(e,r,n,o,s,l)}createRequest(e){let r=new kE(Cd.GET,this.identityEndpoint.replace("localhost","127.0.0.1"));return r.headers[RE.METADATA_HEADER_NAME]="true",r.queryParameters[e0.API_VERSION]=U9i,r.queryParameters[e0.RESOURCE]=e,r}async getServerTokenResponseAsync(e,r,n,o){let s;if(e.status===Ht.HTTP_UNAUTHORIZED){let c=e.headers["www-authenticate"];if(!c)throw uf(eBe);if(!c.includes("Basic realm="))throw uf(tBe);let l=c.split("Basic realm=")[1];if(!n3r.hasOwnProperty(process.platform))throw uf(KOe);let u=n3r[process.platform],d=i3r.default.basename(l);if(!d.endsWith(".key"))throw uf(WOe);if(u+d!==l)throw uf(zOe);let p;try{p=await(0,vM.statSync)(l).size}catch{throw uf(sge)}if(p>rMr)throw uf(YOe);let h;try{h=(0,vM.readFileSync)(l,Ht.EncodingTypes.UTF8)}catch{throw uf(sge)}let m=`Basic ${h}`;this.logger.info("[Managed Identity] Adding authorization header to the request.",""),n.headers[RE.AUTHORIZATION_HEADER_NAME]=m;try{s=await r.sendGetRequestAsync(n.computeUri(),o)}catch(g){throw g instanceof eo?g:Ct(cf.networkError)}}return this.getServerTokenResponse(s||e)}};f();var Cge=class t extends WA{static{a(this,"CloudShell")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.msiEndpoint=c}static getEnvironmentVariables(){return[process.env[yi.MSI_ENDPOINT]]}static tryCreate(e,r,n,o,s,c){let[l]=t.getEnvironmentVariables();if(!l)return e.info(`[Managed Identity] ${Pi.CLOUD_SHELL} managed identity is unavailable because the '${yi.MSI_ENDPOINT} environment variable is not defined.`,""),null;let u=t.getValidatedEnvVariableUrlString(yi.MSI_ENDPOINT,l,Pi.CLOUD_SHELL,e);if(e.info(`[Managed Identity] Environment variable validation passed for ${Pi.CLOUD_SHELL} managed identity. Endpoint URI: ${u}. Creating ${Pi.CLOUD_SHELL} managed identity.`,""),c.idType!==$u.SYSTEM_ASSIGNED)throw uf(XOe);return new t(e,r,n,o,s,l)}createRequest(e){let r=new kE(Cd.POST,this.msiEndpoint);return r.headers[RE.METADATA_HEADER_NAME]="true",r.bodyParameters[e0.RESOURCE]=e,r}};f();f();f();var GBe=class{static{a(this,"ExponentialRetryStrategy")}constructor(e,r,n){this.minExponentialBackoff=e,this.maxExponentialBackoff=r,this.exponentialDeltaBackoff=n}calculateDelay(e){return e===0?this.minExponentialBackoff:Math.min(Math.pow(2,e-1)*this.exponentialDeltaBackoff,this.maxExponentialBackoff)}};var q9i=[Ht.HTTP_NOT_FOUND,Ht.HTTP_REQUEST_TIMEOUT,Ht.HTTP_GONE,Ht.HTTP_TOO_MANY_REQUESTS],G9i=3,H9i=7,j9i=1e3,$9i=4e3,V9i=2e3,W9i=10*1e3,HBe=class t{static{a(this,"ImdsRetryPolicy")}constructor(){this.exponentialRetryStrategy=new GBe(t.MIN_EXPONENTIAL_BACKOFF_MS,t.MAX_EXPONENTIAL_BACKOFF_MS,t.EXPONENTIAL_DELTA_BACKOFF_MS)}static get MIN_EXPONENTIAL_BACKOFF_MS(){return j9i}static get MAX_EXPONENTIAL_BACKOFF_MS(){return $9i}static get EXPONENTIAL_DELTA_BACKOFF_MS(){return V9i}static get HTTP_STATUS_GONE_RETRY_AFTER_MS(){return W9i}set isNewRequest(e){this._isNewRequest=e}async pauseForRetry(e,r,n){if(this._isNewRequest&&(this._isNewRequest=!1,this.maxRetries=e===Ht.HTTP_GONE?H9i:G9i),(q9i.includes(e)||e>=Ht.HTTP_SERVER_ERROR_RANGE_START&&e<=Ht.HTTP_SERVER_ERROR_RANGE_END&&rsetTimeout(s,o)),!0}return!1}};var o3r="/metadata/identity/oauth2/token",z9i=`http://169.254.169.254${o3r}`,Y9i="2018-02-01",jBe=class t extends WA{static{a(this,"Imds")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.identityEndpoint=c}static tryCreate(e,r,n,o,s){let c;return process.env[yi.AZURE_POD_IDENTITY_AUTHORITY_HOST]?(e.info(`[Managed Identity] Environment variable ${yi.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${Pi.IMDS} returned endpoint: ${process.env[yi.AZURE_POD_IDENTITY_AUTHORITY_HOST]}`,""),c=t.getValidatedEnvVariableUrlString(yi.AZURE_POD_IDENTITY_AUTHORITY_HOST,`${process.env[yi.AZURE_POD_IDENTITY_AUTHORITY_HOST]}${o3r}`,Pi.IMDS,e)):(e.info(`[Managed Identity] Unable to find ${yi.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${Pi.IMDS}, using the default endpoint.`,""),c=z9i),new t(e,r,n,o,s,c)}createRequest(e,r){let n=new kE(Cd.GET,this.identityEndpoint);return n.headers[RE.METADATA_HEADER_NAME]="true",n.queryParameters[e0.API_VERSION]=Y9i,n.queryParameters[e0.RESOURCE]=e,r.idType!==$u.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType,!0)]=r.id),n.retryPolicy=new HBe,n}};f();var K9i="2019-07-01-preview",vge=class t extends WA{static{a(this,"ServiceFabric")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.identityEndpoint=c,this.identityHeader=l}static getEnvironmentVariables(){let e=process.env[yi.IDENTITY_ENDPOINT],r=process.env[yi.IDENTITY_HEADER],n=process.env[yi.IDENTITY_SERVER_THUMBPRINT];return[e,r,n]}static tryCreate(e,r,n,o,s,c){let[l,u,d]=t.getEnvironmentVariables();if(!l||!u||!d)return e.info(`[Managed Identity] ${Pi.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${yi.IDENTITY_HEADER}', '${yi.IDENTITY_ENDPOINT}' or '${yi.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`,""),null;let p=t.getValidatedEnvVariableUrlString(yi.IDENTITY_ENDPOINT,l,Pi.SERVICE_FABRIC,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Pi.SERVICE_FABRIC} managed identity. Endpoint URI: ${p}. Creating ${Pi.SERVICE_FABRIC} managed identity.`,""),c.idType!==$u.SYSTEM_ASSIGNED&&e.warning(`[Managed Identity] ${Pi.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`,""),new t(e,r,n,o,s,l,u)}createRequest(e,r){let n=new kE(Cd.GET,this.identityEndpoint);return n.headers[RE.ML_AND_SF_SECRET_HEADER_NAME]=this.identityHeader,n.queryParameters[e0.API_VERSION]=K9i,n.queryParameters[e0.RESOURCE]=e,r.idType!==$u.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};f();var J9i="2017-09-01",X9i=`Only client id is supported for user-assigned managed identity in ${Pi.MACHINE_LEARNING}.`,bge=class t extends WA{static{a(this,"MachineLearning")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.msiEndpoint=c,this.secret=l}static getEnvironmentVariables(){let e=process.env[yi.MSI_ENDPOINT],r=process.env[yi.MSI_SECRET];return[e,r]}static tryCreate(e,r,n,o,s){let[c,l]=t.getEnvironmentVariables();if(!c||!l)return e.info(`[Managed Identity] ${Pi.MACHINE_LEARNING} managed identity is unavailable because one or both of the '${yi.MSI_ENDPOINT}' and '${yi.MSI_SECRET}' environment variables are not defined.`,""),null;let u=t.getValidatedEnvVariableUrlString(yi.MSI_ENDPOINT,c,Pi.MACHINE_LEARNING,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Pi.MACHINE_LEARNING} managed identity. Endpoint URI: ${u}. Creating ${Pi.MACHINE_LEARNING} managed identity.`,""),new t(e,r,n,o,s,c,l)}createRequest(e,r){let n=new kE(Cd.GET,this.msiEndpoint);if(n.headers[RE.METADATA_HEADER_NAME]="true",n.headers[RE.ML_AND_SF_SECRET_HEADER_NAME]=this.secret,n.queryParameters[e0.API_VERSION]=J9i,n.queryParameters[e0.RESOURCE]=e,r.idType===$u.SYSTEM_ASSIGNED)n.queryParameters[nH.MANAGED_IDENTITY_CLIENT_ID_2017]=process.env[yi.DEFAULT_IDENTITY_CLIENT_ID];else if(r.idType===$u.USER_ASSIGNED_CLIENT_ID)n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType,!1,!0)]=r.id;else throw new Error(X9i);return n}};var Tge=class t{static{a(this,"ManagedIdentityClient")}constructor(e,r,n,o,s){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=o,this.disableInternalRetries=s}async sendManagedIdentityTokenRequest(e,r,n,o){return t.identitySource||(t.identitySource=this.selectManagedIdentitySource(this.logger,this.nodeStorage,this.networkClient,this.cryptoProvider,this.disableInternalRetries,r)),t.identitySource.acquireTokenWithManagedIdentity(e,r,n,o)}allEnvironmentVariablesAreDefined(e){return Object.values(e).every(r=>r!==void 0)}getManagedIdentitySource(){return t.sourceName=this.allEnvironmentVariablesAreDefined(vge.getEnvironmentVariables())?Pi.SERVICE_FABRIC:this.allEnvironmentVariablesAreDefined(Ege.getEnvironmentVariables())?Pi.APP_SERVICE:this.allEnvironmentVariablesAreDefined(bge.getEnvironmentVariables())?Pi.MACHINE_LEARNING:this.allEnvironmentVariablesAreDefined(Cge.getEnvironmentVariables())?Pi.CLOUD_SHELL:this.allEnvironmentVariablesAreDefined(_ge.getEnvironmentVariables())?Pi.AZURE_ARC:Pi.DEFAULT_TO_IMDS,t.sourceName}selectManagedIdentitySource(e,r,n,o,s,c){let l=vge.tryCreate(e,r,n,o,s,c)||Ege.tryCreate(e,r,n,o,s)||bge.tryCreate(e,r,n,o,s)||Cge.tryCreate(e,r,n,o,s,c)||_ge.tryCreate(e,r,n,o,s,c)||jBe.tryCreate(e,r,n,o,s);if(!l)throw uf(ZOe);return l}};var Z9i=[Pi.SERVICE_FABRIC],pte=class t{static{a(this,"ManagedIdentityApplication")}constructor(e){this.config=aMr(e||{}),this.logger=new lp(this.config.system.loggerOptions,cte,h1);let r={canonicalAuthority:Ht.DEFAULT_AUTHORITY};t.nodeStorage||(t.nodeStorage=new T8(this.logger,this.config.managedIdentityId.id,qee,r)),this.networkClient=this.config.system.networkClient,this.cryptoProvider=new AP;let n={protocolMode:bg.AAD,knownAuthorities:[Pvt],cloudDiscoveryMetadata:"",authorityMetadata:""};this.fakeAuthority=new dx(Pvt,this.networkClient,t.nodeStorage,n,this.logger,this.cryptoProvider.createNewGuid(),new Zf,!0),this.fakeClientCredentialClient=new dte({authOptions:{clientId:this.config.managedIdentityId.id,authority:this.fakeAuthority}}),this.managedIdentityClient=new Tge(this.logger,t.nodeStorage,this.networkClient,this.cryptoProvider,this.config.disableInternalRetries),this.hashUtils=new b8}async acquireToken(e){if(!e.resource)throw mc(Fee.urlEmptyError);let r={forceRefresh:e.forceRefresh,resource:e.resource.replace("/.default",""),scopes:[e.resource.replace("/.default","")],authority:this.fakeAuthority.canonicalAuthority,correlationId:this.cryptoProvider.createNewGuid(),claims:e.claims,clientCapabilities:this.config.clientCapabilities};if(r.forceRefresh)return this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority);let[n,o]=await this.fakeClientCredentialClient.getCachedAuthenticationResult(r,this.config,this.cryptoProvider,this.fakeAuthority,t.nodeStorage);if(r.claims){let s=this.managedIdentityClient.getManagedIdentitySource();if(n&&Z9i.includes(s)){let c=this.hashUtils.sha256(n.accessToken).toString(Ht.EncodingTypes.HEX);r.revokedTokenSha256Hash=c}return this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority)}return n?(o===Ht.CacheOutcome.PROACTIVELY_REFRESHED&&(this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.",r.correlationId),await this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority,!0)),n):this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority)}async acquireTokenFromManagedIdentity(e,r,n,o){return this.managedIdentityClient.sendManagedIdentityTokenRequest(e,r,n,o)}getManagedIdentitySource(){return Tge.sourceName||this.managedIdentityClient.getManagedIdentitySource()}};f();var $Be=class{static{a(this,"DistributedCachePlugin")}constructor(e,r){this.client=e,this.partitionManager=r}async beforeCacheAccess(e){let r=await this.partitionManager.getKey(),n=await this.client.get(r);e.tokenCache.deserialize(n)}async afterCacheAccess(e){if(e.cacheHasChanged){let r=e.tokenCache.getKVStore(),n=Object.values(r).filter(s=>zG.isAccountEntity(s)),o;if(n.length>0){let s=n[0];o=await this.partitionManager.extractKey(s)}else o=await this.partitionManager.getKey();await this.client.set(o,e.tokenCache.serialize())}}};var e7i=Ht.PromptValue,t7i=Ht.ResponseMode;f();f();f();f();f();function Sge(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}a(Sge,"getRandomIntegerInclusive");function Ige(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+Sge(0,n/2)}}a(Ige,"calculateRetryDelay");f();function hte(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(hte,"isObject");f();function iH(t){if(hte(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}a(iH,"isError");f();f();var s3r=require("node:crypto");var Sbt,r7i=typeof((Sbt=globalThis?.crypto)===null||Sbt===void 0?void 0:Sbt.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):s3r.randomUUID;function mte(){return r7i()}a(mte,"randomUUID");f();var Ibt,xbt,wbt,Rbt,a3r=typeof window<"u"&&typeof window.document<"u",c3r=typeof self=="object"&&typeof self?.importScripts=="function"&&(((Ibt=self.constructor)===null||Ibt===void 0?void 0:Ibt.name)==="DedicatedWorkerGlobalScope"||((xbt=self.constructor)===null||xbt===void 0?void 0:xbt.name)==="ServiceWorkerGlobalScope"||((wbt=self.constructor)===null||wbt===void 0?void 0:wbt.name)==="SharedWorkerGlobalScope"),l3r=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",u3r=typeof Bun<"u"&&typeof Bun.version<"u",w8=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((Rbt=globalThis.process.versions)===null||Rbt===void 0)&&Rbt.node);var d3r=typeof navigator<"u"&&navigator?.product==="ReactNative";f();function DE(t,e){return Buffer.from(t,e)}a(DE,"stringToUint8Array");f();var Pbt="REDACTED",n7i=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],i7i=["api-version"],px=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=n7i.concat(e),r=i7i.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||hte(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,Pbt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=Pbt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=Pbt;return r}};f();f();f();f();var oH=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Dbt(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,c)=>{function l(){c(new oH(o??"The operation was aborted."))}a(l,"rejectOnAbort");function u(){n?.removeEventListener("abort",d)}a(u,"removeListeners");function d(){r?.(),u(),l()}if(a(d,"onAbort"),n?.aborted)return l();try{t(p=>{u(),s(p)},p=>{u(),c(p)})}catch(p){c(p)}n?.addEventListener("abort",d)})}a(Dbt,"createAbortablePromise");f();var l7i="The delay was aborted.";function Nbt(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return Dbt(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:a(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??l7i})}a(Nbt,"delay");f();function gte(t){if(iH(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}a(gte,"getErrorMessage");f();function f3r(t,e){return Ige(t,e)}a(f3r,"calculateRetryDelay");function VBe(t){return iH(t)}a(VBe,"isError");var WBe=w8,Ate=w8;f();var xge=Mi("IdentityUtils"),p3r="1.0";function sH(t,e,r){let n=a(o=>(xge.getToken.info(o),new zb({scopes:Array.isArray(t)?t:[t],getTokenOptions:r,message:o})),"error");if(!e)throw n("No response");if(!e.expiresOn)throw n('Response had no "expiresOn" property.');if(!e.accessToken)throw n('Response had no "accessToken" property.')}a(sH,"ensureValidMsalToken");function Mbt(t){let e=t?.authorityHost;return!e&&Ate&&(e=process.env.AZURE_AUTHORITY_HOST),e??mme}a(Mbt,"getAuthorityHost");function Obt(t,e){return e||(e=mme),new RegExp(`${t}/?$`).test(e)?e:e.endsWith("/")?e+t:`${e}/${t}`}a(Obt,"getAuthority");function h3r(t,e,r){return t==="adfs"&&e||r?[e]:[]}a(h3r,"getKnownAuthorities");var zBe=a((t,e=WBe?"Node":"Browser")=>(r,n,o)=>{if(!o)switch(r){case m1.LogLevel.Error:t.info(`MSAL ${e} V2 error: ${n}`);return;case m1.LogLevel.Info:t.info(`MSAL ${e} V2 info message: ${n}`);return;case m1.LogLevel.Verbose:t.info(`MSAL ${e} V2 verbose message: ${n}`);return;case m1.LogLevel.Warning:t.info(`MSAL ${e} V2 warning: ${n}`);return}},"defaultLoggerCallback");function YBe(t){switch(t){case"error":return m1.LogLevel.Error;case"info":return m1.LogLevel.Info;case"verbose":return m1.LogLevel.Verbose;case"warning":return m1.LogLevel.Warning;default:return m1.LogLevel.Info}}a(YBe,"getMSALLogLevel");function aH(t,e,r){if(e.name==="AuthError"||e.name==="ClientAuthError"||e.name==="BrowserAuthError"){let n=e;switch(n.errorCode){case"endpoints_resolution_error":return xge.info(zo(t,e.message)),new un(e.message);case"device_code_polling_cancelled":return new oH("The authentication has been aborted by the caller.");case"consent_required":case"interaction_required":case"login_required":xge.info(zo(t,`Authentication returned errorCode ${n.errorCode}`));break;default:xge.info(zo(t,`Failed to acquire token: ${e.message}`));break}}return e.name==="ClientConfigurationError"||e.name==="BrowserConfigurationAuthError"||e.name==="AbortError"||e.name==="AuthenticationError"?e:e.name==="NativeAuthError"?(xge.info(zo(t,`Error from the native broker: ${e.message} with status code: ${e.statusCode}`)),e):new zb({scopes:t,getTokenOptions:r,message:e.message})}a(aH,"handleMsalError");function m3r(t){return{localAccountId:t.homeAccountId,environment:t.authority,username:t.username,homeAccountId:t.homeAccountId,tenantId:t.tenantId}}a(m3r,"publicToMsal");function g3r(t,e){return{authority:e.environment??wDr,homeAccountId:e.homeAccountId,tenantId:e.tenantId||xDr,username:e.username,clientId:t,version:p3r}}a(g3r,"msalToPublic");function Bbt(t){let e=JSON.parse(t);if(e.version&&e.version!==p3r)throw Error("Unsupported AuthenticationRecord version");return e}a(Bbt,"deserializeAuthenticationRecord");f();f();f();f();f();f();function d7i(t,e){return e!=="Composite"&&e!=="Dictionary"&&(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||e?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||t===void 0||t===null)}a(d7i,"isPrimitiveBody");function f7i(t){let e=Object.assign(Object.assign({},t.headers),t.body);return t.hasNullableType&&Object.getOwnPropertyNames(e).length===0?t.shouldWrapBody?{body:null}:null:t.shouldWrapBody?Object.assign(Object.assign({},t.headers),{body:t.body}):e}a(f7i,"handleNullableResponseAndWrappableBody");function Lbt(t,e){var r,n;let o=t.parsedHeaders;if(t.request.method==="HEAD")return Object.assign(Object.assign({},o),{body:t.parsedBody});let s=e&&e.bodyMapper,c=!!s?.nullable,l=s?.type.name;if(l==="Stream")return Object.assign(Object.assign({},o),{blobBody:t.blobBody,readableStreamBody:t.readableStreamBody});let u=l==="Composite"&&s.type.modelProperties||{},d=Object.keys(u).some(p=>u[p].serializedName==="");if(l==="Sequence"||d){let p=(r=t.parsedBody)!==null&&r!==void 0?r:[];for(let h of Object.keys(u))u[h].serializedName&&(p[h]=(n=t.parsedBody)===null||n===void 0?void 0:n[h]);if(o)for(let h of Object.keys(o))p[h]=o[h];return c&&!t.parsedBody&&!o&&Object.getOwnPropertyNames(u).length===0?null:p}return f7i({body:t.parsedBody,headers:o,hasNullableType:c,shouldWrapBody:d7i(t.parsedBody,l)})}a(Lbt,"flattenResponse");var CP={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"};f();f();f();f();f();var vP=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};f();f();f();var A3r=require("node:os"),y3r=de(require("node:util"),1),E3r=de(require("node:process"),1);function _3r(t,...e){E3r.stderr.write(`${y3r.default.format(t,...e)}${A3r.EOL}`)}a(_3r,"log");var C3r=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,v3r,Fbt=[],Ubt=[],JBe=[];C3r&&Qbt(C3r);var b3r=Object.assign(t=>T3r(t),{enable:Qbt,enabled:qbt,disable:p7i,log:_3r});function Qbt(t){v3r=t,Fbt=[],Ubt=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?Ubt.push(new RegExp(`^${n.substr(1)}$`)):Fbt.push(new RegExp(`^${n}$`));for(let n of JBe)n.enabled=qbt(n.namespace)}a(Qbt,"enable");function qbt(t){if(t.endsWith("*"))return!0;for(let e of Ubt)if(e.test(t))return!1;for(let e of Fbt)if(e.test(t))return!0;return!1}a(qbt,"enabled");function p7i(){let t=v3r||"";return Qbt(""),t}a(p7i,"disable");function T3r(t){let e=Object.assign(r,{enabled:qbt(t),destroy:h7i,log:b3r.log,namespace:t,extend:m7i});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),JBe.push(e),e}a(T3r,"createDebugger");function h7i(){let t=JBe.indexOf(this);return t>=0?(JBe.splice(t,1),!0):!1}a(h7i,"destroy");function m7i(t){let e=T3r(`${this.namespace}:${t}`);return e.log=this.log,e}a(m7i,"extend");var yte=b3r;var Gbt=["verbose","info","warning","error"],S3r={verbose:400,info:300,warning:200,error:100};function I3r(t,e){e.log=(...r)=>{t.log(...r)}}a(I3r,"patchLogMethod");function x3r(t){return Gbt.includes(t)}a(x3r,"isTypeSpecRuntimeLogLevel");function g7i(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,o=yte(t.namespace);o.log=(...p)=>{yte.log(...p)};function s(p){if(p&&!x3r(p))throw new Error(`Unknown log level '${p}'. Acceptable values: ${Gbt.join(",")}`);n=p;let h=[];for(let m of e)c(m)&&h.push(m.namespace);yte.enable(h.join(","))}a(s,"contextSetLogLevel"),r&&(x3r(r)?s(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${Gbt.join(", ")}.`));function c(p){return!!(n&&S3r[p.level]<=S3r[n])}a(c,"shouldEnable");function l(p,h){let m=Object.assign(p.extend(h),{level:h});if(I3r(p,m),c(m)){let g=yte.disable();yte.enable(g+","+m.namespace)}return e.add(m),m}a(l,"createLogger");function u(){return n}a(u,"contextGetLogLevel");function d(p){let h=o.extend(p);return I3r(o,h),{error:l(h,"error"),warning:l(h,"warning"),info:l(h,"info"),verbose:l(h,"verbose")}}return a(d,"contextCreateClientLogger"),{setLogLevel:s,getLogLevel:u,createClientLogger:d,logger:o}}a(g7i,"createLoggerContext");var w3r=g7i({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),A7i=w3r.logger;function Rge(t){return w3r.createClientLogger(t)}a(Rge,"createClientLogger");f();function XBe(t){return t.toLowerCase()}a(XBe,"normalizeName");function*y7i(t){for(let e of t.values())yield[e.name,e.value]}a(y7i,"headerIterator");var Hbt=class{static{a(this,"HttpHeadersImpl")}constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(XBe(e),{name:e,value:String(r).trim()})}get(e){var r;return(r=this._headersMap.get(XBe(e)))===null||r===void 0?void 0:r.value}has(e){return this._headersMap.has(XBe(e))}delete(e){this._headersMap.delete(XBe(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,o]of this._headersMap)r[n]=o.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return y7i(this._headersMap)}};function g1(t){return new Hbt(t)}a(g1,"createHttpHeaders");f();f();f();var jbt=class{static{a(this,"PipelineRequestImpl")}constructor(e){var r,n,o,s,c,l,u;this.url=e.url,this.body=e.body,this.headers=(r=e.headers)!==null&&r!==void 0?r:g1(),this.method=(n=e.method)!==null&&n!==void 0?n:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(s=e.disableKeepAlive)!==null&&s!==void 0?s:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(c=e.withCredentials)!==null&&c!==void 0?c:!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||mte(),this.allowInsecureConnection=(l=e.allowInsecureConnection)!==null&&l!==void 0?l:!1,this.enableBrowserStreams=(u=e.enableBrowserStreams)!==null&&u!==void 0?u:!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function ZBe(t){return new jbt(t)}a(ZBe,"createPipelineRequest");f();var R3r=new Set(["Deserialize","Serialize","Retry","Sign"]),$bt=class t{static{a(this,"HttpPipeline")}constructor(e){var r;this._policies=[],this._policies=(r=e?.slice(0))!==null&&r!==void 0?r:[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!R3r.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!R3r.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,c)=>l=>c.sendRequest(l,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(A){return{name:A,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}a(n,"createPhase");let o=n("Serialize"),s=n("None"),c=n("Deserialize"),l=n("Retry"),u=n("Sign"),d=[o,s,c,l,u];function p(A){return A==="Retry"?l:A==="Serialize"?o:A==="Deserialize"?c:A==="Sign"?u:s}a(p,"getPhase");for(let A of this._policies){let y=A.policy,E=A.options,_=y.name;if(r.has(_))throw new Error("Duplicate policy names not allowed in pipeline");let v={policy:y,dependsOn:new Set,dependants:new Set};E.afterPhase&&(v.afterPhase=p(E.afterPhase),v.afterPhase.hasAfterPolicies=!0),r.set(_,v),p(E.phase).policies.add(v)}for(let A of this._policies){let{policy:y,options:E}=A,_=y.name,v=r.get(_);if(!v)throw new Error(`Missing node for policy ${_}`);if(E.afterPolicies)for(let b of E.afterPolicies){let I=r.get(b);I&&(v.dependsOn.add(I),I.dependants.add(v))}if(E.beforePolicies)for(let b of E.beforePolicies){let I=r.get(b);I&&(I.dependsOn.add(v),v.dependants.add(I))}}function h(A){A.hasRun=!0;for(let y of A.policies)if(!(y.afterPhase&&(!y.afterPhase.hasRun||y.afterPhase.policies.size))&&y.dependsOn.size===0){e.push(y.policy);for(let E of y.dependants)E.dependsOn.delete(y);r.delete(y.policy.name),A.policies.delete(y)}}a(h,"walkPhase");function m(){for(let A of d){if(h(A),A.policies.size>0&&A!==s){s.hasRun||h(s);return}A.hasAfterPolicies&&h(s)}}a(m,"walkPhases");let g=0;for(;r.size>0;){g++;let A=e.length;if(m(),e.length<=A&&g>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function e3e(){return $bt.create()}a(e3e,"createEmptyPipeline");f();f();var P3r=require("node:util"),k3r=P3r.inspect.custom;var E7i=new px,sm=class t extends Error{static{a(this,"RestError")}constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1}),Object.defineProperty(this,k3r,{value:a(()=>`RestError: ${this.message} + ${E7i.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};sm.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";sm.PARSE_ERROR="PARSE_ERROR";function t3e(t){return t instanceof sm?!0:iH(t)&&t.name==="RestError"}a(t3e,"isRestError");f();f();var Ete=de(require("node:http"),1),_te=de(require("node:https"),1),n3e=de(require("node:zlib"),1),N3r=require("node:stream");f();var tT=Rge("ts-http-runtime");var _7i={};function Pge(t){return t&&typeof t.pipe=="function"}a(Pge,"isReadableStream");function D3r(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=a(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}a(D3r,"isStreamComplete");function M3r(t){return t&&typeof t.byteLength=="number"}a(M3r,"isArrayBuffer");var r3e=class extends N3r.Transform{static{a(this,"ReportTransform")}_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},Vbt=class{static{a(this,"NodeHttpClient")}constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,o;let s=new AbortController,c;if(e.abortSignal){if(e.abortSignal.aborted)throw new vP("The operation was aborted. Request has already been canceled.");c=a(m=>{m.type==="abort"&&s.abort()},"abortListener"),e.abortSignal.addEventListener("abort",c)}let l;e.timeout>0&&(l=setTimeout(()=>{let m=new px;tT.info(`request to '${m.sanitizeUrl(e.url)}' timed out. canceling...`),s.abort()},e.timeout));let u=e.headers.get("Accept-Encoding"),d=u?.includes("gzip")||u?.includes("deflate"),p=typeof e.body=="function"?e.body():e.body;if(p&&!e.headers.has("Content-Length")){let m=T7i(p);m!==null&&e.headers.set("Content-Length",m)}let h;try{if(p&&e.onUploadProgress){let _=e.onUploadProgress,v=new r3e(_);v.on("error",b=>{tT.error("Error in upload progress",b)}),Pge(p)?p.pipe(v):v.end(p),p=v}let m=await this.makeRequest(e,s,p);l!==void 0&&clearTimeout(l);let g=C7i(m),y={status:(r=m.statusCode)!==null&&r!==void 0?r:0,headers:g,request:e};if(e.method==="HEAD")return m.resume(),y;h=d?v7i(m,g):m;let E=e.onDownloadProgress;if(E){let _=new r3e(E);_.on("error",v=>{tT.error("Error in download progress",v)}),h.pipe(_),h=_}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(y.status)?y.readableStreamBody=h:y.bodyAsText=await b7i(h),y}finally{if(e.abortSignal&&c){let m=Promise.resolve();Pge(p)&&(m=D3r(p));let g=Promise.resolve();Pge(h)&&(g=D3r(h)),Promise.all([m,g]).then(()=>{var A;c&&((A=e.abortSignal)===null||A===void 0||A.removeEventListener("abort",c))}).catch(A=>{tT.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){var o;let s=new URL(e.url),c=s.protocol!=="https:";if(c&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let l=(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,c),u=Object.assign({agent:l,hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})},e.requestOverrides);return new Promise((d,p)=>{let h=c?Ete.request(u,d):_te.request(u,d);h.once("error",m=>{var g;p(new sm(m.message,{code:(g=m.code)!==null&&g!==void 0?g:sm.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let m=new vP("The operation was aborted. Rejecting from abort signal callback while making request.");h.destroy(m),p(m)}),n&&Pge(n)?n.pipe(h):n?typeof n=="string"||Buffer.isBuffer(n)?h.end(n):M3r(n)?h.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(tT.error("Unrecognized body type",n),p(new sm("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){var n;let o=e.disableKeepAlive;if(r)return o?Ete.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Ete.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return _te.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:_7i,c=this.cachedHttpsAgents.get(s);return c&&c.options.keepAlive===!o||(tT.info("No cached TLS Agent exist, creating a new Agent"),c=new _te.Agent(Object.assign({keepAlive:!o},s)),this.cachedHttpsAgents.set(s,c)),c}}};function C7i(t){let e=g1();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}a(C7i,"getResponseHeaders");function v7i(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=n3e.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=n3e.createInflate();return t.pipe(n),n}return t}a(v7i,"getDecodedResponseStream");function b7i(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new sm(`Error reading response as text: ${o.message}`,{code:sm.PARSE_ERROR}))})})}a(b7i,"streamToText");function T7i(t){return t?Buffer.isBuffer(t)?t.length:Pge(t)?null:M3r(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}a(T7i,"getBodyLength");function O3r(){return new Vbt}a(O3r,"createNodeHttpClient");function i3e(){return O3r()}a(i3e,"createDefaultHttpClient");f();f();f();f();var Wbt="logPolicy";function o3e(t={}){var e;let r=(e=t.logger)!==null&&e!==void 0?e:tT.info,n=new px({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Wbt,async sendRequest(o,s){if(!r.enabled)return s(o);r(`Request: ${n.sanitize(o)}`);let c=await s(o);return r(`Response status code: ${c.status}`),r(`Headers: ${n.sanitize(c.headers)}`),c}}}a(o3e,"logPolicy");f();var zbt="redirectPolicy",B3r=["GET","HEAD"];function s3e(t={}){let{maxRetries:e=20}=t;return{name:zbt,async sendRequest(r,n){let o=await n(r);return L3r(n,o,e)}}}a(s3e,"redirectPolicy");async function L3r(t,e,r,n=0){let{request:o,status:s,headers:c}=e,l=c.get("location");if(l&&(s===300||s===301&&B3r.includes(o.method)||s===302&&B3r.includes(o.method)||s===303&&o.method==="POST"||s===307)&&n{let s,c,l=a(()=>o(new vP(r?.abortErrorMsg?r?.abortErrorMsg:S7i)),"rejectOnAbort"),u=a(()=>{r?.abortSignal&&c&&r.abortSignal.removeEventListener("abort",c)},"removeListeners");if(c=a(()=>(s&&clearTimeout(s),u(),l()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return l();s=setTimeout(()=>{u(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",c)})}a(Q3r,"delay");function q3r(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}a(q3r,"parseHeaderValueAsNumber");var Kbt="Retry-After",I7i=["retry-after-ms","x-ms-retry-after-ms",Kbt];function G3r(t){if(t&&[429,503].includes(t.status))try{for(let o of I7i){let s=q3r(t,o);if(s===0||s)return s*(o===Kbt?1e3:1)}let e=t.headers.get(Kbt);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}a(G3r,"getRetryAfterInMs");function H3r(t){return Number.isFinite(G3r(t))}a(H3r,"isThrottlingRetryResponse");function Jbt(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=G3r(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}a(Jbt,"throttlingRetryStrategy");var x7i=1e3,w7i=1e3*64;function c3e(t={}){var e,r;let n=(e=t.retryDelayInMs)!==null&&e!==void 0?e:x7i,o=(r=t.maxRetryDelayInMs)!==null&&r!==void 0?r:w7i;return{name:"exponentialRetryStrategy",retry({retryCount:s,response:c,responseError:l}){let u=P7i(l),d=u&&t.ignoreSystemErrors,p=R7i(c),h=p&&t.ignoreHttpStatusCodes;return c&&(H3r(c)||!p)||h||d?{skipStrategy:!0}:l&&!u&&!p?{errorToThrow:l}:Ige(s,{retryDelayInMs:n,maxRetryDelayInMs:o})}}}a(c3e,"exponentialRetryStrategy");function R7i(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}a(R7i,"isExponentialRetryResponse");function P7i(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}a(P7i,"isSystemError");f();var k7i=Rge("ts-http-runtime retryPolicy"),D7i="retryPolicy";function R8(t,e={maxRetries:3}){let r=e.logger||k7i;return{name:D7i,async sendRequest(n,o){var s,c;let l,u,d=-1;e:for(;;){d+=1,l=void 0,u=void 0;try{r.info(`Retry ${d}: Attempting to send request`,n.requestId),l=await o(n),r.info(`Retry ${d}: Received a response from request`,n.requestId)}catch(p){if(r.error(`Retry ${d}: Received an error from request`,n.requestId),u=p,!p||u.name!=="RestError")throw p;l=u.response}if(!((s=n.abortSignal)===null||s===void 0)&&s.aborted)throw r.error(`Retry ${d}: Request aborted.`),new vP;if(d>=((c=e.maxRetries)!==null&&c!==void 0?c:3)){if(r.info(`Retry ${d}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),u)throw u;if(l)return l;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${d}: Processing ${t.length} retry strategies.`);t:for(let p of t){let h=p.logger||r;h.info(`Retry ${d}: Processing retry strategy ${p.name}.`);let m=p.retry({retryCount:d,response:l,responseError:u});if(m.skipStrategy){h.info(`Retry ${d}: Skipped.`);continue t}let{errorToThrow:g,retryAfterInMs:A,redirectTo:y}=m;if(g)throw h.error(`Retry ${d}: Retry strategy ${p.name} throws error:`,g),g;if(A||A===0){h.info(`Retry ${d}: Retry strategy ${p.name} retries after ${A}`),await Q3r(A,void 0,{abortSignal:n.abortSignal});continue e}if(y){h.info(`Retry ${d}: Retry strategy ${p.name} redirects to ${y}`),n.url=y;continue e}}if(u)throw r.info("None of the retry strategies could work with the received error. Throwing it."),u;if(l)return r.info("None of the retry strategies could work with the received response. Returning it."),l}}}}a(R8,"retryPolicy");var Xbt="defaultRetryPolicy";function l3e(t={}){var e;return{name:Xbt,sendRequest:R8([Jbt(),c3e(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3}).sendRequest}}a(l3e,"defaultRetryPolicy");f();var Zbt="formDataPolicy";function N7i(t){var e;let r={};for(let[n,o]of t.entries())(e=r[n])!==null&&e!==void 0||(r[n]=[]),r[n].push(o);return r}a(N7i,"formDataToFormDataMap");function u3e(){return{name:Zbt,async sendRequest(t,e){if(w8&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=N7i(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=M7i(t.formData):await O7i(t.formData,t),t.formData=void 0}return e(t)}}}a(u3e,"formDataPolicy");function M7i(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.append(r,o.toString());else e.append(r,n.toString());return e.toString()}a(M7i,"wwwFormUrlEncode");async function O7i(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[o,s]of Object.entries(t))for(let c of Array.isArray(s)?s:[s])if(typeof c=="string")n.push({headers:g1({"Content-Disposition":`form-data; name="${o}"`}),body:DE(c,"utf-8")});else{if(c==null||typeof c!="object")throw new Error(`Unexpected value for key ${o}: ${c}. Value should be serialized to string first.`);{let l=c.name||"blob",u=g1();u.set("Content-Disposition",`form-data; name="${o}"; filename="${l}"`),u.set("Content-Type",c.type||"application/octet-stream"),n.push({headers:u,body:c})}}e.multipartBody={parts:n}}a(O7i,"prepareFormData");f();var hLr=de(aTt(),1),mLr=de(cTt(),1);var RUi="HTTPS_PROXY",PUi="HTTP_PROXY",kUi="ALL_PROXY",DUi="NO_PROXY",lTt="proxyPolicy",dLr=[],gLr=!1,NUi=new Map;function y3e(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}a(y3e,"getEnvironmentValue");function MUi(){if(!process)return;let t=y3e(RUi),e=y3e(kUi),r=y3e(PUi);return t||e||r}a(MUi,"loadEnvironmentProxyValue");function OUi(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let o=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(o=!0):n===s&&(o=!0);return r?.set(n,o),o}a(OUi,"isBypassed");function BUi(){let t=y3e(DUi);return gLr=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(BUi,"loadNoProxy");function LUi(){let t=MUi();return t?new URL(t):void 0}a(LUi,"getDefaultProxySettingsInternal");function fLr(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}a(fLr,"getUrlFromProxySettings");function pLr(t,e,r){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&tT.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new mLr.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new hLr.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}a(pLr,"setProxyAgentOnRequest");function E3e(t,e){gLr||dLr.push(...BUi());let r=t?fLr(t):LUi(),n={};return{name:lTt,async sendRequest(o,s){var c;return!o.proxySettings&&r&&!OUi(o.url,(c=e?.customNoProxyList)!==null&&c!==void 0?c:dLr,e?.customNoProxyList?void 0:NUi)?pLr(o,n,r):o.proxySettings&&pLr(o,n,fLr(o.proxySettings)),s(o)}}}a(E3e,"proxyPolicy");f();var uTt="agentPolicy";function _3e(t){return{name:uTt,sendRequest:a(async(e,r)=>(e.agent||(e.agent=t),r(e)),"sendRequest")}}a(_3e,"agentPolicy");f();var dTt="tlsPolicy";function C3e(t){return{name:dTt,sendRequest:a(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}a(C3e,"tlsPolicy");f();f();function v3e(t){return typeof t.stream=="function"}a(v3e,"isBlob");f();bM();var x3e=require("stream");function GLr(){return Dge(this,arguments,a(function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield E1(e.read());if(r)return yield E1(void 0);yield yield E1(n)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}a(GLr,"streamAsyncIterator");function qUi(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=GLr.bind(t)),t.values||(t.values=GLr.bind(t))}a(qUi,"makeAsyncIterable");function HLr(t){return t instanceof ReadableStream?(qUi(t),x3e.Readable.fromWeb(t)):t}a(HLr,"ensureNodeStream");function GUi(t){return t instanceof Uint8Array?x3e.Readable.from(Buffer.from(t)):v3e(t)?HLr(t.stream()):HLr(t)}a(GUi,"toStream");async function jLr(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(GUi);return x3e.Readable.from((function(){return Dge(this,arguments,function*(){var r,n,o,s;for(let d of e)try{for(var c=!0,l=(n=void 0,I3e(d)),u;u=yield E1(l.next()),r=u.done,!r;c=!0)s=u.value,c=!1,yield yield E1(s)}catch(p){n={error:p}}finally{try{!c&&!r&&(o=l.return)&&(yield E1(o.call(l)))}finally{if(n)throw n.error}}})})())}}a(jLr,"concat");function HUi(){return`----AzSDKFormBoundary${mte()}`}a(HUi,"generateBoundary");function jUi(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r +`;return e}a(jUi,"encodeHeaders");function $Ui(t){return t instanceof Uint8Array?t.byteLength:v3e(t)?t.size===-1?void 0:t.size:void 0}a($Ui,"getLength");function VUi(t){let e=0;for(let r of t){let n=$Ui(r);if(n===void 0)return;e+=n}return e}a(VUi,"getTotalLength");async function WUi(t,e,r){let n=[DE(`--${r}`,"utf-8"),...e.flatMap(s=>[DE(`\r +`,"utf-8"),DE(jUi(s.headers),"utf-8"),DE(`\r +`,"utf-8"),s.body,DE(`\r +--${r}`,"utf-8")]),DE(`--\r \r -${m}`}else s&&(d.timeout=s);let h=`${r.toUpperCase()} ${c.href} HTTP/1.1\r -Host: ${c.host}\r -Connection: close\r -`+p+`\r -`;return new Promise((m,g)=>{let A=UBe.default.request(d);s&&A.on("timeout",()=>{A.destroy(),g(new Error("Request time out"))}),A.end(),A.on("connect",(y,E)=>{let _=y?.statusCode||BBe.SERVER_ERROR;(_BBe.SUCCESS_RANGE_END)&&(A.destroy(),E.destroy(),g(new Error(`Error connecting to proxy. Http status code: ${y.statusCode}. Http status message: ${y?.statusMessage||"Unknown"}`))),E.write(h);let v=[];E.on("data",b=>{v.push(b)}),E.on("end",()=>{let I=Buffer.concat([...v]).toString().split(`\r -`),x=parseInt(I[0].split(" ")[1]),R=I[0].split(" ").slice(2).join(" "),w=I[I.length-1],P=I.slice(1,I.length-2),k=new Map;P.forEach(G=>{let O=G.split(new RegExp(/:\s(.*)/s)),N=O[0],F=O[1];try{let U=JSON.parse(F);U&&typeof U=="object"&&(F=U)}catch{}k.set(N,F)});let M=Object.fromEntries(k),D=Mte.getNetworkResponse(M,f5r(x,R,M,w),x);(xGi.SUCCESS_RANGE_END)&&D.body.error!==mp.AUTHORIZATION_PENDING&&A.destroy(),m(D)}),E.on("error",b=>{A.destroy(),E.destroy(),g(new Error(b.toString()))})}),A.on("error",y=>{A.destroy(),g(new Error(y.toString()))})})},"networkRequestViaProxy"),d5r=a((t,e,r,n,o)=>{let s=e===jl.POST,c=r?.body||"",l=new URL(t),u=r?.headers||{},d={method:e,headers:u,...Mte.urlToHttpOptions(l)};return n&&Object.keys(n).length&&(d.agent=new fvt.default.Agent(n)),s?d.headers={...d.headers,"Content-Length":c.length}:o&&(d.timeout=o),new Promise((p,h)=>{let m;d.protocol==="http:"?m=UBe.default.request(d):m=fvt.default.request(d),s&&m.write(c),o&&m.on("timeout",()=>{m.destroy(),h(new Error("Request time out"))}),m.end(),m.on("response",g=>{let A=g.headers,y=g.statusCode,E=g.statusMessage,_=[];g.on("data",v=>{_.push(v)}),g.on("end",()=>{let v=Buffer.concat([..._]).toString(),b=A,I=Mte.getNetworkResponse(b,f5r(y,E,b,v),y);(yGi.SUCCESS_RANGE_END)&&I.body.error!==mp.AUTHORIZATION_PENDING&&m.destroy(),p(I)})}),m.on("error",g=>{m.destroy(),h(new Error(g.toString()))})})},"networkRequestViaHttps"),f5r=a((t,e,r,n)=>{let o;try{o=JSON.parse(n)}catch{let c,l;t>=Gi.CLIENT_ERROR_RANGE_START&&t<=Gi.CLIENT_ERROR_RANGE_END?(c="client_error",l="A client"):t>=Gi.SERVER_ERROR_RANGE_START&&t<=Gi.SERVER_ERROR_RANGE_END?(c="server_error",l="A server"):(c="unknown_error",l="An unknown"),o={error:c,error_description:`${l} error occured. -Http status code: ${t} -Http status message: ${e||"Unknown"} -Headers: ${JSON.stringify(r)}`}}return o},"parseBody");f();f();f();var QBe="invalid_file_extension",qBe="invalid_file_path",W8="invalid_managed_identity_id_type",GBe="invalid_secret",p5r="missing_client_id",h5r="network_unavailable",HBe="platform_not_supported",jBe="unable_to_create_azure_arc",$Be="unable_to_create_cloud_shell",VBe="unable_to_create_source",cAe="unable_to_read_secret_file",m5r="user_assigned_not_available_at_runtime",WBe="www_authenticate_header_missing",zBe="www_authenticate_header_unsupported_format",VH={[Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST]:"azure_pod_identity_authority_host_url_malformed",[Ei.IDENTITY_ENDPOINT]:"identity_endpoint_url_malformed",[Ei.IMDS_ENDPOINT]:"imds_endpoint_url_malformed",[Ei.MSI_ENDPOINT]:"msi_endpoint_url_malformed"};var TOi={[QBe]:"The file path in the WWW-Authenticate header does not contain a .key file.",[qBe]:"The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",[W8]:"More than one ManagedIdentityIdType was provided.",[GBe]:"The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",[HBe]:"The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",[p5r]:"A ManagedIdentityId id was not provided.",[VH.AZURE_POD_IDENTITY_AUTHORITY_HOST]:`The Managed Identity's '${Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,[VH.IDENTITY_ENDPOINT]:`The Managed Identity's '${Ei.IDENTITY_ENDPOINT}' environment variable is malformed.`,[VH.IMDS_ENDPOINT]:`The Managed Identity's '${Ei.IMDS_ENDPOINT}' environment variable is malformed.`,[VH.MSI_ENDPOINT]:`The Managed Identity's '${Ei.MSI_ENDPOINT}' environment variable is malformed.`,[h5r]:"Authentication unavailable. The request to the managed identity endpoint timed out.",[jBe]:"Azure Arc Managed Identities can only be system assigned.",[$Be]:"Cloud Shell Managed Identities can only be system assigned.",[VBe]:"Unable to create a Managed Identity source based on environment variables.",[cAe]:"Unable to read the secret file.",[m5r]:"Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",[WBe]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",[zBe]:"A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format."},pvt=class t extends Hi{static{a(this,"ManagedIdentityError")}constructor(e){super(e,TOi[e]),this.name="ManagedIdentityError",Object.setPrototypeOf(this,t.prototype)}};function Af(t){return new pvt(t)}a(Af,"createManagedIdentityError");var YBe=class{static{a(this,"ManagedIdentityId")}get id(){return this._id}set id(e){this._id=e}get idType(){return this._idType}set idType(e){this._idType=e}constructor(e){let r=e?.userAssignedClientId,n=e?.userAssignedResourceId,o=e?.userAssignedObjectId;if(r){if(n||o)throw Af(W8);this.id=r,this.idType=ed.USER_ASSIGNED_CLIENT_ID}else if(n){if(r||o)throw Af(W8);this.id=n,this.idType=ed.USER_ASSIGNED_RESOURCE_ID}else if(o){if(r||n)throw Af(W8);this.id=o,this.idType=ed.USER_ASSIGNED_OBJECT_ID}else this.id=i5r,this.idType=ed.SYSTEM_ASSIGNED}};f();var rh={invalidLoopbackAddressType:{code:"invalid_loopback_server_address_type",desc:"Loopback server address is not type string. This is unexpected."},unableToLoadRedirectUri:{code:"unable_to_load_redirectUrl",desc:"Loopback server callback was invoked without a url. This is unexpected."},noAuthCodeInResponse:{code:"no_auth_code_in_response",desc:"No auth code found in the server response. Please check your network trace to determine what happened."},noLoopbackServerExists:{code:"no_loopback_server_exists",desc:"No loopback server exists yet."},loopbackServerAlreadyExists:{code:"loopback_server_already_exists",desc:"Loopback server already exists. Cannot create another."},loopbackServerTimeout:{code:"loopback_server_timeout",desc:"Timed out waiting for auth code listener to be registered."},stateNotFoundError:{code:"state_not_found",desc:"State not found. Please verify that the request originated from msal."},thumbprintMissing:{code:"thumbprint_missing_from_client_certificate",desc:"Client certificate does not contain a SHA-1 or SHA-256 thumbprint."}},QE=class t extends Hi{static{a(this,"NodeAuthError")}constructor(e,r){super(e,r),this.name="NodeAuthError"}static createInvalidLoopbackAddressTypeError(){return new t(rh.invalidLoopbackAddressType.code,`${rh.invalidLoopbackAddressType.desc}`)}static createUnableToLoadRedirectUrlError(){return new t(rh.unableToLoadRedirectUri.code,`${rh.unableToLoadRedirectUri.desc}`)}static createNoAuthCodeInResponseError(){return new t(rh.noAuthCodeInResponse.code,`${rh.noAuthCodeInResponse.desc}`)}static createNoLoopbackServerExistsError(){return new t(rh.noLoopbackServerExists.code,`${rh.noLoopbackServerExists.desc}`)}static createLoopbackServerAlreadyExistsError(){return new t(rh.loopbackServerAlreadyExists.code,`${rh.loopbackServerAlreadyExists.desc}`)}static createLoopbackServerTimeoutError(){return new t(rh.loopbackServerTimeout.code,`${rh.loopbackServerTimeout.desc}`)}static createStateNotFoundError(){return new t(rh.stateNotFoundError.code,rh.stateNotFoundError.desc)}static createThumbprintMissingError(){return new t(rh.thumbprintMissing.code,rh.thumbprintMissing.desc)}};var SOi={clientId:pt.EMPTY_STRING,authority:pt.DEFAULT_AUTHORITY,clientSecret:pt.EMPTY_STRING,clientAssertion:pt.EMPTY_STRING,clientCertificate:{thumbprint:pt.EMPTY_STRING,thumbprintSha256:pt.EMPTY_STRING,privateKey:pt.EMPTY_STRING,x5c:pt.EMPTY_STRING},knownAuthorities:[],cloudDiscoveryMetadata:pt.EMPTY_STRING,authorityMetadata:pt.EMPTY_STRING,clientCapabilities:[],protocolMode:Ng.AAD,azureCloudOptions:{azureCloudInstance:kM.None,tenant:pt.EMPTY_STRING},skipAuthorityMetadataCache:!1,encodeExtraQueryParams:!1},IOi={claimsBasedCachingEnabled:!1},hvt={loggerCallback:a(()=>{},"loggerCallback"),piiLoggingEnabled:!1,logLevel:Zu.Info},xOi={loggerOptions:hvt,networkClient:new Ote,proxyUrl:pt.EMPTY_STRING,customAgentOptions:{},disableInternalRetries:!1},wOi={application:{appName:pt.EMPTY_STRING,appVersion:pt.EMPTY_STRING}};function g5r({auth:t,broker:e,cache:r,system:n,telemetry:o}){let s={...xOi,networkClient:new Ote(n?.proxyUrl,n?.customAgentOptions),loggerOptions:n?.loggerOptions||hvt,disableInternalRetries:n?.disableInternalRetries||!1};if(t.clientCertificate&&!t.clientCertificate.thumbprint&&!t.clientCertificate.thumbprintSha256)throw QE.createStateNotFoundError();return{auth:{...SOi,...t},broker:{...e},cache:{...IOi,...r},system:{...s,...n},telemetry:{...wOi,...o}}}a(g5r,"buildAppConfiguration");function A5r({clientCapabilities:t,managedIdentityIdParams:e,system:r}){let n=new YBe(e),o=r?.loggerOptions||hvt,s;return r?.networkClient?s=r.networkClient:s=new Ote(r?.proxyUrl,r?.customAgentOptions),{clientCapabilities:t||[],managedIdentityId:n,system:{loggerOptions:o,networkClient:s},disableInternalRetries:r?.disableInternalRetries||!1}}a(A5r,"buildManagedIdentityConfiguration");f();f();f();f();var y5r=de(require("crypto"));var JBe=new Uint8Array(256),KBe=JBe.length;function mvt(){return KBe>JBe.length-16&&(y5r.default.randomFillSync(JBe),KBe=0),JBe.slice(KBe,KBe+=16)}a(mvt,"rng");f();f();f();var E5r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ROi(t){return typeof t=="string"&&E5r.test(t)}a(ROi,"validate");var C5r=ROi;var mm=[];for(let t=0;t<256;++t)mm.push((t+256).toString(16).substr(1));function POi(t,e=0){let r=(mm[t[e+0]]+mm[t[e+1]]+mm[t[e+2]]+mm[t[e+3]]+"-"+mm[t[e+4]]+mm[t[e+5]]+"-"+mm[t[e+6]]+mm[t[e+7]]+"-"+mm[t[e+8]]+mm[t[e+9]]+"-"+mm[t[e+10]]+mm[t[e+11]]+mm[t[e+12]]+mm[t[e+13]]+mm[t[e+14]]+mm[t[e+15]]).toLowerCase();if(!C5r(r))throw TypeError("Stringified UUID is invalid");return r}a(POi,"stringify");var _5r=POi;f();function kOi(t,e,r){t=t||{};let n=t.random||(t.rng||mvt)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let o=0;o<16;++o)e[r+o]=n[o];return e}return _5r(n)}a(kOi,"v4");var gvt=kOi;var Bte=class{static{a(this,"GuidGenerator")}generateGuid(){return gvt()}isGuid(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}};f();var x1=class t{static{a(this,"EncodingUtils")}static base64Encode(e,r){return Buffer.from(e,r).toString(dm.BASE64)}static base64EncodeUrl(e,r){return t.base64Encode(e,r).replace(/=/g,pt.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")}static base64Decode(e){return Buffer.from(e,dm.BASE64).toString("utf8")}static base64DecodeUrl(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4;)r+="=";return t.base64Decode(r)}};f();f();var v5r=de(require("crypto"),1);var z8=class{static{a(this,"HashUtils")}sha256(e){return v5r.default.createHash(c5r.SHA256).update(e).digest()}};var b5r=de(require("crypto"),1);var XBe=class{static{a(this,"PkceGenerator")}constructor(){this.hashUtils=new z8}async generatePkceCodes(){let e=this.generateCodeVerifier(),r=this.generateCodeChallengeFromVerifier(e);return{verifier:e,challenge:r}}generateCodeVerifier(){let e=[],r=256-256%LBe.CV_CHARSET.length;for(;e.length<=a5r;){let o=b5r.default.randomBytes(1)[0];if(o>=r)continue;let s=o%LBe.CV_CHARSET.length;e.push(LBe.CV_CHARSET[s])}let n=e.join(pt.EMPTY_STRING);return x1.base64EncodeUrl(n)}generateCodeChallengeFromVerifier(e){return x1.base64EncodeUrl(this.hashUtils.sha256(e).toString(dm.BASE64),dm.BASE64)}};var PP=class{static{a(this,"CryptoProvider")}constructor(){this.pkceGenerator=new XBe,this.guidGenerator=new Bte,this.hashUtils=new z8}base64UrlEncode(){throw new Error("Method not implemented.")}encodeKid(){throw new Error("Method not implemented.")}createNewGuid(){return this.guidGenerator.generateGuid()}base64Encode(e){return x1.base64Encode(e)}base64Decode(e){return x1.base64Decode(e)}generatePkceCodes(){return this.pkceGenerator.generatePkceCodes()}getPublicKeyThumbprint(){throw new Error("Method not implemented.")}removeTokenBindingKey(){throw new Error("Method not implemented.")}clearKeystore(){throw new Error("Method not implemented.")}signJwt(){throw new Error("Method not implemented.")}async hashString(e){return x1.base64EncodeUrl(this.hashUtils.sha256(e).toString(dm.BASE64),dm.BASE64)}};f();f();var Y8=class extends G8{static{a(this,"NodeStorage")}constructor(e,r,n,o){super(r,n,e,new OH,o),this.cache={},this.changeEmitters=[],this.logger=e}registerChangeEmitter(e){this.changeEmitters.push(e)}emitChange(){this.changeEmitters.forEach(e=>e.call(null))}cacheToInMemoryCache(e){let r={accounts:{},idTokens:{},accessTokens:{},refreshTokens:{},appMetadata:{}};for(let n in e){let o=e[n];if(typeof o=="object")if(o instanceof fm)r.accounts[n]=o;else if(hp.isIdTokenEntity(o))r.idTokens[n]=o;else if(hp.isAccessTokenEntity(o))r.accessTokens[n]=o;else if(hp.isRefreshTokenEntity(o))r.refreshTokens[n]=o;else if(hp.isAppMetadataEntity(n,o))r.appMetadata[n]=o;else continue}return r}inMemoryCacheToCache(e){let r=this.getCache();return r={...r,...e.accounts,...e.idTokens,...e.accessTokens,...e.refreshTokens,...e.appMetadata},r}getInMemoryCache(){return this.logger.trace("Getting in-memory cache"),this.cacheToInMemoryCache(this.getCache())}setInMemoryCache(e){this.logger.trace("Setting in-memory cache");let r=this.inMemoryCacheToCache(e);this.setCache(r),this.emitChange()}getCache(){return this.logger.trace("Getting cache key-value store"),this.cache}setCache(e){this.logger.trace("Setting cache key value store"),this.cache=e,this.emitChange()}getItem(e){return this.logger.tracePii(`Item key: ${e}`),this.getCache()[e]}setItem(e,r){this.logger.tracePii(`Item key: ${e}`);let n=this.getCache();n[e]=r,this.setCache(n)}getAccountKeys(){let e=this.getInMemoryCache();return Object.keys(e.accounts)}getTokenKeys(){let e=this.getInMemoryCache();return{idToken:Object.keys(e.idTokens),accessToken:Object.keys(e.accessTokens),refreshToken:Object.keys(e.refreshTokens)}}getAccount(e){return this.getItem(e)?Object.assign(new fm,this.getItem(e)):null}async setAccount(e){let r=e.generateAccountKey();this.setItem(r,e)}getIdTokenCredential(e){let r=this.getItem(e);return hp.isIdTokenEntity(r)?r:null}async setIdTokenCredential(e){let r=hp.generateCredentialKey(e);this.setItem(r,e)}getAccessTokenCredential(e){let r=this.getItem(e);return hp.isAccessTokenEntity(r)?r:null}async setAccessTokenCredential(e){let r=hp.generateCredentialKey(e);this.setItem(r,e)}getRefreshTokenCredential(e){let r=this.getItem(e);return hp.isRefreshTokenEntity(r)?r:null}async setRefreshTokenCredential(e){let r=hp.generateCredentialKey(e);this.setItem(r,e)}getAppMetadata(e){let r=this.getItem(e);return hp.isAppMetadataEntity(e,r)?r:null}setAppMetadata(e){let r=hp.generateAppMetadataKey(e);this.setItem(r,e)}getServerTelemetry(e){let r=this.getItem(e);return r&&hp.isServerTelemetryEntity(e,r)?r:null}setServerTelemetry(e,r){this.setItem(e,r)}getAuthorityMetadata(e){let r=this.getItem(e);return r&&hp.isAuthorityMetadataEntity(e,r)?r:null}getAuthorityMetadataKeys(){return this.getKeys().filter(e=>this.isAuthorityMetadata(e))}setAuthorityMetadata(e,r){this.setItem(e,r)}getThrottlingCache(e){let r=this.getItem(e);return r&&hp.isThrottlingEntity(e,r)?r:null}setThrottlingCache(e,r){this.setItem(e,r)}removeItem(e){this.logger.tracePii(`Item key: ${e}`);let r=!1,n=this.getCache();return n[e]&&(delete n[e],r=!0),r&&(this.setCache(n),this.emitChange()),r}removeOutdatedAccount(e){this.removeItem(e)}containsKey(e){return this.getKeys().includes(e)}getKeys(){this.logger.trace("Retrieving all cache keys");let e=this.getCache();return[...Object.keys(e)]}clear(){this.logger.trace("Clearing cache entries created by MSAL"),this.getKeys().forEach(r=>{this.removeItem(r)}),this.emitChange()}static generateInMemoryCache(e){return LM.deserializeAllCache(LM.deserializeJSONBlob(e))}static generateJsonCache(e){return N8.serializeAllCache(e)}updateCredentialCacheKey(e,r){let n=hp.generateCredentialKey(r);if(e!==n){let o=this.getItem(e);if(o)return this.removeItem(e),this.setItem(n,o),this.logger.verbose(`Updated an outdated ${r.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${r.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}};f();var lAe={Account:{},IdToken:{},AccessToken:{},RefreshToken:{},AppMetadata:{}},Lte=class{static{a(this,"TokenCache")}constructor(e,r,n){this.cacheHasChanged=!1,this.storage=e,this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this)),n&&(this.persistence=n),this.logger=r}hasChanged(){return this.cacheHasChanged}serialize(){this.logger.trace("Serializing in-memory cache");let e=N8.serializeAllCache(this.storage.getInMemoryCache());return this.cacheSnapshot?(this.logger.trace("Reading cache snapshot from disk"),e=this.mergeState(JSON.parse(this.cacheSnapshot),e)):this.logger.trace("No cache snapshot to merge"),this.cacheHasChanged=!1,JSON.stringify(e)}deserialize(e){if(this.logger.trace("Deserializing JSON to in-memory cache"),this.cacheSnapshot=e,this.cacheSnapshot){this.logger.trace("Reading cache snapshot from disk");let r=LM.deserializeAllCache(this.overlayDefaults(JSON.parse(this.cacheSnapshot)));this.storage.setInMemoryCache(r)}else this.logger.trace("No cache snapshot to deserialize")}getKVStore(){return this.storage.getCache()}getCacheSnapshot(){let e=Y8.generateInMemoryCache(this.cacheSnapshot);return this.storage.inMemoryCacheToCache(e)}async getAllAccounts(e=new PP().createNewGuid()){this.logger.trace("getAllAccounts called");let r;try{return this.persistence&&(r=new I1(this,!1),await this.persistence.beforeCacheAccess(r)),this.storage.getAllAccounts({},e)}finally{this.persistence&&r&&await this.persistence.afterCacheAccess(r)}}async getAccountByHomeId(e){let r=await this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.homeAccountId===e)[0]||null}async getAccountByLocalId(e){let r=await this.getAllAccounts();return e&&r&&r.length&&r.filter(n=>n.localAccountId===e)[0]||null}async removeAccount(e,r){this.logger.trace("removeAccount called");let n;try{this.persistence&&(n=new I1(this,!0),await this.persistence.beforeCacheAccess(n)),this.storage.removeAccount(fm.generateAccountCacheKey(e),r||new Bte().generateGuid())}finally{this.persistence&&n&&await this.persistence.afterCacheAccess(n)}}async overwriteCache(){if(!this.persistence){this.logger.info("No persistence layer specified, cache cannot be overwritten");return}this.logger.info("Overwriting in-memory cache with persistent cache"),this.storage.clear();let e=new I1(this,!1);await this.persistence.beforeCacheAccess(e);let r=this.getCacheSnapshot();this.storage.setCache(r),await this.persistence.afterCacheAccess(e)}handleChangeEvent(){this.cacheHasChanged=!0}mergeState(e,r){this.logger.trace("Merging in-memory cache with cache snapshot");let n=this.mergeRemovals(e,r);return this.mergeUpdates(n,r)}mergeUpdates(e,r){return Object.keys(r).forEach(n=>{let o=r[n];if(!e.hasOwnProperty(n))o!==null&&(e[n]=o);else{let s=o!==null,c=typeof o=="object",l=!Array.isArray(o),u=typeof e[n]<"u"&&e[n]!==null;s&&c&&l&&u?this.mergeUpdates(e[n],o):e[n]=o}}),e}mergeRemovals(e,r){this.logger.trace("Remove updated entries in cache");let n=e.Account?this.mergeRemovalsDict(e.Account,r.Account):e.Account,o=e.AccessToken?this.mergeRemovalsDict(e.AccessToken,r.AccessToken):e.AccessToken,s=e.RefreshToken?this.mergeRemovalsDict(e.RefreshToken,r.RefreshToken):e.RefreshToken,c=e.IdToken?this.mergeRemovalsDict(e.IdToken,r.IdToken):e.IdToken,l=e.AppMetadata?this.mergeRemovalsDict(e.AppMetadata,r.AppMetadata):e.AppMetadata;return{...e,Account:n,AccessToken:o,RefreshToken:s,IdToken:c,AppMetadata:l}}mergeRemovalsDict(e,r){let n={...e};return Object.keys(e).forEach(o=>{(!r||!r.hasOwnProperty(o))&&delete n[o]}),n}overlayDefaults(e){return this.logger.trace("Overlaying input cache with the default cache"),{Account:{...lAe.Account,...e.Account},IdToken:{...lAe.IdToken,...e.IdToken},AccessToken:{...lAe.AccessToken,...e.AccessToken},RefreshToken:{...lAe.RefreshToken,...e.RefreshToken},AppMetadata:{...lAe.AppMetadata,...e.AppMetadata}}}};f();var Z4r=de(X4r(),1);var UM=class t{static{a(this,"ClientAssertion")}static fromAssertion(e){let r=new t;return r.jwt=e,r}static fromCertificate(e,r,n){let o=new t;return o.privateKey=r,o.thumbprint=e,o.useSha256=!1,n&&(o.publicCertificate=this.parseCertificate(n)),o}static fromCertificateWithSha256Thumbprint(e,r,n){let o=new t;return o.privateKey=r,o.thumbprint=e,o.useSha256=!0,n&&(o.publicCertificate=this.parseCertificate(n)),o}getJwt(e,r,n){if(this.privateKey&&this.thumbprint)return this.jwt&&!this.isExpired()&&r===this.issuer&&n===this.jwtAudience?this.jwt:this.createJwt(e,r,n);if(this.jwt)return this.jwt;throw Rt(Cc.invalidAssertion)}createJwt(e,r,n){this.issuer=r,this.jwtAudience=n;let o=Hl.nowSeconds();this.expirationTime=o+600;let c={alg:this.useSha256?cT.PSS_256:cT.RSA_256},l=this.useSha256?cT.X5T_256:cT.X5T;Object.assign(c,{[l]:x1.base64EncodeUrl(this.thumbprint,dm.HEX)}),this.publicCertificate&&Object.assign(c,{[cT.X5C]:this.publicCertificate});let u={[cT.AUDIENCE]:this.jwtAudience,[cT.EXPIRATION_TIME]:this.expirationTime,[cT.ISSUER]:this.issuer,[cT.SUBJECT]:this.issuer,[cT.NOT_BEFORE]:o,[cT.JWT_ID]:e.createNewGuid()};return this.jwt=Z4r.default.sign(u,this.privateKey,{header:c}),this.jwt}isExpired(){return this.expirationTime0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.username&&Hr.addCcsUpn(r,e.username),pm.mapToQueryString(r)}};f();function eBr(t,e,r,n){let o=aAe.getStandardAuthorizeRequestParameters({...t.auth,authority:e,redirectUri:r.redirectUri||""},r,n);return Hr.addLibraryInfo(o,{sku:mp.MSAL_SKU,version:bx,cpu:process.arch||"",os:process.platform||""}),t.auth.protocolMode!==Ng.OIDC&&Hr.addApplicationTelemetry(o,t.telemetry.application),Hr.addResponseType(o,Cte.CODE),r.codeChallenge&&r.codeChallengeMethod&&Hr.addCodeChallengeParams(o,r.codeChallenge,r.codeChallengeMethod),Hr.addExtraQueryParameters(o,r.extraQueryParameters||{}),aAe.getAuthorizeUrl(e,o,t.auth.encodeExtraQueryParams,r.extraQueryParameters)}a(eBr,"getAuthCodeRequestUrl");var Z8=class{static{a(this,"ClientApplication")}constructor(e){this.config=g5r(e),this.cryptoProvider=new PP,this.logger=new b1(this.config.system.loggerOptions,w3e,bx),this.storage=new Y8(this.logger,this.config.auth.clientId,this.cryptoProvider,ivt(this.config.auth)),this.tokenCache=new Lte(this.storage,this.logger,this.config.cache.cachePlugin)}async getAuthCodeUrl(e){this.logger.info("getAuthCodeUrl called",e.correlationId);let r={...e,...await this.initializeBaseRequest(e),responseMode:e.responseMode||TP.QUERY,authenticationScheme:vs.BEARER,state:e.state||"",nonce:e.nonce||""},n=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions);return eBr(this.config,n,r,this.logger)}async acquireTokenByCode(e,r){this.logger.info("acquireTokenByCode called"),e.state&&r&&(this.logger.info("acquireTokenByCode - validating state"),this.validateState(e.state,r.state||""),r={...r,state:""});let n={...e,...await this.initializeBaseRequest(e),authenticationScheme:vs.BEARER},o=this.initializeServerTelemetryManager(FM.acquireTokenByCode,n.correlationId);try{let s=await this.createAuthority(n.authority,n.correlationId,void 0,e.azureCloudOptions),c=await this.buildOauthClientConfiguration(s,n.correlationId,n.redirectUri,o),l=new oAe(c);return this.logger.verbose("Auth code client created",n.correlationId),await l.acquireToken(n,r)}catch(s){throw s instanceof Hi&&s.setCorrelationId(n.correlationId),o.cacheFailedRequest(s),s}}async acquireTokenByRefreshToken(e){this.logger.info("acquireTokenByRefreshToken called",e.correlationId);let r={...e,...await this.initializeBaseRequest(e),authenticationScheme:vs.BEARER},n=this.initializeServerTelemetryManager(FM.acquireTokenByRefreshToken,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,r.redirectUri||"",n),c=new jH(s);return this.logger.verbose("Refresh token client created",r.correlationId),await c.acquireToken(r)}catch(o){throw o instanceof Hi&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireTokenSilent(e){let r={...e,...await this.initializeBaseRequest(e),forceRefresh:e.forceRefresh||!1},n=this.initializeServerTelemetryManager(FM.acquireTokenSilent,r.correlationId,r.forceRefresh);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,r.redirectUri||"",n),c=new sAe(s);this.logger.verbose("Silent flow client created",r.correlationId);try{return await this.tokenCache.overwriteCache(),await this.acquireCachedTokenSilent(r,c,s)}catch(l){if(l instanceof U8&&l.errorCode===Cc.tokenRefreshRequired)return new jH(s).acquireTokenByRefreshToken(r);throw l}}catch(o){throw o instanceof Hi&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireCachedTokenSilent(e,r,n){let[o,s]=await r.acquireCachedToken({...e,scopes:e.scopes?.length?e.scopes:[...BE]});if(s===Gc.PROACTIVELY_REFRESHED){this.logger.info("ClientApplication:acquireCachedTokenSilent - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");let c=new jH(n);try{await c.acquireTokenByRefreshToken(e)}catch{}}return o}async acquireTokenByUsernamePassword(e){this.logger.info("acquireTokenByUsernamePassword called",e.correlationId);let r={...e,...await this.initializeBaseRequest(e)},n=this.initializeServerTelemetryManager(FM.acquireTokenByUsernamePassword,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,"",n),c=new Wte(s);return this.logger.verbose("Username password client created",r.correlationId),await c.acquireToken(r)}catch(o){throw o instanceof Hi&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}getTokenCache(){return this.logger.info("getTokenCache called"),this.tokenCache}validateState(e,r){if(!e)throw QE.createStateNotFoundError();if(e!==r)throw Rt(Cc.stateMismatch)}getLogger(){return this.logger}setLogger(e){this.logger=e}async buildOauthClientConfiguration(e,r,n,o){return this.logger.verbose("buildOauthClientConfiguration called",r),this.logger.info(`Building oauth client configuration with the following authority: ${e.tokenEndpoint}.`,r),o?.updateRegionDiscoveryMetadata(e.regionDiscoveryMetadata),{authOptions:{clientId:this.config.auth.clientId,authority:e,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:n},loggerOptions:{logLevel:this.config.system.loggerOptions.logLevel,loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,correlationId:r},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.cryptoProvider,networkInterface:this.config.system.networkClient,storageInterface:this.storage,serverTelemetryManager:o,clientCredentials:{clientSecret:this.clientSecret,clientAssertion:await this.getClientAssertion(e)},libraryInfo:{sku:mp.MSAL_SKU,version:bx,cpu:process.arch||pt.EMPTY_STRING,os:process.platform||pt.EMPTY_STRING},telemetry:this.config.telemetry,persistencePlugin:this.config.cache.cachePlugin,serializableCache:this.tokenCache}}async getClientAssertion(e){return this.developerProvidedClientAssertion&&(this.clientAssertion=UM.fromAssertion(await ZA(this.developerProvidedClientAssertion,this.config.auth.clientId,e.tokenEndpoint))),this.clientAssertion&&{assertion:this.clientAssertion.getJwt(this.cryptoProvider,this.config.auth.clientId,e.tokenEndpoint),assertionType:mp.JWT_BEARER_ASSERTION_TYPE}}async initializeBaseRequest(e){return this.logger.verbose("initializeRequestScopes called",e.correlationId),e.authenticationScheme&&e.authenticationScheme===vs.POP&&this.logger.verbose("Authentication Scheme 'pop' is not supported yet, setting Authentication Scheme to 'Bearer' for request",e.correlationId),e.authenticationScheme=vs.BEARER,this.config.cache.claimsBasedCachingEnabled&&e.claims&&!Tu.isEmptyObj(e.claims)&&(e.requestedClaimsHash=await this.cryptoProvider.hashString(e.claims)),{...e,scopes:[...e&&e.scopes||[],...BE],correlationId:e&&e.correlationId||this.cryptoProvider.createNewGuid(),authority:e.authority||this.config.auth.authority}}initializeServerTelemetryManager(e,r,n){let o={clientId:this.config.auth.clientId,correlationId:r,apiId:e,forceRefresh:n||!1};return new $H(o,this.storage)}async createAuthority(e,r,n,o){this.logger.verbose("createAuthority called",r);let s=_x.generateAuthority(e,o||this.config.auth.azureCloudOptions),c={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,azureRegionConfiguration:n,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};return wBe.createDiscoveredInstance(s,this.config.system.networkClient,this.storage,c,this.logger,r)}clearCache(){this.storage.clear()}};f();var tBr=de(require("http"),1);var R3e=class{static{a(this,"LoopbackClient")}async listenForAuthCode(e,r){if(this.server)throw QE.createLoopbackServerAlreadyExistsError();return new Promise((n,o)=>{this.server=tBr.default.createServer((s,c)=>{let l=s.url;if(l){if(l===pt.FORWARD_SLASH){c.end(e||"Auth code was successfully acquired. You can close this window now.");return}}else{c.end(r||"Error occurred loading redirectUrl"),o(QE.createUnableToLoadRedirectUrlError());return}let u=this.getRedirectUri(),d=new URL(l,u),p=pm.getDeserializedResponse(d.search)||{};p.code&&(c.writeHead(Gi.REDIRECT,{location:u}),c.end()),p.error&&c.end(r||`Error occurred: ${p.error}`),n(p)}),this.server.listen(0,"127.0.0.1")})}getRedirectUri(){if(!this.server||!this.server.listening)throw QE.createNoLoopbackServerExistsError();let e=this.server.address();if(!e||typeof e=="string"||!e.port)throw this.closeServer(),QE.createInvalidLoopbackAddressTypeError();let r=e&&e.port;return`${mp.HTTP_PROTOCOL}${mp.LOCALHOST}:${r}`}closeServer(){this.server&&(this.server.close(),typeof this.server.closeAllConnections=="function"&&this.server.closeAllConnections(),this.server.unref(),this.server=void 0)}};f();var zte=class extends hm{static{a(this,"DeviceCodeClient")}constructor(e){super(e)}async acquireToken(e){let r=await this.getDeviceCode(e);e.deviceCodeCallback(r);let n=Hl.nowSeconds(),o=await this.acquireTokenWithDeviceCode(e,r),s=new gf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(o),s.handleServerTokenResponse(o,this.authority,n,e)}async getDeviceCode(e){let r=this.createExtraQueryParameters(e),n=jo.appendQueryString(this.authority.deviceCodeEndpoint,r),o=this.createQueryString(e),s=this.createTokenRequestHeaders(),c={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return this.executePostRequestToDeviceCodeEndpoint(n,o,s,c,e.correlationId)}createExtraQueryParameters(e){let r=new Map;return e.extraQueryParameters&&Hr.addExtraQueryParameters(r,e.extraQueryParameters),pm.mapToQueryString(r)}async executePostRequestToDeviceCodeEndpoint(e,r,n,o,s){let{body:{user_code:c,device_code:l,verification_uri:u,expires_in:d,interval:p,message:h}}=await this.sendPostRequest(o,e,{body:r,headers:n},s);return{userCode:c,deviceCode:l,verificationUri:u,expiresIn:d,interval:p,message:h}}createQueryString(e){let r=new Map;return Hr.addScopes(r,e.scopes),Hr.addClientId(r,this.config.authOptions.clientId),e.extraQueryParameters&&Hr.addExtraQueryParameters(r,e.extraQueryParameters),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),pm.mapToQueryString(r)}continuePolling(e,r,n){if(n)throw this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"),Rt(Cc.deviceCodePollingCancelled);if(r&&rr)throw this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${r}`),Rt(Cc.userTimeoutReached);if(Hl.nowSeconds()>e)throw r&&this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${r}`),this.logger.error(`Device code expired. Expiration time of device code was ${e}`),Rt(Cc.deviceCodeExpired);return!0}async acquireTokenWithDeviceCode(e,r){let n=this.createTokenQueryParameters(e),o=jo.appendQueryString(this.authority.tokenEndpoint,n),s=this.createTokenRequestBody(e,r),c=this.createTokenRequestHeaders(),l=e.timeout?Hl.nowSeconds()+e.timeout:void 0,u=Hl.nowSeconds()+r.expiresIn,d=r.interval*1e3;for(;this.continuePolling(u,l,e.cancel);){let p={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},h=await this.executePostToTokenEndpoint(o,s,c,p,e.correlationId);if(h.body&&h.body.error)if(h.body.error===pt.AUTHORIZATION_PENDING)this.logger.info("Authorization pending. Continue polling."),await Hl.delay(d);else throw this.logger.info("Unexpected error in polling from the server"),J_t(bte.postRequestFailed,h.body.error);else return this.logger.verbose("Authorization completed successfully. Polling stopped."),h.body}throw this.logger.error("Polling stopped for unknown reasons."),Rt(Cc.deviceCodeUnknownError)}createTokenRequestBody(e,r){let n=new Map;Hr.addScopes(n,e.scopes),Hr.addClientId(n,this.config.authOptions.clientId),Hr.addGrantType(n,FE.DEVICE_CODE_GRANT),Hr.addDeviceCode(n,r.deviceCode);let o=e.correlationId||this.config.cryptoInterface.createNewGuid();return Hr.addCorrelationId(n,o),Hr.addClientInfo(n),Hr.addLibraryInfo(n,this.config.libraryInfo),Hr.addApplicationTelemetry(n,this.config.telemetry.application),Hr.addThrottling(n),this.serverTelemetryManager&&Hr.addServerTelemetry(n,this.serverTelemetryManager),(!Tu.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(n,e.claims,this.config.authOptions.clientCapabilities),pm.mapToQueryString(n)}};var Yte=class extends Z8{static{a(this,"PublicClientApplication")}constructor(e){super(e),this.config.broker.nativeBrokerPlugin&&(this.config.broker.nativeBrokerPlugin.isBrokerAvailable?(this.nativeBrokerPlugin=this.config.broker.nativeBrokerPlugin,this.nativeBrokerPlugin.setLogger(this.config.system.loggerOptions)):this.logger.warning("NativeBroker implementation was provided but the broker is unavailable.")),this.skus=$H.makeExtraSkuString({libraryName:mp.MSAL_SKU,libraryVersion:bx})}async acquireTokenByDeviceCode(e){this.logger.info("acquireTokenByDeviceCode called",e.correlationId);let r=Object.assign(e,await this.initializeBaseRequest(e)),n=this.initializeServerTelemetryManager(FM.acquireTokenByDeviceCode,r.correlationId);try{let o=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),s=await this.buildOauthClientConfiguration(o,r.correlationId,"",n),c=new zte(s);return this.logger.verbose("Device code client created",r.correlationId),await c.acquireToken(r)}catch(o){throw o instanceof Hi&&o.setCorrelationId(r.correlationId),n.cacheFailedRequest(o),o}}async acquireTokenInteractive(e){let r=e.correlationId||this.cryptoProvider.createNewGuid();this.logger.trace("acquireTokenInteractive called",r);let{openBrowser:n,successTemplate:o,errorTemplate:s,windowHandle:c,loopbackClient:l,...u}=e;if(this.nativeBrokerPlugin){let A={...u,clientId:this.config.auth.clientId,scopes:e.scopes||BE,redirectUri:`${mp.HTTP_PROTOCOL}${mp.LOCALHOST}`,authority:e.authority||this.config.auth.authority,correlationId:r,extraParameters:{...u.extraQueryParameters,...u.tokenQueryParameters,[BH.X_CLIENT_EXTRA_SKU]:this.skus},accountId:u.account?.nativeAccountId};return this.nativeBrokerPlugin.acquireTokenInteractive(A,c)}let{verifier:d,challenge:p}=await this.cryptoProvider.generatePkceCodes(),h=l||new R3e,m={},g=null;try{let A=h.listenForAuthCode(o,s).then(I=>{m=I}).catch(I=>{g=I}),y=await this.waitForRedirectUri(h),E={...u,correlationId:r,scopes:e.scopes||BE,redirectUri:y,responseMode:TP.QUERY,codeChallenge:p,codeChallengeMethod:cBe.S256},_=await this.getAuthCodeUrl(E);if(await n(_),await A,g)throw g;if(m.error)throw new XA(m.error,m.error_description,m.suberror);if(!m.code)throw QE.createNoAuthCodeInResponseError();let v=m.client_info,b={code:m.code,codeVerifier:d,clientInfo:v||pt.EMPTY_STRING,...E};return await this.acquireTokenByCode(b)}finally{h.closeServer()}}async acquireTokenSilent(e){let r=e.correlationId||this.cryptoProvider.createNewGuid();if(this.logger.trace("acquireTokenSilent called",r),this.nativeBrokerPlugin){let n={...e,clientId:this.config.auth.clientId,scopes:e.scopes||BE,redirectUri:`${mp.HTTP_PROTOCOL}${mp.LOCALHOST}`,authority:e.authority||this.config.auth.authority,correlationId:r,extraParameters:{...e.tokenQueryParameters,[BH.X_CLIENT_EXTRA_SKU]:this.skus},accountId:e.account.nativeAccountId,forceRefresh:e.forceRefresh||!1};return this.nativeBrokerPlugin.acquireTokenSilent(n)}return super.acquireTokenSilent(e)}async signOut(e){if(this.nativeBrokerPlugin&&e.account.nativeAccountId){let r={clientId:this.config.auth.clientId,accountId:e.account.nativeAccountId,correlationId:e.correlationId||this.cryptoProvider.createNewGuid()};await this.nativeBrokerPlugin.signOut(r)}await this.getTokenCache().removeAccount(e.account,e.correlationId)}async getAllAccounts(){if(this.nativeBrokerPlugin){let e=this.cryptoProvider.createNewGuid();return this.nativeBrokerPlugin.getAllAccounts(this.config.auth.clientId,e)}return this.getTokenCache().getAllAccounts()}async waitForRedirectUri(e){return new Promise((r,n)=>{let o=0,s=setInterval(()=>{if(FBe.TIMEOUT_MS/FBe.INTERVAL_MS1)throw Rt(Cc.multipleMatchingTokens);return l[0]}async executeTokenRequest(e,r,n){let o,s;if(this.appTokenProvider){this.logger.info("Using appTokenProvider extensibility.");let u={correlationId:e.correlationId,tenantId:this.config.authOptions.authority.tenant,scopes:e.scopes,claims:e.claims};s=Hl.nowSeconds();let d=await this.appTokenProvider(u);o={access_token:d.accessToken,expires_in:d.expiresInSeconds,refresh_in:d.refreshInSeconds,token_type:vs.BEARER}}else{let u=this.createTokenQueryParameters(e),d=jo.appendQueryString(r.tokenEndpoint,u),p=await this.createTokenRequestBody(e),h=this.createTokenRequestHeaders(),m={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};this.logger.info("Sending token request to endpoint: "+r.tokenEndpoint),s=Hl.nowSeconds();let g=await this.executePostToTokenEndpoint(d,p,h,m,e.correlationId);o=g.body,o.status=g.status}let c=new gf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return c.validateTokenResponse(o,n),await c.handleServerTokenResponse(o,this.authority,s,e)}async createTokenRequestBody(e){let r=new Map;Hr.addClientId(r,this.config.authOptions.clientId),Hr.addScopes(r,e.scopes,!1),Hr.addGrantType(r,FE.CLIENT_CREDENTIALS_GRANT),Hr.addLibraryInfo(r,this.config.libraryInfo),Hr.addApplicationTelemetry(r,this.config.telemetry.application),Hr.addThrottling(r),this.serverTelemetryManager&&Hr.addServerTelemetry(r,this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();Hr.addCorrelationId(r,n),this.config.clientCredentials.clientSecret&&Hr.addClientSecret(r,this.config.clientCredentials.clientSecret);let o=e.clientAssertion||this.config.clientCredentials.clientAssertion;return o&&(Hr.addClientAssertion(r,await ZA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Hr.addClientAssertionType(r,o.assertionType)),(!Tu.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),pm.mapToQueryString(r)}};f();var Kte=class extends hm{static{a(this,"OnBehalfOfClient")}constructor(e){super(e)}async acquireToken(e){if(this.scopeSet=new o0(e.scopes||[]),this.userAssertionHash=await this.cryptoUtils.hashString(e.oboAssertion),e.skipCache||e.claims)return this.executeTokenRequest(e,this.authority,this.userAssertionHash);try{return await this.getCachedAuthenticationResult(e)}catch{return await this.executeTokenRequest(e,this.authority,this.userAssertionHash)}}async getCachedAuthenticationResult(e){let r=this.readAccessTokenFromCacheForOBO(this.config.authOptions.clientId,e);if(r){if(Hl.isTokenExpired(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.serverTelemetryManager?.setCacheOutcome(Gc.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info(`OnbehalfofFlow:getCachedAuthenticationResult - Cached access token is expired or will expire within ${this.config.systemOptions.tokenRenewalOffsetSeconds} seconds.`),Rt(Cc.tokenRefreshRequired)}else throw this.serverTelemetryManager?.setCacheOutcome(Gc.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),Rt(Cc.tokenRefreshRequired);let n=this.readIdTokenFromCacheForOBO(r.homeAccountId,e.correlationId),o,s=null;if(n){o=fBe.extractTokenClaims(n.secret,x1.base64Decode);let c=o.oid||o.sub,l={homeAccountId:n.homeAccountId,environment:n.environment,tenantId:n.realm,username:pt.EMPTY_STRING,localAccountId:c||pt.EMPTY_STRING};s=this.cacheManager.readAccountFromCache(l,e.correlationId)}return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),gf.generateAuthenticationResult(this.cryptoUtils,this.authority,{account:s,accessToken:r,idToken:n,refreshToken:null,appMetadata:null},!0,e,o)}readIdTokenFromCacheForOBO(e,r){let n={homeAccountId:e,environment:this.authority.canonicalAuthorityUrlComponents.HostNameAndPort,credentialType:Zs.ID_TOKEN,clientId:this.config.authOptions.clientId,realm:this.authority.tenant},o=this.cacheManager.getIdTokensByFilter(n,r);return Object.values(o).length<1?null:Object.values(o)[0]}readAccessTokenFromCacheForOBO(e,r){let n=r.authenticationScheme||vs.BEARER,s={credentialType:n&&n.toLowerCase()!==vs.BEARER.toLowerCase()?Zs.ACCESS_TOKEN_WITH_AUTH_SCHEME:Zs.ACCESS_TOKEN,clientId:e,target:o0.createSearchScopes(this.scopeSet.asArray()),tokenType:n,keyId:r.sshKid,requestedClaimsHash:r.requestedClaimsHash,userAssertionHash:this.userAssertionHash},c=this.cacheManager.getAccessTokensByFilter(s,r.correlationId),l=c.length;if(l<1)return null;if(l>1)throw Rt(Cc.multipleMatchingTokens);return c[0]}async executeTokenRequest(e,r,n){let o=this.createTokenQueryParameters(e),s=jo.appendQueryString(r.tokenEndpoint,o),c=await this.createTokenRequestBody(e),l=this.createTokenRequestHeaders(),u={clientId:this.config.authOptions.clientId,authority:e.authority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid},d=Hl.nowSeconds(),p=await this.executePostToTokenEndpoint(s,c,l,u,e.correlationId),h=new gf(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return h.validateTokenResponse(p.body),await h.handleServerTokenResponse(p.body,this.authority,d,e,void 0,n)}async createTokenRequestBody(e){let r=new Map;Hr.addClientId(r,this.config.authOptions.clientId),Hr.addScopes(r,e.scopes),Hr.addGrantType(r,FE.JWT_BEARER),Hr.addClientInfo(r),Hr.addLibraryInfo(r,this.config.libraryInfo),Hr.addApplicationTelemetry(r,this.config.telemetry.application),Hr.addThrottling(r),this.serverTelemetryManager&&Hr.addServerTelemetry(r,this.serverTelemetryManager);let n=e.correlationId||this.config.cryptoInterface.createNewGuid();Hr.addCorrelationId(r,n),Hr.addRequestTokenUse(r,BH.ON_BEHALF_OF),Hr.addOboAssertion(r,e.oboAssertion),this.config.clientCredentials.clientSecret&&Hr.addClientSecret(r,this.config.clientCredentials.clientSecret);let o=this.config.clientCredentials.clientAssertion;return o&&(Hr.addClientAssertion(r,await ZA(o.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Hr.addClientAssertionType(r,o.assertionType)),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Hr.addClaims(r,e.claims,this.config.authOptions.clientCapabilities),pm.mapToQueryString(r)}};var Jte=class extends Z8{static{a(this,"ConfidentialClientApplication")}constructor(e){super(e);let r=!!this.config.auth.clientSecret,n=!!this.config.auth.clientAssertion,o=(!!this.config.auth.clientCertificate?.thumbprint||!!this.config.auth.clientCertificate?.thumbprintSha256)&&!!this.config.auth.clientCertificate?.privateKey;if(!this.appTokenProvider){if(r&&n||n&&o||r&&o)throw Rt(Cc.invalidClientCredential);if(this.config.auth.clientSecret){this.clientSecret=this.config.auth.clientSecret;return}if(this.config.auth.clientAssertion){this.developerProvidedClientAssertion=this.config.auth.clientAssertion;return}if(o)this.clientAssertion=this.config.auth.clientCertificate.thumbprintSha256?UM.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c):UM.fromCertificate(this.config.auth.clientCertificate.thumbprint,this.config.auth.clientCertificate.privateKey,this.config.auth.clientCertificate.x5c);else throw Rt(Cc.invalidClientCredential);this.appTokenProvider=void 0}}SetAppTokenProvider(e){this.appTokenProvider=e}async acquireTokenByClientCredential(e){this.logger.info("acquireTokenByClientCredential called",e.correlationId);let r;e.clientAssertion&&(r={assertion:await ZA(e.clientAssertion,this.config.auth.clientId),assertionType:mp.JWT_BEARER_ASSERTION_TYPE});let n=await this.initializeBaseRequest(e),o={...n,scopes:n.scopes.filter(m=>!BE.includes(m))},s={...e,...o,clientAssertion:r},l=new jo(s.authority).getUrlComponents().PathSegments[0];if(Object.values(LE).includes(l))throw Rt(Cc.missingTenantIdError);let u=process.env[s5r],d;s.azureRegion!=="DisableMsalForceRegion"&&(!s.azureRegion&&u?d=u:d=s.azureRegion);let p={azureRegion:d,environmentRegion:process.env[o5r]},h=this.initializeServerTelemetryManager(FM.acquireTokenByClientCredential,s.correlationId,s.skipCache);try{let m=await this.createAuthority(s.authority,s.correlationId,p,e.azureCloudOptions),g=await this.buildOauthClientConfiguration(m,s.correlationId,"",h),A=new e6(g,this.appTokenProvider);return this.logger.verbose("Client credential client created",s.correlationId),await A.acquireToken(s)}catch(m){throw m instanceof Hi&&m.setCorrelationId(s.correlationId),h.cacheFailedRequest(m),m}}async acquireTokenOnBehalfOf(e){this.logger.info("acquireTokenOnBehalfOf called",e.correlationId);let r={...e,...await this.initializeBaseRequest(e)};try{let n=await this.createAuthority(r.authority,r.correlationId,void 0,e.azureCloudOptions),o=await this.buildOauthClientConfiguration(n,r.correlationId,"",void 0),s=new Kte(o);return this.logger.verbose("On behalf of client created",r.correlationId),await s.acquireToken(r)}catch(n){throw n instanceof Hi&&n.setCorrelationId(r.correlationId),n}}};f();f();f();f();f();function rBr(t){if(typeof t!="string")return!1;let e=new Date(t);return!isNaN(e.getTime())&&e.toISOString()===t}a(rBr,"isIso8601");f();var P3e=class{static{a(this,"HttpClientWithRetries")}constructor(e,r,n){this.httpClientNoRetries=e,this.retryPolicy=r,this.logger=n}async sendNetworkRequestAsyncHelper(e,r,n){return e===jl.GET?this.httpClientNoRetries.sendGetRequestAsync(r,n):this.httpClientNoRetries.sendPostRequestAsync(r,n)}async sendNetworkRequestAsync(e,r,n){let o=await this.sendNetworkRequestAsyncHelper(e,r,n);"isNewRequest"in this.retryPolicy&&(this.retryPolicy.isNewRequest=!0);let s=0;for(;await this.retryPolicy.pauseForRetry(o.status,s,this.logger,o.headers[sl.RETRY_AFTER]);)o=await this.sendNetworkRequestAsyncHelper(e,r,n),s++;return o}async sendGetRequestAsync(e,r){return this.sendNetworkRequestAsync(jl.GET,e,r)}async sendPostRequestAsync(e,r){return this.sendNetworkRequestAsync(jl.POST,e,r)}};var KH={MANAGED_IDENTITY_CLIENT_ID_2017:"clientid",MANAGED_IDENTITY_CLIENT_ID:"client_id",MANAGED_IDENTITY_OBJECT_ID:"object_id",MANAGED_IDENTITY_RESOURCE_ID_IMDS:"msi_res_id",MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS:"mi_res_id"},ry=class{static{a(this,"BaseManagedIdentitySource")}constructor(e,r,n,o,s){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=o,this.disableInternalRetries=s}async getServerTokenResponseAsync(e,r,n,o){return this.getServerTokenResponse(e)}getServerTokenResponse(e){let r,n;return e.body.expires_on&&(rBr(e.body.expires_on)&&(e.body.expires_on=new Date(e.body.expires_on).getTime()/1e3),n=e.body.expires_on-Hl.nowSeconds(),n>2*3600&&(r=n/2)),{status:e.status,access_token:e.body.access_token,expires_in:n,scope:e.body.resource,token_type:e.body.token_type,refresh_in:r,correlation_id:e.body.correlation_id||e.body.correlationId,error:typeof e.body.error=="string"?e.body.error:e.body.error?.code,error_description:e.body.message||(typeof e.body.error=="string"?e.body.error_description:e.body.error?.message),error_codes:e.body.error_codes,timestamp:e.body.timestamp,trace_id:e.body.trace_id}}async acquireTokenWithManagedIdentity(e,r,n,o){let s=this.createRequest(e.resource,r);if(e.revokedTokenSha256Hash&&(this.logger.info(`[Managed Identity] The following claims are present in the request: ${e.claims}`),s.queryParameters[s0.SHA256_TOKEN_TO_REFRESH]=e.revokedTokenSha256Hash),e.clientCapabilities?.length){let g=e.clientCapabilities.toString();this.logger.info(`[Managed Identity] The following client capabilities are present in the request: ${g}`),s.queryParameters[s0.XMS_CC]=g}let c=s.headers;c[sl.CONTENT_TYPE]=pt.URL_FORM_CONTENT_TYPE;let l={headers:c};Object.keys(s.bodyParameters).length&&(l.body=s.computeParametersBodyString());let u=this.disableInternalRetries?this.networkClient:new P3e(this.networkClient,s.retryPolicy,this.logger),d=Hl.nowSeconds(),p;try{s.httpMethod===jl.POST?p=await u.sendPostRequestAsync(s.computeUri(),l):p=await u.sendGetRequestAsync(s.computeUri(),l)}catch(g){throw g instanceof Hi?g:Rt(Cc.networkError)}let h=new gf(r.id,this.nodeStorage,this.cryptoProvider,this.logger,null,null),m=await this.getServerTokenResponseAsync(p,u,s,l);return h.validateTokenResponse(m,o),h.handleServerTokenResponse(m,n,d,e)}getManagedIdentityUserAssignedIdQueryParameterKey(e,r,n){switch(e){case ed.USER_ASSIGNED_CLIENT_ID:return this.logger.info(`[Managed Identity] [API version ${n?"2017+":"2019+"}] Adding user assigned client id to the request.`),n?KH.MANAGED_IDENTITY_CLIENT_ID_2017:KH.MANAGED_IDENTITY_CLIENT_ID;case ed.USER_ASSIGNED_RESOURCE_ID:return this.logger.info("[Managed Identity] Adding user assigned resource id to the request."),r?KH.MANAGED_IDENTITY_RESOURCE_ID_IMDS:KH.MANAGED_IDENTITY_RESOURCE_ID_NON_IMDS;case ed.USER_ASSIGNED_OBJECT_ID:return this.logger.info("[Managed Identity] Adding user assigned object id to the request."),KH.MANAGED_IDENTITY_OBJECT_ID;default:throw Af(W8)}}};ry.getValidatedEnvVariableUrlString=(t,e,r,n)=>{try{return new jo(e).urlString}catch{throw n.info(`[Managed Identity] ${r} managed identity is unavailable because the '${t}' environment variable is malformed.`),Af(VH[t])}};f();f();f();var k3e=class{static{a(this,"LinearRetryStrategy")}calculateDelay(e,r){if(!e)return r;let n=Math.round(parseFloat(e)*1e3);return isNaN(n)&&(n=new Date(e).valueOf()-new Date().valueOf()),Math.max(r,n)}};var B6i=3,L6i=1e3,F6i=[Gi.NOT_FOUND,Gi.REQUEST_TIMEOUT,Gi.TOO_MANY_REQUESTS,Gi.SERVER_ERROR,Gi.SERVICE_UNAVAILABLE,Gi.GATEWAY_TIMEOUT],N3e=class t{static{a(this,"DefaultManagedIdentityRetryPolicy")}constructor(){this.linearRetryStrategy=new k3e}static get DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS(){return L6i}async pauseForRetry(e,r,n,o){if(F6i.includes(e)&&rsetTimeout(c,s)),!0}return!1}};var GE=class{static{a(this,"ManagedIdentityRequestParameters")}constructor(e,r,n){this.httpMethod=e,this._baseEndpoint=r,this.headers={},this.bodyParameters={},this.queryParameters={},this.retryPolicy=n||new N3e}computeUri(){let e=new Map;this.queryParameters&&Hr.addExtraQueryParameters(e,this.queryParameters);let r=pm.mapToQueryString(e);return jo.appendQueryString(this._baseEndpoint,r)}computeParametersBodyString(){let e=new Map;return this.bodyParameters&&Hr.addExtraQueryParameters(e,this.bodyParameters),pm.mapToQueryString(e)}};var U6i="2019-08-01",_Ae=class t extends ry{static{a(this,"AppService")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.identityEndpoint=c,this.identityHeader=l}static getEnvironmentVariables(){let e=process.env[Ei.IDENTITY_ENDPOINT],r=process.env[Ei.IDENTITY_HEADER];return[e,r]}static tryCreate(e,r,n,o,s){let[c,l]=t.getEnvironmentVariables();if(!c||!l)return e.info(`[Managed Identity] ${Ni.APP_SERVICE} managed identity is unavailable because one or both of the '${Ei.IDENTITY_HEADER}' and '${Ei.IDENTITY_ENDPOINT}' environment variables are not defined.`),null;let u=t.getValidatedEnvVariableUrlString(Ei.IDENTITY_ENDPOINT,c,Ni.APP_SERVICE,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Ni.APP_SERVICE} managed identity. Endpoint URI: ${u}. Creating ${Ni.APP_SERVICE} managed identity.`),new t(e,r,n,o,s,c,l)}createRequest(e,r){let n=new GE(jl.GET,this.identityEndpoint);return n.headers[UE.APP_SERVICE_SECRET_HEADER_NAME]=this.identityHeader,n.queryParameters[s0.API_VERSION]=U6i,n.queryParameters[s0.RESOURCE]=e,r.idType!==ed.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};f();var QM=require("fs"),sBr=de(require("path"),1);var Q6i="2019-11-01",nBr="http://127.0.0.1:40342/metadata/identity/oauth2/token",iBr="N/A: himds executable exists",oBr={win32:`${process.env.ProgramData}\\AzureConnectedMachineAgent\\Tokens\\`,linux:"/var/opt/azcmagent/tokens/"},q6i={win32:`${process.env.ProgramFiles}\\AzureConnectedMachineAgent\\himds.exe`,linux:"/opt/azcmagent/bin/himds"},vAe=class t extends ry{static{a(this,"AzureArc")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.identityEndpoint=c}static getEnvironmentVariables(){let e=process.env[Ei.IDENTITY_ENDPOINT],r=process.env[Ei.IMDS_ENDPOINT];if(!e||!r){let n=q6i[process.platform];try{(0,QM.accessSync)(n,QM.constants.F_OK|QM.constants.R_OK),e=nBr,r=iBr}catch{}}return[e,r]}static tryCreate(e,r,n,o,s,c){let[l,u]=t.getEnvironmentVariables();if(!l||!u)return e.info(`[Managed Identity] ${Ni.AZURE_ARC} managed identity is unavailable through environment variables because one or both of '${Ei.IDENTITY_ENDPOINT}' and '${Ei.IMDS_ENDPOINT}' are not defined. ${Ni.AZURE_ARC} managed identity is also unavailable through file detection.`),null;if(u===iBr)e.info(`[Managed Identity] ${Ni.AZURE_ARC} managed identity is available through file detection. Defaulting to known ${Ni.AZURE_ARC} endpoint: ${nBr}. Creating ${Ni.AZURE_ARC} managed identity.`);else{let d=t.getValidatedEnvVariableUrlString(Ei.IDENTITY_ENDPOINT,l,Ni.AZURE_ARC,e);d.endsWith("/")&&d.slice(0,-1),t.getValidatedEnvVariableUrlString(Ei.IMDS_ENDPOINT,u,Ni.AZURE_ARC,e),e.info(`[Managed Identity] Environment variables validation passed for ${Ni.AZURE_ARC} managed identity. Endpoint URI: ${d}. Creating ${Ni.AZURE_ARC} managed identity.`)}if(c.idType!==ed.SYSTEM_ASSIGNED)throw Af(jBe);return new t(e,r,n,o,s,l)}createRequest(e){let r=new GE(jl.GET,this.identityEndpoint.replace("localhost","127.0.0.1"));return r.headers[UE.METADATA_HEADER_NAME]="true",r.queryParameters[s0.API_VERSION]=Q6i,r.queryParameters[s0.RESOURCE]=e,r}async getServerTokenResponseAsync(e,r,n,o){let s;if(e.status===Gi.UNAUTHORIZED){let c=e.headers["www-authenticate"];if(!c)throw Af(WBe);if(!c.includes("Basic realm="))throw Af(zBe);let l=c.split("Basic realm=")[1];if(!oBr.hasOwnProperty(process.platform))throw Af(HBe);let u=oBr[process.platform],d=sBr.default.basename(l);if(!d.endsWith(".key"))throw Af(QBe);if(u+d!==l)throw Af(qBe);let p;try{p=await(0,QM.statSync)(l).size}catch{throw Af(cAe)}if(p>l5r)throw Af(GBe);let h;try{h=(0,QM.readFileSync)(l,dm.UTF8)}catch{throw Af(cAe)}let m=`Basic ${h}`;this.logger.info("[Managed Identity] Adding authorization header to the request."),n.headers[UE.AUTHORIZATION_HEADER_NAME]=m;try{s=await r.sendGetRequestAsync(n.computeUri(),o)}catch(g){throw g instanceof Hi?g:Rt(Cc.networkError)}}return this.getServerTokenResponse(s||e)}};f();var bAe=class t extends ry{static{a(this,"CloudShell")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.msiEndpoint=c}static getEnvironmentVariables(){return[process.env[Ei.MSI_ENDPOINT]]}static tryCreate(e,r,n,o,s,c){let[l]=t.getEnvironmentVariables();if(!l)return e.info(`[Managed Identity] ${Ni.CLOUD_SHELL} managed identity is unavailable because the '${Ei.MSI_ENDPOINT} environment variable is not defined.`),null;let u=t.getValidatedEnvVariableUrlString(Ei.MSI_ENDPOINT,l,Ni.CLOUD_SHELL,e);if(e.info(`[Managed Identity] Environment variable validation passed for ${Ni.CLOUD_SHELL} managed identity. Endpoint URI: ${u}. Creating ${Ni.CLOUD_SHELL} managed identity.`),c.idType!==ed.SYSTEM_ASSIGNED)throw Af($Be);return new t(e,r,n,o,s,l)}createRequest(e){let r=new GE(jl.POST,this.msiEndpoint);return r.headers[UE.METADATA_HEADER_NAME]="true",r.bodyParameters[s0.RESOURCE]=e,r}};f();f();f();var D3e=class{static{a(this,"ExponentialRetryStrategy")}constructor(e,r,n){this.minExponentialBackoff=e,this.maxExponentialBackoff=r,this.exponentialDeltaBackoff=n}calculateDelay(e){return e===0?this.minExponentialBackoff:Math.min(Math.pow(2,e-1)*this.exponentialDeltaBackoff,this.maxExponentialBackoff)}};var G6i=[Gi.NOT_FOUND,Gi.REQUEST_TIMEOUT,Gi.GONE,Gi.TOO_MANY_REQUESTS],H6i=3,j6i=7,$6i=1e3,V6i=4e3,W6i=2e3,z6i=10*1e3,M3e=class t{static{a(this,"ImdsRetryPolicy")}constructor(){this.exponentialRetryStrategy=new D3e(t.MIN_EXPONENTIAL_BACKOFF_MS,t.MAX_EXPONENTIAL_BACKOFF_MS,t.EXPONENTIAL_DELTA_BACKOFF_MS)}static get MIN_EXPONENTIAL_BACKOFF_MS(){return $6i}static get MAX_EXPONENTIAL_BACKOFF_MS(){return V6i}static get EXPONENTIAL_DELTA_BACKOFF_MS(){return W6i}static get HTTP_STATUS_GONE_RETRY_AFTER_MS(){return z6i}set isNewRequest(e){this._isNewRequest=e}async pauseForRetry(e,r,n){if(this._isNewRequest&&(this._isNewRequest=!1,this.maxRetries=e===Gi.GONE?j6i:H6i),(G6i.includes(e)||e>=Gi.SERVER_ERROR_RANGE_START&&e<=Gi.SERVER_ERROR_RANGE_END&&rsetTimeout(s,o)),!0}return!1}};var aBr="/metadata/identity/oauth2/token",Y6i=`http://169.254.169.254${aBr}`,K6i="2018-02-01",O3e=class t extends ry{static{a(this,"Imds")}constructor(e,r,n,o,s,c){super(e,r,n,o,s),this.identityEndpoint=c}static tryCreate(e,r,n,o,s){let c;return process.env[Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST]?(e.info(`[Managed Identity] Environment variable ${Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST} for ${Ni.IMDS} returned endpoint: ${process.env[Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST]}`),c=t.getValidatedEnvVariableUrlString(Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST,`${process.env[Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST]}${aBr}`,Ni.IMDS,e)):(e.info(`[Managed Identity] Unable to find ${Ei.AZURE_POD_IDENTITY_AUTHORITY_HOST} environment variable for ${Ni.IMDS}, using the default endpoint.`),c=Y6i),new t(e,r,n,o,s,c)}createRequest(e,r){let n=new GE(jl.GET,this.identityEndpoint);return n.headers[UE.METADATA_HEADER_NAME]="true",n.queryParameters[s0.API_VERSION]=K6i,n.queryParameters[s0.RESOURCE]=e,r.idType!==ed.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType,!0)]=r.id),n.retryPolicy=new M3e,n}};f();var J6i="2019-07-01-preview",TAe=class t extends ry{static{a(this,"ServiceFabric")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.identityEndpoint=c,this.identityHeader=l}static getEnvironmentVariables(){let e=process.env[Ei.IDENTITY_ENDPOINT],r=process.env[Ei.IDENTITY_HEADER],n=process.env[Ei.IDENTITY_SERVER_THUMBPRINT];return[e,r,n]}static tryCreate(e,r,n,o,s,c){let[l,u,d]=t.getEnvironmentVariables();if(!l||!u||!d)return e.info(`[Managed Identity] ${Ni.SERVICE_FABRIC} managed identity is unavailable because one or all of the '${Ei.IDENTITY_HEADER}', '${Ei.IDENTITY_ENDPOINT}' or '${Ei.IDENTITY_SERVER_THUMBPRINT}' environment variables are not defined.`),null;let p=t.getValidatedEnvVariableUrlString(Ei.IDENTITY_ENDPOINT,l,Ni.SERVICE_FABRIC,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Ni.SERVICE_FABRIC} managed identity. Endpoint URI: ${p}. Creating ${Ni.SERVICE_FABRIC} managed identity.`),c.idType!==ed.SYSTEM_ASSIGNED&&e.warning(`[Managed Identity] ${Ni.SERVICE_FABRIC} user assigned managed identity is configured in the cluster, not during runtime. See also: https://learn.microsoft.com/en-us/azure/service-fabric/configure-existing-cluster-enable-managed-identity-token-service.`),new t(e,r,n,o,s,l,u)}createRequest(e,r){let n=new GE(jl.GET,this.identityEndpoint);return n.headers[UE.ML_AND_SF_SECRET_HEADER_NAME]=this.identityHeader,n.queryParameters[s0.API_VERSION]=J6i,n.queryParameters[s0.RESOURCE]=e,r.idType!==ed.SYSTEM_ASSIGNED&&(n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType)]=r.id),n}};f();var X6i="2017-09-01",Z6i=`Only client id is supported for user-assigned managed identity in ${Ni.MACHINE_LEARNING}.`,SAe=class t extends ry{static{a(this,"MachineLearning")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s),this.msiEndpoint=c,this.secret=l}static getEnvironmentVariables(){let e=process.env[Ei.MSI_ENDPOINT],r=process.env[Ei.MSI_SECRET];return[e,r]}static tryCreate(e,r,n,o,s){let[c,l]=t.getEnvironmentVariables();if(!c||!l)return e.info(`[Managed Identity] ${Ni.MACHINE_LEARNING} managed identity is unavailable because one or both of the '${Ei.MSI_ENDPOINT}' and '${Ei.MSI_SECRET}' environment variables are not defined.`),null;let u=t.getValidatedEnvVariableUrlString(Ei.MSI_ENDPOINT,c,Ni.MACHINE_LEARNING,e);return e.info(`[Managed Identity] Environment variables validation passed for ${Ni.MACHINE_LEARNING} managed identity. Endpoint URI: ${u}. Creating ${Ni.MACHINE_LEARNING} managed identity.`),new t(e,r,n,o,s,c,l)}createRequest(e,r){let n=new GE(jl.GET,this.msiEndpoint);if(n.headers[UE.METADATA_HEADER_NAME]="true",n.headers[UE.ML_AND_SF_SECRET_HEADER_NAME]=this.secret,n.queryParameters[s0.API_VERSION]=X6i,n.queryParameters[s0.RESOURCE]=e,r.idType===ed.SYSTEM_ASSIGNED)n.queryParameters[KH.MANAGED_IDENTITY_CLIENT_ID_2017]=process.env[Ei.DEFAULT_IDENTITY_CLIENT_ID];else if(r.idType===ed.USER_ASSIGNED_CLIENT_ID)n.queryParameters[this.getManagedIdentityUserAssignedIdQueryParameterKey(r.idType,!1,!0)]=r.id;else throw new Error(Z6i);return n}};var IAe=class t{static{a(this,"ManagedIdentityClient")}constructor(e,r,n,o,s){this.logger=e,this.nodeStorage=r,this.networkClient=n,this.cryptoProvider=o,this.disableInternalRetries=s}async sendManagedIdentityTokenRequest(e,r,n,o){return t.identitySource||(t.identitySource=this.selectManagedIdentitySource(this.logger,this.nodeStorage,this.networkClient,this.cryptoProvider,this.disableInternalRetries,r)),t.identitySource.acquireTokenWithManagedIdentity(e,r,n,o)}allEnvironmentVariablesAreDefined(e){return Object.values(e).every(r=>r!==void 0)}getManagedIdentitySource(){return t.sourceName=this.allEnvironmentVariablesAreDefined(TAe.getEnvironmentVariables())?Ni.SERVICE_FABRIC:this.allEnvironmentVariablesAreDefined(_Ae.getEnvironmentVariables())?Ni.APP_SERVICE:this.allEnvironmentVariablesAreDefined(SAe.getEnvironmentVariables())?Ni.MACHINE_LEARNING:this.allEnvironmentVariablesAreDefined(bAe.getEnvironmentVariables())?Ni.CLOUD_SHELL:this.allEnvironmentVariablesAreDefined(vAe.getEnvironmentVariables())?Ni.AZURE_ARC:Ni.DEFAULT_TO_IMDS,t.sourceName}selectManagedIdentitySource(e,r,n,o,s,c){let l=TAe.tryCreate(e,r,n,o,s,c)||_Ae.tryCreate(e,r,n,o,s)||SAe.tryCreate(e,r,n,o,s)||bAe.tryCreate(e,r,n,o,s,c)||vAe.tryCreate(e,r,n,o,s,c)||O3e.tryCreate(e,r,n,o,s);if(!l)throw Af(VBe);return l}};var eFi=[Ni.SERVICE_FABRIC],Xte=class t{static{a(this,"ManagedIdentityApplication")}constructor(e){this.config=A5r(e||{}),this.logger=new b1(this.config.system.loggerOptions,w3e,bx);let r={canonicalAuthority:pt.DEFAULT_AUTHORITY};t.nodeStorage||(t.nodeStorage=new Y8(this.logger,this.config.managedIdentityId.id,Tte,r)),this.networkClient=this.config.system.networkClient,this.cryptoProvider=new PP;let n={protocolMode:Ng.AAD,knownAuthorities:[dvt],cloudDiscoveryMetadata:"",authorityMetadata:""};this.fakeAuthority=new _x(dvt,this.networkClient,t.nodeStorage,n,this.logger,this.cryptoProvider.createNewGuid(),void 0,!0),this.fakeClientCredentialClient=new e6({authOptions:{clientId:this.config.managedIdentityId.id,authority:this.fakeAuthority}}),this.managedIdentityClient=new IAe(this.logger,t.nodeStorage,this.networkClient,this.cryptoProvider,this.config.disableInternalRetries),this.hashUtils=new z8}async acquireToken(e){if(!e.resource)throw _c(wte.urlEmptyError);let r={forceRefresh:e.forceRefresh,resource:e.resource.replace("/.default",""),scopes:[e.resource.replace("/.default","")],authority:this.fakeAuthority.canonicalAuthority,correlationId:this.cryptoProvider.createNewGuid(),claims:e.claims,clientCapabilities:this.config.clientCapabilities};if(r.forceRefresh)return this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority);let[n,o]=await this.fakeClientCredentialClient.getCachedAuthenticationResult(r,this.config,this.cryptoProvider,this.fakeAuthority,t.nodeStorage);if(r.claims){let s=this.managedIdentityClient.getManagedIdentitySource();if(n&&eFi.includes(s)){let c=this.hashUtils.sha256(n.accessToken).toString(dm.HEX);r.revokedTokenSha256Hash=c}return this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority)}return n?(o===Gc.PROACTIVELY_REFRESHED&&(this.logger.info("ClientCredentialClient:getCachedAuthenticationResult - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),await this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority,!0)),n):this.acquireTokenFromManagedIdentity(r,this.config.managedIdentityId,this.fakeAuthority)}async acquireTokenFromManagedIdentity(e,r,n,o){return this.managedIdentityClient.sendManagedIdentityTokenRequest(e,r,n,o)}getManagedIdentitySource(){return IAe.sourceName||this.managedIdentityClient.getManagedIdentitySource()}};f();var B3e=class{static{a(this,"DistributedCachePlugin")}constructor(e,r){this.client=e,this.partitionManager=r}async beforeCacheAccess(e){let r=await this.partitionManager.getKey(),n=await this.client.get(r);e.tokenCache.deserialize(n)}async afterCacheAccess(e){if(e.cacheHasChanged){let r=e.tokenCache.getKVStore(),n=Object.values(r).filter(s=>fm.isAccountEntity(s)),o;if(n.length>0){let s=n[0];o=await this.partitionManager.extractKey(s)}else o=await this.partitionManager.getKey();await this.client.set(o,e.tokenCache.serialize())}}};f();f();f();f();f();function xAe(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}a(xAe,"getRandomIntegerInclusive");function wAe(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+xAe(0,n/2)}}a(wAe,"calculateRetryDelay");f();function Zte(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(Zte,"isObject");f();function JH(t){if(Zte(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}a(JH,"isError");f();f();var cBr=require("node:crypto");var obt,tFi=typeof((obt=globalThis?.crypto)===null||obt===void 0?void 0:obt.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):cBr.randomUUID;function ere(){return tFi()}a(ere,"randomUUID");f();var sbt,abt,cbt,lbt,lBr=typeof window<"u"&&typeof window.document<"u",uBr=typeof self=="object"&&typeof self?.importScripts=="function"&&(((sbt=self.constructor)===null||sbt===void 0?void 0:sbt.name)==="DedicatedWorkerGlobalScope"||((abt=self.constructor)===null||abt===void 0?void 0:abt.name)==="ServiceWorkerGlobalScope"||((cbt=self.constructor)===null||cbt===void 0?void 0:cbt.name)==="SharedWorkerGlobalScope"),dBr=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",fBr=typeof Bun<"u"&&typeof Bun.version<"u",t6=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!(!((lbt=globalThis.process.versions)===null||lbt===void 0)&&lbt.node);var pBr=typeof navigator<"u"&&navigator?.product==="ReactNative";f();function HE(t,e){return Buffer.from(t,e)}a(HE,"stringToUint8Array");f();var ubt="REDACTED",rFi=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],nFi=["api-version"],Tx=class{static{a(this,"Sanitizer")}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=rFi.concat(e),r=nFi.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,o)=>{if(o instanceof Error)return Object.assign(Object.assign({},o),{name:o.name,message:o.message});if(n==="headers")return this.sanitizeHeaders(o);if(n==="url")return this.sanitizeUrl(o);if(n==="query")return this.sanitizeQuery(o);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(o)||Zte(o)){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,ubt);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=ubt;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=ubt;return r}};f();f();f();f();var XH=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function fbt(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,c)=>{function l(){c(new XH(o??"The operation was aborted."))}a(l,"rejectOnAbort");function u(){n?.removeEventListener("abort",d)}a(u,"removeListeners");function d(){r?.(),u(),l()}if(a(d,"onAbort"),n?.aborted)return l();try{t(p=>{u(),s(p)},p=>{u(),c(p)})}catch(p){c(p)}n?.addEventListener("abort",d)})}a(fbt,"createAbortablePromise");f();var cFi="The delay was aborted.";function pbt(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return fbt(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:a(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??cFi})}a(pbt,"delay");f();function tre(t){if(JH(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}a(tre,"getErrorMessage");f();function hBr(t,e){return wAe(t,e)}a(hBr,"calculateRetryDelay");function L3e(t){return JH(t)}a(L3e,"isError");var F3e=t6,rre=t6;f();var RAe=Bi("IdentityUtils"),mBr="1.0";function ZH(t,e,r){let n=a(o=>(RAe.getToken.info(o),new sT({scopes:Array.isArray(t)?t:[t],getTokenOptions:r,message:o})),"error");if(!e)throw n("No response");if(!e.expiresOn)throw n('Response had no "expiresOn" property.');if(!e.accessToken)throw n('Response had no "accessToken" property.')}a(ZH,"ensureValidMsalToken");function hbt(t){let e=t?.authorityHost;return!e&&rre&&(e=process.env.AZURE_AUTHORITY_HOST),e??tge}a(hbt,"getAuthorityHost");function mbt(t,e){return e||(e=tge),new RegExp(`${t}/?$`).test(e)?e:e.endsWith("/")?e+t:`${e}/${t}`}a(mbt,"getAuthority");function gBr(t,e,r){return t==="adfs"&&e||r?[e]:[]}a(gBr,"getKnownAuthorities");var U3e=a((t,e=F3e?"Node":"Browser")=>(r,n,o)=>{if(!o)switch(r){case w1.LogLevel.Error:t.info(`MSAL ${e} V2 error: ${n}`);return;case w1.LogLevel.Info:t.info(`MSAL ${e} V2 info message: ${n}`);return;case w1.LogLevel.Verbose:t.info(`MSAL ${e} V2 verbose message: ${n}`);return;case w1.LogLevel.Warning:t.info(`MSAL ${e} V2 warning: ${n}`);return}},"defaultLoggerCallback");function Q3e(t){switch(t){case"error":return w1.LogLevel.Error;case"info":return w1.LogLevel.Info;case"verbose":return w1.LogLevel.Verbose;case"warning":return w1.LogLevel.Warning;default:return w1.LogLevel.Info}}a(Q3e,"getMSALLogLevel");function ej(t,e,r){if(e.name==="AuthError"||e.name==="ClientAuthError"||e.name==="BrowserAuthError"){let n=e;switch(n.errorCode){case"endpoints_resolution_error":return RAe.info(Xo(t,e.message)),new un(e.message);case"device_code_polling_cancelled":return new XH("The authentication has been aborted by the caller.");case"consent_required":case"interaction_required":case"login_required":RAe.info(Xo(t,`Authentication returned errorCode ${n.errorCode}`));break;default:RAe.info(Xo(t,`Failed to acquire token: ${e.message}`));break}}return e.name==="ClientConfigurationError"||e.name==="BrowserConfigurationAuthError"||e.name==="AbortError"||e.name==="AuthenticationError"?e:e.name==="NativeAuthError"?(RAe.info(Xo(t,`Error from the native broker: ${e.message} with status code: ${e.statusCode}`)),e):new sT({scopes:t,getTokenOptions:r,message:e.message})}a(ej,"handleMsalError");function ABr(t){return{localAccountId:t.homeAccountId,environment:t.authority,username:t.username,homeAccountId:t.homeAccountId,tenantId:t.tenantId}}a(ABr,"publicToMsal");function yBr(t,e){return{authority:e.environment??cDr,homeAccountId:e.homeAccountId,tenantId:e.tenantId||aDr,username:e.username,clientId:t,version:mBr}}a(yBr,"msalToPublic");function gbt(t){let e=JSON.parse(t);if(e.version&&e.version!==mBr)throw Error("Unsupported AuthenticationRecord version");return e}a(gbt,"deserializeAuthenticationRecord");f();f();f();f();f();f();function uFi(t,e){return e!=="Composite"&&e!=="Dictionary"&&(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||e?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||t===void 0||t===null)}a(uFi,"isPrimitiveBody");function dFi(t){let e=Object.assign(Object.assign({},t.headers),t.body);return t.hasNullableType&&Object.getOwnPropertyNames(e).length===0?t.shouldWrapBody?{body:null}:null:t.shouldWrapBody?Object.assign(Object.assign({},t.headers),{body:t.body}):e}a(dFi,"handleNullableResponseAndWrappableBody");function Abt(t,e){var r,n;let o=t.parsedHeaders;if(t.request.method==="HEAD")return Object.assign(Object.assign({},o),{body:t.parsedBody});let s=e&&e.bodyMapper,c=!!s?.nullable,l=s?.type.name;if(l==="Stream")return Object.assign(Object.assign({},o),{blobBody:t.blobBody,readableStreamBody:t.readableStreamBody});let u=l==="Composite"&&s.type.modelProperties||{},d=Object.keys(u).some(p=>u[p].serializedName==="");if(l==="Sequence"||d){let p=(r=t.parsedBody)!==null&&r!==void 0?r:[];for(let h of Object.keys(u))u[h].serializedName&&(p[h]=(n=t.parsedBody)===null||n===void 0?void 0:n[h]);if(o)for(let h of Object.keys(o))p[h]=o[h];return c&&!t.parsedBody&&!o&&Object.getOwnPropertyNames(u).length===0?null:p}return dFi({body:t.parsedBody,headers:o,hasNullableType:c,shouldWrapBody:uFi(t.parsedBody,l)})}a(Abt,"flattenResponse");var DP={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"};f();f();f();f();f();var MP=class extends Error{static{a(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};f();f();f();var EBr=require("node:os"),CBr=de(require("node:util"),1),_Br=de(require("node:process"),1);function vBr(t,...e){_Br.stderr.write(`${CBr.default.format(t,...e)}${EBr.EOL}`)}a(vBr,"log");var bBr=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,TBr,ybt=[],Ebt=[],G3e=[];bBr&&Cbt(bBr);var SBr=Object.assign(t=>IBr(t),{enable:Cbt,enabled:_bt,disable:fFi,log:vBr});function Cbt(t){TBr=t,ybt=[],Ebt=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?Ebt.push(new RegExp(`^${n.substr(1)}$`)):ybt.push(new RegExp(`^${n}$`));for(let n of G3e)n.enabled=_bt(n.namespace)}a(Cbt,"enable");function _bt(t){if(t.endsWith("*"))return!0;for(let e of Ebt)if(e.test(t))return!1;for(let e of ybt)if(e.test(t))return!0;return!1}a(_bt,"enabled");function fFi(){let t=TBr||"";return Cbt(""),t}a(fFi,"disable");function IBr(t){let e=Object.assign(r,{enabled:_bt(t),destroy:pFi,log:SBr.log,namespace:t,extend:hFi});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return a(r,"debug"),G3e.push(e),e}a(IBr,"createDebugger");function pFi(){let t=G3e.indexOf(this);return t>=0?(G3e.splice(t,1),!0):!1}a(pFi,"destroy");function hFi(t){let e=IBr(`${this.namespace}:${t}`);return e.log=this.log,e}a(hFi,"extend");var nre=SBr;var vbt=["verbose","info","warning","error"],xBr={verbose:400,info:300,warning:200,error:100};function wBr(t,e){e.log=(...r)=>{t.log(...r)}}a(wBr,"patchLogMethod");function RBr(t){return vbt.includes(t)}a(RBr,"isTypeSpecRuntimeLogLevel");function mFi(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,o=nre(t.namespace);o.log=(...p)=>{nre.log(...p)};function s(p){if(p&&!RBr(p))throw new Error(`Unknown log level '${p}'. Acceptable values: ${vbt.join(",")}`);n=p;let h=[];for(let m of e)c(m)&&h.push(m.namespace);nre.enable(h.join(","))}a(s,"contextSetLogLevel"),r&&(RBr(r)?s(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${vbt.join(", ")}.`));function c(p){return!!(n&&xBr[p.level]<=xBr[n])}a(c,"shouldEnable");function l(p,h){let m=Object.assign(p.extend(h),{level:h});if(wBr(p,m),c(m)){let g=nre.disable();nre.enable(g+","+m.namespace)}return e.add(m),m}a(l,"createLogger");function u(){return n}a(u,"contextGetLogLevel");function d(p){let h=o.extend(p);return wBr(o,h),{error:l(h,"error"),warning:l(h,"warning"),info:l(h,"info"),verbose:l(h,"verbose")}}return a(d,"contextCreateClientLogger"),{setLogLevel:s,getLogLevel:u,createClientLogger:d,logger:o}}a(mFi,"createLoggerContext");var PBr=mFi({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),gFi=PBr.logger;function kAe(t){return PBr.createClientLogger(t)}a(kAe,"createClientLogger");f();function H3e(t){return t.toLowerCase()}a(H3e,"normalizeName");function*AFi(t){for(let e of t.values())yield[e.name,e.value]}a(AFi,"headerIterator");var bbt=class{static{a(this,"HttpHeadersImpl")}constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(H3e(e),{name:e,value:String(r).trim()})}get(e){var r;return(r=this._headersMap.get(H3e(e)))===null||r===void 0?void 0:r.value}has(e){return this._headersMap.has(H3e(e))}delete(e){this._headersMap.delete(H3e(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,o]of this._headersMap)r[n]=o.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return AFi(this._headersMap)}};function R1(t){return new bbt(t)}a(R1,"createHttpHeaders");f();f();f();var Tbt=class{static{a(this,"PipelineRequestImpl")}constructor(e){var r,n,o,s,c,l,u;this.url=e.url,this.body=e.body,this.headers=(r=e.headers)!==null&&r!==void 0?r:R1(),this.method=(n=e.method)!==null&&n!==void 0?n:"GET",this.timeout=(o=e.timeout)!==null&&o!==void 0?o:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=(s=e.disableKeepAlive)!==null&&s!==void 0?s:!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=(c=e.withCredentials)!==null&&c!==void 0?c:!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||ere(),this.allowInsecureConnection=(l=e.allowInsecureConnection)!==null&&l!==void 0?l:!1,this.enableBrowserStreams=(u=e.enableBrowserStreams)!==null&&u!==void 0?u:!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function j3e(t){return new Tbt(t)}a(j3e,"createPipelineRequest");f();var kBr=new Set(["Deserialize","Serialize","Retry","Sign"]),Sbt=class t{static{a(this,"HttpPipeline")}constructor(e){var r;this._policies=[],this._policies=(r=e?.slice(0))!==null&&r!==void 0?r:[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!kBr.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!kBr.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,c)=>l=>c.sendRequest(l,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(A){return{name:A,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}a(n,"createPhase");let o=n("Serialize"),s=n("None"),c=n("Deserialize"),l=n("Retry"),u=n("Sign"),d=[o,s,c,l,u];function p(A){return A==="Retry"?l:A==="Serialize"?o:A==="Deserialize"?c:A==="Sign"?u:s}a(p,"getPhase");for(let A of this._policies){let y=A.policy,E=A.options,_=y.name;if(r.has(_))throw new Error("Duplicate policy names not allowed in pipeline");let v={policy:y,dependsOn:new Set,dependants:new Set};E.afterPhase&&(v.afterPhase=p(E.afterPhase),v.afterPhase.hasAfterPolicies=!0),r.set(_,v),p(E.phase).policies.add(v)}for(let A of this._policies){let{policy:y,options:E}=A,_=y.name,v=r.get(_);if(!v)throw new Error(`Missing node for policy ${_}`);if(E.afterPolicies)for(let b of E.afterPolicies){let I=r.get(b);I&&(v.dependsOn.add(I),I.dependants.add(v))}if(E.beforePolicies)for(let b of E.beforePolicies){let I=r.get(b);I&&(I.dependsOn.add(v),v.dependants.add(I))}}function h(A){A.hasRun=!0;for(let y of A.policies)if(!(y.afterPhase&&(!y.afterPhase.hasRun||y.afterPhase.policies.size))&&y.dependsOn.size===0){e.push(y.policy);for(let E of y.dependants)E.dependsOn.delete(y);r.delete(y.policy.name),A.policies.delete(y)}}a(h,"walkPhase");function m(){for(let A of d){if(h(A),A.policies.size>0&&A!==s){s.hasRun||h(s);return}A.hasAfterPolicies&&h(s)}}a(m,"walkPhases");let g=0;for(;r.size>0;){g++;let A=e.length;if(m(),e.length<=A&&g>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function $3e(){return Sbt.create()}a($3e,"createEmptyPipeline");f();f();var NBr=require("node:util"),DBr=NBr.inspect.custom;var yFi=new Tx,gm=class t extends Error{static{a(this,"RestError")}constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1}),Object.defineProperty(this,DBr,{value:a(()=>`RestError: ${this.message} - ${yFi.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};gm.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";gm.PARSE_ERROR="PARSE_ERROR";function V3e(t){return t instanceof gm?!0:JH(t)&&t.name==="RestError"}a(V3e,"isRestError");f();f();var ire=de(require("node:http"),1),ore=de(require("node:https"),1),z3e=de(require("node:zlib"),1),OBr=require("node:stream");f();var fT=kAe("ts-http-runtime");var EFi={};function NAe(t){return t&&typeof t.pipe=="function"}a(NAe,"isReadableStream");function MBr(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=a(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}a(MBr,"isStreamComplete");function BBr(t){return t&&typeof t.byteLength=="number"}a(BBr,"isArrayBuffer");var W3e=class extends OBr.Transform{static{a(this,"ReportTransform")}_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},Ibt=class{static{a(this,"NodeHttpClient")}constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,o;let s=new AbortController,c;if(e.abortSignal){if(e.abortSignal.aborted)throw new MP("The operation was aborted. Request has already been canceled.");c=a(m=>{m.type==="abort"&&s.abort()},"abortListener"),e.abortSignal.addEventListener("abort",c)}let l;e.timeout>0&&(l=setTimeout(()=>{let m=new Tx;fT.info(`request to '${m.sanitizeUrl(e.url)}' timed out. canceling...`),s.abort()},e.timeout));let u=e.headers.get("Accept-Encoding"),d=u?.includes("gzip")||u?.includes("deflate"),p=typeof e.body=="function"?e.body():e.body;if(p&&!e.headers.has("Content-Length")){let m=bFi(p);m!==null&&e.headers.set("Content-Length",m)}let h;try{if(p&&e.onUploadProgress){let _=e.onUploadProgress,v=new W3e(_);v.on("error",b=>{fT.error("Error in upload progress",b)}),NAe(p)?p.pipe(v):v.end(p),p=v}let m=await this.makeRequest(e,s,p);l!==void 0&&clearTimeout(l);let g=CFi(m),y={status:(r=m.statusCode)!==null&&r!==void 0?r:0,headers:g,request:e};if(e.method==="HEAD")return m.resume(),y;h=d?_Fi(m,g):m;let E=e.onDownloadProgress;if(E){let _=new W3e(E);_.on("error",v=>{fT.error("Error in download progress",v)}),h.pipe(_),h=_}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((o=e.streamResponseStatusCodes)===null||o===void 0)&&o.has(y.status)?y.readableStreamBody=h:y.bodyAsText=await vFi(h),y}finally{if(e.abortSignal&&c){let m=Promise.resolve();NAe(p)&&(m=MBr(p));let g=Promise.resolve();NAe(h)&&(g=MBr(h)),Promise.all([m,g]).then(()=>{var A;c&&((A=e.abortSignal)===null||A===void 0||A.removeEventListener("abort",c))}).catch(A=>{fT.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){var o;let s=new URL(e.url),c=s.protocol!=="https:";if(c&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let l=(o=e.agent)!==null&&o!==void 0?o:this.getOrCreateAgent(e,c),u=Object.assign({agent:l,hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})},e.requestOverrides);return new Promise((d,p)=>{let h=c?ire.request(u,d):ore.request(u,d);h.once("error",m=>{var g;p(new gm(m.message,{code:(g=m.code)!==null&&g!==void 0?g:gm.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let m=new MP("The operation was aborted. Rejecting from abort signal callback while making request.");h.destroy(m),p(m)}),n&&NAe(n)?n.pipe(h):n?typeof n=="string"||Buffer.isBuffer(n)?h.end(n):BBr(n)?h.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(fT.error("Unrecognized body type",n),p(new gm("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){var n;let o=e.disableKeepAlive;if(r)return o?ire.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new ire.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(o&&!e.tlsSettings)return ore.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:EFi,c=this.cachedHttpsAgents.get(s);return c&&c.options.keepAlive===!o||(fT.info("No cached TLS Agent exist, creating a new Agent"),c=new ore.Agent(Object.assign({keepAlive:!o},s)),this.cachedHttpsAgents.set(s,c)),c}}};function CFi(t){let e=R1();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}a(CFi,"getResponseHeaders");function _Fi(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=z3e.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=z3e.createInflate();return t.pipe(n),n}return t}a(_Fi,"getDecodedResponseStream");function vFi(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new gm(`Error reading response as text: ${o.message}`,{code:gm.PARSE_ERROR}))})})}a(vFi,"streamToText");function bFi(t){return t?Buffer.isBuffer(t)?t.length:NAe(t)?null:BBr(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}a(bFi,"getBodyLength");function LBr(){return new Ibt}a(LBr,"createNodeHttpClient");function Y3e(){return LBr()}a(Y3e,"createDefaultHttpClient");f();f();f();f();var xbt="logPolicy";function K3e(t={}){var e;let r=(e=t.logger)!==null&&e!==void 0?e:fT.info,n=new Tx({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:xbt,async sendRequest(o,s){if(!r.enabled)return s(o);r(`Request: ${n.sanitize(o)}`);let c=await s(o);return r(`Response status code: ${c.status}`),r(`Headers: ${n.sanitize(c.headers)}`),c}}}a(K3e,"logPolicy");f();var wbt="redirectPolicy",FBr=["GET","HEAD"];function J3e(t={}){let{maxRetries:e=20}=t;return{name:wbt,async sendRequest(r,n){let o=await n(r);return UBr(n,o,e)}}}a(J3e,"redirectPolicy");async function UBr(t,e,r,n=0){let{request:o,status:s,headers:c}=e,l=c.get("location");if(l&&(s===300||s===301&&FBr.includes(o.method)||s===302&&FBr.includes(o.method)||s===303&&o.method==="POST"||s===307)&&n{let s,c,l=a(()=>o(new MP(r?.abortErrorMsg?r?.abortErrorMsg:TFi)),"rejectOnAbort"),u=a(()=>{r?.abortSignal&&c&&r.abortSignal.removeEventListener("abort",c)},"removeListeners");if(c=a(()=>(s&&clearTimeout(s),u(),l()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return l();s=setTimeout(()=>{u(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",c)})}a(GBr,"delay");function HBr(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}a(HBr,"parseHeaderValueAsNumber");var Pbt="Retry-After",SFi=["retry-after-ms","x-ms-retry-after-ms",Pbt];function jBr(t){if(t&&[429,503].includes(t.status))try{for(let o of SFi){let s=HBr(t,o);if(s===0||s)return s*(o===Pbt?1e3:1)}let e=t.headers.get(Pbt);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}a(jBr,"getRetryAfterInMs");function $Br(t){return Number.isFinite(jBr(t))}a($Br,"isThrottlingRetryResponse");function kbt(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=jBr(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}a(kbt,"throttlingRetryStrategy");var IFi=1e3,xFi=1e3*64;function Z3e(t={}){var e,r;let n=(e=t.retryDelayInMs)!==null&&e!==void 0?e:IFi,o=(r=t.maxRetryDelayInMs)!==null&&r!==void 0?r:xFi;return{name:"exponentialRetryStrategy",retry({retryCount:s,response:c,responseError:l}){let u=RFi(l),d=u&&t.ignoreSystemErrors,p=wFi(c),h=p&&t.ignoreHttpStatusCodes;return c&&($Br(c)||!p)||h||d?{skipStrategy:!0}:l&&!u&&!p?{errorToThrow:l}:wAe(s,{retryDelayInMs:n,maxRetryDelayInMs:o})}}}a(Z3e,"exponentialRetryStrategy");function wFi(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}a(wFi,"isExponentialRetryResponse");function RFi(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}a(RFi,"isSystemError");f();var PFi=kAe("ts-http-runtime retryPolicy"),kFi="retryPolicy";function r6(t,e={maxRetries:3}){let r=e.logger||PFi;return{name:kFi,async sendRequest(n,o){var s,c;let l,u,d=-1;e:for(;;){d+=1,l=void 0,u=void 0;try{r.info(`Retry ${d}: Attempting to send request`,n.requestId),l=await o(n),r.info(`Retry ${d}: Received a response from request`,n.requestId)}catch(p){if(r.error(`Retry ${d}: Received an error from request`,n.requestId),u=p,!p||u.name!=="RestError")throw p;l=u.response}if(!((s=n.abortSignal)===null||s===void 0)&&s.aborted)throw r.error(`Retry ${d}: Request aborted.`),new MP;if(d>=((c=e.maxRetries)!==null&&c!==void 0?c:3)){if(r.info(`Retry ${d}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),u)throw u;if(l)return l;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${d}: Processing ${t.length} retry strategies.`);t:for(let p of t){let h=p.logger||r;h.info(`Retry ${d}: Processing retry strategy ${p.name}.`);let m=p.retry({retryCount:d,response:l,responseError:u});if(m.skipStrategy){h.info(`Retry ${d}: Skipped.`);continue t}let{errorToThrow:g,retryAfterInMs:A,redirectTo:y}=m;if(g)throw h.error(`Retry ${d}: Retry strategy ${p.name} throws error:`,g),g;if(A||A===0){h.info(`Retry ${d}: Retry strategy ${p.name} retries after ${A}`),await GBr(A,void 0,{abortSignal:n.abortSignal});continue e}if(y){h.info(`Retry ${d}: Retry strategy ${p.name} redirects to ${y}`),n.url=y;continue e}}if(u)throw r.info("None of the retry strategies could work with the received error. Throwing it."),u;if(l)return r.info("None of the retry strategies could work with the received response. Returning it."),l}}}}a(r6,"retryPolicy");var Nbt="defaultRetryPolicy";function eLe(t={}){var e;return{name:Nbt,sendRequest:r6([kbt(),Z3e(t)],{maxRetries:(e=t.maxRetries)!==null&&e!==void 0?e:3}).sendRequest}}a(eLe,"defaultRetryPolicy");f();var Dbt="formDataPolicy";function NFi(t){var e;let r={};for(let[n,o]of t.entries())(e=r[n])!==null&&e!==void 0||(r[n]=[]),r[n].push(o);return r}a(NFi,"formDataToFormDataMap");function tLe(){return{name:Dbt,async sendRequest(t,e){if(t6&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=NFi(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=DFi(t.formData):await MFi(t.formData,t),t.formData=void 0}return e(t)}}}a(tLe,"formDataPolicy");function DFi(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.append(r,o.toString());else e.append(r,n.toString());return e.toString()}a(DFi,"wwwFormUrlEncode");async function MFi(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[o,s]of Object.entries(t))for(let c of Array.isArray(s)?s:[s])if(typeof c=="string")n.push({headers:R1({"Content-Disposition":`form-data; name="${o}"`}),body:HE(c,"utf-8")});else{if(c==null||typeof c!="object")throw new Error(`Unexpected value for key ${o}: ${c}. Value should be serialized to string first.`);{let l=c.name||"blob",u=R1();u.set("Content-Disposition",`form-data; name="${o}"; filename="${l}"`),u.set("Content-Type",c.type||"application/octet-stream"),n.push({headers:u,body:c})}}e.multipartBody={parts:n}}a(MFi,"prepareFormData");f();var g3r=de(qbt(),1),A3r=de(Gbt(),1);var w9i="HTTPS_PROXY",R9i="HTTP_PROXY",P9i="ALL_PROXY",k9i="NO_PROXY",Hbt="proxyPolicy",p3r=[],y3r=!1,N9i=new Map;function lLe(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}a(lLe,"getEnvironmentValue");function D9i(){if(!process)return;let t=lLe(w9i),e=lLe(P9i),r=lLe(R9i);return t||e||r}a(D9i,"loadEnvironmentProxyValue");function M9i(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let o=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(o=!0):n===s&&(o=!0);return r?.set(n,o),o}a(M9i,"isBypassed");function O9i(){let t=lLe(k9i);return y3r=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(O9i,"loadNoProxy");function B9i(){let t=D9i();return t?new URL(t):void 0}a(B9i,"getDefaultProxySettingsInternal");function h3r(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}a(h3r,"getUrlFromProxySettings");function m3r(t,e,r){if(t.agent)return;let o=new URL(t.url).protocol!=="https:";t.tlsSettings&&fT.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();o?(e.httpProxyAgent||(e.httpProxyAgent=new A3r.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new g3r.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}a(m3r,"setProxyAgentOnRequest");function uLe(t,e){y3r||p3r.push(...O9i());let r=t?h3r(t):B9i(),n={};return{name:Hbt,async sendRequest(o,s){var c;return!o.proxySettings&&r&&!M9i(o.url,(c=e?.customNoProxyList)!==null&&c!==void 0?c:p3r,e?.customNoProxyList?void 0:N9i)?m3r(o,n,r):o.proxySettings&&m3r(o,n,h3r(o.proxySettings)),s(o)}}}a(uLe,"proxyPolicy");f();var jbt="agentPolicy";function dLe(t){return{name:jbt,sendRequest:a(async(e,r)=>(e.agent||(e.agent=t),r(e)),"sendRequest")}}a(dLe,"agentPolicy");f();var $bt="tlsPolicy";function fLe(t){return{name:$bt,sendRequest:a(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}a(fLe,"tlsPolicy");f();f();function pLe(t){return typeof t.stream=="function"}a(pLe,"isBlob");f();qM();var yLe=require("stream");function j3r(){return MAe(this,arguments,a(function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield N1(e.read());if(r)return yield N1(void 0);yield yield N1(n)}}finally{e.releaseLock()}},"streamAsyncIterator_1"))}a(j3r,"streamAsyncIterator");function Q9i(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=j3r.bind(t)),t.values||(t.values=j3r.bind(t))}a(Q9i,"makeAsyncIterable");function $3r(t){return t instanceof ReadableStream?(Q9i(t),yLe.Readable.fromWeb(t)):t}a($3r,"ensureNodeStream");function q9i(t){return t instanceof Uint8Array?yLe.Readable.from(Buffer.from(t)):pLe(t)?$3r(t.stream()):$3r(t)}a(q9i,"toStream");async function V3r(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(q9i);return yLe.Readable.from((function(){return MAe(this,arguments,function*(){var r,n,o,s;for(let d of e)try{for(var c=!0,l=(n=void 0,ALe(d)),u;u=yield N1(l.next()),r=u.done,!r;c=!0)s=u.value,c=!1,yield yield N1(s)}catch(p){n={error:p}}finally{try{!c&&!r&&(o=l.return)&&(yield N1(o.call(l)))}finally{if(n)throw n.error}}})})())}}a(V3r,"concat");function G9i(){return`----AzSDKFormBoundary${ere()}`}a(G9i,"generateBoundary");function H9i(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r -`;return e}a(H9i,"encodeHeaders");function j9i(t){return t instanceof Uint8Array?t.byteLength:pLe(t)?t.size===-1?void 0:t.size:void 0}a(j9i,"getLength");function $9i(t){let e=0;for(let r of t){let n=j9i(r);if(n===void 0)return;e+=n}return e}a($9i,"getTotalLength");async function V9i(t,e,r){let n=[HE(`--${r}`,"utf-8"),...e.flatMap(s=>[HE(`\r -`,"utf-8"),HE(H9i(s.headers),"utf-8"),HE(`\r -`,"utf-8"),s.body,HE(`\r ---${r}`,"utf-8")]),HE(`--\r -\r -`,"utf-8")],o=$9i(n);o&&t.headers.set("Content-Length",o),t.body=await V3r(n)}a(V9i,"buildRequestBody");var OAe="multipartPolicy",W9i=70,z9i=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Y9i(t){if(t.length>W9i)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!z9i.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}a(Y9i,"assertValidBoundary");function ELe(){return{name:OAe,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,o=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,c,l]=s;if(l&&n&&l!==n)throw new Error(`Multipart boundary was specified as ${l} in the header, but got ${n} in the request body`);return n??(n=l),n?Y9i(n):n=G9i(),t.headers.set("Content-Type",`${c}; boundary=${n}`),await V9i(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}a(ELe,"multipartPolicy");f();f();f();f();f();f();f();f();f();f();f();f();function CLe(){return $3e()}a(CLe,"createEmptyPipeline");f();f();f();var BP=k8("core-rest-pipeline");f();f();f();f();function Kbt(t={}){return K3e(Object.assign({logger:BP.info},t))}a(Kbt,"logPolicy");f();function Jbt(t={}){return J3e(t)}a(Jbt,"redirectPolicy");f();f();f();var cre=de(require("node:os"),1),_Le=de(require("node:process"),1);function W3r(){return"User-Agent"}a(W3r,"getHeaderName");async function z3r(t){if(_Le&&_Le.versions){let e=_Le.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${cre.arch()}-${cre.type()}-${cre.release()})`)}a(z3r,"setPlatformSpecificData");f();var vLe="1.22.0";function i7i(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}a(i7i,"getUserAgentString");function Y3r(){return W3r()}a(Y3r,"getUserAgentHeaderName");async function bLe(t){let e=new Map;e.set("core-rest-pipeline",vLe),await z3r(e);let r=i7i(e);return t?`${t} ${r}`:r}a(bLe,"getUserAgentValue");var K3r=Y3r(),J3r="userAgentPolicy";function Xbt(t={}){let e=bLe(t.userAgentPrefix);return{name:J3r,async sendRequest(r,n){return r.headers.has(K3r)||r.headers.set(K3r,await e),n(r)}}}a(Xbt,"userAgentPolicy");f();f();var X3r=Symbol("rawContent");function Zbt(t){return typeof t[X3r]=="function"}a(Zbt,"hasRawContent");function Z3r(t){return Zbt(t)?t[X3r]():t}a(Z3r,"getRawContent");var TLe=OAe;function eTt(){let t=ELe();return{name:TLe,sendRequest:a(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)Zbt(n.body)&&(n.body=Z3r(n.body));return t.sendRequest(e,r)},"sendRequest")}}a(eTt,"multipartPolicy");f();function tTt(){return X3e()}a(tTt,"decompressResponsePolicy");f();function rTt(t={}){return eLe(t)}a(rTt,"defaultRetryPolicy");f();function nTt(){return tLe()}a(nTt,"formDataPolicy");f();function iTt(t,e){return uLe(t,e)}a(iTt,"proxyPolicy");f();var eLr="setClientRequestIdPolicy";function oTt(t="x-ms-client-request-id"){return{name:eLr,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}a(oTt,"setClientRequestIdPolicy");f();function sTt(t){return dLe(t)}a(sTt,"agentPolicy");f();function aTt(t){return fLe(t)}a(aTt,"tlsPolicy");f();f();var lre=gm;function BAe(t){return V3e(t)}a(BAe,"isRestError");var tLr="tracingPolicy";function cTt(t={}){let e=bLe(t.userAgentPrefix),r=new Tx({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=o7i();return{name:tLr,async sendRequest(o,s){var c;if(!n)return s(o);let l=await e,u={"http.url":r.sanitizeUrl(o.url),"http.method":o.method,"http.user_agent":l,requestId:o.requestId};l&&(u["http.user_agent"]=l);let{span:d,tracingContext:p}=(c=s7i(n,o,u))!==null&&c!==void 0?c:{};if(!d||!p)return s(o);try{let h=await n.withContext(p,s,o);return c7i(d,h),h}catch(h){throw a7i(d,h),h}}}}a(cTt,"tracingPolicy");function o7i(){try{return ige({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:vLe})}catch(t){BP.warning(`Error when creating the TracingClient: ${tre(t)}`);return}}a(o7i,"tryCreateTracingClient");function s7i(t,e,r){try{let{span:n,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let s=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[c,l]of Object.entries(s))e.headers.set(c,l);return{span:n,tracingContext:o.tracingOptions.tracingContext}}catch(n){BP.warning(`Skipping creating a tracing span due to an error: ${tre(n)}`);return}}a(s7i,"tryCreateSpan");function a7i(t,e){try{t.setStatus({status:"error",error:L3e(e)?e:void 0}),BAe(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){BP.warning(`Skipping tracing span processing due to an error: ${tre(r)}`)}}a(a7i,"tryProcessError");function c7i(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),e.status>=400&&t.setStatus({status:"error"}),t.end()}catch(r){BP.warning(`Skipping tracing span processing due to an error: ${tre(r)}`)}}a(c7i,"tryProcessResponse");f();f();function SLe(t){if(t instanceof AbortSignal)return{abortSignal:t};if(t.aborted)return{abortSignal:AbortSignal.abort(t.reason)};let e=new AbortController,r=!0;function n(){r&&(t.removeEventListener("abort",o),r=!1)}a(n,"cleanup");function o(){e.abort(t.reason),n()}return a(o,"listener"),t.addEventListener("abort",o),{abortSignal:e.signal,cleanup:n}}a(SLe,"wrapAbortSignalLike");var l7i="wrapAbortSignalLikePolicy";function rLr(){return{name:l7i,sendRequest:a(async(t,e)=>{if(!t.abortSignal)return e(t);let{abortSignal:r,cleanup:n}=SLe(t.abortSignal);t.abortSignal=r;try{return await e(t)}finally{n?.()}},"sendRequest")}}a(rLr,"wrapAbortSignalLikePolicy");function lTt(t){var e;let r=CLe();return rre&&(t.agent&&r.addPolicy(sTt(t.agent)),t.tlsOptions&&r.addPolicy(aTt(t.tlsOptions)),r.addPolicy(iTt(t.proxyOptions)),r.addPolicy(tTt())),r.addPolicy(rLr()),r.addPolicy(nTt(),{beforePolicies:[TLe]}),r.addPolicy(Xbt(t.userAgentOptions)),r.addPolicy(oTt((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),r.addPolicy(eTt(),{afterPhase:"Deserialize"}),r.addPolicy(rTt(t.retryOptions),{phase:"Retry"}),r.addPolicy(cTt(Object.assign(Object.assign({},t.userAgentOptions),t.loggingOptions)),{afterPhase:"Retry"}),rre&&r.addPolicy(Jbt(t.redirectOptions),{afterPhase:"Retry"}),r.addPolicy(Kbt(t.loggingOptions),{afterPhase:"Sign"}),r}a(lTt,"createPipelineFromOptions");f();function uTt(){let t=Y3e();return{async sendRequest(e){let{abortSignal:r,cleanup:n}=e.abortSignal?SLe(e.abortSignal):{};try{return e.abortSignal=r,await t.sendRequest(e)}finally{n?.()}}}}a(uTt,"createDefaultHttpClient");f();function o6(t){return R1(t)}a(o6,"createHttpHeaders");f();function Ix(t){return j3e(t)}a(Ix,"createPipelineRequest");f();f();f();f();var d7i=k8("core-rest-pipeline retryPolicy");function dTt(t,e={maxRetries:3}){return r6(t,Object.assign({logger:d7i},e))}a(dTt,"retryPolicy");f();f();var f7i={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function p7i(t,e,r){async function n(){if(Date.now()t.getToken(u,d),"tryGetAccessToken"),s.retryIntervalInMs,(p=n?.expiresOnTimestamp)!==null&&p!==void 0?p:Date.now()).then(m=>(r=null,n=m,o=d.tenantId,n)).catch(m=>{throw r=null,n=null,o=void 0,m})),r}return a(l,"refresh"),async(u,d)=>{let p=!!d.claims,h=o!==d.tenantId;return p&&(n=null),h||p||c.mustRefresh?l(u,d):(c.shouldRefresh&&l(u,d),n)}}a(fTt,"createTokenCycler");var sLr="bearerTokenAuthenticationPolicy";async function ILe(t,e){try{return[await e(t),void 0]}catch(r){if(BAe(r)&&r.response)return[r.response,r];throw r}}a(ILe,"trySendRequest");async function h7i(t){let{scopes:e,getAccessToken:r,request:n}=t,o={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions,enableCae:!0},s=await r(e,o);s&&t.request.headers.set("Authorization",`Bearer ${s.token}`)}a(h7i,"defaultAuthorizeRequest");function nLr(t){return t.status===401&&t.headers.has("WWW-Authenticate")}a(nLr,"isChallengeResponse");async function iLr(t,e){var r;let{scopes:n}=t,o=await t.getAccessToken(n,{enableCae:!0,claims:e});return o?(t.request.headers.set("Authorization",`${(r=o.tokenType)!==null&&r!==void 0?r:"Bearer"} ${o.token}`),!0):!1}a(iLr,"authorizeRequestOnCaeChallenge");function xLe(t){var e,r,n;let{credential:o,scopes:s,challengeCallbacks:c}=t,l=t.logger||BP,u={authorizeRequest:(r=(e=c?.authorizeRequest)===null||e===void 0?void 0:e.bind(c))!==null&&r!==void 0?r:h7i,authorizeRequestOnChallenge:(n=c?.authorizeRequestOnChallenge)===null||n===void 0?void 0:n.bind(c)},d=o?fTt(o):()=>Promise.resolve(null);return{name:sLr,async sendRequest(p,h){if(!p.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await u.authorizeRequest({scopes:Array.isArray(s)?s:[s],request:p,getAccessToken:d,logger:l});let m,g,A;if([m,g]=await ILe(p,h),nLr(m)){let y=oLr(m.headers.get("WWW-Authenticate"));if(y){let E;try{E=atob(y)}catch{return l.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${y}`),m}A=await iLr({scopes:Array.isArray(s)?s:[s],response:m,request:p,getAccessToken:d,logger:l},E),A&&([m,g]=await ILe(p,h))}else if(u.authorizeRequestOnChallenge&&(A=await u.authorizeRequestOnChallenge({scopes:Array.isArray(s)?s:[s],request:p,response:m,getAccessToken:d,logger:l}),A&&([m,g]=await ILe(p,h)),nLr(m)&&(y=oLr(m.headers.get("WWW-Authenticate")),y))){let E;try{E=atob(y)}catch{return l.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${y}`),m}A=await iLr({scopes:Array.isArray(s)?s:[s],response:m,request:p,getAccessToken:d,logger:l},E),A&&([m,g]=await ILe(p,h))}}if(g)throw g;return m}}}a(xLe,"bearerTokenAuthenticationPolicy");function m7i(t){let e=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,r=/(\w+)="([^"]*)"/g,n=[],o;for(;(o=e.exec(t))!==null;){let s=o[1],c=o[2],l={},u;for(;(u=r.exec(c))!==null;)l[u[1]]=u[2];n.push({scheme:s,params:l})}return n}a(m7i,"parseChallenges");function oLr(t){var e;return t?(e=m7i(t).find(n=>n.scheme==="Bearer"&&n.params.claims&&n.params.error==="insufficient_claims"))===null||e===void 0?void 0:e.params.claims:void 0}a(oLr,"getCaeChallengeClaims");f();f();f();f();f();f();var cLr=de(aLr(),1),pTt=cLr.state;function s6(t,e,r){let n=e.parameterPath,o=e.mapper,s;if(typeof n=="string"&&(n=[n]),Array.isArray(n)){if(n.length>0)if(o.isConstant)s=o.defaultValue;else{let c=lLr(t,n);!c.propertyFound&&r&&(c=lLr(r,n));let l=!1;c.propertyFound||(l=o.required||n[0]==="options"&&n.length===2),s=l?o.defaultValue:c.propertyValue}}else{o.required&&(s={});for(let c in n){let l=o.type.modelProperties[c],u=n[c],d=s6(t,{parameterPath:u,mapper:l},r);d!==void 0&&(s||(s={}),s[c]=d)}}return s}a(s6,"getOperationArgumentValueFromParameter");function lLr(t,e){let r={propertyFound:!1},n=0;for(;n=200&&r.status<300);u.headersMapper&&(s.parsedHeaders=l.serializer.deserialize(u.headersMapper,s.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return s}a(_7i,"deserializeResponseBody");function v7i(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}a(v7i,"isOperationSpecEmpty");function b7i(t,e,r,n){var o;let s=200<=t.status&&t.status<300;if(v7i(e)?s:!!r)if(r){if(!r.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let l=r??e.responses.default,u=!((o=t.request.streamResponseStatusCodes)===null||o===void 0)&&o.has(t.status)?`Unexpected status code: ${t.status}`:t.bodyAsText,d=new lre(u,{statusCode:t.status,request:t.request,response:t});if(!l)throw d;let p=l.bodyMapper,h=l.headersMapper;try{if(t.parsedBody){let m=t.parsedBody,g;if(p){let y=m;if(e.isXML&&p.type.name===DP.Sequence){y=[];let E=p.xmlElementName;typeof m=="object"&&E&&(y=m[E])}g=e.serializer.deserialize(p,y,"error.response.parsedBody",n)}let A=m.error||g||m;d.code=A.code,A.message&&(d.message=A.message),p&&(d.response.parsedBody=g)}t.headers&&h&&(d.response.parsedHeaders=e.serializer.deserialize(h,t.headers.toJSON(),"operationRes.parsedHeaders"))}catch(m){d.message=`Error "${m.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}a(b7i,"handleErrorResponse");async function T7i(t,e,r,n,o){var s;if(!(!((s=r.request.streamResponseStatusCodes)===null||s===void 0)&&s.has(r.status))&&r.bodyAsText){let c=r.bodyAsText,l=r.headers.get("Content-Type")||"",u=l?l.split(";").map(d=>d.toLowerCase()):[];try{if(u.length===0||u.some(d=>t.indexOf(d)!==-1))return r.parsedBody=JSON.parse(c),r;if(u.some(d=>e.indexOf(d)!==-1)){if(!o)throw new Error("Parsing XML not supported.");let d=await o(c,n.xml);return r.parsedBody=d,r}}catch(d){let p=`Error "${d}" occurred while parsing the response body - ${r.bodyAsText}.`,h=d.code||lre.PARSE_ERROR;throw new lre(p,{code:h,statusCode:r.status,request:r.request,response:r})}}return r}a(T7i,"parse");f();f();function fLr(t){let e=new Set;for(let r in t.responses){let n=t.responses[r];n.bodyMapper&&n.bodyMapper.type.name===DP.Stream&&e.add(Number(r))}return e}a(fLr,"getStreamingResponseStatusCodes");function LP(t){let{parameterPath:e,mapper:r}=t,n;return typeof e=="string"?n=e:Array.isArray(e)?n=e.join("."):n=r.serializedName,n}a(LP,"getPathStringFromParameter");var pLr="serializationPolicy";function mTt(t={}){let e=t.stringifyXML;return{name:pLr,async sendRequest(r,n){let o=GM(r),s=o?.operationSpec,c=o?.operationArguments;return s&&c&&(S7i(r,c,s),I7i(r,c,s,e)),n(r)}}}a(mTt,"serializationPolicy");function S7i(t,e,r){var n,o;if(r.headerParameters)for(let c of r.headerParameters){let l=s6(e,c);if(l!=null||c.mapper.required){l=r.serializer.serialize(c.mapper,l,LP(c));let u=c.mapper.headerCollectionPrefix;if(u)for(let d of Object.keys(l))t.headers.set(u+d,l[d]);else t.headers.set(c.mapper.serializedName||LP(c),l)}}let s=(o=(n=e.options)===null||n===void 0?void 0:n.requestOptions)===null||o===void 0?void 0:o.customHeaders;if(s)for(let c of Object.keys(s))t.headers.set(c,s[c])}a(S7i,"serializeHeaders");function I7i(t,e,r,n=function(){throw new Error("XML serialization unsupported!")}){var o,s,c,l,u;let d=(o=e.options)===null||o===void 0?void 0:o.serializerOptions,p={xml:{rootName:(s=d?.xml.rootName)!==null&&s!==void 0?s:"",includeRoot:(c=d?.xml.includeRoot)!==null&&c!==void 0?c:!1,xmlCharKey:(l=d?.xml.xmlCharKey)!==null&&l!==void 0?l:"_"}},h=p.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){t.body=s6(e,r.requestBody);let m=r.requestBody.mapper,{required:g,serializedName:A,xmlName:y,xmlElementName:E,xmlNamespace:_,xmlNamespacePrefix:v,nullable:b}=m,I=m.type.name;try{if(t.body!==void 0&&t.body!==null||b&&t.body===null||g){let x=LP(r.requestBody);t.body=r.serializer.serialize(m,t.body,x,p);let R=I===DP.Stream;if(r.isXML){let w=v?`xmlns:${v}`:"xmlns",P=x7i(_,w,I,t.body,p);I===DP.Sequence?t.body=n(w7i(P,E||y||A,w,_),{rootName:y||A,xmlCharKey:h}):R||(t.body=n(P,{rootName:y||A,xmlCharKey:h}))}else{if(I===DP.String&&(!((u=r.contentType)===null||u===void 0)&&u.match("text/plain")||r.mediaType==="text"))return;R||(t.body=JSON.stringify(t.body))}}}catch(x){throw new Error(`Error "${x.message}" occurred in serializing the payload - ${JSON.stringify(A,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){t.formData={};for(let m of r.formDataParameters){let g=s6(e,m);if(g!=null){let A=m.mapper.serializedName||LP(m);t.formData[A]=r.serializer.serialize(m.mapper,g,LP(m),p)}}}}a(I7i,"serializeRequestBody");function x7i(t,e,r,n,o){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let s={};return s[o.xml.xmlCharKey]=n,s["$"]={[e]:t},s}return n}a(x7i,"getXmlValueWithNamespace");function w7i(t,e,r,n){if(Array.isArray(t)||(t=[t]),!r||!n)return{[e]:t};let o={[e]:t};return o["$"]={[r]:n},o}a(w7i,"prepareXMLRootList");function gTt(t={}){let e=lTt(t??{});return t.credentialOptions&&e.addPolicy(xLe({credential:t.credentialOptions.credential,scopes:t.credentialOptions.credentialScopes})),e.addPolicy(mTt(t.serializationOptions),{phase:"Serialize"}),e.addPolicy(hTt(t.deserializationOptions),{phase:"Deserialize"}),e}a(gTt,"createClientPipeline");f();var ATt;function hLr(){return ATt||(ATt=uTt()),ATt}a(hLr,"getCachedDefaultHttpClient");f();var R7i={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function gLr(t,e,r,n){let o=P7i(e,r,n),s=!1,c=mLr(t,o);if(e.path){let d=mLr(e.path,o);e.path==="/{nextLink}"&&d.startsWith("/")&&(d=d.substring(1)),k7i(d)?(c=d,s=!0):c=N7i(c,d)}let{queryParams:l,sequenceParams:u}=D7i(e,r,n);return c=O7i(c,l,u,s),c}a(gLr,"getRequestUrl");function mLr(t,e){let r=t;for(let[n,o]of e)r=r.split(n).join(o);return r}a(mLr,"replaceAll");function P7i(t,e,r){var n;let o=new Map;if(!((n=t.urlParameters)===null||n===void 0)&&n.length)for(let s of t.urlParameters){let c=s6(e,s,r),l=LP(s);c=t.serializer.serialize(s.mapper,c,l),s.skipEncoding||(c=encodeURIComponent(c)),o.set(`{${s.mapper.serializedName||l}}`,c)}return o}a(P7i,"calculateUrlReplacements");function k7i(t){return t.includes("://")}a(k7i,"isAbsoluteUrl");function N7i(t,e){if(!e)return t;let r=new URL(t),n=r.pathname;n.endsWith("/")||(n=`${n}/`),e.startsWith("/")&&(e=e.substring(1));let o=e.indexOf("?");if(o!==-1){let s=e.substring(0,o),c=e.substring(o+1);n=n+s,c&&(r.search=r.search?`${r.search}&${c}`:c)}else n=n+e;return r.pathname=n,r.toString()}a(N7i,"appendPath");function D7i(t,e,r){var n;let o=new Map,s=new Set;if(!((n=t.queryParameters)===null||n===void 0)&&n.length)for(let c of t.queryParameters){c.mapper.type.name==="Sequence"&&c.mapper.serializedName&&s.add(c.mapper.serializedName);let l=s6(e,c,r);if(l!=null||c.mapper.required){l=t.serializer.serialize(c.mapper,l,LP(c));let u=c.collectionFormat?R7i[c.collectionFormat]:"";if(Array.isArray(l)&&(l=l.map(d=>d??"")),c.collectionFormat==="Multi"&&l.length===0)continue;Array.isArray(l)&&(c.collectionFormat==="SSV"||c.collectionFormat==="TSV")&&(l=l.join(u)),c.skipEncoding||(Array.isArray(l)?l=l.map(d=>encodeURIComponent(d)):l=encodeURIComponent(l)),Array.isArray(l)&&(c.collectionFormat==="CSV"||c.collectionFormat==="Pipes")&&(l=l.join(u)),o.set(c.mapper.serializedName||LP(c),l)}}return{queryParams:o,sequenceParams:s}}a(D7i,"calculateQueryParameters");function M7i(t){let e=new Map;if(!t||t[0]!=="?")return e;t=t.slice(1);let r=t.split("&");for(let n of r){let[o,s]=n.split("=",2),c=e.get(o);c?Array.isArray(c)?c.push(s):e.set(o,[c,s]):e.set(o,s)}return e}a(M7i,"simpleParseQueryParams");function O7i(t,e,r,n=!1){if(e.size===0)return t;let o=new URL(t),s=M7i(o.search);for(let[l,u]of e){let d=s.get(l);if(Array.isArray(d))if(Array.isArray(u)){d.push(...u);let p=new Set(d);s.set(l,Array.from(p))}else d.push(u);else d?(Array.isArray(u)?u.unshift(d):r.has(l)&&s.set(l,[d,u]),n||s.set(l,u)):s.set(l,u)}let c=[];for(let[l,u]of s)if(typeof u=="string")c.push(`${l}=${u}`);else if(Array.isArray(u))for(let d of u)c.push(`${l}=${d}`);else c.push(`${l}=${u}`);return o.search=c.length?`?${c.join("&")}`:"",o.toString()}a(O7i,"appendQueryParams");f();var yTt=k8("core-client");var LAe=class{static{a(this,"ServiceClient")}constructor(e={}){var r,n;if(this._requestContentType=e.requestContentType,this._endpoint=(r=e.endpoint)!==null&&r!==void 0?r:e.baseUri,e.baseUri&&yTt.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||hLr(),this.pipeline=e.pipeline||B7i(e),!((n=e.additionalPolicies)===null||n===void 0)&&n.length)for(let{policy:o,position:s}of e.additionalPolicies){let c=s==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(o,{afterPhase:c})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,r){let n=r.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let o=gLr(n,r,e,this),s=Ix({url:o});s.method=r.httpMethod;let c=GM(s);c.operationSpec=r,c.operationArguments=e;let l=r.contentType||this._requestContentType;l&&r.requestBody&&s.headers.set("Content-Type",l);let u=e.options;if(u){let d=u.requestOptions;d&&(d.timeout&&(s.timeout=d.timeout),d.onUploadProgress&&(s.onUploadProgress=d.onUploadProgress),d.onDownloadProgress&&(s.onDownloadProgress=d.onDownloadProgress),d.shouldDeserialize!==void 0&&(c.shouldDeserialize=d.shouldDeserialize),d.allowInsecureConnection&&(s.allowInsecureConnection=!0)),u.abortSignal&&(s.abortSignal=u.abortSignal),u.tracingOptions&&(s.tracingOptions=u.tracingOptions)}this._allowInsecureConnection&&(s.allowInsecureConnection=!0),s.streamResponseStatusCodes===void 0&&(s.streamResponseStatusCodes=fLr(r));try{let d=await this.sendRequest(s),p=Abt(d,r.responses[d.status]);return u?.onResponse&&u.onResponse(d,p),p}catch(d){if(typeof d=="object"&&d?.response){let p=d.response,h=Abt(p,r.responses[d.statusCode]||r.responses.default);d.details=h,u?.onResponse&&u.onResponse(p,h,d)}throw d}}};function B7i(t){let e=L7i(t),r=t.credential&&e?{credentialScopes:e,credential:t.credential}:void 0;return gTt(Object.assign(Object.assign({},t),{credentialOptions:r}))}a(B7i,"createDefaultPipeline");function L7i(t){if(t.credentialScopes)return t.credentialScopes;if(t.endpoint)return`${t.endpoint}/.default`;if(t.baseUri)return`${t.baseUri}/.default`;if(t.credential&&!t.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}a(L7i,"getCredentialScopes");f();f();f();function ALr(t){return t==="adfs"?"oauth2/token":"oauth2/v2.0/token"}a(ALr,"getIdentityTokenEndpointSuffix");f();var yLr="/.default",ELr="Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information";function FAe(t){let e="";if(Array.isArray(t)){if(t.length!==1)return;e=t[0]}else typeof t=="string"&&(e=t);return e.endsWith(yLr)?e.substr(0,e.lastIndexOf(yLr)):e}a(FAe,"mapScopesToResource");function CLr(t){if(typeof t.expires_on=="number")return t.expires_on*1e3;if(typeof t.expires_on=="string"){let e=+t.expires_on;if(!isNaN(e))return e*1e3;let r=Date.parse(t.expires_on);if(!isNaN(r))return r}if(typeof t.expires_in=="number")return Date.now()+t.expires_in*1e3;throw new Error(`Failed to parse token expiration from body. expires_in="${t.expires_in}", expires_on="${t.expires_on}"`)}a(CLr,"parseExpirationTimestamp");function _Lr(t){if(t.refresh_on){if(typeof t.refresh_on=="number")return t.refresh_on*1e3;if(typeof t.refresh_on=="string"){let e=+t.refresh_on;if(!isNaN(e))return e*1e3;let r=Date.parse(t.refresh_on);if(!isNaN(r))return r}throw new Error(`Failed to parse refresh_on from body. refresh_on="${t.refresh_on}"`)}else return}a(_Lr,"parseRefreshTimestamp");var UAe="noCorrelationId";function F7i(t){let e=t?.authorityHost;return F3e&&(e=e??process.env.AZURE_AUTHORITY_HOST),e??tge}a(F7i,"getIdentityClientAuthorityHost");var a6=class extends LAe{static{a(this,"IdentityClient")}authorityHost;allowLoggingAccountIdentifiers;abortControllers;allowInsecureConnection=!1;tokenCredentialOptions;constructor(e){let r=`azsdk-js-identity/${J4e}`,n=e?.userAgentOptions?.userAgentPrefix?`${e.userAgentOptions.userAgentPrefix} ${r}`:`${r}`,o=F7i(e);if(!o.startsWith("https:"))throw new Error("The authorityHost address must use the 'https' protocol.");super({requestContentType:"application/json; charset=utf-8",retryOptions:{maxRetries:3},...e,userAgentOptions:{userAgentPrefix:n},baseUri:o}),this.authorityHost=o,this.abortControllers=new Map,this.allowLoggingAccountIdentifiers=e?.loggingOptions?.allowLoggingAccountIdentifiers,this.tokenCredentialOptions={...e},e?.allowInsecureConnection&&(this.allowInsecureConnection=e.allowInsecureConnection)}async sendTokenRequest(e){v1.info(`IdentityClient: sending token request to [${e.url}]`);let r=await this.sendRequest(e);if(r.bodyAsText&&(r.status===200||r.status===201)){let n=JSON.parse(r.bodyAsText);if(!n.access_token)return null;this.logIdentifiers(r);let o={accessToken:{token:n.access_token,expiresOnTimestamp:CLr(n),refreshAfterTimestamp:_Lr(n),tokenType:"Bearer"},refreshToken:n.refresh_token};return v1.info(`IdentityClient: [${e.url}] token acquired, expires on ${o.accessToken.expiresOnTimestamp}`),o}else{let n=new P8(r.status,r.bodyAsText);throw v1.warning(`IdentityClient: authentication error. HTTP status: ${r.status}, ${n.errorResponse.errorDescription}`),n}}async refreshAccessToken(e,r,n,o,s,c={}){if(o===void 0)return null;v1.info(`IdentityClient: refreshing access token with client ID: ${r}, scopes: ${n} started`);let l={grant_type:"refresh_token",client_id:r,refresh_token:o,scope:n};s!==void 0&&(l.client_secret=s);let u=new URLSearchParams(l);return qa.withSpan("IdentityClient.refreshAccessToken",c,async d=>{try{let p=ALr(e),h=Ix({url:`${this.authorityHost}/${e}/${p}`,method:"POST",body:u.toString(),abortSignal:c.abortSignal,headers:o6({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}),tracingOptions:d.tracingOptions}),m=await this.sendTokenRequest(h);return v1.info(`IdentityClient: refreshed token for client ID: ${r}`),m}catch(p){if(p.name===Z4e&&p.errorResponse.error==="interaction_required")return v1.info(`IdentityClient: interaction required for client ID: ${r}`),null;throw v1.warning(`IdentityClient: failed refreshing token for client ID: ${r}: ${p}`),p}})}generateAbortSignal(e){let r=new AbortController,n=this.abortControllers.get(e)||[];n.push(r),this.abortControllers.set(e,n);let o=r.signal.onabort;return r.signal.onabort=(...s)=>{this.abortControllers.set(e,void 0),o&&o.apply(r.signal,s)},r.signal}abortRequests(e){let r=e||UAe,n=[...this.abortControllers.get(r)||[],...this.abortControllers.get(UAe)||[]];if(n.length){for(let o of n)o.abort();this.abortControllers.set(r,void 0)}}getCorrelationId(e){let r=e?.body?.split("&").map(n=>n.split("=")).find(([n])=>n==="client-request-id");return r&&r.length&&r[1]||UAe}async sendGetRequestAsync(e,r){let n=Ix({url:e,method:"GET",body:r?.body,allowInsecureConnection:this.allowInsecureConnection,headers:o6(r?.headers),abortSignal:this.generateAbortSignal(UAe)}),o=await this.sendRequest(n);return this.logIdentifiers(o),{body:o.bodyAsText?JSON.parse(o.bodyAsText):void 0,headers:o.headers.toJSON(),status:o.status}}async sendPostRequestAsync(e,r){let n=Ix({url:e,method:"POST",body:r?.body,headers:o6(r?.headers),allowInsecureConnection:this.allowInsecureConnection,abortSignal:this.generateAbortSignal(this.getCorrelationId(r))}),o=await this.sendRequest(n);return this.logIdentifiers(o),{body:o.bodyAsText?JSON.parse(o.bodyAsText):void 0,headers:o.headers.toJSON(),status:o.status}}getTokenCredentialOptions(){return this.tokenCredentialOptions}logIdentifiers(e){if(!this.allowLoggingAccountIdentifiers||!e.bodyAsText)return;let r="No User Principal Name available";try{let o=(e.parsedBody||JSON.parse(e.bodyAsText)).access_token;if(!o)return;let s=o.split(".")[1],{appid:c,upn:l,tid:u,oid:d}=JSON.parse(Buffer.from(s,"base64").toString("utf8"));v1.info(`[Authenticated account] Client ID: ${c}. Tenant ID: ${u}. User Principal Name: ${l||r}. Object ID (user): ${d}`)}catch(n){v1.warning("allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:",n.message)}}};f();var ETt;(function(t){t.AutoDiscoverRegion="AutoDiscoverRegion",t.USWest="westus",t.USWest2="westus2",t.USCentral="centralus",t.USEast="eastus",t.USEast2="eastus2",t.USNorthCentral="northcentralus",t.USSouthCentral="southcentralus",t.USWestCentral="westcentralus",t.CanadaCentral="canadacentral",t.CanadaEast="canadaeast",t.BrazilSouth="brazilsouth",t.EuropeNorth="northeurope",t.EuropeWest="westeurope",t.UKSouth="uksouth",t.UKWest="ukwest",t.FranceCentral="francecentral",t.FranceSouth="francesouth",t.SwitzerlandNorth="switzerlandnorth",t.SwitzerlandWest="switzerlandwest",t.GermanyNorth="germanynorth",t.GermanyWestCentral="germanywestcentral",t.NorwayWest="norwaywest",t.NorwayEast="norwayeast",t.AsiaEast="eastasia",t.AsiaSouthEast="southeastasia",t.JapanEast="japaneast",t.JapanWest="japanwest",t.AustraliaEast="australiaeast",t.AustraliaSouthEast="australiasoutheast",t.AustraliaCentral="australiacentral",t.AustraliaCentral2="australiacentral2",t.IndiaCentral="centralindia",t.IndiaSouth="southindia",t.IndiaWest="westindia",t.KoreaSouth="koreasouth",t.KoreaCentral="koreacentral",t.UAECentral="uaecentral",t.UAENorth="uaenorth",t.SouthAfricaNorth="southafricanorth",t.SouthAfricaWest="southafricawest",t.ChinaNorth="chinanorth",t.ChinaEast="chinaeast",t.ChinaNorth2="chinanorth2",t.ChinaEast2="chinaeast2",t.GermanyCentral="germanycentral",t.GermanyNorthEast="germanynortheast",t.GovernmentUSVirginia="usgovvirginia",t.GovernmentUSIowa="usgoviowa",t.GovernmentUSArizona="usgovarizona",t.GovernmentUSTexas="usgovtexas",t.GovernmentUSDodEast="usdodeast",t.GovernmentUSDodCentral="usdodcentral"})(ETt||(ETt={}));function RLe(t){let e=t;return e===void 0&&globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME!==void 0&&(e=process.env.AZURE_REGIONAL_AUTHORITY_NAME),e===ETt.AutoDiscoverRegion?"AUTO_DISCOVER":e}a(RLe,"calculateRegionalAuthority");f();f();function U7i(t){return`The current credential is not configured to acquire tokens for tenant ${t}. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add "*" to AdditionallyAllowedTenants to allow acquiring tokens for any tenant.`}a(U7i,"createConfigurationErrorMessage");function td(t,e,r=[],n){let o;if(process.env.AZURE_IDENTITY_DISABLE_MULTITENANTAUTH||t==="adfs"?o=t:o=e?.tenantId??t,t&&o!==t&&!r.includes("*")&&!r.some(s=>s.localeCompare(o)===0)){let s=U7i(o);throw n?.info(s),new un(s)}return o}a(td,"processMultiTenantRequest");function ih(t,e){if(!e.match(/^[0-9a-zA-Z-.]+$/)){let r=new Error("Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names.");throw t.info(Xo("",r)),r}}a(ih,"checkTenantId");function ure(t,e,r){return e?(ih(t,e),e):(r||(r=oH),r!==oH?"common":"organizations")}a(ure,"resolveTenantId");function kd(t){return!t||t.length===0?[]:t.includes("*")?lDr:t}a(kd,"resolveAdditionallyAllowedTenantIds");var ny=Bi("MsalClient");function tUi(t,e,r={}){let n=ure(r.logger??ny,e,t),o=mbt(n,hbt(r)),s=new a6({...r.tokenCredentialOptions,authorityHost:o,loggingOptions:r.loggingOptions});return{auth:{clientId:t,authority:o,knownAuthorities:gBr(n,o,r.disableInstanceDiscovery)},system:{networkClient:s,loggerOptions:{loggerCallback:U3e(r.logger??ny),logLevel:Q3e(iBe()),piiLoggingEnabled:r.loggingOptions?.enableUnsafeSupportLogging}}}}a(tUi,"generateMsalConfiguration");function Mg(t,e,r={}){let n={msalConfig:tUi(t,e,r),cachedAccount:r.authenticationRecord?ABr(r.authenticationRecord):null,pluginConfiguration:gDr.generatePluginConfiguration(r),logger:r.logger??ny},o=new Map;async function s(w={}){let P=w.enableCae?"CAE":"default",k=o.get(P);if(k)return n.logger.getToken.info("Existing PublicClientApplication found in cache, returning it."),k;n.logger.getToken.info(`Creating new PublicClientApplication with CAE ${w.enableCae?"enabled":"disabled"}.`);let Q=w.enableCae?n.pluginConfiguration.cache.cachePluginCae:n.pluginConfiguration.cache.cachePlugin;return n.msalConfig.auth.clientCapabilities=w.enableCae?["cp1"]:void 0,k=new Yte({...n.msalConfig,broker:{nativeBrokerPlugin:n.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await Q}}),o.set(P,k),k}a(s,"getPublicApp");let c=new Map;async function l(w={}){let P=w.enableCae?"CAE":"default",k=c.get(P);if(k)return n.logger.getToken.info("Existing ConfidentialClientApplication found in cache, returning it."),k;n.logger.getToken.info(`Creating new ConfidentialClientApplication with CAE ${w.enableCae?"enabled":"disabled"}.`);let Q=w.enableCae?n.pluginConfiguration.cache.cachePluginCae:n.pluginConfiguration.cache.cachePlugin;return n.msalConfig.auth.clientCapabilities=w.enableCae?["cp1"]:void 0,k=new Jte({...n.msalConfig,broker:{nativeBrokerPlugin:n.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await Q}}),c.set(P,k),k}a(l,"getConfidentialApp");async function u(w,P,k={}){if(n.cachedAccount===null)throw n.logger.getToken.info("No cached account found in local state."),new sT({scopes:P});k.claims&&(n.cachedClaims=k.claims);let Q={account:n.cachedAccount,scopes:P,claims:n.cachedClaims};n.pluginConfiguration.broker.isEnabled&&(Q.tokenQueryParameters||={},n.pluginConfiguration.broker.enableMsaPassthrough&&(Q.tokenQueryParameters.msal_request_type="consumer_passthrough")),k.proofOfPossessionOptions&&(Q.shrNonce=k.proofOfPossessionOptions.nonce,Q.authenticationScheme="pop",Q.resourceRequestMethod=k.proofOfPossessionOptions.resourceRequestMethod,Q.resourceRequestUri=k.proofOfPossessionOptions.resourceRequestUrl),n.logger.getToken.info("Attempting to acquire token silently");try{return await w.acquireTokenSilent(Q)}catch(M){throw ej(P,M,k)}}a(u,"getTokenSilent");function d(w){return w?.tenantId?mbt(w.tenantId,hbt(r)):n.msalConfig.auth.authority}a(d,"calculateRequestAuthority");async function p(w,P,k,Q){let M=null;try{M=await u(w,P,k)}catch(D){if(D.name!=="AuthenticationRequiredError")throw D;if(k.disableAutomaticAuthentication)throw new sT({scopes:P,getTokenOptions:k,message:"Automatic authentication has been disabled. You may call the authentication() method."})}if(M===null)try{M=await Q()}catch(D){throw ej(P,D,k)}return ZH(P,M,k),n.cachedAccount=M?.account??null,n.logger.getToken.info(fp(P)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}a(p,"withSilentAuthentication");async function h(w,P,k={}){n.logger.getToken.info("Attempting to acquire token using client secret"),n.msalConfig.auth.clientSecret=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:w,authority:d(k),azureRegion:RLe(),claims:k?.claims});return ZH(w,M,k),n.logger.getToken.info(fp(w)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw ej(w,M,k)}}a(h,"getTokenByClientSecret");async function m(w,P,k={}){n.logger.getToken.info("Attempting to acquire token using client assertion"),n.msalConfig.auth.clientAssertion=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:w,authority:d(k),azureRegion:RLe(),claims:k?.claims,clientAssertion:P});return ZH(w,M,k),n.logger.getToken.info(fp(w)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw ej(w,M,k)}}a(m,"getTokenByClientAssertion");async function g(w,P,k={}){n.logger.getToken.info("Attempting to acquire token using client certificate"),n.msalConfig.auth.clientCertificate=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:w,authority:d(k),azureRegion:RLe(),claims:k?.claims});return ZH(w,M,k),n.logger.getToken.info(fp(w)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw ej(w,M,k)}}a(g,"getTokenByClientCertificate");async function A(w,P,k={}){n.logger.getToken.info("Attempting to acquire token using device code");let Q=await s(k);return p(Q,w,k,()=>{let M={scopes:w,cancel:k?.abortSignal?.aborted??!1,deviceCodeCallback:P,authority:d(k),claims:k?.claims},D=Q.acquireTokenByDeviceCode(M);return k.abortSignal&&k.abortSignal.addEventListener("abort",()=>{M.cancel=!0}),D})}a(A,"getTokenByDeviceCode");async function y(w,P,k,Q={}){n.logger.getToken.info("Attempting to acquire token using username and password");let M=await s(Q);return p(M,w,Q,()=>{let D={scopes:w,username:P,password:k,authority:d(Q),claims:Q?.claims};return M.acquireTokenByUsernamePassword(D)})}a(y,"getTokenByUsernamePassword");function E(){if(n.cachedAccount)return yBr(t,n.cachedAccount)}a(E,"getActiveAccount");async function _(w,P,k,Q,M={}){n.logger.getToken.info("Attempting to acquire token using authorization code");let D;return Q?(n.msalConfig.auth.clientSecret=Q,D=await l(M)):D=await s(M),p(D,w,M,()=>D.acquireTokenByCode({scopes:w,redirectUri:P,code:k,authority:d(M),claims:M?.claims}))}a(_,"getTokenByAuthorizationCode");async function v(w,P,k,Q={}){ny.getToken.info("Attempting to acquire token on behalf of another user"),typeof k=="string"?(ny.getToken.info("Using client secret for on behalf of flow"),n.msalConfig.auth.clientSecret=k):typeof k=="function"?(ny.getToken.info("Using client assertion callback for on behalf of flow"),n.msalConfig.auth.clientAssertion=k):(ny.getToken.info("Using client certificate for on behalf of flow"),n.msalConfig.auth.clientCertificate=k);let M=await l(Q);try{let D=await M.acquireTokenOnBehalfOf({scopes:w,authority:d(Q),claims:Q.claims,oboAssertion:P});return ZH(w,D,Q),ny.getToken.info(fp(w)),{token:D.accessToken,expiresOnTimestamp:D.expiresOn.getTime(),refreshAfterTimestamp:D.refreshOn?.getTime(),tokenType:D.tokenType}}catch(D){throw ej(w,D,Q)}}a(v,"getTokenOnBehalfOf");function b(w,P){return{openBrowser:a(async k=>{await(await Promise.resolve().then(()=>(MLe(),KLr))).default(k,{newInstance:!0})},"openBrowser"),scopes:w,authority:d(P),claims:P?.claims,loginHint:P?.loginHint,errorTemplate:P?.browserCustomizationOptions?.errorMessage,successTemplate:P?.browserCustomizationOptions?.successMessage,prompt:P?.loginHint?"login":"select_account"}}a(b,"createBaseInteractiveRequest");async function I(w,P,k={}){ny.verbose("Authentication will resume through the broker");let Q=await s(k),M=b(w,k);n.pluginConfiguration.broker.parentWindowHandle?M.windowHandle=Buffer.from(n.pluginConfiguration.broker.parentWindowHandle):ny.warning("Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle."),n.pluginConfiguration.broker.enableMsaPassthrough&&((M.tokenQueryParameters??={}).msal_request_type="consumer_passthrough"),P?(M.prompt="none",ny.verbose("Attempting broker authentication using the default broker account")):ny.verbose("Attempting broker authentication without the default broker account"),k.proofOfPossessionOptions&&(M.shrNonce=k.proofOfPossessionOptions.nonce,M.authenticationScheme="pop",M.resourceRequestMethod=k.proofOfPossessionOptions.resourceRequestMethod,M.resourceRequestUri=k.proofOfPossessionOptions.resourceRequestUrl);try{return await Q.acquireTokenInteractive(M)}catch(D){if(ny.verbose(`Failed to authenticate through the broker: ${D.message}`),k.disableAutomaticAuthentication)throw new sT({scopes:w,getTokenOptions:k,message:"Cannot silently authenticate with default broker account."});if(P)return I(w,!1,k);throw D}}a(I,"getBrokeredTokenInternal");async function x(w,P,k={}){ny.getToken.info(`Attempting to acquire token using brokered authentication with useDefaultBrokerAccount: ${P}`);let Q=await I(w,P,k);return ZH(w,Q,k),n.cachedAccount=Q?.account??null,n.logger.getToken.info(fp(w)),{token:Q.accessToken,expiresOnTimestamp:Q.expiresOn.getTime(),refreshAfterTimestamp:Q.refreshOn?.getTime(),tokenType:Q.tokenType}}a(x,"getBrokeredToken");async function R(w,P={}){ny.getToken.info("Attempting to acquire token interactively");let k=await s(P);return p(k,w,P,async()=>{let Q=b(w,P);return n.pluginConfiguration.broker.isEnabled?I(w,n.pluginConfiguration.broker.useDefaultBrokerAccount??!1,P):(P.proofOfPossessionOptions&&(Q.shrNonce=P.proofOfPossessionOptions.nonce,Q.authenticationScheme="pop",Q.resourceRequestMethod=P.proofOfPossessionOptions.resourceRequestMethod,Q.resourceRequestUri=P.proofOfPossessionOptions.resourceRequestUrl),k.acquireTokenInteractive(Q))})}return a(R,"getTokenByInteractiveRequest"),{getActiveAccount:E,getBrokeredToken:x,getTokenByClientSecret:h,getTokenByClientAssertion:m,getTokenByClientCertificate:g,getTokenByDeviceCode:A,getTokenByUsernamePassword:y,getTokenByAuthorizationCode:_,getTokenOnBehalfOf:v,getTokenByInteractiveRequest:R}}a(Mg,"createMsalClient");var jAe=require("node:crypto");var XLr=require("node:fs/promises");var HAe="ClientCertificateCredential",JLr=Bi(HAe),$Ae=class{static{a(this,"ClientCertificateCredential")}tenantId;additionallyAllowedTenantIds;certificateConfiguration;sendCertificateChain;msalClient;constructor(e,r,n,o={}){if(!e||!r)throw new Error(`${HAe}: tenantId and clientId are required parameters.`);this.tenantId=e,this.additionallyAllowedTenantIds=kd(o?.additionallyAllowedTenants),this.sendCertificateChain=o.sendCertificateChain,this.certificateConfiguration={...typeof n=="string"?{certificatePath:n}:n};let s=this.certificateConfiguration.certificate,c=this.certificateConfiguration.certificatePath;if(!this.certificateConfiguration||!(s||c))throw new Error(`${HAe}: Provide either a PEM certificate in string form, or the path to that certificate in the filesystem. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(s&&c)throw new Error(`${HAe}: To avoid unexpected behaviors, providing both the contents of a PEM certificate and the path to a PEM certificate is forbidden. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);this.msalClient=Mg(r,e,{...o,logger:JLr,tokenCredentialOptions:o})}async getToken(e,r={}){return qa.withSpan(`${HAe}.getToken`,r,async n=>{n.tenantId=td(this.tenantId,n,this.additionallyAllowedTenantIds,JLr);let o=Array.isArray(e)?e:[e],s=await this.buildClientCertificate();return this.msalClient.getTokenByClientCertificate(o,s,n)})}async buildClientCertificate(){let e=await rUi(this.certificateConfiguration,this.sendCertificateChain??!1),r;return this.certificateConfiguration.certificatePassword!==void 0?r=(0,jAe.createPrivateKey)({key:e.certificateContents,passphrase:this.certificateConfiguration.certificatePassword,format:"pem"}).export({format:"pem",type:"pkcs8"}).toString():r=e.certificateContents,{thumbprint:e.thumbprint,thumbprintSha256:e.thumbprintSha256,privateKey:r,x5c:e.x5c}}};async function rUi(t,e){let r=t.certificate,n=t.certificatePath,o=r||await(0,XLr.readFile)(n,"utf8"),s=e?o:void 0,c=/(-+BEGIN CERTIFICATE-+)(\n\r?|\r\n?)([A-Za-z0-9+/\n\r]+=*)(\n\r?|\r\n?)(-+END CERTIFICATE-+)/g,l=[],u;do u=c.exec(o),u&&l.push(u[3]);while(u);if(l.length===0)throw new Error("The file at the specified path does not contain a PEM-encoded certificate.");let d=(0,jAe.createHash)("sha1").update(Buffer.from(l[0],"base64")).digest("hex").toUpperCase(),p=(0,jAe.createHash)("sha256").update(Buffer.from(l[0],"base64")).digest("hex").toUpperCase();return{certificateContents:o,thumbprintSha256:p,thumbprint:d,x5c:s}}a(rUi,"parseCertificate");f();f();function gT(t){return Array.isArray(t)?t:[t]}a(gT,"ensureScopes");function pre(t,e){if(!t.match(/^[0-9a-zA-Z-_.:/]+$/)){let r=new Error("Invalid scope was specified by the user or calling client");throw e.getToken.info(Xo(t,r)),r}}a(pre,"ensureValidScopeForDevTimeCreds");function OLe(t){return t.replace(/\/.default$/,"")}a(OLe,"getScopeResource");var ZLr=Bi("ClientSecretCredential"),VAe=class{static{a(this,"ClientSecretCredential")}tenantId;additionallyAllowedTenantIds;msalClient;clientSecret;constructor(e,r,n,o={}){if(!e)throw new un("ClientSecretCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!r)throw new un("ClientSecretCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!n)throw new un("ClientSecretCredential: clientSecret is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");this.clientSecret=n,this.tenantId=e,this.additionallyAllowedTenantIds=kd(o?.additionallyAllowedTenants),this.msalClient=Mg(r,e,{...o,logger:ZLr,tokenCredentialOptions:o})}async getToken(e,r={}){return qa.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=td(this.tenantId,n,this.additionallyAllowedTenantIds,ZLr);let o=gT(e);return this.msalClient.getTokenByClientSecret(o,this.clientSecret,n)})}};f();var nUi=Bi("UsernamePasswordCredential"),WAe=class{static{a(this,"UsernamePasswordCredential")}tenantId;additionallyAllowedTenantIds;msalClient;username;password;constructor(e,r,n,o,s={}){if(!e)throw new un("UsernamePasswordCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!r)throw new un("UsernamePasswordCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!n)throw new un("UsernamePasswordCredential: username is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!o)throw new un("UsernamePasswordCredential: password is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");this.tenantId=e,this.additionallyAllowedTenantIds=kd(s?.additionallyAllowedTenants),this.username=n,this.password=o,this.msalClient=Mg(r,this.tenantId,{...s,tokenCredentialOptions:s??{}})}async getToken(e,r={}){return qa.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=td(this.tenantId,n,this.additionallyAllowedTenantIds,nUi);let o=gT(e);return this.msalClient.getTokenByUsernamePassword(o,this.username,this.password,n)})}};var iUi=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_CLIENT_SECRET","AZURE_CLIENT_CERTIFICATE_PATH","AZURE_CLIENT_CERTIFICATE_PASSWORD","AZURE_USERNAME","AZURE_PASSWORD","AZURE_ADDITIONALLY_ALLOWED_TENANTS","AZURE_CLIENT_SEND_CERTIFICATE_CHAIN"];function oUi(){return(process.env.AZURE_ADDITIONALLY_ALLOWED_TENANTS??"").split(";")}a(oUi,"getAdditionallyAllowedTenants");var BLe="EnvironmentCredential",HM=Bi(BLe);function sUi(){let t=(process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN??"").toLowerCase(),e=t==="true"||t==="1";return HM.verbose(`AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: ${process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN}; sendCertificateChain: ${e}`),e}a(sUi,"getSendCertificateChain");var zAe=class{static{a(this,"EnvironmentCredential")}_credential=void 0;constructor(e){let r=oBe(iUi).assigned.join(", ");HM.info(`Found the following environment variables: ${r}`);let n=process.env.AZURE_TENANT_ID,o=process.env.AZURE_CLIENT_ID,s=process.env.AZURE_CLIENT_SECRET,c=oUi(),l=sUi(),u={...e,additionallyAllowedTenantIds:c,sendCertificateChain:l};if(n&&ih(HM,n),n&&o&&s){HM.info(`Invoking ClientSecretCredential with tenant ID: ${n}, clientId: ${o} and clientSecret: [REDACTED]`),this._credential=new VAe(n,o,s,u);return}let d=process.env.AZURE_CLIENT_CERTIFICATE_PATH,p=process.env.AZURE_CLIENT_CERTIFICATE_PASSWORD;if(n&&o&&d){HM.info(`Invoking ClientCertificateCredential with tenant ID: ${n}, clientId: ${o} and certificatePath: ${d}`),this._credential=new $Ae(n,o,{certificatePath:d,certificatePassword:p},u);return}let h=process.env.AZURE_USERNAME,m=process.env.AZURE_PASSWORD;n&&o&&h&&m&&(HM.info(`Invoking UsernamePasswordCredential with tenant ID: ${n}, clientId: ${o} and username: ${h}`),HM.warning("Environment is configured to use username and password authentication. This authentication method is deprecated, as it doesn't support multifactor authentication (MFA). Use a more secure credential. For more details, see https://aka.ms/azsdk/identity/mfa."),this._credential=new WAe(n,o,h,m,u))}async getToken(e,r={}){return qa.withSpan(`${BLe}.getToken`,r,async n=>{if(this._credential)try{let o=await this._credential.getToken(e,n);return HM.getToken.info(fp(e)),o}catch(o){let s=new P8(400,{error:`${BLe} authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,error_description:o.message.toString().split("More details:").join("")});throw HM.getToken.info(Xo(e,s)),s}throw new un(`${BLe} is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`)})}};f();f();var aUi=1e3*64,cUi=3e3;function e8r(t){return dTt([{name:"imdsRetryPolicy",retry:a(({retryCount:e,response:r})=>{if(r?.status!==404&&r?.status!==410)return{skipStrategy:!0};let n=r?.status===410?Math.max(cUi,t.startDelayInMs):t.startDelayInMs;return hBr(e,{retryDelayInMs:n,maxRetryDelayInMs:aUi})},"retry")}],{maxRetries:t.maxRetries})}a(e8r,"imdsRetryPolicy");f();var jM="ManagedIdentityCredential - IMDS",rj=Bi(jM),lUi="http://169.254.169.254",uUi="/metadata/identity/oauth2/token";function dUi(t){if(!FAe(t))throw new Error(`${jM}: Multiple scopes are not supported.`);let r=new URL(uUi,process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST??lUi),n={Accept:"application/json"};return{url:`${r}`,method:"GET",headers:o6(n)}}a(dUi,"prepareInvalidRequestOptions");var t8r={name:"imdsMsi",async isAvailable(t){let{scopes:e,identityClient:r,getTokenOptions:n}=t,o=FAe(e);if(!o)return rj.info(`${jM}: Unavailable. Multiple scopes are not supported.`),!1;if(process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST)return!0;if(!r)throw new Error("Missing IdentityClient");let s=dUi(o);return qa.withSpan("ManagedIdentityCredential-pingImdsEndpoint",n??{},async c=>{s.tracingOptions=c.tracingOptions;let l=Ix(s);l.timeout=c.requestOptions?.timeout||1e3,l.allowInsecureConnection=!0;let u;try{rj.info(`${jM}: Pinging the Azure IMDS endpoint`),u=await r.sendRequest(l)}catch(d){return L3e(d)&&rj.verbose(`${jM}: Caught error ${d.name}: ${d.message}`),rj.info(`${jM}: The Azure IMDS endpoint is unavailable`),!1}return u.status===403&&u.bodyAsText?.includes("unreachable")?(rj.info(`${jM}: The Azure IMDS endpoint is unavailable`),rj.info(`${jM}: ${u.bodyAsText}`),!1):(rj.info(`${jM}: The Azure IMDS endpoint is available`),!0)})}};f();f();f();var r8r=Bi("ClientAssertionCredential"),hre=class{static{a(this,"ClientAssertionCredential")}msalClient;tenantId;additionallyAllowedTenantIds;getAssertion;options;constructor(e,r,n,o={}){if(!e)throw new un("ClientAssertionCredential: tenantId is a required parameter.");if(!r)throw new un("ClientAssertionCredential: clientId is a required parameter.");if(!n)throw new un("ClientAssertionCredential: clientAssertion is a required parameter.");this.tenantId=e,this.additionallyAllowedTenantIds=kd(o?.additionallyAllowedTenants),this.options=o,this.getAssertion=n,this.msalClient=Mg(r,e,{...o,logger:r8r,tokenCredentialOptions:this.options})}async getToken(e,r={}){return qa.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=td(this.tenantId,n,this.additionallyAllowedTenantIds,r8r);let o=Array.isArray(e)?e:[e];return this.msalClient.getTokenByClientAssertion(o,this.getAssertion,n)})}};var n8r=require("node:fs/promises");var nj="WorkloadIdentityCredential",fUi=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_FEDERATED_TOKEN_FILE"],YAe=Bi(nj),$M=class{static{a(this,"WorkloadIdentityCredential")}client;azureFederatedTokenFileContent=void 0;cacheDate=void 0;federatedTokenFilePath;constructor(e){let r=oBe(fUi).assigned.join(", ");YAe.info(`Found the following environment variables: ${r}`);let n=e??{},o=n.tenantId||process.env.AZURE_TENANT_ID,s=n.clientId||process.env.AZURE_CLIENT_ID;if(this.federatedTokenFilePath=n.tokenFilePath||process.env.AZURE_FEDERATED_TOKEN_FILE,o&&ih(YAe,o),!s)throw new un(`${nj}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_CLIENT_ID". - See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!o)throw new un(`${nj}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_TENANT_ID". - See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!this.federatedTokenFilePath)throw new un(`${nj}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_FEDERATED_TOKEN_FILE". - See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);YAe.info(`Invoking ClientAssertionCredential with tenant ID: ${o}, clientId: ${n.clientId} and federated token path: [REDACTED]`),this.client=new hre(o,s,this.readFileContents.bind(this),e)}async getToken(e,r){if(!this.client){let n=`${nj}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. +`,"utf-8")],o=VUi(n);o&&t.headers.set("Content-Length",o),t.body=await jLr(n)}a(WUi,"buildRequestBody");var Nge="multipartPolicy",zUi=70,YUi=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function KUi(t){if(t.length>zUi)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!YUi.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}a(KUi,"assertValidBoundary");function w3e(){return{name:Nge,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,o=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=o.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${o}`);let[,c,l]=s;if(l&&n&&l!==n)throw new Error(`Multipart boundary was specified as ${l} in the header, but got ${n} in the request body`);return n??(n=l),n?KUi(n):n=HUi(),t.headers.set("Content-Type",`${c}; boundary=${n}`),await WUi(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}a(w3e,"multipartPolicy");f();f();f();f();f();f();f();f();f();f();f();f();function R3e(){return e3e()}a(R3e,"createEmptyPipeline");f();f();f();var TP=p8("core-rest-pipeline");f();f();f();f();function gTt(t={}){return o3e(Object.assign({logger:TP.info},t))}a(gTt,"logPolicy");f();function ATt(t={}){return s3e(t)}a(ATt,"redirectPolicy");f();f();f();var bte=de(require("node:os"),1),P3e=de(require("node:process"),1);function $Lr(){return"User-Agent"}a($Lr,"getHeaderName");async function VLr(t){if(P3e&&P3e.versions){let e=P3e.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${bte.arch()}-${bte.type()}-${bte.release()})`)}a(VLr,"setPlatformSpecificData");f();var k3e="1.22.0";function oQi(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}a(oQi,"getUserAgentString");function WLr(){return $Lr()}a(WLr,"getUserAgentHeaderName");async function D3e(t){let e=new Map;e.set("core-rest-pipeline",k3e),await VLr(e);let r=oQi(e);return t?`${t} ${r}`:r}a(D3e,"getUserAgentValue");var zLr=WLr(),YLr="userAgentPolicy";function yTt(t={}){let e=D3e(t.userAgentPrefix);return{name:YLr,async sendRequest(r,n){return r.headers.has(zLr)||r.headers.set(zLr,await e),n(r)}}}a(yTt,"userAgentPolicy");f();f();var KLr=Symbol("rawContent");function ETt(t){return typeof t[KLr]=="function"}a(ETt,"hasRawContent");function JLr(t){return ETt(t)?t[KLr]():t}a(JLr,"getRawContent");var N3e=Nge;function _Tt(){let t=w3e();return{name:N3e,sendRequest:a(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)ETt(n.body)&&(n.body=JLr(n.body));return t.sendRequest(e,r)},"sendRequest")}}a(_Tt,"multipartPolicy");f();function CTt(){return a3e()}a(CTt,"decompressResponsePolicy");f();function vTt(t={}){return l3e(t)}a(vTt,"defaultRetryPolicy");f();function bTt(){return u3e()}a(bTt,"formDataPolicy");f();function TTt(t,e){return E3e(t,e)}a(TTt,"proxyPolicy");f();var XLr="setClientRequestIdPolicy";function STt(t="x-ms-client-request-id"){return{name:XLr,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}a(STt,"setClientRequestIdPolicy");f();function ITt(t){return _3e(t)}a(ITt,"agentPolicy");f();function xTt(t){return C3e(t)}a(xTt,"tlsPolicy");f();f();var Tte=sm;function Mge(t){return t3e(t)}a(Mge,"isRestError");var ZLr="tracingPolicy";function wTt(t={}){let e=D3e(t.userAgentPrefix),r=new px({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=sQi();return{name:ZLr,async sendRequest(o,s){var c;if(!n)return s(o);let l=await e,u={"http.url":r.sanitizeUrl(o.url),"http.method":o.method,"http.user_agent":l,requestId:o.requestId};l&&(u["http.user_agent"]=l);let{span:d,tracingContext:p}=(c=aQi(n,o,u))!==null&&c!==void 0?c:{};if(!d||!p)return s(o);try{let h=await n.withContext(p,s,o);return lQi(d,h),h}catch(h){throw cQi(d,h),h}}}}a(wTt,"tracingPolicy");function sQi(){try{return yme({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:k3e})}catch(t){TP.warning(`Error when creating the TracingClient: ${gte(t)}`);return}}a(sQi,"tryCreateTracingClient");function aQi(t,e,r){try{let{span:n,updatedOptions:o}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let s=t.createRequestHeaders(o.tracingOptions.tracingContext);for(let[c,l]of Object.entries(s))e.headers.set(c,l);return{span:n,tracingContext:o.tracingOptions.tracingContext}}catch(n){TP.warning(`Skipping creating a tracing span due to an error: ${gte(n)}`);return}}a(aQi,"tryCreateSpan");function cQi(t,e){try{t.setStatus({status:"error",error:VBe(e)?e:void 0}),Mge(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){TP.warning(`Skipping tracing span processing due to an error: ${gte(r)}`)}}a(cQi,"tryProcessError");function lQi(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),e.status>=400&&t.setStatus({status:"error"}),t.end()}catch(r){TP.warning(`Skipping tracing span processing due to an error: ${gte(r)}`)}}a(lQi,"tryProcessResponse");f();f();function M3e(t){if(t instanceof AbortSignal)return{abortSignal:t};if(t.aborted)return{abortSignal:AbortSignal.abort(t.reason)};let e=new AbortController,r=!0;function n(){r&&(t.removeEventListener("abort",o),r=!1)}a(n,"cleanup");function o(){e.abort(t.reason),n()}return a(o,"listener"),t.addEventListener("abort",o),{abortSignal:e.signal,cleanup:n}}a(M3e,"wrapAbortSignalLike");var uQi="wrapAbortSignalLikePolicy";function e8r(){return{name:uQi,sendRequest:a(async(t,e)=>{if(!t.abortSignal)return e(t);let{abortSignal:r,cleanup:n}=M3e(t.abortSignal);t.abortSignal=r;try{return await e(t)}finally{n?.()}},"sendRequest")}}a(e8r,"wrapAbortSignalLikePolicy");function RTt(t){var e;let r=R3e();return Ate&&(t.agent&&r.addPolicy(ITt(t.agent)),t.tlsOptions&&r.addPolicy(xTt(t.tlsOptions)),r.addPolicy(TTt(t.proxyOptions)),r.addPolicy(CTt())),r.addPolicy(e8r()),r.addPolicy(bTt(),{beforePolicies:[N3e]}),r.addPolicy(yTt(t.userAgentOptions)),r.addPolicy(STt((e=t.telemetryOptions)===null||e===void 0?void 0:e.clientRequestIdHeaderName)),r.addPolicy(_Tt(),{afterPhase:"Deserialize"}),r.addPolicy(vTt(t.retryOptions),{phase:"Retry"}),r.addPolicy(wTt(Object.assign(Object.assign({},t.userAgentOptions),t.loggingOptions)),{afterPhase:"Retry"}),Ate&&r.addPolicy(ATt(t.redirectOptions),{afterPhase:"Retry"}),r.addPolicy(gTt(t.loggingOptions),{afterPhase:"Sign"}),r}a(RTt,"createPipelineFromOptions");f();function PTt(){let t=i3e();return{async sendRequest(e){let{abortSignal:r,cleanup:n}=e.abortSignal?M3e(e.abortSignal):{};try{return e.abortSignal=r,await t.sendRequest(e)}finally{n?.()}}}}a(PTt,"createDefaultHttpClient");f();function D8(t){return g1(t)}a(D8,"createHttpHeaders");f();function mx(t){return ZBe(t)}a(mx,"createPipelineRequest");f();f();f();f();var fQi=p8("core-rest-pipeline retryPolicy");function kTt(t,e={maxRetries:3}){return R8(t,Object.assign({logger:fQi},e))}a(kTt,"retryPolicy");f();f();var pQi={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function hQi(t,e,r){async function n(){if(Date.now()t.getToken(u,d),"tryGetAccessToken"),s.retryIntervalInMs,(p=n?.expiresOnTimestamp)!==null&&p!==void 0?p:Date.now()).then(m=>(r=null,n=m,o=d.tenantId,n)).catch(m=>{throw r=null,n=null,o=void 0,m})),r}return a(l,"refresh"),async(u,d)=>{let p=!!d.claims,h=o!==d.tenantId;return p&&(n=null),h||p||c.mustRefresh?l(u,d):(c.shouldRefresh&&l(u,d),n)}}a(DTt,"createTokenCycler");var i8r="bearerTokenAuthenticationPolicy";async function O3e(t,e){try{return[await e(t),void 0]}catch(r){if(Mge(r)&&r.response)return[r.response,r];throw r}}a(O3e,"trySendRequest");async function mQi(t){let{scopes:e,getAccessToken:r,request:n}=t,o={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions,enableCae:!0},s=await r(e,o);s&&t.request.headers.set("Authorization",`Bearer ${s.token}`)}a(mQi,"defaultAuthorizeRequest");function t8r(t){return t.status===401&&t.headers.has("WWW-Authenticate")}a(t8r,"isChallengeResponse");async function r8r(t,e){var r;let{scopes:n}=t,o=await t.getAccessToken(n,{enableCae:!0,claims:e});return o?(t.request.headers.set("Authorization",`${(r=o.tokenType)!==null&&r!==void 0?r:"Bearer"} ${o.token}`),!0):!1}a(r8r,"authorizeRequestOnCaeChallenge");function B3e(t){var e,r,n;let{credential:o,scopes:s,challengeCallbacks:c}=t,l=t.logger||TP,u={authorizeRequest:(r=(e=c?.authorizeRequest)===null||e===void 0?void 0:e.bind(c))!==null&&r!==void 0?r:mQi,authorizeRequestOnChallenge:(n=c?.authorizeRequestOnChallenge)===null||n===void 0?void 0:n.bind(c)},d=o?DTt(o):()=>Promise.resolve(null);return{name:i8r,async sendRequest(p,h){if(!p.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await u.authorizeRequest({scopes:Array.isArray(s)?s:[s],request:p,getAccessToken:d,logger:l});let m,g,A;if([m,g]=await O3e(p,h),t8r(m)){let y=n8r(m.headers.get("WWW-Authenticate"));if(y){let E;try{E=atob(y)}catch{return l.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${y}`),m}A=await r8r({scopes:Array.isArray(s)?s:[s],response:m,request:p,getAccessToken:d,logger:l},E),A&&([m,g]=await O3e(p,h))}else if(u.authorizeRequestOnChallenge&&(A=await u.authorizeRequestOnChallenge({scopes:Array.isArray(s)?s:[s],request:p,response:m,getAccessToken:d,logger:l}),A&&([m,g]=await O3e(p,h)),t8r(m)&&(y=n8r(m.headers.get("WWW-Authenticate")),y))){let E;try{E=atob(y)}catch{return l.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${y}`),m}A=await r8r({scopes:Array.isArray(s)?s:[s],response:m,request:p,getAccessToken:d,logger:l},E),A&&([m,g]=await O3e(p,h))}}if(g)throw g;return m}}}a(B3e,"bearerTokenAuthenticationPolicy");function gQi(t){let e=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,r=/(\w+)="([^"]*)"/g,n=[],o;for(;(o=e.exec(t))!==null;){let s=o[1],c=o[2],l={},u;for(;(u=r.exec(c))!==null;)l[u[1]]=u[2];n.push({scheme:s,params:l})}return n}a(gQi,"parseChallenges");function n8r(t){var e;return t?(e=gQi(t).find(n=>n.scheme==="Bearer"&&n.params.claims&&n.params.error==="insufficient_claims"))===null||e===void 0?void 0:e.params.claims:void 0}a(n8r,"getCaeChallengeClaims");f();f();f();f();f();f();var s8r=de(o8r(),1),NTt=s8r.state;function N8(t,e,r){let n=e.parameterPath,o=e.mapper,s;if(typeof n=="string"&&(n=[n]),Array.isArray(n)){if(n.length>0)if(o.isConstant)s=o.defaultValue;else{let c=a8r(t,n);!c.propertyFound&&r&&(c=a8r(r,n));let l=!1;c.propertyFound||(l=o.required||n[0]==="options"&&n.length===2),s=l?o.defaultValue:c.propertyValue}}else{o.required&&(s={});for(let c in n){let l=o.type.modelProperties[c],u=n[c],d=N8(t,{parameterPath:u,mapper:l},r);d!==void 0&&(s||(s={}),s[c]=d)}}return s}a(N8,"getOperationArgumentValueFromParameter");function a8r(t,e){let r={propertyFound:!1},n=0;for(;n=200&&r.status<300);u.headersMapper&&(s.parsedHeaders=l.serializer.deserialize(u.headersMapper,s.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return s}a(vQi,"deserializeResponseBody");function bQi(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}a(bQi,"isOperationSpecEmpty");function TQi(t,e,r,n){var o;let s=200<=t.status&&t.status<300;if(bQi(e)?s:!!r)if(r){if(!r.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let l=r??e.responses.default,u=!((o=t.request.streamResponseStatusCodes)===null||o===void 0)&&o.has(t.status)?`Unexpected status code: ${t.status}`:t.bodyAsText,d=new Tte(u,{statusCode:t.status,request:t.request,response:t});if(!l)throw d;let p=l.bodyMapper,h=l.headersMapper;try{if(t.parsedBody){let m=t.parsedBody,g;if(p){let y=m;if(e.isXML&&p.type.name===CP.Sequence){y=[];let E=p.xmlElementName;typeof m=="object"&&E&&(y=m[E])}g=e.serializer.deserialize(p,y,"error.response.parsedBody",n)}let A=m.error||g||m;d.code=A.code,A.message&&(d.message=A.message),p&&(d.response.parsedBody=g)}t.headers&&h&&(d.response.parsedHeaders=e.serializer.deserialize(h,t.headers.toJSON(),"operationRes.parsedHeaders"))}catch(m){d.message=`Error "${m.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}a(TQi,"handleErrorResponse");async function SQi(t,e,r,n,o){var s;if(!(!((s=r.request.streamResponseStatusCodes)===null||s===void 0)&&s.has(r.status))&&r.bodyAsText){let c=r.bodyAsText,l=r.headers.get("Content-Type")||"",u=l?l.split(";").map(d=>d.toLowerCase()):[];try{if(u.length===0||u.some(d=>t.indexOf(d)!==-1))return r.parsedBody=JSON.parse(c),r;if(u.some(d=>e.indexOf(d)!==-1)){if(!o)throw new Error("Parsing XML not supported.");let d=await o(c,n.xml);return r.parsedBody=d,r}}catch(d){let p=`Error "${d}" occurred while parsing the response body - ${r.bodyAsText}.`,h=d.code||Tte.PARSE_ERROR;throw new Tte(p,{code:h,statusCode:r.status,request:r.request,response:r})}}return r}a(SQi,"parse");f();f();function u8r(t){let e=new Set;for(let r in t.responses){let n=t.responses[r];n.bodyMapper&&n.bodyMapper.type.name===CP.Stream&&e.add(Number(r))}return e}a(u8r,"getStreamingResponseStatusCodes");function SP(t){let{parameterPath:e,mapper:r}=t,n;return typeof e=="string"?n=e:Array.isArray(e)?n=e.join("."):n=r.serializedName,n}a(SP,"getPathStringFromParameter");var d8r="serializationPolicy";function OTt(t={}){let e=t.stringifyXML;return{name:d8r,async sendRequest(r,n){let o=TM(r),s=o?.operationSpec,c=o?.operationArguments;return s&&c&&(IQi(r,c,s),xQi(r,c,s,e)),n(r)}}}a(OTt,"serializationPolicy");function IQi(t,e,r){var n,o;if(r.headerParameters)for(let c of r.headerParameters){let l=N8(e,c);if(l!=null||c.mapper.required){l=r.serializer.serialize(c.mapper,l,SP(c));let u=c.mapper.headerCollectionPrefix;if(u)for(let d of Object.keys(l))t.headers.set(u+d,l[d]);else t.headers.set(c.mapper.serializedName||SP(c),l)}}let s=(o=(n=e.options)===null||n===void 0?void 0:n.requestOptions)===null||o===void 0?void 0:o.customHeaders;if(s)for(let c of Object.keys(s))t.headers.set(c,s[c])}a(IQi,"serializeHeaders");function xQi(t,e,r,n=function(){throw new Error("XML serialization unsupported!")}){var o,s,c,l,u;let d=(o=e.options)===null||o===void 0?void 0:o.serializerOptions,p={xml:{rootName:(s=d?.xml.rootName)!==null&&s!==void 0?s:"",includeRoot:(c=d?.xml.includeRoot)!==null&&c!==void 0?c:!1,xmlCharKey:(l=d?.xml.xmlCharKey)!==null&&l!==void 0?l:"_"}},h=p.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){t.body=N8(e,r.requestBody);let m=r.requestBody.mapper,{required:g,serializedName:A,xmlName:y,xmlElementName:E,xmlNamespace:_,xmlNamespacePrefix:v,nullable:b}=m,I=m.type.name;try{if(t.body!==void 0&&t.body!==null||b&&t.body===null||g){let x=SP(r.requestBody);t.body=r.serializer.serialize(m,t.body,x,p);let w=I===CP.Stream;if(r.isXML){let R=v?`xmlns:${v}`:"xmlns",P=wQi(_,R,I,t.body,p);I===CP.Sequence?t.body=n(RQi(P,E||y||A,R,_),{rootName:y||A,xmlCharKey:h}):w||(t.body=n(P,{rootName:y||A,xmlCharKey:h}))}else{if(I===CP.String&&(!((u=r.contentType)===null||u===void 0)&&u.match("text/plain")||r.mediaType==="text"))return;w||(t.body=JSON.stringify(t.body))}}}catch(x){throw new Error(`Error "${x.message}" occurred in serializing the payload - ${JSON.stringify(A,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){t.formData={};for(let m of r.formDataParameters){let g=N8(e,m);if(g!=null){let A=m.mapper.serializedName||SP(m);t.formData[A]=r.serializer.serialize(m.mapper,g,SP(m),p)}}}}a(xQi,"serializeRequestBody");function wQi(t,e,r,n,o){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let s={};return s[o.xml.xmlCharKey]=n,s["$"]={[e]:t},s}return n}a(wQi,"getXmlValueWithNamespace");function RQi(t,e,r,n){if(Array.isArray(t)||(t=[t]),!r||!n)return{[e]:t};let o={[e]:t};return o["$"]={[r]:n},o}a(RQi,"prepareXMLRootList");function BTt(t={}){let e=RTt(t??{});return t.credentialOptions&&e.addPolicy(B3e({credential:t.credentialOptions.credential,scopes:t.credentialOptions.credentialScopes})),e.addPolicy(OTt(t.serializationOptions),{phase:"Serialize"}),e.addPolicy(MTt(t.deserializationOptions),{phase:"Deserialize"}),e}a(BTt,"createClientPipeline");f();var LTt;function f8r(){return LTt||(LTt=PTt()),LTt}a(f8r,"getCachedDefaultHttpClient");f();var PQi={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function h8r(t,e,r,n){let o=kQi(e,r,n),s=!1,c=p8r(t,o);if(e.path){let d=p8r(e.path,o);e.path==="/{nextLink}"&&d.startsWith("/")&&(d=d.substring(1)),DQi(d)?(c=d,s=!0):c=NQi(c,d)}let{queryParams:l,sequenceParams:u}=MQi(e,r,n);return c=BQi(c,l,u,s),c}a(h8r,"getRequestUrl");function p8r(t,e){let r=t;for(let[n,o]of e)r=r.split(n).join(o);return r}a(p8r,"replaceAll");function kQi(t,e,r){var n;let o=new Map;if(!((n=t.urlParameters)===null||n===void 0)&&n.length)for(let s of t.urlParameters){let c=N8(e,s,r),l=SP(s);c=t.serializer.serialize(s.mapper,c,l),s.skipEncoding||(c=encodeURIComponent(c)),o.set(`{${s.mapper.serializedName||l}}`,c)}return o}a(kQi,"calculateUrlReplacements");function DQi(t){return t.includes("://")}a(DQi,"isAbsoluteUrl");function NQi(t,e){if(!e)return t;let r=new URL(t),n=r.pathname;n.endsWith("/")||(n=`${n}/`),e.startsWith("/")&&(e=e.substring(1));let o=e.indexOf("?");if(o!==-1){let s=e.substring(0,o),c=e.substring(o+1);n=n+s,c&&(r.search=r.search?`${r.search}&${c}`:c)}else n=n+e;return r.pathname=n,r.toString()}a(NQi,"appendPath");function MQi(t,e,r){var n;let o=new Map,s=new Set;if(!((n=t.queryParameters)===null||n===void 0)&&n.length)for(let c of t.queryParameters){c.mapper.type.name==="Sequence"&&c.mapper.serializedName&&s.add(c.mapper.serializedName);let l=N8(e,c,r);if(l!=null||c.mapper.required){l=t.serializer.serialize(c.mapper,l,SP(c));let u=c.collectionFormat?PQi[c.collectionFormat]:"";if(Array.isArray(l)&&(l=l.map(d=>d??"")),c.collectionFormat==="Multi"&&l.length===0)continue;Array.isArray(l)&&(c.collectionFormat==="SSV"||c.collectionFormat==="TSV")&&(l=l.join(u)),c.skipEncoding||(Array.isArray(l)?l=l.map(d=>encodeURIComponent(d)):l=encodeURIComponent(l)),Array.isArray(l)&&(c.collectionFormat==="CSV"||c.collectionFormat==="Pipes")&&(l=l.join(u)),o.set(c.mapper.serializedName||SP(c),l)}}return{queryParams:o,sequenceParams:s}}a(MQi,"calculateQueryParameters");function OQi(t){let e=new Map;if(!t||t[0]!=="?")return e;t=t.slice(1);let r=t.split("&");for(let n of r){let[o,s]=n.split("=",2),c=e.get(o);c?Array.isArray(c)?c.push(s):e.set(o,[c,s]):e.set(o,s)}return e}a(OQi,"simpleParseQueryParams");function BQi(t,e,r,n=!1){if(e.size===0)return t;let o=new URL(t),s=OQi(o.search);for(let[l,u]of e){let d=s.get(l);if(Array.isArray(d))if(Array.isArray(u)){d.push(...u);let p=new Set(d);s.set(l,Array.from(p))}else d.push(u);else d?(Array.isArray(u)?u.unshift(d):r.has(l)&&s.set(l,[d,u]),n||s.set(l,u)):s.set(l,u)}let c=[];for(let[l,u]of s)if(typeof u=="string")c.push(`${l}=${u}`);else if(Array.isArray(u))for(let d of u)c.push(`${l}=${d}`);else c.push(`${l}=${u}`);return o.search=c.length?`?${c.join("&")}`:"",o.toString()}a(BQi,"appendQueryParams");f();var FTt=p8("core-client");var Oge=class{static{a(this,"ServiceClient")}constructor(e={}){var r,n;if(this._requestContentType=e.requestContentType,this._endpoint=(r=e.endpoint)!==null&&r!==void 0?r:e.baseUri,e.baseUri&&FTt.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||f8r(),this.pipeline=e.pipeline||LQi(e),!((n=e.additionalPolicies)===null||n===void 0)&&n.length)for(let{policy:o,position:s}of e.additionalPolicies){let c=s==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(o,{afterPhase:c})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,r){let n=r.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let o=h8r(n,r,e,this),s=mx({url:o});s.method=r.httpMethod;let c=TM(s);c.operationSpec=r,c.operationArguments=e;let l=r.contentType||this._requestContentType;l&&r.requestBody&&s.headers.set("Content-Type",l);let u=e.options;if(u){let d=u.requestOptions;d&&(d.timeout&&(s.timeout=d.timeout),d.onUploadProgress&&(s.onUploadProgress=d.onUploadProgress),d.onDownloadProgress&&(s.onDownloadProgress=d.onDownloadProgress),d.shouldDeserialize!==void 0&&(c.shouldDeserialize=d.shouldDeserialize),d.allowInsecureConnection&&(s.allowInsecureConnection=!0)),u.abortSignal&&(s.abortSignal=u.abortSignal),u.tracingOptions&&(s.tracingOptions=u.tracingOptions)}this._allowInsecureConnection&&(s.allowInsecureConnection=!0),s.streamResponseStatusCodes===void 0&&(s.streamResponseStatusCodes=u8r(r));try{let d=await this.sendRequest(s),p=Lbt(d,r.responses[d.status]);return u?.onResponse&&u.onResponse(d,p),p}catch(d){if(typeof d=="object"&&d?.response){let p=d.response,h=Lbt(p,r.responses[d.statusCode]||r.responses.default);d.details=h,u?.onResponse&&u.onResponse(p,h,d)}throw d}}};function LQi(t){let e=FQi(t),r=t.credential&&e?{credentialScopes:e,credential:t.credential}:void 0;return BTt(Object.assign(Object.assign({},t),{credentialOptions:r}))}a(LQi,"createDefaultPipeline");function FQi(t){if(t.credentialScopes)return t.credentialScopes;if(t.endpoint)return`${t.endpoint}/.default`;if(t.baseUri)return`${t.baseUri}/.default`;if(t.credential&&!t.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}a(FQi,"getCredentialScopes");f();f();f();function m8r(t){return t==="adfs"?"oauth2/token":"oauth2/v2.0/token"}a(m8r,"getIdentityTokenEndpointSuffix");f();var g8r="/.default",A8r="Specifying a `clientId` or `resourceId` is not supported by the Service Fabric managed identity environment. The managed identity configuration is determined by the Service Fabric cluster resource configuration. See https://aka.ms/servicefabricmi for more information";function Bge(t){let e="";if(Array.isArray(t)){if(t.length!==1)return;e=t[0]}else typeof t=="string"&&(e=t);return e.endsWith(g8r)?e.substr(0,e.lastIndexOf(g8r)):e}a(Bge,"mapScopesToResource");function y8r(t){if(typeof t.expires_on=="number")return t.expires_on*1e3;if(typeof t.expires_on=="string"){let e=+t.expires_on;if(!isNaN(e))return e*1e3;let r=Date.parse(t.expires_on);if(!isNaN(r))return r}if(typeof t.expires_in=="number")return Date.now()+t.expires_in*1e3;throw new Error(`Failed to parse token expiration from body. expires_in="${t.expires_in}", expires_on="${t.expires_on}"`)}a(y8r,"parseExpirationTimestamp");function E8r(t){if(t.refresh_on){if(typeof t.refresh_on=="number")return t.refresh_on*1e3;if(typeof t.refresh_on=="string"){let e=+t.refresh_on;if(!isNaN(e))return e*1e3;let r=Date.parse(t.refresh_on);if(!isNaN(r))return r}throw new Error(`Failed to parse refresh_on from body. refresh_on="${t.refresh_on}"`)}else return}a(E8r,"parseRefreshTimestamp");var Lge="noCorrelationId";function UQi(t){let e=t?.authorityHost;return WBe&&(e=e??process.env.AZURE_AUTHORITY_HOST),e??mme}a(UQi,"getIdentityClientAuthorityHost");var M8=class extends Oge{static{a(this,"IdentityClient")}authorityHost;allowLoggingAccountIdentifiers;abortControllers;allowInsecureConnection=!1;tokenCredentialOptions;constructor(e){let r=`azsdk-js-identity/${Y4e}`,n=e?.userAgentOptions?.userAgentPrefix?`${e.userAgentOptions.userAgentPrefix} ${r}`:`${r}`,o=UQi(e);if(!o.startsWith("https:"))throw new Error("The authorityHost address must use the 'https' protocol.");super({requestContentType:"application/json; charset=utf-8",retryOptions:{maxRetries:3},...e,userAgentOptions:{userAgentPrefix:n},baseUri:o}),this.authorityHost=o,this.abortControllers=new Map,this.allowLoggingAccountIdentifiers=e?.loggingOptions?.allowLoggingAccountIdentifiers,this.tokenCredentialOptions={...e},e?.allowInsecureConnection&&(this.allowInsecureConnection=e.allowInsecureConnection)}async sendTokenRequest(e){l1.info(`IdentityClient: sending token request to [${e.url}]`);let r=await this.sendRequest(e);if(r.bodyAsText&&(r.status===200||r.status===201)){let n=JSON.parse(r.bodyAsText);if(!n.access_token)return null;this.logIdentifiers(r);let o={accessToken:{token:n.access_token,expiresOnTimestamp:y8r(n),refreshAfterTimestamp:E8r(n),tokenType:"Bearer"},refreshToken:n.refresh_token};return l1.info(`IdentityClient: [${e.url}] token acquired, expires on ${o.accessToken.expiresOnTimestamp}`),o}else{let n=new f8(r.status,r.bodyAsText);throw l1.warning(`IdentityClient: authentication error. HTTP status: ${r.status}, ${n.errorResponse.errorDescription}`),n}}async refreshAccessToken(e,r,n,o,s,c={}){if(o===void 0)return null;l1.info(`IdentityClient: refreshing access token with client ID: ${r}, scopes: ${n} started`);let l={grant_type:"refresh_token",client_id:r,refresh_token:o,scope:n};s!==void 0&&(l.client_secret=s);let u=new URLSearchParams(l);return Ba.withSpan("IdentityClient.refreshAccessToken",c,async d=>{try{let p=m8r(e),h=mx({url:`${this.authorityHost}/${e}/${p}`,method:"POST",body:u.toString(),abortSignal:c.abortSignal,headers:D8({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}),tracingOptions:d.tracingOptions}),m=await this.sendTokenRequest(h);return l1.info(`IdentityClient: refreshed token for client ID: ${r}`),m}catch(p){if(p.name===J4e&&p.errorResponse.error==="interaction_required")return l1.info(`IdentityClient: interaction required for client ID: ${r}`),null;throw l1.warning(`IdentityClient: failed refreshing token for client ID: ${r}: ${p}`),p}})}generateAbortSignal(e){let r=new AbortController,n=this.abortControllers.get(e)||[];n.push(r),this.abortControllers.set(e,n);let o=r.signal.onabort;return r.signal.onabort=(...s)=>{this.abortControllers.set(e,void 0),o&&o.apply(r.signal,s)},r.signal}abortRequests(e){let r=e||Lge,n=[...this.abortControllers.get(r)||[],...this.abortControllers.get(Lge)||[]];if(n.length){for(let o of n)o.abort();this.abortControllers.set(r,void 0)}}getCorrelationId(e){let r=e?.body?.split("&").map(n=>n.split("=")).find(([n])=>n==="client-request-id");return r&&r.length&&r[1]||Lge}async sendGetRequestAsync(e,r){let n=mx({url:e,method:"GET",body:r?.body,allowInsecureConnection:this.allowInsecureConnection,headers:D8(r?.headers),abortSignal:this.generateAbortSignal(Lge)}),o=await this.sendRequest(n);return this.logIdentifiers(o),{body:o.bodyAsText?JSON.parse(o.bodyAsText):void 0,headers:o.headers.toJSON(),status:o.status}}async sendPostRequestAsync(e,r){let n=mx({url:e,method:"POST",body:r?.body,headers:D8(r?.headers),allowInsecureConnection:this.allowInsecureConnection,abortSignal:this.generateAbortSignal(this.getCorrelationId(r))}),o=await this.sendRequest(n);return this.logIdentifiers(o),{body:o.bodyAsText?JSON.parse(o.bodyAsText):void 0,headers:o.headers.toJSON(),status:o.status}}getTokenCredentialOptions(){return this.tokenCredentialOptions}logIdentifiers(e){if(!this.allowLoggingAccountIdentifiers||!e.bodyAsText)return;let r="No User Principal Name available";try{let o=(e.parsedBody||JSON.parse(e.bodyAsText)).access_token;if(!o)return;let s=o.split(".")[1],{appid:c,upn:l,tid:u,oid:d}=JSON.parse(Buffer.from(s,"base64").toString("utf8"));l1.info(`[Authenticated account] Client ID: ${c}. Tenant ID: ${u}. User Principal Name: ${l||r}. Object ID (user): ${d}`)}catch(n){l1.warning("allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:",n.message)}}};f();var UTt;(function(t){t.AutoDiscoverRegion="AutoDiscoverRegion",t.USWest="westus",t.USWest2="westus2",t.USCentral="centralus",t.USEast="eastus",t.USEast2="eastus2",t.USNorthCentral="northcentralus",t.USSouthCentral="southcentralus",t.USWestCentral="westcentralus",t.CanadaCentral="canadacentral",t.CanadaEast="canadaeast",t.BrazilSouth="brazilsouth",t.EuropeNorth="northeurope",t.EuropeWest="westeurope",t.UKSouth="uksouth",t.UKWest="ukwest",t.FranceCentral="francecentral",t.FranceSouth="francesouth",t.SwitzerlandNorth="switzerlandnorth",t.SwitzerlandWest="switzerlandwest",t.GermanyNorth="germanynorth",t.GermanyWestCentral="germanywestcentral",t.NorwayWest="norwaywest",t.NorwayEast="norwayeast",t.AsiaEast="eastasia",t.AsiaSouthEast="southeastasia",t.JapanEast="japaneast",t.JapanWest="japanwest",t.AustraliaEast="australiaeast",t.AustraliaSouthEast="australiasoutheast",t.AustraliaCentral="australiacentral",t.AustraliaCentral2="australiacentral2",t.IndiaCentral="centralindia",t.IndiaSouth="southindia",t.IndiaWest="westindia",t.KoreaSouth="koreasouth",t.KoreaCentral="koreacentral",t.UAECentral="uaecentral",t.UAENorth="uaenorth",t.SouthAfricaNorth="southafricanorth",t.SouthAfricaWest="southafricawest",t.ChinaNorth="chinanorth",t.ChinaEast="chinaeast",t.ChinaNorth2="chinanorth2",t.ChinaEast2="chinaeast2",t.GermanyCentral="germanycentral",t.GermanyNorthEast="germanynortheast",t.GovernmentUSVirginia="usgovvirginia",t.GovernmentUSIowa="usgoviowa",t.GovernmentUSArizona="usgovarizona",t.GovernmentUSTexas="usgovtexas",t.GovernmentUSDodEast="usdodeast",t.GovernmentUSDodCentral="usdodcentral"})(UTt||(UTt={}));function F3e(t){let e=t;return e===void 0&&globalThis.process?.env?.AZURE_REGIONAL_AUTHORITY_NAME!==void 0&&(e=process.env.AZURE_REGIONAL_AUTHORITY_NAME),e===UTt.AutoDiscoverRegion?"AUTO_DISCOVER":e}a(F3e,"calculateRegionalAuthority");f();f();function QQi(t){return`The current credential is not configured to acquire tokens for tenant ${t}. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add "*" to AdditionallyAllowedTenants to allow acquiring tokens for any tenant.`}a(QQi,"createConfigurationErrorMessage");function Wu(t,e,r=[],n){let o;if(process.env.AZURE_IDENTITY_DISABLE_MULTITENANTAUTH||t==="adfs"?o=t:o=e?.tenantId??t,t&&o!==t&&!r.includes("*")&&!r.some(s=>s.localeCompare(o)===0)){let s=QQi(o);throw n?.info(s),new un(s)}return o}a(Wu,"processMultiTenantRequest");function Jp(t,e){if(!e.match(/^[0-9a-zA-Z-.]+$/)){let r=new Error("Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names.");throw t.info(zo("",r)),r}}a(Jp,"checkTenantId");function Ste(t,e,r){return e?(Jp(t,e),e):(r||(r=DG),r!==DG?"common":"organizations")}a(Ste,"resolveTenantId");function vd(t){return!t||t.length===0?[]:t.includes("*")?RDr:t}a(vd,"resolveAdditionallyAllowedTenantIds");var zA=Mi("MsalClient");function rqi(t,e,r={}){let n=Ste(r.logger??zA,e,t),o=Obt(n,Mbt(r)),s=new M8({...r.tokenCredentialOptions,authorityHost:o,loggingOptions:r.loggingOptions});return{auth:{clientId:t,authority:o,knownAuthorities:h3r(n,o,r.disableInstanceDiscovery)},system:{networkClient:s,loggerOptions:{loggerCallback:zBe(r.logger??zA),logLevel:YBe(rOe()),piiLoggingEnabled:r.loggingOptions?.enableUnsafeSupportLogging}}}}a(rqi,"generateMsalConfiguration");function Ig(t,e,r={}){let n={msalConfig:rqi(t,e,r),cachedAccount:r.authenticationRecord?m3r(r.authenticationRecord):null,pluginConfiguration:BDr.generatePluginConfiguration(r),logger:r.logger??zA},o=new Map;async function s(R={}){let P=R.enableCae?"CAE":"default",k=o.get(P);if(k)return n.logger.getToken.info("Existing PublicClientApplication found in cache, returning it."),k;n.logger.getToken.info(`Creating new PublicClientApplication with CAE ${R.enableCae?"enabled":"disabled"}.`);let Q=R.enableCae?n.pluginConfiguration.cache.cachePluginCae:n.pluginConfiguration.cache.cachePlugin;return n.msalConfig.auth.clientCapabilities=R.enableCae?["cp1"]:void 0,k=new ute({...n.msalConfig,broker:{nativeBrokerPlugin:n.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await Q}}),o.set(P,k),k}a(s,"getPublicApp");let c=new Map;async function l(R={}){let P=R.enableCae?"CAE":"default",k=c.get(P);if(k)return n.logger.getToken.info("Existing ConfidentialClientApplication found in cache, returning it."),k;n.logger.getToken.info(`Creating new ConfidentialClientApplication with CAE ${R.enableCae?"enabled":"disabled"}.`);let Q=R.enableCae?n.pluginConfiguration.cache.cachePluginCae:n.pluginConfiguration.cache.cachePlugin;return n.msalConfig.auth.clientCapabilities=R.enableCae?["cp1"]:void 0,k=new fte({...n.msalConfig,broker:{nativeBrokerPlugin:n.pluginConfiguration.broker.nativeBrokerPlugin},cache:{cachePlugin:await Q}}),c.set(P,k),k}a(l,"getConfidentialApp");async function u(R,P,k={}){if(n.cachedAccount===null)throw n.logger.getToken.info("No cached account found in local state."),new zb({scopes:P});k.claims&&(n.cachedClaims=k.claims);let Q={account:n.cachedAccount,scopes:P,claims:n.cachedClaims};n.pluginConfiguration.broker.isEnabled&&(Q.extraQueryParameters||={},n.pluginConfiguration.broker.enableMsaPassthrough&&(Q.extraQueryParameters.msal_request_type="consumer_passthrough")),k.proofOfPossessionOptions&&(Q.shrNonce=k.proofOfPossessionOptions.nonce,Q.authenticationScheme="pop",Q.resourceRequestMethod=k.proofOfPossessionOptions.resourceRequestMethod,Q.resourceRequestUri=k.proofOfPossessionOptions.resourceRequestUrl),n.logger.getToken.info("Attempting to acquire token silently");try{return await R.acquireTokenSilent(Q)}catch(M){throw aH(P,M,k)}}a(u,"getTokenSilent");function d(R){return R?.tenantId?Obt(R.tenantId,Mbt(r)):n.msalConfig.auth.authority}a(d,"calculateRequestAuthority");async function p(R,P,k,Q){let M=null;try{M=await u(R,P,k)}catch(N){if(N.name!=="AuthenticationRequiredError")throw N;if(k.disableAutomaticAuthentication)throw new zb({scopes:P,getTokenOptions:k,message:"Automatic authentication has been disabled. You may call the authentication() method."})}if(M===null)try{M=await Q()}catch(N){throw aH(P,N,k)}return sH(P,M,k),n.cachedAccount=M?.account??null,n.logger.getToken.info(ap(P)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}a(p,"withSilentAuthentication");async function h(R,P,k={}){n.logger.getToken.info("Attempting to acquire token using client secret"),n.msalConfig.auth.clientSecret=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:R,authority:d(k),azureRegion:F3e(),claims:k?.claims});return sH(R,M,k),n.logger.getToken.info(ap(R)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw aH(R,M,k)}}a(h,"getTokenByClientSecret");async function m(R,P,k={}){n.logger.getToken.info("Attempting to acquire token using client assertion"),n.msalConfig.auth.clientAssertion=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:R,authority:d(k),azureRegion:F3e(),claims:k?.claims,clientAssertion:P});return sH(R,M,k),n.logger.getToken.info(ap(R)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw aH(R,M,k)}}a(m,"getTokenByClientAssertion");async function g(R,P,k={}){n.logger.getToken.info("Attempting to acquire token using client certificate"),n.msalConfig.auth.clientCertificate=P;let Q=await l(k);try{let M=await Q.acquireTokenByClientCredential({scopes:R,authority:d(k),azureRegion:F3e(),claims:k?.claims});return sH(R,M,k),n.logger.getToken.info(ap(R)),{token:M.accessToken,expiresOnTimestamp:M.expiresOn.getTime(),refreshAfterTimestamp:M.refreshOn?.getTime(),tokenType:M.tokenType}}catch(M){throw aH(R,M,k)}}a(g,"getTokenByClientCertificate");async function A(R,P,k={}){n.logger.getToken.info("Attempting to acquire token using device code");let Q=await s(k);return p(Q,R,k,()=>{let M={scopes:R,cancel:k?.abortSignal?.aborted??!1,deviceCodeCallback:P,authority:d(k),claims:k?.claims},N=Q.acquireTokenByDeviceCode(M);return k.abortSignal&&k.abortSignal.addEventListener("abort",()=>{M.cancel=!0}),N})}a(A,"getTokenByDeviceCode");async function y(R,P,k,Q={}){n.logger.getToken.info("Attempting to acquire token using username and password");let M=await s(Q);return p(M,R,Q,()=>{let N={scopes:R,username:P,password:k,authority:d(Q),claims:Q?.claims};return M.acquireTokenByUsernamePassword(N)})}a(y,"getTokenByUsernamePassword");function E(){if(n.cachedAccount)return g3r(t,n.cachedAccount)}a(E,"getActiveAccount");async function _(R,P,k,Q,M={}){n.logger.getToken.info("Attempting to acquire token using authorization code");let N;return Q?(n.msalConfig.auth.clientSecret=Q,N=await l(M)):N=await s(M),p(N,R,M,()=>N.acquireTokenByCode({scopes:R,redirectUri:P,code:k,authority:d(M),claims:M?.claims}))}a(_,"getTokenByAuthorizationCode");async function v(R,P,k,Q={}){zA.getToken.info("Attempting to acquire token on behalf of another user"),typeof k=="string"?(zA.getToken.info("Using client secret for on behalf of flow"),n.msalConfig.auth.clientSecret=k):typeof k=="function"?(zA.getToken.info("Using client assertion callback for on behalf of flow"),n.msalConfig.auth.clientAssertion=k):(zA.getToken.info("Using client certificate for on behalf of flow"),n.msalConfig.auth.clientCertificate=k);let M=await l(Q);try{let N=await M.acquireTokenOnBehalfOf({scopes:R,authority:d(Q),claims:Q.claims,oboAssertion:P});return sH(R,N,Q),zA.getToken.info(ap(R)),{token:N.accessToken,expiresOnTimestamp:N.expiresOn.getTime(),refreshAfterTimestamp:N.refreshOn?.getTime(),tokenType:N.tokenType}}catch(N){throw aH(R,N,Q)}}a(v,"getTokenOnBehalfOf");function b(R,P){return{openBrowser:a(async k=>{await(await Promise.resolve().then(()=>(H3e(),z8r))).default(k,{newInstance:!0})},"openBrowser"),scopes:R,authority:d(P),claims:P?.claims,loginHint:P?.loginHint,errorTemplate:P?.browserCustomizationOptions?.errorMessage,successTemplate:P?.browserCustomizationOptions?.successMessage,prompt:P?.loginHint?"login":"select_account"}}a(b,"createBaseInteractiveRequest");async function I(R,P,k={}){zA.verbose("Authentication will resume through the broker");let Q=await s(k),M=b(R,k);n.pluginConfiguration.broker.parentWindowHandle?M.windowHandle=Buffer.from(n.pluginConfiguration.broker.parentWindowHandle):zA.warning("Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle."),n.pluginConfiguration.broker.enableMsaPassthrough&&((M.extraQueryParameters??={}).msal_request_type="consumer_passthrough"),P?(M.prompt="none",zA.verbose("Attempting broker authentication using the default broker account")):zA.verbose("Attempting broker authentication without the default broker account"),k.proofOfPossessionOptions&&(M.shrNonce=k.proofOfPossessionOptions.nonce,M.authenticationScheme="pop",M.resourceRequestMethod=k.proofOfPossessionOptions.resourceRequestMethod,M.resourceRequestUri=k.proofOfPossessionOptions.resourceRequestUrl);try{return await Q.acquireTokenInteractive(M)}catch(N){if(zA.verbose(`Failed to authenticate through the broker: ${N.message}`),k.disableAutomaticAuthentication)throw new zb({scopes:R,getTokenOptions:k,message:"Cannot silently authenticate with default broker account."});if(P)return I(R,!1,k);throw N}}a(I,"getBrokeredTokenInternal");async function x(R,P,k={}){zA.getToken.info(`Attempting to acquire token using brokered authentication with useDefaultBrokerAccount: ${P}`);let Q=await I(R,P,k);return sH(R,Q,k),n.cachedAccount=Q?.account??null,n.logger.getToken.info(ap(R)),{token:Q.accessToken,expiresOnTimestamp:Q.expiresOn.getTime(),refreshAfterTimestamp:Q.refreshOn?.getTime(),tokenType:Q.tokenType}}a(x,"getBrokeredToken");async function w(R,P={}){zA.getToken.info("Attempting to acquire token interactively");let k=await s(P);return p(k,R,P,async()=>{let Q=b(R,P);return n.pluginConfiguration.broker.isEnabled?I(R,n.pluginConfiguration.broker.useDefaultBrokerAccount??!1,P):(P.proofOfPossessionOptions&&(Q.shrNonce=P.proofOfPossessionOptions.nonce,Q.authenticationScheme="pop",Q.resourceRequestMethod=P.proofOfPossessionOptions.resourceRequestMethod,Q.resourceRequestUri=P.proofOfPossessionOptions.resourceRequestUrl),k.acquireTokenInteractive(Q))})}return a(w,"getTokenByInteractiveRequest"),{getActiveAccount:E,getBrokeredToken:x,getTokenByClientSecret:h,getTokenByClientAssertion:m,getTokenByClientCertificate:g,getTokenByDeviceCode:A,getTokenByUsernamePassword:y,getTokenByAuthorizationCode:_,getTokenOnBehalfOf:v,getTokenByInteractiveRequest:w}}a(Ig,"createMsalClient");var Gge=require("node:crypto");var K8r=require("node:fs/promises");var qge="ClientCertificateCredential",Y8r=Mi(qge),Hge=class{static{a(this,"ClientCertificateCredential")}tenantId;additionallyAllowedTenantIds;certificateConfiguration;sendCertificateChain;msalClient;constructor(e,r,n,o={}){if(!e||!r)throw new Error(`${qge}: tenantId and clientId are required parameters.`);this.tenantId=e,this.additionallyAllowedTenantIds=vd(o?.additionallyAllowedTenants),this.sendCertificateChain=o.sendCertificateChain,this.certificateConfiguration={...typeof n=="string"?{certificatePath:n}:n};let s=this.certificateConfiguration.certificate,c=this.certificateConfiguration.certificatePath;if(!this.certificateConfiguration||!(s||c))throw new Error(`${qge}: Provide either a PEM certificate in string form, or the path to that certificate in the filesystem. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);if(s&&c)throw new Error(`${qge}: To avoid unexpected behaviors, providing both the contents of a PEM certificate and the path to a PEM certificate is forbidden. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.`);this.msalClient=Ig(r,e,{...o,logger:Y8r,tokenCredentialOptions:o})}async getToken(e,r={}){return Ba.withSpan(`${qge}.getToken`,r,async n=>{n.tenantId=Wu(this.tenantId,n,this.additionallyAllowedTenantIds,Y8r);let o=Array.isArray(e)?e:[e],s=await this.buildClientCertificate();return this.msalClient.getTokenByClientCertificate(o,s,n)})}async buildClientCertificate(){let e=await nqi(this.certificateConfiguration,this.sendCertificateChain??!1),r;return this.certificateConfiguration.certificatePassword!==void 0?r=(0,Gge.createPrivateKey)({key:e.certificateContents,passphrase:this.certificateConfiguration.certificatePassword,format:"pem"}).export({format:"pem",type:"pkcs8"}).toString():r=e.certificateContents,{thumbprint:e.thumbprint,thumbprintSha256:e.thumbprintSha256,privateKey:r,x5c:e.x5c}}};async function nqi(t,e){let r=t.certificate,n=t.certificatePath,o=r||await(0,K8r.readFile)(n,"utf8"),s=e?o:void 0,c=/(-+BEGIN CERTIFICATE-+)(\n\r?|\r\n?)([A-Za-z0-9+/\n\r]+=*)(\n\r?|\r\n?)(-+END CERTIFICATE-+)/g,l=[],u;do u=c.exec(o),u&&l.push(u[3]);while(u);if(l.length===0)throw new Error("The file at the specified path does not contain a PEM-encoded certificate.");let d=(0,Gge.createHash)("sha1").update(Buffer.from(l[0],"base64")).digest("hex").toUpperCase(),p=(0,Gge.createHash)("sha256").update(Buffer.from(l[0],"base64")).digest("hex").toUpperCase();return{certificateContents:o,thumbprintSha256:p,thumbprint:d,x5c:s}}a(nqi,"parseCertificate");f();f();function oT(t){return Array.isArray(t)?t:[t]}a(oT,"ensureScopes");function wte(t,e){if(!t.match(/^[0-9a-zA-Z-_.:/]+$/)){let r=new Error("Invalid scope was specified by the user or calling client");throw e.getToken.info(zo(t,r)),r}}a(wte,"ensureValidScopeForDevTimeCreds");function j3e(t){return t.replace(/\/.default$/,"")}a(j3e,"getScopeResource");var J8r=Mi("ClientSecretCredential"),jge=class{static{a(this,"ClientSecretCredential")}tenantId;additionallyAllowedTenantIds;msalClient;clientSecret;constructor(e,r,n,o={}){if(!e)throw new un("ClientSecretCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!r)throw new un("ClientSecretCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");if(!n)throw new un("ClientSecretCredential: clientSecret is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/serviceprincipalauthentication/troubleshoot.");this.clientSecret=n,this.tenantId=e,this.additionallyAllowedTenantIds=vd(o?.additionallyAllowedTenants),this.msalClient=Ig(r,e,{...o,logger:J8r,tokenCredentialOptions:o})}async getToken(e,r={}){return Ba.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=Wu(this.tenantId,n,this.additionallyAllowedTenantIds,J8r);let o=oT(e);return this.msalClient.getTokenByClientSecret(o,this.clientSecret,n)})}};f();var iqi=Mi("UsernamePasswordCredential"),$ge=class{static{a(this,"UsernamePasswordCredential")}tenantId;additionallyAllowedTenantIds;msalClient;username;password;constructor(e,r,n,o,s={}){if(!e)throw new un("UsernamePasswordCredential: tenantId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!r)throw new un("UsernamePasswordCredential: clientId is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!n)throw new un("UsernamePasswordCredential: username is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");if(!o)throw new un("UsernamePasswordCredential: password is a required parameter. To troubleshoot, visit https://aka.ms/azsdk/js/identity/usernamepasswordcredential/troubleshoot.");this.tenantId=e,this.additionallyAllowedTenantIds=vd(s?.additionallyAllowedTenants),this.username=n,this.password=o,this.msalClient=Ig(r,this.tenantId,{...s,tokenCredentialOptions:s??{}})}async getToken(e,r={}){return Ba.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=Wu(this.tenantId,n,this.additionallyAllowedTenantIds,iqi);let o=oT(e);return this.msalClient.getTokenByUsernamePassword(o,this.username,this.password,n)})}};var oqi=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_CLIENT_SECRET","AZURE_CLIENT_CERTIFICATE_PATH","AZURE_CLIENT_CERTIFICATE_PASSWORD","AZURE_USERNAME","AZURE_PASSWORD","AZURE_ADDITIONALLY_ALLOWED_TENANTS","AZURE_CLIENT_SEND_CERTIFICATE_CHAIN"];function sqi(){return(process.env.AZURE_ADDITIONALLY_ALLOWED_TENANTS??"").split(";")}a(sqi,"getAdditionallyAllowedTenants");var $3e="EnvironmentCredential",SM=Mi($3e);function aqi(){let t=(process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN??"").toLowerCase(),e=t==="true"||t==="1";return SM.verbose(`AZURE_CLIENT_SEND_CERTIFICATE_CHAIN: ${process.env.AZURE_CLIENT_SEND_CERTIFICATE_CHAIN}; sendCertificateChain: ${e}`),e}a(aqi,"getSendCertificateChain");var Vge=class{static{a(this,"EnvironmentCredential")}_credential=void 0;constructor(e){let r=nOe(oqi).assigned.join(", ");SM.info(`Found the following environment variables: ${r}`);let n=process.env.AZURE_TENANT_ID,o=process.env.AZURE_CLIENT_ID,s=process.env.AZURE_CLIENT_SECRET,c=sqi(),l=aqi(),u={...e,additionallyAllowedTenantIds:c,sendCertificateChain:l};if(n&&Jp(SM,n),n&&o&&s){SM.info(`Invoking ClientSecretCredential with tenant ID: ${n}, clientId: ${o} and clientSecret: [REDACTED]`),this._credential=new jge(n,o,s,u);return}let d=process.env.AZURE_CLIENT_CERTIFICATE_PATH,p=process.env.AZURE_CLIENT_CERTIFICATE_PASSWORD;if(n&&o&&d){SM.info(`Invoking ClientCertificateCredential with tenant ID: ${n}, clientId: ${o} and certificatePath: ${d}`),this._credential=new Hge(n,o,{certificatePath:d,certificatePassword:p},u);return}let h=process.env.AZURE_USERNAME,m=process.env.AZURE_PASSWORD;n&&o&&h&&m&&(SM.info(`Invoking UsernamePasswordCredential with tenant ID: ${n}, clientId: ${o} and username: ${h}`),SM.warning("Environment is configured to use username and password authentication. This authentication method is deprecated, as it doesn't support multifactor authentication (MFA). Use a more secure credential. For more details, see https://aka.ms/azsdk/identity/mfa."),this._credential=new $ge(n,o,h,m,u))}async getToken(e,r={}){return Ba.withSpan(`${$3e}.getToken`,r,async n=>{if(this._credential)try{let o=await this._credential.getToken(e,n);return SM.getToken.info(ap(e)),o}catch(o){let s=new f8(400,{error:`${$3e} authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`,error_description:o.message.toString().split("More details:").join("")});throw SM.getToken.info(zo(e,s)),s}throw new un(`${$3e} is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.`)})}};f();f();var cqi=1e3*64,lqi=3e3;function X8r(t){return kTt([{name:"imdsRetryPolicy",retry:a(({retryCount:e,response:r})=>{if(r?.status!==404&&r?.status!==410)return{skipStrategy:!0};let n=r?.status===410?Math.max(lqi,t.startDelayInMs):t.startDelayInMs;return f3r(e,{retryDelayInMs:n,maxRetryDelayInMs:cqi})},"retry")}],{maxRetries:t.maxRetries})}a(X8r,"imdsRetryPolicy");f();var IM="ManagedIdentityCredential - IMDS",lH=Mi(IM),uqi="http://169.254.169.254",dqi="/metadata/identity/oauth2/token";function fqi(t){if(!Bge(t))throw new Error(`${IM}: Multiple scopes are not supported.`);let r=new URL(dqi,process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST??uqi),n={Accept:"application/json"};return{url:`${r}`,method:"GET",headers:D8(n)}}a(fqi,"prepareInvalidRequestOptions");var Z8r={name:"imdsMsi",async isAvailable(t){let{scopes:e,identityClient:r,getTokenOptions:n}=t,o=Bge(e);if(!o)return lH.info(`${IM}: Unavailable. Multiple scopes are not supported.`),!1;if(process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST)return!0;if(!r)throw new Error("Missing IdentityClient");let s=fqi(o);return Ba.withSpan("ManagedIdentityCredential-pingImdsEndpoint",n??{},async c=>{s.tracingOptions=c.tracingOptions;let l=mx(s);l.timeout=c.requestOptions?.timeout||1e3,l.allowInsecureConnection=!0;let u;try{lH.info(`${IM}: Pinging the Azure IMDS endpoint`),u=await r.sendRequest(l)}catch(d){return VBe(d)&&lH.verbose(`${IM}: Caught error ${d.name}: ${d.message}`),lH.info(`${IM}: The Azure IMDS endpoint is unavailable`),!1}return u.status===403&&u.bodyAsText?.includes("unreachable")?(lH.info(`${IM}: The Azure IMDS endpoint is unavailable`),lH.info(`${IM}: ${u.bodyAsText}`),!1):(lH.info(`${IM}: The Azure IMDS endpoint is available`),!0)})}};f();f();f();var e6r=Mi("ClientAssertionCredential"),Rte=class{static{a(this,"ClientAssertionCredential")}msalClient;tenantId;additionallyAllowedTenantIds;getAssertion;options;constructor(e,r,n,o={}){if(!e)throw new un("ClientAssertionCredential: tenantId is a required parameter.");if(!r)throw new un("ClientAssertionCredential: clientId is a required parameter.");if(!n)throw new un("ClientAssertionCredential: clientAssertion is a required parameter.");this.tenantId=e,this.additionallyAllowedTenantIds=vd(o?.additionallyAllowedTenants),this.options=o,this.getAssertion=n,this.msalClient=Ig(r,e,{...o,logger:e6r,tokenCredentialOptions:this.options})}async getToken(e,r={}){return Ba.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=Wu(this.tenantId,n,this.additionallyAllowedTenantIds,e6r);let o=Array.isArray(e)?e:[e];return this.msalClient.getTokenByClientAssertion(o,this.getAssertion,n)})}};var t6r=require("node:fs/promises");var uH="WorkloadIdentityCredential",pqi=["AZURE_TENANT_ID","AZURE_CLIENT_ID","AZURE_FEDERATED_TOKEN_FILE"],Wge=Mi(uH),xM=class{static{a(this,"WorkloadIdentityCredential")}client;azureFederatedTokenFileContent=void 0;cacheDate=void 0;federatedTokenFilePath;constructor(e){let r=nOe(pqi).assigned.join(", ");Wge.info(`Found the following environment variables: ${r}`);let n=e??{},o=n.tenantId||process.env.AZURE_TENANT_ID,s=n.clientId||process.env.AZURE_CLIENT_ID;if(this.federatedTokenFilePath=n.tokenFilePath||process.env.AZURE_FEDERATED_TOKEN_FILE,o&&Jp(Wge,o),!s)throw new un(`${uH}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_CLIENT_ID". + See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!o)throw new un(`${uH}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_TENANT_ID". + See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);if(!this.federatedTokenFilePath)throw new un(`${uH}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_FEDERATED_TOKEN_FILE". + See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);Wge.info(`Invoking ClientAssertionCredential with tenant ID: ${o}, clientId: ${n.clientId} and federated token path: [REDACTED]`),this.client=new Rte(o,s,this.readFileContents.bind(this),e)}async getToken(e,r){if(!this.client){let n=`${uH}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - "AZURE_TENANT_ID", "AZURE_CLIENT_ID", - "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;throw YAe.info(n),new un(n)}return YAe.info("Invoking getToken() of Client Assertion Credential"),this.client.getToken(e,r)}async readFileContents(){if(this.cacheDate!==void 0&&Date.now()-this.cacheDate>=1e3*60*5&&(this.azureFederatedTokenFileContent=void 0),!this.federatedTokenFilePath)throw new un(`${nj}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`);if(!this.azureFederatedTokenFileContent){let r=(await(0,n8r.readFile)(this.federatedTokenFilePath,"utf8")).trim();if(r)this.azureFederatedTokenFileContent=r,this.cacheDate=Date.now();else throw new un(`${nj}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`)}return this.azureFederatedTokenFileContent}};var i8r="ManagedIdentityCredential - Token Exchange",pUi=Bi(i8r),UTt={name:"tokenExchangeMsi",async isAvailable(t){let e=process.env,r=!!((t||e.AZURE_CLIENT_ID)&&e.AZURE_TENANT_ID&&process.env.AZURE_FEDERATED_TOKEN_FILE);return r||pUi.info(`${i8r}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`),r},async getToken(t,e={}){let{scopes:r,clientId:n}=t,o={};return new $M({clientId:n,tenantId:process.env.AZURE_TENANT_ID,tokenFilePath:process.env.AZURE_FEDERATED_TOKEN_FILE,...o,disableInstanceDiscovery:!0}).getToken(r,e)}};var D1=Bi("ManagedIdentityCredential"),d6=class{static{a(this,"ManagedIdentityCredential")}managedIdentityApp;identityClient;clientId;resourceId;objectId;msiRetryConfig={maxRetries:5,startDelayInMs:800,intervalIncrement:2};isAvailableIdentityClient;sendProbeRequest;constructor(e,r){let n;typeof e=="string"?(this.clientId=e,n=r??{}):(this.clientId=e?.clientId,n=e??{}),this.resourceId=n?.resourceId,this.objectId=n?.objectId,this.sendProbeRequest=n?.sendProbeRequest??!1;let o=[{key:"clientId",value:this.clientId},{key:"resourceId",value:this.resourceId},{key:"objectId",value:this.objectId}].filter(c=>c.value);if(o.length>1)throw new Error(`ManagedIdentityCredential: only one of 'clientId', 'resourceId', or 'objectId' can be provided. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}`);n.allowInsecureConnection=!0,n.retryOptions?.maxRetries!==void 0&&(this.msiRetryConfig.maxRetries=n.retryOptions.maxRetries),this.identityClient=new a6({...n,additionalPolicies:[{policy:e8r(this.msiRetryConfig),position:"perCall"}]}),this.managedIdentityApp=new Xte({managedIdentityIdParams:{userAssignedClientId:this.clientId,userAssignedResourceId:this.resourceId,userAssignedObjectId:this.objectId},system:{disableInternalRetries:!0,networkClient:this.identityClient,loggerOptions:{logLevel:Q3e(iBe()),piiLoggingEnabled:n.loggingOptions?.enableUnsafeSupportLogging,loggerCallback:U3e(D1)}}}),this.isAvailableIdentityClient=new a6({...n,retryOptions:{maxRetries:0}});let s=this.managedIdentityApp.getManagedIdentitySource();if(s==="CloudShell"&&(this.clientId||this.resourceId||this.objectId))throw D1.warning(`CloudShell MSI detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new un("ManagedIdentityCredential: Specifying a user-assigned managed identity is not supported for CloudShell at runtime. When using Managed Identity in CloudShell, omit the clientId, resourceId, and objectId parameters.");if(s==="ServiceFabric"&&(this.clientId||this.resourceId||this.objectId))throw D1.warning(`Service Fabric detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new un(`ManagedIdentityCredential: ${ELr}`);if(D1.info(`Using ${s} managed identity.`),o.length===1){let{key:c,value:l}=o[0];D1.info(`${s} with ${c}: ${l}`)}}async getToken(e,r={}){D1.getToken.info("Using the MSAL provider for Managed Identity.");let n=FAe(e);if(!n)throw new un(`ManagedIdentityCredential: Multiple scopes are not supported. Scopes: ${JSON.stringify(e)}`);return qa.withSpan("ManagedIdentityCredential.getToken",r,async()=>{try{let o=await UTt.isAvailable(this.clientId),s=this.managedIdentityApp.getManagedIdentitySource(),c=s==="DefaultToImds"||s==="Imds";if(D1.getToken.info(`MSAL Identity source: ${s}`),o){D1.getToken.info("Using the token exchange managed identity.");let u=await UTt.getToken({scopes:e,clientId:this.clientId,identityClient:this.identityClient,retryConfig:this.msiRetryConfig,resourceId:this.resourceId});if(u===null)throw new un("Attempted to use the token exchange managed identity, but received a null response.");return u}else if(c&&this.sendProbeRequest&&(D1.getToken.info("Using the IMDS endpoint to probe for availability."),!await t8r.isAvailable({scopes:e,clientId:this.clientId,getTokenOptions:r,identityClient:this.isAvailableIdentityClient,resourceId:this.resourceId})))throw new un("Attempted to use the IMDS endpoint, but it is not available.");D1.getToken.info("Calling into MSAL for managed identity token.");let l=await this.managedIdentityApp.acquireToken({resource:n});return this.ensureValidMsalToken(e,l,r),D1.getToken.info(fp(e)),{expiresOnTimestamp:l.expiresOn.getTime(),token:l.accessToken,refreshAfterTimestamp:l.refreshOn?.getTime(),tokenType:"Bearer"}}catch(o){throw D1.getToken.error(Xo(e,o)),o.name==="AuthenticationRequiredError"?o:hUi(o)?new un(`ManagedIdentityCredential: Network unreachable. Message: ${o.message}`,{cause:o}):new un(`ManagedIdentityCredential: Authentication failed. Message ${o.message}`,{cause:o})}})}ensureValidMsalToken(e,r,n){let o=a(s=>(D1.getToken.info(s),new sT({scopes:Array.isArray(e)?e:[e],getTokenOptions:n,message:s})),"createError");if(!r)throw o("No response.");if(!r.expiresOn)throw o('Response had no "expiresOn" property.');if(!r.accessToken)throw o('Response had no "accessToken" property.')}};function hUi(t){return!!(t.errorCode==="network_error"||t.code==="ENETUNREACH"||t.code==="EHOSTUNREACH"||(t.statusCode===403||t.code===403)&&t.message.includes("unreachable"))}a(hUi,"isNetworkError");f();var o8r=de(require("child_process"),1);var FP=Bi("AzureDeveloperCliCredential"),LLe={notInstalled:"Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",login:"Please run 'azd auth login' from a command prompt to authenticate before using this credential. For more information, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",unknown:"Unknown error while trying to retrieve the access token",claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:"},s8r={getSafeWorkingDir(){if(process.platform==="win32"){let t=process.env.SystemRoot||process.env.SYSTEMROOT;return t||(FP.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure Developer CLI credential."),t="C:\\Windows"),t}else return"/bin"},async getAzdAccessToken(t,e,r,n){let o=[];e&&(o=["--tenant-id",e]);let s=[];return n&&(s=["--claims",btoa(n)]),new Promise((c,l)=>{try{let d=["azd",...["auth","token","--output","json","--no-prompt",...t.reduce((p,h)=>p.concat("--scope",h),[]),...o,...s]].join(" ");o8r.default.exec(d,{cwd:s8r.getSafeWorkingDir(),timeout:r},(p,h,m)=>{c({stdout:h,stderr:m,error:p})})}catch(u){l(u)}})}},KAe=class{static{a(this,"AzureDeveloperCliCredential")}tenantId;additionallyAllowedTenantIds;timeout;constructor(e){e?.tenantId&&(ih(FP,e?.tenantId),this.tenantId=e?.tenantId),this.additionallyAllowedTenantIds=kd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getToken(e,r={}){let n=td(this.tenantId,r,this.additionallyAllowedTenantIds);n&&ih(FP,n);let o;return typeof e=="string"?o=[e]:o=e,FP.getToken.info(`Using the scopes ${e}`),qa.withSpan(`${this.constructor.name}.getToken`,r,async()=>{try{o.forEach(d=>{pre(d,FP)});let s=await s8r.getAzdAccessToken(o,n,this.timeout,r.claims),c=s.stderr?.match("must use multi-factor authentication")||s.stderr?.match("reauthentication required"),l=s.stderr?.match("not logged in, run `azd login` to login")||s.stderr?.match("not logged in, run `azd auth login` to login");if(s.stderr?.match("azd:(.*)not found")||s.stderr?.startsWith("'azd' is not recognized")||s.error&&s.error.code==="ENOENT"){let d=new un(LLe.notInstalled);throw FP.getToken.info(Xo(e,d)),d}if(l){let d=new un(LLe.login);throw FP.getToken.info(Xo(e,d)),d}if(c){let p=`azd auth login ${o.reduce((m,g)=>m.concat("--scope",g),[]).join(" ")}`,h=new un(`${LLe.claim} ${p}`);throw FP.getToken.info(Xo(e,h)),h}try{let d=JSON.parse(s.stdout);return FP.getToken.info(fp(e)),{token:d.token,expiresOnTimestamp:new Date(d.expiresOn).getTime(),tokenType:"Bearer"}}catch(d){throw s.stderr?new un(s.stderr):d}}catch(s){let c=s.name==="CredentialUnavailableError"?s:new un(s.message||LLe.unknown);throw FP.getToken.info(Xo(e,c)),c}})}};f();var a8r=de(require("child_process"),1);f();function QTt(t,e){if(!e.match(/^[0-9a-zA-Z-._ ]+$/)){let r=new Error(`Subscription '${e}' contains invalid characters. If this is the name of a subscription, use its ID instead. You can locate your subscription by following the instructions listed here: https://learn.microsoft.com/azure/azure-portal/get-subscription-tenant-id`);throw t.info(Xo("",r)),r}}a(QTt,"checkSubscription");var M1=Bi("AzureCliCredential"),JAe={claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:",notInstalled:"Azure CLI could not be found. Please visit https://aka.ms/azure-cli for installation instructions and then, once installed, authenticate to your Azure account using 'az login'.",login:"Please run 'az login' from a command prompt to authenticate before using this credential.",unknown:"Unknown error while trying to retrieve the access token",unexpectedResponse:'Unexpected response from Azure CLI when getting token. Expected "expiresOn" to be a RFC3339 date string. Got:'},c8r={getSafeWorkingDir(){if(process.platform==="win32"){let t=process.env.SystemRoot||process.env.SYSTEMROOT;return t||(M1.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure CLI credential."),t="C:\\Windows"),t}else return"/bin"},async getAzureCliAccessToken(t,e,r,n){let o=[],s=[];return e&&(o=["--tenant",e]),r&&(s=["--subscription",`"${r}"`]),new Promise((c,l)=>{try{let d=["az",...["account","get-access-token","--output","json","--resource",t,...o,...s]].join(" ");a8r.default.exec(d,{cwd:c8r.getSafeWorkingDir(),timeout:n},(p,h,m)=>{c({stdout:h,stderr:m,error:p})})}catch(u){l(u)}})}},XAe=class{static{a(this,"AzureCliCredential")}tenantId;additionallyAllowedTenantIds;timeout;subscription;constructor(e){e?.tenantId&&(ih(M1,e?.tenantId),this.tenantId=e?.tenantId),e?.subscription&&(QTt(M1,e?.subscription),this.subscription=e?.subscription),this.additionallyAllowedTenantIds=kd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getToken(e,r={}){let n=typeof e=="string"?e:e[0],o=r.claims;if(o&&o.trim()){let l=`az login --claims-challenge ${btoa(o)} --scope ${n}`,u=r.tenantId;u&&(l+=` --tenant ${u}`);let d=new un(`${JAe.claim} ${l}`);throw M1.getToken.info(Xo(n,d)),d}let s=td(this.tenantId,r,this.additionallyAllowedTenantIds);return s&&ih(M1,s),this.subscription&&QTt(M1,this.subscription),M1.getToken.info(`Using the scope ${n}`),qa.withSpan(`${this.constructor.name}.getToken`,r,async()=>{try{pre(n,M1);let c=OLe(n),l=await c8r.getAzureCliAccessToken(c,s,this.subscription,this.timeout),u=l.stderr?.match("(.*)az login --scope(.*)"),d=l.stderr?.match("(.*)az login(.*)")&&!u;if(l.stderr?.match("az:(.*)not found")||l.stderr?.startsWith("'az' is not recognized")){let h=new un(JAe.notInstalled);throw M1.getToken.info(Xo(e,h)),h}if(d){let h=new un(JAe.login);throw M1.getToken.info(Xo(e,h)),h}try{let h=l.stdout,m=this.parseRawResponse(h);return M1.getToken.info(fp(e)),m}catch(h){throw l.stderr?new un(l.stderr):h}}catch(c){let l=c.name==="CredentialUnavailableError"?c:new un(c.message||JAe.unknown);throw M1.getToken.info(Xo(e,l)),l}})}parseRawResponse(e){let r=JSON.parse(e),n=r.accessToken,o=Number.parseInt(r.expires_on,10)*1e3;if(!isNaN(o))return M1.getToken.info("expires_on is available and is valid, using it"),{token:n,expiresOnTimestamp:o,tokenType:"Bearer"};if(o=new Date(r.expiresOn).getTime(),isNaN(o))throw new un(`${JAe.unexpectedResponse} "${r.expiresOn}"`);return{token:n,expiresOnTimestamp:o,tokenType:"Bearer"}}};f();f();var l8r=de(require("node:child_process"),1),u8r={execFile(t,e,r){return new Promise((n,o)=>{l8r.default.execFile(t,e,r,(s,c,l)=>{Buffer.isBuffer(c)&&(c=c.toString("utf8")),Buffer.isBuffer(l)&&(l=l.toString("utf8")),l||s?o(l?new Error(l):s):n(c)})})}};var UP=Bi("AzurePowerShellCredential"),f8r=process.platform==="win32";function p8r(t){return f8r?`${t}.exe`:t}a(p8r,"formatCommand");async function d8r(t,e){let r=[];for(let n of t){let[o,...s]=n,c=await u8r.execFile(o,s,{encoding:"utf8",timeout:e});r.push(c)}return r}a(d8r,"runCommands");var h8r={login:"Run Connect-AzAccount to login",installed:"The specified module 'Az.Accounts' with version '2.2.0' was not loaded because no valid module file was found in any module directory"},FLe={login:"Please run 'Connect-AzAccount' from PowerShell to authenticate before using this credential.",installed:`The 'Az.Account' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".`,claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:",troubleshoot:"To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot."},mUi=a(t=>t.message.match(`(.*)${h8r.login}(.*)`),"isLoginError"),gUi=a(t=>t.message.match(h8r.installed),"isNotInstalledError"),qTt=[p8r("pwsh")];f8r&&qTt.push(p8r("powershell"));var ZAe=class{static{a(this,"AzurePowerShellCredential")}tenantId;additionallyAllowedTenantIds;timeout;constructor(e){e?.tenantId&&(ih(UP,e?.tenantId),this.tenantId=e?.tenantId),this.additionallyAllowedTenantIds=kd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getAzurePowerShellAccessToken(e,r,n){for(let o of[...qTt]){try{await d8r([[o,"/?"]],n)}catch{qTt.shift();continue}let c=(await d8r([[o,"-NoProfile","-NonInteractive","-Command",` + "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;throw Wge.info(n),new un(n)}return Wge.info("Invoking getToken() of Client Assertion Credential"),this.client.getToken(e,r)}async readFileContents(){if(this.cacheDate!==void 0&&Date.now()-this.cacheDate>=1e3*60*5&&(this.azureFederatedTokenFileContent=void 0),!this.federatedTokenFilePath)throw new un(`${uH}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`);if(!this.azureFederatedTokenFileContent){let r=(await(0,t6r.readFile)(this.federatedTokenFilePath,"utf8")).trim();if(r)this.azureFederatedTokenFileContent=r,this.cacheDate=Date.now();else throw new un(`${uH}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`)}return this.azureFederatedTokenFileContent}};var r6r="ManagedIdentityCredential - Token Exchange",hqi=Mi(r6r),oSt={name:"tokenExchangeMsi",async isAvailable(t){let e=process.env,r=!!((t||e.AZURE_CLIENT_ID)&&e.AZURE_TENANT_ID&&process.env.AZURE_FEDERATED_TOKEN_FILE);return r||hqi.info(`${r6r}: Unavailable. The environment variables needed are: AZURE_CLIENT_ID (or the client ID sent through the parameters), AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE`),r},async getToken(t,e={}){let{scopes:r,clientId:n}=t,o={};return new xM({clientId:n,tenantId:process.env.AZURE_TENANT_ID,tokenFilePath:process.env.AZURE_FEDERATED_TOKEN_FILE,...o,disableInstanceDiscovery:!0}).getToken(r,e)}};var _1=Mi("ManagedIdentityCredential"),F8=class{static{a(this,"ManagedIdentityCredential")}managedIdentityApp;identityClient;clientId;resourceId;objectId;msiRetryConfig={maxRetries:5,startDelayInMs:800,intervalIncrement:2};isAvailableIdentityClient;sendProbeRequest;constructor(e,r){let n;typeof e=="string"?(this.clientId=e,n=r??{}):(this.clientId=e?.clientId,n=e??{}),this.resourceId=n?.resourceId,this.objectId=n?.objectId,this.sendProbeRequest=n?.sendProbeRequest??!1;let o=[{key:"clientId",value:this.clientId},{key:"resourceId",value:this.resourceId},{key:"objectId",value:this.objectId}].filter(c=>c.value);if(o.length>1)throw new Error(`ManagedIdentityCredential: only one of 'clientId', 'resourceId', or 'objectId' can be provided. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}`);n.allowInsecureConnection=!0,n.retryOptions?.maxRetries!==void 0&&(this.msiRetryConfig.maxRetries=n.retryOptions.maxRetries),this.identityClient=new M8({...n,additionalPolicies:[{policy:X8r(this.msiRetryConfig),position:"perCall"}]}),this.managedIdentityApp=new pte({managedIdentityIdParams:{userAssignedClientId:this.clientId,userAssignedResourceId:this.resourceId,userAssignedObjectId:this.objectId},system:{disableInternalRetries:!0,networkClient:this.identityClient,loggerOptions:{logLevel:YBe(rOe()),piiLoggingEnabled:n.loggingOptions?.enableUnsafeSupportLogging,loggerCallback:zBe(_1)}}}),this.isAvailableIdentityClient=new M8({...n,retryOptions:{maxRetries:0}});let s=this.managedIdentityApp.getManagedIdentitySource();if(s==="CloudShell"&&(this.clientId||this.resourceId||this.objectId))throw _1.warning(`CloudShell MSI detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new un("ManagedIdentityCredential: Specifying a user-assigned managed identity is not supported for CloudShell at runtime. When using Managed Identity in CloudShell, omit the clientId, resourceId, and objectId parameters.");if(s==="ServiceFabric"&&(this.clientId||this.resourceId||this.objectId))throw _1.warning(`Service Fabric detected with user-provided IDs - throwing. Received values: ${JSON.stringify({clientId:this.clientId,resourceId:this.resourceId,objectId:this.objectId})}.`),new un(`ManagedIdentityCredential: ${A8r}`);if(_1.info(`Using ${s} managed identity.`),o.length===1){let{key:c,value:l}=o[0];_1.info(`${s} with ${c}: ${l}`)}}async getToken(e,r={}){_1.getToken.info("Using the MSAL provider for Managed Identity.");let n=Bge(e);if(!n)throw new un(`ManagedIdentityCredential: Multiple scopes are not supported. Scopes: ${JSON.stringify(e)}`);return Ba.withSpan("ManagedIdentityCredential.getToken",r,async()=>{try{let o=await oSt.isAvailable(this.clientId),s=this.managedIdentityApp.getManagedIdentitySource(),c=s==="DefaultToImds"||s==="Imds";if(_1.getToken.info(`MSAL Identity source: ${s}`),o){_1.getToken.info("Using the token exchange managed identity.");let u=await oSt.getToken({scopes:e,clientId:this.clientId,identityClient:this.identityClient,retryConfig:this.msiRetryConfig,resourceId:this.resourceId});if(u===null)throw new un("Attempted to use the token exchange managed identity, but received a null response.");return u}else if(c&&this.sendProbeRequest&&(_1.getToken.info("Using the IMDS endpoint to probe for availability."),!await Z8r.isAvailable({scopes:e,clientId:this.clientId,getTokenOptions:r,identityClient:this.isAvailableIdentityClient,resourceId:this.resourceId})))throw new un("Attempted to use the IMDS endpoint, but it is not available.");_1.getToken.info("Calling into MSAL for managed identity token.");let l=await this.managedIdentityApp.acquireToken({resource:n});return this.ensureValidMsalToken(e,l,r),_1.getToken.info(ap(e)),{expiresOnTimestamp:l.expiresOn.getTime(),token:l.accessToken,refreshAfterTimestamp:l.refreshOn?.getTime(),tokenType:"Bearer"}}catch(o){throw _1.getToken.error(zo(e,o)),o.name==="AuthenticationRequiredError"?o:mqi(o)?new un(`ManagedIdentityCredential: Network unreachable. Message: ${o.message}`,{cause:o}):new un(`ManagedIdentityCredential: Authentication failed. Message ${o.message}`,{cause:o})}})}ensureValidMsalToken(e,r,n){let o=a(s=>(_1.getToken.info(s),new zb({scopes:Array.isArray(e)?e:[e],getTokenOptions:n,message:s})),"createError");if(!r)throw o("No response.");if(!r.expiresOn)throw o('Response had no "expiresOn" property.');if(!r.accessToken)throw o('Response had no "accessToken" property.')}};function mqi(t){return!!(t.errorCode==="network_error"||t.code==="ENETUNREACH"||t.code==="EHOSTUNREACH"||(t.statusCode===403||t.code===403)&&t.message.includes("unreachable"))}a(mqi,"isNetworkError");f();var n6r=de(require("child_process"),1);var IP=Mi("AzureDeveloperCliCredential"),V3e={notInstalled:"Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",login:"Please run 'azd auth login' from a command prompt to authenticate before using this credential. For more information, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",unknown:"Unknown error while trying to retrieve the access token",claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:"},i6r={getSafeWorkingDir(){if(process.platform==="win32"){let t=process.env.SystemRoot||process.env.SYSTEMROOT;return t||(IP.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure Developer CLI credential."),t="C:\\Windows"),t}else return"/bin"},async getAzdAccessToken(t,e,r,n){let o=[];e&&(o=["--tenant-id",e]);let s=[];return n&&(s=["--claims",btoa(n)]),new Promise((c,l)=>{try{let d=["azd",...["auth","token","--output","json","--no-prompt",...t.reduce((p,h)=>p.concat("--scope",h),[]),...o,...s]].join(" ");n6r.default.exec(d,{cwd:i6r.getSafeWorkingDir(),timeout:r},(p,h,m)=>{c({stdout:h,stderr:m,error:p})})}catch(u){l(u)}})}},zge=class{static{a(this,"AzureDeveloperCliCredential")}tenantId;additionallyAllowedTenantIds;timeout;constructor(e){e?.tenantId&&(Jp(IP,e?.tenantId),this.tenantId=e?.tenantId),this.additionallyAllowedTenantIds=vd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getToken(e,r={}){let n=Wu(this.tenantId,r,this.additionallyAllowedTenantIds);n&&Jp(IP,n);let o;return typeof e=="string"?o=[e]:o=e,IP.getToken.info(`Using the scopes ${e}`),Ba.withSpan(`${this.constructor.name}.getToken`,r,async()=>{try{o.forEach(d=>{wte(d,IP)});let s=await i6r.getAzdAccessToken(o,n,this.timeout,r.claims),c=s.stderr?.match("must use multi-factor authentication")||s.stderr?.match("reauthentication required"),l=s.stderr?.match("not logged in, run `azd login` to login")||s.stderr?.match("not logged in, run `azd auth login` to login");if(s.stderr?.match("azd:(.*)not found")||s.stderr?.startsWith("'azd' is not recognized")||s.error&&s.error.code==="ENOENT"){let d=new un(V3e.notInstalled);throw IP.getToken.info(zo(e,d)),d}if(l){let d=new un(V3e.login);throw IP.getToken.info(zo(e,d)),d}if(c){let p=`azd auth login ${o.reduce((m,g)=>m.concat("--scope",g),[]).join(" ")}`,h=new un(`${V3e.claim} ${p}`);throw IP.getToken.info(zo(e,h)),h}try{let d=JSON.parse(s.stdout);return IP.getToken.info(ap(e)),{token:d.token,expiresOnTimestamp:new Date(d.expiresOn).getTime(),tokenType:"Bearer"}}catch(d){throw s.stderr?new un(s.stderr):d}}catch(s){let c=s.name==="CredentialUnavailableError"?s:new un(s.message||V3e.unknown);throw IP.getToken.info(zo(e,c)),c}})}};f();var o6r=de(require("child_process"),1);f();function sSt(t,e){if(!e.match(/^[0-9a-zA-Z-._ ]+$/)){let r=new Error(`Subscription '${e}' contains invalid characters. If this is the name of a subscription, use its ID instead. You can locate your subscription by following the instructions listed here: https://learn.microsoft.com/azure/azure-portal/get-subscription-tenant-id`);throw t.info(zo("",r)),r}}a(sSt,"checkSubscription");var C1=Mi("AzureCliCredential"),Yge={claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:",notInstalled:"Azure CLI could not be found. Please visit https://aka.ms/azure-cli for installation instructions and then, once installed, authenticate to your Azure account using 'az login'.",login:"Please run 'az login' from a command prompt to authenticate before using this credential.",unknown:"Unknown error while trying to retrieve the access token",unexpectedResponse:'Unexpected response from Azure CLI when getting token. Expected "expiresOn" to be a RFC3339 date string. Got:'},s6r={getSafeWorkingDir(){if(process.platform==="win32"){let t=process.env.SystemRoot||process.env.SYSTEMROOT;return t||(C1.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure CLI credential."),t="C:\\Windows"),t}else return"/bin"},async getAzureCliAccessToken(t,e,r,n){let o=[],s=[];return e&&(o=["--tenant",e]),r&&(s=["--subscription",`"${r}"`]),new Promise((c,l)=>{try{let d=["az",...["account","get-access-token","--output","json","--resource",t,...o,...s]].join(" ");o6r.default.exec(d,{cwd:s6r.getSafeWorkingDir(),timeout:n},(p,h,m)=>{c({stdout:h,stderr:m,error:p})})}catch(u){l(u)}})}},Kge=class{static{a(this,"AzureCliCredential")}tenantId;additionallyAllowedTenantIds;timeout;subscription;constructor(e){e?.tenantId&&(Jp(C1,e?.tenantId),this.tenantId=e?.tenantId),e?.subscription&&(sSt(C1,e?.subscription),this.subscription=e?.subscription),this.additionallyAllowedTenantIds=vd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getToken(e,r={}){let n=typeof e=="string"?e:e[0],o=r.claims;if(o&&o.trim()){let l=`az login --claims-challenge ${btoa(o)} --scope ${n}`,u=r.tenantId;u&&(l+=` --tenant ${u}`);let d=new un(`${Yge.claim} ${l}`);throw C1.getToken.info(zo(n,d)),d}let s=Wu(this.tenantId,r,this.additionallyAllowedTenantIds);return s&&Jp(C1,s),this.subscription&&sSt(C1,this.subscription),C1.getToken.info(`Using the scope ${n}`),Ba.withSpan(`${this.constructor.name}.getToken`,r,async()=>{try{wte(n,C1);let c=j3e(n),l=await s6r.getAzureCliAccessToken(c,s,this.subscription,this.timeout),u=l.stderr?.match("(.*)az login --scope(.*)"),d=l.stderr?.match("(.*)az login(.*)")&&!u;if(l.stderr?.match("az:(.*)not found")||l.stderr?.startsWith("'az' is not recognized")){let h=new un(Yge.notInstalled);throw C1.getToken.info(zo(e,h)),h}if(d){let h=new un(Yge.login);throw C1.getToken.info(zo(e,h)),h}try{let h=l.stdout,m=this.parseRawResponse(h);return C1.getToken.info(ap(e)),m}catch(h){throw l.stderr?new un(l.stderr):h}}catch(c){let l=c.name==="CredentialUnavailableError"?c:new un(c.message||Yge.unknown);throw C1.getToken.info(zo(e,l)),l}})}parseRawResponse(e){let r=JSON.parse(e),n=r.accessToken,o=Number.parseInt(r.expires_on,10)*1e3;if(!isNaN(o))return C1.getToken.info("expires_on is available and is valid, using it"),{token:n,expiresOnTimestamp:o,tokenType:"Bearer"};if(o=new Date(r.expiresOn).getTime(),isNaN(o))throw new un(`${Yge.unexpectedResponse} "${r.expiresOn}"`);return{token:n,expiresOnTimestamp:o,tokenType:"Bearer"}}};f();f();var a6r=de(require("node:child_process"),1),c6r={execFile(t,e,r){return new Promise((n,o)=>{a6r.default.execFile(t,e,r,(s,c,l)=>{Buffer.isBuffer(c)&&(c=c.toString("utf8")),Buffer.isBuffer(l)&&(l=l.toString("utf8")),l||s?o(l?new Error(l):s):n(c)})})}};var xP=Mi("AzurePowerShellCredential"),u6r=process.platform==="win32";function d6r(t){return u6r?`${t}.exe`:t}a(d6r,"formatCommand");async function l6r(t,e){let r=[];for(let n of t){let[o,...s]=n,c=await c6r.execFile(o,s,{encoding:"utf8",timeout:e});r.push(c)}return r}a(l6r,"runCommands");var f6r={login:"Run Connect-AzAccount to login",installed:"The specified module 'Az.Accounts' with version '2.2.0' was not loaded because no valid module file was found in any module directory"},W3e={login:"Please run 'Connect-AzAccount' from PowerShell to authenticate before using this credential.",installed:`The 'Az.Account' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".`,claim:"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:",troubleshoot:"To troubleshoot, visit https://aka.ms/azsdk/js/identity/powershellcredential/troubleshoot."},gqi=a(t=>t.message.match(`(.*)${f6r.login}(.*)`),"isLoginError"),Aqi=a(t=>t.message.match(f6r.installed),"isNotInstalledError"),aSt=[d6r("pwsh")];u6r&&aSt.push(d6r("powershell"));var Jge=class{static{a(this,"AzurePowerShellCredential")}tenantId;additionallyAllowedTenantIds;timeout;constructor(e){e?.tenantId&&(Jp(xP,e?.tenantId),this.tenantId=e?.tenantId),this.additionallyAllowedTenantIds=vd(e?.additionallyAllowedTenants),this.timeout=e?.processTimeoutInMs}async getAzurePowerShellAccessToken(e,r,n){for(let o of[...aSt]){try{await l6r([[o,"/?"]],n)}catch{aSt.shift();continue}let c=(await l6r([[o,"-NoProfile","-NonInteractive","-Command",` $tenantId = "${r??""}" $m = Import-Module Az.Accounts -MinimumVersion 2.2.0 -PassThru $useSecureString = $m.Version -ge [version]'2.17.0' -and $m.Version -lt [version]'5.0.0' @@ -1564,24 +1553,24 @@ Headers: ${JSON.stringify(r)}`}}return o},"parseBody");f();f();f();var QBe="inva } Write-Output (ConvertTo-Json $result) - `]]))[0];return AUi(c)}throw new Error("Unable to execute PowerShell. Ensure that it is installed in your system")}async getToken(e,r={}){return qa.withSpan(`${this.constructor.name}.getToken`,r,async()=>{let n=typeof e=="string"?e:e[0],o=r.claims;if(o&&o.trim()){let l=`Connect-AzAccount -ClaimsChallenge ${btoa(o)}`,u=r.tenantId;u&&(l+=` -Tenant ${u}`);let d=new un(`${FLe.claim} ${l}`);throw UP.getToken.info(Xo(n,d)),d}let s=td(this.tenantId,r,this.additionallyAllowedTenantIds);s&&ih(UP,s);try{pre(n,UP),UP.getToken.info(`Using the scope ${n}`);let c=OLe(n),l=await this.getAzurePowerShellAccessToken(c,s,this.timeout);return UP.getToken.info(fp(e)),{token:l.Token,expiresOnTimestamp:new Date(l.ExpiresOn).getTime(),tokenType:"Bearer"}}catch(c){if(gUi(c)){let u=new un(FLe.installed);throw UP.getToken.info(Xo(n,u)),u}else if(mUi(c)){let u=new un(FLe.login);throw UP.getToken.info(Xo(n,u)),u}let l=new un(`${c}. ${FLe.troubleshoot}`);throw UP.getToken.info(Xo(n,l)),l}})}};async function AUi(t){let e=/{[^{}]*}/g,r=t.match(e),n=t;if(r)try{for(let o of r)try{let s=JSON.parse(o);if(s?.Token)return n=n.replace(o,""),n&&UP.getToken.warning(n),s}catch{continue}}catch{throw new Error(`Unable to parse the output of PowerShell. Received output: ${t}`)}throw new Error(`No access token found in the output. Received output: ${t}`)}a(AUi,"parseJsonToken");f();var m8r=require("node:fs/promises");var yUi="common",EUi="aebc6443-996d-45c2-90f0-388ff96faa56",GTt=Bi("VisualStudioCodeCredential"),CUi={adfs:"The VisualStudioCodeCredential does not support authentication with ADFS tenants."};function _Ui(t){let e=CUi[t];if(e)throw new un(e)}a(_Ui,"checkUnsupportedTenant");var eye=class{static{a(this,"VisualStudioCodeCredential")}tenantId;additionallyAllowedTenantIds;msalClient;options;constructor(e){this.options=e||{},e&&e.tenantId?(ih(GTt,e.tenantId),this.tenantId=e.tenantId):this.tenantId=yUi,this.additionallyAllowedTenantIds=kd(e?.additionallyAllowedTenants),_Ui(this.tenantId)}async prepare(e){let r=td(this.tenantId,this.options,this.additionallyAllowedTenantIds,GTt)||this.tenantId;if(!mDr()||!X4e)throw new un("Visual Studio Code Authentication is not available. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.");let n=await this.loadAuthRecord(X4e,e);this.msalClient=Mg(EUi,r,{...this.options,isVSCodeCredential:!0,brokerOptions:{enabled:!0,parentWindowHandle:new Uint8Array(0),useDefaultBrokerAccount:!0},authenticationRecord:n})}preparePromise;prepareOnce(e){return this.preparePromise||(this.preparePromise=this.prepare(e)),this.preparePromise}async getToken(e,r){let n=gT(e);if(await this.prepareOnce(n),!this.msalClient)throw new un("Visual Studio Code Authentication failed to initialize. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.");return this.msalClient.getTokenByInteractiveRequest(n,{...r,disableAutomaticAuthentication:!0})}async loadAuthRecord(e,r){try{let n=await(0,m8r.readFile)(e,{encoding:"utf8"});return gbt(n)}catch(n){throw GTt.getToken.info(Xo(r,n)),new un("Cannot load authentication record in Visual Studio Code. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.")}}};f();var ULe=Bi("BrokerCredential"),QLe=class{static{a(this,"BrokerCredential")}brokerMsalClient;brokerTenantId;brokerAdditionallyAllowedTenantIds;constructor(e){this.brokerTenantId=ure(ULe,e.tenantId),this.brokerAdditionallyAllowedTenantIds=kd(e?.additionallyAllowedTenants);let r={...e,tokenCredentialOptions:e,logger:ULe,brokerOptions:{enabled:!0,parentWindowHandle:new Uint8Array(0),useDefaultBrokerAccount:!0}};this.brokerMsalClient=Mg(oH,this.brokerTenantId,r)}async getToken(e,r={}){return qa.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=td(this.brokerTenantId,n,this.brokerAdditionallyAllowedTenantIds,ULe);let o=gT(e);try{return this.brokerMsalClient.getBrokeredToken(o,!0,{...n,disableAutomaticAuthentication:!0})}catch(s){throw ULe.getToken.info(Xo(o,s)),new un("Failed to acquire token using broker authentication",{cause:s})}})}};function g8r(t={}){return new QLe(t)}a(g8r,"createDefaultBrokerCredential");function HTt(t={}){return new eye(t)}a(HTt,"createDefaultVisualStudioCodeCredential");function jTt(t={}){t.retryOptions??={maxRetries:5,retryDelayInMs:800},t.sendProbeRequest??=!0;let e=t?.managedIdentityClientId??process.env.AZURE_CLIENT_ID,r=t?.workloadIdentityClientId??e,n=t?.managedIdentityResourceId,o=process.env.AZURE_FEDERATED_TOKEN_FILE,s=t?.tenantId??process.env.AZURE_TENANT_ID;if(n){let c={...t,resourceId:n};return new d6(c)}if(o&&r){let c={...t,tenantId:s};return new d6(r,c)}if(e){let c={...t,clientId:e};return new d6(c)}return new d6(t)}a(jTt,"createDefaultManagedIdentityCredential");function $Tt(t){let e=t?.managedIdentityClientId??process.env.AZURE_CLIENT_ID,r=t?.workloadIdentityClientId??e,n=process.env.AZURE_FEDERATED_TOKEN_FILE,o=t?.tenantId??process.env.AZURE_TENANT_ID;if(n&&r){let s={...t,tenantId:o,clientId:r,tokenFilePath:n};return new $M(s)}if(o){let s={...t,tenantId:o};return new $M(s)}return new $M(t)}a($Tt,"createDefaultWorkloadIdentityCredential");function VTt(t={}){return new KAe(t)}a(VTt,"createDefaultAzureDeveloperCliCredential");function WTt(t={}){return new XAe(t)}a(WTt,"createDefaultAzureCliCredential");function zTt(t={}){return new ZAe(t)}a(zTt,"createDefaultAzurePowershellCredential");function YTt(t={}){return new zAe(t)}a(YTt,"createDefaultEnvironmentCredential");var qLe=Bi("DefaultAzureCredential"),KTt=class{static{a(this,"UnavailableDefaultCredential")}credentialUnavailableErrorMessage;credentialName;constructor(e,r){this.credentialName=e,this.credentialUnavailableErrorMessage=r}getToken(){return qLe.getToken.info(`Skipping ${this.credentialName}, reason: ${this.credentialUnavailableErrorMessage}`),Promise.resolve(null)}},mre=class extends oge{static{a(this,"DefaultAzureCredential")}constructor(e){vUi(e);let r=process.env.AZURE_TOKEN_CREDENTIALS?process.env.AZURE_TOKEN_CREDENTIALS.trim().toLowerCase():void 0,n=[HTt,WTt,zTt,VTt,g8r],o=[YTt,$Tt,jTt],s=[],c="EnvironmentCredential, WorkloadIdentityCredential, ManagedIdentityCredential, VisualStudioCodeCredential, AzureCliCredential, AzurePowerShellCredential, AzureDeveloperCliCredential";if(r)switch(r){case"dev":s=n;break;case"prod":s=o;break;case"environmentcredential":s=[YTt];break;case"workloadidentitycredential":s=[$Tt];break;case"managedidentitycredential":s=[()=>jTt({sendProbeRequest:!1})];break;case"visualstudiocodecredential":s=[HTt];break;case"azureclicredential":s=[WTt];break;case"azurepowershellcredential":s=[zTt];break;case"azuredeveloperclicredential":s=[VTt];break;default:{let u=`Invalid value for AZURE_TOKEN_CREDENTIALS = ${process.env.AZURE_TOKEN_CREDENTIALS}. Valid values are 'prod' or 'dev' or any of these credentials - ${c}.`;throw qLe.warning(u),new Error(u)}}else s=[...o,...n];let l=s.map(u=>{try{return u(e??{})}catch(d){return qLe.warning(`Skipped ${u.name} because of an error creating the credential: ${d}`),new KTt(u.name,d.message)}});super(...l)}};function vUi(t){if(t?.requiredEnvVars){let r=(Array.isArray(t.requiredEnvVars)?t.requiredEnvVars:[t.requiredEnvVars]).filter(n=>!process.env[n]);if(r.length>0){let n=`Required environment ${r.length===1?"variable":"variables"} '${r.join(", ")}' for DefaultAzureCredential ${r.length===1?"is":"are"} not set or empty.`;throw qLe.warning(n),new Error(n)}}}a(vUi,"validateRequiredEnvVars");f();var yZc=Bi("InteractiveBrowserCredential");f();var wZc=Bi("DeviceCodeCredential");f();var bUi="AzurePipelinesCredential",FZc=Bi(bUi);f();var zZc=Bi("AuthorizationCodeCredential");f();var TUi="OnBehalfOfCredential",iel=Bi(TUi);f();var gre=new Se("capiFetchUtilities");function SUi(t){let e=t.getCopilotIntegrationId();if(e)return e;switch(t.getEditorPluginInfo().name){case"copilot-intellij":return"jetbrains-chat";case"copilot":case"copilot-vs":return;default:return"jetbrains-chat"}}a(SUi,"getIntegrationId");function O1(t){let e={...mE(t),"X-GitHub-Api-Version":"2025-10-01"},r=SUi(t.get(Nr));return r&&(e["Copilot-Integration-Id"]=r),e}a(O1,"getCapiHeaders");function JTt(t,e){return gre.debug(t,"Using CES proxy mode for msbench"),{...e,"ces-proxy-target":Bq.api,"Copilot-Integration-Id":"autodev-test"}}a(JTt,"addMsBenchCesProxyHeaders");async function XTt(t,e){let r=process.env.INTEGRATION_ID_FOR_HMAC_SECRET;gre.info(t,"Using HMAC authentication mode for msbench with integration id",r);let n=await sDr(process.env.HMAC_SECRET,r);return{...e,...n}}a(XTt,"addMsBenchHmacHeaders");function A8r(){return BI()&&!!process.env.HMAC_SECRET}a(A8r,"isMsBenchHmacModeEnabled");function tye(){return BI()&&!process.env.HMAC_SECRET}a(tye,"isMsBenchCesProxyModeEnabled");async function Are(t,e){return process.env.HMAC_SECRET?await XTt(t,e):JTt(t,e)}a(Are,"addMsBenchHeaders");function GLe(t,e,...r){if(tye()){gre.debug(t,"Using CES proxy endpoint for URL generation");let n=r.join("/");return n.startsWith("/")&&(n=n.slice(1)),`https://ces-dev1.azurewebsites.net/api/proxy/${n}`}return L2(t,e,"api",...r)}a(GLe,"getCapiUrl");function y8r(t,e,r){(e.status===401||e.status===403)&&(gre.debug(t,"CAPI auth error encountered",{status:e.status,path:r}),t.get(Ot).resetToken("capi_fetch",e.status))}a(y8r,"handleCapiAuthError");async function ij(t,e,r){r??=await t.get(Ot).getToken();let n=GLe(t,r,e),o=r.token;tye()&&(gre.debug(t,"Using CES proxy authentication token for fetchCapiUrl"),o=await E8r());let s={Authorization:`Bearer ${o}`,...O1(t)},c=A8r()?await XTt(t,s):tye()?JTt(t,s):s,l=await t.get(dr).fetch(new URL(n).href,{method:"GET",headers:c});return y8r(t,l,e),l}a(ij,"fetchCapiUrl");async function HLe(t,e,r){let n=await t.get(Ot).getToken(),o=GLe(t,n,e),s=n.token;tye()&&(gre.debug(t,"Using CES proxy authentication token for postCapiUrl"),s=await E8r());let c={Authorization:`Bearer ${s}`,...O1(t)},l=A8r()?await XTt(t,c):tye()?JTt(t,c):c,u=await t.get(dr).fetch(new URL(o).href,{method:"POST",headers:l,body:r});return y8r(t,u,e),u}a(HLe,"postCapiUrl");async function E8r(){let e=await new mre().getToken("api://17b0ad65-ed36-4194-bb27-059c567bc41f/.default");if(!e)throw new Error("Failed to retrieve access token");return e.token}a(E8r,"getMsBenchToken");f();var C8r=600*1e3,Cn={Gpt35turbo:"gpt-3.5-turbo",Gpt4:"gpt-4",Gpt4turbo:"gpt-4-turbo",Gpt4o:"gpt-4o",Gpt4oMini:"gpt-4o-mini",O1Mini:"o1-mini",O1Ga:"o1-ga",Claude35Sonnet:"claude-3.5-sonnet",O3Mini:"o3-mini",Gemini20Flash:"gemini-2.0-flash",Gemini20Pro:"gemini-2.0-pro",Claude37Sonnet:"claude-3.7-sonnet",Claude37SonnetThought:"claude-3.7-sonnet-thought",Gpt45:"gpt-4.5",Gpt41:"gpt-4.1",Gpt5:"gpt-5",Gpt5Mini:"gpt-5-mini",Gpt5CodeX:"gpt-5-codex",Gpt51:"gpt-5.1",Gpt51CodeX:"gpt-5.1-codex",Gpt51CodeXMini:"gpt-5.1-codex-mini",Gpt52:"gpt-5.2",CopilotBase:"copilot-base",BYOK:"byok",Unknown:"unknown"};var yre=new Set([Cn.O1Ga,Cn.O3Mini,Cn.O1Mini,Cn.Gemini20Pro,Cn.Gemini20Flash]);function $E(t){switch(t){case"edits":case"user":case"inline":return[Cn.Gpt4o,Cn.Gpt4turbo,Cn.Gpt4,Cn.O1Mini,Cn.O1Ga,Cn.Claude35Sonnet,Cn.O3Mini,Cn.Gemini20Flash,Cn.Claude37Sonnet,Cn.Claude37SonnetThought,Cn.Gpt45,Cn.Gpt41,Cn.CopilotBase];case"meta":case"suggestions":case"synonyms":return[Cn.Gpt4oMini,Cn.Gpt4o,Cn.Gpt35turbo,Cn.Gpt41,Cn.CopilotBase];case"gitCommit":return[Cn.Gpt4oMini,Cn.Gpt4o,Cn.Gpt4,Cn.Gpt41,Cn.CopilotBase];case"nesStubs":return[Cn.Gpt4oMini,Cn.Gpt4o,Cn.Gpt41,Cn.CopilotBase]}}a($E,"getSupportedModelFamiliesForPrompt");var VLe={textEmbedding3Small:"text-embedding-3-small"},IUi=S.Object({type:S.Union([S.Literal("chat"),S.Literal("embeddings"),S.Literal("completion")]),tokenizer:S.String(),family:S.String(),object:S.String(),supports:S.Optional(S.Object({tool_calls:S.Optional(S.Boolean()),parallel_tool_calls:S.Optional(S.Boolean()),streaming:S.Optional(S.Boolean()),vision:S.Optional(S.Boolean()),adaptive_thinking:S.Optional(S.Boolean())})),limits:S.Optional(S.Object({max_inputs:S.Optional(S.Number()),max_prompt_tokens:S.Optional(S.Number()),max_output_tokens:S.Optional(S.Number()),max_context_window_tokens:S.Optional(S.Number())}))}),xUi=S.Object({id:S.String(),vendor:S.Optional(S.String()),name:S.String(),version:S.String(),model_picker_enabled:S.Boolean(),is_chat_default:S.Optional(S.Boolean()),is_chat_fallback:S.Optional(S.Boolean()),capabilities:IUi,billing:S.Optional(S.Object({is_premium:S.Optional(S.Boolean()),multiplier:S.Optional(S.Number())})),object:S.String(),preview:S.Optional(S.Boolean()),isExperimental:S.Optional(S.Boolean()),policy:S.Optional(S.Object({state:S.String(),terms:S.String()})),supported_endpoints:S.Optional(S.Array(S.String())),warning_messages:S.Optional(S.Array(S.Object({message:S.String()}))),info_messages:S.Optional(S.Array(S.Object({message:S.String()})))}),_8r=S.Object({data:S.Array(xUi)});function WLe(t){return t.warning_messages?.at(0)?.message??t.info_messages?.at(0)?.message}a(WLe,"getDegradationReason");var cl=class{static{a(this,"ModelMetadataProvider")}},jLe=class extends cl{constructor(r){super();this.ctx=r;this._metadata=[];this._lastFetchTime=0;this._xGithubRequestId=void 0;this.allowTokenRefresh=a(()=>{this._lastFetchTime=0},"allowTokenRefresh");r.get(Ot).onDidResetToken(this.allowTokenRefresh)}static{a(this,"CapiModelMetadataProvider")}async getMetadata(){return this.shouldRefreshModels()&&await this.fetchMetadata(),this._metadata.slice()}async getModelMetadataList(){return this.shouldRefreshModels()&&await this.fetchMetadata(),{models:this._metadata.slice(),xGithubRequestId:this._xGithubRequestId}}async getFallbackModel(){return(await this.getMetadata()).find(n=>n.is_chat_fallback)}async fetchMetadata(){let r=await ij(this.ctx,"/models");if(this._xGithubRequestId=r.headers.get("X-GitHub-Request-Id")??void 0,r.status<200||r.status>=300){if(r.status===429&&this._metadata.length>0){_r.error(this.ctx,"Rate limited while fetching models from CAPI",{status:r.status,statusText:r.statusText,xGithubRequestId:this._xGithubRequestId});return}throw _r.error(this.ctx,"Failed to fetch models from CAPI",{status:r.status,statusText:r.statusText,xGithubRequestId:this._xGithubRequestId}),new O2(r)}await this.processModels(r)}async fetchModel(r){let n=await ij(this.ctx,`/models/${r}`);if(!n.ok){_r.error(this.ctx,`Failed to fetch model ${r} from CAPI`,{status:n.status,statusText:n.statusText,xGithubRequestId:this._xGithubRequestId});return}return await n.json()}async acceptModelPolicy(r){return(await HLe(this.ctx,`/models/${r}/policy`,JSON.stringify({status:"enabled"}))).ok?(await this.fetchMetadata(),!0):!1}async processModels(r){try{let n=await r.json();this._metadata=n.data,this._lastFetchTime=Date.now()}catch(n){_r.error(this.ctx,"Failed to parse models from CAPI",{error:n})}}shouldRefreshModels(){return this._metadata.length===0||!this._lastFetchTime?!0:this.isLastFetchOlderTenMinutes()}isLastFetchOlderTenMinutes(){return Date.now()-this._lastFetchTime>C8r}},$Le=class extends cl{constructor(r,n){super();this.ctx=r;this.delegate=n;this._exp_models_cache=new Map}static{a(this,"ExpModelMetadataProvider")}async getMetadata(){let r=this.ctx.get(jt),n=await r.fetchTokenAndUpdateExPValuesAndAssignments(),o=r.ideChatExpModelIds(n),s=[];if(o){let c=o?.split(",");for(let l of c){let u=await this.fetchModel(l.trim());u!==void 0&&(u.isExperimental=!0,s.push(u))}}return s.concat(await this.delegate.getMetadata())}async getModelMetadataList(){return this.delegate.getModelMetadataList()}async fetchModel(r){let n=this._exp_models_cache.get(r);if(n){let[s,c]=n;if(Date.now()-c0?e:null}a(v8r,"getUserSelectedModelConfiguration");f();f();f();var Ere=class extends Error{constructor(r,n){super(r,{cause:n});this.code="CopilotPromptLoadFailure"}static{a(this,"CopilotPromptLoadFailure")}};f();var b8r=de(require("node:fs/promises")),zLe=de(require("node:path"));async function Cre(t){return await b8r.readFile(ZTt(t))}a(Cre,"readFile");function ZTt(t){return zLe.default.resolve(zLe.default.extname(__filename)!==".ts"?__dirname:zLe.default.resolve(__dirname,"../../dist"),t)}a(ZTt,"locateFile");var vre=de(e8e());var t8e=new Map;function wo(t="o200k_base"){let e=t8e.get(t);return e!==void 0||(e=t8e.get("o200k_base"),e!==void 0)?e:new _re}a(wo,"getTokenizer");async function r8e(t="o200k_base"){return await nye,wo(t)}a(r8e,"getTokenizerAsync");async function HUi(t){if(!t.endsWith(".tiktoken.noindex"))throw new Error("File does not end with .tiktoken.noindex");let e=await Cre(t),r=new Map,n=[];for(let o=0;othis.detokenize([n]))}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=4,o=1,s=Math.min(e.length,r*n),c=e.slice(-s),l=this.tokenize(c);for(;l.length{let n=typeof e=="string"?e:e[0],o=r.claims;if(o&&o.trim()){let l=`Connect-AzAccount -ClaimsChallenge ${btoa(o)}`,u=r.tenantId;u&&(l+=` -Tenant ${u}`);let d=new un(`${W3e.claim} ${l}`);throw xP.getToken.info(zo(n,d)),d}let s=Wu(this.tenantId,r,this.additionallyAllowedTenantIds);s&&Jp(xP,s);try{wte(n,xP),xP.getToken.info(`Using the scope ${n}`);let c=j3e(n),l=await this.getAzurePowerShellAccessToken(c,s,this.timeout);return xP.getToken.info(ap(e)),{token:l.Token,expiresOnTimestamp:new Date(l.ExpiresOn).getTime(),tokenType:"Bearer"}}catch(c){if(Aqi(c)){let u=new un(W3e.installed);throw xP.getToken.info(zo(n,u)),u}else if(gqi(c)){let u=new un(W3e.login);throw xP.getToken.info(zo(n,u)),u}let l=new un(`${c}. ${W3e.troubleshoot}`);throw xP.getToken.info(zo(n,l)),l}})}};async function yqi(t){let e=/{[^{}]*}/g,r=t.match(e),n=t;if(r)try{for(let o of r)try{let s=JSON.parse(o);if(s?.Token)return n=n.replace(o,""),n&&xP.getToken.warning(n),s}catch{continue}}catch{throw new Error(`Unable to parse the output of PowerShell. Received output: ${t}`)}throw new Error(`No access token found in the output. Received output: ${t}`)}a(yqi,"parseJsonToken");f();var p6r=require("node:fs/promises");var Eqi="common",_qi="aebc6443-996d-45c2-90f0-388ff96faa56",cSt=Mi("VisualStudioCodeCredential"),Cqi={adfs:"The VisualStudioCodeCredential does not support authentication with ADFS tenants."};function vqi(t){let e=Cqi[t];if(e)throw new un(e)}a(vqi,"checkUnsupportedTenant");var Xge=class{static{a(this,"VisualStudioCodeCredential")}tenantId;additionallyAllowedTenantIds;msalClient;options;constructor(e){this.options=e||{},e&&e.tenantId?(Jp(cSt,e.tenantId),this.tenantId=e.tenantId):this.tenantId=Eqi,this.additionallyAllowedTenantIds=vd(e?.additionallyAllowedTenants),vqi(this.tenantId)}async prepare(e){let r=Wu(this.tenantId,this.options,this.additionallyAllowedTenantIds,cSt)||this.tenantId;if(!ODr()||!K4e)throw new un("Visual Studio Code Authentication is not available. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.");let n=await this.loadAuthRecord(K4e,e);this.msalClient=Ig(_qi,r,{...this.options,isVSCodeCredential:!0,brokerOptions:{enabled:!0,parentWindowHandle:new Uint8Array(0),useDefaultBrokerAccount:!0},authenticationRecord:n})}preparePromise;prepareOnce(e){return this.preparePromise||(this.preparePromise=this.prepare(e)),this.preparePromise}async getToken(e,r){let n=oT(e);if(await this.prepareOnce(n),!this.msalClient)throw new un("Visual Studio Code Authentication failed to initialize. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.");return this.msalClient.getTokenByInteractiveRequest(n,{...r,disableAutomaticAuthentication:!0})}async loadAuthRecord(e,r){try{let n=await(0,p6r.readFile)(e,{encoding:"utf8"});return Bbt(n)}catch(n){throw cSt.getToken.info(zo(r,n)),new un("Cannot load authentication record in Visual Studio Code. Ensure you have have Azure Resources Extension installed in VS Code, signed into Azure via VS Code, installed the @azure/identity-vscode package, and properly configured the extension.")}}};f();var z3e=Mi("BrokerCredential"),Y3e=class{static{a(this,"BrokerCredential")}brokerMsalClient;brokerTenantId;brokerAdditionallyAllowedTenantIds;constructor(e){this.brokerTenantId=Ste(z3e,e.tenantId),this.brokerAdditionallyAllowedTenantIds=vd(e?.additionallyAllowedTenants);let r={...e,tokenCredentialOptions:e,logger:z3e,brokerOptions:{enabled:!0,parentWindowHandle:new Uint8Array(0),useDefaultBrokerAccount:!0}};this.brokerMsalClient=Ig(DG,this.brokerTenantId,r)}async getToken(e,r={}){return Ba.withSpan(`${this.constructor.name}.getToken`,r,async n=>{n.tenantId=Wu(this.brokerTenantId,n,this.brokerAdditionallyAllowedTenantIds,z3e);let o=oT(e);try{return this.brokerMsalClient.getBrokeredToken(o,!0,{...n,disableAutomaticAuthentication:!0})}catch(s){throw z3e.getToken.info(zo(o,s)),new un("Failed to acquire token using broker authentication",{cause:s})}})}};function h6r(t={}){return new Y3e(t)}a(h6r,"createDefaultBrokerCredential");function lSt(t={}){return new Xge(t)}a(lSt,"createDefaultVisualStudioCodeCredential");function uSt(t={}){t.retryOptions??={maxRetries:5,retryDelayInMs:800},t.sendProbeRequest??=!0;let e=t?.managedIdentityClientId??process.env.AZURE_CLIENT_ID,r=t?.workloadIdentityClientId??e,n=t?.managedIdentityResourceId,o=process.env.AZURE_FEDERATED_TOKEN_FILE,s=t?.tenantId??process.env.AZURE_TENANT_ID;if(n){let c={...t,resourceId:n};return new F8(c)}if(o&&r){let c={...t,tenantId:s};return new F8(r,c)}if(e){let c={...t,clientId:e};return new F8(c)}return new F8(t)}a(uSt,"createDefaultManagedIdentityCredential");function dSt(t){let e=t?.managedIdentityClientId??process.env.AZURE_CLIENT_ID,r=t?.workloadIdentityClientId??e,n=process.env.AZURE_FEDERATED_TOKEN_FILE,o=t?.tenantId??process.env.AZURE_TENANT_ID;if(n&&r){let s={...t,tenantId:o,clientId:r,tokenFilePath:n};return new xM(s)}if(o){let s={...t,tenantId:o};return new xM(s)}return new xM(t)}a(dSt,"createDefaultWorkloadIdentityCredential");function fSt(t={}){return new zge(t)}a(fSt,"createDefaultAzureDeveloperCliCredential");function pSt(t={}){return new Kge(t)}a(pSt,"createDefaultAzureCliCredential");function hSt(t={}){return new Jge(t)}a(hSt,"createDefaultAzurePowershellCredential");function mSt(t={}){return new Vge(t)}a(mSt,"createDefaultEnvironmentCredential");var K3e=Mi("DefaultAzureCredential"),gSt=class{static{a(this,"UnavailableDefaultCredential")}credentialUnavailableErrorMessage;credentialName;constructor(e,r){this.credentialName=e,this.credentialUnavailableErrorMessage=r}getToken(){return K3e.getToken.info(`Skipping ${this.credentialName}, reason: ${this.credentialUnavailableErrorMessage}`),Promise.resolve(null)}},Pte=class extends Eme{static{a(this,"DefaultAzureCredential")}constructor(e){bqi(e);let r=process.env.AZURE_TOKEN_CREDENTIALS?process.env.AZURE_TOKEN_CREDENTIALS.trim().toLowerCase():void 0,n=[lSt,pSt,hSt,fSt,h6r],o=[mSt,dSt,uSt],s=[],c="EnvironmentCredential, WorkloadIdentityCredential, ManagedIdentityCredential, VisualStudioCodeCredential, AzureCliCredential, AzurePowerShellCredential, AzureDeveloperCliCredential";if(r)switch(r){case"dev":s=n;break;case"prod":s=o;break;case"environmentcredential":s=[mSt];break;case"workloadidentitycredential":s=[dSt];break;case"managedidentitycredential":s=[()=>uSt({sendProbeRequest:!1})];break;case"visualstudiocodecredential":s=[lSt];break;case"azureclicredential":s=[pSt];break;case"azurepowershellcredential":s=[hSt];break;case"azuredeveloperclicredential":s=[fSt];break;default:{let u=`Invalid value for AZURE_TOKEN_CREDENTIALS = ${process.env.AZURE_TOKEN_CREDENTIALS}. Valid values are 'prod' or 'dev' or any of these credentials - ${c}.`;throw K3e.warning(u),new Error(u)}}else s=[...o,...n];let l=s.map(u=>{try{return u(e??{})}catch(d){return K3e.warning(`Skipped ${u.name} because of an error creating the credential: ${d}`),new gSt(u.name,d.message)}});super(...l)}};function bqi(t){if(t?.requiredEnvVars){let r=(Array.isArray(t.requiredEnvVars)?t.requiredEnvVars:[t.requiredEnvVars]).filter(n=>!process.env[n]);if(r.length>0){let n=`Required environment ${r.length===1?"variable":"variables"} '${r.join(", ")}' for DefaultAzureCredential ${r.length===1?"is":"are"} not set or empty.`;throw K3e.warning(n),new Error(n)}}}a(bqi,"validateRequiredEnvVars");f();var Ntl=Mi("InteractiveBrowserCredential");f();var Htl=Mi("DeviceCodeCredential");f();var Tqi="AzurePipelinesCredential",Ztl=Mi(Tqi);f();var lrl=Mi("AuthorizationCodeCredential");f();var Sqi="OnBehalfOfCredential",Erl=Mi(Sqi);f();var kte=new Se("capiFetchUtilities");function Iqi(t){let e=t.getCopilotIntegrationId();if(e)return e;switch(t.getEditorPluginInfo().name){case"copilot-intellij":return"jetbrains-chat";case"copilot":case"copilot-vs":return;default:return"jetbrains-chat"}}a(Iqi,"getIntegrationId");function v1(t){let e={...sE(t),"X-GitHub-Api-Version":"2025-10-01"},r=Iqi(t.get(Dr));return r&&(e["Copilot-Integration-Id"]=r),e}a(v1,"getCapiHeaders");function ASt(t,e){return kte.debug(t,"Using CES proxy mode for msbench"),{...e,"ces-proxy-target":lq.api,"Copilot-Integration-Id":"autodev-test"}}a(ASt,"addMsBenchCesProxyHeaders");async function ySt(t,e){let r=process.env.INTEGRATION_ID_FOR_HMAC_SECRET;kte.info(t,"Using HMAC authentication mode for msbench with integration id",r);let n=await IDr(process.env.HMAC_SECRET,r);return{...e,...n}}a(ySt,"addMsBenchHmacHeaders");function m6r(){return TI()&&!!process.env.HMAC_SECRET}a(m6r,"isMsBenchHmacModeEnabled");function Zge(){return TI()&&!process.env.HMAC_SECRET}a(Zge,"isMsBenchCesProxyModeEnabled");async function Dte(t,e){return process.env.HMAC_SECRET?await ySt(t,e):ASt(t,e)}a(Dte,"addMsBenchHeaders");function J3e(t,e,...r){if(Zge()){kte.debug(t,"Using CES proxy endpoint for URL generation");let n=r.join("/");return n.startsWith("/")&&(n=n.slice(1)),`https://ces-dev1.azurewebsites.net/api/proxy/${n}`}return I2(t,e,"api",...r)}a(J3e,"getCapiUrl");function g6r(t,e,r){(e.status===401||e.status===403)&&(kte.debug(t,"CAPI auth error encountered",{status:e.status,path:r}),t.get(Nt).resetToken("capi_fetch",e.status))}a(g6r,"handleCapiAuthError");async function dH(t,e,r){r??=await t.get(Nt).getToken();let n=J3e(t,r,e),o=r.token;Zge()&&(kte.debug(t,"Using CES proxy authentication token for fetchCapiUrl"),o=await A6r());let s={Authorization:`Bearer ${o}`,...v1(t)},c=m6r()?await ySt(t,s):Zge()?ASt(t,s):s,l=await t.get(dr).fetch(new URL(n).href,{method:"GET",headers:c});return g6r(t,l,e),l}a(dH,"fetchCapiUrl");async function X3e(t,e,r){let n=await t.get(Nt).getToken(),o=J3e(t,n,e),s=n.token;Zge()&&(kte.debug(t,"Using CES proxy authentication token for postCapiUrl"),s=await A6r());let c={Authorization:`Bearer ${s}`,...v1(t)},l=m6r()?await ySt(t,c):Zge()?ASt(t,c):c,u=await t.get(dr).fetch(new URL(o).href,{method:"POST",headers:l,body:r});return g6r(t,u,e),u}a(X3e,"postCapiUrl");async function A6r(){let e=await new Pte().getToken("api://17b0ad65-ed36-4194-bb27-059c567bc41f/.default");if(!e)throw new Error("Failed to retrieve access token");return e.token}a(A6r,"getMsBenchToken");f();var y6r=600*1e3,_n={Gpt35turbo:"gpt-3.5-turbo",Gpt4:"gpt-4",Gpt4turbo:"gpt-4-turbo",Gpt4o:"gpt-4o",Gpt4oMini:"gpt-4o-mini",O1Mini:"o1-mini",O1Ga:"o1-ga",Claude35Sonnet:"claude-3.5-sonnet",O3Mini:"o3-mini",Gemini20Flash:"gemini-2.0-flash",Gemini20Pro:"gemini-2.0-pro",Claude37Sonnet:"claude-3.7-sonnet",Claude37SonnetThought:"claude-3.7-sonnet-thought",Gpt45:"gpt-4.5",Gpt41:"gpt-4.1",Gpt5:"gpt-5",Gpt5Mini:"gpt-5-mini",Gpt5CodeX:"gpt-5-codex",Gpt51:"gpt-5.1",Gpt51CodeX:"gpt-5.1-codex",Gpt51CodeXMini:"gpt-5.1-codex-mini",Gpt52:"gpt-5.2",CopilotBase:"copilot-base",BYOK:"byok",Unknown:"unknown"};var Nte=new Set([_n.O1Ga,_n.O3Mini,_n.O1Mini,_n.Gemini20Pro,_n.Gemini20Flash]);function ME(t){switch(t){case"edits":case"user":case"inline":return[_n.Gpt4o,_n.Gpt4turbo,_n.Gpt4,_n.O1Mini,_n.O1Ga,_n.Claude35Sonnet,_n.O3Mini,_n.Gemini20Flash,_n.Claude37Sonnet,_n.Claude37SonnetThought,_n.Gpt45,_n.Gpt41,_n.CopilotBase];case"meta":case"suggestions":case"synonyms":return[_n.Gpt4oMini,_n.Gpt4o,_n.Gpt35turbo,_n.Gpt41,_n.CopilotBase];case"gitCommit":return[_n.Gpt4oMini,_n.Gpt4o,_n.Gpt4,_n.Gpt41,_n.CopilotBase];case"nesStubs":return[_n.Gpt4oMini,_n.Gpt4o,_n.Gpt41,_n.CopilotBase]}}a(ME,"getSupportedModelFamiliesForPrompt");var tLe={textEmbedding3Small:"text-embedding-3-small"},xqi=S.Object({type:S.Union([S.Literal("chat"),S.Literal("embeddings"),S.Literal("completion")]),tokenizer:S.String(),family:S.String(),object:S.String(),supports:S.Optional(S.Object({tool_calls:S.Optional(S.Boolean()),parallel_tool_calls:S.Optional(S.Boolean()),streaming:S.Optional(S.Boolean()),vision:S.Optional(S.Boolean()),adaptive_thinking:S.Optional(S.Boolean())})),limits:S.Optional(S.Object({max_inputs:S.Optional(S.Number()),max_prompt_tokens:S.Optional(S.Number()),max_output_tokens:S.Optional(S.Number()),max_non_streaming_output_tokens:S.Optional(S.Number()),max_context_window_tokens:S.Optional(S.Number())}))}),wqi=S.Object({id:S.String(),vendor:S.Optional(S.String()),name:S.String(),version:S.String(),model_picker_enabled:S.Boolean(),model_picker_category:S.Optional(S.String()),is_chat_default:S.Optional(S.Boolean()),is_chat_fallback:S.Optional(S.Boolean()),capabilities:xqi,billing:S.Optional(S.Object({is_premium:S.Optional(S.Boolean()),multiplier:S.Optional(S.Number())})),object:S.String(),preview:S.Optional(S.Boolean()),isExperimental:S.Optional(S.Boolean()),policy:S.Optional(S.Object({state:S.String(),terms:S.String()})),supported_endpoints:S.Optional(S.Array(S.String())),warning_messages:S.Optional(S.Array(S.Object({message:S.String()}))),info_messages:S.Optional(S.Array(S.Object({message:S.String()})))}),E6r=S.Object({data:S.Array(wqi)});function _6r(t){return t.warning_messages?.at(0)?.message??t.info_messages?.at(0)?.message}a(_6r,"getDegradationReason");var tl=class{static{a(this,"ModelMetadataProvider")}},Z3e=class extends tl{constructor(r){super();this.ctx=r;this._metadata=[];this._lastFetchTime=0;this._xGithubRequestId=void 0;this.allowTokenRefresh=a(()=>{this._lastFetchTime=0},"allowTokenRefresh");r.get(Nt).onDidResetToken(this.allowTokenRefresh)}static{a(this,"CapiModelMetadataProvider")}async getMetadata(){return this.shouldRefreshModels()&&await this.fetchMetadata(),this._metadata.slice()}async getModelMetadataList(){return this.shouldRefreshModels()&&await this.fetchMetadata(),{models:this._metadata.slice(),xGithubRequestId:this._xGithubRequestId}}async getFallbackModel(){return(await this.getMetadata()).find(n=>n.is_chat_fallback)}async fetchMetadata(){let r=await dH(this.ctx,"/models");if(this._xGithubRequestId=r.headers.get("X-GitHub-Request-Id")??void 0,r.status<200||r.status>=300){if(r.status===429&&this._metadata.length>0){Cr.error(this.ctx,"Rate limited while fetching models from CAPI",{status:r.status,statusText:r.statusText,xGithubRequestId:this._xGithubRequestId});return}throw Cr.error(this.ctx,"Failed to fetch models from CAPI",{status:r.status,statusText:r.statusText,xGithubRequestId:this._xGithubRequestId}),new T2(r)}await this.processModels(r)}async fetchModel(r){let n=await dH(this.ctx,`/models/${r}`);if(!n.ok){Cr.error(this.ctx,`Failed to fetch model ${r} from CAPI`,{status:n.status,statusText:n.statusText,xGithubRequestId:this._xGithubRequestId});return}return await n.json()}async acceptModelPolicy(r){return(await X3e(this.ctx,`/models/${r}/policy`,JSON.stringify({status:"enabled"}))).ok?(await this.fetchMetadata(),!0):!1}async processModels(r){try{let n=await r.json();this._metadata=n.data,this._lastFetchTime=Date.now()}catch(n){Cr.error(this.ctx,"Failed to parse models from CAPI",{error:n})}}shouldRefreshModels(){return this._metadata.length===0||!this._lastFetchTime?!0:this.isLastFetchOlderTenMinutes()}isLastFetchOlderTenMinutes(){return Date.now()-this._lastFetchTime>y6r}},eLe=class extends tl{constructor(r,n){super();this.ctx=r;this.delegate=n;this._exp_models_cache=new Map}static{a(this,"ExpModelMetadataProvider")}async getMetadata(){let r=this.ctx.get(Gt),n=await r.fetchTokenAndUpdateExPValuesAndAssignments(),o=r.ideChatExpModelIds(n),s=[];if(o){let c=o?.split(",");for(let l of c){let u=await this.fetchModel(l.trim());u!==void 0&&(u.isExperimental=!0,s.push(u))}}return s.concat(await this.delegate.getMetadata())}async getModelMetadataList(){return this.delegate.getModelMetadataList()}async fetchModel(r){let n=this._exp_models_cache.get(r);if(n){let[s,c]=n;if(Date.now()-c0?e:null}a(C6r,"getUserSelectedModelConfiguration");f();f();f();var Mte=class extends Error{constructor(r,n){super(r,{cause:n});this.code="CopilotPromptLoadFailure"}static{a(this,"CopilotPromptLoadFailure")}};f();var v6r=de(require("node:fs/promises")),rLe=de(require("node:path"));async function Ote(t){return await v6r.readFile(ESt(t))}a(Ote,"readFile");function ESt(t){return rLe.default.resolve(rLe.default.extname(__filename)!==".ts"?__dirname:rLe.default.resolve(__dirname,"../../dist"),t)}a(ESt,"locateFile");var Lte=de(cLe());var lLe=new Map;function To(t="o200k_base"){let e=lLe.get(t);return e!==void 0||(e=lLe.get("o200k_base"),e!==void 0)?e:new Bte}a(To,"getTokenizer");async function uLe(t="o200k_base"){return await tAe,To(t)}a(uLe,"getTokenizerAsync");async function jqi(t){if(!t.endsWith(".tiktoken.noindex"))throw new Error("File does not end with .tiktoken.noindex");let e=await Ote(t),r=new Map,n=[];for(let o=0;othis.detokenize([n]))}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=4,o=1,s=Math.min(e.length,r*n),c=e.slice(-s),l=this.tokenize(c);for(;l.length{let r=0;for(let n=0;nr.toString()).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,r){let n=this.tokenizeStrings(e).slice(-r);return{text:n.join(""),tokens:n.map(this.hash)}}takeFirstTokens(e,r){let n=this.tokenizeStrings(e).slice(0,r);return{text:n.join(""),tokens:n.map(this.hash)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` +`);return n.substring(o+1)}},kSt=class{constructor(){this.hash=a(e=>{let r=0;for(let n=0;nr.toString()).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,r){let n=this.tokenizeStrings(e).slice(-r);return{text:n.join(""),tokens:n.map(this.hash)}}takeFirstTokens(e,r){let n=this.tokenizeStrings(e).slice(0,r);return{text:n.join(""),tokens:n.map(this.hash)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` `)return n;let o=n.indexOf(` -`);return n.substring(o+1)}},jUi={cl100k_base:{python:3.99,typescript:4.54,typescriptreact:4.58,javascript:4.76,csharp:5.13,java:4.86,cpp:3.85,php:4.1,html:4.57,vue:4.22,go:3.93,dart:5.66,javascriptreact:4.81,css:3.37},o200k_base:{python:4.05,typescript:4.12,typescriptreact:5.01,javascript:4.47,csharp:5.47,java:4.86,cpp:3.8,php:4.35,html:4.86,vue:4.3,go:4.21,dart:5.7,javascriptreact:4.83,css:3.33}},lSt=4,_re=class{constructor(e="o200k_base",r){this.languageId=r;this.tokenizerName=e}static{a(this,"ApproximateTokenizer")}tokenize(e){return this.tokenizeStrings(e).map(r=>{let n=0;for(let o=0;o{let n=[],o=r.toString();for(;o.length>0;){let s=o.slice(-lSt),c=String.fromCharCode(parseInt(s));n.unshift(c),o=o.slice(0,-lSt)}return n.join("")}).join("")}tokenizeStrings(e){return e.match(/.{1,4}/g)??[]}getEffectiveTokenLength(){return this.tokenizerName&&this.languageId?jUi[this.tokenizerName]?.[this.languageId]??4:4}tokenLength(e){return Math.ceil(e.length/this.getEffectiveTokenLength())}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(-Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeFirstTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(0,Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` +`);return n.substring(o+1)}},$qi={cl100k_base:{python:3.99,typescript:4.54,typescriptreact:4.58,javascript:4.76,csharp:5.13,java:4.86,cpp:3.85,php:4.1,html:4.57,vue:4.22,go:3.93,dart:5.66,javascriptreact:4.81,css:3.37},o200k_base:{python:4.05,typescript:4.12,typescriptreact:5.01,javascript:4.47,csharp:5.47,java:4.86,cpp:3.8,php:4.35,html:4.86,vue:4.3,go:4.21,dart:5.7,javascriptreact:4.83,css:3.33}},RSt=4,Bte=class{constructor(e="o200k_base",r){this.languageId=r;this.tokenizerName=e}static{a(this,"ApproximateTokenizer")}tokenize(e){return this.tokenizeStrings(e).map(r=>{let n=0;for(let o=0;o{let n=[],o=r.toString();for(;o.length>0;){let s=o.slice(-RSt),c=String.fromCharCode(parseInt(s));n.unshift(c),o=o.slice(0,-RSt)}return n.join("")}).join("")}tokenizeStrings(e){return e.match(/.{1,4}/g)??[]}getEffectiveTokenLength(){return this.tokenizerName&&this.languageId?$qi[this.tokenizerName]?.[this.languageId]??4:4}tokenLength(e){return Math.ceil(e.length/this.getEffectiveTokenLength())}takeLastTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(-Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeFirstTokens(e,r){if(r<=0)return{text:"",tokens:[]};let n=e.slice(0,Math.floor(r*this.getEffectiveTokenLength()));return{text:n,tokens:Array.from({length:this.tokenLength(n)},(o,s)=>s)}}takeLastLinesTokens(e,r){let{text:n}=this.takeLastTokens(e,r);if(n.length===e.length||e[e.length-n.length-1]===` `)return n;let o=n.indexOf(` -`);return n.substring(o+1)}};async function L8r(t){try{let e=await uSt.create(t);t8e.set(t,e)}catch{}}a(L8r,"setTokenizer");var nye=(async()=>{t8e.set("mock",new dSt),await Promise.all([L8r("cl100k_base"),L8r("o200k_base")])})();f();f();var $Ui=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},U8r=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},fSt,n8e,Q8r,pSt=class extends fi{static{a(this,"AssertError")}constructor(e){let r=e.First();super(r===void 0?"Invalid Value":r.message),fSt.add(this),n8e.set(this,void 0),$Ui(this,n8e,e,"f"),this.error=r}Errors(){return new _L(U8r(this,fSt,"m",Q8r).call(this))}};n8e=new WeakMap,fSt=new WeakSet,Q8r=a(function*(){this.error&&(yield this.error),yield*U8r(this,n8e,"f")},"_AssertError_Iterator");function F8r(t,e,r){if(!_o(t,e,r))throw new pSt(G2(t,e,r))}a(F8r,"AssertValue");function i8e(...t){return t.length===3?F8r(t[0],t[1],t[2]):F8r(t[0],[],t[1])}a(i8e,"Assert");f();f();f();function VUi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=ea(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=ea(t[r]);return e}a(VUi,"FromObject");function WUi(t){return t.map(e=>ea(e))}a(WUi,"FromArray");function zUi(t){return t.slice()}a(zUi,"FromTypedArray");function YUi(t){return new Map(ea([...t.entries()]))}a(YUi,"FromMap");function KUi(t){return new Set(ea([...t.entries()]))}a(KUi,"FromSet");function JUi(t){return new Date(t.toISOString())}a(JUi,"FromDate");function ea(t){if(ti(t))return WUi(t);if(QA(t))return JUi(t);if(Nb(t))return zUi(t);if(Abr(t))return YUi(t);if(ybr(t))return KUi(t);if(Yi(t))return VUi(t);if(j_(t))return t;throw new Error("ValueClone: Unable to clone value")}a(ea,"Clone");var B1=class extends fi{static{a(this,"ValueCreateError")}constructor(e,r){super(r),this.schema=e}};function ta(t){return uL(t)?t():ea(t)}a(ta,"FromDefault");function XUi(t,e){return di(t,"default")?ta(t.default):{}}a(XUi,"FromAny");function ZUi(t,e){return{}}a(ZUi,"FromArgument");function eQi(t,e){if(t.uniqueItems===!0&&!di(t,"default"))throw new B1(t,"Array with the uniqueItems constraint requires a default value");if("contains"in t&&!di(t,"default"))throw new B1(t,"Array with the contains constraint requires a default value");return"default"in t?ta(t.default):t.minItems!==void 0?Array.from({length:t.minItems}).map(r=>L1(t.items,e)):[]}a(eQi,"FromArray");function tQi(t,e){return di(t,"default")?ta(t.default):(async function*(){})()}a(tQi,"FromAsyncIterator");function rQi(t,e){return di(t,"default")?ta(t.default):BigInt(0)}a(rQi,"FromBigInt");function nQi(t,e){return di(t,"default")?ta(t.default):!1}a(nQi,"FromBoolean");function iQi(t,e){if(di(t,"default"))return ta(t.default);{let r=L1(t.returns,e);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,o]of Object.entries(r)){let s=this;s[n]=o}}}:class{}}}a(iQi,"FromConstructor");function oQi(t,e){return di(t,"default")?ta(t.default):t.minimumTimestamp!==void 0?new Date(t.minimumTimestamp):new Date}a(oQi,"FromDate");function sQi(t,e){return di(t,"default")?ta(t.default):()=>L1(t.returns,e)}a(sQi,"FromFunction");function aQi(t,e){let r=globalThis.Object.values(t.$defs),n=t.$defs[t.$ref];return L1(n,[...e,...r])}a(aQi,"FromImport");function cQi(t,e){return di(t,"default")?ta(t.default):t.minimum!==void 0?t.minimum:0}a(cQi,"FromInteger");function lQi(t,e){if(di(t,"default"))return ta(t.default);{let r=t.allOf.reduce((n,o)=>{let s=L1(o,e);return typeof s=="object"?{...n,...s}:s},{});if(!_o(t,e,r))throw new B1(t,"Intersect produced invalid value. Consider using a default value.");return r}}a(lQi,"FromIntersect");function uQi(t,e){return di(t,"default")?ta(t.default):(function*(){})()}a(uQi,"FromIterator");function dQi(t,e){return di(t,"default")?ta(t.default):t.const}a(dQi,"FromLiteral");function fQi(t,e){if(di(t,"default"))return ta(t.default);throw new B1(t,"Never types cannot be created. Consider using a default value.")}a(fQi,"FromNever");function pQi(t,e){if(di(t,"default"))return ta(t.default);throw new B1(t,"Not types must have a default value")}a(pQi,"FromNot");function hQi(t,e){return di(t,"default")?ta(t.default):null}a(hQi,"FromNull");function mQi(t,e){return di(t,"default")?ta(t.default):t.minimum!==void 0?t.minimum:0}a(mQi,"FromNumber");function gQi(t,e){if(di(t,"default"))return ta(t.default);{let r=new Set(t.required),n={};for(let[o,s]of Object.entries(t.properties))r.has(o)&&(n[o]=L1(s,e));return n}}a(gQi,"FromObject");function AQi(t,e){return di(t,"default")?ta(t.default):Promise.resolve(L1(t.item,e))}a(AQi,"FromPromise");function yQi(t,e){return di(t,"default")?ta(t.default):{}}a(yQi,"FromRecord");function EQi(t,e){return di(t,"default")?ta(t.default):L1(Fs(t,e),e)}a(EQi,"FromRef");function CQi(t,e){if(di(t,"default"))return ta(t.default);throw new B1(t,"RegExp types cannot be created. Consider using a default value.")}a(CQi,"FromRegExp");function _Qi(t,e){if(t.pattern!==void 0){if(di(t,"default"))return ta(t.default);throw new B1(t,"String types with patterns must specify a default value")}else if(t.format!==void 0){if(di(t,"default"))return ta(t.default);throw new B1(t,"String types with formats must specify a default value")}else return di(t,"default")?ta(t.default):t.minLength!==void 0?Array.from({length:t.minLength}).map(()=>" ").join(""):""}a(_Qi,"FromString");function vQi(t,e){return di(t,"default")?ta(t.default):"value"in t?Symbol.for(t.value):Symbol()}a(vQi,"FromSymbol");function bQi(t,e){if(di(t,"default"))return ta(t.default);if(!wDe(t))throw new B1(t,"Can only create template literals that produce a finite variants. Consider using a default value.");return aZ(t)[0]}a(bQi,"FromTemplateLiteral");function TQi(t,e){if(q8r++>NQi)throw new B1(t,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return di(t,"default")?ta(t.default):L1(Fs(t,e),e)}a(TQi,"FromThis");function SQi(t,e){return di(t,"default")?ta(t.default):t.items===void 0?[]:Array.from({length:t.minItems}).map((r,n)=>L1(t.items[n],e))}a(SQi,"FromTuple");function IQi(t,e){if(di(t,"default"))return ta(t.default)}a(IQi,"FromUndefined");function xQi(t,e){if(di(t,"default"))return ta(t.default);if(t.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return L1(t.anyOf[0],e)}a(xQi,"FromUnion");function wQi(t,e){return di(t,"default")?ta(t.default):t.minByteLength!==void 0?new Uint8Array(t.minByteLength):new Uint8Array(0)}a(wQi,"FromUint8Array");function RQi(t,e){return di(t,"default")?ta(t.default):{}}a(RQi,"FromUnknown");function PQi(t,e){if(di(t,"default"))return ta(t.default)}a(PQi,"FromVoid");function kQi(t,e){if(di(t,"default"))return ta(t.default);throw new Error("User defined types must specify a default value")}a(kQi,"FromKind");function L1(t,e){let r=Vp(t,e),n=t;switch(n[mt]){case"Any":return XUi(n,r);case"Argument":return ZUi(n,r);case"Array":return eQi(n,r);case"AsyncIterator":return tQi(n,r);case"BigInt":return rQi(n,r);case"Boolean":return nQi(n,r);case"Constructor":return iQi(n,r);case"Date":return oQi(n,r);case"Function":return sQi(n,r);case"Import":return aQi(n,r);case"Integer":return cQi(n,r);case"Intersect":return lQi(n,r);case"Iterator":return uQi(n,r);case"Literal":return dQi(n,r);case"Never":return fQi(n,r);case"Not":return pQi(n,r);case"Null":return hQi(n,r);case"Number":return mQi(n,r);case"Object":return gQi(n,r);case"Promise":return AQi(n,r);case"Record":return yQi(n,r);case"Ref":return EQi(n,r);case"RegExp":return CQi(n,r);case"String":return _Qi(n,r);case"Symbol":return vQi(n,r);case"TemplateLiteral":return bQi(n,r);case"This":return TQi(n,r);case"Tuple":return SQi(n,r);case"Undefined":return IQi(n,r);case"Union":return xQi(n,r);case"Uint8Array":return wQi(n,r);case"Unknown":return RQi(n,r);case"Void":return PQi(n,r);default:if(!qA.Has(n[mt]))throw new B1(n,"Unknown type");return kQi(n,r)}}a(L1,"Visit");var NQi=512,q8r=0;function xx(...t){return q8r=0,t.length===2?L1(t[0],t[1]):L1(t[0],[])}a(xx,"Create");var o8e=class extends fi{static{a(this,"ValueCastError")}constructor(e,r){super(r),this.schema=e}};function G8r(t,e,r){if(t[mt]==="Object"&&typeof r=="object"&&!k5(r)){let n=t,o=Object.getOwnPropertyNames(r);return Object.entries(n.properties).reduce((c,[l,u])=>{let d=u[mt]==="Literal"&&u.const===r[l]?100:0,p=_o(u,e,r[l])?10:0,h=o.includes(l)?1:0;return c+(d+p+h)},0)}else if(t[mt]==="Union"){let o=t.anyOf.map(s=>Fs(s,e)).map(s=>G8r(s,e,r));return Math.max(...o)}else return _o(t,e,r)?1:0}a(G8r,"ScoreUnion");function DQi(t,e,r){let n=t.anyOf.map(c=>Fs(c,e)),[o,s]=[n[0],0];for(let c of n){let l=G8r(c,e,r);l>s&&(o=c,s=l)}return o}a(DQi,"SelectUnion");function MQi(t,e,r){if("default"in t)return typeof r=="function"?t.default:ea(t.default);{let n=DQi(t,e,r);return iye(n,e,r)}}a(MQi,"CastUnion");function OQi(t,e,r){return _o(t,e,r)?ea(r):xx(t,e)}a(OQi,"DefaultClone");function BQi(t,e,r){return _o(t,e,r)?r:xx(t,e)}a(BQi,"Default");function LQi(t,e,r){if(_o(t,e,r))return ea(r);let n=ti(r)?ea(r):xx(t,e),o=Ln(t.minItems)&&n.lengthnull)]:n,c=(Ln(t.maxItems)&&o.length>t.maxItems?o.slice(0,t.maxItems):o).map(u=>wx(t.items,e,u));if(t.uniqueItems!==!0)return c;let l=[...new Set(c)];if(!_o(t,e,l))throw new o8e(t,"Array cast produced invalid data due to uniqueItems constraint");return l}a(LQi,"FromArray");function FQi(t,e,r){if(_o(t,e,r))return xx(t,e);let n=new Set(t.returns.required||[]),o=a(function(){},"result");for(let[s,c]of Object.entries(t.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(o.prototype[s]=wx(c,e,r.prototype[s]));return o}a(FQi,"FromConstructor");function UQi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return wx(o,[...e,...n],r)}a(UQi,"FromImport");function H8r(t,e){return Yi(t)&&!Yi(e)||!Yi(t)&&Yi(e)?t:!Yi(t)||!Yi(e)?e:globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>{let o=n in e?H8r(t[n],e[n]):t[n];return{...r,[n]:o}},{})}a(H8r,"IntersectAssign");function QQi(t,e,r){if(_o(t,e,r))return r;let n=xx(t,e),o=H8r(n,r);return _o(t,e,o)?o:n}a(QQi,"FromIntersect");function qQi(t,e,r){throw new o8e(t,"Never types cannot be cast")}a(qQi,"FromNever");function GQi(t,e,r){if(_o(t,e,r))return r;if(r===null||typeof r!="object")return xx(t,e);let n=new Set(t.required||[]),o={};for(let[s,c]of Object.entries(t.properties))!n.has(s)&&r[s]===void 0||(o[s]=wx(c,e,r[s]));if(typeof t.additionalProperties=="object"){let s=Object.getOwnPropertyNames(t.properties);for(let c of Object.getOwnPropertyNames(r))s.includes(c)||(o[c]=wx(t.additionalProperties,e,r[c]))}return o}a(GQi,"FromObject");function HQi(t,e,r){if(_o(t,e,r))return ea(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return xx(t,e);let n=Object.getOwnPropertyNames(t.patternProperties)[0],o=t.patternProperties[n],s={};for(let[c,l]of Object.entries(r))s[c]=wx(o,e,l);return s}a(HQi,"FromRecord");function jQi(t,e,r){return wx(Fs(t,e),e,r)}a(jQi,"FromRef");function $Qi(t,e,r){return wx(Fs(t,e),e,r)}a($Qi,"FromThis");function VQi(t,e,r){return _o(t,e,r)?ea(r):ti(r)?t.items===void 0?[]:t.items.map((n,o)=>wx(n,e,r[o])):xx(t,e)}a(VQi,"FromTuple");function WQi(t,e,r){return _o(t,e,r)?ea(r):MQi(t,e,r)}a(WQi,"FromUnion");function wx(t,e,r){let n=Bs(t.$id)?Vp(t,e):e,o=t;switch(t[mt]){case"Array":return LQi(o,n,r);case"Constructor":return FQi(o,n,r);case"Import":return UQi(o,n,r);case"Intersect":return QQi(o,n,r);case"Never":return qQi(o,n,r);case"Object":return GQi(o,n,r);case"Record":return HQi(o,n,r);case"Ref":return jQi(o,n,r);case"This":return $Qi(o,n,r);case"Tuple":return VQi(o,n,r);case"Union":return WQi(o,n,r);case"Date":case"Symbol":case"Uint8Array":return OQi(t,e,r);default:return BQi(o,n,r)}}a(wx,"Visit");function iye(...t){return t.length===3?wx(t[0],t[1],t[2]):wx(t[0],[],t[1])}a(iye,"Cast");f();function zQi(t){return fL(t)&&t[mt]!=="Unsafe"}a(zQi,"IsCheckable");function YQi(t,e,r){return ti(r)?r.map(n=>VE(t.items,e,n)):r}a(YQi,"FromArray");function KQi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return VE(o,[...e,...n],r)}a(KQi,"FromImport");function JQi(t,e,r){let n=t.unevaluatedProperties,s=t.allOf.map(l=>VE(l,e,ea(r))).reduce((l,u)=>Yi(u)?{...l,...u}:u,{});if(!Yi(r)||!Yi(s)||!fL(n))return s;let c=CE(t);for(let l of Object.getOwnPropertyNames(r))c.includes(l)||_o(n,e,r[l])&&(s[l]=VE(n,e,r[l]));return s}a(JQi,"FromIntersect");function XQi(t,e,r){if(!Yi(r)||ti(r))return r;let n=t.additionalProperties;for(let o of Object.getOwnPropertyNames(r)){if(di(t.properties,o)){r[o]=VE(t.properties[o],e,r[o]);continue}if(fL(n)&&_o(n,e,r[o])){r[o]=VE(n,e,r[o]);continue}delete r[o]}return r}a(XQi,"FromObject");function ZQi(t,e,r){if(!Yi(r))return r;let n=t.additionalProperties,o=Object.getOwnPropertyNames(r),[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of o){if(l.test(u)){r[u]=VE(c,e,r[u]);continue}if(fL(n)&&_o(n,e,r[u])){r[u]=VE(n,e,r[u]);continue}delete r[u]}return r}a(ZQi,"FromRecord");function eqi(t,e,r){return VE(Fs(t,e),e,r)}a(eqi,"FromRef");function tqi(t,e,r){return VE(Fs(t,e),e,r)}a(tqi,"FromThis");function rqi(t,e,r){if(!ti(r))return r;if(Nl(t.items))return[];let n=Math.min(r.length,t.items.length);for(let o=0;on?r.slice(0,n):r}a(rqi,"FromTuple");function nqi(t,e,r){for(let n of t.anyOf)if(zQi(n)&&_o(n,e,r))return VE(n,e,r);return r}a(nqi,"FromUnion");function VE(t,e,r){let n=Bs(t.$id)?Vp(t,e):e,o=t;switch(o[mt]){case"Array":return YQi(o,n,r);case"Import":return KQi(o,n,r);case"Intersect":return JQi(o,n,r);case"Object":return XQi(o,n,r);case"Record":return ZQi(o,n,r);case"Ref":return eqi(o,n,r);case"This":return tqi(o,n,r);case"Tuple":return rqi(o,n,r);case"Union":return nqi(o,n,r);default:return r}}a(VE,"Visit");function s8e(...t){return t.length===3?VE(t[0],t[1],t[2]):VE(t[0],[],t[1])}a(s8e,"Clean");f();function a8e(t){return Bs(t)&&!isNaN(t)&&!isNaN(parseFloat(t))}a(a8e,"IsStringNumeric");function iqi(t){return rm(t)||U2(t)||Ln(t)}a(iqi,"IsValueToString");function oye(t){return t===!0||Ln(t)&&t===1||rm(t)&&t===BigInt("1")||Bs(t)&&(t.toLowerCase()==="true"||t==="1")}a(oye,"IsValueTrue");function sye(t){return t===!1||Ln(t)&&(t===0||Object.is(t,-0))||rm(t)&&t===BigInt("0")||Bs(t)&&(t.toLowerCase()==="false"||t==="0"||t==="-0")}a(sye,"IsValueFalse");function oqi(t){return Bs(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(oqi,"IsTimeStringWithTimeZone");function sqi(t){return Bs(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(sqi,"IsTimeStringWithoutTimeZone");function aqi(t){return Bs(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(aqi,"IsDateTimeStringWithTimeZone");function cqi(t){return Bs(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(cqi,"IsDateTimeStringWithoutTimeZone");function lqi(t){return Bs(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(t)}a(lqi,"IsDateString");function uqi(t,e){let r=$8r(t);return r===e?r:t}a(uqi,"TryConvertLiteralString");function dqi(t,e){let r=V8r(t);return r===e?r:t}a(dqi,"TryConvertLiteralNumber");function fqi(t,e){let r=j8r(t);return r===e?r:t}a(fqi,"TryConvertLiteralBoolean");function pqi(t,e){return Bs(t.const)?uqi(e,t.const):Ln(t.const)?dqi(e,t.const):U2(t.const)?fqi(e,t.const):e}a(pqi,"TryConvertLiteral");function j8r(t){return oye(t)?!0:sye(t)?!1:t}a(j8r,"TryConvertBoolean");function hqi(t){let e=a(r=>r.split(".")[0],"truncateInteger");return a8e(t)?BigInt(e(t)):Ln(t)?BigInt(Math.trunc(t)):sye(t)?BigInt(0):oye(t)?BigInt(1):t}a(hqi,"TryConvertBigInt");function $8r(t){return N5(t)&&t.description!==void 0?t.description.toString():iqi(t)?t.toString():t}a($8r,"TryConvertString");function V8r(t){return a8e(t)?parseFloat(t):oye(t)?1:sye(t)?0:t}a(V8r,"TryConvertNumber");function mqi(t){return a8e(t)?parseInt(t):Ln(t)?Math.trunc(t):oye(t)?1:sye(t)?0:t}a(mqi,"TryConvertInteger");function gqi(t){return Bs(t)&&t.toLowerCase()==="null"?null:t}a(gqi,"TryConvertNull");function Aqi(t){return Bs(t)&&t==="undefined"?void 0:t}a(Aqi,"TryConvertUndefined");function yqi(t){return QA(t)?t:Ln(t)?new Date(t):oye(t)?new Date(1):sye(t)?new Date(0):a8e(t)?new Date(parseInt(t)):sqi(t)?new Date(`1970-01-01T${t}.000Z`):oqi(t)?new Date(`1970-01-01T${t}`):cqi(t)?new Date(`${t}.000Z`):aqi(t)?new Date(t):lqi(t)?new Date(`${t}T00:00:00.000Z`):t}a(yqi,"TryConvertDate");function Eqi(t,e,r){return(ti(r)?r:[r]).map(o=>Rx(t.items,e,o))}a(Eqi,"FromArray");function Cqi(t,e,r){return hqi(r)}a(Cqi,"FromBigInt");function _qi(t,e,r){return j8r(r)}a(_qi,"FromBoolean");function vqi(t,e,r){return yqi(r)}a(vqi,"FromDate");function bqi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return Rx(o,[...e,...n],r)}a(bqi,"FromImport");function Tqi(t,e,r){return mqi(r)}a(Tqi,"FromInteger");function Sqi(t,e,r){return t.allOf.reduce((n,o)=>Rx(o,e,n),r)}a(Sqi,"FromIntersect");function Iqi(t,e,r){return pqi(t,r)}a(Iqi,"FromLiteral");function xqi(t,e,r){return gqi(r)}a(xqi,"FromNull");function wqi(t,e,r){return V8r(r)}a(wqi,"FromNumber");function Rqi(t,e,r){if(!Yi(r)||ti(r))return r;for(let n of Object.getOwnPropertyNames(t.properties))di(r,n)&&(r[n]=Rx(t.properties[n],e,r[n]));return r}a(Rqi,"FromObject");function Pqi(t,e,r){if(!(Yi(r)&&!ti(r)))return r;let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=t.patternProperties[o];for(let[c,l]of Object.entries(r))r[c]=Rx(s,e,l);return r}a(Pqi,"FromRecord");function kqi(t,e,r){return Rx(Fs(t,e),e,r)}a(kqi,"FromRef");function Nqi(t,e,r){return $8r(r)}a(Nqi,"FromString");function Dqi(t,e,r){return Bs(r)||Ln(r)?Symbol(r):r}a(Dqi,"FromSymbol");function Mqi(t,e,r){return Rx(Fs(t,e),e,r)}a(Mqi,"FromThis");function Oqi(t,e,r){return ti(r)&&!Nl(t.items)?r.map((o,s)=>s{let c=oy(s,e,n);return Yi(c)?{...o,...c}:c},{})}a(qqi,"FromIntersect");function Gqi(t,e,r){let n=VM(t,r);if(!Yi(n))return n;let o=Object.getOwnPropertyNames(t.properties);for(let s of o){let c=oy(t.properties[s],e,n[s]);Nl(c)||(n[s]=oy(t.properties[s],e,n[s]))}if(!hSt(t.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))o.includes(s)||(n[s]=oy(t.additionalProperties,e,n[s]));return n}a(Gqi,"FromObject");function Hqi(t,e,r){let n=VM(t,r);if(!Yi(n))return n;let o=t.additionalProperties,[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of Object.getOwnPropertyNames(n))l.test(u)&&hSt(c)&&(n[u]=oy(c,e,n[u]));if(!hSt(o))return n;for(let u of Object.getOwnPropertyNames(n))l.test(u)||(n[u]=oy(o,e,n[u]));return n}a(Hqi,"FromRecord");function jqi(t,e,r){return oy(Fs(t,e),e,VM(t,r))}a(jqi,"FromRef");function $qi(t,e,r){return oy(Fs(t,e),e,r)}a($qi,"FromThis");function Vqi(t,e,r){let n=VM(t,r);if(!ti(n)||Nl(t.items))return n;let[o,s]=[t.items,Math.max(t.items.length,n.length)];for(let c=0;cYqi,Format:()=>aye,Get:()=>Jqi,Has:()=>Kqi,Set:()=>zqi,ValuePointerRootDeleteError:()=>d8e,ValuePointerRootSetError:()=>u8e});f();var u8e=class extends fi{static{a(this,"ValuePointerRootSetError")}constructor(e,r,n){super("Cannot set root value"),this.value=e,this.path=r,this.update=n}},d8e=class extends fi{static{a(this,"ValuePointerRootDeleteError")}constructor(e,r){super("Cannot delete root value"),this.value=e,this.path=r}};function z8r(t){return t.indexOf("~")===-1?t:t.replace(/~1/g,"/").replace(/~0/g,"~")}a(z8r,"Escape");function*aye(t){if(t==="")return;let[e,r]=[0,0];for(let n=0;noj(t[o],e[o]))}a(Xqi,"ObjectType");function Zqi(t,e){return QA(e)&&t.getTime()===e.getTime()}a(Zqi,"DateType");function eGi(t,e){return!ti(e)||t.length!==e.length?!1:t.every((r,n)=>oj(r,e[n]))}a(eGi,"ArrayType");function tGi(t,e){return!Nb(e)||t.length!==e.length||Object.getPrototypeOf(t).constructor.name!==Object.getPrototypeOf(e).constructor.name?!1:t.every((r,n)=>oj(r,e[n]))}a(tGi,"TypedArrayType");function rGi(t,e){return t===e}a(rGi,"ValueType");function oj(t,e){if(QA(t))return Zqi(t,e);if(Nb(t))return tGi(t,e);if(ti(t))return eGi(t,e);if(Yi(t))return Xqi(t,e);if(j_(t))return rGi(t,e);throw new Error("ValueEquals: Unable to compare value")}a(oj,"Equal");var nGi=Aa({type:_s("insert"),path:GA(),value:WI()}),iGi=Aa({type:_s("update"),path:GA(),value:WI()}),oGi=Aa({type:_s("delete"),path:GA()}),K8r=ga([nGi,iGi,oGi]),f8e=class extends fi{static{a(this,"ValueDiffError")}constructor(e,r){super(r),this.value=e}};function p8e(t,e){return{type:"update",path:t,value:e}}a(p8e,"CreateUpdate");function J8r(t,e){return{type:"insert",path:t,value:e}}a(J8r,"CreateInsert");function X8r(t){return{type:"delete",path:t}}a(X8r,"CreateDelete");function Y8r(t){if(globalThis.Object.getOwnPropertySymbols(t).length>0)throw new f8e(t,"Cannot diff objects with symbols")}a(Y8r,"AssertDiffable");function*sGi(t,e,r){if(Y8r(e),Y8r(r),!Mmt(r))return yield p8e(t,r);let n=globalThis.Object.getOwnPropertyNames(e),o=globalThis.Object.getOwnPropertyNames(r);for(let s of o)di(e,s)||(yield J8r(`${t}/${s}`,r[s]));for(let s of n)di(r,s)&&(oj(e,r)||(yield*h8e(`${t}/${s}`,e[s],r[s])));for(let s of n)di(r,s)||(yield X8r(`${t}/${s}`))}a(sGi,"ObjectType");function*aGi(t,e,r){if(!ti(r))return yield p8e(t,r);for(let n=0;n=0;n--)n0&&t[0].path===""&&t[0].type==="update"}a(uGi,"IsRootUpdate");function dGi(t){return t.length===0}a(dGi,"IsIdentity");function e6r(t,e){if(uGi(e))return ea(e[0].value);if(dGi(e))return ea(t);let r=ea(t);for(let n of e)switch(n.type){case"insert":{Px.Set(r,n.path,n.value);break}case"update":{Px.Set(r,n.path,n.value);break}case"delete":{Px.Delete(r,n.path);break}}return r}a(e6r,"Patch");f();function t6r(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]],o=q5(e,r)?bZ(e,r,n):n;if(!_o(e,r,o))throw new vZ(e,o,G2(e,r,o).First());return o}a(t6r,"Encode");f();function m8e(t){return Yi(t)&&!ti(t)}a(m8e,"IsStandardObject");var g8e=class extends fi{static{a(this,"ValueMutateError")}constructor(e){super(e)}};function fGi(t,e,r,n){if(!m8e(r))Px.Set(t,e,ea(n));else{let o=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let c of o)s.includes(c)||delete r[c];for(let c of s)o.includes(c)||(r[c]=null);for(let c of s)mSt(t,`${e}/${c}`,r[c],n[c])}}a(fGi,"ObjectType");function pGi(t,e,r,n){if(!ti(r))Px.Set(t,e,ea(n));else{for(let o=0;o(i8e(s,c,l),l)],["Cast",(s,c,l)=>iye(s,c,l)],["Clean",(s,c,l)=>s8e(s,c,l)],["Clone",(s,c,l)=>ea(l)],["Convert",(s,c,l)=>c8e(s,c,l)],["Decode",(s,c,l)=>q5(s,c)?_Z(s,c,l):l],["Default",(s,c,l)=>l8e(s,c,l)],["Encode",(s,c,l)=>q5(s,c)?bZ(s,c,l):l]]);function r(s){e.delete(s)}a(r,"Delete"),t.Delete=r;function n(s,c){e.set(s,c)}a(n,"Set"),t.Set=n;function o(s){return e.get(s)}a(o,"Get"),t.Get=o})(gSt||(gSt={}));var i6r=["Clone","Clean","Default","Convert","Assert","Decode"];function AGi(t,e,r,n){return t.reduce((o,s)=>{let c=gSt.Get(s);if(Nl(c))throw new A8e(`Unable to find Parse operation '${s}'`);return c(e,r,o)},n)}a(AGi,"ParseValue");function o6r(...t){let[e,r,n,o]=t.length===4?[t[0],t[1],t[2],t[3]]:t.length===3?ti(t[0])?[t[0],t[1],[],t[2]]:[i6r,t[0],t[1],t[2]]:t.length===2?[i6r,t[0],[],t[1]]:(()=>{throw new A8e("Invalid Arguments")})();return AGi(e,r,n,o)}a(o6r,"Parse");f();var GP={};Ri(GP,{Assert:()=>i8e,Cast:()=>iye,Check:()=>_o,Clean:()=>s8e,Clone:()=>ea,Convert:()=>c8e,Create:()=>xx,Decode:()=>W8r,Default:()=>l8e,Diff:()=>Z8r,Edit:()=>K8r,Encode:()=>t6r,Equal:()=>oj,Errors:()=>G2,Hash:()=>CL,Mutate:()=>n6r,Parse:()=>o6r,Patch:()=>e6r,ValueErrorIterator:()=>_L});f();var yGi="gpt-41-copilot",AT=class t{constructor(e,r=!0){this._ctx=e;this.onModelsFetchedCallbacks=[];this.fetchedModelData=[];this.customModels=[];this.editorPreviewFeaturesDisabled=!1;r&&ss(this._ctx,n=>this.refreshAvailableModels(n))}static{a(this,"AvailableModelsManager")}async refreshAvailableModels(e){await this.refreshModels(e);for(let r of this.onModelsFetchedCallbacks)r()}addHandler(e){this.onModelsFetchedCallbacks.push(e)}getDefaultModelId(){if(this.fetchedModelData){let e=t.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled)[0];if(e)return e.id}return yGi}parseModelsResponse(e){try{return GP.Parse(_8r,e)}catch(r){_r.exception(this._ctx,r,"Failed to parse /models response from CAPI");return}}async refreshModels(e){let r=await this.fetchModels(e);r&&(this.fetchedModelData=r)}async fetchModels(e){return this.customModels=e.getTokenValue("cml")?.split(",")??[],this.editorPreviewFeaturesDisabled=e.getTokenValue("editor_preview_features")=="0",await this.fetch(e)}fetch(e){return(!this.fetchInProgress||this.fetchInProgress.withToken.token!==e.token)&&(this.fetchInProgress={withToken:e,response:this.fetchImpl(e).finally(()=>{this.fetchInProgress=void 0})}),this.fetchInProgress.response}async fetchImpl(e){let r=await ij(this._ctx,"/models",e);return r.ok?this.parseModelsResponse(await r.json())?.data??[]:(_r.error(this._ctx,"Failed to fetch models from CAPI",{status:r.status,statusText:r.statusText}),null)}getGenericCompletionModels(){let e=t.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled);return t.mapCompletionModels(e)}getTokenizerForModel(e){let n=this.getGenericCompletionModels().find(o=>o.modelId===e);return n?n.tokenizer:"o200k_base"}static filterCompletionModels(e,r){return e.filter(n=>n.capabilities.type==="completion").filter(n=>!r||n.preview===!1||n.preview===void 0)}static filterModelsWithEditorPreviewFeatures(e,r){return e.filter(n=>!r||n.preview===!1||n.preview===void 0)}static mapCompletionModels(e){return e.map(r=>({modelId:r.id,label:r.name,preview:!!r.preview,tokenizer:r.capabilities.tokenizer}))}getCurrentModelRequestInfo(e=void 0){let r=this.getDefaultModelId(),n=v8r(this._ctx);if(n){let l=this.getGenericCompletionModels().map(u=>u.modelId);l.includes(n)||(l.length>0&&_r.error(this._ctx,`User selected model ${n} is not in the list of generic models: ${l.join(", ")}, falling back to default model.`),n=null),r===n&&(n=null)}let o=vr(this._ctx,tt.DebugOverrideEngine)||vr(this._ctx,tt.DebugOverrideEngineLegacy);if(o)return new p6(o,"override");let s=e?this._ctx.get(jt).customEngine(e):"",c=e?this._ctx.get(jt).customEngineTargetEngine(e):void 0;return n?s&&c&&n===c?new p6(s,"exp"):new p6(n,"modelpicker"):s?new p6(s,"exp"):this.customModels.length>0?new p6(this.customModels[0],"custommodel"):new p6(r,"default")}},p6=class{constructor(e,r){this.modelId=e;this.modelChoiceSource=r}static{a(this,"ModelRequestInfo")}get headers(){return{}}};function h6(t,e=void 0){let r=t.get(AT),n=r.getCurrentModelRequestInfo(e),o=r.getTokenizerForModel(n.modelId);return{headers:n.headers,modelId:n.modelId,engineChoiceSource:n.modelChoiceSource,tokenizer:o}}a(h6,"getEngineRequestInfo");f();f();var Xn=class{static{a(this,"FileSystem")}};var b6r=de(v6r());function T6r(t){return t!==void 0&&t!==0}a(T6r,"isRepoInfo");function S6r(t){if(t===void 0||t===0)return"";let e=WM(t);if(e==="github/github")return e;let r=jGi(t)?.toLowerCase();return r!==void 0?r:""}a(S6r,"getDogFood");function WM(t){if(t!==void 0&&t!==0&&t.hostname==="github.com")return t.owner+"/"+t.repo}a(WM,"tryGetGitHubNWO");function jGi(t){if(t===void 0||t===0)return;let e=t.hostname.toLowerCase(),r=e==="azure.com"||e.endsWith(".azure.com"),n=e==="visualstudio.com"||e.endsWith(".visualstudio.com");if(r||n)return t.owner+"/"+t.repo}a(jGi,"tryGetADONWO");function m6(t,e){let r=Wu(e);return $Gi(t,r)}a(m6,"extractRepoInfoInBackground");var $Gi=YGi(VGi,1e4);async function VGi(t,e){let r=Zvr(e);if(!r)return;let n=await WGi(t,r);if(!n)return;let o=t.get(Xn),s=Ti(n,".git","config"),c;try{c=await o.readFileString(s)}catch{return}let l=zGi(c)??"",u=CSt(l),d={uri:n};return u===void 0?{baseFolder:d,url:l,hostname:"",owner:"",repo:"",pathname:""}:{baseFolder:d,url:l,...u}}a(VGi,"extractRepoInfo");function CSt(t){let e;try{if(e=(0,b6r.default)(t),e.resource==""||e.owner==""||e.name==""||e.pathname=="")return}catch{return}return{hostname:e.resource,owner:e.owner,repo:e.name,pathname:e.pathname}}a(CSt,"parseRepoUrl");async function WGi(t,e){let r=e+"_add_to_make_longer",n=t.get(Xn);for(;e!=="file:///"&&e.length{let c=JSON.stringify(s),l=r.get(c);if(l)return l.result;if(n.has(c))return 0;let u=t(o,...s);return n.add(c),u.then(d=>{r.set(c,new ESt(d)),n.delete(c)}),0}}a(YGi,"computeInBackgroundAndMemoize");f();var cye=500,I6r=8192-cye,x6r=4,y8e=10,w6r=1e3*5,E8e={prefix:35,suffix:15,stableContext:35,volatileContext:15},KGi={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor",c:"cpp"};function lye(t){return t=t.toLowerCase(),KGi[t]??t}a(lye,"normalizeLanguageId");var _St=class{constructor(e){this.ctx=e;this.cache=new $r(200)}static{a(this,"FilterSettingsToExpConfigs")}async fetchExpConfig(e,r){let n=e.stringify()+` -`+JSON.stringify(r),o=this.cache.get(n);return o||(o=new vSt(()=>this.ctx.get(Ex).fetchExperiments(this.ctx,r,e.toHeaders()),1e3*60*60),this.cache.set(n,o)),o.run()}getCachedExpConfig(e){return this.cache.get(e.stringify())?.value()}},vSt=class{constructor(e,r=1/0){this.producer=e;this.expirationMs=r}static{a(this,"Task")}async run(){return this.promise===void 0&&(this.promise=this.producer(),this.storeResult(this.promise).then(()=>{this.expirationMs<1/0&&this.promise!==void 0&&setTimeout(()=>this.promise=void 0,this.expirationMs)})),this.promise}async storeResult(e){try{this.result=await e}finally{this.result===void 0&&(this.promise=void 0)}}value(){return this.result}};function XGi(t){return"uri"in t}a(XGi,"isCompletionsFiltersInfo");var jt=class t{constructor(e){this.ctx=e;this.staticFilters={};this.dynamicFilters={};this.dynamicFilterGroups=[];this.upcomingDynamicFilters={};this.assignments=new _St(this.ctx)}static{a(this,"Features")}static{this.upcomingDynamicFilterCheckDelayMs=20}static{this.upcomingTimeBucketMinutes=5+Math.floor(Math.random()*11)}registerStaticFilters(e){Object.assign(this.staticFilters,e)}registerDynamicFilter(e,r){this.dynamicFilters[e]=r}registerDynamicFilterGroup(e){this.dynamicFilterGroups.push(e)}getDynamicFilterValues(){let e={};for(let r of this.dynamicFilterGroups)Object.assign(e,r());for(let[r,n]of Object.entries(this.dynamicFilters))e[r]=n();return e}registerUpcomingDynamicFilter(e,r){this.upcomingDynamicFilters[e]=r}async updateExPValuesAndAssignments(e,r,n=yt.createAndMarkAsIssued()){if(n instanceof Gb)throw new Error("updateExPValuesAndAssignments should not be called with TelemetryWithExp");let o=r&&XGi(r)?m6(this.ctx,r.uri):void 0,s=WM(o)??"",c=S6r(o)??"",l=r?.languageId??"",u=h6(this.ctx).modelId,d=F1r(e),p=e.getTokenValue("ft")??"",h=e.getTokenValue("ol")??"",m=e.getTokenValue("cml")??"",g=e.getTokenValue("tid")??"",y=this.ctx.get(_d).getProperties(),E=e.endpoints,_={"X-Copilot-Repository":s,"X-Copilot-FileType":l,"X-Copilot-UserKind":d,"X-Copilot-Dogfood":c,"X-Copilot-Engine":u,"X-Copilot-CustomModel":p,"X-Copilot-Orgs":h,"X-Copilot-CustomModelNames":m,"X-Copilot-CopilotTrackingId":g,"X-Copilot-SKU":y.sku||""},v=this.getGranularityDirectory(),b=this.makeFilterSettings(_),I=v.extendFilters(b),x=await this.getExpConfig(I.newFilterSettings,E);v.update(b,+(x.variables.copilotbycallbuckets??NaN),+(x.variables.copilottimeperiodsizeinh??NaN));let R=v.extendFilters(b),w=R.newFilterSettings,P=await this.getExpConfig(w,E),k=new Promise(Q=>setTimeout(Q,t.upcomingDynamicFilterCheckDelayMs));for(let Q of R.otherFilterSettingsToPrefetch)k=k.then(async()=>{await new Promise(M=>setTimeout(M,t.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(Q,E)});return this.prepareForUpcomingFilters(w,E),new Gb(n.properties,n.measurements,n.issuedTime,{filters:w,exp:P})}async fetchTokenAndUpdateExPValuesAndAssignments(e,r){let n=await this.ctx.get(Ot).getToken();return await this.updateExPValuesAndAssignments(n,e,r)}getGranularityDirectory(){if(!this.granularityDirectory){let e=this.ctx.get(Ks).machineId;this.granularityDirectory=new Y4e(e,this.ctx.get(bP))}return this.granularityDirectory}makeFilterSettings(e){return new w5({...this.staticFilters,...this.getDynamicFilterValues(),...e})}async getExpConfig(e,r){try{return this.assignments.fetchExpConfig(e,r)}catch(n){return gE.createFallbackConfig(this.ctx,`Error fetching ExP config: ${String(n)}`)}}async prepareForUpcomingFilters(e,r){if(!(new Date().getMinutes()<60-t.upcomingTimeBucketMinutes))for(let[n,o]of Object.entries(this.upcomingDynamicFilters))await new Promise(s=>setTimeout(s,t.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(e.withChange(n,o()),r)}stringify(){let e=this.assignments.getCachedExpConfig(new w5({}));return JSON.stringify(e?.variables??{})}async getFallbackExpAndFilters(){let e=this.makeFilterSettings({}),r=zX(this.ctx),n=await this.getExpConfig(e,r);return{filters:e,exp:n}}disableLogProb(e){return e.filtersAndExp.exp.variables.copilotdisablelogprob??!0}overrideBlockMode(e){return e.filtersAndExp.exp.variables.copilotoverrideblockmode||void 0}customEngine(e){return e.filtersAndExp.exp.variables.copilotcustomengine??""}customEngineTargetEngine(e){return e.filtersAndExp.exp.variables.copilotcustomenginetargetengine}suffixPercent(e){return e.filtersAndExp.exp.variables.CopilotSuffixPercent??E8e.suffix}suffixMatchThreshold(e){return e.filtersAndExp.exp.variables.copilotsuffixmatchthreshold??y8e}cppHeadersEnableSwitch(e){return e.filtersAndExp.exp.variables.copilotcppheadersenableswitch??!1}relatedFilesVSCodeCSharp(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscodecsharp??!1}relatedFilesVSCodeTypeScript(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscodetypescript??!1}relatedFilesVSCode(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscode??!1}contextProviders(e){let r=e.filtersAndExp.exp.variables.copilotcontextproviders??"";return r?r.split(",").map(n=>n.trim()):[]}contextProviderTimeBudget(e){return e.filtersAndExp.exp.variables.copilotcontextprovidertimebudget??150}includeNeighboringFiles(e){return e.filtersAndExp.exp.variables.copilotincludeneighboringfiles??!1}excludeRelatedFiles(e){return e.filtersAndExp.exp.variables.copilotexcluderelatedfiles??!1}maxPromptCompletionTokens(e){return e.filtersAndExp.exp.variables.maxpromptcompletionTokens??I6r+cye}ideChatMaxRequestTokens(e){return e.filtersAndExp.exp.variables.idechatmaxrequesttokens??-1}ideChatExpModelIds(e){return e.filtersAndExp.exp.variables.idechatexpmodelids??""}ideChatEnableProjectMetadata(e){return e.filtersAndExp.exp.variables.idechatenableprojectmetadata??!1}ideDataMigrationCompleted(e){return e.filtersAndExp.exp.variables.idedatamigrationcompleted??!1}workspaceContextCoordinator(e){return e.filtersAndExp.exp.variables.copilotworkspacecontextcoordinator??!1}workspaceContextCacheTime(e){return e.filtersAndExp.exp.variables.copilotworkspacecontextcachetime??w6r}stableContextPercent(e){return e.filtersAndExp.exp.variables.copilotstablecontextpercent??E8e.stableContext}volatileContextPercent(e){return e.filtersAndExp.exp.variables.copilotvolatilecontextpercent??E8e.volatileContext}cppContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotcppContextProviderParams}csharpContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotcsharpcontextproviderparams}javaContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotjavacontextproviderparams}multiLanguageContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotmultilanguagecontextproviderparams}tsContextProviderParams(e){return e.filtersAndExp.exp.variables.copilottscontextproviderparams}completionsDebounce(e){return e.filtersAndExp.exp.variables.copilotcompletionsdebounce}enableElectronFetcher(e){return e.filtersAndExp.exp.variables.copilotelectronfetcher??!1}enableFetchFetcher(e){return e.filtersAndExp.exp.variables.copilotfetchfetcher??!1}asyncCompletionsTimeout(e){return e.filtersAndExp.exp.variables.copilotasynccompletionstimeout??200}enablePromptContextProxyField(e){return e.filtersAndExp.exp.variables.copilotenablepromptcontextproxyfield??!1}enableProgressiveReveal(e){return e.filtersAndExp.exp.variables.copilotprogressivereveal??!1}modelAlwaysTerminatesSingleline(e){return e.filtersAndExp.exp.variables.copilotmodelterminatesingleline??!0}longLookaheadSize(e){return e.filtersAndExp.exp.variables.copilotprogressivereveallonglookaheadsize??9}shortLookaheadSize(e){return e.filtersAndExp.exp.variables.copilotprogressiverevealshortlookaheadsize??3}maxMultilineTokens(e){return e.filtersAndExp.exp.variables.copilotmaxmultilinetokens??200}multilineAfterAcceptLines(e){return e.filtersAndExp.exp.variables.copilotmultilineafteracceptlines??1}enableNESXTab(e){return e.filtersAndExp.exp.variables.copilotnesxtab??!1}getNESXTabModelID(e){return e.filtersAndExp.exp.variables.copilotnesxtabmodelid??"copilot-nes-xtab"}completionsDelay(e){return e.filtersAndExp.exp.variables.copilotcompletionsdelay??200}singleLineUnlessAccepted(e){return e.filtersAndExp.exp.variables.copilotsinglelineunlessaccepted??!1}useCompletionsComparisonPanel(e){return e.filtersAndExp.exp.variables.copilotusecompletionscomparisonpanel??!1}comparisonPanelModelIds(e){return e.filtersAndExp.exp.variables.copilotcomparisonpanelmodelids??""}comparisonPanelRandomizedMode(e){return e.filtersAndExp.exp.variables.copilotcomparisonpanelrandomizedmode??!0}ideEnableCopilotSemanticSearch(e){return e.filtersAndExp.exp.variables.ideenablecopilotsemanticsearch??!1}useChatLibCompletions(e){return e.filtersAndExp.exp.variables.copilotusechatlibcompletions??!1}cveRemediatorAgentEnabled(e){return e.filtersAndExp.exp.variables.cveremediatoragentenabled??!1}anthropicUseMessagesEndpoint(e){return e.filtersAndExp.exp.variables.anthropicusemessagesendpoint??!1}instantApplyModelMigration(e){return e.filtersAndExp.exp.variables.copilotinstantapplymodelmigration??!1}appmodContextMenuEnabled(e){return e.filtersAndExp.exp.variables.copilotappmodcontextmenuenabled??!1}};f();f();f();var C8e=de(bre());var TSt={python:"python",javascript:"javascript",javascriptreact:"javascript",jsx:"javascript",typescript:"typescript",typescriptreact:"tsx",go:"go",ruby:"ruby",csharp:"c-sharp",java:"java",php:"php",c:"cpp",cpp:"cpp"};function F1(t){return t in TSt&&t!=="csharp"&&t!=="java"&&t!=="php"&&t!=="c"&&t!=="cpp"}a(F1,"isSupportedLanguageId");function _8e(t){if(!(t in TSt))throw new Error(`Unrecognized language: ${t}`);return TSt[t]}a(_8e,"languageIdToWasmLanguage");var bSt=new Map;async function ZGi(t){let e;try{e=await Cre(`tree-sitter-${t}.wasm`)}catch(r){throw r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.name==="Error"?new Ere(`Could not load tree-sitter-${t}.wasm`,r):r}return C8e.default.Language.load(e)}a(ZGi,"loadWasmLanguage");function ISt(t){let e=_8e(t);if(!bSt.has(e)){let r=ZGi(e);bSt.set(e,r)}return bSt.get(e)}a(ISt,"getLanguage");var SSt=class extends Error{static{a(this,"WrappedError")}constructor(e,r){super(e,{cause:r})}};async function g6(t,e){return(await xSt(t,e))[0]}a(g6,"parseTreeSitter");async function xSt(t,e){await C8e.default.init({locateFile:a(s=>ZTt(s),"locateFile")});let r;try{r=new C8e.default}catch(s){throw s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&s.message.includes("table index is out of bounds")?new SSt(`Could not init Parse for language <${t}>`,s):s}let n=await ISt(t);r.setLanguage(n);let o=r.parse(e);return r.delete(),[o,n.version]}a(xSt,"parseTreeSitterIncludingVersion");function R6r(t){switch(_8e(t)){case"python":return null;case"javascript":case"typescript":case"tsx":case"go":case"c-sharp":case"java":case"php":case"cpp":return"}";case"ruby":return"end"}}a(R6r,"getBlockCloseToken");function eHi(t,e){let r=[];for(let n of t){if(!n[1]){let o=e.tree.getLanguage();n[1]=o.query(n[0])}r.push(...n[1].matches(e))}return r}a(eHi,"innerQuery");var tHi=[`[ +`);return n.substring(o+1)}};async function B6r(t){try{let e=await PSt.create(t);lLe.set(t,e)}catch{}}a(B6r,"setTokenizer");var tAe=(async()=>{lLe.set("mock",new kSt),await Promise.all([B6r("cl100k_base"),B6r("o200k_base")])})();f();f();var Vqi=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},F6r=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},DSt,dLe,U6r,NSt=class extends fi{static{a(this,"AssertError")}constructor(e){let r=e.First();super(r===void 0?"Invalid Value":r.message),DSt.add(this),dLe.set(this,void 0),Vqi(this,dLe,e,"f"),this.error=r}Errors(){return new nL(F6r(this,DSt,"m",U6r).call(this))}};dLe=new WeakMap,DSt=new WeakSet,U6r=a(function*(){this.error&&(yield this.error),yield*F6r(this,dLe,"f")},"_AssertError_Iterator");function L6r(t,e,r){if(!Ao(t,e,r))throw new NSt(k2(t,e,r))}a(L6r,"AssertValue");function fLe(...t){return t.length===3?L6r(t[0],t[1],t[2]):L6r(t[0],[],t[1])}a(fLe,"Assert");f();f();f();function Wqi(t){let e={};for(let r of Object.getOwnPropertyNames(t))e[r]=zs(t[r]);for(let r of Object.getOwnPropertySymbols(t))e[r]=zs(t[r]);return e}a(Wqi,"FromObject");function zqi(t){return t.map(e=>zs(e))}a(zqi,"FromArray");function Yqi(t){return t.slice()}a(Yqi,"FromTypedArray");function Kqi(t){return new Map(zs([...t.entries()]))}a(Kqi,"FromMap");function Jqi(t){return new Set(zs([...t.entries()]))}a(Jqi,"FromSet");function Xqi(t){return new Date(t.toISOString())}a(Xqi,"FromDate");function zs(t){if(ei(t))return zqi(t);if(DA(t))return Xqi(t);if(Eb(t))return Yqi(t);if(Bbr(t))return Kqi(t);if(Lbr(t))return Jqi(t);if(ji(t))return Wqi(t);if(DC(t))return t;throw new Error("ValueClone: Unable to clone value")}a(zs,"Clone");var b1=class extends fi{static{a(this,"ValueCreateError")}constructor(e,r){super(r),this.schema=e}};function Ys(t){return V3(t)?t():zs(t)}a(Ys,"FromDefault");function Zqi(t,e){return di(t,"default")?Ys(t.default):{}}a(Zqi,"FromAny");function eGi(t,e){return{}}a(eGi,"FromArgument");function tGi(t,e){if(t.uniqueItems===!0&&!di(t,"default"))throw new b1(t,"Array with the uniqueItems constraint requires a default value");if("contains"in t&&!di(t,"default"))throw new b1(t,"Array with the contains constraint requires a default value");return"default"in t?Ys(t.default):t.minItems!==void 0?Array.from({length:t.minItems}).map(r=>T1(t.items,e)):[]}a(tGi,"FromArray");function rGi(t,e){return di(t,"default")?Ys(t.default):(async function*(){})()}a(rGi,"FromAsyncIterator");function nGi(t,e){return di(t,"default")?Ys(t.default):BigInt(0)}a(nGi,"FromBigInt");function iGi(t,e){return di(t,"default")?Ys(t.default):!1}a(iGi,"FromBoolean");function oGi(t,e){if(di(t,"default"))return Ys(t.default);{let r=T1(t.returns,e);return typeof r=="object"&&!Array.isArray(r)?class{constructor(){for(let[n,o]of Object.entries(r)){let s=this;s[n]=o}}}:class{}}}a(oGi,"FromConstructor");function sGi(t,e){return di(t,"default")?Ys(t.default):t.minimumTimestamp!==void 0?new Date(t.minimumTimestamp):new Date}a(sGi,"FromDate");function aGi(t,e){return di(t,"default")?Ys(t.default):()=>T1(t.returns,e)}a(aGi,"FromFunction");function cGi(t,e){let r=globalThis.Object.values(t.$defs),n=t.$defs[t.$ref];return T1(n,[...e,...r])}a(cGi,"FromImport");function lGi(t,e){return di(t,"default")?Ys(t.default):t.minimum!==void 0?t.minimum:0}a(lGi,"FromInteger");function uGi(t,e){if(di(t,"default"))return Ys(t.default);{let r=t.allOf.reduce((n,o)=>{let s=T1(o,e);return typeof s=="object"?{...n,...s}:s},{});if(!Ao(t,e,r))throw new b1(t,"Intersect produced invalid value. Consider using a default value.");return r}}a(uGi,"FromIntersect");function dGi(t,e){return di(t,"default")?Ys(t.default):(function*(){})()}a(dGi,"FromIterator");function fGi(t,e){return di(t,"default")?Ys(t.default):t.const}a(fGi,"FromLiteral");function pGi(t,e){if(di(t,"default"))return Ys(t.default);throw new b1(t,"Never types cannot be created. Consider using a default value.")}a(pGi,"FromNever");function hGi(t,e){if(di(t,"default"))return Ys(t.default);throw new b1(t,"Not types must have a default value")}a(hGi,"FromNot");function mGi(t,e){return di(t,"default")?Ys(t.default):null}a(mGi,"FromNull");function gGi(t,e){return di(t,"default")?Ys(t.default):t.minimum!==void 0?t.minimum:0}a(gGi,"FromNumber");function AGi(t,e){if(di(t,"default"))return Ys(t.default);{let r=new Set(t.required),n={};for(let[o,s]of Object.entries(t.properties))r.has(o)&&(n[o]=T1(s,e));return n}}a(AGi,"FromObject");function yGi(t,e){return di(t,"default")?Ys(t.default):Promise.resolve(T1(t.item,e))}a(yGi,"FromPromise");function EGi(t,e){return di(t,"default")?Ys(t.default):{}}a(EGi,"FromRecord");function _Gi(t,e){return di(t,"default")?Ys(t.default):T1(Ns(t,e),e)}a(_Gi,"FromRef");function CGi(t,e){if(di(t,"default"))return Ys(t.default);throw new b1(t,"RegExp types cannot be created. Consider using a default value.")}a(CGi,"FromRegExp");function vGi(t,e){if(t.pattern!==void 0){if(di(t,"default"))return Ys(t.default);throw new b1(t,"String types with patterns must specify a default value")}else if(t.format!==void 0){if(di(t,"default"))return Ys(t.default);throw new b1(t,"String types with formats must specify a default value")}else return di(t,"default")?Ys(t.default):t.minLength!==void 0?Array.from({length:t.minLength}).map(()=>" ").join(""):""}a(vGi,"FromString");function bGi(t,e){return di(t,"default")?Ys(t.default):"value"in t?Symbol.for(t.value):Symbol()}a(bGi,"FromSymbol");function TGi(t,e){if(di(t,"default"))return Ys(t.default);if(!S5e(t))throw new b1(t,"Can only create template literals that produce a finite variants. Consider using a default value.");return hX(t)[0]}a(TGi,"FromTemplateLiteral");function SGi(t,e){if(Q6r++>NGi)throw new b1(t,"Cannot create recursive type as it appears possibly infinite. Consider using a default.");return di(t,"default")?Ys(t.default):T1(Ns(t,e),e)}a(SGi,"FromThis");function IGi(t,e){return di(t,"default")?Ys(t.default):t.items===void 0?[]:Array.from({length:t.minItems}).map((r,n)=>T1(t.items[n],e))}a(IGi,"FromTuple");function xGi(t,e){if(di(t,"default"))return Ys(t.default)}a(xGi,"FromUndefined");function wGi(t,e){if(di(t,"default"))return Ys(t.default);if(t.anyOf.length===0)throw new Error("ValueCreate.Union: Cannot create Union with zero variants");return T1(t.anyOf[0],e)}a(wGi,"FromUnion");function RGi(t,e){return di(t,"default")?Ys(t.default):t.minByteLength!==void 0?new Uint8Array(t.minByteLength):new Uint8Array(0)}a(RGi,"FromUint8Array");function PGi(t,e){return di(t,"default")?Ys(t.default):{}}a(PGi,"FromUnknown");function kGi(t,e){if(di(t,"default"))return Ys(t.default)}a(kGi,"FromVoid");function DGi(t,e){if(di(t,"default"))return Ys(t.default);throw new Error("User defined types must specify a default value")}a(DGi,"FromKind");function T1(t,e){let r=Qp(t,e),n=t;switch(n[pt]){case"Any":return Zqi(n,r);case"Argument":return eGi(n,r);case"Array":return tGi(n,r);case"AsyncIterator":return rGi(n,r);case"BigInt":return nGi(n,r);case"Boolean":return iGi(n,r);case"Constructor":return oGi(n,r);case"Date":return sGi(n,r);case"Function":return aGi(n,r);case"Import":return cGi(n,r);case"Integer":return lGi(n,r);case"Intersect":return uGi(n,r);case"Iterator":return dGi(n,r);case"Literal":return fGi(n,r);case"Never":return pGi(n,r);case"Not":return hGi(n,r);case"Null":return mGi(n,r);case"Number":return gGi(n,r);case"Object":return AGi(n,r);case"Promise":return yGi(n,r);case"Record":return EGi(n,r);case"Ref":return _Gi(n,r);case"RegExp":return CGi(n,r);case"String":return vGi(n,r);case"Symbol":return bGi(n,r);case"TemplateLiteral":return TGi(n,r);case"This":return SGi(n,r);case"Tuple":return IGi(n,r);case"Undefined":return xGi(n,r);case"Union":return wGi(n,r);case"Uint8Array":return RGi(n,r);case"Unknown":return PGi(n,r);case"Void":return kGi(n,r);default:if(!NA.Has(n[pt]))throw new b1(n,"Unknown type");return DGi(n,r)}}a(T1,"Visit");var NGi=512,Q6r=0;function gx(...t){return Q6r=0,t.length===2?T1(t[0],t[1]):T1(t[0],[])}a(gx,"Create");var pLe=class extends fi{static{a(this,"ValueCastError")}constructor(e,r){super(r),this.schema=e}};function q6r(t,e,r){if(t[pt]==="Object"&&typeof r=="object"&&!EN(r)){let n=t,o=Object.getOwnPropertyNames(r);return Object.entries(n.properties).reduce((c,[l,u])=>{let d=u[pt]==="Literal"&&u.const===r[l]?100:0,p=Ao(u,e,r[l])?10:0,h=o.includes(l)?1:0;return c+(d+p+h)},0)}else if(t[pt]==="Union"){let o=t.anyOf.map(s=>Ns(s,e)).map(s=>q6r(s,e,r));return Math.max(...o)}else return Ao(t,e,r)?1:0}a(q6r,"ScoreUnion");function MGi(t,e,r){let n=t.anyOf.map(c=>Ns(c,e)),[o,s]=[n[0],0];for(let c of n){let l=q6r(c,e,r);l>s&&(o=c,s=l)}return o}a(MGi,"SelectUnion");function OGi(t,e,r){if("default"in t)return typeof r=="function"?t.default:zs(t.default);{let n=MGi(t,e,r);return rAe(n,e,r)}}a(OGi,"CastUnion");function BGi(t,e,r){return Ao(t,e,r)?zs(r):gx(t,e)}a(BGi,"DefaultClone");function LGi(t,e,r){return Ao(t,e,r)?r:gx(t,e)}a(LGi,"Default");function FGi(t,e,r){if(Ao(t,e,r))return zs(r);let n=ei(r)?zs(r):gx(t,e),o=Ln(t.minItems)&&n.lengthnull)]:n,c=(Ln(t.maxItems)&&o.length>t.maxItems?o.slice(0,t.maxItems):o).map(u=>Ax(t.items,e,u));if(t.uniqueItems!==!0)return c;let l=[...new Set(c)];if(!Ao(t,e,l))throw new pLe(t,"Array cast produced invalid data due to uniqueItems constraint");return l}a(FGi,"FromArray");function UGi(t,e,r){if(Ao(t,e,r))return gx(t,e);let n=new Set(t.returns.required||[]),o=a(function(){},"result");for(let[s,c]of Object.entries(t.returns.properties))!n.has(s)&&r.prototype[s]===void 0||(o.prototype[s]=Ax(c,e,r.prototype[s]));return o}a(UGi,"FromConstructor");function QGi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return Ax(o,[...e,...n],r)}a(QGi,"FromImport");function G6r(t,e){return ji(t)&&!ji(e)||!ji(t)&&ji(e)?t:!ji(t)||!ji(e)?e:globalThis.Object.getOwnPropertyNames(t).reduce((r,n)=>{let o=n in e?G6r(t[n],e[n]):t[n];return{...r,[n]:o}},{})}a(G6r,"IntersectAssign");function qGi(t,e,r){if(Ao(t,e,r))return r;let n=gx(t,e),o=G6r(n,r);return Ao(t,e,o)?o:n}a(qGi,"FromIntersect");function GGi(t,e,r){throw new pLe(t,"Never types cannot be cast")}a(GGi,"FromNever");function HGi(t,e,r){if(Ao(t,e,r))return r;if(r===null||typeof r!="object")return gx(t,e);let n=new Set(t.required||[]),o={};for(let[s,c]of Object.entries(t.properties))!n.has(s)&&r[s]===void 0||(o[s]=Ax(c,e,r[s]));if(typeof t.additionalProperties=="object"){let s=Object.getOwnPropertyNames(t.properties);for(let c of Object.getOwnPropertyNames(r))s.includes(c)||(o[c]=Ax(t.additionalProperties,e,r[c]))}return o}a(HGi,"FromObject");function jGi(t,e,r){if(Ao(t,e,r))return zs(r);if(r===null||typeof r!="object"||Array.isArray(r)||r instanceof Date)return gx(t,e);let n=Object.getOwnPropertyNames(t.patternProperties)[0],o=t.patternProperties[n],s={};for(let[c,l]of Object.entries(r))s[c]=Ax(o,e,l);return s}a(jGi,"FromRecord");function $Gi(t,e,r){return Ax(Ns(t,e),e,r)}a($Gi,"FromRef");function VGi(t,e,r){return Ax(Ns(t,e),e,r)}a(VGi,"FromThis");function WGi(t,e,r){return Ao(t,e,r)?zs(r):ei(r)?t.items===void 0?[]:t.items.map((n,o)=>Ax(n,e,r[o])):gx(t,e)}a(WGi,"FromTuple");function zGi(t,e,r){return Ao(t,e,r)?zs(r):OGi(t,e,r)}a(zGi,"FromUnion");function Ax(t,e,r){let n=ks(t.$id)?Qp(t,e):e,o=t;switch(t[pt]){case"Array":return FGi(o,n,r);case"Constructor":return UGi(o,n,r);case"Import":return QGi(o,n,r);case"Intersect":return qGi(o,n,r);case"Never":return GGi(o,n,r);case"Object":return HGi(o,n,r);case"Record":return jGi(o,n,r);case"Ref":return $Gi(o,n,r);case"This":return VGi(o,n,r);case"Tuple":return WGi(o,n,r);case"Union":return zGi(o,n,r);case"Date":case"Symbol":case"Uint8Array":return BGi(t,e,r);default:return LGi(o,n,r)}}a(Ax,"Visit");function rAe(...t){return t.length===3?Ax(t[0],t[1],t[2]):Ax(t[0],[],t[1])}a(rAe,"Cast");f();function YGi(t){return z3(t)&&t[pt]!=="Unsafe"}a(YGi,"IsCheckable");function KGi(t,e,r){return ei(r)?r.map(n=>OE(t.items,e,n)):r}a(KGi,"FromArray");function JGi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return OE(o,[...e,...n],r)}a(JGi,"FromImport");function XGi(t,e,r){let n=t.unevaluatedProperties,s=t.allOf.map(l=>OE(l,e,zs(r))).reduce((l,u)=>ji(u)?{...l,...u}:u,{});if(!ji(r)||!ji(s)||!z3(n))return s;let c=dE(t);for(let l of Object.getOwnPropertyNames(r))c.includes(l)||Ao(n,e,r[l])&&(s[l]=OE(n,e,r[l]));return s}a(XGi,"FromIntersect");function ZGi(t,e,r){if(!ji(r)||ei(r))return r;let n=t.additionalProperties;for(let o of Object.getOwnPropertyNames(r)){if(di(t.properties,o)){r[o]=OE(t.properties[o],e,r[o]);continue}if(z3(n)&&Ao(n,e,r[o])){r[o]=OE(n,e,r[o]);continue}delete r[o]}return r}a(ZGi,"FromObject");function eHi(t,e,r){if(!ji(r))return r;let n=t.additionalProperties,o=Object.getOwnPropertyNames(r),[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of o){if(l.test(u)){r[u]=OE(c,e,r[u]);continue}if(z3(n)&&Ao(n,e,r[u])){r[u]=OE(n,e,r[u]);continue}delete r[u]}return r}a(eHi,"FromRecord");function tHi(t,e,r){return OE(Ns(t,e),e,r)}a(tHi,"FromRef");function rHi(t,e,r){return OE(Ns(t,e),e,r)}a(rHi,"FromThis");function nHi(t,e,r){if(!ei(r))return r;if(Sl(t.items))return[];let n=Math.min(r.length,t.items.length);for(let o=0;on?r.slice(0,n):r}a(nHi,"FromTuple");function iHi(t,e,r){for(let n of t.anyOf)if(YGi(n)&&Ao(n,e,r))return OE(n,e,r);return r}a(iHi,"FromUnion");function OE(t,e,r){let n=ks(t.$id)?Qp(t,e):e,o=t;switch(o[pt]){case"Array":return KGi(o,n,r);case"Import":return JGi(o,n,r);case"Intersect":return XGi(o,n,r);case"Object":return ZGi(o,n,r);case"Record":return eHi(o,n,r);case"Ref":return tHi(o,n,r);case"This":return rHi(o,n,r);case"Tuple":return nHi(o,n,r);case"Union":return iHi(o,n,r);default:return r}}a(OE,"Visit");function hLe(...t){return t.length===3?OE(t[0],t[1],t[2]):OE(t[0],[],t[1])}a(hLe,"Clean");f();function mLe(t){return ks(t)&&!isNaN(t)&&!isNaN(parseFloat(t))}a(mLe,"IsStringNumeric");function oHi(t){return Yh(t)||w2(t)||Ln(t)}a(oHi,"IsValueToString");function nAe(t){return t===!0||Ln(t)&&t===1||Yh(t)&&t===BigInt("1")||ks(t)&&(t.toLowerCase()==="true"||t==="1")}a(nAe,"IsValueTrue");function iAe(t){return t===!1||Ln(t)&&(t===0||Object.is(t,-0))||Yh(t)&&t===BigInt("0")||ks(t)&&(t.toLowerCase()==="false"||t==="0"||t==="-0")}a(iAe,"IsValueFalse");function sHi(t){return ks(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(sHi,"IsTimeStringWithTimeZone");function aHi(t){return ks(t)&&/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(aHi,"IsTimeStringWithoutTimeZone");function cHi(t){return ks(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i.test(t)}a(cHi,"IsDateTimeStringWithTimeZone");function lHi(t){return ks(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)?$/i.test(t)}a(lHi,"IsDateTimeStringWithoutTimeZone");function uHi(t){return ks(t)&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(t)}a(uHi,"IsDateString");function dHi(t,e){let r=j6r(t);return r===e?r:t}a(dHi,"TryConvertLiteralString");function fHi(t,e){let r=$6r(t);return r===e?r:t}a(fHi,"TryConvertLiteralNumber");function pHi(t,e){let r=H6r(t);return r===e?r:t}a(pHi,"TryConvertLiteralBoolean");function hHi(t,e){return ks(t.const)?dHi(e,t.const):Ln(t.const)?fHi(e,t.const):w2(t.const)?pHi(e,t.const):e}a(hHi,"TryConvertLiteral");function H6r(t){return nAe(t)?!0:iAe(t)?!1:t}a(H6r,"TryConvertBoolean");function mHi(t){let e=a(r=>r.split(".")[0],"truncateInteger");return mLe(t)?BigInt(e(t)):Ln(t)?BigInt(Math.trunc(t)):iAe(t)?BigInt(0):nAe(t)?BigInt(1):t}a(mHi,"TryConvertBigInt");function j6r(t){return _N(t)&&t.description!==void 0?t.description.toString():oHi(t)?t.toString():t}a(j6r,"TryConvertString");function $6r(t){return mLe(t)?parseFloat(t):nAe(t)?1:iAe(t)?0:t}a($6r,"TryConvertNumber");function gHi(t){return mLe(t)?parseInt(t):Ln(t)?Math.trunc(t):nAe(t)?1:iAe(t)?0:t}a(gHi,"TryConvertInteger");function AHi(t){return ks(t)&&t.toLowerCase()==="null"?null:t}a(AHi,"TryConvertNull");function yHi(t){return ks(t)&&t==="undefined"?void 0:t}a(yHi,"TryConvertUndefined");function EHi(t){return DA(t)?t:Ln(t)?new Date(t):nAe(t)?new Date(1):iAe(t)?new Date(0):mLe(t)?new Date(parseInt(t)):aHi(t)?new Date(`1970-01-01T${t}.000Z`):sHi(t)?new Date(`1970-01-01T${t}`):lHi(t)?new Date(`${t}.000Z`):cHi(t)?new Date(t):uHi(t)?new Date(`${t}T00:00:00.000Z`):t}a(EHi,"TryConvertDate");function _Hi(t,e,r){return(ei(r)?r:[r]).map(o=>yx(t.items,e,o))}a(_Hi,"FromArray");function CHi(t,e,r){return mHi(r)}a(CHi,"FromBigInt");function vHi(t,e,r){return H6r(r)}a(vHi,"FromBoolean");function bHi(t,e,r){return EHi(r)}a(bHi,"FromDate");function THi(t,e,r){let n=globalThis.Object.values(t.$defs),o=t.$defs[t.$ref];return yx(o,[...e,...n],r)}a(THi,"FromImport");function SHi(t,e,r){return gHi(r)}a(SHi,"FromInteger");function IHi(t,e,r){return t.allOf.reduce((n,o)=>yx(o,e,n),r)}a(IHi,"FromIntersect");function xHi(t,e,r){return hHi(t,r)}a(xHi,"FromLiteral");function wHi(t,e,r){return AHi(r)}a(wHi,"FromNull");function RHi(t,e,r){return $6r(r)}a(RHi,"FromNumber");function PHi(t,e,r){if(!ji(r)||ei(r))return r;for(let n of Object.getOwnPropertyNames(t.properties))di(r,n)&&(r[n]=yx(t.properties[n],e,r[n]));return r}a(PHi,"FromObject");function kHi(t,e,r){if(!(ji(r)&&!ei(r)))return r;let o=Object.getOwnPropertyNames(t.patternProperties)[0],s=t.patternProperties[o];for(let[c,l]of Object.entries(r))r[c]=yx(s,e,l);return r}a(kHi,"FromRecord");function DHi(t,e,r){return yx(Ns(t,e),e,r)}a(DHi,"FromRef");function NHi(t,e,r){return j6r(r)}a(NHi,"FromString");function MHi(t,e,r){return ks(r)||Ln(r)?Symbol(r):r}a(MHi,"FromSymbol");function OHi(t,e,r){return yx(Ns(t,e),e,r)}a(OHi,"FromThis");function BHi(t,e,r){return ei(r)&&!Sl(t.items)?r.map((o,s)=>s{let c=KA(s,e,n);return ji(c)?{...o,...c}:c},{})}a(GHi,"FromIntersect");function HHi(t,e,r){let n=wM(t,r);if(!ji(n))return n;let o=Object.getOwnPropertyNames(t.properties);for(let s of o){let c=KA(t.properties[s],e,n[s]);Sl(c)||(n[s]=KA(t.properties[s],e,n[s]))}if(!MSt(t.additionalProperties))return n;for(let s of Object.getOwnPropertyNames(n))o.includes(s)||(n[s]=KA(t.additionalProperties,e,n[s]));return n}a(HHi,"FromObject");function jHi(t,e,r){let n=wM(t,r);if(!ji(n))return n;let o=t.additionalProperties,[s,c]=Object.entries(t.patternProperties)[0],l=new RegExp(s);for(let u of Object.getOwnPropertyNames(n))l.test(u)&&MSt(c)&&(n[u]=KA(c,e,n[u]));if(!MSt(o))return n;for(let u of Object.getOwnPropertyNames(n))l.test(u)||(n[u]=KA(o,e,n[u]));return n}a(jHi,"FromRecord");function $Hi(t,e,r){return KA(Ns(t,e),e,wM(t,r))}a($Hi,"FromRef");function VHi(t,e,r){return KA(Ns(t,e),e,r)}a(VHi,"FromThis");function WHi(t,e,r){let n=wM(t,r);if(!ei(n)||Sl(t.items))return n;let[o,s]=[t.items,Math.max(t.items.length,n.length)];for(let c=0;cKHi,Format:()=>oAe,Get:()=>XHi,Has:()=>JHi,Set:()=>YHi,ValuePointerRootDeleteError:()=>ELe,ValuePointerRootSetError:()=>yLe});f();var yLe=class extends fi{static{a(this,"ValuePointerRootSetError")}constructor(e,r,n){super("Cannot set root value"),this.value=e,this.path=r,this.update=n}},ELe=class extends fi{static{a(this,"ValuePointerRootDeleteError")}constructor(e,r){super("Cannot delete root value"),this.value=e,this.path=r}};function W6r(t){return t.indexOf("~")===-1?t:t.replace(/~1/g,"/").replace(/~0/g,"~")}a(W6r,"Escape");function*oAe(t){if(t==="")return;let[e,r]=[0,0];for(let n=0;nfH(t[o],e[o]))}a(ZHi,"ObjectType");function eji(t,e){return DA(e)&&t.getTime()===e.getTime()}a(eji,"DateType");function tji(t,e){return!ei(e)||t.length!==e.length?!1:t.every((r,n)=>fH(r,e[n]))}a(tji,"ArrayType");function rji(t,e){return!Eb(e)||t.length!==e.length||Object.getPrototypeOf(t).constructor.name!==Object.getPrototypeOf(e).constructor.name?!1:t.every((r,n)=>fH(r,e[n]))}a(rji,"TypedArrayType");function nji(t,e){return t===e}a(nji,"ValueType");function fH(t,e){if(DA(t))return eji(t,e);if(Eb(t))return rji(t,e);if(ei(t))return tji(t,e);if(ji(t))return ZHi(t,e);if(DC(t))return nji(t,e);throw new Error("ValueEquals: Unable to compare value")}a(fH,"Equal");var iji=da({type:As("insert"),path:MA(),value:OI()}),oji=da({type:As("update"),path:MA(),value:OI()}),sji=da({type:As("delete"),path:MA()}),Y6r=ua([iji,oji,sji]),_Le=class extends fi{static{a(this,"ValueDiffError")}constructor(e,r){super(r),this.value=e}};function CLe(t,e){return{type:"update",path:t,value:e}}a(CLe,"CreateUpdate");function K6r(t,e){return{type:"insert",path:t,value:e}}a(K6r,"CreateInsert");function J6r(t){return{type:"delete",path:t}}a(J6r,"CreateDelete");function z6r(t){if(globalThis.Object.getOwnPropertySymbols(t).length>0)throw new _Le(t,"Cannot diff objects with symbols")}a(z6r,"AssertDiffable");function*aji(t,e,r){if(z6r(e),z6r(r),!Ght(r))return yield CLe(t,r);let n=globalThis.Object.getOwnPropertyNames(e),o=globalThis.Object.getOwnPropertyNames(r);for(let s of o)di(e,s)||(yield K6r(`${t}/${s}`,r[s]));for(let s of n)di(r,s)&&(fH(e,r)||(yield*vLe(`${t}/${s}`,e[s],r[s])));for(let s of n)di(r,s)||(yield J6r(`${t}/${s}`))}a(aji,"ObjectType");function*cji(t,e,r){if(!ei(r))return yield CLe(t,r);for(let n=0;n=0;n--)n0&&t[0].path===""&&t[0].type==="update"}a(dji,"IsRootUpdate");function fji(t){return t.length===0}a(fji,"IsIdentity");function Z6r(t,e){if(dji(e))return zs(e[0].value);if(fji(e))return zs(t);let r=zs(t);for(let n of e)switch(n.type){case"insert":{Ex.Set(r,n.path,n.value);break}case"update":{Ex.Set(r,n.path,n.value);break}case"delete":{Ex.Delete(r,n.path);break}}return r}a(Z6r,"Patch");f();function eFr(...t){let[e,r,n]=t.length===3?[t[0],t[1],t[2]]:[t[0],[],t[1]],o=RN(e,r)?PX(e,r,n):n;if(!Ao(e,r,o))throw new RX(e,o,k2(e,r,o).First());return o}a(eFr,"Encode");f();function bLe(t){return ji(t)&&!ei(t)}a(bLe,"IsStandardObject");var TLe=class extends fi{static{a(this,"ValueMutateError")}constructor(e){super(e)}};function pji(t,e,r,n){if(!bLe(r))Ex.Set(t,e,zs(n));else{let o=Object.getOwnPropertyNames(r),s=Object.getOwnPropertyNames(n);for(let c of o)s.includes(c)||delete r[c];for(let c of s)o.includes(c)||(r[c]=null);for(let c of s)OSt(t,`${e}/${c}`,r[c],n[c])}}a(pji,"ObjectType");function hji(t,e,r,n){if(!ei(r))Ex.Set(t,e,zs(n));else{for(let o=0;o(fLe(s,c,l),l)],["Cast",(s,c,l)=>rAe(s,c,l)],["Clean",(s,c,l)=>hLe(s,c,l)],["Clone",(s,c,l)=>zs(l)],["Convert",(s,c,l)=>gLe(s,c,l)],["Decode",(s,c,l)=>RN(s,c)?wX(s,c,l):l],["Default",(s,c,l)=>ALe(s,c,l)],["Encode",(s,c,l)=>RN(s,c)?PX(s,c,l):l]]);function r(s){e.delete(s)}a(r,"Delete"),t.Delete=r;function n(s,c){e.set(s,c)}a(n,"Set"),t.Set=n;function o(s){return e.get(s)}a(o,"Get"),t.Get=o})(BSt||(BSt={}));var nFr=["Clone","Clean","Default","Convert","Assert","Decode"];function yji(t,e,r,n){return t.reduce((o,s)=>{let c=BSt.Get(s);if(Sl(c))throw new SLe(`Unable to find Parse operation '${s}'`);return c(e,r,o)},n)}a(yji,"ParseValue");function iFr(...t){let[e,r,n,o]=t.length===4?[t[0],t[1],t[2],t[3]]:t.length===3?ei(t[0])?[t[0],t[1],[],t[2]]:[nFr,t[0],t[1],t[2]]:t.length===2?[nFr,t[0],[],t[1]]:(()=>{throw new SLe("Invalid Arguments")})();return yji(e,r,n,o)}a(iFr,"Parse");f();var PP={};ui(PP,{Assert:()=>fLe,Cast:()=>rAe,Check:()=>Ao,Clean:()=>hLe,Clone:()=>zs,Convert:()=>gLe,Create:()=>gx,Decode:()=>V6r,Default:()=>ALe,Diff:()=>X6r,Edit:()=>Y6r,Encode:()=>eFr,Equal:()=>fH,Errors:()=>k2,Hash:()=>rL,Mutate:()=>rFr,Parse:()=>iFr,Patch:()=>Z6r,ValueErrorIterator:()=>nL});f();var Eji="gpt-41-copilot",sT=class t{constructor(e,r=!0){this._ctx=e;this.onModelsFetchedCallbacks=[];this.fetchedModelData=[];this.customModels=[];this.editorPreviewFeaturesDisabled=!1;r&&Ps(this._ctx,n=>this.refreshAvailableModels(n))}static{a(this,"AvailableModelsManager")}async refreshAvailableModels(e){await this.refreshModels(e);for(let r of this.onModelsFetchedCallbacks)r()}addHandler(e){this.onModelsFetchedCallbacks.push(e)}getDefaultModelId(){if(this.fetchedModelData){let e=t.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled)[0];if(e)return e.id}return Eji}parseModelsResponse(e){try{return PP.Parse(E6r,e)}catch(r){Cr.exception(this._ctx,r,"Failed to parse /models response from CAPI");return}}async refreshModels(e){let r=await this.fetchModels(e);r&&(this.fetchedModelData=r)}async fetchModels(e){return this.customModels=e.getTokenValue("cml")?.split(",")??[],this.editorPreviewFeaturesDisabled=e.getTokenValue("editor_preview_features")=="0",await this.fetch(e)}fetch(e){return(!this.fetchInProgress||this.fetchInProgress.withToken.token!==e.token)&&(this.fetchInProgress={withToken:e,response:this.fetchImpl(e).finally(()=>{this.fetchInProgress=void 0})}),this.fetchInProgress.response}async fetchImpl(e){let r=await dH(this._ctx,"/models",e);return r.ok?this.parseModelsResponse(await r.json())?.data??[]:(Cr.error(this._ctx,"Failed to fetch models from CAPI",{status:r.status,statusText:r.statusText}),null)}getGenericCompletionModels(){let e=t.filterCompletionModels(this.fetchedModelData,this.editorPreviewFeaturesDisabled);return t.mapCompletionModels(e)}getTokenizerForModel(e){let n=this.getGenericCompletionModels().find(o=>o.modelId===e);return n?n.tokenizer:"o200k_base"}static filterCompletionModels(e,r){return e.filter(n=>n.capabilities.type==="completion").filter(n=>!r||n.preview===!1||n.preview===void 0)}static filterModelsWithEditorPreviewFeatures(e,r){return e.filter(n=>!r||n.preview===!1||n.preview===void 0)}static mapCompletionModels(e){return e.map(r=>({modelId:r.id,label:r.name,preview:!!r.preview,tokenizer:r.capabilities.tokenizer}))}getCurrentModelRequestInfo(e=void 0){let r=this.getDefaultModelId(),n=C6r(this._ctx);if(n){let l=this.getGenericCompletionModels().map(u=>u.modelId);l.includes(n)||(l.length>0&&Cr.error(this._ctx,`User selected model ${n} is not in the list of generic models: ${l.join(", ")}, falling back to default model.`),n=null),r===n&&(n=null)}let o=vr(this._ctx,tt.DebugOverrideEngine)||vr(this._ctx,tt.DebugOverrideEngineLegacy);if(o)return new Q8(o,"override");let s=e?this._ctx.get(Gt).customEngine(e):"",c=e?this._ctx.get(Gt).customEngineTargetEngine(e):void 0;return n?s&&c&&n===c?new Q8(s,"exp"):new Q8(n,"modelpicker"):s?new Q8(s,"exp"):this.customModels.length>0?new Q8(this.customModels[0],"custommodel"):new Q8(r,"default")}},Q8=class{constructor(e,r){this.modelId=e;this.modelChoiceSource=r}static{a(this,"ModelRequestInfo")}get headers(){return{}}};function q8(t,e=void 0){let r=t.get(sT),n=r.getCurrentModelRequestInfo(e),o=r.getTokenizerForModel(n.modelId);return{headers:n.headers,modelId:n.modelId,engineChoiceSource:n.modelChoiceSource,tokenizer:o}}a(q8,"getEngineRequestInfo");f();f();var Jn=class{static{a(this,"FileSystem")}};var vFr=de(CFr());function bFr(t){return t!==void 0&&t!==0}a(bFr,"isRepoInfo");function TFr(t){if(t===void 0||t===0)return"";let e=RM(t);if(e==="github/github")return e;let r=$ji(t)?.toLowerCase();return r!==void 0?r:""}a(TFr,"getDogFood");function RM(t){if(t!==void 0&&t!==0&&t.hostname==="github.com")return t.owner+"/"+t.repo}a(RM,"tryGetGitHubNWO");function $ji(t){if(t===void 0||t===0)return;let e=t.hostname.toLowerCase(),r=e==="azure.com"||e.endsWith(".azure.com"),n=e==="visualstudio.com"||e.endsWith(".visualstudio.com");if(r||n)return t.owner+"/"+t.repo}a($ji,"tryGetADONWO");function G8(t,e){let r=Lu(e);return Vji(t,r)}a(G8,"extractRepoInfoInBackground");var Vji=Kji(Wji,1e4);async function Wji(t,e){let r=ybr(e);if(!r)return;let n=await zji(t,r);if(!n)return;let o=t.get(Jn),s=bi(n,".git","config"),c;try{c=await o.readFileString(s)}catch{return}let l=Yji(c)??"",u=QSt(l),d={uri:n};return u===void 0?{baseFolder:d,url:l,hostname:"",owner:"",repo:"",pathname:""}:{baseFolder:d,url:l,...u}}a(Wji,"extractRepoInfo");function QSt(t){let e;try{if(e=(0,vFr.default)(t),e.resource==""||e.owner==""||e.name==""||e.pathname=="")return}catch{return}return{hostname:e.resource,owner:e.owner,repo:e.name,pathname:e.pathname}}a(QSt,"parseRepoUrl");async function zji(t,e){let r=e+"_add_to_make_longer",n=t.get(Jn);for(;e!=="file:///"&&e.length{let c=JSON.stringify(s),l=r.get(c);if(l)return l.result;if(n.has(c))return 0;let u=t(o,...s);return n.add(c),u.then(d=>{r.set(c,new USt(d)),n.delete(c)}),0}}a(Kji,"computeInBackgroundAndMemoize");f();var sAe=500,SFr=8192-sAe,IFr=4,ILe=10,xFr=1e3*5,xLe={prefix:35,suffix:15,stableContext:35,volatileContext:15},Jji={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor",c:"cpp"};function aAe(t){return t=t.toLowerCase(),Jji[t]??t}a(aAe,"normalizeLanguageId");var qSt=class{constructor(e){this.ctx=e;this.cache=new $r(200)}static{a(this,"FilterSettingsToExpConfigs")}async fetchExpConfig(e,r){let n=e.stringify()+` +`+JSON.stringify(r),o=this.cache.get(n);return o||(o=new GSt(()=>this.ctx.get(ax).fetchExperiments(this.ctx,r,e.toHeaders()),1e3*60*60),this.cache.set(n,o)),o.run()}getCachedExpConfig(e){return this.cache.get(e.stringify())?.value()}},GSt=class{constructor(e,r=1/0){this.producer=e;this.expirationMs=r}static{a(this,"Task")}async run(){return this.promise===void 0&&(this.promise=this.producer(),this.storeResult(this.promise).then(()=>{this.expirationMs<1/0&&this.promise!==void 0&&setTimeout(()=>this.promise=void 0,this.expirationMs)})),this.promise}async storeResult(e){try{this.result=await e}finally{this.result===void 0&&(this.promise=void 0)}}value(){return this.result}};function Zji(t){return"uri"in t}a(Zji,"isCompletionsFiltersInfo");var Gt=class t{constructor(e){this.ctx=e;this.staticFilters={};this.dynamicFilters={};this.dynamicFilterGroups=[];this.upcomingDynamicFilters={};this.assignments=new qSt(this.ctx)}static{a(this,"Features")}static{this.upcomingDynamicFilterCheckDelayMs=20}static{this.upcomingTimeBucketMinutes=5+Math.floor(Math.random()*11)}registerStaticFilters(e){Object.assign(this.staticFilters,e)}registerDynamicFilter(e,r){this.dynamicFilters[e]=r}registerDynamicFilterGroup(e){this.dynamicFilterGroups.push(e)}getDynamicFilterValues(){let e={};for(let r of this.dynamicFilterGroups)Object.assign(e,r());for(let[r,n]of Object.entries(this.dynamicFilters))e[r]=n();return e}registerUpcomingDynamicFilter(e,r){this.upcomingDynamicFilters[e]=r}async updateExPValuesAndAssignments(e,r,n=Pt.createAndMarkAsIssued()){if(n instanceof Rb)throw new Error("updateExPValuesAndAssignments should not be called with TelemetryWithExp");let o=r&&Zji(r)?G8(this.ctx,r.uri):void 0,s=RM(o)??"",c=TFr(o)??"",l=r?.languageId??"",u=q8(this.ctx).modelId,d=nvr(e),p=e.getTokenValue("ft")??"",h=e.getTokenValue("ol")??"",m=e.getTokenValue("cml")??"",g=e.getTokenValue("tid")??"",y=this.ctx.get(pd).getProperties(),E=e.endpoints,_={"X-Copilot-Repository":s,"X-Copilot-FileType":l,"X-Copilot-UserKind":d,"X-Copilot-Dogfood":c,"X-Copilot-Engine":u,"X-Copilot-CustomModel":p,"X-Copilot-Orgs":h,"X-Copilot-CustomModelNames":m,"X-Copilot-CopilotTrackingId":g,"X-Copilot-SKU":y.sku||""},v=this.getGranularityDirectory(),b=this.makeFilterSettings(_),I=v.extendFilters(b),x=await this.getExpConfig(I.newFilterSettings,E);v.update(b,+(x.variables.copilotbycallbuckets??NaN),+(x.variables.copilottimeperiodsizeinh??NaN));let w=v.extendFilters(b),R=w.newFilterSettings,P=await this.getExpConfig(R,E),k=new Promise(Q=>setTimeout(Q,t.upcomingDynamicFilterCheckDelayMs));for(let Q of w.otherFilterSettingsToPrefetch)k=k.then(async()=>{await new Promise(M=>setTimeout(M,t.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(Q,E)});return this.prepareForUpcomingFilters(R,E),new Rb(n.properties,n.measurements,n.issuedTime,{filters:R,exp:P})}async fetchTokenAndUpdateExPValuesAndAssignments(e,r){let n=await this.ctx.get(Nt).getToken();return await this.updateExPValuesAndAssignments(n,e,r)}getGranularityDirectory(){if(!this.granularityDirectory){let e=this.ctx.get(Vs).machineId;this.granularityDirectory=new W4e(e,this.ctx.get(fP))}return this.granularityDirectory}makeFilterSettings(e){return new gN({...this.staticFilters,...this.getDynamicFilterValues(),...e})}async getExpConfig(e,r){try{return this.assignments.fetchExpConfig(e,r)}catch(n){return aE.createFallbackConfig(this.ctx,`Error fetching ExP config: ${String(n)}`)}}async prepareForUpcomingFilters(e,r){if(!(new Date().getMinutes()<60-t.upcomingTimeBucketMinutes))for(let[n,o]of Object.entries(this.upcomingDynamicFilters))await new Promise(s=>setTimeout(s,t.upcomingDynamicFilterCheckDelayMs)),this.getExpConfig(e.withChange(n,o()),r)}stringify(){let e=this.assignments.getCachedExpConfig(new gN({}));return JSON.stringify(e?.variables??{})}async getFallbackExpAndFilters(){let e=this.makeFilterSettings({}),r=tX(this.ctx),n=await this.getExpConfig(e,r);return{filters:e,exp:n}}disableLogProb(e){return e.filtersAndExp.exp.variables.copilotdisablelogprob??!0}overrideBlockMode(e){return e.filtersAndExp.exp.variables.copilotoverrideblockmode||void 0}customEngine(e){return e.filtersAndExp.exp.variables.copilotcustomengine??""}customEngineTargetEngine(e){return e.filtersAndExp.exp.variables.copilotcustomenginetargetengine}suffixPercent(e){return e.filtersAndExp.exp.variables.CopilotSuffixPercent??xLe.suffix}suffixMatchThreshold(e){return e.filtersAndExp.exp.variables.copilotsuffixmatchthreshold??ILe}cppHeadersEnableSwitch(e){return e.filtersAndExp.exp.variables.copilotcppheadersenableswitch??!1}relatedFilesVSCodeCSharp(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscodecsharp??!1}relatedFilesVSCodeTypeScript(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscodetypescript??!1}relatedFilesVSCode(e){return e.filtersAndExp.exp.variables.copilotrelatedfilesvscode??!1}contextProviders(e){let r=e.filtersAndExp.exp.variables.copilotcontextproviders??"";return r?r.split(",").map(n=>n.trim()):[]}contextProviderTimeBudget(e){return e.filtersAndExp.exp.variables.copilotcontextprovidertimebudget??150}includeNeighboringFiles(e){return e.filtersAndExp.exp.variables.copilotincludeneighboringfiles??!1}excludeRelatedFiles(e){return e.filtersAndExp.exp.variables.copilotexcluderelatedfiles??!1}maxPromptCompletionTokens(e){return e.filtersAndExp.exp.variables.maxpromptcompletionTokens??SFr+sAe}ideChatMaxRequestTokens(e){return e.filtersAndExp.exp.variables.idechatmaxrequesttokens??-1}ideChatExpModelIds(e){return e.filtersAndExp.exp.variables.idechatexpmodelids??""}ideChatEnableProjectMetadata(e){return e.filtersAndExp.exp.variables.idechatenableprojectmetadata??!1}ideDataMigrationCompleted(e){return e.filtersAndExp.exp.variables.idedatamigrationcompleted??!1}workspaceContextCoordinator(e){return e.filtersAndExp.exp.variables.copilotworkspacecontextcoordinator??!1}workspaceContextCacheTime(e){return e.filtersAndExp.exp.variables.copilotworkspacecontextcachetime??xFr}stableContextPercent(e){return e.filtersAndExp.exp.variables.copilotstablecontextpercent??xLe.stableContext}volatileContextPercent(e){return e.filtersAndExp.exp.variables.copilotvolatilecontextpercent??xLe.volatileContext}cppContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotcppContextProviderParams}csharpContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotcsharpcontextproviderparams}javaContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotjavacontextproviderparams}multiLanguageContextProviderParams(e){return e.filtersAndExp.exp.variables.copilotmultilanguagecontextproviderparams}tsContextProviderParams(e){return e.filtersAndExp.exp.variables.copilottscontextproviderparams}completionsDebounce(e){return e.filtersAndExp.exp.variables.copilotcompletionsdebounce}enableElectronFetcher(e){return e.filtersAndExp.exp.variables.copilotelectronfetcher??!1}enableFetchFetcher(e){return e.filtersAndExp.exp.variables.copilotfetchfetcher??!1}asyncCompletionsTimeout(e){return e.filtersAndExp.exp.variables.copilotasynccompletionstimeout??200}enablePromptContextProxyField(e){return e.filtersAndExp.exp.variables.copilotenablepromptcontextproxyfield??!1}enableProgressiveReveal(e){return e.filtersAndExp.exp.variables.copilotprogressivereveal??!1}modelAlwaysTerminatesSingleline(e){return e.filtersAndExp.exp.variables.copilotmodelterminatesingleline??!0}longLookaheadSize(e){return e.filtersAndExp.exp.variables.copilotprogressivereveallonglookaheadsize??9}shortLookaheadSize(e){return e.filtersAndExp.exp.variables.copilotprogressiverevealshortlookaheadsize??3}maxMultilineTokens(e){return e.filtersAndExp.exp.variables.copilotmaxmultilinetokens??200}multilineAfterAcceptLines(e){return e.filtersAndExp.exp.variables.copilotmultilineafteracceptlines??1}enableNESXTab(e){return e.filtersAndExp.exp.variables.copilotnesxtab??!1}getNESXTabModelID(e){return e.filtersAndExp.exp.variables.copilotnesxtabmodelid??"copilot-nes-xtab"}completionsDelay(e){return e.filtersAndExp.exp.variables.copilotcompletionsdelay??200}singleLineUnlessAccepted(e){return e.filtersAndExp.exp.variables.copilotsinglelineunlessaccepted??!1}useCompletionsComparisonPanel(e){return e.filtersAndExp.exp.variables.copilotusecompletionscomparisonpanel??!1}comparisonPanelModelIds(e){return e.filtersAndExp.exp.variables.copilotcomparisonpanelmodelids??""}comparisonPanelRandomizedMode(e){return e.filtersAndExp.exp.variables.copilotcomparisonpanelrandomizedmode??!0}ideEnableCopilotSemanticSearch(e){return e.filtersAndExp.exp.variables.ideenablecopilotsemanticsearch??!1}useChatLibCompletions(e){return e.filtersAndExp.exp.variables.copilotusechatlibcompletions??!1}cveRemediatorAgentEnabled(e){return e.filtersAndExp.exp.variables.cveremediatoragentenabled??!1}anthropicUseMessagesEndpoint(e){return e.filtersAndExp.exp.variables.anthropicusemessagesendpoint??!1}instantApplyModelMigration(e){return e.filtersAndExp.exp.variables.copilotinstantapplymodelmigration??!1}appmodContextMenuEnabled(e){return e.filtersAndExp.exp.variables.copilotappmodcontextmenuenabled??!1}};f();f();f();var wLe=de(Fte());var jSt={python:"python",javascript:"javascript",javascriptreact:"javascript",jsx:"javascript",typescript:"typescript",typescriptreact:"tsx",go:"go",ruby:"ruby",csharp:"c-sharp",java:"java",php:"php",c:"cpp",cpp:"cpp"};function S1(t){return t in jSt&&t!=="csharp"&&t!=="java"&&t!=="php"&&t!=="c"&&t!=="cpp"}a(S1,"isSupportedLanguageId");function RLe(t){if(!(t in jSt))throw new Error(`Unrecognized language: ${t}`);return jSt[t]}a(RLe,"languageIdToWasmLanguage");var HSt=new Map;async function e$i(t){let e;try{e=await Ote(`tree-sitter-${t}.wasm`)}catch(r){throw r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.name==="Error"?new Mte(`Could not load tree-sitter-${t}.wasm`,r):r}return wLe.default.Language.load(e)}a(e$i,"loadWasmLanguage");function VSt(t){let e=RLe(t);if(!HSt.has(e)){let r=e$i(e);HSt.set(e,r)}return HSt.get(e)}a(VSt,"getLanguage");var $St=class extends Error{static{a(this,"WrappedError")}constructor(e,r){super(e,{cause:r})}};async function H8(t,e){return(await WSt(t,e))[0]}a(H8,"parseTreeSitter");async function WSt(t,e){await wLe.default.init({locateFile:a(s=>ESt(s),"locateFile")});let r;try{r=new wLe.default}catch(s){throw s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"&&s.message.includes("table index is out of bounds")?new $St(`Could not init Parse for language <${t}>`,s):s}let n=await VSt(t);r.setLanguage(n);let o=r.parse(e);return r.delete(),[o,n.version]}a(WSt,"parseTreeSitterIncludingVersion");function wFr(t){switch(RLe(t)){case"python":return null;case"javascript":case"typescript":case"tsx":case"go":case"c-sharp":case"java":case"php":case"cpp":return"}";case"ruby":return"end"}}a(wFr,"getBlockCloseToken");function t$i(t,e){let r=[];for(let n of t){if(!n[1]){let o=e.tree.getLanguage();n[1]=o.query(n[0])}r.push(...n[1].matches(e))}return r}a(t$i,"innerQuery");var r$i=[`[ (class_definition (block (expression_statement (string)))) (function_definition (block (expression_statement (string)))) -]`];function P6r(t){return eHi([tHi],t).length==1}a(P6r,"queryPythonIsDocstring");var HP=class{constructor(e){this.node=e;this.children=[];this.collapsed=!1}static{a(this,"StatementNode")}addChild(e){e.parent=this,e.nextSibling=void 0,this.children.length>0&&(this.children[this.children.length-1].nextSibling=e),this.children.push(e)}childrenFinished(){}containsStatement(e){return this.node.startIndex<=e.node.startIndex&&this.node.endIndex>=e.node.endIndex}statementAt(e){if(this.node.startIndex>e||this.node.endIndex(r=n.statementAt(e),r!==void 0)),r??this}collapse(){this.children.length=0,this.collapsed=!0}get description(){return`${this.node.type} ([${this.node.startPosition.row},${this.node.startPosition.column}]..[${this.node.endPosition.row},${this.node.endPosition.column}]): ${JSON.stringify(this.node.text.length>33?this.node.text.substring(0,15)+"..."+this.node.text.slice(-15):this.node.text)}`}dump(e="",r=""){let n=[`${e}${this.description}`];return this.children.forEach(o=>{n.push(o.dump(`${r}+- `,o.nextSibling===void 0?`${r} `:`${r}| `))}),n.join(` +]`];function RFr(t){return t$i([r$i],t).length==1}a(RFr,"queryPythonIsDocstring");var kP=class{constructor(e){this.node=e;this.children=[];this.collapsed=!1}static{a(this,"StatementNode")}addChild(e){e.parent=this,e.nextSibling=void 0,this.children.length>0&&(this.children[this.children.length-1].nextSibling=e),this.children.push(e)}childrenFinished(){}containsStatement(e){return this.node.startIndex<=e.node.startIndex&&this.node.endIndex>=e.node.endIndex}statementAt(e){if(this.node.startIndex>e||this.node.endIndex(r=n.statementAt(e),r!==void 0)),r??this}collapse(){this.children.length=0,this.collapsed=!0}get description(){return`${this.node.type} ([${this.node.startPosition.row},${this.node.startPosition.column}]..[${this.node.endPosition.row},${this.node.endPosition.column}]): ${JSON.stringify(this.node.text.length>33?this.node.text.substring(0,15)+"..."+this.node.text.slice(-15):this.node.text)}`}dump(e="",r=""){let n=[`${e}${this.description}`];return this.children.forEach(o=>{n.push(o.dump(`${r}+- `,o.nextSibling===void 0?`${r} `:`${r}| `))}),n.join(` `)}dumpPath(e="",r="",n=!1){if(this.parent){let o=this.parent.dumpPath(e,r,!0),s=o.length-o.lastIndexOf(` `)-1-r.length,c=" ".repeat(s),l=n?` ${r}${c}+- `:"";return o+this.description+l}else{let o=n?` -${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.languageId=e;this.text=r;this.startOffset=n;this.endOffset=o;this.statements=[]}static{a(this,"StatementTree")}static isSupported(e){return Tre.languageIds.has(e)||Sre.languageIds.has(e)||uye.languageIds.has(e)||Ire.languageIds.has(e)||dye.languageIds.has(e)||fye.languageIds.has(e)||pye.languageIds.has(e)||hye.languageIds.has(e)||mye.languageIds.has(e)}static isTrimmedByDefault(e){return Tre.languageIds.has(e)||Sre.languageIds.has(e)||Ire.languageIds.has(e)}static create(e,r,n,o){if(Tre.languageIds.has(e))return new Tre(e,r,n,o);if(Sre.languageIds.has(e))return new Sre(e,r,n,o);if(uye.languageIds.has(e))return new uye(e,r,n,o);if(Ire.languageIds.has(e))return new Ire(e,r,n,o);if(pye.languageIds.has(e))return new pye(e,r,n,o);if(dye.languageIds.has(e))return new dye(e,r,n,o);if(fye.languageIds.has(e))return new fye(e,r,n,o);if(hye.languageIds.has(e))return new hye(e,r,n,o);if(mye.languageIds.has(e))return new mye(e,r,n,o);throw new Error(`Unsupported languageId: ${e}`)}[Symbol.dispose](){this.tree&&(this.tree.delete(),this.tree=void 0)}clear(){this.statements.length=0}statementAt(e){let r;return this.statements.find(n=>(r=n.statementAt(e),r!==void 0)),r}async build(){let e=[];this.clear();let r=await this.parse();this.getStatementQuery(r).captures(r.rootNode,{startPosition:this.offsetToPosition(this.startOffset),endPosition:this.offsetToPosition(this.endOffset)}).forEach(o=>{let s=this.createNode(o.node);for(;e.length>0&&!e[0].containsStatement(s);)e.shift()?.childrenFinished();e.length>0?e[0].addChild(s):this.addStatement(s),e.unshift(s)}),e.forEach(o=>o.childrenFinished())}addStatement(e){e.parent=void 0,e.nextSibling=void 0,this.statements.length>0&&(this.statements[this.statements.length-1].nextSibling=e),this.statements.push(e)}async parse(){return this.tree||(this.tree=await g6(this.languageId,this.text)),this.tree}getStatementQuery(e){return this.getQuery(e.getLanguage(),this.getStatementQueryText())}getQuery(e,r){return e.query(r)}offsetToPosition(e){let r=this.text.slice(0,e).split(` +${r}+- `:"";return e+this.description+o}}},Xp=class{constructor(e,r,n,o){this.languageId=e;this.text=r;this.startOffset=n;this.endOffset=o;this.statements=[]}static{a(this,"StatementTree")}static isSupported(e){return Ute.languageIds.has(e)||Qte.languageIds.has(e)||cAe.languageIds.has(e)||qte.languageIds.has(e)||lAe.languageIds.has(e)||uAe.languageIds.has(e)||dAe.languageIds.has(e)||fAe.languageIds.has(e)||pAe.languageIds.has(e)}static isTrimmedByDefault(e){return Ute.languageIds.has(e)||Qte.languageIds.has(e)||qte.languageIds.has(e)}static create(e,r,n,o){if(Ute.languageIds.has(e))return new Ute(e,r,n,o);if(Qte.languageIds.has(e))return new Qte(e,r,n,o);if(cAe.languageIds.has(e))return new cAe(e,r,n,o);if(qte.languageIds.has(e))return new qte(e,r,n,o);if(dAe.languageIds.has(e))return new dAe(e,r,n,o);if(lAe.languageIds.has(e))return new lAe(e,r,n,o);if(uAe.languageIds.has(e))return new uAe(e,r,n,o);if(fAe.languageIds.has(e))return new fAe(e,r,n,o);if(pAe.languageIds.has(e))return new pAe(e,r,n,o);throw new Error(`Unsupported languageId: ${e}`)}[Symbol.dispose](){this.tree&&(this.tree.delete(),this.tree=void 0)}clear(){this.statements.length=0}statementAt(e){let r;return this.statements.find(n=>(r=n.statementAt(e),r!==void 0)),r}async build(){let e=[];this.clear();let r=await this.parse();this.getStatementQuery(r).captures(r.rootNode,{startPosition:this.offsetToPosition(this.startOffset),endPosition:this.offsetToPosition(this.endOffset)}).forEach(o=>{let s=this.createNode(o.node);for(;e.length>0&&!e[0].containsStatement(s);)e.shift()?.childrenFinished();e.length>0?e[0].addChild(s):this.addStatement(s),e.unshift(s)}),e.forEach(o=>o.childrenFinished())}addStatement(e){e.parent=void 0,e.nextSibling=void 0,this.statements.length>0&&(this.statements[this.statements.length-1].nextSibling=e),this.statements.push(e)}async parse(){return this.tree||(this.tree=await H8(this.languageId,this.text)),this.tree}getStatementQuery(e){return this.getQuery(e.getLanguage(),this.getStatementQueryText())}getQuery(e,r){return e.query(r)}offsetToPosition(e){let r=this.text.slice(0,e).split(` `),n=r.length-1,o=r[r.length-1].length;return{row:n,column:o}}dump(e=""){let r=[];return this.statements.forEach((n,o)=>{let s=`[${o}]`,c=" ".repeat(s.length);r.push(n.dump(`${e} ${s} `,`${e} ${c} `))}),r.join(` -`)}},v8e=class t extends HP{static{a(this,"JSStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","generator_function_declaration","class_declaration","statement_block","if_statement","switch_statement","for_statement","for_in_statement","while_statement","do_statement","try_statement","with_statement","labeled_statement","method_definition","interface_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="statement_block"||this.children.length===2&&this.node.childForFieldName("alternative")!==null&&this.children[0].node.type!=="statement_block"&&this.children[1].node.type!=="statement_block"}},Tre=class extends oh{static{a(this,"JSStatementTree")}static{this.languageIds=new Set(["javascript","javascriptreact","jsx"])}createNode(e){return new v8e(e)}getStatementQueryText(){return`[ +`)}},PLe=class t extends kP{static{a(this,"JSStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","generator_function_declaration","class_declaration","statement_block","if_statement","switch_statement","for_statement","for_in_statement","while_statement","do_statement","try_statement","with_statement","labeled_statement","method_definition","interface_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="statement_block"||this.children.length===2&&this.node.childForFieldName("alternative")!==null&&this.children[0].node.type!=="statement_block"&&this.children[1].node.type!=="statement_block"}},Ute=class extends Xp{static{a(this,"JSStatementTree")}static{this.languageIds=new Set(["javascript","javascriptreact","jsx"])}createNode(e){return new PLe(e)}getStatementQueryText(){return`[ (export_statement) (import_statement) (debugger_statement) @@ -1604,7 +1593,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (labeled_statement) (method_definition) (field_definition) - ] @statement`}},Sre=class extends oh{static{a(this,"TSStatementTree")}static{this.languageIds=new Set(["typescript","typescriptreact"])}createNode(e){return new v8e(e)}getStatementQueryText(){return`[ + ] @statement`}},Qte=class extends Xp{static{a(this,"TSStatementTree")}static{this.languageIds=new Set(["typescript","typescriptreact"])}createNode(e){return new PLe(e)}getStatementQueryText(){return`[ (export_statement) (import_statement) (debugger_statement) @@ -1627,7 +1616,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (labeled_statement) (method_definition) (public_field_definition) - ] @statement`}},wSt=class t extends HP{static{a(this,"PyStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","for_statement","while_statement","try_statement","with_statement","function_definition","class_definition","decorated_definition","match_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"?!1:this.node.startPosition.row===this.node.endPosition.row}},uye=class extends oh{static{a(this,"PyStatementTree")}static{this.languageIds=new Set(["python"])}createNode(e){return new wSt(e)}getStatementQueryText(){return`[ + ] @statement`}},zSt=class t extends kP{static{a(this,"PyStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","for_statement","while_statement","try_statement","with_statement","function_definition","class_definition","decorated_definition","match_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"?!1:this.node.startPosition.row===this.node.endPosition.row}},cAe=class extends Xp{static{a(this,"PyStatementTree")}static{this.languageIds=new Set(["python"])}createNode(e){return new zSt(e)}getStatementQueryText(){return`[ (future_import_statement) (import_statement) (import_from_statement) @@ -1653,24 +1642,24 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (decorated_definition) (match_statement) (block) - ] @statement`}},RSt=class t extends HP{static{a(this,"GoStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","method_declaration","if_statement","for_statement","expression_switch_statement","type_switch_statement","select_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},Ire=class extends oh{static{a(this,"GoStatementTree")}static{this.languageIds=new Set(["go"])}createNode(e){return new RSt(e)}getStatementQueryText(){return`[ + ] @statement`}},YSt=class t extends kP{static{a(this,"GoStatementNode")}static{this.compoundTypeNames=new Set(["function_declaration","method_declaration","if_statement","for_statement","expression_switch_statement","type_switch_statement","select_statement","block"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},qte=class extends Xp{static{a(this,"GoStatementTree")}static{this.languageIds=new Set(["go"])}createNode(e){return new YSt(e)}getStatementQueryText(){return`[ (package_clause) (function_declaration) (method_declaration) (import_declaration) (_statement) (block) - ] @statement`}},PSt=class t extends HP{static{a(this,"PhpStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","else_clause","else_if_clause","for_statement","foreach_statement","while_statement","do_statement","switch_statement","try_statement","catch_clause","finally_clause","anonymous_function","compound_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},dye=class extends oh{static{a(this,"PhpStatementTree")}static{this.languageIds=new Set(["php"])}createNode(e){return new PSt(e)}getStatementQueryText(){return`[ + ] @statement`}},KSt=class t extends kP{static{a(this,"PhpStatementNode")}static{this.compoundTypeNames=new Set(["if_statement","else_clause","else_if_clause","for_statement","foreach_statement","while_statement","do_statement","switch_statement","try_statement","catch_clause","finally_clause","anonymous_function","compound_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},lAe=class extends Xp{static{a(this,"PhpStatementTree")}static{this.languageIds=new Set(["php"])}createNode(e){return new KSt(e)}getStatementQueryText(){return`[ (statement) (compound_statement) (method_declaration) (property_declaration) (const_declaration) (use_declaration) - ] @statement`}},kSt=class t extends HP{static{a(this,"RubyStatementNode")}static{this.compoundTypeNames=new Set(["if","case","while","until","for","begin","module","class","method"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},fye=class extends oh{static{a(this,"RubyStatementTree")}static{this.languageIds=new Set(["ruby"])}createNode(e){return new kSt(e)}getStatementQueryText(){return`[ + ] @statement`}},JSt=class t extends kP{static{a(this,"RubyStatementNode")}static{this.compoundTypeNames=new Set(["if","case","while","until","for","begin","module","class","method"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}},uAe=class extends Xp{static{a(this,"RubyStatementTree")}static{this.languageIds=new Set(["ruby"])}createNode(e){return new JSt(e)}getStatementQueryText(){return`[ (_statement) (when) - ] @statement`}},NSt=class t extends HP{static{a(this,"JavaStatementNode")}static{this.compoundTypeNames=new Set(["block","do_statement","enhanced_for_statement","for_statement","if_statement","labeled_statement","switch_expression","synchronized_statement","try_statement","try_with_resources_statement","while_statement","interface_declaration","method_declaration","constructor_declaration","compact_constructor_declaration","class_declaration","annotation_type_declaration","static_initializer"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},pye=class extends oh{static{a(this,"JavaStatementTree")}static{this.languageIds=new Set(["java"])}createNode(e){return new NSt(e)}getStatementQueryText(){return`[ + ] @statement`}},XSt=class t extends kP{static{a(this,"JavaStatementNode")}static{this.compoundTypeNames=new Set(["block","do_statement","enhanced_for_statement","for_statement","if_statement","labeled_statement","switch_expression","synchronized_statement","try_statement","try_with_resources_statement","while_statement","interface_declaration","method_declaration","constructor_declaration","compact_constructor_declaration","class_declaration","annotation_type_declaration","static_initializer"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},dAe=class extends Xp{static{a(this,"JavaStatementTree")}static{this.languageIds=new Set(["java"])}createNode(e){return new XSt(e)}getStatementQueryText(){return`[ (statement) (field_declaration) (record_declaration) @@ -1683,7 +1672,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (block) (static_initializer) (constructor_declaration) - ] @statement`}},DSt=class t extends HP{static{a(this,"CSharpStatementNode")}static{this.compoundTypeNames=new Set(["block","checked_statement","class_declaration","constructor_declaration","destructor_declaration","do_statement","fixed_statement","for_statement","foreach_statement","if_statement","interface_declaration","lock_statement","method_declaration","struct_declaration","switch_statement","try_statement","unsafe_statement","while_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},hye=class extends oh{static{a(this,"CSharpStatementTree")}static{this.languageIds=new Set(["csharp"])}createNode(e){return new DSt(e)}getStatementQueryText(){return`[ + ] @statement`}},ZSt=class t extends kP{static{a(this,"CSharpStatementNode")}static{this.compoundTypeNames=new Set(["block","checked_statement","class_declaration","constructor_declaration","destructor_declaration","do_statement","fixed_statement","for_statement","foreach_statement","if_statement","interface_declaration","lock_statement","method_declaration","struct_declaration","switch_statement","try_statement","unsafe_statement","while_statement"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){this.isSingleLineIfStatement()&&this.collapse()}isSingleLineIfStatement(){return this.node.type!=="if_statement"||this.node.startPosition.row!==this.node.endPosition.row?!1:this.children.length===1&&this.children[0].node.type!=="block"}},fAe=class extends Xp{static{a(this,"CSharpStatementTree")}static{this.languageIds=new Set(["csharp"])}createNode(e){return new ZSt(e)}getStatementQueryText(){return`[ (extern_alias_directive) (using_directive) (global_attribute) @@ -1695,7 +1684,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (declaration) (accessor_declaration) (block) - ] @statement`}},MSt=class t extends HP{static{a(this,"CStatementNode")}static{this.compoundTypeNames=new Set(["declaration","function_definition","enum_specifier","field_declaration_list","type_definition","compound_statement","if_statement","switch_statement","while_statement","for_statement","do_statement","preproc_if","preproc_ifdef","namespace_definition","class_specifier","field_declaration_list","concept_definition","template_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){(this.isSingleLineDeclarationStatement()||this.isSingleLineConceptDefinition())&&this.collapse()}isSingleLineDeclarationStatement(){return!(this.node.type!=="declaration"||this.node.startPosition.row!==this.node.endPosition.row)}isSingleLineConceptDefinition(){return!(this.node.type!=="concept_definition"||this.node.startPosition.row!==this.node.endPosition.row)}},mye=class extends oh{static{a(this,"CStatementTree")}static{this.languageIds=new Set(["c","cpp"])}createNode(e){return new MSt(e)}getStatementQueryText(){return`[ + ] @statement`}},eIt=class t extends kP{static{a(this,"CStatementNode")}static{this.compoundTypeNames=new Set(["declaration","function_definition","enum_specifier","field_declaration_list","type_definition","compound_statement","if_statement","switch_statement","while_statement","for_statement","do_statement","preproc_if","preproc_ifdef","namespace_definition","class_specifier","field_declaration_list","concept_definition","template_declaration"])}get isCompoundStatementType(){return!this.collapsed&&t.compoundTypeNames.has(this.node.type)}childrenFinished(){(this.isSingleLineDeclarationStatement()||this.isSingleLineConceptDefinition())&&this.collapse()}isSingleLineDeclarationStatement(){return!(this.node.type!=="declaration"||this.node.startPosition.row!==this.node.endPosition.row)}isSingleLineConceptDefinition(){return!(this.node.type!=="concept_definition"||this.node.startPosition.row!==this.node.endPosition.row)}},pAe=class extends Xp{static{a(this,"CStatementTree")}static{this.languageIds=new Set(["c","cpp"])}createNode(e){return new eIt(e)}getStatementQueryText(){return`[ (declaration) (function_definition) (type_definition) @@ -1732,14 +1721,14 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (using_declaration) (alias_declaration) (static_assert_declaration) - ] @statement`}};var jP=class{constructor(e,r,n){this.languageId=e;this.prefix=r;this.completion=n}static{a(this,"BlockTrimmer")}static isSupported(e){return oh.isSupported(e)}static isTrimmedByDefault(e){return oh.isTrimmedByDefault(e)}async withParsedStatementTree(e){var n=[];try{let r=Hht(n,oh.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length));await r.build();return await e(r)}catch(o){var s=o,c=!0}finally{jht(n,s,c)}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};var b8e=class extends jP{constructor(r,n,o,s=3,c=7){super(r,n,o);this.lineLimit=s;this.lookAhead=c;let l=[...this.completion.matchAll(/\n/g)],u=this.lineLimit+this.lookAhead;l.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=l[this.lineLimit-1].index),l.length>=u&&u>0&&(this.lookAheadOffset=l[u-1].index)}static{a(this,"TerseBlockTrimmer")}async getCompletionTrimOffset(){return await this.withParsedStatementTree(r=>{let n=r.statementAt(this.stmtStartPos()),o=this.getContainingBlockOffset(n);return o=this.trimAtFirstBlankLine(o),n&&(o=this.trimAtStatementChange(n,o)),this.limitOffset&&this.lookAheadOffset&&(o===void 0||o>this.lookAheadOffset)?this.limitOffset:o})}stmtStartPos(){let r=this.completion.match(/\S/);return r&&r.index!==void 0?this.prefix.length+r.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(r){let n=[...this.trimmedCompletion(r).matchAll(/\r?\n\s*\r?\n/g)];for(;n.length>0&&(r===void 0||r>n[0].index);){let o=n.shift();if(this.completion.substring(0,o.index).trim()!=="")return o.index}return r}trimAtStatementChange(r,n){let o=this.prefix.length,s=this.prefix.length+(n??this.completion.length);if(r.node.endIndex>o&&this.isCompoundStatement(r))return r.nextSibling&&r.node.endIndexo&&c.node.endIndexlHi,buildType:()=>uHi,default:()=>gHi,dependencies:()=>hHi,description:()=>aHi,devDependencies:()=>pHi,displayName:()=>sHi,engines:()=>dHi,name:()=>oHi,overrides:()=>mHi,scripts:()=>fHi,version:()=>cHi});var oHi="copilot",sHi="GitHub Copilot",aHi="Your AI pair programmer",cHi="1.467.0",lHi="125",uHi="prod",dHi={node:">=22.13.0",npm:">=11.6.0 <12.0.0"},fHi={postinstall:"tsx script/copyCopilotSdkFiles.ts",build:"tsx esbuild.ts",clean:"./script/build/clean.sh",compress:"tsx ./script/compressTokenizer.ts",generate_languages:"tsx script/generateLanguages.ts && prettier --write lib/src/language/generatedLanguages.ts",get_token:"tsx script/deviceFlow.ts --save-as-test-token",lint:'run-p --aggregate-output "lint:*"',"lint:deps":"depcruise -c .dependency-cruiser.js .","lint:eslint":"eslint -f visualstudio --quiet --cache .","lint:prettier":"prettier --check . 2>&1","lint:types":"tsc --noEmit",prebuild:"npm install",pretest:"npm run build","pretest:headless":"npm run build","pretest:lsp-client":"npm run build","pretest:lib-e2e":"npm run build",prewatch:"npm run build","prewatch:esbuild":"npm run build",start:"npm run watch",test:'npm-run-all "test:headless --ignore-scripts" lint',"test:headless":'npm-run-all test:lib test:agent "test:lib-e2e --ignore-scripts" test:prompt "test:lsp-client --ignore-scripts" lint',"test:agent":'mocha "agent/src/**/*.test.{ts,tsx}"',"test:lib":'mocha "lib/src/**/*.test.{ts,tsx}"',"test:lib-e2e":'mocha "lib/e2e/src/**/*.test.{ts,tsx}" --exclude "lib/e2e/src/prompt/**/*.test.ts"',"test:lib-e2e-no-ci":'mocha "lib/e2e/no-ci/**/*.test.{ts,tsx}"',"test:lib-prompt-e2e":'mocha "lib/e2e/src/prompt/prompt.test.ts"',"test:lib-prompt-e2e-perf":"INCLUDE_PERFORMANCE=true npm run test:lib-prompt-e2e","test:lsp-client":'mocha "lsp-client/test/*.test.{ts,tsx}"',"test:prompt":'mocha "prompt/test/**/*.test.{ts,tsx}"',"test:prepare-msbench":"tsx script/setupMsbench.ts","test:run-msbench":"tsx lsp-client/test/msbench/agent/index.ts",watch:'run-p "watch:esbuild --ignore-scripts" "watch:types -- --preserveWatchOutput"',"watch:esbuild":"tsx esbuild.ts --watch","watch:types":"tsc --noEmit --watch"},pHi={"@azure/identity":"^4.13.0","@azure/keyvault-secrets":"^4.10.0","@github/prettier-config":"0.0.6","@limegrass/eslint-plugin-import-alias":"^1.6.1","@parcel/watcher":"^2.5.6","@types/benchmark":"^2.1.5","@types/crypto-js":"^4.2.2","@types/diff":"^8.0.0","@types/git-url-parse":"^16.0.0","@types/js-yaml":"^4.0.6","@types/kerberos":"^1.1.2","@types/markdown-it":"^14.1.2","@types/mocha":"^10.0.10","@types/node":"~22.7.0","@types/semver":"^7.7.0","@types/sinon":"^21.0.0","@types/uuid":"^10.0.0","@types/vscode":"1.115.0","@types/yargs":"^17.0.24","@vscode/test-electron":"^2.5.2","@vscode/tree-sitter-wasm":"0.0.5-php.2","@yao-pkg/pkg":"^6.11.0",benchmark:"^2.1.4",boxen:"^8.0.1",chalk:"^5.6.2","dependency-cruiser":"^17.0.1",esbuild:"^0.27.3","esbuild-plugin-copy":"^2.1.1",eslint:"^9.32.0","eslint-formatter-visualstudio":"^8.40.0","eslint-plugin-mocha":"^10.5.0",glob:"^11.1.0",globals:"^17.4.0","js-yaml":"^4.1.0",mocha:"^11.2.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",openai:"^6.33.0",prettier:"^3.5.3","prettier-plugin-organize-imports":"^4.2.0","simple-git":"^3.33.0",sinon:"^21.0.3","tree-sitter-bash":"^0.23.0","tree-sitter-powershell":"0.25.9","ts-dedent":"^2.2.0",tsx:"^4.21.0",typescript:"^5.9.3","typescript-eslint":"^8.39.1","vscode-dts":"^0.3.3"},hHi={"@adobe/helix-fetch":"github:devm33/helix-fetch#2a08fa939591a0e14f34f611adcc3ed767579e9a","@agentclientprotocol/sdk":"^0.16.1","@anthropic-ai/sdk":"^0.56.0","@github/copilot":"1.0.17","@github/memoize":"1.1.5","@microsoft/1ds-core-js":"^4.3.10","@microsoft/1ds-post-js":"^4.3.10","@microsoft/applicationinsights-web-basic":"^3.3.11","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.26.0","@octokit/graphql":"^8.0.1","@octokit/rest":"^22.0.1","@sinclair/typebox":"^0.34.33","@types/vscode-webview":"^1.57.4","@vscode/chat-lib":"^0.42.0","@vscode/codicons":"^0.0.39","@vscode/copilot-api":"^0.2.2","@vscode/policy-watcher":"^1.3.2","@vscode/prompt-tsx":"^0.4.0-alpha.5","@vscode/webview-ui-toolkit":"^1.3.1","await-lock":"^2.2.2","crypto-js":"^4.2.0",diff:"^8.0.2",dldr:"^0.0.10",events:"^3.3.0","get-stream":"^6.0.1","git-url-parse":"^16.0.3",kerberos:"^2.2.0","mac-ca":"^3.1.3","markdown-it":"^14.1.0",microjob:"^0.7.0",minimatch:"^9.0.3",open:"^10.2.0","os-browserify":"^0.3.0","path-browserify":"^1.0.1",semver:"^7.7.1",shiki:"~1.15.0","source-map-support":"^0.5.21",undici:"^7.24.6",uuid:"^11.1.0","vscode-languageclient":"^9.0.0","vscode-languageserver":"^9.0.0","vscode-languageserver-protocol":"^3.17","vscode-languageserver-textdocument":"~1.0.11","vscode-uri":"^3.1.0","web-tree-sitter":"^0.23.0","windows-ca-certs":"^0.2.2",ws:"^8.19.0",yargs:"^17.7.2"},mHi={fsevents:"<0",bindings:"npm:bundled-bindings@^1.5.0",jws:"^3.2.3",tar:"7.5.8"},gHi={name:oHi,displayName:sHi,description:aHi,version:cHi,build:lHi,buildType:uHi,engines:dHi,scripts:fHi,devDependencies:pHi,dependencies:hHi,overrides:mHi};var tt={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",FetchStrategy:"fetchStrategy",ToolConfirmAutoApprove:"agent.toolConfirmAutoApprove",AutoApproveUnmatchedTerminal:"agent.autoApproveUnmatchedTerminal",AutoApproveUnmatchedFileOp:"agent.autoApproveUnmatchedFileOp",TrustToolAnnotations:"agent.trustToolAnnotations",AutoApproveYoloMode:"agent.autoApproveYoloMode",MaxToolCallingLoop:"agent.maxToolCallingLoop",AutoCompress:"agent.autoCompress",AnthropicThinkingBudgetToken:"agent.anthropicThinkingBudgetToken",EnableSkills:"agent.enableSkills",UseAgentsMd:"agent.useAgentsMdFile",UseNestedAgentsMd:"agent.useNestedAgentsMdFiles",UseClaudeMd:"agent.useClaudeMdFile",UseNestedClaudeMd:"agent.useNestedClaudeMdFiles",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",EnableThinking:"agent.enableThinking",TranscriptDirectory:"agent.transcriptDirectory",NESExtendedRange:"nextEditSuggestions.extendedRange",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugOverrideLogLevels:"advanced.debug.overrideLogLevels",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",DebugUseElectronFetcher:"advanced.debug.useElectronFetcher",DebugUseEditorFetcher:"advanced.debug.useEditorFetcher",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",TrimCompletionsAggressively:"internal.trimCompletionsAggressively",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",ShowWorkspaceContextDebugger:"internal.showWorkspaceContextDebugger",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",NESXTab:"internal.useXTab",NESUseExplicitRejection:"internal.nesUseExplicitRejection",UseSplitContextPrompt:"internal.useSplitContextPrompt",UseCompletionsComparisonPanel:"internal.useCompletionsComparisonPanel",ComparisonPanelModelIds:"internal.comparisonPanelModelIds",ComparisonPanelRandomizedMode:"internal.comparisonPanelRandomizedMode",UseFetchFetcher:"internal.useFetchFetcher",UseChatLibCompletions:"internal.useChatLibCompletions",HookErrorOccurredStackTrace:"internal.hookErrorOccurredStackTrace",AppendPromptTokenCache:"internal.appendPromptTokenCache",PromptPersistBasePath:"internal.promptPersistBasePath",AnthropicMessagesEndpoint:"internal.anthropic.messagesEndpoint",AnthropicThinkingEffort:"internal.anthropic.thinkingEffort",EnableMapCodeFallback:"internal.enableMapCodeFallback"};function M6r(t){return["server","parsingandserver"].includes(t)}a(M6r,"shouldDoServerTrimming");var Nx=class{static{a(this,"BlockModeConfig")}},xre=class extends Nx{static{a(this,"ConfigBlockModeConfig")}forLanguage(e,r,n){let o=e.get(jt).overrideBlockMode(n);if(o)return BSt(o,r);let s=e.get(jt).enableProgressiveReveal(n);return(vr(e,tt.AlwaysRequestMultiline)??s)||jP.isTrimmedByDefault(r)?BSt("moremultiline",r):r=="ruby"?"parsing":F1(r)?"parsingandserver":"server"}};function AHi(t){return["parsing","parsingandserver","moremultiline"].includes(t)}a(AHi,"blockModeRequiresTreeSitter");function BSt(t,e){return t==="moremultiline"&&oh.isSupported(e)?t:AHi(t)&&!F1(e)?"server":t}a(BSt,"toApplicableBlockMode");var Qc=class{static{a(this,"ConfigProvider")}requireReady(){return Promise.resolve()}},wre=class extends Qc{constructor(){super(...arguments);this.onDidChangeCopilotSettings=a(()=>({dispose:a(()=>{},"dispose")}),"onDidChangeCopilotSettings");this.onDidChangeHttpSettings=this.onDidChangeCopilotSettings}static{a(this,"DefaultsOnlyConfigProvider")}getConfig(r){return yHi(r)}getOptionalConfig(r){return EHi(r)}dumpForTelemetry(){return{}}getExplicitlySetConfigs(){return new Map}getHttpSettings(){return{proxy:""}}},sj=class extends Qc{constructor(r,n){super();this.baseConfigProvider=r;this.overrides=n;this.copilotEmitter=new ki;this.onDidChangeCopilotSettings=this.copilotEmitter.event;this.didChangeHttpSettingsEmitter=new ki;this.onDidChangeHttpSettings=this.didChangeHttpSettingsEmitter.event;this.httpSettings=this.baseConfigProvider.getHttpSettings()}static{a(this,"InMemoryConfigProvider")}getOptionalOverride(r){return this.overrides.get(r)}getConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getConfig(r)}getOptionalConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getOptionalConfig(r)}setConfig(r,n){this.setCopilotSettings({[r]:n})}setCopilotSettings(r){for(let[n,o]of Object.entries(r))o!==void 0?this.overrides.set(n,o):this.overrides.delete(n);this.copilotEmitter.fire(this)}getExplicitlySetConfigs(){let r=new Map(this.baseConfigProvider.getExplicitlySetConfigs());for(let[n,o]of this.overrides)r.set(n,o);return r}getHttpSettings(){return this.httpSettings}setHttpSettings(r){let n=gye(r);this.httpSettings=n,this.didChangeHttpSettingsEmitter.fire(this.getHttpSettings())}dumpForTelemetry(){let r=this.baseConfigProvider.dumpForTelemetry();for(let n of[tt.ShowEditorCompletions,tt.EnableAutoCompletions,tt.DelayCompletions,tt.FilterCompletions]){let o=this.overrides.get(n);o!==void 0&&(r[n]=JSON.stringify(o))}return r}};function O6r(t,e){let r=t,n=[];for(let o of e.split(".")){let s=[...n,o].join(".");r&&typeof r=="object"&&s in r?(r=r[s],n.length=0):n.push(o)}if(!(r===void 0||n.length>0))return r}a(O6r,"getConfigKeyRecursively");function yHi(t){if(T8e.has(t))return T8e.get(t);throw new Error(`Missing config default value: ${pmt}.${t}`)}a(yHi,"getConfigDefaultForKey");function EHi(t){return T8e.get(t)}a(EHi,"getOptionalConfigDefaultForKey");function S8e(t){return t.get(Qc).getExplicitlySetConfigs()}a(S8e,"getExplicitlySetConfigs");var CHi={[tt.DebugOverrideCppHeadersEnableSwitch]:!1,[tt.RelatedFilesVSCodeCSharp]:!1,[tt.RelatedFilesVSCodeTypeScript]:!1,[tt.RelatedFilesVSCode]:!1,[tt.IncludeNeighboringFiles]:!1,[tt.ExcludeRelatedFiles]:!1,[tt.ContextProviders]:[],[tt.DebugUseEditorFetcher]:null,[tt.DebugUseElectronFetcher]:null,[tt.DebugOverrideLogLevels]:{},[tt.DebugSnippyOverrideUrl]:"",[tt.FetchStrategy]:"auto",[tt.ToolConfirmAutoApprove]:!1,[tt.AutoApproveUnmatchedTerminal]:void 0,[tt.AutoApproveUnmatchedFileOp]:void 0,[tt.TrustToolAnnotations]:!1,[tt.AutoApproveYoloMode]:!1,[tt.MaxToolCallingLoop]:25,[tt.AutoCompress]:!1,[tt.AnthropicThinkingBudgetToken]:1024,[tt.EnableSkills]:!1,[tt.UseAgentsMd]:!1,[tt.UseNestedAgentsMd]:!1,[tt.UseClaudeMd]:!1,[tt.UseNestedClaudeMd]:!1,[tt.UseSubsetMatching]:null,[tt.ContextProviderTimeBudget]:void 0,[tt.DebugOverrideCapiUrl]:"",[tt.DebugTestOverrideCapiUrl]:"",[tt.DebugOverrideProxyUrl]:"",[tt.DebugTestOverrideProxyUrl]:"",[tt.DebugOverrideEngine]:"",[tt.AlwaysRequestMultiline]:void 0,[tt.ModelAlwaysTerminatesSingleline]:void 0,[tt.TrimCompletionsAggressively]:void 0,[tt.CompletionsDebounce]:void 0,[tt.NESXTab]:void 0,[tt.UseWorkspaceContextCoordinator]:void 0,[tt.ShowWorkspaceContextDebugger]:!1,[tt.CompletionsDelay]:void 0,[tt.UseSplitContextPrompt]:void 0,[tt.UseCompletionsComparisonPanel]:void 0,[tt.ComparisonPanelModelIds]:void 0,[tt.ComparisonPanelRandomizedMode]:void 0,[tt.UseFetchFetcher]:void 0,[tt.UseChatLibCompletions]:void 0,[tt.TranscriptDirectory]:void 0,[tt.EnableThinking]:!0,[tt.ShowEditorCompletions]:void 0,[tt.EnableAutoCompletions]:void 0,[tt.DelayCompletions]:void 0,[tt.FilterCompletions]:void 0,[tt.Enable]:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},[tt.UserSelectedCompletionModel]:"",[tt.DebugFilterLogCategories]:[],[tt.DebugOverrideEngineLegacy]:"",[tt.DebugTestOverrideProxyUrlLegacy]:"",[tt.DebugOverrideProxyUrlLegacy]:"",[tt.DebugTestOverrideCapiUrlLegacy]:"",[tt.DebugOverrideCapiUrlLegacy]:"",[tt.HookErrorOccurredStackTrace]:!1,[tt.NESUseExplicitRejection]:!1,[tt.AppendPromptTokenCache]:"",[tt.PromptPersistBasePath]:void 0,[tt.AnthropicMessagesEndpoint]:"",[tt.AnthropicThinkingEffort]:"unset",[tt.EnableMapCodeFallback]:"enabled",[tt.NESExtendedRange]:!1},T8e=new Map(Object.entries(CHi));for(let t of Object.values(tt))if(!T8e.has(t))throw new Error(`Missing config default value ${pmt}.${t}`);function vr(t,e){return t.get(Qc).getConfig(e)}a(vr,"getConfig");function yRr(t){return t.get(Qc).dumpForTelemetry()}a(yRr,"dumpForTelemetry");var Ko=class{constructor(){this.packageJson=OSt}static{a(this,"BuildInfo")}isProduction(){return this.getBuildType()!=="dev"}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getDisplayVersion(){return this.getBuildType()==="dev"?`${this.getVersion()}-dev`:this.getVersion()}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}};function _mt(t){return t.get(Ko).isProduction()}a(_mt,"isProduction");function $4e(t){return t.get(Ko).getBuildType()==="dev"}a($4e,"isDevBuild");function kL(t){return t.get(Ko).getBuildType()}a(kL,"getBuildType");function ERr(t){return t.get(Ko).getBuild()}a(ERr,"getBuild");function Z_(t){return t.get(Ko).getVersion()}a(Z_,"getVersion");var Ks=class{constructor(e,r,n,o="none",s="desktop"){this.sessionId=e;this.machineId=r;this.devDeviceId=n;this.remoteName=o;this.uiKind=s}static{a(this,"EditorSession")}};function G_({name:t,version:e}){return`${t}/${e}`}a(G_,"formatNameAndVersion");var Nr=class{static{a(this,"EditorAndPluginInfo")}getCopilotIntegrationId(){}getEditorPluginSpecificFilters(){return[]}},B6r="2025-05-01";function mE(t){let e=t.get(Nr);return{"Editor-Version":G_(e.getEditorInfo()),"Editor-Plugin-Version":G_(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":Z_(t)}}a(mE,"editorVersionHeaders");var ex="Iv1.b507a08c87ecfe98",_Hi="350ee525b5da0e4a54c6e8e043edc1b99cc02f19",LSt="Ov23liV9UpD7Rnfnskm3",vHi="5509a52e4c525cd594a6fba9147ff6cc2388dd9f",bHi={[ex]:_Hi,[LSt]:vHi},qc=class{static{a(this,"GitHubAppInfo")}findAppIdToAuthenticate(){return this.githubAppId??ex}findAppSecretToAuthenticate(){let e=this.findAppIdToAuthenticate(),r=bHi[e];if(!r)throw new Error(`GitHubAppInfo: No app secret found for app ID: ${e}`);return r}};var dr=class{static{a(this,"Fetcher")}getImplementation(){return this}};function zM(t,e,r,n,o,s,c,l,u,d,p,h){let m={...l,Authorization:`Bearer ${r}`,...mE(t)};d===void 0&&(m["Openai-Organization"]="github-copilot",m["X-Request-Id"]=o,m["VScode-SessionId"]=t.get(Ks).sessionId,m["VScode-MachineId"]=t.get(Ks).machineId,m["X-GitHub-Api-Version"]=B6r),n&&(m["OpenAI-Intent"]=n);let g={method:"POST",headers:m,json:s,timeout:u};p&&h&&p.logRequest({timestamp:new Date().toISOString(),requestId:o,method:"POST",url:e,headers:m,messages:h,body:s});let A=t.get(dr);if(c){let E=new AbortController;c.onCancellationRequested(()=>{at(t,"networking.cancelRequest",yt.createAndMarkAsIssued({headerRequestId:o})),E.abort()}),g.signal=E.signal}return A.fetch(e,g).catch(E=>{if(THi(E))return at(t,"networking.disconnectAll"),A.disconnectAll().then(()=>A.fetch(e,g));throw E})}a(zM,"postRequest");function THi(t){return t instanceof Error?t.message=="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code=="ECONNRESET"||t.code=="ETIMEDOUT"||t.code=="ERR_HTTP2_INVALID_SESSION":!1:!1}a(THi,"isInterruptedNetworkError");var SHi=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function IHi(t){return SHi.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}a(IHi,"isOomError");function A6(t,e,r,n=_r){if(!ep(e)){if(e instanceof Error){let o=e;IHi(o)?t.get(Xs).setWarning("Out of memory"):o.code==="EMFILE"||o.code==="ENFILE"?t.get(Xs).setWarning("Too many open files"):o.code==="CopilotPromptLoadFailure"?t.get(Xs).setWarning("Corrupted Copilot installation"):`${o.code}`.startsWith("CopilotPromptWorkerExit")?t.get(Xs).setWarning("Worker unexpectedly exited"):o.syscall==="uv_cwd"&&o.code==="ENOENT"&&t.get(Xs).setWarning("Current working directory does not exist")}n.exception(t,e,r)}}a(A6,"handleException");function L6r(t){process.addListener("uncaughtException",r=>{A6(t,r,"uncaughtException")});let e=!1;process.addListener("unhandledRejection",r=>{if(!e)try{e=!0,A6(t,r,"unhandledRejection")}finally{e=!1}})}a(L6r,"registerDefaultHandlers");async function F6r(t){try{await nye}catch(e){A6(t,e,"initializeTokenizers")}}a(F6r,"waitForTokenizers");f();var YM=require("fs"),U6r=require("os"),I8e=de(require("path")),Rre=require("process");var Si=class{static{a(this,"PersistenceManager")}},FSt=class extends Si{constructor(r){super();this.directory=r}static{a(this,"FilePersistenceManager")}async read(r,n){try{return(await this.readJsonObject(r))[n]}catch{return}}async update(r,n,o){await YM.promises.mkdir(this.directory,{recursive:!0,mode:448});let s=`${this.directory}/${r}.json`,c=I8e.dirname(s);c!==this.directory&&await YM.promises.mkdir(c,{recursive:!0,mode:448});let l;try{l=await Aye.acquire(s);let u=await this.readJsonObject(r);u[n]=o,await YM.promises.writeFile(s,JSON.stringify(u)+` -`,{encoding:"utf8",mode:384})}finally{l&&await l()}}async delete(r,n){let o=`${this.directory}/${r}.json`,s;try{s=await Aye.acquire(o);let c=await this.readJsonObject(r);delete c[n];let l=JSON.stringify(c)+` + ] @statement`}};var DP=class{constructor(e,r,n){this.languageId=e;this.prefix=r;this.completion=n}static{a(this,"BlockTrimmer")}static isSupported(e){return Xp.isSupported(e)}static isTrimmedByDefault(e){return Xp.isTrimmedByDefault(e)}async withParsedStatementTree(e){var n=[];try{let r=Jpt(n,Xp.create(this.languageId,this.prefix+this.completion,this.prefix.length,this.prefix.length+this.completion.length));await r.build();return await e(r)}catch(o){var s=o,c=!0}finally{Xpt(n,s,c)}}trimmedCompletion(e){return e===void 0?this.completion:this.completion.substring(0,e)}getStatementAtCursor(e){return e.statementAt(Math.max(this.prefix.length-1,0))??e.statements[0]}getContainingBlockOffset(e){let r;if(e&&this.isCompoundStatement(e))r=e;else if(e){let n=e.parent;for(;n&&!this.isCompoundStatement(n);)n=n.parent;r=n}if(r){let n=this.asCompletionOffset(r.node.endIndex);if(n&&this.completion.substring(n).trim()!=="")return n}}hasNonStatementContentAfter(e){if(!e||!e.nextSibling)return!1;let r=this.asCompletionOffset(e.node.endIndex),n=this.asCompletionOffset(e.nextSibling.node.startIndex);return this.completion.substring(Math.max(0,r??0),Math.max(0,n??0)).trim()!==""}asCompletionOffset(e){return e===void 0?void 0:e-this.prefix.length}isCompoundStatement(e){return e.isCompoundStatementType||e.children.length>0}};var kLe=class extends DP{constructor(r,n,o,s=3,c=7){super(r,n,o);this.lineLimit=s;this.lookAhead=c;let l=[...this.completion.matchAll(/\n/g)],u=this.lineLimit+this.lookAhead;l.length>=this.lineLimit&&this.lineLimit>0&&(this.limitOffset=l[this.lineLimit-1].index),l.length>=u&&u>0&&(this.lookAheadOffset=l[u-1].index)}static{a(this,"TerseBlockTrimmer")}async getCompletionTrimOffset(){return await this.withParsedStatementTree(r=>{let n=r.statementAt(this.stmtStartPos()),o=this.getContainingBlockOffset(n);return o=this.trimAtFirstBlankLine(o),n&&(o=this.trimAtStatementChange(n,o)),this.limitOffset&&this.lookAheadOffset&&(o===void 0||o>this.lookAheadOffset)?this.limitOffset:o})}stmtStartPos(){let r=this.completion.match(/\S/);return r&&r.index!==void 0?this.prefix.length+r.index:Math.max(this.prefix.length-1,0)}trimAtFirstBlankLine(r){let n=[...this.trimmedCompletion(r).matchAll(/\r?\n\s*\r?\n/g)];for(;n.length>0&&(r===void 0||r>n[0].index);){let o=n.shift();if(this.completion.substring(0,o.index).trim()!=="")return o.index}return r}trimAtStatementChange(r,n){let o=this.prefix.length,s=this.prefix.length+(n??this.completion.length);if(r.node.endIndex>o&&this.isCompoundStatement(r))return r.nextSibling&&r.node.endIndexo&&c.node.endIndexu$i,buildType:()=>d$i,default:()=>A$i,dependencies:()=>m$i,description:()=>c$i,devDependencies:()=>h$i,displayName:()=>a$i,engines:()=>f$i,name:()=>s$i,overrides:()=>g$i,scripts:()=>p$i,version:()=>l$i});var s$i="copilot",a$i="GitHub Copilot",c$i="Your AI pair programmer",l$i="1.470.0",u$i="130",d$i="prod",f$i={node:">=22.13.0",npm:">=11.6.0 <12.0.0"},p$i={postinstall:"tsx script/copyCopilotSdkFiles.ts",build:"tsx esbuild.ts",clean:"./script/build/clean.sh",compress:"tsx ./script/compressTokenizer.ts",generate_languages:"tsx script/generateLanguages.ts && prettier --write lib/src/language/generatedLanguages.ts",get_token:"tsx script/deviceFlow.ts --save-as-test-token",lint:'run-p --aggregate-output "lint:*"',"lint:deps":"depcruise -c .dependency-cruiser.js .","lint:eslint":"eslint -f visualstudio --quiet --cache .","lint:prettier":"prettier --check . 2>&1","lint:types":"tsc --noEmit",prebuild:"npm install",pretest:"npm run build","pretest:headless":"npm run build","pretest:lsp-client":"npm run build","pretest:lib-e2e":"npm run build",prewatch:"npm run build","prewatch:esbuild":"npm run build",start:"npm run watch",test:'npm-run-all "test:headless --ignore-scripts" lint',"test:headless":'npm-run-all test:lib test:agent "test:lib-e2e --ignore-scripts" test:prompt "test:lsp-client --ignore-scripts" lint',"test:agent":'mocha "agent/src/**/*.test.{ts,tsx}"',"test:lib":'mocha "lib/src/**/*.test.{ts,tsx}"',"test:lib-e2e":'mocha "lib/e2e/src/**/*.test.{ts,tsx}" --exclude "lib/e2e/src/prompt/**/*.test.ts"',"test:lib-e2e-no-ci":'mocha "lib/e2e/no-ci/**/*.test.{ts,tsx}"',"test:lib-prompt-e2e":'mocha "lib/e2e/src/prompt/prompt.test.ts"',"test:lib-prompt-e2e-perf":"INCLUDE_PERFORMANCE=true npm run test:lib-prompt-e2e","test:lsp-client":'mocha "lsp-client/test/*.test.{ts,tsx}"',"test:prompt":'mocha "prompt/test/**/*.test.{ts,tsx}"',"test:prepare-msbench":"tsx script/setupMsbench.ts","test:run-msbench":"tsx lsp-client/test/msbench/agent/index.ts",watch:'run-p "watch:esbuild --ignore-scripts" "watch:types -- --preserveWatchOutput"',"watch:esbuild":"tsx esbuild.ts --watch","watch:types":"tsc --noEmit --watch"},h$i={"@azure/identity":"^4.13.1","@azure/keyvault-secrets":"^4.10.0","@github/prettier-config":"0.0.6","@limegrass/eslint-plugin-import-alias":"^1.6.1","@parcel/watcher":"^2.5.6","@types/benchmark":"^2.1.5","@types/crypto-js":"^4.2.2","@types/diff":"^8.0.0","@types/git-url-parse":"^16.0.0","@types/js-yaml":"^4.0.6","@types/kerberos":"^1.1.2","@types/markdown-it":"^14.1.2","@types/mocha":"^10.0.10","@types/node":"~22.7.0","@types/semver":"^7.7.0","@types/sinon":"^21.0.0","@types/uuid":"^10.0.0","@types/vscode":"1.115.0","@types/yargs":"^17.0.24","@vscode/test-electron":"^2.5.2","@vscode/tree-sitter-wasm":"0.0.5-php.2","@yao-pkg/pkg":"^6.11.0",benchmark:"^2.1.4",boxen:"^8.0.1",chalk:"^5.6.2","dependency-cruiser":"^17.0.1",esbuild:"^0.27.3","esbuild-plugin-copy":"^2.1.1",eslint:"^9.32.0","eslint-formatter-visualstudio":"^8.40.0","eslint-plugin-mocha":"^10.5.0",glob:"^11.1.0",globals:"^17.4.0","js-yaml":"^4.1.0",mocha:"^11.2.2","mocha-junit-reporter":"^2.2.1","mocha-multi-reporters":"^1.5.1","npm-run-all":"^4.1.5",openai:"^6.33.0",prettier:"^3.5.3","prettier-plugin-organize-imports":"^4.2.0","simple-git":"^3.33.0",sinon:"^21.0.3","tree-sitter-bash":"^0.23.0","tree-sitter-powershell":"0.25.9","ts-dedent":"^2.2.0",tsx:"^4.21.0",typescript:"^5.9.3","typescript-eslint":"^8.39.1","vscode-dts":"^0.3.3"},m$i={"@adobe/helix-fetch":"github:devm33/helix-fetch#2a08fa939591a0e14f34f611adcc3ed767579e9a","@agentclientprotocol/sdk":"^0.16.1","@anthropic-ai/sdk":"^0.56.0","@github/copilot":"1.0.17","@github/memoize":"1.1.5","@microsoft/1ds-core-js":"^4.3.10","@microsoft/1ds-post-js":"^4.3.10","@microsoft/applicationinsights-web-basic":"^3.3.11","@microsoft/tiktokenizer":"^1.0.10","@modelcontextprotocol/sdk":"^1.26.0","@octokit/graphql":"^8.0.1","@octokit/rest":"^22.0.1","@sinclair/typebox":"^0.34.33","@types/vscode-webview":"^1.57.4","@vscode/chat-lib":"^0.42.0","@vscode/codicons":"^0.0.39","@vscode/copilot-api":"^0.2.2","@vscode/policy-watcher":"^1.3.2","@vscode/prompt-tsx":"^0.4.0-alpha.5","@vscode/webview-ui-toolkit":"^1.3.1","await-lock":"^2.2.2","crypto-js":"^4.2.0",diff:"^8.0.2",dldr:"^0.0.10",events:"^3.3.0","get-stream":"^6.0.1","git-url-parse":"^16.0.3",kerberos:"^2.2.0","mac-ca":"^3.1.3","markdown-it":"^14.1.0",microjob:"^0.7.0",minimatch:"^9.0.3",open:"^10.2.0","os-browserify":"^0.3.0","path-browserify":"^1.0.1",semver:"^7.7.1",shiki:"~1.15.0","source-map-support":"^0.5.21",undici:"^7.24.6",uuid:"^11.1.0","vscode-languageclient":"^9.0.0","vscode-languageserver":"^9.0.0","vscode-languageserver-protocol":"^3.17","vscode-languageserver-textdocument":"~1.0.11","vscode-uri":"^3.1.0","web-tree-sitter":"^0.23.0","windows-ca-certs":"^0.2.2",ws:"^8.19.0",yargs:"^17.7.2"},g$i={fsevents:"<0",bindings:"npm:bundled-bindings@^1.5.0",jws:"^3.2.3",tar:"7.5.8"},A$i={name:s$i,displayName:a$i,description:c$i,version:l$i,build:u$i,buildType:d$i,engines:f$i,scripts:p$i,devDependencies:h$i,dependencies:m$i,overrides:g$i};var tt={Enable:"enable",UserSelectedCompletionModel:"selectedCompletionModel",ShowEditorCompletions:"editor.showEditorCompletions",EnableAutoCompletions:"editor.enableAutoCompletions",DelayCompletions:"editor.delayCompletions",FilterCompletions:"editor.filterCompletions",FetchStrategy:"fetchStrategy",ToolConfirmAutoApprove:"agent.toolConfirmAutoApprove",AutoApproveUnmatchedTerminal:"agent.autoApproveUnmatchedTerminal",AutoApproveUnmatchedFileOp:"agent.autoApproveUnmatchedFileOp",TrustToolAnnotations:"agent.trustToolAnnotations",AutoApproveYoloMode:"agent.autoApproveYoloMode",MaxToolCallingLoop:"agent.maxToolCallingLoop",AutoCompress:"agent.autoCompress",AnthropicThinkingBudgetToken:"agent.anthropicThinkingBudgetToken",EnableSkills:"agent.enableSkills",UseAgentsMd:"agent.useAgentsMdFile",UseNestedAgentsMd:"agent.useNestedAgentsMdFiles",UseClaudeMd:"agent.useClaudeMdFile",UseNestedClaudeMd:"agent.useNestedClaudeMdFiles",CompletionsDelay:"completionsDelay",CompletionsDebounce:"completionsDebounce",EnableThinking:"agent.enableThinking",TranscriptDirectory:"agent.transcriptDirectory",NESExtendedRange:"nextEditSuggestions.extendedRange",RelatedFilesVSCodeCSharp:"advanced.relatedFilesVSCodeCSharp",RelatedFilesVSCodeTypeScript:"advanced.relatedFilesVSCodeTypeScript",RelatedFilesVSCode:"advanced.relatedFilesVSCode",ContextProviders:"advanced.contextProviders",DebugOverrideLogLevels:"advanced.debug.overrideLogLevels",DebugFilterLogCategories:"advanced.debug.filterLogCategories",DebugSnippyOverrideUrl:"advanced.debug.codeRefOverrideUrl",DebugUseElectronFetcher:"advanced.debug.useElectronFetcher",DebugUseEditorFetcher:"advanced.debug.useEditorFetcher",UseSubsetMatching:"advanced.useSubsetMatching",ContextProviderTimeBudget:"advanced.contextProviderTimeBudget",DebugOverrideCapiUrl:"internal.capiUrl",DebugOverrideCapiUrlLegacy:"advanced.debug.overrideCapiUrl",DebugTestOverrideCapiUrl:"internal.capiTestUrl",DebugTestOverrideCapiUrlLegacy:"advanced.debug.testOverrideCapiUrl",DebugOverrideProxyUrl:"internal.completionsUrl",DebugOverrideProxyUrlLegacy:"advanced.debug.overrideProxyUrl",DebugTestOverrideProxyUrl:"internal.completionsTestUrl",DebugTestOverrideProxyUrlLegacy:"advanced.debug.testOverrideProxyUrl",DebugOverrideEngine:"internal.completionModel",DebugOverrideEngineLegacy:"advanced.debug.overrideEngine",AlwaysRequestMultiline:"internal.alwaysRequestMultiline",ModelAlwaysTerminatesSingleline:"internal.modelAlwaysTerminatesSingleline",TrimCompletionsAggressively:"internal.trimCompletionsAggressively",UseWorkspaceContextCoordinator:"internal.useWorkspaceContextCoordinator",ShowWorkspaceContextDebugger:"internal.showWorkspaceContextDebugger",IncludeNeighboringFiles:"internal.includeNeighboringFiles",ExcludeRelatedFiles:"internal.excludeRelatedFiles",DebugOverrideCppHeadersEnableSwitch:"internal.cppHeadersEnableSwitch",NESXTab:"internal.useXTab",NESUseExplicitRejection:"internal.nesUseExplicitRejection",UseSplitContextPrompt:"internal.useSplitContextPrompt",UseCompletionsComparisonPanel:"internal.useCompletionsComparisonPanel",ComparisonPanelModelIds:"internal.comparisonPanelModelIds",ComparisonPanelRandomizedMode:"internal.comparisonPanelRandomizedMode",UseFetchFetcher:"internal.useFetchFetcher",UseChatLibCompletions:"internal.useChatLibCompletions",HookErrorOccurredStackTrace:"internal.hookErrorOccurredStackTrace",AppendPromptTokenCache:"internal.appendPromptTokenCache",PromptPersistBasePath:"internal.promptPersistBasePath",AnthropicMessagesEndpoint:"internal.anthropic.messagesEndpoint",AnthropicThinkingEffort:"internal.anthropic.thinkingEffort",EnableMapCodeFallback:"internal.enableMapCodeFallback"};function NFr(t){return["server","parsingandserver"].includes(t)}a(NFr,"shouldDoServerTrimming");var Cx=class{static{a(this,"BlockModeConfig")}},Gte=class extends Cx{static{a(this,"ConfigBlockModeConfig")}forLanguage(e,r,n){let o=e.get(Gt).overrideBlockMode(n);if(o)return rIt(o,r);let s=e.get(Gt).enableProgressiveReveal(n);return(vr(e,tt.AlwaysRequestMultiline)??s)||DP.isTrimmedByDefault(r)?rIt("moremultiline",r):r=="ruby"?"parsing":S1(r)?"parsingandserver":"server"}};function y$i(t){return["parsing","parsingandserver","moremultiline"].includes(t)}a(y$i,"blockModeRequiresTreeSitter");function rIt(t,e){return t==="moremultiline"&&Xp.isSupported(e)?t:y$i(t)&&!S1(e)?"server":t}a(rIt,"toApplicableBlockMode");var Mc=class{static{a(this,"ConfigProvider")}requireReady(){return Promise.resolve()}},Hte=class extends Mc{constructor(){super(...arguments);this.onDidChangeCopilotSettings=a(()=>({dispose:a(()=>{},"dispose")}),"onDidChangeCopilotSettings");this.onDidChangeHttpSettings=this.onDidChangeCopilotSettings}static{a(this,"DefaultsOnlyConfigProvider")}getConfig(r){return E$i(r)}getOptionalConfig(r){return _$i(r)}dumpForTelemetry(){return{}}getExplicitlySetConfigs(){return new Map}getHttpSettings(){return{proxy:""}}},pH=class extends Mc{constructor(r,n){super();this.baseConfigProvider=r;this.overrides=n;this.copilotEmitter=new Ri;this.onDidChangeCopilotSettings=this.copilotEmitter.event;this.didChangeHttpSettingsEmitter=new Ri;this.onDidChangeHttpSettings=this.didChangeHttpSettingsEmitter.event;this.httpSettings=this.baseConfigProvider.getHttpSettings()}static{a(this,"InMemoryConfigProvider")}getOptionalOverride(r){return this.overrides.get(r)}getConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getConfig(r)}getOptionalConfig(r){return this.getOptionalOverride(r)??this.baseConfigProvider.getOptionalConfig(r)}setConfig(r,n){this.setCopilotSettings({[r]:n})}setCopilotSettings(r){for(let[n,o]of Object.entries(r))o!==void 0?this.overrides.set(n,o):this.overrides.delete(n);this.copilotEmitter.fire(this)}getExplicitlySetConfigs(){let r=new Map(this.baseConfigProvider.getExplicitlySetConfigs());for(let[n,o]of this.overrides)r.set(n,o);return r}getHttpSettings(){return this.httpSettings}setHttpSettings(r){let n=hAe(r);this.httpSettings=n,this.didChangeHttpSettingsEmitter.fire(this.getHttpSettings())}dumpForTelemetry(){let r=this.baseConfigProvider.dumpForTelemetry();for(let n of[tt.ShowEditorCompletions,tt.EnableAutoCompletions,tt.DelayCompletions,tt.FilterCompletions]){let o=this.overrides.get(n);o!==void 0&&(r[n]=JSON.stringify(o))}return r}};function MFr(t,e){let r=t,n=[];for(let o of e.split(".")){let s=[...n,o].join(".");r&&typeof r=="object"&&s in r?(r=r[s],n.length=0):n.push(o)}if(!(r===void 0||n.length>0))return r}a(MFr,"getConfigKeyRecursively");function E$i(t){if(DLe.has(t))return DLe.get(t);throw new Error(`Missing config default value: ${Cht}.${t}`)}a(E$i,"getConfigDefaultForKey");function _$i(t){return DLe.get(t)}a(_$i,"getOptionalConfigDefaultForKey");function NLe(t){return t.get(Mc).getExplicitlySetConfigs()}a(NLe,"getExplicitlySetConfigs");var C$i={[tt.DebugOverrideCppHeadersEnableSwitch]:!1,[tt.RelatedFilesVSCodeCSharp]:!1,[tt.RelatedFilesVSCodeTypeScript]:!1,[tt.RelatedFilesVSCode]:!1,[tt.IncludeNeighboringFiles]:!1,[tt.ExcludeRelatedFiles]:!1,[tt.ContextProviders]:[],[tt.DebugUseEditorFetcher]:null,[tt.DebugUseElectronFetcher]:null,[tt.DebugOverrideLogLevels]:{},[tt.DebugSnippyOverrideUrl]:"",[tt.FetchStrategy]:"auto",[tt.ToolConfirmAutoApprove]:!1,[tt.AutoApproveUnmatchedTerminal]:void 0,[tt.AutoApproveUnmatchedFileOp]:void 0,[tt.TrustToolAnnotations]:!1,[tt.AutoApproveYoloMode]:!1,[tt.MaxToolCallingLoop]:25,[tt.AutoCompress]:!1,[tt.AnthropicThinkingBudgetToken]:1024,[tt.EnableSkills]:!1,[tt.UseAgentsMd]:!1,[tt.UseNestedAgentsMd]:!1,[tt.UseClaudeMd]:!1,[tt.UseNestedClaudeMd]:!1,[tt.UseSubsetMatching]:null,[tt.ContextProviderTimeBudget]:void 0,[tt.DebugOverrideCapiUrl]:"",[tt.DebugTestOverrideCapiUrl]:"",[tt.DebugOverrideProxyUrl]:"",[tt.DebugTestOverrideProxyUrl]:"",[tt.DebugOverrideEngine]:"",[tt.AlwaysRequestMultiline]:void 0,[tt.ModelAlwaysTerminatesSingleline]:void 0,[tt.TrimCompletionsAggressively]:void 0,[tt.CompletionsDebounce]:void 0,[tt.NESXTab]:void 0,[tt.UseWorkspaceContextCoordinator]:void 0,[tt.ShowWorkspaceContextDebugger]:!1,[tt.CompletionsDelay]:void 0,[tt.UseSplitContextPrompt]:void 0,[tt.UseCompletionsComparisonPanel]:void 0,[tt.ComparisonPanelModelIds]:void 0,[tt.ComparisonPanelRandomizedMode]:void 0,[tt.UseFetchFetcher]:void 0,[tt.UseChatLibCompletions]:void 0,[tt.TranscriptDirectory]:void 0,[tt.EnableThinking]:!0,[tt.ShowEditorCompletions]:void 0,[tt.EnableAutoCompletions]:void 0,[tt.DelayCompletions]:void 0,[tt.FilterCompletions]:void 0,[tt.Enable]:{"*":!0,plaintext:!1,markdown:!1,scminput:!1},[tt.UserSelectedCompletionModel]:"",[tt.DebugFilterLogCategories]:[],[tt.DebugOverrideEngineLegacy]:"",[tt.DebugTestOverrideProxyUrlLegacy]:"",[tt.DebugOverrideProxyUrlLegacy]:"",[tt.DebugTestOverrideCapiUrlLegacy]:"",[tt.DebugOverrideCapiUrlLegacy]:"",[tt.HookErrorOccurredStackTrace]:!1,[tt.NESUseExplicitRejection]:!1,[tt.AppendPromptTokenCache]:"",[tt.PromptPersistBasePath]:void 0,[tt.AnthropicMessagesEndpoint]:"",[tt.AnthropicThinkingEffort]:"unset",[tt.EnableMapCodeFallback]:"enabled",[tt.NESExtendedRange]:!1},DLe=new Map(Object.entries(C$i));for(let t of Object.values(tt))if(!DLe.has(t))throw new Error(`Missing config default value ${Cht}.${t}`);function vr(t,e){return t.get(Mc).getConfig(e)}a(vr,"getConfig");function LRr(t){return t.get(Mc).dumpForTelemetry()}a(LRr,"dumpForTelemetry");var Vo=class{constructor(){this.packageJson=tIt}static{a(this,"BuildInfo")}isProduction(){return this.getBuildType()!=="dev"}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getDisplayVersion(){return this.getBuildType()==="dev"?`${this.getVersion()}-dev`:this.getVersion()}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}};function Rht(t){return t.get(Vo).isProduction()}a(Rht,"isProduction");function H4e(t){return t.get(Vo).getBuildType()==="dev"}a(H4e,"isDevBuild");function pL(t){return t.get(Vo).getBuildType()}a(pL,"getBuildType");function FRr(t){return t.get(Vo).getBuild()}a(FRr,"getBuild");function qC(t){return t.get(Vo).getVersion()}a(qC,"getVersion");var Vs=class{constructor(e,r,n,o="none",s="desktop"){this.sessionId=e;this.machineId=r;this.devDeviceId=n;this.remoteName=o;this.uiKind=s}static{a(this,"EditorSession")}};function PC({name:t,version:e}){return`${t}/${e}`}a(PC,"formatNameAndVersion");var Dr=class{static{a(this,"EditorAndPluginInfo")}getCopilotIntegrationId(){}getEditorPluginSpecificFilters(){return[]}},OFr="2025-05-01";function sE(t){let e=t.get(Dr);return{"Editor-Version":PC(e.getEditorInfo()),"Editor-Plugin-Version":PC(e.getEditorPluginInfo()),"Copilot-Language-Server-Version":qC(t)}}a(sE,"editorVersionHeaders");var GI="Iv1.b507a08c87ecfe98",v$i="350ee525b5da0e4a54c6e8e043edc1b99cc02f19",nIt="Ov23liV9UpD7Rnfnskm3",b$i="5509a52e4c525cd594a6fba9147ff6cc2388dd9f",T$i={[GI]:v$i,[nIt]:b$i},Oc=class{static{a(this,"GitHubAppInfo")}findAppIdToAuthenticate(){return this.githubAppId??GI}findAppSecretToAuthenticate(){let e=this.findAppIdToAuthenticate(),r=T$i[e];if(!r)throw new Error(`GitHubAppInfo: No app secret found for app ID: ${e}`);return r}};var dr=class{static{a(this,"Fetcher")}getImplementation(){return this}};function PM(t,e,r,n,o,s,c,l,u,d,p,h){let m={...l,Authorization:`Bearer ${r}`,...sE(t)};d===void 0&&(m["Openai-Organization"]="github-copilot",m["X-Request-Id"]=o,m["VScode-SessionId"]=t.get(Vs).sessionId,m["VScode-MachineId"]=t.get(Vs).machineId,m["X-GitHub-Api-Version"]=OFr),n&&(m["OpenAI-Intent"]=n);let g={method:"POST",headers:m,json:s,timeout:u};p&&h&&p.logRequest({timestamp:new Date().toISOString(),requestId:o,method:"POST",url:e,headers:m,messages:h,body:s});let A=t.get(dr);if(c){let E=new AbortController;c.onCancellationRequested(()=>{st(t,"networking.cancelRequest",Pt.createAndMarkAsIssued({headerRequestId:o})),E.abort()}),g.signal=E.signal}return A.fetch(e,g).catch(E=>{if(S$i(E))return st(t,"networking.disconnectAll"),A.disconnectAll().then(()=>A.fetch(e,g));throw E})}a(PM,"postRequest");function S$i(t){return t instanceof Error?t.message=="ERR_HTTP2_GOAWAY_SESSION"?!0:"code"in t?t.code=="ECONNRESET"||t.code=="ETIMEDOUT"||t.code=="ERR_HTTP2_INVALID_SESSION":!1:!1}a(S$i,"isInterruptedNetworkError");var I$i=new Set(["ERR_WORKER_OUT_OF_MEMORY","ENOMEM"]);function x$i(t){return I$i.has(t.code??"")||t.name==="RangeError"&&t.message==="WebAssembly.Memory(): could not allocate memory"}a(x$i,"isOomError");function j8(t,e,r,n=Cr){if(!Y0(e)){if(e instanceof Error){let o=e;x$i(o)?t.get(Bs).setWarning("Out of memory"):o.code==="EMFILE"||o.code==="ENFILE"?t.get(Bs).setWarning("Too many open files"):o.code==="CopilotPromptLoadFailure"?t.get(Bs).setWarning("Corrupted Copilot installation"):`${o.code}`.startsWith("CopilotPromptWorkerExit")?t.get(Bs).setWarning("Worker unexpectedly exited"):o.syscall==="uv_cwd"&&o.code==="ENOENT"&&t.get(Bs).setWarning("Current working directory does not exist")}n.exception(t,e,r)}}a(j8,"handleException");function BFr(t){process.addListener("uncaughtException",r=>{j8(t,r,"uncaughtException")});let e=!1;process.addListener("unhandledRejection",r=>{if(!e)try{e=!0,j8(t,r,"unhandledRejection")}finally{e=!1}})}a(BFr,"registerDefaultHandlers");async function LFr(t){try{await tAe}catch(e){j8(t,e,"initializeTokenizers")}}a(LFr,"waitForTokenizers");f();var kM=require("fs"),FFr=require("os"),MLe=de(require("path")),jte=require("process");var Ti=class{static{a(this,"PersistenceManager")}},iIt=class extends Ti{constructor(r){super();this.directory=r}static{a(this,"FilePersistenceManager")}async read(r,n){try{return(await this.readJsonObject(r))[n]}catch{return}}async update(r,n,o){await kM.promises.mkdir(this.directory,{recursive:!0,mode:448});let s=`${this.directory}/${r}.json`,c=MLe.dirname(s);c!==this.directory&&await kM.promises.mkdir(c,{recursive:!0,mode:448});let l;try{l=await mAe.acquire(s);let u=await this.readJsonObject(r);u[n]=o,await kM.promises.writeFile(s,JSON.stringify(u)+` +`,{encoding:"utf8",mode:384})}finally{l&&await l()}}async delete(r,n){let o=`${this.directory}/${r}.json`,s;try{s=await mAe.acquire(o);let c=await this.readJsonObject(r);delete c[n];let l=JSON.stringify(c)+` `;l===`{} -`?await YM.promises.rm(o):await YM.promises.writeFile(o,l,{encoding:"utf8",mode:384})}catch{}finally{s&&await s()}}async deleteSetting(r){let n=`${this.directory}/${r}.json`,o;try{o=await Aye.acquire(n),await YM.promises.rm(n)}catch{}finally{o&&await o()}}async listSettings(){try{return(await YM.promises.readdir(this.directory)).filter(n=>n.endsWith(".json")).map(n=>n.slice(0,-5))}catch{return[]}}async listKeys(r){return Object.keys(await this.readJsonObject(r))}async readJsonObject(r){let n=`${this.directory}/${r}.json`;try{let o=await YM.promises.readFile(n,{encoding:"utf8"});return JSON.parse(o)}catch{return{}}}},Aye=class{static{a(this,"LockManager")}static{this.locks=new Map}static{this.DEFAULT_TIMEOUT_MS=1e4}static async acquire(e){await this.getLock(e);let r,n=new Promise(o=>{r=o});return this.locks.set(e,n),()=>Promise.resolve().then(()=>{r&&(r(),r=void 0,this.locks.get(e)===n&&this.locks.delete(e))})}static async getLock(e){let r=Date.now();for(;Date.now()-r{setTimeout(()=>{l(new Error("timeout"))},o)});try{await Promise.race([n,s])}catch{return}}}};function USt(){return Rre.env.XDG_CONFIG_HOME&&I8e.isAbsolute(Rre.env.XDG_CONFIG_HOME)?Rre.env.XDG_CONFIG_HOME+"/github-copilot":(0,U6r.platform)()==="win32"?Rre.env.USERPROFILE+"\\AppData\\Local\\github-copilot":Rre.env.HOME+"/.config/github-copilot"}a(USt,"getXdgConfigPath");function Q6r(){return new FSt(USt())}a(Q6r,"makeXdgPersistenceManager");f();f();f();var KM={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}};f();f();var q6r=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"],G6r={".php":[".blade"]},aj=Object.keys(KM).flatMap(t=>KM[t].extensions);var QSt=de(require("node:path"));var kre=class{constructor(e,r,n){this.languageId=e;this.isGuess=r;this.fileExtension=n}static{a(this,"Language")}},yye=class{static{a(this,"LanguageDetection")}},qSt=new Map,Pre=new Map;for(let[t,{extensions:e,filenames:r}]of Object.entries(KM)){for(let n of e)qSt.set(n,[...qSt.get(n)??[],t]);for(let n of r??[])Pre.set(n,[...Pre.get(n)??[],t])}var GSt=class extends yye{static{a(this,"FilenameAndExensionLanguageDetection")}detectLanguage(e){let r=ei(e.uri),n=QSt.extname(r).toLowerCase(),o=this.extensionWithoutTemplateLanguage(r,n),s=this.detectLanguageId(r,o),c=this.computeFullyQualifiedExtension(n,o);return s?new kre(s.languageId,s.isGuess,c):new kre(e.languageId,!0,c)}extensionWithoutTemplateLanguage(e,r){if(q6r.includes(r)){let n=e.substring(0,e.lastIndexOf(".")),o=QSt.extname(n).toLowerCase();if(o.length>0&&aj.includes(o)&&this.isExtensionValidForTemplateLanguage(r,o))return o}return r}isExtensionValidForTemplateLanguage(e,r){let n=G6r[e];return!n||n.includes(r)}detectLanguageId(e,r){if(Pre.has(e))return{languageId:Pre.get(e)[0],isGuess:!1};let n=qSt.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;e.includes(".");)if(e=e.replace(/\.[^.]*$/,""),Pre.has(e))return{languageId:Pre.get(e)[0],isGuess:!1}}computeFullyQualifiedExtension(e,r){return e!==r?r+e:e}},HSt=class extends yye{constructor(r){super();this.delegate=r}static{a(this,"GroupingLanguageDetection")}detectLanguage(r){let n=this.delegate.detectLanguage(r),o=n.languageId;return o==="c"||o==="cpp"?new kre("cpp",n.isGuess,n.fileExtension):n}},jSt=class extends yye{constructor(r){super();this.delegate=r}static{a(this,"ClientProvidedLanguageDetection")}detectLanguage(r){return r.uri.startsWith("untitled:")||r.uri.startsWith("vscode-notebook-cell:")?new kre(r.languageId,!0,""):this.delegate.detectLanguage(r)}},xHi=new HSt(new jSt(new GSt));function $P({uri:t,languageId:e}){let r=xHi.detectLanguage({uri:t,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?e:r.languageId}a($P,"detectLanguage");f();f();f();f();function l0(t){if(t.isCancellationRequested)throw new x8e}a(l0,"throwIfCancellationRequested");function Dx(t){return t instanceof x8e?!0:t instanceof Error&&t.name===$St&&t.message===$St}a(Dx,"isCancellationError");var x8e=class extends Error{static{a(this,"CancellationError")}constructor(){super($St),this.name=this.message}},$St="Canceled",w8e=class{constructor(){this.items=[]}static{a(this,"Stack")}push(e){this.items.push(e)}pop(){return this.items.pop()}peek(){return this.items[this.items.length-1]}tryPeek(){return this.items.length>0}toArray(){return this.items}};function cj(t){switch(t){case 0:case 2:case 7:case 8:case 11:case 12:case 13:case 14:return!0;default:return!1}}a(cj,"isTypeDefinition");var ll=class t{static{a(this,"TextRange")}static{this.empty=new t(0,0)}constructor(e,r){this.start=e,this.length=r}static fromBounds(e,r){return new t(e,r-e)}get end(){return this.start+this.length}contains(e){return this.start<=e&&this.end>=e}containsRange(e){return this.start<=e.start&&this.end>=e.end}equals(e){return this.start===e.start&&this.length===e.length}getText(e){return e.slice(this.start,this.end)}getTextWithIndentation(e,r){let n=[],o=this.start;for(o=j6r(e,e.length,o),H6r(n,r);on.endsWith(".json")).map(n=>n.slice(0,-5))}catch{return[]}}async listKeys(r){return Object.keys(await this.readJsonObject(r))}async readJsonObject(r){let n=`${this.directory}/${r}.json`;try{let o=await kM.promises.readFile(n,{encoding:"utf8"});return JSON.parse(o)}catch{return{}}}},mAe=class{static{a(this,"LockManager")}static{this.locks=new Map}static{this.DEFAULT_TIMEOUT_MS=1e4}static async acquire(e){await this.getLock(e);let r,n=new Promise(o=>{r=o});return this.locks.set(e,n),()=>Promise.resolve().then(()=>{r&&(r(),r=void 0,this.locks.get(e)===n&&this.locks.delete(e))})}static async getLock(e){let r=Date.now();for(;Date.now()-r{setTimeout(()=>{l(new Error("timeout"))},o)});try{await Promise.race([n,s])}catch{return}}}};function oIt(){return jte.env.XDG_CONFIG_HOME&&MLe.isAbsolute(jte.env.XDG_CONFIG_HOME)?jte.env.XDG_CONFIG_HOME+"/github-copilot":(0,FFr.platform)()==="win32"?jte.env.USERPROFILE+"\\AppData\\Local\\github-copilot":jte.env.HOME+"/.config/github-copilot"}a(oIt,"getXdgConfigPath");function UFr(){return new iIt(oIt())}a(UFr,"makeXdgPersistenceManager");f();f();f();var DM={abap:{extensions:[".abap"]},aspdotnet:{extensions:[".asax",".ascx",".ashx",".asmx",".aspx",".axd"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},BluespecSystemVerilog:{extensions:[".bsv"]},c:{extensions:[".c",".cats",".h",".h.in",".idc"]},csharp:{extensions:[".cake",".cs",".cs.pp",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cppm",".cxx",".h",".h++",".hh",".hpp",".hxx",".idl",".inc",".inl",".ino",".ipp",".ixx",".rc",".re",".tcc",".tpp",".txx",".i"]},cobol:{extensions:[".cbl",".ccp",".cob",".cobol",".cpy"]},css:{extensions:[".css",".wxss"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".edn",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},cuda:{extensions:[".cu",".cuh"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".containerfile",".dockerfile"],filenames:["Containerfile","Dockerfile"]},dotenv:{extensions:[".env"],filenames:[".env",".env.ci",".env.dev",".env.development",".env.development.local",".env.example",".env.local",".env.prod",".env.production",".env.sample",".env.staging",".env.test",".env.testing"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".html5",".inc",".jsp",".njk",".tpl",".twig",".wxml",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".app",".app.src",".erl",".es",".escript",".hrl",".xrl",".yrl"],filenames:["Emakefile","rebar.config","rebar.config.lock","rebar.lock"]},fsharp:{extensions:[".fs",".fsi",".fsx"]},go:{extensions:[".go"]},groovy:{extensions:[".gradle",".groovy",".grt",".gtpl",".gvy",".jenkinsfile"],filenames:["Jenkinsfile","Jenkinsfile"]},graphql:{extensions:[".gql",".graphql",".graphqls"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},hlsl:{extensions:[".cginc",".fx",".fxh",".hlsl",".hlsli"]},erb:{extensions:[".erb",".erb.deface",".rhtml"]},razor:{extensions:[".cshtml",".razor"]},haml:{extensions:[".haml",".haml.deface"]},handlebars:{extensions:[".handlebars",".hbs"]},haskell:{extensions:[".hs",".hs-boot",".hsc"]},ini:{extensions:[".cfg",".cnf",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".buckconfig",".coveragerc",".flake8",".pylintrc","HOSTS","buildozer.spec","hosts","pylintrc","vlcrc"]},json:{extensions:[".4DForm",".4DProject",".JSON-tmLanguage",".avsc",".geojson",".gltf",".har",".ice",".json",".json.example",".jsonl",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","MODULE.bazel.lock","Package.resolved","Pipfile.lock","bun.lock","composer.lock","deno.lock","flake.lock","mcmod.info"]},jsonc:{extensions:[".code-snippets",".code-workspace",".jsonc",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","argv.json","devcontainer.json","extensions.json","jsconfig.json","keybindings.json","language-configuration.json","launch.json","profiles.json","settings.json","tasks.json","tsconfig.json","tslint.json"]},java:{extensions:[".jav",".java",".jsh"]},javascript:{extensions:["._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".js",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib"],filenames:["Jakefile"]},julia:{extensions:[".jl"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".luau",".nse",".p8",".pd_lua",".rbxs",".rockspec",".wlua"],filenames:[".luacheckrc"]},makefile:{extensions:[".d",".mak",".make",".makefile",".mk",".mkfile"],filenames:["BSDmakefile","GNUmakefile","Kbuild","Makefile","Makefile.am","Makefile.boot","Makefile.frag","Makefile.in","Makefile.inc","Makefile.wat","makefile","makefile.sco","mkfile"]},markdown:{extensions:[".livemd",".markdown",".md",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr"]},"objective-c":{extensions:[".h",".m"]},"objective-cpp":{extensions:[".mm"]},php:{extensions:[".aw",".ctp",".fcgi",".inc",".install",".module",".php",".php3",".php4",".php5",".phps",".phpt",".theme"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"]},perl:{extensions:[".al",".cgi",".fcgi",".perl",".ph",".pl",".plx",".pm",".psgi",".t"],filenames:[".latexmkrc","Makefile.PL","Rexfile","ack","cpanfile","latexmkrc"]},powershell:{extensions:[".ps1",".psd1",".psm1"]},pug:{extensions:[".jade",".pug"]},python:{extensions:[".cgi",".codon",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".sage",".spec",".tac",".wsgi",".xpy"],filenames:[".gclient","DEPS","SConscript","SConstruct","wscript"]},r:{extensions:[".r",".rd",".rsx"],filenames:[".Rprofile","expr-dist"]},ruby:{extensions:[".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".prawn",".rabl",".rake",".rb",".rbi",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr"],filenames:[".irbrc",".pryrc",".simplecov","Appraisals","Berksfile","Brewfile","Buildfile","Capfile","Dangerfile","Deliverfile","Fastfile","Gemfile","Guardfile","Jarfile","Mavenfile","Podfile","Puppetfile","Rakefile","Snapfile","Steepfile","Thorfile","Vagrantfile","buildfile"]},rust:{extensions:[".rs",".rs.in"]},scss:{extensions:[".scss"]},sql:{extensions:[".cql",".ddl",".inc",".mysql",".prc",".sql",".tab",".udf",".viw"]},sass:{extensions:[".sass"]},scala:{extensions:[".kojo",".sbt",".sc",".scala"]},shellscript:{extensions:[".bash",".bats",".cgi",".command",".fcgi",".fish",".ksh",".sh",".sh.in",".tmux",".tool",".trigger",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_functions",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".envrc",".flaskenv",".kshrc",".login",".profile",".tmux.conf",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","tmux.conf","zlogin","zlogout","zprofile","zshenv","zshrc"]},slang:{extensions:[".fxc",".hlsl",".s",".slang",".slangh",".usf",".ush",".vfx"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},systemverilog:{extensions:[".sv",".svh",".vh"]},typescriptreact:{extensions:[".tsx"]},latex:{extensions:[".aux",".bbx",".cbx",".cls",".dtx",".ins",".lbx",".ltx",".mkii",".mkiv",".mkvi",".sty",".tex",".toc"]},typescript:{extensions:[".cts",".mts",".ts"]},verilog:{extensions:[".v",".veo"]},vim:{extensions:[".vba",".vim",".vimrc",".vmb"],filenames:[".exrc",".gvimrc",".nvimrc",".vimrc","_vimrc","gvimrc","nvimrc","vimrc"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".bas",".cls",".ctl",".frm",".vbs"]},vue:{extensions:[".nvue",".vue"]},xml:{extensions:[".adml",".admx",".ant",".axaml",".axml",".builds",".ccproj",".ccxml",".clixml",".cproject",".cscfg",".csdef",".csl",".csproj",".ct",".depproj",".dita",".ditamap",".ditaval",".dll.config",".dotsettings",".filters",".fsproj",".fxml",".glade",".gml",".gmx",".gpx",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mod",".mojo",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".plist",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".pubxml",".qhelp",".rdf",".res",".resx",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".svg",".sw",".targets",".tml",".typ",".ui",".urdf",".ux",".vbproj",".vcxproj",".vsixmanifest",".vssettings",".vstemplate",".vxml",".wixproj",".workflow",".wsdl",".wsf",".wxi",".wxl",".wxs",".x3d",".xacro",".xaml",".xib",".xlf",".xliff",".xmi",".xml",".xml.dist",".xmp",".xproj",".xsd",".xspec",".xul",".zcml"],filenames:[".classpath",".cproject",".project","App.config","NuGet.config","Settings.StyleCop","Web.Debug.config","Web.Release.config","Web.config","packages.config"]},xsl:{extensions:[".xsl",".xslt"]},yaml:{extensions:[".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]},legend:{extensions:[".pure"]}};f();f();var QFr=[".ejs",".erb",".haml",".hbs",".j2",".jinja",".jinja2",".liquid",".mustache",".njk",".php",".pug",".slim",".webc"],qFr={".php":[".blade"]},hH=Object.keys(DM).flatMap(t=>DM[t].extensions);var sIt=de(require("node:path"));var Vte=class{constructor(e,r,n){this.languageId=e;this.isGuess=r;this.fileExtension=n}static{a(this,"Language")}},gAe=class{static{a(this,"LanguageDetection")}},aIt=new Map,$te=new Map;for(let[t,{extensions:e,filenames:r}]of Object.entries(DM)){for(let n of e)aIt.set(n,[...aIt.get(n)??[],t]);for(let n of r??[])$te.set(n,[...$te.get(n)??[],t])}var cIt=class extends gAe{static{a(this,"FilenameAndExensionLanguageDetection")}detectLanguage(e){let r=Zn(e.uri),n=sIt.extname(r).toLowerCase(),o=this.extensionWithoutTemplateLanguage(r,n),s=this.detectLanguageId(r,o),c=this.computeFullyQualifiedExtension(n,o);return s?new Vte(s.languageId,s.isGuess,c):new Vte(e.languageId,!0,c)}extensionWithoutTemplateLanguage(e,r){if(QFr.includes(r)){let n=e.substring(0,e.lastIndexOf(".")),o=sIt.extname(n).toLowerCase();if(o.length>0&&hH.includes(o)&&this.isExtensionValidForTemplateLanguage(r,o))return o}return r}isExtensionValidForTemplateLanguage(e,r){let n=qFr[e];return!n||n.includes(r)}detectLanguageId(e,r){if($te.has(e))return{languageId:$te.get(e)[0],isGuess:!1};let n=aIt.get(r)??[];if(n.length>0)return{languageId:n[0],isGuess:n.length>1};for(;e.includes(".");)if(e=e.replace(/\.[^.]*$/,""),$te.has(e))return{languageId:$te.get(e)[0],isGuess:!1}}computeFullyQualifiedExtension(e,r){return e!==r?r+e:e}},lIt=class extends gAe{constructor(r){super();this.delegate=r}static{a(this,"GroupingLanguageDetection")}detectLanguage(r){let n=this.delegate.detectLanguage(r),o=n.languageId;return o==="c"||o==="cpp"?new Vte("cpp",n.isGuess,n.fileExtension):n}},uIt=class extends gAe{constructor(r){super();this.delegate=r}static{a(this,"ClientProvidedLanguageDetection")}detectLanguage(r){return r.uri.startsWith("untitled:")||r.uri.startsWith("vscode-notebook-cell:")?new Vte(r.languageId,!0,""):this.delegate.detectLanguage(r)}},w$i=new lIt(new uIt(new cIt));function NP({uri:t,languageId:e}){let r=w$i.detectLanguage({uri:t,languageId:"UNKNOWN"});return r.languageId==="UNKNOWN"?e:r.languageId}a(NP,"detectLanguage");f();f();f();f();function i0(t){if(t.isCancellationRequested)throw new OLe}a(i0,"throwIfCancellationRequested");function vx(t){return t instanceof OLe?!0:t instanceof Error&&t.name===dIt&&t.message===dIt}a(vx,"isCancellationError");var OLe=class extends Error{static{a(this,"CancellationError")}constructor(){super(dIt),this.name=this.message}},dIt="Canceled",BLe=class{constructor(){this.items=[]}static{a(this,"Stack")}push(e){this.items.push(e)}pop(){return this.items.pop()}peek(){return this.items[this.items.length-1]}tryPeek(){return this.items.length>0}toArray(){return this.items}};function mH(t){switch(t){case 0:case 2:case 7:case 8:case 11:case 12:case 13:case 14:return!0;default:return!1}}a(mH,"isTypeDefinition");var rl=class t{static{a(this,"TextRange")}static{this.empty=new t(0,0)}constructor(e,r){this.start=e,this.length=r}static fromBounds(e,r){return new t(e,r-e)}get end(){return this.start+this.length}contains(e){return this.start<=e&&this.end>=e}containsRange(e){return this.start<=e.start&&this.end>=e.end}equals(e){return this.start===e.start&&this.length===e.length}getText(e){return e.slice(this.start,this.end)}getTextWithIndentation(e,r){let n=[],o=this.start;for(o=HFr(e,e.length,o),GFr(n,r);o0||u>0||d>0||p>0?new ET(r,"","",ll.fromBounds(s,c),ll.fromBounds(d,p),ll.fromBounds(h,m),y,t.kindFromString(g),0):null;if(E){t.updateScopesForSymbol(e,E);let _=E.nameRange.getText(n),v=this.createNameFromScopes(n,e.toArray());return v=A?`${A}.${v}`:v,new ET(r,v,_.substring(_.lastIndexOf(".")+1),E.commentRange,E.nameRange,E.bodyRange,E.extentRange,E.kind,0)}return null}static updateScopesForSymbol(e,r){for(;e.tryPeek()&&!e.peek()?.extentRange.containsRange(r.extentRange);)e.pop();e.push(r)}static kindFromString(e){switch(e){case"definition.class":return 0;case"definition.constant":return 1;case"definition.enum_variant":return 3;case"definition.enum":return 2;case"definition.field":return 4;case"definition.function":return 5;case"definition.implementation":return 6;case"definition.interface":return 7;case"definition.macro":return 8;case"definition.method":return 9;case"import.module":case"definition.module":case"definition.module.filescoped":return 10;case"definition.struct":return 11;case"definition.trait":return 12;case"definition.type":return 13;case"definition.union":return 14;case"reference":return 16;case"wildcard":return 18;case"alias":return 19;case"import":return 17;default:throw new Error("NotSupportedException")}}cleanQuotedString(e){return e.replace(/^(['"])(.*)\1$/,"$2")}};var R8e=class extends u0{static{a(this,"GoSymbolExtractor")}get languageId(){return"go"}extractSymbols(e,r){return this.executeQuery(e,r,wHi)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},P8e=class extends u0{static{a(this,"GoReferenceExtractor")}get languageId(){return"go"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}extractReferences(e,r){return this.executeQuery(e,r,PHi)}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,kHi),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},k8e=class extends u0{static{a(this,"GoImportExtractor")}get languageId(){return"go"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){let n=await this.findMatches(r,RHi),o=new Set;try{n.matches.forEach(s=>{let c,l,u;for(let d of s.captures)d.name==="import.name"?c=d:d.name==="alias"?l=d:d.name==="import"&&(u=d);if(c&&u){let d=this.cleanQuotedString(c.node.text),p=c.node.startIndex+1,h=c.node.endIndex-1,m=l?new ll(l.node.startIndex,l.node.endIndex-l.node.startIndex):new ll(p,h-p),g=new ll(u.node.startIndex,u.node.endIndex-u.node.startIndex),A=ll.empty,y=ll.empty,E=d.substring(d.lastIndexOf("/")+1);o.add(new ET(e,d,E,A,m,y,g,17,0))}})}finally{n.tree.delete()}return o.size>0?[...o]:[]}},wHi=` +`),o=HFr(e,e.length,++o),GFr(n,r)):o++;return n.join("")}};function GFr(t,e){for(let r=0;r0||u>0||d>0||p>0?new cT(r,"","",rl.fromBounds(s,c),rl.fromBounds(d,p),rl.fromBounds(h,m),y,t.kindFromString(g),0):null;if(E){t.updateScopesForSymbol(e,E);let _=E.nameRange.getText(n),v=this.createNameFromScopes(n,e.toArray());return v=A?`${A}.${v}`:v,new cT(r,v,_.substring(_.lastIndexOf(".")+1),E.commentRange,E.nameRange,E.bodyRange,E.extentRange,E.kind,0)}return null}static updateScopesForSymbol(e,r){for(;e.tryPeek()&&!e.peek()?.extentRange.containsRange(r.extentRange);)e.pop();e.push(r)}static kindFromString(e){switch(e){case"definition.class":return 0;case"definition.constant":return 1;case"definition.enum_variant":return 3;case"definition.enum":return 2;case"definition.field":return 4;case"definition.function":return 5;case"definition.implementation":return 6;case"definition.interface":return 7;case"definition.macro":return 8;case"definition.method":return 9;case"import.module":case"definition.module":case"definition.module.filescoped":return 10;case"definition.struct":return 11;case"definition.trait":return 12;case"definition.type":return 13;case"definition.union":return 14;case"reference":return 16;case"wildcard":return 18;case"alias":return 19;case"import":return 17;default:throw new Error("NotSupportedException")}}cleanQuotedString(e){return e.replace(/^(['"])(.*)\1$/,"$2")}};var LLe=class extends o0{static{a(this,"GoSymbolExtractor")}get languageId(){return"go"}extractSymbols(e,r){return this.executeQuery(e,r,R$i)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},FLe=class extends o0{static{a(this,"GoReferenceExtractor")}get languageId(){return"go"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}extractReferences(e,r){return this.executeQuery(e,r,k$i)}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,D$i),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},ULe=class extends o0{static{a(this,"GoImportExtractor")}get languageId(){return"go"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){let n=await this.findMatches(r,P$i),o=new Set;try{n.matches.forEach(s=>{let c,l,u;for(let d of s.captures)d.name==="import.name"?c=d:d.name==="alias"?l=d:d.name==="import"&&(u=d);if(c&&u){let d=this.cleanQuotedString(c.node.text),p=c.node.startIndex+1,h=c.node.endIndex-1,m=l?new rl(l.node.startIndex,l.node.endIndex-l.node.startIndex):new rl(p,h-p),g=new rl(u.node.startIndex,u.node.endIndex-u.node.startIndex),A=rl.empty,y=rl.empty,E=d.substring(d.lastIndexOf("/")+1);o.add(new cT(e,d,E,A,m,y,g,17,0))}})}finally{n.tree.delete()}return o.size>0?[...o]:[]}},R$i=` ( ((comment)* @comment) . @@ -1775,7 +1764,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la . (field_declaration name: (_) @name) @definition.field ) -`,RHi=` +`,P$i=` (import_declaration (import_spec name: (package_identifier)? @alias @@ -1786,15 +1775,15 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (import_spec name: (package_identifier)? @alias path: (interpreted_string_literal) @import.name))+) @import -`,PHi=` +`,k$i=` (call_expression function: (_) @name) @reference (type_identifier) @reference -`,kHi=` +`,D$i=` (call_expression function: (_) @name) @reference (type_identifier) @reference -`;f();var D8e=class extends u0{static{a(this,"JavaSymbolExtractor")}get languageId(){return"java"}extractSymbols(e,r){return this.executeQuery(e,r,NHi)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},M8e=class extends u0{static{a(this,"JavaReferenceExtractor")}get languageId(){return"java"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}extractReferences(e,r){return this.executeQuery(e,r,MHi)}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,OHi),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},O8e=class extends u0{static{a(this,"JavaImportExtractor")}get languageId(){return"java"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){return(await this.executeQuery(e,r,DHi)).filter(o=>o.kind===0)}},NHi=` +`;f();var qLe=class extends o0{static{a(this,"JavaSymbolExtractor")}get languageId(){return"java"}extractSymbols(e,r){return this.executeQuery(e,r,N$i)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},GLe=class extends o0{static{a(this,"JavaReferenceExtractor")}get languageId(){return"java"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}extractReferences(e,r){return this.executeQuery(e,r,O$i)}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,B$i),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},HLe=class extends o0{static{a(this,"JavaImportExtractor")}get languageId(){return"java"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){return(await this.executeQuery(e,r,M$i)).filter(o=>o.kind===0)}},N$i=` ( [ (block_comment) @comment @@ -1857,7 +1846,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la . (enum_constant name: (identifier) @name) @definition.enum_variant ) -`,DHi=` +`,M$i=` ( [ ((line_comment)* @comment) @@ -1869,19 +1858,19 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (asterisk)? @wildcard ) @definition.class ) -`,MHi=` +`,O$i=` (method_invocation name: (identifier) @name ) @reference (type_identifier) @reference -`,OHi=` +`,B$i=` (method_invocation name: (identifier) @name ) @reference (type_identifier) @reference -`;f();var BHi=new Set(["null","undefined","void","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),B8e=class extends u0{static{a(this,"JavaScriptSymbolExtractor")}get languageId(){return"javascript"}extractSymbols(e,r){return this.executeQuery(e,r,LHi)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},L8e=class extends u0{static{a(this,"JavaScriptReferenceExtractor")}extractLocalReferences(e,r,n){throw new Error("Method not implemented.")}get languageId(){return"javascript"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,FHi)).filter(o=>!BHi.has(o.unqualifiedName))}};var LHi=` +`;f();var L$i=new Set(["null","undefined","void","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),jLe=class extends o0{static{a(this,"JavaScriptSymbolExtractor")}get languageId(){return"javascript"}extractSymbols(e,r){return this.executeQuery(e,r,F$i)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},$Le=class extends o0{static{a(this,"JavaScriptReferenceExtractor")}extractLocalReferences(e,r,n){throw new Error("Method not implemented.")}get languageId(){return"javascript"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,U$i)).filter(o=>!L$i.has(o.unqualifiedName))}};var F$i=` ( ((comment)* @comment) . @@ -1891,9 +1880,9 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (export_statement declaration: (lexical_declaration (variable_declarator name: (identifier) @name value: (_) @body))) @definition.function ] ) -`,FHi=` +`,U$i=` (call_expression function: (_) @name) @reference -`;f();var UHi=new Set(["int","str","float","bool","list","dict","tuple","set"]),F8e=class extends u0{static{a(this,"PythonSymbolExtractor")}get languageId(){return"python"}extractSymbols(e,r){return this.executeQuery(e,r,QHi)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},U8e=class extends u0{static{a(this,"PythonReferenceExtractor")}get languageId(){return"python"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,qHi)).filter(o=>!UHi.has(o.unqualifiedName))}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,HHi),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},Q8e=class extends u0{static{a(this,"PythonImportExtractor")}get languageId(){return"python"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){let n=await this.findMatches(r,GHi),o=new Set;try{n.matches.forEach(s=>{let c,l,u,d;for(let p of s.captures)p.name==="import.name"?c=p:p.name==="import.module"?u=p:p.name==="alias"?l=p:p.name==="import"&&(d=p);if(u&&d){let p=c||u,h=l?new ll(l.node.startIndex,l.node.endIndex-l.node.startIndex):new ll(p.node.startIndex,d.node.endIndex-p.node.endIndex),m=new ll(d.node.startIndex,d.node.endIndex-d.node.startIndex),g=ll.empty,A=ll.empty,y=p.node.text,E=y.split(".").pop()||y,_;c?_=`${u.node.text}.${c.node.text}`:_=u.node.text,o.add(new ET(e,_,E,g,h,A,m,17,0))}})}finally{n.tree.delete()}return o.size>0?[...o]:[]}},QHi=` +`;f();var Q$i=new Set(["int","str","float","bool","list","dict","tuple","set"]),VLe=class extends o0{static{a(this,"PythonSymbolExtractor")}get languageId(){return"python"}extractSymbols(e,r){return this.executeQuery(e,r,q$i)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},WLe=class extends o0{static{a(this,"PythonReferenceExtractor")}get languageId(){return"python"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,G$i)).filter(o=>!Q$i.has(o.unqualifiedName))}async extractLocalReferences(e,r,n){let o=await this.executeQuery(e,r,j$i),s=o.filter(u=>u.kind!==9),c=o.filter(u=>u.kind===9&&u.extentRange.containsRange(n)),l=[];for(let u of c)l.push(...s.filter(d=>u.extentRange.containsRange(d.extentRange)));return l}},zLe=class extends o0{static{a(this,"PythonImportExtractor")}get languageId(){return"python"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractSymbols(e,r){let n=await this.findMatches(r,H$i),o=new Set;try{n.matches.forEach(s=>{let c,l,u,d;for(let p of s.captures)p.name==="import.name"?c=p:p.name==="import.module"?u=p:p.name==="alias"?l=p:p.name==="import"&&(d=p);if(u&&d){let p=c||u,h=l?new rl(l.node.startIndex,l.node.endIndex-l.node.startIndex):new rl(p.node.startIndex,d.node.endIndex-p.node.endIndex),m=new rl(d.node.startIndex,d.node.endIndex-d.node.startIndex),g=rl.empty,A=rl.empty,y=p.node.text,E=y.split(".").pop()||y,_;c?_=`${u.node.text}.${c.node.text}`:_=u.node.text,o.add(new cT(e,_,E,g,h,A,m,17,0))}})}finally{n.tree.delete()}return o.size>0?[...o]:[]}},q$i=` ( ((comment)* @comment) . @@ -1905,7 +1894,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la . (function_definition name: (_) @name body: (_) @body) @definition.method ) -`,qHi=` +`,G$i=` (call function: (_) @name) @reference (type [ @@ -1914,7 +1903,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la ]) @reference (class_definition superclasses: (argument_list (identifier) @name)) @reference -`,GHi=` +`,H$i=` (import_statement name: (dotted_name) @import.module) @import (import_from_statement @@ -1929,7 +1918,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (aliased_import name: ((dotted_name) @import.name) alias: (identifier) @alias)) @import -`,HHi=` +`,j$i=` (call function: (_) @name) @reference (type [ @@ -1938,7 +1927,7 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la ]) @reference (class_definition superclasses: (argument_list (identifier) @name)) @reference -`;f();var jHi=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),Nre=class extends u0{static{a(this,"TypeScriptSymbolExtractor")}get languageId(){return"typescript"}extractSymbols(e,r){return this.executeQuery(e,r,$Hi)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},Dre=class extends u0{static{a(this,"TypeScriptReferenceExtractor")}get languageId(){return"typescript"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,VHi)).filter(o=>!jHi.has(o.unqualifiedName))}extractLocalReferences(){return Promise.reject(new Error("Method not implemented."))}};var $Hi=` +`;f();var $$i=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),Wte=class extends o0{static{a(this,"TypeScriptSymbolExtractor")}get languageId(){return"typescript"}extractSymbols(e,r){return this.executeQuery(e,r,V$i)}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},zte=class extends o0{static{a(this,"TypeScriptReferenceExtractor")}get languageId(){return"typescript"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){return(await this.executeQuery(e,r,W$i)).filter(o=>!$$i.has(o.unqualifiedName))}extractLocalReferences(){return Promise.reject(new Error("Method not implemented."))}};var V$i=` ( ((comment)* @comment) . @@ -1963,13 +1952,13 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la (variable_declarator name: (identifier) @name type: (type_annotation (type_identifier))) ] ) -`,VHi=` +`,W$i=` (call_expression function: (_) @name) @reference (type_identifier) @name @reference (new_expression constructor: (identifier) @name) @reference -`;f();var WHi=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),q8e=class extends Nre{static{a(this,"TypeScriptReactSymbolExtractor")}get languageId(){return"typescriptreact"}extractSymbols(e,r){return Promise.all([this.executeQuery(e,r,zHi),super.extractSymbols(e,r)]).then(([n,o])=>[...n,...o])}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},G8e=class extends Dre{static{a(this,"TypeScriptReactReferenceExtractor")}get languageId(){return"typescriptreact"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){let[n,o]=await Promise.all([this.executeQuery(e,r,YHi),super.extractReferences(e,r)]);return[...n.filter(s=>!WHi.has(s.unqualifiedName)),...o]}},zHi=` +`;f();var z$i=new Set(["string","number","boolean","null","undefined","void","any","never","object","symbol","bigint","Array","Promise","Date","RegExp","Map","Set"]),YLe=class extends Wte{static{a(this,"TypeScriptReactSymbolExtractor")}get languageId(){return"typescriptreact"}extractSymbols(e,r){return Promise.all([this.executeQuery(e,r,Y$i),super.extractSymbols(e,r)]).then(([n,o])=>[...n,...o])}createNameFromScopes(e,r){return r.map(n=>n.nameRange.getText(e)).join(".")}},KLe=class extends zte{static{a(this,"TypeScriptReactReferenceExtractor")}get languageId(){return"typescriptreact"}createNameFromScopes(e,r){return r.length>0?r[r.length-1].nameRange.getText(e):""}async extractReferences(e,r){let[n,o]=await Promise.all([this.executeQuery(e,r,K$i),super.extractReferences(e,r)]);return[...n.filter(s=>!z$i.has(s.unqualifiedName)),...o]}},Y$i=` ( ((comment)* @comment) . @@ -1982,52 +1971,52 @@ ${r}+- `:"";return e+this.description+o}}},oh=class{constructor(e,r,n,o){this.la body: (_) @body))) @definition.function ] ) -`,YHi=` +`,K$i=` (jsx_element open_tag: (jsx_opening_element name: (_) @name) close_tag: (jsx_closing_element) ) @reference (jsx_self_closing_element name: (_) @name) @reference (import_specifier name:(identifier) @name) @reference -`;var Eye=[{symbolExtractor:new D8e,referenceExtractor:new M8e,importExtractor:new O8e,languageId:"java"},{symbolExtractor:new R8e,referenceExtractor:new P8e,importExtractor:new k8e,languageId:"go"},{symbolExtractor:new F8e,referenceExtractor:new U8e,importExtractor:new Q8e,languageId:"python"},{symbolExtractor:new Nre,referenceExtractor:new Dre,languageId:"typescript"},{symbolExtractor:new q8e,referenceExtractor:new G8e,languageId:"typescriptreact"},{symbolExtractor:new B8e,referenceExtractor:new L8e,languageId:"javascript"}];function $6r(t){let e=$P({uri:t});if(e&&Eye.some(r=>e===r.languageId))return e}a($6r,"getSupportedLanguageIdForMultiLanguageProvider");var V6r=new Map(Eye.map(t=>[t.languageId,t.referenceExtractor])),W6r=new Map(Eye.map(t=>[t.languageId,t.symbolExtractor])),z6r=new Map(Eye.filter(t=>t.importExtractor!==void 0).map(t=>[t.languageId,t.importExtractor])),VSt=Eye.map(t=>KM[t.languageId].extensions).flat();f();f();f();f();f();f();f();f();f();function WSt(t,e,r){return{type:"virtual",indentation:t,subs:e,label:r}}a(WSt,"virtualNode");function Y6r(t,e,r,n,o){if(r==="")throw new Error("Cannot create a line node with an empty source line");return{type:"line",indentation:t,lineNumber:e,sourceLine:r,subs:n,label:o}}a(Y6r,"lineNode");function zSt(t){return{type:"blank",lineNumber:t,subs:[]}}a(zSt,"blankNode");function H8e(t){return{type:"top",indentation:-1,subs:t??[]}}a(H8e,"topNode");function ym(t){return t.type==="blank"}a(ym,"isBlank");function lj(t){return t.type==="line"}a(lj,"isLine");function uj(t){return t.type==="virtual"}a(uj,"isVirtual");f();function K6r(t,e){return Og(t,r=>{r.label=r.label?e(r.label)?void 0:r.label:void 0},"bottomUp"),t}a(K6r,"clearLabelsIf");function dj(t,e){switch(t.type){case"line":case"virtual":{let r=t.subs.map(n=>dj(n,e));return{...t,subs:r,label:t.label?e(t.label):void 0}}case"blank":return{...t,label:t.label?e(t.label):void 0};case"top":return{...t,subs:t.subs.map(r=>dj(r,e)),label:t.label?e(t.label):void 0}}}a(dj,"mapLabels");function Og(t,e,r){function n(o){r==="topDown"&&e(o),o.subs.forEach(s=>{n(s)}),r==="bottomUp"&&e(o)}a(n,"_visit"),n(t)}a(Og,"visitTree");function YSt(t,e,r,n){let o=e;function s(c){o=r(c,o)}return a(s,"visitor"),Og(t,s,n),o}a(YSt,"foldTree");function j8e(t,e,r){let n=a(s=>{if(r!==void 0&&r(s))return s;{let c=s.subs.map(n).filter(l=>l!==void 0);return s.subs=c,e(s)}},"rebuild"),o=n(t);return o!==void 0?o:H8e()}a(j8e,"rebuildTree");f();function JHi(t){let e=t.split(` -`),r=e.map(d=>d.match(/^\s*/)[0].length),n=e.map(d=>d.trimLeft());function o(d){let[p,h]=s(d+1,r[d]);return[Y6r(r[d],d,n[d],p),h]}a(o,"parseNode");function s(d,p){let h,m=[],g=d,A;for(;gp);)if(n[g]==="")A===void 0&&(A=g),g+=1;else{if(A!==void 0){for(let y=A;ys.matches(n.sourceLine));o&&(n.label=o.label)}}a(r,"visitor"),Og(t,r,"bottomUp")}a(Cye,"labelLines");function $8e(t){function e(r){if(uj(r)&&r.label===void 0){let n=r.subs.filter(o=>!ym(o));n.length===1&&(r.label=n[0].label)}}a(e,"visitor"),Og(t,e,"bottomUp")}a($8e,"labelVirtualInherited");function _ye(t){return Object.keys(t).map(e=>{let r;return t[e].test?r=a(n=>t[e].test(n),"matches"):r=t[e],{matches:r,label:e}})}a(_ye,"buildLabelRules");function KSt(t){let r=j8e(t,a(function(n){if(n.subs.length===0||n.subs.findIndex(c=>c.label==="closer"||c.label==="opener")===-1)return n;let o=[],s;for(let c=0;cu.subs.push(d)),l.subs=[];else if(l.label==="closer"&&s!==void 0&&(lj(l)||uj(l))&&l.indentation>=s.indentation){let d=o.length-1;for(;d>0&&ym(o[d]);)d-=1;if(s.subs.push(...o.splice(d+1)),l.subs.length>0){let p=s.subs.findIndex(A=>A.label!=="newVirtual"),h=s.subs.slice(0,p),m=s.subs.slice(p),g=m.length>0?[WSt(l.indentation,m,"newVirtual")]:[];s.subs=[...h,...g,l]}else s.subs.push(l)}else o.push(l),ym(l)||(s=l)}return n.subs=o,n},"rebuilder"));return K6r(t,n=>n==="newVirtual"),r}a(KSt,"combineClosersAndOpeners");function J6r(t,e=ym,r){return j8e(t,a(function(o){if(o.subs.length<=1)return o;let s=[],c=[],l,u=!1;function d(p=!1){if(l!==void 0&&(s.length>0||!p)){let h=WSt(l,c,r);s.push(h)}else c.forEach(h=>s.push(h))}a(d,"flushBlockIntoNewSubs");for(let p=0;p{if(r.label==="class"||r.label==="interface")for(let n of r.subs)!ym(n)&&(n.label===void 0||n.label==="annotation")&&(n.label="member")},"bottomUp"),e}a(Z6r,"processJava");f();var rji={heading:/^# /,subheading:/^## /,subsubheading:/### /},nji=_ye(rji);function eFr(t){let e=t;if(Cye(e,nji),ym(e))return e;function r(s){if(s.label==="heading")return 1;if(s.label==="subheading")return 2;if(s.label==="subsubheading")return 3}a(r,"headingLevel");let n=[e],o=[...e.subs];e.subs=[];for(let s of o){let c=r(s);if(c===void 0||ym(s))n[n.length-1].subs.push(s);else{for(;n.lengthc+1;)n.pop()}}return e=J6r(e),e=fj(e),$8e(e),e}a(eFr,"processMarkdown");f();function tFr(t){return" ".repeat(t.indentation)+t.sourceLine+` -`}a(tFr,"deparseLine");JSt("markdown",eFr);JSt("java",Z6r);var iji={worthUp:.9,worthSibling:.88,worthDown:.8};function XSt(t,e,r=wo(),n=iji){let o=dj(t,s=>s?1:void 0);return Og(o,s=>{if(ym(s))return;let c=s.subs.reduce((l,u)=>Math.max(l,u.label??0),0);s.label=Math.max(s.label??0,c*n.worthUp)},"bottomUp"),Og(o,s=>{if(ym(s))return;let c=s.subs.map(d=>d.label??0),l=[...c];for(let d=0;dMath.max(p,Math.pow(n.worthSibling,Math.abs(d-h))*c[d])));let u=s.label;u!==void 0&&(l=l.map(d=>Math.max(d,n.worthDown*u))),s.subs.forEach((d,p)=>d.label=l[p])},"topDown"),oji(o,e,r)}a(XSt,"fromTreeWithFocussedLines");function oji(t,e,r=wo()){let n=YSt(t,[],(o,s)=>((o.type==="line"||o.type==="blank")&&s.push(o.type==="line"?[tFr(o).trimEnd(),o.label??0]:["",o.label??0]),s),"topDown");return new nr(n,e,r)}a(oji,"fromTreeWithValuedLines");function U1(t,e=!0,r=!0,n,o=wo()){let s=typeof t=="string"?pj(t):pj(t.source,t.languageId);fj(s);let c=dj(s,l=>e&&l!=="closer");return Og(c,l=>{l.label===void 0&&(l.label=e&&l.label!==!1)},"topDown"),e&&Og(c,l=>{if(l.label){let u=!1;for(let d of[...l.subs].reverse())d.label&&!u?u=!0:d.label=!1}else for(let u of l.subs)u.label=!1;l.subs.length>0&&(l.label=!1)},"topDown"),r&&Og(c,l=>{l.label||=(lj(l)||ym(l))&&l.lineNumber==0},"topDown"),XSt(c,n,o)}a(U1,"elidableTextForSourceCode");f();var vye=class t{constructor(e,r,n,o="strict",s){this.text=e;this._value=r;this._cost=n;this.metadata=s;this.markedForRemoval=!1;if(e.includes(` -`)&&o!=="none")throw new Error("LineWithValueAndCost: text contains newline");if(r<0&&o!=="none")throw new Error("LineWithValueAndCost: value is negative");if(n<0&&o!=="none")throw new Error("LineWithValueAndCost: cost is negative");if(o=="strict"&&r>1)throw new Error("Value should normally be between 0 and 1 -- set validation to `loose` to ignore this error")}static{a(this,"LineWithValueAndCost")}get value(){return this._value}get cost(){return this._cost}adjustValue(e){return this._value*=e,this}setValue(e){return this._value=e,this}recost(e=r=>wo().tokenLength(r+` -`)){return this._cost=e(this.text),this}copy(){let e=new t(this.text,this.value,this.cost,"none",this.metadata);return e.markedForRemoval=this.markedForRemoval,e}};var nr=class t{constructor(e,r,n=wo()){this.metadata=r;this.tokenizer=n;this.lines=[];let o=[];for(let s of e){let c=Array.isArray(s)?s[1]:1,l=Array.isArray(s)?s[0]:s;typeof l=="string"?l.split(` -`).forEach(u=>o.push(new vye(u,c,n.tokenLength(u+` -`),"strict",this.metadata))):l instanceof t?l.lines.forEach(u=>o.push(u.copy().adjustValue(c))):"source"in l&&"languageId"in l&&U1(l).lines.forEach(u=>o.push(u.copy().adjustValue(c)))}this.lines=o}static{a(this,"ElidableText")}adjust(e){this.lines.forEach(r=>r.adjustValue(e))}recost(e=r=>wo().tokenLength(r+` +`;var AAe=[{symbolExtractor:new qLe,referenceExtractor:new GLe,importExtractor:new HLe,languageId:"java"},{symbolExtractor:new LLe,referenceExtractor:new FLe,importExtractor:new ULe,languageId:"go"},{symbolExtractor:new VLe,referenceExtractor:new WLe,importExtractor:new zLe,languageId:"python"},{symbolExtractor:new Wte,referenceExtractor:new zte,languageId:"typescript"},{symbolExtractor:new YLe,referenceExtractor:new KLe,languageId:"typescriptreact"},{symbolExtractor:new jLe,referenceExtractor:new $Le,languageId:"javascript"}];function jFr(t){let e=NP({uri:t});if(e&&AAe.some(r=>e===r.languageId))return e}a(jFr,"getSupportedLanguageIdForMultiLanguageProvider");var $Fr=new Map(AAe.map(t=>[t.languageId,t.referenceExtractor])),VFr=new Map(AAe.map(t=>[t.languageId,t.symbolExtractor])),WFr=new Map(AAe.filter(t=>t.importExtractor!==void 0).map(t=>[t.languageId,t.importExtractor])),fIt=AAe.map(t=>DM[t.languageId].extensions).flat();f();f();f();f();f();f();f();f();f();function pIt(t,e,r){return{type:"virtual",indentation:t,subs:e,label:r}}a(pIt,"virtualNode");function zFr(t,e,r,n,o){if(r==="")throw new Error("Cannot create a line node with an empty source line");return{type:"line",indentation:t,lineNumber:e,sourceLine:r,subs:n,label:o}}a(zFr,"lineNode");function hIt(t){return{type:"blank",lineNumber:t,subs:[]}}a(hIt,"blankNode");function JLe(t){return{type:"top",indentation:-1,subs:t??[]}}a(JLe,"topNode");function cm(t){return t.type==="blank"}a(cm,"isBlank");function gH(t){return t.type==="line"}a(gH,"isLine");function AH(t){return t.type==="virtual"}a(AH,"isVirtual");f();function YFr(t,e){return xg(t,r=>{r.label=r.label?e(r.label)?void 0:r.label:void 0},"bottomUp"),t}a(YFr,"clearLabelsIf");function yH(t,e){switch(t.type){case"line":case"virtual":{let r=t.subs.map(n=>yH(n,e));return{...t,subs:r,label:t.label?e(t.label):void 0}}case"blank":return{...t,label:t.label?e(t.label):void 0};case"top":return{...t,subs:t.subs.map(r=>yH(r,e)),label:t.label?e(t.label):void 0}}}a(yH,"mapLabels");function xg(t,e,r){function n(o){r==="topDown"&&e(o),o.subs.forEach(s=>{n(s)}),r==="bottomUp"&&e(o)}a(n,"_visit"),n(t)}a(xg,"visitTree");function mIt(t,e,r,n){let o=e;function s(c){o=r(c,o)}return a(s,"visitor"),xg(t,s,n),o}a(mIt,"foldTree");function XLe(t,e,r){let n=a(s=>{if(r!==void 0&&r(s))return s;{let c=s.subs.map(n).filter(l=>l!==void 0);return s.subs=c,e(s)}},"rebuild"),o=n(t);return o!==void 0?o:JLe()}a(XLe,"rebuildTree");f();function X$i(t){let e=t.split(` +`),r=e.map(d=>d.match(/^\s*/)[0].length),n=e.map(d=>d.trimLeft());function o(d){let[p,h]=s(d+1,r[d]);return[zFr(r[d],d,n[d],p),h]}a(o,"parseNode");function s(d,p){let h,m=[],g=d,A;for(;gp);)if(n[g]==="")A===void 0&&(A=g),g+=1;else{if(A!==void 0){for(let y=A;ys.matches(n.sourceLine));o&&(n.label=o.label)}}a(r,"visitor"),xg(t,r,"bottomUp")}a(yAe,"labelLines");function ZLe(t){function e(r){if(AH(r)&&r.label===void 0){let n=r.subs.filter(o=>!cm(o));n.length===1&&(r.label=n[0].label)}}a(e,"visitor"),xg(t,e,"bottomUp")}a(ZLe,"labelVirtualInherited");function EAe(t){return Object.keys(t).map(e=>{let r;return t[e].test?r=a(n=>t[e].test(n),"matches"):r=t[e],{matches:r,label:e}})}a(EAe,"buildLabelRules");function gIt(t){let r=XLe(t,a(function(n){if(n.subs.length===0||n.subs.findIndex(c=>c.label==="closer"||c.label==="opener")===-1)return n;let o=[],s;for(let c=0;cu.subs.push(d)),l.subs=[];else if(l.label==="closer"&&s!==void 0&&(gH(l)||AH(l))&&l.indentation>=s.indentation){let d=o.length-1;for(;d>0&&cm(o[d]);)d-=1;if(s.subs.push(...o.splice(d+1)),l.subs.length>0){let p=s.subs.findIndex(A=>A.label!=="newVirtual"),h=s.subs.slice(0,p),m=s.subs.slice(p),g=m.length>0?[pIt(l.indentation,m,"newVirtual")]:[];s.subs=[...h,...g,l]}else s.subs.push(l)}else o.push(l),cm(l)||(s=l)}return n.subs=o,n},"rebuilder"));return YFr(t,n=>n==="newVirtual"),r}a(gIt,"combineClosersAndOpeners");function KFr(t,e=cm,r){return XLe(t,a(function(o){if(o.subs.length<=1)return o;let s=[],c=[],l,u=!1;function d(p=!1){if(l!==void 0&&(s.length>0||!p)){let h=pIt(l,c,r);s.push(h)}else c.forEach(h=>s.push(h))}a(d,"flushBlockIntoNewSubs");for(let p=0;p{if(r.label==="class"||r.label==="interface")for(let n of r.subs)!cm(n)&&(n.label===void 0||n.label==="annotation")&&(n.label="member")},"bottomUp"),e}a(XFr,"processJava");f();var nVi={heading:/^# /,subheading:/^## /,subsubheading:/### /},iVi=EAe(nVi);function ZFr(t){let e=t;if(yAe(e,iVi),cm(e))return e;function r(s){if(s.label==="heading")return 1;if(s.label==="subheading")return 2;if(s.label==="subsubheading")return 3}a(r,"headingLevel");let n=[e],o=[...e.subs];e.subs=[];for(let s of o){let c=r(s);if(c===void 0||cm(s))n[n.length-1].subs.push(s);else{for(;n.lengthc+1;)n.pop()}}return e=KFr(e),e=EH(e),ZLe(e),e}a(ZFr,"processMarkdown");f();function e9r(t){return" ".repeat(t.indentation)+t.sourceLine+` +`}a(e9r,"deparseLine");AIt("markdown",ZFr);AIt("java",XFr);var oVi={worthUp:.9,worthSibling:.88,worthDown:.8};function yIt(t,e,r=To(),n=oVi){let o=yH(t,s=>s?1:void 0);return xg(o,s=>{if(cm(s))return;let c=s.subs.reduce((l,u)=>Math.max(l,u.label??0),0);s.label=Math.max(s.label??0,c*n.worthUp)},"bottomUp"),xg(o,s=>{if(cm(s))return;let c=s.subs.map(d=>d.label??0),l=[...c];for(let d=0;dMath.max(p,Math.pow(n.worthSibling,Math.abs(d-h))*c[d])));let u=s.label;u!==void 0&&(l=l.map(d=>Math.max(d,n.worthDown*u))),s.subs.forEach((d,p)=>d.label=l[p])},"topDown"),sVi(o,e,r)}a(yIt,"fromTreeWithFocussedLines");function sVi(t,e,r=To()){let n=mIt(t,[],(o,s)=>((o.type==="line"||o.type==="blank")&&s.push(o.type==="line"?[e9r(o).trimEnd(),o.label??0]:["",o.label??0]),s),"topDown");return new nr(n,e,r)}a(sVi,"fromTreeWithValuedLines");function I1(t,e=!0,r=!0,n,o=To()){let s=typeof t=="string"?_H(t):_H(t.source,t.languageId);EH(s);let c=yH(s,l=>e&&l!=="closer");return xg(c,l=>{l.label===void 0&&(l.label=e&&l.label!==!1)},"topDown"),e&&xg(c,l=>{if(l.label){let u=!1;for(let d of[...l.subs].reverse())d.label&&!u?u=!0:d.label=!1}else for(let u of l.subs)u.label=!1;l.subs.length>0&&(l.label=!1)},"topDown"),r&&xg(c,l=>{l.label||=(gH(l)||cm(l))&&l.lineNumber==0},"topDown"),yIt(c,n,o)}a(I1,"elidableTextForSourceCode");f();var _Ae=class t{constructor(e,r,n,o="strict",s){this.text=e;this._value=r;this._cost=n;this.metadata=s;this.markedForRemoval=!1;if(e.includes(` +`)&&o!=="none")throw new Error("LineWithValueAndCost: text contains newline");if(r<0&&o!=="none")throw new Error("LineWithValueAndCost: value is negative");if(n<0&&o!=="none")throw new Error("LineWithValueAndCost: cost is negative");if(o=="strict"&&r>1)throw new Error("Value should normally be between 0 and 1 -- set validation to `loose` to ignore this error")}static{a(this,"LineWithValueAndCost")}get value(){return this._value}get cost(){return this._cost}adjustValue(e){return this._value*=e,this}setValue(e){return this._value=e,this}recost(e=r=>To().tokenLength(r+` +`)){return this._cost=e(this.text),this}copy(){let e=new t(this.text,this.value,this.cost,"none",this.metadata);return e.markedForRemoval=this.markedForRemoval,e}};var nr=class t{constructor(e,r,n=To()){this.metadata=r;this.tokenizer=n;this.lines=[];let o=[];for(let s of e){let c=Array.isArray(s)?s[1]:1,l=Array.isArray(s)?s[0]:s;typeof l=="string"?l.split(` +`).forEach(u=>o.push(new _Ae(u,c,n.tokenLength(u+` +`),"strict",this.metadata))):l instanceof t?l.lines.forEach(u=>o.push(u.copy().adjustValue(c))):"source"in l&&"languageId"in l&&I1(l).lines.forEach(u=>o.push(u.copy().adjustValue(c)))}this.lines=o}static{a(this,"ElidableText")}adjust(e){this.lines.forEach(r=>r.adjustValue(e))}recost(e=r=>To().tokenLength(r+` `)){this.lines.forEach(r=>r.recost(e))}elide(e,r="[...]",n=!0,o="removeLeastDesirable",s=this.tokenizer,c="topToBottom"){if(s.tokenLength(r+` -`)>e)throw new Error("maxTokens must be larger than the ellipsis length");let{lines:l,totalCost:u,priorityQueue:d}=aji(this.lines,o);if(u<=e)return ZSt(l);cji(d,c);let p=u;for(;p>e&&d.length>0;){let m=d.shift().originalIndex,g=l[m];if(g.markedForRemoval)continue;let A=n?lji(l,m):"",y=rFr(A,r,s,g);l[m]=y,p-=g.cost,p+=y.cost;let E=m+1;if(E=0){let v=l[_];V8e(v,r)&&(p-=v.cost,v.markedForRemoval=!0)}}if(p>e)return ZSt([rFr("",r,s)]);let h=l.filter(m=>!m.markedForRemoval);for(let m=h.length-1;m>0;m--)V8e(h[m],r)&&V8e(h[m-1],r)&&h.splice(m,1);return ZSt(h)}};function sji(t){return t?.text.match(/^\s*/)?.[0]??""}a(sji,"getIndentation");function V8e(t,e){return t?.text.trim()===e.trim()}a(V8e,"isEllipsis");function ZSt(t){return{getText:a(()=>t.map(e=>e.text).join(` -`),"getText"),getLines:a(()=>t,"getLines")}}a(ZSt,"produceElidedText");function aji(t,e){let r=0,n=[];return{lines:t.map((s,c)=>{let l=s.copy();return e==="removeLeastBangForBuck"&&l.adjustValue(1/l.cost),r+=l.cost,n.push({originalIndex:c,value:l.value}),l}),totalCost:r,priorityQueue:n}}a(aji,"initializeElisionContext");function cji(t,e){t.sort((r,n)=>r.value!==n.value?r.value-n.value:e==="bottomToTop"?n.originalIndex-r.originalIndex:r.originalIndex-n.originalIndex)}a(cji,"sortPriorityQueue");function lji(t,e){let r="";for(let n=e;n>=0;n--){let o=t[n];if(!o.markedForRemoval&&o.text.trim()!==""){r=sji(o);break}}return r}a(lji,"getClosestIndentation");function rFr(t,e,r,n){let o=t+e;return new vye(o,1/0,r.tokenLength(o+` -`),"loose",n?.metadata)}a(rFr,"getNewEllipsis");f();var nFr=require("fs");async function iFr(t,e,r,n,o){let s=new Map,c=0;for(let h of t){let m=h.node.fileName.toLowerCase(),g=s.get(m);g?g.symbols.push(h):s.set(m,{symbols:[h],topRank:c}),c++}if(s.delete(r.toLowerCase()),s.size===0)return[];let l=e,u=e/Math.min(4,s.size),d=[],p=Array.from(s.keys());p.sort((h,m)=>{let g=s.get(h).topRank,A=s.get(m).topRank;return g-A});for(let h of p){let m=s.get(h).symbols;if(m.length===0)continue;let g=m[0].node.fileName,A=m.reduce((y,E)=>y+E.node.extentRange.length,0);for(let y of m){if(l<=5)return d;l0(o);let E=y.node.extentRange.length/A,_=Math.min(l,E*u),v=(await uji([y])).elide(_).getText();l-=n.tokenLength(v),d.push({uri:g,value:v})}}return d}a(iFr,"symbolRangesToCodeSnippets");async function uji(t){if(t.length===0)return new nr([]);let e=t[0].node.fileName,r=[],n="";try{let o=Eo(e);o&&(n=(await nFr.promises.readFile(o)).toString())}catch{}for(let o of t)oFr(o,n).forEach(s=>r.push(s));return new nr(r)}a(uji,"sameFileSymbolRangeToElidableText");function oFr(t,e){let n=[],o=t.node,s=e.substring(eIt(e,o.commentRange.start),o.commentRange.end);n.push([tIt(s),1-3e-4]);let c=eIt(e,o.bodyRange.start),l=eIt(e,o.extentRange.start),u=o.bodyRange.length===0?e.substring(l,o.extentRange.end):e.substring(o.commentRange.length===0?l:o.commentRange.end,c);if(cj(o.kind)&&(u="BEGIN "+u.trimStart()),n.push([tIt(u),1-1e-4]),t.children.length>0)for(let d of t.children)n.push(...oFr(d,e));else{let d=1-(cj(t.node.kind)?3e-4:4e-4),p=e.substring(c,o.bodyRange.end);n.push([tIt(p),d])}return cj(o.kind)&&n.push(["END "+u.substring(6),1-1e-4]),n.filter(d=>d[0].length>0)}a(oFr,"prepareForElidableText");function eIt(t,e){for(;e-1>=0&&(t[e-1]===" "||t[e-1]===" ");)e--;return e}a(eIt,"shiftLeftToNearestLineEndingOrAlphanumeric");function tIt(t){let e=0;for(;ee)throw new Error("maxTokens must be larger than the ellipsis length");let{lines:l,totalCost:u,priorityQueue:d}=cVi(this.lines,o);if(u<=e)return EIt(l);lVi(d,c);let p=u;for(;p>e&&d.length>0;){let m=d.shift().originalIndex,g=l[m];if(g.markedForRemoval)continue;let A=n?uVi(l,m):"",y=t9r(A,r,s,g);l[m]=y,p-=g.cost,p+=y.cost;let E=m+1;if(E=0){let v=l[_];e8e(v,r)&&(p-=v.cost,v.markedForRemoval=!0)}}if(p>e)return EIt([t9r("",r,s)]);let h=l.filter(m=>!m.markedForRemoval);for(let m=h.length-1;m>0;m--)e8e(h[m],r)&&e8e(h[m-1],r)&&h.splice(m,1);return EIt(h)}};function aVi(t){return t?.text.match(/^\s*/)?.[0]??""}a(aVi,"getIndentation");function e8e(t,e){return t?.text.trim()===e.trim()}a(e8e,"isEllipsis");function EIt(t){return{getText:a(()=>t.map(e=>e.text).join(` +`),"getText"),getLines:a(()=>t,"getLines")}}a(EIt,"produceElidedText");function cVi(t,e){let r=0,n=[];return{lines:t.map((s,c)=>{let l=s.copy();return e==="removeLeastBangForBuck"&&l.adjustValue(1/l.cost),r+=l.cost,n.push({originalIndex:c,value:l.value}),l}),totalCost:r,priorityQueue:n}}a(cVi,"initializeElisionContext");function lVi(t,e){t.sort((r,n)=>r.value!==n.value?r.value-n.value:e==="bottomToTop"?n.originalIndex-r.originalIndex:r.originalIndex-n.originalIndex)}a(lVi,"sortPriorityQueue");function uVi(t,e){let r="";for(let n=e;n>=0;n--){let o=t[n];if(!o.markedForRemoval&&o.text.trim()!==""){r=aVi(o);break}}return r}a(uVi,"getClosestIndentation");function t9r(t,e,r,n){let o=t+e;return new _Ae(o,1/0,r.tokenLength(o+` +`),"loose",n?.metadata)}a(t9r,"getNewEllipsis");f();var r9r=require("fs");async function n9r(t,e,r,n,o){let s=new Map,c=0;for(let h of t){let m=h.node.fileName.toLowerCase(),g=s.get(m);g?g.symbols.push(h):s.set(m,{symbols:[h],topRank:c}),c++}if(s.delete(r.toLowerCase()),s.size===0)return[];let l=e,u=e/Math.min(4,s.size),d=[],p=Array.from(s.keys());p.sort((h,m)=>{let g=s.get(h).topRank,A=s.get(m).topRank;return g-A});for(let h of p){let m=s.get(h).symbols;if(m.length===0)continue;let g=m[0].node.fileName,A=m.reduce((y,E)=>y+E.node.extentRange.length,0);for(let y of m){if(l<=5)return d;i0(o);let E=y.node.extentRange.length/A,_=Math.min(l,E*u),v=(await dVi([y])).elide(_).getText();l-=n.tokenLength(v),d.push({uri:g,value:v})}}return d}a(n9r,"symbolRangesToCodeSnippets");async function dVi(t){if(t.length===0)return new nr([]);let e=t[0].node.fileName,r=[],n="";try{let o=mo(e);o&&(n=(await r9r.promises.readFile(o)).toString())}catch{}for(let o of t)i9r(o,n).forEach(s=>r.push(s));return new nr(r)}a(dVi,"sameFileSymbolRangeToElidableText");function i9r(t,e){let n=[],o=t.node,s=e.substring(_It(e,o.commentRange.start),o.commentRange.end);n.push([CIt(s),1-3e-4]);let c=_It(e,o.bodyRange.start),l=_It(e,o.extentRange.start),u=o.bodyRange.length===0?e.substring(l,o.extentRange.end):e.substring(o.commentRange.length===0?l:o.commentRange.end,c);if(mH(o.kind)&&(u="BEGIN "+u.trimStart()),n.push([CIt(u),1-1e-4]),t.children.length>0)for(let d of t.children)n.push(...i9r(d,e));else{let d=1-(mH(t.node.kind)?3e-4:4e-4),p=e.substring(c,o.bodyRange.end);n.push([CIt(p),d])}return mH(o.kind)&&n.push(["END "+u.substring(6),1-1e-4]),n.filter(d=>d[0].length>0)}a(i9r,"prepareForElidableText");function _It(t,e){for(;e-1>=0&&(t[e-1]===" "||t[e-1]===" ");)e--;return e}a(_It,"shiftLeftToNearestLineEndingOrAlphanumeric");function CIt(t){let e=0;for(;e=0&&(t[r]==="\r"||t[r]===` -`||t[r]===" "||t[r]===" ");)r--;return t.substring(e,r+1)}a(tIt,"trimLineEndingsAndTrailingWhitespace");var rIt=class{constructor(e,r){this.referenceExtractors=new Map;this.index=e,this.referenceExtractors=r}static{a(this,"ContextRetrievalStrategy")}},y6=class extends rIt{static{a(this,"UnqualifiedNameRetrievalStrategy")}constructor(e,r,n,o){super(e,r),this.caseSensitive=n,this.typesOnly=o}async getContextAtPositionAsync(e,r,n,o,s,c){let l=this.referenceExtractors.get(o);if(!l)return[];l0(c);let u=await l.extractReferences(e,r);l0(c);let d=Array.from(u);d.sort((g,A)=>this.compareSymbolRangesByProximityToCaret(g,A,n));let p=[],h=new Set,m=await this.findDefinitionsViaUnqualifiedNames(d,s,c);this.typesOnly&&(m=m.filter(g=>cj(g.kind)));for(let g of m)h.has(JSON.stringify(g))||(h.add(JSON.stringify(g)),p.push(await this.makeSymbolRangeNodeFromDefinition(g,c)));return p}async findDefinitionsViaUnqualifiedNames(e,r,n){let o=Array.from(new Set(e.map(h=>h.unqualifiedName))),s=!this.caseSensitive,c=await this.index.findPotentialDefinitionsAsync(o,s,n),l=a(h=>s?h.toLowerCase():h,"lowercaseIfCaseInsensitive"),u=a(h=>l(h.unqualifiedName),"getSymbolKey"),d=new Map;for(let h of c){let m=u(h),g=d.get(m)??[];d.set(m,[...g,h])}let p=[];for(let h of o){let m=d.get(l(h));if(!(!m||m.length>r.mlcpMaxSymbolMatches)){if(p.length+m.length>r.mlcpMaxContextItems){p.push(...m.slice(0,r.mlcpMaxContextItems-p.length));break}p.push(...m)}}return p}async makeSymbolRangeNodeFromDefinition(e,r){if(l0(r),cj(e.kind)){let n=await this.index.findSymbolsByFullyQualifiedNamePrefix(e.fileName,e.fullyQualifiedName+".",r),o=await Promise.all(n.map(s=>this.makeSymbolRangeNodeFromDefinition(s,r)));return{node:e,children:o}}else return{node:e,children:[]}}compareSymbolRangesByProximityToCaret(e,r,n){let o=e.extentRange.end<=n,s=r.extentRange.end<=n;if(o&&!s)return-1;if(!o&&s)return 1;let c=Math.abs(e.extentRange.start-n),l=Math.abs(r.extentRange.start-n);return c-l}},W8e=class{constructor(e,r){this.strategies=new Map;this.strategies.set("go",new y6(e,r,!0,!0)),this.strategies.set("java",new y6(e,r,!0,!0)),this.strategies.set("python",new y6(e,r,!0,!1)),this.strategies.set("typescript",new y6(e,r,!0,!0)),this.strategies.set("typescriptreact",new y6(e,r,!0,!0)),this.strategies.set("javascript",new y6(e,r,!0,!1))}static{a(this,"SyntaxAwareContextRetrieval")}async getStringifiedContextAtPositionAsync(e,r,n,o,s,c,l){let u=await this.getContextAtPositionAsync(e,r,n,o,s,l);l0(l);let d=wo();return iFr(u,c,e,d,l)}async getContextAtPositionAsync(e,r,n,o,s,c){return this.strategies.has(o)?this.strategies.get(o).getContextAtPositionAsync(e,r,n,o,s,c):[]}};f();f();f();f();var hj={Id:"id"},Q1={FilePath:"filePath",LastWriteTimeUtc:"lastWriteTimeUtc"},Ts={DocumentId:"documentId",FullyQualifiedName:"fullyQualifiedName",UnqualifiedName:"unqualifiedName",CommentStart:"commentStart",CommentLength:"commentLength",NameStart:"nameStart",NameLength:"nameLength",BodyStart:"bodyStart",BodyLength:"bodyLength",ExtentStart:"extentStart",ExtentLength:"extentLength",SymbolKind:"symbolKind",RefKind:"refKind"};f();f();var z8e=class{constructor(e,r,n){this.tableName=e;this.createOptimizations=r;this.extraCreateDeclarations=n;this.primaryKey=new nIt(hj.Id)}static{a(this,"SQLTableQueryGenerator")}createTableQueries(){return this.createTableString??=this.generateCreateTableString(),[this.createTableString,...this.createOptimizations]}generateCreateTableString(){let e=this.fields.map(r=>r.initColumnString());return this.extraCreateDeclarations&&e.push(this.extraCreateDeclarations),e.push(),[`CREATE TABLE IF NOT EXISTS ${this.tableName} (`,` ${this.primaryKey.initColumnString()},`,` ${e.join(`, +`||t[r]===" "||t[r]===" ");)r--;return t.substring(e,r+1)}a(CIt,"trimLineEndingsAndTrailingWhitespace");var vIt=class{constructor(e,r){this.referenceExtractors=new Map;this.index=e,this.referenceExtractors=r}static{a(this,"ContextRetrievalStrategy")}},$8=class extends vIt{static{a(this,"UnqualifiedNameRetrievalStrategy")}constructor(e,r,n,o){super(e,r),this.caseSensitive=n,this.typesOnly=o}async getContextAtPositionAsync(e,r,n,o,s,c){let l=this.referenceExtractors.get(o);if(!l)return[];i0(c);let u=await l.extractReferences(e,r);i0(c);let d=Array.from(u);d.sort((g,A)=>this.compareSymbolRangesByProximityToCaret(g,A,n));let p=[],h=new Set,m=await this.findDefinitionsViaUnqualifiedNames(d,s,c);this.typesOnly&&(m=m.filter(g=>mH(g.kind)));for(let g of m)h.has(JSON.stringify(g))||(h.add(JSON.stringify(g)),p.push(await this.makeSymbolRangeNodeFromDefinition(g,c)));return p}async findDefinitionsViaUnqualifiedNames(e,r,n){let o=Array.from(new Set(e.map(h=>h.unqualifiedName))),s=!this.caseSensitive,c=await this.index.findPotentialDefinitionsAsync(o,s,n),l=a(h=>s?h.toLowerCase():h,"lowercaseIfCaseInsensitive"),u=a(h=>l(h.unqualifiedName),"getSymbolKey"),d=new Map;for(let h of c){let m=u(h),g=d.get(m)??[];d.set(m,[...g,h])}let p=[];for(let h of o){let m=d.get(l(h));if(!(!m||m.length>r.mlcpMaxSymbolMatches)){if(p.length+m.length>r.mlcpMaxContextItems){p.push(...m.slice(0,r.mlcpMaxContextItems-p.length));break}p.push(...m)}}return p}async makeSymbolRangeNodeFromDefinition(e,r){if(i0(r),mH(e.kind)){let n=await this.index.findSymbolsByFullyQualifiedNamePrefix(e.fileName,e.fullyQualifiedName+".",r),o=await Promise.all(n.map(s=>this.makeSymbolRangeNodeFromDefinition(s,r)));return{node:e,children:o}}else return{node:e,children:[]}}compareSymbolRangesByProximityToCaret(e,r,n){let o=e.extentRange.end<=n,s=r.extentRange.end<=n;if(o&&!s)return-1;if(!o&&s)return 1;let c=Math.abs(e.extentRange.start-n),l=Math.abs(r.extentRange.start-n);return c-l}},t8e=class{constructor(e,r){this.strategies=new Map;this.strategies.set("go",new $8(e,r,!0,!0)),this.strategies.set("java",new $8(e,r,!0,!0)),this.strategies.set("python",new $8(e,r,!0,!1)),this.strategies.set("typescript",new $8(e,r,!0,!0)),this.strategies.set("typescriptreact",new $8(e,r,!0,!0)),this.strategies.set("javascript",new $8(e,r,!0,!1))}static{a(this,"SyntaxAwareContextRetrieval")}async getStringifiedContextAtPositionAsync(e,r,n,o,s,c,l){let u=await this.getContextAtPositionAsync(e,r,n,o,s,l);i0(l);let d=To();return n9r(u,c,e,d,l)}async getContextAtPositionAsync(e,r,n,o,s,c){return this.strategies.has(o)?this.strategies.get(o).getContextAtPositionAsync(e,r,n,o,s,c):[]}};f();f();f();f();var CH={Id:"id"},x1={FilePath:"filePath",LastWriteTimeUtc:"lastWriteTimeUtc"},ys={DocumentId:"documentId",FullyQualifiedName:"fullyQualifiedName",UnqualifiedName:"unqualifiedName",CommentStart:"commentStart",CommentLength:"commentLength",NameStart:"nameStart",NameLength:"nameLength",BodyStart:"bodyStart",BodyLength:"bodyLength",ExtentStart:"extentStart",ExtentLength:"extentLength",SymbolKind:"symbolKind",RefKind:"refKind"};f();f();var r8e=class{constructor(e,r,n){this.tableName=e;this.createOptimizations=r;this.extraCreateDeclarations=n;this.primaryKey=new bIt(CH.Id)}static{a(this,"SQLTableQueryGenerator")}createTableQueries(){return this.createTableString??=this.generateCreateTableString(),[this.createTableString,...this.createOptimizations]}generateCreateTableString(){let e=this.fields.map(r=>r.initColumnString());return this.extraCreateDeclarations&&e.push(this.extraCreateDeclarations),e.push(),[`CREATE TABLE IF NOT EXISTS ${this.tableName} (`,` ${this.primaryKey.initColumnString()},`,` ${e.join(`, `)}`,")"].join(` `)}insertQuery(e,r){this.cachedInsertQueryStrings??=this.generateInsertQueryStrings();let n=[this.cachedInsertQueryStrings.prefix,Array(r).fill(this.cachedInsertQueryStrings.valuesTemplate).join(`, `)];return e&&n.push("ON CONFLICT DO NOTHING"),n.join(` `)}generateInsertQueryStrings(){return{prefix:`INSERT INTO ${this.tableName} (${this.fields.map(e=>e.name).join(", ")}) -VALUES`,valuesTemplate:`(${Array(this.fields.length).fill("?").join(", ")})`}}},bye=class t extends z8e{constructor(){super(t.tableName,[`CREATE UNIQUE INDEX IF NOT EXISTS 'IX_Document_FilePath' ON '${t.tableName}' ('${Q1.FilePath}');`]);this.fields=[new Iye(Q1.FilePath,{notNull:!0,collate:!0,noCase:!0,unique:!0}),new WE(Q1.LastWriteTimeUtc,{notNull:!0})]}static{a(this,"DocumentQueryGenerator")}static{this.tableName="Document"}},Tye=class t extends z8e{constructor(){super(t.tableName,[`CREATE INDEX IF NOT EXISTS 'IX_Symbol_DocumentId' ON '${t.tableName}' ('${Ts.DocumentId}', '${Ts.ExtentStart}', '${Ts.ExtentLength}');`,`CREATE INDEX IF NOT EXISTS 'IX_Symbol_UnqualifiedName' ON '${t.tableName}' ('${Ts.UnqualifiedName}');`],`FOREIGN KEY(${Ts.DocumentId}) REFERENCES Document(${hj.Id}) ON DELETE CASCADE`);this.fields=[new WE(Ts.DocumentId),new Iye(Ts.FullyQualifiedName,{notNull:!0}),new Iye(Ts.UnqualifiedName,{notNull:!0}),new WE(Ts.CommentStart,{notNull:!0}),new WE(Ts.CommentLength,{notNull:!0}),new WE(Ts.NameStart,{notNull:!0}),new WE(Ts.NameLength,{notNull:!0}),new WE(Ts.BodyStart,{notNull:!0}),new WE(Ts.BodyLength,{notNull:!0}),new WE(Ts.ExtentStart,{notNull:!0}),new WE(Ts.ExtentLength,{notNull:!0}),new WE(Ts.SymbolKind,{notNull:!0}),new WE(Ts.RefKind,{notNull:!0})]}static{a(this,"SymbolQueryGenerator")}static{this.tableName="Symbol"}},Sye=class{constructor(e,r){this.name=e;this.notNull=r?.notNull??!1}static{a(this,"SQLField")}},Iye=class extends Sye{static{a(this,"StringColumn")}constructor(e,r){super(e,{notNull:r?.notNull}),this.collate=r?.collate??!1,this.noCase=r?.noCase??!1,this.unique=r?.unique??!1}initColumnString(){let e=this.collate?"COLLATE":void 0,r=this.noCase?"NOCASE":void 0,n=this.notNull?"NOT NULL":void 0,o=this.unique?"UNIQUE":void 0,s=[e,r,n,o].filter(c=>c).join(" ");return`'${this.name}' VARCHAR(500) ${s}`}},WE=class extends Sye{static{a(this,"NumberColumn")}initColumnString(){return`'${this.name}' INTEGER${this.notNull?" NOT NULL":""}`}},nIt=class extends Sye{static{a(this,"NumberPrimaryKeyColumn")}initColumnString(){return`'${this.name}' INTEGER PRIMARY KEY AUTOINCREMENT${this.notNull?" NOT NULL":""}`}};var Y8e=class{static{a(this,"SQLTable")}constructor(e){this.queryGenerator=this.createQueryGenerator(),this.init=this.doInit(e)}async doInit(e){let r=await e;if(r)return this.create(r),r}create(e){let r=this.queryGenerator.createTableQueries();for(let n of r)e.exec(n)}async insert(e,r){let n=await this.init;if(!n)return;let o=this.queryGenerator.insertQuery(r,e.length),c=e.map(l=>Object.values(l)).flat();n.prepare(o).run(...c)}async getAllRows(){let e=await this.init;return e?J8e(e,`SELECT * FROM ${this.queryGenerator.tableName}`,[]):[]}async deleteRow(e){let r=await this.init;r&&K8e(r,`DELETE FROM ${this.queryGenerator.tableName} WHERE ${hj.Id} = ?`,[e])}},JM=class t extends Y8e{static{a(this,"DocumentTable")}static{this.tableName=bye.tableName}createQueryGenerator(){return new bye}async updateTimestamp(e,r){let n=await this.init;n&&K8e(n,`UPDATE ${t.tableName} SET ${Q1.LastWriteTimeUtc} = ? WHERE ${Q1.FilePath} = ?`,[r,e])}async deleteAllWithPath(e){let r=await this.init;r&&K8e(r,`DELETE FROM ${t.tableName} WHERE ${Q1.FilePath} = ?`,[e])}async getDocumentByFilePath(e){let r=await this.init;return r?J8e(r,`SELECT * FROM ${this.queryGenerator.tableName} WHERE ${Q1.FilePath} = ?`,[e]):[]}},d0=class t extends Y8e{static{a(this,"SymbolTable")}static{this.tableName=Tye.tableName}createQueryGenerator(){return new Tye}async clearAllSymbolsFromDocument(e){let r=await this.init;r&&K8e(r,`DELETE FROM ${t.tableName} WHERE ${Ts.DocumentId} = ?`,[e])}};function J8e(t,e,r){let o=Array.isArray(r)?r:[r];return o.length>0?t.prepare(e).all(...o):t.prepare(e).all()}a(J8e,"runDBQuery");function K8e(t,e,r){let o=Array.isArray(r)?r:[r];o.length>0?t.prepare(e).run(...o):t.prepare(e).run()}a(K8e,"runDBCommand");var sFr=de(require("node:sqlite"));var X8e=class{constructor(e){this.databaseFileName=e;this.innerJoinStatement=`INNER JOIN ${JM.tableName} ON ${d0.tableName}.${Ts.DocumentId} = ${JM.tableName}.${hj.Id}`;this.db=this.initDb(e),this.documentTable=new JM(this.db),this.symbolTable=new d0(this.db)}static{a(this,"DocumentSymbolDatabase")}initDb(e){try{let r=new sFr.default.DatabaseSync(e,{open:!0});return r.exec(` +VALUES`,valuesTemplate:`(${Array(this.fields.length).fill("?").join(", ")})`}}},CAe=class t extends r8e{constructor(){super(t.tableName,[`CREATE UNIQUE INDEX IF NOT EXISTS 'IX_Document_FilePath' ON '${t.tableName}' ('${x1.FilePath}');`]);this.fields=[new TAe(x1.FilePath,{notNull:!0,collate:!0,noCase:!0,unique:!0}),new BE(x1.LastWriteTimeUtc,{notNull:!0})]}static{a(this,"DocumentQueryGenerator")}static{this.tableName="Document"}},vAe=class t extends r8e{constructor(){super(t.tableName,[`CREATE INDEX IF NOT EXISTS 'IX_Symbol_DocumentId' ON '${t.tableName}' ('${ys.DocumentId}', '${ys.ExtentStart}', '${ys.ExtentLength}');`,`CREATE INDEX IF NOT EXISTS 'IX_Symbol_UnqualifiedName' ON '${t.tableName}' ('${ys.UnqualifiedName}');`],`FOREIGN KEY(${ys.DocumentId}) REFERENCES Document(${CH.Id}) ON DELETE CASCADE`);this.fields=[new BE(ys.DocumentId),new TAe(ys.FullyQualifiedName,{notNull:!0}),new TAe(ys.UnqualifiedName,{notNull:!0}),new BE(ys.CommentStart,{notNull:!0}),new BE(ys.CommentLength,{notNull:!0}),new BE(ys.NameStart,{notNull:!0}),new BE(ys.NameLength,{notNull:!0}),new BE(ys.BodyStart,{notNull:!0}),new BE(ys.BodyLength,{notNull:!0}),new BE(ys.ExtentStart,{notNull:!0}),new BE(ys.ExtentLength,{notNull:!0}),new BE(ys.SymbolKind,{notNull:!0}),new BE(ys.RefKind,{notNull:!0})]}static{a(this,"SymbolQueryGenerator")}static{this.tableName="Symbol"}},bAe=class{constructor(e,r){this.name=e;this.notNull=r?.notNull??!1}static{a(this,"SQLField")}},TAe=class extends bAe{static{a(this,"StringColumn")}constructor(e,r){super(e,{notNull:r?.notNull}),this.collate=r?.collate??!1,this.noCase=r?.noCase??!1,this.unique=r?.unique??!1}initColumnString(){let e=this.collate?"COLLATE":void 0,r=this.noCase?"NOCASE":void 0,n=this.notNull?"NOT NULL":void 0,o=this.unique?"UNIQUE":void 0,s=[e,r,n,o].filter(c=>c).join(" ");return`'${this.name}' VARCHAR(500) ${s}`}},BE=class extends bAe{static{a(this,"NumberColumn")}initColumnString(){return`'${this.name}' INTEGER${this.notNull?" NOT NULL":""}`}},bIt=class extends bAe{static{a(this,"NumberPrimaryKeyColumn")}initColumnString(){return`'${this.name}' INTEGER PRIMARY KEY AUTOINCREMENT${this.notNull?" NOT NULL":""}`}};var n8e=class{static{a(this,"SQLTable")}constructor(e){this.queryGenerator=this.createQueryGenerator(),this.init=this.doInit(e)}async doInit(e){let r=await e;if(r)return this.create(r),r}create(e){let r=this.queryGenerator.createTableQueries();for(let n of r)e.exec(n)}async insert(e,r){let n=await this.init;if(!n)return;let o=this.queryGenerator.insertQuery(r,e.length),c=e.map(l=>Object.values(l)).flat();n.prepare(o).run(...c)}async getAllRows(){let e=await this.init;return e?o8e(e,`SELECT * FROM ${this.queryGenerator.tableName}`,[]):[]}async deleteRow(e){let r=await this.init;r&&i8e(r,`DELETE FROM ${this.queryGenerator.tableName} WHERE ${CH.Id} = ?`,[e])}},NM=class t extends n8e{static{a(this,"DocumentTable")}static{this.tableName=CAe.tableName}createQueryGenerator(){return new CAe}async updateTimestamp(e,r){let n=await this.init;n&&i8e(n,`UPDATE ${t.tableName} SET ${x1.LastWriteTimeUtc} = ? WHERE ${x1.FilePath} = ?`,[r,e])}async deleteAllWithPath(e){let r=await this.init;r&&i8e(r,`DELETE FROM ${t.tableName} WHERE ${x1.FilePath} = ?`,[e])}async getDocumentByFilePath(e){let r=await this.init;return r?o8e(r,`SELECT * FROM ${this.queryGenerator.tableName} WHERE ${x1.FilePath} = ?`,[e]):[]}},s0=class t extends n8e{static{a(this,"SymbolTable")}static{this.tableName=vAe.tableName}createQueryGenerator(){return new vAe}async clearAllSymbolsFromDocument(e){let r=await this.init;r&&i8e(r,`DELETE FROM ${t.tableName} WHERE ${ys.DocumentId} = ?`,[e])}};function o8e(t,e,r){let o=Array.isArray(r)?r:[r];return o.length>0?t.prepare(e).all(...o):t.prepare(e).all()}a(o8e,"runDBQuery");function i8e(t,e,r){let o=Array.isArray(r)?r:[r];o.length>0?t.prepare(e).run(...o):t.prepare(e).run()}a(i8e,"runDBCommand");var o9r=de(require("node:sqlite"));var s8e=class{constructor(e){this.databaseFileName=e;this.innerJoinStatement=`INNER JOIN ${NM.tableName} ON ${s0.tableName}.${ys.DocumentId} = ${NM.tableName}.${CH.Id}`;this.db=this.initDb(e),this.documentTable=new NM(this.db),this.symbolTable=new s0(this.db)}static{a(this,"DocumentSymbolDatabase")}initDb(e){try{let r=new o9r.default.DatabaseSync(e,{open:!0});return r.exec(` PRAGMA journal_mode = wal; PRAGMA synchronous = normal; PRAGMA optimize = 0x10002; PRAGMA foreign_keys = ON; - `),Promise.resolve(r)}catch(r){return console.error("Error initializing database:",r),Promise.resolve(void 0)}}async close(){let e=await this.db;e&&(await this.documentTable.init,await this.symbolTable.init,e.close())}async querySymbolsFuzzilyUsingUnqualifiedName(e,r){return await this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${Ts.UnqualifiedName} BETWEEN ? AND (? || '~')`,`ORDER BY ${Ts.UnqualifiedName}`,"LIMIT ?"].join(` -`),[e,e,r])}async querySymbolsUsingUnqualifiedNames(e,r){let n=e.map(()=>"?").join(", "),o=r?"COLLATE NOCASE ":"";return await this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${Ts.UnqualifiedName} ${o}IN (${n})`].join(` -`),e)}async querySymbolsUsingFullyQualifiedName(e){return this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${Ts.FullyQualifiedName} = ?`].join(` -`),[e])}async querySymbolsContainingPosition(e,r){return this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${JM.tableName}.${Q1.FilePath} = ? AND ${d0.tableName}.${Ts.ExtentStart} <= ? AND (${d0.tableName}.${Ts.ExtentStart} + ${d0.tableName}.${Ts.ExtentLength}) >= ?`].join(` -`),[e,r,r])}async querySymbolsContainedByRange(e,r,n){return this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${JM.tableName}.${Q1.FilePath} = ? AND ${d0.tableName}.${Ts.ExtentStart} >= ? AND (${d0.tableName}.${Ts.ExtentStart} + ${d0.tableName}.${Ts.ExtentLength}) <= ?`,`ORDER BY ${d0.tableName}.${Ts.ExtentStart}`].join(` -`),[e,r,n])}async querySymbolsByQualifiedNamePrefix(e,r){return this.query([`SELECT * FROM ${d0.tableName}`,this.innerJoinStatement,`WHERE ${JM.tableName}.${Q1.FilePath} = ? AND ${d0.tableName}.${Ts.FullyQualifiedName} LIKE ?`,`ORDER BY ${d0.tableName}.${Ts.ExtentStart}`].join(` -`),[e,`${r}%`])}async insertSymbols(e){return await this.symbolTable.insert(e,!1)}async insertDocument(e,r,n=!1){return await this.documentTable.insert([{filePath:e,lastWriteTimeUtc:r}],n)}async clearAllSymbolsFromDocument(e){return this.symbolTable.clearAllSymbolsFromDocument(e)}async updateDocumentTimestamp(e,r){return this.documentTable.updateTimestamp(e,r)}async deleteAllDocumentsWithPath(e){return this.documentTable.deleteAllWithPath(e)}async getAllDocuments(){return this.documentTable.getAllRows()}getDocument(e){return this.documentTable.getDocumentByFilePath(e)}async query(e,r){let n=await this.db;return n?(await this.documentTable.init,await this.symbolTable.init,J8e(n,e,r)):[]}};var Z8e=class{static{a(this,"SQLStorageReaderWriter")}constructor(e){this.database=new X8e(e)}async close(){await this.database.close()}async insertOrReplaceDocumentSymbolsAsync(e,r,n){let o=await this.getOrCreateDocumentAsync(e,r);await this.database.clearAllSymbolsFromDocument(o.id),n.length>0&&await this.database.insertSymbols(n.map(s=>({documentId:o.id,fullyQualifiedName:s.fullyQualifiedName,unqualifiedName:s.unqualifiedName,commentStart:s.commentRange.start,commentLength:s.commentRange.length,nameStart:s.nameRange.start,nameLength:s.nameRange.length,bodyStart:s.bodyRange.start,bodyLength:s.bodyRange.length,extentStart:s.extentRange.start,extentLength:s.extentRange.length,symbolKind:s.kind,refKind:s.refKind}))),await this.database.updateDocumentTimestamp(e,r)}async addDocumentsAsync(e){for(let r of e)r=r.toLowerCase(),await this.database.insertDocument(r,Date.now(),!0)}async deleteDocumentAsync(e){return await this.database.deleteAllDocumentsWithPath(e.toLowerCase())}async updateDocumentTimestampAsync(e,r){return await this.database.updateDocumentTimestamp(e.toLowerCase(),r)}async fuzzyMatchSymbolsAsync(e,r){return Mre(await this.database.querySymbolsFuzzilyUsingUnqualifiedName(e,r))}async findPotentialDefinitionsAsync(e,r,n){let o=[],c=0;for(;cnew ET(e.filePath,e.fullyQualifiedName,e.unqualifiedName,new ll(e.commentStart,e.commentLength),new ll(e.nameStart,e.nameLength),new ll(e.bodyStart,e.bodyLength),new ll(e.extentStart,e.extentLength),e.symbolKind,e.refKind))}a(Mre,"symbolsToSymbolRanges");var t6e=de(require("fs/promises"));var e6e=class{static{a(this,"Index")}constructor(e,r,n,o){this.storage=new Z8e(e),this.symbolExtractors=r,this.importExtractors=n,this.params=o}dispose(){return this.storage.close()}get reader(){return this.storage}async indexFile(e,r){let n=Eo(e);if(!n)throw Error(`Cannot resolve a readable file path from ${e}`);let o;try{o=await t6e.stat(n)}catch{await this.storage.deleteDocumentAsync(e);return}let s=o.mtimeMs,c=await this.storage.getDocumentAsync(e);if(c&&c.lastWriteTimeUtc>=s)return;let l=this.symbolExtractors.get(r);if(!l)return;let u=(await t6e.readFile(n)).toString(),d=await l.extractSymbols(e,u),p=d;if(this.params?.mlcpEnableImports){let h=this.importExtractors.get(r);if(h){let m=await h.extractSymbols(e,u);p=[...d,...m]}}await this.storage.insertOrReplaceDocumentSymbolsAsync(e,s,p)}async getDocumentFilePaths(){return(await this.storage.getDocumentsAsync()).map(r=>r.filePath)}};f();function iIt(t){let e=t;return typeof e?.cwd=="string"&&Array.isArray(e?.indexWorkspaceRoots)&&e.indexWorkspaceRoots.every(r=>dji(r))}a(iIt,"isIndexWorkerData");var xye=class{static{a(this,"IndexNotification")}constructor(e){this.operation=e}},E6=class extends xye{constructor(r,n){super(n);this.id=r;this.id=r}static{a(this,"IndexRequest")}},r6e=class extends xye{constructor(r){super(Bg.Cancel);this.messageIdToCancel=r}static{a(this,"CancellationNotification")}},Bg={CreateIndex:"createIndex",AddOrInvalidated:"addOrInvalidated",GetContext:"getContext",Exit:"exit",Response:"response",RemoveIndex:"removeIndex",Cancel:"cancel",GetAllDocumentsInWorkspace:"getAllDocumentsInWorkspace"},n6e=class extends E6{constructor(r,n,o){super(r,Bg.CreateIndex);this.baseWorkspaceFolderUri=n;this.databaseFilePath=o}static{a(this,"CreateIndexRequest")}},i6e=class extends E6{constructor(r,n){super(r,Bg.RemoveIndex);this.baseWorkspaceFolderUri=n}static{a(this,"RemoveIndexRequest")}},o6e=class extends E6{constructor(r,n,o){super(r,Bg.AddOrInvalidated);this.fileUri=n;this.languageId=o}static{a(this,"AddOrInvalidatedRequest")}},s6e=class extends E6{constructor(r,n){super(r,Bg.GetAllDocumentsInWorkspace);this.baseWorkspaceFolderUri=n}static{a(this,"GetAllDocumentsRequest")}},a6e=class extends E6{constructor(r,n,o,s,c,l){super(r,Bg.GetContext);this.fileUri=n;this.code=o;this.offset=s;this.languageId=c;this.params=l}static{a(this,"GetContextRequest")}},c6e=class extends E6{static{a(this,"ExitRequest")}constructor(e){super(e,Bg.Exit)}},Mx=class extends xye{constructor(r,n,o){super(Bg.Response);this.id=r;this.error=n;this.data=o;n&&"code"in n&&typeof n.code=="string"&&(this.code=n.code)}static{a(this,"ResponseMessage")}};function dji(t){return"databaseFilePath"in t&&"rootPath"in t}a(dji,"isIndexableWorkspaceFolder");var aFr=de(Nn()),C6=require("worker_threads");var l6e=class{static{a(this,"IndexInfo")}constructor(e,r){this.index=new e6e(e,W6r,z6r,r),this.contextRetreival=new W8e(this.index.reader,V6r)}},oIt=class t{constructor(e,r,n){this.indices=new Map;this.cancellationTokens=new Map;this.params=n;for(let o of r){let s=Qo(o.rootPath);this.indices.set(s,new l6e(o.databaseFilePath,n))}this.port=e,this.port.on("message",o=>{this.dispatchMessage(o,this.indices,this.cancellationTokens)})}static{a(this,"IndexWorker")}async dispatchMessage(e,r,n){try{let o=new aFr.CancellationTokenSource;n.set(e.id,o);let s;switch(e.operation){case Bg.AddOrInvalidated:s=await t.dispatchAddOrInvalidate(e,r,o.token);break;case Bg.GetContext:s=await t.dispatchGetContext(e,r,o.token);break;case Bg.Cancel:n.get(e.id)?.cancel(),s=new Mx(e.id,void 0,void 0);break;case Bg.Exit:s=await this.dispatchExit(e,r,o.token);break;case Bg.CreateIndex:s=t.dispatchCreateIndex(e,r,o.token);break;case Bg.RemoveIndex:s=await t.dispatchRemoveIndex(e,r,o.token);break;case Bg.GetAllDocumentsInWorkspace:s=await t.GetAllDocumentsInWorkspaceRequest(e,r,o.token);break;default:this.port?.postMessage(new Error(`Unknown operation: ${e.operation}`))}s&&this.port?.postMessage(s),n.get(e.id)?.dispose(),n.delete(e.id)}catch(o){if(!(o instanceof Error))throw o;this.port?.postMessage(new Mx(e.id,o,void 0))}}static async GetAllDocumentsInWorkspaceRequest(e,r,n){let o=Qo(e.baseWorkspaceFolderUri),s,c;return r.has(o)?c=await r.get(o).index.getDocumentFilePaths():s=new Error(`Index not found for ${e.baseWorkspaceFolderUri}`),new Mx(e.id,s,c)}static async dispatchAddOrInvalidate(e,r,n){let o=Qo(e.fileUri),s=t.getIndexInfo(o,r)?.index,c;return s?await s.indexFile(e.fileUri,e.languageId):c=new Error(`Index not found for ${e.fileUri}`),new Mx(e.id,c,void 0)}static async dispatchGetContext(e,r,n){let o=Qo(e.fileUri),s=t.getIndexInfo(o,r)?.contextRetreival,c,l;return s?l=await s.getStringifiedContextAtPositionAsync(e.fileUri,e.code,e.offset,e.languageId,e.params,8e3,n):c=new Error(`ContextRetrieval not found for ${e.fileUri}`),new Mx(e.id,c,l)}async dispatchExit(e,r,n){for(let o of r.values())await o.index.dispose();r.clear(),this.port?.postMessage(new Mx(e.id,void 0,void 0)),this.port?.close()}static dispatchCreateIndex(e,r,n){let o=Qo(e.baseWorkspaceFolderUri);return r.has(o)||r.set(o,new l6e(e.databaseFilePath)),new Mx(e.id,void 0,void 0)}static async dispatchRemoveIndex(e,r,n){let o=Qo(e.baseWorkspaceFolderUri);if(r.has(o)){let s=r.get(o);s&&await s.index.dispose(),r.delete(o)}return new Mx(e.id,void 0,void 0)}static getIndexInfo(e,r){for(let[n,o]of r)if(e.startsWith(n))return o}};function cFr(){return iIt(C6.workerData)}a(cFr,"isIndexWorker");function lFr(){let t=C6.parentPort;if(!t)throw new Error("This must be run a worker thread.");if(!iIt(C6.workerData))throw new Error("Worker data must provide a valid database path.");let e=C6.workerData.cwd;process.cwd=()=>e,new oIt(t,C6.workerData.indexWorkspaceRoots,C6.workerData.params)}a(lFr,"runIndexWorker");f();f();var wye=require("fs"),uFr=require("path");var _6=class extends Xn{static{a(this,"LocalFileSystem")}async readFileString(e,r="utf8"){return await wye.promises.readFile(Qo(e),r)}async stat(e){let{targetStat:r,lstat:n,stat:o}=await this.statWithLink(Qo(e));return{ctime:r.ctimeMs,mtime:r.mtimeMs,size:r.size,type:this.getFileType(r,n,o)}}async readDirectory(e){let r=Qo(e),n=await wye.promises.readdir(r,{withFileTypes:!0}),o=[];for(let s of n){let{targetStat:c,lstat:l,stat:u}=await this.statWithLink((0,uFr.join)(r,s.name));o.push([s.name,this.getFileType(c,l,u)])}return o}async statWithLink(e){let r=await wye.promises.lstat(e);if(r.isSymbolicLink())try{let n=await wye.promises.stat(e);return{lstat:r,stat:n,targetStat:n}}catch{}return{lstat:r,targetStat:r}}getFileType(e,r,n){let o=0;return e.isFile()&&(o=1),e.isDirectory()&&(o=2),r.isSymbolicLink()&&n&&(o|=64),o}};f();f();var zE=class{constructor(){this.resolve=a(()=>{},"resolve");this.reject=a(()=>{},"reject");this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}static{a(this,"Deferred")}};function CT(t,e=void 0){return new Promise(r=>setTimeout(()=>r(e),t))}a(CT,"delay");function Ore(t,e){try{t()?.catch(r=>{try{e?.(r)}catch{}})}catch(r){try{e?.(r)}catch{}}}a(Ore,"fireAndForget");function Bre(t,e,r){try{return t()}catch(n){try{r?.(n)}catch{}return e}}a(Bre,"safeInit");async function fji(t){if(t.isCancellationRequested)return;let e=new zE,r=t.onCancellationRequested(()=>{e.resolve(),r.dispose()});await e.promise}a(fji,"cancellationTokenToPromise");async function dFr(t,e){if(e){let r=fji(e);await Promise.race([t,r])}else await t}a(dFr,"raceCancellation");function sIt(t){return Array.isArray(t)}a(sIt,"isArrayOfT");async function fFr(t,e){let r=new Map,n=[];for(let[o,s]of t.entries()){let c=(async()=>{let l=await aIt(s,e);r.set(o,l)})();n.push(c)}return await Promise.allSettled(n.values()),r}a(fFr,"resolveAll");async function aIt(t,e){let r;return t instanceof Promise?r=await pji(t,e):r=await hji(t,e),r}a(aIt,"resolve");async function pji(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{let s=await t;if(e?.isCancellationRequested)return;n={status:"full",resolutionTime:0,value:sIt(s)?[...s]:[s]}}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await dFr(o,e),n.resolutionTime=performance.now()-r,n}a(pji,"resolvePromise");async function hji(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{for await(let s of t){if(e?.isCancellationRequested)return;n.status!="partial"&&(n={status:"partial",resolutionTime:0,value:[]}),n.value.push(s)}e?.isCancellationRequested||(n.status!=="partial"?n={status:"full",resolutionTime:0,value:[]}:n.status="full")}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await dFr(o,e),n.resolutionTime=performance.now()-r,n}a(hji,"resolveIterable");f();f();var u6e="[...]",mji=0,YE=-1;function rd(){return mji++}a(rd,"getAvailableNodeId");function gji(t,e){let r=t.children.map(n=>n.elisionMarker??e);return[...t.text.entries()].map(([n,o])=>n===0?o:r[n-1]+o).join("")}a(gji,"elideChildren");function pFr(t,e=u6e){return r=>t.tokenLength(gji(r,e))}a(pFr,"getTokenizerCostFunction");f();var b6=class{static{a(this,"PriorityQueue")}constructor(e){if(this.heap=e?[...e]:[],this.heap.length>0)for(let r=Math.floor(this.heap.length/2)-1;r>=0;r--)this.siftDown(r)}get size(){return this.heap.length}insert(e,r){let n={item:e,priority:r};this.heap.push(n);let o=this.heap.length-1;this.siftUp(o)}peek(){return this.heap.length===0?null:this.heap[0]}pop(){if(this.heap.length===0)return null;let e=this.heap[0],r=this.heap.pop();return this.heap.length>0&&(this.heap[0]=r,this.siftDown(0)),e}clear(){let e=this.heap;return this.heap=[],e}siftUp(e){let r=this.heap[e];for(;e>0;){let n=Math.floor((e-1)/2);if(this.heap[n].priority>=r.priority)break;this.heap[e]=this.heap[n],e=n}this.heap[e]=r}siftDown(e){for(;ethis.heap[r].priority&&(r=n),othis.heap[r].priority&&(r=o),r===e)break;let s=this.heap[e];this.heap[e]=this.heap[r],this.heap[r]=s,e=r}}};function Aji(t){let e={id:t.id??rd(),text:t.text??new Array((t.children?.length??0)+1).fill(""),children:t.children??[],cost:t.cost??1,weight:t.weight??0,rectifiedWeight:t.rectifiedWeight,canMerge:t.canMerge??!1,elisionMarker:t.elisionMarker??u6e,requireRenderedChild:t.requireRenderedChild??!1};if(e.text.length!==e.children.length+1)throw new Error(`RenderNode text length (${e.text.length}) must be children length + 1 (${e.children.length+1})`);return e}a(Aji,"createRenderNode");function yji(t){return t.requireRenderedChild||(t.rectifiedWeight??t.weight)>t.weight}a(yji,"isRenderedChildRequired");function hFr(t){return(t.rectifiedWeight??t.weight)/Math.max(t.cost,1)}a(hFr,"rectifiedValue");function Rye(t,e){let r=mFr(t,e);for(let{item:n,priority:o}of r.clear())for(let s of n.nodes)s.rectifiedWeight=o*Math.max(s.cost,1)}a(Rye,"rectifyWeights");function mFr(t,e){let r=t.children.map(s=>mFr(s,e));if(t.weight=Math.max(0,e?e(t):t.weight),t.weight===0&&r.reduce((s,c)=>s+c.size,0)===0)return new b6([]);let n=new b6(r.flatMap(s=>s.clear())),o={nodes:[t],totalCost:t.cost,totalWeight:t.weight};for(;(n.peek()?.priority??0)>o.totalWeight/Math.max(o.totalCost,1);){let{item:s}=n.pop();o.nodes.push(...s.nodes),o.totalCost+=s.totalCost,o.totalWeight+=s.totalWeight}return n.insert(o,o.totalWeight/Math.max(o.totalCost,1)),n}a(mFr,"recursivelyRectifyWeights");function gFr(t,e={}){let{budget:r,mask:n,costFunction:o}=e,s=n??[],c=new Set(Array.isArray(s)?s:[s]);if((r??t.cost)c.has(E.id),"elider"),m=[],g=new Map;if(lIt(t,m,h,g),m.length===0)return cIt(t,o);let A=m.join(""),y=o?o(A):[...g.values()].reduce((E,_)=>E+_.cost,0);return{text:A,cost:y,renderedNodes:g}}let l=new Map,u=[],d=new b6([{item:t,priority:hFr(t)}]),p=r;for(;p>0&&d.size>0;){let{item:h}=d.pop();if(!c.has(h.id)&&h.cost<=p){p-=h.cost,l.set(h.id,h),u.push(h);for(let m of h.children)d.insert(m,hFr(m))}}for(;l.size>0;){let h=[],m=a(E=>!l.has(E.id),"elider"),g=new Map;if(lIt(t,h,m,g),h.length===0)return cIt(t,o);let A=h.join("");if(o===void 0){let E=[...g.values()].reduce((_,v)=>_+v.cost,0);return{text:A,cost:E,renderedNodes:g}}let y=o(A);if(y<=r)return{text:A,cost:y,renderedNodes:g};for(l=g;u.length>0&&y>r;){let E=u.pop();l.has(E.id)&&(y-=E.cost,l.delete(E.id))}if(u.length===0)break}return cIt(t,o)}a(gFr,"render");function cIt(t,e){return{text:t.elisionMarker,cost:e?e(t.elisionMarker):t.elisionMarker.length,renderedNodes:new Map}}a(cIt,"renderEmpty");function lIt(t,e,r,n,o=!1){let s=e.length;if(r(t))return s>=2&&(o||e[s-2]===t.elisionMarker&&e[s-1].trim().length===0)?(e.pop(),!1):(e.push(t.elisionMarker),!1);let c=yji(t),l=!0;for(let[u,d]of t.children.entries())e.push(t.text[u]??""),l=lIt(d,e,r,n,d.canMerge&&!l),c&&=!l;if(c){for(;e.length>s;)e.pop();return!1}return e.push(t.text[t.text.length-1]??""),n.set(t.id,t),!0}a(lIt,"recursivelyRender");function Pye(t,e,r=u6e){let n=t.children.map(c=>Pye(c,e,r));r=t.elisionMarker??r;let o=e(t);return Aji({...t,children:n,cost:o,weight:0,elisionMarker:t.elisionMarker??r})}a(Pye,"snapshot");var T6={id:rd(),text:[""],children:[],cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1};f();f();var Ox=class{constructor(){this.disposables=[]}static{a(this,"WorkspaceContextProvider")}dispose(){for(let e of this.disposables)e.dispose();this.disposables=[]}};var f6e={MaxDirectorySize:200,MaxResults:100,Decay:.5,CacheSize:2e3,CacheTime:1e3*60,InvalidCacheTime:1e3*60*60*24,MaxFileBytes:2*1024*1024};async function Eji(t,e,r=f6e,n){let o=n?.get(e);if(o!==void 0)return o;let s;try{s=await t.readDirectory(e)}catch{}if(s===void 0||r.MaxDirectorySize!==void 0&&s.length>r.MaxDirectorySize)return n?.set(e,"Invalid",r.InvalidCacheTime),"Invalid";let c={documents:[],directories:[]};for(let[l,u]of s){let d=Ti(e,l);u&2?c.directories.push(d):c.documents.push(d)}return n?.set(e,c),c}a(Eji,"getDirectoryChildren");function Cji(t,e){let r=t.getWorkspaceFolder({uri:e});if(r===void 0)return[];let n=[],o=Wu(e);for(;o.startsWith(r);){n.push(o);let s=Wu(o);if(s.length>=o.length)break;o=s}return n}a(Cji,"getAncestors");function _ji(t,e,r=f6e.Decay){let n=new Map,o=new Map,s=new Map,c=new Map;for(let l of e){let u=Cji(t,l.uri);if(u.length===0){n.set(l.uri,new Set);continue}let d;for(let p of u){if(d!==void 0){let h=o.get(p)??new Set;h.add(d),o.set(p,h)}d=p}s.set(l.uri,d),n.set(l.uri,new Set(u))}for(let l of e){let u=[],d=n.get(l.uri);if(!(!d||d.size===0))for(u.push({uri:s.get(l.uri),weight:l.weight*Math.pow(r,d.size)});u.length>0;){let p=u.pop();c.set(p.uri,(c.get(p.uri)??0)+p.weight);let h=o.get(p.uri)??new Set;for(let m of h){let g=p.weight;d.has(m)?g/=r:g*=r,u.push({uri:m,weight:g})}}}return c}a(_ji,"getAncestorWeights");async function*uIt(t,e,r,n,o,s){let c={...f6e,...r},l=c.MaxResults,u=c.Decay,d=_ji(t,e,u),p=new b6([...d.entries()].map(([m,g])=>({item:m,priority:g}))),h=0;for(;p.size>0;){let{item:m,priority:g}=p.pop(),A=await Eji(t,m,c,n);if(s?.isCancellationRequested)return;if(A!=="Invalid"){for(let y of A.documents)if(!o||o(y)){try{if((await t.stat(y)).size>c.MaxFileBytes)continue}catch{continue}if(yield{uri:y,weight:g},h++,h>=l)return}for(let y of A.directories)d.has(y)||(p.insert(y,g*u),d.set(y,g*u))}}}a(uIt,"getNearbyDocuments");var d6e=class extends Ox{constructor(r,n){super();this.fileSystem=r;this.documentManager=n;this.config=f6e;this.cache=new LI(this.config.CacheSize,this.config.CacheTime)}static{a(this,"FileDirectoryDocumentProvider")}async*getContext(r,n,o,s){for await(let c of uIt(this.fileSystem,n.documents,this.config,this.cache,l=>this.documentManager.normalizeUri(l)!==void 0,s))yield{...c,source:"FileDirectoryDocumentProvider"}}};f();f();f();function gp(t,e,r){let n=t.get(e);return n===void 0&&(n=r(e),t.set(e,n)),n}a(gp,"setDefault");var vji={MaxActiveSymbols:500,SymbolCacheSize:1e6},p6e=class extends Ox{constructor(){super(...arguments);this.config=vji;this.nodeToSymbol=new Map;this.nodeValency=new Map;this.symbolToNode=new Map;this.symbolValency=new Map;this.identifierSymbols=new Set;this.identifiers=new $r(this.config.SymbolCacheSize);this.textSymbols=new $r(this.config.SymbolCacheSize);this.nextSymbolId=0}static{a(this,"SymbolContextProvider")}getContext(r,n,o,s){this.updateSymbolIndex(r,o);let c=this.getWeightedSymbols(n);return Promise.resolve(this.getWeightedNodes(c))}updateSymbolIndex(r,n){for(let{id:o}of r.getInvalidatedNodes()){let s=this.nodeToSymbol.get(o);if(this.nodeToSymbol.delete(o),this.nodeValency.delete(o),s)for(let[c,l]of s.entries()){let u=this.symbolToNode.get(c);u?.delete(o),u?.size===0?(this.symbolToNode.delete(c),this.symbolValency.delete(c),this.identifierSymbols.delete(c)):this.symbolValency.has(c)&&this.symbolValency.set(c,Math.max(1,(this.symbolValency.get(c)??0)-l))}}for(let{id:o}of r.getCreatedNodes()){let s=n.getNode(o);s!==void 0&&this.extractSymbols(s.document,s.node)}}getWeightedSymbols(r){let n=new Map;for(let{id:s,weight:c}of r.nodes){let l=this.nodeValency.get(s)??0,u=[],d=0;for(let[p,h]of this.nodeToSymbol.get(s)??[]){let m=this.symbolValency.get(p);if((m??0)<1)continue;let g=h/(Math.max(l,1)*Math.max(1,m));u.push({symbolId:p,nodeSymbolWeight:g}),d+=g}d=Math.max(d,1);for(let{symbolId:p,nodeSymbolWeight:h}of u)n.set(p,(n.get(p)??0)+c*h/d)}return[...n.entries()].map(([s,c])=>({symbolId:s,symbolWeight:c,symbolValency:this.symbolValency.get(s)})).filter(({symbolValency:s})=>(s??0)>0).sort((s,c)=>c.symbolWeight/c.symbolValency-s.symbolWeight/s.symbolValency).slice(0,this.config.MaxActiveSymbols)}getWeightedNodes(r){let n=[];for(let{symbolId:o,symbolWeight:s,symbolValency:c}of r){let l=this.identifierSymbols.has(o)?"SymbolContextProvider.Identifiers":"SymbolContextProvider.Text";for(let[u,d]of this.symbolToNode.get(o)??[]){let p=s*d/Math.max(c,this.nodeValency.get(u)??d);n.push({id:u,weight:p,source:l})}}return n}extractSymbols(r,n){if(this.nodeToSymbol.has(n.id))return;let o=new Map;this.nodeToSymbol.set(n.id,o);let s=0;for(let c of n.syntaxNodes()){let l=r.document.getText(c.range);if(this.isIdentifier(r,c,l)){let u=gp(this.identifiers,l,()=>this.createSymbol(!0));o.set(u,(o.get(u)??0)+1),s+=1}if(this.isText(r,c,l)||this.isIdentifier(r,c,l))for(let u of dIt(l)){let d=gp(this.textSymbols,u,()=>this.createSymbol());o.set(d,(o.get(d)??0)+1),s+=1}}this.nodeValency.set(n.id,s);for(let[c,l]of o.entries())gp(this.symbolToNode,c,()=>new Map).set(n.id,l),this.symbolValency.set(c,(this.symbolValency.get(c)??0)+l)}createSymbol(r=!1){let n=this.nextSymbolId++;return r&&this.identifierSymbols.add(n),n}isText(r,n,o){return r.parser.labeler.isText?.(n)??(n.children.length===0&&o.search(/\s/)>=0)}isIdentifier(r,n,o){return r.parser.labeler.isIdentifier?.(n)??(n.children.length===0&&AFr(o))}},bji=/^[a-zA-Z_]{2,}\w+$/;function AFr(t){return bji.test(t)}a(AFr,"isSymbol");function Tji(t){return t.toLowerCase()}a(Tji,"normalizeWord");function*dIt(t){for(let e of t.split(/\W/))AFr(e)&&(yield Tji(e))}a(dIt,"getTextSymbols");var Sji={MaxDirectorySize:50,MaxResults:50,Decay:.5,CacheSize:1e3,CacheTime:1e3*60,InvalidCacheTime:1e3*60*60*24,MaxFileBytes:1*1024*1024,MaxActiveSymbols:500,DebouncedRemovalThreshold:3,UpdateDebounceTimeout:500,SymbolCacheSize:1e5},h6e=class extends p6e{constructor(r,n){super();this.fileSystem=r;this.documentManager=n;this.config=Sji;this.symbolToDocuments=new Map;this.documentToSymbols=new Map;this.documentValency=new Map;this.cache=new LI(this.config.CacheSize,this.config.CacheTime);this.debouncedExpirationCount=new Map;this.updateDebounce=new Map;this.currentlyUpdating=new Set;this.isUpdatingIndex=!1;this.fileSystem.onDidFileChange(o=>{let s=o.document.uri;this.documentToSymbols.has(s)&&this.debouncedReadOrUpdateDocument(s)})}static{a(this,"IndexingSymbolContextProvider")}async getContext(r,n,o,s){super.updateSymbolIndex(r,o),await this.updateDocumentIndex(n);let c=super.getWeightedSymbols(n),l=super.getWeightedNodes(c),u=this.getWeightedDocuments(c);return[...l,...u]}getWeightedDocuments(r){let n=[];for(let{symbolId:o,symbolWeight:s}of r)for(let[c,l]of this.symbolToDocuments.get(o)??[]){let u=l/Math.max(1,this.documentValency.get(c)??1),d=Math.log(Math.max(this.documentToSymbols.size,1)/Math.max(1,this.symbolToDocuments.get(o)?.size??1)),p=s*u*d;n.push({source:"IndexingSymbolContextProvider.Text",uri:c,weight:p})}return n}debouncedReadOrUpdateDocument(r){this.updateDebounce.has(r)&&clearTimeout(this.updateDebounce.get(r)),this.updateDebounce.set(r,setTimeout(()=>{this.updateDebounce.delete(r),this.readOrUpdateDocument(r)},this.config.UpdateDebounceTimeout))}async readOrUpdateDocument(r){try{if(this.currentlyUpdating.has(r))return;if(this.documentManager.normalizeUri(r)===void 0){this.removeFromIndex(r);return}this.currentlyUpdating.add(r);let n=await this.fileSystem.readFileString({uri:r}),o=new Map,s=0;for(let l of dIt(n))o.set(l,(o.get(l)??0)+1),s++;let c=[];for(let[l,u]of o.entries()){let d=gp(this.textSymbols,l,()=>this.createSymbol(!1));gp(this.symbolToDocuments,d,()=>new Map).set(r,u),c.push(d)}this.documentValency.set(r,s),this.documentToSymbols.set(r,c)}catch{this.removeFromIndex(r)}finally{this.currentlyUpdating.delete(r)}}async updateDocumentIndex(r){if(!this.isUpdatingIndex){this.isUpdatingIndex=!0;try{for(let s of this.documentToSymbols.keys())this.debouncedExpirationCount.set(s,(this.debouncedExpirationCount.get(s)??0)+1);let n=a(s=>this.documentManager.normalizeUri(s)!==void 0,"filter");for await(let{uri:s}of uIt(this.fileSystem,r.documents,this.config,this.cache,n))this.documentToSymbols.has(s)||await this.readOrUpdateDocument(s),this.debouncedExpirationCount.delete(s);let o=[...this.debouncedExpirationCount.entries()].filter(([s,c])=>c>=this.config.DebouncedRemovalThreshold&&!this.currentlyUpdating.has(s)&&!this.updateDebounce.has(s));for(let[s]of o)this.removeFromIndex(s),this.debouncedExpirationCount.delete(s)}finally{this.isUpdatingIndex=!1}}}removeFromIndex(r){this.documentValency.delete(r);for(let n of this.documentToSymbols.get(r)??[]){let o=this.symbolToDocuments.get(n);o?.delete(r),o?.size===0&&this.symbolToDocuments.delete(n)}this.documentToSymbols.delete(r)}};f();function yFr(t){return t.nodeId!==void 0}a(yFr,"isNodeLocation");var EFr={"RecentDocumentProvider.RecentlyFocused":{maxEventCount:100,halflife:1e3*60*5,isImpulse:!1},"RecentDocumentProvider.RecentlyEdited":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!0},"RecentDocumentProvider.RecentlyOpen":{maxEventCount:100,halflife:1e3*60*5,isImpulse:!1},RecentCompletionsRequestProvider:{maxEventCount:100,halflife:1e3*60*5,isImpulse:!0},"ExtensionActivityProvider.CurrentSelection":{maxEventCount:1,halflife:1e5,isImpulse:!0},"ExtensionActivityProvider.PrimarySelection":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1},"ExtensionActivityProvider.Selection":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1},"ExtensionActivityProvider.VisibleRange":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1}},m6e=class extends Ox{constructor(){super(...arguments);this.eventsByType=new Map;this.nextId=0}static{a(this,"RecentActivityProvider")}getContext(r,n,o,s){let c=performance.now(),l=[];for(let[u,d]of this.eventsByType.entries()){let p=EFr[u],h=[...d.values()].sort((g,A)=>A.timestamp-g.timestamp),m=1;for(let g of h){this.resolveRanges(g,o);let A=.5**((c-g.timestamp)/p.halflife),y=p.isImpulse?A:m-A;m=A;for(let E of g.locations)yFr(E)?l.push({weight:y,uri:E.uri,id:E.nodeId,source:u}):l.push({weight:y,uri:E.uri,source:u})}}return Promise.resolve(l)}resolveRanges(r,n){if(r.isFullyResolved)return;let o=!0,s=[];for(let c of r.locations)if(yFr(c))s.push(c);else if(c.range&&c.range.start!==void 0&&c.range.end!==void 0){let l=n.getDocument(c.uri)?.document;if(l!==void 0){let u=l.findNode(l.document.offsetAt(c.range.start),l.document.offsetAt(c.range.end));s.push({uri:c.uri,nodeId:u.id})}else o=!1,s.push(c)}else s.push({uri:c.uri,nodeId:YE});r.locations=s,r.isFullyResolved=o}recordEvent(r,n,o){let s=EFr[r];if(s===void 0)return;let c={timestamp:o,locations:n,isFullyResolved:!1};gp(this.eventsByType,r,()=>new $r(s.maxEventCount)).set(++this.nextId,c)}};f();var g6e=class extends Ox{constructor(){super(...arguments);this.nodeParent=new Map;this.nodeChildren=new Map}static{a(this,"TreeProximityProvider")}getContext(r,n,o,s){this.updateIndex(r,o,s);let c=new Map,l=new Map,u=new Map;for(let{id:p,weight:h}of n.nodes){let m=this.nodeParent.get(p)??YE,g=this.nodeChildren.get(m)?.size??0;g>0&&c.set(m,(c.get(m)??0)+h/g);let A=this.nodeChildren.get(p);if(A&&A.size>0)for(let E of A)l.set(E,(l.get(E)??0)+h/A.size);let y=this.nodeChildren.get(m);if(y&&y.size>1)for(let E of y)E!==p&&u.set(E,(u.get(E)??0)+h/y.size)}let d=[...[...c.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Parent"})),...[...l.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Children"})),...[...u.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Siblings"}))];return Promise.resolve(d)}updateIndex(r,n,o){for(let{id:s}of r.getInvalidatedNodes())this.nodeParent.delete(s),this.nodeChildren.delete(s);for(let{id:s}of r.getCreatedNodes()){let c=n.getNode(s),l=new Set;if(c!==void 0)for(let u of c.node.children)this.nodeParent.set(u.id,s),l.add(u.id);l.size>0&&this.nodeChildren.set(s,l)}}};f();function Iji(t){return t.id!==void 0}a(Iji,"isNodeItem");function xji(t){return!("uri"in t)&&!("id"in t)}a(xji,"isNullItem");var CFr={"RecentDocumentProvider.RecentlyOpen":.1,"RecentDocumentProvider.RecentlyFocused":.1,"RecentDocumentProvider.RecentlyEdited":.1,RecentCompletionsRequestProvider:1,"ExtensionActivityProvider.CurrentSelection":5,"ExtensionActivityProvider.PrimarySelection":2,"ExtensionActivityProvider.Selection":.2,"ExtensionActivityProvider.VisibleRange":1,FileDirectoryDocumentProvider:.05,"SymbolContextProvider.Identifiers":.2,"SymbolContextProvider.Text":.2,"IndexingSymbolContextProvider.Text":1,"TreeProximityProvider.Parent":.3,"TreeProximityProvider.Children":.3,"TreeProximityProvider.Siblings":.3,"ExtensionReferenceProvider.References":.2,"ExtensionReferenceProvider.Definitions":1};function _Fr(t){return t in CFr}a(_Fr,"isSourceId");var S6="64f5ff7d-e507-4558-81cf-3bdacc3c5c00",Lre=class{static{a(this,"WorkspaceContextWeights")}constructor(e){let r=new Map;for(let{uri:n,weight:o}of e)r.set(n,(r.get(n)??0)+o);this.documents=[...r.entries()].map(([n,o])=>({uri:n,weight:o})).sort((n,o)=>o.weight-n.weight),this.docWeights=r,this.nodes=e.filter(({id:n})=>n!==YE),this.nodeWeights=new Map(e.map(({id:n,weight:o})=>[n,o]))}getNodeWeight(e){return this.nodeWeights.get(e)??0}getDocumentWeight(e){return this.docWeights.get(e)??0}},A6e=class{constructor(e,r){this.activeContext=e;this.config=r;this.sourceWeights=CFr;this.sourceContext=new Map;this.prevUpdateTime=void 0;this.prevItems=[];this.weights=new Lre([])}static{a(this,"WorkspaceContextCoordinator")}getWeights(e){if(e){let r=this.sourceContext.get(e);return r?new Lre(r.items):new Lre([])}return this.weights}updateWeights(){let e=new Map,r=0,n=this.config.StaleWeightHalflife;for(let[o,{items:s,updateTime:c}]of this.sourceContext.entries()){let l=this.sourceWeights[o]??0;if(l<=0||s.length===0)continue;let u=.5**(-Math.max(0,(this.prevUpdateTime??c)-c)/n);l*=u,r+=l,this.aggregateWeights(s,e,l,!0)}if(r>0){if(this.weights.nodes.length>0){let o=r*this.config.Laziness,s=this.prevItems;this.aggregateWeights(s,e,o,!0)}for(let[o,s]of e.entries()){let c=this.activeContext.getDocument(o)?.document;if(c===void 0)continue;let l=s.get(YE);if(l!==void 0&&l>0){s.delete(YE);let u=0;for(let d of s.values())u+=d;if(u<=0){let d=c.getAllIds(),p=l/Math.max(d.length,1);for(let h of d)s.set(h,p)}else for(let[d,p]of[...s.entries()])s.set(d,p+l*(p/u))}}this.prevItems=this.truncateAndNormalize(e),this.weights=new Lre(this.prevItems)}return this.prevUpdateTime=performance.now(),this.weights}pushWorkspaceContext(e,r){let n=performance.now(),o=this.addUriAndId(r),s=new Map;this.aggregateWeights(o,s);let c=this.truncateAndNormalize(s);this.sourceContext.set(e,{items:c,updateTime:n})}addUriAndId(e){return e.filter(r=>r.weight>0).map(r=>{if(xji(r))return{weight:r.weight,uri:S6,id:YE};let n=Iji(r)?r.id:YE,o=r.uri??this.activeContext.getUri(n)??S6;return o===S6&&(n=YE),{weight:r.weight,uri:o,id:n}})}aggregateWeights(e,r,n=1,o=!1){for(let{uri:s,id:c,weight:l}of e){if(l<=0||isNaN(l))continue;let u=gp(r,s,()=>new Map),d=YE;(!o||this.activeContext.getUri(c)!==void 0)&&(d=c),u.set(d,(u.get(d)??0)+l*n)}}truncateAndNormalize(e){let r=[],n=new Map,o=0;for(let[u,d]of e.entries()){let p=u!==S6?this.activeContext.normalizeUri(u)??S6:S6;for(let[h,m]of d.entries())u===S6||h===YE?n.set(p,(n.get(p)??0)+m):r.push({uri:p,id:h,weight:m}),o+=m}if(o<=0)return[];n.delete(S6),r.sort((u,d)=>d.weight-u.weight);for(let{uri:u,weight:d}of r.slice(this.config.MaxActiveNodes,r.length))n.set(u,(n.get(u)??0)+d);let s=[...n.entries()].sort((u,d)=>d[1]-u[1]).slice(0,this.config.MaxActiveFiles).map(([u,d])=>({uri:u,id:YE,weight:d}));return r.slice(0,this.config.MaxActiveNodes).concat(s).sort((u,d)=>d.weight-u.weight).map(u=>({...u,weight:u.weight/o}))}};f();f();f();var fIt=class{constructor(e,r,n,o=!1){this.id=e;this.parts=r;this.text=n;this.canMerge=o}static{a(this,"ContextNode")}get startOffset(){return this.parts[0].root.startOffset}get endOffset(){return this.parts[this.parts.length-1].root.endOffset}get syntaxRoots(){return this.parts.map(e=>e.root)}get children(){return this.parts.flatMap(e=>e.children)}get syntaxLimits(){return this.children.flatMap(e=>e.syntaxRoots)}*syntaxNodes(){let e=new Set(this.syntaxLimits.map(r=>r.id));for(let r of this.syntaxRoots)yield*vFr(r,e)}findChild(e,r){if(ethis.endOffset||r=r)break;s.root.endOffset=r)break;c.endOffsets.root.startOffset-c.root.startOffset);let n=Rji(e,this.document),o=new fIt(rd(),e,n,r);return this.nodeById.set(o.id,o),o}buildTree(){let e=this.buildRecursively(this._syntaxRoot);return this.createNode([{root:this._syntaxRoot,children:e}])}buildRecursively(e){if(e.endOffset-e.startOffset({root:o,children:this.buildRecursively(o)}));if(this.canMergeChildren(e))return this.mergeChildren(r);let n=[];for(let{root:o,children:s}of r){if(this.canBeNode(o)&&o.endOffset-o.startOffset-s.reduce((l,u)=>l+(u.endOffset-u.startOffset),0)>=this.minSize){n.push(this.createNode([{root:o,children:s}]));continue}n.push(...s)}return n}mergeChildren(e){if(e.length===0)return[];e.sort((m,g)=>m.root.startOffset-g.root.startOffset);let r=e[e.length-1].root.endOffset-e[0].root.startOffset,n=[];for(let m of e){let g=m.root.endOffset-m.root.startOffset;for(let A of m.children){let y=A.endOffset-A.startOffset;g-=y,r-=y}n.push(g)}if(rm.children);let o=[0],s=0,c=null,l={line:-1,size:-1},u=e[0].root.startOffset,d=e[0].root.range.start.line;for(let m=0;mthis.minSize&&sl.line||A.line==l.line&&A.size>l.size)&&(l=A,c=m)}u=g.root.endOffset,d=g.root.range.end.line,s>=this.maxSize&&(c=c??m,o.push(c+1),m=c,s=0,c=null,l={line:-1,size:-1},u=e[m+1]?.root.startOffset,d=e[m+1]?.root.range.start.line)}o.length==1?o.push(e.length):o[o.length-1]!==e.length&&(o[o.length-1]=e.length);let p=[],h=!1;for(let m=0;mwji}canBeNode(e){return this.parser.labeler.canBeNode?.(e)??!0}};function Rji(t,e){if(t.length===0)return[""];let r=[],n=e.positionAt(t[0].root.startOffset);for(let s of t.flatMap(c=>c.children).sort((c,l)=>c.startOffset-l.startOffset)){let c=e.positionAt(s.startOffset);r.push(e.getText({start:n,end:c})),n=e.positionAt(s.endOffset)}let o=e.positionAt(t[t.length-1].root.endOffset);return r.push(e.getText({start:n,end:o})),r}a(Rji,"buildText");function*vFr(t,e){yield t;for(let r of t.children)e.has(r.id)||(yield*vFr(r,e))}a(vFr,"walk");f();f();f();var E6e=class{constructor(e,r,n,o,s,c){this.id=e;this.raw=r;this.children=n;this.source="indentation";this.parent=null;let l={start:{line:o,character:0},end:{line:s,character:c.lineAt(s).text.length}},u=c.getText(l),d=u.search(/\S/);if(d===-1){let m={line:s,character:0};this.startOffset=c.offsetAt(m),this.endOffset=this.startOffset,this.range={start:m,end:m};return}let p=u.search(/\S(?!.*\S)/s),h=c.offsetAt(l.start);this.startOffset=h+d,this.endOffset=h+p+1,this.range={start:c.positionAt(this.startOffset),end:c.positionAt(this.endOffset)}}static{a(this,"IndentationNode")}get type(){return this.raw.type}};function pIt(t,e,r){let n=t.subs.map(u=>({subtree:u,node:pIt(u,e,r)})).filter(u=>u.node!==null).sort((u,d)=>u.node.startOffset-d.node.startOffset),o=[],s=e;for(let u=n.length-1;u>=0;u--){let{subtree:d,node:p}=n[u];if(p.range.end.line>=s){let h=pIt(d,s,r);h!==null&&(o.push(h),s=Math.min(h.range.start.line,s))}else o.push(p),s=Math.min(p.range.start.line,s)}o.sort((u,d)=>u.startOffset-d.startOffset);let c=e,l=0;if(o.length>0&&(c=Math.min(c,o[0].range.start.line),l=Math.max(l,o[o.length-1].range.end.line)),(t.type==="blank"||t.type==="line")&&(c=Math.min(c,t.lineNumber),l=Math.max(l,t.lineNumber),t.type==="blank"&&c===l))return null;if(l=Math.min(l,e-1),c<=l){let u=new E6e(rd(),t,o,c,l,r);for(let d of o)d.parent=u;return u}return null}a(pIt,"recursivelyBuildNode");function bFr(t){let e=pj(t.getText(),t.detectedLanguageId);return pIt(e,t.lineCount,t)??new E6e(rd(),e,[],0,t.lineCount-1,t)}a(bFr,"parse");var C6e={source:"indentation",parse:bFr,update(t,e){return{root:bFr(e),remapper:a(()=>{},"remapper")}},dispose:a(()=>{},"dispose"),labeler:{isIdentifier:a(t=>!1,"isIdentifier"),isText:a(t=>!0,"isText")}};f();f();var SFr=de(bre());function TFr(t){return{line:t.row,character:t.column}}a(TFr,"asPosition");var VP=class{constructor(e,r,n,o){this.nodeList=e;this.mergeList=r;this.identifierList=n;this.textList=o}static{a(this,"BasicNodeLabeler")}canBeNode(e){return this.nodeList.has(e.type)}canMergeChildren(e){return this.mergeList.has(e.type)}isIdentifier(e){return this.identifierList.has(e.type)}isText(e){return this.textList.has(e.type)}},I6=class{constructor(e,r,n={}){this.language=e;this.source=r;this.labeler=n}static{a(this,"TreeSitterParser")}dispose(){}parse(e){let r,n;try{return r=new SFr.default,r.setLanguage(this.language),n=r.parse(e.getText()),this.snapshot(n.rootNode,null)}catch{return C6e.parse(e)}finally{n?.delete(),r?.delete()}}update(e,r){return{root:this.parse(r),remapper:a(()=>{},"remapper")}}snapshot(e,r){let n={id:e.id,source:this.source,type:e.type,startOffset:e.startIndex,endOffset:e.endIndex,range:{start:TFr(e.startPosition),end:TFr(e.endPosition)},parent:r,children:[]};return n.children=e.namedChildren.map(o=>this.snapshot(o,n)),n}};var Pji=new Set(["class_specifier","function_definition","expression_statement","if_statement","for_statement","while_statement","try_statement","switch_statement","compound_statement"]),kji=new Set(["translation_unit","compound_statement","parameter_list","argument_list"]),Nji=new Set(["identifier"]),Dji=new Set(["string","comment"]),IFr=new VP(Pji,kji,Nji,Dji);f();var Mji=new Set(["class_declaration","method_declaration","expression_statement","if_statement","for_statement","while_statement","try_statement","switch_statement"]),Oji=new Set(["program","block","object_creation_expression","formal_parameters","argument_list","array_initializer"]),Bji=new Set(["identifier"]),Lji=new Set(["string_literal","line_comment","block_comment"]),xFr=new VP(Mji,Oji,Bji,Lji);f();var Fji=new Set(["class_definition","function_definition","expression_statement","if_statement","for_statement","while_statement","with_statement","try_statement"]),Uji=new Set(["module","block","parameters","dictionary","list"]),Qji=new Set(["identifier"]),qji=new Set(["string","comment"]),wFr=new VP(Fji,Uji,Qji,qji);f();var Gji=new Set(["class_declaration","function_declaration","arrow_function","method_definition","expression_statement","if_statement","while_statement","try_statement","for_statement","switch_statement"]),Hji=new Set(["program","statement_block","formal_parameters","arguments","object","array"]),jji=new Set(["identifier"]),$ji=new Set(["string","comment"]),RFr=new VP(Gji,Hji,jji,$ji);var PFr=de(bre());async function kFr(t){await PFr.default.init();try{let e=await ISt(t);switch(t){case"python":return new I6(e,"tree-sitter-python",wFr);case"typescript":return new I6(e,"tree-sitter-typescript",RFr);case"java":return new I6(e,"tree-sitter-java",xFr);case"cpp":return new I6(e,"tree-sitter-cpp",IFr);default:return new I6(e,"tree-sitter-generic")}}catch{return C6e}}a(kFr,"getParser");var hIt=class{constructor(e,r){this.created=e;this.invalidated=r;this.updatedDocuments=Array.from(new Set([...e.entries(),...r.entries()].filter(([n,o])=>o.size>0).map(([n,o])=>n)))}static{a(this,"WorkspaceContextChanges")}getInvalidatedNodes(e){return this.getNodes(this.invalidated,e)}getCreatedNodes(e){return this.getNodes(this.created,e)}getNodes(e,r){return r===void 0?Array.from(e.entries()).flatMap(([n,o])=>[...o].map(s=>({uri:n,id:s}))):Array.from(e.get(r)??[]).map(n=>({uri:r,id:n}))}},_6e=class{constructor(e,r){this.item=e;this.disposalCallback=r}static{a(this,"CachedItem")}dispose(){this.disposalCallback(this.item)}},NFr=500,v6e=class{constructor(e,r){this.fileSystem=e;this.config=r;this.targetSet=new Set;this.activeDocuments=new Map;this.nodeToDoc=new Map;this.createdNodes=new Map;this.invalidatedNodes=new Map;this.parsers=new Map;this.staleDocuments=new Set;this.pendingUpdates=new Map;this.uriCache=new $r(NFr);this.allowedExtensions=new Set(aj);this.invalidDocumentCache=new LI(NFr,this.config.InvalidCacheTime),this.cachedDocuments=new lDe(this.config.MaxActiveFiles),this.fileSystem.onDidFileChange(n=>this.handleFileChange(n.document.uri))}static{a(this,"WorkspaceContextDocumentManager")}setAllowedLanguages(e){this.allowedExtensions=new Set(e.flatMap(r=>KM[r]?.extensions??[]))}getActiveDocuments(){return Array.from(this.activeDocuments.values())}getNode(e){let r=this.nodeToDoc.get(e);if(r===void 0)return;let n=this.getDocument(r);if(n===void 0)return;let o=n.document.getNode(e);if(o!==void 0)return{...n,node:o}}getDocument(e){let r=this.activeDocuments.get(e);if(r!==void 0)return{document:r,isActive:!0};let n=this.cachedDocuments.get(e);if(n!==void 0)return{document:n.item,isActive:!1}}getUri(e){return this.nodeToDoc.get(e)}normalizeUri(e){let r,n=this.uriCache.get(e);if(n!==null){if(n!==void 0)r=n;else try{if(fDe(e),r=ha(e),!(this.fileSystem.getWorkspaceFolder({uri:r})!==void 0)){this.uriCache.set(e,null);return}this.uriCache.set(e,r)}catch{this.uriCache.set(e,null);return}if(!(!this.allowedExtensions.has(tbr(r))||this.invalidDocumentCache.has(r)))return r}}dispose(){this.parsers.clear(),this.activeDocuments.clear(),this.cachedDocuments.clear()}updateDocuments(e){this.targetSet.clear();let r=[],n=e.documents.map(({uri:o})=>this.normalizeUri(o)).filter(o=>o!==void 0).slice(0,this.config.MaxActiveFiles);for(let o of n)this.targetSet.add(o),r.push(this.updateDocument(o));for(let o of[...this.activeDocuments.keys()])this.targetSet.has(o)||this.deactivateDocument(o);return Promise.all(r)}popChanges(){let e=new hIt(this.createdNodes,this.invalidatedNodes);return this.createdNodes=new Map,this.invalidatedNodes=new Map,e}isKnownDocument(e){return this.activeDocuments.has(e)||this.cachedDocuments.has(e)||this.pendingUpdates.has(e)}deactivateDocument(e){let r=this.activeDocuments.get(e);r!==void 0&&(this.activeDocuments.delete(e),this.pendingUpdates.has(e)||this.cachedDocuments.set(e,new _6e(r,n=>this.disposeDocument(n))))}async updateDocument(e){if(this.pendingUpdates.has(e))return;let r=new zE;this.pendingUpdates.set(e,r.promise);let n;this.activeDocuments.has(e)?n=this.activeDocuments.get(e):this.cachedDocuments.has(e)&&(n=this.cachedDocuments.get(e).item,this.cachedDocuments.uncache(e)),(n===void 0||this.staleDocuments.has(e))&&(this.staleDocuments.delete(e),n=await this.createUpdatedDocument(e,n)),n!==void 0&&(this.targetSet.has(e)?this.activeDocuments.set(e,n):(this.activeDocuments.delete(e),this.cachedDocuments.set(e,new _6e(n,o=>this.disposeDocument(o))))),this.pendingUpdates.delete(e),r.resolve()}async createUpdatedDocument(e,r){let n=await this.readTextDocument(e);if(n===void 0){r!==void 0&&this.disposeDocument(r);return}let o;try{o=await this.getParser(n.detectedLanguageId)}catch{this.invalidDocumentCache.set(e,!0),r!==void 0&&this.disposeDocument(r);return}if(r!==void 0)if(n.detectedLanguageId!==r.document.detectedLanguageId)this.disposeDocument(r);else{let c=new Set(r.getAllIds());r.update(n);let l=new Set(r.getAllIds()),u=[...l].filter(p=>!c.has(p)),d=[...c].filter(p=>!l.has(p));return this.recordDocumentChanges(e,{created:u,invalidated:d}),r}let s=new y6e(n,o,this.config.MinNodeSize);return this.recordDocumentChanges(e,{created:s.getAllIds(),invalidated:[]}),s}disposeDocument(e){this.recordDocumentChanges(e.uri,{created:[],invalidated:e.getAllIds()})}recordDocumentChanges(e,r){let n=gp(this.createdNodes,e,()=>new Set),o=gp(this.invalidatedNodes,e,()=>new Set);for(let s of r.created)n.add(s),this.nodeToDoc.set(s,e);for(let s of r.invalidated)n.has(s)?n.delete(s):o.add(s),this.nodeToDoc.delete(s)}async getParser(e){let r=this.parsers.get(e);return r===void 0&&(r=await kFr(e),this.parsers.set(e,r)),r}async readTextDocument(e){if(this.invalidDocumentCache.has(e)||this.normalizeUri(e)===void 0)return;let r=await this.fileSystem.readValidFile({uri:e});if(r.status!=="valid"||r.document.uri!==e){this.invalidDocumentCache.set(e,!0);return}return r.document}handleFileChange(e){this.isKnownDocument(e)&&this.staleDocuments.add(e)}};f();var Vji="WorkspaceContextWorker";function mIt(t){let e=t;return e?.workerId===Vji&&typeof e?.cwd=="string"&&Array.isArray(e?.workspaceRoots)&&e.workspaceRoots.every(r=>typeof r=="string")}a(mIt,"isContextWorkerData");var Wji=["RequestUpdate","Exit","ReadAndValidateUri","Error","UpdateResponse","FlushUpdates","ReadAndValidateResponse"];function DFr(t){if(typeof t!="object"||t===null)return;let e=t.messageType;return Wji.includes(e)?e:void 0}a(DFr,"getContextMessageType");var x6=class{constructor(e,r,n){this.id=e;this.messageType=r;this.data=n}static{a(this,"ContextMessage")}};f();AIt();f();var FFr;(function(t){function e(r){return typeof r=="string"}a(e,"is"),t.is=e})(FFr||(FFr={}));var yIt;(function(t){function e(r){return typeof r=="string"}a(e,"is"),t.is=e})(yIt||(yIt={}));var UFr;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}a(e,"is"),t.is=e})(UFr||(UFr={}));var T6e;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}a(e,"is"),t.is=e})(T6e||(T6e={}));var Lg;(function(t){function e(n,o){return n===Number.MAX_VALUE&&(n=T6e.MAX_VALUE),o===Number.MAX_VALUE&&(o=T6e.MAX_VALUE),{line:n,character:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&st.uinteger(o.line)&&st.uinteger(o.character)}a(r,"is"),t.is=r})(Lg||(Lg={}));var ul;(function(t){function e(n,o,s,c){if(st.uinteger(n)&&st.uinteger(o)&&st.uinteger(s)&&st.uinteger(c))return{start:Lg.create(n,o),end:Lg.create(s,c)};if(Lg.is(n)&&Lg.is(o))return{start:n,end:o};throw new Error(`Range#create called with invalid arguments[${n}, ${o}, ${s}, ${c}]`)}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&Lg.is(o.start)&&Lg.is(o.end)}a(r,"is"),t.is=r})(ul||(ul={}));var S6e;(function(t){function e(n,o){return{uri:n,range:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&ul.is(o.range)&&(st.string(o.uri)||st.undefined(o.uri))}a(r,"is"),t.is=r})(S6e||(S6e={}));var QFr;(function(t){function e(n,o,s,c){return{targetUri:n,targetRange:o,targetSelectionRange:s,originSelectionRange:c}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&ul.is(o.targetRange)&&st.string(o.targetUri)&&ul.is(o.targetSelectionRange)&&(ul.is(o.originSelectionRange)||st.undefined(o.originSelectionRange))}a(r,"is"),t.is=r})(QFr||(QFr={}));var EIt;(function(t){function e(n,o,s,c){return{red:n,green:o,blue:s,alpha:c}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&st.numberRange(o.red,0,1)&&st.numberRange(o.green,0,1)&&st.numberRange(o.blue,0,1)&&st.numberRange(o.alpha,0,1)}a(r,"is"),t.is=r})(EIt||(EIt={}));var qFr;(function(t){function e(n,o){return{range:n,color:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&ul.is(o.range)&&EIt.is(o.color)}a(r,"is"),t.is=r})(qFr||(qFr={}));var GFr;(function(t){function e(n,o,s){return{label:n,textEdit:o,additionalTextEdits:s}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&st.string(o.label)&&(st.undefined(o.textEdit)||Ure.is(o))&&(st.undefined(o.additionalTextEdits)||st.typedArray(o.additionalTextEdits,Ure.is))}a(r,"is"),t.is=r})(GFr||(GFr={}));var HFr;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(HFr||(HFr={}));var jFr;(function(t){function e(n,o,s,c,l,u){let d={startLine:n,endLine:o};return st.defined(s)&&(d.startCharacter=s),st.defined(c)&&(d.endCharacter=c),st.defined(l)&&(d.kind=l),st.defined(u)&&(d.collapsedText=u),d}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&st.uinteger(o.startLine)&&st.uinteger(o.startLine)&&(st.undefined(o.startCharacter)||st.uinteger(o.startCharacter))&&(st.undefined(o.endCharacter)||st.uinteger(o.endCharacter))&&(st.undefined(o.kind)||st.string(o.kind))}a(r,"is"),t.is=r})(jFr||(jFr={}));var CIt;(function(t){function e(n,o){return{location:n,message:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&S6e.is(o.location)&&st.string(o.message)}a(r,"is"),t.is=r})(CIt||(CIt={}));var $Fr;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})($Fr||($Fr={}));var VFr;(function(t){t.Unnecessary=1,t.Deprecated=2})(VFr||(VFr={}));var WFr;(function(t){function e(r){let n=r;return st.objectLiteral(n)&&st.string(n.href)}a(e,"is"),t.is=e})(WFr||(WFr={}));var I6e;(function(t){function e(n,o,s,c,l,u){let d={range:n,message:o};return st.defined(s)&&(d.severity=s),st.defined(c)&&(d.code=c),st.defined(l)&&(d.source=l),st.defined(u)&&(d.relatedInformation=u),d}a(e,"create"),t.create=e;function r(n){var o;let s=n;return st.defined(s)&&ul.is(s.range)&&st.string(s.message)&&(st.number(s.severity)||st.undefined(s.severity))&&(st.integer(s.code)||st.string(s.code)||st.undefined(s.code))&&(st.undefined(s.codeDescription)||st.string((o=s.codeDescription)===null||o===void 0?void 0:o.href))&&(st.string(s.source)||st.undefined(s.source))&&(st.undefined(s.relatedInformation)||st.typedArray(s.relatedInformation,CIt.is))}a(r,"is"),t.is=r})(I6e||(I6e={}));var Fre;(function(t){function e(n,o,...s){let c={title:n,command:o};return st.defined(s)&&s.length>0&&(c.arguments=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.string(o.title)&&st.string(o.command)}a(r,"is"),t.is=r})(Fre||(Fre={}));var Ure;(function(t){function e(s,c){return{range:s,newText:c}}a(e,"replace"),t.replace=e;function r(s,c){return{range:{start:s,end:s},newText:c}}a(r,"insert"),t.insert=r;function n(s){return{range:s,newText:""}}a(n,"del"),t.del=n;function o(s){let c=s;return st.objectLiteral(c)&&st.string(c.newText)&&ul.is(c.range)}a(o,"is"),t.is=o})(Ure||(Ure={}));var _It;(function(t){function e(n,o,s){let c={label:n};return o!==void 0&&(c.needsConfirmation=o),s!==void 0&&(c.description=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&st.string(o.label)&&(st.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(st.string(o.description)||o.description===void 0)}a(r,"is"),t.is=r})(_It||(_It={}));var Qre;(function(t){function e(r){let n=r;return st.string(n)}a(e,"is"),t.is=e})(Qre||(Qre={}));var zFr;(function(t){function e(s,c,l){return{range:s,newText:c,annotationId:l}}a(e,"replace"),t.replace=e;function r(s,c,l){return{range:{start:s,end:s},newText:c,annotationId:l}}a(r,"insert"),t.insert=r;function n(s,c){return{range:s,newText:"",annotationId:c}}a(n,"del"),t.del=n;function o(s){let c=s;return Ure.is(c)&&(_It.is(c.annotationId)||Qre.is(c.annotationId))}a(o,"is"),t.is=o})(zFr||(zFr={}));var vIt;(function(t){function e(n,o){return{textDocument:n,edits:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&xIt.is(o.textDocument)&&Array.isArray(o.edits)}a(r,"is"),t.is=r})(vIt||(vIt={}));var bIt;(function(t){function e(n,o,s){let c={kind:"create",uri:n};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(c.options=o),s!==void 0&&(c.annotationId=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="create"&&st.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||st.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||st.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||Qre.is(o.annotationId))}a(r,"is"),t.is=r})(bIt||(bIt={}));var TIt;(function(t){function e(n,o,s,c){let l={kind:"rename",oldUri:n,newUri:o};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),c!==void 0&&(l.annotationId=c),l}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="rename"&&st.string(o.oldUri)&&st.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||st.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||st.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||Qre.is(o.annotationId))}a(r,"is"),t.is=r})(TIt||(TIt={}));var SIt;(function(t){function e(n,o,s){let c={kind:"delete",uri:n};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(c.options=o),s!==void 0&&(c.annotationId=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="delete"&&st.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||st.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||st.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||Qre.is(o.annotationId))}a(r,"is"),t.is=r})(SIt||(SIt={}));var IIt;(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(o=>st.string(o.kind)?bIt.is(o)||TIt.is(o)||SIt.is(o):vIt.is(o)))}a(e,"is"),t.is=e})(IIt||(IIt={}));var YFr;(function(t){function e(n){return{uri:n}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.string(o.uri)}a(r,"is"),t.is=r})(YFr||(YFr={}));var KFr;(function(t){function e(n,o){return{uri:n,version:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.string(o.uri)&&st.integer(o.version)}a(r,"is"),t.is=r})(KFr||(KFr={}));var xIt;(function(t){function e(n,o){return{uri:n,version:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.string(o.uri)&&(o.version===null||st.integer(o.version))}a(r,"is"),t.is=r})(xIt||(xIt={}));var JFr;(function(t){function e(n,o,s,c){return{uri:n,languageId:o,version:s,text:c}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.string(o.uri)&&st.string(o.languageId)&&st.integer(o.version)&&st.string(o.text)}a(r,"is"),t.is=r})(JFr||(JFr={}));var wIt;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}a(e,"is"),t.is=e})(wIt||(wIt={}));var kye;(function(t){function e(r){let n=r;return st.objectLiteral(r)&&wIt.is(n.kind)&&st.string(n.value)}a(e,"is"),t.is=e})(kye||(kye={}));var XFr;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(XFr||(XFr={}));var ZFr;(function(t){t.PlainText=1,t.Snippet=2})(ZFr||(ZFr={}));var e9r;(function(t){t.Deprecated=1})(e9r||(e9r={}));var t9r;(function(t){function e(n,o,s){return{newText:n,insert:o,replace:s}}a(e,"create"),t.create=e;function r(n){let o=n;return o&&st.string(o.newText)&&ul.is(o.insert)&&ul.is(o.replace)}a(r,"is"),t.is=r})(t9r||(t9r={}));var r9r;(function(t){t.asIs=1,t.adjustIndentation=2})(r9r||(r9r={}));var n9r;(function(t){function e(r){let n=r;return n&&(st.string(n.detail)||n.detail===void 0)&&(st.string(n.description)||n.description===void 0)}a(e,"is"),t.is=e})(n9r||(n9r={}));var i9r;(function(t){function e(r){return{label:r}}a(e,"create"),t.create=e})(i9r||(i9r={}));var o9r;(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}a(e,"create"),t.create=e})(o9r||(o9r={}));var x6e;(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(e,"fromPlainText"),t.fromPlainText=e;function r(n){let o=n;return st.string(o)||st.objectLiteral(o)&&st.string(o.language)&&st.string(o.value)}a(r,"is"),t.is=r})(x6e||(x6e={}));var s9r;(function(t){function e(r){let n=r;return!!n&&st.objectLiteral(n)&&(kye.is(n.contents)||x6e.is(n.contents)||st.typedArray(n.contents,x6e.is))&&(r.range===void 0||ul.is(r.range))}a(e,"is"),t.is=e})(s9r||(s9r={}));var a9r;(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}a(e,"create"),t.create=e})(a9r||(a9r={}));var c9r;(function(t){function e(r,n,...o){let s={label:r};return st.defined(n)&&(s.documentation=n),st.defined(o)?s.parameters=o:s.parameters=[],s}a(e,"create"),t.create=e})(c9r||(c9r={}));var l9r;(function(t){t.Text=1,t.Read=2,t.Write=3})(l9r||(l9r={}));var u9r;(function(t){function e(r,n){let o={range:r};return st.number(n)&&(o.kind=n),o}a(e,"create"),t.create=e})(u9r||(u9r={}));var d9r;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(d9r||(d9r={}));var f9r;(function(t){t.Deprecated=1})(f9r||(f9r={}));var p9r;(function(t){function e(r,n,o,s,c){let l={name:r,kind:n,location:{uri:s,range:o}};return c&&(l.containerName=c),l}a(e,"create"),t.create=e})(p9r||(p9r={}));var h9r;(function(t){function e(r,n,o,s){return s!==void 0?{name:r,kind:n,location:{uri:o,range:s}}:{name:r,kind:n,location:{uri:o}}}a(e,"create"),t.create=e})(h9r||(h9r={}));var m9r;(function(t){function e(n,o,s,c,l,u){let d={name:n,detail:o,kind:s,range:c,selectionRange:l};return u!==void 0&&(d.children=u),d}a(e,"create"),t.create=e;function r(n){let o=n;return o&&st.string(o.name)&&st.number(o.kind)&&ul.is(o.range)&&ul.is(o.selectionRange)&&(o.detail===void 0||st.string(o.detail))&&(o.deprecated===void 0||st.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}a(r,"is"),t.is=r})(m9r||(m9r={}));var g9r;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(g9r||(g9r={}));var w6e;(function(t){t.Invoked=1,t.Automatic=2})(w6e||(w6e={}));var A9r;(function(t){function e(n,o,s){let c={diagnostics:n};return o!=null&&(c.only=o),s!=null&&(c.triggerKind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.typedArray(o.diagnostics,I6e.is)&&(o.only===void 0||st.typedArray(o.only,st.string))&&(o.triggerKind===void 0||o.triggerKind===w6e.Invoked||o.triggerKind===w6e.Automatic)}a(r,"is"),t.is=r})(A9r||(A9r={}));var y9r;(function(t){function e(n,o,s){let c={title:n},l=!0;return typeof o=="string"?(l=!1,c.kind=o):Fre.is(o)?c.command=o:c.edit=o,l&&s!==void 0&&(c.kind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&st.string(o.title)&&(o.diagnostics===void 0||st.typedArray(o.diagnostics,I6e.is))&&(o.kind===void 0||st.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Fre.is(o.command))&&(o.isPreferred===void 0||st.boolean(o.isPreferred))&&(o.edit===void 0||IIt.is(o.edit))}a(r,"is"),t.is=r})(y9r||(y9r={}));var E9r;(function(t){function e(n,o){let s={range:n};return st.defined(o)&&(s.data=o),s}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&ul.is(o.range)&&(st.undefined(o.command)||Fre.is(o.command))}a(r,"is"),t.is=r})(E9r||(E9r={}));var C9r;(function(t){function e(n,o){return{tabSize:n,insertSpaces:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&st.uinteger(o.tabSize)&&st.boolean(o.insertSpaces)}a(r,"is"),t.is=r})(C9r||(C9r={}));var _9r;(function(t){function e(n,o,s){return{range:n,target:o,data:s}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&ul.is(o.range)&&(st.undefined(o.target)||st.string(o.target))}a(r,"is"),t.is=r})(_9r||(_9r={}));var v9r;(function(t){function e(n,o){return{range:n,parent:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&ul.is(o.range)&&(o.parent===void 0||t.is(o.parent))}a(r,"is"),t.is=r})(v9r||(v9r={}));var b9r;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(b9r||(b9r={}));var T9r;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(T9r||(T9r={}));var S9r;(function(t){function e(r){let n=r;return st.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}a(e,"is"),t.is=e})(S9r||(S9r={}));var I9r;(function(t){function e(n,o){return{range:n,text:o}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&ul.is(o.range)&&st.string(o.text)}a(r,"is"),t.is=r})(I9r||(I9r={}));var x9r;(function(t){function e(n,o,s){return{range:n,variableName:o,caseSensitiveLookup:s}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&ul.is(o.range)&&st.boolean(o.caseSensitiveLookup)&&(st.string(o.variableName)||o.variableName===void 0)}a(r,"is"),t.is=r})(x9r||(x9r={}));var w9r;(function(t){function e(n,o){return{range:n,expression:o}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&ul.is(o.range)&&(st.string(o.expression)||o.expression===void 0)}a(r,"is"),t.is=r})(w9r||(w9r={}));var R9r;(function(t){function e(n,o){return{frameId:n,stoppedLocation:o}}a(e,"create"),t.create=e;function r(n){let o=n;return st.defined(o)&&ul.is(n.stoppedLocation)}a(r,"is"),t.is=r})(R9r||(R9r={}));var RIt;(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}a(e,"is"),t.is=e})(RIt||(RIt={}));var PIt;(function(t){function e(n){return{value:n}}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&(o.tooltip===void 0||st.string(o.tooltip)||kye.is(o.tooltip))&&(o.location===void 0||S6e.is(o.location))&&(o.command===void 0||Fre.is(o.command))}a(r,"is"),t.is=r})(PIt||(PIt={}));var P9r;(function(t){function e(n,o,s){let c={position:n,label:o};return s!==void 0&&(c.kind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return st.objectLiteral(o)&&Lg.is(o.position)&&(st.string(o.label)||st.typedArray(o.label,PIt.is))&&(o.kind===void 0||RIt.is(o.kind))&&o.textEdits===void 0||st.typedArray(o.textEdits,Ure.is)&&(o.tooltip===void 0||st.string(o.tooltip)||kye.is(o.tooltip))&&(o.paddingLeft===void 0||st.boolean(o.paddingLeft))&&(o.paddingRight===void 0||st.boolean(o.paddingRight))}a(r,"is"),t.is=r})(P9r||(P9r={}));var k9r;(function(t){function e(r){return{kind:"snippet",value:r}}a(e,"createSnippet"),t.createSnippet=e})(k9r||(k9r={}));var N9r;(function(t){function e(r,n,o,s){return{insertText:r,filterText:n,range:o,command:s}}a(e,"create"),t.create=e})(N9r||(N9r={}));var D9r;(function(t){function e(r){return{items:r}}a(e,"create"),t.create=e})(D9r||(D9r={}));var M9r;(function(t){t.Invoked=0,t.Automatic=1})(M9r||(M9r={}));var O9r;(function(t){function e(r,n){return{range:r,text:n}}a(e,"create"),t.create=e})(O9r||(O9r={}));var B9r;(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}a(e,"create"),t.create=e})(B9r||(B9r={}));var L9r;(function(t){function e(r){let n=r;return st.objectLiteral(n)&&yIt.is(n.uri)&&st.string(n.name)}a(e,"is"),t.is=e})(L9r||(L9r={}));var F9r;(function(t){function e(s,c,l,u){return new kIt(s,c,l,u)}a(e,"create"),t.create=e;function r(s){let c=s;return!!(st.defined(c)&&st.string(c.uri)&&(st.undefined(c.languageId)||st.string(c.languageId))&&st.uinteger(c.lineCount)&&st.func(c.getText)&&st.func(c.positionAt)&&st.func(c.offsetAt))}a(r,"is"),t.is=r;function n(s,c){let l=s.getText(),u=o(c,(p,h)=>{let m=p.range.start.line-h.range.start.line;return m===0?p.range.start.character-h.range.start.character:m}),d=l.length;for(let p=u.length-1;p>=0;p--){let h=u[p],m=s.offsetAt(h.range.start),g=s.offsetAt(h.range.end);if(g<=d)l=l.substring(0,m)+h.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");d=m}return l}a(n,"applyEdits"),t.applyEdits=n;function o(s,c){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),d=s.slice(l);o(u,c),o(d,c);let p=0,h=0,m=0;for(;p"?").join(", "),o=r?"COLLATE NOCASE ":"";return await this.query([`SELECT * FROM ${s0.tableName}`,this.innerJoinStatement,`WHERE ${ys.UnqualifiedName} ${o}IN (${n})`].join(` +`),e)}async querySymbolsUsingFullyQualifiedName(e){return this.query([`SELECT * FROM ${s0.tableName}`,this.innerJoinStatement,`WHERE ${ys.FullyQualifiedName} = ?`].join(` +`),[e])}async querySymbolsContainingPosition(e,r){return this.query([`SELECT * FROM ${s0.tableName}`,this.innerJoinStatement,`WHERE ${NM.tableName}.${x1.FilePath} = ? AND ${s0.tableName}.${ys.ExtentStart} <= ? AND (${s0.tableName}.${ys.ExtentStart} + ${s0.tableName}.${ys.ExtentLength}) >= ?`].join(` +`),[e,r,r])}async querySymbolsContainedByRange(e,r,n){return this.query([`SELECT * FROM ${s0.tableName}`,this.innerJoinStatement,`WHERE ${NM.tableName}.${x1.FilePath} = ? AND ${s0.tableName}.${ys.ExtentStart} >= ? AND (${s0.tableName}.${ys.ExtentStart} + ${s0.tableName}.${ys.ExtentLength}) <= ?`,`ORDER BY ${s0.tableName}.${ys.ExtentStart}`].join(` +`),[e,r,n])}async querySymbolsByQualifiedNamePrefix(e,r){return this.query([`SELECT * FROM ${s0.tableName}`,this.innerJoinStatement,`WHERE ${NM.tableName}.${x1.FilePath} = ? AND ${s0.tableName}.${ys.FullyQualifiedName} LIKE ?`,`ORDER BY ${s0.tableName}.${ys.ExtentStart}`].join(` +`),[e,`${r}%`])}async insertSymbols(e){return await this.symbolTable.insert(e,!1)}async insertDocument(e,r,n=!1){return await this.documentTable.insert([{filePath:e,lastWriteTimeUtc:r}],n)}async clearAllSymbolsFromDocument(e){return this.symbolTable.clearAllSymbolsFromDocument(e)}async updateDocumentTimestamp(e,r){return this.documentTable.updateTimestamp(e,r)}async deleteAllDocumentsWithPath(e){return this.documentTable.deleteAllWithPath(e)}async getAllDocuments(){return this.documentTable.getAllRows()}getDocument(e){return this.documentTable.getDocumentByFilePath(e)}async query(e,r){let n=await this.db;return n?(await this.documentTable.init,await this.symbolTable.init,o8e(n,e,r)):[]}};var a8e=class{static{a(this,"SQLStorageReaderWriter")}constructor(e){this.database=new s8e(e)}async close(){await this.database.close()}async insertOrReplaceDocumentSymbolsAsync(e,r,n){let o=await this.getOrCreateDocumentAsync(e,r);await this.database.clearAllSymbolsFromDocument(o.id),n.length>0&&await this.database.insertSymbols(n.map(s=>({documentId:o.id,fullyQualifiedName:s.fullyQualifiedName,unqualifiedName:s.unqualifiedName,commentStart:s.commentRange.start,commentLength:s.commentRange.length,nameStart:s.nameRange.start,nameLength:s.nameRange.length,bodyStart:s.bodyRange.start,bodyLength:s.bodyRange.length,extentStart:s.extentRange.start,extentLength:s.extentRange.length,symbolKind:s.kind,refKind:s.refKind}))),await this.database.updateDocumentTimestamp(e,r)}async addDocumentsAsync(e){for(let r of e)r=r.toLowerCase(),await this.database.insertDocument(r,Date.now(),!0)}async deleteDocumentAsync(e){return await this.database.deleteAllDocumentsWithPath(e.toLowerCase())}async updateDocumentTimestampAsync(e,r){return await this.database.updateDocumentTimestamp(e.toLowerCase(),r)}async fuzzyMatchSymbolsAsync(e,r){return Yte(await this.database.querySymbolsFuzzilyUsingUnqualifiedName(e,r))}async findPotentialDefinitionsAsync(e,r,n){let o=[],c=0;for(;cnew cT(e.filePath,e.fullyQualifiedName,e.unqualifiedName,new rl(e.commentStart,e.commentLength),new rl(e.nameStart,e.nameLength),new rl(e.bodyStart,e.bodyLength),new rl(e.extentStart,e.extentLength),e.symbolKind,e.refKind))}a(Yte,"symbolsToSymbolRanges");var l8e=de(require("fs/promises"));var c8e=class{static{a(this,"Index")}constructor(e,r,n,o){this.storage=new a8e(e),this.symbolExtractors=r,this.importExtractors=n,this.params=o}dispose(){return this.storage.close()}get reader(){return this.storage}async indexFile(e,r){let n=mo(e);if(!n)throw Error(`Cannot resolve a readable file path from ${e}`);let o;try{o=await l8e.stat(n)}catch{await this.storage.deleteDocumentAsync(e);return}let s=o.mtimeMs,c=await this.storage.getDocumentAsync(e);if(c&&c.lastWriteTimeUtc>=s)return;let l=this.symbolExtractors.get(r);if(!l)return;let u=(await l8e.readFile(n)).toString(),d=await l.extractSymbols(e,u),p=d;if(this.params?.mlcpEnableImports){let h=this.importExtractors.get(r);if(h){let m=await h.extractSymbols(e,u);p=[...d,...m]}}await this.storage.insertOrReplaceDocumentSymbolsAsync(e,s,p)}async getDocumentFilePaths(){return(await this.storage.getDocumentsAsync()).map(r=>r.filePath)}};f();function TIt(t){let e=t;return typeof e?.cwd=="string"&&Array.isArray(e?.indexWorkspaceRoots)&&e.indexWorkspaceRoots.every(r=>fVi(r))}a(TIt,"isIndexWorkerData");var SAe=class{static{a(this,"IndexNotification")}constructor(e){this.operation=e}},V8=class extends SAe{constructor(r,n){super(n);this.id=r;this.id=r}static{a(this,"IndexRequest")}},u8e=class extends SAe{constructor(r){super(wg.Cancel);this.messageIdToCancel=r}static{a(this,"CancellationNotification")}},wg={CreateIndex:"createIndex",AddOrInvalidated:"addOrInvalidated",GetContext:"getContext",Exit:"exit",Response:"response",RemoveIndex:"removeIndex",Cancel:"cancel",GetAllDocumentsInWorkspace:"getAllDocumentsInWorkspace"},d8e=class extends V8{constructor(r,n,o){super(r,wg.CreateIndex);this.baseWorkspaceFolderUri=n;this.databaseFilePath=o}static{a(this,"CreateIndexRequest")}},f8e=class extends V8{constructor(r,n){super(r,wg.RemoveIndex);this.baseWorkspaceFolderUri=n}static{a(this,"RemoveIndexRequest")}},p8e=class extends V8{constructor(r,n,o){super(r,wg.AddOrInvalidated);this.fileUri=n;this.languageId=o}static{a(this,"AddOrInvalidatedRequest")}},h8e=class extends V8{constructor(r,n){super(r,wg.GetAllDocumentsInWorkspace);this.baseWorkspaceFolderUri=n}static{a(this,"GetAllDocumentsRequest")}},m8e=class extends V8{constructor(r,n,o,s,c,l){super(r,wg.GetContext);this.fileUri=n;this.code=o;this.offset=s;this.languageId=c;this.params=l}static{a(this,"GetContextRequest")}},g8e=class extends V8{static{a(this,"ExitRequest")}constructor(e){super(e,wg.Exit)}},bx=class extends SAe{constructor(r,n,o){super(wg.Response);this.id=r;this.error=n;this.data=o;n&&"code"in n&&typeof n.code=="string"&&(this.code=n.code)}static{a(this,"ResponseMessage")}};function fVi(t){return"databaseFilePath"in t&&"rootPath"in t}a(fVi,"isIndexableWorkspaceFolder");var s9r=de(Dn()),W8=require("worker_threads");var A8e=class{static{a(this,"IndexInfo")}constructor(e,r){this.index=new c8e(e,VFr,WFr,r),this.contextRetreival=new t8e(this.index.reader,$Fr)}},SIt=class t{constructor(e,r,n){this.indices=new Map;this.cancellationTokens=new Map;this.params=n;for(let o of r){let s=Bo(o.rootPath);this.indices.set(s,new A8e(o.databaseFilePath,n))}this.port=e,this.port.on("message",o=>{this.dispatchMessage(o,this.indices,this.cancellationTokens)})}static{a(this,"IndexWorker")}async dispatchMessage(e,r,n){try{let o=new s9r.CancellationTokenSource;n.set(e.id,o);let s;switch(e.operation){case wg.AddOrInvalidated:s=await t.dispatchAddOrInvalidate(e,r,o.token);break;case wg.GetContext:s=await t.dispatchGetContext(e,r,o.token);break;case wg.Cancel:n.get(e.id)?.cancel(),s=new bx(e.id,void 0,void 0);break;case wg.Exit:s=await this.dispatchExit(e,r,o.token);break;case wg.CreateIndex:s=t.dispatchCreateIndex(e,r,o.token);break;case wg.RemoveIndex:s=await t.dispatchRemoveIndex(e,r,o.token);break;case wg.GetAllDocumentsInWorkspace:s=await t.GetAllDocumentsInWorkspaceRequest(e,r,o.token);break;default:this.port?.postMessage(new Error(`Unknown operation: ${e.operation}`))}s&&this.port?.postMessage(s),n.get(e.id)?.dispose(),n.delete(e.id)}catch(o){if(!(o instanceof Error))throw o;this.port?.postMessage(new bx(e.id,o,void 0))}}static async GetAllDocumentsInWorkspaceRequest(e,r,n){let o=Bo(e.baseWorkspaceFolderUri),s,c;return r.has(o)?c=await r.get(o).index.getDocumentFilePaths():s=new Error(`Index not found for ${e.baseWorkspaceFolderUri}`),new bx(e.id,s,c)}static async dispatchAddOrInvalidate(e,r,n){let o=Bo(e.fileUri),s=t.getIndexInfo(o,r)?.index,c;return s?await s.indexFile(e.fileUri,e.languageId):c=new Error(`Index not found for ${e.fileUri}`),new bx(e.id,c,void 0)}static async dispatchGetContext(e,r,n){let o=Bo(e.fileUri),s=t.getIndexInfo(o,r)?.contextRetreival,c,l;return s?l=await s.getStringifiedContextAtPositionAsync(e.fileUri,e.code,e.offset,e.languageId,e.params,8e3,n):c=new Error(`ContextRetrieval not found for ${e.fileUri}`),new bx(e.id,c,l)}async dispatchExit(e,r,n){for(let o of r.values())await o.index.dispose();r.clear(),this.port?.postMessage(new bx(e.id,void 0,void 0)),this.port?.close()}static dispatchCreateIndex(e,r,n){let o=Bo(e.baseWorkspaceFolderUri);return r.has(o)||r.set(o,new A8e(e.databaseFilePath)),new bx(e.id,void 0,void 0)}static async dispatchRemoveIndex(e,r,n){let o=Bo(e.baseWorkspaceFolderUri);if(r.has(o)){let s=r.get(o);s&&await s.index.dispose(),r.delete(o)}return new bx(e.id,void 0,void 0)}static getIndexInfo(e,r){for(let[n,o]of r)if(e.startsWith(n))return o}};function a9r(){return TIt(W8.workerData)}a(a9r,"isIndexWorker");function c9r(){let t=W8.parentPort;if(!t)throw new Error("This must be run a worker thread.");if(!TIt(W8.workerData))throw new Error("Worker data must provide a valid database path.");let e=W8.workerData.cwd;process.cwd=()=>e,new SIt(t,W8.workerData.indexWorkspaceRoots,W8.workerData.params)}a(c9r,"runIndexWorker");f();f();var IAe=require("fs"),l9r=require("path");var z8=class extends Jn{static{a(this,"LocalFileSystem")}async readFileString(e,r="utf8"){return await IAe.promises.readFile(Bo(e),r)}async stat(e){let{targetStat:r,lstat:n,stat:o}=await this.statWithLink(Bo(e));return{ctime:r.ctimeMs,mtime:r.mtimeMs,size:r.size,type:this.getFileType(r,n,o)}}async readDirectory(e){let r=Bo(e),n=await IAe.promises.readdir(r,{withFileTypes:!0}),o=[];for(let s of n){let{targetStat:c,lstat:l,stat:u}=await this.statWithLink((0,l9r.join)(r,s.name));o.push([s.name,this.getFileType(c,l,u)])}return o}async statWithLink(e){let r=await IAe.promises.lstat(e);if(r.isSymbolicLink())try{let n=await IAe.promises.stat(e);return{lstat:r,stat:n,targetStat:n}}catch{}return{lstat:r,targetStat:r}}getFileType(e,r,n){let o=0;return e.isFile()&&(o=1),e.isDirectory()&&(o=2),r.isSymbolicLink()&&n&&(o|=64),o}};f();async function pVi(t){if(t.isCancellationRequested)return;let e=new wE,r=t.onCancellationRequested(()=>{e.resolve(),r.dispose()});await e.promise}a(pVi,"cancellationTokenToPromise");async function u9r(t,e){if(e){let r=pVi(e);await Promise.race([t,r])}else await t}a(u9r,"raceCancellation");function IIt(t){return Array.isArray(t)}a(IIt,"isArrayOfT");async function d9r(t,e){let r=new Map,n=[];for(let[o,s]of t.entries()){let c=(async()=>{let l=await xIt(s,e);r.set(o,l)})();n.push(c)}return await Promise.allSettled(n.values()),r}a(d9r,"resolveAll");async function xIt(t,e){let r;return t instanceof Promise?r=await hVi(t,e):r=await mVi(t,e),r}a(xIt,"resolve");async function hVi(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{let s=await t;if(e?.isCancellationRequested)return;n={status:"full",resolutionTime:0,value:IIt(s)?[...s]:[s]}}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await u9r(o,e),n.resolutionTime=performance.now()-r,n}a(hVi,"resolvePromise");async function mVi(t,e){let r=performance.now(),n={status:"none",resolutionTime:0,value:null},o=(async()=>{try{for await(let s of t){if(e?.isCancellationRequested)return;n.status!="partial"&&(n={status:"partial",resolutionTime:0,value:[]}),n.value.push(s)}e?.isCancellationRequested||(n.status!=="partial"?n={status:"full",resolutionTime:0,value:[]}:n.status="full")}catch(s){if(e?.isCancellationRequested)return;n={status:"error",resolutionTime:0,reason:s}}})();return await u9r(o,e),n.resolutionTime=performance.now()-r,n}a(mVi,"resolveIterable");f();f();var y8e="[...]",gVi=0,LE=-1;function zu(){return gVi++}a(zu,"getAvailableNodeId");function AVi(t,e){let r=t.children.map(n=>n.elisionMarker??e);return[...t.text.entries()].map(([n,o])=>n===0?o:r[n-1]+o).join("")}a(AVi,"elideChildren");function f9r(t,e=y8e){return r=>t.tokenLength(AVi(r,e))}a(f9r,"getTokenizerCostFunction");f();var K8=class{static{a(this,"PriorityQueue")}constructor(e){if(this.heap=e?[...e]:[],this.heap.length>0)for(let r=Math.floor(this.heap.length/2)-1;r>=0;r--)this.siftDown(r)}get size(){return this.heap.length}insert(e,r){let n={item:e,priority:r};this.heap.push(n);let o=this.heap.length-1;this.siftUp(o)}peek(){return this.heap.length===0?null:this.heap[0]}pop(){if(this.heap.length===0)return null;let e=this.heap[0],r=this.heap.pop();return this.heap.length>0&&(this.heap[0]=r,this.siftDown(0)),e}clear(){let e=this.heap;return this.heap=[],e}siftUp(e){let r=this.heap[e];for(;e>0;){let n=Math.floor((e-1)/2);if(this.heap[n].priority>=r.priority)break;this.heap[e]=this.heap[n],e=n}this.heap[e]=r}siftDown(e){for(;ethis.heap[r].priority&&(r=n),othis.heap[r].priority&&(r=o),r===e)break;let s=this.heap[e];this.heap[e]=this.heap[r],this.heap[r]=s,e=r}}};function yVi(t){let e={id:t.id??zu(),text:t.text??new Array((t.children?.length??0)+1).fill(""),children:t.children??[],cost:t.cost??1,weight:t.weight??0,rectifiedWeight:t.rectifiedWeight,canMerge:t.canMerge??!1,elisionMarker:t.elisionMarker??y8e,requireRenderedChild:t.requireRenderedChild??!1};if(e.text.length!==e.children.length+1)throw new Error(`RenderNode text length (${e.text.length}) must be children length + 1 (${e.children.length+1})`);return e}a(yVi,"createRenderNode");function EVi(t){return t.requireRenderedChild||(t.rectifiedWeight??t.weight)>t.weight}a(EVi,"isRenderedChildRequired");function p9r(t){return(t.rectifiedWeight??t.weight)/Math.max(t.cost,1)}a(p9r,"rectifiedValue");function xAe(t,e){let r=h9r(t,e);for(let{item:n,priority:o}of r.clear())for(let s of n.nodes)s.rectifiedWeight=o*Math.max(s.cost,1)}a(xAe,"rectifyWeights");function h9r(t,e){let r=t.children.map(s=>h9r(s,e));if(t.weight=Math.max(0,e?e(t):t.weight),t.weight===0&&r.reduce((s,c)=>s+c.size,0)===0)return new K8([]);let n=new K8(r.flatMap(s=>s.clear())),o={nodes:[t],totalCost:t.cost,totalWeight:t.weight};for(;(n.peek()?.priority??0)>o.totalWeight/Math.max(o.totalCost,1);){let{item:s}=n.pop();o.nodes.push(...s.nodes),o.totalCost+=s.totalCost,o.totalWeight+=s.totalWeight}return n.insert(o,o.totalWeight/Math.max(o.totalCost,1)),n}a(h9r,"recursivelyRectifyWeights");function m9r(t,e={}){let{budget:r,mask:n,costFunction:o}=e,s=n??[],c=new Set(Array.isArray(s)?s:[s]);if((r??t.cost)c.has(E.id),"elider"),m=[],g=new Map;if(RIt(t,m,h,g),m.length===0)return wIt(t,o);let A=m.join(""),y=o?o(A):[...g.values()].reduce((E,_)=>E+_.cost,0);return{text:A,cost:y,renderedNodes:g}}let l=new Map,u=[],d=new K8([{item:t,priority:p9r(t)}]),p=r;for(;p>0&&d.size>0;){let{item:h}=d.pop();if(!c.has(h.id)&&h.cost<=p){p-=h.cost,l.set(h.id,h),u.push(h);for(let m of h.children)d.insert(m,p9r(m))}}for(;l.size>0;){let h=[],m=a(E=>!l.has(E.id),"elider"),g=new Map;if(RIt(t,h,m,g),h.length===0)return wIt(t,o);let A=h.join("");if(o===void 0){let E=[...g.values()].reduce((_,v)=>_+v.cost,0);return{text:A,cost:E,renderedNodes:g}}let y=o(A);if(y<=r)return{text:A,cost:y,renderedNodes:g};for(l=g;u.length>0&&y>r;){let E=u.pop();l.has(E.id)&&(y-=E.cost,l.delete(E.id))}if(u.length===0)break}return wIt(t,o)}a(m9r,"render");function wIt(t,e){return{text:t.elisionMarker,cost:e?e(t.elisionMarker):t.elisionMarker.length,renderedNodes:new Map}}a(wIt,"renderEmpty");function RIt(t,e,r,n,o=!1){let s=e.length;if(r(t))return s>=2&&(o||e[s-2]===t.elisionMarker&&e[s-1].trim().length===0)?(e.pop(),!1):(e.push(t.elisionMarker),!1);let c=EVi(t),l=!0;for(let[u,d]of t.children.entries())e.push(t.text[u]??""),l=RIt(d,e,r,n,d.canMerge&&!l),c&&=!l;if(c){for(;e.length>s;)e.pop();return!1}return e.push(t.text[t.text.length-1]??""),n.set(t.id,t),!0}a(RIt,"recursivelyRender");function wAe(t,e,r=y8e){let n=t.children.map(c=>wAe(c,e,r));r=t.elisionMarker??r;let o=e(t);return yVi({...t,children:n,cost:o,weight:0,elisionMarker:t.elisionMarker??r})}a(wAe,"snapshot");var J8={id:zu(),text:[""],children:[],cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1};f();f();var Tx=class{constructor(){this.disposables=[]}static{a(this,"WorkspaceContextProvider")}dispose(){for(let e of this.disposables)e.dispose();this.disposables=[]}};var _8e={MaxDirectorySize:200,MaxResults:100,Decay:.5,CacheSize:2e3,CacheTime:1e3*60,InvalidCacheTime:1e3*60*60*24,MaxFileBytes:2*1024*1024};async function _Vi(t,e,r=_8e,n){let o=n?.get(e);if(o!==void 0)return o;let s;try{s=await t.readDirectory(e)}catch{}if(s===void 0||r.MaxDirectorySize!==void 0&&s.length>r.MaxDirectorySize)return n?.set(e,"Invalid",r.InvalidCacheTime),"Invalid";let c={documents:[],directories:[]};for(let[l,u]of s){let d=bi(e,l);u&2?c.directories.push(d):c.documents.push(d)}return n?.set(e,c),c}a(_Vi,"getDirectoryChildren");function CVi(t,e){let r=t.getWorkspaceFolder({uri:e});if(r===void 0)return[];let n=[],o=Lu(e);for(;o.startsWith(r);){n.push(o);let s=Lu(o);if(s.length>=o.length)break;o=s}return n}a(CVi,"getAncestors");function vVi(t,e,r=_8e.Decay){let n=new Map,o=new Map,s=new Map,c=new Map;for(let l of e){let u=CVi(t,l.uri);if(u.length===0){n.set(l.uri,new Set);continue}let d;for(let p of u){if(d!==void 0){let h=o.get(p)??new Set;h.add(d),o.set(p,h)}d=p}s.set(l.uri,d),n.set(l.uri,new Set(u))}for(let l of e){let u=[],d=n.get(l.uri);if(!(!d||d.size===0))for(u.push({uri:s.get(l.uri),weight:l.weight*Math.pow(r,d.size)});u.length>0;){let p=u.pop();c.set(p.uri,(c.get(p.uri)??0)+p.weight);let h=o.get(p.uri)??new Set;for(let m of h){let g=p.weight;d.has(m)?g/=r:g*=r,u.push({uri:m,weight:g})}}}return c}a(vVi,"getAncestorWeights");async function*PIt(t,e,r,n,o,s){let c={..._8e,...r},l=c.MaxResults,u=c.Decay,d=vVi(t,e,u),p=new K8([...d.entries()].map(([m,g])=>({item:m,priority:g}))),h=0;for(;p.size>0;){let{item:m,priority:g}=p.pop(),A=await _Vi(t,m,c,n);if(s?.isCancellationRequested)return;if(A!=="Invalid"){for(let y of A.documents)if(!o||o(y)){try{if((await t.stat(y)).size>c.MaxFileBytes)continue}catch{continue}if(yield{uri:y,weight:g},h++,h>=l)return}for(let y of A.directories)d.has(y)||(p.insert(y,g*u),d.set(y,g*u))}}}a(PIt,"getNearbyDocuments");var E8e=class extends Tx{constructor(r,n){super();this.fileSystem=r;this.documentManager=n;this.config=_8e;this.cache=new SI(this.config.CacheSize,this.config.CacheTime)}static{a(this,"FileDirectoryDocumentProvider")}async*getContext(r,n,o,s){for await(let c of PIt(this.fileSystem,n.documents,this.config,this.cache,l=>this.documentManager.normalizeUri(l)!==void 0,s))yield{...c,source:"FileDirectoryDocumentProvider"}}};f();f();f();function up(t,e,r){let n=t.get(e);return n===void 0&&(n=r(e),t.set(e,n)),n}a(up,"setDefault");var bVi={MaxActiveSymbols:500,SymbolCacheSize:1e6},C8e=class extends Tx{constructor(){super(...arguments);this.config=bVi;this.nodeToSymbol=new Map;this.nodeValency=new Map;this.symbolToNode=new Map;this.symbolValency=new Map;this.identifierSymbols=new Set;this.identifiers=new $r(this.config.SymbolCacheSize);this.textSymbols=new $r(this.config.SymbolCacheSize);this.nextSymbolId=0}static{a(this,"SymbolContextProvider")}getContext(r,n,o,s){this.updateSymbolIndex(r,o);let c=this.getWeightedSymbols(n);return Promise.resolve(this.getWeightedNodes(c))}updateSymbolIndex(r,n){for(let{id:o}of r.getInvalidatedNodes()){let s=this.nodeToSymbol.get(o);if(this.nodeToSymbol.delete(o),this.nodeValency.delete(o),s)for(let[c,l]of s.entries()){let u=this.symbolToNode.get(c);u?.delete(o),u?.size===0?(this.symbolToNode.delete(c),this.symbolValency.delete(c),this.identifierSymbols.delete(c)):this.symbolValency.has(c)&&this.symbolValency.set(c,Math.max(1,(this.symbolValency.get(c)??0)-l))}}for(let{id:o}of r.getCreatedNodes()){let s=n.getNode(o);s!==void 0&&this.extractSymbols(s.document,s.node)}}getWeightedSymbols(r){let n=new Map;for(let{id:s,weight:c}of r.nodes){let l=this.nodeValency.get(s)??0,u=[],d=0;for(let[p,h]of this.nodeToSymbol.get(s)??[]){let m=this.symbolValency.get(p);if((m??0)<1)continue;let g=h/(Math.max(l,1)*Math.max(1,m));u.push({symbolId:p,nodeSymbolWeight:g}),d+=g}d=Math.max(d,1);for(let{symbolId:p,nodeSymbolWeight:h}of u)n.set(p,(n.get(p)??0)+c*h/d)}return[...n.entries()].map(([s,c])=>({symbolId:s,symbolWeight:c,symbolValency:this.symbolValency.get(s)})).filter(({symbolValency:s})=>(s??0)>0).sort((s,c)=>c.symbolWeight/c.symbolValency-s.symbolWeight/s.symbolValency).slice(0,this.config.MaxActiveSymbols)}getWeightedNodes(r){let n=[];for(let{symbolId:o,symbolWeight:s,symbolValency:c}of r){let l=this.identifierSymbols.has(o)?"SymbolContextProvider.Identifiers":"SymbolContextProvider.Text";for(let[u,d]of this.symbolToNode.get(o)??[]){let p=s*d/Math.max(c,this.nodeValency.get(u)??d);n.push({id:u,weight:p,source:l})}}return n}extractSymbols(r,n){if(this.nodeToSymbol.has(n.id))return;let o=new Map;this.nodeToSymbol.set(n.id,o);let s=0;for(let c of n.syntaxNodes()){let l=r.document.getText(c.range);if(this.isIdentifier(r,c,l)){let u=up(this.identifiers,l,()=>this.createSymbol(!0));o.set(u,(o.get(u)??0)+1),s+=1}if(this.isText(r,c,l)||this.isIdentifier(r,c,l))for(let u of kIt(l)){let d=up(this.textSymbols,u,()=>this.createSymbol());o.set(d,(o.get(d)??0)+1),s+=1}}this.nodeValency.set(n.id,s);for(let[c,l]of o.entries())up(this.symbolToNode,c,()=>new Map).set(n.id,l),this.symbolValency.set(c,(this.symbolValency.get(c)??0)+l)}createSymbol(r=!1){let n=this.nextSymbolId++;return r&&this.identifierSymbols.add(n),n}isText(r,n,o){return r.parser.labeler.isText?.(n)??(n.children.length===0&&o.search(/\s/)>=0)}isIdentifier(r,n,o){return r.parser.labeler.isIdentifier?.(n)??(n.children.length===0&&g9r(o))}},TVi=/^[a-zA-Z_]{2,}\w+$/;function g9r(t){return TVi.test(t)}a(g9r,"isSymbol");function SVi(t){return t.toLowerCase()}a(SVi,"normalizeWord");function*kIt(t){for(let e of t.split(/\W/))g9r(e)&&(yield SVi(e))}a(kIt,"getTextSymbols");var IVi={MaxDirectorySize:50,MaxResults:50,Decay:.5,CacheSize:1e3,CacheTime:1e3*60,InvalidCacheTime:1e3*60*60*24,MaxFileBytes:1*1024*1024,MaxActiveSymbols:500,DebouncedRemovalThreshold:3,UpdateDebounceTimeout:500,SymbolCacheSize:1e5},v8e=class extends C8e{constructor(r,n){super();this.fileSystem=r;this.documentManager=n;this.config=IVi;this.symbolToDocuments=new Map;this.documentToSymbols=new Map;this.documentValency=new Map;this.cache=new SI(this.config.CacheSize,this.config.CacheTime);this.debouncedExpirationCount=new Map;this.updateDebounce=new Map;this.currentlyUpdating=new Set;this.isUpdatingIndex=!1;this.fileSystem.onDidFileChange(o=>{let s=o.document.uri;this.documentToSymbols.has(s)&&this.debouncedReadOrUpdateDocument(s)})}static{a(this,"IndexingSymbolContextProvider")}async getContext(r,n,o,s){super.updateSymbolIndex(r,o),await this.updateDocumentIndex(n);let c=super.getWeightedSymbols(n),l=super.getWeightedNodes(c),u=this.getWeightedDocuments(c);return[...l,...u]}getWeightedDocuments(r){let n=[];for(let{symbolId:o,symbolWeight:s}of r)for(let[c,l]of this.symbolToDocuments.get(o)??[]){let u=l/Math.max(1,this.documentValency.get(c)??1),d=Math.log(Math.max(this.documentToSymbols.size,1)/Math.max(1,this.symbolToDocuments.get(o)?.size??1)),p=s*u*d;n.push({source:"IndexingSymbolContextProvider.Text",uri:c,weight:p})}return n}debouncedReadOrUpdateDocument(r){this.updateDebounce.has(r)&&clearTimeout(this.updateDebounce.get(r)),this.updateDebounce.set(r,setTimeout(()=>{this.updateDebounce.delete(r),this.readOrUpdateDocument(r)},this.config.UpdateDebounceTimeout))}async readOrUpdateDocument(r){try{if(this.currentlyUpdating.has(r))return;if(this.documentManager.normalizeUri(r)===void 0){this.removeFromIndex(r);return}this.currentlyUpdating.add(r);let n=await this.fileSystem.readFileString({uri:r}),o=new Map,s=0;for(let l of kIt(n))o.set(l,(o.get(l)??0)+1),s++;let c=[];for(let[l,u]of o.entries()){let d=up(this.textSymbols,l,()=>this.createSymbol(!1));up(this.symbolToDocuments,d,()=>new Map).set(r,u),c.push(d)}this.documentValency.set(r,s),this.documentToSymbols.set(r,c)}catch{this.removeFromIndex(r)}finally{this.currentlyUpdating.delete(r)}}async updateDocumentIndex(r){if(!this.isUpdatingIndex){this.isUpdatingIndex=!0;try{for(let s of this.documentToSymbols.keys())this.debouncedExpirationCount.set(s,(this.debouncedExpirationCount.get(s)??0)+1);let n=a(s=>this.documentManager.normalizeUri(s)!==void 0,"filter");for await(let{uri:s}of PIt(this.fileSystem,r.documents,this.config,this.cache,n))this.documentToSymbols.has(s)||await this.readOrUpdateDocument(s),this.debouncedExpirationCount.delete(s);let o=[...this.debouncedExpirationCount.entries()].filter(([s,c])=>c>=this.config.DebouncedRemovalThreshold&&!this.currentlyUpdating.has(s)&&!this.updateDebounce.has(s));for(let[s]of o)this.removeFromIndex(s),this.debouncedExpirationCount.delete(s)}finally{this.isUpdatingIndex=!1}}}removeFromIndex(r){this.documentValency.delete(r);for(let n of this.documentToSymbols.get(r)??[]){let o=this.symbolToDocuments.get(n);o?.delete(r),o?.size===0&&this.symbolToDocuments.delete(n)}this.documentToSymbols.delete(r)}};f();function A9r(t){return t.nodeId!==void 0}a(A9r,"isNodeLocation");var y9r={"RecentDocumentProvider.RecentlyFocused":{maxEventCount:100,halflife:1e3*60*5,isImpulse:!1},"RecentDocumentProvider.RecentlyEdited":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!0},"RecentDocumentProvider.RecentlyOpen":{maxEventCount:100,halflife:1e3*60*5,isImpulse:!1},RecentCompletionsRequestProvider:{maxEventCount:100,halflife:1e3*60*5,isImpulse:!0},"ExtensionActivityProvider.CurrentSelection":{maxEventCount:1,halflife:1e5,isImpulse:!0},"ExtensionActivityProvider.PrimarySelection":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1},"ExtensionActivityProvider.Selection":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1},"ExtensionActivityProvider.VisibleRange":{maxEventCount:1e3,halflife:1e3*60*5,isImpulse:!1}},b8e=class extends Tx{constructor(){super(...arguments);this.eventsByType=new Map;this.nextId=0}static{a(this,"RecentActivityProvider")}getContext(r,n,o,s){let c=performance.now(),l=[];for(let[u,d]of this.eventsByType.entries()){let p=y9r[u],h=[...d.values()].sort((g,A)=>A.timestamp-g.timestamp),m=1;for(let g of h){this.resolveRanges(g,o);let A=.5**((c-g.timestamp)/p.halflife),y=p.isImpulse?A:m-A;m=A;for(let E of g.locations)A9r(E)?l.push({weight:y,uri:E.uri,id:E.nodeId,source:u}):l.push({weight:y,uri:E.uri,source:u})}}return Promise.resolve(l)}resolveRanges(r,n){if(r.isFullyResolved)return;let o=!0,s=[];for(let c of r.locations)if(A9r(c))s.push(c);else if(c.range&&c.range.start!==void 0&&c.range.end!==void 0){let l=n.getDocument(c.uri)?.document;if(l!==void 0){let u=l.findNode(l.document.offsetAt(c.range.start),l.document.offsetAt(c.range.end));s.push({uri:c.uri,nodeId:u.id})}else o=!1,s.push(c)}else s.push({uri:c.uri,nodeId:LE});r.locations=s,r.isFullyResolved=o}recordEvent(r,n,o){let s=y9r[r];if(s===void 0)return;let c={timestamp:o,locations:n,isFullyResolved:!1};up(this.eventsByType,r,()=>new $r(s.maxEventCount)).set(++this.nextId,c)}};f();var T8e=class extends Tx{constructor(){super(...arguments);this.nodeParent=new Map;this.nodeChildren=new Map}static{a(this,"TreeProximityProvider")}getContext(r,n,o,s){this.updateIndex(r,o,s);let c=new Map,l=new Map,u=new Map;for(let{id:p,weight:h}of n.nodes){let m=this.nodeParent.get(p)??LE,g=this.nodeChildren.get(m)?.size??0;g>0&&c.set(m,(c.get(m)??0)+h/g);let A=this.nodeChildren.get(p);if(A&&A.size>0)for(let E of A)l.set(E,(l.get(E)??0)+h/A.size);let y=this.nodeChildren.get(m);if(y&&y.size>1)for(let E of y)E!==p&&u.set(E,(u.get(E)??0)+h/y.size)}let d=[...[...c.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Parent"})),...[...l.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Children"})),...[...u.entries()].map(([p,h])=>({id:p,weight:h,source:"TreeProximityProvider.Siblings"}))];return Promise.resolve(d)}updateIndex(r,n,o){for(let{id:s}of r.getInvalidatedNodes())this.nodeParent.delete(s),this.nodeChildren.delete(s);for(let{id:s}of r.getCreatedNodes()){let c=n.getNode(s),l=new Set;if(c!==void 0)for(let u of c.node.children)this.nodeParent.set(u.id,s),l.add(u.id);l.size>0&&this.nodeChildren.set(s,l)}}};f();function xVi(t){return t.id!==void 0}a(xVi,"isNodeItem");function wVi(t){return!("uri"in t)&&!("id"in t)}a(wVi,"isNullItem");var E9r={"RecentDocumentProvider.RecentlyOpen":.1,"RecentDocumentProvider.RecentlyFocused":.1,"RecentDocumentProvider.RecentlyEdited":.1,RecentCompletionsRequestProvider:1,"ExtensionActivityProvider.CurrentSelection":5,"ExtensionActivityProvider.PrimarySelection":2,"ExtensionActivityProvider.Selection":.2,"ExtensionActivityProvider.VisibleRange":1,FileDirectoryDocumentProvider:.05,"SymbolContextProvider.Identifiers":.2,"SymbolContextProvider.Text":.2,"IndexingSymbolContextProvider.Text":1,"TreeProximityProvider.Parent":.3,"TreeProximityProvider.Children":.3,"TreeProximityProvider.Siblings":.3,"ExtensionReferenceProvider.References":.2,"ExtensionReferenceProvider.Definitions":1};function _9r(t){return t in E9r}a(_9r,"isSourceId");var X8="64f5ff7d-e507-4558-81cf-3bdacc3c5c00",Kte=class{static{a(this,"WorkspaceContextWeights")}constructor(e){let r=new Map;for(let{uri:n,weight:o}of e)r.set(n,(r.get(n)??0)+o);this.documents=[...r.entries()].map(([n,o])=>({uri:n,weight:o})).sort((n,o)=>o.weight-n.weight),this.docWeights=r,this.nodes=e.filter(({id:n})=>n!==LE),this.nodeWeights=new Map(e.map(({id:n,weight:o})=>[n,o]))}getNodeWeight(e){return this.nodeWeights.get(e)??0}getDocumentWeight(e){return this.docWeights.get(e)??0}},S8e=class{constructor(e,r){this.activeContext=e;this.config=r;this.sourceWeights=E9r;this.sourceContext=new Map;this.prevUpdateTime=void 0;this.prevItems=[];this.weights=new Kte([])}static{a(this,"WorkspaceContextCoordinator")}getWeights(e){if(e){let r=this.sourceContext.get(e);return r?new Kte(r.items):new Kte([])}return this.weights}updateWeights(){let e=new Map,r=0,n=this.config.StaleWeightHalflife;for(let[o,{items:s,updateTime:c}]of this.sourceContext.entries()){let l=this.sourceWeights[o]??0;if(l<=0||s.length===0)continue;let u=.5**(-Math.max(0,(this.prevUpdateTime??c)-c)/n);l*=u,r+=l,this.aggregateWeights(s,e,l,!0)}if(r>0){if(this.weights.nodes.length>0){let o=r*this.config.Laziness,s=this.prevItems;this.aggregateWeights(s,e,o,!0)}for(let[o,s]of e.entries()){let c=this.activeContext.getDocument(o)?.document;if(c===void 0)continue;let l=s.get(LE);if(l!==void 0&&l>0){s.delete(LE);let u=0;for(let d of s.values())u+=d;if(u<=0){let d=c.getAllIds(),p=l/Math.max(d.length,1);for(let h of d)s.set(h,p)}else for(let[d,p]of[...s.entries()])s.set(d,p+l*(p/u))}}this.prevItems=this.truncateAndNormalize(e),this.weights=new Kte(this.prevItems)}return this.prevUpdateTime=performance.now(),this.weights}pushWorkspaceContext(e,r){let n=performance.now(),o=this.addUriAndId(r),s=new Map;this.aggregateWeights(o,s);let c=this.truncateAndNormalize(s);this.sourceContext.set(e,{items:c,updateTime:n})}addUriAndId(e){return e.filter(r=>r.weight>0).map(r=>{if(wVi(r))return{weight:r.weight,uri:X8,id:LE};let n=xVi(r)?r.id:LE,o=r.uri??this.activeContext.getUri(n)??X8;return o===X8&&(n=LE),{weight:r.weight,uri:o,id:n}})}aggregateWeights(e,r,n=1,o=!1){for(let{uri:s,id:c,weight:l}of e){if(l<=0||isNaN(l))continue;let u=up(r,s,()=>new Map),d=LE;(!o||this.activeContext.getUri(c)!==void 0)&&(d=c),u.set(d,(u.get(d)??0)+l*n)}}truncateAndNormalize(e){let r=[],n=new Map,o=0;for(let[u,d]of e.entries()){let p=u!==X8?this.activeContext.normalizeUri(u)??X8:X8;for(let[h,m]of d.entries())u===X8||h===LE?n.set(p,(n.get(p)??0)+m):r.push({uri:p,id:h,weight:m}),o+=m}if(o<=0)return[];n.delete(X8),r.sort((u,d)=>d.weight-u.weight);for(let{uri:u,weight:d}of r.slice(this.config.MaxActiveNodes,r.length))n.set(u,(n.get(u)??0)+d);let s=[...n.entries()].sort((u,d)=>d[1]-u[1]).slice(0,this.config.MaxActiveFiles).map(([u,d])=>({uri:u,id:LE,weight:d}));return r.slice(0,this.config.MaxActiveNodes).concat(s).sort((u,d)=>d.weight-u.weight).map(u=>({...u,weight:u.weight/o}))}};f();f();f();var DIt=class{constructor(e,r,n,o=!1){this.id=e;this.parts=r;this.text=n;this.canMerge=o}static{a(this,"ContextNode")}get startOffset(){return this.parts[0].root.startOffset}get endOffset(){return this.parts[this.parts.length-1].root.endOffset}get syntaxRoots(){return this.parts.map(e=>e.root)}get children(){return this.parts.flatMap(e=>e.children)}get syntaxLimits(){return this.children.flatMap(e=>e.syntaxRoots)}*syntaxNodes(){let e=new Set(this.syntaxLimits.map(r=>r.id));for(let r of this.syntaxRoots)yield*C9r(r,e)}findChild(e,r){if(ethis.endOffset||r=r)break;s.root.endOffset=r)break;c.endOffsets.root.startOffset-c.root.startOffset);let n=PVi(e,this.document),o=new DIt(zu(),e,n,r);return this.nodeById.set(o.id,o),o}buildTree(){let e=this.buildRecursively(this._syntaxRoot);return this.createNode([{root:this._syntaxRoot,children:e}])}buildRecursively(e){if(e.endOffset-e.startOffset({root:o,children:this.buildRecursively(o)}));if(this.canMergeChildren(e))return this.mergeChildren(r);let n=[];for(let{root:o,children:s}of r){if(this.canBeNode(o)&&o.endOffset-o.startOffset-s.reduce((l,u)=>l+(u.endOffset-u.startOffset),0)>=this.minSize){n.push(this.createNode([{root:o,children:s}]));continue}n.push(...s)}return n}mergeChildren(e){if(e.length===0)return[];e.sort((m,g)=>m.root.startOffset-g.root.startOffset);let r=e[e.length-1].root.endOffset-e[0].root.startOffset,n=[];for(let m of e){let g=m.root.endOffset-m.root.startOffset;for(let A of m.children){let y=A.endOffset-A.startOffset;g-=y,r-=y}n.push(g)}if(rm.children);let o=[0],s=0,c=null,l={line:-1,size:-1},u=e[0].root.startOffset,d=e[0].root.range.start.line;for(let m=0;mthis.minSize&&sl.line||A.line==l.line&&A.size>l.size)&&(l=A,c=m)}u=g.root.endOffset,d=g.root.range.end.line,s>=this.maxSize&&(c=c??m,o.push(c+1),m=c,s=0,c=null,l={line:-1,size:-1},u=e[m+1]?.root.startOffset,d=e[m+1]?.root.range.start.line)}o.length==1?o.push(e.length):o[o.length-1]!==e.length&&(o[o.length-1]=e.length);let p=[],h=!1;for(let m=0;mRVi}canBeNode(e){return this.parser.labeler.canBeNode?.(e)??!0}};function PVi(t,e){if(t.length===0)return[""];let r=[],n=e.positionAt(t[0].root.startOffset);for(let s of t.flatMap(c=>c.children).sort((c,l)=>c.startOffset-l.startOffset)){let c=e.positionAt(s.startOffset);r.push(e.getText({start:n,end:c})),n=e.positionAt(s.endOffset)}let o=e.positionAt(t[t.length-1].root.endOffset);return r.push(e.getText({start:n,end:o})),r}a(PVi,"buildText");function*C9r(t,e){yield t;for(let r of t.children)e.has(r.id)||(yield*C9r(r,e))}a(C9r,"walk");f();f();f();var x8e=class{constructor(e,r,n,o,s,c){this.id=e;this.raw=r;this.children=n;this.source="indentation";this.parent=null;let l={start:{line:o,character:0},end:{line:s,character:c.lineAt(s).text.length}},u=c.getText(l),d=u.search(/\S/);if(d===-1){let m={line:s,character:0};this.startOffset=c.offsetAt(m),this.endOffset=this.startOffset,this.range={start:m,end:m};return}let p=u.search(/\S(?!.*\S)/s),h=c.offsetAt(l.start);this.startOffset=h+d,this.endOffset=h+p+1,this.range={start:c.positionAt(this.startOffset),end:c.positionAt(this.endOffset)}}static{a(this,"IndentationNode")}get type(){return this.raw.type}};function NIt(t,e,r){let n=t.subs.map(u=>({subtree:u,node:NIt(u,e,r)})).filter(u=>u.node!==null).sort((u,d)=>u.node.startOffset-d.node.startOffset),o=[],s=e;for(let u=n.length-1;u>=0;u--){let{subtree:d,node:p}=n[u];if(p.range.end.line>=s){let h=NIt(d,s,r);h!==null&&(o.push(h),s=Math.min(h.range.start.line,s))}else o.push(p),s=Math.min(p.range.start.line,s)}o.sort((u,d)=>u.startOffset-d.startOffset);let c=e,l=0;if(o.length>0&&(c=Math.min(c,o[0].range.start.line),l=Math.max(l,o[o.length-1].range.end.line)),(t.type==="blank"||t.type==="line")&&(c=Math.min(c,t.lineNumber),l=Math.max(l,t.lineNumber),t.type==="blank"&&c===l))return null;if(l=Math.min(l,e-1),c<=l){let u=new x8e(zu(),t,o,c,l,r);for(let d of o)d.parent=u;return u}return null}a(NIt,"recursivelyBuildNode");function v9r(t){let e=_H(t.getText(),t.detectedLanguageId);return NIt(e,t.lineCount,t)??new x8e(zu(),e,[],0,t.lineCount-1,t)}a(v9r,"parse");var w8e={source:"indentation",parse:v9r,update(t,e){return{root:v9r(e),remapper:a(()=>{},"remapper")}},dispose:a(()=>{},"dispose"),labeler:{isIdentifier:a(t=>!1,"isIdentifier"),isText:a(t=>!0,"isText")}};f();f();var T9r=de(Fte());function b9r(t){return{line:t.row,character:t.column}}a(b9r,"asPosition");var MP=class{constructor(e,r,n,o){this.nodeList=e;this.mergeList=r;this.identifierList=n;this.textList=o}static{a(this,"BasicNodeLabeler")}canBeNode(e){return this.nodeList.has(e.type)}canMergeChildren(e){return this.mergeList.has(e.type)}isIdentifier(e){return this.identifierList.has(e.type)}isText(e){return this.textList.has(e.type)}},Z8=class{constructor(e,r,n={}){this.language=e;this.source=r;this.labeler=n}static{a(this,"TreeSitterParser")}dispose(){}parse(e){let r,n;try{return r=new T9r.default,r.setLanguage(this.language),n=r.parse(e.getText()),this.snapshot(n.rootNode,null)}catch{return w8e.parse(e)}finally{n?.delete(),r?.delete()}}update(e,r){return{root:this.parse(r),remapper:a(()=>{},"remapper")}}snapshot(e,r){let n={id:e.id,source:this.source,type:e.type,startOffset:e.startIndex,endOffset:e.endIndex,range:{start:b9r(e.startPosition),end:b9r(e.endPosition)},parent:r,children:[]};return n.children=e.namedChildren.map(o=>this.snapshot(o,n)),n}};var kVi=new Set(["class_specifier","function_definition","expression_statement","if_statement","for_statement","while_statement","try_statement","switch_statement","compound_statement"]),DVi=new Set(["translation_unit","compound_statement","parameter_list","argument_list"]),NVi=new Set(["identifier"]),MVi=new Set(["string","comment"]),S9r=new MP(kVi,DVi,NVi,MVi);f();var OVi=new Set(["class_declaration","method_declaration","expression_statement","if_statement","for_statement","while_statement","try_statement","switch_statement"]),BVi=new Set(["program","block","object_creation_expression","formal_parameters","argument_list","array_initializer"]),LVi=new Set(["identifier"]),FVi=new Set(["string_literal","line_comment","block_comment"]),I9r=new MP(OVi,BVi,LVi,FVi);f();var UVi=new Set(["class_definition","function_definition","expression_statement","if_statement","for_statement","while_statement","with_statement","try_statement"]),QVi=new Set(["module","block","parameters","dictionary","list"]),qVi=new Set(["identifier"]),GVi=new Set(["string","comment"]),x9r=new MP(UVi,QVi,qVi,GVi);f();var HVi=new Set(["class_declaration","function_declaration","arrow_function","method_definition","expression_statement","if_statement","while_statement","try_statement","for_statement","switch_statement"]),jVi=new Set(["program","statement_block","formal_parameters","arguments","object","array"]),$Vi=new Set(["identifier"]),VVi=new Set(["string","comment"]),w9r=new MP(HVi,jVi,$Vi,VVi);var R9r=de(Fte());async function P9r(t){await R9r.default.init();try{let e=await VSt(t);switch(t){case"python":return new Z8(e,"tree-sitter-python",x9r);case"typescript":return new Z8(e,"tree-sitter-typescript",w9r);case"java":return new Z8(e,"tree-sitter-java",I9r);case"cpp":return new Z8(e,"tree-sitter-cpp",S9r);default:return new Z8(e,"tree-sitter-generic")}}catch{return w8e}}a(P9r,"getParser");var MIt=class{constructor(e,r){this.created=e;this.invalidated=r;this.updatedDocuments=Array.from(new Set([...e.entries(),...r.entries()].filter(([n,o])=>o.size>0).map(([n,o])=>n)))}static{a(this,"WorkspaceContextChanges")}getInvalidatedNodes(e){return this.getNodes(this.invalidated,e)}getCreatedNodes(e){return this.getNodes(this.created,e)}getNodes(e,r){return r===void 0?Array.from(e.entries()).flatMap(([n,o])=>[...o].map(s=>({uri:n,id:s}))):Array.from(e.get(r)??[]).map(n=>({uri:r,id:n}))}},R8e=class{constructor(e,r){this.item=e;this.disposalCallback=r}static{a(this,"CachedItem")}dispose(){this.disposalCallback(this.item)}},k9r=500,P8e=class{constructor(e,r){this.fileSystem=e;this.config=r;this.targetSet=new Set;this.activeDocuments=new Map;this.nodeToDoc=new Map;this.createdNodes=new Map;this.invalidatedNodes=new Map;this.parsers=new Map;this.staleDocuments=new Set;this.pendingUpdates=new Map;this.uriCache=new $r(k9r);this.allowedExtensions=new Set(hH);this.invalidDocumentCache=new SI(k9r,this.config.InvalidCacheTime),this.cachedDocuments=new s5e(this.config.MaxActiveFiles),this.fileSystem.onDidFileChange(n=>this.handleFileChange(n.document.uri))}static{a(this,"WorkspaceContextDocumentManager")}setAllowedLanguages(e){this.allowedExtensions=new Set(e.flatMap(r=>DM[r]?.extensions??[]))}getActiveDocuments(){return Array.from(this.activeDocuments.values())}getNode(e){let r=this.nodeToDoc.get(e);if(r===void 0)return;let n=this.getDocument(r);if(n===void 0)return;let o=n.document.getNode(e);if(o!==void 0)return{...n,node:o}}getDocument(e){let r=this.activeDocuments.get(e);if(r!==void 0)return{document:r,isActive:!0};let n=this.cachedDocuments.get(e);if(n!==void 0)return{document:n.item,isActive:!1}}getUri(e){return this.nodeToDoc.get(e)}normalizeUri(e){let r,n=this.uriCache.get(e);if(n!==null){if(n!==void 0)r=n;else try{if(l5e(e),r=ca(e),!(this.fileSystem.getWorkspaceFolder({uri:r})!==void 0)){this.uriCache.set(e,null);return}this.uriCache.set(e,r)}catch{this.uriCache.set(e,null);return}if(!(!this.allowedExtensions.has(_br(r))||this.invalidDocumentCache.has(r)))return r}}dispose(){this.parsers.clear(),this.activeDocuments.clear(),this.cachedDocuments.clear()}updateDocuments(e){this.targetSet.clear();let r=[],n=e.documents.map(({uri:o})=>this.normalizeUri(o)).filter(o=>o!==void 0).slice(0,this.config.MaxActiveFiles);for(let o of n)this.targetSet.add(o),r.push(this.updateDocument(o));for(let o of[...this.activeDocuments.keys()])this.targetSet.has(o)||this.deactivateDocument(o);return Promise.all(r)}popChanges(){let e=new MIt(this.createdNodes,this.invalidatedNodes);return this.createdNodes=new Map,this.invalidatedNodes=new Map,e}isKnownDocument(e){return this.activeDocuments.has(e)||this.cachedDocuments.has(e)||this.pendingUpdates.has(e)}deactivateDocument(e){let r=this.activeDocuments.get(e);r!==void 0&&(this.activeDocuments.delete(e),this.pendingUpdates.has(e)||this.cachedDocuments.set(e,new R8e(r,n=>this.disposeDocument(n))))}async updateDocument(e){if(this.pendingUpdates.has(e))return;let r=new wE;this.pendingUpdates.set(e,r.promise);let n;this.activeDocuments.has(e)?n=this.activeDocuments.get(e):this.cachedDocuments.has(e)&&(n=this.cachedDocuments.get(e).item,this.cachedDocuments.uncache(e)),(n===void 0||this.staleDocuments.has(e))&&(this.staleDocuments.delete(e),n=await this.createUpdatedDocument(e,n)),n!==void 0&&(this.targetSet.has(e)?this.activeDocuments.set(e,n):(this.activeDocuments.delete(e),this.cachedDocuments.set(e,new R8e(n,o=>this.disposeDocument(o))))),this.pendingUpdates.delete(e),r.resolve()}async createUpdatedDocument(e,r){let n=await this.readTextDocument(e);if(n===void 0){r!==void 0&&this.disposeDocument(r);return}let o;try{o=await this.getParser(n.detectedLanguageId)}catch{this.invalidDocumentCache.set(e,!0),r!==void 0&&this.disposeDocument(r);return}if(r!==void 0)if(n.detectedLanguageId!==r.document.detectedLanguageId)this.disposeDocument(r);else{let c=new Set(r.getAllIds());r.update(n);let l=new Set(r.getAllIds()),u=[...l].filter(p=>!c.has(p)),d=[...c].filter(p=>!l.has(p));return this.recordDocumentChanges(e,{created:u,invalidated:d}),r}let s=new I8e(n,o,this.config.MinNodeSize);return this.recordDocumentChanges(e,{created:s.getAllIds(),invalidated:[]}),s}disposeDocument(e){this.recordDocumentChanges(e.uri,{created:[],invalidated:e.getAllIds()})}recordDocumentChanges(e,r){let n=up(this.createdNodes,e,()=>new Set),o=up(this.invalidatedNodes,e,()=>new Set);for(let s of r.created)n.add(s),this.nodeToDoc.set(s,e);for(let s of r.invalidated)n.has(s)?n.delete(s):o.add(s),this.nodeToDoc.delete(s)}async getParser(e){let r=this.parsers.get(e);return r===void 0&&(r=await P9r(e),this.parsers.set(e,r)),r}async readTextDocument(e){if(this.invalidDocumentCache.has(e)||this.normalizeUri(e)===void 0)return;let r=await this.fileSystem.readValidFile({uri:e});if(r.status!=="valid"||r.document.uri!==e){this.invalidDocumentCache.set(e,!0);return}return r.document}handleFileChange(e){this.isKnownDocument(e)&&this.staleDocuments.add(e)}};f();var WVi="WorkspaceContextWorker";function OIt(t){let e=t;return e?.workerId===WVi&&typeof e?.cwd=="string"&&Array.isArray(e?.workspaceRoots)&&e.workspaceRoots.every(r=>typeof r=="string")}a(OIt,"isContextWorkerData");var zVi=["RequestUpdate","Exit","ReadAndValidateUri","Error","UpdateResponse","FlushUpdates","ReadAndValidateResponse"];function D9r(t){if(typeof t!="object"||t===null)return;let e=t.messageType;return zVi.includes(e)?e:void 0}a(D9r,"getContextMessageType");var e6=class{constructor(e,r,n){this.id=e;this.messageType=r;this.data=n}static{a(this,"ContextMessage")}};f();LIt();f();var L9r;(function(t){function e(r){return typeof r=="string"}a(e,"is"),t.is=e})(L9r||(L9r={}));var FIt;(function(t){function e(r){return typeof r=="string"}a(e,"is"),t.is=e})(FIt||(FIt={}));var F9r;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}a(e,"is"),t.is=e})(F9r||(F9r={}));var D8e;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}a(e,"is"),t.is=e})(D8e||(D8e={}));var Rg;(function(t){function e(n,o){return n===Number.MAX_VALUE&&(n=D8e.MAX_VALUE),o===Number.MAX_VALUE&&(o=D8e.MAX_VALUE),{line:n,character:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&ot.uinteger(o.line)&&ot.uinteger(o.character)}a(r,"is"),t.is=r})(Rg||(Rg={}));var nl;(function(t){function e(n,o,s,c){if(ot.uinteger(n)&&ot.uinteger(o)&&ot.uinteger(s)&&ot.uinteger(c))return{start:Rg.create(n,o),end:Rg.create(s,c)};if(Rg.is(n)&&Rg.is(o))return{start:n,end:o};throw new Error(`Range#create called with invalid arguments[${n}, ${o}, ${s}, ${c}]`)}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&Rg.is(o.start)&&Rg.is(o.end)}a(r,"is"),t.is=r})(nl||(nl={}));var N8e;(function(t){function e(n,o){return{uri:n,range:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&nl.is(o.range)&&(ot.string(o.uri)||ot.undefined(o.uri))}a(r,"is"),t.is=r})(N8e||(N8e={}));var U9r;(function(t){function e(n,o,s,c){return{targetUri:n,targetRange:o,targetSelectionRange:s,originSelectionRange:c}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&nl.is(o.targetRange)&&ot.string(o.targetUri)&&nl.is(o.targetSelectionRange)&&(nl.is(o.originSelectionRange)||ot.undefined(o.originSelectionRange))}a(r,"is"),t.is=r})(U9r||(U9r={}));var UIt;(function(t){function e(n,o,s,c){return{red:n,green:o,blue:s,alpha:c}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&ot.numberRange(o.red,0,1)&&ot.numberRange(o.green,0,1)&&ot.numberRange(o.blue,0,1)&&ot.numberRange(o.alpha,0,1)}a(r,"is"),t.is=r})(UIt||(UIt={}));var Q9r;(function(t){function e(n,o){return{range:n,color:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&nl.is(o.range)&&UIt.is(o.color)}a(r,"is"),t.is=r})(Q9r||(Q9r={}));var q9r;(function(t){function e(n,o,s){return{label:n,textEdit:o,additionalTextEdits:s}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&ot.string(o.label)&&(ot.undefined(o.textEdit)||Xte.is(o))&&(ot.undefined(o.additionalTextEdits)||ot.typedArray(o.additionalTextEdits,Xte.is))}a(r,"is"),t.is=r})(q9r||(q9r={}));var G9r;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(G9r||(G9r={}));var H9r;(function(t){function e(n,o,s,c,l,u){let d={startLine:n,endLine:o};return ot.defined(s)&&(d.startCharacter=s),ot.defined(c)&&(d.endCharacter=c),ot.defined(l)&&(d.kind=l),ot.defined(u)&&(d.collapsedText=u),d}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&ot.uinteger(o.startLine)&&ot.uinteger(o.startLine)&&(ot.undefined(o.startCharacter)||ot.uinteger(o.startCharacter))&&(ot.undefined(o.endCharacter)||ot.uinteger(o.endCharacter))&&(ot.undefined(o.kind)||ot.string(o.kind))}a(r,"is"),t.is=r})(H9r||(H9r={}));var QIt;(function(t){function e(n,o){return{location:n,message:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&N8e.is(o.location)&&ot.string(o.message)}a(r,"is"),t.is=r})(QIt||(QIt={}));var j9r;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(j9r||(j9r={}));var $9r;(function(t){t.Unnecessary=1,t.Deprecated=2})($9r||($9r={}));var V9r;(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&ot.string(n.href)}a(e,"is"),t.is=e})(V9r||(V9r={}));var M8e;(function(t){function e(n,o,s,c,l,u){let d={range:n,message:o};return ot.defined(s)&&(d.severity=s),ot.defined(c)&&(d.code=c),ot.defined(l)&&(d.source=l),ot.defined(u)&&(d.relatedInformation=u),d}a(e,"create"),t.create=e;function r(n){var o;let s=n;return ot.defined(s)&&nl.is(s.range)&&ot.string(s.message)&&(ot.number(s.severity)||ot.undefined(s.severity))&&(ot.integer(s.code)||ot.string(s.code)||ot.undefined(s.code))&&(ot.undefined(s.codeDescription)||ot.string((o=s.codeDescription)===null||o===void 0?void 0:o.href))&&(ot.string(s.source)||ot.undefined(s.source))&&(ot.undefined(s.relatedInformation)||ot.typedArray(s.relatedInformation,QIt.is))}a(r,"is"),t.is=r})(M8e||(M8e={}));var Jte;(function(t){function e(n,o,...s){let c={title:n,command:o};return ot.defined(s)&&s.length>0&&(c.arguments=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.string(o.title)&&ot.string(o.command)}a(r,"is"),t.is=r})(Jte||(Jte={}));var Xte;(function(t){function e(s,c){return{range:s,newText:c}}a(e,"replace"),t.replace=e;function r(s,c){return{range:{start:s,end:s},newText:c}}a(r,"insert"),t.insert=r;function n(s){return{range:s,newText:""}}a(n,"del"),t.del=n;function o(s){let c=s;return ot.objectLiteral(c)&&ot.string(c.newText)&&nl.is(c.range)}a(o,"is"),t.is=o})(Xte||(Xte={}));var qIt;(function(t){function e(n,o,s){let c={label:n};return o!==void 0&&(c.needsConfirmation=o),s!==void 0&&(c.description=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&ot.string(o.label)&&(ot.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(ot.string(o.description)||o.description===void 0)}a(r,"is"),t.is=r})(qIt||(qIt={}));var Zte;(function(t){function e(r){let n=r;return ot.string(n)}a(e,"is"),t.is=e})(Zte||(Zte={}));var W9r;(function(t){function e(s,c,l){return{range:s,newText:c,annotationId:l}}a(e,"replace"),t.replace=e;function r(s,c,l){return{range:{start:s,end:s},newText:c,annotationId:l}}a(r,"insert"),t.insert=r;function n(s,c){return{range:s,newText:"",annotationId:c}}a(n,"del"),t.del=n;function o(s){let c=s;return Xte.is(c)&&(qIt.is(c.annotationId)||Zte.is(c.annotationId))}a(o,"is"),t.is=o})(W9r||(W9r={}));var GIt;(function(t){function e(n,o){return{textDocument:n,edits:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&WIt.is(o.textDocument)&&Array.isArray(o.edits)}a(r,"is"),t.is=r})(GIt||(GIt={}));var HIt;(function(t){function e(n,o,s){let c={kind:"create",uri:n};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(c.options=o),s!==void 0&&(c.annotationId=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="create"&&ot.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||ot.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||ot.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||Zte.is(o.annotationId))}a(r,"is"),t.is=r})(HIt||(HIt={}));var jIt;(function(t){function e(n,o,s,c){let l={kind:"rename",oldUri:n,newUri:o};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),c!==void 0&&(l.annotationId=c),l}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="rename"&&ot.string(o.oldUri)&&ot.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||ot.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||ot.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||Zte.is(o.annotationId))}a(r,"is"),t.is=r})(jIt||(jIt={}));var $It;(function(t){function e(n,o,s){let c={kind:"delete",uri:n};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(c.options=o),s!==void 0&&(c.annotationId=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&o.kind==="delete"&&ot.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||ot.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||ot.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||Zte.is(o.annotationId))}a(r,"is"),t.is=r})($It||($It={}));var VIt;(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(o=>ot.string(o.kind)?HIt.is(o)||jIt.is(o)||$It.is(o):GIt.is(o)))}a(e,"is"),t.is=e})(VIt||(VIt={}));var z9r;(function(t){function e(n){return{uri:n}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.string(o.uri)}a(r,"is"),t.is=r})(z9r||(z9r={}));var Y9r;(function(t){function e(n,o){return{uri:n,version:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.string(o.uri)&&ot.integer(o.version)}a(r,"is"),t.is=r})(Y9r||(Y9r={}));var WIt;(function(t){function e(n,o){return{uri:n,version:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.string(o.uri)&&(o.version===null||ot.integer(o.version))}a(r,"is"),t.is=r})(WIt||(WIt={}));var K9r;(function(t){function e(n,o,s,c){return{uri:n,languageId:o,version:s,text:c}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.string(o.uri)&&ot.string(o.languageId)&&ot.integer(o.version)&&ot.string(o.text)}a(r,"is"),t.is=r})(K9r||(K9r={}));var zIt;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}a(e,"is"),t.is=e})(zIt||(zIt={}));var RAe;(function(t){function e(r){let n=r;return ot.objectLiteral(r)&&zIt.is(n.kind)&&ot.string(n.value)}a(e,"is"),t.is=e})(RAe||(RAe={}));var J9r;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(J9r||(J9r={}));var X9r;(function(t){t.PlainText=1,t.Snippet=2})(X9r||(X9r={}));var Z9r;(function(t){t.Deprecated=1})(Z9r||(Z9r={}));var e7r;(function(t){function e(n,o,s){return{newText:n,insert:o,replace:s}}a(e,"create"),t.create=e;function r(n){let o=n;return o&&ot.string(o.newText)&&nl.is(o.insert)&&nl.is(o.replace)}a(r,"is"),t.is=r})(e7r||(e7r={}));var t7r;(function(t){t.asIs=1,t.adjustIndentation=2})(t7r||(t7r={}));var r7r;(function(t){function e(r){let n=r;return n&&(ot.string(n.detail)||n.detail===void 0)&&(ot.string(n.description)||n.description===void 0)}a(e,"is"),t.is=e})(r7r||(r7r={}));var n7r;(function(t){function e(r){return{label:r}}a(e,"create"),t.create=e})(n7r||(n7r={}));var i7r;(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}a(e,"create"),t.create=e})(i7r||(i7r={}));var O8e;(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(e,"fromPlainText"),t.fromPlainText=e;function r(n){let o=n;return ot.string(o)||ot.objectLiteral(o)&&ot.string(o.language)&&ot.string(o.value)}a(r,"is"),t.is=r})(O8e||(O8e={}));var o7r;(function(t){function e(r){let n=r;return!!n&&ot.objectLiteral(n)&&(RAe.is(n.contents)||O8e.is(n.contents)||ot.typedArray(n.contents,O8e.is))&&(r.range===void 0||nl.is(r.range))}a(e,"is"),t.is=e})(o7r||(o7r={}));var s7r;(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}a(e,"create"),t.create=e})(s7r||(s7r={}));var a7r;(function(t){function e(r,n,...o){let s={label:r};return ot.defined(n)&&(s.documentation=n),ot.defined(o)?s.parameters=o:s.parameters=[],s}a(e,"create"),t.create=e})(a7r||(a7r={}));var c7r;(function(t){t.Text=1,t.Read=2,t.Write=3})(c7r||(c7r={}));var l7r;(function(t){function e(r,n){let o={range:r};return ot.number(n)&&(o.kind=n),o}a(e,"create"),t.create=e})(l7r||(l7r={}));var u7r;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(u7r||(u7r={}));var d7r;(function(t){t.Deprecated=1})(d7r||(d7r={}));var f7r;(function(t){function e(r,n,o,s,c){let l={name:r,kind:n,location:{uri:s,range:o}};return c&&(l.containerName=c),l}a(e,"create"),t.create=e})(f7r||(f7r={}));var p7r;(function(t){function e(r,n,o,s){return s!==void 0?{name:r,kind:n,location:{uri:o,range:s}}:{name:r,kind:n,location:{uri:o}}}a(e,"create"),t.create=e})(p7r||(p7r={}));var h7r;(function(t){function e(n,o,s,c,l,u){let d={name:n,detail:o,kind:s,range:c,selectionRange:l};return u!==void 0&&(d.children=u),d}a(e,"create"),t.create=e;function r(n){let o=n;return o&&ot.string(o.name)&&ot.number(o.kind)&&nl.is(o.range)&&nl.is(o.selectionRange)&&(o.detail===void 0||ot.string(o.detail))&&(o.deprecated===void 0||ot.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}a(r,"is"),t.is=r})(h7r||(h7r={}));var m7r;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(m7r||(m7r={}));var B8e;(function(t){t.Invoked=1,t.Automatic=2})(B8e||(B8e={}));var g7r;(function(t){function e(n,o,s){let c={diagnostics:n};return o!=null&&(c.only=o),s!=null&&(c.triggerKind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.typedArray(o.diagnostics,M8e.is)&&(o.only===void 0||ot.typedArray(o.only,ot.string))&&(o.triggerKind===void 0||o.triggerKind===B8e.Invoked||o.triggerKind===B8e.Automatic)}a(r,"is"),t.is=r})(g7r||(g7r={}));var A7r;(function(t){function e(n,o,s){let c={title:n},l=!0;return typeof o=="string"?(l=!1,c.kind=o):Jte.is(o)?c.command=o:c.edit=o,l&&s!==void 0&&(c.kind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return o&&ot.string(o.title)&&(o.diagnostics===void 0||ot.typedArray(o.diagnostics,M8e.is))&&(o.kind===void 0||ot.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Jte.is(o.command))&&(o.isPreferred===void 0||ot.boolean(o.isPreferred))&&(o.edit===void 0||VIt.is(o.edit))}a(r,"is"),t.is=r})(A7r||(A7r={}));var y7r;(function(t){function e(n,o){let s={range:n};return ot.defined(o)&&(s.data=o),s}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&nl.is(o.range)&&(ot.undefined(o.command)||Jte.is(o.command))}a(r,"is"),t.is=r})(y7r||(y7r={}));var E7r;(function(t){function e(n,o){return{tabSize:n,insertSpaces:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&ot.uinteger(o.tabSize)&&ot.boolean(o.insertSpaces)}a(r,"is"),t.is=r})(E7r||(E7r={}));var _7r;(function(t){function e(n,o,s){return{range:n,target:o,data:s}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&nl.is(o.range)&&(ot.undefined(o.target)||ot.string(o.target))}a(r,"is"),t.is=r})(_7r||(_7r={}));var C7r;(function(t){function e(n,o){return{range:n,parent:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&nl.is(o.range)&&(o.parent===void 0||t.is(o.parent))}a(r,"is"),t.is=r})(C7r||(C7r={}));var v7r;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(v7r||(v7r={}));var b7r;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(b7r||(b7r={}));var T7r;(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}a(e,"is"),t.is=e})(T7r||(T7r={}));var S7r;(function(t){function e(n,o){return{range:n,text:o}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&nl.is(o.range)&&ot.string(o.text)}a(r,"is"),t.is=r})(S7r||(S7r={}));var I7r;(function(t){function e(n,o,s){return{range:n,variableName:o,caseSensitiveLookup:s}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&nl.is(o.range)&&ot.boolean(o.caseSensitiveLookup)&&(ot.string(o.variableName)||o.variableName===void 0)}a(r,"is"),t.is=r})(I7r||(I7r={}));var x7r;(function(t){function e(n,o){return{range:n,expression:o}}a(e,"create"),t.create=e;function r(n){let o=n;return o!=null&&nl.is(o.range)&&(ot.string(o.expression)||o.expression===void 0)}a(r,"is"),t.is=r})(x7r||(x7r={}));var w7r;(function(t){function e(n,o){return{frameId:n,stoppedLocation:o}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.defined(o)&&nl.is(n.stoppedLocation)}a(r,"is"),t.is=r})(w7r||(w7r={}));var YIt;(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}a(e,"is"),t.is=e})(YIt||(YIt={}));var KIt;(function(t){function e(n){return{value:n}}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&(o.tooltip===void 0||ot.string(o.tooltip)||RAe.is(o.tooltip))&&(o.location===void 0||N8e.is(o.location))&&(o.command===void 0||Jte.is(o.command))}a(r,"is"),t.is=r})(KIt||(KIt={}));var R7r;(function(t){function e(n,o,s){let c={position:n,label:o};return s!==void 0&&(c.kind=s),c}a(e,"create"),t.create=e;function r(n){let o=n;return ot.objectLiteral(o)&&Rg.is(o.position)&&(ot.string(o.label)||ot.typedArray(o.label,KIt.is))&&(o.kind===void 0||YIt.is(o.kind))&&o.textEdits===void 0||ot.typedArray(o.textEdits,Xte.is)&&(o.tooltip===void 0||ot.string(o.tooltip)||RAe.is(o.tooltip))&&(o.paddingLeft===void 0||ot.boolean(o.paddingLeft))&&(o.paddingRight===void 0||ot.boolean(o.paddingRight))}a(r,"is"),t.is=r})(R7r||(R7r={}));var P7r;(function(t){function e(r){return{kind:"snippet",value:r}}a(e,"createSnippet"),t.createSnippet=e})(P7r||(P7r={}));var k7r;(function(t){function e(r,n,o,s){return{insertText:r,filterText:n,range:o,command:s}}a(e,"create"),t.create=e})(k7r||(k7r={}));var D7r;(function(t){function e(r){return{items:r}}a(e,"create"),t.create=e})(D7r||(D7r={}));var N7r;(function(t){t.Invoked=0,t.Automatic=1})(N7r||(N7r={}));var M7r;(function(t){function e(r,n){return{range:r,text:n}}a(e,"create"),t.create=e})(M7r||(M7r={}));var O7r;(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}a(e,"create"),t.create=e})(O7r||(O7r={}));var B7r;(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&FIt.is(n.uri)&&ot.string(n.name)}a(e,"is"),t.is=e})(B7r||(B7r={}));var L7r;(function(t){function e(s,c,l,u){return new JIt(s,c,l,u)}a(e,"create"),t.create=e;function r(s){let c=s;return!!(ot.defined(c)&&ot.string(c.uri)&&(ot.undefined(c.languageId)||ot.string(c.languageId))&&ot.uinteger(c.lineCount)&&ot.func(c.getText)&&ot.func(c.positionAt)&&ot.func(c.offsetAt))}a(r,"is"),t.is=r;function n(s,c){let l=s.getText(),u=o(c,(p,h)=>{let m=p.range.start.line-h.range.start.line;return m===0?p.range.start.character-h.range.start.character:m}),d=l.length;for(let p=u.length-1;p>=0;p--){let h=u[p],m=s.offsetAt(h.range.start),g=s.offsetAt(h.range.end);if(g<=d)l=l.substring(0,m)+h.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");d=m}return l}a(n,"applyEdits"),t.applyEdits=n;function o(s,c){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),d=s.slice(l);o(u,c),o(d,c);let p=0,h=0,m=0;for(;p0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,o=r.length;if(o===0)return Lg.create(0,e);for(;ne?o=c:n=c+1}let s=n-1;return Lg.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],o=e.line+1"u"}a(n,"undefined"),t.undefined=n;function o(g){return g===!0||g===!1}a(o,"boolean"),t.boolean=o;function s(g){return e.call(g)==="[object String]"}a(s,"string"),t.string=s;function c(g){return e.call(g)==="[object Number]"}a(c,"number"),t.number=c;function l(g,A,y){return e.call(g)==="[object Number]"&&A<=g&&g<=y}a(l,"numberRange"),t.numberRange=l;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}a(u,"integer"),t.integer=u;function d(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}a(d,"uinteger"),t.uinteger=d;function p(g){return e.call(g)==="[object Function]"}a(p,"func"),t.func=p;function h(g){return g!==null&&typeof g=="object"}a(h,"objectLiteral"),t.objectLiteral=h;function m(g,A){return Array.isArray(g)&&g.every(A)}a(m,"typedArray"),t.typedArray=m})(st||(st={}));var vc=class{static{a(this,"LocationFactory")}static{this.range=ul.create.bind(ul)}static{this.position=Lg.create.bind(Lg)}},Bx=class t{constructor(e,r,n){this.uri=e;this._textDocument=r;this.detectedLanguageId=n}static{a(this,"CopilotTextDocument")}static withChanges(e,r,n){let o=XM.create(e.clientUri,e.clientLanguageId,n,e.getText());return XM.update(o,r,n),new t(e.uri,o,e.detectedLanguageId)}applyEdits(e){let r=XM.create(this.clientUri,this.clientLanguageId,this.version,this.getText());return XM.update(r,e.map(n=>({text:n.newText,range:n.range})),this.version),new t(this.uri,r,this.detectedLanguageId)}static create(e,r,n,o,s=$P({uri:e,languageId:r})){return new t(ha(e),XM.create(e,r,n,o),s)}get clientUri(){return this._textDocument.uri}get clientLanguageId(){return this._textDocument.languageId}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){let r=typeof e=="number"?e:e.line;if(r<0||r>=this.lineCount)throw new RangeError("Illegal value for lineNumber");let n=ul.create(r,0,r+1,0),o=this.getText(n).replace(/\r\n$|\r$|\n$/g,""),s=ul.create(Lg.create(r,0),Lg.create(r,o.length)),c=o.trim().length===0;return{text:o,range:s,isEmptyOrWhitespace:c}}};var WP=require("worker_threads");var Yji=5,U9r=3e4,NIt=class extends _6{constructor(r){super();this.worker=r;this.didChangeEmitter=new ki;this.onDidFileChange=this.didChangeEmitter.event;this.workspaceFolders=[]}static{a(this,"ContextWorkerFileSystem")}setWorkspaceFolders(r){this.workspaceFolders=r.map(n=>ha(n))}getWorkspaceFolder(r){let n=ha(r.uri);for(let o of this.workspaceFolders)if(n.startsWith(o))return o}async readValidFile(r){try{let n=await this.worker.readAndValidateUri(r.uri);return n.valid?{status:"valid",document:Bx.create(n.uri,"UNKNOWN",-1,n.text)}:{status:"invalid",reason:`Invalid file ${r.uri}`}}catch{return{status:"invalid",reason:`Invalid file ${r.uri}`}}}},DIt=class{constructor(e,r,n){this.nextId=-1;this.activeValidations=new Map;this.validationQueue=new Map;this.fileSystem=new NIt(this);this.providers=[];this.port=e,this.port.on("message",o=>{this.handleMessage(o)}),this.fileSystem.setWorkspaceFolders(r),this.documentManager=new v6e(this.fileSystem,n),this.coordinator=new A6e(this.documentManager,n),this.recentActivityProvider=new m6e,this.providers.push(this.recentActivityProvider)}static{a(this,"ContextWorker")}addLocalProvider(e){this.providers.push(e)}async handleMessage(e){if(!DFr(e)||typeof e.id!="number"){this.port.postMessage({error:new Error(`Received unrecognized context worker message: ${JSON.stringify(e)}`)});return}let n=e;try{await this.handleMessageUnsafe(n)}catch(o){this.port.postMessage(new x6(n.id,"Error",o))}}async handleMessageUnsafe(e){switch(e.messageType){case"Exit":this.exit(),this.port.postMessage(new x6(e.id,"Exit",void 0)),this.port?.close();break;case"RequestUpdate":await this.updateContext(e);break;case"ReadAndValidateResponse":this.settleValidation(e);break;default:throw new Error(`Received inappropriate context client message: ${JSON.stringify(e)}`)}}readAndValidateUri(e){let r=this.validationQueue.get(e)?.deferred;if(!r){let n=this.nextId--,o=setTimeout(()=>{let s=this.activeValidations.get(n)??this.validationQueue.get(e);s&&s.id===n&&(s.deferred.reject(new Error(`Validation timed out after ${U9r}ms`)),this.activeValidations.delete(n)||this.validationQueue.delete(e),this.advanceValidationQueue())},U9r);r=new zE,this.validationQueue.set(e,{id:n,uri:e,deferred:r,timeout:o}),this.advanceValidationQueue()}return r.promise}advanceValidationQueue(){for(;this.validationQueue.size>0&&this.activeValidations.sizer.getNodeWeight(h.id)??0),c[d.uri]=p}this.port.postMessage(new x6(e.id,"UpdateResponse",{documents:c}));let l=[];for(let d of this.providers)l.push(aIt(d.getContext(n,r,this.documentManager)));let u=await Promise.all(l);for(let d of u)if(d.status==="error"){let p=d.reason instanceof Error?d.reason:new Error(String(d.reason));this.port.postMessage(new x6(e.id,"Error",p))}else for(let p of d.value??[])this.coordinator.pushWorkspaceContext(p.source,[p])}exit(){for(let e of this.providers)e.dispose();this.providers=[],this.documentManager.dispose()}};function MIt(){return WP.parentPort!==null&&mIt(WP.workerData)}a(MIt,"isContextWorker");function Q9r(){if(!MIt())throw new Error("This must be run in a worker thread.");if(!mIt(WP.workerData))throw new Error(`Invalid worker data for context worker: ${JSON.stringify(WP.workerData)}`);let t=WP.workerData.cwd;process.cwd=()=>t;let e=new DIt(WP.parentPort,WP.workerData.workspaceRoots,WP.workerData.config);e.addLocalProvider(new d6e(e.fileSystem,e.documentManager)),e.addLocalProvider(new h6e(e.fileSystem,e.documentManager)),e.addLocalProvider(new g6e)}a(Q9r,"runContextWorker");f();var Nye=de(require("util"));function q9r(t){let e=new console.Console(process.stderr,process.stderr);function r(n,...o){if(kL(t)==="dev")return t.get(Cd).logIt(t,n,"console",...o)}return a(r,"logIt"),e.debug=(...n)=>r(4,...n),e.info=(...n)=>r(3,...n),e.warn=(...n)=>r(2,...n),e.error=(...n)=>r(1,...n),e.assert=(n,...o)=>{n||(o.length===0?r(2,"Assertion failed"):r(2,"Assertion failed:",Nye.format(...o)))},e.dir=(n,o)=>r(4,Nye.inspect(n,o)),e.log=e.debug.bind(e),e.trace=(...n)=>{let o=new Error(Nye.format(...n));o.name="Trace",e.log(o)},e}a(q9r,"createConsole");var FX=de(require("fs/promises")),mNe=de(require("path")),MI=de(Fx()),f1i=require("worker_threads");f();f();var pFe=require("assert");f();f();var cVi={right:pVi,center:hVi},lVi=0,sFe=1,uVi=2,aFe=3,sxt=class{static{a(this,"UI")}constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(` -`).map(o=>o.split(" ")),n=0;return r.forEach(o=>{o.length>1&&q1.stringWidth(o[0])>n&&(n=Math.min(Math.floor(this.width*.5),q1.stringWidth(o[0])))}),r.forEach(o=>{this.div(...o.map((s,c)=>({text:s.trim(),padding:this.measurePadding(s),width:c===0&&o.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let r=q1.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(` -`)}rowToString(e,r){return this.rasterize(e).forEach((n,o)=>{let s="";n.forEach((c,l)=>{let{width:u}=e[l],d=this.negatePadding(e[l]),p=c;if(d>q1.stringWidth(c)&&(p+=" ".repeat(d-q1.stringWidth(c))),e[l].align&&e[l].align!=="left"&&this.wrap){let m=cVi[e[l].align];p=m(p,d),q1.stringWidth(p)0&&(s=this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),o=n?n[0].length:0,s=r.text,c=q1.stringWidth(s.trimRight());return r.span?this.wrap?o{s.width=n[c],this.wrap?o=q1.wrap(s.text,this.negatePadding(s),{hard:!0}).split(` +`&&o++}n&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,o=r.length;if(o===0)return Rg.create(0,e);for(;ne?o=c:n=c+1}let s=n-1;return Rg.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],o=e.line+1"u"}a(n,"undefined"),t.undefined=n;function o(g){return g===!0||g===!1}a(o,"boolean"),t.boolean=o;function s(g){return e.call(g)==="[object String]"}a(s,"string"),t.string=s;function c(g){return e.call(g)==="[object Number]"}a(c,"number"),t.number=c;function l(g,A,y){return e.call(g)==="[object Number]"&&A<=g&&g<=y}a(l,"numberRange"),t.numberRange=l;function u(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}a(u,"integer"),t.integer=u;function d(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}a(d,"uinteger"),t.uinteger=d;function p(g){return e.call(g)==="[object Function]"}a(p,"func"),t.func=p;function h(g){return g!==null&&typeof g=="object"}a(h,"objectLiteral"),t.objectLiteral=h;function m(g,A){return Array.isArray(g)&&g.every(A)}a(m,"typedArray"),t.typedArray=m})(ot||(ot={}));var gc=class{static{a(this,"LocationFactory")}static{this.range=nl.create.bind(nl)}static{this.position=Rg.create.bind(Rg)}},Sx=class t{constructor(e,r,n){this.uri=e;this._textDocument=r;this.detectedLanguageId=n}static{a(this,"CopilotTextDocument")}static withChanges(e,r,n){let o=MM.create(e.clientUri,e.clientLanguageId,n,e.getText());return MM.update(o,r,n),new t(e.uri,o,e.detectedLanguageId)}applyEdits(e){let r=MM.create(this.clientUri,this.clientLanguageId,this.version,this.getText());return MM.update(r,e.map(n=>({text:n.newText,range:n.range})),this.version),new t(this.uri,r,this.detectedLanguageId)}static create(e,r,n,o,s=NP({uri:e,languageId:r})){return new t(ca(e),MM.create(e,r,n,o),s)}get clientUri(){return this._textDocument.uri}get clientLanguageId(){return this._textDocument.languageId}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){let r=typeof e=="number"?e:e.line;if(r<0||r>=this.lineCount)throw new RangeError("Illegal value for lineNumber");let n=nl.create(r,0,r+1,0),o=this.getText(n).replace(/\r\n$|\r$|\n$/g,""),s=nl.create(Rg.create(r,0),Rg.create(r,o.length)),c=o.trim().length===0;return{text:o,range:s,isEmptyOrWhitespace:c}}};var OP=require("worker_threads");var KVi=5,F7r=3e4,XIt=class extends z8{constructor(r){super();this.worker=r;this.didChangeEmitter=new Ri;this.onDidFileChange=this.didChangeEmitter.event;this.workspaceFolders=[]}static{a(this,"ContextWorkerFileSystem")}setWorkspaceFolders(r){this.workspaceFolders=r.map(n=>ca(n))}getWorkspaceFolder(r){let n=ca(r.uri);for(let o of this.workspaceFolders)if(n.startsWith(o))return o}async readValidFile(r){try{let n=await this.worker.readAndValidateUri(r.uri);return n.valid?{status:"valid",document:Sx.create(n.uri,"UNKNOWN",-1,n.text)}:{status:"invalid",reason:`Invalid file ${r.uri}`}}catch{return{status:"invalid",reason:`Invalid file ${r.uri}`}}}},ZIt=class{constructor(e,r,n){this.nextId=-1;this.activeValidations=new Map;this.validationQueue=new Map;this.fileSystem=new XIt(this);this.providers=[];this.port=e,this.port.on("message",o=>{this.handleMessage(o)}),this.fileSystem.setWorkspaceFolders(r),this.documentManager=new P8e(this.fileSystem,n),this.coordinator=new S8e(this.documentManager,n),this.recentActivityProvider=new b8e,this.providers.push(this.recentActivityProvider)}static{a(this,"ContextWorker")}addLocalProvider(e){this.providers.push(e)}async handleMessage(e){if(!D9r(e)||typeof e.id!="number"){this.port.postMessage({error:new Error(`Received unrecognized context worker message: ${JSON.stringify(e)}`)});return}let n=e;try{await this.handleMessageUnsafe(n)}catch(o){this.port.postMessage(new e6(n.id,"Error",o))}}async handleMessageUnsafe(e){switch(e.messageType){case"Exit":this.exit(),this.port.postMessage(new e6(e.id,"Exit",void 0)),this.port?.close();break;case"RequestUpdate":await this.updateContext(e);break;case"ReadAndValidateResponse":this.settleValidation(e);break;default:throw new Error(`Received inappropriate context client message: ${JSON.stringify(e)}`)}}readAndValidateUri(e){let r=this.validationQueue.get(e)?.deferred;if(!r){let n=this.nextId--,o=setTimeout(()=>{let s=this.activeValidations.get(n)??this.validationQueue.get(e);s&&s.id===n&&(s.deferred.reject(new Error(`Validation timed out after ${F7r}ms`)),this.activeValidations.delete(n)||this.validationQueue.delete(e),this.advanceValidationQueue())},F7r);r=new wE,this.validationQueue.set(e,{id:n,uri:e,deferred:r,timeout:o}),this.advanceValidationQueue()}return r.promise}advanceValidationQueue(){for(;this.validationQueue.size>0&&this.activeValidations.sizer.getNodeWeight(h.id)??0),c[d.uri]=p}this.port.postMessage(new e6(e.id,"UpdateResponse",{documents:c}));let l=[];for(let d of this.providers)l.push(xIt(d.getContext(n,r,this.documentManager)));let u=await Promise.all(l);for(let d of u)if(d.status==="error"){let p=d.reason instanceof Error?d.reason:new Error(String(d.reason));this.port.postMessage(new e6(e.id,"Error",p))}else for(let p of d.value??[])this.coordinator.pushWorkspaceContext(p.source,[p])}exit(){for(let e of this.providers)e.dispose();this.providers=[],this.documentManager.dispose()}};function ext(){return OP.parentPort!==null&&OIt(OP.workerData)}a(ext,"isContextWorker");function U7r(){if(!ext())throw new Error("This must be run in a worker thread.");if(!OIt(OP.workerData))throw new Error(`Invalid worker data for context worker: ${JSON.stringify(OP.workerData)}`);let t=OP.workerData.cwd;process.cwd=()=>t;let e=new ZIt(OP.parentPort,OP.workerData.workspaceRoots,OP.workerData.config);e.addLocalProvider(new E8e(e.fileSystem,e.documentManager)),e.addLocalProvider(new v8e(e.fileSystem,e.documentManager)),e.addLocalProvider(new T8e)}a(U7r,"runContextWorker");f();var PAe=de(require("util"));function Q7r(t){let e=new console.Console(process.stderr,process.stderr);function r(n,...o){if(pL(t)==="dev")return t.get(fd).logIt(t,n,"console",...o)}return a(r,"logIt"),e.debug=(...n)=>r(4,...n),e.info=(...n)=>r(3,...n),e.warn=(...n)=>r(2,...n),e.error=(...n)=>r(1,...n),e.assert=(n,...o)=>{n||(o.length===0?r(2,"Assertion failed"):r(2,"Assertion failed:",PAe.format(...o)))},e.dir=(n,o)=>r(4,PAe.inspect(n,o)),e.log=e.debug.bind(e),e.trace=(...n)=>{let o=new Error(PAe.format(...n));o.name="Trace",e.log(o)},e}a(Q7r,"createConsole");var $J=de(require("fs/promises")),fke=de(require("path")),vI=de(xx()),fvi=require("worker_threads");f();f();var C6e=require("assert");f();f();var lzi={right:hzi,center:mzi},uzi=0,h6e=1,dzi=2,m6e=3,Ixt=class{static{a(this,"UI")}constructor(e){var r;this.width=e.width,this.wrap=(r=e.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...e){let r=this.div(...e);r.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let r=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let r=e.split(` +`).map(o=>o.split(" ")),n=0;return r.forEach(o=>{o.length>1&&w1.stringWidth(o[0])>n&&(n=Math.min(Math.floor(this.width*.5),w1.stringWidth(o[0])))}),r.forEach(o=>{this.div(...o.map((s,c)=>({text:s.trim(),padding:this.measurePadding(s),width:c===0&&o.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let r=w1.stripAnsi(e);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(r=>{this.rowToString(r,e)}),e.filter(r=>!r.hidden).map(r=>r.text).join(` +`)}rowToString(e,r){return this.rasterize(e).forEach((n,o)=>{let s="";n.forEach((c,l)=>{let{width:u}=e[l],d=this.negatePadding(e[l]),p=c;if(d>w1.stringWidth(c)&&(p+=" ".repeat(d-w1.stringWidth(c))),e[l].align&&e[l].align!=="left"&&this.wrap){let m=lzi[e[l].align];p=m(p,d),w1.stringWidth(p)0&&(s=this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),o=n?n[0].length:0,s=r.text,c=w1.stringWidth(s.trimRight());return r.span?this.wrap?o{s.width=n[c],this.wrap?o=w1.wrap(s.text,this.negatePadding(s),{hard:!0}).split(` `):o=s.text.split(` -`),s.border&&(o.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),o.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(o.unshift(...new Array(s.padding[lVi]||0).fill("")),o.push(...new Array(s.padding[uVi]||0).fill(""))),o.forEach((l,u)=>{r[u]||r.push([]);let d=r[u];for(let p=0;pc.width||q1.stringWidth(c.text));let r=e.length,n=this.width,o=e.map(c=>{if(c.width)return r--,n-=c.width,c.width}),s=r?Math.floor(n/r):0;return o.map((c,l)=>c===void 0?Math.max(s,dVi(e[l])):c)}};function O7r(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}a(O7r,"addBorder");function dVi(t){let e=t.padding||[],r=1+(e[aFe]||0)+(e[sFe]||0);return t.border?r+4:r}a(dVi,"_minWidth");function fVi(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}a(fVi,"getWindowWidth");function pVi(t,e){t=t.trim();let r=q1.stringWidth(t);return r=e?t:" ".repeat(e-r>>1)+t}a(hVi,"alignCenter");var q1;function B7r(t,e){return q1=e,new sxt({width:t?.width||fVi(),wrap:t?.wrap})}a(B7r,"cliui");f();var L7r=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function axt(t){return t.replace(L7r,"")}a(axt,"stripAnsi");function F7r(t,e){let[r,n]=t.match(L7r)||["",""];t=axt(t);let o="";for(let s=0;s[...e].length,"stringWidth"),stripAnsi:axt,wrap:F7r})}a(cxt,"ui");f();var jre=require("path"),cFe=require("fs");function lxt(t,e){let r=(0,jre.resolve)(".",t),n;for((0,cFe.statSync)(r).isDirectory()||(r=(0,jre.dirname)(r));;){if(n=e(r,(0,cFe.readdirSync)(r)),n)return(0,jre.resolve)(r,n);if(r=(0,jre.dirname)(n=r),n===r)break}}a(lxt,"default");var eUr=require("util"),tUr=require("fs"),rUr=require("url");f();var H7r=require("util"),fFe=require("path");f();function yj(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,o=t.match(/^-+/);for(let s=o?o[0].length:0;s0?n+=`${e}${r.charAt(o)}`:n+=c}return n}a(lFe,"decamelize");function uFe(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}a(uFe,"looksLikeNumber");f();f();function U7r(t){if(Array.isArray(t))return t.map(c=>typeof c!="string"?c+"":c);t=t.trim();let e=0,r=null,n=null,o=null,s=[];for(let c=0;c{typeof ae=="number"&&(E.nargs[Z]=ae,E.keys.push(Z))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([Z,ae])=>{typeof ae=="function"&&(E.coercions[Z]=ae,E.keys.push(Z))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(Z){E.configs[Z]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([Z,ae])=>{(typeof ae=="boolean"||typeof ae=="function")&&(E.configs[Z]=ae)})),ce(n.key,c,n.default,E.arrays),Object.keys(u).forEach(function(Z){(E.aliases[Z]||[]).forEach(function(ae){u[ae]=u[Z]})});let b=null;xe();let I=[],x=Object.assign(Object.create(null),{_:[]}),R={};for(let Z=0;Z=3&&(J(Ae[1],E.arrays)?Z=k(Z,Ae[1],o,Ae[2]):J(Ae[1],E.nargs)!==!1?Z=P(Z,Ae[1],o,Ae[2]):Q(Ae[1],Ae[2],!0));else if(ae.match(v)&&l["boolean-negation"])Ae=ae.match(v),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],Q(ee,J(ee,E.arrays)?[!1]:!1));else if(ae.match(/^--.+/)||!l["short-option-groups"]&&ae.match(/^-[^-]+/))Ae=ae.match(/^--?(.+)/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],J(ee,E.arrays)?Z=k(Z,ee,o):J(ee,E.nargs)!==!1?Z=P(Z,ee,o):(ve=o[Z+1],ve!==void 0&&(!ve.match(/^-/)||ve.match(_))&&!J(ee,E.bools)&&!J(ee,E.counts)||/^(true|false)$/.test(ve)?(Q(ee,ve),Z++):Q(ee,Ke(ee))));else if(ae.match(/^-.\..+=/))Ae=ae.match(/^-([^=]+)=([\s\S]*)$/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=3&&Q(Ae[1],Ae[2]);else if(ae.match(/^-.\..+/)&&!ae.match(_))ve=o[Z+1],Ae=ae.match(/^-(.\..+)/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],ve!==void 0&&!ve.match(/^-/)&&!J(ee,E.bools)&&!J(ee,E.counts)?(Q(ee,ve),Z++):Q(ee,Ke(ee)));else if(ae.match(/^-[^-]+/)&&!ae.match(_)){Ee=ae.slice(1,-1).split(""),Y=!1;for(let Ze=0;ZeZ!=="--"&&Z.includes("-")).forEach(Z=>{delete x[Z]}),l["strip-aliased"]&&[].concat(...Object.keys(c).map(Z=>c[Z])).forEach(Z=>{l["camel-case-expansion"]&&Z.includes("-")&&delete x[Z.split(".").map(ae=>yj(ae)).join(".")],delete x[Z]});function w(Z){let ae=G("_",Z);(typeof ae=="string"||typeof ae=="number")&&x._.push(ae)}a(w,"pushPositional");function P(Z,ae,Ne,Y){let ee,Ee=J(ae,E.nargs);if(Ee=typeof Ee!="number"||isNaN(Ee)?1:Ee,Ee===0)return te(Y)||(b=Error(y("Argument unexpected for: %s",ae))),Q(ae,Ke(ae)),Z;let Ae=te(Y)?0:1;if(l["nargs-eats-options"])Ne.length-(Z+1)+Ae0&&(Q(ae,Y),ve--),ee=Z+1;ee0||Ae&&typeof Ae=="number"&&ee.length>=Ae||(Ee=Ne[ve],/^-/.test(Ee)&&!_.test(Ee)&&!Ve(Ee)));ve++)Z=ve,ee.push(D(ae,Ee,s))}return typeof Ae=="number"&&(Ae&&ee.length1&&l["dot-notation"]&&(E.aliases[ee[0]]||[]).forEach(function(Ee){let Ae=Ee.split("."),ve=[].concat(ee);ve.shift(),Ae=Ae.concat(ve),(E.aliases[Z]||[]).includes(Ae.join("."))||j(x,Ae,Y)}),J(Z,E.normalize)&&!J(Z,E.arrays)&&[Z].concat(E.aliases[Z]||[]).forEach(function(Ae){Object.defineProperty(R,Ae,{enumerable:!0,get(){return ae},set(ve){ae=typeof ve=="string"?ZM.normalize(ve):ve}})})}a(Q,"setArg");function M(Z,ae){E.aliases[Z]&&E.aliases[Z].length||(E.aliases[Z]=[ae],g[ae]=!0),E.aliases[ae]&&E.aliases[ae].length||M(ae,Z)}a(M,"addNewAlias");function D(Z,ae,Ne){Ne&&(ae=gVi(ae)),(J(Z,E.bools)||J(Z,E.counts))&&typeof ae=="string"&&(ae=ae==="true");let Y=Array.isArray(ae)?ae.map(function(ee){return G(Z,ee)}):G(Z,ae);return J(Z,E.counts)&&(te(Y)||typeof Y=="boolean")&&(Y=uxt()),J(Z,E.normalize)&&J(Z,E.arrays)&&(Array.isArray(ae)?Y=ae.map(ee=>ZM.normalize(ee)):Y=ZM.normalize(ae)),Y}a(D,"processValue");function G(Z,ae){return!l["parse-positional-numbers"]&&Z==="_"||!J(Z,E.strings)&&!J(Z,E.bools)&&!Array.isArray(ae)&&(uFe(ae)&&l["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${ae}`)))||!te(ae)&&J(Z,E.numbers))&&(ae=Number(ae)),ae}a(G,"maybeCoerceNumber");function O(Z){let ae=Object.create(null);$(ae,E.aliases,u),Object.keys(E.configs).forEach(function(Ne){let Y=Z[Ne]||ae[Ne];if(Y)try{let ee=null,Ee=ZM.resolve(ZM.cwd(),Y),Ae=E.configs[Ne];if(typeof Ae=="function"){try{ee=Ae(Ee)}catch(ve){ee=ve}if(ee instanceof Error){b=ee;return}}else ee=ZM.require(Ee);N(ee)}catch(ee){ee.name==="PermissionDenied"?b=ee:Z[Ne]&&(b=Error(y("Invalid JSON config file: %s",Y)))}})}a(O,"setConfig");function N(Z,ae){Object.keys(Z).forEach(function(Ne){let Y=Z[Ne],ee=ae?ae+"."+Ne:Ne;typeof Y=="object"&&Y!==null&&!Array.isArray(Y)&&l["dot-notation"]?N(Y,ee):(!W(x,ee.split("."))||J(ee,E.arrays)&&l["combine-arrays"])&&Q(ee,Y)})}a(N,"setConfigObject");function F(){typeof d<"u"&&d.forEach(function(Z){N(Z)})}a(F,"setConfigObjects");function U(Z,ae){if(typeof p>"u")return;let Ne=typeof p=="string"?p:"",Y=ZM.env();Object.keys(Y).forEach(function(ee){if(Ne===""||ee.lastIndexOf(Ne,0)===0){let Ee=ee.split("__").map(function(Ae,ve){return ve===0&&(Ae=Ae.substring(Ne.length)),yj(Ae)});(ae&&E.configs[Ee.join(".")]||!ae)&&!W(Z,Ee)&&Q(Ee.join("."),Y[ee])}})}a(U,"applyEnvVars");function L(Z){let ae,Ne=new Set;Object.keys(Z).forEach(function(Y){if(!Ne.has(Y)&&(ae=J(Y,E.coercions),typeof ae=="function"))try{let ee=G(Y,ae(Z[Y]));[].concat(E.aliases[Y]||[],Y).forEach(Ee=>{Ne.add(Ee),Z[Ee]=ee})}catch(ee){b=ee}})}a(L,"applyCoercions");function H(Z){return E.keys.forEach(ae=>{~ae.indexOf(".")||typeof Z[ae]>"u"&&(Z[ae]=void 0)}),Z}a(H,"setPlaceholderKeys");function $(Z,ae,Ne,Y=!1){Object.keys(Ne).forEach(function(ee){W(Z,ee.split("."))||(j(Z,ee.split("."),Ne[ee]),Y&&(A[ee]=!0),(ae[ee]||[]).forEach(function(Ee){W(Z,Ee.split("."))||j(Z,Ee.split("."),Ne[ee])}))})}a($,"applyDefaultsAndAliases");function W(Z,ae){let Ne=Z;l["dot-notation"]||(ae=[ae.join(".")]),ae.slice(0,-1).forEach(function(ee){Ne=Ne[ee]||{}});let Y=ae[ae.length-1];return typeof Ne!="object"?!1:Y in Ne}a(W,"hasKey");function j(Z,ae,Ne){let Y=Z;l["dot-notation"]||(ae=[ae.join(".")]),ae.slice(0,-1).forEach(function(We){We=Q7r(We),typeof Y=="object"&&Y[We]===void 0&&(Y[We]={}),typeof Y[We]!="object"||Array.isArray(Y[We])?(Array.isArray(Y[We])?Y[We].push({}):Y[We]=[Y[We],{}],Y=Y[We][Y[We].length-1]):Y=Y[We]});let ee=Q7r(ae[ae.length-1]),Ee=J(ae.join("."),E.arrays),Ae=Array.isArray(Ne),ve=l["duplicate-arguments-array"];!ve&&J(ee,E.nargs)&&(ve=!0,(!te(Y[ee])&&E.nargs[ee]===1||Array.isArray(Y[ee])&&Y[ee].length===E.nargs[ee])&&(Y[ee]=void 0)),Ne===uxt()?Y[ee]=uxt(Y[ee]):Array.isArray(Y[ee])?ve&&Ee&&Ae?Y[ee]=l["flatten-duplicate-arrays"]?Y[ee].concat(Ne):(Array.isArray(Y[ee][0])?Y[ee]:[Y[ee]]).concat([Ne]):!ve&&!!Ee==!!Ae?Y[ee]=Ne:Y[ee]=Y[ee].concat([Ne]):Y[ee]===void 0&&Ee?Y[ee]=Ae?Ne:[Ne]:ve&&!(Y[ee]===void 0||J(ee,E.counts)||J(ee,E.bools))?Y[ee]=[Y[ee],Ne]:Y[ee]=Ne}a(j,"setKey");function ce(...Z){Z.forEach(function(ae){Object.keys(ae||{}).forEach(function(Ne){E.aliases[Ne]||(E.aliases[Ne]=[].concat(c[Ne]||[]),E.aliases[Ne].concat(Ne).forEach(function(Y){if(/-/.test(Y)&&l["camel-case-expansion"]){let ee=yj(Y);ee!==Ne&&E.aliases[Ne].indexOf(ee)===-1&&(E.aliases[Ne].push(ee),g[ee]=!0)}}),E.aliases[Ne].concat(Ne).forEach(function(Y){if(Y.length>1&&/[A-Z]/.test(Y)&&l["camel-case-expansion"]){let ee=lFe(Y,"-");ee!==Ne&&E.aliases[Ne].indexOf(ee)===-1&&(E.aliases[Ne].push(ee),g[ee]=!0)}}),E.aliases[Ne].forEach(function(Y){E.aliases[Y]=[Ne].concat(E.aliases[Ne].filter(function(ee){return Y!==ee}))}))})})}a(ce,"extendAliases");function J(Z,ae){let Ne=[].concat(E.aliases[Z]||[],Z),Y=Object.keys(ae),ee=Ne.find(Ee=>Y.includes(Ee));return ee?ae[ee]:!1}a(J,"checkAllAliases");function Te(Z){let ae=Object.keys(E);return[].concat(ae.map(Y=>E[Y])).some(function(Y){return Array.isArray(Y)?Y.includes(Z):Y[Z]})}a(Te,"hasAnyFlag");function fe(Z,...ae){return[].concat(...ae).some(function(Y){let ee=Z.match(Y);return ee&&Te(ee[1])})}a(fe,"hasFlagsMatching");function De(Z){if(Z.match(_)||!Z.match(/^-[^-]+/))return!1;let ae=!0,Ne,Y=Z.slice(1).split("");for(let ee=0;eeJ(Z,E.arrays)?(b=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",Z)),!0):J(Z,E.nargs)?(b=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",Z)),!0):!1)}return a(xe,"checkConfiguration"),{aliases:Object.assign({},E.aliases),argv:Object.assign(R,x),configuration:l,defaulted:Object.assign({},A),error:b,newAliases:Object.assign({},g)}}};function mVi(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(o){e.push([].concat(t[o],o))});n;){n=!1;for(let o=0;oAVi,"env"),format:H7r.format,normalize:fFe.normalize,resolve:fFe.resolve,require:a(t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse((0,j7r.readFileSync)(t,"utf8"));throw Error("only .json config files are supported in ESM")},"require")}),Uye=a(function(e,r){return $7r.parse(e.slice(),r).argv},"Parser");Uye.detailed=function(t,e){return $7r.parse(t.slice(),e)};Uye.camelCase=yj;Uye.decamelize=lFe;Uye.looksLikeNumber=uFe;var V7r=Uye;var Qx=require("path");f();function yVi(){return EVi()?0:1}a(yVi,"getProcessArgvBinIndex");function EVi(){return CVi()&&!process.defaultApp}a(EVi,"isBundledElectronApp");function CVi(){return!!process.versions.electron}a(CVi,"isElectronApp");function W7r(){return process.argv[yVi()]}a(W7r,"getProcessArgvBin");f();var Vl=class t extends Error{static{a(this,"YError")}constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};f();f();var $re=require("fs"),z7r=require("util"),Y7r=require("path");var K7r={fs:{readFileSync:$re.readFileSync,writeFile:$re.writeFile},format:z7r.format,resolve:Y7r.resolve,exists:a(t=>{try{return(0,$re.statSync)(t).isFile()}catch{return!1}},"exists")};f();var Ux,hxt=class{static{a(this,"Y18N")}constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=a(function(){},"cb");return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ux.format.apply(Ux.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=a(function(){},"cb");typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let l=[c];return~c.indexOf("%d")&&l.push(o),Ux.format.apply(Ux.format,l.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),l=JSON.stringify(this.cache[o],null,2);Ux.fs.writeFile(c,l,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{Ux.fs.readFileSync&&(e=JSON.parse(Ux.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=Ux.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=Ux.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return Ux.exists(e)}};function J7r(t,e){Ux=e;let r=new hxt(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}a(J7r,"y18n");var _Vi=a(t=>J7r(t,K7r),"y18n"),X7r=_Vi;var vVi="require is not supported by ESM",Z7r="loading a directory of commands is not supported yet for ESM",Qye;try{Qye=(0,rUr.fileURLToPath)(importMetaUrlShim)}catch{Qye=process.cwd()}var bVi=Qye.substring(0,Qye.lastIndexOf("node_modules")),nUr={assert:{notStrictEqual:pFe.notStrictEqual,strictEqual:pFe.strictEqual},cliui:cxt,findUp:lxt,getEnv:a(t=>process.env[t],"getEnv"),inspect:eUr.inspect,getCallerFile:a(()=>{throw new Vl(Z7r)},"getCallerFile"),getProcessArgvBin:W7r,mainFilename:bVi||process.cwd(),Parser:V7r,path:{basename:Qx.basename,dirname:Qx.dirname,extname:Qx.extname,relative:Qx.relative,resolve:Qx.resolve},process:{argv:a(()=>process.argv,"argv"),cwd:process.cwd,emitWarning:a((t,e)=>process.emitWarning(t,e),"emitWarning"),execPath:a(()=>process.execPath,"execPath"),exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:tUr.readFileSync,require:a(()=>{throw new Vl(vVi)},"require"),requireDirectory:a(()=>{throw new Vl(Z7r)},"requireDirectory"),stringWidth:a(t=>[...t].length,"stringWidth"),y18n:X7r({directory:(0,Qx.resolve)(Qye,"../../../locales"),updateFiles:!1})};f();f();f();function sy(t,e,r,n){r.assert.notStrictEqual(t,e,n)}a(sy,"assertNotStrictEqual");function mxt(t,e){e.assert.strictEqual(typeof t,"string")}a(mxt,"assertSingleKey");function Vre(t){return Object.keys(t)}a(Vre,"objectKeys");f();function Wl(t){return!!t&&!!t.then&&typeof t.then=="function"}a(Wl,"isPromise");f();f();f();function k6(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,l)=>{let u=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&l===r.length-1&&(u=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:u}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:u})}),s}a(k6,"parseCommand");var TVi=["first","second","third","fourth","fifth","sixth"];function fn(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[k6(`cmd ${t}`),e,r]}a(n,"parseArgs");try{let o=0,[s,c,l]=n(),u=[].slice.call(c);for(;u.length&&u[u.length-1]===void 0;)u.pop();let d=l||u.length;if(dp)throw new Vl(`Too many arguments provided. Expected max ${p} but received ${d}.`);s.demanded.forEach(h=>{let m=u.shift(),g=iUr(m);h.cmd.filter(y=>y===g||y==="*").length===0&&oUr(g,h.cmd,o),o+=1}),s.optional.forEach(h=>{if(u.length===0)return;let m=u.shift(),g=iUr(m);h.cmd.filter(y=>y===g||y==="*").length===0&&oUr(g,h.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}a(fn,"argsert");function iUr(t){return Array.isArray(t)?"array":t===null?"null":typeof t}a(iUr,"guessType");function oUr(t,e,r){throw new Vl(`Invalid ${TVi[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}a(oUr,"argumentTypeError");var hFe=class{static{a(this,"GlobalMiddleware")}constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(fn(" [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function sUr(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}a(sUr,"commandMiddlewareFactory");function Ej(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(Wl(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,l])=>Object.assign(c,l));{let c=s(o,e);return Wl(c)?c.then(l=>Object.assign(o,l)):Object.assign(o,c)}},t)}a(Ej,"applyMiddleware");f();function Cj(t,e,r=n=>{throw n}){try{let n=SVi(t)?t():t;return Wl(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}a(Cj,"maybeAsyncResult");function SVi(t){return typeof t=="function"}a(SVi,"isFunction");f();function gxt(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;ec;o.visit=(c,l,u)=>{let d=s(c,l,u);if(d){if(this.requireCache.has(l))return d;this.requireCache.add(l),this.addHandler(d)}return d},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let l=[],u=sUr(s);if(o=o||(()=>{}),Array.isArray(e))if(IVi(e))[e,...l]=e;else for(let d of e)this.addHandler(d);else if(wVi(e)){let d=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(d=[].concat(d).concat(e.aliases)),this.addHandler(d,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(aUr(n)){this.addHandler([e].concat(l),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let d=k6(e);l=l.map(m=>k6(m).cmd);let p=!1,h=[d.cmd].concat(l).filter(m=>Wre.test(m)?(p=!0,!1):!0);h.length===0&&p&&h.push("$0"),p&&(d.cmd=h[0],l=h.slice(1),e=e.replace(Wre,d.cmd)),l.forEach(m=>{this.aliasMap[m]=d.cmd}),r!==!1&&this.usage.command(e,r,p,l,c),this.handlers[d.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:u,deprecated:c,demanded:d.demanded,optional:d.optional},p&&(this.defaultCommand=this.handlers[d.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let l=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),d=u.commands.slice(),p=!e;e&&(u.commands.push(e),u.fullCommands.push(l.original));let h=this.applyBuilderUpdateUsageAndParse(p,l,r,n.aliases,d,o,s,c);return Wl(h)?h.then(m=>this.applyMiddlewareAndGetResult(p,l,m.innerArgv,u,s,m.aliases,r)):this.applyMiddlewareAndGetResult(p,l,h.innerArgv,u,s,h.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,l,u){let d=r.builder,p=n;if(mFe(d)){n.getInternalMethods().getUsageInstance().freeze();let h=d(n.getInternalMethods().reset(o),u);if(Wl(h))return h.then(m=>(p=lUr(m)?m:n,this.parseAndUpdateUsage(e,r,p,s,c,l)))}else xVi(d)&&(n.getInternalMethods().getUsageInstance().freeze(),p=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(h=>{p.option(h,d[h])}));return this.parseAndUpdateUsage(e,r,p,s,c,l)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let l=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return Wl(l)?l.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:l}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Wre.test(r.original)?r.original.replace(Wre,"").trim():r.original,o=e.filter(s=>!Wre.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,l,u){if(!c.getInternalMethods().getHasOutput()){let d=c.getInternalMethods().runValidation(s,u,c.parsed.error,e);n=Cj(n,p=>(d(p),p))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let d=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,d,!1,!1),n=Ej(n,c,l,!1),n=Cj(n,p=>{let h=r.handler(p);return Wl(h)?h.then(()=>p):p}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),Wl(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(p=>{try{c.getInternalMethods().getUsageInstance().fail(null,p)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,l){let u={};if(s)return n;l.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,o,l));let d=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),p=Ej(n,l,d,!0);return Wl(p)?p.then(h=>this.handleValidationAndGetResult(e,r,h,o,c,l,d,u)):this.handleValidationAndGetResult(e,r,p,o,c,l,d,u)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),l={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let u=s.shift();this.populatePositional(u,r,l)}for(;c.length;){let u=c.shift();this.populatePositional(u,r,l)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,l,this.cmdToParseOptions(e.original),o),l}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=k6(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let d of Object.keys(n.alias))s.alias[d]=(s.alias[d]||[]).concat(n.alias[d]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(d=>{r[d].map(p=>{s.configuration["unknown-options-as-args"]&&(s.key[d]=!0),c.push(`--${d}`),c.push(p)})}),!c.length)return;let l=Object.assign({},s.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:l}));if(u.error)o.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let d=Object.keys(r);Object.keys(r).forEach(p=>{d.push(...u.aliases[p])}),Object.keys(u.argv).forEach(p=>{d.includes(p)&&(r[p]||(r[p]=u.argv[p]),!this.isInConfigs(o,p)&&!this.isDefaulted(o,p)&&Object.prototype.hasOwnProperty.call(e,p)&&Object.prototype.hasOwnProperty.call(u.argv,p)&&(Array.isArray(e[p])||Array.isArray(u.argv[p]))?e[p]=[].concat(e[p],u.argv[p]):e[p]=u.argv[p])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Wre.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(mFe(r))return r(e,!0);aUr(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=gxt(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;sy(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();sy(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function cUr(t,e,r,n){return new Axt(t,e,r,n)}a(cUr,"command");function aUr(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}a(aUr,"isCommandBuilderDefinition");function IVi(t){return t.every(e=>typeof e=="string")}a(IVi,"isCommandAndAliases");function mFe(t){return typeof t=="function"}a(mFe,"isCommandBuilderCallback");function xVi(t){return typeof t=="object"}a(xVi,"isCommandBuilderOptionDefinitions");function wVi(t){return typeof t=="object"&&!Array.isArray(t)}a(wVi,"isCommandHandlerDefinition");f();f();function N6(t={},e=()=>!0){let r={};return Vre(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}a(N6,"objFilter");f();function D6(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}a(D6,"setBlocking");function RVi(t){return typeof t=="boolean"}a(RVi,"isBoolean");function dUr(t,e){let r=e.y18n.__,n={},o=[];n.failFn=a(function(D){o.push(D)},"failFn");let s=null,c=null,l=!0;n.showHelpOnFail=a(function(D=!0,G){let[O,N]=typeof D=="string"?[!0,D]:[D,G];return t.getInternalMethods().isGlobalContext()&&(c=N),s=N,l=O,n},"showHelpOnFailFn");let u=!1;n.fail=a(function(D,G){let O=t.getInternalMethods().getLoggerInstance();if(o.length)for(let N=o.length-1;N>=0;--N){let F=o[N];if(RVi(F)){if(G)throw G;if(D)throw Error(D)}else F(D,G,n)}else{if(t.getExitProcess()&&D6(!0),!u){u=!0,l&&(t.showHelp("error"),O.error()),(D||G)&&O.error(D||G);let N=s||c;N&&((D||G)&&O.error(""),O.error(N))}if(G=G||new Vl(D),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,G);throw G}},"fail");let d=[],p=!1;n.usage=(M,D)=>M===null?(p=!0,d=[],n):(p=!1,d.push([M,D||""]),n),n.getUsage=()=>d,n.getUsageDisabled=()=>p,n.getPositionalGroupName=()=>r("Positionals:");let h=[];n.example=(M,D)=>{h.push([M,D||""])};let m=[];n.command=a(function(D,G,O,N,F=!1){O&&(m=m.map(U=>(U[2]=!1,U))),m.push([D,G||"",O,N,F])},"command"),n.getCommands=()=>m;let g={};n.describe=a(function(D,G){Array.isArray(D)?D.forEach(O=>{n.describe(O,G)}):typeof D=="object"?Object.keys(D).forEach(O=>{n.describe(O,D[O])}):g[D]=G},"describe"),n.getDescriptions=()=>g;let A=[];n.epilog=M=>{A.push(M)};let y=!1,E;n.wrap=M=>{y=!0,E=M},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(E=P(),y=!0),E);let _="__yargsString__:";n.deferY18nLookup=M=>_+M,n.help=a(function(){if(I)return I;b();let D=t.customScriptName?t.$0:e.path.basename(t.$0),G=t.getDemandedOptions(),O=t.getDemandedCommands(),N=t.getDeprecatedOptions(),F=t.getGroups(),U=t.getOptions(),L=[];L=L.concat(Object.keys(g)),L=L.concat(Object.keys(G)),L=L.concat(Object.keys(O)),L=L.concat(Object.keys(U.default)),L=L.filter(R),L=Object.keys(L.reduce((fe,De)=>(De!=="_"&&(fe[De]=!0),fe),{}));let H=n.getWrap(),$=e.cliui({width:H,wrap:!!H});if(!p){if(d.length)d.forEach(fe=>{$.div({text:`${fe[0].replace(/\$0/g,D)}`}),fe[1]&&$.div({text:`${fe[1]}`,padding:[1,0,0,0]})}),$.div();else if(m.length){let fe=null;O._?fe=`${D} <${r("command")}> -`:fe=`${D} [${r("command")}] -`,$.div(`${fe}`)}}if(m.length>1||m.length===1&&!m[0][2]){$.div(r("Commands:"));let fe=t.getInternalMethods().getContext(),De=fe.commands.length?`${fe.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(m=m.sort((Ue,Ke)=>Ue[0].localeCompare(Ke[0])));let Ve=D?`${D} `:"";m.forEach(Ue=>{let Ke=`${Ve}${De}${Ue[0].replace(/^\$0 ?/,"")}`;$.span({text:Ke,padding:[0,2,0,2],width:v(m,H,`${D}${De}`)+4},{text:Ue[1]});let X=[];Ue[2]&&X.push(`[${r("default")}]`),Ue[3]&&Ue[3].length&&X.push(`[${r("aliases:")} ${Ue[3].join(", ")}]`),Ue[4]&&(typeof Ue[4]=="string"?X.push(`[${r("deprecated: %s",Ue[4])}]`):X.push(`[${r("deprecated")}]`)),X.length?$.div({text:X.join(" "),padding:[0,0,0,2],align:"right"}):$.div()}),$.div()}let W=(Object.keys(U.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);L=L.filter(fe=>!t.parsed.newAliases[fe]&&W.every(De=>(U.alias[De]||[]).indexOf(fe)===-1));let j=r("Options:");F[j]||(F[j]=[]),x(L,U.alias,F,j);let ce=a(fe=>/^--/.test(gFe(fe)),"isLongSwitch"),J=Object.keys(F).filter(fe=>F[fe].length>0).map(fe=>{let De=F[fe].filter(R).map(Ve=>{if(W.includes(Ve))return Ve;for(let Ue=0,Ke;(Ke=W[Ue])!==void 0;Ue++)if((U.alias[Ke]||[]).includes(Ve))return Ke;return Ve});return{groupName:fe,normalizedKeys:De}}).filter(({normalizedKeys:fe})=>fe.length>0).map(({groupName:fe,normalizedKeys:De})=>{let Ve=De.reduce((Ue,Ke)=>(Ue[Ke]=[Ke].concat(U.alias[Ke]||[]).map(X=>fe===n.getPositionalGroupName()?X:(/^[0-9]$/.test(X)?U.boolean.includes(Ke)?"-":"--":X.length>1?"--":"-")+X).sort((X,le)=>ce(X)===ce(le)?0:ce(X)?1:-1).join(", "),Ue),{});return{groupName:fe,normalizedKeys:De,switches:Ve}});if(J.filter(({groupName:fe})=>fe!==n.getPositionalGroupName()).some(({normalizedKeys:fe,switches:De})=>!fe.every(Ve=>ce(De[Ve])))&&J.filter(({groupName:fe})=>fe!==n.getPositionalGroupName()).forEach(({normalizedKeys:fe,switches:De})=>{fe.forEach(Ve=>{ce(De[Ve])&&(De[Ve]=PVi(De[Ve],4))})}),J.forEach(({groupName:fe,normalizedKeys:De,switches:Ve})=>{$.div(fe),De.forEach(Ue=>{let Ke=Ve[Ue],X=g[Ue]||"",le=null;X.includes(_)&&(X=r(X.substring(_.length))),U.boolean.includes(Ue)&&(le=`[${r("boolean")}]`),U.count.includes(Ue)&&(le=`[${r("count")}]`),U.string.includes(Ue)&&(le=`[${r("string")}]`),U.normalize.includes(Ue)&&(le=`[${r("string")}]`),U.array.includes(Ue)&&(le=`[${r("array")}]`),U.number.includes(Ue)&&(le=`[${r("number")}]`);let te=a(ae=>typeof ae=="string"?`[${r("deprecated: %s",ae)}]`:`[${r("deprecated")}]`,"deprecatedExtra"),xe=[Ue in N?te(N[Ue]):null,le,Ue in G?`[${r("required")}]`:null,U.choices&&U.choices[Ue]?`[${r("choices:")} ${n.stringifiedValues(U.choices[Ue])}]`:null,w(U.default[Ue],U.defaultDescription[Ue])].filter(Boolean).join(" ");$.span({text:gFe(Ke),padding:[0,2,0,2+uUr(Ke)],width:v(Ve,H)+4},X);let Z=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;xe&&!Z?$.div({text:xe,padding:[0,0,0,2],align:"right"}):$.div()}),$.div()}),h.length&&($.div(r("Examples:")),h.forEach(fe=>{fe[0]=fe[0].replace(/\$0/g,D)}),h.forEach(fe=>{fe[1]===""?$.div({text:fe[0],padding:[0,2,0,2]}):$.div({text:fe[0],padding:[0,2,0,2],width:v(h,H)+4},{text:fe[1]})}),$.div()),A.length>0){let fe=A.map(De=>De.replace(/\$0/g,D)).join(` +`),s.border&&(o.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),o.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(o.unshift(...new Array(s.padding[uzi]||0).fill("")),o.push(...new Array(s.padding[dzi]||0).fill(""))),o.forEach((l,u)=>{r[u]||r.push([]);let d=r[u];for(let p=0;pc.width||w1.stringWidth(c.text));let r=e.length,n=this.width,o=e.map(c=>{if(c.width)return r--,n-=c.width,c.width}),s=r?Math.floor(n/r):0;return o.map((c,l)=>c===void 0?Math.max(s,fzi(e[l])):c)}};function MUr(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}a(MUr,"addBorder");function fzi(t){let e=t.padding||[],r=1+(e[m6e]||0)+(e[h6e]||0);return t.border?r+4:r}a(fzi,"_minWidth");function pzi(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}a(pzi,"getWindowWidth");function hzi(t,e){t=t.trim();let r=w1.stringWidth(t);return r=e?t:" ".repeat(e-r>>1)+t}a(mzi,"alignCenter");var w1;function OUr(t,e){return w1=e,new Ixt({width:t?.width||pzi(),wrap:t?.wrap})}a(OUr,"cliui");f();var BUr=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function xxt(t){return t.replace(BUr,"")}a(xxt,"stripAnsi");function LUr(t,e){let[r,n]=t.match(BUr)||["",""];t=xxt(t);let o="";for(let s=0;s[...e].length,"stringWidth"),stripAnsi:xxt,wrap:LUr})}a(wxt,"ui");f();var nre=require("path"),g6e=require("fs");function Rxt(t,e){let r=(0,nre.resolve)(".",t),n;for((0,g6e.statSync)(r).isDirectory()||(r=(0,nre.dirname)(r));;){if(n=e(r,(0,g6e.readdirSync)(r)),n)return(0,nre.resolve)(r,n);if(r=(0,nre.dirname)(n=r),n===r)break}}a(Rxt,"default");var ZUr=require("util"),eQr=require("fs"),tQr=require("url");f();var GUr=require("util"),_6e=require("path");f();function SH(t){if(t!==t.toLowerCase()&&t!==t.toUpperCase()||(t=t.toLowerCase()),t.indexOf("-")===-1&&t.indexOf("_")===-1)return t;{let r="",n=!1,o=t.match(/^-+/);for(let s=o?o[0].length:0;s0?n+=`${e}${r.charAt(o)}`:n+=c}return n}a(A6e,"decamelize");function y6e(t){return t==null?!1:typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^0[^.]/.test(t)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}a(y6e,"looksLikeNumber");f();f();function FUr(t){if(Array.isArray(t))return t.map(c=>typeof c!="string"?c+"":c);t=t.trim();let e=0,r=null,n=null,o=null,s=[];for(let c=0;c{typeof ae=="number"&&(E.nargs[Z]=ae,E.keys.push(Z))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([Z,ae])=>{typeof ae=="function"&&(E.coercions[Z]=ae,E.keys.push(Z))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(Z){E.configs[Z]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([Z,ae])=>{(typeof ae=="boolean"||typeof ae=="function")&&(E.configs[Z]=ae)})),ce(n.key,c,n.default,E.arrays),Object.keys(u).forEach(function(Z){(E.aliases[Z]||[]).forEach(function(ae){u[ae]=u[Z]})});let b=null;xe();let I=[],x=Object.assign(Object.create(null),{_:[]}),w={};for(let Z=0;Z=3&&(J(Ae[1],E.arrays)?Z=k(Z,Ae[1],o,Ae[2]):J(Ae[1],E.nargs)!==!1?Z=P(Z,Ae[1],o,Ae[2]):Q(Ae[1],Ae[2],!0));else if(ae.match(v)&&l["boolean-negation"])Ae=ae.match(v),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],Q(ee,J(ee,E.arrays)?[!1]:!1));else if(ae.match(/^--.+/)||!l["short-option-groups"]&&ae.match(/^-[^-]+/))Ae=ae.match(/^--?(.+)/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],J(ee,E.arrays)?Z=k(Z,ee,o):J(ee,E.nargs)!==!1?Z=P(Z,ee,o):(ve=o[Z+1],ve!==void 0&&(!ve.match(/^-/)||ve.match(_))&&!J(ee,E.bools)&&!J(ee,E.counts)||/^(true|false)$/.test(ve)?(Q(ee,ve),Z++):Q(ee,Ke(ee))));else if(ae.match(/^-.\..+=/))Ae=ae.match(/^-([^=]+)=([\s\S]*)$/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=3&&Q(Ae[1],Ae[2]);else if(ae.match(/^-.\..+/)&&!ae.match(_))ve=o[Z+1],Ae=ae.match(/^-(.\..+)/),Ae!==null&&Array.isArray(Ae)&&Ae.length>=2&&(ee=Ae[1],ve!==void 0&&!ve.match(/^-/)&&!J(ee,E.bools)&&!J(ee,E.counts)?(Q(ee,ve),Z++):Q(ee,Ke(ee)));else if(ae.match(/^-[^-]+/)&&!ae.match(_)){Ee=ae.slice(1,-1).split(""),Y=!1;for(let Ze=0;ZeZ!=="--"&&Z.includes("-")).forEach(Z=>{delete x[Z]}),l["strip-aliased"]&&[].concat(...Object.keys(c).map(Z=>c[Z])).forEach(Z=>{l["camel-case-expansion"]&&Z.includes("-")&&delete x[Z.split(".").map(ae=>SH(ae)).join(".")],delete x[Z]});function R(Z){let ae=G("_",Z);(typeof ae=="string"||typeof ae=="number")&&x._.push(ae)}a(R,"pushPositional");function P(Z,ae,De,Y){let ee,Ee=J(ae,E.nargs);if(Ee=typeof Ee!="number"||isNaN(Ee)?1:Ee,Ee===0)return te(Y)||(b=Error(y("Argument unexpected for: %s",ae))),Q(ae,Ke(ae)),Z;let Ae=te(Y)?0:1;if(l["nargs-eats-options"])De.length-(Z+1)+Ae0&&(Q(ae,Y),ve--),ee=Z+1;ee0||Ae&&typeof Ae=="number"&&ee.length>=Ae||(Ee=De[ve],/^-/.test(Ee)&&!_.test(Ee)&&!Ve(Ee)));ve++)Z=ve,ee.push(N(ae,Ee,s))}return typeof Ae=="number"&&(Ae&&ee.length1&&l["dot-notation"]&&(E.aliases[ee[0]]||[]).forEach(function(Ee){let Ae=Ee.split("."),ve=[].concat(ee);ve.shift(),Ae=Ae.concat(ve),(E.aliases[Z]||[]).includes(Ae.join("."))||j(x,Ae,Y)}),J(Z,E.normalize)&&!J(Z,E.arrays)&&[Z].concat(E.aliases[Z]||[]).forEach(function(Ae){Object.defineProperty(w,Ae,{enumerable:!0,get(){return ae},set(ve){ae=typeof ve=="string"?OM.normalize(ve):ve}})})}a(Q,"setArg");function M(Z,ae){E.aliases[Z]&&E.aliases[Z].length||(E.aliases[Z]=[ae],g[ae]=!0),E.aliases[ae]&&E.aliases[ae].length||M(ae,Z)}a(M,"addNewAlias");function N(Z,ae,De){De&&(ae=Azi(ae)),(J(Z,E.bools)||J(Z,E.counts))&&typeof ae=="string"&&(ae=ae==="true");let Y=Array.isArray(ae)?ae.map(function(ee){return G(Z,ee)}):G(Z,ae);return J(Z,E.counts)&&(te(Y)||typeof Y=="boolean")&&(Y=Pxt()),J(Z,E.normalize)&&J(Z,E.arrays)&&(Array.isArray(ae)?Y=ae.map(ee=>OM.normalize(ee)):Y=OM.normalize(ae)),Y}a(N,"processValue");function G(Z,ae){return!l["parse-positional-numbers"]&&Z==="_"||!J(Z,E.strings)&&!J(Z,E.bools)&&!Array.isArray(ae)&&(y6e(ae)&&l["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${ae}`)))||!te(ae)&&J(Z,E.numbers))&&(ae=Number(ae)),ae}a(G,"maybeCoerceNumber");function O(Z){let ae=Object.create(null);$(ae,E.aliases,u),Object.keys(E.configs).forEach(function(De){let Y=Z[De]||ae[De];if(Y)try{let ee=null,Ee=OM.resolve(OM.cwd(),Y),Ae=E.configs[De];if(typeof Ae=="function"){try{ee=Ae(Ee)}catch(ve){ee=ve}if(ee instanceof Error){b=ee;return}}else ee=OM.require(Ee);D(ee)}catch(ee){ee.name==="PermissionDenied"?b=ee:Z[De]&&(b=Error(y("Invalid JSON config file: %s",Y)))}})}a(O,"setConfig");function D(Z,ae){Object.keys(Z).forEach(function(De){let Y=Z[De],ee=ae?ae+"."+De:De;typeof Y=="object"&&Y!==null&&!Array.isArray(Y)&&l["dot-notation"]?D(Y,ee):(!W(x,ee.split("."))||J(ee,E.arrays)&&l["combine-arrays"])&&Q(ee,Y)})}a(D,"setConfigObject");function F(){typeof d<"u"&&d.forEach(function(Z){D(Z)})}a(F,"setConfigObjects");function U(Z,ae){if(typeof p>"u")return;let De=typeof p=="string"?p:"",Y=OM.env();Object.keys(Y).forEach(function(ee){if(De===""||ee.lastIndexOf(De,0)===0){let Ee=ee.split("__").map(function(Ae,ve){return ve===0&&(Ae=Ae.substring(De.length)),SH(Ae)});(ae&&E.configs[Ee.join(".")]||!ae)&&!W(Z,Ee)&&Q(Ee.join("."),Y[ee])}})}a(U,"applyEnvVars");function L(Z){let ae,De=new Set;Object.keys(Z).forEach(function(Y){if(!De.has(Y)&&(ae=J(Y,E.coercions),typeof ae=="function"))try{let ee=G(Y,ae(Z[Y]));[].concat(E.aliases[Y]||[],Y).forEach(Ee=>{De.add(Ee),Z[Ee]=ee})}catch(ee){b=ee}})}a(L,"applyCoercions");function H(Z){return E.keys.forEach(ae=>{~ae.indexOf(".")||typeof Z[ae]>"u"&&(Z[ae]=void 0)}),Z}a(H,"setPlaceholderKeys");function $(Z,ae,De,Y=!1){Object.keys(De).forEach(function(ee){W(Z,ee.split("."))||(j(Z,ee.split("."),De[ee]),Y&&(A[ee]=!0),(ae[ee]||[]).forEach(function(Ee){W(Z,Ee.split("."))||j(Z,Ee.split("."),De[ee])}))})}a($,"applyDefaultsAndAliases");function W(Z,ae){let De=Z;l["dot-notation"]||(ae=[ae.join(".")]),ae.slice(0,-1).forEach(function(ee){De=De[ee]||{}});let Y=ae[ae.length-1];return typeof De!="object"?!1:Y in De}a(W,"hasKey");function j(Z,ae,De){let Y=Z;l["dot-notation"]||(ae=[ae.join(".")]),ae.slice(0,-1).forEach(function(We){We=UUr(We),typeof Y=="object"&&Y[We]===void 0&&(Y[We]={}),typeof Y[We]!="object"||Array.isArray(Y[We])?(Array.isArray(Y[We])?Y[We].push({}):Y[We]=[Y[We],{}],Y=Y[We][Y[We].length-1]):Y=Y[We]});let ee=UUr(ae[ae.length-1]),Ee=J(ae.join("."),E.arrays),Ae=Array.isArray(De),ve=l["duplicate-arguments-array"];!ve&&J(ee,E.nargs)&&(ve=!0,(!te(Y[ee])&&E.nargs[ee]===1||Array.isArray(Y[ee])&&Y[ee].length===E.nargs[ee])&&(Y[ee]=void 0)),De===Pxt()?Y[ee]=Pxt(Y[ee]):Array.isArray(Y[ee])?ve&&Ee&&Ae?Y[ee]=l["flatten-duplicate-arrays"]?Y[ee].concat(De):(Array.isArray(Y[ee][0])?Y[ee]:[Y[ee]]).concat([De]):!ve&&!!Ee==!!Ae?Y[ee]=De:Y[ee]=Y[ee].concat([De]):Y[ee]===void 0&&Ee?Y[ee]=Ae?De:[De]:ve&&!(Y[ee]===void 0||J(ee,E.counts)||J(ee,E.bools))?Y[ee]=[Y[ee],De]:Y[ee]=De}a(j,"setKey");function ce(...Z){Z.forEach(function(ae){Object.keys(ae||{}).forEach(function(De){E.aliases[De]||(E.aliases[De]=[].concat(c[De]||[]),E.aliases[De].concat(De).forEach(function(Y){if(/-/.test(Y)&&l["camel-case-expansion"]){let ee=SH(Y);ee!==De&&E.aliases[De].indexOf(ee)===-1&&(E.aliases[De].push(ee),g[ee]=!0)}}),E.aliases[De].concat(De).forEach(function(Y){if(Y.length>1&&/[A-Z]/.test(Y)&&l["camel-case-expansion"]){let ee=A6e(Y,"-");ee!==De&&E.aliases[De].indexOf(ee)===-1&&(E.aliases[De].push(ee),g[ee]=!0)}}),E.aliases[De].forEach(function(Y){E.aliases[Y]=[De].concat(E.aliases[De].filter(function(ee){return Y!==ee}))}))})})}a(ce,"extendAliases");function J(Z,ae){let De=[].concat(E.aliases[Z]||[],Z),Y=Object.keys(ae),ee=De.find(Ee=>Y.includes(Ee));return ee?ae[ee]:!1}a(J,"checkAllAliases");function Te(Z){let ae=Object.keys(E);return[].concat(ae.map(Y=>E[Y])).some(function(Y){return Array.isArray(Y)?Y.includes(Z):Y[Z]})}a(Te,"hasAnyFlag");function fe(Z,...ae){return[].concat(...ae).some(function(Y){let ee=Z.match(Y);return ee&&Te(ee[1])})}a(fe,"hasFlagsMatching");function Ne(Z){if(Z.match(_)||!Z.match(/^-[^-]+/))return!1;let ae=!0,De,Y=Z.slice(1).split("");for(let ee=0;eeJ(Z,E.arrays)?(b=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",Z)),!0):J(Z,E.nargs)?(b=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",Z)),!0):!1)}return a(xe,"checkConfiguration"),{aliases:Object.assign({},E.aliases),argv:Object.assign(w,x),configuration:l,defaulted:Object.assign({},A),error:b,newAliases:Object.assign({},g)}}};function gzi(t){let e=[],r=Object.create(null),n=!0;for(Object.keys(t).forEach(function(o){e.push([].concat(t[o],o))});n;){n=!1;for(let o=0;oyzi,"env"),format:GUr.format,normalize:_6e.normalize,resolve:_6e.resolve,require:a(t=>{if(typeof require<"u")return require(t);if(t.match(/\.json$/))return JSON.parse((0,HUr.readFileSync)(t,"utf8"));throw Error("only .json config files are supported in ESM")},"require")}),LAe=a(function(e,r){return jUr.parse(e.slice(),r).argv},"Parser");LAe.detailed=function(t,e){return jUr.parse(t.slice(),e)};LAe.camelCase=SH;LAe.decamelize=A6e;LAe.looksLikeNumber=y6e;var $Ur=LAe;var Rx=require("path");f();function Ezi(){return _zi()?0:1}a(Ezi,"getProcessArgvBinIndex");function _zi(){return Czi()&&!process.defaultApp}a(_zi,"isBundledElectronApp");function Czi(){return!!process.versions.electron}a(Czi,"isElectronApp");function VUr(){return process.argv[Ezi()]}a(VUr,"getProcessArgvBin");f();var Fl=class t extends Error{static{a(this,"YError")}constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}};f();f();var ire=require("fs"),WUr=require("util"),zUr=require("path");var YUr={fs:{readFileSync:ire.readFileSync,writeFile:ire.writeFile},format:WUr.format,resolve:zUr.resolve,exists:a(t=>{try{return(0,ire.statSync)(t).isFile()}catch{return!1}},"exists")};f();var wx,Mxt=class{static{a(this,"Y18N")}constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=a(function(){},"cb");return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),wx.format.apply(wx.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=a(function(){},"cb");typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let l=[c];return~c.indexOf("%d")&&l.push(o),wx.format.apply(wx.format,l.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),l=JSON.stringify(this.cache[o],null,2);wx.fs.writeFile(c,l,"utf-8",function(u){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(u)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{wx.fs.readFileSync&&(e=JSON.parse(wx.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=wx.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=wx.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return wx.exists(e)}};function KUr(t,e){wx=e;let r=new Mxt(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}a(KUr,"y18n");var vzi=a(t=>KUr(t,YUr),"y18n"),JUr=vzi;var bzi="require is not supported by ESM",XUr="loading a directory of commands is not supported yet for ESM",FAe;try{FAe=(0,tQr.fileURLToPath)(importMetaUrlShim)}catch{FAe=process.cwd()}var Tzi=FAe.substring(0,FAe.lastIndexOf("node_modules")),rQr={assert:{notStrictEqual:C6e.notStrictEqual,strictEqual:C6e.strictEqual},cliui:wxt,findUp:Rxt,getEnv:a(t=>process.env[t],"getEnv"),inspect:ZUr.inspect,getCallerFile:a(()=>{throw new Fl(XUr)},"getCallerFile"),getProcessArgvBin:VUr,mainFilename:Tzi||process.cwd(),Parser:$Ur,path:{basename:Rx.basename,dirname:Rx.dirname,extname:Rx.extname,relative:Rx.relative,resolve:Rx.resolve},process:{argv:a(()=>process.argv,"argv"),cwd:process.cwd,emitWarning:a((t,e)=>process.emitWarning(t,e),"emitWarning"),execPath:a(()=>process.execPath,"execPath"),exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:eQr.readFileSync,require:a(()=>{throw new Fl(bzi)},"require"),requireDirectory:a(()=>{throw new Fl(XUr)},"requireDirectory"),stringWidth:a(t=>[...t].length,"stringWidth"),y18n:JUr({directory:(0,Rx.resolve)(FAe,"../../../locales"),updateFiles:!1})};f();f();f();function JA(t,e,r,n){r.assert.notStrictEqual(t,e,n)}a(JA,"assertNotStrictEqual");function Oxt(t,e){e.assert.strictEqual(typeof t,"string")}a(Oxt,"assertSingleKey");function ore(t){return Object.keys(t)}a(ore,"objectKeys");f();function Ul(t){return!!t&&!!t.then&&typeof t.then=="function"}a(Ul,"isPromise");f();f();f();function i6(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,l)=>{let u=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&l===r.length-1&&(u=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:u}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:u})}),s}a(i6,"parseCommand");var Szi=["first","second","third","fourth","fifth","sixth"];function fn(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[i6(`cmd ${t}`),e,r]}a(n,"parseArgs");try{let o=0,[s,c,l]=n(),u=[].slice.call(c);for(;u.length&&u[u.length-1]===void 0;)u.pop();let d=l||u.length;if(dp)throw new Fl(`Too many arguments provided. Expected max ${p} but received ${d}.`);s.demanded.forEach(h=>{let m=u.shift(),g=nQr(m);h.cmd.filter(y=>y===g||y==="*").length===0&&iQr(g,h.cmd,o),o+=1}),s.optional.forEach(h=>{if(u.length===0)return;let m=u.shift(),g=nQr(m);h.cmd.filter(y=>y===g||y==="*").length===0&&iQr(g,h.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}a(fn,"argsert");function nQr(t){return Array.isArray(t)?"array":t===null?"null":typeof t}a(nQr,"guessType");function iQr(t,e,r){throw new Fl(`Invalid ${Szi[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}a(iQr,"argumentTypeError");var v6e=class{static{a(this,"GlobalMiddleware")}constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(fn(" [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function oQr(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}a(oQr,"commandMiddlewareFactory");function IH(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(Ul(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,l])=>Object.assign(c,l));{let c=s(o,e);return Ul(c)?c.then(l=>Object.assign(o,l)):Object.assign(o,c)}},t)}a(IH,"applyMiddleware");f();function xH(t,e,r=n=>{throw n}){try{let n=Izi(t)?t():t;return Ul(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}a(xH,"maybeAsyncResult");function Izi(t){return typeof t=="function"}a(Izi,"isFunction");f();function Bxt(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;ec;o.visit=(c,l,u)=>{let d=s(c,l,u);if(d){if(this.requireCache.has(l))return d;this.requireCache.add(l),this.addHandler(d)}return d},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let l=[],u=oQr(s);if(o=o||(()=>{}),Array.isArray(e))if(xzi(e))[e,...l]=e;else for(let d of e)this.addHandler(d);else if(Rzi(e)){let d=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(d=[].concat(d).concat(e.aliases)),this.addHandler(d,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(sQr(n)){this.addHandler([e].concat(l),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let d=i6(e);l=l.map(m=>i6(m).cmd);let p=!1,h=[d.cmd].concat(l).filter(m=>sre.test(m)?(p=!0,!1):!0);h.length===0&&p&&h.push("$0"),p&&(d.cmd=h[0],l=h.slice(1),e=e.replace(sre,d.cmd)),l.forEach(m=>{this.aliasMap[m]=d.cmd}),r!==!1&&this.usage.command(e,r,p,l,c),this.handlers[d.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:u,deprecated:c,demanded:d.demanded,optional:d.optional},p&&(this.defaultCommand=this.handlers[d.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let l=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,u=r.getInternalMethods().getContext(),d=u.commands.slice(),p=!e;e&&(u.commands.push(e),u.fullCommands.push(l.original));let h=this.applyBuilderUpdateUsageAndParse(p,l,r,n.aliases,d,o,s,c);return Ul(h)?h.then(m=>this.applyMiddlewareAndGetResult(p,l,m.innerArgv,u,s,m.aliases,r)):this.applyMiddlewareAndGetResult(p,l,h.innerArgv,u,s,h.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,l,u){let d=r.builder,p=n;if(b6e(d)){n.getInternalMethods().getUsageInstance().freeze();let h=d(n.getInternalMethods().reset(o),u);if(Ul(h))return h.then(m=>(p=cQr(m)?m:n,this.parseAndUpdateUsage(e,r,p,s,c,l)))}else wzi(d)&&(n.getInternalMethods().getUsageInstance().freeze(),p=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(h=>{p.option(h,d[h])}));return this.parseAndUpdateUsage(e,r,p,s,c,l)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let l=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return Ul(l)?l.then(u=>({aliases:n.parsed.aliases,innerArgv:u})):{aliases:n.parsed.aliases,innerArgv:l}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=sre.test(r.original)?r.original.replace(sre,"").trim():r.original,o=e.filter(s=>!sre.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,l,u){if(!c.getInternalMethods().getHasOutput()){let d=c.getInternalMethods().runValidation(s,u,c.parsed.error,e);n=xH(n,p=>(d(p),p))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let d=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,d,!1,!1),n=IH(n,c,l,!1),n=xH(n,p=>{let h=r.handler(p);return Ul(h)?h.then(()=>p):p}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),Ul(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(p=>{try{c.getInternalMethods().getUsageInstance().fail(null,p)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,l){let u={};if(s)return n;l.getInternalMethods().getHasOutput()||(u=this.populatePositionals(r,n,o,l));let d=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),p=IH(n,l,d,!0);return Ul(p)?p.then(h=>this.handleValidationAndGetResult(e,r,h,o,c,l,d,u)):this.handleValidationAndGetResult(e,r,p,o,c,l,d,u)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),l={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let u=s.shift();this.populatePositional(u,r,l)}for(;c.length;){let u=c.shift();this.populatePositional(u,r,l)}return r._=n.commands.concat(r._.map(u=>""+u)),this.postProcessPositionals(r,l,this.cmdToParseOptions(e.original),o),l}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=i6(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let d of Object.keys(n.alias))s.alias[d]=(s.alias[d]||[]).concat(n.alias[d]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(d=>{r[d].map(p=>{s.configuration["unknown-options-as-args"]&&(s.key[d]=!0),c.push(`--${d}`),c.push(p)})}),!c.length)return;let l=Object.assign({},s.configuration,{"populate--":!1}),u=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:l}));if(u.error)o.getInternalMethods().getUsageInstance().fail(u.error.message,u.error);else{let d=Object.keys(r);Object.keys(r).forEach(p=>{d.push(...u.aliases[p])}),Object.keys(u.argv).forEach(p=>{d.includes(p)&&(r[p]||(r[p]=u.argv[p]),!this.isInConfigs(o,p)&&!this.isDefaulted(o,p)&&Object.prototype.hasOwnProperty.call(e,p)&&Object.prototype.hasOwnProperty.call(u.argv,p)&&(Array.isArray(e[p])||Array.isArray(u.argv[p]))?e[p]=[].concat(e[p],u.argv[p]):e[p]=u.argv[p])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=sre.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(b6e(r))return r(e,!0);sQr(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=Bxt(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;JA(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();JA(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function aQr(t,e,r,n){return new Lxt(t,e,r,n)}a(aQr,"command");function sQr(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}a(sQr,"isCommandBuilderDefinition");function xzi(t){return t.every(e=>typeof e=="string")}a(xzi,"isCommandAndAliases");function b6e(t){return typeof t=="function"}a(b6e,"isCommandBuilderCallback");function wzi(t){return typeof t=="object"}a(wzi,"isCommandBuilderOptionDefinitions");function Rzi(t){return typeof t=="object"&&!Array.isArray(t)}a(Rzi,"isCommandHandlerDefinition");f();f();function o6(t={},e=()=>!0){let r={};return ore(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}a(o6,"objFilter");f();function s6(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}a(s6,"setBlocking");function Pzi(t){return typeof t=="boolean"}a(Pzi,"isBoolean");function uQr(t,e){let r=e.y18n.__,n={},o=[];n.failFn=a(function(N){o.push(N)},"failFn");let s=null,c=null,l=!0;n.showHelpOnFail=a(function(N=!0,G){let[O,D]=typeof N=="string"?[!0,N]:[N,G];return t.getInternalMethods().isGlobalContext()&&(c=D),s=D,l=O,n},"showHelpOnFailFn");let u=!1;n.fail=a(function(N,G){let O=t.getInternalMethods().getLoggerInstance();if(o.length)for(let D=o.length-1;D>=0;--D){let F=o[D];if(Pzi(F)){if(G)throw G;if(N)throw Error(N)}else F(N,G,n)}else{if(t.getExitProcess()&&s6(!0),!u){u=!0,l&&(t.showHelp("error"),O.error()),(N||G)&&O.error(N||G);let D=s||c;D&&((N||G)&&O.error(""),O.error(D))}if(G=G||new Fl(N),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,G);throw G}},"fail");let d=[],p=!1;n.usage=(M,N)=>M===null?(p=!0,d=[],n):(p=!1,d.push([M,N||""]),n),n.getUsage=()=>d,n.getUsageDisabled=()=>p,n.getPositionalGroupName=()=>r("Positionals:");let h=[];n.example=(M,N)=>{h.push([M,N||""])};let m=[];n.command=a(function(N,G,O,D,F=!1){O&&(m=m.map(U=>(U[2]=!1,U))),m.push([N,G||"",O,D,F])},"command"),n.getCommands=()=>m;let g={};n.describe=a(function(N,G){Array.isArray(N)?N.forEach(O=>{n.describe(O,G)}):typeof N=="object"?Object.keys(N).forEach(O=>{n.describe(O,N[O])}):g[N]=G},"describe"),n.getDescriptions=()=>g;let A=[];n.epilog=M=>{A.push(M)};let y=!1,E;n.wrap=M=>{y=!0,E=M},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(y||(E=P(),y=!0),E);let _="__yargsString__:";n.deferY18nLookup=M=>_+M,n.help=a(function(){if(I)return I;b();let N=t.customScriptName?t.$0:e.path.basename(t.$0),G=t.getDemandedOptions(),O=t.getDemandedCommands(),D=t.getDeprecatedOptions(),F=t.getGroups(),U=t.getOptions(),L=[];L=L.concat(Object.keys(g)),L=L.concat(Object.keys(G)),L=L.concat(Object.keys(O)),L=L.concat(Object.keys(U.default)),L=L.filter(w),L=Object.keys(L.reduce((fe,Ne)=>(Ne!=="_"&&(fe[Ne]=!0),fe),{}));let H=n.getWrap(),$=e.cliui({width:H,wrap:!!H});if(!p){if(d.length)d.forEach(fe=>{$.div({text:`${fe[0].replace(/\$0/g,N)}`}),fe[1]&&$.div({text:`${fe[1]}`,padding:[1,0,0,0]})}),$.div();else if(m.length){let fe=null;O._?fe=`${N} <${r("command")}> +`:fe=`${N} [${r("command")}] +`,$.div(`${fe}`)}}if(m.length>1||m.length===1&&!m[0][2]){$.div(r("Commands:"));let fe=t.getInternalMethods().getContext(),Ne=fe.commands.length?`${fe.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(m=m.sort((Ue,Ke)=>Ue[0].localeCompare(Ke[0])));let Ve=N?`${N} `:"";m.forEach(Ue=>{let Ke=`${Ve}${Ne}${Ue[0].replace(/^\$0 ?/,"")}`;$.span({text:Ke,padding:[0,2,0,2],width:v(m,H,`${N}${Ne}`)+4},{text:Ue[1]});let X=[];Ue[2]&&X.push(`[${r("default")}]`),Ue[3]&&Ue[3].length&&X.push(`[${r("aliases:")} ${Ue[3].join(", ")}]`),Ue[4]&&(typeof Ue[4]=="string"?X.push(`[${r("deprecated: %s",Ue[4])}]`):X.push(`[${r("deprecated")}]`)),X.length?$.div({text:X.join(" "),padding:[0,0,0,2],align:"right"}):$.div()}),$.div()}let W=(Object.keys(U.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);L=L.filter(fe=>!t.parsed.newAliases[fe]&&W.every(Ne=>(U.alias[Ne]||[]).indexOf(fe)===-1));let j=r("Options:");F[j]||(F[j]=[]),x(L,U.alias,F,j);let ce=a(fe=>/^--/.test(T6e(fe)),"isLongSwitch"),J=Object.keys(F).filter(fe=>F[fe].length>0).map(fe=>{let Ne=F[fe].filter(w).map(Ve=>{if(W.includes(Ve))return Ve;for(let Ue=0,Ke;(Ke=W[Ue])!==void 0;Ue++)if((U.alias[Ke]||[]).includes(Ve))return Ke;return Ve});return{groupName:fe,normalizedKeys:Ne}}).filter(({normalizedKeys:fe})=>fe.length>0).map(({groupName:fe,normalizedKeys:Ne})=>{let Ve=Ne.reduce((Ue,Ke)=>(Ue[Ke]=[Ke].concat(U.alias[Ke]||[]).map(X=>fe===n.getPositionalGroupName()?X:(/^[0-9]$/.test(X)?U.boolean.includes(Ke)?"-":"--":X.length>1?"--":"-")+X).sort((X,le)=>ce(X)===ce(le)?0:ce(X)?1:-1).join(", "),Ue),{});return{groupName:fe,normalizedKeys:Ne,switches:Ve}});if(J.filter(({groupName:fe})=>fe!==n.getPositionalGroupName()).some(({normalizedKeys:fe,switches:Ne})=>!fe.every(Ve=>ce(Ne[Ve])))&&J.filter(({groupName:fe})=>fe!==n.getPositionalGroupName()).forEach(({normalizedKeys:fe,switches:Ne})=>{fe.forEach(Ve=>{ce(Ne[Ve])&&(Ne[Ve]=kzi(Ne[Ve],4))})}),J.forEach(({groupName:fe,normalizedKeys:Ne,switches:Ve})=>{$.div(fe),Ne.forEach(Ue=>{let Ke=Ve[Ue],X=g[Ue]||"",le=null;X.includes(_)&&(X=r(X.substring(_.length))),U.boolean.includes(Ue)&&(le=`[${r("boolean")}]`),U.count.includes(Ue)&&(le=`[${r("count")}]`),U.string.includes(Ue)&&(le=`[${r("string")}]`),U.normalize.includes(Ue)&&(le=`[${r("string")}]`),U.array.includes(Ue)&&(le=`[${r("array")}]`),U.number.includes(Ue)&&(le=`[${r("number")}]`);let te=a(ae=>typeof ae=="string"?`[${r("deprecated: %s",ae)}]`:`[${r("deprecated")}]`,"deprecatedExtra"),xe=[Ue in D?te(D[Ue]):null,le,Ue in G?`[${r("required")}]`:null,U.choices&&U.choices[Ue]?`[${r("choices:")} ${n.stringifiedValues(U.choices[Ue])}]`:null,R(U.default[Ue],U.defaultDescription[Ue])].filter(Boolean).join(" ");$.span({text:T6e(Ke),padding:[0,2,0,2+lQr(Ke)],width:v(Ve,H)+4},X);let Z=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;xe&&!Z?$.div({text:xe,padding:[0,0,0,2],align:"right"}):$.div()}),$.div()}),h.length&&($.div(r("Examples:")),h.forEach(fe=>{fe[0]=fe[0].replace(/\$0/g,N)}),h.forEach(fe=>{fe[1]===""?$.div({text:fe[0],padding:[0,2,0,2]}):$.div({text:fe[0],padding:[0,2,0,2],width:v(h,H)+4},{text:fe[1]})}),$.div()),A.length>0){let fe=A.map(Ne=>Ne.replace(/\$0/g,N)).join(` `);$.div(`${fe} -`)}return $.toString().replace(/\s*$/,"")},"help");function v(M,D,G){let O=0;return Array.isArray(M)||(M=Object.values(M).map(N=>[N])),M.forEach(N=>{O=Math.max(e.stringWidth(G?`${G} ${gFe(N[0])}`:gFe(N[0]))+uUr(N[0]),O)}),D&&(O=Math.min(O,parseInt((D*.5).toString(),10))),O}a(v,"maxWidth");function b(){let M=t.getDemandedOptions(),D=t.getOptions();(Object.keys(D.alias)||[]).forEach(G=>{D.alias[G].forEach(O=>{g[O]&&n.describe(G,g[O]),O in M&&t.demandOption(G,M[O]),D.boolean.includes(O)&&t.boolean(G),D.count.includes(O)&&t.count(G),D.string.includes(O)&&t.string(G),D.normalize.includes(O)&&t.normalize(G),D.array.includes(O)&&t.array(G),D.number.includes(O)&&t.number(G)})})}a(b,"normalizeAliases");let I;n.cacheHelpMessage=function(){I=this.help()},n.clearCachedHelpMessage=function(){I=void 0},n.hasCachedHelpMessage=function(){return!!I};function x(M,D,G,O){let N=[],F=null;return Object.keys(G).forEach(U=>{N=N.concat(G[U])}),M.forEach(U=>{F=[U].concat(D[U]),F.some(L=>N.indexOf(L)!==-1)||G[O].push(U)}),N}a(x,"addUngroupedKeys");function R(M){return t.getOptions().hiddenOptions.indexOf(M)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}a(R,"filterHiddenOptions"),n.showHelp=M=>{let D=t.getInternalMethods().getLoggerInstance();M||(M="error"),(typeof M=="function"?M:D[M])(n.help())},n.functionDescription=M=>["(",M.name?e.Parser.decamelize(M.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=a(function(D,G){let O="",N=G||", ",F=[].concat(D);return!D||!F.length||F.forEach(U=>{O.length&&(O+=N),O+=JSON.stringify(U)}),O},"stringifiedValues");function w(M,D){let G=`[${r("default:")} `;if(M===void 0&&!D)return null;if(D)G+=D;else switch(typeof M){case"string":G+=`"${M}"`;break;case"object":G+=JSON.stringify(M);break;default:G+=M}return`${G}]`}a(w,"defaultString");function P(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}a(P,"windowWidth");let k=null;n.version=M=>{k=M},n.showVersion=M=>{let D=t.getInternalMethods().getLoggerInstance();M||(M="error"),(typeof M=="function"?M:D[M])(k)},n.reset=a(function(D){return s=null,u=!1,d=[],p=!1,A=[],h=[],m=[],g=N6(g,G=>!D[G]),n},"reset");let Q=[];return n.freeze=a(function(){Q.push({failMessage:s,failureOutput:u,usages:d,usageDisabled:p,epilogs:A,examples:h,commands:m,descriptions:g})},"freeze"),n.unfreeze=a(function(D=!1){let G=Q.pop();G&&(D?(g={...G.descriptions,...g},m=[...G.commands,...m],d=[...G.usages,...d],h=[...G.examples,...h],A=[...G.epilogs,...A]):{failMessage:s,failureOutput:u,usages:d,usageDisabled:p,epilogs:A,examples:h,commands:m,descriptions:g}=G)},"unfreeze"),n}a(dUr,"usage");function yxt(t){return typeof t=="object"}a(yxt,"isIndentedText");function PVi(t,e){return yxt(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}a(PVi,"addIndentation");function uUr(t){return yxt(t)?t.indentation:0}a(uUr,"getIndentation");function gFe(t){return yxt(t)?t.text:t}a(gFe,"getText");f();f();var fUr=`###-begin-{{app_name}}-completions-### +`)}return $.toString().replace(/\s*$/,"")},"help");function v(M,N,G){let O=0;return Array.isArray(M)||(M=Object.values(M).map(D=>[D])),M.forEach(D=>{O=Math.max(e.stringWidth(G?`${G} ${T6e(D[0])}`:T6e(D[0]))+lQr(D[0]),O)}),N&&(O=Math.min(O,parseInt((N*.5).toString(),10))),O}a(v,"maxWidth");function b(){let M=t.getDemandedOptions(),N=t.getOptions();(Object.keys(N.alias)||[]).forEach(G=>{N.alias[G].forEach(O=>{g[O]&&n.describe(G,g[O]),O in M&&t.demandOption(G,M[O]),N.boolean.includes(O)&&t.boolean(G),N.count.includes(O)&&t.count(G),N.string.includes(O)&&t.string(G),N.normalize.includes(O)&&t.normalize(G),N.array.includes(O)&&t.array(G),N.number.includes(O)&&t.number(G)})})}a(b,"normalizeAliases");let I;n.cacheHelpMessage=function(){I=this.help()},n.clearCachedHelpMessage=function(){I=void 0},n.hasCachedHelpMessage=function(){return!!I};function x(M,N,G,O){let D=[],F=null;return Object.keys(G).forEach(U=>{D=D.concat(G[U])}),M.forEach(U=>{F=[U].concat(N[U]),F.some(L=>D.indexOf(L)!==-1)||G[O].push(U)}),D}a(x,"addUngroupedKeys");function w(M){return t.getOptions().hiddenOptions.indexOf(M)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}a(w,"filterHiddenOptions"),n.showHelp=M=>{let N=t.getInternalMethods().getLoggerInstance();M||(M="error"),(typeof M=="function"?M:N[M])(n.help())},n.functionDescription=M=>["(",M.name?e.Parser.decamelize(M.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=a(function(N,G){let O="",D=G||", ",F=[].concat(N);return!N||!F.length||F.forEach(U=>{O.length&&(O+=D),O+=JSON.stringify(U)}),O},"stringifiedValues");function R(M,N){let G=`[${r("default:")} `;if(M===void 0&&!N)return null;if(N)G+=N;else switch(typeof M){case"string":G+=`"${M}"`;break;case"object":G+=JSON.stringify(M);break;default:G+=M}return`${G}]`}a(R,"defaultString");function P(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}a(P,"windowWidth");let k=null;n.version=M=>{k=M},n.showVersion=M=>{let N=t.getInternalMethods().getLoggerInstance();M||(M="error"),(typeof M=="function"?M:N[M])(k)},n.reset=a(function(N){return s=null,u=!1,d=[],p=!1,A=[],h=[],m=[],g=o6(g,G=>!N[G]),n},"reset");let Q=[];return n.freeze=a(function(){Q.push({failMessage:s,failureOutput:u,usages:d,usageDisabled:p,epilogs:A,examples:h,commands:m,descriptions:g})},"freeze"),n.unfreeze=a(function(N=!1){let G=Q.pop();G&&(N?(g={...G.descriptions,...g},m=[...G.commands,...m],d=[...G.usages,...d],h=[...G.examples,...h],A=[...G.epilogs,...A]):{failMessage:s,failureOutput:u,usages:d,usageDisabled:p,epilogs:A,examples:h,commands:m,descriptions:g}=G)},"unfreeze"),n}a(uQr,"usage");function Fxt(t){return typeof t=="object"}a(Fxt,"isIndentedText");function kzi(t,e){return Fxt(t)?{text:t.text,indentation:t.indentation+e}:{text:t,indentation:e}}a(kzi,"addIndentation");function lQr(t){return Fxt(t)?t.indentation:0}a(lQr,"getIndentation");function T6e(t){return Fxt(t)?t.text:t}a(T6e,"getText");f();f();var dQr=`###-begin-{{app_name}}-completions-### # # yargs command completion script # @@ -2055,7 +2044,7 @@ _{{app_name}}_yargs_completions() } complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`,pUr=`#compdef {{app_name}} +`,fQr=`#compdef {{app_name}} ###-begin-{{app_name}}-completions-### # # yargs command completion script @@ -2074,23 +2063,23 @@ _{{app_name}}_yargs_completions() } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`;var Ext=class{static{a(this,"Completion")}constructor(e,r,n,o){var s,c,l;this.yargs=e,this.usage=r,this.command=n,this.shim=o,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(l=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((c=this.shim.getEnv("ZSH_NAME"))===null||c===void 0?void 0:c.includes("zsh")))!==null&&l!==void 0?l:!1}defaultCompletion(e,r,n,o){let s=this.command.getCommandHandlers();for(let l=0,u=e.length;l{let c=k6(s[0]).cmd;if(r.indexOf(c)===-1)if(!this.zshShell)e.push(c);else{let l=s[1]||"";e.push(c.replace(/:/g,"\\:")+":"+l)}})}optionCompletions(e,r,n,o){if((o.match(/^-/)||o===""&&e.length===0)&&!this.previousArgHasChoices(r)){let s=this.yargs.getOptions(),c=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(l=>{let u=!!s.configuration["boolean-negation"]&&s.boolean.includes(l);!c.includes(l)&&!s.hiddenOptions.includes(l)&&!this.argsContainKey(r,l,u)&&this.completeOptionKey(l,e,o,u&&!!s.default[l])})}}choicesFromOptionsCompletions(e,r,n,o){if(this.previousArgHasChoices(r)){let s=this.getPreviousArgChoices(r);s&&s.length>0&&e.push(...s.map(c=>c.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,o){if(o===""&&e.length>0&&this.previousArgHasChoices(r))return;let s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],c=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),l=s[n._.length-c-1];if(!l)return;let u=this.yargs.getOptions().choices[l]||[];for(let d of u)d.startsWith(o)&&e.push(d.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let o=r.replace(/^-+/,""),s=this.yargs.getOptions(),c=[o,...this.yargs.getAliases()[o]||[]],l;for(let u of c)if(Object.prototype.hasOwnProperty.call(s.key,u)&&Array.isArray(s.choices[u])){l=s.choices[u];break}if(l)return l.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let o=a(s=>e.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1,"argsContains");if(o(r)||n&&o(`no-${r}`))return!0;if(this.aliases){for(let s of this.aliases[r])if(o(s))return!0}return!1}completeOptionKey(e,r,n,o){var s,c,l,u;let d=e;if(this.zshShell){let g=this.usage.getDescriptions(),A=(c=(s=this===null||this===void 0?void 0:this.aliases)===null||s===void 0?void 0:s[e])===null||c===void 0?void 0:c.find(_=>{let v=g[_];return typeof v=="string"&&v.length>0}),y=A?g[A]:void 0,E=(u=(l=g[e])!==null&&l!==void 0?l:y)!==null&&u!==void 0?u:"";d=`${e.replace(/:/g,"\\:")}:${E.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let p=a(g=>/^--/.test(g),"startsByTwoDashes"),h=a(g=>/^[^0-9]$/.test(g),"isShortOption"),m=!p(n)&&h(e)?"-":"--";r.push(m+d),o&&r.push(m+"no-"+d)}customCompletion(e,r,n,o){if(sy(this.customCompletionFunction,null,this.shim),NVi(this.customCompletionFunction)){let s=this.customCompletionFunction(n,r);return Wl(s)?s.then(c=>{this.shim.process.nextTick(()=>{o(null,c)})}).catch(c=>{this.shim.process.nextTick(()=>{o(c,void 0)})}):o(null,s)}else return DVi(this.customCompletionFunction)?this.customCompletionFunction(n,r,(s=o)=>this.defaultCompletion(e,r,n,s),s=>{o(null,s)}):this.customCompletionFunction(n,r,s=>{o(null,s)})}getCompletion(e,r){let n=e.length?e[e.length-1]:"",o=this.yargs.parse(e,!0),s=this.customCompletionFunction?c=>this.customCompletion(e,c,n,r):c=>this.defaultCompletion(e,c,n,r);return Wl(o)?o.then(s):s(o)}generateCompletionScript(e,r){let n=this.zshShell?pUr:fUr,o=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,o),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function hUr(t,e,r,n){return new Ext(t,e,r,n)}a(hUr,"completion");function NVi(t){return t.length<3}a(NVi,"isSyncCompletionFunction");function DVi(t){return t.length>3}a(DVi,"isFallbackCompletionFunction");f();f();function mUr(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let o;for(o=0;o<=t.length;o++)r[0][o]=o;for(n=1;n<=e.length;n++)for(o=1;o<=t.length;o++)e.charAt(n-1)===t.charAt(o-1)?r[n][o]=r[n-1][o-1]:n>1&&o>1&&e.charAt(n-2)===t.charAt(o-1)&&e.charAt(n-1)===t.charAt(o-2)?r[n][o]=r[n-2][o-2]+1:r[n][o]=Math.min(r[n-1][o-1]+1,Math.min(r[n][o-1]+1,r[n-1][o]+1));return r[e.length][t.length]}a(mUr,"levenshtein");var gUr=["$0","--","_"];function AUr(t,e,r){let n=r.y18n.__,o=r.y18n.__n,s={};s.nonOptionCount=a(function(h){let m=t.getDemandedCommands(),A=h._.length+(h["--"]?h["--"].length:0)-t.getInternalMethods().getContext().commands.length;m._&&(Am._.max)&&(Am._.max&&(m._.maxMsg!==void 0?e.fail(m._.maxMsg?m._.maxMsg.replace(/\$0/g,A.toString()).replace(/\$1/,m._.max.toString()):null):e.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",A,A.toString(),m._.max.toString()))))},"nonOptionCount"),s.positionalCount=a(function(h,m){m"u")&&(g=g||{},g[A]=m[A]);if(g){let A=[];for(let E of Object.keys(g)){let _=g[E];_&&A.indexOf(_)<0&&A.push(_)}let y=A.length?` +`;var Uxt=class{static{a(this,"Completion")}constructor(e,r,n,o){var s,c,l;this.yargs=e,this.usage=r,this.command=n,this.shim=o,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(l=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((c=this.shim.getEnv("ZSH_NAME"))===null||c===void 0?void 0:c.includes("zsh")))!==null&&l!==void 0?l:!1}defaultCompletion(e,r,n,o){let s=this.command.getCommandHandlers();for(let l=0,u=e.length;l{let c=i6(s[0]).cmd;if(r.indexOf(c)===-1)if(!this.zshShell)e.push(c);else{let l=s[1]||"";e.push(c.replace(/:/g,"\\:")+":"+l)}})}optionCompletions(e,r,n,o){if((o.match(/^-/)||o===""&&e.length===0)&&!this.previousArgHasChoices(r)){let s=this.yargs.getOptions(),c=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(l=>{let u=!!s.configuration["boolean-negation"]&&s.boolean.includes(l);!c.includes(l)&&!s.hiddenOptions.includes(l)&&!this.argsContainKey(r,l,u)&&this.completeOptionKey(l,e,o,u&&!!s.default[l])})}}choicesFromOptionsCompletions(e,r,n,o){if(this.previousArgHasChoices(r)){let s=this.getPreviousArgChoices(r);s&&s.length>0&&e.push(...s.map(c=>c.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,r,n,o){if(o===""&&e.length>0&&this.previousArgHasChoices(r))return;let s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],c=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),l=s[n._.length-c-1];if(!l)return;let u=this.yargs.getOptions().choices[l]||[];for(let d of u)d.startsWith(o)&&e.push(d.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let r=e[e.length-1],n="";if(!r.startsWith("-")&&e.length>1&&(n=r,r=e[e.length-2]),!r.startsWith("-"))return;let o=r.replace(/^-+/,""),s=this.yargs.getOptions(),c=[o,...this.yargs.getAliases()[o]||[]],l;for(let u of c)if(Object.prototype.hasOwnProperty.call(s.key,u)&&Array.isArray(s.choices[u])){l=s.choices[u];break}if(l)return l.filter(u=>!n||u.startsWith(n))}previousArgHasChoices(e){let r=this.getPreviousArgChoices(e);return r!==void 0&&r.length>0}argsContainKey(e,r,n){let o=a(s=>e.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1,"argsContains");if(o(r)||n&&o(`no-${r}`))return!0;if(this.aliases){for(let s of this.aliases[r])if(o(s))return!0}return!1}completeOptionKey(e,r,n,o){var s,c,l,u;let d=e;if(this.zshShell){let g=this.usage.getDescriptions(),A=(c=(s=this===null||this===void 0?void 0:this.aliases)===null||s===void 0?void 0:s[e])===null||c===void 0?void 0:c.find(_=>{let v=g[_];return typeof v=="string"&&v.length>0}),y=A?g[A]:void 0,E=(u=(l=g[e])!==null&&l!==void 0?l:y)!==null&&u!==void 0?u:"";d=`${e.replace(/:/g,"\\:")}:${E.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let p=a(g=>/^--/.test(g),"startsByTwoDashes"),h=a(g=>/^[^0-9]$/.test(g),"isShortOption"),m=!p(n)&&h(e)?"-":"--";r.push(m+d),o&&r.push(m+"no-"+d)}customCompletion(e,r,n,o){if(JA(this.customCompletionFunction,null,this.shim),Nzi(this.customCompletionFunction)){let s=this.customCompletionFunction(n,r);return Ul(s)?s.then(c=>{this.shim.process.nextTick(()=>{o(null,c)})}).catch(c=>{this.shim.process.nextTick(()=>{o(c,void 0)})}):o(null,s)}else return Mzi(this.customCompletionFunction)?this.customCompletionFunction(n,r,(s=o)=>this.defaultCompletion(e,r,n,s),s=>{o(null,s)}):this.customCompletionFunction(n,r,s=>{o(null,s)})}getCompletion(e,r){let n=e.length?e[e.length-1]:"",o=this.yargs.parse(e,!0),s=this.customCompletionFunction?c=>this.customCompletion(e,c,n,r):c=>this.defaultCompletion(e,c,n,r);return Ul(o)?o.then(s):s(o)}generateCompletionScript(e,r){let n=this.zshShell?fQr:dQr,o=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,o),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function pQr(t,e,r,n){return new Uxt(t,e,r,n)}a(pQr,"completion");function Nzi(t){return t.length<3}a(Nzi,"isSyncCompletionFunction");function Mzi(t){return t.length>3}a(Mzi,"isFallbackCompletionFunction");f();f();function hQr(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let o;for(o=0;o<=t.length;o++)r[0][o]=o;for(n=1;n<=e.length;n++)for(o=1;o<=t.length;o++)e.charAt(n-1)===t.charAt(o-1)?r[n][o]=r[n-1][o-1]:n>1&&o>1&&e.charAt(n-2)===t.charAt(o-1)&&e.charAt(n-1)===t.charAt(o-2)?r[n][o]=r[n-2][o-2]+1:r[n][o]=Math.min(r[n-1][o-1]+1,Math.min(r[n][o-1]+1,r[n-1][o]+1));return r[e.length][t.length]}a(hQr,"levenshtein");var mQr=["$0","--","_"];function gQr(t,e,r){let n=r.y18n.__,o=r.y18n.__n,s={};s.nonOptionCount=a(function(h){let m=t.getDemandedCommands(),A=h._.length+(h["--"]?h["--"].length:0)-t.getInternalMethods().getContext().commands.length;m._&&(Am._.max)&&(Am._.max&&(m._.maxMsg!==void 0?e.fail(m._.maxMsg?m._.maxMsg.replace(/\$0/g,A.toString()).replace(/\$1/,m._.max.toString()):null):e.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",A,A.toString(),m._.max.toString()))))},"nonOptionCount"),s.positionalCount=a(function(h,m){m"u")&&(g=g||{},g[A]=m[A]);if(g){let A=[];for(let E of Object.keys(g)){let _=g[E];_&&A.indexOf(_)<0&&A.push(_)}let y=A.length?` ${A.join(` -`)}`:"";e.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(g).length,Object.keys(g).join(", ")+y))}},"requiredArguments"),s.unknownArguments=a(function(h,m,g,A,y=!0){var E;let _=t.getInternalMethods().getCommandInstance().getCommands(),v=[],b=t.getInternalMethods().getContext();if(Object.keys(h).forEach(I=>{!gUr.includes(I)&&!Object.prototype.hasOwnProperty.call(g,I)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),I)&&!s.isValidAndSomeAliasIsNotNew(I,m)&&v.push(I)}),y&&(b.commands.length>0||_.length>0||A)&&h._.slice(b.commands.length).forEach(I=>{_.includes(""+I)||v.push(""+I)}),y){let x=((E=t.getDemandedCommands()._)===null||E===void 0?void 0:E.max)||0,R=b.commands.length+x;R{w=String(w),!b.commands.includes(w)&&!v.includes(w)&&v.push(w)})}v.length&&e.fail(o("Unknown argument: %s","Unknown arguments: %s",v.length,v.map(I=>I.trim()?I:`"${I}"`).join(", ")))},"unknownArguments"),s.unknownCommands=a(function(h){let m=t.getInternalMethods().getCommandInstance().getCommands(),g=[],A=t.getInternalMethods().getContext();return(A.commands.length>0||m.length>0)&&h._.slice(A.commands.length).forEach(y=>{m.includes(""+y)||g.push(""+y)}),g.length>0?(e.fail(o("Unknown command: %s","Unknown commands: %s",g.length,g.join(", "))),!0):!1},"unknownCommands"),s.isValidAndSomeAliasIsNotNew=a(function(h,m){if(!Object.prototype.hasOwnProperty.call(m,h))return!1;let g=t.parsed.newAliases;return[h,...m[h]].some(A=>!Object.prototype.hasOwnProperty.call(g,A)||!g[h])},"isValidAndSomeAliasIsNotNew"),s.limitedChoices=a(function(h){let m=t.getOptions(),g={};if(!Object.keys(m.choices).length)return;Object.keys(h).forEach(E=>{gUr.indexOf(E)===-1&&Object.prototype.hasOwnProperty.call(m.choices,E)&&[].concat(h[E]).forEach(_=>{m.choices[E].indexOf(_)===-1&&_!==void 0&&(g[E]=(g[E]||[]).concat(_))})});let A=Object.keys(g);if(!A.length)return;let y=n("Invalid values:");A.forEach(E=>{y+=` - ${n("Argument: %s, Given: %s, Choices: %s",E,e.stringifiedValues(g[E]),e.stringifiedValues(m.choices[E]))}`}),e.fail(y)},"limitedChoices");let c={};s.implies=a(function(h,m){fn(" [array|number|string]",[h,m],arguments.length),typeof h=="object"?Object.keys(h).forEach(g=>{s.implies(g,h[g])}):(t.global(h),c[h]||(c[h]=[]),Array.isArray(m)?m.forEach(g=>s.implies(h,g)):(sy(m,void 0,r),c[h].push(m)))},"implies"),s.getImplied=a(function(){return c},"getImplied");function l(p,h){let m=Number(h);return h=isNaN(m)?h:m,typeof h=="number"?h=p._.length>=h:h.match(/^--no-.+/)?(h=h.match(/^--no-(.+)/)[1],h=!Object.prototype.hasOwnProperty.call(p,h)):h=Object.prototype.hasOwnProperty.call(p,h),h}a(l,"keyExists"),s.implications=a(function(h){let m=[];if(Object.keys(c).forEach(g=>{let A=g;(c[g]||[]).forEach(y=>{let E=A,_=y;E=l(h,E),y=l(h,y),E&&!y&&m.push(` ${A} -> ${_}`)})}),m.length){let g=`${n("Implications failed:")} -`;m.forEach(A=>{g+=A}),e.fail(g)}},"implications");let u={};s.conflicts=a(function(h,m){fn(" [array|string]",[h,m],arguments.length),typeof h=="object"?Object.keys(h).forEach(g=>{s.conflicts(g,h[g])}):(t.global(h),u[h]||(u[h]=[]),Array.isArray(m)?m.forEach(g=>s.conflicts(h,g)):u[h].push(m))},"conflicts"),s.getConflicting=()=>u,s.conflicting=a(function(h){Object.keys(h).forEach(m=>{u[m]&&u[m].forEach(g=>{g&&h[m]!==void 0&&h[g]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",m,g))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(m=>{u[m].forEach(g=>{g&&h[r.Parser.camelCase(m)]!==void 0&&h[r.Parser.camelCase(g)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",m,g))})})},"conflictingFn"),s.recommendCommands=a(function(h,m){m=m.sort((E,_)=>_.length-E.length);let A=null,y=1/0;for(let E=0,_;(_=m[E])!==void 0;E++){let v=mUr(h,_);v<=3&&v!h[m]),u=N6(u,m=>!h[m]),s},"reset");let d=[];return s.freeze=a(function(){d.push({implied:c,conflicting:u})},"freeze"),s.unfreeze=a(function(){let h=d.pop();sy(h,void 0,r),{implied:c,conflicting:u}=h},"unfreeze"),s}a(AUr,"validation");f();var Cxt=[],qye;function AFe(t,e,r,n){qye=n;let o={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return o;let s=/\.json|\..*rc$/.test(t.extends),c=null;if(s)c=OVi(e,t.extends);else try{c=require.resolve(t.extends)}catch{return t}MVi(c),Cxt.push(c),o=s?JSON.parse(qye.readFileSync(c,"utf8")):require(t.extends),delete t.extends,o=AFe(o,qye.path.dirname(c),r,qye)}return Cxt=[],r?yUr(o,t):Object.assign({},o,t)}a(AFe,"applyExtends");function MVi(t){if(Cxt.indexOf(t)>-1)throw new Vl(`Circular extended configurations: '${t}'.`)}a(MVi,"checkForCircularExtends");function OVi(t,e){return qye.path.resolve(t,e)}a(OVi,"getPathToDefaultConfig");function yUr(t,e){let r={};function n(o){return o&&typeof o=="object"&&!Array.isArray(o)}a(n,"isObject"),Object.assign(r,t);for(let o of Object.keys(e))n(e[o])&&n(r[o])?r[o]=yUr(t[o],e[o]):r[o]=e[o];return r}a(yUr,"mergeDeep");var hn=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},ge=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},yf,_j,Gye,IT,G1,yFe,M6,vj,EFe,xT,CFe,wT,zP,H1,RT,_Fe,zre,sh,Dn,vFe,bFe,j1,bj,Yre,Tj,O6,TFe,Ii,Sj,Ij,xj,$i,SFe,YP,Nd;function FUr(t){return(e=[],r=t.process.cwd(),n)=>{let o=new kxt(e,r,n,t);return Object.defineProperty(o,"argv",{get:a(()=>o.parse(),"get"),enumerable:!0}),o.help(),o.version(),o}}a(FUr,"YargsFactory");var EUr=Symbol("copyDoubleDash"),CUr=Symbol("copyDoubleDash"),_xt=Symbol("deleteFromParserHintObject"),_Ur=Symbol("emitWarning"),vUr=Symbol("freeze"),bUr=Symbol("getDollarZero"),wj=Symbol("getParserConfiguration"),TUr=Symbol("getUsageConfiguration"),vxt=Symbol("guessLocale"),SUr=Symbol("guessVersion"),IUr=Symbol("parsePositionalNumbers"),bxt=Symbol("pkgUp"),B6=Symbol("populateParserHintArray"),Kre=Symbol("populateParserHintSingleValueDictionary"),Txt=Symbol("populateParserHintArrayDictionary"),Sxt=Symbol("populateParserHintDictionary"),Ixt=Symbol("sanitizeKey"),xxt=Symbol("setKey"),wxt=Symbol("unfreeze"),xUr=Symbol("validateAsync"),wUr=Symbol("getCommandInstance"),RUr=Symbol("getContext"),PUr=Symbol("getHasOutput"),kUr=Symbol("getLoggerInstance"),NUr=Symbol("getParseContext"),DUr=Symbol("getUsageInstance"),MUr=Symbol("getValidationInstance"),IFe=Symbol("hasParseCallback"),OUr=Symbol("isGlobalContext"),Rj=Symbol("postProcess"),BUr=Symbol("rebase"),Rxt=Symbol("reset"),Hye=Symbol("runYargsParserAndExecuteCommands"),Pxt=Symbol("runValidation"),LUr=Symbol("setHasOutput"),Pj=Symbol("kTrackManuallySetKeys"),kxt=class{static{a(this,"YargsInstance")}constructor(e=[],r,n,o){this.customScriptName=!1,this.parsed=!1,yf.set(this,void 0),_j.set(this,void 0),Gye.set(this,{commands:[],fullCommands:[]}),IT.set(this,null),G1.set(this,null),yFe.set(this,"show-hidden"),M6.set(this,null),vj.set(this,!0),EFe.set(this,{}),xT.set(this,!0),CFe.set(this,[]),wT.set(this,void 0),zP.set(this,{}),H1.set(this,!1),RT.set(this,null),_Fe.set(this,!0),zre.set(this,void 0),sh.set(this,""),Dn.set(this,void 0),vFe.set(this,void 0),bFe.set(this,{}),j1.set(this,null),bj.set(this,null),Yre.set(this,{}),Tj.set(this,{}),O6.set(this,void 0),TFe.set(this,!1),Ii.set(this,void 0),Sj.set(this,!1),Ij.set(this,!1),xj.set(this,!1),$i.set(this,void 0),SFe.set(this,{}),YP.set(this,null),Nd.set(this,void 0),hn(this,Ii,o,"f"),hn(this,O6,e,"f"),hn(this,_j,r,"f"),hn(this,vFe,n,"f"),hn(this,wT,new hFe(this),"f"),this.$0=this[bUr](),this[Rxt](),hn(this,yf,ge(this,yf,"f"),"f"),hn(this,$i,ge(this,$i,"f"),"f"),hn(this,Nd,ge(this,Nd,"f"),"f"),hn(this,Dn,ge(this,Dn,"f"),"f"),ge(this,Dn,"f").showHiddenOpt=ge(this,yFe,"f"),hn(this,zre,this[CUr](),"f")}addHelpOpt(e,r){let n="help";return fn("[string|boolean] [string]",[e,r],arguments.length),ge(this,RT,"f")&&(this[_xt](ge(this,RT,"f")),hn(this,RT,null,"f")),e===!1&&r===void 0?this:(hn(this,RT,typeof e=="string"?e:n,"f"),this.boolean(ge(this,RT,"f")),this.describe(ge(this,RT,"f"),r||ge(this,$i,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(fn("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:ge(this,yFe,"f");return this.boolean(n),this.describe(n,r||ge(this,$i,"f").deferY18nLookup("Show hidden options")),ge(this,Dn,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return fn(" [string|array]",[e,r],arguments.length),this[Txt](this.alias.bind(this),"alias",e,r),this}array(e){return fn("",[e],arguments.length),this[B6]("array",e),this[Pj](e),this}boolean(e){return fn("",[e],arguments.length),this[B6]("boolean",e),this[Pj](e),this}check(e,r){return fn(" [boolean]",[e,r],arguments.length),this.middleware((n,o)=>Cj(()=>e(n,o.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&ge(this,$i,"f").fail(s.toString(),s):ge(this,$i,"f").fail(ge(this,Ii,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(ge(this,$i,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return fn(" [string|array]",[e,r],arguments.length),this[Txt](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(fn(" [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Vl("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Vl("coerce callback must be provided");return ge(this,Dn,"f").key[e]=!0,ge(this,wT,"f").addCoerceMiddleware((n,o)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?Cj(()=>(s=o.getAliases(),r(n[e])),l=>{n[e]=l;let u=o.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&u!==!0)for(let d of s[e])n[d]=l;return n},l=>{throw new Vl(l.message)}):n},e),this}conflicts(e,r){return fn(" [string|array]",[e,r],arguments.length),ge(this,Nd,"f").conflicts(e,r),this}config(e="config",r,n){return fn("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=AFe(e,ge(this,_j,"f"),this[wj]()["deep-merge-config"]||!1,ge(this,Ii,"f")),ge(this,Dn,"f").configObjects=(ge(this,Dn,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||ge(this,$i,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(o=>{ge(this,Dn,"f").config[o]=n||!0}),this)}completion(e,r,n){return fn("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),hn(this,G1,e||ge(this,G1,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(ge(this,G1,"f"),r),n&&ge(this,IT,"f").registerFunction(n),this}command(e,r,n,o,s,c){return fn(" [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,o,s,c],arguments.length),ge(this,yf,"f").addHandler(e,r,n,o,s,c),this}commands(e,r,n,o,s,c){return this.command(e,r,n,o,s,c)}commandDir(e,r){fn(" [object]",[e,r],arguments.length);let n=ge(this,vFe,"f")||ge(this,Ii,"f").require;return ge(this,yf,"f").addDirectory(e,n,ge(this,Ii,"f").getCallerFile(),r),this}count(e){return fn("",[e],arguments.length),this[B6]("count",e),this[Pj](e),this}default(e,r,n){return fn(" [*] [string]",[e,r,n],arguments.length),n&&(mxt(e,ge(this,Ii,"f")),ge(this,Dn,"f").defaultDescription[e]=n),typeof r=="function"&&(mxt(e,ge(this,Ii,"f")),ge(this,Dn,"f").defaultDescription[e]||(ge(this,Dn,"f").defaultDescription[e]=ge(this,$i,"f").functionDescription(r)),r=r.call()),this[Kre](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,o){return fn("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,o],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),ge(this,Dn,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:o},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(o=>{sy(n,!0,ge(this,Ii,"f")),this.demandOption(o,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(sy(n,!0,ge(this,Ii,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(o=>{sy(n,!0,ge(this,Ii,"f")),this.demandOption(o,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return fn(" [string]",[e,r],arguments.length),this[Kre](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return fn(" [string|boolean]",[e,r],arguments.length),ge(this,Dn,"f").deprecatedOptions[e]=r,this}describe(e,r){return fn(" [string]",[e,r],arguments.length),this[xxt](e,!0),ge(this,$i,"f").describe(e,r),this}detectLocale(e){return fn("",[e],arguments.length),hn(this,vj,e,"f"),this}env(e){return fn("[string|boolean]",[e],arguments.length),e===!1?delete ge(this,Dn,"f").envPrefix:ge(this,Dn,"f").envPrefix=e||"",this}epilogue(e){return fn("",[e],arguments.length),ge(this,$i,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return fn(" [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):ge(this,$i,"f").example(e,r),this}exit(e,r){hn(this,H1,!0,"f"),hn(this,M6,r,"f"),ge(this,xT,"f")&&ge(this,Ii,"f").process.exit(e)}exitProcess(e=!0){return fn("[boolean]",[e],arguments.length),hn(this,xT,e,"f"),this}fail(e){if(fn("",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Vl("Invalid first argument. Expected function or boolean 'false'");return ge(this,$i,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return fn(" [function]",[e,r],arguments.length),r?ge(this,IT,"f").getCompletion(e,r):new Promise((n,o)=>{ge(this,IT,"f").getCompletion(e,(s,c)=>{s?o(s):n(c)})})}getDemandedOptions(){return fn([],0),ge(this,Dn,"f").demandedOptions}getDemandedCommands(){return fn([],0),ge(this,Dn,"f").demandedCommands}getDeprecatedOptions(){return fn([],0),ge(this,Dn,"f").deprecatedOptions}getDetectLocale(){return ge(this,vj,"f")}getExitProcess(){return ge(this,xT,"f")}getGroups(){return Object.assign({},ge(this,zP,"f"),ge(this,Tj,"f"))}getHelp(){if(hn(this,H1,!0,"f"),!ge(this,$i,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[Hye](ge(this,O6,"f"),void 0,void 0,0,!0);if(Wl(r))return r.then(()=>ge(this,$i,"f").help())}let e=ge(this,yf,"f").runDefaultBuilderOn(this);if(Wl(e))return e.then(()=>ge(this,$i,"f").help())}return Promise.resolve(ge(this,$i,"f").help())}getOptions(){return ge(this,Dn,"f")}getStrict(){return ge(this,Sj,"f")}getStrictCommands(){return ge(this,Ij,"f")}getStrictOptions(){return ge(this,xj,"f")}global(e,r){return fn(" [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?ge(this,Dn,"f").local=ge(this,Dn,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{ge(this,Dn,"f").local.includes(n)||ge(this,Dn,"f").local.push(n)}),this}group(e,r){fn(" ",[e,r],arguments.length);let n=ge(this,Tj,"f")[r]||ge(this,zP,"f")[r];ge(this,Tj,"f")[r]&&delete ge(this,Tj,"f")[r];let o={};return ge(this,zP,"f")[r]=(n||[]).concat(e).filter(s=>o[s]?!1:o[s]=!0),this}hide(e){return fn("",[e],arguments.length),ge(this,Dn,"f").hiddenOptions.push(e),this}implies(e,r){return fn(" [number|string|array]",[e,r],arguments.length),ge(this,Nd,"f").implies(e,r),this}locale(e){return fn("[string]",[e],arguments.length),e===void 0?(this[vxt](),ge(this,Ii,"f").y18n.getLocale()):(hn(this,vj,!1,"f"),ge(this,Ii,"f").y18n.setLocale(e),this)}middleware(e,r,n){return ge(this,wT,"f").addMiddleware(e,!!r,n)}nargs(e,r){return fn(" [number]",[e,r],arguments.length),this[Kre](this.nargs.bind(this),"narg",e,r),this}normalize(e){return fn("",[e],arguments.length),this[B6]("normalize",e),this}number(e){return fn("",[e],arguments.length),this[B6]("number",e),this[Pj](e),this}option(e,r){if(fn(" [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[Pj](e),ge(this,YP,"f")&&(e==="version"||r?.alias==="version")&&this[_Ur](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(` -`),void 0,"versionWarning"),ge(this,Dn,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let o=r.demand||r.required||r.require;o&&this.demand(e,o),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(ge(this,Dn,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let s=r.describe||r.description||r.desc,c=ge(this,$i,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){fn("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[vUr](),typeof e>"u"&&(e=ge(this,O6,"f")),typeof r=="object"&&(hn(this,bj,r,"f"),r=n),typeof r=="function"&&(hn(this,j1,r,"f"),r=!1),r||hn(this,O6,e,"f"),ge(this,j1,"f")&&hn(this,xT,!1,"f");let o=this[Hye](e,!!r),s=this.parsed;return ge(this,IT,"f").setParsed(this.parsed),Wl(o)?o.then(c=>(ge(this,j1,"f")&&ge(this,j1,"f").call(this,ge(this,M6,"f"),c,ge(this,sh,"f")),c)).catch(c=>{throw ge(this,j1,"f")&&ge(this,j1,"f")(c,this.parsed.argv,ge(this,sh,"f")),c}).finally(()=>{this[wxt](),this.parsed=s}):(ge(this,j1,"f")&&ge(this,j1,"f").call(this,ge(this,M6,"f"),o,ge(this,sh,"f")),this[wxt](),this.parsed=s,o)}parseAsync(e,r,n){let o=this.parse(e,r,n);return Wl(o)?o:Promise.resolve(o)}parseSync(e,r,n){let o=this.parse(e,r,n);if(Wl(o))throw new Vl(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return o}parserConfiguration(e){return fn("",[e],arguments.length),hn(this,bFe,e,"f"),this}pkgConf(e,r){fn(" [string]",[e,r],arguments.length);let n=null,o=this[bxt](r||ge(this,_j,"f"));return o[e]&&typeof o[e]=="object"&&(n=AFe(o[e],r||ge(this,_j,"f"),this[wj]()["deep-merge-config"]||!1,ge(this,Ii,"f")),ge(this,Dn,"f").configObjects=(ge(this,Dn,"f").configObjects||[]).concat(n)),this}positional(e,r){fn(" ",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=N6(r,(c,l)=>c==="type"&&!["string","number","boolean"].includes(l)?!1:n.includes(c));let o=ge(this,Gye,"f").fullCommands[ge(this,Gye,"f").fullCommands.length-1],s=o?ge(this,yf,"f").cmdToParseOptions(o):{array:[],alias:{},default:{},demand:{}};return Vre(s).forEach(c=>{let l=s[c];Array.isArray(l)?l.indexOf(e)!==-1&&(r[c]=!0):l[e]&&!(c in r)&&(r[c]=l[e])}),this.group(e,ge(this,$i,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return fn("[boolean]",[e],arguments.length),hn(this,TFe,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return fn(" [number]",[e],arguments.length),typeof e=="string"&&ge(this,Dn,"f").narg[e]?this:(this[Kre](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return fn("[string] [string]",[e,r],arguments.length),e=e||this.$0,ge(this,zre,"f").log(ge(this,IT,"f").generateCompletionScript(e,r||ge(this,G1,"f")||"completion")),this}showHelp(e){if(fn("[string|function]",[e],arguments.length),hn(this,H1,!0,"f"),!ge(this,$i,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Hye](ge(this,O6,"f"),void 0,void 0,0,!0);if(Wl(n))return n.then(()=>{ge(this,$i,"f").showHelp(e)}),this}let r=ge(this,yf,"f").runDefaultBuilderOn(this);if(Wl(r))return r.then(()=>{ge(this,$i,"f").showHelp(e)}),this}return ge(this,$i,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return fn("[boolean|string] [string]",[e,r],arguments.length),ge(this,$i,"f").showHelpOnFail(e,r),this}showVersion(e){return fn("[string|function]",[e],arguments.length),ge(this,$i,"f").showVersion(e),this}skipValidation(e){return fn("",[e],arguments.length),this[B6]("skipValidation",e),this}strict(e){return fn("[boolean]",[e],arguments.length),hn(this,Sj,e!==!1,"f"),this}strictCommands(e){return fn("[boolean]",[e],arguments.length),hn(this,Ij,e!==!1,"f"),this}strictOptions(e){return fn("[boolean]",[e],arguments.length),hn(this,xj,e!==!1,"f"),this}string(e){return fn("",[e],arguments.length),this[B6]("string",e),this[Pj](e),this}terminalWidth(){return fn([],0),ge(this,Ii,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return fn("",[e],arguments.length),hn(this,vj,!1,"f"),ge(this,Ii,"f").y18n.updateLocale(e),this}usage(e,r,n,o){if(fn(" [string|boolean] [function|object] [function]",[e,r,n,o],arguments.length),r!==void 0){if(sy(e,null,ge(this,Ii,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,o);throw new Vl(".usage() description must start with $0 if being used as alias for .command()")}else return ge(this,$i,"f").usage(e),this}usageConfiguration(e){return fn("",[e],arguments.length),hn(this,SFe,e,"f"),this}version(e,r,n){let o="version";if(fn("[boolean|string] [string] [string]",[e,r,n],arguments.length),ge(this,YP,"f")&&(this[_xt](ge(this,YP,"f")),ge(this,$i,"f").version(void 0),hn(this,YP,null,"f")),arguments.length===0)n=this[SUr](),e=o;else if(arguments.length===1){if(e===!1)return this;n=e,e=o}else arguments.length===2&&(n=r,r=void 0);return hn(this,YP,typeof e=="string"?e:o,"f"),r=r||ge(this,$i,"f").deferY18nLookup("Show version number"),ge(this,$i,"f").version(n||void 0),this.boolean(ge(this,YP,"f")),this.describe(ge(this,YP,"f"),r),this}wrap(e){return fn("",[e],arguments.length),ge(this,$i,"f").wrap(e),this}[(yf=new WeakMap,_j=new WeakMap,Gye=new WeakMap,IT=new WeakMap,G1=new WeakMap,yFe=new WeakMap,M6=new WeakMap,vj=new WeakMap,EFe=new WeakMap,xT=new WeakMap,CFe=new WeakMap,wT=new WeakMap,zP=new WeakMap,H1=new WeakMap,RT=new WeakMap,_Fe=new WeakMap,zre=new WeakMap,sh=new WeakMap,Dn=new WeakMap,vFe=new WeakMap,bFe=new WeakMap,j1=new WeakMap,bj=new WeakMap,Yre=new WeakMap,Tj=new WeakMap,O6=new WeakMap,TFe=new WeakMap,Ii=new WeakMap,Sj=new WeakMap,Ij=new WeakMap,xj=new WeakMap,$i=new WeakMap,SFe=new WeakMap,YP=new WeakMap,Nd=new WeakMap,EUr)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[CUr](){return{log:a((...e)=>{this[IFe]()||console.log(...e),hn(this,H1,!0,"f"),ge(this,sh,"f").length&&hn(this,sh,ge(this,sh,"f")+` -`,"f"),hn(this,sh,ge(this,sh,"f")+e.join(" "),"f")},"log"),error:a((...e)=>{this[IFe]()||console.error(...e),hn(this,H1,!0,"f"),ge(this,sh,"f").length&&hn(this,sh,ge(this,sh,"f")+` -`,"f"),hn(this,sh,ge(this,sh,"f")+e.join(" "),"f")},"error")}}[_xt](e){Vre(ge(this,Dn,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=ge(this,Dn,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete ge(this,$i,"f").getDescriptions()[e]}[_Ur](e,r,n){ge(this,EFe,"f")[n]||(ge(this,Ii,"f").process.emitWarning(e,r),ge(this,EFe,"f")[n]=!0)}[vUr](){ge(this,CFe,"f").push({options:ge(this,Dn,"f"),configObjects:ge(this,Dn,"f").configObjects.slice(0),exitProcess:ge(this,xT,"f"),groups:ge(this,zP,"f"),strict:ge(this,Sj,"f"),strictCommands:ge(this,Ij,"f"),strictOptions:ge(this,xj,"f"),completionCommand:ge(this,G1,"f"),output:ge(this,sh,"f"),exitError:ge(this,M6,"f"),hasOutput:ge(this,H1,"f"),parsed:this.parsed,parseFn:ge(this,j1,"f"),parseContext:ge(this,bj,"f")}),ge(this,$i,"f").freeze(),ge(this,Nd,"f").freeze(),ge(this,yf,"f").freeze(),ge(this,wT,"f").freeze()}[bUr](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(ge(this,Ii,"f").process.argv()[0])?r=ge(this,Ii,"f").process.argv().slice(1,2):r=ge(this,Ii,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[BUr](ge(this,_j,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length{if(l.includes("package.json"))return"package.json"});sy(s,void 0,ge(this,Ii,"f")),n=JSON.parse(ge(this,Ii,"f").readFileSync(s,"utf8"))}catch{}return ge(this,Yre,"f")[r]=n||{},ge(this,Yre,"f")[r]}[B6](e,r){r=[].concat(r),r.forEach(n=>{n=this[Ixt](n),ge(this,Dn,"f")[e].push(n)})}[Kre](e,r,n,o){this[Sxt](e,r,n,o,(s,c,l)=>{ge(this,Dn,"f")[s][c]=l})}[Txt](e,r,n,o){this[Sxt](e,r,n,o,(s,c,l)=>{ge(this,Dn,"f")[s][c]=(ge(this,Dn,"f")[s][c]||[]).concat(l)})}[Sxt](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of Vre(n))e(c,n[c]);else s(r,this[Ixt](n),o)}[Ixt](e){return e==="__proto__"?"___proto___":e}[xxt](e,r){return this[Kre](this[xxt].bind(this),"key",e,r),this}[wxt](){var e,r,n,o,s,c,l,u,d,p,h,m;let g=ge(this,CFe,"f").pop();sy(g,void 0,ge(this,Ii,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,l=this,u=this,d=this,p=this,h=this,m=this,{options:{set value(y){hn(e,Dn,y,"f")}}.value,configObjects:A,exitProcess:{set value(y){hn(r,xT,y,"f")}}.value,groups:{set value(y){hn(n,zP,y,"f")}}.value,output:{set value(y){hn(o,sh,y,"f")}}.value,exitError:{set value(y){hn(s,M6,y,"f")}}.value,hasOutput:{set value(y){hn(c,H1,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){hn(l,Sj,y,"f")}}.value,strictCommands:{set value(y){hn(u,Ij,y,"f")}}.value,strictOptions:{set value(y){hn(d,xj,y,"f")}}.value,completionCommand:{set value(y){hn(p,G1,y,"f")}}.value,parseFn:{set value(y){hn(h,j1,y,"f")}}.value,parseContext:{set value(y){hn(m,bj,y,"f")}}.value}=g,ge(this,Dn,"f").configObjects=A,ge(this,$i,"f").unfreeze(),ge(this,Nd,"f").unfreeze(),ge(this,yf,"f").unfreeze(),ge(this,wT,"f").unfreeze()}[xUr](e,r){return Cj(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[wUr].bind(this),getContext:this[RUr].bind(this),getHasOutput:this[PUr].bind(this),getLoggerInstance:this[kUr].bind(this),getParseContext:this[NUr].bind(this),getParserConfiguration:this[wj].bind(this),getUsageConfiguration:this[TUr].bind(this),getUsageInstance:this[DUr].bind(this),getValidationInstance:this[MUr].bind(this),hasParseCallback:this[IFe].bind(this),isGlobalContext:this[OUr].bind(this),postProcess:this[Rj].bind(this),reset:this[Rxt].bind(this),runValidation:this[Pxt].bind(this),runYargsParserAndExecuteCommands:this[Hye].bind(this),setHasOutput:this[LUr].bind(this)}}[wUr](){return ge(this,yf,"f")}[RUr](){return ge(this,Gye,"f")}[PUr](){return ge(this,H1,"f")}[kUr](){return ge(this,zre,"f")}[NUr](){return ge(this,bj,"f")||{}}[DUr](){return ge(this,$i,"f")}[MUr](){return ge(this,Nd,"f")}[IFe](){return!!ge(this,j1,"f")}[OUr](){return ge(this,_Fe,"f")}[Rj](e,r,n,o){return n||Wl(e)||(r||(e=this[EUr](e)),(this[wj]()["parse-positional-numbers"]||this[wj]()["parse-positional-numbers"]===void 0)&&(e=this[IUr](e)),o&&(e=Ej(e,this,ge(this,wT,"f").getMiddleware(),!1))),e}[Rxt](e={}){hn(this,Dn,ge(this,Dn,"f")||{},"f");let r={};r.local=ge(this,Dn,"f").local||[],r.configObjects=ge(this,Dn,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(l=>{n[l]=!0})}),Object.assign(ge(this,Tj,"f"),Object.keys(ge(this,zP,"f")).reduce((c,l)=>{let u=ge(this,zP,"f")[l].filter(d=>!(d in n));return u.length>0&&(c[l]=u),c},{})),hn(this,zP,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(ge(this,Dn,"f")[c]||[]).filter(l=>!n[l])}),s.forEach(c=>{r[c]=N6(ge(this,Dn,"f")[c],l=>!n[l])}),r.envPrefix=ge(this,Dn,"f").envPrefix,hn(this,Dn,r,"f"),hn(this,$i,ge(this,$i,"f")?ge(this,$i,"f").reset(n):dUr(this,ge(this,Ii,"f")),"f"),hn(this,Nd,ge(this,Nd,"f")?ge(this,Nd,"f").reset(n):AUr(this,ge(this,$i,"f"),ge(this,Ii,"f")),"f"),hn(this,yf,ge(this,yf,"f")?ge(this,yf,"f").reset():cUr(ge(this,$i,"f"),ge(this,Nd,"f"),ge(this,wT,"f"),ge(this,Ii,"f")),"f"),ge(this,IT,"f")||hn(this,IT,hUr(this,ge(this,$i,"f"),ge(this,yf,"f"),ge(this,Ii,"f")),"f"),ge(this,wT,"f").reset(),hn(this,G1,null,"f"),hn(this,sh,"","f"),hn(this,M6,null,"f"),hn(this,H1,!1,"f"),this.parsed=!1,this}[BUr](e,r){return ge(this,Ii,"f").path.relative(e,r)}[Hye](e,r,n,o=0,s=!1){let c=!!n||s;e=e||ge(this,O6,"f"),ge(this,Dn,"f").__=ge(this,Ii,"f").y18n.__,ge(this,Dn,"f").configuration=this[wj]();let l=!!ge(this,Dn,"f").configuration["populate--"],u=Object.assign({},ge(this,Dn,"f").configuration,{"populate--":!0}),d=ge(this,Ii,"f").Parser.detailed(e,Object.assign({},ge(this,Dn,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),p=Object.assign(d.argv,ge(this,bj,"f")),h,m=d.aliases,g=!1,A=!1;Object.keys(p).forEach(y=>{y===ge(this,RT,"f")&&p[y]?g=!0:y===ge(this,YP,"f")&&p[y]&&(A=!0)}),p.$0=this.$0,this.parsed=d,o===0&&ge(this,$i,"f").clearCachedHelpMessage();try{if(this[vxt](),r)return this[Rj](p,l,!!n,!1);ge(this,RT,"f")&&[ge(this,RT,"f")].concat(m[ge(this,RT,"f")]||[]).filter(b=>b.length>1).includes(""+p._[p._.length-1])&&(p._.pop(),g=!0),hn(this,_Fe,!1,"f");let y=ge(this,yf,"f").getCommands(),E=ge(this,IT,"f").completionKey in p,_=g||E||s;if(p._.length){if(y.length){let v;for(let b=o||0,I;p._[b]!==void 0;b++)if(I=String(p._[b]),y.includes(I)&&I!==ge(this,G1,"f")){let x=ge(this,yf,"f").runCommand(I,this,d,b+1,s,g||A||s);return this[Rj](x,l,!!n,!1)}else if(!v&&I!==ge(this,G1,"f")){v=I;break}!ge(this,yf,"f").hasDefaultCommand()&&ge(this,TFe,"f")&&v&&!_&&ge(this,Nd,"f").recommendCommands(v,y)}ge(this,G1,"f")&&p._.includes(ge(this,G1,"f"))&&!E&&(ge(this,xT,"f")&&D6(!0),this.showCompletionScript(),this.exit(0))}if(ge(this,yf,"f").hasDefaultCommand()&&!_){let v=ge(this,yf,"f").runCommand(null,this,d,0,s,g||A||s);return this[Rj](v,l,!!n,!1)}if(E){ge(this,xT,"f")&&D6(!0),e=[].concat(e);let v=e.slice(e.indexOf(`--${ge(this,IT,"f").completionKey}`)+1);return ge(this,IT,"f").getCompletion(v,(b,I)=>{if(b)throw new Vl(b.message);(I||[]).forEach(x=>{ge(this,zre,"f").log(x)}),this.exit(0)}),this[Rj](p,!l,!!n,!1)}if(ge(this,H1,"f")||(g?(ge(this,xT,"f")&&D6(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(ge(this,xT,"f")&&D6(!0),c=!0,ge(this,$i,"f").showVersion("log"),this.exit(0))),!c&&ge(this,Dn,"f").skipValidation.length>0&&(c=Object.keys(p).some(v=>ge(this,Dn,"f").skipValidation.indexOf(v)>=0&&p[v]===!0)),!c){if(d.error)throw new Vl(d.error.message);if(!E){let v=this[Pxt](m,{},d.error);n||(h=Ej(p,this,ge(this,wT,"f").getMiddleware(),!0)),h=this[xUr](v,h??p),Wl(h)&&!n&&(h=h.then(()=>Ej(p,this,ge(this,wT,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof Vl)ge(this,$i,"f").fail(y.message,y);else throw y}return this[Rj](h??p,l,!!n,!0)}[Pxt](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Vl(n.message);ge(this,Nd,"f").nonOptionCount(c),ge(this,Nd,"f").requiredArguments(c,s);let l=!1;ge(this,Ij,"f")&&(l=ge(this,Nd,"f").unknownCommands(c)),ge(this,Sj,"f")&&!l?ge(this,Nd,"f").unknownArguments(c,e,r,!!o):ge(this,xj,"f")&&ge(this,Nd,"f").unknownArguments(c,e,{},!1,!1),ge(this,Nd,"f").limitedChoices(c),ge(this,Nd,"f").implications(c),ge(this,Nd,"f").conflicting(c)}}[LUr](){hn(this,H1,!0,"f")}[Pj](e){if(typeof e=="string")ge(this,Dn,"f").key[e]=!0;else for(let r of e)ge(this,Dn,"f").key[r]=!0}};function lUr(t){return!!t&&typeof t.getInternalMethods=="function"}a(lUr,"isYargsInstance");var BVi=FUr(nUr),UUr=BVi;f();f();var LVi={didChangeFeatureFlags:!1,fetch:!1,ipCodeCitation:!1,redirectedTelemetry:!1,related:!1,token:!1,watchedFiles:!1,showPanelMessage:!1,mcpElicitation:!1,mcpSampling:!1,mcpAllowlist:!1,stateDatabase:!1,subAgent:!1,mcpServerManagement:!1,cveRemediatorAgent:!1,debuggerAgent:!1,contentProvider:[],manageTodoListTool:!1},Fn=class{constructor(){this.capabilities={...LVi};this.emitter=new ki;this.onDidSetCapabilities=this.emitter.event}static{a(this,"CopilotCapabilitiesProvider")}setCapabilities(e){let r;for(r in e){let n=e[r];n!==void 0&&(this.capabilities[r]=n)}this.emitter.fire(this.capabilities)}getCapabilities(){return this.capabilities}};f();var GUr=require("node:child_process"),HUr=require("node:util");var FVi=(0,HUr.promisify)(GUr.execFile),Dxt="0.0.403",QUr="COPILOT_CLI_PATH",UVi="GITHUB_COPILOT_ACP_USE_CLI",kj="@github/copilot",jye=class extends Error{static{a(this,"CLIDiscoveryError")}constructor(e){super(e),this.name="CLIDiscoveryError"}};function jUr(){return process.env[UVi]!=="0"}a(jUr,"isCLIIntegrationEnabled");var Mxt=process.platform==="win32";async function $Ur(){if(process.env[QUr]){let n=process.env[QUr],o=await Nxt(n,["--version"]);if(o)return qUr(o,"COPILOT_CLI_PATH"),{path:n,args:[],version:o,source:"env"};throw new jye("Copilot CLI not found at COPILOT_CLI_PATH. Ensure the path is correct and the binary is executable.")}let t=await Nxt("copilot",["--version"]);if(t&&VUr(t,Dxt))return{path:"copilot",args:[],version:t,source:"path"};let e=process.platform==="win32"?"npx.cmd":"npx",r=await Nxt(e,[kj,"--version"],!0);if(r)return qUr(r,`npx ${kj}`),{path:e,args:[kj],version:r,source:"npx"};throw new jye(`Copilot CLI version could not be determined. 'npx ${kj} --version' ran successfully but its output contained no recognisable version. -Try running 'npx ${kj} --version' manually to inspect the output, or install/update globally with: npm install -g ${kj}`)}a($Ur,"discoverCLI");function QVi(t){let e=t.match(/(\d+\.\d+\.\d+)/);return e?e[1]:null}a(QVi,"parseVersion");async function Nxt(t,e,r=!1){try{let{stdout:n}=await FVi(t,e,{timeout:3e4,shell:Mxt});return QVi(n)}catch(n){if(r)throw n;return null}}a(Nxt,"tryGetVersion");function qUr(t,e){if(!VUr(t,Dxt))throw new jye(`Copilot CLI version ${t} (from ${e}) is below the minimum required version ${Dxt}. Update with: npm install -g ${kj}@latest`)}a(qUr,"validateVersion");function VUr(t,e){let r=a(c=>c.replace(/^v/,"").split(".").map(l=>{let u=parseInt(l,10);return isNaN(u)?0:u}),"parse"),n=r(t),o=r(e),s=Math.max(n.length,o.length);for(let c=0;cu)return!0;if(lr.type==="file").map(r=>r.uri).filter(Boolean),...this.request.activeEditor?.uri?[this.request.activeEditor.uri]:[]];return Array.from(new Set(e))}getMetadata(e){return this._metadata.get(e)?.at(-1)}getAllMetadata(e){return this._metadata.get(e)}setMetadata(e){let r=e.constructor,n=this._metadata.get(r)??[];n.push(e),this._metadata.set(r,n)}hasMetadata(e){let r=this._metadata.get(e);return r!==void 0&&r.length>0}isSubagent(){return this.parentTurnId!==void 0&&this.parentTurnId!==""}},Nj=class t{constructor(e=[],r="panel",n="en",o){this.turns=e;this.source=r;this.userLanguage=n;this._telemetryId=yr();this._timestamp=Date.now();this.uriSchemeCache=new xFe;this.currentPartitionId=1;this.id=o??this.telemetryId}static{a(this,"Conversation")}copy(){let e=JSON.parse(JSON.stringify(this.turns)),r=new t(e,this.source,this.userLanguage,this.id);return r._telemetryId=this.telemetryId,r._timestamp=this.timestamp,r.currentPartitionId=this.currentPartitionId,r}get telemetryId(){return this._telemetryId}get timestamp(){return this._timestamp}addTurn(e){this.turns.push(e)}deleteTurn(e){this.turns=this.turns.filter(r=>r.id!==e)}getLastTurn(){return this.turns[this.turns.length-1]}findTurn(e){return this.turns.find(r=>r.id===e)}};f();f();var Jre=class{constructor(){this.promiseMap=new Map}static{a(this,"SequencerByKey")}queue(e,r){let o=(this.promiseMap.get(e)??Promise.resolve()).catch(()=>{}).then(r).finally(()=>{this.promiseMap.get(e)===o&&this.promiseMap.delete(e)});return this.promiseMap.set(e,o),o}};f();f();f();f();f();f();f();function Oxt(t,e){let r=Dj(t,e);return r===-1?void 0:t[r]}a(Oxt,"findLastMonotonous");function Dj(t,e,r=0,n=t.length){let o=r,s=n;for(;o{throw e.stack?RFe.isErrorNoTelemetry(e)?new RFe(e.message+` +`)}`:"";e.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(g).length,Object.keys(g).join(", ")+y))}},"requiredArguments"),s.unknownArguments=a(function(h,m,g,A,y=!0){var E;let _=t.getInternalMethods().getCommandInstance().getCommands(),v=[],b=t.getInternalMethods().getContext();if(Object.keys(h).forEach(I=>{!mQr.includes(I)&&!Object.prototype.hasOwnProperty.call(g,I)&&!Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),I)&&!s.isValidAndSomeAliasIsNotNew(I,m)&&v.push(I)}),y&&(b.commands.length>0||_.length>0||A)&&h._.slice(b.commands.length).forEach(I=>{_.includes(""+I)||v.push(""+I)}),y){let x=((E=t.getDemandedCommands()._)===null||E===void 0?void 0:E.max)||0,w=b.commands.length+x;w{R=String(R),!b.commands.includes(R)&&!v.includes(R)&&v.push(R)})}v.length&&e.fail(o("Unknown argument: %s","Unknown arguments: %s",v.length,v.map(I=>I.trim()?I:`"${I}"`).join(", ")))},"unknownArguments"),s.unknownCommands=a(function(h){let m=t.getInternalMethods().getCommandInstance().getCommands(),g=[],A=t.getInternalMethods().getContext();return(A.commands.length>0||m.length>0)&&h._.slice(A.commands.length).forEach(y=>{m.includes(""+y)||g.push(""+y)}),g.length>0?(e.fail(o("Unknown command: %s","Unknown commands: %s",g.length,g.join(", "))),!0):!1},"unknownCommands"),s.isValidAndSomeAliasIsNotNew=a(function(h,m){if(!Object.prototype.hasOwnProperty.call(m,h))return!1;let g=t.parsed.newAliases;return[h,...m[h]].some(A=>!Object.prototype.hasOwnProperty.call(g,A)||!g[h])},"isValidAndSomeAliasIsNotNew"),s.limitedChoices=a(function(h){let m=t.getOptions(),g={};if(!Object.keys(m.choices).length)return;Object.keys(h).forEach(E=>{mQr.indexOf(E)===-1&&Object.prototype.hasOwnProperty.call(m.choices,E)&&[].concat(h[E]).forEach(_=>{m.choices[E].indexOf(_)===-1&&_!==void 0&&(g[E]=(g[E]||[]).concat(_))})});let A=Object.keys(g);if(!A.length)return;let y=n("Invalid values:");A.forEach(E=>{y+=` + ${n("Argument: %s, Given: %s, Choices: %s",E,e.stringifiedValues(g[E]),e.stringifiedValues(m.choices[E]))}`}),e.fail(y)},"limitedChoices");let c={};s.implies=a(function(h,m){fn(" [array|number|string]",[h,m],arguments.length),typeof h=="object"?Object.keys(h).forEach(g=>{s.implies(g,h[g])}):(t.global(h),c[h]||(c[h]=[]),Array.isArray(m)?m.forEach(g=>s.implies(h,g)):(JA(m,void 0,r),c[h].push(m)))},"implies"),s.getImplied=a(function(){return c},"getImplied");function l(p,h){let m=Number(h);return h=isNaN(m)?h:m,typeof h=="number"?h=p._.length>=h:h.match(/^--no-.+/)?(h=h.match(/^--no-(.+)/)[1],h=!Object.prototype.hasOwnProperty.call(p,h)):h=Object.prototype.hasOwnProperty.call(p,h),h}a(l,"keyExists"),s.implications=a(function(h){let m=[];if(Object.keys(c).forEach(g=>{let A=g;(c[g]||[]).forEach(y=>{let E=A,_=y;E=l(h,E),y=l(h,y),E&&!y&&m.push(` ${A} -> ${_}`)})}),m.length){let g=`${n("Implications failed:")} +`;m.forEach(A=>{g+=A}),e.fail(g)}},"implications");let u={};s.conflicts=a(function(h,m){fn(" [array|string]",[h,m],arguments.length),typeof h=="object"?Object.keys(h).forEach(g=>{s.conflicts(g,h[g])}):(t.global(h),u[h]||(u[h]=[]),Array.isArray(m)?m.forEach(g=>s.conflicts(h,g)):u[h].push(m))},"conflicts"),s.getConflicting=()=>u,s.conflicting=a(function(h){Object.keys(h).forEach(m=>{u[m]&&u[m].forEach(g=>{g&&h[m]!==void 0&&h[g]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",m,g))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(u).forEach(m=>{u[m].forEach(g=>{g&&h[r.Parser.camelCase(m)]!==void 0&&h[r.Parser.camelCase(g)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",m,g))})})},"conflictingFn"),s.recommendCommands=a(function(h,m){m=m.sort((E,_)=>_.length-E.length);let A=null,y=1/0;for(let E=0,_;(_=m[E])!==void 0;E++){let v=hQr(h,_);v<=3&&v!h[m]),u=o6(u,m=>!h[m]),s},"reset");let d=[];return s.freeze=a(function(){d.push({implied:c,conflicting:u})},"freeze"),s.unfreeze=a(function(){let h=d.pop();JA(h,void 0,r),{implied:c,conflicting:u}=h},"unfreeze"),s}a(gQr,"validation");f();var Qxt=[],UAe;function S6e(t,e,r,n){UAe=n;let o={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if(typeof t.extends!="string")return o;let s=/\.json|\..*rc$/.test(t.extends),c=null;if(s)c=Bzi(e,t.extends);else try{c=require.resolve(t.extends)}catch{return t}Ozi(c),Qxt.push(c),o=s?JSON.parse(UAe.readFileSync(c,"utf8")):require(t.extends),delete t.extends,o=S6e(o,UAe.path.dirname(c),r,UAe)}return Qxt=[],r?AQr(o,t):Object.assign({},o,t)}a(S6e,"applyExtends");function Ozi(t){if(Qxt.indexOf(t)>-1)throw new Fl(`Circular extended configurations: '${t}'.`)}a(Ozi,"checkForCircularExtends");function Bzi(t,e){return UAe.path.resolve(t,e)}a(Bzi,"getPathToDefaultConfig");function AQr(t,e){let r={};function n(o){return o&&typeof o=="object"&&!Array.isArray(o)}a(n,"isObject"),Object.assign(r,t);for(let o of Object.keys(e))n(e[o])&&n(r[o])?r[o]=AQr(t[o],e[o]):r[o]=e[o];return r}a(AQr,"mergeDeep");var hn=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},ge=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},df,wH,QAe,hT,R1,I6e,a6,RH,x6e,mT,w6e,gT,BP,P1,AT,R6e,are,Zp,Nn,P6e,k6e,k1,PH,cre,kH,c6,D6e,Si,DH,NH,MH,Qi,N6e,LP,bd;function LQr(t){return(e=[],r=t.process.cwd(),n)=>{let o=new Jxt(e,r,n,t);return Object.defineProperty(o,"argv",{get:a(()=>o.parse(),"get"),enumerable:!0}),o.help(),o.version(),o}}a(LQr,"YargsFactory");var yQr=Symbol("copyDoubleDash"),EQr=Symbol("copyDoubleDash"),qxt=Symbol("deleteFromParserHintObject"),_Qr=Symbol("emitWarning"),CQr=Symbol("freeze"),vQr=Symbol("getDollarZero"),OH=Symbol("getParserConfiguration"),bQr=Symbol("getUsageConfiguration"),Gxt=Symbol("guessLocale"),TQr=Symbol("guessVersion"),SQr=Symbol("parsePositionalNumbers"),Hxt=Symbol("pkgUp"),l6=Symbol("populateParserHintArray"),lre=Symbol("populateParserHintSingleValueDictionary"),jxt=Symbol("populateParserHintArrayDictionary"),$xt=Symbol("populateParserHintDictionary"),Vxt=Symbol("sanitizeKey"),Wxt=Symbol("setKey"),zxt=Symbol("unfreeze"),IQr=Symbol("validateAsync"),xQr=Symbol("getCommandInstance"),wQr=Symbol("getContext"),RQr=Symbol("getHasOutput"),PQr=Symbol("getLoggerInstance"),kQr=Symbol("getParseContext"),DQr=Symbol("getUsageInstance"),NQr=Symbol("getValidationInstance"),M6e=Symbol("hasParseCallback"),MQr=Symbol("isGlobalContext"),BH=Symbol("postProcess"),OQr=Symbol("rebase"),Yxt=Symbol("reset"),qAe=Symbol("runYargsParserAndExecuteCommands"),Kxt=Symbol("runValidation"),BQr=Symbol("setHasOutput"),LH=Symbol("kTrackManuallySetKeys"),Jxt=class{static{a(this,"YargsInstance")}constructor(e=[],r,n,o){this.customScriptName=!1,this.parsed=!1,df.set(this,void 0),wH.set(this,void 0),QAe.set(this,{commands:[],fullCommands:[]}),hT.set(this,null),R1.set(this,null),I6e.set(this,"show-hidden"),a6.set(this,null),RH.set(this,!0),x6e.set(this,{}),mT.set(this,!0),w6e.set(this,[]),gT.set(this,void 0),BP.set(this,{}),P1.set(this,!1),AT.set(this,null),R6e.set(this,!0),are.set(this,void 0),Zp.set(this,""),Nn.set(this,void 0),P6e.set(this,void 0),k6e.set(this,{}),k1.set(this,null),PH.set(this,null),cre.set(this,{}),kH.set(this,{}),c6.set(this,void 0),D6e.set(this,!1),Si.set(this,void 0),DH.set(this,!1),NH.set(this,!1),MH.set(this,!1),Qi.set(this,void 0),N6e.set(this,{}),LP.set(this,null),bd.set(this,void 0),hn(this,Si,o,"f"),hn(this,c6,e,"f"),hn(this,wH,r,"f"),hn(this,P6e,n,"f"),hn(this,gT,new v6e(this),"f"),this.$0=this[vQr](),this[Yxt](),hn(this,df,ge(this,df,"f"),"f"),hn(this,Qi,ge(this,Qi,"f"),"f"),hn(this,bd,ge(this,bd,"f"),"f"),hn(this,Nn,ge(this,Nn,"f"),"f"),ge(this,Nn,"f").showHiddenOpt=ge(this,I6e,"f"),hn(this,are,this[EQr](),"f")}addHelpOpt(e,r){let n="help";return fn("[string|boolean] [string]",[e,r],arguments.length),ge(this,AT,"f")&&(this[qxt](ge(this,AT,"f")),hn(this,AT,null,"f")),e===!1&&r===void 0?this:(hn(this,AT,typeof e=="string"?e:n,"f"),this.boolean(ge(this,AT,"f")),this.describe(ge(this,AT,"f"),r||ge(this,Qi,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(fn("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:ge(this,I6e,"f");return this.boolean(n),this.describe(n,r||ge(this,Qi,"f").deferY18nLookup("Show hidden options")),ge(this,Nn,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return fn(" [string|array]",[e,r],arguments.length),this[jxt](this.alias.bind(this),"alias",e,r),this}array(e){return fn("",[e],arguments.length),this[l6]("array",e),this[LH](e),this}boolean(e){return fn("",[e],arguments.length),this[l6]("boolean",e),this[LH](e),this}check(e,r){return fn(" [boolean]",[e,r],arguments.length),this.middleware((n,o)=>xH(()=>e(n,o.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&ge(this,Qi,"f").fail(s.toString(),s):ge(this,Qi,"f").fail(ge(this,Si,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(ge(this,Qi,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return fn(" [string|array]",[e,r],arguments.length),this[jxt](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(fn(" [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new Fl("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new Fl("coerce callback must be provided");return ge(this,Nn,"f").key[e]=!0,ge(this,gT,"f").addCoerceMiddleware((n,o)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?xH(()=>(s=o.getAliases(),r(n[e])),l=>{n[e]=l;let u=o.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&u!==!0)for(let d of s[e])n[d]=l;return n},l=>{throw new Fl(l.message)}):n},e),this}conflicts(e,r){return fn(" [string|array]",[e,r],arguments.length),ge(this,bd,"f").conflicts(e,r),this}config(e="config",r,n){return fn("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=S6e(e,ge(this,wH,"f"),this[OH]()["deep-merge-config"]||!1,ge(this,Si,"f")),ge(this,Nn,"f").configObjects=(ge(this,Nn,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||ge(this,Qi,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(o=>{ge(this,Nn,"f").config[o]=n||!0}),this)}completion(e,r,n){return fn("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),hn(this,R1,e||ge(this,R1,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(ge(this,R1,"f"),r),n&&ge(this,hT,"f").registerFunction(n),this}command(e,r,n,o,s,c){return fn(" [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,o,s,c],arguments.length),ge(this,df,"f").addHandler(e,r,n,o,s,c),this}commands(e,r,n,o,s,c){return this.command(e,r,n,o,s,c)}commandDir(e,r){fn(" [object]",[e,r],arguments.length);let n=ge(this,P6e,"f")||ge(this,Si,"f").require;return ge(this,df,"f").addDirectory(e,n,ge(this,Si,"f").getCallerFile(),r),this}count(e){return fn("",[e],arguments.length),this[l6]("count",e),this[LH](e),this}default(e,r,n){return fn(" [*] [string]",[e,r,n],arguments.length),n&&(Oxt(e,ge(this,Si,"f")),ge(this,Nn,"f").defaultDescription[e]=n),typeof r=="function"&&(Oxt(e,ge(this,Si,"f")),ge(this,Nn,"f").defaultDescription[e]||(ge(this,Nn,"f").defaultDescription[e]=ge(this,Qi,"f").functionDescription(r)),r=r.call()),this[lre](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,o){return fn("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,o],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),ge(this,Nn,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:o},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(o=>{JA(n,!0,ge(this,Si,"f")),this.demandOption(o,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(JA(n,!0,ge(this,Si,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(o=>{JA(n,!0,ge(this,Si,"f")),this.demandOption(o,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return fn(" [string]",[e,r],arguments.length),this[lre](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return fn(" [string|boolean]",[e,r],arguments.length),ge(this,Nn,"f").deprecatedOptions[e]=r,this}describe(e,r){return fn(" [string]",[e,r],arguments.length),this[Wxt](e,!0),ge(this,Qi,"f").describe(e,r),this}detectLocale(e){return fn("",[e],arguments.length),hn(this,RH,e,"f"),this}env(e){return fn("[string|boolean]",[e],arguments.length),e===!1?delete ge(this,Nn,"f").envPrefix:ge(this,Nn,"f").envPrefix=e||"",this}epilogue(e){return fn("",[e],arguments.length),ge(this,Qi,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return fn(" [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):ge(this,Qi,"f").example(e,r),this}exit(e,r){hn(this,P1,!0,"f"),hn(this,a6,r,"f"),ge(this,mT,"f")&&ge(this,Si,"f").process.exit(e)}exitProcess(e=!0){return fn("[boolean]",[e],arguments.length),hn(this,mT,e,"f"),this}fail(e){if(fn("",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Fl("Invalid first argument. Expected function or boolean 'false'");return ge(this,Qi,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return fn(" [function]",[e,r],arguments.length),r?ge(this,hT,"f").getCompletion(e,r):new Promise((n,o)=>{ge(this,hT,"f").getCompletion(e,(s,c)=>{s?o(s):n(c)})})}getDemandedOptions(){return fn([],0),ge(this,Nn,"f").demandedOptions}getDemandedCommands(){return fn([],0),ge(this,Nn,"f").demandedCommands}getDeprecatedOptions(){return fn([],0),ge(this,Nn,"f").deprecatedOptions}getDetectLocale(){return ge(this,RH,"f")}getExitProcess(){return ge(this,mT,"f")}getGroups(){return Object.assign({},ge(this,BP,"f"),ge(this,kH,"f"))}getHelp(){if(hn(this,P1,!0,"f"),!ge(this,Qi,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[qAe](ge(this,c6,"f"),void 0,void 0,0,!0);if(Ul(r))return r.then(()=>ge(this,Qi,"f").help())}let e=ge(this,df,"f").runDefaultBuilderOn(this);if(Ul(e))return e.then(()=>ge(this,Qi,"f").help())}return Promise.resolve(ge(this,Qi,"f").help())}getOptions(){return ge(this,Nn,"f")}getStrict(){return ge(this,DH,"f")}getStrictCommands(){return ge(this,NH,"f")}getStrictOptions(){return ge(this,MH,"f")}global(e,r){return fn(" [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?ge(this,Nn,"f").local=ge(this,Nn,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{ge(this,Nn,"f").local.includes(n)||ge(this,Nn,"f").local.push(n)}),this}group(e,r){fn(" ",[e,r],arguments.length);let n=ge(this,kH,"f")[r]||ge(this,BP,"f")[r];ge(this,kH,"f")[r]&&delete ge(this,kH,"f")[r];let o={};return ge(this,BP,"f")[r]=(n||[]).concat(e).filter(s=>o[s]?!1:o[s]=!0),this}hide(e){return fn("",[e],arguments.length),ge(this,Nn,"f").hiddenOptions.push(e),this}implies(e,r){return fn(" [number|string|array]",[e,r],arguments.length),ge(this,bd,"f").implies(e,r),this}locale(e){return fn("[string]",[e],arguments.length),e===void 0?(this[Gxt](),ge(this,Si,"f").y18n.getLocale()):(hn(this,RH,!1,"f"),ge(this,Si,"f").y18n.setLocale(e),this)}middleware(e,r,n){return ge(this,gT,"f").addMiddleware(e,!!r,n)}nargs(e,r){return fn(" [number]",[e,r],arguments.length),this[lre](this.nargs.bind(this),"narg",e,r),this}normalize(e){return fn("",[e],arguments.length),this[l6]("normalize",e),this}number(e){return fn("",[e],arguments.length),this[l6]("number",e),this[LH](e),this}option(e,r){if(fn(" [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[LH](e),ge(this,LP,"f")&&(e==="version"||r?.alias==="version")&&this[_Qr](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(` +`),void 0,"versionWarning"),ge(this,Nn,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let o=r.demand||r.required||r.require;o&&this.demand(e,o),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(ge(this,Nn,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let s=r.describe||r.description||r.desc,c=ge(this,Qi,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){fn("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[CQr](),typeof e>"u"&&(e=ge(this,c6,"f")),typeof r=="object"&&(hn(this,PH,r,"f"),r=n),typeof r=="function"&&(hn(this,k1,r,"f"),r=!1),r||hn(this,c6,e,"f"),ge(this,k1,"f")&&hn(this,mT,!1,"f");let o=this[qAe](e,!!r),s=this.parsed;return ge(this,hT,"f").setParsed(this.parsed),Ul(o)?o.then(c=>(ge(this,k1,"f")&&ge(this,k1,"f").call(this,ge(this,a6,"f"),c,ge(this,Zp,"f")),c)).catch(c=>{throw ge(this,k1,"f")&&ge(this,k1,"f")(c,this.parsed.argv,ge(this,Zp,"f")),c}).finally(()=>{this[zxt](),this.parsed=s}):(ge(this,k1,"f")&&ge(this,k1,"f").call(this,ge(this,a6,"f"),o,ge(this,Zp,"f")),this[zxt](),this.parsed=s,o)}parseAsync(e,r,n){let o=this.parse(e,r,n);return Ul(o)?o:Promise.resolve(o)}parseSync(e,r,n){let o=this.parse(e,r,n);if(Ul(o))throw new Fl(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return o}parserConfiguration(e){return fn("",[e],arguments.length),hn(this,k6e,e,"f"),this}pkgConf(e,r){fn(" [string]",[e,r],arguments.length);let n=null,o=this[Hxt](r||ge(this,wH,"f"));return o[e]&&typeof o[e]=="object"&&(n=S6e(o[e],r||ge(this,wH,"f"),this[OH]()["deep-merge-config"]||!1,ge(this,Si,"f")),ge(this,Nn,"f").configObjects=(ge(this,Nn,"f").configObjects||[]).concat(n)),this}positional(e,r){fn(" ",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=o6(r,(c,l)=>c==="type"&&!["string","number","boolean"].includes(l)?!1:n.includes(c));let o=ge(this,QAe,"f").fullCommands[ge(this,QAe,"f").fullCommands.length-1],s=o?ge(this,df,"f").cmdToParseOptions(o):{array:[],alias:{},default:{},demand:{}};return ore(s).forEach(c=>{let l=s[c];Array.isArray(l)?l.indexOf(e)!==-1&&(r[c]=!0):l[e]&&!(c in r)&&(r[c]=l[e])}),this.group(e,ge(this,Qi,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return fn("[boolean]",[e],arguments.length),hn(this,D6e,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return fn(" [number]",[e],arguments.length),typeof e=="string"&&ge(this,Nn,"f").narg[e]?this:(this[lre](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return fn("[string] [string]",[e,r],arguments.length),e=e||this.$0,ge(this,are,"f").log(ge(this,hT,"f").generateCompletionScript(e,r||ge(this,R1,"f")||"completion")),this}showHelp(e){if(fn("[string|function]",[e],arguments.length),hn(this,P1,!0,"f"),!ge(this,Qi,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[qAe](ge(this,c6,"f"),void 0,void 0,0,!0);if(Ul(n))return n.then(()=>{ge(this,Qi,"f").showHelp(e)}),this}let r=ge(this,df,"f").runDefaultBuilderOn(this);if(Ul(r))return r.then(()=>{ge(this,Qi,"f").showHelp(e)}),this}return ge(this,Qi,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return fn("[boolean|string] [string]",[e,r],arguments.length),ge(this,Qi,"f").showHelpOnFail(e,r),this}showVersion(e){return fn("[string|function]",[e],arguments.length),ge(this,Qi,"f").showVersion(e),this}skipValidation(e){return fn("",[e],arguments.length),this[l6]("skipValidation",e),this}strict(e){return fn("[boolean]",[e],arguments.length),hn(this,DH,e!==!1,"f"),this}strictCommands(e){return fn("[boolean]",[e],arguments.length),hn(this,NH,e!==!1,"f"),this}strictOptions(e){return fn("[boolean]",[e],arguments.length),hn(this,MH,e!==!1,"f"),this}string(e){return fn("",[e],arguments.length),this[l6]("string",e),this[LH](e),this}terminalWidth(){return fn([],0),ge(this,Si,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return fn("",[e],arguments.length),hn(this,RH,!1,"f"),ge(this,Si,"f").y18n.updateLocale(e),this}usage(e,r,n,o){if(fn(" [string|boolean] [function|object] [function]",[e,r,n,o],arguments.length),r!==void 0){if(JA(e,null,ge(this,Si,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,o);throw new Fl(".usage() description must start with $0 if being used as alias for .command()")}else return ge(this,Qi,"f").usage(e),this}usageConfiguration(e){return fn("",[e],arguments.length),hn(this,N6e,e,"f"),this}version(e,r,n){let o="version";if(fn("[boolean|string] [string] [string]",[e,r,n],arguments.length),ge(this,LP,"f")&&(this[qxt](ge(this,LP,"f")),ge(this,Qi,"f").version(void 0),hn(this,LP,null,"f")),arguments.length===0)n=this[TQr](),e=o;else if(arguments.length===1){if(e===!1)return this;n=e,e=o}else arguments.length===2&&(n=r,r=void 0);return hn(this,LP,typeof e=="string"?e:o,"f"),r=r||ge(this,Qi,"f").deferY18nLookup("Show version number"),ge(this,Qi,"f").version(n||void 0),this.boolean(ge(this,LP,"f")),this.describe(ge(this,LP,"f"),r),this}wrap(e){return fn("",[e],arguments.length),ge(this,Qi,"f").wrap(e),this}[(df=new WeakMap,wH=new WeakMap,QAe=new WeakMap,hT=new WeakMap,R1=new WeakMap,I6e=new WeakMap,a6=new WeakMap,RH=new WeakMap,x6e=new WeakMap,mT=new WeakMap,w6e=new WeakMap,gT=new WeakMap,BP=new WeakMap,P1=new WeakMap,AT=new WeakMap,R6e=new WeakMap,are=new WeakMap,Zp=new WeakMap,Nn=new WeakMap,P6e=new WeakMap,k6e=new WeakMap,k1=new WeakMap,PH=new WeakMap,cre=new WeakMap,kH=new WeakMap,c6=new WeakMap,D6e=new WeakMap,Si=new WeakMap,DH=new WeakMap,NH=new WeakMap,MH=new WeakMap,Qi=new WeakMap,N6e=new WeakMap,LP=new WeakMap,bd=new WeakMap,yQr)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[EQr](){return{log:a((...e)=>{this[M6e]()||console.log(...e),hn(this,P1,!0,"f"),ge(this,Zp,"f").length&&hn(this,Zp,ge(this,Zp,"f")+` +`,"f"),hn(this,Zp,ge(this,Zp,"f")+e.join(" "),"f")},"log"),error:a((...e)=>{this[M6e]()||console.error(...e),hn(this,P1,!0,"f"),ge(this,Zp,"f").length&&hn(this,Zp,ge(this,Zp,"f")+` +`,"f"),hn(this,Zp,ge(this,Zp,"f")+e.join(" "),"f")},"error")}}[qxt](e){ore(ge(this,Nn,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=ge(this,Nn,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete ge(this,Qi,"f").getDescriptions()[e]}[_Qr](e,r,n){ge(this,x6e,"f")[n]||(ge(this,Si,"f").process.emitWarning(e,r),ge(this,x6e,"f")[n]=!0)}[CQr](){ge(this,w6e,"f").push({options:ge(this,Nn,"f"),configObjects:ge(this,Nn,"f").configObjects.slice(0),exitProcess:ge(this,mT,"f"),groups:ge(this,BP,"f"),strict:ge(this,DH,"f"),strictCommands:ge(this,NH,"f"),strictOptions:ge(this,MH,"f"),completionCommand:ge(this,R1,"f"),output:ge(this,Zp,"f"),exitError:ge(this,a6,"f"),hasOutput:ge(this,P1,"f"),parsed:this.parsed,parseFn:ge(this,k1,"f"),parseContext:ge(this,PH,"f")}),ge(this,Qi,"f").freeze(),ge(this,bd,"f").freeze(),ge(this,df,"f").freeze(),ge(this,gT,"f").freeze()}[vQr](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(ge(this,Si,"f").process.argv()[0])?r=ge(this,Si,"f").process.argv().slice(1,2):r=ge(this,Si,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[OQr](ge(this,wH,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length{if(l.includes("package.json"))return"package.json"});JA(s,void 0,ge(this,Si,"f")),n=JSON.parse(ge(this,Si,"f").readFileSync(s,"utf8"))}catch{}return ge(this,cre,"f")[r]=n||{},ge(this,cre,"f")[r]}[l6](e,r){r=[].concat(r),r.forEach(n=>{n=this[Vxt](n),ge(this,Nn,"f")[e].push(n)})}[lre](e,r,n,o){this[$xt](e,r,n,o,(s,c,l)=>{ge(this,Nn,"f")[s][c]=l})}[jxt](e,r,n,o){this[$xt](e,r,n,o,(s,c,l)=>{ge(this,Nn,"f")[s][c]=(ge(this,Nn,"f")[s][c]||[]).concat(l)})}[$xt](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of ore(n))e(c,n[c]);else s(r,this[Vxt](n),o)}[Vxt](e){return e==="__proto__"?"___proto___":e}[Wxt](e,r){return this[lre](this[Wxt].bind(this),"key",e,r),this}[zxt](){var e,r,n,o,s,c,l,u,d,p,h,m;let g=ge(this,w6e,"f").pop();JA(g,void 0,ge(this,Si,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,l=this,u=this,d=this,p=this,h=this,m=this,{options:{set value(y){hn(e,Nn,y,"f")}}.value,configObjects:A,exitProcess:{set value(y){hn(r,mT,y,"f")}}.value,groups:{set value(y){hn(n,BP,y,"f")}}.value,output:{set value(y){hn(o,Zp,y,"f")}}.value,exitError:{set value(y){hn(s,a6,y,"f")}}.value,hasOutput:{set value(y){hn(c,P1,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){hn(l,DH,y,"f")}}.value,strictCommands:{set value(y){hn(u,NH,y,"f")}}.value,strictOptions:{set value(y){hn(d,MH,y,"f")}}.value,completionCommand:{set value(y){hn(p,R1,y,"f")}}.value,parseFn:{set value(y){hn(h,k1,y,"f")}}.value,parseContext:{set value(y){hn(m,PH,y,"f")}}.value}=g,ge(this,Nn,"f").configObjects=A,ge(this,Qi,"f").unfreeze(),ge(this,bd,"f").unfreeze(),ge(this,df,"f").unfreeze(),ge(this,gT,"f").unfreeze()}[IQr](e,r){return xH(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[xQr].bind(this),getContext:this[wQr].bind(this),getHasOutput:this[RQr].bind(this),getLoggerInstance:this[PQr].bind(this),getParseContext:this[kQr].bind(this),getParserConfiguration:this[OH].bind(this),getUsageConfiguration:this[bQr].bind(this),getUsageInstance:this[DQr].bind(this),getValidationInstance:this[NQr].bind(this),hasParseCallback:this[M6e].bind(this),isGlobalContext:this[MQr].bind(this),postProcess:this[BH].bind(this),reset:this[Yxt].bind(this),runValidation:this[Kxt].bind(this),runYargsParserAndExecuteCommands:this[qAe].bind(this),setHasOutput:this[BQr].bind(this)}}[xQr](){return ge(this,df,"f")}[wQr](){return ge(this,QAe,"f")}[RQr](){return ge(this,P1,"f")}[PQr](){return ge(this,are,"f")}[kQr](){return ge(this,PH,"f")||{}}[DQr](){return ge(this,Qi,"f")}[NQr](){return ge(this,bd,"f")}[M6e](){return!!ge(this,k1,"f")}[MQr](){return ge(this,R6e,"f")}[BH](e,r,n,o){return n||Ul(e)||(r||(e=this[yQr](e)),(this[OH]()["parse-positional-numbers"]||this[OH]()["parse-positional-numbers"]===void 0)&&(e=this[SQr](e)),o&&(e=IH(e,this,ge(this,gT,"f").getMiddleware(),!1))),e}[Yxt](e={}){hn(this,Nn,ge(this,Nn,"f")||{},"f");let r={};r.local=ge(this,Nn,"f").local||[],r.configObjects=ge(this,Nn,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(l=>{n[l]=!0})}),Object.assign(ge(this,kH,"f"),Object.keys(ge(this,BP,"f")).reduce((c,l)=>{let u=ge(this,BP,"f")[l].filter(d=>!(d in n));return u.length>0&&(c[l]=u),c},{})),hn(this,BP,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(ge(this,Nn,"f")[c]||[]).filter(l=>!n[l])}),s.forEach(c=>{r[c]=o6(ge(this,Nn,"f")[c],l=>!n[l])}),r.envPrefix=ge(this,Nn,"f").envPrefix,hn(this,Nn,r,"f"),hn(this,Qi,ge(this,Qi,"f")?ge(this,Qi,"f").reset(n):uQr(this,ge(this,Si,"f")),"f"),hn(this,bd,ge(this,bd,"f")?ge(this,bd,"f").reset(n):gQr(this,ge(this,Qi,"f"),ge(this,Si,"f")),"f"),hn(this,df,ge(this,df,"f")?ge(this,df,"f").reset():aQr(ge(this,Qi,"f"),ge(this,bd,"f"),ge(this,gT,"f"),ge(this,Si,"f")),"f"),ge(this,hT,"f")||hn(this,hT,pQr(this,ge(this,Qi,"f"),ge(this,df,"f"),ge(this,Si,"f")),"f"),ge(this,gT,"f").reset(),hn(this,R1,null,"f"),hn(this,Zp,"","f"),hn(this,a6,null,"f"),hn(this,P1,!1,"f"),this.parsed=!1,this}[OQr](e,r){return ge(this,Si,"f").path.relative(e,r)}[qAe](e,r,n,o=0,s=!1){let c=!!n||s;e=e||ge(this,c6,"f"),ge(this,Nn,"f").__=ge(this,Si,"f").y18n.__,ge(this,Nn,"f").configuration=this[OH]();let l=!!ge(this,Nn,"f").configuration["populate--"],u=Object.assign({},ge(this,Nn,"f").configuration,{"populate--":!0}),d=ge(this,Si,"f").Parser.detailed(e,Object.assign({},ge(this,Nn,"f"),{configuration:{"parse-positional-numbers":!1,...u}})),p=Object.assign(d.argv,ge(this,PH,"f")),h,m=d.aliases,g=!1,A=!1;Object.keys(p).forEach(y=>{y===ge(this,AT,"f")&&p[y]?g=!0:y===ge(this,LP,"f")&&p[y]&&(A=!0)}),p.$0=this.$0,this.parsed=d,o===0&&ge(this,Qi,"f").clearCachedHelpMessage();try{if(this[Gxt](),r)return this[BH](p,l,!!n,!1);ge(this,AT,"f")&&[ge(this,AT,"f")].concat(m[ge(this,AT,"f")]||[]).filter(b=>b.length>1).includes(""+p._[p._.length-1])&&(p._.pop(),g=!0),hn(this,R6e,!1,"f");let y=ge(this,df,"f").getCommands(),E=ge(this,hT,"f").completionKey in p,_=g||E||s;if(p._.length){if(y.length){let v;for(let b=o||0,I;p._[b]!==void 0;b++)if(I=String(p._[b]),y.includes(I)&&I!==ge(this,R1,"f")){let x=ge(this,df,"f").runCommand(I,this,d,b+1,s,g||A||s);return this[BH](x,l,!!n,!1)}else if(!v&&I!==ge(this,R1,"f")){v=I;break}!ge(this,df,"f").hasDefaultCommand()&&ge(this,D6e,"f")&&v&&!_&&ge(this,bd,"f").recommendCommands(v,y)}ge(this,R1,"f")&&p._.includes(ge(this,R1,"f"))&&!E&&(ge(this,mT,"f")&&s6(!0),this.showCompletionScript(),this.exit(0))}if(ge(this,df,"f").hasDefaultCommand()&&!_){let v=ge(this,df,"f").runCommand(null,this,d,0,s,g||A||s);return this[BH](v,l,!!n,!1)}if(E){ge(this,mT,"f")&&s6(!0),e=[].concat(e);let v=e.slice(e.indexOf(`--${ge(this,hT,"f").completionKey}`)+1);return ge(this,hT,"f").getCompletion(v,(b,I)=>{if(b)throw new Fl(b.message);(I||[]).forEach(x=>{ge(this,are,"f").log(x)}),this.exit(0)}),this[BH](p,!l,!!n,!1)}if(ge(this,P1,"f")||(g?(ge(this,mT,"f")&&s6(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(ge(this,mT,"f")&&s6(!0),c=!0,ge(this,Qi,"f").showVersion("log"),this.exit(0))),!c&&ge(this,Nn,"f").skipValidation.length>0&&(c=Object.keys(p).some(v=>ge(this,Nn,"f").skipValidation.indexOf(v)>=0&&p[v]===!0)),!c){if(d.error)throw new Fl(d.error.message);if(!E){let v=this[Kxt](m,{},d.error);n||(h=IH(p,this,ge(this,gT,"f").getMiddleware(),!0)),h=this[IQr](v,h??p),Ul(h)&&!n&&(h=h.then(()=>IH(p,this,ge(this,gT,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof Fl)ge(this,Qi,"f").fail(y.message,y);else throw y}return this[BH](h??p,l,!!n,!0)}[Kxt](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new Fl(n.message);ge(this,bd,"f").nonOptionCount(c),ge(this,bd,"f").requiredArguments(c,s);let l=!1;ge(this,NH,"f")&&(l=ge(this,bd,"f").unknownCommands(c)),ge(this,DH,"f")&&!l?ge(this,bd,"f").unknownArguments(c,e,r,!!o):ge(this,MH,"f")&&ge(this,bd,"f").unknownArguments(c,e,{},!1,!1),ge(this,bd,"f").limitedChoices(c),ge(this,bd,"f").implications(c),ge(this,bd,"f").conflicting(c)}}[BQr](){hn(this,P1,!0,"f")}[LH](e){if(typeof e=="string")ge(this,Nn,"f").key[e]=!0;else for(let r of e)ge(this,Nn,"f").key[r]=!0}};function cQr(t){return!!t&&typeof t.getInternalMethods=="function"}a(cQr,"isYargsInstance");var Lzi=LQr(rQr),FQr=Lzi;f();f();var Fzi={didChangeFeatureFlags:!1,fetch:!1,ipCodeCitation:!1,redirectedTelemetry:!1,related:!1,token:!1,watchedFiles:!1,showPanelMessage:!1,mcpElicitation:!1,mcpSampling:!1,mcpAllowlist:!1,stateDatabase:!1,subAgent:!1,mcpServerManagement:!1,cveRemediatorAgent:!1,debuggerAgent:!1,contentProvider:[],manageTodoListTool:!1},Fn=class{constructor(){this.capabilities={...Fzi};this.emitter=new Ri;this.onDidSetCapabilities=this.emitter.event}static{a(this,"CopilotCapabilitiesProvider")}setCapabilities(e){let r;for(r in e){let n=e[r];n!==void 0&&(this.capabilities[r]=n)}this.emitter.fire(this.capabilities)}getCapabilities(){return this.capabilities}};f();var qQr=require("node:child_process"),GQr=require("node:util");var Uzi=(0,GQr.promisify)(qQr.execFile),Zxt="0.0.403",UQr="COPILOT_CLI_PATH",Qzi="GITHUB_COPILOT_ACP_USE_CLI",FH="@github/copilot",GAe=class extends Error{static{a(this,"CLIDiscoveryError")}constructor(e){super(e),this.name="CLIDiscoveryError"}};function HQr(){return process.env[Qzi]!=="0"}a(HQr,"isCLIIntegrationEnabled");var ewt=process.platform==="win32";async function jQr(){if(process.env[UQr]){let n=process.env[UQr],o=await Xxt(n,["--version"]);if(o)return QQr(o,"COPILOT_CLI_PATH"),{path:n,args:[],version:o,source:"env"};throw new GAe("Copilot CLI not found at COPILOT_CLI_PATH. Ensure the path is correct and the binary is executable.")}let t=await Xxt("copilot",["--version"]);if(t&&$Qr(t,Zxt))return{path:"copilot",args:[],version:t,source:"path"};let e=process.platform==="win32"?"npx.cmd":"npx",r=await Xxt(e,[FH,"--version"],!0);if(r)return QQr(r,`npx ${FH}`),{path:e,args:[FH],version:r,source:"npx"};throw new GAe(`Copilot CLI version could not be determined. 'npx ${FH} --version' ran successfully but its output contained no recognisable version. +Try running 'npx ${FH} --version' manually to inspect the output, or install/update globally with: npm install -g ${FH}`)}a(jQr,"discoverCLI");function qzi(t){let e=t.match(/(\d+\.\d+\.\d+)/);return e?e[1]:null}a(qzi,"parseVersion");async function Xxt(t,e,r=!1){try{let{stdout:n}=await Uzi(t,e,{timeout:3e4,shell:ewt});return qzi(n)}catch(n){if(r)throw n;return null}}a(Xxt,"tryGetVersion");function QQr(t,e){if(!$Qr(t,Zxt))throw new GAe(`Copilot CLI version ${t} (from ${e}) is below the minimum required version ${Zxt}. Update with: npm install -g ${FH}@latest`)}a(QQr,"validateVersion");function $Qr(t,e){let r=a(c=>c.replace(/^v/,"").split(".").map(l=>{let u=parseInt(l,10);return isNaN(u)?0:u}),"parse"),n=r(t),o=r(e),s=Math.max(n.length,o.length);for(let c=0;cu)return!0;if(lr.type==="file").map(r=>r.uri).filter(Boolean),...this.request.activeEditor?.uri?[this.request.activeEditor.uri]:[]];return Array.from(new Set(e))}getMetadata(e){return this._metadata.get(e)?.at(-1)}getAllMetadata(e){return this._metadata.get(e)}setMetadata(e){let r=e.constructor,n=this._metadata.get(r)??[];n.push(e),this._metadata.set(r,n)}hasMetadata(e){let r=this._metadata.get(e);return r!==void 0&&r.length>0}isSubagent(){return this.parentTurnId!==void 0&&this.parentTurnId!==""}},UH=class t{constructor(e=[],r="panel",n="en",o){this.turns=e;this.source=r;this.userLanguage=n;this._telemetryId=yr();this._timestamp=Date.now();this.uriSchemeCache=new O6e;this.currentPartitionId=1;this.id=o??this.telemetryId}static{a(this,"Conversation")}copy(){let e=JSON.parse(JSON.stringify(this.turns)),r=new t(e,this.source,this.userLanguage,this.id);return r._telemetryId=this.telemetryId,r._timestamp=this.timestamp,r.currentPartitionId=this.currentPartitionId,r}get telemetryId(){return this._telemetryId}get timestamp(){return this._timestamp}addTurn(e){this.turns.push(e)}deleteTurn(e){this.turns=this.turns.filter(r=>r.id!==e)}getLastTurn(){return this.turns[this.turns.length-1]}findTurn(e){return this.turns.find(r=>r.id===e)}};f();f();var ure=class{constructor(){this.promiseMap=new Map}static{a(this,"SequencerByKey")}queue(e,r){let o=(this.promiseMap.get(e)??Promise.resolve()).catch(()=>{}).then(r).finally(()=>{this.promiseMap.get(e)===o&&this.promiseMap.delete(e)});return this.promiseMap.set(e,o),o}};f();f();f();f();f();f();f();function twt(t,e){let r=QH(t,e);return r===-1?void 0:t[r]}a(twt,"findLastMonotonous");function QH(t,e,r=0,n=t.length){let o=r,s=n;for(;o{throw e.stack?L6e.isErrorNoTelemetry(e)?new L6e(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(r=>{r(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},qVi=new Bxt;function Xre(t){GVi(t)||qVi.onUnexpectedError(t)}a(Xre,"onUnexpectedError");var Lxt="Canceled";function GVi(t){return t instanceof $1?!0:t instanceof Error&&t.name===Lxt&&t.message===Lxt}a(GVi,"isCancellationError");var $1=class extends Error{static{a(this,"CancellationError")}constructor(){super(Lxt),this.name=this.message}};var RFe=class t extends Error{static{a(this,"ErrorNoTelemetry")}constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let r=new t;return r.message=e.message,r.stack=e.stack,r}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},Ga=class t extends Error{static{a(this,"BugIndicatingError")}constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function Fxt(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n{let o=Math.sin(n++)*179426549;return o-Math.floor(o)},"rand")}else r=Math.random;for(let n=t.length-1;n>0;n-=1){let o=Math.floor(r()*(n+1)),s=t[n];t[n]=t[o],t[o]=s}}a(Qxt,"shuffle");var YUr;(l=>{function t(u){return u<0}l.isLessThan=t,a(t,"isLessThan");function e(u){return u<=0}l.isLessThanOrEqual=e,a(e,"isLessThanOrEqual");function r(u){return u>0}l.isGreaterThan=r,a(r,"isGreaterThan");function n(u){return u===0}l.isNeitherLessOrGreaterThan=n,a(n,"isNeitherLessOrGreaterThan"),l.greaterThan=1,l.lessThan=-1,l.neitherLessOrGreaterThan=0})(YUr||={});function Zre(t,e){return(r,n)=>e(t(r),t(n))}a(Zre,"compareBy");var ene=a((t,e)=>t-e,"numberComparator");var zUr=class t{constructor(e){this.iterate=e}static{a(this,"CallbackIterable")}static{this.empty=new t(e=>{})}forEach(e){this.iterate(r=>(e(r),!0))}toArray(){let e=[];return this.iterate(r=>(e.push(r),!0)),e}filter(e){return new t(r=>this.iterate(n=>e(n)?r(n):!0))}map(e){return new t(r=>this.iterate(n=>r(e(n))))}some(e){let r=!1;return this.iterate(n=>(r=e(n),!r)),r}findFirst(e){let r;return this.iterate(n=>e(n)?(r=n,!1):!0),r}findLast(e){let r;return this.iterate(n=>(e(n)&&(r=n),!0)),r}findLastMaxBy(e){let r,n=!0;return this.iterate(o=>((n||YUr.isGreaterThan(e(o,r)))&&(n=!1,r=o),!0)),r}};function $ye(t,e){return t.reduce((r,n)=>r+e(n),0)}a($ye,"sumBy");f();f();f();f();function ZUr(t,e){let r=Object.create(null);for(let n of t){let o=e(n),s=r[o];s||(s=r[o]=[]),s.push(n)}return r}a(ZUr,"groupBy");var JUr,XUr,KUr=class{constructor(e,r){this.toKey=r;this._map=new Map;this[JUr]="SetWithKey";for(let n of e)this.add(n)}static{a(this,"SetWithKey")}get size(){return this._map.size}add(e){let r=this.toKey(e);return this._map.set(r,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,r){this._map.forEach(n=>e.call(r,n,n,this))}[(XUr=Symbol.iterator,JUr=Symbol.toStringTag,XUr)](){return this.values()}};f();function qxt(t,e){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=t.apply(r,arguments)}finally{e()}else o=t.apply(r,arguments);return o}}a(qxt,"createSingleCallFunction");f();f();var Gxt;(b=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}b.is=t,a(t,"is");let e=Object.freeze([]);function r(){return e}b.empty=r,a(r,"empty");function*n(I){yield I}b.single=n,a(n,"single");function o(I){return t(I)?I:n(I)}b.wrap=o,a(o,"wrap");function s(I){return I||e}b.from=s,a(s,"from");function*c(I){for(let x=I.length-1;x>=0;x--)yield I[x]}b.reverse=c,a(c,"reverse");function l(I){return!I||I[Symbol.iterator]().next().done===!0}b.isEmpty=l,a(l,"isEmpty");function u(I){return I[Symbol.iterator]().next().value}b.first=u,a(u,"first");function d(I,x){let R=0;for(let w of I)if(x(w,R++))return!0;return!1}b.some=d,a(d,"some");function p(I,x){for(let R of I)if(x(R))return R}b.find=p,a(p,"find");function*h(I,x){for(let R of I)x(R)&&(yield R)}b.filter=h,a(h,"filter");function*m(I,x){let R=0;for(let w of I)yield x(w,R++)}b.map=m,a(m,"map");function*g(I,x){let R=0;for(let w of I)yield*x(w,R++)}b.flatMap=g,a(g,"flatMap");function*A(...I){for(let x of I)yield*x}b.concat=A,a(A,"concat");function y(I,x,R){let w=R;for(let P of I)w=x(w,P);return w}b.reduce=y,a(y,"reduce");function*E(I,x,R=I.length){for(x<-I.length&&(x=0),x<0&&(x+=I.length),R<0?R+=I.length:R>I.length&&(R=I.length);xe.toString(),"defaultToKey")}set(e,r){return this.map.set(this.toKey(e),new Hxt(e,r)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,r){typeof r<"u"&&(e=e.bind(r));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(tQr=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},rQr,eQr=class{constructor(e,r){this[rQr]="ResourceSet";!e||typeof e=="function"?this._map=new PFe(e):(this._map=new PFe(r),e.forEach(this.add,this))}static{a(this,"ResourceSet")}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,r){this._map.forEach((n,o)=>e.call(r,o,o,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(rQr=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};var nQr,jxt=class{constructor(){this[nQr]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}static{a(this,"LinkedMap")}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=0){let n=this._map.get(e);if(n)return r!==0&&this.touch(n,r),n.value}set(e,r,n=0){let o=this._map.get(e);if(o)o.value=r,n!==0&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}values(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}entries(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}[(nQr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._tail,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.previous,n--;this._tail=r,this._size=n,r&&(r.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}},$xt=class extends jxt{static{a(this,"Cache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=2){return super.get(e,r)}peek(e){return super.get(e,0)}set(e,r){return super.set(e,r,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},kFe=class extends $xt{static{a(this,"LRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimOld(e)}set(e,r){return super.set(e,r),this.checkTrim(),this}};var NFe=class{constructor(){this.map=new Map}static{a(this,"SetMap")}add(e,r){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(r)}delete(e,r){let n=this.map.get(e);n&&(n.delete(r),n.size===0&&this.map.delete(e))}forEach(e,r){let n=this.map.get(e);n&&n.forEach(r)}get(e){let r=this.map.get(e);return r||new Set}};var jVi=!1,tne=null;var iQr=class t{constructor(){this.livingDisposables=new Map}static{a(this,"DisposableTracker")}static{this.idx=0}getDisposableData(e){let r=this.livingDisposables.get(e);return r||(r={parent:null,source:null,isSingleton:!1,value:e,idx:t.idx++},this.livingDisposables.set(e,r)),r}trackDisposable(e){let r=this.getDisposableData(e);r.source||(r.source=new Error().stack)}setParent(e,r){let n=this.getDisposableData(e);n.parent=r}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,r){let n=r.get(e);if(n)return n;let o=e.parent?this.getRootParent(this.getDisposableData(e.parent),r):e;return r.set(e,o),o}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,r){let n;if(r)n=r;else{let u=new Map,d=[...this.livingDisposables.values()].filter(h=>h.source!==null&&!this.getRootParent(h,u).isSingleton);if(d.length===0)return;let p=new Set(d.map(h=>h.value));if(n=d.filter(h=>!(h.parent&&p.has(h.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(u){function d(h,m){for(;h.length>0&&m.some(g=>typeof g=="string"?g===h[0]:h[0].match(g));)h.shift()}a(d,"removePrefix");let p=u.source.split(` -`).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return d(p,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),p.reverse()}a(o,"getStackTracePath");let s=new NFe;for(let u of n){let d=o(u);for(let p=0;p<=d.length;p++)s.add(d.slice(0,p).join(` -`),u)}n.sort(Zre(u=>u.idx,ene));let c="",l=0;for(let u of n.slice(0,e)){l++;let d=o(u),p=[];for(let h=0;h{this._removeListener(e)}}emit(e){this.listeners.forEach(r=>{r(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Gzi=new rwt;function dre(t){Hzi(t)||Gzi.onUnexpectedError(t)}a(dre,"onUnexpectedError");var nwt="Canceled";function Hzi(t){return t instanceof D1?!0:t instanceof Error&&t.name===nwt&&t.message===nwt}a(Hzi,"isCancellationError");var D1=class extends Error{static{a(this,"CancellationError")}constructor(){super(nwt),this.name=this.message}};var L6e=class t extends Error{static{a(this,"ErrorNoTelemetry")}constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let r=new t;return r.message=e.message,r.stack=e.stack,r}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},La=class t extends Error{static{a(this,"BugIndicatingError")}constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function iwt(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n{let o=Math.sin(n++)*179426549;return o-Math.floor(o)},"rand")}else r=Math.random;for(let n=t.length-1;n>0;n-=1){let o=Math.floor(r()*(n+1)),s=t[n];t[n]=t[o],t[o]=s}}a(swt,"shuffle");var zQr;(l=>{function t(u){return u<0}l.isLessThan=t,a(t,"isLessThan");function e(u){return u<=0}l.isLessThanOrEqual=e,a(e,"isLessThanOrEqual");function r(u){return u>0}l.isGreaterThan=r,a(r,"isGreaterThan");function n(u){return u===0}l.isNeitherLessOrGreaterThan=n,a(n,"isNeitherLessOrGreaterThan"),l.greaterThan=1,l.lessThan=-1,l.neitherLessOrGreaterThan=0})(zQr||={});function fre(t,e){return(r,n)=>e(t(r),t(n))}a(fre,"compareBy");var pre=a((t,e)=>t-e,"numberComparator");var WQr=class t{constructor(e){this.iterate=e}static{a(this,"CallbackIterable")}static{this.empty=new t(e=>{})}forEach(e){this.iterate(r=>(e(r),!0))}toArray(){let e=[];return this.iterate(r=>(e.push(r),!0)),e}filter(e){return new t(r=>this.iterate(n=>e(n)?r(n):!0))}map(e){return new t(r=>this.iterate(n=>r(e(n))))}some(e){let r=!1;return this.iterate(n=>(r=e(n),!r)),r}findFirst(e){let r;return this.iterate(n=>e(n)?(r=n,!1):!0),r}findLast(e){let r;return this.iterate(n=>(e(n)&&(r=n),!0)),r}findLastMaxBy(e){let r,n=!0;return this.iterate(o=>((n||zQr.isGreaterThan(e(o,r)))&&(n=!1,r=o),!0)),r}};function HAe(t,e){return t.reduce((r,n)=>r+e(n),0)}a(HAe,"sumBy");f();f();f();f();function XQr(t,e){let r=Object.create(null);for(let n of t){let o=e(n),s=r[o];s||(s=r[o]=[]),s.push(n)}return r}a(XQr,"groupBy");var KQr,JQr,YQr=class{constructor(e,r){this.toKey=r;this._map=new Map;this[KQr]="SetWithKey";for(let n of e)this.add(n)}static{a(this,"SetWithKey")}get size(){return this._map.size}add(e){let r=this.toKey(e);return this._map.set(r,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,r){this._map.forEach(n=>e.call(r,n,n,this))}[(JQr=Symbol.iterator,KQr=Symbol.toStringTag,JQr)](){return this.values()}};f();function awt(t,e){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,e)try{o=t.apply(r,arguments)}finally{e()}else o=t.apply(r,arguments);return o}}a(awt,"createSingleCallFunction");f();f();var cwt;(b=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}b.is=t,a(t,"is");let e=Object.freeze([]);function r(){return e}b.empty=r,a(r,"empty");function*n(I){yield I}b.single=n,a(n,"single");function o(I){return t(I)?I:n(I)}b.wrap=o,a(o,"wrap");function s(I){return I||e}b.from=s,a(s,"from");function*c(I){for(let x=I.length-1;x>=0;x--)yield I[x]}b.reverse=c,a(c,"reverse");function l(I){return!I||I[Symbol.iterator]().next().done===!0}b.isEmpty=l,a(l,"isEmpty");function u(I){return I[Symbol.iterator]().next().value}b.first=u,a(u,"first");function d(I,x){let w=0;for(let R of I)if(x(R,w++))return!0;return!1}b.some=d,a(d,"some");function p(I,x){for(let w of I)if(x(w))return w}b.find=p,a(p,"find");function*h(I,x){for(let w of I)x(w)&&(yield w)}b.filter=h,a(h,"filter");function*m(I,x){let w=0;for(let R of I)yield x(R,w++)}b.map=m,a(m,"map");function*g(I,x){let w=0;for(let R of I)yield*x(R,w++)}b.flatMap=g,a(g,"flatMap");function*A(...I){for(let x of I)yield*x}b.concat=A,a(A,"concat");function y(I,x,w){let R=w;for(let P of I)R=x(R,P);return R}b.reduce=y,a(y,"reduce");function*E(I,x,w=I.length){for(x<-I.length&&(x=0),x<0&&(x+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);xe.toString(),"defaultToKey")}set(e,r){return this.map.set(this.toKey(e),new lwt(e,r)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,r){typeof r<"u"&&(e=e.bind(r));for(let[n,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(eqr=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},tqr,ZQr=class{constructor(e,r){this[tqr]="ResourceSet";!e||typeof e=="function"?this._map=new F6e(e):(this._map=new F6e(r),e.forEach(this.add,this))}static{a(this,"ResourceSet")}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,r){this._map.forEach((n,o)=>e.call(r,o,o,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(tqr=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};var rqr,uwt=class{constructor(){this[rqr]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}static{a(this,"LinkedMap")}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=0){let n=this._map.get(e);if(n)return r!==0&&this.touch(n,r),n.value}set(e,r,n=0){let o=this._map.get(e);if(o)o.value=r,n!==0&&this.touch(o,n);else{switch(o={key:e,value:r,next:void 0,previous:void 0},n){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,o=this._head;for(;o;){if(r?e.bind(r)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}values(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}entries(){let e=this,r=this._state,n=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return o}[(rqr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._tail,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.previous,n--;this._tail=r,this._size=n,r&&(r.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==1&&r!==2)){if(r===1){if(e===this._head)return;let n=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(n.previous=o,o.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===2){if(e===this._tail)return;let n=e.next,o=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=o,o.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}},dwt=class extends uwt{static{a(this,"Cache")}constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=2){return super.get(e,r)}peek(e){return super.get(e,0)}set(e,r){return super.set(e,r,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},U6e=class extends dwt{static{a(this,"LRUCache")}constructor(e,r=1){super(e,r)}trim(e){this.trimOld(e)}set(e,r){return super.set(e,r),this.checkTrim(),this}};var Q6e=class{constructor(){this.map=new Map}static{a(this,"SetMap")}add(e,r){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(r)}delete(e,r){let n=this.map.get(e);n&&(n.delete(r),n.size===0&&this.map.delete(e))}forEach(e,r){let n=this.map.get(e);n&&n.forEach(r)}get(e){let r=this.map.get(e);return r||new Set}};var $zi=!1,hre=null;var nqr=class t{constructor(){this.livingDisposables=new Map}static{a(this,"DisposableTracker")}static{this.idx=0}getDisposableData(e){let r=this.livingDisposables.get(e);return r||(r={parent:null,source:null,isSingleton:!1,value:e,idx:t.idx++},this.livingDisposables.set(e,r)),r}trackDisposable(e){let r=this.getDisposableData(e);r.source||(r.source=new Error().stack)}setParent(e,r){let n=this.getDisposableData(e);n.parent=r}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,r){let n=r.get(e);if(n)return n;let o=e.parent?this.getRootParent(this.getDisposableData(e.parent),r):e;return r.set(e,o),o}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,r){let n;if(r)n=r;else{let u=new Map,d=[...this.livingDisposables.values()].filter(h=>h.source!==null&&!this.getRootParent(h,u).isSingleton);if(d.length===0)return;let p=new Set(d.map(h=>h.value));if(n=d.filter(h=>!(h.parent&&p.has(h.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(u){function d(h,m){for(;h.length>0&&m.some(g=>typeof g=="string"?g===h[0]:h[0].match(g));)h.shift()}a(d,"removePrefix");let p=u.source.split(` +`).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return d(p,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),p.reverse()}a(o,"getStackTracePath");let s=new Q6e;for(let u of n){let d=o(u);for(let p=0;p<=d.length;p++)s.add(d.slice(0,p).join(` +`),u)}n.sort(fre(u=>u.idx,pre));let c="",l=0;for(let u of n.slice(0,e)){l++;let d=o(u),p=[];for(let h=0;ho(E)[h]),E=>E);delete y[d[h]];for(let[E,_]of Object.entries(y))p.unshift(` - stacktraces of ${_.length} other leaks continue with ${E}`);p.unshift(m)}c+=` +`)),y=XQr([...A].map(E=>o(E)[h]),E=>E);delete y[d[h]];for(let[E,_]of Object.entries(y))p.unshift(` - stacktraces of ${_.length} other leaks continue with ${E}`);p.unshift(m)}c+=` ==================== Leaking disposable ${l}/${n.length}: ${u.value.constructor.name} ==================== @@ -2103,11 +2092,11 @@ ${p.join(` ... and ${n.length-e} more leaking disposables -`),{leaks:n,details:c}}};function $Vi(t){tne=t}a($Vi,"setDisposableTracker");if(jVi){let t="__is_disposable_tracked__";$Vi(new class{trackDisposable(e){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[t]||console.log(r)},3e3)}setParent(e,r){if(e&&e!==V1.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==V1.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}function Wxt(t){return tne?.trackDisposable(t),t}a(Wxt,"trackDisposable");function zxt(t){tne?.markAsDisposed(t)}a(zxt,"markAsDisposed");function Vxt(t,e){tne?.setParent(t,e)}a(Vxt,"setParentOfDisposable");function VVi(t,e){if(tne)for(let r of t)tne.setParent(r,e)}a(VVi,"setParentOfDisposables");function oQr(t){if(Gxt.is(t)){let e=[];for(let r of t)if(r)try{r.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}a(oQr,"dispose");function sQr(...t){let e=DFe(()=>oQr(t));return VVi(t,e),e}a(sQr,"combinedDisposable");function DFe(t){let e=Wxt({dispose:qxt(()=>{zxt(e),t()})});return e}a(DFe,"toDisposable");var F6=class t{constructor(){this._toDispose=new Set;this._isDisposed=!1;Wxt(this)}static{a(this,"DisposableStore")}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(zxt(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{oQr(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Vxt(e,this),this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Vxt(e,null))}},V1=class{constructor(){this._store=new F6;Wxt(this),Vxt(this._store,this)}static{a(this,"Disposable")}static{this.None=Object.freeze({dispose(){}})}dispose(){zxt(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};f();var aQr=class t{static{a(this,"Node")}static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}};f();var WVi=globalThis.performance&&typeof globalThis.performance.now=="function",MFe=class t{static{a(this,"StopWatch")}static create(e){return new t(e)}constructor(e){this._now=WVi&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var cQr=!1,zVi=!1,Wye;(O=>{O.None=a(()=>V1.None,"None");function e(N){if(zVi){let{onDidAddListener:F}=N,U=Vye.create(),L=0;N.onDidAddListener=()=>{++L===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),U.print()),F?.()}}}a(e,"_addLeakageTraceLogic");function r(N,F){return g(N,()=>{},0,void 0,!0,void 0,F)}O.defer=r,a(r,"defer");function n(N){return(F,U=null,L)=>{let H=!1,$;return $=N(W=>{if(!H)return $?$.dispose():H=!0,F.call(U,W)},null,L),H&&$.dispose(),$}}O.once=n,a(n,"once");function o(N,F){return O.once(O.filter(N,F))}O.onceIf=o,a(o,"onceIf");function s(N,F,U){return h((L,H=null,$)=>N(W=>L.call(H,F(W)),null,$),U)}O.map=s,a(s,"map");function c(N,F,U){return h((L,H=null,$)=>N(W=>{F(W),L.call(H,W)},null,$),U)}O.forEach=c,a(c,"forEach");function l(N,F,U){return h((L,H=null,$)=>N(W=>F(W)&&L.call(H,W),null,$),U)}O.filter=l,a(l,"filter");function u(N){return N}O.signal=u,a(u,"signal");function d(...N){return(F,U=null,L)=>{let H=sQr(...N.map($=>$(W=>F.call(U,W))));return m(H,L)}}O.any=d,a(d,"any");function p(N,F,U,L){let H=U;return s(N,$=>(H=F(H,$),H),L)}O.reduce=p,a(p,"reduce");function h(N,F){let U,L={onWillAddFirstListener(){U=N(H.fire,H)},onDidRemoveLastListener(){U?.dispose()}};F||e(L);let H=new W1(L);return F?.add(H),H.event}a(h,"snapshot");function m(N,F){return F instanceof Array?F.push(N):F&&F.add(N),N}a(m,"addAndReturnDisposable");function g(N,F,U=100,L=!1,H=!1,$,W){let j,ce,J,Te=0,fe,De={leakWarningThreshold:$,onWillAddFirstListener(){j=N(Ue=>{Te++,ce=F(ce,Ue),L&&!J&&(Ve.fire(ce),ce=void 0),fe=a(()=>{let Ke=ce;ce=void 0,J=void 0,(!L||Te>1)&&Ve.fire(Ke),Te=0},"doFire"),typeof U=="number"?(clearTimeout(J),J=setTimeout(fe,U)):J===void 0&&(J=0,queueMicrotask(fe))})},onWillRemoveListener(){H&&Te>0&&fe?.()},onDidRemoveLastListener(){fe=void 0,j.dispose()}};W||e(De);let Ve=new W1(De);return W?.add(Ve),Ve.event}O.debounce=g,a(g,"debounce");function A(N,F=0,U){return O.debounce(N,(L,H)=>L?(L.push(H),L):[H],F,void 0,!0,void 0,U)}O.accumulate=A,a(A,"accumulate");function y(N,F=(L,H)=>L===H,U){let L=!0,H;return l(N,$=>{let W=L||!F($,H);return L=!1,H=$,W},U)}O.latch=y,a(y,"latch");function E(N,F,U){return[O.filter(N,F,U),O.filter(N,L=>!F(L),U)]}O.split=E,a(E,"split");function _(N,F=!1,U=[],L){let H=U.slice(),$=N(ce=>{H?H.push(ce):j.fire(ce)});L&&L.add($);let W=a(()=>{H?.forEach(ce=>j.fire(ce)),H=null},"flush"),j=new W1({onWillAddFirstListener(){$||($=N(ce=>j.fire(ce)),L&&L.add($))},onDidAddFirstListener(){H&&(F?setTimeout(W):W())},onDidRemoveLastListener(){$&&$.dispose(),$=null}});return L&&L.add(j),j.event}O.buffer=_,a(_,"buffer");function v(N,F){return a((L,H,$)=>{let W=F(new I);return N(function(j){let ce=W.evaluate(j);ce!==b&&L.call(H,ce)},void 0,$)},"fn")}O.chain=v,a(v,"chain");let b=Symbol("HaltChainable");class I{constructor(){this.steps=[]}static{a(this,"ChainableSynthesis")}map(F){return this.steps.push(F),this}forEach(F){return this.steps.push(U=>(F(U),U)),this}filter(F){return this.steps.push(U=>F(U)?U:b),this}reduce(F,U){let L=U;return this.steps.push(H=>(L=F(L,H),L)),this}latch(F=(U,L)=>U===L){let U=!0,L;return this.steps.push(H=>{let $=U||!F(H,L);return U=!1,L=H,$?H:b}),this}evaluate(F){for(let U of this.steps)if(F=U(F),F===b)break;return F}}function x(N,F,U=L=>L){let L=a((...j)=>W.fire(U(...j)),"fn"),H=a(()=>N.on(F,L),"onFirstListenerAdd"),$=a(()=>N.removeListener(F,L),"onLastListenerRemove"),W=new W1({onWillAddFirstListener:H,onDidRemoveLastListener:$});return W.event}O.fromNodeEventEmitter=x,a(x,"fromNodeEventEmitter");function R(N,F,U=L=>L){let L=a((...j)=>W.fire(U(...j)),"fn"),H=a(()=>N.addEventListener(F,L),"onFirstListenerAdd"),$=a(()=>N.removeEventListener(F,L),"onLastListenerRemove"),W=new W1({onWillAddFirstListener:H,onDidRemoveLastListener:$});return W.event}O.fromDOMEventEmitter=R,a(R,"fromDOMEventEmitter");function w(N,F){return new Promise(U=>n(N)(U,null,F))}O.toPromise=w,a(w,"toPromise");function P(N){let F=new W1;return N.then(U=>{F.fire(U)},()=>{F.fire(void 0)}).finally(()=>{F.dispose()}),F.event}O.fromPromise=P,a(P,"fromPromise");function k(N,F){return N(U=>F.fire(U))}O.forward=k,a(k,"forward");function Q(N,F,U){return F(U),N(L=>F(L))}O.runAndSubscribe=Q,a(Q,"runAndSubscribe");class M{constructor(F,U){this._observable=F;this._counter=0;this._hasChanged=!1;let L={onWillAddFirstListener:a(()=>{F.addObserver(this),this._observable.reportChanges()},"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>{F.removeObserver(this)},"onDidRemoveLastListener")};U||e(L),this.emitter=new W1(L),U&&U.add(this.emitter)}static{a(this,"EmitterObserver")}beginUpdate(F){this._counter++}handlePossibleChange(F){}handleChange(F,U){this._hasChanged=!0}endUpdate(F){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(N,F){return new M(N,F).emitter.event}O.fromObservable=D,a(D,"fromObservable");function G(N){return(F,U,L)=>{let H=0,$=!1,W={beginUpdate(){H++},endUpdate(){H--,H===0&&(N.reportChanges(),$&&($=!1,F.call(U)))},handlePossibleChange(){},handleChange(){$=!0}};N.addObserver(W),N.reportChanges();let j={dispose(){N.removeObserver(W)}};return L instanceof F6?L.add(j):Array.isArray(L)&&L.push(j),j}}O.fromObservableLight=G,a(G,"fromObservableLight")})(Wye||={});var Yxt=class t{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${t._idPool++}`,t.all.add(this)}static{a(this,"EventProfiling")}static{this.all=new Set}static{this._idPool=0}start(e){this._stopWatch=new MFe,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},lQr=-1;var Kxt=class t{constructor(e,r,n=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=r;this.name=n;this._warnCountdown=0}static{a(this,"LeakageMonitor")}static{this._idPool=1}dispose(){this._stacks?.clear()}check(e,r){let n=this.threshold;if(n<=0||r{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,r=0;for(let[n,o]of this._stacks)(!e||r{e[t]||console.log(r)},3e3)}setParent(e,r){if(e&&e!==N1.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==N1.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}function pwt(t){return hre?.trackDisposable(t),t}a(pwt,"trackDisposable");function hwt(t){hre?.markAsDisposed(t)}a(hwt,"markAsDisposed");function fwt(t,e){hre?.setParent(t,e)}a(fwt,"setParentOfDisposable");function Wzi(t,e){if(hre)for(let r of t)hre.setParent(r,e)}a(Wzi,"setParentOfDisposables");function iqr(t){if(cwt.is(t)){let e=[];for(let r of t)if(r)try{r.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}a(iqr,"dispose");function oqr(...t){let e=q6e(()=>iqr(t));return Wzi(t,e),e}a(oqr,"combinedDisposable");function q6e(t){let e=pwt({dispose:awt(()=>{hwt(e),t()})});return e}a(q6e,"toDisposable");var d6=class t{constructor(){this._toDispose=new Set;this._isDisposed=!1;pwt(this)}static{a(this,"DisposableStore")}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(hwt(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{iqr(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return fwt(e,this),this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),fwt(e,null))}},N1=class{constructor(){this._store=new d6;pwt(this),fwt(this._store,this)}static{a(this,"Disposable")}static{this.None=Object.freeze({dispose(){}})}dispose(){hwt(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};f();var sqr=class t{static{a(this,"Node")}static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}};f();var zzi=globalThis.performance&&typeof globalThis.performance.now=="function",G6e=class t{static{a(this,"StopWatch")}static create(e){return new t(e)}constructor(e){this._now=zzi&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var aqr=!1,Yzi=!1,$Ae;(O=>{O.None=a(()=>N1.None,"None");function e(D){if(Yzi){let{onDidAddListener:F}=D,U=jAe.create(),L=0;D.onDidAddListener=()=>{++L===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),U.print()),F?.()}}}a(e,"_addLeakageTraceLogic");function r(D,F){return g(D,()=>{},0,void 0,!0,void 0,F)}O.defer=r,a(r,"defer");function n(D){return(F,U=null,L)=>{let H=!1,$;return $=D(W=>{if(!H)return $?$.dispose():H=!0,F.call(U,W)},null,L),H&&$.dispose(),$}}O.once=n,a(n,"once");function o(D,F){return O.once(O.filter(D,F))}O.onceIf=o,a(o,"onceIf");function s(D,F,U){return h((L,H=null,$)=>D(W=>L.call(H,F(W)),null,$),U)}O.map=s,a(s,"map");function c(D,F,U){return h((L,H=null,$)=>D(W=>{F(W),L.call(H,W)},null,$),U)}O.forEach=c,a(c,"forEach");function l(D,F,U){return h((L,H=null,$)=>D(W=>F(W)&&L.call(H,W),null,$),U)}O.filter=l,a(l,"filter");function u(D){return D}O.signal=u,a(u,"signal");function d(...D){return(F,U=null,L)=>{let H=oqr(...D.map($=>$(W=>F.call(U,W))));return m(H,L)}}O.any=d,a(d,"any");function p(D,F,U,L){let H=U;return s(D,$=>(H=F(H,$),H),L)}O.reduce=p,a(p,"reduce");function h(D,F){let U,L={onWillAddFirstListener(){U=D(H.fire,H)},onDidRemoveLastListener(){U?.dispose()}};F||e(L);let H=new M1(L);return F?.add(H),H.event}a(h,"snapshot");function m(D,F){return F instanceof Array?F.push(D):F&&F.add(D),D}a(m,"addAndReturnDisposable");function g(D,F,U=100,L=!1,H=!1,$,W){let j,ce,J,Te=0,fe,Ne={leakWarningThreshold:$,onWillAddFirstListener(){j=D(Ue=>{Te++,ce=F(ce,Ue),L&&!J&&(Ve.fire(ce),ce=void 0),fe=a(()=>{let Ke=ce;ce=void 0,J=void 0,(!L||Te>1)&&Ve.fire(Ke),Te=0},"doFire"),typeof U=="number"?(clearTimeout(J),J=setTimeout(fe,U)):J===void 0&&(J=0,queueMicrotask(fe))})},onWillRemoveListener(){H&&Te>0&&fe?.()},onDidRemoveLastListener(){fe=void 0,j.dispose()}};W||e(Ne);let Ve=new M1(Ne);return W?.add(Ve),Ve.event}O.debounce=g,a(g,"debounce");function A(D,F=0,U){return O.debounce(D,(L,H)=>L?(L.push(H),L):[H],F,void 0,!0,void 0,U)}O.accumulate=A,a(A,"accumulate");function y(D,F=(L,H)=>L===H,U){let L=!0,H;return l(D,$=>{let W=L||!F($,H);return L=!1,H=$,W},U)}O.latch=y,a(y,"latch");function E(D,F,U){return[O.filter(D,F,U),O.filter(D,L=>!F(L),U)]}O.split=E,a(E,"split");function _(D,F=!1,U=[],L){let H=U.slice(),$=D(ce=>{H?H.push(ce):j.fire(ce)});L&&L.add($);let W=a(()=>{H?.forEach(ce=>j.fire(ce)),H=null},"flush"),j=new M1({onWillAddFirstListener(){$||($=D(ce=>j.fire(ce)),L&&L.add($))},onDidAddFirstListener(){H&&(F?setTimeout(W):W())},onDidRemoveLastListener(){$&&$.dispose(),$=null}});return L&&L.add(j),j.event}O.buffer=_,a(_,"buffer");function v(D,F){return a((L,H,$)=>{let W=F(new I);return D(function(j){let ce=W.evaluate(j);ce!==b&&L.call(H,ce)},void 0,$)},"fn")}O.chain=v,a(v,"chain");let b=Symbol("HaltChainable");class I{constructor(){this.steps=[]}static{a(this,"ChainableSynthesis")}map(F){return this.steps.push(F),this}forEach(F){return this.steps.push(U=>(F(U),U)),this}filter(F){return this.steps.push(U=>F(U)?U:b),this}reduce(F,U){let L=U;return this.steps.push(H=>(L=F(L,H),L)),this}latch(F=(U,L)=>U===L){let U=!0,L;return this.steps.push(H=>{let $=U||!F(H,L);return U=!1,L=H,$?H:b}),this}evaluate(F){for(let U of this.steps)if(F=U(F),F===b)break;return F}}function x(D,F,U=L=>L){let L=a((...j)=>W.fire(U(...j)),"fn"),H=a(()=>D.on(F,L),"onFirstListenerAdd"),$=a(()=>D.removeListener(F,L),"onLastListenerRemove"),W=new M1({onWillAddFirstListener:H,onDidRemoveLastListener:$});return W.event}O.fromNodeEventEmitter=x,a(x,"fromNodeEventEmitter");function w(D,F,U=L=>L){let L=a((...j)=>W.fire(U(...j)),"fn"),H=a(()=>D.addEventListener(F,L),"onFirstListenerAdd"),$=a(()=>D.removeEventListener(F,L),"onLastListenerRemove"),W=new M1({onWillAddFirstListener:H,onDidRemoveLastListener:$});return W.event}O.fromDOMEventEmitter=w,a(w,"fromDOMEventEmitter");function R(D,F){return new Promise(U=>n(D)(U,null,F))}O.toPromise=R,a(R,"toPromise");function P(D){let F=new M1;return D.then(U=>{F.fire(U)},()=>{F.fire(void 0)}).finally(()=>{F.dispose()}),F.event}O.fromPromise=P,a(P,"fromPromise");function k(D,F){return D(U=>F.fire(U))}O.forward=k,a(k,"forward");function Q(D,F,U){return F(U),D(L=>F(L))}O.runAndSubscribe=Q,a(Q,"runAndSubscribe");class M{constructor(F,U){this._observable=F;this._counter=0;this._hasChanged=!1;let L={onWillAddFirstListener:a(()=>{F.addObserver(this),this._observable.reportChanges()},"onWillAddFirstListener"),onDidRemoveLastListener:a(()=>{F.removeObserver(this)},"onDidRemoveLastListener")};U||e(L),this.emitter=new M1(L),U&&U.add(this.emitter)}static{a(this,"EmitterObserver")}beginUpdate(F){this._counter++}handlePossibleChange(F){}handleChange(F,U){this._hasChanged=!0}endUpdate(F){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function N(D,F){return new M(D,F).emitter.event}O.fromObservable=N,a(N,"fromObservable");function G(D){return(F,U,L)=>{let H=0,$=!1,W={beginUpdate(){H++},endUpdate(){H--,H===0&&(D.reportChanges(),$&&($=!1,F.call(U)))},handlePossibleChange(){},handleChange(){$=!0}};D.addObserver(W),D.reportChanges();let j={dispose(){D.removeObserver(W)}};return L instanceof d6?L.add(j):Array.isArray(L)&&L.push(j),j}}O.fromObservableLight=G,a(G,"fromObservableLight")})($Ae||={});var mwt=class t{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${t._idPool++}`,t.all.add(this)}static{a(this,"EventProfiling")}static{this.all=new Set}static{this._idPool=0}start(e){this._stopWatch=new G6e,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},cqr=-1;var gwt=class t{constructor(e,r,n=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=r;this.name=n;this._warnCountdown=0}static{a(this,"LeakageMonitor")}static{this._idPool=1}dispose(){this._stacks?.clear()}check(e,r){let n=this.threshold;if(n<=0||r{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,r=0;for(let[n,o]of this._stacks)(!e||r{if(t instanceof rne)e(t);else for(let r=0;r0||this._options?.leakWarningThreshold?new Kxt(e?.onListenerError??Xre,this._options?.leakWarningThreshold??lQr):void 0,this._perfMon=this._options?._profName?new Yxt(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}static{a(this,"Emitter")}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(cQr){let e=this._listeners;queueMicrotask(()=>{JVi(e,r=>r.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,r,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let d=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],p=new Xxt(`${u}. HINT: Stack shows most frequent listener (${d[1]}-times)`,d[0]);return(this._options?.onListenerError||Xre)(p),V1.None}if(this._disposed)return V1.None;r&&(e=e.bind(r));let o=new rne(e),s,c;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=Vye.create(),s=this._leakageMon.check(o.stack,this._size+1)),cQr&&(o.stack=c??Vye.create()),this._listeners?this._listeners instanceof rne?(this._deliveryQueue??=new Zxt,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let l=DFe(()=>{s?.(),this._removeListener(o)});return n instanceof F6?n.add(l):Array.isArray(n)&&n.push(l),l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let r=this._listeners,n=r.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*KVi<=r.length){let s=0;for(let c=0;c0}};var Zxt=class{constructor(){this.i=-1;this.end=0}static{a(this,"EventDeliveryQueuePrivate")}enqueue(e,r,n){this.i=0,this.end=n,this.current=e,this.value=r}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};var uQr=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),XVi;(n=>{function t(o){return o===n.None||o===n.Cancelled||o instanceof ewt?!0:!o||typeof o!="object"?!1:typeof o.isCancellationRequested=="boolean"&&typeof o.onCancellationRequested=="function"}n.isCancellationToken=t,a(t,"isCancellationToken"),n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Wye.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:uQr})})(XVi||={});var ewt=class{constructor(){this._isCancelled=!1;this._emitter=null}static{a(this,"MutableToken")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?uQr:(this._emitter||(this._emitter=new W1),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};f();var U6=class{constructor(e){this.executor=e;this._didRun=!1}static{a(this,"Lazy")}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};f();function BFe(t){return!!t&&typeof t.then=="function"}a(BFe,"isThenable");var OFe=class{constructor(e,r){this._isDisposed=!1;this._token=-1,typeof e=="function"&&typeof r=="number"&&this.setIfNotSet(e,r)}static{a(this,"TimeoutTimer")}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,r){if(this._isDisposed)throw new Ga("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},r)}setIfNotSet(e,r){if(this._isDisposed)throw new Ga("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},r))}};var eWi;(r=>{async function t(n){let o,s=await Promise.all(n.map(c=>c.then(l=>l,l=>{o||(o=l)})));if(typeof o<"u")throw o;return s}r.settled=t,a(t,"settled");function e(n){return new Promise(async(o,s)=>{try{await n(o,s)}catch(c){s(c)}})}r.withAsyncBody=e,a(e,"withAsyncBody")})(eWi||={});var dQr=class t{static{a(this,"AsyncIterableObject")}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}constructor(e,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new W1,queueMicrotask(async()=>{let n={emitOne:a(o=>this.emitOne(o),"emitOne"),emitMany:a(o=>this.emitMany(o),"emitMany"),reject:a(o=>this.reject(o),"reject")};try{await Promise.resolve(e(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:a(async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0}),"return")}}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}map(e){return t.map(this,e)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static async toPromise(e){let r=[];for await(let n of e)r.push(n);return r}toPromise(){return t.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};f();f();f();f();f();var LFe=!1,FFe=!1,zye=!1,tWi=!1,rWi=!1,fQr=!1,nWi=!1,iWi=!1,oWi=!1,sWi=!1;var eO,tO=globalThis,PT;typeof tO.vscode<"u"&&typeof tO.vscode.process<"u"?PT=tO.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(PT=process);var pQr=typeof PT?.versions?.electron=="string",aWi=pQr&&PT?.type==="renderer";typeof PT=="object"?(LFe=PT.platform==="win32",FFe=PT.platform==="darwin",zye=PT.platform==="linux",tWi=zye&&!!PT.env.SNAP&&!!PT.env.SNAP_REVISION,nWi=pQr,oWi=!!PT.env.CI||!!PT.env.BUILD_ARTIFACTSTAGINGDIRECTORY,rWi=!0):typeof navigator=="object"&&!aWi?(eO=navigator.userAgent,LFe=eO.indexOf("Windows")>=0,FFe=eO.indexOf("Macintosh")>=0,iWi=(eO.indexOf("Macintosh")>=0||eO.indexOf("iPad")>=0||eO.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,zye=eO.indexOf("Linux")>=0,sWi=eO?.indexOf("Mobi")>=0,fQr=!0):console.error("Unable to resolve platform.");var twt=0;FFe?twt=1:LFe?twt=3:zye&&(twt=2);var rwt=LFe,hQr=FFe,mQr=zye;var cWi=fQr&&typeof tO.importScripts=="function",XEl=cWi?tO.origin:void 0;var KP=eO;var lWi=typeof tO.postMessage=="function"&&!tO.importScripts,ZEl=(()=>{if(lWi){let t=[];tO.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),tO.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();var uWi=!!(KP&&KP.indexOf("Chrome")>=0),eCl=!!(KP&&KP.indexOf("Firefox")>=0),tCl=!!(!uWi&&KP&&KP.indexOf("Safari")>=0),rCl=!!(KP&&KP.indexOf("Edg/")>=0),nCl=!!(KP&&KP.indexOf("Android")>=0);var Mj,nwt=globalThis.vscode;if(typeof nwt<"u"&&typeof nwt.process<"u"){let t=nwt.process;Mj={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Mj={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Mj={get platform(){return rwt?"win32":hQr?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var Yye=Mj.cwd,gQr=Mj.env,AQr=Mj.platform,lCl=Mj.arch;var fWi=65,pWi=97,hWi=90,mWi=122,G6=46,ah=47,JE=92,Q6=58,gWi=63,UFe=class extends Error{static{a(this,"ErrorInvalidArgType")}constructor(e,r,n){let o;typeof r=="string"&&r.indexOf("not ")===0?(o="must not be",r=r.replace(/^not /,"")):o="must be";let s=e.indexOf(".")!==-1?"property":"argument",c=`The "${e}" ${s} ${o} of type ${r}`;c+=`. Received type ${typeof n}`,super(c),this.code="ERR_INVALID_ARG_TYPE"}};function AWi(t,e){if(t===null||typeof t!="object")throw new UFe(e,"Object",t)}a(AWi,"validateObject");function Md(t,e){if(typeof t!="string")throw new UFe(e,"string",t)}a(Md,"validateString");var XE=AQr==="win32";function vo(t){return t===ah||t===JE}a(vo,"isPathSeparator");function iwt(t){return t===ah}a(iwt,"isPosixPathSeparator");function q6(t){return t>=fWi&&t<=hWi||t>=pWi&&t<=mWi}a(q6,"isWindowsDeviceRoot");function QFe(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===G6&&l!==-1?++l:l=-1}return o}a(QFe,"normalizeString");function yWi(t){return t?`${t[0]==="."?"":"."}${t}`:""}a(yWi,"formatExt");function yQr(t,e){AWi(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${yWi(e.ext)}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(yQr,"_format");var p0={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],Md(s,`paths[${o}]`),s.length===0)continue}else e.length===0?s=Yye():(s=gQr[`=${e}`]||Yye(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===JE)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)vo(p)&&(l=1,d=!0);else if(vo(p))if(d=!0,vo(s.charCodeAt(1))){let h=2,m=h;for(;h2&&vo(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=QFe(r,!n,"\\",vo),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){Md(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return iwt(s)?"\\":t;if(vo(s))if(o=!0,vo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&vo(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&vo(t.charCodeAt(e-1))&&(c+="\\"),n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){Md(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return vo(r)||e>2&&q6(r)&&t.charCodeAt(1)===Q6&&vo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&vo(r.charCodeAt(0))){++o;let s=r.length;s>1&&vo(r.charCodeAt(1))&&(++o,s>2&&(vo(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return p0.normalize(e)},relative(t,e){if(Md(t,"from"),Md(e,"to"),t===e)return"";let r=p0.resolve(t),n=p0.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";let o=0;for(;oo&&t.charCodeAt(s-1)===JE;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===JE;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===JE)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===JE?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===JE)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===JE&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=p0.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===JE){if(e.charCodeAt(1)===JE){let r=e.charCodeAt(2);if(r!==gWi&&r!==G6)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(q6(e.charCodeAt(0))&&e.charCodeAt(1)===Q6&&e.charCodeAt(2)===JE)return`\\\\?\\${e}`;return t},dirname(t){Md(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return vo(o)?t:".";if(vo(o)){if(r=n=1,vo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&vo(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(vo(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&Md(e,"suffix"),Md(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&q6(t.charCodeAt(0))&&t.charCodeAt(1)===Q6&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(vo(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(vo(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Md(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===Q6&&q6(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(vo(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===G6?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:yQr.bind(null,"\\"),parse(t){Md(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return vo(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(vo(o)){if(n=1,vo(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),vo(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===G6?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},EWi=(()=>{if(XE){let t=/\\/g;return()=>{let e=Yye().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Yye()})(),nd={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){let o=n>=0?t[n]:EWi();Md(o,`paths[${n}]`),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===ah)}return e=QFe(e,!r,"/",iwt),r?`/${e}`:e.length>0?e:"."},normalize(t){if(Md(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ah,r=t.charCodeAt(t.length-1)===ah;return t=QFe(t,!e,"/",iwt),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Md(t,"path"),t.length>0&&t.charCodeAt(0)===ah},join(...t){if(t.length===0)return".";let e;for(let r=0;r0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":nd.normalize(e)},relative(t,e){if(Md(t,"from"),Md(e,"to"),t===e||(t=nd.resolve(t),e=nd.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===ah)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===ah?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===ah)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(Md(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===ah,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===ah){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&Md(e,"ext"),Md(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===ah){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ah){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Md(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t.charCodeAt(c);if(l===ah){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l===G6?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:yQr.bind(null,"/"),parse(t){Md(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===ah,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===ah){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===G6?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};nd.win32=p0.win32=p0;nd.posix=p0.posix=nd;var CWi=XE?p0.normalize:nd.normalize,_Wi=XE?p0.isAbsolute:nd.isAbsolute,qFe=XE?p0.join:nd.join,dCl=XE?p0.resolve:nd.resolve,fCl=XE?p0.relative:nd.relative,pCl=XE?p0.dirname:nd.dirname,EQr=XE?p0.basename:nd.basename,CQr=XE?p0.extname:nd.extname,hCl=XE?p0.format:nd.format,mCl=XE?p0.parse:nd.parse,gCl=XE?p0.toNamespacedPath:nd.toNamespacedPath,Oj=XE?p0.sep:nd.sep,ACl=XE?p0.delimiter:nd.delimiter;f();f();function bWi(t){return t}a(bWi,"identity");var GFe=class{constructor(e,r){this.lastCache=void 0;this.lastArgKey=void 0;typeof e=="function"?(this._fn=e,this._computeKey=bWi):(this._fn=r,this._computeKey=e.getCacheKey)}static{a(this,"LRUCachedFunction")}get(e){let r=this._computeKey(e);return this.lastArgKey!==r&&(this.lastArgKey=r,this.lastCache=this._fn(e)),this.lastCache}};f();function owt(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}a(owt,"escapeRegExpCharacters");function SQr(t,e){if(!t||!e)return t;let r=e.length;if(r===0||t.length===0)return t;let n=0;for(;t.indexOf(e,n)===n;)n=n+r;return t.substring(n)}a(SQr,"ltrim");function HFe(t){return t.split(/\r\n|\r|\n/)}a(HFe,"splitLines");function swt(t,e){return te?1:0}a(swt,"compare");function jFe(t,e,r=0,n=t.length,o=0,s=e.length){for(;rd)return 1}let c=n-r,l=s-o;return cl?1:0}a(jFe,"compareSubstring");function awt(t,e){return Jye(t,e,0,t.length,0,e.length)}a(awt,"compareIgnoreCase");function Jye(t,e,r=0,n=t.length,o=0,s=e.length){for(;r=128||d>=128)return jFe(t.toLowerCase(),e.toLowerCase(),r,n,o,s);_Qr(u)&&(u-=32),_Qr(d)&&(d-=32);let p=u-d;if(p!==0)return p}let c=n-r,l=s-o;return cl?1:0}a(Jye,"compareSubstringIgnoreCase");function _Qr(t){return t>=97&&t<=122}a(_Qr,"isLowerAsciiLetter");function IQr(t,e){let r=e.length;return e.length>t.length?!1:Jye(t,e,0,r)===0}a(IQr,"startsWithIgnoreCase");function nne(t,e){let r=Math.min(t.length,e.length),n;for(n=0;n0&&t.charCodeAt(0)===65279)}a(TWi,"startsWithUTF8BOM");function xQr(t){return TWi(t)?t.substr(1):t}a(xQr,"stripUTF8BOM");var vQr=class t{static{a(this,"GraphemeBreakTree")}static{this._INSTANCE=null}static getInstance(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE}constructor(){this._data=SWi()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let r=this._data,n=r.length/3,o=1;for(;o<=n;)if(er[3*o+1])o=2*o+1;else return r[3*o+2];return 0}};function SWi(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}a(SWi,"getGraphemeBreakRawData");var bQr=class t{constructor(e){this.confusableDictionary=e}static{a(this,"AmbiguousCharacters")}static{this.ambiguousCharacterData=new U6(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new GFe({getCacheKey:JSON.stringify},e=>{function r(p){let h=new Map;for(let m=0;m!p.startsWith("_")&&p in s);c.length===0&&(c=["_default"]);let l;for(let p of c){let h=r(s[p]);l=o(l,h)}let u=r(s._common),d=n(u,l);return new t(d)})}static getInstance(e){return t.cache.get(Array.from(e))}static{this._locales=new U6(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}isAmbiguous(e){return this.confusableDictionary.has(e)}containsAmbiguousCharacter(e){for(let r=0;rt.length)return!1;if(r){if(!IQr(t,e))return!1;if(e.length===t.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,t.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),t.indexOf(e)===0}a(wQr,"isEqualOrParent");var $Fe="**",RQr="/",VFe="[/\\\\]",WFe="[^/\\\\]",IWi=/\//g;function PQr(t,e){switch(t){case 0:return"";case 1:return`${WFe}*?`;default:return`(?:${VFe}|${WFe}+${VFe}${e?`|${VFe}${WFe}+`:""})*?`}}a(PQr,"starsToRegExp");function eEe(t,e){if(!t)return[];let r=[],n=!1,o=!1,s="";for(let c of t){switch(c){case e:if(!n&&!o){r.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=c}return s&&r.push(s),r}a(eEe,"splitGlobAware");function MQr(t){if(!t)return"";let e="",r=eEe(t,RQr);if(r.every(n=>n===$Fe))e=".*";else{let n=!1;r.forEach((o,s)=>{if(o===$Fe){if(n)return;e+=PQr(2,s===r.length-1)}else{let c=!1,l="",u=!1,d="";for(let p of o){if(p!=="}"&&c){l+=p;continue}if(u&&(p!=="]"||!d)){let h;p==="-"?h=p:(p==="^"||p==="!")&&!d?h="^":p===RQr?h="":h=owt(p),d+=h;continue}switch(p){case"{":c=!0;continue;case"[":u=!0;continue;case"}":{let m=`(?:${eEe(l,",").map(g=>MQr(g)).join("|")})`;e+=m,c=!1,l="";break}case"]":{e+="["+d+"]",u=!1,d="";break}case"?":e+=WFe;continue;case"*":e+=PQr(1);continue;default:e+=owt(p)}}sdwt(l,e)).filter(l=>l!==qx),t),n=r.length;if(!n)return qx;if(n===1)return r[0];let o=a(function(l,u){for(let d=0,p=r.length;d!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(OWi,"trivia3");function DQr(t,e,r){let n=Oj===nd.sep,o=n?t:t.replace(IWi,Oj),s=Oj+o,c=nd.sep+t,l;return r?l=a(function(u,d){return typeof u=="string"&&(u===o||u.endsWith(s)||!n&&(u===t||u.endsWith(c)))?e:null},"parsedPattern"):l=a(function(u,d){return typeof u=="string"&&(u===o||!n&&u===t)?e:null},"parsedPattern"),l.allPaths=[(r?"*/":"./")+t],l}a(DQr,"trivia4and5");function BWi(t){try{let e=new RegExp(`^${MQr(t)}$`);return function(r){return e.lastIndex=0,typeof r=="string"&&e.test(r)?t:null}}catch{return qx}}a(BWi,"toRegExp");function BQr(t,e,r){return!t||typeof e!="string"?!1:fwt(t)(e,void 0,r)}a(BQr,"match");function fwt(t,e={}){if(!t)return uwt;if(typeof t=="string"||LWi(t)){let r=dwt(t,e);if(r===qx)return uwt;let n=a(function(o,s){return!!r(o,s)},"resultPattern");return r.allBasenames&&(n.allBasenames=r.allBasenames),r.allPaths&&(n.allPaths=r.allPaths),n}return FWi(t,e)}a(fwt,"parse");function LWi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(LWi,"isRelativePattern");function FWi(t,e){let r=LQr(Object.getOwnPropertyNames(t).map(l=>UWi(l,t[l],e)).filter(l=>l!==qx)),n=r.length;if(!n)return qx;if(!r.some(l=>!!l.requiresSiblings)){if(n===1)return r[0];let l=a(function(p,h){let m;for(let g=0,A=r.length;g{for(let g of m){let A=await g;if(typeof A=="string")return A}return null})():null},"resultExpression"),u=r.find(p=>!!p.allBasenames);u&&(l.allBasenames=u.allBasenames);let d=r.reduce((p,h)=>h.allPaths?p.concat(h.allPaths):p,[]);return d.length&&(l.allPaths=d),l}let o=a(function(l,u,d){let p,h;for(let m=0,g=r.length;m{for(let m of h){let g=await m;if(typeof g=="string")return g}return null})():null},"resultExpression"),s=r.find(l=>!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(FWi,"parsedExpression");function UWi(t,e,r){if(e===!1)return qx;let n=dwt(t,r);if(n===qx)return qx;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let s=a((c,l,u,d)=>{if(!d||!n(c,l))return null;let p=o.replace("$(basename)",()=>u),h=d(p);return BFe(h)?h.then(m=>m?t:null):h?t:null},"result");return s.requiresSiblings=!0,s}}return n}a(UWi,"parseExpressionPattern");function LQr(t,e){let r=t.filter(l=>!!l.basenames);if(r.length<2)return t;let n=r.reduce((l,u)=>{let d=u.basenames;return d?l.concat(d):l},[]),o;if(e){o=[];for(let l=0,u=n.length;l{let d=u.patterns;return d?l.concat(d):l},[]);let s=a(function(l,u){if(typeof l!="string")return null;if(!u){let p;for(p=l.length;p>0;p--){let h=l.charCodeAt(p-1);if(h===47||h===92)break}u=l.substr(p)}let d=n.indexOf(u);return d!==-1?o[d]:null},"aggregate");s.basenames=n,s.patterns=o,s.allBasenames=n;let c=t.filter(l=>!l.basenames);return c.push(s),c}a(LQr,"aggregateBasenameMatches");function pwt(t){if(!t||t.trim()==="")return{pattern:t,isValid:!1,error:"Pattern cannot be empty"};let e=t.trim();return QWi(e)?{pattern:e,isValid:!0}:{pattern:e,isValid:!1,error:"Invalid glob pattern"}}a(pwt,"validate");function hwt(t,e){let r=eEe(e,","),n=a(o=>{if(o=o.trim(),o.length!==0){if(o==="**"||o==="**/*"||o==="*")return{pattern:o};!o.startsWith("/")&&!o.startsWith("**/")&&(o="**/"+o);for(let s of t)if(BQr(o,s))return{pattern:o,file:s}}},"patternMatches");for(let o of r){let s=n(o);if(s)return s}}a(hwt,"matches");function QWi(t){try{let e=eEe(t,",");if(e.length===0)return!1;for(let r of e){let n=fwt(r);if(OQr(n))return!1}return!0}catch{return!1}}a(QWi,"isValidGlob");f();function qWi(t,e){return!(t.length===0||t.length===1&&t[0]===e)}a(qWi,"isLocationCustomized");function FQr(t,e){return qWi(t,e)}a(FQr,"isInstructionLocationCustomized");f();f();function GQr(t,e=[],r={}){let n=t.length===0?[]:t.split(/\r\n|\n/);return new gwt(n,e,r).parse()}a(GQr,"parse");function tEe(t,e){return{line:t,character:e}}a(tEe,"createPosition");function kT(t,e,r){return{type:"string",value:t,start:e,end:r}}a(kT,"createStringNode");function GWi(t,e,r){return{type:"number",value:t,start:e,end:r}}a(GWi,"createNumberNode");function UQr(t,e,r){return{type:"boolean",value:t,start:e,end:r}}a(UQr,"createBooleanNode");function HWi(t,e){return{type:"null",value:null,start:t,end:e}}a(HWi,"createNullNode");function QQr(t,e,r){return{type:"object",start:e,end:r,properties:t}}a(QQr,"createObjectNode");function qQr(t,e,r){return{type:"array",start:e,end:r,items:t}}a(qQr,"createArrayNode");function HQr(t){return t===" "||t===" "}a(HQr,"isWhitespace");function jWi(t){return/^-?\d*\.?\d+$/.test(t)}a(jWi,"isValidNumber");var mwt=class{constructor(e){this.currentLine=0;this.currentChar=0;this.lines=e}static{a(this,"YamlLexer")}getCurrentPosition(){return tEe(this.currentLine,this.currentChar)}getCurrentLineNumber(){return this.currentLine}getCurrentCharNumber(){return this.currentChar}getCurrentLineText(){return this.currentLine=this.lines.length}getCurrentChar(){return this.isAtEnd()||this.currentChar>=this.lines[this.currentLine].length?"":this.lines[this.currentLine][this.currentChar]}peek(e=1){let r=this.currentChar+e;return this.currentLine>=this.lines.length||r>=this.lines[this.currentLine].length?"":this.lines[this.currentLine][r]}advance(){let e=this.getCurrentChar();return this.currentChar>=this.lines[this.currentLine].length&&this.currentLine0&&!e.startsWith("#")){this.skipWhitespace();return}}if(this.currentLine++,this.currentChar=0,this.currentLine0&&!e.startsWith("#")){this.skipWhitespace();return}}}}},gwt=class{constructor(e,r,n){this.flowLevel=0;this.lexer=new mwt(e),this.errors=r,this.options=n}static{a(this,"YamlParser")}addError(e,r,n,o){this.errors.push({message:e,code:r,start:n,end:o})}parseValue(e){if(this.lexer.skipWhitespace(),this.lexer.isAtEnd()){let n=this.lexer.getCurrentPosition();return kT("",n,n)}let r=this.lexer.getCurrentChar();return r==='"'||r==="'"?this.parseQuotedString(r):r==="["?this.parseInlineArray():r==="{"?this.parseInlineObject():this.parseUnquotedValue()}parseQuotedString(e){let r=this.lexer.getCurrentPosition();this.lexer.advance();let n="";for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==e;)n+=this.lexer.advance();this.lexer.getCurrentChar()===e&&this.lexer.advance();let o=this.lexer.getCurrentPosition();return kT(n,r,o)}parseUnquotedValue(){let e=this.lexer.getCurrentPosition(),r="",n=e,o=a(d=>d==="#"||this.flowLevel>0&&(d===","||d==="]"||d==="}"),"isTerminator"),s=this.lexer.getCurrentChar();if(s==='"'||s==="'")for(r+=this.lexer.advance(),n=this.lexer.getCurrentPosition();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="";){let d=this.lexer.getCurrentChar();if(d===s||o(d))break;r+=this.lexer.advance(),n=this.lexer.getCurrentPosition()}else for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="";){let d=this.lexer.getCurrentChar();if(o(d))break;r+=this.lexer.advance(),n=this.lexer.getCurrentPosition()}let c=r.trimEnd(),l=r.length-c.length;l&&(n=tEe(e.line,n.character-l));let u=s==='"'||s==="'"?c.substring(1):c;return this.createValueNode(u,e,n)}createValueNode(e,r,n){if(e==="")return kT("",r,r);if(e==="true")return UQr(!0,r,n);if(e==="false")return UQr(!1,r,n);if(e==="null"||e==="~")return HWi(r,n);let o=Number(e);return!isNaN(o)&&isFinite(o)&&jWi(e)?GWi(o,r,n):kT(e,r,n)}parseInlineArray(){let e=this.lexer.getCurrentPosition();this.lexer.advance(),this.flowLevel++;let r=[];for(;!this.lexer.isAtEnd();){if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="]"){this.lexer.advance();break}if(this.lexer.getCurrentChar()===""){this.lexer.advanceLine();continue}if(this.lexer.getCurrentChar()==="#"){this.lexer.skipToEndOfLine(),this.lexer.advanceLine();continue}let o=this.lexer.savePosition(),s=this.parseValue();s.type==="string"&&s.value===""&&s.start.line===s.end.line&&s.start.character===s.end.character||r.push(s);let c=this.lexer.savePosition();if(o.line===c.line&&o.char===c.char)if(!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="")this.lexer.advance();else break;this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===","&&this.lexer.advance()}let n=this.lexer.getCurrentPosition();return this.flowLevel--,qQr(r,e,n)}parseInlineObject(){let e=this.lexer.getCurrentPosition();this.lexer.advance(),this.flowLevel++;let r=[];for(;!this.lexer.isAtEnd();){if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="}"){this.lexer.advance();break}if(this.lexer.getCurrentChar()==="#"){this.lexer.skipToEndOfLine(),this.lexer.advanceLine();continue}let o=this.lexer.savePosition(),s=this.lexer.getCurrentPosition(),c="";if(this.lexer.getCurrentChar()==='"'||this.lexer.getCurrentChar()==="'"){let h=this.lexer.getCurrentChar();for(this.lexer.advance();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==h;)c+=this.lexer.advance();this.lexer.getCurrentChar()===h&&this.lexer.advance()}else for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==":";)c+=this.lexer.advance();c=c.trim();let l=this.lexer.getCurrentPosition(),u=kT(c,s,l);this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===":"&&this.lexer.advance(),this.lexer.skipWhitespace();let d=this.parseValue();r.push({key:u,value:d});let p=this.lexer.savePosition();if(o.line===p.line&&o.char===p.char)if(!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="")this.lexer.advance();else break;this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===","&&this.lexer.advance()}let n=this.lexer.getCurrentPosition();return this.flowLevel--,QQr(r,e,n)}parseBlockArray(e){let r=this.lexer.getCurrentPosition(),n=[];for(;!this.lexer.isAtEnd()&&(this.lexer.moveToNextNonEmptyLine(),!this.lexer.isAtEnd());){let s=this.lexer.getIndentation();if(ss)if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"){let u=this.parseBlockArray(l);n.push(u)}else{let u=this.lexer.getCurrentLineText(),d=this.lexer.getCurrentCharNumber(),p=u.substring(d);if(p.includes(":")&&!p.trim().startsWith("#")){let h=this.parseBlockObject(l,this.lexer.getCurrentCharNumber());n.push(h)}else n.push(kT("",c,c))}else n.push(kT("",c,c))}else{let l=this.lexer.getCurrentLineText(),u=this.lexer.getCurrentCharNumber();if(l.substring(u).includes(":")){let h=this.parseBlockObject(c.character,c.character);n.push(h)}else{let h=this.parseValue();for(n.push(h);!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!=="#";)this.lexer.advance();this.lexer.advanceLine()}}}else break}let o=r;return n.length>0?o=n[n.length-1].end:o=tEe(r.line,r.character+1),qQr(n,r,o)}parseBlockObject(e,r){let n=this.lexer.getCurrentPosition(),o=[],s=new Set,c=r!==void 0,l=!0;for(;!this.lexer.isAtEnd()&&((!l||!c)&&this.lexer.moveToNextNonEmptyLine(),l=!1,!this.lexer.isAtEnd());){let d=this.lexer.getIndentation();if(c){if(this.lexer.skipWhitespace(),this.lexer.getCurrentCharNumber()e){let E=tEe(this.lexer.getCurrentLineNumber(),0),_=tEe(this.lexer.getCurrentLineNumber(),this.lexer.getCurrentLineText().length);this.addError("Unexpected indentation","indentation",E,_),this.lexer.skipWhitespace()}else this.lexer.skipWhitespace()}let p=this.lexer.getCurrentPosition(),h="";for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==":";)h+=this.lexer.advance();h=h.trim();let m=this.lexer.getCurrentPosition(),g=kT(h,p,m);!this.options.allowDuplicateKeys&&s.has(h)&&this.addError(`Duplicate key '${h}'`,"duplicateKey",p,m),s.add(h),this.lexer.getCurrentChar()===":"&&this.lexer.advance(),this.lexer.skipWhitespace();let A,y=this.lexer.getCurrentPosition();if(this.lexer.getCurrentChar()===""||this.lexer.getCurrentChar()==="#")if(this.lexer.advanceLine(),this.lexer.isAtEnd())A=kT("",y,y);else{let E=this.lexer.getIndentation();if(E>d)if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-")A=this.parseBlockArray(E);else{let _=this.lexer.getCurrentLineText(),v=this.lexer.getCurrentCharNumber(),b=_.substring(v);b.includes(":")&&!b.trim().startsWith("#")?A=this.parseBlockObject(E):A=this.parseValue()}else!c&&E===d?(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"?A=this.parseBlockArray(d):A=kT("",y,y)):A=kT("",y,y)}else{for(A=this.parseValue();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!=="#"&&HQr(this.lexer.getCurrentChar());)this.lexer.advance();this.lexer.getCurrentChar()==="#"&&this.lexer.skipToEndOfLine(),!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()===""&&this.lexer.advanceLine()}o.push({key:g,value:A})}let u=n;return o.length>0&&(u=o[o.length-1].value.end),QQr(o,n,u)}parse(){if(!this.lexer.isAtEnd()&&(this.lexer.moveToNextNonEmptyLine(),!this.lexer.isAtEnd()))if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"){let e=this.lexer.peek();return e===" "||e===" "||e===""||e==="#"?this.parseBlockArray(0):this.parseValue()}else{if(this.lexer.getCurrentChar()==="[")return this.parseInlineArray();if(this.lexer.getCurrentChar()==="{")return this.parseInlineObject();{let e=this.lexer.getCurrentLineText(),r=this.lexer.getCurrentCharNumber(),n=e.substring(r),o=!1,s=!1,c="";for(let l=0;lp>0&&d.match(/^---[\s\r\n]*$/));l===-1?(l=n.length,c=n.length):c=l+1;let u=new Gx.Range(2,1,l+1,1);o=new Ewt(u,n)}if(c({message:c.message,range:this.asRange(c),code:c.code}));if(n)if(n.type!=="object")s.push({message:"Invalid header, expecting pairs",range:this.range,code:"INVALID_YAML"});else for(let c of n.properties)o.push({key:c.key.value,range:this.asRange({start:c.key.start,end:c.value.end}),value:this.asValue(c.value)});this._parsed={node:n,attributes:o,errors:s}}return this._parsed}asRange({start:e,end:r}){return new Gx.Range(this.range.startLineNumber+e.line,e.character+1,this.range.startLineNumber+r.line,r.character+1)}asValue(e){switch(e.type){case"string":return{type:"string",value:e.value,range:this.asRange(e)};case"number":return{type:"number",value:e.value,range:this.asRange(e)};case"boolean":return{type:"boolean",value:e.value,range:this.asRange(e)};case"null":return{type:"null",value:e.value,range:this.asRange(e)};case"array":return{type:"array",items:e.items.map(r=>this.asValue(r)),range:this.asRange(e)};case"object":return{type:"object",properties:e.properties.map(n=>({key:this.asValue(n.key),value:this.asValue(n.value)})),range:this.asRange(e)}}}get attributes(){return this._parsedHeader.attributes}getAttribute(e){return this._parsedHeader.attributes.find(r=>r.key===e)}get errors(){return this._parsedHeader.errors}getStringAttribute(e){let r=this._parsedHeader.attributes.find(n=>n.key===e);if(r?.value.type==="string")return r.value.value}get name(){return this.getStringAttribute("name")}get description(){return this.getStringAttribute("description")}get agent(){return this.getStringAttribute("agent")??this.getStringAttribute("mode")}get model(){return this.getStringAttribute("model")}get applyTo(){return this.getStringAttribute("applyTo")}get invokePolicy(){let e=this._parsedHeader.attributes.find(r=>r.key===VWi);if(e?.value.type==="array"){let r=[];for(let n of e.value.items)n.type==="string"&&n.value&&r.push(n.value);return r}}get tools(){let e=this._parsedHeader.attributes.find(r=>r.key==="tools");if(e){if(e.value.type==="array"){let r=[];for(let n of e.value.items)n.type==="string"&&n.value&&r.push(n.value);return r}else if(e.value.type==="object"){let r=[],n=a(({key:o,value:s})=>{s.type==="boolean"?r.push(o.value):s.type==="object"&&s.properties.forEach(n)},"collectLeafs");return e.value.properties.forEach(n),r}}}get handOffs(){let e=this._parsedHeader.attributes.find(r=>r.key==="handoffs");if(e&&e.value.type==="array"){let r=[];for(let n of e.value.items)if(n.type==="object"){let o,s,c,l;for(let u of n.properties)u.key.value==="agent"&&u.value.type==="string"?o=u.value.value:u.key.value==="label"&&u.value.type==="string"?s=u.value.value:u.key.value==="prompt"&&u.value.type==="string"?c=u.value.value:u.key.value==="send"&&u.value.type==="boolean"&&(l=u.value.value);o&&s&&c!==void 0&&r.push({agent:o,label:s,prompt:c,send:l})}return r}}},Cwt=class{constructor(e,r,n){this.range=e;this.linesWithEOL=r;this.uri=n}static{a(this,"PromptBody")}get fileReferences(){return this.getParsedBody().fileReferences}get variableReferences(){return this.getParsedBody().variableReferences}get offset(){return this.getParsedBody().bodyOffset}getParsedBody(){if(this._parsed===void 0){let e=[],r=[],n=[],o=this.linesWithEOL.slice(0,this.range.startLineNumber-1).reduce((s,c)=>c.length+s,0);for(let s=this.range.startLineNumber-1,c=o;sGx.Range.areIntersectingOrTouching(A,m)))continue;let g=h[1];if(g){if(g==="file:"){let A=h.index+h[0].length-h[2].length,y=h.index+h[0].length,E=new Gx.Range(s+1,A+1,s+1,y+1);r.push({content:h[2],range:E,isMarkdownLink:!1})}}else{let A=h.index+1,y=h.index+h[0].length,E=new Gx.Range(s+1,A+1,s+1,y+1);n.push({name:h[2],range:E,offset:c+h.index})}}c+=l.length}this._parsed={fileReferences:r.sort((s,c)=>Gx.Range.compareRangesUsingStarts(s.range,c.range)),variableReferences:n,bodyOffset:o}}return this._parsed}get content(){return this._content===void 0&&(this._content=this.linesWithEOL.slice(this.range.startLineNumber-1,this.range.endLineNumber-1).join("").trim()),this._content}};f();var WWi=".prompt.md",zWi=".instructions.md",YWi=".agent.md",KWi="SKILL.md";function $Qr(t){if(t.endsWith(WWi))return"prompt";if(t.endsWith(zWi))return"instructions";if(t.endsWith(YWi))return"agent";if(t.endsWith(KWi))return"skill"}a($Qr,"getPromptFileType");f();f();f();var rEe={isBlocked:!1,reason:"VALID_FILE"},JFe={isBlocked:!1,reason:"NO_MATCHING_POLICY"},VQr={isBlocked:!0,reason:"POLICY_ERROR",message:"Copilot is disabled because we could not fetch the repository policy"},Lj={all:"all",repo:"repo"},j6=new Se("contentExclusion");f();f();var XFe=class{static{a(this,"PolicyEvaluator")}};f();f();f();var WQr=new Se("repository"),Fj=class t{constructor(){this.data={}}static{a(this,"GitConfigData")}getKeys(){return Object.keys(this.data)}getEntries(){return Object.entries(this.data)}get(e){let r=this.getAll(e);return r?r[r.length-1]:void 0}getAll(e){return this.data[this.normalizeKey(e)]}add(e,r){e in this.data||(this.data[e]=[]),this.data[e].push(r)}getSectionValues(e,r){let n=`${e}.`.toLowerCase(),o=`.${r}`.toLowerCase();return Object.keys(this.data).filter(s=>s.startsWith(n)&&s.endsWith(o)).map(s=>s.slice(n.length,-o.length))}concat(e){return this.getEntries().concat(e.getEntries()).reduce((r,[n,o])=>(o.forEach(s=>r.add(n,s)),r),new t)}normalizeKey(e){let r=e.split(".");return r[0]=r[0].toLowerCase(),r[r.length-1]=r[r.length-1].toLowerCase(),r.join(".")}},Hx=class{static{a(this,"GitConfigLoader")}},ZFe=class extends Hx{constructor(r){super();this.loaders=r}static{a(this,"GitFallbackConfigLoader")}async getConfig(r,n){for(let o of this.loaders){let s=await o.getConfig(r,n);if(s)return s}}};f();var zQr=require("os");var e9e=class{constructor(e){this.url=e;this.isUrl()?this.parseUrl():this.tryParseSSHString()||(this._scheme="file")}static{a(this,"GitRemoteUrl")}get scheme(){return this._scheme}get authority(){return this._authority}get hostname(){return this._hostname}get path(){return this._path}isInvalid(){return this._error!==void 0}isRemote(){return this.scheme!=="file"&&this.hostname!==void 0}isGitHub(){return this.isRemote()&&/(?:^|\.)(?:github\.com|ghe\.com)$/i.test(this.hostname??"")}isADO(){return this.isRemote()&&/(?:^|\.)(?:visualstudio\.com|azure\.com)$/i.test(this.hostname??"")}getUrlForApi(){if(!this.isRemote())return null;if(this.isUrl()&&!this.isInvalid())return aL.from({scheme:this.scheme,authority:this.authority.replace(/^[^@]+@/,""),path:this.path}).toString();if(this.scheme=="ssh"&&this.isADO()){let e=this.url.indexOf(":");return this.url.substring(0,e+1)+this.path}return this.url}isUrl(){return/[A-Za-z0-9][A-Za-z0-9]+:\/\//.test(this.url)}parseUrl(){let e;try{e=aL.parse(this.url)}catch(r){this._error=r;return}this._scheme=e.scheme,this.setAuthority(e.authority),this.setPath(e.path)}setAuthority(e){this._authority=e;let r=e.replace(/^[^@]+@/,"").replace(/:\d*$/,"");r&&(this._hostname=r)}tryParseSSHString(){let e=/^(?[^:/\\[]*(?:\[[^/\\\]]*\])?):/.exec(this.url);if(e&&((0,zQr.platform)()!=="win32"||(e.groups?.host?.length??0)>1)){let r=e.groups?.host??"";return this._scheme="ssh",this.setAuthority(r),this.setPath(this.url.substring(r.length+1)),!0}return!1}setPath(e){if(this.isADO())try{this._path=decodeURIComponent(e);return}catch{}this._path=e}};var t9e=class{static{a(this,"GitRemoteResolver")}async resolveRemote(e,r){let n=await e.get(Hx).getConfig(e,r);if(!n)return;let o=this.getRemotes(n),s=o.filter(c=>c.url.isGitHub());if(s.length)return s.find(c=>c.name==="origin")?.url??s[0].url;if(o.length)return o.find(c=>c.name==="origin")?.url??o[0].url}getRemotes(e){let r=this.getInsteadOfRules(e);return e.getSectionValues("remote","url").map(n=>({name:n,url:new e9e(this.applyInsteadOfRules(r,e.get(`remote.${n}.url`)??""))})).filter(n=>n.url.isRemote())}applyInsteadOfRules(e,r){for(let n of e)if(r.startsWith(n.insteadOf))return n.base+r.slice(n.insteadOf.length);return r}getInsteadOfRules(e){return e.getSectionValues("url","insteadof").map(r=>({base:r,insteadOf:e.get(`url.${r}.insteadof`)})).sort((r,n)=>n.base.length-r.base.length)}};var JWi=100,_wt=class{constructor(e,r){this.baseFolder=e;this.remote=r;this.setNWO()}static{a(this,"GitRepository")}get tenant(){return this._tenant}get owner(){return this._owner}get name(){return this._name}get adoOrganization(){return this._adoOrganization}isGitHub(){return this.remote?.isGitHub()??!1}isADO(){return this.remote?.isADO()??!1}setNWO(){let e=this.remote?.path?.replace(/^\//,"").split("/");if(this.isGitHub()){this._owner=e?.[0],this._name=e?.[1]?.replace(/\.git$/,"");let r=/^(?[^.]+)\.ghe\.com$/.exec(this.remote?.hostname??"");r&&(this._tenant=r.groups?.tenant)}else if(this.isADO()&&e?.length===4){if(this.remote?.scheme==="ssh"){this._adoOrganization=e?.[1],this._owner=e?.[2],this._name=e?.[3];return}let r=/(?:(?[^.]+)\.)?visualstudio\.com$/.exec(this.remote?.hostname??"");r?(this._adoOrganization=r.groups?.org,this._owner=e?.[1],this._name=e?.[3]):(this._adoOrganization=e?.[0],this._owner=e?.[1],this._name=e?.[3])}}},Em=class t{constructor(e){this.ctx=e;this.remoteResolver=new t9e;this.cache=new $r(JWi)}static{a(this,"RepositoryManager")}async getRepo({uri:e}){let r,n=[];do{if(this.cache.has(e.toString())){let s=this.cache.get(e);return this.updateCache(n,s),s}n.push(e.toString());let o=await this.tryGetRepoForFolder(e);if(o)return this.updateCache(n,o),o;r=e,e=Wu(e)}while(e!==r);this.updateCache(n,void 0)}updateCache(e,r){e.forEach(n=>this.cache.set(n,r))}async tryGetRepoForFolder(e){return await this.isBaseRepoFolder(e)?new _wt(typeof e=="string"?{uri:e}:e,await this.repoUrl(e)):void 0}async isBaseRepoFolder(e){return await t.getRepoConfigLocation(this.ctx,e)!==void 0}async repoUrl(e){return await this.remoteResolver.resolveRemote(this.ctx,e)}static async getRepoConfigLocation(e,r){try{let n=e.get(Xn),o=Ti(r,".git");if((await n.stat(o)).type&1)return await this.getConfigLocationForGitfile(n,r,o);let c=Ti(o,"config");return await n.stat(c),c}catch{return}}static async getConfigLocationForGitfile(e,r,n){let s=(await e.readFileString(n)).match(/^gitdir:\s+(.+)$/m);if(!s)return;let c=Oq(r,s[1]),l=Ti(c,"config");if(await this.tryStat(e,l)!==void 0)return l;let u=Ti(c,"config.worktree");if(await this.tryStat(e,u)!==void 0)return u;let d=Ti(c,"commondir");c=Oq(c,(await e.readFileString(d)).trimEnd());let p=Ti(c,"config");return await e.stat(p),p}static async tryStat(e,r){try{return await e.stat(r)}catch{return}}};f();var Uj=a((t,e)=>{if(GP.Check(t,e))return e;let r=`Typebox schema validation failed: -${[...GP.Errors(t,e)].map(n=>`${n.path} ${n.message}`).join(` -`)}`;throw new Error(r)},"assertShape");f();f();f();var r9e=new WeakMap;function n9e(t,e){if(t==null||typeof t!="object")return String(t);let r,n="",o=0,s=Object.prototype.toString.call(t);if(s!=="[object RegExp]"&&s!=="[object Date]"&&r9e.has(t))return r9e.get(t);switch(r9e.set(t,"~"+ ++e),s){case"[object Set]":r=Array.from(t);case"[object Array]":for(r||(r=t),n+="a";oe.delete(n))),o}a(XWi,"n");function JQr(t,e){return function(r,n){return XWi(t,e,r,n)}}a(JQr,"o");f();var Eqr=de(uqr(),1);f();var iEe=a(t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");f();f();var szi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},oEe=a(t=>t.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),azi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),dqr=a(t=>t.join(""),"rangesToString"),fqr=a((t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,c=!1,l=!1,u=!1,d=!1,p=r,h="";e:for(;sh?n.push(oEe(h)+"-"+oEe(y)):y===h&&n.push(oEe(y)),h="",s++;continue}if(t.startsWith("-]",s+1)){n.push(oEe(y+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=y,s+=2;continue}n.push(oEe(y)),s++}if(pe?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var eC,czi=new Set(["!","?","+","*","@"]),Swt=a(t=>czi.has(t),"isExtglobType"),pqr=a(t=>Swt(t.type),"isExtglobAST"),lzi=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),uzi=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),dzi=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),hqr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),fzi="(?!(?:^|/)\\.\\.?(?:$|/))",o9e="(?!\\.)",pzi=new Set(["[","."]),hzi=new Set(["..","."]),mzi=new Set("().*{}+?[]^$\\!"),gzi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Iwt="[^/]",mqr=Iwt+"*?",gqr=Iwt+"+?",Qj=class{static{a(this,"AST")}type;#e;#t;#n=!1;#r=[];#i;#o;#a;#s=!1;#c;#l;#u=!1;constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#a=this.#e===this?[]:this.#e.#a,e==="!"&&!this.#e.#s&&this.#a.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#l=this.#r.map(e=>String(e)).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#i;for(;n;){for(let o=r.#o+1;!n.type&&otypeof r=="string"?r:r.toJSON()):[this.type,...this.#r.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let r=0;r{let[A,y,E,_]=typeof g=="string"?eC.#I(g,this.#t,u):g.toRegExpSource(e);return this.#t=this.#t||E,this.#n=this.#n||_,A}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&hzi.has(this.#r[0]))){let A=pzi,y=r&&A.has(d.charAt(0))||d.startsWith("\\.")&&A.has(d.charAt(2))||d.startsWith("\\.\\.")&&A.has(d.charAt(4)),E=!r&&!e&&A.has(d.charAt(0));p=y?fzi:E?o9e:""}let h="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(h="(?:$|\\/)"),[p+d+h,$6(d),this.#t=!!this.#t,this.#n]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#y(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),d=this;return d.#r=[u],d.type=null,d.#t=void 0,[u,$6(this.toString()),!1,!1]}let c=!n||e||r||!o9e?"":this.#y(!0);c===s&&(c=""),c&&(s=`(?:${s})(?:${c})*?`);let l="";if(this.type==="!"&&this.#u)l=(this.isStart()&&!r?o9e:"")+gqr;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?o9e:"")+mqr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;l=o+s+u}return[l,$6(s),this.#t=!!this.#t,this.#n]}#y(e){return this.#r.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,c]=r.toRegExpSource(e);return this.#n=this.#n||c,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#I(e,r,n=!1){let o=!1,s="",c=!1,l=!1;for(let u=0;ue?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var id=a((t,e,r={})=>(iEe(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ine(e,r).match(t)),"minimatch"),Azi=/^\*+([^+@!?\*\[\(]*)$/,yzi=a(t=>e=>!e.startsWith(".")&&e.endsWith(t),"starDotExtTest"),Ezi=a(t=>e=>e.endsWith(t),"starDotExtTestDot"),Czi=a(t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),"starDotExtTestNocase"),_zi=a(t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),"starDotExtTestNocaseDot"),vzi=/^\*+\.\*+$/,bzi=a(t=>!t.startsWith(".")&&t.includes("."),"starDotStarTest"),Tzi=a(t=>t!=="."&&t!==".."&&t.includes("."),"starDotStarTestDot"),Szi=/^\.\*+$/,Izi=a(t=>t!=="."&&t!==".."&&t.startsWith("."),"dotStarTest"),xzi=/^\*+$/,wzi=a(t=>t.length!==0&&!t.startsWith("."),"starTest"),Rzi=a(t=>t.length!==0&&t!=="."&&t!=="..","starTestDot"),Pzi=/^\?+([^+@!?\*\[\(]*)?$/,kzi=a(([t,e=""])=>{let r=Cqr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocase"),Nzi=a(([t,e=""])=>{let r=_qr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocaseDot"),Dzi=a(([t,e=""])=>{let r=_qr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTestDot"),Mzi=a(([t,e=""])=>{let r=Cqr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTest"),Cqr=a(([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},"qmarksTestNoExt"),_qr=a(([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),vqr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Aqr={win32:{sep:"\\"},posix:{sep:"/"}},Ozi=vqr==="win32"?Aqr.win32.sep:Aqr.posix.sep;id.sep=Ozi;var Ug=Symbol("globstar **");id.GLOBSTAR=Ug;var Bzi="[^/]",Lzi=Bzi+"*?",Fzi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Uzi="(?:(?!(?:\\/|^)\\.).)*?",Qzi=a((t,e={})=>r=>id(r,t,e),"filter");id.filter=Qzi;var NT=a((t,e={})=>Object.assign({},t,e),"ext"),qzi=a(t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return id;let e=id;return Object.assign(a((n,o,s={})=>e(n,o,NT(t,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(o,s={}){super(o,NT(t,s))}static defaults(o){return e.defaults(NT(t,o)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(o,s,c={}){super(o,s,NT(t,c))}static fromGlob(o,s={}){return e.AST.fromGlob(o,NT(t,s))}},unescape:a((n,o={})=>e.unescape(n,NT(t,o)),"unescape"),escape:a((n,o={})=>e.escape(n,NT(t,o)),"escape"),filter:a((n,o={})=>e.filter(n,NT(t,o)),"filter"),defaults:a(n=>e.defaults(NT(t,n)),"defaults"),makeRe:a((n,o={})=>e.makeRe(n,NT(t,o)),"makeRe"),braceExpand:a((n,o={})=>e.braceExpand(n,NT(t,o)),"braceExpand"),match:a((n,o,s={})=>e.match(n,o,NT(t,s)),"match"),sep:e.sep,GLOBSTAR:Ug})},"defaults");id.defaults=qzi;var bqr=a((t,e={})=>(iEe(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Eqr.default)(t)),"braceExpand");id.braceExpand=bqr;var Gzi=a((t,e={})=>new ine(t,e).makeRe(),"makeRe");id.makeRe=Gzi;var Hzi=a((t,e,r={})=>{let n=new ine(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t},"match");id.match=Hzi;var yqr=/[?*]|[+@!]\(.*?\)|\[|\]/,jzi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),ine=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){iEe(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||vqr,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!yqr.test(s[2]))&&!yqr.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(p=>this.parse(p))];if(d)return[s[0],...s.slice(1).map(p=>this.parse(p))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;oo&&n.splice(o+1,c-o);let l=n[o+1],u=n[o+2],d=n[o+3];if(l!==".."||!u||u==="."||u===".."||!d||d==="."||d==="..")continue;r=!0,n.splice(o,1);let p=n.slice(0);p[o]="**",e.push(p),o--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,n=!1){let o=0,s=0,c=[],l="";for(;o=2&&(e=this.levelTwoFileOptimize(e)),r.includes(Ug)?this.#e(e,r,n,o,s):this.#n(e,r,n,o,s)}#e(e,r,n,o,s){let c=r.indexOf(Ug,s),l=r.lastIndexOf(Ug),[u,d,p]=n?[r.slice(s,c),r.slice(c+1),[]]:[r.slice(s,c),r.slice(c+1,l),r.slice(l+1)];if(u.length){let v=e.slice(o,o+u.length);if(!this.#n(v,u,n,0,0))return!1;o+=u.length}let h=0;if(p.length){if(p.length+o>e.length)return!1;let v=e.length-p.length;if(this.#n(e,p,n,v,0))h=p.length;else{if(e[e.length-1]!==""||o+p.length===e.length||(v--,!this.#n(e,p,n,v,0)))return!1;h=p.length+1}}if(!d.length){let v=!!h;for(let b=o;b{let d=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))o.add(h);return typeof p=="string"?jzi(p):p===Ug?Ug:p._src});return d.forEach((p,h)=>{let m=d[h+1],g=d[h-1];p!==Ug||g===Ug||(g===void 0?m!==void 0&&m!==Ug?d[h+1]="(?:\\/|"+n+"\\/)?"+m:d[h]=n:m===void 0?d[h-1]=g+"(?:\\/|"+n+")?":m!==Ug&&(d[h-1]=g+"(?:\\/|\\/"+n+"\\/)"+m,d[h+1]=Ug))}),d.filter(p=>p!==Ug).join("/")}).join("|"),[c,l]=e.length>1?["(?:",")"]:["",""];s="^"+c+s+l+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let c=o[o.length-1];if(!c)for(let l=o.length-2;!c&&l>=0;l--)c=o[l];for(let l=0;l`,{result:s,baseUri:r,fileName:l,matchingPattern:c}),this.#t.set(o,s),s}evaluateTextBasedRules(e,r,n){let o=r.filter(l=>l.ifAnyMatch),s=r.filter(l=>l.ifNoneMatch);if(!n||o.length===0&&s.length===0)return rEe;let c=this.evaluateFileContent(o,s,n);return j6.debug(this.#e,`Evaluated text-based exclusion rules for <${e}>`,{result:c}),c}evaluateFileContent(e,r,n){for(let o of e)if(o.ifAnyMatch&&o.ifAnyMatch.length>0&&o.ifAnyMatch.map(c=>Tqr(c)).some(c=>c.test(n)))return Rwt(o,"FILE_BLOCKED_TEXT_BASED");for(let o of r)if(o.ifNoneMatch&&o.ifNoneMatch.length>0&&!o.ifNoneMatch.map(c=>Tqr(c)).some(c=>c.test(n)))return Rwt(o,"FILE_BLOCKED_TEXT_BASED");return rEe}async refresh(){try{let e=[...this.#n.keys()];this.reset(),await Promise.all(e.map(r=>this.#o(r)))}catch(e){qo(this.#e,e,`${wwt}.refresh`)}}reset(){this.#n.clear(),this.#t.clear()}async#r(e){if(this.#i?.length)return this.#i;let r=await this.#o(e.toLowerCase());if(r.length!==0)return r}#i;setTestingRules(e){this.#i=e}#o=JQr(async e=>{let r=await this.#e.get(Ot).getGitHubSession();if(!r)throw new no("No token found");let n=r.devOverride?.contentRestrictionsUrl??"copilot_internal/content_exclusion",o=new URL(n,r.apiUrl),s=e.includes(Lj.all);e.filter(d=>d!==Lj.all).length>0&&o.searchParams.set("repos",e.filter(d=>d!==Lj.all).join(",")),o.searchParams.set("scope",s?Lj.all:Lj.repo);let l=await mu(this.#e,r,o.href),u=await l.json();if(!l.ok){if(l.status===404)return Array.from(e,()=>[]);throw this.#a("fetch.error",{message:u.message}),new O2(l)}return this.#a("fetch.success"),Uj(zzi,u).map(d=>d.rules)},this.#n);async getGitRepo(e){let n=await this.#e.get(Em).getRepo(Wu(e));if(!n||!n?.remote)return;let o=n.remote.getUrlForApi();if(o)return{baseFolder:n.baseFolder,url:o}}#a(e,r,n){at(this.#e,`${wwt}.${e}`,yt.createAndMarkAsIssued(r,n))}};function Tqr(t){if(!t.startsWith("/")&&!t.endsWith("/"))return new RegExp(t);let e=t.slice(1,t.lastIndexOf("/")),r=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,r)}a(Tqr,"stringToRegex");function Rwt(t,e){return{isBlocked:!0,message:`Your ${t.source.type.toLowerCase()} '${t.source.name}' has disabled Copilot for this file`,reason:e}}a(Rwt,"fileBlockedEvaluationResult");var $zi=S.Object({name:S.String(),type:S.String()}),Vzi=S.Object({paths:S.Array(S.String()),ifNoneMatch:S.Optional(S.Array(S.String())),ifAnyMatch:S.Optional(S.Array(S.String())),source:$zi}),Pwt=S.Array(Vzi),Wzi=S.Object({rules:Pwt,last_updated_at:S.String(),scope:S.String()}),zzi=S.Array(Wzi);f();var zr=class{constructor(e,r=V6){this.ctx=e;this.validateTextDocument=r}static{a(this,"TextDocumentManager")}async textDocuments(){let e=this.getTextDocumentsUnsafe(),r=[];for(let n of e)(await this.validateTextDocument(this.ctx,n,n.getText())).status==="valid"&&r.push(n);return r}getTextDocumentUnsafe(e){let r=ha(e.uri);return this.getTextDocumentsUnsafe().find(n=>n.uri===r)}async getTextDocument(e){return this.getTextDocumentWithValidation(e).then(r=>{if(r.status==="valid")return r.document})}async getTextDocumentValidation(e){try{let r=this.getTextDocumentUnsafe(e)?.getText()??await this.readTextDocumentFromDisk(e.uri);return r===void 0?this.notFoundResult(e):this.validateTextDocument(this.ctx,e,r)}catch{return this.notFoundResult(e)}}async getTextDocumentWithValidation(e){let r=this.getTextDocumentUnsafe(e);if(!r)return this.notFoundResult(e);let n=await this.validateTextDocument(this.ctx,e,r.getText());return n.status==="valid"?{status:"valid",document:r}:n}notFoundResult({uri:e}){return{status:"notfound",message:`Document for URI could not be found: ${e}`}}async readTextDocumentFromDisk(e){try{if((await this.ctx.get(Xn).stat(e)).size>5*1024*1024)return}catch{return}return await this.ctx.get(Xn).readFileString(e)}getWorkspaceFolder(e){let r=ha(e.uri);return this.getWorkspaceFolders().find(n=>r.startsWith(ha(n.uri)))}getRelativePath(e){if(e.uri.startsWith("untitled:"))return;let r=ha(e.uri);for(let n of this.getWorkspaceFolders()){let o=ha(n.uri).replace(/[#?].*/,"").replace(/\/?$/,"/");if(r.startsWith(o))return r.slice(o.length)}return ei(r)}};var bc=class{constructor(e){this.ctx=e;this.#e=!1;this.#t=new s9e(this.ctx);this.evaluateResultCache=new Map;this.onDidChangeActiveTextEditor=a(async e=>{if(!this.#e)return;if(!e.document){this.updateStatusIcon(!1);return}let r=await this.ctx.get(zr).getTextDocumentValidation(e.document),n=r.status==="invalid",o=r.status==="invalid"?r.reason:void 0;this.updateStatusIcon(n,o)},"onDidChangeActiveTextEditor");let r=$p(this.ctx,this.onDidChangeActiveTextEditor,"Content exclusions focus change");this.ctx.get(zr).onDidFocusTextDocument(r),ss(this.ctx,n=>{this.#e=n.envelope.copilotignore_enabled??!1,this.evaluateResultCache.clear(),this.#t.refresh()})}static{a(this,"CopilotContentExclusionManager")}#e;#t;get enabled(){return this.#e}async evaluate(e,r,n){if(!this.#e)return{isBlocked:!1};let o=[],s=a(async(u,d)=>{let p=performance.now(),h=await d.evaluate(e,r),m=performance.now();return o.push({key:u,result:h,elapsedMs:Math.round(m-p)}),h},"track"),l=(await Promise.all([s("contentExclusion.evaluate",this.#t)])).find(u=>u?.isBlocked)??{isBlocked:!1};try{for(let u of o)this.#n(u.key,e,u.result,u.elapsedMs)}catch(u){j6.error(this.ctx,"Error tracking telemetry",u)}return n==="UPDATE"&&this.updateStatusIcon(l.isBlocked,l.message),l}updateStatusIcon(e,r){this.#e&&(e?this.ctx.get(Xs).setInactive(r??"Copilot is disabled"):this.ctx.get(Xs).clearInactive())}#n(e,r,n,o){let s=r+e;if(this.evaluateResultCache.get(s)===n.reason)return!1;if(this.evaluateResultCache.set(s,n.reason??"UNKNOWN"),n.reason===JFe.reason)return j6.debug(this.ctx,`[${e}] No matching policy for this repository. uri: ${r}`),!1;let l={isBlocked:n.isBlocked?"true":"false",reason:n.reason??"UNKNOWN"},u={contentExclusionEvalMs:o};return at(this.ctx,e,yt.createAndMarkAsIssued(l,u)),at(this.ctx,e,yt.createAndMarkAsIssued({...l,path:r},u),1),j6.debug(this.ctx,`[${e}] ${r}`,n),!0}setTestingRules(e){this.#t.setTestingRules(e)}set __contentExclusions(e){this.#t=e}get __contentExclusions(){return this.#t}};async function V6(t,e,r){let n=await t.get(bc).evaluate(e.uri,r);return n.isBlocked?{status:"invalid",reason:n.message??"Document is blocked by repository policy"}:{status:"valid"}}a(V6,"isDocumentValid");f();f();f();f();var kwt=a((t,e,r)=>{let n=t instanceof RegExp?Sqr(t,r):t,o=e instanceof RegExp?Sqr(e,r):e,s=n!==null&&o!=null&&Yzi(n,o,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+o.length)}},"balanced"),Sqr=a((t,e)=>{let r=e.match(t);return r?r[0]:null},"maybeMatch"),Yzi=a((t,e,r)=>{let n,o,s,c,l,u=r.indexOf(t),d=r.indexOf(e,u+1),p=u;if(u>=0&&d>0){if(t===e)return[u,d];for(n=[],s=r.length;p>=0&&!l;){if(p===u)n.push(p),u=r.indexOf(t,p+1);else if(n.length===1){let h=n.pop();h!==void 0&&(l=[h,d])}else o=n.pop(),o!==void 0&&o=0?u:d}n.length&&c!==void 0&&(l=[s,c])}return l},"range");var Iqr="\0SLASH"+Math.random()+"\0",xqr="\0OPEN"+Math.random()+"\0",Dwt="\0CLOSE"+Math.random()+"\0",wqr="\0COMMA"+Math.random()+"\0",Rqr="\0PERIOD"+Math.random()+"\0",Kzi=new RegExp(Iqr,"g"),Jzi=new RegExp(xqr,"g"),Xzi=new RegExp(Dwt,"g"),Zzi=new RegExp(wqr,"g"),eYi=new RegExp(Rqr,"g"),tYi=/\\\\/g,rYi=/\\{/g,nYi=/\\}/g,iYi=/\\,/g,oYi=/\\\./g,sYi=1e5;function Nwt(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}a(Nwt,"numeric");function aYi(t){return t.replace(tYi,Iqr).replace(rYi,xqr).replace(nYi,Dwt).replace(iYi,wqr).replace(oYi,Rqr)}a(aYi,"escapeBraces");function cYi(t){return t.replace(Kzi,"\\").replace(Jzi,"{").replace(Xzi,"}").replace(Zzi,",").replace(eYi,".")}a(cYi,"unescapeBraces");function Pqr(t){if(!t)return[""];let e=[],r=kwt("{","}",t);if(!r)return t.split(",");let{pre:n,body:o,post:s}=r,c=n.split(",");c[c.length-1]+="{"+o+"}";let l=Pqr(s);return s.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),e.push.apply(e,c),e}a(Pqr,"parseCommaParts");function kqr(t,e={}){if(!t)return[];let{max:r=sYi}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),sEe(aYi(t),r,!0).map(cYi)}a(kqr,"expand");function lYi(t){return"{"+t+"}"}a(lYi,"embrace");function uYi(t){return/^-?0\d/.test(t)}a(uYi,"isPadded");function dYi(t,e){return t<=e}a(dYi,"lte");function fYi(t,e){return t>=e}a(fYi,"gte");function sEe(t,e,r){let n=[],o=kwt("{","}",t);if(!o)return[t];let s=o.pre,c=o.post.length?sEe(o.post,e,!1):[""];if(/\$$/.test(o.pre))for(let l=0;l=0;if(!d&&!p)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+Dwt+o.post,sEe(t,e,!0)):[t];let h;if(d)h=o.body.split(/\.\./);else if(h=Pqr(o.body),h.length===1&&h[0]!==void 0&&(h=sEe(h[0],e,!1).map(lYi),h.length===1))return c.map(g=>o.pre+h[0]+g);let m;if(d&&h[0]!==void 0&&h[1]!==void 0){let g=Nwt(h[0]),A=Nwt(h[1]),y=Math.max(h[0].length,h[1].length),E=h.length===3&&h[2]!==void 0?Math.max(Math.abs(Nwt(h[2])),1):1,_=dYi;A0){let w=new Array(R+1).join("0");I<0?x="-"+w+x.slice(1):x=w+x}}m.push(x)}}else{m=[];for(let g=0;g{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");f();f();var pYi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},cEe=a(t=>t.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),hYi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Nqr=a(t=>t.join(""),"rangesToString"),Dqr=a((t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,c=!1,l=!1,u=!1,d=!1,p=r,h="";e:for(;sh?n.push(cEe(h)+"-"+cEe(y)):y===h&&n.push(cEe(y)),h="",s++;continue}if(t.startsWith("-]",s+1)){n.push(cEe(y+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=y,s+=2;continue}n.push(cEe(y)),s++}if(pr?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),"unescape");var tC,mYi=new Set(["!","?","+","*","@"]),Mwt=a(t=>mYi.has(t),"isExtglobType"),Mqr=a(t=>Mwt(t.type),"isExtglobAST"),gYi=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),AYi=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),yYi=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Oqr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),EYi="(?!(?:^|/)\\.\\.?(?:$|/))",a9e="(?!\\.)",CYi=new Set(["[","."]),_Yi=new Set(["..","."]),vYi=new Set("().*{}+?[]^$\\!"),bYi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Owt="[^/]",Bqr=Owt+"*?",Lqr=Owt+"+?",TYi=0,qj=class{static{a(this,"AST")}type;#e;#t;#n=!1;#r=[];#i;#o;#a;#s=!1;#c;#l;#u=!1;id=++TYi;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#a=this.#e===this?[]:this.#e.#a,e==="!"&&!this.#e.#s&&this.#a.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#l=this.#r.map(e=>String(e)).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#i;for(;n;){for(let o=r.#o+1;!n.type&&otypeof r=="string"?r:r.toJSON()):[this.type,...this.#r.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let r=0;rtypeof g!="string"),d=this.#r.map(g=>{let[A,y,E,_]=typeof g=="string"?tC.#I(g,this.#t,u):g.toRegExpSource(e);return this.#t=this.#t||E,this.#n=this.#n||_,A}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&_Yi.has(this.#r[0]))){let A=CYi,y=r&&A.has(d.charAt(0))||d.startsWith("\\.")&&A.has(d.charAt(2))||d.startsWith("\\.\\.")&&A.has(d.charAt(4)),E=!r&&!e&&A.has(d.charAt(0));p=y?EYi:E?a9e:""}let h="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(h="(?:$|\\/)"),[p+d+h,$x(d),this.#t=!!this.#t,this.#n]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#y(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),d=this;return d.#r=[u],d.type=null,d.#t=void 0,[u,$x(this.toString()),!1,!1]}let c=!n||e||r||!a9e?"":this.#y(!0);c===s&&(c=""),c&&(s=`(?:${s})(?:${c})*?`);let l="";if(this.type==="!"&&this.#u)l=(this.isStart()&&!r?a9e:"")+Lqr;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?a9e:"")+Bqr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;l=o+s+u}return[l,$x(s),this.#t=!!this.#t,this.#n]}#C(){if(Mqr(this)){let e=0,r=!1;do{r=!0;for(let n=0;n{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,c]=r.toRegExpSource(e);return this.#n=this.#n||c,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#I(e,r,n=!1){let o=!1,s="",c=!1,l=!1;for(let u=0;ur?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var cy=a((t,e,r={})=>(aEe(e),!r.nocomment&&e.charAt(0)==="#"?!1:new z1(e,r).match(t)),"minimatch"),SYi=/^\*+([^+@!?\*\[\(]*)$/,IYi=a(t=>e=>!e.startsWith(".")&&e.endsWith(t),"starDotExtTest"),xYi=a(t=>e=>e.endsWith(t),"starDotExtTestDot"),wYi=a(t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),"starDotExtTestNocase"),RYi=a(t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),"starDotExtTestNocaseDot"),PYi=/^\*+\.\*+$/,kYi=a(t=>!t.startsWith(".")&&t.includes("."),"starDotStarTest"),NYi=a(t=>t!=="."&&t!==".."&&t.includes("."),"starDotStarTestDot"),DYi=/^\.\*+$/,MYi=a(t=>t!=="."&&t!==".."&&t.startsWith("."),"dotStarTest"),OYi=/^\*+$/,BYi=a(t=>t.length!==0&&!t.startsWith("."),"starTest"),LYi=a(t=>t.length!==0&&t!=="."&&t!=="..","starTestDot"),FYi=/^\?+([^+@!?\*\[\(]*)?$/,UYi=a(([t,e=""])=>{let r=Qqr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocase"),QYi=a(([t,e=""])=>{let r=qqr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocaseDot"),qYi=a(([t,e=""])=>{let r=qqr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTestDot"),GYi=a(([t,e=""])=>{let r=Qqr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTest"),Qqr=a(([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},"qmarksTestNoExt"),qqr=a(([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),Gqr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Fqr={win32:{sep:"\\"},posix:{sep:"/"}},HYi=Gqr==="win32"?Fqr.win32.sep:Fqr.posix.sep;cy.sep=HYi;var Cf=Symbol("globstar **");cy.GLOBSTAR=Cf;var jYi="[^/]",$Yi=jYi+"*?",VYi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",WYi="(?:(?!(?:\\/|^)\\.).)*?",zYi=a((t,e={})=>r=>cy(r,t,e),"filter");cy.filter=zYi;var DT=a((t,e={})=>Object.assign({},t,e),"ext"),YYi=a(t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return cy;let e=cy;return Object.assign(a((n,o,s={})=>e(n,o,DT(t,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(o,s={}){super(o,DT(t,s))}static defaults(o){return e.defaults(DT(t,o)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(o,s,c={}){super(o,s,DT(t,c))}static fromGlob(o,s={}){return e.AST.fromGlob(o,DT(t,s))}},unescape:a((n,o={})=>e.unescape(n,DT(t,o)),"unescape"),escape:a((n,o={})=>e.escape(n,DT(t,o)),"escape"),filter:a((n,o={})=>e.filter(n,DT(t,o)),"filter"),defaults:a(n=>e.defaults(DT(t,n)),"defaults"),makeRe:a((n,o={})=>e.makeRe(n,DT(t,o)),"makeRe"),braceExpand:a((n,o={})=>e.braceExpand(n,DT(t,o)),"braceExpand"),match:a((n,o,s={})=>e.match(n,o,DT(t,s)),"match"),sep:e.sep,GLOBSTAR:Cf})},"defaults");cy.defaults=YYi;var Hqr=a((t,e={})=>(aEe(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:kqr(t,{max:e.braceExpandMax})),"braceExpand");cy.braceExpand=Hqr;var KYi=a((t,e={})=>new z1(t,e).makeRe(),"makeRe");cy.makeRe=KYi;var JYi=a((t,e,r={})=>{let n=new z1(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t},"match");cy.match=JYi;var Uqr=/[?*]|[+@!]\(.*?\)|\[|\]/,XYi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),z1=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){aEe(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||Gqr,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!Uqr.test(s[2]))&&!Uqr.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(p=>this.parse(p))];if(d)return[s[0],...s.slice(1).map(p=>this.parse(p))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;oo&&n.splice(o+1,c-o);let l=n[o+1],u=n[o+2],d=n[o+3];if(l!==".."||!u||u==="."||u===".."||!d||d==="."||d==="..")continue;r=!0,n.splice(o,1);let p=n.slice(0);p[o]="**",e.push(p),o--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,n=!1){let o=0,s=0,c=[],l="";for(;o=2&&(e=this.levelTwoFileOptimize(e)),r.includes(Cf)?this.#e(e,r,n,o,s):this.#n(e,r,n,o,s)}#e(e,r,n,o,s){let c=r.indexOf(Cf,s),l=r.lastIndexOf(Cf),[u,d,p]=n?[r.slice(s,c),r.slice(c+1),[]]:[r.slice(s,c),r.slice(c+1,l),r.slice(l+1)];if(u.length){let v=e.slice(o,o+u.length);if(!this.#n(v,u,n,0,0))return!1;o+=u.length,s+=u.length}let h=0;if(p.length){if(p.length+o>e.length)return!1;let v=e.length-p.length;if(this.#n(e,p,n,v,0))h=p.length;else{if(e[e.length-1]!==""||o+p.length===e.length||(v--,!this.#n(e,p,n,v,0)))return!1;h=p.length+1}}if(!d.length){let v=!!h;for(let b=o;b{let d=u.map(h=>{if(h instanceof RegExp)for(let m of h.flags.split(""))o.add(m);return typeof h=="string"?XYi(h):h===Cf?Cf:h._src});d.forEach((h,m)=>{let g=d[m+1],A=d[m-1];h!==Cf||A===Cf||(A===void 0?g!==void 0&&g!==Cf?d[m+1]="(?:\\/|"+n+"\\/)?"+g:d[m]=n:g===void 0?d[m-1]=A+"(?:\\/|\\/"+n+")?":g!==Cf&&(d[m-1]=A+"(?:\\/|\\/"+n+"\\/)"+g,d[m+1]=Cf))});let p=d.filter(h=>h!==Cf);if(this.partial&&p.length>=1){let h=[];for(let m=1;m<=p.length;m++)h.push(p.slice(0,m).join("/"));return"(?:"+h.join("|")+")"}return p.join("/")}).join("|"),[c,l]=e.length>1?["(?:",")"]:["",""];s="^"+c+s+l+"$",this.partial&&(s="^(?:\\/|"+c+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let c=o[o.length-1];if(!c)for(let l=o.length-2;!c&&l>=0;l--)c=o[l];for(let l=0;l{typeof Bwt.emitWarning=="function"?Bwt.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},"emitWarning"),c9e=globalThis.AbortController,jqr=globalThis.AbortSignal;if(typeof c9e>"u"){jqr=class{static{a(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,o){this._onabort.push(o)}},c9e=class{static{a(this,"AbortController")}constructor(){e()}signal=new jqr;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let o of this.signal._onabort)o(n);this.signal.onabort?.(n)}}};let t=Bwt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=a(()=>{t&&(t=!1,Vqr("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var ZYi=a(t=>!$qr.has(t),"shouldWarn");var W6=a(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),Wqr=a(t=>W6(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ane:null:null,"getUintArray"),ane=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},Lwt=class t{static{a(this,"Stack")}heap;length;static#e=!1;static create(e){let r=Wqr(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},lEe=class t{static{a(this,"LRUCache")}#e;#t;#n;#r;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#s;#c;#l;#u;#f;#p;#h;#m;#E;#g;#v;#S;#_;#b;#C;#y;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#_,sizes:e.#v,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#f,prev:e.#p,get head(){return e.#h},get tail(){return e.#m},free:e.#E,isBackgroundFetch:a(r=>e.#A(r),"isBackgroundFetch"),backgroundFetch:a((r,n,o,s)=>e.#F(r,n,o,s),"backgroundFetch"),moveToTail:a(r=>e.#Q(r),"moveToTail"),indexes:a(r=>e.#w(r),"indexes"),rindexes:a(r=>e.#R(r),"rindexes"),isStale:a(r=>e.#T(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#a}get fetchMethod(){return this.#i}get memoMethod(){return this.#o}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(e){let{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:s,updateAgeOnGet:c,updateAgeOnHas:l,allowStale:u,dispose:d,disposeAfter:p,noDisposeOnSet:h,noUpdateTTL:m,maxSize:g=0,maxEntrySize:A=0,sizeCalculation:y,fetchMethod:E,memoMethod:_,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:x,ignoreFetchAbort:R}=e;if(r!==0&&!W6(r))throw new TypeError("max option must be a nonnegative integer");let w=r?Wqr(r):Array;if(!w)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=g,this.maxEntrySize=A||this.#t,this.sizeCalculation=y,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#o=_,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#i=E,this.#C=!!E,this.#c=new Map,this.#l=new Array(r).fill(void 0),this.#u=new Array(r).fill(void 0),this.#f=new w(r),this.#p=new w(r),this.#h=0,this.#m=0,this.#E=Lwt.create(r),this.#a=0,this.#s=0,typeof d=="function"&&(this.#n=d),typeof p=="function"?(this.#r=p,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#y=!!this.#r,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!R,this.maxEntrySize!==0){if(this.#t!==0&&!W6(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!W6(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!l,this.ttlResolution=W6(o)||o===0?o:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!W6(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let P="LRU_CACHE_UNBOUNDED";ZYi(P)&&($qr.add(P),Vqr("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,t))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#I(){let e=new ane(this.#e),r=new ane(this.#e);this.#_=e,this.#S=r,this.#N=(s,c,l=sne.now())=>{if(r[s]=c!==0?l:0,e[s]=c,c!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#T(s)&&this.#k(this.#l[s],"expire")},c+1);u.unref&&u.unref()}},this.#x=s=>{r[s]=e[s]!==0?sne.now():0},this.#d=(s,c)=>{if(e[c]){let l=e[c],u=r[c];if(!l||!u)return;s.ttl=l,s.start=u,s.now=n||o();let d=s.now-u;s.remainingTTL=l-d}};let n=0,o=a(()=>{let s=sne.now();if(this.ttlResolution>0){n=s;let c=setTimeout(()=>n=0,this.ttlResolution);c.unref&&c.unref()}return s},"getNow");this.getRemainingTTL=s=>{let c=this.#c.get(s);if(c===void 0)return 0;let l=e[c],u=r[c];if(!l||!u)return 1/0;let d=(n||o())-u;return l-d},this.#T=s=>{let c=r[s],l=e[s];return!!l&&!!c&&(n||o())-c>l}}#x=a(()=>{},"#updateItemAge");#d=a(()=>{},"#statusTTL");#N=a(()=>{},"#setItemTTL");#T=a(()=>!1,"#isStale");#P(){let e=new ane(this.#e);this.#s=0,this.#v=e,this.#D=r=>{this.#s-=e[r],e[r]=0},this.#O=(r,n,o,s)=>{if(this.#A(n))return 0;if(!W6(o))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(o=s(n,r),!W6(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o},this.#M=(r,n,o)=>{if(e[r]=n,this.#t){let s=this.#t-e[r];for(;this.#s>s;)this.#L(!0)}this.#s+=e[r],o&&(o.entrySize=n,o.totalCalculatedSize=this.#s)}}#D=a(e=>{},"#removeItemSize");#M=a((e,r,n)=>{},"#addItemSize");#O=a((e,r,n,o)=>{if(n||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#w({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#m;!(!this.#B(r)||((e||!this.#T(r))&&(yield r),r===this.#h));)r=this.#p[r]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#h;!(!this.#B(r)||((e||!this.#T(r))&&(yield r),r===this.#m));)r=this.#f[r]}#B(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#w())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#A(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#R())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#A(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#w()){let r=this.#l[e];r!==void 0&&!this.#A(this.#u[e])&&(yield r)}}*rkeys(){for(let e of this.#R()){let r=this.#l[e];r!==void 0&&!this.#A(this.#u[e])&&(yield r)}}*values(){for(let e of this.#w())this.#u[e]!==void 0&&!this.#A(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#R())this.#u[e]!==void 0&&!this.#A(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#w()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;if(s!==void 0&&e(s,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#w()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;s!==void 0&&e.call(r,s,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#R()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;s!==void 0&&e.call(r,s,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#R({allowStale:!0}))this.#T(r)&&(this.#k(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#c.get(e);if(r===void 0)return;let n=this.#u[r],o=this.#A(n)?n.__staleWhileFetching:n;if(o===void 0)return;let s={value:o};if(this.#_&&this.#S){let c=this.#_[r],l=this.#S[r];if(c&&l){let u=c-(sne.now()-l);s.ttl=u,s.start=Date.now()}}return this.#v&&(s.size=this.#v[r]),s}dump(){let e=[];for(let r of this.#w({allowStale:!0})){let n=this.#l[r],o=this.#u[r],s=this.#A(o)?o.__staleWhileFetching:o;if(s===void 0||n===void 0)continue;let c={value:s};if(this.#_&&this.#S){c.ttl=this.#_[r];let l=sne.now()-this.#S[r];c.start=Math.floor(Date.now()-l)}this.#v&&(c.size=this.#v[r]),e.unshift([n,c])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let o=Date.now()-n.start;n.start=sne.now()-o}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:s,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,{noUpdateTTL:d=this.noUpdateTTL}=n,p=this.#O(e,r,n.size||0,l);if(this.maxEntrySize&&p>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#k(e,"set"),this;let h=this.#a===0?void 0:this.#c.get(e);if(h===void 0)h=this.#a===0?this.#m:this.#E.length!==0?this.#E.pop():this.#a===this.#e?this.#L(!1):this.#a,this.#l[h]=e,this.#u[h]=r,this.#c.set(e,h),this.#f[this.#m]=h,this.#p[h]=this.#m,this.#m=h,this.#a++,this.#M(h,p,u),u&&(u.set="add"),d=!1;else{this.#Q(h);let m=this.#u[h];if(r!==m){if(this.#C&&this.#A(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=m;g!==void 0&&!c&&(this.#b&&this.#n?.(g,e,"set"),this.#y&&this.#g?.push([g,e,"set"]))}else c||(this.#b&&this.#n?.(m,e,"set"),this.#y&&this.#g?.push([m,e,"set"]));if(this.#D(h),this.#M(h,p,u),this.#u[h]=r,u){u.set="replace";let g=m&&this.#A(m)?m.__staleWhileFetching:m;g!==void 0&&(u.oldValue=g)}}else u&&(u.set="update")}if(o!==0&&!this.#_&&this.#I(),this.#_&&(d||this.#N(h,o,s),u&&this.#d(u,h)),!c&&this.#y&&this.#g){let m=this.#g,g;for(;g=m?.shift();)this.#r?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#u[this.#h];if(this.#L(!0),this.#A(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#y&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#r?.(...r)}}}#L(e){let r=this.#h,n=this.#l[r],o=this.#u[r];return this.#C&&this.#A(o)?o.__abortController.abort(new Error("evicted")):(this.#b||this.#y)&&(this.#b&&this.#n?.(o,n,"evict"),this.#y&&this.#g?.push([o,n,"evict"])),this.#D(r),e&&(this.#l[r]=void 0,this.#u[r]=void 0,this.#E.push(r)),this.#a===1?(this.#h=this.#m=0,this.#E.length=0):this.#h=this.#f[r],this.#c.delete(n),this.#a--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:o}=r,s=this.#c.get(e);if(s!==void 0){let c=this.#u[s];if(this.#A(c)&&c.__staleWhileFetching===void 0)return!1;if(this.#T(s))o&&(o.has="stale",this.#d(o,s));else return n&&this.#x(s),o&&(o.has="hit",this.#d(o,s)),!0}else o&&(o.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,o=this.#c.get(e);if(o===void 0||!n&&this.#T(o))return;let s=this.#u[o];return this.#A(s)?s.__staleWhileFetching:s}#F(e,r,n,o){let s=r===void 0?void 0:this.#u[r];if(this.#A(s))return s;let c=new c9e,{signal:l}=n;l?.addEventListener("abort",()=>c.abort(l.reason),{signal:c.signal});let u={signal:c.signal,options:n,context:o},d=a((y,E=!1)=>{let{aborted:_}=c.signal,v=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(_&&!E?(n.status.fetchAborted=!0,n.status.fetchError=c.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),_&&!v&&!E)return h(c.signal.reason);let b=g;return this.#u[r]===g&&(y===void 0?b.__staleWhileFetching?this.#u[r]=b.__staleWhileFetching:this.#k(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,y,u.options))),y},"cb"),p=a(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),h(y)),"eb"),h=a(y=>{let{aborted:E}=c.signal,_=E&&n.allowStaleOnFetchAbort,v=_||n.allowStaleOnFetchRejection,b=v||n.noDeleteOnFetchRejection,I=g;if(this.#u[r]===g&&(!b||I.__staleWhileFetching===void 0?this.#k(e,"fetch"):_||(this.#u[r]=I.__staleWhileFetching)),v)return n.status&&I.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),I.__staleWhileFetching;if(I.__returned===I)throw y},"fetchFail"),m=a((y,E)=>{let _=this.#i?.(e,s,u);_&&_ instanceof Promise&&_.then(v=>y(v===void 0?void 0:v),E),c.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=a(v=>d(v,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let g=new Promise(m).then(d,p),A=Object.assign(g,{__abortController:c,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,A,{...u.options,status:void 0}),r=this.#c.get(e)):this.#u[r]=A,A}#A(e){if(!this.#C)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof c9e}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:y,forceRefresh:E=!1,status:_,signal:v}=r;if(!this.#C)return _&&(_.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:s,status:_});let b={allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:s,ttl:c,noDisposeOnSet:l,size:u,sizeCalculation:d,noUpdateTTL:p,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:A,ignoreFetchAbort:g,status:_,signal:v},I=this.#c.get(e);if(I===void 0){_&&(_.fetch="miss");let x=this.#F(e,I,b,y);return x.__returned=x}else{let x=this.#u[I];if(this.#A(x)){let Q=n&&x.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",Q&&(_.returnedStale=!0)),Q?x.__staleWhileFetching:x.__returned=x}let R=this.#T(I);if(!E&&!R)return _&&(_.fetch="hit"),this.#Q(I),o&&this.#x(I),_&&this.#d(_,I),x;let w=this.#F(e,I,b,y),k=w.__staleWhileFetching!==void 0&&n;return _&&(_.fetch=R?"stale":"refresh",k&&R&&(_.returnedStale=!0)),k?w.__staleWhileFetching:w.__returned=w}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#o;if(!n)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:s,...c}=r,l=this.get(e,c);if(!s&&l!==void 0)return l;let u=n(e,l,{options:c,context:o});return this.set(e,u,c),u}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:c}=r,l=this.#c.get(e);if(l!==void 0){let u=this.#u[l],d=this.#A(u);return c&&this.#d(c,l),this.#T(l)?(c&&(c.get="stale"),d?(c&&n&&u.__staleWhileFetching!==void 0&&(c.returnedStale=!0),n?u.__staleWhileFetching:void 0):(s||this.#k(e,"expire"),c&&n&&(c.returnedStale=!0),n?u:void 0)):(c&&(c.get="hit"),d?u.__staleWhileFetching:(this.#Q(l),o&&this.#x(l),u))}else c&&(c.get="miss")}#U(e,r){this.#p[r]=e,this.#f[e]=r}#Q(e){e!==this.#m&&(e===this.#h?this.#h=this.#f[e]:this.#U(this.#p[e],this.#f[e]),this.#U(this.#m,e),this.#m=e)}delete(e){return this.#k(e,"delete")}#k(e,r){let n=!1;if(this.#a!==0){let o=this.#c.get(e);if(o!==void 0)if(n=!0,this.#a===1)this.#q(r);else{this.#D(o);let s=this.#u[o];if(this.#A(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#y)&&(this.#b&&this.#n?.(s,e,r),this.#y&&this.#g?.push([s,e,r])),this.#c.delete(e),this.#l[o]=void 0,this.#u[o]=void 0,o===this.#m)this.#m=this.#p[o];else if(o===this.#h)this.#h=this.#f[o];else{let c=this.#p[o];this.#f[c]=this.#f[o];let l=this.#f[o];this.#p[l]=this.#p[o]}this.#a--,this.#E.push(o)}}if(this.#y&&this.#g?.length){let o=this.#g,s;for(;s=o?.shift();)this.#r?.(...s)}return n}clear(){return this.#q("delete")}#q(e){for(let r of this.#R({allowStale:!0})){let n=this.#u[r];if(this.#A(n))n.__abortController.abort(new Error("deleted"));else{let o=this.#l[r];this.#b&&this.#n?.(n,o,e),this.#y&&this.#g?.push([n,o,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#_&&this.#S&&(this.#_.fill(0),this.#S.fill(0)),this.#v&&this.#v.fill(0),this.#h=0,this.#m=0,this.#E.length=0,this.#s=0,this.#a=0,this.#y&&this.#g){let r=this.#g,n;for(;n=r?.shift();)this.#r?.(...n)}}};var une=require("node:path"),nGr=require("node:url"),ZP=require("fs"),lKi=de(require("node:fs"),1),K6=require("node:fs/promises");f();var m9e=require("node:events"),jwt=de(require("node:stream"),1),Xqr=require("node:string_decoder");var zqr=typeof process=="object"&&process?process:{stdout:null,stderr:null},eKi=a(t=>!!t&&typeof t=="object"&&(t instanceof Y6||t instanceof jwt.default||tKi(t)||rKi(t)),"isStream"),tKi=a(t=>!!t&&typeof t=="object"&&t instanceof m9e.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==jwt.default.Writable.prototype.pipe,"isReadable"),rKi=a(t=>!!t&&typeof t=="object"&&t instanceof m9e.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function","isWritable"),rO=Symbol("EOF"),nO=Symbol("maybeEmitEnd"),z6=Symbol("emittedEnd"),l9e=Symbol("emittingEnd"),uEe=Symbol("emittedError"),u9e=Symbol("closed"),Yqr=Symbol("read"),d9e=Symbol("flush"),Kqr=Symbol("flushChunk"),Vx=Symbol("encoding"),cne=Symbol("decoder"),ch=Symbol("flowing"),dEe=Symbol("paused"),lne=Symbol("resume"),lh=Symbol("buffer"),ly=Symbol("pipes"),uh=Symbol("bufferLength"),Fwt=Symbol("bufferPush"),f9e=Symbol("bufferShift"),Qg=Symbol("objectMode"),_f=Symbol("destroyed"),Uwt=Symbol("error"),Qwt=Symbol("emitData"),Jqr=Symbol("emitEnd"),qwt=Symbol("emitEnd2"),JP=Symbol("async"),Gwt=Symbol("abort"),p9e=Symbol("aborted"),fEe=Symbol("signal"),Gj=Symbol("dataListeners"),Y1=Symbol("discarded"),pEe=a(t=>Promise.resolve().then(t),"defer"),nKi=a(t=>t(),"nodefer"),iKi=a(t=>t==="end"||t==="finish"||t==="prefinish","isEndish"),oKi=a(t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,"isArrayBufferLike"),sKi=a(t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),"isArrayBufferView"),h9e=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[lne](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Hwt=class extends h9e{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=o=>r.emit("error",o),e.on("error",this.proxyErrors)}},aKi=a(t=>!!t.objectMode,"isObjectModeOptions"),cKi=a(t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer","isEncodingOptions"),Y6=class extends m9e.EventEmitter{static{a(this,"Minipass")}[ch]=!1;[dEe]=!1;[ly]=[];[lh]=[];[Qg];[Vx];[JP];[cne];[rO]=!1;[z6]=!1;[l9e]=!1;[u9e]=!1;[uEe]=null;[uh]=0;[_f]=!1;[fEe];[p9e]=!1;[Gj]=0;[Y1]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");aKi(r)?(this[Qg]=!0,this[Vx]=null):cKi(r)?(this[Vx]=r.encoding,this[Qg]=!1):(this[Qg]=!1,this[Vx]=null),this[JP]=!!r.async,this[cne]=this[Vx]?new Xqr.StringDecoder(this[Vx]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[lh],"get")}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[ly],"get")});let{signal:n}=r;n&&(this[fEe]=n,n.aborted?this[Gwt]():n.addEventListener("abort",()=>this[Gwt]()))}get bufferLength(){return this[uh]}get encoding(){return this[Vx]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Qg]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[JP]}set async(e){this[JP]=this[JP]||!!e}[Gwt](){this[p9e]=!0,this.emit("abort",this[fEe]?.reason),this.destroy(this[fEe]?.reason)}get aborted(){return this[p9e]}set aborted(e){}write(e,r,n){if(this[p9e])return!1;if(this[rO])throw new Error("write after end");if(this[_f])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let o=this[JP]?pEe:nKi;if(!this[Qg]&&!Buffer.isBuffer(e)){if(sKi(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(oKi(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Qg]?(this[ch]&&this[uh]!==0&&this[d9e](!0),this[ch]?this.emit("data",e):this[Fwt](e),this[uh]!==0&&this.emit("readable"),n&&o(n),this[ch]):e.length?(typeof e=="string"&&!(r===this[Vx]&&!this[cne]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Vx]&&(e=this[cne].write(e)),this[ch]&&this[uh]!==0&&this[d9e](!0),this[ch]?this.emit("data",e):this[Fwt](e),this[uh]!==0&&this.emit("readable"),n&&o(n),this[ch]):(this[uh]!==0&&this.emit("readable"),n&&o(n),this[ch])}read(e){if(this[_f])return null;if(this[Y1]=!1,this[uh]===0||e===0||e&&e>this[uh])return this[nO](),null;this[Qg]&&(e=null),this[lh].length>1&&!this[Qg]&&(this[lh]=[this[Vx]?this[lh].join(""):Buffer.concat(this[lh],this[uh])]);let r=this[Yqr](e||null,this[lh][0]);return this[nO](),r}[Yqr](e,r){if(this[Qg])this[f9e]();else{let n=r;e===n.length||e===null?this[f9e]():typeof n=="string"?(this[lh][0]=n.slice(e),r=n.slice(0,e),this[uh]-=e):(this[lh][0]=n.subarray(e),r=n.subarray(0,e),this[uh]-=e)}return this.emit("data",r),!this[lh].length&&!this[rO]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[rO]=!0,this.writable=!1,(this[ch]||!this[dEe])&&this[nO](),this}[lne](){this[_f]||(!this[Gj]&&!this[ly].length&&(this[Y1]=!0),this[dEe]=!1,this[ch]=!0,this.emit("resume"),this[lh].length?this[d9e]():this[rO]?this[nO]():this.emit("drain"))}resume(){return this[lne]()}pause(){this[ch]=!1,this[dEe]=!0,this[Y1]=!1}get destroyed(){return this[_f]}get flowing(){return this[ch]}get paused(){return this[dEe]}[Fwt](e){this[Qg]?this[uh]+=1:this[uh]+=e.length,this[lh].push(e)}[f9e](){return this[Qg]?this[uh]-=1:this[uh]-=this[lh][0].length,this[lh].shift()}[d9e](e=!1){do;while(this[Kqr](this[f9e]())&&this[lh].length);!e&&!this[lh].length&&!this[rO]&&this.emit("drain")}[Kqr](e){return this.emit("data",e),this[ch]}pipe(e,r){if(this[_f])return e;this[Y1]=!1;let n=this[z6];return r=r||{},e===zqr.stdout||e===zqr.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[ly].push(r.proxyErrors?new Hwt(this,e,r):new h9e(this,e,r)),this[JP]?pEe(()=>this[lne]()):this[lne]()),e}unpipe(e){let r=this[ly].find(n=>n.dest===e);r&&(this[ly].length===1?(this[ch]&&this[Gj]===0&&(this[ch]=!1),this[ly]=[]):this[ly].splice(this[ly].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[Y1]=!1,this[Gj]++,!this[ly].length&&!this[ch]&&this[lne]();else if(e==="readable"&&this[uh]!==0)super.emit("readable");else if(iKi(e)&&this[z6])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[uEe]){let o=r;this[JP]?pEe(()=>o.call(this,this[uEe])):o.call(this,this[uEe])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[Gj]=this.listeners("data").length,this[Gj]===0&&!this[Y1]&&!this[ly].length&&(this[ch]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Gj]=0,!this[Y1]&&!this[ly].length&&(this[ch]=!1)),r}get emittedEnd(){return this[z6]}[nO](){!this[l9e]&&!this[z6]&&!this[_f]&&this[lh].length===0&&this[rO]&&(this[l9e]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[u9e]&&this.emit("close"),this[l9e]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==_f&&this[_f])return!1;if(e==="data")return!this[Qg]&&!n?!1:this[JP]?(pEe(()=>this[Qwt](n)),!0):this[Qwt](n);if(e==="end")return this[Jqr]();if(e==="close"){if(this[u9e]=!0,!this[z6]&&!this[_f])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[uEe]=n,super.emit(Uwt,n);let s=!this[fEe]||this.listeners("error").length?super.emit("error",n):!1;return this[nO](),s}else if(e==="resume"){let s=super.emit("resume");return this[nO](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let o=super.emit(e,...r);return this[nO](),o}[Qwt](e){for(let n of this[ly])n.dest.write(e)===!1&&this.pause();let r=this[Y1]?!1:super.emit("data",e);return this[nO](),r}[Jqr](){return this[z6]?!1:(this[z6]=!0,this.readable=!1,this[JP]?(pEe(()=>this[qwt]()),!0):this[qwt]())}[qwt](){if(this[cne]){let r=this[cne].end();if(r){for(let n of this[ly])n.dest.write(r);this[Y1]||super.emit("data",r)}}for(let r of this[ly])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Qg]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[Qg]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[Qg])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Vx]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(_f,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Y1]=!1;let e=!1,r=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return r();let o=this.read();if(o!==null)return Promise.resolve({done:!1,value:o});if(this[rO])return r();let s,c,l=a(h=>{this.off("data",u),this.off("end",d),this.off(_f,p),r(),c(h)},"onerr"),u=a(h=>{this.off("error",l),this.off("end",d),this.off(_f,p),this.pause(),s({value:h,done:!!this[rO]})},"ondata"),d=a(()=>{this.off("error",l),this.off("data",u),this.off(_f,p),r(),s({done:!0,value:void 0})},"onend"),p=a(()=>l(new Error("stream destroyed")),"ondestroy");return new Promise((h,m)=>{c=m,s=h,this.once(_f,p),this.once("error",l),this.once("end",d),this.once("data",u)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Y1]=!1;let e=!1,r=a(()=>(this.pause(),this.off(Uwt,r),this.off(_f,r),this.off("end",r),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return r();let o=this.read();return o===null?r():{done:!1,value:o}},"next");return this.once("end",r),this.once(Uwt,r),this.once(_f,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[_f])return e?this.emit("error",e):this.emit(_f),this;this[_f]=!0,this[Y1]=!0,this[lh].length=0,this[uh]=0;let r=this;return typeof r.close=="function"&&!this[u9e]&&r.close(),e?this.emit("error",e):this.emit(_f),this}static get isStream(){return eKi}};var uKi=ZP.realpathSync.native,mEe={lstatSync:ZP.lstatSync,readdir:ZP.readdir,readdirSync:ZP.readdirSync,readlinkSync:ZP.readlinkSync,realpathSync:uKi,promises:{lstat:K6.lstat,readdir:K6.readdir,readlink:K6.readlink,realpath:K6.realpath}},iGr=a(t=>!t||t===mEe||t===lKi?mEe:{...mEe,...t,promises:{...mEe.promises,...t.promises||{}}},"fsFromOption"),oGr=/^\\\\\?\\([a-z]:)\\?$/i,dKi=a(t=>t.replace(/\//g,"\\").replace(oGr,"$1\\"),"uncToDrive"),fKi=/[\\\/]/,OT=0,sGr=1,aGr=2,XP=4,cGr=6,lGr=8,Hj=10,uGr=12,MT=15,hEe=~MT,$wt=16,Zqr=32,gEe=64,Wx=128,g9e=256,y9e=512,eGr=gEe|Wx|y9e,pKi=1023,Vwt=a(t=>t.isFile()?lGr:t.isDirectory()?XP:t.isSymbolicLink()?Hj:t.isCharacterDevice()?aGr:t.isBlockDevice()?cGr:t.isSocket()?uGr:t.isFIFO()?sGr:OT,"entToType"),tGr=new Map,AEe=a(t=>{let e=tGr.get(t);if(e)return e;let r=t.normalize("NFKD");return tGr.set(t,r),r},"normalize"),rGr=new Map,A9e=a(t=>{let e=rGr.get(t);if(e)return e;let r=AEe(t.toLowerCase());return rGr.set(t,r),r},"normalizeNocase"),E9e=class extends lEe{static{a(this,"ResolveCache")}constructor(){super({max:256})}},Wwt=class extends lEe{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(r=>r.length+1,"sizeCalculation")})}},dGr=Symbol("PathScurry setAsCwd"),qg=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#o;get gid(){return this.#o}#a;get rdev(){return this.#a}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#f;get atimeMs(){return this.#f}#p;get mtimeMs(){return this.#p}#h;get ctimeMs(){return this.#h}#m;get birthtimeMs(){return this.#m}#E;get atime(){return this.#E}#g;get mtime(){return this.#g}#v;get ctime(){return this.#v}#S;get birthtime(){return this.#S}#_;#b;#C;#y;#I;#x;#d;#N;#T;#P;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=OT,n,o,s,c,l){this.name=e,this.#_=s?A9e(e):AEe(e),this.#d=r&pKi,this.nocase=s,this.roots=o,this.root=n||this,this.#N=c,this.#C=l.fullpath,this.#I=l.relative,this.#x=l.relativePosix,this.parent=l.parent,this.parent?this.#e=this.parent.#e:this.#e=iGr(l.fs)}depth(){return this.#b!==void 0?this.#b:this.parent?this.#b=this.parent.depth()+1:this.#b=0}childrenCache(){return this.#N}resolve(e){if(!e)return this;let r=this.getRootString(e),o=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#D(o):this.#D(o)}#D(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#N.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#N.set(this,r),this.#d&=~$wt,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),o=this.nocase?A9e(e):AEe(e);for(let u of n)if(u.#_===o)return u;let s=this.parent?this.sep:"",c=this.#C?this.#C+s+e:void 0,l=this.newChild(e,OT,{...r,parent:this,fullpath:c});return this.canReaddir()||(l.#d|=Wx),n.push(l),l}relative(){if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let e=this.name,r=this.parent;if(!r)return this.#I=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let e=this.name,r=this.parent;if(!r)return this.#x=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#C!==void 0)return this.#C;let e=this.name,r=this.parent;if(!r)return this.#C=this.name;let o=r.fullpath()+(r.parent?this.sep:"")+e;return this.#C=o}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let o=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(o)?this.#y=`//?/${o}`:this.#y=o}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#y=n}isUnknown(){return(this.#d&MT)===OT}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#d&MT)===lGr}isDirectory(){return(this.#d&MT)===XP}isCharacterDevice(){return(this.#d&MT)===aGr}isBlockDevice(){return(this.#d&MT)===cGr}isFIFO(){return(this.#d&MT)===sGr}isSocket(){return(this.#d&MT)===uGr}isSymbolicLink(){return(this.#d&Hj)===Hj}lstatCached(){return this.#d&Zqr?this:void 0}readlinkCached(){return this.#T}realpathCached(){return this.#P}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#T)return!0;if(!this.parent)return!1;let e=this.#d&MT;return!(e!==OT&&e!==Hj||this.#d&g9e||this.#d&Wx)}calledReaddir(){return!!(this.#d&$wt)}isENOENT(){return!!(this.#d&Wx)}isNamed(e){return this.nocase?this.#_===A9e(e):this.#_===AEe(e)}async readlink(){let e=this.#T;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(r);if(n)return this.#T=n}catch(r){this.#A(r.code);return}}readlinkSync(){let e=this.#T;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(r);if(n)return this.#T=n}catch(r){this.#A(r.code);return}}#M(e){this.#d|=$wt;for(let r=e.provisional;rn(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#H.push(e),this.#j)return;this.#j=!0;let o=this.fullpath();this.#e.readdir(o,{withFileTypes:!0},(s,c)=>{if(s)this.#L(s.code),n.provisional=0;else{for(let l of c)this.#U(l,n);this.#M(n)}this.#V(n.slice(0,n.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#G)await this.#G;else{let n=a(()=>{},"resolve");this.#G=new Promise(o=>n=o);try{for(let o of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#U(o,e);this.#M(e)}catch(o){this.#L(o.code),e.provisional=0}this.#G=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#U(n,e);this.#M(e)}catch(n){this.#L(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#d&eGr)return!1;let e=MT&this.#d;return e===OT||e===XP||e===Hj}shouldWalk(e,r){return(this.#d&XP)===XP&&!(this.#d&eGr)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#P)return this.#P;if(!((y9e|g9e|Wx)&this.#d))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#P=this.resolve(e)}catch{this.#R()}}realpathSync(){if(this.#P)return this.#P;if(!((y9e|g9e|Wx)&this.#d))try{let e=this.#e.realpathSync(this.fullpath());return this.#P=this.resolve(e)}catch{this.#R()}}[dGr](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],o=this;for(;o&&o.parent;)r.add(o),o.#I=n.join(this.sep),o.#x=n.join("/"),o=o.parent,n.push("..");for(o=e;o&&o.parent&&!r.has(o);)o.#I=void 0,o.#x=void 0,o=o.parent}},C9e=class t extends qg{static{a(this,"PathWin32")}sep="\\";splitSep=fKi;constructor(e,r=OT,n,o,s,c,l){super(e,r,n,o,s,c,l)}newChild(e,r=OT,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return une.win32.parse(e).root}getRoot(e){if(e=dKi(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new dne(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(oGr,"$1\\"),e===r}},_9e=class t extends qg{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,r=OT,n,o,s,c,l){super(e,r,n,o,s,c,l)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=OT,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},v9e=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),r,n,{nocase:o,childrenCacheSize:s=16*1024,fs:c=mEe}={}){this.#r=iGr(c),(e instanceof URL||e.startsWith("file://"))&&(e=(0,nGr.fileURLToPath)(e));let l=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(l),this.#e=new E9e,this.#t=new E9e,this.#n=new Wwt(s);let u=l.substring(this.rootPath.length).split(n);if(u.length===1&&!u[0]&&u.pop(),o===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=o,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let d=this.root,p=u.length-1,h=r.sep,m=this.rootPath,g=!1;for(let A of u){let y=p--;d=d.child(A,{relative:new Array(y).fill("..").join(h),relativePosix:new Array(y).fill("..").join("/"),fullpath:m+=(g?"":h)+A}),g=!0}this.cwd=d}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let c=e[s];if(!(!c||c===".")&&(r=r?`${c}/${r}`:c,this.isAbsolute(c)))break}let n=this.#e.get(r);if(n!==void 0)return n;let o=this.cwd.resolve(r).fullpath();return this.#e.set(r,o),o}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let c=e[s];if(!(!c||c===".")&&(r=r?`${c}/${r}`:c,this.isAbsolute(c)))break}let n=this.#t.get(r);if(n!==void 0)return n;let o=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,o),o}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let o=await e.readdir();return n?o:o.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(o=>o.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=[];(!s||s(e))&&l.push(n?e:e.fullpath());let u=new Set,d=a((h,m)=>{u.add(h),h.readdirCB((g,A)=>{if(g)return m(g);let y=A.length;if(!y)return m();let E=a(()=>{--y===0&&m()},"next");for(let _ of A)(!s||s(_))&&l.push(n?_:_.fullpath()),o&&_.isSymbolicLink()?_.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(u,c)?d(v,E):E()):_.shouldWalk(u,c)?d(_,E):E()},!0)},"walk"),p=e;return new Promise((h,m)=>{d(p,g=>{if(g)return m(g);h(l)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=[];(!s||s(e))&&l.push(n?e:e.fullpath());let u=new Set([e]);for(let d of u){let p=d.readdirSync();for(let h of p){(!s||s(h))&&l.push(n?h:h.fullpath());let m=h;if(h.isSymbolicLink()){if(!(o&&(m=h.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(u,c)&&u.add(m)}}return l}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r;(!s||s(e))&&(yield n?e:e.fullpath());let l=new Set([e]);for(let u of l){let d=u.readdirSync();for(let p of d){(!s||s(p))&&(yield n?p:p.fullpath());let h=p;if(p.isSymbolicLink()){if(!(o&&(h=p.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(l,c)&&l.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=new Y6({objectMode:!0});(!s||s(e))&&l.write(n?e:e.fullpath());let u=new Set,d=[e],p=0,h=a(()=>{let m=!1;for(;!m;){let g=d.shift();if(!g){p===0&&l.end();return}p++,u.add(g);let A=a((E,_,v=!1)=>{if(E)return l.emit("error",E);if(o&&!v){let b=[];for(let I of _)I.isSymbolicLink()&&b.push(I.realpath().then(x=>x?.isUnknown()?x.lstat():x));if(b.length){Promise.all(b).then(()=>A(null,_,!0));return}}for(let b of _)b&&(!s||s(b))&&(l.write(n?b:b.fullpath())||(m=!0));p--;for(let b of _){let I=b.realpathCached()||b;I.shouldWalk(u,c)&&d.push(I)}m&&!l.flowing?l.once("drain",h):y||h()},"onReaddir"),y=!0;g.readdirCB(A,!0),y=!1}},"process");return h(),l}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof qg||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=new Y6({objectMode:!0}),u=new Set;(!s||s(e))&&l.write(n?e:e.fullpath());let d=[e],p=0,h=a(()=>{let m=!1;for(;!m;){let g=d.shift();if(!g){p===0&&l.end();return}p++,u.add(g);let A=g.readdirSync();for(let y of A)(!s||s(y))&&(l.write(n?y:y.fullpath())||(m=!0));p--;for(let y of A){let E=y;if(y.isSymbolicLink()){if(!(o&&(E=y.realpathSync())))continue;E.isUnknown()&&E.lstatSync()}E.shouldWalk(u,c)&&d.push(E)}}m&&!l.flowing&&l.once("drain",h)},"process");return h(),l}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[dGr](r)}},dne=class extends v9e{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,une.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let o=this.cwd;o;o=o.parent)o.nocase=this.nocase}parseRootPath(e){return une.win32.parse(e).root.toUpperCase()}newRoot(e){return new C9e(this.rootPath,XP,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},fne=class extends v9e{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,une.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new _9e(this.rootPath,XP,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},yEe=class extends fne{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}},Qbl=process.platform==="win32"?C9e:_9e,fGr=process.platform==="win32"?dne:process.platform==="darwin"?yEe:fne;f();var hKi=a(t=>t.length>=1,"isPatternList"),mKi=a(t=>t.length>=1,"isGlobList"),pne=class t{static{a(this,"Pattern")}#e;#t;#n;length;#r;#i;#o;#a;#s;#c;#l=!0;constructor(e,r,n,o){if(!hKi(e))throw new TypeError("empty pattern list");if(!mKi(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#n=n,this.#r=o,this.#n===0){if(this.isUNC()){let[s,c,l,u,...d]=this.#e,[p,h,m,g,...A]=this.#t;d[0]===""&&(d.shift(),A.shift());let y=[s,c,l,u,""].join("/"),E=[p,h,m,g,""].join("/");this.#e=[y,...d],this.#t=[E,...A],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...c]=this.#e,[l,...u]=this.#t;c[0]===""&&(c.shift(),u.shift());let d=s+"/",p=l+"/";this.#e=[d,...c],this.#t=[p,...u],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===Cf}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#o=this.#o||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new t(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#a=this.#a,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#s!==void 0?this.#s:this.#s=this.#r==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};f();f();var gKi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",hne=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:o,noglobstar:s,platform:c=gKi}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=c,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:o,noglobstar:s,optimizationLevel:2,platform:c,nocomment:!0,nonegate:!0};for(let l of e)this.add(l)}add(e){let r=new z1(e,this.mmopts);for(let n=0;n[e,!!(r&2),!!(r&1)])}},Kwt=class{static{a(this,"SubWalks")}store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(o=>o.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},EEe=class t{static{a(this,"Processor")}hasWalkedCache;matches=new Ywt;subwalks=new Kwt;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new zwt}processPatterns(e,r){this.patterns=r;let n=r.map(o=>[e,o]);for(let[o,s]of n){this.hasWalkedCache.storeWalked(o,s);let c=s.root(),l=s.isAbsolute()&&this.opts.absolute!==!1;if(c){o=o.resolve(c==="/"&&this.opts.root!==void 0?this.opts.root:c);let h=s.rest();if(h)s=h;else{this.matches.add(o,!0,!1);continue}}if(o.isENOENT())continue;let u,d,p=!1;for(;typeof(u=s.pattern())=="string"&&(d=s.rest());)o=o.resolve(u),s=d,p=!0;if(u=s.pattern(),d=s.rest(),p){if(this.hasWalkedCache.hasWalked(o,s))continue;this.hasWalkedCache.storeWalked(o,s)}if(typeof u=="string"){let h=u===".."||u===""||u===".";this.matches.add(o.resolve(u),l,h);continue}else if(u===Cf){(!o.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(o,s);let h=d?.pattern(),m=d?.rest();if(!d||(h===""||h===".")&&!m)this.matches.add(o,l,h===""||h===".");else if(h===".."){let g=o.parent||o;m?this.hasWalkedCache.hasWalked(g,m)||this.subwalks.add(g,m):this.matches.add(g,l,!0)}}else u instanceof RegExp&&this.subwalks.add(o,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),o=this.child();for(let s of r)for(let c of n){let l=c.isAbsolute(),u=c.pattern(),d=c.rest();u===Cf?o.testGlobstar(s,c,d,l):u instanceof RegExp?o.testRegExp(s,u,d,l):o.testString(s,u,d,l)}return o}testGlobstar(e,r,n,o){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,o,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),o);else if(s===".."){let c=e.parent||e;this.subwalks.add(c,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),o)}}testRegExp(e,r,n,o){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,o,!1))}testString(e,r,n,o){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,o,!1))}};var AKi=a((t,e)=>typeof t=="string"?new hne([t],e):Array.isArray(t)?new hne(t,e):t,"makeIgnore"),b9e=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=AKi(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!="function")){let o="cannot ignore child matches, ignore lacks add() method.";throw new Error(o)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let c=await s.realpath();c&&(c.isUnknown()||this.opts.stat)&&await c.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let c=s.realpathSync();c&&(c?.isUnknown()||this.opts.stat)&&c.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let o=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+o)}else{let s=this.opts.posix?e.relativePosix():e.relative(),c=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?c+s+o:"."+o)}}async match(e,r,n){let o=await this.matchCheck(e,n);o&&this.matchFinish(o,r)}matchSync(e,r,n){let o=this.matchCheckSync(e,n);o&&this.matchFinish(o,r)}walkCB(e,r,n){this.signal?.aborted&&n(),this.walkCB2(e,r,new EEe(this.opts),n)}walkCB2(e,r,n,o){if(this.#i(e))return o();if(this.signal?.aborted&&o(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,o));return}n.processPatterns(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||(s++,this.match(l,u,d).then(()=>c()));for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,n,c):l.readdirCB((d,p)=>this.walkCB3(l,p,n,c),!0)}c()}walkCB3(e,r,n,o){n=n.filterEntries(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||(s++,this.match(l,u,d).then(()=>c()));for(let[l,u]of n.subwalks.entries())s++,this.walkCB2(l,u,n.child(),c);c()}walkCBSync(e,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,r,new EEe(this.opts),n)}walkCB2Sync(e,r,n,o){if(this.#i(e))return o();if(this.signal?.aborted&&o(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,o));return}n.processPatterns(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||this.matchSync(l,u,d);for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,n,c)}c()}walkCB3Sync(e,r,n,o){n=n.filterEntries(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||this.matchSync(l,u,d);for(let[l,u]of n.subwalks.entries())s++,this.walkCB2Sync(l,u,n.child(),c);c()}},CEe=class extends b9e{static{a(this,"GlobWalker")}matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},_Ee=class extends b9e{static{a(this,"GlobStream")}results;constructor(e,r,n){super(e,r,n),this.results=new Y6({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var yKi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",zx=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,pGr.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(u=>u.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(u=>u.includes("/")?u:`./**/${u}`)}if(this.pattern=e,this.platform=r.platform||yKi,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let u=r.platform==="win32"?dne:r.platform==="darwin"?yEe:r.platform?fne:fGr;this.scurry=new u(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",o={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(u=>new z1(u,o)),[c,l]=s.reduce((u,d)=>(u[0].push(...d.set),u[1].push(...d.globParts),u),[[],[]]);this.patterns=c.map((u,d)=>{let p=l[d];if(!p)throw new Error("invalid pattern object");return new pne(u,p,0,this.platform)})}async walk(){return[...await new CEe(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new CEe(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new _Ee(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new _Ee(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};f();var Jwt=a((t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new z1(r,e).hasMagic())return!0;return!1},"hasMagic");function S9e(t,e={}){return new zx(t,e).streamSync()}a(S9e,"globStreamSync");function mGr(t,e={}){return new zx(t,e).stream()}a(mGr,"globStream");function gGr(t,e={}){return new zx(t,e).walkSync()}a(gGr,"globSync");async function hGr(t,e={}){return new zx(t,e).walk()}a(hGr,"glob_");function I9e(t,e={}){return new zx(t,e).iterateSync()}a(I9e,"globIterateSync");function AGr(t,e={}){return new zx(t,e).iterate()}a(AGr,"globIterate");var EKi=S9e,CKi=Object.assign(mGr,{sync:S9e}),_Ki=I9e,vKi=Object.assign(AGr,{sync:I9e}),bKi=Object.assign(gGr,{stream:S9e,iterate:I9e}),T9e=Object.assign(hGr,{glob:hGr,globSync:gGr,sync:bKi,globStream:mGr,stream:CKi,globStreamSync:S9e,streamSync:EKi,globIterate:AGr,iterate:vKi,globIterateSync:I9e,iterateSync:_Ki,Glob:zx,hasMagic:Jwt,escape:one,unescape:$x});T9e.glob=T9e;var Xwt=class{constructor(e,r){this.matchKind=e;this.promptFileEntry=r;let{promptPath:n,parsedPromptFile:o}=r;this._name=n.name??o.header?.name??ei(o.uri).replace(".instructions.md","")}static{a(this,"CustomInstruction")}get parsedPromptFile(){return this.promptFileEntry.parsedPromptFile}get uri(){return this.parsedPromptFile.uri}get name(){return this._name}get applyTo(){return this.parsedPromptFile.header?.applyTo||void 0}get description(){return this.promptFileEntry.promptPath.description??this.parsedPromptFile.header?.description}get content(){return this.parsedPromptFile.body?.content??""}get isReadonly(){let e=this.promptFileEntry.promptPath.storage;return this.isBuiltIn||e==="extension"}get isBuiltIn(){return this.promptFileEntry.promptPath.storage==="clsAssets"}},yGr="AGENTS.md",EGr="CLAUDE.md",TKi="CLAUDE.local.md",SKi=".github/copilot-instructions.md",IKi=".github/git-commit-instructions.md",CGr="global-copilot-instructions",_Gr="global-git-commit-instructions",vGr="global-agents-md-instructions",bGr="global-claude-md-instructions",xKi="global-instruction-file",TGr=".github/instructions",od=class t{constructor(e){this.ctx=e;this.logger=new Se("CustomInstructionService");this.globalInstructionFiles=Promise.resolve([]);this.instructionFileLocations=new Map}static{a(this,"CustomInstructionService")}static{this.parser=new H6}async listCustomInstructions(e){return(await this.ctx.get(K1).collect(this.ctx,"instructions",e)).map(o=>new Xwt("ApplyToPattern",o))}async listMatchingInstructions(e,r){let n=await this.listCustomInstructions(e),o=[],s=0;for(let d of n){let p=!1;if(d.matchKind==="AlwaysApplied")p=!0;else{let h=d.applyTo;if(!h)continue;let m=pwt(h);m.isValid?hwt(r,m.pattern)&&(p=!0):this.logger.warn(this.ctx,`Invalid applyTo pattern in ${d.uri}: ${m.error}`)}p&&(o.push(d),s++)}let c=0,l=await this.getGlobalInstructionFiles();for(let d of l){let p=!1;if(d.matchKind==="AlwaysApplied")p=!0;else{let h=d.applyTo;if(h){let m=pwt(h);m.isValid&&hwt(r,m.pattern)&&(p=!0)}}p&&(o.push(d),c++)}let u=yt.createAndMarkAsIssued({workspaceInstructionCount:s.toString(),globalInstructionCount:c.toString()});return Kn(this.ctx,"customization.instruction.collected",u),o}async getCustomInstructionById(e,r){return(await this.listCustomInstructions(e)).find(o=>o.uri===r)}setInstructionFileLocations(e,r){let n=VX(e),o=FQr(r,TGr);r&&r.length>0?this.instructionFileLocations.set(n,r):this.instructionFileLocations.delete(n);let s=yt.createAndMarkAsIssued({promptMetadata:o?"customized":"default"},{fileCount:r.length});at(this.ctx,"instruction.setWorkspace",s)}getInstructionFileLocations(e){let r=VX(e),n=this.instructionFileLocations.get(r)||[];return n.length>0?n:[TGr]}setGlobalInstructionFiles(e){let r=e||[];this.globalInstructionFiles=this.resolveGlobalInstructions(r,xKi,"ApplyToPattern");let n=yt.createAndMarkAsIssued(void 0,{fileCount:r.length});at(this.ctx,"instruction.setGlobal",n)}getGlobalInstructionFiles(){return this.globalInstructionFiles}setGlobalCopilotInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalCopilotInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},CGr,"AlwaysApplied"):void 0}else this.globalCopilotInstructions=this.resolveGlobalInstruction(e,CGr,"AlwaysApplied")}setGlobalGitCommitInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalGitCommitInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},_Gr,"AlwaysApplied"):void 0}else this.globalGitCommitInstructions=this.resolveGlobalInstruction(e,_Gr,"AlwaysApplied")}setGlobalAgentsMdInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalAgentsMdInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},vGr,"AlwaysApplied"):void 0}else this.globalAgentsMdInstructions=this.resolveGlobalInstruction(e,vGr,"AlwaysApplied")}setGlobalClaudeMdInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalClaudeMdInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},bGr,"AlwaysApplied"):void 0}else this.globalClaudeMdInstructions=this.resolveGlobalInstruction(e,bGr,"AlwaysApplied")}getGlobalCopilotInstructions(){return this.globalCopilotInstructions}getGlobalGitCommitInstructions(){return this.globalGitCommitInstructions}getGlobalAgentsMdInstructions(){return this.globalAgentsMdInstructions}getGlobalClaudeMdInstructions(){return this.globalClaudeMdInstructions}async getGlobalInstructions(e={}){let r=[];if(e.includeCodeGenerationInstructions&&this.globalCopilotInstructions){let n=await this.globalCopilotInstructions;n&&r.push(n)}if(e.includeCommitMessageGenerationInstructions&&this.globalGitCommitInstructions){let n=await this.globalGitCommitInstructions;n&&r.push(n)}if(e.includeAgentsMdInstructions&&this.globalAgentsMdInstructions){let n=await this.globalAgentsMdInstructions;n&&r.push(n)}if(e.includeClaudeMdInstructions&&this.globalClaudeMdInstructions){let n=await this.globalClaudeMdInstructions;n&&r.push(n)}return r}async resolveGlobalInstruction(e,r,n){if(e.type==="content"){let o=e.content||void 0;if(!o)return;let s=`${jj}${r}`,c=t.parser.parse(s,o),l=c.body?.content??o;return l.trim()?{matchKind:n,uri:s,name:c.header?.name??r,applyTo:c.header?.applyTo||void 0,description:c.header?.description,content:l,isReadonly:!0,isBuiltIn:!1}:void 0}try{let o=(await this.ctx.get(Xn).readFileString(e.uri)).trim();if(!o)return;let s=t.parser.parse(e.uri,o),c=s.body?.content??"";return c.trim()?{matchKind:n,uri:e.uri,name:s.header?.name??ei(e.uri).replace(/\.instructions\.md$/,"").replace(/\.md$/,""),applyTo:s.header?.applyTo||void 0,description:s.header?.description,content:c,isReadonly:!0,isBuiltIn:!1}:void 0}catch(o){this.logger.warn(this.ctx,`Failed to read instruction file at ${e.uri}:`,o);return}}async resolveGlobalInstructions(e,r,n){let o=[];for(let s of e)try{let c=await this.resolveGlobalInstruction(s,r,n);c&&o.push(c)}catch(c){this.logger.warn(this.ctx,"Failed to parse global instruction file:",c)}return o}async readFromWorkspaces(e,r,n={}){let o=[];if(!r.length)return o;let s=r.flatMap(c=>{let l=[];return n.includeCodeGenerationInstructions!==!1&&l.push(this._collectInstructionsFromFile(e,c,SKi,"AlwaysApplied",o)),n.includeCommitMessageGenerationInstructions&&l.push(this._collectInstructionsFromFile(e,c,IKi,"AlwaysApplied",o)),n.includeClaudeMdInstructions===!0&&(l.push(this._collectInstructionsFromFile(e,c,EGr,"AlwaysApplied",o)),l.push(this._collectInstructionsFromFile(e,c,TKi,"AlwaysApplied",o)),n.includeNestedClaudeMdInstructions===!0&&l.push(this.collectNestedInstructionFilesInWorkspace(e,c,EGr,"AlwaysApplied",o))),n.includeAgentsMdInstructions===!0&&(l.push(this._collectInstructionsFromFile(e,c,yGr,"AlwaysApplied",o)),n.includeNestedAgentsMdInstructions===!0&&l.push(this.collectNestedInstructionFilesInWorkspace(e,c,yGr,"AlwaysApplied",o))),l});return await Promise.all(s),o}async _collectInstructionsFromFile(e,r,n,o,s){try{let c=Ti(r.uri,n),l=(await e.get(Xn).readFileString(c)).trim();if(!l)return;(await V6(e,{uri:c},l)).status==="valid"&&s.push({matchKind:o,uri:c,name:c,content:l,isReadonly:!0,isBuiltIn:!1})}catch{}}async listNestedInstructionFilesInWorkspace(e,r){return await T9e(`*/**/${r}`,{ignore:[".github/**","build/**","target/**","node_modules/**","out/**","dist/**",".git/**"],nodir:!0,absolute:!1,cwd:e.uri})}async collectNestedInstructionFilesInWorkspace(e,r,n,o,s){let c=await this.listNestedInstructionFilesInWorkspace(r,n);await Promise.all(c.map(l=>this._collectInstructionsFromFile(e,r,l,o,s)))}async collectAllInstructions(e,r,n={},o){let s=[];if(s.push(...await this.getGlobalInstructions(n)),s.push(...await this.readFromWorkspaces(e,r,n)),n.includePromptInstructionFiles!==!1){let c=await this.listMatchingInstructions(r,o||[]);s.push(...c)}return s}static formatInstructions(e,r={}){if(!e||e.length===0)return;let n=[];for(let s of e)s.content.trim()&&n.push(` +`))}},Awt=class extends Error{static{a(this,"ListenerLeakError")}constructor(e,r){super(e),this.name="ListenerLeakError",this.stack=r}},ywt=class extends Error{static{a(this,"ListenerRefusalError")}constructor(e,r){super(e),this.name="ListenerRefusalError",this.stack=r}},Kzi=0,mre=class{constructor(e){this.value=e;this.id=Kzi++}static{a(this,"UniqueContainer")}},Jzi=2,Xzi=a((t,e)=>{if(t instanceof mre)e(t);else for(let r=0;r0||this._options?.leakWarningThreshold?new gwt(e?.onListenerError??dre,this._options?.leakWarningThreshold??cqr):void 0,this._perfMon=this._options?._profName?new mwt(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}static{a(this,"Emitter")}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(aqr){let e=this._listeners;queueMicrotask(()=>{Xzi(e,r=>r.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,r,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let d=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],p=new ywt(`${u}. HINT: Stack shows most frequent listener (${d[1]}-times)`,d[0]);return(this._options?.onListenerError||dre)(p),N1.None}if(this._disposed)return N1.None;r&&(e=e.bind(r));let o=new mre(e),s,c;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=jAe.create(),s=this._leakageMon.check(o.stack,this._size+1)),aqr&&(o.stack=c??jAe.create()),this._listeners?this._listeners instanceof mre?(this._deliveryQueue??=new Ewt,this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let l=q6e(()=>{s?.(),this._removeListener(o)});return n instanceof d6?n.add(l):Array.isArray(n)&&n.push(l),l},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let r=this._listeners,n=r.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[n]=void 0;let o=this._deliveryQueue.current===this;if(this._size*Jzi<=r.length){let s=0;for(let c=0;c0}};var Ewt=class{constructor(){this.i=-1;this.end=0}static{a(this,"EventDeliveryQueuePrivate")}enqueue(e,r,n){this.i=0,this.end=n,this.current=e,this.value=r}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};var lqr=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),Zzi;(n=>{function t(o){return o===n.None||o===n.Cancelled||o instanceof _wt?!0:!o||typeof o!="object"?!1:typeof o.isCancellationRequested=="boolean"&&typeof o.onCancellationRequested=="function"}n.isCancellationToken=t,a(t,"isCancellationToken"),n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:$Ae.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:lqr})})(Zzi||={});var _wt=class{constructor(){this._isCancelled=!1;this._emitter=null}static{a(this,"MutableToken")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?lqr:(this._emitter||(this._emitter=new M1),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};f();var f6=class{constructor(e){this.executor=e;this._didRun=!1}static{a(this,"Lazy")}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};f();function j6e(t){return!!t&&typeof t.then=="function"}a(j6e,"isThenable");var H6e=class{constructor(e,r){this._isDisposed=!1;this._token=-1,typeof e=="function"&&typeof r=="number"&&this.setIfNotSet(e,r)}static{a(this,"TimeoutTimer")}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,r){if(this._isDisposed)throw new La("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},r)}setIfNotSet(e,r){if(this._isDisposed)throw new La("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},r))}};var tYi;(r=>{async function t(n){let o,s=await Promise.all(n.map(c=>c.then(l=>l,l=>{o||(o=l)})));if(typeof o<"u")throw o;return s}r.settled=t,a(t,"settled");function e(n){return new Promise(async(o,s)=>{try{await n(o,s)}catch(c){s(c)}})}r.withAsyncBody=e,a(e,"withAsyncBody")})(tYi||={});var uqr=class t{static{a(this,"AsyncIterableObject")}static fromArray(e){return new t(r=>{r.emitMany(e)})}static fromPromise(e){return new t(async r=>{r.emitMany(await e)})}static fromPromisesResolveOrder(e){return new t(async r=>{await Promise.all(e.map(async n=>r.emitOne(await n)))})}static merge(e){return new t(async r=>{await Promise.all(e.map(async n=>{for await(let o of n)r.emitOne(o)}))})}static{this.EMPTY=t.fromArray([])}constructor(e,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new M1,queueMicrotask(async()=>{let n={emitOne:a(o=>this.emitOne(o),"emitOne"),emitMany:a(o=>this.emitMany(o),"emitMany"),reject:a(o=>this.reject(o),"reject")};try{await Promise.resolve(e(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:a(async()=>{do{if(this._state===2)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0}),"return")}}static map(e,r){return new t(async n=>{for await(let o of e)n.emitOne(r(o))})}map(e){return t.map(this,e)}static filter(e,r){return new t(async n=>{for await(let o of e)r(o)&&n.emitOne(o)})}filter(e){return t.filter(this,e)}static coalesce(e){return t.filter(e,r=>!!r)}coalesce(){return t.coalesce(this)}static async toPromise(e){let r=[];for await(let n of e)r.push(n);return r}toPromise(){return t.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};f();f();f();f();f();var $6e=!1,V6e=!1,VAe=!1,rYi=!1,nYi=!1,dqr=!1,iYi=!1,oYi=!1,sYi=!1,aYi=!1;var BM,LM=globalThis,yT;typeof LM.vscode<"u"&&typeof LM.vscode.process<"u"?yT=LM.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(yT=process);var fqr=typeof yT?.versions?.electron=="string",cYi=fqr&&yT?.type==="renderer";typeof yT=="object"?($6e=yT.platform==="win32",V6e=yT.platform==="darwin",VAe=yT.platform==="linux",rYi=VAe&&!!yT.env.SNAP&&!!yT.env.SNAP_REVISION,iYi=fqr,sYi=!!yT.env.CI||!!yT.env.BUILD_ARTIFACTSTAGINGDIRECTORY,nYi=!0):typeof navigator=="object"&&!cYi?(BM=navigator.userAgent,$6e=BM.indexOf("Windows")>=0,V6e=BM.indexOf("Macintosh")>=0,oYi=(BM.indexOf("Macintosh")>=0||BM.indexOf("iPad")>=0||BM.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,VAe=BM.indexOf("Linux")>=0,aYi=BM?.indexOf("Mobi")>=0,dqr=!0):console.error("Unable to resolve platform.");var Cwt=0;V6e?Cwt=1:$6e?Cwt=3:VAe&&(Cwt=2);var vwt=$6e,pqr=V6e,hqr=VAe;var lYi=dqr&&typeof LM.importScripts=="function",u1l=lYi?LM.origin:void 0;var FP=BM;var uYi=typeof LM.postMessage=="function"&&!LM.importScripts,d1l=(()=>{if(uYi){let t=[];LM.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=t.length;n{let n=++e;t.push({id:n,callback:r}),LM.postMessage({vscodeScheduleAsyncWork:n},"*")}}return t=>setTimeout(t)})();var dYi=!!(FP&&FP.indexOf("Chrome")>=0),f1l=!!(FP&&FP.indexOf("Firefox")>=0),p1l=!!(!dYi&&FP&&FP.indexOf("Safari")>=0),h1l=!!(FP&&FP.indexOf("Edg/")>=0),m1l=!!(FP&&FP.indexOf("Android")>=0);var qH,bwt=globalThis.vscode;if(typeof bwt<"u"&&typeof bwt.process<"u"){let t=bwt.process;qH={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?qH={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:qH={get platform(){return vwt?"win32":pqr?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var WAe=qH.cwd,mqr=qH.env,gqr=qH.platform,C1l=qH.arch;var pYi=65,hYi=97,mYi=90,gYi=122,m6=46,eh=47,UE=92,p6=58,AYi=63,W6e=class extends Error{static{a(this,"ErrorInvalidArgType")}constructor(e,r,n){let o;typeof r=="string"&&r.indexOf("not ")===0?(o="must not be",r=r.replace(/^not /,"")):o="must be";let s=e.indexOf(".")!==-1?"property":"argument",c=`The "${e}" ${s} ${o} of type ${r}`;c+=`. Received type ${typeof n}`,super(c),this.code="ERR_INVALID_ARG_TYPE"}};function yYi(t,e){if(t===null||typeof t!="object")throw new W6e(e,"Object",t)}a(yYi,"validateObject");function Sd(t,e){if(typeof t!="string")throw new W6e(e,"string",t)}a(Sd,"validateString");var QE=gqr==="win32";function yo(t){return t===eh||t===UE}a(yo,"isPathSeparator");function Twt(t){return t===eh}a(Twt,"isPosixPathSeparator");function h6(t){return t>=pYi&&t<=mYi||t>=hYi&&t<=gYi}a(h6,"isWindowsDeviceRoot");function z6e(t,e,r,n){let o="",s=0,c=-1,l=0,u=0;for(let d=0;d<=t.length;++d){if(d2){let p=o.lastIndexOf(r);p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf(r)),c=d,l=0;continue}else if(o.length!==0){o="",s=0,c=d,l=0;continue}}e&&(o+=o.length>0?`${r}..`:"..",s=2)}else o.length>0?o+=`${r}${t.slice(c+1,d)}`:o=t.slice(c+1,d),s=d-c-1;c=d,l=0}else u===m6&&l!==-1?++l:l=-1}return o}a(z6e,"normalizeString");function EYi(t){return t?`${t[0]==="."?"":"."}${t}`:""}a(EYi,"formatExt");function Aqr(t,e){yYi(e,"pathObject");let r=e.dir||e.root,n=e.base||`${e.name||""}${EYi(e.ext)}`;return r?r===e.root?`${r}${n}`:`${r}${t}${n}`:n}a(Aqr,"_format");var c0={resolve(...t){let e="",r="",n=!1;for(let o=t.length-1;o>=-1;o--){let s;if(o>=0){if(s=t[o],Sd(s,`paths[${o}]`),s.length===0)continue}else e.length===0?s=WAe():(s=mqr[`=${e}`]||WAe(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===UE)&&(s=`${e}\\`));let c=s.length,l=0,u="",d=!1,p=s.charCodeAt(0);if(c===1)yo(p)&&(l=1,d=!0);else if(yo(p))if(d=!0,yo(s.charCodeAt(1))){let h=2,m=h;for(;h2&&yo(s.charCodeAt(2))&&(d=!0,l=3));if(u.length>0)if(e.length>0){if(u.toLowerCase()!==e.toLowerCase())continue}else e=u;if(n){if(e.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=d,d&&e.length>0)break}return r=z6e(r,!n,"\\",yo),n?`${e}\\${r}`:`${e}${r}`||"."},normalize(t){Sd(t,"path");let e=t.length;if(e===0)return".";let r=0,n,o=!1,s=t.charCodeAt(0);if(e===1)return Twt(s)?"\\":t;if(yo(s))if(o=!0,yo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&yo(t.charCodeAt(2))&&(o=!0,r=3));let c=r0&&yo(t.charCodeAt(e-1))&&(c+="\\"),n===void 0?o?`\\${c}`:c:o?`${n}\\${c}`:`${n}${c}`},isAbsolute(t){Sd(t,"path");let e=t.length;if(e===0)return!1;let r=t.charCodeAt(0);return yo(r)||e>2&&h6(r)&&t.charCodeAt(1)===p6&&yo(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,r;for(let s=0;s0&&(e===void 0?e=r=c:e+=`\\${c}`)}if(e===void 0)return".";let n=!0,o=0;if(typeof r=="string"&&yo(r.charCodeAt(0))){++o;let s=r.length;s>1&&yo(r.charCodeAt(1))&&(++o,s>2&&(yo(r.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(e=`\\${e.slice(o)}`)}return c0.normalize(e)},relative(t,e){if(Sd(t,"from"),Sd(e,"to"),t===e)return"";let r=c0.resolve(t),n=c0.resolve(e);if(r===n||(t=r.toLowerCase(),e=n.toLowerCase(),t===e))return"";let o=0;for(;oo&&t.charCodeAt(s-1)===UE;)s--;let c=s-o,l=0;for(;ll&&e.charCodeAt(u-1)===UE;)u--;let d=u-l,p=cp){if(e.charCodeAt(l+m)===UE)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}c>p&&(t.charCodeAt(o+m)===UE?h=m:m===2&&(h=3)),h===-1&&(h=0)}let g="";for(m=o+h+1;m<=s;++m)(m===s||t.charCodeAt(m)===UE)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${n.slice(l,u)}`:(n.charCodeAt(l)===UE&&++l,n.slice(l,u))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=c0.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===UE){if(e.charCodeAt(1)===UE){let r=e.charCodeAt(2);if(r!==AYi&&r!==m6)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(h6(e.charCodeAt(0))&&e.charCodeAt(1)===p6&&e.charCodeAt(2)===UE)return`\\\\?\\${e}`;return t},dirname(t){Sd(t,"path");let e=t.length;if(e===0)return".";let r=-1,n=0,o=t.charCodeAt(0);if(e===1)return yo(o)?t:".";if(yo(o)){if(r=n=1,yo(t.charCodeAt(1))){let l=2,u=l;for(;l2&&yo(t.charCodeAt(2))?3:2,n=r);let s=-1,c=!0;for(let l=e-1;l>=n;--l)if(yo(t.charCodeAt(l))){if(!c){s=l;break}}else c=!1;if(s===-1){if(r===-1)return".";s=r}return t.slice(0,s)},basename(t,e){e!==void 0&&Sd(e,"suffix"),Sd(t,"path");let r=0,n=-1,o=!0,s;if(t.length>=2&&h6(t.charCodeAt(0))&&t.charCodeAt(1)===p6&&(r=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=r;--s){let u=t.charCodeAt(s);if(yo(u)){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=r;--s)if(yo(t.charCodeAt(s))){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Sd(t,"path");let e=0,r=-1,n=0,o=-1,s=!0,c=0;t.length>=2&&t.charCodeAt(1)===p6&&h6(t.charCodeAt(0))&&(e=n=2);for(let l=t.length-1;l>=e;--l){let u=t.charCodeAt(l);if(yo(u)){if(!s){n=l+1;break}continue}o===-1&&(s=!1,o=l+1),u===m6?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===n+1?"":t.slice(r,o)},format:Aqr.bind(null,"\\"),parse(t){Sd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.length,n=0,o=t.charCodeAt(0);if(r===1)return yo(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(yo(o)){if(n=1,yo(t.charCodeAt(1))){let h=2,m=h;for(;h0&&(e.root=t.slice(0,n));let s=-1,c=n,l=-1,u=!0,d=t.length-1,p=0;for(;d>=n;--d){if(o=t.charCodeAt(d),yo(o)){if(!u){c=d+1;break}continue}l===-1&&(u=!1,l=d+1),o===m6?s===-1?s=d:p!==1&&(p=1):s!==-1&&(p=-1)}return l!==-1&&(s===-1||p===0||p===1&&s===l-1&&s===c+1?e.base=e.name=t.slice(c,l):(e.name=t.slice(c,s),e.base=t.slice(c,l),e.ext=t.slice(s,l))),c>0&&c!==n?e.dir=t.slice(0,c-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},_Yi=(()=>{if(QE){let t=/\\/g;return()=>{let e=WAe().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>WAe()})(),Yu={resolve(...t){let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){let o=n>=0?t[n]:_Yi();Sd(o,`paths[${n}]`),o.length!==0&&(e=`${o}/${e}`,r=o.charCodeAt(0)===eh)}return e=z6e(e,!r,"/",Twt),r?`/${e}`:e.length>0?e:"."},normalize(t){if(Sd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===eh,r=t.charCodeAt(t.length-1)===eh;return t=z6e(t,!e,"/",Twt),t.length===0?e?"/":r?"./":".":(r&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Sd(t,"path"),t.length>0&&t.charCodeAt(0)===eh},join(...t){if(t.length===0)return".";let e;for(let r=0;r0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Yu.normalize(e)},relative(t,e){if(Sd(t,"from"),Sd(e,"to"),t===e||(t=Yu.resolve(t),e=Yu.resolve(e),t===e))return"";let r=1,n=t.length,o=n-r,s=1,c=e.length-s,l=ol){if(e.charCodeAt(s+d)===eh)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else o>l&&(t.charCodeAt(r+d)===eh?u=d:d===0&&(u=0));let p="";for(d=r+u+1;d<=n;++d)(d===n||t.charCodeAt(d)===eh)&&(p+=p.length===0?"..":"/..");return`${p}${e.slice(s+u)}`},toNamespacedPath(t){return t},dirname(t){if(Sd(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===eh,r=-1,n=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===eh){if(!n){r=o;break}}else n=!1;return r===-1?e?"/":".":e&&r===1?"//":t.slice(0,r)},basename(t,e){e!==void 0&&Sd(e,"ext"),Sd(t,"path");let r=0,n=-1,o=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let c=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){let u=t.charCodeAt(s);if(u===eh){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),c>=0&&(u===e.charCodeAt(c)?--c===-1&&(n=s):(c=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===eh){if(!o){r=s+1;break}}else n===-1&&(o=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){Sd(t,"path");let e=-1,r=0,n=-1,o=!0,s=0;for(let c=t.length-1;c>=0;--c){let l=t.charCodeAt(c);if(l===eh){if(!o){r=c+1;break}continue}n===-1&&(o=!1,n=c+1),l===m6?e===-1?e=c:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},format:Aqr.bind(null,"/"),parse(t){Sd(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let r=t.charCodeAt(0)===eh,n;r?(e.root="/",n=1):n=0;let o=-1,s=0,c=-1,l=!0,u=t.length-1,d=0;for(;u>=n;--u){let p=t.charCodeAt(u);if(p===eh){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),p===m6?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}if(c!==-1){let p=s===0&&r?1:s;o===-1||d===0||d===1&&o===c-1&&o===s+1?e.base=e.name=t.slice(p,c):(e.name=t.slice(p,o),e.base=t.slice(p,c),e.ext=t.slice(o,c))}return s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Yu.win32=c0.win32=c0;Yu.posix=c0.posix=Yu;var CYi=QE?c0.normalize:Yu.normalize,vYi=QE?c0.isAbsolute:Yu.isAbsolute,Y6e=QE?c0.join:Yu.join,b1l=QE?c0.resolve:Yu.resolve,T1l=QE?c0.relative:Yu.relative,S1l=QE?c0.dirname:Yu.dirname,yqr=QE?c0.basename:Yu.basename,Eqr=QE?c0.extname:Yu.extname,I1l=QE?c0.format:Yu.format,x1l=QE?c0.parse:Yu.parse,w1l=QE?c0.toNamespacedPath:Yu.toNamespacedPath,GH=QE?c0.sep:Yu.sep,R1l=QE?c0.delimiter:Yu.delimiter;f();f();function TYi(t){return t}a(TYi,"identity");var K6e=class{constructor(e,r){this.lastCache=void 0;this.lastArgKey=void 0;typeof e=="function"?(this._fn=e,this._computeKey=TYi):(this._fn=r,this._computeKey=e.getCacheKey)}static{a(this,"LRUCachedFunction")}get(e){let r=this._computeKey(e);return this.lastArgKey!==r&&(this.lastArgKey=r,this.lastCache=this._fn(e)),this.lastCache}};f();function Swt(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}a(Swt,"escapeRegExpCharacters");function Tqr(t,e){if(!t||!e)return t;let r=e.length;if(r===0||t.length===0)return t;let n=0;for(;t.indexOf(e,n)===n;)n=n+r;return t.substring(n)}a(Tqr,"ltrim");function J6e(t){return t.split(/\r\n|\r|\n/)}a(J6e,"splitLines");function Iwt(t,e){return te?1:0}a(Iwt,"compare");function X6e(t,e,r=0,n=t.length,o=0,s=e.length){for(;rd)return 1}let c=n-r,l=s-o;return cl?1:0}a(X6e,"compareSubstring");function xwt(t,e){return YAe(t,e,0,t.length,0,e.length)}a(xwt,"compareIgnoreCase");function YAe(t,e,r=0,n=t.length,o=0,s=e.length){for(;r=128||d>=128)return X6e(t.toLowerCase(),e.toLowerCase(),r,n,o,s);_qr(u)&&(u-=32),_qr(d)&&(d-=32);let p=u-d;if(p!==0)return p}let c=n-r,l=s-o;return cl?1:0}a(YAe,"compareSubstringIgnoreCase");function _qr(t){return t>=97&&t<=122}a(_qr,"isLowerAsciiLetter");function Sqr(t,e){let r=e.length;return e.length>t.length?!1:YAe(t,e,0,r)===0}a(Sqr,"startsWithIgnoreCase");function gre(t,e){let r=Math.min(t.length,e.length),n;for(n=0;n0&&t.charCodeAt(0)===65279)}a(SYi,"startsWithUTF8BOM");function Iqr(t){return SYi(t)?t.substr(1):t}a(Iqr,"stripUTF8BOM");var Cqr=class t{static{a(this,"GraphemeBreakTree")}static{this._INSTANCE=null}static getInstance(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE}constructor(){this._data=IYi()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let r=this._data,n=r.length/3,o=1;for(;o<=n;)if(er[3*o+1])o=2*o+1;else return r[3*o+2];return 0}};function IYi(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}a(IYi,"getGraphemeBreakRawData");var vqr=class t{constructor(e){this.confusableDictionary=e}static{a(this,"AmbiguousCharacters")}static{this.ambiguousCharacterData=new f6(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new K6e({getCacheKey:JSON.stringify},e=>{function r(p){let h=new Map;for(let m=0;m!p.startsWith("_")&&p in s);c.length===0&&(c=["_default"]);let l;for(let p of c){let h=r(s[p]);l=o(l,h)}let u=r(s._common),d=n(u,l);return new t(d)})}static getInstance(e){return t.cache.get(Array.from(e))}static{this._locales=new f6(()=>Object.keys(t.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return t._locales.value}isAmbiguous(e){return this.confusableDictionary.has(e)}containsAmbiguousCharacter(e){for(let r=0;rt.length)return!1;if(r){if(!Sqr(t,e))return!1;if(e.length===t.length)return!0;let s=e.length;return e.charAt(e.length-1)===n&&s--,t.charAt(s)===n}return e.charAt(e.length-1)!==n&&(e+=n),t.indexOf(e)===0}a(xqr,"isEqualOrParent");var Z6e="**",wqr="/",eFe="[/\\\\]",tFe="[^/\\\\]",xYi=/\//g;function Rqr(t,e){switch(t){case 0:return"";case 1:return`${tFe}*?`;default:return`(?:${eFe}|${tFe}+${eFe}${e?`|${eFe}${tFe}+`:""})*?`}}a(Rqr,"starsToRegExp");function XAe(t,e){if(!t)return[];let r=[],n=!1,o=!1,s="";for(let c of t){switch(c){case e:if(!n&&!o){r.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}s+=c}return s&&r.push(s),r}a(XAe,"splitGlobAware");function Nqr(t){if(!t)return"";let e="",r=XAe(t,wqr);if(r.every(n=>n===Z6e))e=".*";else{let n=!1;r.forEach((o,s)=>{if(o===Z6e){if(n)return;e+=Rqr(2,s===r.length-1)}else{let c=!1,l="",u=!1,d="";for(let p of o){if(p!=="}"&&c){l+=p;continue}if(u&&(p!=="]"||!d)){let h;p==="-"?h=p:(p==="^"||p==="!")&&!d?h="^":p===wqr?h="":h=Swt(p),d+=h;continue}switch(p){case"{":c=!0;continue;case"[":u=!0;continue;case"}":{let m=`(?:${XAe(l,",").map(g=>Nqr(g)).join("|")})`;e+=m,c=!1,l="";break}case"]":{e+="["+d+"]",u=!1,d="";break}case"?":e+=tFe;continue;case"*":e+=Rqr(1);continue;default:e+=Swt(p)}}skwt(l,e)).filter(l=>l!==Px),t),n=r.length;if(!n)return Px;if(n===1)return r[0];let o=a(function(l,u){for(let d=0,p=r.length;d!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(BYi,"trivia3");function Dqr(t,e,r){let n=GH===Yu.sep,o=n?t:t.replace(xYi,GH),s=GH+o,c=Yu.sep+t,l;return r?l=a(function(u,d){return typeof u=="string"&&(u===o||u.endsWith(s)||!n&&(u===t||u.endsWith(c)))?e:null},"parsedPattern"):l=a(function(u,d){return typeof u=="string"&&(u===o||!n&&u===t)?e:null},"parsedPattern"),l.allPaths=[(r?"*/":"./")+t],l}a(Dqr,"trivia4and5");function LYi(t){try{let e=new RegExp(`^${Nqr(t)}$`);return function(r){return e.lastIndex=0,typeof r=="string"&&e.test(r)?t:null}}catch{return Px}}a(LYi,"toRegExp");function Oqr(t,e,r){return!t||typeof e!="string"?!1:Dwt(t)(e,void 0,r)}a(Oqr,"match");function Dwt(t,e={}){if(!t)return Pwt;if(typeof t=="string"||FYi(t)){let r=kwt(t,e);if(r===Px)return Pwt;let n=a(function(o,s){return!!r(o,s)},"resultPattern");return r.allBasenames&&(n.allBasenames=r.allBasenames),r.allPaths&&(n.allPaths=r.allPaths),n}return UYi(t,e)}a(Dwt,"parse");function FYi(t){let e=t;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}a(FYi,"isRelativePattern");function UYi(t,e){let r=Bqr(Object.getOwnPropertyNames(t).map(l=>QYi(l,t[l],e)).filter(l=>l!==Px)),n=r.length;if(!n)return Px;if(!r.some(l=>!!l.requiresSiblings)){if(n===1)return r[0];let l=a(function(p,h){let m;for(let g=0,A=r.length;g{for(let g of m){let A=await g;if(typeof A=="string")return A}return null})():null},"resultExpression"),u=r.find(p=>!!p.allBasenames);u&&(l.allBasenames=u.allBasenames);let d=r.reduce((p,h)=>h.allPaths?p.concat(h.allPaths):p,[]);return d.length&&(l.allPaths=d),l}let o=a(function(l,u,d){let p,h;for(let m=0,g=r.length;m{for(let m of h){let g=await m;if(typeof g=="string")return g}return null})():null},"resultExpression"),s=r.find(l=>!!l.allBasenames);s&&(o.allBasenames=s.allBasenames);let c=r.reduce((l,u)=>u.allPaths?l.concat(u.allPaths):l,[]);return c.length&&(o.allPaths=c),o}a(UYi,"parsedExpression");function QYi(t,e,r){if(e===!1)return Px;let n=kwt(t,r);if(n===Px)return Px;if(typeof e=="boolean")return n;if(e){let o=e.when;if(typeof o=="string"){let s=a((c,l,u,d)=>{if(!d||!n(c,l))return null;let p=o.replace("$(basename)",()=>u),h=d(p);return j6e(h)?h.then(m=>m?t:null):h?t:null},"result");return s.requiresSiblings=!0,s}}return n}a(QYi,"parseExpressionPattern");function Bqr(t,e){let r=t.filter(l=>!!l.basenames);if(r.length<2)return t;let n=r.reduce((l,u)=>{let d=u.basenames;return d?l.concat(d):l},[]),o;if(e){o=[];for(let l=0,u=n.length;l{let d=u.patterns;return d?l.concat(d):l},[]);let s=a(function(l,u){if(typeof l!="string")return null;if(!u){let p;for(p=l.length;p>0;p--){let h=l.charCodeAt(p-1);if(h===47||h===92)break}u=l.substr(p)}let d=n.indexOf(u);return d!==-1?o[d]:null},"aggregate");s.basenames=n,s.patterns=o,s.allBasenames=n;let c=t.filter(l=>!l.basenames);return c.push(s),c}a(Bqr,"aggregateBasenameMatches");function Nwt(t){if(!t||t.trim()==="")return{pattern:t,isValid:!1,error:"Pattern cannot be empty"};let e=t.trim();return qYi(e)?{pattern:e,isValid:!0}:{pattern:e,isValid:!1,error:"Invalid glob pattern"}}a(Nwt,"validate");function Mwt(t,e){let r=XAe(e,","),n=a(o=>{if(o=o.trim(),o.length!==0){if(o==="**"||o==="**/*"||o==="*")return{pattern:o};!o.startsWith("/")&&!o.startsWith("**/")&&(o="**/"+o);for(let s of t)if(Oqr(o,s))return{pattern:o,file:s}}},"patternMatches");for(let o of r){let s=n(o);if(s)return s}}a(Mwt,"matches");function qYi(t){try{let e=XAe(t,",");if(e.length===0)return!1;for(let r of e){let n=Dwt(r);if(Mqr(n))return!1}return!0}catch{return!1}}a(qYi,"isValidGlob");f();function GYi(t,e){return!(t.length===0||t.length===1&&t[0]===e)}a(GYi,"isLocationCustomized");function Lqr(t,e){return GYi(t,e)}a(Lqr,"isInstructionLocationCustomized");f();f();function qqr(t,e=[],r={}){let n=t.length===0?[]:t.split(/\r\n|\n/);return new Bwt(n,e,r).parse()}a(qqr,"parse");function ZAe(t,e){return{line:t,character:e}}a(ZAe,"createPosition");function ET(t,e,r){return{type:"string",value:t,start:e,end:r}}a(ET,"createStringNode");function HYi(t,e,r){return{type:"number",value:t,start:e,end:r}}a(HYi,"createNumberNode");function Fqr(t,e,r){return{type:"boolean",value:t,start:e,end:r}}a(Fqr,"createBooleanNode");function jYi(t,e){return{type:"null",value:null,start:t,end:e}}a(jYi,"createNullNode");function Uqr(t,e,r){return{type:"object",start:e,end:r,properties:t}}a(Uqr,"createObjectNode");function Qqr(t,e,r){return{type:"array",start:e,end:r,items:t}}a(Qqr,"createArrayNode");function Gqr(t){return t===" "||t===" "}a(Gqr,"isWhitespace");function $Yi(t){return/^-?\d*\.?\d+$/.test(t)}a($Yi,"isValidNumber");var Owt=class{constructor(e){this.currentLine=0;this.currentChar=0;this.lines=e}static{a(this,"YamlLexer")}getCurrentPosition(){return ZAe(this.currentLine,this.currentChar)}getCurrentLineNumber(){return this.currentLine}getCurrentCharNumber(){return this.currentChar}getCurrentLineText(){return this.currentLine=this.lines.length}getCurrentChar(){return this.isAtEnd()||this.currentChar>=this.lines[this.currentLine].length?"":this.lines[this.currentLine][this.currentChar]}peek(e=1){let r=this.currentChar+e;return this.currentLine>=this.lines.length||r>=this.lines[this.currentLine].length?"":this.lines[this.currentLine][r]}advance(){let e=this.getCurrentChar();return this.currentChar>=this.lines[this.currentLine].length&&this.currentLine0&&!e.startsWith("#")){this.skipWhitespace();return}}if(this.currentLine++,this.currentChar=0,this.currentLine0&&!e.startsWith("#")){this.skipWhitespace();return}}}}},Bwt=class{constructor(e,r,n){this.flowLevel=0;this.lexer=new Owt(e),this.errors=r,this.options=n}static{a(this,"YamlParser")}addError(e,r,n,o){this.errors.push({message:e,code:r,start:n,end:o})}parseValue(e){if(this.lexer.skipWhitespace(),this.lexer.isAtEnd()){let n=this.lexer.getCurrentPosition();return ET("",n,n)}let r=this.lexer.getCurrentChar();return r==='"'||r==="'"?this.parseQuotedString(r):r==="["?this.parseInlineArray():r==="{"?this.parseInlineObject():this.parseUnquotedValue()}parseQuotedString(e){let r=this.lexer.getCurrentPosition();this.lexer.advance();let n="";for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==e;)n+=this.lexer.advance();this.lexer.getCurrentChar()===e&&this.lexer.advance();let o=this.lexer.getCurrentPosition();return ET(n,r,o)}parseUnquotedValue(){let e=this.lexer.getCurrentPosition(),r="",n=e,o=a(d=>d==="#"||this.flowLevel>0&&(d===","||d==="]"||d==="}"),"isTerminator"),s=this.lexer.getCurrentChar();if(s==='"'||s==="'")for(r+=this.lexer.advance(),n=this.lexer.getCurrentPosition();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="";){let d=this.lexer.getCurrentChar();if(d===s||o(d))break;r+=this.lexer.advance(),n=this.lexer.getCurrentPosition()}else for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="";){let d=this.lexer.getCurrentChar();if(o(d))break;r+=this.lexer.advance(),n=this.lexer.getCurrentPosition()}let c=r.trimEnd(),l=r.length-c.length;l&&(n=ZAe(e.line,n.character-l));let u=s==='"'||s==="'"?c.substring(1):c;return this.createValueNode(u,e,n)}createValueNode(e,r,n){if(e==="")return ET("",r,r);if(e==="true")return Fqr(!0,r,n);if(e==="false")return Fqr(!1,r,n);if(e==="null"||e==="~")return jYi(r,n);let o=Number(e);return!isNaN(o)&&isFinite(o)&&$Yi(e)?HYi(o,r,n):ET(e,r,n)}parseInlineArray(){let e=this.lexer.getCurrentPosition();this.lexer.advance(),this.flowLevel++;let r=[];for(;!this.lexer.isAtEnd();){if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="]"){this.lexer.advance();break}if(this.lexer.getCurrentChar()===""){this.lexer.advanceLine();continue}if(this.lexer.getCurrentChar()==="#"){this.lexer.skipToEndOfLine(),this.lexer.advanceLine();continue}let o=this.lexer.savePosition(),s=this.parseValue();s.type==="string"&&s.value===""&&s.start.line===s.end.line&&s.start.character===s.end.character||r.push(s);let c=this.lexer.savePosition();if(o.line===c.line&&o.char===c.char)if(!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="")this.lexer.advance();else break;this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===","&&this.lexer.advance()}let n=this.lexer.getCurrentPosition();return this.flowLevel--,Qqr(r,e,n)}parseInlineObject(){let e=this.lexer.getCurrentPosition();this.lexer.advance(),this.flowLevel++;let r=[];for(;!this.lexer.isAtEnd();){if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="}"){this.lexer.advance();break}if(this.lexer.getCurrentChar()==="#"){this.lexer.skipToEndOfLine(),this.lexer.advanceLine();continue}let o=this.lexer.savePosition(),s=this.lexer.getCurrentPosition(),c="";if(this.lexer.getCurrentChar()==='"'||this.lexer.getCurrentChar()==="'"){let h=this.lexer.getCurrentChar();for(this.lexer.advance();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==h;)c+=this.lexer.advance();this.lexer.getCurrentChar()===h&&this.lexer.advance()}else for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==":";)c+=this.lexer.advance();c=c.trim();let l=this.lexer.getCurrentPosition(),u=ET(c,s,l);this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===":"&&this.lexer.advance(),this.lexer.skipWhitespace();let d=this.parseValue();r.push({key:u,value:d});let p=this.lexer.savePosition();if(o.line===p.line&&o.char===p.char)if(!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!=="")this.lexer.advance();else break;this.lexer.skipWhitespace(),this.lexer.getCurrentChar()===","&&this.lexer.advance()}let n=this.lexer.getCurrentPosition();return this.flowLevel--,Uqr(r,e,n)}parseBlockArray(e){let r=this.lexer.getCurrentPosition(),n=[];for(;!this.lexer.isAtEnd()&&(this.lexer.moveToNextNonEmptyLine(),!this.lexer.isAtEnd());){let s=this.lexer.getIndentation();if(ss)if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"){let u=this.parseBlockArray(l);n.push(u)}else{let u=this.lexer.getCurrentLineText(),d=this.lexer.getCurrentCharNumber(),p=u.substring(d);if(p.includes(":")&&!p.trim().startsWith("#")){let h=this.parseBlockObject(l,this.lexer.getCurrentCharNumber());n.push(h)}else n.push(ET("",c,c))}else n.push(ET("",c,c))}else{let l=this.lexer.getCurrentLineText(),u=this.lexer.getCurrentCharNumber();if(l.substring(u).includes(":")){let h=this.parseBlockObject(c.character,c.character);n.push(h)}else{let h=this.parseValue();for(n.push(h);!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!=="#";)this.lexer.advance();this.lexer.advanceLine()}}}else break}let o=r;return n.length>0?o=n[n.length-1].end:o=ZAe(r.line,r.character+1),Qqr(n,r,o)}parseBlockObject(e,r){let n=this.lexer.getCurrentPosition(),o=[],s=new Set,c=r!==void 0,l=!0;for(;!this.lexer.isAtEnd()&&((!l||!c)&&this.lexer.moveToNextNonEmptyLine(),l=!1,!this.lexer.isAtEnd());){let d=this.lexer.getIndentation();if(c){if(this.lexer.skipWhitespace(),this.lexer.getCurrentCharNumber()e){let E=ZAe(this.lexer.getCurrentLineNumber(),0),_=ZAe(this.lexer.getCurrentLineNumber(),this.lexer.getCurrentLineText().length);this.addError("Unexpected indentation","indentation",E,_),this.lexer.skipWhitespace()}else this.lexer.skipWhitespace()}let p=this.lexer.getCurrentPosition(),h="";for(;!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!==":";)h+=this.lexer.advance();h=h.trim();let m=this.lexer.getCurrentPosition(),g=ET(h,p,m);!this.options.allowDuplicateKeys&&s.has(h)&&this.addError(`Duplicate key '${h}'`,"duplicateKey",p,m),s.add(h),this.lexer.getCurrentChar()===":"&&this.lexer.advance(),this.lexer.skipWhitespace();let A,y=this.lexer.getCurrentPosition();if(this.lexer.getCurrentChar()===""||this.lexer.getCurrentChar()==="#")if(this.lexer.advanceLine(),this.lexer.isAtEnd())A=ET("",y,y);else{let E=this.lexer.getIndentation();if(E>d)if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-")A=this.parseBlockArray(E);else{let _=this.lexer.getCurrentLineText(),v=this.lexer.getCurrentCharNumber(),b=_.substring(v);b.includes(":")&&!b.trim().startsWith("#")?A=this.parseBlockObject(E):A=this.parseValue()}else!c&&E===d?(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"?A=this.parseBlockArray(d):A=ET("",y,y)):A=ET("",y,y)}else{for(A=this.parseValue();!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()!==""&&this.lexer.getCurrentChar()!=="#"&&Gqr(this.lexer.getCurrentChar());)this.lexer.advance();this.lexer.getCurrentChar()==="#"&&this.lexer.skipToEndOfLine(),!this.lexer.isAtEnd()&&this.lexer.getCurrentChar()===""&&this.lexer.advanceLine()}o.push({key:g,value:A})}let u=n;return o.length>0&&(u=o[o.length-1].value.end),Uqr(o,n,u)}parse(){if(!this.lexer.isAtEnd()&&(this.lexer.moveToNextNonEmptyLine(),!this.lexer.isAtEnd()))if(this.lexer.skipWhitespace(),this.lexer.getCurrentChar()==="-"){let e=this.lexer.peek();return e===" "||e===" "||e===""||e==="#"?this.parseBlockArray(0):this.parseValue()}else{if(this.lexer.getCurrentChar()==="[")return this.parseInlineArray();if(this.lexer.getCurrentChar()==="{")return this.parseInlineObject();{let e=this.lexer.getCurrentLineText(),r=this.lexer.getCurrentCharNumber(),n=e.substring(r),o=!1,s=!1,c="";for(let l=0;lp>0&&d.match(/^---[\s\r\n]*$/));l===-1?(l=n.length,c=n.length):c=l+1;let u=new kx.Range(2,1,l+1,1);o=new Uwt(u,n)}if(c({message:c.message,range:this.asRange(c),code:c.code}));if(n)if(n.type!=="object")s.push({message:"Invalid header, expecting pairs",range:this.range,code:"INVALID_YAML"});else for(let c of n.properties)o.push({key:c.key.value,range:this.asRange({start:c.key.start,end:c.value.end}),value:this.asValue(c.value)});this._parsed={node:n,attributes:o,errors:s}}return this._parsed}asRange({start:e,end:r}){return new kx.Range(this.range.startLineNumber+e.line,e.character+1,this.range.startLineNumber+r.line,r.character+1)}asValue(e){switch(e.type){case"string":return{type:"string",value:e.value,range:this.asRange(e)};case"number":return{type:"number",value:e.value,range:this.asRange(e)};case"boolean":return{type:"boolean",value:e.value,range:this.asRange(e)};case"null":return{type:"null",value:e.value,range:this.asRange(e)};case"array":return{type:"array",items:e.items.map(r=>this.asValue(r)),range:this.asRange(e)};case"object":return{type:"object",properties:e.properties.map(n=>({key:this.asValue(n.key),value:this.asValue(n.value)})),range:this.asRange(e)}}}get attributes(){return this._parsedHeader.attributes}getAttribute(e){return this._parsedHeader.attributes.find(r=>r.key===e)}get errors(){return this._parsedHeader.errors}getStringAttribute(e){let r=this._parsedHeader.attributes.find(n=>n.key===e);if(r?.value.type==="string")return r.value.value}get name(){return this.getStringAttribute("name")}get description(){return this.getStringAttribute("description")}get agent(){return this.getStringAttribute("agent")??this.getStringAttribute("mode")}get model(){return this.getStringAttribute("model")}get applyTo(){return this.getStringAttribute("applyTo")}get invokePolicy(){let e=this._parsedHeader.attributes.find(r=>r.key===WYi);if(e?.value.type==="array"){let r=[];for(let n of e.value.items)n.type==="string"&&n.value&&r.push(n.value);return r}}get tools(){let e=this._parsedHeader.attributes.find(r=>r.key==="tools");if(e){if(e.value.type==="array"){let r=[];for(let n of e.value.items)n.type==="string"&&n.value&&r.push(n.value);return r}else if(e.value.type==="object"){let r=[],n=a(({key:o,value:s})=>{s.type==="boolean"?r.push(o.value):s.type==="object"&&s.properties.forEach(n)},"collectLeafs");return e.value.properties.forEach(n),r}}}get handOffs(){let e=this._parsedHeader.attributes.find(r=>r.key==="handoffs");if(e&&e.value.type==="array"){let r=[];for(let n of e.value.items)if(n.type==="object"){let o,s,c,l;for(let u of n.properties)u.key.value==="agent"&&u.value.type==="string"?o=u.value.value:u.key.value==="label"&&u.value.type==="string"?s=u.value.value:u.key.value==="prompt"&&u.value.type==="string"?c=u.value.value:u.key.value==="send"&&u.value.type==="boolean"&&(l=u.value.value);o&&s&&c!==void 0&&r.push({agent:o,label:s,prompt:c,send:l})}return r}}},Qwt=class{constructor(e,r,n){this.range=e;this.linesWithEOL=r;this.uri=n}static{a(this,"PromptBody")}get fileReferences(){return this.getParsedBody().fileReferences}get variableReferences(){return this.getParsedBody().variableReferences}get offset(){return this.getParsedBody().bodyOffset}getParsedBody(){if(this._parsed===void 0){let e=[],r=[],n=[],o=this.linesWithEOL.slice(0,this.range.startLineNumber-1).reduce((s,c)=>c.length+s,0);for(let s=this.range.startLineNumber-1,c=o;skx.Range.areIntersectingOrTouching(A,m)))continue;let g=h[1];if(g){if(g==="file:"){let A=h.index+h[0].length-h[2].length,y=h.index+h[0].length,E=new kx.Range(s+1,A+1,s+1,y+1);r.push({content:h[2],range:E,isMarkdownLink:!1})}}else{let A=h.index+1,y=h.index+h[0].length,E=new kx.Range(s+1,A+1,s+1,y+1);n.push({name:h[2],range:E,offset:c+h.index})}}c+=l.length}this._parsed={fileReferences:r.sort((s,c)=>kx.Range.compareRangesUsingStarts(s.range,c.range)),variableReferences:n,bodyOffset:o}}return this._parsed}get content(){return this._content===void 0&&(this._content=this.linesWithEOL.slice(this.range.startLineNumber-1,this.range.endLineNumber-1).join("").trim()),this._content}};f();var zYi=".prompt.md",YYi=".instructions.md",KYi=".agent.md",JYi="SKILL.md";function jqr(t){if(t.endsWith(zYi))return"prompt";if(t.endsWith(YYi))return"instructions";if(t.endsWith(KYi))return"agent";if(t.endsWith(JYi))return"skill"}a(jqr,"getPromptFileType");f();f();f();var eye={isBlocked:!1,reason:"VALID_FILE"},oFe={isBlocked:!1,reason:"NO_MATCHING_POLICY"},$qr={isBlocked:!0,reason:"POLICY_ERROR",message:"Copilot is disabled because we could not fetch the repository policy"},jH={all:"all",repo:"repo"},A6=new Se("contentExclusion");f();f();var sFe=class{static{a(this,"PolicyEvaluator")}};f();f();f();var Vqr=new Se("repository"),$H=class t{constructor(){this.data={}}static{a(this,"GitConfigData")}getKeys(){return Object.keys(this.data)}getEntries(){return Object.entries(this.data)}get(e){let r=this.getAll(e);return r?r[r.length-1]:void 0}getAll(e){return this.data[this.normalizeKey(e)]}add(e,r){e in this.data||(this.data[e]=[]),this.data[e].push(r)}getSectionValues(e,r){let n=`${e}.`.toLowerCase(),o=`.${r}`.toLowerCase();return Object.keys(this.data).filter(s=>s.startsWith(n)&&s.endsWith(o)).map(s=>s.slice(n.length,-o.length))}concat(e){return this.getEntries().concat(e.getEntries()).reduce((r,[n,o])=>(o.forEach(s=>r.add(n,s)),r),new t)}normalizeKey(e){let r=e.split(".");return r[0]=r[0].toLowerCase(),r[r.length-1]=r[r.length-1].toLowerCase(),r.join(".")}},Dx=class{static{a(this,"GitConfigLoader")}},aFe=class extends Dx{constructor(r){super();this.loaders=r}static{a(this,"GitFallbackConfigLoader")}async getConfig(r,n){for(let o of this.loaders){let s=await o.getConfig(r,n);if(s)return s}}};f();var Wqr=require("os");var cFe=class{constructor(e){this.url=e;this.isUrl()?this.parseUrl():this.tryParseSSHString()||(this._scheme="file")}static{a(this,"GitRemoteUrl")}get scheme(){return this._scheme}get authority(){return this._authority}get hostname(){return this._hostname}get path(){return this._path}isInvalid(){return this._error!==void 0}isRemote(){return this.scheme!=="file"&&this.hostname!==void 0}isGitHub(){return this.isRemote()&&/(?:^|\.)(?:github\.com|ghe\.com)$/i.test(this.hostname??"")}isADO(){return this.isRemote()&&/(?:^|\.)(?:visualstudio\.com|azure\.com)$/i.test(this.hostname??"")}getUrlForApi(){if(!this.isRemote())return null;if(this.isUrl()&&!this.isInvalid())return H3.from({scheme:this.scheme,authority:this.authority.replace(/^[^@]+@/,""),path:this.path}).toString();if(this.scheme=="ssh"&&this.isADO()){let e=this.url.indexOf(":");return this.url.substring(0,e+1)+this.path}return this.url}isUrl(){return/[A-Za-z0-9][A-Za-z0-9]+:\/\//.test(this.url)}parseUrl(){let e;try{e=H3.parse(this.url)}catch(r){this._error=r;return}this._scheme=e.scheme,this.setAuthority(e.authority),this.setPath(e.path)}setAuthority(e){this._authority=e;let r=e.replace(/^[^@]+@/,"").replace(/:\d*$/,"");r&&(this._hostname=r)}tryParseSSHString(){let e=/^(?[^:/\\[]*(?:\[[^/\\\]]*\])?):/.exec(this.url);if(e&&((0,Wqr.platform)()!=="win32"||(e.groups?.host?.length??0)>1)){let r=e.groups?.host??"";return this._scheme="ssh",this.setAuthority(r),this.setPath(this.url.substring(r.length+1)),!0}return!1}setPath(e){if(this.isADO())try{this._path=decodeURIComponent(e);return}catch{}this._path=e}};var lFe=class{static{a(this,"GitRemoteResolver")}async resolveRemote(e,r){let n=await e.get(Dx).getConfig(e,r);if(!n)return;let o=this.getRemotes(n),s=o.filter(c=>c.url.isGitHub());if(s.length)return s.find(c=>c.name==="origin")?.url??s[0].url;if(o.length)return o.find(c=>c.name==="origin")?.url??o[0].url}getRemotes(e){let r=this.getInsteadOfRules(e);return e.getSectionValues("remote","url").map(n=>({name:n,url:new cFe(this.applyInsteadOfRules(r,e.get(`remote.${n}.url`)??""))})).filter(n=>n.url.isRemote())}applyInsteadOfRules(e,r){for(let n of e)if(r.startsWith(n.insteadOf))return n.base+r.slice(n.insteadOf.length);return r}getInsteadOfRules(e){return e.getSectionValues("url","insteadof").map(r=>({base:r,insteadOf:e.get(`url.${r}.insteadof`)})).sort((r,n)=>n.base.length-r.base.length)}};var XYi=100,qwt=class{constructor(e,r){this.baseFolder=e;this.remote=r;this.setNWO()}static{a(this,"GitRepository")}get tenant(){return this._tenant}get owner(){return this._owner}get name(){return this._name}get adoOrganization(){return this._adoOrganization}isGitHub(){return this.remote?.isGitHub()??!1}isADO(){return this.remote?.isADO()??!1}setNWO(){let e=this.remote?.path?.replace(/^\//,"").split("/");if(this.isGitHub()){this._owner=e?.[0],this._name=e?.[1]?.replace(/\.git$/,"");let r=/^(?[^.]+)\.ghe\.com$/.exec(this.remote?.hostname??"");r&&(this._tenant=r.groups?.tenant)}else if(this.isADO()&&e?.length===4){if(this.remote?.scheme==="ssh"){this._adoOrganization=e?.[1],this._owner=e?.[2],this._name=e?.[3];return}let r=/(?:(?[^.]+)\.)?visualstudio\.com$/.exec(this.remote?.hostname??"");r?(this._adoOrganization=r.groups?.org,this._owner=e?.[1],this._name=e?.[3]):(this._adoOrganization=e?.[0],this._owner=e?.[1],this._name=e?.[3])}}},lm=class t{constructor(e){this.ctx=e;this.remoteResolver=new lFe;this.cache=new $r(XYi)}static{a(this,"RepositoryManager")}async getRepo({uri:e}){let r,n=[];do{if(this.cache.has(e.toString())){let s=this.cache.get(e);return this.updateCache(n,s),s}n.push(e.toString());let o=await this.tryGetRepoForFolder(e);if(o)return this.updateCache(n,o),o;r=e,e=Lu(e)}while(e!==r);this.updateCache(n,void 0)}updateCache(e,r){e.forEach(n=>this.cache.set(n,r))}async tryGetRepoForFolder(e){return await this.isBaseRepoFolder(e)?new qwt(typeof e=="string"?{uri:e}:e,await this.repoUrl(e)):void 0}async isBaseRepoFolder(e){return await t.getRepoConfigLocation(this.ctx,e)!==void 0}async repoUrl(e){return await this.remoteResolver.resolveRemote(this.ctx,e)}static async getRepoConfigLocation(e,r){try{let n=e.get(Jn),o=bi(r,".git");if((await n.stat(o)).type&1)return await this.getConfigLocationForGitfile(n,r,o);let c=bi(o,"config");return await n.stat(c),c}catch{return}}static async getConfigLocationForGitfile(e,r,n){let s=(await e.readFileString(n)).match(/^gitdir:\s+(.+)$/m);if(!s)return;let c=cq(r,s[1]),l=bi(c,"config");if(await this.tryStat(e,l)!==void 0)return l;let u=bi(c,"config.worktree");if(await this.tryStat(e,u)!==void 0)return u;let d=bi(c,"commondir");c=cq(c,(await e.readFileString(d)).trimEnd());let p=bi(c,"config");return await e.stat(p),p}static async tryStat(e,r){try{return await e.stat(r)}catch{return}}};f();var VH=a((t,e)=>{if(PP.Check(t,e))return e;let r=`Typebox schema validation failed: +${[...PP.Errors(t,e)].map(n=>`${n.path} ${n.message}`).join(` +`)}`;throw new Error(r)},"assertShape");f();f();f();var uFe=new WeakMap;function dFe(t,e){if(t==null||typeof t!="object")return String(t);let r,n="",o=0,s=Object.prototype.toString.call(t);if(s!=="[object RegExp]"&&s!=="[object Date]"&&uFe.has(t))return uFe.get(t);switch(uFe.set(t,"~"+ ++e),s){case"[object Set]":r=Array.from(t);case"[object Array]":for(r||(r=t),n+="a";oe.delete(n))),o}a(ZYi,"n");function Kqr(t,e){return function(r,n){return ZYi(t,e,r,n)}}a(Kqr,"o");f();var yGr=de(lGr(),1);f();var rye=a(t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");f();f();var aKi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},nye=a(t=>t.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),cKi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),uGr=a(t=>t.join(""),"rangesToString"),dGr=a((t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,c=!1,l=!1,u=!1,d=!1,p=r,h="";e:for(;sh?n.push(nye(h)+"-"+nye(y)):y===h&&n.push(nye(y)),h="",s++;continue}if(t.startsWith("-]",s+1)){n.push(nye(y+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=y,s+=2;continue}n.push(nye(y)),s++}if(pe?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var GE,lKi=new Set(["!","?","+","*","@"]),$wt=a(t=>lKi.has(t),"isExtglobType"),fGr=a(t=>$wt(t.type),"isExtglobAST"),uKi=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),dKi=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),fKi=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),pGr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),pKi="(?!(?:^|/)\\.\\.?(?:$|/))",pFe="(?!\\.)",hKi=new Set(["[","."]),mKi=new Set(["..","."]),gKi=new Set("().*{}+?[]^$\\!"),AKi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Vwt="[^/]",hGr=Vwt+"*?",mGr=Vwt+"+?",WH=class{static{a(this,"AST")}type;#e;#t;#n=!1;#r=[];#i;#o;#a;#s=!1;#c;#l;#u=!1;constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#a=this.#e===this?[]:this.#e.#a,e==="!"&&!this.#e.#s&&this.#a.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#l=this.#r.map(e=>String(e)).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#i;for(;n;){for(let o=r.#o+1;!n.type&&otypeof r=="string"?r:r.toJSON()):[this.type,...this.#r.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let r=0;r{let[A,y,E,_]=typeof g=="string"?GE.#I(g,this.#t,u):g.toRegExpSource(e);return this.#t=this.#t||E,this.#n=this.#n||_,A}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&mKi.has(this.#r[0]))){let A=hKi,y=r&&A.has(d.charAt(0))||d.startsWith("\\.")&&A.has(d.charAt(2))||d.startsWith("\\.\\.")&&A.has(d.charAt(4)),E=!r&&!e&&A.has(d.charAt(0));p=y?pKi:E?pFe:""}let h="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(h="(?:$|\\/)"),[p+d+h,y6(d),this.#t=!!this.#t,this.#n]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#y(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),d=this;return d.#r=[u],d.type=null,d.#t=void 0,[u,y6(this.toString()),!1,!1]}let c=!n||e||r||!pFe?"":this.#y(!0);c===s&&(c=""),c&&(s=`(?:${s})(?:${c})*?`);let l="";if(this.type==="!"&&this.#u)l=(this.isStart()&&!r?pFe:"")+mGr;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?pFe:"")+hGr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;l=o+s+u}return[l,y6(s),this.#t=!!this.#t,this.#n]}#y(e){return this.#r.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,c]=r.toRegExpSource(e);return this.#n=this.#n||c,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#I(e,r,n=!1){let o=!1,s="",c=!1,l=!1;for(let u=0;ue?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var Ku=a((t,e,r={})=>(rye(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Are(e,r).match(t)),"minimatch"),yKi=/^\*+([^+@!?\*\[\(]*)$/,EKi=a(t=>e=>!e.startsWith(".")&&e.endsWith(t),"starDotExtTest"),_Ki=a(t=>e=>e.endsWith(t),"starDotExtTestDot"),CKi=a(t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),"starDotExtTestNocase"),vKi=a(t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),"starDotExtTestNocaseDot"),bKi=/^\*+\.\*+$/,TKi=a(t=>!t.startsWith(".")&&t.includes("."),"starDotStarTest"),SKi=a(t=>t!=="."&&t!==".."&&t.includes("."),"starDotStarTestDot"),IKi=/^\.\*+$/,xKi=a(t=>t!=="."&&t!==".."&&t.startsWith("."),"dotStarTest"),wKi=/^\*+$/,RKi=a(t=>t.length!==0&&!t.startsWith("."),"starTest"),PKi=a(t=>t.length!==0&&t!=="."&&t!=="..","starTestDot"),kKi=/^\?+([^+@!?\*\[\(]*)?$/,DKi=a(([t,e=""])=>{let r=EGr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocase"),NKi=a(([t,e=""])=>{let r=_Gr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocaseDot"),MKi=a(([t,e=""])=>{let r=_Gr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTestDot"),OKi=a(([t,e=""])=>{let r=EGr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTest"),EGr=a(([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},"qmarksTestNoExt"),_Gr=a(([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),CGr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",gGr={win32:{sep:"\\"},posix:{sep:"/"}},BKi=CGr==="win32"?gGr.win32.sep:gGr.posix.sep;Ku.sep=BKi;var kg=Symbol("globstar **");Ku.GLOBSTAR=kg;var LKi="[^/]",FKi=LKi+"*?",UKi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",QKi="(?:(?!(?:\\/|^)\\.).)*?",qKi=a((t,e={})=>r=>Ku(r,t,e),"filter");Ku.filter=qKi;var _T=a((t,e={})=>Object.assign({},t,e),"ext"),GKi=a(t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ku;let e=Ku;return Object.assign(a((n,o,s={})=>e(n,o,_T(t,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(o,s={}){super(o,_T(t,s))}static defaults(o){return e.defaults(_T(t,o)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(o,s,c={}){super(o,s,_T(t,c))}static fromGlob(o,s={}){return e.AST.fromGlob(o,_T(t,s))}},unescape:a((n,o={})=>e.unescape(n,_T(t,o)),"unescape"),escape:a((n,o={})=>e.escape(n,_T(t,o)),"escape"),filter:a((n,o={})=>e.filter(n,_T(t,o)),"filter"),defaults:a(n=>e.defaults(_T(t,n)),"defaults"),makeRe:a((n,o={})=>e.makeRe(n,_T(t,o)),"makeRe"),braceExpand:a((n,o={})=>e.braceExpand(n,_T(t,o)),"braceExpand"),match:a((n,o,s={})=>e.match(n,o,_T(t,s)),"match"),sep:e.sep,GLOBSTAR:kg})},"defaults");Ku.defaults=GKi;var vGr=a((t,e={})=>(rye(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,yGr.default)(t)),"braceExpand");Ku.braceExpand=vGr;var HKi=a((t,e={})=>new Are(t,e).makeRe(),"makeRe");Ku.makeRe=HKi;var jKi=a((t,e,r={})=>{let n=new Are(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t},"match");Ku.match=jKi;var AGr=/[?*]|[+@!]\(.*?\)|\[|\]/,$Ki=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Are=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){rye(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||CGr,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!AGr.test(s[2]))&&!AGr.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(p=>this.parse(p))];if(d)return[s[0],...s.slice(1).map(p=>this.parse(p))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;oo&&n.splice(o+1,c-o);let l=n[o+1],u=n[o+2],d=n[o+3];if(l!==".."||!u||u==="."||u===".."||!d||d==="."||d==="..")continue;r=!0,n.splice(o,1);let p=n.slice(0);p[o]="**",e.push(p),o--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,n=!1){let o=0,s=0,c=[],l="";for(;o=2&&(e=this.levelTwoFileOptimize(e)),r.includes(kg)?this.#e(e,r,n,o,s):this.#n(e,r,n,o,s)}#e(e,r,n,o,s){let c=r.indexOf(kg,s),l=r.lastIndexOf(kg),[u,d,p]=n?[r.slice(s,c),r.slice(c+1),[]]:[r.slice(s,c),r.slice(c+1,l),r.slice(l+1)];if(u.length){let v=e.slice(o,o+u.length);if(!this.#n(v,u,n,0,0))return!1;o+=u.length}let h=0;if(p.length){if(p.length+o>e.length)return!1;let v=e.length-p.length;if(this.#n(e,p,n,v,0))h=p.length;else{if(e[e.length-1]!==""||o+p.length===e.length||(v--,!this.#n(e,p,n,v,0)))return!1;h=p.length+1}}if(!d.length){let v=!!h;for(let b=o;b{let d=u.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))o.add(h);return typeof p=="string"?$Ki(p):p===kg?kg:p._src});return d.forEach((p,h)=>{let m=d[h+1],g=d[h-1];p!==kg||g===kg||(g===void 0?m!==void 0&&m!==kg?d[h+1]="(?:\\/|"+n+"\\/)?"+m:d[h]=n:m===void 0?d[h-1]=g+"(?:\\/|"+n+")?":m!==kg&&(d[h-1]=g+"(?:\\/|\\/"+n+"\\/)"+m,d[h+1]=kg))}),d.filter(p=>p!==kg).join("/")}).join("|"),[c,l]=e.length>1?["(?:",")"]:["",""];s="^"+c+s+l+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let c=o[o.length-1];if(!c)for(let l=o.length-2;!c&&l>=0;l--)c=o[l];for(let l=0;l`,{result:s,baseUri:r,fileName:l,matchingPattern:c}),this.#t.set(o,s),s}evaluateTextBasedRules(e,r,n){let o=r.filter(l=>l.ifAnyMatch),s=r.filter(l=>l.ifNoneMatch);if(!n||o.length===0&&s.length===0)return eye;let c=this.evaluateFileContent(o,s,n);return A6.debug(this.#e,`Evaluated text-based exclusion rules for <${e}>`,{result:c}),c}evaluateFileContent(e,r,n){for(let o of e)if(o.ifAnyMatch&&o.ifAnyMatch.length>0&&o.ifAnyMatch.map(c=>bGr(c)).some(c=>c.test(n)))return Ywt(o,"FILE_BLOCKED_TEXT_BASED");for(let o of r)if(o.ifNoneMatch&&o.ifNoneMatch.length>0&&!o.ifNoneMatch.map(c=>bGr(c)).some(c=>c.test(n)))return Ywt(o,"FILE_BLOCKED_TEXT_BASED");return eye}async refresh(){try{let e=[...this.#n.keys()];this.reset(),await Promise.all(e.map(r=>this.#o(r)))}catch(e){Lo(this.#e,e,`${zwt}.refresh`)}}reset(){this.#n.clear(),this.#t.clear()}async#r(e){if(this.#i?.length)return this.#i;let r=await this.#o(e.toLowerCase());if(r.length!==0)return r}#i;setTestingRules(e){this.#i=e}#o=Kqr(async e=>{let r=await this.#e.get(Nt).getGitHubSession();if(!r)throw new $i("No token found");let n=r.devOverride?.contentRestrictionsUrl??"copilot_internal/content_exclusion",o=new URL(n,r.apiUrl),s=e.includes(jH.all);e.filter(d=>d!==jH.all).length>0&&o.searchParams.set("repos",e.filter(d=>d!==jH.all).join(",")),o.searchParams.set("scope",s?jH.all:jH.repo);let l=await au(this.#e,r,o.href),u=await l.json();if(!l.ok){if(l.status===404)return Array.from(e,()=>[]);throw this.#a("fetch.error",{message:u.message}),new T2(l)}return this.#a("fetch.success"),VH(YKi,u).map(d=>d.rules)},this.#n);async getGitRepo(e){let n=await this.#e.get(lm).getRepo(Lu(e));if(!n||!n?.remote)return;let o=n.remote.getUrlForApi();if(o)return{baseFolder:n.baseFolder,url:o}}#a(e,r,n){st(this.#e,`${zwt}.${e}`,Pt.createAndMarkAsIssued(r,n))}};function bGr(t){if(!t.startsWith("/")&&!t.endsWith("/"))return new RegExp(t);let e=t.slice(1,t.lastIndexOf("/")),r=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,r)}a(bGr,"stringToRegex");function Ywt(t,e){return{isBlocked:!0,message:`Your ${t.source.type.toLowerCase()} '${t.source.name}' has disabled Copilot for this file`,reason:e}}a(Ywt,"fileBlockedEvaluationResult");var VKi=S.Object({name:S.String(),type:S.String()}),WKi=S.Object({paths:S.Array(S.String()),ifNoneMatch:S.Optional(S.Array(S.String())),ifAnyMatch:S.Optional(S.Array(S.String())),source:VKi}),Kwt=S.Array(WKi),zKi=S.Object({rules:Kwt,last_updated_at:S.String(),scope:S.String()}),YKi=S.Array(zKi);f();var zr=class{constructor(e,r=E6){this.ctx=e;this.validateTextDocument=r}static{a(this,"TextDocumentManager")}async textDocuments(){let e=this.getTextDocumentsUnsafe(),r=[];for(let n of e)(await this.validateTextDocument(this.ctx,n,n.getText())).status==="valid"&&r.push(n);return r}getTextDocumentUnsafe(e){let r=ca(e.uri);return this.getTextDocumentsUnsafe().find(n=>n.uri===r)}async getTextDocument(e){return this.getTextDocumentWithValidation(e).then(r=>{if(r.status==="valid")return r.document})}async getTextDocumentValidation(e){try{let r=this.getTextDocumentUnsafe(e)?.getText()??await this.readTextDocumentFromDisk(e.uri);return r===void 0?this.notFoundResult(e):this.validateTextDocument(this.ctx,e,r)}catch{return this.notFoundResult(e)}}async getTextDocumentWithValidation(e){let r=this.getTextDocumentUnsafe(e);if(!r)return this.notFoundResult(e);let n=await this.validateTextDocument(this.ctx,e,r.getText());return n.status==="valid"?{status:"valid",document:r}:n}notFoundResult({uri:e}){return{status:"notfound",message:`Document for URI could not be found: ${e}`}}async readTextDocumentFromDisk(e){try{if((await this.ctx.get(Jn).stat(e)).size>5*1024*1024)return}catch{return}return await this.ctx.get(Jn).readFileString(e)}getWorkspaceFolder(e){let r=ca(e.uri);return this.getWorkspaceFolders().find(n=>r.startsWith(ca(n.uri)))}getRelativePath(e){if(e.uri.startsWith("untitled:"))return;let r=ca(e.uri);for(let n of this.getWorkspaceFolders()){let o=ca(n.uri).replace(/[#?].*/,"").replace(/\/?$/,"/");if(r.startsWith(o))return r.slice(o.length)}return Zn(r)}};var Ac=class{constructor(e){this.ctx=e;this.#e=!1;this.#t=new hFe(this.ctx);this.evaluateResultCache=new Map;this.onDidChangeActiveTextEditor=a(async e=>{if(!this.#e)return;if(!e.document){this.updateStatusIcon(!1);return}let r=await this.ctx.get(zr).getTextDocumentValidation(e.document),n=r.status==="invalid",o=r.status==="invalid"?r.reason:void 0;this.updateStatusIcon(n,o)},"onDidChangeActiveTextEditor");let r=Up(this.ctx,this.onDidChangeActiveTextEditor,"Content exclusions focus change");this.ctx.get(zr).onDidFocusTextDocument(r),Ps(this.ctx,n=>{this.#e=n.envelope.copilotignore_enabled??!1,this.evaluateResultCache.clear(),this.#t.refresh()})}static{a(this,"CopilotContentExclusionManager")}#e;#t;get enabled(){return this.#e}async evaluate(e,r,n){if(!this.#e)return{isBlocked:!1};let o=[],s=a(async(u,d)=>{let p=performance.now(),h=await d.evaluate(e,r),m=performance.now();return o.push({key:u,result:h,elapsedMs:Math.round(m-p)}),h},"track"),l=(await Promise.all([s("contentExclusion.evaluate",this.#t)])).find(u=>u?.isBlocked)??{isBlocked:!1};try{for(let u of o)this.#n(u.key,e,u.result,u.elapsedMs)}catch(u){A6.error(this.ctx,"Error tracking telemetry",u)}return n==="UPDATE"&&this.updateStatusIcon(l.isBlocked,l.message),l}updateStatusIcon(e,r){this.#e&&(e?this.ctx.get(Bs).setInactive(r??"Copilot is disabled"):this.ctx.get(Bs).clearInactive())}#n(e,r,n,o){let s=r+e;if(this.evaluateResultCache.get(s)===n.reason)return!1;if(this.evaluateResultCache.set(s,n.reason??"UNKNOWN"),n.reason===oFe.reason)return A6.debug(this.ctx,`[${e}] No matching policy for this repository. uri: ${r}`),!1;let l={isBlocked:n.isBlocked?"true":"false",reason:n.reason??"UNKNOWN"},u={contentExclusionEvalMs:o};return st(this.ctx,e,Pt.createAndMarkAsIssued(l,u)),st(this.ctx,e,Pt.createAndMarkAsIssued({...l,path:r},u),1),A6.debug(this.ctx,`[${e}] ${r}`,n),!0}setTestingRules(e){this.#t.setTestingRules(e)}set __contentExclusions(e){this.#t=e}get __contentExclusions(){return this.#t}};async function E6(t,e,r){let n=await t.get(Ac).evaluate(e.uri,r);return n.isBlocked?{status:"invalid",reason:n.message??"Document is blocked by repository policy"}:{status:"valid"}}a(E6,"isDocumentValid");f();f();f();f();var Jwt=a((t,e,r)=>{let n=t instanceof RegExp?TGr(t,r):t,o=e instanceof RegExp?TGr(e,r):e,s=n!==null&&o!=null&&KKi(n,o,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+o.length)}},"balanced"),TGr=a((t,e)=>{let r=e.match(t);return r?r[0]:null},"maybeMatch"),KKi=a((t,e,r)=>{let n,o,s,c,l,u=r.indexOf(t),d=r.indexOf(e,u+1),p=u;if(u>=0&&d>0){if(t===e)return[u,d];for(n=[],s=r.length;p>=0&&!l;){if(p===u)n.push(p),u=r.indexOf(t,p+1);else if(n.length===1){let h=n.pop();h!==void 0&&(l=[h,d])}else o=n.pop(),o!==void 0&&o=0?u:d}n.length&&c!==void 0&&(l=[s,c])}return l},"range");var SGr="\0SLASH"+Math.random()+"\0",IGr="\0OPEN"+Math.random()+"\0",Zwt="\0CLOSE"+Math.random()+"\0",xGr="\0COMMA"+Math.random()+"\0",wGr="\0PERIOD"+Math.random()+"\0",JKi=new RegExp(SGr,"g"),XKi=new RegExp(IGr,"g"),ZKi=new RegExp(Zwt,"g"),eJi=new RegExp(xGr,"g"),tJi=new RegExp(wGr,"g"),rJi=/\\\\/g,nJi=/\\{/g,iJi=/\\}/g,oJi=/\\,/g,sJi=/\\\./g,aJi=1e5;function Xwt(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}a(Xwt,"numeric");function cJi(t){return t.replace(rJi,SGr).replace(nJi,IGr).replace(iJi,Zwt).replace(oJi,xGr).replace(sJi,wGr)}a(cJi,"escapeBraces");function lJi(t){return t.replace(JKi,"\\").replace(XKi,"{").replace(ZKi,"}").replace(eJi,",").replace(tJi,".")}a(lJi,"unescapeBraces");function RGr(t){if(!t)return[""];let e=[],r=Jwt("{","}",t);if(!r)return t.split(",");let{pre:n,body:o,post:s}=r,c=n.split(",");c[c.length-1]+="{"+o+"}";let l=RGr(s);return s.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),e.push.apply(e,c),e}a(RGr,"parseCommaParts");function PGr(t,e={}){if(!t)return[];let{max:r=aJi}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),iye(cJi(t),r,!0).map(lJi)}a(PGr,"expand");function uJi(t){return"{"+t+"}"}a(uJi,"embrace");function dJi(t){return/^-?0\d/.test(t)}a(dJi,"isPadded");function fJi(t,e){return t<=e}a(fJi,"lte");function pJi(t,e){return t>=e}a(pJi,"gte");function iye(t,e,r){let n=[],o=Jwt("{","}",t);if(!o)return[t];let s=o.pre,c=o.post.length?iye(o.post,e,!1):[""];if(/\$$/.test(o.pre))for(let l=0;l=0;if(!d&&!p)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+Zwt+o.post,iye(t,e,!0)):[t];let h;if(d)h=o.body.split(/\.\./);else if(h=RGr(o.body),h.length===1&&h[0]!==void 0&&(h=iye(h[0],e,!1).map(uJi),h.length===1))return c.map(g=>o.pre+h[0]+g);let m;if(d&&h[0]!==void 0&&h[1]!==void 0){let g=Xwt(h[0]),A=Xwt(h[1]),y=Math.max(h[0].length,h[1].length),E=h.length===3&&h[2]!==void 0?Math.max(Math.abs(Xwt(h[2])),1):1,_=fJi;A0){let R=new Array(w+1).join("0");I<0?x="-"+R+x.slice(1):x=R+x}}m.push(x)}}else{m=[];for(let g=0;g{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");f();f();var hJi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},sye=a(t=>t.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),mJi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),kGr=a(t=>t.join(""),"rangesToString"),DGr=a((t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,c=!1,l=!1,u=!1,d=!1,p=r,h="";e:for(;sh?n.push(sye(h)+"-"+sye(y)):y===h&&n.push(sye(y)),h="",s++;continue}if(t.startsWith("-]",s+1)){n.push(sye(y+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=y,s+=2;continue}n.push(sye(y)),s++}if(pr?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),"unescape");var HE,gJi=new Set(["!","?","+","*","@"]),eRt=a(t=>gJi.has(t),"isExtglobType"),NGr=a(t=>eRt(t.type),"isExtglobAST"),AJi=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),yJi=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),EJi=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),MGr=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),_Ji="(?!(?:^|/)\\.\\.?(?:$|/))",mFe="(?!\\.)",CJi=new Set(["[","."]),vJi=new Set(["..","."]),bJi=new Set("().*{}+?[]^$\\!"),TJi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),tRt="[^/]",OGr=tRt+"*?",BGr=tRt+"+?",SJi=0,zH=class{static{a(this,"AST")}type;#e;#t;#n=!1;#r=[];#i;#o;#a;#s=!1;#c;#l;#u=!1;id=++SJi;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#a=this.#e===this?[]:this.#e.#a,e==="!"&&!this.#e.#s&&this.#a.push(this),this.#o=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#l=this.#r.map(e=>String(e)).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#i;for(;n;){for(let o=r.#o+1;!n.type&&otypeof r=="string"?r:r.toJSON()):[this.type,...this.#r.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let r=0;rtypeof g!="string"),d=this.#r.map(g=>{let[A,y,E,_]=typeof g=="string"?HE.#I(g,this.#t,u):g.toRegExpSource(e);return this.#t=this.#t||E,this.#n=this.#n||_,A}).join(""),p="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&vJi.has(this.#r[0]))){let A=CJi,y=r&&A.has(d.charAt(0))||d.startsWith("\\.")&&A.has(d.charAt(2))||d.startsWith("\\.\\.")&&A.has(d.charAt(4)),E=!r&&!e&&A.has(d.charAt(0));p=y?_Ji:E?mFe:""}let h="";return this.isEnd()&&this.#e.#s&&this.#i?.type==="!"&&(h="(?:$|\\/)"),[p+d+h,Mx(d),this.#t=!!this.#t,this.#n]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#y(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString(),d=this;return d.#r=[u],d.type=null,d.#t=void 0,[u,Mx(this.toString()),!1,!1]}let c=!n||e||r||!mFe?"":this.#y(!0);c===s&&(c=""),c&&(s=`(?:${s})(?:${c})*?`);let l="";if(this.type==="!"&&this.#u)l=(this.isStart()&&!r?mFe:"")+BGr;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?mFe:"")+OGr+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;l=o+s+u}return[l,Mx(s),this.#t=!!this.#t,this.#n]}#_(){if(NGr(this)){let e=0,r=!1;do{r=!0;for(let n=0;n{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,c]=r.toRegExpSource(e);return this.#n=this.#n||c,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#I(e,r,n=!1){let o=!1,s="",c=!1,l=!1;for(let u=0;ur?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var ZA=a((t,e,r={})=>(oye(e),!r.nocomment&&e.charAt(0)==="#"?!1:new O1(e,r).match(t)),"minimatch"),IJi=/^\*+([^+@!?\*\[\(]*)$/,xJi=a(t=>e=>!e.startsWith(".")&&e.endsWith(t),"starDotExtTest"),wJi=a(t=>e=>e.endsWith(t),"starDotExtTestDot"),RJi=a(t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),"starDotExtTestNocase"),PJi=a(t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),"starDotExtTestNocaseDot"),kJi=/^\*+\.\*+$/,DJi=a(t=>!t.startsWith(".")&&t.includes("."),"starDotStarTest"),NJi=a(t=>t!=="."&&t!==".."&&t.includes("."),"starDotStarTestDot"),MJi=/^\.\*+$/,OJi=a(t=>t!=="."&&t!==".."&&t.startsWith("."),"dotStarTest"),BJi=/^\*+$/,LJi=a(t=>t.length!==0&&!t.startsWith("."),"starTest"),FJi=a(t=>t.length!==0&&t!=="."&&t!=="..","starTestDot"),UJi=/^\?+([^+@!?\*\[\(]*)?$/,QJi=a(([t,e=""])=>{let r=UGr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocase"),qJi=a(([t,e=""])=>{let r=QGr([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},"qmarksTestNocaseDot"),GJi=a(([t,e=""])=>{let r=QGr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTestDot"),HJi=a(([t,e=""])=>{let r=UGr([t]);return e?n=>r(n)&&n.endsWith(e):r},"qmarksTest"),UGr=a(([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},"qmarksTestNoExt"),QGr=a(([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),qGr=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",LGr={win32:{sep:"\\"},posix:{sep:"/"}},jJi=qGr==="win32"?LGr.win32.sep:LGr.posix.sep;ZA.sep=jJi;var pf=Symbol("globstar **");ZA.GLOBSTAR=pf;var $Ji="[^/]",VJi=$Ji+"*?",WJi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",zJi="(?:(?!(?:\\/|^)\\.).)*?",YJi=a((t,e={})=>r=>ZA(r,t,e),"filter");ZA.filter=YJi;var CT=a((t,e={})=>Object.assign({},t,e),"ext"),KJi=a(t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ZA;let e=ZA;return Object.assign(a((n,o,s={})=>e(n,o,CT(t,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(o,s={}){super(o,CT(t,s))}static defaults(o){return e.defaults(CT(t,o)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(o,s,c={}){super(o,s,CT(t,c))}static fromGlob(o,s={}){return e.AST.fromGlob(o,CT(t,s))}},unescape:a((n,o={})=>e.unescape(n,CT(t,o)),"unescape"),escape:a((n,o={})=>e.escape(n,CT(t,o)),"escape"),filter:a((n,o={})=>e.filter(n,CT(t,o)),"filter"),defaults:a(n=>e.defaults(CT(t,n)),"defaults"),makeRe:a((n,o={})=>e.makeRe(n,CT(t,o)),"makeRe"),braceExpand:a((n,o={})=>e.braceExpand(n,CT(t,o)),"braceExpand"),match:a((n,o,s={})=>e.match(n,o,CT(t,s)),"match"),sep:e.sep,GLOBSTAR:pf})},"defaults");ZA.defaults=KJi;var GGr=a((t,e={})=>(oye(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:PGr(t,{max:e.braceExpandMax})),"braceExpand");ZA.braceExpand=GGr;var JJi=a((t,e={})=>new O1(t,e).makeRe(),"makeRe");ZA.makeRe=JJi;var XJi=a((t,e,r={})=>{let n=new O1(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t},"match");ZA.match=XJi;var FGr=/[?*]|[+@!]\(.*?\)|\[|\]/,ZJi=a(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),O1=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){oye(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||qGr,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,c,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=s[0]===""&&s[1]===""&&(s[2]==="?"||!FGr.test(s[2]))&&!FGr.test(s[3]),d=/^[a-z]:/i.test(s[0]);if(u)return[...s.slice(0,4),...s.slice(4).map(p=>this.parse(p))];if(d)return[s[0],...s.slice(1).map(p=>this.parse(p))]}return s.map(u=>this.parse(u))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;oo&&n.splice(o+1,c-o);let l=n[o+1],u=n[o+2],d=n[o+3];if(l!==".."||!u||u==="."||u===".."||!d||d==="."||d==="..")continue;r=!0,n.splice(o,1);let p=n.slice(0);p[o]="**",e.push(p),o--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,n=!1){let o=0,s=0,c=[],l="";for(;o=2&&(e=this.levelTwoFileOptimize(e)),r.includes(pf)?this.#e(e,r,n,o,s):this.#n(e,r,n,o,s)}#e(e,r,n,o,s){let c=r.indexOf(pf,s),l=r.lastIndexOf(pf),[u,d,p]=n?[r.slice(s,c),r.slice(c+1),[]]:[r.slice(s,c),r.slice(c+1,l),r.slice(l+1)];if(u.length){let v=e.slice(o,o+u.length);if(!this.#n(v,u,n,0,0))return!1;o+=u.length,s+=u.length}let h=0;if(p.length){if(p.length+o>e.length)return!1;let v=e.length-p.length;if(this.#n(e,p,n,v,0))h=p.length;else{if(e[e.length-1]!==""||o+p.length===e.length||(v--,!this.#n(e,p,n,v,0)))return!1;h=p.length+1}}if(!d.length){let v=!!h;for(let b=o;b{let d=u.map(h=>{if(h instanceof RegExp)for(let m of h.flags.split(""))o.add(m);return typeof h=="string"?ZJi(h):h===pf?pf:h._src});d.forEach((h,m)=>{let g=d[m+1],A=d[m-1];h!==pf||A===pf||(A===void 0?g!==void 0&&g!==pf?d[m+1]="(?:\\/|"+n+"\\/)?"+g:d[m]=n:g===void 0?d[m-1]=A+"(?:\\/|\\/"+n+")?":g!==pf&&(d[m-1]=A+"(?:\\/|\\/"+n+"\\/)"+g,d[m+1]=pf))});let p=d.filter(h=>h!==pf);if(this.partial&&p.length>=1){let h=[];for(let m=1;m<=p.length;m++)h.push(p.slice(0,m).join("/"));return"(?:"+h.join("|")+")"}return p.join("/")}).join("|"),[c,l]=e.length>1?["(?:",")"]:["",""];s="^"+c+s+l+"$",this.partial&&(s="^(?:\\/|"+c+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let c=o[o.length-1];if(!c)for(let l=o.length-2;!c&&l>=0;l--)c=o[l];for(let l=0;l{typeof rRt.emitWarning=="function"?rRt.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},"emitWarning"),gFe=globalThis.AbortController,HGr=globalThis.AbortSignal;if(typeof gFe>"u"){HGr=class{static{a(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,o){this._onabort.push(o)}},gFe=class{static{a(this,"AbortController")}constructor(){e()}signal=new HGr;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let o of this.signal._onabort)o(n);this.signal.onabort?.(n)}}};let t=rRt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=a(()=>{t&&(t=!1,$Gr("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var eXi=a(t=>!jGr.has(t),"shouldWarn");var _6=a(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),VGr=a(t=>_6(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_re:null:null,"getUintArray"),_re=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},nRt=class t{static{a(this,"Stack")}heap;length;static#e=!1;static create(e){let r=VGr(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},aye=class t{static{a(this,"LRUCache")}#e;#t;#n;#r;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#s;#c;#l;#u;#f;#p;#h;#m;#E;#g;#v;#S;#C;#b;#_;#y;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#C,sizes:e.#v,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#f,prev:e.#p,get head(){return e.#h},get tail(){return e.#m},free:e.#E,isBackgroundFetch:a(r=>e.#A(r),"isBackgroundFetch"),backgroundFetch:a((r,n,o,s)=>e.#F(r,n,o,s),"backgroundFetch"),moveToTail:a(r=>e.#Q(r),"moveToTail"),indexes:a(r=>e.#w(r),"indexes"),rindexes:a(r=>e.#R(r),"rindexes"),isStale:a(r=>e.#T(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#a}get fetchMethod(){return this.#i}get memoMethod(){return this.#o}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(e){let{max:r=0,ttl:n,ttlResolution:o=1,ttlAutopurge:s,updateAgeOnGet:c,updateAgeOnHas:l,allowStale:u,dispose:d,disposeAfter:p,noDisposeOnSet:h,noUpdateTTL:m,maxSize:g=0,maxEntrySize:A=0,sizeCalculation:y,fetchMethod:E,memoMethod:_,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:x,ignoreFetchAbort:w}=e;if(r!==0&&!_6(r))throw new TypeError("max option must be a nonnegative integer");let R=r?VGr(r):Array;if(!R)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=g,this.maxEntrySize=A||this.#t,this.sizeCalculation=y,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#o=_,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#i=E,this.#_=!!E,this.#c=new Map,this.#l=new Array(r).fill(void 0),this.#u=new Array(r).fill(void 0),this.#f=new R(r),this.#p=new R(r),this.#h=0,this.#m=0,this.#E=nRt.create(r),this.#a=0,this.#s=0,typeof d=="function"&&(this.#n=d),typeof p=="function"?(this.#r=p,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#y=!!this.#r,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!w,this.maxEntrySize!==0){if(this.#t!==0&&!_6(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!_6(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!l,this.ttlResolution=_6(o)||o===0?o:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!_6(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let P="LRU_CACHE_UNBOUNDED";eXi(P)&&(jGr.add(P),$Gr("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,t))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#I(){let e=new _re(this.#e),r=new _re(this.#e);this.#C=e,this.#S=r,this.#D=(s,c,l=Ere.now())=>{if(r[s]=c!==0?l:0,e[s]=c,c!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#T(s)&&this.#k(this.#l[s],"expire")},c+1);u.unref&&u.unref()}},this.#x=s=>{r[s]=e[s]!==0?Ere.now():0},this.#d=(s,c)=>{if(e[c]){let l=e[c],u=r[c];if(!l||!u)return;s.ttl=l,s.start=u,s.now=n||o();let d=s.now-u;s.remainingTTL=l-d}};let n=0,o=a(()=>{let s=Ere.now();if(this.ttlResolution>0){n=s;let c=setTimeout(()=>n=0,this.ttlResolution);c.unref&&c.unref()}return s},"getNow");this.getRemainingTTL=s=>{let c=this.#c.get(s);if(c===void 0)return 0;let l=e[c],u=r[c];if(!l||!u)return 1/0;let d=(n||o())-u;return l-d},this.#T=s=>{let c=r[s],l=e[s];return!!l&&!!c&&(n||o())-c>l}}#x=a(()=>{},"#updateItemAge");#d=a(()=>{},"#statusTTL");#D=a(()=>{},"#setItemTTL");#T=a(()=>!1,"#isStale");#P(){let e=new _re(this.#e);this.#s=0,this.#v=e,this.#N=r=>{this.#s-=e[r],e[r]=0},this.#O=(r,n,o,s)=>{if(this.#A(n))return 0;if(!_6(o))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(o=s(n,r),!_6(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o},this.#M=(r,n,o)=>{if(e[r]=n,this.#t){let s=this.#t-e[r];for(;this.#s>s;)this.#L(!0)}this.#s+=e[r],o&&(o.entrySize=n,o.totalCalculatedSize=this.#s)}}#N=a(e=>{},"#removeItemSize");#M=a((e,r,n)=>{},"#addItemSize");#O=a((e,r,n,o)=>{if(n||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#w({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#m;!(!this.#B(r)||((e||!this.#T(r))&&(yield r),r===this.#h));)r=this.#p[r]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#h;!(!this.#B(r)||((e||!this.#T(r))&&(yield r),r===this.#m));)r=this.#f[r]}#B(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#w())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#A(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#R())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#A(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#w()){let r=this.#l[e];r!==void 0&&!this.#A(this.#u[e])&&(yield r)}}*rkeys(){for(let e of this.#R()){let r=this.#l[e];r!==void 0&&!this.#A(this.#u[e])&&(yield r)}}*values(){for(let e of this.#w())this.#u[e]!==void 0&&!this.#A(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#R())this.#u[e]!==void 0&&!this.#A(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#w()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;if(s!==void 0&&e(s,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#w()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;s!==void 0&&e.call(r,s,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#R()){let o=this.#u[n],s=this.#A(o)?o.__staleWhileFetching:o;s!==void 0&&e.call(r,s,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#R({allowStale:!0}))this.#T(r)&&(this.#k(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#c.get(e);if(r===void 0)return;let n=this.#u[r],o=this.#A(n)?n.__staleWhileFetching:n;if(o===void 0)return;let s={value:o};if(this.#C&&this.#S){let c=this.#C[r],l=this.#S[r];if(c&&l){let u=c-(Ere.now()-l);s.ttl=u,s.start=Date.now()}}return this.#v&&(s.size=this.#v[r]),s}dump(){let e=[];for(let r of this.#w({allowStale:!0})){let n=this.#l[r],o=this.#u[r],s=this.#A(o)?o.__staleWhileFetching:o;if(s===void 0||n===void 0)continue;let c={value:s};if(this.#C&&this.#S){c.ttl=this.#C[r];let l=Ere.now()-this.#S[r];c.start=Math.floor(Date.now()-l)}this.#v&&(c.size=this.#v[r]),e.unshift([n,c])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let o=Date.now()-n.start;n.start=Ere.now()-o}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:s,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,{noUpdateTTL:d=this.noUpdateTTL}=n,p=this.#O(e,r,n.size||0,l);if(this.maxEntrySize&&p>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.#k(e,"set"),this;let h=this.#a===0?void 0:this.#c.get(e);if(h===void 0)h=this.#a===0?this.#m:this.#E.length!==0?this.#E.pop():this.#a===this.#e?this.#L(!1):this.#a,this.#l[h]=e,this.#u[h]=r,this.#c.set(e,h),this.#f[this.#m]=h,this.#p[h]=this.#m,this.#m=h,this.#a++,this.#M(h,p,u),u&&(u.set="add"),d=!1;else{this.#Q(h);let m=this.#u[h];if(r!==m){if(this.#_&&this.#A(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=m;g!==void 0&&!c&&(this.#b&&this.#n?.(g,e,"set"),this.#y&&this.#g?.push([g,e,"set"]))}else c||(this.#b&&this.#n?.(m,e,"set"),this.#y&&this.#g?.push([m,e,"set"]));if(this.#N(h),this.#M(h,p,u),this.#u[h]=r,u){u.set="replace";let g=m&&this.#A(m)?m.__staleWhileFetching:m;g!==void 0&&(u.oldValue=g)}}else u&&(u.set="update")}if(o!==0&&!this.#C&&this.#I(),this.#C&&(d||this.#D(h,o,s),u&&this.#d(u,h)),!c&&this.#y&&this.#g){let m=this.#g,g;for(;g=m?.shift();)this.#r?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#u[this.#h];if(this.#L(!0),this.#A(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#y&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#r?.(...r)}}}#L(e){let r=this.#h,n=this.#l[r],o=this.#u[r];return this.#_&&this.#A(o)?o.__abortController.abort(new Error("evicted")):(this.#b||this.#y)&&(this.#b&&this.#n?.(o,n,"evict"),this.#y&&this.#g?.push([o,n,"evict"])),this.#N(r),e&&(this.#l[r]=void 0,this.#u[r]=void 0,this.#E.push(r)),this.#a===1?(this.#h=this.#m=0,this.#E.length=0):this.#h=this.#f[r],this.#c.delete(n),this.#a--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:o}=r,s=this.#c.get(e);if(s!==void 0){let c=this.#u[s];if(this.#A(c)&&c.__staleWhileFetching===void 0)return!1;if(this.#T(s))o&&(o.has="stale",this.#d(o,s));else return n&&this.#x(s),o&&(o.has="hit",this.#d(o,s)),!0}else o&&(o.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,o=this.#c.get(e);if(o===void 0||!n&&this.#T(o))return;let s=this.#u[o];return this.#A(s)?s.__staleWhileFetching:s}#F(e,r,n,o){let s=r===void 0?void 0:this.#u[r];if(this.#A(s))return s;let c=new gFe,{signal:l}=n;l?.addEventListener("abort",()=>c.abort(l.reason),{signal:c.signal});let u={signal:c.signal,options:n,context:o},d=a((y,E=!1)=>{let{aborted:_}=c.signal,v=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(_&&!E?(n.status.fetchAborted=!0,n.status.fetchError=c.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),_&&!v&&!E)return h(c.signal.reason);let b=g;return this.#u[r]===g&&(y===void 0?b.__staleWhileFetching?this.#u[r]=b.__staleWhileFetching:this.#k(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,y,u.options))),y},"cb"),p=a(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),h(y)),"eb"),h=a(y=>{let{aborted:E}=c.signal,_=E&&n.allowStaleOnFetchAbort,v=_||n.allowStaleOnFetchRejection,b=v||n.noDeleteOnFetchRejection,I=g;if(this.#u[r]===g&&(!b||I.__staleWhileFetching===void 0?this.#k(e,"fetch"):_||(this.#u[r]=I.__staleWhileFetching)),v)return n.status&&I.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),I.__staleWhileFetching;if(I.__returned===I)throw y},"fetchFail"),m=a((y,E)=>{let _=this.#i?.(e,s,u);_&&_ instanceof Promise&&_.then(v=>y(v===void 0?void 0:v),E),c.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=a(v=>d(v,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let g=new Promise(m).then(d,p),A=Object.assign(g,{__abortController:c,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,A,{...u.options,status:void 0}),r=this.#c.get(e)):this.#u[r]=A,A}#A(e){if(!this.#_)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof gFe}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:y,forceRefresh:E=!1,status:_,signal:v}=r;if(!this.#_)return _&&(_.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:s,status:_});let b={allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:s,ttl:c,noDisposeOnSet:l,size:u,sizeCalculation:d,noUpdateTTL:p,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:A,ignoreFetchAbort:g,status:_,signal:v},I=this.#c.get(e);if(I===void 0){_&&(_.fetch="miss");let x=this.#F(e,I,b,y);return x.__returned=x}else{let x=this.#u[I];if(this.#A(x)){let Q=n&&x.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",Q&&(_.returnedStale=!0)),Q?x.__staleWhileFetching:x.__returned=x}let w=this.#T(I);if(!E&&!w)return _&&(_.fetch="hit"),this.#Q(I),o&&this.#x(I),_&&this.#d(_,I),x;let R=this.#F(e,I,b,y),k=R.__staleWhileFetching!==void 0&&n;return _&&(_.fetch=w?"stale":"refresh",k&&w&&(_.returnedStale=!0)),k?R.__staleWhileFetching:R.__returned=R}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#o;if(!n)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:s,...c}=r,l=this.get(e,c);if(!s&&l!==void 0)return l;let u=n(e,l,{options:c,context:o});return this.set(e,u,c),u}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:c}=r,l=this.#c.get(e);if(l!==void 0){let u=this.#u[l],d=this.#A(u);return c&&this.#d(c,l),this.#T(l)?(c&&(c.get="stale"),d?(c&&n&&u.__staleWhileFetching!==void 0&&(c.returnedStale=!0),n?u.__staleWhileFetching:void 0):(s||this.#k(e,"expire"),c&&n&&(c.returnedStale=!0),n?u:void 0)):(c&&(c.get="hit"),d?u.__staleWhileFetching:(this.#Q(l),o&&this.#x(l),u))}else c&&(c.get="miss")}#U(e,r){this.#p[r]=e,this.#f[e]=r}#Q(e){e!==this.#m&&(e===this.#h?this.#h=this.#f[e]:this.#U(this.#p[e],this.#f[e]),this.#U(this.#m,e),this.#m=e)}delete(e){return this.#k(e,"delete")}#k(e,r){let n=!1;if(this.#a!==0){let o=this.#c.get(e);if(o!==void 0)if(n=!0,this.#a===1)this.#q(r);else{this.#N(o);let s=this.#u[o];if(this.#A(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#y)&&(this.#b&&this.#n?.(s,e,r),this.#y&&this.#g?.push([s,e,r])),this.#c.delete(e),this.#l[o]=void 0,this.#u[o]=void 0,o===this.#m)this.#m=this.#p[o];else if(o===this.#h)this.#h=this.#f[o];else{let c=this.#p[o];this.#f[c]=this.#f[o];let l=this.#f[o];this.#p[l]=this.#p[o]}this.#a--,this.#E.push(o)}}if(this.#y&&this.#g?.length){let o=this.#g,s;for(;s=o?.shift();)this.#r?.(...s)}return n}clear(){return this.#q("delete")}#q(e){for(let r of this.#R({allowStale:!0})){let n=this.#u[r];if(this.#A(n))n.__abortController.abort(new Error("deleted"));else{let o=this.#l[r];this.#b&&this.#n?.(n,o,e),this.#y&&this.#g?.push([n,o,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#C&&this.#S&&(this.#C.fill(0),this.#S.fill(0)),this.#v&&this.#v.fill(0),this.#h=0,this.#m=0,this.#E.length=0,this.#s=0,this.#a=0,this.#y&&this.#g){let r=this.#g,n;for(;n=r?.shift();)this.#r?.(...n)}}};var bre=require("node:path"),rHr=require("node:url"),qP=require("fs"),uXi=de(require("node:fs"),1),b6=require("node:fs/promises");f();var bFe=require("node:events"),uRt=de(require("node:stream"),1),JGr=require("node:string_decoder");var WGr=typeof process=="object"&&process?process:{stdout:null,stderr:null},tXi=a(t=>!!t&&typeof t=="object"&&(t instanceof v6||t instanceof uRt.default||rXi(t)||nXi(t)),"isStream"),rXi=a(t=>!!t&&typeof t=="object"&&t instanceof bFe.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==uRt.default.Writable.prototype.pipe,"isReadable"),nXi=a(t=>!!t&&typeof t=="object"&&t instanceof bFe.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function","isWritable"),FM=Symbol("EOF"),UM=Symbol("maybeEmitEnd"),C6=Symbol("emittedEnd"),AFe=Symbol("emittingEnd"),cye=Symbol("emittedError"),yFe=Symbol("closed"),zGr=Symbol("read"),EFe=Symbol("flush"),YGr=Symbol("flushChunk"),Ox=Symbol("encoding"),Cre=Symbol("decoder"),th=Symbol("flowing"),lye=Symbol("paused"),vre=Symbol("resume"),rh=Symbol("buffer"),ey=Symbol("pipes"),nh=Symbol("bufferLength"),iRt=Symbol("bufferPush"),_Fe=Symbol("bufferShift"),Dg=Symbol("objectMode"),hf=Symbol("destroyed"),oRt=Symbol("error"),sRt=Symbol("emitData"),KGr=Symbol("emitEnd"),aRt=Symbol("emitEnd2"),UP=Symbol("async"),cRt=Symbol("abort"),CFe=Symbol("aborted"),uye=Symbol("signal"),YH=Symbol("dataListeners"),B1=Symbol("discarded"),dye=a(t=>Promise.resolve().then(t),"defer"),iXi=a(t=>t(),"nodefer"),oXi=a(t=>t==="end"||t==="finish"||t==="prefinish","isEndish"),sXi=a(t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,"isArrayBufferLike"),aXi=a(t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),"isArrayBufferView"),vFe=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[vre](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},lRt=class extends vFe{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=o=>r.emit("error",o),e.on("error",this.proxyErrors)}},cXi=a(t=>!!t.objectMode,"isObjectModeOptions"),lXi=a(t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer","isEncodingOptions"),v6=class extends bFe.EventEmitter{static{a(this,"Minipass")}[th]=!1;[lye]=!1;[ey]=[];[rh]=[];[Dg];[Ox];[UP];[Cre];[FM]=!1;[C6]=!1;[AFe]=!1;[yFe]=!1;[cye]=null;[nh]=0;[hf]=!1;[uye];[CFe]=!1;[YH]=0;[B1]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");cXi(r)?(this[Dg]=!0,this[Ox]=null):lXi(r)?(this[Ox]=r.encoding,this[Dg]=!1):(this[Dg]=!1,this[Ox]=null),this[UP]=!!r.async,this[Cre]=this[Ox]?new JGr.StringDecoder(this[Ox]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[rh],"get")}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[ey],"get")});let{signal:n}=r;n&&(this[uye]=n,n.aborted?this[cRt]():n.addEventListener("abort",()=>this[cRt]()))}get bufferLength(){return this[nh]}get encoding(){return this[Ox]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Dg]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[UP]}set async(e){this[UP]=this[UP]||!!e}[cRt](){this[CFe]=!0,this.emit("abort",this[uye]?.reason),this.destroy(this[uye]?.reason)}get aborted(){return this[CFe]}set aborted(e){}write(e,r,n){if(this[CFe])return!1;if(this[FM])throw new Error("write after end");if(this[hf])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let o=this[UP]?dye:iXi;if(!this[Dg]&&!Buffer.isBuffer(e)){if(aXi(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(sXi(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Dg]?(this[th]&&this[nh]!==0&&this[EFe](!0),this[th]?this.emit("data",e):this[iRt](e),this[nh]!==0&&this.emit("readable"),n&&o(n),this[th]):e.length?(typeof e=="string"&&!(r===this[Ox]&&!this[Cre]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ox]&&(e=this[Cre].write(e)),this[th]&&this[nh]!==0&&this[EFe](!0),this[th]?this.emit("data",e):this[iRt](e),this[nh]!==0&&this.emit("readable"),n&&o(n),this[th]):(this[nh]!==0&&this.emit("readable"),n&&o(n),this[th])}read(e){if(this[hf])return null;if(this[B1]=!1,this[nh]===0||e===0||e&&e>this[nh])return this[UM](),null;this[Dg]&&(e=null),this[rh].length>1&&!this[Dg]&&(this[rh]=[this[Ox]?this[rh].join(""):Buffer.concat(this[rh],this[nh])]);let r=this[zGr](e||null,this[rh][0]);return this[UM](),r}[zGr](e,r){if(this[Dg])this[_Fe]();else{let n=r;e===n.length||e===null?this[_Fe]():typeof n=="string"?(this[rh][0]=n.slice(e),r=n.slice(0,e),this[nh]-=e):(this[rh][0]=n.subarray(e),r=n.subarray(0,e),this[nh]-=e)}return this.emit("data",r),!this[rh].length&&!this[FM]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[FM]=!0,this.writable=!1,(this[th]||!this[lye])&&this[UM](),this}[vre](){this[hf]||(!this[YH]&&!this[ey].length&&(this[B1]=!0),this[lye]=!1,this[th]=!0,this.emit("resume"),this[rh].length?this[EFe]():this[FM]?this[UM]():this.emit("drain"))}resume(){return this[vre]()}pause(){this[th]=!1,this[lye]=!0,this[B1]=!1}get destroyed(){return this[hf]}get flowing(){return this[th]}get paused(){return this[lye]}[iRt](e){this[Dg]?this[nh]+=1:this[nh]+=e.length,this[rh].push(e)}[_Fe](){return this[Dg]?this[nh]-=1:this[nh]-=this[rh][0].length,this[rh].shift()}[EFe](e=!1){do;while(this[YGr](this[_Fe]())&&this[rh].length);!e&&!this[rh].length&&!this[FM]&&this.emit("drain")}[YGr](e){return this.emit("data",e),this[th]}pipe(e,r){if(this[hf])return e;this[B1]=!1;let n=this[C6];return r=r||{},e===WGr.stdout||e===WGr.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[ey].push(r.proxyErrors?new lRt(this,e,r):new vFe(this,e,r)),this[UP]?dye(()=>this[vre]()):this[vre]()),e}unpipe(e){let r=this[ey].find(n=>n.dest===e);r&&(this[ey].length===1?(this[th]&&this[YH]===0&&(this[th]=!1),this[ey]=[]):this[ey].splice(this[ey].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[B1]=!1,this[YH]++,!this[ey].length&&!this[th]&&this[vre]();else if(e==="readable"&&this[nh]!==0)super.emit("readable");else if(oXi(e)&&this[C6])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[cye]){let o=r;this[UP]?dye(()=>o.call(this,this[cye])):o.call(this,this[cye])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[YH]=this.listeners("data").length,this[YH]===0&&!this[B1]&&!this[ey].length&&(this[th]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[YH]=0,!this[B1]&&!this[ey].length&&(this[th]=!1)),r}get emittedEnd(){return this[C6]}[UM](){!this[AFe]&&!this[C6]&&!this[hf]&&this[rh].length===0&&this[FM]&&(this[AFe]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[yFe]&&this.emit("close"),this[AFe]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==hf&&this[hf])return!1;if(e==="data")return!this[Dg]&&!n?!1:this[UP]?(dye(()=>this[sRt](n)),!0):this[sRt](n);if(e==="end")return this[KGr]();if(e==="close"){if(this[yFe]=!0,!this[C6]&&!this[hf])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[cye]=n,super.emit(oRt,n);let s=!this[uye]||this.listeners("error").length?super.emit("error",n):!1;return this[UM](),s}else if(e==="resume"){let s=super.emit("resume");return this[UM](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let o=super.emit(e,...r);return this[UM](),o}[sRt](e){for(let n of this[ey])n.dest.write(e)===!1&&this.pause();let r=this[B1]?!1:super.emit("data",e);return this[UM](),r}[KGr](){return this[C6]?!1:(this[C6]=!0,this.readable=!1,this[UP]?(dye(()=>this[aRt]()),!0):this[aRt]())}[aRt](){if(this[Cre]){let r=this[Cre].end();if(r){for(let n of this[ey])n.dest.write(r);this[B1]||super.emit("data",r)}}for(let r of this[ey])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Dg]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[Dg]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[Dg])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ox]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(hf,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[B1]=!1;let e=!1,r=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return r();let o=this.read();if(o!==null)return Promise.resolve({done:!1,value:o});if(this[FM])return r();let s,c,l=a(h=>{this.off("data",u),this.off("end",d),this.off(hf,p),r(),c(h)},"onerr"),u=a(h=>{this.off("error",l),this.off("end",d),this.off(hf,p),this.pause(),s({value:h,done:!!this[FM]})},"ondata"),d=a(()=>{this.off("error",l),this.off("data",u),this.off(hf,p),r(),s({done:!0,value:void 0})},"onend"),p=a(()=>l(new Error("stream destroyed")),"ondestroy");return new Promise((h,m)=>{c=m,s=h,this.once(hf,p),this.once("error",l),this.once("end",d),this.once("data",u)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B1]=!1;let e=!1,r=a(()=>(this.pause(),this.off(oRt,r),this.off(hf,r),this.off("end",r),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return r();let o=this.read();return o===null?r():{done:!1,value:o}},"next");return this.once("end",r),this.once(oRt,r),this.once(hf,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[hf])return e?this.emit("error",e):this.emit(hf),this;this[hf]=!0,this[B1]=!0,this[rh].length=0,this[nh]=0;let r=this;return typeof r.close=="function"&&!this[yFe]&&r.close(),e?this.emit("error",e):this.emit(hf),this}static get isStream(){return tXi}};var dXi=qP.realpathSync.native,pye={lstatSync:qP.lstatSync,readdir:qP.readdir,readdirSync:qP.readdirSync,readlinkSync:qP.readlinkSync,realpathSync:dXi,promises:{lstat:b6.lstat,readdir:b6.readdir,readlink:b6.readlink,realpath:b6.realpath}},nHr=a(t=>!t||t===pye||t===uXi?pye:{...pye,...t,promises:{...pye.promises,...t.promises||{}}},"fsFromOption"),iHr=/^\\\\\?\\([a-z]:)\\?$/i,fXi=a(t=>t.replace(/\//g,"\\").replace(iHr,"$1\\"),"uncToDrive"),pXi=/[\\\/]/,bT=0,oHr=1,sHr=2,QP=4,aHr=6,cHr=8,KH=10,lHr=12,vT=15,fye=~vT,dRt=16,XGr=32,hye=64,Bx=128,TFe=256,IFe=512,ZGr=hye|Bx|IFe,hXi=1023,fRt=a(t=>t.isFile()?cHr:t.isDirectory()?QP:t.isSymbolicLink()?KH:t.isCharacterDevice()?sHr:t.isBlockDevice()?aHr:t.isSocket()?lHr:t.isFIFO()?oHr:bT,"entToType"),eHr=new Map,mye=a(t=>{let e=eHr.get(t);if(e)return e;let r=t.normalize("NFKD");return eHr.set(t,r),r},"normalize"),tHr=new Map,SFe=a(t=>{let e=tHr.get(t);if(e)return e;let r=mye(t.toLowerCase());return tHr.set(t,r),r},"normalizeNocase"),xFe=class extends aye{static{a(this,"ResolveCache")}constructor(){super({max:256})}},pRt=class extends aye{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(r=>r.length+1,"sizeCalculation")})}},uHr=Symbol("PathScurry setAsCwd"),Ng=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#o;get gid(){return this.#o}#a;get rdev(){return this.#a}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#f;get atimeMs(){return this.#f}#p;get mtimeMs(){return this.#p}#h;get ctimeMs(){return this.#h}#m;get birthtimeMs(){return this.#m}#E;get atime(){return this.#E}#g;get mtime(){return this.#g}#v;get ctime(){return this.#v}#S;get birthtime(){return this.#S}#C;#b;#_;#y;#I;#x;#d;#D;#T;#P;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=bT,n,o,s,c,l){this.name=e,this.#C=s?SFe(e):mye(e),this.#d=r&hXi,this.nocase=s,this.roots=o,this.root=n||this,this.#D=c,this.#_=l.fullpath,this.#I=l.relative,this.#x=l.relativePosix,this.parent=l.parent,this.parent?this.#e=this.parent.#e:this.#e=nHr(l.fs)}depth(){return this.#b!==void 0?this.#b:this.parent?this.#b=this.parent.depth()+1:this.#b=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let r=this.getRootString(e),o=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#N(o):this.#N(o)}#N(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#D.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#D.set(this,r),this.#d&=~dRt,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),o=this.nocase?SFe(e):mye(e);for(let u of n)if(u.#C===o)return u;let s=this.parent?this.sep:"",c=this.#_?this.#_+s+e:void 0,l=this.newChild(e,bT,{...r,parent:this,fullpath:c});return this.canReaddir()||(l.#d|=Bx),n.push(l),l}relative(){if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let e=this.name,r=this.parent;if(!r)return this.#I=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let e=this.name,r=this.parent;if(!r)return this.#x=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#_!==void 0)return this.#_;let e=this.name,r=this.parent;if(!r)return this.#_=this.name;let o=r.fullpath()+(r.parent?this.sep:"")+e;return this.#_=o}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let o=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(o)?this.#y=`//?/${o}`:this.#y=o}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#y=n}isUnknown(){return(this.#d&vT)===bT}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#d&vT)===cHr}isDirectory(){return(this.#d&vT)===QP}isCharacterDevice(){return(this.#d&vT)===sHr}isBlockDevice(){return(this.#d&vT)===aHr}isFIFO(){return(this.#d&vT)===oHr}isSocket(){return(this.#d&vT)===lHr}isSymbolicLink(){return(this.#d&KH)===KH}lstatCached(){return this.#d&XGr?this:void 0}readlinkCached(){return this.#T}realpathCached(){return this.#P}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#T)return!0;if(!this.parent)return!1;let e=this.#d&vT;return!(e!==bT&&e!==KH||this.#d&TFe||this.#d&Bx)}calledReaddir(){return!!(this.#d&dRt)}isENOENT(){return!!(this.#d&Bx)}isNamed(e){return this.nocase?this.#C===SFe(e):this.#C===mye(e)}async readlink(){let e=this.#T;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(r);if(n)return this.#T=n}catch(r){this.#A(r.code);return}}readlinkSync(){let e=this.#T;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(r);if(n)return this.#T=n}catch(r){this.#A(r.code);return}}#M(e){this.#d|=dRt;for(let r=e.provisional;rn(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#H.push(e),this.#j)return;this.#j=!0;let o=this.fullpath();this.#e.readdir(o,{withFileTypes:!0},(s,c)=>{if(s)this.#L(s.code),n.provisional=0;else{for(let l of c)this.#U(l,n);this.#M(n)}this.#V(n.slice(0,n.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#G)await this.#G;else{let n=a(()=>{},"resolve");this.#G=new Promise(o=>n=o);try{for(let o of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#U(o,e);this.#M(e)}catch(o){this.#L(o.code),e.provisional=0}this.#G=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#U(n,e);this.#M(e)}catch(n){this.#L(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#d&ZGr)return!1;let e=vT&this.#d;return e===bT||e===QP||e===KH}shouldWalk(e,r){return(this.#d&QP)===QP&&!(this.#d&ZGr)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#P)return this.#P;if(!((IFe|TFe|Bx)&this.#d))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#P=this.resolve(e)}catch{this.#R()}}realpathSync(){if(this.#P)return this.#P;if(!((IFe|TFe|Bx)&this.#d))try{let e=this.#e.realpathSync(this.fullpath());return this.#P=this.resolve(e)}catch{this.#R()}}[uHr](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],o=this;for(;o&&o.parent;)r.add(o),o.#I=n.join(this.sep),o.#x=n.join("/"),o=o.parent,n.push("..");for(o=e;o&&o.parent&&!r.has(o);)o.#I=void 0,o.#x=void 0,o=o.parent}},wFe=class t extends Ng{static{a(this,"PathWin32")}sep="\\";splitSep=pXi;constructor(e,r=bT,n,o,s,c,l){super(e,r,n,o,s,c,l)}newChild(e,r=bT,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return bre.win32.parse(e).root}getRoot(e){if(e=fXi(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new Tre(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(iHr,"$1\\"),e===r}},RFe=class t extends Ng{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,r=bT,n,o,s,c,l){super(e,r,n,o,s,c,l)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=bT,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},PFe=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),r,n,{nocase:o,childrenCacheSize:s=16*1024,fs:c=pye}={}){this.#r=nHr(c),(e instanceof URL||e.startsWith("file://"))&&(e=(0,rHr.fileURLToPath)(e));let l=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(l),this.#e=new xFe,this.#t=new xFe,this.#n=new pRt(s);let u=l.substring(this.rootPath.length).split(n);if(u.length===1&&!u[0]&&u.pop(),o===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=o,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let d=this.root,p=u.length-1,h=r.sep,m=this.rootPath,g=!1;for(let A of u){let y=p--;d=d.child(A,{relative:new Array(y).fill("..").join(h),relativePosix:new Array(y).fill("..").join("/"),fullpath:m+=(g?"":h)+A}),g=!0}this.cwd=d}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let c=e[s];if(!(!c||c===".")&&(r=r?`${c}/${r}`:c,this.isAbsolute(c)))break}let n=this.#e.get(r);if(n!==void 0)return n;let o=this.cwd.resolve(r).fullpath();return this.#e.set(r,o),o}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let c=e[s];if(!(!c||c===".")&&(r=r?`${c}/${r}`:c,this.isAbsolute(c)))break}let n=this.#t.get(r);if(n!==void 0)return n;let o=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,o),o}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let o=await e.readdir();return n?o:o.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(o=>o.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=[];(!s||s(e))&&l.push(n?e:e.fullpath());let u=new Set,d=a((h,m)=>{u.add(h),h.readdirCB((g,A)=>{if(g)return m(g);let y=A.length;if(!y)return m();let E=a(()=>{--y===0&&m()},"next");for(let _ of A)(!s||s(_))&&l.push(n?_:_.fullpath()),o&&_.isSymbolicLink()?_.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(u,c)?d(v,E):E()):_.shouldWalk(u,c)?d(_,E):E()},!0)},"walk"),p=e;return new Promise((h,m)=>{d(p,g=>{if(g)return m(g);h(l)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=[];(!s||s(e))&&l.push(n?e:e.fullpath());let u=new Set([e]);for(let d of u){let p=d.readdirSync();for(let h of p){(!s||s(h))&&l.push(n?h:h.fullpath());let m=h;if(h.isSymbolicLink()){if(!(o&&(m=h.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(u,c)&&u.add(m)}}return l}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r;(!s||s(e))&&(yield n?e:e.fullpath());let l=new Set([e]);for(let u of l){let d=u.readdirSync();for(let p of d){(!s||s(p))&&(yield n?p:p.fullpath());let h=p;if(p.isSymbolicLink()){if(!(o&&(h=p.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(l,c)&&l.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=new v6({objectMode:!0});(!s||s(e))&&l.write(n?e:e.fullpath());let u=new Set,d=[e],p=0,h=a(()=>{let m=!1;for(;!m;){let g=d.shift();if(!g){p===0&&l.end();return}p++,u.add(g);let A=a((E,_,v=!1)=>{if(E)return l.emit("error",E);if(o&&!v){let b=[];for(let I of _)I.isSymbolicLink()&&b.push(I.realpath().then(x=>x?.isUnknown()?x.lstat():x));if(b.length){Promise.all(b).then(()=>A(null,_,!0));return}}for(let b of _)b&&(!s||s(b))&&(l.write(n?b:b.fullpath())||(m=!0));p--;for(let b of _){let I=b.realpathCached()||b;I.shouldWalk(u,c)&&d.push(I)}m&&!l.flowing?l.once("drain",h):y||h()},"onReaddir"),y=!0;g.readdirCB(A,!0),y=!1}},"process");return h(),l}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Ng||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:o=!1,filter:s,walkFilter:c}=r,l=new v6({objectMode:!0}),u=new Set;(!s||s(e))&&l.write(n?e:e.fullpath());let d=[e],p=0,h=a(()=>{let m=!1;for(;!m;){let g=d.shift();if(!g){p===0&&l.end();return}p++,u.add(g);let A=g.readdirSync();for(let y of A)(!s||s(y))&&(l.write(n?y:y.fullpath())||(m=!0));p--;for(let y of A){let E=y;if(y.isSymbolicLink()){if(!(o&&(E=y.realpathSync())))continue;E.isUnknown()&&E.lstatSync()}E.shouldWalk(u,c)&&d.push(E)}}m&&!l.flowing&&l.once("drain",h)},"process");return h(),l}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[uHr](r)}},Tre=class extends PFe{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,bre.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let o=this.cwd;o;o=o.parent)o.nocase=this.nocase}parseRootPath(e){return bre.win32.parse(e).root.toUpperCase()}newRoot(e){return new wFe(this.rootPath,QP,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Sre=class extends PFe{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,bre.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new RFe(this.rootPath,QP,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},gye=class extends Sre{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}},XSl=process.platform==="win32"?wFe:RFe,dHr=process.platform==="win32"?Tre:process.platform==="darwin"?gye:Sre;f();var mXi=a(t=>t.length>=1,"isPatternList"),gXi=a(t=>t.length>=1,"isGlobList"),Ire=class t{static{a(this,"Pattern")}#e;#t;#n;length;#r;#i;#o;#a;#s;#c;#l=!0;constructor(e,r,n,o){if(!mXi(e))throw new TypeError("empty pattern list");if(!gXi(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#n=n,this.#r=o,this.#n===0){if(this.isUNC()){let[s,c,l,u,...d]=this.#e,[p,h,m,g,...A]=this.#t;d[0]===""&&(d.shift(),A.shift());let y=[s,c,l,u,""].join("/"),E=[p,h,m,g,""].join("/");this.#e=[y,...d],this.#t=[E,...A],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...c]=this.#e,[l,...u]=this.#t;c[0]===""&&(c.shift(),u.shift());let d=s+"/",p=l+"/";this.#e=[d,...c],this.#t=[p,...u],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===pf}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#o=this.#o||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new t(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#a=this.#a,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#s!==void 0?this.#s:this.#s=this.#r==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};f();f();var AXi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",xre=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:o,noglobstar:s,platform:c=AXi}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=c,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:o,noglobstar:s,optimizationLevel:2,platform:c,nocomment:!0,nonegate:!0};for(let l of e)this.add(l)}add(e){let r=new O1(e,this.mmopts);for(let n=0;n[e,!!(r&2),!!(r&1)])}},gRt=class{static{a(this,"SubWalks")}store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(o=>o.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Aye=class t{static{a(this,"Processor")}hasWalkedCache;matches=new mRt;subwalks=new gRt;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new hRt}processPatterns(e,r){this.patterns=r;let n=r.map(o=>[e,o]);for(let[o,s]of n){this.hasWalkedCache.storeWalked(o,s);let c=s.root(),l=s.isAbsolute()&&this.opts.absolute!==!1;if(c){o=o.resolve(c==="/"&&this.opts.root!==void 0?this.opts.root:c);let h=s.rest();if(h)s=h;else{this.matches.add(o,!0,!1);continue}}if(o.isENOENT())continue;let u,d,p=!1;for(;typeof(u=s.pattern())=="string"&&(d=s.rest());)o=o.resolve(u),s=d,p=!0;if(u=s.pattern(),d=s.rest(),p){if(this.hasWalkedCache.hasWalked(o,s))continue;this.hasWalkedCache.storeWalked(o,s)}if(typeof u=="string"){let h=u===".."||u===""||u===".";this.matches.add(o.resolve(u),l,h);continue}else if(u===pf){(!o.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(o,s);let h=d?.pattern(),m=d?.rest();if(!d||(h===""||h===".")&&!m)this.matches.add(o,l,h===""||h===".");else if(h===".."){let g=o.parent||o;m?this.hasWalkedCache.hasWalked(g,m)||this.subwalks.add(g,m):this.matches.add(g,l,!0)}}else u instanceof RegExp&&this.subwalks.add(o,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),o=this.child();for(let s of r)for(let c of n){let l=c.isAbsolute(),u=c.pattern(),d=c.rest();u===pf?o.testGlobstar(s,c,d,l):u instanceof RegExp?o.testRegExp(s,u,d,l):o.testString(s,u,d,l)}return o}testGlobstar(e,r,n,o){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,o,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),o);else if(s===".."){let c=e.parent||e;this.subwalks.add(c,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),o)}}testRegExp(e,r,n,o){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,o,!1))}testString(e,r,n,o){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,o,!1))}};var yXi=a((t,e)=>typeof t=="string"?new xre([t],e):Array.isArray(t)?new xre(t,e):t,"makeIgnore"),kFe=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=yXi(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!="function")){let o="cannot ignore child matches, ignore lacks add() method.";throw new Error(o)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let c=await s.realpath();c&&(c.isUnknown()||this.opts.stat)&&await c.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let c=s.realpathSync();c&&(c?.isUnknown()||this.opts.stat)&&c.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let o=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+o)}else{let s=this.opts.posix?e.relativePosix():e.relative(),c=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?c+s+o:"."+o)}}async match(e,r,n){let o=await this.matchCheck(e,n);o&&this.matchFinish(o,r)}matchSync(e,r,n){let o=this.matchCheckSync(e,n);o&&this.matchFinish(o,r)}walkCB(e,r,n){this.signal?.aborted&&n(),this.walkCB2(e,r,new Aye(this.opts),n)}walkCB2(e,r,n,o){if(this.#i(e))return o();if(this.signal?.aborted&&o(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,o));return}n.processPatterns(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||(s++,this.match(l,u,d).then(()=>c()));for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,n,c):l.readdirCB((d,p)=>this.walkCB3(l,p,n,c),!0)}c()}walkCB3(e,r,n,o){n=n.filterEntries(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||(s++,this.match(l,u,d).then(()=>c()));for(let[l,u]of n.subwalks.entries())s++,this.walkCB2(l,u,n.child(),c);c()}walkCBSync(e,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,r,new Aye(this.opts),n)}walkCB2Sync(e,r,n,o){if(this.#i(e))return o();if(this.signal?.aborted&&o(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,o));return}n.processPatterns(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||this.matchSync(l,u,d);for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,n,c)}c()}walkCB3Sync(e,r,n,o){n=n.filterEntries(e,r);let s=1,c=a(()=>{--s===0&&o()},"next");for(let[l,u,d]of n.matches.entries())this.#r(l)||this.matchSync(l,u,d);for(let[l,u]of n.subwalks.entries())s++,this.walkCB2Sync(l,u,n.child(),c);c()}},yye=class extends kFe{static{a(this,"GlobWalker")}matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Eye=class extends kFe{static{a(this,"GlobStream")}results;constructor(e,r,n){super(e,r,n),this.results=new v6({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var EXi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Lx=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,fHr.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(u=>u.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(u=>u.includes("/")?u:`./**/${u}`)}if(this.pattern=e,this.platform=r.platform||EXi,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let u=r.platform==="win32"?Tre:r.platform==="darwin"?gye:r.platform?Sre:dHr;this.scurry=new u(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",o={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(u=>new O1(u,o)),[c,l]=s.reduce((u,d)=>(u[0].push(...d.set),u[1].push(...d.globParts),u),[[],[]]);this.patterns=c.map((u,d)=>{let p=l[d];if(!p)throw new Error("invalid pattern object");return new Ire(u,p,0,this.platform)})}async walk(){return[...await new yye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new yye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Eye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Eye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};f();var ARt=a((t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new O1(r,e).hasMagic())return!0;return!1},"hasMagic");function NFe(t,e={}){return new Lx(t,e).streamSync()}a(NFe,"globStreamSync");function hHr(t,e={}){return new Lx(t,e).stream()}a(hHr,"globStream");function mHr(t,e={}){return new Lx(t,e).walkSync()}a(mHr,"globSync");async function pHr(t,e={}){return new Lx(t,e).walk()}a(pHr,"glob_");function MFe(t,e={}){return new Lx(t,e).iterateSync()}a(MFe,"globIterateSync");function gHr(t,e={}){return new Lx(t,e).iterate()}a(gHr,"globIterate");var _Xi=NFe,CXi=Object.assign(hHr,{sync:NFe}),vXi=MFe,bXi=Object.assign(gHr,{sync:MFe}),TXi=Object.assign(mHr,{stream:NFe,iterate:MFe}),DFe=Object.assign(pHr,{glob:pHr,globSync:mHr,sync:TXi,globStream:hHr,stream:CXi,globStreamSync:NFe,streamSync:_Xi,globIterate:gHr,iterate:bXi,globIterateSync:MFe,iterateSync:vXi,Glob:Lx,hasMagic:ARt,escape:yre,unescape:Mx});DFe.glob=DFe;var yRt=class{constructor(e,r){this.matchKind=e;this.promptFileEntry=r;let{promptPath:n,parsedPromptFile:o}=r;this._name=n.name??o.header?.name??Zn(o.uri).replace(".instructions.md","")}static{a(this,"CustomInstruction")}get parsedPromptFile(){return this.promptFileEntry.parsedPromptFile}get uri(){return this.parsedPromptFile.uri}get name(){return this._name}get applyTo(){return this.parsedPromptFile.header?.applyTo||void 0}get description(){return this.promptFileEntry.promptPath.description??this.parsedPromptFile.header?.description}get content(){return this.parsedPromptFile.body?.content??""}get isReadonly(){let e=this.promptFileEntry.promptPath.storage;return this.isBuiltIn||e==="extension"}get isBuiltIn(){return this.promptFileEntry.promptPath.storage==="clsAssets"}},AHr="AGENTS.md",yHr="CLAUDE.md",SXi="CLAUDE.local.md",IXi=".github/copilot-instructions.md",xXi=".github/git-commit-instructions.md",EHr="global-copilot-instructions",_Hr="global-git-commit-instructions",CHr="global-agents-md-instructions",vHr="global-claude-md-instructions",wXi="global-instruction-file",bHr=".github/instructions",Ju=class t{constructor(e){this.ctx=e;this.logger=new Se("CustomInstructionService");this.globalInstructionFiles=Promise.resolve([]);this.instructionFileLocations=new Map}static{a(this,"CustomInstructionService")}static{this.parser=new g6}async listCustomInstructions(e){return(await this.ctx.get(L1).collect(this.ctx,"instructions",e)).map(o=>new yRt("ApplyToPattern",o))}async listMatchingInstructions(e,r){let n=await this.listCustomInstructions(e),o=[],s=0;for(let u of n){let d=!1;if(u.matchKind==="AlwaysApplied")d=!0;else{let p=u.applyTo;if(!p)continue;let h=Nwt(p);h.isValid?Mwt(r,h.pattern)&&(d=!0):this.logger.warn(this.ctx,`Invalid applyTo pattern in ${u.uri}: ${h.error}`)}d&&(o.push(u),s++)}let c=0,l=await this.getGlobalInstructionFiles();for(let u of l){let d=!1;if(u.matchKind==="AlwaysApplied")d=!0;else{let p=u.applyTo;if(p){let h=Nwt(p);h.isValid&&Mwt(r,h.pattern)&&(d=!0)}}d&&(o.push(u),c++)}return rr(this.ctx,"customization.instruction.collected",{},{workspaceInstructionCount:s,globalInstructionCount:c}),o}async getCustomInstructionById(e,r){return(await this.listCustomInstructions(e)).find(o=>o.uri===r)}setInstructionFileLocations(e,r){let n=ZJ(e),o=Lqr(r,bHr);r&&r.length>0?this.instructionFileLocations.set(n,r):this.instructionFileLocations.delete(n);let s=Pt.createAndMarkAsIssued({promptMetadata:o?"customized":"default"},{fileCount:r.length});st(this.ctx,"instruction.setWorkspace",s)}getInstructionFileLocations(e){let r=ZJ(e),n=this.instructionFileLocations.get(r)||[];return n.length>0?n:[bHr]}setGlobalInstructionFiles(e){let r=e||[];this.globalInstructionFiles=this.resolveGlobalInstructions(r,wXi,"ApplyToPattern");let n=Pt.createAndMarkAsIssued(void 0,{fileCount:r.length});st(this.ctx,"instruction.setGlobal",n)}getGlobalInstructionFiles(){return this.globalInstructionFiles}setGlobalCopilotInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalCopilotInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},EHr,"AlwaysApplied"):void 0}else this.globalCopilotInstructions=this.resolveGlobalInstruction(e,EHr,"AlwaysApplied")}setGlobalGitCommitInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalGitCommitInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},_Hr,"AlwaysApplied"):void 0}else this.globalGitCommitInstructions=this.resolveGlobalInstruction(e,_Hr,"AlwaysApplied")}setGlobalAgentsMdInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalAgentsMdInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},CHr,"AlwaysApplied"):void 0}else this.globalAgentsMdInstructions=this.resolveGlobalInstruction(e,CHr,"AlwaysApplied")}setGlobalClaudeMdInstructions(e){if(e.type==="content"){let r=!!(e.content&&e.content.trim());this.globalClaudeMdInstructions=r?this.resolveGlobalInstruction({type:"content",content:e.content.trim()},vHr,"AlwaysApplied"):void 0}else this.globalClaudeMdInstructions=this.resolveGlobalInstruction(e,vHr,"AlwaysApplied")}getGlobalCopilotInstructions(){return this.globalCopilotInstructions}getGlobalGitCommitInstructions(){return this.globalGitCommitInstructions}getGlobalAgentsMdInstructions(){return this.globalAgentsMdInstructions}getGlobalClaudeMdInstructions(){return this.globalClaudeMdInstructions}async getGlobalInstructions(e={}){let r=[];if(e.includeCopilotInstructions&&this.globalCopilotInstructions){let n=await this.globalCopilotInstructions;n&&r.push(n)}if(e.includeGitCommitInstructions&&this.globalGitCommitInstructions){let n=await this.globalGitCommitInstructions;n&&r.push(n)}if(e.includeAgentsMdInstructions&&this.globalAgentsMdInstructions){let n=await this.globalAgentsMdInstructions;n&&r.push(n)}if(e.includeClaudeMdInstructions&&this.globalClaudeMdInstructions){let n=await this.globalClaudeMdInstructions;n&&r.push(n)}return r}async resolveGlobalInstruction(e,r,n){if(e.type==="content"){let o=e.content||void 0;if(!o)return;let s=`${JH}${r}`,c=t.parser.parse(s,o),l=c.body?.content??o;return l.trim()?{matchKind:n,uri:s,name:c.header?.name??r,applyTo:c.header?.applyTo||void 0,description:c.header?.description,content:l,isReadonly:!0,isBuiltIn:!1}:void 0}try{let o=(await this.ctx.get(Jn).readFileString(e.uri)).trim();if(!o)return;let s=t.parser.parse(e.uri,o),c=s.body?.content??"";return c.trim()?{matchKind:n,uri:e.uri,name:s.header?.name??Zn(e.uri).replace(/\.instructions\.md$/,"").replace(/\.md$/,""),applyTo:s.header?.applyTo||void 0,description:s.header?.description,content:c,isReadonly:!0,isBuiltIn:!1}:void 0}catch(o){this.logger.warn(this.ctx,`Failed to read instruction file at ${e.uri}:`,o);return}}async resolveGlobalInstructions(e,r,n){let o=[];for(let s of e)try{let c=await this.resolveGlobalInstruction(s,r,n);c&&o.push(c)}catch(c){this.logger.warn(this.ctx,"Failed to parse global instruction file:",c)}return o}async readFromWorkspaces(e,r,n={}){let o=[];if(!r.length)return o;let s=r.flatMap(c=>{let l=[];return n.includeCopilotInstructions!==!1&&l.push(this._collectInstructionsFromFile(e,c,IXi,"AlwaysApplied",o)),n.includeGitCommitInstructions&&l.push(this._collectInstructionsFromFile(e,c,xXi,"AlwaysApplied",o)),n.includeClaudeMdInstructions===!0&&(l.push(this._collectInstructionsFromFile(e,c,yHr,"AlwaysApplied",o)),l.push(this._collectInstructionsFromFile(e,c,SXi,"AlwaysApplied",o)),n.includeNestedClaudeMdInstructions===!0&&l.push(this.collectNestedInstructionFilesInWorkspace(e,c,yHr,"AlwaysApplied",o))),n.includeAgentsMdInstructions===!0&&(l.push(this._collectInstructionsFromFile(e,c,AHr,"AlwaysApplied",o)),n.includeNestedAgentsMdInstructions===!0&&l.push(this.collectNestedInstructionFilesInWorkspace(e,c,AHr,"AlwaysApplied",o))),l});return await Promise.all(s),o}async _collectInstructionsFromFile(e,r,n,o,s){try{let c=bi(r.uri,n),l=(await e.get(Jn).readFileString(c)).trim();if(!l)return;(await E6(e,{uri:c},l)).status==="valid"&&s.push({matchKind:o,uri:c,name:c,content:l,isReadonly:!0,isBuiltIn:!1})}catch{}}async listNestedInstructionFilesInWorkspace(e,r){return await DFe(`*/**/${r}`,{ignore:[".github/**","build/**","target/**","node_modules/**","out/**","dist/**",".git/**"],nodir:!0,absolute:!1,cwd:e.uri})}async collectNestedInstructionFilesInWorkspace(e,r,n,o,s){let c=await this.listNestedInstructionFilesInWorkspace(r,n);await Promise.all(c.map(l=>this._collectInstructionsFromFile(e,r,l,o,s)))}async collectAllInstructions(e,r,n={},o){let s=[];if(s.push(...await this.getGlobalInstructions(n)),s.push(...await this.readFromWorkspaces(e,r,n)),n.includeCustomInstructionFiles!==!1){let c=await this.listMatchingInstructions(r,o||[]);s.push(...c)}return s}static formatInstructions(e,r={}){if(!e||e.length===0)return;let n=[];for(let s of e)s.content.trim()&&n.push(` ${s.content} `);return n.length===0?void 0:`${r.customIntroduction||"When generating code, please follow these user provided coding instructions. You can ignore an instruction if it contradicts a system message."} @@ -2118,42 +2107,42 @@ ${n.join(` `}buildInstructionTable(e){let n=["Here is a list of instruction files that contain rules for modifying or creating new code.","These files are important for ensuring that the code is modified or created correctly.","Please make sure to follow the rules specified in these files when working with the codebase.","If the file is not already available as attachment, use the `read_file` tool to acquire it.","Make sure to acquire the instructions before making any changes to the code.","| Pattern | File Path | Description |","| ------- | --------- | ----------- |"],o=e.map(s=>`| \`${s.applyTo||"*"}\` | \`${s.uri}\` | ${s.description||""} |`);return n.concat(o).join(` `)}async getInstructions(e,r,n={},o){try{let s=await this.collectAllInstructions(e,r,n,o);if(s.length===0)return;let c=n;if(!n.customIntroduction){let l=s.filter(u=>u.matchKind==="ApplyToPattern");l.length>0&&(c={...n,customIntroduction:this.buildInstructionTable(l)})}return t.formatInstructions(s,c)}catch{return}}async appendToUserMessage(e,r,n="",o={},s){if(!r||r.length===0)return n;let c=await this.getInstructions(e,r,o,s);return c?c+` -`+n:n}};f();var wKi=".github/prompts",eRt=class{constructor(e){this.promptFileEntry=e;let{promptPath:r,parsedPromptFile:n}=e;this._name=r.name??n.header?.name??ei(n.uri).replace(".prompt.md","")}static{a(this,"CustomPrompt")}get parsedPromptFile(){return this.promptFileEntry.parsedPromptFile}get uri(){return this.parsedPromptFile.uri}get name(){return this._name}get description(){return this.promptFileEntry.promptPath.description??this.parsedPromptFile.header?.description}get content(){return this.parsedPromptFile.body?.content??""}get isReadonly(){let e=this.promptFileEntry.promptPath.storage;return this.isBuiltIn||e==="extension"}get isBuiltIn(){return this.promptFileEntry.promptPath.storage==="clsAssets"}},uy=class t{constructor(e){this.ctx=e;this.logger=new Se("CustomPromptService");this.promptTemplatesCache=null;this.globalPromptFiles=Promise.resolve([]);this.promptFileLocations=new Map}static{a(this,"CustomPromptService")}static{this.parser=new H6}setGlobalPromptFiles(e){let r=e||[];this.globalPromptFiles=this.resolveGlobalPrompts(r)}getGlobalPromptFiles(){return this.globalPromptFiles}async collectGlobalPromptFiles(){return this.globalPromptFiles}async resolveGlobalPrompt(e){if(e.type==="content"){if(!e.content?.trim())return;let r=t.parser.parse(`${jj}global-prompt`,e.content);if(!r.body?.content?.trim())return;let n=r.header?.name??"global-prompt";return{uri:`${jj}${n}`,name:n,description:r.header?.description,content:r.body.content,isReadonly:!0,isBuiltIn:!1}}try{let r=(await this.ctx.get(Xn).readFileString(e.uri)).trim();if(!r)return;let n=t.parser.parse(e.uri,r),o=n.header?.name??ei(e.uri).replace(/\.prompt\.md$/,"").replace(/\.md$/,"");return{uri:e.uri,name:o,description:n.header?.description,content:n.body?.content??r,isReadonly:!0,isBuiltIn:!1}}catch(r){this.logger.warn(this.ctx,`Failed to read prompt file at ${e.uri}:`,r);return}}async resolveGlobalPrompts(e){let r=[];for(let n of e){let o=await this.resolveGlobalPrompt(n);o&&r.push(o)}return r}setPromptFileLocations(e,r){let n=VX(e);r&&r.length>0?this.promptFileLocations.set(n,r):this.promptFileLocations.delete(n)}getPromptFileLocations(e){let r=VX(e),n=this.promptFileLocations.get(r)||[];return n.length>0?n:[wKi]}async getPromptTemplate(e){let r=this.promptTemplatesCache?.get(e);return r||(await this.globalPromptFiles).find(o=>o.name===e)}async listCustomPrompts(e){let o=(await this.ctx.get(K1).collect(this.ctx,"prompt",e)).map(s=>new eRt(s));this.promptTemplatesCache?this.promptTemplatesCache.clear():this.promptTemplatesCache=new Map;for(let s of o)this.promptTemplatesCache.set(s.name,s);return o}async getCustomPromptById(e,r){return(await this.listCustomPrompts(e)).find(o=>o.uri===r)}async getCustomPromptByName(e,r){return(await this.listCustomPrompts(e)).find(o=>o.name===r)}};var SGr=require("node:os");var RKi=".github/agents",PKi=[".github/skills",".claude/skills",".agents/skills"],kKi=[".copilot/skills",".claude/skills",".agents/skills"],$j=class{static{a(this,"PromptFilesLocator")}async listFiles(e,r,n){if(!r.length)return[];let o=r.flatMap(c=>{if(n==="instructions")return e.get(od).getInstructionFileLocations(c.uri).map(d=>{let p=Ti(c.uri,d);return this.getFilesByUri(e,p,n)});if(n==="prompt")return e.get(uy).getPromptFileLocations(c.uri).map(d=>{let p=Ti(c.uri,d);return this.getFilesByUri(e,p,n)});if(n==="agent"){let l=Ti(c.uri,RKi);return[this.getFilesByUri(e,l,n)]}else if(n==="skill")return PKi.map(l=>{let u=Ti(c.uri,l);return this.getSkillFiles(e,u)});return[]});if(n==="skill"){let c=Lc((0,SGr.homedir)()),l=kKi.map(u=>{let d=Ti(c,u);return this.getSkillFiles(e,d)});o.push(...l)}return(await Promise.all(o)).flat()}async getFilesByUri(e,r,n){let o,s=[];try{o=await e.get(Xn).readDirectory(r)}catch{return[]}for(let[c,l]of o){let u=Ti(r,c);if(l===1&&$Qr(c)===n)s.push(u);else if(l===2){let d=await this.getFilesByUri(e,u,n);s.push(...d)}}return s}async getSkillFiles(e,r){let n;try{n=await e.get(Xn).readDirectory(r)}catch{return[]}let s=n.filter(([l,u])=>u&2).map(([l,u])=>Ti(r,l,"SKILL.md")).map(async l=>{try{return(await e.get(Xn).stat(l)).type===1?l:null}catch{return null}});return(await Promise.all(s)).filter(l=>l!==null)}};f();var Cm=class{static{a(this,"PolicyWatcher")}},x9e=class extends Cm{static{a(this,"NoOpPolicyWatcher")}getPolicyValue(e){}};var xGr=de(require("fs")),w9e=de(require("path"));var jj="globalPromptFiles://";var IGr="./assets/prompts.contributions.json",NKi="CVE Remediator",DKi="Debugger",MKi=new Map([[NKi,"cveRemediatorAgent"],[DKi,"debuggerAgent"]]),K1=class{constructor(e){this.logger=new Se("PromptService");this.contributedFiles={instructions:new Map,prompt:new Map,agent:new Map,skill:new Map};this.fileLocator=new $j,this.ctx=e,this.registerAssetsFile(e)}static{a(this,"PromptService")}async collect(e,r,n){if(r==="agent"&&e.get(Cm).getPolicyValue("customAgent.enabled")===!1)return[];await this.registerAssetsFile(e);let o=[await this.fileLocator.listFiles(e,n,r).then(l=>l.map(u=>({uri:u,storage:"local",type:r}))),this.getExtensionContributions(r)].flat(),s=new H6,c=o.map(async l=>{let u=await this.parseOne(e,s,l);return u?{promptPath:l,parsedPromptFile:u}:void 0});return(await Promise.all(c)).filter(l=>l!==void 0)}async parseOne(e,r,n){try{return r.parse(n.uri,await e.get(Xn).readFileString(n.uri))}catch(o){this.logger.warn(e,`Failed to parse ${n.type} file ${n.uri}:`,o);return}}resolveAssetsPath(e){let r=w9e.default.extname(__filename)===".ts"?w9e.default.resolve(__dirname,"../../../..",e):w9e.default.resolve(__dirname,e);return this.logger.debug(this.ctx,`Resolved assets path: ${r}`),Promise.resolve(r)}async registerAssetsFile(e){try{let r=await this.resolveAssetsPath(IGr),n=await xGr.promises.readFile(r,"utf8"),s=JSON.parse(n).chatAgents||[];for(let c of s)if(c.name&&c.description&&c.path){let l=await this.resolveAssetsPath(c.path);this.doRegisterContributedFile("agent",{uri:Lc(l),storage:"clsAssets",type:"agent",name:c.name,description:c.description})}}catch(r){this.logger.warn(e,`Failed to read assets contribution file ${IGr}:`,r)}}registerContributedFile(e,r,n,o,s){this.doRegisterContributedFile(r,{uri:s,storage:"extension",type:r,name:n,description:o})}doRegisterContributedFile(e,r){let n=this.contributedFiles[e];n.has(r.uri)||n.set(r.uri,r)}unregisterContributedFile(e,r){let n=this.contributedFiles[e];n.has(r)&&n.delete(r)}getExtensionContributions(e){let r=this.contributedFiles[e];return Array.from(r.values()).filter(o=>{let s=MKi.get(o.name);if(s===void 0)return!0;let l=this.ctx.get(Fn).getCapabilities()[s]??!1;return l||this.logger.debug(this.ctx,`Filtering out agent '${o.name}' (capability '${s}' is disabled)`),l})}};f();var tRt=64;var iO=(r=>(r.enabled="enabled",r.disabled="disabled",r))(iO||{}),dh={id:"copilot",displayName:"Copilot Language Server",description:"Copilot Language Server tool provider",isFirstPartyTool:!0},Od={id:"copilot-editor",displayName:"Editor",description:"Editor tool provider",isFirstPartyTool:!0},Vj=class{static{a(this,"LanguageModelTool")}constructor(e){this.type=e.type,this.toolProvider=e.toolProvider,this.name=e.name,this.displayName=e.displayName??this.name,this.description=e.description,this.displayDescription=e.displayDescription??this.description,this.inputSchema=e.inputSchema,this.annotations=e.annotations,this.id=`${this.toolProvider.id}.${this.name}`,this.nameForModel=(this.toolProvider.isFirstPartyTool?this.name:`${this.toolProvider.displayNamePrefix??this.toolProvider.id}_${this.name}`).replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,tRt),this.status=e.status??"enabled",this.configurationKey=this.toolProvider.isFirstPartyTool?this.name:`${this.toolProvider.id}/${this.name}`}isEnabled(e){return Promise.resolve(!0)}},J6=class extends Vj{static{a(this,"BaseLanguageModelTool")}constructor(e){super(e)}},fr=class{static{a(this,"LanguageModelTextPart")}constructor(e){this.value=e}},X6=class{static{a(this,"LanguageModelDataPart")}constructor(e){this.value=e}},Wj=class{static{a(this,"LanguageModelPromptTsxPart")}constructor(e){this.value=e}};var Cr=class{static{a(this,"LanguageModelToolResult")}constructor(e,r){this.status=r,this.content=e}},Z6=class extends Cr{static{a(this,"ExtendedLanguageModelToolResult")}},wGr=S.Object({content:S.Array(S.Union([S.Object({value:S.String()}),S.Object({value:S.Unknown()})])),status:S.Optional(S.Union([S.Literal("success"),S.Literal("error"),S.Literal("cancelled")]))}),ek=(r=>(r.Accept="accept",r.Dismiss="dismiss",r))(ek||{}),RGr=S.Object({result:S.Enum(ek)});var AHr=de(require("fs"));f();function $Gr(t){return typeof t>"u"||t===null}a($Gr,"isNothing");function OKi(t){return typeof t=="object"&&t!==null}a(OKi,"isObject");function BKi(t){return Array.isArray(t)?t:$Gr(t)?[]:[t]}a(BKi,"toArray");function LKi(t,e){var r,n,o,s;if(e)for(s=Object.keys(e),r=0,n=s.length;rl&&(s=" ... ",e=n-l+s.length),r-n>l&&(c=" ...",r=n+l-c.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+c,pos:n-e+s.length}}a(rRt,"getLine");function nRt(t,e){return Ap.repeat(" ",e-t.length)+t}a(nRt,"padStart");function VKi(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],s,c=-1;s=r.exec(t.buffer);)o.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var l="",u,d,p=Math.min(t.line+e.linesAfter,o.length).toString().length,h=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=rRt(t.buffer,n[c-u],o[c-u],t.position-(n[c]-n[c-u]),h),l=Ap.repeat(" ",e.indent)+nRt((t.line-u+1).toString(),p)+" | "+d.str+` -`+l;for(d=rRt(t.buffer,n[c],o[c],t.position,h),l+=Ap.repeat(" ",e.indent)+nRt((t.line+1).toString(),p)+" | "+d.str+` -`,l+=Ap.repeat("-",e.indent+p+3+d.pos)+`^ -`,u=1;u<=e.linesAfter&&!(c+u>=o.length);u++)d=rRt(t.buffer,n[c+u],o[c+u],t.position-(n[c]-n[c+u]),h),l+=Ap.repeat(" ",e.indent)+nRt((t.line+u+1).toString(),p)+" | "+d.str+` -`;return l.replace(/\n$/,"")}a(VKi,"makeSnippet");var WKi=VKi,zKi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YKi=["scalar","sequence","mapping"];function KKi(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}a(KKi,"compileStyleAliases");function JKi(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(zKi.indexOf(r)===-1)throw new rC('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=KKi(e.styleAliases||null),YKi.indexOf(this.kind)===-1)throw new rC('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}a(JKi,"Type$1");var Gg=JKi;function PGr(t,e){var r=[];return t[e].forEach(function(n){var o=r.length;r.forEach(function(s,c){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(o=c)}),r[o]=n}),r}a(PGr,"compileList");function XKi(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(a(n,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:a(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:a(function(t){return t.toString(10)},"decimal"),hexadecimal:a(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),EJi=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function CJi(t){return!(t===null||!EJi.test(t)||t[t.length-1]==="_")}a(CJi,"resolveYamlFloat");function _Ji(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}a(_Ji,"constructYamlFloat");var vJi=/^[-+]?[0-9]+e/;function bJi(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ap.isNegativeZero(t))return"-0.0";return r=t.toString(10),vJi.test(r)?r.replace("e",".e"):r}a(bJi,"representYamlFloat");function TJi(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ap.isNegativeZero(t))}a(TJi,"isFloat");var SJi=new Gg("tag:yaml.org,2002:float",{kind:"scalar",resolve:CJi,construct:_Ji,predicate:TJi,represent:bJi,defaultStyle:"lowercase"}),IJi=nJi.extend({implicit:[aJi,dJi,yJi,SJi]}),xJi=IJi,WGr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zGr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function wJi(t){return t===null?!1:WGr.exec(t)!==null||zGr.exec(t)!==null}a(wJi,"resolveYamlTimestamp");function RJi(t){var e,r,n,o,s,c,l,u=0,d=null,p,h,m;if(e=WGr.exec(t),e===null&&(e=zGr.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,n,o));if(s=+e[4],c=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],h=+(e[11]||0),d=(p*60+h)*6e4,e[9]==="-"&&(d=-d)),m=new Date(Date.UTC(r,n,o,s,c,l,u)),d&&m.setTime(m.getTime()-d),m}a(RJi,"constructYamlTimestamp");function PJi(t){return t.toISOString()}a(PJi,"representYamlTimestamp");var kJi=new Gg("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wJi,construct:RJi,instanceOf:Date,represent:PJi});function NJi(t){return t==="<<"||t===null}a(NJi,"resolveYamlMerge");var DJi=new Gg("tag:yaml.org,2002:merge",{kind:"scalar",resolve:NJi}),uRt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function MJi(t){if(t===null)return!1;var e,r,n=0,o=t.length,s=uRt;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}a(MJi,"resolveYamlBinary");function OJi(t){var e,r,n=t.replace(/[\r\n=]/g,""),o=n.length,s=uRt,c=0,l=[];for(e=0;e>16&255),l.push(c>>8&255),l.push(c&255)),c=c<<6|s.indexOf(n.charAt(e));return r=o%4*6,r===0?(l.push(c>>16&255),l.push(c>>8&255),l.push(c&255)):r===18?(l.push(c>>10&255),l.push(c>>2&255)):r===12&&l.push(c>>4&255),new Uint8Array(l)}a(OJi,"constructYamlBinary");function BJi(t){var e="",r=0,n,o,s=t.length,c=uRt;for(n=0;n>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[n];return o=s%3,o===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):o===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):o===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}a(BJi,"representYamlBinary");function LJi(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}a(LJi,"isBinary");var FJi=new Gg("tag:yaml.org,2002:binary",{kind:"scalar",resolve:MJi,construct:OJi,predicate:LJi,represent:BJi}),UJi=Object.prototype.hasOwnProperty,QJi=Object.prototype.toString;function qJi(t){if(t===null)return!0;var e=[],r,n,o,s,c,l=t;for(r=0,n=l.length;r>10)+55296,(t-65536&1023)+56320)}a(oXi,"charFromCodepoint");function eHr(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}a(eHr,"setProperty");var tHr=new Array(256),rHr=new Array(256);for(zj=0;zj<256;zj++)tHr[zj]=DGr(zj)?1:0,rHr[zj]=DGr(zj);var zj;function sXi(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||YGr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}a(sXi,"State$1");function nHr(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=WKi(r),new rC(e,r)}a(nHr,"generateError");function Gn(t,e){throw nHr(t,e)}a(Gn,"throwError");function k9e(t,e){t.onWarning&&t.onWarning.call(null,nHr(t,e))}a(k9e,"throwWarning");var MGr={YAML:a(function(e,r,n){var o,s,c;e.version!==null&&Gn(e,"duplication of %YAML directive"),n.length!==1&&Gn(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&Gn(e,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),c=parseInt(o[2],10),s!==1&&Gn(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&k9e(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:a(function(e,r,n){var o,s;n.length!==2&&Gn(e,"TAG directive accepts exactly two arguments"),o=n[0],s=n[1],XGr.test(o)||Gn(e,"ill-formed tag handle (first argument) of the TAG directive"),tF.call(e.tagMap,o)&&Gn(e,'there is a previously declared suffix for "'+o+'" tag handle'),ZGr.test(s)||Gn(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Gn(e,"tag prefix is malformed: "+s)}e.tagMap[o]=s},"handleTagDirective")};function eF(t,e,r,n){var o,s,c,l;if(e1&&(t.result+=Ap.repeat(` -`,e-1))}a(fRt,"writeFoldedLines");function aXi(t,e,r){var n,o,s,c,l,u,d,p,h=t.kind,m=t.result,g;if(g=t.input.charCodeAt(t.position),nC(g)||gne(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(o=t.input.charCodeAt(t.position+1),nC(o)||r&&gne(o)))return!1;for(t.kind="scalar",t.result="",s=c=t.position,l=!1;g!==0;){if(g===58){if(o=t.input.charCodeAt(t.position+1),nC(o)||r&&gne(o))break}else if(g===35){if(n=t.input.charCodeAt(t.position-1),nC(n))break}else{if(t.position===t.lineStart&&M9e(t)||r&&gne(g))break;if(tk(g))if(u=t.line,d=t.lineStart,p=t.lineIndent,h0(t,!1,-1),t.lineIndent>=e){l=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=u,t.lineStart=d,t.lineIndent=p;break}}l&&(eF(t,s,c,!1),fRt(t,t.line-u),s=c=t.position,l=!1),Yj(g)||(c=t.position+1),g=t.input.charCodeAt(++t.position)}return eF(t,s,c,!1),t.result?!0:(t.kind=h,t.result=m,!1)}a(aXi,"readPlainScalar");function cXi(t,e){var r,n,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(eF(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,o=t.position;else return!0;else tk(r)?(eF(t,n,o,!0),fRt(t,h0(t,!1,e)),n=o=t.position):t.position===t.lineStart&&M9e(t)?Gn(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Gn(t,"unexpected end of the stream within a single quoted scalar")}a(cXi,"readSingleQuotedScalar");function lXi(t,e){var r,n,o,s,c,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return eF(t,r,t.position,!0),t.position++,!0;if(l===92){if(eF(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),tk(l))h0(t,!1,e);else if(l<256&&tHr[l])t.result+=rHr[l],t.position++;else if((c=nXi(l))>0){for(o=c,s=0;o>0;o--)l=t.input.charCodeAt(++t.position),(c=rXi(l))>=0?s=(s<<4)+c:Gn(t,"expected hexadecimal character");t.result+=oXi(s),t.position++}else Gn(t,"unknown escape sequence");r=n=t.position}else tk(l)?(eF(t,r,n,!0),fRt(t,h0(t,!1,e)),r=n=t.position):t.position===t.lineStart&&M9e(t)?Gn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Gn(t,"unexpected end of the stream within a double quoted scalar")}a(lXi,"readDoubleQuotedScalar");function uXi(t,e){var r=!0,n,o,s,c=t.tag,l,u=t.anchor,d,p,h,m,g,A=Object.create(null),y,E,_,v;if(v=t.input.charCodeAt(t.position),v===91)p=93,g=!1,l=[];else if(v===123)p=125,g=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),v=t.input.charCodeAt(++t.position);v!==0;){if(h0(t,!0,e),v=t.input.charCodeAt(t.position),v===p)return t.position++,t.tag=c,t.anchor=u,t.kind=g?"mapping":"sequence",t.result=l,!0;r?v===44&&Gn(t,"expected the node content, but found ','"):Gn(t,"missed comma between flow collection entries"),E=y=_=null,h=m=!1,v===63&&(d=t.input.charCodeAt(t.position+1),nC(d)&&(h=m=!0,t.position++,h0(t,!0,e))),n=t.line,o=t.lineStart,s=t.position,yne(t,e,R9e,!1,!0),E=t.tag,y=t.result,h0(t,!0,e),v=t.input.charCodeAt(t.position),(m||t.line===n)&&v===58&&(h=!0,v=t.input.charCodeAt(++t.position),h0(t,!0,e),yne(t,e,R9e,!1,!0),_=t.result),g?Ane(t,l,A,E,y,_,n,o,s):h?l.push(Ane(t,null,A,E,y,_,n,o,s)):l.push(y),h0(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}Gn(t,"unexpected end of the stream within a flow collection")}a(uXi,"readFlowCollection");function dXi(t,e){var r,n,o=iRt,s=!1,c=!1,l=e,u=0,d=!1,p,h;if(h=t.input.charCodeAt(t.position),h===124)n=!1;else if(h===62)n=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)iRt===o?o=h===43?kGr:XJi:Gn(t,"repeat of a chomping mode identifier");else if((p=iXi(h))>=0)p===0?Gn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Gn(t,"repeat of an indentation width identifier"):(l=e+p-1,c=!0);else break;if(Yj(h)){do h=t.input.charCodeAt(++t.position);while(Yj(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!tk(h)&&h!==0)}for(;h!==0;){for(dRt(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!c||t.lineIndentl&&(l=t.lineIndent),tk(h)){u++;continue}if(t.lineIndente)&&u!==0)Gn(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(E&&(c=t.line,l=t.lineStart,u=t.position),yne(t,e,P9e,!0,o)&&(E?A=t.result:y=t.result),E||(Ane(t,h,m,g,A,y,c,l,u),g=A=y=null),h0(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&v!==0)Gn(t,"bad indentation of a mapping entry");else if(t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),h=0,m=t.implicitTypes.length;h"),t.result!==null&&A.kind!==t.kind&&Gn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+A.kind+'", not "'+t.kind+'"'),A.resolve(t.result,t.tag)?(t.result=A.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Gn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||p}a(yne,"composeNode");function gXi(t){var e=t.position,r,n,o,s=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(c=t.input.charCodeAt(t.position))!==0&&(h0(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(s=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!nC(c);)c=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),o=[],n.length<1&&Gn(t,"directive name must not be less than one character in length");c!==0;){for(;Yj(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!tk(c));break}if(tk(c))break;for(r=t.position;c!==0&&!nC(c);)c=t.input.charCodeAt(++t.position);o.push(t.input.slice(r,t.position))}c!==0&&dRt(t),tF.call(MGr,n)?MGr[n](t,n,o):k9e(t,'unknown document directive "'+n+'"')}if(h0(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,h0(t,!0,-1)):s&&Gn(t,"directives end mark is expected"),yne(t,t.lineIndent-1,P9e,!1,!0),h0(t,!0,-1),t.checkLineBreaks&&eXi.test(t.input.slice(e,t.position))&&k9e(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&M9e(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,h0(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=iHr(t,r);if(typeof e!="function")return n;for(var o=0,s=n.length;o0?this.promptFileLocations.set(n,r):this.promptFileLocations.delete(n)}getPromptFileLocations(e){let r=ZJ(e),n=this.promptFileLocations.get(r)||[];return n.length>0?n:[RXi]}async getPromptTemplate(e){let r=this.promptTemplatesCache?.get(e);return r||(await this.globalPromptFiles).find(o=>o.name===e)}async listCustomPrompts(e){let o=(await this.ctx.get(L1).collect(this.ctx,"prompt",e)).map(s=>new _Rt(s));this.promptTemplatesCache?this.promptTemplatesCache.clear():this.promptTemplatesCache=new Map;for(let s of o)this.promptTemplatesCache.set(s.name,s);return o}async getCustomPromptById(e,r){return(await this.listCustomPrompts(e)).find(o=>o.uri===r)}async getCustomPromptByName(e,r){return(await this.listCustomPrompts(e)).find(o=>o.name===r)}};var THr=require("node:os");var PXi=".github/agents",kXi=[".github/skills",".claude/skills",".agents/skills"],DXi=[".copilot/skills",".claude/skills",".agents/skills"],XH=class{static{a(this,"PromptFilesLocator")}async listFiles(e,r,n){if(!r.length)return[];let o=r.flatMap(c=>{if(n==="instructions")return e.get(Ju).getInstructionFileLocations(c.uri).map(d=>{let p=bi(c.uri,d);return this.getFilesByUri(e,p,n)});if(n==="prompt")return e.get(ty).getPromptFileLocations(c.uri).map(d=>{let p=bi(c.uri,d);return this.getFilesByUri(e,p,n)});if(n==="agent"){let l=bi(c.uri,PXi);return[this.getFilesByUri(e,l,n)]}else if(n==="skill")return kXi.map(l=>{let u=bi(c.uri,l);return this.getSkillFiles(e,u)});return[]});if(n==="skill"){let c=kc((0,THr.homedir)()),l=DXi.map(u=>{let d=bi(c,u);return this.getSkillFiles(e,d)});o.push(...l)}return(await Promise.all(o)).flat()}async getFilesByUri(e,r,n){let o,s=[];try{o=await e.get(Jn).readDirectory(r)}catch{return[]}for(let[c,l]of o){let u=bi(r,c);if(l===1&&jqr(c)===n)s.push(u);else if(l===2){let d=await this.getFilesByUri(e,u,n);s.push(...d)}}return s}async getSkillFiles(e,r){let n;try{n=await e.get(Jn).readDirectory(r)}catch{return[]}let s=n.filter(([l,u])=>u&2).map(([l,u])=>bi(r,l,"SKILL.md")).map(async l=>{try{return(await e.get(Jn).stat(l)).type===1?l:null}catch{return null}});return(await Promise.all(s)).filter(l=>l!==null)}};f();var um=class{static{a(this,"PolicyWatcher")}},OFe=class extends um{static{a(this,"NoOpPolicyWatcher")}getPolicyValue(e){}};var IHr=de(require("fs")),BFe=de(require("path"));var JH="globalPromptFiles://";var SHr="./assets/prompts.contributions.json",NXi="CVE Remediator",MXi="Debugger",OXi=new Map([[NXi,"cveRemediatorAgent"],[MXi,"debuggerAgent"]]),L1=class{constructor(e){this.logger=new Se("PromptService");this.contributedFiles={instructions:new Map,prompt:new Map,agent:new Map,skill:new Map};this.fileLocator=new XH,this.ctx=e,this.registerAssetsFile(e)}static{a(this,"PromptService")}async collect(e,r,n){if(r==="agent"&&e.get(um).getPolicyValue("customAgent.enabled")===!1)return[];await this.registerAssetsFile(e);let o=[await this.fileLocator.listFiles(e,n,r).then(l=>l.map(u=>({uri:u,storage:"local",type:r}))),this.getExtensionContributions(r)].flat(),s=new g6,c=o.map(async l=>{let u=await this.parseOne(e,s,l);return u?{promptPath:l,parsedPromptFile:u}:void 0});return(await Promise.all(c)).filter(l=>l!==void 0)}async parseOne(e,r,n){try{return r.parse(n.uri,await e.get(Jn).readFileString(n.uri))}catch(o){this.logger.warn(e,`Failed to parse ${n.type} file ${n.uri}:`,o);return}}resolveAssetsPath(e){let r=BFe.default.extname(__filename)===".ts"?BFe.default.resolve(__dirname,"../../../..",e):BFe.default.resolve(__dirname,e);return this.logger.debug(this.ctx,`Resolved assets path: ${r}`),Promise.resolve(r)}async registerAssetsFile(e){try{let r=await this.resolveAssetsPath(SHr),n=await IHr.promises.readFile(r,"utf8"),s=JSON.parse(n).chatAgents||[];for(let c of s)if(c.name&&c.description&&c.path){let l=await this.resolveAssetsPath(c.path);this.doRegisterContributedFile("agent",{uri:kc(l),storage:"clsAssets",type:"agent",name:c.name,description:c.description})}}catch(r){this.logger.warn(e,`Failed to read assets contribution file ${SHr}:`,r)}}registerContributedFile(e,r,n,o,s){this.doRegisterContributedFile(r,{uri:s,storage:"extension",type:r,name:n,description:o})}doRegisterContributedFile(e,r){let n=this.contributedFiles[e];n.has(r.uri)||n.set(r.uri,r)}unregisterContributedFile(e,r){let n=this.contributedFiles[e];n.has(r)&&n.delete(r)}getExtensionContributions(e){let r=this.contributedFiles[e];return Array.from(r.values()).filter(o=>{let s=OXi.get(o.name);if(s===void 0)return!0;let l=this.ctx.get(Fn).getCapabilities()[s]??!1;return l||this.logger.debug(this.ctx,`Filtering out agent '${o.name}' (capability '${s}' is disabled)`),l})}};f();var CRt=64;var QM=(r=>(r.enabled="enabled",r.disabled="disabled",r))(QM||{}),ih={id:"copilot",displayName:"Copilot Language Server",description:"Copilot Language Server tool provider",isFirstPartyTool:!0},Id={id:"copilot-editor",displayName:"Editor",description:"Editor tool provider",isFirstPartyTool:!0},ZH=class{static{a(this,"LanguageModelTool")}constructor(e){this.type=e.type,this.toolProvider=e.toolProvider,this.name=e.name,this.displayName=e.displayName??this.name,this.description=e.description,this.displayDescription=e.displayDescription??this.description,this.inputSchema=e.inputSchema,this.annotations=e.annotations,this.id=`${this.toolProvider.id}.${this.name}`,this.nameForModel=(this.toolProvider.isFirstPartyTool?this.name:`${this.toolProvider.displayNamePrefix??this.toolProvider.id}_${this.name}`).replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,CRt),this.status=e.status??"enabled",this.configurationKey=this.toolProvider.isFirstPartyTool?this.name:`${this.toolProvider.id}/${this.name}`}isEnabled(e){return Promise.resolve(!0)}},T6=class extends ZH{static{a(this,"BaseLanguageModelTool")}constructor(e){super(e)}},fr=class{static{a(this,"LanguageModelTextPart")}constructor(e){this.value=e}},S6=class{static{a(this,"LanguageModelDataPart")}constructor(e){this.value=e}},ej=class{static{a(this,"LanguageModelPromptTsxPart")}constructor(e){this.value=e}};var _r=class{static{a(this,"LanguageModelToolResult")}constructor(e,r){this.status=r,this.content=e}},I6=class extends _r{static{a(this,"ExtendedLanguageModelToolResult")}},xHr=S.Object({content:S.Array(S.Union([S.Object({value:S.String()}),S.Object({value:S.Unknown()})])),status:S.Optional(S.Union([S.Literal("success"),S.Literal("error"),S.Literal("cancelled")]))}),GP=(r=>(r.Accept="accept",r.Dismiss="dismiss",r))(GP||{}),wHr=S.Object({result:S.Enum(GP)});var gjr=de(require("fs"));f();function jHr(t){return typeof t>"u"||t===null}a(jHr,"isNothing");function BXi(t){return typeof t=="object"&&t!==null}a(BXi,"isObject");function LXi(t){return Array.isArray(t)?t:jHr(t)?[]:[t]}a(LXi,"toArray");function FXi(t,e){var r,n,o,s;if(e)for(s=Object.keys(e),r=0,n=s.length;rl&&(s=" ... ",e=n-l+s.length),r-n>l&&(c=" ...",r=n+l-c.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+c,pos:n-e+s.length}}a(vRt,"getLine");function bRt(t,e){return dp.repeat(" ",e-t.length)+t}a(bRt,"padStart");function WXi(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],s,c=-1;s=r.exec(t.buffer);)o.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var l="",u,d,p=Math.min(t.line+e.linesAfter,o.length).toString().length,h=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=vRt(t.buffer,n[c-u],o[c-u],t.position-(n[c]-n[c-u]),h),l=dp.repeat(" ",e.indent)+bRt((t.line-u+1).toString(),p)+" | "+d.str+` +`+l;for(d=vRt(t.buffer,n[c],o[c],t.position,h),l+=dp.repeat(" ",e.indent)+bRt((t.line+1).toString(),p)+" | "+d.str+` +`,l+=dp.repeat("-",e.indent+p+3+d.pos)+`^ +`,u=1;u<=e.linesAfter&&!(c+u>=o.length);u++)d=vRt(t.buffer,n[c+u],o[c+u],t.position-(n[c]-n[c+u]),h),l+=dp.repeat(" ",e.indent)+bRt((t.line+u+1).toString(),p)+" | "+d.str+` +`;return l.replace(/\n$/,"")}a(WXi,"makeSnippet");var zXi=WXi,YXi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],KXi=["scalar","sequence","mapping"];function JXi(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}a(JXi,"compileStyleAliases");function XXi(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(YXi.indexOf(r)===-1)throw new jE('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=JXi(e.styleAliases||null),KXi.indexOf(this.kind)===-1)throw new jE('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}a(XXi,"Type$1");var Mg=XXi;function RHr(t,e){var r=[];return t[e].forEach(function(n){var o=r.length;r.forEach(function(s,c){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(o=c)}),r[o]=n}),r}a(RHr,"compileList");function ZXi(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(a(n,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:a(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:a(function(t){return t.toString(10)},"decimal"),hexadecimal:a(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_Zi=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function CZi(t){return!(t===null||!_Zi.test(t)||t[t.length-1]==="_")}a(CZi,"resolveYamlFloat");function vZi(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}a(vZi,"constructYamlFloat");var bZi=/^[-+]?[0-9]+e/;function TZi(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(dp.isNegativeZero(t))return"-0.0";return r=t.toString(10),bZi.test(r)?r.replace("e",".e"):r}a(TZi,"representYamlFloat");function SZi(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||dp.isNegativeZero(t))}a(SZi,"isFloat");var IZi=new Mg("tag:yaml.org,2002:float",{kind:"scalar",resolve:CZi,construct:vZi,predicate:SZi,represent:TZi,defaultStyle:"lowercase"}),xZi=iZi.extend({implicit:[cZi,fZi,EZi,IZi]}),wZi=xZi,VHr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),WHr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function RZi(t){return t===null?!1:VHr.exec(t)!==null||WHr.exec(t)!==null}a(RZi,"resolveYamlTimestamp");function PZi(t){var e,r,n,o,s,c,l,u=0,d=null,p,h,m;if(e=VHr.exec(t),e===null&&(e=WHr.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,n,o));if(s=+e[4],c=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],h=+(e[11]||0),d=(p*60+h)*6e4,e[9]==="-"&&(d=-d)),m=new Date(Date.UTC(r,n,o,s,c,l,u)),d&&m.setTime(m.getTime()-d),m}a(PZi,"constructYamlTimestamp");function kZi(t){return t.toISOString()}a(kZi,"representYamlTimestamp");var DZi=new Mg("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:RZi,construct:PZi,instanceOf:Date,represent:kZi});function NZi(t){return t==="<<"||t===null}a(NZi,"resolveYamlMerge");var MZi=new Mg("tag:yaml.org,2002:merge",{kind:"scalar",resolve:NZi}),PRt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function OZi(t){if(t===null)return!1;var e,r,n=0,o=t.length,s=PRt;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}a(OZi,"resolveYamlBinary");function BZi(t){var e,r,n=t.replace(/[\r\n=]/g,""),o=n.length,s=PRt,c=0,l=[];for(e=0;e>16&255),l.push(c>>8&255),l.push(c&255)),c=c<<6|s.indexOf(n.charAt(e));return r=o%4*6,r===0?(l.push(c>>16&255),l.push(c>>8&255),l.push(c&255)):r===18?(l.push(c>>10&255),l.push(c>>2&255)):r===12&&l.push(c>>4&255),new Uint8Array(l)}a(BZi,"constructYamlBinary");function LZi(t){var e="",r=0,n,o,s=t.length,c=PRt;for(n=0;n>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[n];return o=s%3,o===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):o===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):o===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}a(LZi,"representYamlBinary");function FZi(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}a(FZi,"isBinary");var UZi=new Mg("tag:yaml.org,2002:binary",{kind:"scalar",resolve:OZi,construct:BZi,predicate:FZi,represent:LZi}),QZi=Object.prototype.hasOwnProperty,qZi=Object.prototype.toString;function GZi(t){if(t===null)return!0;var e=[],r,n,o,s,c,l=t;for(r=0,n=l.length;r>10)+55296,(t-65536&1023)+56320)}a(seo,"charFromCodepoint");function ZHr(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}a(ZHr,"setProperty");var ejr=new Array(256),tjr=new Array(256);for(tj=0;tj<256;tj++)ejr[tj]=DHr(tj)?1:0,tjr[tj]=DHr(tj);var tj;function aeo(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||zHr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}a(aeo,"State$1");function rjr(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=zXi(r),new jE(e,r)}a(rjr,"generateError");function Gn(t,e){throw rjr(t,e)}a(Gn,"throwError");function UFe(t,e){t.onWarning&&t.onWarning.call(null,rjr(t,e))}a(UFe,"throwWarning");var NHr={YAML:a(function(e,r,n){var o,s,c;e.version!==null&&Gn(e,"duplication of %YAML directive"),n.length!==1&&Gn(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&Gn(e,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),c=parseInt(o[2],10),s!==1&&Gn(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&UFe(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:a(function(e,r,n){var o,s;n.length!==2&&Gn(e,"TAG directive accepts exactly two arguments"),o=n[0],s=n[1],JHr.test(o)||Gn(e,"ill-formed tag handle (first argument) of the TAG directive"),w6.call(e.tagMap,o)&&Gn(e,'there is a previously declared suffix for "'+o+'" tag handle'),XHr.test(s)||Gn(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Gn(e,"tag prefix is malformed: "+s)}e.tagMap[o]=s},"handleTagDirective")};function x6(t,e,r,n){var o,s,c,l;if(e1&&(t.result+=dp.repeat(` +`,e-1))}a(DRt,"writeFoldedLines");function ceo(t,e,r){var n,o,s,c,l,u,d,p,h=t.kind,m=t.result,g;if(g=t.input.charCodeAt(t.position),$E(g)||Rre(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(o=t.input.charCodeAt(t.position+1),$E(o)||r&&Rre(o)))return!1;for(t.kind="scalar",t.result="",s=c=t.position,l=!1;g!==0;){if(g===58){if(o=t.input.charCodeAt(t.position+1),$E(o)||r&&Rre(o))break}else if(g===35){if(n=t.input.charCodeAt(t.position-1),$E(n))break}else{if(t.position===t.lineStart&&GFe(t)||r&&Rre(g))break;if(HP(g))if(u=t.line,d=t.lineStart,p=t.lineIndent,l0(t,!1,-1),t.lineIndent>=e){l=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=u,t.lineStart=d,t.lineIndent=p;break}}l&&(x6(t,s,c,!1),DRt(t,t.line-u),s=c=t.position,l=!1),rj(g)||(c=t.position+1),g=t.input.charCodeAt(++t.position)}return x6(t,s,c,!1),t.result?!0:(t.kind=h,t.result=m,!1)}a(ceo,"readPlainScalar");function leo(t,e){var r,n,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(x6(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,o=t.position;else return!0;else HP(r)?(x6(t,n,o,!0),DRt(t,l0(t,!1,e)),n=o=t.position):t.position===t.lineStart&&GFe(t)?Gn(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Gn(t,"unexpected end of the stream within a single quoted scalar")}a(leo,"readSingleQuotedScalar");function ueo(t,e){var r,n,o,s,c,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return x6(t,r,t.position,!0),t.position++,!0;if(l===92){if(x6(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),HP(l))l0(t,!1,e);else if(l<256&&ejr[l])t.result+=tjr[l],t.position++;else if((c=ieo(l))>0){for(o=c,s=0;o>0;o--)l=t.input.charCodeAt(++t.position),(c=neo(l))>=0?s=(s<<4)+c:Gn(t,"expected hexadecimal character");t.result+=seo(s),t.position++}else Gn(t,"unknown escape sequence");r=n=t.position}else HP(l)?(x6(t,r,n,!0),DRt(t,l0(t,!1,e)),r=n=t.position):t.position===t.lineStart&&GFe(t)?Gn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Gn(t,"unexpected end of the stream within a double quoted scalar")}a(ueo,"readDoubleQuotedScalar");function deo(t,e){var r=!0,n,o,s,c=t.tag,l,u=t.anchor,d,p,h,m,g,A=Object.create(null),y,E,_,v;if(v=t.input.charCodeAt(t.position),v===91)p=93,g=!1,l=[];else if(v===123)p=125,g=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),v=t.input.charCodeAt(++t.position);v!==0;){if(l0(t,!0,e),v=t.input.charCodeAt(t.position),v===p)return t.position++,t.tag=c,t.anchor=u,t.kind=g?"mapping":"sequence",t.result=l,!0;r?v===44&&Gn(t,"expected the node content, but found ','"):Gn(t,"missed comma between flow collection entries"),E=y=_=null,h=m=!1,v===63&&(d=t.input.charCodeAt(t.position+1),$E(d)&&(h=m=!0,t.position++,l0(t,!0,e))),n=t.line,o=t.lineStart,s=t.position,kre(t,e,LFe,!1,!0),E=t.tag,y=t.result,l0(t,!0,e),v=t.input.charCodeAt(t.position),(m||t.line===n)&&v===58&&(h=!0,v=t.input.charCodeAt(++t.position),l0(t,!0,e),kre(t,e,LFe,!1,!0),_=t.result),g?Pre(t,l,A,E,y,_,n,o,s):h?l.push(Pre(t,null,A,E,y,_,n,o,s)):l.push(y),l0(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}Gn(t,"unexpected end of the stream within a flow collection")}a(deo,"readFlowCollection");function feo(t,e){var r,n,o=TRt,s=!1,c=!1,l=e,u=0,d=!1,p,h;if(h=t.input.charCodeAt(t.position),h===124)n=!1;else if(h===62)n=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)TRt===o?o=h===43?PHr:ZZi:Gn(t,"repeat of a chomping mode identifier");else if((p=oeo(h))>=0)p===0?Gn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Gn(t,"repeat of an indentation width identifier"):(l=e+p-1,c=!0);else break;if(rj(h)){do h=t.input.charCodeAt(++t.position);while(rj(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!HP(h)&&h!==0)}for(;h!==0;){for(kRt(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!c||t.lineIndentl&&(l=t.lineIndent),HP(h)){u++;continue}if(t.lineIndente)&&u!==0)Gn(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(E&&(c=t.line,l=t.lineStart,u=t.position),kre(t,e,FFe,!0,o)&&(E?A=t.result:y=t.result),E||(Pre(t,h,m,g,A,y,c,l,u),g=A=y=null),l0(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&v!==0)Gn(t,"bad indentation of a mapping entry");else if(t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),h=0,m=t.implicitTypes.length;h"),t.result!==null&&A.kind!==t.kind&&Gn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+A.kind+'", not "'+t.kind+'"'),A.resolve(t.result,t.tag)?(t.result=A.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Gn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||p}a(kre,"composeNode");function Aeo(t){var e=t.position,r,n,o,s=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(c=t.input.charCodeAt(t.position))!==0&&(l0(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(s=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!$E(c);)c=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),o=[],n.length<1&&Gn(t,"directive name must not be less than one character in length");c!==0;){for(;rj(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!HP(c));break}if(HP(c))break;for(r=t.position;c!==0&&!$E(c);)c=t.input.charCodeAt(++t.position);o.push(t.input.slice(r,t.position))}c!==0&&kRt(t),w6.call(NHr,n)?NHr[n](t,n,o):UFe(t,'unknown document directive "'+n+'"')}if(l0(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,l0(t,!0,-1)):s&&Gn(t,"directives end mark is expected"),kre(t,t.lineIndent-1,FFe,!1,!0),l0(t,!0,-1),t.checkLineBreaks&&teo.test(t.input.slice(e,t.position))&&UFe(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&GFe(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,l0(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=njr(t,r);if(typeof e!="function")return n;for(var o=0,s=n.length;o=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}a(bEe,"codePointAt");function pHr(t){var e=/^\n* /;return e.test(t)}a(pHr,"needIndentIndicator");var hHr=1,cRt=2,mHr=3,gHr=4,mne=5;function VXi(t,e,r,n,o,s,c,l){var u,d=0,p=null,h=!1,m=!1,g=n!==-1,A=-1,y=jXi(bEe(t,0))&&$Xi(bEe(t,t.length-1));if(e||c)for(u=0;u=65536?u+=2:u++){if(d=bEe(t,u),!xEe(d))return mne;y=y&&UGr(d,p,l),p=d}else{for(u=0;u=65536?u+=2:u++){if(d=bEe(t,u),d===SEe)h=!0,g&&(m=m||u-A-1>n&&t[A+1]!==" ",A=u);else if(!xEe(d))return mne;y=y&&UGr(d,p,l),p=d}m=m||g&&u-A-1>n&&t[A+1]!==" "}return!h&&!m?y&&!c&&!o(t)?hHr:s===IEe?mne:cRt:r>9&&pHr(t)?mne:c?s===IEe?mne:cRt:m?gHr:mHr}a(VXi,"chooseScalarStyle");function WXi(t,e,r,n,o){t.dump=(function(){if(e.length===0)return t.quotingType===IEe?'""':"''";if(!t.noCompatMode&&(LXi.indexOf(e)!==-1||FXi.test(e)))return t.quotingType===IEe?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),c=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(d){return HXi(t,d)}switch(a(u,"testAmbiguity"),VXi(e,l,t.indent,c,u,t.quotingType,t.forceQuotes&&!n,o)){case hHr:return e;case cRt:return"'"+e.replace(/'/g,"''")+"'";case mHr:return"|"+QGr(e,t.indent)+qGr(LGr(e,s));case gHr:return">"+QGr(e,t.indent)+qGr(LGr(zXi(e,c),s));case mne:return'"'+YXi(e)+'"';default:throw new rC("impossible error: invalid scalar style")}})()}a(WXi,"writeScalar");function QGr(t,e){var r=pHr(t)?String(e):"",n=t[t.length-1]===` +`&&(s+=r),s+=c;return s}a(BHr,"indentString");function xRt(t,e){return` +`+dp.repeat(" ",t.indent*e)}a(xRt,"generateNextLine");function jeo(t,e){var r,n,o;for(r=0,n=t.implicitTypes.length;r=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}a(Cye,"codePointAt");function fjr(t){var e=/^\n* /;return e.test(t)}a(fjr,"needIndentIndicator");var pjr=1,wRt=2,hjr=3,mjr=4,wre=5;function Weo(t,e,r,n,o,s,c,l){var u,d=0,p=null,h=!1,m=!1,g=n!==-1,A=-1,y=$eo(Cye(t,0))&&Veo(Cye(t,t.length-1));if(e||c)for(u=0;u=65536?u+=2:u++){if(d=Cye(t,u),!Sye(d))return wre;y=y&&FHr(d,p,l),p=d}else{for(u=0;u=65536?u+=2:u++){if(d=Cye(t,u),d===bye)h=!0,g&&(m=m||u-A-1>n&&t[A+1]!==" ",A=u);else if(!Sye(d))return wre;y=y&&FHr(d,p,l),p=d}m=m||g&&u-A-1>n&&t[A+1]!==" "}return!h&&!m?y&&!c&&!o(t)?pjr:s===Tye?wre:wRt:r>9&&fjr(t)?wre:c?s===Tye?wre:wRt:m?mjr:hjr}a(Weo,"chooseScalarStyle");function zeo(t,e,r,n,o){t.dump=(function(){if(e.length===0)return t.quotingType===Tye?'""':"''";if(!t.noCompatMode&&(Feo.indexOf(e)!==-1||Ueo.test(e)))return t.quotingType===Tye?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),c=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(d){return jeo(t,d)}switch(a(u,"testAmbiguity"),Weo(e,l,t.indent,c,u,t.quotingType,t.forceQuotes&&!n,o)){case pjr:return e;case wRt:return"'"+e.replace(/'/g,"''")+"'";case hjr:return"|"+UHr(e,t.indent)+QHr(BHr(e,s));case mjr:return">"+UHr(e,t.indent)+QHr(BHr(Yeo(e,c),s));case wre:return'"'+Keo(e)+'"';default:throw new jE("impossible error: invalid scalar style")}})()}a(zeo,"writeScalar");function UHr(t,e){var r=fjr(t)?String(e):"",n=t[t.length-1]===` `,o=n&&(t[t.length-2]===` `||t===` `),s=o?"+":n?"":"-";return r+s+` -`}a(QGr,"blockHeader");function qGr(t){return t[t.length-1]===` -`?t.slice(0,-1):t}a(qGr,"dropEndingNewline");function zXi(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var d=t.indexOf(` -`);return d=d!==-1?d:t.length,r.lastIndex=d,GGr(t.slice(0,d),e)})(),o=t[0]===` +`}a(UHr,"blockHeader");function QHr(t){return t[t.length-1]===` +`?t.slice(0,-1):t}a(QHr,"dropEndingNewline");function Yeo(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var d=t.indexOf(` +`);return d=d!==-1?d:t.length,r.lastIndex=d,qHr(t.slice(0,d),e)})(),o=t[0]===` `||t[0]===" ",s,c;c=r.exec(t);){var l=c[1],u=c[2];s=u[0]===" ",n+=l+(!o&&!s&&u!==""?` -`:"")+GGr(u,e),o=s}return n}a(zXi,"foldString");function GGr(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,o=0,s,c=0,l=0,u="";n=r.exec(t);)l=n.index,l-o>e&&(s=c>o?c:l,u+=` +`:"")+qHr(u,e),o=s}return n}a(Yeo,"foldString");function qHr(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,o=0,s,c=0,l=0,u="";n=r.exec(t);)l=n.index,l-o>e&&(s=c>o?c:l,u+=` `+t.slice(o,s),o=s+1),c=l;return u+=` `,t.length-o>e&&c>o?u+=t.slice(o,c)+` -`+t.slice(c+1):u+=t.slice(o),u.slice(1)}a(GGr,"foldLine");function YXi(t){for(var e="",r=0,n,o=0;o=65536?o+=2:o++)r=bEe(t,o),n=Hg[r],!n&&xEe(r)?(e+=t[o],r>=65536&&(e+=t[o+1])):e+=n||QXi(r);return e}a(YXi,"escapeString");function KXi(t,e,r){var n="",o=t.tag,s,c,l;for(s=0,c=r.length;s"u"&&oO(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=o,t.dump="["+n+"]"}a(KXi,"writeFlowSequence");function HGr(t,e,r,n){var o="",s=t.tag,c,l,u;for(c=0,l=r.length;c"u"&&oO(t,e+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=aRt(t,e)),t.dump&&SEe===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=s,t.dump=o||"[]"}a(HGr,"writeBlockSequence");function JXi(t,e,r){var n="",o=t.tag,s=Object.keys(r),c,l,u,d,p;for(c=0,l=s.length;c1024&&(p+="? "),p+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),oO(t,e,d,!1,!1)&&(p+=t.dump,n+=p));t.tag=o,t.dump="{"+n+"}"}a(JXi,"writeFlowMapping");function XXi(t,e,r,n){var o="",s=t.tag,c=Object.keys(r),l,u,d,p,h,m;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys=="function")c.sort(t.sortKeys);else if(t.sortKeys)throw new rC("sortKeys must be a boolean or a function");for(l=0,u=c.length;l1024,h&&(t.dump&&SEe===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,h&&(m+=aRt(t,e)),oO(t,e+1,p,!0,h)&&(t.dump&&SEe===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,o+=m));t.tag=s,t.dump=o||"{}"}a(XXi,"writeBlockMapping");function jGr(t,e,r){var n,o,s,c,l,u;for(o=r?t.explicitTypes:t.implicitTypes,s=0,c=o.length;s tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}a(jGr,"detectType");function oO(t,e,r,n,o,s,c){t.tag=null,t.dump=r,jGr(t,r,!1)||jGr(t,r,!0);var l=sHr.call(t.dump),u=n,d;n&&(n=t.flowLevel<0||t.flowLevel>e);var p=l==="[object Object]"||l==="[object Array]",h,m;if(p&&(h=t.duplicates.indexOf(r),m=h!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&e>0)&&(o=!1),m&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(p&&m&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(XXi(t,e,t.dump,o),m&&(t.dump="&ref_"+h+t.dump)):(JXi(t,e,t.dump),m&&(t.dump="&ref_"+h+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!c&&e>0?HGr(t,e-1,t.dump,o):HGr(t,e,t.dump,o),m&&(t.dump="&ref_"+h+t.dump)):(KXi(t,e,t.dump),m&&(t.dump="&ref_"+h+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&WXi(t,t.dump,e,s,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new rC("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(d=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",t.dump=d+" "+t.dump)}return!0}a(oO,"writeNode");function ZXi(t,e){var r=[],n=[],o,s;for(lRt(t,r,n),o=0,s=n.length;onew mRt(o))}async getCustomAgentById(e,r){return(await this.listCustomAgents(e)).find(o=>o.id===r)}async updateCustomAgent(e,r){if(e.isReadonly)throw new Error(`Cannot update readonly agent: ${e.name}`);await this.agentUpdateSequencer.queue(e.id,async()=>{await this.performUpdateCustomAgent(e,r)})}async performUpdateCustomAgent(e,r){let n=[];a(l=>{l&&n.push(l)},"addIfNotUndefined")(this.updateCustomAgentTools(e,r.updateToolOptions));let s,c=e.promptFileEntry?.parsedPromptFile;if(!c)throw new Error("Cannot update agent: parsedPromptFile is undefined");if(n.forEach(l=>{let u=l(c);u!==void 0&&(s={...s||{},...u})}),s!==void 0){let l={...this.extractHeader(c.header),...s},u="";if(c.header){let m=[];for(let g of c.header.attributes){let A=g.key,y=l[A];if(y!==void 0)if(A==="tools"&&Array.isArray(y)){let E=y.map(_=>JSON.stringify(_).slice(1,-1)).map(_=>`'${_}'`).join(", ");m.push(`tools: [${E}]`)}else{let E=wEe({[A]:y}).trim();m.push(E)}}u=m.join(` +`+t.slice(c+1):u+=t.slice(o),u.slice(1)}a(qHr,"foldLine");function Keo(t){for(var e="",r=0,n,o=0;o=65536?o+=2:o++)r=Cye(t,o),n=Og[r],!n&&Sye(r)?(e+=t[o],r>=65536&&(e+=t[o+1])):e+=n||qeo(r);return e}a(Keo,"escapeString");function Jeo(t,e,r){var n="",o=t.tag,s,c,l;for(s=0,c=r.length;s"u"&&qM(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=o,t.dump="["+n+"]"}a(Jeo,"writeFlowSequence");function GHr(t,e,r,n){var o="",s=t.tag,c,l,u;for(c=0,l=r.length;c"u"&&qM(t,e+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=xRt(t,e)),t.dump&&bye===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=s,t.dump=o||"[]"}a(GHr,"writeBlockSequence");function Xeo(t,e,r){var n="",o=t.tag,s=Object.keys(r),c,l,u,d,p;for(c=0,l=s.length;c1024&&(p+="? "),p+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),qM(t,e,d,!1,!1)&&(p+=t.dump,n+=p));t.tag=o,t.dump="{"+n+"}"}a(Xeo,"writeFlowMapping");function Zeo(t,e,r,n){var o="",s=t.tag,c=Object.keys(r),l,u,d,p,h,m;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys=="function")c.sort(t.sortKeys);else if(t.sortKeys)throw new jE("sortKeys must be a boolean or a function");for(l=0,u=c.length;l1024,h&&(t.dump&&bye===t.dump.charCodeAt(0)?m+="?":m+="? "),m+=t.dump,h&&(m+=xRt(t,e)),qM(t,e+1,p,!0,h)&&(t.dump&&bye===t.dump.charCodeAt(0)?m+=":":m+=": ",m+=t.dump,o+=m));t.tag=s,t.dump=o||"{}"}a(Zeo,"writeBlockMapping");function HHr(t,e,r){var n,o,s,c,l,u;for(o=r?t.explicitTypes:t.implicitTypes,s=0,c=o.length;s tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}a(HHr,"detectType");function qM(t,e,r,n,o,s,c){t.tag=null,t.dump=r,HHr(t,r,!1)||HHr(t,r,!0);var l=ojr.call(t.dump),u=n,d;n&&(n=t.flowLevel<0||t.flowLevel>e);var p=l==="[object Object]"||l==="[object Array]",h,m;if(p&&(h=t.duplicates.indexOf(r),m=h!==-1),(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&e>0)&&(o=!1),m&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(p&&m&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(Zeo(t,e,t.dump,o),m&&(t.dump="&ref_"+h+t.dump)):(Xeo(t,e,t.dump),m&&(t.dump="&ref_"+h+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!c&&e>0?GHr(t,e-1,t.dump,o):GHr(t,e,t.dump,o),m&&(t.dump="&ref_"+h+t.dump)):(Jeo(t,e,t.dump),m&&(t.dump="&ref_"+h+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&zeo(t,t.dump,e,s,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new jE("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(d=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",t.dump=d+" "+t.dump)}return!0}a(qM,"writeNode");function eto(t,e){var r=[],n=[],o,s;for(RRt(t,r,n),o=0,s=n.length;onew ORt(o))}async getCustomAgentById(e,r){return(await this.listCustomAgents(e)).find(o=>o.id===r)}async updateCustomAgent(e,r){if(e.isReadonly)throw new Error(`Cannot update readonly agent: ${e.name}`);await this.agentUpdateSequencer.queue(e.id,async()=>{await this.performUpdateCustomAgent(e,r)})}async performUpdateCustomAgent(e,r){let n=[];a(l=>{l&&n.push(l)},"addIfNotUndefined")(this.updateCustomAgentTools(e,r.updateToolOptions));let s,c=e.promptFileEntry?.parsedPromptFile;if(!c)throw new Error("Cannot update agent: parsedPromptFile is undefined");if(n.forEach(l=>{let u=l(c);u!==void 0&&(s={...s||{},...u})}),s!==void 0){let l={...this.extractHeader(c.header),...s},u="";if(c.header){let m=[];for(let g of c.header.attributes){let A=g.key,y=l[A];if(y!==void 0)if(A==="tools"&&Array.isArray(y)){let E=y.map(_=>JSON.stringify(_).slice(1,-1)).map(_=>`'${_}'`).join(", ");m.push(`tools: [${E}]`)}else{let E=Iye({[A]:y}).trim();m.push(E)}}u=m.join(` `)+` `}let d=c.body?.content,p=u?`--- ${u}--- -${d}`:d||"",h=Eo(c.uri);if(!h)throw new Error(`Invalid file URI: ${c.uri}`);await AHr.promises.writeFile(h,p,{encoding:"utf8"})}}updateCustomAgentTools(e,r){if(r)return n=>{let o=n.header?.tools;if(o!==void 0)return r.forEach(s=>{let c=o.findIndex(l=>l===s.toolConfigurationKey);s.status==="enabled"?c===-1&&o.push(s.toolConfigurationKey):c!==-1&&o.splice(c,1)}),{tools:o}}}extractHeader(e){let r=a(o=>{if(o.type==="array")return[...o.items.map(s=>r(s))];if(o.type==="object"){let s={};return o.properties.forEach(c=>{s[c.key.value]=r(c.value)}),s}return o.value},"extractValue"),n={};return e?.attributes.forEach(o=>{let{key:s,value:c}=o;n[s]=r(c)}),n}};var PEe=class{constructor(e){this.customAgent=e;this._isBuiltIn=!1;this.kind="Agent";e.promptFileEntry?.promptPath?.storage==="clsAssets"&&(this._isBuiltIn=!0)}static{a(this,"CustomChatMode")}get isBuiltIn(){return this._isBuiltIn}get id(){return this.customAgent.id}get name(){return this.customAgent.name}get uri(){return this.customAgent?.promptFileEntry?.parsedPromptFile?.uri}get description(){return this.customAgent.description}get customTools(){return this.customAgent.tools}get model(){return this.customAgent.model}get handOffs(){return this.customAgent.handOffs}get instruction(){return this.customAgent.instruction}get source(){return this.customAgent}},REe=class{constructor(e,r,n,o){this.id=e;this.name=r;this.kind=n;this.description=o;this.isBuiltIn=!0}static{a(this,"BuiltInChatMode")}},Tc={Ask:new REe("Ask","Ask","Ask","General purpose chat mode for questions and assistance"),Agent:new REe("Agent","Agent","Agent","Advanced agent mode with access to tools and capabilities"),InlineAgent:new REe("InlineAgent","Agent","InlineAgent","Agent mode with a restricted tool set for inline editing")};function EHr(t){return t===Tc.Agent||t.id===Tc.Agent.id}a(EHr,"isBuiltInAgentMode");function oZi(t){return t===Tc.InlineAgent||t.id===Tc.InlineAgent.id}a(oZi,"isBuiltInInlineAgentMode");function CHr(t){return t===Tc.Ask||t.id===Tc.Ask.id||EHr(t)||oZi(t)}a(CHr,"isBuiltInChatMode");function kEe(t){return EHr(t)||!t.isBuiltIn&&t.customTools===void 0}a(kEe,"shouldApplyGlobalToolsSetting");var dy=class{constructor(e){this.ctx=e}static{a(this,"ChatModeService")}async listChatModes(e){let r=[Tc.Ask,Tc.Agent,Tc.InlineAgent],o=await this.ctx.get(J1).listCustomAgents(e||[]);return r.push(...o.filter(s=>s.invokePolicy.includes("user")).map(s=>new PEe(s))),r}async getChatMode(e,r,n){switch(e){case"Ask":return Tc.Ask;case"Agent":return r?await this.getCustomChatModeById(r,n)??Tc.Agent:Tc.Agent;case"InlineAgent":return Tc.InlineAgent}}async getCustomChatModeById(e,r){return(await this.listChatModes(r)).find(o=>o.id===e)}};f();var Sc=class extends Error{static{a(this,"CanceledError")}constructor(){super("Canceled"),this.name="Canceled"}};f();var O9e=class{constructor(){this._tools=new Map}static{a(this,"ToolRegistry")}registerTool(e){this._tools.set(e.id,e)}unregisterTool(e){return this._tools.delete(e)}getTool(e){return this._tools.get(e)}listTools(){return Array.from(this._tools.values())}};f();f();f();f();var Ge=new Se("chat");var Ene={Unknown:-1,Default:0,ToolRoundExceedError:1e4};var Na=class{constructor(e){this.ctx=e;this.progressEntries=new $r(250)}static{a(this,"ConversationProgress")}async begin(e,r,n){let o={status:"open",handler:n};this.progressEntries.set(e.id,o),await o.handler.begin(this.ctx,e,r)}async report(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&await o.handler.report(this.ctx,e,r,n)}async end(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&(this.progressEntries.set(e.id,{...o,status:"done",updatedAt:Date.now()}),await o.handler.end(this.ctx,e,r,n))}async cancel(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&(this.progressEntries.set(e.id,{...o,status:"cancelled",updatedAt:Date.now()}),await o.handler.cancel(this.ctx,e,r,n))}getCurrentHandler(e){return this.progressEntries.get(e.id)?.handler}getProgressEntry(e){let r=this.progressEntries.get(e.id);if(r===void 0)throw new Error(`No work done token for conversation ${e.id}`);return r.status!=="open"&&Ge.error(this.ctx,`Work done token for conversation ${e.id} is already ${r.status}, last updated at ${r.updatedAt}`),r}};f();f();f();var Ss={Azure:"Azure",OpenAI:"OpenAI",Gemini:"Gemini",Groq:"Groq",OpenRouter:"OpenRouter",Anthropic:"Anthropic"};function rF(t){return t===Ss.Azure?1:0}a(rF,"getAuthTypeForProvider");function B9e(t){return t===Ss.OpenAI||t===Ss.Gemini||t===Ss.Groq||t===Ss.OpenRouter||t===Ss.Anthropic}a(B9e,"isOpenAICompatible");async function nk(t,e,r){let o=await new tc(t.get(Si)).getStoredModelConfigs(e),s=o&&o[r]&&o[r].isRegistered!==!1?o[r]:void 0,c=s?.modelCapabilities,l=c?.name||r,u=c?.maxInputTokens||1e5,d=c?.maxOutputTokens||8192;return{modelId:r,uiName:l,modelFamily:Cn.BYOK,providerName:e,deploymentUrl:s?.deploymentUrl,maxRequestTokens:u,maxResponseTokens:d,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!!c?.toolCalling,supportsThinking:!!c?.thinking,originalBillingMultiplier:0}}a(nk,"resolveModelConfiguration");async function _Hr(t,e,r){return await new tc(t.get(Si)).getAPIKey(e,r)}a(_Hr,"resolveModelKey");function vHr(t,e){let{protocol:r,hostname:n,pathname:o}=new URL(e);if(o.endsWith("/chat/completions"))return e;if(n.endsWith(".models.ai.azure.com")||n.endsWith(".inference.ml.azure.com"))return`${r}//${n}/v1/chat/completions`;if(n.endsWith(".openai.azure.com"))return`${r}//${n}/openai/deployments/${t}/chat/completions?api-version=2025-01-01-preview`;throw new Error(`Unrecognized Azure deployment URL: ${e}`)}a(vHr,"resolveAzureUrl");function Cne(t){let e=t.getTokenValue("editor_preview_features")=="0";return t.userInfo?.isIndividualUser&&!e}a(Cne,"isBYOKEnabled");var ik="byok",tc=class{constructor(e){this.persistenceManager=e}static{a(this,"BYOKPersistence")}async getAPIKey(e,r){if(r){let o=await this.persistenceManager.read(ik,`${e}-${r}-api-key`);if(o)return o}return await this.persistenceManager.read(ik,`${e}-api-key`)}async storeAPIKey(e,r,n,o){n!==2&&(n===0?await this.persistenceManager.update(ik,`${e}-api-key`,r):n===1&&o&&await this.persistenceManager.update(ik,`${e}-${o}-api-key`,r))}async deleteAPIKey(e,r,n){r!==2&&(r===0?await this.persistenceManager.delete(ik,`${e}-api-key`):r===1&&n&&await this.persistenceManager.delete(ik,`${e}-${n}-api-key`))}async getStoredModelConfigs(e){return await this.persistenceManager.read(ik,`${e}-models-config`)||{}}async getAllModels(e){let r=[];if(!Cne(await e.get(Ot).getToken()))return r;for(let n of Object.values(Ss)){let o=await this.getStoredModelConfigs(n);r.push(...Object.keys(o).map(s=>({name:s,provider:n,capabilities:o[s].modelCapabilities})))}return r}async saveModelConfig(e,r,n,o,s){let c=await this.getStoredModelConfigs(e);c[r]=n,await this.persistenceManager.update(ik,`${e}-models-config`,c),o&&s&&await this.storeAPIKey(e,o,s,r)}async removeModelConfig(e,r){let n=await this.getStoredModelConfigs(e),o=n[r];o&&(delete n[r],await this.persistenceManager.update(ik,`${e}-models-config`,n),o.deploymentUrl&&await this.deleteAPIKey(e,1,r))}async removeAllModelConfigs(e){await this.persistenceManager.delete(ik,`${e}-models-config`)}};f();f();var NEe=new Se("openAICompatibleLMProvider"),gRt={[Ss.OpenAI]:"https://api.openai.com/v1",[Ss.Gemini]:"https://generativelanguage.googleapis.com/v1beta/openai",[Ss.Groq]:"https://api.groq.com/openai/v1",[Ss.OpenRouter]:"https://openrouter.ai/api/v1",[Ss.Anthropic]:"https://api.anthropic.com/v1"},BT=class{constructor(e,r){this._lastFetchTime=0;this.providerName=e,this.ctx=r}static{a(this,"BaseOpenAICompatibleLMProvider")}async getAllModels(){await this.ensureKnownModelsCache();try{let e=this.getFetchModelUrl(),r={"Content-Type":"application/json"},n=await new tc(this.ctx.get(Si)).getAPIKey(this.providerName);n&&(r.Authorization=`Bearer ${n}`);let o=await fetch(e,{method:"GET",headers:r});if(!o.ok)throw new Error(`Failed to fetch models: ${o.status} ${o.statusText}`);let s=await o.json();if(s.error)throw new Error(`API Error: ${JSON.stringify(s.error)}`);let c=[];for(let l of s.data){let u=this._knownModels?.[l.id];u&&c.push({providerName:this.providerName,modelId:l.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:u})}return c}catch(e){throw NEe.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,e),e}}getBaseUrl(){let e=gRt[this.providerName];if(!e)throw new Error(`Unsupported provider: ${this.providerName}`);return e}getFetchModelUrl(){return`${this.getBaseUrl()}/models`}async ensureKnownModelsCache(){let e=Date.now();!this._knownModels&&(this._knownModels=await this.fetchKnownModelList(),this._lastFetchTime=e)}async fetchKnownModelList(){let e=await(await this.ctx.get(dr).fetch("https://main.vscode-cdn.net/extensions/copilotChat.json",{method:"GET"})).json(),r;return e.version!==1?r={}:r=e.modelInfo[this.providerName]||{},r}};f();async function*nF(t,e){for await(let r of t)yield e(r)}a(nF,"asyncIterableMap");async function*bHr(t,e){for await(let r of t)await e(r)&&(yield r)}a(bHr,"asyncIterableFilter");async function*DEe(t,e){for await(let r of t){let n=await e(r);n!==void 0&&(yield n)}}a(DEe,"asyncIterableMapFilter");async function*THr(...t){for(let e of t)yield*e}a(THr,"asyncIterableConcat");f();f();var Yx=class{static{a(this,"EndpointStrategyFactory")}static{this.strategies=new Map}static register(e){this.strategies.set(e.name,e)}static getStrategy(e){let r=this.strategies.get(e);if(!r){let n=this.strategies.get("completions");if(!n)throw new Error(`No strategy registered for endpoint '${e}' and no fallback strategy available. Available: ${Array.from(this.strategies.keys()).join(", ")}`);return n}return r}static hasStrategy(e){return this.strategies.has(e)}};f();var Da=class{static{a(this,"ModelConfigurationProvider")}},F9e=class extends Da{constructor(r){super();this.ctx=r}static{a(this,"DefaultModelConfigurationProvider")}async getBestChatModelConfig(r,n){let o=[];for(let s of r){let c=await this.getFirstMatchingChatModelConfiguration(s,n);c&&o.push(c)}if(o.length>0){let s=o.find(c=>c.isExperimental);return s||o[0]}throw Ge.error(this.ctx,`No model configuration found for families: ${r.join(", ")}. Available models: ${JSON.stringify(await this.ctx.get(cl).getMetadata())}`),new Error("No model configuration found")}async getFirstMatchingModelMetadata(r){let n=await this.ctx.get(cl).getMetadata(),o=aZi(n,r);if(o.length>0)return o[0]}async getFirstMatchingChatModelConfiguration(r,n){let o=await this.getFirstMatchingModelMetadata({family:r,type:"chat",supports:n});if(o===void 0)return;let s=o.supported_endpoints&&o.supported_endpoints.length>0?o.supported_endpoints:["/chat/completions"],c=o.capabilities.supports?.adaptive_thinking??!1;return r===Cn.Gpt35turbo||r===Cn.Gpt4oMini?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:yRt(6144,o),maxResponseTokens:ARt(2048,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:r===Cn.Gpt4||r===Cn.Gpt4turbo?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:yRt(10240,o),maxResponseTokens:ARt(4096,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:r===Cn.Gpt4o?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:await sZi(this.ctx,o),maxResponseTokens:ARt(4096,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:o.capabilities.limits?.max_prompt_tokens??8192,maxResponseTokens:o.capabilities.limits?.max_output_tokens??4096,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}}async getFirstMatchingEmbeddingModelConfiguration(r){let n=await this.getFirstMatchingModelMetadata({family:r,type:"embeddings"});if(n!==void 0&&r===VLe.textEmbedding3Small)return{modelId:n.id,modelFamily:r,maxBatchSize:n.capabilities.limits?.max_inputs??16,maxTokens:8191,tokenizer:"cl100k_base"}}};async function sZi(t,e){let r=t.get(jt),n=await r.fetchTokenAndUpdateExPValuesAndAssignments(),o=r.ideChatMaxRequestTokens(n);return o===-1&&(o=16384),yRt(o,e)}a(sZi,"getExpRequestTokens");function yRt(t,e){return e.capabilities.limits?.max_prompt_tokens?Math.min(t,e.capabilities.limits.max_prompt_tokens):t}a(yRt,"getRequestTokens");function ARt(t,e){return e.capabilities.limits?.max_output_tokens?Math.min(t,e.capabilities.limits.max_output_tokens):t}a(ARt,"getResponseTokens");function aZi(t,e){return t.filter(r=>r.capabilities.type!==e.type||r.capabilities.family!==e.family&&!(r.is_chat_fallback===!0&&r.id===e.family)||r.capabilities.family===e.family&&r.id!==e.family&&r.is_chat_fallback===!0?!1:r.capabilities.supports===void 0||e.supports===void 0?!0:Object.keys(e.supports).every(n=>e.supports?.[n]===r.capabilities.supports?.[n]))}a(aZi,"filterModelsByCapabilities");function cZi(t){let e=t.supportedEndpoints;return!e||e.length===0?!1:e.includes("/responses")}a(cZi,"shouldUseResponsesApi");function lZi(t){let e=t.supportedEndpoints;return!e||e.length===0?!1:e.includes("/v1/messages")&&!e.includes("/responses")}a(lZi,"shouldUseMessagesApi");var SHr=["completions","responses","v1/messages"];function U9e(t,e){return e?"v1/messages":t&&cZi(t)?"responses":"completions"}a(U9e,"resolveEndpointRoute");async function Q9e(t,e){if(!lZi(e))return!1;let r=vr(t,tt.AnthropicMessagesEndpoint);if(r==="true")return!0;if(r==="false")return!1;let n=t.get(jt),o=await n.fetchTokenAndUpdateExPValuesAndAssignments();return n.anthropicUseMessagesEndpoint(o)}a(Q9e,"willUseMessagesEndpoint");f();function q9e(t){let e=t.toLowerCase();return e.startsWith("gpt")&&e.includes("-codex")}a(q9e,"isCodexStyleGptModel");function IHr(t){return t?t.toLowerCase().startsWith("gpt-5"):!1}a(IHr,"isGpt5PlusFamily");function xHr(t){return t?t.toLowerCase().startsWith("claude"):!1}a(xHr,"isAnthropicModel");f();f();function wHr(t,e){!e||!e.providerName||(e.providerName===Ss.Anthropic?(delete t.temperature,delete t.top_p):e.supportsThinking&&(delete t.temperature,"max_tokens"in t&&(t.max_completion_tokens=t.max_tokens,delete t.max_tokens)),e.providerName&&delete t.max_tokens)}a(wHr,"adaptRequestForBYOKProvider");f();var LT=class extends V1{static{a(this,"ChatQuotaService")}constructor(e){super(),this._register(ss(e,r=>{this.processUserInfoQuotaSnapshot(r.userInfo?.raw)}))}get quotaExhausted(){return this._quotaInfo?this._quotaInfo.used>=this._quotaInfo.quota&&!this._quotaInfo.overageEnabled:!1}get overagesEnabled(){return this._quotaInfo?this._quotaInfo.overageEnabled:!1}clearQuota(){this._quotaInfo=void 0}processQuotaHeaders(e){let r=e.get("x-quota-snapshot-premium_models")||e.get("x-quota-snapshot-premium_interactions");if(r)try{let n=new URLSearchParams(r),o=parseInt(n.get("ent")||"0",10),s=parseFloat(n.get("ov")||"0.0"),c=n.get("ovPerm")==="true",l=parseFloat(n.get("rem")||"0.0"),u=n.get("rst"),d;u?d=new Date(u):(d=new Date,d.setMonth(d.getMonth()+1));let p=Math.max(0,o*(1-l/100));this._quotaInfo={quota:o,used:p,overageUsed:s,overageEnabled:c,resetDate:d}}catch(n){console.error("Failed to parse quota header",n)}}processUserInfoQuotaSnapshot(e){!e||!e.quota_snapshots||!e.quota_reset_date||(this._quotaInfo={overageEnabled:e.quota_snapshots.premium_interactions.overage_permitted,overageUsed:e.quota_snapshots.premium_interactions.overage_count,quota:e.quota_snapshots.premium_interactions.entitlement,resetDate:new Date(e.quota_reset_date),used:Math.max(0,e.quota_snapshots.premium_interactions.entitlement*(1-e.quota_snapshots.premium_interactions.percent_remaining/100))})}};f();f();f();var iF="copilot-edits-session";f();f();f();f();function G9e(t,e,r,n,o,s,c){return gRr(t,e,r,o,n),{completionText:e,meanLogProb:uZi(t,r),meanAlternativeLogProb:dZi(t,r),choiceIndex:n,requestId:o,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:c,copilotAnnotations:r.copilot_annotations,clientCompletionId:yr(),finishReason:r.finish_reason}}a(G9e,"convertToAPIChoice");function uZi(t,e){if(e?.logprobs?.token_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--)r+=e.logprobs.token_logprobs[s],n+=1;return n>0?r/n:void 0}catch(r){_r.exception(t,r,"Error calculating mean prob")}}a(uZi,"calculateMeanLogProb");function dZi(t,e){if(e?.logprobs?.top_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--){let c={...e.logprobs.top_logprobs[s]};delete c[e.logprobs.tokens[s]],r+=Math.max(...Object.values(c)),n+=1}return n>0?r/n:void 0}catch(r){_r.exception(t,r,"Error calculating mean prob")}}a(dZi,"calculateMeanAlternativeLogProb");function _ne(t,e){return q_(t)||e<=1?0:e<10?.2:e<20?.4:.8}a(_ne,"getTemperatureForSamples");var fZi={markdown:[` +${d}`:d||"",h=mo(c.uri);if(!h)throw new Error(`Invalid file URI: ${c.uri}`);await gjr.promises.writeFile(h,p,{encoding:"utf8"})}}updateCustomAgentTools(e,r){if(r)return n=>{let o=n.header?.tools;if(o!==void 0)return r.forEach(s=>{let c=o.findIndex(l=>l===s.toolConfigurationKey);s.status==="enabled"?c===-1&&o.push(s.toolConfigurationKey):c!==-1&&o.splice(c,1)}),{tools:o}}}extractHeader(e){let r=a(o=>{if(o.type==="array")return[...o.items.map(s=>r(s))];if(o.type==="object"){let s={};return o.properties.forEach(c=>{s[c.key.value]=r(c.value)}),s}return o.value},"extractValue"),n={};return e?.attributes.forEach(o=>{let{key:s,value:c}=o;n[s]=r(c)}),n}};var wye=class{constructor(e){this.customAgent=e;this._isBuiltIn=!1;this.kind="Agent";e.promptFileEntry?.promptPath?.storage==="clsAssets"&&(this._isBuiltIn=!0)}static{a(this,"CustomChatMode")}get isBuiltIn(){return this._isBuiltIn}get id(){return this.customAgent.id}get name(){return this.customAgent.name}get uri(){return this.customAgent?.promptFileEntry?.parsedPromptFile?.uri}get description(){return this.customAgent.description}get customTools(){return this.customAgent.tools}get model(){return this.customAgent.model}get handOffs(){return this.customAgent.handOffs}get instruction(){return this.customAgent.instruction}get source(){return this.customAgent}},xye=class{constructor(e,r,n,o){this.id=e;this.name=r;this.kind=n;this.description=o;this.isBuiltIn=!0}static{a(this,"BuiltInChatMode")}},yc={Ask:new xye("Ask","Ask","Ask","General purpose chat mode for questions and assistance"),Agent:new xye("Agent","Agent","Agent","Advanced agent mode with access to tools and capabilities"),InlineAgent:new xye("InlineAgent","Agent","InlineAgent","Agent mode with a restricted tool set for inline editing")};function yjr(t){return t===yc.Agent||t.id===yc.Agent.id}a(yjr,"isBuiltInAgentMode");function sto(t){return t===yc.InlineAgent||t.id===yc.InlineAgent.id}a(sto,"isBuiltInInlineAgentMode");function Ejr(t){return t===yc.Ask||t.id===yc.Ask.id||yjr(t)||sto(t)}a(Ejr,"isBuiltInChatMode");function Rye(t){return yjr(t)||!t.isBuiltIn&&t.customTools===void 0}a(Rye,"shouldApplyGlobalToolsSetting");var ry=class{constructor(e){this.ctx=e}static{a(this,"ChatModeService")}async listChatModes(e){let r=[yc.Ask,yc.Agent,yc.InlineAgent],o=await this.ctx.get(F1).listCustomAgents(e||[]);return r.push(...o.filter(s=>s.invokePolicy.includes("user")).map(s=>new wye(s))),r}async getChatMode(e,r,n){switch(e){case"Ask":return yc.Ask;case"Agent":return r?await this.getCustomChatModeById(r,n)??yc.Agent:yc.Agent;case"InlineAgent":return yc.InlineAgent}}async getCustomChatModeById(e,r){return(await this.listChatModes(r)).find(o=>o.id===e)}};f();var Ec=class extends Error{static{a(this,"CanceledError")}constructor(){super("Canceled"),this.name="Canceled"}};f();var HFe=class{constructor(){this._tools=new Map}static{a(this,"ToolRegistry")}registerTool(e){this._tools.set(e.id,e)}unregisterTool(e){return this._tools.delete(e)}getTool(e){return this._tools.get(e)}listTools(){return Array.from(this._tools.values())}};f();f();f();f();var Ge=new Se("chat");var Dre={Unknown:-1,Default:0,ToolRoundExceedError:1e4};var xa=class{constructor(e){this.ctx=e;this.progressEntries=new $r(250)}static{a(this,"ConversationProgress")}async begin(e,r,n){let o={status:"open",handler:n};this.progressEntries.set(e.id,o),await o.handler.begin(this.ctx,e,r)}async report(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&await o.handler.report(this.ctx,e,r,n)}async end(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&(this.progressEntries.set(e.id,{...o,status:"done",updatedAt:Date.now()}),await o.handler.end(this.ctx,e,r,n))}async cancel(e,r,n){let o=this.getProgressEntry(e);o.status==="open"&&(this.progressEntries.set(e.id,{...o,status:"cancelled",updatedAt:Date.now()}),await o.handler.cancel(this.ctx,e,r,n))}getCurrentHandler(e){return this.progressEntries.get(e.id)?.handler}getProgressEntry(e){let r=this.progressEntries.get(e.id);if(r===void 0)throw new Error(`No work done token for conversation ${e.id}`);return r.status!=="open"&&Ge.error(this.ctx,`Work done token for conversation ${e.id} is already ${r.status}, last updated at ${r.updatedAt}`),r}};f();f();f();var Es={Azure:"Azure",OpenAI:"OpenAI",Gemini:"Gemini",Groq:"Groq",OpenRouter:"OpenRouter",Anthropic:"Anthropic"};function R6(t){return t===Es.Azure?1:0}a(R6,"getAuthTypeForProvider");function jFe(t){return t===Es.OpenAI||t===Es.Gemini||t===Es.Groq||t===Es.OpenRouter||t===Es.Anthropic}a(jFe,"isOpenAICompatible");async function $P(t,e,r){let o=await new Ka(t.get(Ti)).getStoredModelConfigs(e),s=o&&o[r]&&o[r].isRegistered!==!1?o[r]:void 0,c=s?.modelCapabilities,l=c?.name||r,u=c?.maxInputTokens||1e5,d=c?.maxOutputTokens||8192;return{modelId:r,uiName:l,modelFamily:_n.BYOK,providerName:e,deploymentUrl:s?.deploymentUrl,maxRequestTokens:u,maxResponseTokens:d,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!!c?.toolCalling,supportsThinking:!!c?.thinking,originalBillingMultiplier:0}}a($P,"resolveModelConfiguration");async function _jr(t,e,r){return await new Ka(t.get(Ti)).getAPIKey(e,r)}a(_jr,"resolveModelKey");function Cjr(t,e){let{protocol:r,hostname:n,pathname:o}=new URL(e);if(o.endsWith("/chat/completions"))return e;if(n.endsWith(".models.ai.azure.com")||n.endsWith(".inference.ml.azure.com"))return`${r}//${n}/v1/chat/completions`;if(n.endsWith(".openai.azure.com"))return`${r}//${n}/openai/deployments/${t}/chat/completions?api-version=2025-01-01-preview`;throw new Error(`Unrecognized Azure deployment URL: ${e}`)}a(Cjr,"resolveAzureUrl");function Nre(t){let e=t.getTokenValue("editor_preview_features")=="0";return t.userInfo?.isIndividualUser&&!e}a(Nre,"isBYOKEnabled");var VP="byok",Ka=class{constructor(e){this.persistenceManager=e}static{a(this,"BYOKPersistence")}async getAPIKey(e,r){if(r){let o=await this.persistenceManager.read(VP,`${e}-${r}-api-key`);if(o)return o}return await this.persistenceManager.read(VP,`${e}-api-key`)}async storeAPIKey(e,r,n,o){n!==2&&(n===0?await this.persistenceManager.update(VP,`${e}-api-key`,r):n===1&&o&&await this.persistenceManager.update(VP,`${e}-${o}-api-key`,r))}async deleteAPIKey(e,r,n){r!==2&&(r===0?await this.persistenceManager.delete(VP,`${e}-api-key`):r===1&&n&&await this.persistenceManager.delete(VP,`${e}-${n}-api-key`))}async getStoredModelConfigs(e){return await this.persistenceManager.read(VP,`${e}-models-config`)||{}}async getAllModels(e){let r=[];if(!Nre(await e.get(Nt).getToken()))return r;for(let n of Object.values(Es)){let o=await this.getStoredModelConfigs(n);r.push(...Object.keys(o).map(s=>({name:s,provider:n,capabilities:o[s].modelCapabilities})))}return r}async saveModelConfig(e,r,n,o,s){let c=await this.getStoredModelConfigs(e);c[r]=n,await this.persistenceManager.update(VP,`${e}-models-config`,c),o&&s&&await this.storeAPIKey(e,o,s,r)}async removeModelConfig(e,r){let n=await this.getStoredModelConfigs(e),o=n[r];o&&(delete n[r],await this.persistenceManager.update(VP,`${e}-models-config`,n),o.deploymentUrl&&await this.deleteAPIKey(e,1,r))}async removeAllModelConfigs(e){await this.persistenceManager.delete(VP,`${e}-models-config`)}};f();f();var Pye=new Se("openAICompatibleLMProvider"),BRt={[Es.OpenAI]:"https://api.openai.com/v1",[Es.Gemini]:"https://generativelanguage.googleapis.com/v1beta/openai",[Es.Groq]:"https://api.groq.com/openai/v1",[Es.OpenRouter]:"https://openrouter.ai/api/v1",[Es.Anthropic]:"https://api.anthropic.com/v1"},TT=class{constructor(e,r){this._lastFetchTime=0;this.providerName=e,this.ctx=r}static{a(this,"BaseOpenAICompatibleLMProvider")}async getAllModels(){await this.ensureKnownModelsCache();try{let e=this.getFetchModelUrl(),r={"Content-Type":"application/json"},n=await new Ka(this.ctx.get(Ti)).getAPIKey(this.providerName);n&&(r.Authorization=`Bearer ${n}`);let o=await fetch(e,{method:"GET",headers:r});if(!o.ok)throw new Error(`Failed to fetch models: ${o.status} ${o.statusText}`);let s=await o.json();if(s.error)throw new Error(`API Error: ${JSON.stringify(s.error)}`);let c=[];for(let l of s.data){let u=this._knownModels?.[l.id];u&&c.push({providerName:this.providerName,modelId:l.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:u})}return c}catch(e){throw Pye.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,e),e}}getBaseUrl(){let e=BRt[this.providerName];if(!e)throw new Error(`Unsupported provider: ${this.providerName}`);return e}getFetchModelUrl(){return`${this.getBaseUrl()}/models`}async ensureKnownModelsCache(){let e=Date.now();!this._knownModels&&(this._knownModels=await this.fetchKnownModelList(),this._lastFetchTime=e)}async fetchKnownModelList(){let e=await(await this.ctx.get(dr).fetch("https://main.vscode-cdn.net/extensions/copilotChat.json",{method:"GET"})).json(),r;return e.version!==1?r={}:r=e.modelInfo[this.providerName]||{},r}};f();async function*P6(t,e){for await(let r of t)yield e(r)}a(P6,"asyncIterableMap");async function*vjr(t,e){for await(let r of t)await e(r)&&(yield r)}a(vjr,"asyncIterableFilter");async function*kye(t,e){for await(let r of t){let n=await e(r);n!==void 0&&(yield n)}}a(kye,"asyncIterableMapFilter");async function*bjr(...t){for(let e of t)yield*e}a(bjr,"asyncIterableConcat");f();f();var Fx=class{static{a(this,"EndpointStrategyFactory")}static{this.strategies=new Map}static register(e){this.strategies.set(e.name,e)}static getStrategy(e){let r=this.strategies.get(e);if(!r){let n=this.strategies.get("completions");if(!n)throw new Error(`No strategy registered for endpoint '${e}' and no fallback strategy available. Available: ${Array.from(this.strategies.keys()).join(", ")}`);return n}return r}static hasStrategy(e){return this.strategies.has(e)}};f();var wa=class{static{a(this,"ModelConfigurationProvider")}},VFe=class extends wa{constructor(r){super();this.ctx=r}static{a(this,"DefaultModelConfigurationProvider")}async getBestChatModelConfig(r,n){let o=[];for(let s of r){let c=await this.getFirstMatchingChatModelConfiguration(s,n);c&&o.push(c)}if(o.length>0){let s=o.find(c=>c.isExperimental);return s||o[0]}throw Ge.error(this.ctx,`No model configuration found for families: ${r.join(", ")}. Available models: ${JSON.stringify(await this.ctx.get(tl).getMetadata())}`),new Error("No model configuration found")}async getFirstMatchingModelMetadata(r){let n=await this.ctx.get(tl).getMetadata(),o=cto(n,r);if(o.length>0)return o[0]}async getFirstMatchingChatModelConfiguration(r,n){let o=await this.getFirstMatchingModelMetadata({family:r,type:"chat",supports:n});if(o===void 0)return;let s=o.supported_endpoints&&o.supported_endpoints.length>0?o.supported_endpoints:["/chat/completions"],c=o.capabilities.supports?.adaptive_thinking??!1;return r===_n.Gpt35turbo||r===_n.Gpt4oMini?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:FRt(6144,o),maxResponseTokens:LRt(2048,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:r===_n.Gpt4||r===_n.Gpt4turbo?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:FRt(10240,o),maxResponseTokens:LRt(4096,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:r===_n.Gpt4o?{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:await ato(this.ctx,o),maxResponseTokens:LRt(4096,o),baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}:{modelId:o.id,uiName:o.name,modelFamily:r,maxRequestTokens:o.capabilities.limits?.max_prompt_tokens??8192,maxResponseTokens:o.capabilities.limits?.max_output_tokens??4096,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:o.capabilities.tokenizer,isExperimental:o.isExperimental??!1,stream:o.capabilities.supports?.streaming??!1,toolCalls:o.capabilities.supports?.tool_calls??!1,supportedEndpoints:s,supportsAdaptiveThinking:c,originalBillingMultiplier:o.billing?.multiplier??0}}async getFirstMatchingEmbeddingModelConfiguration(r){let n=await this.getFirstMatchingModelMetadata({family:r,type:"embeddings"});if(n!==void 0&&r===tLe.textEmbedding3Small)return{modelId:n.id,modelFamily:r,maxBatchSize:n.capabilities.limits?.max_inputs??16,maxTokens:8191,tokenizer:"cl100k_base"}}};async function ato(t,e){let r=t.get(Gt),n=await r.fetchTokenAndUpdateExPValuesAndAssignments(),o=r.ideChatMaxRequestTokens(n);return o===-1&&(o=16384),FRt(o,e)}a(ato,"getExpRequestTokens");function FRt(t,e){return e.capabilities.limits?.max_prompt_tokens?Math.min(t,e.capabilities.limits.max_prompt_tokens):t}a(FRt,"getRequestTokens");function LRt(t,e){return e.capabilities.limits?.max_output_tokens?Math.min(t,e.capabilities.limits.max_output_tokens):t}a(LRt,"getResponseTokens");function cto(t,e){return t.filter(r=>r.capabilities.type!==e.type||r.capabilities.family!==e.family&&!(r.is_chat_fallback===!0&&r.id===e.family)||r.capabilities.family===e.family&&r.id!==e.family&&r.is_chat_fallback===!0?!1:r.capabilities.supports===void 0||e.supports===void 0?!0:Object.keys(e.supports).every(n=>e.supports?.[n]===r.capabilities.supports?.[n]))}a(cto,"filterModelsByCapabilities");function lto(t){let e=t.supportedEndpoints;return!e||e.length===0?!1:e.includes("/responses")}a(lto,"shouldUseResponsesApi");function uto(t){let e=t.supportedEndpoints;return!e||e.length===0?!1:e.includes("/v1/messages")&&!e.includes("/responses")}a(uto,"shouldUseMessagesApi");var Tjr=["completions","responses","v1/messages"];function WFe(t,e){return e?"v1/messages":t&<o(t)?"responses":"completions"}a(WFe,"resolveEndpointRoute");async function zFe(t,e){if(!uto(e))return!1;let r=vr(t,tt.AnthropicMessagesEndpoint);if(r==="true")return!0;if(r==="false")return!1;let n=t.get(Gt),o=await n.fetchTokenAndUpdateExPValuesAndAssignments();return n.anthropicUseMessagesEndpoint(o)}a(zFe,"willUseMessagesEndpoint");f();function YFe(t){let e=t.toLowerCase();return e.startsWith("gpt")&&e.includes("-codex")}a(YFe,"isCodexStyleGptModel");function Sjr(t){return t?t.toLowerCase().startsWith("gpt-5"):!1}a(Sjr,"isGpt5PlusFamily");function Ijr(t){return t?t.toLowerCase().startsWith("claude"):!1}a(Ijr,"isAnthropicModel");f();f();function xjr(t,e){!e||!e.providerName||(e.providerName===Es.Anthropic?(delete t.temperature,delete t.top_p):e.supportsThinking&&(delete t.temperature,"max_tokens"in t&&(t.max_completion_tokens=t.max_tokens,delete t.max_tokens)),e.providerName&&delete t.max_tokens)}a(xjr,"adaptRequestForBYOKProvider");f();var ST=class extends N1{static{a(this,"ChatQuotaService")}constructor(e){super(),this._register(Ps(e,r=>{this.processUserInfoQuotaSnapshot(r.userInfo?.raw)}))}get quotaExhausted(){return this._quotaInfo?this._quotaInfo.used>=this._quotaInfo.quota&&!this._quotaInfo.overageEnabled:!1}get overagesEnabled(){return this._quotaInfo?this._quotaInfo.overageEnabled:!1}clearQuota(){this._quotaInfo=void 0}processQuotaHeaders(e){let r=e.get("x-quota-snapshot-premium_models")||e.get("x-quota-snapshot-premium_interactions");if(r)try{let n=new URLSearchParams(r),o=parseInt(n.get("ent")||"0",10),s=parseFloat(n.get("ov")||"0.0"),c=n.get("ovPerm")==="true",l=parseFloat(n.get("rem")||"0.0"),u=n.get("rst"),d;u?d=new Date(u):(d=new Date,d.setMonth(d.getMonth()+1));let p=Math.max(0,o*(1-l/100));this._quotaInfo={quota:o,used:p,overageUsed:s,overageEnabled:c,resetDate:d}}catch(n){console.error("Failed to parse quota header",n)}}processUserInfoQuotaSnapshot(e){!e||!e.quota_snapshots||!e.quota_reset_date||(this._quotaInfo={overageEnabled:e.quota_snapshots.premium_interactions.overage_permitted,overageUsed:e.quota_snapshots.premium_interactions.overage_count,quota:e.quota_snapshots.premium_interactions.entitlement,resetDate:new Date(e.quota_reset_date),used:Math.max(0,e.quota_snapshots.premium_interactions.entitlement*(1-e.quota_snapshots.premium_interactions.percent_remaining/100))})}};f();f();f();var k6="copilot-edits-session";f();f();f();f();function KFe(t,e,r,n,o,s,c){return ORr(t,e,r,o,n),{completionText:e,meanLogProb:dto(t,r),meanAlternativeLogProb:fto(t,r),choiceIndex:n,requestId:o,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:c,copilotAnnotations:r.copilot_annotations,clientCompletionId:yr(),finishReason:r.finish_reason}}a(KFe,"convertToAPIChoice");function dto(t,e){if(e?.logprobs?.token_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--)r+=e.logprobs.token_logprobs[s],n+=1;return n>0?r/n:void 0}catch(r){Cr.exception(t,r,"Error calculating mean prob")}}a(dto,"calculateMeanLogProb");function fto(t,e){if(e?.logprobs?.top_logprobs)try{let r=0,n=0,o=50;for(let s=0;s0;s++,o--){let c={...e.logprobs.top_logprobs[s]};delete c[e.logprobs.tokens[s]],r+=Math.max(...Object.values(c)),n+=1}return n>0?r/n:void 0}catch(r){Cr.exception(t,r,"Error calculating mean prob")}}a(fto,"calculateMeanAlternativeLogProb");function Mre(t,e){return RC(t)||e<=1?0:e<10?.2:e<20?.4:.8}a(Mre,"getTemperatureForSamples");var pto={markdown:[` `],python:[` @@ -2161,23 +2150,23 @@ def `,` class `,` if `,` -#`]};function RHr(t,e){return fZi[e??""]??[` +#`]};function wjr(t,e){return pto[e??""]??[` -`,"\n```"]}a(RHr,"getStops");function vne(t){return 1}a(vne,"getTopP");function H9e(t){return cye}a(H9e,"getMaxSolutionTokens");f();f();var pZi=1.15,hZi=1.17,mZi=2;function gZi(t){if(!t)return!1;let e=t.toLowerCase();return e.includes("opus")||e.includes("sonnet-4.6")}a(gZi,"isHighMultiplierModel");function AZi(t){return t.text?Array.isArray(t.text)?t.text.join(""):t.text:""}a(AZi,"getThinkingText");function bne(t,e){let r=AZi(t);if(r.length>0){let n=wo(),o=gZi(e)?hZi:pZi;return Math.ceil(n.tokenLength(r)*mZi*o)}return 0}a(bne,"estimateThinkingTokens");function ERt(t){let e=t.delta;if(!e)return;let r=EZi(e),n=yZi(e);if(r||n)return{id:r,text:n}}a(ERt,"extractThinkingDeltaFromChoice");function yZi(t){if(t)return t.cot_summary??t.reasoning_text??t.thinking}a(yZi,"getThinkingDeltaText");function EZi(t){if(t)return t.cot_id??t.reasoning_opaque??t.signature}a(EZi,"getThinkingDeltaId");f();function zl(t){if(t instanceof Error)return t.stack?t.stack:t.message;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}a(zl,"toString");var X1=new Se("streamChoices"),CRt=class{constructor(e){this.enableThinking=e;this.logprobs=[];this.top_logprobs=[];this.text=[];this.tokens=[];this.text_offset=[];this.copilot_annotations=new TRt;this.tool_calls=new vRt;this.function_call=new bRt;this.copilot_references=[];this.yielded=!1}static{a(this,"APIJsonDataStreaming")}append(e){if(e.text&&this.text.push(e.text),e.delta?.content&&e.delta.role!=="function"&&this.text.push(e.delta.content),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[])),e.copilot_annotations&&this.copilot_annotations.update(e.copilot_annotations),e.delta?.copilot_annotations&&this.copilot_annotations.update(e.delta.copilot_annotations),e.delta?.tool_calls&&e.delta.tool_calls.length>0&&this.tool_calls.update(e.delta.tool_calls),e.delta?.function_call&&this.function_call.update(e.delta.function_call),e?.finish_reason&&(this.finish_reason=e.finish_reason),this.enableThinking){let r=ERt(e);if((r?.id||r?.text)&&(this.thinking??={id:"",text:[]},r.id&&(this.thinking.id=r.id),r.text&&Array.isArray(this.thinking.text))){let n=Array.isArray(r.text)?r.text:[r.text];this.thinking.text.push(...n)}}}};function CZi(t){let e=t.split(` -`),r=e.pop();return[e.filter(n=>n!=""),r]}a(CZi,"splitChunk");var _Rt=class{constructor(){this.arguments=[]}static{a(this,"StreamingToolCall")}update(e){e.id&&(this.id=e.id),e.function.name&&(this.name=e.function.name),this.arguments.push(e.function.arguments)}},vRt=class{constructor(){this.toolCalls=[]}static{a(this,"StreamingToolCalls")}update(e){e.forEach(r=>{let n;if(r.id&&(n=this.toolCalls.find(o=>o.id===r.id)),!n&&!r.id&&r.index!==void 0){for(let o=this.toolCalls.length-1;o>=0;o--)if(this.toolCalls[o].index===r.index){n=this.toolCalls[o];break}}n||(n=this.toolCalls.length>0?this.toolCalls[this.toolCalls.length-1]:void 0),(!n||r.id&&n.id!==r.id)&&(n=new _Rt,this.toolCalls.push(n)),r.index!==void 0&&n.index===void 0&&(n.index=r.index),n.update(r)})}getToolCalls(){return this.toolCalls}},bRt=class{constructor(){this.arguments=[]}static{a(this,"StreamingFunctionCall")}update(e){e.name&&(this.name=e.name),this.arguments.push(e.arguments)}},TRt=class{constructor(){this.current={}}static{a(this,"StreamCopilotAnnotations")}update(e){Object.entries(e).forEach(([r,n])=>{n.forEach(o=>this.update_namespace(r,o))})}update_namespace(e,r){this.current[e]||(this.current[e]=[]);let n=this.current[e],o=n.findIndex(s=>s.id===r.id);o>=0?n[o]=r:n.push(r)}for(e){return this.current[e]??[]}},Kj=class t{constructor(e,r,n,o,s,c,l){this.ctx=e;this.expectedNumChoices=r;this.response=n;this.body=o;this.telemetryData=s;this.dropCompletionReasons=c;this.cancellationToken=l;this.requestId=sO(this.response);this.stats=new SRt;this.solutions={}}static{a(this,"SSEProcessor")}static create(e,r,n,o,s,c){let l=n.body();if(l===null)throw new Error("No response body available");return typeof l.setEncoding=="function"?l.setEncoding("utf8"):l=l.pipeThrough(new TextDecoderStream),new t(e,r,n,l,o,s??[],c)}async*processSSE(e=()=>{}){try{yield*this.processSSEInner(e)}finally{this.cancel(),X1.debug(this.ctx,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),X1.debug(this.ctx,"request stats:",this.stats)}}async*processSSEInner(e){let r="",n=null,o,s;e:for await(let c of this.body){if(this.maybeCancel("after awaiting body chunk"))return;let l=c.toString();X1.debug(this.ctx,"chunk",l);let[u,d]=CZi(r+l);r=d;for(let p of u){if(p.startsWith(":"))continue;let h=p.slice(5).trim();if(h=="[DONE]"){yield*this.finishSolutions(n,o,s,e);return}n=null;let m;try{m=JSON.parse(h)}catch{X1.error(this.ctx,"Error parsing JSON stream data",p);continue}if(m.copilot_confirmation&&_Zi(m.copilot_confirmation)&&await e("",{text:"",requestId:this.requestId,copilotConfirmation:m.copilot_confirmation}),m.copilot_references&&await e("",{text:"",requestId:this.requestId,copilotReferences:m.copilot_references}),m.choices===void 0){!m.copilot_references&&!m.copilot_confirmation&&(m.error!==void 0?X1.error(this.ctx,"Error in response:",m.error.message):X1.error(this.ctx,"Unexpected response with no choices or error: "+h)),m.copilot_errors&&await e("",{text:"",requestId:this.requestId,copilotErrors:m.copilot_errors});continue}if(o===void 0&&m.model&&(o=m.model),m.usage&&(s=m.usage),this.allSolutionsDone()){r="";break e}for(let g=0;g0){let n=To(),o=Ato(e)?mto:hto;return Math.ceil(n.tokenLength(r)*gto*o)}return 0}a(Bre,"estimateThinkingTokens");function URt(t){let e=t.delta;if(!e)return;let r=_to(e),n=Eto(e);if(r||n)return{id:r,text:n}}a(URt,"extractThinkingDeltaFromChoice");function Eto(t){if(t)return t.cot_summary??t.reasoning_text??t.thinking}a(Eto,"getThinkingDeltaText");function _to(t){if(t)return t.cot_id??t.reasoning_opaque??t.signature}a(_to,"getThinkingDeltaId");f();function Ql(t){if(t instanceof Error)return t.stack?t.stack:t.message;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}a(Ql,"toString");var U1=new Se("streamChoices"),QRt=class{constructor(e){this.enableThinking=e;this.logprobs=[];this.top_logprobs=[];this.text=[];this.tokens=[];this.text_offset=[];this.copilot_annotations=new jRt;this.tool_calls=new GRt;this.function_call=new HRt;this.copilot_references=[];this.yielded=!1}static{a(this,"APIJsonDataStreaming")}append(e){if(e.text&&this.text.push(e.text),e.delta?.content&&e.delta.role!=="function"&&this.text.push(e.delta.content),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[])),e.copilot_annotations&&this.copilot_annotations.update(e.copilot_annotations),e.delta?.copilot_annotations&&this.copilot_annotations.update(e.delta.copilot_annotations),e.delta?.tool_calls&&e.delta.tool_calls.length>0&&this.tool_calls.update(e.delta.tool_calls),e.delta?.function_call&&this.function_call.update(e.delta.function_call),e?.finish_reason&&(this.finish_reason=e.finish_reason),this.enableThinking){let r=URt(e);if((r?.id||r?.text)&&(this.thinking??={id:"",text:[]},r.id&&(this.thinking.id=r.id),r.text&&Array.isArray(this.thinking.text))){let n=Array.isArray(r.text)?r.text:[r.text];this.thinking.text.push(...n)}}}};function Cto(t){let e=t.split(` +`),r=e.pop();return[e.filter(n=>n!=""),r]}a(Cto,"splitChunk");var qRt=class{constructor(){this.arguments=[]}static{a(this,"StreamingToolCall")}update(e){e.id&&(this.id=e.id),e.function.name&&(this.name=e.function.name),this.arguments.push(e.function.arguments)}},GRt=class{constructor(){this.toolCalls=[]}static{a(this,"StreamingToolCalls")}update(e){e.forEach(r=>{let n;if(r.id&&(n=this.toolCalls.find(o=>o.id===r.id)),!n&&!r.id&&r.index!==void 0){for(let o=this.toolCalls.length-1;o>=0;o--)if(this.toolCalls[o].index===r.index){n=this.toolCalls[o];break}}n||(n=this.toolCalls.length>0?this.toolCalls[this.toolCalls.length-1]:void 0),(!n||r.id&&n.id!==r.id)&&(n=new qRt,this.toolCalls.push(n)),r.index!==void 0&&n.index===void 0&&(n.index=r.index),n.update(r)})}getToolCalls(){return this.toolCalls}},HRt=class{constructor(){this.arguments=[]}static{a(this,"StreamingFunctionCall")}update(e){e.name&&(this.name=e.name),this.arguments.push(e.arguments)}},jRt=class{constructor(){this.current={}}static{a(this,"StreamCopilotAnnotations")}update(e){Object.entries(e).forEach(([r,n])=>{n.forEach(o=>this.update_namespace(r,o))})}update_namespace(e,r){this.current[e]||(this.current[e]=[]);let n=this.current[e],o=n.findIndex(s=>s.id===r.id);o>=0?n[o]=r:n.push(r)}for(e){return this.current[e]??[]}},nj=class t{constructor(e,r,n,o,s,c,l){this.ctx=e;this.expectedNumChoices=r;this.response=n;this.body=o;this.telemetryData=s;this.dropCompletionReasons=c;this.cancellationToken=l;this.requestId=GM(this.response);this.stats=new $Rt;this.solutions={}}static{a(this,"SSEProcessor")}static create(e,r,n,o,s,c){let l=n.body();if(l===null)throw new Error("No response body available");return typeof l.setEncoding=="function"?l.setEncoding("utf8"):l=l.pipeThrough(new TextDecoderStream),new t(e,r,n,l,o,s??[],c)}async*processSSE(e=()=>{}){try{yield*this.processSSEInner(e)}finally{this.cancel(),U1.debug(this.ctx,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),U1.debug(this.ctx,"request stats:",this.stats)}}async*processSSEInner(e){let r="",n=null,o,s;e:for await(let c of this.body){if(this.maybeCancel("after awaiting body chunk"))return;let l=c.toString();U1.debug(this.ctx,"chunk",l);let[u,d]=Cto(r+l);r=d;for(let p of u){if(p.startsWith(":"))continue;let h=p.slice(5).trim();if(h=="[DONE]"){yield*this.finishSolutions(n,o,s,e);return}n=null;let m;try{m=JSON.parse(h)}catch{U1.error(this.ctx,"Error parsing JSON stream data",p);continue}if(m.copilot_confirmation&&vto(m.copilot_confirmation)&&await e("",{text:"",requestId:this.requestId,copilotConfirmation:m.copilot_confirmation}),m.copilot_references&&await e("",{text:"",requestId:this.requestId,copilotReferences:m.copilot_references}),m.choices===void 0){!m.copilot_references&&!m.copilot_confirmation&&(m.error!==void 0?U1.error(this.ctx,"Error in response:",m.error.message):U1.error(this.ctx,"Unexpected response with no choices or error: "+h)),m.copilot_errors&&await e("",{text:"",requestId:this.requestId,copilotErrors:m.copilot_errors});continue}if(o===void 0&&m.model&&(o=m.model),m.usage&&(s=m.usage),this.allSolutionsDone()){r="";break e}for(let g=0;g-1||A.delta?.content?.indexOf(` -`)>-1,b=y?ERt(A):void 0;if(A.finish_reason||v||b){let x=E.text.join("");if(_=this.asSolutionDecision(await e(x,{text:x,index:A.index,requestId:this.requestId,annotations:E.copilot_annotations,copilotReferences:E.copilot_references,getAPIJsonData:a(()=>OEe(E,this.ctx),"getAPIJsonData"),finished:!!A.finish_reason,telemetryData:this.telemetryData,thinking:b?{id:b.id??"",text:b.text}:void 0})),this.maybeCancel("after awaiting finishedCb"))return}if(A.finish_reason&&E.function_call.name!==void 0){n=A.finish_reason;continue}if(A.finish_reason&&(_.yieldSolution=!0,_.continueStreaming=!1),!_.yieldSolution)continue;let I=A.finish_reason??"client-trimmed";if(at(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:I,engineName:o??"",engineChoiceSource:h6(this.ctx,this.telemetryData).engineChoiceSource})),this.dropCompletionReasons.includes(A.finish_reason)?this.solutions[A.index]=null:E.yielded||(this.stats.markYielded(A.index),yield{solution:E,finishOffset:_.finishOffset,reason:A.finish_reason,requestId:this.requestId,index:A.index,model:o,usage:s},E.yielded=!0),this.maybeCancel("after yielding finished choice"))return;_.continueStreaming||(this.solutions[A.index]=null)}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!=null&&(at(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:"Iteration Done",engineName:o??""})),this.stats.markYielded(u),yield{solution:l,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:u,model:o,usage:s},this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{let c=JSON.parse(r);c.error!==void 0&&X1.error(this.ctx,`Error in response: ${c.error.message}`,c.error)}catch{X1.error(this.ctx,`Error parsing extraData: ${r}`)}}asSolutionDecision(e){return e===void 0?{yieldSolution:!1,continueStreaming:!0}:typeof e=="number"?{yieldSolution:!0,continueStreaming:!1,finishOffset:e}:e}async*finishSolutions(e,r,n,o){for(let[s,c]of Object.entries(this.solutions)){let l=Number(s);if(c==null)continue;let u=c.text.join("");if(await o(u,{text:u,index:l,requestId:this.requestId,annotations:c.copilot_annotations,copilotReferences:c.copilot_references,getAPIJsonData:a(()=>OEe(c,this.ctx),"getAPIJsonData"),finished:!0,telemetryData:this.telemetryData}),!c.yielded&&(this.stats.markYielded(l),at(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:e??"DONE",engineName:r??""})),yield{solution:c,finishOffset:void 0,reason:e??"DONE",requestId:this.requestId,index:l,model:r,usage:n},this.maybeCancel("after yielding on DONE")))return}}maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(X1.debug(this.ctx,"Cancelled: "+e),this.cancel(),!0):!1}cancel(){this.body&&"destroy"in this.body&&typeof this.body.destroy=="function"?this.body.destroy():this.body instanceof ReadableStream&&this.body.cancel()}allSolutionsDone(){let e=Object.values(this.solutions);return e.length==this.expectedNumChoices&&e.every(r=>r==null)}};function xRt(t,e,r){let n=e.solution.text.join(""),o=!1;e.finishOffset!==void 0&&(X1.debug(t,`solution ${e.index}: early finish at offset ${e.finishOffset}`),n=n.substring(0,e.finishOffset),o=!0),X1.info(t,`solution ${e.index} returned. finish reason: [${e.reason}]`),X1.debug(t,`solution ${e.index} details: finishOffset: [${e.finishOffset}]`);let s=OEe(e.solution,t);return G9e(t,n,s,e.index,e.requestId,o,r)}a(xRt,"prepareSolutionForReturn");function OEe(t,e){let r=t.text.join(""),n=vZi(t,e),o=bZi(t,e),s=t.copilot_annotations.current,c=t.thinking?.id?t.thinking:void 0,l={text:r,tokens:t.text,tool_calls:n,function_call:o,copilot_annotations:s,finish_reason:t.finish_reason??"stop",thinking:c};if(t.logprobs.length===0)return l;let u=t.logprobs.reduce((m,g)=>m.concat(g),[]),d=t.top_logprobs.reduce((m,g)=>m.concat(g),[]),p=t.text_offset.reduce((m,g)=>m.concat(g),[]),h=t.tokens.reduce((m,g)=>m.concat(g),[]);return{...l,logprobs:{token_logprobs:u,top_logprobs:d,text_offset:p,tokens:h}}}a(OEe,"convertToAPIJsonData");function _Zi(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(_Zi,"isCopilotConfirmation");function PHr(t,e,r,n,o){if(!t)return{};try{return JSON.parse(t)}catch(s){let c=n?` Chunks (${n.length}): ${JSON.stringify(n)}`:"",l=new Error(`Failed to parse JSON for ${e} '${r}': ${zl(s)}. Input: '${t}'.${c}`);throw o&&Kn(o,"toolCall.argumentParseError",yt.createAndMarkAsIssued({callType:e,callName:r,error:l.message})),l}}a(PHr,"parseCallArguments");function vZi(t,e){let r=[],n=t.tool_calls.getToolCalls();for(let o of n)if(o.name){let s=o.arguments.join("").trim(),c=PHr(s,"tool call",o.name,o.arguments,e);r.push({type:"function",function:{name:o.name,arguments:c},approxNumTokens:o.arguments.length+1,id:o.id})}return r}a(vZi,"extractToolCalls");function bZi(t,e){if(t.function_call.name){let r=t.function_call.arguments.join("").trim(),n=PHr(r,"function call",t.function_call.name,t.function_call.arguments,e);return{name:t.function_call.name,arguments:n}}}a(bZi,"extractFunctionCall");var SRt=class{constructor(){this.choices=new Map}static{a(this,"ChunkStats")}getChoiceStats(e){let r=this.choices.get(e);return r||(r=new IRt,this.choices.set(e,r)),r}add(e){this.getChoiceStats(e).increment()}markYielded(e){this.getChoiceStats(e).markYielded()}toString(){return Array.from(this.choices.entries()).map(([e,r])=>`${e}: ${r.yieldedTokens} -> ${r.seenTokens}`).join(", ")}},IRt=class{constructor(){this.yieldedTokens=-1;this.seenTokens=0}static{a(this,"ChoiceStats")}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}};f();function j9e(t,e){return t!==null&&typeof t=="object"&&e in t}a(j9e,"hasKey");function m0(t,e){return j9e(t,e)?t[e]:void 0}a(m0,"getKey");var NHr=de(Nn());var Bd=new Se("fetchCompletions");function sO(t){return{headerRequestId:t.headers.get("x-request-id")||"",serverExperiments:t.headers.get("X-Copilot-Experiment")||"",deploymentId:t.headers.get("azureml-model-deployment")||""}}a(sO,"getRequestId");function aO(t){let e=t.headers.get("openai-processing-ms");return e?parseInt(e,10):0}a(aO,"getProcessingTime");function DHr(t){switch(t){case"ghostText":return"copilot-ghost";case"synthesize":return"copilot-panel"}}a(DHr,"uiKindToIntent");var ok=class{static{a(this,"OpenAIFetcher")}};function TZi(t,e,r,n){return L2(t,e,"proxy","v1/engines",r,n)}a(TZi,"getProxyEngineUrl");function $9e(t,e,r,n){for(let[o,s]of Object.entries(t)){if(r.includes(o))continue;let c=s;if(o==="extra"&&n){let l={...c};for(let u of n)delete l[u];c=l}e.properties[`request.option.${o}`]=JSON.stringify(c)??"undefined"}}a($9e,"sanitizeRequestOptionTelemetry");async function SZi(t,e,r,n,o,s,c,l,u,d,p){let h=t.get(Xs),m=TZi(t,c,r,n),g=u.extendedBy({endpoint:n,engineName:r,uiKind:l},$Z(e));$9e(s,g,["prompt","suffix"],["context"]),g.properties.headerRequestId=o,at(t,"request.sent",g);let A=Ac(),y=DHr(l);return zM(t,m,c.token,y,o,s,d,p).then(E=>{let _=sO(E);g.extendWithRequestId(_);let v=Ac()-A;return g.measurements.totalTimeMs=v,Bd.info(t,`Request ${o} at <${m}> finished with ${E.status} status after ${v}ms`),g.properties.status=String(E.status),Bd.debug(t,"request.response properties",g.properties),Bd.debug(t,"request.response measurements",g.measurements),Bd.debug(t,"prompt:",e),at(t,"request.response",g),E}).catch(E=>{if(ep(E))throw at(t,"request.cancel",g),E;h.setWarning(m0(E,"message")??"");let _=g.extendedBy({error:"Network exception"});at(t,"request.shownWarning",_),g.properties.message=String(m0(E,"name")??""),g.properties.code=String(m0(E,"code")??""),g.properties.errno=String(m0(E,"errno")??""),g.properties.type=String(m0(E,"type")??"");let v=Ac()-A;throw g.measurements.totalTimeMs=v,Bd.info(t,`Request ${o} at <${m}> rejected with ${String(E)} after ${v}ms`),Bd.debug(t,"request.error properties",g.properties),Bd.debug(t,"request.error measurements",g.measurements),at(t,"request.error",g),E}).finally(()=>{ARr(t,e,g)})}a(SZi,"fetchWithInstrumentation");async function IZi(t,e,r,n,o,s,c,l,u,d){let p=u.extendedBy({endpoint:"chat/completions",engineModelId:r,uiKind:l});$9e(s,p,["messages"]),p.properties.headerRequestId=o,at(t,"request.sent",p);let h=Ac(),m=DHr(l),g=O1(t);BI()&&(g=await Are(t,g));try{let A=await zM(t,n,c.token,m,o,s,d,g),y=sO(A);p.extendWithRequestId(y);let E=Ac()-h;return p.measurements.totalTimeMs=E,Bd.info(t,`Request ${o} at <${n}> finished with ${A.status} status after ${E}ms`),Bd.debug(t,"request.response properties",p.properties),Bd.debug(t,"request.response measurements",p.measurements),Bd.debug(t,"messages:",JSON.stringify(e)),at(t,"request.response",p),A}catch(A){if(ep(A))throw at(t,"request.cancel",p),A;let y=p.extendedBy({error:"Network exception"});at(t,"request.shownWarning",y),p.properties.message=String(m0(A,"name")??""),p.properties.code=String(m0(A,"code")??""),p.properties.errno=String(m0(A,"errno")??""),p.properties.type=String(m0(A,"type")??"");let E=Ac()-h;throw p.measurements.totalTimeMs=E,Bd.info(t,`Request ${o} at <${n}> rejected with ${String(A)} after ${E}ms`),Bd.debug(t,"request.error properties",p.properties),Bd.debug(t,"request.error measurements",p.measurements),at(t,"request.error",p),A}finally{Tne(t,e,p)}}a(IZi,"fetchChatWithInstrumentation");function kHr(t){return bHr(t,e=>e.completionText.trim().length>0)}a(kHr,"postProcessChoices");var xZi="github.copilot.completions.quotaExceeded",MEe=class extends ok{static{a(this,"LiveOpenAIFetcher")}#e;async fetchAndStreamCompletions(e,r,n,o,s){if(this.#e)return{type:"canceled",reason:this.#e};let c=e.get(Xs),l="completions",u=await e.get(Ot).getToken(),d=await this.fetchWithParameters(e,l,r,u,n,s);if(d==="not-sent")return{type:"canceled",reason:"before fetch request"};if(s?.isCancellationRequested){let g=d.body();try{g&&"destroy"in g&&typeof g.destroy=="function"?g.destroy():g instanceof ReadableStream&&g.cancel()}catch(A){Bd.exception(e,A,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(d.status!==200){let g=this.createTelemetryData(l,e,r);return this.handleError(e,c,g,d,r.uiKind)}let h=Kj.create(e,r.count,d,n,[],s).processSSE(o),m=nF(h,g=>xRt(e,g,n));return{type:"success",choices:kHr(m),getProcessingTime:a(()=>aO(d),"getProcessingTime")}}async fetchAndStreamChat(e,r,n,o,s,c,l,u={},d){if(this.#e)return{type:"canceled",reason:this.#e};let p="https://copilot-proxy.githubusercontent.com/chat/completions",h={messages:r,model:l.id,stream:!0,...u},m=n.extendedBy({endpoint:p,model:l.name}),g=e.get(Xs),A=await e.get(Ot).getToken(),y=await IZi(e,r,l.id,p,s,h,A,o,m,d);if(d?.isCancellationRequested){let b=y.body();try{b&&"destroy"in b&&typeof b.destroy=="function"?b.destroy():b instanceof ReadableStream&&b.cancel()}catch(I){Bd.exception(e,I,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(y.status!==200){let b=yt.createAndMarkAsIssued({endpoint:p,engineName:l.name,uiKind:o,headerRequestId:s});return this.handleError(e,g,b,y,o)}let _=Kj.create(e,1,y,m,[],NHr.CancellationToken.None).processSSE(),v=nF(_,b=>xRt(e,b,n));return{type:"success",choices:kHr(v),getProcessingTime:a(()=>aO(y),"getProcessingTime")}}createTelemetryData(e,r,n){return yt.createAndMarkAsIssued({endpoint:e,engineName:n.engineModelId,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchWithParameters(e,r,n,o,s,c){let l=e.get(jt).disableLogProb(s),u={prompt:n.prompt.prefix,suffix:n.prompt.suffix,max_tokens:H9e(e),temperature:_ne(e,n.count),top_p:vne(e),n:n.count,stop:RHr(e,n.languageId),stream:!0,extra:n.extra};(n.requestLogProbs||!l)&&(u.logprobs=2);let d=WM(n.repoInfo);return d!==void 0&&(u.nwo=d),n.postOptions&&Object.assign(u,n.postOptions),n.prompt.context&&n.prompt.context.length>0&&(u.extra.context=n.prompt.context),await CT(0),c?.isCancellationRequested?"not-sent":await SZi(e,n.prompt,n.engineModelId,r,n.ourRequestId,u,o,n.uiKind,s,c,n.headers)}async handleError(e,r,n,o,s){let c=await o.text();if(o.status===402){this.#e="monthly free code completions exhausted",r.setError("Completions limit reached",{command:xZi,title:"Learn More"});let u=ss(e,d=>{this.#e=void 0,(d.envelope.limited_user_quotas?.completions??1)>0&&(r.forceNormal(),u.dispose())});return{type:"failed",reason:this.#e}}if(o.status===466)return r.setError(c),Bd.info(e,c),{type:"failed",reason:`client not supported: ${c}`};if(o.clientError&&!o.headers.get("x-github-request-id")){let l=`Last response was a ${o.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;Bd.error(e,l),r.setWarning(l),n.properties.error=`Response status was ${o.status} with no x-github-request-id header`}else o.clientError?(Bd.warn(e,`Response status was ${o.status}:`,c),r.setWarning(`Last response was a ${o.status} error: ${c}`),n.properties.error=`Response status was ${o.status}: ${c}`):(r.setWarning(`Last response was a ${o.status} error`),n.properties.error=`Response status was ${o.status}`);if(n.properties.status=String(o.status),at(e,"request.shownWarning",n),o.status===401||o.status===403)return e.get(Ot).resetToken("code_completion",o.status),{type:"failed",reason:`token expired or invalid: ${o.status}`};if(o.status===429){let l=bNe(o);yi(e,"request.throttled",{requestSource:s??"unknown"},{retryAfter:l??-1});let u=l??10,d=Math.max(u,0)*1e3;return setTimeout(()=>{this.#e=void 0},d),this.#e=`Rate limited by server. Retry in ${u}s.`,Bd.warn(e,this.#e),{type:"failed",reason:this.#e}}return o.status===499?(Bd.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server"}):(Bd.error(e,"Unhandled status from server:",o.status,c),{type:"failed",reason:`unhandled status from server: ${o.status} ${c}`})}};async function BEe(t,e,r,n){let o=yt.createAndMarkAsIssued({messageId:e,conversationId:r});return await t.get(jt).fetchTokenAndUpdateExPValuesAndAssignments(n,o)}a(BEe,"createTelemetryWithExpWithId");function rc(t,{turn:e,conversation:r}={},n){return BEe(t,e?.telemetryId??"",r?.telemetryId??"",n)}a(rc,"createTelemetryWithExpWithTurn");function LEe(t,e,r,n,o,s,c,l){let u=t.turns[t.turns.length-1].skills.map(h=>h.skillId).sort(),d={source:"user",turnIndex:(t.turns.length-1).toString(),uiKind:e,skillIds:u.join(",")},p={promptTokenLen:n,messageCharLen:r};return o&&(d.suggestion=o),s&&(d.suggestionId=s),l.length>0&&(d.skillResolutionsJson=JSON.stringify(wZi(l))),c=c.extendedBy(d,p),c}a(LEe,"extendUserMessageTelemetryData");function wZi(t){return t.map(e=>({skillId:e.skillId,resolution:e.resolution,fileStatus:e.files?.map(r=>r.status),tokensPreEliding:e.tokensPreEliding??0,resolutionTimeMs:e.resolutionTimeMs??0,processingTimeMs:e.processingTimeMs??0}))}a(wZi,"mapSkillResolutionsForTelemetry");function MHr(t,e,r,n,o,s,c){return n!=null&&(c=c.extendedBy({offTopic:n.toString()})),V9e(t,s,e,r,{uiKind:e,headerRequestId:o},{},c).properties.messageId}a(MHr,"createUserMessageTelemetryData");function OHr(t,e,r,n,o,s,c){let l=PZi(r);return V9e(t.ctx,s,e,r,{source:"model",turnIndex:(t.conversation.turns.length-1).toString(),headerRequestId:o,uiKind:e,codeBlockLanguages:JSON.stringify(l),mode:t.turn.getChatModeForTelemetry(),modelId:t.turn.getResolvedModelId()??"unknown"},{messageCharLen:r.length,numCodeBlocks:l.length,numTokens:n},c).properties.messageId}a(OHr,"createModelMessageTelemetryData");function BHr(t,e,r,n,o,s,c){V9e(t,s,r,n,{source:"offTopic",turnIndex:e.turns.length.toString(),userMessageId:o,uiKind:r},{messageCharLen:n.length},c)}a(BHr,"createOffTopicMessageTelemetryData");function LHr(t,e,r,n,o,s,c,l,u){let d=V9e(t,l,r,n,{source:"suggestion",suggestion:s,turnIndex:(e.turns.length-1).toString(),uiKind:r,suggestionId:c},{promptTokenLen:o,messageCharLen:n.length},u);return RZi(t,r,s,d.properties.messageId,d.properties.conversationId,c,u,l),d.properties.messageId}a(LHr,"createSuggestionMessageTelemetryData");var FHr={synonymTimeMs:0,rankingTimeMs:0,chunkCount:0,localSnippetCount:0,embeddingsTimeMs:0,rerankingTimeMs:0};async function wRt(t,e,r){let n=await rc(t.ctx,t),o=t.conversation.source==="inline"?"conversationInline":"conversationPanel";Z1(t.ctx,void 0,{conversationId:t.conversation.telemetryId,turnIndex:(t.conversation.turns.length-1).toString(),userMessageId:t.turn.telemetryId,provider:e,uiKind:o},r,"index.codesearch",n)}a(wRt,"telemetryIndexCodesearch");function V9e(t,e,r,n,o,s,c){let l=c??yt.createAndMarkAsIssued();if(!("messageId"in o)&&!("messageId"in l.properties)){let m=yr();o.messageId=m}e&&(o.languageId=e.detectedLanguageId,s.documentLength=e.getText().length,s.documentLineCount=e.lineCount);let u={messageText:n,...o},d=l.extendedBy(o,s),p=l.extendedBy(u),h=jg(r);return at(t,`${h}.message`,d),at(t,`${h}.messageText`,p,1),d}a(V9e,"telemetryMessage");function UHr(t,e,r,n){Z1(t,n,{uiKind:e},{},"conversation.suggestionShown",r)}a(UHr,"createSuggestionShownTelemetryData");function RZi(t,e,r,n,o,s,c,l){Z1(t,l,{suggestion:r,messageId:n,conversationId:o,suggestionId:s,uiKind:e},{},"conversation.suggestionSelected",c)}a(RZi,"createSuggestionSelectedTelemetryData");function Z1(t,e,r,n,o,s){let c=s??yt.createAndMarkAsIssued();e&&(r.languageId=e.detectedLanguageId,n.documentLength=e.getText().length,n.documentLineCount=e.lineCount);let l=c.extendedBy(r,n);return at(t,o,l),l}a(Z1,"telemetryUserAction");function Tne(t,e,r){let n=r.extendedBy({messagesJson:JSON.stringify(e)});return at(t,"engine.messages",n,1)}a(Tne,"logEngineMessages");function jg(t){switch(t){case"conversationInline":return"inlineConversation";case"conversationPanel":case"agentPanel":default:return"conversation"}}a(jg,"telemetryPrefixForUiKind");function PZi(t){let e=t.split(` -`),r=[],n;for(let o=0;o-1,b=y?URt(A):void 0;if(A.finish_reason||v||b){let x=E.text.join("");if(_=this.asSolutionDecision(await e(x,{text:x,index:A.index,requestId:this.requestId,annotations:E.copilot_annotations,copilotReferences:E.copilot_references,getAPIJsonData:a(()=>Nye(E,this.ctx),"getAPIJsonData"),finished:!!A.finish_reason,telemetryData:this.telemetryData,thinking:b?{id:b.id??"",text:b.text}:void 0})),this.maybeCancel("after awaiting finishedCb"))return}if(A.finish_reason&&E.function_call.name!==void 0){n=A.finish_reason;continue}if(A.finish_reason&&(_.yieldSolution=!0,_.continueStreaming=!1),!_.yieldSolution)continue;let I=A.finish_reason??"client-trimmed";if(st(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:I,engineName:o??"",engineChoiceSource:q8(this.ctx,this.telemetryData).engineChoiceSource})),this.dropCompletionReasons.includes(A.finish_reason)?this.solutions[A.index]=null:E.yielded||(this.stats.markYielded(A.index),yield{solution:E,finishOffset:_.finishOffset,reason:A.finish_reason,requestId:this.requestId,index:A.index,model:o,usage:s},E.yielded=!0),this.maybeCancel("after yielding finished choice"))return;_.continueStreaming||(this.solutions[A.index]=null)}}}for(let[c,l]of Object.entries(this.solutions)){let u=Number(c);if(l!=null&&(st(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:"Iteration Done",engineName:o??""})),this.stats.markYielded(u),yield{solution:l,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:u,model:o,usage:s},this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{let c=JSON.parse(r);c.error!==void 0&&U1.error(this.ctx,`Error in response: ${c.error.message}`,c.error)}catch{U1.error(this.ctx,`Error parsing extraData: ${r}`)}}asSolutionDecision(e){return e===void 0?{yieldSolution:!1,continueStreaming:!0}:typeof e=="number"?{yieldSolution:!0,continueStreaming:!1,finishOffset:e}:e}async*finishSolutions(e,r,n,o){for(let[s,c]of Object.entries(this.solutions)){let l=Number(s);if(c==null)continue;let u=c.text.join("");if(await o(u,{text:u,index:l,requestId:this.requestId,annotations:c.copilot_annotations,copilotReferences:c.copilot_references,getAPIJsonData:a(()=>Nye(c,this.ctx),"getAPIJsonData"),finished:!0,telemetryData:this.telemetryData}),!c.yielded&&(this.stats.markYielded(l),st(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:e??"DONE",engineName:r??""})),yield{solution:c,finishOffset:void 0,reason:e??"DONE",requestId:this.requestId,index:l,model:r,usage:n},this.maybeCancel("after yielding on DONE")))return}}maybeCancel(e){return this.cancellationToken?.isCancellationRequested?(U1.debug(this.ctx,"Cancelled: "+e),this.cancel(),!0):!1}cancel(){this.body&&"destroy"in this.body&&typeof this.body.destroy=="function"?this.body.destroy():this.body instanceof ReadableStream&&this.body.cancel()}allSolutionsDone(){let e=Object.values(this.solutions);return e.length==this.expectedNumChoices&&e.every(r=>r==null)}};function WRt(t,e,r){let n=e.solution.text.join(""),o=!1;e.finishOffset!==void 0&&(U1.debug(t,`solution ${e.index}: early finish at offset ${e.finishOffset}`),n=n.substring(0,e.finishOffset),o=!0),U1.info(t,`solution ${e.index} returned. finish reason: [${e.reason}]`),U1.debug(t,`solution ${e.index} details: finishOffset: [${e.finishOffset}]`);let s=Nye(e.solution,t);return KFe(t,n,s,e.index,e.requestId,o,r)}a(WRt,"prepareSolutionForReturn");function Nye(t,e){let r=t.text.join(""),n=bto(t,e),o=Tto(t,e),s=t.copilot_annotations.current,c=t.thinking?.id?t.thinking:void 0,l={text:r,tokens:t.text,tool_calls:n,function_call:o,copilot_annotations:s,finish_reason:t.finish_reason??"stop",thinking:c};if(t.logprobs.length===0)return l;let u=t.logprobs.reduce((m,g)=>m.concat(g),[]),d=t.top_logprobs.reduce((m,g)=>m.concat(g),[]),p=t.text_offset.reduce((m,g)=>m.concat(g),[]),h=t.tokens.reduce((m,g)=>m.concat(g),[]);return{...l,logprobs:{token_logprobs:u,top_logprobs:d,text_offset:p,tokens:h}}}a(Nye,"convertToAPIJsonData");function vto(t){return typeof t.title=="string"&&typeof t.message=="string"&&!!t.confirmation}a(vto,"isCopilotConfirmation");function Rjr(t,e,r,n,o){if(!t)return{};try{return JSON.parse(t)}catch(s){let c=n?` Chunks (${n.length}): ${JSON.stringify(n)}`:"",l=new Error(`Failed to parse JSON for ${e} '${r}': ${Ql(s)}. Input: '${t}'.${c}`);throw o&&rr(o,"toolCall.argumentParseError",{callType:e,callName:r,error:l.message}),l}}a(Rjr,"parseCallArguments");function bto(t,e){let r=[],n=t.tool_calls.getToolCalls();for(let o of n)if(o.name){let s=o.arguments.join("").trim(),c=Rjr(s,"tool call",o.name,o.arguments,e);r.push({type:"function",function:{name:o.name,arguments:c},approxNumTokens:o.arguments.length+1,id:o.id})}return r}a(bto,"extractToolCalls");function Tto(t,e){if(t.function_call.name){let r=t.function_call.arguments.join("").trim(),n=Rjr(r,"function call",t.function_call.name,t.function_call.arguments,e);return{name:t.function_call.name,arguments:n}}}a(Tto,"extractFunctionCall");var $Rt=class{constructor(){this.choices=new Map}static{a(this,"ChunkStats")}getChoiceStats(e){let r=this.choices.get(e);return r||(r=new VRt,this.choices.set(e,r)),r}add(e){this.getChoiceStats(e).increment()}markYielded(e){this.getChoiceStats(e).markYielded()}toString(){return Array.from(this.choices.entries()).map(([e,r])=>`${e}: ${r.yieldedTokens} -> ${r.seenTokens}`).join(", ")}},VRt=class{constructor(){this.yieldedTokens=-1;this.seenTokens=0}static{a(this,"ChoiceStats")}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}};f();function XFe(t,e){return t!==null&&typeof t=="object"&&e in t}a(XFe,"hasKey");function u0(t,e){return XFe(t,e)?t[e]:void 0}a(u0,"getKey");var kjr=de(Dn());var xd=new Se("fetchCompletions");function GM(t){return{headerRequestId:t.headers.get("x-request-id")||"",serverExperiments:t.headers.get("X-Copilot-Experiment")||"",deploymentId:t.headers.get("azureml-model-deployment")||""}}a(GM,"getRequestId");function HM(t){let e=t.headers.get("openai-processing-ms");return e?parseInt(e,10):0}a(HM,"getProcessingTime");function Djr(t){switch(t){case"ghostText":return"copilot-ghost";case"synthesize":return"copilot-panel"}}a(Djr,"uiKindToIntent");var WP=class{static{a(this,"OpenAIFetcher")}};function Sto(t,e,r,n){return I2(t,e,"proxy","v1/engines",r,n)}a(Sto,"getProxyEngineUrl");function ZFe(t,e,r,n){for(let[o,s]of Object.entries(t)){if(r.includes(o))continue;let c=s;if(o==="extra"&&n){let l={...c};for(let u of n)delete l[u];c=l}e.properties[`request.option.${o}`]=JSON.stringify(c)??"undefined"}}a(ZFe,"sanitizeRequestOptionTelemetry");async function Ito(t,e,r,n,o,s,c,l,u,d,p){let h=t.get(Bs),m=Sto(t,c,r,n),g=u.extendedBy({endpoint:n,engineName:r,uiKind:l},XX(e));ZFe(s,g,["prompt","suffix"],["context"]),g.properties.headerRequestId=o,st(t,"request.sent",g);let A=fc(),y=Djr(l);return PM(t,m,c.token,y,o,s,d,p).then(E=>{let _=GM(E);g.extendWithRequestId(_);let v=fc()-A;return g.measurements.totalTimeMs=v,xd.info(t,`Request ${o} at <${m}> finished with ${E.status} status after ${v}ms`),g.properties.status=String(E.status),xd.debug(t,"request.response properties",g.properties),xd.debug(t,"request.response measurements",g.measurements),xd.debug(t,"prompt:",e),st(t,"request.response",g),E}).catch(E=>{if(Y0(E))throw st(t,"request.cancel",g),E;h.setWarning(u0(E,"message")??"");let _=g.extendedBy({error:"Network exception"});st(t,"request.shownWarning",_),g.properties.message=String(u0(E,"name")??""),g.properties.code=String(u0(E,"code")??""),g.properties.errno=String(u0(E,"errno")??""),g.properties.type=String(u0(E,"type")??"");let v=fc()-A;throw g.measurements.totalTimeMs=v,xd.info(t,`Request ${o} at <${m}> rejected with ${String(E)} after ${v}ms`),xd.debug(t,"request.error properties",g.properties),xd.debug(t,"request.error measurements",g.measurements),st(t,"request.error",g),E}).finally(()=>{BRr(t,e,g)})}a(Ito,"fetchWithInstrumentation");async function xto(t,e,r,n,o,s,c,l,u,d){let p=u.extendedBy({endpoint:"chat/completions",engineModelId:r,uiKind:l});ZFe(s,p,["messages"]),p.properties.headerRequestId=o,st(t,"request.sent",p);let h=fc(),m=Djr(l),g=v1(t);TI()&&(g=await Dte(t,g));try{let A=await PM(t,n,c.token,m,o,s,d,g),y=GM(A);p.extendWithRequestId(y);let E=fc()-h;return p.measurements.totalTimeMs=E,xd.info(t,`Request ${o} at <${n}> finished with ${A.status} status after ${E}ms`),xd.debug(t,"request.response properties",p.properties),xd.debug(t,"request.response measurements",p.measurements),xd.debug(t,"messages:",JSON.stringify(e)),st(t,"request.response",p),A}catch(A){if(Y0(A))throw st(t,"request.cancel",p),A;let y=p.extendedBy({error:"Network exception"});st(t,"request.shownWarning",y),p.properties.message=String(u0(A,"name")??""),p.properties.code=String(u0(A,"code")??""),p.properties.errno=String(u0(A,"errno")??""),p.properties.type=String(u0(A,"type")??"");let E=fc()-h;throw p.measurements.totalTimeMs=E,xd.info(t,`Request ${o} at <${n}> rejected with ${String(A)} after ${E}ms`),xd.debug(t,"request.error properties",p.properties),xd.debug(t,"request.error measurements",p.measurements),st(t,"request.error",p),A}finally{Lre(t,e,p)}}a(xto,"fetchChatWithInstrumentation");function Pjr(t){return vjr(t,e=>e.completionText.trim().length>0)}a(Pjr,"postProcessChoices");var wto="github.copilot.completions.quotaExceeded",Dye=class extends WP{static{a(this,"LiveOpenAIFetcher")}#e;async fetchAndStreamCompletions(e,r,n,o,s){if(this.#e)return{type:"canceled",reason:this.#e};let c=e.get(Bs),l="completions",u=await e.get(Nt).getToken(),d=await this.fetchWithParameters(e,l,r,u,n,s);if(d==="not-sent")return{type:"canceled",reason:"before fetch request"};if(s?.isCancellationRequested){let g=d.body();try{g&&"destroy"in g&&typeof g.destroy=="function"?g.destroy():g instanceof ReadableStream&&g.cancel()}catch(A){xd.exception(e,A,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(d.status!==200){let g=this.createTelemetryData(l,e,r);return this.handleError(e,c,g,d,r.uiKind)}let h=nj.create(e,r.count,d,n,[],s).processSSE(o),m=P6(h,g=>WRt(e,g,n));return{type:"success",choices:Pjr(m),getProcessingTime:a(()=>HM(d),"getProcessingTime")}}async fetchAndStreamChat(e,r,n,o,s,c,l,u={},d){if(this.#e)return{type:"canceled",reason:this.#e};let p="https://copilot-proxy.githubusercontent.com/chat/completions",h={messages:r,model:l.id,stream:!0,...u},m=n.extendedBy({endpoint:p,model:l.name}),g=e.get(Bs),A=await e.get(Nt).getToken(),y=await xto(e,r,l.id,p,s,h,A,o,m,d);if(d?.isCancellationRequested){let b=y.body();try{b&&"destroy"in b&&typeof b.destroy=="function"?b.destroy():b instanceof ReadableStream&&b.cancel()}catch(I){xd.exception(e,I,"Error destroying stream")}return{type:"canceled",reason:"after fetch request"}}if(y.status!==200){let b=Pt.createAndMarkAsIssued({endpoint:p,engineName:l.name,uiKind:o,headerRequestId:s});return this.handleError(e,g,b,y,o)}let _=nj.create(e,1,y,m,[],kjr.CancellationToken.None).processSSE(),v=P6(_,b=>WRt(e,b,n));return{type:"success",choices:Pjr(v),getProcessingTime:a(()=>HM(y),"getProcessingTime")}}createTelemetryData(e,r,n){return Pt.createAndMarkAsIssued({endpoint:e,engineName:n.engineModelId,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchWithParameters(e,r,n,o,s,c){let l=e.get(Gt).disableLogProb(s),u={prompt:n.prompt.prefix,suffix:n.prompt.suffix,max_tokens:JFe(e),temperature:Mre(e,n.count),top_p:Ore(e),n:n.count,stop:wjr(e,n.languageId),stream:!0,extra:n.extra};(n.requestLogProbs||!l)&&(u.logprobs=2);let d=RM(n.repoInfo);return d!==void 0&&(u.nwo=d),n.postOptions&&Object.assign(u,n.postOptions),n.prompt.context&&n.prompt.context.length>0&&(u.extra.context=n.prompt.context),await Wb(0),c?.isCancellationRequested?"not-sent":await Ito(e,n.prompt,n.engineModelId,r,n.ourRequestId,u,o,n.uiKind,s,c,n.headers)}async handleError(e,r,n,o,s){let c=await o.text();if(o.status===402){this.#e="monthly free code completions exhausted",r.setError("Completions limit reached",{command:wto,title:"Learn More"});let u=Ps(e,d=>{this.#e=void 0,(d.envelope.limited_user_quotas?.completions??1)>0&&(r.forceNormal(),u.dispose())});return{type:"failed",reason:this.#e}}if(o.status===466)return r.setError(c),xd.info(e,c),{type:"failed",reason:`client not supported: ${c}`};if(o.clientError&&!o.headers.get("x-github-request-id")){let l=`Last response was a ${o.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;xd.error(e,l),r.setWarning(l),n.properties.error=`Response status was ${o.status} with no x-github-request-id header`}else o.clientError?(xd.warn(e,`Response status was ${o.status}:`,c),r.setWarning(`Last response was a ${o.status} error: ${c}`),n.properties.error=`Response status was ${o.status}: ${c}`):(r.setWarning(`Last response was a ${o.status} error`),n.properties.error=`Response status was ${o.status}`);if(n.properties.status=String(o.status),st(e,"request.shownWarning",n),o.status===401||o.status===403)return e.get(Nt).resetToken("code_completion",o.status),{type:"failed",reason:`token expired or invalid: ${o.status}`};if(o.status===429){let l=_ke(o);rr(e,"request.throttled",{requestSource:s??"unknown"},{retryAfter:l??-1});let u=l??10,d=Math.max(u,0)*1e3;return setTimeout(()=>{this.#e=void 0},d),this.#e=`Rate limited by server. Retry in ${u}s.`,xd.warn(e,this.#e),{type:"failed",reason:this.#e}}return o.status===499?(xd.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server"}):(xd.error(e,"Unhandled status from server:",o.status,c),{type:"failed",reason:`unhandled status from server: ${o.status} ${c}`})}};async function Mye(t,e,r,n){let o=Pt.createAndMarkAsIssued({messageId:e,conversationId:r});return await t.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments(n,o)}a(Mye,"createTelemetryWithExpWithId");function Ja(t,{turn:e,conversation:r}={},n){return Mye(t,e?.telemetryId??"",r?.telemetryId??"",n)}a(Ja,"createTelemetryWithExpWithTurn");function Oye(t,e,r,n,o,s,c,l){let u=t.turns[t.turns.length-1].skills.map(h=>h.skillId).sort(),d={source:"user",turnIndex:(t.turns.length-1).toString(),uiKind:e,skillIds:u.join(",")},p={promptTokenLen:n,messageCharLen:r};return o&&(d.suggestion=o),s&&(d.suggestionId=s),l.length>0&&(d.skillResolutionsJson=JSON.stringify(Rto(l))),c=c.extendedBy(d,p),c}a(Oye,"extendUserMessageTelemetryData");function Rto(t){return t.map(e=>({skillId:e.skillId,resolution:e.resolution,fileStatus:e.files?.map(r=>r.status),tokensPreEliding:e.tokensPreEliding??0,resolutionTimeMs:e.resolutionTimeMs??0,processingTimeMs:e.processingTimeMs??0}))}a(Rto,"mapSkillResolutionsForTelemetry");function Njr(t,e,r,n,o,s,c){return n!=null&&(c=c.extendedBy({offTopic:n.toString()})),e9e(t,s,e,r,{uiKind:e,headerRequestId:o},{},c).properties.messageId}a(Njr,"createUserMessageTelemetryData");function Mjr(t,e,r,n,o,s,c){let l=kto(r);return e9e(t.ctx,s,e,r,{source:"model",turnIndex:(t.conversation.turns.length-1).toString(),headerRequestId:o,uiKind:e,codeBlockLanguages:JSON.stringify(l),mode:t.turn.getChatModeForTelemetry(),modelId:t.turn.getResolvedModelId()??"unknown"},{messageCharLen:r.length,numCodeBlocks:l.length,numTokens:n},c).properties.messageId}a(Mjr,"createModelMessageTelemetryData");function Ojr(t,e,r,n,o,s,c){e9e(t,s,r,n,{source:"offTopic",turnIndex:e.turns.length.toString(),userMessageId:o,uiKind:r},{messageCharLen:n.length},c)}a(Ojr,"createOffTopicMessageTelemetryData");function Bjr(t,e,r,n,o,s,c,l,u){let d=e9e(t,l,r,n,{source:"suggestion",suggestion:s,turnIndex:(e.turns.length-1).toString(),uiKind:r,suggestionId:c},{promptTokenLen:o,messageCharLen:n.length},u);return Pto(t,r,s,d.properties.messageId,d.properties.conversationId,c,u,l),d.properties.messageId}a(Bjr,"createSuggestionMessageTelemetryData");var Ljr={synonymTimeMs:0,rankingTimeMs:0,chunkCount:0,localSnippetCount:0,embeddingsTimeMs:0,rerankingTimeMs:0};async function zRt(t,e,r){let n=await Ja(t.ctx,t),o=t.conversation.source==="inline"?"conversationInline":"conversationPanel";Q1(t.ctx,void 0,{conversationId:t.conversation.telemetryId,turnIndex:(t.conversation.turns.length-1).toString(),userMessageId:t.turn.telemetryId,provider:e,uiKind:o},r,"index.codesearch",n)}a(zRt,"telemetryIndexCodesearch");function e9e(t,e,r,n,o,s,c){let l=c??Pt.createAndMarkAsIssued();if(!("messageId"in o)&&!("messageId"in l.properties)){let m=yr();o.messageId=m}e&&(o.languageId=e.detectedLanguageId,s.documentLength=e.getText().length,s.documentLineCount=e.lineCount);let u={messageText:n,...o},d=l.extendedBy(o,s),p=l.extendedBy(u),h=Bg(r);return st(t,`${h}.message`,d),st(t,`${h}.messageText`,p,1),d}a(e9e,"telemetryMessage");function Fjr(t,e,r,n){Q1(t,n,{uiKind:e},{},"conversation.suggestionShown",r)}a(Fjr,"createSuggestionShownTelemetryData");function Pto(t,e,r,n,o,s,c,l){Q1(t,l,{suggestion:r,messageId:n,conversationId:o,suggestionId:s,uiKind:e},{},"conversation.suggestionSelected",c)}a(Pto,"createSuggestionSelectedTelemetryData");function Q1(t,e,r,n,o,s){let c=s??Pt.createAndMarkAsIssued();e&&(r.languageId=e.detectedLanguageId,n.documentLength=e.getText().length,n.documentLineCount=e.lineCount);let l=c.extendedBy(r,n);return st(t,o,l),l}a(Q1,"telemetryUserAction");function Lre(t,e,r){let n=r.extendedBy({messagesJson:JSON.stringify(e)});return st(t,"engine.messages",n,1)}a(Lre,"logEngineMessages");function Bg(t){switch(t){case"conversationInline":return"inlineConversation";case"conversationPanel":case"agentPanel":default:return"conversation"}}a(Bg,"telemetryPrefixForUiKind");function kto(t){let e=t.split(` +`),r=[],n;for(let o=0;o(s.System="system",s.User="user",s.Assistant="assistant",s.Function="function",s.Tool="tool",s))(Sa||{});function dn(t){return t?(t=ev(t),typeof t=="string"?t:t.map(e=>"text"in e?e.text:"").join("")):""}a(dn,"getTextPart");function jHr(t){return t.some(e=>Array.isArray(e.content)?e.content.some(r=>r.type==="image_url"):!1)}a(jHr,"hasImageContent");function aF(t){return t.some(e=>{let r=a(n=>{if(Array.isArray(n)){if(Sne(n))return n.some(o=>o.type==="image_url");if(Jj(n))return n.some(o=>Array.isArray(o.content)?o.content.some(s=>s.type==="image_url"):!1)}return!1},"checkContent");return e.request?.message&&r(e.request.message)||e.response?.message&&r(e.response.message)})}a(aF,"hasImageContentInTurns");var $Hr=a((t,e)=>S.Unsafe({type:"string",enum:t,description:e?.description}),"StringEnum"),VHr=S.Optional(S.Object({agentSlug:S.String(),state:S.Union([S.Literal("accepted"),S.Literal("dismissed")]),confirmation:S.Any()}));function cO(t){if(typeof t.function.arguments=="string")try{return JSON.parse(t.function.arguments)}catch{return{}}return t.function.arguments}a(cO,"parseToolCallArguments");function WHr(t){return typeof t.function.arguments=="object"&&(t.function.arguments=JSON.stringify(t.function.arguments)),t}a(WHr,"toOpenAIToolCall");function zHr(t,e,r,n,o,s,c,l,u,d,p){let h=JSON.parse(JSON.stringify(e));r.tool_calls&&(h.tool_calls=r.tool_calls),Tne(t,[h],l);let m=r.thinking;return m&&m.tokens===void 0&&(m.tokens=bne(m,p)),{message:e,choiceIndex:n,requestId:o,blockFinished:s,finishReason:c,tokens:r.tokens,numTokens:r.tokens.length,tool_calls:r.tool_calls,function_call:r.function_call,telemetryData:l,copilotEditsSessionHeader:u,thinking:m,usage:d}}a(zHr,"convertToChatCompletion");function Sne(t){return Array.isArray(t)&&t.every(e=>"type"in e&&!("role"in e))}a(Sne,"isChatCompletionContentPartArray");function Jj(t){return Array.isArray(t)&&t.every(e=>"role"in e)}a(Jj,"isChatMessageArray");function ev(t){if(typeof t=="string")return t;if(Sne(t))return t;if(Jj(t)){let e=t.filter(n=>n.role==="assistant"),r=[];for(let n of e)Array.isArray(n.content)?r.push(...n.content):r.push({type:"text",text:n.content});return r}return""}a(ev,"resolveAsChatMessageContent");function Xj(t,e){return(typeof t=="string"||Sne(t))&&(t=[{role:"assistant",content:t}]),t.push(e),t}a(Xj,"appendChatMessageContent");function cF(t,e){if(t){if(typeof t=="string"||Sne(t))return[{role:"assistant",content:t}];if(Jj(t))return e?t:t.filter(r=>r.role!=="tool").map(r=>r.tool_calls?{...r,tool_calls:void 0,tool_call_id:void 0}:r)}else return[];return[]}a(cF,"resolveResponseAsChatMessages");f();var PRt=new Se("streamMessages");function YHr(t,e,r,n,o){let s=e.solution.text.join(""),c=!1;e.finishOffset!==void 0&&(PRt.debug(t,`message ${e.index}: early finish at offset ${e.finishOffset}`),s=s.substring(0,e.finishOffset),c=!0),PRt.info(t,`message ${e.index} returned. finish reason: [${e.reason}]`),PRt.debug(t,`message ${e.index} details: finishOffset: [${e.finishOffset}]`);let l=OEe(e.solution,t),u={role:"assistant",content:s};return zHr(t,u,l,e.index,e.requestId,c,e.reason??"",r,n,e.usage,o)}a(YHr,"prepareChatCompletionForReturn");var W9e=class{constructor(){this.name="completions";this.engineName="chat"}static{a(this,"ChatCompletionsEndpointStrategy")}buildRequestBody(e,r){let o={messages:r.messages.map(c=>{let l={...c};if(delete l.thinking,c.thinking&&c.thinking.id){l.reasoning_opaque=c.thinking.id;let u=Array.isArray(c.thinking.text)?c.thinking.text.join(""):c.thinking.text;u&&(l.reasoning_text=u)}return l}),tools:r.tools,tool_choice:r.tool_choice,model:r.modelConfiguration?.modelId,temperature:_ne(e,r.count),top_p:vne(e),n:r.count,stop:[` +`);return r+n}a(Mto,"truncateContentIfNeeded");var Oto=["requestSource","chatRequestModel","mapper","headerRequestId","mode","modelId","languageId","messageId","conversationId","uiKind"];function Gjr(t,e,r,n,o,s,c){let l=`${Bg(e)}.${c}`,u=s.extendedBy(r,n);st(t,l,u);let d={...r,uiKind:e||""};rr(t,c,$3(d,Oto),n);let p={...r};o.currentFileContent!==void 0&&(p.completionTextJson=Mto(o.currentFileContent));let h=s.extendedBy(p,n);st(t,`${l}.restricted`,h,1)}a(Gjr,"telemetryEditSurvivalTracking");var Ea=(s=>(s.System="system",s.User="user",s.Assistant="assistant",s.Function="function",s.Tool="tool",s))(Ea||{});function dn(t){return t?(t=q1(t),typeof t=="string"?t:t.map(e=>"text"in e?e.text:"").join("")):""}a(dn,"getTextPart");function Hjr(t){return t.some(e=>Array.isArray(e.content)?e.content.some(r=>r.type==="image_url"):!1)}a(Hjr,"hasImageContent");function M6(t){return t.some(e=>{let r=a(n=>{if(Array.isArray(n)){if(Fre(n))return n.some(o=>o.type==="image_url");if(ij(n))return n.some(o=>Array.isArray(o.content)?o.content.some(s=>s.type==="image_url"):!1)}return!1},"checkContent");return e.request?.message&&r(e.request.message)||e.response?.message&&r(e.response.message)})}a(M6,"hasImageContentInTurns");var jjr=a((t,e)=>S.Unsafe({type:"string",enum:t,description:e?.description}),"StringEnum"),$jr=S.Optional(S.Object({agentSlug:S.String(),state:S.Union([S.Literal("accepted"),S.Literal("dismissed")]),confirmation:S.Any()}));function jM(t){if(typeof t.function.arguments=="string")try{return JSON.parse(t.function.arguments)}catch{return{}}return t.function.arguments}a(jM,"parseToolCallArguments");function Vjr(t){return typeof t.function.arguments=="object"&&(t.function.arguments=JSON.stringify(t.function.arguments)),t}a(Vjr,"toOpenAIToolCall");function Wjr(t,e,r,n,o,s,c,l,u,d,p){let h=JSON.parse(JSON.stringify(e));r.tool_calls&&(h.tool_calls=r.tool_calls),Lre(t,[h],l);let m=r.thinking;return m&&m.tokens===void 0&&(m.tokens=Bre(m,p)),{message:e,choiceIndex:n,requestId:o,blockFinished:s,finishReason:c,tokens:r.tokens,numTokens:r.tokens.length,tool_calls:r.tool_calls,function_call:r.function_call,telemetryData:l,copilotEditsSessionHeader:u,thinking:m,usage:d}}a(Wjr,"convertToChatCompletion");function Fre(t){return Array.isArray(t)&&t.every(e=>"type"in e&&!("role"in e))}a(Fre,"isChatCompletionContentPartArray");function ij(t){return Array.isArray(t)&&t.every(e=>"role"in e)}a(ij,"isChatMessageArray");function q1(t){if(typeof t=="string")return t;if(Fre(t))return t;if(ij(t)){let e=t.filter(n=>n.role==="assistant"),r=[];for(let n of e)Array.isArray(n.content)?r.push(...n.content):r.push({type:"text",text:n.content});return r}return""}a(q1,"resolveAsChatMessageContent");function oj(t,e){return(typeof t=="string"||Fre(t))&&(t=[{role:"assistant",content:t}]),t.push(e),t}a(oj,"appendChatMessageContent");function O6(t,e){if(t){if(typeof t=="string"||Fre(t))return[{role:"assistant",content:t}];if(ij(t))return e?t:t.filter(r=>r.role!=="tool").map(r=>r.tool_calls?{...r,tool_calls:void 0,tool_call_id:void 0}:r)}else return[];return[]}a(O6,"resolveResponseAsChatMessages");f();var KRt=new Se("streamMessages");function zjr(t,e,r,n,o){let s=e.solution.text.join(""),c=!1;e.finishOffset!==void 0&&(KRt.debug(t,`message ${e.index}: early finish at offset ${e.finishOffset}`),s=s.substring(0,e.finishOffset),c=!0),KRt.info(t,`message ${e.index} returned. finish reason: [${e.reason}]`),KRt.debug(t,`message ${e.index} details: finishOffset: [${e.finishOffset}]`);let l=Nye(e.solution,t),u={role:"assistant",content:s};return Wjr(t,u,l,e.index,e.requestId,c,e.reason??"",r,n,e.usage,o)}a(zjr,"prepareChatCompletionForReturn");var t9e=class{constructor(){this.name="completions";this.engineName="chat"}static{a(this,"ChatCompletionsEndpointStrategy")}buildRequestBody(e,r){let o={messages:r.messages.map(c=>{let l={...c};if(delete l.thinking,c.thinking&&c.thinking.id){l.reasoning_opaque=c.thinking.id;let u=Array.isArray(c.thinking.text)?c.thinking.text.join(""):c.thinking.text;u&&(l.reasoning_text=u)}return l}),tools:r.tools,tool_choice:r.tool_choice,model:r.modelConfiguration?.modelId,temperature:Mre(e,r.count),top_p:Ore(e),n:r.count,stop:[` -`],copilot_thread_id:r.copilot_thread_id};r.modelConfiguration?.maxResponseTokens!==void 0&&(o.max_tokens=r.modelConfiguration.maxResponseTokens);let s=WM(r.repoInfo);return s!==void 0&&(o.nwo=s),r.postOptions&&Object.assign(o,r.postOptions),r.intentParams?.intent&&(o.intent=r.intentParams.intent,r.intentParams.intent_model&&(o.intent_model=r.intentParams.intent_model),r.intentParams.intent_tokenizer&&(o.intent_tokenizer=r.intentParams.intent_tokenizer),r.intentParams.intent_threshold&&(o.intent_threshold=r.intentParams.intent_threshold),r.intentParams.intent_content&&(o.intent_content=r.intentParams.intent_content)),o}processResponse(e,r,n,o,s){let c=r.headers.get(iF)||void 0;return s.postOptions?.stream===!1?{type:"success",chatCompletions:this.processNonStreamingResponse(r,n,o,c),getProcessingTime:a(()=>aO(r),"getProcessingTime")}:this.processStreamingResponse(e,r,n,o,c,s)}processNonStreamingResponse(e,r,n,o){return(async function*(){let s=await e.text(),c=JSON.parse(s),l=c.choices!=null?c.choices[0].message:{role:"assistant",content:""},u=e.headers.get("X-Request-ID")??yr(),d={blockFinished:!1,choiceIndex:0,finishReason:"stop",message:l,tokens:dn(l.content).split(" "),requestId:{headerRequestId:u,deploymentId:"",serverExperiments:""},telemetryData:n,numTokens:0,copilotEditsSessionHeader:o,usage:c.usage},p=dn(l.content);await r(p,{text:p,copilotReferences:c.copilot_references}),yield Promise.resolve(d)})()}processStreamingResponse(e,r,n,o,s,c){let u=Kj.create(e,c.count,r,o,[],c.cancel).processSSE(n);return{type:"success",chatCompletions:nF(u,p=>YHr(e,p,o,s,c.modelConfiguration?.modelId)),getProcessingTime:a(()=>aO(r),"getProcessingTime")}}};f();f();f();var $g=de(po());var f$r="ephemeral",v2t=4,Beo=2;function p$r(t){let e=v2t-Beo-Leo(t);if(e<=0)return;let r=!0,n=[...t].reverse();for(let[o,s]of n.entries()){let c=o>0?n[o-1]:void 0;if(s.content.some(p=>p.type===$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint))continue;let u=s.role===$g.Raw.ChatRole.Tool&&c?.role!==$g.Raw.ChatRole.Tool,d=s.role===$g.Raw.ChatRole.Assistant&&!s.toolCalls?.length;if((r&&(u||s.role===$g.Raw.ChatRole.User)||d)&&(s.content.push({type:$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:f$r}),e--,e<=0))break;s.role===$g.Raw.ChatRole.User&&(r=!1)}for(let o of t){if(e<=0)break;let s=o.content.some(c=>c.type===$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint);if((o.role===$g.Raw.ChatRole.User||o.role===$g.Raw.ChatRole.System)&&!s&&(e--,o.content.push({type:$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:f$r})),o.role!==$g.Raw.ChatRole.User&&o.role!==$g.Raw.ChatRole.System)break}}a(p$r,"addCacheBreakpoints");function Leo(t){let e=0;for(let r of t)e+=r.content.filter(n=>n.type===$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint).length;return e}a(Leo,"countCacheBreakpoints");function h$r(t){for(let e of t)e.content=e.content.filter(r=>r.type!==$g.Raw.ChatCompletionContentPartKind.CacheBreakpoint)}a(h$r,"removeCacheBreakpoints");var g$r=new Se("messagesApi"),Feo="Please continue.";function A$r(t){let e=qeo(t.tools),r=Ueo(t.messages,t.ctx);Geo(e,r);let n=r.messages.at(-1);n&&n.role==="assistant"&&r.messages.push({role:"user",content:[{type:"text",text:Feo}]});let o={model:t.model,...r,max_tokens:t.maxTokens??4096,stream:t.stream??!0,...e.length>0?{tools:e}:{},...t.topP!==void 0?{top_p:t.topP}:{}};return t.adaptiveThinking?(o.thinking={type:"adaptive"},t.thinkingEffort&&(o.output_config={effort:t.thinkingEffort})):t.thinkingBudget&&t.thinkingBudget>0&&(o.thinking={type:"enabled",budget_tokens:t.thinkingBudget}),o}a(A$r,"buildMessagesApiRequest");function Ueo(t,e){let r=[],n=[];for(let s of t)switch(s.role){case"system":{let c=T7e(s.content);for(let l of c)l.type==="text"&&n.push(l);break}case"user":{let c=T7e(s.content);s.copilot_cache_control&&m$r(c),c.length>0&&r.push({role:"user",content:c});break}case"assistant":{let c=T7e(s.content);if(s.thinking&&Qeo(e,c,s.thinking),s.tool_calls)for(let l of s.tool_calls){if(!l.id)continue;let u={};try{u=typeof l.function.arguments=="string"?JSON.parse(l.function.arguments):l.function.arguments}catch{g$r.warn(e,`Failed to parse tool call arguments for ${l.function.name}, using empty object`)}c.push({type:"tool_use",id:l.id,name:l.function.name,input:u})}s.copilot_cache_control&&m$r(c),c.length>0&&r.push({role:"assistant",content:c});break}case"tool":{if(s.tool_call_id){let l=T7e(s.content).filter(d=>(d.type==="text"||d.type==="image")&&!(d.type==="text"&&d.text.trim()==="")),u={type:"tool_result",tool_use_id:s.tool_call_id,content:l.length>0?l:void 0};s.copilot_cache_control&&(u.cache_control={type:"ephemeral"}),r.push({role:"user",content:[u]})}break}}let o=[];for(let s of r){let c=o.at(-1);c&&c.role===s.role?c.content=[...c.content,...s.content]:o.push(s)}return{messages:o,...n.length>0?{system:n}:{}}}a(Ueo,"convertToAnthropicMessages");function T7e(t){if(!t)return[];if(typeof t=="string")return t.trim()?[{type:"text",text:t}]:[];let e=[];for(let r of t)if(r.type==="text")r.text.trim()&&e.push({type:"text",text:r.text});else if(r.type==="image_url"){let n=r.image_url.url,o=n.match(/^data:(image\/(?:jpeg|png|gif|webp));base64,(.+)$/);o?e.push({type:"image",source:{type:"base64",media_type:o[1],data:o[2]}}):n.startsWith("https://")&&e.push({type:"image",source:{type:"url",url:n}})}return e}a(T7e,"convertContentToAnthropicBlocks");function Qeo(t,e,r){let n=Array.isArray(r.text)?r.text.join(""):r.text;n&&r.encrypted?e.unshift({type:"thinking",thinking:n,signature:r.encrypted}):r.encrypted&&!n?e.unshift({type:"redacted_thinking",data:r.encrypted}):n&&!r.encrypted&&g$r.warn(t,"Dropping thinking block: has text but no signature (possible incomplete stream)")}a(Qeo,"addThinkingBlocks");function m$r(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r.type!=="thinking"&&r.type!=="redacted_thinking"){r.cache_control={type:"ephemeral"};return}}}a(m$r,"applyCacheControlToLastBlock");function qeo(t){return!t||t.length===0?[]:t.filter(e=>e.function.name&&e.function.name.length>0).map(e=>({name:e.function.name,description:e.function.description||"",input_schema:{type:"object",properties:e.function.parameters?.properties??{},required:e.function.parameters?.required}}))}a(qeo,"convertToAnthropicTools");function Geo(t,e){let r=0;if(e.system)for(let c of e.system)c.cache_control&&r++;for(let c of e.messages)for(let l of c.content)"cache_control"in l&&l.cache_control&&r++;let n=v2t-r;if(n<=0)return;let o=t.at(-1);o&&n>0&&(o.cache_control={type:"ephemeral"},n--);let s=e.system?.at(-1);s&&!s.cache_control&&n>0&&(s.cache_control={type:"ephemeral"})}a(Geo,"addToolsAndSystemCacheControl");f();f();var Pne=class{constructor(e,r){this.dataBuffer="";this.eventTypeBuffer="";this.buffer=[];this.endedOnCR=!1;this.onEventHandler=e,this.onUnrecognizedFieldHandler=r,this.decoder=new TextDecoder("utf-8")}static{a(this,"SSEParser")}getLastEventId(){return this.lastEventIdBuffer}getReconnectionTime(){return this.reconnectionTime}feed(e){if(e.length===0)return;let r=0;for(this.endedOnCR&&e[0]===10&&r++,this.endedOnCR=!1;rHM(r),"getProcessingTime")}:this.processStreamingResponse(e,r,n,o,c,s)}processNonStreamingResponse(e,r,n,o){return(async function*(){let s=await e.text(),c=JSON.parse(s),l=c.choices!=null?c.choices[0].message:{role:"assistant",content:""},u=e.headers.get("X-Request-ID")??yr(),d={blockFinished:!1,choiceIndex:0,finishReason:"stop",message:l,tokens:dn(l.content).split(" "),requestId:{headerRequestId:u,deploymentId:"",serverExperiments:""},telemetryData:n,numTokens:0,copilotEditsSessionHeader:o,usage:c.usage},p=dn(l.content);await r(p,{text:p,copilotReferences:c.copilot_references}),yield Promise.resolve(d)})()}processStreamingResponse(e,r,n,o,s,c){let u=nj.create(e,c.count,r,o,[],c.cancel).processSSE(n);return{type:"success",chatCompletions:P6(u,p=>zjr(e,p,o,s,c.modelConfiguration?.modelId)),getProcessingTime:a(()=>HM(r),"getProcessingTime")}}};f();f();f();var Lg=de(co());var dVr="ephemeral",G2t=4,Lro=2;function fVr(t){let e=G2t-Lro-Fro(t);if(e<=0)return;let r=!0,n=[...t].reverse();for(let[o,s]of n.entries()){let c=o>0?n[o-1]:void 0;if(s.content.some(p=>p.type===Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint))continue;let u=s.role===Lg.Raw.ChatRole.Tool&&c?.role!==Lg.Raw.ChatRole.Tool,d=s.role===Lg.Raw.ChatRole.Assistant&&!s.toolCalls?.length;if((r&&(u||s.role===Lg.Raw.ChatRole.User)||d)&&(s.content.push({type:Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:dVr}),e--,e<=0))break;s.role===Lg.Raw.ChatRole.User&&(r=!1)}for(let o of t){if(e<=0)break;let s=o.content.some(c=>c.type===Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint);if((o.role===Lg.Raw.ChatRole.User||o.role===Lg.Raw.ChatRole.System)&&!s&&(e--,o.content.push({type:Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint,cacheType:dVr})),o.role!==Lg.Raw.ChatRole.User&&o.role!==Lg.Raw.ChatRole.System)break}}a(fVr,"addCacheBreakpoints");function Fro(t){let e=0;for(let r of t)e+=r.content.filter(n=>n.type===Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint).length;return e}a(Fro,"countCacheBreakpoints");function pVr(t){for(let e of t)e.content=e.content.filter(r=>r.type!==Lg.Raw.ChatCompletionContentPartKind.CacheBreakpoint)}a(pVr,"removeCacheBreakpoints");var mVr=new Se("messagesApi"),Uro="Please continue.";function gVr(t){let e=Gro(t.tools),r=Qro(t.messages,t.ctx);Hro(e,r);let n=r.messages.at(-1);n&&n.role==="assistant"&&r.messages.push({role:"user",content:[{type:"text",text:Uro}]});let o={model:t.model,...r,max_tokens:t.maxTokens??4096,stream:t.stream??!0,...e.length>0?{tools:e}:{},...t.topP!==void 0?{top_p:t.topP}:{}};return t.adaptiveThinking?(o.thinking={type:"adaptive"},t.thinkingEffort&&(o.output_config={effort:t.thinkingEffort})):t.thinkingBudget&&t.thinkingBudget>0&&(o.thinking={type:"enabled",budget_tokens:t.thinkingBudget}),o}a(gVr,"buildMessagesApiRequest");function Qro(t,e){let r=[],n=[];for(let s of t)switch(s.role){case"system":{let c=D9e(s.content);for(let l of c)l.type==="text"&&n.push(l);break}case"user":{let c=D9e(s.content);s.copilot_cache_control&&hVr(c),c.length>0&&r.push({role:"user",content:c});break}case"assistant":{let c=D9e(s.content);if(s.thinking&&qro(e,c,s.thinking),s.tool_calls)for(let l of s.tool_calls){if(!l.id)continue;let u={};try{u=typeof l.function.arguments=="string"?JSON.parse(l.function.arguments):l.function.arguments}catch{mVr.warn(e,`Failed to parse tool call arguments for ${l.function.name}, using empty object`)}c.push({type:"tool_use",id:l.id,name:l.function.name,input:u})}s.copilot_cache_control&&hVr(c),c.length>0&&r.push({role:"assistant",content:c});break}case"tool":{if(s.tool_call_id){let l=D9e(s.content).filter(d=>(d.type==="text"||d.type==="image")&&!(d.type==="text"&&d.text.trim()==="")),u={type:"tool_result",tool_use_id:s.tool_call_id,content:l.length>0?l:void 0};s.copilot_cache_control&&(u.cache_control={type:"ephemeral"}),r.push({role:"user",content:[u]})}break}}let o=[];for(let s of r){let c=o.at(-1);c&&c.role===s.role?c.content=[...c.content,...s.content]:o.push(s)}return{messages:o,...n.length>0?{system:n}:{}}}a(Qro,"convertToAnthropicMessages");function D9e(t){if(!t)return[];if(typeof t=="string")return t.trim()?[{type:"text",text:t}]:[];let e=[];for(let r of t)if(r.type==="text")r.text.trim()&&e.push({type:"text",text:r.text});else if(r.type==="image_url"){let n=r.image_url.url,o=n.match(/^data:(image\/(?:jpeg|png|gif|webp));base64,(.+)$/);o?e.push({type:"image",source:{type:"base64",media_type:o[1],data:o[2]}}):n.startsWith("https://")&&e.push({type:"image",source:{type:"url",url:n}})}return e}a(D9e,"convertContentToAnthropicBlocks");function qro(t,e,r){let n=Array.isArray(r.text)?r.text.join(""):r.text;n&&r.encrypted?e.unshift({type:"thinking",thinking:n,signature:r.encrypted}):r.encrypted&&!n?e.unshift({type:"redacted_thinking",data:r.encrypted}):n&&!r.encrypted&&mVr.warn(t,"Dropping thinking block: has text but no signature (possible incomplete stream)")}a(qro,"addThinkingBlocks");function hVr(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r.type!=="thinking"&&r.type!=="redacted_thinking"){r.cache_control={type:"ephemeral"};return}}}a(hVr,"applyCacheControlToLastBlock");function Gro(t){return!t||t.length===0?[]:t.filter(e=>e.function.name&&e.function.name.length>0).map(e=>({name:e.function.name,description:e.function.description||"",input_schema:{type:"object",properties:e.function.parameters?.properties??{},required:e.function.parameters?.required}}))}a(Gro,"convertToAnthropicTools");function Hro(t,e){let r=0;if(e.system)for(let c of e.system)c.cache_control&&r++;for(let c of e.messages)for(let l of c.content)"cache_control"in l&&l.cache_control&&r++;let n=G2t-r;if(n<=0)return;let o=t.at(-1);o&&n>0&&(o.cache_control={type:"ephemeral"},n--);let s=e.system?.at(-1);s&&!s.cache_control&&n>0&&(s.cache_control={type:"ephemeral"})}a(Hro,"addToolsAndSystemCacheControl");f();f();var Hre=class{constructor(e,r){this.dataBuffer="";this.eventTypeBuffer="";this.buffer=[];this.endedOnCR=!1;this.onEventHandler=e,this.onUnrecognizedFieldHandler=r,this.decoder=new TextDecoder("utf-8")}static{a(this,"SSEParser")}getLastEventId(){return this.lastEventIdBuffer}getReconnectionTime(){return this.reconnectionTime}feed(e){if(e.length===0)return;let r=0;for(this.endedOnCR&&e[0]===10&&r++,this.endedOnCR=!1;r{try{if(A.data==="[DONE]")return;let y;try{y={type:A.type,...JSON.parse(A.data)}}catch(_){JEe.warn(t,`Skipping malformed SSE event: ${String(_.message).substring(0,100)}`);return}let E=p.push(y,r);E&&h.push(E)}catch(y){m=y}});for await(let A of l){if(s?.isCancellationRequested)break;for(g.feed(new Uint8Array(A));h.length>0;)yield h.shift();if(m)throw m}for(;h.length>0;)yield h.shift()}finally{try{l.destroy()}catch(g){JEe.exception(t,g,`Error destroying stream for Messages API request ${u}`)}}}a(y$r,"processMessagesApiStream");var b2t=class{constructor(e,r,n,o,s,c){this.ctx=e;this.telemetryData=r;this.requestId=n;this.ghRequestId=o;this.copilotEditsSessionHeader=s;this.modelId=c;this.textAccumulator="";this.toolCallAccumulator=new Map;this.thinkingAccumulator=new Map;this.completedToolCalls=[];this.completedThinking=[];this.inputTokens=0;this.outputTokens=0;this.cacheCreationTokens=0;this.cacheReadTokens=0;this.hasError=!1}static{a(this,"AnthropicMessagesProcessor")}push(e,r){if(this.hasError)return;let n=a((o,s)=>{this.textAccumulator+=o,r(this.textAccumulator,{text:this.textAccumulator,...s})},"onProgress");switch(e.type){case"message_start":e.message&&(this.inputTokens=e.message.usage.input_tokens??0,this.outputTokens=e.message.usage.output_tokens??0,this.cacheCreationTokens=e.message.usage.cache_creation_input_tokens??0,this.cacheReadTokens=e.message.usage.cache_read_input_tokens??0);return;case"content_block_start":e.content_block?.type==="tool_use"&&e.index!==void 0?this.toolCallAccumulator.set(e.index,{id:e.content_block.id||"",name:e.content_block.name||"",arguments:""}):e.content_block?.type==="thinking"&&e.index!==void 0?this.thinkingAccumulator.set(e.index,{thinking:"",signature:""}):e.content_block?.type==="redacted_thinking"&&e.index!==void 0&&e.content_block.data&&(n("",{thinking:{id:`redacted_thinking_${e.index}`,encrypted:e.content_block.data}}),this.completedThinking.push({index:e.index,thinking:"",signature:e.content_block.data}));return;case"content_block_delta":if(e.delta){if(e.delta.type==="text_delta"&&e.delta.text)n(e.delta.text,{});else if(e.delta.type==="thinking_delta"&&e.delta.thinking&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.thinking+=e.delta.thinking),n("",{thinking:{id:`thinking_${e.index}`,text:e.delta.thinking}})}else if(e.delta.type==="signature_delta"&&e.delta.signature&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.signature+=e.delta.signature)}else if(e.delta.type==="input_json_delta"&&e.delta.partial_json&&e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(o.arguments+=e.delta.partial_json)}}return;case"content_block_stop":if(e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(this.completedToolCalls.push(o),this.toolCallAccumulator.delete(e.index));let s=this.thinkingAccumulator.get(e.index);s&&(s.signature?n("",{thinking:{id:`thinking_${e.index}`,encrypted:s.signature}}):JEe.warn(this.ctx,`Thinking block ${e.index} finalized without signature (incomplete stream?)`),this.completedThinking.push({index:e.index,...s}),this.thinkingAccumulator.delete(e.index))}return;case"message_delta":e.usage&&(this.outputTokens=e.usage.output_tokens,this.inputTokens=e.usage.input_tokens??this.inputTokens,this.cacheCreationTokens=e.usage.cache_creation_input_tokens??this.cacheCreationTokens,this.cacheReadTokens=e.usage.cache_read_input_tokens??this.cacheReadTokens),e.delta?.stop_reason&&(this.stopReason=e.delta.stop_reason);return;case"message_stop":return this.buildFinalCompletion();case"error":{let o=e.error,s=o?.message||"Unknown error",c=o?.type||"unknown";return JEe.warn(this.ctx,`Messages API error (${c}): ${s}`),n("",{copilotErrors:[{type:"error",code:c,message:s,identifier:""}]}),this.stopReason="error",this.hasError=!0,this.buildFinalCompletion()}}}buildFinalCompletion(){let e;switch(this.stopReason){case"max_tokens":case"model_context_window_exceeded":e="length";break;case"tool_use":e="tool_calls";break;case"refusal":e="content_filter";break;default:e="stop";break}let r=this.inputTokens+this.cacheCreationTokens+this.cacheReadTokens,n={prompt_tokens:r,completion_tokens:this.outputTokens,total_tokens:r+this.outputTokens,prompt_tokens_details:{cached_tokens:this.cacheReadTokens}},o={role:"assistant",content:this.textAccumulator},s=[...this.completedThinking.map(u=>({index:u.index,thinking:u.thinking,signature:u.signature})),...[...this.thinkingAccumulator.entries()].map(([u,d])=>({index:u,...d}))],c;for(let u of s)if(u.thinking||u.signature)if(!c)c={id:`thinking_${u.index}`,text:u.thinking||void 0,encrypted:u.signature||void 0};else{if(u.thinking){let d=Array.isArray(c.text)?c.text.join(""):c.text??"";c.text=d+u.thinking}u.signature&&(c.encrypted&&JEe.warn(this.ctx,"Multiple thinking blocks with signatures; keeping last"),c.id=`thinking_${u.index}`,c.encrypted=u.signature)}c&&c.tokens===void 0&&(c.tokens=bne(c,this.modelId));let l={message:o,choiceIndex:0,requestId:{headerRequestId:this.requestId,deploymentId:"",serverExperiments:"",ghRequestId:this.ghRequestId},tokens:[],numTokens:0,blockFinished:!0,finishReason:e,telemetryData:this.telemetryData,usage:n,copilotEditsSessionHeader:this.copilotEditsSessionHeader,thinking:c};return this.completedToolCalls.length>0&&(l.tool_calls=this.completedToolCalls.map(u=>({id:u.id,type:"function",function:{name:u.name,arguments:u.arguments},approxNumTokens:0}))),l}};var S7e=class{constructor(){this.name="v1/messages";this.engineName=""}static{a(this,"MessagesEndpointStrategy")}buildRequestBody(e,r){let n=r.postOptions,o=n?.thinking_budget,s=n?.adaptive_thinking,c=n?.thinking_effort;return A$r({messages:r.messages,model:r.modelConfiguration?.modelId||"unknown",tools:r.tools,maxTokens:r.modelConfiguration?.maxResponseTokens,topP:r.postOptions?.top_p,stream:!0,thinkingBudget:o,adaptiveThinking:s,thinkingEffort:c,ctx:e})}processResponse(e,r,n,o,s){let c=r.headers.get(iF)||void 0;return{type:"success",chatCompletions:y$r(e,r,n,o,c,s.cancel,s.modelConfiguration?.modelId),getProcessingTime:a(()=>aO(r),"getProcessingTime")}}};f();f();f();f();var _$r=de(po());var Zt=class extends _$r.PromptElement{static{a(this,"CopilotPromptElement")}constructor(e){super(e)}async prepare(e,r,n){if(!this.prepareCopilot)return;let o=r?E$r(r):void 0,s=n?C$r(n):void 0;return await this.prepareCopilot(e,o,s)}render(e,r,n,o){let s=n?E$r(n):void 0,c=o?C$r(o):void 0;return this.renderCopilot(e,r,s,c)}};function E$r(t){return e=>{let r=e.text||"";if(t?.report&&r){let n={value:r};t.report(n)}}}a(E$r,"adaptProgressCallbackFromVSCode");function C$r(t){return{get isCancellationRequested(){return t?.isCancellationRequested??!1},onCancellationRequested:a((e,r)=>{let n=t?.onCancellationRequested(e,r);return{dispose:a(()=>{n?.dispose()},"dispose")}},"onCancellationRequested")}}a(C$r,"adaptCancellationTokenFromVSCode");var v$r="phase_data",I7e=class extends Zt{static{a(this,"PhaseDataContainer")}renderCopilot(){let{phase:e}=this.props;return vscpp("opaque",{value:{type:v$r,phase:e}})}};function x7e(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===v$r&&typeof r.phase=="string")return r.phase}a(x7e,"rawPartAsPhaseData");f();var b$r="thinking",kne=class extends Zt{static{a(this,"ThinkingDataContainer")}renderCopilot(){let{thinking:e}=this.props;return vscpp("opaque",{value:{type:b$r,thinking:e},tokenUsage:e.tokens??0})}};function w7e(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===b$r&&r.thinking&&typeof r.thinking=="object")return r.thinking}a(w7e,"rawPartAsThinkingData");var nv=de(po());function Heo(t){let e=[];for(let r of t)switch(r.role){case"system":{let n=T$r(r);e.push({role:"system",content:n});break}case"user":{let n=T$r(r);e.push({role:"user",content:n});break}case"assistant":{if(r.thinking&&r.thinking.id&&r.thinking.encrypted){let o={type:"reasoning",id:r.thinking.id,summary:[],encrypted_content:r.thinking.encrypted};e.push(o)}let n=$eo(r);if(n.length>0){let o={type:"message",role:"assistant",id:"msg_123",status:"completed",content:n,...r.phase?{phase:r.phase}:{}};e.push(o)}if(r.tool_calls)for(let o of r.tool_calls)o.id&&e.push({type:"function_call",call_id:o.id,name:o.function.name,arguments:typeof o.function.arguments=="string"?o.function.arguments:JSON.stringify(o.function.arguments)});break}case"tool":{if(r.tool_call_id){let n=typeof r.content=="string"?r.content:Array.isArray(r.content)?r.content.map(o=>o.type==="text"?o.text:"").join(""):"";e.push({type:"function_call_output",call_id:r.tool_call_id,output:n})}break}}return e}a(Heo,"convertToResponsesApiInput");function jeo(t){let e=[];for(let r of t)switch(r.role){case nv.Raw.ChatRole.Assistant:if(r.content&&r.content.length>0){let n=Veo(r.content);e.push(...n)}if(r.content&&r.content.length>0){let n=[];for(let o of r.content)o.type===nv.Raw.ChatCompletionContentPartKind.Text&&o.text.trim()&&n.push({type:"output_text",text:o.text,annotations:[]});if(n.length>0){let o=Weo(r.content),s={type:"message",role:"assistant",id:"msg_123",status:"completed",content:n,...o?{phase:o}:{}};e.push(s)}}if(r.toolCalls)for(let n of r.toolCalls)e.push({type:"function_call",name:n.function.name,arguments:n.function.arguments,call_id:n.id});break;case nv.Raw.ChatRole.Tool:if(r.toolCallId&&r.content){let n=r.content.filter(s=>s.type===nv.Raw.ChatCompletionContentPartKind.Text).map(s=>s.text).join("");n&&e.push({type:"function_call_output",call_id:r.toolCallId,output:n});let o=r.content.filter(s=>s.type===nv.Raw.ChatCompletionContentPartKind.Image).map(s=>({type:"input_image",image_url:s.imageUrl.url,detail:s.imageUrl.detail||"auto"}));o.length&&e.push({role:"user",content:[{type:"input_text",text:"Image associated with the above tool call:"},...o]})}break;case nv.Raw.ChatRole.User:if(r.content){let n=[];for(let o of r.content)o.type===nv.Raw.ChatCompletionContentPartKind.Text?n.push({type:"input_text",text:o.text}):o.type===nv.Raw.ChatCompletionContentPartKind.Image&&n.push({type:"input_image",image_url:o.imageUrl.url,detail:o.imageUrl.detail||"auto"});n.length>0&&e.push({role:"user",content:n})}break;case nv.Raw.ChatRole.System:if(r.content){let n=[];for(let o of r.content)o.type===nv.Raw.ChatCompletionContentPartKind.Text&&n.push({type:"input_text",text:o.text});n.length>0&&e.push({role:"system",content:n})}break}return{input:e}}a(jeo,"convertRawMessagesToResponsesApiInput");function T$r(t){return typeof t.content=="string"?[{type:"input_text",text:t.content.trim()}]:Array.isArray(t.content)?t.content.map(e=>e.type==="text"?{type:"input_text",text:e.text.trim()}:e.type==="image_url"?{type:"input_image",image_url:e.image_url.url,detail:e.image_url.detail||"auto"}:{type:"input_text",text:""}):[{type:"input_text",text:""}]}a(T$r,"convertMessageContentToInputParts");function $eo(t){if(typeof t.content=="string")return t.content.trim()?[{type:"output_text",text:t.content,annotations:[]}]:[];if(Array.isArray(t.content)){let e=[];for(let r of t.content)r.type==="text"&&r.text.trim()&&e.push({type:"output_text",text:r.text,annotations:[]});return e}return[]}a($eo,"convertMessageContentToOutputParts");function Veo(t){let e=[];for(let r of t)if(r.type===nv.Raw.ChatCompletionContentPartKind.Opaque){let n=w7e(r);n&&n.id&&n.encrypted&&e.push({type:"reasoning",id:n.id,summary:[],encrypted_content:n.encrypted})}return e}a(Veo,"extractReasoningFromRawMessage");function Weo(t){for(let e of t)if(e.type===nv.Raw.ChatCompletionContentPartKind.Opaque){let r=x7e(e);if(r)return r}}a(Weo,"extractPhaseFromRawMessage");function S$r(t){let{messages:e,promptTsxRawMessages:r,model:n,tools:o,toolChoice:s,maxOutputTokens:c,enableThinking:l}=t,u;r&&r.length>0?u=jeo(r).input:u=Heo(e);let d={model:n,input:u};return o&&o.length>0&&(d.tools=o.map(p=>({...p.function,type:"function",strict:!1,parameters:p.function.parameters||{}}))),s&&(typeof s=="object"&&"function"in s?d.tool_choice={type:"function",name:s.function.name}:d.tool_choice=s),c!==void 0&&(d.max_output_tokens=c),d.stream=!0,d.store=!1,d.truncation="disabled",l&&(d.reasoning={effort:t.reasoningEffort??"medium",summary:"detailed"},d.include=["reasoning.encrypted_content"]),d}a(S$r,"buildResponsesApiRequest");f();var T2t=new Se("responsesApiStream"),zeo=10,R7e=500,c$=class extends Error{static{a(this,"MidStreamError")}constructor(e){super(e),this.name="MidStreamError"}};function I$r(t,e,r){if(!t)return{};try{return JSON.parse(t)}catch(n){throw new Error(`Failed to parse JSON for ${e} '${r}': ${zl(n)}. Input: '${t}'`)}}a(I$r,"parseCallArguments");async function*x$r(t,e,r,n,o,s,c){let l=e.body(),u=e.headers.get("X-Request-ID")||e.headers.get("x-request-id")||"unknown",d=e.headers.get("x-github-request-id")||"",p=new S2t(n,u,o,d,c),h=[],m,g=!1,A=[];try{let y=new Pne(E=>{try{let _={type:E.type,...JSON.parse(E.data)},v=p.push(_,r);v&&h.push(v)}catch(_){m=_}},(E,_)=>{if(A.length>=zeo)return;let v=E.trim(),b=_?.trim(),I=v&&b?`${v}: ${b}`:v||b||"";I.length>0&&A.push(I.length>R7e?I.substring(0,R7e):I)});for await(let E of l){if(s?.isCancellationRequested)break;for(y.feed(new Uint8Array(E));h.length>0;)g=!0,yield h.shift();if(m)throw m}for(;h.length>0;)g=!0,yield h.shift();if(!g&&!s?.isCancellationRequested){let E=p.hasReceivedContentEvents();if(A.length>0){let _=A.join("; ");throw _.length>R7e&&(_=_.substring(0,R7e)+"\u2026"),T2t.error(t,`Non-SSE text received in stream for request ${u}: ${_}`),E?new c$(`The server disconnected unexpectedly while generating a response (${_}). The partial response above may be incomplete.`):new c$(`The server returned an error: ${_}`)}else if(E)throw T2t.error(t,`Stream ended without response.completed for request ${u} after receiving partial content`),new c$("The server disconnected unexpectedly while generating a response. The partial response above may be incomplete.")}}finally{try{l.destroy()}catch(y){T2t.exception(t,y,`Error destroying stream for Responses API request ${u}`)}}}a(x$r,"processResponsesApiStream");var S2t=class{constructor(e,r,n,o,s){this.telemetryData=e;this.requestId=r;this.copilotEditsSessionHeader=n;this.modelId=s;this.textAccumulator="";this.hasReceivedReasoningSummary=!1;this.thinking={id:"",text:[]};this.eventCount=0}static{a(this,"OpenAIResponsesProcessor")}hasReceivedContentEvents(){return this.eventCount>0}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,o)},"onProgress");switch(e.type){case"error":n({text:"",copilotErrors:[{code:e.code||"unknown",message:e.message,type:"error",identifier:e.param||""}]});return;case"response.output_text.delta":this.eventCount++,n({text:e.delta});return;case"response.output_item.added":this.eventCount++,e.item.type==="function_call"&&n({text:"",beginToolCalls:[{name:e.item.name}]});return;case"response.output_item.done":return this.handleOutputItemDone(e.item,n);case"response.reasoning_summary_text.delta":this.eventCount++,this.hasReceivedReasoningSummary=!0,e.delta&&Array.isArray(this.thinking.text)&&this.thinking.text.push(e.delta),n({text:"",thinking:{id:e.item_id,text:e.delta}});return;case"response.reasoning_summary_part.done":this.hasReceivedReasoningSummary=!0,Array.isArray(this.thinking.text)&&this.thinking.text.push(` +`)&&(this.dataBuffer=this.dataBuffer.substring(0,this.dataBuffer.length-1));let e={type:this.eventTypeBuffer||"message",data:this.dataBuffer};this.currentEventId!==void 0&&(e.id=this.currentEventId),this.reconnectionTime!==void 0&&(e.retry=this.reconnectionTime),this.onEventHandler(e),this.reset()}reset(){this.dataBuffer="",this.eventTypeBuffer="",this.currentEventId=void 0}};var Yye=new Se("messagesApiStream");async function*AVr(t,e,r,n,o,s,c){let l=e.body(),u=e.headers.get("X-Request-ID")||e.headers.get("x-request-id")||"unknown",d=e.headers.get("x-github-request-id")||"",p=new H2t(t,n,u,d,o,c),h=[],m;try{let g=new Hre(A=>{try{if(A.data==="[DONE]")return;let y;try{y={type:A.type,...JSON.parse(A.data)}}catch(_){Yye.warn(t,`Skipping malformed SSE event: ${String(_.message).substring(0,100)}`);return}let E=p.push(y,r);E&&h.push(E)}catch(y){m=y}});for await(let A of l){if(s?.isCancellationRequested)break;for(g.feed(new Uint8Array(A));h.length>0;)yield h.shift();if(m)throw m}for(;h.length>0;)yield h.shift()}finally{try{l.destroy()}catch(g){Yye.exception(t,g,`Error destroying stream for Messages API request ${u}`)}}}a(AVr,"processMessagesApiStream");var H2t=class{constructor(e,r,n,o,s,c){this.ctx=e;this.telemetryData=r;this.requestId=n;this.ghRequestId=o;this.copilotEditsSessionHeader=s;this.modelId=c;this.textAccumulator="";this.toolCallAccumulator=new Map;this.thinkingAccumulator=new Map;this.completedToolCalls=[];this.completedThinking=[];this.inputTokens=0;this.outputTokens=0;this.cacheCreationTokens=0;this.cacheReadTokens=0;this.hasError=!1}static{a(this,"AnthropicMessagesProcessor")}push(e,r){if(this.hasError)return;let n=a((o,s)=>{this.textAccumulator+=o,r(this.textAccumulator,{text:this.textAccumulator,...s})},"onProgress");switch(e.type){case"message_start":e.message&&(this.inputTokens=e.message.usage.input_tokens??0,this.outputTokens=e.message.usage.output_tokens??0,this.cacheCreationTokens=e.message.usage.cache_creation_input_tokens??0,this.cacheReadTokens=e.message.usage.cache_read_input_tokens??0);return;case"content_block_start":e.content_block?.type==="tool_use"&&e.index!==void 0?this.toolCallAccumulator.set(e.index,{id:e.content_block.id||"",name:e.content_block.name||"",arguments:""}):e.content_block?.type==="thinking"&&e.index!==void 0?this.thinkingAccumulator.set(e.index,{thinking:"",signature:""}):e.content_block?.type==="redacted_thinking"&&e.index!==void 0&&e.content_block.data&&(n("",{thinking:{id:`redacted_thinking_${e.index}`,encrypted:e.content_block.data}}),this.completedThinking.push({index:e.index,thinking:"",signature:e.content_block.data}));return;case"content_block_delta":if(e.delta){if(e.delta.type==="text_delta"&&e.delta.text)n(e.delta.text,{});else if(e.delta.type==="thinking_delta"&&e.delta.thinking&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.thinking+=e.delta.thinking),n("",{thinking:{id:`thinking_${e.index}`,text:e.delta.thinking}})}else if(e.delta.type==="signature_delta"&&e.delta.signature&&e.index!==void 0){let o=this.thinkingAccumulator.get(e.index);o&&(o.signature+=e.delta.signature)}else if(e.delta.type==="input_json_delta"&&e.delta.partial_json&&e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(o.arguments+=e.delta.partial_json)}}return;case"content_block_stop":if(e.index!==void 0){let o=this.toolCallAccumulator.get(e.index);o&&(this.completedToolCalls.push(o),this.toolCallAccumulator.delete(e.index));let s=this.thinkingAccumulator.get(e.index);s&&(s.signature?n("",{thinking:{id:`thinking_${e.index}`,encrypted:s.signature}}):Yye.warn(this.ctx,`Thinking block ${e.index} finalized without signature (incomplete stream?)`),this.completedThinking.push({index:e.index,...s}),this.thinkingAccumulator.delete(e.index))}return;case"message_delta":e.usage&&(this.outputTokens=e.usage.output_tokens,this.inputTokens=e.usage.input_tokens??this.inputTokens,this.cacheCreationTokens=e.usage.cache_creation_input_tokens??this.cacheCreationTokens,this.cacheReadTokens=e.usage.cache_read_input_tokens??this.cacheReadTokens),e.delta?.stop_reason&&(this.stopReason=e.delta.stop_reason);return;case"message_stop":return this.buildFinalCompletion();case"error":{let o=e.error,s=o?.message||"Unknown error",c=o?.type||"unknown";return Yye.warn(this.ctx,`Messages API error (${c}): ${s}`),n("",{copilotErrors:[{type:"error",code:c,message:s,identifier:""}]}),this.stopReason="error",this.hasError=!0,this.buildFinalCompletion()}}}buildFinalCompletion(){let e;switch(this.stopReason){case"max_tokens":case"model_context_window_exceeded":e="length";break;case"tool_use":e="tool_calls";break;case"refusal":e="content_filter";break;default:e="stop";break}let r=this.inputTokens+this.cacheCreationTokens+this.cacheReadTokens,n={prompt_tokens:r,completion_tokens:this.outputTokens,total_tokens:r+this.outputTokens,prompt_tokens_details:{cached_tokens:this.cacheReadTokens}},o={role:"assistant",content:this.textAccumulator},s=[...this.completedThinking.map(u=>({index:u.index,thinking:u.thinking,signature:u.signature})),...[...this.thinkingAccumulator.entries()].map(([u,d])=>({index:u,...d}))],c;for(let u of s)if(u.thinking||u.signature)if(!c)c={id:`thinking_${u.index}`,text:u.thinking||void 0,encrypted:u.signature||void 0};else{if(u.thinking){let d=Array.isArray(c.text)?c.text.join(""):c.text??"";c.text=d+u.thinking}u.signature&&(c.encrypted&&Yye.warn(this.ctx,"Multiple thinking blocks with signatures; keeping last"),c.id=`thinking_${u.index}`,c.encrypted=u.signature)}c&&c.tokens===void 0&&(c.tokens=Bre(c,this.modelId));let l={message:o,choiceIndex:0,requestId:{headerRequestId:this.requestId,deploymentId:"",serverExperiments:"",ghRequestId:this.ghRequestId},tokens:[],numTokens:0,blockFinished:!0,finishReason:e,telemetryData:this.telemetryData,usage:n,copilotEditsSessionHeader:this.copilotEditsSessionHeader,thinking:c};return this.completedToolCalls.length>0&&(l.tool_calls=this.completedToolCalls.map(u=>({id:u.id,type:"function",function:{name:u.name,arguments:u.arguments},approxNumTokens:0}))),l}};var N9e=class{constructor(){this.name="v1/messages";this.engineName=""}static{a(this,"MessagesEndpointStrategy")}buildRequestBody(e,r){let n=r.postOptions,o=n?.thinking_budget,s=n?.adaptive_thinking,c=n?.thinking_effort;return gVr({messages:r.messages,model:r.modelConfiguration?.modelId||"unknown",tools:r.tools,maxTokens:r.modelConfiguration?.maxResponseTokens,topP:r.postOptions?.top_p,stream:!0,thinkingBudget:o,adaptiveThinking:s,thinkingEffort:c,ctx:e})}processResponse(e,r,n,o,s){let c=r.headers.get(k6)||void 0;return{type:"success",chatCompletions:AVr(e,r,n,o,c,s.cancel,s.modelConfiguration?.modelId),getProcessingTime:a(()=>HM(r),"getProcessingTime")}}};f();f();f();f();var _Vr=de(co());var Xt=class extends _Vr.PromptElement{static{a(this,"CopilotPromptElement")}constructor(e){super(e)}async prepare(e,r,n){if(!this.prepareCopilot)return;let o=r?yVr(r):void 0,s=n?EVr(n):void 0;return await this.prepareCopilot(e,o,s)}render(e,r,n,o){let s=n?yVr(n):void 0,c=o?EVr(o):void 0;return this.renderCopilot(e,r,s,c)}};function yVr(t){return e=>{let r=e.text||"";if(t?.report&&r){let n={value:r};t.report(n)}}}a(yVr,"adaptProgressCallbackFromVSCode");function EVr(t){return{get isCancellationRequested(){return t?.isCancellationRequested??!1},onCancellationRequested:a((e,r)=>{let n=t?.onCancellationRequested(e,r);return{dispose:a(()=>{n?.dispose()},"dispose")}},"onCancellationRequested")}}a(EVr,"adaptCancellationTokenFromVSCode");var CVr="phase_data",M9e=class extends Xt{static{a(this,"PhaseDataContainer")}renderCopilot(){let{phase:e}=this.props;return vscpp("opaque",{value:{type:CVr,phase:e}})}};function O9e(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===CVr&&typeof r.phase=="string")return r.phase}a(O9e,"rawPartAsPhaseData");f();var vVr="thinking",jre=class extends Xt{static{a(this,"ThinkingDataContainer")}renderCopilot(){let{thinking:e}=this.props;return vscpp("opaque",{value:{type:vVr,thinking:e},tokenUsage:e.tokens??0})}};function B9e(t){let e=t.value;if(!e||typeof e!="object")return;let r=e;if(r.type===vVr&&r.thinking&&typeof r.thinking=="object")return r.thinking}a(B9e,"rawPartAsThinkingData");var j1=de(co());function jro(t){let e=[];for(let r of t)switch(r.role){case"system":{let n=bVr(r);e.push({role:"system",content:n});break}case"user":{let n=bVr(r);e.push({role:"user",content:n});break}case"assistant":{if(r.thinking&&r.thinking.id&&r.thinking.encrypted){let o={type:"reasoning",id:r.thinking.id,summary:[],encrypted_content:r.thinking.encrypted};e.push(o)}let n=Vro(r);if(n.length>0){let o={type:"message",role:"assistant",id:"msg_123",status:"completed",content:n,...r.phase?{phase:r.phase}:{}};e.push(o)}if(r.tool_calls)for(let o of r.tool_calls)o.id&&e.push({type:"function_call",call_id:o.id,name:o.function.name,arguments:typeof o.function.arguments=="string"?o.function.arguments:JSON.stringify(o.function.arguments)});break}case"tool":{if(r.tool_call_id){let n=typeof r.content=="string"?r.content:Array.isArray(r.content)?r.content.map(o=>o.type==="text"?o.text:"").join(""):"";e.push({type:"function_call_output",call_id:r.tool_call_id,output:n})}break}}return e}a(jro,"convertToResponsesApiInput");function $ro(t){let e=[];for(let r of t)switch(r.role){case j1.Raw.ChatRole.Assistant:if(r.content&&r.content.length>0){let n=Wro(r.content);e.push(...n)}if(r.content&&r.content.length>0){let n=[];for(let o of r.content)o.type===j1.Raw.ChatCompletionContentPartKind.Text&&o.text.trim()&&n.push({type:"output_text",text:o.text,annotations:[]});if(n.length>0){let o=zro(r.content),s={type:"message",role:"assistant",id:"msg_123",status:"completed",content:n,...o?{phase:o}:{}};e.push(s)}}if(r.toolCalls)for(let n of r.toolCalls)e.push({type:"function_call",name:n.function.name,arguments:n.function.arguments,call_id:n.id});break;case j1.Raw.ChatRole.Tool:if(r.toolCallId&&r.content){let n=r.content.filter(s=>s.type===j1.Raw.ChatCompletionContentPartKind.Text).map(s=>s.text).join("");n&&e.push({type:"function_call_output",call_id:r.toolCallId,output:n});let o=r.content.filter(s=>s.type===j1.Raw.ChatCompletionContentPartKind.Image).map(s=>({type:"input_image",image_url:s.imageUrl.url,detail:s.imageUrl.detail||"auto"}));o.length&&e.push({role:"user",content:[{type:"input_text",text:"Image associated with the above tool call:"},...o]})}break;case j1.Raw.ChatRole.User:if(r.content){let n=[];for(let o of r.content)o.type===j1.Raw.ChatCompletionContentPartKind.Text?n.push({type:"input_text",text:o.text}):o.type===j1.Raw.ChatCompletionContentPartKind.Image&&n.push({type:"input_image",image_url:o.imageUrl.url,detail:o.imageUrl.detail||"auto"});n.length>0&&e.push({role:"user",content:n})}break;case j1.Raw.ChatRole.System:if(r.content){let n=[];for(let o of r.content)o.type===j1.Raw.ChatCompletionContentPartKind.Text&&n.push({type:"input_text",text:o.text});n.length>0&&e.push({role:"system",content:n})}break}return{input:e}}a($ro,"convertRawMessagesToResponsesApiInput");function bVr(t){return typeof t.content=="string"?[{type:"input_text",text:t.content.trim()}]:Array.isArray(t.content)?t.content.map(e=>e.type==="text"?{type:"input_text",text:e.text.trim()}:e.type==="image_url"?{type:"input_image",image_url:e.image_url.url,detail:e.image_url.detail||"auto"}:{type:"input_text",text:""}):[{type:"input_text",text:""}]}a(bVr,"convertMessageContentToInputParts");function Vro(t){if(typeof t.content=="string")return t.content.trim()?[{type:"output_text",text:t.content,annotations:[]}]:[];if(Array.isArray(t.content)){let e=[];for(let r of t.content)r.type==="text"&&r.text.trim()&&e.push({type:"output_text",text:r.text,annotations:[]});return e}return[]}a(Vro,"convertMessageContentToOutputParts");function Wro(t){let e=[];for(let r of t)if(r.type===j1.Raw.ChatCompletionContentPartKind.Opaque){let n=B9e(r);n&&n.id&&n.encrypted&&e.push({type:"reasoning",id:n.id,summary:[],encrypted_content:n.encrypted})}return e}a(Wro,"extractReasoningFromRawMessage");function zro(t){for(let e of t)if(e.type===j1.Raw.ChatCompletionContentPartKind.Opaque){let r=O9e(e);if(r)return r}}a(zro,"extractPhaseFromRawMessage");function TVr(t){let{messages:e,promptTsxRawMessages:r,model:n,tools:o,toolChoice:s,maxOutputTokens:c,enableThinking:l}=t,u;r&&r.length>0?u=$ro(r).input:u=jro(e);let d={model:n,input:u};return o&&o.length>0&&(d.tools=o.map(p=>({...p.function,type:"function",strict:!1,parameters:p.function.parameters||{}}))),s&&(typeof s=="object"&&"function"in s?d.tool_choice={type:"function",name:s.function.name}:d.tool_choice=s),c!==void 0&&(d.max_output_tokens=c),d.stream=!0,d.store=!1,d.truncation="disabled",l&&(d.reasoning={effort:t.reasoningEffort??"medium",summary:"detailed"},d.include=["reasoning.encrypted_content"]),d}a(TVr,"buildResponsesApiRequest");f();var j2t=new Se("responsesApiStream"),Yro=10,L9e=500,mj=class extends Error{static{a(this,"MidStreamError")}constructor(e){super(e),this.name="MidStreamError"}};function SVr(t,e,r){if(!t)return{};try{return JSON.parse(t)}catch(n){throw new Error(`Failed to parse JSON for ${e} '${r}': ${Ql(n)}. Input: '${t}'`)}}a(SVr,"parseCallArguments");async function*IVr(t,e,r,n,o,s,c){let l=e.body(),u=e.headers.get("X-Request-ID")||e.headers.get("x-request-id")||"unknown",d=e.headers.get("x-github-request-id")||"",p=new $2t(n,u,o,d,c),h=[],m,g=!1,A=[];try{let y=new Hre(E=>{try{let _={type:E.type,...JSON.parse(E.data)},v=p.push(_,r);v&&h.push(v)}catch(_){m=_}},(E,_)=>{if(A.length>=Yro)return;let v=E.trim(),b=_?.trim(),I=v&&b?`${v}: ${b}`:v||b||"";I.length>0&&A.push(I.length>L9e?I.substring(0,L9e):I)});for await(let E of l){if(s?.isCancellationRequested)break;for(y.feed(new Uint8Array(E));h.length>0;)g=!0,yield h.shift();if(m)throw m}for(;h.length>0;)g=!0,yield h.shift();if(!g&&!s?.isCancellationRequested){let E=p.hasReceivedContentEvents();if(A.length>0){let _=A.join("; ");throw _.length>L9e&&(_=_.substring(0,L9e)+"\u2026"),j2t.error(t,`Non-SSE text received in stream for request ${u}: ${_}`),E?new mj(`The server disconnected unexpectedly while generating a response (${_}). The partial response above may be incomplete.`):new mj(`The server returned an error: ${_}`)}else if(E)throw j2t.error(t,`Stream ended without response.completed for request ${u} after receiving partial content`),new mj("The server disconnected unexpectedly while generating a response. The partial response above may be incomplete.")}}finally{try{l.destroy()}catch(y){j2t.exception(t,y,`Error destroying stream for Responses API request ${u}`)}}}a(IVr,"processResponsesApiStream");var $2t=class{constructor(e,r,n,o,s){this.telemetryData=e;this.requestId=r;this.copilotEditsSessionHeader=n;this.modelId=s;this.textAccumulator="";this.hasReceivedReasoningSummary=!1;this.thinking={id:"",text:[]};this.eventCount=0}static{a(this,"OpenAIResponsesProcessor")}hasReceivedContentEvents(){return this.eventCount>0}push(e,r){let n=a(o=>{this.textAccumulator+=o.text,r(this.textAccumulator,o)},"onProgress");switch(e.type){case"error":n({text:"",copilotErrors:[{code:e.code||"unknown",message:e.message,type:"error",identifier:e.param||""}]});return;case"response.output_text.delta":this.eventCount++,n({text:e.delta});return;case"response.output_item.added":this.eventCount++,e.item.type==="function_call"&&n({text:"",beginToolCalls:[{name:e.item.name}]});return;case"response.output_item.done":return this.handleOutputItemDone(e.item,n);case"response.reasoning_summary_text.delta":this.eventCount++,this.hasReceivedReasoningSummary=!0,e.delta&&Array.isArray(this.thinking.text)&&this.thinking.text.push(e.delta),n({text:"",thinking:{id:e.item_id,text:e.delta}});return;case"response.reasoning_summary_part.done":this.hasReceivedReasoningSummary=!0,Array.isArray(this.thinking.text)&&this.thinking.text.push(` `),n({text:"",thinking:{id:e.item_id,text:` -`}});return;case"response.completed":return this.handleCompletedResponse(e,n);default:return}}handleOutputItemDone(e,r){if(this.eventCount++,e.type==="function_call"){let n=I$r(e.arguments,"tool call",e.name);r({text:"",toolCalls:[{id:e.call_id,type:"function",function:{name:e.name,arguments:n},approxNumTokens:0}],phase:e.phase})}else if(e.type==="reasoning")e.id&&(this.thinking.id=e.id),e.encrypted_content&&(this.thinking.encrypted=e.encrypted_content),r({text:"",thinking:e.encrypted_content?{id:e.id,text:this.hasReceivedReasoningSummary?void 0:e.summary.map(n=>n.text),encrypted:e.encrypted_content}:void 0});else if(e.type==="message"){let n=e.phase;n&&r({text:"",phase:n})}}handleCompletedResponse(e,r){r({text:"",statefulMarker:e.response.id});let n=[],o=[];for(let d of e.response.output)if(d.type==="message"){if(d.content)for(let p of d.content)p.type==="output_text"&&p.text?n.push(p.text):p.type==="refusal"&&p.refusal&&n.push(p.refusal)}else if(d.type==="function_call"){let p=I$r(d.arguments,"tool call",d.name);o.push({id:d.call_id,type:"function",function:{name:d.name,arguments:p},approxNumTokens:0})}let s={role:"assistant",content:n.join("")},c={prompt_tokens:e.response.usage?.input_tokens??0,completion_tokens:e.response.usage?.output_tokens??0,total_tokens:e.response.usage?.total_tokens??0,prompt_tokens_details:{cached_tokens:e.response.usage?.input_tokens_details?.cached_tokens??0},completion_tokens_details:{reasoning_tokens:e.response.usage?.output_tokens_details?.reasoning_tokens??0,accepted_prediction_tokens:0,rejected_prediction_tokens:0}},l={headerRequestId:this.requestId,serverExperiments:"",deploymentId:""},u=this.thinking.id?this.thinking:void 0;return u&&u.tokens===void 0&&(u.tokens=bne(u,this.modelId)),{message:s,choiceIndex:0,requestId:l,tokens:[],numTokens:c.completion_tokens,blockFinished:!0,finishReason:o.length>0?"tool_calls":"stop",telemetryData:this.telemetryData,tool_calls:o.length>0?o:void 0,thinking:u,copilotEditsSessionHeader:this.copilotEditsSessionHeader,usage:c}}};var P7e=class{constructor(){this.name="responses";this.engineName=""}static{a(this,"ResponsesEndpointStrategy")}buildRequestBody(e,r){return S$r({messages:r.messages,model:r.modelConfiguration?.modelId||"unknown",tools:r.tools,toolChoice:r.tool_choice,topP:r.topP??vne(e),maxOutputTokens:r.modelConfiguration?.maxResponseTokens,stream:!0,store:!1,enableThinking:r.enableThinking})}processResponse(e,r,n,o,s){let c=r.headers.get(iF)||void 0;return{type:"success",chatCompletions:x$r(e,r,n,o,c,s.cancel,s.modelConfiguration?.modelId),getProcessingTime:a(()=>aO(r),"getProcessingTime")}}};Yx.register(new P7e);Yx.register(new W9e);Yx.register(new S7e);f();var k7e=require("fs"),iv=de(require("path"));function M7e(t){return Bre(()=>!!vr(t,tt.PromptPersistBasePath)?.trim(),!1)}a(M7e,"isPromptPersistEnabled");var Yeo={mkdir:a((t,e)=>k7e.promises.mkdir(t,e),"mkdir"),writeFile:a((t,e,r)=>k7e.promises.writeFile(t,e,r),"writeFile"),appendFile:a((t,e,r)=>k7e.promises.appendFile(t,e,r),"appendFile")},ew,N7e,w2t,I2t=new Map,w$r=0,x2t=new Map,R2t=new Map;function Keo(t){return t.toISOString().slice(0,19).replace(/-/g,"").replace(/:/g,"")}a(Keo,"formatHumanTimestamp");function P2t(t,e){return N7e||(N7e=Jeo(t,e)),N7e}a(P2t,"getSharedProcessRoot");async function Jeo(t,e){let r=Keo(new Date);ew=iv.join(t,`pid-${process.pid}_${r}`),await e.mkdir(ew,{recursive:!0});let n=new Date().toISOString();w2t=n;let o={createdAt:n,updatedAt:n,pid:process.pid,processRoot:ew};return await e.writeFile(iv.join(ew,"session.json"),JSON.stringify(o,null,2),"utf8").catch(()=>{}),await Zeo(ew,e).catch(()=>{}),await eto(ew,e).catch(()=>{}),ew}a(Jeo,"initProcessRoot");async function Xeo(t){if(ew)try{let e=iv.join(ew,"session.json"),r=new Date().toISOString(),n={createdAt:w2t??r,updatedAt:r,pid:process.pid,processRoot:ew};await t.writeFile(e,JSON.stringify(n,null,2),"utf8")}catch{}}a(Xeo,"touchProcessRootSessionJson");function k2t(t){return R2t.get(t)}a(k2t,"getTurnDir");function R$r(){ew=void 0,N7e=void 0,w2t=void 0,I2t.clear(),w$r=0,x2t.clear(),R2t.clear()}a(R$r,"resetSharedProcessRoot");async function Zeo(t,e){await e.writeFile(iv.join(t,"README.md"),`# Copilot Language Server \u2014 Request Logs +`}});return;case"response.completed":return this.handleCompletedResponse(e,n);default:return}}handleOutputItemDone(e,r){if(this.eventCount++,e.type==="function_call"){let n=SVr(e.arguments,"tool call",e.name);r({text:"",toolCalls:[{id:e.call_id,type:"function",function:{name:e.name,arguments:n},approxNumTokens:0}],phase:e.phase})}else if(e.type==="reasoning")e.id&&(this.thinking.id=e.id),e.encrypted_content&&(this.thinking.encrypted=e.encrypted_content),r({text:"",thinking:e.encrypted_content?{id:e.id,text:this.hasReceivedReasoningSummary?void 0:e.summary.map(n=>n.text),encrypted:e.encrypted_content}:void 0});else if(e.type==="message"){let n=e.phase;n&&r({text:"",phase:n})}}handleCompletedResponse(e,r){r({text:"",statefulMarker:e.response.id});let n=[],o=[];for(let d of e.response.output)if(d.type==="message"){if(d.content)for(let p of d.content)p.type==="output_text"&&p.text?n.push(p.text):p.type==="refusal"&&p.refusal&&n.push(p.refusal)}else if(d.type==="function_call"){let p=SVr(d.arguments,"tool call",d.name);o.push({id:d.call_id,type:"function",function:{name:d.name,arguments:p},approxNumTokens:0})}let s={role:"assistant",content:n.join("")},c={prompt_tokens:e.response.usage?.input_tokens??0,completion_tokens:e.response.usage?.output_tokens??0,total_tokens:e.response.usage?.total_tokens??0,prompt_tokens_details:{cached_tokens:e.response.usage?.input_tokens_details?.cached_tokens??0},completion_tokens_details:{reasoning_tokens:e.response.usage?.output_tokens_details?.reasoning_tokens??0,accepted_prediction_tokens:0,rejected_prediction_tokens:0}},l={headerRequestId:this.requestId,serverExperiments:"",deploymentId:""},u=this.thinking.id?this.thinking:void 0;return u&&u.tokens===void 0&&(u.tokens=Bre(u,this.modelId)),{message:s,choiceIndex:0,requestId:l,tokens:[],numTokens:c.completion_tokens,blockFinished:!0,finishReason:o.length>0?"tool_calls":"stop",telemetryData:this.telemetryData,tool_calls:o.length>0?o:void 0,thinking:u,copilotEditsSessionHeader:this.copilotEditsSessionHeader,usage:c}}};var F9e=class{constructor(){this.name="responses";this.engineName=""}static{a(this,"ResponsesEndpointStrategy")}buildRequestBody(e,r){return TVr({messages:r.messages,model:r.modelConfiguration?.modelId||"unknown",tools:r.tools,toolChoice:r.tool_choice,topP:r.topP??Ore(e),maxOutputTokens:r.modelConfiguration?.maxResponseTokens,stream:!0,store:!1,enableThinking:r.enableThinking})}processResponse(e,r,n,o,s){let c=r.headers.get(k6)||void 0;return{type:"success",chatCompletions:IVr(e,r,n,o,c,s.cancel,s.modelConfiguration?.modelId),getProcessingTime:a(()=>HM(r),"getProcessingTime")}}};Fx.register(new F9e);Fx.register(new t9e);Fx.register(new N9e);f();var U9e=require("fs"),$1=de(require("path"));function G9e(t){return Iee(()=>!!vr(t,tt.PromptPersistBasePath)?.trim(),!1)}a(G9e,"isPromptPersistEnabled");var Kro={mkdir:a((t,e)=>U9e.promises.mkdir(t,e),"mkdir"),writeFile:a((t,e,r)=>U9e.promises.writeFile(t,e,r),"writeFile"),appendFile:a((t,e,r)=>U9e.promises.appendFile(t,e,r),"appendFile")},Hx,Q9e,z2t,V2t=new Map,xVr=0,W2t=new Map,Y2t=new Map;function Jro(t){return t.toISOString().slice(0,19).replace(/-/g,"").replace(/:/g,"")}a(Jro,"formatHumanTimestamp");function K2t(t,e){return Q9e||(Q9e=Xro(t,e)),Q9e}a(K2t,"getSharedProcessRoot");async function Xro(t,e){let r=Jro(new Date);Hx=$1.join(t,`pid-${process.pid}_${r}`),await e.mkdir(Hx,{recursive:!0});let n=new Date().toISOString();z2t=n;let o={createdAt:n,updatedAt:n,pid:process.pid,processRoot:Hx};return await e.writeFile($1.join(Hx,"session.json"),JSON.stringify(o,null,2),"utf8").catch(()=>{}),await eno(Hx,e).catch(()=>{}),await tno(Hx,e).catch(()=>{}),Hx}a(Xro,"initProcessRoot");async function Zro(t){if(Hx)try{let e=$1.join(Hx,"session.json"),r=new Date().toISOString(),n={createdAt:z2t??r,updatedAt:r,pid:process.pid,processRoot:Hx};await t.writeFile(e,JSON.stringify(n,null,2),"utf8")}catch{}}a(Zro,"touchProcessRootSessionJson");function J2t(t){return Y2t.get(t)}a(J2t,"getTurnDir");function wVr(){Hx=void 0,Q9e=void 0,z2t=void 0,V2t.clear(),xVr=0,W2t.clear(),Y2t.clear()}a(wVr,"resetSharedProcessRoot");async function eno(t,e){await e.writeFile($1.join(t,"README.md"),`# Copilot Language Server \u2014 Request Logs This directory contains persisted HTTP requests, LLM call logs, and tool-call trajectory data captured during a single CLS process. @@ -2226,7 +2215,7 @@ node generateHar.js http-log my-session.har \`\`\` Run from this directory, or pass absolute paths. -`,"utf8")}a(Zeo,"writeReadme");async function eto(t,e){await e.writeFile(iv.join(t,"generateHar.js"),`#!/usr/bin/env node +`,"utf8")}a(eno,"writeReadme");async function tno(t,e){await e.writeFile($1.join(t,"generateHar.js"),`#!/usr/bin/env node "use strict"; /** * Converts per-request JSON files from an http-log directory into a single HAR @@ -2295,49 +2284,49 @@ async function main() { } main().catch(e => { console.error(e); process.exit(1); }); -`,"utf8")}a(eto,"writeGenerateHarScript");var D7e=class{constructor(e,r,n,o,s,c,l,u){this.ctx=e;this.source=n;this.conversationId=o;this.turnId=s;this.parentConversationId=c;this.parentTurnId=l;this.subagentName=u;this.sequenceNumber=0;this.appendQueues=new Map;this.fileOps=r??Yeo}static{a(this,"LLMRequestPersistence")}isEnabled(){return!!this.getBasePath()}async ensureInitialized(){if(this.isEnabled())try{await this.ensureSessionDir()}catch{}}getBasePath(){return vr(this.ctx,tt.PromptPersistBasePath)?.trim()||void 0}ensureSessionDir(){return this.sessionDirPromise||(this.sessionDirPromise=this.initSessionDir()),this.sessionDirPromise}async initSessionDir(){let e=this.getBasePath(),r=await P2t(e,this.fileOps);if(this.conversationId&&this.turnId){let n=this.conversationId.slice(0,8),o=this.turnId.slice(0,8),s=this.subagentName?this.subagentName.replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,50):void 0,c=s?`_subagent-${s}`:"",l=(I2t.get(this.conversationId)??0)+1;I2t.set(this.conversationId,l);let u=String(l).padStart(6,"0"),d=this.parentTurnId?k2t(this.parentTurnId):void 0;if(this.subagentName&&d)this.sessionDir=iv.join(d,"runSubAgent",n,`${u}_${o}${c}`);else{let p=x2t.get(this.conversationId);p||(p=String(++w$r).padStart(6,"0"),x2t.set(this.conversationId,p)),this.sessionDir=iv.join(r,"conversations",`${p}_${n}`,`${u}_${o}${c}`)}await this.fileOps.mkdir(this.sessionDir,{recursive:!0}),R2t.set(this.turnId,this.sessionDir),await this.writeTurnMetadata(),Xeo(this.fileOps)}else this.sessionDir=r;return this.sessionDir}async writeTurnMetadata(){try{let e={createdAt:new Date().toISOString(),pid:process.pid,conversationId:this.conversationId,turnId:this.turnId,source:this.source,...this.parentConversationId?{parentConversationId:this.parentConversationId}:{},...this.parentTurnId?{parentTurnId:this.parentTurnId}:{},...this.subagentName?{subagentName:this.subagentName}:{}},r=iv.join(this.sessionDir,"turn.json");await this.fileOps.writeFile(r,JSON.stringify(e,null,2),"utf8")}catch{}}async persistLLMRequest(e){if(this.isEnabled())try{let r=await this.ensureSessionDir();this.sequenceNumber++;let n=e.conversationId??this.conversationId,o=e.turnId??this.turnId,s={requestId:e.requestId,sequenceNumber:this.sequenceNumber,timestamp:new Date().toISOString(),...n?{conversationId:n}:{},...o?{turnId:o}:{},messages:e.messages,tools:e.tools,model:e.model,response:e.response,durationMs:e.durationMs},c=iv.join(r,"fetchLog.jsonl"),l=JSON.stringify(s)+` -`;await this.serializedAppend(c,l)}catch(r){Ge.debug(this.ctx,"Failed to persist LLM request",r)}}async appendTrajectoryStep(e){if(this.isEnabled())try{let r=await this.ensureSessionDir(),n=iv.join(r,"trajectory.jsonl"),o=JSON.stringify(e)+` -`;await this.serializedAppend(n,o)}catch(r){Ge.debug(this.ctx,"Failed to append trajectory step",r)}}async appendSubagentLink(e){if(this.isEnabled())try{let r=await this.ensureSessionDir(),n=iv.join(r,"trajectory.jsonl"),o=JSON.stringify(e)+` -`;await this.serializedAppend(n,o)}catch(r){Ge.debug(this.ctx,"Failed to append subagent link",r)}}async appendToolInOut(e){if(this.isEnabled())try{let r=await this.ensureSessionDir(),n=iv.join(r,"tool-in-out.jsonl"),o=JSON.stringify(e)+` -`;await this.serializedAppend(n,o)}catch(r){Ge.debug(this.ctx,"Failed to append tool-in-out entry",r)}}serializedAppend(e,r){let o=(this.appendQueues.get(e)??Promise.resolve()).then(()=>this.fileOps.appendFile(e,r,"utf8"));return this.appendQueues.set(e,o.catch(()=>{})),o}};f();var B7e=require("fs"),uk=de(require("path"));var P$r=require("stream");var tto={mkdir:a((t,e)=>B7e.promises.mkdir(t,e),"mkdir"),writeFile:a((t,e,r)=>B7e.promises.writeFile(t,e,r),"writeFile"),appendFile:a((t,e,r)=>B7e.promises.appendFile(t,e,r),"appendFile")},O7e,L7e=class t{constructor(e,r){this.ctx=e;this.fileOps=r??tto,this.basePath=this.getBasePath(),this.isEnabled=!!this.basePath}static{a(this,"DebugRequestLogger")}static{this.sequence=0}static{this.requestSeqMap=new Map}static{this.requestInteractionMap=new Map}static{this.appendChainMap=new Map}static resetForTesting(){O7e=void 0,R$r(),t.sequence=0,t.requestSeqMap.clear(),t.requestInteractionMap.clear(),t.appendChainMap.clear()}getBasePath(){return vr(this.ctx,tt.PromptPersistBasePath)?.trim()||void 0}ensureDir(){return O7e||(O7e=this.initHttpLogDir()),O7e}toPersistenceFileOps(){return{mkdir:a((e,r)=>this.fileOps.mkdir(e,r),"mkdir"),writeFile:a((e,r,n)=>this.fileOps.writeFile(e,r,n),"writeFile"),appendFile:a((e,r,n)=>this.fileOps.appendFile(e,r,n),"appendFile")}}async initHttpLogDir(){let e=await P2t(this.basePath,this.toPersistenceFileOps()),r=uk.join(e,"http-log");return await this.fileOps.mkdir(r,{recursive:!0}),r}seqForRequest(e){let r=t.requestSeqMap.get(e);if(r!==void 0)return r;let n=++t.sequence;return t.requestSeqMap.set(e,n),n}logRequest(e){this.isEnabled&&this.writeRequestFile(e).catch(r=>{Ge.debug(this.ctx,"Failed to persist enhanced request log",r)})}logResponse(e){this.isEnabled&&this.writeResponseFile(e).catch(r=>{Ge.debug(this.ctx,"Failed to persist enhanced response log",r)})}static{this.SENSITIVE_HEADERS=new Set(["authorization","cookie","set-cookie","request-hmac","proxy-authorization"].map(e=>e.toLowerCase()))}static redactHeaders(e){let r={};for(let[n,o]of Object.entries(e))r[n]=t.SENSITIVE_HEADERS.has(n.toLowerCase())?"[REDACTED]":o;return r}async resolveTurnHttpLogDir(e){if(!e)return;let r=k2t(e);if(!r)return;let n=uk.join(r,"http-log");return await this.fileOps.mkdir(n,{recursive:!0}),n}static extractInteractionId(e){return Object.entries(e).find(([r])=>r.toLowerCase()==="x-interaction-id")?.[1]}async writeMessagesDump(e,r,n,o){if(!o||o.length===0)return;let s=`${r}_request_messages_dump_${n}.json`;await this.fileOps.writeFile(uk.join(e,s),JSON.stringify(o,null,2),"utf8")}appendResponseChunk(e,r){if(!this.isEnabled)return;let o=(t.appendChainMap.get(e)??Promise.resolve()).then(()=>this.doAppendChunk(e,r)).catch(s=>{Ge.debug(this.ctx,"Failed to append SSE chunk",s)});t.appendChainMap.set(e,o)}async doAppendChunk(e,r){let n=await this.ensureDir(),o=this.seqForRequest(e),s=String(o).padStart(6,"0"),c=e.replace(/[^a-zA-Z0-9_-]/g,"_"),l=`${s}_response_sse_chunks_${c}.txt`;await this.fileOps.appendFile(uk.join(n,l),r,"utf8");let u=t.requestInteractionMap.get(e),d=await this.resolveTurnHttpLogDir(u);d&&await this.fileOps.appendFile(uk.join(d,l),r,"utf8")}async writeRequestFile(e){let r=await this.ensureDir(),n=this.seqForRequest(e.requestId),o=String(n).padStart(6,"0"),s=e.requestId.replace(/[^a-zA-Z0-9_-]/g,"_"),c=`${o}_request_${s}.json`,{messages:l,...u}=e,d={...u,headers:t.redactHeaders(e.headers)},p=JSON.stringify(d,null,2);await this.fileOps.writeFile(uk.join(r,c),p,"utf8"),await this.writeMessagesDump(r,o,s,l);let h=t.extractInteractionId(e.headers);h&&t.requestInteractionMap.set(e.requestId,h);let m=await this.resolveTurnHttpLogDir(h);m&&(await this.fileOps.writeFile(uk.join(m,c),p,"utf8"),await this.writeMessagesDump(m,o,s,l))}async writeResponseFile(e){let r=t.appendChainMap.get(e.requestId);r&&(await r,t.appendChainMap.delete(e.requestId));let n=await this.ensureDir(),o=this.seqForRequest(e.requestId),s=e.requestId.replace(/[^a-zA-Z0-9_-]/g,"_"),c=`${String(o).padStart(6,"0")}_response_headers_${s}.json`,{body:l,...u}=e,d={...u,headers:t.redactHeaders(e.headers)},p=JSON.stringify(d,null,2);await this.fileOps.writeFile(uk.join(n,c),p,"utf8");let h=t.requestInteractionMap.get(e.requestId),m=await this.resolveTurnHttpLogDir(h);m&&await this.fileOps.writeFile(uk.join(m,c),p,"utf8"),t.requestSeqMap.delete(e.requestId),t.requestInteractionMap.delete(e.requestId)}},F7e=class extends B2{static{a(this,"DebugLoggingResponseWrapper")}constructor(e,r,n,o){super(e.status,e.statusText,e.headers,()=>e.text(),()=>e.body()),this.logger=r,this.requestId=n,this.startTime=o}async text(){let e=await super.text();return this.logger.logResponse({timestamp:new Date().toISOString(),requestId:this.requestId,status:this.status,statusText:this.statusText,headers:this.headersToObject(),duration:Math.round(performance.now()-this.startTime)}),e}body(){let e=super.body();return e?this.createLoggingStream(e):null}createLoggingStream(e){let r=new P$r.PassThrough;return e.on("data",n=>{this.logger.appendResponseChunk(this.requestId,n.toString()),r.write(n)}),e.on("end",()=>{this.logger.logResponse({timestamp:new Date().toISOString(),requestId:this.requestId,status:this.status,statusText:this.statusText,headers:this.headersToObject(),duration:Math.round(performance.now()-this.startTime)}),r.end()}),e.on("error",n=>{r.emit("error",n)}),r}headersToObject(){let e={};for(let[r,n]of this.headers)e[r]=n;return e}};f();f();var l$=class t extends V1{constructor(r){super();this._autoModelCache=new Map;this._ongoingFetches=new Map;this._ctx=r,this._logger=new Se("AutoModelService"),this._register(ss(this._ctx,()=>{this._autoModelCache.clear(),this._reserveToken=void 0,this._ongoingFetches.clear(),this._logger.info(this._ctx,"Auto model cache cleared due to token update")}))}static{a(this,"AutoModelService")}static{this.EXPIRY_THRESHOLD_MS=300*1e3}async resolveModelConfiguration(r,n){let o=this._autoModelCache.get(r);o||(o={},this._autoModelCache.set(r,o)),this._pruneExpiredTokens(o),!o.active&&o.standby&&(o.active=o.standby,o.standby=void 0),o.active||(o.active=await this._acquireActiveToken(r)),(!o.standby||!this._isTokenValid(o.standby)||this._isExpiringSoon(o.standby)||this._isExpiringSoon(o.active))&&this._refreshStandbyInBackground(r),this._ensureReserveRefill();let s=await this._ctx.get(cl).getMetadata(),c;if(o.active.model.toLowerCase().includes("grok")&&n)c=[Cn.Gpt41];else{let d=s.find(p=>p.id===o?.active?.model);d?.capabilities?.family?c=[d.capabilities.family]:c=[o.active.model]}let l=await this._ctx.get(Da).getBestChatModelConfig(c);l.copilotSessionToken=o.active.sessionToken,l.autoModeDiscountedCost=o.active.discountedCost;let u=s.find(d=>d.capabilities.family===o.active.model);return l.originalBillingMultiplier=u?.billing?.multiplier??0,l}_ensureReserveRefill(){if(this._isTokenValid(this._reserveToken))return;let r="reserve";if(this._ongoingFetches.has(r))return;let n=this._fetchToken("reserve");this._ongoingFetches.set(r,n),n.then(o=>{this._reserveToken=o}).catch(o=>{this._logger.error(this._ctx,`Failed to refresh reserve auto mode token: ${o instanceof Error?o.message:String(o)}`)}).finally(()=>{this._ongoingFetches.delete(r)})}async _acquireActiveToken(r){if(this._isTokenValid(this._reserveToken)){let c=this._reserveToken;return this._reserveToken=void 0,c}let n=`active:${r}`,o=this._ongoingFetches.get(n);if(o)return o;let s=this._fetchToken("active").finally(()=>{this._ongoingFetches.delete(n)});return this._ongoingFetches.set(n,s),s}_refreshStandbyInBackground(r){let n=`standby:${r}`;if(this._ongoingFetches.has(n))return;let o=this._fetchToken("standby");this._ongoingFetches.set(n,o),o.then(s=>{let c=this._autoModelCache.get(r);c&&(c.active&&c.active.sessionToken===s.sessionToken||(c.standby=s,this._ongoingFetches.delete(n)))}).catch(s=>{this._logger.error(this._ctx,`Failed to refresh standby auto mode token for ${r}: ${s instanceof Error?s.message:String(s)}`),this._ongoingFetches.delete(n)})}async _fetchToken(r){let n=Date.now();try{let o=await HLe(this._ctx,"/models/session",JSON.stringify({auto_mode:{model_hints:["auto"]}}));if(!o.ok)throw new Error(`Auto mode API returned status ${o.status}`);let s=await o.json(),c=s.selected_model,l=s.session_token,u=s.expires_at*1e3,d=s.discounted_costs?.[c];return this._logger.info(this._ctx,`Fetched auto model for ${r} in ${Date.now()-n}ms: ${c}`),{model:c,sessionToken:l,expiration:u,discountedCost:d}}catch(o){throw this._logger.error(this._ctx,`Failed to fetch auto mode model for ${r}: ${o instanceof Error?o.message:String(o)}`),o}}_pruneExpiredTokens(r){r.active&&!this._isTokenValid(r.active)&&(r.active=void 0),r.standby&&!this._isTokenValid(r.standby)&&(r.standby=void 0)}_isTokenValid(r){return!!r&&r.expiration>Date.now()}_isExpiringSoon(r){return r?r.expiration-Date.now()<=t.EXPIRY_THRESHOLD_MS:!1}};var U7e="Auto",pO="auto",k$r="custom",$o=class{static{a(this,"ModelPickerUtils")}static async formatModelDisplayName(e,r,n){if(!r)return;let o=n?.trim();if(o){try{let u=(await new tc(e.get(Si)).getStoredModelConfigs(o))?.[r]?.modelCapabilities?.name?.trim();if(u)return`${u} (${o})`}catch{}return`${r} (${o})`}try{let l=(await e.get(cl).getMetadata()).find(u=>u.id===r);if(l)return`${l.name}`}catch{}return`${r}`}static async getModelConfiguration(e,r,n,o,s,c){if(n===pO)return await e.get(l$).resolveModelConfiguration(s??"unknown",c);if(n)return e.get(Da).getBestChatModelConfig([n]);if(e.get(LT).quotaExhausted&&!(await e.get(Ot).getToken()).userInfo?.isFreeUser){let l=await e.get(cl).getFallbackModel();if(l)return e.get(Da).getBestChatModelConfig([l?.id])}return e.get(Da).getBestChatModelConfig($E(r),o)}static transformMessages(e,r){return r===Cn.O1Ga||r===Cn.O1Mini?e.map(n=>n.role!=="user"?{role:"user",content:n.content}:n):e}static parseModelNotSupportedReason(e){if(!e)return{};let r=e.indexOf(":");if(r===-1||r===e.length-1)return{};let n=e.slice(r+1).trim();if(!n)return{};let{modelName:o,provider:s}=N2t(n);return{modelName:o||void 0,modelProviderName:s!==void 0&&s!==""?s:void 0}}};var vf=new Se("fetchChat"),rto=new Set([500,502,504]),nto=[1e3,1e4,1e4],Q7e=class{static{a(this,"OpenAIChatMLFetcher")}async fetchAndStreamChat(e,r,n,o,s){let c=String(n.properties.headerRequestId??r.ourRequestId);if(s?.isCancellationRequested)return{type:"canceled",reason:"before fetch request"};let l;try{let p=await this.fetchWithParameters(e,r.endpoint,r,n,s);if(p==="not-sent")return{type:"canceled",reason:"before fetch request"};l=p}catch(p){if(ep(p)||!Pb(p))throw p;vf.info(e,`Network error during fetch, checking connectivity before retry [${c}]: ${String(p)}`);let h=await this.retryAfterError(e,r,n,s,c);if(h&&"canceled"in h)return h.canceled;if(h&&"response"in h)l=h.response;else throw p}if(s?.isCancellationRequested)return this.destroyResponseBody(e,l),{type:"canceled",reason:"after fetch request"};if(sto(l.status)){vf.info(e,`Server returned ${l.status}, checking network connectivity before retry [${c}]`);let p=await this.retryAfterError(e,r,n,s,c);if(p&&"canceled"in p)return this.destroyResponseBody(e,l),p.canceled;p&&"response"in p&&(this.destroyResponseBody(e,l),l=p.response)}if(l.status!==200){let p=this.createTelemetryData(r.endpoint,e,r),h=await $o.formatModelDisplayName(e,r.model,r.modelProviderName),m=await this.handleError(e,p,l,h,r.uiKind);return m.type==="failed"?{...m,ghRequestId:l.headers.get("x-github-request-id")||void 0}:m}e.get(LT).processQuotaHeaders(l.headers);let u=Yx.getStrategy(r.endpoint),d={messages:r.messages,tools:r.tools,tool_choice:r.tool_choice,temperature:r.postOptions?.temperature,topP:r.postOptions?.top_p,modelConfiguration:{modelId:r.model,maxResponseTokens:r.postOptions?.max_tokens,stream:!!r.postOptions?.stream},repoInfo:r.repoInfo,count:r.count,postOptions:r.postOptions,intentParams:{intent:r.intent,intent_threshold:r.intent_threshold,intent_model:r.intent_model,intent_tokenizer:r.intent_tokenizer,intent_content:r.intent_content},copilot_thread_id:r.copilot_thread_id,prediction:r.prediction,cancel:s,enableThinking:r.enableThinking};return u.processResponse(e,l,o,n,d)}destroyResponseBody(e,r){try{let n=r.body();n&&"destroy"in n&&typeof n.destroy=="function"?n.destroy():n instanceof ReadableStream&&n.cancel()}catch(n){vf.exception(e,n,"Error destroying response stream")}}async retryAfterError(e,r,n,o,s){if(o?.isCancellationRequested)return{canceled:{type:"canceled",reason:"canceled before connectivity check"}};let c=await ato(e,r.copilotApiBaseUrl,r.authToken,o);if(o?.isCancellationRequested)return{canceled:{type:"canceled",reason:"canceled during connectivity check"}};if(!c.retryRequest){vf.info(e,`Not retrying chat request as network connectivity could not be re-established [${s}]`);return}vf.info(e,`Connectivity check passed, retrying request [${s}]`);let l=await this.fetchWithParameters(e,r.endpoint,r,n,o);return l==="not-sent"?{canceled:{type:"canceled",reason:"before retry fetch request"}}:o?.isCancellationRequested?(this.destroyResponseBody(e,l),{canceled:{type:"canceled",reason:"after retry fetch request"}}):{response:l}}createTelemetryData(e,r,n){return yt.createAndMarkAsIssued({endpoint:e,engineName:n.engineName,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchWithParameters(e,r,n,o,s){let c=Yx.getStrategy(r),l={messages:n.messages,tools:n.tools,tool_choice:n.tool_choice,temperature:n.postOptions?.temperature,topP:n.postOptions?.top_p,modelConfiguration:{modelId:n.model,providerName:n.modelProviderName,maxResponseTokens:n.postOptions?.max_tokens,stream:n.postOptions?.stream!==!1,supportsThinking:n.supportsThinking},repoInfo:n.repoInfo,count:n.count,postOptions:n.postOptions,intentParams:{intent:n.intent,intent_threshold:n.intent_threshold,intent_model:n.intent_model,intent_tokenizer:n.intent_tokenizer,intent_content:n.intent_content},copilot_thread_id:n.copilot_thread_id,prediction:n.prediction,cancel:s,enableThinking:n.enableThinking},u=c.buildRequestBody(e,l);return wHr(u,l.modelConfiguration),s?.isCancellationRequested?"not-sent":await ito(e,n.messages,n.copilotApiBaseUrl,n.engineName,r,n.ourRequestId,u,n.authToken,n.uiKind,o,n.llmInteraction,n.apiKey,n.modelProviderName,n.copilotEditsSessionHeader,n.copilotSessionToken,s,n.supportsAdaptiveThinking)}async handleError(e,r,n,o,s){if(n.clientError&&!n.headers.get("x-github-request-id")){let u=`Last response was a ${n.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;vf.error(e,u),r.properties.error=`Response status was ${n.status} with no x-github-request-id header`}else r.properties.error=`Response status was ${n.status}`;if(r.properties.status=String(n.status),at(e,"request.shownWarning",r),n.status===401)try{let u=await n.text(),d=JSON.parse(u);if(d.authorize_url)return{type:"authRequired",reason:"not authorized",authUrl:d.authorize_url}}catch{}if(n.status===401||n.status===403)return e.get(Ot).resetToken("chat_messages",n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`,code:n.status};if(n.status===499)return vf.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server",code:n.status};if(n.status===429){let u=bNe(n);return yi(e,"request.throttled",{requestSource:s??"unknown"},{retryAfter:u??-1}),{type:"failed",reason:"rate limit exceeded",code:n.status,retryAfter:u}}let c=await n.text();if(n.status===466)return vf.info(e,c),{type:"failed",reason:`client not supported: ${c}`,code:n.status};if(n.status===400&&c.includes("off_topic"))return{type:"failed",reason:"filtered as off_topic by intent classifier: message was not programming related",code:n.status};if(n.status===400&&c.includes("model_not_supported"))return{type:"failed",reason:o?`model is not supported: ${o}`:"model is not supported.",code:n.status};if(n.status==400&&c.includes("model_max_prompt_tokens_exceeded"))return{type:"failed",reason:"model max prompt tokens exceeded.",code:n.status};if(n.status===424)return{type:"failedDependency",reason:c};let l=await e.get(Ot).getToken();if(n.status===402){if(c.includes("free_quota_exceeded")){let p=n.headers.get("retry-after");return{type:"failed",reason:p?`You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait until ${new Date(p).toLocaleString()} for your limit to reset.`:"You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait for your limit to reset.",code:n.status}}else{if(c.includes("overage_limit_reached"))return{type:"failed",reason:"You cannot accrue additional overages at this time. Please contact [GitHub Support](https://support.github.com/contact) to continue using Copilot.",code:n.status};if(c.includes("quota_exceeded"))switch(l.userInfo?.copilotPlan){case"free":return{type:"failed",reason:"You've reached your monthly chat messages quota. Upgrade to Copilot Pro (30-day free trial) or wait for your allowance to renew.",code:n.status};case"individual":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please enable additional paid premium requests, upgrade to Copilot Pro+, or wait for your allowance to renew.",code:n.status};case"individual_pro":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please enable additional paid premium requests or wait for your allowance to renew.",code:n.status};case"business":case"enterprise":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please reach out to your organization's Copilot admin to enable additional paid premium requests or wait for your allowance to renew.",code:n.status};default:return{type:"failed",reason:"You've reached your monthly chat messages quota.",code:n.status}}}return{type:"failed",reason:"Quota Exceeded.",code:n.status}}return n.status===503?{type:"failed",reason:c,code:n.status}:(vf.error(e,"Unhandled status from server:",n.status,c),{type:"failed",reason:`unhandled status from server: ${n.status} ${c}`,code:n.status})}};async function ito(t,e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E){let _=n===""&&o===""?r:Ti(r,n,o),v=d.extendedBy({endpoint:o,engineName:n,uiKind:u});$9e(c,v,["messages"]),v.properties.headerRequestId=s,at(t,"request.sent",v);let b=Ac(),I=QHr(u),x={...O1(t),...p.toCapiHeaders()};BI()&&(x=await Are(t,x)),c.messages?.some(w=>Array.isArray(w.content)?w.content.some(P=>"image_url"in P):!1)&&(x["Copilot-Vision-Request"]="true"),h&&(x["api-key"]=h),g&&(x[iF]=g),A&&(x["copilot-session-token"]=A),o==="v1/messages"&&!E&&(x["anthropic-beta"]="interleaved-thinking-2025-05-14"),c.messages&&c.messages.forEach(w=>{oto(w)&&w.tool_calls&&(w.tool_calls=w.tool_calls.map(P=>WHr(P)))});let R=Bre(()=>M7e(t)?new L7e(t):void 0,void 0);return zM(t,_,l,I,s,c,y,x,void 0,m,R,e).then(w=>{let P=sO(w);v.extendWithRequestId(P);let k=Ac()-b;return v.measurements.totalTimeMs=k,vf.info(t,`Request ${s} at <${_}> finished with ${w.status} status after ${k}ms`),vf.debug(t,"request.response properties",v.properties),vf.debug(t,"request.response measurements",v.measurements),vf.debug(t,"messages:",JSON.stringify(e)),at(t,"request.response",v),R?new F7e(w,R,s,b):w}).catch(w=>{if(ep(w))throw w;let P=v.extendedBy({error:"Network exception"});at(t,"request.shownWarning",P),v.properties.message=String(m0(w,"name")??""),v.properties.code=String(m0(w,"code")??""),v.properties.errno=String(m0(w,"errno")??""),v.properties.type=String(m0(w,"type")??"");let k=Ac()-b;throw v.measurements.totalTimeMs=k,vf.info(t,`Request ${s} at <${_}> rejected with ${String(w)} after ${k}ms`),vf.debug(t,"request.error properties",v.properties),vf.debug(t,"request.error measurements",v.measurements),at(t,"request.error",v),w}).finally(()=>{Tne(t,e,v)})}a(ito,"fetchWithInstrumentation");function oto(t){return"tool_calls"in t}a(oto,"isChatMessageWithToolCalls");function sto(t){return rto.has(t)}a(sto,"shouldRetryStatusCode");async function ato(t,e,r,n,o=nto){let s=t.get(dr),c=new URL("_ping",e).href,l,u;for(let d of o){if(n?.isCancellationRequested)return{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};if(vf.info(t,`Waiting ${d}ms before pinging CAPI to check network connectivity...`),n){let p;try{await Promise.race([CT(d),new Promise(h=>{if(n.isCancellationRequested){h();return}p=n.onCancellationRequested(()=>{h()})})])}finally{p?.dispose()}}else await CT(d);if(n?.isCancellationRequested)return{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};try{let p=await s.fetch(c,{method:"GET",headers:{Authorization:`Bearer ${r}`}});if(p.status>=200&&p.status<300)return vf.info(t,"CAPI ping successful, proceeding with chat request retry..."),{retryRequest:!0,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};l=`Status ${p.status}: ${p.statusText??""}`,u=p.headers.get("x-github-request-id")??void 0,vf.info(t,`CAPI ping returned status ${p.status}, retrying ping...`)}catch(p){l=String(p),u=void 0,vf.info(t,`CAPI ping failed with error, retrying ping: ${l}`)}}return vf.info(t,`Network connectivity could not be re-established after ${o.length} attempts`),{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u}}a(ato,"checkNetworkConnectivity");f();var cto=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60}];function q7e(t){let e=t.slice();return e.reverse(),N$r(e)||N$r(e.filter(r=>r.trim().length>0))}a(q7e,"isRepetitive");function N$r(t){let e=lto(t);for(let r of cto){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(lto,"kmp_prefix_function");var ya=class{constructor(e){this.ctx=e;this.fetcher=new Q7e}static{a(this,"ChatMLFetcher")}async fetchResponse(e,r,n,o,s,c){let l=performance.now(),u=yr(),d={n:e.num_suggestions??1,temperature:e.temperature??0,stop:e.stop,top_p:e.topP??1,copilot_thread_id:e.copilot_thread_id,prediction:e.prediction},p=e.modelConfiguration;p&&(e.prediction?.content||delete d.prediction,e.prediction||e.modelConfiguration?.providerName===void 0&&p.maxResponseTokens!==void 0&&(d.max_tokens=p.maxResponseTokens),d.stream=!!p.stream),e.logitBias&&(d.logit_bias=e.logitBias);let h=e.chatModeKind==="Ask",m=await this.ctx.get(Ot).getToken(),g=!h&&vr(this.ctx,tt.EnableThinking);if(g&&m.getTokenValue("editor_preview_features")!=="0"&&e.modelConfiguration?.providerName===void 0&&xHr(e.modelConfiguration?.modelId)&&e.uiKind==="agentPanel")if(e.endpoint==="v1/messages"&&e.modelConfiguration?.supportsAdaptiveThinking){d.adaptive_thinking=!0;let k=vr(this.ctx,tt.AnthropicThinkingEffort),Q=k==="unset"||!k?"medium":k;Q!=="none"&&(d.thinking_effort=Q)}else{let k=vr(this.ctx,tt.AnthropicThinkingBudgetToken);if(k&&k>0){let Q=k<1024?1024:k;d.thinking_budget=Math.min(32e3,e.modelConfiguration.maxResponseTokens-1,Q)}}let A,y,E,_;if(e.modelConfiguration?.providerName){if(!Cne(m))throw new Error("Bring Your Own Key (BYOK) is not available for your account.");if(E=await _Hr(this.ctx,e.modelConfiguration?.providerName,e.modelConfiguration.modelId),_=e.modelConfiguration.providerName,e.intentParams=void 0,e.modelConfiguration?.providerName===Ss.Azure)if(e.modelConfiguration.deploymentUrl)A=vHr(e.modelConfiguration.modelId,e.modelConfiguration.deploymentUrl),y="",e.engineName="";else throw new Error(`No deployment URL found for Azure model: ${e.modelConfiguration.modelId}`);else if(B9e(e.modelConfiguration?.providerName))A=gRt[e.modelConfiguration?.providerName],y=e.endpoint??"completions",e.authToken=E;else throw new Error(`Unsupported BYOK provider: ${e.modelConfiguration?.providerName}`)}else{if(A=L2(this.ctx,m,e.copilotApiProvider??"api"),e.endpoint)y=e.endpoint;else{let k=p?await Q9e(this.ctx,p):!1;y=U9e(p,k)}Ge.debug(this.ctx,`Endpoint routing: model=${p?.modelId}, supportedEndpoints=${JSON.stringify(p?.supportedEndpoints)}, selected=${y}`)}let v=p?.copilotSessionToken,b=e.authToken??m.token,I=Yx.getStrategy(y),x=e.engineName??I.engineName,R={messages:e.messages,repoInfo:void 0,ourRequestId:u,copilotApiBaseUrl:A,engineName:x,endpoint:y,count:e.num_suggestions??1,uiKind:e.uiKind,postOptions:d,authToken:b,apiKey:E,modelProviderName:_,...e.intentParams,llmInteraction:e.llmInteraction,prediction:e.prediction,copilotEditsSessionHeader:e.copilotEditsSessionHeader,copilotSessionToken:v,supportsThinking:p?.supportsThinking,supportsAdaptiveThinking:p?.supportsAdaptiveThinking,enableThinking:g};p&&(R.model=p.modelId),e.tools&&e.tools?.length>0&&(p===void 0||p.toolCalls)&&(R.tools=e.tools,R.tool_choice=e.tool_choice??"auto");let w=await this.fetch(R,o,r,n);if(c){let k=c.maxRetryAttempts??3;for(let Q=1;Q<=k&&!(!c.shouldRetry(w)||w.type==="failed"&&w.noRetry);Q++){let M=w;if(await c.onRetry?.(M,Q),M.type==="failed"&&M.retryAfter!==void 0&&M.retryAfter>0){let D=M.retryAfter;if(await new Promise(G=>{let O=setTimeout(()=>{N.dispose(),G()},D*1e3),N=r.onCancellationRequested(()=>{clearTimeout(O),N.dispose(),G()})}),r.isCancellationRequested)break}w=await this.fetch(R,o,r,n),yi(this.ctx,"request.throttled.retry",{requestSource:e.uiKind??"unknown",resultType:w.type,modelId:p?p.providerName?"custom-byok":p.modelId:"unknown"},{retryAfter:M.type==="failed"?M.retryAfter??-1:-1,resultCode:w.type==="failed"?w.code??-1:-1})}}let P=Math.round(performance.now()-l);return this.sendFetchResponseTelemetry(e,w,n,P,y),Ore(()=>{if(s)return s.persistLLMRequest({requestId:R.ourRequestId,messages:R.messages,tools:R.tools,model:R.model,response:w,durationMs:P})},k=>Ge.debug(this.ctx,"persistLLMRequest failed",k)),w}async fetch(e,r,n,o){try{let s=await this.fetcher.fetchAndStreamChat(this.ctx,e,o.extendedBy({uiKind:e.uiKind}),r||(()=>{}),n);switch(s.type){case"success":return await this.processSuccessfulResponse(e,s,e.ourRequestId,o);case"canceled":return this.processCanceledResponse(s,e.ourRequestId);case"failed":case"failedDependency":return this.processFailedResponse(s,e.ourRequestId);case"authRequired":return{type:"agentAuthRequired",reason:"Agent authentication required.",authUrl:s.authUrl,requestId:e.ourRequestId}}}catch(s){return this.processError(s,e.ourRequestId)}}async processSuccessfulResponse(e,r,n,o){let s=[],c=DEe(r.chatCompletions,u=>this.postProcess(u,o));Ge.debug(this.ctx,`Process success response for request ${e.ourRequestId} with chatParams: ${JSON.stringify(e,null,2)}`);let l=0;for await(let u of c)Ge.debug(this.ctx,`Received choice #${l} for request ${e.ourRequestId}: ${JSON.stringify(u,null,2)}`),s.push(u),l++;if(s.length==1){let u=s[0];switch(u.finishReason){case"stop":return{type:"success",value:dn(u.message?.content)??"",toolCalls:u.tool_calls,requestId:n,numTokens:u.numTokens,copilotEditsSessionHeader:u.copilotEditsSessionHeader,thinking:u.thinking,usage:u.usage};case"tool_calls":return{type:"tool_calls",toolCalls:u.tool_calls,requestId:n,copilotEditsSessionHeader:u.copilotEditsSessionHeader,thinking:u.thinking,usage:u.usage};case"content_filter":return{type:"filtered",reason:"Response got filtered.",requestId:n,usage:u.usage};case"length":return{type:"length",reason:"Response too long.",requestId:n,truncatedValue:dn(u.message?.content)??"",usage:u.usage};case"DONE":return{type:"no_finish_reason",reason:"No finish reason received.",requestId:n};default:return{type:"unknown",reason:"Unknown finish reason received.",requestId:n}}}else if(s.length>1){let u=s.filter(d=>d.finishReason=="stop"||d.finishReason=="tool_calls");if(u.length>0)return{type:"successMultiple",value:u.map(d=>dn(d.message.content)),toolCalls:u.map(d=>d.tool_calls).filter(d=>d),requestId:n,copilotEditsSessionHeader:u[0].copilotEditsSessionHeader}}return{type:"no_choices",reason:"Response contained no choices.",requestId:n}}postProcess(e,r){return q7e(e.tokens)?(r.extendWithRequestId(e.requestId),at(this.ctx,"conversation.repetition.detected",r,0),e.finishReason!==""?e:void 0):e.message?e:void 0}processCanceledResponse(e,r){return Ge.debug(this.ctx,"Cancelled after awaiting fetchConversation"),{type:"canceled",reason:e.reason,requestId:r}}processFailedResponse(e,r){return e?.reason.includes("filtered as off_topic by intent classifier")?{type:"offTopic",reason:e.reason,requestId:r}:e?.reason.includes("model is not supported")?{type:"model_not_supported",reason:e.reason,requestId:r}:e?.reason.includes("model max prompt tokens exceeded")?{type:"model_max_prompt_tokens_exceeded",reason:e.reason,requestId:r}:{type:"failed",reason:e.reason,requestId:r,code:e.type==="failed"?e.code:void 0,retryAfter:e.type==="failed"?e.retryAfter:void 0,ghRequestId:e.type==="failed"?e.ghRequestId:void 0}}processError(e,r){if(ep(e))return{type:"canceled",reason:"network request aborted",requestId:r};{Ge.exception(this.ctx,e,"Error on conversation request");let n="Error on conversation request. Read more from logs.";if(e instanceof Error){let o=e.message;if(o&&o.trim().length>0){let s=360;o.length<=s?n=`Error on conversation request: ${o}`:n=`Error on conversation request: ${o.substring(0,s)}... Read more from logs.`}}return{type:"failed",reason:n,requestId:r,noRetry:e instanceof c$?!0:void 0}}}sendFetchResponseTelemetry(e,r,n,o,s){let c={responseType:r.type},l={duration:o};e.modelConfiguration&&!e.modelConfiguration?.providerName&&(c.modelId=e.modelConfiguration.modelId,c.modelFamily=e.modelConfiguration.modelFamily),"reason"in r&&r.reason&&(c.reason=r.reason.substring(0,360)),"code"in r&&r.code!==void 0&&(c.statusCode=String(r.code)),r.type==="failed"&&r.noRetry&&(c.isMidStreamError="true"),c.uiKind=e.uiKind,s&&(c.route=s),r.usage&&(l.completionTokens=r.usage.completion_tokens,l.promptTokens=r.usage.prompt_tokens,l.totalTokens=r.usage.total_tokens,r.usage.prompt_tokens_details?.cached_tokens!==void 0&&(l.cachedTokens=r.usage.prompt_tokens_details.cached_tokens)),n.properties.conversationId&&(c.conversationId=n.properties.conversationId),n.properties.messageId&&(c.messageId=n.properties.messageId),n.properties.messageSource&&(c.messageSource=n.properties.messageSource);let u=yt.createAndMarkAsIssued(c,l);Kn(this.ctx,"chatfetcher.response",u)}};f();f();f();f();f();f();f();f();var g0=class{static{a(this,"ConversationInspector")}};f();f();var A0=class{constructor(){this.skills=[]}static{a(this,"ConversationSkillRegistry")}registerSkill(e){if(this.getSkill(e.id))throw new Error(`Skill with id '${e.id}' already registered`);this.skills.push(e)}getSkill(e){return this.skills.find(r=>r.id===e)}getDescriptors(){return[...this.skills]}},D2t=class{constructor(e,r,n){this.delegate=e;this.stepId=r;this.stepTitle=n}static{a(this,"StepReportingSkillResolver")}async resolveSkill(e){await e.steps.start(this.stepId,this.stepTitle);try{let r=await this.delegate.resolveSkill(e);return r||await e.steps.finish(this.stepId),r}catch(r){throw await e.steps.error(this.stepId,r instanceof Error?r.message:`Error resolving ${this.stepTitle}`),r}}},M2t=class{constructor(e,r){this.delegate=e;this.stepId=r}static{a(this,"StepReportingSkillProcessor")}value(){return this.delegate.value()}async processSkill(e,r){try{let n=await this.delegate.processSkill(e,r);return await r.steps.finish(this.stepId),n}catch(n){throw await r.steps.error(this.stepId,n instanceof Error?n.message:`Error processing ${this.stepId}`),n}}},mh=class{constructor(e,r,n,o,s,c="explicit",l=[],u=()=>!0){this.id=e;this._description=r;this.stepTitle=n;this._resolver=o;this._processor=s;this.type=c;this._examples=l;this._isAvailable=u}static{a(this,"SingleStepReportingSkill")}description(){return this._description}examples(){return this._examples}isAvailable(e){return this._isAvailable(e)}resolver(e){return new D2t(this._resolver(e),this.id,this.stepTitle)}processor(e){return new M2t(this._processor(e),this.id)}};f();f();var Dne=class extends Error{constructor(r){super(`No instance of ${r.name} has been registered`);this.ctor=r;this.name=`UnregisteredContextErrorFor${r.name}`}static{a(this,"UnregisteredContextError")}},Mne=class{constructor(){this.instances=new Map}static{a(this,"Context")}get(e){let r=this.tryGet(e);if(r)return r;throw new Dne(e)}tryGet(e){let r=this.instances.get(e);if(r)return r}set(e,r){if(this.tryGet(e))throw new Error(`An instance of ${e.name} has already been registered. Use forceSet() if you're sure it's a good idea.`);this.assertIsInstance(e,r),this.instances.set(e,r)}forceSet(e,r){this.assertIsInstance(e,r),this.instances.set(e,r)}assertIsInstance(e,r){if(!(r instanceof e)){let n=JSON.stringify(r);throw new Error(`The instance you're trying to register for ${e.name} is not an instance of it (${n}).`)}}};f();var D$r=new Se("EncodingConfigurationService"),dk=class{constructor(e){this.ctx=e;this.fileEncodingCache=new Map}static{a(this,"EncodingConfigurationService")}async getEncodingForFile(e){if(this.fileEncodingCache.has(e))return this.fileEncodingCache.get(e);let r=await this.requestEncodingFromClient(e)??"utf8";return this.fileEncodingCache.set(e,r),r}handleConfigurationChange(e){if(e.copilot?.encodingChanges){if(e.copilot.encodingChanges.length>0)for(let r of e.copilot.encodingChanges)this.fileEncodingCache.delete(r),D$r.debug(this.ctx,`Cache invalidated for file: ${r}`)}else this.fileEncodingCache.clear(),D$r.debug(this.ctx,"All encoding cache cleared")}clearCache(){this.fileEncodingCache.clear()}};function Kl(t){switch(t.status){case"valid":return t.document.getText().trim().length===0?"empty":"included";case"invalid":return"blocked";case"notfound":return"notfound"}}a(Kl,"statusFromTextDocumentResult");var In=class{constructor(e){this.ctx=e}static{a(this,"FileReader")}getRelativePath(e){return this.ctx.get(zr).getRelativePath(e)??ei(e.uri)}getOrReadTextDocument(e){return this.readFile(e.uri)}getOrReadTextDocumentWithFakeClientProperties(e){return this.readFile(e.uri)}async readFile(e){let n=await this.ctx.get(zr).getTextDocumentWithValidation({uri:e});if(n.status!=="notfound")return n;try{let{text:o,fileSizeMB:s}=await this.readFileWithSize(e);if(s>1)return{status:"notfound",message:"File too large"};let c=await V6(this.ctx,{uri:e},o);return c.status==="valid"?{status:"valid",document:Bx.create(e,"UNKNOWN",-1,o)}:c}catch{return{status:"notfound",message:"File not found"}}}async readFileWithSize(e){let r=Pl(e);if(tm.isRegisteredScheme(r.scheme))try{let s=this.ctx.get(tm),{text:c,stat:l}=await s.readFile(e);return{text:c,fileSizeMB:l.size/1024/1024}}catch(s){if(!(s instanceof Dne))throw s}let n=await this.ctx.get(Xn).stat(e);return{text:await this.doReadFile(e),fileSizeMB:n.size/1024/1024}}async doReadFile(e){let r="utf8";try{r=await this.ctx.get(dk).getEncodingForFile(e)}catch(o){if(!(o instanceof Dne))throw o}let n=await this.ctx.get(Xn).readFileString(e,r);return xQr(n)}};f();function XEe(t){for(var e=[],r=1;rthis.fileOps.appendFile(e,r,"utf8"));return this.appendQueues.set(e,o.catch(()=>{})),o}};f();var j9e=require("fs"),XP=de(require("path"));var RVr=require("stream");var rno={mkdir:a((t,e)=>j9e.promises.mkdir(t,e),"mkdir"),writeFile:a((t,e,r)=>j9e.promises.writeFile(t,e,r),"writeFile"),appendFile:a((t,e,r)=>j9e.promises.appendFile(t,e,r),"appendFile")},H9e,$9e=class t{constructor(e,r){this.ctx=e;this.fileOps=r??rno,this.basePath=this.getBasePath(),this.isEnabled=!!this.basePath}static{a(this,"DebugRequestLogger")}static{this.sequence=0}static{this.requestSeqMap=new Map}static{this.requestInteractionMap=new Map}static{this.appendChainMap=new Map}static resetForTesting(){H9e=void 0,wVr(),t.sequence=0,t.requestSeqMap.clear(),t.requestInteractionMap.clear(),t.appendChainMap.clear()}getBasePath(){return vr(this.ctx,tt.PromptPersistBasePath)?.trim()||void 0}ensureDir(){return H9e||(H9e=this.initHttpLogDir()),H9e}toPersistenceFileOps(){return{mkdir:a((e,r)=>this.fileOps.mkdir(e,r),"mkdir"),writeFile:a((e,r,n)=>this.fileOps.writeFile(e,r,n),"writeFile"),appendFile:a((e,r,n)=>this.fileOps.appendFile(e,r,n),"appendFile")}}async initHttpLogDir(){let e=await K2t(this.basePath,this.toPersistenceFileOps()),r=XP.join(e,"http-log");return await this.fileOps.mkdir(r,{recursive:!0}),r}seqForRequest(e){let r=t.requestSeqMap.get(e);if(r!==void 0)return r;let n=++t.sequence;return t.requestSeqMap.set(e,n),n}logRequest(e){this.isEnabled&&this.writeRequestFile(e).catch(r=>{Ge.debug(this.ctx,"Failed to persist enhanced request log",r)})}logResponse(e){this.isEnabled&&this.writeResponseFile(e).catch(r=>{Ge.debug(this.ctx,"Failed to persist enhanced response log",r)})}static{this.SENSITIVE_HEADERS=new Set(["authorization","cookie","set-cookie","request-hmac","proxy-authorization"].map(e=>e.toLowerCase()))}static redactHeaders(e){let r={};for(let[n,o]of Object.entries(e))r[n]=t.SENSITIVE_HEADERS.has(n.toLowerCase())?"[REDACTED]":o;return r}async resolveTurnHttpLogDir(e){if(!e)return;let r=J2t(e);if(!r)return;let n=XP.join(r,"http-log");return await this.fileOps.mkdir(n,{recursive:!0}),n}static extractInteractionId(e){return Object.entries(e).find(([r])=>r.toLowerCase()==="x-interaction-id")?.[1]}async writeMessagesDump(e,r,n,o){if(!o||o.length===0)return;let s=`${r}_request_messages_dump_${n}.json`;await this.fileOps.writeFile(XP.join(e,s),JSON.stringify(o,null,2),"utf8")}appendResponseChunk(e,r){if(!this.isEnabled)return;let o=(t.appendChainMap.get(e)??Promise.resolve()).then(()=>this.doAppendChunk(e,r)).catch(s=>{Ge.debug(this.ctx,"Failed to append SSE chunk",s)});t.appendChainMap.set(e,o)}async doAppendChunk(e,r){let n=await this.ensureDir(),o=this.seqForRequest(e),s=String(o).padStart(6,"0"),c=e.replace(/[^a-zA-Z0-9_-]/g,"_"),l=`${s}_response_sse_chunks_${c}.txt`;await this.fileOps.appendFile(XP.join(n,l),r,"utf8");let u=t.requestInteractionMap.get(e),d=await this.resolveTurnHttpLogDir(u);d&&await this.fileOps.appendFile(XP.join(d,l),r,"utf8")}async writeRequestFile(e){let r=await this.ensureDir(),n=this.seqForRequest(e.requestId),o=String(n).padStart(6,"0"),s=e.requestId.replace(/[^a-zA-Z0-9_-]/g,"_"),c=`${o}_request_${s}.json`,{messages:l,...u}=e,d={...u,headers:t.redactHeaders(e.headers)},p=JSON.stringify(d,null,2);await this.fileOps.writeFile(XP.join(r,c),p,"utf8"),await this.writeMessagesDump(r,o,s,l);let h=t.extractInteractionId(e.headers);h&&t.requestInteractionMap.set(e.requestId,h);let m=await this.resolveTurnHttpLogDir(h);m&&(await this.fileOps.writeFile(XP.join(m,c),p,"utf8"),await this.writeMessagesDump(m,o,s,l))}async writeResponseFile(e){let r=t.appendChainMap.get(e.requestId);r&&(await r,t.appendChainMap.delete(e.requestId));let n=await this.ensureDir(),o=this.seqForRequest(e.requestId),s=e.requestId.replace(/[^a-zA-Z0-9_-]/g,"_"),c=`${String(o).padStart(6,"0")}_response_headers_${s}.json`,{body:l,...u}=e,d={...u,headers:t.redactHeaders(e.headers)},p=JSON.stringify(d,null,2);await this.fileOps.writeFile(XP.join(n,c),p,"utf8");let h=t.requestInteractionMap.get(e.requestId),m=await this.resolveTurnHttpLogDir(h);m&&await this.fileOps.writeFile(XP.join(m,c),p,"utf8"),t.requestSeqMap.delete(e.requestId),t.requestInteractionMap.delete(e.requestId)}},V9e=class extends S2{static{a(this,"DebugLoggingResponseWrapper")}constructor(e,r,n,o){super(e.status,e.statusText,e.headers,()=>e.text(),()=>e.body()),this.logger=r,this.requestId=n,this.startTime=o}async text(){let e=await super.text();return this.logger.logResponse({timestamp:new Date().toISOString(),requestId:this.requestId,status:this.status,statusText:this.statusText,headers:this.headersToObject(),duration:Math.round(performance.now()-this.startTime)}),e}body(){let e=super.body();return e?this.createLoggingStream(e):null}createLoggingStream(e){let r=new RVr.PassThrough;return e.on("data",n=>{this.logger.appendResponseChunk(this.requestId,n.toString()),r.write(n)}),e.on("end",()=>{this.logger.logResponse({timestamp:new Date().toISOString(),requestId:this.requestId,status:this.status,statusText:this.statusText,headers:this.headersToObject(),duration:Math.round(performance.now()-this.startTime)}),r.end()}),e.on("error",n=>{r.emit("error",n)}),r}headersToObject(){let e={};for(let[r,n]of this.headers)e[r]=n;return e}};f();f();var gj=class t extends N1{constructor(r){super();this._autoModelCache=new Map;this._ongoingFetches=new Map;this._ctx=r,this._logger=new Se("AutoModelService"),this._register(Ps(this._ctx,()=>{this._autoModelCache.clear(),this._reserveToken=void 0,this._ongoingFetches.clear(),this._logger.info(this._ctx,"Auto model cache cleared due to token update")}))}static{a(this,"AutoModelService")}static{this.EXPIRY_THRESHOLD_MS=300*1e3}async resolveModelConfiguration(r,n){let o=this._autoModelCache.get(r);o||(o={},this._autoModelCache.set(r,o)),this._pruneExpiredTokens(o),!o.active&&o.standby&&(o.active=o.standby,o.standby=void 0),o.active||(o.active=await this._acquireActiveToken(r)),(!o.standby||!this._isTokenValid(o.standby)||this._isExpiringSoon(o.standby)||this._isExpiringSoon(o.active))&&this._refreshStandbyInBackground(r),this._ensureReserveRefill();let s=await this._ctx.get(tl).getMetadata(),c;if(o.active.model.toLowerCase().includes("grok")&&n)c=[_n.Gpt41];else{let d=s.find(p=>p.id===o?.active?.model);d?.capabilities?.family?c=[d.capabilities.family]:c=[o.active.model]}let l=await this._ctx.get(wa).getBestChatModelConfig(c);l.copilotSessionToken=o.active.sessionToken,l.autoModeDiscountedCost=o.active.discountedCost;let u=s.find(d=>d.capabilities.family===o.active.model);return l.originalBillingMultiplier=u?.billing?.multiplier??0,l}_ensureReserveRefill(){if(this._isTokenValid(this._reserveToken))return;let r="reserve";if(this._ongoingFetches.has(r))return;let n=this._fetchToken("reserve");this._ongoingFetches.set(r,n),n.then(o=>{this._reserveToken=o}).catch(o=>{this._logger.error(this._ctx,`Failed to refresh reserve auto mode token: ${o instanceof Error?o.message:String(o)}`)}).finally(()=>{this._ongoingFetches.delete(r)})}async _acquireActiveToken(r){if(this._isTokenValid(this._reserveToken)){let c=this._reserveToken;return this._reserveToken=void 0,c}let n=`active:${r}`,o=this._ongoingFetches.get(n);if(o)return o;let s=this._fetchToken("active").finally(()=>{this._ongoingFetches.delete(n)});return this._ongoingFetches.set(n,s),s}_refreshStandbyInBackground(r){let n=`standby:${r}`;if(this._ongoingFetches.has(n))return;let o=this._fetchToken("standby");this._ongoingFetches.set(n,o),o.then(s=>{let c=this._autoModelCache.get(r);c&&(c.active&&c.active.sessionToken===s.sessionToken||(c.standby=s,this._ongoingFetches.delete(n)))}).catch(s=>{this._logger.error(this._ctx,`Failed to refresh standby auto mode token for ${r}: ${s instanceof Error?s.message:String(s)}`),this._ongoingFetches.delete(n)})}async _fetchToken(r){let n=Date.now();try{let o=await X3e(this._ctx,"/models/session",JSON.stringify({auto_mode:{model_hints:["auto"]}}));if(!o.ok)throw new Error(`Auto mode API returned status ${o.status}`);let s=await o.json(),c=s.selected_model,l=s.session_token,u=s.expires_at*1e3,d=s.discounted_costs?.[c];return this._logger.info(this._ctx,`Fetched auto model for ${r} in ${Date.now()-n}ms: ${c}`),{model:c,sessionToken:l,expiration:u,discountedCost:d}}catch(o){throw this._logger.error(this._ctx,`Failed to fetch auto mode model for ${r}: ${o instanceof Error?o.message:String(o)}`),o}}_pruneExpiredTokens(r){r.active&&!this._isTokenValid(r.active)&&(r.active=void 0),r.standby&&!this._isTokenValid(r.standby)&&(r.standby=void 0)}_isTokenValid(r){return!!r&&r.expiration>Date.now()}_isExpiringSoon(r){return r?r.expiration-Date.now()<=t.EXPIRY_THRESHOLD_MS:!1}};var W9e="Auto",YM="auto",PVr="custom",qo=class{static{a(this,"ModelPickerUtils")}static async formatModelDisplayName(e,r,n){if(!r)return;let o=n?.trim();if(o){try{let u=(await new Ka(e.get(Ti)).getStoredModelConfigs(o))?.[r]?.modelCapabilities?.name?.trim();if(u)return`${u} (${o})`}catch{}return`${r} (${o})`}try{let l=(await e.get(tl).getMetadata()).find(u=>u.id===r);if(l)return`${l.name}`}catch{}return`${r}`}static async getModelConfiguration(e,r,n,o,s,c){if(n===YM)return await e.get(gj).resolveModelConfiguration(s??"unknown",c);if(n)return e.get(wa).getBestChatModelConfig([n]);if(e.get(ST).quotaExhausted&&!(await e.get(Nt).getToken()).userInfo?.isFreeUser){let l=await e.get(tl).getFallbackModel();if(l)return e.get(wa).getBestChatModelConfig([l?.id])}return e.get(wa).getBestChatModelConfig(ME(r),o)}static transformMessages(e,r){return r===_n.O1Ga||r===_n.O1Mini?e.map(n=>n.role!=="user"?{role:"user",content:n.content}:n):e}static parseModelNotSupportedReason(e){if(!e)return{};let r=e.indexOf(":");if(r===-1||r===e.length-1)return{};let n=e.slice(r+1).trim();if(!n)return{};let{modelName:o,provider:s}=X2t(n);return{modelName:o||void 0,modelProviderName:s!==void 0&&s!==""?s:void 0}}};var mf=new Se("fetchChat"),nno=new Set([500,502,504]),ino=[1e3,1e4,1e4],z9e=class{static{a(this,"OpenAIChatMLFetcher")}async fetchAndStreamChat(e,r,n,o,s){let c=String(n.properties.headerRequestId??r.ourRequestId);if(s?.isCancellationRequested)return{type:"canceled",reason:"before fetch request"};let l;try{let p=await this.fetchWithParameters(e,r.endpoint,r,n,s);if(p==="not-sent")return{type:"canceled",reason:"before fetch request"};l=p}catch(p){if(Y0(p)||!Ab(p))throw p;mf.info(e,`Network error during fetch, checking connectivity before retry [${c}]: ${String(p)}`);let h=await this.retryAfterError(e,r,n,s,c);if(h&&"canceled"in h)return h.canceled;if(h&&"response"in h)l=h.response;else throw p}if(s?.isCancellationRequested)return this.destroyResponseBody(e,l),{type:"canceled",reason:"after fetch request"};if(ano(l.status)){mf.info(e,`Server returned ${l.status}, checking network connectivity before retry [${c}]`);let p=await this.retryAfterError(e,r,n,s,c);if(p&&"canceled"in p)return this.destroyResponseBody(e,l),p.canceled;p&&"response"in p&&(this.destroyResponseBody(e,l),l=p.response)}if(l.status!==200){let p=this.createTelemetryData(r.endpoint,e,r),h=await qo.formatModelDisplayName(e,r.model,r.modelProviderName),m=await this.handleError(e,p,l,h,r.uiKind);return m.type==="failed"?{...m,ghRequestId:l.headers.get("x-github-request-id")||void 0}:m}e.get(ST).processQuotaHeaders(l.headers);let u=Fx.getStrategy(r.endpoint),d={messages:r.messages,tools:r.tools,tool_choice:r.tool_choice,temperature:r.postOptions?.temperature,topP:r.postOptions?.top_p,modelConfiguration:{modelId:r.model,maxResponseTokens:r.postOptions?.max_tokens,stream:!!r.postOptions?.stream},repoInfo:r.repoInfo,count:r.count,postOptions:r.postOptions,intentParams:{intent:r.intent,intent_threshold:r.intent_threshold,intent_model:r.intent_model,intent_tokenizer:r.intent_tokenizer,intent_content:r.intent_content},copilot_thread_id:r.copilot_thread_id,prediction:r.prediction,cancel:s,enableThinking:r.enableThinking};return u.processResponse(e,l,o,n,d)}destroyResponseBody(e,r){try{let n=r.body();n&&"destroy"in n&&typeof n.destroy=="function"?n.destroy():n instanceof ReadableStream&&n.cancel()}catch(n){mf.exception(e,n,"Error destroying response stream")}}async retryAfterError(e,r,n,o,s){if(o?.isCancellationRequested)return{canceled:{type:"canceled",reason:"canceled before connectivity check"}};let c=await cno(e,r.copilotApiBaseUrl,r.authToken,o);if(o?.isCancellationRequested)return{canceled:{type:"canceled",reason:"canceled during connectivity check"}};if(!c.retryRequest){mf.info(e,`Not retrying chat request as network connectivity could not be re-established [${s}]`);return}mf.info(e,`Connectivity check passed, retrying request [${s}]`);let l=await this.fetchWithParameters(e,r.endpoint,r,n,o);return l==="not-sent"?{canceled:{type:"canceled",reason:"before retry fetch request"}}:o?.isCancellationRequested?(this.destroyResponseBody(e,l),{canceled:{type:"canceled",reason:"after retry fetch request"}}):{response:l}}createTelemetryData(e,r,n){return Pt.createAndMarkAsIssued({endpoint:e,engineName:n.engineName,uiKind:n.uiKind,headerRequestId:n.ourRequestId})}async fetchWithParameters(e,r,n,o,s){let c=Fx.getStrategy(r),l={messages:n.messages,tools:n.tools,tool_choice:n.tool_choice,temperature:n.postOptions?.temperature,topP:n.postOptions?.top_p,modelConfiguration:{modelId:n.model,providerName:n.modelProviderName,maxResponseTokens:n.postOptions?.max_tokens,stream:n.postOptions?.stream!==!1,supportsThinking:n.supportsThinking},repoInfo:n.repoInfo,count:n.count,postOptions:n.postOptions,intentParams:{intent:n.intent,intent_threshold:n.intent_threshold,intent_model:n.intent_model,intent_tokenizer:n.intent_tokenizer,intent_content:n.intent_content},copilot_thread_id:n.copilot_thread_id,prediction:n.prediction,cancel:s,enableThinking:n.enableThinking},u=c.buildRequestBody(e,l);return xjr(u,l.modelConfiguration),s?.isCancellationRequested?"not-sent":await ono(e,n.messages,n.copilotApiBaseUrl,n.engineName,r,n.ourRequestId,u,n.authToken,n.uiKind,o,n.llmInteraction,n.apiKey,n.modelProviderName,n.copilotEditsSessionHeader,n.copilotSessionToken,s,n.supportsAdaptiveThinking)}async handleError(e,r,n,o,s){if(n.clientError&&!n.headers.get("x-github-request-id")){let u=`Last response was a ${n.status} error and does not appear to originate from GitHub. Is a proxy or firewall intercepting this request? https://gh.io/copilot-firewall`;mf.error(e,u),r.properties.error=`Response status was ${n.status} with no x-github-request-id header`}else r.properties.error=`Response status was ${n.status}`;if(r.properties.status=String(n.status),st(e,"request.shownWarning",r),n.status===401)try{let u=await n.text(),d=JSON.parse(u);if(d.authorize_url)return{type:"authRequired",reason:"not authorized",authUrl:d.authorize_url}}catch{}if(n.status===401||n.status===403)return e.get(Nt).resetToken("chat_messages",n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`,code:n.status};if(n.status===499)return mf.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server",code:n.status};if(n.status===429){let u=_ke(n);return rr(e,"request.throttled",{requestSource:s??"unknown"},{retryAfter:u??-1}),{type:"failed",reason:"rate limit exceeded",code:n.status,retryAfter:u}}let c=await n.text();if(n.status===466)return mf.info(e,c),{type:"failed",reason:`client not supported: ${c}`,code:n.status};if(n.status===400&&c.includes("off_topic"))return{type:"failed",reason:"filtered as off_topic by intent classifier: message was not programming related",code:n.status};if(n.status===400&&c.includes("model_not_supported"))return{type:"failed",reason:o?`model is not supported: ${o}`:"model is not supported.",code:n.status};if(n.status==400&&c.includes("model_max_prompt_tokens_exceeded"))return{type:"failed",reason:"model max prompt tokens exceeded.",code:n.status};if(n.status===424)return{type:"failedDependency",reason:c};let l=await e.get(Nt).getToken();if(n.status===402){if(c.includes("free_quota_exceeded")){let p=n.headers.get("retry-after");return{type:"failed",reason:p?`You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait until ${new Date(p).toLocaleString()} for your limit to reset.`:"You've reached your monthly chat messages limit. Upgrade to Copilot Pro (30-day free trial) or wait for your limit to reset.",code:n.status}}else{if(c.includes("overage_limit_reached"))return{type:"failed",reason:"You cannot accrue additional overages at this time. Please contact [GitHub Support](https://support.github.com/contact) to continue using Copilot.",code:n.status};if(c.includes("quota_exceeded"))switch(l.userInfo?.copilotPlan){case"free":return{type:"failed",reason:"You've reached your monthly chat messages quota. Upgrade to Copilot Pro (30-day free trial) or wait for your allowance to renew.",code:n.status};case"individual":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please enable additional paid premium requests, upgrade to Copilot Pro+, or wait for your allowance to renew.",code:n.status};case"individual_pro":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please enable additional paid premium requests or wait for your allowance to renew.",code:n.status};case"business":case"enterprise":return{type:"failed",reason:"You've reached your monthly chat messages quota. Please reach out to your organization's Copilot admin to enable additional paid premium requests or wait for your allowance to renew.",code:n.status};default:return{type:"failed",reason:"You've reached your monthly chat messages quota.",code:n.status}}}return{type:"failed",reason:"Quota Exceeded.",code:n.status}}return n.status===503?{type:"failed",reason:c,code:n.status}:(mf.error(e,"Unhandled status from server:",n.status,c),{type:"failed",reason:`unhandled status from server: ${n.status} ${c}`,code:n.status})}};async function ono(t,e,r,n,o,s,c,l,u,d,p,h,m,g,A,y,E){let _=n===""&&o===""?r:bi(r,n,o),v=d.extendedBy({endpoint:o,engineName:n,uiKind:u});ZFe(c,v,["messages"]),v.properties.headerRequestId=s,st(t,"request.sent",v);let b=fc(),I=Ujr(u),x={...v1(t),...p.toCapiHeaders()};TI()&&(x=await Dte(t,x)),c.messages?.some(R=>Array.isArray(R.content)?R.content.some(P=>"image_url"in P):!1)&&(x["Copilot-Vision-Request"]="true"),h&&(x["api-key"]=h),g&&(x[k6]=g),A&&(x["copilot-session-token"]=A),o==="v1/messages"&&!E&&(x["anthropic-beta"]="interleaved-thinking-2025-05-14"),c.messages&&c.messages.forEach(R=>{sno(R)&&R.tool_calls&&(R.tool_calls=R.tool_calls.map(P=>Vjr(P)))});let w=Iee(()=>G9e(t)?new $9e(t):void 0,void 0);return PM(t,_,l,I,s,c,y,x,void 0,m,w,e).then(R=>{let P=GM(R);v.extendWithRequestId(P);let k=fc()-b;return v.measurements.totalTimeMs=k,mf.info(t,`Request ${s} at <${_}> finished with ${R.status} status after ${k}ms`),mf.debug(t,"request.response properties",v.properties),mf.debug(t,"request.response measurements",v.measurements),mf.debug(t,"messages:",JSON.stringify(e)),st(t,"request.response",v),w?new V9e(R,w,s,b):R}).catch(R=>{if(Y0(R))throw R;let P=v.extendedBy({error:"Network exception"});st(t,"request.shownWarning",P),v.properties.message=String(u0(R,"name")??""),v.properties.code=String(u0(R,"code")??""),v.properties.errno=String(u0(R,"errno")??""),v.properties.type=String(u0(R,"type")??"");let k=fc()-b;throw v.measurements.totalTimeMs=k,mf.info(t,`Request ${s} at <${_}> rejected with ${String(R)} after ${k}ms`),mf.debug(t,"request.error properties",v.properties),mf.debug(t,"request.error measurements",v.measurements),st(t,"request.error",v),R}).finally(()=>{Lre(t,e,v)})}a(ono,"fetchWithInstrumentation");function sno(t){return"tool_calls"in t}a(sno,"isChatMessageWithToolCalls");function ano(t){return nno.has(t)}a(ano,"shouldRetryStatusCode");async function cno(t,e,r,n,o=ino){let s=t.get(dr),c=new URL("_ping",e).href,l,u;for(let d of o){if(n?.isCancellationRequested)return{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};if(mf.info(t,`Waiting ${d}ms before pinging CAPI to check network connectivity...`),n){let p;try{await Promise.race([Wb(d),new Promise(h=>{if(n.isCancellationRequested){h();return}p=n.onCancellationRequested(()=>{h()})})])}finally{p?.dispose()}}else await Wb(d);if(n?.isCancellationRequested)return{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};try{let p=await s.fetch(c,{method:"GET",headers:{Authorization:`Bearer ${r}`}});if(p.status>=200&&p.status<300)return mf.info(t,"CAPI ping successful, proceeding with chat request retry..."),{retryRequest:!0,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u};l=`Status ${p.status}: ${p.statusText??""}`,u=p.headers.get("x-github-request-id")??void 0,mf.info(t,`CAPI ping returned status ${p.status}, retrying ping...`)}catch(p){l=String(p),u=void 0,mf.info(t,`CAPI ping failed with error, retrying ping: ${l}`)}}return mf.info(t,`Network connectivity could not be re-established after ${o.length} attempts`),{retryRequest:!1,connectivityTestError:l,connectivityTestErrorGitHubRequestId:u}}a(cno,"checkNetworkConnectivity");f();var lno=[{max_token_sequence_length:1,last_tokens_to_consider:10},{max_token_sequence_length:10,last_tokens_to_consider:30},{max_token_sequence_length:20,last_tokens_to_consider:45},{max_token_sequence_length:30,last_tokens_to_consider:60}];function Y9e(t){let e=t.slice();return e.reverse(),kVr(e)||kVr(e.filter(r=>r.trim().length>0))}a(Y9e,"isRepetitive");function kVr(t){let e=uno(t);for(let r of lno){if(t.length=0&&t[r+1]!==t[n];)r=e[r];t[r+1]===t[n]&&r++,e[n]=r}return e}a(uno,"kmp_prefix_function");var fa=class{constructor(e){this.ctx=e;this.fetcher=new z9e}static{a(this,"ChatMLFetcher")}async fetchResponse(e,r,n,o,s,c){let l=performance.now(),u=yr(),d={n:e.num_suggestions??1,temperature:e.temperature??0,stop:e.stop,top_p:e.topP??1,copilot_thread_id:e.copilot_thread_id,prediction:e.prediction},p=e.modelConfiguration;p&&(e.prediction?.content||delete d.prediction,e.prediction||e.modelConfiguration?.providerName===void 0&&p.maxResponseTokens!==void 0&&(d.max_tokens=p.maxResponseTokens),d.stream=!!p.stream),e.logitBias&&(d.logit_bias=e.logitBias);let h=e.chatModeKind==="Ask",m=await this.ctx.get(Nt).getToken(),g=!h&&vr(this.ctx,tt.EnableThinking);if(g&&m.getTokenValue("editor_preview_features")!=="0"&&e.modelConfiguration?.providerName===void 0&&Ijr(e.modelConfiguration?.modelId)&&e.uiKind==="agentPanel")if(e.endpoint==="v1/messages"&&e.modelConfiguration?.supportsAdaptiveThinking){d.adaptive_thinking=!0;let k=vr(this.ctx,tt.AnthropicThinkingEffort),Q=k==="unset"||!k?"medium":k;Q!=="none"&&(d.thinking_effort=Q)}else{let k=vr(this.ctx,tt.AnthropicThinkingBudgetToken);if(k&&k>0){let Q=k<1024?1024:k;d.thinking_budget=Math.min(32e3,e.modelConfiguration.maxResponseTokens-1,Q)}}let A,y,E,_;if(e.modelConfiguration?.providerName){if(!Nre(m))throw new Error("Bring Your Own Key (BYOK) is not available for your account.");if(E=await _jr(this.ctx,e.modelConfiguration?.providerName,e.modelConfiguration.modelId),_=e.modelConfiguration.providerName,e.intentParams=void 0,e.modelConfiguration?.providerName===Es.Azure)if(e.modelConfiguration.deploymentUrl)A=Cjr(e.modelConfiguration.modelId,e.modelConfiguration.deploymentUrl),y="",e.engineName="";else throw new Error(`No deployment URL found for Azure model: ${e.modelConfiguration.modelId}`);else if(jFe(e.modelConfiguration?.providerName))A=BRt[e.modelConfiguration?.providerName],y=e.endpoint??"completions",e.authToken=E;else throw new Error(`Unsupported BYOK provider: ${e.modelConfiguration?.providerName}`)}else{if(A=I2(this.ctx,m,e.copilotApiProvider??"api"),e.endpoint)y=e.endpoint;else{let k=p?await zFe(this.ctx,p):!1;y=WFe(p,k)}Ge.debug(this.ctx,`Endpoint routing: model=${p?.modelId}, supportedEndpoints=${JSON.stringify(p?.supportedEndpoints)}, selected=${y}`)}let v=p?.copilotSessionToken,b=e.authToken??m.token,I=Fx.getStrategy(y),x=e.engineName??I.engineName,w={messages:e.messages,repoInfo:void 0,ourRequestId:u,copilotApiBaseUrl:A,engineName:x,endpoint:y,count:e.num_suggestions??1,uiKind:e.uiKind,postOptions:d,authToken:b,apiKey:E,modelProviderName:_,...e.intentParams,llmInteraction:e.llmInteraction,prediction:e.prediction,copilotEditsSessionHeader:e.copilotEditsSessionHeader,copilotSessionToken:v,supportsThinking:p?.supportsThinking,supportsAdaptiveThinking:p?.supportsAdaptiveThinking,enableThinking:g};p&&(w.model=p.modelId),e.tools&&e.tools?.length>0&&(p===void 0||p.toolCalls)&&(w.tools=e.tools,w.tool_choice=e.tool_choice??"auto");let R=await this.fetch(w,o,r,n);if(c){let k=c.maxRetryAttempts??3;for(let Q=1;Q<=k&&!(!c.shouldRetry(R)||R.type==="failed"&&R.noRetry);Q++){let M=R;if(await c.onRetry?.(M,Q),M.type==="failed"&&M.retryAfter!==void 0&&M.retryAfter>0){let N=M.retryAfter;if(await new Promise(G=>{let O=setTimeout(()=>{D.dispose(),G()},N*1e3),D=r.onCancellationRequested(()=>{clearTimeout(O),D.dispose(),G()})}),r.isCancellationRequested)break}R=await this.fetch(w,o,r,n),rr(this.ctx,"request.throttled.retry",{requestSource:e.uiKind??"unknown",resultType:R.type,modelId:p?p.providerName?"custom-byok":p.modelId:"unknown"},{retryAfter:M.type==="failed"?M.retryAfter??-1:-1,resultCode:R.type==="failed"?R.code??-1:-1})}}let P=Math.round(performance.now()-l);return this.sendFetchResponseTelemetry(e,R,n,P,y),See(()=>{if(s)return s.persistLLMRequest({requestId:w.ourRequestId,messages:w.messages,tools:w.tools,model:w.model,response:R,durationMs:P})},k=>Ge.debug(this.ctx,"persistLLMRequest failed",k)),R}async fetch(e,r,n,o){try{let s=await this.fetcher.fetchAndStreamChat(this.ctx,e,o.extendedBy({uiKind:e.uiKind}),r||(()=>{}),n);switch(s.type){case"success":return await this.processSuccessfulResponse(e,s,e.ourRequestId,o);case"canceled":return this.processCanceledResponse(s,e.ourRequestId);case"failed":case"failedDependency":return this.processFailedResponse(s,e.ourRequestId);case"authRequired":return{type:"agentAuthRequired",reason:"Agent authentication required.",authUrl:s.authUrl,requestId:e.ourRequestId}}}catch(s){return this.processError(s,e.ourRequestId)}}async processSuccessfulResponse(e,r,n,o){let s=[],c=kye(r.chatCompletions,u=>this.postProcess(u,o));Ge.debug(this.ctx,`Process success response for request ${e.ourRequestId} with chatParams: ${JSON.stringify(e,null,2)}`);let l=0;for await(let u of c)Ge.debug(this.ctx,`Received choice #${l} for request ${e.ourRequestId}: ${JSON.stringify(u,null,2)}`),s.push(u),l++;if(s.length==1){let u=s[0];switch(u.finishReason){case"stop":return{type:"success",value:dn(u.message?.content)??"",toolCalls:u.tool_calls,requestId:n,numTokens:u.numTokens,copilotEditsSessionHeader:u.copilotEditsSessionHeader,thinking:u.thinking,usage:u.usage};case"tool_calls":return{type:"tool_calls",toolCalls:u.tool_calls,requestId:n,copilotEditsSessionHeader:u.copilotEditsSessionHeader,thinking:u.thinking,usage:u.usage};case"content_filter":return{type:"filtered",reason:"Response got filtered.",requestId:n,usage:u.usage};case"length":return{type:"length",reason:"Response too long.",requestId:n,truncatedValue:dn(u.message?.content)??"",usage:u.usage};case"DONE":return{type:"no_finish_reason",reason:"No finish reason received.",requestId:n};default:return{type:"unknown",reason:"Unknown finish reason received.",requestId:n}}}else if(s.length>1){let u=s.filter(d=>d.finishReason=="stop"||d.finishReason=="tool_calls");if(u.length>0)return{type:"successMultiple",value:u.map(d=>dn(d.message.content)),toolCalls:u.map(d=>d.tool_calls).filter(d=>d),requestId:n,copilotEditsSessionHeader:u[0].copilotEditsSessionHeader}}return{type:"no_choices",reason:"Response contained no choices.",requestId:n}}postProcess(e,r){return Y9e(e.tokens)?(r.extendWithRequestId(e.requestId),st(this.ctx,"conversation.repetition.detected",r,0),e.finishReason!==""?e:void 0):e.message?e:void 0}processCanceledResponse(e,r){return Ge.debug(this.ctx,"Cancelled after awaiting fetchConversation"),{type:"canceled",reason:e.reason,requestId:r}}processFailedResponse(e,r){return e?.reason.includes("filtered as off_topic by intent classifier")?{type:"offTopic",reason:e.reason,requestId:r}:e?.reason.includes("model is not supported")?{type:"model_not_supported",reason:e.reason,requestId:r}:e?.reason.includes("model max prompt tokens exceeded")?{type:"model_max_prompt_tokens_exceeded",reason:e.reason,requestId:r}:{type:"failed",reason:e.reason,requestId:r,code:e.type==="failed"?e.code:void 0,retryAfter:e.type==="failed"?e.retryAfter:void 0,ghRequestId:e.type==="failed"?e.ghRequestId:void 0}}processError(e,r){if(Y0(e))return{type:"canceled",reason:"network request aborted",requestId:r};{Ge.exception(this.ctx,e,"Error on conversation request");let n="Error on conversation request. Read more from logs.";if(e instanceof Error){let o=e.message;if(o&&o.trim().length>0){let s=360;o.length<=s?n=`Error on conversation request: ${o}`:n=`Error on conversation request: ${o.substring(0,s)}... Read more from logs.`}}return{type:"failed",reason:n,requestId:r,noRetry:e instanceof mj?!0:void 0}}}sendFetchResponseTelemetry(e,r,n,o,s){let c={responseType:r.type},l={duration:o};e.modelConfiguration&&!e.modelConfiguration?.providerName&&(c.modelId=e.modelConfiguration.modelId,c.modelFamily=e.modelConfiguration.modelFamily),"reason"in r&&r.reason&&(c.reason=r.reason.substring(0,360)),"code"in r&&r.code!==void 0&&(c.statusCode=String(r.code)),r.type==="failed"&&r.noRetry&&(c.isMidStreamError="true"),c.uiKind=e.uiKind,s&&(c.route=s),r.usage&&(l.completionTokens=r.usage.completion_tokens,l.promptTokens=r.usage.prompt_tokens,l.totalTokens=r.usage.total_tokens,r.usage.prompt_tokens_details?.cached_tokens!==void 0&&(l.cachedTokens=r.usage.prompt_tokens_details.cached_tokens)),n.properties.conversationId&&(c.conversationId=n.properties.conversationId),n.properties.messageId&&(c.messageId=n.properties.messageId),n.properties.messageSource&&(c.messageSource=n.properties.messageSource),rr(this.ctx,"chatfetcher.response",c,l)}};f();f();f();f();f();f();f();f();var d0=class{static{a(this,"ConversationInspector")}};f();f();var f0=class{constructor(){this.skills=[]}static{a(this,"ConversationSkillRegistry")}registerSkill(e){if(this.getSkill(e.id))throw new Error(`Skill with id '${e.id}' already registered`);this.skills.push(e)}getSkill(e){return this.skills.find(r=>r.id===e)}getDescriptors(){return[...this.skills]}},Z2t=class{constructor(e,r,n){this.delegate=e;this.stepId=r;this.stepTitle=n}static{a(this,"StepReportingSkillResolver")}async resolveSkill(e){await e.steps.start(this.stepId,this.stepTitle);try{let r=await this.delegate.resolveSkill(e);return r||await e.steps.finish(this.stepId),r}catch(r){throw await e.steps.error(this.stepId,r instanceof Error?r.message:`Error resolving ${this.stepTitle}`),r}}},ePt=class{constructor(e,r){this.delegate=e;this.stepId=r}static{a(this,"StepReportingSkillProcessor")}value(){return this.delegate.value()}async processSkill(e,r){try{let n=await this.delegate.processSkill(e,r);return await r.steps.finish(this.stepId),n}catch(n){throw await r.steps.error(this.stepId,n instanceof Error?n.message:`Error processing ${this.stepId}`),n}}},ch=class{constructor(e,r,n,o,s,c="explicit",l=[],u=()=>!0){this.id=e;this._description=r;this.stepTitle=n;this._resolver=o;this._processor=s;this.type=c;this._examples=l;this._isAvailable=u}static{a(this,"SingleStepReportingSkill")}description(){return this._description}examples(){return this._examples}isAvailable(e){return this._isAvailable(e)}resolver(e){return new Z2t(this._resolver(e),this.id,this.stepTitle)}processor(e){return new ePt(this._processor(e),this.id)}};f();f();var Vre=class extends Error{constructor(r){super(`No instance of ${r.name} has been registered`);this.ctor=r;this.name=`UnregisteredContextErrorFor${r.name}`}static{a(this,"UnregisteredContextError")}},Wre=class{constructor(){this.instances=new Map}static{a(this,"Context")}get(e){let r=this.tryGet(e);if(r)return r;throw new Vre(e)}tryGet(e){let r=this.instances.get(e);if(r)return r}set(e,r){if(this.tryGet(e))throw new Error(`An instance of ${e.name} has already been registered. Use forceSet() if you're sure it's a good idea.`);this.assertIsInstance(e,r),this.instances.set(e,r)}forceSet(e,r){this.assertIsInstance(e,r),this.instances.set(e,r)}assertIsInstance(e,r){if(!(r instanceof e)){let n=JSON.stringify(r);throw new Error(`The instance you're trying to register for ${e.name} is not an instance of it (${n}).`)}}};f();var DVr=new Se("EncodingConfigurationService"),ZP=class{constructor(e){this.ctx=e;this.fileEncodingCache=new Map}static{a(this,"EncodingConfigurationService")}async getEncodingForFile(e){if(this.fileEncodingCache.has(e))return this.fileEncodingCache.get(e);let r=await this.requestEncodingFromClient(e)??"utf8";return this.fileEncodingCache.set(e,r),r}handleConfigurationChange(e){if(e.copilot?.encodingChanges){if(e.copilot.encodingChanges.length>0)for(let r of e.copilot.encodingChanges)this.fileEncodingCache.delete(r),DVr.debug(this.ctx,`Cache invalidated for file: ${r}`)}else this.fileEncodingCache.clear(),DVr.debug(this.ctx,"All encoding cache cleared")}clearCache(){this.fileEncodingCache.clear()}};function Gl(t){switch(t.status){case"valid":return t.document.getText().trim().length===0?"empty":"included";case"invalid":return"blocked";case"notfound":return"notfound"}}a(Gl,"statusFromTextDocumentResult");var In=class{constructor(e){this.ctx=e}static{a(this,"FileReader")}getRelativePath(e){return this.ctx.get(zr).getRelativePath(e)??Zn(e.uri)}getOrReadTextDocument(e){return this.readFile(e.uri)}getOrReadTextDocumentWithFakeClientProperties(e){return this.readFile(e.uri)}async readFile(e){let n=await this.ctx.get(zr).getTextDocumentWithValidation({uri:e});if(n.status!=="notfound")return n;try{let{text:o,fileSizeMB:s}=await this.readFileWithSize(e);if(s>1)return{status:"notfound",message:"File too large"};let c=await E6(this.ctx,{uri:e},o);return c.status==="valid"?{status:"valid",document:Sx.create(e,"UNKNOWN",-1,o)}:c}catch{return{status:"notfound",message:"File not found"}}}async readFileWithSize(e){let r=bl(e);if(zh.isRegisteredScheme(r.scheme))try{let s=this.ctx.get(zh),{text:c,stat:l}=await s.readFile(e);return{text:c,fileSizeMB:l.size/1024/1024}}catch(s){if(!(s instanceof Vre))throw s}let n=await this.ctx.get(Jn).stat(e);return{text:await this.doReadFile(e),fileSizeMB:n.size/1024/1024}}async doReadFile(e){let r="utf8";try{r=await this.ctx.get(ZP).getEncodingForFile(e)}catch(o){if(!(o instanceof Vre))throw o}let n=await this.ctx.get(Jn).readFileString(e,r);return Iqr(n)}};f();function Kye(t){for(var e=[],r=1;rr.status!=="in-progress"&&(r.response===void 0||r.response?.type==="model")),e}a(M$r,"filterConversationTurns");function B2t(t){return M$r(t).getLastTurn()?.id}a(B2t,"getLastTurnId");async function O$r(t){let e=M$r(t.conversation),r=B2t(t.conversation);if(!r)return"Nothing to dump because no request has been sent to the model yet.";let o=t.ctx.get(gh).getDump(r),s=fto(o,e.turns);_r.debug(t.ctx,`conversation.dump +`)),c+=h+n[u+1]}),c}a(Kye,"dedent");var Go=Kye;var tPt=class{constructor(){this.resolvedSkills={};this.resolutions=[]}static{a(this,"SkillDump")}},lh=class{constructor(){this.dump=new $r(25);this.promptsDump=new $r(1)}static{a(this,"ConversationDumper")}addResolvedSkill(e,r,n){let o=this.getDump(e);o.resolvedSkills[r]=n}getResolvedSkill(e,r){return this.getDump(e).resolvedSkills[r]}addResolution(e,r){this.getDump(e).resolutions.push(r)}getDump(e){let r=this.dump.get(e);return r||(r=new tPt,this.dump.set(e,r)),r}addPrompt(e,r,n){let o=this.promptsDump.get(e);o===void 0&&(o=new Map,this.promptsDump.set(e,o)),o.set(n,r)}getLastTurnPrompts(){if(this.promptsDump===void 0)return;let e=this.promptsDump.values().next();if(!e.done)return e.value}};function NVr(t){let e=t.copy();return e.turns=e.turns.filter(r=>r.status!=="in-progress"&&(r.response===void 0||r.response?.type==="model")),e}a(NVr,"filterConversationTurns");function rPt(t){return NVr(t).getLastTurn()?.id}a(rPt,"getLastTurnId");async function MVr(t){let e=NVr(t.conversation),r=rPt(t.conversation);if(!r)return"Nothing to dump because no request has been sent to the model yet.";let o=t.ctx.get(lh).getDump(r),s=pno(o,e.turns);Cr.debug(t.ctx,`conversation.dump `,` -`+s);let c=await pto(o,t.ctx);return Vo` - ${dto(t.conversation,r)} - ${uto(t.ctx)} +`+s);let c=await hno(o,t.ctx);return Go` + ${fno(t.conversation,r)} + ${dno(t.ctx)} The following code can be copied into a chat simulation \`yml\` file. This response has not polluted the conversation history and did not cause any model roundtrip. \`\`\`yaml ${s} \`\`\`${c?` ${c}`:""} - `}a(O$r,"getConversationDump");function uto(t){let e=t.get(Nr);return Vo` + `}a(MVr,"getConversationDump");function dno(t){let e=t.get(Dr);return Go` - IDE: \`${e.getEditorInfo().name} (${e.getEditorInfo().version})\` - Plugin: \`${e.getEditorPluginInfo().version}\` - `}a(uto,"getEditorInfoDumpMessage");function dto(t,e){return Vo` + `}a(dno,"getEditorInfoDumpMessage");function fno(t,e){return Go` Debug information for the last turn of the conversation. - ConversationId: \`${t.id}\` - MessageId: \`${e}\` - `}a(dto,"getInfoDumpMessage");async function B$r(t,e,r){let n=t.ctx.get(A0),o="# Available skills",s=n.getDescriptors().filter(c=>t.ctx.get(ho).getSupportedSkills(t.conversation.id).includes(c.id));if(r&&(s=s.filter(c=>c.id===r)),s.length===0)return`No skill with id ${r} available`;for(let c of s)o+=` + `}a(fno,"getInfoDumpMessage");async function OVr(t,e,r){let n=t.ctx.get(f0),o="# Available skills",s=n.getDescriptors().filter(c=>t.ctx.get(lo).getSupportedSkills(t.conversation.id).includes(c.id));if(r&&(s=s.filter(c=>c.id===r)),s.length===0)return`No skill with id ${r} available`;for(let c of s)o+=` - ${c.id}`;t.turn.request.message&&dn(t.turn.request.message).trim().length>0&&(o+=` **User message**: ${dn(t.turn.request.message)}`);for(let c of s){o+=` -## ${c.id}`,o+=Vo` +## ${c.id}`,o+=Go` \n\n **Description** - ${c.description()}`;let l=n.getSkill(c.id),u=await l?.resolver(t).resolveSkill(t);if(u){o+=Vo` + ${c.description()}`;let l=n.getSkill(c.id),u=await l?.resolver(t).resolveSkill(t);if(u){o+=Go` \n\n **Resolution** \`\`\`yaml - ${wEe(u)} - \`\`\``;let d=await l?.processor(t).processSkill(u,t);if(d){let p=typeof d=="string"?d:d.elide(1e3).getText();o+=Vo` + ${Iye(u)} + \`\`\``;let d=await l?.processor(t).processSkill(u,t);if(d){let p=typeof d=="string"?d:d.elide(1e3).getText();o+=Go` \n\n **Processed value** @@ -2345,30 +2334,30 @@ ${c}`:""} **Unprocessable**`}else o+=` -**Unresolvable**`}return o}a(B$r,"getSkillsDump");function fto(t,e){let r={state:{skills:t.resolvedSkills},turns:e.map((n,o)=>{let s={request:dn(n.request.message)};return n.response&&(s.response=dn(n.response.message)),s})};return wEe(r)}a(fto,"toSimulationFormat");async function pto(t,e){let r=t.resolutions.map(s=>s.files).flat(),n=r.filter((s,c)=>s&&r.indexOf(s)===c),o;for(let s of n)if(s&&s.status==="included"){o||(o=`The following files have been used: -`);let c=await e.get(In).getOrReadTextDocument(s),l;c.status==="valid"&&(l=c.document);let u=l?.getText();_r.debug(e,`conversation.dump.file +**Unresolvable**`}return o}a(OVr,"getSkillsDump");function pno(t,e){let r={state:{skills:t.resolvedSkills},turns:e.map((n,o)=>{let s={request:dn(n.request.message)};return n.response&&(s.response=dn(n.response.message)),s})};return Iye(r)}a(pno,"toSimulationFormat");async function hno(t,e){let r=t.resolutions.map(s=>s.files).flat(),n=r.filter((s,c)=>s&&r.indexOf(s)===c),o;for(let s of n)if(s&&s.status==="included"){o||(o=`The following files have been used: +`);let c=await e.get(In).getOrReadTextDocument(s),l;c.status==="valid"&&(l=c.document);let u=l?.getText();Cr.debug(e,`conversation.dump.file `,u),o+=` **${s.uri}** \`\`\`${l?.detectedLanguageId} ${u} -\`\`\``}return o}a(pto,"fileDump");f();function L2t(t,e){let r=wo(e.tokenizer),n=0;for(let o of t)n+=e.baseTokensPerMessage,o.role&&(n+=r.tokenize(o.role).length),o.name&&(n+=r.tokenize(o.name).length+e.baseTokensPerName),o.content&&(n+=r.tokenize(dn(o.content)).length);return n+=e.baseTokensPerCompletion,n}a(L2t,"countMessagesTokens");f();function L$r(t,e,r,n,o){let s=["You are an AI programming assistant.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.","You can answer general programming questions and perform the following tasks:","* Ask a question about the files in your current workspace","* Explain how the code in your active editor works","* Make changes to existing code","* Review the selected code in your active editor","* Generate unit tests for the selected code","* Propose a fix for the problems in the selected code","* Scaffold code for a new file or project in a workspace","* Create a new Jupyter Notebook","* Ask questions about VS Code","* Generate query parameters for workspace search","* Ask how to do something in the terminal","* Explain what just happened in the terminal"].join(` +\`\`\``}return o}a(hno,"fileDump");f();function nPt(t,e){let r=To(e.tokenizer),n=0;for(let o of t)n+=e.baseTokensPerMessage,o.role&&(n+=r.tokenize(o.role).length),o.name&&(n+=r.tokenize(o.name).length+e.baseTokensPerName),o.content&&(n+=r.tokenize(dn(o.content)).length);return n+=e.baseTokensPerCompletion,n}a(nPt,"countMessagesTokens");f();function BVr(t,e,r,n,o){let s=["You are an AI programming assistant.",'When asked for your name, you must respond with "GitHub Copilot".',"Follow the user's requirements carefully & to the letter.","Follow Microsoft content policies.","Avoid content that violates copyrights.",`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,"Keep your answers short and impersonal.","You can answer general programming questions and perform the following tasks:","* Ask a question about the files in your current workspace","* Explain how the code in your active editor works","* Make changes to existing code","* Review the selected code in your active editor","* Generate unit tests for the selected code","* Propose a fix for the problems in the selected code","* Scaffold code for a new file or project in a workspace","* Create a new Jupyter Notebook","* Ask questions about VS Code","* Generate query parameters for workspace search","* Ask how to do something in the terminal","* Explain what just happened in the terminal"].join(` `),c=["The active document is the source code the user is looking at right now.","You have read access to the code in the active document, files the user has recently worked with and open tabs. You are able to retrieve, read and use this code to answer questions.","You cannot retrieve code that is outside of the current project.","You can only give one reply for each conversation turn."].join(` `),l=e?`The user works in an IDE called ${e} which can be used to edit code, run and debug the user's application as well as executing tests.`:"",u=n?`The user is using ${n} as their operating system.`:"",d=o?`You use the ${o} large language model.`:"",p=r?`The user is logged in as ${r} on GitHub.`:"";return[s,u,d,p,l,c].filter(h=>h&&h!="").join(` -`)}a(L$r,"chatBasePrompt");f();f();f();f();f();function CF(t,e){if(t.length==0)return new nr([]);let r=t.map((n,o)=>{let s;switch(e){case"linear":s=1-o/t.length;break;case"inverseLinear":s=(o+1)/t.length;break;case"positional":s=1/(o+1);break;case"inversePositional":s=1/(t.length-o);break}return Array.isArray(n)&&n.length==2&&(s*=n[1],n=n[0]),[n,s]});return new nr(r)}a(CF,"weighElidableList");f();function F$r(t){let e=t.split(` -`),r=[],n=!1,o=[];for(let s of e)s.startsWith("```")?(n?(r.push([U1(o.join(` -`)),1]),o=[],r.push([new nr([s]),1])):r.push([new nr([s]),1]),n=!n):n?o.push(s):r.push([new nr([s]),.8]);return n&&(r.push([U1(o.join(` -`)),1]),r.push([new nr(["```"]),1])),new nr(r)}a(F$r,"fromMessage");function One(t){let e=U2t(t),r=[];for(let n=0;n{let s;switch(e){case"linear":s=1-o/t.length;break;case"inverseLinear":s=(o+1)/t.length;break;case"positional":s=1/(o+1);break;case"inversePositional":s=1/(t.length-o);break}return Array.isArray(n)&&n.length==2&&(s*=n[1],n=n[0]),[n,s]});return new nr(r)}a(W6,"weighElidableList");f();function LVr(t){let e=t.split(` +`),r=[],n=!1,o=[];for(let s of e)s.startsWith("```")?(n?(r.push([I1(o.join(` +`)),1]),o=[],r.push([new nr([s]),1])):r.push([new nr([s]),1]),n=!n):n?o.push(s):r.push([new nr([s]),.8]);return n&&(r.push([I1(o.join(` +`)),1]),r.push([new nr(["```"]),1])),new nr(r)}a(LVr,"fromMessage");function zre(t){let e=oPt(t),r=[];for(let n=0;n1&&n!==e.length-1?` -`:"")),r.push(F$r(l))}return r.length>0?new nr([[new nr(["Consider the following conversation history:"]),1],[CF(r,"inverseLinear"),1]]):null}a(One,"fromHistory");var hto=5;function U2t(t,e){return t.filter(n=>(n.status==="success"||n.status==="in-progress")&&dn(n.request.message)!=""&&n.agent?.agentSlug===e).reverse().slice(0,hto).reverse()}a(U2t,"filterTurns");function U$r(t,e=0){let r;switch(t.type){case"user":case"template":r="User";break;case"model":r="GitHub Copilot";break;default:r=t.type}let n=dn(t.message).startsWith("```")?` -`:" ";return`${e>0?`${e}) `:""}${r}:${n}${dn(t.message)}`}a(U$r,"formatTurnMessage");f();f();f();var mto=4,Q2t={skillIds:[]},G7e=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"MetaPromptFetcher")}async fetchPromptContext(e,r,n,o,s){let c=e.conversation.getLastTurn().request.message;if(r.length>0){let l=await $o.getModelConfiguration(e.ctx,"meta",void 0,{tool_calls:!0}),u={promptType:"meta",supportedSkillDescriptors:r,modelConfiguration:l},d=await this.ctx.get(vm).toPrompt(e,u),p=o.extendedBy({messageSource:"chat.metaprompt"},{promptTokenLen:d.tokens}),h={modelConfiguration:l,messages:d.messages,uiKind:s,llmInteraction:e.toLlmInteraction()};if(d.toolConfig===void 0)throw new Error("No tool call configuration found in meta prompt.");h.tool_choice=d.toolConfig.tool_choice,h.tools=d.toolConfig.tools;let m=await this.chatFetcher.fetchResponse(h,n,p);return m.type!=="success"&&(Ge.error(this.ctx,"Failed to fetch prompt context, trying again..."),m=await this.chatFetcher.fetchResponse(h,n,p)),await e.ctx.get(g0).inspectFetchResult(m),this.handleResult(m,p,dn(c),s,d.toolConfig)}else return Q2t}handleResult(e,r,n,o,s){if(e.type!=="success")return this.telemetryError(r,e),Q2t;let l;if(e.toolCalls&&e.toolCalls.length>0)l=s.extractArguments(e.toolCalls[0]).skillIds?.slice(0,mto);else return Ge.error(this.ctx,"Missing tool call in meta prompt response"),Q2t;let u=r.extendedBy({uiKind:o,skillIds:l?.join(",")??""},{numTokens:e.numTokens+e.toolCalls[0].approxNumTokens}),d=u.extendedBy({messageText:n});return at(this.ctx,`${jg(o)}.metaPrompt`,u,0),at(this.ctx,`${jg(o)}.promptContext`,d,1),{skillIds:l??[]}}telemetryError(e,r){let n=e.extendedBy({resultType:r.type,reason:r.reason??""});at(this.ctx,"conversation.promptContextError",n,1)}};f();f();var fk=class{constructor(e,r,n){this.doc=e;this.selection=r;this.visibleRange=n}static{a(this,"ElidableDocument")}fromSelectedCode(e){let r=this.getExpandedSelection(),n=r;if(e.trimNewLines){let s=this.doc.getText(r),c=s.match(/^\n*/)?.[0].length??0,l=s.match(/\n*$/)?.[0].length??0;n={start:this.getLineStart(r.start.line+c),end:this.expandLineToEnd(r.end.line-l)}}let o=new nr([Vo(this.doc.getText(n)).trim()]);return[this.wrapInTicks(o),n]}fromAllCode(e){let r=this.getDocumentRange(),n=this.getExpandedSelection(),o;!this.visibleRange||!this.rangeContainedIn(this.visibleRange,n)?o=n:o={start:this.getLineStart(this.visibleRange.start.line),end:this.expandLineToEnd(this.visibleRange.end.line)};let s={start:r.start,end:o.start.line>0?this.expandLineToEnd(o.start.line-1):r.start},c={start:o.start,end:n.start.line>0&&n.start.line>o.start.line?this.expandLineToEnd(n.start.line-1):o.start},l={start:n.end.line!Bne(h)||m===1).map(([h,m])=>{let g;return e.addLineNumbers?g=this.addLineNumbers(h):g=this.doc.getText(h),[m==1?g:U1(g),m]}));return this.wrapInTicks(p)}selectionIsDocument(){return this.rangeEquals(this.getExpandedSelection(),this.getDocumentRange())}selectionIsEmpty(){return this.selection==null||Bne(this.selection)}getExpandedSelection(){return this.selection!==void 0?{start:this.getLineStart(this.selection.start.line),end:this.expandLineToEnd(this.selection.end.line)}:this.getDocumentRange()}getDocumentRange(){return{start:this.getLineStart(0),end:this.expandLineToEnd(this.doc.lineCount-1)}}getLineStart(e){return{line:e,character:0}}expandLineToEnd(e){return e>this.doc.lineCount-1&&(e=this.doc.lineCount-1),{line:e,character:this.doc.lineAt({line:e,character:0}).text.length}}rangeContainedIn(e,r){return e.start.line<=r.start.line&&e.end.line>=r.end.line}rangeEquals(e,r){return e.start.line==r.start.line&&e.end.line==r.end.line}wrapInTicks(e,r){return new nr([["```"+this.doc.detectedLanguageId,1],[e,r??1],["```",1]])}addLineNumbers(e){let r=this.doc.getText(e).split(` +`:"")),r.push(LVr(l))}return r.length>0?new nr([[new nr(["Consider the following conversation history:"]),1],[W6(r,"inverseLinear"),1]]):null}a(zre,"fromHistory");var mno=5;function oPt(t,e){return t.filter(n=>(n.status==="success"||n.status==="in-progress")&&dn(n.request.message)!=""&&n.agent?.agentSlug===e).reverse().slice(0,mno).reverse()}a(oPt,"filterTurns");function FVr(t,e=0){let r;switch(t.type){case"user":case"template":r="User";break;case"model":r="GitHub Copilot";break;default:r=t.type}let n=dn(t.message).startsWith("```")?` +`:" ";return`${e>0?`${e}) `:""}${r}:${n}${dn(t.message)}`}a(FVr,"formatTurnMessage");f();f();f();var gno=4,sPt={skillIds:[]},K9e=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"MetaPromptFetcher")}async fetchPromptContext(e,r,n,o,s){let c=e.conversation.getLastTurn().request.message;if(r.length>0){let l=await qo.getModelConfiguration(e.ctx,"meta",void 0,{tool_calls:!0}),u={promptType:"meta",supportedSkillDescriptors:r,modelConfiguration:l},d=await this.ctx.get(fm).toPrompt(e,u),p=o.extendedBy({messageSource:"chat.metaprompt"},{promptTokenLen:d.tokens}),h={modelConfiguration:l,messages:d.messages,uiKind:s,llmInteraction:e.toLlmInteraction()};if(d.toolConfig===void 0)throw new Error("No tool call configuration found in meta prompt.");h.tool_choice=d.toolConfig.tool_choice,h.tools=d.toolConfig.tools;let m=await this.chatFetcher.fetchResponse(h,n,p);return m.type!=="success"&&(Ge.error(this.ctx,"Failed to fetch prompt context, trying again..."),m=await this.chatFetcher.fetchResponse(h,n,p)),await e.ctx.get(d0).inspectFetchResult(m),this.handleResult(m,p,dn(c),s,d.toolConfig)}else return sPt}handleResult(e,r,n,o,s){if(e.type!=="success")return this.telemetryError(r,e),sPt;let l;if(e.toolCalls&&e.toolCalls.length>0)l=s.extractArguments(e.toolCalls[0]).skillIds?.slice(0,gno);else return Ge.error(this.ctx,"Missing tool call in meta prompt response"),sPt;let u=r.extendedBy({uiKind:o,skillIds:l?.join(",")??""},{numTokens:e.numTokens+e.toolCalls[0].approxNumTokens}),d=u.extendedBy({messageText:n});return st(this.ctx,`${Bg(o)}.metaPrompt`,u,0),st(this.ctx,`${Bg(o)}.promptContext`,d,1),{skillIds:l??[]}}telemetryError(e,r){let n=e.extendedBy({resultType:r.type,reason:r.reason??""});st(this.ctx,"conversation.promptContextError",n,1)}};f();f();var ek=class{constructor(e,r,n){this.doc=e;this.selection=r;this.visibleRange=n}static{a(this,"ElidableDocument")}fromSelectedCode(e){let r=this.getExpandedSelection(),n=r;if(e.trimNewLines){let s=this.doc.getText(r),c=s.match(/^\n*/)?.[0].length??0,l=s.match(/\n*$/)?.[0].length??0;n={start:this.getLineStart(r.start.line+c),end:this.expandLineToEnd(r.end.line-l)}}let o=new nr([Go(this.doc.getText(n)).trim()]);return[this.wrapInTicks(o),n]}fromAllCode(e){let r=this.getDocumentRange(),n=this.getExpandedSelection(),o;!this.visibleRange||!this.rangeContainedIn(this.visibleRange,n)?o=n:o={start:this.getLineStart(this.visibleRange.start.line),end:this.expandLineToEnd(this.visibleRange.end.line)};let s={start:r.start,end:o.start.line>0?this.expandLineToEnd(o.start.line-1):r.start},c={start:o.start,end:n.start.line>0&&n.start.line>o.start.line?this.expandLineToEnd(n.start.line-1):o.start},l={start:n.end.line!Yre(h)||m===1).map(([h,m])=>{let g;return e.addLineNumbers?g=this.addLineNumbers(h):g=this.doc.getText(h),[m==1?g:I1(g),m]}));return this.wrapInTicks(p)}selectionIsDocument(){return this.rangeEquals(this.getExpandedSelection(),this.getDocumentRange())}selectionIsEmpty(){return this.selection==null||Yre(this.selection)}getExpandedSelection(){return this.selection!==void 0?{start:this.getLineStart(this.selection.start.line),end:this.expandLineToEnd(this.selection.end.line)}:this.getDocumentRange()}getDocumentRange(){return{start:this.getLineStart(0),end:this.expandLineToEnd(this.doc.lineCount-1)}}getLineStart(e){return{line:e,character:0}}expandLineToEnd(e){return e>this.doc.lineCount-1&&(e=this.doc.lineCount-1),{line:e,character:this.doc.lineAt({line:e,character:0}).text.length}}rangeContainedIn(e,r){return e.start.line<=r.start.line&&e.end.line>=r.end.line}rangeEquals(e,r){return e.start.line==r.start.line&&e.end.line==r.end.line}wrapInTicks(e,r){return new nr([["```"+this.doc.detectedLanguageId,1],[e,r??1],["```",1]])}addLineNumbers(e){let r=this.doc.getText(e).split(` `),n=this.doc.lineCount.toString().length;return r.map((s,c)=>`${(e.start.line+c+1).toString().padEnd(n," ")}:${s}`).join(` -`)}};function Bne(t){return t.start.line==t.end.line&&t.start.character==t.end.character}a(Bne,"isEmptyRange");f();f();var Q$r=de(Nn()),q$r=S.Object({accessToken:S.Optional(S.String({minLength:1})),handle:S.Optional(S.String({minLength:1})),login:S.Optional(S.String({minLength:1})),githubAppId:S.Optional(S.String({minLength:1})),apiUrl:S.Optional(S.String({})),serverUrl:S.Optional(S.String({})),tokenEndpoint:S.Optional(S.String({}))}),q2t;(r=>(r.method="github/didChangeAuth",r.type=new Q$r.ProtocolNotificationType(r.method)))(q2t||={});f();var G$r=de(Nn()),G2t;(r=>(r.method="copilot/ipCodeCitation",r.type=new G$r.NotificationType(r.method)))(G2t||={});f();var H$r=de(Nn()),H7e;(r=>(r.method="context/update",r.type=new H$r.ProtocolRequestType(r.method)))(H7e||={});f();f();f();var _n=de(Nn()),ZEe=S.String(),sC=S.Object({uri:ZEe}),u$=S.Intersect([sC,S.Object({version:S.Optional(S.Integer())})]),bMl=S.Required(u$),Ah=S.Object({line:S.Integer({minimum:0}),character:S.Integer({minimum:0})}),bf=S.Object({start:Ah,end:Ah}),H2t=S.Union([S.Integer(),S.String()]),TMl=S.Object({isCancellationRequested:S.Boolean(),onCancellationRequested:S.Any()});f();var j$r=de(Nn()),j2t;(r=>(r.method="textDocument/didFocus",r.type=new j$r.ProtocolNotificationType(r.method)))(j2t||={});f();var gto=S.Object({didChangeFeatureFlags:S.Boolean(),fetch:S.Boolean(),ipCodeCitation:S.Boolean(),redirectedTelemetry:S.Boolean(),related:S.Boolean(),token:S.Boolean(),watchedFiles:S.Boolean(),showPanelMessage:S.Boolean(),mcpElicitation:S.Boolean(),mcpSampling:S.Boolean(),mcpAllowlist:S.Boolean(),stateDatabase:S.Boolean(),subAgent:S.Boolean(),mcpServerManagement:S.Boolean(),cveRemediatorAgent:S.Boolean(),debuggerAgent:S.Boolean(),contentProvider:S.Array(S.String()),manageTodoListTool:S.Boolean()}),Ato=S.Object({name:S.String(),version:S.String(),readableName:S.Optional(S.String())}),$$r=S.Object({name:S.String(),version:S.Optional(S.String()),readableName:S.Optional(S.String())}),V$r=S.Object({editorInfo:S.Optional($$r),editorPluginInfo:S.Optional($$r),relatedPluginInfo:S.Optional(S.Array(Ato)),copilotIntegrationId:S.Optional(S.String()),copilotCapabilities:S.Optional(S.Partial(gto)),githubAppId:S.Optional(S.String()),sessionId:S.Optional(S.String())});f();var eCe=de(Nn());var $2t=(r=>(r[r.Invoked=1]="Invoked",r[r.Automatic=2]="Automatic",r))($2t||{}),yto=S.Enum($2t),Eto=S.Object({triggerKind:yto,selectedCompletionInfo:S.Optional(S.Object({text:S.String(),range:bf,tooltipSignature:S.Optional(S.String())}))}),W$r=S.Object({textDocument:u$,position:Ah,formattingOptions:S.Optional(S.Object({tabSize:S.Optional(S.Union([S.Integer({minimum:1}),S.String()])),insertSpaces:S.Optional(S.Union([S.Boolean(),S.String()]))})),context:Eto,data:S.Optional(S.Unknown())}),V2t;(r=>(r.method="textDocument/inlineCompletion",r.type=new eCe.ProtocolRequestType(r.method)))(V2t||={});var z$r=S.Object({command:S.Object({arguments:S.Tuple([S.String({minLength:1})])})}),Y$r=S.Object({item:z$r}),W2t;(r=>(r.method="textDocument/didShowCompletion",r.type=new eCe.ProtocolNotificationType(r.method)))(W2t||={});var K$r=S.Object({item:z$r,acceptedLength:S.Integer({minimum:1})}),z2t;(r=>(r.method="textDocument/didPartiallyAcceptCompletion",r.type=new eCe.ProtocolNotificationType(r.method)))(z2t||={});f();var J$r=de(Nn()),Cto;(r=>(r.method="textDocument/inlineCompletionPrompt",r.type=new J$r.ProtocolRequestType(r.method)))(Cto||={});f();var X$r=de(Nn()),Z$r=S.Object({textDocument:u$,position:Ah}),_to=S.Object({command:S.Object({arguments:S.Tuple([S.String({minLength:1})])})}),eVr=S.Object({item:_to}),Y2t;(r=>(r.method="textDocument/didShowInlineEdit",r.type=new X$r.ProtocolNotificationType(r.method)))(Y2t||={});f();var j7e=de(Nn());var tVr=S.Object({textDocument:u$,position:Ah,partialResultToken:S.Optional(H2t),workDoneToken:S.Optional(H2t)}),$7e;(n=>(n.method="textDocument/copilotPanelCompletion",n.type=new j7e.ProtocolRequestType(n.method),n.partialResult=new j7e.ProgressType))($7e||={});f();var rVr=de(Nn()),K2t;(r=>(r.method="copilot/related",r.type=new rVr.ProtocolRequestType(r.method)))(K2t||={});f();var nVr=de(Nn()),J2t;(r=>(r.method="statusNotification",r.type=new nVr.ProtocolNotificationType(r.method)))(J2t||={});var iVr=de(require("path"));var oVr=S.Object({uri:S.String(),visibleRange:S.Optional(bf),selection:S.Optional(bf)}),X2t=class{constructor(e){this.turnContext=e}static{a(this,"CurrentEditorSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument(e),o=Kl(n);if(await this.turnContext.collectFile(Vg,e.uri,o),n.status==="valid"){let s=this.turnContext.conversation.source==="inline",c=new fk(n.document,e.selection,e.visibleRange),l=r.getRelativePath(n.document);if(o==="empty")return new nr([`The currently open file \`${l}\` is empty.`]);let u=[[`Code excerpt from the currently open file \`${l}\`:`,1],[c.fromAllCode({addLineNumbers:s}),1]],d=[];if(c.selectionIsDocument())d=[["The user is selecting the entire file.",1]];else if(s){let[p,h]=c.fromSelectedCode({trimNewLines:!0}),m=h.start.line+1;if(Bne(h))d=[[`The user is selecting line ${m}, which is empty.`,1]];else{let g=h.end.line+1;d=[["The user is selecting"+(m==g?` line ${m}:`:` lines ${m} to ${g} (inclusive):`),1],[p,1]]}}else c.selectionIsEmpty()||(d=[["The user is selecting this code:",1],[c.fromSelectedCode({trimNewLines:!1})[0],1]]);return new nr([...u,...d])}else if(n.status==="invalid")return new nr([`The currently open file \`${iVr.basename(e.uri)}\` is content excluded.`])}},Vg="current-editor",V7e=class{constructor(e){this._resolver=e;this.id=Vg;this.type="explicit"}static{a(this,"CurrentEditorSkill")}description(){return"The code from the user's currently open file"}resolver(){return this._resolver}processor(e){return new X2t(e)}};f();var sVr=S.Object({labels:S.Array(S.String())}),Z2t=class{constructor(e){this.turnContext=e}static{a(this,"ProjectLabelsSkillProcessor")}value(){return 1}processSkill(e){let r=[];return r.push([new nr(["The developer is working on a project with the following characteristics (languages, frameworks):"]),1]),e.labels.forEach(n=>{r.push([new nr([`- ${n}`]),.9]),this.turnContext.collectLabel(tw,n)}),new nr(r)}},tw="project-labels",W7e=class{constructor(e){this._resolver=e;this.id=tw;this.type="explicit"}static{a(this,"ProjectLabelsSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(e){return new Z2t(e)}};f();f();f();var z7e=class{constructor(){this.languageId=["java","kotlin","scala","groovy"]}static{a(this,"JavaProjectMetadataLookup")}determineBuildTools(e){return[...e.buildTools]}determineApplicationFrameworks(e){let r=[];return he(e,r,"org.springframework.boot","Spring Boot"),he(e,r,"jakarta.jakartaee-api","Jakarta EE"),he(e,r,"javax:javaee-api","Java EE"),he(e,r,"org.apache.struts:struts2-core","Apache Struts"),he(e,r,"org.hibernate:hibernate-core","Hibernate"),he(e,r,"org.apache.wicket:wicket-core","Apache Wicket"),he(e,r,"javax.faces:jsf-api","JSF"),he(e,r,"org.grails:grails-core","Grails"),r}determineCoreLibraries(e){let r=[];return he(e,r,"com.google.guava","Google Guava"),he(e,r,"org.apache.commons:commons-lang3","Apache Commons Lang"),he(e,r,"org.apache.commons:commons-io","Apache Commons IO"),he(e,r,"joda-time:joda-time","Joda-Time"),he(e,r,"com.google.code.gson:gson","Google Gson"),he(e,r,"org.apache.commons:commons-math3","Apache Commons Math"),he(e,r,"org.apache.commons:commons-collections4","Apache Commons Collections"),he(e,r,"org.apache.commons:commons-net","Apache Commons Net"),he(e,r,"org.apache.poi:poi","Apache POI"),he(e,r,"com.fasterxml.jackson.core:jackson-databind","Jackson"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"org.junit.jupiter:junit-jupiter","JUnit"),he(e,r,"junit:junit","JUnit"),he(e,r,"org.testng:testng","TestNG"),he(e,r,"org.spockframework:spock-core","Spock"),he(e,r,"io.cucumber:cucumber-java","Cucumber"),he(e,r,"org.jboss.arquillian.junit:arquillian-junit-container","Arquillian"),r}determineTestingLibraries(e){let r=[];return he(e,r,"org.mockito","Mockito"),he(e,r,"org.assertj","AssertJ"),he(e,r,"org.hamcrest","Hamcrest"),he(e,r,"org.powermock","PowerMock"),he(e,r,"org.jmock","JMock"),he(e,r,"org.easymock","EasyMock"),he(e,r,"org.jmockit:jmockit","JMockit"),he(e,r,"com.github.tomakehurst:wiremock","WireMock"),he(e,r,"org.dbunit:dbunit","DBUnit"),he(e,r,"com.icegreen:greenmail","GreenMail"),he(e,r,"net.sourceforge.htmlunit:htmlunit","HtmlUnit"),he(e,r,"org.seleniumhq.selenium:selenium-java","Selenium"),he(e,r,"io.rest-assured:rest-assured","Rest-Assured"),he(e,r,"io.gatling.highcharts:gatling-charts-highcharts","Gatling"),he(e,r,"org.apache.jmeter:ApacheJMeter","JMeter"),r}},Y7e=class{constructor(){this.languageId=["javascript","javascriptreact","typescript","typescriptreact","vue"]}static{a(this,"JavaScriptProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"@types/node","Node.js"),he(e,r,"react-native","React Native"),r.find(n=>n.name==="React Native")||he(e,r,"react","React"),he(e,r,"angular","Angular"),he(e,r,"vue","Vue.js"),he(e,r,"ember","Ember.js"),he(e,r,"backbone","Backbone.js"),he(e,r,"meteor","Meteor"),he(e,r,"polymer","Polymer"),he(e,r,"aurelia","Aurelia"),he(e,r,"knockout","Knockout.js"),he(e,r,"dojo","Dojo Toolkit"),he(e,r,"mithril","Mithril.js"),he(e,r,"marionette","Marionette.js"),he(e,r,"marko","Marko.js"),he(e,r,"svelte","Svelte"),he(e,r,"hyperapp","Hyperapp"),he(e,r,"inferno","Inferno.js"),he(e,r,"preact","Preact"),he(e,r,"riot","Riot.js"),he(e,r,"moon","Moon.js"),he(e,r,"stencil","Stencil.js"),r}determineCoreLibraries(e){let r=[];return he(e,r,"lodash","Lodash"),he(e,r,"moment","Moment.js"),he(e,r,"axios","Axios"),he(e,r,"redux","Redux"),he(e,r,"recoil","Recoil"),he(e,r,"jquery","jQuery"),he(e,r,"d3","D3.js"),he(e,r,"underscore","Underscore.js"),he(e,r,"ramda","Ramda"),he(e,r,"immutable","Immutable.js"),he(e,r,"rxjs","RxJS"),he(e,r,"three","Three.js"),he(e,r,"socket.io","Socket.IO"),he(e,r,"express","Express.js"),he(e,r,"next","Next.js"),he(e,r,"puppeteer","Puppeteer"),he(e,r,"cheerio","Cheerio"),he(e,r,"nodemailer","Nodemailer"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"jest","Jest"),he(e,r,"mocha","Mocha"),he(e,r,"jasmine","Jasmine"),he(e,r,"ava","AVA"),he(e,r,"qunit","QUnit"),he(e,r,"tape","Tape"),r}determineTestingLibraries(e){let r=[];return he(e,r,"chai","Chai"),he(e,r,"sinon","Sinon"),he(e,r,"enzyme","Enzyme"),he(e,r,"protractor","Protractor"),he(e,r,"supertest","Supertest"),he(e,r,"nock","Nock"),he(e,r,"cypress","Cypress"),he(e,r,"@testing-library/react","React Testing Library"),r}},K7e=class{constructor(){this.languageId="go"}static{a(this,"GoProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"github.com/gorilla/mux","Gorilla Mux"),he(e,r,"github.com/go-chi/chi","Chi"),he(e,r,"github.com/gin-gonic/gin","Gin"),he(e,r,"github.com/labstack/echo","Echo"),he(e,r,"github.com/revel/revel","Revel"),he(e,r,"github.com/astaxie/beego","Beego"),he(e,r,"github.com/go-martini/martini","Martini"),he(e,r,"github.com/gobuffalo/buffalo","Buffalo"),he(e,r,"github.com/goji/goji","Goji"),he(e,r,"github.com/hoisie/web","Web.go"),r}determineCoreLibraries(e){let r=[];return he(e,r,"net/http","net/http"),he(e,r,"fmt","fmt"),he(e,r,"io","io"),he(e,r,"time","time"),he(e,r,"math","math"),he(e,r,"strconv","strconv"),he(e,r,"strings","strings"),he(e,r,"sort","sort"),he(e,r,"encoding/json","encoding/json"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"github.com/onsi/ginkgo","ginkgo"),he(e,r,"github.com/onsi/gomega","gomega"),he(e,r,"github.com/stretchr/testify","testify"),he(e,r,"gopkg.in/check.v1","gocheck"),he(e,r,"github.com/franela/goblin","goblin"),he(e,r,"github.com/DATA-DOG/godog","godog"),he(e,r,"github.com/stesla/gospec","gospec"),he(e,r,"github.com/rjeczalik/gotest","gotest"),he(e,r,"github.com/smartystreets/goconvey","goconvey"),r}determineTestingLibraries(e){let r=[];return he(e,r,"github.com/stretchr/testify","Testify"),he(e,r,"github.com/smartystreets/goconvey","GoConvey"),he(e,r,"github.com/onsi/ginkgo","Ginkgo"),he(e,r,"github.com/golang/mock","GoMock"),he(e,r,"gopkg.in/check.v1","GoCheck"),he(e,r,"github.com/franela/goblin","Goblin"),he(e,r,"github.com/DATA-DOG/godog","GoDog"),he(e,r,"github.com/onsi/gomega","Gomega"),he(e,r,"github.com/stesla/gospec","GoSpec"),he(e,r,"github.com/rjeczalik/gotest","GoTest"),r}},J7e=class{constructor(){this.languageId=["python","jupyter"]}static{a(this,"PythonProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"flask","Flask"),he(e,r,"django","Django"),he(e,r,"pyramid","Pyramid"),he(e,r,"tornado","Tornado"),he(e,r,"fastapi","FastAPI"),r}determineCoreLibraries(e){let r=[];return he(e,r,"requests","requests"),he(e,r,"numpy","numpy"),he(e,r,"pandas","pandas"),he(e,r,"scipy","scipy"),he(e,r,"matplotlib","matplotlib"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"pytest","Pytest"),he(e,r,"unittest","Unittest"),he(e,r,"doctest","Doctest"),he(e,r,"nose","Nose"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mock","Mock"),he(e,r,"hypothesis","Hypothesis"),he(e,r,"behave","Behave"),he(e,r,"lettuce","Lettuce"),he(e,r,"testify","Testify"),he(e,r,"pyhamcrest","PyHamcrest"),r}},X7e=class{constructor(){this.languageId=["php","blade"]}static{a(this,"PhpProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"laravel/framework","Laravel"),he(e,r,"symfony/symfony","Symfony"),he(e,r,"slim/slim","Slim"),he(e,r,"cakephp/cakephp","CakePHP"),he(e,r,"yiisoft/yii2","Yii"),he(e,r,"zendframework/zendframework","Zend Framework"),he(e,r,"phalcon/cphalcon","Phalcon"),he(e,r,"bcosca/fatfree","Fat-Free"),he(e,r,"fuel/fuel","FuelPHP"),he(e,r,"phpixie/framework","PHPixie"),r}determineCoreLibraries(e){let r=[];return he(e,r,"monolog/monolog","Monolog"),he(e,r,"vlucas/phpdotenv","PHP dotenv"),he(e,r,"symfony/console","Symfony Console"),he(e,r,"guzzlehttp/guzzle","GuzzleHttp"),he(e,r,"ramsey/uuid","Ramsey UUID"),he(e,r,"doctrine/orm","Doctrine ORM"),he(e,r,"php-di/php-di","PHP-DI"),he(e,r,"phpunit/php-timer","PHPUnit Timer"),he(e,r,"symfony/finder","Symfony Finder"),he(e,r,"symfony/yaml","Symfony Yaml"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"phpunit/phpunit","PHPUnit"),he(e,r,"behat/behat","Behat"),he(e,r,"phpspec/phpspec","PHPSpec"),he(e,r,"codeception/codeception","Codeception"),he(e,r,"atoum/atoum","Atoum"),he(e,r,"pestphp/pest","PestPHP"),he(e,r,"kahlan/kahlan","Kahlan"),he(e,r,"peridot-php/peridot","Peridot"),he(e,r,"phake/phake","Phake"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockery/mockery","Mockery"),he(e,r,"php-mock/php-mock","PHP-Mock"),he(e,r,"php-mock/php-mock-phpunit","PHP-Mock PHPUnit"),he(e,r,"padraic/mockery","Padraic Mockery"),he(e,r,"phpspec/prophecy","PHPSpec Prophecy"),he(e,r,"phpunit/php-invoker","PHPUnit Invoker"),he(e,r,"phpunit/php-token-stream","PHPUnit Token Stream"),he(e,r,"phpunit/php-code-coverage","PHPUnit Code Coverage"),he(e,r,"phpunit/php-timer","PHPUnit Timer"),he(e,r,"phpunit/php-text-template","PHPUnit Text Template"),r}},Z7e=class{constructor(){this.languageId="csharp"}static{a(this,"CSharpProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"Microsoft.NETCore.App",".NET Core"),he(e,r,"Microsoft.AspNetCore.App","ASP.NET Core"),r}determineCoreLibraries(e){let r=[];return he(e,r,"EntityFramework","Entity Framework"),he(e,r,"Newtonsoft.Json","Newtonsoft.Json"),he(e,r,"AutoMapper","AutoMapper"),he(e,r,"Serilog","Serilog"),he(e,r,"Dapper","Dapper"),he(e,r,"Polly","Polly"),he(e,r,"FluentValidation","FluentValidation"),he(e,r,"MediatR","MediatR"),he(e,r,"Hangfire","Hangfire"),he(e,r,"RabbitMQ.Client","RabbitMQ.Client"),he(e,r,"MassTransit","MassTransit"),he(e,r,"Microsoft.Extensions.Logging","Microsoft.Extensions.Logging"),he(e,r,"Microsoft.Extensions.DependencyInjection","Microsoft.Extensions.DependencyInjection"),he(e,r,"Microsoft.Extensions.Configuration","Microsoft.Extensions.Configuration"),he(e,r,"Microsoft.Extensions.Http","Microsoft.Extensions.Http"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"xunit","xUnit"),he(e,r,"NUnit","NUnit"),he(e,r,"SpecFlow","SpecFlow"),r}determineTestingLibraries(e){let r=[];return he(e,r,"Moq","Moq"),he(e,r,"FluentAssertions","FluentAssertions"),he(e,r,"Bogus","Bogus"),he(e,r,"RestSharp","RestSharp"),he(e,r,"Swashbuckle.AspNetCore","Swashbuckle.AspNetCore"),r}},eUe=class{constructor(){this.languageId="dart"}static{a(this,"DartProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"flutter","Flutter"),he(e,r,"angular","AngularDart"),r}determineCoreLibraries(e){let r=[];return he(e,r,"dartx","dartx"),he(e,r,"provider","Provider"),he(e,r,"rxdart","RxDart"),he(e,r,"dio","Dio"),he(e,r,"json_serializable","json_serializable"),he(e,r,"freezed","Freezed"),he(e,r,"moor","Moor"),he(e,r,"hive","Hive"),he(e,r,"http","http"),he(e,r,"path","path"),he(e,r,"intl","intl"),he(e,r,"equatable","equatable"),he(e,r,"get_it","get_it"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"test","test"),he(e,r,"flutter_test","flutter_test"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockito","mockito"),he(e,r,"bloc_test","bloc_test"),r}},tUe=class{constructor(){this.languageId="ruby"}static{a(this,"RubyProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"rails","Rails"),he(e,r,"sinatra","Sinatra"),he(e,r,"hanami","Hanami"),he(e,r,"grape","Grape"),he(e,r,"roda","Roda"),he(e,r,"padrino","Padrino"),he(e,r,"cuba","Cuba"),he(e,r,"ramaze","Ramaze"),he(e,r,"nyara","Nyara"),he(e,r,"rack","Rack"),r}determineCoreLibraries(e){let r=[];return he(e,r,"active_record","ActiveRecord"),he(e,r,"sequel","Sequel"),he(e,r,"rom","ROM"),he(e,r,"datamapper","DataMapper"),he(e,r,"mongoid","Mongoid"),he(e,r,"neo4j","Neo4j"),he(e,r,"redis","Redis"),he(e,r,"cassandra","Cassandra"),he(e,r,"couchrest","CouchRest"),he(e,r,"riak","Riak"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"rspec","RSpec"),he(e,r,"minitest","Minitest"),he(e,r,"cucumber","Cucumber"),he(e,r,"spinach","Spinach"),he(e,r,"turnip","Turnip"),he(e,r,"bacon","Bacon"),he(e,r,"shoulda","Shoulda"),he(e,r,"test-unit","Test::Unit"),he(e,r,"wrong","Wrong"),he(e,r,"contest","Contest"),r}determineTestingLibraries(e){let r=[];return he(e,r,"factory_bot","FactoryBot"),he(e,r,"faker","Faker"),he(e,r,"ffaker","FFaker"),he(e,r,"fabrication","Fabrication"),he(e,r,"machinist","Machinist"),he(e,r,"mocha","Mocha"),he(e,r,"flexmock","FlexMock"),he(e,r,"rr","RR"),he(e,r,"bourne","Bourne"),he(e,r,"not_a_mock","NotAMock"),r}},rUe=class{constructor(){this.languageId="rust"}static{a(this,"RustProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"tokio","tokio"),he(e,r,"async-std","async-std"),he(e,r,"hyper","hyper"),he(e,r,"actix-web","actix-web"),he(e,r,"rocket","rocket"),r}determineCoreLibraries(e){let r=[];return he(e,r,"serde","serde"),he(e,r,"regex","regex"),he(e,r,"rand","rand"),he(e,r,"log","log"),he(e,r,"lazy_static","lazy_static"),he(e,r,"libc","libc"),he(e,r,"futures","futures"),he(e,r,"rayon","rayon"),he(e,r,"reqwest","reqwest"),he(e,r,"warp","warp"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"test-case","test-case"),he(e,r,"proptest","proptest"),he(e,r,"quickcheck","quickcheck"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockall","mockall"),he(e,r,"double","double"),he(e,r,"rstest","rstest"),he(e,r,"mockiato","mockiato"),he(e,r,"mock_derive","mock_derive"),he(e,r,"mocktopus","mocktopus"),he(e,r,"mockers","mockers"),he(e,r,"mock_it","mock_it"),r}},nUe=class{constructor(){this.languageId=["c","cpp"]}static{a(this,"CProjectMetadataLookup")}determineBuildTools(e){return e.buildTools.filter(r=>["gcc","clang","make","cmake","autotools","ninja","meson"].includes(r.name))}determineApplicationFrameworks(e){return e.libraries.filter(r=>["libc","libuv","openssl","zlib","libevent","libcurl"].includes(r.name))}determineCoreLibraries(e){return e.libraries.filter(r=>["libpng","libjpeg","libxml2","sqlite","postgres","mysql"].includes(r.name))}determineTestingFrameworks(e){return e.libraries.filter(r=>["unity","criterion","cmocka","check","ctest","minunit"].includes(r.name))}determineTestingLibraries(e){return e.libraries.filter(r=>["cmock","fff","trompeloeil","fakeit"].includes(r.name))}};function he(t,e,r,n){let o=t.libraries.find(s=>s.name.toLowerCase().indexOf(r.toLowerCase())>-1);o&&e.push({name:n,version:o.version})}a(he,"addFromLibraries");var iUe=class{constructor(e,r){this.languageId=e;this.delegates=r}static{a(this,"CompositeProjectMetadataLookup")}determineBuildTools(e){return this.delegates.map(r=>r.determineBuildTools(e)).flat()}determineApplicationFrameworks(e){return this.delegates.map(r=>r.determineApplicationFrameworks(e)).flat()}determineCoreLibraries(e){return this.delegates.map(r=>r.determineCoreLibraries(e)).flat()}determineTestingFrameworks(e){return this.delegates.map(r=>r.determineTestingFrameworks(e)).flat()}determineTestingLibraries(e){return this.delegates.map(r=>r.determineTestingLibraries(e)).flat()}};function cVr(t){return t.language.version?t.language.name+" "+t.language.version:t.language.name}a(cVr,"determineProgrammingLanguage");var aVr=[new z7e,new Y7e,new K7e,new J7e,new X7e,new Z7e,new eUe,new tUe,new rUe,new nUe];function lVr(t){let e=aVr.find(r=>typeof r.languageId=="string"?r.languageId===t:Array.isArray(r.languageId)?r.languageId.includes(t):!1)??new iUe(t,aVr);return new ePt(e)}a(lVr,"getMetadataLookup");var ePt=class{constructor(e){this.delegate=e;this.languageId=e.languageId}static{a(this,"DistinctProjectMetadataLookup")}determineBuildTools(e){return this.deduplicateDependencies(this.delegate.determineBuildTools(e))}determineApplicationFrameworks(e){return this.deduplicateDependencies(this.delegate.determineApplicationFrameworks(e))}determineCoreLibraries(e){return this.deduplicateDependencies(this.delegate.determineCoreLibraries(e))}determineTestingFrameworks(e){return this.deduplicateDependencies(this.delegate.determineTestingFrameworks(e))}determineTestingLibraries(e){return this.deduplicateDependencies(this.delegate.determineTestingLibraries(e))}deduplicateDependencies(e){let r=[];return e.forEach(n=>{r.find(o=>o.name===n.name)||r.push(n)}),r}};var uVr=S.Object({name:S.String(),version:S.Optional(S.String())}),dVr=S.Object({language:S.Object({id:S.String(),name:S.String(),version:S.Optional(S.String())}),libraries:S.Array(uVr),buildTools:S.Array(uVr)}),tPt=class{constructor(e){this.turnContext=e}static{a(this,"ProjectMetadataSkillProcessor")}value(){return 1}processSkill(e){let r=[];r.push([new nr([`The user is working on a project with the following characteristics: -`]),1]);let n=lVr(e.language.id);return this.addProgrammingLanguage(e,r),this.addBuildTools(e,r,n),this.addApplicationFramework(e,r,n),this.addCoreLibraries(e,r,n),this.addTestingFrameworks(e,r,n),this.addTestingLibraries(e,r,n),new nr(r)}addProgrammingLanguage(e,r){let n=cVr(e);this.turnContext.collectLabel(pk,n),r.push([new nr([`- programming language: ${n}`]),1])}addBuildTools(e,r,n){this.addToPrompt(r,"- build tools:",n.determineBuildTools(e))}addApplicationFramework(e,r,n){this.addToPrompt(r,"- application frameworks:",n.determineApplicationFrameworks(e))}addCoreLibraries(e,r,n){this.addToPrompt(r,"- core libraries:",n.determineCoreLibraries(e))}addTestingFrameworks(e,r,n){this.addToPrompt(r,"- testing frameworks:",n.determineTestingFrameworks(e))}addTestingLibraries(e,r,n){this.addToPrompt(r,"- testing libraries:",n.determineTestingLibraries(e))}addToPrompt(e,r,n){if(n.length>0){n.forEach(s=>{this.turnContext.collectLabel(pk,`${s.name}${s.version?" "+s.version:""}`)});let o=n.map(s=>` - ${s.name}${s.version?" "+s.version:""}`).join(` +`)}};function Yre(t){return t.start.line==t.end.line&&t.start.character==t.end.character}a(Yre,"isEmptyRange");f();f();var UVr=de(Dn()),QVr=S.Object({accessToken:S.Optional(S.String({minLength:1})),handle:S.Optional(S.String({minLength:1})),login:S.Optional(S.String({minLength:1})),githubAppId:S.Optional(S.String({minLength:1})),apiUrl:S.Optional(S.String({})),serverUrl:S.Optional(S.String({})),tokenEndpoint:S.Optional(S.String({}))}),aPt;(r=>(r.method="github/didChangeAuth",r.type=new UVr.ProtocolNotificationType(r.method)))(aPt||={});f();var qVr=de(Dn()),cPt;(r=>(r.method="copilot/ipCodeCitation",r.type=new qVr.NotificationType(r.method)))(cPt||={});f();var GVr=de(Dn()),J9e;(r=>(r.method="context/update",r.type=new GVr.ProtocolRequestType(r.method)))(J9e||={});f();f();f();var Cn=de(Dn()),Jye=S.String(),zE=S.Object({uri:Jye}),Aj=S.Intersect([zE,S.Object({version:S.Optional(S.Integer())})]),OOl=S.Required(Aj),uh=S.Object({line:S.Integer({minimum:0}),character:S.Integer({minimum:0})}),gf=S.Object({start:uh,end:uh}),lPt=S.Union([S.Integer(),S.String()]),BOl=S.Object({isCancellationRequested:S.Boolean(),onCancellationRequested:S.Any()});f();var HVr=de(Dn()),uPt;(r=>(r.method="textDocument/didFocus",r.type=new HVr.ProtocolNotificationType(r.method)))(uPt||={});f();var Ano=S.Object({didChangeFeatureFlags:S.Boolean(),fetch:S.Boolean(),ipCodeCitation:S.Boolean(),redirectedTelemetry:S.Boolean(),related:S.Boolean(),token:S.Boolean(),watchedFiles:S.Boolean(),showPanelMessage:S.Boolean(),mcpElicitation:S.Boolean(),mcpSampling:S.Boolean(),mcpAllowlist:S.Boolean(),stateDatabase:S.Boolean(),subAgent:S.Boolean(),mcpServerManagement:S.Boolean(),cveRemediatorAgent:S.Boolean(),debuggerAgent:S.Boolean(),contentProvider:S.Array(S.String()),manageTodoListTool:S.Boolean()}),yno=S.Object({name:S.String(),version:S.String(),readableName:S.Optional(S.String())}),jVr=S.Object({name:S.String(),version:S.Optional(S.String()),readableName:S.Optional(S.String())}),$Vr=S.Object({editorInfo:S.Optional(jVr),editorPluginInfo:S.Optional(jVr),relatedPluginInfo:S.Optional(S.Array(yno)),copilotIntegrationId:S.Optional(S.String()),copilotCapabilities:S.Optional(S.Partial(Ano)),githubAppId:S.Optional(S.String()),sessionId:S.Optional(S.String())});f();var Xye=de(Dn());var dPt=(r=>(r[r.Invoked=1]="Invoked",r[r.Automatic=2]="Automatic",r))(dPt||{}),Eno=S.Enum(dPt),_no=S.Object({triggerKind:Eno,selectedCompletionInfo:S.Optional(S.Object({text:S.String(),range:gf,tooltipSignature:S.Optional(S.String())}))}),VVr=S.Object({textDocument:Aj,position:uh,formattingOptions:S.Optional(S.Object({tabSize:S.Optional(S.Union([S.Integer({minimum:1}),S.String()])),insertSpaces:S.Optional(S.Union([S.Boolean(),S.String()]))})),context:_no,data:S.Optional(S.Unknown())}),fPt;(r=>(r.method="textDocument/inlineCompletion",r.type=new Xye.ProtocolRequestType(r.method)))(fPt||={});var WVr=S.Object({command:S.Object({arguments:S.Tuple([S.String({minLength:1})])})}),zVr=S.Object({item:WVr}),pPt;(r=>(r.method="textDocument/didShowCompletion",r.type=new Xye.ProtocolNotificationType(r.method)))(pPt||={});var YVr=S.Object({item:WVr,acceptedLength:S.Integer({minimum:1})}),hPt;(r=>(r.method="textDocument/didPartiallyAcceptCompletion",r.type=new Xye.ProtocolNotificationType(r.method)))(hPt||={});f();var KVr=de(Dn()),Cno;(r=>(r.method="textDocument/inlineCompletionPrompt",r.type=new KVr.ProtocolRequestType(r.method)))(Cno||={});f();var JVr=de(Dn()),XVr=S.Object({textDocument:Aj,position:uh}),vno=S.Object({command:S.Object({arguments:S.Tuple([S.String({minLength:1})])})}),ZVr=S.Object({item:vno}),mPt;(r=>(r.method="textDocument/didShowInlineEdit",r.type=new JVr.ProtocolNotificationType(r.method)))(mPt||={});f();var X9e=de(Dn());var eWr=S.Object({textDocument:Aj,position:uh,partialResultToken:S.Optional(lPt),workDoneToken:S.Optional(lPt)}),Z9e;(n=>(n.method="textDocument/copilotPanelCompletion",n.type=new X9e.ProtocolRequestType(n.method),n.partialResult=new X9e.ProgressType))(Z9e||={});f();var tWr=de(Dn()),gPt;(r=>(r.method="copilot/related",r.type=new tWr.ProtocolRequestType(r.method)))(gPt||={});f();var rWr=de(Dn()),APt;(r=>(r.method="statusNotification",r.type=new rWr.ProtocolNotificationType(r.method)))(APt||={});var nWr=de(require("path"));var iWr=S.Object({uri:S.String(),visibleRange:S.Optional(gf),selection:S.Optional(gf)}),yPt=class{constructor(e){this.turnContext=e}static{a(this,"CurrentEditorSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument(e),o=Gl(n);if(await this.turnContext.collectFile(Fg,e.uri,o),n.status==="valid"){let s=this.turnContext.conversation.source==="inline",c=new ek(n.document,e.selection,e.visibleRange),l=r.getRelativePath(n.document);if(o==="empty")return new nr([`The currently open file \`${l}\` is empty.`]);let u=[[`Code excerpt from the currently open file \`${l}\`:`,1],[c.fromAllCode({addLineNumbers:s}),1]],d=[];if(c.selectionIsDocument())d=[["The user is selecting the entire file.",1]];else if(s){let[p,h]=c.fromSelectedCode({trimNewLines:!0}),m=h.start.line+1;if(Yre(h))d=[[`The user is selecting line ${m}, which is empty.`,1]];else{let g=h.end.line+1;d=[["The user is selecting"+(m==g?` line ${m}:`:` lines ${m} to ${g} (inclusive):`),1],[p,1]]}}else c.selectionIsEmpty()||(d=[["The user is selecting this code:",1],[c.fromSelectedCode({trimNewLines:!1})[0],1]]);return new nr([...u,...d])}else if(n.status==="invalid")return new nr([`The currently open file \`${nWr.basename(e.uri)}\` is content excluded.`])}},Fg="current-editor",e7e=class{constructor(e){this._resolver=e;this.id=Fg;this.type="explicit"}static{a(this,"CurrentEditorSkill")}description(){return"The code from the user's currently open file"}resolver(){return this._resolver}processor(e){return new yPt(e)}};f();var oWr=S.Object({labels:S.Array(S.String())}),EPt=class{constructor(e){this.turnContext=e}static{a(this,"ProjectLabelsSkillProcessor")}value(){return 1}processSkill(e){let r=[];return r.push([new nr(["The developer is working on a project with the following characteristics (languages, frameworks):"]),1]),e.labels.forEach(n=>{r.push([new nr([`- ${n}`]),.9]),this.turnContext.collectLabel(jx,n)}),new nr(r)}},jx="project-labels",t7e=class{constructor(e){this._resolver=e;this.id=jx;this.type="explicit"}static{a(this,"ProjectLabelsSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(e){return new EPt(e)}};f();f();f();var r7e=class{constructor(){this.languageId=["java","kotlin","scala","groovy"]}static{a(this,"JavaProjectMetadataLookup")}determineBuildTools(e){return[...e.buildTools]}determineApplicationFrameworks(e){let r=[];return he(e,r,"org.springframework.boot","Spring Boot"),he(e,r,"jakarta.jakartaee-api","Jakarta EE"),he(e,r,"javax:javaee-api","Java EE"),he(e,r,"org.apache.struts:struts2-core","Apache Struts"),he(e,r,"org.hibernate:hibernate-core","Hibernate"),he(e,r,"org.apache.wicket:wicket-core","Apache Wicket"),he(e,r,"javax.faces:jsf-api","JSF"),he(e,r,"org.grails:grails-core","Grails"),r}determineCoreLibraries(e){let r=[];return he(e,r,"com.google.guava","Google Guava"),he(e,r,"org.apache.commons:commons-lang3","Apache Commons Lang"),he(e,r,"org.apache.commons:commons-io","Apache Commons IO"),he(e,r,"joda-time:joda-time","Joda-Time"),he(e,r,"com.google.code.gson:gson","Google Gson"),he(e,r,"org.apache.commons:commons-math3","Apache Commons Math"),he(e,r,"org.apache.commons:commons-collections4","Apache Commons Collections"),he(e,r,"org.apache.commons:commons-net","Apache Commons Net"),he(e,r,"org.apache.poi:poi","Apache POI"),he(e,r,"com.fasterxml.jackson.core:jackson-databind","Jackson"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"org.junit.jupiter:junit-jupiter","JUnit"),he(e,r,"junit:junit","JUnit"),he(e,r,"org.testng:testng","TestNG"),he(e,r,"org.spockframework:spock-core","Spock"),he(e,r,"io.cucumber:cucumber-java","Cucumber"),he(e,r,"org.jboss.arquillian.junit:arquillian-junit-container","Arquillian"),r}determineTestingLibraries(e){let r=[];return he(e,r,"org.mockito","Mockito"),he(e,r,"org.assertj","AssertJ"),he(e,r,"org.hamcrest","Hamcrest"),he(e,r,"org.powermock","PowerMock"),he(e,r,"org.jmock","JMock"),he(e,r,"org.easymock","EasyMock"),he(e,r,"org.jmockit:jmockit","JMockit"),he(e,r,"com.github.tomakehurst:wiremock","WireMock"),he(e,r,"org.dbunit:dbunit","DBUnit"),he(e,r,"com.icegreen:greenmail","GreenMail"),he(e,r,"net.sourceforge.htmlunit:htmlunit","HtmlUnit"),he(e,r,"org.seleniumhq.selenium:selenium-java","Selenium"),he(e,r,"io.rest-assured:rest-assured","Rest-Assured"),he(e,r,"io.gatling.highcharts:gatling-charts-highcharts","Gatling"),he(e,r,"org.apache.jmeter:ApacheJMeter","JMeter"),r}},n7e=class{constructor(){this.languageId=["javascript","javascriptreact","typescript","typescriptreact","vue"]}static{a(this,"JavaScriptProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"@types/node","Node.js"),he(e,r,"react-native","React Native"),r.find(n=>n.name==="React Native")||he(e,r,"react","React"),he(e,r,"angular","Angular"),he(e,r,"vue","Vue.js"),he(e,r,"ember","Ember.js"),he(e,r,"backbone","Backbone.js"),he(e,r,"meteor","Meteor"),he(e,r,"polymer","Polymer"),he(e,r,"aurelia","Aurelia"),he(e,r,"knockout","Knockout.js"),he(e,r,"dojo","Dojo Toolkit"),he(e,r,"mithril","Mithril.js"),he(e,r,"marionette","Marionette.js"),he(e,r,"marko","Marko.js"),he(e,r,"svelte","Svelte"),he(e,r,"hyperapp","Hyperapp"),he(e,r,"inferno","Inferno.js"),he(e,r,"preact","Preact"),he(e,r,"riot","Riot.js"),he(e,r,"moon","Moon.js"),he(e,r,"stencil","Stencil.js"),r}determineCoreLibraries(e){let r=[];return he(e,r,"lodash","Lodash"),he(e,r,"moment","Moment.js"),he(e,r,"axios","Axios"),he(e,r,"redux","Redux"),he(e,r,"recoil","Recoil"),he(e,r,"jquery","jQuery"),he(e,r,"d3","D3.js"),he(e,r,"underscore","Underscore.js"),he(e,r,"ramda","Ramda"),he(e,r,"immutable","Immutable.js"),he(e,r,"rxjs","RxJS"),he(e,r,"three","Three.js"),he(e,r,"socket.io","Socket.IO"),he(e,r,"express","Express.js"),he(e,r,"next","Next.js"),he(e,r,"puppeteer","Puppeteer"),he(e,r,"cheerio","Cheerio"),he(e,r,"nodemailer","Nodemailer"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"jest","Jest"),he(e,r,"mocha","Mocha"),he(e,r,"jasmine","Jasmine"),he(e,r,"ava","AVA"),he(e,r,"qunit","QUnit"),he(e,r,"tape","Tape"),r}determineTestingLibraries(e){let r=[];return he(e,r,"chai","Chai"),he(e,r,"sinon","Sinon"),he(e,r,"enzyme","Enzyme"),he(e,r,"protractor","Protractor"),he(e,r,"supertest","Supertest"),he(e,r,"nock","Nock"),he(e,r,"cypress","Cypress"),he(e,r,"@testing-library/react","React Testing Library"),r}},i7e=class{constructor(){this.languageId="go"}static{a(this,"GoProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"github.com/gorilla/mux","Gorilla Mux"),he(e,r,"github.com/go-chi/chi","Chi"),he(e,r,"github.com/gin-gonic/gin","Gin"),he(e,r,"github.com/labstack/echo","Echo"),he(e,r,"github.com/revel/revel","Revel"),he(e,r,"github.com/astaxie/beego","Beego"),he(e,r,"github.com/go-martini/martini","Martini"),he(e,r,"github.com/gobuffalo/buffalo","Buffalo"),he(e,r,"github.com/goji/goji","Goji"),he(e,r,"github.com/hoisie/web","Web.go"),r}determineCoreLibraries(e){let r=[];return he(e,r,"net/http","net/http"),he(e,r,"fmt","fmt"),he(e,r,"io","io"),he(e,r,"time","time"),he(e,r,"math","math"),he(e,r,"strconv","strconv"),he(e,r,"strings","strings"),he(e,r,"sort","sort"),he(e,r,"encoding/json","encoding/json"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"github.com/onsi/ginkgo","ginkgo"),he(e,r,"github.com/onsi/gomega","gomega"),he(e,r,"github.com/stretchr/testify","testify"),he(e,r,"gopkg.in/check.v1","gocheck"),he(e,r,"github.com/franela/goblin","goblin"),he(e,r,"github.com/DATA-DOG/godog","godog"),he(e,r,"github.com/stesla/gospec","gospec"),he(e,r,"github.com/rjeczalik/gotest","gotest"),he(e,r,"github.com/smartystreets/goconvey","goconvey"),r}determineTestingLibraries(e){let r=[];return he(e,r,"github.com/stretchr/testify","Testify"),he(e,r,"github.com/smartystreets/goconvey","GoConvey"),he(e,r,"github.com/onsi/ginkgo","Ginkgo"),he(e,r,"github.com/golang/mock","GoMock"),he(e,r,"gopkg.in/check.v1","GoCheck"),he(e,r,"github.com/franela/goblin","Goblin"),he(e,r,"github.com/DATA-DOG/godog","GoDog"),he(e,r,"github.com/onsi/gomega","Gomega"),he(e,r,"github.com/stesla/gospec","GoSpec"),he(e,r,"github.com/rjeczalik/gotest","GoTest"),r}},o7e=class{constructor(){this.languageId=["python","jupyter"]}static{a(this,"PythonProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"flask","Flask"),he(e,r,"django","Django"),he(e,r,"pyramid","Pyramid"),he(e,r,"tornado","Tornado"),he(e,r,"fastapi","FastAPI"),r}determineCoreLibraries(e){let r=[];return he(e,r,"requests","requests"),he(e,r,"numpy","numpy"),he(e,r,"pandas","pandas"),he(e,r,"scipy","scipy"),he(e,r,"matplotlib","matplotlib"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"pytest","Pytest"),he(e,r,"unittest","Unittest"),he(e,r,"doctest","Doctest"),he(e,r,"nose","Nose"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mock","Mock"),he(e,r,"hypothesis","Hypothesis"),he(e,r,"behave","Behave"),he(e,r,"lettuce","Lettuce"),he(e,r,"testify","Testify"),he(e,r,"pyhamcrest","PyHamcrest"),r}},s7e=class{constructor(){this.languageId=["php","blade"]}static{a(this,"PhpProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"laravel/framework","Laravel"),he(e,r,"symfony/symfony","Symfony"),he(e,r,"slim/slim","Slim"),he(e,r,"cakephp/cakephp","CakePHP"),he(e,r,"yiisoft/yii2","Yii"),he(e,r,"zendframework/zendframework","Zend Framework"),he(e,r,"phalcon/cphalcon","Phalcon"),he(e,r,"bcosca/fatfree","Fat-Free"),he(e,r,"fuel/fuel","FuelPHP"),he(e,r,"phpixie/framework","PHPixie"),r}determineCoreLibraries(e){let r=[];return he(e,r,"monolog/monolog","Monolog"),he(e,r,"vlucas/phpdotenv","PHP dotenv"),he(e,r,"symfony/console","Symfony Console"),he(e,r,"guzzlehttp/guzzle","GuzzleHttp"),he(e,r,"ramsey/uuid","Ramsey UUID"),he(e,r,"doctrine/orm","Doctrine ORM"),he(e,r,"php-di/php-di","PHP-DI"),he(e,r,"phpunit/php-timer","PHPUnit Timer"),he(e,r,"symfony/finder","Symfony Finder"),he(e,r,"symfony/yaml","Symfony Yaml"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"phpunit/phpunit","PHPUnit"),he(e,r,"behat/behat","Behat"),he(e,r,"phpspec/phpspec","PHPSpec"),he(e,r,"codeception/codeception","Codeception"),he(e,r,"atoum/atoum","Atoum"),he(e,r,"pestphp/pest","PestPHP"),he(e,r,"kahlan/kahlan","Kahlan"),he(e,r,"peridot-php/peridot","Peridot"),he(e,r,"phake/phake","Phake"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockery/mockery","Mockery"),he(e,r,"php-mock/php-mock","PHP-Mock"),he(e,r,"php-mock/php-mock-phpunit","PHP-Mock PHPUnit"),he(e,r,"padraic/mockery","Padraic Mockery"),he(e,r,"phpspec/prophecy","PHPSpec Prophecy"),he(e,r,"phpunit/php-invoker","PHPUnit Invoker"),he(e,r,"phpunit/php-token-stream","PHPUnit Token Stream"),he(e,r,"phpunit/php-code-coverage","PHPUnit Code Coverage"),he(e,r,"phpunit/php-timer","PHPUnit Timer"),he(e,r,"phpunit/php-text-template","PHPUnit Text Template"),r}},a7e=class{constructor(){this.languageId="csharp"}static{a(this,"CSharpProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"Microsoft.NETCore.App",".NET Core"),he(e,r,"Microsoft.AspNetCore.App","ASP.NET Core"),r}determineCoreLibraries(e){let r=[];return he(e,r,"EntityFramework","Entity Framework"),he(e,r,"Newtonsoft.Json","Newtonsoft.Json"),he(e,r,"AutoMapper","AutoMapper"),he(e,r,"Serilog","Serilog"),he(e,r,"Dapper","Dapper"),he(e,r,"Polly","Polly"),he(e,r,"FluentValidation","FluentValidation"),he(e,r,"MediatR","MediatR"),he(e,r,"Hangfire","Hangfire"),he(e,r,"RabbitMQ.Client","RabbitMQ.Client"),he(e,r,"MassTransit","MassTransit"),he(e,r,"Microsoft.Extensions.Logging","Microsoft.Extensions.Logging"),he(e,r,"Microsoft.Extensions.DependencyInjection","Microsoft.Extensions.DependencyInjection"),he(e,r,"Microsoft.Extensions.Configuration","Microsoft.Extensions.Configuration"),he(e,r,"Microsoft.Extensions.Http","Microsoft.Extensions.Http"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"xunit","xUnit"),he(e,r,"NUnit","NUnit"),he(e,r,"SpecFlow","SpecFlow"),r}determineTestingLibraries(e){let r=[];return he(e,r,"Moq","Moq"),he(e,r,"FluentAssertions","FluentAssertions"),he(e,r,"Bogus","Bogus"),he(e,r,"RestSharp","RestSharp"),he(e,r,"Swashbuckle.AspNetCore","Swashbuckle.AspNetCore"),r}},c7e=class{constructor(){this.languageId="dart"}static{a(this,"DartProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"flutter","Flutter"),he(e,r,"angular","AngularDart"),r}determineCoreLibraries(e){let r=[];return he(e,r,"dartx","dartx"),he(e,r,"provider","Provider"),he(e,r,"rxdart","RxDart"),he(e,r,"dio","Dio"),he(e,r,"json_serializable","json_serializable"),he(e,r,"freezed","Freezed"),he(e,r,"moor","Moor"),he(e,r,"hive","Hive"),he(e,r,"http","http"),he(e,r,"path","path"),he(e,r,"intl","intl"),he(e,r,"equatable","equatable"),he(e,r,"get_it","get_it"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"test","test"),he(e,r,"flutter_test","flutter_test"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockito","mockito"),he(e,r,"bloc_test","bloc_test"),r}},l7e=class{constructor(){this.languageId="ruby"}static{a(this,"RubyProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"rails","Rails"),he(e,r,"sinatra","Sinatra"),he(e,r,"hanami","Hanami"),he(e,r,"grape","Grape"),he(e,r,"roda","Roda"),he(e,r,"padrino","Padrino"),he(e,r,"cuba","Cuba"),he(e,r,"ramaze","Ramaze"),he(e,r,"nyara","Nyara"),he(e,r,"rack","Rack"),r}determineCoreLibraries(e){let r=[];return he(e,r,"active_record","ActiveRecord"),he(e,r,"sequel","Sequel"),he(e,r,"rom","ROM"),he(e,r,"datamapper","DataMapper"),he(e,r,"mongoid","Mongoid"),he(e,r,"neo4j","Neo4j"),he(e,r,"redis","Redis"),he(e,r,"cassandra","Cassandra"),he(e,r,"couchrest","CouchRest"),he(e,r,"riak","Riak"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"rspec","RSpec"),he(e,r,"minitest","Minitest"),he(e,r,"cucumber","Cucumber"),he(e,r,"spinach","Spinach"),he(e,r,"turnip","Turnip"),he(e,r,"bacon","Bacon"),he(e,r,"shoulda","Shoulda"),he(e,r,"test-unit","Test::Unit"),he(e,r,"wrong","Wrong"),he(e,r,"contest","Contest"),r}determineTestingLibraries(e){let r=[];return he(e,r,"factory_bot","FactoryBot"),he(e,r,"faker","Faker"),he(e,r,"ffaker","FFaker"),he(e,r,"fabrication","Fabrication"),he(e,r,"machinist","Machinist"),he(e,r,"mocha","Mocha"),he(e,r,"flexmock","FlexMock"),he(e,r,"rr","RR"),he(e,r,"bourne","Bourne"),he(e,r,"not_a_mock","NotAMock"),r}},u7e=class{constructor(){this.languageId="rust"}static{a(this,"RustProjectMetadataLookup")}determineBuildTools(e){return e.buildTools}determineApplicationFrameworks(e){let r=[];return he(e,r,"tokio","tokio"),he(e,r,"async-std","async-std"),he(e,r,"hyper","hyper"),he(e,r,"actix-web","actix-web"),he(e,r,"rocket","rocket"),r}determineCoreLibraries(e){let r=[];return he(e,r,"serde","serde"),he(e,r,"regex","regex"),he(e,r,"rand","rand"),he(e,r,"log","log"),he(e,r,"lazy_static","lazy_static"),he(e,r,"libc","libc"),he(e,r,"futures","futures"),he(e,r,"rayon","rayon"),he(e,r,"reqwest","reqwest"),he(e,r,"warp","warp"),r}determineTestingFrameworks(e){let r=[];return he(e,r,"test-case","test-case"),he(e,r,"proptest","proptest"),he(e,r,"quickcheck","quickcheck"),r}determineTestingLibraries(e){let r=[];return he(e,r,"mockall","mockall"),he(e,r,"double","double"),he(e,r,"rstest","rstest"),he(e,r,"mockiato","mockiato"),he(e,r,"mock_derive","mock_derive"),he(e,r,"mocktopus","mocktopus"),he(e,r,"mockers","mockers"),he(e,r,"mock_it","mock_it"),r}},d7e=class{constructor(){this.languageId=["c","cpp"]}static{a(this,"CProjectMetadataLookup")}determineBuildTools(e){return e.buildTools.filter(r=>["gcc","clang","make","cmake","autotools","ninja","meson"].includes(r.name))}determineApplicationFrameworks(e){return e.libraries.filter(r=>["libc","libuv","openssl","zlib","libevent","libcurl"].includes(r.name))}determineCoreLibraries(e){return e.libraries.filter(r=>["libpng","libjpeg","libxml2","sqlite","postgres","mysql"].includes(r.name))}determineTestingFrameworks(e){return e.libraries.filter(r=>["unity","criterion","cmocka","check","ctest","minunit"].includes(r.name))}determineTestingLibraries(e){return e.libraries.filter(r=>["cmock","fff","trompeloeil","fakeit"].includes(r.name))}};function he(t,e,r,n){let o=t.libraries.find(s=>s.name.toLowerCase().indexOf(r.toLowerCase())>-1);o&&e.push({name:n,version:o.version})}a(he,"addFromLibraries");var f7e=class{constructor(e,r){this.languageId=e;this.delegates=r}static{a(this,"CompositeProjectMetadataLookup")}determineBuildTools(e){return this.delegates.map(r=>r.determineBuildTools(e)).flat()}determineApplicationFrameworks(e){return this.delegates.map(r=>r.determineApplicationFrameworks(e)).flat()}determineCoreLibraries(e){return this.delegates.map(r=>r.determineCoreLibraries(e)).flat()}determineTestingFrameworks(e){return this.delegates.map(r=>r.determineTestingFrameworks(e)).flat()}determineTestingLibraries(e){return this.delegates.map(r=>r.determineTestingLibraries(e)).flat()}};function aWr(t){return t.language.version?t.language.name+" "+t.language.version:t.language.name}a(aWr,"determineProgrammingLanguage");var sWr=[new r7e,new n7e,new i7e,new o7e,new s7e,new a7e,new c7e,new l7e,new u7e,new d7e];function cWr(t){let e=sWr.find(r=>typeof r.languageId=="string"?r.languageId===t:Array.isArray(r.languageId)?r.languageId.includes(t):!1)??new f7e(t,sWr);return new _Pt(e)}a(cWr,"getMetadataLookup");var _Pt=class{constructor(e){this.delegate=e;this.languageId=e.languageId}static{a(this,"DistinctProjectMetadataLookup")}determineBuildTools(e){return this.deduplicateDependencies(this.delegate.determineBuildTools(e))}determineApplicationFrameworks(e){return this.deduplicateDependencies(this.delegate.determineApplicationFrameworks(e))}determineCoreLibraries(e){return this.deduplicateDependencies(this.delegate.determineCoreLibraries(e))}determineTestingFrameworks(e){return this.deduplicateDependencies(this.delegate.determineTestingFrameworks(e))}determineTestingLibraries(e){return this.deduplicateDependencies(this.delegate.determineTestingLibraries(e))}deduplicateDependencies(e){let r=[];return e.forEach(n=>{r.find(o=>o.name===n.name)||r.push(n)}),r}};var lWr=S.Object({name:S.String(),version:S.Optional(S.String())}),uWr=S.Object({language:S.Object({id:S.String(),name:S.String(),version:S.Optional(S.String())}),libraries:S.Array(lWr),buildTools:S.Array(lWr)}),CPt=class{constructor(e){this.turnContext=e}static{a(this,"ProjectMetadataSkillProcessor")}value(){return 1}processSkill(e){let r=[];r.push([new nr([`The user is working on a project with the following characteristics: +`]),1]);let n=cWr(e.language.id);return this.addProgrammingLanguage(e,r),this.addBuildTools(e,r,n),this.addApplicationFramework(e,r,n),this.addCoreLibraries(e,r,n),this.addTestingFrameworks(e,r,n),this.addTestingLibraries(e,r,n),new nr(r)}addProgrammingLanguage(e,r){let n=aWr(e);this.turnContext.collectLabel(tk,n),r.push([new nr([`- programming language: ${n}`]),1])}addBuildTools(e,r,n){this.addToPrompt(r,"- build tools:",n.determineBuildTools(e))}addApplicationFramework(e,r,n){this.addToPrompt(r,"- application frameworks:",n.determineApplicationFrameworks(e))}addCoreLibraries(e,r,n){this.addToPrompt(r,"- core libraries:",n.determineCoreLibraries(e))}addTestingFrameworks(e,r,n){this.addToPrompt(r,"- testing frameworks:",n.determineTestingFrameworks(e))}addTestingLibraries(e,r,n){this.addToPrompt(r,"- testing libraries:",n.determineTestingLibraries(e))}addToPrompt(e,r,n){if(n.length>0){n.forEach(s=>{this.turnContext.collectLabel(tk,`${s.name}${s.version?" "+s.version:""}`)});let o=n.map(s=>` - ${s.name}${s.version?" "+s.version:""}`).join(` `);e.push([new nr([`${r} -${o}`]),1])}}},pk="project-metadata",oUe=class{constructor(e){this._resolver=e;this.id=pk;this.type="explicit"}static{a(this,"ProjectMetadataSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(e){return new tPt(e)}};f();var fVr=de(require("path"));var rPt=class{constructor(e){this.turnContext=e}static{a(this,"ReferencesSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=[],o=this.filterIncludedFiles(e),s=(await this.toFileChunks(o,r)).filter(c=>c!==void 0).flat();if(s.length>0)return n.push([new nr(["The user wants you to consider the following referenced files when computing your answer."]),1]),n.push(...s),new nr(n)}filterIncludedFiles(e){return e.filter(r=>r.type==="file"&&!this.turnContext.isFileIncluded(r.uri))}async toFileChunks(e,r){return await Promise.all(e.map(async n=>{if(n.type==="file"&&n.uri)return await this.elideReferencedFiles(r,n)}))}async elideReferencedFiles(e,r){let n=await e.getOrReadTextDocument(r),o=Kl(n);if(await this.turnContext.collectFile(aUe,r.uri,o),n.status==="valid"){let s=e.getRelativePath(n.document);if(o==="included"){let c=new fk(n.document,r.selection,r.visibleRange);return[[`Code excerpt from referenced file \`${s}\`:`,1],[c.fromAllCode({addLineNumbers:!1}),1]]}else if(o==="empty")return[[new nr([`The referenced file \`${s}\` is empty.`]),1]]}else if(n.status==="invalid")return[[new nr([`The referenced file \`${fVr.basename(r.uri)}\` is content excluded.`]),1]]}},nPt=class{static{a(this,"ReferencesSkillResolver")}resolveSkill(e){if(e.turn.request.references&&e.turn.request.references.length>0)return e.turn.request.references}},aUe="references",sUe=class{constructor(){this.id=aUe;this.type="implicit"}static{a(this,"ReferencesSkill")}description(){return"The code from the user's referenced files"}resolver(){return new nPt}processor(e){return new rPt(e)}};var d$=a(()=>[pk,tw,aUe,Vg],"mandatorySkills"),Lne=class{constructor(e,r){this.chatFetcher=r;this.metaPromptFetcher=new G7e(e,this.chatFetcher)}static{a(this,"ConversationContextCollector")}async collectContext(e,r,n,o,s,c){let l=[];if(s){let u=s.requiredSkills?await s.requiredSkills(e.ctx):[];l.push(...u.filter(d=>!d$().includes(d)))}else(await this.metaPromptFetcher.fetchPromptContext(e,await this.selectableSkillDescriptors(e.ctx,e.conversation,e.turn),r,n,o)).skillIds.reverse().forEach(d=>{!l.includes(d)&&!d$().includes(d)&&l.push(d)});if(c){let u=await c.additionalSkills(e.ctx);l.push(...u.filter(d=>!d$().includes(d)))}return l.push(...d$()),l=l.filter(u=>!this.isIgnoredSkill(u,e.turn)),{skillIds:e.ctx.get(ho).filterSupportedSkills(e.conversation.id,l)}}async selectableSkillDescriptors(e,r,n){let o=await this.getNonSelectableSkills(e),s=e.get(ho).getSupportedSkills(r.id),c=e.get(A0).getDescriptors(),l=[];for(let u of c){if(o.includes(u.id)||!s.includes(u.id))continue;(!u.isAvailable||await u.isAvailable(e))&&!this.isIgnoredSkill(u.id,n)&&l.push(u)}return l}async getNonSelectableSkills(e){let r=await FT(e),n=(await Promise.all(r.map(o=>o.additionalSkills(e)))).flat();return[...d$(),...n]}isIgnoredSkill(e,r){return r.ignoredSkills?.some(n=>n.skillId===e)}};async function lUe(t,e){let[r,n,o]=await vto(t,e);return o.push(...Sto(t)),r.length>0||n.length>0?[new nr([[new nr(["Consider the additional context:"]),1],[CF(r,"inverseLinear"),.9],...n]),o]:[null,o]}a(lUe,"fromSkills");async function vto(t,e){let r=[],n=[],o=[],s=[...t.turn.skills].reverse();for(let c of s){if(!await Ito(t,c.skillId,e?.languageId??""))continue;let[l,u]=await bto(t,c.skillId);l&&(d$().indexOf(c.skillId)===-1?n.push(l):o.push(l)),r.push(u)}return n.reverse(),o.reverse(),r.reverse(),[n,o,r]}a(vto,"handleSkillsInReverse");async function bto(t,e){let n=t.ctx.get(A0).getSkill(e);try{let o=Date.now(),s=await t.skillResolver.resolve(e),c=Date.now()-o;if(s){let l=n?.processor(t),u=Date.now(),d=await l?.processSkill(s,t),p=Date.now()-u;return d?await Tto(t,n,l,d,c,p):[void 0,await cUe(t,n,"unprocessable",void 0,c,p)]}else return[void 0,await cUe(t,n,"unresolvable",void 0,c)]}catch(o){if(Ge.exception(t.ctx,o,`Error while resolving skill ${e}`),o instanceof tCe)throw o;return[void 0,await cUe(t,n,"failed")]}}a(bto,"safelyProcessSkill");async function Tto(t,e,r,n,o,s){let c;return typeof n=="string"?c=new nr([[n,1]]):c=n,[[c,r?.value()||0],await cUe(t,e,"resolved",c,o,s)]}a(Tto,"handleProcessedSkill");async function cUe(t,e,r,n,o,s){let l=t.collector.collectiblesForCollector(e?.id??"unknown").filter(d=>d.type==="file"),u={skillId:e?.id??"unknown",resolution:r,files:l,resolutionTimeMs:o,processingTimeMs:s};if(n){let d=await t.ctx.get(Da).getBestChatModelConfig($E("user")),p=n.elide(d.maxRequestTokens).getText();u.tokensPreEliding=wo(d.tokenizer).tokenLength(p)}return t.ctx.get(gh).addResolution(t.turn.id,u),u}a(cUe,"determineResolution");function Sto(t){return t.turn.ignoredSkills.map(e=>({skillId:e.skillId,resolution:"ignored"}))}a(Sto,"handleIgnoredSkills");async function Ito(t,e,r){if(e!==pk&&e!==tw)return!0;let n=t.ctx.get(jt),o=await n.fetchTokenAndUpdateExPValuesAndAssignments({languageId:r});return n.ideChatEnableProjectMetadata(o)?e===pk:e===tw}a(Ito,"includeSkill");var f$=class{static{a(this,"AbstractUserPromptStrategy")}async elidableContent(e,r){let n=[],o=One(e.conversation.turns.slice(0,-1));o!==null&&n.push([o,.6]);let[s,c]=await this.elidableSkills(e,r);return s!==null&&(o!==null&&n.push(["",.1]),n.push([s,.8])),[new nr(n),c]}async elidableSkills(e,r){return await lUe(e,r)}async promptContent(e,r,n){let o,s={includeCodeGenerationInstructions:!0,includeCommitMessageGenerationInstructions:!1,includeAgentsMdInstructions:vr(e.ctx,tt.UseAgentsMd),includeNestedAgentsMdInstructions:vr(e.ctx,tt.UseNestedAgentsMd),includeClaudeMdInstructions:vr(e.ctx,tt.UseClaudeMd),includeNestedClaudeMdInstructions:vr(e.ctx,tt.UseNestedClaudeMd)},c=e.turn.extractContextFilesUri();e.turn.workspaceFolders&&e.turn.workspaceFolders.length>0?o=await e.ctx.get(od).getInstructions(e.ctx,e.turn.workspaceFolders,s,c):e.turn.workspaceFolder&&(o=await e.ctx.get(od).getInstructions(e.ctx,[e.turn.workspaceFolder],s,c));let l=ev(e.conversation.getLastTurn().request.message),u;o?typeof l=="string"?u=o+` +${o}`]),1])}}},tk="project-metadata",p7e=class{constructor(e){this._resolver=e;this.id=tk;this.type="explicit"}static{a(this,"ProjectMetadataSkill")}description(){return"The characteristics of the project the developer is working on (languages, frameworks)"}resolver(){return this._resolver}processor(e){return new CPt(e)}};f();var dWr=de(require("path"));var vPt=class{constructor(e){this.turnContext=e}static{a(this,"ReferencesSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=[],o=this.filterIncludedFiles(e),s=(await this.toFileChunks(o,r)).filter(c=>c!==void 0).flat();if(s.length>0)return n.push([new nr(["The user wants you to consider the following referenced files when computing your answer."]),1]),n.push(...s),new nr(n)}filterIncludedFiles(e){return e.filter(r=>r.type==="file"&&!this.turnContext.isFileIncluded(r.uri))}async toFileChunks(e,r){return await Promise.all(e.map(async n=>{if(n.type==="file"&&n.uri)return await this.elideReferencedFiles(r,n)}))}async elideReferencedFiles(e,r){let n=await e.getOrReadTextDocument(r),o=Gl(n);if(await this.turnContext.collectFile(m7e,r.uri,o),n.status==="valid"){let s=e.getRelativePath(n.document);if(o==="included"){let c=new ek(n.document,r.selection,r.visibleRange);return[[`Code excerpt from referenced file \`${s}\`:`,1],[c.fromAllCode({addLineNumbers:!1}),1]]}else if(o==="empty")return[[new nr([`The referenced file \`${s}\` is empty.`]),1]]}else if(n.status==="invalid")return[[new nr([`The referenced file \`${dWr.basename(r.uri)}\` is content excluded.`]),1]]}},bPt=class{static{a(this,"ReferencesSkillResolver")}resolveSkill(e){if(e.turn.request.references&&e.turn.request.references.length>0)return e.turn.request.references}},m7e="references",h7e=class{constructor(){this.id=m7e;this.type="implicit"}static{a(this,"ReferencesSkill")}description(){return"The code from the user's referenced files"}resolver(){return new bPt}processor(e){return new vPt(e)}};var yj=a(()=>[tk,jx,m7e,Fg],"mandatorySkills"),Kre=class{constructor(e,r){this.chatFetcher=r;this.metaPromptFetcher=new K9e(e,this.chatFetcher)}static{a(this,"ConversationContextCollector")}async collectContext(e,r,n,o,s,c){let l=[];if(s){let u=s.requiredSkills?await s.requiredSkills(e.ctx):[];l.push(...u.filter(d=>!yj().includes(d)))}else(await this.metaPromptFetcher.fetchPromptContext(e,await this.selectableSkillDescriptors(e.ctx,e.conversation,e.turn),r,n,o)).skillIds.reverse().forEach(d=>{!l.includes(d)&&!yj().includes(d)&&l.push(d)});if(c){let u=await c.additionalSkills(e.ctx);l.push(...u.filter(d=>!yj().includes(d)))}return l.push(...yj()),l=l.filter(u=>!this.isIgnoredSkill(u,e.turn)),{skillIds:e.ctx.get(lo).filterSupportedSkills(e.conversation.id,l)}}async selectableSkillDescriptors(e,r,n){let o=await this.getNonSelectableSkills(e),s=e.get(lo).getSupportedSkills(r.id),c=e.get(f0).getDescriptors(),l=[];for(let u of c){if(o.includes(u.id)||!s.includes(u.id))continue;(!u.isAvailable||await u.isAvailable(e))&&!this.isIgnoredSkill(u.id,n)&&l.push(u)}return l}async getNonSelectableSkills(e){let r=await IT(e),n=(await Promise.all(r.map(o=>o.additionalSkills(e)))).flat();return[...yj(),...n]}isIgnoredSkill(e,r){return r.ignoredSkills?.some(n=>n.skillId===e)}};async function A7e(t,e){let[r,n,o]=await bno(t,e);return o.push(...Ino(t)),r.length>0||n.length>0?[new nr([[new nr(["Consider the additional context:"]),1],[W6(r,"inverseLinear"),.9],...n]),o]:[null,o]}a(A7e,"fromSkills");async function bno(t,e){let r=[],n=[],o=[],s=[...t.turn.skills].reverse();for(let c of s){if(!await xno(t,c.skillId,e?.languageId??""))continue;let[l,u]=await Tno(t,c.skillId);l&&(yj().indexOf(c.skillId)===-1?n.push(l):o.push(l)),r.push(u)}return n.reverse(),o.reverse(),r.reverse(),[n,o,r]}a(bno,"handleSkillsInReverse");async function Tno(t,e){let n=t.ctx.get(f0).getSkill(e);try{let o=Date.now(),s=await t.skillResolver.resolve(e),c=Date.now()-o;if(s){let l=n?.processor(t),u=Date.now(),d=await l?.processSkill(s,t),p=Date.now()-u;return d?await Sno(t,n,l,d,c,p):[void 0,await g7e(t,n,"unprocessable",void 0,c,p)]}else return[void 0,await g7e(t,n,"unresolvable",void 0,c)]}catch(o){if(Ge.exception(t.ctx,o,`Error while resolving skill ${e}`),o instanceof Zye)throw o;return[void 0,await g7e(t,n,"failed")]}}a(Tno,"safelyProcessSkill");async function Sno(t,e,r,n,o,s){let c;return typeof n=="string"?c=new nr([[n,1]]):c=n,[[c,r?.value()||0],await g7e(t,e,"resolved",c,o,s)]}a(Sno,"handleProcessedSkill");async function g7e(t,e,r,n,o,s){let l=t.collector.collectiblesForCollector(e?.id??"unknown").filter(d=>d.type==="file"),u={skillId:e?.id??"unknown",resolution:r,files:l,resolutionTimeMs:o,processingTimeMs:s};if(n){let d=await t.ctx.get(wa).getBestChatModelConfig(ME("user")),p=n.elide(d.maxRequestTokens).getText();u.tokensPreEliding=To(d.tokenizer).tokenLength(p)}return t.ctx.get(lh).addResolution(t.turn.id,u),u}a(g7e,"determineResolution");function Ino(t){return t.turn.ignoredSkills.map(e=>({skillId:e.skillId,resolution:"ignored"}))}a(Ino,"handleIgnoredSkills");async function xno(t,e,r){if(e!==tk&&e!==jx)return!0;let n=t.ctx.get(Gt),o=await n.fetchTokenAndUpdateExPValuesAndAssignments({languageId:r});return n.ideChatEnableProjectMetadata(o)?e===tk:e===jx}a(xno,"includeSkill");var Ej=class{static{a(this,"AbstractUserPromptStrategy")}async elidableContent(e,r){let n=[],o=zre(e.conversation.turns.slice(0,-1));o!==null&&n.push([o,.6]);let[s,c]=await this.elidableSkills(e,r);return s!==null&&(o!==null&&n.push(["",.1]),n.push([s,.8])),[new nr(n),c]}async elidableSkills(e,r){return await A7e(e,r)}async promptContent(e,r,n){let o,s={includeCopilotInstructions:!0,includeGitCommitInstructions:!1,includeAgentsMdInstructions:vr(e.ctx,tt.UseAgentsMd),includeNestedAgentsMdInstructions:vr(e.ctx,tt.UseNestedAgentsMd),includeClaudeMdInstructions:vr(e.ctx,tt.UseClaudeMd),includeNestedClaudeMdInstructions:vr(e.ctx,tt.UseNestedClaudeMd)},c=e.turn.extractContextFilesUri();e.turn.workspaceFolders&&e.turn.workspaceFolders.length>0?o=await e.ctx.get(Ju).getInstructions(e.ctx,e.turn.workspaceFolders,s,c):e.turn.workspaceFolder&&(o=await e.ctx.get(Ju).getInstructions(e.ctx,[e.turn.workspaceFolder],s,c));let l=q1(e.conversation.getLastTurn().request.message),u;o?typeof l=="string"?u=o+` -`+l:u=[{type:"text",text:o},...l]:u=l;let[d,p]=await this.elidableContent(e,n);return[[{role:"system",content:r},{role:"user",content:d},{role:"system",content:this.suffix(e)},{role:"user",content:u}],p]}},uUe=class extends f${static{a(this,"PanelUserPromptStrategy")}suffix(e){return Vo` +`+l:u=[{type:"text",text:o},...l]:u=l;let[d,p]=await this.elidableContent(e,n);return[[{role:"system",content:r},{role:"user",content:d},{role:"system",content:this.suffix(e)},{role:"user",content:u}],p]}},y7e=class extends Ej{static{a(this,"PanelUserPromptStrategy")}suffix(e){return Go` Use the above information, including the additional context and conversation history (if available) to answer the user's question below. Prioritize the context given in the user's question. When generating code, think step-by-step. Briefly explain the code and then output it in a single code block. @@ -2386,7 +2375,7 @@ ${o}`]),1])}}},pk="project-metadata",oUe=class{constructor(e){this._resolver=e;t Do not start your answer with a programming language name. Do not include follow up questions or suggestions for next turns. Respond in the following locale: ${e.conversation.userLanguage}. - `.trim()}};var dUe=class extends f${static{a(this,"InlineUserPromptStrategy")}suffix(e){return Vo` + `.trim()}};var E7e=class extends Ej{static{a(this,"InlineUserPromptStrategy")}suffix(e){return Go` Use the above information, including the additional context and conversation history (if available) to answer the user's question below. Prioritize the context given in the user's question. Keep your answers short and impersonal. @@ -2441,7 +2430,7 @@ ${o}`]),1])}}},pk="project-metadata",oUe=class{constructor(e){this._resolver=e;t - The first row of a codeblock must never be indented. - Code in codeblocks must not contain line numbers. - You must not return a codeblock containing the final code, but only individual codeblocks for each change. - `.trim()}};f();var fUe=class{static{a(this,"MetaPromptStrategy")}elidableContent(e){let r=One(e.turns.slice(0,-1)),n=[];return r!==null&&n.push([r,.6]),new nr(n)}suffix(e){if(e.promptType!=="meta")throw new Error("Invalid prompt options for strategy");if(!e.supportedSkillDescriptors)throw new Error("Supported skills must be provided for meta prompts");return this.buildMetaPrompt(e.supportedSkillDescriptors)}buildMetaPrompt(e){return Vo` + `.trim()}};f();var _7e=class{static{a(this,"MetaPromptStrategy")}elidableContent(e){let r=zre(e.turns.slice(0,-1)),n=[];return r!==null&&n.push([r,.6]),new nr(n)}suffix(e){if(e.promptType!=="meta")throw new Error("Invalid prompt options for strategy");if(!e.supportedSkillDescriptors)throw new Error("Supported skills must be provided for meta prompts");return this.buildMetaPrompt(e.supportedSkillDescriptors)}buildMetaPrompt(e){return Go` Your task is to provide a helpful answer to the user's question. To help you create that answer, you can resolve skills that give you more context. Each skill has a description and some example user questions to help you understand when the skill may be useful. @@ -2450,14 +2439,14 @@ ${o}`]),1])}}},pk="project-metadata",oUe=class{constructor(e){this._resolver=e;t ${e.map(r=>`${this.skillToPrompt(r)} `).join(` `)} - `.trim()}createFunctionArgumentSchema(e){let r=$Hr(e.map(n=>n.id));return S.Object({skillIds:S.Array(r,{description:"The skill ids to resolve ranked from most to least useful"})})}toolConfig(e){if(e.promptType!=="meta")throw new Error("Invalid prompt options for strategy");return{tool_choice:{type:"function",function:{name:"resolveSkills"}},tools:[{type:"function",function:{name:"resolveSkills",description:"Resolves the skills by id to help answer the user question.",parameters:this.createFunctionArgumentSchema(e.supportedSkillDescriptors)}}],extractArguments(r){return{skillIds:cO(r).skillIds}}}}skillToPrompt(e){let r=e.description?e.description():e.id,n=`Skill Id: ${e.id} + `.trim()}createFunctionArgumentSchema(e){let r=jjr(e.map(n=>n.id));return S.Object({skillIds:S.Array(r,{description:"The skill ids to resolve ranked from most to least useful"})})}toolConfig(e){if(e.promptType!=="meta")throw new Error("Invalid prompt options for strategy");return{tool_choice:{type:"function",function:{name:"resolveSkills"}},tools:[{type:"function",function:{name:"resolveSkills",description:"Resolves the skills by id to help answer the user question.",parameters:this.createFunctionArgumentSchema(e.supportedSkillDescriptors)}}],extractArguments(r){return{skillIds:jM(r).skillIds}}}}skillToPrompt(e){let r=e.description?e.description():e.id,n=`Skill Id: ${e.id} Skill Description: ${r}`,o=e.examples?e.examples():[];return o.length>0&&(n+=` Skill Examples: ${o.map(s=>` - ${s}`).join(` -`)}`),n}promptContent(e,r,n){let o=e.conversation.getLastTurn().request.message,s=this.elidableContent(e.conversation);return[[{role:"system",content:r},{role:"user",content:s},{role:"system",content:this.suffix(n)},{role:"user",content:Vo` +`)}`),n}promptContent(e,r,n){let o=e.conversation.getLastTurn().request.message,s=this.elidableContent(e.conversation);return[[{role:"system",content:r},{role:"user",content:s},{role:"system",content:this.suffix(n)},{role:"user",content:Go` This is the user's question: ${dn(o).trim()} - `.trim()}],[]]}};f();var pUe=class{static{a(this,"SuggestionsPromptStrategy")}toolConfig(){return{tool_choice:{type:"function",function:{name:"showSuggestions"}},tools:[{type:"function",function:{name:"showSuggestions",description:"Show the computed suggestions to the user",parameters:S.Object({suggestedTitle:S.String({description:"The suggested title for the conversation"}),followUp:S.String({description:"The suggested follow-up question for the conversation"})})}}],extractArguments(e){let r=cO(e);return{suggestedTitle:r.suggestedTitle,followUp:r.followUp}}}}suffix(e){return Vo` + `.trim()}],[]]}};f();var C7e=class{static{a(this,"SuggestionsPromptStrategy")}toolConfig(){return{tool_choice:{type:"function",function:{name:"showSuggestions"}},tools:[{type:"function",function:{name:"showSuggestions",description:"Show the computed suggestions to the user",parameters:S.Object({suggestedTitle:S.String({description:"The suggested title for the conversation"}),followUp:S.String({description:"The suggested follow-up question for the conversation"})})}}],extractArguments(e){let r=jM(e);return{suggestedTitle:r.suggestedTitle,followUp:r.followUp}}}}suffix(e){return Go` Your task is to come up with two suggestions: 1) Suggest a title for the current conversation based on the history of the conversation so far. @@ -2473,7 +2462,7 @@ ${o.map(s=>` - ${s}`).join(` - The question must not appear in the conversation history. - The question must not have already been answered. - The question must be in the following locale: ${e.conversation.userLanguage}. - `.trim()}elidableContent(e){let r=One(e.turns.slice()),n=[];return r!==null&&n.push([r,.6]),new nr(n)}promptContent(e,r,n){return[[{role:"system",content:r},{role:"user",content:this.elidableContent(e.conversation)},{role:"system",content:this.suffix(e)}],[]]}};f();var xto=[{type:"function",function:{name:"queryWithKeywords",description:"Searches the workspace for synonyms and relevant keywords related to the original user query. These keywords could be used as file names, symbol names, abbreviations, or comments in the relevant code.",parameters:S.Object({keywords:S.Array(S.Object({keyword:S.String({description:"A keyword or phrase relevant to the original user query that a user could search to answer their question. Keywords are not generic and do not repeat."}),variations:S.Array(S.String(),{description:"An array of relevant variations of the keyword. Variations include synonyms and plural forms. Variations are not generic and do not repeat."})}))})}}],hUe=class extends f${static{a(this,"UserQuerySynonymsPromptStrategy")}suffix(){return` + `.trim()}elidableContent(e){let r=zre(e.turns.slice()),n=[];return r!==null&&n.push([r,.6]),new nr(n)}promptContent(e,r,n){return[[{role:"system",content:r},{role:"user",content:this.elidableContent(e.conversation)},{role:"system",content:this.suffix(e)}],[]]}};f();var wno=[{type:"function",function:{name:"queryWithKeywords",description:"Searches the workspace for synonyms and relevant keywords related to the original user query. These keywords could be used as file names, symbol names, abbreviations, or comments in the relevant code.",parameters:S.Object({keywords:S.Array(S.Object({keyword:S.String({description:"A keyword or phrase relevant to the original user query that a user could search to answer their question. Keywords are not generic and do not repeat."}),variations:S.Array(S.String(),{description:"An array of relevant variations of the keyword. Variations include synonyms and plural forms. Variations are not generic and do not repeat."})}))})}}],v7e=class extends Ej{static{a(this,"UserQuerySynonymsPromptStrategy")}suffix(){return` You are a coding assistant that helps developers find relevant code in their workspace by providing a list of relevant keywords they can search for. The user will provide you with potentially relevant information from the workspace. This information may be incomplete. @@ -2496,41 +2485,41 @@ queryWithKeywords([ { "keyword": "base64", "variations": ["base 64"] }, { "keyword": "encode", "variations": ["encoding", "encoded", "encoder", "encoders"] } ]); -`.trim()}promptContent(e,r,n){if(n.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");let o=ev(e.conversation.getLastTurn().request.message),s=[{role:"system",content:r},{role:"system",content:this.suffix()},{role:"user",content:o}];return Promise.resolve([s,[]])}toolConfig(e){if(e.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");return{tools:xto,tool_choice:{type:"function",function:{name:"queryWithKeywords"}},extractArguments(r){let n=cO(r).keywords;if(!n||!Array.isArray(n))return{keywords:[]};let o=new Set;for(let s of n)if(!(!j9e(s,"keyword")||!s.keyword||typeof s.keyword!="string")&&(o.add(s.keyword.toLowerCase()),!(!j9e(s,"variations")||!s.variations||!Array.isArray(s.variations))))for(let c of s.variations)typeof c=="string"&&o.add(c.toLowerCase());return{keywords:Array.from(o)??[]}}}}};var iPt=class{constructor(e,r,n){this.promptType=e;this.strategy=n;this.modelFamilies=Array.isArray(r)?r:[r]}static{a(this,"PromptStrategyDescriptor")}};function rCe(t,e,r){return new iPt(t,e,r)}a(rCe,"descriptor");var pVr=[rCe("user",$E("user"),()=>new uUe),rCe("inline",$E("inline"),()=>new dUe),rCe("meta",$E("meta"),()=>new fUe),rCe("suggestions",$E("suggestions"),()=>new pUe),rCe("synonyms",$E("synonyms"),()=>new hUe)],mUe=class{static{a(this,"DefaultPromptStrategyFactory")}async createPromptStrategy(e,r,n){let o=pVr.find(s=>s.promptType===r&&s.modelFamilies.includes(n));if(!o)throw new Error(`No prompt strategy found for promptType: ${r} and modelFamily: ${n}`);return o.strategy(e)}get descriptors(){return pVr}};var mVr=require("console");var vm=class{constructor(e,r=new mUe){this.ctx=e;this.promptStrategyFactory=r}static{a(this,"ConversationPromptEngine")}async toPrompt(e,r){let n=await this.promptStrategyFactory.createPromptStrategy(this.ctx,r.promptType,r.modelConfiguration.modelFamily),o=await this.ctx.get(en).getSession(),[s,c]=await n.promptContent(e,this.safetyPrompt(r.userSelectedModelName??r.modelConfiguration.uiName,o),r),[l,u]=this.elideChatMessages(s,r.modelConfiguration);return await this.ctx.get(g0).inspectPrompt({type:r.promptType,prompt:hVr(l),tokens:u}),this.ctx.get(gh).addPrompt(e.turn.id,hVr(l),r.promptType),{messages:l,tokens:u,skillResolutions:c,toolConfig:n.toolConfig?.(r)}}elideChatMessages(e,r){let n=e.filter(l=>!(typeof l.content=="string"||Array.isArray(l.content)));(0,mVr.assert)(n.length==1,"Only one elidable message is supported right now.");let o=this.computeNonElidableTokens(e,r),s=r.maxRequestTokens-o,c=e.map(l=>typeof l.content=="string"||Array.isArray(l.content)?l:{role:l.role,content:wto(l.content.elide(s).getText())}).filter(l=>l.content.length>0);return[c,L2t(c,r)]}computeNonElidableTokens(e,r){let n=e.filter(o=>typeof o.content=="string");return n.push({role:"user",content:""}),L2t(n,r)}safetyPrompt(e,r){let n=this.ctx.get(Nr).getEditorInfo().readableName??this.ctx.get(Nr).getEditorInfo().name,o=Rto(process.platform);return L$r(this.ctx,n,r?.login,o,e)}};function wto(t){return t.trimStart().replace(/^\[\.\.\.\]\n?/,"")}a(wto,"processResultOfElidableText");function hVr(t){return t.map(e=>dn(e.content)).join(` +`.trim()}promptContent(e,r,n){if(n.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");let o=q1(e.conversation.getLastTurn().request.message),s=[{role:"system",content:r},{role:"system",content:this.suffix()},{role:"user",content:o}];return Promise.resolve([s,[]])}toolConfig(e){if(e.promptType!=="synonyms")throw new Error("Invalid prompt options for user query strategy");return{tools:wno,tool_choice:{type:"function",function:{name:"queryWithKeywords"}},extractArguments(r){let n=jM(r).keywords;if(!n||!Array.isArray(n))return{keywords:[]};let o=new Set;for(let s of n)if(!(!XFe(s,"keyword")||!s.keyword||typeof s.keyword!="string")&&(o.add(s.keyword.toLowerCase()),!(!XFe(s,"variations")||!s.variations||!Array.isArray(s.variations))))for(let c of s.variations)typeof c=="string"&&o.add(c.toLowerCase());return{keywords:Array.from(o)??[]}}}}};var TPt=class{constructor(e,r,n){this.promptType=e;this.strategy=n;this.modelFamilies=Array.isArray(r)?r:[r]}static{a(this,"PromptStrategyDescriptor")}};function eEe(t,e,r){return new TPt(t,e,r)}a(eEe,"descriptor");var fWr=[eEe("user",ME("user"),()=>new y7e),eEe("inline",ME("inline"),()=>new E7e),eEe("meta",ME("meta"),()=>new _7e),eEe("suggestions",ME("suggestions"),()=>new C7e),eEe("synonyms",ME("synonyms"),()=>new v7e)],b7e=class{static{a(this,"DefaultPromptStrategyFactory")}async createPromptStrategy(e,r,n){let o=fWr.find(s=>s.promptType===r&&s.modelFamilies.includes(n));if(!o)throw new Error(`No prompt strategy found for promptType: ${r} and modelFamily: ${n}`);return o.strategy(e)}get descriptors(){return fWr}};var hWr=require("console");var fm=class{constructor(e,r=new b7e){this.ctx=e;this.promptStrategyFactory=r}static{a(this,"ConversationPromptEngine")}async toPrompt(e,r){let n=await this.promptStrategyFactory.createPromptStrategy(this.ctx,r.promptType,r.modelConfiguration.modelFamily),o=await this.ctx.get(en).getSession(),[s,c]=await n.promptContent(e,this.safetyPrompt(r.userSelectedModelName??r.modelConfiguration.uiName,o),r),[l,u]=this.elideChatMessages(s,r.modelConfiguration);return await this.ctx.get(d0).inspectPrompt({type:r.promptType,prompt:pWr(l),tokens:u}),this.ctx.get(lh).addPrompt(e.turn.id,pWr(l),r.promptType),{messages:l,tokens:u,skillResolutions:c,toolConfig:n.toolConfig?.(r)}}elideChatMessages(e,r){let n=e.filter(l=>!(typeof l.content=="string"||Array.isArray(l.content)));(0,hWr.assert)(n.length==1,"Only one elidable message is supported right now.");let o=this.computeNonElidableTokens(e,r),s=r.maxRequestTokens-o,c=e.map(l=>typeof l.content=="string"||Array.isArray(l.content)?l:{role:l.role,content:Rno(l.content.elide(s).getText())}).filter(l=>l.content.length>0);return[c,nPt(c,r)]}computeNonElidableTokens(e,r){let n=e.filter(o=>typeof o.content=="string");return n.push({role:"user",content:""}),nPt(n,r)}safetyPrompt(e,r){let n=this.ctx.get(Dr).getEditorInfo().readableName??this.ctx.get(Dr).getEditorInfo().name,o=Pno(process.platform);return BVr(this.ctx,n,r?.login,o,e)}};function Rno(t){return t.trimStart().replace(/^\[\.\.\.\]\n?/,"")}a(Rno,"processResultOfElidableText");function pWr(t){return t.map(e=>dn(e.content)).join(` -`)}a(hVr,"debugChatMessages");function Rto(t){switch(t){case"darwin":return"macOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";case"openbsd":return"OpenBSD";case"sunos":return"SunOS";case"aix":return"AIX";default:return}}a(Rto,"mapPlatformToOs");var _F=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"TurnSuggestions")}async fetchRawSuggestions(e,r,n,o){let s=await $o.getModelConfiguration(e.ctx,"suggestions",void 0,{tool_calls:!0}),c={promptType:"suggestions",modelConfiguration:s},l=await this.ctx.get(vm).toPrompt(e,c),u=o.extendedBy({messageSource:"chat.suggestions"},{promptTokenLen:l.tokens}),d={modelConfiguration:s,messages:l.messages,uiKind:n,llmInteraction:e.toLlmInteraction()};if(l.toolConfig===void 0)throw new Error("No tool call configuration found in suggestions prompt.");d.tool_choice=l.toolConfig.tool_choice,d.tools=l.toolConfig.tools;let p=await this.chatFetcher.fetchResponse(d,r,u);if(p.type!=="success"&&(Ge.error(this.ctx,"Failed to fetch suggestions, trying again..."),p=await this.chatFetcher.fetchResponse(d,r,u)),p.type==="success"){if(!p.toolCalls||p.toolCalls.length===0){Ge.error(this.ctx,"Missing tool call in suggestions response");return}let h=p.toolCalls[0],{followUp:m,suggestedTitle:g}=l.toolConfig.extractArguments(h);if(!m||!g){Ge.error(this.ctx,"Missing follow-up or suggested title in suggestions response");return}return{followUp:m.trim(),suggestedTitle:g.trim(),promptTokenLen:l.tokens,numTokens:p.numTokens+h.approxNumTokens}}else if(p.type==="successMultiple"){Ge.error(this.ctx,"successMultiple response is unexpected for suggestions");return}else if(p.type==="tool_calls"){Ge.error(this.ctx,"tool_calls response is unexpected for suggestions");return}else{Ge.error(this.ctx,`Failed to fetch suggestions due to reason: ${p.reason}`);return}}};f();f();var vF=class extends Error{static{a(this,"CodingAgentError")}constructor(e){super(e),this.name=this.constructor.name}},Fne=class extends vF{static{a(this,"CodingAgentAuthenticationError")}constructor(e){super(e)}},UT=class extends vF{static{a(this,"CodingAgentApiError")}constructor(e){super(e)}},fy=class extends vF{static{a(this,"CodingAgentValidationError")}constructor(e){super(e)}},gUe=class extends vF{static{a(this,"CodingAgentInternalError")}constructor(e){super(e)}};f();var Qne=new Se("codingAgentUtils"),Une=29950;function gVr(t,e,r){if(e.length>=Une)return Qne.warn(t,`Truncation: Prompt length ${e.length} exceeds max of ${Une}`),e=e.slice(-Une),{problemStatement:e,isTruncated:!0};let n=!1;if(r&&e.length+r.length>=Une){let o=Une-e.length-2;Qne.warn(t,`Truncation: Combined prompt and context length ${e.length+r.length} exceeds max of ${Une}`),r=o>0?r.slice(-o):"",n=!0}return{problemStatement:e+(r?` +`)}a(pWr,"debugChatMessages");function Pno(t){switch(t){case"darwin":return"macOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";case"openbsd":return"OpenBSD";case"sunos":return"SunOS";case"aix":return"AIX";default:return}}a(Pno,"mapPlatformToOs");var z6=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"TurnSuggestions")}async fetchRawSuggestions(e,r,n,o){let s=await qo.getModelConfiguration(e.ctx,"suggestions",void 0,{tool_calls:!0}),c={promptType:"suggestions",modelConfiguration:s},l=await this.ctx.get(fm).toPrompt(e,c),u=o.extendedBy({messageSource:"chat.suggestions"},{promptTokenLen:l.tokens}),d={modelConfiguration:s,messages:l.messages,uiKind:n,llmInteraction:e.toLlmInteraction()};if(l.toolConfig===void 0)throw new Error("No tool call configuration found in suggestions prompt.");d.tool_choice=l.toolConfig.tool_choice,d.tools=l.toolConfig.tools;let p=await this.chatFetcher.fetchResponse(d,r,u);if(p.type!=="success"&&(Ge.error(this.ctx,"Failed to fetch suggestions, trying again..."),p=await this.chatFetcher.fetchResponse(d,r,u)),p.type==="success"){if(!p.toolCalls||p.toolCalls.length===0){Ge.error(this.ctx,"Missing tool call in suggestions response");return}let h=p.toolCalls[0],{followUp:m,suggestedTitle:g}=l.toolConfig.extractArguments(h);if(!m||!g){Ge.error(this.ctx,"Missing follow-up or suggested title in suggestions response");return}return{followUp:m.trim(),suggestedTitle:g.trim(),promptTokenLen:l.tokens,numTokens:p.numTokens+h.approxNumTokens}}else if(p.type==="successMultiple"){Ge.error(this.ctx,"successMultiple response is unexpected for suggestions");return}else if(p.type==="tool_calls"){Ge.error(this.ctx,"tool_calls response is unexpected for suggestions");return}else{Ge.error(this.ctx,`Failed to fetch suggestions due to reason: ${p.reason}`);return}}};f();f();var Y6=class extends Error{static{a(this,"CodingAgentError")}constructor(e){super(e),this.name=this.constructor.name}},Jre=class extends Y6{static{a(this,"CodingAgentAuthenticationError")}constructor(e){super(e)}},xT=class extends Y6{static{a(this,"CodingAgentApiError")}constructor(e){super(e)}},ny=class extends Y6{static{a(this,"CodingAgentValidationError")}constructor(e){super(e)}},T7e=class extends Y6{static{a(this,"CodingAgentInternalError")}constructor(e){super(e)}};f();var Zre=new Se("codingAgentUtils"),Xre=29950;function mWr(t,e,r){if(e.length>=Xre)return Zre.warn(t,`Truncation: Prompt length ${e.length} exceeds max of ${Xre}`),e=e.slice(-Xre),{problemStatement:e,isTruncated:!0};let n=!1;if(r&&e.length+r.length>=Xre){let o=Xre-e.length-2;Zre.warn(t,`Truncation: Combined prompt and context length ${e.length+r.length} exceeds max of ${Xre}`),r=o>0?r.slice(-o):"",n=!0}return{problemStatement:e+(r?` -${r}`:""),isTruncated:n}}a(gVr,"truncatePrompt");function AVr(t){return t.length<=20?t:t.substring(0,20)+"..."}a(AVr,"generateTitleFromUserPrompt");function yVr(t){return`Coding agent has begun work on **${t||"your request"}** and will update this pull request as work progresses.`}a(yVr,"formatBodyPlaceholder");function EVr(t,e,r){let n=t.get(In),o=[],s=new Set;if(e)for(let c of e)try{if(c.type==="file"||c.type==="directory"){let l=n.getRelativePath({uri:c.uri});l&&!s.has(l)&&(o.push(l),s.add(l),Qne.debug(t,`Added ${c.type} context: ${l}`))}}catch(l){let u=c.type==="file"||c.type==="directory"||c.type==="tool"?c.uri:`${c.type} reference`;Qne.warn(t,`Error extracting relative path for ${u}`,l)}if(r?.uri)try{let c=n.getRelativePath({uri:r.uri});c&&!s.has(c)&&(o.push(c),s.add(c),Qne.debug(t,`Added active editor: ${c}`))}catch(c){Qne.warn(t,`Error extracting relative path for active editor ${r.uri}`,c)}return o}a(EVr,"extractContextPaths");function CVr(t){return t.length===0?"":`The user has attached the following files from their workspace: +${r}`:""),isTruncated:n}}a(mWr,"truncatePrompt");function gWr(t){return t.length<=20?t:t.substring(0,20)+"..."}a(gWr,"generateTitleFromUserPrompt");function AWr(t){return`Coding agent has begun work on **${t||"your request"}** and will update this pull request as work progresses.`}a(AWr,"formatBodyPlaceholder");function yWr(t,e,r){let n=t.get(In),o=[],s=new Set;if(e)for(let c of e)try{if(c.type==="file"||c.type==="directory"){let l=n.getRelativePath({uri:c.uri});l&&!s.has(l)&&(o.push(l),s.add(l),Zre.debug(t,`Added ${c.type} context: ${l}`))}}catch(l){let u=c.type==="file"||c.type==="directory"||c.type==="tool"?c.uri:`${c.type} reference`;Zre.warn(t,`Error extracting relative path for ${u}`,l)}if(r?.uri)try{let c=n.getRelativePath({uri:r.uri});c&&!s.has(c)&&(o.push(c),s.add(c),Zre.debug(t,`Added active editor: ${c}`))}catch(c){Zre.warn(t,`Error extracting relative path for active editor ${r.uri}`,c)}return o}a(yWr,"extractContextPaths");function EWr(t){return t.length===0?"":`The user has attached the following files from their workspace: ${t.map(r=>`- ${r}`).join(` -`)}`}a(CVr,"formatContextFiles");f();f();var AUe=class extends Error{static{a(this,"GitHubClientError")}constructor(e){super(e)}},QT=class extends AUe{static{a(this,"GitHubClientAuthenticationError")}constructor(e="No authenticated GitHub session available"){super(e)}},yp=class extends AUe{constructor(r,n,o){super(o||`GitHub API request failed: ${r} ${n}`);this.status=r;this.statusText=n}static{a(this,"GitHubClientApiError")}isClientError(){return this.status>=400&&this.status<500}isServerError(){return this.status>=500&&this.status<600}};f();var oPt=(h=>(h.Actions="actions",h.Composer="composer",h.Erlang="erlang",h.Go="go",h.Maven="maven",h.Npm="npm",h.Nuget="nuget",h.Pip="pip",h.Pub="pub",h.RubyGems="rubygems",h.Rust="rust",h))(oPt||{});f();f();f();function aC(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}a(aC,"getUserAgent");f();f();function yUe(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((o,s)=>yUe.bind(null,t,s,o,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((o,s)=>s.hook.bind(null,o,n),r)():r(n))}a(yUe,"register");f();function _Vr(t,e,r,n){let o=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=a((s,c)=>Promise.resolve().then(o.bind(null,c)).then(s.bind(null,c)),"hook")),e==="after"&&(n=a((s,c)=>{let l;return Promise.resolve().then(s.bind(null,c)).then(u=>(l=u,o(l,c))).then(()=>l)},"hook")),e==="error"&&(n=a((s,c)=>Promise.resolve().then(s.bind(null,c)).catch(l=>o(l,c)),"hook")),t.registry[r].push({hook:n,orig:o})}a(_Vr,"addHook");f();function vVr(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(o=>o.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}a(vVr,"removeHook");var bVr=Function.bind,TVr=bVr.bind(bVr);function SVr(t,e,r){let n=TVr(vVr,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(o=>{let s=r?[e,o,r]:[e,o];t[o]=t.api[o]=TVr(_Vr,null).apply(null,s)})}a(SVr,"bindApi");function Pto(){let t=Symbol("Singular"),e={registry:{}},r=yUe.bind(null,e,t);return SVr(r,e,t),r}a(Pto,"Singular");function kto(){let t={registry:{}},e=yUe.bind(null,t);return SVr(e,t),e}a(kto,"Collection");var IVr={Singular:Pto,Collection:kto};f();f();var Nto="0.0.0-development",Dto=`octokit-endpoint.js/${Nto} ${aC()}`,Mto={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":Dto},mediaType:{format:""}};function Oto(t){return t?Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}):{}}a(Oto,"lowercaseKeys");function Bto(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(t)}a(Bto,"isPlainObject");function RVr(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{Bto(e[n])?n in t?r[n]=RVr(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}a(RVr,"mergeDeep");function xVr(t){for(let e in t)t[e]===void 0&&delete t[e];return t}a(xVr,"removeUndefinedProperties");function aPt(t,e,r){if(typeof e=="string"){let[o,s]=e.split(" ");r=Object.assign(s?{method:o,url:s}:{url:o},r)}else r=Object.assign({},e);r.headers=Oto(r.headers),xVr(r),xVr(r.headers);let n=RVr(t||{},r);return r.url==="/graphql"&&(t&&t.mediaType.previews?.length&&(n.mediaType.previews=t.mediaType.previews.filter(o=>!n.mediaType.previews.includes(o)).concat(n.mediaType.previews)),n.mediaType.previews=(n.mediaType.previews||[]).map(o=>o.replace(/-preview/,""))),n}a(aPt,"merge");function Lto(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(o=>o==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${o}=${encodeURIComponent(e[o])}`).join("&")}a(Lto,"addQueryParameters");var Fto=/\{[^{}}]+\}/g;function Uto(t){return t.replace(/(?:^\W+)|(?:(?r.concat(n),[]):[]}a(Qto,"extractUrlVariableNames");function wVr(t,e){let r={__proto__:null};for(let n of Object.keys(t))e.indexOf(n)===-1&&(r[n]=t[n]);return r}a(wVr,"omit");function PVr(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}a(PVr,"encodeReserved");function Gne(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}a(Gne,"encodeUnreserved");function nCe(t,e,r){return e=t==="+"||t==="#"?PVr(e):Gne(e),r?Gne(r)+"="+e:e}a(nCe,"encodeValue");function qne(t){return t!=null}a(qne,"isDefined");function sPt(t){return t===";"||t==="&"||t==="?"}a(sPt,"isKeyOperator");function qto(t,e,r,n){var o=t[r],s=[];if(qne(o)&&o!=="")if(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||typeof o=="boolean")o=o.toString(),n&&n!=="*"&&(o=o.substring(0,parseInt(n,10))),s.push(nCe(e,o,sPt(e)?r:""));else if(n==="*")Array.isArray(o)?o.filter(qne).forEach(function(c){s.push(nCe(e,c,sPt(e)?r:""))}):Object.keys(o).forEach(function(c){qne(o[c])&&s.push(nCe(e,o[c],c))});else{let c=[];Array.isArray(o)?o.filter(qne).forEach(function(l){c.push(nCe(e,l))}):Object.keys(o).forEach(function(l){qne(o[l])&&(c.push(Gne(l)),c.push(nCe(e,o[l].toString())))}),sPt(e)?s.push(Gne(r)+"="+c.join(",")):c.length!==0&&s.push(c.join(","))}else e===";"?qne(o)&&s.push(Gne(r)):o===""&&(e==="&"||e==="?")?s.push(Gne(r)+"="):o===""&&s.push("");return s}a(qto,"getValues");function Gto(t){return{expand:Hto.bind(null,t)}}a(Gto,"parseUrl");function Hto(t,e){var r=["+","#",".","/",";","?","&"];return t=t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,o,s){if(o){let l="",u=[];if(r.indexOf(o.charAt(0))!==-1&&(l=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach(function(d){var p=/([^:\*]*)(?::(\d+)|(\*))?/.exec(d);u.push(qto(e,l,p[1],p[2]||p[3]))}),l&&l!=="+"){var c=",";return l==="?"?c="&":l!=="#"&&(c=l),(u.length!==0?l:"")+u.join(c)}else return u.join(",")}else return PVr(s)}),t==="/"?t:t.replace(/\/$/,"")}a(Hto,"expand");function kVr(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),o,s=wVr(t,["method","baseUrl","url","headers","request","mediaType"]),c=Qto(r);r=Gto(r).expand(s),/^http/.test(r)||(r=t.baseUrl+r);let l=Object.keys(t).filter(p=>c.includes(p)).concat("baseUrl"),u=wVr(s,l);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),r.endsWith("/graphql")&&t.mediaType.previews?.length)){let p=n.accept.match(/(?{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${h}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=Lto(r,u):"data"in u?o=u.data:Object.keys(u).length&&(o=u),!n["content-type"]&&typeof o<"u"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof o>"u"&&(o=""),Object.assign({method:e,url:r,headers:n},typeof o<"u"?{body:o}:null,t.request?{request:t.request}:null)}a(kVr,"parse");function jto(t,e,r){return kVr(aPt(t,e,r))}a(jto,"endpointWithDefaults");function NVr(t,e){let r=aPt(t,e),n=jto.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:NVr.bind(null,r),merge:aPt.bind(null,r),parse:kVr})}a(NVr,"withDefaults");var DVr=NVr(null,Mto);var VVr=de(LVr(),1);f();var $to=/^-?\d+$/,QVr=/^-?\d+n+$/,cPt=JSON.stringify,FVr=JSON.parse,Vto=/^-?\d+n$/,Wto=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,zto=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,qVr=a((t,e,r)=>"rawJSON"in JSON?cPt(t,(c,l)=>typeof l=="bigint"?JSON.rawJSON(l.toString()):typeof e=="function"?e(c,l):(Array.isArray(e)&&e.includes(c),l),r):t?cPt(t,(c,l)=>typeof l=="string"&&QVr.test(l)||typeof l=="bigint"?l.toString()+"n":typeof e=="function"?e(c,l):(Array.isArray(e)&&e.includes(c),l),r).replace(Wto,"$1$2$3").replace(zto,"$1$2$3"):cPt(t,e,r),"JSONStringify"),vUe=new Map,Yto=a(()=>{let t=JSON.parse.toString();if(vUe.has(t))return vUe.get(t);try{let e=JSON.parse("1",(r,n,o)=>!!o?.source&&o.source==="1");return vUe.set(t,e),e}catch{return vUe.set(t,!1),!1}},"isContextSourceSupported"),Kto=a((t,e,r,n)=>typeof e=="string"&&Vto.test(e)?BigInt(e.slice(0,-1)):typeof e=="string"&&QVr.test(e)?e.slice(0,-1):typeof n!="function"?e:n(t,e,r),"convertMarkedBigIntsReviver"),Jto=a((t,e)=>JSON.parse(t,(r,n,o)=>{let s=typeof n=="number"&&(n>Number.MAX_SAFE_INTEGER||n{if(!t)return FVr(t,e);if(Yto())return Jto(t,e);let r=t.replace(Xto,(n,o,s,c)=>{let l=n[0]==='"';if(l&&Zto.test(n))return n.substring(0,n.length-1)+'n"';let d=s||c,p=o&&(o.lengthKto(n,o,s,e))},"JSONParse");f();var h$=class extends Error{static{a(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e,{cause:n.cause}),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0);"response"in n&&(this.response=n.response);let o=Object.assign({},n.request);n.request.headers.authorization&&(o.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?"","noop");async function $Vr(t){let e=t.request?.fetch||globalThis.fetch;if(!e)throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");let r=t.request?.log||console,n=t.request?.parseSuccessResponseBody!==!1,o=rro(t.body)||Array.isArray(t.body)?qVr(t.body):t.body,s=Object.fromEntries(Object.entries(t.headers).map(([h,m])=>[h,String(m)])),c;try{c=await e(t.url,{method:t.method,body:o,redirect:t.request?.redirect,headers:s,signal:t.request?.signal,...t.body&&{duplex:"half"}})}catch(h){let m="Unknown Error";if(h instanceof Error){if(h.name==="AbortError")throw h.status=500,h;m=h.message,h.name==="TypeError"&&"cause"in h&&(h.cause instanceof Error?m=h.cause.message:typeof h.cause=="string"&&(m=h.cause))}let g=new h$(m,500,{request:t});throw g.cause=h,g}let l=c.status,u=c.url,d={};for(let[h,m]of c.headers)d[h]=m;let p={url:u,status:l,headers:d,data:""};if("deprecation"in d){let h=d.link&&d.link.match(/<([^<>]+)>; rel="deprecation"/),m=h&&h.pop();r.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${d.sunset}${m?`. See ${m}`:""}`)}if(l===204||l===205)return p;if(t.method==="HEAD"){if(l<400)return p;throw new h$(c.statusText,l,{response:p,request:t})}if(l===304)throw p.data=await lPt(c),new h$("Not modified",l,{response:p,request:t});if(l>=400)throw p.data=await lPt(c),new h$(iro(p.data),l,{response:p,request:t});return p.data=n?await lPt(c):c.body,p}a($Vr,"fetchWrapper");async function lPt(t){let e=t.headers.get("content-type");if(!e)return t.text().catch(jVr);let r=(0,VVr.safeParse)(e);if(nro(r)){let n="";try{return n=await t.text(),HVr(n)}catch{return n}}else return r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"?t.text().catch(jVr):t.arrayBuffer().catch(()=>new ArrayBuffer(0))}a(lPt,"getResponseData");function nro(t){return t.type==="application/json"||t.type==="application/scim+json"}a(nro,"isJSONResponse");function iro(t){if(typeof t=="string")return t;if(t instanceof ArrayBuffer)return"Unknown error";if("message"in t){let e="documentation_url"in t?` - ${t.documentation_url}`:"";return Array.isArray(t.errors)?`${t.message}: ${t.errors.map(r=>JSON.stringify(r)).join(", ")}${e}`:`${t.message}${e}`}return`Unknown error: ${JSON.stringify(t)}`}a(iro,"toErrorMessage");function uPt(t,e){let r=t.defaults(e);return Object.assign(a(function(o,s){let c=r.merge(o,s);if(!c.request||!c.request.hook)return $Vr(r.parse(c));let l=a((u,d)=>$Vr(r.parse(r.merge(u,d))),"request2");return Object.assign(l,{endpoint:r,defaults:uPt.bind(null,r)}),c.request.hook(l,c)},"newApi"),{endpoint:r,defaults:uPt.bind(null,r)})}a(uPt,"withDefaults");var oCe=uPt(DVr,tro);f();var oro="0.0.0-development";function sro(t){return`Request failed due to following response errors: +`)}`}a(EWr,"formatContextFiles");f();f();var S7e=class extends Error{static{a(this,"GitHubClientError")}constructor(e){super(e)}},wT=class extends S7e{static{a(this,"GitHubClientAuthenticationError")}constructor(e="No authenticated GitHub session available"){super(e)}},fp=class extends S7e{constructor(r,n,o){super(o||`GitHub API request failed: ${r} ${n}`);this.status=r;this.statusText=n}static{a(this,"GitHubClientApiError")}isClientError(){return this.status>=400&&this.status<500}isServerError(){return this.status>=500&&this.status<600}};f();var SPt=(h=>(h.Actions="actions",h.Composer="composer",h.Erlang="erlang",h.Go="go",h.Maven="maven",h.Npm="npm",h.Nuget="nuget",h.Pip="pip",h.Pub="pub",h.RubyGems="rubygems",h.Rust="rust",h))(SPt||{});f();f();f();function YE(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}a(YE,"getUserAgent");f();f();function I7e(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((o,s)=>I7e.bind(null,t,s,o,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((o,s)=>s.hook.bind(null,o,n),r)():r(n))}a(I7e,"register");f();function _Wr(t,e,r,n){let o=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=a((s,c)=>Promise.resolve().then(o.bind(null,c)).then(s.bind(null,c)),"hook")),e==="after"&&(n=a((s,c)=>{let l;return Promise.resolve().then(s.bind(null,c)).then(u=>(l=u,o(l,c))).then(()=>l)},"hook")),e==="error"&&(n=a((s,c)=>Promise.resolve().then(s.bind(null,c)).catch(l=>o(l,c)),"hook")),t.registry[r].push({hook:n,orig:o})}a(_Wr,"addHook");f();function CWr(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(o=>o.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}a(CWr,"removeHook");var vWr=Function.bind,bWr=vWr.bind(vWr);function TWr(t,e,r){let n=bWr(CWr,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(o=>{let s=r?[e,o,r]:[e,o];t[o]=t.api[o]=bWr(_Wr,null).apply(null,s)})}a(TWr,"bindApi");function kno(){let t=Symbol("Singular"),e={registry:{}},r=I7e.bind(null,e,t);return TWr(r,e,t),r}a(kno,"Singular");function Dno(){let t={registry:{}},e=I7e.bind(null,t);return TWr(e,t),e}a(Dno,"Collection");var SWr={Singular:kno,Collection:Dno};f();f();var Nno="0.0.0-development",Mno=`octokit-endpoint.js/${Nno} ${YE()}`,Ono={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":Mno},mediaType:{format:""}};function Bno(t){return t?Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}):{}}a(Bno,"lowercaseKeys");function Lno(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(t)}a(Lno,"isPlainObject");function wWr(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{Lno(e[n])?n in t?r[n]=wWr(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}a(wWr,"mergeDeep");function IWr(t){for(let e in t)t[e]===void 0&&delete t[e];return t}a(IWr,"removeUndefinedProperties");function xPt(t,e,r){if(typeof e=="string"){let[o,s]=e.split(" ");r=Object.assign(s?{method:o,url:s}:{url:o},r)}else r=Object.assign({},e);r.headers=Bno(r.headers),IWr(r),IWr(r.headers);let n=wWr(t||{},r);return r.url==="/graphql"&&(t&&t.mediaType.previews?.length&&(n.mediaType.previews=t.mediaType.previews.filter(o=>!n.mediaType.previews.includes(o)).concat(n.mediaType.previews)),n.mediaType.previews=(n.mediaType.previews||[]).map(o=>o.replace(/-preview/,""))),n}a(xPt,"merge");function Fno(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(o=>o==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${o}=${encodeURIComponent(e[o])}`).join("&")}a(Fno,"addQueryParameters");var Uno=/\{[^{}}]+\}/g;function Qno(t){return t.replace(/(?:^\W+)|(?:(?r.concat(n),[]):[]}a(qno,"extractUrlVariableNames");function xWr(t,e){let r={__proto__:null};for(let n of Object.keys(t))e.indexOf(n)===-1&&(r[n]=t[n]);return r}a(xWr,"omit");function RWr(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}a(RWr,"encodeReserved");function tne(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}a(tne,"encodeUnreserved");function tEe(t,e,r){return e=t==="+"||t==="#"?RWr(e):tne(e),r?tne(r)+"="+e:e}a(tEe,"encodeValue");function ene(t){return t!=null}a(ene,"isDefined");function IPt(t){return t===";"||t==="&"||t==="?"}a(IPt,"isKeyOperator");function Gno(t,e,r,n){var o=t[r],s=[];if(ene(o)&&o!=="")if(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||typeof o=="boolean")o=o.toString(),n&&n!=="*"&&(o=o.substring(0,parseInt(n,10))),s.push(tEe(e,o,IPt(e)?r:""));else if(n==="*")Array.isArray(o)?o.filter(ene).forEach(function(c){s.push(tEe(e,c,IPt(e)?r:""))}):Object.keys(o).forEach(function(c){ene(o[c])&&s.push(tEe(e,o[c],c))});else{let c=[];Array.isArray(o)?o.filter(ene).forEach(function(l){c.push(tEe(e,l))}):Object.keys(o).forEach(function(l){ene(o[l])&&(c.push(tne(l)),c.push(tEe(e,o[l].toString())))}),IPt(e)?s.push(tne(r)+"="+c.join(",")):c.length!==0&&s.push(c.join(","))}else e===";"?ene(o)&&s.push(tne(r)):o===""&&(e==="&"||e==="?")?s.push(tne(r)+"="):o===""&&s.push("");return s}a(Gno,"getValues");function Hno(t){return{expand:jno.bind(null,t)}}a(Hno,"parseUrl");function jno(t,e){var r=["+","#",".","/",";","?","&"];return t=t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,o,s){if(o){let l="",u=[];if(r.indexOf(o.charAt(0))!==-1&&(l=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach(function(d){var p=/([^:\*]*)(?::(\d+)|(\*))?/.exec(d);u.push(Gno(e,l,p[1],p[2]||p[3]))}),l&&l!=="+"){var c=",";return l==="?"?c="&":l!=="#"&&(c=l),(u.length!==0?l:"")+u.join(c)}else return u.join(",")}else return RWr(s)}),t==="/"?t:t.replace(/\/$/,"")}a(jno,"expand");function PWr(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),o,s=xWr(t,["method","baseUrl","url","headers","request","mediaType"]),c=qno(r);r=Hno(r).expand(s),/^http/.test(r)||(r=t.baseUrl+r);let l=Object.keys(t).filter(p=>c.includes(p)).concat("baseUrl"),u=xWr(s,l);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),r.endsWith("/graphql")&&t.mediaType.previews?.length)){let p=n.accept.match(/(?{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${h}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=Fno(r,u):"data"in u?o=u.data:Object.keys(u).length&&(o=u),!n["content-type"]&&typeof o<"u"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof o>"u"&&(o=""),Object.assign({method:e,url:r,headers:n},typeof o<"u"?{body:o}:null,t.request?{request:t.request}:null)}a(PWr,"parse");function $no(t,e,r){return PWr(xPt(t,e,r))}a($no,"endpointWithDefaults");function kWr(t,e){let r=xPt(t,e),n=$no.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:kWr.bind(null,r),merge:xPt.bind(null,r),parse:PWr})}a(kWr,"withDefaults");var DWr=kWr(null,Ono);var $Wr=de(BWr(),1);f();var Vno=/^-?\d+$/,UWr=/^-?\d+n+$/,wPt=JSON.stringify,LWr=JSON.parse,Wno=/^-?\d+n$/,zno=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,Yno=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,QWr=a((t,e,r)=>"rawJSON"in JSON?wPt(t,(c,l)=>typeof l=="bigint"?JSON.rawJSON(l.toString()):typeof e=="function"?e(c,l):(Array.isArray(e)&&e.includes(c),l),r):t?wPt(t,(c,l)=>typeof l=="string"&&UWr.test(l)||typeof l=="bigint"?l.toString()+"n":typeof e=="function"?e(c,l):(Array.isArray(e)&&e.includes(c),l),r).replace(zno,"$1$2$3").replace(Yno,"$1$2$3"):wPt(t,e,r),"JSONStringify"),P7e=new Map,Kno=a(()=>{let t=JSON.parse.toString();if(P7e.has(t))return P7e.get(t);try{let e=JSON.parse("1",(r,n,o)=>!!o?.source&&o.source==="1");return P7e.set(t,e),e}catch{return P7e.set(t,!1),!1}},"isContextSourceSupported"),Jno=a((t,e,r,n)=>typeof e=="string"&&Wno.test(e)?BigInt(e.slice(0,-1)):typeof e=="string"&&UWr.test(e)?e.slice(0,-1):typeof n!="function"?e:n(t,e,r),"convertMarkedBigIntsReviver"),Xno=a((t,e)=>JSON.parse(t,(r,n,o)=>{let s=typeof n=="number"&&(n>Number.MAX_SAFE_INTEGER||n{if(!t)return LWr(t,e);if(Kno())return Xno(t,e);let r=t.replace(Zno,(n,o,s,c)=>{let l=n[0]==='"';if(l&&eio.test(n))return n.substring(0,n.length-1)+'n"';let d=s||c,p=o&&(o.lengthJno(n,o,s,e))},"JSONParse");f();var Cj=class extends Error{static{a(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e,{cause:n.cause}),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0);"response"in n&&(this.response=n.response);let o=Object.assign({},n.request);n.request.headers.authorization&&(o.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?"","noop");async function jWr(t){let e=t.request?.fetch||globalThis.fetch;if(!e)throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");let r=t.request?.log||console,n=t.request?.parseSuccessResponseBody!==!1,o=nio(t.body)||Array.isArray(t.body)?QWr(t.body):t.body,s=Object.fromEntries(Object.entries(t.headers).map(([h,m])=>[h,String(m)])),c;try{c=await e(t.url,{method:t.method,body:o,redirect:t.request?.redirect,headers:s,signal:t.request?.signal,...t.body&&{duplex:"half"}})}catch(h){let m="Unknown Error";if(h instanceof Error){if(h.name==="AbortError")throw h.status=500,h;m=h.message,h.name==="TypeError"&&"cause"in h&&(h.cause instanceof Error?m=h.cause.message:typeof h.cause=="string"&&(m=h.cause))}let g=new Cj(m,500,{request:t});throw g.cause=h,g}let l=c.status,u=c.url,d={};for(let[h,m]of c.headers)d[h]=m;let p={url:u,status:l,headers:d,data:""};if("deprecation"in d){let h=d.link&&d.link.match(/<([^<>]+)>; rel="deprecation"/),m=h&&h.pop();r.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${d.sunset}${m?`. See ${m}`:""}`)}if(l===204||l===205)return p;if(t.method==="HEAD"){if(l<400)return p;throw new Cj(c.statusText,l,{response:p,request:t})}if(l===304)throw p.data=await RPt(c),new Cj("Not modified",l,{response:p,request:t});if(l>=400)throw p.data=await RPt(c),new Cj(oio(p.data),l,{response:p,request:t});return p.data=n?await RPt(c):c.body,p}a(jWr,"fetchWrapper");async function RPt(t){let e=t.headers.get("content-type");if(!e)return t.text().catch(HWr);let r=(0,$Wr.safeParse)(e);if(iio(r)){let n="";try{return n=await t.text(),GWr(n)}catch{return n}}else return r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"?t.text().catch(HWr):t.arrayBuffer().catch(()=>new ArrayBuffer(0))}a(RPt,"getResponseData");function iio(t){return t.type==="application/json"||t.type==="application/scim+json"}a(iio,"isJSONResponse");function oio(t){if(typeof t=="string")return t;if(t instanceof ArrayBuffer)return"Unknown error";if("message"in t){let e="documentation_url"in t?` - ${t.documentation_url}`:"";return Array.isArray(t.errors)?`${t.message}: ${t.errors.map(r=>JSON.stringify(r)).join(", ")}${e}`:`${t.message}${e}`}return`Unknown error: ${JSON.stringify(t)}`}a(oio,"toErrorMessage");function PPt(t,e){let r=t.defaults(e);return Object.assign(a(function(o,s){let c=r.merge(o,s);if(!c.request||!c.request.hook)return jWr(r.parse(c));let l=a((u,d)=>jWr(r.parse(r.merge(u,d))),"request2");return Object.assign(l,{endpoint:r,defaults:PPt.bind(null,r)}),c.request.hook(l,c)},"newApi"),{endpoint:r,defaults:PPt.bind(null,r)})}a(PPt,"withDefaults");var nEe=PPt(DWr,rio);f();var sio="0.0.0-development";function aio(t){return`Request failed due to following response errors: `+t.errors.map(e=>` - ${e.message}`).join(` -`)}a(sro,"_buildMessageForResponseErrors");var aro=class extends Error{static{a(this,"GraphqlResponseError")}constructor(t,e,r){super(sro(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},cro=["method","baseUrl","url","headers","request","query","mediaType","operationName"],lro=["query","method","url"],WVr=/\/api\/v3\/?$/;function uro(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let c in r)if(lro.includes(c))return Promise.reject(new Error(`[@octokit/graphql] "${c}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((c,l)=>cro.includes(l)?(c[l]=n[l],c):(c.variables||(c.variables={}),c.variables[l]=n[l],c),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return WVr.test(s)&&(o.url=s.replace(WVr,"/api/graphql")),t(o).then(c=>{if(c.data.errors){let l={};for(let u of Object.keys(c.headers))l[u]=c.headers[u];throw new aro(o,l,c.data)}return c.data.data})}a(uro,"graphql");function dPt(t,e){let r=t.defaults(e);return Object.assign(a((o,s)=>uro(r,o,s),"newApi"),{defaults:dPt.bind(null,r),endpoint:r.endpoint})}a(dPt,"withDefaults");var J3l=dPt(oCe,{headers:{"user-agent":`octokit-graphql.js/${oro} ${aC()}`},method:"POST",url:"/graphql"});function zVr(t){return dPt(t,{method:"POST",url:"/graphql"})}a(zVr,"withCustomRequest");f();var fPt="(?:[a-zA-Z0-9_-]+)",YVr="\\.",KVr=new RegExp(`^${fPt}${YVr}${fPt}${YVr}${fPt}$`),dro=KVr.test.bind(KVr);async function fro(t){let e=dro(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}a(fro,"auth");function pro(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}a(pro,"withAuthorizationPrefix");async function hro(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=pro(t),e(o)}a(hro,"hook");var JVr=a(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(fro.bind(null,e),{hook:hro.bind(null,e)})},"createTokenAuth2");f();var pPt="7.0.6";var XVr=a(()=>{},"noop"),mro=console.warn.bind(console),gro=console.error.bind(console);function Aro(t={}){return typeof t.debug!="function"&&(t.debug=XVr),typeof t.info!="function"&&(t.info=XVr),typeof t.warn!="function"&&(t.warn=mro),typeof t.error!="function"&&(t.error=gro),t}a(Aro,"createLogger");var ZVr=`octokit-core.js/${pPt} ${aC()}`,bUe=class{static{a(this,"Octokit")}static VERSION=pPt;static defaults(e){return class extends this{static{a(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{a(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new IVr.Collection,n={baseUrl:oCe.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${ZVr}`:ZVr,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=oCe.defaults(n),this.graphql=zVr(this.request).defaults(n),this.log=Aro(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...c}=e,l=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:c},e.auth));r.wrap("request",l.hook),this.auth=l}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=JVr(e.auth);r.wrap("request",s.hook),this.auth=s}let o=this.constructor;for(let s=0;s{t.log.debug("request",r);let n=Date.now(),o=t.request.endpoint.parse(r),s=o.url.replace(r.baseUrl,"");return e(r).then(c=>{let l=c.headers["x-github-request-id"];return t.log.info(`${o.method} ${s} - ${c.status} with id ${l} in ${Date.now()-n}ms`),c}).catch(c=>{let l=c.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${o.method} ${s} - ${c.status} with id ${l} in ${Date.now()-n}ms`),c})})}a(hPt,"requestLog");hPt.VERSION=eWr;f();var yro="0.0.0-development";function Ero(t){if(!t.data)return{...t,data:[]};if(!(("total_count"in t.data||"total_commits"in t.data)&&!("url"in t.data)))return t;let r=t.data.incomplete_results,n=t.data.repository_selection,o=t.data.total_count,s=t.data.total_commits;delete t.data.incomplete_results,delete t.data.repository_selection,delete t.data.total_count,delete t.data.total_commits;let c=Object.keys(t.data)[0],l=t.data[c];return t.data=l,typeof r<"u"&&(t.data.incomplete_results=r),typeof n<"u"&&(t.data.repository_selection=n),t.data.total_count=o,t.data.total_commits=s,t}a(Ero,"normalizePaginatedListResponse");function mPt(t,e,r){let n=typeof e=="function"?e.endpoint(r):t.request.endpoint(e,r),o=typeof e=="function"?e:t.request,s=n.method,c=n.headers,l=n.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!l)return{done:!0};try{let u=await o({method:s,url:l,headers:c}),d=Ero(u);if(l=((d.headers.link||"").match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!l&&"total_commits"in d.data){let p=new URL(d.url),h=p.searchParams,m=parseInt(h.get("page")||"1",10),g=parseInt(h.get("per_page")||"250",10);m*g{if(o.done)return e;let s=!1;function c(){s=!0}return a(c,"done"),e=e.concat(n?n(o.value,c):o.value.data),s?e:rWr(t,e,r,n)})}a(rWr,"gather");var TLl=Object.assign(tWr,{iterator:mPt});function gPt(t){return{paginate:Object.assign(tWr.bind(null,t),{iterator:mPt.bind(null,t)})}}a(gPt,"paginateRest");gPt.VERSION=yro;f();f();var APt="17.0.0";f();f();var Cro={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVariable:["POST /orgs/{org}/actions/variables"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createRepoVariable:["POST /repos/{owner}/{repo}/actions/variables"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteCustomImageFromOrg:["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],deleteCustomImageVersionFromOrg:["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],deleteEnvironmentSecret:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],deleteEnvironmentVariable:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],deleteHostedRunnerForOrg:["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteRepoVariable:["DELETE /repos/{owner}/{repo}/actions/variables/{name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],forceCancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"],generateRunnerJitconfigForOrg:["POST /orgs/{org}/actions/runners/generate-jitconfig"],generateRunnerJitconfigForRepo:["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getCustomImageForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],getCustomImageVersionForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],getCustomOidcSubClaimForRepo:["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"],getEnvironmentPublicKey:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],getEnvironmentVariable:["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getHostedRunnerForOrg:["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],getHostedRunnersGithubOwnedImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/github-owned"],getHostedRunnersLimitsForOrg:["GET /orgs/{org}/actions/hosted-runners/limits"],getHostedRunnersMachineSpecsForOrg:["GET /orgs/{org}/actions/hosted-runners/machine-sizes"],getHostedRunnersPartnerImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/partner"],getHostedRunnersPlatformsForOrg:["GET /orgs/{org}/actions/hosted-runners/platforms"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getOrgVariable:["GET /orgs/{org}/actions/variables/{name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getRepoVariable:["GET /repos/{owner}/{repo}/actions/variables/{name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listCustomImageVersionsForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"],listCustomImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom"],listEnvironmentSecrets:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"],listEnvironmentVariables:["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"],listGithubHostedRunnersInGroupForOrg:["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"],listHostedRunnersForOrg:["GET /orgs/{org}/actions/hosted-runners"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listOrgVariables:["GET /orgs/{org}/actions/variables"],listRepoOrganizationSecrets:["GET /repos/{owner}/{repo}/actions/organization-secrets"],listRepoOrganizationVariables:["GET /repos/{owner}/{repo}/actions/organization-variables"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoVariables:["GET /repos/{owner}/{repo}/actions/variables"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedReposForOrgVariable:["GET /orgs/{org}/actions/variables/{name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],reviewCustomGatesForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setCustomOidcSubClaimForRepo:["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedReposForOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"],updateEnvironmentVariable:["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],updateHostedRunnerForOrg:["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],updateOrgVariable:["PATCH /orgs/{org}/actions/variables/{name}"],updateRepoVariable:["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsDone:["DELETE /notifications/threads/{thread_id}"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallationRequestsForAuthenticatedApp:["GET /app/installation-requests"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubBillingPremiumRequestUsageReportOrg:["GET /organizations/{org}/settings/billing/premium_request/usage"],getGithubBillingPremiumRequestUsageReportUser:["GET /users/{username}/settings/billing/premium_request/usage"],getGithubBillingUsageReportOrg:["GET /organizations/{org}/settings/billing/usage"],getGithubBillingUsageReportUser:["GET /users/{username}/settings/billing/usage"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},campaigns:{createCampaign:["POST /orgs/{org}/campaigns"],deleteCampaign:["DELETE /orgs/{org}/campaigns/{campaign_number}"],getCampaignSummary:["GET /orgs/{org}/campaigns/{campaign_number}"],listOrgCampaigns:["GET /orgs/{org}/campaigns"],updateCampaign:["PATCH /orgs/{org}/campaigns/{campaign_number}"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{commitAutofix:["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits"],createAutofix:["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],createVariantAnalysis:["POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"],deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],deleteCodeqlDatabase:["DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getAutofix:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],getCodeqlDatabase:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getDefaultSetup:["GET /repos/{owner}/{repo}/code-scanning/default-setup"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],getVariantAnalysis:["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}"],getVariantAnalysisRepoTask:["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listCodeqlDatabases:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],updateDefaultSetup:["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codeSecurity:{attachConfiguration:["POST /orgs/{org}/code-security/configurations/{configuration_id}/attach"],attachEnterpriseConfiguration:["POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach"],createConfiguration:["POST /orgs/{org}/code-security/configurations"],createConfigurationForEnterprise:["POST /enterprises/{enterprise}/code-security/configurations"],deleteConfiguration:["DELETE /orgs/{org}/code-security/configurations/{configuration_id}"],deleteConfigurationForEnterprise:["DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],detachConfiguration:["DELETE /orgs/{org}/code-security/configurations/detach"],getConfiguration:["GET /orgs/{org}/code-security/configurations/{configuration_id}"],getConfigurationForRepository:["GET /repos/{owner}/{repo}/code-security-configuration"],getConfigurationsForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations"],getConfigurationsForOrg:["GET /orgs/{org}/code-security/configurations"],getDefaultConfigurations:["GET /orgs/{org}/code-security/configurations/defaults"],getDefaultConfigurationsForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations/defaults"],getRepositoriesForConfiguration:["GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories"],getRepositoriesForEnterpriseConfiguration:["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories"],getSingleConfigurationForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],setConfigurationAsDefault:["PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults"],setConfigurationAsDefaultForEnterprise:["PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults"],updateConfiguration:["PATCH /orgs/{org}/code-security/configurations/{configuration_id}"],updateEnterpriseConfiguration:["PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],checkPermissionsForDevcontainer:["GET /repos/{owner}/{repo}/codespaces/permissions_check"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getCodespacesForUserInOrg:["GET /orgs/{org}/members/{username}/codespaces"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getOrgPublicKey:["GET /orgs/{org}/codespaces/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listOrgSecrets:["GET /orgs/{org}/codespaces/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],preFlightWithRepoForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/new"],publishForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/publish"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},copilot:{addCopilotSeatsForTeams:["POST /orgs/{org}/copilot/billing/selected_teams"],addCopilotSeatsForUsers:["POST /orgs/{org}/copilot/billing/selected_users"],cancelCopilotSeatAssignmentForTeams:["DELETE /orgs/{org}/copilot/billing/selected_teams"],cancelCopilotSeatAssignmentForUsers:["DELETE /orgs/{org}/copilot/billing/selected_users"],copilotMetricsForOrganization:["GET /orgs/{org}/copilot/metrics"],copilotMetricsForTeam:["GET /orgs/{org}/team/{team_slug}/copilot/metrics"],getCopilotOrganizationDetails:["GET /orgs/{org}/copilot/billing"],getCopilotSeatDetailsForUser:["GET /orgs/{org}/members/{username}/copilot"],listCopilotSeats:["GET /orgs/{org}/copilot/billing/seats"]},credentials:{revoke:["POST /credentials/revoke"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getAlert:["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/dependabot/alerts"],listAlertsForOrg:["GET /orgs/{org}/dependabot/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/dependabot/alerts"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],repositoryAccessForOrg:["GET /organizations/{org}/dependabot/repository-access"],setRepositoryAccessDefaultLevel:["PUT /organizations/{org}/dependabot/repository-access/default-level"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],updateAlert:["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],updateRepositoryAccessForOrg:["PATCH /organizations/{org}/dependabot/repository-access"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"],exportSbom:["GET /repos/{owner}/{repo}/dependency-graph/sbom"]},emojis:{get:["GET /emojis"]},enterpriseTeamMemberships:{add:["PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],bulkAdd:["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"],bulkRemove:["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"],get:["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],list:["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"],remove:["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"]},enterpriseTeamOrganizations:{add:["PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],bulkAdd:["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"],bulkRemove:["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"],delete:["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],getAssignment:["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],getAssignments:["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"]},enterpriseTeams:{create:["POST /enterprises/{enterprise}/teams"],delete:["DELETE /enterprises/{enterprise}/teams/{team_slug}"],get:["GET /enterprises/{enterprise}/teams/{team_slug}"],list:["GET /enterprises/{enterprise}/teams"],update:["PATCH /enterprises/{enterprise}/teams/{team_slug}"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},hostedCompute:{createNetworkConfigurationForOrg:["POST /orgs/{org}/settings/network-configurations"],deleteNetworkConfigurationFromOrg:["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"],getNetworkConfigurationForOrg:["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"],getNetworkSettingsForOrg:["GET /orgs/{org}/settings/network-settings/{network_settings_id}"],listNetworkConfigurationsForOrg:["GET /orgs/{org}/settings/network-configurations"],updateNetworkConfigurationForOrg:["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addBlockedByDependency:["POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],addSubIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],checkUserCanBeAssignedToIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],getParent:["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listDependenciesBlockedBy:["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],listDependenciesBlocking:["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],listSubIssues:["GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeDependencyBlockedBy:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],removeSubIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue"],reprioritizeSubIssue:["PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getAllVersions:["GET /versions"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]},oidc:{getOidcCustomSubTemplateForOrg:["GET /orgs/{org}/actions/oidc/customization/sub"],updateOidcCustomSubTemplateForOrg:["PUT /orgs/{org}/actions/oidc/customization/sub"]},orgs:{addSecurityManagerTeam:["PUT /orgs/{org}/security-managers/teams/{team_slug}",{},{deprecated:"octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team"}],assignTeamToOrgRole:["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],assignUserToOrgRole:["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"],blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createArtifactStorageRecord:["POST /orgs/{org}/artifacts/metadata/storage-record"],createInvitation:["POST /orgs/{org}/invitations"],createIssueType:["POST /orgs/{org}/issue-types"],createWebhook:["POST /orgs/{org}/hooks"],customPropertiesForOrgsCreateOrUpdateOrganizationValues:["PATCH /organizations/{org}/org-properties/values"],customPropertiesForOrgsGetOrganizationValues:["GET /organizations/{org}/org-properties/values"],customPropertiesForReposCreateOrUpdateOrganizationDefinition:["PUT /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposCreateOrUpdateOrganizationDefinitions:["PATCH /orgs/{org}/properties/schema"],customPropertiesForReposCreateOrUpdateOrganizationValues:["PATCH /orgs/{org}/properties/values"],customPropertiesForReposDeleteOrganizationDefinition:["DELETE /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposGetOrganizationDefinition:["GET /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposGetOrganizationDefinitions:["GET /orgs/{org}/properties/schema"],customPropertiesForReposGetOrganizationValues:["GET /orgs/{org}/properties/values"],delete:["DELETE /orgs/{org}"],deleteAttestationsBulk:["POST /orgs/{org}/attestations/delete-request"],deleteAttestationsById:["DELETE /orgs/{org}/attestations/{attestation_id}"],deleteAttestationsBySubjectDigest:["DELETE /orgs/{org}/attestations/digest/{subject_digest}"],deleteIssueType:["DELETE /orgs/{org}/issue-types/{issue_type_id}"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],disableSelectedRepositoryImmutableReleasesOrganization:["DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],enableSelectedRepositoryImmutableReleasesOrganization:["PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],get:["GET /orgs/{org}"],getImmutableReleasesSettings:["GET /orgs/{org}/settings/immutable-releases"],getImmutableReleasesSettingsRepositories:["GET /orgs/{org}/settings/immutable-releases/repositories"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getOrgRole:["GET /orgs/{org}/organization-roles/{role_id}"],getOrgRulesetHistory:["GET /orgs/{org}/rulesets/{ruleset_id}/history"],getOrgRulesetVersion:["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listArtifactStorageRecords:["GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"],listAttestationRepositories:["GET /orgs/{org}/attestations/repositories"],listAttestations:["GET /orgs/{org}/attestations/{subject_digest}"],listAttestationsBulk:["POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"],listBlockedUsers:["GET /orgs/{org}/blocks"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listIssueTypes:["GET /orgs/{org}/issue-types"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOrgRoleTeams:["GET /orgs/{org}/organization-roles/{role_id}/teams"],listOrgRoleUsers:["GET /orgs/{org}/organization-roles/{role_id}/users"],listOrgRoles:["GET /orgs/{org}/organization-roles"],listOrganizationFineGrainedPermissions:["GET /orgs/{org}/organization-fine-grained-permissions"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPatGrantRepositories:["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"],listPatGrantRequestRepositories:["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"],listPatGrantRequests:["GET /orgs/{org}/personal-access-token-requests"],listPatGrants:["GET /orgs/{org}/personal-access-tokens"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listSecurityManagerTeams:["GET /orgs/{org}/security-managers",{},{deprecated:"octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams"}],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],removeSecurityManagerTeam:["DELETE /orgs/{org}/security-managers/teams/{team_slug}",{},{deprecated:"octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team"}],reviewPatGrantRequest:["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"],reviewPatGrantRequestsInBulk:["POST /orgs/{org}/personal-access-token-requests"],revokeAllOrgRolesTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"],revokeAllOrgRolesUser:["DELETE /orgs/{org}/organization-roles/users/{username}"],revokeOrgRoleTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],revokeOrgRoleUser:["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"],setImmutableReleasesSettings:["PUT /orgs/{org}/settings/immutable-releases"],setImmutableReleasesSettingsRepositories:["PUT /orgs/{org}/settings/immutable-releases/repositories"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateIssueType:["PUT /orgs/{org}/issue-types/{issue_type_id}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updatePatAccess:["POST /orgs/{org}/personal-access-tokens/{pat_id}"],updatePatAccesses:["POST /orgs/{org}/personal-access-tokens"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listDockerMigrationConflictingPackagesForAuthenticatedUser:["GET /user/docker/conflicts"],listDockerMigrationConflictingPackagesForOrganization:["GET /orgs/{org}/docker/conflicts"],listDockerMigrationConflictingPackagesForUser:["GET /users/{username}/docker/conflicts"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},privateRegistries:{createOrgPrivateRegistry:["POST /orgs/{org}/private-registries"],deleteOrgPrivateRegistry:["DELETE /orgs/{org}/private-registries/{secret_name}"],getOrgPrivateRegistry:["GET /orgs/{org}/private-registries/{secret_name}"],getOrgPublicKey:["GET /orgs/{org}/private-registries/public-key"],listOrgPrivateRegistries:["GET /orgs/{org}/private-registries"],updateOrgPrivateRegistry:["PATCH /orgs/{org}/private-registries/{secret_name}"]},projects:{addItemForOrg:["POST /orgs/{org}/projectsV2/{project_number}/items"],addItemForUser:["POST /users/{username}/projectsV2/{project_number}/items"],deleteItemForOrg:["DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],deleteItemForUser:["DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"],getFieldForOrg:["GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"],getFieldForUser:["GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"],getForOrg:["GET /orgs/{org}/projectsV2/{project_number}"],getForUser:["GET /users/{username}/projectsV2/{project_number}"],getOrgItem:["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],getUserItem:["GET /users/{username}/projectsV2/{project_number}/items/{item_id}"],listFieldsForOrg:["GET /orgs/{org}/projectsV2/{project_number}/fields"],listFieldsForUser:["GET /users/{username}/projectsV2/{project_number}/fields"],listForOrg:["GET /orgs/{org}/projectsV2"],listForUser:["GET /users/{username}/projectsV2"],listItemsForOrg:["GET /orgs/{org}/projectsV2/{project_number}/items"],listItemsForUser:["GET /users/{username}/projectsV2/{project_number}/items"],updateItemForOrg:["PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],updateItemForUser:["PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],cancelPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"],checkAutomatedSecurityFixes:["GET /repos/{owner}/{repo}/automated-security-fixes"],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkImmutableReleases:["GET /repos/{owner}/{repo}/immutable-releases"],checkPrivateVulnerabilityReporting:["GET /repos/{owner}/{repo}/private-vulnerability-reporting"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAttestation:["POST /repos/{owner}/{repo}/attestations"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentBranchPolicy:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],createDeploymentProtectionRule:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createOrgRuleset:["POST /orgs/{org}/rulesets"],createPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createRepoRuleset:["POST /repos/{owner}/{repo}/rulesets"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],customPropertiesForReposCreateOrUpdateRepositoryValues:["PATCH /repos/{owner}/{repo}/properties/values"],customPropertiesForReposGetRepositoryValues:["GET /repos/{owner}/{repo}/properties/values"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteDeploymentBranchPolicy:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deleteOrgRuleset:["DELETE /orgs/{org}/rulesets/{ruleset_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteRepoRuleset:["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableDeploymentProtectionRule:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],disableImmutableReleases:["DELETE /repos/{owner}/{repo}/immutable-releases"],disablePrivateVulnerabilityReporting:["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enableImmutableReleases:["PUT /repos/{owner}/{repo}/immutable-releases"],enablePrivateVulnerabilityReporting:["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllDeploymentProtectionRules:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getBranchRules:["GET /repos/{owner}/{repo}/rules/branches/{branch}"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getCustomDeploymentProtectionRule:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentBranchPolicy:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getOrgRuleSuite:["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],getOrgRuleSuites:["GET /orgs/{org}/rulesets/rule-suites"],getOrgRuleset:["GET /orgs/{org}/rulesets/{ruleset_id}"],getOrgRulesets:["GET /orgs/{org}/rulesets"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesDeployment:["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getRepoRuleSuite:["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"],getRepoRuleSuites:["GET /repos/{owner}/{repo}/rulesets/rule-suites"],getRepoRuleset:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],getRepoRulesetHistory:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"],getRepoRulesetVersion:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"],getRepoRulesets:["GET /repos/{owner}/{repo}/rulesets"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listActivities:["GET /repos/{owner}/{repo}/activity"],listAttestations:["GET /repos/{owner}/{repo}/attestations/{subject_digest}"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listCustomDeploymentRuleIntegrations:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentBranchPolicies:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateDeploymentBranchPolicy:["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updateOrgRuleset:["PUT /orgs/{org}/rulesets/{ruleset_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateRepoRuleset:["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{createPushProtectionBypass:["POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"],getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],getScanHistory:["GET /repos/{owner}/{repo}/secret-scanning/scan-history"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],listOrgPatternConfigs:["GET /orgs/{org}/secret-scanning/pattern-configurations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],updateOrgPatternConfigs:["PATCH /orgs/{org}/secret-scanning/pattern-configurations"]},securityAdvisories:{createFork:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"],createPrivateVulnerabilityReport:["POST /repos/{owner}/{repo}/security-advisories/reports"],createRepositoryAdvisory:["POST /repos/{owner}/{repo}/security-advisories"],createRepositoryAdvisoryCveRequest:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"],getGlobalAdvisory:["GET /advisories/{ghsa_id}"],getRepositoryAdvisory:["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"],listGlobalAdvisories:["GET /advisories"],listOrgRepositoryAdvisories:["GET /orgs/{org}/security-advisories"],listRepositoryAdvisories:["GET /repos/{owner}/{repo}/security-advisories"],updateRepositoryAdvisory:["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],addSocialAccountForAuthenticatedUser:["POST /user/social_accounts"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],createSshSigningKeyForAuthenticatedUser:["POST /user/ssh_signing_keys"],deleteAttestationsBulk:["POST /users/{username}/attestations/delete-request"],deleteAttestationsById:["DELETE /users/{username}/attestations/{attestation_id}"],deleteAttestationsBySubjectDigest:["DELETE /users/{username}/attestations/digest/{subject_digest}"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],deleteSocialAccountForAuthenticatedUser:["DELETE /user/social_accounts"],deleteSshSigningKeyForAuthenticatedUser:["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getById:["GET /user/{account_id}"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],getSshSigningKeyForAuthenticatedUser:["GET /user/ssh_signing_keys/{ssh_signing_key_id}"],list:["GET /users"],listAttestations:["GET /users/{username}/attestations/{subject_digest}"],listAttestationsBulk:["POST /users/{username}/attestations/bulk-list{?per_page,before,after}"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],listSocialAccountsForAuthenticatedUser:["GET /user/social_accounts"],listSocialAccountsForUser:["GET /users/{username}/social_accounts"],listSshSigningKeysForAuthenticatedUser:["GET /user/ssh_signing_keys"],listSshSigningKeysForUser:["GET /users/{username}/ssh_signing_keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}},nWr=Cro;var m$=new Map;for(let[t,e]of Object.entries(nWr))for(let[r,n]of Object.entries(e)){let[o,s,c]=n,[l,u]=o.split(/ /),d=Object.assign({method:l,url:u},s);m$.has(t)||m$.set(t,new Map),m$.get(t).set(r,{scope:t,methodName:r,endpointDefaults:d,decorations:c})}var _ro={has({scope:t},e){return m$.get(t).has(e)},getOwnPropertyDescriptor(t,e){return{value:this.get(t,e),configurable:!0,writable:!0,enumerable:!0}},defineProperty(t,e,r){return Object.defineProperty(t.cache,e,r),!0},deleteProperty(t,e){return delete t.cache[e],!0},ownKeys({scope:t}){return[...m$.get(t).keys()]},set(t,e,r){return t.cache[e]=r},get({octokit:t,scope:e,cache:r},n){if(r[n])return r[n];let o=m$.get(e).get(n);if(!o)return;let{endpointDefaults:s,decorations:c}=o;return c?r[n]=vro(t,e,n,s,c):r[n]=t.request.defaults(s),r[n]}};function yPt(t){let e={};for(let r of m$.keys())e[r]=new Proxy({octokit:t,scope:r,cache:{}},_ro);return e}a(yPt,"endpointsToMethods");function vro(t,e,r,n,o){let s=t.request.defaults(n);function c(...l){let u=s.endpoint.merge(...l);if(o.mapToData)return u=Object.assign({},u,{data:u[o.mapToData],[o.mapToData]:void 0}),s(u);if(o.renamed){let[d,p]=o.renamed;t.log.warn(`octokit.${e}.${r}() has been renamed to octokit.${d}.${p}()`)}if(o.deprecated&&t.log.warn(o.deprecated),o.renamedParameters){let d=s.endpoint.merge(...l);for(let[p,h]of Object.entries(o.renamedParameters))p in d&&(t.log.warn(`"${p}" parameter is deprecated for "octokit.${e}.${r}()". Use "${h}" instead`),h in d||(d[h]=d[p]),delete d[p]);return s(d)}return s(...l)}return a(c,"withDecorations"),Object.assign(c,s)}a(vro,"decorate");function bro(t){return{rest:yPt(t)}}a(bro,"restEndpointMethods");bro.VERSION=APt;function EPt(t){let e=yPt(t);return{...e,rest:e}}a(EPt,"legacyRestEndpointMethods");EPt.VERSION=APt;f();var iWr="22.0.1";var oWr=bUe.plugin(hPt,EPt,gPt).defaults({userAgent:`octokit-rest.js/${iWr}`});var Sro=new Set(["copilot-pull-request-reviewer","copilot-swe-agent","Copilot"]),Ic=new Se("GitHubClient"),cC=class{constructor(e){this.ctx=e;this.octokit=null}static{a(this,"GitHubClient")}async getOctokit(){if(this.octokit)return this.octokit;let e=await this.getApiSession(),r=this.ctx.get(dr);return this.octokit=new oWr({auth:e.accessToken,baseUrl:e.apiUrl,request:{fetch:r.fetch.bind(r)}}),this.octokit}async getCopilotTimelineEvents(e,r,n,o){if(!o||!Sro.has(o))return Ic.debug(this.ctx,`Skipping timeline events for ${e}/${r}#${n}: author '${o}' is not a Copilot account`),[];Ic.debug(this.ctx,`Fetching Copilot timeline events for ${e}/${r}#${n}`);let s=await this.getOctokit();try{let c=[],l=1,u=!0;for(;u;){Ic.debug(this.ctx,`Fetching timeline events page ${l} for ${e}/${r}#${n}`);let d=await s.rest.issues.listEventsForTimeline({owner:e,repo:r,issue_number:n,per_page:100,page:l});for(let h of d.data){let m=h;m.created_at&&m.node_id&&(h.event==="copilot_work_started"?c.push({id:m.node_id,eventType:"in_progress",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}):h.event==="copilot_work_finished"?c.push({id:m.node_id,eventType:"done",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}):h.event==="copilot_work_finished_failure"&&c.push({id:m.node_id,eventType:"error",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}))}let p=d.headers.link;u=p?p.includes('rel="next"'):!1,l++}return Ic.debug(this.ctx,`Found ${c.length} Copilot timeline events for ${e}/${r}#${n}`),c}catch(c){if(Ic.error(this.ctx,`Failed to fetch Copilot timeline events for ${e}/${r}#${n}:`,c),c&&typeof c=="object"&&"status"in c){let l=c;throw new yp(l.status,l.message||"GitHub API error")}throw c}}async getCopilotWorkingStatus(e,r,n,o){Ic.debug(this.ctx,`Getting Copilot working status for ${e}/${r}#${n}`);try{let s=await this.getCopilotTimelineEvents(e,r,n,o),c;if(s.length>0){let l=s[s.length-1];l.eventType==="done"?c="done":l.eventType==="in_progress"?c="in_progress":l.eventType==="error"?c="error":c="not_copilot_issue"}else c="not_copilot_issue";return Ic.debug(this.ctx,`Copilot working status for ${e}/${r}#${n}: ${c}`),c}catch(s){return Ic.error(this.ctx,`Error getting Copilot working status for ${e}/${r}#${n}, treating as not Copilot issue:`,s),"not_copilot_issue"}}async cancelWorkflow(e,r,n){Ic.debug(this.ctx,`Cancelling workflow run ${n} for ${e}/${r}`);let o=await this.getOctokit();try{return await o.rest.actions.cancelWorkflowRun({owner:e,repo:r,run_id:n}),Ic.debug(this.ctx,`Successfully cancelled workflow run ${n} for ${e}/${r}`),!0}catch(s){if(Ic.error(this.ctx,`Failed to cancel workflow run ${n} for ${e}/${r}:`,s),s&&typeof s=="object"&&"status"in s){let c=s;throw new yp(c.status,c.message||"GitHub API error")}throw s}}async listPullRequestFiles(e,r,n){Ic.debug(this.ctx,`Listing files for pull request ${e}/${r}#${n}`);let o=await this.getOctokit();try{let s=[],c=1,l=!0;for(;l;){Ic.debug(this.ctx,`Fetching pull request files page ${c} for ${e}/${r}#${n}`);let u=await o.rest.pulls.listFiles({owner:e,repo:r,pull_number:n,per_page:100,page:c});for(let p of u.data)s.push({fileName:p.filename});let d=u.headers.link;l=d?d.includes('rel="next"'):!1,c++}return Ic.debug(this.ctx,`Found ${s.length} files in pull request ${e}/${r}#${n}`),s}catch(s){if(Ic.error(this.ctx,`Failed to list files for pull request ${e}/${r}#${n}:`,s),s&&typeof s=="object"&&"status"in s){let c=s;throw new yp(c.status,c.message||"GitHub API error")}throw s}}async getBranch(e,r,n){Ic.debug(this.ctx,`Getting branch ${n} from ${e}/${r}`);let o=await this.getOctokit();try{let s=await o.rest.repos.getBranch({owner:e,repo:r,branch:n});return Ic.debug(this.ctx,`Successfully retrieved branch ${n} from ${e}/${r}`),s.data}catch(s){if(s&&typeof s=="object"&&"status"in s){let c=s;throw Ic.debug(this.ctx,`GitHub API error getting branch ${n}: HTTP ${c.status} - ${c.message}`),new yp(c.status,c.message||"GitHub API error")}throw Ic.error(this.ctx,`Unexpected error getting branch ${n} for ${e}/${r}:`,s),s}}async getPullRequest(e,r,n){Ic.debug(this.ctx,`Getting pull request ${e}/${r}#${n}`);let o=await this.getOctokit();try{let s=await o.rest.pulls.get({owner:e,repo:r,pull_number:n});return Ic.debug(this.ctx,`Successfully retrieved pull request ${e}/${r}#${n}`),{html_url:s.data.html_url,number:s.data.number,title:s.data.title,body:s.data.body||void 0}}catch(s){if(s&&typeof s=="object"&&"status"in s){let c=s;throw Ic.debug(this.ctx,`GitHub API error getting pull request #${n}: HTTP ${c.status} - ${c.message}`),new yp(c.status,c.message||"GitHub API error")}throw Ic.error(this.ctx,`Unexpected error getting pull request ${e}/${r}#${n}:`,s),s}}async listSecurityAdvisories(e,r,n=100){Ic.debug(this.ctx,`Listing security advisories for ${r.length} ${e} packages`);let o=await this.getOctokit();try{let s=[],c=1,l=!0;for(;l;){Ic.debug(this.ctx,`Fetching security advisories page ${c} for ${r.length} ${e} packages`);let u=await o.securityAdvisories.listGlobalAdvisories({ecosystem:e,affects:r,direction:"asc",sort:"published",per_page:n,page:c});s.push(...u.data);let d=u.headers.link;l=d?d.includes('rel="next"'):!1,c++}return Ic.debug(this.ctx,`Found ${s.length} security advisories for ${r.length} ${e} packages`),s}catch(s){if(Ic.error(this.ctx,"Failed to list security advisories:",s),s&&typeof s=="object"&&"status"in s){let c=s;throw Ic.debug(this.ctx,`GitHub API error listing security advisories for ${r.length} ${e} packages: HTTP ${c.status} - ${c.message}`),new yp(c.status,c.message||"GitHub API error")}throw s}}async getApiSession(){let e=await this.ctx.get(en).getSession();if(!e)throw new QT;return{apiUrl:e.apiUrl.replace(/\/$/,""),accessToken:e.accessToken}}};var xu=new Se("CodingAgentClient"),Hne=class{constructor(e,r){this.ctx=e;this.timeout=r??3e4}static{a(this,"CodingAgentClient")}getBaseUrl(){return"https://api.githubcopilot.com"}async createCodingTask(e,r,n,o,s,c){xu.debug(this.ctx,`Creating coding agent task for ${n}/${o} with title: ${e}`),this.validateCreateTaskParams(e,r,n,o);let l=await this.getAccessToken(),d=`${this.getBaseUrl()}/agents/swe/${"v1"}/jobs/${n}/${o}`,p={problem_statement:r,event_type:"jetbrains",pull_request:{title:e,body_placeholder:yVr(e),...s&&{base_ref:s}}},h={Authorization:`Bearer ${l}`,"Content-Type":"application/json",Accept:"application/json",...O1(this.ctx)};if(c?.isCancellationRequested)throw xu.debug(this.ctx,`Create coding task was cancelled before sending API request for ${n}/${o} with title: ${e}`),new $1;let g=await this.ctx.get(dr).fetch(d,{method:"POST",headers:h,body:JSON.stringify(p),timeout:this.timeout});if(c?.isCancellationRequested)throw xu.debug(this.ctx,`Create coding task was cancelled after sending API request for ${n}/${o} with title: ${e}`),new $1;let A=await this.handleCreateJobResponse(g);if(c?.isCancellationRequested)throw xu.debug(this.ctx,`Create coding task was cancelled after receiving job response for ${n}/${o} with title: ${e}`),new $1;let y=await this.waitForJobPullRequest(n,o,A.job_id,l,c);if(c?.isCancellationRequested)throw xu.debug(this.ctx,`Create coding task was cancelled after polling job ${A.job_id} for ${n}/${o}`),new $1;let E=y.pull_request?.number;if(typeof E!="number")throw new UT("No valid pull request number returned from job");let v=await new cC(this.ctx).getPullRequest(n,o,E);return xu.debug(this.ctx,`Coding task created successfully for ${n}/${o}: job ${A.job_id}, session ${A.session_id}, PR #${v.number}`),v}validateCreateTaskParams(e,r,n,o){if(!e?.trim())throw xu.debug(this.ctx,"Validation failed: Title is required and cannot be empty"),new fy("Title is required and cannot be empty");if(!r?.trim())throw xu.debug(this.ctx,"Validation failed: ProblemStatement is required and cannot be empty"),new fy("ProblemStatement is required and cannot be empty");if(!n?.trim())throw xu.debug(this.ctx,"Validation failed: Owner is required and cannot be empty"),new fy("Owner is required and cannot be empty");if(!o?.trim())throw xu.debug(this.ctx,"Validation failed: Repository name is required and cannot be empty"),new fy("Repository name is required and cannot be empty");xu.debug(this.ctx,`Validation passed for ${n}/${o}`)}async getAccessToken(){let r=await this.ctx.get(en).getSession();if(!r?.accessToken)throw xu.debug(this.ctx,"Failed to get access token"),new Fne("Failed to call coding agent API: Not authenticated with GitHub");return r.accessToken}async getAllSessions(e,r){xu.debug(this.ctx,`Getting all coding agent sessions for pull request ID: ${e}`);let n=await this.getAccessToken(),o=this.getBaseUrl();if(r?.isCancellationRequested)throw xu.debug(this.ctx,`Get all sessions operation was cancelled before sending API request for pull request ID: ${e}`),new $1;try{let s=`${o}/agents/sessions/resource/pull/${e}`,c={Authorization:`Bearer ${n}`,Accept:"application/json",...O1(this.ctx)},u=await this.ctx.get(dr).fetch(s,{method:"GET",headers:c,timeout:this.timeout});if(r?.isCancellationRequested)throw xu.debug(this.ctx,`Get all sessions operation was cancelled after sending API request for pull request ID: ${e}`),new $1;if(!u.ok){let p=await u.text().catch(()=>u.statusText),h=`Failed to get coding agent sessions: HTTP ${u.status} - ${p}`;throw xu.error(this.ctx,h),new UT(h)}let d=await u.json();return xu.debug(this.ctx,`Found ${d.sessions?.length||0} coding agent sessions for pull request ID: ${e}`),d.sessions||null}catch(s){let c=`Failed to get coding agent sessions: ${s instanceof Error?s.message:JSON.stringify(s)}`;throw xu.error(this.ctx,c),new gUe(c)}}async waitForJobPullRequest(e,r,n,o,s){let c=Date.now(),l=3e4,u=2e3;for(;Date.now()-csetTimeout(r,e))}async handleCreateJobResponse(e){if(!e.ok){let n=await e.text().catch(()=>e.statusText);throw xu.error(this.ctx,`Coding agent API request failed with status ${e.status}: ${n}`),e.status===403||e.status===401?new UT("Coding agent is not enabled or you do not have access. Learn more about coding agent at https://docs.github.com/copilot/concepts/agents/coding-agent/about-coding-agent"):new UT(`API request failed: HTTP ${e.status} - ${n}`)}let r;try{r=await e.json()}catch(n){let o=n instanceof Error?n.message:JSON.stringify(n);throw xu.error(this.ctx,`Failed to parse create coding task API response as JSON: ${o}`),new UT(`Failed to parse API response as JSON: ${o}`)}if(!r.job_id||!r.session_id)throw xu.error(this.ctx,"API response missing job_id or session_id",r),new UT("Invalid response from coding agent");return r}};f();f();var hk=class{static{a(this,"LSPRequestSender")}};var aWr=de(Nn());var TUe=class{constructor(){this.codingAgentMessageRequestType=new aWr.ProtocolRequestType("copilot/codingAgentMessage")}static{a(this,"CodingAgentMessageHandler")}async sendCodingAgentMessage(e,r,n,o){try{Ge.debug(e.ctx,`Sending coding agent message to client: ${r} - ${o}`);let c=await e.ctx.get(hk).sendRequest(this.codingAgentMessageRequestType,{title:r,description:n,prLink:o,conversationId:e.conversation.id.toString(),turnId:e.turn.id.toString()});return Ge.debug(e.ctx,"Successfully sent coding agent message to client"),c}catch(s){let c=`Failed to send coding agent message: ${s instanceof Error?s.message:JSON.stringify(s)}`;return Ge.error(e.ctx,c,s),{success:!1,error:c}}}};f();f();f();f();var lC=de(po());function CPt(t){return{isCancellationRequested:t.isCancellationRequested,onCancellationRequested:a(e=>{let r=t.onCancellationRequested(e);return{dispose:a(()=>r.dispose(),"dispose")}},"onCancellationRequested")}}a(CPt,"adaptCancellationToken");function cWr(t){return{report:a(e=>{"value"in e&&typeof e.value=="string"?t({text:e.value}):t({})},"report")}}a(cWr,"adaptProgressCallback");function lWr(t){return{modelMaxPromptTokens:t.maxRequestTokens}}a(lWr,"createEndpointInfo");function uWr(t){let e={role:Iro(t.role),content:xro(t.content)};if(t.role===lC.Raw.ChatRole.Assistant&&"toolCalls"in t&&t.toolCalls&&(e.tool_calls=t.toolCalls.map(r=>({id:r.id,type:r.type,function:r.function,approxNumTokens:0}))),t.role===lC.Raw.ChatRole.Tool&&"toolCallId"in t&&t.toolCallId&&(e.tool_call_id=t.toolCallId),Array.isArray(t.content)){let r=!1;for(let n of t.content){if(n.type===lC.Raw.ChatCompletionContentPartKind.Opaque&&n.value){let o=w7e(n);o&&(e.thinking=o);let s=x7e(n);s&&(e.phase=s)}n.type===lC.Raw.ChatCompletionContentPartKind.CacheBreakpoint&&(r=!0)}r&&(e.copilot_cache_control={type:"ephemeral"})}return Object.entries(t).forEach(([r,n])=>{["role","content","toolCalls","toolCallId"].includes(r)||(e[r]=n)}),e}a(uWr,"convertToCopilotChatMessage");function Iro(t){switch(t){case lC.Raw.ChatRole.System:return"system";case lC.Raw.ChatRole.User:return"user";case lC.Raw.ChatRole.Assistant:return"assistant";case lC.Raw.ChatRole.Tool:return"tool";default:return"user"}}a(Iro,"convertRole");function xro(t){if(typeof t=="string")return t;if(Array.isArray(t)){let e=t.filter(r=>r.type===lC.Raw.ChatCompletionContentPartKind.Text||r.type===lC.Raw.ChatCompletionContentPartKind.Image);return e.length===1&&e[0].type===lC.Raw.ChatCompletionContentPartKind.Text?e[0].text:e.length===0?"":e.map(r=>r.type===lC.Raw.ChatCompletionContentPartKind.Text?{type:"text",text:r.text}:r.type===lC.Raw.ChatCompletionContentPartKind.Image?{type:"image_url",image_url:r.imageUrl}:{type:"text",text:""})}return String(t)}a(xro,"convertContent");f();var hO=de(po());var SUe=class extends hO.PromptRenderer{constructor(r,n,o,s,c){super(o,r,n,s);this.options=c}static{a(this,"InternalPromptRenderer")}async renderWithOptions(r,n,o){let s=await super.render(r,n);return{...this.options,...o}.collapseSystemMessages&&this.collapseConsecutiveSystemMessages(s.messages),s}collapseConsecutiveSystemMessages(r){let n=[],o=null;for(let s of r)if(s.role===hO.Raw.ChatRole.System&&o?.role===hO.Raw.ChatRole.System){let c=o.content.at(-1),l=s.content.at(0);c&&l&&c.type===hO.Raw.ChatCompletionContentPartKind.Text&&l.type===hO.Raw.ChatCompletionContentPartKind.Text?(c.text=c.text.trimEnd()+` -`+l.text,o.content=o.content.concat(s.content.slice(1))):(o.content.push({type:hO.Raw.ChatCompletionContentPartKind.Text,text:` -`}),o.content=o.content.concat(s.content))}else n.push(s),o=s.role===hO.Raw.ChatRole.System?s:null;r.length=0,r.push(...n)}};f();f();function dWr(t){if(!t.startsWith("data:image/"))throw new Error("Could not read image: invalid base64 image string");let e=t.split(",")[1];switch(Nro(e)){case"image/png":return wro(e);case"image/gif":return Rro(e);case"image/jpeg":case"image/jpg":return Pro(e);case"image/webp":return kro(e);default:throw new Error("Unsupported image format")}}a(dWr,"getImageDimensions");function wro(t){let e=atob(t.slice(0,50)).slice(16,24),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint32(0,!1),height:n.getUint32(4,!1)}}a(wro,"getPngDimensions");function Rro(t){let e=atob(t.slice(0,50)),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint16(6,!0),height:n.getUint16(8,!0)}}a(Rro,"getGifDimensions");function Pro(t){let e=atob(t),r=Uint8Array.from(e,s=>s.charCodeAt(0)),n=r.length,o=2;for(;o=65472&&s<=65474){let l=new DataView(r.buffer,o+5,4);return{height:l.getUint16(0,!1),width:l.getUint16(2,!1)}}o+=2+c}throw new Error("JPEG dimensions not found")}a(Pro,"getJpegDimensions");function kro(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o2048||o>2048){let l=2048/Math.max(n,o);n=Math.round(n*l),o=Math.round(o*l)}let s=768/Math.min(n,o);return n=Math.round(n*s),o=Math.round(o*s),Math.ceil(n/512)*Math.ceil(o/512)*170+85}};function IUe(t){let e=wo(t.tokenizer);return new _Pt(e,t)}a(IUe,"createPromptTsxTokenizer");function Oro(t){if(!t)return 0;let e=t.length,r=Math.floor(e*3/4);return Math.ceil(r/8)}a(Oro,"estimateDocumentTokenCost");var y0=class t{static{a(this,"TsxPromptRenderer")}constructor(e,r,n,o={}){this._options=o;let s=lWr(n),c=IUe(n);this._internalRenderer=new SUe(e,r,s,c,o)}static create(e,r,n,o={}){return new t(e,r,n,o)}async renderPrompt(e,r,n){let o=e?cWr(e):void 0,s=r?CPt(r):void 0,c=await this._internalRenderer.renderWithOptions(o,s,n);return{...this._options,...n}.enableCacheBreakpoints?p$r(c.messages):h$r(c.messages),{messages:c.messages.map(uWr),tokenCount:c.tokenCount,hasIgnoredFiles:c.hasIgnoredFiles}}async countTokens(e){let r=e?CPt(e):void 0;return(await this._internalRenderer.renderWithOptions(void 0,r)).tokenCount}};async function vPt(t,e,r,n,o,s){return await y0.create(t,e,r,s).renderPrompt(n,o,s)}a(vPt,"renderTsxPrompt");f();f();f();var fWr=new Se("toolCallRoundsBuilder");function bF(t,e={}){let r=[],{ctx:n,identifier:o,enableWarnings:s=!1}=e,c=0;for(;c0){let u=new Set(l.tool_calls.map(m=>m.id)),d=[],p=c+1,h=!1;for(;pthis.renderOneAssistantRound(o,s,e));if(r.length===0)return vscpp(vscppf,null);let n=(0,mO.useKeepWith)();return vscpp(vscppf,null,vscpp(n,{priority:1,flexGrow:1},r))}renderOneAssistantRound(e,r,n){let o=e.assistantMessage;if(o.role!=="assistant")return sCe.warn(this.props.ctx,`Tool call round ${r} does not have a valid assistant message`),[];let s=o.modelId!==void 0&&this.props.modelConfiguration?.modelId===o.modelId,c=s&&o.thinking?vscpp(kne,{thinking:o.thinking}):vscpp(vscppf,null),l=o.phase&&s?vscpp(I7e,{phase:o.phase}):vscpp(vscppf,null);if(!o.tool_calls||o.tool_calls.length===0){let A=this.getMessageContent(o);return!A||A.trim().length===0?[]:[vscpp(mO.AssistantMessage,null,vscpp(vscppf,null,A),c,l)]}let u=new Set;for(let A of e.toolResults)A.role==="tool"&&A.tool_call_id&&u.add(A.tool_call_id);let d=o.tool_calls.filter(A=>A.id&&u.has(A.id));if(d.length===0){let A=this.props.isHistorical?"conversation history":`turn ${this.props.identifier||"unknown"}`;sCe.warn(this.props.ctx,`Tool call round ${r} has ${o.tool_calls.length} tool call(s) but none have corresponding results in ${A}. Rendering assistant message content only.`);let y=this.getMessageContent(o);return!y||y.trim().length===0?[]:[vscpp(mO.AssistantMessage,null,vscpp(vscppf,null,y),c,l)]}if(d.length{let y=(0,mO.useKeepWith)();return p.set(A.id,y),{type:"function",function:{name:A.function.name,arguments:typeof A.function.arguments=="string"?A.function.arguments:JSON.stringify(A.function.arguments)},id:A.id,keepWith:y}}),m=[];m.push(vscpp(mO.AssistantMessage,{toolCalls:h},vscpp(vscppf,null,this.getMessageContent(o)),c,l));let g=1/(n*4)/d.length;for(let A=0;Ax.tool_call_id===y.id);if(!_){let x=this.props.isHistorical?"conversation history":`turn ${this.props.identifier||"unknown"}`;sCe.warn(this.props.ctx,`No tool result found for tool call ID ${y.id} in ${x}`);continue}let v=this.getMessageContent(_);this.props.truncateAt&&(v=this.truncateContent(v,this.props.truncateAt));let b=E,I=r===n-1&&A===d.length-1;m.push(vscpp(b,{priority:r,flexGrow:r+1,flexReserve:`/${1/g}`},vscpp(mO.ToolMessage,{toolCallId:y.id},vscpp(vscppf,null,v),I&&vscpp("cacheBreakpoint",{type:"ephemeral"}))))}return m}getMessageContent(e){return typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.map(r=>r.type==="text"?r.text:"").filter(r=>r.length>0).join(` -`):JSON.stringify(e.content)}truncateContent(e,r){let n=this.props.modelConfiguration;if(!n||e.lengthlio.includes(l)?(c[l]=n[l],c):(c.variables||(c.variables={}),c.variables[l]=n[l],c),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return VWr.test(s)&&(o.url=s.replace(VWr,"/api/graphql")),t(o).then(c=>{if(c.data.errors){let l={};for(let u of Object.keys(c.headers))l[u]=c.headers[u];throw new cio(o,l,c.data)}return c.data.data})}a(dio,"graphql");function kPt(t,e){let r=t.defaults(e);return Object.assign(a((o,s)=>dio(r,o,s),"newApi"),{defaults:kPt.bind(null,r),endpoint:r.endpoint})}a(kPt,"withDefaults");var l6l=kPt(nEe,{headers:{"user-agent":`octokit-graphql.js/${sio} ${YE()}`},method:"POST",url:"/graphql"});function WWr(t){return kPt(t,{method:"POST",url:"/graphql"})}a(WWr,"withCustomRequest");f();var DPt="(?:[a-zA-Z0-9_-]+)",zWr="\\.",YWr=new RegExp(`^${DPt}${zWr}${DPt}${zWr}${DPt}$`),fio=YWr.test.bind(YWr);async function pio(t){let e=fio(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}a(pio,"auth");function hio(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}a(hio,"withAuthorizationPrefix");async function mio(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=hio(t),e(o)}a(mio,"hook");var KWr=a(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(pio.bind(null,e),{hook:mio.bind(null,e)})},"createTokenAuth2");f();var NPt="7.0.6";var JWr=a(()=>{},"noop"),gio=console.warn.bind(console),Aio=console.error.bind(console);function yio(t={}){return typeof t.debug!="function"&&(t.debug=JWr),typeof t.info!="function"&&(t.info=JWr),typeof t.warn!="function"&&(t.warn=gio),typeof t.error!="function"&&(t.error=Aio),t}a(yio,"createLogger");var XWr=`octokit-core.js/${NPt} ${YE()}`,k7e=class{static{a(this,"Octokit")}static VERSION=NPt;static defaults(e){return class extends this{static{a(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{a(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new SWr.Collection,n={baseUrl:nEe.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${XWr}`:XWr,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=nEe.defaults(n),this.graphql=WWr(this.request).defaults(n),this.log=yio(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...c}=e,l=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:c},e.auth));r.wrap("request",l.hook),this.auth=l}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=KWr(e.auth);r.wrap("request",s.hook),this.auth=s}let o=this.constructor;for(let s=0;s{t.log.debug("request",r);let n=Date.now(),o=t.request.endpoint.parse(r),s=o.url.replace(r.baseUrl,"");return e(r).then(c=>{let l=c.headers["x-github-request-id"];return t.log.info(`${o.method} ${s} - ${c.status} with id ${l} in ${Date.now()-n}ms`),c}).catch(c=>{let l=c.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${o.method} ${s} - ${c.status} with id ${l} in ${Date.now()-n}ms`),c})})}a(MPt,"requestLog");MPt.VERSION=ZWr;f();var Eio="0.0.0-development";function _io(t){if(!t.data)return{...t,data:[]};if(!(("total_count"in t.data||"total_commits"in t.data)&&!("url"in t.data)))return t;let r=t.data.incomplete_results,n=t.data.repository_selection,o=t.data.total_count,s=t.data.total_commits;delete t.data.incomplete_results,delete t.data.repository_selection,delete t.data.total_count,delete t.data.total_commits;let c=Object.keys(t.data)[0],l=t.data[c];return t.data=l,typeof r<"u"&&(t.data.incomplete_results=r),typeof n<"u"&&(t.data.repository_selection=n),t.data.total_count=o,t.data.total_commits=s,t}a(_io,"normalizePaginatedListResponse");function OPt(t,e,r){let n=typeof e=="function"?e.endpoint(r):t.request.endpoint(e,r),o=typeof e=="function"?e:t.request,s=n.method,c=n.headers,l=n.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!l)return{done:!0};try{let u=await o({method:s,url:l,headers:c}),d=_io(u);if(l=((d.headers.link||"").match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!l&&"total_commits"in d.data){let p=new URL(d.url),h=p.searchParams,m=parseInt(h.get("page")||"1",10),g=parseInt(h.get("per_page")||"250",10);m*g{if(o.done)return e;let s=!1;function c(){s=!0}return a(c,"done"),e=e.concat(n?n(o.value,c):o.value.data),s?e:tzr(t,e,r,n)})}a(tzr,"gather");var B6l=Object.assign(ezr,{iterator:OPt});function BPt(t){return{paginate:Object.assign(ezr.bind(null,t),{iterator:OPt.bind(null,t)})}}a(BPt,"paginateRest");BPt.VERSION=Eio;f();f();var LPt="17.0.0";f();f();var Cio={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVariable:["POST /orgs/{org}/actions/variables"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createRepoVariable:["POST /repos/{owner}/{repo}/actions/variables"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteActionsCacheById:["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"],deleteActionsCacheByKey:["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteCustomImageFromOrg:["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],deleteCustomImageVersionFromOrg:["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],deleteEnvironmentSecret:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],deleteEnvironmentVariable:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],deleteHostedRunnerForOrg:["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteRepoVariable:["DELETE /repos/{owner}/{repo}/actions/variables/{name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunAttemptLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],forceCancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"],generateRunnerJitconfigForOrg:["POST /orgs/{org}/actions/runners/generate-jitconfig"],generateRunnerJitconfigForRepo:["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"],getActionsCacheList:["GET /repos/{owner}/{repo}/actions/caches"],getActionsCacheUsage:["GET /repos/{owner}/{repo}/actions/cache/usage"],getActionsCacheUsageByRepoForOrg:["GET /orgs/{org}/actions/cache/usage-by-repository"],getActionsCacheUsageForOrg:["GET /orgs/{org}/actions/cache/usage"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getCustomImageForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"],getCustomImageVersionForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"],getCustomOidcSubClaimForRepo:["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"],getEnvironmentPublicKey:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"],getEnvironmentSecret:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],getEnvironmentVariable:["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],getGithubActionsDefaultWorkflowPermissionsOrganization:["GET /orgs/{org}/actions/permissions/workflow"],getGithubActionsDefaultWorkflowPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/workflow"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getHostedRunnerForOrg:["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],getHostedRunnersGithubOwnedImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/github-owned"],getHostedRunnersLimitsForOrg:["GET /orgs/{org}/actions/hosted-runners/limits"],getHostedRunnersMachineSpecsForOrg:["GET /orgs/{org}/actions/hosted-runners/machine-sizes"],getHostedRunnersPartnerImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/partner"],getHostedRunnersPlatformsForOrg:["GET /orgs/{org}/actions/hosted-runners/platforms"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getOrgVariable:["GET /orgs/{org}/actions/variables/{name}"],getPendingDeploymentsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getRepoVariable:["GET /repos/{owner}/{repo}/actions/variables/{name}"],getReviewsForRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowAccessToRepository:["GET /repos/{owner}/{repo}/actions/permissions/access"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listCustomImageVersionsForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"],listCustomImagesForOrg:["GET /orgs/{org}/actions/hosted-runners/images/custom"],listEnvironmentSecrets:["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"],listEnvironmentVariables:["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"],listGithubHostedRunnersInGroupForOrg:["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"],listHostedRunnersForOrg:["GET /orgs/{org}/actions/hosted-runners"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listJobsForWorkflowRunAttempt:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"],listLabelsForSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}/labels"],listLabelsForSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listOrgVariables:["GET /orgs/{org}/actions/variables"],listRepoOrganizationSecrets:["GET /repos/{owner}/{repo}/actions/organization-secrets"],listRepoOrganizationVariables:["GET /repos/{owner}/{repo}/actions/organization-variables"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoVariables:["GET /repos/{owner}/{repo}/actions/variables"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedReposForOrgVariable:["GET /orgs/{org}/actions/variables/{name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunJobForWorkflowRun:["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],reRunWorkflowFailedJobs:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"],removeAllCustomLabelsFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"],removeAllCustomLabelsFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],removeCustomLabelFromSelfHostedRunnerForOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"],removeCustomLabelFromSelfHostedRunnerForRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgVariable:["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],reviewCustomGatesForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"],reviewPendingDeploymentsForRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setCustomLabelsForSelfHostedRunnerForOrg:["PUT /orgs/{org}/actions/runners/{runner_id}/labels"],setCustomLabelsForSelfHostedRunnerForRepo:["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],setCustomOidcSubClaimForRepo:["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"],setGithubActionsDefaultWorkflowPermissionsOrganization:["PUT /orgs/{org}/actions/permissions/workflow"],setGithubActionsDefaultWorkflowPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/workflow"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedReposForOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"],setWorkflowAccessToRepository:["PUT /repos/{owner}/{repo}/actions/permissions/access"],updateEnvironmentVariable:["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"],updateHostedRunnerForOrg:["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"],updateOrgVariable:["PATCH /orgs/{org}/actions/variables/{name}"],updateRepoVariable:["PATCH /repos/{owner}/{repo}/actions/variables/{name}"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsDone:["DELETE /notifications/threads/{thread_id}"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","addRepoToInstallationForAuthenticatedUser"]}],addRepoToInstallationForAuthenticatedUser:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],getWebhookDelivery:["GET /app/hook/deliveries/{delivery_id}"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallationRequestsForAuthenticatedApp:["GET /app/installation-requests"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],listWebhookDeliveries:["GET /app/hook/deliveries"],redeliverWebhookDelivery:["POST /app/hook/deliveries/{delivery_id}/attempts"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{},{renamed:["apps","removeRepoFromInstallationForAuthenticatedUser"]}],removeRepoFromInstallationForAuthenticatedUser:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubBillingPremiumRequestUsageReportOrg:["GET /organizations/{org}/settings/billing/premium_request/usage"],getGithubBillingPremiumRequestUsageReportUser:["GET /users/{username}/settings/billing/premium_request/usage"],getGithubBillingUsageReportOrg:["GET /organizations/{org}/settings/billing/usage"],getGithubBillingUsageReportUser:["GET /users/{username}/settings/billing/usage"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},campaigns:{createCampaign:["POST /orgs/{org}/campaigns"],deleteCampaign:["DELETE /orgs/{org}/campaigns/{campaign_number}"],getCampaignSummary:["GET /orgs/{org}/campaigns/{campaign_number}"],listOrgCampaigns:["GET /orgs/{org}/campaigns"],updateCampaign:["PATCH /orgs/{org}/campaigns/{campaign_number}"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestRun:["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{commitAutofix:["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits"],createAutofix:["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],createVariantAnalysis:["POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"],deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],deleteCodeqlDatabase:["DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getAutofix:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"],getCodeqlDatabase:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"],getDefaultSetup:["GET /repos/{owner}/{repo}/code-scanning/default-setup"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],getVariantAnalysis:["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}"],getVariantAnalysisRepoTask:["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}"],listAlertInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listAlertsForOrg:["GET /orgs/{org}/code-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",{},{renamed:["codeScanning","listAlertInstances"]}],listCodeqlDatabases:["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],updateDefaultSetup:["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codeSecurity:{attachConfiguration:["POST /orgs/{org}/code-security/configurations/{configuration_id}/attach"],attachEnterpriseConfiguration:["POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach"],createConfiguration:["POST /orgs/{org}/code-security/configurations"],createConfigurationForEnterprise:["POST /enterprises/{enterprise}/code-security/configurations"],deleteConfiguration:["DELETE /orgs/{org}/code-security/configurations/{configuration_id}"],deleteConfigurationForEnterprise:["DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],detachConfiguration:["DELETE /orgs/{org}/code-security/configurations/detach"],getConfiguration:["GET /orgs/{org}/code-security/configurations/{configuration_id}"],getConfigurationForRepository:["GET /repos/{owner}/{repo}/code-security-configuration"],getConfigurationsForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations"],getConfigurationsForOrg:["GET /orgs/{org}/code-security/configurations"],getDefaultConfigurations:["GET /orgs/{org}/code-security/configurations/defaults"],getDefaultConfigurationsForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations/defaults"],getRepositoriesForConfiguration:["GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories"],getRepositoriesForEnterpriseConfiguration:["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories"],getSingleConfigurationForEnterprise:["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}"],setConfigurationAsDefault:["PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults"],setConfigurationAsDefaultForEnterprise:["PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults"],updateConfiguration:["PATCH /orgs/{org}/code-security/configurations/{configuration_id}"],updateEnterpriseConfiguration:["PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct"],getConductCode:["GET /codes_of_conduct/{key}"]},codespaces:{addRepositoryForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],checkPermissionsForDevcontainer:["GET /repos/{owner}/{repo}/codespaces/permissions_check"],codespaceMachinesForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/machines"],createForAuthenticatedUser:["POST /user/codespaces"],createOrUpdateOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],createOrUpdateSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}"],createWithPrForAuthenticatedUser:["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"],createWithRepoForAuthenticatedUser:["POST /repos/{owner}/{repo}/codespaces"],deleteForAuthenticatedUser:["DELETE /user/codespaces/{codespace_name}"],deleteFromOrganization:["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"],deleteOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],deleteSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}"],exportForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/exports"],getCodespacesForUserInOrg:["GET /orgs/{org}/members/{username}/codespaces"],getExportDetailsForAuthenticatedUser:["GET /user/codespaces/{codespace_name}/exports/{export_id}"],getForAuthenticatedUser:["GET /user/codespaces/{codespace_name}"],getOrgPublicKey:["GET /orgs/{org}/codespaces/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}"],getPublicKeyForAuthenticatedUser:["GET /user/codespaces/secrets/public-key"],getRepoPublicKey:["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"],getSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}"],listDevcontainersInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/devcontainers"],listForAuthenticatedUser:["GET /user/codespaces"],listInOrganization:["GET /orgs/{org}/codespaces",{},{renamedParameters:{org_id:"org"}}],listInRepositoryForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces"],listOrgSecrets:["GET /orgs/{org}/codespaces/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/codespaces/secrets"],listRepositoriesForSecretForAuthenticatedUser:["GET /user/codespaces/secrets/{secret_name}/repositories"],listSecretsForAuthenticatedUser:["GET /user/codespaces/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],preFlightWithRepoForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/new"],publishForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/publish"],removeRepositoryForSecretForAuthenticatedUser:["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"],repoMachinesForAuthenticatedUser:["GET /repos/{owner}/{repo}/codespaces/machines"],setRepositoriesForSecretForAuthenticatedUser:["PUT /user/codespaces/secrets/{secret_name}/repositories"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"],startForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/start"],stopForAuthenticatedUser:["POST /user/codespaces/{codespace_name}/stop"],stopInOrganization:["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"],updateForAuthenticatedUser:["PATCH /user/codespaces/{codespace_name}"]},copilot:{addCopilotSeatsForTeams:["POST /orgs/{org}/copilot/billing/selected_teams"],addCopilotSeatsForUsers:["POST /orgs/{org}/copilot/billing/selected_users"],cancelCopilotSeatAssignmentForTeams:["DELETE /orgs/{org}/copilot/billing/selected_teams"],cancelCopilotSeatAssignmentForUsers:["DELETE /orgs/{org}/copilot/billing/selected_users"],copilotMetricsForOrganization:["GET /orgs/{org}/copilot/metrics"],copilotMetricsForTeam:["GET /orgs/{org}/team/{team_slug}/copilot/metrics"],getCopilotOrganizationDetails:["GET /orgs/{org}/copilot/billing"],getCopilotSeatDetailsForUser:["GET /orgs/{org}/members/{username}/copilot"],listCopilotSeats:["GET /orgs/{org}/copilot/billing/seats"]},credentials:{revoke:["POST /credentials/revoke"]},dependabot:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],deleteOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],getAlert:["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],getOrgPublicKey:["GET /orgs/{org}/dependabot/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"],listAlertsForEnterprise:["GET /enterprises/{enterprise}/dependabot/alerts"],listAlertsForOrg:["GET /orgs/{org}/dependabot/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/dependabot/alerts"],listOrgSecrets:["GET /orgs/{org}/dependabot/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/dependabot/secrets"],listSelectedReposForOrgSecret:["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"],repositoryAccessForOrg:["GET /organizations/{org}/dependabot/repository-access"],setRepositoryAccessDefaultLevel:["PUT /organizations/{org}/dependabot/repository-access/default-level"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"],updateAlert:["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],updateRepositoryAccessForOrg:["PATCH /organizations/{org}/dependabot/repository-access"]},dependencyGraph:{createRepositorySnapshot:["POST /repos/{owner}/{repo}/dependency-graph/snapshots"],diffRange:["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"],exportSbom:["GET /repos/{owner}/{repo}/dependency-graph/sbom"]},emojis:{get:["GET /emojis"]},enterpriseTeamMemberships:{add:["PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],bulkAdd:["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"],bulkRemove:["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"],get:["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"],list:["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"],remove:["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"]},enterpriseTeamOrganizations:{add:["PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],bulkAdd:["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"],bulkRemove:["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"],delete:["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],getAssignment:["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"],getAssignments:["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"]},enterpriseTeams:{create:["POST /enterprises/{enterprise}/teams"],delete:["DELETE /enterprises/{enterprise}/teams/{team_slug}"],get:["GET /enterprises/{enterprise}/teams/{team_slug}"],list:["GET /enterprises/{enterprise}/teams"],update:["PATCH /enterprises/{enterprise}/teams/{team_slug}"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},hostedCompute:{createNetworkConfigurationForOrg:["POST /orgs/{org}/settings/network-configurations"],deleteNetworkConfigurationFromOrg:["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"],getNetworkConfigurationForOrg:["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"],getNetworkSettingsForOrg:["GET /orgs/{org}/settings/network-settings/{network_settings_id}"],listNetworkConfigurationsForOrg:["GET /orgs/{org}/settings/network-configurations"],updateNetworkConfigurationForOrg:["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addBlockedByDependency:["POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],addSubIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],checkUserCanBeAssignedToIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],getParent:["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listDependenciesBlockedBy:["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"],listDependenciesBlocking:["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],listSubIssues:["GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeDependencyBlockedBy:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],removeSubIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue"],reprioritizeSubIssue:["PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getAllVersions:["GET /versions"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive"],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive"],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive"],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}"],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}"],listForAuthenticatedUser:["GET /user/migrations"],listForOrg:["GET /orgs/{org}/migrations"],listReposForAuthenticatedUser:["GET /user/migrations/{migration_id}/repositories"],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories"],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{},{renamed:["migrations","listReposForAuthenticatedUser"]}],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]},oidc:{getOidcCustomSubTemplateForOrg:["GET /orgs/{org}/actions/oidc/customization/sub"],updateOidcCustomSubTemplateForOrg:["PUT /orgs/{org}/actions/oidc/customization/sub"]},orgs:{addSecurityManagerTeam:["PUT /orgs/{org}/security-managers/teams/{team_slug}",{},{deprecated:"octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team"}],assignTeamToOrgRole:["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],assignUserToOrgRole:["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"],blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createArtifactStorageRecord:["POST /orgs/{org}/artifacts/metadata/storage-record"],createInvitation:["POST /orgs/{org}/invitations"],createIssueType:["POST /orgs/{org}/issue-types"],createWebhook:["POST /orgs/{org}/hooks"],customPropertiesForOrgsCreateOrUpdateOrganizationValues:["PATCH /organizations/{org}/org-properties/values"],customPropertiesForOrgsGetOrganizationValues:["GET /organizations/{org}/org-properties/values"],customPropertiesForReposCreateOrUpdateOrganizationDefinition:["PUT /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposCreateOrUpdateOrganizationDefinitions:["PATCH /orgs/{org}/properties/schema"],customPropertiesForReposCreateOrUpdateOrganizationValues:["PATCH /orgs/{org}/properties/values"],customPropertiesForReposDeleteOrganizationDefinition:["DELETE /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposGetOrganizationDefinition:["GET /orgs/{org}/properties/schema/{custom_property_name}"],customPropertiesForReposGetOrganizationDefinitions:["GET /orgs/{org}/properties/schema"],customPropertiesForReposGetOrganizationValues:["GET /orgs/{org}/properties/values"],delete:["DELETE /orgs/{org}"],deleteAttestationsBulk:["POST /orgs/{org}/attestations/delete-request"],deleteAttestationsById:["DELETE /orgs/{org}/attestations/{attestation_id}"],deleteAttestationsBySubjectDigest:["DELETE /orgs/{org}/attestations/digest/{subject_digest}"],deleteIssueType:["DELETE /orgs/{org}/issue-types/{issue_type_id}"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],disableSelectedRepositoryImmutableReleasesOrganization:["DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],enableSelectedRepositoryImmutableReleasesOrganization:["PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"],get:["GET /orgs/{org}"],getImmutableReleasesSettings:["GET /orgs/{org}/settings/immutable-releases"],getImmutableReleasesSettingsRepositories:["GET /orgs/{org}/settings/immutable-releases/repositories"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getOrgRole:["GET /orgs/{org}/organization-roles/{role_id}"],getOrgRulesetHistory:["GET /orgs/{org}/rulesets/{ruleset_id}/history"],getOrgRulesetVersion:["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listArtifactStorageRecords:["GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"],listAttestationRepositories:["GET /orgs/{org}/attestations/repositories"],listAttestations:["GET /orgs/{org}/attestations/{subject_digest}"],listAttestationsBulk:["POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"],listBlockedUsers:["GET /orgs/{org}/blocks"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listIssueTypes:["GET /orgs/{org}/issue-types"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOrgRoleTeams:["GET /orgs/{org}/organization-roles/{role_id}/teams"],listOrgRoleUsers:["GET /orgs/{org}/organization-roles/{role_id}/users"],listOrgRoles:["GET /orgs/{org}/organization-roles"],listOrganizationFineGrainedPermissions:["GET /orgs/{org}/organization-fine-grained-permissions"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPatGrantRepositories:["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"],listPatGrantRequestRepositories:["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"],listPatGrantRequests:["GET /orgs/{org}/personal-access-token-requests"],listPatGrants:["GET /orgs/{org}/personal-access-tokens"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listSecurityManagerTeams:["GET /orgs/{org}/security-managers",{},{deprecated:"octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams"}],listWebhookDeliveries:["GET /orgs/{org}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],removeSecurityManagerTeam:["DELETE /orgs/{org}/security-managers/teams/{team_slug}",{},{deprecated:"octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team"}],reviewPatGrantRequest:["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"],reviewPatGrantRequestsInBulk:["POST /orgs/{org}/personal-access-token-requests"],revokeAllOrgRolesTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"],revokeAllOrgRolesUser:["DELETE /orgs/{org}/organization-roles/users/{username}"],revokeOrgRoleTeam:["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"],revokeOrgRoleUser:["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"],setImmutableReleasesSettings:["PUT /orgs/{org}/settings/immutable-releases"],setImmutableReleasesSettingsRepositories:["PUT /orgs/{org}/settings/immutable-releases/repositories"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateIssueType:["PUT /orgs/{org}/issue-types/{issue_type_id}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updatePatAccess:["POST /orgs/{org}/personal-access-tokens/{pat_id}"],updatePatAccesses:["POST /orgs/{org}/personal-access-tokens"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForUser:["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByOrg"]}],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions",{},{renamed:["packages","getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]}],getAllPackageVersionsForPackageOwnedByAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],listDockerMigrationConflictingPackagesForAuthenticatedUser:["GET /user/docker/conflicts"],listDockerMigrationConflictingPackagesForOrganization:["GET /orgs/{org}/docker/conflicts"],listDockerMigrationConflictingPackagesForUser:["GET /users/{username}/docker/conflicts"],listPackagesForAuthenticatedUser:["GET /user/packages"],listPackagesForOrganization:["GET /orgs/{org}/packages"],listPackagesForUser:["GET /users/{username}/packages"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageForUser:["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForUser:["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},privateRegistries:{createOrgPrivateRegistry:["POST /orgs/{org}/private-registries"],deleteOrgPrivateRegistry:["DELETE /orgs/{org}/private-registries/{secret_name}"],getOrgPrivateRegistry:["GET /orgs/{org}/private-registries/{secret_name}"],getOrgPublicKey:["GET /orgs/{org}/private-registries/public-key"],listOrgPrivateRegistries:["GET /orgs/{org}/private-registries"],updateOrgPrivateRegistry:["PATCH /orgs/{org}/private-registries/{secret_name}"]},projects:{addItemForOrg:["POST /orgs/{org}/projectsV2/{project_number}/items"],addItemForUser:["POST /users/{username}/projectsV2/{project_number}/items"],deleteItemForOrg:["DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],deleteItemForUser:["DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"],getFieldForOrg:["GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"],getFieldForUser:["GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"],getForOrg:["GET /orgs/{org}/projectsV2/{project_number}"],getForUser:["GET /users/{username}/projectsV2/{project_number}"],getOrgItem:["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],getUserItem:["GET /users/{username}/projectsV2/{project_number}/items/{item_id}"],listFieldsForOrg:["GET /orgs/{org}/projectsV2/{project_number}/fields"],listFieldsForUser:["GET /users/{username}/projectsV2/{project_number}/fields"],listForOrg:["GET /orgs/{org}/projectsV2"],listForUser:["GET /users/{username}/projectsV2"],listItemsForOrg:["GET /orgs/{org}/projectsV2/{project_number}/items"],listItemsForUser:["GET /users/{username}/projectsV2/{project_number}/items"],updateItemForOrg:["PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],updateItemForUser:["PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],createForRelease:["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"],deleteForRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"],listForRelease:["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}",{},{renamed:["repos","acceptInvitationForAuthenticatedUser"]}],acceptInvitationForAuthenticatedUser:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],cancelPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"],checkAutomatedSecurityFixes:["GET /repos/{owner}/{repo}/automated-security-fixes"],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkImmutableReleases:["GET /repos/{owner}/{repo}/immutable-releases"],checkPrivateVulnerabilityReporting:["GET /repos/{owner}/{repo}/private-vulnerability-reporting"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts"],codeownersErrors:["GET /repos/{owner}/{repo}/codeowners/errors"],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],compareCommitsWithBasehead:["GET /repos/{owner}/{repo}/compare/{basehead}"],createAttestation:["POST /repos/{owner}/{repo}/attestations"],createAutolink:["POST /repos/{owner}/{repo}/autolinks"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentBranchPolicy:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],createDeploymentProtectionRule:["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateEnvironment:["PUT /repos/{owner}/{repo}/environments/{environment_name}"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createOrgRuleset:["POST /orgs/{org}/rulesets"],createPagesDeployment:["POST /repos/{owner}/{repo}/pages/deployments"],createPagesSite:["POST /repos/{owner}/{repo}/pages"],createRelease:["POST /repos/{owner}/{repo}/releases"],createRepoRuleset:["POST /repos/{owner}/{repo}/rulesets"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate"],createWebhook:["POST /repos/{owner}/{repo}/hooks"],customPropertiesForReposCreateOrUpdateRepositoryValues:["PATCH /repos/{owner}/{repo}/properties/values"],customPropertiesForReposGetRepositoryValues:["GET /repos/{owner}/{repo}/properties/values"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}",{},{renamed:["repos","declineInvitationForAuthenticatedUser"]}],declineInvitationForAuthenticatedUser:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteAnEnvironment:["DELETE /repos/{owner}/{repo}/environments/{environment_name}"],deleteAutolink:["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteDeploymentBranchPolicy:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deleteOrgRuleset:["DELETE /orgs/{org}/rulesets/{ruleset_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages"],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteRepoRuleset:["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes"],disableDeploymentProtectionRule:["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],disableImmutableReleases:["DELETE /repos/{owner}/{repo}/immutable-releases"],disablePrivateVulnerabilityReporting:["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts"],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes"],enableImmutableReleases:["PUT /repos/{owner}/{repo}/immutable-releases"],enablePrivateVulnerabilityReporting:["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts"],generateReleaseNotes:["POST /repos/{owner}/{repo}/releases/generate-notes"],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllDeploymentProtectionRules:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"],getAllEnvironments:["GET /repos/{owner}/{repo}/environments"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics"],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getAutolink:["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getBranchRules:["GET /repos/{owner}/{repo}/rules/branches/{branch}"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getCustomDeploymentProtectionRule:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentBranchPolicy:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getEnvironment:["GET /repos/{owner}/{repo}/environments/{environment_name}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getOrgRuleSuite:["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],getOrgRuleSuites:["GET /orgs/{org}/rulesets/rule-suites"],getOrgRuleset:["GET /orgs/{org}/rulesets/{ruleset_id}"],getOrgRulesets:["GET /orgs/{org}/rulesets"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getPagesDeployment:["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"],getPagesHealthCheck:["GET /repos/{owner}/{repo}/pages/health"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getReadmeInDirectory:["GET /repos/{owner}/{repo}/readme/{dir}"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getRepoRuleSuite:["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"],getRepoRuleSuites:["GET /repos/{owner}/{repo}/rulesets/rule-suites"],getRepoRuleset:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],getRepoRulesetHistory:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"],getRepoRulesetVersion:["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"],getRepoRulesets:["GET /repos/{owner}/{repo}/rulesets"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],getWebhookDelivery:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"],listActivities:["GET /repos/{owner}/{repo}/activity"],listAttestations:["GET /repos/{owner}/{repo}/attestations/{subject_digest}"],listAutolinks:["GET /repos/{owner}/{repo}/autolinks"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listCustomDeploymentRuleIntegrations:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentBranchPolicies:["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhookDeliveries:["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],mergeUpstream:["POST /repos/{owner}/{repo}/merge-upstream"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],redeliverWebhookDelivery:["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics"],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateDeploymentBranchPolicy:["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updateOrgRuleset:["PUT /orgs/{org}/rulesets/{ruleset_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateRepoRuleset:["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits"],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics"],users:["GET /search/users"]},secretScanning:{createPushProtectionBypass:["POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"],getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],getScanHistory:["GET /repos/{owner}/{repo}/secret-scanning/scan-history"],listAlertsForOrg:["GET /orgs/{org}/secret-scanning/alerts"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],listLocationsForAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"],listOrgPatternConfigs:["GET /orgs/{org}/secret-scanning/pattern-configurations"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],updateOrgPatternConfigs:["PATCH /orgs/{org}/secret-scanning/pattern-configurations"]},securityAdvisories:{createFork:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"],createPrivateVulnerabilityReport:["POST /repos/{owner}/{repo}/security-advisories/reports"],createRepositoryAdvisory:["POST /repos/{owner}/{repo}/security-advisories"],createRepositoryAdvisoryCveRequest:["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"],getGlobalAdvisory:["GET /advisories/{ghsa_id}"],getRepositoryAdvisory:["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"],listGlobalAdvisories:["GET /advisories"],listOrgRepositoryAdvisories:["GET /orgs/{org}/security-advisories"],listRepositoryAdvisories:["GET /repos/{owner}/{repo}/security-advisories"],updateRepositoryAdvisory:["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails",{},{renamed:["users","addEmailForAuthenticatedUser"]}],addEmailForAuthenticatedUser:["POST /user/emails"],addSocialAccountForAuthenticatedUser:["POST /user/social_accounts"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys",{},{renamed:["users","createGpgKeyForAuthenticatedUser"]}],createGpgKeyForAuthenticatedUser:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys",{},{renamed:["users","createPublicSshKeyForAuthenticatedUser"]}],createPublicSshKeyForAuthenticatedUser:["POST /user/keys"],createSshSigningKeyForAuthenticatedUser:["POST /user/ssh_signing_keys"],deleteAttestationsBulk:["POST /users/{username}/attestations/delete-request"],deleteAttestationsById:["DELETE /users/{username}/attestations/{attestation_id}"],deleteAttestationsBySubjectDigest:["DELETE /users/{username}/attestations/digest/{subject_digest}"],deleteEmailForAuthenticated:["DELETE /user/emails",{},{renamed:["users","deleteEmailForAuthenticatedUser"]}],deleteEmailForAuthenticatedUser:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","deleteGpgKeyForAuthenticatedUser"]}],deleteGpgKeyForAuthenticatedUser:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}",{},{renamed:["users","deletePublicSshKeyForAuthenticatedUser"]}],deletePublicSshKeyForAuthenticatedUser:["DELETE /user/keys/{key_id}"],deleteSocialAccountForAuthenticatedUser:["DELETE /user/social_accounts"],deleteSshSigningKeyForAuthenticatedUser:["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getById:["GET /user/{account_id}"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}",{},{renamed:["users","getGpgKeyForAuthenticatedUser"]}],getGpgKeyForAuthenticatedUser:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}",{},{renamed:["users","getPublicSshKeyForAuthenticatedUser"]}],getPublicSshKeyForAuthenticatedUser:["GET /user/keys/{key_id}"],getSshSigningKeyForAuthenticatedUser:["GET /user/ssh_signing_keys/{ssh_signing_key_id}"],list:["GET /users"],listAttestations:["GET /users/{username}/attestations/{subject_digest}"],listAttestationsBulk:["POST /users/{username}/attestations/bulk-list{?per_page,before,after}"],listBlockedByAuthenticated:["GET /user/blocks",{},{renamed:["users","listBlockedByAuthenticatedUser"]}],listBlockedByAuthenticatedUser:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails",{},{renamed:["users","listEmailsForAuthenticatedUser"]}],listEmailsForAuthenticatedUser:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following",{},{renamed:["users","listFollowedByAuthenticatedUser"]}],listFollowedByAuthenticatedUser:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys",{},{renamed:["users","listGpgKeysForAuthenticatedUser"]}],listGpgKeysForAuthenticatedUser:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails",{},{renamed:["users","listPublicEmailsForAuthenticatedUser"]}],listPublicEmailsForAuthenticatedUser:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys",{},{renamed:["users","listPublicSshKeysForAuthenticatedUser"]}],listPublicSshKeysForAuthenticatedUser:["GET /user/keys"],listSocialAccountsForAuthenticatedUser:["GET /user/social_accounts"],listSocialAccountsForUser:["GET /users/{username}/social_accounts"],listSshSigningKeysForAuthenticatedUser:["GET /user/ssh_signing_keys"],listSshSigningKeysForUser:["GET /users/{username}/ssh_signing_keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility",{},{renamed:["users","setPrimaryEmailVisibilityForAuthenticatedUser"]}],setPrimaryEmailVisibilityForAuthenticatedUser:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}},rzr=Cio;var vj=new Map;for(let[t,e]of Object.entries(rzr))for(let[r,n]of Object.entries(e)){let[o,s,c]=n,[l,u]=o.split(/ /),d=Object.assign({method:l,url:u},s);vj.has(t)||vj.set(t,new Map),vj.get(t).set(r,{scope:t,methodName:r,endpointDefaults:d,decorations:c})}var vio={has({scope:t},e){return vj.get(t).has(e)},getOwnPropertyDescriptor(t,e){return{value:this.get(t,e),configurable:!0,writable:!0,enumerable:!0}},defineProperty(t,e,r){return Object.defineProperty(t.cache,e,r),!0},deleteProperty(t,e){return delete t.cache[e],!0},ownKeys({scope:t}){return[...vj.get(t).keys()]},set(t,e,r){return t.cache[e]=r},get({octokit:t,scope:e,cache:r},n){if(r[n])return r[n];let o=vj.get(e).get(n);if(!o)return;let{endpointDefaults:s,decorations:c}=o;return c?r[n]=bio(t,e,n,s,c):r[n]=t.request.defaults(s),r[n]}};function FPt(t){let e={};for(let r of vj.keys())e[r]=new Proxy({octokit:t,scope:r,cache:{}},vio);return e}a(FPt,"endpointsToMethods");function bio(t,e,r,n,o){let s=t.request.defaults(n);function c(...l){let u=s.endpoint.merge(...l);if(o.mapToData)return u=Object.assign({},u,{data:u[o.mapToData],[o.mapToData]:void 0}),s(u);if(o.renamed){let[d,p]=o.renamed;t.log.warn(`octokit.${e}.${r}() has been renamed to octokit.${d}.${p}()`)}if(o.deprecated&&t.log.warn(o.deprecated),o.renamedParameters){let d=s.endpoint.merge(...l);for(let[p,h]of Object.entries(o.renamedParameters))p in d&&(t.log.warn(`"${p}" parameter is deprecated for "octokit.${e}.${r}()". Use "${h}" instead`),h in d||(d[h]=d[p]),delete d[p]);return s(d)}return s(...l)}return a(c,"withDecorations"),Object.assign(c,s)}a(bio,"decorate");function Tio(t){return{rest:FPt(t)}}a(Tio,"restEndpointMethods");Tio.VERSION=LPt;function UPt(t){let e=FPt(t);return{...e,rest:e}}a(UPt,"legacyRestEndpointMethods");UPt.VERSION=LPt;f();var nzr="22.0.1";var izr=k7e.plugin(MPt,UPt,BPt).defaults({userAgent:`octokit-rest.js/${nzr}`});var Iio=new Set(["copilot-pull-request-reviewer","copilot-swe-agent","Copilot"]),_c=new Se("GitHubClient"),KE=class{constructor(e){this.ctx=e;this.octokit=null}static{a(this,"GitHubClient")}async getOctokit(){if(this.octokit)return this.octokit;let e=await this.getApiSession(),r=this.ctx.get(dr);return this.octokit=new izr({auth:e.accessToken,baseUrl:e.apiUrl,request:{fetch:r.fetch.bind(r)}}),this.octokit}async getCopilotTimelineEvents(e,r,n,o){if(!o||!Iio.has(o))return _c.debug(this.ctx,`Skipping timeline events for ${e}/${r}#${n}: author '${o}' is not a Copilot account`),[];_c.debug(this.ctx,`Fetching Copilot timeline events for ${e}/${r}#${n}`);let s=await this.getOctokit();try{let c=[],l=1,u=!0;for(;u;){_c.debug(this.ctx,`Fetching timeline events page ${l} for ${e}/${r}#${n}`);let d=await s.rest.issues.listEventsForTimeline({owner:e,repo:r,issue_number:n,per_page:100,page:l});for(let h of d.data){let m=h;m.created_at&&m.node_id&&(h.event==="copilot_work_started"?c.push({id:m.node_id,eventType:"in_progress",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}):h.event==="copilot_work_finished"?c.push({id:m.node_id,eventType:"done",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}):h.event==="copilot_work_finished_failure"&&c.push({id:m.node_id,eventType:"error",createdAt:m.created_at,onBehalfOf:{login:m.actor?.login||"",avatarUrl:m.actor?.avatar_url}}))}let p=d.headers.link;u=p?p.includes('rel="next"'):!1,l++}return _c.debug(this.ctx,`Found ${c.length} Copilot timeline events for ${e}/${r}#${n}`),c}catch(c){if(_c.error(this.ctx,`Failed to fetch Copilot timeline events for ${e}/${r}#${n}:`,c),c&&typeof c=="object"&&"status"in c){let l=c;throw new fp(l.status,l.message||"GitHub API error")}throw c}}async getCopilotWorkingStatus(e,r,n,o){_c.debug(this.ctx,`Getting Copilot working status for ${e}/${r}#${n}`);try{let s=await this.getCopilotTimelineEvents(e,r,n,o),c;if(s.length>0){let l=s[s.length-1];l.eventType==="done"?c="done":l.eventType==="in_progress"?c="in_progress":l.eventType==="error"?c="error":c="not_copilot_issue"}else c="not_copilot_issue";return _c.debug(this.ctx,`Copilot working status for ${e}/${r}#${n}: ${c}`),c}catch(s){return _c.error(this.ctx,`Error getting Copilot working status for ${e}/${r}#${n}, treating as not Copilot issue:`,s),"not_copilot_issue"}}async cancelWorkflow(e,r,n){_c.debug(this.ctx,`Cancelling workflow run ${n} for ${e}/${r}`);let o=await this.getOctokit();try{return await o.rest.actions.cancelWorkflowRun({owner:e,repo:r,run_id:n}),_c.debug(this.ctx,`Successfully cancelled workflow run ${n} for ${e}/${r}`),!0}catch(s){if(_c.error(this.ctx,`Failed to cancel workflow run ${n} for ${e}/${r}:`,s),s&&typeof s=="object"&&"status"in s){let c=s;throw new fp(c.status,c.message||"GitHub API error")}throw s}}async listPullRequestFiles(e,r,n){_c.debug(this.ctx,`Listing files for pull request ${e}/${r}#${n}`);let o=await this.getOctokit();try{let s=[],c=1,l=!0;for(;l;){_c.debug(this.ctx,`Fetching pull request files page ${c} for ${e}/${r}#${n}`);let u=await o.rest.pulls.listFiles({owner:e,repo:r,pull_number:n,per_page:100,page:c});for(let p of u.data)s.push({fileName:p.filename});let d=u.headers.link;l=d?d.includes('rel="next"'):!1,c++}return _c.debug(this.ctx,`Found ${s.length} files in pull request ${e}/${r}#${n}`),s}catch(s){if(_c.error(this.ctx,`Failed to list files for pull request ${e}/${r}#${n}:`,s),s&&typeof s=="object"&&"status"in s){let c=s;throw new fp(c.status,c.message||"GitHub API error")}throw s}}async getBranch(e,r,n){_c.debug(this.ctx,`Getting branch ${n} from ${e}/${r}`);let o=await this.getOctokit();try{let s=await o.rest.repos.getBranch({owner:e,repo:r,branch:n});return _c.debug(this.ctx,`Successfully retrieved branch ${n} from ${e}/${r}`),s.data}catch(s){if(s&&typeof s=="object"&&"status"in s){let c=s;throw _c.debug(this.ctx,`GitHub API error getting branch ${n}: HTTP ${c.status} - ${c.message}`),new fp(c.status,c.message||"GitHub API error")}throw _c.error(this.ctx,`Unexpected error getting branch ${n} for ${e}/${r}:`,s),s}}async getPullRequest(e,r,n){_c.debug(this.ctx,`Getting pull request ${e}/${r}#${n}`);let o=await this.getOctokit();try{let s=await o.rest.pulls.get({owner:e,repo:r,pull_number:n});return _c.debug(this.ctx,`Successfully retrieved pull request ${e}/${r}#${n}`),{html_url:s.data.html_url,number:s.data.number,title:s.data.title,body:s.data.body||void 0}}catch(s){if(s&&typeof s=="object"&&"status"in s){let c=s;throw _c.debug(this.ctx,`GitHub API error getting pull request #${n}: HTTP ${c.status} - ${c.message}`),new fp(c.status,c.message||"GitHub API error")}throw _c.error(this.ctx,`Unexpected error getting pull request ${e}/${r}#${n}:`,s),s}}async listSecurityAdvisories(e,r,n=100){_c.debug(this.ctx,`Listing security advisories for ${r.length} ${e} packages`);let o=await this.getOctokit();try{let s=[],c=1,l=!0;for(;l;){_c.debug(this.ctx,`Fetching security advisories page ${c} for ${r.length} ${e} packages`);let u=await o.securityAdvisories.listGlobalAdvisories({ecosystem:e,affects:r,direction:"asc",sort:"published",per_page:n,page:c});s.push(...u.data);let d=u.headers.link;l=d?d.includes('rel="next"'):!1,c++}return _c.debug(this.ctx,`Found ${s.length} security advisories for ${r.length} ${e} packages`),s}catch(s){if(_c.error(this.ctx,"Failed to list security advisories:",s),s&&typeof s=="object"&&"status"in s){let c=s;throw _c.debug(this.ctx,`GitHub API error listing security advisories for ${r.length} ${e} packages: HTTP ${c.status} - ${c.message}`),new fp(c.status,c.message||"GitHub API error")}throw s}}async getApiSession(){let e=await this.ctx.get(en).getSession();if(!e)throw new wT;return{apiUrl:e.apiUrl.replace(/\/$/,""),accessToken:e.accessToken}}};var Au=new Se("CodingAgentClient"),rne=class{constructor(e,r){this.ctx=e;this.timeout=r??3e4}static{a(this,"CodingAgentClient")}getBaseUrl(){return"https://api.githubcopilot.com"}async createCodingTask(e,r,n,o,s,c){Au.debug(this.ctx,`Creating coding agent task for ${n}/${o} with title: ${e}`),this.validateCreateTaskParams(e,r,n,o);let l=await this.getAccessToken(),d=`${this.getBaseUrl()}/agents/swe/${"v1"}/jobs/${n}/${o}`,p={problem_statement:r,event_type:"jetbrains",pull_request:{title:e,body_placeholder:AWr(e),...s&&{base_ref:s}}},h={Authorization:`Bearer ${l}`,"Content-Type":"application/json",Accept:"application/json",...v1(this.ctx)};if(c?.isCancellationRequested)throw Au.debug(this.ctx,`Create coding task was cancelled before sending API request for ${n}/${o} with title: ${e}`),new D1;let g=await this.ctx.get(dr).fetch(d,{method:"POST",headers:h,body:JSON.stringify(p),timeout:this.timeout});if(c?.isCancellationRequested)throw Au.debug(this.ctx,`Create coding task was cancelled after sending API request for ${n}/${o} with title: ${e}`),new D1;let A=await this.handleCreateJobResponse(g);if(c?.isCancellationRequested)throw Au.debug(this.ctx,`Create coding task was cancelled after receiving job response for ${n}/${o} with title: ${e}`),new D1;let y=await this.waitForJobPullRequest(n,o,A.job_id,l,c);if(c?.isCancellationRequested)throw Au.debug(this.ctx,`Create coding task was cancelled after polling job ${A.job_id} for ${n}/${o}`),new D1;let E=y.pull_request?.number;if(typeof E!="number")throw new xT("No valid pull request number returned from job");let v=await new KE(this.ctx).getPullRequest(n,o,E);return Au.debug(this.ctx,`Coding task created successfully for ${n}/${o}: job ${A.job_id}, session ${A.session_id}, PR #${v.number}`),v}validateCreateTaskParams(e,r,n,o){if(!e?.trim())throw Au.debug(this.ctx,"Validation failed: Title is required and cannot be empty"),new ny("Title is required and cannot be empty");if(!r?.trim())throw Au.debug(this.ctx,"Validation failed: ProblemStatement is required and cannot be empty"),new ny("ProblemStatement is required and cannot be empty");if(!n?.trim())throw Au.debug(this.ctx,"Validation failed: Owner is required and cannot be empty"),new ny("Owner is required and cannot be empty");if(!o?.trim())throw Au.debug(this.ctx,"Validation failed: Repository name is required and cannot be empty"),new ny("Repository name is required and cannot be empty");Au.debug(this.ctx,`Validation passed for ${n}/${o}`)}async getAccessToken(){let r=await this.ctx.get(en).getSession();if(!r?.accessToken)throw Au.debug(this.ctx,"Failed to get access token"),new Jre("Failed to call coding agent API: Not authenticated with GitHub");return r.accessToken}async getAllSessions(e,r){Au.debug(this.ctx,`Getting all coding agent sessions for pull request ID: ${e}`);let n=await this.getAccessToken(),o=this.getBaseUrl();if(r?.isCancellationRequested)throw Au.debug(this.ctx,`Get all sessions operation was cancelled before sending API request for pull request ID: ${e}`),new D1;try{let s=`${o}/agents/sessions/resource/pull/${e}`,c={Authorization:`Bearer ${n}`,Accept:"application/json",...v1(this.ctx)},u=await this.ctx.get(dr).fetch(s,{method:"GET",headers:c,timeout:this.timeout});if(r?.isCancellationRequested)throw Au.debug(this.ctx,`Get all sessions operation was cancelled after sending API request for pull request ID: ${e}`),new D1;if(!u.ok){let p=await u.text().catch(()=>u.statusText),h=`Failed to get coding agent sessions: HTTP ${u.status} - ${p}`;throw Au.error(this.ctx,h),new xT(h)}let d=await u.json();return Au.debug(this.ctx,`Found ${d.sessions?.length||0} coding agent sessions for pull request ID: ${e}`),d.sessions||null}catch(s){let c=`Failed to get coding agent sessions: ${s instanceof Error?s.message:JSON.stringify(s)}`;throw Au.error(this.ctx,c),new T7e(c)}}async waitForJobPullRequest(e,r,n,o,s){let c=Date.now(),l=3e4,u=2e3;for(;Date.now()-csetTimeout(r,e))}async handleCreateJobResponse(e){if(!e.ok){let n=await e.text().catch(()=>e.statusText);throw Au.error(this.ctx,`Coding agent API request failed with status ${e.status}: ${n}`),e.status===403||e.status===401?new xT("Coding agent is not enabled or you do not have access. Learn more about coding agent at https://docs.github.com/copilot/concepts/agents/coding-agent/about-coding-agent"):new xT(`API request failed: HTTP ${e.status} - ${n}`)}let r;try{r=await e.json()}catch(n){let o=n instanceof Error?n.message:JSON.stringify(n);throw Au.error(this.ctx,`Failed to parse create coding task API response as JSON: ${o}`),new xT(`Failed to parse API response as JSON: ${o}`)}if(!r.job_id||!r.session_id)throw Au.error(this.ctx,"API response missing job_id or session_id",r),new xT("Invalid response from coding agent");return r}};f();f();var rk=class{static{a(this,"LSPRequestSender")}};var szr=de(Dn());var D7e=class{constructor(){this.codingAgentMessageRequestType=new szr.ProtocolRequestType("copilot/codingAgentMessage")}static{a(this,"CodingAgentMessageHandler")}async sendCodingAgentMessage(e,r,n,o){try{Ge.debug(e.ctx,`Sending coding agent message to client: ${r} - ${o}`);let c=await e.ctx.get(rk).sendRequest(this.codingAgentMessageRequestType,{title:r,description:n,prLink:o,conversationId:e.conversation.id.toString(),turnId:e.turn.id.toString()});return Ge.debug(e.ctx,"Successfully sent coding agent message to client"),c}catch(s){let c=`Failed to send coding agent message: ${s instanceof Error?s.message:JSON.stringify(s)}`;return Ge.error(e.ctx,c,s),{success:!1,error:c}}}};f();f();f();f();var JE=de(co());function QPt(t){return{isCancellationRequested:t.isCancellationRequested,onCancellationRequested:a(e=>{let r=t.onCancellationRequested(e);return{dispose:a(()=>r.dispose(),"dispose")}},"onCancellationRequested")}}a(QPt,"adaptCancellationToken");function azr(t){return{report:a(e=>{"value"in e&&typeof e.value=="string"?t({text:e.value}):t({})},"report")}}a(azr,"adaptProgressCallback");function czr(t){return{modelMaxPromptTokens:t.maxRequestTokens}}a(czr,"createEndpointInfo");function lzr(t){let e={role:xio(t.role),content:wio(t.content)};if(t.role===JE.Raw.ChatRole.Assistant&&"toolCalls"in t&&t.toolCalls&&(e.tool_calls=t.toolCalls.map(r=>({id:r.id,type:r.type,function:r.function,approxNumTokens:0}))),t.role===JE.Raw.ChatRole.Tool&&"toolCallId"in t&&t.toolCallId&&(e.tool_call_id=t.toolCallId),Array.isArray(t.content)){let r=!1;for(let n of t.content){if(n.type===JE.Raw.ChatCompletionContentPartKind.Opaque&&n.value){let o=B9e(n);o&&(e.thinking=o);let s=O9e(n);s&&(e.phase=s)}n.type===JE.Raw.ChatCompletionContentPartKind.CacheBreakpoint&&(r=!0)}r&&(e.copilot_cache_control={type:"ephemeral"})}return Object.entries(t).forEach(([r,n])=>{["role","content","toolCalls","toolCallId"].includes(r)||(e[r]=n)}),e}a(lzr,"convertToCopilotChatMessage");function xio(t){switch(t){case JE.Raw.ChatRole.System:return"system";case JE.Raw.ChatRole.User:return"user";case JE.Raw.ChatRole.Assistant:return"assistant";case JE.Raw.ChatRole.Tool:return"tool";default:return"user"}}a(xio,"convertRole");function wio(t){if(typeof t=="string")return t;if(Array.isArray(t)){let e=t.filter(r=>r.type===JE.Raw.ChatCompletionContentPartKind.Text||r.type===JE.Raw.ChatCompletionContentPartKind.Image);return e.length===1&&e[0].type===JE.Raw.ChatCompletionContentPartKind.Text?e[0].text:e.length===0?"":e.map(r=>r.type===JE.Raw.ChatCompletionContentPartKind.Text?{type:"text",text:r.text}:r.type===JE.Raw.ChatCompletionContentPartKind.Image?{type:"image_url",image_url:r.imageUrl}:{type:"text",text:""})}return String(t)}a(wio,"convertContent");f();var KM=de(co());var N7e=class extends KM.PromptRenderer{constructor(r,n,o,s,c){super(o,r,n,s);this.options=c}static{a(this,"InternalPromptRenderer")}async renderWithOptions(r,n,o){let s=await super.render(r,n);return{...this.options,...o}.collapseSystemMessages&&this.collapseConsecutiveSystemMessages(s.messages),s}collapseConsecutiveSystemMessages(r){let n=[],o=null;for(let s of r)if(s.role===KM.Raw.ChatRole.System&&o?.role===KM.Raw.ChatRole.System){let c=o.content.at(-1),l=s.content.at(0);c&&l&&c.type===KM.Raw.ChatCompletionContentPartKind.Text&&l.type===KM.Raw.ChatCompletionContentPartKind.Text?(c.text=c.text.trimEnd()+` +`+l.text,o.content=o.content.concat(s.content.slice(1))):(o.content.push({type:KM.Raw.ChatCompletionContentPartKind.Text,text:` +`}),o.content=o.content.concat(s.content))}else n.push(s),o=s.role===KM.Raw.ChatRole.System?s:null;r.length=0,r.push(...n)}};f();f();function uzr(t){if(!t.startsWith("data:image/"))throw new Error("Could not read image: invalid base64 image string");let e=t.split(",")[1];switch(Nio(e)){case"image/png":return Rio(e);case"image/gif":return Pio(e);case"image/jpeg":case"image/jpg":return kio(e);case"image/webp":return Dio(e);default:throw new Error("Unsupported image format")}}a(uzr,"getImageDimensions");function Rio(t){let e=atob(t.slice(0,50)).slice(16,24),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint32(0,!1),height:n.getUint32(4,!1)}}a(Rio,"getPngDimensions");function Pio(t){let e=atob(t.slice(0,50)),r=Uint8Array.from(e,o=>o.charCodeAt(0)),n=new DataView(r.buffer);return{width:n.getUint16(6,!0),height:n.getUint16(8,!0)}}a(Pio,"getGifDimensions");function kio(t){let e=atob(t),r=Uint8Array.from(e,s=>s.charCodeAt(0)),n=r.length,o=2;for(;o=65472&&s<=65474){let l=new DataView(r.buffer,o+5,4);return{height:l.getUint16(0,!1),width:l.getUint16(2,!1)}}o+=2+c}throw new Error("JPEG dimensions not found")}a(kio,"getJpegDimensions");function Dio(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o2048||o>2048){let l=2048/Math.max(n,o);n=Math.round(n*l),o=Math.round(o*l)}let s=768/Math.min(n,o);return n=Math.round(n*s),o=Math.round(o*s),Math.ceil(n/512)*Math.ceil(o/512)*170+85}};function M7e(t){let e=To(t.tokenizer);return new qPt(e,t)}a(M7e,"createPromptTsxTokenizer");function Bio(t){if(!t)return 0;let e=t.length,r=Math.floor(e*3/4);return Math.ceil(r/8)}a(Bio,"estimateDocumentTokenCost");var p0=class t{static{a(this,"TsxPromptRenderer")}constructor(e,r,n,o={}){this._options=o;let s=czr(n),c=M7e(n);this._internalRenderer=new N7e(e,r,s,c,o)}static create(e,r,n,o={}){return new t(e,r,n,o)}async renderPrompt(e,r,n){let o=e?azr(e):void 0,s=r?QPt(r):void 0,c=await this._internalRenderer.renderWithOptions(o,s,n);return{...this._options,...n}.enableCacheBreakpoints?fVr(c.messages):pVr(c.messages),{messages:c.messages.map(lzr),tokenCount:c.tokenCount,hasIgnoredFiles:c.hasIgnoredFiles}}async countTokens(e){let r=e?QPt(e):void 0;return(await this._internalRenderer.renderWithOptions(void 0,r)).tokenCount}};async function GPt(t,e,r,n,o,s){return await p0.create(t,e,r,s).renderPrompt(n,o,s)}a(GPt,"renderTsxPrompt");f();f();f();var dzr=new Se("toolCallRoundsBuilder");function K6(t,e={}){let r=[],{ctx:n,identifier:o,enableWarnings:s=!1}=e,c=0;for(;c0){let u=new Set(l.tool_calls.map(m=>m.id)),d=[],p=c+1,h=!1;for(;pthis.renderOneAssistantRound(o,s,e));if(r.length===0)return vscpp(vscppf,null);let n=(0,JM.useKeepWith)();return vscpp(vscppf,null,vscpp(n,{priority:1,flexGrow:1},r))}renderOneAssistantRound(e,r,n){let o=e.assistantMessage;if(o.role!=="assistant")return iEe.warn(this.props.ctx,`Tool call round ${r} does not have a valid assistant message`),[];let s=o.modelId!==void 0&&this.props.modelConfiguration?.modelId===o.modelId,c=s&&o.thinking?vscpp(jre,{thinking:o.thinking}):vscpp(vscppf,null),l=o.phase&&s?vscpp(M9e,{phase:o.phase}):vscpp(vscppf,null);if(!o.tool_calls||o.tool_calls.length===0){let A=this.getMessageContent(o);return!A||A.trim().length===0?[]:[vscpp(JM.AssistantMessage,null,vscpp(vscppf,null,A),c,l)]}let u=new Set;for(let A of e.toolResults)A.role==="tool"&&A.tool_call_id&&u.add(A.tool_call_id);let d=o.tool_calls.filter(A=>A.id&&u.has(A.id));if(d.length===0){let A=this.props.isHistorical?"conversation history":`turn ${this.props.identifier||"unknown"}`;iEe.warn(this.props.ctx,`Tool call round ${r} has ${o.tool_calls.length} tool call(s) but none have corresponding results in ${A}. Rendering assistant message content only.`);let y=this.getMessageContent(o);return!y||y.trim().length===0?[]:[vscpp(JM.AssistantMessage,null,vscpp(vscppf,null,y),c,l)]}if(d.length{let y=(0,JM.useKeepWith)();return p.set(A.id,y),{type:"function",function:{name:A.function.name,arguments:typeof A.function.arguments=="string"?A.function.arguments:JSON.stringify(A.function.arguments)},id:A.id,keepWith:y}}),m=[];m.push(vscpp(JM.AssistantMessage,{toolCalls:h},vscpp(vscppf,null,this.getMessageContent(o)),c,l));let g=1/(n*4)/d.length;for(let A=0;AI.tool_call_id===y.id);if(!_){let I=this.props.isHistorical?"conversation history":`turn ${this.props.identifier||"unknown"}`;iEe.warn(this.props.ctx,`No tool result found for tool call ID ${y.id} in ${I}`);continue}let v=this.getMessageContent(_);this.props.truncateAt&&(v=this.truncateContent(v,this.props.truncateAt));let b=E;m.push(vscpp(b,{priority:r,flexGrow:r+1,flexReserve:`/${1/g}`},vscpp(JM.ToolMessage,{toolCallId:y.id},vscpp(vscppf,null,v))))}return m}getMessageContent(e){return typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.map(r=>r.type==="text"?r.text:"").filter(r=>r.length>0).join(` +`):JSON.stringify(e.content)}truncateContent(e,r){let n=this.props.modelConfiguration;if(!n||e.lengthn.type==="image_url"),r=t.filter(n=>n.type==="text").map(n=>n.text).join("");return{imageUrls:e,textContent:r}}a(Bro,"separateTextAndImages");function Lro(t){return t.map(e=>vscpp(E0.Image,{src:e.image_url.url,detail:e.image_url.detail}))}a(Lro,"createImageElements");function xUe(t){let{imageUrls:e,textContent:r}=Bro(t);return e.length===0?[vscpp(vscppf,null,r)]:[vscpp(E0.TextChunk,null,vscpp(vscppf,null,r)),...Lro(e)]}a(xUe,"renderMixedContent");function bPt(t){return t==null?[]:t.map(r=>({id:r.id||"",type:"function",function:{name:r.function.name,arguments:typeof r.function.arguments=="string"?r.function.arguments:JSON.stringify(r.function.arguments)},approxNumTokens:r.approxNumTokens}))}a(bPt,"convertToPromptTsxToolCall");function wUe(t){switch(t.role){case"assistant":return Fro(t);case"tool":return Uro(t);case"user":return Qro(t);case"system":return qro(t);case"function":throw new Error("ChatRole.Function is not supported in prompt-tsx conversion. Use ChatRole.Tool instead.");default:throw new Error(`Unsupported chat role: ${String(t.role)}`)}}a(wUe,"convertChatMessageToPromptTsx");function Fro(t){let e=t.thinking?vscpp(kne,{thinking:t.thinking}):vscpp(vscppf,null);return typeof t.content=="string"?vscpp(E0.AssistantMessage,{toolCalls:bPt(t.tool_calls)},vscpp(vscppf,null,t.content),e):Array.isArray(t.content)?vscpp(E0.AssistantMessage,{toolCalls:bPt(t.tool_calls)},vscpp(vscppf,null,xUe(t.content)),e):vscpp(E0.AssistantMessage,{toolCalls:bPt(t.tool_calls)},vscpp(vscppf,null,JSON.stringify(t.content)),e)}a(Fro,"renderAssistantMessage");function Uro(t){return typeof t.content=="string"?vscpp(E0.ToolMessage,{toolCallId:t.tool_call_id||""},vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(E0.ToolMessage,{toolCallId:t.tool_call_id||""},xUe(t.content)):vscpp(E0.ToolMessage,{toolCallId:t.tool_call_id||""},vscpp(vscppf,null,JSON.stringify(t.content)))}a(Uro,"renderToolMessage");function Qro(t){return typeof t.content=="string"?vscpp(E0.UserMessage,null,vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(E0.UserMessage,null,xUe(t.content)):vscpp(E0.UserMessage,null,vscpp(vscppf,null,JSON.stringify(t.content)))}a(Qro,"renderUserMessage");function qro(t){return typeof t.content=="string"?vscpp(E0.SystemMessage,null,vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(E0.SystemMessage,null,xUe(t.content)):vscpp(E0.SystemMessage,null,vscpp(vscppf,null,JSON.stringify(t.content)))}a(qro,"renderSystemMessage");var Gro=new Se("conversationHistoryPrompt"),jne=class extends Zt{static{a(this,"ConversationHistoryPrompt")}fixToolCallsInResponse(e,r){if(e.tool_calls&&e.tool_calls.length){let n=e.tool_calls,o=[];for(let s of n)r.some(l=>l.role==="tool"&&l.tool_call_id===s.id)?o.push(s):Gro.warn(this.props.ctx,`Tool call ${s.id} does not have a result in the response. Removing it from the tool calls history.`);return{...e,tool_calls:o}}return e}renderCopilot(){return vscpp(vscppf,null,this.renderHistory())}renderHistory(){let e=[];for(let r=0;rthis.fixToolCallsInResponse(l,o)),c=bF(s,{ctx:this.props.ctx,identifier:"conversation history",enableWarnings:!0});c.length>0&&e.push(vscpp(mk,{assistantRounds:c,ctx:this.props.ctx,isHistorical:!0,identifier:"conversation-history",modelConfiguration:this.props.modelConfiguration}))}}return e}};var PUe=de(po());var RUe=class extends Zt{static{a(this,"SummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(PUe.SystemMessage,null,"You are an expert at summarizing chat conversations.",vscpp("br",null),vscpp("br",null),"You will be provided:",vscpp("br",null),vscpp("br",null),"- A series of user/assistant message pairs in chronological order",vscpp("br",null),"- A final user message indicating the user's intent.",vscpp("br",null),vscpp("br",null),"Your task is to:",vscpp("br",null),vscpp("br",null),"- Create a detailed summary of the conversation that captures the user's intent and key information.",vscpp("br",null),vscpp("br",null),"Keep in mind:",vscpp("br",null),vscpp("br",null),"- The user is iterating on a feature specification, bug fix, or other common programming task.",vscpp("br",null),"- There may be relevant code snippets or files referenced in the conversation.",vscpp("br",null),"- The user is collaborating with the assistant to refine their ideas and solutions, course-correcting the assistant as needed.",vscpp("br",null),"- The user will provide feedback on the assistant's suggestions and may request changes or improvements.",vscpp("br",null),"- Disregard messages that the user has indicated are incorrect, irrelevant, or unhelpful.",vscpp("br",null),"- Preserve relevant and actionable context and key information.",vscpp("br",null),"- If the conversation is long or discusses several tasks, keep the summary focused on the task indicated by the user's intent.",vscpp("br",null),"- Always prefer decisions in later messages over earlier ones.",vscpp("br",null),vscpp("br",null),"Structure your summary using the following format:",vscpp("br",null),vscpp("br",null),"TITLE: A brief title for the summary",vscpp("br",null),"USER INTENT: The user's goal or intent for the conversation",vscpp("br",null),"TASK DESCRIPTION: Main technical goals and user requirements",vscpp("br",null),"EXISTING: What has already been accomplished. Include file paths and other direct references.",vscpp("br",null),"PENDING: What still needs to be done. Include file paths and other direct references.",vscpp("br",null),"CODE STATE: A list of all files discussed or modified. Provide code snippets or diffs that illustrate important context.",vscpp("br",null),"RELEVANT CODE/DOCUMENTATION SNIPPETS: Key code or documentation snippets from referenced files or discussions.",vscpp("br",null),"OTHER NOTES: Any additional context or information that may be relevant."),vscpp(jne,{priority:1,ctx:this.props.ctx,historyTurns:this.props.conversationTurns}),vscpp(PUe.UserMessage,null,vscpp(vscppf,null,"Here is the conversation to summarize above. Please provide a detailed summary following the specified format.")))}};function pWr(t){let e={title:"",userIntent:""},r=t.match(/\*{0,2}TITLE:\*{0,2}\s*(.+?)(?=\*{2}[A-Z]|\n|$)/);r&&(e.title=r[1].trim());let n=t.match(/\*{0,2}USER INTENT:\*{0,2}\s*(.+?)(?=\*{2}[A-Z]|\n|$)/);return n&&(e.userIntent=n[1].trim()),e}a(pWr,"parseStructuredSummary");var kUe=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"ChatMLConversationSummarizer")}async provideSummary(e,r,n){try{let o=e.turns.filter(m=>m.status==="success"&&m.request?.message&&m.response?.message),s=e.turns.length>0?e.turns[e.turns.length-1]:null,c=s&&s.request?.message?[...o,s]:o;if(c.length===0)return Ge.debug(this.ctx,"No turns to summarize"),"";let l=n.modelProviderName&&n.userRequestedModel?await nk(this.ctx,n.modelProviderName,n.userRequestedModel):await $o.getModelConfiguration(this.ctx,"user",n.userRequestedModel,void 0,e.id.toString(),aF(c)),p={messages:(await y0.create(RUe,{ctx:this.ctx,conversationTurns:c},l).renderPrompt(void 0,r)).messages,uiKind:n.uiKind,llmInteraction:n.llmInteraction,modelConfiguration:l},h=await this.chatFetcher.fetchResponse(p,r,n.telemetryWithExp,void 0);if(r.isCancellationRequested)return Ge.debug(this.ctx,"Summarization cancelled"),"";if(h.type==="success"){let m=h.value.trim();return m.match(/^".*"$/)&&(m=m.slice(1,-1)),Ge.debug(this.ctx,`Successfully generated conversation summary of length ${m.length}`),m}else{let m="reason"in h?h.reason:"unknown";return Ge.error(this.ctx,`Failed to fetch conversation summary because of response type (${h.type}) and reason (${m})`),""}}catch(o){return Ge.exception(this.ctx,o,"Error generating conversation summary"),""}}};f();var NUe=new Se("repository"),gO=class t{static{a(this,"GitBranchData")}constructor(e,r=!1){this.currentBranch=e,this.isDetachedHead=r}static detachedHead(){return new t(void 0,!0)}static branch(e){return new t(e,!1)}},qT=class{static{a(this,"GitBranchLoader")}},$ne=class extends qT{constructor(r){super();this.loaders=r}static{a(this,"GitFallbackBranchLoader")}async getBranchInfo(r,n){for(let o of this.loaders){let s=await o.getBranchInfo(r,n);if(s)return s}}};f();var hWr=require("child_process");var Vne=class extends qT{static{a(this,"GitCLIBranchLoader")}runCommand(e,r,n){return new Promise((o,s)=>{(0,hWr.execFile)(r,n,{cwd:e},(c,l)=>{c?s(c):o(l)})})}async tryRunCommand(e,r,n,o){try{return await this.runCommand(r,n,o)}catch(s){NUe.info(e,`Failed to run command '${n}' in ${r}:`,s);return}}async getBranchInfo(e,r){let n=Eo(r);if(n===void 0)return;let o=await this.tryRunCommand(e,n,"git",["-c","safe.directory=*","branch","--show-current",...this.extraArgs()]);if(o!==void 0){let s=o.trim();return s?gO.branch(s):gO.detachedHead()}}extraArgs(){return[]}};f();var Wne=class extends qT{static{a(this,"GitParsingBranchLoader")}async getBranchInfo(e,r){try{let n=e.get(Xn),o=Ti(r,".git","HEAD"),s=await n.readFileString(o);return this.parseHeadContent(s.trim())}catch(n){let o=typeof r=="string"?r:r.uri;NUe.info(e,`Failed to parse git HEAD file in ${o}:`,n);return}}parseHeadContent(e){if(e.startsWith("ref: refs/heads/")){let r=e.substring(16);return gO.branch(r)}else return this.isCommitSha(e)?gO.detachedHead():gO.detachedHead()}isCommitSha(e){return/^[a-f0-9]{40}$/i.test(e)}};var TF=new Se("codingAgentTurnProcessor"),DUe=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(Na),this.chatFetcher=this.chatFetcher??new ya(e.ctx),this.turnSuggestions=new _F(e.ctx,this.chatFetcher),this.codingAgentClient=new Hne(e.ctx),this.gitHubClient=new cC(e.ctx),this.codingAgentMessageHandler=new TUe,this.conversationSummarizer=new kUe(e.ctx,this.chatFetcher),this.conversation=e.conversation,this.turn=e.turn}static{a(this,"CodingAgentTurnProcessor")}async process(e,r,n,o,s,c){try{let l=await rc(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});await this.processWithCodingAgent(e,r,this.turnContext,l,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l),qo(this.turnContext.ctx,l,"codingAgent");let u=l instanceof Error?l.message:JSON.stringify(l);this.turn.status="error",this.updateTurnResponseWithError(u),await this.endProgress({error:{message:u,code:Ene.Unknown,responseIsIncomplete:!0}})}}async processWithCodingAgent(e,r,n,o,s,c,l,u){await this.conversationProgress.begin(this.conversation,this.turn,e),r.onCancellationRequested(async()=>{TF.info(this.turnContext.ctx,`Cancellation requested for turn ${this.turn.id}`),this.turn.status="cancelled",await this.cancelProgress()});try{let d;if(this.turnContext.turn.workspaceFolders&&this.turnContext.turn.workspaceFolders.length>0?d=this.turnContext.turn.workspaceFolders[0]:d=this.turnContext.turn.workspaceFolder,!d)throw new fy("No workspace folder available for git repository detection");let h=await new Em(this.turnContext.ctx).getRepo(d);if(!h||!h.isGitHub())throw new fy("No GitHub repository found in the workspace folder");if(!h.owner||!h.name)throw new fy("Could not determine repository owner and name");let m={owner:h.owner,name:h.name},A=await new $ne([new Vne,new Wne]).getBranchInfo(this.turnContext.ctx,d),y;if(A?.currentBranch&&!A.isDetachedHead){y=A.currentBranch,TF.debug(this.turnContext.ctx,`Found current branch: ${y}`);try{await this.gitHubClient.getBranch(m.owner,m.name,y),TF.debug(this.turnContext.ctx,`Branch ${y} exists remotely`)}catch(Q){if(Q instanceof yp&&Q.status===404){let M=`Base branch "${y}" does not exist remotely in ${m.owner}/${m.name}. Please push the branch to the remote repository before creating a coding agent job.`;throw await this.conversationProgress.report(this.conversation,this.turn,{reply:`${M} +`,u=Math.round(c*(r-Math.floor(l.length/c))),d=Math.round(u*.4),p=u-d;return e.slice(0,d)+l+e.slice(-p)}};f();var h0=de(co());function Lio(t){let e=t.filter(n=>n.type==="image_url"),r=t.filter(n=>n.type==="text").map(n=>n.text).join("");return{imageUrls:e,textContent:r}}a(Lio,"separateTextAndImages");function Fio(t){return t.map(e=>vscpp(h0.Image,{src:e.image_url.url,detail:e.image_url.detail}))}a(Fio,"createImageElements");function O7e(t){let{imageUrls:e,textContent:r}=Lio(t);return e.length===0?[vscpp(vscppf,null,r)]:[vscpp(h0.TextChunk,null,vscpp(vscppf,null,r)),...Fio(e)]}a(O7e,"renderMixedContent");function HPt(t){return t==null?[]:t.map(r=>({id:r.id||"",type:"function",function:{name:r.function.name,arguments:typeof r.function.arguments=="string"?r.function.arguments:JSON.stringify(r.function.arguments)},approxNumTokens:r.approxNumTokens}))}a(HPt,"convertToPromptTsxToolCall");function B7e(t){switch(t.role){case"assistant":return Uio(t);case"tool":return Qio(t);case"user":return qio(t);case"system":return Gio(t);case"function":throw new Error("ChatRole.Function is not supported in prompt-tsx conversion. Use ChatRole.Tool instead.");default:throw new Error(`Unsupported chat role: ${String(t.role)}`)}}a(B7e,"convertChatMessageToPromptTsx");function Uio(t){let e=t.thinking?vscpp(jre,{thinking:t.thinking}):vscpp(vscppf,null);return typeof t.content=="string"?vscpp(h0.AssistantMessage,{toolCalls:HPt(t.tool_calls)},vscpp(vscppf,null,t.content),e):Array.isArray(t.content)?vscpp(h0.AssistantMessage,{toolCalls:HPt(t.tool_calls)},vscpp(vscppf,null,O7e(t.content)),e):vscpp(h0.AssistantMessage,{toolCalls:HPt(t.tool_calls)},vscpp(vscppf,null,JSON.stringify(t.content)),e)}a(Uio,"renderAssistantMessage");function Qio(t){return typeof t.content=="string"?vscpp(h0.ToolMessage,{toolCallId:t.tool_call_id||""},vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(h0.ToolMessage,{toolCallId:t.tool_call_id||""},O7e(t.content)):vscpp(h0.ToolMessage,{toolCallId:t.tool_call_id||""},vscpp(vscppf,null,JSON.stringify(t.content)))}a(Qio,"renderToolMessage");function qio(t){return typeof t.content=="string"?vscpp(h0.UserMessage,null,vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(h0.UserMessage,null,O7e(t.content)):vscpp(h0.UserMessage,null,vscpp(vscppf,null,JSON.stringify(t.content)))}a(qio,"renderUserMessage");function Gio(t){return typeof t.content=="string"?vscpp(h0.SystemMessage,null,vscpp(vscppf,null,t.content)):Array.isArray(t.content)?vscpp(h0.SystemMessage,null,O7e(t.content)):vscpp(h0.SystemMessage,null,vscpp(vscppf,null,JSON.stringify(t.content)))}a(Gio,"renderSystemMessage");var Hio=new Se("conversationHistoryPrompt"),nne=class extends Xt{static{a(this,"ConversationHistoryPrompt")}fixToolCallsInResponse(e,r){if(e.tool_calls&&e.tool_calls.length){let n=e.tool_calls,o=[];for(let s of n)r.some(l=>l.role==="tool"&&l.tool_call_id===s.id)?o.push(s):Hio.warn(this.props.ctx,`Tool call ${s.id} does not have a result in the response. Removing it from the tool calls history.`);return{...e,tool_calls:o}}return e}renderCopilot(){return vscpp(vscppf,null,this.renderHistory())}renderHistory(){let e=[];for(let r=0;rthis.fixToolCallsInResponse(l,o)),c=K6(s,{ctx:this.props.ctx,identifier:"conversation history",enableWarnings:!0});c.length>0&&e.push(vscpp(nk,{assistantRounds:c,ctx:this.props.ctx,isHistorical:!0,identifier:"conversation-history",modelConfiguration:this.props.modelConfiguration}))}}return e}};var F7e=de(co());var L7e=class extends Xt{static{a(this,"SummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(F7e.SystemMessage,null,"You are an expert at summarizing chat conversations.",vscpp("br",null),vscpp("br",null),"You will be provided:",vscpp("br",null),vscpp("br",null),"- A series of user/assistant message pairs in chronological order",vscpp("br",null),"- A final user message indicating the user's intent.",vscpp("br",null),vscpp("br",null),"Your task is to:",vscpp("br",null),vscpp("br",null),"- Create a detailed summary of the conversation that captures the user's intent and key information.",vscpp("br",null),vscpp("br",null),"Keep in mind:",vscpp("br",null),vscpp("br",null),"- The user is iterating on a feature specification, bug fix, or other common programming task.",vscpp("br",null),"- There may be relevant code snippets or files referenced in the conversation.",vscpp("br",null),"- The user is collaborating with the assistant to refine their ideas and solutions, course-correcting the assistant as needed.",vscpp("br",null),"- The user will provide feedback on the assistant's suggestions and may request changes or improvements.",vscpp("br",null),"- Disregard messages that the user has indicated are incorrect, irrelevant, or unhelpful.",vscpp("br",null),"- Preserve relevant and actionable context and key information.",vscpp("br",null),"- If the conversation is long or discusses several tasks, keep the summary focused on the task indicated by the user's intent.",vscpp("br",null),"- Always prefer decisions in later messages over earlier ones.",vscpp("br",null),vscpp("br",null),"Structure your summary using the following format:",vscpp("br",null),vscpp("br",null),"TITLE: A brief title for the summary",vscpp("br",null),"USER INTENT: The user's goal or intent for the conversation",vscpp("br",null),"TASK DESCRIPTION: Main technical goals and user requirements",vscpp("br",null),"EXISTING: What has already been accomplished. Include file paths and other direct references.",vscpp("br",null),"PENDING: What still needs to be done. Include file paths and other direct references.",vscpp("br",null),"CODE STATE: A list of all files discussed or modified. Provide code snippets or diffs that illustrate important context.",vscpp("br",null),"RELEVANT CODE/DOCUMENTATION SNIPPETS: Key code or documentation snippets from referenced files or discussions.",vscpp("br",null),"OTHER NOTES: Any additional context or information that may be relevant."),vscpp(nne,{priority:1,ctx:this.props.ctx,historyTurns:this.props.conversationTurns}),vscpp(F7e.UserMessage,null,vscpp(vscppf,null,"Here is the conversation to summarize above. Please provide a detailed summary following the specified format.")))}};function fzr(t){let e={title:"",userIntent:""},r=t.match(/\*{0,2}TITLE:\*{0,2}\s*(.+?)(?=\*{2}[A-Z]|\n|$)/);r&&(e.title=r[1].trim());let n=t.match(/\*{0,2}USER INTENT:\*{0,2}\s*(.+?)(?=\*{2}[A-Z]|\n|$)/);return n&&(e.userIntent=n[1].trim()),e}a(fzr,"parseStructuredSummary");var U7e=class{constructor(e,r){this.ctx=e;this.chatFetcher=r}static{a(this,"ChatMLConversationSummarizer")}async provideSummary(e,r,n){try{let o=e.turns.filter(m=>m.status==="success"&&m.request?.message&&m.response?.message),s=e.turns.length>0?e.turns[e.turns.length-1]:null,c=s&&s.request?.message?[...o,s]:o;if(c.length===0)return Ge.debug(this.ctx,"No turns to summarize"),"";let l=n.modelProviderName&&n.userRequestedModel?await $P(this.ctx,n.modelProviderName,n.userRequestedModel):await qo.getModelConfiguration(this.ctx,"user",n.userRequestedModel,void 0,e.id.toString(),M6(c)),p={messages:(await p0.create(L7e,{ctx:this.ctx,conversationTurns:c},l).renderPrompt(void 0,r)).messages,uiKind:n.uiKind,llmInteraction:n.llmInteraction,modelConfiguration:l},h=await this.chatFetcher.fetchResponse(p,r,n.telemetryWithExp,void 0);if(r.isCancellationRequested)return Ge.debug(this.ctx,"Summarization cancelled"),"";if(h.type==="success"){let m=h.value.trim();return m.match(/^".*"$/)&&(m=m.slice(1,-1)),Ge.debug(this.ctx,`Successfully generated conversation summary of length ${m.length}`),m}else{let m="reason"in h?h.reason:"unknown";return Ge.error(this.ctx,`Failed to fetch conversation summary because of response type (${h.type}) and reason (${m})`),""}}catch(o){return Ge.exception(this.ctx,o,"Error generating conversation summary"),""}}};f();var Q7e=new Se("repository"),XM=class t{static{a(this,"GitBranchData")}constructor(e,r=!1){this.currentBranch=e,this.isDetachedHead=r}static detachedHead(){return new t(void 0,!0)}static branch(e){return new t(e,!1)}},RT=class{static{a(this,"GitBranchLoader")}},ine=class extends RT{constructor(r){super();this.loaders=r}static{a(this,"GitFallbackBranchLoader")}async getBranchInfo(r,n){for(let o of this.loaders){let s=await o.getBranchInfo(r,n);if(s)return s}}};f();var pzr=require("child_process");var one=class extends RT{static{a(this,"GitCLIBranchLoader")}runCommand(e,r,n){return new Promise((o,s)=>{(0,pzr.execFile)(r,n,{cwd:e},(c,l)=>{c?s(c):o(l)})})}async tryRunCommand(e,r,n,o){try{return await this.runCommand(r,n,o)}catch(s){Q7e.info(e,`Failed to run command '${n}' in ${r}:`,s);return}}async getBranchInfo(e,r){let n=mo(r);if(n===void 0)return;let o=await this.tryRunCommand(e,n,"git",["-c","safe.directory=*","branch","--show-current",...this.extraArgs()]);if(o!==void 0){let s=o.trim();return s?XM.branch(s):XM.detachedHead()}}extraArgs(){return[]}};f();var sne=class extends RT{static{a(this,"GitParsingBranchLoader")}async getBranchInfo(e,r){try{let n=e.get(Jn),o=bi(r,".git","HEAD"),s=await n.readFileString(o);return this.parseHeadContent(s.trim())}catch(n){let o=typeof r=="string"?r:r.uri;Q7e.info(e,`Failed to parse git HEAD file in ${o}:`,n);return}}parseHeadContent(e){if(e.startsWith("ref: refs/heads/")){let r=e.substring(16);return XM.branch(r)}else return this.isCommitSha(e)?XM.detachedHead():XM.detachedHead()}isCommitSha(e){return/^[a-f0-9]{40}$/i.test(e)}};var J6=new Se("codingAgentTurnProcessor"),q7e=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(xa),this.chatFetcher=this.chatFetcher??new fa(e.ctx),this.turnSuggestions=new z6(e.ctx,this.chatFetcher),this.codingAgentClient=new rne(e.ctx),this.gitHubClient=new KE(e.ctx),this.codingAgentMessageHandler=new D7e,this.conversationSummarizer=new U7e(e.ctx,this.chatFetcher),this.conversation=e.conversation,this.turn=e.turn}static{a(this,"CodingAgentTurnProcessor")}async process(e,r,n,o,s,c){try{let l=await Ja(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});await this.processWithCodingAgent(e,r,this.turnContext,l,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l),Lo(this.turnContext.ctx,l,"codingAgent");let u=l instanceof Error?l.message:JSON.stringify(l);this.turn.status="error",this.updateTurnResponseWithError(u),await this.endProgress({error:{message:u,code:Dre.Unknown,responseIsIncomplete:!0}})}}async processWithCodingAgent(e,r,n,o,s,c,l,u){await this.conversationProgress.begin(this.conversation,this.turn,e),r.onCancellationRequested(async()=>{J6.info(this.turnContext.ctx,`Cancellation requested for turn ${this.turn.id}`),this.turn.status="cancelled",await this.cancelProgress()});try{let d;if(this.turnContext.turn.workspaceFolders&&this.turnContext.turn.workspaceFolders.length>0?d=this.turnContext.turn.workspaceFolders[0]:d=this.turnContext.turn.workspaceFolder,!d)throw new ny("No workspace folder available for git repository detection");let h=await new lm(this.turnContext.ctx).getRepo(d);if(!h||!h.isGitHub())throw new ny("No GitHub repository found in the workspace folder");if(!h.owner||!h.name)throw new ny("Could not determine repository owner and name");let m={owner:h.owner,name:h.name},A=await new ine([new one,new sne]).getBranchInfo(this.turnContext.ctx,d),y;if(A?.currentBranch&&!A.isDetachedHead){y=A.currentBranch,J6.debug(this.turnContext.ctx,`Found current branch: ${y}`);try{await this.gitHubClient.getBranch(m.owner,m.name,y),J6.debug(this.turnContext.ctx,`Branch ${y} exists remotely`)}catch(Q){if(Q instanceof fp&&Q.status===404){let M=`Base branch "${y}" does not exist remotely in ${m.owner}/${m.name}. Please push the branch to the remote repository before creating a coding agent job.`;throw await this.conversationProgress.report(this.conversation,this.turn,{reply:`${M} -`}),TF.error(this.turnContext.ctx,M),new fy(M)}throw Q}}else throw new fy("No current branch found or detached HEAD state");if(r.isCancellationRequested)return;let E=dn(this.turn.request.message),_=EVr(this.turnContext.ctx,this.turn.request.references,this.turn.request.activeEditor),v=CVr(_);TF.debug(this.turnContext.ctx,`Extracted ${_.length} context file paths (${v.length} characters formatted)`);let b="",I=AVr(E);if(this.conversation.turns.length>1){await this.conversationProgress.report(this.conversation,this.turn,{reply:`Analyzing chat history... +`}),J6.error(this.turnContext.ctx,M),new ny(M)}throw Q}}else throw new ny("No current branch found or detached HEAD state");if(r.isCancellationRequested)return;let E=dn(this.turn.request.message),_=yWr(this.turnContext.ctx,this.turn.request.references,this.turn.request.activeEditor),v=EWr(_);J6.debug(this.turnContext.ctx,`Extracted ${_.length} context file paths (${v.length} characters formatted)`);let b="",I=gWr(E);if(this.conversation.turns.length>1){await this.conversationProgress.report(this.conversation,this.turn,{reply:`Analyzing chat history... `});let{structuredSummary:Q,rawSummary:M}=await this.summarizeConversation(r,o,l,u);if(r.isCancellationRequested)return;Q&&Q.title&&(I=Q.title),b=M||""}let x=v;b&&(x=v+(v?` -`:"")+b);let{problemStatement:R}=gVr(this.turnContext.ctx,E,x||void 0);await this.conversationProgress.report(this.conversation,this.turn,{reply:`Delegating to coding agent... +`:"")+b);let{problemStatement:w}=mWr(this.turnContext.ctx,E,x||void 0);await this.conversationProgress.report(this.conversation,this.turn,{reply:`Delegating to coding agent... -`});let w=await this.codingAgentClient.createCodingTask(I,R,m.owner,m.name,y,r);if(r.isCancellationRequested)return;try{await this.codingAgentMessageHandler.sendCodingAgentMessage(this.turnContext,w.title,w.body||"",w.html_url)}catch(Q){TF.warn(this.turnContext.ctx,"Failed to send coding agent message to client",Q)}let P="Your work will be continued in this pull request:";await this.conversationProgress.report(this.conversation,this.turn,{reply:P}),this.turn.response={message:P,type:"model"},this.turn.status="success";let k={suggestedTitle:void 0};if(this.strategy.computeSuggestions){let Q=await this.fetchSuggestedTitle(r,o.extendedBy({messageSource:"chat.user"},{}));typeof Q=="string"&&Q!==""&&(k.suggestedTitle=Q)}at(this.turnContext.ctx,"codingAgent",o),Kn(this.turnContext.ctx,"codingAgent",o),await this.endProgress(k)}catch(d){if(V2(this.turnContext.ctx,"codingAgent",d,o),d instanceof Sc)TF.info(this.turnContext.ctx,`Turn ${this.turn.id} was cancelled`,d),qo(this.turnContext.ctx,d,"codingAgent"),this.turn.status="cancelled",this.updateTurnResponseWithError("Cancelled by user"),await this.cancelProgress();else if(d instanceof vF)qo(this.turnContext.ctx,d,"codingAgent"),this.turn.status="error",this.updateTurnResponseWithError(d.message),await this.endProgress({error:{message:d.message,code:Ene.Default,responseIsIncomplete:!0}});else throw TF.error(this.turnContext.ctx,`Error in processing turn ${this.turn.id}`,d),d}}async summarizeConversation(e,r,n,o){let s=await this.conversationSummarizer.provideSummary(this.conversation,e,{userRequestedModel:n||"",modelProviderName:o||"",llmInteraction:this.turnContext.toLlmInteraction(),uiKind:this.strategy.uiKind,telemetryWithExp:r});if(!s)return{structuredSummary:null,rawSummary:null};let c=pWr(s);return Ge.debug(this.turnContext.ctx,`Generated conversation summary - Title: ${c.title}, Intent: ${c.userIntent}`),{structuredSummary:c,rawSummary:s}}async fetchSuggestedTitle(e,r){let n=await this.turnSuggestions.fetchRawSuggestions(this.turnContext,e,this.strategy.uiKind,r);if(n)return Ge.debug(this.turnContext.ctx,"Computed suggested title",n.suggestedTitle),n.suggestedTitle}updateTurnResponseWithError(e){this.turn.response?.message?this.turn.response.message=Xj(this.turn.response?.message,{role:"assistant",content:e}):this.turn.response={message:e,type:"meta"}}async endProgress(e){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};f();f();var mWr="```",aCe=String.raw``,Hro=String.raw`${mWr}[\w]*?\n(?[\s\S]*?)\n${mWr}`,jro=new RegExp(aCe+` -`+Hro,"gs"),TPt=["replace","delete"];function SPt(t,e){let r=t.matchAll(jro),n=Array.from(r),o=[];for(let s of n){let c=s.groups;if(!c||!TPt.includes(c.mode))continue;let l=c.start?parseInt(c.start)-1:-1,u=c.end?parseInt(c.end)-1:l,p=c.codeblock.split(` +`});let R=await this.codingAgentClient.createCodingTask(I,w,m.owner,m.name,y,r);if(r.isCancellationRequested)return;try{await this.codingAgentMessageHandler.sendCodingAgentMessage(this.turnContext,R.title,R.body||"",R.html_url)}catch(Q){J6.warn(this.turnContext.ctx,"Failed to send coding agent message to client",Q)}let P="Your work will be continued in this pull request:";await this.conversationProgress.report(this.conversation,this.turn,{reply:P}),this.turn.response={message:P,type:"model"},this.turn.status="success";let k={suggestedTitle:void 0};if(this.strategy.computeSuggestions){let Q=await this.fetchSuggestedTitle(r,o.extendedBy({messageSource:"chat.user"},{}));typeof Q=="string"&&Q!==""&&(k.suggestedTitle=Q)}st(this.turnContext.ctx,"codingAgent",o),O2(this.turnContext.ctx,"codingAgent",o),await this.endProgress(k)}catch(d){if(MDe(this.turnContext.ctx,"codingAgent",d,o),d instanceof Ec)J6.info(this.turnContext.ctx,`Turn ${this.turn.id} was cancelled`,d),Lo(this.turnContext.ctx,d,"codingAgent"),this.turn.status="cancelled",this.updateTurnResponseWithError("Cancelled by user"),await this.cancelProgress();else if(d instanceof Y6)Lo(this.turnContext.ctx,d,"codingAgent"),this.turn.status="error",this.updateTurnResponseWithError(d.message),await this.endProgress({error:{message:d.message,code:Dre.Default,responseIsIncomplete:!0}});else throw J6.error(this.turnContext.ctx,`Error in processing turn ${this.turn.id}`,d),d}}async summarizeConversation(e,r,n,o){let s=await this.conversationSummarizer.provideSummary(this.conversation,e,{userRequestedModel:n||"",modelProviderName:o||"",llmInteraction:this.turnContext.toLlmInteraction(),uiKind:this.strategy.uiKind,telemetryWithExp:r});if(!s)return{structuredSummary:null,rawSummary:null};let c=fzr(s);return Ge.debug(this.turnContext.ctx,`Generated conversation summary - Title: ${c.title}, Intent: ${c.userIntent}`),{structuredSummary:c,rawSummary:s}}async fetchSuggestedTitle(e,r){let n=await this.turnSuggestions.fetchRawSuggestions(this.turnContext,e,this.strategy.uiKind,r);if(n)return Ge.debug(this.turnContext.ctx,"Computed suggested title",n.suggestedTitle),n.suggestedTitle}updateTurnResponseWithError(e){this.turn.response?.message?this.turn.response.message=oj(this.turn.response?.message,{role:"assistant",content:e}):this.turn.response={message:e,type:"meta"}}async endProgress(e){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};f();f();var hzr="```",oEe=String.raw``,jio=String.raw`${hzr}[\w]*?\n(?[\s\S]*?)\n${hzr}`,$io=new RegExp(oEe+` +`+jio,"gs"),jPt=["replace","delete"];function $Pt(t,e){let r=t.matchAll($io),n=Array.from(r),o=[];for(let s of n){let c=s.groups;if(!c||!jPt.includes(c.mode))continue;let l=c.start?parseInt(c.start)-1:-1,u=c.end?parseInt(c.end)-1:l,p=c.codeblock.split(` `),h=p[0].match(/^\s*/)?.[0]??"";p.forEach((y,E)=>{p[E]=y.slice(h.length)});let m={mode:c.mode,codeblock:p.join(` -`),start:l,end:u},g=IPt([m],e);if(!g)continue;let A={text:g,uri:e.uri};o.push({...m,updatedDocument:A})}return o}a(SPt,"extractEditsFromTaggedCodeblocks");function IPt(t,e){if(t.length===0)return;t.sort((n,o)=>n.start!==o.start?o.start-n.start:o.end-n.end);let r=e.getText().split(` +`),start:l,end:u},g=VPt([m],e);if(!g)continue;let A={text:g,uri:e.uri};o.push({...m,updatedDocument:A})}return o}a($Pt,"extractEditsFromTaggedCodeblocks");function VPt(t,e){if(t.length===0)return;t.sort((n,o)=>n.start!==o.start?o.start-n.start:o.end-n.end);let r=e.getText().split(` `);for(let n of t){let o=n.start,s=n.end,c=n.mode,l=n.codeblock.split(` `);if(!(o<0||s<0||s=r.length||s>=r.length)){if(c==="delete")r.splice(o,s-o+1);else if(c==="replace"){let u=r[o].match(/^\s*/)?.[0]??"";l.forEach((d,p)=>{l[p]=u+d}),r.splice(o,s-o+1,...l)}}}return r.join(` -`)}a(IPt,"applyEditsToDocument");var zne=class{constructor(e){this.ctx=e;this.earlyReturnResponse="Oops, an error has occurred. Please try again";this.uiKind="conversationPanel";this.computeSuggestions=!0}static{a(this,"PanelTurnProcessorStrategy")}processResponse(){return[]}async buildConversationPrompt(e,r,n,o){let s="user",c=await $o.getModelConfiguration(e.ctx,s),l={promptType:s,modelConfiguration:c,languageId:r,userSelectedModelName:o};return await this.ctx.get(vm).toPrompt(e,l)}extractEditsFromResponse(e,r){return[]}},MUe=class{constructor(e){this.ctx=e;this.earlyReturnResponse="Please open a file and select code for the inline chat to be available";this.uiKind="conversationInline";this.computeSuggestions=!1}static{a(this,"InlineTurnProcessorStrategy")}async buildConversationPrompt(e,r,n){let o=await this.getCurrentEditorSkill(e);if(!o)return;let s=await this.getDocumentIfValid(o.uri);if(!s)return;let c=n?.producesCodeEdits===!1?"user":"inline",l=await e.ctx.get(Da).getBestChatModelConfig($E(c)),u={promptType:c,modelConfiguration:l,languageId:r};return u.promptType==="inline"&&(this.currentDocument=s),await this.ctx.get(vm).toPrompt(e,u)}async processResponse(e){let r=[],n=dn(e.response?.message??"");if(n&&e.status==="success"&&this.currentDocument){let o=await this.processInlineResponse(n,this.currentDocument);o&&r.push(o)}return r}async getCurrentEditorSkill(e){let r=await e.skillResolver.resolve(Vg);if(r)return r}async getDocumentIfValid(e){let r=await this.ctx.get(In).getOrReadTextDocument({uri:e});if(r.status==="valid")return r.document}async processInlineResponse(e,r){let o=SPt(e,r).filter(c=>TPt.includes(c.mode)),s=IPt(o,r);if(s)return await this.ctx.get(g0).documentDiff({original:r.getText(),updated:s}),{uri:r.uri,text:s}}extractEditsFromResponse(e,r){return SPt(e,r)}};var OUe=class{constructor(){this.slug="github-copilot-coding-agent";this.name="GitHub Copilot Coding Agent";this.description="Create coding tasks that are executed by GitHub Copilot Coding Agent";this.avatarUrl=void 0}static{a(this,"BackendCodingAgent")}additionalSkills(e){return[]}turnProcessor(e){let r=new zne(e.ctx);return new DUe(e,r)}};f();f();f();f();function gWr(t){return t?t.filter(e=>e.type==="github.web-search").map(e=>e):[]}a(gWr,"filterUnsupportedReferences");function AWr(t){return t?t.filter(e=>e.type==="github.web-search"):[]}a(AWr,"convertToCopilotReferences");var yWr=S.Object({type:S.Literal("github.web-search"),id:S.String(),data:S.Object({query:S.String(),type:S.String(),results:S.Optional(S.Array(S.Object({title:S.String(),excerpt:S.String(),url:S.String()})))}),metadata:S.Optional(S.Object({display_name:S.Optional(S.String()),display_icon:S.Optional(S.String())}))});var SF=class{constructor(e){this.deltaApplier=e;this.appliedLength=0;this.appliedText="";this.appliedAnnotations=[]}static{a(this,"ConversationFinishCallback")}isFinishedAfter(e,r){let n=e.substring(this.appliedLength,e.length),s=this.mapAnnotations(r.annotations).filter(c=>!this.appliedAnnotations.includes(c.id));this.append(n,s,gWr(r.copilotReferences),r.copilotErrors??[],r.copilotConfirmation,r.thinking)}append(e,r,n,o,s,c){this.deltaApplier(e,r,n,o,s,c),this.appliedLength+=e.length,this.appliedText+=e,this.appliedAnnotations.push(...r.map(l=>l.id))}mapAnnotations(e){if(!e)return[];let r=[],n=e.for("CodeVulnerability").map(s=>({...s,type:"code_vulnerability"})),o=e.for("IPCodeCitations").map(s=>({...s,type:"ip_code_citations"}));return r.push(...n),r.push(...o),r}};f();f();var gk=class{constructor(e){this.ctx=e;this.githubRepositoryInfoCache=new Map}static{a(this,"GitHubRepositoryApi")}async getRepositoryInfo(e){let r=`${e.hostname}/${e.owner}/${e.repo}`,n=this.githubRepositoryInfoCache.get(r);if(n)return n;let o=await this._doGetRepositoryInfo(e);if(o?.ok){let s=await o.json();return this.githubRepositoryInfoCache.set(r,s),s}}async _doGetRepositoryInfo({owner:e,repo:r,hostname:n}){let o=await this.ctx.get(en).getSession(),s;if(o&&new URL(o.serverUrl).hostname===n)s=o;else{let u=await this.ctx.get($5).getAuthRecord({authAuthority:n});u&&(s={accessToken:u.oauth_token,apiUrl:`https://api.${n}/`})}if(!s&&!(n==="github.com"||n.endsWith(".ghe.com")))return;let c={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"};s&&(c.Authorization=`Bearer ${s.accessToken}`);let l=new URL(`repos/${e}/${r}`,s?.apiUrl||`https://api.${n}`).href;return this.ctx.get(dr).fetch(l,{method:"GET",headers:c})}};f();f();var EWr=S.Object({name:S.String(),url:S.String()}),CWr=S.Object({path:S.String(),head:S.Optional(S.Object({name:S.String(),upstream:S.Optional(EWr)})),remotes:S.Optional(S.Array(EWr))}),xPt=class{constructor(e){this.turnContext=e}static{a(this,"GitMetadataSkillProcessor")}value(){return .8}processSkill(e){this.turnContext.collectLabel(Ak,"git repository information");let r=[];return r.push([new nr(["Metadata about the current git repository:"]),1]),e.head&&e.head.name?(r.push([new nr([`- Current branch name: ${e.head.name}`]),1]),e.head.upstream&&r.push([new nr([`- Upstream name and url: ${e.head.upstream.name} - ${e.head.upstream.url}`]),1])):r.push([new nr(["- Detached HEAD: yes"]),1]),e.remotes&&e.remotes.length>0&&r.push([new nr([`- Remotes: ${e.remotes.map(n=>n.name).join(", ")}`]),1]),new nr(r)}},Ak="git-metadata",BUe=class extends mh{static{a(this,"GitMetadataSkill")}constructor(e){super(Ak,"Metadata about the current git repository, useful for questions about branch management and git related commands","Reading git information",()=>e,r=>new xPt(r))}};async function _Wr(t){let e=await t.skillResolver.resolve(Vg);if(e){let c=e.uri,l=m6(t.ctx,c);if(T6r(l))return{repoInfo:l,skillUsed:Vg}}let r=await t.skillResolver.resolve(Ak);if(!r||!r.remotes||r.remotes.length===0){Ge.debug(t.ctx,"Git metadata skill is not available or no remotes available.");return}let o=r.remotes.find(c=>c.name==="origin")??r.remotes[0],s=CSt(o.url);if(s)return{repoInfo:{baseFolder:{uri:r.path},url:o.url,...s},skillUsed:Ak}}a(_Wr,"extractRepoInfo");async function vWr(t){let e=[];return await $ro(t,e),await Vro(t,e),await Wro(t,e),e}a(vWr,"skillsToReference");async function $ro(t,e){let r=await zro(t);r&&e.push(r)}a($ro,"addRepositoryReference");async function Vro(t,e){let r=await Yro(t);r&&e.push(r)}a(Vro,"addSelectionReference");async function Wro(t,e){let r=[],n=await Jro(t);n&&r.push(n),r.push(...await Xro(t)),r.length>0&&e.push(...r)}a(Wro,"addFileReferences");async function zro(t){let e=await _Wr(t);if(e){let r=t.ctx.get(gk),n=e.repoInfo.owner,o=e.repoInfo.repo,s=await r.getRepositoryInfo(e.repoInfo);if(s)return{type:"github.repository",id:`${n}/${o}`,data:{type:"repository",name:o,ownerLogin:n,id:s.id}}}}a(zro,"gitMetadataToReference");async function Yro(t){let e=await t.skillResolver.resolve(Vg);if(e&&e.selection){let n=await t.ctx.get(In).getOrReadTextDocument(e),o=Kl(n);if(await t.collectFile(t.turn.agent.agentSlug,e.uri,o,e.selection),n.status==="valid")return Kro(e,n.document)}}a(Yro,"currentEditorToSelectionReference");function Kro(t,e){if(t.selection&&!Bne(t.selection)){let r=e.getText(t.selection);return{type:"client.selection",id:t.uri,data:{start:{line:t.selection.start.line,col:t.selection.start.character},end:{line:t.selection.end.line,col:t.selection.end.character},content:r}}}}a(Kro,"extractSelection");async function Jro(t){let e=await t.skillResolver.resolve(Vg);if(e){let n=await t.ctx.get(In).getOrReadTextDocument(e),o=Kl(n);if(await t.collectFile(t.turn.agent.agentSlug,e.uri,o),n.status==="valid")return{type:"client.file",id:n.document.uri,data:{content:n.document.getText(),language:n.document.detectedLanguageId}}}}a(Jro,"currentEditorToFileReference");async function Xro(t){let e=[],r=t.turn.request.references;if(r&&r.length>0){let n=t.ctx.get(In);for(let o of r)if(o.type==="file"){let s=await n.getOrReadTextDocument(o),c=Kl(s);if(await t.collectFile(t.turn.agent.agentSlug,o.uri,c,o.selection),s.status==="valid"){let l=s.document.getText();e.push({type:"client.file",id:o.uri,data:{content:l,language:s.document.detectedLanguageId}})}}}return e}a(Xro,"fileReferenceToPlatformFileReference");f();f();var Yne=class t{static{a(this,"CapiErrorTranslator")}static formatRequestId(e,r){let n=[];return e&&n.push(`Request ID: ${e}`),r&&n.push(`GitHub Request ID: ${r}`),n.length>0?` ${n.join(" | ")}`:""}static appendRequestId(e,r,n){return`${e}${t.formatRequestId(r,n)}`}static translateErrorMessage(e,r,n,o,s){let c;switch(e){case 466:c="Oops, your plugin is out of date. Please update it.";break;case 401:c="Oops, you are not authorized. Please sign in. If you are using a custom model, please check if the API key is still valid.";break;case 402:c=r||"Oops, you need to upgrade your plan.";break;case 413:c="Oops, your request is too large. Please try again with a smaller input.";break;case 429:c=o!==void 0?`The service is currently rate-limited. Please wait a moment and try again in ${o}s.`:"The service is currently rate-limited. Please wait a moment and try again.";break;case 503:c=r||"Oops, the service is currently unavailable. Please try again later.";break;default:if(r&&r.trim().length>0){let l=360,u=t.formatRequestId(n,s),d="Sorry, an error occurred while generating a response. Details: ",p=l-d.length-u.length;if(r.length<=p)return`${d}${r}${u}`;{let h=r.substring(0,p);return`${d}${h}... Read more from logs.${u}`}}c="Sorry, an error occurred while generating a response.";break}return t.appendRequestId(c,n,s)}};f();f();f();var PWr=de(UUe()),kPt=de(require("path"));var kWr=500,cno=Math.floor(.25*kWr),QUe=class{static{a(this,"FixedSizeChunking")}async chunk(e,r){let n=[],o=kPt.default.extname(__filename)===".ts"?kPt.default.resolve(__dirname,"../../../../../../dist/main.js"):__filename;return n=await PWr.job(async({text:s,uri:c,tokenizerName:l,directory:u,chunkSize:d,overlap:p})=>{let m=await require(u).getTokenizerAsync(l),g=m.tokenize(s),A=g.length,y=[],E=0;for(;E=A,v=_?A:E+d,b=g.slice(E,v),I=m.detokenize(b),x=s.indexOf(I);y.push({id:`${c.toString()}#${E}`,chunk:I,tokenCount:b.length,range:{start:x,end:x+I.length}}),E=_?v:v-p}return y},{data:{text:e.getText(),uri:e.uri.toString(),tokenizerName:r.tokenizer,directory:o,chunkSize:kWr,overlap:cno}}),n}};var lno="fixedSize",uno=new Map([["fixedSize",QUe]]);function NWr(t){let e=t==="default"?lno:t,r=uno.get(e);if(!r)throw new Error(`Chunking constructor for type ${t} not found`);return r}a(NWr,"getChunkingAlgorithm");f();f();var qUe=de(x5()),yk=de(require("fs")),DWr=require("os"),GT=de(require("path")),Kne=require("process");var NPt=5e4,dno=new Se("workspaceChunks"),GUe=class t{constructor(e,r){this.ctx=e;this.pathHashLength=8;this.chunksCountCache=new Map;let n=ei(r.uri),o=(0,qUe.SHA256)(r.uri).toString().substring(0,this.pathHashLength);this.cacheRootPath=GT.join(DPt(),"project-context",`${n}.${o}`)}static{a(this,"WorkspaceChunks")}static{this.CACHE_VERSION="1.0.0"}getChunksCacheFile(e){let r=(0,qUe.SHA256)(e).toString().substring(0,this.pathHashLength),n=GT.basename(e);return GT.join(this.cacheRootPath,`${n}.${r}.json`)}async getChunksCacheFromCacheFile(e){let r=await yk.promises.readFile(e,{encoding:"utf8"}).catch(()=>{});if(r)try{return JSON.parse(r)}catch{}}async getChunksCache(e){let r=this.getChunksCacheFile(e);return await this.getChunksCacheFromCacheFile(r)}async setChunksCache(e,r){let n=this.getChunksCacheFile(e);try{await yk.promises.mkdir(GT.dirname(n),{recursive:!0}),await yk.promises.writeFile(n,JSON.stringify(r),{encoding:"utf8"})}catch(o){dno.debug(this.ctx,"Failed to set chunks cache:",o)}}async removeChunksCache(e){let r=this.getChunksCacheFile(e);await yk.promises.rm(r).catch(()=>{})}async enumerateChunksCacheFileNames(){return await yk.promises.readdir(this.cacheRootPath).catch(()=>[])}async getFilesCount(){return(await this.enumerateChunksCacheFileNames()).length}async getChunksCount(){let e=0;for(let r of await this.enumerateChunksCacheFileNames()){let n=GT.join(this.cacheRootPath,r);if(!this.chunksCountCache.has(n)){let o=await this.getChunksCacheFromCacheFile(n);this.chunksCountCache.set(n,o?.documentChunks?.length??0)}e+=this.chunksCountCache.get(n)||0}return e}async*getChunksForFile({uri:e}){let r=await this.getChunksCache(e);r!==void 0&&(yield*r.documentChunks)}async*getChunksFromCacheFile(e){let r=await this.getChunksCacheFromCacheFile(e);yield*r?r.documentChunks:[]}async*getChunks(e){if(e!==void 0)yield*this.getChunksForFile(e);else{let r=await this.enumerateChunksCacheFileNames();for(let n of r)yield*this.getChunksFromCacheFile(GT.join(this.cacheRootPath,n))}}async getFileHash(e){let r=Eo(e),n="";return r&&(n=await yk.promises.readFile(r,{encoding:"utf8"}).catch(()=>"")),(0,qUe.SHA256)(n).toString()}async addChunks({uri:e},r){let n=Array.isArray(r)?()=>Promise.resolve(r):r,o=Eo(e);if(!o)return;async function s(h){try{return(await yk.promises.stat(h)).mtimeMs}catch{return}}a(s,"getLastModified");let c=await s(o),l=await this.getChunksCache(e);if(l!==void 0&&l.version===t.CACHE_VERSION&&c!==void 0&&l.lastModified===c){this.chunksCountCache.set(o,l.documentChunks.length);return}let u=await this.getFileHash(e),d=await n();this.chunksCountCache.set(o,d.length);let p={version:t.CACHE_VERSION,filePath:e,hash:u,lastModified:c,documentChunks:d};await this.setChunksCache(e,p)}async deleteChunksForSource(e){let r=Lc(e),n=await this.getChunksCache(r);return n===void 0?[]:(await this.removeChunksCache(r),n.documentChunks)}async deleteChunks({uri:e}){let r=Eo(e);if(!r)return[];let n;try{n=await yk.promises.readdir(r)}catch{return await this.deleteChunksForSource(r)}let o=[];for(let s of n){let c=Lc(GT.join(r,s));o.push(...await this.deleteChunks({uri:c}))}return o}async clear(){await yk.promises.rm(this.cacheRootPath,{recursive:!0}).catch(()=>{})}};function DPt(){return Kne.env.XDG_CACHE_HOME&>.isAbsolute(Kne.env.XDG_CACHE_HOME)?Kne.env.XDG_CACHE_HOME+"/github-copilot":(0,DWr.platform)()==="win32"?Kne.env.USERPROFILE+"\\AppData\\Local\\Temp\\github-copilot":Kne.env.HOME+"/.cache/github-copilot"}a(DPt,"getXdgCachePath");f();f();var HUe=class{constructor(e,r){this.ctx=e;this.workspaceFolder=r;this.emitter=new ki;this.onFileChange=this.emitter.event;this.status="created",this.startWatching()}static{a(this,"WorkspaceWatcher")}emitFilesCreated(e){this.emitter.fire({type:"create",documents:e,workspaceFolder:this.workspaceFolder})}emitFilesUpdated(e){this.emitter.fire({type:"update",documents:e,workspaceFolder:this.workspaceFolder})}emitFilesDeleted(e){this.emitter.fire({type:"delete",documents:e,workspaceFolder:this.workspaceFolder})}};var Wg=class{constructor(e){this.ctx=e;this.watchers=new $r(25)}static{a(this,"WorkspaceWatcherProvider")}getWatcher(e){let r=this.watchers.get(e.uri);if(r)return r;let n=this.getParentFolder(e.uri);return n?this.watchers.get(n):void 0}getParentFolder(e){return[...this.watchers.keys()].find(n=>{let o=n.replace(/[#?].*/,"").replace(/\/?$/,"/");return e!==n&&e.startsWith(o)})}hasWatcher(e){return this.getParentFolder(e.uri)||this.getWatcher(e)!==void 0}startWatching(e){if(Ge.debug(this.ctx,`WorkspaceWatcherProvider - Start watching workspace ${e.uri}`),this.hasWatcher(e)){this.getWatcher(e)?.startWatching();return}let r=this.createWatcher(e);this.watchers.set(e.uri,r)}stopWatching(e){this.getWatcher(e)?.stopWatching()}terminateSubfolderWatchers(e){let r=[];for(let s of this.watchers.values())r.push(s.workspaceFolder);let n=e.uri.replace(/[#?].*/,"").replace(/\/?$/,"/"),o=r.filter(s=>s.uri!==e.uri&&s.uri.startsWith(n));for(let s of o)this.terminateWatching(s);return o}terminateWatching(e){if(this.getWatcher(e)?.status!=="stopped")return this.stopWatching(e),this.watchers.delete(e.uri);this.watchers.delete(e.uri)}onFileChange(e,r,n,o){return this.getWatcher(e)?.onFileChange($p(this.ctx,r,"WorkspaceWatcherProvider.onFileChange"),n,o)}async getWatchedFiles(e){return await this.getWatcher(e)?.getWatchedFiles()??[]}getStatus(e){return this.getWatcher(e)?.status}};var MPt=1e4;var jUe=class{constructor(e,r,n){this.workspaceFolder=r;this.implementation=n;this._chunkLimiter=new BPt;this.status="notStarted",this.workspaceChunks=new GUe(e,r),this.cancellationToken=new OPt,this._chunkingTimeMs=0,this._fileCountExceeded=!1,this._chunkCountExceeded=!1,this._totalFileCount=0,this._filesUpdated=new Set}static{a(this,"ChunkingHandler")}async chunk(e,r){return r?await this.chunkFiles(e,r):await this.chunkWorkspace(e)}async chunkWorkspace(e){let r=performance.now();if(this.status="started",this.cancellationToken.isCancelled())return this.status="cancelled",this.updateChunkingTime(r,performance.now()),this.workspaceChunks.getChunks();await this.updateModelConfig(e);let n=await e.get(Wg).getWatchedFiles(this.workspaceFolder);this._totalFileCount=n.length,n.length>MPt&&(this._fileCountExceeded=!0,n=n.slice(0,MPt));let o=n.map(async s=>{this.cancellationToken.isCancelled()||await this._chunkLimiter.queue(()=>this._chunk(e,s))});try{await Promise.all(o)}catch(s){qo(e,s,"ChunkingProvider.chunk"),this.terminateChunking()}return this.status=this.cancellationToken.isCancelled()?"cancelled":"completed",this.updateChunkingTime(r,performance.now()),await this.workspaceChunks.getChunksCount()>NPt&&(this._chunkCountExceeded=!0),this.workspaceChunks.getChunks()}async chunkFiles(e,r){await this.updateModelConfig(e);let n=r.map(async o=>{this.cancellationToken.isCancelled()||(this._filesUpdated.add(o.uri),await this._chunkLimiter.queue(()=>this._chunk(e,o)))});try{await Promise.all(n)}catch(o){qo(e,o,"ChunkingProvider.chunkFiles"),this.terminateChunking()}return await this.workspaceChunks.getChunksCount()>NPt&&(this._chunkCountExceeded=!0),await this.workspaceChunks.getFilesCount()>MPt&&(this._fileCountExceeded=!0),THr(...r.map(o=>this.workspaceChunks.getChunks(o)))}async _chunk(e,r){this.cancellationToken.isCancelled()||await this.workspaceChunks.addChunks(r,()=>this.implementation.chunk(r,this.modelConfig))}async updateModelConfig(e){this.modelConfig||(this.modelConfig=await $o.getModelConfiguration(e,"user"))}terminateChunking(){this.cancellationToken.cancel()}async clearChunks(){await this.workspaceChunks.clear()}updateChunkingTime(e,r){this._chunkingTimeMs=r-e}get chunkingTimeMs(){return Math.floor(this._chunkingTimeMs)}get fileCountExceeded(){return this._fileCountExceeded}get totalFileCount(){return this._totalFileCount}get chunkCountExceeded(){return this._chunkCountExceeded}get filesUpdatedCount(){return this._filesUpdated.size}async getFilesCount(){return this.workspaceChunks.getFilesCount()}getChunks(){return this.workspaceChunks.getChunks()}async getChunksCount(){return this.workspaceChunks.getChunksCount()}deleteSubfolderChunks(e){return this.workspaceChunks.deleteChunks({uri:e})}deleteFileChunks(e){return this._filesUpdated.add(e),this.workspaceChunks.deleteChunks({uri:e})}},OPt=class{constructor(){this.cancelled=!1}static{a(this,"ChunkingCancellationToken")}cancel(){this.cancelled=!0}isCancelled(){return this.cancelled}},BPt=class{constructor(e=20){this.maxCount=e;this.tasks=[];this.runningTasks=0}static{a(this,"Limiter")}async queue(e){return new Promise((r,n)=>{this.tasks.push({factory:e,resolve:r,reject:n}),this.consume()})}consume(){for(;this.tasks.length>0&&this.runningTasks<=this.maxCount;){let{factory:e,resolve:r,reject:n}=this.tasks.shift();this.runningTasks++;let o=e();o.then(r,n),o.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this.runningTasks--,this.consume()}};var Fd=class{constructor(e){this.ctx=e;this.workspaceChunkingProviders=new Map}static{a(this,"ChunkingProvider")}get workspaceCount(){return this.workspaceChunkingProviders.size}createImplementation(e,r){let n=NWr(r),o=new n;return new jUe(this.ctx,e,o)}getImplementation(e,r="default"){let n=this.getParentFolder(e);if(n)return this.workspaceChunkingProviders.get(n.uri);let o=this.workspaceChunkingProviders.get(e.uri);return o||(o=this.createImplementation(e,r),this.workspaceChunkingProviders.set(e.uri,o)),o}getParentFolder(e){let r=[];for(let n of this.workspaceChunkingProviders.values())r.push(n.workspaceFolder);return r.find(n=>{let o=n.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return e.uri!==n.uri&&e.uri.startsWith(o)})}status(e){return this.getImplementation(e).status}checkLimits(e){let r=this.getImplementation(e);return{fileCountExceeded:r.fileCountExceeded,chunkCountExceeded:r.chunkCountExceeded}}fileCount(e){return this.getImplementation(e).getFilesCount()}chunkCount(e){return this.getImplementation(e).getChunksCount()}chunkingTimeMs(e){return this.getImplementation(e).chunkingTimeMs}getChunks(e){return this.getImplementation(e).getChunks()}terminateChunking(e,r){let n=this.getImplementation(r);n.terminateChunking();let s=yt.createAndMarkAsIssued().extendedBy(void 0,{fileCount:n.filesUpdatedCount});at(e,"index.terminate",s),this.workspaceChunkingProviders.delete(r.uri)}async clearChunks(e,r){this.terminateChunking(e,r),await this.getImplementation(r).clearChunks()}async deleteSubfolderChunks(e,r){return await this.getImplementation(e).deleteSubfolderChunks(r.uri)}async deleteFileChunks(e,r){let n=this.getImplementation(e),o=[];Array.isArray(r)||(r=[r]);for(let s of r)o.push(...await n.deleteFileChunks(s));return o}async chunk(e,r,n,o){let s;return n&&(Array.isArray(n)?s=n:o=n),o||(o="default"),s?await this.chunkFiles(e,r,s,o):await this.chunkFolder(e,r,o)}async chunkFolder(e,r,n="default"){let o=this.getImplementation(r,n),s=await o.chunk(e),l=yt.createAndMarkAsIssued().extendedBy(void 0,{fileCount:o.totalFileCount,chunkCount:await o.getChunksCount(),timeTakenMs:o.chunkingTimeMs,workspaceCount:this.workspaceCount});return at(e,"index.chunk",l),s}async chunkFiles(e,r,n,o="default"){return await this.getImplementation(r,o).chunk(e,n)}};var fno=new Se("ChatFetchResultPostProcessor"),Jne=class{constructor(e,r,n){this.turnContext=e;this.chatFetcher=r;this.computeSuggestions=n}static{a(this,"ChatFetchResultPostProcessor")}async postProcess(e,r,n,o,s,c,l,u){switch(MHr(this.turnContext.ctx,l,c,e.type=="offTopic",e.requestId,u,s.extendedBy({},{fileCount:this.turnContext.ctx.get(Fd).workspaceCount})),await this.turnContext.ctx.get(g0).inspectFetchResult(e),e.type){case"success":return await this.processSuccessfulFetchResult(n,e.numTokens,e.requestId,r,l,o,s,u);case"offTopic":return this.processOffTopicFetchResult(s,l,u);case"canceled":return this.turnContext.turn.status="cancelled",this.turnContext.turn.response={message:"Cancelled",type:"user"},{error:{message:dn(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}};case"failed":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:e.reason,type:"server"},fno.error(this.turnContext.ctx,"Fetch failed:",e),{error:{message:Yne.translateErrorMessage(e.code,e.reason,e.requestId,e.retryAfter,e.ghRequestId),code:e.code}};case"filtered":return this.turnContext.turn.status="filtered",{error:{message:"Oops, your response got filtered. Vote down if you think this shouldn't have happened.",responseIsFiltered:!0}};case"length":return this.turnContext.turn.status="error",{error:{message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0}};case"agentAuthRequired":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},{error:{message:"Authorization required",responseIsFiltered:!1}};case"no_choices":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"No choices returned",type:"server"},{error:{message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"no_finish_reason":return this.turnContext.turn.status="error",n&&n.length>0?this.turnContext.turn.response={message:n,type:"model",references:this.turnContext.turn.response?.references}:this.turnContext.turn.response={message:"No finish reason",type:"server"},{error:{message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"model_not_supported":{this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model not supported",type:"server"};let{modelName:d,modelProviderName:p}=$o.parseModelNotSupportedReason(e.reason);return{error:{message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1,modelName:d,modelProviderName:p}}}case"model_max_prompt_tokens_exceeded":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model max prompt tokens exceeded",type:"server"},{error:{message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",code:400,reason:"model_max_prompt_tokens_exceeded",responseIsFiltered:!1}};case"successMultiple":case"tool_calls":case"unknown":return this.turnContext.turn.status="error",{error:{message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1}}}}async processSuccessfulFetchResult(e,r,n,o,s,c,l,u){if(e&&e.length>0){c.markAsDisplayed(),l.markAsDisplayed(),this.turnContext.turn.status="success",this.turnContext.turn.response={message:e,type:"model",references:this.turnContext.turn.response?.references},OHr(this.turnContext,s,e,r,n,u,l);let d=this.computeSuggestions?await this.fetchSuggestions(o,s,c,u):void 0;if(d){let{followUp:p,suggestedTitle:h}=d;return{followup:p.message!==""?p:void 0,suggestedTitle:h!==""?h:void 0}}return{}}return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"The model returned successful but did not contain any response text.",type:"meta"},{error:{message:dn(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}}}async fetchSuggestions(e,r,n,o){let c=await new _F(this.turnContext.ctx,this.chatFetcher).fetchRawSuggestions(this.turnContext,e,r,n);if(c===void 0)return;let l=this.enrichFollowup(c,r,n,o);return Ge.debug(this.turnContext.ctx,"Computed followup",l),Ge.debug(this.turnContext.ctx,"Computed suggested title",c.suggestedTitle),{followUp:l,suggestedTitle:c.suggestedTitle}}enrichFollowup(e,r,n,o){let s=n.extendedBy({messageSource:"chat.suggestions",suggestionId:yr(),suggestion:"Follow-up from model"},{promptTokenLen:e.promptTokenLen,numTokens:e.numTokens});return UHr(this.turnContext.ctx,r,s,o),{message:e.followUp,id:s.properties.suggestionId,type:s.properties.suggestion}}processOffTopicFetchResult(e,r,n){let o="Sorry, but I can only assist with programming related questions.";return this.turnContext.turn.response={message:o,type:"offtopic-detection"},this.turnContext.turn.status="off-topic",BHr(this.turnContext.ctx,this.turnContext.conversation,r,o,e.properties.messageId,n,e),{error:{message:o,responseIsFiltered:!0}}}};f();var $Ue=S.Union([S.String(),S.Number()]),A$=S.Union([S.String(),S.Number()]),pno=S.Union([S.Literal("included"),S.Literal("blocked"),S.Literal("notfound"),S.Literal("empty")]),VUe=S.Object({uri:S.String(),position:S.Optional(Ah)}),hno=S.Object({type:S.Literal("file"),uri:S.String(),visibleRange:S.Optional(bf),selection:S.Optional(bf),status:S.Optional(pno),range:S.Optional(bf)}),mno=S.Object({type:S.Literal("directory"),uri:S.String()}),gno=S.Object({type:S.Literal("tool"),uri:S.String(),name:S.Optional(S.String()),server:S.Optional(S.String()),description:S.Optional(S.String())}),IF=S.Union([hno,mno,yWr,gno]),Ek=S.Union([S.Literal("panel"),S.Literal("inline")]),Ano=S.Union([S.Object({type:S.Literal("text"),text:S.String()}),S.Object({type:S.Literal("image_url"),imageUrl:S.Object({url:S.String(),detail:S.Optional(S.Union([S.Literal("low"),S.Literal("high")]))})})]),LPt=S.Union([S.String(),S.Array(Ano)]),OWr=S.Object({request:LPt,response:S.Optional(S.String()),agentSlug:S.Optional(S.String()),turnId:S.Optional(A$),model:S.Optional(S.String())});function WUe(t){return typeof t=="string"?t:t.map(e=>e.type==="image_url"?{type:"image_url",image_url:{url:e.imageUrl.url,detail:e.imageUrl.detail}}:{type:"text",text:e.text})}a(WUe,"convertToMessageContent");function zUe(t,e){if(t=ev(t),typeof t=="string")return t+e;let r=t.map(n=>n.type==="text").lastIndexOf(!0);if(r>=0){let n=[...t],o=n[r];return n[r]={type:"text",text:o.text+e},n}return[...t,{type:"text",text:e}]}a(zUe,"appendToMessage");var YUe=S.Union([S.Literal("Ask"),S.Literal("Agent"),S.Literal("InlineAgent")]),yno=S.Object({type:S.String(),description:S.String()}),BWr=S.Object({name:S.String(),description:S.String(),inputSchema:S.Optional(S.Object({type:S.String(),properties:S.Record(S.String(),yno),required:S.Array(S.String())})),confirmationMessages:S.Optional(S.Object({title:S.String(),message:S.String()}))}),yh=S.Object({uri:S.String(),name:S.String()}),Eno=S.Union([S.Literal("not-started"),S.Literal("in-progress"),S.Literal("completed")]),KUe=S.Object({id:S.Number(),title:S.String(),description:S.Optional(S.String()),status:Eno});var FPt="generate-response",JUe=class extends Error{constructor(r,n,o,s){super(r);this.authorizationUri=n;this.agentSlug=o;this.agentName=s}static{a(this,"RemoteAgentAuthorizationError")}},lCe=class{constructor(e,r,n){this.agent=e;this.turnContext=r;this.chatFetcher=n;this.conversationProgress=r.ctx.get(Na),this.chatFetcher=this.chatFetcher??new ya(r.ctx),this.postProcessor=new Jne(r,this.chatFetcher,!1),this.conversation=r.conversation,this.turn=r.turn}static{a(this,"RemoteAgentTurnProcessor")}async process(e,r,n,o){try{await this.processWithAgent(e,r,this.turnContext,o)}catch(s){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,s);let c=s instanceof Error?s.message:String(s);this.turn.status="error",this.turn.response={message:c,type:"meta"},s instanceof JUe?await this.endProgress({unauthorized:{authorizationUri:s.authorizationUri,agentSlug:s.agentSlug,agentName:s.agentName}}):await this.endProgress({error:{message:c,responseIsIncomplete:!0}})}}async processWithAgent(e,r,n,o){await this.conversationProgress.begin(this.conversation,this.turn,e);let s=await rc(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let c=await this.buildAgentPrompt(n);if(!c)await this.endTurnWithResponse(`No prompt created for agent ${this.agent.id}`,"error");else{let l={type:"user",prompt:JSON.stringify(c.messages,null,2),tokens:c.tokens};await n.ctx.get(g0).inspectPrompt(l),await n.steps.start(FPt,"Generating response");let u=this.augmentTelemetry(c,s,this.turn.template,o);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let d=await this.fetchConversationResponse(n,c.messages,r,s.extendedBy({messageSource:"chat.user"},{promptTokenLen:c.tokens}),u,o);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(d,n),await this.endProgress({error:d.error,followUp:d.followup,suggestedTitle:d.suggestedTitle,skillResolutions:c.skillResolutions}))}}async buildAgentPrompt(e){let r=this.createMessagesFromHistory(e),n=await this.computeCopilotReferences(e),o=this.getOrCreateAgentSessionId(e);return this.turn.agent&&(this.turn.agent.sessionId=o),this.turn.confirmationResponse?this.addConfirmationResponse(this.turn.confirmationResponse,r):r.push({role:"user",content:ev(e.turn.request.message),copilot_references:n.length>0?n:void 0}),{messages:r,tokens:-1,skillResolutions:[]}}getOrCreateAgentSessionId(e){let r=this.turn.agent?.agentSlug;if(r){for(let n of e.conversation.turns)if(n.agent?.agentSlug===r&&n.agent.sessionId)return n.agent.sessionId}return yr()}addConfirmationResponse(e,r){r.push({role:"user",content:"",copilot_confirmations:[e]})}createMessagesFromHistory(e){return U2t(e.conversation.turns.slice(0,-1),this.agent.slug).flatMap(r=>{let n=[];if(r.request&&n.push({role:"user",content:ev(r.request.message)}),r.response&&r.response.type==="model"){let o=AWr(r.response.references);n.push({role:"assistant",content:ev(r.response.message),copilot_references:o.length>0?o:void 0})}return n})}async computeCopilotReferences(e){return await vWr(e)}async endTurnWithResponse(e,r){this.turn.response={type:"meta",message:e},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:e}),await this.endProgress()}async fetchConversationResponse(e,r,n,o,s,c){n.onCancellationRequested(async()=>{await this.cancelProgress()});let l=new SF((h,m,g,A,y,E)=>{let _=y?{...y,agentSlug:this.agent.slug}:void 0;this.conversationProgress.report(this.conversation,this.turn,{reply:h,annotations:m,references:g,notifications:A.map(v=>({message:v.message,severity:"warning"})),confirmationRequest:_,thinking:E}),this.turn.response?(this.turn.response.message=zUe(this.turn.response.message,h),this.turn.response.references.push(...g)):this.turn.response={message:h,type:"model",references:g},this.turn.annotations.push(...m??[]),_&&(this.turn.confirmationRequest=_)}),u=await this.turnContext.ctx.get(Ot).getGitHubSession(),d={engineName:"agents",endpoint:this.agent.endpoint??this.agent.slug,messages:r,uiKind:"conversationPanel",intentParams:{intent:!0,intent_threshold:.7,intent_content:dn(this.turn.request.message)},authToken:u?.accessToken,copilot_thread_id:this.turn.agent?.sessionId,llmInteraction:e.toLlmInteraction()},p=await this.chatFetcher.fetchResponse(d,n,o,(h,m)=>l.isFinishedAfter(h,m));return this.ensureAgentIsAuthorized(p),await this.postProcessor.postProcess(p,n,l.appliedText,o,s.extendedBy(this.addExtensibilityInfoTelemetry()),dn(this.turn.request.message),"conversationPanel",c)}ensureAgentIsAuthorized(e){if(e.type==="agentAuthRequired")throw this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},new JUe("Authorization required",e.authUrl,this.agent.slug,this.agent.name)}augmentTelemetry(e,r,n,o){return LEe(this.conversation,"conversationPanel",dn(this.turn.request.message).length,e.tokens,n?.templateId,void 0,r,e.skillResolutions)}addExtensibilityInfoTelemetry(){return{extensibilityInfoJson:JSON.stringify({agent:this.agent.slug,outgoingReferences:this.turn.request.references?.map(e=>e.type)??[],incomingReferences:this.turn.response?.references?.map(e=>e.type)??[]})}}async finishGenerateResponseStep(e,r){e.error?await r.steps.error(FPt,e.error.message):await r.steps.finish(FPt)}async endProgress(e){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};var uCe=class{constructor(e,r,n,o,s,c){this.id=e;this.slug=r;this.name=n;this.description=o;this.avatarUrl=s;this.endpoint=c}static{a(this,"RemoteAgent")}additionalSkills(){return[]}turnProcessor(e){return new lCe(this,e)}},XUe=class extends uCe{static{a(this,"ExtensibilityPlatformAgent")}constructor(){super(0,"github","GitHub","Get answers grounded in web search, code search, and your enterprise's knowledge bases.","https://avatars.githubusercontent.com/u/9919?s=200&v=4","chat")}turnProcessor(e){return new lCe(this,e)}};f();var Cno="github",nw=class{static{a(this,"RemoteAgentRegistry")}},ZUe=class extends nw{constructor(r){super();this.ctx=r;this._agents=void 0;this._lastFetchTime=0}static{a(this,"CapiRemoteAgentRegistry")}async agents(){return this.shouldRefreshAgents()&&(this._agents=await this.fetchAgents()),this._agents!=null?this._agents.slice():[]}shouldRefreshAgents(){return!this._agents||!this._lastFetchTime?!0:this.isLastFetchOlderOneHour()}isLastFetchOlderOneHour(){return Date.now()-this._lastFetchTime>36e5}async fetchAgents(){let r=await ij(this.ctx,"/agents");return r.ok?(this._lastFetchTime=Date.now(),this.parseAgents(await r.text())):(_r.error(this.ctx,"Failed to fetch agents from CAPI",{status:r.status,statusText:r.statusText}),[])}parseAgents(r){let n;try{n=JSON.parse(r).agents,Array.isArray(n)||_r.error(this.ctx,"Expected 'agents' to be an array")}catch(o){return r.includes("access denied")||_r.warn(this.ctx,"Invalid remote agent response:",r,o),[]}return n.filter(o=>o.slug!==Cno).map(o=>new uCe(o.id,o.slug,o.name,o.description,o.avatar_url))}};f();f();var LWr=de(require("fs")),py=de(require("path"));var UPt=[".test",".spec","_test","Test","_spec","_test","Tests",".Tests","Spec"],QPt="test_",dCe={js:{suffix:[".test",".spec"],location:"sameFolder"},ts:{suffix:[".test",".spec"],location:"sameFolder"},go:{suffix:["_test"],location:"sameFolder"},java:{suffix:["Test"],location:"testFolder"},php:{suffix:["Test"],location:"testFolder"},dart:{suffix:["_test"],location:"testFolder"},cs:{suffix:["Test"],location:"testFolder"},rb:{suffix:["_test","_spec"],location:"testFolder"},py:{prefix:"test_",location:"testFolder"},ps1:{suffix:[".Tests"],location:"testFolder"},kt:{suffix:["Test"],location:"testFolder"}},fCe=class{constructor(e,r,n=void 0){this.ctx=e;this.fileExists=r;this.baseUri=n}static{a(this,"TestFileFinder")}async findTestFileForSourceFile(e){let r=ei(e),n=py.extname(r).replace(".",""),o=dCe[n]??{location:"sameFolder",prefix:QPt,suffix:UPt},s=[];if(o.prefix&&s.push(o.prefix+r),o.suffix)for(let d of o.suffix??[]){let p=r.replace(`.${n}`,d+"."+n);s.push(p)}let c=o.location??"sameFolder",l;if(c==="sameFolder"){if(l=Eo(Wu(e)),l===void 0)return}else{let d=Eo(e);if(d===void 0)return;l=this.determineTestFolder(d,c)}for(let d of s){let p=py.join(l,d),h=this.parseTestFilePath(p);if(h&&await this.fileExists(h))return h}let u=Lc(l);if(await this.fileExists(u))return Ti(u,s[0])}parseTestFilePath(e){try{return Lc(e)}catch(r){_r.error(this.ctx,`Failed to parse test file path: ${e}`,r);return}}async findImplFileForTestFile(e){let r=ei(e),n=py.extname(r).replace(".",""),o=dCe[n]??{location:"sameFolder",prefix:QPt,suffix:UPt},s=[];if(o.prefix&&s.push(r.substring(o.prefix.length)),o.suffix)for(let u of o.suffix??[]){let p=r.substring(0,r.length-u.length-1-n.length)+"."+n;s.push(p)}let c=o.location??"sameFolder",l;c==="sameFolder"?l=Wu(e):l=this.determineImplFolder(e);for(let u of s){let d=Ti(l,u);if(await this.fileExists(d))return d}}findExampleTestFile(e){let r=Eo(e);if(r===void 0)return;let n=py.extname(ei(e)).replace(".",""),o,s=dCe[n]?.location??"sameFolder";s==="sameFolder"?o=py.dirname(r):o=this.determineTestFolder(r,s);let c=this.findFiles(o,`.${n}`,dCe[n]);if(c.length>0)return Lc(c[0])}findFiles(e,r,n){let o=this._readdir(e),s=[];for(let c of o){let l=`${e}${py.sep}${c}`;n?.prefix&&c.startsWith(n.prefix)&&s.push(l),n?.suffix&&n?.suffix.some(u=>c.endsWith(u+r))&&s.push(l)}return s}_readdir(e){return LWr.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isFile()).map(r=>r.name)}determineTestFolder(e,r){let n=(this.baseUri&&Eo(this.baseUri))??"",o=py.extname(e).replace(".",""),s=this.getRelativeTestFolder(e,n,o,r);return[n,...s].filter(c=>c).join(py.sep)}getRelativeTestFolder(e,r,n,o){let s=py.dirname(e).replace(r,"");switch(n){case"php":case"dart":case"py":return["tests"];case"ps1":return["Tests"];case"rb":return["test",s];case"cs":return[s.replace("src","src/tests")];case"java":case"scala":case"kt":return[s.replace(/src[\\/]main/,"src/test")];default:return o==="testFolder"?[s.replace("src","test")]:[s]}}determineImplFolder(e){let r=py.extname(ei(e)).replace(".",""),n=Wu(e);switch(r){case"php":case"dart":case"py":return n.replace("tests","src");case"ps1":return n.replace("Tests","src");case"rb":return n.replace("/test","");case"cs":return n.replace("src/tests","src");case"java":case"scala":case"kt":return n.replace("src/test","src/main");default:return n.replace("test/","src/")}}};function pCe(t){let e=ei(t),r=py.extname(e),n=dCe[r.replace(".","")];return n?!(n.suffix&&!n.suffix.some(s=>e.endsWith(s+r))||n.prefix&&!e.startsWith(n.prefix)):!!(UPt.some(s=>e.endsWith(s+r))||e.startsWith(QPt))}a(pCe,"isTestFile");f();var FWr=["indexed","indexing","not_indexed"],xF=class{constructor(){this._cache=new $r(100)}static{a(this,"BlackbirdIndexingStatus")}async queryIndexingStatus(e,r,n){let o=e.ctx;if(!n)return!1;let s=`repos/${r}/copilot_internal/embeddings_index`,c=await mu(o,n,s);return c.ok?(await c.json()).semantic_code_search_ok:!1}isValid(e){return e!==void 0&&Date.now()-e.timestamp<1800*1e3}async isRepoIndexed(e,r,n,o=!1){let s=WM(r);if(!s)return!1;let c=this._cache.get(s);if(!o&&this.isValid(c))return c.status;let l=await this.queryIndexingStatus(e,s,n);return this._cache.set(s,{status:l,timestamp:Date.now()}),l}get cache(){return this._cache}};f();f();f();async function UWr(t,e,r,n){let o=wo(e.tokenizer),s=r.filter(h=>o.tokenLength(h.text)p.text),u=O1(t);BI()&&(u=await Are(t,u));let d=await zM(t,e,r,void 0,c,{input:l,model:n,dimensions:1024},s,u);if(d.status!==200||s.isCancellationRequested){qo(t,new AO(`Failed to request dense embeddings, status: ${d.status}`),"LocalSnippetProvider.fetchEmbeddings");return}try{return(await d.json()).data.map(h=>({id:o[h.index].id,embedding:h.embedding}))}catch{return}}a(_no,"sendEmbeddingsRequest");f();f();var eQe=class{static{a(this,"CosineSimilarityScoring")}score(e,r){let n=Math.sqrt(e.reduce((c,l)=>c+l*l,0)),o=Math.sqrt(r.reduce((c,l)=>c+l*l,0));return e.reduce((c,l,u)=>c+l*r[u],0)/(n*o)}terminateScoring(){}};var vno="cosine",bno=new Map([["cosine",eQe]]);function QWr(t){let e=t==="default"?vno:t,r=bno.get(e);if(!r)throw new Error(`Scoring constructor for type ${t} not found`);return r}a(QWr,"getScoringAlgorithm");f();var ov=class{constructor(){this.workspaceScoringProviders=new $r(25)}static{a(this,"ScoringProvider")}createImplementation(e,r){let n=QWr(r);return new n}getImplementation(e,r,n="default"){let o=this.workspaceScoringProviders.get(r.uri);return o||(o=this.createImplementation(e,n),this.workspaceScoringProviders.set(r.uri,o)),o}score(e,r,n,o,s){return this.getImplementation(e,r,s).score(n,o)}terminateScoring(e,r,n){this.getImplementation(e,r,n).terminateScoring(),this.workspaceScoringProviders.delete(r.uri)}};var qWr={modelFamily:VLe.textEmbedding3Small,scoringType:"default",dimensions:null};async function GWr(t,e,r,n,o,s,c,l=qWr){let u={...qWr,...l},d=Sno(t,e,r,n);Ge.debug(t,`EmbeddingsReranker: Reranking ${d.length} snippets (includes the user query)`);let p=await t.get(Da).getFirstMatchingEmbeddingModelConfiguration(u.modelFamily);if(p===void 0)throw new Error(`EmbeddingsReranker: Model configuration not found for ${u.modelFamily}`);let h=performance.now(),m=await UWr(t,p,d,s),g=performance.now();if(c.embeddingsTimeMs=Math.floor(g-h),m===void 0||m.length===0)return[];let A=m.findIndex(x=>x.id==="userQuery");if(A===void 0)return[];let y=m.splice(A,1)[0];if(s.isCancellationRequested)return[];let E=performance.now(),_=Ino(t,e,m,y,u.scoringType),v=performance.now();c.rerankingTimeMs=Math.floor(v-E);let b=_.slice(0,o);return Ge.debug(t,`EmbeddingsReranker: Returning ${b.length} snippets`),b.map(x=>d.find(R=>R.id===x.id).id)}a(GWr,"rerankSnippets");function Sno(t,e,r,n){let o=n.map(s=>({id:s.id,text:s.chunk.toLowerCase()}));return o.push({id:"userQuery",text:r.toLowerCase()}),o}a(Sno,"formatEmbeddingsInput");function Ino(t,e,r,n,o){let s=t.get(ov);return r.map(l=>({id:l.id,score:s.score(t,e,n.embedding,l.embedding,o)})).sort((l,u)=>u.score-l.score)}a(Ino,"scoreEmbeddings");f();f();f();var GPt=de(UUe());var xno=.75,wno=1.2,tQe=class{constructor(e,r){this.ctx=e;this.workspaceFolder=r;this.chunksCount=0;this.sumTokenCount=0;this.status="notStarted"}static{a(this,"BM25Ranking")}get avgTokenCount(){return this.sumTokenCount/this.chunksCount}async initialize(e){this.sumTokenCount=0,this.chunksCount=0;for await(let r of e)this.sumTokenCount+=r.tokenCount,this.chunksCount++;this.status="completed"}async addChunks(e){for await(let r of e)this.sumTokenCount+=r.tokenCount,this.chunksCount++}async query(e){let r=await hCe();try{return await this.doQuery(e)}finally{await r.stopWorkerPool()}}async doQuery(e){let r=e.map(l=>l.toLowerCase()),n=await this.calculateIDFValues(r),o=Math.min(10*e.length,HPt),s=Math.min(o,this.chunksCount);return await this.calculateBM25Scores(r,this.avgTokenCount,n,s)}async calculateIDFValues(e){let r=this.ctx.get(Fd).getChunks(this.workspaceFolder),n=nF(r,s=>({...s,chunk:s.chunk.toLowerCase()})),o=nF(n,s=>s.chunk);return await Rno(e,o)}async calculateBM25Scores(e,r,n,o){let s=this.ctx.get(Fd).getChunks(this.workspaceFolder),c=new qPt(o);for await(let l of s){let u=await Pno({...l,chunk:l.chunk.toLowerCase()},e,r,n);c.add({...u,chunk:l.chunk})}return c.toArray(.75)}deleteEmbeddings(e){this.chunksCount-=e.length,this.sumTokenCount-=e.reduce((r,n)=>r+n.tokenCount,0)}terminateRanking(){}};async function Rno(t,e){let r=new SharedArrayBuffer(t.length*Int32Array.BYTES_PER_ELEMENT),n=new Int32Array(r),o=[],s=0;for await(let u of e){s++;let d=GPt.job(({snippet:p,keywords:h})=>h.map(g=>p.includes(g)?1:0),{data:{snippet:u,keywords:t}}).then(p=>{for(let h=0;h{let m=0;for(let g of s){let A=d[g],y=(c.match(new RegExp(g,"g"))||[]).length,E=A*(y*(p+1)),_=y+p*(1-h+h*l/u);m+=E/_}return m},{data:{document:t.chunk,docLength:t.tokenCount,keywords:e,avgTokenCount:r,idfValues:n,k1:wno,b:xno}}),...t}}a(Pno,"calculateBM25Score");var qPt=class{constructor(e,r=-1/0){this.maxSize=e;this.minScore=r;this.store=[]}static{a(this,"SimpleHeap")}toArray(e){if(this.store.length&&typeof e=="number"){let r=this.store.at(0).score*(1-e);return this.store.filter(n=>n.score>=r)}return this.store}add(e){if(e.score<=this.minScore)return;let r=this.store.findIndex(n=>n.score=0?r:this.store.length,0,e);this.store.length>this.maxSize;)this.store.pop();this.store.length===this.maxSize&&(this.minScore=this.store.at(-1)?.score??this.minScore)}};var Nno="bm25",Dno=new Map([["bm25",tQe]]);function HWr(t){let e=t==="default"?Nno:t,r=Dno.get(e);if(!r)throw new Error(`Ranking constructor for type ${t} not found`);return r}a(HWr,"getRankingAlgorithm");var bm=class{constructor(){this.workspaceRankingProviders=new $r(25)}static{a(this,"RankingProvider")}createImplementation(e,r,n){let o=HWr(n);return new o(e,r)}getImplementation(e,r,n="default"){let o=this.workspaceRankingProviders.get(r.uri);return o||(o=this.createImplementation(e,r,n),this.workspaceRankingProviders.set(r.uri,o)),o}status(e,r,n){return this.getImplementation(e,r,n).status}async initialize(e,r,n,o="default"){await this.getImplementation(e,r,o).initialize(n)}async addChunks(e,r,n,o="default"){await this.getImplementation(e,r,o).addChunks(n)}async query(e,r,n,o){return this.getImplementation(e,r,o).query(n)}async terminateRanking(e,r,n){await this.getImplementation(e,r,n).terminateRanking(),this.workspaceRankingProviders.delete(r.uri)}deleteEmbeddings(e,r,n,o){return this.getImplementation(e,r,o).deleteEmbeddings(n)}};f();async function rQe(t,e){let r=t.ctx,n=await $o.getModelConfiguration(r,"synonyms",void 0,{tool_calls:!0}),o={promptType:"synonyms",modelConfiguration:n},s=await r.get(vm).toPrompt(t,o);if(!s.toolConfig)return;let c={modelConfiguration:n,uiKind:"conversationPanel",messages:s.messages,tools:s.toolConfig?.tools,tool_choice:s.toolConfig?.tool_choice,llmInteraction:t.toLlmInteraction()},l=new ya(r),u=await rc(r,t),d=await l.fetchResponse(c,e,u.extendedBy({messageSource:"chat.synonyms"}));if(d.type==="success"&&d.toolCalls&&d.toolCalls.length>0){let p=d.toolCalls[0],h=s.toolConfig?.extractArguments(p).keywords;return!h||!Array.isArray(h)?void 0:(Ge.debug(r,`UserQueryParser: Parsed ${h.length} keywords from the original user query: ${h.join(", ")}`),h.length?h:void 0)}else{let p="reason"in d?d.reason:"";qo(r,new AO(`Failed to request user query synonyms, result type: ${d.type}, reason: ${p}`),"LocalSnippetProvider.parseUserQuery")}}a(rQe,"parseUserQuery");var AO=class extends Error{static{a(this,"LocalSnippetProviderError")}constructor(e){super(String(e),{cause:e}),this.name="LocalSnippetProviderError"}},nQe=class{constructor(){this.providerType="local"}static{a(this,"LocalSnippetProvider")}snippetProviderStatus(e,r){if(!e.turn.workspaceFolder)return Promise.resolve("not_indexed");r===void 0&&(r=!0);let n=e.ctx,o=n.get(Fd),s=o.status(e.turn.workspaceFolder),c=n.get(bm),l=c.status(n,e.turn.workspaceFolder);if(s==="completed"&&l==="completed")return Promise.resolve("indexed");if(s==="started"||l==="started")return Promise.resolve("indexing");if(r){let u=e.turn.workspaceFolder;if(s==="notStarted")return Promise.race([o.chunk(n,u).then(d=>{if(o.status(u)==="completed")return c.initialize(n,u,d)}).then(()=>this.snippetProviderStatus(e,!1)),new Promise(d=>setTimeout(()=>d("not_indexed"),1e3))]);if(l==="notStarted"){let d=o.getChunks(u);return Promise.race([c.initialize(n,u,d).then(()=>this.snippetProviderStatus(e,!1)),new Promise(p=>setTimeout(()=>p("not_indexed"),1e3))])}}return Promise.resolve("not_indexed")}async collectLocalSnippets(e,r){let n=e.turn.workspaceFolder;if(!n)return[];let o=e.ctx,c=await o.get(Fd).chunkCount(n);if(c===0)return[];r.chunkCount=c;let l,u=performance.now();try{l=await rQe(e,e.cancelationToken)}catch(A){let y=new AO(A);qo(o,y,"LocalSnippetProvider.parseUserQuery")}let d=performance.now();if(r.synonymTimeMs=Math.floor(d-u),l===void 0)return[];let p=o.get(bm),h=[],m=performance.now();try{let A=await p.query(o,n,l);r.localSnippetCount=A.length,h=A}catch(A){let y=new AO(A);qo(o,y,"LocalSnippetProvider.rankingQuery")}let g=performance.now();return r.rankingTimeMs=Math.floor(g-m),h}async rerankLocalSnippets(e,r,n){let o=e.turn.workspaceFolder;if(!o)return[];let s=e.ctx,c=dn(e.turn.request.message),l=[];try{l=await GWr(s,o,c,r,5,e.cancelationToken,n)}catch(p){let h=new AO(p);qo(s,h,"LocalSnippetProvider.rerankSnippets")}let u=[],d=s.get(In);for(let p of l){let h=p.split("#")[0],m=await d.getOrReadTextDocument({uri:h}),g=r.find(A=>A.id===p);if(m.status==="valid"){let A=m.document.positionAt(g.range.start),y=m.document.positionAt(g.range.end),E=vc.range(A,y);u.push({uri:m.document.uri,range:E,snippet:g.chunk})}}return u}async provideSnippets(e){let r=this.collectInfoMessage(e);r&&await e.info(r);let n={...FHr},o=await this.collectLocalSnippets(e,n);if(o.length===0)return{snippets:[],measurements:n};let s=e.ctx;return Ge.debug(s,`LocalSnippetProvider: First pass: Found ${o.length} snippets.`),{snippets:await this.rerankLocalSnippets(e,o,n),measurements:n}}collectInfoMessage(e){let r=e.turn.workspaceFolder;if(!r)return;let s=e.ctx.get(Fd).checkLimits(r);if(s.fileCountExceeded||s.chunkCountExceeded)return Vo` +`)}a(VPt,"applyEditsToDocument");var ane=class{constructor(e){this.ctx=e;this.earlyReturnResponse="Oops, an error has occurred. Please try again";this.uiKind="conversationPanel";this.computeSuggestions=!0}static{a(this,"PanelTurnProcessorStrategy")}processResponse(){return[]}async buildConversationPrompt(e,r,n,o){let s="user",c=await qo.getModelConfiguration(e.ctx,s),l={promptType:s,modelConfiguration:c,languageId:r,userSelectedModelName:o};return await this.ctx.get(fm).toPrompt(e,l)}extractEditsFromResponse(e,r){return[]}},G7e=class{constructor(e){this.ctx=e;this.earlyReturnResponse="Please open a file and select code for the inline chat to be available";this.uiKind="conversationInline";this.computeSuggestions=!1}static{a(this,"InlineTurnProcessorStrategy")}async buildConversationPrompt(e,r,n){let o=await this.getCurrentEditorSkill(e);if(!o)return;let s=await this.getDocumentIfValid(o.uri);if(!s)return;let c=n?.producesCodeEdits===!1?"user":"inline",l=await e.ctx.get(wa).getBestChatModelConfig(ME(c)),u={promptType:c,modelConfiguration:l,languageId:r};return u.promptType==="inline"&&(this.currentDocument=s),await this.ctx.get(fm).toPrompt(e,u)}async processResponse(e){let r=[],n=dn(e.response?.message??"");if(n&&e.status==="success"&&this.currentDocument){let o=await this.processInlineResponse(n,this.currentDocument);o&&r.push(o)}return r}async getCurrentEditorSkill(e){let r=await e.skillResolver.resolve(Fg);if(r)return r}async getDocumentIfValid(e){let r=await this.ctx.get(In).getOrReadTextDocument({uri:e});if(r.status==="valid")return r.document}async processInlineResponse(e,r){let o=$Pt(e,r).filter(c=>jPt.includes(c.mode)),s=VPt(o,r);if(s)return await this.ctx.get(d0).documentDiff({original:r.getText(),updated:s}),{uri:r.uri,text:s}}extractEditsFromResponse(e,r){return $Pt(e,r)}};var H7e=class{constructor(){this.slug="github-copilot-coding-agent";this.name="GitHub Copilot Coding Agent";this.description="Create coding tasks that are executed by GitHub Copilot Coding Agent";this.avatarUrl=void 0}static{a(this,"BackendCodingAgent")}additionalSkills(e){return[]}turnProcessor(e){let r=new ane(e.ctx);return new q7e(e,r)}};f();f();f();f();function mzr(t){return t?t.filter(e=>e.type==="github.web-search").map(e=>e):[]}a(mzr,"filterUnsupportedReferences");function gzr(t){return t?t.filter(e=>e.type==="github.web-search"):[]}a(gzr,"convertToCopilotReferences");var Azr=S.Object({type:S.Literal("github.web-search"),id:S.String(),data:S.Object({query:S.String(),type:S.String(),results:S.Optional(S.Array(S.Object({title:S.String(),excerpt:S.String(),url:S.String()})))}),metadata:S.Optional(S.Object({display_name:S.Optional(S.String()),display_icon:S.Optional(S.String())}))});var X6=class{constructor(e){this.deltaApplier=e;this.appliedLength=0;this.appliedText="";this.appliedAnnotations=[]}static{a(this,"ConversationFinishCallback")}isFinishedAfter(e,r){let n=e.substring(this.appliedLength,e.length),s=this.mapAnnotations(r.annotations).filter(c=>!this.appliedAnnotations.includes(c.id));this.append(n,s,mzr(r.copilotReferences),r.copilotErrors??[],r.copilotConfirmation,r.thinking)}append(e,r,n,o,s,c){this.deltaApplier(e,r,n,o,s,c),this.appliedLength+=e.length,this.appliedText+=e,this.appliedAnnotations.push(...r.map(l=>l.id))}mapAnnotations(e){if(!e)return[];let r=[],n=e.for("CodeVulnerability").map(s=>({...s,type:"code_vulnerability"})),o=e.for("IPCodeCitations").map(s=>({...s,type:"ip_code_citations"}));return r.push(...n),r.push(...o),r}};f();f();var ik=class{constructor(e){this.ctx=e;this.githubRepositoryInfoCache=new Map}static{a(this,"GitHubRepositoryApi")}async getRepositoryInfo(e){let r=`${e.hostname}/${e.owner}/${e.repo}`,n=this.githubRepositoryInfoCache.get(r);if(n)return n;let o=await this._doGetRepositoryInfo(e);if(o?.ok){let s=await o.json();return this.githubRepositoryInfoCache.set(r,s),s}}async _doGetRepositoryInfo({owner:e,repo:r,hostname:n}){let o=await this.ctx.get(en).getSession(),s;if(o&&new URL(o.serverUrl).hostname===n)s=o;else{let u=await this.ctx.get(NN).getAuthRecord({authAuthority:n});u&&(s={accessToken:u.oauth_token,apiUrl:`https://api.${n}/`})}if(!s&&!(n==="github.com"||n.endsWith(".ghe.com")))return;let c={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"};s&&(c.Authorization=`Bearer ${s.accessToken}`);let l=new URL(`repos/${e}/${r}`,s?.apiUrl||`https://api.${n}`).href;return this.ctx.get(dr).fetch(l,{method:"GET",headers:c})}};f();f();var yzr=S.Object({name:S.String(),url:S.String()}),Ezr=S.Object({path:S.String(),head:S.Optional(S.Object({name:S.String(),upstream:S.Optional(yzr)})),remotes:S.Optional(S.Array(yzr))}),WPt=class{constructor(e){this.turnContext=e}static{a(this,"GitMetadataSkillProcessor")}value(){return .8}processSkill(e){this.turnContext.collectLabel(ok,"git repository information");let r=[];return r.push([new nr(["Metadata about the current git repository:"]),1]),e.head&&e.head.name?(r.push([new nr([`- Current branch name: ${e.head.name}`]),1]),e.head.upstream&&r.push([new nr([`- Upstream name and url: ${e.head.upstream.name} - ${e.head.upstream.url}`]),1])):r.push([new nr(["- Detached HEAD: yes"]),1]),e.remotes&&e.remotes.length>0&&r.push([new nr([`- Remotes: ${e.remotes.map(n=>n.name).join(", ")}`]),1]),new nr(r)}},ok="git-metadata",j7e=class extends ch{static{a(this,"GitMetadataSkill")}constructor(e){super(ok,"Metadata about the current git repository, useful for questions about branch management and git related commands","Reading git information",()=>e,r=>new WPt(r))}};async function _zr(t){let e=await t.skillResolver.resolve(Fg);if(e){let c=e.uri,l=G8(t.ctx,c);if(bFr(l))return{repoInfo:l,skillUsed:Fg}}let r=await t.skillResolver.resolve(ok);if(!r||!r.remotes||r.remotes.length===0){Ge.debug(t.ctx,"Git metadata skill is not available or no remotes available.");return}let o=r.remotes.find(c=>c.name==="origin")??r.remotes[0],s=QSt(o.url);if(s)return{repoInfo:{baseFolder:{uri:r.path},url:o.url,...s},skillUsed:ok}}a(_zr,"extractRepoInfo");async function Czr(t){let e=[];return await Vio(t,e),await Wio(t,e),await zio(t,e),e}a(Czr,"skillsToReference");async function Vio(t,e){let r=await Yio(t);r&&e.push(r)}a(Vio,"addRepositoryReference");async function Wio(t,e){let r=await Kio(t);r&&e.push(r)}a(Wio,"addSelectionReference");async function zio(t,e){let r=[],n=await Xio(t);n&&r.push(n),r.push(...await Zio(t)),r.length>0&&e.push(...r)}a(zio,"addFileReferences");async function Yio(t){let e=await _zr(t);if(e){let r=t.ctx.get(ik),n=e.repoInfo.owner,o=e.repoInfo.repo,s=await r.getRepositoryInfo(e.repoInfo);if(s)return{type:"github.repository",id:`${n}/${o}`,data:{type:"repository",name:o,ownerLogin:n,id:s.id}}}}a(Yio,"gitMetadataToReference");async function Kio(t){let e=await t.skillResolver.resolve(Fg);if(e&&e.selection){let n=await t.ctx.get(In).getOrReadTextDocument(e),o=Gl(n);if(await t.collectFile(t.turn.agent.agentSlug,e.uri,o,e.selection),n.status==="valid")return Jio(e,n.document)}}a(Kio,"currentEditorToSelectionReference");function Jio(t,e){if(t.selection&&!Yre(t.selection)){let r=e.getText(t.selection);return{type:"client.selection",id:t.uri,data:{start:{line:t.selection.start.line,col:t.selection.start.character},end:{line:t.selection.end.line,col:t.selection.end.character},content:r}}}}a(Jio,"extractSelection");async function Xio(t){let e=await t.skillResolver.resolve(Fg);if(e){let n=await t.ctx.get(In).getOrReadTextDocument(e),o=Gl(n);if(await t.collectFile(t.turn.agent.agentSlug,e.uri,o),n.status==="valid")return{type:"client.file",id:n.document.uri,data:{content:n.document.getText(),language:n.document.detectedLanguageId}}}}a(Xio,"currentEditorToFileReference");async function Zio(t){let e=[],r=t.turn.request.references;if(r&&r.length>0){let n=t.ctx.get(In);for(let o of r)if(o.type==="file"){let s=await n.getOrReadTextDocument(o),c=Gl(s);if(await t.collectFile(t.turn.agent.agentSlug,o.uri,c,o.selection),s.status==="valid"){let l=s.document.getText();e.push({type:"client.file",id:o.uri,data:{content:l,language:s.document.detectedLanguageId}})}}}return e}a(Zio,"fileReferenceToPlatformFileReference");f();f();var cne=class t{static{a(this,"CapiErrorTranslator")}static formatRequestId(e,r){let n=[];return e&&n.push(`Request ID: ${e}`),r&&n.push(`GitHub Request ID: ${r}`),n.length>0?` ${n.join(" | ")}`:""}static appendRequestId(e,r,n){return`${e}${t.formatRequestId(r,n)}`}static translateErrorMessage(e,r,n,o,s){let c;switch(e){case 466:c="Oops, your plugin is out of date. Please update it.";break;case 401:c="Oops, you are not authorized. Please sign in. If you are using a custom model, please check if the API key is still valid.";break;case 402:c=r||"Oops, you need to upgrade your plan.";break;case 413:c="Oops, your request is too large. Please try again with a smaller input.";break;case 429:c=o!==void 0?`The service is currently rate-limited. Please wait a moment and try again in ${o}s.`:"The service is currently rate-limited. Please wait a moment and try again.";break;case 503:c=r||"Oops, the service is currently unavailable. Please try again later.";break;default:if(r&&r.trim().length>0){let l=360,u=t.formatRequestId(n,s),d="Sorry, an error occurred while generating a response. Details: ",p=l-d.length-u.length;if(r.length<=p)return`${d}${r}${u}`;{let h=r.substring(0,p);return`${d}${h}... Read more from logs.${u}`}}c="Sorry, an error occurred while generating a response.";break}return t.appendRequestId(c,n,s)}};f();f();f();var Rzr=de(W7e()),JPt=de(require("path"));var Pzr=500,loo=Math.floor(.25*Pzr),z7e=class{static{a(this,"FixedSizeChunking")}async chunk(e,r){let n=[],o=JPt.default.extname(__filename)===".ts"?JPt.default.resolve(__dirname,"../../../../../../dist/main.js"):__filename;return n=await Rzr.job(async({text:s,uri:c,tokenizerName:l,directory:u,chunkSize:d,overlap:p})=>{let m=await require(u).getTokenizerAsync(l),g=m.tokenize(s),A=g.length,y=[],E=0;for(;E=A,v=_?A:E+d,b=g.slice(E,v),I=m.detokenize(b),x=s.indexOf(I);y.push({id:`${c.toString()}#${E}`,chunk:I,tokenCount:b.length,range:{start:x,end:x+I.length}}),E=_?v:v-p}return y},{data:{text:e.getText(),uri:e.uri.toString(),tokenizerName:r.tokenizer,directory:o,chunkSize:Pzr,overlap:loo}}),n}};var uoo="fixedSize",doo=new Map([["fixedSize",z7e]]);function kzr(t){let e=t==="default"?uoo:t,r=doo.get(e);if(!r)throw new Error(`Chunking constructor for type ${t} not found`);return r}a(kzr,"getChunkingAlgorithm");f();f();var Y7e=de(mN()),sk=de(require("fs")),Dzr=require("os"),PT=de(require("path")),lne=require("process");var XPt=5e4,foo=new Se("workspaceChunks"),K7e=class t{constructor(e,r){this.ctx=e;this.pathHashLength=8;this.chunksCountCache=new Map;let n=Zn(r.uri),o=(0,Y7e.SHA256)(r.uri).toString().substring(0,this.pathHashLength);this.cacheRootPath=PT.join(ZPt(),"project-context",`${n}.${o}`)}static{a(this,"WorkspaceChunks")}static{this.CACHE_VERSION="1.0.0"}getChunksCacheFile(e){let r=(0,Y7e.SHA256)(e).toString().substring(0,this.pathHashLength),n=PT.basename(e);return PT.join(this.cacheRootPath,`${n}.${r}.json`)}async getChunksCacheFromCacheFile(e){let r=await sk.promises.readFile(e,{encoding:"utf8"}).catch(()=>{});if(r)try{return JSON.parse(r)}catch{}}async getChunksCache(e){let r=this.getChunksCacheFile(e);return await this.getChunksCacheFromCacheFile(r)}async setChunksCache(e,r){let n=this.getChunksCacheFile(e);try{await sk.promises.mkdir(PT.dirname(n),{recursive:!0}),await sk.promises.writeFile(n,JSON.stringify(r),{encoding:"utf8"})}catch(o){foo.debug(this.ctx,"Failed to set chunks cache:",o)}}async removeChunksCache(e){let r=this.getChunksCacheFile(e);await sk.promises.rm(r).catch(()=>{})}async enumerateChunksCacheFileNames(){return await sk.promises.readdir(this.cacheRootPath).catch(()=>[])}async getFilesCount(){return(await this.enumerateChunksCacheFileNames()).length}async getChunksCount(){let e=0;for(let r of await this.enumerateChunksCacheFileNames()){let n=PT.join(this.cacheRootPath,r);if(!this.chunksCountCache.has(n)){let o=await this.getChunksCacheFromCacheFile(n);this.chunksCountCache.set(n,o?.documentChunks?.length??0)}e+=this.chunksCountCache.get(n)||0}return e}async*getChunksForFile({uri:e}){let r=await this.getChunksCache(e);r!==void 0&&(yield*r.documentChunks)}async*getChunksFromCacheFile(e){let r=await this.getChunksCacheFromCacheFile(e);yield*r?r.documentChunks:[]}async*getChunks(e){if(e!==void 0)yield*this.getChunksForFile(e);else{let r=await this.enumerateChunksCacheFileNames();for(let n of r)yield*this.getChunksFromCacheFile(PT.join(this.cacheRootPath,n))}}async getFileHash(e){let r=mo(e),n="";return r&&(n=await sk.promises.readFile(r,{encoding:"utf8"}).catch(()=>"")),(0,Y7e.SHA256)(n).toString()}async addChunks({uri:e},r){let n=Array.isArray(r)?()=>Promise.resolve(r):r,o=mo(e);if(!o)return;async function s(h){try{return(await sk.promises.stat(h)).mtimeMs}catch{return}}a(s,"getLastModified");let c=await s(o),l=await this.getChunksCache(e);if(l!==void 0&&l.version===t.CACHE_VERSION&&c!==void 0&&l.lastModified===c){this.chunksCountCache.set(o,l.documentChunks.length);return}let u=await this.getFileHash(e),d=await n();this.chunksCountCache.set(o,d.length);let p={version:t.CACHE_VERSION,filePath:e,hash:u,lastModified:c,documentChunks:d};await this.setChunksCache(e,p)}async deleteChunksForSource(e){let r=kc(e),n=await this.getChunksCache(r);return n===void 0?[]:(await this.removeChunksCache(r),n.documentChunks)}async deleteChunks({uri:e}){let r=mo(e);if(!r)return[];let n;try{n=await sk.promises.readdir(r)}catch{return await this.deleteChunksForSource(r)}let o=[];for(let s of n){let c=kc(PT.join(r,s));o.push(...await this.deleteChunks({uri:c}))}return o}async clear(){await sk.promises.rm(this.cacheRootPath,{recursive:!0}).catch(()=>{})}};function ZPt(){return lne.env.XDG_CACHE_HOME&&PT.isAbsolute(lne.env.XDG_CACHE_HOME)?lne.env.XDG_CACHE_HOME+"/github-copilot":(0,Dzr.platform)()==="win32"?lne.env.USERPROFILE+"\\AppData\\Local\\Temp\\github-copilot":lne.env.HOME+"/.cache/github-copilot"}a(ZPt,"getXdgCachePath");f();f();var J7e=class{constructor(e,r){this.ctx=e;this.workspaceFolder=r;this.emitter=new Ri;this.onFileChange=this.emitter.event;this.status="created",this.startWatching()}static{a(this,"WorkspaceWatcher")}emitFilesCreated(e){this.emitter.fire({type:"create",documents:e,workspaceFolder:this.workspaceFolder})}emitFilesUpdated(e){this.emitter.fire({type:"update",documents:e,workspaceFolder:this.workspaceFolder})}emitFilesDeleted(e){this.emitter.fire({type:"delete",documents:e,workspaceFolder:this.workspaceFolder})}};var Ug=class{constructor(e){this.ctx=e;this.watchers=new $r(25)}static{a(this,"WorkspaceWatcherProvider")}getWatcher(e){let r=this.watchers.get(e.uri);if(r)return r;let n=this.getParentFolder(e.uri);return n?this.watchers.get(n):void 0}getParentFolder(e){return[...this.watchers.keys()].find(n=>{let o=n.replace(/[#?].*/,"").replace(/\/?$/,"/");return e!==n&&e.startsWith(o)})}hasWatcher(e){return this.getParentFolder(e.uri)||this.getWatcher(e)!==void 0}startWatching(e){if(Ge.debug(this.ctx,`WorkspaceWatcherProvider - Start watching workspace ${e.uri}`),this.hasWatcher(e)){this.getWatcher(e)?.startWatching();return}let r=this.createWatcher(e);this.watchers.set(e.uri,r)}stopWatching(e){this.getWatcher(e)?.stopWatching()}terminateSubfolderWatchers(e){let r=[];for(let s of this.watchers.values())r.push(s.workspaceFolder);let n=e.uri.replace(/[#?].*/,"").replace(/\/?$/,"/"),o=r.filter(s=>s.uri!==e.uri&&s.uri.startsWith(n));for(let s of o)this.terminateWatching(s);return o}terminateWatching(e){if(this.getWatcher(e)?.status!=="stopped")return this.stopWatching(e),this.watchers.delete(e.uri);this.watchers.delete(e.uri)}onFileChange(e,r,n,o){return this.getWatcher(e)?.onFileChange(Up(this.ctx,r,"WorkspaceWatcherProvider.onFileChange"),n,o)}async getWatchedFiles(e){return await this.getWatcher(e)?.getWatchedFiles()??[]}getStatus(e){return this.getWatcher(e)?.status}};var ekt=1e4;var X7e=class{constructor(e,r,n){this.workspaceFolder=r;this.implementation=n;this._chunkLimiter=new rkt;this.status="notStarted",this.workspaceChunks=new K7e(e,r),this.cancellationToken=new tkt,this._chunkingTimeMs=0,this._fileCountExceeded=!1,this._chunkCountExceeded=!1,this._totalFileCount=0,this._filesUpdated=new Set}static{a(this,"ChunkingHandler")}async chunk(e,r){return r?await this.chunkFiles(e,r):await this.chunkWorkspace(e)}async chunkWorkspace(e){let r=performance.now();if(this.status="started",this.cancellationToken.isCancelled())return this.status="cancelled",this.updateChunkingTime(r,performance.now()),this.workspaceChunks.getChunks();await this.updateModelConfig(e);let n=await e.get(Ug).getWatchedFiles(this.workspaceFolder);this._totalFileCount=n.length,n.length>ekt&&(this._fileCountExceeded=!0,n=n.slice(0,ekt));let o=n.map(async s=>{this.cancellationToken.isCancelled()||await this._chunkLimiter.queue(()=>this._chunk(e,s))});try{await Promise.all(o)}catch(s){Lo(e,s,"ChunkingProvider.chunk"),this.terminateChunking()}return this.status=this.cancellationToken.isCancelled()?"cancelled":"completed",this.updateChunkingTime(r,performance.now()),await this.workspaceChunks.getChunksCount()>XPt&&(this._chunkCountExceeded=!0),this.workspaceChunks.getChunks()}async chunkFiles(e,r){await this.updateModelConfig(e);let n=r.map(async o=>{this.cancellationToken.isCancelled()||(this._filesUpdated.add(o.uri),await this._chunkLimiter.queue(()=>this._chunk(e,o)))});try{await Promise.all(n)}catch(o){Lo(e,o,"ChunkingProvider.chunkFiles"),this.terminateChunking()}return await this.workspaceChunks.getChunksCount()>XPt&&(this._chunkCountExceeded=!0),await this.workspaceChunks.getFilesCount()>ekt&&(this._fileCountExceeded=!0),bjr(...r.map(o=>this.workspaceChunks.getChunks(o)))}async _chunk(e,r){this.cancellationToken.isCancelled()||await this.workspaceChunks.addChunks(r,()=>this.implementation.chunk(r,this.modelConfig))}async updateModelConfig(e){this.modelConfig||(this.modelConfig=await qo.getModelConfiguration(e,"user"))}terminateChunking(){this.cancellationToken.cancel()}async clearChunks(){await this.workspaceChunks.clear()}updateChunkingTime(e,r){this._chunkingTimeMs=r-e}get chunkingTimeMs(){return Math.floor(this._chunkingTimeMs)}get fileCountExceeded(){return this._fileCountExceeded}get totalFileCount(){return this._totalFileCount}get chunkCountExceeded(){return this._chunkCountExceeded}get filesUpdatedCount(){return this._filesUpdated.size}async getFilesCount(){return this.workspaceChunks.getFilesCount()}getChunks(){return this.workspaceChunks.getChunks()}async getChunksCount(){return this.workspaceChunks.getChunksCount()}deleteSubfolderChunks(e){return this.workspaceChunks.deleteChunks({uri:e})}deleteFileChunks(e){return this._filesUpdated.add(e),this.workspaceChunks.deleteChunks({uri:e})}},tkt=class{constructor(){this.cancelled=!1}static{a(this,"ChunkingCancellationToken")}cancel(){this.cancelled=!0}isCancelled(){return this.cancelled}},rkt=class{constructor(e=20){this.maxCount=e;this.tasks=[];this.runningTasks=0}static{a(this,"Limiter")}async queue(e){return new Promise((r,n)=>{this.tasks.push({factory:e,resolve:r,reject:n}),this.consume()})}consume(){for(;this.tasks.length>0&&this.runningTasks<=this.maxCount;){let{factory:e,resolve:r,reject:n}=this.tasks.shift();this.runningTasks++;let o=e();o.then(r,n),o.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this.runningTasks--,this.consume()}};var Rd=class{constructor(e){this.ctx=e;this.workspaceChunkingProviders=new Map}static{a(this,"ChunkingProvider")}get workspaceCount(){return this.workspaceChunkingProviders.size}createImplementation(e,r){let n=kzr(r),o=new n;return new X7e(this.ctx,e,o)}getImplementation(e,r="default"){let n=this.getParentFolder(e);if(n)return this.workspaceChunkingProviders.get(n.uri);let o=this.workspaceChunkingProviders.get(e.uri);return o||(o=this.createImplementation(e,r),this.workspaceChunkingProviders.set(e.uri,o)),o}getParentFolder(e){let r=[];for(let n of this.workspaceChunkingProviders.values())r.push(n.workspaceFolder);return r.find(n=>{let o=n.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return e.uri!==n.uri&&e.uri.startsWith(o)})}status(e){return this.getImplementation(e).status}checkLimits(e){let r=this.getImplementation(e);return{fileCountExceeded:r.fileCountExceeded,chunkCountExceeded:r.chunkCountExceeded}}fileCount(e){return this.getImplementation(e).getFilesCount()}chunkCount(e){return this.getImplementation(e).getChunksCount()}chunkingTimeMs(e){return this.getImplementation(e).chunkingTimeMs}getChunks(e){return this.getImplementation(e).getChunks()}terminateChunking(e,r){let n=this.getImplementation(r);n.terminateChunking();let s=Pt.createAndMarkAsIssued().extendedBy(void 0,{fileCount:n.filesUpdatedCount});st(e,"index.terminate",s),this.workspaceChunkingProviders.delete(r.uri)}async clearChunks(e,r){this.terminateChunking(e,r),await this.getImplementation(r).clearChunks()}async deleteSubfolderChunks(e,r){return await this.getImplementation(e).deleteSubfolderChunks(r.uri)}async deleteFileChunks(e,r){let n=this.getImplementation(e),o=[];Array.isArray(r)||(r=[r]);for(let s of r)o.push(...await n.deleteFileChunks(s));return o}async chunk(e,r,n,o){let s;return n&&(Array.isArray(n)?s=n:o=n),o||(o="default"),s?await this.chunkFiles(e,r,s,o):await this.chunkFolder(e,r,o)}async chunkFolder(e,r,n="default"){let o=this.getImplementation(r,n),s=await o.chunk(e),l=Pt.createAndMarkAsIssued().extendedBy(void 0,{fileCount:o.totalFileCount,chunkCount:await o.getChunksCount(),timeTakenMs:o.chunkingTimeMs,workspaceCount:this.workspaceCount});return st(e,"index.chunk",l),s}async chunkFiles(e,r,n,o="default"){return await this.getImplementation(r,o).chunk(e,n)}};var poo=new Se("ChatFetchResultPostProcessor"),une=class{constructor(e,r,n){this.turnContext=e;this.chatFetcher=r;this.computeSuggestions=n}static{a(this,"ChatFetchResultPostProcessor")}async postProcess(e,r,n,o,s,c,l,u){switch(Njr(this.turnContext.ctx,l,c,e.type=="offTopic",e.requestId,u,s.extendedBy({},{fileCount:this.turnContext.ctx.get(Rd).workspaceCount})),await this.turnContext.ctx.get(d0).inspectFetchResult(e),e.type){case"success":return await this.processSuccessfulFetchResult(n,e.numTokens,e.requestId,r,l,o,s,u);case"offTopic":return this.processOffTopicFetchResult(s,l,u);case"canceled":return this.turnContext.turn.status="cancelled",this.turnContext.turn.response={message:"Cancelled",type:"user"},{error:{message:dn(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}};case"failed":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:e.reason,type:"server"},poo.error(this.turnContext.ctx,"Fetch failed:",e),{error:{message:cne.translateErrorMessage(e.code,e.reason,e.requestId,e.retryAfter,e.ghRequestId),code:e.code}};case"filtered":return this.turnContext.turn.status="filtered",{error:{message:"Oops, your response got filtered. Vote down if you think this shouldn't have happened.",responseIsFiltered:!0}};case"length":return this.turnContext.turn.status="error",{error:{message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0}};case"agentAuthRequired":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},{error:{message:"Authorization required",responseIsFiltered:!1}};case"no_choices":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"No choices returned",type:"server"},{error:{message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"no_finish_reason":return this.turnContext.turn.status="error",n&&n.length>0?this.turnContext.turn.response={message:n,type:"model",references:this.turnContext.turn.response?.references}:this.turnContext.turn.response={message:"No finish reason",type:"server"},{error:{message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0}};case"model_not_supported":{this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model not supported",type:"server"};let{modelName:d,modelProviderName:p}=qo.parseModelNotSupportedReason(e.reason);return{error:{message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1,modelName:d,modelProviderName:p}}}case"model_max_prompt_tokens_exceeded":return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Model max prompt tokens exceeded",type:"server"},{error:{message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",code:400,reason:"model_max_prompt_tokens_exceeded",responseIsFiltered:!1}};case"successMultiple":case"tool_calls":case"unknown":return this.turnContext.turn.status="error",{error:{message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1}}}}async processSuccessfulFetchResult(e,r,n,o,s,c,l,u){if(e&&e.length>0){c.markAsDisplayed(),l.markAsDisplayed(),this.turnContext.turn.status="success",this.turnContext.turn.response={message:e,type:"model",references:this.turnContext.turn.response?.references},Mjr(this.turnContext,s,e,r,n,u,l);let d=this.computeSuggestions?await this.fetchSuggestions(o,s,c,u):void 0;if(d){let{followUp:p,suggestedTitle:h}=d;return{followup:p.message!==""?p:void 0,suggestedTitle:h!==""?h:void 0}}return{}}return this.turnContext.turn.status="error",this.turnContext.turn.response={message:"The model returned successful but did not contain any response text.",type:"meta"},{error:{message:dn(this.turnContext.turn.response?.message??""),type:this.turnContext.turn.response?.type}}}async fetchSuggestions(e,r,n,o){let c=await new z6(this.turnContext.ctx,this.chatFetcher).fetchRawSuggestions(this.turnContext,e,r,n);if(c===void 0)return;let l=this.enrichFollowup(c,r,n,o);return Ge.debug(this.turnContext.ctx,"Computed followup",l),Ge.debug(this.turnContext.ctx,"Computed suggested title",c.suggestedTitle),{followUp:l,suggestedTitle:c.suggestedTitle}}enrichFollowup(e,r,n,o){let s=n.extendedBy({messageSource:"chat.suggestions",suggestionId:yr(),suggestion:"Follow-up from model"},{promptTokenLen:e.promptTokenLen,numTokens:e.numTokens});return Fjr(this.turnContext.ctx,r,s,o),{message:e.followUp,id:s.properties.suggestionId,type:s.properties.suggestion}}processOffTopicFetchResult(e,r,n){let o="Sorry, but I can only assist with programming related questions.";return this.turnContext.turn.response={message:o,type:"offtopic-detection"},this.turnContext.turn.status="off-topic",Ojr(this.turnContext.ctx,this.turnContext.conversation,r,o,e.properties.messageId,n,e),{error:{message:o,responseIsFiltered:!0}}}};f();var Z7e=S.Union([S.String(),S.Number()]),Tj=S.Union([S.String(),S.Number()]),hoo=S.Union([S.Literal("included"),S.Literal("blocked"),S.Literal("notfound"),S.Literal("empty")]),eUe=S.Object({uri:S.String(),position:S.Optional(uh)}),moo=S.Object({type:S.Literal("file"),uri:S.String(),visibleRange:S.Optional(gf),selection:S.Optional(gf),status:S.Optional(hoo),range:S.Optional(gf)}),goo=S.Object({type:S.Literal("directory"),uri:S.String()}),Aoo=S.Object({type:S.Literal("tool"),uri:S.String(),name:S.Optional(S.String()),server:S.Optional(S.String()),description:S.Optional(S.String())}),Z6=S.Union([moo,goo,Azr,Aoo]),ak=S.Union([S.Literal("panel"),S.Literal("inline")]),yoo=S.Union([S.Object({type:S.Literal("text"),text:S.String()}),S.Object({type:S.Literal("image_url"),imageUrl:S.Object({url:S.String(),detail:S.Optional(S.Union([S.Literal("low"),S.Literal("high")]))})})]),nkt=S.Union([S.String(),S.Array(yoo)]),Mzr=S.Object({request:nkt,response:S.Optional(S.String()),agentSlug:S.Optional(S.String()),turnId:S.Optional(Tj),model:S.Optional(S.String())});function tUe(t){return typeof t=="string"?t:t.map(e=>e.type==="image_url"?{type:"image_url",image_url:{url:e.imageUrl.url,detail:e.imageUrl.detail}}:{type:"text",text:e.text})}a(tUe,"convertToMessageContent");function rUe(t,e){if(t=q1(t),typeof t=="string")return t+e;let r=t.map(n=>n.type==="text").lastIndexOf(!0);if(r>=0){let n=[...t],o=n[r];return n[r]={type:"text",text:o.text+e},n}return[...t,{type:"text",text:e}]}a(rUe,"appendToMessage");var nUe=S.Union([S.Literal("Ask"),S.Literal("Agent"),S.Literal("InlineAgent")]),Eoo=S.Object({type:S.String(),description:S.String()}),Ozr=S.Object({name:S.String(),description:S.String(),inputSchema:S.Optional(S.Object({type:S.String(),properties:S.Record(S.String(),Eoo),required:S.Array(S.String())})),confirmationMessages:S.Optional(S.Object({title:S.String(),message:S.String()}))}),dh=S.Object({uri:S.String(),name:S.String()}),_oo=S.Union([S.Literal("not-started"),S.Literal("in-progress"),S.Literal("completed")]),iUe=S.Object({id:S.Number(),title:S.String(),description:S.Optional(S.String()),status:_oo});var ikt="generate-response",oUe=class extends Error{constructor(r,n,o,s){super(r);this.authorizationUri=n;this.agentSlug=o;this.agentName=s}static{a(this,"RemoteAgentAuthorizationError")}},aEe=class{constructor(e,r,n){this.agent=e;this.turnContext=r;this.chatFetcher=n;this.conversationProgress=r.ctx.get(xa),this.chatFetcher=this.chatFetcher??new fa(r.ctx),this.postProcessor=new une(r,this.chatFetcher,!1),this.conversation=r.conversation,this.turn=r.turn}static{a(this,"RemoteAgentTurnProcessor")}async process(e,r,n,o){try{await this.processWithAgent(e,r,this.turnContext,o)}catch(s){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,s);let c=s instanceof Error?s.message:String(s);this.turn.status="error",this.turn.response={message:c,type:"meta"},s instanceof oUe?await this.endProgress({unauthorized:{authorizationUri:s.authorizationUri,agentSlug:s.agentSlug,agentName:s.agentName}}):await this.endProgress({error:{message:c,responseIsIncomplete:!0}})}}async processWithAgent(e,r,n,o){await this.conversationProgress.begin(this.conversation,this.turn,e);let s=await Ja(this.turnContext.ctx,this.turnContext,{languageId:o?.detectedLanguageId??""});if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let c=await this.buildAgentPrompt(n);if(!c)await this.endTurnWithResponse(`No prompt created for agent ${this.agent.id}`,"error");else{let l={type:"user",prompt:JSON.stringify(c.messages,null,2),tokens:c.tokens};await n.ctx.get(d0).inspectPrompt(l),await n.steps.start(ikt,"Generating response");let u=this.augmentTelemetry(c,s,this.turn.template,o);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let d=await this.fetchConversationResponse(n,c.messages,r,s.extendedBy({messageSource:"chat.user"},{promptTokenLen:c.tokens}),u,o);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(d,n),await this.endProgress({error:d.error,followUp:d.followup,suggestedTitle:d.suggestedTitle,skillResolutions:c.skillResolutions}))}}async buildAgentPrompt(e){let r=this.createMessagesFromHistory(e),n=await this.computeCopilotReferences(e),o=this.getOrCreateAgentSessionId(e);return this.turn.agent&&(this.turn.agent.sessionId=o),this.turn.confirmationResponse?this.addConfirmationResponse(this.turn.confirmationResponse,r):r.push({role:"user",content:q1(e.turn.request.message),copilot_references:n.length>0?n:void 0}),{messages:r,tokens:-1,skillResolutions:[]}}getOrCreateAgentSessionId(e){let r=this.turn.agent?.agentSlug;if(r){for(let n of e.conversation.turns)if(n.agent?.agentSlug===r&&n.agent.sessionId)return n.agent.sessionId}return yr()}addConfirmationResponse(e,r){r.push({role:"user",content:"",copilot_confirmations:[e]})}createMessagesFromHistory(e){return oPt(e.conversation.turns.slice(0,-1),this.agent.slug).flatMap(r=>{let n=[];if(r.request&&n.push({role:"user",content:q1(r.request.message)}),r.response&&r.response.type==="model"){let o=gzr(r.response.references);n.push({role:"assistant",content:q1(r.response.message),copilot_references:o.length>0?o:void 0})}return n})}async computeCopilotReferences(e){return await Czr(e)}async endTurnWithResponse(e,r){this.turn.response={type:"meta",message:e},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:e}),await this.endProgress()}async fetchConversationResponse(e,r,n,o,s,c){n.onCancellationRequested(async()=>{await this.cancelProgress()});let l=new X6((h,m,g,A,y,E)=>{let _=y?{...y,agentSlug:this.agent.slug}:void 0;this.conversationProgress.report(this.conversation,this.turn,{reply:h,annotations:m,references:g,notifications:A.map(v=>({message:v.message,severity:"warning"})),confirmationRequest:_,thinking:E}),this.turn.response?(this.turn.response.message=rUe(this.turn.response.message,h),this.turn.response.references.push(...g)):this.turn.response={message:h,type:"model",references:g},this.turn.annotations.push(...m??[]),_&&(this.turn.confirmationRequest=_)}),u=await this.turnContext.ctx.get(Nt).getGitHubSession(),d={engineName:"agents",endpoint:this.agent.endpoint??this.agent.slug,messages:r,uiKind:"conversationPanel",intentParams:{intent:!0,intent_threshold:.7,intent_content:dn(this.turn.request.message)},authToken:u?.accessToken,copilot_thread_id:this.turn.agent?.sessionId,llmInteraction:e.toLlmInteraction()},p=await this.chatFetcher.fetchResponse(d,n,o,(h,m)=>l.isFinishedAfter(h,m));return this.ensureAgentIsAuthorized(p),await this.postProcessor.postProcess(p,n,l.appliedText,o,s.extendedBy(this.addExtensibilityInfoTelemetry()),dn(this.turn.request.message),"conversationPanel",c)}ensureAgentIsAuthorized(e){if(e.type==="agentAuthRequired")throw this.turnContext.turn.status="error",this.turnContext.turn.response={message:"Authorization required",type:"server"},new oUe("Authorization required",e.authUrl,this.agent.slug,this.agent.name)}augmentTelemetry(e,r,n,o){return Oye(this.conversation,"conversationPanel",dn(this.turn.request.message).length,e.tokens,n?.templateId,void 0,r,e.skillResolutions)}addExtensibilityInfoTelemetry(){return{extensibilityInfoJson:JSON.stringify({agent:this.agent.slug,outgoingReferences:this.turn.request.references?.map(e=>e.type)??[],incomingReferences:this.turn.response?.references?.map(e=>e.type)??[]})}}async finishGenerateResponseStep(e,r){e.error?await r.steps.error(ikt,e.error.message):await r.steps.finish(ikt)}async endProgress(e){await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}};var cEe=class{constructor(e,r,n,o,s,c){this.id=e;this.slug=r;this.name=n;this.description=o;this.avatarUrl=s;this.endpoint=c}static{a(this,"RemoteAgent")}additionalSkills(){return[]}turnProcessor(e){return new aEe(this,e)}},sUe=class extends cEe{static{a(this,"ExtensibilityPlatformAgent")}constructor(){super(0,"github","GitHub","Get answers grounded in web search, code search, and your enterprise's knowledge bases.","https://avatars.githubusercontent.com/u/9919?s=200&v=4","chat")}turnProcessor(e){return new aEe(this,e)}};f();var Coo="github",Vx=class{static{a(this,"RemoteAgentRegistry")}},aUe=class extends Vx{constructor(r){super();this.ctx=r;this._agents=void 0;this._lastFetchTime=0}static{a(this,"CapiRemoteAgentRegistry")}async agents(){return this.shouldRefreshAgents()&&(this._agents=await this.fetchAgents()),this._agents!=null?this._agents.slice():[]}shouldRefreshAgents(){return!this._agents||!this._lastFetchTime?!0:this.isLastFetchOlderOneHour()}isLastFetchOlderOneHour(){return Date.now()-this._lastFetchTime>36e5}async fetchAgents(){let r=await dH(this.ctx,"/agents");return r.ok?(this._lastFetchTime=Date.now(),this.parseAgents(await r.text())):(Cr.error(this.ctx,"Failed to fetch agents from CAPI",{status:r.status,statusText:r.statusText}),[])}parseAgents(r){let n;try{n=JSON.parse(r).agents,Array.isArray(n)||Cr.error(this.ctx,"Expected 'agents' to be an array")}catch(o){return r.includes("access denied")||Cr.warn(this.ctx,"Invalid remote agent response:",r,o),[]}return n.filter(o=>o.slug!==Coo).map(o=>new cEe(o.id,o.slug,o.name,o.description,o.avatar_url))}};f();f();var Bzr=de(require("fs")),iy=de(require("path"));var okt=[".test",".spec","_test","Test","_spec","_test","Tests",".Tests","Spec"],skt="test_",lEe={js:{suffix:[".test",".spec"],location:"sameFolder"},ts:{suffix:[".test",".spec"],location:"sameFolder"},go:{suffix:["_test"],location:"sameFolder"},java:{suffix:["Test"],location:"testFolder"},php:{suffix:["Test"],location:"testFolder"},dart:{suffix:["_test"],location:"testFolder"},cs:{suffix:["Test"],location:"testFolder"},rb:{suffix:["_test","_spec"],location:"testFolder"},py:{prefix:"test_",location:"testFolder"},ps1:{suffix:[".Tests"],location:"testFolder"},kt:{suffix:["Test"],location:"testFolder"}},uEe=class{constructor(e,r,n=void 0){this.ctx=e;this.fileExists=r;this.baseUri=n}static{a(this,"TestFileFinder")}async findTestFileForSourceFile(e){let r=Zn(e),n=iy.extname(r).replace(".",""),o=lEe[n]??{location:"sameFolder",prefix:skt,suffix:okt},s=[];if(o.prefix&&s.push(o.prefix+r),o.suffix)for(let d of o.suffix??[]){let p=r.replace(`.${n}`,d+"."+n);s.push(p)}let c=o.location??"sameFolder",l;if(c==="sameFolder"){if(l=mo(Lu(e)),l===void 0)return}else{let d=mo(e);if(d===void 0)return;l=this.determineTestFolder(d,c)}for(let d of s){let p=iy.join(l,d),h=this.parseTestFilePath(p);if(h&&await this.fileExists(h))return h}let u=kc(l);if(await this.fileExists(u))return bi(u,s[0])}parseTestFilePath(e){try{return kc(e)}catch(r){Cr.error(this.ctx,`Failed to parse test file path: ${e}`,r);return}}async findImplFileForTestFile(e){let r=Zn(e),n=iy.extname(r).replace(".",""),o=lEe[n]??{location:"sameFolder",prefix:skt,suffix:okt},s=[];if(o.prefix&&s.push(r.substring(o.prefix.length)),o.suffix)for(let u of o.suffix??[]){let p=r.substring(0,r.length-u.length-1-n.length)+"."+n;s.push(p)}let c=o.location??"sameFolder",l;c==="sameFolder"?l=Lu(e):l=this.determineImplFolder(e);for(let u of s){let d=bi(l,u);if(await this.fileExists(d))return d}}findExampleTestFile(e){let r=mo(e);if(r===void 0)return;let n=iy.extname(Zn(e)).replace(".",""),o,s=lEe[n]?.location??"sameFolder";s==="sameFolder"?o=iy.dirname(r):o=this.determineTestFolder(r,s);let c=this.findFiles(o,`.${n}`,lEe[n]);if(c.length>0)return kc(c[0])}findFiles(e,r,n){let o=this._readdir(e),s=[];for(let c of o){let l=`${e}${iy.sep}${c}`;n?.prefix&&c.startsWith(n.prefix)&&s.push(l),n?.suffix&&n?.suffix.some(u=>c.endsWith(u+r))&&s.push(l)}return s}_readdir(e){return Bzr.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isFile()).map(r=>r.name)}determineTestFolder(e,r){let n=(this.baseUri&&mo(this.baseUri))??"",o=iy.extname(e).replace(".",""),s=this.getRelativeTestFolder(e,n,o,r);return[n,...s].filter(c=>c).join(iy.sep)}getRelativeTestFolder(e,r,n,o){let s=iy.dirname(e).replace(r,"");switch(n){case"php":case"dart":case"py":return["tests"];case"ps1":return["Tests"];case"rb":return["test",s];case"cs":return[s.replace("src","src/tests")];case"java":case"scala":case"kt":return[s.replace(/src[\\/]main/,"src/test")];default:return o==="testFolder"?[s.replace("src","test")]:[s]}}determineImplFolder(e){let r=iy.extname(Zn(e)).replace(".",""),n=Lu(e);switch(r){case"php":case"dart":case"py":return n.replace("tests","src");case"ps1":return n.replace("Tests","src");case"rb":return n.replace("/test","");case"cs":return n.replace("src/tests","src");case"java":case"scala":case"kt":return n.replace("src/test","src/main");default:return n.replace("test/","src/")}}};function dEe(t){let e=Zn(t),r=iy.extname(e),n=lEe[r.replace(".","")];return n?!(n.suffix&&!n.suffix.some(s=>e.endsWith(s+r))||n.prefix&&!e.startsWith(n.prefix)):!!(okt.some(s=>e.endsWith(s+r))||e.startsWith(skt))}a(dEe,"isTestFile");f();var Lzr=["indexed","indexing","not_indexed"],eF=class{constructor(){this._cache=new $r(100)}static{a(this,"BlackbirdIndexingStatus")}async queryIndexingStatus(e,r,n){let o=e.ctx;if(!n)return!1;let s=`repos/${r}/copilot_internal/embeddings_index`,c=await au(o,n,s);return c.ok?(await c.json()).semantic_code_search_ok:!1}isValid(e){return e!==void 0&&Date.now()-e.timestamp<1800*1e3}async isRepoIndexed(e,r,n,o=!1){let s=RM(r);if(!s)return!1;let c=this._cache.get(s);if(!o&&this.isValid(c))return c.status;let l=await this.queryIndexingStatus(e,s,n);return this._cache.set(s,{status:l,timestamp:Date.now()}),l}get cache(){return this._cache}};f();f();f();async function Fzr(t,e,r,n){let o=To(e.tokenizer),s=r.filter(h=>o.tokenLength(h.text)p.text),u=v1(t);TI()&&(u=await Dte(t,u));let d=await PM(t,e,r,void 0,c,{input:l,model:n,dimensions:1024},s,u);if(d.status!==200||s.isCancellationRequested){Lo(t,new ZM(`Failed to request dense embeddings, status: ${d.status}`),"LocalSnippetProvider.fetchEmbeddings");return}try{return(await d.json()).data.map(h=>({id:o[h.index].id,embedding:h.embedding}))}catch{return}}a(voo,"sendEmbeddingsRequest");f();f();var cUe=class{static{a(this,"CosineSimilarityScoring")}score(e,r){let n=Math.sqrt(e.reduce((c,l)=>c+l*l,0)),o=Math.sqrt(r.reduce((c,l)=>c+l*l,0));return e.reduce((c,l,u)=>c+l*r[u],0)/(n*o)}terminateScoring(){}};var boo="cosine",Too=new Map([["cosine",cUe]]);function Uzr(t){let e=t==="default"?boo:t,r=Too.get(e);if(!r)throw new Error(`Scoring constructor for type ${t} not found`);return r}a(Uzr,"getScoringAlgorithm");f();var V1=class{constructor(){this.workspaceScoringProviders=new $r(25)}static{a(this,"ScoringProvider")}createImplementation(e,r){let n=Uzr(r);return new n}getImplementation(e,r,n="default"){let o=this.workspaceScoringProviders.get(r.uri);return o||(o=this.createImplementation(e,n),this.workspaceScoringProviders.set(r.uri,o)),o}score(e,r,n,o,s){return this.getImplementation(e,r,s).score(n,o)}terminateScoring(e,r,n){this.getImplementation(e,r,n).terminateScoring(),this.workspaceScoringProviders.delete(r.uri)}};var Qzr={modelFamily:tLe.textEmbedding3Small,scoringType:"default",dimensions:null};async function qzr(t,e,r,n,o,s,c,l=Qzr){let u={...Qzr,...l},d=Ioo(t,e,r,n);Ge.debug(t,`EmbeddingsReranker: Reranking ${d.length} snippets (includes the user query)`);let p=await t.get(wa).getFirstMatchingEmbeddingModelConfiguration(u.modelFamily);if(p===void 0)throw new Error(`EmbeddingsReranker: Model configuration not found for ${u.modelFamily}`);let h=performance.now(),m=await Fzr(t,p,d,s),g=performance.now();if(c.embeddingsTimeMs=Math.floor(g-h),m===void 0||m.length===0)return[];let A=m.findIndex(x=>x.id==="userQuery");if(A===void 0)return[];let y=m.splice(A,1)[0];if(s.isCancellationRequested)return[];let E=performance.now(),_=xoo(t,e,m,y,u.scoringType),v=performance.now();c.rerankingTimeMs=Math.floor(v-E);let b=_.slice(0,o);return Ge.debug(t,`EmbeddingsReranker: Returning ${b.length} snippets`),b.map(x=>d.find(w=>w.id===x.id).id)}a(qzr,"rerankSnippets");function Ioo(t,e,r,n){let o=n.map(s=>({id:s.id,text:s.chunk.toLowerCase()}));return o.push({id:"userQuery",text:r.toLowerCase()}),o}a(Ioo,"formatEmbeddingsInput");function xoo(t,e,r,n,o){let s=t.get(V1);return r.map(l=>({id:l.id,score:s.score(t,e,n.embedding,l.embedding,o)})).sort((l,u)=>u.score-l.score)}a(xoo,"scoreEmbeddings");f();f();f();var ckt=de(W7e());var woo=.75,Roo=1.2,lUe=class{constructor(e,r){this.ctx=e;this.workspaceFolder=r;this.chunksCount=0;this.sumTokenCount=0;this.status="notStarted"}static{a(this,"BM25Ranking")}get avgTokenCount(){return this.sumTokenCount/this.chunksCount}async initialize(e){this.sumTokenCount=0,this.chunksCount=0;for await(let r of e)this.sumTokenCount+=r.tokenCount,this.chunksCount++;this.status="completed"}async addChunks(e){for await(let r of e)this.sumTokenCount+=r.tokenCount,this.chunksCount++}async query(e){let r=await fEe();try{return await this.doQuery(e)}finally{await r.stopWorkerPool()}}async doQuery(e){let r=e.map(l=>l.toLowerCase()),n=await this.calculateIDFValues(r),o=Math.min(10*e.length,lkt),s=Math.min(o,this.chunksCount);return await this.calculateBM25Scores(r,this.avgTokenCount,n,s)}async calculateIDFValues(e){let r=this.ctx.get(Rd).getChunks(this.workspaceFolder),n=P6(r,s=>({...s,chunk:s.chunk.toLowerCase()})),o=P6(n,s=>s.chunk);return await Poo(e,o)}async calculateBM25Scores(e,r,n,o){let s=this.ctx.get(Rd).getChunks(this.workspaceFolder),c=new akt(o);for await(let l of s){let u=await koo({...l,chunk:l.chunk.toLowerCase()},e,r,n);c.add({...u,chunk:l.chunk})}return c.toArray(.75)}deleteEmbeddings(e){this.chunksCount-=e.length,this.sumTokenCount-=e.reduce((r,n)=>r+n.tokenCount,0)}terminateRanking(){}};async function Poo(t,e){let r=new SharedArrayBuffer(t.length*Int32Array.BYTES_PER_ELEMENT),n=new Int32Array(r),o=[],s=0;for await(let u of e){s++;let d=ckt.job(({snippet:p,keywords:h})=>h.map(g=>p.includes(g)?1:0),{data:{snippet:u,keywords:t}}).then(p=>{for(let h=0;h{let m=0;for(let g of s){let A=d[g],y=(c.match(new RegExp(g,"g"))||[]).length,E=A*(y*(p+1)),_=y+p*(1-h+h*l/u);m+=E/_}return m},{data:{document:t.chunk,docLength:t.tokenCount,keywords:e,avgTokenCount:r,idfValues:n,k1:Roo,b:woo}}),...t}}a(koo,"calculateBM25Score");var akt=class{constructor(e,r=-1/0){this.maxSize=e;this.minScore=r;this.store=[]}static{a(this,"SimpleHeap")}toArray(e){if(this.store.length&&typeof e=="number"){let r=this.store.at(0).score*(1-e);return this.store.filter(n=>n.score>=r)}return this.store}add(e){if(e.score<=this.minScore)return;let r=this.store.findIndex(n=>n.score=0?r:this.store.length,0,e);this.store.length>this.maxSize;)this.store.pop();this.store.length===this.maxSize&&(this.minScore=this.store.at(-1)?.score??this.minScore)}};var Noo="bm25",Moo=new Map([["bm25",lUe]]);function Gzr(t){let e=t==="default"?Noo:t,r=Moo.get(e);if(!r)throw new Error(`Ranking constructor for type ${t} not found`);return r}a(Gzr,"getRankingAlgorithm");var pm=class{constructor(){this.workspaceRankingProviders=new $r(25)}static{a(this,"RankingProvider")}createImplementation(e,r,n){let o=Gzr(n);return new o(e,r)}getImplementation(e,r,n="default"){let o=this.workspaceRankingProviders.get(r.uri);return o||(o=this.createImplementation(e,r,n),this.workspaceRankingProviders.set(r.uri,o)),o}status(e,r,n){return this.getImplementation(e,r,n).status}async initialize(e,r,n,o="default"){await this.getImplementation(e,r,o).initialize(n)}async addChunks(e,r,n,o="default"){await this.getImplementation(e,r,o).addChunks(n)}async query(e,r,n,o){return this.getImplementation(e,r,o).query(n)}async terminateRanking(e,r,n){await this.getImplementation(e,r,n).terminateRanking(),this.workspaceRankingProviders.delete(r.uri)}deleteEmbeddings(e,r,n,o){return this.getImplementation(e,r,o).deleteEmbeddings(n)}};f();async function uUe(t,e){let r=t.ctx,n=await qo.getModelConfiguration(r,"synonyms",void 0,{tool_calls:!0}),o={promptType:"synonyms",modelConfiguration:n},s=await r.get(fm).toPrompt(t,o);if(!s.toolConfig)return;let c={modelConfiguration:n,uiKind:"conversationPanel",messages:s.messages,tools:s.toolConfig?.tools,tool_choice:s.toolConfig?.tool_choice,llmInteraction:t.toLlmInteraction()},l=new fa(r),u=await Ja(r,t),d=await l.fetchResponse(c,e,u.extendedBy({messageSource:"chat.synonyms"}));if(d.type==="success"&&d.toolCalls&&d.toolCalls.length>0){let p=d.toolCalls[0],h=s.toolConfig?.extractArguments(p).keywords;return!h||!Array.isArray(h)?void 0:(Ge.debug(r,`UserQueryParser: Parsed ${h.length} keywords from the original user query: ${h.join(", ")}`),h.length?h:void 0)}else{let p="reason"in d?d.reason:"";Lo(r,new ZM(`Failed to request user query synonyms, result type: ${d.type}, reason: ${p}`),"LocalSnippetProvider.parseUserQuery")}}a(uUe,"parseUserQuery");var ZM=class extends Error{static{a(this,"LocalSnippetProviderError")}constructor(e){super(String(e),{cause:e}),this.name="LocalSnippetProviderError"}},dUe=class{constructor(){this.providerType="local"}static{a(this,"LocalSnippetProvider")}snippetProviderStatus(e,r){if(!e.turn.workspaceFolder)return Promise.resolve("not_indexed");r===void 0&&(r=!0);let n=e.ctx,o=n.get(Rd),s=o.status(e.turn.workspaceFolder),c=n.get(pm),l=c.status(n,e.turn.workspaceFolder);if(s==="completed"&&l==="completed")return Promise.resolve("indexed");if(s==="started"||l==="started")return Promise.resolve("indexing");if(r){let u=e.turn.workspaceFolder;if(s==="notStarted")return Promise.race([o.chunk(n,u).then(d=>{if(o.status(u)==="completed")return c.initialize(n,u,d)}).then(()=>this.snippetProviderStatus(e,!1)),new Promise(d=>setTimeout(()=>d("not_indexed"),1e3))]);if(l==="notStarted"){let d=o.getChunks(u);return Promise.race([c.initialize(n,u,d).then(()=>this.snippetProviderStatus(e,!1)),new Promise(p=>setTimeout(()=>p("not_indexed"),1e3))])}}return Promise.resolve("not_indexed")}async collectLocalSnippets(e,r){let n=e.turn.workspaceFolder;if(!n)return[];let o=e.ctx,c=await o.get(Rd).chunkCount(n);if(c===0)return[];r.chunkCount=c;let l,u=performance.now();try{l=await uUe(e,e.cancelationToken)}catch(A){let y=new ZM(A);Lo(o,y,"LocalSnippetProvider.parseUserQuery")}let d=performance.now();if(r.synonymTimeMs=Math.floor(d-u),l===void 0)return[];let p=o.get(pm),h=[],m=performance.now();try{let A=await p.query(o,n,l);r.localSnippetCount=A.length,h=A}catch(A){let y=new ZM(A);Lo(o,y,"LocalSnippetProvider.rankingQuery")}let g=performance.now();return r.rankingTimeMs=Math.floor(g-m),h}async rerankLocalSnippets(e,r,n){let o=e.turn.workspaceFolder;if(!o)return[];let s=e.ctx,c=dn(e.turn.request.message),l=[];try{l=await qzr(s,o,c,r,5,e.cancelationToken,n)}catch(p){let h=new ZM(p);Lo(s,h,"LocalSnippetProvider.rerankSnippets")}let u=[],d=s.get(In);for(let p of l){let h=p.split("#")[0],m=await d.getOrReadTextDocument({uri:h}),g=r.find(A=>A.id===p);if(m.status==="valid"){let A=m.document.positionAt(g.range.start),y=m.document.positionAt(g.range.end),E=gc.range(A,y);u.push({uri:m.document.uri,range:E,snippet:g.chunk})}}return u}async provideSnippets(e){let r=this.collectInfoMessage(e);r&&await e.info(r);let n={...Ljr},o=await this.collectLocalSnippets(e,n);if(o.length===0)return{snippets:[],measurements:n};let s=e.ctx;return Ge.debug(s,`LocalSnippetProvider: First pass: Found ${o.length} snippets.`),{snippets:await this.rerankLocalSnippets(e,o,n),measurements:n}}collectInfoMessage(e){let r=e.turn.workspaceFolder;if(!r)return;let s=e.ctx.get(Rd).checkLimits(r);if(s.fileCountExceeded||s.chunkCountExceeded)return Go` Copilot has partially indexed this project as it exceeds the file limit. As a result, responses may have incomplete context. Consider excluding large, less relevant files or folders (e.g., large CSV files) to improve accuracy. -`}};f();f();f();f();var mo=class t{static{a(this,"Position")}constructor(e,r){this.lineNumber=e,this.column=r}with(e=this.lineNumber,r=this.column){return e===this.lineNumber&&r===this.column?this:new t(e,r)}delta(e=0,r=0){return this.with(this.lineNumber+e,this.column+r)}equals(e){return t.equals(this,e)}static equals(e,r){return!e&&!r?!0:!!e&&!!r&&e.lineNumber===r.lineNumber&&e.column===r.column}isBefore(e){return t.isBefore(this,e)}static isBefore(e,r){return e.lineNumbern||e===n&&r>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=r):(this.startLineNumber=e,this.startColumn=r,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.columne.endColumn)}static strictContainsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.column<=e.startColumn||r.lineNumber===e.endLineNumber&&r.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumn<=e.startColumn||r.endLineNumber===e.endLineNumber&&r.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,r){let n,o,s,c;return r.startLineNumbere.endLineNumber?(s=r.endLineNumber,c=r.endColumn):r.endLineNumber===e.endLineNumber?(s=r.endLineNumber,c=Math.max(r.endColumn,e.endColumn)):(s=e.endLineNumber,c=e.endColumn),new t(n,o,s,c)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,r){let n=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,c=e.endColumn,l=r.startLineNumber,u=r.startColumn,d=r.endLineNumber,p=r.endColumn;return nd?(s=d,c=p):s===d&&(c=Math.min(c,p)),n>s||n===s&&o>c?null:new t(n,o,s,c)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,r){return!e&&!r?!0:!!e&&!!r&&e.startLineNumber===r.startLineNumber&&e.startColumn===r.startColumn&&e.endLineNumber===r.endLineNumber&&e.endColumn===r.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new mo(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new mo(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,r){return new t(this.startLineNumber,this.startColumn,e,r)}setStartPosition(e,r){return new t(e,r,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,r=e){return new t(e.lineNumber,e.column,r.lineNumber,r.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,r){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};var jWr=250;function Tm(t){let e;if(typeof t.tokenBudget=="number"&&(e=Math.floor(t.tokenBudget/jWr)),typeof t.maxResults=="number"&&(e=typeof e=="number"?Math.min(t.maxResults,e):t.maxResults),typeof e!="number")throw new Error("Either maxResults or tokenBudget must be provided");return e}a(Tm,"getMaxChunks");var $Wr=32e3,VWr=2e4,mCe=.75;f();f();function Sm(t){let e=t.matchAll(/^\s*(```+)/gm),r=Math.max(3,...Array.from(e,n=>n[1].length+1));return"`".repeat(r)}a(Sm,"getFenceForCodeBlock");f();var xYr=de(jc()),wYr=de(Ef());f();var uC=class t{constructor(e){this.id=e}static{a(this,"EmbeddingType")}static{this.text3small_512=new t("text-embedding-3-small-512")}static{this.metis_1024_I16_Binary=new t("metis-1024-I16-Binary")}toString(){return this.id}equals(e){return this.id===e.id}};var $io=Object.freeze({[uC.text3small_512.id]:{model:"text-embedding-3-small",dimensions:512,quantization:{query:"float32",document:"float32"}},[uC.metis_1024_I16_Binary.id]:{model:"metis-I16-Binary",dimensions:1024,quantization:{query:"float16",document:"binary"}}});function ikt(t){return $io[t.id]}a(ikt,"getWellKnownEmbeddingTypeInfo");function Vio(t,e){let r=0,n=Math.min(t.length,e.length);for(let o=0;o({distance:gCe(l,t),value:c})).filter(c=>c.distance.value>o).sort((c,l)=>l.distance.value-c.distance.value).slice(0,r).map(c=>({distance:c.distance,value:c.value}));if(s.length&&typeof n?.maxSpread=="number"){let c=s.at(0).distance.value*(1-n.maxSpread);return s.filter(u=>u.distance.value>=c)}return s}a(izr,"rankEmbeddings");f();f();var RO=de(wc()),IYr=de(Ef());var Sk=new Se("GitHubCodeSearch"),Nco=300*1e3,KQe=class{constructor(e){this._indexedCommits=new Map;this._indexedRepos=new Map;this._ctx=e,this._refreshTimer=new RO.IntervalTimer,this.startPeriodicRefresh()}static{a(this,"GithubCodeSearchService")}getIndexedCommit(e){return this._indexedCommits.get(e)}setIndexedCommit(e,r){this._indexedCommits.get(e)!==r&&this._indexedCommits.set(e,r)}startPeriodicRefresh(){this._refreshTimer.cancelAndSet(()=>{this.updateIndexedRepoCommit()},Nco)}updateIndexedRepoCommit(){if(this._indexedRepos.size!==0)for(let[e,r]of this._indexedRepos.entries())this._indexedCommits.get(e)&&(async()=>{try{let o=await this._ctx.get(Ot).getGitHubSession();if(!o)return;let{currentStatus:s,indexedCommit:c}=await this.getRemoteIndexState(o,r,{isCancellationRequested:!1});if(s==="ready"&&c){let l=this._indexedCommits.get(e);l!==c&&(this._indexedCommits.set(e,c),Sk.info(this._ctx,`Updated indexed commit for ${r.owner}/${r.name}`,{oldCommit:l,newCommit:c}))}}catch(o){Sk.warn(this._ctx,`Failed to update indexed commit for ${e}`,o)}})()}async ensureReposIndexed(e,r,n){return await Promise.all(r.map(async o=>{let s=o?.baseFolder.uri;if(!s||n.isCancellationRequested||this._indexedRepos.has(s))return;let{currentStatus:c,indexedCommit:l}=await this.getRemoteIndexState(e,o,n);if(Sk.info(this._ctx,`Index status check for ${o.owner}/${o.name}`,{status:c,indexedCommit:l}),c==="ready")this._indexedRepos.set(s,o),l&&this.setIndexedCommit(s,l);else if(c==="not-yet-indexed")try{await this.tryToInstantIndexRepo(e,o,n),Sk.info(this._ctx,`Instant indexing completed for ${o.owner}/${o.name}`)}catch(u){Sk.warn(this._ctx,`Instant indexing failed for ${o.owner}/${o.name}`,u)}})),r.filter(o=>this._indexedRepos.has(o.baseFolder.uri))}async tryToInstantIndexRepo(e,r,n){await(0,RO.raceTimeout)((async()=>{if(!await(0,RO.raceCancellationError)(this.triggerIndexing(e,"auto",r,n),n))return!1;let c=5,l=1e3;for(;c-- >0;){await(0,RO.raceCancellationError)((0,RO.timeout)(l),n);let{currentStatus:u,indexedCommit:d}=await this.getRemoteIndexState(e,r,n);if(u==="ready"){this._indexedRepos.set(r.baseFolder.uri,r),d&&this.setIndexedCommit(r.baseFolder.uri,d);break}else if(u!=="building-index"){let p=`Instant indexing for '${r.owner}/${r.name}' failed. Found unexpected status: '${u}'`;throw Sk.error(this._ctx,p),new Error(p)}}return!0})(),8e3)}async getRemoteIndexState(e,r,n){if(!r.owner||!r.name)return{currentStatus:"not-indexable"};let o=r.owner+"/"+r.name,s=await mu(this._ctx,e,`repos/${o}/copilot_internal/embeddings_index`,{method:"GET"});if(!s.ok)return Sk.error(this._ctx,`Failed to fetch indexing status. Response: ${s.status}.`),{currentStatus:"not-yet-indexed"};let c=await s.json();return Sk.debug(this._ctx,`${o} - semantic_code_search_ok: ${c.semantic_code_search_ok}`),c.semantic_code_search_ok?{currentStatus:"ready",indexedCommit:c.semantic_commit_sha}:c.semantic_indexing_enabled?{currentStatus:"building-index"}:{currentStatus:"not-yet-indexed"}}async triggerIndexing(e,r,n,o){let s=die(this._ctx),c=n.owner+"/"+n.name,l=await mu(this._ctx,e,`repos/${c}/copilot_internal/embeddings_index`,{headers:s,method:"POST",json:{auto:r==="auto"}});return l.ok?!0:(Sk.error(this._ctx,`Failed to request indexing for '${c}'. Response: ${l.status}. ${await l.text()}`),!1)}async searchRepo(e,r,n,o,s,c){let l=die(this._ctx),u=await mu(this._ctx,e,"embeddings/code/search",{headers:l,method:"POST",json:{scoping_query:`repo:${n.owner}/${n.name}`,prompt:Mco(o,7800),include_embeddings:!1,limit:s,embedding_model:r.id}});if(!u.ok)throw new Error(`Code search semantic search failed with status: ${u.status}`);let d=await u.json();if(!Array.isArray(d.results))throw new Error("Code search semantic search unexpected response json shape");return Dco(this._ctx,d,n)}dispose(){this._refreshTimer.dispose(),this._indexedCommits.clear(),this._indexedRepos.clear()}};function die(t){let e=t.get(Nr);return{"X-Client-Application":`${G_(e.getEditorInfo())}`,"X-Client-Source":G_(e.getEditorPluginInfo()),"X-Client-Feature":"Agent <- codebaseTool"}}a(die,"editorVersionHeaders");async function Dco(t,e,r){let o=[],s=new uC(e.embedding_model),c=ha(r.baseFolder.uri);return await Promise.all(e.results.map(l=>{let u;try{u=Ti(c,l.location.path)}catch(d){Sk.error(t,`Error joining path for ${l.location.path}:`,d);return}o.push({chunk:{file:u,text:JQe(l.chunk.text),rawText:void 0,range:new IYr.Range(l.chunk.line_range.start+1,1,l.chunk.line_range.end+1,1),isFullFile:!1},distance:{embeddingType:s,value:l.distance}})})),{chunks:o,outOfSync:!1}}a(Dco,"parseGithubCodeSearchResponse");function Mco(t,e){if(t.length*4<=e)return t;let o=new TextEncoder().encode(t);if(o.length<=e)return t;let s=o.slice(0,e);return new TextDecoder().decode(s,{stream:!0})}a(Mco,"truncateToMaxUtf8Length");function JQe(t){let e=Oco(t);return e.length>=3&&e[0].startsWith("File: ")&&e[1].startsWith("```")&&e.at(-1)?.startsWith("```")?e.slice(2,-1).join(` -`):t}a(JQe,"stripChunkTextMetadata");function Oco(t){return t.split(/\r\n|\r|\n/)}a(Oco,"splitLines");var aw=de(wc()),RYr=de(tie()),PYr=de(C0());var DCe=new Se("ChunkingEndpointClient"),MNt=class t{constructor(e){this.ctx=e;this._maxParallelChunksRequests=8;this._maxAttempts=3;this.targetQuota=80;this.requestQueue=new RYr.LinkedList;this._numberInFlightRequests=0;this._lastSendTime=Date.now();this._isPumping=!1}static{a(this,"RequestRateLimiter")}static{this._abuseLimit=1e3/40}async enqueue(e,r){let n=new aw.DeferredPromise;return r.onCancellationRequested(()=>n.cancel()),this.requestQueue.push({task:e,attempt:0,deferred:n,token:r}),await this.pump(),n.p}async pump(){if(!this._isPumping)try{for(this._isPumping=!0;!this.requestQueue.isEmpty();){this._rateLimitTimeout&&(await this._rateLimitTimeout,this._rateLimitTimeout=void 0);let e=Date.now()-this._lastSendTime;if(e=this._maxParallelChunksRequests){await(0,aw.timeout)(10);continue}if(this._latestRateLimitHint){let o=Date.now();if(othis.targetQuota){let o=Date.now(),s=this._latestQuotaUsed.quota-this.targetQuota,c=o-this._latestQuotaUsed.timestamp,l=2500,u=1e3,d=s/(100-this.targetQuota);d*=Math.max(1-c/l,0);let p=d*u;p>0&&await(0,aw.timeout)(Math.min(p,u))}let r=this.requestQueue.shift();if(r.token.isCancellationRequested){await r.deferred.cancel();continue}this._numberInFlightRequests++,this._lastSendTime=Date.now(),r.task(r.attempt).then(async o=>{if(this.updateQuotasFromResponse(o),r.token.isCancellationRequested){await r.deferred.cancel();return}if(o.ok){await r.deferred.complete(o);return}if(r.attempt0&&(this._rateLimitTimeout=(0,aw.timeout)(s*1e3)),this.requestQueue.unshift({task:r.task,attempt:r.attempt+1,deferred:r.deferred,token:r.token}),await this.pump();return}await r.deferred.complete(o)}).catch(async o=>{await r.deferred.error(o)}).finally(()=>{this._numberInFlightRequests--})}}finally{this._isPumping=!1}}updateQuotasFromResponse(e){let r=Date.now();try{let n=e.headers.get("x-ratelimit-remaining"),o=e.headers.get("x-ratelimit-reset");n&&o&&(this._latestRateLimitHint={timestamp:r,remaining:parseFloat(n),resetAt:parseFloat(o)*1e3});let s=e.headers.get("x-github-total-quota-used");s&&(this._latestQuotaUsed?this._latestQuotaUsed={timestamp:r,quota:parseFloat(s)}:this._latestQuotaUsed={timestamp:r,quota:parseFloat(s)})}catch(n){DCe.error(this.ctx,"Error parsing rate limit/quota headers",n)}}getRequestRetryDelay(e){try{let r=e.headers.get("retry-after");if(r){let n=parseFloat(r);if(!isNaN(n))return n}}catch{DCe.error(this.ctx,"Error parsing retry-after header")}try{let r=e.headers.get("x-ratelimit-reset");if(r){let n=parseFloat(r);if(!isNaN(n)){let o=Math.floor(Date.now()/1e3);return n-o}}}catch{DCe.error(this.ctx,"Error parsing x-ratelimit-reset header")}return e.status===408?.25:2}},XQe=class{constructor(e){this.ctx=e;this._requestLimiter=new MNt(e)}static{a(this,"ChunkingEndpointClientImpl")}computeChunks(e,r,n,o,s,c,l){return this.doComputeChunksAndEmbeddings(e,r,n,o,{qos:s,computeEmbeddings:!1},c,l)}async computeChunksAndEmbeddings(e,r,n,o,s,c,l){return await this.doComputeChunksAndEmbeddings(e,r,n,o,{qos:s,computeEmbeddings:!0},c,l)}async doComputeChunksAndEmbeddings(e,r,n,o,s,c,l){let u=await(0,aw.raceCancellationError)(n.getText(),l);if((0,PYr.isFalsyOrWhitespace)(u))return[];try{let d=a(async m=>{let g=die(this.ctx);return await mu(this.ctx,e,"chunks",{headers:g,method:"POST",json:{embed:s.computeEmbeddings,qos:s.qos,content:u,path:Eo(n.uri),local_hashes:c?Array.from(c.keys()):[],embedding_model:r.id}})},"makeRequest");o.recomputedFileCount++,o.sentContentTextLength+=u.length;let p=await(0,aw.raceCancellationError)(this._requestLimiter.enqueue(d,l),l);if(!p.ok){DCe.error(this.ctx,`Error chunking '${n.uri.toString()}'. Status: ${p.status}.`);return}let h=await p.json();return h.chunks.length?(0,xYr.coalesce)(h.chunks.map(m=>{let g=new wYr.Range(m.line_range.start+1,1,m.line_range.end+1,1),A=c?.get(m.hash);if(A)return{chunk:{file:n.uri.toString(),text:JQe(A.chunk.text),rawText:void 0,range:g,isFullFile:A.chunk.isFullFile},chunkHash:m.hash,embedding:A.embedding};if(typeof m.text!="string")return;let y;if(m.embedding?.embedding){let E=new uC(h.embedding_model);if(!E.equals(r))throw new Error(`Unexpected embedding model. Got: ${E.id}. Expected: ${r.id}`);y={type:E,value:m.embedding.embedding}}if(!(s.computeEmbeddings&&!y))return{chunk:{file:n.uri.toString(),text:JQe(m.text),rawText:void 0,range:g,isFullFile:!1},chunkHash:m.hash,embedding:y}})):[]}catch(d){DCe.error(this.ctx,`Error chunking '${n.uri.toString()}'`,d);return}}};f();f();var Yg={Tfidf:"semantic.search.tfidf",Embeddings:"semantic.search.embeddings",Remote:"semantic.search.remote",Aggregate:"semantic.search.aggregate"},Cp=class t{static{a(this,"WorkspaceChunkSearchTelemetry")}static sendSuccess(e,r,n,o){let s={status_text:"success",...n},c=yt.createAndMarkAsIssued(s,o);at(e,r,c),Kn(e,r,c)}static sendFailure(e,r,n){let o={status_text:"failure"};qo(e,n,r,o),_u(e,r,n,o)}static sendTfidfSuccess(e,r,n,o,s,c,l,u,d){t.sendSuccess(e,Yg.Tfidf,{source:d},{timeTakenMs:r,rankingTimeMs:n,rerankingTimeMs:o,localSnippetCount:l,chunkCount:s,fileCount:c,totalFileCount:u})}static sendTfidfFailure(e,r){t.sendSearchFailure(e,Yg.Tfidf,r)}static sendEmbeddingsSuccess(e,r,n,o,s,c,l){t.sendSuccess(e,Yg.Embeddings,{source:l},{timeTakenMs:r,embeddingsTimeMs:n,chunkCount:o,fileCount:s,totalFileCount:c})}static sendEmbeddingsFailure(e,r){t.sendSearchFailure(e,Yg.Embeddings,r)}static sendEmbeddingsSkipped(e,r){t.sendSkipped(e,Yg.Embeddings,r)}static sendRemoteSuccess(e,r,n,o,s){t.sendSuccess(e,Yg.Remote,{provider:s},{timeTakenMs:r,chunkCount:n,fileCount:o})}static sendRemoteFailure(e,r){t.sendSearchFailure(e,Yg.Remote,r)}static sendRemoteSkipped(e,r){t.sendSkipped(e,Yg.Remote,r)}static sendSearchFailure(e,r,n){t.sendFailure(e,r,n)}static sendSkipped(e,r,n){let o={status_text:"skipped",reason:n},s=yt.createAndMarkAsIssued(o,{});at(e,r,s),Kn(e,r,s)}static sendAggregateSuccess(e,r,n,o,s,c,l){t.sendSuccess(e,Yg.Aggregate,{provider:r,source:l},{timeTakenMs:n,chunkCount:o,fileCount:s,workspaceCount:c})}static sendAggregateFailure(e,r){t.sendFailure(e,Yg.Aggregate,r)}};var kYr=de(jc()),NYr=de(wc()),ONt=de(Ck());var PO=new Se("Remote Search"),ZQe=class{constructor(e,r,n,o){this.ctx=e;this._embeddingType=r;this._localDiffSearch=n;this._githubCodeSearchService=o;this.id="codesearch";this.localDiffSearchTimeout=15e3}static{a(this,"CodeSearchChunkSearch")}async isAvailable(e){return(await this.getRepos(e)).length>0}async getRepos(e){if(!e?.length)return[];let r=this.ctx.get(Em),o=(await Promise.all(e.map(async c=>await r.getRepo({uri:c})))).filter(c=>c!==void 0).filter(c=>c.isGitHub()&&c.owner&&c.name),s=new Map;for(let c of o){let l=`${c.owner}/${c.name}`;s.has(l)||s.set(l,c)}return Array.from(s.values())}async searchWorkspace(e,r,n){let o=new ONt.StopWatch,s=await this.getRepos(r.workspaceFolders);if(PO.info(this.ctx,"Starting workspace search",{rawQuery:e.rawQuery,repoCount:s.length,repos:s.map(P=>`${P.owner}/${P.name}`),maxResults:Tm(r)}),s.length===0)throw PO.error(this.ctx,"No GitHub repositories found"),Cp.sendRemoteSkipped(this.ctx,"no_github_repos"),new Error("No GitHub repositories found in CodeSearchChunkSearch");let c=await this.ctx.get(Ot).getGitHubSession();if(!c)throw PO.error(this.ctx,"No GitHub session found"),Cp.sendRemoteSkipped(this.ctx,"no_github_session"),new Error("No GitHub session found in CodeSearchChunkSearch");let l=await this._githubCodeSearchService.ensureReposIndexed(c,s,n);if(l.length===0)throw PO.error(this.ctx,"Remote index not ready for any repositories"),Cp.sendRemoteSkipped(this.ctx,"remote_index_not_ready"),new Error("Remote index not ready");let u=Tm(r),d=Promise.all(l.map(async P=>{l0(n);let k=await e.resolveQuery(n),Q=new ONt.StopWatch,M=await this._githubCodeSearchService.searchRepo(c,this._embeddingType,P,k,u,n);return PO.info(this.ctx,`Search completed for ${P.owner}/${P.name}`,{searchTime:Q.elapsed(),chunkCount:M.chunks.length}),M})),p=await this._localDiffSearch.getLocalDiff(r.workspaceFolders),h=new Set(p),m=this._localDiffSearch.shouldDoLocalDiffSearch(p,r.workspaceFolders);PO.info(this.ctx,"Local diff files detected",{diffFileCount:p.length,allowLocalDiffSearch:m});let g;m&&(g=(0,NYr.raceTimeout)(this._localDiffSearch.searchLocalDiff(p,e,r,n),this.localDiffSearchTimeout,()=>{PO.warn(this.ctx,"Local diff search timed out",{timeout:this.localDiffSearchTimeout})}));let[A,y]=await Promise.all([d,g?.catch(P=>{PO.error(this.ctx,"Local diff search failed",P)})??Promise.resolve(void 0)]),E=(0,kYr.coalesce)(A).flatMap(P=>P.chunks),_=y?.isOk()?y.val.result.chunks:[],v=_.length>0?[...E.filter(P=>!h.has(P.chunk.file)),..._]:E,b=v.length,x=new Set(v.map(P=>P.chunk.file)).size,R=o.elapsed();PO.info(this.ctx,`Search completed successfully in ${R}ms`,{totalTime:R,totalChunkCount:b,uniqueFileCount:x,indexedRepoCount:l.length,localDiffChunkCount:_.length,localDiffStrategy:y?.isOk()?y.val.strategy:"none"});let w=y?.isOk()?"mixed":"codesearch";return Cp.sendRemoteSuccess(this.ctx,R,b,x,w),{chunks:v}}};f();f();var bXr=require("node:url"),TXr=require("path");f();var vKr=require("node:buffer"),gqe=de(MYr(),1),pqe=de(qYr(),1),fJr=require("child_process"),KJr=de(UNt(),1),aXr=require("node:path"),gie=de(UNt(),1),vXr=require("node:events");var cDt=Object.defineProperty,clo=Object.getOwnPropertyDescriptor,lDt=Object.getOwnPropertyNames,llo=Object.prototype.hasOwnProperty,Pr=a((t,e)=>a(function(){return t&&(e=(0,t[lDt(t)[0]])(t=0)),e},"__init"),"__esm"),ulo=a((t,e)=>a(function(){return e||(0,t[lDt(t)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),_0=a((t,e)=>{for(var r in e)cDt(t,r,{get:e[r],enumerable:!0})},"__export"),dlo=a((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lDt(e))!llo.call(t,o)&&o!==r&&cDt(t,o,{get:a(()=>e[o],"get"),enumerable:!(n=clo(e,o))||n.enumerable});return t},"__copyProps"),Tf=a(t=>dlo(cDt({},"__esModule",{value:!0}),t),"__toCommonJS");function VNt(...t){let e=new String(t);return mqe.set(e,t),e}a(VNt,"pathspec");function BCe(t){return t instanceof String&&mqe.has(t)}a(BCe,"isPathSpec");function GYr(t){return mqe.get(t)||[]}a(GYr,"toPaths");var mqe,yie=Pr({"src/lib/args/pathspec.ts"(){"use strict";mqe=new WeakMap}}),NO,BF=Pr({"src/lib/errors/git-error.ts"(){"use strict";NO=class extends Error{static{a(this,"GitError")}constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),UCe,Eie=Pr({"src/lib/errors/git-response-error.ts"(){"use strict";BF(),UCe=class extends NO{static{a(this,"GitResponseError")}constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),CKr,_Kr=Pr({"src/lib/errors/task-configuration-error.ts"(){"use strict";BF(),CKr=class extends NO{static{a(this,"TaskConfigurationError")}constructor(t){super(void 0,t)}}}});function bKr(t){return typeof t!="function"?R$:t}a(bKr,"asFunction");function TKr(t){return typeof t=="function"&&t!==R$}a(TKr,"isUserFunction");function SKr(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}a(SKr,"splitOn");function IKr(t,e=0){return xKr(t)&&t.length>e?t[e]:void 0}a(IKr,"first");function w$(t,e=0){if(xKr(t)&&t.length>e)return t[t.length-1-e]}a(w$,"last");function xKr(t){return Cqe(t)}a(xKr,"isArrayLike");function QCe(t="",e=!0,r=` -`){return t.split(r).reduce((n,o)=>{let s=e?o.trim():o;return s&&n.push(s),n},[])}a(QCe,"toLinesWithContent");function uDt(t,e){return QCe(t,!0).map(r=>e(r))}a(uDt,"forEachLineWithContent");function dDt(t){return(0,gqe.exists)(t,gqe.FOLDER)}a(dDt,"folderExists");function jT(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}a(jT,"append");function wKr(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}a(wKr,"including");function Aqe(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}a(Aqe,"remove");function Ik(t){return Array.isArray(t)?t:[t]}a(Ik,"asArray");function RKr(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}a(RKr,"asCamelCase");function Cie(t){return Ik(t).map(e=>e instanceof String?e:String(e))}a(Cie,"asStringArray");function fl(t,e=0){if(t==null)return e;let r=parseInt(t,10);return Number.isNaN(r)?e:r}a(fl,"asNumber");function LCe(t,e){let r=[];for(let n=0,o=t.length;n{t[n]!==void 0&&(r[n]=t[n])}),r}a(PKr,"pick");function WNt(t=0){return new Promise(e=>setTimeout(e,t))}a(WNt,"delay");function zNt(t){if(t!==!1)return t}a(zNt,"orVoid");var Aie,R$,qCe,yqe=Pr({"src/lib/utils/util.ts"(){"use strict";fDt(),Aie="\0",R$=a(()=>{},"NOOP"),qCe=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Kg(t,e,r){return e(t)?t:arguments.length>2?r:void 0}a(Kg,"filterType");function YNt(t,e){let r=BCe(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}a(YNt,"filterPrimitives");function Eqe(t){return!!t&&qCe(t)==="[object Object]"}a(Eqe,"filterPlainObject");function kKr(t){return typeof t=="function"}a(kKr,"filterFunction");var GCe,NKr,Qd,dqe,Cqe,fDt=Pr({"src/lib/utils/argument-filters.ts"(){"use strict";yie(),yqe(),GCe=a(t=>Array.isArray(t),"filterArray"),NKr=a(t=>typeof t=="number","filterNumber"),Qd=a(t=>typeof t=="string"||BCe(t),"filterString"),dqe=a(t=>Qd(t)||Array.isArray(t)&&t.every(Qd),"filterStringOrStringArray"),Cqe=a(t=>t==null||"number|boolean|function".includes(typeof t)?!1:typeof t.length=="number","filterHasLength")}}),KNt,flo=Pr({"src/lib/utils/exit-codes.ts"(){"use strict";KNt=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(KNt||{})}}),fqe,plo=Pr({"src/lib/utils/git-output-streams.ts"(){"use strict";fqe=class DKr{static{a(this,"_GitOutputStreams")}constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new DKr(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function hlo(){throw new Error("LineParser:useMatches not implemented")}a(hlo,"useMatchesDefault");var Zi,OF,mlo=Pr({"src/lib/utils/line-parser.ts"(){"use strict";Zi=class{static{a(this,"LineParser")}constructor(t,e){this.matches=[],this.useMatches=hlo,this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((o,s)=>this.addMatch(o,s,r(s)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let n=r&&t.exec(r);return n&&this.pushMatch(e,n),!!n}pushMatch(t,e){this.matches.push(...e.slice(1))}},OF=class extends Zi{static{a(this,"RemoteLineParser")}addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function MKr(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...OKr},...t.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}a(MKr,"createInstanceConfig");var OKr,glo=Pr({"src/lib/utils/simple-git-options.ts"(){"use strict";OKr={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function pDt(t,e=[]){return Eqe(t)?Object.keys(t).reduce((r,n)=>{let o=t[n];if(BCe(o))r.push(o);else if(YNt(o,["boolean"]))r.push(n+"="+o);else if(Array.isArray(o))for(let s of o)YNt(s,["string","number"])||r.push(n+"="+s);else r.push(n);return r},e):e}a(pDt,"appendTaskOptions");function my(t,e=0,r=!1){let n=[];for(let o=0,s=e<0?t.length:e;o{for(let s=QCe(o,n),c=0,l=s.length;c{if(!(c+d>=l))return s[c+d]},"line");e.some(({parse:d})=>d(u,t))}}),t}a(AC,"parseStringResponse");var Elo=Pr({"src/lib/utils/task-parser.ts"(){"use strict";yqe()}}),BKr={};_0(BKr,{ExitCodes:a(()=>KNt,"ExitCodes"),GitOutputStreams:a(()=>fqe,"GitOutputStreams"),LineParser:a(()=>Zi,"LineParser"),NOOP:a(()=>R$,"NOOP"),NULL:a(()=>Aie,"NULL"),RemoteLineParser:a(()=>OF,"RemoteLineParser"),append:a(()=>jT,"append"),appendTaskOptions:a(()=>pDt,"appendTaskOptions"),asArray:a(()=>Ik,"asArray"),asCamelCase:a(()=>RKr,"asCamelCase"),asFunction:a(()=>bKr,"asFunction"),asNumber:a(()=>fl,"asNumber"),asStringArray:a(()=>Cie,"asStringArray"),bufferToString:a(()=>FCe,"bufferToString"),callTaskParser:a(()=>JNt,"callTaskParser"),createInstanceConfig:a(()=>MKr,"createInstanceConfig"),delay:a(()=>WNt,"delay"),filterArray:a(()=>GCe,"filterArray"),filterFunction:a(()=>kKr,"filterFunction"),filterHasLength:a(()=>Cqe,"filterHasLength"),filterNumber:a(()=>NKr,"filterNumber"),filterPlainObject:a(()=>Eqe,"filterPlainObject"),filterPrimitives:a(()=>YNt,"filterPrimitives"),filterString:a(()=>Qd,"filterString"),filterStringOrStringArray:a(()=>dqe,"filterStringOrStringArray"),filterType:a(()=>Kg,"filterType"),first:a(()=>IKr,"first"),folderExists:a(()=>dDt,"folderExists"),forEachLineWithContent:a(()=>uDt,"forEachLineWithContent"),getTrailingOptions:a(()=>my,"getTrailingOptions"),including:a(()=>wKr,"including"),isUserFunction:a(()=>TKr,"isUserFunction"),last:a(()=>w$,"last"),objectToString:a(()=>qCe,"objectToString"),orVoid:a(()=>zNt,"orVoid"),parseStringResponse:a(()=>AC,"parseStringResponse"),pick:a(()=>PKr,"pick"),prefixedArray:a(()=>LCe,"prefixedArray"),remove:a(()=>Aqe,"remove"),splitOn:a(()=>SKr,"splitOn"),toLinesWithContent:a(()=>QCe,"toLinesWithContent"),trailingFunctionArgument:a(()=>Pu,"trailingFunctionArgument"),trailingOptionsArgument:a(()=>hDt,"trailingOptionsArgument")});var Di=Pr({"src/lib/utils/index.ts"(){"use strict";fDt(),flo(),plo(),mlo(),glo(),ylo(),Elo(),yqe()}}),LKr={};_0(LKr,{CheckRepoActions:a(()=>XNt,"CheckRepoActions"),checkIsBareRepoTask:a(()=>UKr,"checkIsBareRepoTask"),checkIsRepoRootTask:a(()=>FKr,"checkIsRepoRootTask"),checkIsRepoTask:a(()=>Clo,"checkIsRepoTask")});function Clo(t){switch(t){case"bare":return UKr();case"root":return FKr()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:_qe,parser:mDt}}a(Clo,"checkIsRepoTask");function FKr(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:_qe,parser(e){return/^\.(git)?$/.test(e.trim())}}}a(FKr,"checkIsRepoRootTask");function UKr(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:_qe,parser:mDt}}a(UKr,"checkIsBareRepoTask");function _lo(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}a(_lo,"isNotRepoMessage");var XNt,_qe,mDt,QKr=Pr({"src/lib/tasks/check-is-repo.ts"(){"use strict";Di(),XNt=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(XNt||{}),_qe=a(({exitCode:t},e,r,n)=>{if(t===128&&_lo(e))return r(Buffer.from("false"));n(e)},"onError"),mDt=a(t=>t.trim()==="true","parser")}});function vlo(t,e){let r=new qKr(t),n=t?HKr:GKr;return QCe(e).forEach(o=>{let s=o.replace(n,"");r.paths.push(s),(jKr.test(s)?r.folders:r.files).push(s)}),r}a(vlo,"cleanSummaryParser");var qKr,GKr,HKr,jKr,blo=Pr({"src/lib/responses/CleanSummary.ts"(){"use strict";Di(),qKr=class{static{a(this,"CleanResponse")}constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},GKr=/^[a-z]+\s*/i,HKr=/^[a-z]+\s+[a-z]+\s*/i,jKr=/\/$/}}),ZNt={};_0(ZNt,{EMPTY_COMMANDS:a(()=>vqe,"EMPTY_COMMANDS"),adhocExecTask:a(()=>$Kr,"adhocExecTask"),configurationErrorTask:a(()=>gC,"configurationErrorTask"),isBufferTask:a(()=>WKr,"isBufferTask"),isEmptyTask:a(()=>zKr,"isEmptyTask"),straightThroughBufferTask:a(()=>VKr,"straightThroughBufferTask"),straightThroughStringTask:a(()=>gy,"straightThroughStringTask")});function $Kr(t){return{commands:vqe,format:"empty",parser:t}}a($Kr,"adhocExecTask");function gC(t){return{commands:vqe,format:"empty",parser(){throw typeof t=="string"?new CKr(t):t}}}a(gC,"configurationErrorTask");function gy(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}a(gy,"straightThroughStringTask");function VKr(t){return{commands:t,format:"buffer",parser(e){return e}}}a(VKr,"straightThroughBufferTask");function WKr(t){return t.format==="buffer"}a(WKr,"isBufferTask");function zKr(t){return t.format==="empty"||!t.commands.length}a(zKr,"isEmptyTask");var vqe,Sf=Pr({"src/lib/tasks/task.ts"(){"use strict";_Kr(),vqe=[]}}),YKr={};_0(YKr,{CONFIG_ERROR_INTERACTIVE_MODE:a(()=>gDt,"CONFIG_ERROR_INTERACTIVE_MODE"),CONFIG_ERROR_MODE_REQUIRED:a(()=>ADt,"CONFIG_ERROR_MODE_REQUIRED"),CONFIG_ERROR_UNKNOWN_OPTION:a(()=>yDt,"CONFIG_ERROR_UNKNOWN_OPTION"),CleanOptions:a(()=>aqe,"CleanOptions"),cleanTask:a(()=>KKr,"cleanTask"),cleanWithOptionsTask:a(()=>Tlo,"cleanWithOptionsTask"),isCleanOptionsArray:a(()=>Slo,"isCleanOptionsArray")});function Tlo(t,e){let{cleanMode:r,options:n,valid:o}=Ilo(t);return r?o.options?(n.push(...e),n.some(Rlo)?gC(gDt):KKr(r,n)):gC(yDt+JSON.stringify(t)):gC(ADt)}a(Tlo,"cleanWithOptionsTask");function KKr(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(n){return vlo(t==="n",n)}}}a(KKr,"cleanTask");function Slo(t){return Array.isArray(t)&&t.every(e=>EDt.has(e))}a(Slo,"isCleanOptionsArray");function Ilo(t){let e,r=[],n={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(o=>{xlo(o)?(e=o,n.cleanMode=!0):n.options=n.options&&wlo(r[r.length]=`-${o}`)}),{cleanMode:e,options:r,valid:n}}a(Ilo,"getCleanOptions");function xlo(t){return t==="f"||t==="n"}a(xlo,"isCleanMode");function wlo(t){return/^-[a-z]$/i.test(t)&&EDt.has(t.charAt(1))}a(wlo,"isKnownOption");function Rlo(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}a(Rlo,"isInteractiveMode");var gDt,ADt,yDt,aqe,EDt,JKr=Pr({"src/lib/tasks/clean.ts"(){"use strict";blo(),Di(),Sf(),gDt="Git clean interactive mode is not supported",ADt='Git clean mode parameter ("n" or "f") is required',yDt="Git clean unknown option found in: ",aqe=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(aqe||{}),EDt=new Set(["i",...Cie(Object.values(aqe))])}});function Plo(t){let e=new ZKr;for(let r of XKr(t))e.addValue(r.file,String(r.key),r.value);return e}a(Plo,"configListParser");function klo(t,e){let r=null,n=[],o=new Map;for(let s of XKr(t,e))s.key===e&&(n.push(r=s.value),o.has(s.file)||o.set(s.file,[]),o.get(s.file).push(r));return{key:e,paths:Array.from(o.keys()),scopes:o,value:r,values:n}}a(klo,"configGetParser");function Nlo(t){return t.replace(/^(file):/,"")}a(Nlo,"configFilePath");function*XKr(t,e=null){let r=t.split("\0");for(let n=0,o=r.length-1;nObject.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=w$(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let n=this.addFile(t);Object.hasOwn(n,e)?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r,this._all=void 0}}}});function QNt(t,e){return typeof t=="string"&&Object.hasOwn(eDt,t)?t:e}a(QNt,"asConfigScope");function Mlo(t,e,r,n){let o=["config",`--${n}`];return r&&o.push("--add"),o.push(t,e),{commands:o,format:"utf-8",parser(s){return s}}}a(Mlo,"addConfigTask");function Olo(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(n){return klo(n,t)}}}a(Olo,"getConfigTask");function Blo(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return Plo(r)}}}a(Blo,"listConfigTask");function Llo(){return{addConfig(t,e,...r){return this._runTask(Mlo(t,e,r[0]===!0,QNt(r[1],"local")),Pu(arguments))},getConfig(t,e){return this._runTask(Olo(t,QNt(e,void 0)),Pu(arguments))},listConfig(...t){return this._runTask(Blo(QNt(t[0],void 0)),Pu(arguments))}}}a(Llo,"config_default");var eDt,eJr=Pr({"src/lib/tasks/config.ts"(){"use strict";Dlo(),Di(),eDt=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(eDt||{})}});function Flo(t){return tJr.has(t)}a(Flo,"isDiffNameStatus");var qNt,tJr,rJr=Pr({"src/lib/tasks/diff-name-status.ts"(){"use strict";qNt=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(qNt||{}),tJr=new Set(Object.values(qNt))}});function Ulo(...t){return new iJr().param(...t)}a(Ulo,"grepQueryBuilder");function Qlo(t){let e=new Set,r={};return uDt(t,n=>{let[o,s,c]=n.split(Aie);e.add(o),(r[o]=r[o]||[]).push({line:fl(s),path:o,preview:c})}),{paths:e,results:r}}a(Qlo,"parseGrep");function qlo(){return{grep(t){let e=Pu(arguments),r=my(arguments);for(let o of nJr)if(r.includes(o))return this._runTask(gC(`git.grep: use of "${o}" is not supported.`),e);typeof t=="string"&&(t=Ulo().param(t));let n=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:n,format:"utf-8",parser(o){return Qlo(o)}},e)}}}a(qlo,"grep_default");var nJr,MCe,HYr,iJr,oJr=Pr({"src/lib/tasks/grep.ts"(){"use strict";Di(),Sf(),nJr=["-h"],MCe=Symbol("grepQuery"),iJr=class{static{a(this,"GrepQuery")}constructor(){this[HYr]=[]}*[(HYr=MCe,Symbol.iterator)](){for(let t of this[MCe])yield t}and(...t){return t.length&&this[MCe].push("--and","(",...LCe(t,"-e"),")"),this}param(...t){return this[MCe].push(...LCe(t,"-e")),this}}}}),sJr={};_0(sJr,{ResetMode:a(()=>cqe,"ResetMode"),getResetMode:a(()=>Hlo,"getResetMode"),resetTask:a(()=>Glo,"resetTask")});function Glo(t,e){let r=["reset"];return aJr(t)&&r.push(`--${t}`),r.push(...e),gy(r)}a(Glo,"resetTask");function Hlo(t){if(aJr(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}a(Hlo,"getResetMode");function aJr(t){return typeof t=="string"&&cJr.includes(t)}a(aJr,"isValidResetMode");var cqe,cJr,lJr=Pr({"src/lib/tasks/reset.ts"(){"use strict";Di(),Sf(),cqe=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(cqe||{}),cJr=Cie(Object.values(cqe))}});function jlo(){return(0,pqe.default)("simple-git")}a(jlo,"createLog");function jYr(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(n,...o)=>{t(n,...o),r(n,...o)}:t:(n,...o)=>{t(`%s ${n}`,e,...o),r&&r(n,...o)}}a(jYr,"prefixedLogger");function $lo(t,e,{namespace:r}){if(typeof t=="string")return t;let n=e&&e.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}a($lo,"childLoggerName");function CDt(t,e,r,n=jlo()){let o=t&&`[${t}]`||"",s=[],c=typeof e=="string"?n.extend(e):e,l=$lo(Kg(e,Qd),c,n);return d(r);function u(p,h){return jT(s,CDt(t,l.replace(/^[^:]+/,p),h,n))}function d(p){let h=p&&`[${p}]`||"",m=c&&jYr(c,h)||R$,g=jYr(n,`${o} ${h}`,m);return Object.assign(c?m:g,{label:t,sibling:u,info:g,step:d})}}a(CDt,"createLogger");var uJr=Pr({"src/lib/git-logger.ts"(){"use strict";Di(),pqe.default.formatters.L=t=>String(Cqe(t)?t.length:"-"),pqe.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):qCe(t)}}),dJr,Vlo=Pr({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";BF(),uJr(),dJr=class tDt{static{a(this,"_TasksPendingQueue")}constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let r=tDt.getName(e.commands[0]),n=CDt(this.logLabel,r);return{task:e,logger:n,name:r}}push(e){let r=this.createProgress(e);return r.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,r),r}fatal(e){for(let[r,{logger:n}]of Array.from(this._queue.entries()))r===e.task?(n.info("Failed %o",e),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(r);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let r=this.withProgress(e);if(!r)throw new NO(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(e="empty"){return`task:${e}:${++tDt.counter}`}static{this.counter=0}}}});function x$(t,e){return{method:IKr(t.commands)||"",commands:e}}a(x$,"pluginContext");function Wlo(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(Buffer.from(String(r.stack),"ascii"))}}a(Wlo,"onErrorReceived");function $Yr(t,e,r,n){return o=>{r("%s received %L bytes",e,o),n("%B",o),t.push(o)}}a($Yr,"onDataReceived");var rDt,zlo=Pr({"src/lib/runners/git-executor-chain.ts"(){"use strict";BF(),Sf(),Di(),Vlo(),rDt=class{static{a(this,"GitExecutorChain")}constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new dJr}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}async attemptTask(t){let e=await this._scheduler.next(),r=a(()=>this._queue.complete(t),"onQueueComplete");try{let{logger:n}=this._queue.attempt(t);return await(zKr(t)?this.attemptEmptyTask(t,n):this.attemptRemoteTask(t,n))}catch(n){throw this.onFatalException(t,n)}finally{r(),e()}}onFatalException(t,e){let r=e instanceof NO?Object.assign(e,{task:t}):new NO(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(t,e){let r=this._plugins.exec("spawn.binary","",x$(t,t.commands)),n=this._plugins.exec("spawn.args",[...t.commands],x$(t,t.commands)),o=await this.gitResponse(t,r,n,this.outputHandler,e.step("SPAWN")),s=await this.handleTaskData(t,n,o,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),WKr(t)?JNt(t.parser,s):JNt(t.parser,s.asStrings())}async attemptEmptyTask(t,e){return e("empty task bypassing child process to call to task's parser"),t.parser(this)}handleTaskData(t,e,r,n){let{exitCode:o,rejection:s,stdOut:c,stdErr:l}=r;return new Promise((u,d)=>{n("Preparing to handle process response exitCode=%d stdOut=",o);let{error:p}=this._plugins.exec("task.error",{error:s},{...x$(t,e),...r});if(p&&t.onError)return n.info("exitCode=%s handling with custom error handler"),t.onError(r,p,h=>{n.info("custom error handler treated as success"),n("custom error returned a %s",qCe(h)),u(new fqe(Array.isArray(h)?Buffer.concat(h):h,Buffer.concat(l)))},d);if(p)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",o,l.length,s),d(p);n.info("retrieving task output complete"),u(new fqe(Buffer.concat(c),Buffer.concat(l)))})}async gitResponse(t,e,r,n,o){let s=o.sibling("output"),c=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},x$(t,t.commands));return new Promise(l=>{let u=[],d=[];o.info("%s %o",e,r),o("%O",c);let p=this._beforeSpawn(t,r);if(p)return l({stdOut:u,stdErr:d,exitCode:9901,rejection:p});this._plugins.exec("spawn.before",void 0,{...x$(t,r),kill(m){p=m||p}});let h=(0,fJr.spawn)(e,r,c);h.stdout.on("data",$Yr(u,"stdOut",o,s.step("stdOut"))),h.stderr.on("data",$Yr(d,"stdErr",o,s.step("stdErr"))),h.on("error",Wlo(d,o)),n&&(o("Passing child process stdOut/stdErr to custom outputHandler"),n(e,h.stdout,h.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...x$(t,r),spawned:h,close(m,g){l({stdOut:u,stdErr:d,exitCode:m,rejection:p||g})},kill(m){h.killed||(p=m,h.kill("SIGINT"))}})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,{...x$(t,e),kill(n){r=n||r}}),r}}}}),pJr={};_0(pJr,{GitExecutor:a(()=>hJr,"GitExecutor")});var hJr,Ylo=Pr({"src/lib/runners/git-executor.ts"(){"use strict";zlo(),hJr=class{static{a(this,"GitExecutor")}constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new rDt(this,this._scheduler,this._plugins)}chain(){return new rDt(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function Klo(t,e,r=R$){let n=a(s=>{r(null,s)},"onSuccess"),o=a(s=>{s?.task===t&&r(s instanceof UCe?Jlo(s):s,void 0)},"onError2");e.then(n,o)}a(Klo,"taskCallback");function Jlo(t){let e=a(n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),e=R$},"log");return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(n,o){return o in t||(n[o]={enumerable:!1,configurable:!1,get(){return e(o),t.git[o]}}),n}}a(Jlo,"addDeprecationNoticeToError");var Xlo=Pr({"src/lib/task-callback.ts"(){"use strict";Eie(),Di()}});function VYr(t,e){return $Kr(r=>{if(!dDt(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}a(VYr,"changeWorkingDirectoryTask");var Zlo=Pr({"src/lib/tasks/change-working-directory.ts"(){"use strict";Di(),Sf()}});function GNt(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=Aqe(e,"-B")),gy(e)}a(GNt,"checkoutTask");function euo(){return{checkout(){return this._runTask(GNt(my(arguments,1)),Pu(arguments))},checkoutBranch(t,e){return this._runTask(GNt(["-b",t,e,...my(arguments)]),Pu(arguments))},checkoutLocalBranch(t){return this._runTask(GNt(["-b",t,...my(arguments)]),Pu(arguments))}}}a(euo,"checkout_default");var tuo=Pr({"src/lib/tasks/checkout.ts"(){"use strict";Di(),Sf()}});function ruo(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}a(ruo,"countObjectsResponse");function nuo(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return AC(ruo(),[mJr],t)}})}}}a(nuo,"count_objects_default");var mJr,iuo=Pr({"src/lib/tasks/count-objects.ts"(){"use strict";Di(),mJr=new Zi(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let n=RKr(e);Object.hasOwn(t,n)&&(t[n]=fl(r))})}});function ouo(t){return AC({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},gJr,t)}a(ouo,"parseCommitResult");var gJr,suo=Pr({"src/lib/parsers/parse-commit.ts"(){"use strict";Di(),gJr=[new Zi(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,n])=>{t.branch=e,t.commit=n,t.root=!!r}),new Zi(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),n=r.pop();!n||!n.includes("@")||(t.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new Zi(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(n,10)||0}),new Zi(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0;let o=parseInt(r,10)||0;n==="-"?t.summary.deletions=o:n==="+"&&(t.summary.insertions=o)})]}});function auo(t,e,r){return{commands:["-c","core.abbrev=40","commit",...LCe(t,"-m"),...e,...r],format:"utf-8",parser:ouo}}a(auo,"commitTask");function cuo(){return{commit(e,...r){let n=Pu(arguments),o=t(e)||auo(Ik(e),Ik(Kg(r[0],dqe,[])),[...Cie(Kg(r[1],GCe,[])),...my(arguments,0,!0)]);return this._runTask(o,n)}};function t(e){return!dqe(e)&&gC("git.commit: requires the commit message to be supplied as a string/string[]")}}a(cuo,"commit_default");var luo=Pr({"src/lib/tasks/commit.ts"(){"use strict";suo(),Di(),Sf()}});function uuo(){return{firstCommit(){return this._runTask(gy(["rev-list","--max-parents=0","HEAD"],!0),Pu(arguments))}}}a(uuo,"first_commit_default");var duo=Pr({"src/lib/tasks/first-commit.ts"(){"use strict";Di(),Sf()}});function fuo(t,e){let r=["hash-object",t];return e&&r.push("-w"),gy(r,!0)}a(fuo,"hashObjectTask");var puo=Pr({"src/lib/tasks/hash-object.ts"(){"use strict";Sf()}});function huo(t,e,r){let n=String(r).trim(),o;if(o=AJr.exec(n))return new lqe(t,e,!1,o[1]);if(o=yJr.exec(n))return new lqe(t,e,!0,o[1]);let s="",c=n.split(" ");for(;c.length;)if(c.shift()==="in"){s=c.join(" ");break}return new lqe(t,e,/^re/i.test(n),s)}a(huo,"parseInit");var lqe,AJr,yJr,muo=Pr({"src/lib/responses/InitSummary.ts"(){"use strict";lqe=class{static{a(this,"InitSummary")}constructor(t,e,r,n){this.bare=t,this.path=e,this.existing=r,this.gitDir=n}},AJr=/^Init.+ repository in (.+)$/,yJr=/^Rein.+ in (.+)$/}});function guo(t){return t.includes(_Dt)}a(guo,"hasBareCommand");function Auo(t=!1,e,r){let n=["init",...r];return t&&!guo(n)&&n.splice(1,0,_Dt),{commands:n,format:"utf-8",parser(o){return huo(n.includes("--bare"),e,o)}}}a(Auo,"initTask");var _Dt,yuo=Pr({"src/lib/tasks/init.ts"(){"use strict";muo(),_Dt="--bare"}});function vDt(t){for(let e=0;eAC(new EJr,e,r,!1)}a(CJr,"getDiffParser");var HNt,WYr,zYr,YYr,_Jr,vJr=Pr({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";HCe(),Cuo(),rJr(),Di(),HNt=[new Zi(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,n=""])=>{t.files.push({file:e.trim(),changes:fl(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new Zi(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,n])=>{t.files.push({file:e.trim(),before:fl(r),after:fl(n),binary:!0})}),new Zi(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let n=/(\d+) i/.exec(r),o=/(\d+) d/.exec(r);t.changed=fl(e),t.insertions=fl(n?.[1]),t.deletions=fl(o?.[1])})],WYr=[new Zi(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,n])=>{let o=fl(e),s=fl(r);t.changed++,t.insertions+=o,t.deletions+=s,t.files.push({file:n,changes:o+s,insertions:o,deletions:s,binary:!1})}),new Zi(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],zYr=[new Zi(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],YYr=[new Zi(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,n,o,s])=>{t.changed++,t.files.push({file:s??n,changes:0,insertions:0,deletions:0,binary:!1,status:zNt(Flo(e)&&e),from:zNt(!!s&&n!==s&&n),similarity:fl(r)})})],_Jr={"":HNt,"--stat":HNt,"--numstat":WYr,"--name-status":YYr,"--name-only":zYr}}});function _uo(t,e){return e.reduce((r,n,o)=>(r[n]=t[o]||"",r),Object.create({diff:null}))}a(_uo,"lineBuilder");function bJr(t=IDt,e=TJr,r=""){let n=CJr(r);return function(o){let s=QCe(o.trim(),!1,TDt).map(function(c){let l=c.split(SDt),u=_uo(l[0].split(t),e);return l.length>1&&l[1].trim()&&(u.diff=n(l[1])),u});return{all:s,latest:s.length&&s[0]||null,total:s.length}}}a(bJr,"createListLogSummaryParser");var TDt,SDt,IDt,TJr,SJr=Pr({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";Di(),vJr(),HCe(),TDt="\xF2\xF2\xF2\xF2\xF2\xF2 ",SDt=" \xF2\xF2",IDt=" \xF2 ",TJr=["hash","date","message","refs","author_name","author_email"]}}),IJr={};_0(IJr,{diffSummaryTask:a(()=>vuo,"diffSummaryTask"),validateLogFormatConfig:a(()=>bqe,"validateLogFormatConfig")});function vuo(t){let e=vDt(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),bqe(r)||{commands:r,format:"utf-8",parser:CJr(e)}}a(vuo,"diffSummaryTask");function bqe(t){let e=t.filter(Euo);if(e.length>1)return gC(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return gC(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}a(bqe,"validateLogFormatConfig");var xDt=Pr({"src/lib/tasks/diff.ts"(){"use strict";HCe(),vJr(),Sf()}});function buo(t,e){let r=[],n=[];return Object.keys(t).forEach(o=>{r.push(o),n.push(String(t[o]))}),[r,n.join(e)]}a(buo,"prettyFormat");function Tuo(t){return Object.keys(t).reduce((e,r)=>(r in nDt||(e[r]=t[r]),e),{})}a(Tuo,"userOptions");function xJr(t={},e=[]){let r=Kg(t.splitter,Qd,IDt),n=Eqe(t.format)?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[o,s]=buo(n,r),c=[],l=[`--pretty=format:${TDt}${s}${SDt}`,...e],u=t.n||t["max-count"]||t.maxCount;if(u&&l.push(`--max-count=${u}`),t.from||t.to){let d=t.symmetric!==!1?"...":"..";c.push(`${t.from||""}${d}${t.to||""}`)}return Qd(t.file)&&l.push("--follow",VNt(t.file)),pDt(Tuo(t),l),{fields:o,splitter:r,commands:[...l,...c]}}a(xJr,"parseLogOptions");function Suo(t,e,r){let n=bJr(t,e,vDt(r));return{commands:["log",...r],format:"utf-8",parser:n}}a(Suo,"logTask");function Iuo(){return{log(...r){let n=Pu(arguments),o=xJr(hDt(arguments),Cie(Kg(arguments[0],GCe,[]))),s=e(...r)||bqe(o.commands)||t(o);return this._runTask(s,n)}};function t(r){return Suo(r.splitter,r.fields,r.commands)}function e(r,n){return Qd(r)&&Qd(n)&&gC("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}a(Iuo,"log_default");var nDt,wJr=Pr({"src/lib/tasks/log.ts"(){"use strict";HCe(),yie(),SJr(),Di(),Sf(),xDt(),nDt=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))(nDt||{})}}),uqe,RJr,xuo=Pr({"src/lib/responses/MergeSummary.ts"(){"use strict";uqe=class{static{a(this,"MergeSummaryConflict")}constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},RJr=class{static{a(this,"MergeSummaryDetail")}constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),iDt,PJr,wuo=Pr({"src/lib/responses/PullSummary.ts"(){"use strict";iDt=class{static{a(this,"PullSummary")}constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},PJr=class{static{a(this,"PullFailedSummary")}constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function jNt(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}a(jNt,"objectEnumerationResult");function KYr(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:fl(e&&e[1]||"0"),delta:fl(r&&r[1]||"0")}}a(KYr,"asObjectCount");var kJr,Ruo=Pr({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";Di(),kJr=[new OF(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let n=e.toLowerCase(),o=jNt(t.remoteMessages);Object.assign(o,{[n]:fl(r)})}),new OF(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let n=e.toLowerCase(),o=jNt(t.remoteMessages);Object.assign(o,{[n]:fl(r)})}),new OF(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,n])=>{let o=jNt(t.remoteMessages);o.total=KYr(e),o.reused=KYr(r),o.packReused=fl(n)})]}});function NJr(t,e){return AC({remoteMessages:new MJr},DJr,e)}a(NJr,"parseRemoteMessages");var DJr,MJr,OJr=Pr({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";Di(),Ruo(),DJr=[new OF(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...kJr,new OF([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new OF([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,n])=>{t.remoteMessages.vulnerabilities={count:fl(e),summary:r,url:n}})],MJr=class{static{a(this,"RemoteMessageSummary")}constructor(){this.all=[]}}}});function Puo(t,e){let r=AC(new PJr,BJr,[t,e]);return r.message&&r}a(Puo,"parsePullErrorResult");var JYr,XYr,ZYr,eKr,BJr,tKr,wDt,LJr=Pr({"src/lib/parsers/parse-pull.ts"(){"use strict";wuo(),Di(),OJr(),JYr=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,XYr=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,ZYr=/^(create|delete) mode \d+ (.+)/,eKr=[new Zi(JYr,(t,[e,r,n])=>{t.files.push(e),r&&(t.insertions[e]=r.length),n&&(t.deletions[e]=n.length)}),new Zi(XYr,(t,[e,,r,,n])=>r!==void 0||n!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+n||0,!0):!1),new Zi(ZYr,(t,[e,r])=>{jT(t.files,r),jT(e==="create"?t.created:t.deleted,r)})],BJr=[new Zi(/^from\s(.+)$/i,(t,[e])=>{t.remote=e}),new Zi(/^fatal:\s(.+)$/,(t,[e])=>{t.message=e}),new Zi(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,n,o])=>{t.branch.local=n,t.hash.local=e,t.branch.remote=o,t.hash.remote=r})],tKr=a((t,e)=>AC(new iDt,eKr,[t,e]),"parsePullDetail"),wDt=a((t,e)=>Object.assign(new iDt,tKr(t,e),NJr(t,e)),"parsePullResult")}}),rKr,FJr,nKr,kuo=Pr({"src/lib/parsers/parse-merge.ts"(){"use strict";xuo(),Di(),LJr(),rKr=[new Zi(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new Zi(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new uqe(e,r))}),new Zi(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,n])=>{t.conflicts.push(new uqe(e,r,{deleteRef:n}))}),new Zi(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new uqe(e,null))}),new Zi(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],FJr=a((t,e)=>Object.assign(nKr(t,e),wDt(t,e)),"parseMergeResult"),nKr=a(t=>AC(new RJr,rKr,t),"parseMergeDetail")}});function iKr(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let n=FJr(e,r);if(n.failed)throw new UCe(n);return n}}:gC("Git.merge requires at least one option")}a(iKr,"mergeTask");var Nuo=Pr({"src/lib/tasks/merge.ts"(){"use strict";Eie(),kuo(),Sf()}});function Duo(t,e,r){let n=r.includes("deleted"),o=r.includes("tag")||/^refs\/tags/.test(t),s=!r.includes("new");return{deleted:n,tag:o,branch:!o,new:!s,alreadyUpdated:s,local:t,remote:e}}a(Duo,"pushResultPushedItem");var oKr,UJr,sKr,Muo=Pr({"src/lib/parsers/parse-push.ts"(){"use strict";Di(),OJr(),oKr=[new Zi(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new Zi(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref={...t.ref||{},local:e}}),new Zi(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,n])=>{t.pushed.push(Duo(e,r,n))}),new Zi(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,n])=>{t.branch={...t.branch||{},local:e,remote:r,remoteName:n}}),new Zi(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,n,o])=>{t.update={head:{local:e,remote:r},hash:{from:n,to:o}}})],UJr=a((t,e)=>{let r=sKr(t,e),n=NJr(t,e);return{...r,...n}},"parsePushResult"),sKr=a((t,e)=>AC({pushed:[]},oKr,[t,e]),"parsePushDetail")}}),QJr={};_0(QJr,{pushTagsTask:a(()=>Ouo,"pushTagsTask"),pushTask:a(()=>RDt,"pushTask")});function Ouo(t={},e){return jT(e,"--tags"),RDt(t,e)}a(Ouo,"pushTagsTask");function RDt(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),Aqe(r,"-v"),jT(r,"--verbose"),jT(r,"--porcelain"),{commands:r,format:"utf-8",parser:UJr}}a(RDt,"pushTask");var qJr=Pr({"src/lib/tasks/push.ts"(){"use strict";Muo(),Di()}});function Buo(){return{showBuffer(){let t=["show",...my(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask(VKr(t),Pu(arguments))},show(){let t=["show",...my(arguments,1)];return this._runTask(gy(t),Pu(arguments))}}}a(Buo,"show_default");var Luo=Pr({"src/lib/tasks/show.ts"(){"use strict";Di(),Sf()}}),aKr,GJr,Fuo=Pr({"src/lib/responses/FileStatusSummary.ts"(){"use strict";aKr=/^(.+)\0(.+)$/,GJr=class{static{a(this,"FileStatusSummary")}constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let n=aKr.exec(t)||[null,t,t];this.from=n[2]||"",this.path=n[1]||""}}}}});function cKr(t){let[e,r]=t.split(Aie);return{from:r||e,to:e}}a(cKr,"renamedFile");function uv(t,e,r){return[`${t}${e}`,r]}a(uv,"parser3");function $Nt(t,...e){return e.map(r=>uv(t,r,(n,o)=>n.conflicted.push(o)))}a($Nt,"conflicts");function Uuo(t,e){let r=e.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.slice(3));case r.charAt(1):return n(" ",r.charAt(0),r.slice(2));default:return}function n(o,s,c){let l=`${o}${s}`,u=HJr.get(l);u&&u(t,c),l!=="##"&&l!=="!!"&&t.files.push(new GJr(c,o,s))}a(n,"data")}a(Uuo,"splitLine");var lKr,HJr,jJr,Quo=Pr({"src/lib/responses/StatusSummary.ts"(){"use strict";Di(),Fuo(),lKr=class{static{a(this,"StatusSummary")}constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},HJr=new Map([uv(" ","A",(t,e)=>t.created.push(e)),uv(" ","D",(t,e)=>t.deleted.push(e)),uv(" ","M",(t,e)=>t.modified.push(e)),uv("A"," ",(t,e)=>{t.created.push(e),t.staged.push(e)}),uv("A","M",(t,e)=>{t.created.push(e),t.staged.push(e),t.modified.push(e)}),uv("D"," ",(t,e)=>{t.deleted.push(e),t.staged.push(e)}),uv("M"," ",(t,e)=>{t.modified.push(e),t.staged.push(e)}),uv("M","M",(t,e)=>{t.modified.push(e),t.staged.push(e)}),uv("R"," ",(t,e)=>{t.renamed.push(cKr(e))}),uv("R","M",(t,e)=>{let r=cKr(e);t.renamed.push(r),t.modified.push(r.to)}),uv("!","!",(t,e)=>{(t.ignored=t.ignored||[]).push(e)}),uv("?","?",(t,e)=>t.not_added.push(e)),...$Nt("A","A","U"),...$Nt("D","D","U"),...$Nt("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,o=/^(.+?(?=(?:\.{3}|\s|$)))/,s=/\.{3}(\S*)/,c=/\son\s(\S+?)(?=\.{3}|$)/,l=r.exec(e);t.ahead=l&&+l[1]||0,l=n.exec(e),t.behind=l&&+l[1]||0,l=o.exec(e),t.current=Kg(l?.[1],Qd,null),l=s.exec(e),t.tracking=Kg(l?.[1],Qd,null),l=c.exec(e),l&&(t.current=Kg(l?.[1],Qd,t.current)),t.detached=/\(no branch\)/.test(e)}]]),jJr=a(function(t){let e=t.split(Aie),r=new lKr;for(let n=0,o=e.length;n!$Jr.includes(r))],parser(r){return jJr(r)}}}a(quo,"statusTask");var $Jr,Guo=Pr({"src/lib/tasks/status.ts"(){"use strict";Quo(),$Jr=["--null","-z"]}});function hqe(t=0,e=0,r=0,n="",o=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:n,installed:o},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}a(hqe,"versionResponse");function Huo(){return hqe(0,0,0,"",!1)}a(Huo,"notInstalledResponse");function juo(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:$uo,onError(t,e,r,n){if(t.exitCode===-2)return r(Buffer.from(PDt));n(e)}})}}}a(juo,"version_default");function $uo(t){return t===PDt?Huo():AC(hqe(0,0,0,t),VJr,t)}a($uo,"versionParser");var PDt,VJr,Vuo=Pr({"src/lib/tasks/version.ts"(){"use strict";Di(),PDt="installed=false",VJr=[new Zi(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,n,o=""])=>{Object.assign(t,hqe(fl(e),fl(r),fl(n),o))}),new Zi(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,n,o=""])=>{Object.assign(t,hqe(fl(e),fl(r),n,o))})]}});function uKr(t,e,r,...n){return Qd(r)?e(r,Kg(n[0],Qd),my(arguments)):gC(`git.${t}() requires a string 'repoPath'`)}a(uKr,"createCloneTask");function Wuo(){return{clone(t,...e){return this._runTask(uKr("clone",oDt,Kg(t,Qd),...e),Pu(arguments))},mirror(t,...e){return this._runTask(uKr("mirror",WJr,Kg(t,Qd),...e),Pu(arguments))}}}a(Wuo,"clone_default");var oDt,WJr,zuo=Pr({"src/lib/tasks/clone.ts"(){"use strict";Sf(),Di(),yie(),oDt=a((t,e,r)=>{let n=["clone",...r];return Qd(t)&&n.push(VNt(t)),Qd(e)&&n.push(VNt(e)),gy(n)},"cloneTask"),WJr=a((t,e,r)=>(jT(r,"--mirror"),oDt(t,e,r)),"cloneMirrorTask")}}),zJr={};_0(zJr,{SimpleGitApi:a(()=>sDt,"SimpleGitApi")});var sDt,Yuo=Pr({"src/lib/simple-git-api.ts"(){"use strict";Xlo(),Zlo(),tuo(),iuo(),luo(),eJr(),duo(),oJr(),puo(),yuo(),wJr(),Nuo(),qJr(),Luo(),Guo(),Sf(),Vuo(),Di(),zuo(),sDt=class{static{a(this,"SimpleGitApi")}constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),n=r.push(t);return e&&Klo(t,n,e),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(t){return this._runTask(gy(["add",...Ik(t)]),Pu(arguments))}cwd(t){let e=Pu(arguments);return typeof t=="string"?this._runTask(VYr(t,this._executor),e):typeof t?.path=="string"?this._runTask(VYr(t.path,t.root&&this._executor||void 0),e):this._runTask(gC("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(fuo(t,e===!0),Pu(arguments))}init(t){return this._runTask(Auo(t===!0,this._executor.cwd,my(arguments)),Pu(arguments))}merge(){return this._runTask(iKr(my(arguments)),Pu(arguments))}mergeFromTo(t,e){return Qd(t)&&Qd(e)?this._runTask(iKr([t,e,...my(arguments)]),Pu(arguments,!1)):this._runTask(gC("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=RDt({remote:Kg(arguments[0],Qd),branch:Kg(arguments[1],Qd)},my(arguments));return this._runTask(t,Pu(arguments))}stash(){return this._runTask(gy(["stash",...my(arguments)]),Pu(arguments))}status(){return this._runTask(quo(my(arguments)),Pu(arguments))}},Object.assign(sDt.prototype,euo(),Wuo(),cuo(),Llo(),nuo(),uuo(),qlo(),Iuo(),Buo(),juo())}}),YJr={};_0(YJr,{Scheduler:a(()=>JJr,"Scheduler")});var dKr,JJr,Kuo=Pr({"src/lib/runners/scheduler.ts"(){"use strict";Di(),uJr(),dKr=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,KJr.createDeferred)();return{promise:e,done:r,id:t}}})(),JJr=class{static{a(this,"Scheduler")}constructor(t=2){this.concurrency=t,this.logger=CDt("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let t=jT(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),Aqe(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=jT(this.pending,dKr());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),XJr={};_0(XJr,{applyPatchTask:a(()=>Juo,"applyPatchTask")});function Juo(t,e){return gy(["apply",...e,...t])}a(Juo,"applyPatchTask");var Xuo=Pr({"src/lib/tasks/apply-patch.ts"(){"use strict";Sf()}});function Zuo(t,e){return{branch:t,hash:e,success:!0}}a(Zuo,"branchDeletionSuccess");function edo(t){return{branch:t,hash:null,success:!1}}a(edo,"branchDeletionFailure");var ZJr,tdo=Pr({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";ZJr=class{static{a(this,"BranchDeletionBatch")}constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function eXr(t,e){return e===1&&aDt.test(t)}a(eXr,"hasBranchDeletionError");var fKr,aDt,pKr,Tqe,rdo=Pr({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";tdo(),Di(),fKr=/(\S+)\s+\(\S+\s([^)]+)\)/,aDt=/^error[^']+'([^']+)'/m,pKr=[new Zi(fKr,(t,[e,r])=>{let n=Zuo(e,r);t.all.push(n),t.branches[e]=n}),new Zi(aDt,(t,[e])=>{let r=edo(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],Tqe=a((t,e)=>AC(new ZJr,pKr,[t,e]),"parseBranchDeletions")}}),tXr,ndo=Pr({"src/lib/responses/BranchSummary.ts"(){"use strict";tXr=class{static{a(this,"BranchSummaryResult")}constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,n,o){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:n,label:o}}}}});function hKr(t){return t?t.charAt(0):""}a(hKr,"branchStatus");function rXr(t,e=!1){return AC(new tXr,e?[iXr]:nXr,t)}a(rXr,"parseBranchSummary");var nXr,iXr,ido=Pr({"src/lib/parsers/parse-branch.ts"(){"use strict";ndo(),Di(),nXr=[new Zi(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,n,o])=>{t.push(hKr(e),!0,r,n,o)}),new Zi(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(t,[e,r,n,o])=>{t.push(hKr(e),!1,r,n,o)})],iXr=new Zi(/^(\S+)$/s,(t,[e])=>{t.push("*",!1,e,"","")})}}),oXr={};_0(oXr,{branchLocalTask:a(()=>sdo,"branchLocalTask"),branchTask:a(()=>odo,"branchTask"),containsDeleteBranchCommand:a(()=>sXr,"containsDeleteBranchCommand"),deleteBranchTask:a(()=>cdo,"deleteBranchTask"),deleteBranchesTask:a(()=>ado,"deleteBranchesTask")});function sXr(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}a(sXr,"containsDeleteBranchCommand");function odo(t){let e=sXr(t),r=t.includes("--show-current"),n=["branch",...t];return n.length===1&&n.push("-a"),n.includes("-v")||n.splice(1,0,"-v"),{format:"utf-8",commands:n,parser(o,s){return e?Tqe(o,s).all[0]:rXr(o,r)}}}a(odo,"branchTask");function sdo(){return{format:"utf-8",commands:["branch","-v"],parser(t){return rXr(t)}}}a(sdo,"branchLocalTask");function ado(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,n){return Tqe(r,n)},onError({exitCode:r,stdOut:n},o,s,c){if(!eXr(String(o),r))return c(o);s(n)}}}a(ado,"deleteBranchesTask");function cdo(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(n,o){return Tqe(n,o).branches[t]},onError({exitCode:n,stdErr:o,stdOut:s},c,l,u){if(!eXr(String(c),n))return u(c);throw new UCe(r.parser(FCe(s),FCe(o)),String(c))}};return r}a(cdo,"deleteBranchTask");var ldo=Pr({"src/lib/tasks/branch.ts"(){"use strict";Eie(),rdo(),ido(),Di()}});function udo(t){let e=t.trim().replace(/^["']|["']$/g,"");return e&&(0,aXr.normalize)(e)}a(udo,"toPath");var cXr,ddo=Pr({"src/lib/responses/CheckIgnore.ts"(){"use strict";cXr=a(t=>t.split(/\n/g).map(udo).filter(Boolean),"parseCheckIgnore")}}),lXr={};_0(lXr,{checkIgnoreTask:a(()=>fdo,"checkIgnoreTask")});function fdo(t){return{commands:["check-ignore",...t],format:"utf-8",parser:cXr}}a(fdo,"checkIgnoreTask");var pdo=Pr({"src/lib/tasks/check-ignore.ts"(){"use strict";ddo()}});function hdo(t,e){return AC({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},uXr,[t,e])}a(hdo,"parseFetchResult");var uXr,mdo=Pr({"src/lib/parsers/parse-fetch.ts"(){"use strict";Di(),uXr=[new Zi(/From (.+)$/,(t,[e])=>{t.remote=e}),new Zi(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new Zi(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new Zi(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new Zi(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,n,o])=>{t.updated.push({name:n,tracking:o,to:r,from:e})})]}}),dXr={};_0(dXr,{fetchTask:a(()=>Ado,"fetchTask")});function gdo(t){return/^--upload-pack(=|$)/.test(t)}a(gdo,"disallowedCommand");function Ado(t,e,r){let n=["fetch",...r];return t&&e&&n.push(t,e),n.find(gdo)?gC("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:hdo}}a(Ado,"fetchTask");var ydo=Pr({"src/lib/tasks/fetch.ts"(){"use strict";mdo(),Sf()}});function Edo(t){return AC({moves:[]},fXr,t)}a(Edo,"parseMoveResult");var fXr,Cdo=Pr({"src/lib/parsers/parse-move.ts"(){"use strict";Di(),fXr=[new Zi(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),pXr={};_0(pXr,{moveTask:a(()=>_do,"moveTask")});function _do(t,e){return{commands:["mv","-v",...Ik(t),e],format:"utf-8",parser:Edo}}a(_do,"moveTask");var vdo=Pr({"src/lib/tasks/move.ts"(){"use strict";Cdo(),Di()}}),hXr={};_0(hXr,{pullTask:a(()=>bdo,"pullTask")});function bdo(t,e,r){let n=["pull",...r];return t&&e&&n.splice(1,0,t,e),{commands:n,format:"utf-8",parser(o,s){return wDt(o,s)},onError(o,s,c,l){let u=Puo(FCe(o.stdOut),FCe(o.stdErr));if(u)return l(new UCe(u));l(s)}}}a(bdo,"pullTask");var Tdo=Pr({"src/lib/tasks/pull.ts"(){"use strict";Eie(),LJr(),Di()}});function Sdo(t){let e={};return mXr(t,([r])=>e[r]={name:r}),Object.values(e)}a(Sdo,"parseGetRemotes");function Ido(t){let e={};return mXr(t,([r,n,o])=>{Object.hasOwn(e,r)||(e[r]={name:r,refs:{fetch:"",push:""}}),o&&n&&(e[r].refs[o.replace(/[^a-z]/g,"")]=n)}),Object.values(e)}a(Ido,"parseGetRemotesVerbose");function mXr(t,e){uDt(t,r=>e(r.split(/\s+/)))}a(mXr,"forEach");var xdo=Pr({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";Di()}}),gXr={};_0(gXr,{addRemoteTask:a(()=>wdo,"addRemoteTask"),getRemotesTask:a(()=>Rdo,"getRemotesTask"),listRemotesTask:a(()=>Pdo,"listRemotesTask"),remoteTask:a(()=>kdo,"remoteTask"),removeRemoteTask:a(()=>Ndo,"removeRemoteTask")});function wdo(t,e,r){return gy(["remote","add",...r,t,e])}a(wdo,"addRemoteTask");function Rdo(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?Ido:Sdo}}a(Rdo,"getRemotesTask");function Pdo(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),gy(e)}a(Pdo,"listRemotesTask");function kdo(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),gy(e)}a(kdo,"remoteTask");function Ndo(t){return gy(["remote","remove",t])}a(Ndo,"removeRemoteTask");var Ddo=Pr({"src/lib/tasks/remote.ts"(){"use strict";xdo(),Sf()}}),AXr={};_0(AXr,{stashListTask:a(()=>Mdo,"stashListTask")});function Mdo(t={},e){let r=xJr(t),n=["stash","list",...r.commands,...e],o=bJr(r.splitter,r.fields,vDt(n));return bqe(n)||{commands:n,format:"utf-8",parser:o}}a(Mdo,"stashListTask");var Odo=Pr({"src/lib/tasks/stash-list.ts"(){"use strict";HCe(),SJr(),xDt(),wJr()}}),yXr={};_0(yXr,{addSubModuleTask:a(()=>Bdo,"addSubModuleTask"),initSubModuleTask:a(()=>Ldo,"initSubModuleTask"),subModuleTask:a(()=>Sqe,"subModuleTask"),updateSubModuleTask:a(()=>Fdo,"updateSubModuleTask")});function Bdo(t,e){return Sqe(["add",t,e])}a(Bdo,"addSubModuleTask");function Ldo(t){return Sqe(["init",...t])}a(Ldo,"initSubModuleTask");function Sqe(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),gy(e)}a(Sqe,"subModuleTask");function Fdo(t){return Sqe(["update",...t])}a(Fdo,"updateSubModuleTask");var Udo=Pr({"src/lib/tasks/sub-module.ts"(){"use strict";Sf()}});function Qdo(t,e){let r=Number.isNaN(t),n=Number.isNaN(e);return r!==n?r?1:-1:r?EXr(t,e):0}a(Qdo,"singleSorted");function EXr(t,e){return t===e?0:t>e?1:-1}a(EXr,"sorted");function qdo(t){return t.trim()}a(qdo,"trimmed");function sqe(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}a(sqe,"toNumber");var mKr,CXr,Gdo=Pr({"src/lib/responses/TagList.ts"(){"use strict";mKr=class{static{a(this,"TagList")}constructor(t,e){this.all=t,this.latest=e}},CXr=a(function(t,e=!1){let r=t.split(` -`).map(qdo).filter(Boolean);e||r.sort(function(o,s){let c=o.split("."),l=s.split(".");if(c.length===1||l.length===1)return Qdo(sqe(c[0]),sqe(l[0]));for(let u=0,d=Math.max(c.length,l.length);uo.indexOf(".")>=0);return new mKr(r,n)},"parseTagList")}}),_Xr={};_0(_Xr,{addAnnotatedTagTask:a(()=>$do,"addAnnotatedTagTask"),addTagTask:a(()=>jdo,"addTagTask"),tagListTask:a(()=>Hdo,"tagListTask")});function Hdo(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return CXr(r,e)}}}a(Hdo,"tagListTask");function jdo(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}a(jdo,"addTagTask");function $do(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}a($do,"addAnnotatedTagTask");var Vdo=Pr({"src/lib/tasks/tag.ts"(){"use strict";Gdo()}}),Wdo=ulo({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(Ylo(),Tf(pJr)),{SimpleGitApi:n}=(Yuo(),Tf(zJr)),{Scheduler:o}=(Kuo(),Tf(YJr)),{adhocExecTask:s,configurationErrorTask:c}=(Sf(),Tf(ZNt)),{asArray:l,filterArray:u,filterPrimitives:d,filterString:p,filterStringOrStringArray:h,filterType:m,getTrailingOptions:g,trailingFunctionArgument:A,trailingOptionsArgument:y}=(Di(),Tf(BKr)),{applyPatchTask:E}=(Xuo(),Tf(XJr)),{branchTask:_,branchLocalTask:v,deleteBranchesTask:b,deleteBranchTask:I}=(ldo(),Tf(oXr)),{checkIgnoreTask:x}=(pdo(),Tf(lXr)),{checkIsRepoTask:R}=(QKr(),Tf(LKr)),{cleanWithOptionsTask:w,isCleanOptionsArray:P}=(JKr(),Tf(YKr)),{diffSummaryTask:k}=(xDt(),Tf(IJr)),{fetchTask:Q}=(ydo(),Tf(dXr)),{moveTask:M}=(vdo(),Tf(pXr)),{pullTask:D}=(Tdo(),Tf(hXr)),{pushTagsTask:G}=(qJr(),Tf(QJr)),{addRemoteTask:O,getRemotesTask:N,listRemotesTask:F,remoteTask:U,removeRemoteTask:L}=(Ddo(),Tf(gXr)),{getResetMode:H,resetTask:$}=(lJr(),Tf(sJr)),{stashListTask:W}=(Odo(),Tf(AXr)),{addSubModuleTask:j,initSubModuleTask:ce,subModuleTask:J,updateSubModuleTask:Te}=(Udo(),Tf(yXr)),{addAnnotatedTagTask:fe,addTagTask:De,tagListTask:Ve}=(Vdo(),Tf(_Xr)),{straightThroughBufferTask:Ue,straightThroughStringTask:Ke}=(Sf(),Tf(ZNt));function X(le,te){this._plugins=te,this._executor=new r(le.baseDir,new o(le.maxConcurrentProcesses),te),this._trimmed=le.trimmed}a(X,"Git2"),(X.prototype=Object.create(n.prototype)).constructor=X,X.prototype.customBinary=function(le){return this._plugins.reconfigure("binary",le),this},X.prototype.env=function(le,te){return arguments.length===1&&typeof le=="object"?this._executor.env=le:(this._executor.env=this._executor.env||{})[le]=te,this},X.prototype.stashList=function(le){return this._runTask(W(y(arguments)||{},u(le)&&le||[]),A(arguments))},X.prototype.mv=function(le,te){return this._runTask(M(le,te),A(arguments))},X.prototype.checkoutLatestTag=function(le){var te=this;return this.pull(function(){te.tags(function(xe,Z){te.checkout(Z.latest,le)})})},X.prototype.pull=function(le,te,xe,Z){return this._runTask(D(m(le,p),m(te,p),g(arguments)),A(arguments))},X.prototype.fetch=function(le,te){return this._runTask(Q(m(le,p),m(te,p),g(arguments)),A(arguments))},X.prototype.silent=function(le){return this._runTask(s(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},X.prototype.tags=function(le,te){return this._runTask(Ve(g(arguments)),A(arguments))},X.prototype.rebase=function(){return this._runTask(Ke(["rebase",...g(arguments)]),A(arguments))},X.prototype.reset=function(le){return this._runTask($(H(le),g(arguments)),A(arguments))},X.prototype.revert=function(le){let te=A(arguments);return typeof le!="string"?this._runTask(c("Commit must be a string"),te):this._runTask(Ke(["revert",...g(arguments,0,!0),le]),te)},X.prototype.addTag=function(le){let te=typeof le=="string"?De(le):c("Git.addTag requires a tag name");return this._runTask(te,A(arguments))},X.prototype.addAnnotatedTag=function(le,te){return this._runTask(fe(le,te),A(arguments))},X.prototype.deleteLocalBranch=function(le,te,xe){return this._runTask(I(le,typeof te=="boolean"?te:!1),A(arguments))},X.prototype.deleteLocalBranches=function(le,te,xe){return this._runTask(b(le,typeof te=="boolean"?te:!1),A(arguments))},X.prototype.branch=function(le,te){return this._runTask(_(g(arguments)),A(arguments))},X.prototype.branchLocal=function(le){return this._runTask(v(),A(arguments))},X.prototype.raw=function(le){let te=!Array.isArray(le),xe=[].slice.call(te?arguments:le,0);for(let ae=0;aeconsole.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.")))},X.prototype.checkIgnore=function(le,te){return this._runTask(x(l(m(le,h,[]))),A(arguments))},X.prototype.checkIsRepo=function(le,te){return this._runTask(R(m(le,p)),A(arguments))},e.exports=X}});yie();BF();var zdo=class extends NO{static{a(this,"GitConstructError")}constructor(t,e){super(void 0,e),this.config=t}};BF();BF();var kO=class extends NO{static{a(this,"GitPluginError")}constructor(t,e,r){super(t,r),this.task=t,this.plugin=e,Object.setPrototypeOf(this,new.target.prototype)}};Eie();_Kr();QKr();JKr();eJr();rJr();oJr();lJr();function Ydo(t){return t?[{type:"spawn.before",action(n,o){t.aborted&&o.kill(new kO(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,o){function s(){o.kill(new kO(void 0,"abort","Abort signal received"))}a(s,"kill"),t.addEventListener("abort",s),o.spawned.on("close",()=>t.removeEventListener("abort",s))}}]:void 0}a(Ydo,"abortPlugin");function Kdo(t){return typeof t=="string"&&t.trim().toLowerCase()==="-c"}a(Kdo,"isConfigSwitch");function Jdo(t,e){if(typeof e!="string"||!e.includes(t))return!1;let r=e.trim().replace(/\0/g,"");return/^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(r)}a(Jdo,"isCloneUploadPackSwitch");function OCe(t,e,r=String(t)){let n=typeof t=="string"?new RegExp(`\\s*${t}`,"i"):t;return a(function(s,c,l){if(s[e]!==!0&&Kdo(c)&&n.test(l))throw new kO(void 0,"unsafe",`Configuring ${r} is not permitted without enabling ${e}`)},"preventCommand")}a(OCe,"preventConfigBuilder");var Xdo=[OCe(/^\s*protocol(.[a-z]+)?.allow/i,"allowUnsafeProtocolOverride","protocol.allow"),OCe("core.sshCommand","allowUnsafeSshCommand"),OCe("core.gitProxy","allowUnsafeGitProxy"),OCe("core.hooksPath","allowUnsafeHooksPath"),OCe("diff.external","allowUnsafeDiffExternal")];function Zdo(t,e){if(/^\s*--(upload|receive)-pack/.test(t))throw new kO(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(e==="clone"&&Jdo("u",t))throw new kO(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(e==="push"&&/^\s*--exec\b/.test(t))throw new kO(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}a(Zdo,"preventUploadPack");function efo({allowUnsafePack:t=!1,...e}={}){return{type:"spawn.args",action(r,n){return r.forEach((o,s)=>{let c=sl(e,o,c))}),r}}}a(efo,"blockUnsafeOperationsPlugin");Di();function tfo(t){let e=LCe(t,"-c");return{type:"spawn.args",action(r){return[...e,...r]}}}a(tfo,"commandConfigPrefixingPlugin");Di();var gKr=(0,gie.deferred)().promise;function rfo({onClose:t=!0,onExit:e=50}={}){function r(){let o=-1,s={close:(0,gie.deferred)(),closeTimeout:(0,gie.deferred)(),exit:(0,gie.deferred)(),exitTimeout:(0,gie.deferred)()},c=Promise.race([t===!1?gKr:s.closeTimeout.promise,e===!1?gKr:s.exitTimeout.promise]);return n(t,s.close,s.closeTimeout),n(e,s.exit,s.exitTimeout),{close(l){o=l,s.close.done()},exit(l){o=l,s.exit.done()},get exitCode(){return o},result:c}}a(r,"createEvents");function n(o,s,c){o!==!1&&(o===!0?s.promise:s.promise.then(()=>WNt(o))).then(c.done)}return a(n,"configureTimeout"),{type:"spawn.after",async action(o,{spawned:s,close:c}){let l=r(),u=!0,d=a(()=>{u=!1},"quickClose");s.stdout?.on("data",d),s.stderr?.on("data",d),s.on("error",d),s.on("close",p=>l.close(p)),s.on("exit",p=>l.exit(p));try{await l.result,u&&await WNt(50),c(l.exitCode)}catch(p){c(l.exitCode,p)}}}}a(rfo,"completionDetectionPlugin");Di();var nfo="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",AKr="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function ifo(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(t)}a(ifo,"isBadArgument");function yKr(t,e){if(t.length<1||t.length>2)throw new kO(void 0,"binary",nfo);if(t.some(ifo))if(e)console.warn(AKr);else throw new kO(void 0,"binary",AKr);let[n,o]=t;return{binary:n,prefix:o}}a(yKr,"toBinaryConfig");function ofo(t,e=["git"],r=!1){let n=yKr(Ik(e),r);t.on("binary",o=>{n=yKr(Ik(o),r)}),t.append("spawn.binary",()=>n.binary),t.append("spawn.args",o=>n.prefix?[n.prefix,...o]:o)}a(ofo,"customBinaryPlugin");BF();function sfo(t){return!!(t.exitCode&&t.stdErr.length)}a(sfo,"isTaskError");function afo(t){return Buffer.concat([...t.stdOut,...t.stdErr])}a(afo,"getErrorMessage");function cfo(t=!1,e=sfo,r=afo){return(n,o)=>!t&&n||!e(o)?n:r(o)}a(cfo,"errorDetectionHandler");function EKr(t){return{type:"task.error",action(e,r){let n=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new NO(void 0,n.toString("utf-8"))}:{error:n}}}}a(EKr,"errorDetectionPlugin");Di();var lfo=class{static{a(this,"PluginStore")}constructor(){this.plugins=new Set,this.events=new vXr.EventEmitter}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=jT(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return Ik(t).forEach(r=>r&&this.plugins.add(jT(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let n=e,o=Object.freeze(Object.create(r));for(let s of this.plugins)s.type===t&&(n=s.action(n,o));return n}};Di();function ufo(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(s,c){return r.includes(c.method)?wKr(s,e):s}},{type:"spawn.after",action(s,c){c.commands.includes(e)&&c.spawned.stderr?.on("data",l=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));u&&t({method:c.method,stage:dfo(u[1]),progress:fl(u[2]),processed:fl(u[3]),total:fl(u[4])})})}}]}a(ufo,"progressMonitorPlugin");function dfo(t){return String(t.toLowerCase().split(" ",1))||"unknown"}a(dfo,"progressEventStage");Di();function ffo(t){let e=PKr(t,["uid","gid"]);return{type:"spawn.options",action(r){return{...e,...r}}}}a(ffo,"spawnOptionsPlugin");function pfo({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(n,o){let s;function c(){s&&clearTimeout(s),s=setTimeout(u,t)}a(c,"wait");function l(){o.spawned.stdout?.off("data",c),o.spawned.stderr?.off("data",c),o.spawned.off("exit",l),o.spawned.off("close",l),s&&clearTimeout(s)}a(l,"stop");function u(){l(),o.kill(new kO(void 0,"timeout","block timeout reached"))}a(u,"kill"),r&&o.spawned.stdout?.on("data",c),e&&o.spawned.stderr?.on("data",c),o.spawned.on("exit",l),o.spawned.on("close",l),c()}}}a(pfo,"timeoutPlugin");yie();function hfo(){return{type:"spawn.args",action(t){let e=[],r;function n(o){(r=r||[]).push(...o)}a(n,"append2");for(let o=0;oBCe(c)&&GYr(c)||c));break}e.push(s)}return r?[...e,"--",...r.map(String)]:e}}}a(hfo,"suffixPathsPlugin");Di();var mfo=Wdo();function gfo(t,e){let r=new lfo,n=MKr(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!dDt(n.baseDir))throw new zdo(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(tfo(n.config)),r.add(efo(n.unsafe)),r.add(rfo(n.completion)),n.abort&&r.add(Ydo(n.abort)),n.progress&&r.add(ufo(n.progress)),n.timeout&&r.add(pfo(n.timeout)),n.spawnOptions&&r.add(ffo(n.spawnOptions)),r.add(hfo()),r.add(EKr(cfo(!0))),n.errors&&r.add(EKr(n.errors)),ofo(r,n.binary,n.unsafe?.allowUnsafeCustomBinary),new mfo(n,r)}a(gfo,"gitInstanceFactory");Eie();var Iqe=gfo;var xk=new Se("Git Service");var xqe=class{constructor(e){this.ctx=e;this.gitInstances=new Map}static{a(this,"GitService")}getGitInstance(e){let r=this.normalizeRepoPath(e),n=this.gitInstances.get(r);return n||(n=Iqe(r),this.gitInstances.set(r,n)),n}constructFileUri(e,r){let n=this.normalizeRepoPath(e),o=(0,TXr.join)(n,r);return Lc(o)}parseStatus(e){switch(e){case"M":return 2;case"A":return 0;case"D":return 3;case"R":return 1;default:return 2}}parseDiffOutput(e,r){let n=[],o=r.split("\0").filter(s=>s.length>0);for(let s=0;s=o.length){xk.warn(this.ctx,`Malformed git diff output: rename status without both paths at position ${s}. Output: ${r}`);continue}let p=o[s+1],h=o[s+2];if(!p||!h){xk.warn(this.ctx,`Malformed git diff output: empty path(s) for rename at position ${s}. Paths: [${p}, ${h}]. Output: ${r}`);continue}let m=this.constructFileUri(e,p),g=this.constructFileUri(e,h);n.push({uri:g,originalUri:m,renameUri:g,status:1}),s+=2}else{if(s+1>=o.length){xk.warn(this.ctx,`Malformed git diff output: status without path at position ${s}. Status: ${u}. Output: ${r}`);continue}let p=o[s+1];if(!p){xk.warn(this.ctx,`Malformed git diff output: empty file path at position ${s}. Status: ${u}. Output: ${r}`);continue}let h=this.constructFileUri(e,p);n.push({uri:h,originalUri:h,renameUri:void 0,status:d}),s+=1}}return n}async diffWith(e,r){try{let o=await this.getGitInstance(e).raw(["diff","--name-status","-z","--diff-filter=ADMR",r,"--"]);return!o||o.trim().length===0?[]:this.parseDiffOutput(e,o)}catch(n){xk.error(this.ctx,`Failed to diff with ${r} for ${e}`,n);return}}async diffWithIndexedCommit(e,r){try{if(r){let o=await this.diffWith(e,r);if(o)return{changes:o,mayBeOutdated:!1};xk.warn(this.ctx,`Failed to diff with indexed commit ${r}, falling back to upstream`)}let n=await this.diffWith(e,"@{upstream}");if(n)return{changes:n,mayBeOutdated:!0};xk.warn(this.ctx,`No upstream branch configured for ${e}, cannot determine changes`);return}catch(n){xk.error(this.ctx,`Failed to diff with indexed commit for ${e}`,n);return}}normalizeRepoPath(e){if(e.startsWith("file://"))try{return(0,bXr.fileURLToPath)(e)}catch(r){xk.warn(this.ctx,`Failed to convert URI to path: ${e}, attempting fallback`,r);try{let n=new URL(e),o=decodeURIComponent(n.pathname);return process.platform==="win32"&&/^\/[a-zA-Z]:/.test(o)&&(o=o.slice(1).replace(/\//g,"\\")),o}catch(n){return xk.error(this.ctx,`Failed to parse URI with fallback: ${e}`,n),e}}return e}dispose(){this.gitInstances.clear()}};var SXr=de(wc());var LF=new Se("Local Diff Tracker");var wqe=class t{constructor(e,r,n){this.ctx=e;this._workspaceFileIndex=r;this._githubCodeSearchService=n;this._repos=new Map;this._locallyChangedFiles=new Set;this._fileWatcherDisposables=[];this._gitService=new xqe(e),this._repositoryManager=e.get(Em),this._diffRefreshTimer=new SXr.IntervalTimer}static{a(this,"CodeSearchWorkspaceDiffTracker")}static{this._diffRefreshInterval=1e3*60*2}static{this._maxDiffFiles=1e4}async initialize(){return this._initializePromise??=this.doInitialize(),this._initializePromise}async doInitialize(){try{LF.info(this.ctx,"Initializing Local Diff Tracker"),await this._workspaceFileIndex.initialize();let e=a(n=>{for(let o of n)this._locallyChangedFiles.add(o)},"addFiles");this._fileWatcherDisposables.push(this._workspaceFileIndex.onDidCreateFiles(e),this._workspaceFileIndex.onDidChangeFiles(e),this._workspaceFileIndex.onDidDeleteFiles(n=>{for(let o of n)this._locallyChangedFiles.delete(o)}));let r=await this._repositoryManager.getRepo({uri:this._workspaceFileIndex.workspaceFolder.uri});r||(r=await this.tryInferRepoFromFiles()),r&&r.isGitHub()&&r.owner&&r.name?await this.openRepo(r):LF.info(this.ctx,`Workspace folder ${this._workspaceFileIndex.workspaceFolder.uri} is not a GitHub repository`)}catch(e){LF.error(this.ctx,"Initialization failed",e)}}async tryInferRepoFromFiles(){try{let e=Array.from(this._workspaceFileIndex.values());if(e.length===0)return;for(let r=0;r{this.refreshRepoDiffs()},t._diffRefreshInterval),await this.refreshRepoDiff(n)}async tryGetDiffedIndexedFiles(e,r){let n=await this.tryGetDiff(e,r);if(!n)return;let o=new Set,s=n.changes.slice(0,t._maxDiffFiles);for(let c of s){let l=c.uri;this._workspaceFileIndex.get(l)&&o.add(l)}return o}async tryGetDiff(e,r){try{let n=e.baseFolder.uri,o=await this._gitService.diffWithIndexedCommit(n,r);return o?{changes:o.changes,mayBeOutdated:o.mayBeOutdated}:void 0}catch(n){LF.error(this.ctx,`Failed to get diff for ${e.baseFolder.uri}`,n);return}}async refreshRepoDiffs(){await Promise.all(Array.from(this._repos.values(),e=>this.refreshRepoDiff(e)))}async refreshRepoDiff(e){try{let r=this._githubCodeSearchService.getIndexedCommit(e.repo.baseFolder.uri),n=await this.tryGetDiffedIndexedFiles(e.repo,r);if(n){e.initialChanges.clear();for(let c of n)e.initialChanges.add(c);let o=e.repo.baseFolder.uri,s=[];for(let c of this._locallyChangedFiles)if(c.startsWith(o)){let l=this._workspaceFileIndex.get(c);(!l||!l.isDirty())&&s.push(c)}for(let c of s)this._locallyChangedFiles.delete(c);e.state=2}else LF.error(this.ctx,`Failed to get new diff for ${e.repo.baseFolder.uri}.`),e.state=1}catch(r){LF.error(this.ctx,`Failed to refresh diff for ${e.repo.baseFolder.uri}.`,r),e.state=1}}dispose(){this._diffRefreshTimer.dispose(),this._gitService.dispose(),this._fileWatcherDisposables.forEach(e=>e.dispose())}};f();f();var FF;(n=>{function t(o){return new kDt(o)}n.ok=t,a(t,"ok");function e(o){return new NDt(o)}n.error=e,a(e,"error");function r(o){return n.error(new Error(o))}n.fromString=r,a(r,"fromString")})(FF||={});var kDt=class t{constructor(e){this.val=e}static{a(this,"ResultOk")}map(e){return new t(e(this.val))}flatMap(e){return e(this.val)}isOk(){return!0}isError(){return!1}},NDt=class{constructor(e){this.err=e}static{a(this,"ResultError")}map(e){return this}flatMap(e){return this}isOk(){return!1}isError(){return!0}};var DDt=new Se("GithubAvailableEmbeddingTypes"),Rqe=class{constructor(e){this._ctx=e;this._cached=this._ctx.get(Ot).getGitHubSession().then(r=>r?this.doGetAvailableTypes(r):FF.error({type:"noSession"}))}static{a(this,"GithubAvailableEmbeddingTypesManager")}async getAllAvailableTypes(){if(this._cached){let e=this._cached;try{let r=await this._cached;if(r.isOk())return r}catch{}this._cached===e&&(this._cached=void 0)}return this._cached??=(async()=>{let e=await this._ctx.get(Ot).getGitHubSession();return e?await this.doGetAvailableTypes(e):FF.error({type:"noSession"})})(),this._cached}async doGetAvailableTypes(e){let r;try{let c=die(this._ctx);r=await mu(this._ctx,e,"embeddings/models",{headers:c,method:"GET"})}catch(c){return DDt.error(this._ctx,"Error fetching available embedding types",c),FF.error({type:"requestFailed",error:c})}if(!r.ok)return r.status===401||r.status===404?FF.error({type:"unauthorized",status:r.status}):FF.error({type:"badResponse",status:r.status});let n=await r.json(),o=[],s=[];for(let c of n.models){let l=new uC(c.id);c.active===!1?s.push(l):o.push(l)}return FF.ok({primary:o,deprecated:s})}async getPreferredType(){let e=await this.getAllAvailableTypes();if(!e.isOk()){DDt.info(this._ctx,`Could not find any available embedding types. Error: ${e.err.type}`);return}let r=e.val;return DDt.info(this._ctx,`Got embeddings. Primary: ${r.primary.join(",")}. Deprecated: ${r.deprecated.join(",")}`),r.primary.at(0)??r.deprecated.at(0)}};f();var Afo=new Se("GithubEmbeddingComputer"),_ie=class{constructor(e){this.ctx=e;this.batchSize=100}static{a(this,"GithubEmbeddingComputer")}async computeEmbeddings(e,r,n,o){try{let s=await this.ctx.get(Ot).getGitHubSession();if(!s)throw new Error("No GitHub session available");let c=[],l;for(let u=0;u0&&(l=p[0].type),c.push(...p)}if(!l)throw new Error("No embedding type resolved from API response");return{type:l,values:c}}catch(s){Afo.error(this.ctx,"Error computing embeddings:",s);return}}async fetchBatchEmbeddings(e,r,n,o,s){try{let c={inputs:n};if(r&&(c.embedding_model=r.id),o?.inputType&&(c.input_type=o.inputType),s?.isCancellationRequested)return;let l=await mu(this.ctx,e,"embeddings",{method:"POST",json:c});if(!l.ok)throw new Error(`Error fetching embeddings: ${l.status}. ${await l.text()}`);let u=await l.json(),d=new uC(u.embedding_model);if(r&&!d.equals(r))throw new Error(`Unexpected embedding model. Got: ${d.id}. Expected: ${r.id}`);if(n.length!==u.embeddings.length)throw new Error(`Mismatched embedding result count. Expected: ${n.length}. Got: ${u.embeddings.length}`);return u.embeddings.map(p=>({type:d,value:p.embedding}))}catch(c){throw new Error("Error fetching batch embeddings: "+(c instanceof Error?c.message:String(c)))}}};f();f();f();var jCe=class{constructor(){this.recomputedFileCount=0;this.sentContentTextLength=0}static{a(this,"ComputeBatchInfo")}};f();var IXr=de(Im()),xXr=de(x5()),wXr=de(require("path"));function Pqe(t){let e=Qo(t.workspaceFolder.uri),r=(0,IXr.basename)(e),o=(0,xXr.SHA256)(e).toString().substring(0,8);return wXr.default.join(DPt(),"project-index",`${r}.${o}`)}a(Pqe,"getWorkspaceCachePath");f();f();function RXr(t){if(ikt(t.type)?.quantization.document==="binary"){if(t.value.length%8!==0)throw new Error(`Embedding value length must be a multiple of 8 for ${t.type.id}, got ${t.value.length}`);let n=new Uint8Array(t.value.length/8);for(let o=0;o=0?1:0)<=1024)){let o=new Array(e.length*8);for(let s=0;s0?.03125:-.03125}return{type:t,value:o}}let n=new Float32Array(e.buffer,e.byteOffset,e.byteLength/4);return{type:t,value:Array.from(n)}}a(MDt,"unpackEmbedding");var PXr=de(wc()),kXr=de(iw()),BDt=de(Ef()),NXr=de(require("fs")),LDt=de(require("node:sqlite")),FDt=de(require("path"));var ODt=new Se("WorkspaceChunkAndEmbeddingCache");async function DXr(t,e,r,n){return await UDt.create(t,e,r??":memory:",n)}a(DXr,"createWorkspaceChunkAndEmbeddingCache");var UDt=class t{constructor(e,r){this.embeddingType=e;this.db=r;this._inMemory=new kXr.ResourceMap}static{a(this,"DbCache")}static{this.version="1.0.0"}static async create(e,r,n,o){let s={open:!0},c;if(n!==":memory:"){let d=FDt.default.join(n,"workspace-chunks.db");try{await NXr.default.promises.mkdir(FDt.default.dirname(d),{recursive:!0}),c=new LDt.default.DatabaseSync(d,s),ODt.debug(e,`DbWorkspaceChunkAndEmbeddingCache: Opened SQLite database on disk at ${d}`)}catch(p){ODt.error(e,"DbWorkspaceChunkAndEmbeddingCache: Failed to open SQLite database on disk, falling back to in-memory",p)}}c||(c=new LDt.default.DatabaseSync(":memory:",s),ODt.debug(e,"DbWorkspaceChunkAndEmbeddingCache: Using in-memory database")),c.exec(` +`}};f();f();f();f();var uo=class t{static{a(this,"Position")}constructor(e,r){this.lineNumber=e,this.column=r}with(e=this.lineNumber,r=this.column){return e===this.lineNumber&&r===this.column?this:new t(e,r)}delta(e=0,r=0){return this.with(this.lineNumber+e,this.column+r)}equals(e){return t.equals(this,e)}static equals(e,r){return!e&&!r?!0:!!e&&!!r&&e.lineNumber===r.lineNumber&&e.column===r.column}isBefore(e){return t.isBefore(this,e)}static isBefore(e,r){return e.lineNumbern||e===n&&r>o?(this.startLineNumber=n,this.startColumn=o,this.endLineNumber=e,this.endColumn=r):(this.startLineNumber=e,this.startColumn=r,this.endLineNumber=n,this.endColumn=o)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.columne.endColumn)}static strictContainsPosition(e,r){return!(r.lineNumbere.endLineNumber||r.lineNumber===e.startLineNumber&&r.column<=e.startColumn||r.lineNumber===e.endLineNumber&&r.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,r){return!(r.startLineNumbere.endLineNumber||r.endLineNumber>e.endLineNumber||r.startLineNumber===e.startLineNumber&&r.startColumn<=e.startColumn||r.endLineNumber===e.endLineNumber&&r.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,r){let n,o,s,c;return r.startLineNumbere.endLineNumber?(s=r.endLineNumber,c=r.endColumn):r.endLineNumber===e.endLineNumber?(s=r.endLineNumber,c=Math.max(r.endColumn,e.endColumn)):(s=e.endLineNumber,c=e.endColumn),new t(n,o,s,c)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,r){let n=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,c=e.endColumn,l=r.startLineNumber,u=r.startColumn,d=r.endLineNumber,p=r.endColumn;return nd?(s=d,c=p):s===d&&(c=Math.min(c,p)),n>s||n===s&&o>c?null:new t(n,o,s,c)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,r){return!e&&!r?!0:!!e&&!!r&&e.startLineNumber===r.startLineNumber&&e.startColumn===r.startColumn&&e.endLineNumber===r.endLineNumber&&e.endColumn===r.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new uo(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new uo(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,r){return new t(this.startLineNumber,this.startColumn,e,r)}setStartPosition(e,r){return new t(e,r,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,r=e){return new t(e.lineNumber,e.column,r.lineNumber,r.column)}static lift(e){return e?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,r){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};var Hzr=250;function hm(t){let e;if(typeof t.tokenBudget=="number"&&(e=Math.floor(t.tokenBudget/Hzr)),typeof t.maxResults=="number"&&(e=typeof e=="number"?Math.min(t.maxResults,e):t.maxResults),typeof e!="number")throw new Error("Either maxResults or tokenBudget must be provided");return e}a(hm,"getMaxChunks");var jzr=32e3,$zr=2e4,pEe=.75;f();f();function mm(t){let e=t.matchAll(/^\s*(```+)/gm),r=Math.max(3,...Array.from(e,n=>n[1].length+1));return"`".repeat(r)}a(mm,"getFenceForCodeBlock");f();var IKr=de(Lc()),xKr=de(ff());f();var XE=class t{constructor(e){this.id=e}static{a(this,"EmbeddingType")}static{this.text3small_512=new t("text-embedding-3-small-512")}static{this.metis_1024_I16_Binary=new t("metis-1024-I16-Binary")}toString(){return this.id}equals(e){return this.id===e.id}};var Vso=Object.freeze({[XE.text3small_512.id]:{model:"text-embedding-3-small",dimensions:512,quantization:{query:"float32",document:"float32"}},[XE.metis_1024_I16_Binary.id]:{model:"metis-I16-Binary",dimensions:1024,quantization:{query:"float16",document:"binary"}}});function Tkt(t){return Vso[t.id]}a(Tkt,"getWellKnownEmbeddingTypeInfo");function Wso(t,e){let r=0,n=Math.min(t.length,e.length);for(let o=0;o({distance:hEe(l,t),value:c})).filter(c=>c.distance.value>o).sort((c,l)=>l.distance.value-c.distance.value).slice(0,r).map(c=>({distance:c.distance,value:c.value}));if(s.length&&typeof n?.maxSpread=="number"){let c=s.at(0).distance.value*(1-n.maxSpread);return s.filter(u=>u.distance.value>=c)}return s}a(nYr,"rankEmbeddings");f();f();var d4=de(vc()),SKr=de(ff());var pk=new Se("GitHubCodeSearch"),Nuo=300*1e3,iQe=class{constructor(e){this._indexedCommits=new Map;this._indexedRepos=new Map;this._ctx=e,this._refreshTimer=new d4.IntervalTimer,this.startPeriodicRefresh()}static{a(this,"GithubCodeSearchService")}getIndexedCommit(e){return this._indexedCommits.get(e)}setIndexedCommit(e,r){this._indexedCommits.get(e)!==r&&this._indexedCommits.set(e,r)}startPeriodicRefresh(){this._refreshTimer.cancelAndSet(()=>{this.updateIndexedRepoCommit()},Nuo)}updateIndexedRepoCommit(){if(this._indexedRepos.size!==0)for(let[e,r]of this._indexedRepos.entries())this._indexedCommits.get(e)&&(async()=>{try{let o=await this._ctx.get(Nt).getGitHubSession();if(!o)return;let{currentStatus:s,indexedCommit:c}=await this.getRemoteIndexState(o,r,{isCancellationRequested:!1});if(s==="ready"&&c){let l=this._indexedCommits.get(e);l!==c&&(this._indexedCommits.set(e,c),pk.info(this._ctx,`Updated indexed commit for ${r.owner}/${r.name}`,{oldCommit:l,newCommit:c}))}}catch(o){pk.warn(this._ctx,`Failed to update indexed commit for ${e}`,o)}})()}async ensureReposIndexed(e,r,n){return await Promise.all(r.map(async o=>{let s=o?.baseFolder.uri;if(!s||n.isCancellationRequested||this._indexedRepos.has(s))return;let{currentStatus:c,indexedCommit:l}=await this.getRemoteIndexState(e,o,n);if(pk.info(this._ctx,`Index status check for ${o.owner}/${o.name}`,{status:c,indexedCommit:l}),c==="ready")this._indexedRepos.set(s,o),l&&this.setIndexedCommit(s,l);else if(c==="not-yet-indexed")try{await this.tryToInstantIndexRepo(e,o,n),pk.info(this._ctx,`Instant indexing completed for ${o.owner}/${o.name}`)}catch(u){pk.warn(this._ctx,`Instant indexing failed for ${o.owner}/${o.name}`,u)}})),r.filter(o=>this._indexedRepos.has(o.baseFolder.uri))}async tryToInstantIndexRepo(e,r,n){await(0,d4.raceTimeout)((async()=>{if(!await(0,d4.raceCancellationError)(this.triggerIndexing(e,"auto",r,n),n))return!1;let c=5,l=1e3;for(;c-- >0;){await(0,d4.raceCancellationError)((0,d4.timeout)(l),n);let{currentStatus:u,indexedCommit:d}=await this.getRemoteIndexState(e,r,n);if(u==="ready"){this._indexedRepos.set(r.baseFolder.uri,r),d&&this.setIndexedCommit(r.baseFolder.uri,d);break}else if(u!=="building-index"){let p=`Instant indexing for '${r.owner}/${r.name}' failed. Found unexpected status: '${u}'`;throw pk.error(this._ctx,p),new Error(p)}}return!0})(),8e3)}async getRemoteIndexState(e,r,n){if(!r.owner||!r.name)return{currentStatus:"not-indexable"};let o=r.owner+"/"+r.name,s=await au(this._ctx,e,`repos/${o}/copilot_internal/embeddings_index`,{method:"GET"});if(!s.ok)return pk.error(this._ctx,`Failed to fetch indexing status. Response: ${s.status}.`),{currentStatus:"not-yet-indexed"};let c=await s.json();return pk.debug(this._ctx,`${o} - semantic_code_search_ok: ${c.semantic_code_search_ok}`),c.semantic_code_search_ok?{currentStatus:"ready",indexedCommit:c.semantic_commit_sha}:c.semantic_indexing_enabled?{currentStatus:"building-index"}:{currentStatus:"not-yet-indexed"}}async triggerIndexing(e,r,n,o){let s=Tne(this._ctx),c=n.owner+"/"+n.name,l=await au(this._ctx,e,`repos/${c}/copilot_internal/embeddings_index`,{headers:s,method:"POST",json:{auto:r==="auto"}});return l.ok?!0:(pk.error(this._ctx,`Failed to request indexing for '${c}'. Response: ${l.status}. ${await l.text()}`),!1)}async searchRepo(e,r,n,o,s,c){let l=Tne(this._ctx),u=await au(this._ctx,e,"embeddings/code/search",{headers:l,method:"POST",json:{scoping_query:`repo:${n.owner}/${n.name}`,prompt:Ouo(o,7800),include_embeddings:!1,limit:s,embedding_model:r.id}});if(!u.ok)throw new Error(`Code search semantic search failed with status: ${u.status}`);let d=await u.json();if(!Array.isArray(d.results))throw new Error("Code search semantic search unexpected response json shape");return Muo(this._ctx,d,n)}dispose(){this._refreshTimer.dispose(),this._indexedCommits.clear(),this._indexedRepos.clear()}};function Tne(t){let e=t.get(Dr);return{"X-Client-Application":`${PC(e.getEditorInfo())}`,"X-Client-Source":PC(e.getEditorPluginInfo()),"X-Client-Feature":"Agent <- codebaseTool"}}a(Tne,"editorVersionHeaders");async function Muo(t,e,r){let o=[],s=new XE(e.embedding_model),c=ca(r.baseFolder.uri);return await Promise.all(e.results.map(l=>{let u;try{u=bi(c,l.location.path)}catch(d){pk.error(t,`Error joining path for ${l.location.path}:`,d);return}o.push({chunk:{file:u,text:oQe(l.chunk.text),rawText:void 0,range:new SKr.Range(l.chunk.line_range.start+1,1,l.chunk.line_range.end+1,1),isFullFile:!1},distance:{embeddingType:s,value:l.distance}})})),{chunks:o,outOfSync:!1}}a(Muo,"parseGithubCodeSearchResponse");function Ouo(t,e){if(t.length*4<=e)return t;let o=new TextEncoder().encode(t);if(o.length<=e)return t;let s=o.slice(0,e);return new TextDecoder().decode(s,{stream:!0})}a(Ouo,"truncateToMaxUtf8Length");function oQe(t){let e=Buo(t);return e.length>=3&&e[0].startsWith("File: ")&&e[1].startsWith("```")&&e.at(-1)?.startsWith("```")?e.slice(2,-1).join(` +`):t}a(oQe,"stripChunkTextMetadata");function Buo(t){return t.split(/\r\n|\r|\n/)}a(Buo,"splitLines");var Kx=de(vc()),wKr=de(hne()),RKr=de(m0());var kEe=new Se("ChunkingEndpointClient"),eDt=class t{constructor(e){this.ctx=e;this._maxParallelChunksRequests=8;this._maxAttempts=3;this.targetQuota=80;this.requestQueue=new wKr.LinkedList;this._numberInFlightRequests=0;this._lastSendTime=Date.now();this._isPumping=!1}static{a(this,"RequestRateLimiter")}static{this._abuseLimit=1e3/40}async enqueue(e,r){let n=new Kx.DeferredPromise;return r.onCancellationRequested(()=>n.cancel()),this.requestQueue.push({task:e,attempt:0,deferred:n,token:r}),await this.pump(),n.p}async pump(){if(!this._isPumping)try{for(this._isPumping=!0;!this.requestQueue.isEmpty();){this._rateLimitTimeout&&(await this._rateLimitTimeout,this._rateLimitTimeout=void 0);let e=Date.now()-this._lastSendTime;if(e=this._maxParallelChunksRequests){await(0,Kx.timeout)(10);continue}if(this._latestRateLimitHint){let o=Date.now();if(othis.targetQuota){let o=Date.now(),s=this._latestQuotaUsed.quota-this.targetQuota,c=o-this._latestQuotaUsed.timestamp,l=2500,u=1e3,d=s/(100-this.targetQuota);d*=Math.max(1-c/l,0);let p=d*u;p>0&&await(0,Kx.timeout)(Math.min(p,u))}let r=this.requestQueue.shift();if(r.token.isCancellationRequested){await r.deferred.cancel();continue}this._numberInFlightRequests++,this._lastSendTime=Date.now(),r.task(r.attempt).then(async o=>{if(this.updateQuotasFromResponse(o),r.token.isCancellationRequested){await r.deferred.cancel();return}if(o.ok){await r.deferred.complete(o);return}if(r.attempt0&&(this._rateLimitTimeout=(0,Kx.timeout)(s*1e3)),this.requestQueue.unshift({task:r.task,attempt:r.attempt+1,deferred:r.deferred,token:r.token}),await this.pump();return}await r.deferred.complete(o)}).catch(async o=>{await r.deferred.error(o)}).finally(()=>{this._numberInFlightRequests--})}}finally{this._isPumping=!1}}updateQuotasFromResponse(e){let r=Date.now();try{let n=e.headers.get("x-ratelimit-remaining"),o=e.headers.get("x-ratelimit-reset");n&&o&&(this._latestRateLimitHint={timestamp:r,remaining:parseFloat(n),resetAt:parseFloat(o)*1e3});let s=e.headers.get("x-github-total-quota-used");s&&(this._latestQuotaUsed?this._latestQuotaUsed={timestamp:r,quota:parseFloat(s)}:this._latestQuotaUsed={timestamp:r,quota:parseFloat(s)})}catch(n){kEe.error(this.ctx,"Error parsing rate limit/quota headers",n)}}getRequestRetryDelay(e){try{let r=e.headers.get("retry-after");if(r){let n=parseFloat(r);if(!isNaN(n))return n}}catch{kEe.error(this.ctx,"Error parsing retry-after header")}try{let r=e.headers.get("x-ratelimit-reset");if(r){let n=parseFloat(r);if(!isNaN(n)){let o=Math.floor(Date.now()/1e3);return n-o}}}catch{kEe.error(this.ctx,"Error parsing x-ratelimit-reset header")}return e.status===408?.25:2}},sQe=class{constructor(e){this.ctx=e;this._requestLimiter=new eDt(e)}static{a(this,"ChunkingEndpointClientImpl")}computeChunks(e,r,n,o,s,c,l){return this.doComputeChunksAndEmbeddings(e,r,n,o,{qos:s,computeEmbeddings:!1},c,l)}async computeChunksAndEmbeddings(e,r,n,o,s,c,l){return await this.doComputeChunksAndEmbeddings(e,r,n,o,{qos:s,computeEmbeddings:!0},c,l)}async doComputeChunksAndEmbeddings(e,r,n,o,s,c,l){let u=await(0,Kx.raceCancellationError)(n.getText(),l);if((0,RKr.isFalsyOrWhitespace)(u))return[];try{let d=a(async m=>{let g=Tne(this.ctx);return await au(this.ctx,e,"chunks",{headers:g,method:"POST",json:{embed:s.computeEmbeddings,qos:s.qos,content:u,path:mo(n.uri),local_hashes:c?Array.from(c.keys()):[],embedding_model:r.id}})},"makeRequest");o.recomputedFileCount++,o.sentContentTextLength+=u.length;let p=await(0,Kx.raceCancellationError)(this._requestLimiter.enqueue(d,l),l);if(!p.ok){kEe.error(this.ctx,`Error chunking '${n.uri.toString()}'. Status: ${p.status}.`);return}let h=await p.json();return h.chunks.length?(0,IKr.coalesce)(h.chunks.map(m=>{let g=new xKr.Range(m.line_range.start+1,1,m.line_range.end+1,1),A=c?.get(m.hash);if(A)return{chunk:{file:n.uri.toString(),text:oQe(A.chunk.text),rawText:void 0,range:g,isFullFile:A.chunk.isFullFile},chunkHash:m.hash,embedding:A.embedding};if(typeof m.text!="string")return;let y;if(m.embedding?.embedding){let E=new XE(h.embedding_model);if(!E.equals(r))throw new Error(`Unexpected embedding model. Got: ${E.id}. Expected: ${r.id}`);y={type:E,value:m.embedding.embedding}}if(!(s.computeEmbeddings&&!y))return{chunk:{file:n.uri.toString(),text:oQe(m.text),rawText:void 0,range:g,isFullFile:!1},chunkHash:m.hash,embedding:y}})):[]}catch(d){kEe.error(this.ctx,`Error chunking '${n.uri.toString()}'`,d);return}}};f();f();var qg={Tfidf:"semantic.search.tfidf",Embeddings:"semantic.search.embeddings",Remote:"semantic.search.remote",Aggregate:"semantic.search.aggregate"},hp=class t{static{a(this,"WorkspaceChunkSearchTelemetry")}static sendSuccess(e,r,n,o){let s={status_text:"success",...n},c=Pt.createAndMarkAsIssued(s,o);st(e,r,c),rr(e,r,c.properties,c.measurements)}static sendFailure(e,r,n){let o={status_text:"failure"};Lo(e,n,r,o),Sa(e,r,n,o)}static sendTfidfSuccess(e,r,n,o,s,c,l,u,d){t.sendSuccess(e,qg.Tfidf,{source:d},{timeTakenMs:r,rankingTimeMs:n,rerankingTimeMs:o,localSnippetCount:l,chunkCount:s,fileCount:c,totalFileCount:u})}static sendTfidfFailure(e,r){t.sendSearchFailure(e,qg.Tfidf,r)}static sendEmbeddingsSuccess(e,r,n,o,s,c,l){t.sendSuccess(e,qg.Embeddings,{source:l},{timeTakenMs:r,embeddingsTimeMs:n,chunkCount:o,fileCount:s,totalFileCount:c})}static sendEmbeddingsFailure(e,r){t.sendSearchFailure(e,qg.Embeddings,r)}static sendEmbeddingsSkipped(e,r){t.sendSkipped(e,qg.Embeddings,r)}static sendRemoteSuccess(e,r,n,o,s){t.sendSuccess(e,qg.Remote,{provider:s},{timeTakenMs:r,chunkCount:n,fileCount:o})}static sendRemoteFailure(e,r){t.sendSearchFailure(e,qg.Remote,r)}static sendRemoteSkipped(e,r){t.sendSkipped(e,qg.Remote,r)}static sendSearchFailure(e,r,n){t.sendFailure(e,r,n)}static sendSkipped(e,r,n){let o={status_text:"skipped",reason:n},s=Pt.createAndMarkAsIssued(o,{});st(e,r,s),rr(e,r,s.properties,s.measurements)}static sendAggregateSuccess(e,r,n,o,s,c,l){t.sendSuccess(e,qg.Aggregate,{provider:r,source:l},{timeTakenMs:n,chunkCount:o,fileCount:s,workspaceCount:c})}static sendAggregateFailure(e,r){t.sendFailure(e,qg.Aggregate,r)}};var PKr=de(Lc()),kKr=de(vc()),tDt=de(ck());var f4=new Se("Remote Search"),aQe=class{constructor(e,r,n,o){this.ctx=e;this._embeddingType=r;this._localDiffSearch=n;this._githubCodeSearchService=o;this.id="codesearch";this.localDiffSearchTimeout=15e3}static{a(this,"CodeSearchChunkSearch")}async isAvailable(e){return(await this.getRepos(e)).length>0}async getRepos(e){if(!e?.length)return[];let r=this.ctx.get(lm),o=(await Promise.all(e.map(async c=>await r.getRepo({uri:c})))).filter(c=>c!==void 0).filter(c=>c.isGitHub()&&c.owner&&c.name),s=new Map;for(let c of o){let l=`${c.owner}/${c.name}`;s.has(l)||s.set(l,c)}return Array.from(s.values())}async searchWorkspace(e,r,n){let o=new tDt.StopWatch,s=await this.getRepos(r.workspaceFolders);if(f4.info(this.ctx,"Starting workspace search",{rawQuery:e.rawQuery,repoCount:s.length,repos:s.map(P=>`${P.owner}/${P.name}`),maxResults:hm(r)}),s.length===0)throw f4.error(this.ctx,"No GitHub repositories found"),hp.sendRemoteSkipped(this.ctx,"no_github_repos"),new Error("No GitHub repositories found in CodeSearchChunkSearch");let c=await this.ctx.get(Nt).getGitHubSession();if(!c)throw f4.error(this.ctx,"No GitHub session found"),hp.sendRemoteSkipped(this.ctx,"no_github_session"),new Error("No GitHub session found in CodeSearchChunkSearch");let l=await this._githubCodeSearchService.ensureReposIndexed(c,s,n);if(l.length===0)throw f4.error(this.ctx,"Remote index not ready for any repositories"),hp.sendRemoteSkipped(this.ctx,"remote_index_not_ready"),new Error("Remote index not ready");let u=hm(r),d=Promise.all(l.map(async P=>{i0(n);let k=await e.resolveQuery(n),Q=new tDt.StopWatch,M=await this._githubCodeSearchService.searchRepo(c,this._embeddingType,P,k,u,n);return f4.info(this.ctx,`Search completed for ${P.owner}/${P.name}`,{searchTime:Q.elapsed(),chunkCount:M.chunks.length}),M})),p=await this._localDiffSearch.getLocalDiff(r.workspaceFolders),h=new Set(p),m=this._localDiffSearch.shouldDoLocalDiffSearch(p,r.workspaceFolders);f4.info(this.ctx,"Local diff files detected",{diffFileCount:p.length,allowLocalDiffSearch:m});let g;m&&(g=(0,kKr.raceTimeout)(this._localDiffSearch.searchLocalDiff(p,e,r,n),this.localDiffSearchTimeout,()=>{f4.warn(this.ctx,"Local diff search timed out",{timeout:this.localDiffSearchTimeout})}));let[A,y]=await Promise.all([d,g?.catch(P=>{f4.error(this.ctx,"Local diff search failed",P)})??Promise.resolve(void 0)]),E=(0,PKr.coalesce)(A).flatMap(P=>P.chunks),_=y?.isOk()?y.val.result.chunks:[],v=_.length>0?[...E.filter(P=>!h.has(P.chunk.file)),..._]:E,b=v.length,x=new Set(v.map(P=>P.chunk.file)).size,w=o.elapsed();f4.info(this.ctx,`Search completed successfully in ${w}ms`,{totalTime:w,totalChunkCount:b,uniqueFileCount:x,indexedRepoCount:l.length,localDiffChunkCount:_.length,localDiffStrategy:y?.isOk()?y.val.strategy:"none"});let R=y?.isOk()?"mixed":"codesearch";return hp.sendRemoteSuccess(this.ctx,w,b,x,R),{chunks:v}}};f();f();var vZr=require("node:url"),bZr=require("path");f();var CJr=require("node:buffer"),TQe=de(NKr(),1),CQe=de(QKr(),1),dXr=require("child_process"),YXr=de(oDt(),1),sZr=require("node:path"),Rne=de(oDt(),1),CZr=require("node:events");var wDt=Object.defineProperty,ldo=Object.getOwnPropertyDescriptor,RDt=Object.getOwnPropertyNames,udo=Object.prototype.hasOwnProperty,Pr=a((t,e)=>a(function(){return t&&(e=(0,t[RDt(t)[0]])(t=0)),e},"__init"),"__esm"),ddo=a((t,e)=>a(function(){return e||(0,t[RDt(t)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),g0=a((t,e)=>{for(var r in e)wDt(t,r,{get:e[r],enumerable:!0})},"__export"),fdo=a((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of RDt(e))!udo.call(t,o)&&o!==r&&wDt(t,o,{get:a(()=>e[o],"get"),enumerable:!(n=ldo(e,o))||n.enumerable});return t},"__copyProps"),Af=a(t=>fdo(wDt({},"__esModule",{value:!0}),t),"__toCommonJS");function fDt(...t){let e=new String(t);return bQe.set(e,t),e}a(fDt,"pathspec");function MEe(t){return t instanceof String&&bQe.has(t)}a(MEe,"isPathSpec");function qKr(t){return bQe.get(t)||[]}a(qKr,"toPaths");var bQe,kne=Pr({"src/lib/args/pathspec.ts"(){"use strict";bQe=new WeakMap}}),h4,lF=Pr({"src/lib/errors/git-error.ts"(){"use strict";h4=class extends Error{static{a(this,"GitError")}constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),LEe,Dne=Pr({"src/lib/errors/git-response-error.ts"(){"use strict";lF(),LEe=class extends h4{static{a(this,"GitResponseError")}constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),EJr,_Jr=Pr({"src/lib/errors/task-configuration-error.ts"(){"use strict";lF(),EJr=class extends h4{static{a(this,"TaskConfigurationError")}constructor(t){super(void 0,t)}}}});function vJr(t){return typeof t!="function"?Bj:t}a(vJr,"asFunction");function bJr(t){return typeof t=="function"&&t!==Bj}a(bJr,"isUserFunction");function TJr(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}a(TJr,"splitOn");function SJr(t,e=0){return IJr(t)&&t.length>e?t[e]:void 0}a(SJr,"first");function Oj(t,e=0){if(IJr(t)&&t.length>e)return t[t.length-1-e]}a(Oj,"last");function IJr(t){return wQe(t)}a(IJr,"isArrayLike");function FEe(t="",e=!0,r=` +`){return t.split(r).reduce((n,o)=>{let s=e?o.trim():o;return s&&n.push(s),n},[])}a(FEe,"toLinesWithContent");function PDt(t,e){return FEe(t,!0).map(r=>e(r))}a(PDt,"forEachLineWithContent");function kDt(t){return(0,TQe.exists)(t,TQe.FOLDER)}a(kDt,"folderExists");function DT(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}a(DT,"append");function xJr(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}a(xJr,"including");function SQe(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}a(SQe,"remove");function hk(t){return Array.isArray(t)?t:[t]}a(hk,"asArray");function wJr(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}a(wJr,"asCamelCase");function Nne(t){return hk(t).map(e=>e instanceof String?e:String(e))}a(Nne,"asStringArray");function ol(t,e=0){if(t==null)return e;let r=parseInt(t,10);return Number.isNaN(r)?e:r}a(ol,"asNumber");function OEe(t,e){let r=[];for(let n=0,o=t.length;n{t[n]!==void 0&&(r[n]=t[n])}),r}a(RJr,"pick");function pDt(t=0){return new Promise(e=>setTimeout(e,t))}a(pDt,"delay");function hDt(t){if(t!==!1)return t}a(hDt,"orVoid");var Pne,Bj,UEe,IQe=Pr({"src/lib/utils/util.ts"(){"use strict";DDt(),Pne="\0",Bj=a(()=>{},"NOOP"),UEe=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Gg(t,e,r){return e(t)?t:arguments.length>2?r:void 0}a(Gg,"filterType");function mDt(t,e){let r=MEe(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}a(mDt,"filterPrimitives");function xQe(t){return!!t&&UEe(t)==="[object Object]"}a(xQe,"filterPlainObject");function PJr(t){return typeof t=="function"}a(PJr,"filterFunction");var QEe,kJr,kd,EQe,wQe,DDt=Pr({"src/lib/utils/argument-filters.ts"(){"use strict";kne(),IQe(),QEe=a(t=>Array.isArray(t),"filterArray"),kJr=a(t=>typeof t=="number","filterNumber"),kd=a(t=>typeof t=="string"||MEe(t),"filterString"),EQe=a(t=>kd(t)||Array.isArray(t)&&t.every(kd),"filterStringOrStringArray"),wQe=a(t=>t==null||"number|boolean|function".includes(typeof t)?!1:typeof t.length=="number","filterHasLength")}}),gDt,pdo=Pr({"src/lib/utils/exit-codes.ts"(){"use strict";gDt=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(gDt||{})}}),_Qe,hdo=Pr({"src/lib/utils/git-output-streams.ts"(){"use strict";_Qe=class DJr{static{a(this,"_GitOutputStreams")}constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new DJr(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function mdo(){throw new Error("LineParser:useMatches not implemented")}a(mdo,"useMatchesDefault");var Yi,cF,gdo=Pr({"src/lib/utils/line-parser.ts"(){"use strict";Yi=class{static{a(this,"LineParser")}constructor(t,e){this.matches=[],this.useMatches=mdo,this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((o,s)=>this.addMatch(o,s,r(s)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let n=r&&t.exec(r);return n&&this.pushMatch(e,n),!!n}pushMatch(t,e){this.matches.push(...e.slice(1))}},cF=class extends Yi{static{a(this,"RemoteLineParser")}addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function NJr(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...MJr},...t.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}a(NJr,"createInstanceConfig");var MJr,Ado=Pr({"src/lib/utils/simple-git-options.ts"(){"use strict";MJr={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function NDt(t,e=[]){return xQe(t)?Object.keys(t).reduce((r,n)=>{let o=t[n];if(MEe(o))r.push(o);else if(mDt(o,["boolean"]))r.push(n+"="+o);else if(Array.isArray(o))for(let s of o)mDt(s,["string","number"])||r.push(n+"="+s);else r.push(n);return r},e):e}a(NDt,"appendTaskOptions");function sy(t,e=0,r=!1){let n=[];for(let o=0,s=e<0?t.length:e;o{for(let s=FEe(o,n),c=0,l=s.length;c{if(!(c+d>=l))return s[c+d]},"line");e.some(({parse:d})=>d(u,t))}}),t}a(o_,"parseStringResponse");var _do=Pr({"src/lib/utils/task-parser.ts"(){"use strict";IQe()}}),OJr={};g0(OJr,{ExitCodes:a(()=>gDt,"ExitCodes"),GitOutputStreams:a(()=>_Qe,"GitOutputStreams"),LineParser:a(()=>Yi,"LineParser"),NOOP:a(()=>Bj,"NOOP"),NULL:a(()=>Pne,"NULL"),RemoteLineParser:a(()=>cF,"RemoteLineParser"),append:a(()=>DT,"append"),appendTaskOptions:a(()=>NDt,"appendTaskOptions"),asArray:a(()=>hk,"asArray"),asCamelCase:a(()=>wJr,"asCamelCase"),asFunction:a(()=>vJr,"asFunction"),asNumber:a(()=>ol,"asNumber"),asStringArray:a(()=>Nne,"asStringArray"),bufferToString:a(()=>BEe,"bufferToString"),callTaskParser:a(()=>ADt,"callTaskParser"),createInstanceConfig:a(()=>NJr,"createInstanceConfig"),delay:a(()=>pDt,"delay"),filterArray:a(()=>QEe,"filterArray"),filterFunction:a(()=>PJr,"filterFunction"),filterHasLength:a(()=>wQe,"filterHasLength"),filterNumber:a(()=>kJr,"filterNumber"),filterPlainObject:a(()=>xQe,"filterPlainObject"),filterPrimitives:a(()=>mDt,"filterPrimitives"),filterString:a(()=>kd,"filterString"),filterStringOrStringArray:a(()=>EQe,"filterStringOrStringArray"),filterType:a(()=>Gg,"filterType"),first:a(()=>SJr,"first"),folderExists:a(()=>kDt,"folderExists"),forEachLineWithContent:a(()=>PDt,"forEachLineWithContent"),getTrailingOptions:a(()=>sy,"getTrailingOptions"),including:a(()=>xJr,"including"),isUserFunction:a(()=>bJr,"isUserFunction"),last:a(()=>Oj,"last"),objectToString:a(()=>UEe,"objectToString"),orVoid:a(()=>hDt,"orVoid"),parseStringResponse:a(()=>o_,"parseStringResponse"),pick:a(()=>RJr,"pick"),prefixedArray:a(()=>OEe,"prefixedArray"),remove:a(()=>SQe,"remove"),splitOn:a(()=>TJr,"splitOn"),toLinesWithContent:a(()=>FEe,"toLinesWithContent"),trailingFunctionArgument:a(()=>_u,"trailingFunctionArgument"),trailingOptionsArgument:a(()=>MDt,"trailingOptionsArgument")});var ki=Pr({"src/lib/utils/index.ts"(){"use strict";DDt(),pdo(),hdo(),gdo(),Ado(),Edo(),_do(),IQe()}}),BJr={};g0(BJr,{CheckRepoActions:a(()=>yDt,"CheckRepoActions"),checkIsBareRepoTask:a(()=>FJr,"checkIsBareRepoTask"),checkIsRepoRootTask:a(()=>LJr,"checkIsRepoRootTask"),checkIsRepoTask:a(()=>Cdo,"checkIsRepoTask")});function Cdo(t){switch(t){case"bare":return FJr();case"root":return LJr()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:RQe,parser:ODt}}a(Cdo,"checkIsRepoTask");function LJr(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:RQe,parser(e){return/^\.(git)?$/.test(e.trim())}}}a(LJr,"checkIsRepoRootTask");function FJr(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:RQe,parser:ODt}}a(FJr,"checkIsBareRepoTask");function vdo(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}a(vdo,"isNotRepoMessage");var yDt,RQe,ODt,UJr=Pr({"src/lib/tasks/check-is-repo.ts"(){"use strict";ki(),yDt=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(yDt||{}),RQe=a(({exitCode:t},e,r,n)=>{if(t===128&&vdo(e))return r(Buffer.from("false"));n(e)},"onError"),ODt=a(t=>t.trim()==="true","parser")}});function bdo(t,e){let r=new QJr(t),n=t?GJr:qJr;return FEe(e).forEach(o=>{let s=o.replace(n,"");r.paths.push(s),(HJr.test(s)?r.folders:r.files).push(s)}),r}a(bdo,"cleanSummaryParser");var QJr,qJr,GJr,HJr,Tdo=Pr({"src/lib/responses/CleanSummary.ts"(){"use strict";ki(),QJr=class{static{a(this,"CleanResponse")}constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},qJr=/^[a-z]+\s*/i,GJr=/^[a-z]+\s+[a-z]+\s*/i,HJr=/\/$/}}),EDt={};g0(EDt,{EMPTY_COMMANDS:a(()=>PQe,"EMPTY_COMMANDS"),adhocExecTask:a(()=>jJr,"adhocExecTask"),configurationErrorTask:a(()=>i_,"configurationErrorTask"),isBufferTask:a(()=>VJr,"isBufferTask"),isEmptyTask:a(()=>WJr,"isEmptyTask"),straightThroughBufferTask:a(()=>$Jr,"straightThroughBufferTask"),straightThroughStringTask:a(()=>ay,"straightThroughStringTask")});function jJr(t){return{commands:PQe,format:"empty",parser:t}}a(jJr,"adhocExecTask");function i_(t){return{commands:PQe,format:"empty",parser(){throw typeof t=="string"?new EJr(t):t}}}a(i_,"configurationErrorTask");function ay(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}a(ay,"straightThroughStringTask");function $Jr(t){return{commands:t,format:"buffer",parser(e){return e}}}a($Jr,"straightThroughBufferTask");function VJr(t){return t.format==="buffer"}a(VJr,"isBufferTask");function WJr(t){return t.format==="empty"||!t.commands.length}a(WJr,"isEmptyTask");var PQe,yf=Pr({"src/lib/tasks/task.ts"(){"use strict";_Jr(),PQe=[]}}),zJr={};g0(zJr,{CONFIG_ERROR_INTERACTIVE_MODE:a(()=>BDt,"CONFIG_ERROR_INTERACTIVE_MODE"),CONFIG_ERROR_MODE_REQUIRED:a(()=>LDt,"CONFIG_ERROR_MODE_REQUIRED"),CONFIG_ERROR_UNKNOWN_OPTION:a(()=>FDt,"CONFIG_ERROR_UNKNOWN_OPTION"),CleanOptions:a(()=>mQe,"CleanOptions"),cleanTask:a(()=>YJr,"cleanTask"),cleanWithOptionsTask:a(()=>Sdo,"cleanWithOptionsTask"),isCleanOptionsArray:a(()=>Ido,"isCleanOptionsArray")});function Sdo(t,e){let{cleanMode:r,options:n,valid:o}=xdo(t);return r?o.options?(n.push(...e),n.some(Pdo)?i_(BDt):YJr(r,n)):i_(FDt+JSON.stringify(t)):i_(LDt)}a(Sdo,"cleanWithOptionsTask");function YJr(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(n){return bdo(t==="n",n)}}}a(YJr,"cleanTask");function Ido(t){return Array.isArray(t)&&t.every(e=>UDt.has(e))}a(Ido,"isCleanOptionsArray");function xdo(t){let e,r=[],n={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(o=>{wdo(o)?(e=o,n.cleanMode=!0):n.options=n.options&&Rdo(r[r.length]=`-${o}`)}),{cleanMode:e,options:r,valid:n}}a(xdo,"getCleanOptions");function wdo(t){return t==="f"||t==="n"}a(wdo,"isCleanMode");function Rdo(t){return/^-[a-z]$/i.test(t)&&UDt.has(t.charAt(1))}a(Rdo,"isKnownOption");function Pdo(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}a(Pdo,"isInteractiveMode");var BDt,LDt,FDt,mQe,UDt,KJr=Pr({"src/lib/tasks/clean.ts"(){"use strict";Tdo(),ki(),yf(),BDt="Git clean interactive mode is not supported",LDt='Git clean mode parameter ("n" or "f") is required',FDt="Git clean unknown option found in: ",mQe=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(mQe||{}),UDt=new Set(["i",...Nne(Object.values(mQe))])}});function kdo(t){let e=new XJr;for(let r of JJr(t))e.addValue(r.file,String(r.key),r.value);return e}a(kdo,"configListParser");function Ddo(t,e){let r=null,n=[],o=new Map;for(let s of JJr(t,e))s.key===e&&(n.push(r=s.value),o.has(s.file)||o.set(s.file,[]),o.get(s.file).push(r));return{key:e,paths:Array.from(o.keys()),scopes:o,value:r,values:n}}a(Ddo,"configGetParser");function Ndo(t){return t.replace(/^(file):/,"")}a(Ndo,"configFilePath");function*JJr(t,e=null){let r=t.split("\0");for(let n=0,o=r.length-1;nObject.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=Oj(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let n=this.addFile(t);Object.hasOwn(n,e)?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r,this._all=void 0}}}});function sDt(t,e){return typeof t=="string"&&Object.hasOwn(_Dt,t)?t:e}a(sDt,"asConfigScope");function Odo(t,e,r,n){let o=["config",`--${n}`];return r&&o.push("--add"),o.push(t,e),{commands:o,format:"utf-8",parser(s){return s}}}a(Odo,"addConfigTask");function Bdo(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(n){return Ddo(n,t)}}}a(Bdo,"getConfigTask");function Ldo(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return kdo(r)}}}a(Ldo,"listConfigTask");function Fdo(){return{addConfig(t,e,...r){return this._runTask(Odo(t,e,r[0]===!0,sDt(r[1],"local")),_u(arguments))},getConfig(t,e){return this._runTask(Bdo(t,sDt(e,void 0)),_u(arguments))},listConfig(...t){return this._runTask(Ldo(sDt(t[0],void 0)),_u(arguments))}}}a(Fdo,"config_default");var _Dt,ZJr=Pr({"src/lib/tasks/config.ts"(){"use strict";Mdo(),ki(),_Dt=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(_Dt||{})}});function Udo(t){return eXr.has(t)}a(Udo,"isDiffNameStatus");var aDt,eXr,tXr=Pr({"src/lib/tasks/diff-name-status.ts"(){"use strict";aDt=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(aDt||{}),eXr=new Set(Object.values(aDt))}});function Qdo(...t){return new nXr().param(...t)}a(Qdo,"grepQueryBuilder");function qdo(t){let e=new Set,r={};return PDt(t,n=>{let[o,s,c]=n.split(Pne);e.add(o),(r[o]=r[o]||[]).push({line:ol(s),path:o,preview:c})}),{paths:e,results:r}}a(qdo,"parseGrep");function Gdo(){return{grep(t){let e=_u(arguments),r=sy(arguments);for(let o of rXr)if(r.includes(o))return this._runTask(i_(`git.grep: use of "${o}" is not supported.`),e);typeof t=="string"&&(t=Qdo().param(t));let n=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:n,format:"utf-8",parser(o){return qdo(o)}},e)}}}a(Gdo,"grep_default");var rXr,DEe,GKr,nXr,iXr=Pr({"src/lib/tasks/grep.ts"(){"use strict";ki(),yf(),rXr=["-h"],DEe=Symbol("grepQuery"),nXr=class{static{a(this,"GrepQuery")}constructor(){this[GKr]=[]}*[(GKr=DEe,Symbol.iterator)](){for(let t of this[DEe])yield t}and(...t){return t.length&&this[DEe].push("--and","(",...OEe(t,"-e"),")"),this}param(...t){return this[DEe].push(...OEe(t,"-e")),this}}}}),oXr={};g0(oXr,{ResetMode:a(()=>gQe,"ResetMode"),getResetMode:a(()=>jdo,"getResetMode"),resetTask:a(()=>Hdo,"resetTask")});function Hdo(t,e){let r=["reset"];return sXr(t)&&r.push(`--${t}`),r.push(...e),ay(r)}a(Hdo,"resetTask");function jdo(t){if(sXr(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}a(jdo,"getResetMode");function sXr(t){return typeof t=="string"&&aXr.includes(t)}a(sXr,"isValidResetMode");var gQe,aXr,cXr=Pr({"src/lib/tasks/reset.ts"(){"use strict";ki(),yf(),gQe=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(gQe||{}),aXr=Nne(Object.values(gQe))}});function $do(){return(0,CQe.default)("simple-git")}a($do,"createLog");function HKr(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(n,...o)=>{t(n,...o),r(n,...o)}:t:(n,...o)=>{t(`%s ${n}`,e,...o),r&&r(n,...o)}}a(HKr,"prefixedLogger");function Vdo(t,e,{namespace:r}){if(typeof t=="string")return t;let n=e&&e.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}a(Vdo,"childLoggerName");function QDt(t,e,r,n=$do()){let o=t&&`[${t}]`||"",s=[],c=typeof e=="string"?n.extend(e):e,l=Vdo(Gg(e,kd),c,n);return d(r);function u(p,h){return DT(s,QDt(t,l.replace(/^[^:]+/,p),h,n))}function d(p){let h=p&&`[${p}]`||"",m=c&&HKr(c,h)||Bj,g=HKr(n,`${o} ${h}`,m);return Object.assign(c?m:g,{label:t,sibling:u,info:g,step:d})}}a(QDt,"createLogger");var lXr=Pr({"src/lib/git-logger.ts"(){"use strict";ki(),CQe.default.formatters.L=t=>String(wQe(t)?t.length:"-"),CQe.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):UEe(t)}}),uXr,Wdo=Pr({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";lF(),lXr(),uXr=class CDt{static{a(this,"_TasksPendingQueue")}constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let r=CDt.getName(e.commands[0]),n=QDt(this.logLabel,r);return{task:e,logger:n,name:r}}push(e){let r=this.createProgress(e);return r.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,r),r}fatal(e){for(let[r,{logger:n}]of Array.from(this._queue.entries()))r===e.task?(n.info("Failed %o",e),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(r);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let r=this.withProgress(e);if(!r)throw new h4(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(e="empty"){return`task:${e}:${++CDt.counter}`}static{this.counter=0}}}});function Mj(t,e){return{method:SJr(t.commands)||"",commands:e}}a(Mj,"pluginContext");function zdo(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(Buffer.from(String(r.stack),"ascii"))}}a(zdo,"onErrorReceived");function jKr(t,e,r,n){return o=>{r("%s received %L bytes",e,o),n("%B",o),t.push(o)}}a(jKr,"onDataReceived");var vDt,Ydo=Pr({"src/lib/runners/git-executor-chain.ts"(){"use strict";lF(),yf(),ki(),Wdo(),vDt=class{static{a(this,"GitExecutorChain")}constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new uXr}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}async attemptTask(t){let e=await this._scheduler.next(),r=a(()=>this._queue.complete(t),"onQueueComplete");try{let{logger:n}=this._queue.attempt(t);return await(WJr(t)?this.attemptEmptyTask(t,n):this.attemptRemoteTask(t,n))}catch(n){throw this.onFatalException(t,n)}finally{r(),e()}}onFatalException(t,e){let r=e instanceof h4?Object.assign(e,{task:t}):new h4(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(t,e){let r=this._plugins.exec("spawn.binary","",Mj(t,t.commands)),n=this._plugins.exec("spawn.args",[...t.commands],Mj(t,t.commands)),o=await this.gitResponse(t,r,n,this.outputHandler,e.step("SPAWN")),s=await this.handleTaskData(t,n,o,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),VJr(t)?ADt(t.parser,s):ADt(t.parser,s.asStrings())}async attemptEmptyTask(t,e){return e("empty task bypassing child process to call to task's parser"),t.parser(this)}handleTaskData(t,e,r,n){let{exitCode:o,rejection:s,stdOut:c,stdErr:l}=r;return new Promise((u,d)=>{n("Preparing to handle process response exitCode=%d stdOut=",o);let{error:p}=this._plugins.exec("task.error",{error:s},{...Mj(t,e),...r});if(p&&t.onError)return n.info("exitCode=%s handling with custom error handler"),t.onError(r,p,h=>{n.info("custom error handler treated as success"),n("custom error returned a %s",UEe(h)),u(new _Qe(Array.isArray(h)?Buffer.concat(h):h,Buffer.concat(l)))},d);if(p)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",o,l.length,s),d(p);n.info("retrieving task output complete"),u(new _Qe(Buffer.concat(c),Buffer.concat(l)))})}async gitResponse(t,e,r,n,o){let s=o.sibling("output"),c=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Mj(t,t.commands));return new Promise(l=>{let u=[],d=[];o.info("%s %o",e,r),o("%O",c);let p=this._beforeSpawn(t,r);if(p)return l({stdOut:u,stdErr:d,exitCode:9901,rejection:p});this._plugins.exec("spawn.before",void 0,{...Mj(t,r),kill(m){p=m||p}});let h=(0,dXr.spawn)(e,r,c);h.stdout.on("data",jKr(u,"stdOut",o,s.step("stdOut"))),h.stderr.on("data",jKr(d,"stdErr",o,s.step("stdErr"))),h.on("error",zdo(d,o)),n&&(o("Passing child process stdOut/stdErr to custom outputHandler"),n(e,h.stdout,h.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...Mj(t,r),spawned:h,close(m,g){l({stdOut:u,stdErr:d,exitCode:m,rejection:p||g})},kill(m){h.killed||(p=m,h.kill("SIGINT"))}})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,{...Mj(t,e),kill(n){r=n||r}}),r}}}}),fXr={};g0(fXr,{GitExecutor:a(()=>pXr,"GitExecutor")});var pXr,Kdo=Pr({"src/lib/runners/git-executor.ts"(){"use strict";Ydo(),pXr=class{static{a(this,"GitExecutor")}constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new vDt(this,this._scheduler,this._plugins)}chain(){return new vDt(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function Jdo(t,e,r=Bj){let n=a(s=>{r(null,s)},"onSuccess"),o=a(s=>{s?.task===t&&r(s instanceof LEe?Xdo(s):s,void 0)},"onError2");e.then(n,o)}a(Jdo,"taskCallback");function Xdo(t){let e=a(n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),e=Bj},"log");return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(n,o){return o in t||(n[o]={enumerable:!1,configurable:!1,get(){return e(o),t.git[o]}}),n}}a(Xdo,"addDeprecationNoticeToError");var Zdo=Pr({"src/lib/task-callback.ts"(){"use strict";Dne(),ki()}});function $Kr(t,e){return jJr(r=>{if(!kDt(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}a($Kr,"changeWorkingDirectoryTask");var efo=Pr({"src/lib/tasks/change-working-directory.ts"(){"use strict";ki(),yf()}});function cDt(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=SQe(e,"-B")),ay(e)}a(cDt,"checkoutTask");function tfo(){return{checkout(){return this._runTask(cDt(sy(arguments,1)),_u(arguments))},checkoutBranch(t,e){return this._runTask(cDt(["-b",t,e,...sy(arguments)]),_u(arguments))},checkoutLocalBranch(t){return this._runTask(cDt(["-b",t,...sy(arguments)]),_u(arguments))}}}a(tfo,"checkout_default");var rfo=Pr({"src/lib/tasks/checkout.ts"(){"use strict";ki(),yf()}});function nfo(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}a(nfo,"countObjectsResponse");function ifo(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return o_(nfo(),[hXr],t)}})}}}a(ifo,"count_objects_default");var hXr,ofo=Pr({"src/lib/tasks/count-objects.ts"(){"use strict";ki(),hXr=new Yi(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let n=wJr(e);Object.hasOwn(t,n)&&(t[n]=ol(r))})}});function sfo(t){return o_({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},mXr,t)}a(sfo,"parseCommitResult");var mXr,afo=Pr({"src/lib/parsers/parse-commit.ts"(){"use strict";ki(),mXr=[new Yi(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,n])=>{t.branch=e,t.commit=n,t.root=!!r}),new Yi(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),n=r.pop();!n||!n.includes("@")||(t.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new Yi(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(n,10)||0}),new Yi(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,n])=>{t.summary.changes=parseInt(e,10)||0;let o=parseInt(r,10)||0;n==="-"?t.summary.deletions=o:n==="+"&&(t.summary.insertions=o)})]}});function cfo(t,e,r){return{commands:["-c","core.abbrev=40","commit",...OEe(t,"-m"),...e,...r],format:"utf-8",parser:sfo}}a(cfo,"commitTask");function lfo(){return{commit(e,...r){let n=_u(arguments),o=t(e)||cfo(hk(e),hk(Gg(r[0],EQe,[])),[...Nne(Gg(r[1],QEe,[])),...sy(arguments,0,!0)]);return this._runTask(o,n)}};function t(e){return!EQe(e)&&i_("git.commit: requires the commit message to be supplied as a string/string[]")}}a(lfo,"commit_default");var ufo=Pr({"src/lib/tasks/commit.ts"(){"use strict";afo(),ki(),yf()}});function dfo(){return{firstCommit(){return this._runTask(ay(["rev-list","--max-parents=0","HEAD"],!0),_u(arguments))}}}a(dfo,"first_commit_default");var ffo=Pr({"src/lib/tasks/first-commit.ts"(){"use strict";ki(),yf()}});function pfo(t,e){let r=["hash-object",t];return e&&r.push("-w"),ay(r,!0)}a(pfo,"hashObjectTask");var hfo=Pr({"src/lib/tasks/hash-object.ts"(){"use strict";yf()}});function mfo(t,e,r){let n=String(r).trim(),o;if(o=gXr.exec(n))return new AQe(t,e,!1,o[1]);if(o=AXr.exec(n))return new AQe(t,e,!0,o[1]);let s="",c=n.split(" ");for(;c.length;)if(c.shift()==="in"){s=c.join(" ");break}return new AQe(t,e,/^re/i.test(n),s)}a(mfo,"parseInit");var AQe,gXr,AXr,gfo=Pr({"src/lib/responses/InitSummary.ts"(){"use strict";AQe=class{static{a(this,"InitSummary")}constructor(t,e,r,n){this.bare=t,this.path=e,this.existing=r,this.gitDir=n}},gXr=/^Init.+ repository in (.+)$/,AXr=/^Rein.+ in (.+)$/}});function Afo(t){return t.includes(qDt)}a(Afo,"hasBareCommand");function yfo(t=!1,e,r){let n=["init",...r];return t&&!Afo(n)&&n.splice(1,0,qDt),{commands:n,format:"utf-8",parser(o){return mfo(n.includes("--bare"),e,o)}}}a(yfo,"initTask");var qDt,Efo=Pr({"src/lib/tasks/init.ts"(){"use strict";gfo(),qDt="--bare"}});function GDt(t){for(let e=0;eo_(new yXr,e,r,!1)}a(EXr,"getDiffParser");var lDt,VKr,WKr,zKr,_Xr,CXr=Pr({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";qEe(),Cfo(),tXr(),ki(),lDt=[new Yi(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,n=""])=>{t.files.push({file:e.trim(),changes:ol(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new Yi(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,n])=>{t.files.push({file:e.trim(),before:ol(r),after:ol(n),binary:!0})}),new Yi(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let n=/(\d+) i/.exec(r),o=/(\d+) d/.exec(r);t.changed=ol(e),t.insertions=ol(n?.[1]),t.deletions=ol(o?.[1])})],VKr=[new Yi(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,n])=>{let o=ol(e),s=ol(r);t.changed++,t.insertions+=o,t.deletions+=s,t.files.push({file:n,changes:o+s,insertions:o,deletions:s,binary:!1})}),new Yi(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],WKr=[new Yi(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],zKr=[new Yi(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,n,o,s])=>{t.changed++,t.files.push({file:s??n,changes:0,insertions:0,deletions:0,binary:!1,status:hDt(Udo(e)&&e),from:hDt(!!s&&n!==s&&n),similarity:ol(r)})})],_Xr={"":lDt,"--stat":lDt,"--numstat":VKr,"--name-status":zKr,"--name-only":WKr}}});function vfo(t,e){return e.reduce((r,n,o)=>(r[n]=t[o]||"",r),Object.create({diff:null}))}a(vfo,"lineBuilder");function vXr(t=VDt,e=bXr,r=""){let n=EXr(r);return function(o){let s=FEe(o.trim(),!1,jDt).map(function(c){let l=c.split($Dt),u=vfo(l[0].split(t),e);return l.length>1&&l[1].trim()&&(u.diff=n(l[1])),u});return{all:s,latest:s.length&&s[0]||null,total:s.length}}}a(vXr,"createListLogSummaryParser");var jDt,$Dt,VDt,bXr,TXr=Pr({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";ki(),CXr(),qEe(),jDt="\xF2\xF2\xF2\xF2\xF2\xF2 ",$Dt=" \xF2\xF2",VDt=" \xF2 ",bXr=["hash","date","message","refs","author_name","author_email"]}}),SXr={};g0(SXr,{diffSummaryTask:a(()=>bfo,"diffSummaryTask"),validateLogFormatConfig:a(()=>kQe,"validateLogFormatConfig")});function bfo(t){let e=GDt(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),kQe(r)||{commands:r,format:"utf-8",parser:EXr(e)}}a(bfo,"diffSummaryTask");function kQe(t){let e=t.filter(_fo);if(e.length>1)return i_(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return i_(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}a(kQe,"validateLogFormatConfig");var WDt=Pr({"src/lib/tasks/diff.ts"(){"use strict";qEe(),CXr(),yf()}});function Tfo(t,e){let r=[],n=[];return Object.keys(t).forEach(o=>{r.push(o),n.push(String(t[o]))}),[r,n.join(e)]}a(Tfo,"prettyFormat");function Sfo(t){return Object.keys(t).reduce((e,r)=>(r in bDt||(e[r]=t[r]),e),{})}a(Sfo,"userOptions");function IXr(t={},e=[]){let r=Gg(t.splitter,kd,VDt),n=xQe(t.format)?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[o,s]=Tfo(n,r),c=[],l=[`--pretty=format:${jDt}${s}${$Dt}`,...e],u=t.n||t["max-count"]||t.maxCount;if(u&&l.push(`--max-count=${u}`),t.from||t.to){let d=t.symmetric!==!1?"...":"..";c.push(`${t.from||""}${d}${t.to||""}`)}return kd(t.file)&&l.push("--follow",fDt(t.file)),NDt(Sfo(t),l),{fields:o,splitter:r,commands:[...l,...c]}}a(IXr,"parseLogOptions");function Ifo(t,e,r){let n=vXr(t,e,GDt(r));return{commands:["log",...r],format:"utf-8",parser:n}}a(Ifo,"logTask");function xfo(){return{log(...r){let n=_u(arguments),o=IXr(MDt(arguments),Nne(Gg(arguments[0],QEe,[]))),s=e(...r)||kQe(o.commands)||t(o);return this._runTask(s,n)}};function t(r){return Ifo(r.splitter,r.fields,r.commands)}function e(r,n){return kd(r)&&kd(n)&&i_("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}a(xfo,"log_default");var bDt,xXr=Pr({"src/lib/tasks/log.ts"(){"use strict";qEe(),kne(),TXr(),ki(),yf(),WDt(),bDt=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))(bDt||{})}}),yQe,wXr,wfo=Pr({"src/lib/responses/MergeSummary.ts"(){"use strict";yQe=class{static{a(this,"MergeSummaryConflict")}constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},wXr=class{static{a(this,"MergeSummaryDetail")}constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),TDt,RXr,Rfo=Pr({"src/lib/responses/PullSummary.ts"(){"use strict";TDt=class{static{a(this,"PullSummary")}constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},RXr=class{static{a(this,"PullFailedSummary")}constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function uDt(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}a(uDt,"objectEnumerationResult");function YKr(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:ol(e&&e[1]||"0"),delta:ol(r&&r[1]||"0")}}a(YKr,"asObjectCount");var PXr,Pfo=Pr({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";ki(),PXr=[new cF(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let n=e.toLowerCase(),o=uDt(t.remoteMessages);Object.assign(o,{[n]:ol(r)})}),new cF(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let n=e.toLowerCase(),o=uDt(t.remoteMessages);Object.assign(o,{[n]:ol(r)})}),new cF(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,n])=>{let o=uDt(t.remoteMessages);o.total=YKr(e),o.reused=YKr(r),o.packReused=ol(n)})]}});function kXr(t,e){return o_({remoteMessages:new NXr},DXr,e)}a(kXr,"parseRemoteMessages");var DXr,NXr,MXr=Pr({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";ki(),Pfo(),DXr=[new cF(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...PXr,new cF([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new cF([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,n])=>{t.remoteMessages.vulnerabilities={count:ol(e),summary:r,url:n}})],NXr=class{static{a(this,"RemoteMessageSummary")}constructor(){this.all=[]}}}});function kfo(t,e){let r=o_(new RXr,OXr,[t,e]);return r.message&&r}a(kfo,"parsePullErrorResult");var KKr,JKr,XKr,ZKr,OXr,eJr,zDt,BXr=Pr({"src/lib/parsers/parse-pull.ts"(){"use strict";Rfo(),ki(),MXr(),KKr=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,JKr=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,XKr=/^(create|delete) mode \d+ (.+)/,ZKr=[new Yi(KKr,(t,[e,r,n])=>{t.files.push(e),r&&(t.insertions[e]=r.length),n&&(t.deletions[e]=n.length)}),new Yi(JKr,(t,[e,,r,,n])=>r!==void 0||n!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+n||0,!0):!1),new Yi(XKr,(t,[e,r])=>{DT(t.files,r),DT(e==="create"?t.created:t.deleted,r)})],OXr=[new Yi(/^from\s(.+)$/i,(t,[e])=>{t.remote=e}),new Yi(/^fatal:\s(.+)$/,(t,[e])=>{t.message=e}),new Yi(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,n,o])=>{t.branch.local=n,t.hash.local=e,t.branch.remote=o,t.hash.remote=r})],eJr=a((t,e)=>o_(new TDt,ZKr,[t,e]),"parsePullDetail"),zDt=a((t,e)=>Object.assign(new TDt,eJr(t,e),kXr(t,e)),"parsePullResult")}}),tJr,LXr,rJr,Dfo=Pr({"src/lib/parsers/parse-merge.ts"(){"use strict";wfo(),ki(),BXr(),tJr=[new Yi(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new Yi(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new yQe(e,r))}),new Yi(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,n])=>{t.conflicts.push(new yQe(e,r,{deleteRef:n}))}),new Yi(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new yQe(e,null))}),new Yi(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],LXr=a((t,e)=>Object.assign(rJr(t,e),zDt(t,e)),"parseMergeResult"),rJr=a(t=>o_(new wXr,tJr,t),"parseMergeDetail")}});function nJr(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let n=LXr(e,r);if(n.failed)throw new LEe(n);return n}}:i_("Git.merge requires at least one option")}a(nJr,"mergeTask");var Nfo=Pr({"src/lib/tasks/merge.ts"(){"use strict";Dne(),Dfo(),yf()}});function Mfo(t,e,r){let n=r.includes("deleted"),o=r.includes("tag")||/^refs\/tags/.test(t),s=!r.includes("new");return{deleted:n,tag:o,branch:!o,new:!s,alreadyUpdated:s,local:t,remote:e}}a(Mfo,"pushResultPushedItem");var iJr,FXr,oJr,Ofo=Pr({"src/lib/parsers/parse-push.ts"(){"use strict";ki(),MXr(),iJr=[new Yi(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new Yi(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref={...t.ref||{},local:e}}),new Yi(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,n])=>{t.pushed.push(Mfo(e,r,n))}),new Yi(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,n])=>{t.branch={...t.branch||{},local:e,remote:r,remoteName:n}}),new Yi(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,n,o])=>{t.update={head:{local:e,remote:r},hash:{from:n,to:o}}})],FXr=a((t,e)=>{let r=oJr(t,e),n=kXr(t,e);return{...r,...n}},"parsePushResult"),oJr=a((t,e)=>o_({pushed:[]},iJr,[t,e]),"parsePushDetail")}}),UXr={};g0(UXr,{pushTagsTask:a(()=>Bfo,"pushTagsTask"),pushTask:a(()=>YDt,"pushTask")});function Bfo(t={},e){return DT(e,"--tags"),YDt(t,e)}a(Bfo,"pushTagsTask");function YDt(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),SQe(r,"-v"),DT(r,"--verbose"),DT(r,"--porcelain"),{commands:r,format:"utf-8",parser:FXr}}a(YDt,"pushTask");var QXr=Pr({"src/lib/tasks/push.ts"(){"use strict";Ofo(),ki()}});function Lfo(){return{showBuffer(){let t=["show",...sy(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask($Jr(t),_u(arguments))},show(){let t=["show",...sy(arguments,1)];return this._runTask(ay(t),_u(arguments))}}}a(Lfo,"show_default");var Ffo=Pr({"src/lib/tasks/show.ts"(){"use strict";ki(),yf()}}),sJr,qXr,Ufo=Pr({"src/lib/responses/FileStatusSummary.ts"(){"use strict";sJr=/^(.+)\0(.+)$/,qXr=class{static{a(this,"FileStatusSummary")}constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let n=sJr.exec(t)||[null,t,t];this.from=n[2]||"",this.path=n[1]||""}}}}});function aJr(t){let[e,r]=t.split(Pne);return{from:r||e,to:e}}a(aJr,"renamedFile");function J1(t,e,r){return[`${t}${e}`,r]}a(J1,"parser3");function dDt(t,...e){return e.map(r=>J1(t,r,(n,o)=>n.conflicted.push(o)))}a(dDt,"conflicts");function Qfo(t,e){let r=e.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.slice(3));case r.charAt(1):return n(" ",r.charAt(0),r.slice(2));default:return}function n(o,s,c){let l=`${o}${s}`,u=GXr.get(l);u&&u(t,c),l!=="##"&&l!=="!!"&&t.files.push(new qXr(c,o,s))}a(n,"data")}a(Qfo,"splitLine");var cJr,GXr,HXr,qfo=Pr({"src/lib/responses/StatusSummary.ts"(){"use strict";ki(),Ufo(),cJr=class{static{a(this,"StatusSummary")}constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},GXr=new Map([J1(" ","A",(t,e)=>t.created.push(e)),J1(" ","D",(t,e)=>t.deleted.push(e)),J1(" ","M",(t,e)=>t.modified.push(e)),J1("A"," ",(t,e)=>{t.created.push(e),t.staged.push(e)}),J1("A","M",(t,e)=>{t.created.push(e),t.staged.push(e),t.modified.push(e)}),J1("D"," ",(t,e)=>{t.deleted.push(e),t.staged.push(e)}),J1("M"," ",(t,e)=>{t.modified.push(e),t.staged.push(e)}),J1("M","M",(t,e)=>{t.modified.push(e),t.staged.push(e)}),J1("R"," ",(t,e)=>{t.renamed.push(aJr(e))}),J1("R","M",(t,e)=>{let r=aJr(e);t.renamed.push(r),t.modified.push(r.to)}),J1("!","!",(t,e)=>{(t.ignored=t.ignored||[]).push(e)}),J1("?","?",(t,e)=>t.not_added.push(e)),...dDt("A","A","U"),...dDt("D","D","U"),...dDt("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,o=/^(.+?(?=(?:\.{3}|\s|$)))/,s=/\.{3}(\S*)/,c=/\son\s(\S+?)(?=\.{3}|$)/,l=r.exec(e);t.ahead=l&&+l[1]||0,l=n.exec(e),t.behind=l&&+l[1]||0,l=o.exec(e),t.current=Gg(l?.[1],kd,null),l=s.exec(e),t.tracking=Gg(l?.[1],kd,null),l=c.exec(e),l&&(t.current=Gg(l?.[1],kd,t.current)),t.detached=/\(no branch\)/.test(e)}]]),HXr=a(function(t){let e=t.split(Pne),r=new cJr;for(let n=0,o=e.length;n!jXr.includes(r))],parser(r){return HXr(r)}}}a(Gfo,"statusTask");var jXr,Hfo=Pr({"src/lib/tasks/status.ts"(){"use strict";qfo(),jXr=["--null","-z"]}});function vQe(t=0,e=0,r=0,n="",o=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:n,installed:o},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}a(vQe,"versionResponse");function jfo(){return vQe(0,0,0,"",!1)}a(jfo,"notInstalledResponse");function $fo(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Vfo,onError(t,e,r,n){if(t.exitCode===-2)return r(Buffer.from(KDt));n(e)}})}}}a($fo,"version_default");function Vfo(t){return t===KDt?jfo():o_(vQe(0,0,0,t),$Xr,t)}a(Vfo,"versionParser");var KDt,$Xr,Wfo=Pr({"src/lib/tasks/version.ts"(){"use strict";ki(),KDt="installed=false",$Xr=[new Yi(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,n,o=""])=>{Object.assign(t,vQe(ol(e),ol(r),ol(n),o))}),new Yi(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,n,o=""])=>{Object.assign(t,vQe(ol(e),ol(r),n,o))})]}});function lJr(t,e,r,...n){return kd(r)?e(r,Gg(n[0],kd),sy(arguments)):i_(`git.${t}() requires a string 'repoPath'`)}a(lJr,"createCloneTask");function zfo(){return{clone(t,...e){return this._runTask(lJr("clone",SDt,Gg(t,kd),...e),_u(arguments))},mirror(t,...e){return this._runTask(lJr("mirror",VXr,Gg(t,kd),...e),_u(arguments))}}}a(zfo,"clone_default");var SDt,VXr,Yfo=Pr({"src/lib/tasks/clone.ts"(){"use strict";yf(),ki(),kne(),SDt=a((t,e,r)=>{let n=["clone",...r];return kd(t)&&n.push(fDt(t)),kd(e)&&n.push(fDt(e)),ay(n)},"cloneTask"),VXr=a((t,e,r)=>(DT(r,"--mirror"),SDt(t,e,r)),"cloneMirrorTask")}}),WXr={};g0(WXr,{SimpleGitApi:a(()=>IDt,"SimpleGitApi")});var IDt,Kfo=Pr({"src/lib/simple-git-api.ts"(){"use strict";Zdo(),efo(),rfo(),ofo(),ufo(),ZJr(),ffo(),iXr(),hfo(),Efo(),xXr(),Nfo(),QXr(),Ffo(),Hfo(),yf(),Wfo(),ki(),Yfo(),IDt=class{static{a(this,"SimpleGitApi")}constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),n=r.push(t);return e&&Jdo(t,n,e),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(t){return this._runTask(ay(["add",...hk(t)]),_u(arguments))}cwd(t){let e=_u(arguments);return typeof t=="string"?this._runTask($Kr(t,this._executor),e):typeof t?.path=="string"?this._runTask($Kr(t.path,t.root&&this._executor||void 0),e):this._runTask(i_("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(pfo(t,e===!0),_u(arguments))}init(t){return this._runTask(yfo(t===!0,this._executor.cwd,sy(arguments)),_u(arguments))}merge(){return this._runTask(nJr(sy(arguments)),_u(arguments))}mergeFromTo(t,e){return kd(t)&&kd(e)?this._runTask(nJr([t,e,...sy(arguments)]),_u(arguments,!1)):this._runTask(i_("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=YDt({remote:Gg(arguments[0],kd),branch:Gg(arguments[1],kd)},sy(arguments));return this._runTask(t,_u(arguments))}stash(){return this._runTask(ay(["stash",...sy(arguments)]),_u(arguments))}status(){return this._runTask(Gfo(sy(arguments)),_u(arguments))}},Object.assign(IDt.prototype,tfo(),zfo(),lfo(),Fdo(),ifo(),dfo(),Gdo(),xfo(),Lfo(),$fo())}}),zXr={};g0(zXr,{Scheduler:a(()=>KXr,"Scheduler")});var uJr,KXr,Jfo=Pr({"src/lib/runners/scheduler.ts"(){"use strict";ki(),lXr(),uJr=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,YXr.createDeferred)();return{promise:e,done:r,id:t}}})(),KXr=class{static{a(this,"Scheduler")}constructor(t=2){this.concurrency=t,this.logger=QDt("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let t=DT(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),SQe(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=DT(this.pending,uJr());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),JXr={};g0(JXr,{applyPatchTask:a(()=>Xfo,"applyPatchTask")});function Xfo(t,e){return ay(["apply",...e,...t])}a(Xfo,"applyPatchTask");var Zfo=Pr({"src/lib/tasks/apply-patch.ts"(){"use strict";yf()}});function e0o(t,e){return{branch:t,hash:e,success:!0}}a(e0o,"branchDeletionSuccess");function t0o(t){return{branch:t,hash:null,success:!1}}a(t0o,"branchDeletionFailure");var XXr,r0o=Pr({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";XXr=class{static{a(this,"BranchDeletionBatch")}constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function ZXr(t,e){return e===1&&xDt.test(t)}a(ZXr,"hasBranchDeletionError");var dJr,xDt,fJr,DQe,n0o=Pr({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";r0o(),ki(),dJr=/(\S+)\s+\(\S+\s([^)]+)\)/,xDt=/^error[^']+'([^']+)'/m,fJr=[new Yi(dJr,(t,[e,r])=>{let n=e0o(e,r);t.all.push(n),t.branches[e]=n}),new Yi(xDt,(t,[e])=>{let r=t0o(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],DQe=a((t,e)=>o_(new XXr,fJr,[t,e]),"parseBranchDeletions")}}),eZr,i0o=Pr({"src/lib/responses/BranchSummary.ts"(){"use strict";eZr=class{static{a(this,"BranchSummaryResult")}constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,n,o){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:n,label:o}}}}});function pJr(t){return t?t.charAt(0):""}a(pJr,"branchStatus");function tZr(t,e=!1){return o_(new eZr,e?[nZr]:rZr,t)}a(tZr,"parseBranchSummary");var rZr,nZr,o0o=Pr({"src/lib/parsers/parse-branch.ts"(){"use strict";i0o(),ki(),rZr=[new Yi(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,n,o])=>{t.push(pJr(e),!0,r,n,o)}),new Yi(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(t,[e,r,n,o])=>{t.push(pJr(e),!1,r,n,o)})],nZr=new Yi(/^(\S+)$/s,(t,[e])=>{t.push("*",!1,e,"","")})}}),iZr={};g0(iZr,{branchLocalTask:a(()=>a0o,"branchLocalTask"),branchTask:a(()=>s0o,"branchTask"),containsDeleteBranchCommand:a(()=>oZr,"containsDeleteBranchCommand"),deleteBranchTask:a(()=>l0o,"deleteBranchTask"),deleteBranchesTask:a(()=>c0o,"deleteBranchesTask")});function oZr(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}a(oZr,"containsDeleteBranchCommand");function s0o(t){let e=oZr(t),r=t.includes("--show-current"),n=["branch",...t];return n.length===1&&n.push("-a"),n.includes("-v")||n.splice(1,0,"-v"),{format:"utf-8",commands:n,parser(o,s){return e?DQe(o,s).all[0]:tZr(o,r)}}}a(s0o,"branchTask");function a0o(){return{format:"utf-8",commands:["branch","-v"],parser(t){return tZr(t)}}}a(a0o,"branchLocalTask");function c0o(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,n){return DQe(r,n)},onError({exitCode:r,stdOut:n},o,s,c){if(!ZXr(String(o),r))return c(o);s(n)}}}a(c0o,"deleteBranchesTask");function l0o(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(n,o){return DQe(n,o).branches[t]},onError({exitCode:n,stdErr:o,stdOut:s},c,l,u){if(!ZXr(String(c),n))return u(c);throw new LEe(r.parser(BEe(s),BEe(o)),String(c))}};return r}a(l0o,"deleteBranchTask");var u0o=Pr({"src/lib/tasks/branch.ts"(){"use strict";Dne(),n0o(),o0o(),ki()}});function d0o(t){let e=t.trim().replace(/^["']|["']$/g,"");return e&&(0,sZr.normalize)(e)}a(d0o,"toPath");var aZr,f0o=Pr({"src/lib/responses/CheckIgnore.ts"(){"use strict";aZr=a(t=>t.split(/\n/g).map(d0o).filter(Boolean),"parseCheckIgnore")}}),cZr={};g0(cZr,{checkIgnoreTask:a(()=>p0o,"checkIgnoreTask")});function p0o(t){return{commands:["check-ignore",...t],format:"utf-8",parser:aZr}}a(p0o,"checkIgnoreTask");var h0o=Pr({"src/lib/tasks/check-ignore.ts"(){"use strict";f0o()}});function m0o(t,e){return o_({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},lZr,[t,e])}a(m0o,"parseFetchResult");var lZr,g0o=Pr({"src/lib/parsers/parse-fetch.ts"(){"use strict";ki(),lZr=[new Yi(/From (.+)$/,(t,[e])=>{t.remote=e}),new Yi(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new Yi(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new Yi(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new Yi(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,n,o])=>{t.updated.push({name:n,tracking:o,to:r,from:e})})]}}),uZr={};g0(uZr,{fetchTask:a(()=>y0o,"fetchTask")});function A0o(t){return/^--upload-pack(=|$)/.test(t)}a(A0o,"disallowedCommand");function y0o(t,e,r){let n=["fetch",...r];return t&&e&&n.push(t,e),n.find(A0o)?i_("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:m0o}}a(y0o,"fetchTask");var E0o=Pr({"src/lib/tasks/fetch.ts"(){"use strict";g0o(),yf()}});function _0o(t){return o_({moves:[]},dZr,t)}a(_0o,"parseMoveResult");var dZr,C0o=Pr({"src/lib/parsers/parse-move.ts"(){"use strict";ki(),dZr=[new Yi(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),fZr={};g0(fZr,{moveTask:a(()=>v0o,"moveTask")});function v0o(t,e){return{commands:["mv","-v",...hk(t),e],format:"utf-8",parser:_0o}}a(v0o,"moveTask");var b0o=Pr({"src/lib/tasks/move.ts"(){"use strict";C0o(),ki()}}),pZr={};g0(pZr,{pullTask:a(()=>T0o,"pullTask")});function T0o(t,e,r){let n=["pull",...r];return t&&e&&n.splice(1,0,t,e),{commands:n,format:"utf-8",parser(o,s){return zDt(o,s)},onError(o,s,c,l){let u=kfo(BEe(o.stdOut),BEe(o.stdErr));if(u)return l(new LEe(u));l(s)}}}a(T0o,"pullTask");var S0o=Pr({"src/lib/tasks/pull.ts"(){"use strict";Dne(),BXr(),ki()}});function I0o(t){let e={};return hZr(t,([r])=>e[r]={name:r}),Object.values(e)}a(I0o,"parseGetRemotes");function x0o(t){let e={};return hZr(t,([r,n,o])=>{Object.hasOwn(e,r)||(e[r]={name:r,refs:{fetch:"",push:""}}),o&&n&&(e[r].refs[o.replace(/[^a-z]/g,"")]=n)}),Object.values(e)}a(x0o,"parseGetRemotesVerbose");function hZr(t,e){PDt(t,r=>e(r.split(/\s+/)))}a(hZr,"forEach");var w0o=Pr({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";ki()}}),mZr={};g0(mZr,{addRemoteTask:a(()=>R0o,"addRemoteTask"),getRemotesTask:a(()=>P0o,"getRemotesTask"),listRemotesTask:a(()=>k0o,"listRemotesTask"),remoteTask:a(()=>D0o,"remoteTask"),removeRemoteTask:a(()=>N0o,"removeRemoteTask")});function R0o(t,e,r){return ay(["remote","add",...r,t,e])}a(R0o,"addRemoteTask");function P0o(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?x0o:I0o}}a(P0o,"getRemotesTask");function k0o(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),ay(e)}a(k0o,"listRemotesTask");function D0o(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),ay(e)}a(D0o,"remoteTask");function N0o(t){return ay(["remote","remove",t])}a(N0o,"removeRemoteTask");var M0o=Pr({"src/lib/tasks/remote.ts"(){"use strict";w0o(),yf()}}),gZr={};g0(gZr,{stashListTask:a(()=>O0o,"stashListTask")});function O0o(t={},e){let r=IXr(t),n=["stash","list",...r.commands,...e],o=vXr(r.splitter,r.fields,GDt(n));return kQe(n)||{commands:n,format:"utf-8",parser:o}}a(O0o,"stashListTask");var B0o=Pr({"src/lib/tasks/stash-list.ts"(){"use strict";qEe(),TXr(),WDt(),xXr()}}),AZr={};g0(AZr,{addSubModuleTask:a(()=>L0o,"addSubModuleTask"),initSubModuleTask:a(()=>F0o,"initSubModuleTask"),subModuleTask:a(()=>NQe,"subModuleTask"),updateSubModuleTask:a(()=>U0o,"updateSubModuleTask")});function L0o(t,e){return NQe(["add",t,e])}a(L0o,"addSubModuleTask");function F0o(t){return NQe(["init",...t])}a(F0o,"initSubModuleTask");function NQe(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),ay(e)}a(NQe,"subModuleTask");function U0o(t){return NQe(["update",...t])}a(U0o,"updateSubModuleTask");var Q0o=Pr({"src/lib/tasks/sub-module.ts"(){"use strict";yf()}});function q0o(t,e){let r=Number.isNaN(t),n=Number.isNaN(e);return r!==n?r?1:-1:r?yZr(t,e):0}a(q0o,"singleSorted");function yZr(t,e){return t===e?0:t>e?1:-1}a(yZr,"sorted");function G0o(t){return t.trim()}a(G0o,"trimmed");function hQe(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}a(hQe,"toNumber");var hJr,EZr,H0o=Pr({"src/lib/responses/TagList.ts"(){"use strict";hJr=class{static{a(this,"TagList")}constructor(t,e){this.all=t,this.latest=e}},EZr=a(function(t,e=!1){let r=t.split(` +`).map(G0o).filter(Boolean);e||r.sort(function(o,s){let c=o.split("."),l=s.split(".");if(c.length===1||l.length===1)return q0o(hQe(c[0]),hQe(l[0]));for(let u=0,d=Math.max(c.length,l.length);uo.indexOf(".")>=0);return new hJr(r,n)},"parseTagList")}}),_Zr={};g0(_Zr,{addAnnotatedTagTask:a(()=>V0o,"addAnnotatedTagTask"),addTagTask:a(()=>$0o,"addTagTask"),tagListTask:a(()=>j0o,"tagListTask")});function j0o(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return EZr(r,e)}}}a(j0o,"tagListTask");function $0o(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}a($0o,"addTagTask");function V0o(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}a(V0o,"addAnnotatedTagTask");var W0o=Pr({"src/lib/tasks/tag.ts"(){"use strict";H0o()}}),z0o=ddo({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(Kdo(),Af(fXr)),{SimpleGitApi:n}=(Kfo(),Af(WXr)),{Scheduler:o}=(Jfo(),Af(zXr)),{adhocExecTask:s,configurationErrorTask:c}=(yf(),Af(EDt)),{asArray:l,filterArray:u,filterPrimitives:d,filterString:p,filterStringOrStringArray:h,filterType:m,getTrailingOptions:g,trailingFunctionArgument:A,trailingOptionsArgument:y}=(ki(),Af(OJr)),{applyPatchTask:E}=(Zfo(),Af(JXr)),{branchTask:_,branchLocalTask:v,deleteBranchesTask:b,deleteBranchTask:I}=(u0o(),Af(iZr)),{checkIgnoreTask:x}=(h0o(),Af(cZr)),{checkIsRepoTask:w}=(UJr(),Af(BJr)),{cleanWithOptionsTask:R,isCleanOptionsArray:P}=(KJr(),Af(zJr)),{diffSummaryTask:k}=(WDt(),Af(SXr)),{fetchTask:Q}=(E0o(),Af(uZr)),{moveTask:M}=(b0o(),Af(fZr)),{pullTask:N}=(S0o(),Af(pZr)),{pushTagsTask:G}=(QXr(),Af(UXr)),{addRemoteTask:O,getRemotesTask:D,listRemotesTask:F,remoteTask:U,removeRemoteTask:L}=(M0o(),Af(mZr)),{getResetMode:H,resetTask:$}=(cXr(),Af(oXr)),{stashListTask:W}=(B0o(),Af(gZr)),{addSubModuleTask:j,initSubModuleTask:ce,subModuleTask:J,updateSubModuleTask:Te}=(Q0o(),Af(AZr)),{addAnnotatedTagTask:fe,addTagTask:Ne,tagListTask:Ve}=(W0o(),Af(_Zr)),{straightThroughBufferTask:Ue,straightThroughStringTask:Ke}=(yf(),Af(EDt));function X(le,te){this._plugins=te,this._executor=new r(le.baseDir,new o(le.maxConcurrentProcesses),te),this._trimmed=le.trimmed}a(X,"Git2"),(X.prototype=Object.create(n.prototype)).constructor=X,X.prototype.customBinary=function(le){return this._plugins.reconfigure("binary",le),this},X.prototype.env=function(le,te){return arguments.length===1&&typeof le=="object"?this._executor.env=le:(this._executor.env=this._executor.env||{})[le]=te,this},X.prototype.stashList=function(le){return this._runTask(W(y(arguments)||{},u(le)&&le||[]),A(arguments))},X.prototype.mv=function(le,te){return this._runTask(M(le,te),A(arguments))},X.prototype.checkoutLatestTag=function(le){var te=this;return this.pull(function(){te.tags(function(xe,Z){te.checkout(Z.latest,le)})})},X.prototype.pull=function(le,te,xe,Z){return this._runTask(N(m(le,p),m(te,p),g(arguments)),A(arguments))},X.prototype.fetch=function(le,te){return this._runTask(Q(m(le,p),m(te,p),g(arguments)),A(arguments))},X.prototype.silent=function(le){return this._runTask(s(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},X.prototype.tags=function(le,te){return this._runTask(Ve(g(arguments)),A(arguments))},X.prototype.rebase=function(){return this._runTask(Ke(["rebase",...g(arguments)]),A(arguments))},X.prototype.reset=function(le){return this._runTask($(H(le),g(arguments)),A(arguments))},X.prototype.revert=function(le){let te=A(arguments);return typeof le!="string"?this._runTask(c("Commit must be a string"),te):this._runTask(Ke(["revert",...g(arguments,0,!0),le]),te)},X.prototype.addTag=function(le){let te=typeof le=="string"?Ne(le):c("Git.addTag requires a tag name");return this._runTask(te,A(arguments))},X.prototype.addAnnotatedTag=function(le,te){return this._runTask(fe(le,te),A(arguments))},X.prototype.deleteLocalBranch=function(le,te,xe){return this._runTask(I(le,typeof te=="boolean"?te:!1),A(arguments))},X.prototype.deleteLocalBranches=function(le,te,xe){return this._runTask(b(le,typeof te=="boolean"?te:!1),A(arguments))},X.prototype.branch=function(le,te){return this._runTask(_(g(arguments)),A(arguments))},X.prototype.branchLocal=function(le){return this._runTask(v(),A(arguments))},X.prototype.raw=function(le){let te=!Array.isArray(le),xe=[].slice.call(te?arguments:le,0);for(let ae=0;aeconsole.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.")))},X.prototype.checkIgnore=function(le,te){return this._runTask(x(l(m(le,h,[]))),A(arguments))},X.prototype.checkIsRepo=function(le,te){return this._runTask(w(m(le,p)),A(arguments))},e.exports=X}});kne();lF();var Y0o=class extends h4{static{a(this,"GitConstructError")}constructor(t,e){super(void 0,e),this.config=t}};lF();lF();var p4=class extends h4{static{a(this,"GitPluginError")}constructor(t,e,r){super(t,r),this.task=t,this.plugin=e,Object.setPrototypeOf(this,new.target.prototype)}};Dne();_Jr();UJr();KJr();ZJr();tXr();iXr();cXr();function K0o(t){return t?[{type:"spawn.before",action(n,o){t.aborted&&o.kill(new p4(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(n,o){function s(){o.kill(new p4(void 0,"abort","Abort signal received"))}a(s,"kill"),t.addEventListener("abort",s),o.spawned.on("close",()=>t.removeEventListener("abort",s))}}]:void 0}a(K0o,"abortPlugin");function J0o(t){return typeof t=="string"&&t.trim().toLowerCase()==="-c"}a(J0o,"isConfigSwitch");function X0o(t,e){if(typeof e!="string"||!e.includes(t))return!1;let r=e.trim().replace(/\0/g,"");return/^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(r)}a(X0o,"isCloneUploadPackSwitch");function NEe(t,e,r=String(t)){let n=typeof t=="string"?new RegExp(`\\s*${t}`,"i"):t;return a(function(s,c,l){if(s[e]!==!0&&J0o(c)&&n.test(l))throw new p4(void 0,"unsafe",`Configuring ${r} is not permitted without enabling ${e}`)},"preventCommand")}a(NEe,"preventConfigBuilder");var Z0o=[NEe(/^\s*protocol(.[a-z]+)?.allow/i,"allowUnsafeProtocolOverride","protocol.allow"),NEe("core.sshCommand","allowUnsafeSshCommand"),NEe("core.gitProxy","allowUnsafeGitProxy"),NEe("core.hooksPath","allowUnsafeHooksPath"),NEe("diff.external","allowUnsafeDiffExternal")];function epo(t,e){if(/^\s*--(upload|receive)-pack/.test(t))throw new p4(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(e==="clone"&&X0o("u",t))throw new p4(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(e==="push"&&/^\s*--exec\b/.test(t))throw new p4(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}a(epo,"preventUploadPack");function tpo({allowUnsafePack:t=!1,...e}={}){return{type:"spawn.args",action(r,n){return r.forEach((o,s)=>{let c=sl(e,o,c))}),r}}}a(tpo,"blockUnsafeOperationsPlugin");ki();function rpo(t){let e=OEe(t,"-c");return{type:"spawn.args",action(r){return[...e,...r]}}}a(rpo,"commandConfigPrefixingPlugin");ki();var mJr=(0,Rne.deferred)().promise;function npo({onClose:t=!0,onExit:e=50}={}){function r(){let o=-1,s={close:(0,Rne.deferred)(),closeTimeout:(0,Rne.deferred)(),exit:(0,Rne.deferred)(),exitTimeout:(0,Rne.deferred)()},c=Promise.race([t===!1?mJr:s.closeTimeout.promise,e===!1?mJr:s.exitTimeout.promise]);return n(t,s.close,s.closeTimeout),n(e,s.exit,s.exitTimeout),{close(l){o=l,s.close.done()},exit(l){o=l,s.exit.done()},get exitCode(){return o},result:c}}a(r,"createEvents");function n(o,s,c){o!==!1&&(o===!0?s.promise:s.promise.then(()=>pDt(o))).then(c.done)}return a(n,"configureTimeout"),{type:"spawn.after",async action(o,{spawned:s,close:c}){let l=r(),u=!0,d=a(()=>{u=!1},"quickClose");s.stdout?.on("data",d),s.stderr?.on("data",d),s.on("error",d),s.on("close",p=>l.close(p)),s.on("exit",p=>l.exit(p));try{await l.result,u&&await pDt(50),c(l.exitCode)}catch(p){c(l.exitCode,p)}}}}a(npo,"completionDetectionPlugin");ki();var ipo="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",gJr="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function opo(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(t)}a(opo,"isBadArgument");function AJr(t,e){if(t.length<1||t.length>2)throw new p4(void 0,"binary",ipo);if(t.some(opo))if(e)console.warn(gJr);else throw new p4(void 0,"binary",gJr);let[n,o]=t;return{binary:n,prefix:o}}a(AJr,"toBinaryConfig");function spo(t,e=["git"],r=!1){let n=AJr(hk(e),r);t.on("binary",o=>{n=AJr(hk(o),r)}),t.append("spawn.binary",()=>n.binary),t.append("spawn.args",o=>n.prefix?[n.prefix,...o]:o)}a(spo,"customBinaryPlugin");lF();function apo(t){return!!(t.exitCode&&t.stdErr.length)}a(apo,"isTaskError");function cpo(t){return Buffer.concat([...t.stdOut,...t.stdErr])}a(cpo,"getErrorMessage");function lpo(t=!1,e=apo,r=cpo){return(n,o)=>!t&&n||!e(o)?n:r(o)}a(lpo,"errorDetectionHandler");function yJr(t){return{type:"task.error",action(e,r){let n=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new h4(void 0,n.toString("utf-8"))}:{error:n}}}}a(yJr,"errorDetectionPlugin");ki();var upo=class{static{a(this,"PluginStore")}constructor(){this.plugins=new Set,this.events=new CZr.EventEmitter}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=DT(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return hk(t).forEach(r=>r&&this.plugins.add(DT(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let n=e,o=Object.freeze(Object.create(r));for(let s of this.plugins)s.type===t&&(n=s.action(n,o));return n}};ki();function dpo(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(s,c){return r.includes(c.method)?xJr(s,e):s}},{type:"spawn.after",action(s,c){c.commands.includes(e)&&c.spawned.stderr?.on("data",l=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));u&&t({method:c.method,stage:fpo(u[1]),progress:ol(u[2]),processed:ol(u[3]),total:ol(u[4])})})}}]}a(dpo,"progressMonitorPlugin");function fpo(t){return String(t.toLowerCase().split(" ",1))||"unknown"}a(fpo,"progressEventStage");ki();function ppo(t){let e=RJr(t,["uid","gid"]);return{type:"spawn.options",action(r){return{...e,...r}}}}a(ppo,"spawnOptionsPlugin");function hpo({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(n,o){let s;function c(){s&&clearTimeout(s),s=setTimeout(u,t)}a(c,"wait");function l(){o.spawned.stdout?.off("data",c),o.spawned.stderr?.off("data",c),o.spawned.off("exit",l),o.spawned.off("close",l),s&&clearTimeout(s)}a(l,"stop");function u(){l(),o.kill(new p4(void 0,"timeout","block timeout reached"))}a(u,"kill"),r&&o.spawned.stdout?.on("data",c),e&&o.spawned.stderr?.on("data",c),o.spawned.on("exit",l),o.spawned.on("close",l),c()}}}a(hpo,"timeoutPlugin");kne();function mpo(){return{type:"spawn.args",action(t){let e=[],r;function n(o){(r=r||[]).push(...o)}a(n,"append2");for(let o=0;oMEe(c)&&qKr(c)||c));break}e.push(s)}return r?[...e,"--",...r.map(String)]:e}}}a(mpo,"suffixPathsPlugin");ki();var gpo=z0o();function Apo(t,e){let r=new upo,n=NJr(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!kDt(n.baseDir))throw new Y0o(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&r.add(rpo(n.config)),r.add(tpo(n.unsafe)),r.add(npo(n.completion)),n.abort&&r.add(K0o(n.abort)),n.progress&&r.add(dpo(n.progress)),n.timeout&&r.add(hpo(n.timeout)),n.spawnOptions&&r.add(ppo(n.spawnOptions)),r.add(mpo()),r.add(yJr(lpo(!0))),n.errors&&r.add(yJr(n.errors)),spo(r,n.binary,n.unsafe?.allowUnsafeCustomBinary),new gpo(n,r)}a(Apo,"gitInstanceFactory");Dne();var MQe=Apo;var mk=new Se("Git Service");var OQe=class{constructor(e){this.ctx=e;this.gitInstances=new Map}static{a(this,"GitService")}getGitInstance(e){let r=this.normalizeRepoPath(e),n=this.gitInstances.get(r);return n||(n=MQe(r),this.gitInstances.set(r,n)),n}constructFileUri(e,r){let n=this.normalizeRepoPath(e),o=(0,bZr.join)(n,r);return kc(o)}parseStatus(e){switch(e){case"M":return 2;case"A":return 0;case"D":return 3;case"R":return 1;default:return 2}}parseDiffOutput(e,r){let n=[],o=r.split("\0").filter(s=>s.length>0);for(let s=0;s=o.length){mk.warn(this.ctx,`Malformed git diff output: rename status without both paths at position ${s}. Output: ${r}`);continue}let p=o[s+1],h=o[s+2];if(!p||!h){mk.warn(this.ctx,`Malformed git diff output: empty path(s) for rename at position ${s}. Paths: [${p}, ${h}]. Output: ${r}`);continue}let m=this.constructFileUri(e,p),g=this.constructFileUri(e,h);n.push({uri:g,originalUri:m,renameUri:g,status:1}),s+=2}else{if(s+1>=o.length){mk.warn(this.ctx,`Malformed git diff output: status without path at position ${s}. Status: ${u}. Output: ${r}`);continue}let p=o[s+1];if(!p){mk.warn(this.ctx,`Malformed git diff output: empty file path at position ${s}. Status: ${u}. Output: ${r}`);continue}let h=this.constructFileUri(e,p);n.push({uri:h,originalUri:h,renameUri:void 0,status:d}),s+=1}}return n}async diffWith(e,r){try{let o=await this.getGitInstance(e).raw(["diff","--name-status","-z","--diff-filter=ADMR",r,"--"]);return!o||o.trim().length===0?[]:this.parseDiffOutput(e,o)}catch(n){mk.error(this.ctx,`Failed to diff with ${r} for ${e}`,n);return}}async diffWithIndexedCommit(e,r){try{if(r){let o=await this.diffWith(e,r);if(o)return{changes:o,mayBeOutdated:!1};mk.warn(this.ctx,`Failed to diff with indexed commit ${r}, falling back to upstream`)}let n=await this.diffWith(e,"@{upstream}");if(n)return{changes:n,mayBeOutdated:!0};mk.warn(this.ctx,`No upstream branch configured for ${e}, cannot determine changes`);return}catch(n){mk.error(this.ctx,`Failed to diff with indexed commit for ${e}`,n);return}}normalizeRepoPath(e){if(e.startsWith("file://"))try{return(0,vZr.fileURLToPath)(e)}catch(r){mk.warn(this.ctx,`Failed to convert URI to path: ${e}, attempting fallback`,r);try{let n=new URL(e),o=decodeURIComponent(n.pathname);return process.platform==="win32"&&/^\/[a-zA-Z]:/.test(o)&&(o=o.slice(1).replace(/\//g,"\\")),o}catch(n){return mk.error(this.ctx,`Failed to parse URI with fallback: ${e}`,n),e}}return e}dispose(){this.gitInstances.clear()}};var TZr=de(vc());var uF=new Se("Local Diff Tracker");var BQe=class t{constructor(e,r,n){this.ctx=e;this._workspaceFileIndex=r;this._githubCodeSearchService=n;this._repos=new Map;this._locallyChangedFiles=new Set;this._fileWatcherDisposables=[];this._gitService=new OQe(e),this._repositoryManager=e.get(lm),this._diffRefreshTimer=new TZr.IntervalTimer}static{a(this,"CodeSearchWorkspaceDiffTracker")}static{this._diffRefreshInterval=1e3*60*2}static{this._maxDiffFiles=1e4}async initialize(){return this._initializePromise??=this.doInitialize(),this._initializePromise}async doInitialize(){try{uF.info(this.ctx,"Initializing Local Diff Tracker"),await this._workspaceFileIndex.initialize();let e=a(n=>{for(let o of n)this._locallyChangedFiles.add(o)},"addFiles");this._fileWatcherDisposables.push(this._workspaceFileIndex.onDidCreateFiles(e),this._workspaceFileIndex.onDidChangeFiles(e),this._workspaceFileIndex.onDidDeleteFiles(n=>{for(let o of n)this._locallyChangedFiles.delete(o)}));let r=await this._repositoryManager.getRepo({uri:this._workspaceFileIndex.workspaceFolder.uri});r||(r=await this.tryInferRepoFromFiles()),r&&r.isGitHub()&&r.owner&&r.name?await this.openRepo(r):uF.info(this.ctx,`Workspace folder ${this._workspaceFileIndex.workspaceFolder.uri} is not a GitHub repository`)}catch(e){uF.error(this.ctx,"Initialization failed",e)}}async tryInferRepoFromFiles(){try{let e=Array.from(this._workspaceFileIndex.values());if(e.length===0)return;for(let r=0;r{this.refreshRepoDiffs()},t._diffRefreshInterval),await this.refreshRepoDiff(n)}async tryGetDiffedIndexedFiles(e,r){let n=await this.tryGetDiff(e,r);if(!n)return;let o=new Set,s=n.changes.slice(0,t._maxDiffFiles);for(let c of s){let l=c.uri;this._workspaceFileIndex.get(l)&&o.add(l)}return o}async tryGetDiff(e,r){try{let n=e.baseFolder.uri,o=await this._gitService.diffWithIndexedCommit(n,r);return o?{changes:o.changes,mayBeOutdated:o.mayBeOutdated}:void 0}catch(n){uF.error(this.ctx,`Failed to get diff for ${e.baseFolder.uri}`,n);return}}async refreshRepoDiffs(){await Promise.all(Array.from(this._repos.values(),e=>this.refreshRepoDiff(e)))}async refreshRepoDiff(e){try{let r=this._githubCodeSearchService.getIndexedCommit(e.repo.baseFolder.uri),n=await this.tryGetDiffedIndexedFiles(e.repo,r);if(n){e.initialChanges.clear();for(let c of n)e.initialChanges.add(c);let o=e.repo.baseFolder.uri,s=[];for(let c of this._locallyChangedFiles)if(c.startsWith(o)){let l=this._workspaceFileIndex.get(c);(!l||!l.isDirty())&&s.push(c)}for(let c of s)this._locallyChangedFiles.delete(c);e.state=2}else uF.error(this.ctx,`Failed to get new diff for ${e.repo.baseFolder.uri}.`),e.state=1}catch(r){uF.error(this.ctx,`Failed to refresh diff for ${e.repo.baseFolder.uri}.`,r),e.state=1}}dispose(){this._diffRefreshTimer.dispose(),this._gitService.dispose(),this._fileWatcherDisposables.forEach(e=>e.dispose())}};f();f();var dF;(n=>{function t(o){return new JDt(o)}n.ok=t,a(t,"ok");function e(o){return new XDt(o)}n.error=e,a(e,"error");function r(o){return n.error(new Error(o))}n.fromString=r,a(r,"fromString")})(dF||={});var JDt=class t{constructor(e){this.val=e}static{a(this,"ResultOk")}map(e){return new t(e(this.val))}flatMap(e){return e(this.val)}isOk(){return!0}isError(){return!1}},XDt=class{constructor(e){this.err=e}static{a(this,"ResultError")}map(e){return this}flatMap(e){return this}isOk(){return!1}isError(){return!0}};var ZDt=new Se("GithubAvailableEmbeddingTypes"),LQe=class{constructor(e){this._ctx=e;this._cached=this._ctx.get(Nt).getGitHubSession().then(r=>r?this.doGetAvailableTypes(r):dF.error({type:"noSession"}))}static{a(this,"GithubAvailableEmbeddingTypesManager")}async getAllAvailableTypes(){if(this._cached){let e=this._cached;try{let r=await this._cached;if(r.isOk())return r}catch{}this._cached===e&&(this._cached=void 0)}return this._cached??=(async()=>{let e=await this._ctx.get(Nt).getGitHubSession();return e?await this.doGetAvailableTypes(e):dF.error({type:"noSession"})})(),this._cached}async doGetAvailableTypes(e){let r;try{let c=Tne(this._ctx);r=await au(this._ctx,e,"embeddings/models",{headers:c,method:"GET"})}catch(c){return ZDt.error(this._ctx,"Error fetching available embedding types",c),dF.error({type:"requestFailed",error:c})}if(!r.ok)return r.status===401||r.status===404?dF.error({type:"unauthorized",status:r.status}):dF.error({type:"badResponse",status:r.status});let n=await r.json(),o=[],s=[];for(let c of n.models){let l=new XE(c.id);c.active===!1?s.push(l):o.push(l)}return dF.ok({primary:o,deprecated:s})}async getPreferredType(){let e=await this.getAllAvailableTypes();if(!e.isOk()){ZDt.info(this._ctx,`Could not find any available embedding types. Error: ${e.err.type}`);return}let r=e.val;return ZDt.info(this._ctx,`Got embeddings. Primary: ${r.primary.join(",")}. Deprecated: ${r.deprecated.join(",")}`),r.primary.at(0)??r.deprecated.at(0)}};f();var ypo=new Se("GithubEmbeddingComputer"),Mne=class{constructor(e){this.ctx=e;this.batchSize=100}static{a(this,"GithubEmbeddingComputer")}async computeEmbeddings(e,r,n,o){try{let s=await this.ctx.get(Nt).getGitHubSession();if(!s)throw new Error("No GitHub session available");let c=[],l;for(let u=0;u0&&(l=p[0].type),c.push(...p)}if(!l)throw new Error("No embedding type resolved from API response");return{type:l,values:c}}catch(s){ypo.error(this.ctx,"Error computing embeddings:",s);return}}async fetchBatchEmbeddings(e,r,n,o,s){try{let c={inputs:n};if(r&&(c.embedding_model=r.id),o?.inputType&&(c.input_type=o.inputType),s?.isCancellationRequested)return;let l=await au(this.ctx,e,"embeddings",{method:"POST",json:c});if(!l.ok)throw new Error(`Error fetching embeddings: ${l.status}. ${await l.text()}`);let u=await l.json(),d=new XE(u.embedding_model);if(r&&!d.equals(r))throw new Error(`Unexpected embedding model. Got: ${d.id}. Expected: ${r.id}`);if(n.length!==u.embeddings.length)throw new Error(`Mismatched embedding result count. Expected: ${n.length}. Got: ${u.embeddings.length}`);return u.embeddings.map(p=>({type:d,value:p.embedding}))}catch(c){throw new Error("Error fetching batch embeddings: "+(c instanceof Error?c.message:String(c)))}}};f();f();f();var GEe=class{constructor(){this.recomputedFileCount=0;this.sentContentTextLength=0}static{a(this,"ComputeBatchInfo")}};f();var SZr=de(gm()),IZr=de(mN()),xZr=de(require("path"));function FQe(t){let e=Bo(t.workspaceFolder.uri),r=(0,SZr.basename)(e),o=(0,IZr.SHA256)(e).toString().substring(0,8);return xZr.default.join(ZPt(),"project-index",`${r}.${o}`)}a(FQe,"getWorkspaceCachePath");f();f();function wZr(t){if(Tkt(t.type)?.quantization.document==="binary"){if(t.value.length%8!==0)throw new Error(`Embedding value length must be a multiple of 8 for ${t.type.id}, got ${t.value.length}`);let n=new Uint8Array(t.value.length/8);for(let o=0;o=0?1:0)<=1024)){let o=new Array(e.length*8);for(let s=0;s0?.03125:-.03125}return{type:t,value:o}}let n=new Float32Array(e.buffer,e.byteOffset,e.byteLength/4);return{type:t,value:Array.from(n)}}a(eNt,"unpackEmbedding");var RZr=de(vc()),PZr=de(Wx()),rNt=de(ff()),kZr=de(require("fs")),nNt=de(require("node:sqlite")),iNt=de(require("path"));var tNt=new Se("WorkspaceChunkAndEmbeddingCache");async function DZr(t,e,r,n){return await oNt.create(t,e,r??":memory:",n)}a(DZr,"createWorkspaceChunkAndEmbeddingCache");var oNt=class t{constructor(e,r){this.embeddingType=e;this.db=r;this._inMemory=new PZr.ResourceMap}static{a(this,"DbCache")}static{this.version="1.0.0"}static async create(e,r,n,o){let s={open:!0},c;if(n!==":memory:"){let d=iNt.default.join(n,"workspace-chunks.db");try{await kZr.default.promises.mkdir(iNt.default.dirname(d),{recursive:!0}),c=new nNt.default.DatabaseSync(d,s),tNt.debug(e,`DbWorkspaceChunkAndEmbeddingCache: Opened SQLite database on disk at ${d}`)}catch(p){tNt.error(e,"DbWorkspaceChunkAndEmbeddingCache: Failed to open SQLite database on disk, falling back to in-memory",p)}}c||(c=new nNt.default.DatabaseSync(":memory:",s),tNt.debug(e,"DbWorkspaceChunkAndEmbeddingCache: Using in-memory database")),c.exec(` PRAGMA journal_mode = OFF; PRAGMA synchronous = 0; PRAGMA cache_size = 1000000; @@ -2563,20 +2552,20 @@ Copilot has partially indexed this project as it exceeds the file limit. As a re CREATE INDEX IF NOT EXISTS idx_files_uri ON Files(uri); CREATE INDEX IF NOT EXISTS idx_filechunks_fileId ON FileChunks(fileId); - `);let l=c.prepare("SELECT version, embeddingModel FROM CacheMeta LIMIT 1").get();(!l||l.version!==this.version||l.embeddingModel!==r.id)&&c.exec("DELETE FROM CacheMeta; DELETE FROM Files; DELETE FROM FileChunks;"),c.exec("DELETE FROM CacheMeta;"),c.prepare("INSERT INTO CacheMeta (version, embeddingModel) VALUES (?, ?)").run(this.version,r.id),await o.initialize();let u=c.prepare("SELECT id, uri FROM Files");try{c.exec("BEGIN TRANSACTION");for(let d of u.all()){let p=d;try{if(o.get(p.uri))continue}catch{}c.prepare("DELETE FROM Files WHERE id = ?").run(p.id)}}finally{c.exec("COMMIT")}return new t(r,c)}dispose(){this.db.close()}async isIndexed(e){return(await this.getEntry(e))?.state==="resolved"}async get(e){return(await this.getEntry(e))?.value}getCurrentChunksForUri(e){let r=Pl(e),n=this._inMemory.get(r);if(n?.state==="pending"||n?.state==="rejected")return;let o=this.db.prepare("SELECT fc.text, fc.range_startLineNumber, fc.range_startColumn, fc.range_endLineNumber, fc.range_endColumn, fc.embedding, fc.chunkHash FROM Files f JOIN FileChunks fc ON f.id = fc.fileId WHERE f.uri = ?").all(e.toString());if(o.length>0){let s=new Map;for(let c of o){let l=MDt(this.embeddingType,c.embedding),u={chunk:{file:e.toString(),text:c.text,rawText:void 0,range:new BDt.Range(c.range_startLineNumber,c.range_startColumn,c.range_endLineNumber,c.range_endColumn)},embedding:l,chunkHash:c.chunkHash};u.chunkHash&&s.set(u.chunkHash,u)}return s}}async getEntry(e){let r=Pl(e.uri),n=this._inMemory.get(r),o=await e.getFastContentVersionId();if(n?.contentVersionId===o)return n;let s=this.db.prepare("SELECT id, contentVersionId FROM Files WHERE uri = ?").get(e.uri.toString());if(!s||s.contentVersionId!==o)return;let c=this.db.prepare("SELECT text, range_startLineNumber, range_startColumn, range_endLineNumber, range_endColumn, embedding, chunkHash FROM FileChunks WHERE fileId = ?").all(s.id);return{state:"resolved",contentVersionId:s.contentVersionId,fileHash:void 0,value:c.map(l=>({chunk:{file:e.uri.toString(),text:l.text,rawText:void 0,range:new BDt.Range(l.range_startLineNumber,l.range_startColumn,l.range_endLineNumber,l.range_endColumn)},embedding:MDt(this.embeddingType,l.embedding),chunkHash:l.chunkHash}))}}async update(e,r){let n=Pl(e.uri),o=this._inMemory.get(n),s=await e.getFastContentVersionId();if(o?.contentVersionId===s)return o.value;let c=await this.getEntry(e);if(c?.contentVersionId===s)return c.value;o?.state==="pending"&&o.value.cancel();let l=(0,PXr.createCancelablePromise)(r),u={contentVersionId:s,fileHash:void 0,state:"pending",value:l};return this._inMemory.set(n,u),await l.then(d=>({contentVersionId:s,fileHash:void 0,state:Array.isArray(d)?"resolved":"rejected",value:d}),()=>({contentVersionId:s,fileHash:void 0,state:"rejected",value:void 0})).then(d=>{let p=this._inMemory.get(n);if(u===p)if(d.state==="rejected")this._inMemory.set(n,d),this.db.prepare("DELETE FROM Files WHERE uri = ?").run(n.toString());else{this._inMemory.delete(n);let h=this.db.prepare("INSERT OR REPLACE INTO Files (uri, contentVersionId) VALUES (?, ?)").run(e.uri.toString(),s);try{let m=this.db.prepare("INSERT INTO FileChunks (fileId, text, range_startLineNumber, range_startColumn, range_endLineNumber, range_endColumn, embedding, chunkHash) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");this.db.exec("BEGIN TRANSACTION");for(let g of d.value??[])m.run(h.lastInsertRowid,g.chunk.text,g.chunk.range.startLineNumber,g.chunk.range.startColumn,g.chunk.range.endLineNumber,g.chunk.range.endColumn,RXr(g.embedding),g.chunkHash??"")}finally{this.db.exec("COMMIT")}}}),l}};var MXr=de(jc()),$Ce=de(wc()),OXr=de(IO());var kqe=class{constructor(e,r,n,o){this.ctx=e;this._embeddingType=r;this._workspaceFileIndex=n;this._chunkingEndpointClient=o;this._cache=new OXr.Lazy(async()=>(this._cacheRoot=Pqe(this._workspaceFileIndex),await DXr(this.ctx,this._embeddingType,this._cacheRoot,this._workspaceFileIndex)))}static{a(this,"WorkspaceChunkEmbeddingsIndex")}dispose(){this._cache.hasValue&&this._cache.value.then(e=>e.dispose())}async getIndexState(){if(!this._cache.hasValue)return;let e=await this._cache.value,r=Array.from(this._workspaceFileIndex.values()),n=0;return await Promise.all(r.map(async o=>{await e.isIndexed(o)&&n++})),{totalFileCount:r.length,indexedFileCount:n}}get fileCount(){return this._workspaceFileIndex.fileCount}async triggerIndexingOfWorkspace(e,r){let n=Array.from(this._workspaceFileIndex.values());await Promise.all(n.map(o=>this.triggerIndexingOfFile(o.uri,e,r)))}async triggerIndexingOfFile(e,r,n){let o=this._workspaceFileIndex.get(e);o&&await this.getChunksAndEmbeddings(r,o,new jCe,"Batch",n)}async searchWorkspace(e,r,n,o){let[s,c]=await(0,$Ce.raceCancellationError)(Promise.all([r,this.getAllWorkspaceEmbeddings(e,o)]),o);return this.rankEmbeddings(s,c,n)}async searchSubsetOfFiles(e,r,n,o,s){if(!r.length)return[];let[c,l]=await(0,$Ce.raceCancellationError)(Promise.all([n,this.getEmbeddingsForFiles(e,r,s)]),s);return this.rankEmbeddings(c,l,o)}rankEmbeddings(e,r,n){return izr(e,r.map(o=>[o.chunk,o.embedding]),n).map(o=>({chunk:o.value,distance:o.distance}))}async getAllWorkspaceEmbeddings(e,r){let o=Array.from(this._workspaceFileIndex.values()).map(s=>s.uri);return this.getEmbeddingsForFiles(e,o,r)}async getEmbeddingsForFiles(e,r,n){let o=new jCe,s=await Promise.all(r.map(async c=>{let l=this._workspaceFileIndex.get(c);if(l)return await this.getChunksAndEmbeddings(e,l,o,"Batch",n)}));return(0,MXr.coalesce)(s).flat()}async getChunksAndEmbeddings(e,r,n,o,s){let c=await(0,$Ce.raceCancellationError)(this._cache.value,s),l=await(0,$Ce.raceCancellationError)(c.get(r),s);if(l)return l;let u=c.getCurrentChunksForUri(r.uri);return await c.update(r,async p=>this._chunkingEndpointClient.computeChunksAndEmbeddings(e,this._embeddingType,r,n,o,u,p))}};var BXr=de(wc()),LXr=de(iw()),vie=de(Ck());var xm=new Se("Embeddings Search"),Nqe=class t{constructor(e,r,n,o){this._ctx=e;this._workspaceFileIndex=r;this.embeddingType=n;this.chunkingEndpointClient=o;this.id="embeddings";this._state="unknown";this._disposeCts=new _n.CancellationTokenSource;this._reindexRequests=new LXr.ResourceMap}static{a(this,"EmbeddingsChunkSearch")}static{this.defaultAutomaticIndexingFileCap=750}dispose(){this._disposeCts.cancel(),this._disposeCts.dispose();for(let[,e]of this._reindexRequests)e.dispose();this._reindexRequests.clear(),this._embeddingsIndex?.dispose()}async triggerLocalIndexing(){if(xm.info(this._ctx,"Triggering local indexing..."),await this.initializeWorkspaceIndex(),this._state==="tooManyFilesForAutomaticIndexing"){xm.info(this._ctx,"Skipping automatic indexing: too many files",{fileCount:this._workspaceFileIndex.fileCount});return}await this.triggerIndexingOfWorkspace()}async searchWorkspace(e,r,n){let o=new vie.StopWatch;xm.info(this._ctx,"Starting workspace embedding search",{rawQuery:e.rawQuery,maxResults:Tm(r),indexStatus:this._state});let s=await this._ctx.get(Ot).getGitHubSession();if(!s)throw xm.error(this._ctx,"No GitHub session found"),new Error("No GitHub session found in EmbeddingsChunkSearch");let c=e.resolveQueryEmbeddings(n);if(await this.doInitialIndexing(),l0(n),(this._state==="updatingIndex"||this._state==="ready")&&this._embeddingsIndex!==void 0){let u=new vie.StopWatch,d=await this._embeddingsIndex.searchWorkspace(s,c,Tm(r),n),p=u.elapsed(),h=o.elapsed(),m=d.length,A=new Set(d.map(E=>E.chunk.file)).size,y=this._workspaceFileIndex.fileCount;return xm.info(this._ctx,`Workspace search completed successfully in ${h}ms`,{totalTime:h,searchTime:p,chunkCount:m,uniqueFileCount:A,indexStatus:this._state}),Cp.sendEmbeddingsSuccess(this._ctx,h,p,m,A,y,Yg.Aggregate),{chunks:d}}else{xm.info(this._ctx,"Embeddings index is not ready for workspace search, skip searching.",{indexStatus:this._state}),Cp.sendEmbeddingsSkipped(this._ctx,"index_not_ready");return}}async searchFiles(e,r,n,o){if(!n.length)return xm.info(this._ctx,"No files to search, returning empty results"),{chunks:[]};let s=new vie.StopWatch;xm.info(this._ctx,"Starting file subset embedding search",{rawQuery:e.rawQuery,maxResults:Tm(r),fileCount:n.length});let c=await this._ctx.get(Ot).getGitHubSession();if(!c)throw xm.error(this._ctx,"No GitHub session found"),new Error("No GitHub session found in EmbeddingsChunkSearch");let l=e.resolveQueryEmbeddings(o),u=await this.initializeForFileSubset(n.length);if(!u){xm.info(this._ctx,"Too many files for subset search",{fileCount:n.length});return}l0(o);let d=new vie.StopWatch,p=await u.searchSubsetOfFiles(c,n,l,Tm(r),o),h=d.elapsed(),m=s.elapsed(),g=p.length,y=new Set(p.map(_=>_.chunk.file)).size,E=this._workspaceFileIndex.fileCount;return xm.info(this._ctx,`File subset search completed successfully in ${m}ms`,{totalTime:m,searchTime:h,chunkCount:g,uniqueFileCount:y}),Cp.sendEmbeddingsSuccess(this._ctx,m,h,g,y,E,Yg.Remote),{chunks:p}}async initializeForFileSubset(e){await this._workspaceFileIndex.initialize();let r=this.getAutoIndexFileCap();if(e>r){xm.info(this._ctx,`EmbeddingsChunkSearch: skipping subset search due to too many files. Found ${e} files. Max: ${r}`);return}return this.getOrCreateEmbeddingsIndex()}async initializeWorkspaceIndex(){return this._init??=(async()=>{await this._workspaceFileIndex.initialize();let e=this.checkWorkspaceIndexSizeLimits();return e?(xm.info(this._ctx,`EmbeddingsChunkSearch: skipping automatic indexing due to too many files. Found ${this._workspaceFileIndex.fileCount} files. Max: ${this.getAutoIndexFileCap()}`),this.setState(e),!0):(this.getOrCreateEmbeddingsIndex(),this.setState("ready"),!0)})(),this._init}getOrCreateEmbeddingsIndex(){return this._embeddingsIndex||(this._embeddingsIndex=new kqe(this._ctx,this.embeddingType,this._workspaceFileIndex,this.chunkingEndpointClient),xm.info(this._ctx,`EmbeddingsChunkSearch: initializing embeddings index for ${this._workspaceFileIndex.fileCount} files.`)),this._embeddingsIndex}checkWorkspaceIndexSizeLimits(){let e=this.getAutoIndexFileCap();if(this._workspaceFileIndex.fileCount>e)return"tooManyFilesForAutomaticIndexing"}async doInitialIndexing(){return this._initialIndexing??=(async()=>{if(await this.initializeWorkspaceIndex(),!(this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing"))return this.triggerIndexingOfWorkspace(),this.registerAutomaticReindexListeners(),!0})(),this._initialIndexing}async triggerIndexingOfWorkspace(){let e=new vie.StopWatch;xm.info(this._ctx,"Starting workspace indexing...",{fileCount:this._workspaceFileIndex.fileCount}),this.setState("updatingIndex");try{let r=await this._ctx.get(Ot).getGitHubSession();if(!r)throw new Error("No GitHub session found");await this._embeddingsIndex?.triggerIndexingOfWorkspace(r,new _n.CancellationTokenSource().token),this.setState("ready"),xm.info(this._ctx,`Workspace indexing completed in ${e.elapsed()}ms`,{status:"ready",indexingTime:e.elapsed()})}catch(r){xm.error(this._ctx,"Workspace indexing failed",r),this.setState("unknown")}}registerAutomaticReindexListeners(){this._reindexRequests.clear(),this._workspaceFileIndex.onDidCreateFiles(e=>{this.tryTriggerReindexing(e,!0)}),this._workspaceFileIndex.onDidChangeFiles(e=>this.tryTriggerReindexing(e,!0)),this._workspaceFileIndex.onDidDeleteFiles(e=>{for(let r of e){let n=Pl(r);this._reindexRequests.get(n)?.dispose(),this._reindexRequests.delete(n)}})}getAutoIndexFileCap(){return t.defaultAutomaticIndexingFileCap}setState(e){this._state!==e&&(this._state=e)}tryTriggerReindexing(e,r=!1){if(this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing")return;let n=6e4;for(let o of e){let s=Pl(o),c=this._reindexRequests.get(s);c||(c=new BXr.Delayer(n),this._reindexRequests.set(s,c)),c.trigger(async()=>{if(await this.initializeWorkspaceIndex(),this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing")return;let l=await this._ctx.get(Ot).getGitHubSession();this._embeddingsIndex?.triggerIndexingOfFile(o,l,this._disposeCts.token)},r?0:n)}}};f();f();var WCe=de(VT());async function Bqe(t){for(let r of t)r.then(n=>{n.isOk()&&t.forEach(o=>{o!==r&&o.cancel()})},()=>{});let e=await Promise.allSettled(t);for(let r of e)if(r.status==="fulfilled"&&r.value.isOk())return r.value;{let r=[];for(let n of e)n.status==="fulfilled"&&n.value.isError()&&r.push(n.value.err.errorDiagMessage);if(r.length)return WCe.Result.error({errorDiagMessage:r.join(", ")})}if(e.every(r=>r.status==="rejected"&&Dx(r.reason)))return WCe.Result.error({errorDiagMessage:"cancelled"});for(let r of e)if(r.status==="rejected"&&!Dx(r.reason))return WCe.Result.error({errorDiagMessage:r.reason+""});return WCe.Result.error({errorDiagMessage:"unknown error"})}a(Bqe,"raceSearchOperations");var zCe=de(VT()),YCe=de(wc());var Ifo=2e3,xfo=.7,HXr=8e3,wfo=300,Lqe=class{constructor(e,r,n,o){this._embeddingsByWorkspace=e;this._tfidfByWorkspace=r;this._workspaceFileIndexes=n;this._diffTrackers=o}static{a(this,"LocalDiffSearch")}getTotalFileCount(e){let r=0;for(let n of e){let o=this._workspaceFileIndexes.get(n);o&&(r+=o.fileCount)}return r}async getLocalDiff(e){let r=new Set;for(let n of e){let o=this._diffTrackers.get(n);if(o){let s=await o.getDiffFiles();if(s)for(let c of s)r.add(c)}}return Array.from(r)}shouldDoLocalDiffSearch(e,r){if(e.length===0||e.length>Ifo)return!1;let n=this.getTotalFileCount(r);return!(n>0&&e.length/n>xfo)}async searchLocalDiff(e,r,n,o){if(e.length===0)return zCe.Result.ok({strategy:"none",result:{chunks:[]}});let s=[],c=[];for(let u of n.workspaceFolders){let d=this._embeddingsByWorkspace.get(u),p=this._tfidfByWorkspace.get(u);d&&s.push(d),p&&c.push(p)}if(s.length===0&&c.length===0)return zCe.Result.error({errorDiagMessage:"No search instances available"});let l=a((u,d)=>(0,YCe.createCancelablePromise)(async p=>{let h=await Promise.all(u.map(g=>g.searchFiles(r,n,[...e],p))),m=this.mergeSearchResults(h);return zCe.Result.ok({strategy:d,result:m})}),"createSearchOp");if(e.length>wfo){if(c.length>0){let u=l(c,"tfidf");return o.onCancellationRequested(()=>u.cancel()),await u}return zCe.Result.error({errorDiagMessage:"Diff size too large for embeddings and no TF-IDF available"})}if(s.length>0&&c.length>0){let u=l(s,"embeddings");o.onCancellationRequested(()=>u.cancel());let d=await(0,YCe.raceTimeout)(u,HXr),p=d===void 0;if(d?.isOk()&&d.val.result.chunks.length>0)return d;let h=l(c,"tfidf");return o.onCancellationRequested(()=>h.cancel()),p?(h.then(()=>u.cancel(),()=>u.cancel()),await Bqe([u,h])):(u.cancel(),await h)}else if(s.length>0&&c.length===0){let u=l(s,"embeddings");o.onCancellationRequested(()=>u.cancel());let d=await(0,YCe.raceTimeout)(u,HXr);if(d?.isOk()&&d.val.result.chunks.length>0)return d;u.cancel();return}else if(s.length===0&&c.length>0){let u=l(c,"tfidf");return o.onCancellationRequested(()=>u.cancel()),await u}}mergeSearchResults(e){let r=e.filter(o=>!!o);if(r.length===0)return{chunks:[]};if(r.length===1)return{chunks:[...r[0].chunks]};let n=new Map;for(let o of r)for(let s of o.chunks){let c=s.chunk.file,l=n.get(c),u=s.distance?.value??Number.MAX_VALUE,d=l?.distance?.value??Number.MAX_VALUE;(!l||ug.text.toLowerCase()),e.toLowerCase()],u=await s.computeEmbeddings(c,l,{inputType:"document"},o);if(!u||u.values.length===0)return[];if(o.isCancellationRequested)return[];let d=u.values[u.values.length-1],p=u.values.slice(0,-1);if(!r.length||p.length!==r.length)return[];let h=p[0].type,m=p.map((g,A)=>({chunk:r[A],score:gCe(d,g).value}));return m.sort((g,A)=>A.score-g.score),m.slice(0,n).map(g=>({chunk:g.chunk,distance:{embeddingType:h,value:g.score}}))}};f();var jXr=require("worker_threads");var jDt=class{constructor(){this.nextId=1;this.handlers=new Map}static{a(this,"RpcResponseHandler")}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};function Rfo(t){let e={get:a((r,n)=>{if(typeof n=="string")return r[n]||(r[n]=(...o)=>t(n,o)),r[n]},"get")};return new Proxy(Object.create(null),e)}a(Rfo,"createRpcProxy");var Uqe=class{constructor(e,r,n){this.responseHandler=new jDt;this.worker=new jXr.Worker(e,r),this.worker.on("message",o=>{"fn"in o?(async()=>{try{let s=n?.[o.fn];if(!s)throw new Error(`Unknown method: ${o.fn}`);let c=await s.apply(n,o.args);this.worker.postMessage({id:o.id,res:c})}catch(s){this.worker.postMessage({id:o.id,err:s instanceof Error?s:new Error(String(s))})}})():this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=Rfo((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}static{a(this,"WorkerWithRpcProxy")}terminate(){this.worker.removeAllListeners(),this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};var $Xr=de(wc()),VXr=de(IO()),WXr=de(so()),bie=de(Ck()),zXr=require("fs"),Qqe=de(require("path"));var v0=new Se("Tfidf Search"),qqe=class extends WXr.Disposable{constructor(r,n,o){super();this.id="tfidf";this._maxFileCount=25e3;this._isDisposed=!1;this._tokenizerName="o200k_base";this._workspaceFileIndex=n,this.ctx=r,this._embeddingReranker=new Fqe(r,o?.embeddingType),this._customDbPath=o?.dbPath,this._tfIdfWorker=new VXr.Lazy(()=>{let s=this.firstExistingPath([Qqe.join(__dirname,"tfidfWorker.js"),Qqe.join(__dirname,"../../../../dist/tfidfWorker.js")]);if(s===void 0)throw new Error("tfidfWorker file not found");let c={tokenizer:this._tokenizerName,dbPath:this.getDbPath()},l={readFile:a(async u=>{let p=await r.get(In).getOrReadTextDocument({uri:u});if(p.status!=="valid")throw new Error(`Could not read file ${u}: ${p.status}`);return p.document.getText()},"readFile"),getContentVersionId:a(async u=>{try{return await this.getFastContentVersionId(u)}catch(d){throw new Error(`Could not find file ${u}, error: ${String(d)}`)}},"getContentVersionId"),logWarn:a((u,...d)=>(v0.warn(r,u,...d),Promise.resolve()),"logWarn"),logError:a((u,...d)=>(v0.error(r,u,...d),Promise.resolve()),"logError")};return new Uqe(s,{workerData:c},l)}),this._register(this.registerFileWatchers())}static{a(this,"TfidfChunkSearch")}dispose(){this._isDisposed=!0,super.dispose(),this._tfIdfWorker.hasValue&&this._tfIdfWorker.value.terminate()}async initialize(){v0.info(this.ctx,"Starting initialization...");let r=new bie.StopWatch;this._initializePromise??=this.initializeWorkspace();let n=await this._initializePromise;return v0.info(this.ctx,`Initialization completed in ${r.elapsed()}ms`,{outOfSyncFileCount:n.outOfSyncFileCount,newFileCount:n.newFileCount,deletedFileCount:n.deletedFileCount,initTime:n.initTime,dbPath:this.getDbPath()}),n}async searchWorkspace(r,n,o){let s=new bie.StopWatch;v0.info(this.ctx,"Starting workspace search",{rawQuery:r.rawQuery,maxResults:Tm(n)});try{if(await this.initialize(),this._isDisposed)throw Cp.sendTfidfFailure(this.ctx,"disposed"),new Error("TfidfChunkSearch has been disposed");let c={maxResults:Tm(n),maxSpread:mCe},l=await r.resolveQuery(o),u=new bie.StopWatch,d=await this._tfIdfWorker.value.proxy.search(l,c),p=u.elapsed();v0.info(this.ctx,`TF-IDF search completed in ${p}ms`,{chunksFound:d.chunks.length,searchTelemetry:d.telemetry}),l0(o);let h=await this.applyEmbeddingReranking(l,d.chunks,Tm(n),o),m=h.chunks.length,A=new Set(h.chunks.map(_=>_.chunk.file)).size,y=this._workspaceFileIndex.fileCount,E=s.elapsed();return v0.info(this.ctx,`Search with reranking completed successfully in ${E}ms`,{totalTime:E,finalChunkCount:m,uniqueFileCount:A,rerankTime:h.telemetry.rerankTime}),Cp.sendTfidfSuccess(this.ctx,E,p,h.telemetry.rerankTime,m,A,d.chunks.length,y,Yg.Aggregate),{chunks:h.chunks}}catch(c){throw v0.error(this.ctx,"TF-IDF search failed",c),Cp.sendTfidfFailure(this.ctx,c),c}}async searchFiles(r,n,o,s){let c=new bie.StopWatch;if(v0.info(this.ctx,"Starting file-scoped search",{query:r.rawQuery,fileCount:o.length,files:o}),!o.length)return v0.info(this.ctx,"No files to search, returning empty results"),{chunks:[]};if(await this.initializeFiles(o),this._isDisposed)throw new Error("TfidfChunkSearch has been disposed");let l={maxResults:Tm(n),maxSpread:mCe},u=await r.resolveQuery(s),d=await this._tfIdfWorker.value.proxy.search(u,l),p=new Set(o),h=d.chunks.filter(v=>p.has(v.file));v0.info(this.ctx,"Chunks filtered by file scope",{beforeFilter:d.chunks.length,afterFilter:h.length});let m=c.elapsed(),g=await this.applyEmbeddingReranking(u,h,Tm(n),s),A=g.chunks.length,E=new Set(g.chunks.map(v=>v.chunk.file)).size,_=c.elapsed();return v0.info(this.ctx,`File-scoped search completed in ${_}ms`,{finalChunkCount:A,searchTelemetry:d.telemetry,rerankTime:g.telemetry.rerankTime}),Cp.sendTfidfSuccess(this.ctx,_,m,g.telemetry.rerankTime,A,E,h.length,o.length,Yg.Remote),{chunks:g.chunks}}async applyEmbeddingReranking(r,n,o,s){let c=new bie.StopWatch,l=[];if(v0.info(this.ctx,"Starting embedding reranking",{chunkCount:n.length,maxResults:o}),n.length>0){let u=s?void 0:new _n.CancellationTokenSource,d=s??u.token,p=5e3;try{let h=this._embeddingReranker.rerankChunks(r,n,o,d),m=await(0,$Xr.raceTimeout)(h,p,()=>{v0.warn(this.ctx,"Embedding reranking timed out, falling back to TF-IDF results"),u?.cancel()});m&&m.length>0?(l=m,v0.info(this.ctx,`Reranking completed in ${c.elapsed()}ms`,{rerankedCount:m.length})):(v0.warn(this.ctx,"Reranking returned no results, falling back to TF-IDF results"),l=n.slice(0,o).map(g=>({chunk:g,distance:void 0})))}catch(h){v0.error(this.ctx,"Error during embedding reranking, falling back to TF-IDF results:",h),l=n.slice(0,o).map(m=>({chunk:m,distance:void 0}))}}else v0.info(this.ctx,"No chunks to rerank");return{chunks:l,telemetry:{rerankTime:c.elapsed()}}}async initializeWorkspace(){if(await this._workspaceFileIndex.initialize(),this._isDisposed)throw new Error("TfidfChunkSearch disposed during initialization");let r=Array.from(this._workspaceFileIndex.values()),n=r;r.length>this._maxFileCount&&(n=r.slice(0,this._maxFileCount),v0.warn(this.ctx,`Workspace has too many files, limiting indexing from ${r.length} to ${this._maxFileCount}`)),v0.info(this.ctx,"Preparing files for indexing",{totalFiles:r.length,filesToIndex:n.length,maxFileCount:this._maxFileCount});let o=await Promise.all(n.map(async s=>({uri:s.uri,contentId:await s.getFastContentVersionId()})));return await this._tfIdfWorker.value.proxy.initialize(o)}async getFastContentVersionId(r){let n=await this.ctx.get(Xn).stat(r);return`${n.size}-${n.mtime}`}async initializeFiles(r){let n=new Set(r),o=Array.from(this._workspaceFileIndex.values()).filter(s=>n.has(s.uri)).map(s=>s.uri);o.length&&await this._tfIdfWorker.value.proxy.addOrUpdate(o)}registerFileWatchers(){let r=[],n=this._workspaceFileIndex.onDidCreateFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.addOrUpdate(c).catch(l=>{console.error("Error handling file create event:",l)})});r.push(n);let o=this._workspaceFileIndex.onDidChangeFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.addOrUpdate(c).catch(l=>{console.error("Error handling file change event:",l)})});r.push(o);let s=this._workspaceFileIndex.onDidDeleteFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.delete(c).catch(l=>{console.error("Error handling file delete event:",l)})});return r.push(s),{dispose:a(()=>{r.forEach(c=>c.dispose())},"dispose")}}getDbPath(){if(this._customDbPath)return this._customDbPath;let r=Pqe(this._workspaceFileIndex);return Qqe.join(r,"local-index.db")}firstExistingPath(r){for(let n of r)if((0,zXr.existsSync)(n))return n}};f();f();var Tie=class{static{a(this,"WorkspaceLifecycleListener")}start(){}didAddWorkspace(e){}didRemoveWorkspace(e){}didTerminateWorkspaceSubfolders(e,r){}didChangeFiles(e){}},Pfo="workspaceLifecycleManager",Jg=new Se(Pfo),wk=class t{constructor(e){this.ctx=e;this.activeListeners=[];this.watchedWorkspaces=[];this.ctx=e;let r=ss(e,async()=>{r.dispose(),await this.start()})}static{a(this,"WorkspaceLifecycleManager")}async start(){for(let e of this.activeListeners)await e.isEnabled()?e.isStarted()?Jg.debug(this.ctx,`listener ${e.constructor.name} is already started`):(Jg.debug(this.ctx,`starting listener ${e.constructor.name}`),await e.start()):Jg.debug(this.ctx,`listener ${e.constructor.name} is not enabled`);Jg.debug(this.ctx,"WorkspaceLifecycleManager started"),this.ctx.get(zr).onDidChangeWorkspaceFolders(e=>{this.onWorkspacesAdded(e.added,this.ctx),this.onWorkspacesRemoved(e.removed,this.ctx)}),await this.onWorkspacesAdded(this.ctx.get(zr).getWorkspaceFolders(),this.ctx)}static isSubfolder(e,r){let n=e.uri,o=r.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return n!==o&&n.startsWith(o)}async onWorkspacesAdded(e,r){if(!e.length){Jg.debug(r,"No workspaces to add.");return}Jg.debug(r,`Adding workspaces: ${e.map(l=>l.uri).join(", ")}`);let n=[...this.watchedWorkspaces,...e];Jg.debug(r,`Combined workspaces: ${n.map(l=>l.uri).join(", ")}`);let o=n.filter((l,u,d)=>d.findIndex(p=>p.uri===l.uri)===u&&!d.some(p=>t.isSubfolder(l,p)));Jg.debug(r,`Filtered workspaces: ${o.map(l=>l.uri).join(", ")}`);let s=o.filter(l=>!this.watchedWorkspaces.some(u=>u.uri===l.uri));Jg.debug(r,`New workspaces: ${s.map(l=>l.uri).join(", ")}`);let c=this.watchedWorkspaces.filter(l=>!o.some(u=>u.uri===l.uri));Jg.debug(r,`Removed workspaces: ${c.map(l=>l.uri).join(", ")}`),this.watchedWorkspaces=o;for(let l of c){Jg.debug(r,`Terminating watching for removed workspace: ${l.uri}`),r.get(Wg).terminateWatching(l);for(let d of this.activeListeners)Jg.debug(r,`Notifying listener of removed workspace: ${l.uri}`),await d.didRemoveWorkspace(l)}for(let l of s){if(!l.uri)continue;Jg.debug(r,`Starting to watch new workspace: ${l.uri}`);let u=r.get(Wg);if(u.shouldStartWatching(l)){u.startWatching(l);let d=u.terminateSubfolderWatchers(l);if(d.length){Jg.debug(r,`Terminated subfolder watchers for workspace: ${l.uri}, Subfolders: ${d.map(p=>p.uri).join(", ")}`);for(let p of this.activeListeners)await p.didTerminateWorkspaceSubfolders(l,d)}for(let p of this.activeListeners)Jg.debug(r,`Adding file change listener for workspace: ${l.uri}`),u.onFileChange(l,p.didChangeFiles.bind(p))}}for(let l of this.activeListeners)for(let u of s)Jg.debug(r,`Notifying ${l.constructor.name} of added workspace: ${u.uri}`),await l.didAddWorkspace(u)}async onWorkspacesRemoved(e,r){if(e.length)for(let n of e){if(!n.uri)continue;r.get(Wg).terminateWatching(n),this.watchedWorkspaces=this.watchedWorkspaces.filter(s=>s.uri!==n.uri);for(let s of this.activeListeners)await s.didRemoveWorkspace(n)}}addListener(e){this.activeListeners.push(e)}removeListener(e){this.activeListeners=this.activeListeners.filter(r=>r!==e)}removeAllListeners(){this.activeListeners=[]}};function Gqe(t){t.set(wk,new wk(t))}a(Gqe,"setupWorkspaceLifecycleListener");f();f();var $Dt=class{constructor(){this._value="";this._pos=0}static{a(this,"StringIterator")}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;r--,this._valueLen--){let n=this._value.charCodeAt(r);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,r=()=>!1){return new t(new WDt(e,r))}static forPaths(e=!1){return new t(new Hqe(void 0,!e))}static forStrings(){return new t(new $Dt)}static forConfigKeys(){return new t(new VDt)}constructor(e){this._iter=e}clear(){this._root=void 0}fill(e,r){if(r){let n=r.slice(0);Qxt(n);for(let o of n)this.set(o,e)}else{let n=e.slice(0);Qxt(n);for(let o of n)this.set(o[0],o[1])}}set(e,r){let n=this._iter.reset(e),o;this._root||(this._root=new Sie,this._root.segment=n.value());let s=[];for(o=this._root;;){let l=n.cmp(o.segment);if(l>0)o.left||(o.left=new Sie,o.left.segment=n.value()),s.push([-1,o]),o=o.left;else if(l<0)o.right||(o.right=new Sie,o.right.segment=n.value()),s.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new Sie,o.mid.segment=n.value()),s.push([0,o]),o=o.mid;else break}let c=DO.unwrap(o.value);o.value=DO.wrap(r),o.key=e;for(let l=s.length-1;l>=0;l--){let u=s[l][1];u.updateHeight();let d=u.balanceFactor();if(d<-1||d>1){let p=s[l][0],h=s[l+1][0];if(p===1&&h===1)s[l][1]=u.rotateLeft();else if(p===-1&&h===-1)s[l][1]=u.rotateRight();else if(p===1&&h===-1)u.right=s[l+1][1]=s[l+1][1].rotateRight(),s[l][1]=u.rotateLeft();else if(p===-1&&h===1)u.left=s[l+1][1]=s[l+1][1].rotateLeft(),s[l][1]=u.rotateRight();else throw new Error;if(l>0)switch(s[l-1][0]){case-1:s[l-1][1].left=s[l][1];break;case 1:s[l-1][1].right=s[l][1];break;case 0:s[l-1][1].mid=s[l][1];break}else this._root=s[0][1]}}return c}get(e){return DO.unwrap(this._getNode(e)?.value)}_getNode(e){let r=this._iter.reset(e),n=this._root;for(;n;){let o=r.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(r.hasNext())r.next(),n=n.mid;else break}return n}has(e){let r=this._getNode(e);return!(r?.value===void 0&&r?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,r){let n=this._iter.reset(e),o=[],s=this._root;for(;s;){let c=n.cmp(s.segment);if(c>0)o.push([-1,s]),s=s.left;else if(c<0)o.push([1,s]),s=s.right;else if(n.hasNext())n.next(),o.push([0,s]),s=s.mid;else break}if(s){if(r?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){let c=[[1,s]],l=this._min(s.right,c);if(l.key){s.key=l.key,s.value=l.value,s.segment=l.segment;let u=l.right;if(c.length>1){let[p,h]=c[c.length-1];switch(p){case-1:h.left=u;break;case 0:Bj(!1);case 1:Bj(!1)}}else s.right=u;let d=this._balanceByStack(c);if(o.length>0){let[p,h]=o[o.length-1];switch(p){case-1:h.left=d;break;case 0:h.mid=d;break;case 1:h.right=d;break}}else this._root=d}}else{let c=s.left??s.right;if(o.length>0){let[l,u]=o[o.length-1];switch(l){case-1:u.left=c;break;case 0:u.mid=c;break;case 1:u.right=c;break}}else this._root=c}this._root=this._balanceByStack(o)??this._root}}_min(e,r){for(;e.left;)r.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let r=e.length-1;r>=0;r--){let n=e[r][1];n.updateHeight();let o=n.balanceFactor();if(o>1?(n.right.balanceFactor()>=0||(n.right=n.right.rotateRight()),e[r][1]=n.rotateLeft()):o<-1&&(n.left.balanceFactor()<=0||(n.left=n.left.rotateLeft()),e[r][1]=n.rotateRight()),r>0)switch(e[r-1][0]){case-1:e[r-1][1].left=e[r][1];break;case 1:e[r-1][1].right=e[r][1];break;case 0:e[r-1][1].mid=e[r][1];break}else return e[0][1]}}findSubstr(e){let r=this._iter.reset(e),n=this._root,o;for(;n;){let s=r.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(r.hasNext())r.next(),o=DO.unwrap(n.value)||o,n=n.mid;else break}return n&&DO.unwrap(n.value)||o}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,r){let n=this._iter.reset(e),o=this._root;for(;o;){let s=n.cmp(o.segment);if(s>0)o=o.left;else if(s<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):r?DO.unwrap(o.value):void 0}}hasElementOrSubtree(e){return this._findSuperstrOrElement(e,!0)!==void 0}forEach(e){for(let[r,n]of this)e(n,r)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let r=[];return this._dfsEntries(e,r),r[Symbol.iterator]()}_dfsEntries(e,r){e&&(e.left&&this._dfsEntries(e.left,r),e.value!==void 0&&r.push([e.key,DO.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,r),e.right&&this._dfsEntries(e.right,r))}_isBalanced(){let e=a(r=>{if(!r)return!0;let n=r.balanceFactor();return n<-1||n>1?!1:e(r.left)&&e(r.right)},"nodeIsBalanced");return e(this._root)}};var YXr=de(wc()),KXr=de(require("fs")),JXr=de(Nn());var Nfo=1.5*1024*1024,zDt=class{constructor(e){this._uri=e;this._isDisposed=!1;this._disposedCts=new JXr.CancellationTokenSource}static{a(this,"FileRepresentation")}dispose(){this._isDisposed=!0,this._disposedCts.cancel(),this._disposedCts.dispose()}get uri(){return this._uri}async getFastContentVersionId(){let e=await this.getStats();return`${e.size}-${e.mtime}`}},$qe=class extends zDt{constructor(r,n,o){super(r);this._ctx=o;this._fileReadLimiter=n}static{a(this,"FsFileRepresentation")}isDirty(){return!1}async getStats(){let r=await this._ctx.get(Xn).stat(this.uri.toString());return{size:r.size,mtime:r.mtime}}async getText(){try{let r=await this._readFile();return!r||this._isDisposed?"":new TextDecoder().decode(r.data)}catch{return""}}async _readFile(){try{let r=Qo(this.uri);return await this._fileReadLimiter.queue(async()=>({data:await(0,YXr.raceCancellationError)(Dfo(r,Nfo),this._disposedCts.token)}))}catch{return}}};async function Dfo(t,e){return new Promise((r,n)=>{let o=KXr.createReadStream(t,{start:0,end:e-1}),s=[],c=0;o.on("data",l=>(c+=l.length,s.push(l))),o.on("end",()=>r(Buffer.concat(s))),o.on("error",n)})}a(Dfo,"readLocalTextFileUsingReadStream");var Vqe=class{constructor(e,r,n){this.ctx=e;this.workspaceFolder=r;this.limiter=n;this._fsFileTree=new YDt;this._onDidCreateFiles=new ki;this.onDidCreateFiles=this._onDidCreateFiles.event;this._onDidChangeFiles=new ki;this.onDidChangeFiles=this._onDidChangeFiles.event;this._onDidDeleteFiles=new ki;this.onDidDeleteFiles=this._onDidDeleteFiles.event}static{a(this,"WorkspaceFileIndex")}get fileCount(){return this._fsFileTree.fileCount}*values(){yield*this._fsFileTree.values()}get(e){let r=Eo(e);return r?this._fsFileTree.get(r):void 0}tryLoad(e){throw new Error("Method not implemented.")}tryRead(e){throw new Error("Method not implemented.")}createOrUpdateFsEntry(e){let r=this._fsFileTree.get(e);r&&r.dispose();let n=new $qe(e,this.limiter,this.ctx);return this._fsFileTree.addFile(e,n),n}async initialize(){return this._initializePromise??=(async()=>{(await this.ctx.get(Wg).getWatchedFiles(this.workspaceFolder)).forEach(r=>{let n=Eo(r.uri);n&&this._fsFileTree.addFile(n,new $qe(r.uri,this.limiter,this.ctx))})})(),this._initializePromise}async didChangeFiles(e){if(e.type==="create"){let r=[];for(let n of e.documents){if((await this.ctx.get(Xn).stat(n.uri)).type!==1)continue;let s=n.uri;this._fsFileTree.get(s)||(this.createOrUpdateFsEntry(s),r.push(s))}r.length&&this._onDidCreateFiles.fire(r)}else if(e.type==="update"){let r=[];for(let n of e.documents){if((await this.ctx.get(Xn).stat(n.uri)).type!==1)continue;let s=n.uri;this.createOrUpdateFsEntry(s),r.push(s)}r.length&&this._onDidChangeFiles.fire(r)}else if(e.type==="delete"){let r=[];for(let n of e.documents){let o=n.uri,s=this._fsFileTree.get(o);if(s)s.dispose(),this._fsFileTree.delete(o),r.push(o);else{let c=this._fsFileTree.deleteFolder(o);c.length&&r.push(...c)}}r.length&&this._onDidDeleteFiles.fire(r)}}},YDt=class{constructor(){this._tree=jqe.forPaths();this._fileCount=0}static{a(this,"SimpleFsTree")}get fileCount(){return this._fileCount}get(e){return this._tree.get(e)}addFile(e,r){this._tree.get(e)||this._fileCount++,this._tree.set(e,r)}clear(){this._tree.clear()}delete(e){let r=!!this.get(e);return this._tree.delete(e),r&&(this._fileCount=Math.max(0,this._fileCount-1)),r}deleteFolder(e){let r=[];for(let[n]of this._tree.findSuperstr(e)??[])r.push(n);for(let n of r)this._tree.delete(n);return this._fileCount=Math.max(0,this._fileCount-r.length),r}*values(){for(let[,e]of this.entries())yield e}entries(){return this._tree}};var XXr=de(wc());var Wqe=class extends Tie{constructor(r){super();this.ctx=r;this.workspaceFileIndexes=new Map;this._onDidWorkspaceAdded=new ki;this.onDidWorkspaceAdded=this._onDidWorkspaceAdded.event;this._onDidWorkspaceRemoved=new ki;this.onDidWorkspaceRemoved=this._onDidWorkspaceRemoved.event;this.ctx.get(wk).addListener(this),this._fileReadLimiter=new XXr.Limiter(20)}static{a(this,"WorkspaceFileWatcher")}isEnabled(){return Promise.resolve(!0)}isStarted(){return!0}async didAddWorkspace(r){if(!await this.isEnabled())return;let n=new Vqe(this.ctx,r,this._fileReadLimiter);this.workspaceFileIndexes.set(r.uri,n),this._onDidWorkspaceAdded.fire(n)}async didRemoveWorkspace(r){if(!await this.isEnabled())return;let n=this.workspaceFileIndexes.get(r.uri);if(n){for(let o of n.values())o.dispose();this._onDidWorkspaceRemoved.fire(n),this.workspaceFileIndexes.delete(r.uri)}}async didChangeFiles(r){if(!await this.isEnabled())return;let n=this.workspaceFileIndexes.get(r.workspaceFolder.uri);n&&await n.didChangeFiles(r)}};var KCe=de(VT()),ZXr=de(jc()),WT=de(wc()),QF=de(Ck());var Ma=new Se("Semantic Search"),eZr;function JDt(t){eZr??=new Promise(e=>{let r=ss(t,async n=>{if(r.dispose(),!t.get(Fn).getCapabilities().watchedFiles){Ma.info(t,"Semantic search is disabled",{reason:"watchedFiles capability is not available"}),e(!1);return}let s=t.get(jt),c=await s.updateExPValuesAndAssignments(n),l=s.ideEnableCopilotSemanticSearch(c),u=n.getTokenValue("editor_preview_features")==="0",d=!u&&l;e(d),Ma.info(t,"Semantic search feature flag is updated",{shouldEnableSemanticSearch:d,ideSemanticSearchEnabledExpFlag:l,editorPreviewFeaturesDisabled:u})})})}a(JDt,"initializeSemanticSearchFeatureFlag");async function qF(t){return $4e(t)?!0:(JDt(t),eZr)}a(qF,"isSemanticSearchEnabled");var cw=class{constructor(e){this._ctx=e;this._availableEmbeddingTypes=new Rqe(e),this.tryInit()}static{a(this,"WorkspaceChunkSearchService")}dispose(){this._impl?.dispose()}async tryInit(){if(this._impl)return this._impl;let e=await this._availableEmbeddingTypes.getPreferredType();if(e)return this._impl=new KDt(this._ctx,e),this._impl}async searchWorkspace(e,r,n){let o=await this.tryInit();if(!o)throw new Error("Workspace chunk search service not available");return await o.searchWorkspace(e,r,n)}},KDt=class{constructor(e,r){this._ctx=e;this._embeddingType=r;this._localEmbeddingsByWorkspace=new Map;this._localTfidfByWorkspace=new Map;this._diffTrackersByWorkspace=new Map;this._workspaceFileIndexes=new Map;let n=new Wqe(this._ctx),o=new XQe(this._ctx);this._localDiffSearch=new Lqe(this._localEmbeddingsByWorkspace,this._localTfidfByWorkspace,this._workspaceFileIndexes,this._diffTrackersByWorkspace),this._githubCodeSearchService=new KQe(this._ctx),this._codeSearchChunkSearch=new ZQe(this._ctx,this._embeddingType,this._localDiffSearch,this._githubCodeSearchService),n.onDidWorkspaceAdded(s=>{this._workspaceFileIndexes.set(s.workspaceFolder.uri,s);let c=new Nqe(this._ctx,s,this._embeddingType,o);this._localEmbeddingsByWorkspace.set(s.workspaceFolder.uri,c);let l=new qqe(this._ctx,s,{embeddingType:this._embeddingType});this._localTfidfByWorkspace.set(s.workspaceFolder.uri,l);let u=new wqe(this._ctx,s,this._githubCodeSearchService);this._diffTrackersByWorkspace.set(s.workspaceFolder.uri,u),process.env.GITHUB_COPILOT_SIMULATION!=="1"&&qF(this._ctx).then(d=>{d&&(u.initialize(),c.triggerLocalIndexing(),l.initialize())})}),n.onDidWorkspaceRemoved(s=>{let c=s.workspaceFolder.uri,l=this._diffTrackersByWorkspace.get(c);l&&(l.dispose(),this._diffTrackersByWorkspace.delete(c));let u=this._localTfidfByWorkspace.get(c);u&&(u.dispose(),this._localTfidfByWorkspace.delete(c));let d=this._localEmbeddingsByWorkspace.get(c);d&&(d.dispose(),this._localEmbeddingsByWorkspace.delete(c))})}static{a(this,"WorkspaceChunkSearchServiceImpl")}dispose(){this._githubCodeSearchService.dispose();for(let e of this._localTfidfByWorkspace.values())e.dispose();this._localTfidfByWorkspace.clear();for(let e of this._localEmbeddingsByWorkspace.values())e.dispose();this._localEmbeddingsByWorkspace.clear();for(let e of this._diffTrackersByWorkspace.values())e.dispose();this._diffTrackersByWorkspace.clear(),this._workspaceFileIndexes.clear()}async searchWorkspace(e,r,n){let o=new QF.StopWatch,s=await this.resolveQueryText(e,n);Ma.info(this._ctx,"Starting semantic search",{resolvedQuery:s,maxResults:Tm(r),tokenBudget:r.tokenBudget,workspaceFolders:r.workspaceFolders});let c=this.toQueryWithEmbeddings(e,s),l=await this.doSearchFileChunks(c,r,n);if(l.isError())throw Ma.error(this._ctx,"Semantic search failed",l.err),Cp.sendAggregateFailure(this._ctx,l.err),new Error(`Workspace chunk search failed: ${l.err.errorDiagMessage}`);Ma.info(this._ctx,`Search strategy '${l.val.strategy}' returned results`,{strategy:l.val.strategy,chunkCount:l.val.result.chunks.length});let u=await(0,WT.raceCancellationError)(this.filterIgnoredChunks(l.val.result.chunks),n);Ma.info(this._ctx,"Chunks filtered",{beforeFilter:l.val.result.chunks.length,afterFilter:u.length});let d=await this.rerankChunks(c,u,Tm(r),n),p=d.length,m=new Set(d.map(A=>A.chunk.file)).size,g=o.elapsed();return Ma.info(this._ctx,`Search completed successfully in ${o.elapsed()}ms`,{totalTime:o.elapsed(),strategy:l.val.strategy,finalChunkCount:p,uniqueFileCount:m}),Cp.sendAggregateSuccess(this._ctx,l.val.strategy,g,p,m,r.workspaceFolders.length,r.source),{chunks:d}}toQueryWithEmbeddings(e,r){let n;return{...e,resolveQueryEmbeddings:a(o=>(n??=this.computeQueryEmbedding(e,o,r),n),"resolveQueryEmbeddings")}}async computeQueryEmbedding(e,r,n){l0(r);let o=n??await this.resolveQueryText(e,r),s=await this.getEmbeddingComputer().computeEmbeddings(this._embeddingType,[o],{inputType:"query"},r);if(!s?.values.length)throw new Error("Failed to compute query embeddings");return s.values[0]}async resolveQueryText(e,r){try{return await e.resolveQuery(r)}catch(n){if(Dx(n))throw n;return Ma.debug(this._ctx,"Falling back to raw query text",n),e.rawQuery}}getEmbeddingComputer(){return this._embeddingComputer||(this._embeddingComputer=new _ie(this._ctx)),this._embeddingComputer}async doSearchFileChunks(e,r,n){Ma.info(this._ctx,"Starting semantic search with fallback strategy");let o=process.env.GITHUB_COPILOT_SIMULATION==="1"?1e6:12500;return this.runSearchStrategyWithFallback(this._codeSearchChunkSearch,()=>(0,WT.createCancelablePromise)(s=>this.doSearchFileChunksLocally(e,r,s)),o,e,r,n)}async runSearchStrategyWithFallback(e,r,n,o,s,c){let l=new QF.StopWatch;Ma.info(this._ctx,`Attempting primary strategy '${e.id}'`,{timeout:n});let u=(0,WT.createCancelablePromise)(g=>this.runSearchStrategy(e,o,s,g));c.onCancellationRequested(()=>u.cancel());let d=await(0,WT.raceCancellationError)((0,WT.raceTimeout)(u,n),c);if(d?.isOk())return Ma.info(this._ctx,`Primary strategy '${e.id}' succeeded in ${l.elapsed()}ms`,{strategy:e.id,elapsedTime:l.elapsed()}),d;Ma.warn(this._ctx,`Primary strategy '${e.id}' failed or timed out, falling back to local search`,{elapsedTime:l.elapsed(),isTimeout:d===void 0,error:d?.isError()?d.err:void 0});let p=r();c.onCancellationRequested(()=>p.cancel()),p.then(()=>u.cancel(),()=>u.cancel());let h=new QF.StopWatch,m=await Bqe([u,p]);return Ma.info(this._ctx,`Search operation completed in ${l.elapsed()}ms (fallback took ${h.elapsed()}ms)`,{totalTime:l.elapsed(),fallbackTime:h.elapsed(),success:m.isOk()}),m}async doSearchFileChunksLocally(e,r,n){Ma.info(this._ctx,"Starting local file chunk search",{folderCount:r.workspaceFolders.length});let o=[],s=new Set;for(let l of r.workspaceFolders){let u=this._localEmbeddingsByWorkspace.get(l),d=this._localTfidfByWorkspace.get(l);if(u&&d){Ma.info(this._ctx,`Both strategies available for folder: ${l}, using embeddings with TF-IDF fallback`);let p=8e3,h=new QF.StopWatch,m=await this.runSearchStrategyWithFallback(u,()=>(0,WT.createCancelablePromise)(g=>this.runSearchStrategy(d,e,r,g)),p,e,r,n);m.isOk()&&(o.push(...m.val.result.chunks),s.add(m.val.strategy),Ma.info(this._ctx,`Folder search completed in ${h.elapsed()}ms`,{folder:l,strategy:m.val.strategy,chunkCount:m.val.result.chunks.length,elapsedTime:h.elapsed()}))}else if(u){Ma.info(this._ctx,`Using embeddings search for folder: ${l}`);let p=new QF.StopWatch,h=await this.runSearchStrategy(u,e,r,n);o.push(...h.isOk()?h.val.result.chunks:[]),s.add(u.id),Ma.info(this._ctx,`Embeddings search completed in ${p.elapsed()}ms`,{folder:l,chunkCount:h.isOk()?h.val.result.chunks.length:0,elapsedTime:p.elapsed()})}else if(d){Ma.info(this._ctx,`Using TF-IDF search for folder: ${l}`);let p=new QF.StopWatch,h=await this.runSearchStrategy(d,e,r,n);o.push(...h.isOk()?h.val.result.chunks:[]),s.add(d.id),Ma.info(this._ctx,`TF-IDF search completed in ${p.elapsed()}ms`,{folder:l,chunkCount:h.isOk()?h.val.result.chunks.length:0,elapsedTime:p.elapsed()})}else Ma.warn(this._ctx,`No local search strategy available for folder: ${l}`)}let c=s.size===1?s.values().next().value:"mixed";return Ma.info(this._ctx,"Local search completed",{strategy:c,totalChunkCount:o.length,strategiesUsed:Array.from(s)}),KCe.Result.ok({strategy:c,result:{chunks:o}})}async runSearchStrategy(e,r,n,o){let s=new QF.StopWatch;Ma.info(this._ctx,`Running search strategy '${e.id}'`);try{let c=await(0,WT.raceCancellationError)(e.searchWorkspace(r,n,o),o);return c?(Ma.info(this._ctx,`Strategy '${e.id}' completed successfully in ${s.elapsed()}ms`,{strategy:e.id,chunkCount:c.chunks.length,elapsedTime:s.elapsed()}),KCe.Result.ok({strategy:e.id,result:c})):(Ma.warn(this._ctx,`Strategy '${e.id}' returned no result`,{strategy:e.id,elapsedTime:s.elapsed()}),KCe.Result.error({errorDiagMessage:`${e.id}: no result`}))}catch(c){if(Dx(c))throw Ma.info(this._ctx,`Strategy '${e.id}' was cancelled`,{elapsedTime:s.elapsed()}),c;return Ma.error(this._ctx,c,`Error during '${e.id}' search, elapsed: ${s.elapsed()}ms`),KCe.Result.error({errorDiagMessage:`${e.id} error: ${String(c)}`})}}async filterIgnoredChunks(e){return(0,ZXr.coalesce)(await Promise.all(e.map(async r=>(await this._ctx.get(bc).evaluate(r.chunk.file,r.chunk.text)).isBlocked?null:r)))}async rerankChunks(e,r,n,o){if(!r.length)return[];try{let s,c=r.at(0)?.distance?.embeddingType;if(c&&r.every(p=>typeof p.distance<"u"&&p.distance.embeddingType.equals(c)))s=[...r].sort((p,h)=>h.distance.value-p.distance.value);else{let h=r.map((A,y)=>({...A.chunk,distance:A.distance,index:y})).filter(A=>typeof A.distance>"u"||!A.distance.embeddingType.equals(this._embeddingType)),m;if(h.length){Ma.debug(this._ctx,`WorkspaceChunkSearch.rerankChunks. Scoring ${h.length} new chunks`);let A=this.scoreChunks(e,h,o);m=await(0,WT.raceCancellationError)(A,o)}let g=[];for(let A=0;AA?.distance?.embeddingType.equals(this._embeddingType)).sort((A,y)=>y.distance.value-A.distance.value)}if(!s.length)return s;s=s.slice(0,n);let u=s[0].distance.value*mCe,d=s.filter(p=>p.distance.value>=u);return Ma.debug(this._ctx,`Eagerly filtered out ${s.length-d.length} chunks due to low quality`),d}catch(s){return Dx(s)||Ma.error(this._ctx,"Failed to search chunk embeddings index"),r.slice(0,n)}}async scoreChunks(e,r,n){if(!r.length)return[];let o=r.map(l=>this.chunkToIndexString(l)),[s,c]=await(0,WT.raceCancellationError)(Promise.all([e.resolveQueryEmbeddings(n),this.computeEmbeddings("document",o,n)]),n);return c.values.map((l,u)=>({chunk:r[u],distance:gCe(s,l)}))}async computeEmbeddings(e,r,n){let o=await this.getEmbeddingComputer().computeEmbeddings(this._embeddingType,r,{inputType:e},n);if(!o)throw new Error("Failed to compute embeddings");return o}chunkToIndexString(e){return this.toStringForEmbeddingsComputer(e,Eo(e.file)??e.file)}toStringForEmbeddingsComputer(e,r){let n=Sm(e.text);return`File: \`${r}\` + `);let l=c.prepare("SELECT version, embeddingModel FROM CacheMeta LIMIT 1").get();(!l||l.version!==this.version||l.embeddingModel!==r.id)&&c.exec("DELETE FROM CacheMeta; DELETE FROM Files; DELETE FROM FileChunks;"),c.exec("DELETE FROM CacheMeta;"),c.prepare("INSERT INTO CacheMeta (version, embeddingModel) VALUES (?, ?)").run(this.version,r.id),await o.initialize();let u=c.prepare("SELECT id, uri FROM Files");try{c.exec("BEGIN TRANSACTION");for(let d of u.all()){let p=d;try{if(o.get(p.uri))continue}catch{}c.prepare("DELETE FROM Files WHERE id = ?").run(p.id)}}finally{c.exec("COMMIT")}return new t(r,c)}dispose(){this.db.close()}async isIndexed(e){return(await this.getEntry(e))?.state==="resolved"}async get(e){return(await this.getEntry(e))?.value}getCurrentChunksForUri(e){let r=bl(e),n=this._inMemory.get(r);if(n?.state==="pending"||n?.state==="rejected")return;let o=this.db.prepare("SELECT fc.text, fc.range_startLineNumber, fc.range_startColumn, fc.range_endLineNumber, fc.range_endColumn, fc.embedding, fc.chunkHash FROM Files f JOIN FileChunks fc ON f.id = fc.fileId WHERE f.uri = ?").all(e.toString());if(o.length>0){let s=new Map;for(let c of o){let l=eNt(this.embeddingType,c.embedding),u={chunk:{file:e.toString(),text:c.text,rawText:void 0,range:new rNt.Range(c.range_startLineNumber,c.range_startColumn,c.range_endLineNumber,c.range_endColumn)},embedding:l,chunkHash:c.chunkHash};u.chunkHash&&s.set(u.chunkHash,u)}return s}}async getEntry(e){let r=bl(e.uri),n=this._inMemory.get(r),o=await e.getFastContentVersionId();if(n?.contentVersionId===o)return n;let s=this.db.prepare("SELECT id, contentVersionId FROM Files WHERE uri = ?").get(e.uri.toString());if(!s||s.contentVersionId!==o)return;let c=this.db.prepare("SELECT text, range_startLineNumber, range_startColumn, range_endLineNumber, range_endColumn, embedding, chunkHash FROM FileChunks WHERE fileId = ?").all(s.id);return{state:"resolved",contentVersionId:s.contentVersionId,fileHash:void 0,value:c.map(l=>({chunk:{file:e.uri.toString(),text:l.text,rawText:void 0,range:new rNt.Range(l.range_startLineNumber,l.range_startColumn,l.range_endLineNumber,l.range_endColumn)},embedding:eNt(this.embeddingType,l.embedding),chunkHash:l.chunkHash}))}}async update(e,r){let n=bl(e.uri),o=this._inMemory.get(n),s=await e.getFastContentVersionId();if(o?.contentVersionId===s)return o.value;let c=await this.getEntry(e);if(c?.contentVersionId===s)return c.value;o?.state==="pending"&&o.value.cancel();let l=(0,RZr.createCancelablePromise)(r),u={contentVersionId:s,fileHash:void 0,state:"pending",value:l};return this._inMemory.set(n,u),await l.then(d=>({contentVersionId:s,fileHash:void 0,state:Array.isArray(d)?"resolved":"rejected",value:d}),()=>({contentVersionId:s,fileHash:void 0,state:"rejected",value:void 0})).then(d=>{let p=this._inMemory.get(n);if(u===p)if(d.state==="rejected")this._inMemory.set(n,d),this.db.prepare("DELETE FROM Files WHERE uri = ?").run(n.toString());else{this._inMemory.delete(n);let h=this.db.prepare("INSERT OR REPLACE INTO Files (uri, contentVersionId) VALUES (?, ?)").run(e.uri.toString(),s);try{let m=this.db.prepare("INSERT INTO FileChunks (fileId, text, range_startLineNumber, range_startColumn, range_endLineNumber, range_endColumn, embedding, chunkHash) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");this.db.exec("BEGIN TRANSACTION");for(let g of d.value??[])m.run(h.lastInsertRowid,g.chunk.text,g.chunk.range.startLineNumber,g.chunk.range.startColumn,g.chunk.range.endLineNumber,g.chunk.range.endColumn,wZr(g.embedding),g.chunkHash??"")}finally{this.db.exec("COMMIT")}}}),l}};var NZr=de(Lc()),HEe=de(vc()),MZr=de(c4());var UQe=class{constructor(e,r,n,o){this.ctx=e;this._embeddingType=r;this._workspaceFileIndex=n;this._chunkingEndpointClient=o;this._cache=new MZr.Lazy(async()=>(this._cacheRoot=FQe(this._workspaceFileIndex),await DZr(this.ctx,this._embeddingType,this._cacheRoot,this._workspaceFileIndex)))}static{a(this,"WorkspaceChunkEmbeddingsIndex")}dispose(){this._cache.hasValue&&this._cache.value.then(e=>e.dispose())}async getIndexState(){if(!this._cache.hasValue)return;let e=await this._cache.value,r=Array.from(this._workspaceFileIndex.values()),n=0;return await Promise.all(r.map(async o=>{await e.isIndexed(o)&&n++})),{totalFileCount:r.length,indexedFileCount:n}}get fileCount(){return this._workspaceFileIndex.fileCount}async triggerIndexingOfWorkspace(e,r){let n=Array.from(this._workspaceFileIndex.values());await Promise.all(n.map(o=>this.triggerIndexingOfFile(o.uri,e,r)))}async triggerIndexingOfFile(e,r,n){let o=this._workspaceFileIndex.get(e);o&&await this.getChunksAndEmbeddings(r,o,new GEe,"Batch",n)}async searchWorkspace(e,r,n,o){let[s,c]=await(0,HEe.raceCancellationError)(Promise.all([r,this.getAllWorkspaceEmbeddings(e,o)]),o);return this.rankEmbeddings(s,c,n)}async searchSubsetOfFiles(e,r,n,o,s){if(!r.length)return[];let[c,l]=await(0,HEe.raceCancellationError)(Promise.all([n,this.getEmbeddingsForFiles(e,r,s)]),s);return this.rankEmbeddings(c,l,o)}rankEmbeddings(e,r,n){return nYr(e,r.map(o=>[o.chunk,o.embedding]),n).map(o=>({chunk:o.value,distance:o.distance}))}async getAllWorkspaceEmbeddings(e,r){let o=Array.from(this._workspaceFileIndex.values()).map(s=>s.uri);return this.getEmbeddingsForFiles(e,o,r)}async getEmbeddingsForFiles(e,r,n){let o=new GEe,s=await Promise.all(r.map(async c=>{let l=this._workspaceFileIndex.get(c);if(l)return await this.getChunksAndEmbeddings(e,l,o,"Batch",n)}));return(0,NZr.coalesce)(s).flat()}async getChunksAndEmbeddings(e,r,n,o,s){let c=await(0,HEe.raceCancellationError)(this._cache.value,s),l=await(0,HEe.raceCancellationError)(c.get(r),s);if(l)return l;let u=c.getCurrentChunksForUri(r.uri);return await c.update(r,async p=>this._chunkingEndpointClient.computeChunksAndEmbeddings(e,this._embeddingType,r,n,o,u,p))}};var OZr=de(vc()),BZr=de(Wx()),One=de(ck());var Am=new Se("Embeddings Search"),QQe=class t{constructor(e,r,n,o){this._ctx=e;this._workspaceFileIndex=r;this.embeddingType=n;this.chunkingEndpointClient=o;this.id="embeddings";this._state="unknown";this._disposeCts=new Cn.CancellationTokenSource;this._reindexRequests=new BZr.ResourceMap}static{a(this,"EmbeddingsChunkSearch")}static{this.defaultAutomaticIndexingFileCap=750}dispose(){this._disposeCts.cancel(),this._disposeCts.dispose();for(let[,e]of this._reindexRequests)e.dispose();this._reindexRequests.clear(),this._embeddingsIndex?.dispose()}async triggerLocalIndexing(){if(Am.info(this._ctx,"Triggering local indexing..."),await this.initializeWorkspaceIndex(),this._state==="tooManyFilesForAutomaticIndexing"){Am.info(this._ctx,"Skipping automatic indexing: too many files",{fileCount:this._workspaceFileIndex.fileCount});return}await this.triggerIndexingOfWorkspace()}async searchWorkspace(e,r,n){let o=new One.StopWatch;Am.info(this._ctx,"Starting workspace embedding search",{rawQuery:e.rawQuery,maxResults:hm(r),indexStatus:this._state});let s=await this._ctx.get(Nt).getGitHubSession();if(!s)throw Am.error(this._ctx,"No GitHub session found"),new Error("No GitHub session found in EmbeddingsChunkSearch");let c=e.resolveQueryEmbeddings(n);if(await this.doInitialIndexing(),i0(n),(this._state==="updatingIndex"||this._state==="ready")&&this._embeddingsIndex!==void 0){let u=new One.StopWatch,d=await this._embeddingsIndex.searchWorkspace(s,c,hm(r),n),p=u.elapsed(),h=o.elapsed(),m=d.length,A=new Set(d.map(E=>E.chunk.file)).size,y=this._workspaceFileIndex.fileCount;return Am.info(this._ctx,`Workspace search completed successfully in ${h}ms`,{totalTime:h,searchTime:p,chunkCount:m,uniqueFileCount:A,indexStatus:this._state}),hp.sendEmbeddingsSuccess(this._ctx,h,p,m,A,y,qg.Aggregate),{chunks:d}}else{Am.info(this._ctx,"Embeddings index is not ready for workspace search, skip searching.",{indexStatus:this._state}),hp.sendEmbeddingsSkipped(this._ctx,"index_not_ready");return}}async searchFiles(e,r,n,o){if(!n.length)return Am.info(this._ctx,"No files to search, returning empty results"),{chunks:[]};let s=new One.StopWatch;Am.info(this._ctx,"Starting file subset embedding search",{rawQuery:e.rawQuery,maxResults:hm(r),fileCount:n.length});let c=await this._ctx.get(Nt).getGitHubSession();if(!c)throw Am.error(this._ctx,"No GitHub session found"),new Error("No GitHub session found in EmbeddingsChunkSearch");let l=e.resolveQueryEmbeddings(o),u=await this.initializeForFileSubset(n.length);if(!u){Am.info(this._ctx,"Too many files for subset search",{fileCount:n.length});return}i0(o);let d=new One.StopWatch,p=await u.searchSubsetOfFiles(c,n,l,hm(r),o),h=d.elapsed(),m=s.elapsed(),g=p.length,y=new Set(p.map(_=>_.chunk.file)).size,E=this._workspaceFileIndex.fileCount;return Am.info(this._ctx,`File subset search completed successfully in ${m}ms`,{totalTime:m,searchTime:h,chunkCount:g,uniqueFileCount:y}),hp.sendEmbeddingsSuccess(this._ctx,m,h,g,y,E,qg.Remote),{chunks:p}}async initializeForFileSubset(e){await this._workspaceFileIndex.initialize();let r=this.getAutoIndexFileCap();if(e>r){Am.info(this._ctx,`EmbeddingsChunkSearch: skipping subset search due to too many files. Found ${e} files. Max: ${r}`);return}return this.getOrCreateEmbeddingsIndex()}async initializeWorkspaceIndex(){return this._init??=(async()=>{await this._workspaceFileIndex.initialize();let e=this.checkWorkspaceIndexSizeLimits();return e?(Am.info(this._ctx,`EmbeddingsChunkSearch: skipping automatic indexing due to too many files. Found ${this._workspaceFileIndex.fileCount} files. Max: ${this.getAutoIndexFileCap()}`),this.setState(e),!0):(this.getOrCreateEmbeddingsIndex(),this.setState("ready"),!0)})(),this._init}getOrCreateEmbeddingsIndex(){return this._embeddingsIndex||(this._embeddingsIndex=new UQe(this._ctx,this.embeddingType,this._workspaceFileIndex,this.chunkingEndpointClient),Am.info(this._ctx,`EmbeddingsChunkSearch: initializing embeddings index for ${this._workspaceFileIndex.fileCount} files.`)),this._embeddingsIndex}checkWorkspaceIndexSizeLimits(){let e=this.getAutoIndexFileCap();if(this._workspaceFileIndex.fileCount>e)return"tooManyFilesForAutomaticIndexing"}async doInitialIndexing(){return this._initialIndexing??=(async()=>{if(await this.initializeWorkspaceIndex(),!(this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing"))return this.triggerIndexingOfWorkspace(),this.registerAutomaticReindexListeners(),!0})(),this._initialIndexing}async triggerIndexingOfWorkspace(){let e=new One.StopWatch;Am.info(this._ctx,"Starting workspace indexing...",{fileCount:this._workspaceFileIndex.fileCount}),this.setState("updatingIndex");try{let r=await this._ctx.get(Nt).getGitHubSession();if(!r)throw new Error("No GitHub session found");await this._embeddingsIndex?.triggerIndexingOfWorkspace(r,new Cn.CancellationTokenSource().token),this.setState("ready"),Am.info(this._ctx,`Workspace indexing completed in ${e.elapsed()}ms`,{status:"ready",indexingTime:e.elapsed()})}catch(r){Am.error(this._ctx,"Workspace indexing failed",r),this.setState("unknown")}}registerAutomaticReindexListeners(){this._reindexRequests.clear(),this._workspaceFileIndex.onDidCreateFiles(e=>{this.tryTriggerReindexing(e,!0)}),this._workspaceFileIndex.onDidChangeFiles(e=>this.tryTriggerReindexing(e,!0)),this._workspaceFileIndex.onDidDeleteFiles(e=>{for(let r of e){let n=bl(r);this._reindexRequests.get(n)?.dispose(),this._reindexRequests.delete(n)}})}getAutoIndexFileCap(){return t.defaultAutomaticIndexingFileCap}setState(e){this._state!==e&&(this._state=e)}tryTriggerReindexing(e,r=!1){if(this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing")return;let n=6e4;for(let o of e){let s=bl(o),c=this._reindexRequests.get(s);c||(c=new OZr.Delayer(n),this._reindexRequests.set(s,c)),c.trigger(async()=>{if(await this.initializeWorkspaceIndex(),this._state==="tooManyFilesForAnyIndexing"||this._state==="tooManyFilesForAutomaticIndexing")return;let l=await this._ctx.get(Nt).getGitHubSession();this._embeddingsIndex?.triggerIndexingOfFile(o,l,this._disposeCts.token)},r?0:n)}}};f();f();var $Ee=de(MT());async function jQe(t){for(let r of t)r.then(n=>{n.isOk()&&t.forEach(o=>{o!==r&&o.cancel()})},()=>{});let e=await Promise.allSettled(t);for(let r of e)if(r.status==="fulfilled"&&r.value.isOk())return r.value;{let r=[];for(let n of e)n.status==="fulfilled"&&n.value.isError()&&r.push(n.value.err.errorDiagMessage);if(r.length)return $Ee.Result.error({errorDiagMessage:r.join(", ")})}if(e.every(r=>r.status==="rejected"&&vx(r.reason)))return $Ee.Result.error({errorDiagMessage:"cancelled"});for(let r of e)if(r.status==="rejected"&&!vx(r.reason))return $Ee.Result.error({errorDiagMessage:r.reason+""});return $Ee.Result.error({errorDiagMessage:"unknown error"})}a(jQe,"raceSearchOperations");var VEe=de(MT()),WEe=de(vc());var xpo=2e3,wpo=.7,GZr=8e3,Rpo=300,$Qe=class{constructor(e,r,n,o){this._embeddingsByWorkspace=e;this._tfidfByWorkspace=r;this._workspaceFileIndexes=n;this._diffTrackers=o}static{a(this,"LocalDiffSearch")}getTotalFileCount(e){let r=0;for(let n of e){let o=this._workspaceFileIndexes.get(n);o&&(r+=o.fileCount)}return r}async getLocalDiff(e){let r=new Set;for(let n of e){let o=this._diffTrackers.get(n);if(o){let s=await o.getDiffFiles();if(s)for(let c of s)r.add(c)}}return Array.from(r)}shouldDoLocalDiffSearch(e,r){if(e.length===0||e.length>xpo)return!1;let n=this.getTotalFileCount(r);return!(n>0&&e.length/n>wpo)}async searchLocalDiff(e,r,n,o){if(e.length===0)return VEe.Result.ok({strategy:"none",result:{chunks:[]}});let s=[],c=[];for(let u of n.workspaceFolders){let d=this._embeddingsByWorkspace.get(u),p=this._tfidfByWorkspace.get(u);d&&s.push(d),p&&c.push(p)}if(s.length===0&&c.length===0)return VEe.Result.error({errorDiagMessage:"No search instances available"});let l=a((u,d)=>(0,WEe.createCancelablePromise)(async p=>{let h=await Promise.all(u.map(g=>g.searchFiles(r,n,[...e],p))),m=this.mergeSearchResults(h);return VEe.Result.ok({strategy:d,result:m})}),"createSearchOp");if(e.length>Rpo){if(c.length>0){let u=l(c,"tfidf");return o.onCancellationRequested(()=>u.cancel()),await u}return VEe.Result.error({errorDiagMessage:"Diff size too large for embeddings and no TF-IDF available"})}if(s.length>0&&c.length>0){let u=l(s,"embeddings");o.onCancellationRequested(()=>u.cancel());let d=await(0,WEe.raceTimeout)(u,GZr),p=d===void 0;if(d?.isOk()&&d.val.result.chunks.length>0)return d;let h=l(c,"tfidf");return o.onCancellationRequested(()=>h.cancel()),p?(h.then(()=>u.cancel(),()=>u.cancel()),await jQe([u,h])):(u.cancel(),await h)}else if(s.length>0&&c.length===0){let u=l(s,"embeddings");o.onCancellationRequested(()=>u.cancel());let d=await(0,WEe.raceTimeout)(u,GZr);if(d?.isOk()&&d.val.result.chunks.length>0)return d;u.cancel();return}else if(s.length===0&&c.length>0){let u=l(c,"tfidf");return o.onCancellationRequested(()=>u.cancel()),await u}}mergeSearchResults(e){let r=e.filter(o=>!!o);if(r.length===0)return{chunks:[]};if(r.length===1)return{chunks:[...r[0].chunks]};let n=new Map;for(let o of r)for(let s of o.chunks){let c=s.chunk.file,l=n.get(c),u=s.distance?.value??Number.MAX_VALUE,d=l?.distance?.value??Number.MAX_VALUE;(!l||ug.text.toLowerCase()),e.toLowerCase()],u=await s.computeEmbeddings(c,l,{inputType:"document"},o);if(!u||u.values.length===0)return[];if(o.isCancellationRequested)return[];let d=u.values[u.values.length-1],p=u.values.slice(0,-1);if(!r.length||p.length!==r.length)return[];let h=p[0].type,m=p.map((g,A)=>({chunk:r[A],score:hEe(d,g).value}));return m.sort((g,A)=>A.score-g.score),m.slice(0,n).map(g=>({chunk:g.chunk,distance:{embeddingType:h,value:g.score}}))}};f();var HZr=require("worker_threads");var uNt=class{constructor(){this.nextId=1;this.handlers=new Map}static{a(this,"RpcResponseHandler")}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};function Ppo(t){let e={get:a((r,n)=>{if(typeof n=="string")return r[n]||(r[n]=(...o)=>t(n,o)),r[n]},"get")};return new Proxy(Object.create(null),e)}a(Ppo,"createRpcProxy");var WQe=class{constructor(e,r,n){this.responseHandler=new uNt;this.worker=new HZr.Worker(e,r),this.worker.on("message",o=>{"fn"in o?(async()=>{try{let s=n?.[o.fn];if(!s)throw new Error(`Unknown method: ${o.fn}`);let c=await s.apply(n,o.args);this.worker.postMessage({id:o.id,res:c})}catch(s){this.worker.postMessage({id:o.id,err:s instanceof Error?s:new Error(String(s))})}})():this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=Ppo((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}static{a(this,"WorkerWithRpcProxy")}terminate(){this.worker.removeAllListeners(),this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};var jZr=de(vc()),$Zr=de(c4()),VZr=de(ro()),Bne=de(ck()),WZr=require("fs"),zQe=de(require("path"));var A0=new Se("Tfidf Search"),YQe=class extends VZr.Disposable{constructor(r,n,o){super();this.id="tfidf";this._maxFileCount=25e3;this._isDisposed=!1;this._tokenizerName="o200k_base";this._workspaceFileIndex=n,this.ctx=r,this._embeddingReranker=new VQe(r,o?.embeddingType),this._customDbPath=o?.dbPath,this._tfIdfWorker=new $Zr.Lazy(()=>{let s=this.firstExistingPath([zQe.join(__dirname,"tfidfWorker.js"),zQe.join(__dirname,"../../../../dist/tfidfWorker.js")]);if(s===void 0)throw new Error("tfidfWorker file not found");let c={tokenizer:this._tokenizerName,dbPath:this.getDbPath()},l={readFile:a(async u=>{let p=await r.get(In).getOrReadTextDocument({uri:u});if(p.status!=="valid")throw new Error(`Could not read file ${u}: ${p.status}`);return p.document.getText()},"readFile"),getContentVersionId:a(async u=>{try{return await this.getFastContentVersionId(u)}catch(d){throw new Error(`Could not find file ${u}, error: ${String(d)}`)}},"getContentVersionId"),logWarn:a((u,...d)=>(A0.warn(r,u,...d),Promise.resolve()),"logWarn"),logError:a((u,...d)=>(A0.error(r,u,...d),Promise.resolve()),"logError")};return new WQe(s,{workerData:c},l)}),this._register(this.registerFileWatchers())}static{a(this,"TfidfChunkSearch")}dispose(){this._isDisposed=!0,super.dispose(),this._tfIdfWorker.hasValue&&this._tfIdfWorker.value.terminate()}async initialize(){A0.info(this.ctx,"Starting initialization...");let r=new Bne.StopWatch;this._initializePromise??=this.initializeWorkspace();let n=await this._initializePromise;return A0.info(this.ctx,`Initialization completed in ${r.elapsed()}ms`,{outOfSyncFileCount:n.outOfSyncFileCount,newFileCount:n.newFileCount,deletedFileCount:n.deletedFileCount,initTime:n.initTime,dbPath:this.getDbPath()}),n}async searchWorkspace(r,n,o){let s=new Bne.StopWatch;A0.info(this.ctx,"Starting workspace search",{rawQuery:r.rawQuery,maxResults:hm(n)});try{if(await this.initialize(),this._isDisposed)throw hp.sendTfidfFailure(this.ctx,"disposed"),new Error("TfidfChunkSearch has been disposed");let c={maxResults:hm(n),maxSpread:pEe},l=await r.resolveQuery(o),u=new Bne.StopWatch,d=await this._tfIdfWorker.value.proxy.search(l,c),p=u.elapsed();A0.info(this.ctx,`TF-IDF search completed in ${p}ms`,{chunksFound:d.chunks.length,searchTelemetry:d.telemetry}),i0(o);let h=await this.applyEmbeddingReranking(l,d.chunks,hm(n),o),m=h.chunks.length,A=new Set(h.chunks.map(_=>_.chunk.file)).size,y=this._workspaceFileIndex.fileCount,E=s.elapsed();return A0.info(this.ctx,`Search with reranking completed successfully in ${E}ms`,{totalTime:E,finalChunkCount:m,uniqueFileCount:A,rerankTime:h.telemetry.rerankTime}),hp.sendTfidfSuccess(this.ctx,E,p,h.telemetry.rerankTime,m,A,d.chunks.length,y,qg.Aggregate),{chunks:h.chunks}}catch(c){throw A0.error(this.ctx,"TF-IDF search failed",c),hp.sendTfidfFailure(this.ctx,c),c}}async searchFiles(r,n,o,s){let c=new Bne.StopWatch;if(A0.info(this.ctx,"Starting file-scoped search",{query:r.rawQuery,fileCount:o.length,files:o}),!o.length)return A0.info(this.ctx,"No files to search, returning empty results"),{chunks:[]};if(await this.initializeFiles(o),this._isDisposed)throw new Error("TfidfChunkSearch has been disposed");let l={maxResults:hm(n),maxSpread:pEe},u=await r.resolveQuery(s),d=await this._tfIdfWorker.value.proxy.search(u,l),p=new Set(o),h=d.chunks.filter(v=>p.has(v.file));A0.info(this.ctx,"Chunks filtered by file scope",{beforeFilter:d.chunks.length,afterFilter:h.length});let m=c.elapsed(),g=await this.applyEmbeddingReranking(u,h,hm(n),s),A=g.chunks.length,E=new Set(g.chunks.map(v=>v.chunk.file)).size,_=c.elapsed();return A0.info(this.ctx,`File-scoped search completed in ${_}ms`,{finalChunkCount:A,searchTelemetry:d.telemetry,rerankTime:g.telemetry.rerankTime}),hp.sendTfidfSuccess(this.ctx,_,m,g.telemetry.rerankTime,A,E,h.length,o.length,qg.Remote),{chunks:g.chunks}}async applyEmbeddingReranking(r,n,o,s){let c=new Bne.StopWatch,l=[];if(A0.info(this.ctx,"Starting embedding reranking",{chunkCount:n.length,maxResults:o}),n.length>0){let u=s?void 0:new Cn.CancellationTokenSource,d=s??u.token,p=5e3;try{let h=this._embeddingReranker.rerankChunks(r,n,o,d),m=await(0,jZr.raceTimeout)(h,p,()=>{A0.warn(this.ctx,"Embedding reranking timed out, falling back to TF-IDF results"),u?.cancel()});m&&m.length>0?(l=m,A0.info(this.ctx,`Reranking completed in ${c.elapsed()}ms`,{rerankedCount:m.length})):(A0.warn(this.ctx,"Reranking returned no results, falling back to TF-IDF results"),l=n.slice(0,o).map(g=>({chunk:g,distance:void 0})))}catch(h){A0.error(this.ctx,"Error during embedding reranking, falling back to TF-IDF results:",h),l=n.slice(0,o).map(m=>({chunk:m,distance:void 0}))}}else A0.info(this.ctx,"No chunks to rerank");return{chunks:l,telemetry:{rerankTime:c.elapsed()}}}async initializeWorkspace(){if(await this._workspaceFileIndex.initialize(),this._isDisposed)throw new Error("TfidfChunkSearch disposed during initialization");let r=Array.from(this._workspaceFileIndex.values()),n=r;r.length>this._maxFileCount&&(n=r.slice(0,this._maxFileCount),A0.warn(this.ctx,`Workspace has too many files, limiting indexing from ${r.length} to ${this._maxFileCount}`)),A0.info(this.ctx,"Preparing files for indexing",{totalFiles:r.length,filesToIndex:n.length,maxFileCount:this._maxFileCount});let o=await Promise.all(n.map(async s=>({uri:s.uri,contentId:await s.getFastContentVersionId()})));return await this._tfIdfWorker.value.proxy.initialize(o)}async getFastContentVersionId(r){let n=await this.ctx.get(Jn).stat(r);return`${n.size}-${n.mtime}`}async initializeFiles(r){let n=new Set(r),o=Array.from(this._workspaceFileIndex.values()).filter(s=>n.has(s.uri)).map(s=>s.uri);o.length&&await this._tfIdfWorker.value.proxy.addOrUpdate(o)}registerFileWatchers(){let r=[],n=this._workspaceFileIndex.onDidCreateFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.addOrUpdate(c).catch(l=>{console.error("Error handling file create event:",l)})});r.push(n);let o=this._workspaceFileIndex.onDidChangeFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.addOrUpdate(c).catch(l=>{console.error("Error handling file change event:",l)})});r.push(o);let s=this._workspaceFileIndex.onDidDeleteFiles(c=>{this._isDisposed||!this._tfIdfWorker.hasValue||this._tfIdfWorker.value.proxy.delete(c).catch(l=>{console.error("Error handling file delete event:",l)})});return r.push(s),{dispose:a(()=>{r.forEach(c=>c.dispose())},"dispose")}}getDbPath(){if(this._customDbPath)return this._customDbPath;let r=FQe(this._workspaceFileIndex);return zQe.join(r,"local-index.db")}firstExistingPath(r){for(let n of r)if((0,WZr.existsSync)(n))return n}};f();f();var Lne=class{static{a(this,"WorkspaceLifecycleListener")}start(){}didAddWorkspace(e){}didRemoveWorkspace(e){}didTerminateWorkspaceSubfolders(e,r){}didChangeFiles(e){}},kpo="workspaceLifecycleManager",Hg=new Se(kpo),gk=class t{constructor(e){this.ctx=e;this.activeListeners=[];this.watchedWorkspaces=[];this.ctx=e;let r=Ps(e,async()=>{r.dispose(),await this.start()})}static{a(this,"WorkspaceLifecycleManager")}async start(){for(let e of this.activeListeners)await e.isEnabled()?e.isStarted()?Hg.debug(this.ctx,`listener ${e.constructor.name} is already started`):(Hg.debug(this.ctx,`starting listener ${e.constructor.name}`),await e.start()):Hg.debug(this.ctx,`listener ${e.constructor.name} is not enabled`);Hg.debug(this.ctx,"WorkspaceLifecycleManager started"),this.ctx.get(zr).onDidChangeWorkspaceFolders(e=>{this.onWorkspacesAdded(e.added,this.ctx),this.onWorkspacesRemoved(e.removed,this.ctx)}),await this.onWorkspacesAdded(this.ctx.get(zr).getWorkspaceFolders(),this.ctx)}static isSubfolder(e,r){let n=e.uri,o=r.uri.replace(/[#?].*/,"").replace(/\/?$/,"/");return n!==o&&n.startsWith(o)}async onWorkspacesAdded(e,r){if(!e.length){Hg.debug(r,"No workspaces to add.");return}Hg.debug(r,`Adding workspaces: ${e.map(l=>l.uri).join(", ")}`);let n=[...this.watchedWorkspaces,...e];Hg.debug(r,`Combined workspaces: ${n.map(l=>l.uri).join(", ")}`);let o=n.filter((l,u,d)=>d.findIndex(p=>p.uri===l.uri)===u&&!d.some(p=>t.isSubfolder(l,p)));Hg.debug(r,`Filtered workspaces: ${o.map(l=>l.uri).join(", ")}`);let s=o.filter(l=>!this.watchedWorkspaces.some(u=>u.uri===l.uri));Hg.debug(r,`New workspaces: ${s.map(l=>l.uri).join(", ")}`);let c=this.watchedWorkspaces.filter(l=>!o.some(u=>u.uri===l.uri));Hg.debug(r,`Removed workspaces: ${c.map(l=>l.uri).join(", ")}`),this.watchedWorkspaces=o;for(let l of c){Hg.debug(r,`Terminating watching for removed workspace: ${l.uri}`),r.get(Ug).terminateWatching(l);for(let d of this.activeListeners)Hg.debug(r,`Notifying listener of removed workspace: ${l.uri}`),await d.didRemoveWorkspace(l)}for(let l of s){if(!l.uri)continue;Hg.debug(r,`Starting to watch new workspace: ${l.uri}`);let u=r.get(Ug);if(u.shouldStartWatching(l)){u.startWatching(l);let d=u.terminateSubfolderWatchers(l);if(d.length){Hg.debug(r,`Terminated subfolder watchers for workspace: ${l.uri}, Subfolders: ${d.map(p=>p.uri).join(", ")}`);for(let p of this.activeListeners)await p.didTerminateWorkspaceSubfolders(l,d)}for(let p of this.activeListeners)Hg.debug(r,`Adding file change listener for workspace: ${l.uri}`),u.onFileChange(l,p.didChangeFiles.bind(p))}}for(let l of this.activeListeners)for(let u of s)Hg.debug(r,`Notifying ${l.constructor.name} of added workspace: ${u.uri}`),await l.didAddWorkspace(u)}async onWorkspacesRemoved(e,r){if(e.length)for(let n of e){if(!n.uri)continue;r.get(Ug).terminateWatching(n),this.watchedWorkspaces=this.watchedWorkspaces.filter(s=>s.uri!==n.uri);for(let s of this.activeListeners)await s.didRemoveWorkspace(n)}}addListener(e){this.activeListeners.push(e)}removeListener(e){this.activeListeners=this.activeListeners.filter(r=>r!==e)}removeAllListeners(){this.activeListeners=[]}};function KQe(t){t.set(gk,new gk(t))}a(KQe,"setupWorkspaceLifecycleListener");f();f();var dNt=class{constructor(){this._value="";this._pos=0}static{a(this,"StringIterator")}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;r--,this._valueLen--){let n=this._value.charCodeAt(r);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,r=()=>!1){return new t(new pNt(e,r))}static forPaths(e=!1){return new t(new JQe(void 0,!e))}static forStrings(){return new t(new dNt)}static forConfigKeys(){return new t(new fNt)}constructor(e){this._iter=e}clear(){this._root=void 0}fill(e,r){if(r){let n=r.slice(0);swt(n);for(let o of n)this.set(o,e)}else{let n=e.slice(0);swt(n);for(let o of n)this.set(o[0],o[1])}}set(e,r){let n=this._iter.reset(e),o;this._root||(this._root=new Fne,this._root.segment=n.value());let s=[];for(o=this._root;;){let l=n.cmp(o.segment);if(l>0)o.left||(o.left=new Fne,o.left.segment=n.value()),s.push([-1,o]),o=o.left;else if(l<0)o.right||(o.right=new Fne,o.right.segment=n.value()),s.push([1,o]),o=o.right;else if(n.hasNext())n.next(),o.mid||(o.mid=new Fne,o.mid.segment=n.value()),s.push([0,o]),o=o.mid;else break}let c=m4.unwrap(o.value);o.value=m4.wrap(r),o.key=e;for(let l=s.length-1;l>=0;l--){let u=s[l][1];u.updateHeight();let d=u.balanceFactor();if(d<-1||d>1){let p=s[l][0],h=s[l+1][0];if(p===1&&h===1)s[l][1]=u.rotateLeft();else if(p===-1&&h===-1)s[l][1]=u.rotateRight();else if(p===1&&h===-1)u.right=s[l+1][1]=s[l+1][1].rotateRight(),s[l][1]=u.rotateLeft();else if(p===-1&&h===1)u.left=s[l+1][1]=s[l+1][1].rotateLeft(),s[l][1]=u.rotateRight();else throw new Error;if(l>0)switch(s[l-1][0]){case-1:s[l-1][1].left=s[l][1];break;case 1:s[l-1][1].right=s[l][1];break;case 0:s[l-1][1].mid=s[l][1];break}else this._root=s[0][1]}}return c}get(e){return m4.unwrap(this._getNode(e)?.value)}_getNode(e){let r=this._iter.reset(e),n=this._root;for(;n;){let o=r.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else if(r.hasNext())r.next(),n=n.mid;else break}return n}has(e){let r=this._getNode(e);return!(r?.value===void 0&&r?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,r){let n=this._iter.reset(e),o=[],s=this._root;for(;s;){let c=n.cmp(s.segment);if(c>0)o.push([-1,s]),s=s.left;else if(c<0)o.push([1,s]),s=s.right;else if(n.hasNext())n.next(),o.push([0,s]),s=s.mid;else break}if(s){if(r?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){let c=[[1,s]],l=this._min(s.right,c);if(l.key){s.key=l.key,s.value=l.value,s.segment=l.segment;let u=l.right;if(c.length>1){let[p,h]=c[c.length-1];switch(p){case-1:h.left=u;break;case 0:HH(!1);case 1:HH(!1)}}else s.right=u;let d=this._balanceByStack(c);if(o.length>0){let[p,h]=o[o.length-1];switch(p){case-1:h.left=d;break;case 0:h.mid=d;break;case 1:h.right=d;break}}else this._root=d}}else{let c=s.left??s.right;if(o.length>0){let[l,u]=o[o.length-1];switch(l){case-1:u.left=c;break;case 0:u.mid=c;break;case 1:u.right=c;break}}else this._root=c}this._root=this._balanceByStack(o)??this._root}}_min(e,r){for(;e.left;)r.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let r=e.length-1;r>=0;r--){let n=e[r][1];n.updateHeight();let o=n.balanceFactor();if(o>1?(n.right.balanceFactor()>=0||(n.right=n.right.rotateRight()),e[r][1]=n.rotateLeft()):o<-1&&(n.left.balanceFactor()<=0||(n.left=n.left.rotateLeft()),e[r][1]=n.rotateRight()),r>0)switch(e[r-1][0]){case-1:e[r-1][1].left=e[r][1];break;case 1:e[r-1][1].right=e[r][1];break;case 0:e[r-1][1].mid=e[r][1];break}else return e[0][1]}}findSubstr(e){let r=this._iter.reset(e),n=this._root,o;for(;n;){let s=r.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(r.hasNext())r.next(),o=m4.unwrap(n.value)||o,n=n.mid;else break}return n&&m4.unwrap(n.value)||o}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,r){let n=this._iter.reset(e),o=this._root;for(;o;){let s=n.cmp(o.segment);if(s>0)o=o.left;else if(s<0)o=o.right;else if(n.hasNext())n.next(),o=o.mid;else return o.mid?this._entries(o.mid):r?m4.unwrap(o.value):void 0}}hasElementOrSubtree(e){return this._findSuperstrOrElement(e,!0)!==void 0}forEach(e){for(let[r,n]of this)e(n,r)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let r=[];return this._dfsEntries(e,r),r[Symbol.iterator]()}_dfsEntries(e,r){e&&(e.left&&this._dfsEntries(e.left,r),e.value!==void 0&&r.push([e.key,m4.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,r),e.right&&this._dfsEntries(e.right,r))}_isBalanced(){let e=a(r=>{if(!r)return!0;let n=r.balanceFactor();return n<-1||n>1?!1:e(r.left)&&e(r.right)},"nodeIsBalanced");return e(this._root)}};var zZr=de(vc()),YZr=de(require("fs")),KZr=de(Dn());var Npo=1.5*1024*1024,hNt=class{constructor(e){this._uri=e;this._isDisposed=!1;this._disposedCts=new KZr.CancellationTokenSource}static{a(this,"FileRepresentation")}dispose(){this._isDisposed=!0,this._disposedCts.cancel(),this._disposedCts.dispose()}get uri(){return this._uri}async getFastContentVersionId(){let e=await this.getStats();return`${e.size}-${e.mtime}`}},ZQe=class extends hNt{constructor(r,n,o){super(r);this._ctx=o;this._fileReadLimiter=n}static{a(this,"FsFileRepresentation")}isDirty(){return!1}async getStats(){let r=await this._ctx.get(Jn).stat(this.uri.toString());return{size:r.size,mtime:r.mtime}}async getText(){try{let r=await this._readFile();return!r||this._isDisposed?"":new TextDecoder().decode(r.data)}catch{return""}}async _readFile(){try{let r=Bo(this.uri);return await this._fileReadLimiter.queue(async()=>({data:await(0,zZr.raceCancellationError)(Mpo(r,Npo),this._disposedCts.token)}))}catch{return}}};async function Mpo(t,e){return new Promise((r,n)=>{let o=YZr.createReadStream(t,{start:0,end:e-1}),s=[],c=0;o.on("data",l=>(c+=l.length,s.push(l))),o.on("end",()=>r(Buffer.concat(s))),o.on("error",n)})}a(Mpo,"readLocalTextFileUsingReadStream");var eqe=class{constructor(e,r,n){this.ctx=e;this.workspaceFolder=r;this.limiter=n;this._fsFileTree=new mNt;this._onDidCreateFiles=new Ri;this.onDidCreateFiles=this._onDidCreateFiles.event;this._onDidChangeFiles=new Ri;this.onDidChangeFiles=this._onDidChangeFiles.event;this._onDidDeleteFiles=new Ri;this.onDidDeleteFiles=this._onDidDeleteFiles.event}static{a(this,"WorkspaceFileIndex")}get fileCount(){return this._fsFileTree.fileCount}*values(){yield*this._fsFileTree.values()}get(e){let r=mo(e);return r?this._fsFileTree.get(r):void 0}tryLoad(e){throw new Error("Method not implemented.")}tryRead(e){throw new Error("Method not implemented.")}createOrUpdateFsEntry(e){let r=this._fsFileTree.get(e);r&&r.dispose();let n=new ZQe(e,this.limiter,this.ctx);return this._fsFileTree.addFile(e,n),n}async initialize(){return this._initializePromise??=(async()=>{(await this.ctx.get(Ug).getWatchedFiles(this.workspaceFolder)).forEach(r=>{let n=mo(r.uri);n&&this._fsFileTree.addFile(n,new ZQe(r.uri,this.limiter,this.ctx))})})(),this._initializePromise}async didChangeFiles(e){if(e.type==="create"){let r=[];for(let n of e.documents){if((await this.ctx.get(Jn).stat(n.uri)).type!==1)continue;let s=n.uri;this._fsFileTree.get(s)||(this.createOrUpdateFsEntry(s),r.push(s))}r.length&&this._onDidCreateFiles.fire(r)}else if(e.type==="update"){let r=[];for(let n of e.documents){if((await this.ctx.get(Jn).stat(n.uri)).type!==1)continue;let s=n.uri;this.createOrUpdateFsEntry(s),r.push(s)}r.length&&this._onDidChangeFiles.fire(r)}else if(e.type==="delete"){let r=[];for(let n of e.documents){let o=n.uri,s=this._fsFileTree.get(o);if(s)s.dispose(),this._fsFileTree.delete(o),r.push(o);else{let c=this._fsFileTree.deleteFolder(o);c.length&&r.push(...c)}}r.length&&this._onDidDeleteFiles.fire(r)}}},mNt=class{constructor(){this._tree=XQe.forPaths();this._fileCount=0}static{a(this,"SimpleFsTree")}get fileCount(){return this._fileCount}get(e){return this._tree.get(e)}addFile(e,r){this._tree.get(e)||this._fileCount++,this._tree.set(e,r)}clear(){this._tree.clear()}delete(e){let r=!!this.get(e);return this._tree.delete(e),r&&(this._fileCount=Math.max(0,this._fileCount-1)),r}deleteFolder(e){let r=[];for(let[n]of this._tree.findSuperstr(e)??[])r.push(n);for(let n of r)this._tree.delete(n);return this._fileCount=Math.max(0,this._fileCount-r.length),r}*values(){for(let[,e]of this.entries())yield e}entries(){return this._tree}};var JZr=de(vc());var tqe=class extends Lne{constructor(r){super();this.ctx=r;this.workspaceFileIndexes=new Map;this._onDidWorkspaceAdded=new Ri;this.onDidWorkspaceAdded=this._onDidWorkspaceAdded.event;this._onDidWorkspaceRemoved=new Ri;this.onDidWorkspaceRemoved=this._onDidWorkspaceRemoved.event;this.ctx.get(gk).addListener(this),this._fileReadLimiter=new JZr.Limiter(20)}static{a(this,"WorkspaceFileWatcher")}isEnabled(){return Promise.resolve(!0)}isStarted(){return!0}async didAddWorkspace(r){if(!await this.isEnabled())return;let n=new eqe(this.ctx,r,this._fileReadLimiter);this.workspaceFileIndexes.set(r.uri,n),this._onDidWorkspaceAdded.fire(n)}async didRemoveWorkspace(r){if(!await this.isEnabled())return;let n=this.workspaceFileIndexes.get(r.uri);if(n){for(let o of n.values())o.dispose();this._onDidWorkspaceRemoved.fire(n),this.workspaceFileIndexes.delete(r.uri)}}async didChangeFiles(r){if(!await this.isEnabled())return;let n=this.workspaceFileIndexes.get(r.workspaceFolder.uri);n&&await n.didChangeFiles(r)}};var zEe=de(MT()),XZr=de(Lc()),OT=de(vc()),pF=de(ck());var Ra=new Se("Semantic Search"),ZZr;function ANt(t){ZZr??=new Promise(e=>{let r=Ps(t,async n=>{if(r.dispose(),!t.get(Fn).getCapabilities().watchedFiles){Ra.info(t,"Semantic search is disabled",{reason:"watchedFiles capability is not available"}),e(!1);return}let s=t.get(Gt),c=await s.updateExPValuesAndAssignments(n),l=s.ideEnableCopilotSemanticSearch(c),u=n.getTokenValue("editor_preview_features")==="0",d=!u&&l;e(d),Ra.info(t,"Semantic search feature flag is updated",{shouldEnableSemanticSearch:d,ideSemanticSearchEnabledExpFlag:l,editorPreviewFeaturesDisabled:u})})})}a(ANt,"initializeSemanticSearchFeatureFlag");async function hF(t){return H4e(t)?!0:(ANt(t),ZZr)}a(hF,"isSemanticSearchEnabled");var Jx=class{constructor(e){this._ctx=e;this._availableEmbeddingTypes=new LQe(e),this.tryInit()}static{a(this,"WorkspaceChunkSearchService")}dispose(){this._impl?.dispose()}async tryInit(){if(this._impl)return this._impl;let e=await this._availableEmbeddingTypes.getPreferredType();if(e)return this._impl=new gNt(this._ctx,e),this._impl}async searchWorkspace(e,r,n){let o=await this.tryInit();if(!o)throw new Error("Workspace chunk search service not available");return await o.searchWorkspace(e,r,n)}},gNt=class{constructor(e,r){this._ctx=e;this._embeddingType=r;this._localEmbeddingsByWorkspace=new Map;this._localTfidfByWorkspace=new Map;this._diffTrackersByWorkspace=new Map;this._workspaceFileIndexes=new Map;let n=new tqe(this._ctx),o=new sQe(this._ctx);this._localDiffSearch=new $Qe(this._localEmbeddingsByWorkspace,this._localTfidfByWorkspace,this._workspaceFileIndexes,this._diffTrackersByWorkspace),this._githubCodeSearchService=new iQe(this._ctx),this._codeSearchChunkSearch=new aQe(this._ctx,this._embeddingType,this._localDiffSearch,this._githubCodeSearchService),n.onDidWorkspaceAdded(s=>{this._workspaceFileIndexes.set(s.workspaceFolder.uri,s);let c=new QQe(this._ctx,s,this._embeddingType,o);this._localEmbeddingsByWorkspace.set(s.workspaceFolder.uri,c);let l=new YQe(this._ctx,s,{embeddingType:this._embeddingType});this._localTfidfByWorkspace.set(s.workspaceFolder.uri,l);let u=new BQe(this._ctx,s,this._githubCodeSearchService);this._diffTrackersByWorkspace.set(s.workspaceFolder.uri,u),process.env.GITHUB_COPILOT_SIMULATION!=="1"&&hF(this._ctx).then(d=>{d&&(u.initialize(),c.triggerLocalIndexing(),l.initialize())})}),n.onDidWorkspaceRemoved(s=>{let c=s.workspaceFolder.uri,l=this._diffTrackersByWorkspace.get(c);l&&(l.dispose(),this._diffTrackersByWorkspace.delete(c));let u=this._localTfidfByWorkspace.get(c);u&&(u.dispose(),this._localTfidfByWorkspace.delete(c));let d=this._localEmbeddingsByWorkspace.get(c);d&&(d.dispose(),this._localEmbeddingsByWorkspace.delete(c))})}static{a(this,"WorkspaceChunkSearchServiceImpl")}dispose(){this._githubCodeSearchService.dispose();for(let e of this._localTfidfByWorkspace.values())e.dispose();this._localTfidfByWorkspace.clear();for(let e of this._localEmbeddingsByWorkspace.values())e.dispose();this._localEmbeddingsByWorkspace.clear();for(let e of this._diffTrackersByWorkspace.values())e.dispose();this._diffTrackersByWorkspace.clear(),this._workspaceFileIndexes.clear()}async searchWorkspace(e,r,n){let o=new pF.StopWatch,s=await this.resolveQueryText(e,n);Ra.info(this._ctx,"Starting semantic search",{resolvedQuery:s,maxResults:hm(r),tokenBudget:r.tokenBudget,workspaceFolders:r.workspaceFolders});let c=this.toQueryWithEmbeddings(e,s),l=await this.doSearchFileChunks(c,r,n);if(l.isError())throw Ra.error(this._ctx,"Semantic search failed",l.err),hp.sendAggregateFailure(this._ctx,l.err),new Error(`Workspace chunk search failed: ${l.err.errorDiagMessage}`);Ra.info(this._ctx,`Search strategy '${l.val.strategy}' returned results`,{strategy:l.val.strategy,chunkCount:l.val.result.chunks.length});let u=await(0,OT.raceCancellationError)(this.filterIgnoredChunks(l.val.result.chunks),n);Ra.info(this._ctx,"Chunks filtered",{beforeFilter:l.val.result.chunks.length,afterFilter:u.length});let d=await this.rerankChunks(c,u,hm(r),n),p=d.length,m=new Set(d.map(A=>A.chunk.file)).size,g=o.elapsed();return Ra.info(this._ctx,`Search completed successfully in ${o.elapsed()}ms`,{totalTime:o.elapsed(),strategy:l.val.strategy,finalChunkCount:p,uniqueFileCount:m}),hp.sendAggregateSuccess(this._ctx,l.val.strategy,g,p,m,r.workspaceFolders.length,r.source),{chunks:d}}toQueryWithEmbeddings(e,r){let n;return{...e,resolveQueryEmbeddings:a(o=>(n??=this.computeQueryEmbedding(e,o,r),n),"resolveQueryEmbeddings")}}async computeQueryEmbedding(e,r,n){i0(r);let o=n??await this.resolveQueryText(e,r),s=await this.getEmbeddingComputer().computeEmbeddings(this._embeddingType,[o],{inputType:"query"},r);if(!s?.values.length)throw new Error("Failed to compute query embeddings");return s.values[0]}async resolveQueryText(e,r){try{return await e.resolveQuery(r)}catch(n){if(vx(n))throw n;return Ra.debug(this._ctx,"Falling back to raw query text",n),e.rawQuery}}getEmbeddingComputer(){return this._embeddingComputer||(this._embeddingComputer=new Mne(this._ctx)),this._embeddingComputer}async doSearchFileChunks(e,r,n){Ra.info(this._ctx,"Starting semantic search with fallback strategy");let o=process.env.GITHUB_COPILOT_SIMULATION==="1"?1e6:12500;return this.runSearchStrategyWithFallback(this._codeSearchChunkSearch,()=>(0,OT.createCancelablePromise)(s=>this.doSearchFileChunksLocally(e,r,s)),o,e,r,n)}async runSearchStrategyWithFallback(e,r,n,o,s,c){let l=new pF.StopWatch;Ra.info(this._ctx,`Attempting primary strategy '${e.id}'`,{timeout:n});let u=(0,OT.createCancelablePromise)(g=>this.runSearchStrategy(e,o,s,g));c.onCancellationRequested(()=>u.cancel());let d=await(0,OT.raceCancellationError)((0,OT.raceTimeout)(u,n),c);if(d?.isOk())return Ra.info(this._ctx,`Primary strategy '${e.id}' succeeded in ${l.elapsed()}ms`,{strategy:e.id,elapsedTime:l.elapsed()}),d;Ra.warn(this._ctx,`Primary strategy '${e.id}' failed or timed out, falling back to local search`,{elapsedTime:l.elapsed(),isTimeout:d===void 0,error:d?.isError()?d.err:void 0});let p=r();c.onCancellationRequested(()=>p.cancel()),p.then(()=>u.cancel(),()=>u.cancel());let h=new pF.StopWatch,m=await jQe([u,p]);return Ra.info(this._ctx,`Search operation completed in ${l.elapsed()}ms (fallback took ${h.elapsed()}ms)`,{totalTime:l.elapsed(),fallbackTime:h.elapsed(),success:m.isOk()}),m}async doSearchFileChunksLocally(e,r,n){Ra.info(this._ctx,"Starting local file chunk search",{folderCount:r.workspaceFolders.length});let o=[],s=new Set;for(let l of r.workspaceFolders){let u=this._localEmbeddingsByWorkspace.get(l),d=this._localTfidfByWorkspace.get(l);if(u&&d){Ra.info(this._ctx,`Both strategies available for folder: ${l}, using embeddings with TF-IDF fallback`);let p=8e3,h=new pF.StopWatch,m=await this.runSearchStrategyWithFallback(u,()=>(0,OT.createCancelablePromise)(g=>this.runSearchStrategy(d,e,r,g)),p,e,r,n);m.isOk()&&(o.push(...m.val.result.chunks),s.add(m.val.strategy),Ra.info(this._ctx,`Folder search completed in ${h.elapsed()}ms`,{folder:l,strategy:m.val.strategy,chunkCount:m.val.result.chunks.length,elapsedTime:h.elapsed()}))}else if(u){Ra.info(this._ctx,`Using embeddings search for folder: ${l}`);let p=new pF.StopWatch,h=await this.runSearchStrategy(u,e,r,n);o.push(...h.isOk()?h.val.result.chunks:[]),s.add(u.id),Ra.info(this._ctx,`Embeddings search completed in ${p.elapsed()}ms`,{folder:l,chunkCount:h.isOk()?h.val.result.chunks.length:0,elapsedTime:p.elapsed()})}else if(d){Ra.info(this._ctx,`Using TF-IDF search for folder: ${l}`);let p=new pF.StopWatch,h=await this.runSearchStrategy(d,e,r,n);o.push(...h.isOk()?h.val.result.chunks:[]),s.add(d.id),Ra.info(this._ctx,`TF-IDF search completed in ${p.elapsed()}ms`,{folder:l,chunkCount:h.isOk()?h.val.result.chunks.length:0,elapsedTime:p.elapsed()})}else Ra.warn(this._ctx,`No local search strategy available for folder: ${l}`)}let c=s.size===1?s.values().next().value:"mixed";return Ra.info(this._ctx,"Local search completed",{strategy:c,totalChunkCount:o.length,strategiesUsed:Array.from(s)}),zEe.Result.ok({strategy:c,result:{chunks:o}})}async runSearchStrategy(e,r,n,o){let s=new pF.StopWatch;Ra.info(this._ctx,`Running search strategy '${e.id}'`);try{let c=await(0,OT.raceCancellationError)(e.searchWorkspace(r,n,o),o);return c?(Ra.info(this._ctx,`Strategy '${e.id}' completed successfully in ${s.elapsed()}ms`,{strategy:e.id,chunkCount:c.chunks.length,elapsedTime:s.elapsed()}),zEe.Result.ok({strategy:e.id,result:c})):(Ra.warn(this._ctx,`Strategy '${e.id}' returned no result`,{strategy:e.id,elapsedTime:s.elapsed()}),zEe.Result.error({errorDiagMessage:`${e.id}: no result`}))}catch(c){if(vx(c))throw Ra.info(this._ctx,`Strategy '${e.id}' was cancelled`,{elapsedTime:s.elapsed()}),c;return Ra.error(this._ctx,c,`Error during '${e.id}' search, elapsed: ${s.elapsed()}ms`),zEe.Result.error({errorDiagMessage:`${e.id} error: ${String(c)}`})}}async filterIgnoredChunks(e){return(0,XZr.coalesce)(await Promise.all(e.map(async r=>(await this._ctx.get(Ac).evaluate(r.chunk.file,r.chunk.text)).isBlocked?null:r)))}async rerankChunks(e,r,n,o){if(!r.length)return[];try{let s,c=r.at(0)?.distance?.embeddingType;if(c&&r.every(p=>typeof p.distance<"u"&&p.distance.embeddingType.equals(c)))s=[...r].sort((p,h)=>h.distance.value-p.distance.value);else{let h=r.map((A,y)=>({...A.chunk,distance:A.distance,index:y})).filter(A=>typeof A.distance>"u"||!A.distance.embeddingType.equals(this._embeddingType)),m;if(h.length){Ra.debug(this._ctx,`WorkspaceChunkSearch.rerankChunks. Scoring ${h.length} new chunks`);let A=this.scoreChunks(e,h,o);m=await(0,OT.raceCancellationError)(A,o)}let g=[];for(let A=0;AA?.distance?.embeddingType.equals(this._embeddingType)).sort((A,y)=>y.distance.value-A.distance.value)}if(!s.length)return s;s=s.slice(0,n);let u=s[0].distance.value*pEe,d=s.filter(p=>p.distance.value>=u);return Ra.debug(this._ctx,`Eagerly filtered out ${s.length-d.length} chunks due to low quality`),d}catch(s){return vx(s)||Ra.error(this._ctx,"Failed to search chunk embeddings index"),r.slice(0,n)}}async scoreChunks(e,r,n){if(!r.length)return[];let o=r.map(l=>this.chunkToIndexString(l)),[s,c]=await(0,OT.raceCancellationError)(Promise.all([e.resolveQueryEmbeddings(n),this.computeEmbeddings("document",o,n)]),n);return c.values.map((l,u)=>({chunk:r[u],distance:hEe(s,l)}))}async computeEmbeddings(e,r,n){let o=await this.getEmbeddingComputer().computeEmbeddings(this._embeddingType,r,{inputType:e},n);if(!o)throw new Error("Failed to compute embeddings");return o}chunkToIndexString(e){return this.toStringForEmbeddingsComputer(e,mo(e.file)??e.file)}toStringForEmbeddingsComputer(e,r){let n=mm(e.text);return`File: \`${r}\` ${n} ${e.text} -${n}`}};var rZr=de(tZr()),Kqe=de(UUe()),nZr=de(require("os"));var Mfo=Math.min(Math.max(Math.ceil(nZr.cpus().length/2),1),10),e5t=new Se("ProjectContextSkill"),Iie=class t{constructor(){this.isActive=!0}static{a(this,"WorkerPoolToken")}static{this.workerPoolStarted=!1}static{this.activeProcessCount=0}static{this.allTokens=[]}static{this.lock=new rZr.default}static async startWorkerPool(){await t.lock.acquireAsync();try{t.workerPoolStarted||(t.workerPoolStarted=!0,await Kqe.start({maxWorkers:Mfo})),t.activeProcessCount++;let e=new t;return t.allTokens.push(e),e}finally{t.lock.release()}}async stopWorkerPool(){if(this.isActive){await t.lock.acquireAsync();try{this.isActive&&(this.isActive=!1,t.activeProcessCount--,t.activeProcessCount==0&&(await Kqe.stop(),t.workerPoolStarted=!1),t.allTokens.includes(this)&&t.allTokens.splice(t.allTokens.indexOf(this),1))}finally{t.lock.release()}}}static async forceStopWorkerPool(){let e=t.allTokens[Symbol.iterator]();for(let r of e)await r.stopWorkerPool();t.workerPoolStarted=!1,t.activeProcessCount=0}},hCe=Iie.startWorkerPool.bind(Iie);var CKl=S.Object({uri:S.String(),snippet:S.String(),range:S.Object({start:S.Object({line:S.Number(),character:S.Number()}),end:S.Object({line:S.Number(),character:S.Number()})})}),HPt=47,t5t=class{constructor(e){this.turnContext=e}static{a(this,"ProjectContextSkillProcessor")}value(){return 1}async processSkill(e){if(this.turnContext.cancelationToken.isCancellationRequested){await this.turnContext.steps.cancel(dv);return}let r=[],n=this.turnContext.ctx.get(In),o=this.removeDuplicateSnippets(e);for(let s of o){let{uri:c,snippet:l,range:u}=s,d=await n.getOrReadTextDocument(s);if(d.status==="valid"){let p=new fk(d.document,u,u),h=new nr([l]),g=pCe(c)?.5:.8;r.push([`Code excerpt from file \`${Eo(c)}\`:`,1],[p.wrapInTicks(h,g),1]),await this.turnContext.collectFile(xie,c,Kl(d),u)}}if(r.length>0)return r.unshift([new nr(["The user wants you to consider the following snippets when computing your answer."]),1]),new nr(r)}removeDuplicateSnippets(e){let r={};return e.forEach(n=>{let o=`${n.uri}#[${n.range.start.line},${n.range.start.character}]-[${n.range.end.line},${n.range.end.character}]`;r[o]||(r[o]=n)}),Object.values(r)}},dv="collect-project-context",zqe=class{constructor(e={}){this.dependencies=e}static{a(this,"SemanticSearchSkillResolver")}async resolveSkill(e){e5t.debug(e.ctx,"Resolving project context via semantic search skill resolver"),await e.steps.start(dv,"Collecting relevant project context"),await e.info(Vo`Project context is applied to this response, which may lead to slightly longer load times. For faster and more general Copilot responses, remove the project context option from your prompt.`);let r=e.ctx.get(cw);if(!r){await e.steps.error(dv,"Code search service for project context is unavailable");return}let n=[];if(e.turn.workspaceFolder&&n.push(e.turn.workspaceFolder.uri),e.turn.workspaceFolders)for(let u of e.turn.workspaceFolders)n.includes(u.uri)||n.push(u.uri);if(!n.length){await e.steps.error(dv,"No workspace folders available for search");return}let o=dn(e.turn.request.message),c=await(this.dependencies.parseUserQuery??rQe)(e,e.cancelationToken);if(!c||c.length===0){await e.steps.error(dv,"No keywords parsed from user query");return}let l=c.join(" ");try{let u=await r.searchWorkspace({rawQuery:o,resolveQueryAndKeywords:a(async()=>Promise.resolve({rephrasedQuery:l,keywords:c.map(p=>({keyword:p,variations:[]}))}),"resolveQueryAndKeywords"),resolveQuery:a(async()=>Promise.resolve(l),"resolveQuery")},{tokenBudget:$Wr,maxResults:Math.min(10*c.length,HPt),workspaceFolders:n,source:"projectContext"},e.cancelationToken);if(await(this.dependencies.telemetryIndexCodesearch??wRt)(e,"semantic_search",{localSnippetCount:u.chunks.length}),u.chunks.length===0){await e.steps.error(dv,"No project context found");return}return await e.steps.finish(dv),u.chunks.map(p=>({uri:p.chunk.file,snippet:p.chunk.text,range:{start:{line:p.chunk.range.startLineNumber,character:p.chunk.range.startColumn},end:{line:p.chunk.range.endLineNumber,character:p.chunk.range.endColumn}}}))}catch(u){await e.steps.error(dv,"Project context search failed"),e5t.error(e.ctx,"Error during workspace chunk search for project context:",u);return}}},Yqe=class{constructor(e=[new nQe]){this.snippetProviders=e}static{a(this,"ProjectContextSkillResolver")}async resolveSkill(e){e5t.debug(e.ctx,"Resolving project context via the legacy project context skill resolver"),await e.steps.start(dv,"Collecting relevant project context"),await e.info(Vo`Project context is applied to this response, which may lead to slightly longer load times. For faster and more general Copilot responses, remove the project context option from your prompt.`);let r=this.snippetProviders.map(async c=>c.snippetProviderStatus(e)),n=await Promise.all(r),o="not_indexed",s;for(let c of FWr){let l=n.findIndex(u=>u===c);if(l!==-1){o=c,s=this.snippetProviders[l];break}}switch(o){case"indexed":{let{snippets:c,measurements:l}=await s.provideSnippets(e);if(await wRt(e,s.providerType,l),c.length===0){await e.steps.error(dv,"No project context found");return}return await e.steps.finish(dv),c}case"indexing":{await e.steps.error(dv,"Indexing repository, please try again later");return}case"not_indexed":{await e.steps.error(dv,"No project context available");return}}}},xie="project-context",JCe=class extends mh{static{a(this,"ProjectContextSkill")}constructor(e){super(xie,"Code snippets and documentation from the open project. This skill is useful when the user question is specific to the open project and its context. Do not include this skill for general programming questions.","Performing code search",()=>e,r=>new t5t(r),"implicit",["Relevant: How do I add a custom server route?","Relevant: Where is the code that processes the response from CopyableThreadElement?","Relevant: Where do I add tests for the InputValidation class?","Relevant: How to implement a shared buffer component","Not relevant: What does numpy do?"],()=>!0)}};var r5t=class{constructor(){this.slug="project";this.name="Project";this.description="Ask about your project"}static{a(this,"ProjectAgent")}additionalSkills(){return[xie]}};async function FT(t){let e=[];return e.push(new XUe),e.push(...await t.get(nw).agents()),e.push(new r5t),e.push(new OUe),e}a(FT,"getAgents");f();f();var zT=require("fs"),k$=de(require("path"));var vh=class{constructor(e){this.ctx=e}static{a(this,"ConversationTranscriptPersistence")}isEnabled(){return!!this.getTranscriptDirectory()}getTranscriptDirectory(){return vr(this.ctx,tt.TranscriptDirectory)}async appendEvent(e,r,n){if(this.isEnabled())try{let o=this.getTranscriptFilePath(e,r),s=k$.dirname(o);await zT.promises.mkdir(s,{recursive:!0,mode:448});let c=JSON.stringify(n)+` -`;await zT.promises.appendFile(o,c,{encoding:"utf8",mode:384})}catch(o){Ge.error(this.ctx,`Failed to append transcript event: ${o instanceof Error?o.message:String(o)}`)}}async initializePartition(e,r,n){if(!this.isEnabled())return;let o={type:"partition.created",data:{conversationId:String(e),partitionId:r,...n},id:yr(),timestamp:new Date().toISOString(),parentId:null};await this.appendEvent(e,r,o)}getTranscriptPath(e,r){return`${e}/partition-${r}.jsonl`}getTranscriptFilePath(e,r){let n=this.getTranscriptDirectory();if(!n)throw new Error("Transcript directory not configured");return k$.join(n,String(e),`partition-${r}.jsonl`)}getConversationDirectory(e){let r=this.getTranscriptDirectory();if(!r)throw new Error("Transcript directory not configured");return k$.join(r,String(e))}async readTranscriptFile(e,r){if(!this.isEnabled())return[];try{let n=this.getTranscriptFilePath(e,r);return(await zT.promises.readFile(n,"utf8")).trim().split(` -`).filter(c=>c.length>0).map(c=>JSON.parse(c))}catch(n){return n.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to read transcript file: ${n instanceof Error?n.message:String(n)}`),[])}}async listPartitionTranscripts(e){if(!this.isEnabled())return[];try{let r=this.getConversationDirectory(e);return(await zT.promises.readdir(r)).filter(o=>o.startsWith("partition-")&&o.endsWith(".jsonl")&&!o.includes(".v")).map(o=>{let s=o.match(/^partition-(\d+)\.jsonl$/);return s?parseInt(s[1],10):NaN}).filter(o=>!isNaN(o)).sort((o,s)=>o-s)}catch(r){return r.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to list partition transcripts: ${r instanceof Error?r.message:String(r)}`),[])}}async deleteTranscript(e,r){if(this.isEnabled())try{let n=this.getTranscriptFilePath(e,r);await zT.promises.unlink(n),Ge.debug(this.ctx,`Deleted transcript: ${n}`)}catch(n){n.code!=="ENOENT"&&Ge.error(this.ctx,`Failed to delete transcript: ${n instanceof Error?n.message:String(n)}`)}}async writeTranscriptFile(e,r,n){if(this.isEnabled())try{let o=this.getTranscriptFilePath(e,r),s=k$.dirname(o);await zT.promises.mkdir(s,{recursive:!0,mode:448});let c=n.map(l=>JSON.stringify(l)).join(` +${n}`}};var ten=de(een()),iqe=de(W7e()),ren=de(require("os"));var Opo=Math.min(Math.max(Math.ceil(ren.cpus().length/2),1),10),_Nt=new Se("ProjectContextSkill"),Une=class t{constructor(){this.isActive=!0}static{a(this,"WorkerPoolToken")}static{this.workerPoolStarted=!1}static{this.activeProcessCount=0}static{this.allTokens=[]}static{this.lock=new ten.default}static async startWorkerPool(){await t.lock.acquireAsync();try{t.workerPoolStarted||(t.workerPoolStarted=!0,await iqe.start({maxWorkers:Opo})),t.activeProcessCount++;let e=new t;return t.allTokens.push(e),e}finally{t.lock.release()}}async stopWorkerPool(){if(this.isActive){await t.lock.acquireAsync();try{this.isActive&&(this.isActive=!1,t.activeProcessCount--,t.activeProcessCount==0&&(await iqe.stop(),t.workerPoolStarted=!1),t.allTokens.includes(this)&&t.allTokens.splice(t.allTokens.indexOf(this),1))}finally{t.lock.release()}}}static async forceStopWorkerPool(){let e=t.allTokens[Symbol.iterator]();for(let r of e)await r.stopWorkerPool();t.workerPoolStarted=!1,t.activeProcessCount=0}},fEe=Une.startWorkerPool.bind(Une);var DXl=S.Object({uri:S.String(),snippet:S.String(),range:S.Object({start:S.Object({line:S.Number(),character:S.Number()}),end:S.Object({line:S.Number(),character:S.Number()})})}),lkt=47,CNt=class{constructor(e){this.turnContext=e}static{a(this,"ProjectContextSkillProcessor")}value(){return 1}async processSkill(e){if(this.turnContext.cancelationToken.isCancellationRequested){await this.turnContext.steps.cancel(X1);return}let r=[],n=this.turnContext.ctx.get(In),o=this.removeDuplicateSnippets(e);for(let s of o){let{uri:c,snippet:l,range:u}=s,d=await n.getOrReadTextDocument(s);if(d.status==="valid"){let p=new ek(d.document,u,u),h=new nr([l]),g=dEe(c)?.5:.8;r.push([`Code excerpt from file \`${mo(c)}\`:`,1],[p.wrapInTicks(h,g),1]),await this.turnContext.collectFile(Qne,c,Gl(d),u)}}if(r.length>0)return r.unshift([new nr(["The user wants you to consider the following snippets when computing your answer."]),1]),new nr(r)}removeDuplicateSnippets(e){let r={};return e.forEach(n=>{let o=`${n.uri}#[${n.range.start.line},${n.range.start.character}]-[${n.range.end.line},${n.range.end.character}]`;r[o]||(r[o]=n)}),Object.values(r)}},X1="collect-project-context",rqe=class{constructor(e={}){this.dependencies=e}static{a(this,"SemanticSearchSkillResolver")}async resolveSkill(e){_Nt.debug(e.ctx,"Resolving project context via semantic search skill resolver"),await e.steps.start(X1,"Collecting relevant project context"),await e.info(Go`Project context is applied to this response, which may lead to slightly longer load times. For faster and more general Copilot responses, remove the project context option from your prompt.`);let r=e.ctx.get(Jx);if(!r){await e.steps.error(X1,"Code search service for project context is unavailable");return}let n=[];if(e.turn.workspaceFolder&&n.push(e.turn.workspaceFolder.uri),e.turn.workspaceFolders)for(let u of e.turn.workspaceFolders)n.includes(u.uri)||n.push(u.uri);if(!n.length){await e.steps.error(X1,"No workspace folders available for search");return}let o=dn(e.turn.request.message),c=await(this.dependencies.parseUserQuery??uUe)(e,e.cancelationToken);if(!c||c.length===0){await e.steps.error(X1,"No keywords parsed from user query");return}let l=c.join(" ");try{let u=await r.searchWorkspace({rawQuery:o,resolveQueryAndKeywords:a(async()=>Promise.resolve({rephrasedQuery:l,keywords:c.map(p=>({keyword:p,variations:[]}))}),"resolveQueryAndKeywords"),resolveQuery:a(async()=>Promise.resolve(l),"resolveQuery")},{tokenBudget:jzr,maxResults:Math.min(10*c.length,lkt),workspaceFolders:n,source:"projectContext"},e.cancelationToken);if(await(this.dependencies.telemetryIndexCodesearch??zRt)(e,"semantic_search",{localSnippetCount:u.chunks.length}),u.chunks.length===0){await e.steps.error(X1,"No project context found");return}return await e.steps.finish(X1),u.chunks.map(p=>({uri:p.chunk.file,snippet:p.chunk.text,range:{start:{line:p.chunk.range.startLineNumber,character:p.chunk.range.startColumn},end:{line:p.chunk.range.endLineNumber,character:p.chunk.range.endColumn}}}))}catch(u){await e.steps.error(X1,"Project context search failed"),_Nt.error(e.ctx,"Error during workspace chunk search for project context:",u);return}}},nqe=class{constructor(e=[new dUe]){this.snippetProviders=e}static{a(this,"ProjectContextSkillResolver")}async resolveSkill(e){_Nt.debug(e.ctx,"Resolving project context via the legacy project context skill resolver"),await e.steps.start(X1,"Collecting relevant project context"),await e.info(Go`Project context is applied to this response, which may lead to slightly longer load times. For faster and more general Copilot responses, remove the project context option from your prompt.`);let r=this.snippetProviders.map(async c=>c.snippetProviderStatus(e)),n=await Promise.all(r),o="not_indexed",s;for(let c of Lzr){let l=n.findIndex(u=>u===c);if(l!==-1){o=c,s=this.snippetProviders[l];break}}switch(o){case"indexed":{let{snippets:c,measurements:l}=await s.provideSnippets(e);if(await zRt(e,s.providerType,l),c.length===0){await e.steps.error(X1,"No project context found");return}return await e.steps.finish(X1),c}case"indexing":{await e.steps.error(X1,"Indexing repository, please try again later");return}case"not_indexed":{await e.steps.error(X1,"No project context available");return}}}},Qne="project-context",YEe=class extends ch{static{a(this,"ProjectContextSkill")}constructor(e){super(Qne,"Code snippets and documentation from the open project. This skill is useful when the user question is specific to the open project and its context. Do not include this skill for general programming questions.","Performing code search",()=>e,r=>new CNt(r),"implicit",["Relevant: How do I add a custom server route?","Relevant: Where is the code that processes the response from CopyableThreadElement?","Relevant: Where do I add tests for the InputValidation class?","Relevant: How to implement a shared buffer component","Not relevant: What does numpy do?"],()=>!0)}};var vNt=class{constructor(){this.slug="project";this.name="Project";this.description="Ask about your project"}static{a(this,"ProjectAgent")}additionalSkills(){return[Qne]}};async function IT(t){let e=[];return e.push(new sUe),e.push(...await t.get(Vx).agents()),e.push(new vNt),e.push(new H7e),e}a(IT,"getAgents");f();f();var BT=require("fs"),Fj=de(require("path"));var mh=class{constructor(e){this.ctx=e}static{a(this,"ConversationTranscriptPersistence")}isEnabled(){return!!this.getTranscriptDirectory()}getTranscriptDirectory(){return vr(this.ctx,tt.TranscriptDirectory)}async appendEvent(e,r,n){if(this.isEnabled())try{let o=this.getTranscriptFilePath(e,r),s=Fj.dirname(o);await BT.promises.mkdir(s,{recursive:!0,mode:448});let c=JSON.stringify(n)+` +`;await BT.promises.appendFile(o,c,{encoding:"utf8",mode:384})}catch(o){Ge.error(this.ctx,`Failed to append transcript event: ${o instanceof Error?o.message:String(o)}`)}}async initializePartition(e,r,n){if(!this.isEnabled())return;let o={type:"partition.created",data:{conversationId:String(e),partitionId:r,...n},id:yr(),timestamp:new Date().toISOString(),parentId:null};await this.appendEvent(e,r,o)}getTranscriptPath(e,r){return`${e}/partition-${r}.jsonl`}getTranscriptFilePath(e,r){let n=this.getTranscriptDirectory();if(!n)throw new Error("Transcript directory not configured");return Fj.join(n,String(e),`partition-${r}.jsonl`)}getConversationDirectory(e){let r=this.getTranscriptDirectory();if(!r)throw new Error("Transcript directory not configured");return Fj.join(r,String(e))}async readTranscriptFile(e,r){if(!this.isEnabled())return[];try{let n=this.getTranscriptFilePath(e,r);return(await BT.promises.readFile(n,"utf8")).trim().split(` +`).filter(c=>c.length>0).map(c=>JSON.parse(c))}catch(n){return n.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to read transcript file: ${n instanceof Error?n.message:String(n)}`),[])}}async listPartitionTranscripts(e){if(!this.isEnabled())return[];try{let r=this.getConversationDirectory(e);return(await BT.promises.readdir(r)).filter(o=>o.startsWith("partition-")&&o.endsWith(".jsonl")&&!o.includes(".v")).map(o=>{let s=o.match(/^partition-(\d+)\.jsonl$/);return s?parseInt(s[1],10):NaN}).filter(o=>!isNaN(o)).sort((o,s)=>o-s)}catch(r){return r.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to list partition transcripts: ${r instanceof Error?r.message:String(r)}`),[])}}async deleteTranscript(e,r){if(this.isEnabled())try{let n=this.getTranscriptFilePath(e,r);await BT.promises.unlink(n),Ge.debug(this.ctx,`Deleted transcript: ${n}`)}catch(n){n.code!=="ENOENT"&&Ge.error(this.ctx,`Failed to delete transcript: ${n instanceof Error?n.message:String(n)}`)}}async writeTranscriptFile(e,r,n){if(this.isEnabled())try{let o=this.getTranscriptFilePath(e,r),s=Fj.dirname(o);await BT.promises.mkdir(s,{recursive:!0,mode:448});let c=n.map(l=>JSON.stringify(l)).join(` `)+` -`;await zT.promises.writeFile(o,c,{encoding:"utf8",mode:384}),Ge.debug(this.ctx,`Wrote ${n.length} events to transcript: ${o}`)}catch(o){Ge.error(this.ctx,`Failed to write transcript file: ${o instanceof Error?o.message:String(o)}`)}}getVersionedTranscriptFilePath(e,r,n){let o=this.getTranscriptDirectory();if(!o)throw new Error("Transcript directory not configured");return k$.join(o,String(e),`partition-${r}.v${n}.jsonl`)}async readVersionedTranscriptFile(e,r,n){if(!this.isEnabled())return[];try{let o=this.getVersionedTranscriptFilePath(e,r,n);return(await zT.promises.readFile(o,"utf8")).trim().split(` -`).filter(l=>l.length>0).map(l=>JSON.parse(l))}catch(o){return o.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to read versioned transcript file: ${o instanceof Error?o.message:String(o)}`),[])}}async buildPartitionFromVersionedTranscript(e,r,n){let o=await this.readVersionedTranscriptFile(e,r,n);if(o.length===0)return;let s=[];for(let l of o)switch(l.type){case"user.message":{let u=l.data.content,d=l.data.turnId,p=new Dd({message:u,type:"user"},d);p.timestamp=new Date(l.timestamp).getTime(),s.push(p);break}case"assistant.message":{if(s.length>0){let u=s[s.length-1],d=l.data.content,p=iZr(d);u.response={message:p,type:"model"}}break}case"assistant.turn_end":{if(s.length>0){let u=s[s.length-1];u.status==="in-progress"&&(u.status="success")}break}case"partition.created":{let u=l.data.summary;if(u&&l.data.compressedFrom){let d=new Dd({message:u,type:"meta"},l.data.turnId);d.timestamp=new Date(l.timestamp).getTime(),d.response={message:"",type:"model"},d.status="success",s.push(d)}break}case"user.message_rendered":{let u=l.data.turnId,d=l.data.renderedMessage;if(u&&d){for(let p=s.length-1;p>=0;p--)if(String(s[p].id)===u){s[p].renderedUserMessage=d;break}}break}case"tool.execution_start":case"tool.execution_complete":case"session.start":case"assistant.turn_start":break}let c=(r-1)*10+1;return{conversationId:e,partitionId:r,turns:s,status:"archived",createdAt:s[0]?.timestamp??Date.now(),startTurnNumber:c,endTurnNumber:c+s.length-1,turnCount:s.length}}async archiveTranscriptsAsVersion(e,r,n){if(this.isEnabled())for(let o of r)try{let s=this.getTranscriptFilePath(e,o),c=this.getVersionedTranscriptFilePath(e,o,n);try{await zT.promises.access(s)}catch{continue}await zT.promises.copyFile(s,c),Ge.debug(this.ctx,`Archived transcript: ${s} -> ${c}`)}catch(s){Ge.error(this.ctx,`Failed to archive transcript for partition ${o}: ${s instanceof Error?s.message:String(s)}`)}}async replayTranscriptToTurns(e,r,n){let o=await this.readTranscriptFile(e,r);if(o.length===0)return[];let s=[],c=!1,l=new Map,u=new Map;for(let d of o){if(c)break;switch(d.type){case"user.message":{let p=d.data.content,h=d.data.turnId,m=new Dd({message:p,type:"user"},h);m.timestamp=new Date(d.timestamp).getTime(),s.push(m),n!==void 0&&m.id===n&&(c=!0);break}case"assistant.message":{if(s.length>0){let p=s[s.length-1],h=d.data.content,m=iZr(h);p.response={message:m,type:"model"}}break}case"assistant.turn_end":{if(s.length>0){let p=s[s.length-1];p.status==="in-progress"&&(p.status="success"),n!==void 0&&p.id===n&&(c=!0)}break}case"partition.created":{let p=d.data.summary;if(p&&d.data.compressedFrom){let h=new Dd({message:p,type:"meta"},d.data.turnId);h.timestamp=new Date(d.timestamp).getTime(),h.response={message:"",type:"model"},h.status="success",s.push(h)}break}case"tool.execution_start":{let p=d.data.toolCallId;if(p){let h=l.get(p)||{};h.start=d,l.set(p,h),s.length>0&&u.set(p,s.length-1)}break}case"tool.execution_complete":{let p=d.data.toolCallId;if(p){let h=l.get(p)||{};h.complete=d,l.set(p,h)}break}case"user.message_rendered":{let p=d.data.turnId,h=d.data.renderedMessage;if(p&&h){for(let m=s.length-1;m>=0;m--)if(String(s[m].id)===p){s[m].renderedUserMessage=h;break}}break}case"session.start":case"assistant.turn_start":break}}return this.reconstructToolCallsForTurns(s,l,u),Ge.debug(this.ctx,`Replayed transcript: partitionId=${r}, events=${o.length}, turns=${s.length}`),s}reconstructToolCallsForTurns(e,r,n){let o=new Map;for(let[s,c]of r){let l=n.get(s);if(l===void 0){Ge.debug(this.ctx,`Tool call ${s} has no associated turn`);continue}let u=this.reconstructToolCallFromEvents(s,c);if(u){let d=o.get(l)||[];d.push(u),o.set(l,d)}}for(let[s,c]of o)if(s0){let l=e[s],u=[{roundId:1,toolCalls:c}];l.restoredToolCalls=u}}reconstructToolCallFromEvents(e,r){let{start:n,complete:o}=r;if(!n){Ge.debug(this.ctx,`Tool call ${e} has no start event`);return}let s=n.data.toolName||"unknown",c=n.data.arguments,l="running",u,d,p,h,m;if(o){let A=o.data.success;o.data.status==="Cancelled"?l="cancelled":A?l="completed":l="error";let E=o.data.result;E&&(u=E.result,d=E.error,p=E.resultDetails,h=E.toolSpecificData,m=E.progressMessage)}let g={id:e,name:s,toolType:"default",status:l,input:c};return u&&(g.result=u),d&&(g.error=d),p&&(g.resultDetails=p),h&&(g.toolSpecificData=h),m&&(g.progressMessage=m),g}async buildPartitionFromTranscript(e,r){let n=await this.replayTranscriptToTurns(e,r);if(n.length===0&&(await this.readTranscriptFile(e,r)).length===0)return;let o=(r-1)*10+1;return{conversationId:e,partitionId:r,turns:n,status:"active",createdAt:n[0]?.timestamp??Date.now(),startTurnNumber:o,endTurnNumber:o+n.length-1,turnCount:n.length}}async findTurnInTranscripts(e,r){let n=await this.listPartitionTranscripts(e);if(n.length===0)return;let o=String(r);for(let s=n.length-1;s>=0;s--){let c=n[s];if(!(await this.readTranscriptFile(e,c)).some(h=>(h.type==="user.message"||h.type==="assistant.turn_end")&&h.data&&String(h.data.turnId)===o))continue;let d=await this.replayTranscriptToTurns(e,c),p=d.findIndex(h=>String(h.id)===o);if(p!==-1)return{partitionId:c,turnIndex:p};if(d.length>0){let h=d[d.length-1];return Ge.info(this.ctx,`Turn ${o} referenced in partition ${c} events but not in replayed turns (split-turn from compression). Resolving to turn ${h.id}.`),{partitionId:c,turnIndex:d.length-1,resolvedTurnId:h.id}}}}async deriveMetadata(e){let r=await this.listPartitionTranscripts(e);if(r.length===0)return;let n=Math.max(...r),o=r.length,s=Date.now(),c=Math.min(...r),l=await this.readTranscriptFile(e,c);l.length>0&&(s=new Date(l[0].timestamp).getTime());let u=Date.now(),d=await this.readTranscriptFile(e,n);if(d.length>0){let h=d[d.length-1];u=new Date(h.timestamp).getTime()}let p=await this.listArchivedVersions(e);return{conversationId:e,currentPartitionId:n,totalPartitions:o,createdAt:s,lastActivity:u,archivedVersions:p.length>0?p:void 0}}async listArchivedVersions(e){if(!this.isEnabled())return[];try{let r=this.getConversationDirectory(e),n=await zT.promises.readdir(r),o=new Set;for(let s of n){let c=s.match(/partition-\d+\.v(\d+)\.jsonl$/);c&&o.add(parseInt(c[1],10))}return Array.from(o).sort((s,c)=>c-s)}catch(r){return r.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to list archived versions: ${r instanceof Error?r.message:String(r)}`),[])}}};function oZr(t,e,r=null,n){return{type:"user.message",data:{content:t,turnId:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(oZr,"createUserMessageEvent");function sZr(t,e,r=null){return{type:"user.message_rendered",data:{turnId:t,renderedMessage:e},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(sZr,"createUserMessageRenderedEvent");function aZr(t,e,r=null,n){return{type:"assistant.message",data:{content:t,messageId:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(aZr,"createAssistantMessageEvent");function cZr(t,e,r,n=null){return{type:"tool.execution_start",data:{toolCallId:t,toolName:e,arguments:r},id:yr(),timestamp:new Date().toISOString(),parentId:n}}a(cZr,"createToolExecutionStartEvent");function lZr(t,e,r,n=null,o){return{type:"tool.execution_complete",data:{toolCallId:t,success:e,result:r,...o},id:yr(),timestamp:new Date().toISOString(),parentId:n}}a(lZr,"createToolExecutionCompleteEvent");function Jqe(t,e=null,r){return{type:"assistant.turn_start",data:{turnId:t,...r},id:yr(),timestamp:new Date().toISOString(),parentId:e}}a(Jqe,"createAssistantTurnStartEvent");function Xqe(t,e,r=null,n){return{type:"assistant.turn_end",data:{turnId:t,status:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(Xqe,"createAssistantTurnEndEvent");function iZr(t){try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]&&"role"in e[0])return e}catch{}return t}a(iZr,"parseAssistantMessageContent");var OO=class extends Error{constructor(r,n){super(r);this.code=n;this.name="RestorationError"}static{a(this,"RestorationError")}},Pk=class{constructor(e){this.ctx=e;this.transcriptPersistence=new vh(e)}static{a(this,"ConversationRestoration")}async findTurnInPartitions(e,r){Ge.debug(this.ctx,`Finding turn in partitions: conversationId=${e}, turnId=${r}`);let n=await this.transcriptPersistence.findTurnInTranscripts(e,r);if(n)return Ge.debug(this.ctx,`Turn found in transcript: conversationId=${e}, turnId=${r}, partitionId=${n.partitionId}, turnIndex=${n.turnIndex}`),n;Ge.debug(this.ctx,`Turn not found: conversationId=${e}, turnId=${r}`)}async loadPartitionForRestoration(e,r){Ge.debug(this.ctx,`Loading partition for restoration: conversationId=${e}, partitionId=${r}`);let n=await this.transcriptPersistence.buildPartitionFromTranscript(e,r);if(!n){let o=new OO(`Partition not found: conversationId=${e}, partitionId=${r}`,"PARTITION_NOT_FOUND");throw Ge.error(this.ctx,o.message),o}if(!Array.isArray(n.turns)){let o=new OO(`Invalid partition data: turns is not an array: conversationId=${e}, partitionId=${r}`,"INVALID_PARTITION_DATA");throw Ge.error(this.ctx,o.message),o}return Ge.debug(this.ctx,`Partition built from transcript: conversationId=${e}, partitionId=${r}, turnCount=${n.turns.length}`),n}async loadVersionedPartition(e,r,n){Ge.debug(this.ctx,`Loading versioned partition: conversationId=${e}, partitionId=${r}, version=${n}`);let o=await this.transcriptPersistence.buildPartitionFromVersionedTranscript(e,r,n);if(!o){let s=new OO(`Versioned partition not found: conversationId=${e}, partitionId=${r}, version=${n}`,"PARTITION_NOT_FOUND");throw Ge.error(this.ctx,s.message),s}if(!Array.isArray(o.turns)){let s=new OO("Invalid versioned partition data: turns is not an array","INVALID_PARTITION_DATA");throw Ge.error(this.ctx,s.message),s}return o}reconstructTurns(e,r){let n=e.turns.findIndex(s=>s.id===r);if(n===-1)throw new OO(`Turn not found in partition: turnId=${r}, partitionId=${e.partitionId}`,"TURN_NOT_FOUND");let o=e.turns.slice(0,n+1);return Ge.debug(this.ctx,`Reconstructed turns: partitionId=${e.partitionId}, targetTurnIndex=${n}, turnCount=${o.length}`),o.map(s=>this.ensureTurnInstance(s))}async isLatestTurn(e,r,n,o){if(n.partitionId!==o.currentPartitionId)return Ge.debug(this.ctx,`Turn ${r} is not in current partition (in P${n.partitionId}, current is P${o.currentPartitionId})`),!1;let s=await this.transcriptPersistence.replayTranscriptToTurns(e,o.currentPartitionId);if(s.length===0)return!1;let c=s[s.length-1],l=c.id===r;return Ge.debug(this.ctx,`Turn ${r} isLatest=${l} (last turn is ${c.id})`),l}async createVersionArchive(e,r,n,o){if(o.length===0)return r;Ge.info(this.ctx,`Creating version archive: conversationId=${e}, versionTimestamp=${n}, partitions=${o.join(",")}`),await this.archiveTranscriptsAsVersion(e,o,n),Ge.debug(this.ctx,`Archived ${o.length} transcript partitions with version ${n}`);for(let c of o)await this.transcriptPersistence.deleteTranscript(e,c);return{...r,archivedVersions:[...r.archivedVersions??[],n],lastActivity:Date.now()}}async archiveTranscriptsAsVersion(e,r,n){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.archiveTranscriptsAsVersion(e,r,n)}catch(o){Ge.error(this.ctx,`Failed to archive transcripts: ${o instanceof Error?o.message:String(o)}`)}}async restoreConversation(e,r){let n=Date.now(),o=r;Ge.debug(this.ctx,`Starting conversation restoration: conversationId=${e}, targetTurnId=${o}`),this.sendStartedTelemetry(e,o);try{let s=await this.transcriptPersistence.deriveMetadata(e);if(!s){let m=new OO(`No transcripts found for conversation: conversationId=${e}`,"CONVERSATION_NOT_FOUND");throw Ge.error(this.ctx,m.message),this.sendFailedTelemetry(e,o,m.code,Date.now()-n),m}let c=await this.findTurnInPartitions(e,o);if(!c){Ge.debug(this.ctx,`Turn not found for restoration: conversationId=${e}, targetTurnId=${o}`),this.sendFailedTelemetry(e,o,"TURN_NOT_FOUND",Date.now()-n);return}c.resolvedTurnId&&(Ge.info(this.ctx,`Turn ${o} resolved to ${c.resolvedTurnId} in partition ${c.partitionId} (split-turn from compression)`),o=c.resolvedTurnId);let l=await this.isLatestTurn(e,o,c,s),u;if(!l){let m=Date.now(),A=(await this.transcriptPersistence.listPartitionTranscripts(e)).filter(y=>y>=c.partitionId);s=await this.createVersionArchive(e,s,m,A),u=m,Ge.info(this.ctx,`Version created: conversationId=${e}, version=${m}`)}let d;u?d=await this.loadVersionedPartition(e,c.partitionId,u):d=await this.loadPartitionForRestoration(e,c.partitionId);let p=this.reconstructTurns(d,o);u&&(await this.rewritePartitionTranscriptFromVersion(e,c.partitionId,o,u),s={...s,currentPartitionId:c.partitionId,totalPartitions:c.partitionId,lastActivity:Date.now()});let h=Date.now()-n;return Ge.info(this.ctx,`Conversation restored: conversationId=${e}, partitionId=${c.partitionId}, turnCount=${p.length}, versionCreated=${u??"none"}, duration=${h}ms`),this.sendCompletedTelemetry(e,o,c.partitionId,p.length,h),{partitionId:c.partitionId,turns:p,metadata:s,partition:d,versionCreated:u}}catch(s){throw s instanceof OO||(Ge.exception(this.ctx,s,`Restoration failed: conversationId=${e}, targetTurnId=${o}`),this.sendFailedTelemetry(e,o,"UNKNOWN",Date.now()-n)),s}}ensureTurnInstance(e){if(e instanceof Dd)return e;let r=e,n=new Dd(r.request,r.id);return n.timestamp=r.timestamp??Date.now(),n.response=r.response,n.status=r.status??"success",n.skills=r.skills??[],n.ignoredSkills=r.ignoredSkills??[],n.annotations=r.annotations??[],n.workspaceFolder=r.workspaceFolder,n.workspaceFolders=r.workspaceFolders,n.agent=r.agent,n.template=r.template,n.confirmationRequest=r.confirmationRequest,n.confirmationResponse=r.confirmationResponse,n.chatMode=r.chatMode,n.needToolCallConfirmation=r.needToolCallConfirmation,n.userRequestedModel=r.userRequestedModel,n.resolvedModelConfiguration=r.resolvedModelConfiguration,n}async initializeRestoredTranscript(e,r){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.initializePartition(e,r,{source:"restoration"})}catch(n){Ge.error(this.ctx,`Failed to initialize restored partition transcript: ${n instanceof Error?n.message:String(n)}`)}}sliceTranscriptEventsToTurn(e,r){let n=String(r),o=[],s=!1;for(let c of e){if(s&&c.type==="user.message"){let l=c.data.turnId;if(l!==void 0&&String(l)!==n)break}if(o.push(c),!s){if(c.type==="user.message"){let l=c.data.turnId;l!==void 0&&String(l)===n&&(s=!0)}else if(c.type==="partition.created"){let l=c.data.turnId;l!==void 0&&String(l)===n&&(s=!0)}}}return o}async rewritePartitionTranscriptFromVersion(e,r,n,o){if(this.transcriptPersistence.isEnabled())try{let s=await this.transcriptPersistence.readVersionedTranscriptFile(e,r,o);if(s.length===0){Ge.warn(this.ctx,`No versioned transcript events found when rewriting: conversationId=${e}, partitionId=${r}, version=${o}`);return}let c=this.sliceTranscriptEventsToTurn(s,n);await this.transcriptPersistence.writeTranscriptFile(e,r,c)}catch(s){Ge.error(this.ctx,`Failed to rewrite transcript from version: conversationId=${e}, partitionId=${r}, version=${o}, error=${s instanceof Error?s.message:String(s)}`)}}sendStartedTelemetry(e,r){let n=yt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r)},{});at(this.ctx,"conversationPartition.restoration.started",n,0)}sendCompletedTelemetry(e,r,n,o,s){let c=yt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r),partitionId:String(n)},{turnCount:o,restorationTimeMs:s});at(this.ctx,"conversationPartition.restoration.completed",c,0)}sendFailedTelemetry(e,r,n,o){let s=yt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r),errorCode:n},{restorationTimeMs:o});at(this.ctx,"conversationPartition.restoration.failed",s,0)}};f();f();f();var uZr={id:0,start_offset:0,stop_offset:0,type:"ip_code_citations",details:{},citations:{snippet:`html lang="en"> +`;await BT.promises.writeFile(o,c,{encoding:"utf8",mode:384}),Ge.debug(this.ctx,`Wrote ${n.length} events to transcript: ${o}`)}catch(o){Ge.error(this.ctx,`Failed to write transcript file: ${o instanceof Error?o.message:String(o)}`)}}getVersionedTranscriptFilePath(e,r,n){let o=this.getTranscriptDirectory();if(!o)throw new Error("Transcript directory not configured");return Fj.join(o,String(e),`partition-${r}.v${n}.jsonl`)}async readVersionedTranscriptFile(e,r,n){if(!this.isEnabled())return[];try{let o=this.getVersionedTranscriptFilePath(e,r,n);return(await BT.promises.readFile(o,"utf8")).trim().split(` +`).filter(l=>l.length>0).map(l=>JSON.parse(l))}catch(o){return o.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to read versioned transcript file: ${o instanceof Error?o.message:String(o)}`),[])}}async buildPartitionFromVersionedTranscript(e,r,n){let o=await this.readVersionedTranscriptFile(e,r,n);if(o.length===0)return;let s=[];for(let l of o)switch(l.type){case"user.message":{let u=l.data.content,d=l.data.turnId,p=new Td({message:u,type:"user"},d);p.timestamp=new Date(l.timestamp).getTime(),s.push(p);break}case"assistant.message":{if(s.length>0){let u=s[s.length-1],d=l.data.content,p=nen(d);u.response={message:p,type:"model"}}break}case"assistant.turn_end":{if(s.length>0){let u=s[s.length-1];u.status==="in-progress"&&(u.status="success")}break}case"partition.created":{let u=l.data.summary;if(u&&l.data.compressedFrom){let d=new Td({message:u,type:"meta"},l.data.turnId);d.timestamp=new Date(l.timestamp).getTime(),d.response={message:"",type:"model"},d.status="success",s.push(d)}break}case"user.message_rendered":{let u=l.data.turnId,d=l.data.renderedMessage;if(u&&d){for(let p=s.length-1;p>=0;p--)if(String(s[p].id)===u){s[p].renderedUserMessage=d;break}}break}case"tool.execution_start":case"tool.execution_complete":case"session.start":case"assistant.turn_start":break}let c=(r-1)*10+1;return{conversationId:e,partitionId:r,turns:s,status:"archived",createdAt:s[0]?.timestamp??Date.now(),startTurnNumber:c,endTurnNumber:c+s.length-1,turnCount:s.length}}async archiveTranscriptsAsVersion(e,r,n){if(this.isEnabled())for(let o of r)try{let s=this.getTranscriptFilePath(e,o),c=this.getVersionedTranscriptFilePath(e,o,n);try{await BT.promises.access(s)}catch{continue}await BT.promises.copyFile(s,c),Ge.debug(this.ctx,`Archived transcript: ${s} -> ${c}`)}catch(s){Ge.error(this.ctx,`Failed to archive transcript for partition ${o}: ${s instanceof Error?s.message:String(s)}`)}}async replayTranscriptToTurns(e,r,n){let o=await this.readTranscriptFile(e,r);if(o.length===0)return[];let s=[],c=!1,l=new Map,u=new Map;for(let d of o){if(c)break;switch(d.type){case"user.message":{let p=d.data.content,h=d.data.turnId,m=new Td({message:p,type:"user"},h);m.timestamp=new Date(d.timestamp).getTime(),s.push(m),n!==void 0&&m.id===n&&(c=!0);break}case"assistant.message":{if(s.length>0){let p=s[s.length-1],h=d.data.content,m=nen(h);p.response={message:m,type:"model"}}break}case"assistant.turn_end":{if(s.length>0){let p=s[s.length-1];p.status==="in-progress"&&(p.status="success"),n!==void 0&&p.id===n&&(c=!0)}break}case"partition.created":{let p=d.data.summary;if(p&&d.data.compressedFrom){let h=new Td({message:p,type:"meta"},d.data.turnId);h.timestamp=new Date(d.timestamp).getTime(),h.response={message:"",type:"model"},h.status="success",s.push(h)}break}case"tool.execution_start":{let p=d.data.toolCallId;if(p){let h=l.get(p)||{};h.start=d,l.set(p,h),s.length>0&&u.set(p,s.length-1)}break}case"tool.execution_complete":{let p=d.data.toolCallId;if(p){let h=l.get(p)||{};h.complete=d,l.set(p,h)}break}case"user.message_rendered":{let p=d.data.turnId,h=d.data.renderedMessage;if(p&&h){for(let m=s.length-1;m>=0;m--)if(String(s[m].id)===p){s[m].renderedUserMessage=h;break}}break}case"session.start":case"assistant.turn_start":break}}return this.reconstructToolCallsForTurns(s,l,u),Ge.debug(this.ctx,`Replayed transcript: partitionId=${r}, events=${o.length}, turns=${s.length}`),s}reconstructToolCallsForTurns(e,r,n){let o=new Map;for(let[s,c]of r){let l=n.get(s);if(l===void 0){Ge.debug(this.ctx,`Tool call ${s} has no associated turn`);continue}let u=this.reconstructToolCallFromEvents(s,c);if(u){let d=o.get(l)||[];d.push(u),o.set(l,d)}}for(let[s,c]of o)if(s0){let l=e[s],u=[{roundId:1,toolCalls:c}];l.restoredToolCalls=u}}reconstructToolCallFromEvents(e,r){let{start:n,complete:o}=r;if(!n){Ge.debug(this.ctx,`Tool call ${e} has no start event`);return}let s=n.data.toolName||"unknown",c=n.data.arguments,l="running",u,d,p,h,m;if(o){let A=o.data.success;o.data.status==="Cancelled"?l="cancelled":A?l="completed":l="error";let E=o.data.result;E&&(u=E.result,d=E.error,p=E.resultDetails,h=E.toolSpecificData,m=E.progressMessage)}let g={id:e,name:s,toolType:"default",status:l,input:c};return u&&(g.result=u),d&&(g.error=d),p&&(g.resultDetails=p),h&&(g.toolSpecificData=h),m&&(g.progressMessage=m),g}async buildPartitionFromTranscript(e,r){let n=await this.replayTranscriptToTurns(e,r);if(n.length===0&&(await this.readTranscriptFile(e,r)).length===0)return;let o=(r-1)*10+1;return{conversationId:e,partitionId:r,turns:n,status:"active",createdAt:n[0]?.timestamp??Date.now(),startTurnNumber:o,endTurnNumber:o+n.length-1,turnCount:n.length}}async findTurnInTranscripts(e,r){let n=await this.listPartitionTranscripts(e);if(n.length===0)return;let o=String(r);for(let s=n.length-1;s>=0;s--){let c=n[s];if(!(await this.readTranscriptFile(e,c)).some(h=>(h.type==="user.message"||h.type==="assistant.turn_end")&&h.data&&String(h.data.turnId)===o))continue;let d=await this.replayTranscriptToTurns(e,c),p=d.findIndex(h=>String(h.id)===o);if(p!==-1)return{partitionId:c,turnIndex:p};if(d.length>0){let h=d[d.length-1];return Ge.info(this.ctx,`Turn ${o} referenced in partition ${c} events but not in replayed turns (split-turn from compression). Resolving to turn ${h.id}.`),{partitionId:c,turnIndex:d.length-1,resolvedTurnId:h.id}}}}async deriveMetadata(e){let r=await this.listPartitionTranscripts(e);if(r.length===0)return;let n=Math.max(...r),o=r.length,s=Date.now(),c=Math.min(...r),l=await this.readTranscriptFile(e,c);l.length>0&&(s=new Date(l[0].timestamp).getTime());let u=Date.now(),d=await this.readTranscriptFile(e,n);if(d.length>0){let h=d[d.length-1];u=new Date(h.timestamp).getTime()}let p=await this.listArchivedVersions(e);return{conversationId:e,currentPartitionId:n,totalPartitions:o,createdAt:s,lastActivity:u,archivedVersions:p.length>0?p:void 0}}async listArchivedVersions(e){if(!this.isEnabled())return[];try{let r=this.getConversationDirectory(e),n=await BT.promises.readdir(r),o=new Set;for(let s of n){let c=s.match(/partition-\d+\.v(\d+)\.jsonl$/);c&&o.add(parseInt(c[1],10))}return Array.from(o).sort((s,c)=>c-s)}catch(r){return r.code==="ENOENT"?[]:(Ge.error(this.ctx,`Failed to list archived versions: ${r instanceof Error?r.message:String(r)}`),[])}}};function ien(t,e,r=null,n){return{type:"user.message",data:{content:t,turnId:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(ien,"createUserMessageEvent");function oen(t,e,r=null){return{type:"user.message_rendered",data:{turnId:t,renderedMessage:e},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(oen,"createUserMessageRenderedEvent");function sen(t,e,r=null,n){return{type:"assistant.message",data:{content:t,messageId:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(sen,"createAssistantMessageEvent");function aen(t,e,r,n=null){return{type:"tool.execution_start",data:{toolCallId:t,toolName:e,arguments:r},id:yr(),timestamp:new Date().toISOString(),parentId:n}}a(aen,"createToolExecutionStartEvent");function cen(t,e,r,n=null,o){return{type:"tool.execution_complete",data:{toolCallId:t,success:e,result:r,...o},id:yr(),timestamp:new Date().toISOString(),parentId:n}}a(cen,"createToolExecutionCompleteEvent");function oqe(t,e=null,r){return{type:"assistant.turn_start",data:{turnId:t,...r},id:yr(),timestamp:new Date().toISOString(),parentId:e}}a(oqe,"createAssistantTurnStartEvent");function sqe(t,e,r=null,n){return{type:"assistant.turn_end",data:{turnId:t,status:e,...n},id:yr(),timestamp:new Date().toISOString(),parentId:r}}a(sqe,"createAssistantTurnEndEvent");function nen(t){try{let e=JSON.parse(t);if(Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]&&"role"in e[0])return e}catch{}return t}a(nen,"parseAssistantMessageContent");var A4=class extends Error{constructor(r,n){super(r);this.code=n;this.name="RestorationError"}static{a(this,"RestorationError")}},yk=class{constructor(e){this.ctx=e;this.transcriptPersistence=new mh(e)}static{a(this,"ConversationRestoration")}async findTurnInPartitions(e,r){Ge.debug(this.ctx,`Finding turn in partitions: conversationId=${e}, turnId=${r}`);let n=await this.transcriptPersistence.findTurnInTranscripts(e,r);if(n)return Ge.debug(this.ctx,`Turn found in transcript: conversationId=${e}, turnId=${r}, partitionId=${n.partitionId}, turnIndex=${n.turnIndex}`),n;Ge.debug(this.ctx,`Turn not found: conversationId=${e}, turnId=${r}`)}async loadPartitionForRestoration(e,r){Ge.debug(this.ctx,`Loading partition for restoration: conversationId=${e}, partitionId=${r}`);let n=await this.transcriptPersistence.buildPartitionFromTranscript(e,r);if(!n){let o=new A4(`Partition not found: conversationId=${e}, partitionId=${r}`,"PARTITION_NOT_FOUND");throw Ge.error(this.ctx,o.message),o}if(!Array.isArray(n.turns)){let o=new A4(`Invalid partition data: turns is not an array: conversationId=${e}, partitionId=${r}`,"INVALID_PARTITION_DATA");throw Ge.error(this.ctx,o.message),o}return Ge.debug(this.ctx,`Partition built from transcript: conversationId=${e}, partitionId=${r}, turnCount=${n.turns.length}`),n}async loadVersionedPartition(e,r,n){Ge.debug(this.ctx,`Loading versioned partition: conversationId=${e}, partitionId=${r}, version=${n}`);let o=await this.transcriptPersistence.buildPartitionFromVersionedTranscript(e,r,n);if(!o){let s=new A4(`Versioned partition not found: conversationId=${e}, partitionId=${r}, version=${n}`,"PARTITION_NOT_FOUND");throw Ge.error(this.ctx,s.message),s}if(!Array.isArray(o.turns)){let s=new A4("Invalid versioned partition data: turns is not an array","INVALID_PARTITION_DATA");throw Ge.error(this.ctx,s.message),s}return o}reconstructTurns(e,r){let n=e.turns.findIndex(s=>s.id===r);if(n===-1)throw new A4(`Turn not found in partition: turnId=${r}, partitionId=${e.partitionId}`,"TURN_NOT_FOUND");let o=e.turns.slice(0,n+1);return Ge.debug(this.ctx,`Reconstructed turns: partitionId=${e.partitionId}, targetTurnIndex=${n}, turnCount=${o.length}`),o.map(s=>this.ensureTurnInstance(s))}async isLatestTurn(e,r,n,o){if(n.partitionId!==o.currentPartitionId)return Ge.debug(this.ctx,`Turn ${r} is not in current partition (in P${n.partitionId}, current is P${o.currentPartitionId})`),!1;let s=await this.transcriptPersistence.replayTranscriptToTurns(e,o.currentPartitionId);if(s.length===0)return!1;let c=s[s.length-1],l=c.id===r;return Ge.debug(this.ctx,`Turn ${r} isLatest=${l} (last turn is ${c.id})`),l}async createVersionArchive(e,r,n,o){if(o.length===0)return r;Ge.info(this.ctx,`Creating version archive: conversationId=${e}, versionTimestamp=${n}, partitions=${o.join(",")}`),await this.archiveTranscriptsAsVersion(e,o,n),Ge.debug(this.ctx,`Archived ${o.length} transcript partitions with version ${n}`);for(let c of o)await this.transcriptPersistence.deleteTranscript(e,c);return{...r,archivedVersions:[...r.archivedVersions??[],n],lastActivity:Date.now()}}async archiveTranscriptsAsVersion(e,r,n){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.archiveTranscriptsAsVersion(e,r,n)}catch(o){Ge.error(this.ctx,`Failed to archive transcripts: ${o instanceof Error?o.message:String(o)}`)}}async restoreConversation(e,r){let n=Date.now(),o=r;Ge.debug(this.ctx,`Starting conversation restoration: conversationId=${e}, targetTurnId=${o}`),this.sendStartedTelemetry(e,o);try{let s=await this.transcriptPersistence.deriveMetadata(e);if(!s){let m=new A4(`No transcripts found for conversation: conversationId=${e}`,"CONVERSATION_NOT_FOUND");throw Ge.error(this.ctx,m.message),this.sendFailedTelemetry(e,o,m.code,Date.now()-n),m}let c=await this.findTurnInPartitions(e,o);if(!c){Ge.debug(this.ctx,`Turn not found for restoration: conversationId=${e}, targetTurnId=${o}`),this.sendFailedTelemetry(e,o,"TURN_NOT_FOUND",Date.now()-n);return}c.resolvedTurnId&&(Ge.info(this.ctx,`Turn ${o} resolved to ${c.resolvedTurnId} in partition ${c.partitionId} (split-turn from compression)`),o=c.resolvedTurnId);let l=await this.isLatestTurn(e,o,c,s),u;if(!l){let m=Date.now(),A=(await this.transcriptPersistence.listPartitionTranscripts(e)).filter(y=>y>=c.partitionId);s=await this.createVersionArchive(e,s,m,A),u=m,Ge.info(this.ctx,`Version created: conversationId=${e}, version=${m}`)}let d;u?d=await this.loadVersionedPartition(e,c.partitionId,u):d=await this.loadPartitionForRestoration(e,c.partitionId);let p=this.reconstructTurns(d,o);u&&(await this.rewritePartitionTranscriptFromVersion(e,c.partitionId,o,u),s={...s,currentPartitionId:c.partitionId,totalPartitions:c.partitionId,lastActivity:Date.now()});let h=Date.now()-n;return Ge.info(this.ctx,`Conversation restored: conversationId=${e}, partitionId=${c.partitionId}, turnCount=${p.length}, versionCreated=${u??"none"}, duration=${h}ms`),this.sendCompletedTelemetry(e,o,c.partitionId,p.length,h),{partitionId:c.partitionId,turns:p,metadata:s,partition:d,versionCreated:u}}catch(s){throw s instanceof A4||(Ge.exception(this.ctx,s,`Restoration failed: conversationId=${e}, targetTurnId=${o}`),this.sendFailedTelemetry(e,o,"UNKNOWN",Date.now()-n)),s}}ensureTurnInstance(e){if(e instanceof Td)return e;let r=e,n=new Td(r.request,r.id);return n.timestamp=r.timestamp??Date.now(),n.response=r.response,n.status=r.status??"success",n.skills=r.skills??[],n.ignoredSkills=r.ignoredSkills??[],n.annotations=r.annotations??[],n.workspaceFolder=r.workspaceFolder,n.workspaceFolders=r.workspaceFolders,n.agent=r.agent,n.template=r.template,n.confirmationRequest=r.confirmationRequest,n.confirmationResponse=r.confirmationResponse,n.chatMode=r.chatMode,n.needToolCallConfirmation=r.needToolCallConfirmation,n.userRequestedModel=r.userRequestedModel,n.resolvedModelConfiguration=r.resolvedModelConfiguration,n}async initializeRestoredTranscript(e,r){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.initializePartition(e,r,{source:"restoration"})}catch(n){Ge.error(this.ctx,`Failed to initialize restored partition transcript: ${n instanceof Error?n.message:String(n)}`)}}sliceTranscriptEventsToTurn(e,r){let n=String(r),o=[],s=!1;for(let c of e){if(s&&c.type==="user.message"){let l=c.data.turnId;if(l!==void 0&&String(l)!==n)break}if(o.push(c),!s){if(c.type==="user.message"){let l=c.data.turnId;l!==void 0&&String(l)===n&&(s=!0)}else if(c.type==="partition.created"){let l=c.data.turnId;l!==void 0&&String(l)===n&&(s=!0)}}}return o}async rewritePartitionTranscriptFromVersion(e,r,n,o){if(this.transcriptPersistence.isEnabled())try{let s=await this.transcriptPersistence.readVersionedTranscriptFile(e,r,o);if(s.length===0){Ge.warn(this.ctx,`No versioned transcript events found when rewriting: conversationId=${e}, partitionId=${r}, version=${o}`);return}let c=this.sliceTranscriptEventsToTurn(s,n);await this.transcriptPersistence.writeTranscriptFile(e,r,c)}catch(s){Ge.error(this.ctx,`Failed to rewrite transcript from version: conversationId=${e}, partitionId=${r}, version=${o}, error=${s instanceof Error?s.message:String(s)}`)}}sendStartedTelemetry(e,r){let n=Pt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r)},{});st(this.ctx,"conversationPartition.restoration.started",n,0)}sendCompletedTelemetry(e,r,n,o,s){let c=Pt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r),partitionId:String(n)},{turnCount:o,restorationTimeMs:s});st(this.ctx,"conversationPartition.restoration.completed",c,0)}sendFailedTelemetry(e,r,n,o){let s=Pt.createAndMarkAsIssued({conversationId:String(e),targetTurnId:String(r),errorCode:n},{restorationTimeMs:o});st(this.ctx,"conversationPartition.restoration.failed",s,0)}};f();f();f();var len={id:0,start_offset:0,stop_offset:0,type:"ip_code_citations",details:{},citations:{snippet:`html lang="en"> Canvas Example -<`,url:"https://github.com/duonghle285/gnoud9x.github.io/tree/c95127bc5b7a491d9223f21ac3b8c5100996e754/26062020-vehinhchunhat%2Findex.html",ip_type:"LICENSE",license:"NOASSERTION"}},dZr="Alright, This response contains a code citation.";f();var fZr=` +<`,url:"https://github.com/duonghle285/gnoud9x.github.io/tree/c95127bc5b7a491d9223f21ac3b8c5100996e754/26062020-vehinhchunhat%2Findex.html",ip_type:"LICENSE",license:"NOASSERTION"}},uen="Alright, This response contains a code citation.";f();var den=` # Should render ## Links @@ -2786,16 +2775,16 @@ Only img src/alt and a href attributes should make it to the dom. The following paragraph should not render the \`id\` attribute in the dom.

This is a paragraph with an id

-`;f();function Ofo(t,e,r){return{id:t,start_offset:e,stop_offset:r,type:"code_vulnerability",details:{type:"server-side-unvalidated-url-redirection",description:"Allows a URL to be redirected to a different URL that is specified by an external user.",ui_type:"test",ui_description:"test"}}}a(Ofo,"createVulnerability");var hZr=XEe` +`;f();function Bpo(t,e,r){return{id:t,start_offset:e,stop_offset:r,type:"code_vulnerability",details:{type:"server-side-unvalidated-url-redirection",description:"Allows a URL to be redirected to a different URL that is specified by an external user.",ui_type:"test",ui_description:"test"}}}a(Bpo,"createVulnerability");var pen=Kye` Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -`,Zqe=XEe` +`,aqe=Kye` \`\`\`kotlin fun main() { println("Hello, World!") } \`\`\` -`,Bfo=XEe` +`,Lpo=Kye` ### Inputs \`p\` - paragraph message @@ -2811,20 +2800,20 @@ The following paragraph should not render the \`id\` attribute in the dom. \`/debug.vulnerability pcc2\` - 1 paragraph followed by 2 code blocks with 2 vulnerabilities each \`/debug.vulnerability cpc3\` - 1 code block followed by 1 paragraph followed by 1 code block--each code block has 3 vulnerabilities -`,n5t=` +`,bNt=` -`,pZr=hZr+n5t+Zqe;function mZr(t){let e=1,r="",n=[];if(t.length===0)r=pZr;else if(t==="0")r=pZr,e=0;else{if(t==="help")return{reply:Bfo,vulnerabilities:[]};{let o=t.slice(-1);isNaN(Number(o))||(e=Number(o),t=t.slice(0,-1));for(let s of t)s==="p"?r+=hZr+n5t:s==="c"&&(r+=Zqe+n5t);r=r.trimEnd()}}if(e>0){let o=0,s=0;for(;;){let c=r.indexOf(Zqe,o);if(c===-1)break;let l=c+Zqe.length;for(let u=0;u0?r:"Debug Fail")}},Ufo=new i5t,o5t=class{constructor(){this.id="debug.upgrade";this.description="upgrade for debugging purposes";this.shortDescription="upgrade";this.scopes=["chat-panel"]}static{a(this,"DebugUpgradePromptTemplate")}response(e){return new bh(Ffo,{message:"",code:402,responseIsIncomplete:!0,responseIsFiltered:!1})}},Qfo=new o5t,s5t=class{constructor(){this.id="debug.notify";this.description="Notify for debugging purposes";this.shortDescription="Notify";this.scopes=["chat-panel","inline"]}static{a(this,"DebugNotificationPromptTemplate")}response(e,r){let n="warning";r.includes("info")&&(n="info");let o=r.replace("info","").replace("warning","").trim(),s=[{severity:n,message:o.length>0?o:"Debug Notification"}];return new bh("Alright, I'm producing a notification",void 0,[],s)}},qfo=new s5t,a5t=class{constructor(){this.id="debug.filter";this.description="Make the RAI filter kick in";this.shortDescription="RAI Filter";this.scopes=["chat-panel"]}static{a(this,"DebugFilterPromptTemplate")}response(e){return e.turn.status="filtered",new bh(Lfo,{message:"",responseIsFiltered:!0,responseIsIncomplete:!1})}},Gfo=new a5t,c5t=class{constructor(){this.id="debug.dump";this.description="Dump the conversation";this.shortDescription="Dump";this.scopes=["chat-panel"]}static{a(this,"DebugDumpPromptTemplate")}async response(e){return new bh(await O$r(e))}},Hfo=new c5t,l5t=class{constructor(){this.id="debug.tree";this.description="Jingle bells, jingle bells, jingle all the way";this.shortDescription="Christmas Tree";this.scopes=["chat-panel"]}static{a(this,"DebugChristmasTreePromptTemplate")}requiredSkills(){return[tw,Vg]}instructions(e,r){return"Create a function that prints a christmas tree"}},jfo=new l5t,u5t=class{constructor(){this.id="debug.echo";this.description="Echo the user message back to the user";this.shortDescription="Echo";this.scopes=["chat-panel"]}static{a(this,"DebugEchoPromptTemplate")}response(e){return new bh(dn(e.turn.request.message))}},$fo=new u5t,d5t=class{constructor(){this.id="debug.prompt";this.description="Show the prompt for the last response or generate a new one";this.shortDescription="Prompt";this.scopes=["chat-panel"]}static{a(this,"DebugPromptPromptTemplate")}response(e,r){let n=e.ctx.get(gh).getLastTurnPrompts();if(n!==void 0&&n.size>0){let o="Here are the prompts used in the last turn:";return n.forEach((s,c)=>{o+=Vo` +`,fen=pen+bNt+aqe;function hen(t){let e=1,r="",n=[];if(t.length===0)r=fen;else if(t==="0")r=fen,e=0;else{if(t==="help")return{reply:Lpo,vulnerabilities:[]};{let o=t.slice(-1);isNaN(Number(o))||(e=Number(o),t=t.slice(0,-1));for(let s of t)s==="p"?r+=pen+bNt:s==="c"&&(r+=aqe+bNt);r=r.trimEnd()}}if(e>0){let o=0,s=0;for(;;){let c=r.indexOf(aqe,o);if(c===-1)break;let l=c+aqe.length;for(let u=0;u0?r:"Debug Fail")}},Qpo=new TNt,SNt=class{constructor(){this.id="debug.upgrade";this.description="upgrade for debugging purposes";this.shortDescription="upgrade";this.scopes=["chat-panel"]}static{a(this,"DebugUpgradePromptTemplate")}response(e){return new gh(Upo,{message:"",code:402,responseIsIncomplete:!0,responseIsFiltered:!1})}},qpo=new SNt,INt=class{constructor(){this.id="debug.notify";this.description="Notify for debugging purposes";this.shortDescription="Notify";this.scopes=["chat-panel","inline"]}static{a(this,"DebugNotificationPromptTemplate")}response(e,r){let n="warning";r.includes("info")&&(n="info");let o=r.replace("info","").replace("warning","").trim(),s=[{severity:n,message:o.length>0?o:"Debug Notification"}];return new gh("Alright, I'm producing a notification",void 0,[],s)}},Gpo=new INt,xNt=class{constructor(){this.id="debug.filter";this.description="Make the RAI filter kick in";this.shortDescription="RAI Filter";this.scopes=["chat-panel"]}static{a(this,"DebugFilterPromptTemplate")}response(e){return e.turn.status="filtered",new gh(Fpo,{message:"",responseIsFiltered:!0,responseIsIncomplete:!1})}},Hpo=new xNt,wNt=class{constructor(){this.id="debug.dump";this.description="Dump the conversation";this.shortDescription="Dump";this.scopes=["chat-panel"]}static{a(this,"DebugDumpPromptTemplate")}async response(e){return new gh(await MVr(e))}},jpo=new wNt,RNt=class{constructor(){this.id="debug.tree";this.description="Jingle bells, jingle bells, jingle all the way";this.shortDescription="Christmas Tree";this.scopes=["chat-panel"]}static{a(this,"DebugChristmasTreePromptTemplate")}requiredSkills(){return[jx,Fg]}instructions(e,r){return"Create a function that prints a christmas tree"}},$po=new RNt,PNt=class{constructor(){this.id="debug.echo";this.description="Echo the user message back to the user";this.shortDescription="Echo";this.scopes=["chat-panel"]}static{a(this,"DebugEchoPromptTemplate")}response(e){return new gh(dn(e.turn.request.message))}},Vpo=new PNt,kNt=class{constructor(){this.id="debug.prompt";this.description="Show the prompt for the last response or generate a new one";this.shortDescription="Prompt";this.scopes=["chat-panel"]}static{a(this,"DebugPromptPromptTemplate")}response(e,r){let n=e.ctx.get(lh).getLastTurnPrompts();if(n!==void 0&&n.size>0){let o="Here are the prompts used in the last turn:";return n.forEach((s,c)=>{o+=Go` ### ${c} prompt \`\`\`\` ${s} \`\`\`\` - `}),new bh(o)}return new bh("No prompt available")}},Vfo=new d5t,f5t=class{constructor(){this.id="debug.skills";this.description="Resolves and displays all available skills or a single skill (id) if provided";this.shortDescription="Skills";this.scopes=["chat-panel"]}static{a(this,"DebugSkillsPromptTemplate")}async response(e,r,n){let o,s;if(r.length>0){let c=r.split(" ");o=c[0],s=c.slice(1).join(" ")}return e.turn.request.message=s??"",new bh(await B$r(e,n,o))}},Wfo=new f5t,p5t=class{constructor(){this.id="debug.vulnerability";this.description="Create a message with a vulnerability annotation";this.shortDescription="Vulnerability";this.scopes=["chat-panel"]}static{a(this,"DebugVulnerabilityPromptTemplate")}response(e,r){let{reply:n,vulnerabilities:o}=mZr(r);return e.turn.annotations.push(...o),new bh(n,void 0,e.turn.annotations)}},zfo=new p5t,h5t=class{constructor(){this.id="debug.citation";this.description="Create a message with a code citation annotation";this.shortDescription="CodeCitation";this.scopes=["chat-panel"]}static{a(this,"DebugCodeCitationPromptTemplate")}response(e){return e.turn.annotations.push(uZr),new bh(dZr,void 0,e.turn.annotations)}},Yfo=new h5t,m5t=class{constructor(){this.id="debug.markdown";this.description="Markdown rendering specification by example";this.shortDescription="Markdown";this.scopes=["chat-panel","inline"]}static{a(this,"DebugMarkdownRenderingPromptTemplate")}response(){return new bh(fZr)}},Kfo=new m5t,g5t=class{constructor(){this.id="debug.long";this.description="Generate a long response";this.shortDescription="Long";this.scopes=["chat-panel"]}static{a(this,"DebugLongPromptTemplate")}instructions(e,r){return"Write out the OWASP top 10 with code examples in java"}},Jfo=new g5t,A5t=class{constructor(){this.id="debug.project";this.description="Generate a response using the project context skill";this.shortDescription="Project";this.scopes=["chat-panel","inline"]}static{a(this,"DebugProjectContextPromptTemplate")}requiredSkills(){return[xie]}},Xfo=new A5t,y5t=class{constructor(){this.id="debug.confirmation";this.description="Generate a response with a confirmation";this.shortDescription="Confirmation";this.scopes=["chat-panel","inline"]}static{a(this,"DebugConfirmationPromptTemplate")}response(){let e={type:"action",title:"Confirmation that you want to proceed",message:"Do you want to proceed?",agentSlug:"debug.confirmation",confirmation:{answer:"yes"}};return new bh("Alright, I'm producing a notification",void 0,[],[],[],e)}},Zfo=new y5t;function gZr(){return[Ufo,Qfo,qfo,Gfo,jfo,Hfo,$fo,Vfo,Wfo,zfo,Yfo,Zfo,Kfo,Jfo,Xfo]}a(gZr,"getDebugTemplates");f();var AZr=S.Object({uri:S.String(),problems:S.Array(S.Object({message:S.String(),range:bf}))}),E5t=class{constructor(e){this.turnContext=e}static{a(this,"ProblemsInActiveDocumentSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument(e);if(await this.turnContext.collectFile(HF,e.uri,Kl(n)),n.status==="valid"){let o=r.getRelativePath(n.document);this.turnContext.collectLabel(HF,`problems in ${o}`);let s=this.getElidableProblems(e,n,o);return await this.preElideDocuments(s)}else this.turnContext.collectLabel(HF,"problem markers")}getElidableProblems(e,r,n){let o=[];return o.push(new nr([`Problems and errors in the active document (\`${n}\`):`])),o.push(...this.createElidableProblems(e,r)),CF(o,"linear")}createElidableProblems(e,r){return e.problems.map(n=>{let o=[];o.push(new nr([`- "${n.message}" at line ${n.range.start.line}.`+(r.document?" Excerpt from the code:":"")]));let s=n.range,c;if(s&&(this.isEmpty(s)?c=r.document.lineAt(s.start).text:c=r.document.getText(s),c)){let l=r.document.detectedLanguageId;o.push(new nr([["```"+l,1],[U1(c),.8],["```",1]]))}return new nr(o)})}isEmpty(e){return e.start.line===e.end.line&&e.start.character===e.end.character}async preElideDocuments(e){let r=(await $o.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=e.elide(Math.floor(r*.1)).getText();return new nr([n])}},HF="problems-in-active-document",eGe=class extends mh{static{a(this,"ProblemsInActiveDocumentSkill")}constructor(e){super(HF,"List of problems and errors in the active document, useful when the user question is about finding and fixing errors, non-functioning code, compilation issues, etc.","Analyzing problems and errors",()=>e,r=>new E5t(r),"explicit",["How can I fix the errors?","Why is my app not working?","Why am I getting compilation errors?","Raw error messages or stack traces"])}};f();f();var tGe=class{constructor(e){this.turnContext=e}static{a(this,"PromptForTestGeneration")}async fromImplementationFile(e){let r=this.turnContext.ctx.get(zr).getWorkspaceFolder(e),n=this.fileExistFn(),o=new fCe(this.turnContext.ctx,n,r?.uri),s=await o.findTestFileForSourceFile(e.uri),c=pCe(e.uri);if(s&&!c){let l=e.detectedLanguageId;if(await n(s))return await this.asTestFilePrompt(l,s);{let u=o.findExampleTestFile(e.uri);if(u)return await this.asExampleFilePrompt(l,u)}}}async fromTestFile(e){if(!pCe(e))return;let n=this.turnContext.ctx.get(zr).getWorkspaceFolder(e),o=this.fileExistFn(),c=await new fCe(this.turnContext.ctx,o,n?.uri).findImplFileForTestFile(e.uri);if(c){let l=e.detectedLanguageId;if(await o(c))return await this.asImplFilePrompt(l,c)}}async asImplFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${e0o} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async asTestFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${t0o} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async asExampleFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${r0o} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async fileInfoForPrompt(e){if(!this.turnContext.isFileIncluded(e)){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument({uri:e});if(await this.turnContext.collectFile(lw,e,Kl(n)),n.status==="valid"){let o=r.getRelativePath(n.document);return[U1(n.document.getText()),o]}}}fileExistFn(){return async e=>{try{return await this.turnContext.ctx.get(Xn).stat(e),!0}catch{return!1}}}},e0o="Code excerpt from the implementation source file",t0o="Code excerpt from the test file",r0o="Code excerpt from an example test file";var yZr=S.Object({currentFileUri:S.String(),sourceFileUri:S.Optional(S.String()),testFileUri:S.Optional(S.String())}),C5t=class{constructor(e){this.turnContext=e}static{a(this,"TestContextSkillProcessor")}value(){return .9}async processSkill(e){let r=this.turnContext.ctx.get(In),n=new tGe(this.turnContext);if(e.sourceFileUri&&e.testFileUri){if(e.sourceFileUri!==e.currentFileUri&&e.testFileUri!==e.currentFileUri)return;if(e.testFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.testFileUri});if(await this.turnContext.collectFile(lw,e.testFileUri,Kl(o)),o.status==="valid")return await n.asImplFilePrompt(o.document.detectedLanguageId,e.sourceFileUri)}else if(e.sourceFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.sourceFileUri});if(await this.turnContext.collectFile(lw,e.sourceFileUri,Kl(o)),o.status==="valid")return await n.asTestFilePrompt(o.document.detectedLanguageId,e.testFileUri)}}else if(e.sourceFileUri&&e.sourceFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.sourceFileUri});if(await this.turnContext.collectFile(lw,e.sourceFileUri,Kl(o)),o.status==="valid")return await n.fromImplementationFile(o.document)}else if(e.testFileUri&&e.testFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.testFileUri});if(await this.turnContext.collectFile(lw,e.testFileUri,Kl(o)),o.status==="valid")return await n.fromTestFile(o.document)}}},lw="test-context",rGe=class extends mh{static{a(this,"TestContextSkill")}constructor(e){super(lw,"Example tests useful for creating, adding and fixing tests, to detect available test frameworks as well as finding the corresponding implementation to existing tests","Searching test examples",()=>e,r=>new C5t(r))}};f();var EZr=S.Object({failures:S.Array(S.Object({testName:S.String(),testSuite:S.Optional(S.String()),testFileUri:S.String(),failureReason:S.Optional(S.String()),testLocation:bf}))}),_5t=class{constructor(e){this.turnContext=e}static{a(this,"TestFailuresSkillProcessor")}value(){return .9}async processSkill(e){if(e.failures.length>0){this.turnContext.collectLabel(N$,"test failures");let r=await this.createElidableFailures(e.failures);if(r){let n=new nr(["The latest test run produced the following failures and errors:"]);return new nr([[n,1],[r,1]])}}}async createElidableFailures(e){let r=this.turnContext.ctx.get(In),n=[],o=this.groupFailuresByFile(e);for(let[s,c]of o.entries()){let l=await r.getOrReadTextDocument({uri:s});if(await this.turnContext.collectFile(N$,s,Kl(l)),l.status==="valid"){let u=r.getRelativePath(l.document),d=this.createElidableFailuresOfDoc(c,u),p=this.appendCode(d,u,l.document);n.push([p,1])}}if(n.length>0)return new nr(n)}groupFailuresByFile(e){let r=new Map;for(let n of e){let o=r.get(n.testFileUri)||[];o.push(n),r.set(n.testFileUri,o)}return r}createElidableFailuresOfDoc(e,r){let n=e.map(o=>{let s=`\`${o.testName}\``,c=`${o.testSuite?` in suite \`${o.testSuite}\``:""}`,l=` in file \`${r}\` `,u=". ";o.failureReason&&(u=" with the following error:",o.failureReason.includes(` -`)?u+="\n```\n"+o.failureReason+"\n```\n":u+=` \`${o.failureReason}\`. `);let d=`${o.testLocation.start.line==o.testLocation.end.line?"on line "+o.testLocation.start.line:"between lines "+o.testLocation.start.line+" and "+o.testLocation.end.line}`;return[new nr([Vo`\n\n- Test ${s}${c}${l}failed${u}The failed test is ${d}.\n`]),1]});return new nr(n)}appendCode(e,r,n){let o=[new nr([` + `}),new gh(o)}return new gh("No prompt available")}},Wpo=new kNt,DNt=class{constructor(){this.id="debug.skills";this.description="Resolves and displays all available skills or a single skill (id) if provided";this.shortDescription="Skills";this.scopes=["chat-panel"]}static{a(this,"DebugSkillsPromptTemplate")}async response(e,r,n){let o,s;if(r.length>0){let c=r.split(" ");o=c[0],s=c.slice(1).join(" ")}return e.turn.request.message=s??"",new gh(await OVr(e,n,o))}},zpo=new DNt,NNt=class{constructor(){this.id="debug.vulnerability";this.description="Create a message with a vulnerability annotation";this.shortDescription="Vulnerability";this.scopes=["chat-panel"]}static{a(this,"DebugVulnerabilityPromptTemplate")}response(e,r){let{reply:n,vulnerabilities:o}=hen(r);return e.turn.annotations.push(...o),new gh(n,void 0,e.turn.annotations)}},Ypo=new NNt,MNt=class{constructor(){this.id="debug.citation";this.description="Create a message with a code citation annotation";this.shortDescription="CodeCitation";this.scopes=["chat-panel"]}static{a(this,"DebugCodeCitationPromptTemplate")}response(e){return e.turn.annotations.push(len),new gh(uen,void 0,e.turn.annotations)}},Kpo=new MNt,ONt=class{constructor(){this.id="debug.markdown";this.description="Markdown rendering specification by example";this.shortDescription="Markdown";this.scopes=["chat-panel","inline"]}static{a(this,"DebugMarkdownRenderingPromptTemplate")}response(){return new gh(den)}},Jpo=new ONt,BNt=class{constructor(){this.id="debug.long";this.description="Generate a long response";this.shortDescription="Long";this.scopes=["chat-panel"]}static{a(this,"DebugLongPromptTemplate")}instructions(e,r){return"Write out the OWASP top 10 with code examples in java"}},Xpo=new BNt,LNt=class{constructor(){this.id="debug.project";this.description="Generate a response using the project context skill";this.shortDescription="Project";this.scopes=["chat-panel","inline"]}static{a(this,"DebugProjectContextPromptTemplate")}requiredSkills(){return[Qne]}},Zpo=new LNt,FNt=class{constructor(){this.id="debug.confirmation";this.description="Generate a response with a confirmation";this.shortDescription="Confirmation";this.scopes=["chat-panel","inline"]}static{a(this,"DebugConfirmationPromptTemplate")}response(){let e={type:"action",title:"Confirmation that you want to proceed",message:"Do you want to proceed?",agentSlug:"debug.confirmation",confirmation:{answer:"yes"}};return new gh("Alright, I'm producing a notification",void 0,[],[],[],e)}},eho=new FNt;function men(){return[Qpo,qpo,Gpo,Hpo,$po,jpo,Vpo,Wpo,zpo,Ypo,Kpo,eho,Jpo,Xpo,Zpo]}a(men,"getDebugTemplates");f();var gen=S.Object({uri:S.String(),problems:S.Array(S.Object({message:S.String(),range:gf}))}),UNt=class{constructor(e){this.turnContext=e}static{a(this,"ProblemsInActiveDocumentSkillProcessor")}value(){return 1}async processSkill(e){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument(e);if(await this.turnContext.collectFile(gF,e.uri,Gl(n)),n.status==="valid"){let o=r.getRelativePath(n.document);this.turnContext.collectLabel(gF,`problems in ${o}`);let s=this.getElidableProblems(e,n,o);return await this.preElideDocuments(s)}else this.turnContext.collectLabel(gF,"problem markers")}getElidableProblems(e,r,n){let o=[];return o.push(new nr([`Problems and errors in the active document (\`${n}\`):`])),o.push(...this.createElidableProblems(e,r)),W6(o,"linear")}createElidableProblems(e,r){return e.problems.map(n=>{let o=[];o.push(new nr([`- "${n.message}" at line ${n.range.start.line}.`+(r.document?" Excerpt from the code:":"")]));let s=n.range,c;if(s&&(this.isEmpty(s)?c=r.document.lineAt(s.start).text:c=r.document.getText(s),c)){let l=r.document.detectedLanguageId;o.push(new nr([["```"+l,1],[I1(c),.8],["```",1]]))}return new nr(o)})}isEmpty(e){return e.start.line===e.end.line&&e.start.character===e.end.character}async preElideDocuments(e){let r=(await qo.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=e.elide(Math.floor(r*.1)).getText();return new nr([n])}},gF="problems-in-active-document",cqe=class extends ch{static{a(this,"ProblemsInActiveDocumentSkill")}constructor(e){super(gF,"List of problems and errors in the active document, useful when the user question is about finding and fixing errors, non-functioning code, compilation issues, etc.","Analyzing problems and errors",()=>e,r=>new UNt(r),"explicit",["How can I fix the errors?","Why is my app not working?","Why am I getting compilation errors?","Raw error messages or stack traces"])}};f();f();var lqe=class{constructor(e){this.turnContext=e}static{a(this,"PromptForTestGeneration")}async fromImplementationFile(e){let r=this.turnContext.ctx.get(zr).getWorkspaceFolder(e),n=this.fileExistFn(),o=new uEe(this.turnContext.ctx,n,r?.uri),s=await o.findTestFileForSourceFile(e.uri),c=dEe(e.uri);if(s&&!c){let l=e.detectedLanguageId;if(await n(s))return await this.asTestFilePrompt(l,s);{let u=o.findExampleTestFile(e.uri);if(u)return await this.asExampleFilePrompt(l,u)}}}async fromTestFile(e){if(!dEe(e))return;let n=this.turnContext.ctx.get(zr).getWorkspaceFolder(e),o=this.fileExistFn(),c=await new uEe(this.turnContext.ctx,o,n?.uri).findImplFileForTestFile(e.uri);if(c){let l=e.detectedLanguageId;if(await o(c))return await this.asImplFilePrompt(l,c)}}async asImplFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${tho} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async asTestFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${rho} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async asExampleFilePrompt(e,r){let n=await this.fileInfoForPrompt(r);if(n){let[o,s]=n;return new nr([[`${nho} \`${s}\`:`,1],["```"+e,1],[o,.9],["```",1]])}return new nr([])}async fileInfoForPrompt(e){if(!this.turnContext.isFileIncluded(e)){let r=this.turnContext.ctx.get(In),n=await r.getOrReadTextDocument({uri:e});if(await this.turnContext.collectFile(Xx,e,Gl(n)),n.status==="valid"){let o=r.getRelativePath(n.document);return[I1(n.document.getText()),o]}}}fileExistFn(){return async e=>{try{return await this.turnContext.ctx.get(Jn).stat(e),!0}catch{return!1}}}},tho="Code excerpt from the implementation source file",rho="Code excerpt from the test file",nho="Code excerpt from an example test file";var Aen=S.Object({currentFileUri:S.String(),sourceFileUri:S.Optional(S.String()),testFileUri:S.Optional(S.String())}),QNt=class{constructor(e){this.turnContext=e}static{a(this,"TestContextSkillProcessor")}value(){return .9}async processSkill(e){let r=this.turnContext.ctx.get(In),n=new lqe(this.turnContext);if(e.sourceFileUri&&e.testFileUri){if(e.sourceFileUri!==e.currentFileUri&&e.testFileUri!==e.currentFileUri)return;if(e.testFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.testFileUri});if(await this.turnContext.collectFile(Xx,e.testFileUri,Gl(o)),o.status==="valid")return await n.asImplFilePrompt(o.document.detectedLanguageId,e.sourceFileUri)}else if(e.sourceFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.sourceFileUri});if(await this.turnContext.collectFile(Xx,e.sourceFileUri,Gl(o)),o.status==="valid")return await n.asTestFilePrompt(o.document.detectedLanguageId,e.testFileUri)}}else if(e.sourceFileUri&&e.sourceFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.sourceFileUri});if(await this.turnContext.collectFile(Xx,e.sourceFileUri,Gl(o)),o.status==="valid")return await n.fromImplementationFile(o.document)}else if(e.testFileUri&&e.testFileUri===e.currentFileUri){let o=await r.getOrReadTextDocument({uri:e.testFileUri});if(await this.turnContext.collectFile(Xx,e.testFileUri,Gl(o)),o.status==="valid")return await n.fromTestFile(o.document)}}},Xx="test-context",uqe=class extends ch{static{a(this,"TestContextSkill")}constructor(e){super(Xx,"Example tests useful for creating, adding and fixing tests, to detect available test frameworks as well as finding the corresponding implementation to existing tests","Searching test examples",()=>e,r=>new QNt(r))}};f();var yen=S.Object({failures:S.Array(S.Object({testName:S.String(),testSuite:S.Optional(S.String()),testFileUri:S.String(),failureReason:S.Optional(S.String()),testLocation:gf}))}),qNt=class{constructor(e){this.turnContext=e}static{a(this,"TestFailuresSkillProcessor")}value(){return .9}async processSkill(e){if(e.failures.length>0){this.turnContext.collectLabel(Uj,"test failures");let r=await this.createElidableFailures(e.failures);if(r){let n=new nr(["The latest test run produced the following failures and errors:"]);return new nr([[n,1],[r,1]])}}}async createElidableFailures(e){let r=this.turnContext.ctx.get(In),n=[],o=this.groupFailuresByFile(e);for(let[s,c]of o.entries()){let l=await r.getOrReadTextDocument({uri:s});if(await this.turnContext.collectFile(Uj,s,Gl(l)),l.status==="valid"){let u=r.getRelativePath(l.document),d=this.createElidableFailuresOfDoc(c,u),p=this.appendCode(d,u,l.document);n.push([p,1])}}if(n.length>0)return new nr(n)}groupFailuresByFile(e){let r=new Map;for(let n of e){let o=r.get(n.testFileUri)||[];o.push(n),r.set(n.testFileUri,o)}return r}createElidableFailuresOfDoc(e,r){let n=e.map(o=>{let s=`\`${o.testName}\``,c=`${o.testSuite?` in suite \`${o.testSuite}\``:""}`,l=` in file \`${r}\` `,u=". ";o.failureReason&&(u=" with the following error:",o.failureReason.includes(` +`)?u+="\n```\n"+o.failureReason+"\n```\n":u+=` \`${o.failureReason}\`. `);let d=`${o.testLocation.start.line==o.testLocation.end.line?"on line "+o.testLocation.start.line:"between lines "+o.testLocation.start.line+" and "+o.testLocation.end.line}`;return[new nr([Go`\n\n- Test ${s}${c}${l}failed${u}The failed test is ${d}.\n`]),1]});return new nr(n)}appendCode(e,r,n){let o=[new nr([` The code of file \`${r}\` is: -`]),.6],s=[new nr([["```"+n.detectedLanguageId,1],[U1(n.getText()),.9],["```",1]]),.7];return new nr([[e,1],o,s])}},N$="test-failures",nGe=class extends mh{static{a(this,"TestFailuresSkill")}constructor(e){super(N$,"Test failures and errors of the latest test run","Collecting test failures",()=>e,r=>new _5t(r))}};var bh=class{constructor(e,r,n=[],o=[],s=[],c){this.message=e;this.error=r;this.annotations=n;this.notifications=o;this.references=s;this.confirmationRequest=c}static{a(this,"PromptTemplateResponse")}},D$=class{constructor(e,r,n,o,s=[],c=[],l,u=!1){this.id=e;this.description=r;this.shortDescription=n;this.prompt=o;this.skills=s;this.scopes=c;this.inlinePrompt=l;this.producesCodeEdits=u}static{a(this,"StaticPromptTemplate")}instructions(e,r,n="panel"){let o;return n==="inline"?o=this.inlinePrompt??this.prompt:o=this.prompt,o+` -`+r}requiredSkills(){return this.skills}},n0o=new D$("tests","Generate unit tests","Generate Tests",Vo` +`]),.6],s=[new nr([["```"+n.detectedLanguageId,1],[I1(n.getText()),.9],["```",1]]),.7];return new nr([[e,1],o,s])}},Uj="test-failures",dqe=class extends ch{static{a(this,"TestFailuresSkill")}constructor(e){super(Uj,"Test failures and errors of the latest test run","Collecting test failures",()=>e,r=>new qNt(r))}};var gh=class{constructor(e,r,n=[],o=[],s=[],c){this.message=e;this.error=r;this.annotations=n;this.notifications=o;this.references=s;this.confirmationRequest=c}static{a(this,"PromptTemplateResponse")}},Qj=class{constructor(e,r,n,o,s=[],c=[],l,u=!1){this.id=e;this.description=r;this.shortDescription=n;this.prompt=o;this.skills=s;this.scopes=c;this.inlinePrompt=l;this.producesCodeEdits=u}static{a(this,"StaticPromptTemplate")}instructions(e,r,n="panel"){let o;return n==="inline"?o=this.inlinePrompt??this.prompt:o=this.prompt,o+` +`+r}requiredSkills(){return this.skills}},iho=new Qj("tests","Generate unit tests","Generate Tests",Go` Write a set of unit tests for the code above, or for the selected code if provided. Provide tests for the functionality of the code and not the implementation details. The tests should test the happy path as well as the edge cases. @@ -2835,18 +2824,18 @@ The code of file \`${r}\` is: Follow the same test style as in existing tests if they exist. You must not create inline comments like "Arrange, Act, Assert", unless existing tests use inline comments as well. If existing tests use any mocking or stubbing libraries, use the same libraries before writing your own test doubles. - `,[lw,N$],["chat-panel","agent-panel","editor"]),i0o=new D$("simplify","Simplify the code","Simplify This",Vo` + `,[Xx,Uj],["chat-panel","agent-panel","editor"]),oho=new Qj("simplify","Simplify the code","Simplify This",Go` Provide a simplified version of the selected code above. Do not change the behavior of the code. The code should still be readable and easy to understand. Do not reply with the original code but only a simplified version. - Do only reply with one code snippet that contains the complete simplified code and explain what you have simplified after.`,[],["editor","chat-panel","agent-panel","inline","inline-agent"],Vo` + Do only reply with one code snippet that contains the complete simplified code and explain what you have simplified after.`,[],["editor","chat-panel","agent-panel","inline","inline-agent"],Go` Provide a simplified version of the selected code. Modify the selected code to make it simpler and easier to understand. Do not change the behavior of the code. Removing empty lines is not a simplification. You must not omit any code that is necessary for the code to compile and run, for example by replacing lines with ... or similar. - Do not reply with the original code but only a simplified version.`,!0),o0o=new D$("fix","Fix problems and compile errors","Fix This",Vo` + Do not reply with the original code but only a simplified version.`,!0),sho=new Qj("fix","Fix problems and compile errors","Fix This",Go` Fix the provided errors and problems. Do not invent new problems. The fixed code should still be readable and easy to understand. @@ -2857,36 +2846,36 @@ The code of file \`${r}\` is: Show how the error can be fixed by providing a code snippet that displays the code before and after it has been fixed after each group. Shorten fully qualified class names to the simple class name and full file paths to the file names only. When enumerating the groups, start with the word "Problem" followed by the number and a quick summary of the problem. Format this headline bold. - At last provide a completely fixed version of the code if the fixes required multiple code changes.`,[HF],["editor","chat-panel","agent-panel","inline","inline-agent"],Vo` + At last provide a completely fixed version of the code if the fixes required multiple code changes.`,[gF],["editor","chat-panel","agent-panel","inline","inline-agent"],Go` Fix the provided errors and problems. Do not invent new problems. The fixed code should still be readable and easy to understand. If there are no problems provided do reply that you can't detect any problems and the user should describe more precisely what they want to be fixed. Do not attempt to fix problems that are not provided, like unbalanced brackets or parentheses that are not causing errors. - Briefly explain the problems without repeating the detailed error message.`,!0),s0o=new D$("explain","Explain how the code works","Explain This",Vo` + Briefly explain the problems without repeating the detailed error message.`,!0),aho=new Qj("explain","Explain how the code works","Explain This",Go` Write an explanation for the selected code above as paragraphs of text. Include excerpts of code snippets to underline your explanation. Do not repeat the complete code. - The explanation should be easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,[],["editor","chat-panel","agent-panel","inline"],Vo` + The explanation should be easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,[],["editor","chat-panel","agent-panel","inline"],Go` Write an explanation for the code the user is selecting. Include excerpts of code snippets to underline your explanation. Do not repeat the complete code. - Keep the explanation brief and easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,!1),a0o=new D$("doc","Document the current selection or file","Generate Docs",Vo` + Keep the explanation brief and easy to understand for a developer who is familiar with the programming language used but not familiar with the code.`,!1),cho=new Qj("doc","Document the current selection or file","Generate Docs",Go` Write documentation for the selected code. If no code is explicitly selected, document the provided code in its entirety. The reply should be a codeblock containing the code with the documentation added as comments. - Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.)`,[],["editor","chat-panel","agent-panel","inline","inline-agent"],Vo` + Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.)`,[],["editor","chat-panel","agent-panel","inline","inline-agent"],Go` Add documentation to the provided code. If a specific selection is given, only document the selected code. Otherwise, document all the code provided. Modify the code by adding documentation as comments. Use the most appropriate documentation style for the programming language used (e.g. JSDoc for JavaScript, docstrings for Python etc.). - Place the comments before functions and methods, unless the language has a different convention (for example Python's docstring).`,!0),v5t=class{constructor(){this.id="feedback";this.description="Steps to provide feedback";this.shortDescription="Feedback";this.scopes=["chat-panel","agent-panel"]}static{a(this,"FeedbackPromptTemplate")}response(e){let r=B2t(e.conversation),n=Vo` + Place the comments before functions and methods, unless the language has a different convention (for example Python's docstring).`,!0),GNt=class{constructor(){this.id="feedback";this.description="Steps to provide feedback";this.shortDescription="Feedback";this.scopes=["chat-panel","agent-panel"]}static{a(this,"FeedbackPromptTemplate")}response(e){let r=rPt(e.conversation),n=Go` You can provide direct feedback by pressing the thumbs up/down buttons on a single message. In case you want to share more details, please click [here](https://aka.ms/copilot-jetbrains-feedback) to share your feedback. - `;return r?new bh(n+` + `;return r?new gh(n+` In order to help us understand your feedback better, you can include the following identifier in your feedback: by doing so, you are granting us permission to access the telemetry data associated with your feedback. \`\`\`yaml ${e.conversation.id}/${r} -\`\`\``):new bh(n)}},c0o=new v5t,b5t=class{constructor(){this.id="help";this.description="Get help on how to use Copilot chat";this.shortDescription="Help";this.scopes=["chat-panel","agent-panel"]}static{a(this,"HelpPromptTemplate")}response(e){let r=T5t(e.ctx).filter(o=>o!=this),n=Vo` +\`\`\``):new gh(n)}},lho=new GNt,HNt=class{constructor(){this.id="help";this.description="Get help on how to use Copilot chat";this.shortDescription="Help";this.scopes=["chat-panel","agent-panel"]}static{a(this,"HelpPromptTemplate")}response(e){let r=jNt(e.ctx).filter(o=>o!=this),n=Go` You can ask me general programming questions, or use one of the following commands to get help with a specific task: ${r.map(o=>`- \`/${o.id}\` - ${o.description}`).join(` @@ -2898,37 +2887,37 @@ ${e.conversation.id}/${r} - On top of files, **I take different parts of your IDE into consideration** when answering questions. This includes, but is not limited to, test results and failures, build and runtime logs, active Git repository as well as details of the open project. - **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc. - **Review my suggested code** and tell me about issues or improvements, so I can iterate on it. - `;return new bh(n)}},l0o=new b5t;function M$(){return[n0o,i0o,o0o,s0o,a0o,c0o,l0o,...gZr()]}a(M$,"getPromptTemplates");function T5t(t){let e=M$();return!Spe(t)&&!q_(t)&&(e=e.filter(r=>!r.id.startsWith("debug."))),e}a(T5t,"getUserFacingPromptTemplates");var iGe=class{constructor(e,r){this.conversation=e;this.capabilities=r}static{a(this,"ConversationHolder")}},ho=class{constructor(e){this.ctx=e;this.conversations=new $r(100)}static{a(this,"Conversations")}create({capabilities:e,source:r,userLanguage:n,conversationId:o}={}){let s=new Nj([],r??"panel",n,o),c=e?.skills??[];return e?.allSkills&&(c=this.ctx.get(A0).getDescriptors().map(l=>l.id)),this.conversations.set(s.id,new iGe(s,{skills:c})),this.initializePartitionTranscript(s),s}destroy(e){this.conversations.delete(e)}async restore(e){let{conversationId:r,targetTurnId:n,capabilities:o,source:s,userLanguage:c}=e;Ge.debug(this.ctx,`Restoring conversation: conversationId=${r}, targetTurnId=${n}`);let u=await this.ctx.get(Pk).restoreConversation(r,n);if(!u){Ge.debug(this.ctx,`Restoration returned undefined: conversationId=${r}, targetTurnId=${n}`);return}let d=new Nj(u.turns,s??"panel",c,r);d.currentPartitionId=u.partitionId;let p=o?.skills??[];return o?.allSkills&&(p=this.ctx.get(A0).getDescriptors().map(h=>h.id)),this.conversations.set(d.id,new iGe(d,{skills:p})),this.initializeRestoredPartitionTranscript(d),Ge.info(this.ctx,`Conversation restored: conversationId=${r}, partitionId=${u.partitionId}, turnCount=${u.turns.length}`),{conversation:d,partitionId:u.partitionId,turnCount:u.turns.length}}async createOrRestore(e={}){let{restoreToTurnId:r,conversationId:n,...o}=e;if(r&&n){try{let s=await this.restore({conversationId:n,targetTurnId:r,capabilities:o.capabilities,source:o.source,userLanguage:o.userLanguage});if(s)return s.conversation}catch(s){Ge.warn(this.ctx,`Failed to restore conversation: conversationId=${n}, turnId=${r}, error=${s instanceof Error?s.message:String(s)}`)}return Ge.info(this.ctx,`Creating new conversation after failed restoration: originalConversationId=${n}`),yi(this.ctx,"conversationPartition.restoration.fallbackToNew",{conversationId:String(n),targetTurnId:String(r)}),this.create(o)}return this.create(e)}initializeRestoredPartitionTranscript(e){try{let r=new vh(this.ctx);if(!r.isEnabled())return;r.initializePartition(e.id,e.currentPartitionId,{source:"restoration"}).catch(n=>{Ge.error(this.ctx,`Failed to initialize restored partition transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.ctx,`Failed to create transcript persistence for restoration: ${r instanceof Error?r.message:String(r)}`)}}async addTurn(e,r,n,o,s,c,l,u){let d=this.get(e);r.request.references=n&&n.length>0?n:[],o&&(r.request.activeEditor=o),s&&(r.workspaceFolder=s),c&&c.length>0&&(r.workspaceFolders=c),l&&l.length>0&&(r.ignoredSkills=l.map(m=>({skillId:m}))),u&&(r.agent={agentSlug:u.agentSlug},r.confirmationResponse=u);let p=n?.filter(m=>m.type==="file"&&!WX.has(Pl(m.uri).scheme)).map(m=>m.uri)??[],h=o?.uri;d.uriSchemeCache.addUris([...p,h]),await this.determineAndApplyAgent(d,r),await this.determineAndApplyTemplate(d,r),await this.determineAndApplyPromptTemplate(this.ctx,d,r),d.addTurn(r);try{await this.writeUserMessageTranscriptEvent(d,r)}catch(m){Ge.error(this.ctx,`Failed to write user message transcript event: ${m instanceof Error?m.message:String(m)}`)}return r}async writeUserMessageTranscriptEvent(e,r){let n=new vh(this.ctx);if(!n.isEnabled())return;let o=oZr(dn(r.request.message),String(r.id));await n.appendEvent(e.id,e.currentPartitionId,o)}async determineAndApplyAgent(e,r){if(e.source==="panel"&&dn(r.request.message).trim().startsWith("@")){let[n,o]=this.extractKeywordAndQuestionFromRequest(dn(r.request.message),"@");(await FT(this.ctx)).find(l=>l.slug===n)&&(r.request.message=o,r.request.type="user",r.agent={agentSlug:n})}}async determineAndApplyTemplate(e,r){if(dn(r.request.message).trim().startsWith("/")){let[n,o]=this.extractKeywordAndQuestionFromRequest(dn(r.request.message),"/"),s=M$().find(c=>c.id===n);if(s){r.request.message=o,r.request.type="user",await this.determineAndApplyAgent(e,r);let c=s.instructions?s.instructions(this.ctx,r.request.message,e.source):o;r.template={templateId:n,userQuestion:r.request.message},r.request.message=c,r.request.type="template"}}}async determineAndApplyPromptTemplate(e,r,n){if(dn(n.request.message).trim().startsWith("/")){let[o,s]=this.extractKeywordAndQuestionFromRequest(dn(n.request.message),"/"),l=await e.get(uy).getPromptTemplate(o);l&&(l.uri.startsWith(jj)?n.request.message=`Follow instructions: ${l.content} + `;return new gh(n)}},uho=new HNt;function qj(){return[iho,oho,sho,aho,cho,lho,uho,...men()]}a(qj,"getPromptTemplates");function jNt(t){let e=qj();return!U0e(t)&&!RC(t)&&(e=e.filter(r=>!r.id.startsWith("debug."))),e}a(jNt,"getUserFacingPromptTemplates");var fqe=class{constructor(e,r){this.conversation=e;this.capabilities=r}static{a(this,"ConversationHolder")}},lo=class{constructor(e){this.ctx=e;this.conversations=new $r(100)}static{a(this,"Conversations")}create({capabilities:e,source:r,userLanguage:n,conversationId:o}={}){let s=new UH([],r??"panel",n,o),c=e?.skills??[];return e?.allSkills&&(c=this.ctx.get(f0).getDescriptors().map(l=>l.id)),this.conversations.set(s.id,new fqe(s,{skills:c})),this.initializePartitionTranscript(s),s}destroy(e){this.conversations.delete(e)}async restore(e){let{conversationId:r,targetTurnId:n,capabilities:o,source:s,userLanguage:c}=e;Ge.debug(this.ctx,`Restoring conversation: conversationId=${r}, targetTurnId=${n}`);let u=await this.ctx.get(yk).restoreConversation(r,n);if(!u){Ge.debug(this.ctx,`Restoration returned undefined: conversationId=${r}, targetTurnId=${n}`);return}let d=new UH(u.turns,s??"panel",c,r);d.currentPartitionId=u.partitionId;let p=o?.skills??[];return o?.allSkills&&(p=this.ctx.get(f0).getDescriptors().map(h=>h.id)),this.conversations.set(d.id,new fqe(d,{skills:p})),this.initializeRestoredPartitionTranscript(d),Ge.info(this.ctx,`Conversation restored: conversationId=${r}, partitionId=${u.partitionId}, turnCount=${u.turns.length}`),{conversation:d,partitionId:u.partitionId,turnCount:u.turns.length}}async createOrRestore(e={}){let{restoreToTurnId:r,conversationId:n,...o}=e;if(r&&n){try{let s=await this.restore({conversationId:n,targetTurnId:r,capabilities:o.capabilities,source:o.source,userLanguage:o.userLanguage});if(s)return s.conversation}catch(s){Ge.warn(this.ctx,`Failed to restore conversation: conversationId=${n}, turnId=${r}, error=${s instanceof Error?s.message:String(s)}`)}return Ge.info(this.ctx,`Creating new conversation after failed restoration: originalConversationId=${n}`),rr(this.ctx,"conversationPartition.restoration.fallbackToNew",{conversationId:String(n),targetTurnId:String(r)}),this.create(o)}return this.create(e)}initializeRestoredPartitionTranscript(e){try{let r=new mh(this.ctx);if(!r.isEnabled())return;r.initializePartition(e.id,e.currentPartitionId,{source:"restoration"}).catch(n=>{Ge.error(this.ctx,`Failed to initialize restored partition transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.ctx,`Failed to create transcript persistence for restoration: ${r instanceof Error?r.message:String(r)}`)}}async addTurn(e,r,n,o,s,c,l,u){let d=this.get(e);r.request.references=n&&n.length>0?n:[],o&&(r.request.activeEditor=o),s&&(r.workspaceFolder=s),c&&c.length>0&&(r.workspaceFolders=c),l&&l.length>0&&(r.ignoredSkills=l.map(m=>({skillId:m}))),u&&(r.agent={agentSlug:u.agentSlug},r.confirmationResponse=u);let p=n?.filter(m=>m.type==="file"&&!eX.has(bl(m.uri).scheme)).map(m=>m.uri)??[],h=o?.uri;d.uriSchemeCache.addUris([...p,h]),await this.determineAndApplyAgent(d,r),await this.determineAndApplyTemplate(d,r),await this.determineAndApplyPromptTemplate(this.ctx,d,r),d.addTurn(r);try{await this.writeUserMessageTranscriptEvent(d,r)}catch(m){Ge.error(this.ctx,`Failed to write user message transcript event: ${m instanceof Error?m.message:String(m)}`)}return r}async writeUserMessageTranscriptEvent(e,r){let n=new mh(this.ctx);if(!n.isEnabled())return;let o=ien(dn(r.request.message),String(r.id));await n.appendEvent(e.id,e.currentPartitionId,o)}async determineAndApplyAgent(e,r){if(e.source==="panel"&&dn(r.request.message).trim().startsWith("@")){let[n,o]=this.extractKeywordAndQuestionFromRequest(dn(r.request.message),"@");(await IT(this.ctx)).find(l=>l.slug===n)&&(r.request.message=o,r.request.type="user",r.agent={agentSlug:n})}}async determineAndApplyTemplate(e,r){if(dn(r.request.message).trim().startsWith("/")){let[n,o]=this.extractKeywordAndQuestionFromRequest(dn(r.request.message),"/"),s=qj().find(c=>c.id===n);if(s){r.request.message=o,r.request.type="user",await this.determineAndApplyAgent(e,r);let c=s.instructions?s.instructions(this.ctx,r.request.message,e.source):o;r.template={templateId:n,userQuestion:r.request.message},r.request.message=c,r.request.type="template"}}}async determineAndApplyPromptTemplate(e,r,n){if(dn(n.request.message).trim().startsWith("/")){let[o,s]=this.extractKeywordAndQuestionFromRequest(dn(n.request.message),"/"),l=await e.get(ty).getPromptTemplate(o);l&&(l.uri.startsWith(JH)?n.request.message=`Follow instructions: ${l.content} -${s}`:(n.request.message=`Follow instructions in [${l.name}](${l.uri}). ${s}`,n.request.references=[...n.request.references||[],{type:"file",uri:l.uri}]))}}extractKeywordAndQuestionFromRequest(e,r){let[n,...o]=e.trim().split(" "),s=o.join(" ");return[n.replace(r,""),s]}deleteTurn(e,r){this.get(e).deleteTurn(r)}get(e){return this.getHolder(e).conversation}getCapabilities(e){return this.getHolder(e).capabilities}getSupportedSkills(e){let r=this.ctx.get(A0).getDescriptors().filter(o=>o.type==="implicit").map(o=>o.id),n=this.getCapabilities(e).skills;return[...r,...n]}filterSupportedSkills(e,r){let n=this.getSupportedSkills(e);return r.filter(o=>n.includes(o))}getHolder(e){let r=this.conversations.get(e);if(!r)throw new Error(`Conversation with id ${e} does not exist`);return r}getAll(){let e=this.conversations.values();return Array.from(e).map(r=>r.conversation)}findByTurnId(e){for(let r of this.getAll()){let n=r.findTurn(e);if(n)return{conversation:r,turn:n}}}initializePartitionTranscript(e){try{let r=new vh(this.ctx);if(!r.isEnabled())return;r.initializePartition(e.id,e.currentPartitionId,{source:e.source,createdAt:e.timestamp}).catch(n=>{Ge.error(this.ctx,`Failed to initialize partition transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.ctx,`Failed to create transcript persistence: ${r instanceof Error?r.message:String(r)}`)}}};f();var oGe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.progress=o;this.rounds=[]}static{a(this,"AgentToolCalls")}getRound(e){return this.rounds.find(r=>r.roundId===e)}getToolCallById(e){for(let r of this.rounds){let n=r.toolCalls?.find(o=>o.id===e);if(n)return n}}init(e,r,n,o,s,c){let l=this.getRound(e);if(l||(l={roundId:e,reply:""},this.rounds.push(l)),l.toolCalls?.find(d=>d.id===r))Ge.error(this.ctx,`Tool call ${r} already exists for the round ${e} in conversation ${this.conversation.id} and turn ${this.turn.id}`);else{let d={id:r,name:n,toolType:o,status:"not started",input:s,inputMessage:c};l.toolCalls=[d]}}async running(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.progressMessage=n,o.status="running"})}async finish(e,r){await this.update({roundId:e,toolCallId:r},n=>{n.status="completed"})}async result(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.status="completed",o.result=n.data,n.toolResultMessage&&(o.progressMessage=n.toolResultMessage),o.resultDetails=n.toolResultDetails,o.toolSpecificData=n.toolSpecificData})}async cancel(e,r){await this.update({roundId:e,toolCallId:r},n=>{n.status="cancelled"})}async finishAll(e="completed"){let r=this.rounds.filter(n=>{let o=n.toolCalls?.filter(s=>s.status==="running").map(s=>(s.status=e,s));if(o&&o.length>0)return n.toolCalls=o,!0});r.length>0&&await this.progress.report(this.conversation,this.turn,{editAgentRounds:r})}async error(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.status="error",o.error=n||"Unknown error"})}async updateProgressMessage(e,r,n){await this.update({roundId:e,toolCallId:r,silent:!0},o=>{o.progressMessage=n})}async update({roundId:e,toolCallId:r,silent:n=!1},o){let s=this.rounds.find(l=>l.roundId===e);s||(s={roundId:e,reply:""},this.rounds.push(s));let c=s.toolCalls?.find(l=>l.id===r);c?(o(c),n||await this.progress.report(this.conversation,this.turn,{editAgentRounds:[s]})):Ge.error(this.ctx,`Tool call ${r} not found for the agent round ${e} in conversation ${this.conversation.id} and turn ${this.turn.id}`)}};f();var sGe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.progress=o;this.steps=[]}static{a(this,"Steps")}async start(e,r,n){let o=this.steps.find(s=>s.id===e);if(!o)o={id:e,title:r,description:n,status:"running"},this.steps.push(o),await this.progress.report(this.conversation,this.turn,{steps:[o]});else throw new Error(`Step with id "${e}" already started`)}async finish(e){await this.updateStep(e,r=>{r.status="completed"})}async cancel(e){await this.updateStep(e,r=>{r.status="cancelled"})}async finishAll(e="completed"){let r=this.steps.filter(n=>n.status==="running").map(n=>(n.status=e,n));r.length>0&&await this.progress.report(this.conversation,this.turn,{steps:r})}async error(e,r){return this.updateStep(e,n=>{n.status="failed",n.error={message:r||"Unknown error"}})}async updateStep(e,r){let n=this.steps.find(o=>o.id===e);n?(r(n),await this.progress.report(this.conversation,this.turn,{steps:[n]})):Ge.error(this.ctx,`Step ${e} not found for conversation ${this.conversation.id} and turn ${this.turn.id}`)}};f();var u0o="X-Initiator",d0o="X-Interaction-ID",f0o="X-Interaction-Type";var aGe=class{static{a(this,"LlmInteractionInitiator")}static id(){throw new Error("Must be implemented by subclass")}},S5t=class extends aGe{static{a(this,"User")}static id(){return"user"}},I5t=class extends aGe{static{a(this,"Agent")}static id(){return"agent"}},x5t=class{static{a(this,"GenericLlmInteraction")}constructor(e,r,n){this.initiator=e.id(),this.interactionType=r,this.interactionId=n}toCapiHeaders(){return{[u0o]:this.initiator,[d0o]:this.interactionId,[f0o]:this.interactionType.toString()}}cloneAsAgentInteraction(e){return wm.agent(e??this.interactionType,this.interactionId)}},wm=class t extends x5t{static{a(this,"LlmInteraction")}static user(e,r){return new t(S5t,e,r)}static agent(e,r){return new t(I5t,e,r)}};function CZr(t){switch(t){case"Ask":return"conversation-panel";case"Agent":case"InlineAgent":return"conversation-agent";default:return"conversation-other"}}a(CZr,"interactionTypeForChatMode");var YT=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.cancelationToken=o;this.skillResolver=new w5t(this),this.steps=new sGe(e,r,n,e.get(Na)),this.collector=new R5t(r,n,e.get(Na)),this.agentToolCalls=new oGe(e,r,n,e.get(Na))}static{a(this,"TurnContext")}get uriSchemeCache(){return this.conversation.uriSchemeCache}setResolvedModelConfiguration(e){this.turn.resolvedModelConfiguration=e}toLlmInteraction(){if(this.turn.isSubagent()&&this.turn.parentLlmInteraction)return this.turn.parentLlmInteraction.cloneAsAgentInteraction("conversation-subagent");if(this.conversation.source==="inline")return wm.user("conversation-inline",this.turn.telemetryId);{let e=this.turn.chatMode?.kind==="Agent"?"conversation-agent":"conversation-panel";return this.agentToolCalls.rounds.length?wm.agent(e,this.turn.telemetryId):wm.user(e,this.turn.telemetryId)}}async collectFile(e,r,n,o){let s={type:"file",collector:e,uri:r,status:n};o&&(s.range=o),await this.collector.collect(s)}collectLabel(e,r){this.collector.collect({type:"label",collector:e,label:r})}isFileIncluded(e){return this.collector.collectibles.some(r=>r.type==="file"&&r.status==="included"&&r.uri===e)}async info(e){await this.sendChatNotification(e,"info")}async warn(e){await this.sendChatNotification(e,"warning")}async sendChatNotification(e,r){await this.ctx.get(Na).report(this.conversation,this.turn,{notifications:[{severity:r,message:e}]})}clearCopilotEditsSessionHeader(){this.copilotEditsSessionHeader=void 0}setCopilotEditsSessionHeader(e){this.copilotEditsSessionHeader=e}},cGe=class extends Error{constructor(r,n){super(`Cycle detected while resolving skills: ${n.join(" -> ")} -> ${r}`);this.skillId=r;this.skillStack=n}static{a(this,"CycleError")}},tCe=class extends Error{static{a(this,"ConversationAbortError")}constructor(e){super(e)}},w5t=class{constructor(e){this.turnContext=e;this.resolveStack=[]}static{a(this,"SkillResolver")}async resolve(e){if(this.turnContext.ctx.get(ho).getSupportedSkills(this.turnContext.conversation.id).includes(e)){this.ensureNoCycle(e);let n=this.turnContext.ctx.get(gh).getResolvedSkill(this.turnContext.turn.id,e);if(n)return this.resolveStack.pop(),n;let o=await this.newlyResolve(e);return this.resolveStack.pop(),o}}ensureNoCycle(e){if(this.resolveStack.includes(e))throw new cGe(e,this.resolveStack);this.resolveStack.push(e)}async newlyResolve(e){let n=this.turnContext.ctx.get(A0).getSkill(e);try{let o=await n?.resolver(this.turnContext).resolveSkill(this.turnContext);if(o)return this.turnContext.ctx.get(gh).addResolvedSkill(this.turnContext.turn.id,e,o),o}catch(o){if(o instanceof cGe||o instanceof tCe)throw o;Ge.exception(this.turnContext.ctx,o,`Error while resolving skill ${e}`)}}},R5t=class{constructor(e,r,n){this.conversation=e;this.turn=r;this.conversationProgress=n;this.collectibles=[]}static{a(this,"Collector")}async collect(e){this.collectibles.push(e),await this.reportCollectedFile(e)}async reportCollectedFile(e){e.type==="file"&&await this.conversationProgress.report(this.conversation,this.turn,{references:[{type:"file",uri:e.uri,status:e.status,range:e.range}]})}collectiblesForCollector(e){return this.collectibles.filter(r=>r.collector===e)}};f();f();f();var p0o={preTurnThreshold:.85,postToolCallThreshold:.9,enabled:!1};function _Zr(t){let e=vr(t,tt.AutoCompress);return{...p0o,enabled:e}}a(_Zr,"getAutomaticCompressionConfig");f();var jF=class t{static{a(this,"TokenBudgetEstimator")}static{this.CHARS_PER_TOKEN=4}static{this.MESSAGE_OVERHEAD_MULTIPLIER=1.15}constructor(){}estimateToolDefinitionTokens(e,r){try{let o=e.get(Po).getToolsForModel(r),s=0;for(let c of o){let l={type:"function",function:{name:c.nameForModel,description:c.description,parameters:c.inputSchema}},u=JSON.stringify(l);s+=Math.ceil(u.length/t.CHARS_PER_TOKEN)}return s}catch{return(r?.customTools?.length??0)*100}}estimateTokensFromText(e){return e?Math.ceil(e.length/t.CHARS_PER_TOKEN):0}estimateSystemMessageTokens(e){return 1500+e.baseTokensPerMessage}shouldCompressWithContextSize(e,r){let{totalTokenLimit:n,totalUsedTokens:o}=e;return!Number.isFinite(n)||n<=0?!1:o/n>=r}calculateContextSize(e,r,n){let o=this.estimateSystemMessageTokens(n),s=r.turns[r.turns.length-1],c=s?this.estimateToolDefinitionTokens(e,s.chatMode):0,l=0,u=0,d=0,p=0;for(let A of r.turns){let y=dn(A.request.message),E=this.estimateTokensFromText(y)+n.baseTokensPerMessage;if(l+=Math.ceil(E*t.MESSAGE_OVERHEAD_MULTIPLIER),A.request.references?.length&&(d+=Math.ceil(A.request.references.length*50*t.MESSAGE_OVERHEAD_MULTIPLIER)),A.response){let _=dn(A.response.message),v=this.estimateTokensFromText(_)+n.baseTokensPerMessage;if(u+=Math.ceil(v*t.MESSAGE_OVERHEAD_MULTIPLIER),Jj(A.response.message))for(let b of A.response.message){if(b.role==="tool"&&b.content){let I=typeof b.content=="string"?b.content:JSON.stringify(b.content),x=this.estimateTokensFromText(I)+n.baseTokensPerMessage;p+=Math.ceil(x*t.MESSAGE_OVERHEAD_MULTIPLIER)}if(b.thinking){let I=b.thinking;if(typeof I.tokens=="number"&&I.tokens>0)u+=I.tokens;else if(I.text!==void 0){let x=0;if(typeof I.text=="string")x=I.text.length;else if(Array.isArray(I.text))for(let R of I.text)x+=R.length;if(x>0){let R=Math.ceil(x/t.CHARS_PER_TOKEN);u+=Math.ceil(R*t.MESSAGE_OVERHEAD_MULTIPLIER)}}}}}if(A.restoredToolCalls?.length){for(let _ of A.restoredToolCalls)if(_.toolCalls?.length){for(let v of _.toolCalls)if(v.result&&Array.isArray(v.result)){let b="";for(let I of v.result)I.type==="text"?b+=I.value:I.type==="data"&&(b+=JSON.stringify(I.value));if(b){let I=this.estimateTokensFromText(b)+n.baseTokensPerMessage;p+=Math.ceil(I*t.MESSAGE_OVERHEAD_MULTIPLIER)}}}}}let h=o+c+l+u+d+p,m=n.maxRequestTokens,g=m>0?h/m*100:0;return{totalTokenLimit:m,systemPromptTokens:o,toolDefinitionTokens:c,userMessagesTokens:l,assistantMessagesTokens:u,attachedFilesTokens:d,toolResultsTokens:p,totalUsedTokens:h,utilizationPercentage:Math.min(100,Math.round(g*100)/100)}}};var yC=class{constructor(e,r,n){this.compressor=e;this.notifier=r;this.ctx=n;this.tokenEstimator=new jF}static{a(this,"AutomaticCompressionManager")}async checkAndCompress(e,r,n,o){let s=this.tokenEstimator.calculateContextSize(this.ctx,e,r),c={estimatedTokens:s.totalUsedTokens,maxTokens:s.totalTokenLimit,utilizationRatio:s.utilizationPercentage/100,turnCount:e.turns.length},l=_Zr(this.ctx);if(!l.enabled)return this.sendSkippedTelemetry(e,n,"disabled",c),{triggered:!1,tokenEstimate:c,skipReason:"disabled"};let u=n==="pre-turn"?l.preTurnThreshold:l.postToolCallThreshold;return this.tokenEstimator.shouldCompressWithContextSize(s,u)?(Ge.info(this.ctx,`Automatic compression triggered: conversationId=${e.id}, trigger=${n}, tokens=${c.estimatedTokens}/${c.maxTokens} (${(c.utilizationRatio*100).toFixed(1)}%)`),await this.performCompression(e,r,n,o,c)):(this.sendSkippedTelemetry(e,n,"below_threshold",c),{triggered:!1,tokenEstimate:c,skipReason:"below_threshold"})}async performCompression(e,r,n,o,s){let c=Date.now(),l=String(e.id),u=e.currentPartitionId,d=e.turns.length;try{await this.notifier.notifyCompressionStarted({conversationId:l,partitionId:u,reason:n});let p=await this.compressor.compressCurrentPartition(e,r,o),h=Date.now()-c;if(p.success){let m=e.turns[0],g=typeof m?.request?.message=="string"?m.request.message.length:0,A;try{A=this.tokenEstimator.calculateContextSize(this.ctx,e,r)}catch(y){Ge.warn(this.ctx,`Failed to calculate context size after compression: ${y instanceof Error?y.message:String(y)}`)}return await this.notifier.notifyCompressionCompleted({conversationId:l,archivedPartitionId:p.archivedPartitionId,newPartitionId:p.newPartitionId,summaryLength:g,turnCount:d,durationMs:h,contextInfo:A}),this.sendTriggeredTelemetry(e,n,"success",s,p,h),{triggered:!0,compressionResult:p,tokenEstimate:s}}else return Ge.error(this.ctx,`Automatic compression failed: conversationId=${l}, error=${p.error}`),this.sendTriggeredTelemetry(e,n,"failed",s,p,h),{triggered:!0,compressionResult:p,tokenEstimate:s,skipReason:"compression_failed"}}catch(p){let h=Date.now()-c,m=p instanceof Error?p.message:String(p);return Ge.exception(this.ctx,p,`Automatic compression exception: conversationId=${l}`),this.sendExceptionTelemetry(e,n,m,s,h),{triggered:!0,tokenEstimate:s,skipReason:"compression_failed"}}}sendSkippedTelemetry(e,r,n,o){let s=yt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,reason:n},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount});at(this.ctx,"automaticCompression.skipped",s,0)}sendTriggeredTelemetry(e,r,n,o,s,c){let l=yt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,outcome:n,archivedPartitionId:String(s.archivedPartitionId),newPartitionId:String(s.newPartitionId),...s.error&&{error:s.error}},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount,durationMs:c});at(this.ctx,"automaticCompression.triggered",l,0)}sendExceptionTelemetry(e,r,n,o,s){let c=yt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,outcome:"exception",error:n},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount,durationMs:s});at(this.ctx,"automaticCompression.triggered",c,0)}};f();var Rm=class extends Error{constructor(r){super(r.message);this.conversationError=r;this.name="AgentConversationError"}static{a(this,"AgentConversationError")}};f();var ku=class{constructor(e){this.ctx=e}static{a(this,"AbstractClientToolConfirmationInvoker")}};f();f();var lGe=de(bre());var vZr=new Map;function Xg(t,e){return Array.from({length:e-t+1},(r,n)=>(t+n).toString())}a(Xg,"createNumberRange");function P5t(t){return[...t].sort((e,r)=>r.length-e.length)}a(P5t,"sortByStringLengthDesc");async function h0o(t){let e=vZr.get(t);if(e)return e;let r=(async()=>{try{let n=await Cre(`tree-sitter-${t}.wasm`);return await lGe.default.Language.load(n)}catch(n){throw new Error(`Could not load tree-sitter-${t}.wasm: ${n instanceof Error?n.message:String(n)}`)}})();return vZr.set(t,r),r}a(h0o,"loadShellLanguage");function bZr(t){let r=t.replace(/\.exe$/i,"").toLowerCase().split(/[/\\]/).pop()||"";return/^(?:powershell|pwsh)(?:-preview)?$/.test(r)}a(bZr,"isPowerShell");var m0o=new Map([["sh",P5t([...Xg(1,9).concat("").map(t=>`${t}<<<`),...Xg(1,9).concat("").flatMap(t=>Xg(1,9).map(e=>`${t}>&${e}`)),...Xg(1,9).concat("").map(t=>`${t}<>`),...Xg(1,9).concat("&","").map(t=>`${t}>>`),...Xg(1,9).concat("&","").map(t=>`${t}>`),"0<","||","&&","|&","<<","&",";","{",">","<","|","%"])],["zsh",P5t([...Xg(1,9).concat("").map(t=>`${t}<<<`),...Xg(1,9).concat("").flatMap(t=>Xg(1,9).map(e=>`${t}>&${e}`)),...Xg(1,9).concat("").map(t=>`${t}<>`),...Xg(1,9).concat("&","").map(t=>`${t}>>`),...Xg(1,9).concat("&","").map(t=>`${t}>`),"<(","||",">|",">!","&&","|&","&",";","{","<","|","%"])],["pwsh",P5t([...Xg(1,6).concat("*","").flatMap(t=>Xg(1,6).map(e=>`${t}>&${e}`)),...Xg(1,6).concat("*","").map(t=>`${t}>>`),...Xg(1,6).concat("*","").map(t=>`${t}>`),"&&","<","|",";","!","&","%"])]]);function g0o(t,e){let r,n=e.replace(/\.exe$/,"");bZr(e)?r="pwsh":r=(n.split(/[/\\]/).pop()||"")==="zsh"?"zsh":"sh";let o=[t],s=m0o.get(r);if(s)for(let c of s)for(let l=0;ld.trim())),l--)}return o.filter(c=>c.trim().length>0)}a(g0o,"splitCommandLineIntoSubCommands");async function k5t(t,e){try{let r;bZr(e)?r="powershell":r="bash",await lGe.default.init();let n,o;try{n=new lGe.default;let s=await h0o(r);return n.setLanguage(s),o=n.parse(t),s.query("(command) @command").captures(o.rootNode).map(u=>u.node.text.trim()).filter(u=>u.length>0)}finally{o?.delete(),n?.delete()}}catch{return g0o(t,e)}}a(k5t,"extractSubCommandsWithTreeSitter");var A0o=new Set(["sudo","env"]),y0o=/^[A-Za-z_][A-Za-z0-9_]*=/;function TZr(t){let e=t.trim().split(/\s+/).filter(r=>r.length>0);for(let r of e){if(y0o.test(r)&&!r.startsWith("/")&&!r.startsWith(".")||A0o.has(r.toLowerCase()))continue;let n=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\")),o=n>=0?r.substring(n+1):r;return o.length>0?o:void 0}}a(TZr,"extractCommandNameFromSubCommand");var wie=new Se("CommandLineAutoApprover"),SZr=/(?!.*)/,E0o=/^[A-Z_][A-Z0-9_]*=/i,uw=class{constructor(e){this.ctx=e;this._denyListRules=[];this._allowListRules=[]}static{a(this,"CommandLineAutoApprover")}updateConfiguration(e){let{denyListRules:r,allowListRules:n}=this._mapAutoApproveConfigToRules(e);this._allowListRules=n,this._denyListRules=r}isCommandAutoApproved(e){if(E0o.test(e))return{result:"denied",reason:`Command '${e}' is denied because it contains transient environment variables`};for(let r of this._denyListRules)if(this._commandMatchesRegex(r.regex,e))return{result:"denied",reason:`Command '${e}' is denied by deny list rule: ${r.sourceText}`};for(let r of this._allowListRules)if(this._commandMatchesRegex(r.regex,e))return{result:"approved",reason:`Command '${e}' is approved by allow list rule: ${r.sourceText}`};return{result:"noMatch",reason:`Command '${e}' has no matching auto approve entries`}}async isTerminalCommandApprovalRequired(e,r){let n=await k5t(e,r);wie.info(this.ctx,`Command '${e}' is split into sub-commands: ${JSON.stringify(n)}`);let o=n.map(l=>this.isCommandAutoApproved(l)),s=o.find(l=>l.result==="denied");if(s)return wie.info(this.ctx,`Command '${e}' is denied, reason:'${s.reason}'`),s;if(o.every(l=>l.result==="approved")){let l=`Command '${e}' is approved, reason:'${o.map(u=>u.reason).join("; ")}'`;return wie.info(this.ctx,l),{result:"approved",reason:l}}let c=`Command '${e}' has no matching auto approve entries`;return wie.info(this.ctx,c),{result:"noMatch",reason:c}}async parseTerminalCommand(e,r){let n=await k5t(e,r),o=[...new Set(n.map(TZr).filter(s=>s!==void 0))];return{subCommands:n,commandNames:o}}_commandMatchesRegex(e,r){return!!e.test(r)}_mapAutoApproveConfigToRules(e){if(!e||typeof e!="object")return{denyListRules:[],allowListRules:[]};let r=[],n=[];return Object.entries(e).forEach(([o,s])=>{if(typeof s=="boolean"){let c=this._convertAutoApproveEntryToRegex(o);s===!0?n.push({regex:c,sourceText:o}):s===!1&&r.push({regex:c,sourceText:o})}else if(typeof s=="object"&&s!==null){let c=s;if(typeof c.approve=="boolean"){let l=this._convertAutoApproveEntryToRegex(o);c.approve===!0?n.push({regex:l,sourceText:o}):c.approve===!1&&r.push({regex:l,sourceText:o})}}}),wie.debug(this.ctx,"Update CommandLineAutoApprover denyListRules",r),wie.debug(this.ctx,"Update CommandLineAutoApprover allowListRules",n),{denyListRules:r,allowListRules:n}}_convertAutoApproveEntryToRegex(e){let r=e.match(/^\/(?.+)\/(?[dgimsuvy]*)$/),n=r?.groups?.pattern;if(n){let s=r.groups?.flags;s&&(s=s.replaceAll("g",""));try{let c=new RegExp(n,s||void 0);return this._regExpLeadsToEndlessLoop(c)?SZr:c}catch{return SZr}}let o=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return new RegExp(`^${o}\\b`)}_regExpLeadsToEndlessLoop(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}};f();var uGe=class{constructor(e){this.cache=new Map;this.inner=e}static{a(this,"SnapshotTextDocumentProvider")}getByUri(e){let r=this.cache.get(e);return r||(r=this.inner.getByUri(e),this.cache.set(e,r)),r}};f();var dGe=class{constructor(e){this.ctx=e}static{a(this,"DefaultTextDocumentProvider")}async getByUri(e){return await this.ctx.get(In).getOrReadTextDocument({uri:e})}};f();f();f();f();f();f();var fGe=class{constructor(e,r,n,o,s){this.event=e;this.hook=r;this.exitCode=n;this.stdout=o;this.stderr=s;this.type="command";this.output=C0o(this.stdout)}static{a(this,"CommandHookResult")}};function C0o(t){try{return t.trim().length===0?void 0:JSON.parse(t)}catch{return}}a(C0o,"parseOutput");var O5t=require("child_process");var N5t=new Se("HookExecutor"),pGe=class{constructor(){this.handlers=[new D5t,new M5t]}static{a(this,"HookExecutor")}async execute(e,r,n,o){for(let s of this.handlers)if(s.isAcceptable(n))try{return await s.handle(e,r,n,o)}catch(c){N5t.error(e,`Hook execution failed: ${c instanceof Error?c.message:String(c)}`);return}N5t.warn(e,`Unsupported hook type or platform for hook: ${JSON.stringify(n)}`)}},hGe=class{static{a(this,"CommandHookHandler")}async handle(e,r,n,o){o.cwd=n.cwd??o.cwd??process.cwd();let s=this.spawnProcess(n,o);if(!s.stdout||!s.stderr||!s.stdin)throw new Error("Failed to create child process with stdio pipes");let{stdout:c,stderr:l,stdin:u}=s,d="",p="",h=10*1024*1024;c.on("data",g=>{if(d+=g.toString(),d.length>h)throw s.kill(),new Error("Command output exceeded maximum size")}),l.on("data",g=>{if(p+=g.toString(),p.length>h)throw s.kill(),new Error("Command error output exceeded maximum size")}),u.on("error",g=>{g.code!=="EPIPE"&&N5t.warn(e,`stdin error: ${g instanceof Error?g.message:String(g)}`)});let m=JSON.stringify(o);return u.write(m),u.end(),new Promise((g,A)=>{let y=n.timeoutSec??30,E=setTimeout(()=>{s.kill("SIGTERM"),A(new Error(`Command timed out after ${y} seconds`))},y*1e3),_=a(()=>{clearTimeout(E)},"cleanup");s.on("error",v=>{_(),A(new Error(`Failed to execute command: ${v.message}`))}),s.on("close",v=>{_(),g(new fGe(r,n,v??0,d,p))})})}buildSpawnOptions(e,r){return{cwd:r.cwd,env:e.env?{...process.env,...e.env}:process.env,stdio:["pipe","pipe","pipe"]}}},D5t=class extends hGe{static{a(this,"BashCommandHookHandler")}isAcceptable(e){return process.platform!=="win32"&&e.type==="command"&&e.bash!==void 0}spawnProcess(e,r){let n={...this.buildSpawnOptions(e,r),shell:!0};return(0,O5t.spawn)(e.bash,[],n)}},M5t=class extends hGe{static{a(this,"PowerShellCommandHookHandler")}isAcceptable(e){return process.platform==="win32"&&e.type==="command"&&e.powershell!==void 0}spawnProcess(e,r){let n=this.buildSpawnOptions(e,r);return(0,O5t.spawn)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e.powershell],n)}};var _0o=new pGe,EC=class{constructor(e,r,n=[]){this.source=e;this.eventType=r;this.hooks=n}static{a(this,"HookEvent")}async fire(e,r){let n=this.hooks.map(async o=>await _0o.execute(e,this,o,r));return(await Promise.all(n)).filter(o=>o!==void 0)}};var O$=class extends EC{static{a(this,"ErrorOccurredEvent")}constructor(e,r=[]){super(e,"errorOccurred",r)}};f();var B$=class extends EC{static{a(this,"PostToolUseEvent")}constructor(e,r=[]){super(e,"postToolUse",r)}};f();var IZr={allow:"allow",deny:"deny",ask:"ask"},L$=class extends EC{static{a(this,"PreToolUseEvent")}constructor(e,r=[]){super(e,"preToolUse",r)}};f();var ZCe=class extends EC{static{a(this,"SessionEndEvent")}constructor(e,r=[]){super(e,"sessionEnd",r)}};f();var e_e=class extends EC{static{a(this,"SessionStartEvent")}constructor(e,r=[]){super(e,"sessionStart",r)}};f();var F$=class extends EC{static{a(this,"UserPromptSubmittedEvent")}constructor(e,r=[]){super(e,"userPromptSubmitted",r)}};f();var U$=class{constructor(e,r,n){this.conversation=e;this.turn=r;this.conversationProgress=n}static{a(this,"HookProgress")}async reportPlanned(e){let r=[];for(let n of e)for(let o of n.hooks)r.push({eventType:n.eventType,source:n.source,status:"planned"});r.length>0&&await this.conversationProgress.report(this.conversation,this.turn,{hookExecutions:r})}async reportResults(e){if(e.length===0)return;let r=e.map(n=>n.type!=="command"?{eventType:n.event.eventType,source:n.event.source,status:"failure"}:{eventType:n.event.eventType,source:n.event.source,status:n.exitCode===0?"success":"failure",result:{exitCode:n.exitCode,stdout:n.stdout,stderr:n.stderr}});await this.conversationProgress.report(this.conversation,this.turn,{hookExecutions:r})}};f();var v0o=".github/hooks",b0o="agentHook.execution",T0o="agentHook.event.load",kk=class{constructor(e){this.logger=new Se("HookService");this.fileEventsCache=new Map;this.editorPreviewEnabled=!1;this.ctx=e,ss(e,r=>{this.editorPreviewEnabled=r.getTokenValue("editor_preview_features")==="1"})}static{a(this,"HookService")}async hook(e,r,n,o,s){if(!this.editorPreviewEnabled)return this.logger.debug(this.ctx,"Hooks are disabled due to editor_preview_features setting."),[];let c=await this.collect(e,r,o);s&&await s(c),c.length>0&&yi(e,b0o,{eventType:c[0].eventType,eventCount:c.length.toString(),hookCount:c.reduce((u,d)=>u+d.hooks.length,0).toString()});let l=c.map(async u=>await u.fire(e,n));return(await Promise.all(l)).flat()}async loadEventsFromConfigFile(e){let r=new Map;try{let n=await this.ctx.get(Xn).readFileString(e),o=JSON.parse(n);if(o.version!==1){this.logger.warn(this.ctx,`Unsupported hooks config version: ${o.version} in ${e}`);return}if(o.hooks===void 0||typeof o.hooks!="object"){this.logger.warn(this.ctx,`Invalid or missing hooks section in config: ${e}`);return}let s=o;for(let[c,l]of Object.entries(s.hooks)){if(!this.isValidEventType(c)){this.logger.warn(this.ctx,`Invalid event type: ${c}`);continue}let u=Array.isArray(l)?l:[],d=this.parseHooks(u),p=this.createEvent(e,c,d);if(p){let h=p.constructor,m=r.get(h)??[];m.push(p),r.set(h,m)}}return yi(this.ctx,T0o,{...this.buildHookCountsByEventType([...r.values()].flat())}),r}catch(n){this.logger.debug(this.ctx,`Failed to load hooks config from ${e}:`,n);return}}async getOrLoadFileEvents(e){let r=this.fileEventsCache.get(e);try{let o=(await this.ctx.get(Xn).stat(e)).mtime;if(r&&r.mtime===o)return r.events;let s=await this.loadEventsFromConfigFile(e);return s?this.fileEventsCache.set(e,{mtime:o,events:s}):this.fileEventsCache.delete(e),s}catch{this.fileEventsCache.delete(e);return}}async loadEventsForWorkspace(e){let r=new Map,n=Ti(e.uri,v0o);try{let o=await this.ctx.get(Xn).readDirectory(n);for(let[s,c]of o)if(c===1&&s.endsWith(".json")){let l=Ti(n,s),u=await this.getOrLoadFileEvents(l);u&&u.forEach((d,p)=>{let h=r.get(p)??[];h.push(...d),r.set(p,h)})}}catch(o){this.logger.debug(this.ctx,`No hooks directory found in workspace ${e.uri}:`,o)}return r}isValidEventType(e){return["sessionStart","sessionEnd","userPromptSubmitted","preToolUse","postToolUse","errorOccurred"].includes(e)}createEvent(e,r,n){switch(r){case"sessionStart":return new e_e(e,n);case"sessionEnd":return new ZCe(e,n);case"userPromptSubmitted":return new F$(e,n);case"preToolUse":return new L$(e,n);case"postToolUse":return new B$(e,n);case"errorOccurred":return new O$(e,n);default:this.logger.warn(this.ctx,`Unknown event type: ${r}`);return}}parseHooks(e){let r=[];for(let n of e)this.isValidHook(n)?r.push(n):this.logger.warn(this.ctx,`Invalid hook configuration: ${JSON.stringify(n)}`);return r}isValidHook(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="command"&&("bash"in e&&typeof e.bash=="string"||"powershell"in e&&typeof e.powershell=="string")}buildHookCountsByEventType(e){let r={};for(let o of e){let s=`${o.eventType}.hookCount`;r[s]=(r[s]??0)+o.hooks.length}let n={};for(let[o,s]of Object.entries(r))n[o]=String(s);return n}async collect(e,r,n){return(await this.loadEventsForWorkspace(n)).get(r)??[]}};f();function Pm(t){return`[${ei(t)}](${t})`}a(Pm,"formatUriForFileWidget");function Xl(t,e){let r=S0o(t,e);if(!r)throw new Error(`Invalid input path: ${t}. Be sure to use an absolute path.`);return r}a(Xl,"resolvePathInput");function S0o(t,e){let r=e?.resolveFromCache(t);if(r)return r;let n=t.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):\/\//);if(n){let o=n[1].toLowerCase();return WX.has(o)||tm.isRegisteredScheme(o)?t:void 0}if(t.startsWith("/")||xZr()&&x0o(t)||xZr()&&t.startsWith("\\\\"))return Lc(t)}a(S0o,"resolveFsUri");function xZr(){return process.platform==="win32"}a(xZr,"isWindows");function I0o(t){return t>=65&&t<=90||t>=97&&t<=122}a(I0o,"isWindowsDriveLetter");function x0o(t){return I0o(t.charCodeAt(0))&&t.charCodeAt(1)===58}a(x0o,"hasDriveLetter");function Nk(t){let e="";return t.length>0&&(e=t.map(r=>r instanceof fr?r.value:r instanceof Wj?"":r instanceof X6?JSON.stringify(r.value):"").join(` -`)),e===""?"(empty)":e}a(Nk,"parseToolResultToString");function mGe(t){let{content:e}=t;return{message:Nk(e)}}a(mGe,"formatToolErrorResult");function wZr(t){let{content:e}=t,r={data:e.map(n=>n instanceof fr?{type:"text",value:n.value}:n instanceof Wj?{type:"text",value:""}:n instanceof X6?{type:"data",value:{mimeType:n.value.mimeType,data:n.value.data}}:{type:"text",value:""})};return t instanceof Z6&&(t.toolResultMessage!==void 0&&(r.toolResultMessage=t.toolResultMessage),t.toolResultDetails!==void 0&&(r.toolResultDetails=t.toolResultDetails),t.toolSpecificData!==void 0&&(r.toolSpecificData=t.toolSpecificData)),r}a(wZr,"formatToolSuccessResult");function Rie(t){let e=t.match(/(?:Shell:\s*)([a-zA-Z0-9._/-]+)/i);return e?e[1].replace(/[.,;!?]+$/,"").trim():null}a(Rie,"extractShellFromToolDescription");var gGe=new Se("HookTrigger"),Pie=class{constructor(e,r,n){this.ctx=e;this.conversation=r;this.workspaceFolders=n}static{a(this,"HookTrigger")}async firePreToolUseHook(e,r,n,o){try{let s=this.ctx.get(kk),c=o?new U$(this.conversation,o.turn,o.conversationProgress):void 0,l=[];for(let u of this.workspaceFolders){let d=await s.hook(this.ctx,L$,{timestamp:Date.now(),cwd:Qo(u.uri),toolName:e.configurationKey,toolArgs:JSON.stringify(r)},u,c?async p=>{u===this.workspaceFolders[0]&&await c.reportPlanned(p)}:void 0);l.push(...d)}return c&&await c.reportResults(l),this.checkPreToolUseHookResults(l)}catch(s){return gGe.error(this.ctx,`Failed to execute PreToolUse hook for tool ${e.name}`,s),{denied:!1}}}async firePostToolUseHook(e,r,n,o,s){try{let c=this.ctx.get(kk),l=s?new U$(this.conversation,s.turn,s.conversationProgress):void 0,u=[];for(let d of this.workspaceFolders){let p=await c.hook(this.ctx,B$,{timestamp:Date.now(),cwd:Qo(d.uri),toolName:e.configurationKey,toolArgs:JSON.stringify(r),toolResult:{resultType:this.toToolResultType(n.status),textResultForLlm:Nk(n.content)}},d,l?async h=>{d===this.workspaceFolders[0]&&await l.reportPlanned(h)}:void 0);u.push(...p)}l&&await l.reportResults(u)}catch(c){gGe.error(this.ctx,`Failed to execute PostToolUse hook for tool ${e.name}`,c)}}async fireUserPromptSubmittedHook(e,r){try{let n=this.ctx.get(kk),o=this.extractPromptFromMessage(e),s=r?new U$(this.conversation,r.turn,r.conversationProgress):void 0,c=[];for(let l of this.workspaceFolders){let u=await n.hook(this.ctx,F$,{timestamp:Date.now(),cwd:Qo(l.uri),prompt:o},l,s?async d=>{l===this.workspaceFolders[0]&&await s.reportPlanned(d)}:void 0);c.push(...u)}s&&await s.reportResults(c)}catch(n){gGe.error(this.ctx,"Failed to execute UserPromptSubmitted hook",n)}}async fireErrorOccurredHook(e,r){try{let n=this.ctx.get(kk),o=vr(this.ctx,tt.HookErrorOccurredStackTrace),s=r?new U$(this.conversation,r.turn,r.conversationProgress):void 0,c=[];for(let l of this.workspaceFolders){let u=await n.hook(this.ctx,O$,{timestamp:Date.now(),cwd:Qo(l.uri),error:{message:e.message,name:e.name,stack:o?e.stack:void 0}},l,s?async d=>{l===this.workspaceFolders[0]&&await s.reportPlanned(d)}:void 0);c.push(...u)}s&&await s.reportResults(c)}catch(n){gGe.error(this.ctx,"Failed to execute ErrorOccurred hook",n)}}extractPromptFromMessage(e){return typeof e=="string"?e:Array.isArray(e)?e.map(r=>typeof r=="string"?r:typeof r=="object"&&r!==null&&"content"in r&&typeof r.content=="string"?r.content:typeof r=="object"&&r!==null&&"text"in r&&typeof r.text=="string"?r.text:"").filter(Boolean).join(" "):""}checkPreToolUseHookResults(e){for(let r of e){let n=r.output;if(n&&n.permissionDecision===IZr.deny)return{denied:!0,reason:n.permissionDecisionReason||"Tool execution denied by hook"}}return{denied:!1}}toToolResultType(e){switch(e){case"success":return"success";case"error":return"failure";case"cancelled":return"denied";default:return"failure"}}};f();f();var B5t=class{static{a(this,"TurnMetadata")}toString(){return this.constructor.name}},t_e=class extends B5t{constructor(r){super();this.renderedGlobalContext=r}static{a(this,"GlobalContextMessageMetadata")}};f();f();var Q$=de(po());var Rn=class t extends Q$.PromptElement{static{a(this,"Tag")}static{this._regex=/^[a-zA-Z_][\w.-]*$/}render(){let{name:e,children:r,attrs:n={}}=this.props;if(!t._regex.test(e))throw new Error(`Invalid tag name: ${this.props.name}. Tag names must start with a letter or underscore, and can contain letters, digits, underscores, hyphens, or periods.`);let o="";for(let[c,l]of Object.entries(n))l!==void 0&&(o+=` ${c}=${JSON.stringify(l)}`);if(r?.length===0)return o?vscpp(Q$.TextChunk,null,vscpp(vscppf,null,`<${e}${o} />`)):void 0;let s=(0,Q$.useKeepWith)();return vscpp(vscppf,null,vscpp(s,null,vscpp(vscppf,null,`<${e}${o}> -`)),vscpp(L5t,{priority:1,flexGrow:1},r,vscpp("br",null)),vscpp(s,null,vscpp(vscppf,null,``)),vscpp("br",null))}},L5t=class extends Q$.PromptElement{static{a(this,"TagInner")}render(){return vscpp(vscppf,null,this.props.children)}};function RZr(){return vscpp(Rn,{name:"modeInstructions"},'You are currently running in "Ask" mode. Below are your instructions for this mode, they must take precedence over any instructions above.',vscpp("br",null),vscpp("br",null),"You are an ASK AGENT \u2014 a knowledgeable assistant that answers questions, explains code, and provides information.",vscpp("br",null),vscpp("br",null),"You are strictly read-only: NEVER modify files or run commands that change state.",vscpp("br",null),vscpp("br",null),vscpp(Rn,{name:"rules"},"- NEVER use file editing tools, terminal commands that modify state, or any write operations",vscpp("br",null),"- Focus on answering questions, explaining concepts, and providing information",vscpp("br",null),"- Use search and read tools to gather context from the codebase when needed",vscpp("br",null),"- Provide code examples in your responses when helpful, but do NOT apply them",vscpp("br",null),"- When the user's question is about code, reference specific files and symbols",vscpp("br",null),"- If a question would require making changes, explain what changes would be needed but do NOT make them",vscpp("br",null),"- SKIP a plan when: The task is simple and direct. Breaking it down would only produce literal or trivial steps.",vscpp("br",null),"- Keep your response focused and proportional to the question. Don't over-explain simple concepts unless the user asks for more detail."),vscpp("br",null),vscpp(Rn,{name:"capabilities"},"You can help with:",vscpp("br",null),"- **Code explanation**: How does this code work? What does this function do?",vscpp("br",null),"- **Architecture questions**: How is the project structured? How do components interact?",vscpp("br",null),"- **Debugging guidance**: Why might this error occur? What could cause this behavior?",vscpp("br",null),"- **Best practices**: What's the recommended approach for X? How should I structure Y?",vscpp("br",null),"- **API and library questions**: How do I use this API? What does this method expect?",vscpp("br",null),"- **Codebase navigation**: Where is X defined? Where is Y used?",vscpp("br",null),"- **General programming**: Language features, algorithms, design patterns, etc."),vscpp("br",null),vscpp(Rn,{name:"workflow"},"1. **Understand** the question \u2014 identify what the user needs to know",vscpp("br",null),"2. **Research** the codebase if needed \u2014 use search and read tools to find relevant code",vscpp("br",null),"3. **Answer** clearly \u2014 provide a well-structured response with references to relevant code"))}a(RZr,"renderAskModeInstructionBody");f();f();var kie=class extends Zt{static{a(this,"UserOSPrompt")}renderCopilot(e,r,n,o){let s=process.platform;return vscpp(vscppf,null,"The user's current OS is: ",s==="win32"?"Windows":s==="darwin"?"macOS":s==="linux"?"Linux":"Unknown")}};f();var AGe=class extends Zt{static{a(this,"UserPreferences")}renderCopilot(e,r,n,o){return vscpp(vscppf,null)}};f();var PZr=require("path");var yGe=class extends Zt{static{a(this,"UserShellPrompt")}renderCopilot(e,r,n,o){let s=this.getUserShell(),c=(0,PZr.basename)(s),l=c==="powershell.exe"?" (Windows PowerShell v5.1)":"",u="";return c==="powershell.exe"&&(u=" Use the `;` character if joining commands on a single line is needed."),vscpp(vscppf,null,`The user's default shell is: "`,c,'"',l,". When you generate terminal commands, please generate them correctly for this shell.",u)}getUserShell(){let n=this.props.ctx.get(Po).getToolsForModel().find(o=>o.name==="run_in_terminal"||o.nameForModel==="run_in_terminal");if(n){let o=Rie(n.description);if(o)return o}if(process.env.SHELL)return process.env.SHELL;switch(process.platform){case"win32":return process.env.ComSpec||"cmd.exe";case"darwin":case"linux":return"/bin/bash";default:return"sh"}}};f();var Nie=class extends Zt{static{a(this,"WorkspaceFoldersHint")}renderCopilot(e,r,n,o){if(this.props.workspaceFolders&&this.props.workspaceFolders.length>0){let s=this.props.workspaceFolders.map(c=>` - ${Eo(c.uri)}`).join(` -`);return vscpp(vscppf,null,"I am working in a workspace with the following folders:",vscpp("br",null),s)}else return vscpp(vscppf,null,"There is no workspace currently open.")}};f();f();f();function kZr(t){return t.reduce((r,n)=>r+n.value.length,0)+Math.max(0,t.length-1)}a(kZr,"partsLength");async function DZr(t,e=1/0,r){let n=NZr(0,t,e),o=e-kZr(n);for(;;){let s=!1,c=[];for(let l of n)if(l.type==="text")c.push(l);else if(l.type==="dir"){c.push({type:"text",uri:l.uri,value:l.value});let u=await l.getChildren();if(r?.isCancellationRequested)return w0o();let d=NZr(l.level+1,u,o-1);d.length&&(s=!0,o-=kZr(d)+1,c.push(...d))}if(n=c,!s)break}return{files:n.map(s=>s.uri).filter(s=>s!==void 0),tree:n.map(s=>s.value).join(` -`)}}a(DZr,"visualFileTree");function NZr(t,e,r){let n=" ".repeat(t),o=[],s=r;for(let c=0;cs){let d=n+"...";for(;d.length>s&&o.length>0;)s+=o.pop().value.length+1;d.length<=s&&o.push({type:"text",uri:void 0,value:d});break}l.type===2?o.push({type:"dir",uri:l.uri,level:t,value:u,getChildren:l.getChildren}):o.push({type:"text",uri:l.uri,value:u}),s-=u.length,c!==e.length-1&&(s-=1)}return o}a(NZr,"toParts");var w0o=a(()=>({tree:"",files:[]}),"emptyTree");var R0o=new Se("fileReferencesPrompt");async function MZr(t,e,r,n){let o=await OZr(t,e,r,n);if(!o.length)return"";let s="";for(let{label:l,uri:u,tree:d}of o){s+=`${l} (Absolute Path: ${Qo(u)})/ +${s}`:(n.request.message=`Follow instructions in [${l.name}](${l.uri}). ${s}`,n.request.references=[...n.request.references||[],{type:"file",uri:l.uri}]))}}extractKeywordAndQuestionFromRequest(e,r){let[n,...o]=e.trim().split(" "),s=o.join(" ");return[n.replace(r,""),s]}deleteTurn(e,r){this.get(e).deleteTurn(r)}get(e){return this.getHolder(e).conversation}getCapabilities(e){return this.getHolder(e).capabilities}getSupportedSkills(e){let r=this.ctx.get(f0).getDescriptors().filter(o=>o.type==="implicit").map(o=>o.id),n=this.getCapabilities(e).skills;return[...r,...n]}filterSupportedSkills(e,r){let n=this.getSupportedSkills(e);return r.filter(o=>n.includes(o))}getHolder(e){let r=this.conversations.get(e);if(!r)throw new Error(`Conversation with id ${e} does not exist`);return r}getAll(){let e=this.conversations.values();return Array.from(e).map(r=>r.conversation)}findByTurnId(e){for(let r of this.getAll()){let n=r.findTurn(e);if(n)return{conversation:r,turn:n}}}initializePartitionTranscript(e){try{let r=new mh(this.ctx);if(!r.isEnabled())return;r.initializePartition(e.id,e.currentPartitionId,{source:e.source,createdAt:e.timestamp}).catch(n=>{Ge.error(this.ctx,`Failed to initialize partition transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.ctx,`Failed to create transcript persistence: ${r instanceof Error?r.message:String(r)}`)}}};f();var pqe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.progress=o;this.rounds=[]}static{a(this,"AgentToolCalls")}getRound(e){return this.rounds.find(r=>r.roundId===e)}getToolCallById(e){for(let r of this.rounds){let n=r.toolCalls?.find(o=>o.id===e);if(n)return n}}init(e,r,n,o,s,c){let l=this.getRound(e);if(l||(l={roundId:e,reply:""},this.rounds.push(l)),l.toolCalls?.find(d=>d.id===r))Ge.error(this.ctx,`Tool call ${r} already exists for the round ${e} in conversation ${this.conversation.id} and turn ${this.turn.id}`);else{let d={id:r,name:n,toolType:o,status:"not started",input:s,inputMessage:c};l.toolCalls=[d]}}async running(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.progressMessage=n,o.status="running"})}async finish(e,r){await this.update({roundId:e,toolCallId:r},n=>{n.status="completed"})}async result(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.status="completed",o.result=n.data,n.toolResultMessage&&(o.progressMessage=n.toolResultMessage),o.resultDetails=n.toolResultDetails,o.toolSpecificData=n.toolSpecificData})}async cancel(e,r){await this.update({roundId:e,toolCallId:r},n=>{n.status="cancelled"})}async finishAll(e="completed"){let r=this.rounds.filter(n=>{let o=n.toolCalls?.filter(s=>s.status==="running").map(s=>(s.status=e,s));if(o&&o.length>0)return n.toolCalls=o,!0});r.length>0&&await this.progress.report(this.conversation,this.turn,{editAgentRounds:r})}async error(e,r,n){await this.update({roundId:e,toolCallId:r},o=>{o.status="error",o.error=n||"Unknown error"})}async updateProgressMessage(e,r,n){await this.update({roundId:e,toolCallId:r,silent:!0},o=>{o.progressMessage=n})}async update({roundId:e,toolCallId:r,silent:n=!1},o){let s=this.rounds.find(l=>l.roundId===e);s||(s={roundId:e,reply:""},this.rounds.push(s));let c=s.toolCalls?.find(l=>l.id===r);c?(o(c),n||await this.progress.report(this.conversation,this.turn,{editAgentRounds:[s]})):Ge.error(this.ctx,`Tool call ${r} not found for the agent round ${e} in conversation ${this.conversation.id} and turn ${this.turn.id}`)}};f();var hqe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.progress=o;this.steps=[]}static{a(this,"Steps")}async start(e,r,n){let o=this.steps.find(s=>s.id===e);if(!o)o={id:e,title:r,description:n,status:"running"},this.steps.push(o),await this.progress.report(this.conversation,this.turn,{steps:[o]});else throw new Error(`Step with id "${e}" already started`)}async finish(e){await this.updateStep(e,r=>{r.status="completed"})}async cancel(e){await this.updateStep(e,r=>{r.status="cancelled"})}async finishAll(e="completed"){let r=this.steps.filter(n=>n.status==="running").map(n=>(n.status=e,n));r.length>0&&await this.progress.report(this.conversation,this.turn,{steps:r})}async error(e,r){return this.updateStep(e,n=>{n.status="failed",n.error={message:r||"Unknown error"}})}async updateStep(e,r){let n=this.steps.find(o=>o.id===e);n?(r(n),await this.progress.report(this.conversation,this.turn,{steps:[n]})):Ge.error(this.ctx,`Step ${e} not found for conversation ${this.conversation.id} and turn ${this.turn.id}`)}};f();var dho="X-Initiator",fho="X-Interaction-ID",pho="X-Interaction-Type";var mqe=class{static{a(this,"LlmInteractionInitiator")}static id(){throw new Error("Must be implemented by subclass")}},$Nt=class extends mqe{static{a(this,"User")}static id(){return"user"}},VNt=class extends mqe{static{a(this,"Agent")}static id(){return"agent"}},WNt=class{static{a(this,"GenericLlmInteraction")}constructor(e,r,n){this.initiator=e.id(),this.interactionType=r,this.interactionId=n}toCapiHeaders(){return{[dho]:this.initiator,[fho]:this.interactionId,[pho]:this.interactionType.toString()}}cloneAsAgentInteraction(e){return ym.agent(e??this.interactionType,this.interactionId)}},ym=class t extends WNt{static{a(this,"LlmInteraction")}static user(e,r){return new t($Nt,e,r)}static agent(e,r){return new t(VNt,e,r)}};function Een(t){switch(t){case"Ask":return"conversation-panel";case"Agent":case"InlineAgent":return"conversation-agent";default:return"conversation-other"}}a(Een,"interactionTypeForChatMode");var LT=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.cancelationToken=o;this.skillResolver=new zNt(this),this.steps=new hqe(e,r,n,e.get(xa)),this.collector=new YNt(r,n,e.get(xa)),this.agentToolCalls=new pqe(e,r,n,e.get(xa))}static{a(this,"TurnContext")}get uriSchemeCache(){return this.conversation.uriSchemeCache}setResolvedModelConfiguration(e){this.turn.resolvedModelConfiguration=e}toLlmInteraction(){if(this.turn.isSubagent()&&this.turn.parentLlmInteraction)return this.turn.parentLlmInteraction.cloneAsAgentInteraction("conversation-subagent");if(this.conversation.source==="inline")return ym.user("conversation-inline",this.turn.telemetryId);{let e=this.turn.chatMode?.kind==="Agent"?"conversation-agent":"conversation-panel";return this.agentToolCalls.rounds.length?ym.agent(e,this.turn.telemetryId):ym.user(e,this.turn.telemetryId)}}async collectFile(e,r,n,o){let s={type:"file",collector:e,uri:r,status:n};o&&(s.range=o),await this.collector.collect(s)}collectLabel(e,r){this.collector.collect({type:"label",collector:e,label:r})}isFileIncluded(e){return this.collector.collectibles.some(r=>r.type==="file"&&r.status==="included"&&r.uri===e)}async info(e){await this.sendChatNotification(e,"info")}async warn(e){await this.sendChatNotification(e,"warning")}async sendChatNotification(e,r){await this.ctx.get(xa).report(this.conversation,this.turn,{notifications:[{severity:r,message:e}]})}clearCopilotEditsSessionHeader(){this.copilotEditsSessionHeader=void 0}setCopilotEditsSessionHeader(e){this.copilotEditsSessionHeader=e}},gqe=class extends Error{constructor(r,n){super(`Cycle detected while resolving skills: ${n.join(" -> ")} -> ${r}`);this.skillId=r;this.skillStack=n}static{a(this,"CycleError")}},Zye=class extends Error{static{a(this,"ConversationAbortError")}constructor(e){super(e)}},zNt=class{constructor(e){this.turnContext=e;this.resolveStack=[]}static{a(this,"SkillResolver")}async resolve(e){if(this.turnContext.ctx.get(lo).getSupportedSkills(this.turnContext.conversation.id).includes(e)){this.ensureNoCycle(e);let n=this.turnContext.ctx.get(lh).getResolvedSkill(this.turnContext.turn.id,e);if(n)return this.resolveStack.pop(),n;let o=await this.newlyResolve(e);return this.resolveStack.pop(),o}}ensureNoCycle(e){if(this.resolveStack.includes(e))throw new gqe(e,this.resolveStack);this.resolveStack.push(e)}async newlyResolve(e){let n=this.turnContext.ctx.get(f0).getSkill(e);try{let o=await n?.resolver(this.turnContext).resolveSkill(this.turnContext);if(o)return this.turnContext.ctx.get(lh).addResolvedSkill(this.turnContext.turn.id,e,o),o}catch(o){if(o instanceof gqe||o instanceof Zye)throw o;Ge.exception(this.turnContext.ctx,o,`Error while resolving skill ${e}`)}}},YNt=class{constructor(e,r,n){this.conversation=e;this.turn=r;this.conversationProgress=n;this.collectibles=[]}static{a(this,"Collector")}async collect(e){this.collectibles.push(e),await this.reportCollectedFile(e)}async reportCollectedFile(e){e.type==="file"&&await this.conversationProgress.report(this.conversation,this.turn,{references:[{type:"file",uri:e.uri,status:e.status,range:e.range}]})}collectiblesForCollector(e){return this.collectibles.filter(r=>r.collector===e)}};f();f();f();var hho={preTurnThreshold:.85,postToolCallThreshold:.9,enabled:!1};function _en(t){let e=vr(t,tt.AutoCompress);return{...hho,enabled:e}}a(_en,"getAutomaticCompressionConfig");f();var AF=class t{static{a(this,"TokenBudgetEstimator")}static{this.CHARS_PER_TOKEN=4}static{this.MESSAGE_OVERHEAD_MULTIPLIER=1.15}constructor(){}estimateToolDefinitionTokens(e,r){try{let o=e.get(Io).getToolsForModel(r),s=0;for(let c of o){let l={type:"function",function:{name:c.nameForModel,description:c.description,parameters:c.inputSchema}},u=JSON.stringify(l);s+=Math.ceil(u.length/t.CHARS_PER_TOKEN)}return s}catch{return(r?.customTools?.length??0)*100}}estimateTokensFromText(e){return e?Math.ceil(e.length/t.CHARS_PER_TOKEN):0}estimateSystemMessageTokens(e){return 1500+e.baseTokensPerMessage}shouldCompressWithContextSize(e,r){let{totalTokenLimit:n,totalUsedTokens:o}=e;return!Number.isFinite(n)||n<=0?!1:o/n>=r}calculateContextSize(e,r,n){let o=this.estimateSystemMessageTokens(n),s=r.turns[r.turns.length-1],c=s?this.estimateToolDefinitionTokens(e,s.chatMode):0,l=0,u=0,d=0,p=0;for(let A of r.turns){let y=dn(A.request.message),E=this.estimateTokensFromText(y)+n.baseTokensPerMessage;if(l+=Math.ceil(E*t.MESSAGE_OVERHEAD_MULTIPLIER),A.request.references?.length&&(d+=Math.ceil(A.request.references.length*50*t.MESSAGE_OVERHEAD_MULTIPLIER)),A.response){let _=dn(A.response.message),v=this.estimateTokensFromText(_)+n.baseTokensPerMessage;if(u+=Math.ceil(v*t.MESSAGE_OVERHEAD_MULTIPLIER),ij(A.response.message))for(let b of A.response.message){if(b.role==="tool"&&b.content){let I=typeof b.content=="string"?b.content:JSON.stringify(b.content),x=this.estimateTokensFromText(I)+n.baseTokensPerMessage;p+=Math.ceil(x*t.MESSAGE_OVERHEAD_MULTIPLIER)}if(b.thinking){let I=b.thinking;if(typeof I.tokens=="number"&&I.tokens>0)u+=I.tokens;else if(I.text!==void 0){let x=0;if(typeof I.text=="string")x=I.text.length;else if(Array.isArray(I.text))for(let w of I.text)x+=w.length;if(x>0){let w=Math.ceil(x/t.CHARS_PER_TOKEN);u+=Math.ceil(w*t.MESSAGE_OVERHEAD_MULTIPLIER)}}}}}if(A.restoredToolCalls?.length){for(let _ of A.restoredToolCalls)if(_.toolCalls?.length){for(let v of _.toolCalls)if(v.result&&Array.isArray(v.result)){let b="";for(let I of v.result)I.type==="text"?b+=I.value:I.type==="data"&&(b+=JSON.stringify(I.value));if(b){let I=this.estimateTokensFromText(b)+n.baseTokensPerMessage;p+=Math.ceil(I*t.MESSAGE_OVERHEAD_MULTIPLIER)}}}}}let h=o+c+l+u+d+p,m=n.maxRequestTokens,g=m>0?h/m*100:0;return{totalTokenLimit:m,systemPromptTokens:o,toolDefinitionTokens:c,userMessagesTokens:l,assistantMessagesTokens:u,attachedFilesTokens:d,toolResultsTokens:p,totalUsedTokens:h,utilizationPercentage:Math.min(100,Math.round(g*100)/100)}}};var s_=class{constructor(e,r,n){this.compressor=e;this.notifier=r;this.ctx=n;this.tokenEstimator=new AF}static{a(this,"AutomaticCompressionManager")}async checkAndCompress(e,r,n,o){let s=this.tokenEstimator.calculateContextSize(this.ctx,e,r),c={estimatedTokens:s.totalUsedTokens,maxTokens:s.totalTokenLimit,utilizationRatio:s.utilizationPercentage/100,turnCount:e.turns.length},l=_en(this.ctx);if(!l.enabled)return this.sendSkippedTelemetry(e,n,"disabled",c),{triggered:!1,tokenEstimate:c,skipReason:"disabled"};let u=n==="pre-turn"?l.preTurnThreshold:l.postToolCallThreshold;return this.tokenEstimator.shouldCompressWithContextSize(s,u)?(Ge.info(this.ctx,`Automatic compression triggered: conversationId=${e.id}, trigger=${n}, tokens=${c.estimatedTokens}/${c.maxTokens} (${(c.utilizationRatio*100).toFixed(1)}%)`),await this.performCompression(e,r,n,o,c)):(this.sendSkippedTelemetry(e,n,"below_threshold",c),{triggered:!1,tokenEstimate:c,skipReason:"below_threshold"})}async performCompression(e,r,n,o,s){let c=Date.now(),l=String(e.id),u=e.currentPartitionId,d=e.turns.length;try{await this.notifier.notifyCompressionStarted({conversationId:l,partitionId:u,reason:n});let p=await this.compressor.compressCurrentPartition(e,r,o),h=Date.now()-c;if(p.success){let m=e.turns[0],g=typeof m?.request?.message=="string"?m.request.message.length:0,A;try{A=this.tokenEstimator.calculateContextSize(this.ctx,e,r)}catch(y){Ge.warn(this.ctx,`Failed to calculate context size after compression: ${y instanceof Error?y.message:String(y)}`)}return await this.notifier.notifyCompressionCompleted({conversationId:l,archivedPartitionId:p.archivedPartitionId,newPartitionId:p.newPartitionId,summaryLength:g,turnCount:d,durationMs:h,contextInfo:A}),this.sendTriggeredTelemetry(e,n,"success",s,p,h),{triggered:!0,compressionResult:p,tokenEstimate:s}}else return Ge.error(this.ctx,`Automatic compression failed: conversationId=${l}, error=${p.error}`),this.sendTriggeredTelemetry(e,n,"failed",s,p,h),{triggered:!0,compressionResult:p,tokenEstimate:s,skipReason:"compression_failed"}}catch(p){let h=Date.now()-c,m=p instanceof Error?p.message:String(p);return Ge.exception(this.ctx,p,`Automatic compression exception: conversationId=${l}`),this.sendExceptionTelemetry(e,n,m,s,h),{triggered:!0,tokenEstimate:s,skipReason:"compression_failed"}}}sendSkippedTelemetry(e,r,n,o){let s=Pt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,reason:n},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount});st(this.ctx,"automaticCompression.skipped",s,0)}sendTriggeredTelemetry(e,r,n,o,s,c){let l=Pt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,outcome:n,archivedPartitionId:String(s.archivedPartitionId),newPartitionId:String(s.newPartitionId),...s.error&&{error:s.error}},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount,durationMs:c});st(this.ctx,"automaticCompression.triggered",l,0)}sendExceptionTelemetry(e,r,n,o,s){let c=Pt.createAndMarkAsIssued({conversationId:String(e.id),trigger:r,outcome:"exception",error:n},{estimatedTokens:o.estimatedTokens,maxTokens:o.maxTokens,utilizationRatio:o.utilizationRatio,turnCount:o.turnCount,durationMs:s});st(this.ctx,"automaticCompression.triggered",c,0)}};f();var Em=class extends Error{constructor(r){super(r.message);this.conversationError=r;this.name="AgentConversationError"}static{a(this,"AgentConversationError")}};f();var Cu=class{constructor(e){this.ctx=e}static{a(this,"AbstractClientToolConfirmationInvoker")}};f();f();var Aqe=de(Fte());var Cen=new Map;function jg(t,e){return Array.from({length:e-t+1},(r,n)=>(t+n).toString())}a(jg,"createNumberRange");function KNt(t){return[...t].sort((e,r)=>r.length-e.length)}a(KNt,"sortByStringLengthDesc");async function mho(t){let e=Cen.get(t);if(e)return e;let r=(async()=>{try{let n=await Ote(`tree-sitter-${t}.wasm`);return await Aqe.default.Language.load(n)}catch(n){throw new Error(`Could not load tree-sitter-${t}.wasm: ${n instanceof Error?n.message:String(n)}`)}})();return Cen.set(t,r),r}a(mho,"loadShellLanguage");function ven(t){let r=t.replace(/\.exe$/i,"").toLowerCase().split(/[/\\]/).pop()||"";return/^(?:powershell|pwsh)(?:-preview)?$/.test(r)}a(ven,"isPowerShell");var gho=new Map([["sh",KNt([...jg(1,9).concat("").map(t=>`${t}<<<`),...jg(1,9).concat("").flatMap(t=>jg(1,9).map(e=>`${t}>&${e}`)),...jg(1,9).concat("").map(t=>`${t}<>`),...jg(1,9).concat("&","").map(t=>`${t}>>`),...jg(1,9).concat("&","").map(t=>`${t}>`),"0<","||","&&","|&","<<","&",";","{",">","<","|","%"])],["zsh",KNt([...jg(1,9).concat("").map(t=>`${t}<<<`),...jg(1,9).concat("").flatMap(t=>jg(1,9).map(e=>`${t}>&${e}`)),...jg(1,9).concat("").map(t=>`${t}<>`),...jg(1,9).concat("&","").map(t=>`${t}>>`),...jg(1,9).concat("&","").map(t=>`${t}>`),"<(","||",">|",">!","&&","|&","&",";","{","<","|","%"])],["pwsh",KNt([...jg(1,6).concat("*","").flatMap(t=>jg(1,6).map(e=>`${t}>&${e}`)),...jg(1,6).concat("*","").map(t=>`${t}>>`),...jg(1,6).concat("*","").map(t=>`${t}>`),"&&","<","|",";","!","&","%"])]]);function Aho(t,e){let r,n=e.replace(/\.exe$/,"");ven(e)?r="pwsh":r=(n.split(/[/\\]/).pop()||"")==="zsh"?"zsh":"sh";let o=[t],s=gho.get(r);if(s)for(let c of s)for(let l=0;ld.trim())),l--)}return o.filter(c=>c.trim().length>0)}a(Aho,"splitCommandLineIntoSubCommands");async function JNt(t,e){try{let r;ven(e)?r="powershell":r="bash",await Aqe.default.init();let n,o;try{n=new Aqe.default;let s=await mho(r);return n.setLanguage(s),o=n.parse(t),s.query("(command) @command").captures(o.rootNode).map(u=>u.node.text.trim()).filter(u=>u.length>0)}finally{o?.delete(),n?.delete()}}catch{return Aho(t,e)}}a(JNt,"extractSubCommandsWithTreeSitter");var yho=new Set(["sudo","env"]),Eho=/^[A-Za-z_][A-Za-z0-9_]*=/;function ben(t){let e=t.trim().split(/\s+/).filter(r=>r.length>0);for(let r of e){if(Eho.test(r)&&!r.startsWith("/")&&!r.startsWith(".")||yho.has(r.toLowerCase()))continue;let n=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\")),o=n>=0?r.substring(n+1):r;return o.length>0?o:void 0}}a(ben,"extractCommandNameFromSubCommand");var qne=new Se("CommandLineAutoApprover"),Ten=/(?!.*)/,_ho=/^[A-Z_][A-Z0-9_]*=/i,Zx=class{constructor(e){this.ctx=e;this._denyListRules=[];this._allowListRules=[]}static{a(this,"CommandLineAutoApprover")}updateConfiguration(e){let{denyListRules:r,allowListRules:n}=this._mapAutoApproveConfigToRules(e);this._allowListRules=n,this._denyListRules=r}isCommandAutoApproved(e){if(_ho.test(e))return{result:"denied",reason:`Command '${e}' is denied because it contains transient environment variables`};for(let r of this._denyListRules)if(this._commandMatchesRegex(r.regex,e))return{result:"denied",reason:`Command '${e}' is denied by deny list rule: ${r.sourceText}`};for(let r of this._allowListRules)if(this._commandMatchesRegex(r.regex,e))return{result:"approved",reason:`Command '${e}' is approved by allow list rule: ${r.sourceText}`};return{result:"noMatch",reason:`Command '${e}' has no matching auto approve entries`}}async isTerminalCommandApprovalRequired(e,r){let n=await JNt(e,r);qne.info(this.ctx,`Command '${e}' is split into sub-commands: ${JSON.stringify(n)}`);let o=n.map(l=>this.isCommandAutoApproved(l)),s=o.find(l=>l.result==="denied");if(s)return qne.info(this.ctx,`Command '${e}' is denied, reason:'${s.reason}'`),s;if(o.every(l=>l.result==="approved")){let l=`Command '${e}' is approved, reason:'${o.map(u=>u.reason).join("; ")}'`;return qne.info(this.ctx,l),{result:"approved",reason:l}}let c=`Command '${e}' has no matching auto approve entries`;return qne.info(this.ctx,c),{result:"noMatch",reason:c}}async parseTerminalCommand(e,r){let n=await JNt(e,r),o=[...new Set(n.map(ben).filter(s=>s!==void 0))];return{subCommands:n,commandNames:o}}_commandMatchesRegex(e,r){return!!e.test(r)}_mapAutoApproveConfigToRules(e){if(!e||typeof e!="object")return{denyListRules:[],allowListRules:[]};let r=[],n=[];return Object.entries(e).forEach(([o,s])=>{if(typeof s=="boolean"){let c=this._convertAutoApproveEntryToRegex(o);s===!0?n.push({regex:c,sourceText:o}):s===!1&&r.push({regex:c,sourceText:o})}else if(typeof s=="object"&&s!==null){let c=s;if(typeof c.approve=="boolean"){let l=this._convertAutoApproveEntryToRegex(o);c.approve===!0?n.push({regex:l,sourceText:o}):c.approve===!1&&r.push({regex:l,sourceText:o})}}}),qne.debug(this.ctx,"Update CommandLineAutoApprover denyListRules",r),qne.debug(this.ctx,"Update CommandLineAutoApprover allowListRules",n),{denyListRules:r,allowListRules:n}}_convertAutoApproveEntryToRegex(e){let r=e.match(/^\/(?.+)\/(?[dgimsuvy]*)$/),n=r?.groups?.pattern;if(n){let s=r.groups?.flags;s&&(s=s.replaceAll("g",""));try{let c=new RegExp(n,s||void 0);return this._regExpLeadsToEndlessLoop(c)?Ten:c}catch{return Ten}}let o=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return new RegExp(`^${o}\\b`)}_regExpLeadsToEndlessLoop(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}};f();var yqe=class{constructor(e){this.cache=new Map;this.inner=e}static{a(this,"SnapshotTextDocumentProvider")}getByUri(e){let r=this.cache.get(e);return r||(r=this.inner.getByUri(e),this.cache.set(e,r)),r}};f();var Eqe=class{constructor(e){this.ctx=e}static{a(this,"DefaultTextDocumentProvider")}async getByUri(e){return await this.ctx.get(In).getOrReadTextDocument({uri:e})}};f();f();f();f();f();f();var _qe=class{constructor(e,r,n,o,s){this.event=e;this.hook=r;this.exitCode=n;this.stdout=o;this.stderr=s;this.type="command";this.output=Cho(this.stdout)}static{a(this,"CommandHookResult")}};function Cho(t){try{return t.trim().length===0?void 0:JSON.parse(t)}catch{return}}a(Cho,"parseOutput");var tMt=require("child_process");var XNt=new Se("HookExecutor"),Cqe=class{constructor(){this.handlers=[new ZNt,new eMt]}static{a(this,"HookExecutor")}async execute(e,r,n,o){for(let s of this.handlers)if(s.isAcceptable(n))try{return await s.handle(e,r,n,o)}catch(c){XNt.error(e,`Hook execution failed: ${c instanceof Error?c.message:String(c)}`);return}XNt.warn(e,`Unsupported hook type or platform for hook: ${JSON.stringify(n)}`)}},vqe=class{static{a(this,"CommandHookHandler")}async handle(e,r,n,o){o.cwd=n.cwd??o.cwd??process.cwd();let s=this.spawnProcess(n,o);if(!s.stdout||!s.stderr||!s.stdin)throw new Error("Failed to create child process with stdio pipes");let{stdout:c,stderr:l,stdin:u}=s,d="",p="",h=10*1024*1024;c.on("data",g=>{if(d+=g.toString(),d.length>h)throw s.kill(),new Error("Command output exceeded maximum size")}),l.on("data",g=>{if(p+=g.toString(),p.length>h)throw s.kill(),new Error("Command error output exceeded maximum size")}),u.on("error",g=>{g.code!=="EPIPE"&&XNt.warn(e,`stdin error: ${g instanceof Error?g.message:String(g)}`)});let m=JSON.stringify(o);return u.write(m),u.end(),new Promise((g,A)=>{let y=n.timeoutSec??30,E=setTimeout(()=>{s.kill("SIGTERM"),A(new Error(`Command timed out after ${y} seconds`))},y*1e3),_=a(()=>{clearTimeout(E)},"cleanup");s.on("error",v=>{_(),A(new Error(`Failed to execute command: ${v.message}`))}),s.on("close",v=>{_(),g(new _qe(r,n,v??0,d,p))})})}buildSpawnOptions(e,r){return{cwd:r.cwd,env:e.env?{...process.env,...e.env}:process.env,stdio:["pipe","pipe","pipe"]}}},ZNt=class extends vqe{static{a(this,"BashCommandHookHandler")}isAcceptable(e){return process.platform!=="win32"&&e.type==="command"&&e.bash!==void 0}spawnProcess(e,r){let n={...this.buildSpawnOptions(e,r),shell:!0};return(0,tMt.spawn)(e.bash,[],n)}},eMt=class extends vqe{static{a(this,"PowerShellCommandHookHandler")}isAcceptable(e){return process.platform==="win32"&&e.type==="command"&&e.powershell!==void 0}spawnProcess(e,r){let n=this.buildSpawnOptions(e,r);return(0,tMt.spawn)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e.powershell],n)}};var vho=new Cqe,a_=class{constructor(e,r,n=[]){this.source=e;this.eventType=r;this.hooks=n}static{a(this,"HookEvent")}async fire(e,r){let n=this.hooks.map(async o=>await vho.execute(e,this,o,r));return(await Promise.all(n)).filter(o=>o!==void 0)}};var Gj=class extends a_{static{a(this,"ErrorOccurredEvent")}constructor(e,r=[]){super(e,"errorOccurred",r)}};f();var Hj=class extends a_{static{a(this,"PostToolUseEvent")}constructor(e,r=[]){super(e,"postToolUse",r)}};f();var Sen={allow:"allow",deny:"deny",ask:"ask"},jj=class extends a_{static{a(this,"PreToolUseEvent")}constructor(e,r=[]){super(e,"preToolUse",r)}};f();var JEe=class extends a_{static{a(this,"SessionEndEvent")}constructor(e,r=[]){super(e,"sessionEnd",r)}};f();var XEe=class extends a_{static{a(this,"SessionStartEvent")}constructor(e,r=[]){super(e,"sessionStart",r)}};f();var $j=class extends a_{static{a(this,"UserPromptSubmittedEvent")}constructor(e,r=[]){super(e,"userPromptSubmitted",r)}};f();var Vj=class{constructor(e,r,n){this.conversation=e;this.turn=r;this.conversationProgress=n}static{a(this,"HookProgress")}async reportPlanned(e){let r=[];for(let n of e)for(let o of n.hooks)r.push({eventType:n.eventType,source:n.source,status:"planned"});r.length>0&&await this.conversationProgress.report(this.conversation,this.turn,{hookExecutions:r})}async reportResults(e){if(e.length===0)return;let r=e.map(n=>n.type!=="command"?{eventType:n.event.eventType,source:n.event.source,status:"failure"}:{eventType:n.event.eventType,source:n.event.source,status:n.exitCode===0?"success":"failure",result:{exitCode:n.exitCode,stdout:n.stdout,stderr:n.stderr}});await this.conversationProgress.report(this.conversation,this.turn,{hookExecutions:r})}};f();var bho=".github/hooks",Tho="agentHook.execution",Sho="agentHook.event.load",Ek=class{constructor(e){this.logger=new Se("HookService");this.fileEventsCache=new Map;this.editorPreviewEnabled=!1;this.ctx=e,Ps(e,r=>{this.editorPreviewEnabled=r.getTokenValue("editor_preview_features")==="1"})}static{a(this,"HookService")}async hook(e,r,n,o,s){if(!this.editorPreviewEnabled)return this.logger.debug(this.ctx,"Hooks are disabled due to editor_preview_features setting."),[];let c=await this.collect(e,r,o);s&&await s(c),c.length>0&&rr(e,Tho,{eventType:c[0].eventType,eventCount:c.length.toString(),hookCount:c.reduce((u,d)=>u+d.hooks.length,0).toString()});let l=c.map(async u=>await u.fire(e,n));return(await Promise.all(l)).flat()}async loadEventsFromConfigFile(e){let r=new Map;try{let n=await this.ctx.get(Jn).readFileString(e),o=JSON.parse(n);if(o.version!==1){this.logger.warn(this.ctx,`Unsupported hooks config version: ${o.version} in ${e}`);return}if(o.hooks===void 0||typeof o.hooks!="object"){this.logger.warn(this.ctx,`Invalid or missing hooks section in config: ${e}`);return}let s=o;for(let[c,l]of Object.entries(s.hooks)){if(!this.isValidEventType(c)){this.logger.warn(this.ctx,`Invalid event type: ${c}`);continue}let u=Array.isArray(l)?l:[],d=this.parseHooks(u),p=this.createEvent(e,c,d);if(p){let h=p.constructor,m=r.get(h)??[];m.push(p),r.set(h,m)}}return rr(this.ctx,Sho,{...this.buildHookCountsByEventType([...r.values()].flat())}),r}catch(n){this.logger.debug(this.ctx,`Failed to load hooks config from ${e}:`,n);return}}async getOrLoadFileEvents(e){let r=this.fileEventsCache.get(e);try{let o=(await this.ctx.get(Jn).stat(e)).mtime;if(r&&r.mtime===o)return r.events;let s=await this.loadEventsFromConfigFile(e);return s?this.fileEventsCache.set(e,{mtime:o,events:s}):this.fileEventsCache.delete(e),s}catch{this.fileEventsCache.delete(e);return}}async loadEventsForWorkspace(e){let r=new Map,n=bi(e.uri,bho);try{let o=await this.ctx.get(Jn).readDirectory(n);for(let[s,c]of o)if(c===1&&s.endsWith(".json")){let l=bi(n,s),u=await this.getOrLoadFileEvents(l);u&&u.forEach((d,p)=>{let h=r.get(p)??[];h.push(...d),r.set(p,h)})}}catch(o){this.logger.debug(this.ctx,`No hooks directory found in workspace ${e.uri}:`,o)}return r}isValidEventType(e){return["sessionStart","sessionEnd","userPromptSubmitted","preToolUse","postToolUse","errorOccurred"].includes(e)}createEvent(e,r,n){switch(r){case"sessionStart":return new XEe(e,n);case"sessionEnd":return new JEe(e,n);case"userPromptSubmitted":return new $j(e,n);case"preToolUse":return new jj(e,n);case"postToolUse":return new Hj(e,n);case"errorOccurred":return new Gj(e,n);default:this.logger.warn(this.ctx,`Unknown event type: ${r}`);return}}parseHooks(e){let r=[];for(let n of e)this.isValidHook(n)?r.push(n):this.logger.warn(this.ctx,`Invalid hook configuration: ${JSON.stringify(n)}`);return r}isValidHook(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="command"&&("bash"in e&&typeof e.bash=="string"||"powershell"in e&&typeof e.powershell=="string")}buildHookCountsByEventType(e){let r={};for(let o of e){let s=`${o.eventType}.hookCount`;r[s]=(r[s]??0)+o.hooks.length}let n={};for(let[o,s]of Object.entries(r))n[o]=String(s);return n}async collect(e,r,n){return(await this.loadEventsForWorkspace(n)).get(r)??[]}};f();function _m(t){return`[${Zn(t)}](${t})`}a(_m,"formatUriForFileWidget");function jl(t,e){let r=Iho(t,e);if(!r)throw new Error(`Invalid input path: ${t}. Be sure to use an absolute path.`);return r}a(jl,"resolvePathInput");function Iho(t,e){let r=e?.resolveFromCache(t);if(r)return r;let n=t.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):\/\//);if(n){let o=n[1].toLowerCase();return eX.has(o)||zh.isRegisteredScheme(o)?t:void 0}if(t.startsWith("/")||Ien()&&who(t)||Ien()&&t.startsWith("\\\\"))return kc(t)}a(Iho,"resolveFsUri");function Ien(){return process.platform==="win32"}a(Ien,"isWindows");function xho(t){return t>=65&&t<=90||t>=97&&t<=122}a(xho,"isWindowsDriveLetter");function who(t){return xho(t.charCodeAt(0))&&t.charCodeAt(1)===58}a(who,"hasDriveLetter");function _k(t){let e="";return t.length>0&&(e=t.map(r=>r instanceof fr?r.value:r instanceof ej?"":r instanceof S6?JSON.stringify(r.value):"").join(` +`)),e===""?"(empty)":e}a(_k,"parseToolResultToString");function bqe(t){let{content:e}=t;return{message:_k(e)}}a(bqe,"formatToolErrorResult");function xen(t){let{content:e}=t,r={data:e.map(n=>n instanceof fr?{type:"text",value:n.value}:n instanceof ej?{type:"text",value:""}:n instanceof S6?{type:"data",value:{mimeType:n.value.mimeType,data:n.value.data}}:{type:"text",value:""})};return t instanceof I6&&(t.toolResultMessage!==void 0&&(r.toolResultMessage=t.toolResultMessage),t.toolResultDetails!==void 0&&(r.toolResultDetails=t.toolResultDetails),t.toolSpecificData!==void 0&&(r.toolSpecificData=t.toolSpecificData)),r}a(xen,"formatToolSuccessResult");function Gne(t){let e=t.match(/(?:Shell:\s*)([a-zA-Z0-9._/-]+)/i);return e?e[1].replace(/[.,;!?]+$/,"").trim():null}a(Gne,"extractShellFromToolDescription");var Tqe=new Se("HookTrigger"),Hne=class{constructor(e,r,n){this.ctx=e;this.conversation=r;this.workspaceFolders=n}static{a(this,"HookTrigger")}async firePreToolUseHook(e,r,n,o){try{let s=this.ctx.get(Ek),c=o?new Vj(this.conversation,o.turn,o.conversationProgress):void 0,l=[];for(let u of this.workspaceFolders){let d=await s.hook(this.ctx,jj,{timestamp:Date.now(),cwd:Bo(u.uri),toolName:e.configurationKey,toolArgs:JSON.stringify(r)},u,c?async p=>{u===this.workspaceFolders[0]&&await c.reportPlanned(p)}:void 0);l.push(...d)}return c&&await c.reportResults(l),this.checkPreToolUseHookResults(l)}catch(s){return Tqe.error(this.ctx,`Failed to execute PreToolUse hook for tool ${e.name}`,s),{denied:!1}}}async firePostToolUseHook(e,r,n,o,s){try{let c=this.ctx.get(Ek),l=s?new Vj(this.conversation,s.turn,s.conversationProgress):void 0,u=[];for(let d of this.workspaceFolders){let p=await c.hook(this.ctx,Hj,{timestamp:Date.now(),cwd:Bo(d.uri),toolName:e.configurationKey,toolArgs:JSON.stringify(r),toolResult:{resultType:this.toToolResultType(n.status),textResultForLlm:_k(n.content)}},d,l?async h=>{d===this.workspaceFolders[0]&&await l.reportPlanned(h)}:void 0);u.push(...p)}l&&await l.reportResults(u)}catch(c){Tqe.error(this.ctx,`Failed to execute PostToolUse hook for tool ${e.name}`,c)}}async fireUserPromptSubmittedHook(e,r){try{let n=this.ctx.get(Ek),o=this.extractPromptFromMessage(e),s=r?new Vj(this.conversation,r.turn,r.conversationProgress):void 0,c=[];for(let l of this.workspaceFolders){let u=await n.hook(this.ctx,$j,{timestamp:Date.now(),cwd:Bo(l.uri),prompt:o},l,s?async d=>{l===this.workspaceFolders[0]&&await s.reportPlanned(d)}:void 0);c.push(...u)}s&&await s.reportResults(c)}catch(n){Tqe.error(this.ctx,"Failed to execute UserPromptSubmitted hook",n)}}async fireErrorOccurredHook(e,r){try{let n=this.ctx.get(Ek),o=vr(this.ctx,tt.HookErrorOccurredStackTrace),s=r?new Vj(this.conversation,r.turn,r.conversationProgress):void 0,c=[];for(let l of this.workspaceFolders){let u=await n.hook(this.ctx,Gj,{timestamp:Date.now(),cwd:Bo(l.uri),error:{message:e.message,name:e.name,stack:o?e.stack:void 0}},l,s?async d=>{l===this.workspaceFolders[0]&&await s.reportPlanned(d)}:void 0);c.push(...u)}s&&await s.reportResults(c)}catch(n){Tqe.error(this.ctx,"Failed to execute ErrorOccurred hook",n)}}extractPromptFromMessage(e){return typeof e=="string"?e:Array.isArray(e)?e.map(r=>typeof r=="string"?r:typeof r=="object"&&r!==null&&"content"in r&&typeof r.content=="string"?r.content:typeof r=="object"&&r!==null&&"text"in r&&typeof r.text=="string"?r.text:"").filter(Boolean).join(" "):""}checkPreToolUseHookResults(e){for(let r of e){let n=r.output;if(n&&n.permissionDecision===Sen.deny)return{denied:!0,reason:n.permissionDecisionReason||"Tool execution denied by hook"}}return{denied:!1}}toToolResultType(e){switch(e){case"success":return"success";case"error":return"failure";case"cancelled":return"denied";default:return"failure"}}};f();f();var rMt=class{static{a(this,"TurnMetadata")}toString(){return this.constructor.name}},ZEe=class extends rMt{constructor(r){super();this.renderedGlobalContext=r}static{a(this,"GlobalContextMessageMetadata")}};f();f();var Wj=de(co());var Rn=class t extends Wj.PromptElement{static{a(this,"Tag")}static{this._regex=/^[a-zA-Z_][\w.-]*$/}render(){let{name:e,children:r,attrs:n={}}=this.props;if(!t._regex.test(e))throw new Error(`Invalid tag name: ${this.props.name}. Tag names must start with a letter or underscore, and can contain letters, digits, underscores, hyphens, or periods.`);let o="";for(let[c,l]of Object.entries(n))l!==void 0&&(o+=` ${c}=${JSON.stringify(l)}`);if(r?.length===0)return o?vscpp(Wj.TextChunk,null,vscpp(vscppf,null,`<${e}${o} />`)):void 0;let s=(0,Wj.useKeepWith)();return vscpp(vscppf,null,vscpp(s,null,vscpp(vscppf,null,`<${e}${o}> +`)),vscpp(nMt,{priority:1,flexGrow:1},r,vscpp("br",null)),vscpp(s,null,vscpp(vscppf,null,``)),vscpp("br",null))}},nMt=class extends Wj.PromptElement{static{a(this,"TagInner")}render(){return vscpp(vscppf,null,this.props.children)}};function wen(){return vscpp(Rn,{name:"modeInstructions"},'You are currently running in "Ask" mode. Below are your instructions for this mode, they must take precedence over any instructions above.',vscpp("br",null),vscpp("br",null),"You are an ASK AGENT \u2014 a knowledgeable assistant that answers questions, explains code, and provides information.",vscpp("br",null),vscpp("br",null),"You are strictly read-only: NEVER modify files or run commands that change state.",vscpp("br",null),vscpp("br",null),vscpp(Rn,{name:"rules"},"- NEVER use file editing tools, terminal commands that modify state, or any write operations",vscpp("br",null),"- Focus on answering questions, explaining concepts, and providing information",vscpp("br",null),"- Use search and read tools to gather context from the codebase when needed",vscpp("br",null),"- Provide code examples in your responses when helpful, but do NOT apply them",vscpp("br",null),"- When the user's question is about code, reference specific files and symbols",vscpp("br",null),"- If a question would require making changes, explain what changes would be needed but do NOT make them",vscpp("br",null),"- SKIP a plan when: The task is simple and direct. Breaking it down would only produce literal or trivial steps.",vscpp("br",null),"- Keep your response focused and proportional to the question. Don't over-explain simple concepts unless the user asks for more detail."),vscpp("br",null),vscpp(Rn,{name:"capabilities"},"You can help with:",vscpp("br",null),"- **Code explanation**: How does this code work? What does this function do?",vscpp("br",null),"- **Architecture questions**: How is the project structured? How do components interact?",vscpp("br",null),"- **Debugging guidance**: Why might this error occur? What could cause this behavior?",vscpp("br",null),"- **Best practices**: What's the recommended approach for X? How should I structure Y?",vscpp("br",null),"- **API and library questions**: How do I use this API? What does this method expect?",vscpp("br",null),"- **Codebase navigation**: Where is X defined? Where is Y used?",vscpp("br",null),"- **General programming**: Language features, algorithms, design patterns, etc."),vscpp("br",null),vscpp(Rn,{name:"workflow"},"1. **Understand** the question \u2014 identify what the user needs to know",vscpp("br",null),"2. **Research** the codebase if needed \u2014 use search and read tools to find relevant code",vscpp("br",null),"3. **Answer** clearly \u2014 provide a well-structured response with references to relevant code"))}a(wen,"renderAskModeInstructionBody");f();f();var jne=class extends Xt{static{a(this,"UserOSPrompt")}renderCopilot(e,r,n,o){let s=process.platform;return vscpp(vscppf,null,"The user's current OS is: ",s==="win32"?"Windows":s==="darwin"?"macOS":s==="linux"?"Linux":"Unknown")}};f();var Sqe=class extends Xt{static{a(this,"UserPreferences")}renderCopilot(e,r,n,o){return vscpp(vscppf,null)}};f();var Ren=require("path");var Iqe=class extends Xt{static{a(this,"UserShellPrompt")}renderCopilot(e,r,n,o){let s=this.getUserShell(),c=(0,Ren.basename)(s),l=c==="powershell.exe"?" (Windows PowerShell v5.1)":"",u="";return c==="powershell.exe"&&(u=" Use the `;` character if joining commands on a single line is needed."),vscpp(vscppf,null,`The user's default shell is: "`,c,'"',l,". When you generate terminal commands, please generate them correctly for this shell.",u)}getUserShell(){let n=this.props.ctx.get(Io).getToolsForModel().find(o=>o.name==="run_in_terminal"||o.nameForModel==="run_in_terminal");if(n){let o=Gne(n.description);if(o)return o}if(process.env.SHELL)return process.env.SHELL;switch(process.platform){case"win32":return process.env.ComSpec||"cmd.exe";case"darwin":case"linux":return"/bin/bash";default:return"sh"}}};f();var $ne=class extends Xt{static{a(this,"WorkspaceFoldersHint")}renderCopilot(e,r,n,o){if(this.props.workspaceFolders&&this.props.workspaceFolders.length>0){let s=this.props.workspaceFolders.map(c=>` - ${mo(c.uri)}`).join(` +`);return vscpp(vscppf,null,"I am working in a workspace with the following folders:",vscpp("br",null),s)}else return vscpp(vscppf,null,"There is no workspace currently open.")}};f();f();f();function Pen(t){return t.reduce((r,n)=>r+n.value.length,0)+Math.max(0,t.length-1)}a(Pen,"partsLength");async function Den(t,e=1/0,r){let n=ken(0,t,e),o=e-Pen(n);for(;;){let s=!1,c=[];for(let l of n)if(l.type==="text")c.push(l);else if(l.type==="dir"){c.push({type:"text",uri:l.uri,value:l.value});let u=await l.getChildren();if(r?.isCancellationRequested)return Rho();let d=ken(l.level+1,u,o-1);d.length&&(s=!0,o-=Pen(d)+1,c.push(...d))}if(n=c,!s)break}return{files:n.map(s=>s.uri).filter(s=>s!==void 0),tree:n.map(s=>s.value).join(` +`)}}a(Den,"visualFileTree");function ken(t,e,r){let n=" ".repeat(t),o=[],s=r;for(let c=0;cs){let d=n+"...";for(;d.length>s&&o.length>0;)s+=o.pop().value.length+1;d.length<=s&&o.push({type:"text",uri:void 0,value:d});break}l.type===2?o.push({type:"dir",uri:l.uri,level:t,value:u,getChildren:l.getChildren}):o.push({type:"text",uri:l.uri,value:u}),s-=u.length,c!==e.length-1&&(s-=1)}return o}a(ken,"toParts");var Rho=a(()=>({tree:"",files:[]}),"emptyTree");var Pho=new Se("fileReferencesPrompt");async function Nen(t,e,r,n){let o=await Men(t,e,r,n);if(!o.length)return"";let s="";for(let{label:l,uri:u,tree:d}of o){s+=`${l} (Absolute Path: ${Bo(u)})/ `;for(let p of d.tree.split(` `))s+=` ${p} -`}let c=Sm(s);return["I am working in a workspace that has the following structure:",c,s,c,"This view of the workspace structure may be truncated. You can use tools to collect more context if needed."].join(` -`)}a(MZr,"generateWorkspaceStructurePrompt");async function OZr(t,e,r,n){return e.length?Promise.all(e.map(async o=>{let s=o.name,c=o.uri,l=await DZr(await BZr(t,o.uri,r,n),r.maxLength/e.length,n);return{label:s,uri:c,tree:l}})):[]}a(OZr,"generateWorkspaceStructure");async function BZr(t,e,r,n){if(n.isCancellationRequested)return[];let o;try{o=await t.get(Xn).readDirectory(e)}catch{return[]}return n.isCancellationRequested?[]:(o.sort((s,c)=>s[1]===c[1]?s[0].localeCompare(c[0]):s[1]&2?1:-1),Promise.all(o.map(([s,c])=>{let l=Ti(e,s);return r.excludeDotFiles&&s.startsWith(".")||N0o(l)?null:c&2?{type:2,uri:l,name:s,getChildren:a(()=>BZr(t,l,r,n),"getChildren")}:{type:1,uri:l,name:s}})).then(s=>s.filter(c=>c!=null)))}a(BZr,"buildFileList");var P0o=["node_modules","venv","out","dist",".git",".yarn",".npm",".venv","foo.asar",".vscode-test"],k0o=[".ds_store","thumbs.db","package-lock.json","yarn.lock",".cache"];function N0o(t){return!!(k0o.includes(ei(t).toLowerCase())||Eo(t)?.toLowerCase()?.split(/[/\\]/g)?.some(r=>P0o.includes(r)))}a(N0o,"shouldAlwaysIgnoreFile");async function EGe(t,e,r){if(r.length===0)return[];try{let n=r.map(c=>({uri:c.uri,name:ei(c.uri)})),o=await OZr(t,n,{maxLength:2e3,excludeDotFiles:!0},e),s=[];for(let{label:c,uri:l,tree:u}of o)s.push(""),s.push(`Directory: ${c} (${Qo(l)})`),s.push(u.tree),s.push("");return s}catch(n){return R0o.warn(t,`Failed to generate directory structure: ${String(n)}`),[]}}a(EGe,"processDirectoryReferences");var CGe=class extends Zt{static{a(this,"WorkspaceStructure")}async renderCopilot(e,r,n,o){if(!this.props.workspaceFolders)return vscpp(vscppf,null);let s=await MZr(this.props.ctx,this.props.workspaceFolders,{maxLength:this.props.maxSize||2e3,excludeDotFiles:this.props.excludeDotFiles??!0},o||_n.CancellationToken.None);return s?vscpp(vscppf,null,s):vscpp(vscppf,null)}};var LZr=de(po());var r_e=class extends Zt{static{a(this,"GlobalAgentContext")}renderCopilot(e,r,n,o){return vscpp(LZr.UserMessage,null,vscpp(Rn,{name:"environment_info"},vscpp(kie,{ctx:this.props.ctx}),vscpp(yGe,{ctx:this.props.ctx})),vscpp(Rn,{name:"workspace_info"},vscpp(Nie,{ctx:this.props.ctx,workspaceFolders:this.props.workspaceFolders}),vscpp(CGe,{ctx:this.props.ctx,workspaceFolders:this.props.workspaceFolders,maxSize:2e3,excludeDotFiles:!0})),vscpp(AGe,{ctx:this.props.ctx,flexGrow:7,priority:800}),vscpp("cacheBreakpoint",{type:"ephemeral"}))}};f();f();var F5t=class{constructor(e){this.promptFileEntry=e}static{a(this,"CustomSkill")}get id(){return this.promptFileEntry.promptPath.uri}get uri(){return this.promptFileEntry.promptPath.uri}get name(){return this.promptFileEntry.parsedPromptFile.header?.name||ei(Wu(this.uri))}get description(){return this.promptFileEntry.parsedPromptFile.header?.description}},BO=class{constructor(e){this.ctx=e;this.editorPreviewEnabled=!1;ss(e,r=>{this.editorPreviewEnabled=r.getTokenValue("editor_preview_features")==="1"})}static{a(this,"CustomSkillService")}async listSkills(e){return!vr(this.ctx,tt.EnableSkills)||!this.editorPreviewEnabled?[]:(await this.ctx.get(K1).collect(this.ctx,"skill",e)).map(s=>new F5t(s))}};var _Ge=class extends Zt{static{a(this,"SkillListPrompt")}async renderCopilot(){if(this.props.turnContext.cachedSkillListPrompt!==void 0)return this.props.turnContext.cachedSkillListPrompt??vscpp(vscppf,null);let e=this.props.workspaceFolders?this.props.workspaceFolders.map(c=>({uri:c.uri})):[];if(e.length===0)return this.props.turnContext.cachedSkillListPrompt=null,vscpp(vscppf,null);let n=await this.props.turnContext.ctx.get(BO).listSkills(e);if(Kn(this.props.turnContext.ctx,"skills.list_in_prompt",yt.createAndMarkAsIssued(void 0,{count:n.length})),n.length===0)return this.props.turnContext.cachedSkillListPrompt=null,vscpp(vscppf,null);let o=n.map(c=>` +`}let c=mm(s);return["I am working in a workspace that has the following structure:",c,s,c,"This view of the workspace structure may be truncated. You can use tools to collect more context if needed."].join(` +`)}a(Nen,"generateWorkspaceStructurePrompt");async function Men(t,e,r,n){return e.length?Promise.all(e.map(async o=>{let s=o.name,c=o.uri,l=await Den(await Oen(t,o.uri,r,n),r.maxLength/e.length,n);return{label:s,uri:c,tree:l}})):[]}a(Men,"generateWorkspaceStructure");async function Oen(t,e,r,n){if(n.isCancellationRequested)return[];let o;try{o=await t.get(Jn).readDirectory(e)}catch{return[]}return n.isCancellationRequested?[]:(o.sort((s,c)=>s[1]===c[1]?s[0].localeCompare(c[0]):s[1]&2?1:-1),Promise.all(o.map(([s,c])=>{let l=bi(e,s);return r.excludeDotFiles&&s.startsWith(".")||Nho(l)?null:c&2?{type:2,uri:l,name:s,getChildren:a(()=>Oen(t,l,r,n),"getChildren")}:{type:1,uri:l,name:s}})).then(s=>s.filter(c=>c!=null)))}a(Oen,"buildFileList");var kho=["node_modules","venv","out","dist",".git",".yarn",".npm",".venv","foo.asar",".vscode-test"],Dho=[".ds_store","thumbs.db","package-lock.json","yarn.lock",".cache"];function Nho(t){return!!(Dho.includes(Zn(t).toLowerCase())||mo(t)?.toLowerCase()?.split(/[/\\]/g)?.some(r=>kho.includes(r)))}a(Nho,"shouldAlwaysIgnoreFile");async function xqe(t,e,r){if(r.length===0)return[];try{let n=r.map(c=>({uri:c.uri,name:Zn(c.uri)})),o=await Men(t,n,{maxLength:2e3,excludeDotFiles:!0},e),s=[];for(let{label:c,uri:l,tree:u}of o)s.push(""),s.push(`Directory: ${c} (${Bo(l)})`),s.push(u.tree),s.push("");return s}catch(n){return Pho.warn(t,`Failed to generate directory structure: ${String(n)}`),[]}}a(xqe,"processDirectoryReferences");var wqe=class extends Xt{static{a(this,"WorkspaceStructure")}async renderCopilot(e,r,n,o){if(!this.props.workspaceFolders)return vscpp(vscppf,null);let s=await Nen(this.props.ctx,this.props.workspaceFolders,{maxLength:this.props.maxSize||2e3,excludeDotFiles:this.props.excludeDotFiles??!0},o||Cn.CancellationToken.None);return s?vscpp(vscppf,null,s):vscpp(vscppf,null)}};var Ben=de(co());var e_e=class extends Xt{static{a(this,"GlobalAgentContext")}renderCopilot(e,r,n,o){return vscpp(Ben.UserMessage,null,vscpp(Rn,{name:"environment_info"},vscpp(jne,{ctx:this.props.ctx}),vscpp(Iqe,{ctx:this.props.ctx})),vscpp(Rn,{name:"workspace_info"},vscpp($ne,{ctx:this.props.ctx,workspaceFolders:this.props.workspaceFolders}),vscpp(wqe,{ctx:this.props.ctx,workspaceFolders:this.props.workspaceFolders,maxSize:2e3,excludeDotFiles:!0})),vscpp(Sqe,{ctx:this.props.ctx,flexGrow:7,priority:800}))}};f();f();var iMt=class{constructor(e){this.promptFileEntry=e}static{a(this,"CustomSkill")}get id(){return this.promptFileEntry.promptPath.uri}get uri(){return this.promptFileEntry.promptPath.uri}get name(){return this.promptFileEntry.parsedPromptFile.header?.name||Zn(Lu(this.uri))}get description(){return this.promptFileEntry.parsedPromptFile.header?.description}},y4=class{constructor(e){this.ctx=e}static{a(this,"CustomSkillService")}async listSkills(e){return vr(this.ctx,tt.EnableSkills)?(await this.ctx.get(L1).collect(this.ctx,"skill",e)).map(s=>new iMt(s)):[]}};var Rqe=class extends Xt{static{a(this,"SkillListPrompt")}async renderCopilot(){if(this.props.turnContext.cachedSkillListPrompt!==void 0)return this.props.turnContext.cachedSkillListPrompt??vscpp(vscppf,null);let e=this.props.workspaceFolders?this.props.workspaceFolders.map(c=>({uri:c.uri})):[];if(e.length===0)return this.props.turnContext.cachedSkillListPrompt=null,vscpp(vscppf,null);let n=await this.props.turnContext.ctx.get(y4).listSkills(e);if(rr(this.props.turnContext.ctx,"skills.list_in_prompt",void 0,{count:n.length}),n.length===0)return this.props.turnContext.cachedSkillListPrompt=null,vscpp(vscppf,null);let o=n.map(c=>` ${c.name} ${c.description??""} ${c.uri} - `).join(""),s=vscpp(vscppf,null,vscpp(Rn,{name:"skills"},"Here is a list of skills that contain domain specific knowledge on a variety of topics. Each skill comes with a description of the topic and a file path that contains the detailed instructions. When a user asks you to perform a task that falls within the domain of a skill, use the 'read_file' tool to acquire the full instructions from the file URI.",o));return this.props.turnContext.cachedSkillListPrompt=s,s}};f();f();var Die=class{static{a(this,"CustomAgentRegistry")}async getAgents(e){let r=new Map,o=await e.ctx.get(J1).listCustomAgents(e.turn.workspaceFolders);for(let s of o)r.set(s.name,s);return r}async getAgentsForModelDispatch(e){let r=await this.getAgents(e),n=new Map;for(let[o,s]of r)s.invokePolicy.includes("model")&&n.set(o,s);return n}async getAgent(e,r){return(await this.getAgents(e)).get(r)}};f();var D0o=new Map([["copilot_semanticSearch","semantic_search"],["copilot_readFile","read_file"],["copilot_listDir","list_dir"],["copilot_getErrors","get_errors"],["copilot_runInTerminal","run_in_terminal"],["copilot_insertEdit","insert_edit_into_file"],["copilot_createFile","create_file"],["copilot_replaceString","replace_string_in_file"],["copilot_applyPatch","apply_patch"],["copilot_updateUserPreferences","update_user_preferences"],["copilot_fileSearch","file_search"],["copilot_findTextInFiles","grep_search"],["copilot_runSubagent","run_subagent"],["copilot_validateCves","validate_cves"],["copilot_manageTodoList","manage_todo_list"]]),M0o=new Map;for(let[t,e]of D0o)M0o.set(e,t);var FZr=new Set(["semantic_search","read_file","list_dir","get_errors","file_search","grep_search"]),UZr=new Set(["get_errors","insert_edit_into_file","replace_string_in_file","apply_patch"]);var vGe=class extends Zt{static{a(this,"SubagentListPrompt")}async renderCopilot(){if(this.props.turnContext.cachedSubagentListPrompt!==void 0)return this.props.turnContext.cachedSubagentListPrompt??vscpp(vscppf,null);let r=await new Die().getAgentsForModelDispatch(this.props.turnContext);if(r.size===0)return this.props.turnContext.cachedSubagentListPrompt=null,vscpp(vscppf,null);let n=Array.from(r.entries()).map(([s,c])=>`- **${c.name}**: ${c.description}`).join(` -`),o=vscpp(vscppf,null,vscpp(Rn,{name:"subagent-instructions"},"You should ALWAYS use the `","run_subagent","` tool to delegate tasks to specialized agents when the task you are working on matches the agent's description.",vscpp("br",null),"Available Agents:",vscpp("br",null),n,vscpp("br",null),"IMPORTANT: The `agentName` parameter MUST be one of the exact agent names listed above. Do NOT use any other name."));return this.props.turnContext.cachedSubagentListPrompt=o,o}};f();f();f();var Mie=class extends Zt{static{a(this,"AskModeKeepGoingReminder")}renderCopilot(){return vscpp(vscppf,null,"You are an agent \u2014 keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.",vscpp("br",null),"Avoid repetition across turns: don't restate unchanged context or plans verbatim; provide only what changed.",vscpp("br",null))}};f();var O0o=["en","fr","it","de","es","ru","zh-CN","zh-TW","ja","ko","cs","pt-br","tr","pl"],Dk=class extends Zt{static{a(this,"ResponseTranslationRules")}renderCopilot(){if(this.props.languageOverride&&O0o.find(e=>this.props.languageOverride===e)&&this.props.languageOverride!=="en")return vscpp(vscppf,null,"Respond in the following locale: ",this.props.languageOverride)}};var QZr=de(po());var bGe=class extends Zt{static{a(this,"AskAgentPrompt")}renderCopilot(){let e=a(s=>this.props.tools.some(c=>c.name===s),"hasTool"),r=e("semantic_search"),n=e("read_file"),o=e("run_in_terminal");return vscpp(QZr.SystemMessage,null,vscpp(Rn,{name:"instructions"},"You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.",vscpp("br",null),"The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.",vscpp("br",null),"If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when answering questions.",vscpp("br",null),vscpp(Mie,null)),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If a tool exists to do a task, use the tool instead of asking the user to manually take an action.",vscpp("br",null),"If you say that you will take an action, then go ahead and use the tool to do it. No need to ask permission.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.",vscpp("br",null),"If you are not sure about file content or codebase structure, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"Never say the name of a tool to a user."," ",n&&vscpp(vscppf,null,"For example, instead of saying that you'll use the ","read_file",` tool, say "I'll read the file".`),vscpp("br",null),"Prefer calling multiple tools in parallel when possible,"," ",r&&vscpp(vscppf,null,"but do not call ","semantic_search"," in parallel, "),"but do not parallelize dependent steps.",vscpp("br",null),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null),"When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),!o&&vscpp(vscppf,null,"You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a codeblock with the suggested command.",vscpp("br",null)),"Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you."),vscpp(Rn,{name:"contextGathering"},r&&vscpp(vscppf,null,"Prefer using the ","semantic_search"," tool to search for context unless you know the exact string or filename pattern you're searching for. It is your MAIN exploration tool for unfamiliar codebases:",vscpp("br",null),"- Start with broad queries, then narrow down",vscpp("br",null),"- Consider running multiple searches with different wording if first-pass results seem incomplete",vscpp("br",null)),"Don't make assumptions - gather context first, then answer the question. Bias towards finding answers yourself rather than asking the user.",vscpp("br",null),"Unless it is clear that the user's question relates to the current workspace, you should avoid using search tools and instead prefer to answer the user's question directly.",vscpp("br",null),"You don't need to read a file if it's already provided in context."),vscpp(Rn,{name:"codesearchModeInstructions"},"These instructions apply when answering questions about the user's codebase.",vscpp("br",null),"First, analyze the user's request to determine how complicated their task is. Leverage any of the tools available to you to gather the context needed to provide a complete and accurate response. Keep your search focused on the user's request, and don't run extra tools if the user's request clearly can be satisfied by just one.",vscpp("br",null),"Think step by step:",vscpp("br",null),"1. Read the provided relevant workspace information (code excerpts, file names, and symbols) to understand the user's workspace.",vscpp("br",null),"2. Consider how to answer the user's prompt based on the provided information and your specialized coding knowledge. Always assume that the user is asking about the code in their workspace instead of asking a general programming question.",vscpp("br",null),"3. Generate a response that clearly and accurately answers the user's question. In your response, add fully qualified links for referenced symbols and links for files so that the user can open them.",vscpp("br",null),"You don't currently have any tools available for editing files. If the user asks you to edit a file, you can print a codeblock with the suggested changes."),vscpp(Rn,{name:"inlineLineNumbers"},vscpp(vscppf,null,"Code chunks that you receive (via tool calls or from user) may include inline line numbers in the form LINE_NUMBER | LINE_CONTENT. Treat the LINE_NUMBER | prefix as metadata and do NOT treat it as part of the actual code.")),e("manage_todo_list")&&vscpp(Rn,{name:"taskTracking"},"Use ","manage_todo_list"," frequently to plan and track tasks, giving the user visibility into your progress. This is helpful for breaking down complex research into smaller steps.",vscpp("br",null),"Mark tasks as in-progress when starting and completed immediately after finishing - do not batch completions. Skip task tracking for simple questions or conversational requests."),vscpp(Dk,{languageOverride:this.props.languageOverride}))}};f();var qZr=de(po());var TGe=class extends Zt{static{a(this,"CodexStyleGPT5CodexPrompt")}renderCopilot(){return vscpp(qZr.SystemMessage,null,"You are a coding agent based on GPT-5-Codex.",vscpp("br",null),vscpp("br",null),"## Editing constraints",vscpp("br",null),vscpp("br",null),"- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.",vscpp("br",null),'- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.',vscpp("br",null),"- You may be in a dirty git worktree.",vscpp("br",null),"* NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.",vscpp("br",null),"* If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.",vscpp("br",null),"* If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.",vscpp("br",null),"* If the changes are in unrelated files, just ignore them and don't revert them.",vscpp("br",null),"- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.",vscpp("br",null),vscpp("br",null),"## Tool use",vscpp("br",null),"- You have access to many tools. If a tool exists to perform a specific task, you MUST use that tool instead of running a terminal command to perform that task.",vscpp("br",null),"- When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),vscpp("br",null),"## Special user requests",vscpp("br",null),vscpp("br",null),"- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.",vscpp("br",null),'- If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.',vscpp("br",null),vscpp("br",null),"## Presenting your work and final message",vscpp("br",null),vscpp("br",null),"You are producing text that will be rendered as markdown by the VS Code UI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.",vscpp("br",null),vscpp("br",null),"- Default: be very concise; friendly coding teammate tone.",vscpp("br",null),"- Ask only when needed; suggest ideas; mirror the user's style.",vscpp("br",null),"- For substantial work, summarize clearly; follow final-answer formatting.",vscpp("br",null),"- Skip heavy formatting for simple confirmations.",vscpp("br",null),"- Don't dump large files you've written; reference paths only.",vscpp("br",null),'- No "save/copy this file" - User is on the same machine.',vscpp("br",null),"- Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.",vscpp("br",null),"- For code changes:",vscpp("br",null),'* Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.',vscpp("br",null),"* If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.",vscpp("br",null),"* When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.",vscpp("br",null),"- The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.",vscpp("br",null),"- Use proper Markdown formatting in your answers. When referring to a filename or symbol in the user's workspace, wrap it in backticks.",vscpp("br",null),vscpp("br",null),"### Final answer structure and style guidelines",vscpp("br",null),vscpp("br",null),"- Markdown text. Use structure only when it helps scannability.",vscpp("br",null),"- Headers: optional; short Title Case (1-3 words) wrapped in **\u2026**; no blank line before the first bullet; add only if they truly help.",vscpp("br",null),"- Bullets: use - ; merge related points; keep to one line when possible; 4-6 per list ordered by importance; keep phrasing consistent.",vscpp("br",null),"- Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.",vscpp("br",null),"- Code samples or multi-line snippets should be wrapped in fenced code blocks; add a language hint whenever obvious.",vscpp("br",null),"- Structure: group related bullets; order sections general \u2192 specific \u2192 supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.",vscpp("br",null),'- Tone: collaborative, concise, factual; present tense, active voice; self-contained; no "above/below"; parallel wording.',vscpp("br",null),"- Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short\u2014wrap/reformat if long; avoid naming formatting styles in answers.",vscpp("br",null),"- Adaptation: code explanations \u2192 precise, structured with code refs; simple tasks \u2192 lead with outcome; big changes \u2192 logical walkthrough + rationale + next actions; casual one-offs \u2192 plain sentences, no headers/bullets.",vscpp("br",null),"- File References: When referencing files in your response, always follow the below rules:",vscpp("br",null),"* Use inline code to make file paths clickable.",vscpp("br",null),"* Each reference should have a stand alone path. Even if it's the same file.",vscpp("br",null),"* Accepted: absolute, workspace-relative, a/ or b/ diff prefixes, or bare filename/suffix.",vscpp("br",null),"* Do not use URIs like file://, vscode://, or https://.",vscpp("br",null),"* Examples: src/app.ts, C:\\repo\\project\\main.rs",vscpp("br",null),vscpp(Dk,{languageOverride:this.props.languageOverride}))}};f();f();var GZr="filepath:",km="...existing code...";f();var SGe=class extends Zt{static{a(this,"ApplyPatchFormatInstructions")}renderCopilot(){return vscpp(vscppf,null,"*** Update File: [file_path]",vscpp("br",null),"[context_before] -> See below for further instructions on context.",vscpp("br",null),"-[old_code] -> Precede each line in the old code with a minus sign.",vscpp("br",null),"+[new_code] -> Precede each line in the new, replacement code with a plus sign.",vscpp("br",null),"[context_after] -> See below for further instructions on context.",vscpp("br",null),vscpp("br",null),"For instructions on [context_before] and [context_after]:",vscpp("br",null),"- By default, show 3 lines of code immediately above and 3 lines immediately below each change. If a change is within 3 lines of a previous change, do NOT duplicate the first change's [context_after] lines in the second change's [context_before] lines.",vscpp("br",null),"- If 3 lines of context is insufficient to uniquely identify the snippet of code within the file, use the @@ operator to indicate the class or function to which the snippet belongs.",vscpp("br",null),"- If a code block is repeated so many times in a class or function such that even a single @@ statement and 3 lines of context cannot uniquely identify the snippet of code, you can use multiple `@@` statements to jump to the right context.",vscpp("br",null),vscpp("br",null),"You must use the same indentation style as the original code. If the original code uses tabs, you must use tabs. If the original code uses spaces, you must use spaces. Be sure to use a proper UNESCAPED tab character.",vscpp("br",null),vscpp("br",null),"See below for an example of the patch format. If you propose changes to multiple regions in the same file, you should repeat the *** Update File header for each snippet of code to change:",vscpp("br",null),vscpp("br",null),"*** Begin Patch",vscpp("br",null),"*** Update File: /Users/someone/pygorithm/searching/binary_search.py",vscpp("br",null),"@@ class BaseClass",vscpp("br",null),"@@"," ","def method():",vscpp("br",null),"[3 lines of pre-context]",vscpp("br",null),"-[old_code]",vscpp("br",null),"+[new_code]",vscpp("br",null),"+[new_code]",vscpp("br",null),"[3 lines of post-context]",vscpp("br",null),"*** End Patch",vscpp("br",null))}};f();var $F=class extends Zt{static{a(this,"KeepGoingReminder")}renderCopilot(){if(!q9e(this.props.modelConfiguration.modelFamily))return this.props.modelConfiguration.modelFamily===Cn.Gpt41||this.props.modelConfiguration.modelFamily.startsWith(Cn.Gpt5)?vscpp(vscppf,null,"You are an agent - you must keep going until the user's query is completely resolved, before ending your turn and yielding back to the user.",vscpp("br",null),"Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.",vscpp("br",null),"You MUST iterate and keep going until the problem is solved.",vscpp("br",null),"You have everything you need to resolve this problem. I want you to fully solve this autonomously before coming back to me.",vscpp("br",null),"Only terminate your turn when you are sure that the problem is solved and all items have been checked off. Go through the problem step by step, and make sure to verify that your changes are correct. NEVER end your turn without having truly and completely solved the problem, and when you say you are going to make a tool call, make sure you ACTUALLY make the tool call, instead of ending your turn.",vscpp("br",null),"Take your time and think through every step - remember to check your solution rigorously and watch out for boundary cases, especially with the changes you made. Your solution must be perfect. If not, continue working on it. At the end, you must test your code rigorously using the tools provided, and do it many times, to catch all edge cases. If it is not robust, iterate more and make it perfect. Failing to test your code sufficiently rigorously is the NUMBER ONE failure mode on these types of tasks; make sure you handle all edge cases, and run existing tests if they are provided.",vscpp("br",null),"You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.",vscpp("br",null),"You are a highly capable and autonomous agent, and you can definitely solve this problem without needing to ask the user for further input.",vscpp("br",null)):vscpp(vscppf,null,"You are an agent - you must keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. ONLY terminate your turn when you are sure that the problem is solved, or you absolutely cannot continue.",vscpp("br",null),"You take action when possible- the user is expecting YOU to take action and go to work for them. Don't ask unnecessary questions about the details if you can simply DO something useful instead.",vscpp("br",null))}};f();function HZr(t){let e=t.modelFamily.toLowerCase();return e.startsWith("claude")||e.startsWith("anthropic")||e.includes("gemini")}a(HZr,"modelSupportsReplaceString");function jZr(t){return t?t.startsWith("gpt-5"):!1}a(jZr,"isGpt5PlusFamily");function B0o(t){return t?t==="gpt-5.2-codex":!1}a(B0o,"isGpt52CodexFamily");function L0o(t){return t?t==="gpt-5.2":!1}a(L0o,"isGpt52Family");function $Zr(t){let e=t.modelFamily.toLowerCase();return!!(e.startsWith("gpt")&&!e.includes("gpt-4o")||e==="o4-mini"||B0o(e)||L0o(e))}a($Zr,"modelSupportsApplyPatch");var VZr=de(po());var IGe=class extends Zt{static{a(this,"DefaultAgentPrompt")}renderCopilot(){let e=a(m=>this.props.tools.some(g=>g.name===m),"hasTool"),r=e("get_errors"),n=e("run_in_terminal"),o=e("read_file"),s=e("replace_string_in_file"),c=e("semantic_search"),l=e("apply_patch"),u=e("insert_edit_into_file"),d=l||s||u,p=e("manage_todo_list"),h=jZr(this.props.modelConfiguration.modelFamily);return vscpp(VZr.SystemMessage,null,vscpp(Rn,{name:"instructions"},"You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.",vscpp("br",null),"The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.",vscpp("br",null),vscpp($F,{modelConfiguration:this.props.modelConfiguration}),"If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes.",vscpp("br",null),"If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept."),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If a tool exists to do a task, use the tool instead of asking the user to manually take an action.",vscpp("br",null),"If you say that you will take an action, then go ahead and use the tool to do it. No need to ask permission. If you make a plan, immediately follow it - do not wait for the user to confirm.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.",vscpp("br",null),"If you are not sure about file content or codebase structure, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"Never say the name of a tool to a user."," ",n&&vscpp(vscppf,null,"For example, instead of saying that you'll use the ","run_in_terminal",` tool, say "I'll run the command in a terminal".`),vscpp("br",null),"Prefer calling multiple tools in parallel when possible,"," ",c&&vscpp(vscppf,null,"but do not call ","semantic_search"," in parallel, "),"and do not parallelize edits or dependent steps.",vscpp("br",null),n&&vscpp(vscppf,null,"Don't call the ","run_in_terminal"," tool multiple times in parallel. Instead, run one command and wait for the output before running the next command.",vscpp("br",null)),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null),"When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),!d&&vscpp(vscppf,null,"You don't currently have any tools available for editing files. If the user asks you to edit a file, you can ask the user to enable editing tools or print a codeblock with the suggested changes.",vscpp("br",null)),!n&&vscpp(vscppf,null,"You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a codeblock with the suggested command.",vscpp("br",null)),"Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you."),vscpp(Rn,{name:"contextGathering"},"Be THOROUGH when gathering information - make sure you have the FULL picture before making any changes. TRACE every symbol back to its definitions and usages so you fully understand it. Look past the first seemingly relevant result and EXPLORE alternative implementations and edge cases.",vscpp("br",null),c&&vscpp(vscppf,null,"Prefer using the ","semantic_search"," tool to search for context unless you know the exact string or filename pattern you're searching for. It is your MAIN exploration tool for unfamiliar codebases:",vscpp("br",null),"- Start with broad queries, then narrow down",vscpp("br",null),"- Consider running multiple searches with different wording if first-pass results seem incomplete",vscpp("br",null)),"Don't make assumptions - gather context first, then perform the task. Bias towards finding answers yourself rather than asking the user.",vscpp("br",null),"You don't need to read a file if it's already provided in context."),vscpp(Rn,{name:"makingCodeChanges"},"NEVER output code to the user unless requested. Use the appropriate tool to implement changes directly.",vscpp("br",null),"NEVER generate an extremely long hash or any non-textual code, such as binary. These are not helpful to the user and are very expensive.",vscpp("br",null),"Add all necessary import statements, dependencies, and endpoints required to run the code.",vscpp("br",null),"Think creatively and explore the workspace in order to make a complete fix.",vscpp("br",null),"Before editing an existing file, make sure you have it in context",o&&vscpp(vscppf,null," or read it with ","read_file")," first. If you fail to edit a file, read it again before retrying - the user may have edited it.",vscpp("br",null),l?vscpp(vscppf,null,"To edit files in the workspace, use the ","apply_patch"," tool. If you have issues with it, you should first try to fix your patch and continue using ","apply_patch","."," ",u&&vscpp(vscppf,null,"If you are stuck, you can fall back on the ","insert_edit_into_file"," tool, but"," ","apply_patch"," is much faster and is the preferred tool."),vscpp("br",null),"IMPORTANT: Each ","apply_patch"," call can only operate on ONE file. If you need to modify multiple files, use separate ","apply_patch"," tool calls for each file. Delete file operation is NOT supported - use other methods if you need to delete files.",vscpp("br",null),h&&vscpp(vscppf,null,"Prefer the smallest set of changes needed to satisfy the task. Avoid reformatting unrelated code; preserve existing style and public APIs unless the task requires changes. When practical, complete all edits for a file within a single message.",vscpp("br",null)),"The input for this tool is a string representing the patch to apply, following a special format. For each snippet of code that needs to be changed, repeat the following:",vscpp("br",null),vscpp(SGe,null),vscpp("br",null),"NEVER print the patch out to the user, instead call the tool and the edits will be applied and shown to the user.",vscpp("br",null)):s?vscpp(vscppf,null,"Use ","replace_string_in_file"," to edit files, paying attention to context to ensure your replacement is unique. Group related edits into batches instead of making many separate calls. Use ","insert_edit_into_file"," only if ","replace_string_in_file"," has failed.",vscpp("br",null)):u?vscpp(vscppf,null,"Use ","insert_edit_into_file"," to edit files. When editing files, group your changes by file.",vscpp("br",null)):vscpp(vscppf,null),"For each file, give a short description of what needs to be changed, then use the tool. You can use tools multiple times in a response and keep writing text after using a tool.",vscpp("br",null),"Follow best practices when editing files. If a popular external library exists to solve a problem, use it and properly install the package e.g. ",n?'with "npm install" or ':"",'creating a "requirements.txt".',vscpp("br",null),r&&vscpp(vscppf,null,"After editing a file, call ","get_errors"," to validate your change. Only call it on files you've edited (not a wide scope). Fix relevant errors, but don't loop more than 3 times on the same file - ask the user if still failing.",vscpp("br",null)),!l&&u&&vscpp(vscppf,null,"The ","insert_edit_into_file"," tool is very smart and can understand how to apply your edits to the user's files, you just need to provide minimal hints.",vscpp("br",null),"When you use the ","insert_edit_into_file"," tool, avoid repeating existing code, instead use comments to represent regions of unchanged code. The tool prefers that you are as concise as possible. For example:",vscpp("br",null),"// ",km,vscpp("br",null),"changed code",vscpp("br",null),"// ",km,vscpp("br",null),"changed code",vscpp("br",null),"// ",km,vscpp("br",null),vscpp("br",null),"Here is an example of how you should format an edit to an existing Person class:",vscpp("br",null),["class Person {",` // ${km}`," age: number;",` // ${km}`," getAge() {"," return this.age;"," }","}"].join(` -`))),vscpp(Rn,{name:"inlineLineNumbers"},vscpp(vscppf,null,"Code chunks that you receive (via tool calls or from user) may include inline line numbers in the form LINE_NUMBER | LINE_CONTENT. Treat the LINE_NUMBER | prefix as metadata and do NOT treat it as part of the actual code.")),p&&vscpp(Rn,{name:"taskTracking"},"Use ","manage_todo_list"," frequently to plan and track tasks, giving the user visibility into your progress. This is helpful for breaking down complex tasks into smaller steps.",vscpp("br",null),"Mark tasks as in-progress when starting and completed immediately after finishing - do not batch completions. Skip task tracking for simple tasks or conversational requests."),vscpp(Dk,{languageOverride:this.props.languageOverride}))}};f();var xGe=class extends Zt{static{a(this,"CopilotIdentityRules")}renderCopilot(){return vscpp(vscppf,null,'When asked for your name, you must respond with "GitHub Copilot".',vscpp("br",null),"Follow the user's requirements carefully & to the letter.")}},wGe=class extends Zt{static{a(this,"GPT5CopilotIdentityRule")}renderCopilot(){return vscpp(vscppf,null,"Your name is GitHub Copilot.",vscpp("br",null))}};f();var Oie=class extends Zt{static{a(this,"SafetyRules")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null))}},RGe=class extends Zt{static{a(this,"Gpt5SafetyRule")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."`,vscpp("br",null))}},PGe=class extends Zt{static{a(this,"LegacySafetyRules")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null))}};f();var WZr=de(po());var kGe=class extends Zt{static{a(this,"InlineCodeEditPrompt")}renderCopilot(){let e=a(c=>this.props.tools.some(l=>l.name===c),"hasTool"),r=e("apply_patch"),n=e("replace_string_in_file"),o=e("insert_edit_into_file"),s=e("get_errors");return vscpp(WZr.SystemMessage,{priority:1e3},vscpp(Rn,{name:"instructions"},"You are an AI coding assistant that is used for quick, inline code changes. Changes are scoped to the selected code in a single file. You can ONLY edit that file and MUST use a tool to make these edits.",vscpp("br",null),vscpp($F,{modelConfiguration:this.props.modelConfiguration}),"The user is interested in code changes grounded in the user's prompt. Focus on coding, no wordy explanations, and do not ask back for clarifications.",vscpp("br",null),"Do NOT make code changes that are not directly and logically related to the user's prompt.",vscpp("br",null),"ONLY change the current file. Focus on the selection and try to make changes to the selected code and its immediate context. Do NOT modify code outside the user's selection unless absolutely necessary for correctness.",vscpp("br",null),"Keep changes minimal and focused on exactly what the user asked for.",vscpp("br",null)),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"NEVER output code to the user unless requested. Use the appropriate tool to implement changes directly.",vscpp("br",null),r?vscpp(vscppf,null,"Use ","apply_patch"," to make targeted edits to the selected code. If you have issues, first try to fix your patch and continue using ","apply_patch",".",o&&vscpp(vscppf,null," ","If you are stuck, you can fall back on ","insert_edit_into_file",", but"," ","apply_patch"," is the preferred tool."),vscpp("br",null)):n?vscpp(vscppf,null,"Use ","replace_string_in_file"," to make targeted edits to the selected code, paying attention to context to ensure your replacement is unique.",o&&vscpp(vscppf,null," ","Use ","insert_edit_into_file"," only if ","replace_string_in_file"," has failed."),vscpp("br",null)):o?vscpp(vscppf,null,"Use ","insert_edit_into_file"," to edit files. When editing, avoid repeating existing code, instead use a line comment with `",km,"` to represent regions of unchanged code.",vscpp("br",null)):vscpp(vscppf,null,"You do not have edit tools available. Describe the code changes to the user instead.",vscpp("br",null)),s&&vscpp(vscppf,null,"After editing a file, call ","get_errors"," to validate your change. Only call it on files you've edited. Fix relevant errors, but don't loop more than 3 times on the same file.",vscpp("br",null)),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null)),vscpp(Dk,{languageOverride:this.props.languageOverride}))}},NGe=class extends Zt{static{a(this,"InlineEditingReminder")}renderCopilot(){return vscpp(vscppf,null,"Focus on the selection and try to make changes to the selected code and its context. Do NOT edit code outside the selection unless absolutely necessary for correctness. ONLY change the current file, and change NO other file.")}};var DGe=de(po());var MGe=class extends Zt{static{a(this,"SystemInstructionsPrompt")}getAgentPrompt(){let e=this.props.turnContext.conversation.userLanguage,{tools:r,modelConfiguration:n,turnContext:o}=this.props,s=o.turn.chatMode?.kind==="Ask",c=o.turn.chatMode?.kind==="InlineAgent",l=vr(this.props.turnContext.ctx,tt.UseAgentsMd);return q9e(n.modelFamily)?vscpp(TGe,{tools:r,modelConfiguration:n,languageOverride:e}):s?vscpp(bGe,{tools:r,modelConfiguration:n,languageOverride:e}):c?vscpp(kGe,{tools:r,modelConfiguration:n,languageOverride:e}):vscpp(IGe,{tools:r,modelConfiguration:n,languageOverride:e,enableAgentsMdUpdate:l})}renderCopilot(){let e=this.props.turnContext.ctx,r=e.get(Nr).getEditorInfo().name,n=e.get(Fn).getCapabilities(),o=this.props.tools.some(s=>s.name==="run_subagent");return vscpp(vscppf,null,vscpp(DGe.SystemMessage,null,"You are an expert AI programming assistant, working with a user in the ",r," editor.",vscpp("br",null),this.props.modelConfiguration.modelFamily.startsWith(Cn.Gpt5)?vscpp(vscppf,null,vscpp(wGe,null),vscpp(RGe,null)):vscpp(vscppf,null,vscpp(xGe,null),vscpp(Oie,null))),this.getAgentPrompt(),this.props.turnContext.turn.isSubagent()&&vscpp(DGe.SystemMessage,null,vscpp(vscppf,null,"When you complete your task, provide a clear, concise summary of what you accomplished.")),n.subAgent&&o&&!this.props.turnContext.turn.isSubagent()&&this.props.turnContext.turn.chatMode?.id==="Agent"&&vscpp(DGe.SystemMessage,null,vscpp(vscppf,null,"You should ALWAYS check available agent descriptions first to see if any agent can be used with the `","run_subagent","` tool. DO NOT attempt to implement tasks yourself when a relevant agent exists. Delegating to specialized agents produces better results.")))}};f();var zZr=de(po());var OGe=class extends Zt{static{a(this,"ToolCallHistoryPrompt")}renderCopilot(){let e=cF(this.props.currentTurn.response?.message,!0),r=bF(e,{ctx:this.props.turnContext.ctx,identifier:`Turn ID: ${this.props.currentTurn.id}`,enableWarnings:!0});if(r.length===0)return vscpp(vscppf,null);let n=(0,zZr.useKeepWith)();return vscpp(vscppf,null,vscpp(n,{priority:1,flexGrow:1},vscpp(mk,{assistantRounds:r,ctx:this.props.turnContext.ctx,truncateAt:this.props.truncateAt,modelConfiguration:this.props.modelConfiguration,isHistorical:!1,identifier:String(this.props.currentTurn.id)})))}};f();f();var BGe=class extends Zt{static{a(this,"CurrentDatePrompt")}renderCopilot(){let e=this.props.date?.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})||new Date().toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"});return vscpp(vscppf,null,"The current date is ",e,".")}};f();var LGe=class extends Zt{static{a(this,"CurrentEditorContext")}renderCopilot(){let e,r=this.props.turnContext.turn.request.activeEditor;return r&&(e=this.renderActiveTextEditor(r)),e===void 0?vscpp(vscppf,null):vscpp(Rn,{name:"editorContext"},vscpp(vscppf,null,e))}renderActiveTextEditor(e){let r=e.selection,n=r&&F0o(r)?vscpp(vscppf,null,"The current selection is from line ",r.start.line+1," to line ",r.end.line+1,"."):void 0;return vscpp(vscppf,null,"The user's current file is ",Qo(e.uri),". ",n)}};function F0o(t){return t.start.line!==t.end.line||t.start.character!==t.end.character}a(F0o,"notEmptySelection");f();var FGe=class extends Zt{static{a(this,"EditingReminder")}renderCopilot(){if(!(this.props.tools&&!this.props.tools.some(e=>e.name==="insert_edit_into_file")))return vscpp(vscppf,null,"When using the ","insert_edit_into_file"," tool, avoid repeating existing code, instead use a line comment with `",km,"` to represent regions of unchanged code.")}};f();var UGe=class extends Zt{static{a(this,"ExplanationReminder")}renderCopilot(){if(this.props.modelConfiguration.modelFamily.startsWith(Cn.Gpt5)){let e=this.props.modelConfiguration.modelFamily.startsWith(Cn.Gpt5Mini);return vscpp(vscppf,null,`Skip filler acknowledgements like "Sounds good" or "Okay, I will\u2026". Open with a purposeful one-liner about what you're doing next.`,vscpp("br",null),"When sharing setup or run steps, present terminal commands in fenced code blocks with the correct language tag. Keep commands copyable and on separate lines.",vscpp("br",null),"Avoid definitive claims about the build or runtime setup unless verified from the provided context (or quick tool checks). If uncertain, state what's known from attachments and proceed with minimal steps you can adapt later.",vscpp("br",null),"When you create or edit runnable code, run a test yourself to confirm it works; then share optional fenced commands for more advanced runs.",vscpp("br",null),'For non-trivial code generation, produce a complete, runnable solution: necessary source files, a tiny runner or test/benchmark harness, a minimal `README.md`, and updated dependency manifests (e.g., `package.json`, `requirements.txt`, `pyproject.toml`). Offer quick "try it" commands and optional platform-specific speed-ups when relevant.',vscpp("br",null),"Your goal is to act like a pair programmer: be friendly and helpful. If you can do more, do more. Be proactive with your solutions, think about what the user needs and what they want, and implement it proactively.",vscpp("br",null),vscpp(Rn,{name:"importantReminders"},!e&&vscpp(vscppf,null,"Start your response with a brief acknowledgement, followed by a concise high-level plan outlining your approach.",vscpp("br",null)),"DO NOT state your identity or model name unless the user explicitly asks you to. ",vscpp("br",null),this.props.hasTodoTool&&vscpp(vscppf,null,"You MUST use the todo list tool to plan and track your progress. NEVER skip this step, and START with this step whenever the task is multi-step. This is essential for maintaining visibility and proper execution of large tasks. Follow the todoListToolInstructions strictly.",vscpp("br",null)),!this.props.hasTodoTool&&vscpp(vscppf,null,"Break down the request into clear, actionable steps and present them as a checklist at the beginning of your response before proceeding with implementation. This helps maintain visibility and ensures all requirements are addressed systematically. Skip this for simple questions or single-step tasks.",vscpp("br",null)),"When referring to a filename or symbol in the user's workspace, wrap it in backticks.",vscpp("br",null)))}}};f();f();f();f();f();var Mk=class{constructor(e){this.params=e;this.params.noFilePath===void 0&&(this.params.noFilePath=!1)}static{a(this,"CodeBlock")}renderAsArray(){let e=Sm(this.params.code),r=[`${e}${this.params.languageId}`];!this.params.noFilePath&&this.params.uri&&r.push(`// ${GZr} ${Qo(this.params.uri)}`);let n=this.params.shouldTrim?this.params.code.trim():this.params.code;if(this.params.lineNumberStart!==void 0){let o=n.split(` + `).join(""),s=vscpp(vscppf,null,vscpp(Rn,{name:"skills"},"Here is a list of skills that contain domain specific knowledge on a variety of topics. Each skill comes with a description of the topic and a file path that contains the detailed instructions. When a user asks you to perform a task that falls within the domain of a skill, use the 'read_file' tool to acquire the full instructions from the file URI.",o));return this.props.turnContext.cachedSkillListPrompt=s,s}};f();f();var Vne=class{static{a(this,"CustomAgentRegistry")}async getAgents(e){let r=new Map,o=await e.ctx.get(F1).listCustomAgents(e.turn.workspaceFolders);for(let s of o)r.set(s.name,s);return r}async getAgentsForModelDispatch(e){let r=await this.getAgents(e),n=new Map;for(let[o,s]of r)s.invokePolicy.includes("model")&&n.set(o,s);return n}async getAgent(e,r){return(await this.getAgents(e)).get(r)}};f();var Mho=new Map([["copilot_semanticSearch","semantic_search"],["copilot_readFile","read_file"],["copilot_listDir","list_dir"],["copilot_getErrors","get_errors"],["copilot_runInTerminal","run_in_terminal"],["copilot_insertEdit","insert_edit_into_file"],["copilot_createFile","create_file"],["copilot_replaceString","replace_string_in_file"],["copilot_applyPatch","apply_patch"],["copilot_updateUserPreferences","update_user_preferences"],["copilot_fileSearch","file_search"],["copilot_findTextInFiles","grep_search"],["copilot_runSubagent","run_subagent"],["copilot_validateCves","validate_cves"],["copilot_manageTodoList","manage_todo_list"]]),Oho=new Map;for(let[t,e]of Mho)Oho.set(e,t);var Len=new Set(["semantic_search","read_file","list_dir","get_errors","file_search","grep_search"]),Fen=new Set(["get_errors","insert_edit_into_file","replace_string_in_file","apply_patch"]);var Pqe=class extends Xt{static{a(this,"SubagentListPrompt")}async renderCopilot(){if(this.props.turnContext.cachedSubagentListPrompt!==void 0)return this.props.turnContext.cachedSubagentListPrompt??vscpp(vscppf,null);let r=await new Vne().getAgentsForModelDispatch(this.props.turnContext);if(r.size===0)return this.props.turnContext.cachedSubagentListPrompt=null,vscpp(vscppf,null);let n=Array.from(r.entries()).map(([s,c])=>`- **${c.name}**: ${c.description}`).join(` +`),o=vscpp(vscppf,null,vscpp(Rn,{name:"subagent-instructions"},"You should ALWAYS use the `","run_subagent","` tool to delegate tasks to specialized agents when the task you are working on matches the agent's description.",vscpp("br",null),"Available Agents:",vscpp("br",null),n,vscpp("br",null),"IMPORTANT: The `agentName` parameter MUST be one of the exact agent names listed above. Do NOT use any other name."));return this.props.turnContext.cachedSubagentListPrompt=o,o}};f();f();f();var Wne=class extends Xt{static{a(this,"AskModeKeepGoingReminder")}renderCopilot(){return vscpp(vscppf,null,"You are an agent \u2014 keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.",vscpp("br",null),"Avoid repetition across turns: don't restate unchanged context or plans verbatim; provide only what changed.",vscpp("br",null))}};f();var Bho=["en","fr","it","de","es","ru","zh-CN","zh-TW","ja","ko","cs","pt-br","tr","pl"],Ck=class extends Xt{static{a(this,"ResponseTranslationRules")}renderCopilot(){if(this.props.languageOverride&&Bho.find(e=>this.props.languageOverride===e)&&this.props.languageOverride!=="en")return vscpp(vscppf,null,"Respond in the following locale: ",this.props.languageOverride)}};var Uen=de(co());var kqe=class extends Xt{static{a(this,"AskAgentPrompt")}renderCopilot(){let e=a(s=>this.props.tools.some(c=>c.name===s),"hasTool"),r=e("semantic_search"),n=e("read_file"),o=e("run_in_terminal");return vscpp(Uen.SystemMessage,null,vscpp(Rn,{name:"instructions"},"You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.",vscpp("br",null),"The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.",vscpp("br",null),"If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when answering questions.",vscpp("br",null),vscpp(Wne,null)),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If a tool exists to do a task, use the tool instead of asking the user to manually take an action.",vscpp("br",null),"If you say that you will take an action, then go ahead and use the tool to do it. No need to ask permission.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.",vscpp("br",null),"If you are not sure about file content or codebase structure, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"Never say the name of a tool to a user."," ",n&&vscpp(vscppf,null,"For example, instead of saying that you'll use the ","read_file",` tool, say "I'll read the file".`),vscpp("br",null),"Prefer calling multiple tools in parallel when possible,"," ",r&&vscpp(vscppf,null,"but do not call ","semantic_search"," in parallel, "),"but do not parallelize dependent steps.",vscpp("br",null),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null),"When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),!o&&vscpp(vscppf,null,"You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a codeblock with the suggested command.",vscpp("br",null)),"Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you."),vscpp(Rn,{name:"contextGathering"},r&&vscpp(vscppf,null,"Prefer using the ","semantic_search"," tool to search for context unless you know the exact string or filename pattern you're searching for. It is your MAIN exploration tool for unfamiliar codebases:",vscpp("br",null),"- Start with broad queries, then narrow down",vscpp("br",null),"- Consider running multiple searches with different wording if first-pass results seem incomplete",vscpp("br",null)),"Don't make assumptions - gather context first, then answer the question. Bias towards finding answers yourself rather than asking the user.",vscpp("br",null),"Unless it is clear that the user's question relates to the current workspace, you should avoid using search tools and instead prefer to answer the user's question directly.",vscpp("br",null),"You don't need to read a file if it's already provided in context."),vscpp(Rn,{name:"codesearchModeInstructions"},"These instructions apply when answering questions about the user's codebase.",vscpp("br",null),"First, analyze the user's request to determine how complicated their task is. Leverage any of the tools available to you to gather the context needed to provide a complete and accurate response. Keep your search focused on the user's request, and don't run extra tools if the user's request clearly can be satisfied by just one.",vscpp("br",null),"Think step by step:",vscpp("br",null),"1. Read the provided relevant workspace information (code excerpts, file names, and symbols) to understand the user's workspace.",vscpp("br",null),"2. Consider how to answer the user's prompt based on the provided information and your specialized coding knowledge. Always assume that the user is asking about the code in their workspace instead of asking a general programming question.",vscpp("br",null),"3. Generate a response that clearly and accurately answers the user's question. In your response, add fully qualified links for referenced symbols and links for files so that the user can open them.",vscpp("br",null),"You don't currently have any tools available for editing files. If the user asks you to edit a file, you can print a codeblock with the suggested changes."),vscpp(Rn,{name:"inlineLineNumbers"},vscpp(vscppf,null,"Code chunks that you receive (via tool calls or from user) may include inline line numbers in the form LINE_NUMBER | LINE_CONTENT. Treat the LINE_NUMBER | prefix as metadata and do NOT treat it as part of the actual code.")),e("manage_todo_list")&&vscpp(Rn,{name:"taskTracking"},"Use ","manage_todo_list"," frequently to plan and track tasks, giving the user visibility into your progress. This is helpful for breaking down complex research into smaller steps.",vscpp("br",null),"Mark tasks as in-progress when starting and completed immediately after finishing - do not batch completions. Skip task tracking for simple questions or conversational requests."),vscpp(Ck,{languageOverride:this.props.languageOverride}))}};f();var Qen=de(co());var Dqe=class extends Xt{static{a(this,"CodexStyleGPT5CodexPrompt")}renderCopilot(){return vscpp(Qen.SystemMessage,null,"You are a coding agent based on GPT-5-Codex.",vscpp("br",null),vscpp("br",null),"## Editing constraints",vscpp("br",null),vscpp("br",null),"- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.",vscpp("br",null),'- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.',vscpp("br",null),"- You may be in a dirty git worktree.",vscpp("br",null),"* NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.",vscpp("br",null),"* If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.",vscpp("br",null),"* If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.",vscpp("br",null),"* If the changes are in unrelated files, just ignore them and don't revert them.",vscpp("br",null),"- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.",vscpp("br",null),vscpp("br",null),"## Tool use",vscpp("br",null),"- You have access to many tools. If a tool exists to perform a specific task, you MUST use that tool instead of running a terminal command to perform that task.",vscpp("br",null),"- When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),vscpp("br",null),"## Special user requests",vscpp("br",null),vscpp("br",null),"- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.",vscpp("br",null),'- If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.',vscpp("br",null),vscpp("br",null),"## Presenting your work and final message",vscpp("br",null),vscpp("br",null),"You are producing text that will be rendered as markdown by the VS Code UI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.",vscpp("br",null),vscpp("br",null),"- Default: be very concise; friendly coding teammate tone.",vscpp("br",null),"- Ask only when needed; suggest ideas; mirror the user's style.",vscpp("br",null),"- For substantial work, summarize clearly; follow final-answer formatting.",vscpp("br",null),"- Skip heavy formatting for simple confirmations.",vscpp("br",null),"- Don't dump large files you've written; reference paths only.",vscpp("br",null),'- No "save/copy this file" - User is on the same machine.',vscpp("br",null),"- Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.",vscpp("br",null),"- For code changes:",vscpp("br",null),'* Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.',vscpp("br",null),"* If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.",vscpp("br",null),"* When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.",vscpp("br",null),"- The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.",vscpp("br",null),"- Use proper Markdown formatting in your answers. When referring to a filename or symbol in the user's workspace, wrap it in backticks.",vscpp("br",null),vscpp("br",null),"### Final answer structure and style guidelines",vscpp("br",null),vscpp("br",null),"- Markdown text. Use structure only when it helps scannability.",vscpp("br",null),"- Headers: optional; short Title Case (1-3 words) wrapped in **\u2026**; no blank line before the first bullet; add only if they truly help.",vscpp("br",null),"- Bullets: use - ; merge related points; keep to one line when possible; 4-6 per list ordered by importance; keep phrasing consistent.",vscpp("br",null),"- Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.",vscpp("br",null),"- Code samples or multi-line snippets should be wrapped in fenced code blocks; add a language hint whenever obvious.",vscpp("br",null),"- Structure: group related bullets; order sections general \u2192 specific \u2192 supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.",vscpp("br",null),'- Tone: collaborative, concise, factual; present tense, active voice; self-contained; no "above/below"; parallel wording.',vscpp("br",null),"- Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short\u2014wrap/reformat if long; avoid naming formatting styles in answers.",vscpp("br",null),"- Adaptation: code explanations \u2192 precise, structured with code refs; simple tasks \u2192 lead with outcome; big changes \u2192 logical walkthrough + rationale + next actions; casual one-offs \u2192 plain sentences, no headers/bullets.",vscpp("br",null),"- File References: When referencing files in your response, always follow the below rules:",vscpp("br",null),"* Use inline code to make file paths clickable.",vscpp("br",null),"* Each reference should have a stand alone path. Even if it's the same file.",vscpp("br",null),"* Accepted: absolute, workspace-relative, a/ or b/ diff prefixes, or bare filename/suffix.",vscpp("br",null),"* Do not use URIs like file://, vscode://, or https://.",vscpp("br",null),"* Examples: src/app.ts, C:\\repo\\project\\main.rs",vscpp("br",null),vscpp(Ck,{languageOverride:this.props.languageOverride}))}};f();f();var qen="filepath:",Cm="...existing code...";f();var Nqe=class extends Xt{static{a(this,"ApplyPatchFormatInstructions")}renderCopilot(){return vscpp(vscppf,null,"*** Update File: [file_path]",vscpp("br",null),"[context_before] -> See below for further instructions on context.",vscpp("br",null),"-[old_code] -> Precede each line in the old code with a minus sign.",vscpp("br",null),"+[new_code] -> Precede each line in the new, replacement code with a plus sign.",vscpp("br",null),"[context_after] -> See below for further instructions on context.",vscpp("br",null),vscpp("br",null),"For instructions on [context_before] and [context_after]:",vscpp("br",null),"- By default, show 3 lines of code immediately above and 3 lines immediately below each change. If a change is within 3 lines of a previous change, do NOT duplicate the first change's [context_after] lines in the second change's [context_before] lines.",vscpp("br",null),"- If 3 lines of context is insufficient to uniquely identify the snippet of code within the file, use the @@ operator to indicate the class or function to which the snippet belongs.",vscpp("br",null),"- If a code block is repeated so many times in a class or function such that even a single @@ statement and 3 lines of context cannot uniquely identify the snippet of code, you can use multiple `@@` statements to jump to the right context.",vscpp("br",null),vscpp("br",null),"You must use the same indentation style as the original code. If the original code uses tabs, you must use tabs. If the original code uses spaces, you must use spaces. Be sure to use a proper UNESCAPED tab character.",vscpp("br",null),vscpp("br",null),"See below for an example of the patch format. If you propose changes to multiple regions in the same file, you should repeat the *** Update File header for each snippet of code to change:",vscpp("br",null),vscpp("br",null),"*** Begin Patch",vscpp("br",null),"*** Update File: /Users/someone/pygorithm/searching/binary_search.py",vscpp("br",null),"@@ class BaseClass",vscpp("br",null),"@@"," ","def method():",vscpp("br",null),"[3 lines of pre-context]",vscpp("br",null),"-[old_code]",vscpp("br",null),"+[new_code]",vscpp("br",null),"+[new_code]",vscpp("br",null),"[3 lines of post-context]",vscpp("br",null),"*** End Patch",vscpp("br",null))}};f();var yF=class extends Xt{static{a(this,"KeepGoingReminder")}renderCopilot(){if(!YFe(this.props.modelConfiguration.modelFamily))return this.props.modelConfiguration.modelFamily===_n.Gpt41||this.props.modelConfiguration.modelFamily.startsWith(_n.Gpt5)?vscpp(vscppf,null,"You are an agent - you must keep going until the user's query is completely resolved, before ending your turn and yielding back to the user.",vscpp("br",null),"Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.",vscpp("br",null),"You MUST iterate and keep going until the problem is solved.",vscpp("br",null),"You have everything you need to resolve this problem. I want you to fully solve this autonomously before coming back to me.",vscpp("br",null),"Only terminate your turn when you are sure that the problem is solved and all items have been checked off. Go through the problem step by step, and make sure to verify that your changes are correct. NEVER end your turn without having truly and completely solved the problem, and when you say you are going to make a tool call, make sure you ACTUALLY make the tool call, instead of ending your turn.",vscpp("br",null),"Take your time and think through every step - remember to check your solution rigorously and watch out for boundary cases, especially with the changes you made. Your solution must be perfect. If not, continue working on it. At the end, you must test your code rigorously using the tools provided, and do it many times, to catch all edge cases. If it is not robust, iterate more and make it perfect. Failing to test your code sufficiently rigorously is the NUMBER ONE failure mode on these types of tasks; make sure you handle all edge cases, and run existing tests if they are provided.",vscpp("br",null),"You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.",vscpp("br",null),"You are a highly capable and autonomous agent, and you can definitely solve this problem without needing to ask the user for further input.",vscpp("br",null)):vscpp(vscppf,null,"You are an agent - you must keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. ONLY terminate your turn when you are sure that the problem is solved, or you absolutely cannot continue.",vscpp("br",null),"You take action when possible- the user is expecting YOU to take action and go to work for them. Don't ask unnecessary questions about the details if you can simply DO something useful instead.",vscpp("br",null))}};f();function Gen(t){let e=t.modelFamily.toLowerCase();return e.startsWith("claude")||e.startsWith("anthropic")||e.includes("gemini")}a(Gen,"modelSupportsReplaceString");function Hen(t){return t?t.startsWith("gpt-5"):!1}a(Hen,"isGpt5PlusFamily");function Lho(t){return t?t==="gpt-5.2-codex":!1}a(Lho,"isGpt52CodexFamily");function Fho(t){return t?t==="gpt-5.2":!1}a(Fho,"isGpt52Family");function jen(t){let e=t.modelFamily.toLowerCase();return!!(e.startsWith("gpt")&&!e.includes("gpt-4o")||e==="o4-mini"||Lho(e)||Fho(e))}a(jen,"modelSupportsApplyPatch");var $en=de(co());var Mqe=class extends Xt{static{a(this,"DefaultAgentPrompt")}renderCopilot(){let e=a(m=>this.props.tools.some(g=>g.name===m),"hasTool"),r=e("get_errors"),n=e("run_in_terminal"),o=e("read_file"),s=e("replace_string_in_file"),c=e("semantic_search"),l=e("apply_patch"),u=e("insert_edit_into_file"),d=l||s||u,p=e("manage_todo_list"),h=Hen(this.props.modelConfiguration.modelFamily);return vscpp($en.SystemMessage,null,vscpp(Rn,{name:"instructions"},"You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.",vscpp("br",null),"The user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.",vscpp("br",null),vscpp(yF,{modelConfiguration:this.props.modelConfiguration}),"If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes.",vscpp("br",null),"If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept."),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If a tool exists to do a task, use the tool instead of asking the user to manually take an action.",vscpp("br",null),"If you say that you will take an action, then go ahead and use the tool to do it. No need to ask permission. If you make a plan, immediately follow it - do not wait for the user to confirm.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.",vscpp("br",null),"If you are not sure about file content or codebase structure, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"Never say the name of a tool to a user."," ",n&&vscpp(vscppf,null,"For example, instead of saying that you'll use the ","run_in_terminal",` tool, say "I'll run the command in a terminal".`),vscpp("br",null),"Prefer calling multiple tools in parallel when possible,"," ",c&&vscpp(vscppf,null,"but do not call ","semantic_search"," in parallel, "),"and do not parallelize edits or dependent steps.",vscpp("br",null),n&&vscpp(vscppf,null,"Don't call the ","run_in_terminal"," tool multiple times in parallel. Instead, run one command and wait for the output before running the next command.",vscpp("br",null)),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null),"When invoking a tool that takes a file path, always use the absolute file path.",vscpp("br",null),!d&&vscpp(vscppf,null,"You don't currently have any tools available for editing files. If the user asks you to edit a file, you can ask the user to enable editing tools or print a codeblock with the suggested changes.",vscpp("br",null)),!n&&vscpp(vscppf,null,"You don't currently have any tools available for running terminal commands. If the user asks you to run a terminal command, you can ask the user to enable terminal tools or print a codeblock with the suggested command.",vscpp("br",null)),"Tools can be disabled by the user. You may see tools used previously in the conversation that are not currently available. Be careful to only use the tools that are currently available to you."),vscpp(Rn,{name:"contextGathering"},"Be THOROUGH when gathering information - make sure you have the FULL picture before making any changes. TRACE every symbol back to its definitions and usages so you fully understand it. Look past the first seemingly relevant result and EXPLORE alternative implementations and edge cases.",vscpp("br",null),c&&vscpp(vscppf,null,"Prefer using the ","semantic_search"," tool to search for context unless you know the exact string or filename pattern you're searching for. It is your MAIN exploration tool for unfamiliar codebases:",vscpp("br",null),"- Start with broad queries, then narrow down",vscpp("br",null),"- Consider running multiple searches with different wording if first-pass results seem incomplete",vscpp("br",null)),"Don't make assumptions - gather context first, then perform the task. Bias towards finding answers yourself rather than asking the user.",vscpp("br",null),"You don't need to read a file if it's already provided in context."),vscpp(Rn,{name:"makingCodeChanges"},"NEVER output code to the user unless requested. Use the appropriate tool to implement changes directly.",vscpp("br",null),"NEVER generate an extremely long hash or any non-textual code, such as binary. These are not helpful to the user and are very expensive.",vscpp("br",null),"Add all necessary import statements, dependencies, and endpoints required to run the code.",vscpp("br",null),"Think creatively and explore the workspace in order to make a complete fix.",vscpp("br",null),"Before editing an existing file, make sure you have it in context",o&&vscpp(vscppf,null," or read it with ","read_file")," first. If you fail to edit a file, read it again before retrying - the user may have edited it.",vscpp("br",null),l?vscpp(vscppf,null,"To edit files in the workspace, use the ","apply_patch"," tool. If you have issues with it, you should first try to fix your patch and continue using ","apply_patch","."," ",u&&vscpp(vscppf,null,"If you are stuck, you can fall back on the ","insert_edit_into_file"," tool, but"," ","apply_patch"," is much faster and is the preferred tool."),vscpp("br",null),"IMPORTANT: Each ","apply_patch"," call can only operate on ONE file. If you need to modify multiple files, use separate ","apply_patch"," tool calls for each file. Delete file operation is NOT supported - use other methods if you need to delete files.",vscpp("br",null),h&&vscpp(vscppf,null,"Prefer the smallest set of changes needed to satisfy the task. Avoid reformatting unrelated code; preserve existing style and public APIs unless the task requires changes. When practical, complete all edits for a file within a single message.",vscpp("br",null)),"The input for this tool is a string representing the patch to apply, following a special format. For each snippet of code that needs to be changed, repeat the following:",vscpp("br",null),vscpp(Nqe,null),vscpp("br",null),"NEVER print the patch out to the user, instead call the tool and the edits will be applied and shown to the user.",vscpp("br",null)):s?vscpp(vscppf,null,"Use ","replace_string_in_file"," to edit files, paying attention to context to ensure your replacement is unique. Group related edits into batches instead of making many separate calls. Use ","insert_edit_into_file"," only if ","replace_string_in_file"," has failed.",vscpp("br",null)):u?vscpp(vscppf,null,"Use ","insert_edit_into_file"," to edit files. When editing files, group your changes by file.",vscpp("br",null)):vscpp(vscppf,null),"For each file, give a short description of what needs to be changed, then use the tool. You can use tools multiple times in a response and keep writing text after using a tool.",vscpp("br",null),"Follow best practices when editing files. If a popular external library exists to solve a problem, use it and properly install the package e.g. ",n?'with "npm install" or ':"",'creating a "requirements.txt".',vscpp("br",null),r&&vscpp(vscppf,null,"After editing a file, call ","get_errors"," to validate your change. Only call it on files you've edited (not a wide scope). Fix relevant errors, but don't loop more than 3 times on the same file - ask the user if still failing.",vscpp("br",null)),!l&&u&&vscpp(vscppf,null,"The ","insert_edit_into_file"," tool is very smart and can understand how to apply your edits to the user's files, you just need to provide minimal hints.",vscpp("br",null),"When you use the ","insert_edit_into_file"," tool, avoid repeating existing code, instead use comments to represent regions of unchanged code. The tool prefers that you are as concise as possible. For example:",vscpp("br",null),"// ",Cm,vscpp("br",null),"changed code",vscpp("br",null),"// ",Cm,vscpp("br",null),"changed code",vscpp("br",null),"// ",Cm,vscpp("br",null),vscpp("br",null),"Here is an example of how you should format an edit to an existing Person class:",vscpp("br",null),["class Person {",` // ${Cm}`," age: number;",` // ${Cm}`," getAge() {"," return this.age;"," }","}"].join(` +`))),vscpp(Rn,{name:"inlineLineNumbers"},vscpp(vscppf,null,"Code chunks that you receive (via tool calls or from user) may include inline line numbers in the form LINE_NUMBER | LINE_CONTENT. Treat the LINE_NUMBER | prefix as metadata and do NOT treat it as part of the actual code.")),p&&vscpp(Rn,{name:"taskTracking"},"Use ","manage_todo_list"," frequently to plan and track tasks, giving the user visibility into your progress. This is helpful for breaking down complex tasks into smaller steps.",vscpp("br",null),"Mark tasks as in-progress when starting and completed immediately after finishing - do not batch completions. Skip task tracking for simple tasks or conversational requests."),vscpp(Ck,{languageOverride:this.props.languageOverride}))}};f();var Oqe=class extends Xt{static{a(this,"CopilotIdentityRules")}renderCopilot(){return vscpp(vscppf,null,'When asked for your name, you must respond with "GitHub Copilot".',vscpp("br",null),"Follow the user's requirements carefully & to the letter.")}},Bqe=class extends Xt{static{a(this,"GPT5CopilotIdentityRule")}renderCopilot(){return vscpp(vscppf,null,"Your name is GitHub Copilot.",vscpp("br",null))}};f();var zne=class extends Xt{static{a(this,"SafetyRules")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null))}},Lqe=class extends Xt{static{a(this,"Gpt5SafetyRule")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."`,vscpp("br",null))}},Fqe=class extends Xt{static{a(this,"LegacySafetyRules")}renderCopilot(){return vscpp(vscppf,null,"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null))}};f();var Ven=de(co());var Uqe=class extends Xt{static{a(this,"InlineCodeEditPrompt")}renderCopilot(){let e=a(c=>this.props.tools.some(l=>l.name===c),"hasTool"),r=e("apply_patch"),n=e("replace_string_in_file"),o=e("insert_edit_into_file"),s=e("get_errors");return vscpp(Ven.SystemMessage,{priority:1e3},vscpp(Rn,{name:"instructions"},"You are an AI coding assistant that is used for quick, inline code changes. Changes are scoped to the selected code in a single file. You can ONLY edit that file and MUST use a tool to make these edits.",vscpp("br",null),vscpp(yF,{modelConfiguration:this.props.modelConfiguration}),"The user is interested in code changes grounded in the user's prompt. Focus on coding, no wordy explanations, and do not ask back for clarifications.",vscpp("br",null),"Do NOT make code changes that are not directly and logically related to the user's prompt.",vscpp("br",null),"ONLY change the current file. Focus on the selection and try to make changes to the selected code and its immediate context. Do NOT modify code outside the user's selection unless absolutely necessary for correctness.",vscpp("br",null),"Keep changes minimal and focused on exactly what the user asked for.",vscpp("br",null)),vscpp(Rn,{name:"toolUseInstructions"},"When using a tool, follow the json schema very carefully and make sure to include ALL required properties.",vscpp("br",null),"If you aren't sure which tool is relevant, you can call multiple tools. You can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully.",vscpp("br",null),"Never use multi_tool_use.parallel or any tool that does not exist. Use tools using the proper procedure, DO NOT write out a json codeblock with the tool inputs.",vscpp("br",null),"NEVER output code to the user unless requested. Use the appropriate tool to implement changes directly.",vscpp("br",null),r?vscpp(vscppf,null,"Use ","apply_patch"," to make targeted edits to the selected code. If you have issues, first try to fix your patch and continue using ","apply_patch",".",o&&vscpp(vscppf,null," ","If you are stuck, you can fall back on ","insert_edit_into_file",", but"," ","apply_patch"," is the preferred tool."),vscpp("br",null)):n?vscpp(vscppf,null,"Use ","replace_string_in_file"," to make targeted edits to the selected code, paying attention to context to ensure your replacement is unique.",o&&vscpp(vscppf,null," ","Use ","insert_edit_into_file"," only if ","replace_string_in_file"," has failed."),vscpp("br",null)):o?vscpp(vscppf,null,"Use ","insert_edit_into_file"," to edit files. When editing, avoid repeating existing code, instead use a line comment with `",Cm,"` to represent regions of unchanged code.",vscpp("br",null)):vscpp(vscppf,null,"You do not have edit tools available. Describe the code changes to the user instead.",vscpp("br",null)),s&&vscpp(vscppf,null,"After editing a file, call ","get_errors"," to validate your change. Only call it on files you've edited. Fix relevant errors, but don't loop more than 3 times on the same file.",vscpp("br",null)),"Don't repeat yourself after a tool call, pick up where you left off.",vscpp("br",null)),vscpp(Ck,{languageOverride:this.props.languageOverride}))}},Qqe=class extends Xt{static{a(this,"InlineEditingReminder")}renderCopilot(){return vscpp(vscppf,null,"Focus on the selection and try to make changes to the selected code and its context. Do NOT edit code outside the selection unless absolutely necessary for correctness. ONLY change the current file, and change NO other file.")}};var qqe=de(co());var Gqe=class extends Xt{static{a(this,"SystemInstructionsPrompt")}getAgentPrompt(){let e=this.props.turnContext.conversation.userLanguage,{tools:r,modelConfiguration:n,turnContext:o}=this.props,s=o.turn.chatMode?.kind==="Ask",c=o.turn.chatMode?.kind==="InlineAgent",l=vr(this.props.turnContext.ctx,tt.UseAgentsMd);return YFe(n.modelFamily)?vscpp(Dqe,{tools:r,modelConfiguration:n,languageOverride:e}):s?vscpp(kqe,{tools:r,modelConfiguration:n,languageOverride:e}):c?vscpp(Uqe,{tools:r,modelConfiguration:n,languageOverride:e}):vscpp(Mqe,{tools:r,modelConfiguration:n,languageOverride:e,enableAgentsMdUpdate:l})}renderCopilot(){let e=this.props.turnContext.ctx,r=e.get(Dr).getEditorInfo().name,n=e.get(Fn).getCapabilities(),o=this.props.tools.some(s=>s.name==="run_subagent");return vscpp(vscppf,null,vscpp(qqe.SystemMessage,null,"You are an expert AI programming assistant, working with a user in the ",r," editor.",vscpp("br",null),this.props.modelConfiguration.modelFamily.startsWith(_n.Gpt5)?vscpp(vscppf,null,vscpp(Bqe,null),vscpp(Lqe,null)):vscpp(vscppf,null,vscpp(Oqe,null),vscpp(zne,null))),this.getAgentPrompt(),this.props.turnContext.turn.isSubagent()&&vscpp(qqe.SystemMessage,null,vscpp(vscppf,null,"When you complete your task, provide a clear, concise summary of what you accomplished.")),n.subAgent&&o&&!this.props.turnContext.turn.isSubagent()&&this.props.turnContext.turn.chatMode?.id==="Agent"&&vscpp(qqe.SystemMessage,null,vscpp(vscppf,null,"You should ALWAYS check available agent descriptions first to see if any agent can be used with the `","run_subagent","` tool. DO NOT attempt to implement tasks yourself when a relevant agent exists. Delegating to specialized agents produces better results.")))}};f();var Wen=de(co());var Hqe=class extends Xt{static{a(this,"ToolCallHistoryPrompt")}renderCopilot(){let e=O6(this.props.currentTurn.response?.message,!0),r=K6(e,{ctx:this.props.turnContext.ctx,identifier:`Turn ID: ${this.props.currentTurn.id}`,enableWarnings:!0});if(r.length===0)return vscpp(vscppf,null);let n=(0,Wen.useKeepWith)();return vscpp(vscppf,null,vscpp(n,{priority:1,flexGrow:1},vscpp(nk,{assistantRounds:r,ctx:this.props.turnContext.ctx,truncateAt:this.props.truncateAt,modelConfiguration:this.props.modelConfiguration,isHistorical:!1,identifier:String(this.props.currentTurn.id)})))}};f();f();var jqe=class extends Xt{static{a(this,"CurrentDatePrompt")}renderCopilot(){let e=this.props.date?.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})||new Date().toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"});return vscpp(vscppf,null,"The current date is ",e,".")}};f();var $qe=class extends Xt{static{a(this,"CurrentEditorContext")}renderCopilot(){let e,r=this.props.turnContext.turn.request.activeEditor;return r&&(e=this.renderActiveTextEditor(r)),e===void 0?vscpp(vscppf,null):vscpp(Rn,{name:"editorContext"},vscpp(vscppf,null,e))}renderActiveTextEditor(e){let r=e.selection,n=r&&Uho(r)?vscpp(vscppf,null,"The current selection is from line ",r.start.line+1," to line ",r.end.line+1,"."):void 0;return vscpp(vscppf,null,"The user's current file is ",Bo(e.uri),". ",n)}};function Uho(t){return t.start.line!==t.end.line||t.start.character!==t.end.character}a(Uho,"notEmptySelection");f();var Vqe=class extends Xt{static{a(this,"EditingReminder")}renderCopilot(){if(!(this.props.tools&&!this.props.tools.some(e=>e.name==="insert_edit_into_file")))return vscpp(vscppf,null,"When using the ","insert_edit_into_file"," tool, avoid repeating existing code, instead use a line comment with `",Cm,"` to represent regions of unchanged code.")}};f();var Wqe=class extends Xt{static{a(this,"ExplanationReminder")}renderCopilot(){if(this.props.modelConfiguration.modelFamily.startsWith(_n.Gpt5)){let e=this.props.modelConfiguration.modelFamily.startsWith(_n.Gpt5Mini);return vscpp(vscppf,null,`Skip filler acknowledgements like "Sounds good" or "Okay, I will\u2026". Open with a purposeful one-liner about what you're doing next.`,vscpp("br",null),"When sharing setup or run steps, present terminal commands in fenced code blocks with the correct language tag. Keep commands copyable and on separate lines.",vscpp("br",null),"Avoid definitive claims about the build or runtime setup unless verified from the provided context (or quick tool checks). If uncertain, state what's known from attachments and proceed with minimal steps you can adapt later.",vscpp("br",null),"When you create or edit runnable code, run a test yourself to confirm it works; then share optional fenced commands for more advanced runs.",vscpp("br",null),'For non-trivial code generation, produce a complete, runnable solution: necessary source files, a tiny runner or test/benchmark harness, a minimal `README.md`, and updated dependency manifests (e.g., `package.json`, `requirements.txt`, `pyproject.toml`). Offer quick "try it" commands and optional platform-specific speed-ups when relevant.',vscpp("br",null),"Your goal is to act like a pair programmer: be friendly and helpful. If you can do more, do more. Be proactive with your solutions, think about what the user needs and what they want, and implement it proactively.",vscpp("br",null),vscpp(Rn,{name:"importantReminders"},!e&&vscpp(vscppf,null,"Start your response with a brief acknowledgement, followed by a concise high-level plan outlining your approach.",vscpp("br",null)),"DO NOT state your identity or model name unless the user explicitly asks you to. ",vscpp("br",null),this.props.hasTodoTool&&vscpp(vscppf,null,"You MUST use the todo list tool to plan and track your progress. NEVER skip this step, and START with this step whenever the task is multi-step. This is essential for maintaining visibility and proper execution of large tasks. Follow the todoListToolInstructions strictly.",vscpp("br",null)),!this.props.hasTodoTool&&vscpp(vscppf,null,"Break down the request into clear, actionable steps and present them as a checklist at the beginning of your response before proceeding with implementation. This helps maintain visibility and ensures all requirements are addressed systematically. Skip this for simple questions or single-step tasks.",vscpp("br",null)),"When referring to a filename or symbol in the user's workspace, wrap it in backticks.",vscpp("br",null)))}}};f();f();f();f();f();var vk=class{constructor(e){this.params=e;this.params.noFilePath===void 0&&(this.params.noFilePath=!1)}static{a(this,"CodeBlock")}renderAsArray(){let e=mm(this.params.code),r=[`${e}${this.params.languageId}`];!this.params.noFilePath&&this.params.uri&&r.push(`// ${qen} ${Bo(this.params.uri)}`);let n=this.params.shouldTrim?this.params.code.trim():this.params.code;if(this.params.lineNumberStart!==void 0){let o=n.split(` `),s=String(this.params.lineNumberStart+o.length-1).length,c=o.map((l,u)=>{let d=this.params.lineNumberStart+u;return`${String(d).padStart(s," ")} | ${l}`});r.push(c.join(` `))}else r.push(n);return r.push(e),r}renderAsString(e=` -`){return this.renderAsArray().join(e)}};var dw=class{constructor(e,r,n=[],o={}){this.textDocumentResult=e;this.range=r;this.descriptions=n;this.options=o}static{a(this,"FileAttachment")}render(){if(this.textDocumentResult.status!=="valid")return[];let e=this.textDocumentResult.document,r=new Mk({code:e.getText(this.range),languageId:e.detectedLanguageId,noFilePath:!0}),n=Eo(e.uri),o=this.options.useFilePath??!0,s="";this.options.id&&(s+=` id="${this.options.id}"`),o&&n&&(s+=` filePath="${n}"`);let c=[``];return c.push(...this.descriptions),c.push(...r.renderAsArray()),c.push("
"),c}};var U0o=new Se("activeEditorPrompt");async function YZr(t,e){let r=[],n=t.turnContext.turn.request.activeEditor;if(n){if(e.isCancellationRequested)throw new Sc;let o=await t.snapshotTextDocumentProvider.getByUri(n.uri);if(o.status==="valid")if(n.selection&&Q0o(n.selection)){let s=new dw(o,n.selection,["User's active selection, this should be the main focus:",`Excerpt from ${ei(n.uri)}, line range (1-based) ${n.selection.start.line+1} to ${n.selection.end.line+1}:`]);r.push(...s.render());let c=new dw(o,void 0,["User's active file for additional context:"]);r.push(...c.render())}else if(n.visibleRange){let s=new dw(o,n.visibleRange,["User's current visible code:",`Excerpt from ${ei(n.uri)}, line range (1-based) ${n.visibleRange.start.line+1} to ${n.visibleRange.end.line+1}:`]);r.push(...s.render())}else{let s=new dw(o,void 0,["User's active file for additional context:"]);r.push(...s.render())}else U0o.warn(t.context,`Failed to read file in active editor ${n.uri} with status ${o.status} and reason ${o.status==="notfound"?o.message:o.reason}`)}return r}a(YZr,"processActiveEditor");function Q0o(t){return t.start.line!==t.end.line||t.start.character!==t.end.character}a(Q0o,"notEmptySelection");f();var q0o=["png","jpg","jpeg","bmp","gif","webp"];function G0o(t){return t.filter(e=>{let r=e.uri.toLowerCase();return!q0o.some(n=>r.endsWith(`.${n}`))})}a(G0o,"filterOutImageFiles");function QGe(t){let e=t.turn.request.references?.filter(n=>n.type==="file")??[],r=t.turn.request.references?.filter(n=>n.type==="directory")??[];return{fileReferences:e,directoryReferences:r,validFileReferences:G0o(e)}}a(QGe,"getFileAndDirectoryReferences");var H0o=new Se("fileReferencesPrompt");async function KZr(t,e){let{validFileReferences:r,directoryReferences:n}=QGe(t.turnContext);if(r.length===0&&n.length===0&&!t.turnContext.turn.request.activeEditor)return[];let[o,s,c]=await Promise.all([j0o({validFileReferences:r,snapshotTextDocumentProvider:t.snapshotTextDocumentProvider,context:t.context},e),YZr(t,e),EGe(t.context,e,n)]),l=c||[];return o.length>0||s.length>0||l.length>0?["",...o,...s,...l,""]:[]}a(KZr,"processFileReferences");async function j0o(t,e){let r=new Map,n=t.validFileReferences.map(s=>{let c=ei(s.uri),l=r.get(c)||0;r.set(c,l+1);let u=l===0?c:`${c}-${l}`;return{fileRef:s,id:u,fileName:c}});return(await Promise.all(n.map(async({fileRef:s,id:c,fileName:l})=>{if(e.isCancellationRequested)throw new Sc;let u=[],d=await t.snapshotTextDocumentProvider.getByUri(s.uri);if(d.status==="valid"){let p=s.selection??s.visibleRange;if(p){let h=new dw(d,p,[`Excerpt from ${l}, lines ${p.start.line+1} to ${p.end.line+1}:`],{id:c,useFilePath:!1});u.push(...h.render());let m=new dw(d,void 0,["User's active file for additional context:"],{useFilePath:!0});u.push(...m.render())}else{let h=new dw(d,void 0,[],{id:c,useFilePath:!0});u.push(...h.render())}}else H0o.warn(t.context,`Failed to read file ${s.uri} with status ${d.status} and reason ${d.status==="notfound"?d.message:d.reason}`);return u}))).flat()}a(j0o,"processValidFileReferences");var JZr=de(po());var $0o=new Se("fileReferences"),qGe=class extends Zt{static{a(this,"FileReferences")}async renderCopilot(e,r,n,o){let s=o??new _n.CancellationTokenSource().token,c=[];try{c=await KZr({turnContext:this.props.turnContext,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider,context:this.props.ctx},s)}catch(l){$0o.debug(this.props.ctx,"Failed to process file references",l)}return c.length===0?vscpp(vscppf,null):vscpp(U5t,{fileReferencesParts:c})}},U5t=class extends Zt{static{a(this,"FileReferencesSection")}renderCopilot(){return vscpp(JZr.TextChunk,null,[this.props.fileReferencesParts.join(` -`)])}};f();var XZr=de(po());var GGe=class extends Zt{static{a(this,"FileReferencesFallback")}async renderCopilot(){let{validFileReferences:e,directoryReferences:r}=QGe(this.props.turnContext);if(e.length===0&&r.length===0)return vscpp(vscppf,null);let n=["User have attached following context reference, if you did not seen them, they might got omitted due to contents are too large:",""];if(e.length>0){n.push("Files:");let o=0,s=0,c=this.props.ctx.get(In);for(let l of e)try{let u=await c.getOrReadTextDocument({uri:l.uri});if(u.status==="valid"){let d=u.document.getText(),p=d.split(` -`).length,h=d.length;o+=p,s+=h,n.push(`- ${l.uri} (${p} lines, ${h} characters)`)}else n.push(`- ${l.uri}`)}catch{n.push(`- ${l.uri}`)}n.push(`Total: ${e.length} file(s), ${o} lines, ${s} characters`)}return r.length>0&&(n.push("Directories:"),r.forEach(o=>{n.push(`- ${o.uri}`)})),n.push(""),vscpp(XZr.TextChunk,null,[n.join(` -`)])}};f();var ZZr=new Se("SkillContextPrompt"),V0o=5e4,HGe=class extends Zt{static{a(this,"SkillContextPrompt")}async renderCopilot(e,r,n,o){let s=this.props.turnContext;if(!(!s.turn.skills||s.turn.skills.length===0))try{let[c,l]=await lUe(s);if(!c)return;ZZr.debug(this.props.ctx,"Skill resolutions:",l.map(p=>`${p.skillId}: ${p.resolution}`));let d=c.elide(V0o).getText();return!d||d.trim().length===0?void 0:vscpp(Rn,{name:"skillContext"},vscpp(vscppf,null,d))}catch(c){let l=s.turn.skills.map(u=>u.skillId).join(", ");ZZr.warn(this.props.ctx,`Failed to render skill context for skills [${l}]`,c);return}}};f();f();f();var pl=class extends J6{static{a(this,"ClsLanguageModelTool")}constructor(e){super({...e,toolProvider:dh,type:"shared"})}};f();var _p=class{constructor(){this.todoMap=new Map}static{a(this,"TodoListService")}getTodos(e){return this.todoMap.get(e.id)?.todos??[]}setTodos(e,r){r.length===0?this.todoMap.delete(e.id):this.todoMap.set(e.id,{todos:r})}hasTodos(e){let r=this.todoMap.get(e.id);return r!==void 0&&r.todos.length>0}};function W0o(){let t=S.Object({id:S.Number({description:"Unique identifier for the todo. Use sequential numbers starting from 1."}),title:S.String({description:"Concise action-oriented todo label (3-7 words). Displayed in UI."}),description:S.Optional(S.String({description:"Detailed context, requirements, or implementation notes. Include file paths, specific methods, or acceptance criteria."})),status:S.Union([S.Literal("not-started"),S.Literal("in-progress"),S.Literal("completed")],{description:"not-started: Not begun | in-progress: Currently working (max 1) | completed: Fully finished with no blockers"})}),e={operation:S.String({description:"write: Replace entire todo list with new content. read: Retrieve current todo list. ALWAYS provide complete list when writing - partial updates not supported.",enum:["write","read"]}),todoList:S.Optional(S.Array(t,{description:"Complete array of all todo items (required for write operation, ignored for read). Must include ALL items - both existing and new."}))};return S.Object(e)}a(W0o,"createManageTodoListInputSchema");var Ok=class t extends pl{static{a(this,"ManageTodoListTool")}constructor(e){super({name:"manage_todo_list",displayName:"Manage and track todo items for task planning",description:t.getToolDescription(void 0),displayDescription:"Manage and track todo items for task planning",inputSchema:W0o()}),this.ctx=e}get service(){return this.ctx.get(_p)}invoke(e,r,n){let{todoList:o,operation:s}=r.input;try{return s?s==="read"?Promise.resolve(this.handleReadOperation(e)):s==="write"?Promise.resolve(this.handleWriteOperation(e,o)):Promise.resolve(new Cr([new fr("Error: Unknown operation")],"error")):Promise.resolve(new Cr([new fr("Error: operation parameter is required")],"error"))}catch(c){let l=`Error: ${c instanceof Error?c.message:"Unknown error"}`;return Promise.resolve(new Cr([new fr(l)],"error"))}}handleReadOperation(e){let r=this.getTodos(e);if(r.length===0)return new Cr([new fr("No todo list found.")],"success");let n=t.formatTodoListAsMarkdown(r);return new Cr([new fr(`# Todo List +`){return this.renderAsArray().join(e)}};var ew=class{constructor(e,r,n=[],o={}){this.textDocumentResult=e;this.range=r;this.descriptions=n;this.options=o}static{a(this,"FileAttachment")}render(){if(this.textDocumentResult.status!=="valid")return[];let e=this.textDocumentResult.document,r=new vk({code:e.getText(this.range),languageId:e.detectedLanguageId,noFilePath:!0}),n=mo(e.uri),o=this.options.useFilePath??!0,s="";this.options.id&&(s+=` id="${this.options.id}"`),o&&n&&(s+=` filePath="${n}"`);let c=[``];return c.push(...this.descriptions),c.push(...r.renderAsArray()),c.push(""),c}};var Qho=new Se("activeEditorPrompt");async function zen(t,e){let r=[],n=t.turnContext.turn.request.activeEditor;if(n){if(e.isCancellationRequested)throw new Ec;let o=await t.snapshotTextDocumentProvider.getByUri(n.uri);if(o.status==="valid")if(n.selection&&qho(n.selection)){let s=new ew(o,n.selection,["User's active selection, this should be the main focus:",`Excerpt from ${Zn(n.uri)}, line range (1-based) ${n.selection.start.line+1} to ${n.selection.end.line+1}:`]);r.push(...s.render());let c=new ew(o,void 0,["User's active file for additional context:"]);r.push(...c.render())}else if(n.visibleRange){let s=new ew(o,n.visibleRange,["User's current visible code:",`Excerpt from ${Zn(n.uri)}, line range (1-based) ${n.visibleRange.start.line+1} to ${n.visibleRange.end.line+1}:`]);r.push(...s.render())}else{let s=new ew(o,void 0,["User's active file for additional context:"]);r.push(...s.render())}else Qho.warn(t.context,`Failed to read file in active editor ${n.uri} with status ${o.status} and reason ${o.status==="notfound"?o.message:o.reason}`)}return r}a(zen,"processActiveEditor");function qho(t){return t.start.line!==t.end.line||t.start.character!==t.end.character}a(qho,"notEmptySelection");f();var Gho=["png","jpg","jpeg","bmp","gif","webp"];function Hho(t){return t.filter(e=>{let r=e.uri.toLowerCase();return!Gho.some(n=>r.endsWith(`.${n}`))})}a(Hho,"filterOutImageFiles");function zqe(t){let e=t.turn.request.references?.filter(n=>n.type==="file")??[],r=t.turn.request.references?.filter(n=>n.type==="directory")??[];return{fileReferences:e,directoryReferences:r,validFileReferences:Hho(e)}}a(zqe,"getFileAndDirectoryReferences");var jho=new Se("fileReferencesPrompt");async function Yen(t,e){let{validFileReferences:r,directoryReferences:n}=zqe(t.turnContext);if(r.length===0&&n.length===0&&!t.turnContext.turn.request.activeEditor)return[];let[o,s,c]=await Promise.all([$ho({validFileReferences:r,snapshotTextDocumentProvider:t.snapshotTextDocumentProvider,context:t.context},e),zen(t,e),xqe(t.context,e,n)]),l=c||[];return o.length>0||s.length>0||l.length>0?["",...o,...s,...l,""]:[]}a(Yen,"processFileReferences");async function $ho(t,e){let r=new Map,n=t.validFileReferences.map(s=>{let c=Zn(s.uri),l=r.get(c)||0;r.set(c,l+1);let u=l===0?c:`${c}-${l}`;return{fileRef:s,id:u,fileName:c}});return(await Promise.all(n.map(async({fileRef:s,id:c,fileName:l})=>{if(e.isCancellationRequested)throw new Ec;let u=[],d=await t.snapshotTextDocumentProvider.getByUri(s.uri);if(d.status==="valid"){let p=s.selection??s.visibleRange;if(p){let h=new ew(d,p,[`Excerpt from ${l}, lines ${p.start.line+1} to ${p.end.line+1}:`],{id:c,useFilePath:!1});u.push(...h.render());let m=new ew(d,void 0,["User's active file for additional context:"],{useFilePath:!0});u.push(...m.render())}else{let h=new ew(d,void 0,[],{id:c,useFilePath:!0});u.push(...h.render())}}else jho.warn(t.context,`Failed to read file ${s.uri} with status ${d.status} and reason ${d.status==="notfound"?d.message:d.reason}`);return u}))).flat()}a($ho,"processValidFileReferences");var Ken=de(co());var Vho=new Se("fileReferences"),Yqe=class extends Xt{static{a(this,"FileReferences")}async renderCopilot(e,r,n,o){let s=o??new Cn.CancellationTokenSource().token,c=[];try{c=await Yen({turnContext:this.props.turnContext,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider,context:this.props.ctx},s)}catch(l){Vho.debug(this.props.ctx,"Failed to process file references",l)}return c.length===0?vscpp(vscppf,null):vscpp(oMt,{fileReferencesParts:c})}},oMt=class extends Xt{static{a(this,"FileReferencesSection")}renderCopilot(){return vscpp(Ken.TextChunk,null,[this.props.fileReferencesParts.join(` +`)])}};f();var Jen=de(co());var Kqe=class extends Xt{static{a(this,"FileReferencesFallback")}async renderCopilot(){let{validFileReferences:e,directoryReferences:r}=zqe(this.props.turnContext);if(e.length===0&&r.length===0)return vscpp(vscppf,null);let n=["User have attached following context reference, if you did not seen them, they might got omitted due to contents are too large:",""];if(e.length>0){n.push("Files:");let o=0,s=0,c=this.props.ctx.get(In);for(let l of e)try{let u=await c.getOrReadTextDocument({uri:l.uri});if(u.status==="valid"){let d=u.document.getText(),p=d.split(` +`).length,h=d.length;o+=p,s+=h,n.push(`- ${l.uri} (${p} lines, ${h} characters)`)}else n.push(`- ${l.uri}`)}catch{n.push(`- ${l.uri}`)}n.push(`Total: ${e.length} file(s), ${o} lines, ${s} characters`)}return r.length>0&&(n.push("Directories:"),r.forEach(o=>{n.push(`- ${o.uri}`)})),n.push(""),vscpp(Jen.TextChunk,null,[n.join(` +`)])}};f();var Xen=new Se("SkillContextPrompt"),Who=5e4,Jqe=class extends Xt{static{a(this,"SkillContextPrompt")}async renderCopilot(e,r,n,o){let s=this.props.turnContext;if(!(!s.turn.skills||s.turn.skills.length===0))try{let[c,l]=await A7e(s);if(!c)return;Xen.debug(this.props.ctx,"Skill resolutions:",l.map(p=>`${p.skillId}: ${p.resolution}`));let d=c.elide(Who).getText();return!d||d.trim().length===0?void 0:vscpp(Rn,{name:"skillContext"},vscpp(vscppf,null,d))}catch(c){let l=s.turn.skills.map(u=>u.skillId).join(", ");Xen.warn(this.props.ctx,`Failed to render skill context for skills [${l}]`,c);return}}};f();f();f();var sl=class extends T6{static{a(this,"ClsLanguageModelTool")}constructor(e){super({...e,toolProvider:ih,type:"shared"})}};f();var mp=class{constructor(){this.todoMap=new Map}static{a(this,"TodoListService")}getTodos(e){return this.todoMap.get(e.id)?.todos??[]}setTodos(e,r){r.length===0?this.todoMap.delete(e.id):this.todoMap.set(e.id,{todos:r})}hasTodos(e){let r=this.todoMap.get(e.id);return r!==void 0&&r.todos.length>0}};function zho(){let t=S.Object({id:S.Number({description:"Unique identifier for the todo. Use sequential numbers starting from 1."}),title:S.String({description:"Concise action-oriented todo label (3-7 words). Displayed in UI."}),description:S.Optional(S.String({description:"Detailed context, requirements, or implementation notes. Include file paths, specific methods, or acceptance criteria."})),status:S.Union([S.Literal("not-started"),S.Literal("in-progress"),S.Literal("completed")],{description:"not-started: Not begun | in-progress: Currently working (max 1) | completed: Fully finished with no blockers"})}),e={operation:S.String({description:"write: Replace entire todo list with new content. read: Retrieve current todo list. ALWAYS provide complete list when writing - partial updates not supported.",enum:["write","read"]}),todoList:S.Optional(S.Array(t,{description:"Complete array of all todo items (required for write operation, ignored for read). Must include ALL items - both existing and new."}))};return S.Object(e)}a(zho,"createManageTodoListInputSchema");var bk=class t extends sl{static{a(this,"ManageTodoListTool")}constructor(e){super({name:"manage_todo_list",displayName:"Manage and track todo items for task planning",description:t.getToolDescription(void 0),displayDescription:"Manage and track todo items for task planning",inputSchema:zho()}),this.ctx=e}get service(){return this.ctx.get(mp)}invoke(e,r,n){let{todoList:o,operation:s}=r.input;try{return s?s==="read"?Promise.resolve(this.handleReadOperation(e)):s==="write"?Promise.resolve(this.handleWriteOperation(e,o)):Promise.resolve(new _r([new fr("Error: Unknown operation")],"error")):Promise.resolve(new _r([new fr("Error: operation parameter is required")],"error"))}catch(c){let l=`Error: ${c instanceof Error?c.message:"Unknown error"}`;return Promise.resolve(new _r([new fr(l)],"error"))}}handleReadOperation(e){let r=this.getTodos(e);if(r.length===0)return new _r([new fr("No todo list found.")],"success");let n=t.formatTodoListAsMarkdown(r);return new _r([new fr(`# Todo List -${n}`)],"success")}handleWriteOperation(e,r){if(!r)return new Cr([new fr("Error: todoList is required for write operation")],"error");let n=r.map(p=>({id:p.id,title:p.title,description:p.description||"",status:p.status})),o=this.getTodos(e),s=this.calculateTodoChanges(o,n),c=this.generatePastTenseMessage(o,n);this.storeTodos(e,n);let l=[];n.length<3?l.push("Warning: Small todo list (<3 items). This task might not need a todo list."):n.length>10&&l.push("Warning: Large todo list (>10 items). Consider keeping the list focused and actionable."),o.length>0&&s>3&&l.push("Warning: Did you mean to update so many todos at the same time? Consider working on them one by one.");let u=`Successfully wrote todo list${l.length?` +${n}`)],"success")}handleWriteOperation(e,r){if(!r)return new _r([new fr("Error: todoList is required for write operation")],"error");let n=r.map(p=>({id:p.id,title:p.title,description:p.description||"",status:p.status})),o=this.getTodos(e),s=this.calculateTodoChanges(o,n),c=this.generatePastTenseMessage(o,n);this.storeTodos(e,n);let l=[];n.length<3?l.push("Warning: Small todo list (<3 items). This task might not need a todo list."):n.length>10&&l.push("Warning: Large todo list (>10 items). Consider keeping the list focused and actionable."),o.length>0&&s>3&&l.push("Warning: Did you mean to update so many todos at the same time? Consider working on them one by one.");let u=`Successfully wrote todo list${l.length?` `+l.join(` -`):""}`,d=new Z6([new fr(u)],"success");return d.toolResultMessage=c,d.toolSpecificData={kind:"todoList",data:n.map(p=>({id:p.id,title:p.title,description:p.description||"",status:p.status}))},d}generatePastTenseMessage(e,r){if(e.length===0)return r.length===1?"Created 1 todo":`Created ${r.length} todos`;let n=new Map(e.map(l=>[l.id,l])),o=r.filter(l=>{let u=n.get(l.id);return u&&u.status!=="in-progress"&&l.status==="in-progress"});if(o.length>0){let l=o[0],u=r.length,d=r.findIndex(p=>p.id===l.id)+1;return`Starting: *${l.title}* (${d}/${u})`}let s=r.filter(l=>{let u=n.get(l.id);return u&&u.status!=="completed"&&l.status==="completed"});if(s.length>0){let l=s[0],u=r.length,d=r.findIndex(p=>p.id===l.id)+1;return`Completed: *${l.title}* (${d}/${u})`}let c=r.filter(l=>!n.has(l.id));return c.length>0?c.length===1?"Added 1 todo":`Added ${c.length} todos`:"Updated todo list"}static formatTodoListAsMarkdown(e){return e.length===0?"":e.map(r=>{let n;switch(r.status){case"completed":n="[x]";break;case"in-progress":n="[-]";break;default:n="[ ]";break}let o=[`- ${n} ${r.title}`];return r.description&&r.description.trim()&&o.push(` - ${r.description.trim()}`),o.join(` +`):""}`,d=new I6([new fr(u)],"success");return d.toolResultMessage=c,d.toolSpecificData={kind:"todoList",data:n.map(p=>({id:p.id,title:p.title,description:p.description||"",status:p.status}))},d}generatePastTenseMessage(e,r){if(e.length===0)return r.length===1?"Created 1 todo":`Created ${r.length} todos`;let n=new Map(e.map(l=>[l.id,l])),o=r.filter(l=>{let u=n.get(l.id);return u&&u.status!=="in-progress"&&l.status==="in-progress"});if(o.length>0){let l=o[0],u=r.length,d=r.findIndex(p=>p.id===l.id)+1;return`Starting: *${l.title}* (${d}/${u})`}let s=r.filter(l=>{let u=n.get(l.id);return u&&u.status!=="completed"&&l.status==="completed"});if(s.length>0){let l=s[0],u=r.length,d=r.findIndex(p=>p.id===l.id)+1;return`Completed: *${l.title}* (${d}/${u})`}let c=r.filter(l=>!n.has(l.id));return c.length>0?c.length===1?"Added 1 todo":`Added ${c.length} todos`:"Updated todo list"}static formatTodoListAsMarkdown(e){return e.length===0?"":e.map(r=>{let n;switch(r.status){case"completed":n="[x]";break;case"in-progress":n="[-]";break;default:n="[ ]";break}let o=[`- ${n} ${r.title}`];return r.description&&r.description.trim()&&o.push(` - ${r.description.trim()}`),o.join(` `)}).join(` -`)}calculateTodoChanges(e,r){let n=new Map(e.map(u=>[u.id,u])),o=new Map(r.map(u=>[u.id,u])),s=0;for(let u of o.keys())n.has(u)||s++;let c=0;for(let u of n.keys())o.has(u)||c++;let l=0;for(let[u,d]of o){let p=n.get(u);p&&(p.title!==d.title||(p.description??"")!==(d.description??"")||p.status!==d.status)&&l++}return s+c+l}prepareInvocation(e,r){let{operation:n}=e.input;if(n==="read")return{progressMessage:"Reading todo list"};let o=e.input.todoList?.length??0;return{progressMessage:o===0?"Clearing todo list":`Updating ${o} todo(s)`}}prepareCompletion(e,r){let{operation:n}=e.input;return n==="read"?{completionMessage:"Read todo list"}:{completionMessage:"Updated todo list"}}storeTodos(e,r){this.service.setTodos(e.conversation,r)}getTodos(e){return this.service.getTodos(e.conversation)}static getTodoList(e){return e.ctx.get(_p).getTodos(e.conversation)}static getCurrentTask(e){return this.getTodoList(e).find(n=>n.status==="in-progress")??null}static getToolDescription(e){return IHr(e)?`Updates the task plan. +`)}calculateTodoChanges(e,r){let n=new Map(e.map(u=>[u.id,u])),o=new Map(r.map(u=>[u.id,u])),s=0;for(let u of o.keys())n.has(u)||s++;let c=0;for(let u of n.keys())o.has(u)||c++;let l=0;for(let[u,d]of o){let p=n.get(u);p&&(p.title!==d.title||(p.description??"")!==(d.description??"")||p.status!==d.status)&&l++}return s+c+l}prepareInvocation(e,r){let{operation:n}=e.input;if(n==="read")return{progressMessage:"Reading todo list"};let o=e.input.todoList?.length??0;return{progressMessage:o===0?"Clearing todo list":`Updating ${o} todo(s)`}}prepareCompletion(e,r){let{operation:n}=e.input;return n==="read"?{completionMessage:"Read todo list"}:{completionMessage:"Updated todo list"}}storeTodos(e,r){this.service.setTodos(e.conversation,r)}getTodos(e){return this.service.getTodos(e.conversation)}static getTodoList(e){return e.ctx.get(mp).getTodos(e.conversation)}static getCurrentTask(e){return this.getTodoList(e).find(n=>n.status==="in-progress")??null}static getToolDescription(e){return Sjr(e)?`Updates the task plan. Provide an optional explanation and a list of plan items, each with a step and status. At most one step can be in-progress at a time.`:`Manage a structured todo list to track progress and plan tasks throughout your coding session. Use this tool VERY frequently to ensure task visibility and proper planning. @@ -2958,77 +2947,77 @@ Todo states: - in-progress: Currently working (limit ONE at a time) - completed: Finished successfully -IMPORTANT: Mark todos completed as soon as they are done. Do not batch completions.`}};var jGe=class extends Zt{static{a(this,"TodoListContextPrompt")}renderCopilot(){if(!this.props.turnContext.ctx.get(Fn).getCapabilities().manageTodoListTool)return;let r=this.props.turnContext.todoListSnapshot??Ok.getTodoList(this.props.turnContext);if(r.length===0)return;let n=Ok.formatTodoListAsMarkdown(r);return vscpp(Rn,{name:"todoList"},[n])}};f();f();var z0o=new Se("fileReferencesPrompt");function een(t,e,r){if(!r.length)return[];try{let n=[];for(let o of r){if(e.isCancellationRequested)break;let s=o.server??"default",c=o.name??o.uri;n.push(`MCP Tool Reference: ${s}/${c}`),o.description&&n.push(`Description: ${o.description}`),n.push("---"),n.push("Invoke the tool with user prompt.")}return n}catch(n){return z0o.warn(t,`Failed to render MCP tool references: ${String(n)}`),[]}}a(een,"processMcpToolsReferences");var Y0o=new Se("ToolContext"),$Ge=class extends Zt{static{a(this,"ToolContext")}renderCopilot(){let e=this.props.token;try{let r=(this.props.turnContext.turn.request.references?.filter(s=>s.type==="tool")||[]).map(s=>({type:"tool",uri:s.uri,server:s.server,name:s.name,description:s.description}));if(r.length===0)return;if(e?.isCancellationRequested)throw new Sc;let n=een(this.props.ctx,e,r)||[];return n.length===0?void 0:vscpp(Rn,{name:"McpToolContext"},vscpp(vscppf,null,n.join(` -`)))}catch(r){Y0o.warn(this.props.ctx,"Failed to render MCP tool context",r);return}}};var Bie=de(po());var VGe=class extends Zt{static{a(this,"UserRequestPrompt")}renderCopilot(e,r,n,o){let s=dn(this.props.userRawMessage),c=Sne(this.props.userRawMessage)?this.props.userRawMessage.filter(l=>l.type==="image_url"):[];return vscpp(Bie.UserMessage,null,vscpp(Bie.TokenLimit,{max:r.tokenBudget/6,flexGrow:3,priority:898},vscpp(qGe,{ctx:this.props.ctx,turnContext:this.props.turnContext,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider}),c.map(l=>vscpp(Bie.Image,{src:l.image_url.url,detail:l.image_url.detail}))),vscpp(GGe,{ctx:this.props.ctx,turnContext:this.props.turnContext,priority:898}),vscpp($Ge,{ctx:this.props.ctx,turnContext:this.props.turnContext,token:o,priority:899}),vscpp(HGe,{ctx:this.props.ctx,turnContext:this.props.turnContext,priority:897}),vscpp(Rn,{name:"context"},vscpp(BGe,null),vscpp(jGe,{turnContext:this.props.turnContext})),vscpp(LGe,{turnContext:this.props.turnContext,context:this.props.ctx}),vscpp(Rn,{name:"reminderInstructions"},this.props.codesearchMode?vscpp(Mie,null):vscpp($F,{modelConfiguration:this.props.modelConfiguration}),!this.props.codesearchMode&&vscpp(FGe,{tools:this.props.tools}),this.props.turnContext.turn.chatMode?.kind==="InlineAgent"&&vscpp(NGe,null),vscpp(UGe,{modelConfiguration:this.props.modelConfiguration,hasTodoTool:!1})),vscpp(Rn,{name:"userRequest",priority:900,flexGrow:7},vscpp(vscppf,null,s)),vscpp("cacheBreakpoint",{type:"ephemeral"}))}};var q$=de(po());var Q5t=new Se("agentPrompt"),WGe=class extends Zt{static{a(this,"AgentPrompt")}constructor(e){super(e),this.ctx=e.turnContext.ctx,this.turnContext=e.turnContext,this.currentTurn=e.turnContext.turn}async renderCopilot(e,r,n,o){let s=this.ctx.get(Fn).getCapabilities(),c=this.props.tools.some(d=>d.name==="run_subagent"),l=vscpp(vscppf,null,vscpp(MGe,{turnContext:this.turnContext,modelConfiguration:this.props.modelConfiguration,tools:this.props.tools}),await this.getAgentCustomInstructions(),vscpp(q$.UserMessage,null,await this.getOrCreateGlobalAgentContext()),s.subAgent&&c&&!this.currentTurn.isSubagent()&&this.currentTurn.chatMode?.id==="Agent"&&vscpp(q$.UserMessage,null,vscpp(vGe,{turnContext:this.turnContext})),vscpp(q$.UserMessage,null,vscpp(_Ge,{turnContext:this.turnContext,workspaceFolders:this.props.workspaceFolders}))),u=this.turnContext.conversation.turns.slice(0,-1);return vscpp(vscppf,null,l,vscpp(jne,{flexGrow:1,priority:700,historyTurns:u,ctx:this.ctx,modelConfiguration:this.props.modelConfiguration}),vscpp(VGe,{flexGrow:2,priority:900,ctx:this.ctx,turnContext:this.turnContext,userRawMessage:this.props.userRawMessage,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider,modelConfiguration:this.props.modelConfiguration,codesearchMode:this.props.codesearchMode,tools:this.props.tools}),vscpp(OGe,{flexGrow:2,priority:899,turnContext:this.turnContext,currentTurn:this.currentTurn,truncateAt:Math.floor(this.props.modelConfiguration.maxRequestTokens/2),modelConfiguration:this.props.modelConfiguration}))}async getOrCreateGlobalAgentContext(){let e=await this.getOrCreateGlobalAgentContextContent();return e?K0o(e):[vscpp(r_e,{ctx:this.ctx,workspaceFolders:this.props.workspaceFolders})]}async getOrCreateGlobalAgentContextContent(){let e=`${this.turnContext.conversation.id}/${this.turnContext.turn.id}`,r=this.turnContext.conversation.turns.at(0);if(r){let s=r.getMetadata(t_e);if(s?.renderedGlobalContext)return Q5t.info(this.ctx,`Reusing cached global context from first turn for conversation/turn ${e}`),s.renderedGlobalContext}Q5t.info(this.ctx,`Rendering fresh global context for conversation/turn ${e}`);let o=(await vPt(r_e,{ctx:this.ctx,workspaceFolders:this.props.workspaceFolders},this.props.modelConfiguration)).messages.at(0)?.content;if(o)return r?.setMetadata(new t_e(o)),o}async getAgentCustomInstructions(){if(this.turnContext.cachedCustomInstructions!==void 0)return this.turnContext.cachedCustomInstructions??vscpp(vscppf,null);try{if(!this.props.workspaceFolders||this.props.workspaceFolders.length===0)return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null);let e=[],r=this.props.workspaceFolders.map(l=>({uri:l.uri,name:l.name})),n=this.turnContext.turn.extractContextFilesUri(),o=await this.ctx.get(od).getInstructions(this.ctx,r,{includeCodeGenerationInstructions:!0,includeCommitMessageGenerationInstructions:!1,includeAgentsMdInstructions:vr(this.ctx,tt.UseAgentsMd),includeNestedAgentsMdInstructions:vr(this.ctx,tt.UseNestedAgentsMd),includeClaudeMdInstructions:vr(this.ctx,tt.UseClaudeMd),includeNestedClaudeMdInstructions:vr(this.ctx,tt.UseNestedClaudeMd)},n);o&&e.push(vscpp(vscppf,null,o));let s=this.props.turnContext.turn.chatMode;if(s?.id==="Ask")e.push(RZr());else if(s&&s.instruction&&s.instruction.trim().length>0){let{name:l,instruction:u}=s;e.push(vscpp(Rn,{name:"modeInstructions"},'You are currently running in "',l,'" mode. Below are your instructions for this mode, they must take precedence over any instructions above.',vscpp("br",null),vscpp("br",null),u))}if(e.length===0)return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null);let c=vscpp(q$.UserMessage,null,e);return this.turnContext.cachedCustomInstructions=c,c}catch(e){Q5t.warn(this.ctx,"Failed to get custom instructions",e)}return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null)}};function K0o(t){return typeof t=="string"?[t]:t.map(e=>{if(e.type==="text")return e.text;if(e.type==="image_url")return vscpp(q$.Image,{src:e.image_url.url,detail:e.image_url.detail})}).filter(e=>e!==void 0)}a(K0o,"renderedMessageToTsxChildren");f();var zGe="uncategorized_tools",ten="Tools that could not be automatically categorized into existing groups.";f();var VF=class extends Error{static{a(this,"ToolCallCanceledError")}constructor(e){super(e),this.name="Canceled"}};f();var LO=class extends Error{static{a(this,"ToolRoundExceedError")}constructor(){super('Oops, maximum tool attempts reached. You can type "continue" to proceed or rephrase your request.'),this.name="ToolRoundExceedError"}};f();var ren=new Se("roundMetricsTracker"),YGe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.conversationProgress=o;this.cumulativeTokenUsage={promptTokens:0,completionTokens:0,cachedTokens:0};this.tokenUsageReported=!1;this.roundUsageHistory=[]}static{a(this,"RoundMetricsTracker")}getTimeSinceLastLLMCall(){return this.lastLlmCallEndTimeMs!==void 0?performance.now()-this.lastLlmCallEndTimeMs:void 0}recordLlmFetchComplete(){this.lastLlmCallEndTimeMs=performance.now()}computePromptPrefixMetrics(e,r){let n=JSON.stringify(e),o=JSON.stringify(r),s={previousPromptCharLen:this.previousPromptSerialized?.length??0,currentPromptCharLen:n.length,commonPromptPrefixCharLen:nen(this.previousPromptSerialized,n),previousToolsCharLen:this.previousToolsSerialized?.length??0,currentToolsCharLen:o.length,commonToolsPrefixCharLen:nen(this.previousToolsSerialized,o)};return this.previousPromptSerialized=n,this.previousToolsSerialized=o,s}extractRoundUsage(e){if("usage"in e&&e.usage)return{promptTokens:e.usage.prompt_tokens,completionTokens:e.usage.completion_tokens,cachedTokens:e.usage.prompt_tokens_details?.cached_tokens??0}}accumulateTokenUsage(e,r){r&&(this.cumulativeTokenUsage.promptTokens+=r.promptTokens,this.cumulativeTokenUsage.completionTokens+=r.completionTokens,this.cumulativeTokenUsage.cachedTokens+=r.cachedTokens,this.roundUsageHistory.push({roundId:e,usage:{...r}}))}logRoundDebugMetrics(e,r,n,o,s,c){let l=c;ren.debug(this.ctx,`Round metrics for iteration ${e} for turn ${r}: prompt=[prev=${l.previousPromptCharLen}, cur=${l.currentPromptCharLen}, prefix=${l.commonPromptPrefixCharLen}`+(l.currentPromptCharLen>0?` (${(l.commonPromptPrefixCharLen/l.currentPromptCharLen*100).toFixed(1)}%)`:"")+`] tools=[prev=${l.previousToolsCharLen}, cur=${l.currentToolsCharLen}, prefix=${l.commonToolsPrefixCharLen}`+(l.currentToolsCharLen>0?` (${(l.commonToolsPrefixCharLen/l.currentToolsCharLen*100).toFixed(1)}%)`:"")+`] tokens=[prompt=${n?.promptTokens??"n/a"}, completion=${n?.completionTokens??"n/a"}, cached=${n?.cachedTokens??"n/a"}] timing=[llmFetch=${o.toFixed(0)}ms`+(s!==void 0?`, sinceLastLLM=${s.toFixed(0)}ms`:"")+"]")}async reportCumulativeTokenUsage(e){if(this.tokenUsageReported)return;this.tokenUsageReported=!0;let r=this.cumulativeTokenUsage;if((r.promptTokens>0||r.completionTokens>0)&&(ren.info(this.ctx,`Turn token usage: ${r.promptTokens} prompt, ${r.completionTokens} completion, ${r.cachedTokens} cached`+(r.promptTokens>0?` (cache rate: ${(r.cachedTokens/r.promptTokens*100).toFixed(1)}%)`:"")),await this.conversationProgress.report(this.conversation,this.turn,{tokenUsage:{...r}}),vr(this.ctx,tt.AppendPromptTokenCache)==="true")){let n=this.formatTokenStats(r);await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:e,reply:n}]})}}formatTokenStats(e){let r=a(c=>c>=1e6?`${(c/1e6).toFixed(1)}M`:c>=1e3?`${(c/1e3).toFixed(1)}k`:c.toString(),"fmt"),n=e.promptTokens>0?` (${(e.cachedTokens/e.promptTokens*100).toFixed(1)}% cached)`:"",o=this.roundUsageHistory.length,s=` +IMPORTANT: Mark todos completed as soon as they are done. Do not batch completions.`}};var Xqe=class extends Xt{static{a(this,"TodoListContextPrompt")}renderCopilot(){if(!this.props.turnContext.ctx.get(Fn).getCapabilities().manageTodoListTool)return;let r=this.props.turnContext.todoListSnapshot??bk.getTodoList(this.props.turnContext);if(r.length===0)return;let n=bk.formatTodoListAsMarkdown(r);return vscpp(Rn,{name:"todoList"},[n])}};f();f();var Yho=new Se("fileReferencesPrompt");function Zen(t,e,r){if(!r.length)return[];try{let n=[];for(let o of r){if(e.isCancellationRequested)break;let s=o.server??"default",c=o.name??o.uri;n.push(`MCP Tool Reference: ${s}/${c}`),o.description&&n.push(`Description: ${o.description}`),n.push("---"),n.push("Invoke the tool with user prompt.")}return n}catch(n){return Yho.warn(t,`Failed to render MCP tool references: ${String(n)}`),[]}}a(Zen,"processMcpToolsReferences");var Kho=new Se("ToolContext"),Zqe=class extends Xt{static{a(this,"ToolContext")}renderCopilot(){let e=this.props.token;try{let r=(this.props.turnContext.turn.request.references?.filter(s=>s.type==="tool")||[]).map(s=>({type:"tool",uri:s.uri,server:s.server,name:s.name,description:s.description}));if(r.length===0)return;if(e?.isCancellationRequested)throw new Ec;let n=Zen(this.props.ctx,e,r)||[];return n.length===0?void 0:vscpp(Rn,{name:"McpToolContext"},vscpp(vscppf,null,n.join(` +`)))}catch(r){Kho.warn(this.props.ctx,"Failed to render MCP tool context",r);return}}};var Yne=de(co());var eGe=class extends Xt{static{a(this,"UserRequestPrompt")}renderCopilot(e,r,n,o){let s=dn(this.props.userRawMessage),c=Fre(this.props.userRawMessage)?this.props.userRawMessage.filter(l=>l.type==="image_url"):[];return vscpp(Yne.UserMessage,null,vscpp(Yne.TokenLimit,{max:r.tokenBudget/6,flexGrow:3,priority:898},vscpp(Yqe,{ctx:this.props.ctx,turnContext:this.props.turnContext,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider}),c.map(l=>vscpp(Yne.Image,{src:l.image_url.url,detail:l.image_url.detail}))),vscpp(Kqe,{ctx:this.props.ctx,turnContext:this.props.turnContext,priority:898}),vscpp(Zqe,{ctx:this.props.ctx,turnContext:this.props.turnContext,token:o,priority:899}),vscpp(Jqe,{ctx:this.props.ctx,turnContext:this.props.turnContext,priority:897}),vscpp(Rn,{name:"context"},vscpp(jqe,null),vscpp(Xqe,{turnContext:this.props.turnContext})),vscpp($qe,{turnContext:this.props.turnContext,context:this.props.ctx}),vscpp(Rn,{name:"reminderInstructions"},this.props.codesearchMode?vscpp(Wne,null):vscpp(yF,{modelConfiguration:this.props.modelConfiguration}),!this.props.codesearchMode&&vscpp(Vqe,{tools:this.props.tools}),this.props.turnContext.turn.chatMode?.kind==="InlineAgent"&&vscpp(Qqe,null),vscpp(Wqe,{modelConfiguration:this.props.modelConfiguration,hasTodoTool:!1})),vscpp(Rn,{name:"userRequest",priority:900,flexGrow:7},vscpp(vscppf,null,s)))}};var zj=de(co());var sMt=new Se("agentPrompt"),tGe=class extends Xt{static{a(this,"AgentPrompt")}constructor(e){super(e),this.ctx=e.turnContext.ctx,this.turnContext=e.turnContext,this.currentTurn=e.turnContext.turn}async renderCopilot(e,r,n,o){let s=this.ctx.get(Fn).getCapabilities(),c=this.props.tools.some(d=>d.name==="run_subagent"),l=vscpp(vscppf,null,vscpp(Gqe,{turnContext:this.turnContext,modelConfiguration:this.props.modelConfiguration,tools:this.props.tools}),await this.getAgentCustomInstructions(),vscpp(zj.UserMessage,null,await this.getOrCreateGlobalAgentContext()),s.subAgent&&c&&!this.currentTurn.isSubagent()&&this.currentTurn.chatMode?.id==="Agent"&&vscpp(zj.UserMessage,null,vscpp(Pqe,{turnContext:this.turnContext})),vscpp(zj.UserMessage,null,vscpp(Rqe,{turnContext:this.turnContext,workspaceFolders:this.props.workspaceFolders}))),u=this.turnContext.conversation.turns.slice(0,-1);return vscpp(vscppf,null,l,vscpp(nne,{flexGrow:1,priority:700,historyTurns:u,ctx:this.ctx,modelConfiguration:this.props.modelConfiguration}),vscpp(eGe,{flexGrow:2,priority:900,ctx:this.ctx,turnContext:this.turnContext,userRawMessage:this.props.userRawMessage,snapshotTextDocumentProvider:this.props.snapshotTextDocumentProvider,modelConfiguration:this.props.modelConfiguration,codesearchMode:this.props.codesearchMode,tools:this.props.tools}),vscpp(Hqe,{flexGrow:2,priority:899,turnContext:this.turnContext,currentTurn:this.currentTurn,truncateAt:Math.floor(this.props.modelConfiguration.maxRequestTokens/2),modelConfiguration:this.props.modelConfiguration}))}async getOrCreateGlobalAgentContext(){let e=await this.getOrCreateGlobalAgentContextContent();return e?Jho(e):[vscpp(e_e,{ctx:this.ctx,workspaceFolders:this.props.workspaceFolders})]}async getOrCreateGlobalAgentContextContent(){let e=`${this.turnContext.conversation.id}/${this.turnContext.turn.id}`,r=this.turnContext.conversation.turns.at(0);if(r){let s=r.getMetadata(ZEe);if(s?.renderedGlobalContext)return sMt.info(this.ctx,`Reusing cached global context from first turn for conversation/turn ${e}`),s.renderedGlobalContext}sMt.info(this.ctx,`Rendering fresh global context for conversation/turn ${e}`);let o=(await GPt(e_e,{ctx:this.ctx,workspaceFolders:this.props.workspaceFolders},this.props.modelConfiguration)).messages.at(0)?.content;if(o)return r?.setMetadata(new ZEe(o)),o}async getAgentCustomInstructions(){if(this.turnContext.cachedCustomInstructions!==void 0)return this.turnContext.cachedCustomInstructions??vscpp(vscppf,null);try{if(!this.props.workspaceFolders||this.props.workspaceFolders.length===0)return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null);let e=[],r=this.props.workspaceFolders.map(l=>({uri:l.uri,name:l.name})),n=this.turnContext.turn.extractContextFilesUri(),o=await this.ctx.get(Ju).getInstructions(this.ctx,r,{includeCopilotInstructions:!0,includeGitCommitInstructions:!1,includeAgentsMdInstructions:vr(this.ctx,tt.UseAgentsMd),includeNestedAgentsMdInstructions:vr(this.ctx,tt.UseNestedAgentsMd),includeClaudeMdInstructions:vr(this.ctx,tt.UseClaudeMd),includeNestedClaudeMdInstructions:vr(this.ctx,tt.UseNestedClaudeMd)},n);o&&e.push(vscpp(vscppf,null,o));let s=this.props.turnContext.turn.chatMode;if(s?.id==="Ask")e.push(wen());else if(s&&s.instruction&&s.instruction.trim().length>0){let{name:l,instruction:u}=s;e.push(vscpp(Rn,{name:"modeInstructions"},'You are currently running in "',l,'" mode. Below are your instructions for this mode, they must take precedence over any instructions above.',vscpp("br",null),vscpp("br",null),u))}if(e.length===0)return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null);let c=vscpp(zj.UserMessage,null,e);return this.turnContext.cachedCustomInstructions=c,c}catch(e){sMt.warn(this.ctx,"Failed to get custom instructions",e)}return this.turnContext.cachedCustomInstructions=null,vscpp(vscppf,null)}};function Jho(t){return typeof t=="string"?[t]:t.map(e=>{if(e.type==="text")return e.text;if(e.type==="image_url")return vscpp(zj.Image,{src:e.image_url.url,detail:e.image_url.detail})}).filter(e=>e!==void 0)}a(Jho,"renderedMessageToTsxChildren");f();var rGe="uncategorized_tools",etn="Tools that could not be automatically categorized into existing groups.";f();var EF=class extends Error{static{a(this,"ToolCallCanceledError")}constructor(e){super(e),this.name="Canceled"}};f();var E4=class extends Error{static{a(this,"ToolRoundExceedError")}constructor(){super('Oops, maximum tool attempts reached. You can type "continue" to proceed or rephrase your request.'),this.name="ToolRoundExceedError"}};f();var ttn=new Se("roundMetricsTracker"),nGe=class{constructor(e,r,n,o){this.ctx=e;this.conversation=r;this.turn=n;this.conversationProgress=o;this.cumulativeTokenUsage={promptTokens:0,completionTokens:0,cachedTokens:0};this.tokenUsageReported=!1;this.roundUsageHistory=[]}static{a(this,"RoundMetricsTracker")}getTimeSinceLastLLMCall(){return this.lastLlmCallEndTimeMs!==void 0?performance.now()-this.lastLlmCallEndTimeMs:void 0}recordLlmFetchComplete(){this.lastLlmCallEndTimeMs=performance.now()}computePromptPrefixMetrics(e,r){let n=JSON.stringify(e),o=JSON.stringify(r),s={previousPromptCharLen:this.previousPromptSerialized?.length??0,currentPromptCharLen:n.length,commonPromptPrefixCharLen:rtn(this.previousPromptSerialized,n),previousToolsCharLen:this.previousToolsSerialized?.length??0,currentToolsCharLen:o.length,commonToolsPrefixCharLen:rtn(this.previousToolsSerialized,o)};return this.previousPromptSerialized=n,this.previousToolsSerialized=o,s}extractRoundUsage(e){if("usage"in e&&e.usage)return{promptTokens:e.usage.prompt_tokens,completionTokens:e.usage.completion_tokens,cachedTokens:e.usage.prompt_tokens_details?.cached_tokens??0}}accumulateTokenUsage(e,r){r&&(this.cumulativeTokenUsage.promptTokens+=r.promptTokens,this.cumulativeTokenUsage.completionTokens+=r.completionTokens,this.cumulativeTokenUsage.cachedTokens+=r.cachedTokens,this.roundUsageHistory.push({roundId:e,usage:{...r}}))}logRoundDebugMetrics(e,r,n,o,s,c){let l=c;ttn.debug(this.ctx,`Round metrics for iteration ${e} for turn ${r}: prompt=[prev=${l.previousPromptCharLen}, cur=${l.currentPromptCharLen}, prefix=${l.commonPromptPrefixCharLen}`+(l.currentPromptCharLen>0?` (${(l.commonPromptPrefixCharLen/l.currentPromptCharLen*100).toFixed(1)}%)`:"")+`] tools=[prev=${l.previousToolsCharLen}, cur=${l.currentToolsCharLen}, prefix=${l.commonToolsPrefixCharLen}`+(l.currentToolsCharLen>0?` (${(l.commonToolsPrefixCharLen/l.currentToolsCharLen*100).toFixed(1)}%)`:"")+`] tokens=[prompt=${n?.promptTokens??"n/a"}, completion=${n?.completionTokens??"n/a"}, cached=${n?.cachedTokens??"n/a"}] timing=[llmFetch=${o.toFixed(0)}ms`+(s!==void 0?`, sinceLastLLM=${s.toFixed(0)}ms`:"")+"]")}async reportCumulativeTokenUsage(e){if(this.tokenUsageReported)return;this.tokenUsageReported=!0;let r=this.cumulativeTokenUsage;if((r.promptTokens>0||r.completionTokens>0)&&(ttn.info(this.ctx,`Turn token usage: ${r.promptTokens} prompt, ${r.completionTokens} completion, ${r.cachedTokens} cached`+(r.promptTokens>0?` (cache rate: ${(r.cachedTokens/r.promptTokens*100).toFixed(1)}%)`:"")),await this.conversationProgress.report(this.conversation,this.turn,{tokenUsage:{...r}}),vr(this.ctx,tt.AppendPromptTokenCache)==="true")){let n=this.formatTokenStats(r);await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:e,reply:n}]})}}formatTokenStats(e){let r=a(c=>c>=1e6?`${(c/1e6).toFixed(1)}M`:c>=1e3?`${(c/1e3).toFixed(1)}k`:c.toString(),"fmt"),n=e.promptTokens>0?` (${(e.cachedTokens/e.promptTokens*100).toFixed(1)}% cached)`:"",o=this.roundUsageHistory.length,s=` \`\`\` --- Prompt token stats: ${r(e.promptTokens)} in, ${r(e.completionTokens)} out, ${r(e.cachedTokens)} cached${n} with ${o} HTTP request${o!==1?"s":""} `;if(this.roundUsageHistory.length>1){s+=` Per-round breakdown: `;for(let c of this.roundUsageHistory){let l=c.usage,u=l.promptTokens>0?` (${(l.cachedTokens/l.promptTokens*100).toFixed(1)}%)`:"";s+=` #${c.roundId}: ${r(l.promptTokens)} in, ${r(l.completionTokens)} out, ${r(l.cachedTokens)} cached${u} -`}}return s+="```\n",s}};function nen(t,e){if(!t)return 0;let r=Math.min(t.length,e.length),n=0;for(;n{if(!r||typeof r!="object")return JGe.warn(this.ctx,"Invalid McpAutoApproveService config item: ignored because it is not an object",r),!1;let n=r,o=typeof n.serverName=="string"&&typeof n.isServerAllowed=="boolean"&&Array.isArray(n.allowedTools)&&n.allowedTools.every(s=>typeof s=="string");return o||JGe.warn(this.ctx,"Invalid McpAutoApproveService config item: ignored due to schema validation failure",r),o}).map(r=>({serverName:r.serverName,isServerAllowed:r.isServerAllowed,allowedTools:r.allowedTools})),JGe.debug(this.ctx,"Updated McpAutoApproveService config",this._config)}isApproved(e,r){let n=this._config.find(o=>o.serverName===e);return n?n.isServerAllowed?!0:n.allowedTools.includes(r):!1}};f();f();var G$=de(require("path"));var KT=class t{constructor(e){this.ctx=e;this.rules=void 0;this.defaultRules=[{pattern:"**/github-copilot/**/*",requiresConfirmation:!0,description:"Github Copilot settings and token files"},{pattern:"**/.github/instructions/*",requiresConfirmation:!0,description:"Github instructions files"}]}static{a(this,"FileSafetyRulesService")}static{this.logger=new Se("FileSafetyRulesService")}ensureInitialized(){this.rules===void 0&&(this.rules=[...this.defaultRules])}getMatchingRule(e,r,n=!0){let o=Lc(e);if(!this.isPathInCurrentWorkspace(o,r))return{rule:{pattern:"outside-workspace",requiresConfirmation:!0,description:"files outside workspace"},isOutsideWorkspace:!0};if(n){this.ensureInitialized();for(let c of this.rules)if(this.matchesPattern(e,c.pattern))return{rule:c,isOutsideWorkspace:!1}}}isPathInCurrentWorkspace(e,r){if(!r||r.length===0)return!1;try{let n=Qo(e);return r.some(o=>{try{let s=Qo(o),c=G$.normalize(s),l=G$.normalize(n),u=G$.relative(c,l);return!u.startsWith("..")&&!G$.isAbsolute(u)}catch{return!1}})}catch{return!1}}matchesPattern(e,r){return id(e,r,{nocase:!0,matchBase:!1,nobrace:!0,noext:!0,nonegate:!0,windowsPathsNoEscape:!0})}getDefaultRules(){return[...this.defaultRules]}extractFileSafetyRules(e){try{let r=e?.autoApprove;return Array.isArray(r)?r.filter(n=>n&&typeof n.pattern=="string"&&typeof n.autoApprove=="boolean").map(n=>({pattern:n.pattern,requiresConfirmation:!n.autoApprove,description:n.description})):Array.isArray(e)?e.filter(o=>o&&typeof o.pattern=="string"&&typeof o.autoApprove=="boolean").map(o=>({pattern:o.pattern,requiresConfirmation:!o.autoApprove,description:o.description})):void 0}catch(r){t.logger.error(this.ctx,"Error extracting configuration:",r);return}}updateRulesFromConfiguration(e){let r=this.extractFileSafetyRules(e);if(!(!r||r.length===0))try{this.ensureInitialized();let n=new Map;for(let o of this.defaultRules)n.set(o.pattern,o);for(let o of r)n.set(o.pattern,o);this.rules=Array.from(n.values())}catch(n){t.logger.error(this.ctx,"FileSafetyRulesService.updateRulesFromConfiguration: Failed to parse configuration, using defaults only",n),this.rules===void 0&&(this.rules=[...this.defaultRules])}}};f();var aen=`*** Begin Patch -`,Lie=` -*** End Patch`,Fie="*** Add File: ",WF="*** Delete File: ",Uie="*** Update File: ",J0o="*** Move to: ",q5t="*** End of File";var X0o=/\.(tex|latex|sty|cls|bib|bst|ins)$/i;var b0=class extends Error{static{a(this,"DiffError")}},Qie=class extends b0{static{a(this,"InvalidContextError")}constructor(e,r,n){super(e),this.file=r,this.kindForTelemetry=n}},Bk=class extends b0{static{a(this,"InvalidPatchFormatError")}constructor(e,r){super(e),this.kindForTelemetry=r}};function oen(t,e,r){let n=0,o=0;for(let s of t)s.startsWith(" ")?o++:(s.startsWith(" ")||s.startsWith(" "))&&n++;if(o>n)return{tabSize:e,insertSpaces:!1};if(n>o){let s=0,c=0;for(let u of t){let d=u.match(/^( +)/);if(d){let p=d[1].length;p%4===0&&c++,p%2===0&&s++}}return{tabSize:c>s?4:2,insertSpaces:!0}}return{tabSize:e,insertSpaces:r}}a(oen,"guessIndentation");function sen(t,e){let r=0;for(let n of t)if(n===" ")r++;else if(n===" ")r+=e;else break;return r}a(sen,"computeIndentLevel");function Z0o(t){return t.insertSpaces?" ".repeat(t.tabSize):" "}a(Z0o,"getIndentationChar");function epo(t,e,r){if(e.insertSpaces===r.insertSpaces&&e.tabSize===r.tabSize)return t;let n=t.match(/^(\s*)/);if(!n)return t;let o=n[1],s=t.slice(o.length),c=0;for(let u of o)u===" "?c+=e.tabSize:u===" "&&c++;return(r.insertSpaces?" ".repeat(c):" ".repeat(Math.floor(c/r.tabSize))+" ".repeat(c%r.tabSize))+s}a(epo,"transformIndentation");function tpo(t){return!t||!t.trim()}a(tpo,"isFalsyOrWhitespace");function rpo(t,e){let r=0;for(let n of t)n===e&&r++;return r}a(rpo,"countOccurrences");function npo(t,e){let r=t.length,n=e.length,o=Array.from({length:r+1},()=>Array(n+1).fill(0));for(let s=0;s<=r;s++)o[s][0]=s;for(let s=0;s<=n;s++)o[0][s]=s;for(let s=1;s<=r;s++)for(let c=1;c<=n;c++)t[s-1]===e[c-1]?o[s][c]=o[s-1][c-1]:o[s][c]=Math.min(o[s-1][c]+1,o[s][c-1]+1,o[s-1][c-1]+1);return o[r][n]}a(npo,"computeLevenshteinDistance");function n_e(t){return t.replace(/^(?:\s|\\t|\/|#)*/gm,e=>e.replaceAll("\\t"," "))}a(n_e,"replaceExplicitTabs");function XGe(t){return n_e(t.replaceAll("\\n",` -`))}a(XGe,"replaceExplicitNl");var G5t=class{constructor(e,r){this.indentStyles={};this.index=0;this.patch={actions:{}};this.fuzz=0;this.currentFiles=e,this.lines=r;for(let[n,o]of Object.entries(e)){let s=o.getText();this.indentStyles[n]=oen(s.split(` -`),4,!1)}}static{a(this,"Parser")}isDone(e){if(this.index>=this.lines.length)return!0;let r=this.lines[this.index];return!!(e&&r&&e.some(n=>r.startsWith(n.trim())))}startswith(e){let r=Array.isArray(e)?e:[e],n=this.lines[this.index];return n!==void 0&&r.some(o=>n.startsWith(o))}readStr(e="",r=!1){if(this.index>=this.lines.length)throw new b0(`Index: ${this.index} >= ${this.lines.length}`);let n=this.lines[this.index];if(n!==void 0&&n.startsWith(e)){let o=r?n:n.slice(e.length);return this.index+=1,o??""}return""}parse(){for(;!this.isDone([Lie]);){let e=this.readStr(Uie);if(e){if(this.patch.actions[e])throw new b0(`Update File Error: Duplicate Path: ${e}`);let r=this.readStr(J0o);if(!(e in this.currentFiles))throw new b0(`Update File Error: Missing File: ${e}`);let n=this.currentFiles[e],o=this.indentStyles[e],s=n.getText(),c=this.getFilepathComment(n.languageId,e),l=this.parseUpdateFile(c,s??"",o);l.movePath=r||void 0,this.patch.actions[e]=l;continue}if(e=this.readStr(WF),e){if(this.patch.actions[e])throw new b0(`Delete File Error: Duplicate Path: ${e}`);if(!(e in this.currentFiles))throw new b0(`Delete File Error: Missing File: ${e}`);this.patch.actions[e]={type:"delete",chunks:[]};continue}if(e=this.readStr(Fie),e){if(this.patch.actions[e])throw new b0(`Add File Error: Duplicate Path: ${e}`);if(e in this.currentFiles)throw new b0(`Add File Error: File already exists: ${e}`);this.patch.actions[e]=this.parseAddFile();continue}throw new b0(`Unknown Line: ${this.lines[this.index]}`)}if(!this.startswith(Lie.trim()))throw new Bk("Missing End Patch","missingEndPatch");this.index+=1}getFilepathComment(e,r){let n=r.split(".").pop()?.toLowerCase()??"",o=["sh","bash","zsh","py","rb","pl","yaml","yml"].includes(n),s=["html","htm","xml","svg"].includes(n);return o?`# ${r}`:s?``:`// ${r}`}parseUpdateFile(e,r,n){let o={type:"update",chunks:[]},s=r.split(` -`),c=!X0o.test(e.trimEnd()),l=0;for(;!this.isDone([Lie,Uie,WF,Fie,q5t]);){let u=this.readStr("@@",!0),d=u.slice(2).trim();if(!(u||l===0))throw new b0(`Invalid line. Consider splitting each change into individual apply_patch tool calls: +`}}return s+="```\n",s}};function rtn(t,e){if(!t)return 0;let r=Math.min(t.length,e.length),n=0;for(;n{if(!r||typeof r!="object")return oGe.warn(this.ctx,"Invalid McpAutoApproveService config item: ignored because it is not an object",r),!1;let n=r,o=typeof n.serverName=="string"&&typeof n.isServerAllowed=="boolean"&&Array.isArray(n.allowedTools)&&n.allowedTools.every(s=>typeof s=="string");return o||oGe.warn(this.ctx,"Invalid McpAutoApproveService config item: ignored due to schema validation failure",r),o}).map(r=>({serverName:r.serverName,isServerAllowed:r.isServerAllowed,allowedTools:r.allowedTools})),oGe.debug(this.ctx,"Updated McpAutoApproveService config",this._config)}isApproved(e,r){let n=this._config.find(o=>o.serverName===e);return n?n.isServerAllowed?!0:n.allowedTools.includes(r):!1}};f();f();var Yj=de(require("path"));var FT=class t{constructor(e){this.ctx=e;this.rules=void 0;this.defaultRules=[{pattern:"**/github-copilot/**/*",requiresConfirmation:!0,description:"Github Copilot settings and token files"},{pattern:"**/.github/instructions/*",requiresConfirmation:!0,description:"Github instructions files"}]}static{a(this,"FileSafetyRulesService")}static{this.logger=new Se("FileSafetyRulesService")}ensureInitialized(){this.rules===void 0&&(this.rules=[...this.defaultRules])}getMatchingRule(e,r,n=!0,o=!1){let s=kc(e);if(!this.isPathInCurrentWorkspace(s,r))return{rule:{pattern:"outside-workspace",requiresConfirmation:!0,description:"files outside workspace"},isOutsideWorkspace:!0};if(!n)return;o||this.ensureInitialized();let l=o?this.defaultRules:this.rules;for(let u of l)if(this.matchesPattern(e,u.pattern))return{rule:u,isOutsideWorkspace:!1}}isPathInCurrentWorkspace(e,r){if(!r||r.length===0)return!1;try{let n=Bo(e);return r.some(o=>{try{let s=Bo(o),c=Yj.normalize(s),l=Yj.normalize(n),u=Yj.relative(c,l);return!u.startsWith("..")&&!Yj.isAbsolute(u)}catch{return!1}})}catch{return!1}}matchesPattern(e,r){return Ku(e,r,{nocase:!0,matchBase:!1,nobrace:!0,noext:!0,nonegate:!0,windowsPathsNoEscape:!0})}getDefaultRules(){return[...this.defaultRules]}extractFileSafetyRules(e){try{let r=e?.autoApprove;return Array.isArray(r)?r.filter(n=>n&&typeof n.pattern=="string"&&typeof n.autoApprove=="boolean").map(n=>({pattern:n.pattern,requiresConfirmation:!n.autoApprove,description:n.description})):Array.isArray(e)?e.filter(o=>o&&typeof o.pattern=="string"&&typeof o.autoApprove=="boolean").map(o=>({pattern:o.pattern,requiresConfirmation:!o.autoApprove,description:o.description})):void 0}catch(r){t.logger.error(this.ctx,"Error extracting configuration:",r);return}}updateRulesFromConfiguration(e){let r=this.extractFileSafetyRules(e);if(!(!r||r.length===0))try{this.ensureInitialized();let n=new Map;for(let o of this.defaultRules)n.set(o.pattern,o);for(let o of r)n.set(o.pattern,o);this.rules=Array.from(n.values())}catch(n){t.logger.error(this.ctx,"FileSafetyRulesService.updateRulesFromConfiguration: Failed to parse configuration, using defaults only",n),this.rules===void 0&&(this.rules=[...this.defaultRules])}}};f();var stn=`*** Begin Patch +`,Kne=` +*** End Patch`,Jne="*** Add File: ",_F="*** Delete File: ",Xne="*** Update File: ",Xho="*** Move to: ",aMt="*** End of File";var Zho=/\.(tex|latex|sty|cls|bib|bst|ins)$/i;var y0=class extends Error{static{a(this,"DiffError")}},Zne=class extends y0{static{a(this,"InvalidContextError")}constructor(e,r,n){super(e),this.file=r,this.kindForTelemetry=n}},Tk=class extends y0{static{a(this,"InvalidPatchFormatError")}constructor(e,r){super(e),this.kindForTelemetry=r}};function itn(t,e,r){let n=0,o=0;for(let s of t)s.startsWith(" ")?o++:(s.startsWith(" ")||s.startsWith(" "))&&n++;if(o>n)return{tabSize:e,insertSpaces:!1};if(n>o){let s=0,c=0;for(let u of t){let d=u.match(/^( +)/);if(d){let p=d[1].length;p%4===0&&c++,p%2===0&&s++}}return{tabSize:c>s?4:2,insertSpaces:!0}}return{tabSize:e,insertSpaces:r}}a(itn,"guessIndentation");function otn(t,e){let r=0;for(let n of t)if(n===" ")r++;else if(n===" ")r+=e;else break;return r}a(otn,"computeIndentLevel");function emo(t){return t.insertSpaces?" ".repeat(t.tabSize):" "}a(emo,"getIndentationChar");function tmo(t,e,r){if(e.insertSpaces===r.insertSpaces&&e.tabSize===r.tabSize)return t;let n=t.match(/^(\s*)/);if(!n)return t;let o=n[1],s=t.slice(o.length),c=0;for(let u of o)u===" "?c+=e.tabSize:u===" "&&c++;return(r.insertSpaces?" ".repeat(c):" ".repeat(Math.floor(c/r.tabSize))+" ".repeat(c%r.tabSize))+s}a(tmo,"transformIndentation");function rmo(t){return!t||!t.trim()}a(rmo,"isFalsyOrWhitespace");function nmo(t,e){let r=0;for(let n of t)n===e&&r++;return r}a(nmo,"countOccurrences");function imo(t,e){let r=t.length,n=e.length,o=Array.from({length:r+1},()=>Array(n+1).fill(0));for(let s=0;s<=r;s++)o[s][0]=s;for(let s=0;s<=n;s++)o[0][s]=s;for(let s=1;s<=r;s++)for(let c=1;c<=n;c++)t[s-1]===e[c-1]?o[s][c]=o[s-1][c-1]:o[s][c]=Math.min(o[s-1][c]+1,o[s][c-1]+1,o[s-1][c-1]+1);return o[r][n]}a(imo,"computeLevenshteinDistance");function t_e(t){return t.replace(/^(?:\s|\\t|\/|#)*/gm,e=>e.replaceAll("\\t"," "))}a(t_e,"replaceExplicitTabs");function sGe(t){return t_e(t.replaceAll("\\n",` +`))}a(sGe,"replaceExplicitNl");var cMt=class{constructor(e,r){this.indentStyles={};this.index=0;this.patch={actions:{}};this.fuzz=0;this.currentFiles=e,this.lines=r;for(let[n,o]of Object.entries(e)){let s=o.getText();this.indentStyles[n]=itn(s.split(` +`),4,!1)}}static{a(this,"Parser")}isDone(e){if(this.index>=this.lines.length)return!0;let r=this.lines[this.index];return!!(e&&r&&e.some(n=>r.startsWith(n.trim())))}startswith(e){let r=Array.isArray(e)?e:[e],n=this.lines[this.index];return n!==void 0&&r.some(o=>n.startsWith(o))}readStr(e="",r=!1){if(this.index>=this.lines.length)throw new y0(`Index: ${this.index} >= ${this.lines.length}`);let n=this.lines[this.index];if(n!==void 0&&n.startsWith(e)){let o=r?n:n.slice(e.length);return this.index+=1,o??""}return""}parse(){for(;!this.isDone([Kne]);){let e=this.readStr(Xne);if(e){if(this.patch.actions[e])throw new y0(`Update File Error: Duplicate Path: ${e}`);let r=this.readStr(Xho);if(!(e in this.currentFiles))throw new y0(`Update File Error: Missing File: ${e}`);let n=this.currentFiles[e],o=this.indentStyles[e],s=n.getText(),c=this.getFilepathComment(n.languageId,e),l=this.parseUpdateFile(c,s??"",o);l.movePath=r||void 0,this.patch.actions[e]=l;continue}if(e=this.readStr(_F),e){if(this.patch.actions[e])throw new y0(`Delete File Error: Duplicate Path: ${e}`);if(!(e in this.currentFiles))throw new y0(`Delete File Error: Missing File: ${e}`);this.patch.actions[e]={type:"delete",chunks:[]};continue}if(e=this.readStr(Jne),e){if(this.patch.actions[e])throw new y0(`Add File Error: Duplicate Path: ${e}`);if(e in this.currentFiles)throw new y0(`Add File Error: File already exists: ${e}`);this.patch.actions[e]=this.parseAddFile();continue}throw new y0(`Unknown Line: ${this.lines[this.index]}`)}if(!this.startswith(Kne.trim()))throw new Tk("Missing End Patch","missingEndPatch");this.index+=1}getFilepathComment(e,r){let n=r.split(".").pop()?.toLowerCase()??"",o=["sh","bash","zsh","py","rb","pl","yaml","yml"].includes(n),s=["html","htm","xml","svg"].includes(n);return o?`# ${r}`:s?``:`// ${r}`}parseUpdateFile(e,r,n){let o={type:"update",chunks:[]},s=r.split(` +`),c=!Zho.test(e.trimEnd()),l=0;for(;!this.isDone([Kne,Xne,_F,Jne,aMt]);){let u=this.readStr("@@",!0),d=u.slice(2).trim();if(!(u||l===0))throw new y0(`Invalid line. Consider splitting each change into individual apply_patch tool calls: ${this.lines[this.index]}`);if(d){let _=!1,v=a(b=>this.canonicalize(b),"canonLocal");if(!s.slice(0,l).some(b=>v(b)===v(d)))for(let b=l;bv(b.trim())===v(d)))for(let b=l;b0&&(p=this.peekNextSection(this.lines,this.index,_)),h=this.findContext(e,s,p.nextChunkContext,l,p.eof),h||(h=this.findContext(e,s,p.nextChunkContext,0,p.eof)),_>0&&h&&(h.fuzz|=64);if(!h){let _=p.nextChunkContext.join(` -`);if(p.eof)throw new Qie(`Invalid EOF context at character ${l}: -${_}`,r,"invalidContext-eof");{let v=_.match(/^\\t/)?"invalidContext-maybeInvalidTab":_.match(/^\\\t/)?"invalidContext-maybeEscapedTab":"invalidContext";throw new Qie(`Invalid context at character ${l}: -${_}`,r,v)}}this.fuzz+=h.fuzz;let m=oen(p.chunks.flatMap(_=>_.insLines).concat(p.nextChunkContext),n.tabSize,n.insertSpaces),g=sen(s[h.line]??"",n.tabSize),A=h.fuzz&4?n_e(p.nextChunkContext[0]??""):h.fuzz&128?XGe(p.nextChunkContext[0]??""):p.nextChunkContext[0]??"",y=p.nextChunkContext&&p.nextChunkContext.length>0?sen(A,m.tabSize):0,E=Z0o(n).repeat(Math.max(0,g-y));for(let _ of p.chunks)_.origIndex+=h.line,h.fuzz&128&&(_.insLines=_.insLines.map(XGe),_.delLines=_.delLines.map(XGe)),(c||h.fuzz&4)&&(_.insLines=_.insLines.map(n_e)),_.insLines=_.insLines.map(v=>tpo(v)?v:E+epo(v,m,n)),h.fuzz&4&&(_.delLines=_.delLines.map(n_e)),o.chunks.push(_);l=h.line+p.nextChunkContext.length,this.index=p.endPatchIndex}return o}parseAddFile(){let e=[];for(;!this.isDone([Lie,Uie,WF,Fie]);){let r=this.readStr();if(!r.startsWith("+"))throw new Bk(`Invalid Add File Line: ${r}`,"invalidAddFileLine");e.push(r.slice(1))}return{type:"add",newFile:e.join(` +`);if(p.eof)throw new Zne(`Invalid EOF context at character ${l}: +${_}`,r,"invalidContext-eof");{let v=_.match(/^\\t/)?"invalidContext-maybeInvalidTab":_.match(/^\\\t/)?"invalidContext-maybeEscapedTab":"invalidContext";throw new Zne(`Invalid context at character ${l}: +${_}`,r,v)}}this.fuzz+=h.fuzz;let m=itn(p.chunks.flatMap(_=>_.insLines).concat(p.nextChunkContext),n.tabSize,n.insertSpaces),g=otn(s[h.line]??"",n.tabSize),A=h.fuzz&4?t_e(p.nextChunkContext[0]??""):h.fuzz&128?sGe(p.nextChunkContext[0]??""):p.nextChunkContext[0]??"",y=p.nextChunkContext&&p.nextChunkContext.length>0?otn(A,m.tabSize):0,E=emo(n).repeat(Math.max(0,g-y));for(let _ of p.chunks)_.origIndex+=h.line,h.fuzz&128&&(_.insLines=_.insLines.map(sGe),_.delLines=_.delLines.map(sGe)),(c||h.fuzz&4)&&(_.insLines=_.insLines.map(t_e)),_.insLines=_.insLines.map(v=>rmo(v)?v:E+tmo(v,m,n)),h.fuzz&4&&(_.delLines=_.delLines.map(t_e)),o.chunks.push(_);l=h.line+p.nextChunkContext.length,this.index=p.endPatchIndex}return o}parseAddFile(){let e=[];for(;!this.isDone([Kne,Xne,_F,Jne]);){let r=this.readStr();if(!r.startsWith("+"))throw new Tk(`Invalid Add File Line: ${r}`,"invalidAddFileLine");e.push(r.slice(1))}return{type:"add",newFile:e.join(` `),chunks:[]}}canonicalize(e){let r={"-":"-","\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2212":"-",'"':'"',"\u201C":'"',"\u201D":'"',"\u201E":'"',"\xAB":'"',"\xBB":'"',"'":"'","\u2018":"'","\u2019":"'","\u201B":"'","\xA0":" ","\u202F":" "};return e.normalize("NFC").replace(/./gu,n=>r[n]??n)}findContextCore(e,r,n){if(r.length===0)return{line:n,fuzz:0};let o=a(m=>this.canonicalize(m),"canon"),s=o(r.join(` `)),c=e.map(o);for(let m=n;mm.trimEnd()).join(` `),u=2;for(let m=n;mm.trim()).join(` `);u|=8;for(let m=n;m0){let m=p.split(` -`);for(let g=n;g(y[y.Add=0]="Add",y[y.Delete=1]="Delete",y[y.Keep=2]="Keep"))(o||={});let s=r,c=[],l=[],u=[],d=[],p=2,h=0;for(;sm.startsWith(y.trim()))){p===2&&c.length&&!/\S/.test(c[c.length-1]??"")&&c.pop();break}if(m==="***")break;if(m.startsWith("***"))throw new Bk(`Invalid Line: ${m}`,"invalidLine");s+=1;let g=p,A=m;if(A[0]==="+")p=0;else if(A[0]==="-")p=1;else if(A[0]===" ")p=2;else{let y=e[s],E=y?.[0]==="+"?0:y?.[0]==="-"?1:2,_=p!==2&&E===p;p=2,A=" "+A,_&&(h++,n===h&&(p=E))}A=A.slice(1),p===2&&g!==p&&((u.length||l.length)&&d.push({origIndex:c.length-l.length,delLines:l,insLines:u}),l=[],u=[]),p===1?(l.push(A),c.push(A)):p===0?u.push(A):c.push(A)}return(u.length||l.length)&&d.push({origIndex:c.length-l.length,delLines:l,insLines:u}),sn.length)throw new b0(`${r}: chunk.origIndex ${c.origIndex} > len(lines) ${n.length}`);if(s>c.origIndex)throw new b0(`${r}: origIndex ${s} > chunk.origIndex ${c.origIndex}`);o.push(...n.slice(s,c.origIndex));let l=c.origIndex-s;if(s+=l,c.insLines.length)for(let u of c.insLines)o.push(u);s+=c.delLines.length}return o.push(...n.slice(s)),o.join(` -`)}a(opo,"getUpdatedFile");function spo(t,e){let r={changes:{}};for(let[n,o]of Object.entries(t.actions))if(o.type==="delete")r.changes[n]={type:"delete",oldContent:e[n].getText()};else if(o.type==="add")r.changes[n]={type:"add",newContent:o.newFile??""};else if(o.type==="update"){let s=e[n]?.getText(),c=opo(s??"",o,n);r.changes[n]={type:"update",oldContent:s,newContent:c,movePath:o.movePath??void 0}}return r}a(spo,"patchToCommit");async function apo(t,e){let r={};for(let n of t)try{r[n]=await e(n)}catch{throw new b0(`File not found: ${n}`)}return r}a(apo,"loadFiles");async function len(t,e){if(!t.startsWith(aen))throw new Bk("Patch must start with *** Begin Patch\\n","patchMustStartWithBeginPatch");let r=H$(t),n=await apo(r,e),[o]=ipo(t,n);return spo(o,n)}a(len,"processPatch");var Lk=class{static{a(this,"SensitiveToolsService")}static{this.SENSITIVE_TOOL_TEXT={create_file:{title:"Allow creating sensitive files?",operation:"create"},read_file:{title:"Allow reading sensitive files?",operation:"read"},replace_string_in_file:{title:"Allow replacing strings in sensitive files?",operation:"replace strings in"},insert_edit_into_file:{title:"Allow editing sensitive files?",operation:"edit"},apply_patch:{title:"Allow editing sensitive files?",operation:"edit"}}}static{this.POTENTIALLY_SENSITIVE_TOOLS=new Set(["insert_edit_into_file","create_file","read_file","replace_string_in_file","apply_patch"])}static isPotentiallySensitiveTool(e){let r=typeof e=="string"?e:e.name;return this.POTENTIALLY_SENSITIVE_TOOLS.has(r)}static getPotentiallySensitiveTools(){return this.POTENTIALLY_SENSITIVE_TOOLS}static generateSensitiveConfirmationTitle(e){return this.SENSITIVE_TOOL_TEXT[e.name]?.title??"Allow operating on sensitive files?"}static generateSensitiveOperation(e){return this.SENSITIVE_TOOL_TEXT[e.name]?.operation??"operate on"}static extractFilePath(e,r){if(e.name==="apply_patch"){let s=r.input;if(!s)return;let c=H$(s),l=qie(s);return c.length>0?{filePath:c[0],isNewFile:!1}:l.length>0?{filePath:l[0],isNewFile:!0}:void 0}let n=r.filePath;if(!n)return;let o=e.name==="create_file";return{filePath:n,isNewFile:o}}static extractFilePathForMetadata(e,r){return this.extractFilePath(e,r)}static{this.sensitiveInfoCache=new WeakMap}static generateSensitiveConfirmationMessage(e,r,n){if(this.sensitiveInfoCache.has(r))return this.sensitiveInfoCache.get(r)??void 0;let o=this.computeSensitiveConfirmationMessage(e,r,n);return this.sensitiveInfoCache.set(r,o??null),o}static getMatchingRuleForToolCall(e,r,n){let o=this.extractFilePath(e,r);if(!o)return;let{filePath:s,isNewFile:c}=o,l=n.turn.workspaceFolders?.map(p=>p.uri),u=n.ctx.get(KT),d=!c;return u.getMatchingRule(s,l,d)}static computeSensitiveConfirmationMessage(e,r,n){if(!this.isPotentiallySensitiveTool(e))return;let o=this.extractFilePath(e,r);if(!o)return;let{filePath:s,isNewFile:c}=o,l=n.turn.workspaceFolders?.map(g=>g.uri),u=n.ctx.get(KT),d=!c,p=u.getMatchingRule(s,l,d);if(p&&!p.rule.requiresConfirmation)return;let h=this.generateSensitiveConfirmationTitle(e),m=this.generateSensitiveOperation(e);if(p){let g=p.rule.description||"Sensitive files";return{title:h,message:`${g} needs confirmation. +`);for(let g=n;g(y[y.Add=0]="Add",y[y.Delete=1]="Delete",y[y.Keep=2]="Keep"))(o||={});let s=r,c=[],l=[],u=[],d=[],p=2,h=0;for(;sm.startsWith(y.trim()))){p===2&&c.length&&!/\S/.test(c[c.length-1]??"")&&c.pop();break}if(m==="***")break;if(m.startsWith("***"))throw new Tk(`Invalid Line: ${m}`,"invalidLine");s+=1;let g=p,A=m;if(A[0]==="+")p=0;else if(A[0]==="-")p=1;else if(A[0]===" ")p=2;else{let y=e[s],E=y?.[0]==="+"?0:y?.[0]==="-"?1:2,_=p!==2&&E===p;p=2,A=" "+A,_&&(h++,n===h&&(p=E))}A=A.slice(1),p===2&&g!==p&&((u.length||l.length)&&d.push({origIndex:c.length-l.length,delLines:l,insLines:u}),l=[],u=[]),p===1?(l.push(A),c.push(A)):p===0?u.push(A):c.push(A)}return(u.length||l.length)&&d.push({origIndex:c.length-l.length,delLines:l,insLines:u}),sn.length)throw new y0(`${r}: chunk.origIndex ${c.origIndex} > len(lines) ${n.length}`);if(s>c.origIndex)throw new y0(`${r}: origIndex ${s} > chunk.origIndex ${c.origIndex}`);o.push(...n.slice(s,c.origIndex));let l=c.origIndex-s;if(s+=l,c.insLines.length)for(let u of c.insLines)o.push(u);s+=c.delLines.length}return o.push(...n.slice(s)),o.join(` +`)}a(smo,"getUpdatedFile");function amo(t,e){let r={changes:{}};for(let[n,o]of Object.entries(t.actions))if(o.type==="delete")r.changes[n]={type:"delete",oldContent:e[n].getText()};else if(o.type==="add")r.changes[n]={type:"add",newContent:o.newFile??""};else if(o.type==="update"){let s=e[n]?.getText(),c=smo(s??"",o,n);r.changes[n]={type:"update",oldContent:s,newContent:c,movePath:o.movePath??void 0}}return r}a(amo,"patchToCommit");async function cmo(t,e){let r={};for(let n of t)try{r[n]=await e(n)}catch{throw new y0(`File not found: ${n}`)}return r}a(cmo,"loadFiles");async function ctn(t,e){if(!t.startsWith(stn))throw new Tk("Patch must start with *** Begin Patch\\n","patchMustStartWithBeginPatch");let r=Kj(t),n=await cmo(r,e),[o]=omo(t,n);return amo(o,n)}a(ctn,"processPatch");var Sk=class{static{a(this,"SensitiveToolsService")}static{this.SENSITIVE_TOOL_TEXT={create_file:{title:"Allow creating sensitive files?",operation:"create"},read_file:{title:"Allow reading sensitive files?",operation:"read"},replace_string_in_file:{title:"Allow replacing strings in sensitive files?",operation:"replace strings in"},insert_edit_into_file:{title:"Allow editing sensitive files?",operation:"edit"},apply_patch:{title:"Allow editing sensitive files?",operation:"edit"}}}static{this.POTENTIALLY_SENSITIVE_TOOLS=new Set(["insert_edit_into_file","create_file","read_file","replace_string_in_file","apply_patch"])}static isPotentiallySensitiveTool(e){let r=typeof e=="string"?e:e.name;return this.POTENTIALLY_SENSITIVE_TOOLS.has(r)}static getPotentiallySensitiveTools(){return this.POTENTIALLY_SENSITIVE_TOOLS}static generateSensitiveConfirmationTitle(e){return this.SENSITIVE_TOOL_TEXT[e.name]?.title??"Allow operating on sensitive files?"}static generateSensitiveOperation(e){return this.SENSITIVE_TOOL_TEXT[e.name]?.operation??"operate on"}static extractFilePath(e,r){if(e.name==="apply_patch"){let s=r.input;if(!s)return;let c=Kj(s),l=eie(s);return c.length>0?{filePath:c[0],isNewFile:!1}:l.length>0?{filePath:l[0],isNewFile:!0}:void 0}let n=r.filePath;if(!n)return;let o=e.name==="create_file";return{filePath:n,isNewFile:o}}static extractFilePathForMetadata(e,r){return this.extractFilePath(e,r)}static{this.sensitiveInfoCache=new WeakMap}static generateSensitiveConfirmationMessage(e,r,n){if(this.sensitiveInfoCache.has(r))return this.sensitiveInfoCache.get(r)??void 0;let o=this.computeSensitiveConfirmationMessage(e,r,n);return this.sensitiveInfoCache.set(r,o??null),o}static getMatchingRuleForToolCall(e,r,n,o=!1){let s=this.extractFilePath(e,r);if(!s)return;let{filePath:c,isNewFile:l}=s,u=n.turn.workspaceFolders?.map(h=>h.uri),d=n.ctx.get(FT),p=!l;return d.getMatchingRule(c,u,p,o)}static computeSensitiveConfirmationMessage(e,r,n){if(!this.isPotentiallySensitiveTool(e))return;let o=this.extractFilePath(e,r);if(!o)return;let{filePath:s,isNewFile:c}=o,l=n.turn.workspaceFolders?.map(g=>g.uri),u=n.ctx.get(FT),d=!c,p=u.getMatchingRule(s,l,d);if(p&&!p.rule.requiresConfirmation)return;let h=this.generateSensitiveConfirmationTitle(e),m=this.generateSensitiveOperation(e);if(p){let g=p.rule.description||"Sensitive files";return{title:h,message:`${g} needs confirmation. The model wants to ${m} sensitive files (${s})${p.rule.pattern?` matching pattern \`${p.rule.pattern}\``:""}. -Do you want to allow this?`,matchingRuleInfo:p}}return{title:h,message:`The model wants to ${m} file (${s}). Do you want to allow this?`,matchingRuleInfo:void 0}}};var i_e=new Se("AutoApproveService"),j$=class{constructor(e){this.ctx=e}static{a(this,"AutoApproveService")}async checkApproval(e,r,n){if(BI()&&process.env.HMAC_SECRET)return{needConfirm:!1};let o=this.classifyTool(r);if(o==="other")return i_e.debug(this.ctx,"Auto approve check for build-in safe tool decided: approve (always auto-approved)"),{needConfirm:!1};if(!ien(this.ctx))return i_e.info(this.ctx,"Tool confirmation required: auto-approval disabled by policy"),{needConfirm:!0};if(vr(e.ctx,tt.AutoApproveYoloMode)===!0)return i_e.info(this.ctx,`Auto approve yolo mode: auto-approving ${o} tool call`),{needConfirm:!1};let s=vr(e.ctx,tt.ToolConfirmAutoApprove)===!0,c;switch(o){case"mcp":c=this.checkMcpApproval(r),c.action==="continue"&&(c=s?{action:"approve"}:{action:"confirm"});break;case"terminal":{if(c=await this.checkTerminalApproval(r,n),c.action==="continue"){let u=vr(e.ctx,tt.AutoApproveUnmatchedTerminal);u!==void 0?c=u?{action:"approve"}:{action:"confirm"}:c=s?{action:"approve"}:{action:"confirm"}}break}case"file-operation":{if(c=this.checkSensitiveFileApproval(r,n,e),c.action==="continue"){let u=vr(e.ctx,tt.AutoApproveUnmatchedFileOp);u!==void 0?c=u?{action:"approve"}:{action:"confirm"}:c={action:"approve"}}break}}let l=c.action==="confirm";return i_e.debug(this.ctx,`Auto approve check (${o}) decided: ${c.action}`),{needConfirm:l}}classifyTool(e){return e.type==="mcp"?"mcp":e.id.includes("run_in_terminal")?"terminal":Lk.isPotentiallySensitiveTool(e)?"file-operation":"other"}checkMcpApproval(e){if(this.ctx.get(FO).isApproved(e.toolProvider.id,e.name))return{action:"approve"};if(vr(this.ctx,tt.TrustToolAnnotations)){let o=this.ctx.get(Po).getToolById(e.id);if(o?.annotations?.readOnlyHint&&!o.annotations.openWorldHint)return{action:"approve"}}return{action:"continue"}}async checkTerminalApproval(e,r){let n=r.command,o=this.ctx.get(uw),c=Rie(e.description)||"sh";i_e.info(this.ctx,`Extracted shell '${c}' from run_in_terminal tool description.`);let l=await o.isTerminalCommandApprovalRequired(n,c);return l.result==="approved"?{action:"approve"}:l.result==="denied"?{action:"confirm"}:{action:"continue"}}checkSensitiveFileApproval(e,r,n){let o=Lk.getMatchingRuleForToolCall(e,r,n);return o?o.rule.requiresConfirmation?{action:"confirm"}:{action:"approve"}:{action:"continue"}}};f();f();f();function o_e(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n"u"}a(lpo,"isUndefined");function H5t(t){return Buffer.from(t,"base64").toString("utf-8")}a(H5t,"decodeBase64");function fen(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(fen,"isObject");f();var zF="activate_",yy=class t{constructor(e,r,n,o,s=[]){this.name=e;this.description=r;this.lastUsedOnTurn=n;this.metadata=o;this.contents=s;this.isExpanded=!1;if(!e.startsWith(zF))throw new Error(`Virtual tool name must start with '${zF}'`);this.name=e,this.description=r,this.lastUsedOnTurn=n,this.metadata=o,this.contents=s}static{a(this,"VirtualTool")}cloneWithPrefix(e){return new t(zF+e+this.name.slice(zF.length),this.description,this.lastUsedOnTurn,{...this.metadata,possiblePrefix:void 0},this.contents)}find(e){if(this.name===e)return{tool:this,path:[]};for(let r of this.contents)if(r instanceof t){let n=r.find(e);if(n)return n.path.unshift(this),n}else if(r.nameForModel===e)return{tool:r,path:[this]}}getLowestExpandedTool(){let e;for(let r of this.all())r instanceof t&&r.isExpanded&&(!e||r.lastUsedOnTurn${e.description}`,vscpp("br",null))}},j5t=class extends Zt{static{a(this,"ExistingGroupInformation")}renderCopilot(){let{group:e}=this.props;return vscpp(vscppf,null,``,vscpp("br",null),`${e.summary}`,vscpp("br",null),e.tools.map(r=>` -`),"",vscpp("br",null))}},ZGe=class extends Zt{static{a(this,"GeneralSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(YF.SystemMessage,null,"Context: There are many tools available for a user. However, the number of tools can be large, and it is not always practical to present all of them at once. We need to create a summary of them that accurately reflects the capabilities they provide.",vscpp("br",null),vscpp("br",null),"The user present you with the tools available to them, and you must create a summary of the tools that is accurate and comprehensive. The summary should include the capabilities of the tools and when they should be used.",vscpp("br",null)),vscpp(YF.UserMessage,null,this.props.tools.map(e=>vscpp(s_e,{tool:e})),vscpp("br",null),vscpp("br",null),"Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"object",required:["name","summary"],properties:{summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'},name:{type:"string",description:"A short name for the group. It may only contain the characters a-z, A-Z, 0-9, and underscores.",example:"foo_language_tools"}}},null,2)))}},eHe=class extends Zt{static{a(this,"CategorizerSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(YF.SystemMessage,null,"Context: There are many tools available for a user. However, the number of tools can be large, and it is not always practical to present all of them at once. We need to create logical groups for the user to pick from at a glance.",vscpp("br",null),vscpp("br",null),"The user present you with the tools available to them, and you must group them into logical categories and provide a summary of each one. The summary should include the capabilities of the tools and when they should be used. Every tool MUST be a part of EXACTLY one category. Category names in your response MUST be unique\u2014do not reuse the same name for different categories. If two categories would share a base name, append a short, descriptive suffix to disambiguate (e.g., python_tools_testing vs python_tools_packaging).",vscpp("br",null)),vscpp(YF.UserMessage,null,this.props.tools.map(e=>vscpp(s_e,{tool:e})),vscpp("br",null),vscpp("br",null),"You MUST make sure every tool is part of a category. Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"array",items:{type:"object",required:["name","tools","summary"],properties:{name:{type:"string",description:"A short, unique name for the category across this response. It may only contain the characters a-z, A-Z, 0-9, and underscores. If a potential collision exists, add a short suffix to keep names unique (e.g., _testing, _packaging).",example:"foo_language_tools"},tools:{type:"array",description:"The tool names that are part of this category.",items:{type:"string"}},summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'}}}},null,2)))}},tHe=class extends Zt{static{a(this,"ExistingGroupCategorizerPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(YF.SystemMessage,null,"Context: There are existing tool categories that have been previously established. New tools have become available and need to be categorized. You must decide whether each new tool fits into an existing category or requires a new category to be created.",vscpp("br",null),vscpp("br",null),"The user will provide you with the existing categories and their current tools, as well as the new tools that need to be categorized. You must assign each new tool to either an existing category (if it fits well) or create new categories as needed. You should also return all existing tools in their current categories unless there's a compelling reason to reorganize them.",vscpp("br",null),vscpp("br",null),"Every tool (both existing and new) MUST be part of EXACTLY one category in your response. Category names MUST be unique within the response. If a new category would conflict with an existing category name, choose a distinct, disambiguating name.",vscpp("br",null)),vscpp(YF.UserMessage,null,"**Existing Categories:**",vscpp("br",null),this.props.existingGroups.map(e=>vscpp(j5t,{group:e})),vscpp("br",null),"**New Tools to Categorize:**",vscpp("br",null),this.props.newTools.map(e=>vscpp(s_e,{tool:e})),vscpp("br",null),vscpp("br",null),"Instructions:",vscpp("br",null),"1. For each new tool, determine if it fits well into an existing category or if it needs a new category",vscpp("br",null),"2. Keep existing tools in their current categories unless there's a strong reason to move them",vscpp("br",null),"3. Create new categories only when new tools don't fit well into existing ones",vscpp("br",null),"4. Every tool (existing + new) MUST appear in exactly one category",vscpp("br",null),vscpp("br",null),"Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"array",items:{type:"object",required:["name","tools","summary"],properties:{name:{type:"string",description:"A short, unique name for the category across this response. It may only contain the characters a-z, A-Z, 0-9, and underscores. Do not reuse names; add a short suffix if needed to avoid collisions.",example:"foo_language_tools"},tools:{type:"array",description:"The tool names that are part of this category.",items:{type:"string"}},summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'}}}},null,2)))}};f();f();f();var Z5t={};Ri(Z5t,{arrayReplaceAt:()=>X5t,assign:()=>jie,escapeHtml:()=>QO,escapeRE:()=>Vpo,fromCodePoint:()=>l_e,has:()=>Opo,isMdAsciiPunct:()=>W$,isPunctChar:()=>V$,isSpace:()=>ls,isString:()=>pHe,isValidEntityCode:()=>hHe,isWhiteSpace:()=>$$,lib:()=>Wpo,normalizeReference:()=>z$,unescapeAll:()=>UO,unescapeMd:()=>Qpo});f();var sHe={};Ri(sHe,{decode:()=>a_e,encode:()=>iHe,format:()=>Gie,parse:()=>c_e});f();f();var pen={};function upo(t){let e=pen[t];if(e)return e;e=pen[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);e.push(n)}for(let r=0;r=55296&&p<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(p),s+=6;continue}}if((l&248)===240&&s+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(h-=65536,o+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),s+=9;continue}}o+="\uFFFD"}return o})}a(rHe,"decode");rHe.defaultChars=";/?:@&=+$,#";rHe.componentChars="";var a_e=rHe;f();var hen={};function dpo(t){let e=hen[t];if(e)return e;e=hen[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r"u"&&(r=!0);let n=dpo(e),o="";for(let s=0,c=t.length;s=55296&&l<=57343){if(l>=55296&&l<=56319&&s+1=56320&&u<=57343){o+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(t[s])}return o}a(nHe,"encode");nHe.defaultChars=";/?:@&=+$,-_.!~*'()#";nHe.componentChars="-_.!~*'()";var iHe=nHe;f();function Gie(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}a(Gie,"format");f();function oHe(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}a(oHe,"Url");var fpo=/^([a-z0-9.+-]+:)/i,ppo=/:[0-9]*$/,hpo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,mpo=["<",">",'"',"`"," ","\r",` -`," "],gpo=["{","}","|","\\","^","`"].concat(mpo),Apo=["'"].concat(gpo),men=["%","/","?",";","#"].concat(Apo),gen=["/","?","#"],ypo=255,Aen=/^[+a-z0-9A-Z_-]{0,63}$/,Epo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,yen={javascript:!0,"javascript:":!0},Een={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cpo(t,e){if(t&&t instanceof oHe)return t;let r=new oHe;return r.parse(t,e),r}a(Cpo,"urlParse");oHe.prototype.parse=function(t,e){let r,n,o,s=t;if(s=s.trim(),!e&&t.split("#").length===1){let d=hpo.exec(s);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let c=fpo.exec(s);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,s=s.substr(c.length)),(e||c||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=s.substr(0,2)==="//",o&&!(c&¥[c])&&(s=s.substr(2),this.slashes=!0)),!yen[c]&&(o||c&&!Een[c])){let d=-1;for(let A=0;A127?v+="x":v+=_[b];if(!v.match(Aen)){let b=A.slice(0,y),I=A.slice(y+1),x=_.match(Epo);x&&(b.push(x[1]),I.unshift(x[2])),I.length&&(s=I.join(".")+s),this.hostname=b.join(".");break}}}}this.hostname.length>ypo&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=s.indexOf("#");l!==-1&&(this.hash=s.substr(l),s=s.slice(0,l));let u=s.indexOf("?");return u!==-1&&(this.search=s.substr(u),s=s.slice(0,u)),s&&(this.pathname=s),Een[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};oHe.prototype.parseHost=function(t){let e=ppo.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var c_e=Cpo;var $5t={};Ri($5t,{Any:()=>aHe,Cc:()=>cHe,Cf:()=>Cen,P:()=>Hie,S:()=>lHe,Z:()=>uHe});f();f();var aHe=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;f();var cHe=/[\0-\x1F\x7F-\x9F]/;f();var Cen=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;f();var Hie=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;f();var lHe=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;f();var uHe=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;f();f();f();var _en=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));f();var ven=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));f();var V5t,_po=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),W5t=(V5t=String.fromCodePoint)!==null&&V5t!==void 0?V5t:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function z5t(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=_po.get(t))!==null&&e!==void 0?e:t}a(z5t,"replaceCodePoint");var Ih;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(Ih||(Ih={}));var vpo=32,KF;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(KF||(KF={}));function Y5t(t){return t>=Ih.ZERO&&t<=Ih.NINE}a(Y5t,"isNumber");function bpo(t){return t>=Ih.UPPER_A&&t<=Ih.UPPER_F||t>=Ih.LOWER_A&&t<=Ih.LOWER_F}a(bpo,"isHexadecimalCharacter");function Tpo(t){return t>=Ih.UPPER_A&&t<=Ih.UPPER_Z||t>=Ih.LOWER_A&&t<=Ih.LOWER_Z||Y5t(t)}a(Tpo,"isAsciiAlphaNumeric");function Spo(t){return t===Ih.EQUALS||Tpo(t)}a(Spo,"isEntityInAttributeInvalidEnd");var Sh;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Sh||(Sh={}));var Fk;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Fk||(Fk={}));var dHe=class{static{a(this,"EntityDecoder")}constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=Sh.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Fk.Strict}startEntity(e){this.decodeMode=e,this.state=Sh.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case Sh.EntityStart:return e.charCodeAt(r)===Ih.NUM?(this.state=Sh.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=Sh.NamedEntity,this.stateNamedEntity(e,r));case Sh.NumericStart:return this.stateNumericStart(e,r);case Sh.NumericDecimal:return this.stateNumericDecimal(e,r);case Sh.NumericHex:return this.stateNumericHex(e,r);case Sh.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|vpo)===Ih.LOWER_X?(this.state=Sh.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=Sh.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,o){if(r!==n){let s=n-r;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(r,s),o),this.consumed+=s}}stateNumericHex(e,r){let n=r;for(;r>14;for(;r>14,s!==0){if(c===Ih.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Fk.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:r,decodeTree:n}=this,o=(n[r]&KF.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){let{decodeTree:o}=this;return this.emitCodePoint(r===1?o[e]&~KF.VALUE_LENGTH:o[e+1],n),r===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Sh.NamedEntity:return this.result!==0&&(this.decodeMode!==Fk.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Sh.NumericDecimal:return this.emitNumericEntity(0,2);case Sh.NumericHex:return this.emitNumericEntity(0,3);case Sh.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Sh.EntityStart:return 0}}};function ben(t){let e="",r=new dHe(t,n=>e+=W5t(n));return a(function(o,s){let c=0,l=0;for(;(l=o.indexOf("&",l))>=0;){e+=o.slice(c,l),r.startEntity(s);let d=r.write(o,l+1);if(d<0){c=l+r.end();break}c=l+d,l=d===0?c+1:c}let u=e+o.slice(c);return e="",u},"decodeWithTrie")}a(ben,"getDecoder");function Ipo(t,e,r,n){let o=(e&KF.BRANCH_LENGTH)>>7,s=e&KF.JUMP_TABLE;if(o===0)return s!==0&&n===s?r:-1;if(s){let u=n-s;return u<0||u>=o?-1:t[r+u]-1}let c=r,l=c+o-1;for(;c<=l;){let u=c+l>>>1,d=t[u];if(dn)l=u-1;else return t[u+o]}return-1}a(Ipo,"determineBranch");var xpo=ben(_en),Guu=ben(ven);function JF(t,e=Fk.Legacy){return xpo(t,e)}a(JF,"decodeHTML");f();f();function fHe(t){for(let e=1;et.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function K5t(t,e){return a(function(n){let o,s=0,c="";for(;o=t.exec(n);)s!==o.index&&(c+=n.substring(s,o.index)),c+=e.get(o[0].charCodeAt(0)),s=o.index+1;return c+n.substring(s)},"escape")}a(K5t,"getEscaper");var Ten=K5t(/[&<>'"]/g,Rpo),Sen=K5t(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Ien=K5t(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var xen;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(xen||(xen={}));var wen;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(wen||(wen={}));function Dpo(t){return Object.prototype.toString.call(t)}a(Dpo,"_class");function pHe(t){return Dpo(t)==="[object String]"}a(pHe,"isString");var Mpo=Object.prototype.hasOwnProperty;function Opo(t,e){return Mpo.call(t,e)}a(Opo,"has");function jie(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}a(jie,"assign");function X5t(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}a(X5t,"arrayReplaceAt");function hHe(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}a(hHe,"isValidEntityCode");function l_e(t){if(t>65535){t-=65536;let e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}a(l_e,"fromCodePoint");var ken=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Bpo=/&([a-z#][a-z0-9]{1,31});/gi,Lpo=new RegExp(ken.source+"|"+Bpo.source,"gi"),Fpo=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Upo(t,e){if(e.charCodeAt(0)===35&&Fpo.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return hHe(n)?l_e(n):t}let r=JF(t);return r!==t?r:t}a(Upo,"replaceEntityPattern");function Qpo(t){return t.indexOf("\\")<0?t:t.replace(ken,"$1")}a(Qpo,"unescapeMd");function UO(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Lpo,function(e,r,n){return r||Upo(e,n)})}a(UO,"unescapeAll");var qpo=/[&<>"]/,Gpo=/[&<>"]/g,Hpo={"&":"&","<":"<",">":">",'"':"""};function jpo(t){return Hpo[t]}a(jpo,"replaceUnsafeChar");function QO(t){return qpo.test(t)?t.replace(Gpo,jpo):t}a(QO,"escapeHtml");var $po=/[.?*+^$[\]\\(){}|-]/g;function Vpo(t){return t.replace($po,"\\$&")}a(Vpo,"escapeRE");function ls(t){switch(t){case 9:case 32:return!0}return!1}a(ls,"isSpace");function $$(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}a($$,"isWhiteSpace");function V$(t){return Hie.test(t)||lHe.test(t)}a(V$,"isPunctChar");function W$(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}a(W$,"isMdAsciiPunct");function z$(t){return t=t.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(t=t.replace(/ẞ/g,"\xDF")),t.toLowerCase().toUpperCase()}a(z$,"normalizeReference");var Wpo={mdurl:sHe,ucmicro:$5t};var nMt={};Ri(nMt,{parseLinkDestination:()=>tMt,parseLinkLabel:()=>eMt,parseLinkTitle:()=>rMt});f();f();function eMt(t,e,r){let n,o,s,c,l=t.posMax,u=t.pos;for(t.pos=e+1,n=1;t.pos32))return s;if(n===41){if(c===0)break;c--}o++}return e===o||c!==0||(s.str=UO(t.slice(e,o)),s.pos=o,s.ok=!0),s}a(tMt,"parseLinkDestination");f();function rMt(t,e,r,n){let o,s=e,c={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)c.str=n.str,c.marker=n.marker;else{if(s>=r)return c;let l=t.charCodeAt(s);if(l!==34&&l!==39&&l!==40)return c;e++,s++,l===40&&(l=41),c.marker=l}for(;s"+QO(s.content)+""};Uk.code_block=function(t,e,r,n,o){let s=t[e];return""+QO(t[e].content)+` -`};Uk.fence=function(t,e,r,n,o){let s=t[e],c=s.info?UO(s.info).trim():"",l="",u="";if(c){let p=c.split(/(\s+)/g);l=p[0],u=p.slice(2).join("")}let d;if(r.highlight?d=r.highlight(s.content,l,u)||QO(s.content):d=QO(s.content),d.indexOf("n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n"u"}a(umo,"isUndefined");function lMt(t){return Buffer.from(t,"base64").toString("utf-8")}a(lMt,"decodeBase64");function dtn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}a(dtn,"isObject");f();var CF="activate_",ly=class t{constructor(e,r,n,o,s=[]){this.name=e;this.description=r;this.lastUsedOnTurn=n;this.metadata=o;this.contents=s;this.isExpanded=!1;if(!e.startsWith(CF))throw new Error(`Virtual tool name must start with '${CF}'`);this.name=e,this.description=r,this.lastUsedOnTurn=n,this.metadata=o,this.contents=s}static{a(this,"VirtualTool")}cloneWithPrefix(e){return new t(CF+e+this.name.slice(CF.length),this.description,this.lastUsedOnTurn,{...this.metadata,possiblePrefix:void 0},this.contents)}find(e){if(this.name===e)return{tool:this,path:[]};for(let r of this.contents)if(r instanceof t){let n=r.find(e);if(n)return n.path.unshift(this),n}else if(r.nameForModel===e)return{tool:r,path:[this]}}getLowestExpandedTool(){let e;for(let r of this.all())r instanceof t&&r.isExpanded&&(!e||r.lastUsedOnTurn${e.description}`,vscpp("br",null))}},uMt=class extends Xt{static{a(this,"ExistingGroupInformation")}renderCopilot(){let{group:e}=this.props;return vscpp(vscppf,null,``,vscpp("br",null),`${e.summary}`,vscpp("br",null),e.tools.map(r=>` +`),"",vscpp("br",null))}},aGe=class extends Xt{static{a(this,"GeneralSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(vF.SystemMessage,null,"Context: There are many tools available for a user. However, the number of tools can be large, and it is not always practical to present all of them at once. We need to create a summary of them that accurately reflects the capabilities they provide.",vscpp("br",null),vscpp("br",null),"The user present you with the tools available to them, and you must create a summary of the tools that is accurate and comprehensive. The summary should include the capabilities of the tools and when they should be used.",vscpp("br",null)),vscpp(vF.UserMessage,null,this.props.tools.map(e=>vscpp(n_e,{tool:e})),vscpp("br",null),vscpp("br",null),"Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"object",required:["name","summary"],properties:{summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'},name:{type:"string",description:"A short name for the group. It may only contain the characters a-z, A-Z, 0-9, and underscores.",example:"foo_language_tools"}}},null,2)))}},cGe=class extends Xt{static{a(this,"CategorizerSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(vF.SystemMessage,null,"Context: There are many tools available for a user. However, the number of tools can be large, and it is not always practical to present all of them at once. We need to create logical groups for the user to pick from at a glance.",vscpp("br",null),vscpp("br",null),"The user present you with the tools available to them, and you must group them into logical categories and provide a summary of each one. The summary should include the capabilities of the tools and when they should be used. Every tool MUST be a part of EXACTLY one category. Category names in your response MUST be unique\u2014do not reuse the same name for different categories. If two categories would share a base name, append a short, descriptive suffix to disambiguate (e.g., python_tools_testing vs python_tools_packaging).",vscpp("br",null)),vscpp(vF.UserMessage,null,this.props.tools.map(e=>vscpp(n_e,{tool:e})),vscpp("br",null),vscpp("br",null),"You MUST make sure every tool is part of a category. Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"array",items:{type:"object",required:["name","tools","summary"],properties:{name:{type:"string",description:"A short, unique name for the category across this response. It may only contain the characters a-z, A-Z, 0-9, and underscores. If a potential collision exists, add a short suffix to keep names unique (e.g., _testing, _packaging).",example:"foo_language_tools"},tools:{type:"array",description:"The tool names that are part of this category.",items:{type:"string"}},summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'}}}},null,2)))}},lGe=class extends Xt{static{a(this,"ExistingGroupCategorizerPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(vF.SystemMessage,null,"Context: There are existing tool categories that have been previously established. New tools have become available and need to be categorized. You must decide whether each new tool fits into an existing category or requires a new category to be created.",vscpp("br",null),vscpp("br",null),"The user will provide you with the existing categories and their current tools, as well as the new tools that need to be categorized. You must assign each new tool to either an existing category (if it fits well) or create new categories as needed. You should also return all existing tools in their current categories unless there's a compelling reason to reorganize them.",vscpp("br",null),vscpp("br",null),"Every tool (both existing and new) MUST be part of EXACTLY one category in your response. Category names MUST be unique within the response. If a new category would conflict with an existing category name, choose a distinct, disambiguating name.",vscpp("br",null)),vscpp(vF.UserMessage,null,"**Existing Categories:**",vscpp("br",null),this.props.existingGroups.map(e=>vscpp(uMt,{group:e})),vscpp("br",null),"**New Tools to Categorize:**",vscpp("br",null),this.props.newTools.map(e=>vscpp(n_e,{tool:e})),vscpp("br",null),vscpp("br",null),"Instructions:",vscpp("br",null),"1. For each new tool, determine if it fits well into an existing category or if it needs a new category",vscpp("br",null),"2. Keep existing tools in their current categories unless there's a strong reason to move them",vscpp("br",null),"3. Create new categories only when new tools don't fit well into existing ones",vscpp("br",null),"4. Every tool (existing + new) MUST appear in exactly one category",vscpp("br",null),vscpp("br",null),"Your response must follow the JSON schema:",vscpp("br",null),vscpp("br",null),"```",vscpp("br",null),JSON.stringify({type:"array",items:{type:"object",required:["name","tools","summary"],properties:{name:{type:"string",description:"A short, unique name for the category across this response. It may only contain the characters a-z, A-Z, 0-9, and underscores. Do not reuse names; add a short suffix if needed to avoid collisions.",example:"foo_language_tools"},tools:{type:"array",description:"The tool names that are part of this category.",items:{type:"string"}},summary:{type:"string",description:"A summary of the tool capabilities, including their capabilities and how they can be used together. This may be up to five paragraphs long, be careful not to leave out important details.",example:'These tools assist with authoring the "foo" language. They can provide diagnostics, run tests, and provide refactoring actions for the foo language.'}}}},null,2)))}};f();f();f();var EMt={};ui(EMt,{arrayReplaceAt:()=>yMt,assign:()=>iie,escapeHtml:()=>v4,escapeRE:()=>Wmo,fromCodePoint:()=>s_e,has:()=>Bmo,isMdAsciiPunct:()=>e$,isPunctChar:()=>Zj,isSpace:()=>os,isString:()=>CGe,isValidEntityCode:()=>vGe,isWhiteSpace:()=>Xj,lib:()=>zmo,normalizeReference:()=>t$,unescapeAll:()=>C4,unescapeMd:()=>qmo});f();var hGe={};ui(hGe,{decode:()=>i_e,encode:()=>fGe,format:()=>rie,parse:()=>o_e});f();f();var ftn={};function dmo(t){let e=ftn[t];if(e)return e;e=ftn[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);e.push(n)}for(let r=0;r=55296&&p<=57343?o+="\uFFFD\uFFFD\uFFFD":o+=String.fromCharCode(p),s+=6;continue}}if((l&248)===240&&s+91114111?o+="\uFFFD\uFFFD\uFFFD\uFFFD":(h-=65536,o+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),s+=9;continue}}o+="\uFFFD"}return o})}a(uGe,"decode");uGe.defaultChars=";/?:@&=+$,#";uGe.componentChars="";var i_e=uGe;f();var ptn={};function fmo(t){let e=ptn[t];if(e)return e;e=ptn[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r"u"&&(r=!0);let n=fmo(e),o="";for(let s=0,c=t.length;s=55296&&l<=57343){if(l>=55296&&l<=56319&&s+1=56320&&u<=57343){o+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(t[s])}return o}a(dGe,"encode");dGe.defaultChars=";/?:@&=+$,-_.!~*'()#";dGe.componentChars="-_.!~*'()";var fGe=dGe;f();function rie(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}a(rie,"format");f();function pGe(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}a(pGe,"Url");var pmo=/^([a-z0-9.+-]+:)/i,hmo=/:[0-9]*$/,mmo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,gmo=["<",">",'"',"`"," ","\r",` +`," "],Amo=["{","}","|","\\","^","`"].concat(gmo),ymo=["'"].concat(Amo),htn=["%","/","?",";","#"].concat(ymo),mtn=["/","?","#"],Emo=255,gtn=/^[+a-z0-9A-Z_-]{0,63}$/,_mo=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Atn={javascript:!0,"javascript:":!0},ytn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cmo(t,e){if(t&&t instanceof pGe)return t;let r=new pGe;return r.parse(t,e),r}a(Cmo,"urlParse");pGe.prototype.parse=function(t,e){let r,n,o,s=t;if(s=s.trim(),!e&&t.split("#").length===1){let d=mmo.exec(s);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let c=pmo.exec(s);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,s=s.substr(c.length)),(e||c||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=s.substr(0,2)==="//",o&&!(c&&Atn[c])&&(s=s.substr(2),this.slashes=!0)),!Atn[c]&&(o||c&&!ytn[c])){let d=-1;for(let A=0;A127?v+="x":v+=_[b];if(!v.match(gtn)){let b=A.slice(0,y),I=A.slice(y+1),x=_.match(_mo);x&&(b.push(x[1]),I.unshift(x[2])),I.length&&(s=I.join(".")+s),this.hostname=b.join(".");break}}}}this.hostname.length>Emo&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let l=s.indexOf("#");l!==-1&&(this.hash=s.substr(l),s=s.slice(0,l));let u=s.indexOf("?");return u!==-1&&(this.search=s.substr(u),s=s.slice(0,u)),s&&(this.pathname=s),ytn[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};pGe.prototype.parseHost=function(t){let e=hmo.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var o_e=Cmo;var dMt={};ui(dMt,{Any:()=>mGe,Cc:()=>gGe,Cf:()=>Etn,P:()=>nie,S:()=>AGe,Z:()=>yGe});f();f();var mGe=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;f();var gGe=/[\0-\x1F\x7F-\x9F]/;f();var Etn=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;f();var nie=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;f();var AGe=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;f();var yGe=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;f();f();f();var _tn=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));f();var Ctn=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));f();var fMt,vmo=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),pMt=(fMt=String.fromCodePoint)!==null&&fMt!==void 0?fMt:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function hMt(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=vmo.get(t))!==null&&e!==void 0?e:t}a(hMt,"replaceCodePoint");var Eh;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(Eh||(Eh={}));var bmo=32,bF;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(bF||(bF={}));function mMt(t){return t>=Eh.ZERO&&t<=Eh.NINE}a(mMt,"isNumber");function Tmo(t){return t>=Eh.UPPER_A&&t<=Eh.UPPER_F||t>=Eh.LOWER_A&&t<=Eh.LOWER_F}a(Tmo,"isHexadecimalCharacter");function Smo(t){return t>=Eh.UPPER_A&&t<=Eh.UPPER_Z||t>=Eh.LOWER_A&&t<=Eh.LOWER_Z||mMt(t)}a(Smo,"isAsciiAlphaNumeric");function Imo(t){return t===Eh.EQUALS||Smo(t)}a(Imo,"isEntityInAttributeInvalidEnd");var yh;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(yh||(yh={}));var Ik;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Ik||(Ik={}));var EGe=class{static{a(this,"EntityDecoder")}constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=yh.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ik.Strict}startEntity(e){this.decodeMode=e,this.state=yh.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case yh.EntityStart:return e.charCodeAt(r)===Eh.NUM?(this.state=yh.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=yh.NamedEntity,this.stateNamedEntity(e,r));case yh.NumericStart:return this.stateNumericStart(e,r);case yh.NumericDecimal:return this.stateNumericDecimal(e,r);case yh.NumericHex:return this.stateNumericHex(e,r);case yh.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|bmo)===Eh.LOWER_X?(this.state=yh.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=yh.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,o){if(r!==n){let s=n-r;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(r,s),o),this.consumed+=s}}stateNumericHex(e,r){let n=r;for(;r>14;for(;r>14,s!==0){if(c===Eh.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ik.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:r,decodeTree:n}=this,o=(n[r]&bF.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){let{decodeTree:o}=this;return this.emitCodePoint(r===1?o[e]&~bF.VALUE_LENGTH:o[e+1],n),r===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case yh.NamedEntity:return this.result!==0&&(this.decodeMode!==Ik.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yh.NumericDecimal:return this.emitNumericEntity(0,2);case yh.NumericHex:return this.emitNumericEntity(0,3);case yh.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yh.EntityStart:return 0}}};function vtn(t){let e="",r=new EGe(t,n=>e+=pMt(n));return a(function(o,s){let c=0,l=0;for(;(l=o.indexOf("&",l))>=0;){e+=o.slice(c,l),r.startEntity(s);let d=r.write(o,l+1);if(d<0){c=l+r.end();break}c=l+d,l=d===0?c+1:c}let u=e+o.slice(c);return e="",u},"decodeWithTrie")}a(vtn,"getDecoder");function xmo(t,e,r,n){let o=(e&bF.BRANCH_LENGTH)>>7,s=e&bF.JUMP_TABLE;if(o===0)return s!==0&&n===s?r:-1;if(s){let u=n-s;return u<0||u>=o?-1:t[r+u]-1}let c=r,l=c+o-1;for(;c<=l;){let u=c+l>>>1,d=t[u];if(dn)l=u-1;else return t[u+o]}return-1}a(xmo,"determineBranch");var wmo=vtn(_tn),Zfu=vtn(Ctn);function TF(t,e=Ik.Legacy){return wmo(t,e)}a(TF,"decodeHTML");f();f();function _Ge(t){for(let e=1;et.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function gMt(t,e){return a(function(n){let o,s=0,c="";for(;o=t.exec(n);)s!==o.index&&(c+=n.substring(s,o.index)),c+=e.get(o[0].charCodeAt(0)),s=o.index+1;return c+n.substring(s)},"escape")}a(gMt,"getEscaper");var btn=gMt(/[&<>'"]/g,Pmo),Ttn=gMt(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Stn=gMt(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Itn;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(Itn||(Itn={}));var xtn;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(xtn||(xtn={}));function Mmo(t){return Object.prototype.toString.call(t)}a(Mmo,"_class");function CGe(t){return Mmo(t)==="[object String]"}a(CGe,"isString");var Omo=Object.prototype.hasOwnProperty;function Bmo(t,e){return Omo.call(t,e)}a(Bmo,"has");function iie(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}a(iie,"assign");function yMt(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}a(yMt,"arrayReplaceAt");function vGe(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}a(vGe,"isValidEntityCode");function s_e(t){if(t>65535){t-=65536;let e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}a(s_e,"fromCodePoint");var Ptn=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Lmo=/&([a-z#][a-z0-9]{1,31});/gi,Fmo=new RegExp(Ptn.source+"|"+Lmo.source,"gi"),Umo=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Qmo(t,e){if(e.charCodeAt(0)===35&&Umo.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return vGe(n)?s_e(n):t}let r=TF(t);return r!==t?r:t}a(Qmo,"replaceEntityPattern");function qmo(t){return t.indexOf("\\")<0?t:t.replace(Ptn,"$1")}a(qmo,"unescapeMd");function C4(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(Fmo,function(e,r,n){return r||Qmo(e,n)})}a(C4,"unescapeAll");var Gmo=/[&<>"]/,Hmo=/[&<>"]/g,jmo={"&":"&","<":"<",">":">",'"':"""};function $mo(t){return jmo[t]}a($mo,"replaceUnsafeChar");function v4(t){return Gmo.test(t)?t.replace(Hmo,$mo):t}a(v4,"escapeHtml");var Vmo=/[.?*+^$[\]\\(){}|-]/g;function Wmo(t){return t.replace(Vmo,"\\$&")}a(Wmo,"escapeRE");function os(t){switch(t){case 9:case 32:return!0}return!1}a(os,"isSpace");function Xj(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}a(Xj,"isWhiteSpace");function Zj(t){return nie.test(t)||AGe.test(t)}a(Zj,"isPunctChar");function e$(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}a(e$,"isMdAsciiPunct");function t$(t){return t=t.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(t=t.replace(/ẞ/g,"\xDF")),t.toLowerCase().toUpperCase()}a(t$,"normalizeReference");var zmo={mdurl:hGe,ucmicro:dMt};var bMt={};ui(bMt,{parseLinkDestination:()=>CMt,parseLinkLabel:()=>_Mt,parseLinkTitle:()=>vMt});f();f();function _Mt(t,e,r){let n,o,s,c,l=t.posMax,u=t.pos;for(t.pos=e+1,n=1;t.pos32))return s;if(n===41){if(c===0)break;c--}o++}return e===o||c!==0||(s.str=C4(t.slice(e,o)),s.pos=o,s.ok=!0),s}a(CMt,"parseLinkDestination");f();function vMt(t,e,r,n){let o,s=e,c={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)c.str=n.str,c.marker=n.marker;else{if(s>=r)return c;let l=t.charCodeAt(s);if(l!==34&&l!==39&&l!==40)return c;e++,s++,l===40&&(l=41),c.marker=l}for(;s"+v4(s.content)+""};xk.code_block=function(t,e,r,n,o){let s=t[e];return""+v4(t[e].content)+` +`};xk.fence=function(t,e,r,n,o){let s=t[e],c=s.info?C4(s.info).trim():"",l="",u="";if(c){let p=c.split(/(\s+)/g);l=p[0],u=p.slice(2).join("")}let d;if(r.highlight?d=r.highlight(s.content,l,u)||v4(s.content):d=v4(s.content),d.indexOf("${d} `}return`
${d}
-`};Uk.image=function(t,e,r,n,o){let s=t[e];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,r,n),o.renderToken(t,e,r)};Uk.hardbreak=function(t,e,r){return r.xhtmlOut?`
+`};xk.image=function(t,e,r,n,o){let s=t[e];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,r,n),o.renderToken(t,e,r)};xk.hardbreak=function(t,e,r){return r.xhtmlOut?`
`:`
-`};Uk.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`
+`};xk.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`
`:`
`:` -`};Uk.text=function(t,e){return QO(t[e].content)};Uk.html_block=function(t,e){return t[e].content};Uk.html_inline=function(t,e){return t[e].content};function $ie(){this.rules=jie({},Uk)}a($ie,"Renderer");$ie.prototype.renderAttrs=a(function(e){let r,n,o;if(!e.attrs)return"";for(o="",r=0,n=e.attrs.length;r -`:">",s},"renderToken");$ie.prototype.renderInline=function(t,e,r){let n="",o=this.rules;for(let s=0,c=t.length;s=0&&(n=this.attrs[r][1]),n},"attrGet");Vie.prototype.attrJoin=a(function(e,r){let n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r},"attrJoin");var qO=Vie;function Den(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}a(Den,"StateCore");Den.prototype.Token=qO;var Men=Den;f();var zpo=/\r\n?|\n/g,Ypo=/\0/g;function iMt(t){let e;e=t.src.replace(zpo,` -`),e=e.replace(Ypo,"\uFFFD"),t.src=e}a(iMt,"normalize");f();function oMt(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}a(oMt,"block");f();function sMt(t){let e=t.tokens;for(let r=0,n=e.length;r\s]/i.test(t)}a(Kpo,"isLinkOpen");function Jpo(t){return/^<\/a\s*>/i.test(t)}a(Jpo,"isLinkClose");function aMt(t){let e=t.tokens;if(t.md.options.linkify)for(let r=0,n=e.length;r=0;c--){let l=o[c];if(l.type==="link_close"){for(c--;o[c].level!==l.level&&o[c].type!=="link_open";)c--;continue}if(l.type==="html_inline"&&(Kpo(l.content)&&s>0&&s--,Jpo(l.content)&&s++),!(s>0)&&l.type==="text"&&t.md.linkify.test(l.content)){let u=l.content,d=t.md.linkify.match(u),p=[],h=l.level,m=0;d.length>0&&d[0].index===0&&c>0&&o[c-1].type==="text_special"&&(d=d.slice(1));for(let g=0;gm){let x=new t.Token("text","",0);x.content=u.slice(m,_),x.level=h,p.push(x)}let v=new t.Token("link_open","a",1);v.attrs=[["href",y]],v.level=h++,v.markup="linkify",v.info="auto",p.push(v);let b=new t.Token("text","",0);b.content=E,b.level=h,p.push(b);let I=new t.Token("link_close","a",-1);I.level=--h,I.markup="linkify",I.info="auto",p.push(I),m=d[g].lastIndex}if(m=0;r--){let n=t[r];n.type==="text"&&!e&&(n.content=n.content.replace(Zpo,tho)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}a(rho,"replace_scoped");function nho(t){let e=0;for(let r=t.length-1;r>=0;r--){let n=t[r];n.type==="text"&&!e&&Oen.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}a(nho,"replace_rare");function cMt(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(Xpo.test(t.tokens[e].content)&&rho(t.tokens[e].children),Oen.test(t.tokens[e].content)&&nho(t.tokens[e].children))}a(cMt,"replace");f();var iho=/['"]/,Ben=/['"]/g,Len="\u2019";function mHe(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}a(mHe,"replaceAt");function oho(t,e){let r,n=[];for(let o=0;o=0&&!(n[r].level<=c);r--);if(n.length=r+1,s.type!=="text")continue;let l=s.content,u=0,d=l.length;e:for(;u=0)A=l.charCodeAt(p.index-1);else for(r=o-1;r>=0&&!(t[r].type==="softbreak"||t[r].type==="hardbreak");r--)if(t[r].content){A=t[r].content.charCodeAt(t[r].content.length-1);break}let y=32;if(u=48&&A<=57&&(m=h=!1),h&&m&&(h=E,m=_),!h&&!m){g&&(s.content=mHe(s.content,p.index,Len));continue}if(m)for(r=n.length-1;r>=0;r--){let I=n[r];if(n[r].level=0;e--)t.tokens[e].type!=="inline"||!iho.test(t.tokens[e].content)||oho(t.tokens[e].children,t)}a(lMt,"smartquotes");f();function uMt(t){let e,r,n=t.tokens,o=n.length;for(let s=0;s0&&this.level++,this.tokens.push(n),n};Qk.prototype.isEmpty=a(function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},"isEmpty");Qk.prototype.skipEmptyLines=a(function(e){for(let r=this.lineMax;er;)if(!ls(this.src.charCodeAt(--e)))return e+1;return e},"skipSpacesBack");Qk.prototype.skipChars=a(function(e,r){for(let n=this.src.length;en;)if(r!==this.src.charCodeAt(--e))return e+1;return e},"skipCharsBack");Qk.prototype.getLines=a(function(e,r,n,o){if(e>=r)return"";let s=new Array(r-e);for(let c=0,l=e;ln?s[c]=new Array(u-n+1).join(" ")+this.src.slice(p,h):s[c]=this.src.slice(p,h)}return s.join("")},"getLines");Qk.prototype.Token=qO;var Uen=Qk;f();var sho=65536;function pMt(t,e){let r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}a(pMt,"getLine");function Qen(t){let e=[],r=t.length,n=0,o=t.charCodeAt(n),s=!1,c=0,l="";for(;nr)return!1;let o=e+1;if(t.sCount[o]=4)return!1;let s=t.bMarks[o]+t.tShift[o];if(s>=t.eMarks[o])return!1;let c=t.src.charCodeAt(s++);if(c!==124&&c!==45&&c!==58||s>=t.eMarks[o])return!1;let l=t.src.charCodeAt(s++);if(l!==124&&l!==45&&l!==58&&!ls(l)||c===45&&ls(l))return!1;for(;s=4)return!1;d=Qen(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();let h=d.length;if(h===0||h!==p.length)return!1;if(n)return!0;let m=t.parentType;t.parentType="table";let g=t.md.block.ruler.getRules("blockquote"),A=t.push("table_open","table",1),y=[e,0];A.map=y;let E=t.push("thead_open","thead",1);E.map=[e,e+1];let _=t.push("tr_open","tr",1);_.map=[e,e+1];for(let I=0;I=4||(d=Qen(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),b+=h-d.length,b>sho))break;if(o===e+2){let R=t.push("tbody_open","tbody",1);R.map=v=[e+2,0]}let x=t.push("tr_open","tr",1);x.map=[o,o+1];for(let R=0;R=4){n++,o=n;continue}break}t.line=o;let s=t.push("code_block","code",0);return s.content=t.getLines(e,o,4+t.blkIndent,!1)+` -`,s.map=[e,t.line],!0}a(mMt,"code");f();function gMt(t,e,r,n){let o=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||o+3>s)return!1;let c=t.src.charCodeAt(o);if(c!==126&&c!==96)return!1;let l=o;o=t.skipChars(o,c);let u=o-l;if(u<3)return!1;let d=t.src.slice(l,o),p=t.src.slice(o,s);if(c===96&&p.indexOf(String.fromCharCode(c))>=0)return!1;if(n)return!0;let h=e,m=!1;for(;h++,!(h>=r||(o=l=t.bMarks[h]+t.tShift[h],s=t.eMarks[h],o=4)&&(o=t.skipChars(o,c),!(o-l=4||t.src.charCodeAt(o)!==62)return!1;if(n)return!0;let l=[],u=[],d=[],p=[],h=t.md.block.ruler.getRules("blockquote"),m=t.parentType;t.parentType="blockquote";let g=!1,A;for(A=e;A=s)break;if(t.src.charCodeAt(o++)===62&&!b){let x=t.sCount[A]+1,R,w;t.src.charCodeAt(o)===32?(o++,x++,w=!1,R=!0):t.src.charCodeAt(o)===9?(R=!0,(t.bsCount[A]+x)%4===3?(o++,x++,w=!1):w=!0):R=!1;let P=x;for(l.push(t.bMarks[A]),t.bMarks[A]=o;o=s,u.push(t.bsCount[A]),t.bsCount[A]=t.sCount[A]+1+(R?1:0),d.push(t.sCount[A]),t.sCount[A]=P-x,p.push(t.tShift[A]),t.tShift[A]=o-t.bMarks[A];continue}if(g)break;let I=!1;for(let x=0,R=h.length;x";let _=[e,0];E.map=_,t.md.block.tokenize(t,e,A);let v=t.push("blockquote_close","blockquote",-1);v.markup=">",t.lineMax=c,t.parentType=m,_[1]=t.line;for(let b=0;b=4)return!1;let s=t.bMarks[e]+t.tShift[e],c=t.src.charCodeAt(s++);if(c!==42&&c!==45&&c!==95)return!1;let l=1;for(;s=n)return-1;let s=t.src.charCodeAt(o++);if(s<48||s>57)return-1;for(;;){if(o>=n)return-1;if(s=t.src.charCodeAt(o++),s>=48&&s<=57){if(o-r>=10)return-1;continue}if(s===41||s===46)break;return-1}return o=4||t.listIndent>=0&&t.sCount[u]-t.listIndent>=4&&t.sCount[u]=t.blkIndent&&(p=!0);let h,m,g;if((g=Gen(t,u))>=0){if(h=!0,c=t.bMarks[u]+t.tShift[u],m=Number(t.src.slice(c,g-1)),p&&m!==1)return!1}else if((g=qen(t,u))>=0)h=!1;else return!1;if(p&&t.skipSpaces(g)>=t.eMarks[u])return!1;if(n)return!0;let A=t.src.charCodeAt(g-1),y=t.tokens.length;h?(l=t.push("ordered_list_open","ol",1),m!==1&&(l.attrs=[["start",m]])):l=t.push("bullet_list_open","ul",1);let E=[u,0];l.map=E,l.markup=String.fromCharCode(A);let _=!1,v=t.md.block.ruler.getRules("list"),b=t.parentType;for(t.parentType="list";u=o?w=1:w=x-I,w>4&&(w=1);let P=I+w;l=t.push("list_item_open","li",1),l.markup=String.fromCharCode(A);let k=[u,0];l.map=k,h&&(l.info=t.src.slice(c,g-1));let Q=t.tight,M=t.tShift[u],D=t.sCount[u],G=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=P,t.tight=!0,t.tShift[u]=R-t.bMarks[u],t.sCount[u]=x,R>=o&&t.isEmpty(u+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,u,r,!0),(!t.tight||_)&&(d=!1),_=t.line-u>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=G,t.tShift[u]=M,t.sCount[u]=D,t.tight=Q,l=t.push("list_item_close","li",-1),l.markup=String.fromCharCode(A),u=t.line,k[1]=u,u>=r||t.sCount[u]=4)break;let O=!1;for(let N=0,F=v.length;N=4||t.src.charCodeAt(o)!==91)return!1;function l(v){let b=t.lineMax;if(v>=b||t.isEmpty(v))return null;let I=!1;if(t.sCount[v]-t.blkIndent>3&&(I=!0),t.sCount[v]<0&&(I=!0),!I){let w=t.md.block.ruler.getRules("reference"),P=t.parentType;t.parentType="reference";let k=!1;for(let Q=0,M=w.length;Q"u"&&(t.env.references={}),typeof t.env.references[_]>"u"&&(t.env.references[_]={title:E,href:h}),t.line=c),!0):!1}a(CMt,"reference");f();f();var Hen=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];f();var cho="[a-zA-Z_:][a-zA-Z0-9:._-]*",lho="[^\"'=<>`\\x00-\\x20]+",uho="'[^']*'",dho='"[^"]*"',fho="(?:"+lho+"|"+uho+"|"+dho+")",pho="(?:\\s+"+cho+"(?:\\s*=\\s*"+fho+")?)",jen="<[A-Za-z][A-Za-z0-9\\-]*"+pho+"*\\s*\\/?>",$en="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",hho="",mho="<[?][\\s\\S]*?[?]>",gho="]*>",Aho="",Ven=new RegExp("^(?:"+jen+"|"+$en+"|"+hho+"|"+mho+"|"+gho+"|"+Aho+")"),Wen=new RegExp("^(?:"+jen+"|"+$en+")");var Wie=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Wen.source+"\\s*$"),/^$/,!1]];function _Mt(t,e,r,n){let o=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(o)!==60)return!1;let c=t.src.slice(o,s),l=0;for(;l=4)return!1;let c=t.src.charCodeAt(o);if(c!==35||o>=s)return!1;let l=1;for(c=t.src.charCodeAt(++o);c===35&&o6||oo&&ls(t.src.charCodeAt(u-1))&&(s=u),t.line=e+1;let d=t.push("heading_open","h"+String(l),1);d.markup="########".slice(0,l),d.map=[e,t.line];let p=t.push("inline","",0);p.content=t.src.slice(o,s).trim(),p.map=[e,t.line],p.children=[];let h=t.push("heading_close","h"+String(l),-1);return h.markup="########".slice(0,l),!0}a(vMt,"heading");f();function bMt(t,e,r){let n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;let o=t.parentType;t.parentType="paragraph";let s=0,c,l=e+1;for(;l3)continue;if(t.sCount[l]>=t.blkIndent){let g=t.bMarks[l]+t.tShift[l],A=t.eMarks[l];if(g=A))){s=c===61?1:2;break}}if(t.sCount[l]<0)continue;let m=!1;for(let g=0,A=n.length;g3||t.sCount[s]<0)continue;let d=!1;for(let p=0,h=n.length;p=r||t.sCount[c]=s){t.line=r;break}let u=t.line,d=!1;for(let p=0;p=t.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),c=t.line,c0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(o),n};u_e.prototype.scanDelims=function(t,e){let r=this.posMax,n=this.src.charCodeAt(t),o=t>0?this.src.charCodeAt(t-1):32,s=t;for(;s0)return!1;let r=t.pos,n=t.posMax;if(r+3>n||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47)return!1;let o=t.pending.match(Eho);if(!o)return!1;let s=o[1],c=t.md.linkify.matchAtStart(t.src.slice(r-s.length));if(!c)return!1;let l=c.url;if(l.length<=s.length)return!1;let u=l.length;for(;u>0&&l.charCodeAt(u-1)===42;)u--;u!==l.length&&(l=l.slice(0,u));let d=t.md.normalizeLink(l);if(!t.md.validateLink(d))return!1;if(!e){t.pending=t.pending.slice(0,-s.length);let p=t.push("link_open","a",1);p.attrs=[["href",d]],p.markup="linkify",p.info="auto";let h=t.push("text","",0);h.content=t.md.normalizeLinkText(l);let m=t.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return t.pos+=l.length-s.length,!0}a(IMt,"linkify");f();function xMt(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==10)return!1;let n=t.pending.length-1,o=t.posMax;if(!e)if(n>=0&&t.pending.charCodeAt(n)===32)if(n>=1&&t.pending.charCodeAt(n-1)===32){let s=n-1;for(;s>=1&&t.pending.charCodeAt(s-1)===32;)s--;t.pending=t.pending.slice(0,s),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r?@[]^_`{|}~-".split("").forEach(function(t){wMt[t.charCodeAt(0)]=1});function RMt(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let o=t.src.charCodeAt(r);if(o===10){for(e||t.push("hardbreak","br",0),r++;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s+=t.src[r+1],r++)}let c="\\"+s;if(!e){let l=t.push("text_special","",0);o<256&&wMt[o]!==0?l.content=s:l.content=c,l.markup=c,l.info="escape"}return t.pos=r+1,!0}a(RMt,"escape");f();function PMt(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==96)return!1;let o=r;r++;let s=t.posMax;for(;r=0;n--){let o=e[n];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let s=e[o.end],c=n>0&&e[n-1].end===o.end+1&&e[n-1].marker===o.marker&&e[n-1].token===o.token-1&&e[o.end+1].token===s.token+1,l=String.fromCharCode(o.marker),u=t.tokens[o.token];u.type=c?"strong_open":"em_open",u.tag=c?"strong":"em",u.nesting=1,u.markup=c?l+l:l,u.content="";let d=t.tokens[s.token];d.type=c?"strong_close":"em_close",d.tag=c?"strong":"em",d.nesting=-1,d.markup=c?l+l:l,d.content="",c&&(t.tokens[e[n-1].token].content="",t.tokens[e[o.end+1].token].content="",n--)}}a(Jen,"postProcess");function bho(t){let e=t.tokens_meta,r=t.tokens_meta.length;Jen(t,t.delimiters);for(let n=0;n=h)return!1;if(u=A,o=t.md.helpers.parseLinkDestination(t.src,A,t.posMax),o.ok){for(c=t.md.normalizeLink(o.str),t.md.validateLink(c)?A=o.pos:c="",u=A;A=h||t.src.charCodeAt(A)!==41)&&(d=!0),A++}if(d){if(typeof t.env.references>"u")return!1;if(A=0?n=t.src.slice(u,A++):A=g+1):A=g+1,n||(n=t.src.slice(m,g)),s=t.env.references[z$(n)],!s)return t.pos=p,!1;c=s.href,l=s.title}if(!e){t.pos=m,t.posMax=g;let y=t.push("link_open","a",1),E=[["href",c]];y.attrs=E,l&&E.push(["title",l]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=A,t.posMax=h,!0}a(DMt,"link");f();function MMt(t,e){let r,n,o,s,c,l,u,d,p="",h=t.pos,m=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;let g=t.pos+2,A=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(A<0)return!1;if(s=A+1,s=m)return!1;for(d=s,l=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),l.ok&&(p=t.md.normalizeLink(l.str),t.md.validateLink(p)?s=l.pos:p=""),d=s;s=m||t.src.charCodeAt(s)!==41)return t.pos=h,!1;s++}else{if(typeof t.env.references>"u")return!1;if(s=0?o=t.src.slice(d,s++):s=A+1):s=A+1,o||(o=t.src.slice(g,A)),c=t.env.references[z$(o)],!c)return t.pos=h,!1;p=c.href,u=c.title}if(!e){n=t.src.slice(g,A);let y=[];t.md.inline.parse(n,t.md,t.env,y);let E=t.push("image","img",0),_=[["src",p],["alt",""]];E.attrs=_,E.children=y,E.content=n,u&&_.push(["title",u])}return t.pos=s,t.posMax=m,!0}a(MMt,"image");f();var Tho=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Sho=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function OMt(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==60)return!1;let n=t.pos,o=t.posMax;for(;;){if(++r>=o)return!1;let c=t.src.charCodeAt(r);if(c===60)return!1;if(c===62)break}let s=t.src.slice(n+1,r);if(Sho.test(s)){let c=t.md.normalizeLink(s);if(!t.md.validateLink(c))return!1;if(!e){let l=t.push("link_open","a",1);l.attrs=[["href",c]],l.markup="autolink",l.info="auto";let u=t.push("text","",0);u.content=t.md.normalizeLinkText(s);let d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=s.length+2,!0}if(Tho.test(s)){let c=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(c))return!1;if(!e){let l=t.push("link_open","a",1);l.attrs=[["href",c]],l.markup="autolink",l.info="auto";let u=t.push("text","",0);u.content=t.md.normalizeLinkText(s);let d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=s.length+2,!0}return!1}a(OMt,"autolink");f();function Iho(t){return/^\s]/i.test(t)}a(Iho,"isLinkOpen");function xho(t){return/^<\/a\s*>/i.test(t)}a(xho,"isLinkClose");function who(t){let e=t|32;return e>=97&&e<=122}a(who,"isLetter");function BMt(t,e){if(!t.md.options.html)return!1;let r=t.posMax,n=t.pos;if(t.src.charCodeAt(n)!==60||n+2>=r)return!1;let o=t.src.charCodeAt(n+1);if(o!==33&&o!==63&&o!==47&&!who(o))return!1;let s=t.src.slice(n).match(Ven);if(!s)return!1;if(!e){let c=t.push("html_inline","",0);c.content=s[0],Iho(c.content)&&t.linkLevel++,xho(c.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}a(BMt,"html_inline");f();var Rho=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Pho=/^&([a-z][a-z0-9]{1,31});/i;function LMt(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==38||r+1>=n)return!1;if(t.src.charCodeAt(r+1)===35){let s=t.src.slice(r).match(Rho);if(s){if(!e){let c=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),l=t.push("text_special","",0);l.content=hHe(c)?l_e(c):l_e(65533),l.markup=s[0],l.info="entity"}return t.pos+=s[0].length,!0}}else{let s=t.src.slice(r).match(Pho);if(s){let c=JF(s[0]);if(c!==s[0]){if(!e){let l=t.push("text_special","",0);l.content=c,l.markup=s[0],l.info="entity"}return t.pos+=s[0].length,!0}}}return!1}a(LMt,"entity");f();function Xen(t){let e={},r=t.length;if(!r)return;let n=0,o=-2,s=[];for(let c=0;cu;d-=s[d]+1){let h=t[d];if(h.marker===l.marker&&h.open&&h.end<0){let m=!1;if((h.close||l.open)&&(h.length+l.length)%3===0&&(h.length%3!==0||l.length%3!==0)&&(m=!0),!m){let g=d>0&&!t[d-1].open?s[d-1]+1:0;s[c]=c-d+g,s[d]=g,l.open=!1,h.end=c,h.close=!1,p=-1,o=-2;break}}}p!==-1&&(e[l.marker][(l.open?3:0)+(l.length||0)%3]=p)}}a(Xen,"processDelimiters");function FMt(t){let e=t.tokens_meta,r=t.tokens_meta.length;Xen(t.delimiters);for(let n=0;n0&&n++,o[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;c||t.pos++,s[e]=t.pos};d_e.prototype.tokenize=function(t){let e=this.ruler.getRules(""),r=e.length,n=t.posMax,o=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};d_e.prototype.parse=function(t,e,r,n){let o=new this.State(t,e,r,n);this.tokenize(o);let s=this.ruler2.getRules(""),c=s.length;for(let l=0;l|$))",e.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}a(GMt,"default");function HMt(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}a(HMt,"assign");function EHe(t){return Object.prototype.toString.call(t)}a(EHe,"_class");function kho(t){return EHe(t)==="[object String]"}a(kho,"isString");function Nho(t){return EHe(t)==="[object Object]"}a(Nho,"isObject");function Dho(t){return EHe(t)==="[object RegExp]"}a(Dho,"isRegExp");function etn(t){return EHe(t)==="[object Function]"}a(etn,"isFunction");function Mho(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}a(Mho,"escapeRE");var rtn={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Oho(t){return Object.keys(t||{}).reduce(function(e,r){return e||rtn.hasOwnProperty(r)},!1)}a(Oho,"isOptionsObj");var Bho={"http:":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0},"validate")},"https:":"http:","ftp:":"http:","//":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0},"validate")},"mailto:":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0},"validate")}},Lho="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Fho="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function Uho(t){t.__index__=-1,t.__text_cache__=""}a(Uho,"resetScanCache");function Qho(t){return function(e,r){let n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}a(Qho,"createValidator");function ttn(){return function(t,e){e.normalize(t)}}a(ttn,"createNormalizer");function yHe(t){let e=t.re=GMt(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(Lho),r.push(e.src_xn),e.src_tlds=r.join("|");function n(l){return l.replace("%TLDS%",e.src_tlds)}a(n,"untpl"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let o=[];t.__compiled__={};function s(l,u){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+u)}a(s,"schemaError"),Object.keys(t.__schemas__).forEach(function(l){let u=t.__schemas__[l];if(u===null)return;let d={validate:null,link:null};if(t.__compiled__[l]=d,Nho(u)){Dho(u.validate)?d.validate=Qho(u.validate):etn(u.validate)?d.validate=u.validate:s(l,u),etn(u.normalize)?d.normalize=u.normalize:u.normalize?s(l,u):d.normalize=ttn();return}if(kho(u)){o.push(l);return}s(l,u)}),o.forEach(function(l){t.__compiled__[t.__schemas__[l]]&&(t.__compiled__[l].validate=t.__compiled__[t.__schemas__[l]].validate,t.__compiled__[l].normalize=t.__compiled__[t.__schemas__[l]].normalize)}),t.__compiled__[""]={validate:null,normalize:ttn()};let c=Object.keys(t.__compiled__).filter(function(l){return l.length>0&&t.__compiled__[l]}).map(Mho).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+c+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+c+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Uho(t)}a(yHe,"compile");function qho(t,e){let r=t.__index__,n=t.__last_index__,o=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}a(qho,"Match");function jMt(t,e){let r=new qho(t,e);return t.__compiled__[r.schema].normalize(r,t),r}a(jMt,"createMatch");function fv(t,e){if(!(this instanceof fv))return new fv(t,e);e||Oho(t)&&(e=t,t={}),this.__opts__=HMt({},rtn,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=HMt({},Bho,t),this.__compiled__={},this.__tlds__=Fho,this.__tlds_replaced__=!1,this.re={},yHe(this)}a(fv,"LinkifyIt");fv.prototype.add=a(function(e,r){return this.__schemas__[e]=r,yHe(this),this},"add");fv.prototype.set=a(function(e){return this.__opts__=HMt(this.__opts__,e),this},"set");fv.prototype.test=a(function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,o,s,c,l,u,d,p;if(this.re.schema_test.test(e)){for(u=this.re.schema_search,u.lastIndex=0;(r=u.exec(e))!==null;)if(s=this.testSchemaAt(e,r[2],u.lastIndex),s){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=e.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d=0&&(o=e.match(this.re.email_fuzzy))!==null&&(c=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||cthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=l))),this.__index__>=0},"test");fv.prototype.pretest=a(function(e){return this.re.pretest.test(e)},"pretest");fv.prototype.testSchemaAt=a(function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},"testSchemaAt");fv.prototype.match=a(function(e){let r=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(jMt(this,n)),n=this.__last_index__);let o=n?e.slice(n):e;for(;this.test(o);)r.push(jMt(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},"match");fv.prototype.matchAtStart=a(function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let r=this.re.schema_at_start.exec(e);if(!r)return null;let n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,jMt(this,0)):null},"matchAtStart");fv.prototype.tlds=a(function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,o,s){return n!==s[o-1]}).reverse(),yHe(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,yHe(this),this)},"tlds");fv.prototype.normalize=a(function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},"normalize");fv.prototype.onCompile=a(function(){},"onCompile");var ntn=fv;f();var Gho=/^xn--/,Hho=/[^\0-\x7F]/,jho=/[\x2E\u3002\uFF0E\uFF61]/g,$ho={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$Mt=35,qk=Math.floor,VMt=String.fromCharCode;function XF(t){throw new RangeError($ho[t])}a(XF,"error");function Vho(t,e){let r=[],n=t.length;for(;n--;)r[n]=e(t[n]);return r}a(Vho,"map");function otn(t,e){let r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(jho,".");let o=t.split("."),s=Vho(o,e).join(".");return n+s}a(otn,"mapDomain");function stn(t){let e=[],r=0,n=t.length;for(;r=55296&&o<=56319&&rString.fromCodePoint(...t),"ucs2encode"),zho=a(function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},"basicToDigit"),itn=a(function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},"digitToBasic"),atn=a(function(t,e,r){let n=0;for(t=r?qk(t/700):t>>1,t+=qk(t/e);t>$Mt*26>>1;n+=36)t=qk(t/$Mt);return qk(n+($Mt+1)*t/(t+38))},"adapt"),ctn=a(function(t){let e=[],r=t.length,n=0,o=128,s=72,c=t.lastIndexOf("-");c<0&&(c=0);for(let l=0;l=128&&XF("not-basic"),e.push(t.charCodeAt(l));for(let l=c>0?c+1:0;l=r&&XF("invalid-input");let m=zho(t.charCodeAt(l++));m>=36&&XF("invalid-input"),m>qk((2147483647-n)/p)&&XF("overflow"),n+=m*p;let g=h<=s?1:h>=s+26?26:h-s;if(mqk(2147483647/A)&&XF("overflow"),p*=A}let d=e.length+1;s=atn(n-u,d,u==0),qk(n/d)>2147483647-o&&XF("overflow"),o+=qk(n/d),n%=d,e.splice(n++,0,o)}return String.fromCodePoint(...e)},"decode"),ltn=a(function(t){let e=[];t=stn(t);let r=t.length,n=128,o=0,s=72;for(let u of t)u<128&&e.push(VMt(u));let c=e.length,l=c;for(c&&e.push("-");l=n&&pqk((2147483647-o)/d)&&XF("overflow"),o+=(u-n)*d,n=u;for(let p of t)if(p2147483647&&XF("overflow"),p===n){let h=o;for(let m=36;;m+=36){let g=m<=s?1:m>=s+26?26:m-s;if(h=0))try{e.hostname=WMt.toASCII(e.hostname)}catch{}return iHe(Gie(e))}a(rmo,"normalizeLink");function nmo(t){let e=c_e(t,!0);if(e.hostname&&(!e.protocol||ptn.indexOf(e.protocol)>=0))try{e.hostname=WMt.toUnicode(e.hostname)}catch{}return a_e(Gie(e),a_e.defaultChars+"%")}a(nmo,"normalizeLinkText");function JT(t,e){if(!(this instanceof JT))return new JT(t,e);e||pHe(t)||(e=t||{},t="default"),this.inline=new Zen,this.block=new zen,this.core=new Fen,this.renderer=new Nen,this.linkify=new ntn,this.validateLink=tmo,this.normalizeLink=rmo,this.normalizeLinkText=nmo,this.utils=Z5t,this.helpers=jie({},nMt),this.options={},this.configure(t),e&&this.set(e)}a(JT,"MarkdownIt");JT.prototype.set=function(t){return jie(this.options,t),this};JT.prototype.configure=function(t){let e=this;if(pHe(t)){let r=t;if(t=Xho[r],!t)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this};JT.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));let n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};JT.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));let n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};JT.prototype.use=function(t){let e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};JT.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");let r=new this.core.State(t,this,e);return this.core.process(r),r.tokens};JT.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};JT.prototype.parseInline=function(t,e){let r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};JT.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var zMt=JT;function YMt(t){return Array.isArray(t)}a(YMt,"isArray");function imo(t){if(t.type!=="fence")return!1;let{map:e,markup:r,content:n,info:o}=t;return(e===null||YMt(e)&&e.length===2&&e.every(c=>typeof c=="number"))&&typeof r=="string"&&typeof n=="string"&&typeof o=="string"}a(imo,"isFenceToken");function*htn(t){for(let e of t)if(yield e,e&&typeof e=="object"&&"children"in e){let r=e;YMt(r.children)&&(yield*htn(r.children))}}a(htn,"flattenTokensLists");function omo(){return new zMt}a(omo,"createMarkdownIt");function mtn(t){let e=[],n=omo().parse(t,{});if(!YMt(n))return e;for(let o of htn(n)){if(!o||typeof o!="object")continue;let s=o;if(imo(s)&&s.map){let c=s.map;e.push({startMarkup:s.markup,code:s.content.replace(/\n$/,""),language:s.info.trim(),startLine:c[0],endLine:c[1]})}}return e}a(mtn,"extractCodeBlocks");function KMt(t){let e=["script","style","iframe","object","embed","form","base","meta","link"],r=/(```[\s\S]*?```|`[^`\n]+?`)/g;return t.split(r).map((o,s)=>{if(s%2===1)return o;let l=new RegExp(`]*)?/?>`,"gi");return o.replace(l,u=>u.replace(//g,">"))}).join("")}a(KMt,"escapeProblematicHtmlTags");var XMt=Cn.Gpt4oMini,gtn=new Se("virtualToolSummarizer"),f_e=class extends Error{static{a(this,"SummarizerError")}};function Atn(t){return typeof t=="object"&&t!==null&&"name"in t&&"summary"in t&&typeof t.name=="string"&&typeof t.summary=="string"}a(Atn,"isValidCategoryItem");function ytn(t,e){if(!Array.isArray(t))throw new f_e(`Invalid response from ${e}: ${JSON.stringify(t)}`);if(!t.every(Atn))throw new f_e(`Invalid response from ${e}: ${JSON.stringify(t)}`)}a(ytn,"validateCategoriesWithoutToolsResponse");function smo(t){return Atn(t)&&"tools"in t&&Array.isArray(t.tools)&&t.tools.every(e=>typeof e=="string")}a(smo,"isValidCategorizationItem");function Etn(t,e){if(ytn(t,e),!t.every(smo))throw new f_e(`Invalid response from ${e}: ${JSON.stringify(t)}`)}a(Etn,"validateCategorizationResponse");function Ctn(t,e=new Set){return t.filter(r=>{let n=e.has(r.name);return e.add(r.name),!n})}a(Ctn,"deduplicateTools");function amo(t){let e=new Map;for(let r of t){let n=vtn(r.name),o=e.get(n);o?(r.summary&&r.summary!==o.summary&&(o.summary=`${o.summary} +`:">",s},"renderToken");oie.prototype.renderInline=function(t,e,r){let n="",o=this.rules;for(let s=0,c=t.length;s=0&&(n=this.attrs[r][1]),n},"attrGet");sie.prototype.attrJoin=a(function(e,r){let n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r},"attrJoin");var b4=sie;function Dtn(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}a(Dtn,"StateCore");Dtn.prototype.Token=b4;var Ntn=Dtn;f();var Ymo=/\r\n?|\n/g,Kmo=/\0/g;function TMt(t){let e;e=t.src.replace(Ymo,` +`),e=e.replace(Kmo,"\uFFFD"),t.src=e}a(TMt,"normalize");f();function SMt(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}a(SMt,"block");f();function IMt(t){let e=t.tokens;for(let r=0,n=e.length;r\s]/i.test(t)}a(Jmo,"isLinkOpen");function Xmo(t){return/^<\/a\s*>/i.test(t)}a(Xmo,"isLinkClose");function xMt(t){let e=t.tokens;if(t.md.options.linkify)for(let r=0,n=e.length;r=0;c--){let l=o[c];if(l.type==="link_close"){for(c--;o[c].level!==l.level&&o[c].type!=="link_open";)c--;continue}if(l.type==="html_inline"&&(Jmo(l.content)&&s>0&&s--,Xmo(l.content)&&s++),!(s>0)&&l.type==="text"&&t.md.linkify.test(l.content)){let u=l.content,d=t.md.linkify.match(u),p=[],h=l.level,m=0;d.length>0&&d[0].index===0&&c>0&&o[c-1].type==="text_special"&&(d=d.slice(1));for(let g=0;gm){let x=new t.Token("text","",0);x.content=u.slice(m,_),x.level=h,p.push(x)}let v=new t.Token("link_open","a",1);v.attrs=[["href",y]],v.level=h++,v.markup="linkify",v.info="auto",p.push(v);let b=new t.Token("text","",0);b.content=E,b.level=h,p.push(b);let I=new t.Token("link_close","a",-1);I.level=--h,I.markup="linkify",I.info="auto",p.push(I),m=d[g].lastIndex}if(m=0;r--){let n=t[r];n.type==="text"&&!e&&(n.content=n.content.replace(ego,rgo)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}a(ngo,"replace_scoped");function igo(t){let e=0;for(let r=t.length-1;r>=0;r--){let n=t[r];n.type==="text"&&!e&&Mtn.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}a(igo,"replace_rare");function wMt(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(Zmo.test(t.tokens[e].content)&&ngo(t.tokens[e].children),Mtn.test(t.tokens[e].content)&&igo(t.tokens[e].children))}a(wMt,"replace");f();var ogo=/['"]/,Otn=/['"]/g,Btn="\u2019";function bGe(t,e,r){return t.slice(0,e)+r+t.slice(e+1)}a(bGe,"replaceAt");function sgo(t,e){let r,n=[];for(let o=0;o=0&&!(n[r].level<=c);r--);if(n.length=r+1,s.type!=="text")continue;let l=s.content,u=0,d=l.length;e:for(;u=0)A=l.charCodeAt(p.index-1);else for(r=o-1;r>=0&&!(t[r].type==="softbreak"||t[r].type==="hardbreak");r--)if(t[r].content){A=t[r].content.charCodeAt(t[r].content.length-1);break}let y=32;if(u=48&&A<=57&&(m=h=!1),h&&m&&(h=E,m=_),!h&&!m){g&&(s.content=bGe(s.content,p.index,Btn));continue}if(m)for(r=n.length-1;r>=0;r--){let I=n[r];if(n[r].level=0;e--)t.tokens[e].type!=="inline"||!ogo.test(t.tokens[e].content)||sgo(t.tokens[e].children,t)}a(RMt,"smartquotes");f();function PMt(t){let e,r,n=t.tokens,o=n.length;for(let s=0;s0&&this.level++,this.tokens.push(n),n};wk.prototype.isEmpty=a(function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},"isEmpty");wk.prototype.skipEmptyLines=a(function(e){for(let r=this.lineMax;er;)if(!os(this.src.charCodeAt(--e)))return e+1;return e},"skipSpacesBack");wk.prototype.skipChars=a(function(e,r){for(let n=this.src.length;en;)if(r!==this.src.charCodeAt(--e))return e+1;return e},"skipCharsBack");wk.prototype.getLines=a(function(e,r,n,o){if(e>=r)return"";let s=new Array(r-e);for(let c=0,l=e;ln?s[c]=new Array(u-n+1).join(" ")+this.src.slice(p,h):s[c]=this.src.slice(p,h)}return s.join("")},"getLines");wk.prototype.Token=b4;var Ftn=wk;f();var ago=65536;function NMt(t,e){let r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}a(NMt,"getLine");function Utn(t){let e=[],r=t.length,n=0,o=t.charCodeAt(n),s=!1,c=0,l="";for(;nr)return!1;let o=e+1;if(t.sCount[o]=4)return!1;let s=t.bMarks[o]+t.tShift[o];if(s>=t.eMarks[o])return!1;let c=t.src.charCodeAt(s++);if(c!==124&&c!==45&&c!==58||s>=t.eMarks[o])return!1;let l=t.src.charCodeAt(s++);if(l!==124&&l!==45&&l!==58&&!os(l)||c===45&&os(l))return!1;for(;s=4)return!1;d=Utn(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();let h=d.length;if(h===0||h!==p.length)return!1;if(n)return!0;let m=t.parentType;t.parentType="table";let g=t.md.block.ruler.getRules("blockquote"),A=t.push("table_open","table",1),y=[e,0];A.map=y;let E=t.push("thead_open","thead",1);E.map=[e,e+1];let _=t.push("tr_open","tr",1);_.map=[e,e+1];for(let I=0;I=4||(d=Utn(u),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),b+=h-d.length,b>ago))break;if(o===e+2){let w=t.push("tbody_open","tbody",1);w.map=v=[e+2,0]}let x=t.push("tr_open","tr",1);x.map=[o,o+1];for(let w=0;w=4){n++,o=n;continue}break}t.line=o;let s=t.push("code_block","code",0);return s.content=t.getLines(e,o,4+t.blkIndent,!1)+` +`,s.map=[e,t.line],!0}a(OMt,"code");f();function BMt(t,e,r,n){let o=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||o+3>s)return!1;let c=t.src.charCodeAt(o);if(c!==126&&c!==96)return!1;let l=o;o=t.skipChars(o,c);let u=o-l;if(u<3)return!1;let d=t.src.slice(l,o),p=t.src.slice(o,s);if(c===96&&p.indexOf(String.fromCharCode(c))>=0)return!1;if(n)return!0;let h=e,m=!1;for(;h++,!(h>=r||(o=l=t.bMarks[h]+t.tShift[h],s=t.eMarks[h],o=4)&&(o=t.skipChars(o,c),!(o-l=4||t.src.charCodeAt(o)!==62)return!1;if(n)return!0;let l=[],u=[],d=[],p=[],h=t.md.block.ruler.getRules("blockquote"),m=t.parentType;t.parentType="blockquote";let g=!1,A;for(A=e;A=s)break;if(t.src.charCodeAt(o++)===62&&!b){let x=t.sCount[A]+1,w,R;t.src.charCodeAt(o)===32?(o++,x++,R=!1,w=!0):t.src.charCodeAt(o)===9?(w=!0,(t.bsCount[A]+x)%4===3?(o++,x++,R=!1):R=!0):w=!1;let P=x;for(l.push(t.bMarks[A]),t.bMarks[A]=o;o=s,u.push(t.bsCount[A]),t.bsCount[A]=t.sCount[A]+1+(w?1:0),d.push(t.sCount[A]),t.sCount[A]=P-x,p.push(t.tShift[A]),t.tShift[A]=o-t.bMarks[A];continue}if(g)break;let I=!1;for(let x=0,w=h.length;x";let _=[e,0];E.map=_,t.md.block.tokenize(t,e,A);let v=t.push("blockquote_close","blockquote",-1);v.markup=">",t.lineMax=c,t.parentType=m,_[1]=t.line;for(let b=0;b=4)return!1;let s=t.bMarks[e]+t.tShift[e],c=t.src.charCodeAt(s++);if(c!==42&&c!==45&&c!==95)return!1;let l=1;for(;s=n)return-1;let s=t.src.charCodeAt(o++);if(s<48||s>57)return-1;for(;;){if(o>=n)return-1;if(s=t.src.charCodeAt(o++),s>=48&&s<=57){if(o-r>=10)return-1;continue}if(s===41||s===46)break;return-1}return o=4||t.listIndent>=0&&t.sCount[u]-t.listIndent>=4&&t.sCount[u]=t.blkIndent&&(p=!0);let h,m,g;if((g=qtn(t,u))>=0){if(h=!0,c=t.bMarks[u]+t.tShift[u],m=Number(t.src.slice(c,g-1)),p&&m!==1)return!1}else if((g=Qtn(t,u))>=0)h=!1;else return!1;if(p&&t.skipSpaces(g)>=t.eMarks[u])return!1;if(n)return!0;let A=t.src.charCodeAt(g-1),y=t.tokens.length;h?(l=t.push("ordered_list_open","ol",1),m!==1&&(l.attrs=[["start",m]])):l=t.push("bullet_list_open","ul",1);let E=[u,0];l.map=E,l.markup=String.fromCharCode(A);let _=!1,v=t.md.block.ruler.getRules("list"),b=t.parentType;for(t.parentType="list";u=o?R=1:R=x-I,R>4&&(R=1);let P=I+R;l=t.push("list_item_open","li",1),l.markup=String.fromCharCode(A);let k=[u,0];l.map=k,h&&(l.info=t.src.slice(c,g-1));let Q=t.tight,M=t.tShift[u],N=t.sCount[u],G=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=P,t.tight=!0,t.tShift[u]=w-t.bMarks[u],t.sCount[u]=x,w>=o&&t.isEmpty(u+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,u,r,!0),(!t.tight||_)&&(d=!1),_=t.line-u>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=G,t.tShift[u]=M,t.sCount[u]=N,t.tight=Q,l=t.push("list_item_close","li",-1),l.markup=String.fromCharCode(A),u=t.line,k[1]=u,u>=r||t.sCount[u]=4)break;let O=!1;for(let D=0,F=v.length;D=4||t.src.charCodeAt(o)!==91)return!1;function l(v){let b=t.lineMax;if(v>=b||t.isEmpty(v))return null;let I=!1;if(t.sCount[v]-t.blkIndent>3&&(I=!0),t.sCount[v]<0&&(I=!0),!I){let R=t.md.block.ruler.getRules("reference"),P=t.parentType;t.parentType="reference";let k=!1;for(let Q=0,M=R.length;Q"u"&&(t.env.references={}),typeof t.env.references[_]>"u"&&(t.env.references[_]={title:E,href:h}),t.line=c),!0):!1}a(QMt,"reference");f();f();var Gtn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];f();var lgo="[a-zA-Z_:][a-zA-Z0-9:._-]*",ugo="[^\"'=<>`\\x00-\\x20]+",dgo="'[^']*'",fgo='"[^"]*"',pgo="(?:"+ugo+"|"+dgo+"|"+fgo+")",hgo="(?:\\s+"+lgo+"(?:\\s*=\\s*"+pgo+")?)",Htn="<[A-Za-z][A-Za-z0-9\\-]*"+hgo+"*\\s*\\/?>",jtn="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",mgo="",ggo="<[?][\\s\\S]*?[?]>",Ago="]*>",ygo="",$tn=new RegExp("^(?:"+Htn+"|"+jtn+"|"+mgo+"|"+ggo+"|"+Ago+"|"+ygo+")"),Vtn=new RegExp("^(?:"+Htn+"|"+jtn+")");var aie=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Vtn.source+"\\s*$"),/^$/,!1]];function qMt(t,e,r,n){let o=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(o)!==60)return!1;let c=t.src.slice(o,s),l=0;for(;l=4)return!1;let c=t.src.charCodeAt(o);if(c!==35||o>=s)return!1;let l=1;for(c=t.src.charCodeAt(++o);c===35&&o6||oo&&os(t.src.charCodeAt(u-1))&&(s=u),t.line=e+1;let d=t.push("heading_open","h"+String(l),1);d.markup="########".slice(0,l),d.map=[e,t.line];let p=t.push("inline","",0);p.content=t.src.slice(o,s).trim(),p.map=[e,t.line],p.children=[];let h=t.push("heading_close","h"+String(l),-1);return h.markup="########".slice(0,l),!0}a(GMt,"heading");f();function HMt(t,e,r){let n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;let o=t.parentType;t.parentType="paragraph";let s=0,c,l=e+1;for(;l3)continue;if(t.sCount[l]>=t.blkIndent){let g=t.bMarks[l]+t.tShift[l],A=t.eMarks[l];if(g=A))){s=c===61?1:2;break}}if(t.sCount[l]<0)continue;let m=!1;for(let g=0,A=n.length;g3||t.sCount[s]<0)continue;let d=!1;for(let p=0,h=n.length;p=r||t.sCount[c]=s){t.line=r;break}let u=t.line,d=!1;for(let p=0;p=t.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),c=t.line,c0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(o),n};a_e.prototype.scanDelims=function(t,e){let r=this.posMax,n=this.src.charCodeAt(t),o=t>0?this.src.charCodeAt(t-1):32,s=t;for(;s0)return!1;let r=t.pos,n=t.posMax;if(r+3>n||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47)return!1;let o=t.pending.match(_go);if(!o)return!1;let s=o[1],c=t.md.linkify.matchAtStart(t.src.slice(r-s.length));if(!c)return!1;let l=c.url;if(l.length<=s.length)return!1;let u=l.length;for(;u>0&&l.charCodeAt(u-1)===42;)u--;u!==l.length&&(l=l.slice(0,u));let d=t.md.normalizeLink(l);if(!t.md.validateLink(d))return!1;if(!e){t.pending=t.pending.slice(0,-s.length);let p=t.push("link_open","a",1);p.attrs=[["href",d]],p.markup="linkify",p.info="auto";let h=t.push("text","",0);h.content=t.md.normalizeLinkText(l);let m=t.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return t.pos+=l.length-s.length,!0}a(VMt,"linkify");f();function WMt(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==10)return!1;let n=t.pending.length-1,o=t.posMax;if(!e)if(n>=0&&t.pending.charCodeAt(n)===32)if(n>=1&&t.pending.charCodeAt(n-1)===32){let s=n-1;for(;s>=1&&t.pending.charCodeAt(s-1)===32;)s--;t.pending=t.pending.slice(0,s),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r?@[]^_`{|}~-".split("").forEach(function(t){zMt[t.charCodeAt(0)]=1});function YMt(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let o=t.src.charCodeAt(r);if(o===10){for(e||t.push("hardbreak","br",0),r++;r=55296&&o<=56319&&r+1=56320&&l<=57343&&(s+=t.src[r+1],r++)}let c="\\"+s;if(!e){let l=t.push("text_special","",0);o<256&&zMt[o]!==0?l.content=s:l.content=c,l.markup=c,l.info="escape"}return t.pos=r+1,!0}a(YMt,"escape");f();function KMt(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==96)return!1;let o=r;r++;let s=t.posMax;for(;r=0;n--){let o=e[n];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;let s=e[o.end],c=n>0&&e[n-1].end===o.end+1&&e[n-1].marker===o.marker&&e[n-1].token===o.token-1&&e[o.end+1].token===s.token+1,l=String.fromCharCode(o.marker),u=t.tokens[o.token];u.type=c?"strong_open":"em_open",u.tag=c?"strong":"em",u.nesting=1,u.markup=c?l+l:l,u.content="";let d=t.tokens[s.token];d.type=c?"strong_close":"em_close",d.tag=c?"strong":"em",d.nesting=-1,d.markup=c?l+l:l,d.content="",c&&(t.tokens[e[n-1].token].content="",t.tokens[e[o.end+1].token].content="",n--)}}a(Ktn,"postProcess");function Tgo(t){let e=t.tokens_meta,r=t.tokens_meta.length;Ktn(t,t.delimiters);for(let n=0;n=h)return!1;if(u=A,o=t.md.helpers.parseLinkDestination(t.src,A,t.posMax),o.ok){for(c=t.md.normalizeLink(o.str),t.md.validateLink(c)?A=o.pos:c="",u=A;A=h||t.src.charCodeAt(A)!==41)&&(d=!0),A++}if(d){if(typeof t.env.references>"u")return!1;if(A=0?n=t.src.slice(u,A++):A=g+1):A=g+1,n||(n=t.src.slice(m,g)),s=t.env.references[t$(n)],!s)return t.pos=p,!1;c=s.href,l=s.title}if(!e){t.pos=m,t.posMax=g;let y=t.push("link_open","a",1),E=[["href",c]];y.attrs=E,l&&E.push(["title",l]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=A,t.posMax=h,!0}a(ZMt,"link");f();function e4t(t,e){let r,n,o,s,c,l,u,d,p="",h=t.pos,m=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;let g=t.pos+2,A=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(A<0)return!1;if(s=A+1,s=m)return!1;for(d=s,l=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),l.ok&&(p=t.md.normalizeLink(l.str),t.md.validateLink(p)?s=l.pos:p=""),d=s;s=m||t.src.charCodeAt(s)!==41)return t.pos=h,!1;s++}else{if(typeof t.env.references>"u")return!1;if(s=0?o=t.src.slice(d,s++):s=A+1):s=A+1,o||(o=t.src.slice(g,A)),c=t.env.references[t$(o)],!c)return t.pos=h,!1;p=c.href,u=c.title}if(!e){n=t.src.slice(g,A);let y=[];t.md.inline.parse(n,t.md,t.env,y);let E=t.push("image","img",0),_=[["src",p],["alt",""]];E.attrs=_,E.children=y,E.content=n,u&&_.push(["title",u])}return t.pos=s,t.posMax=m,!0}a(e4t,"image");f();var Sgo=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Igo=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function t4t(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==60)return!1;let n=t.pos,o=t.posMax;for(;;){if(++r>=o)return!1;let c=t.src.charCodeAt(r);if(c===60)return!1;if(c===62)break}let s=t.src.slice(n+1,r);if(Igo.test(s)){let c=t.md.normalizeLink(s);if(!t.md.validateLink(c))return!1;if(!e){let l=t.push("link_open","a",1);l.attrs=[["href",c]],l.markup="autolink",l.info="auto";let u=t.push("text","",0);u.content=t.md.normalizeLinkText(s);let d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=s.length+2,!0}if(Sgo.test(s)){let c=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(c))return!1;if(!e){let l=t.push("link_open","a",1);l.attrs=[["href",c]],l.markup="autolink",l.info="auto";let u=t.push("text","",0);u.content=t.md.normalizeLinkText(s);let d=t.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return t.pos+=s.length+2,!0}return!1}a(t4t,"autolink");f();function xgo(t){return/^\s]/i.test(t)}a(xgo,"isLinkOpen");function wgo(t){return/^<\/a\s*>/i.test(t)}a(wgo,"isLinkClose");function Rgo(t){let e=t|32;return e>=97&&e<=122}a(Rgo,"isLetter");function r4t(t,e){if(!t.md.options.html)return!1;let r=t.posMax,n=t.pos;if(t.src.charCodeAt(n)!==60||n+2>=r)return!1;let o=t.src.charCodeAt(n+1);if(o!==33&&o!==63&&o!==47&&!Rgo(o))return!1;let s=t.src.slice(n).match($tn);if(!s)return!1;if(!e){let c=t.push("html_inline","",0);c.content=s[0],xgo(c.content)&&t.linkLevel++,wgo(c.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}a(r4t,"html_inline");f();var Pgo=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,kgo=/^&([a-z][a-z0-9]{1,31});/i;function n4t(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==38||r+1>=n)return!1;if(t.src.charCodeAt(r+1)===35){let s=t.src.slice(r).match(Pgo);if(s){if(!e){let c=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),l=t.push("text_special","",0);l.content=vGe(c)?s_e(c):s_e(65533),l.markup=s[0],l.info="entity"}return t.pos+=s[0].length,!0}}else{let s=t.src.slice(r).match(kgo);if(s){let c=TF(s[0]);if(c!==s[0]){if(!e){let l=t.push("text_special","",0);l.content=c,l.markup=s[0],l.info="entity"}return t.pos+=s[0].length,!0}}}return!1}a(n4t,"entity");f();function Jtn(t){let e={},r=t.length;if(!r)return;let n=0,o=-2,s=[];for(let c=0;cu;d-=s[d]+1){let h=t[d];if(h.marker===l.marker&&h.open&&h.end<0){let m=!1;if((h.close||l.open)&&(h.length+l.length)%3===0&&(h.length%3!==0||l.length%3!==0)&&(m=!0),!m){let g=d>0&&!t[d-1].open?s[d-1]+1:0;s[c]=c-d+g,s[d]=g,l.open=!1,h.end=c,h.close=!1,p=-1,o=-2;break}}}p!==-1&&(e[l.marker][(l.open?3:0)+(l.length||0)%3]=p)}}a(Jtn,"processDelimiters");function i4t(t){let e=t.tokens_meta,r=t.tokens_meta.length;Jtn(t.delimiters);for(let n=0;n0&&n++,o[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;c||t.pos++,s[e]=t.pos};c_e.prototype.tokenize=function(t){let e=this.ruler.getRules(""),r=e.length,n=t.posMax,o=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};c_e.prototype.parse=function(t,e,r,n){let o=new this.State(t,e,r,n);this.tokenize(o);let s=this.ruler2.getRules(""),c=s.length;for(let l=0;l|$))",e.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}a(c4t,"default");function l4t(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}a(l4t,"assign");function xGe(t){return Object.prototype.toString.call(t)}a(xGe,"_class");function Dgo(t){return xGe(t)==="[object String]"}a(Dgo,"isString");function Ngo(t){return xGe(t)==="[object Object]"}a(Ngo,"isObject");function Mgo(t){return xGe(t)==="[object RegExp]"}a(Mgo,"isRegExp");function Ztn(t){return xGe(t)==="[object Function]"}a(Ztn,"isFunction");function Ogo(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}a(Ogo,"escapeRE");var trn={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Bgo(t){return Object.keys(t||{}).reduce(function(e,r){return e||trn.hasOwnProperty(r)},!1)}a(Bgo,"isOptionsObj");var Lgo={"http:":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0},"validate")},"https:":"http:","ftp:":"http:","//":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0},"validate")},"mailto:":{validate:a(function(t,e,r){let n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0},"validate")}},Fgo="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Ugo="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function Qgo(t){t.__index__=-1,t.__text_cache__=""}a(Qgo,"resetScanCache");function qgo(t){return function(e,r){let n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}a(qgo,"createValidator");function ern(){return function(t,e){e.normalize(t)}}a(ern,"createNormalizer");function IGe(t){let e=t.re=c4t(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(Fgo),r.push(e.src_xn),e.src_tlds=r.join("|");function n(l){return l.replace("%TLDS%",e.src_tlds)}a(n,"untpl"),e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let o=[];t.__compiled__={};function s(l,u){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+u)}a(s,"schemaError"),Object.keys(t.__schemas__).forEach(function(l){let u=t.__schemas__[l];if(u===null)return;let d={validate:null,link:null};if(t.__compiled__[l]=d,Ngo(u)){Mgo(u.validate)?d.validate=qgo(u.validate):Ztn(u.validate)?d.validate=u.validate:s(l,u),Ztn(u.normalize)?d.normalize=u.normalize:u.normalize?s(l,u):d.normalize=ern();return}if(Dgo(u)){o.push(l);return}s(l,u)}),o.forEach(function(l){t.__compiled__[t.__schemas__[l]]&&(t.__compiled__[l].validate=t.__compiled__[t.__schemas__[l]].validate,t.__compiled__[l].normalize=t.__compiled__[t.__schemas__[l]].normalize)}),t.__compiled__[""]={validate:null,normalize:ern()};let c=Object.keys(t.__compiled__).filter(function(l){return l.length>0&&t.__compiled__[l]}).map(Ogo).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+c+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+c+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Qgo(t)}a(IGe,"compile");function Ggo(t,e){let r=t.__index__,n=t.__last_index__,o=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}a(Ggo,"Match");function u4t(t,e){let r=new Ggo(t,e);return t.__compiled__[r.schema].normalize(r,t),r}a(u4t,"createMatch");function Z1(t,e){if(!(this instanceof Z1))return new Z1(t,e);e||Bgo(t)&&(e=t,t={}),this.__opts__=l4t({},trn,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=l4t({},Lgo,t),this.__compiled__={},this.__tlds__=Ugo,this.__tlds_replaced__=!1,this.re={},IGe(this)}a(Z1,"LinkifyIt");Z1.prototype.add=a(function(e,r){return this.__schemas__[e]=r,IGe(this),this},"add");Z1.prototype.set=a(function(e){return this.__opts__=l4t(this.__opts__,e),this},"set");Z1.prototype.test=a(function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,o,s,c,l,u,d,p;if(this.re.schema_test.test(e)){for(u=this.re.schema_search,u.lastIndex=0;(r=u.exec(e))!==null;)if(s=this.testSchemaAt(e,r[2],u.lastIndex),s){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=e.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d=0&&(o=e.match(this.re.email_fuzzy))!==null&&(c=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||cthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=l))),this.__index__>=0},"test");Z1.prototype.pretest=a(function(e){return this.re.pretest.test(e)},"pretest");Z1.prototype.testSchemaAt=a(function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0},"testSchemaAt");Z1.prototype.match=a(function(e){let r=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(u4t(this,n)),n=this.__last_index__);let o=n?e.slice(n):e;for(;this.test(o);)r.push(u4t(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},"match");Z1.prototype.matchAtStart=a(function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let r=this.re.schema_at_start.exec(e);if(!r)return null;let n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,u4t(this,0)):null},"matchAtStart");Z1.prototype.tlds=a(function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,o,s){return n!==s[o-1]}).reverse(),IGe(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,IGe(this),this)},"tlds");Z1.prototype.normalize=a(function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},"normalize");Z1.prototype.onCompile=a(function(){},"onCompile");var rrn=Z1;f();var Hgo=/^xn--/,jgo=/[^\0-\x7F]/,$go=/[\x2E\u3002\uFF0E\uFF61]/g,Vgo={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d4t=35,Rk=Math.floor,f4t=String.fromCharCode;function SF(t){throw new RangeError(Vgo[t])}a(SF,"error");function Wgo(t,e){let r=[],n=t.length;for(;n--;)r[n]=e(t[n]);return r}a(Wgo,"map");function irn(t,e){let r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace($go,".");let o=t.split("."),s=Wgo(o,e).join(".");return n+s}a(irn,"mapDomain");function orn(t){let e=[],r=0,n=t.length;for(;r=55296&&o<=56319&&rString.fromCodePoint(...t),"ucs2encode"),Ygo=a(function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},"basicToDigit"),nrn=a(function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},"digitToBasic"),srn=a(function(t,e,r){let n=0;for(t=r?Rk(t/700):t>>1,t+=Rk(t/e);t>d4t*26>>1;n+=36)t=Rk(t/d4t);return Rk(n+(d4t+1)*t/(t+38))},"adapt"),arn=a(function(t){let e=[],r=t.length,n=0,o=128,s=72,c=t.lastIndexOf("-");c<0&&(c=0);for(let l=0;l=128&&SF("not-basic"),e.push(t.charCodeAt(l));for(let l=c>0?c+1:0;l=r&&SF("invalid-input");let m=Ygo(t.charCodeAt(l++));m>=36&&SF("invalid-input"),m>Rk((2147483647-n)/p)&&SF("overflow"),n+=m*p;let g=h<=s?1:h>=s+26?26:h-s;if(mRk(2147483647/A)&&SF("overflow"),p*=A}let d=e.length+1;s=srn(n-u,d,u==0),Rk(n/d)>2147483647-o&&SF("overflow"),o+=Rk(n/d),n%=d,e.splice(n++,0,o)}return String.fromCodePoint(...e)},"decode"),crn=a(function(t){let e=[];t=orn(t);let r=t.length,n=128,o=0,s=72;for(let u of t)u<128&&e.push(f4t(u));let c=e.length,l=c;for(c&&e.push("-");l=n&&pRk((2147483647-o)/d)&&SF("overflow"),o+=(u-n)*d,n=u;for(let p of t)if(p2147483647&&SF("overflow"),p===n){let h=o;for(let m=36;;m+=36){let g=m<=s?1:m>=s+26?26:m-s;if(h=0))try{e.hostname=p4t.toASCII(e.hostname)}catch{}return fGe(rie(e))}a(nAo,"normalizeLink");function iAo(t){let e=o_e(t,!0);if(e.hostname&&(!e.protocol||frn.indexOf(e.protocol)>=0))try{e.hostname=p4t.toUnicode(e.hostname)}catch{}return i_e(rie(e),i_e.defaultChars+"%")}a(iAo,"normalizeLinkText");function UT(t,e){if(!(this instanceof UT))return new UT(t,e);e||CGe(t)||(e=t||{},t="default"),this.inline=new Xtn,this.block=new Wtn,this.core=new Ltn,this.renderer=new ktn,this.linkify=new rrn,this.validateLink=rAo,this.normalizeLink=nAo,this.normalizeLinkText=iAo,this.utils=EMt,this.helpers=iie({},bMt),this.options={},this.configure(t),e&&this.set(e)}a(UT,"MarkdownIt");UT.prototype.set=function(t){return iie(this.options,t),this};UT.prototype.configure=function(t){let e=this;if(CGe(t)){let r=t;if(t=Zgo[r],!t)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this};UT.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));let n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};UT.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));let n=t.filter(function(o){return r.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};UT.prototype.use=function(t){let e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};UT.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");let r=new this.core.State(t,this,e);return this.core.process(r),r.tokens};UT.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};UT.prototype.parseInline=function(t,e){let r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};UT.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var h4t=UT;function m4t(t){return Array.isArray(t)}a(m4t,"isArray");function oAo(t){if(t.type!=="fence")return!1;let{map:e,markup:r,content:n,info:o}=t;return(e===null||m4t(e)&&e.length===2&&e.every(c=>typeof c=="number"))&&typeof r=="string"&&typeof n=="string"&&typeof o=="string"}a(oAo,"isFenceToken");function*prn(t){for(let e of t)if(yield e,e&&typeof e=="object"&&"children"in e){let r=e;m4t(r.children)&&(yield*prn(r.children))}}a(prn,"flattenTokensLists");function sAo(){return new h4t}a(sAo,"createMarkdownIt");function hrn(t){let e=[],n=sAo().parse(t,{});if(!m4t(n))return e;for(let o of prn(n)){if(!o||typeof o!="object")continue;let s=o;if(oAo(s)&&s.map){let c=s.map;e.push({startMarkup:s.markup,code:s.content.replace(/\n$/,""),language:s.info.trim(),startLine:c[0],endLine:c[1]})}}return e}a(hrn,"extractCodeBlocks");function g4t(t){let e=["script","style","iframe","object","embed","form","base","meta","link"],r=/(```[\s\S]*?```|`[^`\n]+?`)/g;return t.split(r).map((o,s)=>{if(s%2===1)return o;let l=new RegExp(`]*)?/?>`,"gi");return o.replace(l,u=>u.replace(//g,">"))}).join("")}a(g4t,"escapeProblematicHtmlTags");var y4t=_n.Gpt4oMini,mrn=new Se("virtualToolSummarizer"),l_e=class extends Error{static{a(this,"SummarizerError")}};function grn(t){return typeof t=="object"&&t!==null&&"name"in t&&"summary"in t&&typeof t.name=="string"&&typeof t.summary=="string"}a(grn,"isValidCategoryItem");function Arn(t,e){if(!Array.isArray(t))throw new l_e(`Invalid response from ${e}: ${JSON.stringify(t)}`);if(!t.every(grn))throw new l_e(`Invalid response from ${e}: ${JSON.stringify(t)}`)}a(Arn,"validateCategoriesWithoutToolsResponse");function aAo(t){return grn(t)&&"tools"in t&&Array.isArray(t.tools)&&t.tools.every(e=>typeof e=="string")}a(aAo,"isValidCategorizationItem");function yrn(t,e){if(Arn(t,e),!t.every(aAo))throw new l_e(`Invalid response from ${e}: ${JSON.stringify(t)}`)}a(yrn,"validateCategorizationResponse");function Ern(t,e=new Set){return t.filter(r=>{let n=e.has(r.name);return e.add(r.name),!n})}a(Ern,"deduplicateTools");function cAo(t){let e=new Map;for(let r of t){let n=Crn(r.name),o=e.get(n);o?(r.summary&&r.summary!==o.summary&&(o.summary=`${o.summary} -${r.summary}`),o.tools=o.tools.concat(r.tools)):e.set(r.name,{tools:r.tools,name:n,summary:r.summary})}for(let r of e.values())r.tools=Ctn(r.tools);return[...e.values()]}a(amo,"validateAndCleanupCategories");function _tn(t,e){let r=t.map(n=>({name:n.name,summary:n.summary,tools:n.tools.map(o=>e.get(o)).filter(den)}));return amo(r)}a(_tn,"processCategorizationResponse");function vtn(t){return t.replace(/[^a-zA-Z0-9_]/g,"_").toLowerCase()}a(vtn,"normalizeGroupName");function JMt(t,e){let r=new Map(e);for(let n of t)for(let o of n.tools)r.delete(o.name);return r.size>0&&t.push({name:zGe,summary:ten,tools:[...r.values()]}),t}a(JMt,"addUncategorizedToolsIfNeeded");async function ZMt(t,e,r,n){if(n.isCancellationRequested)return gtn.debug(t.ctx,"Summarization cancelled"),null;let o=wm.agent("conversation-other",t.turn.telemetryId),s={messages:e.messages,uiKind:"agentPanel",llmInteraction:o,modelConfiguration:r},c=await rc(t.ctx,t,{languageId:""});c=c.extendedBy({messageSource:"virtualTools.generate",modelId:r.modelId});let u=await new ya(t.ctx).fetchResponse(s,n,c,void 0);if(n.isCancellationRequested)return gtn.debug(t.ctx,"Summarization cancelled"),null;if(u.type!=="success")return null;for(let p of mtn(u.value))try{return JSON.parse(p.code)}catch{}let d=u.value.indexOf("{");return JSON.parse(u.value.slice(d))||null}a(ZMt,"getResponse");async function btn(t,e,r){let n=await t.ctx.get(Da).getBestChatModelConfig([XMt]),s=await y0.create(ZGe,{tools:e},n).renderPrompt(void 0,r),c=await ZMt(t,s,n,r);if(!c)return;let l=[c];return ytn(l,"categorizer"),{...l[0],tools:Ctn(e),name:vtn(l[0].name)}}a(btn,"summarizeToolGroup");async function Ttn(t,e,r){let n=await t.ctx.get(Da).getBestChatModelConfig([XMt]),s=await y0.create(eHe,{tools:e},n).renderPrompt(void 0,r),c=await ZMt(t,s,n,r);if(!c)return;Etn(c,"categorizer");let l=new Map(e.map(h=>[h.name,h])),u=_tn(c,l),d=new Set(u.flatMap(h=>h.tools.map(m=>m.name))),p=e.filter(h=>!d.has(h.name));if(p.length>0){let h=await eOt(t,u,p,r);h&&(u=h),u=JMt(u,l)}return u}a(Ttn,"divideToolsIntoGroups");async function eOt(t,e,r,n){let o=await t.ctx.get(Da).getBestChatModelConfig([XMt]),c=await y0.create(tHe,{existingGroups:e,newTools:r},o).renderPrompt(void 0,n),l=await ZMt(t,c,o,n);if(!l)return;Etn(l,"existing group categorizer");let u=[...e.flatMap(h=>h.tools),...r],d=new Map(u.map(h=>[h.name,h])),p=_tn(l,d);return JMt(p,d)}a(eOt,"divideToolsIntoExistingGroups");var xtn=de(require("crypto"));var tOt=new Se("virtualToolGrouper"),Itn="builtin",dmo=`Call this tool when you need access to a new category of tools. The category of tools is described as follows: +${r.summary}`),o.tools=o.tools.concat(r.tools)):e.set(r.name,{tools:r.tools,name:n,summary:r.summary})}for(let r of e.values())r.tools=Ern(r.tools);return[...e.values()]}a(cAo,"validateAndCleanupCategories");function _rn(t,e){let r=t.map(n=>({name:n.name,summary:n.summary,tools:n.tools.map(o=>e.get(o)).filter(utn)}));return cAo(r)}a(_rn,"processCategorizationResponse");function Crn(t){return t.replace(/[^a-zA-Z0-9_]/g,"_").toLowerCase()}a(Crn,"normalizeGroupName");function A4t(t,e){let r=new Map(e);for(let n of t)for(let o of n.tools)r.delete(o.name);return r.size>0&&t.push({name:rGe,summary:etn,tools:[...r.values()]}),t}a(A4t,"addUncategorizedToolsIfNeeded");async function E4t(t,e,r,n){if(n.isCancellationRequested)return mrn.debug(t.ctx,"Summarization cancelled"),null;let o=ym.agent("conversation-other",t.turn.telemetryId),s={messages:e.messages,uiKind:"agentPanel",llmInteraction:o,modelConfiguration:r},c=await Ja(t.ctx,t,{languageId:""});c=c.extendedBy({messageSource:"virtualTools.generate",modelId:r.modelId});let u=await new fa(t.ctx).fetchResponse(s,n,c,void 0);if(n.isCancellationRequested)return mrn.debug(t.ctx,"Summarization cancelled"),null;if(u.type!=="success")return null;for(let p of hrn(u.value))try{return JSON.parse(p.code)}catch{}let d=u.value.indexOf("{");return JSON.parse(u.value.slice(d))||null}a(E4t,"getResponse");async function vrn(t,e,r){let n=await t.ctx.get(wa).getBestChatModelConfig([y4t]),s=await p0.create(aGe,{tools:e},n).renderPrompt(void 0,r),c=await E4t(t,s,n,r);if(!c)return;let l=[c];return Arn(l,"categorizer"),{...l[0],tools:Ern(e),name:Crn(l[0].name)}}a(vrn,"summarizeToolGroup");async function brn(t,e,r){let n=await t.ctx.get(wa).getBestChatModelConfig([y4t]),s=await p0.create(cGe,{tools:e},n).renderPrompt(void 0,r),c=await E4t(t,s,n,r);if(!c)return;yrn(c,"categorizer");let l=new Map(e.map(h=>[h.name,h])),u=_rn(c,l),d=new Set(u.flatMap(h=>h.tools.map(m=>m.name))),p=e.filter(h=>!d.has(h.name));if(p.length>0){let h=await _4t(t,u,p,r);h&&(u=h),u=A4t(u,l)}return u}a(brn,"divideToolsIntoGroups");async function _4t(t,e,r,n){let o=await t.ctx.get(wa).getBestChatModelConfig([y4t]),c=await p0.create(lGe,{existingGroups:e,newTools:r},o).renderPrompt(void 0,n),l=await E4t(t,c,o,n);if(!l)return;yrn(l,"existing group categorizer");let u=[...e.flatMap(h=>h.tools),...r],d=new Map(u.map(h=>[h.name,h])),p=_rn(l,d);return A4t(p,d)}a(_4t,"divideToolsIntoExistingGroups");var Irn=de(require("crypto"));var C4t=new Se("virtualToolGrouper"),Srn="builtin",fAo=`Call this tool when you need access to a new category of tools. The category of tools is described as follows: -`,fmo=` +`,pAo=` -Be sure to call this tool if you need a capability related to the above.`,CHe=class{static{a(this,"VirtualToolGrouper")}constructor(e){this.turnContext=e}async addGroups(e,r,n){if(r.lengthu.type==="mcp"?"mcp_"+u.toolProvider.id:u.type==="client"||u.type==="shared"?Itn:"unexpected_"+u.toolProvider.id),s=new Map,c=new Map;for(let u of e.all())u instanceof yy&&(s.set(u.name,u),u.metadata.toolsetKey&&c.set(u.metadata.toolsetKey,u.metadata.groups));if(n.isCancellationRequested)return;let l=await Promise.all(Object.entries(o).map(([u,d])=>{if(u===Itn)return d;{let p=s.get(u);if(p){let h=p.all().filter(m=>m instanceof Vj);if(this.getKey(h)===this.getKey(d))return p}return this._generateGroupsFromToolset(u,d,c.get(u),n)}}));e.contents=this._deduplicateGroups(l.flat());for(let u of e.all())if(u instanceof yy){let d=s.get(u.name);d&&(u.isExpanded=d.isExpanded,u.metadata.preExpanded=d.metadata.preExpanded,u.lastUsedOnTurn=d.lastUsedOnTurn)}this._reExpandToolsToHitBudget(e)}async _generateGroupsFromToolset(e,r,n,o){if(r.length<=2)return r;let s=0,c;for(;!c&&s<3;s++){if(o.isCancellationRequested)return[];try{c=await(r.length<=16?this._summarizeToolGroup(r,o):this._divideToolsIntoGroups(r,n,o))}catch(d){tOt.error(this.turnContext.ctx,`Failed to categorize tools: ${zl(d)}`)}}tOt.info(this.turnContext.ctx,`Tool categorization completed after ${s} attempt(s).`);let l=[];if(!c)l=r;else{let d=c.findIndex(p=>p.name===zGe);d>=0&&(l=c[d].tools,c.splice(d,1))}return(c?.map(d=>{let p=r[0].toolProvider,h=p.displayNamePrefix??p.id;return new yy(zF+d.name,dmo+d.summary+fmo,0,{toolsetKey:e,groups:c,possiblePrefix:h?.replaceAll(/[^a-zA-Z0-9]/g,"_").slice(0,10)+"_"},d.tools)})||[]).concat(l)}_reExpandToolsToHitBudget(e){let r=e.tools().length;if(r>64)return;let n=e.contents.filter(o=>o instanceof yy&&!o.isExpanded).sort((o,s)=>o.contents.length-s.contents.length);for(let o of n){let s=r-1+o.contents.length;if(s>128||(o.isExpanded=!0,o.metadata.preExpanded=!0,r=s,r>64))break}}async _summarizeToolGroup(e,r){let n=await btn(this.turnContext,e,r);return n&&[n]}async _divideToolsIntoGroups(e,r,n){if(r){let s=new Set(e.map(c=>c.name));r=r.map(c=>({...c,tools:c.tools.filter(l=>s.has(l.name))})).filter(c=>c.tools.length>0)}let o=r?.length?await eOt(this.turnContext,r,e,n):await Ttn(this.turnContext,e,n);if(o)return o}_deduplicateGroups(e){let r=new Map;for(let n of e){let o=r.get(n.name);if(!o){r.set(n.name,n);continue}if(o instanceof yy&&o.metadata.possiblePrefix){r.delete(o.name);let s=o.cloneWithPrefix(o.metadata.possiblePrefix);r.set(s.name,s),r.set(n.name,n)}else if(n instanceof yy&&n.metadata.possiblePrefix){let s=n.cloneWithPrefix(n.metadata.possiblePrefix);r.set(s.name,s)}}return[...r.values()]}getKey(e){let r=e.map(n=>n.name+"\0"+n.description).sort().join(",");return xtn.createHash("sha256").update(r).digest("hex")}};var _He=class{constructor(e){this._root=new yy(zF,"",1/0,{groups:[],toolsetKey:"",preExpanded:!0});this._didToolsChange=!0;this._turnNo=0;this._trimOnNextCompute=!1;this._tools=e,this._root.isExpanded=!0}static{a(this,"ToolGrouping")}get tools(){return this._tools}get isEnabled(){return this._tools.length>128}get root(){return this._root}set tools(e){o_e(this._tools,e,(r,n)=>r.name===n.name)||(this._tools=[...e],this._didToolsChange=!0)}async compute(e,r){if(this._didToolsChange&&(await new CHe(e).addGroups(this._root,this._tools.slice(),r),this._didToolsChange=!1),this._expandOnNext){for(let o of this._expandOnNext)this._root.find(o)?.path.forEach(s=>{s.isExpanded=!0,s.lastUsedOnTurn=this._turnNo});this._expandOnNext=void 0}let n=128;for(this._trimOnNextCompute&&(n=96,this._trimOnNextCompute=!1),this._root.lastUsedOnTurn=1/0;this._root.tools().length>n;){let o=this._root.getLowestExpandedTool();if(!o||o===this._root)break;o.isExpanded=!1,o.metadata.preExpanded=!1}return this._trimOnNextCompute=!1,[...this._root.tools()]}ensureExpanded(e){this._expandOnNext??=new Set,this._expandOnNext.add(e)}didInvalidateCache(){this._trimOnNextCompute=!0}didTakeTurn(){this._turnNo++}didCall(e){let r=this._root.find(e);if(!r)return;let{path:n,tool:o}=r;for(let s of n)s.lastUsedOnTurn=this._turnNo;if(o instanceof yy)return o.isExpanded=!0,new Cr([new fr(`Tools activated: ${[...o.tools()].map(s=>s.name).join(", ")}`)],"success")}};var Gk=class{constructor(){this._groups=new Map}static{a(this,"ToolGroupingService")}get groups(){return[...this._groups.values()]}getGroupKey(e){let r=e.turn.chatMode;return r===void 0||r===Tc.Agent?"_global_":r.id}getGroup(e){let r=this.getGroupKey(e);return this._groups.get(r)}create(e,r){let n=this.getGroupKey(e),o=this._groups.get(n);return o?o.tools=r:(o=new _He(r),this._groups.set(n,o)),o}didTakeTurn(e){this.getGroup(e)?.didTakeTurn()}didCall(e,r){return this.getGroup(e)?.didCall(r)}isEnabled(e){return this.getGroup(e)?.isEnabled??!1}compute(e,r){return this.getGroup(e)?.compute(e,r)}findTool(e,r){return this.getGroup(e)?.root.find(r)?.tool??null}};f();function wtn(t){let e=t*.05,r=Math.min(Math.max(e,1e3),3e3);return t-r}a(wtn,"calculateReducedMaxRequestTokens");var hmo=500,Nm=new Se("toolCallingLoop"),mmo="internal.tool_calling_loop_continue_confirmation",zie=class t{constructor(e,r,n,o,s){this.turnContext=e;this.chatFetcher=r;this.modelConfiguration=n;this.baseTelemetryWithExp=o;this.subagentConfig=s;this.nextTrajectoryOrder=0;this.toolCallRounds=[];this.conversationProgress=e.ctx.get(Na),this.conversation=e.conversation,this.turn=e.turn,this.toolsService=e.ctx.get(Po),this.transcriptPersistence=new vh(e.ctx),this.llmRequestPersistence=Bre(()=>{if(!M7e(e.ctx))return;let d=e.subagentInfo;return new D7e(e.ctx,void 0,"ToolCallingLoop",e.conversation.id.toString(),e.turn.id.toString(),void 0,e.turn.parentTurnId?.toString(),d?.name)},void 0),this.hookTrigger=new Pie(e.ctx,e.conversation,e.turn.workspaceFolders||[]),this.metricsTracker=new YGe(e.ctx,this.conversation,this.turn,this.conversationProgress);let c=this.modelConfiguration.maxRequestTokens,l=wtn(c),u=c-l;Nm.debug(this.turnContext.ctx,`Token reduction applied: original=${c}, reduced=${l}, reduction=${u} tokens`),this.modelConfiguration={...this.modelConfiguration,maxRequestTokens:l},this.requestId=yr(),this.baseTelemetryWithExp=this.baseTelemetryWithExp.extendedBy({requestId:this.requestId}),this.maxToolCallingLoop=s?.getMaxRounds?.()??Math.min(hmo,vr(e.ctx,tt.MaxToolCallingLoop)),this.requestLimitIncrement=this.maxToolCallingLoop,this.snapshotTextDocumentProvider=new uGe(new dGe(e.ctx))}static{a(this,"ToolCallingLoop")}static{this.NextToolCallId=Date.now()}async run(e){this.abortIfCanceled(e);let r=0,n;if(this.turnContext.todoListSnapshot=this.turnContext.ctx.get(_p).getTodos(this.conversation),await this.llmRequestPersistence?.ensureInitialized(),this.cachedUseMessagesEndpoint=await Q9e(this.turnContext.ctx,this.modelConfiguration),this.turnContext.subagentInfo){let o=this.turnContext.subagentInfo.isAutoModel?" (Auto)":"";await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** is working with **${this.turnContext.subagentInfo.model} language model**${o} +Be sure to call this tool if you need a capability related to the above.`,wGe=class{static{a(this,"VirtualToolGrouper")}constructor(e){this.turnContext=e}async addGroups(e,r,n){if(r.lengthu.type==="mcp"?"mcp_"+u.toolProvider.id:u.type==="client"||u.type==="shared"?Srn:"unexpected_"+u.toolProvider.id),s=new Map,c=new Map;for(let u of e.all())u instanceof ly&&(s.set(u.name,u),u.metadata.toolsetKey&&c.set(u.metadata.toolsetKey,u.metadata.groups));if(n.isCancellationRequested)return;let l=await Promise.all(Object.entries(o).map(([u,d])=>{if(u===Srn)return d;{let p=s.get(u);if(p){let h=p.all().filter(m=>m instanceof ZH);if(this.getKey(h)===this.getKey(d))return p}return this._generateGroupsFromToolset(u,d,c.get(u),n)}}));e.contents=this._deduplicateGroups(l.flat());for(let u of e.all())if(u instanceof ly){let d=s.get(u.name);d&&(u.isExpanded=d.isExpanded,u.metadata.preExpanded=d.metadata.preExpanded,u.lastUsedOnTurn=d.lastUsedOnTurn)}this._reExpandToolsToHitBudget(e)}async _generateGroupsFromToolset(e,r,n,o){if(r.length<=2)return r;let s=0,c;for(;!c&&s<3;s++){if(o.isCancellationRequested)return[];try{c=await(r.length<=16?this._summarizeToolGroup(r,o):this._divideToolsIntoGroups(r,n,o))}catch(d){C4t.error(this.turnContext.ctx,`Failed to categorize tools: ${Ql(d)}`)}}C4t.info(this.turnContext.ctx,`Tool categorization completed after ${s} attempt(s).`);let l=[];if(!c)l=r;else{let d=c.findIndex(p=>p.name===rGe);d>=0&&(l=c[d].tools,c.splice(d,1))}return(c?.map(d=>{let p=r[0].toolProvider,h=p.displayNamePrefix??p.id;return new ly(CF+d.name,fAo+d.summary+pAo,0,{toolsetKey:e,groups:c,possiblePrefix:h?.replaceAll(/[^a-zA-Z0-9]/g,"_").slice(0,10)+"_"},d.tools)})||[]).concat(l)}_reExpandToolsToHitBudget(e){let r=e.tools().length;if(r>64)return;let n=e.contents.filter(o=>o instanceof ly&&!o.isExpanded).sort((o,s)=>o.contents.length-s.contents.length);for(let o of n){let s=r-1+o.contents.length;if(s>128||(o.isExpanded=!0,o.metadata.preExpanded=!0,r=s,r>64))break}}async _summarizeToolGroup(e,r){let n=await vrn(this.turnContext,e,r);return n&&[n]}async _divideToolsIntoGroups(e,r,n){if(r){let s=new Set(e.map(c=>c.name));r=r.map(c=>({...c,tools:c.tools.filter(l=>s.has(l.name))})).filter(c=>c.tools.length>0)}let o=r?.length?await _4t(this.turnContext,r,e,n):await brn(this.turnContext,e,n);if(o)return o}_deduplicateGroups(e){let r=new Map;for(let n of e){let o=r.get(n.name);if(!o){r.set(n.name,n);continue}if(o instanceof ly&&o.metadata.possiblePrefix){r.delete(o.name);let s=o.cloneWithPrefix(o.metadata.possiblePrefix);r.set(s.name,s),r.set(n.name,n)}else if(n instanceof ly&&n.metadata.possiblePrefix){let s=n.cloneWithPrefix(n.metadata.possiblePrefix);r.set(s.name,s)}}return[...r.values()]}getKey(e){let r=e.map(n=>n.name+"\0"+n.description).sort().join(",");return Irn.createHash("sha256").update(r).digest("hex")}};var RGe=class{constructor(e){this._root=new ly(CF,"",1/0,{groups:[],toolsetKey:"",preExpanded:!0});this._didToolsChange=!0;this._turnNo=0;this._trimOnNextCompute=!1;this._tools=e,this._root.isExpanded=!0}static{a(this,"ToolGrouping")}get tools(){return this._tools}get isEnabled(){return this._tools.length>128}get root(){return this._root}set tools(e){r_e(this._tools,e,(r,n)=>r.name===n.name)||(this._tools=[...e],this._didToolsChange=!0)}async compute(e,r){if(this._didToolsChange&&(await new wGe(e).addGroups(this._root,this._tools.slice(),r),this._didToolsChange=!1),this._expandOnNext){for(let o of this._expandOnNext)this._root.find(o)?.path.forEach(s=>{s.isExpanded=!0,s.lastUsedOnTurn=this._turnNo});this._expandOnNext=void 0}let n=128;for(this._trimOnNextCompute&&(n=96,this._trimOnNextCompute=!1),this._root.lastUsedOnTurn=1/0;this._root.tools().length>n;){let o=this._root.getLowestExpandedTool();if(!o||o===this._root)break;o.isExpanded=!1,o.metadata.preExpanded=!1}return this._trimOnNextCompute=!1,[...this._root.tools()]}ensureExpanded(e){this._expandOnNext??=new Set,this._expandOnNext.add(e)}didInvalidateCache(){this._trimOnNextCompute=!0}didTakeTurn(){this._turnNo++}didCall(e){let r=this._root.find(e);if(!r)return;let{path:n,tool:o}=r;for(let s of n)s.lastUsedOnTurn=this._turnNo;if(o instanceof ly)return o.isExpanded=!0,new _r([new fr(`Tools activated: ${[...o.tools()].map(s=>s.name).join(", ")}`)],"success")}};var Pk=class{constructor(){this._groups=new Map}static{a(this,"ToolGroupingService")}get groups(){return[...this._groups.values()]}getGroupKey(e){let r=e.turn.chatMode;return r===void 0||r===yc.Agent?"_global_":r.id}getGroup(e){let r=this.getGroupKey(e);return this._groups.get(r)}create(e,r){let n=this.getGroupKey(e),o=this._groups.get(n);return o?o.tools=r:(o=new RGe(r),this._groups.set(n,o)),o}didTakeTurn(e){this.getGroup(e)?.didTakeTurn()}didCall(e,r){return this.getGroup(e)?.didCall(r)}isEnabled(e){return this.getGroup(e)?.isEnabled??!1}compute(e,r){return this.getGroup(e)?.compute(e,r)}findTool(e,r){return this.getGroup(e)?.root.find(r)?.tool??null}};f();function xrn(t){let e=t*.05,r=Math.min(Math.max(e,1e3),3e3);return t-r}a(xrn,"calculateReducedMaxRequestTokens");var mAo=500,vm=new Se("toolCallingLoop"),gAo="internal.tool_calling_loop_continue_confirmation",cie=class t{constructor(e,r,n,o,s){this.turnContext=e;this.chatFetcher=r;this.modelConfiguration=n;this.baseTelemetryWithExp=o;this.subagentConfig=s;this.nextTrajectoryOrder=0;this.toolCallRounds=[];this.conversationProgress=e.ctx.get(xa),this.conversation=e.conversation,this.turn=e.turn,this.toolsService=e.ctx.get(Io),this.transcriptPersistence=new mh(e.ctx),this.llmRequestPersistence=Iee(()=>{if(!G9e(e.ctx))return;let d=e.subagentInfo;return new q9e(e.ctx,void 0,"ToolCallingLoop",e.conversation.id.toString(),e.turn.id.toString(),void 0,e.turn.parentTurnId?.toString(),d?.name)},void 0),this.hookTrigger=new Hne(e.ctx,e.conversation,e.turn.workspaceFolders||[]),this.metricsTracker=new nGe(e.ctx,this.conversation,this.turn,this.conversationProgress);let c=this.modelConfiguration.maxRequestTokens,l=xrn(c),u=c-l;vm.debug(this.turnContext.ctx,`Token reduction applied: original=${c}, reduced=${l}, reduction=${u} tokens`),this.modelConfiguration={...this.modelConfiguration,maxRequestTokens:l},this.requestId=yr(),this.baseTelemetryWithExp=this.baseTelemetryWithExp.extendedBy({requestId:this.requestId}),this.maxToolCallingLoop=s?.getMaxRounds?.()??Math.min(mAo,vr(e.ctx,tt.MaxToolCallingLoop)),this.requestLimitIncrement=this.maxToolCallingLoop,this.snapshotTextDocumentProvider=new yqe(new Eqe(e.ctx))}static{a(this,"ToolCallingLoop")}static{this.NextToolCallId=Date.now()}async run(e){this.abortIfCanceled(e);let r=0,n;if(this.turnContext.todoListSnapshot=this.turnContext.ctx.get(mp).getTodos(this.conversation),await this.llmRequestPersistence?.ensureInitialized(),this.cachedUseMessagesEndpoint=await zFe(this.turnContext.ctx,this.modelConfiguration),this.turnContext.subagentInfo){let o=this.turnContext.subagentInfo.isAutoModel?" (Auto)":"";await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** is working with **${this.turnContext.subagentInfo.model} language model**${o} -`}]})}for(;;)try{r++,this.abortIfCanceled(e),await this.validateIteration(r,n,e),this.turnContext.clearCopilotEditsSessionHeader();let o=performance.now(),s=await this.runOne(r,e),c=this.metricsTracker.extractRoundUsage(s.response);if(qHr(this.turnContext.ctx,this.turnContext,r,performance.now()-o,this.baseTelemetryWithExp,c,s.llmFetchTimeMs,s.timeSinceLastLLMCallMs,s.promptPrefixMetrics,s.routeForTelemetry),this.metricsTracker.logRoundDebugMetrics(r,this.turn.id,c,s.llmFetchTimeMs,s.timeSinceLastLLMCallMs,s.promptPrefixMetrics),this.metricsTracker.accumulateTokenUsage(r,c),n={...s},this.toolCallRounds.push(s.round),await this.checkCompressionAfterToolCall(e),!s.round.toolCalls.length||s.response.type!=="success"&&s.response.type!=="tool_calls"){this.turn.status==="in-progress"&&(this.turn.status="success"),this.turnContext.subagentInfo&&(r++,await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** completed +`}]})}for(;;)try{r++,this.abortIfCanceled(e),await this.validateIteration(r,n,e),this.turnContext.clearCopilotEditsSessionHeader();let o=performance.now(),s=await this.runOne(r,e),c=this.metricsTracker.extractRoundUsage(s.response);if(Qjr(this.turnContext.ctx,this.turnContext,r,performance.now()-o,this.baseTelemetryWithExp,c,s.llmFetchTimeMs,s.timeSinceLastLLMCallMs,s.promptPrefixMetrics,s.routeForTelemetry),this.metricsTracker.logRoundDebugMetrics(r,this.turn.id,c,s.llmFetchTimeMs,s.timeSinceLastLLMCallMs,s.promptPrefixMetrics),this.metricsTracker.accumulateTokenUsage(r,c),n={...s},this.toolCallRounds.push(s.round),await this.checkCompressionAfterToolCall(e),!s.round.toolCalls.length||s.response.type!=="success"&&s.response.type!=="tool_calls"){this.turn.status==="in-progress"&&(this.turn.status="success"),this.turnContext.subagentInfo&&(r++,await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** completed -`}]}));try{await this.metricsTracker.reportCumulativeTokenUsage(r)}catch{}return}}catch(o){try{await this.metricsTracker.reportCumulativeTokenUsage(r)}catch{}if(this.turnContext.subagentInfo){r++;let s="";o instanceof LO?s="maximum tool attempts reached":s=o instanceof Error?o.message:String(o),await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** stopped due to ${s} +`}]}));try{await this.metricsTracker.reportCumulativeTokenUsage(r)}catch{}return}}catch(o){try{await this.metricsTracker.reportCumulativeTokenUsage(r)}catch{}if(this.turnContext.subagentInfo){r++;let s="";o instanceof E4?s="maximum tool attempts reached":s=o instanceof Error?o.message:String(o),await this.conversationProgress.report(this.conversation,this.turn,{editAgentRounds:[{roundId:r,reply:`\u2726\uFE0E **${this.turnContext.subagentInfo.name}** stopped due to ${s} -`}]})}throw o}}async runOne(e,r){this.abortIfCanceled(r);let n=this.toolsService.getToolsForModel(this.turnContext.turn.chatMode),o=this.getAvailableLanguageModelTools(n),s;if(this.subagentConfig){let R=this.subagentConfig.filterTools?.(o);R!==void 0&&(o=R),s=this.subagentConfig.createPromptRenderer(this.turnContext,o,this.modelConfiguration,{oneBasedIterationNum:e,maxRounds:this.maxToolCallingLoop})}else{let R=this.createAgentPromptProps(o);s=y0.create(WGe,R,this.modelConfiguration)}let c=this.cachedUseMessagesEndpoint,l=U9e(this.modelConfiguration,c),u=(await s.renderPrompt(void 0,r,{collapseSystemMessages:!0,enableCacheBreakpoints:c})).messages;if(e===1&&!this.turn.renderedUserMessage)for(let R=u.length-1;R>=0;R--){let w=u[R];if(w.role==="user"&&w.content){this.turn.renderedUserMessage=w.content,this.recordRenderedUserMessageTranscript(w.content);break}}let d="",p=new SF((R,w,P,k,Q,M)=>{let D=R.trim(),G=D.match(aCe)!==null&&D.endsWith("-->");this.conversationProgress.report(this.conversation,this.turn,{annotations:w,references:P,hideText:G,notifications:k.map(O=>({severity:"warning",message:O.message})),thinking:M,editAgentRounds:[{roundId:e,reply:R}]}),this.turn.annotations.push(...w??[]),d+=R});this.abortIfCanceled(r);let h=await this.getAvailableChatTools(o,r);this.abortIfCanceled(r);let m=this.metricsTracker.computePromptPrefixMetrics(u,h),g={messages:u,modelConfiguration:this.modelConfiguration,uiKind:"agentPanel",chatModeKind:this.turnContext.turn.chatMode?.kind,tools:h,intentParams:{intent:!0},llmInteraction:this.turnContext.toLlmInteraction(),endpoint:l};this.checkChatPayload(g),Nm.debug(this.turnContext.ctx,`Send request for iteration ${e} for turn ${this.turn.id} with: ${JSON.stringify(g,null,2)}`);let A,y=this.metricsTracker.getTimeSinceLastLLMCall(),E=performance.now(),_=30,v={shouldRetry:a(R=>R.type==="failed"&&R.code===429&&R.retryAfter!==void 0&&R.retryAfter>=0&&R.retryAfter<=_,"shouldRetry"),onRetry:a(async R=>{let w=R.type==="failed"?R.retryAfter:void 0;w!==void 0&&(Nm.info(this.turnContext.ctx,`Rate limited in iteration ${e} for turn ${this.turn.id}, retrying in ${w}s`),await this.turnContext.warn("Service is busy. Retrying shortly \u2014 you can cancel anytime."))},"onRetry"),maxRetryAttempts:3},b=await this.chatFetcher.fetchResponse(g,r,this.baseTelemetryWithExp,(R,w)=>(w.phase&&(A=w.phase),p.isFinishedAfter(R,w)),this.llmRequestPersistence,v),I=performance.now()-E;return this.metricsTracker.recordLlmFetchComplete(),{...await this.processChatFetchResult(e,b,d,n,r,A),llmFetchTimeMs:I,timeSinceLastLLMCallMs:y,promptPrefixMetrics:m,routeForTelemetry:l}}async processChatFetchResult(e,r,n,o,s,c){switch(this.abortIfCanceled(s),Nm.debug(this.turnContext.ctx,`Processing fetch type: ${r.type} in iteration ${e} for turn ${this.turn.id}: ${JSON.stringify(r,null,2)}`),this.turnContext.ctx.get(Gk).didTakeTurn(this.turnContext),r.type){case"success":return r.toolCalls&&r.toolCalls.length>0?await this.handleToolCalls({type:"tool_calls",requestId:r.requestId,toolCalls:r.toolCalls,copilotEditsSessionHeader:r.copilotEditsSessionHeader,thinking:r.thinking,usage:r.usage},n,o,e,s,c):(this.turn.status="success",this.addToolCallModelResponseToTurn(n,[],r.thinking,c),this.recordAssistantRoundTranscript(n,e,r.thinking),{response:r,round:{response:r.value,toolInputRetry:0,toolCalls:[],phase:c}});case"offTopic":throw this.turn.status="off-topic",new Rm({message:"Sorry, but I can only assist with programming related questions.",responseIsFiltered:!0});case"canceled":throw new Sc;case"failed":throw this.turn.status="error",Nm.error(this.turnContext.ctx,"Fetch failed:",r),new Rm({message:Yne.translateErrorMessage(r.code,r.reason,r.requestId,r.retryAfter,r.ghRequestId),code:r.code,retryAfter:r.retryAfter});case"filtered":throw this.turn.status="filtered",new Rm({message:"Oops, your response got filtered.",responseIsFiltered:!0});case"length":throw this.turn.status="error",new Rm({message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0});case"agentAuthRequired":throw this.turn.status="error",new Rm({message:"Authorization required",responseIsFiltered:!1});case"no_choices":throw this.turn.status="error",new Rm({message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"no_finish_reason":throw this.turn.status="error",new Rm({message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"model_not_supported":{this.turn.status="error";let{modelName:l,modelProviderName:u}=$o.parseModelNotSupportedReason(r.reason);throw new Rm({message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1,modelName:l,modelProviderName:u})}case"model_max_prompt_tokens_exceeded":throw this.turn.status="error",new Rm({message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",responseIsFiltered:!1});case"tool_calls":return await this.handleToolCalls(r,n,o,e,s,c);default:throw this.turn.status="error",new Rm({message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1})}}async handleToolCalls(e,r,n,o,s,c){if(e.type!=="tool_calls")throw new Error(`Expected tool_calls type but got ${e.type}`);if(!e.toolCalls)throw new Error("Tool calls are required but were not provided");this.turnContext.setCopilotEditsSessionHeader(e.copilotEditsSessionHeader);let l=e.toolCalls.map(u=>{if(!u.id){let d=`cls_${t.NextToolCallId++}`;u.id=d}return u});this.addToolCallModelResponseToTurn(r,l,e.thinking,c),this.recordAssistantRoundTranscript(r,o,e.thinking),this.recordTrajectorySteps(e);for(let u of l)await this.handleSingleToolCall(u,n,o,s,e.usage);return{response:e,round:{response:r,toolInputRetry:0,toolCalls:l.map(u=>({id:u.id,name:u.function.name,arguments:JSON.stringify(u.function.arguments)})),phase:c}}}async handleSingleToolCall(e,r,n,o,s){if(!e.id)throw new Error(`Tool call id is required but was not provided for function ${e.function.name}`);let c=this.findToolByName(r,e.function.name);if(c instanceof yy)this.handleVirtualToolCall(c,e,n);else if(c instanceof Vj)await this.handleLanguageModelToolCall(c,e,n,o,s);else{let l=`Tool with name ${e.function.name} not found in registered tools`;Nm.error(this.turnContext.ctx,l);let u=new Cr([new fr(l)],"error");this.addToolCallResultToTurn(u,e.id);let d=mGe(u);await this.turnContext.agentToolCalls.error(n,e.id,d.message)}}handleVirtualToolCall(e,r,n){if(!r.id)throw new Error(`Tool call id is required but was not provided for function ${r.function.name}`);let o=performance.now(),s=this.turnContext.ctx.get(Gk).didCall(this.turnContext,e.name),c,l;s?(l=s,c=s.status):(c="error",l=new Cr([new fr(`Failed to activate virtual tool group ${e.name}`)],"error")),this.addToolCallResultToTurn(l,r.id);let u=performance.now()-o;RRt(this.turnContext.ctx,this.turnContext,{name:e.name,type:"virtual",toolProvider:{id:e.metadata.toolsetKey||"virtual"}},r.id,n,u,c,this.baseTelemetryWithExp)}async handleLanguageModelToolCall(e,r,n,o,s){let c=performance.now(),l="success";try{let u=cO(r);this.turnContext.agentToolCalls.init(n,r.id,e.name,e.type,u,this.formatInputForDisplay(u));let d=this.toolsService.prepareInvocation(e.id,{input:u,annotation:e.annotations,uriSchemeCache:this.turnContext.uriSchemeCache},o),{needConfirm:p}=await this.prepareToolConfirmation(e,u);await this.requestToolInvocationApproval(d,p,e,u,n,r.id,o),this.abortIfCanceled(o);let h=await this.hookTrigger.firePreToolUseHook(e,u,o,{turn:this.turn,conversationProgress:this.conversationProgress});if(h.denied){Nm.info(this.turnContext.ctx,`Tool execution denied by hook: ${h.reason||"No reason provided"}`),l="cancelled";let A=new Cr([new fr(h.reason||"Tool execution denied by hook")],"cancelled");this.addToolCallResultToTurn(A,r.id),await this.turnContext.agentToolCalls.cancel(n,r.id);return}let m=d.progressMessage||`Running ${e.displayName} tool`;await this.turnContext.agentToolCalls.running(n,r.id,m),this.recordToolExecutionStartTranscript(r.id,e.name,u);let g=await this.toolsService.invokeTool(this.turnContext,e.id,{toolInvocationToken:r.id,input:u,roundId:n,toolCallId:r.id},o);if(this.abortIfCanceled(o),await this.updateCompletionMessage(e,r,n,o),g.status==="success"){let A=wZr(g);await this.turnContext.agentToolCalls.result(n,r.id,A)}else if(g.status==="error"){let A=mGe(g);await this.turnContext.agentToolCalls.error(n,r.id,A.message)}else await this.turnContext.agentToolCalls.cancel(n,r.id);await this.hookTrigger.firePostToolUseHook(e,u,g,o,{turn:this.turn,conversationProgress:this.conversationProgress}),this.addToolCallResultToTurn(g,r.id),this.recordSubagentTrajectoryLink(e,g,r.id),this.recordToolInOut(r,u,g,c)}catch(u){if(await this.updateCompletionMessage(e,r,n,o),u instanceof VF||u instanceof Sc)this.turn.status="cancelled",l="cancelled",this.addToolCallResultToTurn(new Cr([new fr("The user chose to skip the tool call, they want to proceed without running it")],"cancelled"),r.id),await this.turnContext.agentToolCalls.cancel(n,r.id);else{Nm.error(this.turnContext.ctx,`Error while invoking tool ${r.id}: ${zl(u)}`,u),l="error";let d=new Cr([new fr(zl(u).substring(0,300))],"error");this.addToolCallResultToTurn(d,r.id);let p=mGe(d);await this.turnContext.agentToolCalls.error(n,r.id,p.message)}}finally{let u=performance.now()-c;this.recordToolExecutionCompleteTranscript(r.id,l==="success",l),RRt(this.turnContext.ctx,this.turnContext,e,r.id,n,u,l,this.baseTelemetryWithExp)}}async updateCompletionMessage(e,r,n,o){let s=`Ran ${e.displayName} tool`;try{let c=cO(r);s=this.toolsService.prepareCompletion(e.id,{input:c,annotation:e.annotations,uriSchemeCache:this.turnContext.uriSchemeCache},o).completionMessage||s}catch(c){Nm.debug(this.turnContext.ctx,`Failed to prepare completion message for tool ${e.id}: ${zl(c)}, using default message`)}await this.turnContext.agentToolCalls.updateProgressMessage(n,r.id,s)}async getAvailableChatTools(e,r){let n=(await Promise.all(e.map(async c=>this.shouldIncludeTool(c)&&await c.isEnabled(this.turnContext)?c:null))).filter(c=>c!==null),o=this.turnContext.ctx.get(Gk);if(o.create(this.turnContext,n),!o.isEnabled(this.turnContext))return n.map(c=>({type:"function",function:{name:c.nameForModel,description:this.getToolDescription(c),parameters:c.inputSchema}}));let s=n;try{s=await o.compute(this.turnContext,r)||[]}catch(c){return Nm.error(this.turnContext.ctx,`Error while computing tool grouping: ${zl(c)}`),this.abortIfCanceled(r),[]}return s.map(c=>c instanceof yy?{type:"function",function:{name:c.name,description:c.description}}:{type:"function",function:{name:c.nameForModel,description:this.getToolDescription(c),parameters:c.inputSchema}})}getAvailableLanguageModelTools(e){return e.filter(r=>this.shouldIncludeTool(r))}shouldIncludeTool(e){return e.name==="replace_string_in_file"?HZr(this.modelConfiguration):e.name==="apply_patch"?$Zr(this.modelConfiguration):!0}getToolDescription(e){return e.name==="manage_todo_list"?Ok.getToolDescription(this.modelConfiguration.modelFamily):e.description}createAgentPromptProps(e){return{turnContext:this.turnContext,userRawMessage:this.turnContext.turn.request.message,workspaceFolders:this.turnContext.turn.workspaceFolders,snapshotTextDocumentProvider:this.snapshotTextDocumentProvider,tools:e,modelConfiguration:this.modelConfiguration,codesearchMode:this.turnContext.turn.chatMode?.kind==="Ask"}}addToolCallModelResponseToTurn(e,r,n,o){let s={role:"assistant",content:e,tool_calls:r.length?r:void 0,thinking:n,phase:o,modelId:this.modelConfiguration.modelId};this.turn.response?this.turn.response.message=Xj(this.turn.response.message,s):this.turn.response={message:[s],type:"model"}}addToolCallResultToTurn(e,r){let n="";switch(e.status){case"error":n="Tool call failed with error: ";break;case"cancelled":n="Tool call is cancelled with result: ";break;default:case"success":n=""}let o=n+Nk(e.content),s={role:"tool",content:o,tool_call_id:r};if(!this.turn.response)this.turn.response={message:[s],type:"model"};else{if(Jj(this.turn.response.message)&&this.turn.response.message.find(l=>l.role==="tool"&&l.tool_call_id===r)){Nm.info(this.turnContext.ctx,`Tool call result for ${r} already exists in the turn response. Ignoring the new one.`);return}this.turn.response.message=Xj(this.turn.response.message,s)}}findToolByName(e,r){return this.turnContext.ctx.get(Gk).findTool(this.turnContext,r)??e.find(n=>n.nameForModel===r)}async prepareToolConfirmation(e,r){return this.turnContext.ctx.get(j$).checkApproval(this.turnContext,e,r)}async buildTerminalCommandData(e,r){if(!e.id.includes("run_in_terminal"))return;let n=r.command,o=this.turnContext.ctx.get(uw),c=Rie(e.description)||"sh",{subCommands:l,commandNames:u}=await o.parseTerminalCommand(n,c);return{subCommands:l,commandNames:u}}buildSensitiveFileData(e,r){if(!Lk.isPotentiallySensitiveTool(e))return;let n=Lk.getMatchingRuleForToolCall(e,r,this.turnContext),o=Lk.extractFilePathForMetadata(e,r);if(o)return{filePath:o.filePath,matchingRule:n?.rule.pattern,ruleDescription:n?.rule.description,isGlobal:n?n.isOutsideWorkspace:void 0}}abortIfCanceled(e){if(e.isCancellationRequested)throw this.turn.status="cancelled",new Sc}async requestToolInvocationApproval(e,r,n,o,s,c,l){if(!r){Nm.debug(this.turnContext.ctx,`Tool call confirmation not required for ${n.id}`);return}let u=Lk.generateSensitiveConfirmationMessage(n,o,this.turnContext);u&&(e.confirmationMessages={title:u.title,message:u.message});let d=e.confirmationMessages??{title:`Run ${n.id}`,message:`Do you want to allow "${n.id}" to run?`},p=await this.buildTerminalCommandData(n,o),h=this.buildSensitiveFileData(n,o),m=p||h?{terminalCommandData:p,sensitiveFileData:h}:void 0,g=await this.toolsService.invokeToolConfirmation(this.turnContext,n.id,{title:d.title,message:d.message,input:o,roundId:s,toolCallId:c,annotations:n.annotations,toolMetadata:m},l);switch(g.result){case"dismiss":throw this.turn.status="cancelled",new VF("Cancelled by user");case"accept":return Promise.resolve();default:throw new VF(`Invalid confirmation result ${g.result}`)}}async validateIteration(e,r,n){if(!(!r||e<=this.maxToolCallingLoop)){if(Nm.debug(this.turnContext.ctx,`Tool calling loop exceeds configured max iterations ${this.maxToolCallingLoop} for turn ${this.turn.id}`),this.turn.isSubagent()&&await this.requestAdditionalToolIterations(e,n)){let s=this.maxToolCallingLoop;this.maxToolCallingLoop=this.maxToolCallingLoop+this.requestLimitIncrement,Nm.debug(this.turnContext.ctx,`Tool calling loop limit increased from ${s} to ${this.maxToolCallingLoop} for turn ${this.turn.id}`);return}throw new LO}}async requestAdditionalToolIterations(e,r){this.abortIfCanceled(r);let n;try{n=this.turnContext.ctx.get(ku)}catch(s){return Nm.error(this.turnContext.ctx,`Tool confirmation invoker unavailable: ${zl(s)}, stopping tool calling loop.`),!1}let o=`cls_${t.NextToolCallId++}`;try{let s=await n.invokeClientToolConfirmation(this.turnContext,{name:mmo,title:"Continue to iterate?",message:"Copilot has been working on this problem for a while. Do you want it to continue to iterate? You can also set the maximum request limit in settings.",input:void 0,conversationId:this.conversation.id,turnId:this.turn.id,roundId:e,toolCallId:o});return this.abortIfCanceled(r),s.result==="accept"}catch(s){return Nm.error(this.turnContext.ctx,`Failed to request continuation confirmation: ${zl(s)}`),!1}}checkChatPayload(e){if(e.messages.length===0)throw new Rm({message:"No messages provided",responseIsFiltered:!1});if(e.tools&&e.tools.length>128)throw new Rm({message:`You may not include more than ${128} tools in your request.`,responseIsFiltered:!1})}formatInputForDisplay(e){try{return JSON.stringify(e,null,2)}catch{return}}async checkCompressionAfterToolCall(e){try{await this.turnContext.ctx.get(yC).checkAndCompress(this.conversation,this.modelConfiguration,"post-tool-call",e)}catch(r){Nm.error(this.turnContext.ctx,`Post-tool-call compression check failed: ${zl(r)}`)}}recordAssistantRoundTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o={text:e,iterationNumber:r};n&&(o.thinking={id:n.id,text:Array.isArray(n.text)?n.text.join(""):n.text});let s=aZr(e,String(this.turn.id),null,o);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,s).catch(c=>{Ge.error(this.turnContext.ctx,`Failed to record assistant round transcript: ${c instanceof Error?c.message:String(c)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create assistant round transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordRenderedUserMessageTranscript(e){if(this.transcriptPersistence.isEnabled())try{let r=sZr(String(this.turn.id),e);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r).catch(n=>{Ge.error(this.turnContext.ctx,`Failed to record rendered user message transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.turnContext.ctx,`Failed to create rendered user message transcript event: ${r instanceof Error?r.message:String(r)}`)}}recordToolExecutionStartTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o=cZr(e,r,n);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,o).catch(s=>{Ge.error(this.turnContext.ctx,`Failed to record tool execution start transcript: ${s instanceof Error?s.message:String(s)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create tool execution start transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordToolExecutionCompleteTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o=this.turnContext.agentToolCalls.getToolCallById(e),s=o?{result:o.result,error:o.error,resultDetails:o.resultDetails,toolSpecificData:o.toolSpecificData,progressMessage:o.progressMessage}:void 0,c=lZr(e,r,s,null,{status:n.toString()});this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,c).catch(l=>{Ge.error(this.turnContext.ctx,`Failed to record tool execution complete transcript: ${l instanceof Error?l.message:String(l)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create tool execution complete transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordTrajectorySteps(e){if(!this.llmRequestPersistence?.isEnabled()||e.type!=="tool_calls"||!e.toolCalls)return;let r=this.turnContext.subagentInfo,n=e.toolCalls.map(o=>({tool:o.function.name,tool_call_id:o.id}));Ore(()=>this.llmRequestPersistence?.appendTrajectoryStep({tool_calls:n,input_tokens:e.usage?.prompt_tokens,output_tokens:e.usage?.completion_tokens,cached_input_tokens:e.usage?.prompt_tokens_details?.cached_tokens,loop_type:r?"subagent":"parent",subagent_name:r?.name,loop_order:this.nextTrajectoryOrder++,conversationId:this.conversation.id.toString(),turnId:this.turn.id.toString()}),o=>Ge.debug(this.turnContext.ctx,"Failed to record trajectory step",o))}recordSubagentTrajectoryLink(e,r,n){if(e.name!=="run_subagent"||!this.llmRequestPersistence?.isEnabled()||!n)return;let o=r.subagentConversationId,s=r.subagentTurnId;!o||!s||Ore(()=>this.llmRequestPersistence?.appendSubagentLink({type:"subagent_link",tool_call_id:n,subagent_conversationId:o,subagent_turnId:s,conversationId:this.conversation.id.toString(),turnId:this.turn.id.toString()}),c=>Ge.debug(this.turnContext.ctx,"Failed to record subagent link",c))}recordToolInOut(e,r,n,o){if(!this.llmRequestPersistence?.isEnabled()||!e.id)return;let s=Nk(n.content),c=Math.round(performance.now()-o);Ore(()=>this.llmRequestPersistence?.appendToolInOut({tool_call_id:e.id,tool:e.function.name,input:r,output:s,status:n.status,timestamp:new Date().toISOString(),duration_ms:c}),l=>Ge.debug(this.turnContext.ctx,"Failed to record tool-in-out entry",l))}};var rOt=class{static{a(this,"DummyProgressHandler")}async begin(){}async report(){}async end(){}async cancel(){}},nOt=class{constructor(e,r){this.handler=e;this.parentTurnId=r}static{a(this,"SubagentProgressHandler")}async begin(e,r,n,o){await this.handler.begin(e,r,n,{...o,parentTurnId:this.parentTurnId})}async report(e,r,n,o){await this.handler.report(e,r,n,{...o,parentTurnId:this.parentTurnId})}async end(e,r,n,o){await this.handler.end(e,r,n,o)}async cancel(e,r,n,o){await this.handler.cancel(e,r,n,o)}};function N2t(t){let e=t.match(/^(.+?)\s*\(([^)]+)\)$/);return e?{modelName:e[1].trim(),provider:e[2].trim()}:{modelName:t.trim(),provider:""}}a(N2t,"parseModelString");var vHe=class{static{a(this,"CustomAgentExecutor")}constructor(e,r){this.config=e,this.subagentConfig=r}async invoke(e,r,n,o){let s=r.task,c=new Dd({message:s,type:"user"}),l=this.config.model||e.turn.userRequestedModel;c.userRequestedModel=l,c.needToolCallConfirmation=r.needToolCallConfirmation,c.workspaceFolder=e.turn.workspaceFolder,c.workspaceFolders=e.turn.workspaceFolders,c.parentTurnId=e.turn.id,c.chatMode=new PEe(this.config);let u=e.toLlmInteraction();c.parentLlmInteraction=u;let d=new Nj([c],e.conversation.source,e.conversation.userLanguage),p=new YT(e.ctx,d,c,o||e.cancelationToken),h,m=!1;if(this.config.model){let b=N2t(this.config.model),I=b.modelName.toLowerCase(),x=b.provider.toLowerCase()||"copilot";if(x==="copilot"){let P=(await p.ctx.get(cl).getMetadata()).find(k=>k.name.toLowerCase()===I);if(P){let k;P.is_chat_fallback?k=P.id:k=P.capabilities.family,h=await $o.getModelConfiguration(e.ctx,"edits",k)}else if(I===U7e.toLowerCase())m=!0,h=await $o.getModelConfiguration(e.ctx,"edits",pO,void 0,d.id.toString(),aF(d.turns));else throw new Error(`Model "${b.modelName}" not found in available models`)}else{let P=(await new tc(p.ctx.get(Si)).getAllModels(p.ctx)).find(k=>k.provider.toLowerCase()===x&&k.capabilities?.name.toLowerCase()===I);if(P)h=await nk(p.ctx,P.provider,P.name);else throw new Error(`BYOK model "${b.modelName}" with provider "${b.provider}" not found`)}}else h=e.turn.resolvedModelConfiguration;p.setResolvedModelConfiguration(h),p.subagentInfo={name:this.config.name,model:m?h.uiName:l,isAutoModel:m};let g=new ya(e.ctx),A=await rc(e.ctx,p,{languageId:""}),y=n||new rOt,E=new nOt(y,e.turn.id);await e.ctx.get(Na).begin(d,c,E),await new zie(p,g,h,A,this.subagentConfig).run(o||e.cancelationToken);let v=c.response?dn(c.response.message):"";return this.subagentConfig.postProcess&&(v=await this.subagentConfig.postProcess(p,v)),{response:v,conversationId:d.id.toString(),turnId:c.id.toString()}}};f();f();var J$=de(po());var bHe=class extends Zt{static{a(this,"RunSubagentPrompt")}renderCopilot(){let{turnContext:e,currentTurn:r,modelConfiguration:n,agentName:o,agentInstruction:s}=this.props,c=cF(r.response?.message,!0),l=bF(c,{ctx:e.ctx,identifier:`Subagent "${o}" Turn ID: ${r.id}`,enableWarnings:!0}),u=(0,J$.useKeepWith)(),d=dn(r.request.message);return vscpp(vscppf,null,vscpp(J$.SystemMessage,{priority:1e3},vscpp(Oie,null),vscpp("br",null),vscpp("br",null),'You are "',o,'", a specialized agent. Follow your instructions carefully and complete the assigned task.',s&&vscpp(vscppf,null,vscpp("br",null),vscpp("br",null),s),vscpp("br",null),vscpp("br",null),"When you complete your task, provide a clear, concise summary of what you accomplished. Do not include unnecessary preamble."),vscpp(J$.UserMessage,{priority:950},vscpp(Rn,{name:"environment_info"},vscpp(kie,{ctx:e.ctx})),vscpp(Rn,{name:"workspace_info"},vscpp(Nie,{ctx:e.ctx,workspaceFolders:r.workspaceFolders}))),vscpp(J$.UserMessage,{priority:900},vscpp(vscppf,null,d)),l.length>0&&vscpp(u,{priority:899,flexGrow:2},vscpp(mk,{assistantRounds:l,ctx:e.ctx,truncateAt:Math.floor(n.maxRequestTokens/2),modelConfiguration:n,isHistorical:!1,identifier:`Subagent-${o}-${r.id}`})))}};var iOt=class{constructor(e){this.agentConfig=e}static{a(this,"DefaultSubagentConfig")}createPromptRenderer(e,r,n,o){let s={turnContext:e,currentTurn:e.turn,modelConfiguration:n,agentName:this.agentConfig.name,agentInstruction:this.agentConfig.instruction};return y0.create(bHe,s,n)}};function Rtn(t){return new iOt(t)}a(Rtn,"resolveSubagentConfig");var Yie=class extends pl{constructor(){super({name:"run_subagent",displayName:"Run Sub Agent",description:"Invoke a specialized custom agent to handle specific tasks autonomously. The agent will receive a task description and execute it using its configured tools and model. Use this when you need to delegate work to a specialized agent with specific capabilities.",displayDescription:"Delegate work to a specialized custom agent.",inputSchema:S.Object({task:S.String({description:"A detailed description of the task for the agent to perform. Should be clear and specific about what the agent should accomplish."}),agentName:S.String({description:"The name of the custom agent to invoke. Must be one of the exact agent names from the available agents list. Do not make up agent names."})})});this.registry=new Die}static{a(this,"RunSubagentTool")}async invoke(r,n,o){let{task:s,agentName:c}=n.input,l=await rc(r.ctx,r);try{let u=await this.registry.getAgent(r,c);if(u?.isBuiltIn?l.properties.mode=u.name:l.properties.mode="custom",!u)return l.properties.message="Custom agent not found",Kp(r.ctx,"runSubagentTool.error",l),Kn(r.ctx,"runSubagentTool.error",l),new Cr([new fr(`Custom agent '${c}' not found`)],"error");if(!u.invokePolicy.includes("model"))return l.properties.message="Agent model invocation disabled",Kp(r.ctx,"runSubagentTool.error",l),Kn(r.ctx,"runSubagentTool.error",l),new Cr([new fr(`Agent '${c}' is not available for model invocation`)],"error");let d=Rtn(u),p=new vHe(u,d),h={task:s,needToolCallConfirmation:r.turn.needToolCallConfirmation},g=r.ctx.get(Na).getCurrentHandler(r.conversation),A=await p.invoke(r,h,g,o);at(r.ctx,"runSubagentTool.success",l),Kn(r.ctx,"runSubagentTool.success",l);let y=`This is what has been accomplished by Custom Agent "${c}": +`}]})}throw o}}async runOne(e,r){this.abortIfCanceled(r);let n=this.toolsService.getToolsForModel(this.turnContext.turn.chatMode),o=this.getAvailableLanguageModelTools(n),s;if(this.subagentConfig){let w=this.subagentConfig.filterTools?.(o);w!==void 0&&(o=w),s=this.subagentConfig.createPromptRenderer(this.turnContext,o,this.modelConfiguration,{oneBasedIterationNum:e,maxRounds:this.maxToolCallingLoop})}else{let w=this.createAgentPromptProps(o);s=p0.create(tGe,w,this.modelConfiguration)}let c=this.cachedUseMessagesEndpoint,l=WFe(this.modelConfiguration,c),u=(await s.renderPrompt(void 0,r,{collapseSystemMessages:!0,enableCacheBreakpoints:c})).messages;if(e===1&&!this.turn.renderedUserMessage)for(let w=u.length-1;w>=0;w--){let R=u[w];if(R.role==="user"&&R.content){this.turn.renderedUserMessage=R.content,this.recordRenderedUserMessageTranscript(R.content);break}}let d="",p=new X6((w,R,P,k,Q,M)=>{let N=w.trim(),G=N.match(oEe)!==null&&N.endsWith("-->");this.conversationProgress.report(this.conversation,this.turn,{annotations:R,references:P,hideText:G,notifications:k.map(O=>({severity:"warning",message:O.message})),thinking:M,editAgentRounds:[{roundId:e,reply:w}]}),this.turn.annotations.push(...R??[]),d+=w});this.abortIfCanceled(r);let h=await this.getAvailableChatTools(o,r);this.abortIfCanceled(r);let m=this.metricsTracker.computePromptPrefixMetrics(u,h),g={messages:u,modelConfiguration:this.modelConfiguration,uiKind:"agentPanel",chatModeKind:this.turnContext.turn.chatMode?.kind,tools:h,intentParams:{intent:!0},llmInteraction:this.turnContext.toLlmInteraction(),endpoint:l};this.checkChatPayload(g),vm.debug(this.turnContext.ctx,`Send request for iteration ${e} for turn ${this.turn.id} with: ${JSON.stringify(g,null,2)}`);let A,y=this.metricsTracker.getTimeSinceLastLLMCall(),E=performance.now(),_=30,v={shouldRetry:a(w=>w.type==="failed"&&w.code===429&&w.retryAfter!==void 0&&w.retryAfter>=0&&w.retryAfter<=_,"shouldRetry"),onRetry:a(async w=>{let R=w.type==="failed"?w.retryAfter:void 0;R!==void 0&&(vm.info(this.turnContext.ctx,`Rate limited in iteration ${e} for turn ${this.turn.id}, retrying in ${R}s`),await this.turnContext.warn("Service is busy. Retrying shortly \u2014 you can cancel anytime."))},"onRetry"),maxRetryAttempts:3},b=await this.chatFetcher.fetchResponse(g,r,this.baseTelemetryWithExp,(w,R)=>(R.phase&&(A=R.phase),p.isFinishedAfter(w,R)),this.llmRequestPersistence,v),I=performance.now()-E;return this.metricsTracker.recordLlmFetchComplete(),{...await this.processChatFetchResult(e,b,d,n,r,A),llmFetchTimeMs:I,timeSinceLastLLMCallMs:y,promptPrefixMetrics:m,routeForTelemetry:l}}async processChatFetchResult(e,r,n,o,s,c){switch(this.abortIfCanceled(s),vm.debug(this.turnContext.ctx,`Processing fetch type: ${r.type} in iteration ${e} for turn ${this.turn.id}: ${JSON.stringify(r,null,2)}`),this.turnContext.ctx.get(Pk).didTakeTurn(this.turnContext),r.type){case"success":return r.toolCalls&&r.toolCalls.length>0?await this.handleToolCalls({type:"tool_calls",requestId:r.requestId,toolCalls:r.toolCalls,copilotEditsSessionHeader:r.copilotEditsSessionHeader,thinking:r.thinking,usage:r.usage},n,o,e,s,c):(this.turn.status="success",this.addToolCallModelResponseToTurn(n,[],r.thinking,c),this.recordAssistantRoundTranscript(n,e,r.thinking),{response:r,round:{response:r.value,toolInputRetry:0,toolCalls:[],phase:c}});case"offTopic":throw this.turn.status="off-topic",new Em({message:"Sorry, but I can only assist with programming related questions.",responseIsFiltered:!0});case"canceled":throw new Ec;case"failed":throw this.turn.status="error",vm.error(this.turnContext.ctx,"Fetch failed:",r),new Em({message:cne.translateErrorMessage(r.code,r.reason,r.requestId,r.retryAfter,r.ghRequestId),code:r.code,retryAfter:r.retryAfter});case"filtered":throw this.turn.status="filtered",new Em({message:"Oops, your response got filtered.",responseIsFiltered:!0});case"length":throw this.turn.status="error",new Em({message:"Oops, the response got too long. Try to reformulate your question.",responseIsIncomplete:!0});case"agentAuthRequired":throw this.turn.status="error",new Em({message:"Authorization required",responseIsFiltered:!1});case"no_choices":throw this.turn.status="error",new Em({message:"Oops, no choices received from the server. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"no_finish_reason":throw this.turn.status="error",new Em({message:"Oops, unexpected end of stream. Please try again.",responseIsFiltered:!1,responseIsIncomplete:!0});case"model_not_supported":{this.turn.status="error";let{modelName:l,modelProviderName:u}=qo.parseModelNotSupportedReason(r.reason);throw new Em({message:"Oops, the model is not supported. Please try again.",code:400,reason:"model_not_supported",responseIsFiltered:!1,modelName:l,modelProviderName:u})}case"model_max_prompt_tokens_exceeded":throw this.turn.status="error",new Em({message:"Oops, the token limit exceeded. Try to shorten your prompt or start a new conversation.",responseIsFiltered:!1});case"tool_calls":return await this.handleToolCalls(r,n,o,e,s,c);default:throw this.turn.status="error",new Em({message:"Unknown server side error occurred. Please try again.",responseIsFiltered:!1})}}async handleToolCalls(e,r,n,o,s,c){if(e.type!=="tool_calls")throw new Error(`Expected tool_calls type but got ${e.type}`);if(!e.toolCalls)throw new Error("Tool calls are required but were not provided");this.turnContext.setCopilotEditsSessionHeader(e.copilotEditsSessionHeader);let l=e.toolCalls.map(u=>{if(!u.id){let d=`cls_${t.NextToolCallId++}`;u.id=d}return u});this.addToolCallModelResponseToTurn(r,l,e.thinking,c),this.recordAssistantRoundTranscript(r,o,e.thinking),this.recordTrajectorySteps(e);for(let u of l)await this.handleSingleToolCall(u,n,o,s,e.usage);return{response:e,round:{response:r,toolInputRetry:0,toolCalls:l.map(u=>({id:u.id,name:u.function.name,arguments:JSON.stringify(u.function.arguments)})),phase:c}}}async handleSingleToolCall(e,r,n,o,s){if(!e.id)throw new Error(`Tool call id is required but was not provided for function ${e.function.name}`);let c=this.findToolByName(r,e.function.name);if(c instanceof ly)this.handleVirtualToolCall(c,e,n);else if(c instanceof ZH)await this.handleLanguageModelToolCall(c,e,n,o,s);else{let l=`Tool with name ${e.function.name} not found in registered tools`;vm.error(this.turnContext.ctx,l);let u=new _r([new fr(l)],"error");this.addToolCallResultToTurn(u,e.id);let d=bqe(u);await this.turnContext.agentToolCalls.error(n,e.id,d.message)}}handleVirtualToolCall(e,r,n){if(!r.id)throw new Error(`Tool call id is required but was not provided for function ${r.function.name}`);let o=performance.now(),s=this.turnContext.ctx.get(Pk).didCall(this.turnContext,e.name),c,l;s?(l=s,c=s.status):(c="error",l=new _r([new fr(`Failed to activate virtual tool group ${e.name}`)],"error")),this.addToolCallResultToTurn(l,r.id);let u=performance.now()-o;YRt(this.turnContext.ctx,this.turnContext,{name:e.name,type:"virtual",toolProvider:{id:e.metadata.toolsetKey||"virtual"}},r.id,n,u,c,this.baseTelemetryWithExp)}async handleLanguageModelToolCall(e,r,n,o,s){let c=performance.now(),l="success";try{let u=jM(r);this.turnContext.agentToolCalls.init(n,r.id,e.name,e.type,u,this.formatInputForDisplay(u));let d=this.toolsService.prepareInvocation(e.id,{input:u,annotation:e.annotations,uriSchemeCache:this.turnContext.uriSchemeCache},o),{needConfirm:p}=await this.prepareToolConfirmation(e,u);await this.requestToolInvocationApproval(d,p,e,u,n,r.id,o),this.abortIfCanceled(o);let h=await this.hookTrigger.firePreToolUseHook(e,u,o,{turn:this.turn,conversationProgress:this.conversationProgress});if(h.denied){vm.info(this.turnContext.ctx,`Tool execution denied by hook: ${h.reason||"No reason provided"}`),l="cancelled";let A=new _r([new fr(h.reason||"Tool execution denied by hook")],"cancelled");this.addToolCallResultToTurn(A,r.id),await this.turnContext.agentToolCalls.cancel(n,r.id);return}let m=d.progressMessage||`Running ${e.displayName} tool`;await this.turnContext.agentToolCalls.running(n,r.id,m),this.recordToolExecutionStartTranscript(r.id,e.name,u);let g=await this.toolsService.invokeTool(this.turnContext,e.id,{toolInvocationToken:r.id,input:u,roundId:n,toolCallId:r.id},o);if(this.abortIfCanceled(o),await this.updateCompletionMessage(e,r,n,o),g.status==="success"){let A=xen(g);await this.turnContext.agentToolCalls.result(n,r.id,A)}else if(g.status==="error"){let A=bqe(g);await this.turnContext.agentToolCalls.error(n,r.id,A.message)}else await this.turnContext.agentToolCalls.cancel(n,r.id);await this.hookTrigger.firePostToolUseHook(e,u,g,o,{turn:this.turn,conversationProgress:this.conversationProgress}),this.addToolCallResultToTurn(g,r.id),this.recordSubagentTrajectoryLink(e,g,r.id),this.recordToolInOut(r,u,g,c)}catch(u){if(await this.updateCompletionMessage(e,r,n,o),u instanceof EF||u instanceof Ec)this.turn.status="cancelled",l="cancelled",this.addToolCallResultToTurn(new _r([new fr("The user chose to skip the tool call, they want to proceed without running it")],"cancelled"),r.id),await this.turnContext.agentToolCalls.cancel(n,r.id);else{vm.error(this.turnContext.ctx,`Error while invoking tool ${r.id}: ${Ql(u)}`,u),l="error";let d=new _r([new fr(Ql(u).substring(0,300))],"error");this.addToolCallResultToTurn(d,r.id);let p=bqe(d);await this.turnContext.agentToolCalls.error(n,r.id,p.message)}}finally{let u=performance.now()-c;this.recordToolExecutionCompleteTranscript(r.id,l==="success",l),YRt(this.turnContext.ctx,this.turnContext,e,r.id,n,u,l,this.baseTelemetryWithExp)}}async updateCompletionMessage(e,r,n,o){let s=`Ran ${e.displayName} tool`;try{let c=jM(r);s=this.toolsService.prepareCompletion(e.id,{input:c,annotation:e.annotations,uriSchemeCache:this.turnContext.uriSchemeCache},o).completionMessage||s}catch(c){vm.debug(this.turnContext.ctx,`Failed to prepare completion message for tool ${e.id}: ${Ql(c)}, using default message`)}await this.turnContext.agentToolCalls.updateProgressMessage(n,r.id,s)}async getAvailableChatTools(e,r){let n=(await Promise.all(e.map(async c=>this.shouldIncludeTool(c)&&await c.isEnabled(this.turnContext)?c:null))).filter(c=>c!==null),o=this.turnContext.ctx.get(Pk);if(o.create(this.turnContext,n),!o.isEnabled(this.turnContext))return n.map(c=>({type:"function",function:{name:c.nameForModel,description:this.getToolDescription(c),parameters:c.inputSchema}}));let s=n;try{s=await o.compute(this.turnContext,r)||[]}catch(c){return vm.error(this.turnContext.ctx,`Error while computing tool grouping: ${Ql(c)}`),this.abortIfCanceled(r),[]}return s.map(c=>c instanceof ly?{type:"function",function:{name:c.name,description:c.description}}:{type:"function",function:{name:c.nameForModel,description:this.getToolDescription(c),parameters:c.inputSchema}})}getAvailableLanguageModelTools(e){return e.filter(r=>this.shouldIncludeTool(r))}shouldIncludeTool(e){return e.name==="replace_string_in_file"?Gen(this.modelConfiguration):e.name==="apply_patch"?jen(this.modelConfiguration):!0}getToolDescription(e){return e.name==="manage_todo_list"?bk.getToolDescription(this.modelConfiguration.modelFamily):e.description}createAgentPromptProps(e){return{turnContext:this.turnContext,userRawMessage:this.turnContext.turn.request.message,workspaceFolders:this.turnContext.turn.workspaceFolders,snapshotTextDocumentProvider:this.snapshotTextDocumentProvider,tools:e,modelConfiguration:this.modelConfiguration,codesearchMode:this.turnContext.turn.chatMode?.kind==="Ask"}}addToolCallModelResponseToTurn(e,r,n,o){let s={role:"assistant",content:e,tool_calls:r.length?r:void 0,thinking:n,phase:o,modelId:this.modelConfiguration.modelId};this.turn.response?this.turn.response.message=oj(this.turn.response.message,s):this.turn.response={message:[s],type:"model"}}addToolCallResultToTurn(e,r){let n="";switch(e.status){case"error":n="Tool call failed with error: ";break;case"cancelled":n="Tool call is cancelled with result: ";break;default:case"success":n=""}let o=n+_k(e.content),s={role:"tool",content:o,tool_call_id:r};if(!this.turn.response)this.turn.response={message:[s],type:"model"};else{if(ij(this.turn.response.message)&&this.turn.response.message.find(l=>l.role==="tool"&&l.tool_call_id===r)){vm.info(this.turnContext.ctx,`Tool call result for ${r} already exists in the turn response. Ignoring the new one.`);return}this.turn.response.message=oj(this.turn.response.message,s)}}findToolByName(e,r){return this.turnContext.ctx.get(Pk).findTool(this.turnContext,r)??e.find(n=>n.nameForModel===r)}async prepareToolConfirmation(e,r){return this.turnContext.ctx.get(Jj).checkApproval(this.turnContext,e,r)}async buildTerminalCommandData(e,r){if(!e.id.includes("run_in_terminal"))return;let n=r.command,o=this.turnContext.ctx.get(Zx),c=Gne(e.description)||"sh",{subCommands:l,commandNames:u}=await o.parseTerminalCommand(n,c);return{subCommands:l,commandNames:u}}buildSensitiveFileData(e,r){if(!Sk.isPotentiallySensitiveTool(e))return;let n=Sk.getMatchingRuleForToolCall(e,r,this.turnContext),o=Sk.extractFilePathForMetadata(e,r);if(o)return{filePath:o.filePath,matchingRule:n?.rule.pattern,ruleDescription:n?.rule.description,isGlobal:n?n.isOutsideWorkspace:void 0}}abortIfCanceled(e){if(e.isCancellationRequested)throw this.turn.status="cancelled",new Ec}async requestToolInvocationApproval(e,r,n,o,s,c,l){if(!r){vm.debug(this.turnContext.ctx,`Tool call confirmation not required for ${n.id}`);return}let u=Sk.generateSensitiveConfirmationMessage(n,o,this.turnContext);u&&(e.confirmationMessages={title:u.title,message:u.message});let d=e.confirmationMessages??{title:`Run ${n.id}`,message:`Do you want to allow "${n.id}" to run?`},p=await this.buildTerminalCommandData(n,o),h=this.buildSensitiveFileData(n,o),m=p||h?{terminalCommandData:p,sensitiveFileData:h}:void 0,g=await this.toolsService.invokeToolConfirmation(this.turnContext,n.id,{title:d.title,message:d.message,input:o,roundId:s,toolCallId:c,annotations:n.annotations,toolMetadata:m},l);switch(g.result){case"dismiss":throw this.turn.status="cancelled",new EF("Cancelled by user");case"accept":return Promise.resolve();default:throw new EF(`Invalid confirmation result ${g.result}`)}}async validateIteration(e,r,n){if(!(!r||e<=this.maxToolCallingLoop)){if(vm.debug(this.turnContext.ctx,`Tool calling loop exceeds configured max iterations ${this.maxToolCallingLoop} for turn ${this.turn.id}`),this.turn.isSubagent()&&await this.requestAdditionalToolIterations(e,n)){let s=this.maxToolCallingLoop;this.maxToolCallingLoop=this.maxToolCallingLoop+this.requestLimitIncrement,vm.debug(this.turnContext.ctx,`Tool calling loop limit increased from ${s} to ${this.maxToolCallingLoop} for turn ${this.turn.id}`);return}throw new E4}}async requestAdditionalToolIterations(e,r){this.abortIfCanceled(r);let n;try{n=this.turnContext.ctx.get(Cu)}catch(s){return vm.error(this.turnContext.ctx,`Tool confirmation invoker unavailable: ${Ql(s)}, stopping tool calling loop.`),!1}let o=`cls_${t.NextToolCallId++}`;try{let s=await n.invokeClientToolConfirmation(this.turnContext,{name:gAo,title:"Continue to iterate?",message:"Copilot has been working on this problem for a while. Do you want it to continue to iterate? You can also set the maximum request limit in settings.",input:void 0,conversationId:this.conversation.id,turnId:this.turn.id,roundId:e,toolCallId:o});return this.abortIfCanceled(r),s.result==="accept"}catch(s){return vm.error(this.turnContext.ctx,`Failed to request continuation confirmation: ${Ql(s)}`),!1}}checkChatPayload(e){if(e.messages.length===0)throw new Em({message:"No messages provided",responseIsFiltered:!1});if(e.tools&&e.tools.length>128)throw new Em({message:`You may not include more than ${128} tools in your request.`,responseIsFiltered:!1})}formatInputForDisplay(e){try{return JSON.stringify(e,null,2)}catch{return}}async checkCompressionAfterToolCall(e){try{await this.turnContext.ctx.get(s_).checkAndCompress(this.conversation,this.modelConfiguration,"post-tool-call",e)}catch(r){vm.error(this.turnContext.ctx,`Post-tool-call compression check failed: ${Ql(r)}`)}}recordAssistantRoundTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o={text:e,iterationNumber:r};n&&(o.thinking={id:n.id,text:Array.isArray(n.text)?n.text.join(""):n.text});let s=sen(e,String(this.turn.id),null,o);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,s).catch(c=>{Ge.error(this.turnContext.ctx,`Failed to record assistant round transcript: ${c instanceof Error?c.message:String(c)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create assistant round transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordRenderedUserMessageTranscript(e){if(this.transcriptPersistence.isEnabled())try{let r=oen(String(this.turn.id),e);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r).catch(n=>{Ge.error(this.turnContext.ctx,`Failed to record rendered user message transcript: ${n instanceof Error?n.message:String(n)}`)})}catch(r){Ge.error(this.turnContext.ctx,`Failed to create rendered user message transcript event: ${r instanceof Error?r.message:String(r)}`)}}recordToolExecutionStartTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o=aen(e,r,n);this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,o).catch(s=>{Ge.error(this.turnContext.ctx,`Failed to record tool execution start transcript: ${s instanceof Error?s.message:String(s)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create tool execution start transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordToolExecutionCompleteTranscript(e,r,n){if(this.transcriptPersistence.isEnabled())try{let o=this.turnContext.agentToolCalls.getToolCallById(e),s=o?{result:o.result,error:o.error,resultDetails:o.resultDetails,toolSpecificData:o.toolSpecificData,progressMessage:o.progressMessage}:void 0,c=cen(e,r,s,null,{status:n.toString()});this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,c).catch(l=>{Ge.error(this.turnContext.ctx,`Failed to record tool execution complete transcript: ${l instanceof Error?l.message:String(l)}`)})}catch(o){Ge.error(this.turnContext.ctx,`Failed to create tool execution complete transcript event: ${o instanceof Error?o.message:String(o)}`)}}recordTrajectorySteps(e){if(!this.llmRequestPersistence?.isEnabled()||e.type!=="tool_calls"||!e.toolCalls)return;let r=this.turnContext.subagentInfo,n=e.toolCalls.map(o=>({tool:o.function.name,tool_call_id:o.id}));See(()=>this.llmRequestPersistence?.appendTrajectoryStep({tool_calls:n,input_tokens:e.usage?.prompt_tokens,output_tokens:e.usage?.completion_tokens,cached_input_tokens:e.usage?.prompt_tokens_details?.cached_tokens,loop_type:r?"subagent":"parent",subagent_name:r?.name,loop_order:this.nextTrajectoryOrder++,conversationId:this.conversation.id.toString(),turnId:this.turn.id.toString()}),o=>Ge.debug(this.turnContext.ctx,"Failed to record trajectory step",o))}recordSubagentTrajectoryLink(e,r,n){if(e.name!=="run_subagent"||!this.llmRequestPersistence?.isEnabled()||!n)return;let o=r.subagentConversationId,s=r.subagentTurnId;!o||!s||See(()=>this.llmRequestPersistence?.appendSubagentLink({type:"subagent_link",tool_call_id:n,subagent_conversationId:o,subagent_turnId:s,conversationId:this.conversation.id.toString(),turnId:this.turn.id.toString()}),c=>Ge.debug(this.turnContext.ctx,"Failed to record subagent link",c))}recordToolInOut(e,r,n,o){if(!this.llmRequestPersistence?.isEnabled()||!e.id)return;let s=_k(n.content),c=Math.round(performance.now()-o);See(()=>this.llmRequestPersistence?.appendToolInOut({tool_call_id:e.id,tool:e.function.name,input:r,output:s,status:n.status,timestamp:new Date().toISOString(),duration_ms:c}),l=>Ge.debug(this.turnContext.ctx,"Failed to record tool-in-out entry",l))}};var v4t=class{static{a(this,"DummyProgressHandler")}async begin(){}async report(){}async end(){}async cancel(){}},b4t=class{constructor(e,r){this.handler=e;this.parentTurnId=r}static{a(this,"SubagentProgressHandler")}async begin(e,r,n,o){await this.handler.begin(e,r,n,{...o,parentTurnId:this.parentTurnId})}async report(e,r,n,o){await this.handler.report(e,r,n,{...o,parentTurnId:this.parentTurnId})}async end(e,r,n,o){await this.handler.end(e,r,n,o)}async cancel(e,r,n,o){await this.handler.cancel(e,r,n,o)}};function X2t(t){let e=t.match(/^(.+?)\s*\(([^)]+)\)$/);return e?{modelName:e[1].trim(),provider:e[2].trim()}:{modelName:t.trim(),provider:""}}a(X2t,"parseModelString");var PGe=class{static{a(this,"CustomAgentExecutor")}constructor(e,r){this.config=e,this.subagentConfig=r}async invoke(e,r,n,o){let s=r.task,c=new Td({message:s,type:"user"}),l=this.config.model||e.turn.userRequestedModel;c.userRequestedModel=l,c.needToolCallConfirmation=r.needToolCallConfirmation,c.workspaceFolder=e.turn.workspaceFolder,c.workspaceFolders=e.turn.workspaceFolders,c.parentTurnId=e.turn.id,c.chatMode=new wye(this.config);let u=e.toLlmInteraction();c.parentLlmInteraction=u;let d=new UH([c],e.conversation.source,e.conversation.userLanguage),p=new LT(e.ctx,d,c,o||e.cancelationToken),h,m=!1;if(this.config.model){let b=X2t(this.config.model),I=b.modelName.toLowerCase(),x=b.provider.toLowerCase()||"copilot";if(x==="copilot"){let P=(await p.ctx.get(tl).getMetadata()).find(k=>k.name.toLowerCase()===I);if(P){let k;P.is_chat_fallback?k=P.id:k=P.capabilities.family,h=await qo.getModelConfiguration(e.ctx,"edits",k)}else if(I===W9e.toLowerCase())m=!0,h=await qo.getModelConfiguration(e.ctx,"edits",YM,void 0,d.id.toString(),M6(d.turns));else throw new Error(`Model "${b.modelName}" not found in available models`)}else{let P=(await new Ka(p.ctx.get(Ti)).getAllModels(p.ctx)).find(k=>k.provider.toLowerCase()===x&&k.capabilities?.name.toLowerCase()===I);if(P)h=await $P(p.ctx,P.provider,P.name);else throw new Error(`BYOK model "${b.modelName}" with provider "${b.provider}" not found`)}}else h=e.turn.resolvedModelConfiguration;p.setResolvedModelConfiguration(h),p.subagentInfo={name:this.config.name,model:m?h.uiName:l,isAutoModel:m};let g=new fa(e.ctx),A=await Ja(e.ctx,p,{languageId:""}),y=n||new v4t,E=new b4t(y,e.turn.id);await e.ctx.get(xa).begin(d,c,E),await new cie(p,g,h,A,this.subagentConfig).run(o||e.cancelationToken);let v=c.response?dn(c.response.message):"";return this.subagentConfig.postProcess&&(v=await this.subagentConfig.postProcess(p,v)),{response:v,conversationId:d.id.toString(),turnId:c.id.toString()}}};f();f();var i$=de(co());var kGe=class extends Xt{static{a(this,"RunSubagentPrompt")}renderCopilot(){let{turnContext:e,currentTurn:r,modelConfiguration:n,agentName:o,agentInstruction:s}=this.props,c=O6(r.response?.message,!0),l=K6(c,{ctx:e.ctx,identifier:`Subagent "${o}" Turn ID: ${r.id}`,enableWarnings:!0}),u=(0,i$.useKeepWith)(),d=dn(r.request.message);return vscpp(vscppf,null,vscpp(i$.SystemMessage,{priority:1e3},vscpp(zne,null),vscpp("br",null),vscpp("br",null),'You are "',o,'", a specialized agent. Follow your instructions carefully and complete the assigned task.',s&&vscpp(vscppf,null,vscpp("br",null),vscpp("br",null),s),vscpp("br",null),vscpp("br",null),"When you complete your task, provide a clear, concise summary of what you accomplished. Do not include unnecessary preamble."),vscpp(i$.UserMessage,{priority:950},vscpp(Rn,{name:"environment_info"},vscpp(jne,{ctx:e.ctx})),vscpp(Rn,{name:"workspace_info"},vscpp($ne,{ctx:e.ctx,workspaceFolders:r.workspaceFolders}))),vscpp(i$.UserMessage,{priority:900},vscpp(vscppf,null,d)),l.length>0&&vscpp(u,{priority:899,flexGrow:2},vscpp(nk,{assistantRounds:l,ctx:e.ctx,truncateAt:Math.floor(n.maxRequestTokens/2),modelConfiguration:n,isHistorical:!1,identifier:`Subagent-${o}-${r.id}`})))}};var T4t=class{constructor(e){this.agentConfig=e}static{a(this,"DefaultSubagentConfig")}createPromptRenderer(e,r,n,o){let s={turnContext:e,currentTurn:e.turn,modelConfiguration:n,agentName:this.agentConfig.name,agentInstruction:this.agentConfig.instruction};return p0.create(kGe,s,n)}};function wrn(t){return new T4t(t)}a(wrn,"resolveSubagentConfig");var lie=class extends sl{constructor(){super({name:"run_subagent",displayName:"Run Sub Agent",description:"Invoke a specialized custom agent to handle specific tasks autonomously. The agent will receive a task description and execute it using its configured tools and model. Use this when you need to delegate work to a specialized agent with specific capabilities.",displayDescription:"Delegate work to a specialized custom agent.",inputSchema:S.Object({task:S.String({description:"A detailed description of the task for the agent to perform. Should be clear and specific about what the agent should accomplish."}),agentName:S.String({description:"The name of the custom agent to invoke. Must be one of the exact agent names from the available agents list. Do not make up agent names."})})});this.registry=new Vne}static{a(this,"RunSubagentTool")}async invoke(r,n,o){let{task:s,agentName:c}=n.input,l=await Ja(r.ctx,r);try{let u=await this.registry.getAgent(r,c);if(u?.isBuiltIn?l.properties.mode=u.name:l.properties.mode="custom",!u)return l.properties.message="Custom agent not found",jp(r.ctx,"runSubagentTool.error",l),O2(r.ctx,"runSubagentTool.error",l),new _r([new fr(`Custom agent '${c}' not found`)],"error");if(!u.invokePolicy.includes("model"))return l.properties.message="Agent model invocation disabled",jp(r.ctx,"runSubagentTool.error",l),O2(r.ctx,"runSubagentTool.error",l),new _r([new fr(`Agent '${c}' is not available for model invocation`)],"error");let d=wrn(u),p=new PGe(u,d),h={task:s,needToolCallConfirmation:r.turn.needToolCallConfirmation},g=r.ctx.get(xa).getCurrentHandler(r.conversation),A=await p.invoke(r,h,g,o);st(r.ctx,"runSubagentTool.success",l),O2(r.ctx,"runSubagentTool.success",l);let y=`This is what has been accomplished by Custom Agent "${c}": -${A.response}`,E=new Cr([new fr(y)],"success");return E.subagentConversationId=A.conversationId,E.subagentTurnId=A.turnId,E}catch(u){let d="";return u instanceof LO?(l.properties.message="Tool call round exceed",Kp(r.ctx,"runSubagentTool.error",l),d=`Custom Agent "${c}" reached the maximum number of tool calls. The agent may have made partial progress. Break down the task into smaller steps or rephrase your request and try again before you finish the task by yourself. Explain this error and suggest the user to increase the tool request limit in settings before continue.`):d=u instanceof Error?`Error invoking custom agent: ${u.message}`:"An unknown error occurred while invoking the custom agent",V2(r.ctx,"runSubagentTool.error",u,l.extendedBy({message:d})),new Cr([new fr(d)],"error")}}prepareInvocation(r,n){let{agentName:o,task:s}=r.input;return{progressMessage:`${o}: ${s.substring(0,50)}${s.length>50?"...":""}`}}prepareCompletion(r,n){let{agentName:o}=r.input;return{completionMessage:`Custom agent "${o}" finished execution`}}};f();var X$=new Se("applyPatchTool"),gmo=`Use the \`apply_patch\` tool to edit files. +${A.response}`,E=new _r([new fr(y)],"success");return E.subagentConversationId=A.conversationId,E.subagentTurnId=A.turnId,E}catch(u){let d="";return u instanceof E4?(l.properties.message="Tool call round exceed",jp(r.ctx,"runSubagentTool.error",l),d=`Custom Agent "${c}" reached the maximum number of tool calls. The agent may have made partial progress. Break down the task into smaller steps or rephrase your request and try again before you finish the task by yourself. Explain this error and suggest the user to increase the tool request limit in settings before continue.`):d=u instanceof Error?`Error invoking custom agent: ${u.message}`:"An unknown error occurred while invoking the custom agent",MDe(r.ctx,"runSubagentTool.error",u,l.extendedBy({message:d})),new _r([new fr(d)],"error")}}prepareInvocation(r,n){let{agentName:o,task:s}=r.input;return{progressMessage:`${o}: ${s.substring(0,50)}${s.length>50?"...":""}`}}prepareCompletion(r,n){let{agentName:o}=r.input;return{completionMessage:`Custom agent "${o}" finished execution`}}};f();var o$=new Se("applyPatchTool"),AAo=`Use the \`apply_patch\` tool to edit files. Your patch language is a stripped-down, file-oriented diff format designed to be easy to parse and safe to apply. You can think of it as a high-level envelope: *** Begin Patch @@ -3097,7 +3086,7 @@ It is important to remember: - Delete File is NOT supported. - You must include a header with your intended action (Add/Update) - You must prefix new lines with \`+\` even when creating a new file -- File references must be ABSOLUTE, NEVER RELATIVE.`,THe=class extends pl{static{a(this,"ApplyPatchTool")}constructor(){super({name:"apply_patch",displayName:"Apply Patch",description:gmo,displayDescription:"Apply a patch to edit a single file in the workspace.",inputSchema:S.Object({input:S.String({description:"The patch content following the apply_patch format specification."}),explanation:S.String({description:"A brief explanation of what the patch accomplishes."})})})}async invoke(e,r,n){let{input:o,explanation:s}=r.input;if(!o)return new Cr([new fr("Missing patch text")],"error");let c=cen(o);if(c.length>0){let h=`Delete file operation is not supported. Files attempted to delete: ${c.join(", ")}. Please use other methods to delete files.`;return X$.warn(e.ctx,h),new Cr([new fr(h)],"error")}let l=H$(o),u=qie(o),d=[...new Set([...l,...u])];if(d.length>1){let h=`Each apply_patch call can only operate on one file. Found ${d.length} files: ${d.join(", ")}. Please use separate apply_patch tool calls for each file.`;return X$.warn(e.ctx,h),new Cr([new fr(h)],"error")}let p={};try{X$.debug(e.ctx,`Start to process apply_patch with explanation: ${s}`);let h=await this.buildCommit(o,p,e,n);return await this.applyCommit(e,r,h,n)}catch(h){if(h instanceof Qie)return X$.warn(e.ctx,`Apply patch failed with InvalidContextError: ${h.message}, kind: ${h.kindForTelemetry}`),new Cr([new fr(`Applying patch failed: ${h.message}`)],"error");if(h instanceof Bk)return X$.warn(e.ctx,`Apply patch failed with InvalidPatchFormatError: ${h.message}, kind: ${h.kindForTelemetry}`),new Cr([new fr(`Invalid patch format: ${h.message}`)],"error");if(h instanceof b0)return X$.warn(e.ctx,`Apply patch failed with DiffError: ${h.message}`),new Cr([new fr(`Applying patch failed: ${h.message}`)],"error");let m=h instanceof Error?h.message:"An unknown error occurred";return X$.error(e.ctx,`Apply patch failed with unexpected error: ${m}`),new Cr([new fr(m)],"error")}}async buildCommit(e,r,n,o){return len(e,a(async c=>{if(o.isCancellationRequested)throw new Error("Operation cancelled");let l=Xl(c,n.uriSchemeCache),d=await n.ctx.get(In).getOrReadTextDocument({uri:l});if(d.status==="notfound")throw new b0(`File not found: ${c}`);if(d.status==="invalid")throw new b0(`Invalid file: ${c}. Reason: ${d.reason}`);let p=d.document.getText();return r[c]={text:p},{getText:a(()=>p,"getText"),languageId:d.document.detectedLanguageId}},"openFn"))}async applyCommit(e,r,n,o){let s=[],c=[],l=[];for(let[p,h]of Object.entries(n.changes)){if(o.isCancellationRequested)throw new Error("Operation cancelled");switch(h.type){case"add":{let m=await this.invokeClientCreateFileTool(e,r,p,h.newContent??"",o);if(m.status!=="success")return m;c.push(p);break}case"delete":{l.push(p);break}case"update":{let m=h.movePath??p,g=await this.invokeClientEditFileTool(e,r,m,h.newContent??"",r.input.explanation,o);if(g.status!=="success")return g;s.push(m);break}}}let u=[];s.length>0&&u.push(`Edited files: +- File references must be ABSOLUTE, NEVER RELATIVE.`,DGe=class extends sl{static{a(this,"ApplyPatchTool")}constructor(){super({name:"apply_patch",displayName:"Apply Patch",description:AAo,displayDescription:"Apply a patch to edit a single file in the workspace.",inputSchema:S.Object({input:S.String({description:"The patch content following the apply_patch format specification."}),explanation:S.String({description:"A brief explanation of what the patch accomplishes."})})})}async invoke(e,r,n){let{input:o,explanation:s}=r.input;if(!o)return new _r([new fr("Missing patch text")],"error");let c=atn(o);if(c.length>0){let h=`Delete file operation is not supported. Files attempted to delete: ${c.join(", ")}. Please use other methods to delete files.`;return o$.warn(e.ctx,h),new _r([new fr(h)],"error")}let l=Kj(o),u=eie(o),d=[...new Set([...l,...u])];if(d.length>1){let h=`Each apply_patch call can only operate on one file. Found ${d.length} files: ${d.join(", ")}. Please use separate apply_patch tool calls for each file.`;return o$.warn(e.ctx,h),new _r([new fr(h)],"error")}let p={};try{o$.debug(e.ctx,`Start to process apply_patch with explanation: ${s}`);let h=await this.buildCommit(o,p,e,n);return await this.applyCommit(e,r,h,n)}catch(h){if(h instanceof Zne)return o$.warn(e.ctx,`Apply patch failed with InvalidContextError: ${h.message}, kind: ${h.kindForTelemetry}`),new _r([new fr(`Applying patch failed: ${h.message}`)],"error");if(h instanceof Tk)return o$.warn(e.ctx,`Apply patch failed with InvalidPatchFormatError: ${h.message}, kind: ${h.kindForTelemetry}`),new _r([new fr(`Invalid patch format: ${h.message}`)],"error");if(h instanceof y0)return o$.warn(e.ctx,`Apply patch failed with DiffError: ${h.message}`),new _r([new fr(`Applying patch failed: ${h.message}`)],"error");let m=h instanceof Error?h.message:"An unknown error occurred";return o$.error(e.ctx,`Apply patch failed with unexpected error: ${m}`),new _r([new fr(m)],"error")}}async buildCommit(e,r,n,o){return ctn(e,a(async c=>{if(o.isCancellationRequested)throw new Error("Operation cancelled");let l=jl(c,n.uriSchemeCache),d=await n.ctx.get(In).getOrReadTextDocument({uri:l});if(d.status==="notfound")throw new y0(`File not found: ${c}`);if(d.status==="invalid")throw new y0(`Invalid file: ${c}. Reason: ${d.reason}`);let p=d.document.getText();return r[c]={text:p},{getText:a(()=>p,"getText"),languageId:d.document.detectedLanguageId}},"openFn"))}async applyCommit(e,r,n,o){let s=[],c=[],l=[];for(let[p,h]of Object.entries(n.changes)){if(o.isCancellationRequested)throw new Error("Operation cancelled");switch(h.type){case"add":{let m=await this.invokeClientCreateFileTool(e,r,p,h.newContent??"",o);if(m.status!=="success")return m;c.push(p);break}case"delete":{l.push(p);break}case"update":{let m=h.movePath??p,g=await this.invokeClientEditFileTool(e,r,m,h.newContent??"",r.input.explanation,o);if(g.status!=="success")return g;s.push(m);break}}}let u=[];s.length>0&&u.push(`Edited files: ${s.map(p=>` - ${p}`).join(` `)}`),c.length>0&&u.push(`Created files: ${c.map(p=>` - ${p}`).join(` @@ -3105,7 +3094,7 @@ ${c.map(p=>` - ${p}`).join(` ${l.map(p=>` - ${p}`).join(` `)}`);let d=u.length>0?u.join(` -`):"No changes were applied.";return new Cr([new fr(d)],"success")}async invokeClientEditFileTool(e,r,n,o,s,c){let l=e.ctx.get(Po).getToolByNameAndProvider("insert_edit_into_file",Od);if(!l)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Po).invokeTool(e,l.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:n,code:o,explanation:s},roundId:r.roundId,toolCallId:r.toolCallId},c)}async invokeClientCreateFileTool(e,r,n,o,s){let c=e.ctx.get(Po).getToolByNameAndProvider("create_file",Od);if(!c)throw new Error("Client tool create_file is not registered");return e.ctx.get(Po).invokeTool(e,c.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:n,content:o},roundId:r.roundId,toolCallId:r.toolCallId},s)}prepareInvocation(e,r){let{input:n}=e;if(!n.input||!n.input.length)return{progressMessage:"Running apply_patch tool"};let o=H$(n.input),s=qie(n.input),c=[...o,...s];return c.length>0?{progressMessage:`Editing ${c.map(u=>{let d=Xl(u,e.uriSchemeCache);return Pm(d)}).join(", ")} with apply_patch tool`}:{progressMessage:"Running apply_patch tool"}}async invokeConfirmation(e,r,n){let o=e.ctx.get(ku),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.input||!n.input.length)return{completionMessage:"Ran apply_patch tool"};let o=H$(n.input),s=qie(n.input),c=[...o,...s];return c.length>0?{completionMessage:`Edited ${c.map(u=>{let d=Xl(u,e.uriSchemeCache);return Pm(d)}).join(", ")} with apply_patch tool`}:{completionMessage:"Ran apply_patch tool"}}static toApplyPatchParams(e){if(typeof e.input!="string")throw new Error("input must be a string");if(typeof e.explanation!="string")throw new Error("explanation must be a string");return{input:e.input,explanation:e.explanation}}};f();var Ptn=require("path");var Amo=new Se("CodebaseTool"),ymo=16,SHe=class extends pl{static{a(this,"CodebaseTool")}constructor(){super({name:"semantic_search",displayName:"Codebase",description:`Semantic search that finds code by meaning, not exact text. Returns relevant code snippets from the user's workspace. +`):"No changes were applied.";return new _r([new fr(d)],"success")}async invokeClientEditFileTool(e,r,n,o,s,c){let l=e.ctx.get(Io).getToolByNameAndProvider("insert_edit_into_file",Id);if(!l)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Io).invokeTool(e,l.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:n,code:o,explanation:s},roundId:r.roundId,toolCallId:r.toolCallId},c)}async invokeClientCreateFileTool(e,r,n,o,s){let c=e.ctx.get(Io).getToolByNameAndProvider("create_file",Id);if(!c)throw new Error("Client tool create_file is not registered");return e.ctx.get(Io).invokeTool(e,c.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:n,content:o},roundId:r.roundId,toolCallId:r.toolCallId},s)}prepareInvocation(e,r){let{input:n}=e;if(!n.input||!n.input.length)return{progressMessage:"Running apply_patch tool"};let o=Kj(n.input),s=eie(n.input),c=[...o,...s];return c.length>0?{progressMessage:`Editing ${c.map(u=>{let d=jl(u,e.uriSchemeCache);return _m(d)}).join(", ")} with apply_patch tool`}:{progressMessage:"Running apply_patch tool"}}async invokeConfirmation(e,r,n){let o=e.ctx.get(Cu),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.input||!n.input.length)return{completionMessage:"Ran apply_patch tool"};let o=Kj(n.input),s=eie(n.input),c=[...o,...s];return c.length>0?{completionMessage:`Edited ${c.map(u=>{let d=jl(u,e.uriSchemeCache);return _m(d)}).join(", ")} with apply_patch tool`}:{completionMessage:"Ran apply_patch tool"}}static toApplyPatchParams(e){if(typeof e.input!="string")throw new Error("input must be a string");if(typeof e.explanation!="string")throw new Error("explanation must be a string");return{input:e.input,explanation:e.explanation}}};f();var Rrn=require("path");var yAo=new Se("CodebaseTool"),EAo=16,NGe=class extends sl{static{a(this,"CodebaseTool")}constructor(){super({name:"semantic_search",displayName:"Codebase",description:`Semantic search that finds code by meaning, not exact text. Returns relevant code snippets from the user's workspace. When to Use: - Explore unfamiliar codebases @@ -3124,37 +3113,37 @@ Search Strategy: Query Guidelines: - Use keywords that likely appear in code: function names, class names, variable names, error types, package names -- AVOID generic words like "return", "code", "function", "method"`,displayDescription:"Find relevant file chunks, symbols, and other information in your codebase",inputSchema:S.Object({query:S.String({description:'The query keywords to search the codebase for, each keyword separated with space, like: "email message DNS_NAME". IMPORTANT: Use keywords that likely appear in code, such as: exact function names, class names, variable names, error types, package names, or domain-specific technical terms. AVOID generic words like "return", "code", "function", "method" and so on. The more specific your keywords, the better the search results.'}),maxResults:S.Optional(S.Number({description:"Maximum number of code chunks to return. Default is 16. Usually no need to change. Only increase when initial results are insufficient and broader context is required.",minimum:1,maximum:128}))})})}async invoke(e,r,n){if(!r.input.query)throw new Error("Invalid input");let o=e.ctx.get(cw),s=[];if(e.turn.workspaceFolder&&s.push(e.turn.workspaceFolder.uri),e.turn.workspaceFolders)for(let p of e.turn.workspaceFolders)s.includes(p.uri)||s.push(p.uri);let c=r.input.query,l=await o.searchWorkspace({rawQuery:c,resolveQueryAndKeywords:a(async()=>Promise.resolve({rephrasedQuery:c,keywords:this.getKeywordsForContent(c)}),"resolveQueryAndKeywords"),resolveQuery:a(async()=>Promise.resolve(c),"resolveQuery")},{tokenBudget:VWr,maxResults:r.input.maxResults??ymo,workspaceFolders:s,source:"codebaseTool"},n);if(l.chunks.length===0)return new Cr([new fr("No relevant code found")],"success");let u=l.chunks.map(p=>{let h=Qo(p.chunk.file),m=Sm(p.chunk.text);return new fr(`Here is a potentially relevant text excerpt in \`${h}\` starting at line ${p.chunk.range.startLineNumber-1}: +- AVOID generic words like "return", "code", "function", "method"`,displayDescription:"Find relevant file chunks, symbols, and other information in your codebase",inputSchema:S.Object({query:S.String({description:'The query keywords to search the codebase for, each keyword separated with space, like: "email message DNS_NAME". IMPORTANT: Use keywords that likely appear in code, such as: exact function names, class names, variable names, error types, package names, or domain-specific technical terms. AVOID generic words like "return", "code", "function", "method" and so on. The more specific your keywords, the better the search results.'}),maxResults:S.Optional(S.Number({description:"Maximum number of code chunks to return. Default is 16. Usually no need to change. Only increase when initial results are insufficient and broader context is required.",minimum:1,maximum:128}))})})}async invoke(e,r,n){if(!r.input.query)throw new Error("Invalid input");let o=e.ctx.get(Jx),s=[];if(e.turn.workspaceFolder&&s.push(e.turn.workspaceFolder.uri),e.turn.workspaceFolders)for(let p of e.turn.workspaceFolders)s.includes(p.uri)||s.push(p.uri);let c=r.input.query,l=await o.searchWorkspace({rawQuery:c,resolveQueryAndKeywords:a(async()=>Promise.resolve({rephrasedQuery:c,keywords:this.getKeywordsForContent(c)}),"resolveQueryAndKeywords"),resolveQuery:a(async()=>Promise.resolve(c),"resolveQuery")},{tokenBudget:$zr,maxResults:r.input.maxResults??EAo,workspaceFolders:s,source:"codebaseTool"},n);if(l.chunks.length===0)return new _r([new fr("No relevant code found")],"success");let u=l.chunks.map(p=>{let h=Bo(p.chunk.file),m=mm(p.chunk.text);return new fr(`Here is a potentially relevant text excerpt in \`${h}\` starting at line ${p.chunk.range.startLineNumber-1}: ${m} ${p.chunk.text} -${m}`)}),d=new Z6(u,"success");return d.toolResultMessage=u.length===0?`Searched ${this.getDisplaySearchTarget(r.input)} for "${r.input.query}", no results`:u.length===1?`Searched ${this.getDisplaySearchTarget(r.input)} for "${r.input.query}", 1 result`:`Searched ${this.getDisplaySearchTarget(r.input)} for "${r.input.query}", ${u.length} results`,d.toolResultDetails=l.chunks.map(p=>({type:"fileLocation",value:{uri:p.chunk.file,range:{start:{line:p.chunk.range.startLineNumber,character:p.chunk.range.startColumn},end:{line:p.chunk.range.endLineNumber,character:p.chunk.range.endColumn}}}})),d}prepareInvocation(e,r){return{progressMessage:`Searching ${this.getDisplaySearchTarget(e.input)} for "${e.input.query}"`}}getDisplaySearchTarget(e){let r;return e.scopedDirectories&&e.scopedDirectories.length===1?r=`${(0,Ptn.basename)(e.scopedDirectories[0])}`:e.scopedDirectories&&e.scopedDirectories.length>1?r=`${e.scopedDirectories.length} directories`:r="codebase",r}async isEnabled(e){try{return await qF(e.ctx)}catch(r){return Amo.error(e.ctx,"Error checking codebase tool availability:",r),!1}}getKeywordsForContent(e){let r=new Set;for(let n of e.matchAll(/(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g))r.add(n[0]);return Array.from(r.values(),n=>({keyword:n,variations:[]}))}};f();var IHe=class extends pl{static{a(this,"CreateFileTool")}constructor(){super({name:"create_file",displayName:"Create File",description:"Create a new file in the workspace with the specified content. Use this tool to create new files.",displayDescription:"Create a new file in the workspace.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to create."}),content:S.String({description:"The content to write to the new file."})})})}async invoke(e,r,n){try{let o=await this.invokeClientCreateFileTool(e,r,n);return this.getFinalCreateFileResult(e,r,o)}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new Cr([new fr(s)],"error")}}async invokeClientCreateFileTool(e,r,n){let o=e.ctx.get(Po).getToolByNameAndProvider("create_file",Od);if(!o)throw new Error("Client tool create_file is not registered");return e.ctx.get(Po).invokeTool(e,o.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,content:r.input.content},roundId:r.roundId,toolCallId:r.toolCallId},n)}getFinalCreateFileResult(e,r,n){if(n.status!=="success")return n;let o=$P({uri:Xl(r.input.filePath,e.uriSchemeCache),languageId:"UNKNOWN"}),s=Nk(n.content),c=[];c.push(``),c.push("This is the new file that was created. You can reference this file in future operations.");let l=new Mk({code:s,languageId:o,noFilePath:!0});return c.push(...l.renderAsArray()),c.push(""),new Cr([new fr(c.join(` -`))],"success")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running create_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{progressMessage:`Creating ${Pm(o)}`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(ku),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran create_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{completionMessage:`Created ${Pm(o)}`}}static toCreateFileParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.content!="string")throw new Error("content must be a string");return{filePath:e.filePath,content:e.content}}};f();f();f();function Z$(){return yr()}a(Z$,"uuidV4");f();var If={FILEPATH:"---FILEPATH",FIND:"---FIND",REPLACE:"---REPLACE",COMPLETE:"---COMPLETE"};function Dtn(t){let e=[],r=[],n=[],o,s;for(let c of Emo(t))switch(c.marker){case void 0:r=c.content;break;case If.FILEPATH:o=c.content.join(` -`).trim();break;case If.FIND:s=ktn(c.content);break;case If.REPLACE:if(o&&s){let l=ktn(c.content);e.push({filePath:o,find:s,replace:l})}o=void 0,s=void 0;break;case If.COMPLETE:n=c.content;break}return{patches:e,contentBefore:r,contentAfter:n}}a(Dtn,"parsePatchResponse");function ktn(t){if(t.length===0)return[""];let e=[],r=!1,n=0,o=!1,s=/^(`{3,})/;for(let c of t){let l=c.match(s);if(l&&!r)n=l[1].length,r=!0;else if(r){let u=c.match(s);if(u&&u[1].length>=n){o=!0;break}e.push(c)}}return o?e:t}a(ktn,"extractCodeBlock");function*Emo(t){let e=t.split(/\r?\n/),r,n=[];for(let o of e){let s;if(o.startsWith("---")){o.startsWith(If.FILEPATH)?s=If.FILEPATH:o.startsWith(If.FIND)?s=If.FIND:o.startsWith(If.REPLACE)?s=If.REPLACE:o.startsWith(If.COMPLETE)?s=If.COMPLETE:s=o,yield{marker:r,content:n},n=[o.substring(s.length)],r=s;continue}n.push(o)}yield{marker:r,content:n}}a(Emo,"iterateSections");function Cmo(t,e){let r=t.split(/\r?\n/),{find:n,replace:o}=e;if(n.length===0)return;let s=_mo(r,n);if(s===void 0)return;let{startIndex:c,endIndex:l,indentLevel:u,indentCharCount:d}=s,p="";if(d>0)for(let E=c;E<=l;E++){let _=r[E],v=p_e(_);if(v===d&&v<_.length){p=_.substring(0,d);break}}let h=!1;for(let E=c;E<=l&&!h;E++){let _=r[E];if(/^\s*\/\*|^\s*\*/.test(_))continue;let v=p_e(_);if(v>0&&v<_.length){h=_.substring(0,v).indexOf(" ")!==-1;break}}let m=bmo(o,u,p,h),g=r.slice(0,c),A=r.slice(l+1);return[...g,...m,...A].join(` -`)}a(Cmo,"applyPatch");function _mo(t,e,r=4){if(e.length===0)return;let n=0;for(;n=0&&o>=r&&t.charCodeAt(n)===e.charCodeAt(o);)n--,o--;if(o>=r)return!1;for(;n>=0&&Mtn(t.charCodeAt(n));)n--;return n<0}a(Ntn,"endsWith");function vmo(t,e,r,n=4){let o=Number.MAX_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,c=0;for(let l=e;l<=r;l++){let u=t[l],{level:d,length:p}=Otn(u,n),h=p;if(hs&&xHe(t[c-1]);)c--;if(s===c)return[];let l=Number.MAX_SAFE_INTEGER,u=[];for(let p=s;p0)if(m===l)y=r;else{let E=m-l;n?y=r+" ".repeat(E):y=r+" ".repeat(o*E)}else n?y=" ".repeat(A):y=" ".repeat(o*A);d.push(y+h.substring(g))}}return d}a(bmo,"adjustIndentation");function Btn(t,e){let r=t;for(let n of e){let o=Cmo(r,n);o!==void 0&&(r=o)}return r}a(Btn,"applyPatches");f();var wHe=class extends Error{static{a(this,"CopilotEditsCancelledByUserException")}constructor(){super("Operation cancelled by user"),this.name="CopilotEditsCancelledByUserException"}};f();var Zg=class extends Error{static{a(this,"CopilotEditsProcessCodeBlockException")}constructor(e){super(e),this.name="CopilotEditsProcessCodeBlockException"}};f();var eV=de(po());var Kie=class extends Zt{static{a(this,"CodeMapperFullRewritePrompt")}renderCopilot(e,r){let{existingDocument:n,codeBlock:o,markdownBeforeBlock:s,inProgressRewriteContent:c}=this.props;if(n.status!=="valid")return vscpp(vscppf,null);let l=n.document,u=l.detectedLanguageId,d=l.getText(),p=l.lineCount,h=d.trim().length>0,m=Sm(d),g=Sm(o);return vscpp(vscppf,null,vscpp(eV.SystemMessage,{priority:1e3},"You are an AI programming assistant that is specialized in applying code changes to an existing document.",vscpp("br",null),"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null),"The user has a code block that represents a suggestion for a code change and a ",u," file opened in a code editor.",vscpp("br",null),"Rewrite the existing document to fully incorporate the code changes in the provided code block.",vscpp("br",null),"For the response, always follow these instructions:",vscpp("br",null),"1. Analyze the code block and the existing document to decide if the code block should replace existing code or should be inserted.",vscpp("br",null),"2. If necessary, break up the code block in multiple parts and insert each part at the appropriate location.",vscpp("br",null),"3. Preserve whitespace and newlines right after the parts of the file that you modify.",vscpp("br",null),"4. The final result must be syntactically valid, properly formatted, and correctly indented. It should not contain any ",km," comments.",vscpp("br",null),"5. Finally, provide the fully rewritten file. You must output the complete file.",vscpp("br",null)),vscpp(eV.UserMessage,{priority:700},h?vscpp(vscppf,null,"I have the following code open in the editor, starting from line 1 to line ",p,".",vscpp("br",null),vscpp(vscppf,null,m,u,vscpp("br",null),d,vscpp("br",null),m),vscpp("br",null)):vscpp(vscppf,null,"I am in an empty editor.",vscpp("br",null)),s&&vscpp(vscppf,null,"This is the description of what the code block changes:",vscpp("br",null),vscpp(Rn,{name:"changeDescription"},vscpp(vscppf,null,s)),vscpp("br",null)),"This is the code block that represents the suggested code change:",vscpp("br",null),vscpp(vscppf,null,g,u,vscpp("br",null),o,vscpp("br",null),g),vscpp("br",null),vscpp(Rn,{name:"userPrompt"},vscpp(vscppf,null,"Provide the fully rewritten file, incorporating the suggested code change. You must produce the complete file."))),c&&vscpp(vscppf,null,vscpp(eV.AssistantMessage,{priority:800},vscpp(vscppf,null,c)),vscpp(eV.UserMessage,{priority:900},vscpp(vscppf,null,"Please continue providing the next part of the response."))))}};f();var PHe=de(po());var oOt=class extends Zt{static{a(this,"PatchEditRules")}renderCopilot(){return vscpp(vscppf,null,"When proposing a code change, provide one or more modifications in the following format:",vscpp("br",null),"Each modification consist of three sections headed by `",If.FILEPATH,"`, `",If.FIND,"` and `",If.REPLACE,"`.",vscpp("br",null),"After ",If.FILEPATH," add the path to the file that needs to be changed.",vscpp("br",null),"After ",If.FIND," add a code block containing a section of the program that will be replaced.",vscpp("br",null),"Add multiple lines so that a find tool can find and identify a section of the program. Start and end with a line that will not be modified. ",vscpp("br",null),"Include all comments and empty lines exactly as they appear in the original source code. Do not abbreviate any line or summarize the code with `...`. ",vscpp("br",null),"After ",If.REPLACE," add a code block with the updated version of the original code in the find section. Maintain the same indentation and code style as in the original code.",vscpp("br",null),"After all modifications, add ",If.COMPLETE,".",vscpp("br",null))}},RHe=class extends Zt{static{a(this,"CodeMapperPatchRewritePrompt")}renderCopilot(e,r){let{existingDocument:n,codeBlock:o,markdownBeforeBlock:s}=this.props;if(n.status!=="valid")return vscpp(vscppf,null);let c=n.document,l=c.detectedLanguageId,u=c.getText(),d=c.lineCount,p=Sm(u),h=Sm(o),m=Eo(this.props.uri);return vscpp(vscppf,null,vscpp(PHe.SystemMessage,{priority:1e3},"You are an AI programming assistant that is specialized in applying code changes to an existing document.",vscpp("br",null),"I have a code block that represents a suggestion for a code change and I have a ",l," ","file opened in a code editor.",vscpp("br",null),"I expect you to come up with code changes that apply the code block to the editor.",vscpp("br",null),"I want the changes to be applied in a way that is safe and does not break the existing code, is correctly indented and matching the code style.",vscpp("br",null),"For the response, always follow these instructions:",vscpp("br",null),"1. Analyze the code block, the content of the editor and the current selection to decide if the code block should replace existing code or is to be inserted.",vscpp("br",null),"2. A line comment with `",km,"` indicates a section of code that has not changed.",vscpp("br",null),"3. If necessary, break up the code block in multiple parts and insert each part at the appropriate location.",vscpp("br",null),"4. If necessary, make changes to other parts in the editor so that the final result is valid, properly formatted and indented.",vscpp("br",null),"5. Finally, provide the code modifications",vscpp("br",null),vscpp(oOt,null),vscpp("br",null),vscpp(PGe,null),vscpp(Rn,{name:"example"},vscpp(Rn,{name:"user"},vscpp(vscppf,null,"I have the following code open in the editor.",vscpp("br",null),"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"```typescript",vscpp("br",null),"import ","{ readFileSync }"," from 'fs';",vscpp("br",null),vscpp("br",null),"class C ","{ }",vscpp("br",null),"```",vscpp("br",null),"This is the code block that represents a suggestion for a code change:",vscpp("br",null),"```typescript",vscpp("br",null),"private _stream: Stream;",vscpp("br",null),"```",vscpp("br",null),"Please find out how the code block can be applied to the editor.")),vscpp(Rn,{name:"assistant"},vscpp(vscppf,null,"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"---FIND",vscpp("br",null),"```",vscpp("br",null),"import { readFileSync } from 'fs';",vscpp("br",null),"```",vscpp("br",null),"---REPLACE",vscpp("br",null),"```",vscpp("br",null),"import { readFileSync } from 'fs';",vscpp("br",null),"import { Stream } from 'stream';",vscpp("br",null),"```",vscpp("br",null),"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"---FIND",vscpp("br",null),"```",vscpp("br",null),"class C ","{ }",vscpp("br",null),"```",vscpp("br",null),"---REPLACE",vscpp("br",null),"```",vscpp("br",null),'class C {"{"}',vscpp("br",null)," private _stream: Stream;",vscpp("br",null),"}",vscpp("br",null),"```",vscpp("br",null),"---COMPLETE"))),vscpp("br",null)),vscpp(PHe.UserMessage,{priority:700},"I have the following code open in the editor, starting from line 1 to line ",d,".",vscpp("br",null),m?`${If.FILEPATH} ${m}`:"",vscpp("br",null),vscpp(vscppf,null,p,l,vscpp("br",null),u,vscpp("br",null),p),vscpp("br",null),s&&vscpp(vscppf,null,"This is the description of what the code block changes:",vscpp("br",null),vscpp(Rn,{name:"changeDescription"},vscpp(vscppf,null,s)),vscpp("br",null)),"This is the code block that represents the suggested code change:",vscpp("br",null),vscpp(vscppf,null,h,l,vscpp("br",null),o,vscpp("br",null),h),vscpp("br",null),vscpp(Rn,{name:"userPrompt"},vscpp(vscppf,null,"Please find out how the code block can be applied to the editor. Provide the code changes in the format as described above."))))}};f();f();f();f();f();f();var Ia=class t{constructor(e,r){this.start=e;this.endExclusive=r;if(e>r)throw new Ga(`Invalid range: ${this.toString()}`)}static{a(this,"OffsetRange")}static fromTo(e,r){return new t(e,r)}static addRange(e,r){let n=0;for(;nr))return new t(e,r)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,r){return new t(e,e+r)}static emptyAt(e){return new t(e,e)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Ga(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Ga(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}map(e){let r=[];for(let n=this.start;ne.startLineNumber,ene)}static subtract(e,r){return r?e.startLineNumberr)throw new Ga(`startLineNumber ${e} cannot be after endLineNumberExclusive ${r}`);this.startLineNumber=e,this.endLineNumberExclusive=r}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=Dj(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)this._normalizedRanges.splice(r,0,e);else if(r===n-1){let o=this._normalizedRanges[r];this._normalizedRanges[r]=o.join(e)}else{let o=this._normalizedRanges[r].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(r,n-r,o)}}contains(e){let r=Oxt(this._normalizedRanges,n=>n.startLineNumber<=e);return!!r&&r.endLineNumberExclusive>e}intersects(e){let r=Oxt(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let r=[],n=0,o=0,s=null;for(;n=c.startLineNumber?s=new Vc(s.startLineNumber,Math.max(s.endLineNumberExclusive,c.endLineNumberExclusive)):(r.push(s),s=c)}return s!==null&&r.push(s),new t(r)}subtractFrom(e){let r=wFe(this._normalizedRanges,c=>c.endLineNumberExclusive>=e.startLineNumber),n=Dj(this._normalizedRanges,c=>c.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)return new t([e]);let o=[],s=e.startLineNumber;for(let c=r;cs&&o.push(new Vc(s,l.startLineNumber)),s=l.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let r=[],n=0,o=0;for(;nr.delta(e)))}};var Hk=class t{constructor(e,r){this.lineCount=e;this.columnCount=r}static{a(this,"TextLength")}static{this.zero=new t(0,0)}static lengthDiffNonNegative(e,r){return r.isLessThan(e)?t.zero:e.lineCount===r.lineCount?new t(0,r.columnCount-e.columnCount):new t(r.lineCount-e.lineCount,r.columnCount)}static betweenPositions(e,r){return e.lineNumber===r.lineNumber?new t(0,r.column-e.column):new t(r.lineNumber-e.lineNumber,r.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let r=0,n=0;for(let o of e)o===` -`?(r++,n=0):n++;return new t(r,n)}isZero(){return this.lineCount===0&&this.columnCount===0}isLessThan(e){return this.lineCount!==e.lineCount?this.lineCounte.lineCount:this.columnCount>e.columnCount}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}equals(e){return this.lineCount===e.lineCount&&this.columnCount===e.columnCount}compare(e){return this.lineCount!==e.lineCount?this.lineCount-e.lineCount:this.columnCount-e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new ci(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new ci(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new ci(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Vc.ofLength(1,this.lineCount)}addToPosition(e){return this.lineCount===0?new mo(e.lineNumber,e.column+this.columnCount):new mo(e.lineNumber+this.lineCount,this.columnCount+1)}addToRange(e){return ci.fromPositions(this.addToPosition(e.getStartPosition()),this.addToPosition(e.getEndPosition()))}toString(){return`${this.lineCount},${this.columnCount}`}};var h_e=class{constructor(e){this.text=e;this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let r=0;r0&&e.charAt(r-1)==="\r"?this.lineEndOffsetByLineIdx.push(r-1):this.lineEndOffsetByLineIdx.push(r));this.lineEndOffsetByLineIdx.push(e.length)}static{a(this,"PositionOffsetTransformer")}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}getOffsetRange(e){return new Ia(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getPosition(e){let r=Dj(this.lineStartOffsetByLineIdx,s=>s<=e),n=r+1,o=e-this.lineStartOffsetByLineIdx[r]+1;return new mo(n,o)}getRange(e){return ci.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getTextLength(e){return Hk.ofRange(this.getRange(e))}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new Hk(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};var sOt=class{constructor(){this._transformer=void 0}static{a(this,"AbstractText")}get endPositionExclusive(){return this.length.addToPosition(new mo(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getLineLength(e){return this.getValueOfRange(new ci(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new h_e(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new ci(e,1,e,Number.MAX_SAFE_INTEGER))}getLines(){let e=this.getValue();return HFe(e)}equals(e){return this===e?!0:this.getValue()===e.getValue()}};var GO=class extends sOt{constructor(r){super();this.value=r;this._t=new h_e(this.value)}static{a(this,"StringText")}getValueOfRange(r){return this._t.getOffsetRange(r).substring(this.value)}get length(){return this._t.textLength}};f();f();f();var m_e=class{constructor(e){this.replacements=e;let r=-1;for(let n of e){if(!(n.replaceRange.start>=r))throw new Ga(`Edits must be disjoint and sorted. Found ${n} after ${r}`);r=n.replaceRange.endExclusive}}static{a(this,"BaseEdit")}equals(e){if(this.replacements.length!==e.replacements.length)return!1;for(let r=0;rr.toString()).join(", ")}]`}normalize(){let e=[],r;for(let n of this.replacements)if(!(n.getNewLength()===0&&n.replaceRange.length===0)){if(r&&r.replaceRange.endExclusive===n.replaceRange.start){let o=r.tryJoinTouching(n);if(o){r=o;continue}}r&&e.push(r),r=n}return r&&e.push(r),this._createNew(e)}compose(e){let r=this.normalize(),n=e.normalize();if(r.isEmpty())return n;if(n.isEmpty())return r;let o=[...r.replacements],s=[],c=0;for(let l of n.replacements){for(;;){let h=o[0];if(!h||h.replaceRange.start+c+h.getNewLength()>=l.replaceRange.start)break;o.shift(),s.push(h),c+=h.getNewLength()-h.replaceRange.length}let u=c,d,p;for(;;){let h=o[0];if(!h||h.replaceRange.start+c>l.replaceRange.endExclusive)break;d||(d=h),p=h,o.shift(),c+=h.getNewLength()-h.replaceRange.length}if(!d)s.push(l.delta(-c));else{let h=Math.min(d.replaceRange.start,l.replaceRange.start-u),m=l.replaceRange.start-(d.replaceRange.start+u);if(m>0){let E=d.slice(Ia.emptyAt(h),new Ia(0,m));s.push(E)}if(!p)throw new Ga("Invariant violation: lastIntersecting is undefined");let g=p.replaceRange.endExclusive+c-l.replaceRange.endExclusive;if(g>0){let E=p.slice(Ia.ofStartAndLength(p.replaceRange.endExclusive,0),new Ia(p.getNewLength()-g,p.getNewLength()));o.unshift(E),c-=E.getNewLength()-E.replaceRange.length}let A=new Ia(h,l.replaceRange.endExclusive-c),y=l.slice(A,new Ia(0,l.getNewLength()));s.push(y)}}for(;;){let l=o.shift();if(!l)break;s.push(l)}return this._createNew(s).normalize()}decomposeSplit(e){let r=[],n=[],o=0;for(let s of this.replacements)e(s)?(r.push(s),o+=s.getNewLength()-s.replaceRange.length):n.push(s.slice(s.replaceRange.delta(o),new Ia(0,s.getNewLength())));return{e1:this._createNew(r),e2:this._createNew(n)}}getNewRanges(){let e=[],r=0;for(let n of this.replacements)e.push(Ia.ofStartAndLength(n.replaceRange.start+r,n.getNewLength())),r+=n.getLengthDelta();return e}getJoinedReplaceRange(){if(this.replacements.length!==0)return this.replacements[0].replaceRange.join(this.replacements.at(-1).replaceRange)}isEmpty(){return this.replacements.length===0}getLengthDelta(){return $ye(this.replacements,e=>e.getLengthDelta())}getNewDataLength(e){return e+this.getLengthDelta()}applyToOffset(e){let r=0;for(let n of this.replacements)if(n.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new Ia(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}},Ltn=class t extends m_e{static{a(this,"Edit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}_createNew(e){return new t(e)}};var DHe=class extends m_e{static{a(this,"BaseStringEdit")}get TReplacement(){throw new Error("TReplacement is not defined for BaseStringEdit")}static composeOrUndefined(e){if(e.length===0)return;let r=e[0];for(let n=1;n" ".repeat(l-c)),o=r.tryRebase(n);if(!o)return;let s=e.tryRebase(o);if(s)return{e1:o,e2:s}}apply(e){let r=[],n=0;for(let o of this.replacements)r.push(e.substring(n,o.replaceRange.start)),r.push(o.newText),n=o.replaceRange.endExclusive;return r.push(e.substring(n)),r.join("")}inverseOnSlice(e){let r=[],n=0;for(let o of this.replacements)r.push(Dm.replace(Ia.ofStartAndLength(o.replaceRange.start+n,o.newText.length),e(o.replaceRange.start,o.replaceRange.endExclusive))),n+=o.newText.length-o.replaceRange.length;return new Ey(r)}inverse(e){return this.inverseOnSlice((r,n)=>e.substring(r,n))}tryRebase(e,r=!0){let n=[],o=0,s=0,c=0;for(;s({txt:e.newText,pos:e.replaceRange.start,len:e.replaceRange.length}))}isNeutralOn(e){return this.replacements.every(r=>r.isNeutralOn(e))}removeCommonSuffixPrefix(e){let r=[];for(let n of this.replacements){let o=n.removeCommonSuffixPrefix(e);o.isEmpty||r.push(o)}return new Ey(r)}normalizeEOL(e){return new Ey(this.replacements.map(r=>r.normalizeEOL(e)))}normalizeOnSource(e){let r=this.apply(e),o=Dm.replace(Ia.ofLength(e.length),r).removeCommonSuffixAndPrefix(e);return o.isEmpty?Ey.empty:o.toEdit()}removeCommonSuffixAndPrefix(e){return this._createNew(this.replacements.map(r=>r.removeCommonSuffixAndPrefix(e))).normalize()}applyOnText(e){return new GO(this.apply(e.value))}mapData(e){return new aOt(this.replacements.map(r=>new Jie(r.replaceRange,r.newText,e(r))))}},MHe=class extends NHe{constructor(r,n){super(r);this.newText=n}static{a(this,"BaseStringReplacement")}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(r){return r.substring(0,this.replaceRange.start)+this.newText+r.substring(this.replaceRange.endExclusive)}isNeutralOn(r){return this.newText===r.substring(this.replaceRange.start,this.replaceRange.endExclusive)}removeCommonSuffixPrefix(r){let n=r.substring(this.replaceRange.start,this.replaceRange.endExclusive),o=nne(n,this.newText),s=Math.min(n.length-o,this.newText.length-o,Xye(n,this.newText)),c=new Ia(this.replaceRange.start+o,this.replaceRange.endExclusive-s),l=this.newText.substring(o,this.newText.length-s);return new Dm(c,l)}normalizeEOL(r){let n=this.newText.replace(/\r\n|\n/g,r);return new Dm(this.replaceRange,n)}removeCommonSuffixAndPrefix(r){return this.removeCommonSuffix(r).removeCommonPrefix(r)}removeCommonPrefix(r){let n=this.replaceRange.substring(r),o=nne(n,this.newText);return o===0?this:this.slice(this.replaceRange.deltaStart(o),new Ia(o,this.newText.length))}removeCommonSuffix(r){let n=this.replaceRange.substring(r),o=Xye(n,this.newText);return o===0?this:this.slice(this.replaceRange.deltaEnd(-o),new Ia(0,this.newText.length-o))}toEdit(){return new Ey([this])}},Ey=class t extends DHe{static{a(this,"StringEdit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r){return new t([new Dm(e,r)])}static insert(e,r){return new t([new Dm(Ia.emptyAt(e),r)])}static delete(e){return new t([new Dm(e,"")])}static fromJson(e){return new t(e.map(Dm.fromJson))}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;nnew Dm(e.replaceRange,e.newText)))}},Jie=class t extends MHe{constructor(r,n,o){super(r,n);this.data=o}static{a(this,"AnnotatedStringReplacement")}static insert(r,n,o){return new t(Ia.emptyAt(r),n,o)}static replace(r,n,o){return new t(r,n,o)}static delete(r,n){return new t(r,"",n)}equals(r){return this.replaceRange.equals(r.replaceRange)&&this.newText===r.newText&&this.data===r.data}tryJoinTouching(r){let n=this.data.join(r.data);if(n!==void 0)return new t(this.replaceRange.joinRightTouching(r.replaceRange),this.newText+r.newText,n)}slice(r,n){return new t(r,n?n.substring(this.newText):this.newText,this.data)}};f();var g_e=class t{constructor(e){this.replacements=e;cwt(()=>Zye(e,(r,n)=>r.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}static{a(this,"TextEdit")}static fromStringEdit(e,r){let n=e.replacements.map(o=>eA.fromStringReplacement(o,r));return new t(n)}static replace(e,r){return new t([new eA(e,r)])}static insert(e,r){return new t([new eA(ci.fromPositions(e,e),r)])}normalize(){let e=[];for(let r of this.replacements)if(e.length>0&&e[e.length-1].range.getEndPosition().equals(r.range.getStartPosition())){let n=e[e.length-1];e[e.length-1]=new eA(n.range.plusRange(r.range),n.text+r.text)}else r.isEmpty||e.push(r);return new t(e)}mapPosition(e){let r=0,n=0,o=0;for(let s of this.replacements){let c=s.range.getStartPosition();if(e.isBeforeOrEqual(c))break;let l=s.range.getEndPosition(),u=Hk.ofText(s.text);if(e.isBefore(l)){let d=new mo(c.lineNumber+r,c.column+(c.lineNumber+r===n?o:0)),p=u.addToPosition(d);return OHe(d,p)}c.lineNumber+r!==n&&(o=0),r+=u.lineCount-(s.range.endLineNumber-s.range.startLineNumber),u.lineCount===0?l.lineNumber!==c.lineNumber?o+=u.columnCount-(l.column-1):o+=u.columnCount-(l.column-c.column):o=u.columnCount,n=l.lineNumber+r}return new mo(e.lineNumber+r,e.column+(e.lineNumber+r===n?o:0))}mapRange(e){function r(c){return c instanceof mo?c:c.getStartPosition()}a(r,"getStart");function n(c){return c instanceof mo?c:c.getEndPosition()}a(n,"getEnd");let o=r(this.mapPosition(e.getStartPosition())),s=n(this.mapPosition(e.getEndPosition()));return OHe(o,s)}inverseMapPosition(e,r){return this.inverse(r).mapPosition(e)}inverseMapRange(e,r){return this.inverse(r).mapRange(e)}apply(e){let r="",n=new mo(1,1);for(let s of this.replacements){let c=s.range,l=c.getStartPosition(),u=c.getEndPosition(),d=OHe(n,l);d.isEmpty()||(r+=e.getValueOfRange(d)),r+=s.text,n=u}let o=OHe(n,e.endPositionExclusive);return o.isEmpty()||(r+=e.getValueOfRange(o)),r}applyToString(e){let r=new GO(e);return this.apply(r)}inverse(e){let r=this.getNewRanges();return new t(this.replacements.map((n,o)=>new eA(r[o],e.getValueOfRange(n.range))))}getNewRanges(){let e=[],r=0,n=0,o=0;for(let s of this.replacements){let c=Hk.ofText(s.text),l=mo.lift({lineNumber:s.range.startLineNumber+n,column:s.range.startColumn+(s.range.startLineNumber===r?o:0)}),u=c.createRange(l);e.push(u),n=u.endLineNumber-s.range.endLineNumber,o=u.endColumn-s.range.endColumn,r=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Ga;if(this.replacements.length===1)return this.replacements[0];let r=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition(),o="";for(let s=0;sr.equals(n))}toString(e){return e===void 0?this.replacements.map(r=>r.toString()).join(` -`):typeof e=="string"?this.toString(new GO(e)):this.replacements.length===0?"":this.replacements.map(r=>{let o=e.getValueOfRange(r.range),s=ci.fromPositions(new mo(Math.max(1,r.range.startLineNumber-1),1),r.range.getStartPosition()),c=e.getValueOfRange(s);c.length>10&&(c="..."+c.substring(c.length-10));let l=ci.fromPositions(r.range.getEndPosition(),new mo(r.range.endLineNumber+1,1)),u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let d=o;if(d.length>10){let h=Math.floor(5);d=d.substring(0,h)+"..."+d.substring(d.length-h)}let p=r.text;if(p.length>10){let h=Math.floor(5);p=p.substring(0,h)+"..."+p.substring(p.length-h)}return d.length===0?`${c}\u2770${p}\u2771${u}`:`${c}\u2770${d}\u21A6${p}\u2771${u}`}).join(` -`)}},eA=class t{constructor(e,r){this.range=e;this.text=r}static{a(this,"TextReplacement")}static joinReplacements(e,r){if(e.length===0)throw new Ga;if(e.length===1)return e[0];let n=e[0].range.getStartPosition(),o=e[e.length-1].range.getEndPosition(),s="";for(let c=0;c({type:"fileLocation",value:{uri:p.chunk.file,range:{start:{line:p.chunk.range.startLineNumber,character:p.chunk.range.startColumn},end:{line:p.chunk.range.endLineNumber,character:p.chunk.range.endColumn}}}})),d}prepareInvocation(e,r){return{progressMessage:`Searching ${this.getDisplaySearchTarget(e.input)} for "${e.input.query}"`}}getDisplaySearchTarget(e){let r;return e.scopedDirectories&&e.scopedDirectories.length===1?r=`${(0,Rrn.basename)(e.scopedDirectories[0])}`:e.scopedDirectories&&e.scopedDirectories.length>1?r=`${e.scopedDirectories.length} directories`:r="codebase",r}async isEnabled(e){try{return await hF(e.ctx)}catch(r){return yAo.error(e.ctx,"Error checking codebase tool availability:",r),!1}}getKeywordsForContent(e){let r=new Set;for(let n of e.matchAll(/(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g))r.add(n[0]);return Array.from(r.values(),n=>({keyword:n,variations:[]}))}};f();var MGe=class extends sl{static{a(this,"CreateFileTool")}constructor(){super({name:"create_file",displayName:"Create File",description:"Create a new file in the workspace with the specified content. Use this tool to create new files.",displayDescription:"Create a new file in the workspace.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to create."}),content:S.String({description:"The content to write to the new file."})})})}async invoke(e,r,n){try{let o=await this.invokeClientCreateFileTool(e,r,n);return this.getFinalCreateFileResult(e,r,o)}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new _r([new fr(s)],"error")}}async invokeClientCreateFileTool(e,r,n){let o=e.ctx.get(Io).getToolByNameAndProvider("create_file",Id);if(!o)throw new Error("Client tool create_file is not registered");return e.ctx.get(Io).invokeTool(e,o.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,content:r.input.content},roundId:r.roundId,toolCallId:r.toolCallId},n)}getFinalCreateFileResult(e,r,n){if(n.status!=="success")return n;let o=NP({uri:jl(r.input.filePath,e.uriSchemeCache),languageId:"UNKNOWN"}),s=_k(n.content),c=[];c.push(``),c.push("This is the new file that was created. You can reference this file in future operations.");let l=new vk({code:s,languageId:o,noFilePath:!0});return c.push(...l.renderAsArray()),c.push(""),new _r([new fr(c.join(` +`))],"success")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running create_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{progressMessage:`Creating ${_m(o)}`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(Cu),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran create_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{completionMessage:`Created ${_m(o)}`}}static toCreateFileParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.content!="string")throw new Error("content must be a string");return{filePath:e.filePath,content:e.content}}};f();f();f();function s$(){return yr()}a(s$,"uuidV4");f();var Ef={FILEPATH:"---FILEPATH",FIND:"---FIND",REPLACE:"---REPLACE",COMPLETE:"---COMPLETE"};function Drn(t){let e=[],r=[],n=[],o,s;for(let c of _Ao(t))switch(c.marker){case void 0:r=c.content;break;case Ef.FILEPATH:o=c.content.join(` +`).trim();break;case Ef.FIND:s=Prn(c.content);break;case Ef.REPLACE:if(o&&s){let l=Prn(c.content);e.push({filePath:o,find:s,replace:l})}o=void 0,s=void 0;break;case Ef.COMPLETE:n=c.content;break}return{patches:e,contentBefore:r,contentAfter:n}}a(Drn,"parsePatchResponse");function Prn(t){if(t.length===0)return[""];let e=[],r=!1,n=0,o=!1,s=/^(`{3,})/;for(let c of t){let l=c.match(s);if(l&&!r)n=l[1].length,r=!0;else if(r){let u=c.match(s);if(u&&u[1].length>=n){o=!0;break}e.push(c)}}return o?e:t}a(Prn,"extractCodeBlock");function*_Ao(t){let e=t.split(/\r?\n/),r,n=[];for(let o of e){let s;if(o.startsWith("---")){o.startsWith(Ef.FILEPATH)?s=Ef.FILEPATH:o.startsWith(Ef.FIND)?s=Ef.FIND:o.startsWith(Ef.REPLACE)?s=Ef.REPLACE:o.startsWith(Ef.COMPLETE)?s=Ef.COMPLETE:s=o,yield{marker:r,content:n},n=[o.substring(s.length)],r=s;continue}n.push(o)}yield{marker:r,content:n}}a(_Ao,"iterateSections");function CAo(t,e){let r=t.split(/\r?\n/),{find:n,replace:o}=e;if(n.length===0)return;let s=vAo(r,n);if(s===void 0)return;let{startIndex:c,endIndex:l,indentLevel:u,indentCharCount:d}=s,p="";if(d>0)for(let E=c;E<=l;E++){let _=r[E],v=u_e(_);if(v===d&&v<_.length){p=_.substring(0,d);break}}let h=!1;for(let E=c;E<=l&&!h;E++){let _=r[E];if(/^\s*\/\*|^\s*\*/.test(_))continue;let v=u_e(_);if(v>0&&v<_.length){h=_.substring(0,v).indexOf(" ")!==-1;break}}let m=TAo(o,u,p,h),g=r.slice(0,c),A=r.slice(l+1);return[...g,...m,...A].join(` +`)}a(CAo,"applyPatch");function vAo(t,e,r=4){if(e.length===0)return;let n=0;for(;n=0&&o>=r&&t.charCodeAt(n)===e.charCodeAt(o);)n--,o--;if(o>=r)return!1;for(;n>=0&&Nrn(t.charCodeAt(n));)n--;return n<0}a(krn,"endsWith");function bAo(t,e,r,n=4){let o=Number.MAX_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,c=0;for(let l=e;l<=r;l++){let u=t[l],{level:d,length:p}=Mrn(u,n),h=p;if(hs&&OGe(t[c-1]);)c--;if(s===c)return[];let l=Number.MAX_SAFE_INTEGER,u=[];for(let p=s;p0)if(m===l)y=r;else{let E=m-l;n?y=r+" ".repeat(E):y=r+" ".repeat(o*E)}else n?y=" ".repeat(A):y=" ".repeat(o*A);d.push(y+h.substring(g))}}return d}a(TAo,"adjustIndentation");function Orn(t,e){let r=t;for(let n of e){let o=CAo(r,n);o!==void 0&&(r=o)}return r}a(Orn,"applyPatches");f();var BGe=class extends Error{static{a(this,"CopilotEditsCancelledByUserException")}constructor(){super("Operation cancelled by user"),this.name="CopilotEditsCancelledByUserException"}};f();var $g=class extends Error{static{a(this,"CopilotEditsProcessCodeBlockException")}constructor(e){super(e),this.name="CopilotEditsProcessCodeBlockException"}};f();var a$=de(co());var uie=class extends Xt{static{a(this,"CodeMapperFullRewritePrompt")}renderCopilot(e,r){let{existingDocument:n,codeBlock:o,markdownBeforeBlock:s,inProgressRewriteContent:c}=this.props;if(n.status!=="valid")return vscpp(vscppf,null);let l=n.document,u=l.detectedLanguageId,d=l.getText(),p=l.lineCount,h=d.trim().length>0,m=mm(d),g=mm(o);return vscpp(vscppf,null,vscpp(a$.SystemMessage,{priority:1e3},"You are an AI programming assistant that is specialized in applying code changes to an existing document.",vscpp("br",null),"Follow Microsoft content policies.",vscpp("br",null),"Avoid content that violates copyrights.",vscpp("br",null),`If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."`,vscpp("br",null),"Keep your answers short and impersonal.",vscpp("br",null),"The user has a code block that represents a suggestion for a code change and a ",u," file opened in a code editor.",vscpp("br",null),"Rewrite the existing document to fully incorporate the code changes in the provided code block.",vscpp("br",null),"For the response, always follow these instructions:",vscpp("br",null),"1. Analyze the code block and the existing document to decide if the code block should replace existing code or should be inserted.",vscpp("br",null),"2. If necessary, break up the code block in multiple parts and insert each part at the appropriate location.",vscpp("br",null),"3. Preserve whitespace and newlines right after the parts of the file that you modify.",vscpp("br",null),"4. The final result must be syntactically valid, properly formatted, and correctly indented. It should not contain any ",Cm," comments.",vscpp("br",null),"5. Finally, provide the fully rewritten file. You must output the complete file.",vscpp("br",null)),vscpp(a$.UserMessage,{priority:700},h?vscpp(vscppf,null,"I have the following code open in the editor, starting from line 1 to line ",p,".",vscpp("br",null),vscpp(vscppf,null,m,u,vscpp("br",null),d,vscpp("br",null),m),vscpp("br",null)):vscpp(vscppf,null,"I am in an empty editor.",vscpp("br",null)),s&&vscpp(vscppf,null,"This is the description of what the code block changes:",vscpp("br",null),vscpp(Rn,{name:"changeDescription"},vscpp(vscppf,null,s)),vscpp("br",null)),"This is the code block that represents the suggested code change:",vscpp("br",null),vscpp(vscppf,null,g,u,vscpp("br",null),o,vscpp("br",null),g),vscpp("br",null),vscpp(Rn,{name:"userPrompt"},vscpp(vscppf,null,"Provide the fully rewritten file, incorporating the suggested code change. You must produce the complete file."))),c&&vscpp(vscppf,null,vscpp(a$.AssistantMessage,{priority:800},vscpp(vscppf,null,c)),vscpp(a$.UserMessage,{priority:900},vscpp(vscppf,null,"Please continue providing the next part of the response."))))}};f();var FGe=de(co());var S4t=class extends Xt{static{a(this,"PatchEditRules")}renderCopilot(){return vscpp(vscppf,null,"When proposing a code change, provide one or more modifications in the following format:",vscpp("br",null),"Each modification consist of three sections headed by `",Ef.FILEPATH,"`, `",Ef.FIND,"` and `",Ef.REPLACE,"`.",vscpp("br",null),"After ",Ef.FILEPATH," add the path to the file that needs to be changed.",vscpp("br",null),"After ",Ef.FIND," add a code block containing a section of the program that will be replaced.",vscpp("br",null),"Add multiple lines so that a find tool can find and identify a section of the program. Start and end with a line that will not be modified. ",vscpp("br",null),"Include all comments and empty lines exactly as they appear in the original source code. Do not abbreviate any line or summarize the code with `...`. ",vscpp("br",null),"After ",Ef.REPLACE," add a code block with the updated version of the original code in the find section. Maintain the same indentation and code style as in the original code.",vscpp("br",null),"After all modifications, add ",Ef.COMPLETE,".",vscpp("br",null))}},LGe=class extends Xt{static{a(this,"CodeMapperPatchRewritePrompt")}renderCopilot(e,r){let{existingDocument:n,codeBlock:o,markdownBeforeBlock:s}=this.props;if(n.status!=="valid")return vscpp(vscppf,null);let c=n.document,l=c.detectedLanguageId,u=c.getText(),d=c.lineCount,p=mm(u),h=mm(o),m=mo(this.props.uri);return vscpp(vscppf,null,vscpp(FGe.SystemMessage,{priority:1e3},"You are an AI programming assistant that is specialized in applying code changes to an existing document.",vscpp("br",null),"I have a code block that represents a suggestion for a code change and I have a ",l," ","file opened in a code editor.",vscpp("br",null),"I expect you to come up with code changes that apply the code block to the editor.",vscpp("br",null),"I want the changes to be applied in a way that is safe and does not break the existing code, is correctly indented and matching the code style.",vscpp("br",null),"For the response, always follow these instructions:",vscpp("br",null),"1. Analyze the code block, the content of the editor and the current selection to decide if the code block should replace existing code or is to be inserted.",vscpp("br",null),"2. A line comment with `",Cm,"` indicates a section of code that has not changed.",vscpp("br",null),"3. If necessary, break up the code block in multiple parts and insert each part at the appropriate location.",vscpp("br",null),"4. If necessary, make changes to other parts in the editor so that the final result is valid, properly formatted and indented.",vscpp("br",null),"5. Finally, provide the code modifications",vscpp("br",null),vscpp(S4t,null),vscpp("br",null),vscpp(Fqe,null),vscpp(Rn,{name:"example"},vscpp(Rn,{name:"user"},vscpp(vscppf,null,"I have the following code open in the editor.",vscpp("br",null),"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"```typescript",vscpp("br",null),"import ","{ readFileSync }"," from 'fs';",vscpp("br",null),vscpp("br",null),"class C ","{ }",vscpp("br",null),"```",vscpp("br",null),"This is the code block that represents a suggestion for a code change:",vscpp("br",null),"```typescript",vscpp("br",null),"private _stream: Stream;",vscpp("br",null),"```",vscpp("br",null),"Please find out how the code block can be applied to the editor.")),vscpp(Rn,{name:"assistant"},vscpp(vscppf,null,"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"---FIND",vscpp("br",null),"```",vscpp("br",null),"import { readFileSync } from 'fs';",vscpp("br",null),"```",vscpp("br",null),"---REPLACE",vscpp("br",null),"```",vscpp("br",null),"import { readFileSync } from 'fs';",vscpp("br",null),"import { Stream } from 'stream';",vscpp("br",null),"```",vscpp("br",null),"---FILEPATH \\someFolder\\myFile.ts",vscpp("br",null),"---FIND",vscpp("br",null),"```",vscpp("br",null),"class C ","{ }",vscpp("br",null),"```",vscpp("br",null),"---REPLACE",vscpp("br",null),"```",vscpp("br",null),'class C {"{"}',vscpp("br",null)," private _stream: Stream;",vscpp("br",null),"}",vscpp("br",null),"```",vscpp("br",null),"---COMPLETE"))),vscpp("br",null)),vscpp(FGe.UserMessage,{priority:700},"I have the following code open in the editor, starting from line 1 to line ",d,".",vscpp("br",null),m?`${Ef.FILEPATH} ${m}`:"",vscpp("br",null),vscpp(vscppf,null,p,l,vscpp("br",null),u,vscpp("br",null),p),vscpp("br",null),s&&vscpp(vscppf,null,"This is the description of what the code block changes:",vscpp("br",null),vscpp(Rn,{name:"changeDescription"},vscpp(vscppf,null,s)),vscpp("br",null)),"This is the code block that represents the suggested code change:",vscpp("br",null),vscpp(vscppf,null,h,l,vscpp("br",null),o,vscpp("br",null),h),vscpp("br",null),vscpp(Rn,{name:"userPrompt"},vscpp(vscppf,null,"Please find out how the code block can be applied to the editor. Provide the code changes in the format as described above."))))}};f();f();f();f();f();f();var _a=class t{constructor(e,r){this.start=e;this.endExclusive=r;if(e>r)throw new La(`Invalid range: ${this.toString()}`)}static{a(this,"OffsetRange")}static fromTo(e,r){return new t(e,r)}static addRange(e,r){let n=0;for(;nr))return new t(e,r)}static ofLength(e){return new t(0,e)}static ofStartAndLength(e,r){return new t(e,e+r)}static emptyAt(e){return new t(e,e)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new La(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new La(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}map(e){let r=[];for(let n=this.start;ne.startLineNumber,pre)}static subtract(e,r){return r?e.startLineNumberr)throw new La(`startLineNumber ${e} cannot be after endLineNumberExclusive ${r}`);this.startLineNumber=e,this.endLineNumberExclusive=r}contains(e){return this.startLineNumber<=e&&eo.endLineNumberExclusive>=e.startLineNumber),n=QH(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)this._normalizedRanges.splice(r,0,e);else if(r===n-1){let o=this._normalizedRanges[r];this._normalizedRanges[r]=o.join(e)}else{let o=this._normalizedRanges[r].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(r,n-r,o)}}contains(e){let r=twt(this._normalizedRanges,n=>n.startLineNumber<=e);return!!r&&r.endLineNumberExclusive>e}intersects(e){let r=twt(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let r=[],n=0,o=0,s=null;for(;n=c.startLineNumber?s=new Uc(s.startLineNumber,Math.max(s.endLineNumberExclusive,c.endLineNumberExclusive)):(r.push(s),s=c)}return s!==null&&r.push(s),new t(r)}subtractFrom(e){let r=B6e(this._normalizedRanges,c=>c.endLineNumberExclusive>=e.startLineNumber),n=QH(this._normalizedRanges,c=>c.startLineNumber<=e.endLineNumberExclusive)+1;if(r===n)return new t([e]);let o=[],s=e.startLineNumber;for(let c=r;cs&&o.push(new Uc(s,l.startLineNumber)),s=l.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let r=[],n=0,o=0;for(;nr.delta(e)))}};var kk=class t{constructor(e,r){this.lineCount=e;this.columnCount=r}static{a(this,"TextLength")}static{this.zero=new t(0,0)}static lengthDiffNonNegative(e,r){return r.isLessThan(e)?t.zero:e.lineCount===r.lineCount?new t(0,r.columnCount-e.columnCount):new t(r.lineCount-e.lineCount,r.columnCount)}static betweenPositions(e,r){return e.lineNumber===r.lineNumber?new t(0,r.column-e.column):new t(r.lineNumber-e.lineNumber,r.column-1)}static fromPosition(e){return new t(e.lineNumber-1,e.column-1)}static ofRange(e){return t.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let r=0,n=0;for(let o of e)o===` +`?(r++,n=0):n++;return new t(r,n)}isZero(){return this.lineCount===0&&this.columnCount===0}isLessThan(e){return this.lineCount!==e.lineCount?this.lineCounte.lineCount:this.columnCount>e.columnCount}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}equals(e){return this.lineCount===e.lineCount&&this.columnCount===e.columnCount}compare(e){return this.lineCount!==e.lineCount?this.lineCount-e.lineCount:this.columnCount-e.columnCount}add(e){return e.lineCount===0?new t(this.lineCount,this.columnCount+e.columnCount):new t(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new ai(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new ai(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new ai(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return Uc.ofLength(1,this.lineCount)}addToPosition(e){return this.lineCount===0?new uo(e.lineNumber,e.column+this.columnCount):new uo(e.lineNumber+this.lineCount,this.columnCount+1)}addToRange(e){return ai.fromPositions(this.addToPosition(e.getStartPosition()),this.addToPosition(e.getEndPosition()))}toString(){return`${this.lineCount},${this.columnCount}`}};var d_e=class{constructor(e){this.text=e;this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let r=0;r0&&e.charAt(r-1)==="\r"?this.lineEndOffsetByLineIdx.push(r-1):this.lineEndOffsetByLineIdx.push(r));this.lineEndOffsetByLineIdx.push(e.length)}static{a(this,"PositionOffsetTransformer")}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}getOffsetRange(e){return new _a(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getPosition(e){let r=QH(this.lineStartOffsetByLineIdx,s=>s<=e),n=r+1,o=e-this.lineStartOffsetByLineIdx[r]+1;return new uo(n,o)}getRange(e){return ai.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getTextLength(e){return kk.ofRange(this.getRange(e))}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new kk(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}};var I4t=class{constructor(){this._transformer=void 0}static{a(this,"AbstractText")}get endPositionExclusive(){return this.length.addToPosition(new uo(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getLineLength(e){return this.getValueOfRange(new ai(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new d_e(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new ai(e,1,e,Number.MAX_SAFE_INTEGER))}getLines(){let e=this.getValue();return J6e(e)}equals(e){return this===e?!0:this.getValue()===e.getValue()}};var T4=class extends I4t{constructor(r){super();this.value=r;this._t=new d_e(this.value)}static{a(this,"StringText")}getValueOfRange(r){return this._t.getOffsetRange(r).substring(this.value)}get length(){return this._t.textLength}};f();f();f();var f_e=class{constructor(e){this.replacements=e;let r=-1;for(let n of e){if(!(n.replaceRange.start>=r))throw new La(`Edits must be disjoint and sorted. Found ${n} after ${r}`);r=n.replaceRange.endExclusive}}static{a(this,"BaseEdit")}equals(e){if(this.replacements.length!==e.replacements.length)return!1;for(let r=0;rr.toString()).join(", ")}]`}normalize(){let e=[],r;for(let n of this.replacements)if(!(n.getNewLength()===0&&n.replaceRange.length===0)){if(r&&r.replaceRange.endExclusive===n.replaceRange.start){let o=r.tryJoinTouching(n);if(o){r=o;continue}}r&&e.push(r),r=n}return r&&e.push(r),this._createNew(e)}compose(e){let r=this.normalize(),n=e.normalize();if(r.isEmpty())return n;if(n.isEmpty())return r;let o=[...r.replacements],s=[],c=0;for(let l of n.replacements){for(;;){let h=o[0];if(!h||h.replaceRange.start+c+h.getNewLength()>=l.replaceRange.start)break;o.shift(),s.push(h),c+=h.getNewLength()-h.replaceRange.length}let u=c,d,p;for(;;){let h=o[0];if(!h||h.replaceRange.start+c>l.replaceRange.endExclusive)break;d||(d=h),p=h,o.shift(),c+=h.getNewLength()-h.replaceRange.length}if(!d)s.push(l.delta(-c));else{let h=Math.min(d.replaceRange.start,l.replaceRange.start-u),m=l.replaceRange.start-(d.replaceRange.start+u);if(m>0){let E=d.slice(_a.emptyAt(h),new _a(0,m));s.push(E)}if(!p)throw new La("Invariant violation: lastIntersecting is undefined");let g=p.replaceRange.endExclusive+c-l.replaceRange.endExclusive;if(g>0){let E=p.slice(_a.ofStartAndLength(p.replaceRange.endExclusive,0),new _a(p.getNewLength()-g,p.getNewLength()));o.unshift(E),c-=E.getNewLength()-E.replaceRange.length}let A=new _a(h,l.replaceRange.endExclusive-c),y=l.slice(A,new _a(0,l.getNewLength()));s.push(y)}}for(;;){let l=o.shift();if(!l)break;s.push(l)}return this._createNew(s).normalize()}decomposeSplit(e){let r=[],n=[],o=0;for(let s of this.replacements)e(s)?(r.push(s),o+=s.getNewLength()-s.replaceRange.length):n.push(s.slice(s.replaceRange.delta(o),new _a(0,s.getNewLength())));return{e1:this._createNew(r),e2:this._createNew(n)}}getNewRanges(){let e=[],r=0;for(let n of this.replacements)e.push(_a.ofStartAndLength(n.replaceRange.start+r,n.getNewLength())),r+=n.getLengthDelta();return e}getJoinedReplaceRange(){if(this.replacements.length!==0)return this.replacements[0].replaceRange.join(this.replacements.at(-1).replaceRange)}isEmpty(){return this.replacements.length===0}getLengthDelta(){return HAe(this.replacements,e=>e.getLengthDelta())}getNewDataLength(e){return e+this.getLengthDelta()}applyToOffset(e){let r=0;for(let n of this.replacements)if(n.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new _a(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}},Brn=class t extends f_e{static{a(this,"Edit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}_createNew(e){return new t(e)}};var qGe=class extends f_e{static{a(this,"BaseStringEdit")}get TReplacement(){throw new Error("TReplacement is not defined for BaseStringEdit")}static composeOrUndefined(e){if(e.length===0)return;let r=e[0];for(let n=1;n" ".repeat(l-c)),o=r.tryRebase(n);if(!o)return;let s=e.tryRebase(o);if(s)return{e1:o,e2:s}}apply(e){let r=[],n=0;for(let o of this.replacements)r.push(e.substring(n,o.replaceRange.start)),r.push(o.newText),n=o.replaceRange.endExclusive;return r.push(e.substring(n)),r.join("")}inverseOnSlice(e){let r=[],n=0;for(let o of this.replacements)r.push(bm.replace(_a.ofStartAndLength(o.replaceRange.start+n,o.newText.length),e(o.replaceRange.start,o.replaceRange.endExclusive))),n+=o.newText.length-o.replaceRange.length;return new uy(r)}inverse(e){return this.inverseOnSlice((r,n)=>e.substring(r,n))}tryRebase(e,r=!0){let n=[],o=0,s=0,c=0;for(;s({txt:e.newText,pos:e.replaceRange.start,len:e.replaceRange.length}))}isNeutralOn(e){return this.replacements.every(r=>r.isNeutralOn(e))}removeCommonSuffixPrefix(e){let r=[];for(let n of this.replacements){let o=n.removeCommonSuffixPrefix(e);o.isEmpty||r.push(o)}return new uy(r)}normalizeEOL(e){return new uy(this.replacements.map(r=>r.normalizeEOL(e)))}normalizeOnSource(e){let r=this.apply(e),o=bm.replace(_a.ofLength(e.length),r).removeCommonSuffixAndPrefix(e);return o.isEmpty?uy.empty:o.toEdit()}removeCommonSuffixAndPrefix(e){return this._createNew(this.replacements.map(r=>r.removeCommonSuffixAndPrefix(e))).normalize()}applyOnText(e){return new T4(this.apply(e.value))}mapData(e){return new x4t(this.replacements.map(r=>new die(r.replaceRange,r.newText,e(r))))}},GGe=class extends QGe{constructor(r,n){super(r);this.newText=n}static{a(this,"BaseStringReplacement")}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(r){return r.substring(0,this.replaceRange.start)+this.newText+r.substring(this.replaceRange.endExclusive)}isNeutralOn(r){return this.newText===r.substring(this.replaceRange.start,this.replaceRange.endExclusive)}removeCommonSuffixPrefix(r){let n=r.substring(this.replaceRange.start,this.replaceRange.endExclusive),o=gre(n,this.newText),s=Math.min(n.length-o,this.newText.length-o,KAe(n,this.newText)),c=new _a(this.replaceRange.start+o,this.replaceRange.endExclusive-s),l=this.newText.substring(o,this.newText.length-s);return new bm(c,l)}normalizeEOL(r){let n=this.newText.replace(/\r\n|\n/g,r);return new bm(this.replaceRange,n)}removeCommonSuffixAndPrefix(r){return this.removeCommonSuffix(r).removeCommonPrefix(r)}removeCommonPrefix(r){let n=this.replaceRange.substring(r),o=gre(n,this.newText);return o===0?this:this.slice(this.replaceRange.deltaStart(o),new _a(o,this.newText.length))}removeCommonSuffix(r){let n=this.replaceRange.substring(r),o=KAe(n,this.newText);return o===0?this:this.slice(this.replaceRange.deltaEnd(-o),new _a(0,this.newText.length-o))}toEdit(){return new uy([this])}},uy=class t extends qGe{static{a(this,"StringEdit")}static{this.empty=new t([])}static create(e){return new t(e)}static single(e){return new t([e])}static replace(e,r){return new t([new bm(e,r)])}static insert(e,r){return new t([new bm(_a.emptyAt(e),r)])}static delete(e){return new t([new bm(e,"")])}static fromJson(e){return new t(e.map(bm.fromJson))}static compose(e){if(e.length===0)return t.empty;let r=e[0];for(let n=1;nnew bm(e.replaceRange,e.newText)))}},die=class t extends GGe{constructor(r,n,o){super(r,n);this.data=o}static{a(this,"AnnotatedStringReplacement")}static insert(r,n,o){return new t(_a.emptyAt(r),n,o)}static replace(r,n,o){return new t(r,n,o)}static delete(r,n){return new t(r,"",n)}equals(r){return this.replaceRange.equals(r.replaceRange)&&this.newText===r.newText&&this.data===r.data}tryJoinTouching(r){let n=this.data.join(r.data);if(n!==void 0)return new t(this.replaceRange.joinRightTouching(r.replaceRange),this.newText+r.newText,n)}slice(r,n){return new t(r,n?n.substring(this.newText):this.newText,this.data)}};f();var p_e=class t{constructor(e){this.replacements=e;wwt(()=>JAe(e,(r,n)=>r.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}static{a(this,"TextEdit")}static fromStringEdit(e,r){let n=e.replacements.map(o=>Vg.fromStringReplacement(o,r));return new t(n)}static replace(e,r){return new t([new Vg(e,r)])}static insert(e,r){return new t([new Vg(ai.fromPositions(e,e),r)])}normalize(){let e=[];for(let r of this.replacements)if(e.length>0&&e[e.length-1].range.getEndPosition().equals(r.range.getStartPosition())){let n=e[e.length-1];e[e.length-1]=new Vg(n.range.plusRange(r.range),n.text+r.text)}else r.isEmpty||e.push(r);return new t(e)}mapPosition(e){let r=0,n=0,o=0;for(let s of this.replacements){let c=s.range.getStartPosition();if(e.isBeforeOrEqual(c))break;let l=s.range.getEndPosition(),u=kk.ofText(s.text);if(e.isBefore(l)){let d=new uo(c.lineNumber+r,c.column+(c.lineNumber+r===n?o:0)),p=u.addToPosition(d);return HGe(d,p)}c.lineNumber+r!==n&&(o=0),r+=u.lineCount-(s.range.endLineNumber-s.range.startLineNumber),u.lineCount===0?l.lineNumber!==c.lineNumber?o+=u.columnCount-(l.column-1):o+=u.columnCount-(l.column-c.column):o=u.columnCount,n=l.lineNumber+r}return new uo(e.lineNumber+r,e.column+(e.lineNumber+r===n?o:0))}mapRange(e){function r(c){return c instanceof uo?c:c.getStartPosition()}a(r,"getStart");function n(c){return c instanceof uo?c:c.getEndPosition()}a(n,"getEnd");let o=r(this.mapPosition(e.getStartPosition())),s=n(this.mapPosition(e.getEndPosition()));return HGe(o,s)}inverseMapPosition(e,r){return this.inverse(r).mapPosition(e)}inverseMapRange(e,r){return this.inverse(r).mapRange(e)}apply(e){let r="",n=new uo(1,1);for(let s of this.replacements){let c=s.range,l=c.getStartPosition(),u=c.getEndPosition(),d=HGe(n,l);d.isEmpty()||(r+=e.getValueOfRange(d)),r+=s.text,n=u}let o=HGe(n,e.endPositionExclusive);return o.isEmpty()||(r+=e.getValueOfRange(o)),r}applyToString(e){let r=new T4(e);return this.apply(r)}inverse(e){let r=this.getNewRanges();return new t(this.replacements.map((n,o)=>new Vg(r[o],e.getValueOfRange(n.range))))}getNewRanges(){let e=[],r=0,n=0,o=0;for(let s of this.replacements){let c=kk.ofText(s.text),l=uo.lift({lineNumber:s.range.startLineNumber+n,column:s.range.startColumn+(s.range.startLineNumber===r?o:0)}),u=c.createRange(l);e.push(u),n=u.endLineNumber-s.range.endLineNumber,o=u.endColumn-s.range.endColumn,r=s.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new La;if(this.replacements.length===1)return this.replacements[0];let r=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition(),o="";for(let s=0;sr.equals(n))}toString(e){return e===void 0?this.replacements.map(r=>r.toString()).join(` +`):typeof e=="string"?this.toString(new T4(e)):this.replacements.length===0?"":this.replacements.map(r=>{let o=e.getValueOfRange(r.range),s=ai.fromPositions(new uo(Math.max(1,r.range.startLineNumber-1),1),r.range.getStartPosition()),c=e.getValueOfRange(s);c.length>10&&(c="..."+c.substring(c.length-10));let l=ai.fromPositions(r.range.getEndPosition(),new uo(r.range.endLineNumber+1,1)),u=e.getValueOfRange(l);u.length>10&&(u=u.substring(0,10)+"...");let d=o;if(d.length>10){let h=Math.floor(5);d=d.substring(0,h)+"..."+d.substring(d.length-h)}let p=r.text;if(p.length>10){let h=Math.floor(5);p=p.substring(0,h)+"..."+p.substring(p.length-h)}return d.length===0?`${c}\u2770${p}\u2771${u}`:`${c}\u2770${d}\u21A6${p}\u2771${u}`}).join(` +`)}},Vg=class t{constructor(e,r){this.range=e;this.text=r}static{a(this,"TextReplacement")}static joinReplacements(e,r){if(e.length===0)throw new La;if(e.length===1)return e[0];let n=e[0].range.getStartPosition(),o=e[e.length-1].range.getEndPosition(),s="";for(let c=0;cr.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}static{a(this,"LineEdit")}static{this.empty=new t([])}static deserialize(e){return new t(e.map(r=>Xie.deserialize(r)))}static fromEdit(e,r){let n=g_e.fromStringEdit(e,r);return t.fromTextEdit(n,r)}static fromTextEdit(e,r){let n=e.replacements,o=[],s=[];for(let c=0;cn.lineRange.startLineNumber,ene)),new t(r)}isEmpty(){return this.replacements.length===0}toEdit(e){let r=[];for(let n of this.replacements){let o=n.toSingleEdit(e);r.push(o)}return new Ey(r)}toString(){return this.replacements.map(e=>e.toString()).join(",")}serialize(){return this.replacements.map(e=>e.serialize())}getNewLineRanges(){let e=[],r=0;for(let n of this.replacements)e.push(Vc.ofLength(n.lineRange.startLineNumber+r,n.newLines.length)),r+=n.newLines.length-n.lineRange.length;return e}mapLineNumber(e){let r=0;for(let n of this.replacements){if(n.lineRange.endLineNumberExclusive>e)break;r+=n.newLines.length-n.lineRange.length}return e+r}mapLineRange(e){return new Vc(this.mapLineNumber(e.startLineNumber),this.mapLineNumber(e.endLineNumberExclusive))}mapBackLineRange(e,r){return this.inverse(r).mapLineRange(e)}touches(e){return this.replacements.some(r=>e.replacements.some(n=>r.lineRange.intersect(n.lineRange)))}rebase(e){return new t(this.replacements.map(r=>new Xie(e.mapLineRange(r.lineRange),r.newLines)))}humanReadablePatch(e){let r=[];function n(l,u,d,p){let h=d==="unmodified"?" ":d==="deleted"?"-":"+";p===void 0&&(p="[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]");let m=l===-1?" ":l.toString().padStart(3," "),g=u===-1?" ":u.toString().padStart(3," ");r.push(`${h} ${m} ${g} ${p}`)}a(n,"pushLine");function o(){r.push("---")}a(o,"pushSeperator");let s=0,c=!0;for(let l of Uxt(this.replacements,(u,d)=>u.lineRange.distanceToRange(d.lineRange)<=5)){c?c=!1:o();let u=l[0].lineRange.startLineNumber-2;for(let d of l){for(let m=Math.max(1,u);mg)){let g=e[m-1];n(m,-1,"deleted",g)}for(let m=0;mnew Xie(r[o],e.slice(n.lineRange.startLineNumber-1,n.lineRange.endLineNumberExclusive-1))))}},Xie=class t{constructor(e,r){this.lineRange=e;this.newLines=r}static{a(this,"LineReplacement")}static deserialize(e){return new t(Vc.ofLength(e[0],e[1]-e[0]),e[2])}static fromSingleTextEdit(e,r){let n=HFe(e.text),o=e.range.startLineNumber,s=r.getValueOfRange(ci.fromPositions(new mo(e.range.startLineNumber,1),e.range.getStartPosition()));n[0]=s+n[0];let c=e.range.endLineNumber+1,l=r.getTransformer().getLineLength(e.range.endLineNumber)+1,u=r.getValueOfRange(ci.fromPositions(e.range.getEndPosition(),new mo(e.range.endLineNumber,l)));n[n.length-1]=n[n.length-1]+u;let d=e.range.startColumn===r.getTransformer().getLineLength(e.range.startLineNumber)+1,p=e.range.endColumn===1;return d&&n[0].length===s.length&&(o++,n.shift()),n.length>0&&o1){let s=this.lineRange.startLineNumber-1,c=e.getTransformer().getLineLength(s)+1;n=new mo(s,c)}else n=new mo(1,1);let o=r.addToPosition(new mo(1,1));return new eA(ci.fromPositions(n,o),"")}else return new eA(new ci(this.lineRange.startLineNumber,1,this.lineRange.endLineNumberExclusive,1),"")}else if(this.lineRange.isEmpty){let r,n,o,s=this.lineRange.startLineNumber;return s===e.getTransformer().textLength.lineCount+2?(r=s-1,n=e.getTransformer().getLineLength(r)+1,o=this.newLines.map(c=>` +`),o=gre(r,n);r=r.substring(o),n=n.substring(o);let s=KAe(r,n);return r=r.substring(0,r.length-s),n=n.substring(0,n.length-s),r===""}};function HGe(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return ai.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new La("start must be before end");return new ai(t.lineNumber,t.column,e.lineNumber,e.column)}a(HGe,"rangeFromPositions");var h_e=class t{constructor(e){this.replacements=e;HH(JAe(e,(r,n)=>r.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}static{a(this,"LineEdit")}static{this.empty=new t([])}static deserialize(e){return new t(e.map(r=>fie.deserialize(r)))}static fromEdit(e,r){let n=p_e.fromStringEdit(e,r);return t.fromTextEdit(n,r)}static fromTextEdit(e,r){let n=e.replacements,o=[],s=[];for(let c=0;cn.lineRange.startLineNumber,pre)),new t(r)}isEmpty(){return this.replacements.length===0}toEdit(e){let r=[];for(let n of this.replacements){let o=n.toSingleEdit(e);r.push(o)}return new uy(r)}toString(){return this.replacements.map(e=>e.toString()).join(",")}serialize(){return this.replacements.map(e=>e.serialize())}getNewLineRanges(){let e=[],r=0;for(let n of this.replacements)e.push(Uc.ofLength(n.lineRange.startLineNumber+r,n.newLines.length)),r+=n.newLines.length-n.lineRange.length;return e}mapLineNumber(e){let r=0;for(let n of this.replacements){if(n.lineRange.endLineNumberExclusive>e)break;r+=n.newLines.length-n.lineRange.length}return e+r}mapLineRange(e){return new Uc(this.mapLineNumber(e.startLineNumber),this.mapLineNumber(e.endLineNumberExclusive))}mapBackLineRange(e,r){return this.inverse(r).mapLineRange(e)}touches(e){return this.replacements.some(r=>e.replacements.some(n=>r.lineRange.intersect(n.lineRange)))}rebase(e){return new t(this.replacements.map(r=>new fie(e.mapLineRange(r.lineRange),r.newLines)))}humanReadablePatch(e){let r=[];function n(l,u,d,p){let h=d==="unmodified"?" ":d==="deleted"?"-":"+";p===void 0&&(p="[[[[[ WARNING: LINE DOES NOT EXIST ]]]]]");let m=l===-1?" ":l.toString().padStart(3," "),g=u===-1?" ":u.toString().padStart(3," ");r.push(`${h} ${m} ${g} ${p}`)}a(n,"pushLine");function o(){r.push("---")}a(o,"pushSeperator");let s=0,c=!0;for(let l of owt(this.replacements,(u,d)=>u.lineRange.distanceToRange(d.lineRange)<=5)){c?c=!1:o();let u=l[0].lineRange.startLineNumber-2;for(let d of l){for(let m=Math.max(1,u);mg)){let g=e[m-1];n(m,-1,"deleted",g)}for(let m=0;mnew fie(r[o],e.slice(n.lineRange.startLineNumber-1,n.lineRange.endLineNumberExclusive-1))))}},fie=class t{constructor(e,r){this.lineRange=e;this.newLines=r}static{a(this,"LineReplacement")}static deserialize(e){return new t(Uc.ofLength(e[0],e[1]-e[0]),e[2])}static fromSingleTextEdit(e,r){let n=J6e(e.text),o=e.range.startLineNumber,s=r.getValueOfRange(ai.fromPositions(new uo(e.range.startLineNumber,1),e.range.getStartPosition()));n[0]=s+n[0];let c=e.range.endLineNumber+1,l=r.getTransformer().getLineLength(e.range.endLineNumber)+1,u=r.getValueOfRange(ai.fromPositions(e.range.getEndPosition(),new uo(e.range.endLineNumber,l)));n[n.length-1]=n[n.length-1]+u;let d=e.range.startColumn===r.getTransformer().getLineLength(e.range.startLineNumber)+1,p=e.range.endColumn===1;return d&&n[0].length===s.length&&(o++,n.shift()),n.length>0&&o1){let s=this.lineRange.startLineNumber-1,c=e.getTransformer().getLineLength(s)+1;n=new uo(s,c)}else n=new uo(1,1);let o=r.addToPosition(new uo(1,1));return new Vg(ai.fromPositions(n,o),"")}else return new Vg(new ai(this.lineRange.startLineNumber,1,this.lineRange.endLineNumberExclusive,1),"")}else if(this.lineRange.isEmpty){let r,n,o,s=this.lineRange.startLineNumber;return s===e.getTransformer().textLength.lineCount+2?(r=s-1,n=e.getTransformer().getLineLength(r)+1,o=this.newLines.map(c=>` `+c).join("")):(r=s,n=1,o=this.newLines.map(c=>c+` -`).join("")),new eA(ci.fromPositions(new mo(r,n)),o)}else{let r=this.lineRange.endLineNumberExclusive-1,n=e.getTransformer().getLineLength(r)+1,o=new ci(this.lineRange.startLineNumber,1,r,n),s=this.newLines.join(` -`);return new eA(o,s)}}toSingleEdit(e){let r=this.toSingleTextEdit(e),n=e.getTransformer().getOffsetRange(r.range);return new Dm(n,r.text)}toString(){return`${this.lineRange}->${JSON.stringify(this.newLines)}`}serialize(){return[this.lineRange.startLineNumber,this.lineRange.endLineNumberExclusive,this.newLines]}removeCommonSuffixPrefixLines(e){let r=this.lineRange.startLineNumber,n=this.lineRange.endLineNumberExclusive,o=0;for(;r{function t(r){return Array.isArray(r)&&r.length===3&&typeof r[0]=="number"&&typeof r[1]=="number"&&Array.isArray(r[2])&&r[2].every(n=>typeof n=="string")}e.is=t,a(t,"is")})(Tmo||={});var Zie=class{constructor(e,r){this.originalText=e;this._trackedEdit=r;let n=r.removeCommonSuffixPrefix(e);this._updatedTrackedEdit=n.mapData(()=>new BHe(!0))}static{a(this,"ArcTracker")}handleEdits(e){let r=e.mapData(s=>new BHe(!1)),o=this._updatedTrackedEdit.compose(r).decomposeSplit(s=>!s.data.isTrackedEdit).e2;this._updatedTrackedEdit=o}getTrackedEdit(){return this._updatedTrackedEdit.toStringEdit()}getAcceptedRetainedCharactersCount(){return Ftn(this._updatedTrackedEdit.replacements,r=>r.getNewLength())}getOriginalCharacterCount(){return Ftn(this._trackedEdit.replacements,e=>e.getNewLength())}getTrackedEditLineMetrics(){let e=this.getTrackedEdit();if(!e)return{deletedLineCounts:0,insertedLineCounts:0};let r=A_e.fromEdit(e,new GO(this.originalText)),n=$ye(r.replacements,s=>s.lineRange.length),o=$ye(r.getNewLineRanges(),s=>s.length);return{deletedLineCounts:n,insertedLineCounts:o}}getDebugState(){return{edits:this._updatedTrackedEdit.replacements.map(e=>({range:e.replaceRange.toString(),newText:e.newText,isTrackedEdit:e.data.isTrackedEdit}))}}},BHe=class{constructor(e){this.isTrackedEdit=e}static{a(this,"IsTrackedEditData")}join(e){if(this.isTrackedEdit===e.isTrackedEdit)return this}};function Ftn(t,e){let r=0;for(let n of t)r+=e(n);return r}a(Ftn,"sum");f();var eoe=class{constructor(e,r){this.originalText=e;this._combinedEditsSinceStart=Ey.empty;this._debugLog=[];this._text=r.apply(this.originalText),this._textAfterTrackedEdits=this._text,this._originalEdits=r,this._debugLog.push(`[INIT] Original: "${this.originalText}"`),this._debugLog.push(`[INIT] TrackedEdits(${r.replacements.length}): ${this._formatEditsCompact(r,this.originalText)}`),this._debugLog.push(`[INIT] Result: "${this._text}"`),this._debugLog.push("")}static{a(this,"EditSurvivalTracker")}_formatEditsCompact(e,r){return e.replacements.length===0?"[]":e.replacements.map(n=>{let o=r.substring(n.replaceRange.start,n.replaceRange.endExclusive);return`[${n.replaceRange.start}:${n.replaceRange.endExclusive}]"${o}"->"${n.newText}"`}).join(", ")}handleEdits(e){let r=this._text,n=e.apply(this._text),o=this._combinedEditsSinceStart.compose(e);o=o.removeCommonSuffixPrefix(this._textAfterTrackedEdits),this._combinedEditsSinceStart=o,this._text=n,this._debugLog.push(`[EDIT] Input(${e.replacements.length}): ${this._formatEditsCompact(e,r)} -> "${n}"`),this._debugLog.push(`[EDIT] Accumulated(${this._combinedEditsSinceStart.replacements.length}): ${this._formatEditsCompact(this._combinedEditsSinceStart,this._textAfterTrackedEdits)}`)}getCurrentText(){return this._text}getTextAfterMarkedEdits(){return this._textAfterTrackedEdits}getOriginalText(){return this.originalText}getDebugLog(){return this._debugLog.join(` -`)}computeTrackedEditsSurvivalScore(){this._debugLog.push(`[CALC] Current: "${this._text}" | Original: "${this.originalText}"`);let e=0,r=0,n=0,o=0,s=this._originalEdits.getNewRanges(),c=Smo(s,this._combinedEditsSinceStart);this._debugLog.push(`[CALC] Processing ${s.length} edits:`);for(let d=0;d"${m}"->"${A}" | 4gram:${y.toFixed(2)} noRevert:(${E.toFixed(2)},${_.toFixed(2)})`),E!==1){let v=1-Math.max(_-E,0)/(1-E);n+=p.replaceRange.length*v,o+=p.replaceRange.length}e+=p.newText.length*y,r+=p.newText.length}let l=r===0?1:e/r,u=o===0?1:n/o;return this._debugLog.push(`[RESULT] fourGram: ${l.toFixed(3)} (${e.toFixed(1)}/${r.toFixed(1)}) | noRevert: ${u.toFixed(3)} (${n.toFixed(1)}/${o.toFixed(1)})`),{fourGram:l,noRevert:u}}};function cOt(t,e){if(t.length<4||e.length<4)return t===e?1:0;let n=new Map;for(let l=0;l<=t.length-4;l++){let u=t.substring(l,l+4),d=n.get(u)||0;n.set(u,d+1)}for(let l=0;l<=e.length-4;l++){let u=e.substring(l,l+4),d=n.get(u)||0;n.set(u,d-1)}let o=t.length-4+1+e.length-4+1,s=0;for(let l of n.values())s+=Math.abs(l);return(o-s)/o}a(cOt,"compute4GramTextSimilarity");function Smo(t,e){t=t.slice();let r=[],n=0;for(let o of e.replacements){for(;;){let c=t[0];if(!c||c.endExclusive>=o.replaceRange.start)break;t.shift(),r.push(c.delta(n))}let s=[];for(;;){let c=t[0];if(!c||!c.intersectsOrTouches(o.replaceRange))break;t.shift(),s.push(c)}for(let c=s.length-1;c>=0;c--){let l=s[c],u=l.intersect(o.replaceRange).length;l=l.deltaEnd(-u+(c===0?o.newText.length:0));let d=l.start-o.replaceRange.start;d>0&&(l=l.delta(-d)),c!==0&&(l=l.delta(o.newText.length)),l=l.delta(-(o.newText.length-o.replaceRange.length)),t.unshift(l)}n+=o.newText.length-o.replaceRange.length}for(;;){let o=t[0];if(!o)break;t.shift(),r.push(o.delta(n))}return r}a(Smo,"applyEditsToRanges");f();f();var y_e=class{static{a(this,"OffsetLineColumnConverter")}get lines(){return this._lineStartOffsets.length}constructor(e){this._lineStartOffsets=[0];let r=0;for(;re);r++);let n=e-this._lineStartOffsets[r-1];return new mo(r,n+1)}startOffsetOfLineContaining(e){let r=1;for(;re);r++);return this._lineStartOffsets[r-1]}positionToOffset(e){return e.lineNumber>=this._lineStartOffsets.length?this._lineStartOffsets[this._lineStartOffsets.length-1]+e.column-1:this._lineStartOffsets[e.lineNumber-1]+e.column-1}};async function LHe(t,e,r,n=5e3){let o=await r.computeDiff(t,e,{maxComputationTimeMs:n,computeMoves:!1,ignoreTrimWhitespace:!1}),s=new y_e(t),c=new y_e(e),l=[];for(let u of o.changes)for(let d of u.innerChanges??[]){let p=c.positionToOffset(d.modifiedRange.getStartPosition()),h=c.positionToOffset(d.modifiedRange.getEndPosition()),m=e.substring(p,h),g=s.positionToOffset(d.originalRange.getStartPosition()),A=s.positionToOffset(d.originalRange.getEndPosition()),y=new Ia(g,A);l.push(new Dm(y,m))}return new Ey(l)}a(LHe,"stringEditFromDiff");f();f();var Utn=require("worker_threads");var lOt=class{constructor(){this.nextId=1;this.handlers=new Map}static{a(this,"RpcResponseHandler")}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};function Imo(t){let e={get:a((r,n)=>(typeof n=="string"&&!r[n]&&(r[n]=(...o)=>t(n,o)),r[n]),"get")};return new Proxy(Object.create(null),e)}a(Imo,"createRpcProxy");var FHe=class{constructor(e,r,n){this.responseHandler=new lOt;this.worker=new Utn.Worker(e,r),this.worker.on("message",async o=>{if("fn"in o)try{let s=await n?.[o.fn].apply(n,o.args);this.worker.postMessage({id:o.id,res:s})}catch(s){let c=s instanceof Error?s:new Error(String(s));this.worker.postMessage({id:o.id,err:c})}else this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=Imo((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}static{a(this,"WorkerWithRpcProxy")}async terminate(){this.worker.removeAllListeners(),await this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};f();var UHe=class t{static{a(this,"MovedText")}constructor(e,r){this.lineRangeMapping=e,this.changes=r}flip(){return new t(this.lineRangeMapping.flip(),this.changes.map(e=>e.flip()))}};f();var E_e=class t{static{a(this,"LineRangeMapping")}static inverse(e,r,n){let o=[],s=1,c=1;for(let u of e){let d=new t(new Vc(s,u.original.startLineNumber),new Vc(c,u.modified.startLineNumber));d.modified.isEmpty||o.push(d),s=u.original.endLineNumberExclusive,c=u.modified.endLineNumberExclusive}let l=new t(new Vc(s,r+1),new Vc(c,n+1));return l.modified.isEmpty||o.push(l),o}static clip(e,r,n){let o=[];for(let s of e){let c=s.original.intersect(r),l=s.modified.intersect(n);c&&!c.isEmpty&&l&&!l.isEmpty&&o.push(new t(c,l))}return o}constructor(e,r){this.original=e,this.modified=r}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}get changedLineCount(){return Math.max(this.original.length,this.modified.length)}toRangeMapping(){let e=this.original.toInclusiveRange(),r=this.modified.toInclusiveRange();if(e&&r)return new jk(e,r);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Ga("not a valid diff");return new jk(new ci(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ci(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new jk(new ci(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new ci(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,r){if(Qtn(this.original.endLineNumberExclusive,e)&&Qtn(this.modified.endLineNumberExclusive,r))return new jk(new ci(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ci(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new jk(ci.fromPositions(new mo(this.original.startLineNumber,1),toe(new mo(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ci.fromPositions(new mo(this.modified.startLineNumber,1),toe(new mo(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new jk(ci.fromPositions(toe(new mo(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),toe(new mo(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ci.fromPositions(toe(new mo(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),r),toe(new mo(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));throw new Ga}};function toe(t,e){if(t.lineNumber<1)return new mo(1,1);if(t.lineNumber>e.length)return new mo(e.length,e[e.length-1].length+1);let r=e[t.lineNumber-1];return t.column>r.length+1?new mo(t.lineNumber,r.length+1):t}a(toe,"normalizePosition");function Qtn(t,e){return t>=1&&t<=e.length}a(Qtn,"isValidLineNumber");var QHe=class t extends E_e{static{a(this,"DetailedLineRangeMapping")}static fromRangeMappings(e){let r=Vc.join(e.map(o=>Vc.fromRangeInclusive(o.originalRange))),n=Vc.join(e.map(o=>Vc.fromRangeInclusive(o.modifiedRange)));return new t(r,n,e)}constructor(e,r,n){super(e,r),this.innerChanges=n}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}},jk=class t{static{a(this,"RangeMapping")}static fromEdit(e){let r=e.getNewRanges();return e.replacements.map((o,s)=>new t(o.range,r[s]))}static fromEditJoin(e){let r=e.getNewRanges(),n=e.replacements.map((o,s)=>new t(o.range,r[s]));return t.join(n)}static join(e){if(e.length===0)throw new Ga("Cannot join an empty list of range mappings");let r=e[0];for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let r=e.getValueOfRange(this.modifiedRange);return new eA(this.originalRange,r)}join(e){return new t(this.originalRange.plusRange(e.originalRange),this.modifiedRange.plusRange(e.modifiedRange))}};var Gtn=require("fs");var XT=class{static{a(this,"DiffServiceImpl")}constructor(){this._worker=new U6(()=>{let e=xmo([qFe(__dirname,"diffWorker.js"),qFe(__dirname,"../../../../../../../../dist/diffWorker.js")]);if(e===void 0)throw new Error("DiffServiceImpl: worker file not found");return new FHe(e,{name:"Diff worker"})})}dispose(){this._worker.rawValue?.terminate()}async computeDiff(e,r,n){let o=await this._worker.value.proxy.computeDiff(e,r,n);return{identical:o.identical,quitEarly:o.quitEarly,changes:qtn(o.changes),moves:o.moves.map(c=>new UHe(new E_e(new Vc(c[0],c[1]),new Vc(c[2],c[3])),qtn(c[4])))}}};function qtn(t){return t.map(e=>new QHe(new Vc(e[0],e[1]),new Vc(e[2],e[3]),e[4]?.map(r=>new jk(new ci(r[0],r[1],r[2],r[3]),new ci(r[4],r[5],r[6],r[7])))))}a(qtn,"toLineRangeMappings");function xmo(t){for(let e of t)if((0,Gtn.existsSync)(e))return e}a(xmo,"firstExistingPath");var qHe=new Se("editSurvivalReporter"),uOt=class{constructor(e,r,n,o,s,c,l){this.ctx=e;this._document=r;this._documentTextBeforeMarkedEdits=n;this._documentTextAfterMarkedEdits=o;this._markedEdits=s;this._sendTelemetryEvent=c;this._customTimeouts=l;this._store=new F6;this._editSurvivalTracker=new eoe(this._documentTextBeforeMarkedEdits,this._markedEdits),this.captureInitialBranchInfo().then(()=>{this.setupTimeouts()}).catch(()=>{this.setupTimeouts()})}static{a(this,"BaseEditSurvivalReporter")}setupTimeouts(){if(this._store.isDisposed)return;let e=this._customTimeouts||[30*1e3,120*1e3,300*1e3,600*1e3];for(let r=0;rthis._store.dispose():void 0,r===0)}}async report(e){let r=await this.createEditSurvivalResult(this._editSurvivalTracker,e,this._readDocumentTimeMs,this._diffComputationTimeMs,this._arcTracker);this._sendTelemetryEvent(r)}_getLineCountInfo(){if(this._arcTracker)return this._arcTracker.getTrackedEditLineMetrics()}async triggerReport(e){await this.report(e)}get editSurvivalTracker(){return this._editSurvivalTracker}getInitializationTimings(){return{readDocumentTimeMs:this._readDocumentTimeMs,diffComputationTimeMs:this._diffComputationTimeMs}}async readCurrentDocument(){let e=await this.readCurrentDocumentWithTiming(this.ctx,this._document);return this._readDocumentTimeMs=e.readDocumentTimeMs,e.text}async captureInitialBranchInfo(){try{let e=Wu(this._document.uri),r=this.ctx.get(qT);this._initialBranchInfo=await r.getBranchInfo(this.ctx,e)}catch(e){qHe.warn(this.ctx,"Failed to capture initial branch info",e),this._initialBranchInfo=void 0}}async checkBranchChange(){try{let e=Wu(this._document.uri),n=await this.ctx.get(qT).getBranchInfo(this.ctx,e);if(!this._initialBranchInfo||!n)return 0;let o=this._initialBranchInfo.currentBranch,s=n.currentBranch,c=this._initialBranchInfo.isDetachedHead,l=n.isDetachedHead;return o!==s||c!==l?1:0}catch(e){return qHe.warn(this.ctx,"Failed to check branch change",e),0}}async createEditSurvivalResult(e,r,n,o,s){let c=e.computeTrackedEditsSurvivalScore(),l=await this.checkBranchChange(),u=this._getLineCountInfo(),d={fourGram:c.fourGram,noRevert:c.noRevert,timeDelayMs:r,didBranchChange:l,arc:s?.getAcceptedRetainedCharactersCount(),originalCharCount:s?.getOriginalCharacterCount(),currentLineCount:u?.insertedLineCounts,currentDeletedLineCount:u?.deletedLineCounts,originalLineCount:this._initialLineCounts?.insertedLineCounts,originalDeletedLineCount:this._initialLineCounts?.deletedLineCounts,currentFileContent:e.getCurrentText(),originalFileText:e.getOriginalText(),textAfterMarkedEdits:e.getTextAfterMarkedEdits(),debugLog:e.getDebugLog(),readDocumentTimeMs:n,diffComputationTimeMs:o};return{...d,currentLineCount:d.currentLineCount&&d.originalLineCount&&d.currentLineCount>d.originalLineCount?d.originalLineCount:d.currentLineCount,currentDeletedLineCount:d.currentDeletedLineCount&&d.originalDeletedLineCount&&d.currentDeletedLineCount>d.originalDeletedLineCount?d.originalDeletedLineCount:d.currentDeletedLineCount}}async readCurrentDocumentWithTiming(e,r){let n=performance.now(),o=await e.get(In).getOrReadTextDocument({uri:r.uri}),s=performance.now()-n;if(o.status!=="valid")throw new Ga(`Document ${r.uri} is not valid, details ${JSON.stringify(o)}`);return{text:o.document.getText(),readDocumentTimeMs:s}}async computeDiffWithTiming(e,r,n){let o=performance.now(),s=await LHe(r,n,e.get(XT)),c=performance.now()-o;return{edits:s,diffComputationTimeMs:c}}};var GHe=class extends uOt{static{a(this,"DiffBasedEditSurvivalReporter")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s,c,l),this._arcTracker=new Zie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._initialLineCounts=this._getLineCountInfo()}scheduleReport(e,r){let n=new OFe(()=>{this.updateAndReport(e).then(()=>{n.dispose(),r&&r()}).catch(o=>{qHe.error(this.ctx,`DiffBasedEditSurvivalReporter: Failed to update and report at ${e}ms`,o),n.dispose(),r&&r()})},e);this._store.add(n)}cancel(){this._store.dispose()}async updateAndReport(e){try{let r=await this.readCurrentDocument();if(r!==this._documentTextAfterMarkedEdits){let n=await this.computeDiffWithTiming(this.ctx,this._documentTextAfterMarkedEdits,r);this._diffComputationTimeMs=n.diffComputationTimeMs,this._editSurvivalTracker=new eoe(this._documentTextBeforeMarkedEdits,this._markedEdits),this._editSurvivalTracker.handleEdits(n.edits),this._arcTracker=new Zie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._arcTracker.handleEdits(n.edits)}else this._diffComputationTimeMs=void 0,this._editSurvivalTracker=new eoe(this._documentTextBeforeMarkedEdits,this._markedEdits),this._arcTracker=new Zie(this._documentTextBeforeMarkedEdits,this._markedEdits);await this.report(e)}catch(r){throw qHe.error(this.ctx,`Failed to update and report at ${e}ms for document ${this._document.uri}`,r),r}}};var Htn=new Se("editSurvivalTrackerService"),pw=class{constructor(e){this.ctx=e}static{a(this,"EditSurvivalTrackerService")}initialize(e,r,n){Htn.debug(this.ctx,`Initializing edit survival tracking for document uri: ${e.uri}`);let o;return{startReporter:a(s=>{(async()=>{try{let c=await LHe(r,n,this.ctx.get(XT));o=new GHe(this.ctx,e,r,n,c,s,[0,30*1e3,120*1e3,300*1e3,600*1e3])}catch(c){Htn.error(this.ctx,`Failed to initialize EditSurvivalReporter: ${zl(c)}`,c)}})()},"startReporter"),cancel:a(()=>{o?.cancel()},"cancel")}}};var wmo=1e3,jtn=256e3,$tn=64e3,Vtn={modelId:"instant-apply-qwen3-4b-no-think",uiName:"instant-apply-qwen3-4b-no-think",modelFamily:"instant-apply-qwen3-4b-no-think",maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},Rmo=8e3,Pmo={modelId:"gpt-4o-instant-apply-full-ft-v66",uiName:"gpt-4o-instant-apply-full-ft-v66",modelFamily:Cn.Gpt4oMini,maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},kmo={modelId:"gpt-4o-instant-apply-full-ft-v66-short",uiName:"gpt-4o-instant-apply-full-ft-v66-short",modelFamily:Cn.Gpt4oMini,maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},HHe=class{static{a(this,"CodeMapper")}constructor(e){this.ctx=e,this.logger=new Se("codeMapper")}async mapCode(e,r,n,o,s,c=!1,l){if(!e.resource)throw new Zg("No uri found in code block");if(o.isCancellationRequested)throw new wHe;e.code.includes(km)||this.logger.debug(this.ctx,`Code block for uri ${e.resource} does not contain existing code marker`);let u=await this.ctx.get(In).getOrReadTextDocument({uri:e.resource});if(u.status==="notfound")return s&&await this.reportCodeBlock(e,s),{code:e.code};if(u.status==="invalid"){let g=`Failed to find file ${e.resource} with status ${u.status} and reason ${u.reason}`,A=new Zg(g);throw this.logger.error(this.ctx,g,A),A}let d=u.document.getText();if(d.length===0&&!e.code.includes(km))return s&&await this.reportCodeBlock(e,s),{code:e.code};s&&await s({fileGenerationStatus:"edit-plan-generated",uri:e.resource,basename:ei(e.resource),editDescription:e.markdownBeforeBlock});let p=await this.ctx.get(Ot).getToken(),h=await this.ctx.get(jt).updateExPValuesAndAssignments(p),m=this.ctx.get(jt).instantApplyModelMigration(h);try{return await this.mapCodeUsingFastEdit(e,u,r,n,o,h,s,c,l)}catch(g){if(this.logger.exception(this.ctx,g,`Fast Edit failed for ${e.resource}. Error: ${zl(g)}`),_u(this.ctx,"codeMapper.fastEditFailed",g,{modelId:m?"instant-apply-qwen3-4b-no-think":"legacy"}),vr(this.ctx,tt.EnableMapCodeFallback)==="enabled")return await this.codeMapperUsingSlowEdit(e,u,d,r,n,o,s,c,l);throw g}}async codeMapperUsingSlowEdit(e,r,n,o,s,c,l,u,d){let h=wo("o200k_base").tokenLength(n),g=h<3072;return this.logger.info(this.ctx,`Document has ${h} tokens. Falling back to ${g?"Full Rewrite":"Patch mode"} for ${e.resource}`),g?await this.mapCodeUsingFullRewrite(e,r,o,s,c,l,u,d):await this.mapCodeUsingPatch(e,r,o,s,c,l,u,d)}async mapCodeUsingFastEdit(e,r,n,o,s,c,l,u=!1,d){if(r.status!=="valid")throw new Zg("Invalid document result in mapCodeUsingFastEdit");let p=r.document.getText(),h=await this.buildPromptAndSelectEndpoint(e,r,s,c),m=h.messages,g=h.modelConfiguration,A=h.tokenCount;this.logger.info(this.ctx,`Selected model: ${g.modelId}, Token count: ${A} for ${e.resource}`);let y=this.ctx.get(pw),E=Z$(),_=[],v=0,b=0,I=p.length+e.code.length+wmo;for(;;){let x={copilotApiProvider:"proxy",modelConfiguration:g,messages:m,uiKind:"agentPanel",temperature:0,llmInteraction:n.cloneAsAgentInteraction(),prediction:{type:"content",content:p},copilotEditsSessionHeader:d};this.logger.debug(this.ctx,`Send map code request ${E} in iteration ${b} with params: ${JSON.stringify(x,null,2)}`);let w=await this.ctx.get(ya).fetchResponse(x,s,c);if(this.logger.debug(this.ctx,`Received map code response ${E} in iteration ${b} with result: ${JSON.stringify(w,null,2)}`),v=this.calculateResponseLength(w,_,v),w.type==="length"){if(v>I)throw new Zg(`Code mapper might be in a loop: Rewritten length: ${v}, Document length: ${p.length}, Code block length ${e.code.length}`);m=(await y0.create(Kie,{codeBlock:e.code,uri:e.resource,existingDocument:r,markdownBeforeBlock:e.markdownBeforeBlock,inProgressRewriteContent:w.truncatedValue},g).renderPrompt(void 0,s)).messages}else if(w.type==="success"){let P=_.join("");if(P){l&&await l({fileGenerationStatus:"updated-code-generated",uri:e.resource,basename:ei(e.resource),partialText:P,languageId:r.document.detectedLanguageId,markdownCodeFence:Sm(P)});let k=y.initialize(r.document,p,P);return{code:P,editSurvivalTrackingSession:k,telemetry:{requestSource:o.chatRequestSource,chatRequestModel:o.chatRequestModel,mapper:g.modelId,headerRequestId:w.requestId}}}else{let k=`No valid completion found for uri ${e.resource}`;throw new Zg(k)}}else{if(w.type==="canceled")throw new Sc;{let P=`Failed to map code for uri ${e.resource} with result type ${w.type}`;throw this.logger.error(this.ctx,P,w),new Zg(P)}}b+=1}}async mapCodeUsingFullRewrite(e,r,n,o,s,c,l=!1,u){return this.mapCodeUsingCAPI("full-rewrite",Kie,e,r,n,o,s,c,l,u,d=>Nmo(d))}async mapCodeUsingPatch(e,r,n,o,s,c,l=!1,u){return this.mapCodeUsingCAPI("patch",RHe,e,r,n,o,s,c,l,u,(d,p)=>{this.logger.info(this.ctx,`Patch response for uri ${e.resource}: ${d.substring(0,500)}...`);let h=Dtn(d);if(h.patches.length===0)throw new Zg(`Patch mode failed: no valid patches found in response for uri ${e.resource}`);this.logger.info(this.ctx,`Parsed ${h.patches.length} patch(es) for uri ${e.resource}`);let m=Btn(p,h.patches);if(m===void 0)throw new Zg(`Patch mode failed: could not apply patches to document for uri ${e.resource}`);return this.logger.info(this.ctx,`Patch mode succeeded for uri ${e.resource}`),m})}async mapCodeUsingCAPI(e,r,n,o,s,c,l,u,d,p,h){if(o.status!=="valid")throw new Zg(`Invalid document result in mapCodeUsing${e==="full-rewrite"?"FullRewrite":"Patch"}`);let m=o.document.getText(),g=await $o.getModelConfiguration(this.ctx,"edits",Cn.Gpt41,void 0,void 0);this.logger.info(this.ctx,`${e==="full-rewrite"?"Full Rewrite":"Patch mode"} fallback using model: ${g.modelId} for ${n.resource}`);let A={codeBlock:n.code,uri:n.resource,existingDocument:o,markdownBeforeBlock:n.markdownBeforeBlock,...e==="full-rewrite"?{inProgressRewriteContent:void 0}:{}},_=(await y0.create(r,A,g).renderPrompt(void 0,l)).messages,v=this.ctx.get(pw),b=await this.ctx.get(Ot).getToken(),I=await this.ctx.get(jt).updateExPValuesAndAssignments(b),x=Z$(),R={copilotApiProvider:"api",modelConfiguration:g,messages:_,uiKind:"agentPanel",temperature:0,llmInteraction:s.cloneAsAgentInteraction(),copilotEditsSessionHeader:p};this.logger.debug(this.ctx,`Send ${e} request ${x} with params: ${JSON.stringify(R,null,2)}`);let P=await this.ctx.get(ya).fetchResponse(R,l,I);if(this.logger.debug(this.ctx,`Received ${e} response ${x} with result: ${JSON.stringify(P,null,2)}`),P.type==="success"){let k=P.value;if(!k)throw new Zg(`No valid completion found for uri ${n.resource}`);let Q=h(k,m);u&&await u({fileGenerationStatus:"updated-code-generated",uri:n.resource,basename:ei(n.resource),partialText:Q,languageId:o.document.detectedLanguageId,markdownCodeFence:Sm(Q)});let M=v.initialize(o.document,m,Q);return{code:Q,editSurvivalTrackingSession:M,telemetry:{requestSource:c.chatRequestSource,chatRequestModel:c.chatRequestModel,mapper:`${g.modelId}-${e}`,headerRequestId:P.requestId}}}else{if(P.type==="canceled")throw new Sc;{let k=`${e==="full-rewrite"?"Full Rewrite":"Patch mode"} failed for uri ${n.resource} with result type ${P.type}`;throw this.logger.error(this.ctx,k,P),new Zg(k)}}}async buildPromptAndSelectEndpoint(e,r,n,o,s){let l=(r.status==="valid"?r.document.getText():"").length+e.code.length;if(l>jtn)throw new Zg(`Document too large: ${l} characters (limit: ${jtn})`);let d=await y0.create(Kie,{codeBlock:e.code,uri:e.resource,existingDocument:r,markdownBeforeBlock:e.markdownBeforeBlock,inProgressRewriteContent:s},Vtn).renderPrompt(void 0,n),p=d.tokenCount;if(p>$tn)throw new Zg(`Prompt too large: ${p} tokens (limit: ${$tn})`);let h=d.messages.map(y=>typeof y.content=="string"?y.content:JSON.stringify(y.content)).join(` -`),m=this.ctx.get(jt).instantApplyModelMigration(o),g;return m?g=Vtn:g=h.length{let o=dn(n.content);return n.role==="system"?`${r} +`).join("")),new Vg(ai.fromPositions(new uo(r,n)),o)}else{let r=this.lineRange.endLineNumberExclusive-1,n=e.getTransformer().getLineLength(r)+1,o=new ai(this.lineRange.startLineNumber,1,r,n),s=this.newLines.join(` +`);return new Vg(o,s)}}toSingleEdit(e){let r=this.toSingleTextEdit(e),n=e.getTransformer().getOffsetRange(r.range);return new bm(n,r.text)}toString(){return`${this.lineRange}->${JSON.stringify(this.newLines)}`}serialize(){return[this.lineRange.startLineNumber,this.lineRange.endLineNumberExclusive,this.newLines]}removeCommonSuffixPrefixLines(e){let r=this.lineRange.startLineNumber,n=this.lineRange.endLineNumberExclusive,o=0;for(;r{function t(r){return Array.isArray(r)&&r.length===3&&typeof r[0]=="number"&&typeof r[1]=="number"&&Array.isArray(r[2])&&r[2].every(n=>typeof n=="string")}e.is=t,a(t,"is")})(SAo||={});var pie=class{constructor(e,r){this.originalText=e;this._trackedEdit=r;let n=r.removeCommonSuffixPrefix(e);this._updatedTrackedEdit=n.mapData(()=>new jGe(!0))}static{a(this,"ArcTracker")}handleEdits(e){let r=e.mapData(s=>new jGe(!1)),o=this._updatedTrackedEdit.compose(r).decomposeSplit(s=>!s.data.isTrackedEdit).e2;this._updatedTrackedEdit=o}getTrackedEdit(){return this._updatedTrackedEdit.toStringEdit()}getAcceptedRetainedCharactersCount(){return Lrn(this._updatedTrackedEdit.replacements,r=>r.getNewLength())}getOriginalCharacterCount(){return Lrn(this._trackedEdit.replacements,e=>e.getNewLength())}getTrackedEditLineMetrics(){let e=this.getTrackedEdit();if(!e)return{deletedLineCounts:0,insertedLineCounts:0};let r=h_e.fromEdit(e,new T4(this.originalText)),n=HAe(r.replacements,s=>s.lineRange.length),o=HAe(r.getNewLineRanges(),s=>s.length);return{deletedLineCounts:n,insertedLineCounts:o}}getDebugState(){return{edits:this._updatedTrackedEdit.replacements.map(e=>({range:e.replaceRange.toString(),newText:e.newText,isTrackedEdit:e.data.isTrackedEdit}))}}},jGe=class{constructor(e){this.isTrackedEdit=e}static{a(this,"IsTrackedEditData")}join(e){if(this.isTrackedEdit===e.isTrackedEdit)return this}};function Lrn(t,e){let r=0;for(let n of t)r+=e(n);return r}a(Lrn,"sum");f();var hie=class{constructor(e,r){this.originalText=e;this._combinedEditsSinceStart=uy.empty;this._debugLog=[];this._text=r.apply(this.originalText),this._textAfterTrackedEdits=this._text,this._originalEdits=r,this._debugLog.push(`[INIT] Original: "${this.originalText}"`),this._debugLog.push(`[INIT] TrackedEdits(${r.replacements.length}): ${this._formatEditsCompact(r,this.originalText)}`),this._debugLog.push(`[INIT] Result: "${this._text}"`),this._debugLog.push("")}static{a(this,"EditSurvivalTracker")}_formatEditsCompact(e,r){return e.replacements.length===0?"[]":e.replacements.map(n=>{let o=r.substring(n.replaceRange.start,n.replaceRange.endExclusive);return`[${n.replaceRange.start}:${n.replaceRange.endExclusive}]"${o}"->"${n.newText}"`}).join(", ")}handleEdits(e){let r=this._text,n=e.apply(this._text),o=this._combinedEditsSinceStart.compose(e);o=o.removeCommonSuffixPrefix(this._textAfterTrackedEdits),this._combinedEditsSinceStart=o,this._text=n,this._debugLog.push(`[EDIT] Input(${e.replacements.length}): ${this._formatEditsCompact(e,r)} -> "${n}"`),this._debugLog.push(`[EDIT] Accumulated(${this._combinedEditsSinceStart.replacements.length}): ${this._formatEditsCompact(this._combinedEditsSinceStart,this._textAfterTrackedEdits)}`)}getCurrentText(){return this._text}getTextAfterMarkedEdits(){return this._textAfterTrackedEdits}getOriginalText(){return this.originalText}getDebugLog(){return this._debugLog.join(` +`)}computeTrackedEditsSurvivalScore(){this._debugLog.push(`[CALC] Current: "${this._text}" | Original: "${this.originalText}"`);let e=0,r=0,n=0,o=0,s=this._originalEdits.getNewRanges(),c=IAo(s,this._combinedEditsSinceStart);this._debugLog.push(`[CALC] Processing ${s.length} edits:`);for(let d=0;d"${m}"->"${A}" | 4gram:${y.toFixed(2)} noRevert:(${E.toFixed(2)},${_.toFixed(2)})`),E!==1){let v=1-Math.max(_-E,0)/(1-E);n+=p.replaceRange.length*v,o+=p.replaceRange.length}e+=p.newText.length*y,r+=p.newText.length}let l=r===0?1:e/r,u=o===0?1:n/o;return this._debugLog.push(`[RESULT] fourGram: ${l.toFixed(3)} (${e.toFixed(1)}/${r.toFixed(1)}) | noRevert: ${u.toFixed(3)} (${n.toFixed(1)}/${o.toFixed(1)})`),{fourGram:l,noRevert:u}}};function w4t(t,e){if(t.length<4||e.length<4)return t===e?1:0;let n=new Map;for(let l=0;l<=t.length-4;l++){let u=t.substring(l,l+4),d=n.get(u)||0;n.set(u,d+1)}for(let l=0;l<=e.length-4;l++){let u=e.substring(l,l+4),d=n.get(u)||0;n.set(u,d-1)}let o=t.length-4+1+e.length-4+1,s=0;for(let l of n.values())s+=Math.abs(l);return(o-s)/o}a(w4t,"compute4GramTextSimilarity");function IAo(t,e){t=t.slice();let r=[],n=0;for(let o of e.replacements){for(;;){let c=t[0];if(!c||c.endExclusive>=o.replaceRange.start)break;t.shift(),r.push(c.delta(n))}let s=[];for(;;){let c=t[0];if(!c||!c.intersectsOrTouches(o.replaceRange))break;t.shift(),s.push(c)}for(let c=s.length-1;c>=0;c--){let l=s[c],u=l.intersect(o.replaceRange).length;l=l.deltaEnd(-u+(c===0?o.newText.length:0));let d=l.start-o.replaceRange.start;d>0&&(l=l.delta(-d)),c!==0&&(l=l.delta(o.newText.length)),l=l.delta(-(o.newText.length-o.replaceRange.length)),t.unshift(l)}n+=o.newText.length-o.replaceRange.length}for(;;){let o=t[0];if(!o)break;t.shift(),r.push(o.delta(n))}return r}a(IAo,"applyEditsToRanges");f();f();var m_e=class{static{a(this,"OffsetLineColumnConverter")}get lines(){return this._lineStartOffsets.length}constructor(e){this._lineStartOffsets=[0];let r=0;for(;re);r++);let n=e-this._lineStartOffsets[r-1];return new uo(r,n+1)}startOffsetOfLineContaining(e){let r=1;for(;re);r++);return this._lineStartOffsets[r-1]}positionToOffset(e){return e.lineNumber>=this._lineStartOffsets.length?this._lineStartOffsets[this._lineStartOffsets.length-1]+e.column-1:this._lineStartOffsets[e.lineNumber-1]+e.column-1}};async function $Ge(t,e,r,n=5e3){let o=await r.computeDiff(t,e,{maxComputationTimeMs:n,computeMoves:!1,ignoreTrimWhitespace:!1}),s=new m_e(t),c=new m_e(e),l=[];for(let u of o.changes)for(let d of u.innerChanges??[]){let p=c.positionToOffset(d.modifiedRange.getStartPosition()),h=c.positionToOffset(d.modifiedRange.getEndPosition()),m=e.substring(p,h),g=s.positionToOffset(d.originalRange.getStartPosition()),A=s.positionToOffset(d.originalRange.getEndPosition()),y=new _a(g,A);l.push(new bm(y,m))}return new uy(l)}a($Ge,"stringEditFromDiff");f();f();var Frn=require("worker_threads");var R4t=class{constructor(){this.nextId=1;this.handlers=new Map}static{a(this,"RpcResponseHandler")}createHandler(){let e=this.nextId++,r,n,o=new Promise((s,c)=>{r=s,n=c});return this.handlers.set(e,{resolve:r,reject:n}),{id:e,result:o}}handleResponse(e){let r=this.handlers.get(e.id);r&&(this.handlers.delete(e.id),e.err?r.reject(e.err):r.resolve(e.res))}handleError(e){for(let r of this.handlers.values())r.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};function xAo(t){let e={get:a((r,n)=>(typeof n=="string"&&!r[n]&&(r[n]=(...o)=>t(n,o)),r[n]),"get")};return new Proxy(Object.create(null),e)}a(xAo,"createRpcProxy");var VGe=class{constructor(e,r,n){this.responseHandler=new R4t;this.worker=new Frn.Worker(e,r),this.worker.on("message",async o=>{if("fn"in o)try{let s=await n?.[o.fn].apply(n,o.args);this.worker.postMessage({id:o.id,res:s})}catch(s){let c=s instanceof Error?s:new Error(String(s));this.worker.postMessage({id:o.id,err:c})}else this.responseHandler.handleResponse(o)}),this.worker.on("error",o=>this.handleError(o)),this.worker.on("exit",o=>{o!==0&&this.handleError(new Error(`Worker thread exited with code ${o}.`))}),this.proxy=xAo((o,s)=>{if(!this.worker)throw new Error("Worker was terminated!");let{id:c,result:l}=this.responseHandler.createHandler();return this.worker.postMessage({id:c,fn:o,args:s}),l})}static{a(this,"WorkerWithRpcProxy")}async terminate(){this.worker.removeAllListeners(),await this.worker.terminate(),this.responseHandler.clear()}handleError(e){this.responseHandler.handleError(e)}};f();var WGe=class t{static{a(this,"MovedText")}constructor(e,r){this.lineRangeMapping=e,this.changes=r}flip(){return new t(this.lineRangeMapping.flip(),this.changes.map(e=>e.flip()))}};f();var g_e=class t{static{a(this,"LineRangeMapping")}static inverse(e,r,n){let o=[],s=1,c=1;for(let u of e){let d=new t(new Uc(s,u.original.startLineNumber),new Uc(c,u.modified.startLineNumber));d.modified.isEmpty||o.push(d),s=u.original.endLineNumberExclusive,c=u.modified.endLineNumberExclusive}let l=new t(new Uc(s,r+1),new Uc(c,n+1));return l.modified.isEmpty||o.push(l),o}static clip(e,r,n){let o=[];for(let s of e){let c=s.original.intersect(r),l=s.modified.intersect(n);c&&!c.isEmpty&&l&&!l.isEmpty&&o.push(new t(c,l))}return o}constructor(e,r){this.original=e,this.modified=r}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}get changedLineCount(){return Math.max(this.original.length,this.modified.length)}toRangeMapping(){let e=this.original.toInclusiveRange(),r=this.modified.toInclusiveRange();if(e&&r)return new Dk(e,r);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new La("not a valid diff");return new Dk(new ai(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ai(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Dk(new ai(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new ai(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,r){if(Urn(this.original.endLineNumberExclusive,e)&&Urn(this.modified.endLineNumberExclusive,r))return new Dk(new ai(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new ai(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Dk(ai.fromPositions(new uo(this.original.startLineNumber,1),mie(new uo(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ai.fromPositions(new uo(this.modified.startLineNumber,1),mie(new uo(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Dk(ai.fromPositions(mie(new uo(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),mie(new uo(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),ai.fromPositions(mie(new uo(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),r),mie(new uo(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),r)));throw new La}};function mie(t,e){if(t.lineNumber<1)return new uo(1,1);if(t.lineNumber>e.length)return new uo(e.length,e[e.length-1].length+1);let r=e[t.lineNumber-1];return t.column>r.length+1?new uo(t.lineNumber,r.length+1):t}a(mie,"normalizePosition");function Urn(t,e){return t>=1&&t<=e.length}a(Urn,"isValidLineNumber");var zGe=class t extends g_e{static{a(this,"DetailedLineRangeMapping")}static fromRangeMappings(e){let r=Uc.join(e.map(o=>Uc.fromRangeInclusive(o.originalRange))),n=Uc.join(e.map(o=>Uc.fromRangeInclusive(o.modifiedRange)));return new t(r,n,e)}constructor(e,r,n){super(e,r),this.innerChanges=n}flip(){return new t(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new t(this.original,this.modified,[this.toRangeMapping()])}},Dk=class t{static{a(this,"RangeMapping")}static fromEdit(e){let r=e.getNewRanges();return e.replacements.map((o,s)=>new t(o.range,r[s]))}static fromEditJoin(e){let r=e.getNewRanges(),n=e.replacements.map((o,s)=>new t(o.range,r[s]));return t.join(n)}static join(e){if(e.length===0)throw new La("Cannot join an empty list of range mappings");let r=e[0];for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}toTextEdit(e){let r=e.getValueOfRange(this.modifiedRange);return new Vg(this.originalRange,r)}join(e){return new t(this.originalRange.plusRange(e.originalRange),this.modifiedRange.plusRange(e.modifiedRange))}};var qrn=require("fs");var QT=class{static{a(this,"DiffServiceImpl")}constructor(){this._worker=new f6(()=>{let e=wAo([Y6e(__dirname,"diffWorker.js"),Y6e(__dirname,"../../../../../../../../dist/diffWorker.js")]);if(e===void 0)throw new Error("DiffServiceImpl: worker file not found");return new VGe(e,{name:"Diff worker"})})}dispose(){this._worker.rawValue?.terminate()}async computeDiff(e,r,n){let o=await this._worker.value.proxy.computeDiff(e,r,n);return{identical:o.identical,quitEarly:o.quitEarly,changes:Qrn(o.changes),moves:o.moves.map(c=>new WGe(new g_e(new Uc(c[0],c[1]),new Uc(c[2],c[3])),Qrn(c[4])))}}};function Qrn(t){return t.map(e=>new zGe(new Uc(e[0],e[1]),new Uc(e[2],e[3]),e[4]?.map(r=>new Dk(new ai(r[0],r[1],r[2],r[3]),new ai(r[4],r[5],r[6],r[7])))))}a(Qrn,"toLineRangeMappings");function wAo(t){for(let e of t)if((0,qrn.existsSync)(e))return e}a(wAo,"firstExistingPath");var YGe=new Se("editSurvivalReporter"),P4t=class{constructor(e,r,n,o,s,c,l){this.ctx=e;this._document=r;this._documentTextBeforeMarkedEdits=n;this._documentTextAfterMarkedEdits=o;this._markedEdits=s;this._sendTelemetryEvent=c;this._customTimeouts=l;this._store=new d6;this._editSurvivalTracker=new hie(this._documentTextBeforeMarkedEdits,this._markedEdits),this.captureInitialBranchInfo().then(()=>{this.setupTimeouts()}).catch(()=>{this.setupTimeouts()})}static{a(this,"BaseEditSurvivalReporter")}setupTimeouts(){if(this._store.isDisposed)return;let e=this._customTimeouts||[30*1e3,120*1e3,300*1e3,600*1e3];for(let r=0;rthis._store.dispose():void 0,r===0)}}async report(e){let r=await this.createEditSurvivalResult(this._editSurvivalTracker,e,this._readDocumentTimeMs,this._diffComputationTimeMs,this._arcTracker);this._sendTelemetryEvent(r)}_getLineCountInfo(){if(this._arcTracker)return this._arcTracker.getTrackedEditLineMetrics()}async triggerReport(e){await this.report(e)}get editSurvivalTracker(){return this._editSurvivalTracker}getInitializationTimings(){return{readDocumentTimeMs:this._readDocumentTimeMs,diffComputationTimeMs:this._diffComputationTimeMs}}async readCurrentDocument(){let e=await this.readCurrentDocumentWithTiming(this.ctx,this._document);return this._readDocumentTimeMs=e.readDocumentTimeMs,e.text}async captureInitialBranchInfo(){try{let e=Lu(this._document.uri),r=this.ctx.get(RT);this._initialBranchInfo=await r.getBranchInfo(this.ctx,e)}catch(e){YGe.warn(this.ctx,"Failed to capture initial branch info",e),this._initialBranchInfo=void 0}}async checkBranchChange(){try{let e=Lu(this._document.uri),n=await this.ctx.get(RT).getBranchInfo(this.ctx,e);if(!this._initialBranchInfo||!n)return 0;let o=this._initialBranchInfo.currentBranch,s=n.currentBranch,c=this._initialBranchInfo.isDetachedHead,l=n.isDetachedHead;return o!==s||c!==l?1:0}catch(e){return YGe.warn(this.ctx,"Failed to check branch change",e),0}}async createEditSurvivalResult(e,r,n,o,s){let c=e.computeTrackedEditsSurvivalScore(),l=await this.checkBranchChange(),u=this._getLineCountInfo(),d={fourGram:c.fourGram,noRevert:c.noRevert,timeDelayMs:r,didBranchChange:l,arc:s?.getAcceptedRetainedCharactersCount(),originalCharCount:s?.getOriginalCharacterCount(),currentLineCount:u?.insertedLineCounts,currentDeletedLineCount:u?.deletedLineCounts,originalLineCount:this._initialLineCounts?.insertedLineCounts,originalDeletedLineCount:this._initialLineCounts?.deletedLineCounts,currentFileContent:e.getCurrentText(),originalFileText:e.getOriginalText(),textAfterMarkedEdits:e.getTextAfterMarkedEdits(),debugLog:e.getDebugLog(),readDocumentTimeMs:n,diffComputationTimeMs:o};return{...d,currentLineCount:d.currentLineCount&&d.originalLineCount&&d.currentLineCount>d.originalLineCount?d.originalLineCount:d.currentLineCount,currentDeletedLineCount:d.currentDeletedLineCount&&d.originalDeletedLineCount&&d.currentDeletedLineCount>d.originalDeletedLineCount?d.originalDeletedLineCount:d.currentDeletedLineCount}}async readCurrentDocumentWithTiming(e,r){let n=performance.now(),o=await e.get(In).getOrReadTextDocument({uri:r.uri}),s=performance.now()-n;if(o.status!=="valid")throw new La(`Document ${r.uri} is not valid, details ${JSON.stringify(o)}`);return{text:o.document.getText(),readDocumentTimeMs:s}}async computeDiffWithTiming(e,r,n){let o=performance.now(),s=await $Ge(r,n,e.get(QT)),c=performance.now()-o;return{edits:s,diffComputationTimeMs:c}}};var KGe=class extends P4t{static{a(this,"DiffBasedEditSurvivalReporter")}constructor(e,r,n,o,s,c,l){super(e,r,n,o,s,c,l),this._arcTracker=new pie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._initialLineCounts=this._getLineCountInfo()}scheduleReport(e,r){let n=new H6e(()=>{this.updateAndReport(e).then(()=>{n.dispose(),r&&r()}).catch(o=>{YGe.error(this.ctx,`DiffBasedEditSurvivalReporter: Failed to update and report at ${e}ms`,o),n.dispose(),r&&r()})},e);this._store.add(n)}cancel(){this._store.dispose()}async updateAndReport(e){try{let r=await this.readCurrentDocument();if(r!==this._documentTextAfterMarkedEdits){let n=await this.computeDiffWithTiming(this.ctx,this._documentTextAfterMarkedEdits,r);this._diffComputationTimeMs=n.diffComputationTimeMs,this._editSurvivalTracker=new hie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._editSurvivalTracker.handleEdits(n.edits),this._arcTracker=new pie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._arcTracker.handleEdits(n.edits)}else this._diffComputationTimeMs=void 0,this._editSurvivalTracker=new hie(this._documentTextBeforeMarkedEdits,this._markedEdits),this._arcTracker=new pie(this._documentTextBeforeMarkedEdits,this._markedEdits);await this.report(e)}catch(r){throw YGe.error(this.ctx,`Failed to update and report at ${e}ms for document ${this._document.uri}`,r),r}}};var Grn=new Se("editSurvivalTrackerService"),rw=class{constructor(e){this.ctx=e}static{a(this,"EditSurvivalTrackerService")}initialize(e,r,n){Grn.debug(this.ctx,`Initializing edit survival tracking for document uri: ${e.uri}`);let o;return{startReporter:a(s=>{(async()=>{try{let c=await $Ge(r,n,this.ctx.get(QT));o=new KGe(this.ctx,e,r,n,c,s,[0,30*1e3,120*1e3,300*1e3,600*1e3])}catch(c){Grn.error(this.ctx,`Failed to initialize EditSurvivalReporter: ${Ql(c)}`,c)}})()},"startReporter"),cancel:a(()=>{o?.cancel()},"cancel")}}};var RAo=1e3,Hrn=256e3,jrn=64e3,$rn={modelId:"instant-apply-qwen3-4b-no-think",uiName:"instant-apply-qwen3-4b-no-think",modelFamily:"instant-apply-qwen3-4b-no-think",maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},PAo=8e3,kAo={modelId:"gpt-4o-instant-apply-full-ft-v66",uiName:"gpt-4o-instant-apply-full-ft-v66",modelFamily:_n.Gpt4oMini,maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},DAo={modelId:"gpt-4o-instant-apply-full-ft-v66-short",uiName:"gpt-4o-instant-apply-full-ft-v66-short",modelFamily:_n.Gpt4oMini,maxRequestTokens:128e3,maxResponseTokens:16e3,baseTokensPerCompletion:3,baseTokensPerMessage:3,baseTokensPerName:1,tokenizer:"o200k_base",isExperimental:!1,stream:!0,toolCalls:!1},JGe=class{static{a(this,"CodeMapper")}constructor(e){this.ctx=e,this.logger=new Se("codeMapper")}async mapCode(e,r,n,o,s,c=!1,l){if(!e.resource)throw new $g("No uri found in code block");if(o.isCancellationRequested)throw new BGe;e.code.includes(Cm)||this.logger.debug(this.ctx,`Code block for uri ${e.resource} does not contain existing code marker`);let u=await this.ctx.get(In).getOrReadTextDocument({uri:e.resource});if(u.status==="notfound")return s&&await this.reportCodeBlock(e,s),{code:e.code};if(u.status==="invalid"){let g=`Failed to find file ${e.resource} with status ${u.status} and reason ${u.reason}`,A=new $g(g);throw this.logger.error(this.ctx,g,A),A}let d=u.document.getText();if(d.length===0&&!e.code.includes(Cm))return s&&await this.reportCodeBlock(e,s),{code:e.code};s&&await s({fileGenerationStatus:"edit-plan-generated",uri:e.resource,basename:Zn(e.resource),editDescription:e.markdownBeforeBlock});let p=await this.ctx.get(Nt).getToken(),h=await this.ctx.get(Gt).updateExPValuesAndAssignments(p),m=this.ctx.get(Gt).instantApplyModelMigration(h);try{return await this.mapCodeUsingFastEdit(e,u,r,n,o,h,s,c,l)}catch(g){if(this.logger.exception(this.ctx,g,`Fast Edit failed for ${e.resource}. Error: ${Ql(g)}`),Sa(this.ctx,"codeMapper.fastEditFailed",g,{modelId:m?"instant-apply-qwen3-4b-no-think":"legacy"}),vr(this.ctx,tt.EnableMapCodeFallback)==="enabled")return await this.codeMapperUsingSlowEdit(e,u,d,r,n,o,s,c,l);throw g}}async codeMapperUsingSlowEdit(e,r,n,o,s,c,l,u,d){let h=To("o200k_base").tokenLength(n),g=h<3072;return this.logger.info(this.ctx,`Document has ${h} tokens. Falling back to ${g?"Full Rewrite":"Patch mode"} for ${e.resource}`),g?await this.mapCodeUsingFullRewrite(e,r,o,s,c,l,u,d):await this.mapCodeUsingPatch(e,r,o,s,c,l,u,d)}async mapCodeUsingFastEdit(e,r,n,o,s,c,l,u=!1,d){if(r.status!=="valid")throw new $g("Invalid document result in mapCodeUsingFastEdit");let p=r.document.getText(),h=await this.buildPromptAndSelectEndpoint(e,r,s,c),m=h.messages,g=h.modelConfiguration,A=h.tokenCount;this.logger.info(this.ctx,`Selected model: ${g.modelId}, Token count: ${A} for ${e.resource}`);let y=this.ctx.get(rw),E=s$(),_=[],v=0,b=0,I=p.length+e.code.length+RAo;for(;;){let x={copilotApiProvider:"proxy",modelConfiguration:g,messages:m,uiKind:"agentPanel",temperature:0,llmInteraction:n.cloneAsAgentInteraction(),prediction:{type:"content",content:p},copilotEditsSessionHeader:d};this.logger.debug(this.ctx,`Send map code request ${E} in iteration ${b} with params: ${JSON.stringify(x,null,2)}`);let R=await this.ctx.get(fa).fetchResponse(x,s,c);if(this.logger.debug(this.ctx,`Received map code response ${E} in iteration ${b} with result: ${JSON.stringify(R,null,2)}`),v=this.calculateResponseLength(R,_,v),R.type==="length"){if(v>I)throw new $g(`Code mapper might be in a loop: Rewritten length: ${v}, Document length: ${p.length}, Code block length ${e.code.length}`);m=(await p0.create(uie,{codeBlock:e.code,uri:e.resource,existingDocument:r,markdownBeforeBlock:e.markdownBeforeBlock,inProgressRewriteContent:R.truncatedValue},g).renderPrompt(void 0,s)).messages}else if(R.type==="success"){let P=_.join("");if(P){l&&await l({fileGenerationStatus:"updated-code-generated",uri:e.resource,basename:Zn(e.resource),partialText:P,languageId:r.document.detectedLanguageId,markdownCodeFence:mm(P)});let k=y.initialize(r.document,p,P);return{code:P,editSurvivalTrackingSession:k,telemetry:{requestSource:o.chatRequestSource,chatRequestModel:o.chatRequestModel,mapper:g.modelId,headerRequestId:R.requestId}}}else{let k=`No valid completion found for uri ${e.resource}`;throw new $g(k)}}else{if(R.type==="canceled")throw new Ec;{let P=`Failed to map code for uri ${e.resource} with result type ${R.type}`;throw this.logger.error(this.ctx,P,R),new $g(P)}}b+=1}}async mapCodeUsingFullRewrite(e,r,n,o,s,c,l=!1,u){return this.mapCodeUsingCAPI("full-rewrite",uie,e,r,n,o,s,c,l,u,d=>NAo(d))}async mapCodeUsingPatch(e,r,n,o,s,c,l=!1,u){return this.mapCodeUsingCAPI("patch",LGe,e,r,n,o,s,c,l,u,(d,p)=>{this.logger.info(this.ctx,`Patch response for uri ${e.resource}: ${d.substring(0,500)}...`);let h=Drn(d);if(h.patches.length===0)throw new $g(`Patch mode failed: no valid patches found in response for uri ${e.resource}`);this.logger.info(this.ctx,`Parsed ${h.patches.length} patch(es) for uri ${e.resource}`);let m=Orn(p,h.patches);if(m===void 0)throw new $g(`Patch mode failed: could not apply patches to document for uri ${e.resource}`);return this.logger.info(this.ctx,`Patch mode succeeded for uri ${e.resource}`),m})}async mapCodeUsingCAPI(e,r,n,o,s,c,l,u,d,p,h){if(o.status!=="valid")throw new $g(`Invalid document result in mapCodeUsing${e==="full-rewrite"?"FullRewrite":"Patch"}`);let m=o.document.getText(),g=await qo.getModelConfiguration(this.ctx,"edits",_n.Gpt41,void 0,void 0);this.logger.info(this.ctx,`${e==="full-rewrite"?"Full Rewrite":"Patch mode"} fallback using model: ${g.modelId} for ${n.resource}`);let A={codeBlock:n.code,uri:n.resource,existingDocument:o,markdownBeforeBlock:n.markdownBeforeBlock,...e==="full-rewrite"?{inProgressRewriteContent:void 0}:{}},_=(await p0.create(r,A,g).renderPrompt(void 0,l)).messages,v=this.ctx.get(rw),b=await this.ctx.get(Nt).getToken(),I=await this.ctx.get(Gt).updateExPValuesAndAssignments(b),x=s$(),w={copilotApiProvider:"api",modelConfiguration:g,messages:_,uiKind:"agentPanel",temperature:0,llmInteraction:s.cloneAsAgentInteraction(),copilotEditsSessionHeader:p};this.logger.debug(this.ctx,`Send ${e} request ${x} with params: ${JSON.stringify(w,null,2)}`);let P=await this.ctx.get(fa).fetchResponse(w,l,I);if(this.logger.debug(this.ctx,`Received ${e} response ${x} with result: ${JSON.stringify(P,null,2)}`),P.type==="success"){let k=P.value;if(!k)throw new $g(`No valid completion found for uri ${n.resource}`);let Q=h(k,m);u&&await u({fileGenerationStatus:"updated-code-generated",uri:n.resource,basename:Zn(n.resource),partialText:Q,languageId:o.document.detectedLanguageId,markdownCodeFence:mm(Q)});let M=v.initialize(o.document,m,Q);return{code:Q,editSurvivalTrackingSession:M,telemetry:{requestSource:c.chatRequestSource,chatRequestModel:c.chatRequestModel,mapper:`${g.modelId}-${e}`,headerRequestId:P.requestId}}}else{if(P.type==="canceled")throw new Ec;{let k=`${e==="full-rewrite"?"Full Rewrite":"Patch mode"} failed for uri ${n.resource} with result type ${P.type}`;throw this.logger.error(this.ctx,k,P),new $g(k)}}}async buildPromptAndSelectEndpoint(e,r,n,o,s){let l=(r.status==="valid"?r.document.getText():"").length+e.code.length;if(l>Hrn)throw new $g(`Document too large: ${l} characters (limit: ${Hrn})`);let d=await p0.create(uie,{codeBlock:e.code,uri:e.resource,existingDocument:r,markdownBeforeBlock:e.markdownBeforeBlock,inProgressRewriteContent:s},$rn).renderPrompt(void 0,n),p=d.tokenCount;if(p>jrn)throw new $g(`Prompt too large: ${p} tokens (limit: ${jrn})`);let h=d.messages.map(y=>typeof y.content=="string"?y.content:JSON.stringify(y.content)).join(` +`),m=this.ctx.get(Gt).instantApplyModelMigration(o),g;return m?g=$rn:g=h.length{let o=dn(n.content);return n.role==="system"?`${r} ${o} -`:r+o},"")}]}calculateResponseLength(e,r,n){return e.type==="success"?(r.push(e.value),n+=e.value.length):e.type==="length"&&(r.push(e.truncatedValue),n+=e.truncatedValue.length),n}async reportCodeBlock(e,r){await r({fileGenerationStatus:"edit-plan-generated",uri:e.resource,basename:ei(e.resource),editDescription:e.markdownBeforeBlock}),await r({fileGenerationStatus:"updated-code-generated",partialText:e.code,uri:e.resource,basename:ei(e.resource)})}};function Nmo(t){let e=t.split(/\r?\n/),r=/^(`{3,})/,n=!1,o=0,s=!1,c=[];for(let l of e){let u=l.match(r);if(u&&!n)o=u[1].length,n=!0;else if(n){let d=l.match(r);if(d&&d[1].length>=o){s=!0;break}c.push(l)}}return s?c.join(` -`):t}a(Nmo,"extractCodeBlock");var jHe=class extends pl{static{a(this,"EditFileTool")}constructor(){super({name:"insert_edit_into_file",displayName:"Edit File",description:`Edit a file in the workspace. Use this tool once per file that needs to be modified, even if there are multiple changes for a file. Generate the "explanation" property first. +`:r+o},"")}]}calculateResponseLength(e,r,n){return e.type==="success"?(r.push(e.value),n+=e.value.length):e.type==="length"&&(r.push(e.truncatedValue),n+=e.truncatedValue.length),n}async reportCodeBlock(e,r){await r({fileGenerationStatus:"edit-plan-generated",uri:e.resource,basename:Zn(e.resource),editDescription:e.markdownBeforeBlock}),await r({fileGenerationStatus:"updated-code-generated",partialText:e.code,uri:e.resource,basename:Zn(e.resource)})}};function NAo(t){let e=t.split(/\r?\n/),r=/^(`{3,})/,n=!1,o=0,s=!1,c=[];for(let l of e){let u=l.match(r);if(u&&!n)o=u[1].length,n=!0;else if(n){let d=l.match(r);if(d&&d[1].length>=o){s=!0;break}c.push(l)}}return s?c.join(` +`):t}a(NAo,"extractCodeBlock");var XGe=class extends sl{static{a(this,"EditFileTool")}constructor(){super({name:"insert_edit_into_file",displayName:"Edit File",description:`Edit a file in the workspace. Use this tool once per file that needs to be modified, even if there are multiple changes for a file. Generate the "explanation" property first. The system is very smart and can understand how to apply your edits to the files, you just need to provide minimal hints. Avoid repeating existing code, instead use comments to represent regions of unchanged code. Be as concise as possible. For example: // ...existing code... @@ -3188,9 +3177,9 @@ class Person { getAge() { return this.age; } -}`}),explanation:S.String({description:"A short explanation of the edit being made."})})})}async invoke(e,r,n){try{let o=await this.mapCode(r.input,e,n),s=o.code,c=await this.invokeClientEditFileTool(e,r,s,n);return await this.getFinalEditFileResult(e,r,c,o.editSurvivalTrackingSession,o.telemetry)}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new Cr([new fr(s)],"error")}}async mapCode(e,r,n){let{filePath:o}=e,s=Xl(o,r.uriSchemeCache);if(!s)throw new Error(`Invalid file path: ${o}`);return await new HHe(r.ctx).mapCode({code:e.code,resource:s,markdownBeforeBlock:e.explanation},r.toLlmInteraction(),{chatRequestSource:r.conversation.source,chatRequestModel:r.turn.resolvedModelConfiguration?.modelFamily??r.turn.userRequestedModel},n,void 0,!0,r.copilotEditsSessionHeader)}async invokeClientEditFileTool(e,r,n,o){let s=e.ctx.get(Po).getToolByNameAndProvider("insert_edit_into_file",Od);if(!s)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Po).invokeTool(e,s.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,code:n,explanation:r.input.explanation},roundId:r.roundId,toolCallId:r.toolCallId},o)}async getFinalEditFileResult(e,r,n,o,s){if(n.status!=="success")return n;let c=$P({uri:Xl(r.input.filePath,e.uriSchemeCache),languageId:"UNKNOWN"});if(o){let p=await rc(e.ctx,e,void 0);o.startReporter(h=>{this.handleEditSurvivalTelemetry(e,h,p,c,s)})}let l=Nk(n.content),u=[];u.push(``),u.push("This is the new state of the file after the edit. Base future edits off of this file, no need to read it again, unless a terminal command may have changed it.");let d=new Mk({code:l,languageId:c,noFilePath:!0});return u.push(...d.renderAsArray()),u.push(""),new Cr([new fr(u.join(` -`))],"success")}handleEditSurvivalTelemetry(e,r,n,o,s){HHr(e.ctx,"agentPanel",{requestSource:s?.requestSource??"",chatRequestModel:s?.chatRequestModel??"",mapper:s?.mapper??"",headerRequestId:s?.headerRequestId??"",mode:e.turn.getChatModeForTelemetry(),modelId:e.turn.getResolvedModelId()??"unknown",languageId:o},{survivalRateFourGram:r.fourGram,survivalRateNoRevert:r.noRevert,timeDelayMs:r.timeDelayMs,didBranchChange:r.didBranchChange,readDocumentTimeMs:r.readDocumentTimeMs??-1,diffComputationTimeMs:r.diffComputationTimeMs??-1,arc:r.arc??-1,originalCharCount:r.originalCharCount??-1,currentLineCount:r.currentLineCount??-1,currentDeletedLineCount:r.currentDeletedLineCount??-1,originalLineCount:r.originalLineCount??-1,originalDeletedLineCount:r.originalDeletedLineCount??-1},{currentFileContent:r.currentFileContent},n,"codeMapper.trackEditSurvival")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running insert_edit_into_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{progressMessage:`Editing ${Pm(o)} with insert_edit_into_file tool`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(ku),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran insert_edit_into_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{completionMessage:`Edited ${Pm(o)} with insert_edit_into_file tool`}}static toEditFileParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.code!="string")throw new Error("code must be a string");if(typeof e.explanation!="string")throw new Error("explanation must be a string");return{filePath:e.filePath,code:e.code,explanation:e.explanation}}};f();f();var Wtn=require("crypto"),Vk=de(require("fs/promises")),ztn=require("os"),$k=de(require("path"));var HO=class{constructor(e){this.ctx=e;this.logger=new Se("ripgrep");this.resolvePath()}static{a(this,"RipgrepPathResolver")}async resolvePath(){if(this.rgPath)return this.rgPath;let e=process.platform,r=process.arch;return this.rgPath=await this.resolvePathByOs(e,r),process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE?this.logger.info(this.ctx,`GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE already set to: ${process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE}`):(process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE=this.rgPath,this.logger.info(this.ctx,`Set GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE=${this.rgPath}`)),this.rgPath}async resolvePathByOs(e,r){this.logger.debug(this.ctx,`Start resolving ripgrep path for platform: ${e} and architecture: ${r}`);let n=process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE;if(n)return this.logger.info(this.ctx,`Using ripgrep from GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE: ${n}`),n;if(r!=="arm64"&&r!=="x64")throw new Error(`Unsupported architecture: ${r}`);let o=e==="win32"?"rg.exe":"rg";this.logger.debug(this.ctx,`__filename is ${__filename}, __dirname is ${__dirname}`);let s=$k.extname(__filename)===".ts"?$k.resolve(__dirname,"../../../packages/ripgrep/bin"):$k.resolve(__dirname,"./bin"),c=$k.resolve(s,e,r,o);if("pkg"in process){this.logger.debug(this.ctx,"Running inside pkg binary, start to copy ripgrep to a temporary location");let l=await Vk.readFile(c),u=(0,Wtn.createHash)("sha256").update(l).digest("hex"),d=process.env.PKG_NATIVE_CACHE_PATH||$k.join((0,ztn.homedir)(),".cache"),p=$k.join(d,"pkg",u);this.logger.info(this.ctx,`Using tmpFolder for ripgrep: ${p}`),await Vk.mkdir(p,{recursive:!0});let h=ei(Lc(c)),m=$k.join(p,h);try{await Vk.stat(m)}catch{await Vk.copyFile(c,m),this.logger.debug(this.ctx,`Copied ripgrep to ${m}`)}c=m,e!=="win32"&&await Vk.chmod(c,493).catch(g=>{this.logger.error(this.ctx,`Failed to set executable permission for ${c}: ${g}`)})}return this.logger.info(this.ctx,`Resolved ripgrep path: ${c}`),c}};f();var Ytn=require("child_process"),dOt=require("perf_hooks");var jO=new Se("ripgrepProcessManager"),hw=class{constructor(e,r,n){this.ctx=e;this.defaultTimeoutInMs=30*1e3;this.maxProcesses=4;this.maxPendingTasks=20;this.taskQueue=[];this.activeProcesses=new Set;this.maxProcesses=r??this.maxProcesses,this.maxPendingTasks=n??this.maxPendingTasks,jO.debug(this.ctx,`initialized with maxProcesses: ${this.maxProcesses} and maxPendingTasks: ${this.maxPendingTasks}`)}static{a(this,"RipgrepProcessManager")}dispose(){jO.debug(this.ctx,`Disposing ripgrep process manager with ${this.activeProcesses.size} active processes`),this.activeProcesses.forEach(e=>{if(!e.killed)try{e.kill()}catch(r){jO.error(this.ctx,"Failed to kill process. ",r)}}),this.activeProcesses.clear()}execute(e,r,n,o,s){return new Promise((c,l)=>{if(this.taskQueue.length>=this.maxPendingTasks){jO.error(this.ctx,`Task queue limit reached: ${this.maxPendingTasks}`),l(new Error(`Task queue limit of ${this.maxPendingTasks} reached`));return}if(s!==void 0&&s<=0){jO.error(this.ctx,`Invalid timeout value: ${s}`),l(new Error(`Invalid timeout value: ${s}`));return}jO.debug(this.ctx,`Adding task to queue: ${e} ${r.join(" ")}`),this.taskQueue.push({id:Z$(),command:e,args:r,options:o,resolve:c,reject:l,timeoutInMs:s??this.defaultTimeoutInMs,token:n});let u=this.taskQueue.map(d=>this.getTaskSimpleInfo(d)).join(` -`);jO.debug(this.ctx,`Current task queue length: ${this.taskQueue.length}, task list: ${u}`),this.runNextTask()})}runNextTask(){if(this.taskQueue.length===0||this.activeProcesses.size>=this.maxProcesses)return;let e=this.taskQueue.shift(),r=dOt.performance.now();jO.debug(this.ctx,`Starting task: ${this.getTaskSimpleInfo(e)}`);try{let n=(0,Ytn.spawn)(e.command,e.args,e.options);this.activeProcesses.add(n);let o="",s="",c,l=a(()=>{c&&clearTimeout(c),this.activeProcesses.delete(n),n.stdout?.removeAllListeners(),n.stderr?.removeAllListeners(),n.removeAllListeners()},"cleanup");e.timeoutInMs&&(c=setTimeout(()=>{n.killed||(n.kill(),e.reject(new Error(`Process timed out after ${e.timeoutInMs} ms. Partial output: ${o}`))),l(),this.runNextTask()},e.timeoutInMs)),e.token&&e.token.onCancellationRequested(()=>{n.killed||(n.kill(),e.reject(new Error("Process was cancelled. Partial output: "+o))),l(),this.runNextTask()}),n.stdout?.on("data",u=>{o+=u.toString()}),n.stderr?.on("data",u=>{s+=u.toString()}),n.on("close",u=>{let p=dOt.performance.now()-r;jO.debug(this.ctx,`Task ${e.id} completed in ${p} ms`),l(),u===0?e.resolve(o):u===1?e.resolve(""):e.reject(new Error(`Process exited with code ${u}: ${s}`)),this.runNextTask()}),n.on("error",u=>{l(),e.reject(new Error(`Failed to start process: ${u.message}`)),this.runNextTask()})}catch(n){e.reject(new Error(`Error spawning process: ${n.message}`)),this.runNextTask()}}getTaskSimpleInfo(e){return`${e.id} - ${e.command} ${e.args.join(" ")}`}};var Ktn=new Se("findFilesTool"),$He=class t extends pl{static{a(this,"FindFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"file_search",displayName:"Find Files",description:`Search for files in the workspace by glob pattern. Returns matching file paths sorted by modification time. +}`}),explanation:S.String({description:"A short explanation of the edit being made."})})})}async invoke(e,r,n){try{let o=await this.mapCode(r.input,e,n),s=o.code,c=await this.invokeClientEditFileTool(e,r,s,n);return await this.getFinalEditFileResult(e,r,c,o.editSurvivalTrackingSession,o.telemetry)}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new _r([new fr(s)],"error")}}async mapCode(e,r,n){let{filePath:o}=e,s=jl(o,r.uriSchemeCache);if(!s)throw new Error(`Invalid file path: ${o}`);return await new JGe(r.ctx).mapCode({code:e.code,resource:s,markdownBeforeBlock:e.explanation},r.toLlmInteraction(),{chatRequestSource:r.conversation.source,chatRequestModel:r.turn.resolvedModelConfiguration?.modelFamily??r.turn.userRequestedModel},n,void 0,!0,r.copilotEditsSessionHeader)}async invokeClientEditFileTool(e,r,n,o){let s=e.ctx.get(Io).getToolByNameAndProvider("insert_edit_into_file",Id);if(!s)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Io).invokeTool(e,s.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,code:n,explanation:r.input.explanation},roundId:r.roundId,toolCallId:r.toolCallId},o)}async getFinalEditFileResult(e,r,n,o,s){if(n.status!=="success")return n;let c=NP({uri:jl(r.input.filePath,e.uriSchemeCache),languageId:"UNKNOWN"});if(o){let p=await Ja(e.ctx,e,void 0);o.startReporter(h=>{this.handleEditSurvivalTelemetry(e,h,p,c,s)})}let l=_k(n.content),u=[];u.push(``),u.push("This is the new state of the file after the edit. Base future edits off of this file, no need to read it again, unless a terminal command may have changed it.");let d=new vk({code:l,languageId:c,noFilePath:!0});return u.push(...d.renderAsArray()),u.push(""),new _r([new fr(u.join(` +`))],"success")}handleEditSurvivalTelemetry(e,r,n,o,s){Gjr(e.ctx,"agentPanel",{requestSource:s?.requestSource??"",chatRequestModel:s?.chatRequestModel??"",mapper:s?.mapper??"",headerRequestId:s?.headerRequestId??"",mode:e.turn.getChatModeForTelemetry(),modelId:e.turn.getResolvedModelId()??"unknown",languageId:o},{survivalRateFourGram:r.fourGram,survivalRateNoRevert:r.noRevert,timeDelayMs:r.timeDelayMs,didBranchChange:r.didBranchChange,readDocumentTimeMs:r.readDocumentTimeMs??-1,diffComputationTimeMs:r.diffComputationTimeMs??-1,arc:r.arc??-1,originalCharCount:r.originalCharCount??-1,currentLineCount:r.currentLineCount??-1,currentDeletedLineCount:r.currentDeletedLineCount??-1,originalLineCount:r.originalLineCount??-1,originalDeletedLineCount:r.originalDeletedLineCount??-1},{currentFileContent:r.currentFileContent},n,"codeMapper.trackEditSurvival")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running insert_edit_into_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{progressMessage:`Editing ${_m(o)} with insert_edit_into_file tool`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(Cu),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran insert_edit_into_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{completionMessage:`Edited ${_m(o)} with insert_edit_into_file tool`}}static toEditFileParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.code!="string")throw new Error("code must be a string");if(typeof e.explanation!="string")throw new Error("explanation must be a string");return{filePath:e.filePath,code:e.code,explanation:e.explanation}}};f();f();var Vrn=require("crypto"),Mk=de(require("fs/promises")),Wrn=require("os"),Nk=de(require("path"));var S4=class{constructor(e){this.ctx=e;this.logger=new Se("ripgrep");this.resolvePath()}static{a(this,"RipgrepPathResolver")}async resolvePath(){if(this.rgPath)return this.rgPath;let e=process.platform,r=process.arch;return this.rgPath=await this.resolvePathByOs(e,r),process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE?this.logger.info(this.ctx,`GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE already set to: ${process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE}`):(process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE=this.rgPath,this.logger.info(this.ctx,`Set GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE=${this.rgPath}`)),this.rgPath}async resolvePathByOs(e,r){this.logger.debug(this.ctx,`Start resolving ripgrep path for platform: ${e} and architecture: ${r}`);let n=process.env.GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE;if(n)return this.logger.info(this.ctx,`Using ripgrep from GITHUB_COPILOT_RIPGREP_PATH_OVERRIDE: ${n}`),n;if(r!=="arm64"&&r!=="x64")throw new Error(`Unsupported architecture: ${r}`);let o=e==="win32"?"rg.exe":"rg";this.logger.debug(this.ctx,`__filename is ${__filename}, __dirname is ${__dirname}`);let s=Nk.extname(__filename)===".ts"?Nk.resolve(__dirname,"../../../packages/ripgrep/bin"):Nk.resolve(__dirname,"./bin"),c=Nk.resolve(s,e,r,o);if("pkg"in process){this.logger.debug(this.ctx,"Running inside pkg binary, start to copy ripgrep to a temporary location");let l=await Mk.readFile(c),u=(0,Vrn.createHash)("sha256").update(l).digest("hex"),d=process.env.PKG_NATIVE_CACHE_PATH||Nk.join((0,Wrn.homedir)(),".cache"),p=Nk.join(d,"pkg",u);this.logger.info(this.ctx,`Using tmpFolder for ripgrep: ${p}`),await Mk.mkdir(p,{recursive:!0});let h=Zn(kc(c)),m=Nk.join(p,h);try{await Mk.stat(m)}catch{await Mk.copyFile(c,m),this.logger.debug(this.ctx,`Copied ripgrep to ${m}`)}c=m,e!=="win32"&&await Mk.chmod(c,493).catch(g=>{this.logger.error(this.ctx,`Failed to set executable permission for ${c}: ${g}`)})}return this.logger.info(this.ctx,`Resolved ripgrep path: ${c}`),c}};f();var zrn=require("child_process"),k4t=require("perf_hooks");var I4=new Se("ripgrepProcessManager"),nw=class{constructor(e,r,n){this.ctx=e;this.defaultTimeoutInMs=30*1e3;this.maxProcesses=4;this.maxPendingTasks=20;this.taskQueue=[];this.activeProcesses=new Set;this.maxProcesses=r??this.maxProcesses,this.maxPendingTasks=n??this.maxPendingTasks,I4.debug(this.ctx,`initialized with maxProcesses: ${this.maxProcesses} and maxPendingTasks: ${this.maxPendingTasks}`)}static{a(this,"RipgrepProcessManager")}dispose(){I4.debug(this.ctx,`Disposing ripgrep process manager with ${this.activeProcesses.size} active processes`),this.activeProcesses.forEach(e=>{if(!e.killed)try{e.kill()}catch(r){I4.error(this.ctx,"Failed to kill process. ",r)}}),this.activeProcesses.clear()}execute(e,r,n,o,s){return new Promise((c,l)=>{if(this.taskQueue.length>=this.maxPendingTasks){I4.error(this.ctx,`Task queue limit reached: ${this.maxPendingTasks}`),l(new Error(`Task queue limit of ${this.maxPendingTasks} reached`));return}if(s!==void 0&&s<=0){I4.error(this.ctx,`Invalid timeout value: ${s}`),l(new Error(`Invalid timeout value: ${s}`));return}I4.debug(this.ctx,`Adding task to queue: ${e} ${r.join(" ")}`),this.taskQueue.push({id:s$(),command:e,args:r,options:o,resolve:c,reject:l,timeoutInMs:s??this.defaultTimeoutInMs,token:n});let u=this.taskQueue.map(d=>this.getTaskSimpleInfo(d)).join(` +`);I4.debug(this.ctx,`Current task queue length: ${this.taskQueue.length}, task list: ${u}`),this.runNextTask()})}runNextTask(){if(this.taskQueue.length===0||this.activeProcesses.size>=this.maxProcesses)return;let e=this.taskQueue.shift(),r=k4t.performance.now();I4.debug(this.ctx,`Starting task: ${this.getTaskSimpleInfo(e)}`);try{let n=(0,zrn.spawn)(e.command,e.args,e.options);this.activeProcesses.add(n);let o="",s="",c,l=a(()=>{c&&clearTimeout(c),this.activeProcesses.delete(n),n.stdout?.removeAllListeners(),n.stderr?.removeAllListeners(),n.removeAllListeners()},"cleanup");e.timeoutInMs&&(c=setTimeout(()=>{n.killed||(n.kill(),e.reject(new Error(`Process timed out after ${e.timeoutInMs} ms. Partial output: ${o}`))),l(),this.runNextTask()},e.timeoutInMs)),e.token&&e.token.onCancellationRequested(()=>{n.killed||(n.kill(),e.reject(new Error("Process was cancelled. Partial output: "+o))),l(),this.runNextTask()}),n.stdout?.on("data",u=>{o+=u.toString()}),n.stderr?.on("data",u=>{s+=u.toString()}),n.on("close",u=>{let p=k4t.performance.now()-r;I4.debug(this.ctx,`Task ${e.id} completed in ${p} ms`),l(),u===0?e.resolve(o):u===1?e.resolve(""):e.reject(new Error(`Process exited with code ${u}: ${s}`)),this.runNextTask()}),n.on("error",u=>{l(),e.reject(new Error(`Failed to start process: ${u.message}`)),this.runNextTask()})}catch(n){e.reject(new Error(`Error spawning process: ${n.message}`)),this.runNextTask()}}getTaskSimpleInfo(e){return`${e.id} - ${e.command} ${e.args.join(" ")}`}};var Yrn=new Se("findFilesTool"),ZGe=class t extends sl{static{a(this,"FindFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"file_search",displayName:"Find Files",description:`Search for files in the workspace by glob pattern. Returns matching file paths sorted by modification time. When to Use: - Find files by name or extension pattern @@ -3206,11 +3195,11 @@ Usage: Glob pattern examples: - **/*.{js,ts} to match all js/ts files in the workspace - src/** to match all files under the top-level src folder -- **/foo/**/*.js to match all js files under any foo folder`,displayDescription:"Search for files in the workspace by glob pattern.",inputSchema:S.Object({query:S.String({description:"Search for files with names or paths matching this glob pattern."}),maxResults:S.Optional(S.Number({description:"The maximum number of results to return. Do not use this unless necessary, it can slow things down. By default, only some matches are returned. If you use this and don't see what you're looking for, you can try again with a more specific query or a larger maxResults."}))})})}async invoke(e,r,n){try{let o;try{if(n.isCancellationRequested)return new Cr([new fr("Cancelled")],"cancelled");o=await e.ctx.get(HO).resolvePath()}catch(A){throw new Error(`Failed to run file_search since failed to get ripgrep path: ${String(A)}`)}let{query:s,maxResults:c=20}=r.input,l=e.turn.workspaceFolders;if(!l?.length)return new Cr([new fr("Failed to invoke tool file_search since no workspace folders found")],"error");let u=e.ctx.get(hw),d={},p=l.map(async A=>{if(n.isCancellationRequested)throw new Error("Canceled");try{Ktn.debug(e.ctx,`Start searching for query ${s} in workspace folder: ${A.uri.toString()}`);let y=await u.execute(o,["--files","-g",s],n,{cwd:Qo(A.uri)},t.timeOutInSeconds*1e3);Ktn.debug(e.ctx,`Finished searching for query ${s} in workspace folder: ${A.uri.toString()} with results: ${y}`),d[A.uri.toString()]=y.split(` -`).map(E=>E.trim()).filter(E=>E.length>0).map(E=>`${Qo(Ti(A.uri,E))}`)}catch(y){let E=y instanceof Error?y.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${A.uri.toString()}: ${E}`)}});try{await Promise.all(p)}catch(A){let y=A instanceof Error?A.message:"An unknown error occurred";return new Cr([new fr(y)],"error")}let h=[],m=c;for(;m>0;){let A=!1;for(let y in d)d[y].length>0&&m>0&&(h.push(d[y].shift()),m--,A=!0);if(!A)break}let g=h.length===0?`No files found matching query: ${s}`:h.length===1?`Found 1 file matching query: ${s} +- **/foo/**/*.js to match all js files under any foo folder`,displayDescription:"Search for files in the workspace by glob pattern.",inputSchema:S.Object({query:S.String({description:"Search for files with names or paths matching this glob pattern."}),maxResults:S.Optional(S.Number({description:"The maximum number of results to return. Do not use this unless necessary, it can slow things down. By default, only some matches are returned. If you use this and don't see what you're looking for, you can try again with a more specific query or a larger maxResults."}))})})}async invoke(e,r,n){try{let o;try{if(n.isCancellationRequested)return new _r([new fr("Cancelled")],"cancelled");o=await e.ctx.get(S4).resolvePath()}catch(A){throw new Error(`Failed to run file_search since failed to get ripgrep path: ${String(A)}`)}let{query:s,maxResults:c=20}=r.input,l=e.turn.workspaceFolders;if(!l?.length)return new _r([new fr("Failed to invoke tool file_search since no workspace folders found")],"error");let u=e.ctx.get(nw),d={},p=l.map(async A=>{if(n.isCancellationRequested)throw new Error("Canceled");try{Yrn.debug(e.ctx,`Start searching for query ${s} in workspace folder: ${A.uri.toString()}`);let y=await u.execute(o,["--files","-g",s],n,{cwd:Bo(A.uri)},t.timeOutInSeconds*1e3);Yrn.debug(e.ctx,`Finished searching for query ${s} in workspace folder: ${A.uri.toString()} with results: ${y}`),d[A.uri.toString()]=y.split(` +`).map(E=>E.trim()).filter(E=>E.length>0).map(E=>`${Bo(bi(A.uri,E))}`)}catch(y){let E=y instanceof Error?y.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${A.uri.toString()}: ${E}`)}});try{await Promise.all(p)}catch(A){let y=A instanceof Error?A.message:"An unknown error occurred";return new _r([new fr(y)],"error")}let h=[],m=c;for(;m>0;){let A=!1;for(let y in d)d[y].length>0&&m>0&&(h.push(d[y].shift()),m--,A=!0);if(!A)break}let g=h.length===0?`No files found matching query: ${s}`:h.length===1?`Found 1 file matching query: ${s} ${h[0]}`:`Found ${h.length} files matching query: ${s} ${h.join(` -`)}`;return new Cr([new fr(g)],"success")}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new Cr([new fr(s)],"error")}}prepareInvocation(e,r){let{input:n}=e;return n.query.length?{progressMessage:`Searching for files matching query: ${n.query}`}:{progressMessage:"Running file_search tool"}}prepareCompletion(e,r){let{input:n}=e;return n.query.length?{completionMessage:`Searched for files matching query: ${n.query}`}:{completionMessage:"Ran file_search tool"}}static toFindFilesParams(e){if(typeof e.query!="string")throw new Error("query must be a string");if(e.maxResults!=null&&(typeof e.maxResults!="number"||e.maxResults<0))throw new Error("maxResults must be a positive number or undefined");return{query:e.query,maxResults:typeof e.maxResults=="number"?e.maxResults:void 0}}};f();var Jtn=new Se("findTextInFilesTool"),VHe=class t extends pl{static{a(this,"FindTextInFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"grep_search",displayName:"Find Text In Files",description:`A text search tool for finding exact text or regex patterns in files. +`)}`;return new _r([new fr(g)],"success")}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new _r([new fr(s)],"error")}}prepareInvocation(e,r){let{input:n}=e;return n.query.length?{progressMessage:`Searching for files matching query: ${n.query}`}:{progressMessage:"Running file_search tool"}}prepareCompletion(e,r){let{input:n}=e;return n.query.length?{completionMessage:`Searched for files matching query: ${n.query}`}:{completionMessage:"Ran file_search tool"}}static toFindFilesParams(e){if(typeof e.query!="string")throw new Error("query must be a string");if(e.maxResults!=null&&(typeof e.maxResults!="number"||e.maxResults<0))throw new Error("maxResults must be a positive number or undefined");return{query:e.query,maxResults:typeof e.maxResults=="number"?e.maxResults:void 0}}};f();var Krn=new Se("findTextInFilesTool"),eHe=class t extends sl{static{a(this,"FindTextInFilesTool")}static{this.timeOutInSeconds=15}constructor(){super({name:"grep_search",displayName:"Find Text In Files",description:`A text search tool for finding exact text or regex patterns in files. When to Use: - Exact text or symbol searches (function names, variable names, imports) @@ -3223,12 +3212,12 @@ When NOT to Use: Usage: - Supports regex syntax when isRegexp is true (e.g., "log.*Error", "function\\s+\\w+") -- Use includePattern to filter by file type (e.g., "*.js", "*.{ts,tsx}")`,displayDescription:"Do a text search in the workspace.",inputSchema:S.Object({query:S.String({description:"The pattern to search for in files in the workspace. Can be a regex or plain text pattern"}),isRegexp:S.Optional(S.Boolean({description:"Whether the pattern is a regex. False by default."})),includePattern:S.Optional(S.String({description:"Search files matching this glob pattern. Will be applied to the relative path of files within the workspace."}))})})}async invoke(e,r,n){try{let o;try{if(n.isCancellationRequested)return new Cr([new fr("Cancelled")],"cancelled");o=await e.ctx.get(HO).resolvePath()}catch(E){throw new Error(`Failed to run grep_search since failed to get ripgrep path: ${String(E)}`)}let{query:s,isRegexp:c=!1,includePattern:l}=r.input,u=20,d=e.turn.workspaceFolders;if(!d?.length)return new Cr([new fr("Failed to invoke tool grep_search since no workspace folders found")],"error");let p=e.ctx.get(hw),h={},m=d.map(async E=>{if(n.isCancellationRequested)throw new Error("Canceled");try{Jtn.debug(e.ctx,`Start searching for query ${s} in workspace folder: ${E.uri.toString()}`);let _=[c?"--regexp":"--fixed-strings",s,...l?["-g",l]:[],"--no-heading","--line-number","--color","never",Qo(E.uri)],v=await p.execute(o,_,n,{cwd:Qo(E.uri)},t.timeOutInSeconds*1e3);Jtn.debug(e.ctx,`Finished searching for query ${s} in workspace folder: ${E.uri.toString()} with results: ${v}`),h[E.uri.toString()]=v.split(` -`).map(b=>b.trim()).filter(b=>b.length>0)}catch(_){let v=_ instanceof Error?_.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${E.uri.toString()}: ${v}`)}});try{await Promise.all(m)}catch(E){let _=E instanceof Error?E.message:"An unknown error occurred";return new Cr([new fr(_)],"error")}let g=[],A=u;for(;A>0;){let E=!1;for(let _ in h)h[_].length>0&&A>0&&(g.push(h[_].shift()),A--,E=!0);if(!E)break}let y=g.length===0?`Searched text for ${s}, no results`:g.length===1?`Searched text for: ${s}, 1 result +- Use includePattern to filter by file type (e.g., "*.js", "*.{ts,tsx}")`,displayDescription:"Do a text search in the workspace.",inputSchema:S.Object({query:S.String({description:"The pattern to search for in files in the workspace. Can be a regex or plain text pattern"}),isRegexp:S.Optional(S.Boolean({description:"Whether the pattern is a regex. False by default."})),includePattern:S.Optional(S.String({description:"Search files matching this glob pattern. Will be applied to the relative path of files within the workspace."}))})})}async invoke(e,r,n){try{let o;try{if(n.isCancellationRequested)return new _r([new fr("Cancelled")],"cancelled");o=await e.ctx.get(S4).resolvePath()}catch(E){throw new Error(`Failed to run grep_search since failed to get ripgrep path: ${String(E)}`)}let{query:s,isRegexp:c=!1,includePattern:l}=r.input,u=20,d=e.turn.workspaceFolders;if(!d?.length)return new _r([new fr("Failed to invoke tool grep_search since no workspace folders found")],"error");let p=e.ctx.get(nw),h={},m=d.map(async E=>{if(n.isCancellationRequested)throw new Error("Canceled");try{Krn.debug(e.ctx,`Start searching for query ${s} in workspace folder: ${E.uri.toString()}`);let _=[c?"--regexp":"--fixed-strings",s,...l?["-g",l]:[],"--no-heading","--line-number","--color","never",Bo(E.uri)],v=await p.execute(o,_,n,{cwd:Bo(E.uri)},t.timeOutInSeconds*1e3);Krn.debug(e.ctx,`Finished searching for query ${s} in workspace folder: ${E.uri.toString()} with results: ${v}`),h[E.uri.toString()]=v.split(` +`).map(b=>b.trim()).filter(b=>b.length>0)}catch(_){let v=_ instanceof Error?_.message:"An unknown error occurred";throw new Error(`Error processing workspace folder ${E.uri.toString()}: ${v}`)}});try{await Promise.all(m)}catch(E){let _=E instanceof Error?E.message:"An unknown error occurred";return new _r([new fr(_)],"error")}let g=[],A=u;for(;A>0;){let E=!1;for(let _ in h)h[_].length>0&&A>0&&(g.push(h[_].shift()),A--,E=!0);if(!E)break}let y=g.length===0?`Searched text for ${s}, no results`:g.length===1?`Searched text for: ${s}, 1 result ${g[0]}`:`Searched text for: ${s}, ${g.length} results ${g.join(` -`)}`;return new Cr([new fr(y)],"success")}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new Cr([new fr(s)],"error")}}prepareInvocation(e,r){let{input:n}=e;return n.query.length?{progressMessage:`Searching for text in files matching query: ${n.query}`}:{progressMessage:"Running grep_search tool"}}prepareCompletion(e,r){let{input:n}=e;return n.query.length?{completionMessage:`Searched for text in files matching query: ${n.query}`}:{completionMessage:"Ran grep_search tool"}}static toFindTextInFilesParams(e){if(typeof e.query!="string")throw new Error("query must be a string");if(e.isRegexp!==void 0&&typeof e.isRegexp!="boolean")throw new Error("isRegexp must be a boolean");if(e.includePattern!==void 0&&typeof e.includePattern!="string")throw new Error("includePattern must be a string");return{query:e.query,isRegexp:e.isRegexp??!1,includePattern:e.includePattern}}};f();var zHe=de(require("path"));var WHe=class extends pl{static{a(this,"ListDirTool")}constructor(){super({name:"list_dir",displayName:"List Directory",description:"List the contents of a directory. Result will have the name of the child. If the name ends in /, it's a folder, otherwise a file",displayDescription:"List the contents of a directory",inputSchema:S.Object({path:S.String({description:"The absolute path to the directory to list."})})})}async invoke(e,r,n){let{path:o}=r.input,s=e.turn.workspaceFolders,c=e.turn.workspaceFolder,l=Xl(o,e.uriSchemeCache);if(!this.isPathWithinWorkspace(l,s,c))return new Cr([new fr("Error: Path is outside of workspace folders")],"error");let d=await e.ctx.get(Xn).readDirectory(l.toString());return d.length===0?new Cr([new fr("Folder is empty")],"success"):new Cr([new fr(d.map(([p,h])=>`${p}${h&2?"/":""}`).join(` -`))],"success")}prepareInvocation(e,r){let n=Xl(e.input.path,e.uriSchemeCache);return{progressMessage:`Reading directory ${Pm(n)}`}}prepareCompletion(e,r){let n=Xl(e.input.path,e.uriSchemeCache);return{completionMessage:`Read directory ${Pm(n)}`}}isPathWithinWorkspace(e,r,n){return!r&&!n?!0:r&&r.length>0?r.some(o=>this.isUriWithinDirectory(e,o.uri)):n?this.isUriWithinDirectory(e,n.uri):!1}isUriWithinDirectory(e,r){let n=Eo(e),o=Eo(r);if(!n||!o)return!1;let s=zHe.relative(o,n);return s===""?!0:!s.startsWith("..")&&!zHe.isAbsolute(s)}static toListDirParams(e){if(typeof e.path!="string")throw new Error("path must be a string");return{path:e.path}}};f();var YHe=2e3,KHe=class t extends pl{static{a(this,"ReadFileTool")}constructor(){super({name:"read_file",displayName:"Read File",description:`Read the contents of a file from the local filesystem. +`)}`;return new _r([new fr(y)],"success")}catch(o){let s=o instanceof Error?o.message:"An unknown error occurred";return new _r([new fr(s)],"error")}}prepareInvocation(e,r){let{input:n}=e;return n.query.length?{progressMessage:`Searching for text in files matching query: ${n.query}`}:{progressMessage:"Running grep_search tool"}}prepareCompletion(e,r){let{input:n}=e;return n.query.length?{completionMessage:`Searched for text in files matching query: ${n.query}`}:{completionMessage:"Ran grep_search tool"}}static toFindTextInFilesParams(e){if(typeof e.query!="string")throw new Error("query must be a string");if(e.isRegexp!==void 0&&typeof e.isRegexp!="boolean")throw new Error("isRegexp must be a boolean");if(e.includePattern!==void 0&&typeof e.includePattern!="string")throw new Error("includePattern must be a string");return{query:e.query,isRegexp:e.isRegexp??!1,includePattern:e.includePattern}}};f();var rHe=de(require("path"));var tHe=class extends sl{static{a(this,"ListDirTool")}constructor(){super({name:"list_dir",displayName:"List Directory",description:"List the contents of a directory. Result will have the name of the child. If the name ends in /, it's a folder, otherwise a file",displayDescription:"List the contents of a directory",inputSchema:S.Object({path:S.String({description:"The absolute path to the directory to list."})})})}async invoke(e,r,n){let{path:o}=r.input,s=e.turn.workspaceFolders,c=e.turn.workspaceFolder,l=jl(o,e.uriSchemeCache);if(!this.isPathWithinWorkspace(l,s,c))return new _r([new fr("Error: Path is outside of workspace folders")],"error");let d=await e.ctx.get(Jn).readDirectory(l.toString());return d.length===0?new _r([new fr("Folder is empty")],"success"):new _r([new fr(d.map(([p,h])=>`${p}${h&2?"/":""}`).join(` +`))],"success")}prepareInvocation(e,r){let n=jl(e.input.path,e.uriSchemeCache);return{progressMessage:`Reading directory ${_m(n)}`}}prepareCompletion(e,r){let n=jl(e.input.path,e.uriSchemeCache);return{completionMessage:`Read directory ${_m(n)}`}}isPathWithinWorkspace(e,r,n){return!r&&!n?!0:r&&r.length>0?r.some(o=>this.isUriWithinDirectory(e,o.uri)):n?this.isUriWithinDirectory(e,n.uri):!1}isUriWithinDirectory(e,r){let n=mo(e),o=mo(r);if(!n||!o)return!1;let s=rHe.relative(o,n);return s===""?!0:!s.startsWith("..")&&!rHe.isAbsolute(s)}static toListDirParams(e){if(typeof e.path!="string")throw new Error("path must be a string");return{path:e.path}}};f();var nHe=2e3,iHe=class t extends sl{static{a(this,"ReadFileTool")}constructor(){super({name:"read_file",displayName:"Read File",description:`Read the contents of a file from the local filesystem. When to Use: - Reading known files you've already located @@ -3239,33 +3228,33 @@ Usage: - Prefer reading larger meaningful chunks over doing many small reads - You can call this tool again if initial contents are insufficient - It is always better to speculatively read multiple files as a batch that are potentially useful -- You don't need to read a file if it's already provided in context`,displayDescription:"Read a file in the workspace.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to read."}),offset:S.Optional(S.Number({description:"Optional: the 1-based line number to start reading from. Only use this if the file is too large to read at once. If not specified, the file will be read from the beginning."})),limit:S.Optional(S.Number({description:"Optional: the maximum number of lines to read. Only use this together with `offset` if the file is too large to read at once."}))})})}async invoke(e,r,n){try{let{filePath:o,offset:s,limit:c}=t.toReadFileParams(r.input),l=Math.min(Math.max(1,c??YHe),YHe),u=Math.max(1,s??1),d=u+l-1,p=Xl(o,e.uriSchemeCache);if(!p)throw new Error(`Invalid file path: ${o}`);let m=await e.ctx.get(In).getOrReadTextDocument({uri:p});if(m.status==="valid"){let g=m.document.getText();if(g.length===0)return new Cr([new fr(`The file \`${o}\` exists, but is empty.`)],"success");if(g.trim().length===0)return new Cr([new fr(`The file \`${o}\` exists, but contains only whitespace.`)],"success");let A=m.document.lineCount,y=Math.min(d,A),E=l!==c&&y= 1), received: ${n}`)}if(o!==void 0){if(typeof o!="number")throw new Error(`limit must be a number, received: ${typeof o}`);if(o<1)throw new Error(`limit must be positive (>= 1), received: ${o}`)}return{filePath:r,offset:n,limit:o}}};f();f();var C_e=class extends Error{static{a(this,"EditError")}constructor(e,r){super(e),this.kindForTelemetry=r}},JHe=class extends C_e{static{a(this,"NoMatchError")}constructor(e,r){super(e,"noMatchFound"),this.file=r}},XHe=class extends C_e{static{a(this,"MultipleMatchesError")}constructor(e,r){super(e,"multipleMatchesFound"),this.file=r}},ZHe=class extends C_e{static{a(this,"NoChangeError")}constructor(e,r){super(e,"noChange"),this.file=r}};function Dmo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Dmo,"escapeRegex");function Mmo(t,e){if(t===e)return 1;if(t.length===0||e.length===0)return 0;let r=[];for(let s=0;s<=t.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=t.length;s++)for(let c=1;c<=e.length;c++){let l=t[s-1]===e[c-1]?0:1;r[s][c]=Math.min(r[s-1][c]+1,r[s][c-1]+1,r[s-1][c-1]+l)}let n=r[t.length][e.length],o=Math.max(t.length,e.length);return 1-n/o}a(Mmo,"calculateSimilarity");function fOt(t,e,r,n){let o=r.replace(/\r\n/g,` -`).replace(/\n/g,n),s=Omo(t,e,o);if(s.type!=="none")return s;let c=Bmo(t,e,o,n);if(c.type!=="none")return c;let l=Lmo(t,e,o,n);if(l.type!=="none")return l;let u=Fmo(t,e,o,n,.8);return u.type!=="none"?u:{text:t,type:"none",editPosition:[],suggestion:"Try making your search string more specific or checking for whitespace/formatting differences."}}a(fOt,"findAndReplaceOne");function Omo(t,e,r){if(e.length===0)return{text:t,editPosition:[],type:"none"};let n=[];for(let c=0;;){let l=t.indexOf(e,c);if(l===-1)break;n.push(l),c=l+e.length}if(n.length===0)return{text:t,editPosition:[],type:"none"};if(n.length>1)return{text:t,type:"multiple",editPosition:n.map(c=>[c,c+e.length]),strategy:"exact",matchPositions:n,suggestion:"Multiple exact matches found. Make your search string more specific."};let o=n[0];return{text:t.slice(0,o)+r+t.slice(o+e.length),type:"exact",editPosition:[[o,o+e.length]]}}a(Omo,"tryExactMatch");function Bmo(t,e,r,n){let o=t.split(n),s=e.split(n),c=o.map(m=>m.trim()),l=s.map(m=>m.trim()),u=[];for(let m=0;m<=c.length-l.length;m++){let g=!0;for(let A=0;A1)return{text:t,type:"multiple",editPosition:[],matchPositions:u,suggestion:"Multiple matches found with flexible whitespace. Make your search string more unique.",strategy:"whitespace"};let d=u[0],p=d+l.length;return{text:[...o.slice(0,d),r,...o.slice(p)].join(n),editPosition:[[d,p]],type:"whitespace"}}a(Bmo,"tryWhitespaceFlexibleMatch");function Lmo(t,e,r,n){if(!e.trim())return{text:t,editPosition:[],type:"none",suggestion:"Cannot perform fuzzy match with empty search string."};let o=t.replace(/\r\n/g,` +- You don't need to read a file if it's already provided in context`,displayDescription:"Read a file in the workspace.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to read."}),offset:S.Optional(S.Number({description:"Optional: the 1-based line number to start reading from. Only use this if the file is too large to read at once. If not specified, the file will be read from the beginning."})),limit:S.Optional(S.Number({description:"Optional: the maximum number of lines to read. Only use this together with `offset` if the file is too large to read at once."}))})})}async invoke(e,r,n){try{let{filePath:o,offset:s,limit:c}=t.toReadFileParams(r.input),l=Math.min(Math.max(1,c??nHe),nHe),u=Math.max(1,s??1),d=u+l-1,p=jl(o,e.uriSchemeCache);if(!p)throw new Error(`Invalid file path: ${o}`);let m=await e.ctx.get(In).getOrReadTextDocument({uri:p});if(m.status==="valid"){let g=m.document.getText();if(g.length===0)return new _r([new fr(`The file \`${o}\` exists, but is empty.`)],"success");if(g.trim().length===0)return new _r([new fr(`The file \`${o}\` exists, but contains only whitespace.`)],"success");let A=m.document.lineCount,y=Math.min(d,A),E=l!==c&&y= 1), received: ${n}`)}if(o!==void 0){if(typeof o!="number")throw new Error(`limit must be a number, received: ${typeof o}`);if(o<1)throw new Error(`limit must be positive (>= 1), received: ${o}`)}return{filePath:r,offset:n,limit:o}}};f();f();var A_e=class extends Error{static{a(this,"EditError")}constructor(e,r){super(e),this.kindForTelemetry=r}},oHe=class extends A_e{static{a(this,"NoMatchError")}constructor(e,r){super(e,"noMatchFound"),this.file=r}},sHe=class extends A_e{static{a(this,"MultipleMatchesError")}constructor(e,r){super(e,"multipleMatchesFound"),this.file=r}},aHe=class extends A_e{static{a(this,"NoChangeError")}constructor(e,r){super(e,"noChange"),this.file=r}};function MAo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(MAo,"escapeRegex");function OAo(t,e){if(t===e)return 1;if(t.length===0||e.length===0)return 0;let r=[];for(let s=0;s<=t.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=t.length;s++)for(let c=1;c<=e.length;c++){let l=t[s-1]===e[c-1]?0:1;r[s][c]=Math.min(r[s-1][c]+1,r[s][c-1]+1,r[s-1][c-1]+l)}let n=r[t.length][e.length],o=Math.max(t.length,e.length);return 1-n/o}a(OAo,"calculateSimilarity");function D4t(t,e,r,n){let o=r.replace(/\r\n/g,` +`).replace(/\n/g,n),s=BAo(t,e,o);if(s.type!=="none")return s;let c=LAo(t,e,o,n);if(c.type!=="none")return c;let l=FAo(t,e,o,n);if(l.type!=="none")return l;let u=UAo(t,e,o,n,.8);return u.type!=="none"?u:{text:t,type:"none",editPosition:[],suggestion:"Try making your search string more specific or checking for whitespace/formatting differences."}}a(D4t,"findAndReplaceOne");function BAo(t,e,r){if(e.length===0)return{text:t,editPosition:[],type:"none"};let n=[];for(let c=0;;){let l=t.indexOf(e,c);if(l===-1)break;n.push(l),c=l+e.length}if(n.length===0)return{text:t,editPosition:[],type:"none"};if(n.length>1)return{text:t,type:"multiple",editPosition:n.map(c=>[c,c+e.length]),strategy:"exact",matchPositions:n,suggestion:"Multiple exact matches found. Make your search string more specific."};let o=n[0];return{text:t.slice(0,o)+r+t.slice(o+e.length),type:"exact",editPosition:[[o,o+e.length]]}}a(BAo,"tryExactMatch");function LAo(t,e,r,n){let o=t.split(n),s=e.split(n),c=o.map(m=>m.trim()),l=s.map(m=>m.trim()),u=[];for(let m=0;m<=c.length-l.length;m++){let g=!0;for(let A=0;A1)return{text:t,type:"multiple",editPosition:[],matchPositions:u,suggestion:"Multiple matches found with flexible whitespace. Make your search string more unique.",strategy:"whitespace"};let d=u[0],p=d+l.length;return{text:[...o.slice(0,d),r,...o.slice(p)].join(n),editPosition:[[d,p]],type:"whitespace"}}a(LAo,"tryWhitespaceFlexibleMatch");function FAo(t,e,r,n){if(!e.trim())return{text:t,editPosition:[],type:"none",suggestion:"Cannot perform fuzzy match with empty search string."};let o=t.replace(/\r\n/g,` `).replace(/\r/g,` `),s=e.replace(/\r\n/g,` `).replace(/\r/g,` -`);if(o.includes(s)){let E=o.indexOf(s),_=0,v=0;for(let w=0;w0;w++)t[w]==="\r"&&t[w+1]===` -`?(w++,I--,b=w+1):(I--,b=w+1);let x=t.substring(0,_),R=t.substring(b);return{text:x+r+R,editPosition:[[_,b]],type:"fuzzy"}}let c=e.endsWith(n),l=e;c&&(l=e.slice(0,-n.length));let u=l.split(n),d=u.map((E,_)=>{let v=Dmo(E);return _1)return{text:t,type:"multiple",editPosition:[],suggestion:"Multiple fuzzy matches found. Try including more context in your search string.",strategy:"fuzzy",matchPositions:h.map(E=>E.index||0)};let m=h[0],g=m.index||0,A=g+m[0].length;return{text:t.slice(0,g)+r+t.slice(A),type:"fuzzy",editPosition:[[g,A]]}}a(Lmo,"tryFuzzyMatch");function Fmo(t,e,r,n,o=.95){if(e.length>1e3||e.split(n).length>20)return{text:t,editPosition:[],type:"none"};let s=t.split(n),c=e.split(n);if(s.length>1e3)return{text:t,editPosition:[],type:"none"};let l={index:-1,similarity:0,length:0};for(let u=0;u<=s.length-c.length;u++){let d=0;for(let h=0;ho&&p>l.similarity&&(l={index:u,similarity:p,length:c.length})}if(l.index!==-1){let u=l.index,d=[...s];return d.splice(u,l.length,...r.split(n)),{text:d.join(n),type:"similarity",editPosition:[[u,u+l.length]],similarity:l.similarity,suggestion:`Used similarity matching (${(l.similarity*100).toFixed(1)}% similar). Verify the replacement.`}}return{text:t,editPosition:[],type:"none"}}a(Fmo,"trySimilarityMatch");var Xtn=new Se("replaceStringTool"),eje=class extends pl{static{a(this,"ReplaceStringTool")}constructor(){super({name:"replace_string_in_file",displayName:"Replace String",description:"Replace a specific string in a file with new content. Use this tool when you need to make precise text replacements. For best results, include sufficient context (3-5 lines before and after) to make the old string unique. The system will try multiple matching strategies if exact matching fails.",displayDescription:"Replace a specific string in a file.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),oldString:S.String({description:"The exact literal text to replace. Must uniquely identify the single instance to change. Include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely."}),newString:S.String({description:"The exact literal text to replace oldString with."}),explanation:S.Optional(S.String({description:"A short explanation of the string replacement being made."}))})})}async invoke(e,r,n){let{filePath:o,oldString:s,newString:c}=r.input;try{Xtn.debug(e.ctx,`Start to replace string in file: ${o}`);let l=Xl(o,e.uriSchemeCache);if(s===c)throw new ZHe("Input and output are identical",o);let u=await this.readFileContent(e,l,n),d=u.includes(`\r +`);if(o.includes(s)){let E=o.indexOf(s),_=0,v=0;for(let R=0;R0;R++)t[R]==="\r"&&t[R+1]===` +`?(R++,I--,b=R+1):(I--,b=R+1);let x=t.substring(0,_),w=t.substring(b);return{text:x+r+w,editPosition:[[_,b]],type:"fuzzy"}}let c=e.endsWith(n),l=e;c&&(l=e.slice(0,-n.length));let u=l.split(n),d=u.map((E,_)=>{let v=MAo(E);return _1)return{text:t,type:"multiple",editPosition:[],suggestion:"Multiple fuzzy matches found. Try including more context in your search string.",strategy:"fuzzy",matchPositions:h.map(E=>E.index||0)};let m=h[0],g=m.index||0,A=g+m[0].length;return{text:t.slice(0,g)+r+t.slice(A),type:"fuzzy",editPosition:[[g,A]]}}a(FAo,"tryFuzzyMatch");function UAo(t,e,r,n,o=.95){if(e.length>1e3||e.split(n).length>20)return{text:t,editPosition:[],type:"none"};let s=t.split(n),c=e.split(n);if(s.length>1e3)return{text:t,editPosition:[],type:"none"};let l={index:-1,similarity:0,length:0};for(let u=0;u<=s.length-c.length;u++){let d=0;for(let h=0;ho&&p>l.similarity&&(l={index:u,similarity:p,length:c.length})}if(l.index!==-1){let u=l.index,d=[...s];return d.splice(u,l.length,...r.split(n)),{text:d.join(n),type:"similarity",editPosition:[[u,u+l.length]],similarity:l.similarity,suggestion:`Used similarity matching (${(l.similarity*100).toFixed(1)}% similar). Verify the replacement.`}}return{text:t,editPosition:[],type:"none"}}a(UAo,"trySimilarityMatch");var Jrn=new Se("replaceStringTool"),cHe=class extends sl{static{a(this,"ReplaceStringTool")}constructor(){super({name:"replace_string_in_file",displayName:"Replace String",description:"Replace a specific string in a file with new content. Use this tool when you need to make precise text replacements. For best results, include sufficient context (3-5 lines before and after) to make the old string unique. The system will try multiple matching strategies if exact matching fails.",displayDescription:"Replace a specific string in a file.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),oldString:S.String({description:"The exact literal text to replace. Must uniquely identify the single instance to change. Include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely."}),newString:S.String({description:"The exact literal text to replace oldString with."}),explanation:S.Optional(S.String({description:"A short explanation of the string replacement being made."}))})})}async invoke(e,r,n){let{filePath:o,oldString:s,newString:c}=r.input;try{Jrn.debug(e.ctx,`Start to replace string in file: ${o}`);let l=jl(o,e.uriSchemeCache);if(s===c)throw new aHe("Input and output are identical",o);let u=await this.readFileContent(e,l,n),d=u.includes(`\r `)?`\r `:` -`,p=fOt(u,s,c,d);if(p.type==="none"&&s.endsWith(` +`,p=D4t(u,s,c,d);if(p.type==="none"&&s.endsWith(` `)){let m=s.endsWith(`\r `)?`\r `:` -`,g=s.substring(0,s.length-m.length);u.endsWith(g)&&(Xtn.info(e.ctx,`Adjusting oldString by removing trailing EOL: ${JSON.stringify(m)} for file ${o}`),p=fOt(u,g,c,d))}if(p.type==="none")throw new JHe(`Could not find the specified text in the file. ${p.suggestion||""}`,o);if(p.type==="multiple")throw new XHe(`Found multiple matches for the specified text. ${p.suggestion||""}`,o);if(n.isCancellationRequested)throw new Error(`Cancellation token triggered when replace string for file ${o}`);let h=await this.invokeClientEditFileTool(e,r,p.text,n);return this.getFinalReplaceStringResult(o,h)}catch(l){let u=l instanceof Error?l.message:`An unknown error occurred when updating file ${o} with oldString '${s}' to newString '${c}'`;return new Cr([new fr(u)],"error")}}async readFileContent(e,r,n){let s=await e.ctx.get(In).getOrReadTextDocument({uri:r});if(s.status==="notfound")throw new Error(`File not found: ${r}. Details: ${s.message}`);if(s.status==="invalid")throw new Error(`Invalid file: ${r}. Reason: ${s.reason}`);return s.document.getText()}async invokeClientEditFileTool(e,r,n,o){let s=e.ctx.get(Po).getToolByNameAndProvider("insert_edit_into_file",Od);if(!s)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Po).invokeTool(e,s.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,code:n,explanation:r.input.explanation??""},roundId:r.roundId,toolCallId:r.toolCallId},o)}getFinalReplaceStringResult(e,r){if(r.status!=="success")return r;let n=`The following files were successfully edited: -${e}`;return new Cr([new fr(n)],"success")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running replace_string_in_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{progressMessage:`Editing ${Pm(o)} with replace_string_in_file tool`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(ku),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran replace_string_in_file tool"};let o=Xl(n.filePath,e.uriSchemeCache);return{completionMessage:`Edited ${Pm(o)} with replace_string_in_file tool`}}static toReplaceStringParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.oldString!="string")throw new Error("oldString must be a string");if(typeof e.newString!="string")throw new Error("newString must be a string");if(e.explanation!==void 0&&typeof e.explanation!="string")throw new Error("explanation must be a string");return{filePath:e.filePath,oldString:e.oldString,newString:e.newString,explanation:e.explanation}}};f();var rje=de(J8());var qd=new Se("validateCvesTool"),tje=class t extends pl{static{a(this,"ValidateCvesTool")}static{this.COORDINATE_BATCH_SIZE=30}static{this.ADVISORY_PAGE_SIZE=100}constructor(){super({name:"validate_cves",displayName:"Validate CVEs",description:"Validates dependencies for known security vulnerabilities (CVEs). Returns CVE details for each affected dependency and the minimum version that resolves all known vulnerabilities.",displayDescription:"Check dependencies for CVEs",inputSchema:S.Object({dependencies:S.Array(S.String({description:'Dependencies to check for CVEs. Format: package@version (Maven uses groupId:artifactId@version, e.g., "org.springframework:spring-core@5.3.20"; others use package@version, e.g., "django@3.2.0")'})),ecosystem:S.Enum(oPt,{description:"Package ecosystem (actions, composer, erlang, go, maven, npm, nuget, pip, pub, rubygems, rust)"})})})}async invoke(e,r,n){if(n.isCancellationRequested)return qd.debug(e.ctx,"CVE validation cancelled at start"),new Cr([new fr("CVE validation cancelled")],"cancelled");let{dependencies:o,ecosystem:s}=r.input;try{if(!o?.length)return qd.debug(e.ctx,"No dependencies provided to validate"),new Cr([new fr("validate_cves: No dependencies to validate. Please provide a list of dependencies to check for CVEs.")],"success");if(qd.info(e.ctx,`Validating ${o.length} ${s} dependencies for CVEs`,o),n.isCancellationRequested)return qd.debug(e.ctx,"CVE validation cancelled before GitHub API calls"),new Cr([new fr("CVE validation cancelled")],"cancelled");let c=await this.batchGetCVEs(e,o,s,n),l=this.formatCVEResults(c);if(qd.info(e.ctx,`Found ${c.length} dependencies with CVEs`),c.length>0){let u=c.map(d=>`${d.dep}: ${d.cves.length} CVEs`).join(", ");qd.debug(e.ctx,`CVE summary: ${u}`)}return new Cr([new fr(l)],"success")}catch(c){if(Dx(c))return qd.debug(e.ctx,"CVE validation cancelled"),new Cr([new fr("CVE validation cancelled")],"cancelled");let l=c instanceof Error?c.message:String(c);return qd.exception(e.ctx,c,".invoke"),new Cr([new fr(`validate_cves: Error validating CVEs: ${l}`)],"error")}}prepareInvocation(e,r){let{dependencies:n,ecosystem:o}=e.input;return{progressMessage:`validate_cves: Validating ${n.length} ${o} dependencies for CVEs...`}}prepareCompletion(e,r){let{dependencies:n,ecosystem:o}=e.input;return{completionMessage:`validate_cves: Validated ${n.length} ${o} dependencies for CVEs`}}async batchGetCVEs(e,r,n,o){qd.debug(e.ctx,`Fetching CVEs for ${r.length} dependencies in batches`);let s=[];for(let c=0;c!u.withdrawn_at?.trim()).map(u=>({id:u.cve_id||u.ghsa_id,ghsa_id:u.ghsa_id,severity:u.severity,summary:u.summary,description:u.description||u.summary,html_url:u.html_url,affectedDeps:(u.vulnerabilities??[]).map(d=>({name:d.package?.name,vulVersions:d.vulnerable_version_range,patchedVersion:d.first_patched_version}))})),l=s.length-c.length;return qd.debug(e.ctx,`Filtered to ${c.length} active CVEs (${l} withdrawn advisories excluded)`),this.groupCVEsByDependency(e,c,r)}catch(o){throw qd.exception(e.ctx,o,".getCVEs"),o}}groupCVEsByDependency(e,r,n){qd.debug(e.ctx,`Grouping CVEs by dependency for ${n.length} dependencies`);let o=[];for(let s of n){let c=s.lastIndexOf("@"),l=c>0?s.substring(0,c):s,u=r.filter(h=>h.affectedDeps.some(m=>m.name===l));if(u.length<1)continue;let d=null,p=[];for(let h of u){let m=h.affectedDeps.find(A=>A.name===l)?.patchedVersion;if(!m){p.push(h.id),qd.debug(e.ctx,`CVE ${h.id} for ${s}: no patched version available (unfixable)`);continue}let g=rje.coerce(m);if(!g){p.push(h.id),qd.warn(e.ctx,`CVE ${h.id} for ${s}: invalid version string "${m}" (treating as unfixable)`);continue}qd.debug(e.ctx,`CVE ${h.id} for ${s}: patched version ${m}, current max ${d||"none"}`),(d===null||rje.gt(g,d))&&(d=g.version)}o.push({dep:s,cves:u,minVersion:d,unfixableCves:p})}return qd.debug(e.ctx,`Grouped into ${o.length} dependencies with CVEs`),o}formatCVEResults(e){return e.length===0?"No known CVEs are found for the given dependencies.":`The following dependencies have known CVEs: -${e.map(n=>{let o=n.cves.map(p=>{let h=`[${p.id}](${p.html_url}): ${KMt(p.summary)} +`,g=s.substring(0,s.length-m.length);u.endsWith(g)&&(Jrn.info(e.ctx,`Adjusting oldString by removing trailing EOL: ${JSON.stringify(m)} for file ${o}`),p=D4t(u,g,c,d))}if(p.type==="none")throw new oHe(`Could not find the specified text in the file. ${p.suggestion||""}`,o);if(p.type==="multiple")throw new sHe(`Found multiple matches for the specified text. ${p.suggestion||""}`,o);if(n.isCancellationRequested)throw new Error(`Cancellation token triggered when replace string for file ${o}`);let h=await this.invokeClientEditFileTool(e,r,p.text,n);return this.getFinalReplaceStringResult(o,h)}catch(l){let u=l instanceof Error?l.message:`An unknown error occurred when updating file ${o} with oldString '${s}' to newString '${c}'`;return new _r([new fr(u)],"error")}}async readFileContent(e,r,n){let s=await e.ctx.get(In).getOrReadTextDocument({uri:r});if(s.status==="notfound")throw new Error(`File not found: ${r}. Details: ${s.message}`);if(s.status==="invalid")throw new Error(`Invalid file: ${r}. Reason: ${s.reason}`);return s.document.getText()}async invokeClientEditFileTool(e,r,n,o){let s=e.ctx.get(Io).getToolByNameAndProvider("insert_edit_into_file",Id);if(!s)throw new Error("Client tool insert_edit_into_file is not registered");return e.ctx.get(Io).invokeTool(e,s.id,{toolInvocationToken:r.toolInvocationToken,input:{filePath:r.input.filePath,code:n,explanation:r.input.explanation??""},roundId:r.roundId,toolCallId:r.toolCallId},o)}getFinalReplaceStringResult(e,r){if(r.status!=="success")return r;let n=`The following files were successfully edited: +${e}`;return new _r([new fr(n)],"success")}prepareInvocation(e,r){let{input:n}=e;if(!n.filePath.length)return{progressMessage:"Running replace_string_in_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{progressMessage:`Editing ${_m(o)} with replace_string_in_file tool`}}async invokeConfirmation(e,r,n){let o=e.ctx.get(Cu),s={name:this.id,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,toolCallId:r.toolCallId,roundId:r.roundId,toolMetadata:r.toolMetadata};try{return await o.invokeClientToolConfirmation(e,s)}catch{return{result:"dismiss"}}}prepareCompletion(e,r){let{input:n}=e;if(!n.filePath.length)return{completionMessage:"Ran replace_string_in_file tool"};let o=jl(n.filePath,e.uriSchemeCache);return{completionMessage:`Edited ${_m(o)} with replace_string_in_file tool`}}static toReplaceStringParams(e){if(typeof e.filePath!="string")throw new Error("filePath must be a string");if(typeof e.oldString!="string")throw new Error("oldString must be a string");if(typeof e.newString!="string")throw new Error("newString must be a string");if(e.explanation!==void 0&&typeof e.explanation!="string")throw new Error("explanation must be a string");return{filePath:e.filePath,oldString:e.oldString,newString:e.newString,explanation:e.explanation}}};f();var uHe=de(I8());var Dd=new Se("validateCvesTool"),lHe=class t extends sl{static{a(this,"ValidateCvesTool")}static{this.COORDINATE_BATCH_SIZE=30}static{this.ADVISORY_PAGE_SIZE=100}constructor(){super({name:"validate_cves",displayName:"Validate CVEs",description:"Validates dependencies for known security vulnerabilities (CVEs). Returns CVE details for each affected dependency and the minimum version that resolves all known vulnerabilities.",displayDescription:"Check dependencies for CVEs",inputSchema:S.Object({dependencies:S.Array(S.String({description:'Dependencies to check for CVEs. Format: package@version (Maven uses groupId:artifactId@version, e.g., "org.springframework:spring-core@5.3.20"; others use package@version, e.g., "django@3.2.0")'})),ecosystem:S.Enum(SPt,{description:"Package ecosystem (actions, composer, erlang, go, maven, npm, nuget, pip, pub, rubygems, rust)"})})})}async invoke(e,r,n){if(n.isCancellationRequested)return Dd.debug(e.ctx,"CVE validation cancelled at start"),new _r([new fr("CVE validation cancelled")],"cancelled");let{dependencies:o,ecosystem:s}=r.input;try{if(!o?.length)return Dd.debug(e.ctx,"No dependencies provided to validate"),new _r([new fr("validate_cves: No dependencies to validate. Please provide a list of dependencies to check for CVEs.")],"success");if(Dd.info(e.ctx,`Validating ${o.length} ${s} dependencies for CVEs`,o),n.isCancellationRequested)return Dd.debug(e.ctx,"CVE validation cancelled before GitHub API calls"),new _r([new fr("CVE validation cancelled")],"cancelled");let c=await this.batchGetCVEs(e,o,s,n),l=this.formatCVEResults(c);if(Dd.info(e.ctx,`Found ${c.length} dependencies with CVEs`),c.length>0){let u=c.map(d=>`${d.dep}: ${d.cves.length} CVEs`).join(", ");Dd.debug(e.ctx,`CVE summary: ${u}`)}return new _r([new fr(l)],"success")}catch(c){if(vx(c))return Dd.debug(e.ctx,"CVE validation cancelled"),new _r([new fr("CVE validation cancelled")],"cancelled");let l=c instanceof Error?c.message:String(c);return Dd.exception(e.ctx,c,".invoke"),new _r([new fr(`validate_cves: Error validating CVEs: ${l}`)],"error")}}prepareInvocation(e,r){let{dependencies:n,ecosystem:o}=e.input;return{progressMessage:`validate_cves: Validating ${n.length} ${o} dependencies for CVEs...`}}prepareCompletion(e,r){let{dependencies:n,ecosystem:o}=e.input;return{completionMessage:`validate_cves: Validated ${n.length} ${o} dependencies for CVEs`}}async batchGetCVEs(e,r,n,o){Dd.debug(e.ctx,`Fetching CVEs for ${r.length} dependencies in batches`);let s=[];for(let c=0;c!u.withdrawn_at?.trim()).map(u=>({id:u.cve_id||u.ghsa_id,ghsa_id:u.ghsa_id,severity:u.severity,summary:u.summary,description:u.description||u.summary,html_url:u.html_url,affectedDeps:(u.vulnerabilities??[]).map(d=>({name:d.package?.name,vulVersions:d.vulnerable_version_range,patchedVersion:d.first_patched_version}))})),l=s.length-c.length;return Dd.debug(e.ctx,`Filtered to ${c.length} active CVEs (${l} withdrawn advisories excluded)`),this.groupCVEsByDependency(e,c,r)}catch(o){throw Dd.exception(e.ctx,o,".getCVEs"),o}}groupCVEsByDependency(e,r,n){Dd.debug(e.ctx,`Grouping CVEs by dependency for ${n.length} dependencies`);let o=[];for(let s of n){let c=s.lastIndexOf("@"),l=c>0?s.substring(0,c):s,u=r.filter(h=>h.affectedDeps.some(m=>m.name===l));if(u.length<1)continue;let d=null,p=[];for(let h of u){let m=h.affectedDeps.find(A=>A.name===l)?.patchedVersion;if(!m){p.push(h.id),Dd.debug(e.ctx,`CVE ${h.id} for ${s}: no patched version available (unfixable)`);continue}let g=uHe.coerce(m);if(!g){p.push(h.id),Dd.warn(e.ctx,`CVE ${h.id} for ${s}: invalid version string "${m}" (treating as unfixable)`);continue}Dd.debug(e.ctx,`CVE ${h.id} for ${s}: patched version ${m}, current max ${d||"none"}`),(d===null||uHe.gt(g,d))&&(d=g.version)}o.push({dep:s,cves:u,minVersion:d,unfixableCves:p})}return Dd.debug(e.ctx,`Grouped into ${o.length} dependencies with CVEs`),o}formatCVEResults(e){return e.length===0?"No known CVEs are found for the given dependencies.":`The following dependencies have known CVEs: +${e.map(n=>{let o=n.cves.map(p=>{let h=`[${p.id}](${p.html_url}): ${g4t(p.summary)} `;return h+=` - **Severity**: **${p.severity.toUpperCase()}** -`,h+=` - **Details**: ${KMt(p.description)}`,h}).join(` +`,h+=` - **Details**: ${g4t(p.description)}`,h}).join(` - `),s=`- Dependency \`${n.dep}\` has **${n.cves.length}** known CVEs`,c=n.cves.filter(p=>!n.unfixableCves.includes(p.id)),l=c.map(p=>p.id).join(", "),u=n.unfixableCves.join(", "),d;return n.unfixableCves.length===0?d=`Upgrade to **${n.minVersion}** or higher to fix all CVEs: [${l}]`:c.length===0?d=`[${u}] cannot be fixed yet because patched versions are not available`:d=`Upgrade to **${n.minVersion}** or higher to fix [${l}]; however, [${u}] cannot be fixed yet because patched versions are not available`,`${s}: ${d} - ${o}`}).join(` -`)}`}};function Umo(t){return[new WHe,new KHe,new jHe,new eje,new THe,new IHe,new $He,new VHe,new tje]}a(Umo,"getAllClsTools");function Ztn(t,e){Umo(t).forEach(e.registerTool.bind(e)),t.get(Fn).onDidSetCapabilities(r=>{t.get(Cm).getPolicyValue("subagent.enabled")===!1?e.unregisterTool(new Yie):r.subAgent?e.registerTool(new Yie):e.unregisterTool(new Yie),r.manageTodoListTool?e.registerTool(new Ok(t)):e.unregisterTool(new Ok(t))}),qF(t).then(r=>{r&&e.registerTool(new SHe)})}a(Ztn,"registerAllClsTools");var Po=class{constructor(e){this.ctx=e;this._toolRegistry=new O9e;Ztn(e,this)}static{a(this,"ToolsService")}registerTool(e){this._toolRegistry.registerTool(e)}unregisterTool(e){return typeof e=="string"?this._toolRegistry.unregisterTool(e):this._toolRegistry.unregisterTool(e.id)}prepareInvocation(e,r,n){let o=this._toolRegistry.getTool(e);if(!o)throw new Error(`Tool with id '${e}' is undefined`);return o.prepareInvocation?.(r,n)??{}}prepareCompletion(e,r,n){let o=this._toolRegistry.getTool(e);if(!o)throw new Error(`Tool with id '${e}' is undefined`);return o.prepareCompletion?.(r,n)??{}}async invokeTool(e,r,n,o){if(o.isCancellationRequested)throw new Sc;let s=this._toolRegistry.getTool(r);if(!s)throw new Error(`Tool with id '${r}' is undefined`);return await s.invoke?.(e,n,o)??new Cr([],"success")}async invokeToolConfirmation(e,r,n,o){if(o.isCancellationRequested)throw new Sc;let s=this._toolRegistry.getTool(r);if(!s)throw new Error(`Tool with id '${r}' is undefined`);return await s.invokeConfirmation?.(e,n,o)??{result:"dismiss"}}getToolById(e){return this._toolRegistry.getTool(e)}getToolByNameAndProvider(e,r){return this._toolRegistry.listTools().find(n=>n.name===e&&n.toolProvider.id===r.id)}getToolsForModel(e){if(e&&e.customTools!==void 0){if(e.customTools.length===0)return[];let r=new Set(e.customTools);return Array.from(this.getToolMapForModel().values()).filter(n=>r.has(n.configurationKey))}return e?.kind==="Ask"?Array.from(this.getToolMapForModel().values()).filter(r=>FZr.has(r.name)):e?.kind==="InlineAgent"?Array.from(this.getToolMapForModel().values()).filter(r=>UZr.has(r.name)):Array.from(this.getToolMapForModel().values()).filter(r=>r.status==="enabled")}getToolMapForModel(){let e=new Map;for(let m of this._toolRegistry.listTools())e.has(m.toolProvider.id)||e.set(m.toolProvider.id,[]),e.get(m.toolProvider.id)?.push(m);let r=e.get(dh.id)?.find(m=>m.name==="insert_edit_into_file");if(r){let m=e.get(dh.id),g=m?.indexOf(r)??-1;g>=0&&m?.splice(g,1)}let n=e.get(dh.id)?.find(m=>m.name==="replace_string_in_file");if(n){let m=e.get(dh.id),g=m?.indexOf(n)??-1;g>=0&&m?.splice(g,1)}let o=e.get(Od.id)?.find(m=>m.name==="insert_edit_into_file");if(o){let m=e.get(Od.id),g=m?.indexOf(o)??-1;g>=0&&m?.splice(g,1)}let s=e.get(dh.id)?.find(m=>m.name==="create_file");if(s){let m=e.get(dh.id),g=m?.indexOf(s)??-1;g>=0&&m?.splice(g,1)}let c=e.get(Od.id)?.find(m=>m.name==="create_file");if(c){let m=e.get(Od.id),g=m?.indexOf(c)??-1;g>=0&&m?.splice(g,1)}let l=e.get(dh.id)?.find(m=>m.name==="apply_patch");if(l){let m=e.get(dh.id),g=m?.indexOf(l)??-1;g>=0&&m?.splice(g,1)}let u=new Map;r&&o&&u.set(r.nameForModel,r),n&&o&&u.set(n.nameForModel,n),s&&c&&u.set(s.nameForModel,s),l&&o&&c&&u.set(l.nameForModel,l);let d=e.get(Od.id)??[],p=e.get(dh.id)??[],h=Array.from(e.entries()).filter(([m])=>m!==dh.id&&m!==Od.id).flatMap(([,m])=>m);return d.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),p.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),h.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),u}async updateToolStatusByName(e,r,n){let o=this.guessTool(e,r);o.length!==0&&await this.doUpdateToolStatus(e,o,n)}async updateToolStatus(e,r,n){let o=this.getToolsToUpdate(r);o.length!==0&&await this.doUpdateToolStatus(e,o,n)}async doUpdateToolStatus(e,r,n){let o;Array.isArray(r)?o=r:o=[r],await this.doUpdateToolsStatus(e,o.map(s=>({tool:s,status:n})))}async updateToolsStatusByName(e,r){let n=r.flatMap(({toolName:o,status:s})=>this.guessTool(e,o).map(l=>({tool:l,status:s})));await this.doUpdateToolsStatus(e,n)}async updateToolsStatus(e,r){let n=r.flatMap(({toolId:o,status:s})=>this.getToolsToUpdate(o).map(l=>({tool:l,status:s})));await this.doUpdateToolsStatus(e,n)}async doUpdateToolsStatus(e,r){let n=r.map(({tool:c,status:l})=>this.prepareUpdateToolStatus(e,c,l)).flat();function o(c){return c.shouldUpdate?c.shouldUpdate():!0}a(o,"shouldUpdate");let s=new Map;for(let c of n)!c||!o(c)||(c.type==="memory"?c.tool.status=c.status:c.type==="customAgent"&&(s.has(c.customAgent.id)||s.set(c.customAgent.id,{agent:c.customAgent,options:[]}),s.get(c.customAgent.id).options.push({toolConfigurationKey:c.tool.configurationKey,status:c.status})));if(s.size>0){let c=this.ctx.get(J1);for(let[l,{agent:u,options:d}]of s)await c.updateCustomAgent(u,{updateToolOptions:d})}}guessTool(e,r){let n=this._toolRegistry.listTools().filter(o=>o.name===r);if(!kEe(e)){let o=new Set,s=[];for(let c of n)o.has(c.configurationKey)||(o.add(c.configurationKey),s.push(c));return s}if(r==="insert_edit_into_file"||r==="replace_string_in_file"){let o=this._toolRegistry.listTools().find(c=>c.toolProvider.id===dh.id&&c.name===r),s=this._toolRegistry.listTools().find(c=>c.toolProvider.id===Od.id&&c.name==="insert_edit_into_file");return o&&s?[o,s]:[]}return n.length===0?[]:n.length===1||n.length===2&&n.every(o=>o.toolProvider.id===dh.id||o.toolProvider.id===Od.id)?n:[]}getToolsToUpdate(e){let r=this._toolRegistry.getTool(e);if(!r)return[];if((r.name==="insert_edit_into_file"||r.name==="replace_string_in_file")&&r.toolProvider.id===dh.id){let n=this._toolRegistry.listTools().find(o=>o.toolProvider.id===Od.id&&o.name==="insert_edit_into_file");if(n)return[r,n]}return[r]}prepareUpdateToolStatus(e,r,n){if(kEe(e))return r.name==="insert_edit_into_file"&&r.toolProvider.id===Od.id?[this.prepareUpdateEditorEditFileToolStatus(r,n)]:[{type:"memory",tool:r,status:n}];if(e.source&&!e.source.isReadonly){let o=e.source;return!o.tools||(o.tools.some(c=>c==r?.configurationKey)?"enabled":"disabled")===n?void 0:[{type:"customAgent",customAgent:o,tool:r,status:n}]}}prepareUpdateEditorEditFileToolStatus(e,r){if(r==="enabled")return{type:"memory",tool:e,status:"enabled"};let n=this._toolRegistry.listTools().find(c=>c.toolProvider.id===dh.id&&c.name==="insert_edit_into_file"),o=this._toolRegistry.listTools().find(c=>c.toolProvider.id===dh.id&&c.name==="replace_string_in_file");function s(c){return!c||c.status==="disabled"}return a(s,"isToolDisabled"),{type:"memory",tool:e,status:"disabled",shouldUpdate:a(()=>s(n)&&s(o),"shouldUpdate")}}};f();var ZF=class extends J6{static{a(this,"ClientLanguageModelTool")}constructor(e){super({...e,toolProvider:Od,type:"client"}),this.confirmationMessages=e.confirmationMessages}prepareInvocation(e,r){return{progressMessage:`Running ${this.name} tool`,confirmationMessages:this.confirmationMessages}}prepareCompletion(e,r){return{completionMessage:`Ran ${this.name} tool`}}async invoke(e,r,n){let o={name:this.name,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId};try{return await e.ctx.get(ay).invokeClientTool(e,o)}catch(s){throw new Error(`Failed to invoke client tool ${this.name}: ${String(s)}`)}}async invokeConfirmation(e,r,n){if(n.isCancellationRequested)throw new Sc;let o={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations,toolMetadata:r.toolMetadata};try{return await e.ctx.get(ku).invokeClientToolConfirmation(e,o)}catch(s){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(s)}`)}}};f();f();var T_e={};Ri(T_e,{BRAND:()=>dgo,DIRTY:()=>tV,EMPTY_PATH:()=>Hmo,INVALID:()=>li,NEVER:()=>Ygo,OK:()=>tA,ParseStatus:()=>Mm,Schema:()=>ko,ZodAny:()=>r9,ZodArray:()=>zO,ZodBigInt:()=>nV,ZodBoolean:()=>iV,ZodBranded:()=>v_e,ZodCatch:()=>mV,ZodDate:()=>oV,ZodDefault:()=>hV,ZodDiscriminatedUnion:()=>oje,ZodEffects:()=>tS,ZodEnum:()=>fV,ZodError:()=>CC,ZodFirstPartyTypeKind:()=>Ci,ZodFunction:()=>aje,ZodIntersection:()=>lV,ZodIssueCode:()=>Yt,ZodLazy:()=>uV,ZodLiteral:()=>dV,ZodMap:()=>aoe,ZodNaN:()=>loe,ZodNativeEnum:()=>pV,ZodNever:()=>mw,ZodNull:()=>aV,ZodNullable:()=>Yk,ZodNumber:()=>rV,ZodObject:()=>_C,ZodOptional:()=>ZT,ZodParsedType:()=>Xr,ZodPipeline:()=>b_e,ZodPromise:()=>n9,ZodReadonly:()=>gV,ZodRecord:()=>sje,ZodSchema:()=>ko,ZodSet:()=>coe,ZodString:()=>t9,ZodSymbol:()=>ooe,ZodTransformer:()=>tS,ZodTuple:()=>zk,ZodType:()=>ko,ZodUndefined:()=>sV,ZodUnion:()=>cV,ZodUnknown:()=>WO,ZodVoid:()=>soe,addIssueToContext:()=>Ur,any:()=>Cgo,array:()=>Tgo,bigint:()=>mgo,boolean:()=>urn,coerce:()=>zgo,custom:()=>arn,date:()=>ggo,datetimeRegex:()=>orn,defaultErrorMap:()=>$O,discriminatedUnion:()=>wgo,effect:()=>Qgo,enum:()=>Lgo,function:()=>Mgo,getErrorMap:()=>roe,getParsedType:()=>Wk,instanceof:()=>pgo,intersection:()=>Rgo,isAborted:()=>nje,isAsync:()=>noe,isDirty:()=>ije,isValid:()=>e9,late:()=>fgo,lazy:()=>Ogo,literal:()=>Bgo,makeIssue:()=>__e,map:()=>Ngo,nan:()=>hgo,nativeEnum:()=>Fgo,never:()=>vgo,null:()=>Ego,nullable:()=>Ggo,number:()=>lrn,object:()=>Sgo,objectUtil:()=>pOt,oboolean:()=>Wgo,onumber:()=>Vgo,optional:()=>qgo,ostring:()=>$go,pipeline:()=>jgo,preprocess:()=>Hgo,promise:()=>Ugo,quotelessJson:()=>Qmo,record:()=>kgo,set:()=>Dgo,setErrorMap:()=>Gmo,strictObject:()=>Igo,string:()=>crn,symbol:()=>Ago,transformer:()=>Qgo,tuple:()=>Pgo,undefined:()=>ygo,union:()=>xgo,unknown:()=>_go,util:()=>us,void:()=>bgo});f();f();f();f();f();var us;(function(t){t.assertEqual=o=>{};function e(o){}a(e,"assertIs"),t.assertIs=e;function r(o){throw new Error}a(r,"assertNever"),t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(l=>typeof o[o[l]]!="number"),c={};for(let l of s)c[l]=o[l];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}a(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(us||(us={}));var pOt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(pOt||(pOt={}));var Xr=us.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wk=a(t=>{switch(typeof t){case"undefined":return Xr.undefined;case"string":return Xr.string;case"number":return Number.isNaN(t)?Xr.nan:Xr.number;case"boolean":return Xr.boolean;case"function":return Xr.function;case"bigint":return Xr.bigint;case"symbol":return Xr.symbol;case"object":return Array.isArray(t)?Xr.array:t===null?Xr.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Xr.promise:typeof Map<"u"&&t instanceof Map?Xr.map:typeof Set<"u"&&t instanceof Set?Xr.set:typeof Date<"u"&&t instanceof Date?Xr.date:Xr.object;default:return Xr.unknown}},"getParsedType");var Yt=us.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"]),Qmo=a(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),CC=class t extends Error{static{a(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=a(s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let l=n,u=0;for(;ur.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};CC.create=t=>new CC(t);var qmo=a((t,e)=>{let r;switch(t.code){case Yt.invalid_type:t.received===Xr.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Yt.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,us.jsonStringifyReplacer)}`;break;case Yt.unrecognized_keys:r=`Unrecognized key(s) in object: ${us.joinValues(t.keys,", ")}`;break;case Yt.invalid_union:r="Invalid input";break;case Yt.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${us.joinValues(t.options)}`;break;case Yt.invalid_enum_value:r=`Invalid enum value. Expected ${us.joinValues(t.options)}, received '${t.received}'`;break;case Yt.invalid_arguments:r="Invalid function arguments";break;case Yt.invalid_return_type:r="Invalid function return type";break;case Yt.invalid_date:r="Invalid date";break;case Yt.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:us.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Yt.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Yt.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Yt.custom:r="Invalid input";break;case Yt.invalid_intersection_types:r="Intersection results could not be merged";break;case Yt.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Yt.not_finite:r="Number must be finite";break;default:r=e.defaultError,us.assertNever(t)}return{message:r}},"errorMap"),$O=qmo;var ern=$O;function Gmo(t){ern=t}a(Gmo,"setErrorMap");function roe(){return ern}a(roe,"getErrorMap");f();var __e=a(t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let l="",u=n.filter(d=>!!d).slice().reverse();for(let d of u)l=d(c,{data:e,defaultError:l}).message;return{...o,path:s,message:l}},"makeIssue"),Hmo=[];function Ur(t,e){let r=roe(),n=__e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===$O?void 0:$O].filter(o=>!!o)});t.common.issues.push(n)}a(Ur,"addIssueToContext");var Mm=class t{static{a(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return li;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return li;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},li=Object.freeze({status:"aborted"}),tV=a(t=>({status:"dirty",value:t}),"DIRTY"),tA=a(t=>({status:"valid",value:t}),"OK"),nje=a(t=>t.status==="aborted","isAborted"),ije=a(t=>t.status==="dirty","isDirty"),e9=a(t=>t.status==="valid","isValid"),noe=a(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");f();f();var Tn;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Tn||(Tn={}));var eS=class{static{a(this,"ParseInputLazyPath")}constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},trn=a((t,e)=>{if(e9(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new CC(t.common.issues);return this._error=r,this._error}}},"handleResult");function Ao(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:a((c,l)=>{let{message:u}=t;return c.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??n??l.defaultError}:c.code!=="invalid_type"?{message:l.defaultError}:{message:u??r??l.defaultError}},"customMap"),description:o}}a(Ao,"processCreateParams");var ko=class{static{a(this,"ZodType")}get description(){return this._def.description}_getType(e){return Wk(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Wk(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Mm,ctx:{common:e.parent.common,data:e.data,parsedType:Wk(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(noe(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wk(e)},o=this._parseSync({data:e,path:n.path,parent:n});return trn(n,o)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wk(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return e9(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>e9(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wk(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(noe(o)?o:Promise.resolve(o));return trn(n,s)}refine(e,r){let n=a(o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r,"getIssueProperties");return this._refinement((o,s)=>{let c=e(o),l=a(()=>s.addIssue({code:Yt.custom,...n(o)}),"setError");return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(l(),!1)):c?!0:(l(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new tS({schema:this,typeName:Ci.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a(r=>this["~validate"](r),"validate")}}optional(){return ZT.create(this,this._def)}nullable(){return Yk.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zO.create(this)}promise(){return n9.create(this,this._def)}or(e){return cV.create([this,e],this._def)}and(e){return lV.create(this,e,this._def)}transform(e){return new tS({...Ao(this._def),schema:this,typeName:Ci.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new hV({...Ao(this._def),innerType:this,defaultValue:r,typeName:Ci.ZodDefault})}brand(){return new v_e({typeName:Ci.ZodBranded,type:this,...Ao(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new mV({...Ao(this._def),innerType:this,catchValue:r,typeName:Ci.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return b_e.create(this,e)}readonly(){return gV.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},jmo=/^c[^\s-]{8,}$/i,$mo=/^[0-9a-z]+$/,Vmo=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Wmo=/^[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,zmo=/^[a-z0-9_-]{21}$/i,Ymo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Kmo=/^[-+]?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)?)??$/,Jmo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Xmo="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hOt,Zmo=/^(?:(?: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])$/,ego=/^(?:(?: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])$/,tgo=/^(([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]))$/,rgo=/^(([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])$/,ngo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,igo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nrn="((\\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])))",ogo=new RegExp(`^${nrn}$`);function irn(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}a(irn,"timeRegexSource");function sgo(t){return new RegExp(`^${irn(t)}$`)}a(sgo,"timeRegex");function orn(t){let e=`${nrn}T${irn(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}a(orn,"datetimeRegex");function ago(t,e){return!!((e==="v4"||!e)&&Zmo.test(t)||(e==="v6"||!e)&&tgo.test(t))}a(ago,"isValidIP");function cgo(t,e){if(!Ymo.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}a(cgo,"isValidJWT");function lgo(t,e){return!!((e==="v4"||!e)&&ego.test(t)||(e==="v6"||!e)&&rgo.test(t))}a(lgo,"isValidCidr");var t9=class t extends ko{static{a(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Xr.string){let s=this._getOrReturnCtx(e);return Ur(s,{code:Yt.invalid_type,expected:Xr.string,received:s.parsedType}),li}let n=new Mm,o;for(let s of this._def.checks)if(s.kind==="min")e.data.lengths.value&&(o=this._getOrReturnCtx(e,o),Ur(o,{code:Yt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,l=e.data.lengthe.test(o),{validation:r,code:Yt.invalid_string,...Tn.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Tn.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Tn.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Tn.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Tn.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Tn.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Tn.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Tn.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Tn.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Tn.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Tn.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Tn.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Tn.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Tn.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Tn.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Tn.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Tn.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Tn.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Tn.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Tn.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Tn.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Tn.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Tn.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Tn.errToObj(r)})}nonempty(e){return this.min(1,Tn.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew t9({checks:[],typeName:Ci.ZodString,coerce:t?.coerce??!1,...Ao(t)});function ugo(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}a(ugo,"floatSafeRemainder");var rV=class t extends ko{static{a(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Xr.number){let s=this._getOrReturnCtx(e);return Ur(s,{code:Yt.invalid_type,expected:Xr.number,received:s.parsedType}),li}let n,o=new Mm;for(let s of this._def.checks)s.kind==="int"?us.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?ugo(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.not_finite,message:s.message}),o.dirty()):us.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Tn.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Tn.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Tn.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Tn.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Tn.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Tn.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Tn.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Tn.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Tn.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Tn.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Tn.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&us.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.valuenew rV({checks:[],typeName:Ci.ZodNumber,coerce:t?.coerce||!1,...Ao(t)});var nV=class t extends ko{static{a(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Xr.bigint)return this._getInvalidInput(e);let n,o=new Mm;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:Yt.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):us.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return Ur(r,{code:Yt.invalid_type,expected:Xr.bigint,received:r.parsedType}),li}gte(e,r){return this.setLimit("min",e,!0,Tn.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Tn.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Tn.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Tn.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Tn.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Tn.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Tn.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew nV({checks:[],typeName:Ci.ZodBigInt,coerce:t?.coerce??!1,...Ao(t)});var iV=class extends ko{static{a(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Xr.boolean){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.boolean,received:n.parsedType}),li}return tA(e.data)}};iV.create=t=>new iV({typeName:Ci.ZodBoolean,coerce:t?.coerce||!1,...Ao(t)});var oV=class t extends ko{static{a(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Xr.date){let s=this._getOrReturnCtx(e);return Ur(s,{code:Yt.invalid_type,expected:Xr.date,received:s.parsedType}),li}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Ur(s,{code:Yt.invalid_date}),li}let n=new Mm,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()s.value&&(o=this._getOrReturnCtx(e,o),Ur(o,{code:Yt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):us.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Tn.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Tn.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew oV({checks:[],coerce:t?.coerce||!1,typeName:Ci.ZodDate,...Ao(t)});var ooe=class extends ko{static{a(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==Xr.symbol){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.symbol,received:n.parsedType}),li}return tA(e.data)}};ooe.create=t=>new ooe({typeName:Ci.ZodSymbol,...Ao(t)});var sV=class extends ko{static{a(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==Xr.undefined){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.undefined,received:n.parsedType}),li}return tA(e.data)}};sV.create=t=>new sV({typeName:Ci.ZodUndefined,...Ao(t)});var aV=class extends ko{static{a(this,"ZodNull")}_parse(e){if(this._getType(e)!==Xr.null){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.null,received:n.parsedType}),li}return tA(e.data)}};aV.create=t=>new aV({typeName:Ci.ZodNull,...Ao(t)});var r9=class extends ko{static{a(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return tA(e.data)}};r9.create=t=>new r9({typeName:Ci.ZodAny,...Ao(t)});var WO=class extends ko{static{a(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return tA(e.data)}};WO.create=t=>new WO({typeName:Ci.ZodUnknown,...Ao(t)});var mw=class extends ko{static{a(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return Ur(r,{code:Yt.invalid_type,expected:Xr.never,received:r.parsedType}),li}};mw.create=t=>new mw({typeName:Ci.ZodNever,...Ao(t)});var soe=class extends ko{static{a(this,"ZodVoid")}_parse(e){if(this._getType(e)!==Xr.undefined){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.void,received:n.parsedType}),li}return tA(e.data)}};soe.create=t=>new soe({typeName:Ci.ZodVoid,...Ao(t)});var zO=class t extends ko{static{a(this,"ZodArray")}_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Xr.array)return Ur(r,{code:Yt.invalid_type,expected:Xr.array,received:r.parsedType}),li;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,l=r.data.lengtho.maxLength.value&&(Ur(r,{code:Yt.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,l)=>o.type._parseAsync(new eS(r,c,r.path,l)))).then(c=>Mm.mergeArray(n,c));let s=[...r.data].map((c,l)=>o.type._parseSync(new eS(r,c,r.path,l)));return Mm.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Tn.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Tn.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Tn.toString(r)}})}nonempty(e){return this.min(1,e)}};zO.create=(t,e)=>new zO({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ci.ZodArray,...Ao(e)});function ioe(t){if(t instanceof _C){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=ZT.create(ioe(n))}return new _C({...t._def,shape:a(()=>e,"shape")})}else return t instanceof zO?new zO({...t._def,type:ioe(t.element)}):t instanceof ZT?ZT.create(ioe(t.unwrap())):t instanceof Yk?Yk.create(ioe(t.unwrap())):t instanceof zk?zk.create(t.items.map(e=>ioe(e))):t}a(ioe,"deepPartialify");var _C=class t extends ko{static{a(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=us.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Xr.object){let d=this._getOrReturnCtx(e);return Ur(d,{code:Yt.invalid_type,expected:Xr.object,received:d.parsedType}),li}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof mw&&this._def.unknownKeys==="strip"))for(let d in o.data)c.includes(d)||l.push(d);let u=[];for(let d of c){let p=s[d],h=o.data[d];u.push({key:{status:"valid",value:d},value:p._parse(new eS(o,h,o.path,d)),alwaysSet:d in o.data})}if(this._def.catchall instanceof mw){let d=this._def.unknownKeys;if(d==="passthrough")for(let p of l)u.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(d==="strict")l.length>0&&(Ur(o,{code:Yt.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let p of l){let h=o.data[p];u.push({key:{status:"valid",value:p},value:d._parse(new eS(o,h,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let d=[];for(let p of u){let h=await p.key,m=await p.value;d.push({key:h,value:m,alwaysSet:p.alwaysSet})}return d}).then(d=>Mm.mergeObjectSync(n,d)):Mm.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return Tn.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:a((r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Tn.errToObj(e).message??o}:{message:o}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:a(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:a(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:Ci.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of us.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:a(()=>r,"shape")})}omit(e){let r={};for(let n of us.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:a(()=>r,"shape")})}deepPartial(){return ioe(this)}partial(e){let r={};for(let n of us.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:a(()=>r,"shape")})}required(e){let r={};for(let n of us.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof ZT;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:a(()=>r,"shape")})}keyof(){return srn(us.objectKeys(this.shape))}};_C.create=(t,e)=>new _C({shape:a(()=>t,"shape"),unknownKeys:"strip",catchall:mw.create(),typeName:Ci.ZodObject,...Ao(e)});_C.strictCreate=(t,e)=>new _C({shape:a(()=>t,"shape"),unknownKeys:"strict",catchall:mw.create(),typeName:Ci.ZodObject,...Ao(e)});_C.lazycreate=(t,e)=>new _C({shape:t,unknownKeys:"strip",catchall:mw.create(),typeName:Ci.ZodObject,...Ao(e)});var cV=class extends ko{static{a(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let l of s)if(l.result.status==="valid")return l.result;for(let l of s)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;let c=s.map(l=>new CC(l.ctx.common.issues));return Ur(r,{code:Yt.invalid_union,unionErrors:c}),li}if(a(o,"handleResults"),r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let u of n){let d={...r,common:{...r.common,issues:[]},parent:null},p=u._parseSync({data:r.data,path:r.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:d}),d.common.issues.length&&c.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let l=c.map(u=>new CC(u));return Ur(r,{code:Yt.invalid_union,unionErrors:l}),li}}get options(){return this._def.options}};cV.create=(t,e)=>new cV({options:t,typeName:Ci.ZodUnion,...Ao(e)});var VO=a(t=>t instanceof uV?VO(t.schema):t instanceof tS?VO(t.innerType()):t instanceof dV?[t.value]:t instanceof fV?t.options:t instanceof pV?us.objectValues(t.enum):t instanceof hV?VO(t._def.innerType):t instanceof sV?[void 0]:t instanceof aV?[null]:t instanceof ZT?[void 0,...VO(t.unwrap())]:t instanceof Yk?[null,...VO(t.unwrap())]:t instanceof v_e||t instanceof gV?VO(t.unwrap()):t instanceof mV?VO(t._def.innerType):[],"getDiscriminator"),oje=class t extends ko{static{a(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.object)return Ur(r,{code:Yt.invalid_type,expected:Xr.object,received:r.parsedType}),li;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ur(r,{code:Yt.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),li)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=VO(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let l of c){if(o.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);o.set(l,s)}}return new t({typeName:Ci.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...Ao(n)})}};function mOt(t,e){let r=Wk(t),n=Wk(e);if(t===e)return{valid:!0,data:t};if(r===Xr.object&&n===Xr.object){let o=us.objectKeys(e),s=us.objectKeys(t).filter(l=>o.indexOf(l)!==-1),c={...t,...e};for(let l of s){let u=mOt(t[l],e[l]);if(!u.valid)return{valid:!1};c[l]=u.data}return{valid:!0,data:c}}else if(r===Xr.array&&n===Xr.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s{if(nje(s)||nje(c))return li;let l=mOt(s.value,c.value);return l.valid?((ije(s)||ije(c))&&r.dirty(),{status:r.value,value:l.data}):(Ur(n,{code:Yt.invalid_intersection_types}),li)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lV.create=(t,e,r)=>new lV({left:t,right:e,typeName:Ci.ZodIntersection,...Ao(r)});var zk=class t extends ko{static{a(this,"ZodTuple")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.array)return Ur(n,{code:Yt.invalid_type,expected:Xr.array,received:n.parsedType}),li;if(n.data.lengththis._def.items.length&&(Ur(n,{code:Yt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,l)=>{let u=this._def.items[l]||this._def.rest;return u?u._parse(new eS(n,c,n.path,l)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>Mm.mergeArray(r,c)):Mm.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};zk.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new zk({items:t,typeName:Ci.ZodTuple,rest:null,...Ao(e)})};var sje=class t extends ko{static{a(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.object)return Ur(n,{code:Yt.invalid_type,expected:Xr.object,received:n.parsedType}),li;let o=[],s=this._def.keyType,c=this._def.valueType;for(let l in n.data)o.push({key:s._parse(new eS(n,l,n.path,l)),value:c._parse(new eS(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?Mm.mergeObjectAsync(r,o):Mm.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ko?new t({keyType:e,valueType:r,typeName:Ci.ZodRecord,...Ao(n)}):new t({keyType:t9.create(),valueType:e,typeName:Ci.ZodRecord,...Ao(r)})}},aoe=class extends ko{static{a(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.map)return Ur(n,{code:Yt.invalid_type,expected:Xr.map,received:n.parsedType}),li;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([l,u],d)=>({key:o._parse(new eS(n,l,n.path,[d,"key"])),value:s._parse(new eS(n,u,n.path,[d,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let u of c){let d=await u.key,p=await u.value;if(d.status==="aborted"||p.status==="aborted")return li;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),l.set(d.value,p.value)}return{status:r.value,value:l}})}else{let l=new Map;for(let u of c){let d=u.key,p=u.value;if(d.status==="aborted"||p.status==="aborted")return li;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),l.set(d.value,p.value)}return{status:r.value,value:l}}}};aoe.create=(t,e,r)=>new aoe({valueType:e,keyType:t,typeName:Ci.ZodMap,...Ao(r)});var coe=class t extends ko{static{a(this,"ZodSet")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.set)return Ur(n,{code:Yt.invalid_type,expected:Xr.set,received:n.parsedType}),li;let o=this._def;o.minSize!==null&&n.data.sizeo.maxSize.value&&(Ur(n,{code:Yt.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(u){let d=new Set;for(let p of u){if(p.status==="aborted")return li;p.status==="dirty"&&r.dirty(),d.add(p.value)}return{status:r.value,value:d}}a(c,"finalizeSet");let l=[...n.data.values()].map((u,d)=>s._parse(new eS(n,u,n.path,d)));return n.common.async?Promise.all(l).then(u=>c(u)):c(l)}min(e,r){return new t({...this._def,minSize:{value:e,message:Tn.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Tn.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};coe.create=(t,e)=>new coe({valueType:t,minSize:null,maxSize:null,typeName:Ci.ZodSet,...Ao(e)});var aje=class t extends ko{static{a(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.function)return Ur(r,{code:Yt.invalid_type,expected:Xr.function,received:r.parsedType}),li;function n(l,u){return __e({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,roe(),$O].filter(d=>!!d),issueData:{code:Yt.invalid_arguments,argumentsError:u}})}a(n,"makeArgsIssue");function o(l,u){return __e({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,roe(),$O].filter(d=>!!d),issueData:{code:Yt.invalid_return_type,returnTypeError:u}})}a(o,"makeReturnsIssue");let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof n9){let l=this;return tA(async function(...u){let d=new CC([]),p=await l._def.args.parseAsync(u,s).catch(g=>{throw d.addIssue(n(u,g)),d}),h=await Reflect.apply(c,this,p);return await l._def.returns._def.type.parseAsync(h,s).catch(g=>{throw d.addIssue(o(h,g)),d})})}else{let l=this;return tA(function(...u){let d=l._def.args.safeParse(u,s);if(!d.success)throw new CC([n(u,d.error)]);let p=Reflect.apply(c,this,d.data),h=l._def.returns.safeParse(p,s);if(!h.success)throw new CC([o(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:zk.create(e).rest(WO.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||zk.create([]).rest(WO.create()),returns:r||WO.create(),typeName:Ci.ZodFunction,...Ao(n)})}},uV=class extends ko{static{a(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};uV.create=(t,e)=>new uV({getter:t,typeName:Ci.ZodLazy,...Ao(e)});var dV=class extends ko{static{a(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ur(r,{received:r.data,code:Yt.invalid_literal,expected:this._def.value}),li}return{status:"valid",value:e.data}}get value(){return this._def.value}};dV.create=(t,e)=>new dV({value:t,typeName:Ci.ZodLiteral,...Ao(e)});function srn(t,e){return new fV({values:t,typeName:Ci.ZodEnum,...Ao(e)})}a(srn,"createZodEnum");var fV=class t extends ko{static{a(this,"ZodEnum")}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ur(r,{expected:us.joinValues(n),received:r.parsedType,code:Yt.invalid_type}),li}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Ur(r,{received:r.data,code:Yt.invalid_enum_value,options:n}),li}return tA(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};fV.create=srn;var pV=class extends ko{static{a(this,"ZodNativeEnum")}_parse(e){let r=us.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Xr.string&&n.parsedType!==Xr.number){let o=us.objectValues(r);return Ur(n,{expected:us.joinValues(o),received:n.parsedType,code:Yt.invalid_type}),li}if(this._cache||(this._cache=new Set(us.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=us.objectValues(r);return Ur(n,{received:n.data,code:Yt.invalid_enum_value,options:o}),li}return tA(e.data)}get enum(){return this._def.values}};pV.create=(t,e)=>new pV({values:t,typeName:Ci.ZodNativeEnum,...Ao(e)});var n9=class extends ko{static{a(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.promise&&r.common.async===!1)return Ur(r,{code:Yt.invalid_type,expected:Xr.promise,received:r.parsedType}),li;let n=r.parsedType===Xr.promise?r.data:Promise.resolve(r.data);return tA(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};n9.create=(t,e)=>new n9({type:t,typeName:Ci.ZodPromise,...Ao(e)});var tS=class extends ko{static{a(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ci.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:a(c=>{Ur(n,c),c.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async l=>{if(r.value==="aborted")return li;let u=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return u.status==="aborted"?li:u.status==="dirty"?tV(u.value):r.value==="dirty"?tV(u.value):u});{if(r.value==="aborted")return li;let l=this._def.schema._parseSync({data:c,path:n.path,parent:n});return l.status==="aborted"?li:l.status==="dirty"?tV(l.value):r.value==="dirty"?tV(l.value):l}}if(o.type==="refinement"){let c=a(l=>{let u=o.refinement(l,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l},"executeRefinement");if(n.common.async===!1){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?li:(l.status==="dirty"&&r.dirty(),c(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?li:(l.status==="dirty"&&r.dirty(),c(l.value).then(()=>({status:r.value,value:l.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!e9(c))return li;let l=o.transform(c.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>e9(c)?Promise.resolve(o.transform(c.value,s)).then(l=>({status:r.value,value:l})):li);us.assertNever(o)}};tS.create=(t,e,r)=>new tS({schema:t,typeName:Ci.ZodEffects,effect:e,...Ao(r)});tS.createWithPreprocess=(t,e,r)=>new tS({schema:e,effect:{type:"preprocess",transform:t},typeName:Ci.ZodEffects,...Ao(r)});var ZT=class extends ko{static{a(this,"ZodOptional")}_parse(e){return this._getType(e)===Xr.undefined?tA(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ZT.create=(t,e)=>new ZT({innerType:t,typeName:Ci.ZodOptional,...Ao(e)});var Yk=class extends ko{static{a(this,"ZodNullable")}_parse(e){return this._getType(e)===Xr.null?tA(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Yk.create=(t,e)=>new Yk({innerType:t,typeName:Ci.ZodNullable,...Ao(e)});var hV=class extends ko{static{a(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Xr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};hV.create=(t,e)=>new hV({innerType:t,typeName:Ci.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ao(e)});var mV=class extends ko{static{a(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return noe(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new CC(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new CC(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mV.create=(t,e)=>new mV({innerType:t,typeName:Ci.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ao(e)});var loe=class extends ko{static{a(this,"ZodNaN")}_parse(e){if(this._getType(e)!==Xr.nan){let n=this._getOrReturnCtx(e);return Ur(n,{code:Yt.invalid_type,expected:Xr.nan,received:n.parsedType}),li}return{status:"valid",value:e.data}}};loe.create=t=>new loe({typeName:Ci.ZodNaN,...Ao(t)});var dgo=Symbol("zod_brand"),v_e=class extends ko{static{a(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},b_e=class t extends ko{static{a(this,"ZodPipeline")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return a(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?li:s.status==="dirty"?(r.dirty(),tV(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?li:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Ci.ZodPipeline})}},gV=class extends ko{static{a(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),n=a(o=>(e9(o)&&(o.value=Object.freeze(o.value)),o),"freeze");return noe(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};gV.create=(t,e)=>new gV({innerType:t,typeName:Ci.ZodReadonly,...Ao(e)});function rrn(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}a(rrn,"cleanParams");function arn(t,e={},r){return t?r9.create().superRefine((n,o)=>{let s=t(n);if(s instanceof Promise)return s.then(c=>{if(!c){let l=rrn(e,n),u=l.fatal??r??!0;o.addIssue({code:"custom",...l,fatal:u})}});if(!s){let c=rrn(e,n),l=c.fatal??r??!0;o.addIssue({code:"custom",...c,fatal:l})}}):r9.create()}a(arn,"custom");var fgo={object:_C.lazycreate},Ci;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ci||(Ci={}));var pgo=a((t,e={message:`Input not instance of ${t.name}`})=>arn(r=>r instanceof t,e),"instanceOfType"),crn=t9.create,lrn=rV.create,hgo=loe.create,mgo=nV.create,urn=iV.create,ggo=oV.create,Ago=ooe.create,ygo=sV.create,Ego=aV.create,Cgo=r9.create,_go=WO.create,vgo=mw.create,bgo=soe.create,Tgo=zO.create,Sgo=_C.create,Igo=_C.strictCreate,xgo=cV.create,wgo=oje.create,Rgo=lV.create,Pgo=zk.create,kgo=sje.create,Ngo=aoe.create,Dgo=coe.create,Mgo=aje.create,Ogo=uV.create,Bgo=dV.create,Lgo=fV.create,Fgo=pV.create,Ugo=n9.create,Qgo=tS.create,qgo=ZT.create,Ggo=Yk.create,Hgo=tS.createWithPreprocess,jgo=b_e.create,$go=a(()=>crn().optional(),"ostring"),Vgo=a(()=>lrn().optional(),"onumber"),Wgo=a(()=>urn().optional(),"oboolean"),zgo={string:a((t=>t9.create({...t,coerce:!0})),"string"),number:a((t=>rV.create({...t,coerce:!0})),"number"),boolean:a((t=>iV.create({...t,coerce:!0})),"boolean"),bigint:a((t=>nV.create({...t,coerce:!0})),"bigint"),date:a((t=>oV.create({...t,coerce:!0})),"date")};var Ygo=li;f();var Wc={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},vp={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"},cje=1;f();f();var B={};Ri(B,{$brand:()=>gOt,$input:()=>f3t,$output:()=>d3t,NEVER:()=>I_e,TimePrecision:()=>m3t,ZodAny:()=>Grn,ZodArray:()=>Vrn,ZodBase64:()=>SLt,ZodBase64URL:()=>ILt,ZodBigInt:()=>f1e,ZodBigIntFormat:()=>RLt,ZodBoolean:()=>d1e,ZodCIDRv4:()=>bLt,ZodCIDRv6:()=>TLt,ZodCUID:()=>gLt,ZodCUID2:()=>ALt,ZodCatch:()=>ann,ZodCustom:()=>r$e,ZodCustomStringFormat:()=>Frn,ZodDate:()=>Zje,ZodDefault:()=>tnn,ZodDiscriminatedUnion:()=>Wrn,ZodE164:()=>xLt,ZodEmail:()=>dLt,ZodEmoji:()=>hLt,ZodEnum:()=>c1e,ZodError:()=>Oyo,ZodFile:()=>Zrn,ZodGUID:()=>Yje,ZodIPv4:()=>_Lt,ZodIPv6:()=>vLt,ZodISODate:()=>Vje,ZodISODateTime:()=>$je,ZodISODuration:()=>zje,ZodISOTime:()=>Wje,ZodIntersection:()=>zrn,ZodIssueCode:()=>ULt,ZodJWT:()=>wLt,ZodKSUID:()=>CLt,ZodLazy:()=>pnn,ZodLiteral:()=>Xrn,ZodMap:()=>Krn,ZodNaN:()=>lnn,ZodNanoID:()=>mLt,ZodNever:()=>jrn,ZodNonOptional:()=>BLt,ZodNull:()=>qrn,ZodNullable:()=>enn,ZodNumber:()=>u1e,ZodNumberFormat:()=>boe,ZodObject:()=>e$e,ZodOptional:()=>OLt,ZodPipe:()=>LLt,ZodPrefault:()=>nnn,ZodPromise:()=>mnn,ZodReadonly:()=>unn,ZodRealError:()=>voe,ZodRecord:()=>NLt,ZodSet:()=>Jrn,ZodString:()=>l1e,ZodStringFormat:()=>hl,ZodSuccess:()=>snn,ZodSymbol:()=>Urn,ZodTemplateLiteral:()=>fnn,ZodTransform:()=>DLt,ZodTuple:()=>Yrn,ZodType:()=>Wo,ZodULID:()=>yLt,ZodURL:()=>fLt,ZodUUID:()=>e4,ZodUndefined:()=>Qrn,ZodUnion:()=>kLt,ZodUnknown:()=>Hrn,ZodVoid:()=>$rn,ZodXID:()=>ELt,_ZodString:()=>uLt,_default:()=>rnn,any:()=>PLt,array:()=>br,base64:()=>eEo,base64url:()=>tEo,bigint:()=>lEo,boolean:()=>ic,catch:()=>cnn,check:()=>gnn,cidrv4:()=>Xyo,cidrv6:()=>Zyo,clone:()=>pv,coerce:()=>m1e,config:()=>T0,core:()=>ZO,cuid:()=>$yo,cuid2:()=>Vyo,custom:()=>FLt,date:()=>mEo,discriminatedUnion:()=>t$e,e164:()=>rEo,email:()=>Lyo,emoji:()=>Hyo,endsWith:()=>e1e,enum:()=>Cy,file:()=>bEo,flattenError:()=>O_e,float32:()=>oEo,float64:()=>sEo,formatError:()=>B_e,function:()=>Z3t,getErrorMap:()=>DEo,globalRegistry:()=>Jk,gt:()=>JO,gte:()=>bC,guid:()=>Fyo,includes:()=>X_e,instanceof:()=>REo,int:()=>lLt,int32:()=>aEo,int64:()=>uEo,intersection:()=>h1e,ipv4:()=>Kyo,ipv6:()=>Jyo,iso:()=>_oe,json:()=>kEo,jwt:()=>nEo,keyof:()=>gEo,ksuid:()=>Yyo,lazy:()=>hnn,length:()=>Coe,literal:()=>vn,locales:()=>V_e,looseObject:()=>S0,lowercase:()=>K_e,lt:()=>KO,lte:()=>rS,map:()=>CEo,maxLength:()=>Eoe,maxSize:()=>yoe,mime:()=>t1e,minLength:()=>o9,minSize:()=>TV,multipleOf:()=>bV,nan:()=>IEo,nanoid:()=>jyo,nativeEnum:()=>vEo,negative:()=>H3t,never:()=>Xje,nonnegative:()=>$3t,nonoptional:()=>onn,nonpositive:()=>j3t,normalize:()=>r1e,null:()=>p1e,nullable:()=>Kje,nullish:()=>TEo,number:()=>na,object:()=>kr,optional:()=>eu,overwrite:()=>XO,parse:()=>oLt,parseAsync:()=>sLt,partialRecord:()=>EEo,pipe:()=>Jje,positive:()=>G3t,prefault:()=>inn,preprocess:()=>n$e,prettifyError:()=>ROt,promise:()=>wEo,property:()=>V3t,readonly:()=>dnn,record:()=>ml,refine:()=>Ann,regex:()=>Y_e,regexes:()=>CV,registry:()=>vje,safeParse:()=>aLt,safeParseAsync:()=>cLt,set:()=>_Eo,setErrorMap:()=>NEo,size:()=>z_e,startsWith:()=>Z_e,strictObject:()=>AEo,string:()=>Me,stringFormat:()=>iEo,stringbool:()=>PEo,success:()=>SEo,superRefine:()=>ynn,symbol:()=>fEo,templateLiteral:()=>xEo,toJSONSchema:()=>eLt,toLowerCase:()=>i1e,toUpperCase:()=>o1e,transform:()=>MLt,treeifyError:()=>wOt,trim:()=>n1e,tuple:()=>yEo,uint32:()=>cEo,uint64:()=>dEo,ulid:()=>Wyo,undefined:()=>pEo,union:()=>oc,unknown:()=>Zl,uppercase:()=>J_e,url:()=>pLt,uuid:()=>Uyo,uuidv4:()=>Qyo,uuidv6:()=>qyo,uuidv7:()=>Gyo,void:()=>hEo,xid:()=>zyo});f();var ZO={};Ri(ZO,{$ZodAny:()=>tBt,$ZodArray:()=>G_e,$ZodAsyncError:()=>Kk,$ZodBase64:()=>$4t,$ZodBase64URL:()=>V4t,$ZodBigInt:()=>Cje,$ZodBigIntFormat:()=>J4t,$ZodBoolean:()=>q_e,$ZodCIDRv4:()=>G4t,$ZodCIDRv6:()=>H4t,$ZodCUID:()=>k4t,$ZodCUID2:()=>N4t,$ZodCatch:()=>CBt,$ZodCheck:()=>sd,$ZodCheckBigIntFormat:()=>a4t,$ZodCheckEndsWith:()=>E4t,$ZodCheckGreaterThan:()=>gje,$ZodCheckIncludes:()=>A4t,$ZodCheckLengthEquals:()=>p4t,$ZodCheckLessThan:()=>mje,$ZodCheckLowerCase:()=>m4t,$ZodCheckMaxLength:()=>d4t,$ZodCheckMaxSize:()=>c4t,$ZodCheckMimeType:()=>_4t,$ZodCheckMinLength:()=>f4t,$ZodCheckMinSize:()=>l4t,$ZodCheckMultipleOf:()=>o4t,$ZodCheckNumberFormat:()=>s4t,$ZodCheckOverwrite:()=>v4t,$ZodCheckProperty:()=>C4t,$ZodCheckRegex:()=>h4t,$ZodCheckSizeEquals:()=>u4t,$ZodCheckStartsWith:()=>y4t,$ZodCheckStringFormat:()=>hoe,$ZodCheckUpperCase:()=>g4t,$ZodCustom:()=>IBt,$ZodCustomStringFormat:()=>Y4t,$ZodDate:()=>iBt,$ZodDefault:()=>gBt,$ZodDiscriminatedUnion:()=>sBt,$ZodE164:()=>W4t,$ZodEmail:()=>x4t,$ZodEmoji:()=>R4t,$ZodEnum:()=>dBt,$ZodError:()=>M_e,$ZodFile:()=>pBt,$ZodFunction:()=>jje,$ZodGUID:()=>S4t,$ZodIPv4:()=>Q4t,$ZodIPv6:()=>q4t,$ZodISODate:()=>L4t,$ZodISODateTime:()=>B4t,$ZodISODuration:()=>U4t,$ZodISOTime:()=>F4t,$ZodIntersection:()=>aBt,$ZodJWT:()=>z4t,$ZodKSUID:()=>O4t,$ZodLazy:()=>SBt,$ZodLiteral:()=>fBt,$ZodMap:()=>lBt,$ZodNaN:()=>_Bt,$ZodNanoID:()=>P4t,$ZodNever:()=>rBt,$ZodNonOptional:()=>yBt,$ZodNull:()=>eBt,$ZodNullable:()=>mBt,$ZodNumber:()=>Eje,$ZodNumberFormat:()=>K4t,$ZodObject:()=>oBt,$ZodOptional:()=>hBt,$ZodPipe:()=>j_e,$ZodPrefault:()=>ABt,$ZodPromise:()=>TBt,$ZodReadonly:()=>vBt,$ZodRealError:()=>foe,$ZodRecord:()=>cBt,$ZodRegistry:()=>goe,$ZodSet:()=>uBt,$ZodString:()=>_V,$ZodStringFormat:()=>zc,$ZodSuccess:()=>EBt,$ZodSymbol:()=>X4t,$ZodTemplateLiteral:()=>bBt,$ZodTransform:()=>H_e,$ZodTuple:()=>vV,$ZodType:()=>Li,$ZodULID:()=>D4t,$ZodURL:()=>w4t,$ZodUUID:()=>I4t,$ZodUndefined:()=>Z4t,$ZodUnion:()=>_je,$ZodUnknown:()=>moe,$ZodVoid:()=>nBt,$ZodXID:()=>M4t,$brand:()=>gOt,$constructor:()=>Xe,$input:()=>f3t,$output:()=>d3t,Doc:()=>Q_e,JSONSchema:()=>Orn,JSONSchemaGenerator:()=>a1e,NEVER:()=>I_e,TimePrecision:()=>m3t,_any:()=>B3t,_array:()=>s1e,_base64:()=>Qje,_base64url:()=>qje,_bigint:()=>R3t,_boolean:()=>x3t,_catch:()=>wyo,_cidrv4:()=>Fje,_cidrv6:()=>Uje,_coercedBigint:()=>P3t,_coercedBoolean:()=>w3t,_coercedDate:()=>Q3t,_coercedNumber:()=>_3t,_coercedString:()=>h3t,_cuid:()=>kje,_cuid2:()=>Nje,_custom:()=>Y3t,_date:()=>U3t,_default:()=>Syo,_discriminatedUnion:()=>hyo,_e164:()=>Gje,_email:()=>bje,_emoji:()=>Rje,_endsWith:()=>e1e,_enum:()=>Eyo,_file:()=>z3t,_float32:()=>b3t,_float64:()=>T3t,_gt:()=>JO,_gte:()=>bC,_guid:()=>W_e,_includes:()=>X_e,_int:()=>v3t,_int32:()=>S3t,_int64:()=>k3t,_intersection:()=>myo,_ipv4:()=>Bje,_ipv6:()=>Lje,_isoDate:()=>A3t,_isoDateTime:()=>g3t,_isoDuration:()=>E3t,_isoTime:()=>y3t,_jwt:()=>Hje,_ksuid:()=>Oje,_lazy:()=>Nyo,_length:()=>Coe,_literal:()=>_yo,_lowercase:()=>K_e,_lt:()=>KO,_lte:()=>rS,_map:()=>Ayo,_max:()=>rS,_maxLength:()=>Eoe,_maxSize:()=>yoe,_mime:()=>t1e,_min:()=>bC,_minLength:()=>o9,_minSize:()=>TV,_multipleOf:()=>bV,_nan:()=>q3t,_nanoid:()=>Pje,_nativeEnum:()=>Cyo,_negative:()=>H3t,_never:()=>L3t,_nonnegative:()=>$3t,_nonoptional:()=>Iyo,_nonpositive:()=>j3t,_normalize:()=>r1e,_null:()=>O3t,_nullable:()=>Tyo,_number:()=>C3t,_optional:()=>byo,_overwrite:()=>XO,_parse:()=>uje,_parseAsync:()=>dje,_pipe:()=>Ryo,_positive:()=>G3t,_promise:()=>Dyo,_property:()=>V3t,_readonly:()=>Pyo,_record:()=>gyo,_refine:()=>K3t,_regex:()=>Y_e,_safeParse:()=>fje,_safeParseAsync:()=>pje,_set:()=>yyo,_size:()=>z_e,_startsWith:()=>Z_e,_string:()=>p3t,_stringFormat:()=>X3t,_stringbool:()=>J3t,_success:()=>xyo,_symbol:()=>D3t,_templateLiteral:()=>kyo,_toLowerCase:()=>i1e,_toUpperCase:()=>o1e,_transform:()=>vyo,_trim:()=>n1e,_tuple:()=>W3t,_uint32:()=>I3t,_uint64:()=>N3t,_ulid:()=>Dje,_undefined:()=>M3t,_union:()=>pyo,_unknown:()=>Aoe,_uppercase:()=>J_e,_url:()=>wje,_uuid:()=>Tje,_uuidv4:()=>Sje,_uuidv6:()=>Ije,_uuidv7:()=>xje,_void:()=>F3t,_xid:()=>Mje,clone:()=>pv,config:()=>T0,flattenError:()=>O_e,formatError:()=>B_e,function:()=>Z3t,globalConfig:()=>S_e,globalRegistry:()=>Jk,isValidBase64:()=>j4t,isValidBase64URL:()=>Prn,isValidJWT:()=>krn,locales:()=>V_e,parse:()=>L_e,parseAsync:()=>F_e,prettifyError:()=>ROt,regexes:()=>CV,registry:()=>vje,safeParse:()=>poe,safeParseAsync:()=>U_e,toDotPath:()=>frn,toJSONSchema:()=>eLt,treeifyError:()=>wOt,util:()=>Sr,version:()=>b4t});f();f();var I_e=Object.freeze({status:"aborted"});function Xe(t,e,r){function n(l,u){var d;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(d=l._zod).traits??(d.traits=new Set),l._zod.traits.add(t),e(l,u);for(let p in c.prototype)p in l||Object.defineProperty(l,p,{value:c.prototype[p].bind(l)});l._zod.constr=c,l._zod.def=u}a(n,"init");let o=r?.Parent??Object;class s extends o{static{a(this,"Definition")}}Object.defineProperty(s,"name",{value:t});function c(l){var u;let d=r?.Parent?new s:this;n(d,l),(u=d._zod).deferred??(u.deferred=[]);for(let p of d._zod.deferred)p();return d}return a(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:a(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(t),"value")}),Object.defineProperty(c,"name",{value:t}),c}a(Xe,"$constructor");var gOt=Symbol("zod_brand"),Kk=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},S_e={};function T0(t){return t&&Object.assign(S_e,t),S_e}a(T0,"config");f();f();var Sr={};Ri(Sr,{BIGINT_FORMAT_RANGES:()=>IOt,Class:()=>yOt,NUMBER_FORMAT_RANGES:()=>SOt,aborted:()=>yV,allowsEval:()=>vOt,assert:()=>tAo,assertEqual:()=>Jgo,assertIs:()=>Zgo,assertNever:()=>eAo,assertNotEqual:()=>Xgo,assignProp:()=>_Ot,cached:()=>R_e,captureStackTrace:()=>lje,cleanEnum:()=>hAo,cleanRegex:()=>P_e,clone:()=>pv,createTransparentProxy:()=>aAo,defineLazy:()=>Oa,esc:()=>AV,escapeRegex:()=>YO,extend:()=>uAo,finalizeIssue:()=>hv,floatSafeRemainder:()=>COt,getElementAtPath:()=>rAo,getEnumValues:()=>w_e,getLengthableOrigin:()=>D_e,getParsedType:()=>sAo,getSizableOrigin:()=>N_e,isObject:()=>uoe,isPlainObject:()=>doe,issue:()=>xOt,joinValues:()=>Pt,jsonStringifyReplacer:()=>EOt,merge:()=>dAo,normalizeParams:()=>ur,nullish:()=>i9,numKeys:()=>oAo,omit:()=>lAo,optionalKeys:()=>TOt,partial:()=>fAo,pick:()=>cAo,prefixIssues:()=>vC,primitiveTypes:()=>bOt,promiseAllObject:()=>nAo,propertyKeyTypes:()=>k_e,randomString:()=>iAo,required:()=>pAo,stringifyPrimitive:()=>Tr,unwrapMessage:()=>x_e});f();function Jgo(t){return t}a(Jgo,"assertEqual");function Xgo(t){return t}a(Xgo,"assertNotEqual");function Zgo(t){}a(Zgo,"assertIs");function eAo(t){throw new Error}a(eAo,"assertNever");function tAo(t){}a(tAo,"assert");function w_e(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}a(w_e,"getEnumValues");function Pt(t,e="|"){return t.map(r=>Tr(r)).join(e)}a(Pt,"joinValues");function EOt(t,e){return typeof e=="bigint"?e.toString():e}a(EOt,"jsonStringifyReplacer");function R_e(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a(R_e,"cached");function i9(t){return t==null}a(i9,"nullish");function P_e(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}a(P_e,"cleanRegex");function COt(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}a(COt,"floatSafeRemainder");function Oa(t,e,r){Object.defineProperty(t,e,{get(){{let o=r();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}a(Oa,"defineLazy");function _Ot(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}a(_Ot,"assignProp");function rAo(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}a(rAo,"getElementAtPath");function nAo(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let o={};for(let s=0;s{};function uoe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}a(uoe,"isObject");var vOt=R_e(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function doe(t){if(uoe(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(uoe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(doe,"isPlainObject");function oAo(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}a(oAo,"numKeys");var sAo=a(t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},"getParsedType"),k_e=new Set(["string","number","symbol"]),bOt=new Set(["string","number","bigint","boolean","symbol","undefined"]);function YO(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(YO,"escapeRegex");function pv(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}a(pv,"clone");function ur(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:a(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:a(()=>e.error,"error")}:e}a(ur,"normalizeParams");function aAo(t){let e;return new Proxy({},{get(r,n,o){return e??(e=t()),Reflect.get(e,n,o)},set(r,n,o,s){return e??(e=t()),Reflect.set(e,n,o,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,o){return e??(e=t()),Reflect.defineProperty(e,n,o)}})}a(aAo,"createTransparentProxy");function Tr(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}a(Tr,"stringifyPrimitive");function TOt(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}a(TOt,"optionalKeys");var SOt={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},IOt={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function cAo(t,e){let r={},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(r[o]=n.shape[o])}return pv(t,{...t._zod.def,shape:r,checks:[]})}a(cAo,"pick");function lAo(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete r[o]}return pv(t,{...t._zod.def,shape:r,checks:[]})}a(lAo,"omit");function uAo(t,e){if(!doe(e))throw new Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return _Ot(this,"shape",n),n},checks:[]};return pv(t,r)}a(uAo,"extend");function dAo(t,e){return pv(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return _Ot(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}a(dAo,"merge");function fAo(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=t?new t({type:"optional",innerType:n[s]}):n[s])}else for(let s in n)o[s]=t?new t({type:"optional",innerType:n[s]}):n[s];return pv(e,{...e._zod.def,shape:o,checks:[]})}a(fAo,"partial");function pAo(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return pv(e,{...e._zod.def,shape:o,checks:[]})}a(pAo,"required");function yV(t,e=0){for(let r=e;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}a(vC,"prefixIssues");function x_e(t){return typeof t=="string"?t:t?.message}a(x_e,"unwrapMessage");function hv(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let o=x_e(t.inst?._zod.def?.error?.(t))??x_e(e?.error?.(t))??x_e(r.customError?.(t))??x_e(r.localeError?.(t))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}a(hv,"finalizeIssue");function N_e(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}a(N_e,"getSizableOrigin");function D_e(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}a(D_e,"getLengthableOrigin");function xOt(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}a(xOt,"issue");function hAo(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}a(hAo,"cleanEnum");var yOt=class{static{a(this,"Class")}constructor(...e){}};var drn=a((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,EOt,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:a(()=>t.message,"value"),enumerable:!1})},"initializer"),M_e=Xe("$ZodError",drn),foe=Xe("$ZodError",drn,{Parent:Error});function O_e(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}a(O_e,"flattenError");function B_e(t,e){let r=e||function(s){return s.message},n={_errors:[]},o=a(s=>{for(let c of s.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l}));else if(c.code==="invalid_key")o({issues:c.issues});else if(c.code==="invalid_element")o({issues:c.issues});else if(c.path.length===0)n._errors.push(r(c));else{let l=n,u=0;for(;u{var l,u;for(let d of s.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>o({issues:p},d.path));else if(d.code==="invalid_key")o({issues:d.issues},d.path);else if(d.code==="invalid_element")o({issues:d.issues},d.path);else{let p=[...c,...d.path];if(p.length===0){n.errors.push(r(d));continue}let h=n,m=0;for(;mn.path.length-o.path.length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${frn(n.path)}`);return e.join(` -`)}a(ROt,"prettifyError");var uje=a(t=>(e,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new Kk;if(c.issues.length){let l=new(o?.Err??t)(c.issues.map(u=>hv(u,s,T0())));throw lje(l,o?.callee),l}return c.value},"_parse"),L_e=uje(foe),dje=a(t=>async(e,r,n,o)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(o?.Err??t)(c.issues.map(u=>hv(u,s,T0())));throw lje(l,o?.callee),l}return c.value},"_parseAsync"),F_e=dje(foe),fje=a(t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Kk;return s.issues.length?{success:!1,error:new(t??M_e)(s.issues.map(c=>hv(c,o,T0())))}:{success:!0,data:s.value}},"_safeParse"),poe=fje(foe),pje=a(t=>async(e,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(c=>hv(c,o,T0())))}:{success:!0,data:s.value}},"_safeParseAsync"),U_e=pje(foe);f();f();var CV={};Ri(CV,{_emoji:()=>prn,base64:()=>jOt,base64url:()=>hje,bigint:()=>JOt,boolean:()=>e4t,browserEmail:()=>bAo,cidrv4:()=>GOt,cidrv6:()=>HOt,cuid:()=>POt,cuid2:()=>kOt,date:()=>WOt,datetime:()=>YOt,domain:()=>TAo,duration:()=>BOt,e164:()=>VOt,email:()=>FOt,emoji:()=>UOt,extendedDuration:()=>gAo,guid:()=>LOt,hostname:()=>$Ot,html5Email:()=>CAo,integer:()=>XOt,ipv4:()=>QOt,ipv6:()=>qOt,ksuid:()=>MOt,lowercase:()=>n4t,nanoid:()=>OOt,null:()=>t4t,number:()=>ZOt,rfc5322Email:()=>_Ao,string:()=>KOt,time:()=>zOt,ulid:()=>NOt,undefined:()=>r4t,unicodeEmail:()=>vAo,uppercase:()=>i4t,uuid:()=>EV,uuid4:()=>AAo,uuid6:()=>yAo,uuid7:()=>EAo,xid:()=>DOt});f();var POt=/^[cC][^\s-]{8,}$/,kOt=/^[0-9a-z]+$/,NOt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,DOt=/^[0-9a-vA-V]{20}$/,MOt=/^[A-Za-z0-9]{27}$/,OOt=/^[a-zA-Z0-9_-]{21}$/,BOt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gAo=/^[-+]?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)?)??$/,LOt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,EV=a(t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,"uuid"),AAo=EV(4),yAo=EV(6),EAo=EV(7),FOt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CAo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_Ao=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,vAo=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,bAo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,prn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function UOt(){return new RegExp(prn,"u")}a(UOt,"emoji");var QOt=/^(?:(?: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])$/,qOt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,GOt=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,HOt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jOt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hje=/^[A-Za-z0-9_-]*$/,$Ot=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,TAo=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,VOt=/^\+(?:[0-9]){6,14}[0-9]$/,hrn="(?:(?:\\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])))",WOt=new RegExp(`^${hrn}$`);function mrn(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(mrn,"timeSource");function zOt(t){return new RegExp(`^${mrn(t)}$`)}a(zOt,"time");function YOt(t){let e=mrn({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${hrn}T(?:${n})$`)}a(YOt,"datetime");var KOt=a(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),JOt=/^\d+n?$/,XOt=/^\d+$/,ZOt=/^-?\d+(?:\.\d+)?/i,e4t=/true|false/i,t4t=/null/i;var r4t=/undefined/i;var n4t=/^[^A-Z]*$/,i4t=/^[^a-z]*$/;var sd=Xe("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Arn={number:"number",bigint:"bigint",object:"date"},mje=Xe("$ZodCheckLessThan",(t,e)=>{sd.init(t,e);let r=Arn[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value{(e.inclusive?n.value<=e.value:n.value{sd.init(t,e);let r=Arn[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),o4t=Xe("$ZodCheckMultipleOf",(t,e)=>{sd.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):COt(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),s4t=Xe("$ZodCheckNumberFormat",(t,e)=>{sd.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[o,s]=SOt[e.format];t._zod.onattach.push(c=>{let l=c._zod.bag;l.format=e.format,l.minimum=o,l.maximum=s,r&&(l.pattern=XOt)}),t._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:e.format,code:"invalid_type",input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}ls&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inst:t})}}),a4t=Xe("$ZodCheckBigIntFormat",(t,e)=>{sd.init(t,e);let[r,n]=IOt[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=r,s.maximum=n}),t._zod.check=o=>{let s=o.value;sn&&o.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inst:t})}}),c4t=Xe("$ZodCheckMaxSize",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let o=n.value;o.size<=e.maximum||n.issues.push({origin:N_e(o),code:"too_big",maximum:e.maximum,input:o,inst:t,continue:!e.abort})}}),l4t=Xe("$ZodCheckMinSize",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;o.size>=e.minimum||n.issues.push({origin:N_e(o),code:"too_small",minimum:e.minimum,input:o,inst:t,continue:!e.abort})}}),u4t=Xe("$ZodCheckSizeEquals",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.size,o.maximum=e.size,o.size=e.size}),t._zod.check=n=>{let o=n.value,s=o.size;if(s===e.size)return;let c=s>e.size;n.issues.push({origin:N_e(o),...c?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),d4t=Xe("$ZodCheckMaxLength",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let o=n.value;if(o.length<=e.maximum)return;let c=D_e(o);n.issues.push({origin:c,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),f4t=Xe("$ZodCheckMinLength",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let c=D_e(o);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),p4t=Xe("$ZodCheckLengthEquals",(t,e)=>{var r;sd.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!i9(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=n=>{let o=n.value,s=o.length;if(s===e.length)return;let c=D_e(o),l=s>e.length;n.issues.push({origin:c,...l?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),hoe=Xe("$ZodCheckStringFormat",(t,e)=>{var r,n;sd.init(t,e),t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),h4t=Xe("$ZodCheckRegex",(t,e)=>{hoe.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),m4t=Xe("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=n4t),hoe.init(t,e)}),g4t=Xe("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=i4t),hoe.init(t,e)}),A4t=Xe("$ZodCheckIncludes",(t,e)=>{sd.init(t,e);let r=YO(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(o=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),y4t=Xe("$ZodCheckStartsWith",(t,e)=>{sd.init(t,e);let r=new RegExp(`^${YO(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),E4t=Xe("$ZodCheckEndsWith",(t,e)=>{sd.init(t,e);let r=new RegExp(`.*${YO(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function grn(t,e,r){t.issues.length&&e.issues.push(...vC(r,t.issues))}a(grn,"handleCheckPropertyResult");var C4t=Xe("$ZodCheckProperty",(t,e)=>{sd.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>grn(o,r,e.property));grn(n,r,e.property)}}),_4t=Xe("$ZodCheckMimeType",(t,e)=>{sd.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t})}}),v4t=Xe("$ZodCheckOverwrite",(t,e)=>{sd.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});f();var Q_e=class{static{a(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(` +`)}`}};function QAo(t){return[new tHe,new iHe,new XGe,new cHe,new DGe,new MGe,new ZGe,new eHe,new lHe]}a(QAo,"getAllClsTools");function Xrn(t,e){QAo(t).forEach(e.registerTool.bind(e)),t.get(Fn).onDidSetCapabilities(r=>{t.get(um).getPolicyValue("subagent.enabled")===!1?e.unregisterTool(new lie):r.subAgent?e.registerTool(new lie):e.unregisterTool(new lie),r.manageTodoListTool?e.registerTool(new bk(t)):e.unregisterTool(new bk(t))}),hF(t).then(r=>{r&&e.registerTool(new NGe)})}a(Xrn,"registerAllClsTools");var Io=class{constructor(e){this.ctx=e;this._toolRegistry=new HFe;Xrn(e,this)}static{a(this,"ToolsService")}registerTool(e){this._toolRegistry.registerTool(e)}unregisterTool(e){return typeof e=="string"?this._toolRegistry.unregisterTool(e):this._toolRegistry.unregisterTool(e.id)}prepareInvocation(e,r,n){let o=this._toolRegistry.getTool(e);if(!o)throw new Error(`Tool with id '${e}' is undefined`);return o.prepareInvocation?.(r,n)??{}}prepareCompletion(e,r,n){let o=this._toolRegistry.getTool(e);if(!o)throw new Error(`Tool with id '${e}' is undefined`);return o.prepareCompletion?.(r,n)??{}}async invokeTool(e,r,n,o){if(o.isCancellationRequested)throw new Ec;let s=this._toolRegistry.getTool(r);if(!s)throw new Error(`Tool with id '${r}' is undefined`);return await s.invoke?.(e,n,o)??new _r([],"success")}async invokeToolConfirmation(e,r,n,o){if(o.isCancellationRequested)throw new Ec;let s=this._toolRegistry.getTool(r);if(!s)throw new Error(`Tool with id '${r}' is undefined`);return await s.invokeConfirmation?.(e,n,o)??{result:"dismiss"}}getToolById(e){return this._toolRegistry.getTool(e)}getToolByNameAndProvider(e,r){return this._toolRegistry.listTools().find(n=>n.name===e&&n.toolProvider.id===r.id)}getToolsForModel(e){if(e&&e.customTools!==void 0){if(e.customTools.length===0)return[];let r=new Set(e.customTools);return Array.from(this.getToolMapForModel().values()).filter(n=>r.has(n.configurationKey))}return e?.kind==="Ask"?Array.from(this.getToolMapForModel().values()).filter(r=>Len.has(r.name)):e?.kind==="InlineAgent"?Array.from(this.getToolMapForModel().values()).filter(r=>Fen.has(r.name)):Array.from(this.getToolMapForModel().values()).filter(r=>r.status==="enabled")}getToolMapForModel(){let e=new Map;for(let m of this._toolRegistry.listTools())e.has(m.toolProvider.id)||e.set(m.toolProvider.id,[]),e.get(m.toolProvider.id)?.push(m);let r=e.get(ih.id)?.find(m=>m.name==="insert_edit_into_file");if(r){let m=e.get(ih.id),g=m?.indexOf(r)??-1;g>=0&&m?.splice(g,1)}let n=e.get(ih.id)?.find(m=>m.name==="replace_string_in_file");if(n){let m=e.get(ih.id),g=m?.indexOf(n)??-1;g>=0&&m?.splice(g,1)}let o=e.get(Id.id)?.find(m=>m.name==="insert_edit_into_file");if(o){let m=e.get(Id.id),g=m?.indexOf(o)??-1;g>=0&&m?.splice(g,1)}let s=e.get(ih.id)?.find(m=>m.name==="create_file");if(s){let m=e.get(ih.id),g=m?.indexOf(s)??-1;g>=0&&m?.splice(g,1)}let c=e.get(Id.id)?.find(m=>m.name==="create_file");if(c){let m=e.get(Id.id),g=m?.indexOf(c)??-1;g>=0&&m?.splice(g,1)}let l=e.get(ih.id)?.find(m=>m.name==="apply_patch");if(l){let m=e.get(ih.id),g=m?.indexOf(l)??-1;g>=0&&m?.splice(g,1)}let u=new Map;r&&o&&u.set(r.nameForModel,r),n&&o&&u.set(n.nameForModel,n),s&&c&&u.set(s.nameForModel,s),l&&o&&c&&u.set(l.nameForModel,l);let d=e.get(Id.id)??[],p=e.get(ih.id)??[],h=Array.from(e.entries()).filter(([m])=>m!==ih.id&&m!==Id.id).flatMap(([,m])=>m);return d.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),p.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),h.forEach(m=>{u.has(m.nameForModel)||u.set(m.nameForModel,m)}),u}async updateToolStatusByName(e,r,n){let o=this.guessTool(e,r);o.length!==0&&await this.doUpdateToolStatus(e,o,n)}async updateToolStatus(e,r,n){let o=this.getToolsToUpdate(r);o.length!==0&&await this.doUpdateToolStatus(e,o,n)}async doUpdateToolStatus(e,r,n){let o;Array.isArray(r)?o=r:o=[r],await this.doUpdateToolsStatus(e,o.map(s=>({tool:s,status:n})))}async updateToolsStatusByName(e,r){let n=r.flatMap(({toolName:o,status:s})=>this.guessTool(e,o).map(l=>({tool:l,status:s})));await this.doUpdateToolsStatus(e,n)}async updateToolsStatus(e,r){let n=r.flatMap(({toolId:o,status:s})=>this.getToolsToUpdate(o).map(l=>({tool:l,status:s})));await this.doUpdateToolsStatus(e,n)}async doUpdateToolsStatus(e,r){let n=r.map(({tool:c,status:l})=>this.prepareUpdateToolStatus(e,c,l)).flat();function o(c){return c.shouldUpdate?c.shouldUpdate():!0}a(o,"shouldUpdate");let s=new Map;for(let c of n)!c||!o(c)||(c.type==="memory"?c.tool.status=c.status:c.type==="customAgent"&&(s.has(c.customAgent.id)||s.set(c.customAgent.id,{agent:c.customAgent,options:[]}),s.get(c.customAgent.id).options.push({toolConfigurationKey:c.tool.configurationKey,status:c.status})));if(s.size>0){let c=this.ctx.get(F1);for(let[l,{agent:u,options:d}]of s)await c.updateCustomAgent(u,{updateToolOptions:d})}}guessTool(e,r){let n=this._toolRegistry.listTools().filter(o=>o.name===r);if(!Rye(e)){let o=new Set,s=[];for(let c of n)o.has(c.configurationKey)||(o.add(c.configurationKey),s.push(c));return s}if(r==="insert_edit_into_file"||r==="replace_string_in_file"){let o=this._toolRegistry.listTools().find(c=>c.toolProvider.id===ih.id&&c.name===r),s=this._toolRegistry.listTools().find(c=>c.toolProvider.id===Id.id&&c.name==="insert_edit_into_file");return o&&s?[o,s]:[]}return n.length===0?[]:n.length===1||n.length===2&&n.every(o=>o.toolProvider.id===ih.id||o.toolProvider.id===Id.id)?n:[]}getToolsToUpdate(e){let r=this._toolRegistry.getTool(e);if(!r)return[];if((r.name==="insert_edit_into_file"||r.name==="replace_string_in_file")&&r.toolProvider.id===ih.id){let n=this._toolRegistry.listTools().find(o=>o.toolProvider.id===Id.id&&o.name==="insert_edit_into_file");if(n)return[r,n]}return[r]}prepareUpdateToolStatus(e,r,n){if(Rye(e))return r.name==="insert_edit_into_file"&&r.toolProvider.id===Id.id?[this.prepareUpdateEditorEditFileToolStatus(r,n)]:[{type:"memory",tool:r,status:n}];if(e.source&&!e.source.isReadonly){let o=e.source;return!o.tools||(o.tools.some(c=>c==r?.configurationKey)?"enabled":"disabled")===n?void 0:[{type:"customAgent",customAgent:o,tool:r,status:n}]}}prepareUpdateEditorEditFileToolStatus(e,r){if(r==="enabled")return{type:"memory",tool:e,status:"enabled"};let n=this._toolRegistry.listTools().find(c=>c.toolProvider.id===ih.id&&c.name==="insert_edit_into_file"),o=this._toolRegistry.listTools().find(c=>c.toolProvider.id===ih.id&&c.name==="replace_string_in_file");function s(c){return!c||c.status==="disabled"}return a(s,"isToolDisabled"),{type:"memory",tool:e,status:"disabled",shouldUpdate:a(()=>s(n)&&s(o),"shouldUpdate")}}};f();var IF=class extends T6{static{a(this,"ClientLanguageModelTool")}constructor(e){super({...e,toolProvider:Id,type:"client"}),this.confirmationMessages=e.confirmationMessages}prepareInvocation(e,r){return{progressMessage:`Running ${this.name} tool`,confirmationMessages:this.confirmationMessages}}prepareCompletion(e,r){return{completionMessage:`Ran ${this.name} tool`}}async invoke(e,r,n){let o={name:this.name,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId};try{return await e.ctx.get(XA).invokeClientTool(e,o)}catch(s){throw new Error(`Failed to invoke client tool ${this.name}: ${String(s)}`)}}async invokeConfirmation(e,r,n){if(n.isCancellationRequested)throw new Ec;let o={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations,toolMetadata:r.toolMetadata};try{return await e.ctx.get(Cu).invokeClientToolConfirmation(e,o)}catch(s){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(s)}`)}}};f();f();var C_e={};ui(C_e,{BRAND:()=>fyo,DIRTY:()=>c$,EMPTY_PATH:()=>jAo,INVALID:()=>ci,NEVER:()=>Kyo,OK:()=>Wg,ParseStatus:()=>Tm,Schema:()=>xo,ZodAny:()=>RF,ZodArray:()=>P4,ZodBigInt:()=>u$,ZodBoolean:()=>d$,ZodBranded:()=>E_e,ZodCatch:()=>v$,ZodDate:()=>f$,ZodDefault:()=>C$,ZodDiscriminatedUnion:()=>pHe,ZodEffects:()=>HT,ZodEnum:()=>E$,ZodError:()=>c_,ZodFirstPartyTypeKind:()=>Ei,ZodFunction:()=>mHe,ZodIntersection:()=>g$,ZodIssueCode:()=>zt,ZodLazy:()=>A$,ZodLiteral:()=>y$,ZodMap:()=>Cie,ZodNaN:()=>bie,ZodNativeEnum:()=>_$,ZodNever:()=>iw,ZodNull:()=>h$,ZodNullable:()=>Lk,ZodNumber:()=>l$,ZodObject:()=>l_,ZodOptional:()=>qT,ZodParsedType:()=>Xr,ZodPipeline:()=>__e,ZodPromise:()=>PF,ZodReadonly:()=>b$,ZodRecord:()=>hHe,ZodSchema:()=>xo,ZodSet:()=>vie,ZodString:()=>wF,ZodSymbol:()=>Eie,ZodTransformer:()=>HT,ZodTuple:()=>Bk,ZodType:()=>xo,ZodUndefined:()=>p$,ZodUnion:()=>m$,ZodUnknown:()=>R4,ZodVoid:()=>_ie,addIssueToContext:()=>Ur,any:()=>Cyo,array:()=>Syo,bigint:()=>gyo,boolean:()=>lnn,coerce:()=>Yyo,custom:()=>snn,date:()=>Ayo,datetimeRegex:()=>inn,defaultErrorMap:()=>x4,discriminatedUnion:()=>Ryo,effect:()=>qyo,enum:()=>Fyo,function:()=>Oyo,getErrorMap:()=>gie,getParsedType:()=>Ok,instanceof:()=>hyo,intersection:()=>Pyo,isAborted:()=>dHe,isAsync:()=>Aie,isDirty:()=>fHe,isValid:()=>xF,late:()=>pyo,lazy:()=>Byo,literal:()=>Lyo,makeIssue:()=>y_e,map:()=>Nyo,nan:()=>myo,nativeEnum:()=>Uyo,never:()=>byo,null:()=>_yo,nullable:()=>Hyo,number:()=>cnn,object:()=>Iyo,objectUtil:()=>N4t,oboolean:()=>zyo,onumber:()=>Wyo,optional:()=>Gyo,ostring:()=>Vyo,pipeline:()=>$yo,preprocess:()=>jyo,promise:()=>Qyo,quotelessJson:()=>qAo,record:()=>Dyo,set:()=>Myo,setErrorMap:()=>HAo,strictObject:()=>xyo,string:()=>ann,symbol:()=>yyo,transformer:()=>qyo,tuple:()=>kyo,undefined:()=>Eyo,union:()=>wyo,unknown:()=>vyo,util:()=>ss,void:()=>Tyo});f();f();f();f();f();var ss;(function(t){t.assertEqual=o=>{};function e(o){}a(e,"assertIs"),t.assertIs=e;function r(o){throw new Error}a(r,"assertNever"),t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(l=>typeof o[o[l]]!="number"),c={};for(let l of s)c[l]=o[l];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}a(n,"joinValues"),t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(ss||(ss={}));var N4t;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(N4t||(N4t={}));var Xr=ss.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ok=a(t=>{switch(typeof t){case"undefined":return Xr.undefined;case"string":return Xr.string;case"number":return Number.isNaN(t)?Xr.nan:Xr.number;case"boolean":return Xr.boolean;case"function":return Xr.function;case"bigint":return Xr.bigint;case"symbol":return Xr.symbol;case"object":return Array.isArray(t)?Xr.array:t===null?Xr.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Xr.promise:typeof Map<"u"&&t instanceof Map?Xr.map:typeof Set<"u"&&t instanceof Set?Xr.set:typeof Date<"u"&&t instanceof Date?Xr.date:Xr.object;default:return Xr.unknown}},"getParsedType");var zt=ss.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"]),qAo=a(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),c_=class t extends Error{static{a(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=a(s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let l=n,u=0;for(;ur.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};c_.create=t=>new c_(t);var GAo=a((t,e)=>{let r;switch(t.code){case zt.invalid_type:t.received===Xr.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case zt.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ss.jsonStringifyReplacer)}`;break;case zt.unrecognized_keys:r=`Unrecognized key(s) in object: ${ss.joinValues(t.keys,", ")}`;break;case zt.invalid_union:r="Invalid input";break;case zt.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ss.joinValues(t.options)}`;break;case zt.invalid_enum_value:r=`Invalid enum value. Expected ${ss.joinValues(t.options)}, received '${t.received}'`;break;case zt.invalid_arguments:r="Invalid function arguments";break;case zt.invalid_return_type:r="Invalid function return type";break;case zt.invalid_date:r="Invalid date";break;case zt.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ss.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case zt.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case zt.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case zt.custom:r="Invalid input";break;case zt.invalid_intersection_types:r="Intersection results could not be merged";break;case zt.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case zt.not_finite:r="Number must be finite";break;default:r=e.defaultError,ss.assertNever(t)}return{message:r}},"errorMap"),x4=GAo;var Zrn=x4;function HAo(t){Zrn=t}a(HAo,"setErrorMap");function gie(){return Zrn}a(gie,"getErrorMap");f();var y_e=a(t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let l="",u=n.filter(d=>!!d).slice().reverse();for(let d of u)l=d(c,{data:e,defaultError:l}).message;return{...o,path:s,message:l}},"makeIssue"),jAo=[];function Ur(t,e){let r=gie(),n=y_e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===x4?void 0:x4].filter(o=>!!o)});t.common.issues.push(n)}a(Ur,"addIssueToContext");var Tm=class t{static{a(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return ci;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return ci;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},ci=Object.freeze({status:"aborted"}),c$=a(t=>({status:"dirty",value:t}),"DIRTY"),Wg=a(t=>({status:"valid",value:t}),"OK"),dHe=a(t=>t.status==="aborted","isAborted"),fHe=a(t=>t.status==="dirty","isDirty"),xF=a(t=>t.status==="valid","isValid"),Aie=a(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");f();f();var Tn;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Tn||(Tn={}));var GT=class{static{a(this,"ParseInputLazyPath")}constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},enn=a((t,e)=>{if(xF(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new c_(t.common.issues);return this._error=r,this._error}}},"handleResult");function po(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:a((c,l)=>{let{message:u}=t;return c.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??n??l.defaultError}:c.code!=="invalid_type"?{message:l.defaultError}:{message:u??r??l.defaultError}},"customMap"),description:o}}a(po,"processCreateParams");var xo=class{static{a(this,"ZodType")}get description(){return this._def.description}_getType(e){return Ok(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ok(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Tm,ctx:{common:e.parent.common,data:e.data,parsedType:Ok(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Aie(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ok(e)},o=this._parseSync({data:e,path:n.path,parent:n});return enn(n,o)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ok(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return xF(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>xF(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ok(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Aie(o)?o:Promise.resolve(o));return enn(n,s)}refine(e,r){let n=a(o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r,"getIssueProperties");return this._refinement((o,s)=>{let c=e(o),l=a(()=>s.addIssue({code:zt.custom,...n(o)}),"setError");return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(l(),!1)):c?!0:(l(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new HT({schema:this,typeName:Ei.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a(r=>this["~validate"](r),"validate")}}optional(){return qT.create(this,this._def)}nullable(){return Lk.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return P4.create(this)}promise(){return PF.create(this,this._def)}or(e){return m$.create([this,e],this._def)}and(e){return g$.create(this,e,this._def)}transform(e){return new HT({...po(this._def),schema:this,typeName:Ei.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new C$({...po(this._def),innerType:this,defaultValue:r,typeName:Ei.ZodDefault})}brand(){return new E_e({typeName:Ei.ZodBranded,type:this,...po(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new v$({...po(this._def),innerType:this,catchValue:r,typeName:Ei.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return __e.create(this,e)}readonly(){return b$.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$Ao=/^c[^\s-]{8,}$/i,VAo=/^[0-9a-z]+$/,WAo=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zAo=/^[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,YAo=/^[a-z0-9_-]{21}$/i,KAo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,JAo=/^[-+]?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)?)??$/,XAo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ZAo="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",M4t,eyo=/^(?:(?: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])$/,tyo=/^(?:(?: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])$/,ryo=/^(([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]))$/,nyo=/^(([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])$/,iyo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oyo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,rnn="((\\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])))",syo=new RegExp(`^${rnn}$`);function nnn(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}a(nnn,"timeRegexSource");function ayo(t){return new RegExp(`^${nnn(t)}$`)}a(ayo,"timeRegex");function inn(t){let e=`${rnn}T${nnn(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}a(inn,"datetimeRegex");function cyo(t,e){return!!((e==="v4"||!e)&&eyo.test(t)||(e==="v6"||!e)&&ryo.test(t))}a(cyo,"isValidIP");function lyo(t,e){if(!KAo.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}a(lyo,"isValidJWT");function uyo(t,e){return!!((e==="v4"||!e)&&tyo.test(t)||(e==="v6"||!e)&&nyo.test(t))}a(uyo,"isValidCidr");var wF=class t extends xo{static{a(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Xr.string){let s=this._getOrReturnCtx(e);return Ur(s,{code:zt.invalid_type,expected:Xr.string,received:s.parsedType}),ci}let n=new Tm,o;for(let s of this._def.checks)if(s.kind==="min")e.data.lengths.value&&(o=this._getOrReturnCtx(e,o),Ur(o,{code:zt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,l=e.data.lengthe.test(o),{validation:r,code:zt.invalid_string,...Tn.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Tn.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Tn.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Tn.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Tn.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Tn.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Tn.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Tn.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Tn.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Tn.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Tn.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Tn.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Tn.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Tn.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Tn.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Tn.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Tn.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Tn.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Tn.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Tn.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Tn.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Tn.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Tn.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Tn.errToObj(r)})}nonempty(e){return this.min(1,Tn.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew wF({checks:[],typeName:Ei.ZodString,coerce:t?.coerce??!1,...po(t)});function dyo(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}a(dyo,"floatSafeRemainder");var l$=class t extends xo{static{a(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Xr.number){let s=this._getOrReturnCtx(e);return Ur(s,{code:zt.invalid_type,expected:Xr.number,received:s.parsedType}),ci}let n,o=new Tm;for(let s of this._def.checks)s.kind==="int"?ss.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?dyo(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.not_finite,message:s.message}),o.dirty()):ss.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Tn.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Tn.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Tn.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Tn.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Tn.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Tn.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Tn.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Tn.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Tn.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Tn.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Tn.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuee.kind==="int"||e.kind==="multipleOf"&&ss.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.valuenew l$({checks:[],typeName:Ei.ZodNumber,coerce:t?.coerce||!1,...po(t)});var u$=class t extends xo{static{a(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Xr.bigint)return this._getInvalidInput(e);let n,o=new Tm;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ur(n,{code:zt.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):ss.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return Ur(r,{code:zt.invalid_type,expected:Xr.bigint,received:r.parsedType}),ci}gte(e,r){return this.setLimit("min",e,!0,Tn.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Tn.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Tn.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Tn.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Tn.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Tn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Tn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Tn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Tn.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Tn.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew u$({checks:[],typeName:Ei.ZodBigInt,coerce:t?.coerce??!1,...po(t)});var d$=class extends xo{static{a(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Xr.boolean){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.boolean,received:n.parsedType}),ci}return Wg(e.data)}};d$.create=t=>new d$({typeName:Ei.ZodBoolean,coerce:t?.coerce||!1,...po(t)});var f$=class t extends xo{static{a(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Xr.date){let s=this._getOrReturnCtx(e);return Ur(s,{code:zt.invalid_type,expected:Xr.date,received:s.parsedType}),ci}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Ur(s,{code:zt.invalid_date}),ci}let n=new Tm,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()s.value&&(o=this._getOrReturnCtx(e,o),Ur(o,{code:zt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ss.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Tn.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Tn.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.valuenew f$({checks:[],coerce:t?.coerce||!1,typeName:Ei.ZodDate,...po(t)});var Eie=class extends xo{static{a(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==Xr.symbol){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.symbol,received:n.parsedType}),ci}return Wg(e.data)}};Eie.create=t=>new Eie({typeName:Ei.ZodSymbol,...po(t)});var p$=class extends xo{static{a(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==Xr.undefined){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.undefined,received:n.parsedType}),ci}return Wg(e.data)}};p$.create=t=>new p$({typeName:Ei.ZodUndefined,...po(t)});var h$=class extends xo{static{a(this,"ZodNull")}_parse(e){if(this._getType(e)!==Xr.null){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.null,received:n.parsedType}),ci}return Wg(e.data)}};h$.create=t=>new h$({typeName:Ei.ZodNull,...po(t)});var RF=class extends xo{static{a(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return Wg(e.data)}};RF.create=t=>new RF({typeName:Ei.ZodAny,...po(t)});var R4=class extends xo{static{a(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return Wg(e.data)}};R4.create=t=>new R4({typeName:Ei.ZodUnknown,...po(t)});var iw=class extends xo{static{a(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return Ur(r,{code:zt.invalid_type,expected:Xr.never,received:r.parsedType}),ci}};iw.create=t=>new iw({typeName:Ei.ZodNever,...po(t)});var _ie=class extends xo{static{a(this,"ZodVoid")}_parse(e){if(this._getType(e)!==Xr.undefined){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.void,received:n.parsedType}),ci}return Wg(e.data)}};_ie.create=t=>new _ie({typeName:Ei.ZodVoid,...po(t)});var P4=class t extends xo{static{a(this,"ZodArray")}_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Xr.array)return Ur(r,{code:zt.invalid_type,expected:Xr.array,received:r.parsedType}),ci;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,l=r.data.lengtho.maxLength.value&&(Ur(r,{code:zt.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,l)=>o.type._parseAsync(new GT(r,c,r.path,l)))).then(c=>Tm.mergeArray(n,c));let s=[...r.data].map((c,l)=>o.type._parseSync(new GT(r,c,r.path,l)));return Tm.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Tn.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Tn.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Tn.toString(r)}})}nonempty(e){return this.min(1,e)}};P4.create=(t,e)=>new P4({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ei.ZodArray,...po(e)});function yie(t){if(t instanceof l_){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=qT.create(yie(n))}return new l_({...t._def,shape:a(()=>e,"shape")})}else return t instanceof P4?new P4({...t._def,type:yie(t.element)}):t instanceof qT?qT.create(yie(t.unwrap())):t instanceof Lk?Lk.create(yie(t.unwrap())):t instanceof Bk?Bk.create(t.items.map(e=>yie(e))):t}a(yie,"deepPartialify");var l_=class t extends xo{static{a(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ss.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Xr.object){let d=this._getOrReturnCtx(e);return Ur(d,{code:zt.invalid_type,expected:Xr.object,received:d.parsedType}),ci}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),l=[];if(!(this._def.catchall instanceof iw&&this._def.unknownKeys==="strip"))for(let d in o.data)c.includes(d)||l.push(d);let u=[];for(let d of c){let p=s[d],h=o.data[d];u.push({key:{status:"valid",value:d},value:p._parse(new GT(o,h,o.path,d)),alwaysSet:d in o.data})}if(this._def.catchall instanceof iw){let d=this._def.unknownKeys;if(d==="passthrough")for(let p of l)u.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(d==="strict")l.length>0&&(Ur(o,{code:zt.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let p of l){let h=o.data[p];u.push({key:{status:"valid",value:p},value:d._parse(new GT(o,h,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let d=[];for(let p of u){let h=await p.key,m=await p.value;d.push({key:h,value:m,alwaysSet:p.alwaysSet})}return d}).then(d=>Tm.mergeObjectSync(n,d)):Tm.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return Tn.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:a((r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Tn.errToObj(e).message??o}:{message:o}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:a(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:a(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:Ei.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of ss.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:a(()=>r,"shape")})}omit(e){let r={};for(let n of ss.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:a(()=>r,"shape")})}deepPartial(){return yie(this)}partial(e){let r={};for(let n of ss.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:a(()=>r,"shape")})}required(e){let r={};for(let n of ss.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof qT;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:a(()=>r,"shape")})}keyof(){return onn(ss.objectKeys(this.shape))}};l_.create=(t,e)=>new l_({shape:a(()=>t,"shape"),unknownKeys:"strip",catchall:iw.create(),typeName:Ei.ZodObject,...po(e)});l_.strictCreate=(t,e)=>new l_({shape:a(()=>t,"shape"),unknownKeys:"strict",catchall:iw.create(),typeName:Ei.ZodObject,...po(e)});l_.lazycreate=(t,e)=>new l_({shape:t,unknownKeys:"strip",catchall:iw.create(),typeName:Ei.ZodObject,...po(e)});var m$=class extends xo{static{a(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let l of s)if(l.result.status==="valid")return l.result;for(let l of s)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;let c=s.map(l=>new c_(l.ctx.common.issues));return Ur(r,{code:zt.invalid_union,unionErrors:c}),ci}if(a(o,"handleResults"),r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let u of n){let d={...r,common:{...r.common,issues:[]},parent:null},p=u._parseSync({data:r.data,path:r.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:d}),d.common.issues.length&&c.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let l=c.map(u=>new c_(u));return Ur(r,{code:zt.invalid_union,unionErrors:l}),ci}}get options(){return this._def.options}};m$.create=(t,e)=>new m$({options:t,typeName:Ei.ZodUnion,...po(e)});var w4=a(t=>t instanceof A$?w4(t.schema):t instanceof HT?w4(t.innerType()):t instanceof y$?[t.value]:t instanceof E$?t.options:t instanceof _$?ss.objectValues(t.enum):t instanceof C$?w4(t._def.innerType):t instanceof p$?[void 0]:t instanceof h$?[null]:t instanceof qT?[void 0,...w4(t.unwrap())]:t instanceof Lk?[null,...w4(t.unwrap())]:t instanceof E_e||t instanceof b$?w4(t.unwrap()):t instanceof v$?w4(t._def.innerType):[],"getDiscriminator"),pHe=class t extends xo{static{a(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.object)return Ur(r,{code:zt.invalid_type,expected:Xr.object,received:r.parsedType}),ci;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ur(r,{code:zt.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ci)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=w4(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let l of c){if(o.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);o.set(l,s)}}return new t({typeName:Ei.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...po(n)})}};function O4t(t,e){let r=Ok(t),n=Ok(e);if(t===e)return{valid:!0,data:t};if(r===Xr.object&&n===Xr.object){let o=ss.objectKeys(e),s=ss.objectKeys(t).filter(l=>o.indexOf(l)!==-1),c={...t,...e};for(let l of s){let u=O4t(t[l],e[l]);if(!u.valid)return{valid:!1};c[l]=u.data}return{valid:!0,data:c}}else if(r===Xr.array&&n===Xr.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s{if(dHe(s)||dHe(c))return ci;let l=O4t(s.value,c.value);return l.valid?((fHe(s)||fHe(c))&&r.dirty(),{status:r.value,value:l.data}):(Ur(n,{code:zt.invalid_intersection_types}),ci)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};g$.create=(t,e,r)=>new g$({left:t,right:e,typeName:Ei.ZodIntersection,...po(r)});var Bk=class t extends xo{static{a(this,"ZodTuple")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.array)return Ur(n,{code:zt.invalid_type,expected:Xr.array,received:n.parsedType}),ci;if(n.data.lengththis._def.items.length&&(Ur(n,{code:zt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,l)=>{let u=this._def.items[l]||this._def.rest;return u?u._parse(new GT(n,c,n.path,l)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>Tm.mergeArray(r,c)):Tm.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Bk.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bk({items:t,typeName:Ei.ZodTuple,rest:null,...po(e)})};var hHe=class t extends xo{static{a(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.object)return Ur(n,{code:zt.invalid_type,expected:Xr.object,received:n.parsedType}),ci;let o=[],s=this._def.keyType,c=this._def.valueType;for(let l in n.data)o.push({key:s._parse(new GT(n,l,n.path,l)),value:c._parse(new GT(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?Tm.mergeObjectAsync(r,o):Tm.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof xo?new t({keyType:e,valueType:r,typeName:Ei.ZodRecord,...po(n)}):new t({keyType:wF.create(),valueType:e,typeName:Ei.ZodRecord,...po(r)})}},Cie=class extends xo{static{a(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.map)return Ur(n,{code:zt.invalid_type,expected:Xr.map,received:n.parsedType}),ci;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([l,u],d)=>({key:o._parse(new GT(n,l,n.path,[d,"key"])),value:s._parse(new GT(n,u,n.path,[d,"value"]))}));if(n.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let u of c){let d=await u.key,p=await u.value;if(d.status==="aborted"||p.status==="aborted")return ci;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),l.set(d.value,p.value)}return{status:r.value,value:l}})}else{let l=new Map;for(let u of c){let d=u.key,p=u.value;if(d.status==="aborted"||p.status==="aborted")return ci;(d.status==="dirty"||p.status==="dirty")&&r.dirty(),l.set(d.value,p.value)}return{status:r.value,value:l}}}};Cie.create=(t,e,r)=>new Cie({valueType:e,keyType:t,typeName:Ei.ZodMap,...po(r)});var vie=class t extends xo{static{a(this,"ZodSet")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xr.set)return Ur(n,{code:zt.invalid_type,expected:Xr.set,received:n.parsedType}),ci;let o=this._def;o.minSize!==null&&n.data.sizeo.maxSize.value&&(Ur(n,{code:zt.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(u){let d=new Set;for(let p of u){if(p.status==="aborted")return ci;p.status==="dirty"&&r.dirty(),d.add(p.value)}return{status:r.value,value:d}}a(c,"finalizeSet");let l=[...n.data.values()].map((u,d)=>s._parse(new GT(n,u,n.path,d)));return n.common.async?Promise.all(l).then(u=>c(u)):c(l)}min(e,r){return new t({...this._def,minSize:{value:e,message:Tn.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Tn.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};vie.create=(t,e)=>new vie({valueType:t,minSize:null,maxSize:null,typeName:Ei.ZodSet,...po(e)});var mHe=class t extends xo{static{a(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.function)return Ur(r,{code:zt.invalid_type,expected:Xr.function,received:r.parsedType}),ci;function n(l,u){return y_e({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,gie(),x4].filter(d=>!!d),issueData:{code:zt.invalid_arguments,argumentsError:u}})}a(n,"makeArgsIssue");function o(l,u){return y_e({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,gie(),x4].filter(d=>!!d),issueData:{code:zt.invalid_return_type,returnTypeError:u}})}a(o,"makeReturnsIssue");let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof PF){let l=this;return Wg(async function(...u){let d=new c_([]),p=await l._def.args.parseAsync(u,s).catch(g=>{throw d.addIssue(n(u,g)),d}),h=await Reflect.apply(c,this,p);return await l._def.returns._def.type.parseAsync(h,s).catch(g=>{throw d.addIssue(o(h,g)),d})})}else{let l=this;return Wg(function(...u){let d=l._def.args.safeParse(u,s);if(!d.success)throw new c_([n(u,d.error)]);let p=Reflect.apply(c,this,d.data),h=l._def.returns.safeParse(p,s);if(!h.success)throw new c_([o(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Bk.create(e).rest(R4.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Bk.create([]).rest(R4.create()),returns:r||R4.create(),typeName:Ei.ZodFunction,...po(n)})}},A$=class extends xo{static{a(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};A$.create=(t,e)=>new A$({getter:t,typeName:Ei.ZodLazy,...po(e)});var y$=class extends xo{static{a(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ur(r,{received:r.data,code:zt.invalid_literal,expected:this._def.value}),ci}return{status:"valid",value:e.data}}get value(){return this._def.value}};y$.create=(t,e)=>new y$({value:t,typeName:Ei.ZodLiteral,...po(e)});function onn(t,e){return new E$({values:t,typeName:Ei.ZodEnum,...po(e)})}a(onn,"createZodEnum");var E$=class t extends xo{static{a(this,"ZodEnum")}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ur(r,{expected:ss.joinValues(n),received:r.parsedType,code:zt.invalid_type}),ci}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Ur(r,{received:r.data,code:zt.invalid_enum_value,options:n}),ci}return Wg(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};E$.create=onn;var _$=class extends xo{static{a(this,"ZodNativeEnum")}_parse(e){let r=ss.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Xr.string&&n.parsedType!==Xr.number){let o=ss.objectValues(r);return Ur(n,{expected:ss.joinValues(o),received:n.parsedType,code:zt.invalid_type}),ci}if(this._cache||(this._cache=new Set(ss.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=ss.objectValues(r);return Ur(n,{received:n.data,code:zt.invalid_enum_value,options:o}),ci}return Wg(e.data)}get enum(){return this._def.values}};_$.create=(t,e)=>new _$({values:t,typeName:Ei.ZodNativeEnum,...po(e)});var PF=class extends xo{static{a(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xr.promise&&r.common.async===!1)return Ur(r,{code:zt.invalid_type,expected:Xr.promise,received:r.parsedType}),ci;let n=r.parsedType===Xr.promise?r.data:Promise.resolve(r.data);return Wg(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};PF.create=(t,e)=>new PF({type:t,typeName:Ei.ZodPromise,...po(e)});var HT=class extends xo{static{a(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ei.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:a(c=>{Ur(n,c),c.fatal?r.abort():r.dirty()},"addIssue"),get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async l=>{if(r.value==="aborted")return ci;let u=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return u.status==="aborted"?ci:u.status==="dirty"?c$(u.value):r.value==="dirty"?c$(u.value):u});{if(r.value==="aborted")return ci;let l=this._def.schema._parseSync({data:c,path:n.path,parent:n});return l.status==="aborted"?ci:l.status==="dirty"?c$(l.value):r.value==="dirty"?c$(l.value):l}}if(o.type==="refinement"){let c=a(l=>{let u=o.refinement(l,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l},"executeRefinement");if(n.common.async===!1){let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?ci:(l.status==="dirty"&&r.dirty(),c(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?ci:(l.status==="dirty"&&r.dirty(),c(l.value).then(()=>({status:r.value,value:l.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xF(c))return ci;let l=o.transform(c.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>xF(c)?Promise.resolve(o.transform(c.value,s)).then(l=>({status:r.value,value:l})):ci);ss.assertNever(o)}};HT.create=(t,e,r)=>new HT({schema:t,typeName:Ei.ZodEffects,effect:e,...po(r)});HT.createWithPreprocess=(t,e,r)=>new HT({schema:e,effect:{type:"preprocess",transform:t},typeName:Ei.ZodEffects,...po(r)});var qT=class extends xo{static{a(this,"ZodOptional")}_parse(e){return this._getType(e)===Xr.undefined?Wg(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};qT.create=(t,e)=>new qT({innerType:t,typeName:Ei.ZodOptional,...po(e)});var Lk=class extends xo{static{a(this,"ZodNullable")}_parse(e){return this._getType(e)===Xr.null?Wg(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Lk.create=(t,e)=>new Lk({innerType:t,typeName:Ei.ZodNullable,...po(e)});var C$=class extends xo{static{a(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Xr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};C$.create=(t,e)=>new C$({innerType:t,typeName:Ei.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...po(e)});var v$=class extends xo{static{a(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Aie(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new c_(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new c_(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};v$.create=(t,e)=>new v$({innerType:t,typeName:Ei.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...po(e)});var bie=class extends xo{static{a(this,"ZodNaN")}_parse(e){if(this._getType(e)!==Xr.nan){let n=this._getOrReturnCtx(e);return Ur(n,{code:zt.invalid_type,expected:Xr.nan,received:n.parsedType}),ci}return{status:"valid",value:e.data}}};bie.create=t=>new bie({typeName:Ei.ZodNaN,...po(t)});var fyo=Symbol("zod_brand"),E_e=class extends xo{static{a(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},__e=class t extends xo{static{a(this,"ZodPipeline")}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return a(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ci:s.status==="dirty"?(r.dirty(),c$(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})},"handleAsync")();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ci:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Ei.ZodPipeline})}},b$=class extends xo{static{a(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),n=a(o=>(xF(o)&&(o.value=Object.freeze(o.value)),o),"freeze");return Aie(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};b$.create=(t,e)=>new b$({innerType:t,typeName:Ei.ZodReadonly,...po(e)});function tnn(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}a(tnn,"cleanParams");function snn(t,e={},r){return t?RF.create().superRefine((n,o)=>{let s=t(n);if(s instanceof Promise)return s.then(c=>{if(!c){let l=tnn(e,n),u=l.fatal??r??!0;o.addIssue({code:"custom",...l,fatal:u})}});if(!s){let c=tnn(e,n),l=c.fatal??r??!0;o.addIssue({code:"custom",...c,fatal:l})}}):RF.create()}a(snn,"custom");var pyo={object:l_.lazycreate},Ei;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ei||(Ei={}));var hyo=a((t,e={message:`Input not instance of ${t.name}`})=>snn(r=>r instanceof t,e),"instanceOfType"),ann=wF.create,cnn=l$.create,myo=bie.create,gyo=u$.create,lnn=d$.create,Ayo=f$.create,yyo=Eie.create,Eyo=p$.create,_yo=h$.create,Cyo=RF.create,vyo=R4.create,byo=iw.create,Tyo=_ie.create,Syo=P4.create,Iyo=l_.create,xyo=l_.strictCreate,wyo=m$.create,Ryo=pHe.create,Pyo=g$.create,kyo=Bk.create,Dyo=hHe.create,Nyo=Cie.create,Myo=vie.create,Oyo=mHe.create,Byo=A$.create,Lyo=y$.create,Fyo=E$.create,Uyo=_$.create,Qyo=PF.create,qyo=HT.create,Gyo=qT.create,Hyo=Lk.create,jyo=HT.createWithPreprocess,$yo=__e.create,Vyo=a(()=>ann().optional(),"ostring"),Wyo=a(()=>cnn().optional(),"onumber"),zyo=a(()=>lnn().optional(),"oboolean"),Yyo={string:a((t=>wF.create({...t,coerce:!0})),"string"),number:a((t=>l$.create({...t,coerce:!0})),"number"),boolean:a((t=>d$.create({...t,coerce:!0})),"boolean"),bigint:a((t=>u$.create({...t,coerce:!0})),"bigint"),date:a((t=>f$.create({...t,coerce:!0})),"date")};var Kyo=ci;f();var Qc={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_close:"session/close",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},gp={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"},gHe=1;f();f();var B={};ui(B,{$brand:()=>B4t,$input:()=>D3t,$output:()=>k3t,NEVER:()=>b_e,TimePrecision:()=>O3t,ZodAny:()=>qnn,ZodArray:()=>$nn,ZodBase64:()=>$Lt,ZodBase64URL:()=>VLt,ZodBigInt:()=>lCe,ZodBigIntFormat:()=>YLt,ZodBoolean:()=>cCe,ZodCIDRv4:()=>HLt,ZodCIDRv6:()=>jLt,ZodCUID:()=>BLt,ZodCUID2:()=>LLt,ZodCatch:()=>sin,ZodCustom:()=>uje,ZodCustomStringFormat:()=>Lnn,ZodDate:()=>aje,ZodDefault:()=>ein,ZodDiscriminatedUnion:()=>Vnn,ZodE164:()=>WLt,ZodEmail:()=>kLt,ZodEmoji:()=>MLt,ZodEnum:()=>oCe,ZodError:()=>B_o,ZodFile:()=>Xnn,ZodGUID:()=>nje,ZodIPv4:()=>qLt,ZodIPv6:()=>GLt,ZodISODate:()=>eje,ZodISODateTime:()=>ZHe,ZodISODuration:()=>rje,ZodISOTime:()=>tje,ZodIntersection:()=>Wnn,ZodIssueCode:()=>o8t,ZodJWT:()=>zLt,ZodKSUID:()=>QLt,ZodLazy:()=>fin,ZodLiteral:()=>Jnn,ZodMap:()=>Ynn,ZodNaN:()=>cin,ZodNanoID:()=>OLt,ZodNever:()=>Hnn,ZodNonOptional:()=>r8t,ZodNull:()=>Qnn,ZodNullable:()=>Znn,ZodNumber:()=>aCe,ZodNumberFormat:()=>Lie,ZodObject:()=>cje,ZodOptional:()=>t8t,ZodPipe:()=>n8t,ZodPrefault:()=>rin,ZodPromise:()=>hin,ZodReadonly:()=>lin,ZodRealError:()=>Bie,ZodRecord:()=>XLt,ZodSet:()=>Knn,ZodString:()=>sCe,ZodStringFormat:()=>al,ZodSuccess:()=>oin,ZodSymbol:()=>Fnn,ZodTemplateLiteral:()=>din,ZodTransform:()=>ZLt,ZodTuple:()=>znn,ZodType:()=>Ho,ZodULID:()=>FLt,ZodURL:()=>DLt,ZodUUID:()=>B4,ZodUndefined:()=>Unn,ZodUnion:()=>JLt,ZodUnknown:()=>Gnn,ZodVoid:()=>jnn,ZodXID:()=>ULt,_ZodString:()=>PLt,_default:()=>tin,any:()=>KLt,array:()=>br,base64:()=>tCo,base64url:()=>rCo,bigint:()=>uCo,boolean:()=>Za,catch:()=>ain,check:()=>min,cidrv4:()=>Z_o,cidrv6:()=>eCo,clone:()=>ev,coerce:()=>fCe,config:()=>E0,core:()=>O4,cuid:()=>V_o,cuid2:()=>W_o,custom:()=>i8t,date:()=>gCo,discriminatedUnion:()=>lje,e164:()=>nCo,email:()=>F_o,emoji:()=>j_o,endsWith:()=>J_e,enum:()=>dy,file:()=>TCo,flattenError:()=>D_e,float32:()=>sCo,float64:()=>aCo,formatError:()=>N_e,function:()=>ELt,getErrorMap:()=>MCo,globalRegistry:()=>Uk,gt:()=>N4,gte:()=>d_,guid:()=>U_o,includes:()=>Y_e,instanceof:()=>PCo,int:()=>RLt,int32:()=>cCo,int64:()=>dCo,intersection:()=>dCe,ipv4:()=>J_o,ipv6:()=>X_o,iso:()=>Oie,json:()=>DCo,jwt:()=>iCo,keyof:()=>ACo,ksuid:()=>K_o,lazy:()=>pin,length:()=>Mie,literal:()=>vn,locales:()=>H_e,looseObject:()=>_0,lowercase:()=>W_e,lt:()=>D4,lte:()=>jT,map:()=>CCo,maxLength:()=>Nie,maxSize:()=>Die,mime:()=>X_e,minLength:()=>DF,minSize:()=>k$,multipleOf:()=>P$,nan:()=>xCo,nanoid:()=>$_o,nativeEnum:()=>bCo,negative:()=>lLt,never:()=>sje,nonnegative:()=>dLt,nonoptional:()=>iin,nonpositive:()=>uLt,normalize:()=>Z_e,null:()=>uCe,nullable:()=>ije,nullish:()=>SCo,number:()=>Js,object:()=>kr,optional:()=>Vl,overwrite:()=>M4,parse:()=>SLt,parseAsync:()=>ILt,partialRecord:()=>_Co,pipe:()=>oje,positive:()=>cLt,prefault:()=>nin,preprocess:()=>dje,prettifyError:()=>Y4t,promise:()=>RCo,property:()=>fLt,readonly:()=>uin,record:()=>cl,refine:()=>gin,regex:()=>V_e,regexes:()=>x$,registry:()=>PHe,safeParse:()=>xLt,safeParseAsync:()=>wLt,set:()=>vCo,setErrorMap:()=>NCo,size:()=>$_e,startsWith:()=>K_e,strictObject:()=>yCo,string:()=>Me,stringFormat:()=>oCo,stringbool:()=>kCo,success:()=>ICo,superRefine:()=>Ain,symbol:()=>pCo,templateLiteral:()=>wCo,toJSONSchema:()=>_Lt,toLowerCase:()=>tCe,toUpperCase:()=>rCe,transform:()=>e8t,treeifyError:()=>z4t,trim:()=>eCe,tuple:()=>ECo,uint32:()=>lCo,uint64:()=>fCo,ulid:()=>z_o,undefined:()=>hCo,union:()=>ec,unknown:()=>$l,uppercase:()=>z_e,url:()=>NLt,uuid:()=>Q_o,uuidv4:()=>q_o,uuidv6:()=>G_o,uuidv7:()=>H_o,void:()=>mCo,xid:()=>Y_o});f();var O4={};ui(O4,{$ZodAny:()=>CBt,$ZodArray:()=>U_e,$ZodAsyncError:()=>Fk,$ZodBase64:()=>dBt,$ZodBase64URL:()=>fBt,$ZodBigInt:()=>wHe,$ZodBigIntFormat:()=>ABt,$ZodBoolean:()=>F_e,$ZodCIDRv4:()=>cBt,$ZodCIDRv6:()=>lBt,$ZodCUID:()=>JOt,$ZodCUID2:()=>XOt,$ZodCatch:()=>QBt,$ZodCheck:()=>Xu,$ZodCheckBigIntFormat:()=>xOt,$ZodCheckEndsWith:()=>UOt,$ZodCheckGreaterThan:()=>THe,$ZodCheckIncludes:()=>LOt,$ZodCheckLengthEquals:()=>NOt,$ZodCheckLessThan:()=>bHe,$ZodCheckLowerCase:()=>OOt,$ZodCheckMaxLength:()=>kOt,$ZodCheckMaxSize:()=>wOt,$ZodCheckMimeType:()=>qOt,$ZodCheckMinLength:()=>DOt,$ZodCheckMinSize:()=>ROt,$ZodCheckMultipleOf:()=>SOt,$ZodCheckNumberFormat:()=>IOt,$ZodCheckOverwrite:()=>GOt,$ZodCheckProperty:()=>QOt,$ZodCheckRegex:()=>MOt,$ZodCheckSizeEquals:()=>POt,$ZodCheckStartsWith:()=>FOt,$ZodCheckStringFormat:()=>wie,$ZodCheckUpperCase:()=>BOt,$ZodCustom:()=>VBt,$ZodCustomStringFormat:()=>mBt,$ZodDate:()=>TBt,$ZodDefault:()=>BBt,$ZodDiscriminatedUnion:()=>IBt,$ZodE164:()=>pBt,$ZodEmail:()=>WOt,$ZodEmoji:()=>YOt,$ZodEnum:()=>kBt,$ZodError:()=>k_e,$ZodFile:()=>NBt,$ZodFunction:()=>XHe,$ZodGUID:()=>$Ot,$ZodIPv4:()=>sBt,$ZodIPv6:()=>aBt,$ZodISODate:()=>nBt,$ZodISODateTime:()=>rBt,$ZodISODuration:()=>oBt,$ZodISOTime:()=>iBt,$ZodIntersection:()=>xBt,$ZodJWT:()=>hBt,$ZodKSUID:()=>tBt,$ZodLazy:()=>$Bt,$ZodLiteral:()=>DBt,$ZodMap:()=>RBt,$ZodNaN:()=>qBt,$ZodNanoID:()=>KOt,$ZodNever:()=>vBt,$ZodNonOptional:()=>FBt,$ZodNull:()=>_Bt,$ZodNullable:()=>OBt,$ZodNumber:()=>xHe,$ZodNumberFormat:()=>gBt,$ZodObject:()=>SBt,$ZodOptional:()=>MBt,$ZodPipe:()=>q_e,$ZodPrefault:()=>LBt,$ZodPromise:()=>jBt,$ZodReadonly:()=>GBt,$ZodRealError:()=>Iie,$ZodRecord:()=>wBt,$ZodRegistry:()=>Pie,$ZodSet:()=>PBt,$ZodString:()=>w$,$ZodStringFormat:()=>qc,$ZodSuccess:()=>UBt,$ZodSymbol:()=>yBt,$ZodTemplateLiteral:()=>HBt,$ZodTransform:()=>Q_e,$ZodTuple:()=>R$,$ZodType:()=>Oi,$ZodULID:()=>ZOt,$ZodURL:()=>zOt,$ZodUUID:()=>VOt,$ZodUndefined:()=>EBt,$ZodUnion:()=>RHe,$ZodUnknown:()=>Rie,$ZodVoid:()=>bBt,$ZodXID:()=>eBt,$brand:()=>B4t,$constructor:()=>Xe,$input:()=>D3t,$output:()=>k3t,Doc:()=>L_e,JSONSchema:()=>Mnn,JSONSchemaGenerator:()=>iCe,NEVER:()=>b_e,TimePrecision:()=>O3t,_any:()=>rLt,_array:()=>nCe,_base64:()=>zHe,_base64url:()=>YHe,_bigint:()=>Y3t,_boolean:()=>W3t,_catch:()=>R_o,_cidrv4:()=>VHe,_cidrv6:()=>WHe,_coercedBigint:()=>K3t,_coercedBoolean:()=>z3t,_coercedDate:()=>sLt,_coercedNumber:()=>q3t,_coercedString:()=>M3t,_cuid:()=>UHe,_cuid2:()=>QHe,_custom:()=>mLt,_date:()=>oLt,_default:()=>I_o,_discriminatedUnion:()=>m_o,_e164:()=>KHe,_email:()=>kHe,_emoji:()=>LHe,_endsWith:()=>J_e,_enum:()=>__o,_file:()=>hLt,_float32:()=>H3t,_float64:()=>j3t,_gt:()=>N4,_gte:()=>d_,_guid:()=>j_e,_includes:()=>Y_e,_int:()=>G3t,_int32:()=>$3t,_int64:()=>J3t,_intersection:()=>g_o,_ipv4:()=>jHe,_ipv6:()=>$He,_isoDate:()=>L3t,_isoDateTime:()=>B3t,_isoDuration:()=>U3t,_isoTime:()=>F3t,_jwt:()=>JHe,_ksuid:()=>HHe,_lazy:()=>N_o,_length:()=>Mie,_literal:()=>v_o,_lowercase:()=>W_e,_lt:()=>D4,_lte:()=>jT,_map:()=>y_o,_max:()=>jT,_maxLength:()=>Nie,_maxSize:()=>Die,_mime:()=>X_e,_min:()=>d_,_minLength:()=>DF,_minSize:()=>k$,_multipleOf:()=>P$,_nan:()=>aLt,_nanoid:()=>FHe,_nativeEnum:()=>C_o,_negative:()=>lLt,_never:()=>nLt,_nonnegative:()=>dLt,_nonoptional:()=>x_o,_nonpositive:()=>uLt,_normalize:()=>Z_e,_null:()=>tLt,_nullable:()=>S_o,_number:()=>Q3t,_optional:()=>T_o,_overwrite:()=>M4,_parse:()=>yHe,_parseAsync:()=>EHe,_pipe:()=>P_o,_positive:()=>cLt,_promise:()=>M_o,_property:()=>fLt,_readonly:()=>k_o,_record:()=>A_o,_refine:()=>gLt,_regex:()=>V_e,_safeParse:()=>_He,_safeParseAsync:()=>CHe,_set:()=>E_o,_size:()=>$_e,_startsWith:()=>K_e,_string:()=>N3t,_stringFormat:()=>yLt,_stringbool:()=>ALt,_success:()=>w_o,_symbol:()=>Z3t,_templateLiteral:()=>D_o,_toLowerCase:()=>tCe,_toUpperCase:()=>rCe,_transform:()=>b_o,_trim:()=>eCe,_tuple:()=>pLt,_uint32:()=>V3t,_uint64:()=>X3t,_ulid:()=>qHe,_undefined:()=>eLt,_union:()=>h_o,_unknown:()=>kie,_uppercase:()=>z_e,_url:()=>BHe,_uuid:()=>DHe,_uuidv4:()=>NHe,_uuidv6:()=>MHe,_uuidv7:()=>OHe,_void:()=>iLt,_xid:()=>GHe,clone:()=>ev,config:()=>E0,flattenError:()=>D_e,formatError:()=>N_e,function:()=>ELt,globalConfig:()=>v_e,globalRegistry:()=>Uk,isValidBase64:()=>uBt,isValidBase64URL:()=>Rnn,isValidJWT:()=>Pnn,locales:()=>H_e,parse:()=>M_e,parseAsync:()=>O_e,prettifyError:()=>Y4t,regexes:()=>x$,registry:()=>PHe,safeParse:()=>xie,safeParseAsync:()=>B_e,toDotPath:()=>dnn,toJSONSchema:()=>_Lt,treeifyError:()=>z4t,util:()=>Sr,version:()=>HOt});f();f();var b_e=Object.freeze({status:"aborted"});function Xe(t,e,r){function n(l,u){var d;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(d=l._zod).traits??(d.traits=new Set),l._zod.traits.add(t),e(l,u);for(let p in c.prototype)p in l||Object.defineProperty(l,p,{value:c.prototype[p].bind(l)});l._zod.constr=c,l._zod.def=u}a(n,"init");let o=r?.Parent??Object;class s extends o{static{a(this,"Definition")}}Object.defineProperty(s,"name",{value:t});function c(l){var u;let d=r?.Parent?new s:this;n(d,l),(u=d._zod).deferred??(u.deferred=[]);for(let p of d._zod.deferred)p();return d}return a(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:a(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(t),"value")}),Object.defineProperty(c,"name",{value:t}),c}a(Xe,"$constructor");var B4t=Symbol("zod_brand"),Fk=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},v_e={};function E0(t){return t&&Object.assign(v_e,t),v_e}a(E0,"config");f();f();var Sr={};ui(Sr,{BIGINT_FORMAT_RANGES:()=>V4t,Class:()=>F4t,NUMBER_FORMAT_RANGES:()=>$4t,aborted:()=>S$,allowsEval:()=>G4t,assert:()=>rEo,assertEqual:()=>Xyo,assertIs:()=>eEo,assertNever:()=>tEo,assertNotEqual:()=>Zyo,assignProp:()=>q4t,cached:()=>I_e,captureStackTrace:()=>AHe,cleanEnum:()=>mEo,cleanRegex:()=>x_e,clone:()=>ev,createTransparentProxy:()=>cEo,defineLazy:()=>Pa,esc:()=>T$,escapeRegex:()=>k4,extend:()=>dEo,finalizeIssue:()=>tv,floatSafeRemainder:()=>Q4t,getElementAtPath:()=>nEo,getEnumValues:()=>S_e,getLengthableOrigin:()=>P_e,getParsedType:()=>aEo,getSizableOrigin:()=>R_e,isObject:()=>Tie,isPlainObject:()=>Sie,issue:()=>W4t,joinValues:()=>xt,jsonStringifyReplacer:()=>U4t,merge:()=>fEo,normalizeParams:()=>ur,nullish:()=>kF,numKeys:()=>sEo,omit:()=>uEo,optionalKeys:()=>j4t,partial:()=>pEo,pick:()=>lEo,prefixIssues:()=>u_,primitiveTypes:()=>H4t,promiseAllObject:()=>iEo,propertyKeyTypes:()=>w_e,randomString:()=>oEo,required:()=>hEo,stringifyPrimitive:()=>Tr,unwrapMessage:()=>T_e});f();function Xyo(t){return t}a(Xyo,"assertEqual");function Zyo(t){return t}a(Zyo,"assertNotEqual");function eEo(t){}a(eEo,"assertIs");function tEo(t){throw new Error}a(tEo,"assertNever");function rEo(t){}a(rEo,"assert");function S_e(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}a(S_e,"getEnumValues");function xt(t,e="|"){return t.map(r=>Tr(r)).join(e)}a(xt,"joinValues");function U4t(t,e){return typeof e=="bigint"?e.toString():e}a(U4t,"jsonStringifyReplacer");function I_e(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a(I_e,"cached");function kF(t){return t==null}a(kF,"nullish");function x_e(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}a(x_e,"cleanRegex");function Q4t(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}a(Q4t,"floatSafeRemainder");function Pa(t,e,r){Object.defineProperty(t,e,{get(){{let o=r();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}a(Pa,"defineLazy");function q4t(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}a(q4t,"assignProp");function nEo(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}a(nEo,"getElementAtPath");function iEo(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let o={};for(let s=0;s{};function Tie(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}a(Tie,"isObject");var G4t=I_e(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Sie(t){if(Tie(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(Tie(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(Sie,"isPlainObject");function sEo(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}a(sEo,"numKeys");var aEo=a(t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},"getParsedType"),w_e=new Set(["string","number","symbol"]),H4t=new Set(["string","number","bigint","boolean","symbol","undefined"]);function k4(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(k4,"escapeRegex");function ev(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}a(ev,"clone");function ur(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:a(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:a(()=>e.error,"error")}:e}a(ur,"normalizeParams");function cEo(t){let e;return new Proxy({},{get(r,n,o){return e??(e=t()),Reflect.get(e,n,o)},set(r,n,o,s){return e??(e=t()),Reflect.set(e,n,o,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,o){return e??(e=t()),Reflect.defineProperty(e,n,o)}})}a(cEo,"createTransparentProxy");function Tr(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}a(Tr,"stringifyPrimitive");function j4t(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}a(j4t,"optionalKeys");var $4t={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},V4t={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function lEo(t,e){let r={},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(r[o]=n.shape[o])}return ev(t,{...t._zod.def,shape:r,checks:[]})}a(lEo,"pick");function uEo(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let o in e){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete r[o]}return ev(t,{...t._zod.def,shape:r,checks:[]})}a(uEo,"omit");function dEo(t,e){if(!Sie(e))throw new Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return q4t(this,"shape",n),n},checks:[]};return ev(t,r)}a(dEo,"extend");function fEo(t,e){return ev(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return q4t(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}a(fEo,"merge");function pEo(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=t?new t({type:"optional",innerType:n[s]}):n[s])}else for(let s in n)o[s]=t?new t({type:"optional",innerType:n[s]}):n[s];return ev(e,{...e._zod.def,shape:o,checks:[]})}a(pEo,"partial");function hEo(t,e,r){let n=e._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new t({type:"nonoptional",innerType:n[s]});return ev(e,{...e._zod.def,shape:o,checks:[]})}a(hEo,"required");function S$(t,e=0){for(let r=e;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}a(u_,"prefixIssues");function T_e(t){return typeof t=="string"?t:t?.message}a(T_e,"unwrapMessage");function tv(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let o=T_e(t.inst?._zod.def?.error?.(t))??T_e(e?.error?.(t))??T_e(r.customError?.(t))??T_e(r.localeError?.(t))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}a(tv,"finalizeIssue");function R_e(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}a(R_e,"getSizableOrigin");function P_e(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}a(P_e,"getLengthableOrigin");function W4t(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}a(W4t,"issue");function mEo(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}a(mEo,"cleanEnum");var F4t=class{static{a(this,"Class")}constructor(...e){}};var unn=a((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,U4t,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:a(()=>t.message,"value"),enumerable:!1})},"initializer"),k_e=Xe("$ZodError",unn),Iie=Xe("$ZodError",unn,{Parent:Error});function D_e(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}a(D_e,"flattenError");function N_e(t,e){let r=e||function(s){return s.message},n={_errors:[]},o=a(s=>{for(let c of s.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l}));else if(c.code==="invalid_key")o({issues:c.issues});else if(c.code==="invalid_element")o({issues:c.issues});else if(c.path.length===0)n._errors.push(r(c));else{let l=n,u=0;for(;u{var l,u;for(let d of s.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>o({issues:p},d.path));else if(d.code==="invalid_key")o({issues:d.issues},d.path);else if(d.code==="invalid_element")o({issues:d.issues},d.path);else{let p=[...c,...d.path];if(p.length===0){n.errors.push(r(d));continue}let h=n,m=0;for(;mn.path.length-o.path.length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${dnn(n.path)}`);return e.join(` +`)}a(Y4t,"prettifyError");var yHe=a(t=>(e,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new Fk;if(c.issues.length){let l=new(o?.Err??t)(c.issues.map(u=>tv(u,s,E0())));throw AHe(l,o?.callee),l}return c.value},"_parse"),M_e=yHe(Iie),EHe=a(t=>async(e,r,n,o)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(o?.Err??t)(c.issues.map(u=>tv(u,s,E0())));throw AHe(l,o?.callee),l}return c.value},"_parseAsync"),O_e=EHe(Iie),_He=a(t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Fk;return s.issues.length?{success:!1,error:new(t??k_e)(s.issues.map(c=>tv(c,o,E0())))}:{success:!0,data:s.value}},"_safeParse"),xie=_He(Iie),CHe=a(t=>async(e,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(c=>tv(c,o,E0())))}:{success:!0,data:s.value}},"_safeParseAsync"),B_e=CHe(Iie);f();f();var x$={};ui(x$,{_emoji:()=>fnn,base64:()=>uOt,base64url:()=>vHe,bigint:()=>AOt,boolean:()=>_Ot,browserEmail:()=>TEo,cidrv4:()=>cOt,cidrv6:()=>lOt,cuid:()=>K4t,cuid2:()=>J4t,date:()=>pOt,datetime:()=>mOt,domain:()=>SEo,duration:()=>rOt,e164:()=>fOt,email:()=>iOt,emoji:()=>oOt,extendedDuration:()=>AEo,guid:()=>nOt,hostname:()=>dOt,html5Email:()=>CEo,integer:()=>yOt,ipv4:()=>sOt,ipv6:()=>aOt,ksuid:()=>eOt,lowercase:()=>bOt,nanoid:()=>tOt,null:()=>COt,number:()=>EOt,rfc5322Email:()=>vEo,string:()=>gOt,time:()=>hOt,ulid:()=>X4t,undefined:()=>vOt,unicodeEmail:()=>bEo,uppercase:()=>TOt,uuid:()=>I$,uuid4:()=>yEo,uuid6:()=>EEo,uuid7:()=>_Eo,xid:()=>Z4t});f();var K4t=/^[cC][^\s-]{8,}$/,J4t=/^[0-9a-z]+$/,X4t=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Z4t=/^[0-9a-vA-V]{20}$/,eOt=/^[A-Za-z0-9]{27}$/,tOt=/^[a-zA-Z0-9_-]{21}$/,rOt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,AEo=/^[-+]?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)?)??$/,nOt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,I$=a(t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,"uuid"),yEo=I$(4),EEo=I$(6),_Eo=I$(7),iOt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CEo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vEo=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,bEo=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,TEo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fnn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function oOt(){return new RegExp(fnn,"u")}a(oOt,"emoji");var sOt=/^(?:(?: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])$/,aOt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,cOt=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,lOt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uOt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vHe=/^[A-Za-z0-9_-]*$/,dOt=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,SEo=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,fOt=/^\+(?:[0-9]){6,14}[0-9]$/,pnn="(?:(?:\\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])))",pOt=new RegExp(`^${pnn}$`);function hnn(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(hnn,"timeSource");function hOt(t){return new RegExp(`^${hnn(t)}$`)}a(hOt,"time");function mOt(t){let e=hnn({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${pnn}T(?:${n})$`)}a(mOt,"datetime");var gOt=a(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),AOt=/^\d+n?$/,yOt=/^\d+$/,EOt=/^-?\d+(?:\.\d+)?/i,_Ot=/true|false/i,COt=/null/i;var vOt=/undefined/i;var bOt=/^[^A-Z]*$/,TOt=/^[^a-z]*$/;var Xu=Xe("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),gnn={number:"number",bigint:"bigint",object:"date"},bHe=Xe("$ZodCheckLessThan",(t,e)=>{Xu.init(t,e);let r=gnn[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value{(e.inclusive?n.value<=e.value:n.value{Xu.init(t,e);let r=gnn[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),SOt=Xe("$ZodCheckMultipleOf",(t,e)=>{Xu.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Q4t(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),IOt=Xe("$ZodCheckNumberFormat",(t,e)=>{Xu.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[o,s]=$4t[e.format];t._zod.onattach.push(c=>{let l=c._zod.bag;l.format=e.format,l.minimum=o,l.maximum=s,r&&(l.pattern=yOt)}),t._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:e.format,code:"invalid_type",input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}ls&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inst:t})}}),xOt=Xe("$ZodCheckBigIntFormat",(t,e)=>{Xu.init(t,e);let[r,n]=V4t[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=r,s.maximum=n}),t._zod.check=o=>{let s=o.value;sn&&o.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inst:t})}}),wOt=Xe("$ZodCheckMaxSize",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let o=n.value;o.size<=e.maximum||n.issues.push({origin:R_e(o),code:"too_big",maximum:e.maximum,input:o,inst:t,continue:!e.abort})}}),ROt=Xe("$ZodCheckMinSize",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;o.size>=e.minimum||n.issues.push({origin:R_e(o),code:"too_small",minimum:e.minimum,input:o,inst:t,continue:!e.abort})}}),POt=Xe("$ZodCheckSizeEquals",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.size!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.size,o.maximum=e.size,o.size=e.size}),t._zod.check=n=>{let o=n.value,s=o.size;if(s===e.size)return;let c=s>e.size;n.issues.push({origin:R_e(o),...c?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),kOt=Xe("$ZodCheckMaxLength",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let o=n.value;if(o.length<=e.maximum)return;let c=P_e(o);n.issues.push({origin:c,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),DOt=Xe("$ZodCheckMinLength",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let c=P_e(o);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),NOt=Xe("$ZodCheckLengthEquals",(t,e)=>{var r;Xu.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!kF(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=n=>{let o=n.value,s=o.length;if(s===e.length)return;let c=P_e(o),l=s>e.length;n.issues.push({origin:c,...l?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),wie=Xe("$ZodCheckStringFormat",(t,e)=>{var r,n;Xu.init(t,e),t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),MOt=Xe("$ZodCheckRegex",(t,e)=>{wie.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),OOt=Xe("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=bOt),wie.init(t,e)}),BOt=Xe("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=TOt),wie.init(t,e)}),LOt=Xe("$ZodCheckIncludes",(t,e)=>{Xu.init(t,e);let r=k4(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(o=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),FOt=Xe("$ZodCheckStartsWith",(t,e)=>{Xu.init(t,e);let r=new RegExp(`^${k4(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),UOt=Xe("$ZodCheckEndsWith",(t,e)=>{Xu.init(t,e);let r=new RegExp(`.*${k4(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function mnn(t,e,r){t.issues.length&&e.issues.push(...u_(r,t.issues))}a(mnn,"handleCheckPropertyResult");var QOt=Xe("$ZodCheckProperty",(t,e)=>{Xu.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>mnn(o,r,e.property));mnn(n,r,e.property)}}),qOt=Xe("$ZodCheckMimeType",(t,e)=>{Xu.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t})}}),GOt=Xe("$ZodCheckOverwrite",(t,e)=>{Xu.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});f();var L_e=class{static{a(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(` `).filter(c=>c),o=Math.min(...n.map(c=>c.length-c.trimStart().length)),s=n.map(c=>c.slice(o)).map(c=>" ".repeat(this.indent*2)+c);for(let c of s)this.content.push(c)}compile(){let e=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...r,o.join(` -`))}};f();var b4t={major:4,minor:0,patch:0};var Li=Xe("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=b4t;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let s of o._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=a((s,c,l)=>{let u=yV(s),d;for(let p of c){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&l?.async===!1)throw new Kk;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==h&&(u||(u=yV(s,h)))});else{if(s.issues.length===h)continue;u||(u=yV(s,h))}}return d?d.then(()=>s):s},"runChecks");t._zod.run=(s,c)=>{let l=t._zod.parse(s,c);if(l instanceof Promise){if(c.async===!1)throw new Kk;return l.then(u=>o(u,n,c))}return o(l,n,c)}}t["~standard"]={validate:a(o=>{try{let s=poe(t,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return U_e(t,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}}),_V=Xe("$ZodString",(t,e)=>{Li.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??KOt(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),zc=Xe("$ZodStringFormat",(t,e)=>{hoe.init(t,e),_V.init(t,e)}),S4t=Xe("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=LOt),zc.init(t,e)}),I4t=Xe("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=EV(n))}else e.pattern??(e.pattern=EV());zc.init(t,e)}),x4t=Xe("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=FOt),zc.init(t,e)}),w4t=Xe("$ZodURL",(t,e)=>{zc.init(t,e),t._zod.check=r=>{try{let n=r.value,o=new URL(n),s=o.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:$Ot.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&s.endsWith("/")?r.value=s.slice(0,-1):r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),R4t=Xe("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=UOt()),zc.init(t,e)}),P4t=Xe("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=OOt),zc.init(t,e)}),k4t=Xe("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=POt),zc.init(t,e)}),N4t=Xe("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=kOt),zc.init(t,e)}),D4t=Xe("$ZodULID",(t,e)=>{e.pattern??(e.pattern=NOt),zc.init(t,e)}),M4t=Xe("$ZodXID",(t,e)=>{e.pattern??(e.pattern=DOt),zc.init(t,e)}),O4t=Xe("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=MOt),zc.init(t,e)}),B4t=Xe("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=YOt(e)),zc.init(t,e)}),L4t=Xe("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=WOt),zc.init(t,e)}),F4t=Xe("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=zOt(e)),zc.init(t,e)}),U4t=Xe("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=BOt),zc.init(t,e)}),Q4t=Xe("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=QOt),zc.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),q4t=Xe("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=qOt),zc.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),G4t=Xe("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=GOt),zc.init(t,e)}),H4t=Xe("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=HOt),zc.init(t,e),t._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function j4t(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}a(j4t,"isValidBase64");var $4t=Xe("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=jOt),zc.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{j4t(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Prn(t){if(!hje.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return j4t(r)}a(Prn,"isValidBase64URL");var V4t=Xe("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=hje),zc.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Prn(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),W4t=Xe("$ZodE164",(t,e)=>{e.pattern??(e.pattern=VOt),zc.init(t,e)});function krn(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}a(krn,"isValidJWT");var z4t=Xe("$ZodJWT",(t,e)=>{zc.init(t,e),t._zod.check=r=>{krn(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Y4t=Xe("$ZodCustomStringFormat",(t,e)=>{zc.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Eje=Xe("$ZodNumber",(t,e)=>{Li.init(t,e),t._zod.pattern=t._zod.bag.pattern??ZOt,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...s?{received:s}:{}}),r}}),K4t=Xe("$ZodNumber",(t,e)=>{s4t.init(t,e),Eje.init(t,e)}),q_e=Xe("$ZodBoolean",(t,e)=>{Li.init(t,e),t._zod.pattern=e4t,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),r}}),Cje=Xe("$ZodBigInt",(t,e)=>{Li.init(t,e),t._zod.pattern=JOt,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),J4t=Xe("$ZodBigInt",(t,e)=>{a4t.init(t,e),Cje.init(t,e)}),X4t=Xe("$ZodSymbol",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:t}),r}}),Z4t=Xe("$ZodUndefined",(t,e)=>{Li.init(t,e),t._zod.pattern=r4t,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:t}),r}}),eBt=Xe("$ZodNull",(t,e)=>{Li.init(t,e),t._zod.pattern=t4t,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),r}}),tBt=Xe("$ZodAny",(t,e)=>{Li.init(t,e),t._zod.parse=r=>r}),moe=Xe("$ZodUnknown",(t,e)=>{Li.init(t,e),t._zod.parse=r=>r}),rBt=Xe("$ZodNever",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),nBt=Xe("$ZodVoid",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:t}),r}}),iBt=Xe("$ZodDate",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:t}),r}});function Ern(t,e,r){t.issues.length&&e.issues.push(...vC(r,t.issues)),e.value[r]=t.value}a(Ern,"handleArrayResult");var G_e=Xe("$ZodArray",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.value=Array(o.length);let s=[];for(let c=0;cErn(d,r,c))):Ern(u,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Aje(t,e,r){t.issues.length&&e.issues.push(...vC(r,t.issues)),e.value[r]=t.value}a(Aje,"handleObjectResult");function Crn(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...vC(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}a(Crn,"handleOptionalObjectResult");var oBt=Xe("$ZodObject",(t,e)=>{Li.init(t,e);let r=R_e(()=>{let h=Object.keys(e.shape);for(let g of h)if(!(e.shape[g]instanceof Li))throw new Error(`Invalid element at key "${g}": expected a Zod schema`);let m=TOt(e.shape);return{shape:e.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(m)}});Oa(t._zod,"propValues",()=>{let h=e.shape,m={};for(let g in h){let A=h[g]._zod;if(A.values){m[g]??(m[g]=new Set);for(let y of A.values)m[g].add(y)}}return m});let n=a(h=>{let m=new Q_e(["shape","payload","ctx"]),g=r.value,A=a(v=>{let b=AV(v);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`},"parseStr");m.write("const input = payload.value;");let y=Object.create(null),E=0;for(let v of g.keys)y[v]=`key_${E++}`;m.write("const newResult = {}");for(let v of g.keys)if(g.optionalKeys.has(v)){let b=y[v];m.write(`const ${b} = ${A(v)};`);let I=AV(v);m.write(` +`))}};f();var HOt={major:4,minor:0,patch:0};var Oi=Xe("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=HOt;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let s of o._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=a((s,c,l)=>{let u=S$(s),d;for(let p of c){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&l?.async===!1)throw new Fk;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==h&&(u||(u=S$(s,h)))});else{if(s.issues.length===h)continue;u||(u=S$(s,h))}}return d?d.then(()=>s):s},"runChecks");t._zod.run=(s,c)=>{let l=t._zod.parse(s,c);if(l instanceof Promise){if(c.async===!1)throw new Fk;return l.then(u=>o(u,n,c))}return o(l,n,c)}}t["~standard"]={validate:a(o=>{try{let s=xie(t,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return B_e(t,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}}),w$=Xe("$ZodString",(t,e)=>{Oi.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??gOt(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),qc=Xe("$ZodStringFormat",(t,e)=>{wie.init(t,e),w$.init(t,e)}),$Ot=Xe("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=nOt),qc.init(t,e)}),VOt=Xe("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=I$(n))}else e.pattern??(e.pattern=I$());qc.init(t,e)}),WOt=Xe("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=iOt),qc.init(t,e)}),zOt=Xe("$ZodURL",(t,e)=>{qc.init(t,e),t._zod.check=r=>{try{let n=r.value,o=new URL(n),s=o.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:dOt.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&s.endsWith("/")?r.value=s.slice(0,-1):r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),YOt=Xe("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=oOt()),qc.init(t,e)}),KOt=Xe("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=tOt),qc.init(t,e)}),JOt=Xe("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=K4t),qc.init(t,e)}),XOt=Xe("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=J4t),qc.init(t,e)}),ZOt=Xe("$ZodULID",(t,e)=>{e.pattern??(e.pattern=X4t),qc.init(t,e)}),eBt=Xe("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Z4t),qc.init(t,e)}),tBt=Xe("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=eOt),qc.init(t,e)}),rBt=Xe("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=mOt(e)),qc.init(t,e)}),nBt=Xe("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=pOt),qc.init(t,e)}),iBt=Xe("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=hOt(e)),qc.init(t,e)}),oBt=Xe("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=rOt),qc.init(t,e)}),sBt=Xe("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=sOt),qc.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),aBt=Xe("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=aOt),qc.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),cBt=Xe("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=cOt),qc.init(t,e)}),lBt=Xe("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=lOt),qc.init(t,e),t._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function uBt(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}a(uBt,"isValidBase64");var dBt=Xe("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=uOt),qc.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{uBt(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Rnn(t){if(!vHe.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return uBt(r)}a(Rnn,"isValidBase64URL");var fBt=Xe("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=vHe),qc.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Rnn(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),pBt=Xe("$ZodE164",(t,e)=>{e.pattern??(e.pattern=fOt),qc.init(t,e)});function Pnn(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}a(Pnn,"isValidJWT");var hBt=Xe("$ZodJWT",(t,e)=>{qc.init(t,e),t._zod.check=r=>{Pnn(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),mBt=Xe("$ZodCustomStringFormat",(t,e)=>{qc.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),xHe=Xe("$ZodNumber",(t,e)=>{Oi.init(t,e),t._zod.pattern=t._zod.bag.pattern??EOt,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...s?{received:s}:{}}),r}}),gBt=Xe("$ZodNumber",(t,e)=>{IOt.init(t,e),xHe.init(t,e)}),F_e=Xe("$ZodBoolean",(t,e)=>{Oi.init(t,e),t._zod.pattern=_Ot,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),r}}),wHe=Xe("$ZodBigInt",(t,e)=>{Oi.init(t,e),t._zod.pattern=AOt,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),ABt=Xe("$ZodBigInt",(t,e)=>{xOt.init(t,e),wHe.init(t,e)}),yBt=Xe("$ZodSymbol",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:t}),r}}),EBt=Xe("$ZodUndefined",(t,e)=>{Oi.init(t,e),t._zod.pattern=vOt,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:t}),r}}),_Bt=Xe("$ZodNull",(t,e)=>{Oi.init(t,e),t._zod.pattern=COt,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),r}}),CBt=Xe("$ZodAny",(t,e)=>{Oi.init(t,e),t._zod.parse=r=>r}),Rie=Xe("$ZodUnknown",(t,e)=>{Oi.init(t,e),t._zod.parse=r=>r}),vBt=Xe("$ZodNever",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),bBt=Xe("$ZodVoid",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:t}),r}}),TBt=Xe("$ZodDate",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:t}),r}});function ynn(t,e,r){t.issues.length&&e.issues.push(...u_(r,t.issues)),e.value[r]=t.value}a(ynn,"handleArrayResult");var U_e=Xe("$ZodArray",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.value=Array(o.length);let s=[];for(let c=0;cynn(d,r,c))):ynn(u,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function SHe(t,e,r){t.issues.length&&e.issues.push(...u_(r,t.issues)),e.value[r]=t.value}a(SHe,"handleObjectResult");function Enn(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...u_(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}a(Enn,"handleOptionalObjectResult");var SBt=Xe("$ZodObject",(t,e)=>{Oi.init(t,e);let r=I_e(()=>{let h=Object.keys(e.shape);for(let g of h)if(!(e.shape[g]instanceof Oi))throw new Error(`Invalid element at key "${g}": expected a Zod schema`);let m=j4t(e.shape);return{shape:e.shape,keys:h,keySet:new Set(h),numKeys:h.length,optionalKeys:new Set(m)}});Pa(t._zod,"propValues",()=>{let h=e.shape,m={};for(let g in h){let A=h[g]._zod;if(A.values){m[g]??(m[g]=new Set);for(let y of A.values)m[g].add(y)}}return m});let n=a(h=>{let m=new L_e(["shape","payload","ctx"]),g=r.value,A=a(v=>{let b=T$(v);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`},"parseStr");m.write("const input = payload.value;");let y=Object.create(null),E=0;for(let v of g.keys)y[v]=`key_${E++}`;m.write("const newResult = {}");for(let v of g.keys)if(g.optionalKeys.has(v)){let b=y[v];m.write(`const ${b} = ${A(v)};`);let I=T$(v);m.write(` if (${b}.issues.length) { if (input[${I}] === undefined) { if (${I} in input) { @@ -3287,106 +3276,106 @@ ${e.map(n=>{let o=n.cves.map(p=>{let h=`[${p.id}](${p.html_url}): ${KMt(p.summar `)}else{let b=y[v];m.write(`const ${b} = ${A(v)};`),m.write(` if (${b}.issues.length) payload.issues = payload.issues.concat(${b}.issues.map(iss => ({ ...iss, - path: iss.path ? [${AV(v)}, ...iss.path] : [${AV(v)}] - })));`),m.write(`newResult[${AV(v)}] = ${b}.value`)}m.write("payload.value = newResult;"),m.write("return payload;");let _=m.compile();return(v,b)=>_(h,v,b)},"generateFastpass"),o,s=uoe,c=!S_e.jitless,u=c&&vOt.value,d=e.catchall,p;t._zod.parse=(h,m)=>{p??(p=r.value);let g=h.value;if(!s(g))return h.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),h;let A=[];if(c&&u&&m?.async===!1&&m.jitless!==!0)o||(o=n(e.shape)),h=o(h,m);else{h.value={};let b=p.shape;for(let I of p.keys){let x=b[I],R=x._zod.run({value:g[I],issues:[]},m),w=x._zod.optin==="optional"&&x._zod.optout==="optional";R instanceof Promise?A.push(R.then(P=>w?Crn(P,h,I,g):Aje(P,h,I))):w?Crn(R,h,I,g):Aje(R,h,I)}}if(!d)return A.length?Promise.all(A).then(()=>h):h;let y=[],E=p.keySet,_=d._zod,v=_.def.type;for(let b of Object.keys(g)){if(E.has(b))continue;if(v==="never"){y.push(b);continue}let I=_.run({value:g[b],issues:[]},m);I instanceof Promise?A.push(I.then(x=>Aje(x,h,b))):Aje(I,h,b)}return y.length&&h.issues.push({code:"unrecognized_keys",keys:y,input:g,inst:t}),A.length?Promise.all(A).then(()=>h):h}});function _rn(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>hv(s,n,T0())))}),e}a(_rn,"handleUnionResults");var _je=Xe("$ZodUnion",(t,e)=>{Li.init(t,e),Oa(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Oa(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Oa(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),Oa(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>P_e(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let o=!1,s=[];for(let c of e.options){let l=c._zod.run({value:r.value,issues:[]},n);if(l instanceof Promise)s.push(l),o=!0;else{if(l.issues.length===0)return l;s.push(l)}}return o?Promise.all(s).then(c=>_rn(c,r,t,n)):_rn(s,r,t,n)}}),sBt=Xe("$ZodDiscriminatedUnion",(t,e)=>{_je.init(t,e);let r=t._zod.parse;Oa(t._zod,"propValues",()=>{let o={};for(let s of e.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[l,u]of Object.entries(c)){o[l]||(o[l]=new Set);for(let d of u)o[l].add(d)}}return o});let n=R_e(()=>{let o=e.options,s=new Map;for(let c of o){let l=c._zod.propValues[e.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let u of l){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,c)}}return s});t._zod.parse=(o,s)=>{let c=o.value;if(!uoe(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),o;let l=n.value.get(c?.[e.discriminator]);return l?l._zod.run(o,s):e.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:c,path:[e.discriminator],inst:t}),o)}}),aBt=Xe("$ZodIntersection",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value,s=e.left._zod.run({value:o,issues:[]},n),c=e.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||c instanceof Promise?Promise.all([s,c]).then(([u,d])=>vrn(r,u,d)):vrn(r,s,c)}});function T4t(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(doe(t)&&doe(e)){let r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};for(let s of n){let c=T4t(t[s],e[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s,...c.mergeErrorPath]};o[s]=c.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n{Li.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(o=>o._zod.optin!=="optional");t._zod.parse=(o,s)=>{let c=o.value;if(!Array.isArray(c))return o.issues.push({input:c,inst:t,expected:"tuple",code:"invalid_type"}),o;o.value=[];let l=[];if(!e.rest){let d=c.length>r.length,p=c.length=c.length&&u>=n)continue;let p=d._zod.run({value:c[u],issues:[]},s);p instanceof Promise?l.push(p.then(h=>yje(h,o,u))):yje(p,o,u)}if(e.rest){let d=c.slice(r.length);for(let p of d){u++;let h=e.rest._zod.run({value:p,issues:[]},s);h instanceof Promise?l.push(h.then(m=>yje(m,o,u))):yje(h,o,u)}}return l.length?Promise.all(l).then(()=>o):o}});function yje(t,e,r){t.issues.length&&e.issues.push(...vC(r,t.issues)),e.value[r]=t.value}a(yje,"handleTupleResult");var cBt=Xe("$ZodRecord",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!doe(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let s=[];if(e.keyType._zod.values){let c=e.keyType._zod.values;r.value={};for(let u of c)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){let d=e.valueType._zod.run({value:o[u],issues:[]},n);d instanceof Promise?s.push(d.then(p=>{p.issues.length&&r.issues.push(...vC(u,p.issues)),r.value[u]=p.value})):(d.issues.length&&r.issues.push(...vC(u,d.issues)),r.value[u]=d.value)}let l;for(let u in o)c.has(u)||(l=l??[],l.push(u));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:l})}else{r.value={};for(let c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let l=e.keyType._zod.run({value:c,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:l.issues.map(d=>hv(d,n,T0())),input:c,path:[c],inst:t}),r.value[l.value]=l.value;continue}let u=e.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?s.push(u.then(d=>{d.issues.length&&r.issues.push(...vC(c,d.issues)),r.value[l.value]=d.value})):(u.issues.length&&r.issues.push(...vC(c,u.issues)),r.value[l.value]=u.value)}}return s.length?Promise.all(s).then(()=>r):r}}),lBt=Xe("$ZodMap",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:t}),r;let s=[];r.value=new Map;for(let[c,l]of o){let u=e.keyType._zod.run({value:c,issues:[]},n),d=e.valueType._zod.run({value:l,issues:[]},n);u instanceof Promise||d instanceof Promise?s.push(Promise.all([u,d]).then(([p,h])=>{brn(p,h,r,c,o,t,n)})):brn(u,d,r,c,o,t,n)}return s.length?Promise.all(s).then(()=>r):r}});function brn(t,e,r,n,o,s,c){t.issues.length&&(k_e.has(typeof n)?r.issues.push(...vC(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:o,inst:s,issues:t.issues.map(l=>hv(l,c,T0()))})),e.issues.length&&(k_e.has(typeof n)?r.issues.push(...vC(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:s,key:n,issues:e.issues.map(l=>hv(l,c,T0()))})),r.value.set(t.value,e.value)}a(brn,"handleMapResult");var uBt=Xe("$ZodSet",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:t,expected:"set",code:"invalid_type"}),r;let s=[];r.value=new Set;for(let c of o){let l=e.valueType._zod.run({value:c,issues:[]},n);l instanceof Promise?s.push(l.then(u=>Trn(u,r))):Trn(l,r)}return s.length?Promise.all(s).then(()=>r):r}});function Trn(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}a(Trn,"handleSetResult");var dBt=Xe("$ZodEnum",(t,e)=>{Li.init(t,e);let r=w_e(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>k_e.has(typeof n)).map(n=>typeof n=="string"?YO(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return t._zod.values.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),fBt=Xe("$ZodLiteral",(t,e)=>{Li.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?YO(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let o=r.value;return t._zod.values.has(o)||r.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),r}}),pBt=Xe("$ZodFile",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:t}),r}}),H_e=Xe("$ZodTransform",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=e.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(r.value=c,r));if(o instanceof Promise)throw new Kk;return r.value=o,r}}),hBt=Xe("$ZodOptional",(t,e)=>{Li.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Oa(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Oa(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${P_e(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),mBt=Xe("$ZodNullable",(t,e)=>{Li.init(t,e),Oa(t._zod,"optin",()=>e.innerType._zod.optin),Oa(t._zod,"optout",()=>e.innerType._zod.optout),Oa(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${P_e(r.source)}|null)$`):void 0}),Oa(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),gBt=Xe("$ZodDefault",(t,e)=>{Li.init(t,e),t._zod.optin="optional",Oa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Srn(s,e)):Srn(o,e)}});function Srn(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}a(Srn,"handleDefaultResult");var ABt=Xe("$ZodPrefault",(t,e)=>{Li.init(t,e),t._zod.optin="optional",Oa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),yBt=Xe("$ZodNonOptional",(t,e)=>{Li.init(t,e),Oa(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Irn(s,t)):Irn(o,t)}});function Irn(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}a(Irn,"handleNonOptionalResult");var EBt=Xe("$ZodSuccess",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.issues.length===0,r)):(r.value=o.issues.length===0,r)}}),CBt=Xe("$ZodCatch",(t,e)=>{Li.init(t,e),t._zod.optin="optional",Oa(t._zod,"optout",()=>e.innerType._zod.optout),Oa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(c=>hv(c,n,T0()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>hv(s,n,T0()))},input:r.value}),r.issues=[]),r)}}),_Bt=Xe("$ZodNaN",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),j_e=Xe("$ZodPipe",(t,e)=>{Li.init(t,e),Oa(t._zod,"values",()=>e.in._zod.values),Oa(t._zod,"optin",()=>e.in._zod.optin),Oa(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>xrn(s,e,n)):xrn(o,e,n)}});function xrn(t,e,r){return yV(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}a(xrn,"handlePipeResult");var vBt=Xe("$ZodReadonly",(t,e)=>{Li.init(t,e),Oa(t._zod,"propValues",()=>e.innerType._zod.propValues),Oa(t._zod,"values",()=>e.innerType._zod.values),Oa(t._zod,"optin",()=>e.innerType._zod.optin),Oa(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(wrn):wrn(o)}});function wrn(t){return t.value=Object.freeze(t.value),t}a(wrn,"handleReadonlyResult");var bBt=Xe("$ZodTemplateLiteral",(t,e)=>{Li.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Li){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let s=o.startsWith("^")?1:0,c=o.endsWith("$")?o.length-1:o.length;r.push(o.slice(s,c))}else if(n===null||bOt.has(typeof n))r.push(YO(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"template_literal",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),n)}),TBt=Xe("$ZodPromise",(t,e)=>{Li.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>e.innerType._zod.run({value:o,issues:[]},n))}),SBt=Xe("$ZodLazy",(t,e)=>{Li.init(t,e),Oa(t._zod,"innerType",()=>e.getter()),Oa(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),Oa(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),Oa(t._zod,"optin",()=>t._zod.innerType._zod.optin),Oa(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),IBt=Xe("$ZodCustom",(t,e)=>{sd.init(t,e),Li.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,o=e.fn(n);if(o instanceof Promise)return o.then(s=>Rrn(s,r,n,t));Rrn(o,r,n,t)}});function Rrn(t,e,r,n){if(!t){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(xOt(o))}}a(Rrn,"handleRefineResult");var V_e={};Ri(V_e,{ar:()=>xBt,az:()=>wBt,be:()=>RBt,ca:()=>PBt,cs:()=>kBt,de:()=>NBt,en:()=>$_e,eo:()=>DBt,es:()=>MBt,fa:()=>OBt,fi:()=>BBt,fr:()=>LBt,frCA:()=>FBt,he:()=>UBt,hu:()=>QBt,id:()=>qBt,it:()=>GBt,ja:()=>HBt,kh:()=>jBt,ko:()=>$Bt,mk:()=>VBt,ms:()=>WBt,nl:()=>zBt,no:()=>YBt,ota:()=>KBt,pl:()=>XBt,ps:()=>JBt,pt:()=>ZBt,ru:()=>e3t,sl:()=>t3t,sv:()=>r3t,ta:()=>n3t,th:()=>i3t,tr:()=>o3t,ua:()=>s3t,ur:()=>a3t,vi:()=>c3t,zhCN:()=>l3t,zhTW:()=>u3t});f();f();var SAo=a(()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return o=>{switch(o.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Tr(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${o.minimum.toString()} ${c.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:s.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${s.suffix}"`:s.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${s.includes}"`:s.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${s.pattern}`:`${n[s.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${Pt(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function xBt(){return{localeError:SAo()}}a(xBt,"default");f();var IAo=a(()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o.expected}, daxil olan ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Tr(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${s}${o.maximum.toString()} ${c.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${s}${o.minimum.toString()} ${c.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${s.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:s.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${s.suffix}" il\u0259 bitm\u0259lidir`:s.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${s.includes}" daxil olmal\u0131d\u0131r`:s.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${s.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[s.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function wBt(){return{localeError:IAo()}}a(wBt,"default");f();function Drn(t,e,r,n){let o=Math.abs(t),s=o%10,c=o%100;return c>=11&&c<=19?n:s===1?e:s>=2&&s<=4?r:n}a(Drn,"getBelarusianPlural");var xAo=a(()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0456\u045E";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Tr(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);if(c){let l=Number(o.maximum),u=Drn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${o.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);if(c){let l=Number(o.minimum),u=Drn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${o.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function RBt(){return{localeError:xAo()}}a(RBt,"default");f();var wAo=a(()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${o.expected}, s'ha rebut ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Tr(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${Pt(o.values," o ")}`;case"too_big":{let s=o.inclusive?"com a m\xE0xim":"menys de",c=e(o.origin);return c?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${s} ${o.maximum.toString()} ${c.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"com a m\xEDnim":"m\xE9s de",c=e(o.origin);return c?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${s} ${o.minimum.toString()} ${c.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${s.prefix}"`:s.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format inv\xE0lid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${s.pattern}`:`Format inv\xE0lid per a ${n[s.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function PBt(){return{localeError:wAo()}}a(PBt,"default");f();var RAo=a(()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(o))return"pole";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return o=>{switch(o.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o.expected}, obdr\u017Eeno ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Tr(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${s}${o.maximum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${s}${o.minimum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${s.prefix}"`:s.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${s.suffix}"`:s.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${s.includes}"`:s.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${s.pattern}`:`Neplatn\xFD form\xE1t ${n[s.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${Pt(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function kBt(){return{localeError:RAo()}}a(kBt,"default");f();var PAo=a(()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"Zahl";case"object":{if(Array.isArray(o))return"Array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return o=>{switch(o.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${o.expected}, erhalten ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Tr(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${s}${o.maximum.toString()} ${c.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${s}${o.maximum.toString()} ist`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Zu klein: erwartet, dass ${o.origin} ${s}${o.minimum.toString()} ${c.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${s}${o.minimum.toString()} ist`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ung\xFCltiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ung\xFCltiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ung\xFCltiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${s.pattern} entsprechen`:`Ung\xFCltig: ${n[s.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function NBt(){return{localeError:PAo()}}a(NBt,"default");f();var kAo=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),NAo=a(()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${kAo(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Tr(n.values[0])}`:`Invalid option: expected one of ${Pt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Pt(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}},"error");function $_e(){return{localeError:NAo()}}a($_e,"default");f();var DAo=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),MAo=a(()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${DAo(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Tr(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Pt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${Pt(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}},"error");function DBt(){return{localeError:MAo()}}a(DBt,"default");f();var OAo=a(()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(o))return"arreglo";if(o===null)return"nulo";if(Object.getPrototypeOf(o)!==Object.prototype)return o.constructor.name}}return s},"parsedType"),n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${o.expected}, recibido ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Tr(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Demasiado grande: se esperaba que ${o.origin??"valor"} tuviera ${s}${o.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o.origin??"valor"} fuera ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Demasiado peque\xF1o: se esperaba que ${o.origin} tuviera ${s}${o.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${o.origin} fuera ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${n[s.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function MBt(){return{localeError:OAo()}}a(MBt,"default");f();var BAo=a(()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(o))return"\u0622\u0631\u0627\u06CC\u0647";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return o=>{switch(o.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(o.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Tr(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Pt(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} ${c.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:s.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:s.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${s.includes}" \u0628\u0627\u0634\u062F`:s.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${s.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[s.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function OBt(){return{localeError:BAo()}}a(OBt,"default");f();var LAo=a(()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return o=>{switch(o.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${o.expected}, oli ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Tr(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Liian suuri: ${c.subject} t\xE4ytyy olla ${s}${o.maximum.toString()} ${c.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Liian pieni: ${c.subject} t\xE4ytyy olla ${s}${o.minimum.toString()} ${c.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${n[s.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Pt(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function BBt(){return{localeError:LAo()}}a(BBt,"default");f();var FAo=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"nombre";case"object":{if(Array.isArray(o))return"tableau";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return o=>{switch(o.code){case"invalid_type":return`Entr\xE9e invalide : ${o.expected} attendu, ${r(o.input)} re\xE7u`;case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Tr(o.values[0])} attendu`:`Option invalide : une valeur parmi ${Pt(o.values,"|")} attendue`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Trop grand : ${o.origin??"valeur"} doit ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o.origin??"valeur"} doit \xEAtre ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Trop petit : ${o.origin} doit ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Trop petit : ${o.origin} doit \xEAtre ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${s.pattern}`:`${n[s.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${Pt(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}},"error");function LBt(){return{localeError:FAo()}}a(LBt,"default");f();var UAo=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return o=>{switch(o.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${o.expected}, re\xE7u ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Tr(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"\u2264":"<",c=e(o.origin);return c?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${s}${o.maximum.toString()} ${c.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"\u2265":">",c=e(o.origin);return c?`Trop petit : attendu que ${o.origin} ait ${s}${o.minimum.toString()} ${c.unit}`:`Trop petit : attendu que ${o.origin} soit ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${s.pattern}`:`${n[s.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${Pt(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}},"error");function FBt(){return{localeError:UAo()}}a(FBt,"default");f();var QAo=a(()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return o=>{switch(o.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${o.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${Tr(o.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${o.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.maximum.toString()} ${c.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${o.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${o.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.minimum.toString()} ${c.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${o.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${s.prefix}"`:s.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${s.suffix}"`:s.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${s.includes}"`:s.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${s.pattern}`:`${n[s.format]??o.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${o.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${o.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${o.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function UBt(){return{localeError:QAo()}}a(UBt,"default");f();var qAo=a(()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(o))return"t\xF6mb";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return o=>{switch(o.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o.expected}, a kapott \xE9rt\xE9k ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Tr(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${s}${o.maximum.toString()} ${c.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${s}${o.minimum.toString()} ${c.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\xC9rv\xE9nytelen string: "${s.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:s.format==="ends_with"?`\xC9rv\xE9nytelen string: "${s.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:s.format==="includes"?`\xC9rv\xE9nytelen string: "${s.includes}" \xE9rt\xE9ket kell tartalmaznia`:s.format==="regex"?`\xC9rv\xE9nytelen string: ${s.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[s.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function QBt(){return{localeError:qAo()}}a(QBt,"default");f();var GAo=a(()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input tidak valid: diharapkan ${o.expected}, diterima ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Tr(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${s}${o.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Terlalu kecil: diharapkan ${o.origin} memiliki ${s}${o.minimum.toString()} ${c.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${n[s.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}},"error");function qBt(){return{localeError:GAo()}}a(qBt,"default");f();var HAo=a(()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"numero";case"object":{if(Array.isArray(o))return"vettore";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input non valido: atteso ${o.expected}, ricevuto ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Tr(o.values[0])}`:`Opzione non valida: atteso uno tra ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Troppo grande: ${o.origin??"valore"} deve avere ${s}${o.maximum.toString()} ${c.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Troppo piccolo: ${o.origin} deve avere ${s}${o.minimum.toString()} ${c.unit}`:`Troppo piccolo: ${o.origin} deve essere ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${n[s.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}},"error");function GBt(){return{localeError:HAo()}}a(GBt,"default");f();var jAo=a(()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(o))return"\u914D\u5217";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return o=>{switch(o.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(o.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Tr(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Pt(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let s=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",c=e(o.origin);return c?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${c.unit??"\u8981\u7D20"}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let s=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",c=e(o.origin);return c?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${c.unit}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${s.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[s.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${Pt(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function HBt(){return{localeError:jAo()}}a(HBt,"default");f();var $Ao=a(()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(o))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(o===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return o=>{switch(o.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Tr(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${o.maximum.toString()} ${c.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${s} ${o.minimum.toString()} ${c.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${s.prefix}"`:s.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${s.suffix}"`:s.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${s.includes}"`:s.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${s.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Pt(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function jBt(){return{localeError:$Ao()}}a(jBt,"default");f();var VAo=a(()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return o=>{switch(o.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(o.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Tr(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Pt(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let s=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",c=s==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=e(o.origin),u=l?.unit??"\uC694\uC18C";return l?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${u} ${s}${c}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${s}${c}`}case"too_small":{let s=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",c=s==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=e(o.origin),u=l?.unit??"\uC694\uC18C";return l?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${u} ${s}${c}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${s}${c}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:s.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${s.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[s.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Pt(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function $Bt(){return{localeError:VAo()}}a($Bt,"default");f();var WAo=a(()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(o))return"\u043D\u0438\u0437\u0430";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return o=>{switch(o.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${Tr(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${s}${o.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${s}${o.minimum.toString()} ${c.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${s.pattern}`:`Invalid ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function VBt(){return{localeError:WAo()}}a(VBt,"default");f();var zAo=a(()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"nombor";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input tidak sah: dijangka ${o.expected}, diterima ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Tr(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Terlalu besar: dijangka ${o.origin??"nilai"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Terlalu kecil: dijangka ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${n[s.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Pt(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}},"error");function WBt(){return{localeError:zAo()}}a(WBt,"default");f();var YAo=a(()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"getal";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return o=>{switch(o.code){case"invalid_type":return`Ongeldige invoer: verwacht ${o.expected}, ontving ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Tr(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Te lang: verwacht dat ${o.origin??"waarde"} ${s}${o.maximum.toString()} ${c.unit??"elementen"} bevat`:`Te lang: verwacht dat ${o.origin??"waarde"} ${s}${o.maximum.toString()} is`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Te kort: verwacht dat ${o.origin} ${s}${o.minimum.toString()} ${c.unit} bevat`:`Te kort: verwacht dat ${o.origin} ${s}${o.minimum.toString()} is`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${n[s.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}},"error");function zBt(){return{localeError:YAo()}}a(zBt,"default");f();var KAo=a(()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"tall";case"object":{if(Array.isArray(o))return"liste";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Ugyldig input: forventet ${o.expected}, fikk ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Tr(o.values[0])}`:`Ugyldig valg: forventet en av ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${s}${o.maximum.toString()} ${c.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`For lite(n): forventet ${o.origin} til \xE5 ha ${s}${o.minimum.toString()} ${c.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${n[s.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}},"error");function YBt(){return{localeError:KAo()}}a(YBt,"default");f();var JAo=a(()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"numara";case"object":{if(Array.isArray(o))return"saf";if(o===null)return"gayb";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return o=>{switch(o.code){case"invalid_type":return`F\xE2sit giren: umulan ${o.expected}, al\u0131nan ${r(o.input)}`;case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Tr(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${s}${o.maximum.toString()} ${c.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${s}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${s}${o.minimum.toString()} ${c.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${s}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let s=o;return s.format==="starts_with"?`F\xE2sit metin: "${s.prefix}" ile ba\u015Flamal\u0131.`:s.format==="ends_with"?`F\xE2sit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`F\xE2sit metin: "${s.includes}" ihtiv\xE2 etmeli.`:s.format==="regex"?`F\xE2sit metin: ${s.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[s.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function KBt(){return{localeError:JAo()}}a(KBt,"default");f();var XAo=a(()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(o))return"\u0627\u0631\u06D0";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return o=>{switch(o.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(o.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Tr(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${Pt(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} ${c.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:s.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:s.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${s.includes}" \u0648\u0644\u0631\u064A`:s.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${s.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[s.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function JBt(){return{localeError:XAo()}}a(JBt,"default");f();var ZAo=a(()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"liczba";case"object":{if(Array.isArray(o))return"tablica";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return o=>{switch(o.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o.expected}, otrzymano ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Tr(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${o.maximum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${o.minimum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${s.prefix}"`:s.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${s.suffix}"`:s.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${s.includes}"`:s.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${s.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[s.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function XBt(){return{localeError:ZAo()}}a(XBt,"default");f();var eyo=a(()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(o))return"array";if(o===null)return"nulo";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${o.expected}, recebido ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${Tr(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${s}${o.maximum.toString()} ${c.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Muito pequeno: esperado que ${o.origin} tivesse ${s}${o.minimum.toString()} ${c.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`${n[s.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}},"error");function ZBt(){return{localeError:eyo()}}a(ZBt,"default");f();function Mrn(t,e,r,n){let o=Math.abs(t),s=o%10,c=o%100;return c>=11&&c<=19?n:s===1?e:s>=2&&s<=4?r:n}a(Mrn,"getRussianPlural");var tyo=a(()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Tr(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);if(c){let l=Number(o.maximum),u=Mrn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${o.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);if(c){let l=Number(o.minimum),u=Mrn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${o.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function e3t(){return{localeError:tyo()}}a(e3t,"default");f();var ryo=a(()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(o))return"tabela";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return o=>{switch(o.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${o.expected}, prejeto ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Tr(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${s}${o.maximum.toString()} ${c.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${s}${o.minimum.toString()} ${c.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${n[s.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}},"error");function t3t(){return{localeError:ryo()}}a(t3t,"default");f();var nyo=a(()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"antal";case"object":{if(Array.isArray(o))return"lista";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return o=>{switch(o.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${o.expected}, fick ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Tr(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.maximum.toString()} ${c.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.minimum.toString()} ${c.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${s.includes}"`:s.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${s.pattern}"`:`Ogiltig(t) ${n[s.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${Pt(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function r3t(){return{localeError:nyo()}}a(r3t,"default");f();var iyo=a(()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(o))return"\u0B85\u0BA3\u0BBF";if(o===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Tr(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Pt(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${o.maximum.toString()} ${c.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${s}${o.minimum.toString()} ${c.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${s}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${s.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function n3t(){return{localeError:iyo()}}a(n3t,"default");f();var oyo=a(()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(o))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(o===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return o=>{switch(o.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Tr(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",c=e(o.origin);return c?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.maximum.toString()} ${c.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",c=e(o.origin);return c?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.minimum.toString()} ${c.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${s.prefix}"`:s.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${s.suffix}"`:s.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${s.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:s.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${s.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function i3t(){return{localeError:oyo()}}a(i3t,"default");f();var syo=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),ayo=a(()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${syo(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Tr(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${Pt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${Pt(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function o3t(){return{localeError:ayo()}}a(o3t,"default");f();var cyo=a(()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0438\u0432";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Tr(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${Pt(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function s3t(){return{localeError:cyo()}}a(s3t,"default");f();var lyo=a(()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(o))return"\u0622\u0631\u06D2";if(o===null)return"\u0646\u0644";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return o=>{switch(o.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(o.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Tr(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${Pt(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${s}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${s}${o.minimum.toString()} ${c.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${s}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${s.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${Pt(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function a3t(){return{localeError:lyo()}}a(a3t,"default");f();var uyo=a(()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(o))return"m\u1EA3ng";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return o=>{switch(o.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Tr(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${s.prefix}"`:s.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${s.suffix}"`:s.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${s.includes}"`:s.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${s.pattern}`:`${n[s.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Pt(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function c3t(){return{localeError:uyo()}}a(c3t,"default");f();var dyo=a(()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(o))return"\u6570\u7EC4";if(o===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return o=>{switch(o.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Tr(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${s}${o.maximum.toString()} ${c.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${s}${o.minimum.toString()} ${c.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.prefix}" \u5F00\u5934`:s.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.suffix}" \u7ED3\u5C3E`:s.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${s.pattern}`:`\u65E0\u6548${n[s.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${Pt(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function l3t(){return{localeError:dyo()}}a(l3t,"default");f();var fyo=a(()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return o=>{switch(o.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o.expected}\uFF0C\u4F46\u6536\u5230 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Tr(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Pt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${s}${o.maximum.toString()} ${c.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${s}${o.minimum.toString()} ${c.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.prefix}" \u958B\u982D`:s.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.suffix}" \u7D50\u5C3E`:s.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${s.pattern}`:`\u7121\u6548\u7684 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${Pt(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function u3t(){return{localeError:fyo()}}a(u3t,"default");f();var d3t=Symbol("ZodOutput"),f3t=Symbol("ZodInput"),goe=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function vje(){return new goe}a(vje,"registry");var Jk=vje();f();f();function p3t(t,e){return new t({type:"string",...ur(e)})}a(p3t,"_string");function h3t(t,e){return new t({type:"string",coerce:!0,...ur(e)})}a(h3t,"_coercedString");function bje(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ur(e)})}a(bje,"_email");function W_e(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ur(e)})}a(W_e,"_guid");function Tje(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ur(e)})}a(Tje,"_uuid");function Sje(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ur(e)})}a(Sje,"_uuidv4");function Ije(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ur(e)})}a(Ije,"_uuidv6");function xje(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ur(e)})}a(xje,"_uuidv7");function wje(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ur(e)})}a(wje,"_url");function Rje(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ur(e)})}a(Rje,"_emoji");function Pje(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ur(e)})}a(Pje,"_nanoid");function kje(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ur(e)})}a(kje,"_cuid");function Nje(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ur(e)})}a(Nje,"_cuid2");function Dje(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ur(e)})}a(Dje,"_ulid");function Mje(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ur(e)})}a(Mje,"_xid");function Oje(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ur(e)})}a(Oje,"_ksuid");function Bje(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ur(e)})}a(Bje,"_ipv4");function Lje(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ur(e)})}a(Lje,"_ipv6");function Fje(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ur(e)})}a(Fje,"_cidrv4");function Uje(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ur(e)})}a(Uje,"_cidrv6");function Qje(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ur(e)})}a(Qje,"_base64");function qje(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ur(e)})}a(qje,"_base64url");function Gje(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ur(e)})}a(Gje,"_e164");function Hje(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ur(e)})}a(Hje,"_jwt");var m3t={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function g3t(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ur(e)})}a(g3t,"_isoDateTime");function A3t(t,e){return new t({type:"string",format:"date",check:"string_format",...ur(e)})}a(A3t,"_isoDate");function y3t(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ur(e)})}a(y3t,"_isoTime");function E3t(t,e){return new t({type:"string",format:"duration",check:"string_format",...ur(e)})}a(E3t,"_isoDuration");function C3t(t,e){return new t({type:"number",checks:[],...ur(e)})}a(C3t,"_number");function _3t(t,e){return new t({type:"number",coerce:!0,checks:[],...ur(e)})}a(_3t,"_coercedNumber");function v3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ur(e)})}a(v3t,"_int");function b3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...ur(e)})}a(b3t,"_float32");function T3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...ur(e)})}a(T3t,"_float64");function S3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...ur(e)})}a(S3t,"_int32");function I3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...ur(e)})}a(I3t,"_uint32");function x3t(t,e){return new t({type:"boolean",...ur(e)})}a(x3t,"_boolean");function w3t(t,e){return new t({type:"boolean",coerce:!0,...ur(e)})}a(w3t,"_coercedBoolean");function R3t(t,e){return new t({type:"bigint",...ur(e)})}a(R3t,"_bigint");function P3t(t,e){return new t({type:"bigint",coerce:!0,...ur(e)})}a(P3t,"_coercedBigint");function k3t(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ur(e)})}a(k3t,"_int64");function N3t(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ur(e)})}a(N3t,"_uint64");function D3t(t,e){return new t({type:"symbol",...ur(e)})}a(D3t,"_symbol");function M3t(t,e){return new t({type:"undefined",...ur(e)})}a(M3t,"_undefined");function O3t(t,e){return new t({type:"null",...ur(e)})}a(O3t,"_null");function B3t(t){return new t({type:"any"})}a(B3t,"_any");function Aoe(t){return new t({type:"unknown"})}a(Aoe,"_unknown");function L3t(t,e){return new t({type:"never",...ur(e)})}a(L3t,"_never");function F3t(t,e){return new t({type:"void",...ur(e)})}a(F3t,"_void");function U3t(t,e){return new t({type:"date",...ur(e)})}a(U3t,"_date");function Q3t(t,e){return new t({type:"date",coerce:!0,...ur(e)})}a(Q3t,"_coercedDate");function q3t(t,e){return new t({type:"nan",...ur(e)})}a(q3t,"_nan");function KO(t,e){return new mje({check:"less_than",...ur(e),value:t,inclusive:!1})}a(KO,"_lt");function rS(t,e){return new mje({check:"less_than",...ur(e),value:t,inclusive:!0})}a(rS,"_lte");function JO(t,e){return new gje({check:"greater_than",...ur(e),value:t,inclusive:!1})}a(JO,"_gt");function bC(t,e){return new gje({check:"greater_than",...ur(e),value:t,inclusive:!0})}a(bC,"_gte");function G3t(t){return JO(0,t)}a(G3t,"_positive");function H3t(t){return KO(0,t)}a(H3t,"_negative");function j3t(t){return rS(0,t)}a(j3t,"_nonpositive");function $3t(t){return bC(0,t)}a($3t,"_nonnegative");function bV(t,e){return new o4t({check:"multiple_of",...ur(e),value:t})}a(bV,"_multipleOf");function yoe(t,e){return new c4t({check:"max_size",...ur(e),maximum:t})}a(yoe,"_maxSize");function TV(t,e){return new l4t({check:"min_size",...ur(e),minimum:t})}a(TV,"_minSize");function z_e(t,e){return new u4t({check:"size_equals",...ur(e),size:t})}a(z_e,"_size");function Eoe(t,e){return new d4t({check:"max_length",...ur(e),maximum:t})}a(Eoe,"_maxLength");function o9(t,e){return new f4t({check:"min_length",...ur(e),minimum:t})}a(o9,"_minLength");function Coe(t,e){return new p4t({check:"length_equals",...ur(e),length:t})}a(Coe,"_length");function Y_e(t,e){return new h4t({check:"string_format",format:"regex",...ur(e),pattern:t})}a(Y_e,"_regex");function K_e(t){return new m4t({check:"string_format",format:"lowercase",...ur(t)})}a(K_e,"_lowercase");function J_e(t){return new g4t({check:"string_format",format:"uppercase",...ur(t)})}a(J_e,"_uppercase");function X_e(t,e){return new A4t({check:"string_format",format:"includes",...ur(e),includes:t})}a(X_e,"_includes");function Z_e(t,e){return new y4t({check:"string_format",format:"starts_with",...ur(e),prefix:t})}a(Z_e,"_startsWith");function e1e(t,e){return new E4t({check:"string_format",format:"ends_with",...ur(e),suffix:t})}a(e1e,"_endsWith");function V3t(t,e,r){return new C4t({check:"property",property:t,schema:e,...ur(r)})}a(V3t,"_property");function t1e(t,e){return new _4t({check:"mime_type",mime:t,...ur(e)})}a(t1e,"_mime");function XO(t){return new v4t({check:"overwrite",tx:t})}a(XO,"_overwrite");function r1e(t){return XO(e=>e.normalize(t))}a(r1e,"_normalize");function n1e(){return XO(t=>t.trim())}a(n1e,"_trim");function i1e(){return XO(t=>t.toLowerCase())}a(i1e,"_toLowerCase");function o1e(){return XO(t=>t.toUpperCase())}a(o1e,"_toUpperCase");function s1e(t,e,r){return new t({type:"array",element:e,...ur(r)})}a(s1e,"_array");function pyo(t,e,r){return new t({type:"union",options:e,...ur(r)})}a(pyo,"_union");function hyo(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...ur(n)})}a(hyo,"_discriminatedUnion");function myo(t,e,r){return new t({type:"intersection",left:e,right:r})}a(myo,"_intersection");function W3t(t,e,r,n){let o=r instanceof Li,s=o?n:r,c=o?r:null;return new t({type:"tuple",items:e,rest:c,...ur(s)})}a(W3t,"_tuple");function gyo(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...ur(n)})}a(gyo,"_record");function Ayo(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...ur(n)})}a(Ayo,"_map");function yyo(t,e,r){return new t({type:"set",valueType:e,...ur(r)})}a(yyo,"_set");function Eyo(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new t({type:"enum",entries:n,...ur(r)})}a(Eyo,"_enum");function Cyo(t,e,r){return new t({type:"enum",entries:e,...ur(r)})}a(Cyo,"_nativeEnum");function _yo(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...ur(r)})}a(_yo,"_literal");function z3t(t,e){return new t({type:"file",...ur(e)})}a(z3t,"_file");function vyo(t,e){return new t({type:"transform",transform:e})}a(vyo,"_transform");function byo(t,e){return new t({type:"optional",innerType:e})}a(byo,"_optional");function Tyo(t,e){return new t({type:"nullable",innerType:e})}a(Tyo,"_nullable");function Syo(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}a(Syo,"_default");function Iyo(t,e,r){return new t({type:"nonoptional",innerType:e,...ur(r)})}a(Iyo,"_nonoptional");function xyo(t,e){return new t({type:"success",innerType:e})}a(xyo,"_success");function wyo(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}a(wyo,"_catch");function Ryo(t,e,r){return new t({type:"pipe",in:e,out:r})}a(Ryo,"_pipe");function Pyo(t,e){return new t({type:"readonly",innerType:e})}a(Pyo,"_readonly");function kyo(t,e,r){return new t({type:"template_literal",parts:e,...ur(r)})}a(kyo,"_templateLiteral");function Nyo(t,e){return new t({type:"lazy",getter:e})}a(Nyo,"_lazy");function Dyo(t,e){return new t({type:"promise",innerType:e})}a(Dyo,"_promise");function Y3t(t,e,r){let n=ur(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}a(Y3t,"_custom");function K3t(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ur(r)})}a(K3t,"_refine");function J3t(t,e){let r=ur(e),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(A=>typeof A=="string"?A.toLowerCase():A),o=o.map(A=>typeof A=="string"?A.toLowerCase():A));let s=new Set(n),c=new Set(o),l=t.Pipe??j_e,u=t.Boolean??q_e,d=t.String??_V,p=t.Transform??H_e,h=new p({type:"transform",transform:a((A,y)=>{let E=A;return r.case!=="sensitive"&&(E=E.toLowerCase()),s.has(E)?!0:c.has(E)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...c],input:y.value,inst:h}),{})},"transform"),error:r.error}),m=new l({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new l({type:"pipe",in:m,out:new u({type:"boolean",error:r.error}),error:r.error})}a(J3t,"_stringbool");function X3t(t,e,r,n={}){let o=ur(n),s={...ur(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:l=>r.test(l),...o};return r instanceof RegExp&&(s.pattern=r),new t(s)}a(X3t,"_stringFormat");var jje=class{static{a(this,"$ZodFunction")}constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=a(((...n)=>{let o=this._def.input?L_e(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(o))throw new Error("Invalid arguments schema: not an array or tuple schema.");let s=e(...o);return this._def.output?L_e(this._def.output,s,void 0,{callee:r}):s}),"impl");return r}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=a((async(...n)=>{let o=this._def.input?await F_e(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(o))throw new Error("Invalid arguments schema: not an array or tuple schema.");let s=await e(...o);return this._def.output?F_e(this._def.output,s,void 0,{callee:r}):s}),"impl");return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new vV({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){let r=this.constructor;return new r({type:"function",input:this._def.input,output:e})}};function Z3t(t){return new jje({type:"function",input:Array.isArray(t?.input)?W3t(vV,t?.input):t?.input??s1e(G_e,Aoe(moe)),output:t?.output??Aoe(moe)})}a(Z3t,"_function");f();var a1e=class{static{a(this,"JSONSchemaGenerator")}constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Jk,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,s={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},c=this.seen.get(e);if(c)return c.count++,r.schemaPath.includes(e)&&(c.cycle=r.path),c.schema;let l={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,l);let u=e._zod.toJSONSchema?.();if(u)l.schema=u;else{let h={...r,schemaPath:[...r.schemaPath,e],path:r.path},m=e._zod.parent;if(m)l.ref=m,this.process(m,h),this.seen.get(m).isParent=!0;else{let g=l.schema;switch(o.type){case"string":{let A=g;A.type="string";let{minimum:y,maximum:E,format:_,patterns:v,contentEncoding:b}=e._zod.bag;if(typeof y=="number"&&(A.minLength=y),typeof E=="number"&&(A.maxLength=E),_&&(A.format=s[_]??_,A.format===""&&delete A.format),b&&(A.contentEncoding=b),v&&v.size>0){let I=[...v];I.length===1?A.pattern=I[0].source:I.length>1&&(l.schema.allOf=[...I.map(x=>({...this.target==="draft-7"?{type:"string"}:{},pattern:x.source}))])}break}case"number":{let A=g,{minimum:y,maximum:E,format:_,multipleOf:v,exclusiveMaximum:b,exclusiveMinimum:I}=e._zod.bag;typeof _=="string"&&_.includes("int")?A.type="integer":A.type="number",typeof I=="number"&&(A.exclusiveMinimum=I),typeof y=="number"&&(A.minimum=y,typeof I=="number"&&(I>=y?delete A.minimum:delete A.exclusiveMinimum)),typeof b=="number"&&(A.exclusiveMaximum=b),typeof E=="number"&&(A.maximum=E,typeof b=="number"&&(b<=E?delete A.maximum:delete A.exclusiveMaximum)),typeof v=="number"&&(A.multipleOf=v);break}case"boolean":{let A=g;A.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{g.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{g.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let A=g,{minimum:y,maximum:E}=e._zod.bag;typeof y=="number"&&(A.minItems=y),typeof E=="number"&&(A.maxItems=E),A.type="array",A.items=this.process(o.element,{...h,path:[...h.path,"items"]});break}case"object":{let A=g;A.type="object",A.properties={};let y=o.shape;for(let v in y)A.properties[v]=this.process(y[v],{...h,path:[...h.path,"properties",v]});let E=new Set(Object.keys(y)),_=new Set([...E].filter(v=>{let b=o.shape[v]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));_.size>0&&(A.required=Array.from(_)),o.catchall?._zod.def.type==="never"?A.additionalProperties=!1:o.catchall?o.catchall&&(A.additionalProperties=this.process(o.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(A.additionalProperties=!1);break}case"union":{let A=g;A.anyOf=o.options.map((y,E)=>this.process(y,{...h,path:[...h.path,"anyOf",E]}));break}case"intersection":{let A=g,y=this.process(o.left,{...h,path:[...h.path,"allOf",0]}),E=this.process(o.right,{...h,path:[...h.path,"allOf",1]}),_=a(b=>"allOf"in b&&Object.keys(b).length===1,"isSimpleIntersection"),v=[..._(y)?y.allOf:[y],..._(E)?E.allOf:[E]];A.allOf=v;break}case"tuple":{let A=g;A.type="array";let y=o.items.map((v,b)=>this.process(v,{...h,path:[...h.path,"prefixItems",b]}));if(this.target==="draft-2020-12"?A.prefixItems=y:A.items=y,o.rest){let v=this.process(o.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?A.items=v:A.additionalItems=v}o.rest&&(A.items=this.process(o.rest,{...h,path:[...h.path,"items"]}));let{minimum:E,maximum:_}=e._zod.bag;typeof E=="number"&&(A.minItems=E),typeof _=="number"&&(A.maxItems=_);break}case"record":{let A=g;A.type="object",A.propertyNames=this.process(o.keyType,{...h,path:[...h.path,"propertyNames"]}),A.additionalProperties=this.process(o.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let A=g,y=w_e(o.entries);y.every(E=>typeof E=="number")&&(A.type="number"),y.every(E=>typeof E=="string")&&(A.type="string"),A.enum=y;break}case"literal":{let A=g,y=[];for(let E of o.values)if(E===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof E=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");y.push(Number(E))}else y.push(E);if(y.length!==0)if(y.length===1){let E=y[0];A.type=E===null?"null":typeof E,A.const=E}else y.every(E=>typeof E=="number")&&(A.type="number"),y.every(E=>typeof E=="string")&&(A.type="string"),y.every(E=>typeof E=="boolean")&&(A.type="string"),y.every(E=>E===null)&&(A.type="null"),A.enum=y;break}case"file":{let A=g,y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:E,maximum:_,mime:v}=e._zod.bag;E!==void 0&&(y.minLength=E),_!==void 0&&(y.maxLength=_),v?v.length===1?(y.contentMediaType=v[0],Object.assign(A,y)):A.anyOf=v.map(b=>({...y,contentMediaType:b})):Object.assign(A,y);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let A=this.process(o.innerType,h);g.anyOf=[A,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,h),l.ref=o.innerType;break}case"success":{let A=g;A.type="boolean";break}case"default":{this.process(o.innerType,h),l.ref=o.innerType,g.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,h),l.ref=o.innerType,this.io==="input"&&(g._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,h),l.ref=o.innerType;let A;try{A=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}g.default=A;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let A=g,y=e._zod.pattern;if(!y)throw new Error("Pattern not found in template literal");A.type="string",A.pattern=y.source;break}case"pipe":{let A=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(A,h),l.ref=A;break}case"readonly":{this.process(o.innerType,h),l.ref=o.innerType,g.readOnly=!0;break}case"promise":{this.process(o.innerType,h),l.ref=o.innerType;break}case"optional":{this.process(o.innerType,h),l.ref=o.innerType;break}case"lazy":{let A=e._zod.innerType;this.process(A,h),l.ref=A;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let d=this.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),this.io==="input"&&bp(e)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((n=l.schema).default??(n.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(e).schema}emit(e,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let s=a(p=>{let h=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let y=n.external.registry.get(p[0])?.id,E=n.external.uri??(v=>v);if(y)return{ref:E(y)};let _=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=_,{defId:_,ref:`${E("__shared")}#/${h}/${_}`}}if(p[1]===o)return{ref:"#"};let g=`#/${h}/`,A=p[1].schema.id??`__schema${this.counter++}`;return{defId:A,ref:g+A}},"makeURI"),c=a(p=>{if(p[1].schema.$ref)return;let h=p[1],{ref:m,defId:g}=s(p);h.def={...h.schema},g&&(h.defId=g);let A=h.schema;for(let y in A)delete A[y];A.$ref=m},"extractToDef");if(n.cycles==="throw")for(let p of this.seen.entries()){let h=p[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/ + path: iss.path ? [${T$(v)}, ...iss.path] : [${T$(v)}] + })));`),m.write(`newResult[${T$(v)}] = ${b}.value`)}m.write("payload.value = newResult;"),m.write("return payload;");let _=m.compile();return(v,b)=>_(h,v,b)},"generateFastpass"),o,s=Tie,c=!v_e.jitless,u=c&&G4t.value,d=e.catchall,p;t._zod.parse=(h,m)=>{p??(p=r.value);let g=h.value;if(!s(g))return h.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),h;let A=[];if(c&&u&&m?.async===!1&&m.jitless!==!0)o||(o=n(e.shape)),h=o(h,m);else{h.value={};let b=p.shape;for(let I of p.keys){let x=b[I],w=x._zod.run({value:g[I],issues:[]},m),R=x._zod.optin==="optional"&&x._zod.optout==="optional";w instanceof Promise?A.push(w.then(P=>R?Enn(P,h,I,g):SHe(P,h,I))):R?Enn(w,h,I,g):SHe(w,h,I)}}if(!d)return A.length?Promise.all(A).then(()=>h):h;let y=[],E=p.keySet,_=d._zod,v=_.def.type;for(let b of Object.keys(g)){if(E.has(b))continue;if(v==="never"){y.push(b);continue}let I=_.run({value:g[b],issues:[]},m);I instanceof Promise?A.push(I.then(x=>SHe(x,h,b))):SHe(I,h,b)}return y.length&&h.issues.push({code:"unrecognized_keys",keys:y,input:g,inst:t}),A.length?Promise.all(A).then(()=>h):h}});function _nn(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(s=>tv(s,n,E0())))}),e}a(_nn,"handleUnionResults");var RHe=Xe("$ZodUnion",(t,e)=>{Oi.init(t,e),Pa(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Pa(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Pa(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),Pa(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>x_e(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let o=!1,s=[];for(let c of e.options){let l=c._zod.run({value:r.value,issues:[]},n);if(l instanceof Promise)s.push(l),o=!0;else{if(l.issues.length===0)return l;s.push(l)}}return o?Promise.all(s).then(c=>_nn(c,r,t,n)):_nn(s,r,t,n)}}),IBt=Xe("$ZodDiscriminatedUnion",(t,e)=>{RHe.init(t,e);let r=t._zod.parse;Pa(t._zod,"propValues",()=>{let o={};for(let s of e.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[l,u]of Object.entries(c)){o[l]||(o[l]=new Set);for(let d of u)o[l].add(d)}}return o});let n=I_e(()=>{let o=e.options,s=new Map;for(let c of o){let l=c._zod.propValues[e.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let u of l){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,c)}}return s});t._zod.parse=(o,s)=>{let c=o.value;if(!Tie(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),o;let l=n.value.get(c?.[e.discriminator]);return l?l._zod.run(o,s):e.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:c,path:[e.discriminator],inst:t}),o)}}),xBt=Xe("$ZodIntersection",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value,s=e.left._zod.run({value:o,issues:[]},n),c=e.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||c instanceof Promise?Promise.all([s,c]).then(([u,d])=>Cnn(r,u,d)):Cnn(r,s,c)}});function jOt(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Sie(t)&&Sie(e)){let r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};for(let s of n){let c=jOt(t[s],e[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s,...c.mergeErrorPath]};o[s]=c.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n{Oi.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(o=>o._zod.optin!=="optional");t._zod.parse=(o,s)=>{let c=o.value;if(!Array.isArray(c))return o.issues.push({input:c,inst:t,expected:"tuple",code:"invalid_type"}),o;o.value=[];let l=[];if(!e.rest){let d=c.length>r.length,p=c.length=c.length&&u>=n)continue;let p=d._zod.run({value:c[u],issues:[]},s);p instanceof Promise?l.push(p.then(h=>IHe(h,o,u))):IHe(p,o,u)}if(e.rest){let d=c.slice(r.length);for(let p of d){u++;let h=e.rest._zod.run({value:p,issues:[]},s);h instanceof Promise?l.push(h.then(m=>IHe(m,o,u))):IHe(h,o,u)}}return l.length?Promise.all(l).then(()=>o):o}});function IHe(t,e,r){t.issues.length&&e.issues.push(...u_(r,t.issues)),e.value[r]=t.value}a(IHe,"handleTupleResult");var wBt=Xe("$ZodRecord",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Sie(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let s=[];if(e.keyType._zod.values){let c=e.keyType._zod.values;r.value={};for(let u of c)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){let d=e.valueType._zod.run({value:o[u],issues:[]},n);d instanceof Promise?s.push(d.then(p=>{p.issues.length&&r.issues.push(...u_(u,p.issues)),r.value[u]=p.value})):(d.issues.length&&r.issues.push(...u_(u,d.issues)),r.value[u]=d.value)}let l;for(let u in o)c.has(u)||(l=l??[],l.push(u));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:l})}else{r.value={};for(let c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let l=e.keyType._zod.run({value:c,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:l.issues.map(d=>tv(d,n,E0())),input:c,path:[c],inst:t}),r.value[l.value]=l.value;continue}let u=e.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?s.push(u.then(d=>{d.issues.length&&r.issues.push(...u_(c,d.issues)),r.value[l.value]=d.value})):(u.issues.length&&r.issues.push(...u_(c,u.issues)),r.value[l.value]=u.value)}}return s.length?Promise.all(s).then(()=>r):r}}),RBt=Xe("$ZodMap",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:t}),r;let s=[];r.value=new Map;for(let[c,l]of o){let u=e.keyType._zod.run({value:c,issues:[]},n),d=e.valueType._zod.run({value:l,issues:[]},n);u instanceof Promise||d instanceof Promise?s.push(Promise.all([u,d]).then(([p,h])=>{vnn(p,h,r,c,o,t,n)})):vnn(u,d,r,c,o,t,n)}return s.length?Promise.all(s).then(()=>r):r}});function vnn(t,e,r,n,o,s,c){t.issues.length&&(w_e.has(typeof n)?r.issues.push(...u_(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:o,inst:s,issues:t.issues.map(l=>tv(l,c,E0()))})),e.issues.length&&(w_e.has(typeof n)?r.issues.push(...u_(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:s,key:n,issues:e.issues.map(l=>tv(l,c,E0()))})),r.value.set(t.value,e.value)}a(vnn,"handleMapResult");var PBt=Xe("$ZodSet",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:t,expected:"set",code:"invalid_type"}),r;let s=[];r.value=new Set;for(let c of o){let l=e.valueType._zod.run({value:c,issues:[]},n);l instanceof Promise?s.push(l.then(u=>bnn(u,r))):bnn(l,r)}return s.length?Promise.all(s).then(()=>r):r}});function bnn(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}a(bnn,"handleSetResult");var kBt=Xe("$ZodEnum",(t,e)=>{Oi.init(t,e);let r=S_e(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>w_e.has(typeof n)).map(n=>typeof n=="string"?k4(n):n.toString()).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return t._zod.values.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:t}),n}}),DBt=Xe("$ZodLiteral",(t,e)=>{Oi.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?k4(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let o=r.value;return t._zod.values.has(o)||r.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),r}}),NBt=Xe("$ZodFile",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:t}),r}}),Q_e=Xe("$ZodTransform",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=e.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(r.value=c,r));if(o instanceof Promise)throw new Fk;return r.value=o,r}}),MBt=Xe("$ZodOptional",(t,e)=>{Oi.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Pa(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Pa(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${x_e(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),OBt=Xe("$ZodNullable",(t,e)=>{Oi.init(t,e),Pa(t._zod,"optin",()=>e.innerType._zod.optin),Pa(t._zod,"optout",()=>e.innerType._zod.optout),Pa(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${x_e(r.source)}|null)$`):void 0}),Pa(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),BBt=Xe("$ZodDefault",(t,e)=>{Oi.init(t,e),t._zod.optin="optional",Pa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Tnn(s,e)):Tnn(o,e)}});function Tnn(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}a(Tnn,"handleDefaultResult");var LBt=Xe("$ZodPrefault",(t,e)=>{Oi.init(t,e),t._zod.optin="optional",Pa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),FBt=Xe("$ZodNonOptional",(t,e)=>{Oi.init(t,e),Pa(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Snn(s,t)):Snn(o,t)}});function Snn(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}a(Snn,"handleNonOptionalResult");var UBt=Xe("$ZodSuccess",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.issues.length===0,r)):(r.value=o.issues.length===0,r)}}),QBt=Xe("$ZodCatch",(t,e)=>{Oi.init(t,e),t._zod.optin="optional",Pa(t._zod,"optout",()=>e.innerType._zod.optout),Pa(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(c=>tv(c,n,E0()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>tv(s,n,E0()))},input:r.value}),r.issues=[]),r)}}),qBt=Xe("$ZodNaN",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),q_e=Xe("$ZodPipe",(t,e)=>{Oi.init(t,e),Pa(t._zod,"values",()=>e.in._zod.values),Pa(t._zod,"optin",()=>e.in._zod.optin),Pa(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Inn(s,e,n)):Inn(o,e,n)}});function Inn(t,e,r){return S$(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}a(Inn,"handlePipeResult");var GBt=Xe("$ZodReadonly",(t,e)=>{Oi.init(t,e),Pa(t._zod,"propValues",()=>e.innerType._zod.propValues),Pa(t._zod,"values",()=>e.innerType._zod.values),Pa(t._zod,"optin",()=>e.innerType._zod.optin),Pa(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(xnn):xnn(o)}});function xnn(t){return t.value=Object.freeze(t.value),t}a(xnn,"handleReadonlyResult");var HBt=Xe("$ZodTemplateLiteral",(t,e)=>{Oi.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Oi){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let s=o.startsWith("^")?1:0,c=o.endsWith("$")?o.length-1:o.length;r.push(o.slice(s,c))}else if(n===null||H4t.has(typeof n))r.push(k4(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"template_literal",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),n)}),jBt=Xe("$ZodPromise",(t,e)=>{Oi.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>e.innerType._zod.run({value:o,issues:[]},n))}),$Bt=Xe("$ZodLazy",(t,e)=>{Oi.init(t,e),Pa(t._zod,"innerType",()=>e.getter()),Pa(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),Pa(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),Pa(t._zod,"optin",()=>t._zod.innerType._zod.optin),Pa(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),VBt=Xe("$ZodCustom",(t,e)=>{Xu.init(t,e),Oi.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,o=e.fn(n);if(o instanceof Promise)return o.then(s=>wnn(s,r,n,t));wnn(o,r,n,t)}});function wnn(t,e,r,n){if(!t){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(W4t(o))}}a(wnn,"handleRefineResult");var H_e={};ui(H_e,{ar:()=>WBt,az:()=>zBt,be:()=>YBt,ca:()=>KBt,cs:()=>JBt,de:()=>XBt,en:()=>G_e,eo:()=>ZBt,es:()=>e3t,fa:()=>t3t,fi:()=>r3t,fr:()=>n3t,frCA:()=>i3t,he:()=>o3t,hu:()=>s3t,id:()=>a3t,it:()=>c3t,ja:()=>l3t,kh:()=>u3t,ko:()=>d3t,mk:()=>f3t,ms:()=>p3t,nl:()=>h3t,no:()=>m3t,ota:()=>g3t,pl:()=>y3t,ps:()=>A3t,pt:()=>E3t,ru:()=>_3t,sl:()=>C3t,sv:()=>v3t,ta:()=>b3t,th:()=>T3t,tr:()=>S3t,ua:()=>I3t,ur:()=>x3t,vi:()=>w3t,zhCN:()=>R3t,zhTW:()=>P3t});f();f();var IEo=a(()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return o=>{switch(o.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Tr(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${o.minimum.toString()} ${c.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:s.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${s.suffix}"`:s.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${s.includes}"`:s.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${s.pattern}`:`${n[s.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${xt(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function WBt(){return{localeError:IEo()}}a(WBt,"default");f();var xEo=a(()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o.expected}, daxil olan ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Tr(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${s}${o.maximum.toString()} ${c.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${s}${o.minimum.toString()} ${c.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${s.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:s.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${s.suffix}" il\u0259 bitm\u0259lidir`:s.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${s.includes}" daxil olmal\u0131d\u0131r`:s.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${s.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[s.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function zBt(){return{localeError:xEo()}}a(zBt,"default");f();function Dnn(t,e,r,n){let o=Math.abs(t),s=o%10,c=o%100;return c>=11&&c<=19?n:s===1?e:s>=2&&s<=4?r:n}a(Dnn,"getBelarusianPlural");var wEo=a(()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0456\u045E";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Tr(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);if(c){let l=Number(o.maximum),u=Dnn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${o.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);if(c){let l=Number(o.minimum),u=Dnn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${o.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function YBt(){return{localeError:wEo()}}a(YBt,"default");f();var REo=a(()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${o.expected}, s'ha rebut ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Tr(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${xt(o.values," o ")}`;case"too_big":{let s=o.inclusive?"com a m\xE0xim":"menys de",c=e(o.origin);return c?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${s} ${o.maximum.toString()} ${c.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"com a m\xEDnim":"m\xE9s de",c=e(o.origin);return c?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${s} ${o.minimum.toString()} ${c.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${s.prefix}"`:s.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format inv\xE0lid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${s.pattern}`:`Format inv\xE0lid per a ${n[s.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function KBt(){return{localeError:REo()}}a(KBt,"default");f();var PEo=a(()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(o))return"pole";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return o=>{switch(o.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o.expected}, obdr\u017Eeno ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Tr(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${s}${o.maximum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${s}${o.minimum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${s.prefix}"`:s.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${s.suffix}"`:s.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${s.includes}"`:s.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${s.pattern}`:`Neplatn\xFD form\xE1t ${n[s.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${xt(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function JBt(){return{localeError:PEo()}}a(JBt,"default");f();var kEo=a(()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"Zahl";case"object":{if(Array.isArray(o))return"Array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return o=>{switch(o.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${o.expected}, erhalten ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Tr(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${s}${o.maximum.toString()} ${c.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${s}${o.maximum.toString()} ist`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Zu klein: erwartet, dass ${o.origin} ${s}${o.minimum.toString()} ${c.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${s}${o.minimum.toString()} ist`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ung\xFCltiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ung\xFCltiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ung\xFCltiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${s.pattern} entsprechen`:`Ung\xFCltig: ${n[s.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${xt(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function XBt(){return{localeError:kEo()}}a(XBt,"default");f();var DEo=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),NEo=a(()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${DEo(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Tr(n.values[0])}`:`Invalid option: expected one of ${xt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${xt(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}},"error");function G_e(){return{localeError:NEo()}}a(G_e,"default");f();var MEo=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),OEo=a(()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${MEo(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Tr(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${xt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${xt(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}},"error");function ZBt(){return{localeError:OEo()}}a(ZBt,"default");f();var BEo=a(()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(o))return"arreglo";if(o===null)return"nulo";if(Object.getPrototypeOf(o)!==Object.prototype)return o.constructor.name}}return s},"parsedType"),n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${o.expected}, recibido ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Tr(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Demasiado grande: se esperaba que ${o.origin??"valor"} tuviera ${s}${o.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o.origin??"valor"} fuera ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Demasiado peque\xF1o: se esperaba que ${o.origin} tuviera ${s}${o.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${o.origin} fuera ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${n[s.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function e3t(){return{localeError:BEo()}}a(e3t,"default");f();var LEo=a(()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(o))return"\u0622\u0631\u0627\u06CC\u0647";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return o=>{switch(o.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(o.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Tr(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${xt(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} ${c.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:s.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:s.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${s.includes}" \u0628\u0627\u0634\u062F`:s.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${s.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[s.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${xt(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function t3t(){return{localeError:LEo()}}a(t3t,"default");f();var FEo=a(()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return o=>{switch(o.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${o.expected}, oli ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Tr(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Liian suuri: ${c.subject} t\xE4ytyy olla ${s}${o.maximum.toString()} ${c.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Liian pieni: ${c.subject} t\xE4ytyy olla ${s}${o.minimum.toString()} ${c.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${n[s.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${xt(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function r3t(){return{localeError:FEo()}}a(r3t,"default");f();var UEo=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"nombre";case"object":{if(Array.isArray(o))return"tableau";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return o=>{switch(o.code){case"invalid_type":return`Entr\xE9e invalide : ${o.expected} attendu, ${r(o.input)} re\xE7u`;case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Tr(o.values[0])} attendu`:`Option invalide : une valeur parmi ${xt(o.values,"|")} attendue`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Trop grand : ${o.origin??"valeur"} doit ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o.origin??"valeur"} doit \xEAtre ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Trop petit : ${o.origin} doit ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Trop petit : ${o.origin} doit \xEAtre ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${s.pattern}`:`${n[s.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${xt(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}},"error");function n3t(){return{localeError:UEo()}}a(n3t,"default");f();var QEo=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return o=>{switch(o.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${o.expected}, re\xE7u ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Tr(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"\u2264":"<",c=e(o.origin);return c?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${s}${o.maximum.toString()} ${c.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"\u2265":">",c=e(o.origin);return c?`Trop petit : attendu que ${o.origin} ait ${s}${o.minimum.toString()} ${c.unit}`:`Trop petit : attendu que ${o.origin} soit ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${s.pattern}`:`${n[s.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${xt(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}},"error");function i3t(){return{localeError:QEo()}}a(i3t,"default");f();var qEo=a(()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return o=>{switch(o.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${o.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${Tr(o.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${o.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.maximum.toString()} ${c.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${o.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${o.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.minimum.toString()} ${c.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${o.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${s.prefix}"`:s.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${s.suffix}"`:s.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${s.includes}"`:s.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${s.pattern}`:`${n[s.format]??o.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${o.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${o.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${o.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function o3t(){return{localeError:qEo()}}a(o3t,"default");f();var GEo=a(()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(o))return"t\xF6mb";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return o=>{switch(o.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o.expected}, a kapott \xE9rt\xE9k ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Tr(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${s}${o.maximum.toString()} ${c.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${s}${o.minimum.toString()} ${c.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\xC9rv\xE9nytelen string: "${s.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:s.format==="ends_with"?`\xC9rv\xE9nytelen string: "${s.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:s.format==="includes"?`\xC9rv\xE9nytelen string: "${s.includes}" \xE9rt\xE9ket kell tartalmaznia`:s.format==="regex"?`\xC9rv\xE9nytelen string: ${s.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[s.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function s3t(){return{localeError:GEo()}}a(s3t,"default");f();var HEo=a(()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input tidak valid: diharapkan ${o.expected}, diterima ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Tr(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${s}${o.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Terlalu kecil: diharapkan ${o.origin} memiliki ${s}${o.minimum.toString()} ${c.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${n[s.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}},"error");function a3t(){return{localeError:HEo()}}a(a3t,"default");f();var jEo=a(()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"numero";case"object":{if(Array.isArray(o))return"vettore";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input non valido: atteso ${o.expected}, ricevuto ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Tr(o.values[0])}`:`Opzione non valida: atteso uno tra ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Troppo grande: ${o.origin??"valore"} deve avere ${s}${o.maximum.toString()} ${c.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Troppo piccolo: ${o.origin} deve avere ${s}${o.minimum.toString()} ${c.unit}`:`Troppo piccolo: ${o.origin} deve essere ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${n[s.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${xt(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}},"error");function c3t(){return{localeError:jEo()}}a(c3t,"default");f();var $Eo=a(()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(o))return"\u914D\u5217";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return o=>{switch(o.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(o.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Tr(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${xt(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let s=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",c=e(o.origin);return c?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${c.unit??"\u8981\u7D20"}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let s=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",c=e(o.origin);return c?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${c.unit}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${s.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[s.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${xt(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function l3t(){return{localeError:$Eo()}}a(l3t,"default");f();var VEo=a(()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(o))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(o===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return o=>{switch(o.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Tr(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${o.maximum.toString()} ${c.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${s} ${o.minimum.toString()} ${c.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${s.prefix}"`:s.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${s.suffix}"`:s.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${s.includes}"`:s.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${s.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${xt(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function u3t(){return{localeError:VEo()}}a(u3t,"default");f();var WEo=a(()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return o=>{switch(o.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(o.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Tr(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${xt(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let s=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",c=s==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=e(o.origin),u=l?.unit??"\uC694\uC18C";return l?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${u} ${s}${c}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${s}${c}`}case"too_small":{let s=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",c=s==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=e(o.origin),u=l?.unit??"\uC694\uC18C";return l?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${u} ${s}${c}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${s}${c}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:s.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${s.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[s.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${xt(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function d3t(){return{localeError:WEo()}}a(d3t,"default");f();var zEo=a(()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(o))return"\u043D\u0438\u0437\u0430";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return o=>{switch(o.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${Tr(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${s}${o.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${s}${o.minimum.toString()} ${c.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${s.pattern}`:`Invalid ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function f3t(){return{localeError:zEo()}}a(f3t,"default");f();var YEo=a(()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"nombor";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Input tidak sah: dijangka ${o.expected}, diterima ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Tr(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Terlalu besar: dijangka ${o.origin??"nilai"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Terlalu kecil: dijangka ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${n[s.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${xt(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}},"error");function p3t(){return{localeError:YEo()}}a(p3t,"default");f();var KEo=a(()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"getal";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return o=>{switch(o.code){case"invalid_type":return`Ongeldige invoer: verwacht ${o.expected}, ontving ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Tr(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Te lang: verwacht dat ${o.origin??"waarde"} ${s}${o.maximum.toString()} ${c.unit??"elementen"} bevat`:`Te lang: verwacht dat ${o.origin??"waarde"} ${s}${o.maximum.toString()} is`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Te kort: verwacht dat ${o.origin} ${s}${o.minimum.toString()} ${c.unit} bevat`:`Te kort: verwacht dat ${o.origin} ${s}${o.minimum.toString()} is`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${n[s.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}},"error");function h3t(){return{localeError:KEo()}}a(h3t,"default");f();var JEo=a(()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"tall";case"object":{if(Array.isArray(o))return"liste";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Ugyldig input: forventet ${o.expected}, fikk ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Tr(o.values[0])}`:`Ugyldig valg: forventet en av ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${s}${o.maximum.toString()} ${c.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`For lite(n): forventet ${o.origin} til \xE5 ha ${s}${o.minimum.toString()} ${c.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${n[s.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${xt(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}},"error");function m3t(){return{localeError:JEo()}}a(m3t,"default");f();var XEo=a(()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"numara";case"object":{if(Array.isArray(o))return"saf";if(o===null)return"gayb";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return o=>{switch(o.code){case"invalid_type":return`F\xE2sit giren: umulan ${o.expected}, al\u0131nan ${r(o.input)}`;case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Tr(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${s}${o.maximum.toString()} ${c.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${s}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${s}${o.minimum.toString()} ${c.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${s}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let s=o;return s.format==="starts_with"?`F\xE2sit metin: "${s.prefix}" ile ba\u015Flamal\u0131.`:s.format==="ends_with"?`F\xE2sit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`F\xE2sit metin: "${s.includes}" ihtiv\xE2 etmeli.`:s.format==="regex"?`F\xE2sit metin: ${s.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[s.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function g3t(){return{localeError:XEo()}}a(g3t,"default");f();var ZEo=a(()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(o))return"\u0627\u0631\u06D0";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return o=>{switch(o.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(o.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Tr(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${xt(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} ${c.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${s}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:s.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:s.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${s.includes}" \u0648\u0644\u0631\u064A`:s.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${s.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[s.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function A3t(){return{localeError:ZEo()}}a(A3t,"default");f();var e_o=a(()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"liczba";case"object":{if(Array.isArray(o))return"tablica";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return o=>{switch(o.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o.expected}, otrzymano ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Tr(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${o.maximum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${o.minimum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${s.prefix}"`:s.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${s.suffix}"`:s.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${s.includes}"`:s.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${s.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[s.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function y3t(){return{localeError:e_o()}}a(y3t,"default");f();var t_o=a(()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(o))return"array";if(o===null)return"nulo";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${o.expected}, recebido ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${Tr(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${s}${o.maximum.toString()} ${c.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Muito pequeno: esperado que ${o.origin} tivesse ${s}${o.minimum.toString()} ${c.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`${n[s.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}},"error");function E3t(){return{localeError:t_o()}}a(E3t,"default");f();function Nnn(t,e,r,n){let o=Math.abs(t),s=o%10,c=o%100;return c>=11&&c<=19?n:s===1?e:s>=2&&s<=4?r:n}a(Nnn,"getRussianPlural");var r_o=a(()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Tr(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);if(c){let l=Number(o.maximum),u=Nnn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${o.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);if(c){let l=Number(o.minimum),u=Nnn(l,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${o.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function _3t(){return{localeError:r_o()}}a(_3t,"default");f();var n_o=a(()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(o))return"tabela";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return o=>{switch(o.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${o.expected}, prejeto ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Tr(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${s}${o.maximum.toString()} ${c.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${s}${o.minimum.toString()} ${c.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${n[s.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${xt(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}},"error");function C3t(){return{localeError:n_o()}}a(C3t,"default");f();var i_o=a(()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"antal";case"object":{if(Array.isArray(o))return"lista";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return o=>{switch(o.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${o.expected}, fick ${r(o.input)}`;case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Tr(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.maximum.toString()} ${c.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.minimum.toString()} ${c.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${s.includes}"`:s.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${s.pattern}"`:`Ogiltig(t) ${n[s.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${xt(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function v3t(){return{localeError:i_o()}}a(v3t,"default");f();var o_o=a(()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(o))return"\u0B85\u0BA3\u0BBF";if(o===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Tr(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${xt(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${o.maximum.toString()} ${c.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${s}${o.minimum.toString()} ${c.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${s}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${s.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function b3t(){return{localeError:o_o()}}a(b3t,"default");f();var s_o=a(()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(o))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(o===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return o=>{switch(o.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Tr(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",c=e(o.origin);return c?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.maximum.toString()} ${c.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",c=e(o.origin);return c?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.minimum.toString()} ${c.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${s.prefix}"`:s.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${s.suffix}"`:s.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${s.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:s.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${s.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[s.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${xt(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function T3t(){return{localeError:s_o()}}a(T3t,"default");f();var a_o=a(t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},"parsedType"),c_o=a(()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??null}a(e,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${a_o(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Tr(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${xt(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=e(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=e(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${xt(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function S3t(){return{localeError:c_o()}}a(S3t,"default");f();var l_o=a(()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(o))return"\u043C\u0430\u0441\u0438\u0432";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return o=>{switch(o.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Tr(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${xt(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function I3t(){return{localeError:l_o()}}a(I3t,"default");f();var u_o=a(()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(o))return"\u0622\u0631\u06D2";if(o===null)return"\u0646\u0644";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return o=>{switch(o.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(o.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Tr(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${xt(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${s}${o.maximum.toString()} ${c.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${s}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${s}${o.minimum.toString()} ${c.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${s}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${s.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${xt(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function x3t(){return{localeError:u_o()}}a(x3t,"default");f();var d_o=a(()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(o))return"m\u1EA3ng";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return o=>{switch(o.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Tr(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${c.verb} ${s}${o.maximum.toString()} ${c.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${c.verb} ${s}${o.minimum.toString()} ${c.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${s.prefix}"`:s.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${s.suffix}"`:s.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${s.includes}"`:s.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${s.pattern}`:`${n[s.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${xt(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function w3t(){return{localeError:d_o()}}a(w3t,"default");f();var f_o=a(()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(o))return"\u6570\u7EC4";if(o===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return o=>{switch(o.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Tr(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${s}${o.maximum.toString()} ${c.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${s}${o.minimum.toString()} ${c.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.prefix}" \u5F00\u5934`:s.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.suffix}" \u7ED3\u5C3E`:s.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${s.pattern}`:`\u65E0\u6548${n[s.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${xt(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function R3t(){return{localeError:f_o()}}a(R3t,"default");f();var p_o=a(()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(o){return t[o]??null}a(e,"getSizing");let r=a(o=>{let s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return s},"parsedType"),n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return o=>{switch(o.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o.expected}\uFF0C\u4F46\u6536\u5230 ${r(o.input)}`;case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Tr(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${xt(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",c=e(o.origin);return c?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${s}${o.maximum.toString()} ${c.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",c=e(o.origin);return c?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${s}${o.minimum.toString()} ${c.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.prefix}" \u958B\u982D`:s.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.suffix}" \u7D50\u5C3E`:s.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${s.pattern}`:`\u7121\u6548\u7684 ${n[s.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${xt(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function P3t(){return{localeError:p_o()}}a(P3t,"default");f();var k3t=Symbol("ZodOutput"),D3t=Symbol("ZodInput"),Pie=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function PHe(){return new Pie}a(PHe,"registry");var Uk=PHe();f();f();function N3t(t,e){return new t({type:"string",...ur(e)})}a(N3t,"_string");function M3t(t,e){return new t({type:"string",coerce:!0,...ur(e)})}a(M3t,"_coercedString");function kHe(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ur(e)})}a(kHe,"_email");function j_e(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ur(e)})}a(j_e,"_guid");function DHe(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ur(e)})}a(DHe,"_uuid");function NHe(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ur(e)})}a(NHe,"_uuidv4");function MHe(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ur(e)})}a(MHe,"_uuidv6");function OHe(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ur(e)})}a(OHe,"_uuidv7");function BHe(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ur(e)})}a(BHe,"_url");function LHe(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ur(e)})}a(LHe,"_emoji");function FHe(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ur(e)})}a(FHe,"_nanoid");function UHe(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ur(e)})}a(UHe,"_cuid");function QHe(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ur(e)})}a(QHe,"_cuid2");function qHe(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ur(e)})}a(qHe,"_ulid");function GHe(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ur(e)})}a(GHe,"_xid");function HHe(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ur(e)})}a(HHe,"_ksuid");function jHe(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ur(e)})}a(jHe,"_ipv4");function $He(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ur(e)})}a($He,"_ipv6");function VHe(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ur(e)})}a(VHe,"_cidrv4");function WHe(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ur(e)})}a(WHe,"_cidrv6");function zHe(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ur(e)})}a(zHe,"_base64");function YHe(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ur(e)})}a(YHe,"_base64url");function KHe(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ur(e)})}a(KHe,"_e164");function JHe(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ur(e)})}a(JHe,"_jwt");var O3t={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function B3t(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ur(e)})}a(B3t,"_isoDateTime");function L3t(t,e){return new t({type:"string",format:"date",check:"string_format",...ur(e)})}a(L3t,"_isoDate");function F3t(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ur(e)})}a(F3t,"_isoTime");function U3t(t,e){return new t({type:"string",format:"duration",check:"string_format",...ur(e)})}a(U3t,"_isoDuration");function Q3t(t,e){return new t({type:"number",checks:[],...ur(e)})}a(Q3t,"_number");function q3t(t,e){return new t({type:"number",coerce:!0,checks:[],...ur(e)})}a(q3t,"_coercedNumber");function G3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ur(e)})}a(G3t,"_int");function H3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...ur(e)})}a(H3t,"_float32");function j3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...ur(e)})}a(j3t,"_float64");function $3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...ur(e)})}a($3t,"_int32");function V3t(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...ur(e)})}a(V3t,"_uint32");function W3t(t,e){return new t({type:"boolean",...ur(e)})}a(W3t,"_boolean");function z3t(t,e){return new t({type:"boolean",coerce:!0,...ur(e)})}a(z3t,"_coercedBoolean");function Y3t(t,e){return new t({type:"bigint",...ur(e)})}a(Y3t,"_bigint");function K3t(t,e){return new t({type:"bigint",coerce:!0,...ur(e)})}a(K3t,"_coercedBigint");function J3t(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ur(e)})}a(J3t,"_int64");function X3t(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ur(e)})}a(X3t,"_uint64");function Z3t(t,e){return new t({type:"symbol",...ur(e)})}a(Z3t,"_symbol");function eLt(t,e){return new t({type:"undefined",...ur(e)})}a(eLt,"_undefined");function tLt(t,e){return new t({type:"null",...ur(e)})}a(tLt,"_null");function rLt(t){return new t({type:"any"})}a(rLt,"_any");function kie(t){return new t({type:"unknown"})}a(kie,"_unknown");function nLt(t,e){return new t({type:"never",...ur(e)})}a(nLt,"_never");function iLt(t,e){return new t({type:"void",...ur(e)})}a(iLt,"_void");function oLt(t,e){return new t({type:"date",...ur(e)})}a(oLt,"_date");function sLt(t,e){return new t({type:"date",coerce:!0,...ur(e)})}a(sLt,"_coercedDate");function aLt(t,e){return new t({type:"nan",...ur(e)})}a(aLt,"_nan");function D4(t,e){return new bHe({check:"less_than",...ur(e),value:t,inclusive:!1})}a(D4,"_lt");function jT(t,e){return new bHe({check:"less_than",...ur(e),value:t,inclusive:!0})}a(jT,"_lte");function N4(t,e){return new THe({check:"greater_than",...ur(e),value:t,inclusive:!1})}a(N4,"_gt");function d_(t,e){return new THe({check:"greater_than",...ur(e),value:t,inclusive:!0})}a(d_,"_gte");function cLt(t){return N4(0,t)}a(cLt,"_positive");function lLt(t){return D4(0,t)}a(lLt,"_negative");function uLt(t){return jT(0,t)}a(uLt,"_nonpositive");function dLt(t){return d_(0,t)}a(dLt,"_nonnegative");function P$(t,e){return new SOt({check:"multiple_of",...ur(e),value:t})}a(P$,"_multipleOf");function Die(t,e){return new wOt({check:"max_size",...ur(e),maximum:t})}a(Die,"_maxSize");function k$(t,e){return new ROt({check:"min_size",...ur(e),minimum:t})}a(k$,"_minSize");function $_e(t,e){return new POt({check:"size_equals",...ur(e),size:t})}a($_e,"_size");function Nie(t,e){return new kOt({check:"max_length",...ur(e),maximum:t})}a(Nie,"_maxLength");function DF(t,e){return new DOt({check:"min_length",...ur(e),minimum:t})}a(DF,"_minLength");function Mie(t,e){return new NOt({check:"length_equals",...ur(e),length:t})}a(Mie,"_length");function V_e(t,e){return new MOt({check:"string_format",format:"regex",...ur(e),pattern:t})}a(V_e,"_regex");function W_e(t){return new OOt({check:"string_format",format:"lowercase",...ur(t)})}a(W_e,"_lowercase");function z_e(t){return new BOt({check:"string_format",format:"uppercase",...ur(t)})}a(z_e,"_uppercase");function Y_e(t,e){return new LOt({check:"string_format",format:"includes",...ur(e),includes:t})}a(Y_e,"_includes");function K_e(t,e){return new FOt({check:"string_format",format:"starts_with",...ur(e),prefix:t})}a(K_e,"_startsWith");function J_e(t,e){return new UOt({check:"string_format",format:"ends_with",...ur(e),suffix:t})}a(J_e,"_endsWith");function fLt(t,e,r){return new QOt({check:"property",property:t,schema:e,...ur(r)})}a(fLt,"_property");function X_e(t,e){return new qOt({check:"mime_type",mime:t,...ur(e)})}a(X_e,"_mime");function M4(t){return new GOt({check:"overwrite",tx:t})}a(M4,"_overwrite");function Z_e(t){return M4(e=>e.normalize(t))}a(Z_e,"_normalize");function eCe(){return M4(t=>t.trim())}a(eCe,"_trim");function tCe(){return M4(t=>t.toLowerCase())}a(tCe,"_toLowerCase");function rCe(){return M4(t=>t.toUpperCase())}a(rCe,"_toUpperCase");function nCe(t,e,r){return new t({type:"array",element:e,...ur(r)})}a(nCe,"_array");function h_o(t,e,r){return new t({type:"union",options:e,...ur(r)})}a(h_o,"_union");function m_o(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...ur(n)})}a(m_o,"_discriminatedUnion");function g_o(t,e,r){return new t({type:"intersection",left:e,right:r})}a(g_o,"_intersection");function pLt(t,e,r,n){let o=r instanceof Oi,s=o?n:r,c=o?r:null;return new t({type:"tuple",items:e,rest:c,...ur(s)})}a(pLt,"_tuple");function A_o(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...ur(n)})}a(A_o,"_record");function y_o(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...ur(n)})}a(y_o,"_map");function E_o(t,e,r){return new t({type:"set",valueType:e,...ur(r)})}a(E_o,"_set");function __o(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new t({type:"enum",entries:n,...ur(r)})}a(__o,"_enum");function C_o(t,e,r){return new t({type:"enum",entries:e,...ur(r)})}a(C_o,"_nativeEnum");function v_o(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...ur(r)})}a(v_o,"_literal");function hLt(t,e){return new t({type:"file",...ur(e)})}a(hLt,"_file");function b_o(t,e){return new t({type:"transform",transform:e})}a(b_o,"_transform");function T_o(t,e){return new t({type:"optional",innerType:e})}a(T_o,"_optional");function S_o(t,e){return new t({type:"nullable",innerType:e})}a(S_o,"_nullable");function I_o(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}a(I_o,"_default");function x_o(t,e,r){return new t({type:"nonoptional",innerType:e,...ur(r)})}a(x_o,"_nonoptional");function w_o(t,e){return new t({type:"success",innerType:e})}a(w_o,"_success");function R_o(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}a(R_o,"_catch");function P_o(t,e,r){return new t({type:"pipe",in:e,out:r})}a(P_o,"_pipe");function k_o(t,e){return new t({type:"readonly",innerType:e})}a(k_o,"_readonly");function D_o(t,e,r){return new t({type:"template_literal",parts:e,...ur(r)})}a(D_o,"_templateLiteral");function N_o(t,e){return new t({type:"lazy",getter:e})}a(N_o,"_lazy");function M_o(t,e){return new t({type:"promise",innerType:e})}a(M_o,"_promise");function mLt(t,e,r){let n=ur(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}a(mLt,"_custom");function gLt(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ur(r)})}a(gLt,"_refine");function ALt(t,e){let r=ur(e),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(A=>typeof A=="string"?A.toLowerCase():A),o=o.map(A=>typeof A=="string"?A.toLowerCase():A));let s=new Set(n),c=new Set(o),l=t.Pipe??q_e,u=t.Boolean??F_e,d=t.String??w$,p=t.Transform??Q_e,h=new p({type:"transform",transform:a((A,y)=>{let E=A;return r.case!=="sensitive"&&(E=E.toLowerCase()),s.has(E)?!0:c.has(E)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...c],input:y.value,inst:h}),{})},"transform"),error:r.error}),m=new l({type:"pipe",in:new d({type:"string",error:r.error}),out:h,error:r.error});return new l({type:"pipe",in:m,out:new u({type:"boolean",error:r.error}),error:r.error})}a(ALt,"_stringbool");function yLt(t,e,r,n={}){let o=ur(n),s={...ur(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:l=>r.test(l),...o};return r instanceof RegExp&&(s.pattern=r),new t(s)}a(yLt,"_stringFormat");var XHe=class{static{a(this,"$ZodFunction")}constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=a(((...n)=>{let o=this._def.input?M_e(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(o))throw new Error("Invalid arguments schema: not an array or tuple schema.");let s=e(...o);return this._def.output?M_e(this._def.output,s,void 0,{callee:r}):s}),"impl");return r}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let r=a((async(...n)=>{let o=this._def.input?await O_e(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(o))throw new Error("Invalid arguments schema: not an array or tuple schema.");let s=await e(...o);return this._def.output?O_e(this._def.output,s,void 0,{callee:r}):s}),"impl");return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new R$({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){let r=this.constructor;return new r({type:"function",input:this._def.input,output:e})}};function ELt(t){return new XHe({type:"function",input:Array.isArray(t?.input)?pLt(R$,t?.input):t?.input??nCe(U_e,kie(Rie)),output:t?.output??kie(Rie)})}a(ELt,"_function");f();var iCe=class{static{a(this,"JSONSchemaGenerator")}constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Uk,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,s={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},c=this.seen.get(e);if(c)return c.count++,r.schemaPath.includes(e)&&(c.cycle=r.path),c.schema;let l={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,l);let u=e._zod.toJSONSchema?.();if(u)l.schema=u;else{let h={...r,schemaPath:[...r.schemaPath,e],path:r.path},m=e._zod.parent;if(m)l.ref=m,this.process(m,h),this.seen.get(m).isParent=!0;else{let g=l.schema;switch(o.type){case"string":{let A=g;A.type="string";let{minimum:y,maximum:E,format:_,patterns:v,contentEncoding:b}=e._zod.bag;if(typeof y=="number"&&(A.minLength=y),typeof E=="number"&&(A.maxLength=E),_&&(A.format=s[_]??_,A.format===""&&delete A.format),b&&(A.contentEncoding=b),v&&v.size>0){let I=[...v];I.length===1?A.pattern=I[0].source:I.length>1&&(l.schema.allOf=[...I.map(x=>({...this.target==="draft-7"?{type:"string"}:{},pattern:x.source}))])}break}case"number":{let A=g,{minimum:y,maximum:E,format:_,multipleOf:v,exclusiveMaximum:b,exclusiveMinimum:I}=e._zod.bag;typeof _=="string"&&_.includes("int")?A.type="integer":A.type="number",typeof I=="number"&&(A.exclusiveMinimum=I),typeof y=="number"&&(A.minimum=y,typeof I=="number"&&(I>=y?delete A.minimum:delete A.exclusiveMinimum)),typeof b=="number"&&(A.exclusiveMaximum=b),typeof E=="number"&&(A.maximum=E,typeof b=="number"&&(b<=E?delete A.maximum:delete A.exclusiveMaximum)),typeof v=="number"&&(A.multipleOf=v);break}case"boolean":{let A=g;A.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{g.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{g.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let A=g,{minimum:y,maximum:E}=e._zod.bag;typeof y=="number"&&(A.minItems=y),typeof E=="number"&&(A.maxItems=E),A.type="array",A.items=this.process(o.element,{...h,path:[...h.path,"items"]});break}case"object":{let A=g;A.type="object",A.properties={};let y=o.shape;for(let v in y)A.properties[v]=this.process(y[v],{...h,path:[...h.path,"properties",v]});let E=new Set(Object.keys(y)),_=new Set([...E].filter(v=>{let b=o.shape[v]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));_.size>0&&(A.required=Array.from(_)),o.catchall?._zod.def.type==="never"?A.additionalProperties=!1:o.catchall?o.catchall&&(A.additionalProperties=this.process(o.catchall,{...h,path:[...h.path,"additionalProperties"]})):this.io==="output"&&(A.additionalProperties=!1);break}case"union":{let A=g;A.anyOf=o.options.map((y,E)=>this.process(y,{...h,path:[...h.path,"anyOf",E]}));break}case"intersection":{let A=g,y=this.process(o.left,{...h,path:[...h.path,"allOf",0]}),E=this.process(o.right,{...h,path:[...h.path,"allOf",1]}),_=a(b=>"allOf"in b&&Object.keys(b).length===1,"isSimpleIntersection"),v=[..._(y)?y.allOf:[y],..._(E)?E.allOf:[E]];A.allOf=v;break}case"tuple":{let A=g;A.type="array";let y=o.items.map((v,b)=>this.process(v,{...h,path:[...h.path,"prefixItems",b]}));if(this.target==="draft-2020-12"?A.prefixItems=y:A.items=y,o.rest){let v=this.process(o.rest,{...h,path:[...h.path,"items"]});this.target==="draft-2020-12"?A.items=v:A.additionalItems=v}o.rest&&(A.items=this.process(o.rest,{...h,path:[...h.path,"items"]}));let{minimum:E,maximum:_}=e._zod.bag;typeof E=="number"&&(A.minItems=E),typeof _=="number"&&(A.maxItems=_);break}case"record":{let A=g;A.type="object",A.propertyNames=this.process(o.keyType,{...h,path:[...h.path,"propertyNames"]}),A.additionalProperties=this.process(o.valueType,{...h,path:[...h.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let A=g,y=S_e(o.entries);y.every(E=>typeof E=="number")&&(A.type="number"),y.every(E=>typeof E=="string")&&(A.type="string"),A.enum=y;break}case"literal":{let A=g,y=[];for(let E of o.values)if(E===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof E=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");y.push(Number(E))}else y.push(E);if(y.length!==0)if(y.length===1){let E=y[0];A.type=E===null?"null":typeof E,A.const=E}else y.every(E=>typeof E=="number")&&(A.type="number"),y.every(E=>typeof E=="string")&&(A.type="string"),y.every(E=>typeof E=="boolean")&&(A.type="string"),y.every(E=>E===null)&&(A.type="null"),A.enum=y;break}case"file":{let A=g,y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:E,maximum:_,mime:v}=e._zod.bag;E!==void 0&&(y.minLength=E),_!==void 0&&(y.maxLength=_),v?v.length===1?(y.contentMediaType=v[0],Object.assign(A,y)):A.anyOf=v.map(b=>({...y,contentMediaType:b})):Object.assign(A,y);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let A=this.process(o.innerType,h);g.anyOf=[A,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,h),l.ref=o.innerType;break}case"success":{let A=g;A.type="boolean";break}case"default":{this.process(o.innerType,h),l.ref=o.innerType,g.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,h),l.ref=o.innerType,this.io==="input"&&(g._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,h),l.ref=o.innerType;let A;try{A=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}g.default=A;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let A=g,y=e._zod.pattern;if(!y)throw new Error("Pattern not found in template literal");A.type="string",A.pattern=y.source;break}case"pipe":{let A=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(A,h),l.ref=A;break}case"readonly":{this.process(o.innerType,h),l.ref=o.innerType,g.readOnly=!0;break}case"promise":{this.process(o.innerType,h),l.ref=o.innerType;break}case"optional":{this.process(o.innerType,h),l.ref=o.innerType;break}case"lazy":{let A=e._zod.innerType;this.process(A,h),l.ref=A;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let d=this.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),this.io==="input"&&Ap(e)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((n=l.schema).default??(n.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(e).schema}emit(e,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let s=a(p=>{let h=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let y=n.external.registry.get(p[0])?.id,E=n.external.uri??(v=>v);if(y)return{ref:E(y)};let _=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=_,{defId:_,ref:`${E("__shared")}#/${h}/${_}`}}if(p[1]===o)return{ref:"#"};let g=`#/${h}/`,A=p[1].schema.id??`__schema${this.counter++}`;return{defId:A,ref:g+A}},"makeURI"),c=a(p=>{if(p[1].schema.$ref)return;let h=p[1],{ref:m,defId:g}=s(p);h.def={...h.schema},g&&(h.defId=g);let A=h.schema;for(let y in A)delete A[y];A.$ref=m},"extractToDef");if(n.cycles==="throw")for(let p of this.seen.entries()){let h=p[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let h=p[1];if(e===p[0]){c(p);continue}if(n.external){let g=n.external.registry.get(p[0])?.id;if(e!==p[0]&&g){c(p);continue}}if(this.metadataRegistry.get(p[0])?.id){c(p);continue}if(h.cycle){c(p);continue}if(h.count>1&&n.reused==="ref"){c(p);continue}}let l=a((p,h)=>{let m=this.seen.get(p),g=m.def??m.schema,A={...g};if(m.ref===null)return;let y=m.ref;if(m.ref=null,y){l(y,h);let E=this.seen.get(y).schema;E.$ref&&h.target==="draft-7"?(g.allOf=g.allOf??[],g.allOf.push(E)):(Object.assign(g,E),Object.assign(g,A))}m.isParent||this.override({zodSchema:p,jsonSchema:g,path:m.path??[]})},"flattenRef");for(let p of[...this.seen.entries()].reverse())l(p[0],{target:this.target});let u={};if(this.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?u.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){let p=n.external.registry.get(e)?.id;if(!p)throw new Error("Schema is missing an `id` property");u.$id=n.external.uri(p)}Object.assign(u,o.def);let d=n.external?.defs??{};for(let p of this.seen.entries()){let h=p[1];h.def&&h.defId&&(d[h.defId]=h.def)}n.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?u.$defs=d:u.definitions=d);try{return JSON.parse(JSON.stringify(u))}catch{throw new Error("Error converting schema to JSON.")}}};function eLt(t,e){if(t instanceof goe){let n=new a1e(e),o={};for(let l of t._idmap.entries()){let[u,d]=l;n.process(d)}let s={},c={registry:t,uri:e?.uri,defs:o};for(let l of t._idmap.entries()){let[u,d]=l;s[u]=n.emit(d,{...e,external:c})}if(Object.keys(o).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let r=new a1e(e);return r.process(t),r.emit(t,e)}a(eLt,"toJSONSchema");function bp(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return bp(o.element,r);case"object":{for(let s in o.shape)if(bp(o.shape[s],r))return!0;return!1}case"union":{for(let s of o.options)if(bp(s,r))return!0;return!1}case"intersection":return bp(o.left,r)||bp(o.right,r);case"tuple":{for(let s of o.items)if(bp(s,r))return!0;return!!(o.rest&&bp(o.rest,r))}case"record":return bp(o.keyType,r)||bp(o.valueType,r);case"map":return bp(o.keyType,r)||bp(o.valueType,r);case"set":return bp(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return bp(o.innerType,r);case"lazy":return bp(o.getter(),r);case"default":return bp(o.innerType,r);case"prefault":return bp(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return bp(o.in,r)||bp(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}a(bp,"isTransforming");var Orn={};f();f();f();var _oe={};Ri(_oe,{ZodISODate:()=>Vje,ZodISODateTime:()=>$je,ZodISODuration:()=>zje,ZodISOTime:()=>Wje,date:()=>rLt,datetime:()=>tLt,duration:()=>iLt,time:()=>nLt});f();var $je=Xe("ZodISODateTime",(t,e)=>{B4t.init(t,e),hl.init(t,e)});function tLt(t){return g3t($je,t)}a(tLt,"datetime");var Vje=Xe("ZodISODate",(t,e)=>{L4t.init(t,e),hl.init(t,e)});function rLt(t){return A3t(Vje,t)}a(rLt,"date");var Wje=Xe("ZodISOTime",(t,e)=>{F4t.init(t,e),hl.init(t,e)});function nLt(t){return y3t(Wje,t)}a(nLt,"time");var zje=Xe("ZodISODuration",(t,e)=>{U4t.init(t,e),hl.init(t,e)});function iLt(t){return E3t(zje,t)}a(iLt,"duration");f();f();var Lrn=a((t,e)=>{M_e.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:a(r=>B_e(t,r),"value")},flatten:{value:a(r=>O_e(t,r),"value")},addIssue:{value:a(r=>t.issues.push(r),"value")},addIssues:{value:a(r=>t.issues.push(...r),"value")},isEmpty:{get(){return t.issues.length===0}}})},"initializer"),Oyo=Xe("ZodError",Lrn),voe=Xe("ZodError",Lrn,{Parent:Error});var oLt=uje(voe),sLt=dje(voe),aLt=fje(voe),cLt=pje(voe);var Wo=Xe("ZodType",(t,e)=>(Li.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>pv(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>oLt(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>aLt(t,r,n),t.parseAsync=async(r,n)=>sLt(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>cLt(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(Ann(r,n)),t.superRefine=r=>t.check(ynn(r)),t.overwrite=r=>t.check(XO(r)),t.optional=()=>eu(t),t.nullable=()=>Kje(t),t.nullish=()=>eu(Kje(t)),t.nonoptional=r=>onn(t,r),t.array=()=>br(t),t.or=r=>oc([t,r]),t.and=r=>h1e(t,r),t.transform=r=>Jje(t,MLt(r)),t.default=r=>rnn(t,r),t.prefault=r=>inn(t,r),t.catch=r=>cnn(t,r),t.pipe=r=>Jje(t,r),t.readonly=()=>dnn(t),t.describe=r=>{let n=t.clone();return Jk.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Jk.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Jk.get(t);let n=t.clone();return Jk.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),uLt=Xe("_ZodString",(t,e)=>{_V.init(t,e),Wo.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(Y_e(...n)),t.includes=(...n)=>t.check(X_e(...n)),t.startsWith=(...n)=>t.check(Z_e(...n)),t.endsWith=(...n)=>t.check(e1e(...n)),t.min=(...n)=>t.check(o9(...n)),t.max=(...n)=>t.check(Eoe(...n)),t.length=(...n)=>t.check(Coe(...n)),t.nonempty=(...n)=>t.check(o9(1,...n)),t.lowercase=n=>t.check(K_e(n)),t.uppercase=n=>t.check(J_e(n)),t.trim=()=>t.check(n1e()),t.normalize=(...n)=>t.check(r1e(...n)),t.toLowerCase=()=>t.check(i1e()),t.toUpperCase=()=>t.check(o1e())}),l1e=Xe("ZodString",(t,e)=>{_V.init(t,e),uLt.init(t,e),t.email=r=>t.check(bje(dLt,r)),t.url=r=>t.check(wje(fLt,r)),t.jwt=r=>t.check(Hje(wLt,r)),t.emoji=r=>t.check(Rje(hLt,r)),t.guid=r=>t.check(W_e(Yje,r)),t.uuid=r=>t.check(Tje(e4,r)),t.uuidv4=r=>t.check(Sje(e4,r)),t.uuidv6=r=>t.check(Ije(e4,r)),t.uuidv7=r=>t.check(xje(e4,r)),t.nanoid=r=>t.check(Pje(mLt,r)),t.guid=r=>t.check(W_e(Yje,r)),t.cuid=r=>t.check(kje(gLt,r)),t.cuid2=r=>t.check(Nje(ALt,r)),t.ulid=r=>t.check(Dje(yLt,r)),t.base64=r=>t.check(Qje(SLt,r)),t.base64url=r=>t.check(qje(ILt,r)),t.xid=r=>t.check(Mje(ELt,r)),t.ksuid=r=>t.check(Oje(CLt,r)),t.ipv4=r=>t.check(Bje(_Lt,r)),t.ipv6=r=>t.check(Lje(vLt,r)),t.cidrv4=r=>t.check(Fje(bLt,r)),t.cidrv6=r=>t.check(Uje(TLt,r)),t.e164=r=>t.check(Gje(xLt,r)),t.datetime=r=>t.check(tLt(r)),t.date=r=>t.check(rLt(r)),t.time=r=>t.check(nLt(r)),t.duration=r=>t.check(iLt(r))});function Me(t){return p3t(l1e,t)}a(Me,"string");var hl=Xe("ZodStringFormat",(t,e)=>{zc.init(t,e),uLt.init(t,e)}),dLt=Xe("ZodEmail",(t,e)=>{x4t.init(t,e),hl.init(t,e)});function Lyo(t){return bje(dLt,t)}a(Lyo,"email");var Yje=Xe("ZodGUID",(t,e)=>{S4t.init(t,e),hl.init(t,e)});function Fyo(t){return W_e(Yje,t)}a(Fyo,"guid");var e4=Xe("ZodUUID",(t,e)=>{I4t.init(t,e),hl.init(t,e)});function Uyo(t){return Tje(e4,t)}a(Uyo,"uuid");function Qyo(t){return Sje(e4,t)}a(Qyo,"uuidv4");function qyo(t){return Ije(e4,t)}a(qyo,"uuidv6");function Gyo(t){return xje(e4,t)}a(Gyo,"uuidv7");var fLt=Xe("ZodURL",(t,e)=>{w4t.init(t,e),hl.init(t,e)});function pLt(t){return wje(fLt,t)}a(pLt,"url");var hLt=Xe("ZodEmoji",(t,e)=>{R4t.init(t,e),hl.init(t,e)});function Hyo(t){return Rje(hLt,t)}a(Hyo,"emoji");var mLt=Xe("ZodNanoID",(t,e)=>{P4t.init(t,e),hl.init(t,e)});function jyo(t){return Pje(mLt,t)}a(jyo,"nanoid");var gLt=Xe("ZodCUID",(t,e)=>{k4t.init(t,e),hl.init(t,e)});function $yo(t){return kje(gLt,t)}a($yo,"cuid");var ALt=Xe("ZodCUID2",(t,e)=>{N4t.init(t,e),hl.init(t,e)});function Vyo(t){return Nje(ALt,t)}a(Vyo,"cuid2");var yLt=Xe("ZodULID",(t,e)=>{D4t.init(t,e),hl.init(t,e)});function Wyo(t){return Dje(yLt,t)}a(Wyo,"ulid");var ELt=Xe("ZodXID",(t,e)=>{M4t.init(t,e),hl.init(t,e)});function zyo(t){return Mje(ELt,t)}a(zyo,"xid");var CLt=Xe("ZodKSUID",(t,e)=>{O4t.init(t,e),hl.init(t,e)});function Yyo(t){return Oje(CLt,t)}a(Yyo,"ksuid");var _Lt=Xe("ZodIPv4",(t,e)=>{Q4t.init(t,e),hl.init(t,e)});function Kyo(t){return Bje(_Lt,t)}a(Kyo,"ipv4");var vLt=Xe("ZodIPv6",(t,e)=>{q4t.init(t,e),hl.init(t,e)});function Jyo(t){return Lje(vLt,t)}a(Jyo,"ipv6");var bLt=Xe("ZodCIDRv4",(t,e)=>{G4t.init(t,e),hl.init(t,e)});function Xyo(t){return Fje(bLt,t)}a(Xyo,"cidrv4");var TLt=Xe("ZodCIDRv6",(t,e)=>{H4t.init(t,e),hl.init(t,e)});function Zyo(t){return Uje(TLt,t)}a(Zyo,"cidrv6");var SLt=Xe("ZodBase64",(t,e)=>{$4t.init(t,e),hl.init(t,e)});function eEo(t){return Qje(SLt,t)}a(eEo,"base64");var ILt=Xe("ZodBase64URL",(t,e)=>{V4t.init(t,e),hl.init(t,e)});function tEo(t){return qje(ILt,t)}a(tEo,"base64url");var xLt=Xe("ZodE164",(t,e)=>{W4t.init(t,e),hl.init(t,e)});function rEo(t){return Gje(xLt,t)}a(rEo,"e164");var wLt=Xe("ZodJWT",(t,e)=>{z4t.init(t,e),hl.init(t,e)});function nEo(t){return Hje(wLt,t)}a(nEo,"jwt");var Frn=Xe("ZodCustomStringFormat",(t,e)=>{Y4t.init(t,e),hl.init(t,e)});function iEo(t,e,r={}){return X3t(Frn,t,e,r)}a(iEo,"stringFormat");var u1e=Xe("ZodNumber",(t,e)=>{Eje.init(t,e),Wo.init(t,e),t.gt=(n,o)=>t.check(JO(n,o)),t.gte=(n,o)=>t.check(bC(n,o)),t.min=(n,o)=>t.check(bC(n,o)),t.lt=(n,o)=>t.check(KO(n,o)),t.lte=(n,o)=>t.check(rS(n,o)),t.max=(n,o)=>t.check(rS(n,o)),t.int=n=>t.check(lLt(n)),t.safe=n=>t.check(lLt(n)),t.positive=n=>t.check(JO(0,n)),t.nonnegative=n=>t.check(bC(0,n)),t.negative=n=>t.check(KO(0,n)),t.nonpositive=n=>t.check(rS(0,n)),t.multipleOf=(n,o)=>t.check(bV(n,o)),t.step=(n,o)=>t.check(bV(n,o)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function na(t){return C3t(u1e,t)}a(na,"number");var boe=Xe("ZodNumberFormat",(t,e)=>{K4t.init(t,e),u1e.init(t,e)});function lLt(t){return v3t(boe,t)}a(lLt,"int");function oEo(t){return b3t(boe,t)}a(oEo,"float32");function sEo(t){return T3t(boe,t)}a(sEo,"float64");function aEo(t){return S3t(boe,t)}a(aEo,"int32");function cEo(t){return I3t(boe,t)}a(cEo,"uint32");var d1e=Xe("ZodBoolean",(t,e)=>{q_e.init(t,e),Wo.init(t,e)});function ic(t){return x3t(d1e,t)}a(ic,"boolean");var f1e=Xe("ZodBigInt",(t,e)=>{Cje.init(t,e),Wo.init(t,e),t.gte=(n,o)=>t.check(bC(n,o)),t.min=(n,o)=>t.check(bC(n,o)),t.gt=(n,o)=>t.check(JO(n,o)),t.gte=(n,o)=>t.check(bC(n,o)),t.min=(n,o)=>t.check(bC(n,o)),t.lt=(n,o)=>t.check(KO(n,o)),t.lte=(n,o)=>t.check(rS(n,o)),t.max=(n,o)=>t.check(rS(n,o)),t.positive=n=>t.check(JO(BigInt(0),n)),t.negative=n=>t.check(KO(BigInt(0),n)),t.nonpositive=n=>t.check(rS(BigInt(0),n)),t.nonnegative=n=>t.check(bC(BigInt(0),n)),t.multipleOf=(n,o)=>t.check(bV(n,o));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function lEo(t){return R3t(f1e,t)}a(lEo,"bigint");var RLt=Xe("ZodBigIntFormat",(t,e)=>{J4t.init(t,e),f1e.init(t,e)});function uEo(t){return k3t(RLt,t)}a(uEo,"int64");function dEo(t){return N3t(RLt,t)}a(dEo,"uint64");var Urn=Xe("ZodSymbol",(t,e)=>{X4t.init(t,e),Wo.init(t,e)});function fEo(t){return D3t(Urn,t)}a(fEo,"symbol");var Qrn=Xe("ZodUndefined",(t,e)=>{Z4t.init(t,e),Wo.init(t,e)});function pEo(t){return M3t(Qrn,t)}a(pEo,"_undefined");var qrn=Xe("ZodNull",(t,e)=>{eBt.init(t,e),Wo.init(t,e)});function p1e(t){return O3t(qrn,t)}a(p1e,"_null");var Grn=Xe("ZodAny",(t,e)=>{tBt.init(t,e),Wo.init(t,e)});function PLt(){return B3t(Grn)}a(PLt,"any");var Hrn=Xe("ZodUnknown",(t,e)=>{moe.init(t,e),Wo.init(t,e)});function Zl(){return Aoe(Hrn)}a(Zl,"unknown");var jrn=Xe("ZodNever",(t,e)=>{rBt.init(t,e),Wo.init(t,e)});function Xje(t){return L3t(jrn,t)}a(Xje,"never");var $rn=Xe("ZodVoid",(t,e)=>{nBt.init(t,e),Wo.init(t,e)});function hEo(t){return F3t($rn,t)}a(hEo,"_void");var Zje=Xe("ZodDate",(t,e)=>{iBt.init(t,e),Wo.init(t,e),t.min=(n,o)=>t.check(bC(n,o)),t.max=(n,o)=>t.check(rS(n,o));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function mEo(t){return U3t(Zje,t)}a(mEo,"date");var Vrn=Xe("ZodArray",(t,e)=>{G_e.init(t,e),Wo.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(o9(r,n)),t.nonempty=r=>t.check(o9(1,r)),t.max=(r,n)=>t.check(Eoe(r,n)),t.length=(r,n)=>t.check(Coe(r,n)),t.unwrap=()=>t.element});function br(t,e){return s1e(Vrn,t,e)}a(br,"array");function gEo(t){let e=t._zod.def.shape;return vn(Object.keys(e))}a(gEo,"keyof");var e$e=Xe("ZodObject",(t,e)=>{oBt.init(t,e),Wo.init(t,e),Sr.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Cy(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Zl()}),t.loose=()=>t.clone({...t._zod.def,catchall:Zl()}),t.strict=()=>t.clone({...t._zod.def,catchall:Xje()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Sr.extend(t,r),t.merge=r=>Sr.merge(t,r),t.pick=r=>Sr.pick(t,r),t.omit=r=>Sr.omit(t,r),t.partial=(...r)=>Sr.partial(OLt,t,r[0]),t.required=(...r)=>Sr.required(BLt,t,r[0])});function kr(t,e){let r={type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},...Sr.normalizeParams(e)};return new e$e(r)}a(kr,"object");function AEo(t,e){return new e$e({type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},catchall:Xje(),...Sr.normalizeParams(e)})}a(AEo,"strictObject");function S0(t,e){return new e$e({type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},catchall:Zl(),...Sr.normalizeParams(e)})}a(S0,"looseObject");var kLt=Xe("ZodUnion",(t,e)=>{_je.init(t,e),Wo.init(t,e),t.options=e.options});function oc(t,e){return new kLt({type:"union",options:t,...Sr.normalizeParams(e)})}a(oc,"union");var Wrn=Xe("ZodDiscriminatedUnion",(t,e)=>{kLt.init(t,e),sBt.init(t,e)});function t$e(t,e,r){return new Wrn({type:"union",options:e,discriminator:t,...Sr.normalizeParams(r)})}a(t$e,"discriminatedUnion");var zrn=Xe("ZodIntersection",(t,e)=>{aBt.init(t,e),Wo.init(t,e)});function h1e(t,e){return new zrn({type:"intersection",left:t,right:e})}a(h1e,"intersection");var Yrn=Xe("ZodTuple",(t,e)=>{vV.init(t,e),Wo.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function yEo(t,e,r){let n=e instanceof Li,o=n?r:e,s=n?e:null;return new Yrn({type:"tuple",items:t,rest:s,...Sr.normalizeParams(o)})}a(yEo,"tuple");var NLt=Xe("ZodRecord",(t,e)=>{cBt.init(t,e),Wo.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function ml(t,e,r){return new NLt({type:"record",keyType:t,valueType:e,...Sr.normalizeParams(r)})}a(ml,"record");function EEo(t,e,r){return new NLt({type:"record",keyType:oc([t,Xje()]),valueType:e,...Sr.normalizeParams(r)})}a(EEo,"partialRecord");var Krn=Xe("ZodMap",(t,e)=>{lBt.init(t,e),Wo.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function CEo(t,e,r){return new Krn({type:"map",keyType:t,valueType:e,...Sr.normalizeParams(r)})}a(CEo,"map");var Jrn=Xe("ZodSet",(t,e)=>{uBt.init(t,e),Wo.init(t,e),t.min=(...r)=>t.check(TV(...r)),t.nonempty=r=>t.check(TV(1,r)),t.max=(...r)=>t.check(yoe(...r)),t.size=(...r)=>t.check(z_e(...r))});function _Eo(t,e){return new Jrn({type:"set",valueType:t,...Sr.normalizeParams(e)})}a(_Eo,"set");var c1e=Xe("ZodEnum",(t,e)=>{dBt.init(t,e),Wo.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,o)=>{let s={};for(let c of n)if(r.has(c))s[c]=e.entries[c];else throw new Error(`Key ${c} not found in enum`);return new c1e({...e,checks:[],...Sr.normalizeParams(o),entries:s})},t.exclude=(n,o)=>{let s={...e.entries};for(let c of n)if(r.has(c))delete s[c];else throw new Error(`Key ${c} not found in enum`);return new c1e({...e,checks:[],...Sr.normalizeParams(o),entries:s})}});function Cy(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new c1e({type:"enum",entries:r,...Sr.normalizeParams(e)})}a(Cy,"_enum");function vEo(t,e){return new c1e({type:"enum",entries:t,...Sr.normalizeParams(e)})}a(vEo,"nativeEnum");var Xrn=Xe("ZodLiteral",(t,e)=>{fBt.init(t,e),Wo.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function vn(t,e){return new Xrn({type:"literal",values:Array.isArray(t)?t:[t],...Sr.normalizeParams(e)})}a(vn,"literal");var Zrn=Xe("ZodFile",(t,e)=>{pBt.init(t,e),Wo.init(t,e),t.min=(r,n)=>t.check(TV(r,n)),t.max=(r,n)=>t.check(yoe(r,n)),t.mime=(r,n)=>t.check(t1e(Array.isArray(r)?r:[r],n))});function bEo(t){return z3t(Zrn,t)}a(bEo,"file");var DLt=Xe("ZodTransform",(t,e)=>{H_e.init(t,e),Wo.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=s=>{if(typeof s=="string")r.issues.push(Sr.issue(s,r.value,e));else{let c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=t),c.continue??(c.continue=!0),r.issues.push(Sr.issue(c))}};let o=e.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function MLt(t){return new DLt({type:"transform",transform:t})}a(MLt,"transform");var OLt=Xe("ZodOptional",(t,e)=>{hBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function eu(t){return new OLt({type:"optional",innerType:t})}a(eu,"optional");var enn=Xe("ZodNullable",(t,e)=>{mBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Kje(t){return new enn({type:"nullable",innerType:t})}a(Kje,"nullable");function TEo(t){return eu(Kje(t))}a(TEo,"nullish");var tnn=Xe("ZodDefault",(t,e)=>{gBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function rnn(t,e){return new tnn({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}a(rnn,"_default");var nnn=Xe("ZodPrefault",(t,e)=>{ABt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function inn(t,e){return new nnn({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}a(inn,"prefault");var BLt=Xe("ZodNonOptional",(t,e)=>{yBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function onn(t,e){return new BLt({type:"nonoptional",innerType:t,...Sr.normalizeParams(e)})}a(onn,"nonoptional");var snn=Xe("ZodSuccess",(t,e)=>{EBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function SEo(t){return new snn({type:"success",innerType:t})}a(SEo,"success");var ann=Xe("ZodCatch",(t,e)=>{CBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function cnn(t,e){return new ann({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}a(cnn,"_catch");var lnn=Xe("ZodNaN",(t,e)=>{_Bt.init(t,e),Wo.init(t,e)});function IEo(t){return q3t(lnn,t)}a(IEo,"nan");var LLt=Xe("ZodPipe",(t,e)=>{j_e.init(t,e),Wo.init(t,e),t.in=e.in,t.out=e.out});function Jje(t,e){return new LLt({type:"pipe",in:t,out:e})}a(Jje,"pipe");var unn=Xe("ZodReadonly",(t,e)=>{vBt.init(t,e),Wo.init(t,e)});function dnn(t){return new unn({type:"readonly",innerType:t})}a(dnn,"readonly");var fnn=Xe("ZodTemplateLiteral",(t,e)=>{bBt.init(t,e),Wo.init(t,e)});function xEo(t,e){return new fnn({type:"template_literal",parts:t,...Sr.normalizeParams(e)})}a(xEo,"templateLiteral");var pnn=Xe("ZodLazy",(t,e)=>{SBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.getter()});function hnn(t){return new pnn({type:"lazy",getter:t})}a(hnn,"lazy");var mnn=Xe("ZodPromise",(t,e)=>{TBt.init(t,e),Wo.init(t,e),t.unwrap=()=>t._zod.def.innerType});function wEo(t){return new mnn({type:"promise",innerType:t})}a(wEo,"promise");var r$e=Xe("ZodCustom",(t,e)=>{IBt.init(t,e),Wo.init(t,e)});function gnn(t){let e=new sd({check:"custom"});return e._zod.check=t,e}a(gnn,"check");function FLt(t,e){return Y3t(r$e,t??(()=>!0),e)}a(FLt,"custom");function Ann(t,e={}){return K3t(r$e,t,e)}a(Ann,"refine");function ynn(t){let e=gnn(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Sr.issue(n,r.value,e._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),r.issues.push(Sr.issue(o))}},t(r.value,r)));return e}a(ynn,"superRefine");function REo(t,e={error:`Input not instance of ${t.name}`}){let r=new r$e({type:"custom",check:"custom",fn:a(n=>n instanceof t,"fn"),abort:!0,...Sr.normalizeParams(e)});return r._zod.bag.Class=t,r}a(REo,"_instanceof");var PEo=a((...t)=>J3t({Pipe:LLt,Boolean:d1e,String:l1e,Transform:DLt},...t),"stringbool");function kEo(t){let e=hnn(()=>oc([Me(t),na(),ic(),p1e(),br(e),ml(Me(),e)]));return e}a(kEo,"json");function n$e(t,e){return Jje(MLt(t),e)}a(n$e,"preprocess");f();var ULt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function NEo(t){T0({customError:t})}a(NEo,"setErrorMap");function DEo(){return T0().customError}a(DEo,"getErrorMap");var m1e={};Ri(m1e,{bigint:()=>LEo,boolean:()=>BEo,date:()=>FEo,number:()=>OEo,string:()=>MEo});f();function MEo(t){return h3t(l1e,t)}a(MEo,"string");function OEo(t){return _3t(u1e,t)}a(OEo,"number");function BEo(t){return w3t(d1e,t)}a(BEo,"boolean");function LEo(t){return P3t(f1e,t)}a(LEo,"bigint");function FEo(t){return Q3t(Zje,t)}a(FEo,"date");T0($_e());var UEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminal:B.boolean().optional().default(!1)}),QEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),label:B.string().nullish(),name:B.string(),optional:B.boolean().optional().default(!1),secret:B.boolean().optional().default(!0)}),qEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:B.string(),name:B.string()}),GEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:B.string(),link:B.string().nullish(),name:B.string(),vars:B.array(QEo)}),HEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()).optional(),description:B.string().nullish(),env:B.record(B.string(),B.string()).optional(),id:B.string(),name:B.string()}),jEo=B.union([GEo.and(B.object({type:B.literal("env_var")})),HEo.and(B.object({type:B.literal("terminal")})),qEo]),qLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),methodId:B.string()}),$Eo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),VEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),blob:B.string(),mimeType:B.string().nullish(),uri:B.string()}),WEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),zEo=B.object({amount:B.number(),currency:B.string()}),YEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminalId:B.string()}),KEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),newText:B.string(),oldText:B.string().nullish(),path:B.string()}),Enn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),value:B.string()}),JEo=B.union([B.literal(-32700),B.literal(-32600),B.literal(-32601),B.literal(-32602),B.literal(-32603),B.literal(-32800),B.literal(-32e3),B.literal(-32002),B.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),Cnn=B.object({code:JEo,data:B.unknown().optional(),message:B.string()}),_nn=B.unknown(),vnn=B.unknown(),bnn=B.unknown(),XEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),readTextFile:B.boolean().optional().default(!1),writeTextFile:B.boolean().optional().default(!1)}),ZEo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),auth:UEo.optional().default({terminal:!1}),fs:XEo.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:B.boolean().optional().default(!1)}),Tnn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),value:B.string()}),Snn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),title:B.string().nullish(),version:B.string()}),eCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),GLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cursor:B.string().nullish(),cwd:B.string().nullish()}),tCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),http:B.boolean().optional().default(!1),sse:B.boolean().optional().default(!1)}),rCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),headers:B.array(Tnn),name:B.string(),url:B.string()}),nCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),headers:B.array(Tnn),name:B.string(),url:B.string()}),iCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()),command:B.string(),env:B.array(Enn),name:B.string()}),i$e=B.union([rCo.and(B.object({type:B.literal("http")})),nCo.and(B.object({type:B.literal("sse")})),iCo]),HLt=B.string(),oCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),modelId:HLt,name:B.string()}),jLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(i$e)}),Inn=B.string(),sCo=B.union([B.literal("allow_once"),B.literal("allow_always"),B.literal("reject_once"),B.literal("reject_always")]),aCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),kind:sCo,name:B.string(),optionId:Inn}),cCo=B.union([B.literal("high"),B.literal("medium"),B.literal("low")]),lCo=B.union([B.literal("pending"),B.literal("in_progress"),B.literal("completed")]),uCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string(),priority:cCo,status:lCo}),dCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),entries:B.array(uCo)}),fCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),audio:B.boolean().optional().default(!1),embeddedContext:B.boolean().optional().default(!1),image:B.boolean().optional().default(!1)}),xnn=B.number().int().gte(0).lte(65535),$Lt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),clientCapabilities:ZEo.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:Snn.nullish(),protocolVersion:xnn}),pCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string()}),hCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),SV=B.union([B.number(),B.string()]).nullable(),cPu=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),requestId:SV}),mCo=B.enum(["assistant","user"]),g1e=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),audience:B.array(mCo).nullish(),lastModified:B.string().nullish(),priority:B.number().nullish()}),gCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:g1e.nullish(),data:B.string(),mimeType:B.string()}),ACo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:g1e.nullish(),data:B.string(),mimeType:B.string(),uri:B.string().nullish()}),yCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:g1e.nullish(),description:B.string().nullish(),mimeType:B.string().nullish(),name:B.string(),size:B.number().nullish(),title:B.string().nullish(),uri:B.string()}),ECo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),optionId:Inn}),CCo=B.union([B.object({outcome:B.literal("cancelled")}),ECo.and(B.object({outcome:B.literal("selected")}))]),_Co=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),outcome:CCo}),vCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),bCo=B.object({currentValue:B.boolean()}),TCo=B.string(),wnn=B.string(),SCo=B.union([B.literal("mode"),B.literal("model"),B.literal("thought_level"),B.string()]),VLt=B.string(),Rnn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),name:B.string(),value:VLt}),ICo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),group:TCo,name:B.string(),options:B.array(Rnn)}),xCo=B.union([B.array(Rnn),B.array(ICo)]),wCo=B.object({currentValue:VLt,options:xCo}),Toe=B.intersection(B.union([wCo.and(B.object({type:B.literal("select")})),bCo.and(B.object({type:B.literal("boolean")}))]),B.object({_meta:B.record(B.string(),B.unknown()).nullish(),category:SCo.nullish(),description:B.string().nullish(),id:wnn,name:B.string()})),RCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe)}),PCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),xf=B.string(),WLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf}),lPu=B.object({method:B.string(),params:B.union([WLt,_nn]).nullish()}),zLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf}),YLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()).optional(),command:B.string(),cwd:B.string().nullish(),env:B.array(Enn).optional(),outputByteLimit:B.number().nullish(),sessionId:xf}),KLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(i$e).optional(),sessionId:xf}),JLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf,terminalId:B.string()}),XLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(i$e),sessionId:xf}),ZLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),limit:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:B.string(),sessionId:xf}),e8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf,terminalId:B.string()}),t8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(i$e).optional(),sessionId:xf}),kCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),sessionId:xf,title:B.string().nullish(),updatedAt:B.string().nullish()}),NCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),nextCursor:B.string().nullish(),sessions:B.array(kCo)}),DCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),title:B.string().nullish(),updatedAt:B.string().nullish()}),MCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),o$e=B.string(),OCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),currentModeId:o$e}),BCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:o$e,name:B.string()}),s$e=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableModes:B.array(BCo),currentModeId:o$e}),a$e=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableModels:B.array(oCo),currentModelId:HLt}),LCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe).nullish(),models:a$e.nullish(),modes:s$e.nullish(),sessionId:xf}),FCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe).nullish(),models:a$e.nullish(),modes:s$e.nullish()}),UCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe).nullish(),models:a$e.nullish(),modes:s$e.nullish(),sessionId:xf}),QCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe).nullish(),models:a$e.nullish(),modes:s$e.nullish()}),qCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),GCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),close:vCo.nullish(),fork:PCo.nullish(),list:MCo.nullish(),resume:qCo.nullish()}),HCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),loadSession:B.boolean().optional().default(!1),mcpCapabilities:tCo.optional().default({http:!1,sse:!1}),promptCapabilities:fCo.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:GCo.optional().default({})}),jCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),agentCapabilities:HCo.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:Snn.nullish(),authMethods:B.array(jEo).optional().default([]),protocolVersion:xnn}),r8t=B.intersection(B.union([B.object({type:B.literal("boolean"),value:B.boolean()}),B.object({value:VLt})]),B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configId:wnn,sessionId:xf})),$Co=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Toe)}),n8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),modeId:o$e,sessionId:xf}),VCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),i8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),modelId:HLt,sessionId:xf}),WCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),zCo=B.union([B.literal("end_turn"),B.literal("max_tokens"),B.literal("max_turn_requests"),B.literal("refusal"),B.literal("cancelled")]),YCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminalId:B.string()}),KCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitCode:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:B.string().nullish()}),o8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf,terminalId:B.string()}),JCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitStatus:KCo.nullish(),output:B.string(),truncated:B.boolean()}),XCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:g1e.nullish(),text:B.string()}),ZCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),mimeType:B.string().nullish(),text:B.string(),uri:B.string()}),e_o=B.union([ZCo,VEo]),t_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:g1e.nullish(),resource:e_o}),s8t=B.union([XCo.and(B.object({type:B.literal("text")})),ACo.and(B.object({type:B.literal("image")})),gCo.and(B.object({type:B.literal("audio")})),yCo.and(B.object({type:B.literal("resource_link")})),t_o.and(B.object({type:B.literal("resource")}))]),r_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:s8t}),QLt=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:s8t,messageId:B.string().nullish()}),a8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),messageId:B.string().nullish(),prompt:B.array(s8t),sessionId:xf}),uPu=B.object({id:SV,method:B.string(),params:B.union([$Lt,qLt,jLt,XLt,GLt,KLt,t8t,zLt,n8t,r8t,a8t,i8t,vnn]).nullish()}),Pnn=B.union([r_o.and(B.object({type:B.literal("content")})),KEo.and(B.object({type:B.literal("diff")})),YCo.and(B.object({type:B.literal("terminal")}))]),knn=B.string(),Nnn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),line:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:B.string()}),Dnn=B.union([B.literal("pending"),B.literal("in_progress"),B.literal("completed"),B.literal("failed")]),Mnn=B.union([B.literal("read"),B.literal("edit"),B.literal("delete"),B.literal("move"),B.literal("search"),B.literal("execute"),B.literal("think"),B.literal("fetch"),B.literal("switch_mode"),B.literal("other")]),n_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.array(Pnn).optional(),kind:Mnn.optional(),locations:B.array(Nnn).optional(),rawInput:B.unknown().optional(),rawOutput:B.unknown().optional(),status:Dnn.optional(),title:B.string(),toolCallId:knn}),Onn=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.array(Pnn).nullish(),kind:Mnn.nullish(),locations:B.array(Nnn).nullish(),rawInput:B.unknown().optional(),rawOutput:B.unknown().optional(),status:Dnn.nullish(),title:B.string().nullish(),toolCallId:knn}),c8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),options:B.array(aCo),sessionId:xf,toolCall:Onn}),i_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),hint:B.string()}),o_o=i_o,s_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string(),input:o_o.nullish(),name:B.string()}),a_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableCommands:B.array(s_o)}),c_o=B.object({cachedReadTokens:B.number().nullish(),cachedWriteTokens:B.number().nullish(),inputTokens:B.number(),outputTokens:B.number(),thoughtTokens:B.number().nullish(),totalTokens:B.number()}),l_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),stopReason:zCo,usage:c_o.nullish(),userMessageId:B.string().nullish()}),dPu=B.union([B.object({id:SV,result:B.union([jCo,$Eo,UCo,FCo,NCo,LCo,QCo,WEo,VCo,$Co,l_o,WCo,bnn])}),B.object({error:Cnn,id:SV})]),u_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cost:zEo.nullish(),size:B.number(),used:B.number()}),d_o=B.union([QLt.and(B.object({sessionUpdate:B.literal("user_message_chunk")})),QLt.and(B.object({sessionUpdate:B.literal("agent_message_chunk")})),QLt.and(B.object({sessionUpdate:B.literal("agent_thought_chunk")})),n_o.and(B.object({sessionUpdate:B.literal("tool_call")})),Onn.and(B.object({sessionUpdate:B.literal("tool_call_update")})),dCo.and(B.object({sessionUpdate:B.literal("plan")})),a_o.and(B.object({sessionUpdate:B.literal("available_commands_update")})),OCo.and(B.object({sessionUpdate:B.literal("current_mode_update")})),RCo.and(B.object({sessionUpdate:B.literal("config_option_update")})),DCo.and(B.object({sessionUpdate:B.literal("session_info_update")})),u_o.and(B.object({sessionUpdate:B.literal("usage_update")}))]),l8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf,update:d_o}),fPu=B.object({method:B.string(),params:B.union([l8t,_nn]).nullish()}),u8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:xf,terminalId:B.string()}),f_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitCode:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:B.string().nullish()}),d8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string(),path:B.string(),sessionId:xf}),pPu=B.object({id:SV,method:B.string(),params:B.union([d8t,ZLt,c8t,YLt,o8t,e8t,u8t,JLt,vnn]).nullish()}),p_o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),hPu=B.union([B.object({id:SV,result:B.union([p_o,pCo,_Co,YEo,JCo,hCo,f_o,eCo,bnn])}),B.object({error:Cnn,id:SV})]);f();function A1e(t,e){let r=new TextEncoder,n=new TextDecoder,o=new ReadableStream({async start(c){let l="",u=e.getReader();try{for(;;){let{value:d,done:p}=await u.read();if(p)break;if(!d)continue;l+=n.decode(d,{stream:!0});let h=l.split(` +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let h=p[1];if(e===p[0]){c(p);continue}if(n.external){let g=n.external.registry.get(p[0])?.id;if(e!==p[0]&&g){c(p);continue}}if(this.metadataRegistry.get(p[0])?.id){c(p);continue}if(h.cycle){c(p);continue}if(h.count>1&&n.reused==="ref"){c(p);continue}}let l=a((p,h)=>{let m=this.seen.get(p),g=m.def??m.schema,A={...g};if(m.ref===null)return;let y=m.ref;if(m.ref=null,y){l(y,h);let E=this.seen.get(y).schema;E.$ref&&h.target==="draft-7"?(g.allOf=g.allOf??[],g.allOf.push(E)):(Object.assign(g,E),Object.assign(g,A))}m.isParent||this.override({zodSchema:p,jsonSchema:g,path:m.path??[]})},"flattenRef");for(let p of[...this.seen.entries()].reverse())l(p[0],{target:this.target});let u={};if(this.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?u.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){let p=n.external.registry.get(e)?.id;if(!p)throw new Error("Schema is missing an `id` property");u.$id=n.external.uri(p)}Object.assign(u,o.def);let d=n.external?.defs??{};for(let p of this.seen.entries()){let h=p[1];h.def&&h.defId&&(d[h.defId]=h.def)}n.external||Object.keys(d).length>0&&(this.target==="draft-2020-12"?u.$defs=d:u.definitions=d);try{return JSON.parse(JSON.stringify(u))}catch{throw new Error("Error converting schema to JSON.")}}};function _Lt(t,e){if(t instanceof Pie){let n=new iCe(e),o={};for(let l of t._idmap.entries()){let[u,d]=l;n.process(d)}let s={},c={registry:t,uri:e?.uri,defs:o};for(let l of t._idmap.entries()){let[u,d]=l;s[u]=n.emit(d,{...e,external:c})}if(Object.keys(o).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let r=new iCe(e);return r.process(t),r.emit(t,e)}a(_Lt,"toJSONSchema");function Ap(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ap(o.element,r);case"object":{for(let s in o.shape)if(Ap(o.shape[s],r))return!0;return!1}case"union":{for(let s of o.options)if(Ap(s,r))return!0;return!1}case"intersection":return Ap(o.left,r)||Ap(o.right,r);case"tuple":{for(let s of o.items)if(Ap(s,r))return!0;return!!(o.rest&&Ap(o.rest,r))}case"record":return Ap(o.keyType,r)||Ap(o.valueType,r);case"map":return Ap(o.keyType,r)||Ap(o.valueType,r);case"set":return Ap(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ap(o.innerType,r);case"lazy":return Ap(o.getter(),r);case"default":return Ap(o.innerType,r);case"prefault":return Ap(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Ap(o.in,r)||Ap(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}a(Ap,"isTransforming");var Mnn={};f();f();f();var Oie={};ui(Oie,{ZodISODate:()=>eje,ZodISODateTime:()=>ZHe,ZodISODuration:()=>rje,ZodISOTime:()=>tje,date:()=>vLt,datetime:()=>CLt,duration:()=>TLt,time:()=>bLt});f();var ZHe=Xe("ZodISODateTime",(t,e)=>{rBt.init(t,e),al.init(t,e)});function CLt(t){return B3t(ZHe,t)}a(CLt,"datetime");var eje=Xe("ZodISODate",(t,e)=>{nBt.init(t,e),al.init(t,e)});function vLt(t){return L3t(eje,t)}a(vLt,"date");var tje=Xe("ZodISOTime",(t,e)=>{iBt.init(t,e),al.init(t,e)});function bLt(t){return F3t(tje,t)}a(bLt,"time");var rje=Xe("ZodISODuration",(t,e)=>{oBt.init(t,e),al.init(t,e)});function TLt(t){return U3t(rje,t)}a(TLt,"duration");f();f();var Bnn=a((t,e)=>{k_e.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:a(r=>N_e(t,r),"value")},flatten:{value:a(r=>D_e(t,r),"value")},addIssue:{value:a(r=>t.issues.push(r),"value")},addIssues:{value:a(r=>t.issues.push(...r),"value")},isEmpty:{get(){return t.issues.length===0}}})},"initializer"),B_o=Xe("ZodError",Bnn),Bie=Xe("ZodError",Bnn,{Parent:Error});var SLt=yHe(Bie),ILt=EHe(Bie),xLt=_He(Bie),wLt=CHe(Bie);var Ho=Xe("ZodType",(t,e)=>(Oi.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>ev(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>SLt(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>xLt(t,r,n),t.parseAsync=async(r,n)=>ILt(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>wLt(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(gin(r,n)),t.superRefine=r=>t.check(Ain(r)),t.overwrite=r=>t.check(M4(r)),t.optional=()=>Vl(t),t.nullable=()=>ije(t),t.nullish=()=>Vl(ije(t)),t.nonoptional=r=>iin(t,r),t.array=()=>br(t),t.or=r=>ec([t,r]),t.and=r=>dCe(t,r),t.transform=r=>oje(t,e8t(r)),t.default=r=>tin(t,r),t.prefault=r=>nin(t,r),t.catch=r=>ain(t,r),t.pipe=r=>oje(t,r),t.readonly=()=>uin(t),t.describe=r=>{let n=t.clone();return Uk.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Uk.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Uk.get(t);let n=t.clone();return Uk.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),PLt=Xe("_ZodString",(t,e)=>{w$.init(t,e),Ho.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(V_e(...n)),t.includes=(...n)=>t.check(Y_e(...n)),t.startsWith=(...n)=>t.check(K_e(...n)),t.endsWith=(...n)=>t.check(J_e(...n)),t.min=(...n)=>t.check(DF(...n)),t.max=(...n)=>t.check(Nie(...n)),t.length=(...n)=>t.check(Mie(...n)),t.nonempty=(...n)=>t.check(DF(1,...n)),t.lowercase=n=>t.check(W_e(n)),t.uppercase=n=>t.check(z_e(n)),t.trim=()=>t.check(eCe()),t.normalize=(...n)=>t.check(Z_e(...n)),t.toLowerCase=()=>t.check(tCe()),t.toUpperCase=()=>t.check(rCe())}),sCe=Xe("ZodString",(t,e)=>{w$.init(t,e),PLt.init(t,e),t.email=r=>t.check(kHe(kLt,r)),t.url=r=>t.check(BHe(DLt,r)),t.jwt=r=>t.check(JHe(zLt,r)),t.emoji=r=>t.check(LHe(MLt,r)),t.guid=r=>t.check(j_e(nje,r)),t.uuid=r=>t.check(DHe(B4,r)),t.uuidv4=r=>t.check(NHe(B4,r)),t.uuidv6=r=>t.check(MHe(B4,r)),t.uuidv7=r=>t.check(OHe(B4,r)),t.nanoid=r=>t.check(FHe(OLt,r)),t.guid=r=>t.check(j_e(nje,r)),t.cuid=r=>t.check(UHe(BLt,r)),t.cuid2=r=>t.check(QHe(LLt,r)),t.ulid=r=>t.check(qHe(FLt,r)),t.base64=r=>t.check(zHe($Lt,r)),t.base64url=r=>t.check(YHe(VLt,r)),t.xid=r=>t.check(GHe(ULt,r)),t.ksuid=r=>t.check(HHe(QLt,r)),t.ipv4=r=>t.check(jHe(qLt,r)),t.ipv6=r=>t.check($He(GLt,r)),t.cidrv4=r=>t.check(VHe(HLt,r)),t.cidrv6=r=>t.check(WHe(jLt,r)),t.e164=r=>t.check(KHe(WLt,r)),t.datetime=r=>t.check(CLt(r)),t.date=r=>t.check(vLt(r)),t.time=r=>t.check(bLt(r)),t.duration=r=>t.check(TLt(r))});function Me(t){return N3t(sCe,t)}a(Me,"string");var al=Xe("ZodStringFormat",(t,e)=>{qc.init(t,e),PLt.init(t,e)}),kLt=Xe("ZodEmail",(t,e)=>{WOt.init(t,e),al.init(t,e)});function F_o(t){return kHe(kLt,t)}a(F_o,"email");var nje=Xe("ZodGUID",(t,e)=>{$Ot.init(t,e),al.init(t,e)});function U_o(t){return j_e(nje,t)}a(U_o,"guid");var B4=Xe("ZodUUID",(t,e)=>{VOt.init(t,e),al.init(t,e)});function Q_o(t){return DHe(B4,t)}a(Q_o,"uuid");function q_o(t){return NHe(B4,t)}a(q_o,"uuidv4");function G_o(t){return MHe(B4,t)}a(G_o,"uuidv6");function H_o(t){return OHe(B4,t)}a(H_o,"uuidv7");var DLt=Xe("ZodURL",(t,e)=>{zOt.init(t,e),al.init(t,e)});function NLt(t){return BHe(DLt,t)}a(NLt,"url");var MLt=Xe("ZodEmoji",(t,e)=>{YOt.init(t,e),al.init(t,e)});function j_o(t){return LHe(MLt,t)}a(j_o,"emoji");var OLt=Xe("ZodNanoID",(t,e)=>{KOt.init(t,e),al.init(t,e)});function $_o(t){return FHe(OLt,t)}a($_o,"nanoid");var BLt=Xe("ZodCUID",(t,e)=>{JOt.init(t,e),al.init(t,e)});function V_o(t){return UHe(BLt,t)}a(V_o,"cuid");var LLt=Xe("ZodCUID2",(t,e)=>{XOt.init(t,e),al.init(t,e)});function W_o(t){return QHe(LLt,t)}a(W_o,"cuid2");var FLt=Xe("ZodULID",(t,e)=>{ZOt.init(t,e),al.init(t,e)});function z_o(t){return qHe(FLt,t)}a(z_o,"ulid");var ULt=Xe("ZodXID",(t,e)=>{eBt.init(t,e),al.init(t,e)});function Y_o(t){return GHe(ULt,t)}a(Y_o,"xid");var QLt=Xe("ZodKSUID",(t,e)=>{tBt.init(t,e),al.init(t,e)});function K_o(t){return HHe(QLt,t)}a(K_o,"ksuid");var qLt=Xe("ZodIPv4",(t,e)=>{sBt.init(t,e),al.init(t,e)});function J_o(t){return jHe(qLt,t)}a(J_o,"ipv4");var GLt=Xe("ZodIPv6",(t,e)=>{aBt.init(t,e),al.init(t,e)});function X_o(t){return $He(GLt,t)}a(X_o,"ipv6");var HLt=Xe("ZodCIDRv4",(t,e)=>{cBt.init(t,e),al.init(t,e)});function Z_o(t){return VHe(HLt,t)}a(Z_o,"cidrv4");var jLt=Xe("ZodCIDRv6",(t,e)=>{lBt.init(t,e),al.init(t,e)});function eCo(t){return WHe(jLt,t)}a(eCo,"cidrv6");var $Lt=Xe("ZodBase64",(t,e)=>{dBt.init(t,e),al.init(t,e)});function tCo(t){return zHe($Lt,t)}a(tCo,"base64");var VLt=Xe("ZodBase64URL",(t,e)=>{fBt.init(t,e),al.init(t,e)});function rCo(t){return YHe(VLt,t)}a(rCo,"base64url");var WLt=Xe("ZodE164",(t,e)=>{pBt.init(t,e),al.init(t,e)});function nCo(t){return KHe(WLt,t)}a(nCo,"e164");var zLt=Xe("ZodJWT",(t,e)=>{hBt.init(t,e),al.init(t,e)});function iCo(t){return JHe(zLt,t)}a(iCo,"jwt");var Lnn=Xe("ZodCustomStringFormat",(t,e)=>{mBt.init(t,e),al.init(t,e)});function oCo(t,e,r={}){return yLt(Lnn,t,e,r)}a(oCo,"stringFormat");var aCe=Xe("ZodNumber",(t,e)=>{xHe.init(t,e),Ho.init(t,e),t.gt=(n,o)=>t.check(N4(n,o)),t.gte=(n,o)=>t.check(d_(n,o)),t.min=(n,o)=>t.check(d_(n,o)),t.lt=(n,o)=>t.check(D4(n,o)),t.lte=(n,o)=>t.check(jT(n,o)),t.max=(n,o)=>t.check(jT(n,o)),t.int=n=>t.check(RLt(n)),t.safe=n=>t.check(RLt(n)),t.positive=n=>t.check(N4(0,n)),t.nonnegative=n=>t.check(d_(0,n)),t.negative=n=>t.check(D4(0,n)),t.nonpositive=n=>t.check(jT(0,n)),t.multipleOf=(n,o)=>t.check(P$(n,o)),t.step=(n,o)=>t.check(P$(n,o)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Js(t){return Q3t(aCe,t)}a(Js,"number");var Lie=Xe("ZodNumberFormat",(t,e)=>{gBt.init(t,e),aCe.init(t,e)});function RLt(t){return G3t(Lie,t)}a(RLt,"int");function sCo(t){return H3t(Lie,t)}a(sCo,"float32");function aCo(t){return j3t(Lie,t)}a(aCo,"float64");function cCo(t){return $3t(Lie,t)}a(cCo,"int32");function lCo(t){return V3t(Lie,t)}a(lCo,"uint32");var cCe=Xe("ZodBoolean",(t,e)=>{F_e.init(t,e),Ho.init(t,e)});function Za(t){return W3t(cCe,t)}a(Za,"boolean");var lCe=Xe("ZodBigInt",(t,e)=>{wHe.init(t,e),Ho.init(t,e),t.gte=(n,o)=>t.check(d_(n,o)),t.min=(n,o)=>t.check(d_(n,o)),t.gt=(n,o)=>t.check(N4(n,o)),t.gte=(n,o)=>t.check(d_(n,o)),t.min=(n,o)=>t.check(d_(n,o)),t.lt=(n,o)=>t.check(D4(n,o)),t.lte=(n,o)=>t.check(jT(n,o)),t.max=(n,o)=>t.check(jT(n,o)),t.positive=n=>t.check(N4(BigInt(0),n)),t.negative=n=>t.check(D4(BigInt(0),n)),t.nonpositive=n=>t.check(jT(BigInt(0),n)),t.nonnegative=n=>t.check(d_(BigInt(0),n)),t.multipleOf=(n,o)=>t.check(P$(n,o));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function uCo(t){return Y3t(lCe,t)}a(uCo,"bigint");var YLt=Xe("ZodBigIntFormat",(t,e)=>{ABt.init(t,e),lCe.init(t,e)});function dCo(t){return J3t(YLt,t)}a(dCo,"int64");function fCo(t){return X3t(YLt,t)}a(fCo,"uint64");var Fnn=Xe("ZodSymbol",(t,e)=>{yBt.init(t,e),Ho.init(t,e)});function pCo(t){return Z3t(Fnn,t)}a(pCo,"symbol");var Unn=Xe("ZodUndefined",(t,e)=>{EBt.init(t,e),Ho.init(t,e)});function hCo(t){return eLt(Unn,t)}a(hCo,"_undefined");var Qnn=Xe("ZodNull",(t,e)=>{_Bt.init(t,e),Ho.init(t,e)});function uCe(t){return tLt(Qnn,t)}a(uCe,"_null");var qnn=Xe("ZodAny",(t,e)=>{CBt.init(t,e),Ho.init(t,e)});function KLt(){return rLt(qnn)}a(KLt,"any");var Gnn=Xe("ZodUnknown",(t,e)=>{Rie.init(t,e),Ho.init(t,e)});function $l(){return kie(Gnn)}a($l,"unknown");var Hnn=Xe("ZodNever",(t,e)=>{vBt.init(t,e),Ho.init(t,e)});function sje(t){return nLt(Hnn,t)}a(sje,"never");var jnn=Xe("ZodVoid",(t,e)=>{bBt.init(t,e),Ho.init(t,e)});function mCo(t){return iLt(jnn,t)}a(mCo,"_void");var aje=Xe("ZodDate",(t,e)=>{TBt.init(t,e),Ho.init(t,e),t.min=(n,o)=>t.check(d_(n,o)),t.max=(n,o)=>t.check(jT(n,o));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function gCo(t){return oLt(aje,t)}a(gCo,"date");var $nn=Xe("ZodArray",(t,e)=>{U_e.init(t,e),Ho.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(DF(r,n)),t.nonempty=r=>t.check(DF(1,r)),t.max=(r,n)=>t.check(Nie(r,n)),t.length=(r,n)=>t.check(Mie(r,n)),t.unwrap=()=>t.element});function br(t,e){return nCe($nn,t,e)}a(br,"array");function ACo(t){let e=t._zod.def.shape;return vn(Object.keys(e))}a(ACo,"keyof");var cje=Xe("ZodObject",(t,e)=>{SBt.init(t,e),Ho.init(t,e),Sr.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>dy(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:$l()}),t.loose=()=>t.clone({...t._zod.def,catchall:$l()}),t.strict=()=>t.clone({...t._zod.def,catchall:sje()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Sr.extend(t,r),t.merge=r=>Sr.merge(t,r),t.pick=r=>Sr.pick(t,r),t.omit=r=>Sr.omit(t,r),t.partial=(...r)=>Sr.partial(t8t,t,r[0]),t.required=(...r)=>Sr.required(r8t,t,r[0])});function kr(t,e){let r={type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},...Sr.normalizeParams(e)};return new cje(r)}a(kr,"object");function yCo(t,e){return new cje({type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},catchall:sje(),...Sr.normalizeParams(e)})}a(yCo,"strictObject");function _0(t,e){return new cje({type:"object",get shape(){return Sr.assignProp(this,"shape",{...t}),this.shape},catchall:$l(),...Sr.normalizeParams(e)})}a(_0,"looseObject");var JLt=Xe("ZodUnion",(t,e)=>{RHe.init(t,e),Ho.init(t,e),t.options=e.options});function ec(t,e){return new JLt({type:"union",options:t,...Sr.normalizeParams(e)})}a(ec,"union");var Vnn=Xe("ZodDiscriminatedUnion",(t,e)=>{JLt.init(t,e),IBt.init(t,e)});function lje(t,e,r){return new Vnn({type:"union",options:e,discriminator:t,...Sr.normalizeParams(r)})}a(lje,"discriminatedUnion");var Wnn=Xe("ZodIntersection",(t,e)=>{xBt.init(t,e),Ho.init(t,e)});function dCe(t,e){return new Wnn({type:"intersection",left:t,right:e})}a(dCe,"intersection");var znn=Xe("ZodTuple",(t,e)=>{R$.init(t,e),Ho.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function ECo(t,e,r){let n=e instanceof Oi,o=n?r:e,s=n?e:null;return new znn({type:"tuple",items:t,rest:s,...Sr.normalizeParams(o)})}a(ECo,"tuple");var XLt=Xe("ZodRecord",(t,e)=>{wBt.init(t,e),Ho.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function cl(t,e,r){return new XLt({type:"record",keyType:t,valueType:e,...Sr.normalizeParams(r)})}a(cl,"record");function _Co(t,e,r){return new XLt({type:"record",keyType:ec([t,sje()]),valueType:e,...Sr.normalizeParams(r)})}a(_Co,"partialRecord");var Ynn=Xe("ZodMap",(t,e)=>{RBt.init(t,e),Ho.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function CCo(t,e,r){return new Ynn({type:"map",keyType:t,valueType:e,...Sr.normalizeParams(r)})}a(CCo,"map");var Knn=Xe("ZodSet",(t,e)=>{PBt.init(t,e),Ho.init(t,e),t.min=(...r)=>t.check(k$(...r)),t.nonempty=r=>t.check(k$(1,r)),t.max=(...r)=>t.check(Die(...r)),t.size=(...r)=>t.check($_e(...r))});function vCo(t,e){return new Knn({type:"set",valueType:t,...Sr.normalizeParams(e)})}a(vCo,"set");var oCe=Xe("ZodEnum",(t,e)=>{kBt.init(t,e),Ho.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,o)=>{let s={};for(let c of n)if(r.has(c))s[c]=e.entries[c];else throw new Error(`Key ${c} not found in enum`);return new oCe({...e,checks:[],...Sr.normalizeParams(o),entries:s})},t.exclude=(n,o)=>{let s={...e.entries};for(let c of n)if(r.has(c))delete s[c];else throw new Error(`Key ${c} not found in enum`);return new oCe({...e,checks:[],...Sr.normalizeParams(o),entries:s})}});function dy(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new oCe({type:"enum",entries:r,...Sr.normalizeParams(e)})}a(dy,"_enum");function bCo(t,e){return new oCe({type:"enum",entries:t,...Sr.normalizeParams(e)})}a(bCo,"nativeEnum");var Jnn=Xe("ZodLiteral",(t,e)=>{DBt.init(t,e),Ho.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function vn(t,e){return new Jnn({type:"literal",values:Array.isArray(t)?t:[t],...Sr.normalizeParams(e)})}a(vn,"literal");var Xnn=Xe("ZodFile",(t,e)=>{NBt.init(t,e),Ho.init(t,e),t.min=(r,n)=>t.check(k$(r,n)),t.max=(r,n)=>t.check(Die(r,n)),t.mime=(r,n)=>t.check(X_e(Array.isArray(r)?r:[r],n))});function TCo(t){return hLt(Xnn,t)}a(TCo,"file");var ZLt=Xe("ZodTransform",(t,e)=>{Q_e.init(t,e),Ho.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=s=>{if(typeof s=="string")r.issues.push(Sr.issue(s,r.value,e));else{let c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=t),c.continue??(c.continue=!0),r.issues.push(Sr.issue(c))}};let o=e.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function e8t(t){return new ZLt({type:"transform",transform:t})}a(e8t,"transform");var t8t=Xe("ZodOptional",(t,e)=>{MBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Vl(t){return new t8t({type:"optional",innerType:t})}a(Vl,"optional");var Znn=Xe("ZodNullable",(t,e)=>{OBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ije(t){return new Znn({type:"nullable",innerType:t})}a(ije,"nullable");function SCo(t){return Vl(ije(t))}a(SCo,"nullish");var ein=Xe("ZodDefault",(t,e)=>{BBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function tin(t,e){return new ein({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}a(tin,"_default");var rin=Xe("ZodPrefault",(t,e)=>{LBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function nin(t,e){return new rin({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}a(nin,"prefault");var r8t=Xe("ZodNonOptional",(t,e)=>{FBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function iin(t,e){return new r8t({type:"nonoptional",innerType:t,...Sr.normalizeParams(e)})}a(iin,"nonoptional");var oin=Xe("ZodSuccess",(t,e)=>{UBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ICo(t){return new oin({type:"success",innerType:t})}a(ICo,"success");var sin=Xe("ZodCatch",(t,e)=>{QBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ain(t,e){return new sin({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}a(ain,"_catch");var cin=Xe("ZodNaN",(t,e)=>{qBt.init(t,e),Ho.init(t,e)});function xCo(t){return aLt(cin,t)}a(xCo,"nan");var n8t=Xe("ZodPipe",(t,e)=>{q_e.init(t,e),Ho.init(t,e),t.in=e.in,t.out=e.out});function oje(t,e){return new n8t({type:"pipe",in:t,out:e})}a(oje,"pipe");var lin=Xe("ZodReadonly",(t,e)=>{GBt.init(t,e),Ho.init(t,e)});function uin(t){return new lin({type:"readonly",innerType:t})}a(uin,"readonly");var din=Xe("ZodTemplateLiteral",(t,e)=>{HBt.init(t,e),Ho.init(t,e)});function wCo(t,e){return new din({type:"template_literal",parts:t,...Sr.normalizeParams(e)})}a(wCo,"templateLiteral");var fin=Xe("ZodLazy",(t,e)=>{$Bt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.getter()});function pin(t){return new fin({type:"lazy",getter:t})}a(pin,"lazy");var hin=Xe("ZodPromise",(t,e)=>{jBt.init(t,e),Ho.init(t,e),t.unwrap=()=>t._zod.def.innerType});function RCo(t){return new hin({type:"promise",innerType:t})}a(RCo,"promise");var uje=Xe("ZodCustom",(t,e)=>{VBt.init(t,e),Ho.init(t,e)});function min(t){let e=new Xu({check:"custom"});return e._zod.check=t,e}a(min,"check");function i8t(t,e){return mLt(uje,t??(()=>!0),e)}a(i8t,"custom");function gin(t,e={}){return gLt(uje,t,e)}a(gin,"refine");function Ain(t){let e=min(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Sr.issue(n,r.value,e._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),r.issues.push(Sr.issue(o))}},t(r.value,r)));return e}a(Ain,"superRefine");function PCo(t,e={error:`Input not instance of ${t.name}`}){let r=new uje({type:"custom",check:"custom",fn:a(n=>n instanceof t,"fn"),abort:!0,...Sr.normalizeParams(e)});return r._zod.bag.Class=t,r}a(PCo,"_instanceof");var kCo=a((...t)=>ALt({Pipe:n8t,Boolean:cCe,String:sCe,Transform:ZLt},...t),"stringbool");function DCo(t){let e=pin(()=>ec([Me(t),Js(),Za(),uCe(),br(e),cl(Me(),e)]));return e}a(DCo,"json");function dje(t,e){return oje(e8t(t),e)}a(dje,"preprocess");f();var o8t={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function NCo(t){E0({customError:t})}a(NCo,"setErrorMap");function MCo(){return E0().customError}a(MCo,"getErrorMap");var fCe={};ui(fCe,{bigint:()=>FCo,boolean:()=>LCo,date:()=>UCo,number:()=>BCo,string:()=>OCo});f();function OCo(t){return M3t(sCe,t)}a(OCo,"string");function BCo(t){return q3t(aCe,t)}a(BCo,"number");function LCo(t){return z3t(cCe,t)}a(LCo,"boolean");function FCo(t){return K3t(lCe,t)}a(FCo,"bigint");function UCo(t){return sLt(aje,t)}a(UCo,"date");E0(G_e());var QCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminal:B.boolean().optional().default(!1)}),qCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),label:B.string().nullish(),name:B.string(),optional:B.boolean().optional().default(!1),secret:B.boolean().optional().default(!0)}),GCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:B.string(),name:B.string()}),HCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:B.string(),link:B.string().nullish(),name:B.string(),vars:B.array(qCo)}),jCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()).optional(),description:B.string().nullish(),env:B.record(B.string(),B.string()).optional(),id:B.string(),name:B.string()}),$Co=B.union([HCo.and(B.object({type:B.literal("env_var")})),jCo.and(B.object({type:B.literal("terminal")})),GCo]),a8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),methodId:B.string()}),VCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),WCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),blob:B.string(),mimeType:B.string().nullish(),uri:B.string()}),zCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),YCo=B.object({amount:B.number(),currency:B.string()}),KCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminalId:B.string()}),JCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),newText:B.string(),oldText:B.string().nullish(),path:B.string()}),yin=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),value:B.string()}),XCo=B.union([B.literal(-32700),B.literal(-32600),B.literal(-32601),B.literal(-32602),B.literal(-32603),B.literal(-32800),B.literal(-32e3),B.literal(-32002),B.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),Ein=B.object({code:XCo,data:B.unknown().optional(),message:B.string()}),_in=B.unknown(),Cin=B.unknown(),vin=B.unknown(),ZCo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),readTextFile:B.boolean().optional().default(!1),writeTextFile:B.boolean().optional().default(!1)}),e1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),auth:QCo.optional().default({terminal:!1}),fs:ZCo.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:B.boolean().optional().default(!1)}),bin=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),value:B.string()}),Tin=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),name:B.string(),title:B.string().nullish(),version:B.string()}),t1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),c8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cursor:B.string().nullish(),cwd:B.string().nullish()}),r1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),http:B.boolean().optional().default(!1),sse:B.boolean().optional().default(!1)}),n1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),headers:B.array(bin),name:B.string(),url:B.string()}),i1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),headers:B.array(bin),name:B.string(),url:B.string()}),o1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()),command:B.string(),env:B.array(yin),name:B.string()}),fje=B.union([n1o.and(B.object({type:B.literal("http")})),i1o.and(B.object({type:B.literal("sse")})),o1o]),l8t=B.string(),s1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),modelId:l8t,name:B.string()}),u8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(fje)}),Sin=B.string(),a1o=B.union([B.literal("allow_once"),B.literal("allow_always"),B.literal("reject_once"),B.literal("reject_always")]),c1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),kind:a1o,name:B.string(),optionId:Sin}),l1o=B.union([B.literal("high"),B.literal("medium"),B.literal("low")]),u1o=B.union([B.literal("pending"),B.literal("in_progress"),B.literal("completed")]),d1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string(),priority:l1o,status:u1o}),f1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),entries:B.array(d1o)}),p1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),audio:B.boolean().optional().default(!1),embeddedContext:B.boolean().optional().default(!1),image:B.boolean().optional().default(!1)}),Iin=B.number().int().gte(0).lte(65535),d8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),clientCapabilities:e1o.optional().default({auth:{terminal:!1},fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:Tin.nullish(),protocolVersion:Iin}),h1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string()}),m1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),D$=B.union([B.number(),B.string()]).nullable(),E5u=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),requestId:D$}),g1o=B.enum(["assistant","user"]),pCe=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),audience:B.array(g1o).nullish(),lastModified:B.string().nullish(),priority:B.number().nullish()}),A1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:pCe.nullish(),data:B.string(),mimeType:B.string()}),y1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:pCe.nullish(),data:B.string(),mimeType:B.string(),uri:B.string().nullish()}),E1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:pCe.nullish(),description:B.string().nullish(),mimeType:B.string().nullish(),name:B.string(),size:B.number().nullish(),title:B.string().nullish(),uri:B.string()}),_1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),optionId:Sin}),C1o=B.union([B.object({outcome:B.literal("cancelled")}),_1o.and(B.object({outcome:B.literal("selected")}))]),v1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),outcome:C1o}),b1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),T1o=B.object({currentValue:B.boolean()}),S1o=B.string(),xin=B.string(),I1o=B.union([B.literal("mode"),B.literal("model"),B.literal("thought_level"),B.string()]),f8t=B.string(),win=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),name:B.string(),value:f8t}),x1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),group:S1o,name:B.string(),options:B.array(win)}),w1o=B.union([B.array(win),B.array(x1o)]),R1o=B.object({currentValue:f8t,options:w1o}),Fie=B.intersection(B.union([R1o.and(B.object({type:B.literal("select")})),T1o.and(B.object({type:B.literal("boolean")}))]),B.object({_meta:B.record(B.string(),B.unknown()).nullish(),category:I1o.nullish(),description:B.string().nullish(),id:xin,name:B.string()})),P1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie)}),k1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),_f=B.string(),p8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f}),_5u=B.object({method:B.string(),params:B.union([p8t,_in]).nullish()}),h8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f}),m8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),args:B.array(B.string()).optional(),command:B.string(),cwd:B.string().nullish(),env:B.array(yin).optional(),outputByteLimit:B.number().nullish(),sessionId:_f}),g8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(fje).optional(),sessionId:_f}),A8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f,terminalId:B.string()}),y8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(fje),sessionId:_f}),E8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),limit:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),line:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:B.string(),sessionId:_f}),_8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f,terminalId:B.string()}),C8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),mcpServers:B.array(fje).optional(),sessionId:_f}),D1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cwd:B.string(),sessionId:_f,title:B.string().nullish(),updatedAt:B.string().nullish()}),N1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),nextCursor:B.string().nullish(),sessions:B.array(D1o)}),M1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),title:B.string().nullish(),updatedAt:B.string().nullish()}),O1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),pje=B.string(),B1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),currentModeId:pje}),L1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string().nullish(),id:pje,name:B.string()}),hje=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableModes:B.array(L1o),currentModeId:pje}),mje=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableModels:B.array(s1o),currentModelId:l8t}),F1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie).nullish(),models:mje.nullish(),modes:hje.nullish(),sessionId:_f}),U1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie).nullish(),models:mje.nullish(),modes:hje.nullish()}),Q1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie).nullish(),models:mje.nullish(),modes:hje.nullish(),sessionId:_f}),q1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie).nullish(),models:mje.nullish(),modes:hje.nullish()}),G1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),H1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),close:b1o.nullish(),fork:k1o.nullish(),list:O1o.nullish(),resume:G1o.nullish()}),j1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),loadSession:B.boolean().optional().default(!1),mcpCapabilities:r1o.optional().default({http:!1,sse:!1}),promptCapabilities:p1o.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:H1o.optional().default({})}),$1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),agentCapabilities:j1o.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:Tin.nullish(),authMethods:B.array($Co).optional().default([]),protocolVersion:Iin}),v8t=B.intersection(B.union([B.object({type:B.literal("boolean"),value:B.boolean()}),B.object({value:f8t})]),B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configId:xin,sessionId:_f})),V1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),configOptions:B.array(Fie)}),b8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),modeId:pje,sessionId:_f}),W1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),T8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),modelId:l8t,sessionId:_f}),z1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),Y1o=B.union([B.literal("end_turn"),B.literal("max_tokens"),B.literal("max_turn_requests"),B.literal("refusal"),B.literal("cancelled")]),K1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),terminalId:B.string()}),J1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitCode:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:B.string().nullish()}),S8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f,terminalId:B.string()}),X1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitStatus:J1o.nullish(),output:B.string(),truncated:B.boolean()}),Z1o=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:pCe.nullish(),text:B.string()}),evo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),mimeType:B.string().nullish(),text:B.string(),uri:B.string()}),tvo=B.union([evo,WCo]),rvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),annotations:pCe.nullish(),resource:tvo}),I8t=B.union([Z1o.and(B.object({type:B.literal("text")})),y1o.and(B.object({type:B.literal("image")})),A1o.and(B.object({type:B.literal("audio")})),E1o.and(B.object({type:B.literal("resource_link")})),rvo.and(B.object({type:B.literal("resource")}))]),nvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:I8t}),s8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:I8t,messageId:B.string().nullish()}),x8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),messageId:B.string().nullish(),prompt:B.array(I8t),sessionId:_f}),C5u=B.object({id:D$,method:B.string(),params:B.union([d8t,a8t,u8t,y8t,c8t,g8t,C8t,h8t,b8t,v8t,x8t,T8t,Cin]).nullish()}),Rin=B.union([nvo.and(B.object({type:B.literal("content")})),JCo.and(B.object({type:B.literal("diff")})),K1o.and(B.object({type:B.literal("terminal")}))]),Pin=B.string(),kin=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),line:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),path:B.string()}),Din=B.union([B.literal("pending"),B.literal("in_progress"),B.literal("completed"),B.literal("failed")]),Nin=B.union([B.literal("read"),B.literal("edit"),B.literal("delete"),B.literal("move"),B.literal("search"),B.literal("execute"),B.literal("think"),B.literal("fetch"),B.literal("switch_mode"),B.literal("other")]),ivo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.array(Rin).optional(),kind:Nin.optional(),locations:B.array(kin).optional(),rawInput:B.unknown().optional(),rawOutput:B.unknown().optional(),status:Din.optional(),title:B.string(),toolCallId:Pin}),Min=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.array(Rin).nullish(),kind:Nin.nullish(),locations:B.array(kin).nullish(),rawInput:B.unknown().optional(),rawOutput:B.unknown().optional(),status:Din.nullish(),title:B.string().nullish(),toolCallId:Pin}),w8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),options:B.array(c1o),sessionId:_f,toolCall:Min}),ovo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),hint:B.string()}),svo=ovo,avo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),description:B.string(),input:svo.nullish(),name:B.string()}),cvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),availableCommands:B.array(avo)}),lvo=B.object({cachedReadTokens:B.number().nullish(),cachedWriteTokens:B.number().nullish(),inputTokens:B.number(),outputTokens:B.number(),thoughtTokens:B.number().nullish(),totalTokens:B.number()}),uvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),stopReason:Y1o,usage:lvo.nullish(),userMessageId:B.string().nullish()}),v5u=B.union([B.object({id:D$,result:B.union([$1o,VCo,Q1o,U1o,N1o,F1o,q1o,zCo,W1o,V1o,uvo,z1o,vin])}),B.object({error:Ein,id:D$})]),dvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),cost:YCo.nullish(),size:B.number(),used:B.number()}),fvo=B.union([s8t.and(B.object({sessionUpdate:B.literal("user_message_chunk")})),s8t.and(B.object({sessionUpdate:B.literal("agent_message_chunk")})),s8t.and(B.object({sessionUpdate:B.literal("agent_thought_chunk")})),ivo.and(B.object({sessionUpdate:B.literal("tool_call")})),Min.and(B.object({sessionUpdate:B.literal("tool_call_update")})),f1o.and(B.object({sessionUpdate:B.literal("plan")})),cvo.and(B.object({sessionUpdate:B.literal("available_commands_update")})),B1o.and(B.object({sessionUpdate:B.literal("current_mode_update")})),P1o.and(B.object({sessionUpdate:B.literal("config_option_update")})),M1o.and(B.object({sessionUpdate:B.literal("session_info_update")})),dvo.and(B.object({sessionUpdate:B.literal("usage_update")}))]),R8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f,update:fvo}),b5u=B.object({method:B.string(),params:B.union([R8t,_in]).nullish()}),P8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),sessionId:_f,terminalId:B.string()}),pvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),exitCode:B.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}).nullish(),signal:B.string().nullish()}),k8t=B.object({_meta:B.record(B.string(),B.unknown()).nullish(),content:B.string(),path:B.string(),sessionId:_f}),T5u=B.object({id:D$,method:B.string(),params:B.union([k8t,E8t,w8t,m8t,S8t,_8t,P8t,A8t,Cin]).nullish()}),hvo=B.object({_meta:B.record(B.string(),B.unknown()).nullish()}),S5u=B.union([B.object({id:D$,result:B.union([hvo,h1o,v1o,KCo,X1o,m1o,pvo,t1o,vin])}),B.object({error:Ein,id:D$})]);f();function hCe(t,e){let r=new TextEncoder,n=new TextDecoder,o=new ReadableStream({async start(c){let l="",u=e.getReader();try{for(;;){let{value:d,done:p}=await u.read();if(p)break;if(!d)continue;l+=n.decode(d,{stream:!0});let h=l.split(` `);l=h.pop()||"";for(let m of h){let g=m.trim();if(g)try{let A=JSON.parse(g);c.enqueue(A)}catch(A){console.error("Failed to parse JSON message:",g,A)}}}}finally{u.releaseLock(),c.close()}}}),s=new WritableStream({async write(c){let l=JSON.stringify(c)+` -`,u=t.getWriter();try{await u.write(r.encode(l))}finally{u.releaseLock()}}});return{readable:o,writable:s}}a(A1e,"ndJsonStream");var y1e=class{static{a(this,"AgentSideConnection")}#e;constructor(e,r){let n=e(this),o=a(async(c,l)=>{switch(c){case Wc.initialize:{let u=$Lt.parse(l);return n.initialize(u)}case Wc.session_new:{let u=jLt.parse(l);return n.newSession(u)}case Wc.session_load:{if(!n.loadSession)throw Is.methodNotFound(c);let u=XLt.parse(l);return n.loadSession(u)}case Wc.session_list:{if(!n.listSessions)throw Is.methodNotFound(c);let u=GLt.parse(l);return n.listSessions(u)}case Wc.session_fork:{if(!n.unstable_forkSession)throw Is.methodNotFound(c);let u=KLt.parse(l);return n.unstable_forkSession(u)}case Wc.session_resume:{if(!n.unstable_resumeSession)throw Is.methodNotFound(c);let u=t8t.parse(l);return n.unstable_resumeSession(u)}case Wc.session_close:{if(!n.unstable_closeSession)throw Is.methodNotFound(c);let u=zLt.parse(l);return n.unstable_closeSession(u)}case Wc.session_set_mode:{if(!n.setSessionMode)throw Is.methodNotFound(c);let u=n8t.parse(l);return await n.setSessionMode(u)??{}}case Wc.authenticate:{let u=qLt.parse(l);return await n.authenticate(u)??{}}case Wc.session_prompt:{let u=a8t.parse(l);return n.prompt(u)}case Wc.session_set_model:{if(!n.unstable_setSessionModel)throw Is.methodNotFound(c);let u=i8t.parse(l);return await n.unstable_setSessionModel(u)??{}}case Wc.session_set_config_option:{if(!n.setSessionConfigOption)throw Is.methodNotFound(c);let u=r8t.parse(l);return n.setSessionConfigOption(u)}default:if(n.extMethod)return n.extMethod(c,l);throw Is.methodNotFound(c)}},"requestHandler"),s=a(async(c,l)=>{switch(c){case Wc.session_cancel:{let u=WLt.parse(l);return n.cancel(u)}default:if(n.extNotification)return n.extNotification(c,l);throw Is.methodNotFound(c)}},"notificationHandler");this.#e=new l$e(o,s,r)}async sessionUpdate(e){return await this.#e.sendNotification(vp.session_update,e)}async requestPermission(e){return await this.#e.sendRequest(vp.session_request_permission,e)}async readTextFile(e){return await this.#e.sendRequest(vp.fs_read_text_file,e)}async writeTextFile(e){return await this.#e.sendRequest(vp.fs_write_text_file,e)??{}}async createTerminal(e){let r=await this.#e.sendRequest(vp.terminal_create,e);return new f8t(r.terminalId,e.sessionId,this.#e)}async extMethod(e,r){return await this.#e.sendRequest(e,r)}async extNotification(e,r){return await this.#e.sendNotification(e,r)}get signal(){return this.#e.signal}get closed(){return this.#e.closed}},f8t=class{static{a(this,"TerminalHandle")}id;#e;#t;constructor(e,r,n){this.id=e,this.#e=r,this.#t=n}async currentOutput(){return await this.#t.sendRequest(vp.terminal_output,{sessionId:this.#e,terminalId:this.id})}async waitForExit(){return await this.#t.sendRequest(vp.terminal_wait_for_exit,{sessionId:this.#e,terminalId:this.id})}async kill(){return await this.#t.sendRequest(vp.terminal_kill,{sessionId:this.#e,terminalId:this.id})??{}}async release(){return await this.#t.sendRequest(vp.terminal_release,{sessionId:this.#e,terminalId:this.id})??{}}async[Symbol.asyncDispose](){await this.release()}},c$e=class{static{a(this,"ClientSideConnection")}#e;constructor(e,r){let n=e(this),o=a(async(c,l)=>{switch(c){case vp.fs_write_text_file:{let u=d8t.parse(l);return n.writeTextFile?.(u)}case vp.fs_read_text_file:{let u=ZLt.parse(l);return n.readTextFile?.(u)}case vp.session_request_permission:{let u=c8t.parse(l);return n.requestPermission(u)}case vp.terminal_create:{let u=YLt.parse(l);return n.createTerminal?.(u)}case vp.terminal_output:{let u=o8t.parse(l);return n.terminalOutput?.(u)}case vp.terminal_release:{let u=e8t.parse(l);return await n.releaseTerminal?.(u)??{}}case vp.terminal_wait_for_exit:{let u=u8t.parse(l);return n.waitForTerminalExit?.(u)}case vp.terminal_kill:{let u=JLt.parse(l);return await n.killTerminal?.(u)??{}}default:if(n.extMethod)return n.extMethod(c,l);throw Is.methodNotFound(c)}},"requestHandler"),s=a(async(c,l)=>{switch(c){case vp.session_update:{let u=l8t.parse(l);return n.sessionUpdate(u)}default:if(n.extNotification)return n.extNotification(c,l);throw Is.methodNotFound(c)}},"notificationHandler");this.#e=new l$e(o,s,r)}async initialize(e){return await this.#e.sendRequest(Wc.initialize,e)}async newSession(e){return await this.#e.sendRequest(Wc.session_new,e)}async loadSession(e){return await this.#e.sendRequest(Wc.session_load,e)??{}}async unstable_forkSession(e){return await this.#e.sendRequest(Wc.session_fork,e)}async listSessions(e){return await this.#e.sendRequest(Wc.session_list,e)}async unstable_resumeSession(e){return await this.#e.sendRequest(Wc.session_resume,e)}async unstable_closeSession(e){return await this.#e.sendRequest(Wc.session_close,e)}async setSessionMode(e){return await this.#e.sendRequest(Wc.session_set_mode,e)??{}}async unstable_setSessionModel(e){return await this.#e.sendRequest(Wc.session_set_model,e)??{}}async setSessionConfigOption(e){return await this.#e.sendRequest(Wc.session_set_config_option,e)}async authenticate(e){return await this.#e.sendRequest(Wc.authenticate,e)??{}}async prompt(e){return await this.#e.sendRequest(Wc.session_prompt,e)}async cancel(e){return await this.#e.sendNotification(Wc.session_cancel,e)}async extMethod(e,r){return await this.#e.sendRequest(e,r)}async extNotification(e,r){return await this.#e.sendNotification(e,r)}get signal(){return this.#e.signal}get closed(){return this.#e.closed}},l$e=class{static{a(this,"Connection")}#e=new Map;#t=0;#n;#r;#i;#o=Promise.resolve();#a=new AbortController;#s;constructor(e,r,n){this.#n=e,this.#r=r,this.#i=n,this.#s=new Promise(o=>{this.#a.signal.addEventListener("abort",()=>o())}),this.#c()}get signal(){return this.#a.signal}get closed(){return this.#s}async#c(){let e=this.#i.readable.getReader();try{for(;;){let{value:r,done:n}=await e.read();if(n)break;if(r)try{this.#l(r)}catch(o){console.error("Unexpected error during message processing:",r,o),"id"in r&&r.id!==void 0&&this.#h({jsonrpc:"2.0",id:r.id,error:{code:-32700,message:"Parse error"}})}}}finally{e.releaseLock(),this.#a.abort()}}async#l(e){if("method"in e&&"id"in e){let r=await this.#u(e.method,e.params);"error"in r&&console.error("Error handling request",e,r.error),await this.#h({jsonrpc:"2.0",id:e.id,...r})}else if("method"in e){let r=await this.#f(e.method,e.params);"error"in r&&console.error("Error handling notification",e,r.error)}else"id"in e?this.#p(e):console.error("Invalid message",{message:e})}async#u(e,r){try{return{result:await this.#n(e,r)??null}}catch(n){if(n instanceof Is)return n.toResult();if(n instanceof T_e.ZodError)return Is.invalidParams(n.format()).toResult();let o;(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")&&(o=n.message);try{return Is.internalError(o?JSON.parse(o):{}).toResult()}catch{return Is.internalError({details:o}).toResult()}}}async#f(e,r){try{return await this.#r(e,r),{result:null}}catch(n){if(n instanceof Is)return n.toResult();if(n instanceof T_e.ZodError)return Is.invalidParams(n.format()).toResult();let o;(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")&&(o=n.message);try{return Is.internalError(o?JSON.parse(o):{}).toResult()}catch{return Is.internalError({details:o}).toResult()}}}#p(e){let r=this.#e.get(e.id);r?("result"in e?r.resolve(e.result):"error"in e&&r.reject(e.error),this.#e.delete(e.id)):console.error("Got response to unknown request",e.id)}async sendRequest(e,r){let n=this.#t++,o=new Promise((s,c)=>{this.#e.set(n,{resolve:s,reject:c})});return await this.#h({jsonrpc:"2.0",id:n,method:e,params:r}),o}async sendNotification(e,r){await this.#h({jsonrpc:"2.0",method:e,params:r})}async#h(e){return this.#o=this.#o.then(async()=>{let r=this.#i.writable.getWriter();try{await r.write(e)}finally{r.releaseLock()}}).catch(r=>{console.error("ACP write error:",r)}),this.#o}},Is=class t extends Error{static{a(this,"RequestError")}code;data;constructor(e,r,n){super(r),this.code=e,this.name="RequestError",this.data=n}static parseError(e,r){return new t(-32700,`Parse error${r?`: ${r}`:""}`,e)}static invalidRequest(e,r){return new t(-32600,`Invalid request${r?`: ${r}`:""}`,e)}static methodNotFound(e){return new t(-32601,`"Method not found": ${e}`,{method:e})}static invalidParams(e,r){return new t(-32602,`Invalid params${r?`: ${r}`:""}`,e)}static internalError(e,r){return new t(-32603,`Internal error${r?`: ${r}`:""}`,e)}static authRequired(e,r){return new t(-32e3,`Authentication required${r?`: ${r}`:""}`,e)}static resourceNotFound(e){return new t(-32002,`Resource not found${e?`: ${e}`:""}`,e&&{uri:e})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};var mpe=require("node:stream");f();f();var TC=class extends sj{constructor(r){super(new wre,new Map);this.envSettings=new Map;this.env={...r};let n;this.#e=new Promise(s=>{n=s}),this.markReady=n,["DebugOverrideEngine","DebugOverrideProxyUrl","DebugOverrideCapiUrl","DebugUseEditorFetcher","UseSubsetMatching","UseChatLibCompletions","AppendPromptTokenCache","PromptPersistBasePath","AnthropicMessagesEndpoint","AnthropicThinkingEffort","EnableMapCodeFallback"].forEach(s=>{for(let c of["AGENT_DEBUG_","GITHUB_COPILOT_","GH_COPILOT_"]){let l=`${c}${m_o(s.replace(/^Debug/,""))}`;l in this.env&&this.envSettings.set(tt[s],this.env[l])}})}static{a(this,"AgentConfigProvider")}#e;async requireReady(){await this.#e}getOptionalOverride(r){return super.getOptionalOverride(r)??this.envSettings.get(r)}};function m_o(t){return t.replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase()}a(m_o,"camelCaseToSnakeCaseAllCaps");var g_o="unknown-editor",Bnn="unknown-editor-plugin",s9=class extends Nr{static{a(this,"AgentEditorInfo")}setEditorAndPluginInfo(e,r,n=[]){this._editorInfo=r,this._editorPluginInfo=e,this._relatedPluginInfo=n}setCopilotIntegrationId(e){this._copilotIntegrationId=e}getEditorInfo(){return this._editorInfo?this._editorInfo:{name:g_o,version:"0"}}getEditorPluginInfo(){return this._editorPluginInfo?this._editorPluginInfo:{name:Bnn,version:"0"}}getRelatedPluginInfo(){return this._relatedPluginInfo??[]}getCopilotIntegrationId(){return this._copilotIntegrationId}};function Lnn(t){return t.getEditorPluginInfo().name!==Bnn}a(Lnn,"hasValidInfo");f();f();var u$e=new Se("agenticTurnProcessor"),C1e=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(Na),this.chatFetcher=this.chatFetcher??new ya(e.ctx),this.turnSuggestions=new _F(e.ctx,this.chatFetcher),this.conversation=e.conversation,this.turn=e.turn,this.transcriptPersistence=new vh(e.ctx),this.hookTrigger=new Pie(e.ctx,e.conversation,e.turn.workspaceFolders||[])}static{a(this,"AgenticTurnProcessor")}async process(e,r,n,o,s,c){try{await this.processWithModelAndToolCall(e,r,this.turnContext,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l);let u=l instanceof Error?l.message:String(l);this.turn.status="error",this.updateTurnResponseWithError(u),l instanceof Error?await this.fireErrorOccurredHook(l):await this.fireErrorOccurredHook(new Error(String(l))),await this.endProgress({error:{message:u,code:Ene.Unknown,responseIsIncomplete:!0}})}}async processWithModelAndToolCall(e,r,n,o,s,c,l){if(r.isCancellationRequested)return;await this.conversationProgress.begin(this.conversation,this.turn,e),await this.fireUserPromptSubmittedHook(this.turn.request.message),await this.recordAssistantTurnStart();let u=await rc(this.turnContext.ctx,this.turnContext,{languageId:s?.detectedLanguageId??""});if(this.turn.chatMode!==void 0&&!CHr(this.turn.chatMode)){let m=u.extendedBy({mode:this.turn.getChatModeForTelemetry()});at(this.turnContext.ctx,"customAgent.turn",m),Kn(this.turnContext.ctx,"customAgent.turn",m)}r.onCancellationRequested(async()=>{u$e.info(this.turnContext.ctx,`Cancellation requested for turn ${this.turn.id}`),this.turn.status="cancelled",await this.cancelProgress()});let d=M$().find(m=>m.id===this.turn.template?.templateId);if(d?.response){await this.handleTemplateResponse(d,this.turn.template.userQuestion,r);return}let h=(await FT(this.turnContext.ctx)).find(m=>m.slug===this.turn.agent?.agentSlug);await this.collectContext(n,r,u,d,h);try{let m=l&&c?await nk(this.turnContext.ctx,l,c):await $o.getModelConfiguration(this.turnContext.ctx,"edits",c,void 0,this.conversation.id.toString(),aF(this.conversation.turns));this.turnContext.setResolvedModelConfiguration(m);try{await this.turnContext.ctx.get(yC).checkAndCompress(this.conversation,m,"pre-turn",r)}catch(y){Ge.exception(this.turnContext.ctx,y,"Pre-turn automatic compression check failed")}await new zie(this.turnContext,this.chatFetcher,m,u).run(r);let A={suggestedTitle:void 0};if(this.strategy.computeSuggestions){let y=await this.fetchSuggestedTitle(r,u.extendedBy({messageSource:"chat.user"},{}));typeof y=="string"&&y!==""&&(A.suggestedTitle=y)}await this.endProgress(A)}catch(m){if(m instanceof VF)u$e.info(this.turnContext.ctx,`Tool call canceled for turn ${this.turn.id}`,m),this.turn.status="cancelled",await this.cancelProgress();else if(m instanceof Sc)u$e.info(this.turnContext.ctx,`Turn ${this.turn.id} was cancelled`,m),this.turn.status="cancelled",this.updateTurnResponseWithError("Cancelled by user"),await this.cancelProgress();else if(m instanceof LO)this.turn.status="error",this.updateTurnResponseWithError(m.message),await this.fireErrorOccurredHook(m),await this.endProgress({error:{message:m.message,code:Ene.ToolRoundExceedError,responseIsIncomplete:!0}});else if(m instanceof Rm)this.turn.status="error",this.updateTurnResponseWithError(m.message),await this.fireErrorOccurredHook(m),await this.endProgress({error:m.conversationError});else throw u$e.error(this.turnContext.ctx,`Error in processing turn ${this.turn.id}`,m),m}}async collectContext(e,r,n,o,s){let c=!!s&&typeof s.additionalSkills=="function",l=!!o&&typeof o.requiredSkills=="function";if(!c&&!l)return;let d=await new Lne(this.turnContext.ctx,this.chatFetcher).collectContext(e,r,n,this.strategy.uiKind,o,s);this.turn.skills=d.skillIds.map(p=>({skillId:p}))}async fetchSuggestedTitle(e,r){let n=await this.turnSuggestions.fetchRawSuggestions(this.turnContext,e,this.strategy.uiKind,r);if(n)return Ge.debug(this.turnContext.ctx,"Computed suggested title",n.suggestedTitle),n.suggestedTitle}updateTurnResponseWithError(e){this.turn.response?.message?this.turn.response.message=Xj(this.turn.response?.message,{role:"assistant",content:e}):this.turn.response={message:e,type:"meta"}}async endProgress(e){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.recordAssistantTurnEnd(),await this.turnContext.agentToolCalls.finishAll("cancelled"),await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}async handleTemplateResponse(e,r,n){if(!e.response)return;let o=await e.response(this.turnContext,r,n);this.turn.response={type:"meta",message:o.message},this.turn.status=o.error?.responseIsFiltered?"filtered":o.error?.responseIsIncomplete?"error":"success",o.error?.responseIsFiltered||o.error?.responseIsIncomplete?(await this.conversationProgress.report(this.conversation,this.turn,{reply:"Sure, I can definitely do that!",annotations:o.annotations,notifications:o.notifications,references:o.references}),await this.turnContext.steps.finishAll(),await this.endProgress({error:{message:o.message,code:o.error?.code||0,responseIsIncomplete:o.error?.responseIsIncomplete,responseIsFiltered:o.error?.responseIsFiltered}})):(await this.conversationProgress.report(this.conversation,this.turn,{reply:o.message,annotations:o.annotations,notifications:o.notifications,references:o.references,confirmationRequest:o.confirmationRequest}),await this.endProgress())}async recordAssistantTurnStart(){if(this.transcriptPersistence.isEnabled())try{let e=Jqe(String(this.turn.id),null);await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,e)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn start transcript: ${e instanceof Error?e.message:String(e)}`)}}async recordAssistantTurnEnd(){if(this.transcriptPersistence.isEnabled())try{let e=this.turn.status==="error"?"error":this.turn.status==="cancelled"?"cancelled":"success",r=Xqe(String(this.turn.id),e,null,{turnStatus:this.turn.status});await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn end transcript: ${e instanceof Error?e.message:String(e)}`)}}async fireUserPromptSubmittedHook(e){let r=e??this.turn.request.message;await this.hookTrigger.fireUserPromptSubmittedHook(r,{turn:this.turn,conversationProgress:this.conversationProgress})}async fireErrorOccurredHook(e){await this.hookTrigger.fireErrorOccurredHook(e,{turn:this.turn,conversationProgress:this.conversationProgress})}};f();var p8t="collect-context",h8t="generate-response",d$e=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(Na),this.chatFetcher=this.chatFetcher??new ya(e.ctx),this.postProcessor=new Jne(e,this.chatFetcher,r.computeSuggestions),this.conversation=e.conversation,this.turn=e.turn,this.transcriptPersistence=new vh(e.ctx)}static{a(this,"ModelTurnProcessor")}async process(e,r,n,o,s,c){try{await this.processWithModel(e,r,this.turnContext,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l);let u=l instanceof Error?l.message:String(l);this.turn.status="error",this.turn.response={message:u,type:"meta"},await this.endProgress({error:{message:u,responseIsIncomplete:!0}})}}async processWithModel(e,r,n,o,s,c,l){await this.conversationProgress.begin(this.conversation,this.turn,e),await this.recordAssistantTurnStart();let u=await rc(this.turnContext.ctx,this.turnContext,{languageId:s?.detectedLanguageId??""});if(u=u.extendedBy({mode:this.turn.getChatModeForTelemetry(),...this.turn.userRequestedModel&&{modelId:this.turn.userRequestedModel}}),r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let d=M$().find(g=>g.id===this.turn.template?.templateId);if(d?.response){await this.handleTemplateResponse(d,this.turn.template.userQuestion,r);return}let p=(await FT(this.turnContext.ctx)).find(g=>g.slug===this.turn.agent?.agentSlug);if(p){let g=await this.checkAgentPreconditions(p);if(g){await this.endProgress(g);return}}await n.steps.start(p8t,"Collecting context"),await this.collectContext(n,r,u,this.strategy.uiKind,d,p);let h;l?h="customized":c?h=(await $o.getModelConfiguration(this.turnContext.ctx,"user",c,void 0,this.conversation.id.toString(),aF(this.conversation.turns))).uiName:h=void 0;let m=await this.strategy.buildConversationPrompt(n,s?.detectedLanguageId??"",void 0,h);if(!m)await n.steps.error(p8t,"Failed to collect context"),await this.endTurnWithResponse(this.strategy.earlyReturnResponse,"error");else{await n.steps.finish(p8t),await n.steps.start(h8t,"Generating response");let g=this.augmentTelemetry(m,u,d,o,s);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let A=await this.fetchConversationResponse(m.messages,r,u.extendedBy({messageSource:"chat.user"},{promptTokenLen:m.tokens}),g,s,c,l),y=await this.strategy.processResponse(this.turn);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(A,n),await this.endProgress({error:A.error,followUp:A.followup,suggestedTitle:A.suggestedTitle,skillResolutions:m.skillResolutions,updatedDocuments:y}))}}async checkAgentPreconditions(e){try{let r=e.checkPreconditions?await e.checkPreconditions(this.turnContext.ctx,this.turn):void 0;if(r&&r.type==="authorizationRequired")return{unauthorized:{...r,agentName:e.name,agentSlug:e.slug}}}catch(r){Ge.error(this.turnContext.ctx,`Error checking preconditions for agent ${e.slug}`,r);let n=r instanceof Error?r.message:String(r);return this.turn.status="error",this.turn.response={message:n,type:"meta"},{error:{message:n,responseIsIncomplete:!0}}}}async endTurnWithResponse(e,r){this.turn.response={type:"meta",message:e},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:e}),await this.endProgress()}async handleTemplateResponse(e,r,n){if(!e.response)return;let o=await e.response(this.turnContext,r,n);this.turn.response={type:"meta",message:o.message},this.turn.status=o.error?.responseIsFiltered?"filtered":o.error?.responseIsIncomplete?"error":"success",o.error?.responseIsFiltered||o.error?.responseIsIncomplete?(await this.conversationProgress.report(this.conversation,this.turn,{reply:"Sure, I can definitely do that!",annotations:o.annotations,notifications:o.notifications,references:o.references}),await this.turnContext.steps.finishAll(),await this.endProgress({error:{message:o.message,code:o.error?.code||0,responseIsIncomplete:o.error?.responseIsIncomplete,responseIsFiltered:o.error?.responseIsFiltered}})):(await this.conversationProgress.report(this.conversation,this.turn,{reply:o.message,annotations:o.annotations,notifications:o.notifications,references:o.references,confirmationRequest:o.confirmationRequest}),await this.endProgress())}async collectContext(e,r,n,o,s,c){let u=await new Lne(this.turnContext.ctx,this.chatFetcher).collectContext(e,r,n,o,s,c);return this.turn.skills=u.skillIds.map(d=>({skillId:d})),u}async fetchConversationResponse(e,r,n,o,s,c,l){r.onCancellationRequested(async()=>{await this.cancelProgress()});let u="",d=0,p=new SF((y,E,_,v,b,I)=>{let x=y.trim(),R=x.match(aCe)!==null&&x.endsWith("-->");if(this.conversationProgress.report(this.conversation,this.turn,{reply:y,annotations:E,references:_,hideText:R,notifications:v.map(w=>({severity:"warning",message:w.message})),thinking:I}),this.turn.response?this.turn.response.message=zUe(this.turn.response.message,y):this.turn.response={message:y,type:"model"},this.turn.annotations.push(...E??[]),u+=y,this.strategy.currentDocument){let w=this.strategy.extractEditsFromResponse(u,this.strategy.currentDocument);w&&w.length>0&&(u="",this.conversationProgress.report(this.conversation,this.turn,{codeEdits:w}),d+=w.length)}}),h=l&&c?await nk(this.turnContext.ctx,l,c):await $o.getModelConfiguration(this.turnContext.ctx,"user",c,void 0,this.conversation.id.toString(),jHr(e));e=$o.transformMessages(e,h.modelFamily),this.turnContext.setResolvedModelConfiguration(h);try{await this.turnContext.ctx.get(yC).checkAndCompress(this.conversation,h,"pre-turn",r)}catch(y){Ge.exception(this.turnContext.ctx,y,"Pre-turn automatic compression check failed")}let m=this.turn.getResolvedModelId();m&&(o=o.extendedBy({modelId:m}));let g={modelConfiguration:h,messages:e,uiKind:this.strategy.uiKind,intentParams:{intent:!0,intent_threshold:.7,intent_content:dn(this.turn.request.message)},llmInteraction:this.turnContext.toLlmInteraction()},A=await this.chatFetcher.fetchResponse(g,r,n,(y,E)=>p.isFinishedAfter(y,E));return o=o.extendedBy(void 0,{numCodeEdits:d}),await this.postProcessor.postProcess(A,r,p.appliedText,n,o,dn(this.turn.request.message),this.strategy.uiKind,s)}augmentTelemetry(e,r,n,o,s){let c;return o?(this.turn.request.type="follow-up",LHr(this.turnContext.ctx,this.conversation,this.strategy.uiKind,dn(this.turn.request.message),e.tokens,o.type,o.id,s,r),c=LEe(this.conversation,this.strategy.uiKind,dn(this.turn.request.message).length,e.tokens,o.type,o.id,r,e.skillResolutions)):c=LEe(this.conversation,this.strategy.uiKind,dn(this.turn.request.message).length,e.tokens,n?.id,void 0,r,e.skillResolutions),c}async finishGenerateResponseStep(e,r){e.error?await r.steps.error(h8t,e.error.message):await r.steps.finish(h8t)}async endProgress(e){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}async recordAssistantTurnStart(){if(this.transcriptPersistence.isEnabled())try{let e=Jqe(String(this.turn.id),null);await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,e)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn start transcript: ${e instanceof Error?e.message:String(e)}`)}}async recordAssistantTurnEnd(){if(this.transcriptPersistence.isEnabled())try{let e=this.turn.status==="error"?"error":this.turn.status==="cancelled"?"cancelled":"success",r=Xqe(String(this.turn.id),e,null,{turnStatus:this.turn.status});await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn end transcript: ${e instanceof Error?e.message:String(e)}`)}}};f();f();var ggi=de(Su()),Agi=de(Fx());f();f();var lt={ParseError:-32700,InvalidRequest:-32600,MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,ServerNotInitialized:-32002,RequestCancelled:-32800,ContentModified:-32801,ServerCancelled:-32802,NoCopilotToken:1e3,DeviceFlowFailed:1001,CopilotNotAvailable:1002,NoGitHubToken:1003,CodeFlowFailed:1004,NoBrowserAvailable:1005};var Om=class extends Error{static{a(this,"SchemaValidationError")}constructor(e){super(Fnn(e))}};function He(t,e){let r=Ol.Compile(t);return async(n,o,s)=>{if(!r.Check(s)){let c=Fnn(r.Errors(s));return[null,{code:lt.InvalidParams,message:c}]}return e(n,o,s)}}a(He,"addMethodHandlerValidation");function Fnn(t){return`Schema validation failed with the following errors: +`,u=t.getWriter();try{await u.write(r.encode(l))}finally{u.releaseLock()}}});return{readable:o,writable:s}}a(hCe,"ndJsonStream");var mCe=class{static{a(this,"AgentSideConnection")}#e;constructor(e,r){let n=e(this),o=a(async(c,l)=>{switch(c){case Qc.initialize:{let u=d8t.parse(l);return n.initialize(u)}case Qc.session_new:{let u=u8t.parse(l);return n.newSession(u)}case Qc.session_load:{if(!n.loadSession)throw _s.methodNotFound(c);let u=y8t.parse(l);return n.loadSession(u)}case Qc.session_list:{if(!n.listSessions)throw _s.methodNotFound(c);let u=c8t.parse(l);return n.listSessions(u)}case Qc.session_fork:{if(!n.unstable_forkSession)throw _s.methodNotFound(c);let u=g8t.parse(l);return n.unstable_forkSession(u)}case Qc.session_resume:{if(!n.unstable_resumeSession)throw _s.methodNotFound(c);let u=C8t.parse(l);return n.unstable_resumeSession(u)}case Qc.session_close:{if(!n.unstable_closeSession)throw _s.methodNotFound(c);let u=h8t.parse(l);return n.unstable_closeSession(u)}case Qc.session_set_mode:{if(!n.setSessionMode)throw _s.methodNotFound(c);let u=b8t.parse(l);return await n.setSessionMode(u)??{}}case Qc.authenticate:{let u=a8t.parse(l);return await n.authenticate(u)??{}}case Qc.session_prompt:{let u=x8t.parse(l);return n.prompt(u)}case Qc.session_set_model:{if(!n.unstable_setSessionModel)throw _s.methodNotFound(c);let u=T8t.parse(l);return await n.unstable_setSessionModel(u)??{}}case Qc.session_set_config_option:{if(!n.setSessionConfigOption)throw _s.methodNotFound(c);let u=v8t.parse(l);return n.setSessionConfigOption(u)}default:if(n.extMethod)return n.extMethod(c,l);throw _s.methodNotFound(c)}},"requestHandler"),s=a(async(c,l)=>{switch(c){case Qc.session_cancel:{let u=p8t.parse(l);return n.cancel(u)}default:if(n.extNotification)return n.extNotification(c,l);throw _s.methodNotFound(c)}},"notificationHandler");this.#e=new Aje(o,s,r)}async sessionUpdate(e){return await this.#e.sendNotification(gp.session_update,e)}async requestPermission(e){return await this.#e.sendRequest(gp.session_request_permission,e)}async readTextFile(e){return await this.#e.sendRequest(gp.fs_read_text_file,e)}async writeTextFile(e){return await this.#e.sendRequest(gp.fs_write_text_file,e)??{}}async createTerminal(e){let r=await this.#e.sendRequest(gp.terminal_create,e);return new D8t(r.terminalId,e.sessionId,this.#e)}async extMethod(e,r){return await this.#e.sendRequest(e,r)}async extNotification(e,r){return await this.#e.sendNotification(e,r)}get signal(){return this.#e.signal}get closed(){return this.#e.closed}},D8t=class{static{a(this,"TerminalHandle")}id;#e;#t;constructor(e,r,n){this.id=e,this.#e=r,this.#t=n}async currentOutput(){return await this.#t.sendRequest(gp.terminal_output,{sessionId:this.#e,terminalId:this.id})}async waitForExit(){return await this.#t.sendRequest(gp.terminal_wait_for_exit,{sessionId:this.#e,terminalId:this.id})}async kill(){return await this.#t.sendRequest(gp.terminal_kill,{sessionId:this.#e,terminalId:this.id})??{}}async release(){return await this.#t.sendRequest(gp.terminal_release,{sessionId:this.#e,terminalId:this.id})??{}}async[Symbol.asyncDispose](){await this.release()}},gje=class{static{a(this,"ClientSideConnection")}#e;constructor(e,r){let n=e(this),o=a(async(c,l)=>{switch(c){case gp.fs_write_text_file:{let u=k8t.parse(l);return n.writeTextFile?.(u)}case gp.fs_read_text_file:{let u=E8t.parse(l);return n.readTextFile?.(u)}case gp.session_request_permission:{let u=w8t.parse(l);return n.requestPermission(u)}case gp.terminal_create:{let u=m8t.parse(l);return n.createTerminal?.(u)}case gp.terminal_output:{let u=S8t.parse(l);return n.terminalOutput?.(u)}case gp.terminal_release:{let u=_8t.parse(l);return await n.releaseTerminal?.(u)??{}}case gp.terminal_wait_for_exit:{let u=P8t.parse(l);return n.waitForTerminalExit?.(u)}case gp.terminal_kill:{let u=A8t.parse(l);return await n.killTerminal?.(u)??{}}default:if(n.extMethod)return n.extMethod(c,l);throw _s.methodNotFound(c)}},"requestHandler"),s=a(async(c,l)=>{switch(c){case gp.session_update:{let u=R8t.parse(l);return n.sessionUpdate(u)}default:if(n.extNotification)return n.extNotification(c,l);throw _s.methodNotFound(c)}},"notificationHandler");this.#e=new Aje(o,s,r)}async initialize(e){return await this.#e.sendRequest(Qc.initialize,e)}async newSession(e){return await this.#e.sendRequest(Qc.session_new,e)}async loadSession(e){return await this.#e.sendRequest(Qc.session_load,e)??{}}async unstable_forkSession(e){return await this.#e.sendRequest(Qc.session_fork,e)}async listSessions(e){return await this.#e.sendRequest(Qc.session_list,e)}async unstable_resumeSession(e){return await this.#e.sendRequest(Qc.session_resume,e)}async unstable_closeSession(e){return await this.#e.sendRequest(Qc.session_close,e)}async setSessionMode(e){return await this.#e.sendRequest(Qc.session_set_mode,e)??{}}async unstable_setSessionModel(e){return await this.#e.sendRequest(Qc.session_set_model,e)??{}}async setSessionConfigOption(e){return await this.#e.sendRequest(Qc.session_set_config_option,e)}async authenticate(e){return await this.#e.sendRequest(Qc.authenticate,e)??{}}async prompt(e){return await this.#e.sendRequest(Qc.session_prompt,e)}async cancel(e){return await this.#e.sendNotification(Qc.session_cancel,e)}async extMethod(e,r){return await this.#e.sendRequest(e,r)}async extNotification(e,r){return await this.#e.sendNotification(e,r)}get signal(){return this.#e.signal}get closed(){return this.#e.closed}},Aje=class{static{a(this,"Connection")}#e=new Map;#t=0;#n;#r;#i;#o=Promise.resolve();#a=new AbortController;#s;constructor(e,r,n){this.#n=e,this.#r=r,this.#i=n,this.#s=new Promise(o=>{this.#a.signal.addEventListener("abort",()=>o())}),this.#c()}get signal(){return this.#a.signal}get closed(){return this.#s}async#c(){let e=this.#i.readable.getReader();try{for(;;){let{value:r,done:n}=await e.read();if(n)break;if(r)try{this.#l(r)}catch(o){console.error("Unexpected error during message processing:",r,o),"id"in r&&r.id!==void 0&&this.#h({jsonrpc:"2.0",id:r.id,error:{code:-32700,message:"Parse error"}})}}}finally{e.releaseLock(),this.#a.abort()}}async#l(e){if("method"in e&&"id"in e){let r=await this.#u(e.method,e.params);"error"in r&&console.error("Error handling request",e,r.error),await this.#h({jsonrpc:"2.0",id:e.id,...r})}else if("method"in e){let r=await this.#f(e.method,e.params);"error"in r&&console.error("Error handling notification",e,r.error)}else"id"in e?this.#p(e):console.error("Invalid message",{message:e})}async#u(e,r){try{return{result:await this.#n(e,r)??null}}catch(n){if(n instanceof _s)return n.toResult();if(n instanceof C_e.ZodError)return _s.invalidParams(n.format()).toResult();let o;(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")&&(o=n.message);try{return _s.internalError(o?JSON.parse(o):{}).toResult()}catch{return _s.internalError({details:o}).toResult()}}}async#f(e,r){try{return await this.#r(e,r),{result:null}}catch(n){if(n instanceof _s)return n.toResult();if(n instanceof C_e.ZodError)return _s.invalidParams(n.format()).toResult();let o;(n instanceof Error||typeof n=="object"&&n!=null&&"message"in n&&typeof n.message=="string")&&(o=n.message);try{return _s.internalError(o?JSON.parse(o):{}).toResult()}catch{return _s.internalError({details:o}).toResult()}}}#p(e){let r=this.#e.get(e.id);r?("result"in e?r.resolve(e.result):"error"in e&&r.reject(e.error),this.#e.delete(e.id)):console.error("Got response to unknown request",e.id)}async sendRequest(e,r){let n=this.#t++,o=new Promise((s,c)=>{this.#e.set(n,{resolve:s,reject:c})});return await this.#h({jsonrpc:"2.0",id:n,method:e,params:r}),o}async sendNotification(e,r){await this.#h({jsonrpc:"2.0",method:e,params:r})}async#h(e){return this.#o=this.#o.then(async()=>{let r=this.#i.writable.getWriter();try{await r.write(e)}finally{r.releaseLock()}}).catch(r=>{console.error("ACP write error:",r)}),this.#o}},_s=class t extends Error{static{a(this,"RequestError")}code;data;constructor(e,r,n){super(r),this.code=e,this.name="RequestError",this.data=n}static parseError(e,r){return new t(-32700,`Parse error${r?`: ${r}`:""}`,e)}static invalidRequest(e,r){return new t(-32600,`Invalid request${r?`: ${r}`:""}`,e)}static methodNotFound(e){return new t(-32601,`"Method not found": ${e}`,{method:e})}static invalidParams(e,r){return new t(-32602,`Invalid params${r?`: ${r}`:""}`,e)}static internalError(e,r){return new t(-32603,`Internal error${r?`: ${r}`:""}`,e)}static authRequired(e,r){return new t(-32e3,`Authentication required${r?`: ${r}`:""}`,e)}static resourceNotFound(e){return new t(-32002,`Resource not found${e?`: ${e}`:""}`,e&&{uri:e})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};var R0e=require("node:stream");f();f();var f_=class extends pH{constructor(r){super(new Hte,new Map);this.envSettings=new Map;this.env={...r};let n;this.#e=new Promise(s=>{n=s}),this.markReady=n,["DebugOverrideEngine","DebugOverrideProxyUrl","DebugOverrideCapiUrl","DebugUseEditorFetcher","UseSubsetMatching","UseChatLibCompletions","AppendPromptTokenCache","PromptPersistBasePath","AnthropicMessagesEndpoint","AnthropicThinkingEffort","EnableMapCodeFallback"].forEach(s=>{for(let c of["AGENT_DEBUG_","GITHUB_COPILOT_","GH_COPILOT_"]){let l=`${c}${gvo(s.replace(/^Debug/,""))}`;l in this.env&&this.envSettings.set(tt[s],this.env[l])}})}static{a(this,"AgentConfigProvider")}#e;async requireReady(){await this.#e}getOptionalOverride(r){return super.getOptionalOverride(r)??this.envSettings.get(r)}};function gvo(t){return t.replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase()}a(gvo,"camelCaseToSnakeCaseAllCaps");var Avo="unknown-editor",Oin="unknown-editor-plugin",NF=class extends Dr{static{a(this,"AgentEditorInfo")}setEditorAndPluginInfo(e,r,n=[]){this._editorInfo=r,this._editorPluginInfo=e,this._relatedPluginInfo=n}setCopilotIntegrationId(e){this._copilotIntegrationId=e}getEditorInfo(){return this._editorInfo?this._editorInfo:{name:Avo,version:"0"}}getEditorPluginInfo(){return this._editorPluginInfo?this._editorPluginInfo:{name:Oin,version:"0"}}getRelatedPluginInfo(){return this._relatedPluginInfo??[]}getCopilotIntegrationId(){return this._copilotIntegrationId}};function Bin(t){return t.getEditorPluginInfo().name!==Oin}a(Bin,"hasValidInfo");f();f();var yje=new Se("agenticTurnProcessor"),ACe=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(xa),this.chatFetcher=this.chatFetcher??new fa(e.ctx),this.turnSuggestions=new z6(e.ctx,this.chatFetcher),this.conversation=e.conversation,this.turn=e.turn,this.transcriptPersistence=new mh(e.ctx),this.hookTrigger=new Hne(e.ctx,e.conversation,e.turn.workspaceFolders||[])}static{a(this,"AgenticTurnProcessor")}async process(e,r,n,o,s,c){try{await this.processWithModelAndToolCall(e,r,this.turnContext,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l);let u=l instanceof Error?l.message:String(l);this.turn.status="error",this.updateTurnResponseWithError(u),l instanceof Error?await this.fireErrorOccurredHook(l):await this.fireErrorOccurredHook(new Error(String(l))),await this.endProgress({error:{message:u,code:Dre.Unknown,responseIsIncomplete:!0}})}}async processWithModelAndToolCall(e,r,n,o,s,c,l){if(r.isCancellationRequested)return;await this.conversationProgress.begin(this.conversation,this.turn,e),await this.fireUserPromptSubmittedHook(this.turn.request.message),await this.recordAssistantTurnStart();let u=await Ja(this.turnContext.ctx,this.turnContext,{languageId:s?.detectedLanguageId??""});if(this.turn.chatMode!==void 0&&!Ejr(this.turn.chatMode)){let m=u.extendedBy({mode:this.turn.getChatModeForTelemetry()});st(this.turnContext.ctx,"customAgent.turn",m),O2(this.turnContext.ctx,"customAgent.turn",m)}r.onCancellationRequested(async()=>{yje.info(this.turnContext.ctx,`Cancellation requested for turn ${this.turn.id}`),this.turn.status="cancelled",await this.cancelProgress()});let d=qj().find(m=>m.id===this.turn.template?.templateId);if(d?.response){await this.handleTemplateResponse(d,this.turn.template.userQuestion,r);return}let h=(await IT(this.turnContext.ctx)).find(m=>m.slug===this.turn.agent?.agentSlug);await this.collectContext(n,r,u,d,h);try{let m=l&&c?await $P(this.turnContext.ctx,l,c):await qo.getModelConfiguration(this.turnContext.ctx,"edits",c,void 0,this.conversation.id.toString(),M6(this.conversation.turns));this.turnContext.setResolvedModelConfiguration(m);try{await this.turnContext.ctx.get(s_).checkAndCompress(this.conversation,m,"pre-turn",r)}catch(y){Ge.exception(this.turnContext.ctx,y,"Pre-turn automatic compression check failed")}await new cie(this.turnContext,this.chatFetcher,m,u).run(r);let A={suggestedTitle:void 0};if(this.strategy.computeSuggestions){let y=await this.fetchSuggestedTitle(r,u.extendedBy({messageSource:"chat.user"},{}));typeof y=="string"&&y!==""&&(A.suggestedTitle=y)}await this.endProgress(A)}catch(m){if(m instanceof EF)yje.info(this.turnContext.ctx,`Tool call canceled for turn ${this.turn.id}`,m),this.turn.status="cancelled",await this.cancelProgress();else if(m instanceof Ec)yje.info(this.turnContext.ctx,`Turn ${this.turn.id} was cancelled`,m),this.turn.status="cancelled",this.updateTurnResponseWithError("Cancelled by user"),await this.cancelProgress();else if(m instanceof E4)this.turn.status="error",this.updateTurnResponseWithError(m.message),await this.fireErrorOccurredHook(m),await this.endProgress({error:{message:m.message,code:Dre.ToolRoundExceedError,responseIsIncomplete:!0}});else if(m instanceof Em)this.turn.status="error",this.updateTurnResponseWithError(m.message),await this.fireErrorOccurredHook(m),await this.endProgress({error:m.conversationError});else throw yje.error(this.turnContext.ctx,`Error in processing turn ${this.turn.id}`,m),m}}async collectContext(e,r,n,o,s){let c=!!s&&typeof s.additionalSkills=="function",l=!!o&&typeof o.requiredSkills=="function";if(!c&&!l)return;let d=await new Kre(this.turnContext.ctx,this.chatFetcher).collectContext(e,r,n,this.strategy.uiKind,o,s);this.turn.skills=d.skillIds.map(p=>({skillId:p}))}async fetchSuggestedTitle(e,r){let n=await this.turnSuggestions.fetchRawSuggestions(this.turnContext,e,this.strategy.uiKind,r);if(n)return Ge.debug(this.turnContext.ctx,"Computed suggested title",n.suggestedTitle),n.suggestedTitle}updateTurnResponseWithError(e){this.turn.response?.message?this.turn.response.message=oj(this.turn.response?.message,{role:"assistant",content:e}):this.turn.response={message:e,type:"meta"}}async endProgress(e){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.recordAssistantTurnEnd(),await this.turnContext.agentToolCalls.finishAll("cancelled"),await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}async handleTemplateResponse(e,r,n){if(!e.response)return;let o=await e.response(this.turnContext,r,n);this.turn.response={type:"meta",message:o.message},this.turn.status=o.error?.responseIsFiltered?"filtered":o.error?.responseIsIncomplete?"error":"success",o.error?.responseIsFiltered||o.error?.responseIsIncomplete?(await this.conversationProgress.report(this.conversation,this.turn,{reply:"Sure, I can definitely do that!",annotations:o.annotations,notifications:o.notifications,references:o.references}),await this.turnContext.steps.finishAll(),await this.endProgress({error:{message:o.message,code:o.error?.code||0,responseIsIncomplete:o.error?.responseIsIncomplete,responseIsFiltered:o.error?.responseIsFiltered}})):(await this.conversationProgress.report(this.conversation,this.turn,{reply:o.message,annotations:o.annotations,notifications:o.notifications,references:o.references,confirmationRequest:o.confirmationRequest}),await this.endProgress())}async recordAssistantTurnStart(){if(this.transcriptPersistence.isEnabled())try{let e=oqe(String(this.turn.id),null);await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,e)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn start transcript: ${e instanceof Error?e.message:String(e)}`)}}async recordAssistantTurnEnd(){if(this.transcriptPersistence.isEnabled())try{let e=this.turn.status==="error"?"error":this.turn.status==="cancelled"?"cancelled":"success",r=sqe(String(this.turn.id),e,null,{turnStatus:this.turn.status});await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn end transcript: ${e instanceof Error?e.message:String(e)}`)}}async fireUserPromptSubmittedHook(e){let r=e??this.turn.request.message;await this.hookTrigger.fireUserPromptSubmittedHook(r,{turn:this.turn,conversationProgress:this.conversationProgress})}async fireErrorOccurredHook(e){await this.hookTrigger.fireErrorOccurredHook(e,{turn:this.turn,conversationProgress:this.conversationProgress})}};f();var N8t="collect-context",M8t="generate-response",Eje=class{constructor(e,r,n){this.turnContext=e;this.strategy=r;this.chatFetcher=n;this.conversationProgress=e.ctx.get(xa),this.chatFetcher=this.chatFetcher??new fa(e.ctx),this.postProcessor=new une(e,this.chatFetcher,r.computeSuggestions),this.conversation=e.conversation,this.turn=e.turn,this.transcriptPersistence=new mh(e.ctx)}static{a(this,"ModelTurnProcessor")}async process(e,r,n,o,s,c){try{await this.processWithModel(e,r,this.turnContext,n,o,s,c)}catch(l){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turn.id}`,l);let u=l instanceof Error?l.message:String(l);this.turn.status="error",this.turn.response={message:u,type:"meta"},await this.endProgress({error:{message:u,responseIsIncomplete:!0}})}}async processWithModel(e,r,n,o,s,c,l){await this.conversationProgress.begin(this.conversation,this.turn,e),await this.recordAssistantTurnStart();let u=await Ja(this.turnContext.ctx,this.turnContext,{languageId:s?.detectedLanguageId??""});if(u=u.extendedBy({mode:this.turn.getChatModeForTelemetry(),...this.turn.userRequestedModel&&{modelId:this.turn.userRequestedModel}}),r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let d=qj().find(g=>g.id===this.turn.template?.templateId);if(d?.response){await this.handleTemplateResponse(d,this.turn.template.userQuestion,r);return}let p=(await IT(this.turnContext.ctx)).find(g=>g.slug===this.turn.agent?.agentSlug);if(p){let g=await this.checkAgentPreconditions(p);if(g){await this.endProgress(g);return}}await n.steps.start(N8t,"Collecting context"),await this.collectContext(n,r,u,this.strategy.uiKind,d,p);let h;l?h="customized":c?h=(await qo.getModelConfiguration(this.turnContext.ctx,"user",c,void 0,this.conversation.id.toString(),M6(this.conversation.turns))).uiName:h=void 0;let m=await this.strategy.buildConversationPrompt(n,s?.detectedLanguageId??"",void 0,h);if(!m)await n.steps.error(N8t,"Failed to collect context"),await this.endTurnWithResponse(this.strategy.earlyReturnResponse,"error");else{await n.steps.finish(N8t),await n.steps.start(M8t,"Generating response");let g=this.augmentTelemetry(m,u,d,o,s);if(r.isCancellationRequested){this.turn.status="cancelled",await this.cancelProgress();return}let A=await this.fetchConversationResponse(m.messages,r,u.extendedBy({messageSource:"chat.user"},{promptTokenLen:m.tokens}),g,s,c,l),y=await this.strategy.processResponse(this.turn);this.turn.status==="cancelled"&&this.turn.response?.type==="user"?await this.cancelProgress():(await this.finishGenerateResponseStep(A,n),await this.endProgress({error:A.error,followUp:A.followup,suggestedTitle:A.suggestedTitle,skillResolutions:m.skillResolutions,updatedDocuments:y}))}}async checkAgentPreconditions(e){try{let r=e.checkPreconditions?await e.checkPreconditions(this.turnContext.ctx,this.turn):void 0;if(r&&r.type==="authorizationRequired")return{unauthorized:{...r,agentName:e.name,agentSlug:e.slug}}}catch(r){Ge.error(this.turnContext.ctx,`Error checking preconditions for agent ${e.slug}`,r);let n=r instanceof Error?r.message:String(r);return this.turn.status="error",this.turn.response={message:n,type:"meta"},{error:{message:n,responseIsIncomplete:!0}}}}async endTurnWithResponse(e,r){this.turn.response={type:"meta",message:e},this.turn.status=r,await this.conversationProgress.report(this.conversation,this.turn,{reply:e}),await this.endProgress()}async handleTemplateResponse(e,r,n){if(!e.response)return;let o=await e.response(this.turnContext,r,n);this.turn.response={type:"meta",message:o.message},this.turn.status=o.error?.responseIsFiltered?"filtered":o.error?.responseIsIncomplete?"error":"success",o.error?.responseIsFiltered||o.error?.responseIsIncomplete?(await this.conversationProgress.report(this.conversation,this.turn,{reply:"Sure, I can definitely do that!",annotations:o.annotations,notifications:o.notifications,references:o.references}),await this.turnContext.steps.finishAll(),await this.endProgress({error:{message:o.message,code:o.error?.code||0,responseIsIncomplete:o.error?.responseIsIncomplete,responseIsFiltered:o.error?.responseIsFiltered}})):(await this.conversationProgress.report(this.conversation,this.turn,{reply:o.message,annotations:o.annotations,notifications:o.notifications,references:o.references,confirmationRequest:o.confirmationRequest}),await this.endProgress())}async collectContext(e,r,n,o,s,c){let u=await new Kre(this.turnContext.ctx,this.chatFetcher).collectContext(e,r,n,o,s,c);return this.turn.skills=u.skillIds.map(d=>({skillId:d})),u}async fetchConversationResponse(e,r,n,o,s,c,l){r.onCancellationRequested(async()=>{await this.cancelProgress()});let u="",d=0,p=new X6((y,E,_,v,b,I)=>{let x=y.trim(),w=x.match(oEe)!==null&&x.endsWith("-->");if(this.conversationProgress.report(this.conversation,this.turn,{reply:y,annotations:E,references:_,hideText:w,notifications:v.map(R=>({severity:"warning",message:R.message})),thinking:I}),this.turn.response?this.turn.response.message=rUe(this.turn.response.message,y):this.turn.response={message:y,type:"model"},this.turn.annotations.push(...E??[]),u+=y,this.strategy.currentDocument){let R=this.strategy.extractEditsFromResponse(u,this.strategy.currentDocument);R&&R.length>0&&(u="",this.conversationProgress.report(this.conversation,this.turn,{codeEdits:R}),d+=R.length)}}),h=l&&c?await $P(this.turnContext.ctx,l,c):await qo.getModelConfiguration(this.turnContext.ctx,"user",c,void 0,this.conversation.id.toString(),Hjr(e));e=qo.transformMessages(e,h.modelFamily),this.turnContext.setResolvedModelConfiguration(h);try{await this.turnContext.ctx.get(s_).checkAndCompress(this.conversation,h,"pre-turn",r)}catch(y){Ge.exception(this.turnContext.ctx,y,"Pre-turn automatic compression check failed")}let m=this.turn.getResolvedModelId();m&&(o=o.extendedBy({modelId:m}));let g={modelConfiguration:h,messages:e,uiKind:this.strategy.uiKind,intentParams:{intent:!0,intent_threshold:.7,intent_content:dn(this.turn.request.message)},llmInteraction:this.turnContext.toLlmInteraction()},A=await this.chatFetcher.fetchResponse(g,r,n,(y,E)=>p.isFinishedAfter(y,E));return o=o.extendedBy(void 0,{numCodeEdits:d}),await this.postProcessor.postProcess(A,r,p.appliedText,n,o,dn(this.turn.request.message),this.strategy.uiKind,s)}augmentTelemetry(e,r,n,o,s){let c;return o?(this.turn.request.type="follow-up",Bjr(this.turnContext.ctx,this.conversation,this.strategy.uiKind,dn(this.turn.request.message),e.tokens,o.type,o.id,s,r),c=Oye(this.conversation,this.strategy.uiKind,dn(this.turn.request.message).length,e.tokens,o.type,o.id,r,e.skillResolutions)):c=Oye(this.conversation,this.strategy.uiKind,dn(this.turn.request.message).length,e.tokens,n?.id,void 0,r,e.skillResolutions),c}async finishGenerateResponseStep(e,r){e.error?await r.steps.error(M8t,e.error.message):await r.steps.finish(M8t)}async endProgress(e){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll(),await this.conversationProgress.end(this.conversation,this.turn,e)}async cancelProgress(){await this.recordAssistantTurnEnd(),await this.turnContext.steps.finishAll("cancelled"),await this.conversationProgress.cancel(this.conversation,this.turn)}async recordAssistantTurnStart(){if(this.transcriptPersistence.isEnabled())try{let e=oqe(String(this.turn.id),null);await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,e)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn start transcript: ${e instanceof Error?e.message:String(e)}`)}}async recordAssistantTurnEnd(){if(this.transcriptPersistence.isEnabled())try{let e=this.turn.status==="error"?"error":this.turn.status==="cancelled"?"cancelled":"success",r=sqe(String(this.turn.id),e,null,{turnStatus:this.turn.status});await this.transcriptPersistence.appendEvent(this.conversation.id,this.conversation.currentPartitionId,r)}catch(e){Ge.error(this.turnContext.ctx,`Failed to record assistant turn end transcript: ${e instanceof Error?e.message:String(e)}`)}}};f();f();var mAi=de(mu()),gAi=de(xx());f();f();var ct={ParseError:-32700,InvalidRequest:-32600,MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,ServerNotInitialized:-32002,RequestCancelled:-32800,ContentModified:-32801,ServerCancelled:-32802,NoCopilotToken:1e3,DeviceFlowFailed:1001,CopilotNotAvailable:1002,NoGitHubToken:1003,CodeFlowFailed:1004,NoBrowserAvailable:1005};var Sm=class extends Error{static{a(this,"SchemaValidationError")}constructor(e){super(Lin(e))}};function He(t,e){let r=wl.Compile(t);return async(n,o,s)=>{if(!r.Check(s)){let c=Lin(r.Errors(s));return[null,{code:ct.InvalidParams,message:c}]}return e(n,o,s)}}a(He,"addMethodHandlerValidation");function Lin(t){return`Schema validation failed with the following errors: ${Array.from(t).map(r=>`- ${r.path}: ${r.message}`).join(` -`)}`}a(Fnn,"createErrorMessage");f();f();f();f();var A_o=new Se("BackgroundAgent.Attachments");function Unn(t,e){let r=[];for(let n of t){let o=y_o(n);o?r.push(o):A_o.debug(e,`Skipping unsupported reference type for SDK attachment: ${n.type}`)}return r}a(Unn,"convertReferencesToAttachments");function y_o(t){switch(t.type){case"file":{let e=Pl(t.uri).fsPath;return t.selection?{type:"selection",filePath:e,displayName:e,text:"",selection:{start:{line:t.selection.start.line,character:t.selection.start.character},end:{line:t.selection.end.line,character:t.selection.end.character}}}:{type:"file",path:e,displayName:e}}case"directory":{let e=Pl(t.uri).fsPath;return{type:"directory",path:e,displayName:e}}default:return null}}a(y_o,"convertReferenceToAttachment");f();var Qnn=new Se("BackgroundAgent.CustomAgents");async function qnn(t,e){try{let n=await t.get(J1).listCustomAgents(e);return n.length>0&&Qnn.info(t,`Loaded ${n.length} custom agent(s) for session`),n.map(o=>E_o(o))}catch(r){return Qnn.warn(t,"Failed to load custom agents:",r),[]}}a(qnn,"loadCustomAgents");function E_o(t){let e=t.instruction??"";return{name:t.name,displayName:t.name,description:t.description??"",tools:t.tools??null,prompt:a(()=>Promise.resolve(e),"prompt"),disableModelInvocation:!1,model:t.model}}a(E_o,"toSweCustomAgent");f();function Gnn(t,e){switch(e.type){case"permission":t.respondToPermission(e.requestId,e.result);break;case"user_input":t.respondToUserInput(e.requestId,e.response);break;case"elicitation":t.respondToElicitation(e.requestId,e.response);break;case"exit_plan_mode":t.respondToExitPlanMode(e.requestId,e.response);break;case"queued_command":t.respondToQueuedCommand(e.requestId,e.result);break;case"external_tool":t.respondToExternalTool(e.requestId,e.result);break;default:throw new Error(`Unknown interaction type: ${e.type}`)}return{success:!0}}a(Gnn,"routeInteraction");f();f();var Upn=de(require("crypto")),Qpn=de(require("fs")),qWe=de(Lpn()),qpn=require("tls"),Gpn=de(Fpn());var Ose=new Se("certificates"),jd=class{static{a(this,"RootCertificateReader")}};function GWe(t,e=process.platform){return new Q7t(t,[new q7t,new G7t,yOo(t,e)])}a(GWe,"getRootCertificateReader");function yOo(t,e){switch(e){case"linux":return new H7t(t);case"darwin":return new j7t(t);case"win32":return new $7t(t);default:return new V7t}}a(yOo,"createPlatformReader");var U7t=class extends jd{constructor(r,n){super();this.ctx=r;this.delegate=n}static{a(this,"ErrorHandlingCertificateReader")}async getAllRootCAs(){try{return await this.delegate.getAllRootCAs()}catch(r){return Ose.warn(this.ctx,"Failed to read root certificates:",r),[]}}},Q7t=class extends jd{constructor(r,n){super();this.ctx=r;this.delegates=n.map(o=>new U7t(r,o))}static{a(this,"CachingRootCertificateReader")}async getAllRootCAs(){return this.certificates||(this.certificates=this.removeExpiredCertificates((await Promise.all(this.delegates.map(r=>r.getAllRootCAs()))).flat())),this.certificates}removeExpiredCertificates(r){let n=Date.now(),o=r.filter(s=>{try{let c=new Upn.X509Certificate(s),l=Date.parse(c.validTo);return isNaN(l)||l>n}catch(c){return Ose.warn(this.ctx,"Failed to parse certificate",s,c),!1}});return r.length!==o.length&&Ose.info(this.ctx,`Removed ${r.length-o.length} expired certificates`),o}},q7t=class extends jd{static{a(this,"NodeTlsRootCertificateReader")}getAllRootCAs(){return qpn.rootCertificates}},G7t=class extends jd{static{a(this,"EnvironmentVariableRootCertificateReader")}async getAllRootCAs(){let e=process.env.NODE_EXTRA_CA_CERTS;return e?await Hpn(e):[]}},H7t=class extends jd{constructor(r){super();this.ctx=r}static{a(this,"LinuxRootCertificateReader")}async getAllRootCAs(){let r=[];for(let n of["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt"]){let o=await Hpn(n);Ose.debug(this.ctx,`Read ${o.length} certificates from ${n}`),r=r.concat(o)}return r}},j7t=class extends jd{constructor(r){super();this.ctx=r}static{a(this,"MacRootCertificateReader")}getAllRootCAs(){let r=qWe.get({excludeBundled:!1,format:qWe.Format.pem});return Ose.debug(this.ctx,`Read ${r.length} certificates from Mac keychain`),r}},$7t=class extends jd{constructor(r){super();this.ctx=r}static{a(this,"WindowsRootCertificateReader")}getAllRootCAs(){let r=Gpn.all();return Ose.debug(this.ctx,`Read ${r.length} certificates from Windows store`),r}},V7t=class extends jd{static{a(this,"UnsupportedPlatformRootCertificateReader")}getAllRootCAs(){return Promise.reject(new Error("No certificate reader available for unsupported platform"))}};async function Hpn(t){let e;try{e=await Qpn.promises.readFile(t,{encoding:"utf8"})}catch{return[]}let r=e.match(/-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g);if(!r)return[];let n=r.filter(s=>s.length>0),o=new Set(n);return Array.from(o)}a(Hpn,"readCertsFromFile");var c7=de(uvn());var CHt=new Se("BackgroundAgent.ProxyEnv"),_Ht=new Map,vHt=new Set,jbe;function bHt(){for(let t of vHt){let e=_Ht.get(t);e===void 0?delete process.env[t]:process.env[t]=e}vHt.clear(),jbe&&((0,c7.setGlobalDispatcher)(jbe),jbe=void 0)}a(bHt,"restoreProxyEnvironment");function EHt(t,e,r){process.env[t]||process.env[e]||(_Ht.has(t)||_Ht.set(t,process.env[t]),process.env[t]=r,vHt.add(t))}a(EHt,"setEnvIfAbsent");function N$o(t,e){if(!e)return t;try{let r=new URL(t),n=e.indexOf(":"),o=n===-1?e:e.slice(0,n),s=n===-1?"":e.slice(n+1);return o&&(r.username=encodeURIComponent(o),s&&(r.password=encodeURIComponent(s))),r.toString()}catch{return t}}a(N$o,"buildProxyUrl");async function D$o(t,e){if(e===!1){let r={rejectUnauthorized:!1};return{requestTls:r,proxyTls:r}}try{let r=await t.get(jd).getAllRootCAs();if(r.length>0){let n={ca:r};return{requestTls:n,proxyTls:n}}}catch{CHt.warn(t,"Failed to load system CA certificates for SDK proxy dispatcher")}return{}}a(D$o,"buildTlsOptions");async function THt(t){try{bHt();let e=t.get(Qc).getHttpSettings();if(!e.proxy)return;let r=N$o(e.proxy,e.proxyAuthorization);EHt("HTTPS_PROXY","https_proxy",r),EHt("HTTP_PROXY","http_proxy",r);let n=e.noProxy?.length?e.noProxy.join(","):void 0;n&&EHt("NO_PROXY","no_proxy",n),jbe||(jbe=(0,c7.getGlobalDispatcher)());let o=await D$o(t,e.proxyStrictSSL);(0,c7.setGlobalDispatcher)(new c7.EnvHttpProxyAgent({allowH2:!0,httpProxy:r,httpsProxy:r,noProxy:n,...o})),CHt.info(t,"Applied proxy settings to environment for SDK",{hasProxy:!0,hasAuth:!!e.proxyAuthorization,hasNoProxy:!!n,proxyStrictSSL:e.proxyStrictSSL!==!1,hasTlsCa:!!o.requestTls,dispatcherType:(0,c7.getGlobalDispatcher)().constructor.name})}catch(e){CHt.warn(t,"Failed to apply proxy settings to environment:",e)}}a(THt,"applyProxyToEnvironment");var dvn=require("node:module");var Ip=new Se("BackgroundAgent"),M$o=20,$be="backgroundAgent";async function O$o(){return"pkg"in process?(0,dvn.createRequire)(__filename)("./node_modules/@github/copilot/sdk/index.cjs"):import("@github/copilot/sdk")}a(O$o,"importSdk");var Lu=class{constructor(e){this.ctx=e;this.activeSessions=new Map;this.processedEventIds=new Map;this.notificationSender=e.get(gc),e.get(Qc).onDidChangeHttpSettings(()=>{THt(this.ctx)}),e.get(Ot).onDidResetToken(()=>{Ip.info(this.ctx,"GitHub token changed, clearing cached sessions"),this.activeSessions.clear()})}static{a(this,"BackgroundAgentService")}async ensureManager(){if(this.manager)return this.manager;this.managerInitPromise||(this.managerInitPromise=this.initManager());try{await this.managerInitPromise}catch(e){throw this.managerInitPromise=void 0,e}if(!this.manager)throw new Error("LocalSessionManager initialization succeeded but manager is undefined");return this.manager}async initManager(){Ip.info(this.ctx,"Initializing LocalSessionManager (in-process SDK)..."),await THt(this.ctx);let e=performance.now();try{this.sdk=await O$o(),yi(this.ctx,"backgroundAgent.importSdk",{status_text:"success"},{duration_ms:performance.now()-e})}catch(r){throw _u(this.ctx,"backgroundAgent.importSdk",r,{status_text:"failure"},{duration_ms:performance.now()-e}),r}this.manager=new this.sdk.internal.LocalSessionManager({telemetryService:new this.sdk.internal.NoopTelemetryService,telemetryBinder:void 0}),Ip.info(this.ctx,"LocalSessionManager initialized.")}cacheSession(e,r){if(this.activeSessions.has(e)&&this.activeSessions.delete(e),this.activeSessions.set(e,r),this.activeSessions.size>M$o){let n=this.activeSessions.keys().next().value;n!==void 0&&(Ip.debug(this.ctx,`Evicting oldest cached session: ${n}`),this.activeSessions.delete(n))}}async handleInteraction(e){let r=performance.now(),n=await this.getOrResumeSession(e.sessionId),o=Gnn(n,e);return yi(this.ctx,"backgroundAgent.interaction",{requestSource:$be,sessionId:e.sessionId,requestId:e.requestId,interactionType:e.type,resultKind:e.type==="permission"?e.result.kind:""},{totalTimeMs:performance.now()-r}),o}async buildAuthInfo(){let r=await this.ctx.get(en).getSession();if(!r)throw new Error("Not authenticated. Please sign in first.");let n=r.serverUrl.replace(/\/+$/,"")||"https://github.com";return{type:"token",token:r.accessToken,host:n}}async buildSessionOptions(e,r){let n=await this.buildAuthInfo(),o={clientName:this.ctx.get(Nr).getEditorPluginInfo().name,sessionId:e,authInfo:n,model:r.model,reasoningEffort:r.reasoningEffort,enableStreaming:r.enableStreaming??!0,availableTools:r.availableTools,excludedTools:r.excludedTools,skillDirectories:r.skillDirectories,disabledSkills:r.disabledSkills?new Set(r.disabledSkills):void 0,systemMessage:r.systemMessage?{mode:"append",content:r.systemMessage}:void 0};if(r.workspaceFolders?.[0]?.uri&&(o.workingDirectory=Pl(r.workspaceFolders[0].uri).fsPath),r.workspaceFolders?.length){let s=await qnn(this.ctx,r.workspaceFolders);s.length>0&&(o.customAgents=s)}return o}async createSession(e){let r=performance.now();Ip.info(this.ctx,"createSession called:",{model:e.model,workspaceFolders:e.workspaceFolders,hasSystemMessage:!!e.systemMessage,availableTools:e.availableTools});let n=await this.ensureManager(),o=yr(),s=await this.buildSessionOptions(o,e),c=await n.createSession(s);return Ip.info(this.ctx,"Session created:",o),yi(this.ctx,"backgroundAgent.create",{requestSource:$be,modelId:e.model??"",reasoningEffort:e.reasoningEffort??"",sessionId:o},{totalTimeMs:performance.now()-r,workspaceFolderCount:e.workspaceFolders?.length??0,availableToolCount:e.availableTools?.length??0}),this.cacheSession(o,c),{sessionId:o,workspacePath:c.workspacePath}}async getOrResumeSession(e,r){let n=this.activeSessions.get(e);if(n)return n;let o=await this.ensureManager(),s=await this.buildAuthInfo(),c={sessionId:e,authInfo:s,model:r?.model,reasoningEffort:r?.reasoningEffort},l=await o.getSession(c,!0);if(!l)throw new Error(`Session not found: ${e}`);return this.cacheSession(e,l),l}async sendMessage(e,r){let n=performance.now(),o=await this.getOrResumeSession(e.sessionId);if(e.model)try{await o.setSelectedModel(e.model)}catch(A){Ip.warn(this.ctx,`Failed to set model ${e.model} for session ${e.sessionId}:`,A)}this.processedEventIds.set(e.sessionId,new Set);let s=a(()=>{},"noop"),c=o.on("user_input.requested",s),l=o.on("permission.requested",s),u=o.on("*",A=>{this.handleSessionEvent(e.sessionId,A)}),d=a(()=>{m?.dispose(),c(),l(),u(),p(),h(),this.processedEventIds.delete(e.sessionId)},"cleanup"),p=o.on("session.idle",()=>{d()}),h=o.on("session.error",()=>{d()}),m;r&&(m=r.onCancellationRequested(()=>{Ip.info(this.ctx,"Cancellation requested, aborting session:",e.sessionId),o.abort()}));let g={prompt:e.message};if(e.references?.length){let A=Unn(e.references,this.ctx);A.length>0&&(g.attachments=A)}return yi(this.ctx,"backgroundAgent.send",{requestSource:$be,sessionId:e.sessionId,modelId:e.model??"",hasReferences:String(!!e.references?.length)},{totalTimeMs:performance.now()-n,messageCharLen:e.message.length,referenceCount:e.references?.length??0}),o.send(g).catch(A=>{d();let y={type:"session.error",id:yr(),timestamp:new Date().toISOString(),parentId:null,data:{errorType:"SendMessageError",message:A instanceof Error?A.message:String(A)}};this.sendSessionUpdateNotification(e.sessionId,y)}),{}}async destroySession(e){try{return this.activeSessions.delete(e.sessionId),await(await this.ensureManager()).deleteSession(e.sessionId),{success:!0}}catch(r){return Ip.error(this.ctx,`Failed to destroy session ${e.sessionId}:`,r),{success:!1}}}async stopSession(e){let r=performance.now(),n=await this.getOrResumeSession(e);Ip.info(this.ctx,"Stopping session via abort:",e),await n.abort(),yi(this.ctx,"backgroundAgent.stop",{requestSource:$be,sessionId:e},{totalTimeMs:performance.now()-r})}async resumeSession(e){let r=performance.now();Ip.info(this.ctx,"resumeSession called:",e.sessionId);let n=await this.getOrResumeSession(e.sessionId,{model:e.model,reasoningEffort:e.reasoningEffort,streaming:e.streaming}),o=Array.from(n.getEvents());return yi(this.ctx,"backgroundAgent.resume",{requestSource:$be,sessionId:e.sessionId,modelId:e.model??"",streaming:String(e.streaming??!0)},{totalTimeMs:performance.now()-r,eventCount:o.length}),{sessionId:e.sessionId,workspacePath:n.workspacePath,events:o}}async listSessions(e){let n=await(await this.ensureManager()).listSessions(),o=n;return e&&(o=n.filter(s=>!(e.cwd&&s.context?.cwd!==e.cwd||e.gitRoot&&s.context?.gitRoot!==e.gitRoot||e.repository&&s.context?.repository!==e.repository||e.branch&&s.context?.branch!==e.branch))),{sessions:o.map(s=>({sessionId:s.sessionId,startTime:s.startTime instanceof Date?s.startTime.toISOString():String(s.startTime),modifiedTime:s.modifiedTime instanceof Date?s.modifiedTime.toISOString():String(s.modifiedTime),summary:s.summary,isRemote:s.isRemote,context:s.context}))}}async listModels(e){Ip.info(this.ctx,"listModels called",{forceRefresh:e}),await this.ensureManager();let r=await this.buildAuthInfo();Ip.info(this.ctx,"listModels proxy diagnostics",{HTTPS_PROXY:process.env.HTTPS_PROXY?"(set)":"(not set)",HTTP_PROXY:process.env.HTTP_PROXY?"(set)":"(not set)",NO_PROXY:process.env.NO_PROXY??"(not set)",NODE_TLS_REJECT_UNAUTHORIZED:process.env.NODE_TLS_REJECT_UNAUTHORIZED??"(not set)",NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS??"(not set)"});try{let n=await this.sdk.getAvailableModels(r);return n.length===0?Ip.warn(this.ctx,"No models available. Check authentication and Copilot subscription status."):Ip.info(this.ctx,`Successfully retrieved ${n.length} models`),Ip.debug(this.ctx,"Models retrieved:",n.map(o=>o.id)),{models:n}}catch(n){let o=n instanceof Error?n.message:String(n);throw Ip.error(this.ctx,"getAvailableModels failed",{error:o,stack:n instanceof Error?n.stack:void 0}),new Error(`Failed to retrieve models: ${o}`)}}async handleSessionEvent(e,r){let n=r.id,o=this.processedEventIds.get(e);if(o?.has(n)){Ip.debug(this.ctx,`Skipping duplicate SDK event: ${r.type} (id=${n})`);return}o?.add(n),await this.sendSessionUpdateNotification(e,r)}async sendSessionUpdateNotification(e,r){try{await this.notificationSender.sendBackgroundAgentSessionUpdate(e,r)}catch(n){Ip.error(this.ctx,"Failed to send session update notification:",n)}}async shutdown(){this.activeSessions.clear(),this.processedEventIds.clear(),bHt(),this.manager&&(await this.manager.dispose(),this.manager=void 0),this.sdk=void 0,this.managerInitPromise=void 0}};f();var SHt=new $r;function fvn(t){return[...t].sort((e,r)=>{let n=SHt.get(e.uri)??0;return(SHt.get(r.uri)??0)-n})}a(fvn,"sortByAccessTimes");var pvn=a(t=>t.get(zr).onDidFocusTextDocument(e=>{e.document&&SHt.set(e.document.uri.toString(),Date.now())}),"registerDocumentTracker");f();f();f();var hvn=de(require("events"));var UYe="CompletionRequested",ON=class{constructor(e){this.ctx=e}static{a(this,"CompletionNotifier")}#e=new hvn.default;notifyRequest(e,r,n,o,s){return this.#e.emit(UYe,{completionId:r,completionState:e,telemetryData:n,cancellationToken:o,options:s})}onRequest(e){let r=$p(this.ctx,e,`event.${UYe}`);return this.#e.on(UYe,r),_n.Disposable.create(()=>this.#e.off(UYe,r))}};f();f();var IHt=class{constructor(){this.observers=new Set}static{a(this,"Subject")}subscribe(e){return this.observers.add(e),()=>this.observers.delete(e)}next(e){for(let r of this.observers)r.next(e)}error(e){for(let r of this.observers)r.error?.(e)}complete(){for(let e of this.observers)e.complete?.()}},QYe=class extends IHt{static{a(this,"ReplaySubject")}subscribe(e){let r=super.subscribe(e);return this._value!==void 0&&e.next(this._value),r}next(e){this._value=e,super.next(e)}};var GC=class{constructor(e){this.ctx=e;this.#e=new Se("AsyncCompletionManager");this.requests=new $r(100);this.mostRecentRequestId=""}static{a(this,"AsyncCompletionManager")}#e;clear(){this.requests.clear()}shouldWaitForAsyncCompletions(e,r){for(let[n,o]of this.requests)if(xHt(e,r,o))return!0;return!1}updateCompletion(e,r){let n=this.requests.get(e);n!==void 0&&(n.partialCompletionText=r,n.subject.next(n))}queueCompletionRequest(e,r,n,o,s){this.#e.debug(this.ctx,`[${e}] Queueing async completion request:`,r.substring(r.lastIndexOf(` -`)+1));let c=new QYe;return this.requests.set(e,{state:2,cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c}),s.then(l=>{if(this.requests.delete(e),l.type!=="success"){this.#e.debug(this.ctx,`[${e}] Request failed with`,l.reason),c.error(l.reason);return}let u={cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c,choice:l.value[0],result:l,state:0,allChoicesPromise:l.value[1]};this.requests.set(e,u),c.next(u),c.complete()}).catch(l=>{this.#e.error(this.ctx,`[${e}] Request errored with`,l),this.requests.delete(e),c.error(l)})}getFirstMatchingRequestWithTimeout(e,r,n,o,s){let c=this.ctx.get(jt).asyncCompletionsTimeout(s);return c<0?(this.#e.debug(this.ctx,`[${e}] Waiting for completions without timeout`),this.getFirstMatchingRequest(e,r,n,o)):(this.#e.debug(this.ctx,`[${e}] Waiting for completions with timeout of ${c}ms`),Promise.race([this.getFirstMatchingRequest(e,r,n,o),new Promise(l=>setTimeout(()=>l(null),c))]).then(l=>{if(l===null){this.#e.debug(this.ctx,`[${e}] Timed out waiting for completion`);return}return l}))}async getFirstMatchingRequest(e,r,n,o){o||(this.mostRecentRequestId=e);let s=!1,c=new zE,l=new Map,u=a(p=>()=>{let h=l.get(p);h!==void 0&&(h(),l.delete(p),!s&&l.size===0&&(s=!0,this.#e.debug(this.ctx,`[${e}] No matching completions found`),c.resolve(void 0)))},"finishRequest"),d=a(p=>{if(xHt(r,n,p)){if(p.state===0){let h=r.substring(p.prefix.length),{completionText:m}=p.choice;if(!m.startsWith(h)||m.length<=h.length){u(p.headerRequestId)();return}m=m.substring(h.length),p.choice.telemetryData.measurements.foundOffset=h.length,this.#e.debug(this.ctx,`[${e}] Found completion at offset ${h.length}: ${JSON.stringify(m)}`),c.resolve([{...p.choice,completionText:m},p.allChoicesPromise]),s=!0}}else this.cancelRequest(e,p),u(p.headerRequestId)()},"next");for(let[p,h]of this.requests)xHt(r,n,h)?l.set(p,h.subject.subscribe({next:d,error:u(p),complete:u(p)})):this.cancelRequest(e,h);return c.promise.finally(()=>{for(let p of l.values())p()})}cancelRequest(e,r){e===this.mostRecentRequestId&&r.state!==0&&(this.#e.debug(this.ctx,`[${e}] Cancelling request: ${r.headerRequestId}`),r.cancellationTokenSource.cancel(),this.requests.delete(r.headerRequestId))}};function xHt(t,e,r){if(r.prompt.suffix!==e.suffix||!t.startsWith(r.prefix))return!1;let n=t.substring(r.prefix.length);return r.state===0?r.choice.completionText.startsWith(n)&&r.choice.completionText.trimEnd().length>n.length:r.partialCompletionText===void 0?!0:r.partialCompletionText.startsWith(n)}a(xHt,"isCandidate");f();f();var Wbe=class{constructor(e){this.maxSize=e;this.root=new Vbe;this.leafNodes=new Set}static{a(this,"LRURadixTrie")}set(e,r){let{node:n,remainingKey:o}=this.findClosestNode(e);if(o.length>0){for(let[s,c]of n.children)if(s.startsWith(o)){let l=s.slice(0,o.length),u=new Vbe;n.removeChild(s),n.addChild(l,u),u.addChild(s.slice(l.length),c),n=u,o=o.slice(l.length);break}if(o.length>0){let s=new Vbe;n.addChild(o,s),n=s}}n.value=r,this.leafNodes.add(n),this.leafNodes.size>this.maxSize&&this.evictLeastRecentlyUsed()}findAll(e){return this.findClosestNode(e).stack.map(({node:r,remainingKey:n})=>r.value!==void 0?{remainingKey:n,value:r.value}:void 0).filter(r=>r!==void 0)}delete(e){let{node:r,remainingKey:n}=this.findClosestNode(e);n.length>0||this.deleteNode(r)}findClosestNode(e){let r=!0,n=this.root,o=[{node:n,remainingKey:e}];for(;e.length>0&&r;){r=!1;for(let[s,c]of n.children)if(e.startsWith(s)){e=e.slice(s.length),o.unshift({node:c,remainingKey:e}),n=c,r=!0;break}}return{node:n,remainingKey:e,stack:o}}deleteNode(e){if(e.value=void 0,this.leafNodes.delete(e),e.parent===void 0||e.childCount>1)return;let{node:r,edge:n}=e.parent;if(e.childCount===1){let[s,c]=Array.from(e.children)[0];e.removeChild(s),r.removeChild(n),r.addChild(n+s,c);return}if(r.removeChild(n),r.parent===void 0)return;let o=r.parent;if(r.value===void 0&&r.childCount===1){let[s,c]=Array.from(r.children)[0],l=o.edge+s;r.removeChild(s),o.node.removeChild(o.edge),o.node.addChild(l,c)}}evictLeastRecentlyUsed(){let e=this.findLeastRecentlyUsed();e&&this.deleteNode(e)}findLeastRecentlyUsed(){let e;for(let r of this.leafNodes)(e===void 0||r.touchedo.content.filter(s=>s.suffix===r&&s.choice.completionText.startsWith(n)&&s.choice.completionText.length>n.length).map(s=>({...s.choice,completionText:s.choice.completionText.slice(n.length),telemetryData:s.choice.telemetryData.extendedBy({},{foundOffset:n.length})})))}append(e,r,n){let o=this.cache.findAll(e);if(o.length>0&&o[0].remainingKey===""){let s=o[0].value.content;this.cache.set(e,{content:[...s,{suffix:r,choice:n}]})}else this.cache.set(e,{content:[{suffix:r,choice:n}]})}clear(){this.cache=new Wbe(100)}};f();var HC=class{constructor(){this.choices=[]}static{a(this,"CurrentGhostText")}get clientCompletionId(){return this.choices[0]?.clientCompletionId}setGhostText(e,r,n,o){o!==2&&(this.prefix=e,this.suffix=r,this.choices=n)}getCompletionsForUserTyping(e,r){let n=this.getRemainingPrefix(e,r);if(n!==void 0&&mvn(this.choices[0].completionText,n))return B$o(this.choices,n)}hasAcceptedCurrentCompletion(e,r){let n=this.getRemainingPrefix(e,r);if(n===void 0)return!1;let o=n===this.choices?.[0].completionText,s=this.choices?.[0].finishReason;return o&&s==="stop"}getRemainingPrefix(e,r){if(!(this.prefix===void 0||this.suffix===void 0||this.choices.length===0)&&this.suffix===r&&e.startsWith(this.prefix))return e.substring(this.prefix.length)}};function B$o(t,e){return t.filter(r=>mvn(r.completionText,e)).map(r=>({...r,completionText:r.completionText.substring(e.length)}))}a(B$o,"adjustChoicesStart");function mvn(t,e){return t.startsWith(e)&&t.length>e.length}a(mvn,"startsWithAndExceeds");f();f();var D4={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95};f();function gvn(t){let e;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>427.50000000000006?t[9]>13.500000000000002?t[121]>1e-35?e=-.3793786744885956:t[149]>1e-35?e=-.34717430705356905:e=-.26126834451035963:e=-.2431318366096852:t[5]>888.5000000000001?e=-.20600463586387135:e=-.2568037008471491:t[308]>1e-35?e=-.2363064824497454:t[8]>370.50000000000006?e=-.37470755210284723:e=-.321978453730494:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?e=-.26259136509758885:e=-.3096719634039438:t[4]>30.500000000000004?t[9]>18.500000000000004?e=-.34254903852890883:t[2]>98.50000000000001?e=-.41585250791146294:e=-.3673574858887241:t[9]>6.500000000000001?e=-.31688079287876225:t[31]>1e-35?e=-.29110977864003823:t[308]>1e-35?e=-.3201411739040839:e=-.36874023066055506:t[8]>691.5000000000001?t[82]>1e-35?e=-.41318393149040566:t[133]>1e-35?e=-.3741272613525161:t[32]>1e-35?e=-.4112378041027121:t[227]>1e-35?e=-.37726615155719356:t[10]>3.5000000000000004?e=-.3164502293560397:e=-.2930071546509045:t[9]>13.500000000000002?e=-.277366858539218:t[308]>1e-35?t[4]>10.500000000000002?e=-.30975610686807187:t[4]>1.5000000000000002?e=-.2549142136728043:e=-.3271325650785176:t[127]>1e-35?t[0]>1937.5000000000002?e=-.2533046188098832:e=-.325520883579:e=-.331628896481776;let r;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?t[9]>13.500000000000002?r=.031231253521808708:r=.05380836288014532:t[5]>423.00000000000006?t[8]>114.50000000000001?r=.06751619128429062:r=.09625089153176467:r=.027268163053989804:t[308]>1e-35?r=.060174483556283756:r=-.049062854038919135:t[3]>24.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?r=-.03969241799174589:r=.01086816842550381:t[31]>1e-35?r=-.003284694817583201:t[9]>6.500000000000001?t[4]>30.500000000000004?r=-.04224490699947552:r=-.011834162944360616:t[308]>1e-35?t[32]>1e-35?r=-.13448447971850278:r=-.019569456707046823:t[19]>1e-35?t[9]>1.5000000000000002?r=-.07256260662659254:t[4]>60.50000000000001?r=-.08227503453609311:r=-.020596416747563847:r=-.07396549241564149:t[8]>691.5000000000001?t[82]>1e-35?r=-.10046536995362734:t[133]>1e-35?r=-.06407649822752297:t[225]>1e-35?r=.08035785003303324:t[92]>1e-35?r=.018901360933204676:t[20]>1e-35?r=.05252546973665552:t[8]>2592.5000000000005?r=-.040543705016462955:r=-.011236043818320725:t[9]>17.500000000000004?r=.025560632674895334:t[308]>1e-35?t[0]>1847.5000000000002?r=.03527165701669741:r=-.0071847350825815035:t[127]>1e-35?r=.024373016379595405:t[9]>2.5000000000000004?r=-.0035090719709448288:r=-.03514829488063766;let n;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?n=.03848674861536988:t[5]>423.00000000000006?t[8]>114.50000000000001?t[9]>56.50000000000001?n=-.003764520033319488:n=.06570817919969299:t[4]>61.50000000000001?n=.028346156293069538:n=.0908154644362606:n=.02445594243234816:t[308]>1e-35?t[8]>65.50000000000001?n=.0019305229020073053:n=.09279357295883772:n=-.04458984161917124:t[3]>24.500000000000004?t[23]>1e-35?n=.0027405390271277013:t[4]>29.500000000000004?t[52]>1e-35?n=.044727478132905285:t[115]>1e-35?n=.10245804828855934:t[9]>17.500000000000004?n=-.03353173647469207:t[2]>98.50000000000001?n=-.10048106638102179:n=-.05484231104348874:t[31]>1e-35?n=.016807537467116516:t[9]>6.500000000000001?n=-.012113620535295137:t[4]>8.500000000000002?t[308]>1e-35?n=-.01882594250504289:n=-.05585658862796076:n=.04279591277938338:t[8]>691.5000000000001?t[82]>1e-35?n=-.09262278043707878:t[133]>1e-35?n=-.058454257768893625:t[32]>1e-35?n=-.09769348447126434:t[25]>1e-35?n=-.0725430043727677:t[122]>1e-35?n=-.10047841601578077:n=-.00580671054458958:t[9]>13.500000000000002?n=.021399199032818294:t[308]>1e-35?t[4]>10.500000000000002?n=-.0076376731757173515:n=.03394923033036848:t[127]>1e-35?n=.02070489091204209:n=-.02290162726126496;let o;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?o=.010230295672324606:o=.038540509248742805:t[8]>125.50000000000001?t[1]>49.50000000000001?o=.03086356292895467:o=.057128750867458604:t[5]>888.5000000000001?o=.07861602941396924:o=.030523262699070908:t[308]>1e-35?o=.048236117667577356:t[8]>370.50000000000006?o=-.05642125069212264:o=-.007232836777168195:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?o=.03640661467213915:o=-.005889820723907028:t[31]>1e-35?o=-.0009007166998276938:t[9]>6.500000000000001?o=-.022590340093882378:t[308]>1e-35?t[32]>1e-35?o=-.1215445089091064:o=-.01435612266219722:t[19]>1e-35?t[9]>1.5000000000000002?o=-.061555513040777825:t[4]>60.50000000000001?o=-.07053475504569347:o=-.013733369453963092:o=-.06302097189114152:t[227]>1e-35?o=-.05820440333190048:t[8]>683.5000000000001?t[82]>1e-35?o=-.08466979526809346:t[10]>24.500000000000004?o=-.017092159721119944:t[92]>1e-35?o=.03592901452463749:o=-.00359310519524756:t[5]>1809.5000000000002?t[243]>1e-35?o=-.03963116207386097:t[118]>1e-35?o=-.09483996283536394:t[217]>1e-35?o=-.03394542089519989:t[242]>1e-35?o=-.07985899422287938:o=.019706602160656964:t[9]>12.500000000000002?o=.014072998937735146:o=-.021156294523894684;let s;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?s=.009197756540516563:s=.03458896869535166:t[5]>5082.500000000001?s=.08265545468131008:t[131]>1e-35?s=.0740738432473315:s=.045159136632942756:t[8]>319.50000000000006?s=-.04653401534465376:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?s=-.011400839766681709:s=.11149800187510031:s=-.08683250977599462:s=.08355310136724753:t[4]>23.500000000000004?t[23]>1e-35?t[131]>1e-35?s=.040389083779932555:s=-.009887614274108602:t[52]>1e-35?s=.03705353499757327:t[9]>6.500000000000001?s=-.025401260429257562:t[2]>98.50000000000001?s=-.09237673187534504:s=-.04298556869281803:t[222]>1e-35?s=-.045221965895986184:t[8]>691.5000000000001?t[133]>1e-35?s=-.05435318330148897:t[128]>1e-35?s=-.08672907303184191:t[227]>1e-35?s=-.05568304584186561:t[122]>1e-35?s=-.09623059693538563:t[225]>1e-35?s=.07558331642202279:t[82]>1e-35?s=-.07360566227233566:s=-.005646164647395919:t[242]>1e-35?s=-.08203758341228108:t[9]>13.500000000000002?s=.018726123829696042:t[308]>1e-35?t[4]>10.500000000000002?s=-.011153942154062704:s=.03132858912391067:t[127]>1e-35?s=.021455228822345174:t[23]>1e-35?s=.01959966745346997:s=-.021764790177579325;let c;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>284.50000000000006?t[121]>1e-35?t[18]>1e-35?c=.07547602514276922:c=-.08529678832140396:c=.030314822344598043:t[5]>888.5000000000001?t[4]>61.50000000000001?c=.011143589009415464:c=.0654700456802118:c=.021794712646632755:t[308]>1e-35?c=.04231872551095028:c=-.034381999950549455:t[4]>23.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?c=-.03678981254332261:c=.010518160384496255:t[8]>825.5000000000001?c=-.04506534842082387:t[9]>38.50000000000001?c=.01004983052203438:c=-.030580958620701027:t[39]>1e-35?c=-.12802435021505382:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>6.500000000000001?c=.030426957004611704:c=-.0726407693060581:c=.017395521646964375:t[4]>7.500000000000001?t[0]>93.50000000000001?t[9]>7.500000000000001?c=-.008024349629981291:t[31]>1e-35?c=.01296539930850471:t[308]>1e-35?c=-.012855016509024084:c=-.04564527976851505:c=-.15681420504058596:t[10]>4.500000000000001?t[243]>1e-35?c=-.1012064426380198:c=-.0062808850924854194:c=.030706323726162416:t[9]>13.500000000000002?c=.017081636133736405:t[308]>1e-35?t[4]>10.500000000000002?c=-.009306613091760644:t[4]>1.5000000000000002?c=.03655523200850989:c=-.02671654212893341:t[127]>1e-35?c=.019261510468604387:c=-.017627818570628936;let l;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[308]>1e-35?l=.036100405995889276:l=.011709313297015793:t[0]>119.50000000000001?t[8]>125.50000000000001?l=.03622542297472574:l=.05595579157301536:l=-.02234751038146796:t[8]>319.50000000000006?l=-.040132029478400735:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?l=-.009306153573847916:l=.10058509567064988:l=-.0785668890966017:t[9]>28.500000000000004?l=-.04781977604130416:l=.09753292614937459:t[4]>23.500000000000004?t[131]>1e-35?l=.02372493254975127:t[148]>1e-35?l=.028103095989516644:t[4]>58.50000000000001?t[10]>1e-35?l=-.05000852203469597:l=.02922366846119705:t[23]>1e-35?l=-.0026335076988151292:l=-.03073993752935585:t[222]>1e-35?l=-.03867374428185713:t[32]>1e-35?l=-.07220729365053084:t[39]>1e-35?l=-.11624524614351733:t[8]>691.5000000000001?t[133]>1e-35?l=-.04836360271198036:t[8]>4968.500000000001?l=-.10873681915578029:t[149]>1e-35?l=-.11847484033769298:t[122]>1e-35?l=-.08916172460307559:t[82]>1e-35?l=-.06774726602152634:l=-.0033469147714351327:t[126]>1e-35?l=-.09474445392080015:t[8]>131.50000000000003?t[118]>1e-35?l=-.09002547031023511:l=.015475385187009489:t[25]>1e-35?l=-.08175501232759151:l=-.000429679055394914;let u;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?u=.021942996005324917:u=.042349138084484074:t[308]>1e-35?u=.036507270845732874:u=-.028981850556764995:t[3]>24.500000000000004?t[23]>1e-35?u=.00210930790963475:t[31]>1e-35?u=.006825358293027163:t[9]>6.500000000000001?u=-.013772084269062394:t[308]>1e-35?u=-.008307929099892574:t[19]>1e-35?u=-.027706313312904487:u=-.04891108984170914:t[134]>1e-35?u=-.0605730733844732:t[25]>1e-35?u=-.05347926493253117:t[227]>1e-35?u=-.049415829249003666:t[32]>1e-35?u=-.06807799662179595:t[308]>1e-35?t[4]>10.500000000000002?t[2]>13.500000000000002?u=-.00016302718260794637:u=-.10247095758122947:t[210]>1e-35?u=-.022149002072787024:t[95]>1e-35?u=.15222631630626304:u=.027393884520465712:t[9]>7.500000000000001?t[225]>1e-35?u=.13483346577752245:t[3]>9.500000000000002?t[243]>1e-35?u=-.045352728133789516:t[8]>683.5000000000001?u=.00474372227519902:u=.02635476098707525:t[92]>1e-35?u=.05659380819933452:t[105]>1e-35?u=.07431443210341222:t[186]>1e-35?u=.0915821133384904:u=-.016414750130401053:t[127]>1e-35?u=.011824693641866162:t[23]>1e-35?u=.0228468674288774:t[284]>1e-35?u=.06606936863302432:u=-.02872463273902358;let d;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>125.50000000000001?t[288]>1e-35?d=-.019844363904157558:t[1]>50.50000000000001?t[131]>1e-35?d=.044961338592245194:d=.003659599513761676:t[121]>1e-35?d=-.04057103630479994:d=.03158560697078578:t[0]>421.50000000000006?t[4]>61.50000000000001?d=-.0003708603406529278:d=.05331312264472391:d=.0006575958601218936:t[8]>319.50000000000006?d=-.034654694051901545:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?d=-.0076053515916517005:d=.09116695486305336:d=-.07137458699162028:d=.06633130654035282:t[4]>29.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?d=-.0308520802187302:d=.013156423968295541:t[115]>1e-35?d=.11581171687488252:t[52]>1e-35?t[10]>22.500000000000004?d=.12264179915175587:d=-.021905727233873535:t[8]>799.5000000000001?d=-.04181869575935412:d=-.023695901673350575:t[222]>1e-35?d=-.034612899265371776:t[8]>691.5000000000001?t[9]>98.50000000000001?d=-.06892116536821917:t[149]>1e-35?d=-.11194586444154514:t[133]>1e-35?d=-.04269583234000504:t[128]>1e-35?d=-.0644631966969502:t[8]>4968.500000000001?d=-.09650726096330133:d=-.004219129180139438:t[126]>1e-35?d=-.08038306745347751:t[5]>1809.5000000000002?d=.009265335288169993:t[9]>2.5000000000000004?d=.006447645462117438:d=-.021047132609551503;let p;t[13]>1e-35?t[3]>1.5000000000000002?t[9]>21.500000000000004?t[121]>1e-35?p=-.08436540015142402:t[8]>1861.5000000000002?p=-.01621425699342421:p=.01878613821895428:p=.031052879158242532:t[8]>319.50000000000006?p=-.031536619360997865:t[7]>3.5000000000000004?p=-.004510586962343298:p=.0596524941011746:t[4]>18.500000000000004?t[23]>1e-35?p=.004757490541310808:t[9]>6.500000000000001?p=-.008842393772207996:t[31]>1e-35?p=.0010536183837006993:t[308]>1e-35?p=-.008145882815435419:t[2]>98.50000000000001?p=-.08404937622173021:t[276]>1e-35?p=.0020072791321856663:t[19]>1e-35?p=-.023031820639490178:p=-.04553314326377875:t[8]>2134.5000000000005?p=-.02244583113572251:t[134]>1e-35?p=-.05592137394753121:t[308]>1e-35?t[49]>1e-35?p=.09989109704064947:t[4]>10.500000000000002?t[2]>13.500000000000002?p=-.00447733056482096:p=-.10191061664873849:p=.021765308380331864:t[9]>7.500000000000001?t[118]>1e-35?p=-.07570059131536411:t[243]>1e-35?p=-.040983393346598646:t[3]>9.500000000000002?p=.014763759061483812:t[92]>1e-35?p=.05136368898963024:p=-.008162398981149495:t[127]>1e-35?p=.013999119696708346:t[23]>1e-35?t[20]>1e-35?p=.14138985500120907:p=.008668274102844162:t[284]>1e-35?p=.06356484011042893:p=-.024781304572706303;let h;t[13]>1e-35?t[3]>8.500000000000002?t[8]>892.5000000000001?t[0]>384.50000000000006?h=.014387526569215037:t[8]>2266.5000000000005?h=-.1397298649743087:h=.007953931014097788:t[0]>119.50000000000001?t[4]>61.50000000000001?h=.0029819092211896296:t[218]>1e-35?h=.08450459375645737:h=.031646488019280654:h=-.03544960151460596:t[9]>9.500000000000002?h=-.026002317735915183:t[7]>1.5000000000000002?h=.005074258810794793:h=.0745247650477651:t[4]>29.500000000000004?t[131]>1e-35?h=.023269218675640847:t[148]>1e-35?h=.03812942399144545:t[115]>1e-35?h=.10512283476967227:h=-.02607307479736138:t[227]>1e-35?h=-.036576708299046294:t[101]>1e-35?h=.027948683650881864:t[149]>1e-35?h=-.08195628451594297:t[50]>1e-35?h=-.16997544922278504:t[8]>691.5000000000001?t[9]>101.50000000000001?h=-.06860333850762075:t[225]>1e-35?h=.06066641950951723:t[10]>22.500000000000004?t[1]>29.500000000000004?t[127]>1e-35?h=.028599705845427533:h=-.010746719511640914:t[0]>4877.500000000001?h=-.07251187886096228:h=-.021299712241446785:t[118]>1e-35?h=-.11902023760964736:h=15874469526809387e-21:t[8]>267.50000000000006?h=.01317292185402293:t[148]>1e-35?t[9]>20.500000000000004?h=.09614842415142123:h=.006049073167176467:t[189]>1e-35?h=.05562696451900713:h=-.006257541923837303;let m;t[13]>1e-35?t[9]>14.500000000000002?t[2]>11.500000000000002?t[1]>71.50000000000001?t[8]>1252.5000000000002?m=-.10069846585436666:m=-.010577995535809317:t[146]>1e-35?m=-.008877238274428668:t[280]>1e-35?m=.10076055897012692:t[6]>70.50000000000001?m=-.020603523042565547:t[7]>1.5000000000000002?m=.02819095420813202:m=-.1223354167911277:m=-.025073583348334844:t[8]>416.50000000000006?m=.01718560189149466:t[230]>1e-35?m=.12281803224342265:m=.03281276971308565:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?m=-.13070568109867683:t[4]>63.50000000000001?m=-.027221825262496814:m=.01530862490082352:t[9]>6.500000000000001?t[5]>4320.500000000001?t[2]>31.500000000000004?m=-.00605574271293711:m=.04739407327741249:m=-.012537528620315956:t[31]>1e-35?t[20]>1e-35?m=.1252215087035768:m=.003905888677601057:t[52]>1e-35?m=.045466299731038815:t[2]>100.50000000000001?m=-.07815624550168065:t[308]>1e-35?m=-.007715815250508057:t[276]>1e-35?t[9]>1.5000000000000002?m=-.03538265083203445:t[18]>1e-35?m=.1591211669800727:m=.015151475408241136:t[8]>557.5000000000001?m=-.04225569725456342:m=-.022455546324243267:t[308]>1e-35?m=.01325441736085826:t[197]>1e-35?m=.03752194600682512:t[225]>1e-35?m=.06583712394533976:m=-.005205289866839043;let g;t[13]>1e-35?t[9]>21.500000000000004?t[2]>12.500000000000002?g=.010264022580774884:g=-.02335958814489217:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?g=-.0936747137352166:t[0]>384.50000000000006?g=.019846244507320695:g=-.0751102554077272:g=-.026885329334203723:t[0]>966.5000000000001?t[10]>48.50000000000001?g=.11654906890054273:g=.0346250587613322:t[4]>39.50000000000001?g=-.08568002378645614:t[9]>16.500000000000004?g=-.12010535752923689:g=.021321923389033808:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?g=-.12056431231412057:t[131]>1e-35?g=.03652965550568472:g=.002563006128791669:t[9]>6.500000000000001?t[30]>1e-35?g=-.10141481732178981:g=-.003936457893178248:t[31]>1e-35?g=.008215898756249477:t[52]>1e-35?t[0]>4188.500000000001?g=.12972828769588213:g=-.003137412232297087:t[2]>100.50000000000001?g=-.0730872929087944:t[308]>1e-35?g=-.006958622747243333:t[35]>1e-35?t[0]>3707.5000000000005?g=.07934620723812878:g=-.018598568353702116:g=-.030635505446410763:t[128]>1e-35?g=-.06962290453843294:t[84]>1e-35?g=-.15290337844960322:t[308]>1e-35?t[8]>2543.5000000000005?g=-.034938657503885584:g=.016339322898966915:t[197]>1e-35?g=.03358907965870046:t[18]>1e-35?g=-.01754013791515288:g=-.0004944586067698557;let A;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?A=.005888790687820524:A=.0429676533834978:t[2]>7.500000000000001?t[0]>119.50000000000001?t[6]>79.50000000000001?A=-.0224319889201976:t[212]>1e-35?A=.06249587051783863:t[8]>963.5000000000001?t[8]>1156.5000000000002?A=.010357273289123324:A=-.029749145161304082:t[218]>1e-35?A=.06449336340743606:A=.018047654539345502:A=-.07350502390293116:A=-.019594829995832414:t[4]>39.50000000000001?A=-.019338083179859314:t[39]>1e-35?A=-.10427066919173111:t[222]>1e-35?t[0]>612.5000000000001?A=-.019197415255018464:A=-.0836562507048181:t[149]>1e-35?A=-.07679624472577429:t[32]>1e-35?A=-.05097506748590604:t[191]>1e-35?A=.04670476485250936:t[30]>1e-35?A=-.05313073892148652:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>8.500000000000002?A=.03930363008271334:A=-.06029171685615689:A=.016203086182431294:t[4]>7.500000000000001?A=-.013824248237085224:t[10]>4.500000000000001?t[94]>1e-35?A=-.09817668643367765:t[10]>40.50000000000001?A=-.023558078753593125:A=.0065113494780482326:t[8]>809.5000000000001?t[297]>1e-35?A=-.1352063548573715:A=.058203900441270634:A=-.035243959159285736:t[10]>59.50000000000001?t[1]>43.50000000000001?A=-.012552876807800442:A=.05991247777734298:A=.0035893102109330177;let y;t[13]>1e-35?t[9]>21.500000000000004?t[145]>1e-35?y=.03507251990078782:t[2]>14.500000000000002?y=.004905698363309292:t[8]>2421.5000000000005?y=-.10306119951984316:y=-.018951037816654928:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?y=-.08503171085833393:y=.015130974593044409:y=-.024425267075198206:y=.02624054905103126:t[4]>19.500000000000004?t[131]>1e-35?y=.02100191580704534:t[32]>1e-35?t[8]>2302.5000000000005?y=.09908783187786288:y=-.06920877329925636:t[8]>241.50000000000003?y=-.016756131804203496:t[9]>33.50000000000001?y=.04903179955263626:t[217]>1e-35?y=-.047416847619291644:y=-.0017200891991431119:t[39]>1e-35?y=-.10389927604977028:t[134]>1e-35?y=-.050480365434872866:t[178]>1e-35?y=-.05167855791556937:t[8]>2134.5000000000005?y=-.01663197335585307:t[242]>1e-35?y=-.05361323756615453:t[118]>1e-35?y=-.05299780866211368:t[10]>24.500000000000004?t[10]>55.50000000000001?t[8]>764.5000000000001?y=-.0016544848369620534:y=.04494144460483587:y=-.009283616456736156:t[121]>1e-35?t[0]>4463.500000000001?y=.051166688553608355:y=-.06623908820705383:t[84]>1e-35?y=-.12990936092409747:t[306]>1e-35?y=-.07020596855118943:t[49]>1e-35?y=.06272964802556856:t[192]>1e-35?y=.06540204627162581:y=.008277910531592885;let E;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?E=.003325460510319164:E=.037153108286272905:t[2]>12.500000000000002?t[1]>124.50000000000001?E=-.09880713344892134:t[7]>60.50000000000001?t[10]>71.50000000000001?E=.0697359767152808:t[230]>1e-35?E=.06513506845651572:E=-.02826625276613455:t[5]>246.50000000000003?t[8]>95.50000000000001?E=.013616385013146277:E=.04171540100223404:E=-.04360396575094823:t[212]>1e-35?E=.025945477945627522:E=-.019793208261535442:t[4]>39.50000000000001?t[25]>1e-35?E=-.07856453318384411:E=-.014803893522351739:t[39]>1e-35?E=-.09185452630751932:t[149]>1e-35?E=-.07122426086157027:t[134]>1e-35?E=-.04231052091434186:t[227]>1e-35?E=-.029815824273994197:t[50]>1e-35?E=-.15736496271211153:t[222]>1e-35?E=-.02360285356956629:t[128]>1e-35?E=-.03922080193836443:t[136]>1e-35?E=-.07219685327698587:t[10]>24.500000000000004?t[1]>8.500000000000002?E=-.0029736170756835783:E=-.06482902102259112:t[84]>1e-35?E=-.11340924635708383:t[94]>1e-35?E=-.03635703457792193:t[118]>1e-35?E=-.058181913914186034:t[126]>1e-35?E=-.062030576241517366:t[116]>1e-35?E=-.045086301850604006:t[25]>1e-35?E=-.031665223656767286:t[203]>1e-35?E=-.009444685731407691:E=.0112265153772187;let _;t[13]>1e-35?t[1]>64.50000000000001?t[9]>14.500000000000002?t[9]>54.50000000000001?_=.022717227245241684:_=-.049700413274686266:_=.007175776918589741:t[5]>50.50000000000001?t[8]>61.50000000000001?t[21]>1e-35?_=-.07927556792063156:t[3]>8.500000000000002?t[4]>23.500000000000004?t[281]>1e-35?_=-.12263724050601095:_=.0070743478891288035:t[288]>1e-35?_=-.050439138582109:_=.0255701593657891:_=-.005812703740580558:t[6]>49.50000000000001?_=-.008542694147899113:_=.035147383686665:_=-.0960461939274094:t[32]>1e-35?_=-.04555453745517765:t[222]>1e-35?t[0]>612.5000000000001?_=-.01800870272656664:_=-.07817304234604389:t[30]>1e-35?_=-.05227061750368981:t[25]>1e-35?t[0]>4449.500000000001?t[217]>1e-35?_=.08778416018479411:_=-.026563982720830256:_=-.05296139548112329:t[50]>1e-35?_=-.14926464875852247:t[8]>779.5000000000001?t[133]>1e-35?_=-.036572140520852024:t[183]>1e-35?_=-.10766853736801459:_=-.003966794968701808:t[217]>1e-35?t[5]>5237.500000000001?_=.09513215942486053:_=-.03641865277445567:t[10]>59.50000000000001?_=.03177172388687933:t[39]>1e-35?_=-.10234241303898953:t[243]>1e-35?_=-.02966738115984321:t[190]>1e-35?_=-.04312785336449181:t[118]>1e-35?_=-.05808521194081524:_=.006720381600740378;let v;t[308]>1e-35?t[5]>423.00000000000006?t[133]>1e-35?v=-.046284053681928526:t[210]>1e-35?v=49778070699847876e-21:t[13]>1e-35?v=.03328070054739309:t[128]>1e-35?v=-.054790214922938896:t[126]>1e-35?v=-.08524792218532945:v=.014414055975542446:t[1]>38.50000000000001?v=-.07287851335872973:v=.005263371501687163:t[9]>7.500000000000001?t[21]>1e-35?t[10]>4.500000000000001?v=-.12459748864088374:v=-.004626323021331593:t[298]>1e-35?t[4]>64.50000000000001?v=.13044981041138526:t[9]>71.50000000000001?v=-.056068402282406865:t[9]>12.500000000000002?v=.038957722962512764:v=-.04598815982492169:t[8]>691.5000000000001?t[126]>1e-35?v=-.0852126122372075:t[225]>1e-35?v=.10082066771689505:t[1]>161.50000000000003?v=-.11609832500613824:t[3]>8.500000000000002?t[8]>1685.5000000000002?v=-.010835400874777133:v=.004607419973807752:v=-.016989075258564062:v=.009205417251698097:t[23]>1e-35?t[20]>1e-35?v=.10184317139657878:t[0]>5724.500000000001?v=-.1163666496650542:t[1]>106.50000000000001?v=.1303850608190687:t[129]>1e-35?v=.10745031509534769:v=.006166901738036226:t[31]>1e-35?v=.010177092833155127:t[13]>1e-35?t[0]>213.50000000000003?v=.005004582564506611:v=-.10481581731668346:t[19]>1e-35?v=-.009850706427306281:v=-.02608226348051303;let b;t[13]>1e-35?t[1]>64.50000000000001?t[2]>4.500000000000001?b=-.0024117174588695603:b=-.058339700513831916:t[212]>1e-35?t[0]>2215.5000000000005?t[8]>847.5000000000001?t[10]>21.500000000000004?t[1]>39.50000000000001?b=.04575380761203418:b=-.10025595041353463:t[15]>1e-35?b=.17705790384964004:b=.0073813837628615014:b=.07676373681392407:b=-.027167992693885996:t[3]>11.500000000000002?t[280]>1e-35?b=.07078572910026419:t[4]>23.500000000000004?b=.005513918674164821:b=.0206586476926392:t[0]>5269.500000000001?b=.07706773525822633:b=-.010233826953776122:t[148]>1e-35?t[8]>1622.5000000000002?b=-.03204783603215824:b=.027405418223981973:t[4]>14.500000000000002?t[131]>1e-35?t[9]>1.5000000000000002?t[0]>5026.500000000001?b=-.0930246911392012:b=.011173087289703683:t[3]>24.500000000000004?b=.03281421918878597:b=.12449335091369843:t[204]>1e-35?b=.06634531187326123:b=-.011522999669353388:t[92]>1e-35?t[10]>42.50000000000001?b=-.041196758517013515:t[4]>7.500000000000001?b=-2942718111029724e-20:t[4]>6.500000000000001?b=.11953909558532852:b=.03188615019450534:t[122]>1e-35?b=-.0616037324662157:t[101]>1e-35?b=.027230889593349412:t[8]>4968.500000000001?b=-.1113986516540856:t[3]>2.5000000000000004?b=-.002045140426885727:t[129]>1e-35?b=.12641163374304432:b=.014909826232873194;let I;t[308]>1e-35?t[0]>7277.500000000001?I=-.09337446795435:t[5]>423.00000000000006?t[133]>1e-35?I=-.040884836258675006:t[210]>1e-35?I=-.0003719413278428804:t[13]>1e-35?I=.030287610160818174:I=.011174130013595384:t[1]>38.50000000000001?I=-.0662442170185784:I=.004332185707008564:t[9]>7.500000000000001?t[145]>1e-35?t[285]>1e-35?I=-.08092286307197555:I=.029866363328584986:t[21]>1e-35?t[10]>4.500000000000001?I=-.1155211149523894:I=-.0032903546638958538:t[149]>1e-35?I=-.03632198993199768:t[3]>9.500000000000002?t[8]>999.5000000000001?I=-.003507023626534306:t[128]>1e-35?t[4]>13.500000000000002?t[0]>3459.5000000000005?I=-.025416927789760076:I=.02777568919793122:I=-.10310351509769732:I=.013549608903688785:t[186]>1e-35?I=.08513865847420551:I=-.009306721292510369:t[31]>1e-35?I=.009780833952582307:t[23]>1e-35?I=.011143773934157629:t[210]>1e-35?I=.025354797285173356:t[17]>1e-35?t[10]>3.5000000000000004?I=-.04846287537743046:I=-.014647271080376757:t[2]>5.500000000000001?t[7]>57.50000000000001?I=-.034224938681445764:t[8]>1641.5000000000002?I=-.027298372075800673:t[191]>1e-35?t[10]>18.500000000000004?I=-.027950103994861836:I=.14575930827829034:I=-.007124740389354946:t[10]>22.500000000000004?I=.013173304107866726:I=-.11119620042551365;let x;t[131]>1e-35?x=.01892225243240137:t[308]>1e-35?t[5]>691.5000000000001?t[133]>1e-35?x=-.037118314390013646:t[1]>51.50000000000001?t[5]>3749.5000000000005?t[8]>58.50000000000001?x=-.022305242912035072:x=.024792895826340516:x=.013666137278072166:t[88]>1e-35?t[10]>27.500000000000004?x=.2080083584805785:x=.04247197078083379:t[10]>40.50000000000001?t[18]>1e-35?t[1]>27.500000000000004?x=.060783227455868206:x=-.056904865557409035:x=-.03278952553107572:t[192]>1e-35?x=.13117402617043625:x=.01647119888257836:x=-.01825870445636398:t[9]>6.500000000000001?t[298]>1e-35?x=.026536210945939682:t[8]>691.5000000000001?t[126]>1e-35?x=-.07927319604548912:t[10]>3.5000000000000004?t[21]>1e-35?x=-.11083976837572328:t[146]>1e-35?x=-.03359294484446772:x=-.0042815953591236475:t[190]>1e-35?x=-.09264239592903775:t[10]>1e-35?x=.022282638485105657:x=-.0205994057928458:t[5]>4918.500000000001?x=.03430715695199153:t[243]>1e-35?t[2]>57.50000000000001?x=.08935072241972036:x=-.03781647876237494:x=.0062655753179671515:t[31]>1e-35?x=.008603500300349887:t[230]>1e-35?x=.03350056932774173:t[23]>1e-35?t[241]>1e-35?x=.10277555508503314:x=.0017901817172993888:t[2]>98.50000000000001?x=-.05920081229672715:x=-.015722173275739208;let R;t[13]>1e-35?t[118]>1e-35?R=.07957905150112207:t[1]>125.50000000000001?R=-.0662620579858685:t[145]>1e-35?R=.029682040828779843:t[19]>1e-35?t[6]>15.500000000000002?R=-.0009597832580977798:R=-.081474760755753:t[212]>1e-35?R=.03637001492325179:R=.006912305498963309:t[32]>1e-35?R=-.03919900630910754:t[134]>1e-35?R=-.036225295529777886:t[4]>4.500000000000001?t[5]>384.50000000000006?t[204]>1e-35?R=.06671440854602108:t[136]>1e-35?R=-.07577364230133474:t[148]>1e-35?t[4]>7.500000000000001?R=.026430947016830915:R=-.04075501264495112:t[9]>93.50000000000001?R=-.04353169430417609:t[50]>1e-35?R=-.1411224537622882:t[17]>1e-35?t[49]>1e-35?R=.068392679163672:t[10]>1.5000000000000002?R=-.0209659792007492:R=-.0004393235559249831:t[133]>1e-35?t[9]>64.50000000000001?R=.07254524592323175:R=-.0319087835282534:R=.00037444813327793425:R=-.025138768151370408:t[243]>1e-35?R=-.050010891710502096:t[94]>1e-35?R=-.0817513550778599:t[122]>1e-35?R=-.061038875809822285:t[19]>1e-35?t[8]>1085.5000000000002?R=-.008408408775061623:t[2]>5.500000000000001?t[218]>1e-35?R=.1454877641381946:R=.053787998331240316:t[9]>33.50000000000001?R=.08602629796680285:R=-.03895127455803038:R=.008830878042315722;let w;t[131]>1e-35?w=.01687979707990516:t[8]>2915.5000000000005?t[297]>1e-35?w=.07473600489975568:t[0]>93.50000000000001?w=-.021596848506011502:w=-.13840802327735696:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?w=.10264284346448256:w=.031042487183181262:w=-.016653982936827776:t[4]>60.50000000000001?t[10]>75.50000000000001?w=.04226403420647408:t[10]>1e-35?t[0]>4733.500000000001?w=.006271403149804702:w=-.030013637555715046:t[0]>4449.500000000001?w=-.06556876058654929:w=.06437994816903034:t[32]>1e-35?w=-.043814577251655815:t[308]>1e-35?t[0]>7277.500000000001?w=-.09349726304052086:t[210]>1e-35?w=-.0035960132209098003:t[5]>691.5000000000001?t[133]>1e-35?w=-.029188394315052574:w=.017219308333820193:w=-.017378928852189585:t[9]>6.500000000000001?t[0]>2653.5000000000005?t[149]>1e-35?w=-.04428555753857688:w=.0001456106867817353:t[5]>213.50000000000003?w=.01740292726636365:w=-.011361718115556464:t[7]>4.500000000000001?t[0]>316.50000000000006?t[19]>1e-35?t[10]>54.50000000000001?w=.03410288911259329:t[121]>1e-35?w=-.06056527462120627:t[8]>2592.5000000000005?w=.12166808844363577:t[191]>1e-35?w=.11669879218998758:w=-.001664858391716235:w=-.01262927450503166:w=-.04506589951879664:t[227]>1e-35?w=-.08548904959752329:w=.02156080776537726;let P;t[306]>1e-35?t[149]>1e-35?P=-.1389218965136736:P=-.032218642644416894:t[13]>1e-35?P=.006465035217331847:t[50]>1e-35?P=-.1381687930130022:t[179]>1e-35?P=-.13112784985951215:t[148]>1e-35?t[8]>1726.5000000000002?P=-.03262719498763048:P=.023342916702125613:t[191]>1e-35?P=.030005484947580197:t[4]>4.500000000000001?t[204]>1e-35?P=.047767773119269434:t[136]>1e-35?t[0]>1937.5000000000002?P=-.09989343595668776:P=.06533942033334243:t[15]>1e-35?t[9]>86.50000000000001?P=-.10577989354150097:t[8]>668.5000000000001?t[126]>1e-35?P=-.09165257825246746:t[9]>32.50000000000001?P=.02484870392366004:P=-.008499493096971395:t[8]>24.500000000000004?P=.02459679192828244:P=-.010527978013140512:t[25]>1e-35?t[217]>1e-35?P=.0015644546318714849:P=-.06579524865022705:P=-.0060233890975120614:t[122]>1e-35?t[1]>36.50000000000001?P=.03331853632960164:P=-.09482264761126993:t[19]>1e-35?t[8]>1430.5000000000002?P=-.019091477207111116:P=.037878468575478504:t[94]>1e-35?P=-.08013082284576584:t[4]>2.5000000000000004?t[186]>1e-35?P=.16919658785098224:t[243]>1e-35?P=-.06580584936754524:P=.01567555159935563:t[129]>1e-35?P=.06721746994993226:t[10]>32.50000000000001?P=-.046394462507797975:P=-.006436180519584767;let k;t[131]>1e-35?k=.015039096856208693:t[8]>779.5000000000001?t[145]>1e-35?k=.019122095523977856:t[298]>1e-35?k=.023828936462317443:t[1]>23.500000000000004?t[5]>384.50000000000006?t[7]>59.50000000000001?k=-.026094309429557913:t[204]>1e-35?k=.09163404305658318:t[1]>27.500000000000004?t[149]>1e-35?t[6]>34.50000000000001?k=.012643810980689466:k=-.07884161741497837:k=-.0025267379810891104:t[2]>43.50000000000001?t[0]>2860.5000000000005?k=.04493082949897325:k=.18046359750455776:t[7]>18.500000000000004?k=-.018667348656891496:k=.02584325784698236:k=-.045696524897545915:t[0]>3321.5000000000005?t[201]>1e-35?k=.04749240016989375:k=-.0333334578246718:t[5]>3276.5000000000005?k=.11330554740098908:t[7]>94.50000000000001?k=.1296600395033268:k=-.003576436308940934:t[15]>1e-35?t[183]>1e-35?k=-.13787130789142835:t[0]>1847.5000000000002?k=.017915229729920556:t[10]>23.500000000000004?t[10]>31.500000000000004?t[6]>7.500000000000001?k=.028856848462727104:k=-.11197632885851168:k=.08169801342016791:t[1]>22.500000000000004?k=-.021052888644970163:k=.019048604298876753:t[7]>4.500000000000001?k=-.002603328695276418:t[7]>1.5000000000000002?t[2]>5.500000000000001?k=.03432638833359197:k=-.0036767863082454973:t[1]>48.50000000000001?k=.03087375270128195:t[2]>3.5000000000000004?k=-.04219917149740248:k=.018818493993207935;let Q;t[306]>1e-35?Q=-.04076858123502297:t[13]>1e-35?t[1]>67.50000000000001?t[9]>14.500000000000002?t[9]>53.50000000000001?t[8]>1971.5000000000002?Q=-.09091897542577475:Q=.04042943082645558:t[218]>1e-35?Q=.056254985867151:Q=-.053848117950183044:Q=.003881630017086845:t[5]>5152.500000000001?t[8]>857.5000000000001?t[6]>28.500000000000004?Q=.021581808008986944:Q=-.05639286496176611:Q=.052838875036198954:t[5]>50.50000000000001?t[5]>4082.5000000000005?t[17]>1e-35?Q=.023061479860228728:t[145]>1e-35?t[9]>10.500000000000002?Q=.023885302967553288:Q=.1617794086125622:t[212]>1e-35?Q=.04504545345658806:t[3]>17.500000000000004?t[4]>45.50000000000001?Q=-.03948072448245435:t[1]>47.50000000000001?t[9]>18.500000000000004?Q=.01894935813286188:Q=-.06449356357429188:Q=.012297239104320094:t[1]>26.500000000000004?t[8]>33.50000000000001?Q=-.034718828212885515:Q=.0898976288814321:t[1]>17.500000000000004?Q=-.15440137451988326:Q=-.03864183216821465:Q=.009988507307006308:Q=-.08540311947043305:t[50]>1e-35?Q=-.13323659732101975:t[134]>1e-35?Q=-.031820386486894385:t[32]>1e-35?t[8]>2302.5000000000005?Q=.08082476177379844:Q=-.041665761903645876:t[179]>1e-35?Q=-.12405023987936657:t[39]>1e-35?Q=-.06247416524997478:t[138]>1e-35?Q=-.10724031753676487:Q=-.0005423122305122404;let M;t[308]>1e-35?M=.006160742906729798:t[190]>1e-35?t[0]>2461.5000000000005?t[10]>22.500000000000004?M=.023223358334607133:M=-.04383410185346742:M=-.08542395045055405:t[297]>1e-35?t[8]>51.50000000000001?t[1]>13.500000000000002?M=.023406489302867494:M=-.085521220804058:M=-.02921899554854833:t[298]>1e-35?t[9]>12.500000000000002?M=.028120059780969632:M=-.04211009474298743:t[294]>1e-35?M=-.05040415676618239:t[86]>1e-35?t[1]>36.50000000000001?M=-.0993035220737934:M=-.0005384930611060366:t[230]>1e-35?t[4]>6.500000000000001?M=.029770210551187937:M=-.016272917551655715:t[4]>60.50000000000001?t[280]>1e-35?M=.06421359317599738:M=-.01963732469244167:t[218]>1e-35?t[3]>3.5000000000000004?M=.024368404612215164:M=-.04045232374803373:t[131]>1e-35?M=.017372701982485795:t[120]>1e-35?M=.08812710275150198:t[18]>1e-35?t[90]>1e-35?M=.18451364351180236:t[7]>33.50000000000001?M=-.03850813130183531:t[195]>1e-35?M=.06966114053446336:t[3]>16.500000000000004?M=-.0012869181693341211:t[0]>4242.500000000001?M=-.054625548611291035:M=-.014431095117473881:t[5]>4558.500000000001?t[8]>1.5000000000000002?M=.006302103427145562:M=.13967622319898698:t[121]>1e-35?M=-.038798585213145644:t[5]>4544.500000000001?M=-.08050498033009466:M=-.002986974112681435;let D;t[0]>384.50000000000006?t[2]>101.50000000000001?t[1]>16.500000000000004?D=-.03461119351456781:D=.05659026566680352:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?D=-.12404435523286539:D=-.0034376913880382956:D=-.09821622245095822:t[131]>1e-35?t[9]>1.5000000000000002?D=.0037507103585310234:D=.03610387965829944:t[8]>999.5000000000001?t[9]>137.50000000000003?D=-.11985021663179699:t[0]>1847.5000000000002?t[126]>1e-35?D=-.04832024079663151:t[37]>1e-35?D=-.037103393468366934:D=-.004248086592531705:t[8]>3084.0000000000005?t[9]>43.50000000000001?D=.032539071163832034:t[5]>1643.5000000000002?D=.036408625378035665:t[0]>1500.5000000000002?D=-.1346358322854993:D=-.027586559522081014:t[3]>1e-35?t[190]>1e-35?D=-.1133991164577881:t[9]>52.50000000000001?D=-.024478640359723122:D=.03673777861098756:D=-.1037451237591819:t[230]>1e-35?t[9]>48.50000000000001?t[10]>20.500000000000004?D=.002583438691776944:D=.10773520810108106:t[9]>12.500000000000002?t[1]>16.500000000000004?D=-.02141222346712401:D=.06392462314316179:t[4]>12.500000000000002?D=.08700122294434816:t[8]>267.50000000000006?D=.056923170082743224:D=-.07716309825583327:t[32]>1e-35?D=-.03961343943752142:D=.002674914122888783:t[1]>42.50000000000001?D=-.05217539654421676:t[145]>1e-35?D=.09553630282946368:D=-.009424791262477729;let G;t[183]>1e-35?G=-.05753337139158443:t[308]>1e-35?G=.00562436671450989:t[9]>7.500000000000001?t[21]>1e-35?t[10]>8.500000000000002?G=-.10477869875380448:G=-.0070301869937306055:t[3]>9.500000000000002?t[8]>1765.5000000000002?t[0]>4571.500000000001?G=-.12526505173232894:t[10]>1e-35?t[9]>71.50000000000001?G=-.04442302951713574:G=.00012409888451734224:G=-.092199119633697:t[225]>1e-35?G=.13773072450201831:t[0]>2882.5000000000005?G=.0028540012229920533:t[298]>1e-35?G=.07134486044361629:G=.014297412329837425:t[145]>1e-35?G=.05608385321902638:t[92]>1e-35?G=.038298413603926135:t[107]>1e-35?t[2]>6.500000000000001?G=-.0039957800609801315:G=.0776927564241081:t[203]>1e-35?G=-.05502900859432093:t[105]>1e-35?G=.06062892720841595:G=-.009574839629252128:t[31]>1e-35?G=.009488858841144216:t[23]>1e-35?t[20]>1e-35?G=.08818126313644752:t[8]>161.50000000000003?G=.014353968957885408:G=-.022240738532827903:t[210]>1e-35?G=.024648862719806694:t[2]>5.500000000000001?t[4]>4.500000000000001?t[17]>1e-35?t[10]>16.500000000000004?G=-.043902062079383485:G=-.014741559220396223:G=-.00934935734853194:t[6]>32.50000000000001?G=.1514593126307404:G=.010771222510801532:t[10]>22.500000000000004?G=.01412495209334078:G=-.08576940379502533;let O;t[0]>384.50000000000006?t[84]>1e-35?O=-.06647690967306838:t[2]>101.50000000000001?O=-.024451334501552457:t[306]>1e-35?O=-.034517188927733505:t[131]>1e-35?t[9]>1.5000000000000002?O=.0031858381443673127:O=.032574927024450646:t[204]>1e-35?t[1]>62.50000000000001?O=-.08601340441214533:t[1]>29.500000000000004?O=.10487598629539963:t[8]>597.5000000000001?O=-.0786529133673238:O=.08689436600511559:t[8]>779.5000000000001?t[10]>2.5000000000000004?t[9]>100.50000000000001?O=-.04883600353740688:t[126]>1e-35?O=-.03794042763348827:O=-.003358871967539988:t[210]>1e-35?O=.054991356498447566:t[6]>19.500000000000004?O=-.007418396981635549:O=.018032606049498613:t[18]>1e-35?t[7]>35.50000000000001?t[2]>44.50000000000001?O=-.02143003429501711:O=-.09016000554055564:t[1]>19.500000000000004?t[1]>42.50000000000001?t[8]>17.500000000000004?O=-.006636355416244082:O=-.06483095743431454:t[4]>21.500000000000004?O=-.028975965946833545:O=.022012264796522657:O=-.06653648243193663:t[5]>4593.500000000001?O=.01753551428088607:t[217]>1e-35?O=-.028864824937700297:t[94]>1e-35?O=-.04885192273020658:t[279]>1e-35?O=.08105715462329498:t[121]>1e-35?O=-.04576676034750651:O=.004795141324949362:t[1]>42.50000000000001?O=-.047446619702809195:t[145]>1e-35?O=.08400495571952321:O=-.00854528836489364;let N;t[294]>1e-35?N=-.042529778074638265:t[266]>1e-35?N=-.1180276669679798:t[134]>1e-35?N=-.026818144353279623:t[183]>1e-35?N=-.05120747503479363:t[227]>1e-35?t[8]>1641.5000000000002?N=-.07265906898294434:t[4]>12.500000000000002?t[17]>1e-35?N=-.027516137530797014:t[0]>4331.500000000001?t[1]>64.50000000000001?N=-.03049646619610203:t[1]>50.50000000000001?N=.20634590755061122:N=.06956378103625731:t[0]>3770.5000000000005?N=-.07946414366134913:t[19]>1e-35?N=.17083312065604694:t[2]>21.500000000000004?N=-.02327981978127724:N=.129717297518715:t[145]>1e-35?N=.006891245076133524:N=-.0789123467863741:t[3]>99.50000000000001?N=-.02022281202803071:t[302]>1e-35?t[10]>47.50000000000001?N=.06447639919732716:N=-.05457561977645972:t[306]>1e-35?N=-.029995903305383882:t[191]>1e-35?N=.030596508110850414:t[242]>1e-35?N=-.024085578702020216:t[8]>3198.5000000000005?t[297]>1e-35?N=.09518584795377832:N=-.018197744600833596:t[13]>1e-35?N=.006751790086127549:t[148]>1e-35?N=.01904174573618417:t[99]>1e-35?N=.025287735102561926:t[4]>14.500000000000002?N=-.004364337681643273:t[1]>15.500000000000002?t[35]>1e-35?N=-.09467943982430241:t[243]>1e-35?N=-.02521824751996268:N=.005437570718352172:N=-.022476214821960674;let F;t[0]>384.50000000000006?t[84]>1e-35?F=-.06088131453064195:t[147]>1e-35?F=-.05332792965930566:t[135]>1e-35?t[9]>32.50000000000001?F=.04219361472548491:F=-.07227529211725771:t[10]>4.500000000000001?t[21]>1e-35?F=-.0787279848043689:t[17]>1e-35?t[3]>18.500000000000004?t[188]>1e-35?F=-.054347604504400286:t[0]>3544.5000000000005?t[0]>5850.500000000001?F=-.11431764534511478:F=.013549717238356157:F=-.020987333767091276:t[6]>2.5000000000000004?F=-.02914877855133127:F=.08483464900160231:t[8]>58.50000000000001?t[183]>1e-35?F=-.10087072787978416:t[37]>1e-35?F=-.030467397753331196:t[229]>1e-35?F=-.1017559811057469:t[4]>20.500000000000004?F=-.00413177742240167:t[20]>1e-35?F=.05213315982685969:F=.0037921635866823133:t[8]>51.50000000000001?F=.07327913092421544:t[6]>49.50000000000001?F=-.03457694284156811:t[6]>18.500000000000004?t[7]>17.500000000000004?F=.02744420891894289:F=.11288946357194463:F=.003482908820966248:t[18]>1e-35?t[1]>20.500000000000004?t[7]>4.500000000000001?F=-.012329314369909049:F=.026816658655600168:F=-.0872405354618811:F=.007872673500247845:t[1]>42.50000000000001?F=-.04309044198258254:t[145]>1e-35?F=.07572529147860785:t[7]>5.500000000000001?F=-.013837187093264945:t[1]>17.500000000000004?F=.04208698439539668:F=-.06284346769019863;let U;t[294]>1e-35?U=-.0384794324818203:t[266]>1e-35?U=-.1087205883821061:t[32]>1e-35?t[8]>2302.5000000000005?U=.07432960094940501:U=-.035248735855751855:t[134]>1e-35?U=-.02456191365284949:t[121]>1e-35?t[0]>4720.500000000001?t[1]>39.50000000000001?U=-.01706896375068821:U=.08212247914968074:t[2]>59.50000000000001?U=-.09546478958824225:t[6]>53.50000000000001?U=.12317082897575611:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?U=.02816463285971267:U=.15449139016588445:U=-.10199787406123524:U=-.038068684323297096:t[223]>1e-35?t[8]>668.5000000000001?U=-.13924786681478077:U=-.0072772442570213335:t[39]>1e-35?U=-.05392786531177836:t[0]>93.50000000000001?t[40]>1e-35?U=-.054059371343144036:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?U=-.11174465335620831:U=.00013144040097180107:U=-.08493919336681105:t[42]>1e-35?U=-.11078582572836196:t[84]>1e-35?t[4]>17.500000000000004?U=-.015540659878839153:U=-.14442609417300142:t[21]>1e-35?U=-.025251979447574083:U=.0023698372645272847:t[18]>1e-35?U=.07269739695712212:t[8]>2592.5000000000005?U=-.1460388776448558:t[9]>30.500000000000004?t[1]>23.500000000000004?U=-.01835130329646532:t[9]>45.50000000000001?U=.02023047454629885:U=.16469378262221102:U=-.042975030085836426;let L;t[8]>2915.5000000000005?t[297]>1e-35?L=.06257393915394144:t[0]>93.50000000000001?t[4]>1.5000000000000002?L=-.01034964686484714:L=-.07357437440667927:L=-.11987794734779106:t[298]>1e-35?t[8]>81.50000000000001?t[0]>3370.5000000000005?t[8]>155.50000000000003?t[8]>660.5000000000001?t[8]>2134.5000000000005?L=-.09476398869062203:t[9]>72.50000000000001?L=-.0757383854264379:L=.02806542779508718:L=-.05147742568418084:L=.10212721564444344:L=.0518263760642861:L=-.08743405377022222:t[189]>1e-35?t[0]>5269.500000000001?L=-.10669213185972036:L=.027050434286384796:t[302]>1e-35?L=-.0407832394672723:t[116]>1e-35?t[10]>38.50000000000001?L=.06354599160071946:t[1]>67.50000000000001?L=.05317447949011187:L=-.059138165935307165:t[212]>1e-35?t[19]>1e-35?L=-.09369289448773599:t[0]>2215.5000000000005?L=.04077965380363924:t[0]>807.5000000000001?L=-.0591771776458298:L=.057315736906679376:t[308]>1e-35?t[1]>52.50000000000001?t[5]>3749.5000000000005?L=-.016323380219241672:L=.007291062979527741:t[210]>1e-35?t[8]>1641.5000000000002?L=.03720704290087811:L=-.008730548158766654:t[4]>80.50000000000001?L=-.05346644687473197:L=.014596824736762107:t[218]>1e-35?t[3]>3.5000000000000004?L=.019984510398089086:L=-.03917825025861855:t[9]>170.50000000000003?L=-.09759719821334525:L=-.0023586682752856298;let H;t[183]>1e-35?t[17]>1e-35?H=.030100940443356424:t[10]>1.5000000000000002?H=-.10861112216742408:H=.017680668976453255:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?H=-.032062878390325456:H=-.10808232631806887:t[8]>1641.5000000000002?H=-.06147013392655731:t[4]>12.500000000000002?H=.03324767551088266:t[145]>1e-35?H=.028851633810612017:H=-.054871239091792784:t[134]>1e-35?H=-.023813968121342108:t[266]>1e-35?H=-.10037039667146351:t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>1939.5000000000002?H=-.055566877553100726:t[2]>24.500000000000004?t[8]>182.50000000000003?t[10]>43.50000000000001?t[10]>55.50000000000001?H=-.025350325484720576:H=.1579024598549572:t[9]>2.5000000000000004?t[0]>3746.5000000000005?H=.056817276537534815:H=-.07674158463557636:H=-.06335553143454145:t[1]>56.50000000000001?H=.16390494217299284:H=-.0027330160430847177:t[10]>36.50000000000001?t[8]>1067.5000000000002?H=.041717597065890205:H=-.10357913492269129:t[10]>29.500000000000004?H=.1365512866715726:H=.020600048310575665:H=.09708785634773187:H=-.060427658852305666:t[126]>1e-35?t[10]>32.50000000000001?t[6]>24.500000000000004?t[8]>1146.5000000000002?H=-.03146213719547347:H=.11784024316238083:H=-.050940520532045355:H=-.047988344143075616:t[191]>1e-35?H=.028764654731460032:H=.0011911575567860023;let $;t[294]>1e-35?t[10]>50.50000000000001?$=-.11630092297244568:t[0]>2432.5000000000005?t[0]>4199.500000000001?$=-.05103908560370243:$=.05002066201169583:$=-.09976646725732496:t[32]>1e-35?t[0]>4242.500000000001?$=-.0648838712201258:t[5]>3721.5000000000005?t[9]>4.500000000000001?$=.127983140816313:$=-.05436534163636867:$=-.024514536544596455:t[121]>1e-35?t[0]>4449.500000000001?t[4]>9.500000000000002?$=-.009504203657088933:t[8]>819.5000000000001?$=.18689664822602375:$=.03635576744011826:$=-.029862411809998525:t[223]>1e-35?$=-.06474496692999487:t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?$=-.09405026597863717:t[0]>4153.500000000001?$=.053577663326799765:$=-.05062127873995668:$=.06512222894425874:t[39]>1e-35?$=-.04985311717827547:t[51]>1e-35?$=-.04541229517934797:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?$=-.02860634573675884:$=.08863753005590103:$=.11158892111063744:t[0]>655.5000000000001?$=-.031005736641654926:$=-.1439827004505974:t[222]>1e-35?t[1]>11.500000000000002?t[0]>612.5000000000001?$=-.00843386136334982:$=-.05273594615999777:$=.1060183822015004:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?$=-.015774115523598486:$=.10147367091236065:$=-.048307000563071016:$=.002118376117677254;let W;t[8]>1014.5000000000001?t[9]>137.50000000000003?W=-.10279096288817871:t[0]>93.50000000000001?t[8]>1067.5000000000002?t[227]>1e-35?W=-.03544332389470493:t[285]>1e-35?t[9]>64.50000000000001?W=.07211107542565391:W=-.041556776020476104:t[145]>1e-35?t[1]>66.50000000000001?W=-.0751486415451188:t[1]>59.50000000000001?W=.13459005084554104:W=.024184371850147466:t[0]>3072.5000000000005?t[95]>1e-35?W=.06715575425741895:W=-.005895690393702183:t[8]>2915.5000000000005?W=-.010205039411753762:t[9]>33.50000000000001?t[9]>47.50000000000001?W=-.00029068886245881074:W=.0613467393188786:t[148]>1e-35?W=-.06074463294936236:t[3]>1.5000000000000002?t[5]>1849.5000000000002?t[1]>15.500000000000002?W=.003887223773199377:W=-.08553893131979015:W=.025654192706396767:W=-.05651733979610658:W=-.02039913645229667:t[2]>7.500000000000001?W=-.1058450646728524:W=.02267192191610376:t[1]>120.50000000000001?t[2]>60.50000000000001?W=-.12304707569000428:t[1]>132.50000000000003?t[6]>41.50000000000001?W=.1283258201586378:W=-.01718135372229775:W=-.07702452408491414:t[125]>1e-35?W=-.0804612900572707:t[178]>1e-35?t[0]>4533.500000000001?W=.04273051857848212:W=-.04533122948101463:t[2]>196.50000000000003?W=-.10543331044088727:t[94]>1e-35?t[5]>4532.500000000001?W=.0231032972703664:W=-.04807386814498683:W=.002729435991332102;let j;t[179]>1e-35?j=-.08065315471211375:t[183]>1e-35?t[17]>1e-35?j=.026484626664041125:t[10]>1.5000000000000002?j=-.10187000872941615:j=.015274190652133752:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?j=.09574540795390041:j=-.06454986703691233:j=-.11411849349353141:t[266]>1e-35?j=-.09281838517322076:t[32]>1e-35?t[8]>2302.5000000000005?j=.06685250330182936:t[4]>67.50000000000001?t[2]>97.50000000000001?j=-.04403391373512386:j=.1132928075412222:t[2]>47.50000000000001?j=-.09700191391838056:j=-.02147184357182825:t[10]>4.500000000000001?t[21]>1e-35?j=-.0735617817957859:t[17]>1e-35?t[3]>18.500000000000004?j=-.001668912999010927:j=-.02363511102970245:t[8]>58.50000000000001?j=-.00035213368294640616:t[3]>17.500000000000004?t[2]>28.500000000000004?t[10]>23.500000000000004?t[1]>38.50000000000001?j=.0911011436534449:t[1]>28.500000000000004?j=-.07192390493729035:j=.06913818091291246:j=-.012312625373699222:j=.06784496312307986:j=-167756936027735e-19:t[18]>1e-35?t[8]>302.50000000000006?j=.0026564453057705273:j=-.025425772389361445:t[122]>1e-35?j=-.12046786388602149:t[0]>3183.5000000000005?j=.01162092842804907:t[91]>1e-35?j=.07000265526928563:t[1]>22.500000000000004?t[0]>576.5000000000001?j=-.0001647792543020228:j=-.023664538532907665:j=.01609078206180752;let ce;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4141.500000000001?ce=-.051473645433684705:t[0]>3030.5000000000005?t[1]>51.50000000000001?ce=-.017696526862422682:ce=.1450050954613223:ce=-.05406930069823832:ce=-.08308700260259043:t[120]>1e-35?ce=.058316269489189415:t[297]>1e-35?t[94]>1e-35?ce=-.07425512495167255:t[8]>51.50000000000001?t[1]>13.500000000000002?t[1]>33.50000000000001?t[19]>1e-35?t[0]>4498.500000000001?ce=.038431826961746934:ce=-.05937462906539856:t[9]>65.50000000000001?ce=.10814845712507865:t[4]>9.500000000000002?t[2]>22.500000000000004?t[1]>39.50000000000001?t[1]>44.50000000000001?t[10]>44.50000000000001?ce=.12297945639231944:t[0]>3796.5000000000005?t[4]>26.500000000000004?ce=-.09579030954062734:ce=.025064711572811746:ce=.02579440518821548:ce=.1044440128091862:ce=-.058348633139536844:ce=.07766788227934436:ce=-.01021229539092708:t[2]>2.5000000000000004?t[10]>29.500000000000004?t[0]>3770.5000000000005?t[0]>4438.500000000001?ce=.07463684068207214:ce=.18244269035484484:t[6]>39.50000000000001?ce=-.06050050067471004:ce=.05787759066913493:ce=.010783225857972171:ce=.1674891243602606:t[4]>9.500000000000002?ce=-.004814132027475892:ce=-.14543299413454813:ce=-.02935093398687923:t[116]>1e-35?t[9]>2.5000000000000004?t[8]>1218.5000000000002?ce=-.07634466313617769:ce=.0287825335169114:ce=-.06894721943300268:ce=-.00023988459059521937;let J;t[131]>1e-35?t[1]>93.50000000000001?J=-.05706887458825395:t[2]>1.5000000000000002?J=.011446637886629108:J=-.10616119878749211:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?J=.08424281276381033:t[3]>17.500000000000004?t[20]>1e-35?J=.11146885439601915:t[8]>61.50000000000001?t[0]>3530.5000000000005?t[9]>48.50000000000001?t[9]>61.50000000000001?J=.026278724448495064:J=.17053138400480508:t[0]>4463.500000000001?J=-.06482289890096041:J=.03026516489536295:J=-.031785170717683144:J=.1312690622980455:t[13]>1e-35?J=.14336922540461444:J=.03523850945454039:J=-.015407465968975714:t[39]>1e-35?J=-.054809635385158186:t[32]>1e-35?t[0]>4242.500000000001?J=-.0659975068798723:J=-.008386582621403979:t[4]>60.50000000000001?t[10]>75.50000000000001?t[3]>107.50000000000001?J=-.04225314193574262:t[3]>70.50000000000001?t[1]>29.500000000000004?J=.057409156184759516:J=.2024322059866388:J=-.030670938454461245:t[10]>1e-35?t[0]>4733.500000000001?J=.010648654146284154:t[308]>1e-35?J=.008728141696325391:t[4]>64.50000000000001?t[298]>1e-35?J=.12364025998551711:J=-.02247495081065243:t[1]>22.500000000000004?J=-.0726295464624251:J=.03481895086048152:t[0]>4331.500000000001?J=-.04775443357020673:J=.07172377425057568:t[2]>89.50000000000001?J=-.11782645274716962:J=.00010092665257989378;let Te;t[147]>1e-35?Te=-.041560228567115574:t[302]>1e-35?t[10]>47.50000000000001?Te=.062292114082780084:t[10]>5.500000000000001?t[7]>22.500000000000004?Te=-.016101990375700172:t[0]>2579.5000000000005?Te=-.13045089661551845:Te=-.02874367814784938:Te=.025835149631944995:t[167]>1e-35?t[0]>3928.5000000000005?Te=.17084176915326055:Te=-.019195947948312853:t[222]>1e-35?t[30]>1e-35?t[1]>36.50000000000001?t[8]>45.50000000000001?t[8]>578.5000000000001?t[1]>67.50000000000001?Te=.10591712319944074:Te=-.024082167264285:Te=.16497698867036126:Te=-.04985066326861431:t[0]>1937.5000000000002?t[2]>16.500000000000004?Te=-.021012910475524206:Te=-.13058422554298485:t[0]>1102.5000000000002?Te=.10955864175201457:Te=-.03566689354348996:t[1]>11.500000000000002?Te=-.02093884208606101:Te=.09107244766183857:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?Te=-.013861861436128482:Te=.09756849802202777:t[224]>1e-35?t[1]>51.50000000000001?Te=.10163873449625677:Te=-.02779270277623805:t[1]>26.500000000000004?Te=-.08035058228527389:Te=.0005719695099064484:t[191]>1e-35?t[9]>9.500000000000002?Te=-.007028075523033826:Te=.0489470913925288:t[1]>61.50000000000001?t[132]>1e-35?Te=.11230846723576784:t[0]>350.50000000000006?t[2]>1.5000000000000002?Te=-.0032075580718124892:Te=-.04442829143298883:Te=-.06597073245775804:Te=.0015594090939337751;let fe;t[223]>1e-35?t[8]>668.5000000000001?fe=-.12803889879260094:fe=.002171373740016862:t[121]>1e-35?t[0]>4720.500000000001?t[217]>1e-35?fe=.08967966612917375:t[1]>39.50000000000001?fe=-.059791671514498074:fe=.05648934961902822:t[2]>59.50000000000001?fe=-.08633234097449628:t[6]>53.50000000000001?fe=.11140345067444689:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?fe=.025606129643140924:fe=.13835395886271978:fe=-.09361630641448024:t[4]>7.500000000000001?t[1]>26.500000000000004?t[1]>49.50000000000001?fe=-.09975506556937946:t[10]>36.50000000000001?fe=-.09427724661655643:t[10]>24.500000000000004?fe=.07329330653410447:fe=-.02271182965807972:fe=-.09767874967639482:t[6]>13.500000000000002?t[10]>23.500000000000004?fe=-.05082091374050816:fe=.1687114435254966:t[0]>2314.5000000000005?fe=-.06422664016383926:fe=.0636688376664789:t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?fe=-.06857762517406195:t[9]>71.50000000000001?t[0]>4188.500000000001?fe=-.1274167728754332:fe=.01308079126447365:t[4]>73.50000000000001?fe=.13854015371106546:t[4]>48.50000000000001?fe=-.03684255740123261:t[6]>45.50000000000001?fe=.10329912215813097:t[10]>77.50000000000001?fe=-.08630788656925215:fe=.031022006843800853:t[1]>25.500000000000004?fe=-.08278381528048026:fe=.06664374548141594:t[84]>1e-35?fe=-.05624227409079396:fe=.00012184182357340415;let De;t[179]>1e-35?De=-.07443348719246982:t[40]>1e-35?t[0]>1937.5000000000002?De=-.07595415373151816:De=.054065040429292326:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[0]>1187.5000000000002?De=.022822510448266862:De=.17491569312933697:De=-.058362287133533565:t[2]>2.5000000000000004?De=-.03633895806364428:De=.06397808186120692:t[8]>4968.500000000001?t[1]>31.500000000000004?De=-.07294848747514579:De=.025053613105805606:t[230]>1e-35?t[4]>6.500000000000001?t[107]>1e-35?De=-.07009535282685533:t[8]>2640.0000000000005?De=-.051761240111316276:t[131]>1e-35?De=-.06245774419231631:De=.03495606662854905:De=-.013863522184803188:t[131]>1e-35?t[1]>93.50000000000001?t[1]>105.50000000000001?De=.0015036626973581122:De=-.12505706794835883:t[1]>48.50000000000001?t[276]>1e-35?De=.10435171369790015:t[0]>5026.500000000001?t[0]>5308.500000000001?De=.022343994371919224:De=-.14087991797693533:t[8]>1323.5000000000002?t[10]>49.50000000000001?De=.07724450228328664:t[0]>3853.5000000000005?De=-.15671707454435677:t[10]>28.500000000000004?De=-.10179090671841723:De=.014878216919760927:De=.03967665658164865:t[8]>2696.5000000000005?t[15]>1e-35?De=.14054154485273487:De=.01821247272493051:t[2]>5.500000000000001?t[2]>100.50000000000001?De=-.08632985141410315:De=.005524157938954954:De=-.08802502622523681:De=-.0004649168897260341;let Ve;t[86]>1e-35?t[8]>65.50000000000001?t[1]>32.50000000000001?t[4]>16.500000000000004?Ve=-.007458687464321174:Ve=-.09444966249102484:t[1]>23.500000000000004?Ve=.08564129697360716:Ve=-.07105002902845851:Ve=.05688756955238231:t[294]>1e-35?t[10]>50.50000000000001?Ve=-.10326216566705966:t[1]>26.500000000000004?Ve=.0050539832484585365:Ve=-.07080395606126953:t[306]>1e-35?t[149]>1e-35?Ve=-.10399433201474328:t[2]>14.500000000000002?t[9]>6.500000000000001?Ve=.05783632021087773:t[10]>17.500000000000004?Ve=-.06720598671764105:t[1]>47.50000000000001?Ve=.097495825172558:Ve=-.013372242800584872:Ve=-.06463226787713715:t[42]>1e-35?Ve=-.0885725817597767:t[204]>1e-35?t[1]>62.50000000000001?Ve=-.07496598696848249:t[1]>29.500000000000004?t[8]>446.50000000000006?Ve=.11051270080118503:Ve=.027719462817590454:t[8]>597.5000000000001?Ve=-.08441503592016869:Ve=.05534229430302502:t[223]>1e-35?t[8]>668.5000000000001?Ve=-.12190088985091102:Ve=-.0067442838156576345:t[148]>1e-35?t[9]>79.50000000000001?Ve=.09225972475904022:t[2]>10.500000000000002?t[1]>102.50000000000001?Ve=.11805676536334647:t[8]>1726.5000000000002?t[9]>10.500000000000002?Ve=.016585157185448045:Ve=-.11032043771149425:Ve=.01586986028570486:t[8]>388.50000000000006?Ve=-.10592413013261853:Ve=.04930703248769364:t[13]>1e-35?Ve=.003621937787920821:Ve=-.0013786331198611841;let Ue;t[145]>1e-35?t[1]>32.50000000000001?t[1]>38.50000000000001?t[10]>55.50000000000001?t[1]>54.50000000000001?Ue=.009769895322846493:Ue=-.10620052926943656:t[9]>19.500000000000004?Ue=.03781202525403449:t[9]>14.500000000000002?Ue=-.11485785321365344:t[9]>6.500000000000001?Ue=.07677177833073881:t[0]>4342.500000000001?Ue=-.07079285609687631:t[49]>1e-35?Ue=.06156814809246001:Ue=-.014788509042554625:Ue=-.032659201618470655:t[5]>5207.500000000001?Ue=-.09013500825185713:t[3]>10.500000000000002?t[8]>1787.5000000000002?Ue=-.03094160322187924:t[1]>29.500000000000004?Ue=.09474646043921069:Ue=.023445783928231618:Ue=.09342846694174194:t[0]>533.5000000000001?t[204]>1e-35?t[1]>62.50000000000001?Ue=-.07164443768784848:t[1]>29.500000000000004?Ue=.089473622509272:t[8]>597.5000000000001?Ue=-.08155349903101317:Ue=.07098423265024251:t[8]>691.5000000000001?t[5]>2252.5000000000005?Ue=-.004003900679358653:t[190]>1e-35?Ue=-.09236113461485262:t[8]>3198.5000000000005?Ue=-.0124130160451179:Ue=.018453070064009328:t[15]>1e-35?Ue=.012013209112857824:t[7]>4.500000000000001?t[7]>5.500000000000001?Ue=-.0009580759587680961:Ue=-.03227283036698222:Ue=.01369287669536875:t[1]>50.50000000000001?Ue=-.04213060332500437:t[35]>1e-35?Ue=-.11508095777767471:t[190]>1e-35?Ue=-.08611884672400155:t[297]>1e-35?Ue=.05723551879433584:Ue=-.004829340082311461;let Ke;t[183]>1e-35?Ke=-.037994150023203555:t[227]>1e-35?t[17]>1e-35?t[3]>20.500000000000004?t[10]>36.50000000000001?Ke=-.11753465135886734:Ke=-.007515490299047085:Ke=-.08576941990777916:t[8]>1641.5000000000002?t[10]>37.50000000000001?Ke=-.12371142493530439:t[1]>36.50000000000001?Ke=.032189417575190435:Ke=-.10339125953022954:t[3]>32.50000000000001?t[4]>27.500000000000004?t[1]>59.50000000000001?Ke=-.0784518658439288:t[2]>54.50000000000001?Ke=.12477882322370665:Ke=.000313468482399738:Ke=.12261955132611434:t[8]>81.50000000000001?t[23]>1e-35?Ke=.04969252946760318:t[8]>511.50000000000006?t[8]>1146.5000000000002?Ke=.0353146070135579:Ke=-.06327619611098285:Ke=.02813577701641991:Ke=-.12354390728506215:t[34]>1e-35?Ke=-.07664408516055397:t[3]>99.50000000000001?t[1]>16.500000000000004?t[1]>26.500000000000004?Ke=-.01245803535276381:Ke=-.07169472553475001:t[1]>11.500000000000002?Ke=.12989984824561698:Ke=-.01201544398886606:t[6]>91.50000000000001?t[1]>22.500000000000004?Ke=.010390226893521422:t[10]>14.500000000000002?Ke=.16790888126487719:Ke=.010614982228955577:t[4]>79.50000000000001?t[9]>44.50000000000001?t[0]>3853.5000000000005?Ke=-.043398307129729134:Ke=.09963544907820426:t[9]>30.500000000000004?Ke=-.13540713124984502:t[9]>17.500000000000004?Ke=.0509435850590757:Ke=-.04761897852404613:t[4]>78.50000000000001?Ke=.09197086656470652:Ke=.0006771050176682337;let X;t[122]>1e-35?t[6]>36.50000000000001?X=.05686884451670743:X=-.05334759543084309:t[266]>1e-35?X=-.08603579519816038:t[157]>1e-35?X=-.06736746113382097:t[302]>1e-35?t[0]>2579.5000000000005?X=-.0499592651503952:t[0]>725.5000000000001?X=.11780353905132664:X=-.05232097173108943:t[147]>1e-35?t[1]>53.50000000000001?X=-.11398297342629615:t[0]>2604.5000000000005?t[0]>3629.5000000000005?X=-.03190157229022304:X=.07985197845805492:X=-.0763078988943886:t[4]>41.50000000000001?t[280]>1e-35?X=.05162933940904835:t[11]>1e-35?t[0]>460.50000000000006?X=-.027174047777029083:X=.057117284879796476:t[3]>43.50000000000001?X=-.0016147040913107311:X=-.05856597304613519:t[2]>45.50000000000001?t[0]>4663.500000000001?t[18]>1e-35?X=-.04779247091640426:t[10]>25.500000000000004?t[9]>22.500000000000004?t[22]>1e-35?X=-.01466076988151239:X=.13375695925484857:X=-.04885873081899647:t[0]>5566.500000000001?X=.11086813028591343:t[8]>992.5000000000001?X=-.07622304217072383:X=.04316019272026325:t[10]>12.500000000000002?t[9]>36.50000000000001?t[9]>45.50000000000001?X=.03285858361708423:X=-.12354858211764992:X=.0672788301823281:t[15]>1e-35?X=.08658836986585006:X=-.02741484278509758:t[290]>1e-35?X=-.08161310335133287:t[135]>1e-35?X=-.04824156054814152:X=.0009156904299554183;let le;t[3]>7.500000000000001?le=.0006791852818377787:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?le=.03642374718166293:le=.16379973756366603:le=-.03946685266127979:t[186]>1e-35?le=.07618896623420895:t[96]>1e-35?le=.0680272261319657:t[107]>1e-35?t[1]>48.50000000000001?le=-.022822371600847505:le=.0501405836324949:t[203]>1e-35?t[1]>77.50000000000001?le=.044416424920571296:le=-.0648450593196238:t[5]>3921.5000000000005?t[1]>110.50000000000001?le=-.11110466767595227:t[9]>5.500000000000001?t[9]>52.50000000000001?t[1]>50.50000000000001?le=.1061937286809567:t[7]>54.50000000000001?le=.11487507743121311:t[8]>819.5000000000001?le=-.07181278009001418:t[10]>25.500000000000004?le=.13499019430369633:t[1]>31.500000000000004?le=.09032979489780704:le=-.12754166393372374:t[9]>37.50000000000001?le=-.05093963635361407:le=-.005026651151683848:t[9]>2.5000000000000004?le=.07619735785573735:le=.012363301341532136:t[26]>1e-35?le=-.10685800454968203:t[8]>125.50000000000001?t[8]>446.50000000000006?t[0]>3842.5000000000005?le=-.08783796894105043:t[282]>1e-35?t[1]>47.50000000000001?t[9]>40.50000000000001?le=-.10764172927882483:le=.01890760098464703:le=.06573095405846417:t[8]>634.5000000000001?le=-.00783575973273707:le=-.050612689680229306:t[1]>22.500000000000004?le=-.0016842490401359626:le=.0738227088444087:le=-.02663970950432175;let te;t[31]>1e-35?t[8]>17.500000000000004?te=.013678038624884814:t[1]>35.50000000000001?t[1]>51.50000000000001?te=.007191286124908192:te=-.09347881647636902:t[10]>1.5000000000000002?te=.07938758708008091:te=-.008702935600305113:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?te=.12321804057595996:te=-.018281109320672437:t[23]>1e-35?t[4]>62.50000000000001?te=-.04644244754790671:te=.024546310702263208:t[8]>862.5000000000001?t[0]>3429.5000000000005?t[4]>9.500000000000002?t[52]>1e-35?te=.0706108609273337:t[2]>40.50000000000001?te=-.028046629962303716:te=-.06497613993109329:te=.01076489668586676:t[1]>33.50000000000001?t[0]>966.5000000000001?t[2]>14.500000000000002?t[1]>38.50000000000001?te=-.03056331974267756:te=-.11886389712497057:te=.053364962175658184:t[8]>2233.5000000000005?te=-.0448152521157682:te=.1508651602190868:t[2]>33.50000000000001?t[0]>2882.5000000000005?t[0]>3183.5000000000005?te=.03818796510453344:te=.23673992112982362:te=.02858814226507374:t[10]>44.50000000000001?te=-.1125863771551199:te=.009129996952394916:t[1]>7.500000000000001?te=-.004374525302461639:te=-.07858519434925451:t[149]>1e-35?t[6]>23.500000000000004?te=.0005231594491642136:t[0]>4053.5000000000005?t[8]>660.5000000000001?te=-.13677189943034931:t[10]>2.5000000000000004?te=.039591891437078086:te=-.09312596849507347:te=-.02423172142089822:te=.0009836986075266283;let xe;t[189]>1e-35?t[0]>5269.500000000001?xe=-.103183298350443:t[2]>51.50000000000001?xe=.09784373530929913:t[10]>26.500000000000004?t[8]>764.5000000000001?xe=-.05186168947388339:xe=.0496996365539082:t[10]>23.500000000000004?xe=.1404445738719:t[93]>1e-35?xe=.0027146310074558505:t[5]>3821.5000000000005?xe=.002153033152069652:t[4]>2.5000000000000004?xe=.007663539551317215:xe=.13902616832015402:t[298]>1e-35?t[8]>81.50000000000001?t[4]>64.50000000000001?xe=.11498405722487515:t[2]>23.500000000000004?t[0]>2815.5000000000005?t[2]>44.50000000000001?t[4]>42.50000000000001?xe=-.021479467709980358:xe=.09336868994327292:t[1]>22.500000000000004?t[15]>1e-35?xe=.021660293256233334:xe=-.0927396152303864:xe=.0665074081601698:t[0]>1550.5000000000002?xe=.08972407105958534:xe=-.0380796411182682:t[6]>13.500000000000002?t[10]>2.5000000000000004?xe=.06761927942466854:xe=-.015762168112653286:t[17]>1e-35?xe=.10311304131145381:xe=-.017672785252336027:xe=-.08629805732772755:t[1]>24.500000000000004?t[138]>1e-35?xe=-.10638321435298535:xe=.0007073011744385905:t[18]>1e-35?xe=-.027056185501334325:t[145]>1e-35?xe=.023191199677450886:t[9]>33.50000000000001?t[201]>1e-35?xe=.09762140519655171:t[9]>110.50000000000001?xe=-.06581942957595835:t[6]>54.50000000000001?xe=.04959634035251596:xe=.0022616298654554207:xe=-.007437620924990854;let Z;t[179]>1e-35?Z=-.06961998209988884:t[167]>1e-35?t[0]>3928.5000000000005?Z=.1470294450403005:Z=-.01671476793947083:t[187]>1e-35?t[6]>13.500000000000002?t[4]>30.500000000000004?t[13]>1e-35?Z=.07448480853603114:t[0]>1012.5000000000001?t[5]>2883.5000000000005?t[0]>3682.5000000000005?t[5]>4031.5000000000005?t[23]>1e-35?Z=.07965955447707423:t[10]>10.500000000000002?Z=-.09236156404262426:Z=.03396273196231458:Z=-.13246465021467432:Z=.07092822261735353:Z=-.08753829085942:Z=.09409024840640956:t[1]>40.50000000000001?t[8]>984.5000000000001?t[8]>1514.5000000000002?t[8]>2134.5000000000005?Z=.004705878789890202:Z=.13775378964952867:Z=-.04770928980587811:t[10]>29.500000000000004?Z=.011221519891071544:t[0]>3853.5000000000005?Z=.06365381191628273:Z=.15506252245336827:t[1]>37.50000000000001?Z=-.07254777021042061:Z=.026514587757252385:t[308]>1e-35?Z=.04115804816617256:t[10]>26.500000000000004?Z=.02077721353011946:t[5]>3548.5000000000005?Z=-.1280907116663952:Z=-.021974774274438:t[306]>1e-35?Z=-.02700446558079895:t[297]>1e-35?t[212]>1e-35?Z=.07794139136748461:t[7]>5.500000000000001?t[19]>1e-35?Z=-.005710865560475598:t[94]>1e-35?Z=-.06751507982853555:Z=.027250040757588703:t[9]>52.50000000000001?Z=.07060357924595577:Z=-.030297760713011795:Z=-.0006005400085266517;let ae;t[113]>1e-35?ae=-.07311041707507712:t[40]>1e-35?t[0]>1937.5000000000002?ae=-.06996356565314456:ae=.04780211300352931:t[10]>52.50000000000001?t[49]>1e-35?ae=-.08317707559926495:t[21]>1e-35?ae=-.0817284654645976:t[15]>1e-35?t[2]>3.5000000000000004?ae=-.010538203005984922:ae=.08454819465349446:t[9]>124.50000000000001?ae=.09015659250299132:t[7]>15.500000000000002?t[5]>5732.500000000001?ae=-.08542251249346582:t[9]>50.50000000000001?ae=-.023428882537657472:ae=.010042500833979073:ae=.020697210754240154:t[10]>28.500000000000004?t[5]>423.00000000000006?t[148]>1e-35?ae=.03006025206979096:t[9]>108.50000000000001?ae=-.09153851322499747:t[145]>1e-35?t[5]>4814.500000000001?t[2]>38.50000000000001?ae=.04222035773042132:ae=-.09078149053947535:t[8]>568.5000000000001?t[1]>64.50000000000001?ae=-.07209095448054853:ae=.028065954981903313:ae=.08714651929917122:ae=-.006678820669279169:t[10]>40.50000000000001?ae=.006982396294941626:ae=-.07889649792011418:t[94]>1e-35?t[4]>30.500000000000004?ae=-.09351114982645548:t[4]>3.5000000000000004?ae=-.004837550129223451:ae=-.08324141237464677:t[303]>1e-35?ae=.10703037493990825:t[9]>156.50000000000003?ae=-.10803018621648303:t[116]>1e-35?ae=-.03208302566598311:t[212]>1e-35?t[243]>1e-35?ae=.10261721665006701:ae=.018994509090668264:ae=.0011244262442038839;let Ne;t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?Ne=-.08404263465005328:t[0]>3682.5000000000005?Ne=.041259223920298876:t[1]>29.500000000000004?Ne=-.09541257493441671:Ne=.001482192721625409:Ne=.051541427372951004:t[3]>7.500000000000001?t[157]>1e-35?Ne=-.08268996098437432:t[230]>1e-35?Ne=.015749498159959817:t[4]>7.500000000000001?t[3]>11.500000000000002?Ne=-913218977737457e-19:t[4]>10.500000000000002?Ne=-.056334165674005156:t[127]>1e-35?Ne=-.0784634021824036:t[2]>9.500000000000002?t[1]>62.50000000000001?Ne=-.04231200150318989:t[10]>42.50000000000001?Ne=.10182973257894812:Ne=.015934763950068445:Ne=-.03130938805859397:t[92]>1e-35?t[4]>6.500000000000001?t[1]>51.50000000000001?t[9]>19.500000000000004?Ne=-.041117068322885315:Ne=.1167767830037126:Ne=.13611206992387337:t[10]>41.50000000000001?Ne=-.07120286010564107:Ne=.022032788063345417:t[8]>1.5000000000000002?t[1]>51.50000000000001?t[9]>72.50000000000001?Ne=-.07702290997669524:t[198]>1e-35?Ne=.08776558554437136:Ne=-.008290740324975692:t[2]>32.50000000000001?Ne=.07198457624219955:Ne=.005463113714361629:Ne=.09414099512900526:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?Ne=.03295785445437507:Ne=.15140250150674536:Ne=-.035613213948910254:t[186]>1e-35?Ne=.06849425535860769:t[96]>1e-35?Ne=.06028225812727254:Ne=-.007582543288662308;let Y;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Y=.08396556264106572:Y=-.0562516995099192:Y=-.10593011018789432:t[183]>1e-35?t[15]>1e-35?Y=-.09705176473553752:t[7]>18.500000000000004?t[2]>37.50000000000001?Y=.0052017514017035915:Y=-.11194119432743639:Y=.03724337696163019:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?Y=-.025692451287403446:Y=-.09511862672123193:t[8]>1661.5000000000002?t[10]>37.50000000000001?Y=-.11892250746801664:t[10]>22.500000000000004?Y=.07548493166973796:Y=-.05973048107712209:t[4]>12.500000000000002?t[0]>4319.500000000001?t[10]>4.500000000000001?t[10]>37.50000000000001?Y=.13750699058082427:t[18]>1e-35?Y=.06535408879552801:Y=-.054118179035040674:Y=.1344282838979622:t[0]>3982.5000000000005?Y=-.10409582202467015:t[19]>1e-35?Y=.12672850705810795:t[8]>587.5000000000001?t[1]>35.50000000000001?Y=.012705935670766466:Y=.14149359442527545:Y=-.047977876173706004:t[20]>1e-35?Y=.057945228080337946:t[0]>3642.5000000000005?Y=-.008726535792122467:Y=-.08424769891378858:t[34]>1e-35?Y=-.0699329538228602:t[134]>1e-35?t[11]>1e-35?t[4]>15.500000000000002?t[0]>1187.5000000000002?Y=.01196849566739346:Y=.1614642278429876:Y=-.043022338150701625:t[3]>5.500000000000001?Y=-.03907848255033881:Y=.018280601026175593:Y=.0006654540402589085;let ee;t[31]>1e-35?t[2]>58.50000000000001?t[9]>1.5000000000000002?ee=-.01386103677247845:ee=.11386694333005128:t[4]>27.500000000000004?ee=-.021862617610091336:t[2]>31.500000000000004?ee=.0828858469030438:ee=.006483353475830127:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?ee=.11303635767048735:ee=-.01645525128352694:t[23]>1e-35?t[4]>62.50000000000001?ee=-.04238798044549342:ee=.022091190130494303:t[5]>5082.500000000001?ee=-.04287166152163786:t[8]>862.5000000000001?t[19]>1e-35?ee=.000660344696244351:t[4]>9.500000000000002?t[0]>1277.5000000000002?ee=-.04291104140431434:t[17]>1e-35?ee=.11256797532342613:ee=-.017206916368289193:ee=.026482035265709743:t[1]>8.500000000000002?t[11]>1e-35?ee=.04060606971664621:t[0]>4733.500000000001?t[8]>214.50000000000003?t[5]>4814.500000000001?ee=.03581712466863222:ee=.14770264307668884:t[8]>73.50000000000001?ee=-.13093289429740068:ee=.042461737442702936:t[52]>1e-35?ee=.0501831919044939:ee=-.010450249720465756:ee=-.0753365425372656:t[149]>1e-35?t[6]>23.500000000000004?ee=.0005381332165438493:ee=-.04549431717503909:t[133]>1e-35?t[2]>5.500000000000001?t[8]>698.5000000000001?t[282]>1e-35?ee=.04849637311285226:ee=-.036671377119808564:t[0]>421.50000000000006?ee=.00020968499911058945:ee=.11636422423182405:ee=-.12687837788222575:ee=.0012774367867215346;let Ee;t[120]>1e-35?Ee=.04776057572434719:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?Ee=-.042799574885345304:Ee=.07412430171193245:Ee=-.11248270469336048:t[193]>1e-35?Ee=-.060694220820603384:t[121]>1e-35?t[217]>1e-35?t[0]>4449.500000000001?t[4]>8.500000000000002?Ee=.028911612178122104:Ee=.12326369727728437:t[0]>4091.5000000000005?Ee=-.09370267064141052:t[0]>3519.5000000000005?t[8]>668.5000000000001?Ee=.1159839898100149:Ee=-.01924880886585737:t[8]>501.50000000000006?t[10]>16.500000000000004?Ee=-.0216343737351583:Ee=-.1220272260878369:t[2]>18.500000000000004?Ee=.09152924475072398:t[8]>55.50000000000001?Ee=.039508716651005665:Ee=-.11714436880423203:t[18]>1e-35?t[9]>2.5000000000000004?Ee=.06793009902674053:Ee=-.024060578029812988:t[4]>2.5000000000000004?t[2]>16.500000000000004?t[4]>11.500000000000002?Ee=-.04391068849624096:Ee=.04009967593394672:t[8]>1085.5000000000002?Ee=-.024773826356034825:Ee=-.13919707884246582:Ee=.06659278075192335:t[223]>1e-35?t[8]>668.5000000000001?Ee=-.11567917501901476:Ee=-.006813640337684114:t[3]>7.500000000000001?Ee=.0010671269682548076:t[7]>3.5000000000000004?t[1]>33.50000000000001?t[0]>1597.5000000000002?t[10]>1.5000000000000002?Ee=-.001754586408351048:Ee=-.055422422450722056:Ee=-.06090032532532226:t[0]>5269.500000000001?Ee=.11787981735983527:Ee=-.00198119768540783:Ee=.00210412924303036;let Ae;t[294]>1e-35?t[10]>50.50000000000001?Ae=-.09738558653332406:t[0]>2432.5000000000005?t[0]>4533.500000000001?Ae=-.06063239096209816:Ae=.03317022411417386:Ae=-.08607562321324262:t[120]>1e-35?t[4]>18.500000000000004?Ae=-.013608609329298802:Ae=.09078000157330264:t[99]>1e-35?Ae=.014828708581964632:t[10]>52.50000000000001?t[49]>1e-35?Ae=-.07536137260189814:Ae=.006253266595455118:t[10]>28.500000000000004?Ae=-.006106041147592768:t[9]>156.50000000000003?Ae=-.11828932797811101:t[94]>1e-35?Ae=-.02566078479505714:t[303]>1e-35?Ae=.09544850289775349:t[15]>1e-35?t[224]>1e-35?t[4]>56.50000000000001?Ae=-.08401252789168523:t[5]>4244.500000000001?Ae=.026372887658499107:t[1]>16.500000000000004?Ae=-.027836756345634026:Ae=.09205362097909099:Ae=.00934612788718244:t[203]>1e-35?Ae=-.016371658366767253:t[7]>26.500000000000004?t[0]>966.5000000000001?t[1]>38.50000000000001?t[146]>1e-35?t[9]>21.500000000000004?Ae=-.09580979052540028:t[1]>50.50000000000001?Ae=-.06402211827281554:Ae=.08342858760095972:t[2]>36.50000000000001?Ae=.008114897658204584:t[92]>1e-35?Ae=.09541587072672864:Ae=-.022342147210555434:Ae=-.01660492519175128:Ae=.014721622240945446:t[4]>25.500000000000004?t[11]>1e-35?Ae=.15846731118501817:Ae=.039498507912023195:t[245]>1e-35?Ae=.07008718676813333:Ae=.0019806389728814727;let ve;t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[0]>4188.500000000001?ve=-.01192072916082109:ve=.13888590840802637:t[1]>16.500000000000004?t[8]>2302.5000000000005?ve=.06874032717466054:t[4]>40.50000000000001?ve=-.07752510020707537:t[1]>76.50000000000001?ve=-.09944032260703917:t[8]>1381.5000000000002?ve=-.054466635810800745:t[1]>32.50000000000001?ve=.05974084520839573:ve=-.0384718740755954:ve=-.11374190719134032:t[0]>2151.5000000000005?ve=-.13703645155803298:ve=.004833344758654556:t[297]>1e-35?t[212]>1e-35?ve=.06954747264544993:t[7]>9.500000000000002?t[19]>1e-35?t[1]>30.500000000000004?t[0]>4242.500000000001?ve=.013539805885738608:ve=-.0692740641801559:t[0]>2653.5000000000005?t[10]>57.50000000000001?ve=.09941880179344399:ve=-.01608127391210995:ve=.08025226531247417:t[9]>67.50000000000001?ve=.13525448212444113:t[6]>61.50000000000001?ve=-.05511099182158894:t[94]>1e-35?ve=-.06821509831783572:t[128]>1e-35?ve=.11361314817714643:ve=.030160785008575566:t[1]>13.500000000000002?t[8]>17.500000000000004?t[16]>1e-35?ve=-.09954181329804547:t[197]>1e-35?ve=.10102833149755386:t[188]>1e-35?ve=.05584490988313965:t[9]>49.50000000000001?t[4]>5.500000000000001?ve=-.03781554214742005:ve=.09927933385592314:ve=-.020006000056720083:ve=-.10520473615957895:ve=-.12006990846253787:ve=-.00026111570975317574;let We;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[0]>1725.5000000000002?t[7]>14.500000000000002?t[2]>38.50000000000001?We=-.019188245509744628:We=-.13354864350075848:t[0]>2461.5000000000005?We=.051885477468354396:We=-.0833581968852119:We=.08233441701532287:We=-.10865584951212362:t[8]>2992.5000000000005?t[10]>49.50000000000001?t[10]>56.50000000000001?t[1]>45.50000000000001?t[0]>2041.5000000000002?We=.09926337893072812:We=-.027753610497327715:t[0]>1972.5000000000002?We=-.09780045823152517:We=.032380915168504935:We=.11502632261226381:t[17]>1e-35?We=-.06094965899579662:t[10]>40.50000000000001?We=-.07500475582440802:We=.006499832113084677:t[10]>4.500000000000001?t[4]>10.500000000000002?We=-.09584538995220808:We=-.00908705814304442:We=.03203281520813893:t[10]>49.50000000000001?We=-.03146271513986384:t[2]>63.50000000000001?We=.13172001315536286:t[224]>1e-35?We=.08945777550527927:t[0]>2282.5000000000005?t[4]>4.500000000000001?We=.09521549382082259:We=-.04414925613522197:t[0]>1847.5000000000002?We=-.09118580379557353:We=.009206744918282364:t[178]>1e-35?t[2]>25.500000000000004?t[1]>31.500000000000004?We=.03525144509943896:We=-.053340750721609057:t[0]>1057.5000000000002?t[10]>2.5000000000000004?We=-.04766112322938157:t[2]>10.500000000000002?We=.0728516504357201:We=-.05049625965272536:We=-.10868663055825774:We=.0005382613419948969;let Ze;t[147]>1e-35?t[1]>53.50000000000001?Ze=-.10615739288764095:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ze=-.030504020655417463:Ze=.07102458639110094:Ze=-.07058131985243714:t[302]>1e-35?t[10]>47.50000000000001?Ze=.055304563442710876:t[1]>53.50000000000001?Ze=.033723409577443623:t[8]>175.50000000000003?t[0]>2628.5000000000005?t[9]>40.50000000000001?Ze=-.1568835288372895:Ze=-.0279829124400056:Ze=.04493843959601833:Ze=-.11637042729644327:t[191]>1e-35?t[282]>1e-35?Ze=-.054133834303687026:t[9]>48.50000000000001?Ze=.11263810289007213:t[9]>9.500000000000002?Ze=-.02202034562838259:t[4]>45.50000000000001?Ze=-.03410927569045158:Ze=.04381615166534081:t[242]>1e-35?t[0]>3615.5000000000005?t[3]>19.500000000000004?t[1]>56.50000000000001?t[4]>28.500000000000004?Ze=-.029687297407295893:Ze=.10673602850001934:t[4]>42.50000000000001?Ze=.0036275562945108117:Ze=-.0760789221330622:Ze=-.10385623431741903:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Ze=.08274426793676076:Ze=-.07076234425516396:Ze=.13890177606150175:Ze=-.019863286503635686:t[53]>1e-35?t[18]>1e-35?Ze=-.09250637750836187:Ze=-.0031531727902009026:t[2]>107.50000000000001?t[4]>91.50000000000001?t[1]>16.500000000000004?Ze=-.01897867921812603:Ze=.04890781705365262:Ze=-.11569892307597907:t[2]>106.50000000000001?Ze=.09032697440623969:Ze=.00047935919155035045;let vt;t[115]>1e-35?vt=.05338335681275557:t[242]>1e-35?t[0]>3615.5000000000005?t[4]>42.50000000000001?t[4]>75.50000000000001?vt=-.10131179514695865:t[8]>938.5000000000001?vt=.10203729808015481:vt=-.015357944186835289:t[1]>56.50000000000001?t[2]>22.500000000000004?vt=.03574015165562999:vt=-.07763042506449493:vt=-.0813323116215548:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?vt=.0665706259130275:vt=-.06586817559309924:vt=.11925564412287476:vt=-.014170019267143326:t[1]>124.50000000000001?t[2]>30.500000000000004?t[8]>533.5000000000001?t[4]>41.50000000000001?t[8]>977.5000000000001?vt=.046017146627455346:vt=-.08623321630086885:t[8]>1765.5000000000002?vt=-.017990564319859934:t[10]>25.500000000000004?t[10]>48.50000000000001?vt=.11143827902215087:vt=-.01817808730473413:vt=.16980985030210127:vt=-.09357806298740017:t[10]>7.500000000000001?t[10]>54.50000000000001?vt=.010168994879727824:vt=-.09099594488792513:t[9]>1.5000000000000002?vt=.0533459678147928:vt=-.06886854808370108:t[99]>1e-35?t[17]>1e-35?t[9]>22.500000000000004?vt=-.062346959148773695:t[1]>47.50000000000001?vt=-.0021578343835599316:t[2]>27.500000000000004?vt=.19567373210166172:vt=.07851555379116423:t[18]>1e-35?vt=.03711549097804649:t[8]>359.50000000000006?vt=.012492346746905587:t[4]>20.500000000000004?vt=.047511695735697544:vt=-.07999269063948773:vt=6802045404471004e-20;let Nt;t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>2167.5000000000005?t[4]>25.500000000000004?Nt=.0011484728213539738:Nt=-.0936582904650763:t[2]>25.500000000000004?t[8]>182.50000000000003?t[10]>22.500000000000004?t[0]>5026.500000000001?Nt=-.09828874964938798:t[8]>1586.5000000000002?Nt=.13726397438080162:t[4]>48.50000000000001?t[2]>63.50000000000001?Nt=.011938269926919522:Nt=.17541983715953954:t[19]>1e-35?Nt=.023002786011088672:Nt=-.06221461272461431:t[9]>2.5000000000000004?t[0]>3818.5000000000005?Nt=.06508934844183291:Nt=-.10168553534835639:Nt=-.07755626499024171:t[2]>51.50000000000001?t[4]>65.50000000000001?Nt=.021140806225203937:Nt=-.1167833342453639:t[2]>33.50000000000001?Nt=.13163585734056618:Nt=-.00203273890889717:t[10]>36.50000000000001?t[8]>1067.5000000000002?Nt=.06314479201263888:Nt=-.09639088327091713:t[10]>29.500000000000004?Nt=.09225469303582386:t[0]>3129.5000000000005?t[0]>4091.5000000000005?t[0]>4354.500000000001?Nt=40577156464836036e-21:Nt=.12322387121810757:Nt=-.03697224045046014:t[1]>22.500000000000004?Nt=.016474835887320276:Nt=.16919298733903063:Nt=.07633203630214054:Nt=-.047438037934250644:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?Nt=.14150493354700563:Nt=-.01831155354975749:t[1]>28.500000000000004?Nt=-.07952557178685365:t[10]>28.500000000000004?Nt=.0665695554984927:Nt=-.053640139319277094:Nt=.0004754840665898665;let Gt;t[76]>1e-35?Gt=-.06814884255939921:t[179]>1e-35?Gt=-.06325743795510681:t[122]>1e-35?t[6]>36.50000000000001?Gt=.05052338063261613:t[8]>626.5000000000001?t[1]>38.50000000000001?Gt=.004193658608848433:Gt=-.1066968975983452:t[8]>302.50000000000006?Gt=.05476730110440451:Gt=-.06382970920394895:t[218]>1e-35?t[2]>3.5000000000000004?t[6]>13.500000000000002?t[2]>19.500000000000004?t[0]>3200.5000000000005?t[4]>91.50000000000001?Gt=-.12156071809840739:t[9]>21.500000000000004?t[5]>3883.5000000000005?t[8]>919.5000000000001?t[8]>1085.5000000000002?Gt=.013555772109446666:Gt=-.09856116699770784:Gt=.0284329611813383:t[2]>52.50000000000001?Gt=.04008708444763762:t[9]>29.500000000000004?Gt=-.1289599546008197:Gt=-.018566534248335896:t[8]>747.5000000000001?Gt=.02236484980076122:Gt=.1148871655157582:t[8]>3084.0000000000005?Gt=-.05573875952902531:t[10]>17.500000000000004?t[2]>51.50000000000001?Gt=.03164751204281298:Gt=.11752140436184891:t[9]>42.50000000000001?Gt=-.07180559595410106:t[22]>1e-35?Gt=.09325040416256854:Gt=-.016041122807939914:Gt=-.02765708954618808:t[1]>30.500000000000004?t[1]>66.50000000000001?Gt=-.010718250133458515:Gt=.09818827994853763:Gt=.010180038981174032:Gt=-.039472162599295535:t[9]>170.50000000000003?Gt=-.08536729235976731:t[189]>1e-35?t[0]>5269.500000000001?Gt=-.08674788057474031:Gt=.02077653508548371:Gt=-.0003536561382007414;let Qt;t[86]>1e-35?t[10]>6.500000000000001?t[0]>4376.500000000001?Qt=.018337297491457794:Qt=-.05926206443180149:Qt=.024026520855881126:t[288]>1e-35?t[184]>1e-35?Qt=.10747078482128616:t[126]>1e-35?Qt=-.10550625192391357:t[7]>71.50000000000001?Qt=-.07698346027863572:t[8]>302.50000000000006?t[6]>49.50000000000001?t[4]>47.50000000000001?t[1]>38.50000000000001?t[15]>1e-35?Qt=.1317396472229434:Qt=-.025035791351328947:Qt=-.0728334305864372:t[8]>963.5000000000001?Qt=.023642201723096064:Qt=.183010326734258:t[128]>1e-35?Qt=.04228920135648387:t[2]>34.50000000000001?t[15]>1e-35?Qt=.002801782941492993:t[3]>40.50000000000001?t[4]>39.50000000000001?Qt=-.1088876900335281:Qt=.02758317023002635:Qt=-.11886771300807207:t[9]>59.50000000000001?t[1]>33.50000000000001?Qt=-.01928020117446408:Qt=.10193718474139135:t[1]>48.50000000000001?t[4]>9.500000000000002?t[8]>932.5000000000001?Qt=.07893723375925096:Qt=-.009878929627026153:t[10]>2.5000000000000004?t[9]>20.500000000000004?Qt=-.10301657587280551:Qt=.005787463140224318:Qt=.07421364314695046:t[0]>2840.5000000000005?t[10]>29.500000000000004?Qt=-.019296977889522397:Qt=-.07274529751752634:t[1]>30.500000000000004?Qt=-.050368901143148286:Qt=.029630869489466655:t[2]>6.500000000000001?t[4]>9.500000000000002?Qt=.0015332402792773946:Qt=.09930153676749967:Qt=-.06370844564357069:Qt=.00042272155209927616;let ue;t[71]>1e-35?t[4]>17.500000000000004?ue=.12586844370423247:ue=-.006791999603126354:t[222]>1e-35?t[1]>10.500000000000002?t[30]>1e-35?t[1]>36.50000000000001?t[9]>1.5000000000000002?t[10]>25.500000000000004?ue=-.08474891624263797:t[8]>125.50000000000001?ue=.08125086980439704:ue=-.04082085238068532:t[0]>3863.5000000000005?ue=.020481535807469208:ue=.14810819386202126:t[0]>1937.5000000000002?t[2]>16.500000000000004?ue=-.019110200161573936:ue=-.12387719685855114:t[0]>1102.5000000000002?ue=.08376595701957407:ue=-.031821919580524834:t[9]>4.500000000000001?ue=-.08116383486497568:t[7]>8.500000000000002?t[2]>24.500000000000004?ue=-.02154820850475448:t[0]>3863.5000000000005?t[8]>902.5000000000001?ue=.1349841206807871:ue=.011864053595560297:t[1]>41.50000000000001?ue=-.08203662486612544:t[2]>18.500000000000004?ue=-.009541865642346947:ue=.08345043168501759:t[2]>10.500000000000002?ue=-.09585031818030947:ue=.019432330487099865:ue=.08399259524715129:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ue=.11951517733981365:ue=-.016651014735738538:t[1]>28.500000000000004?ue=-.07410922545030711:t[10]>28.500000000000004?ue=.05886430683844788:ue=-.04929626605117184:t[191]>1e-35?t[9]>9.500000000000002?t[9]>48.50000000000001?ue=.04802269879144705:ue=-.026208212831796737:t[4]>45.50000000000001?ue=-.03227476944664786:ue=.05124575625622705:ue=.00020506696916003137;let Be;t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?Be=-.03042091758483443:t[10]>14.500000000000002?Be=.09816619204768777:Be=.01332124067720947:t[8]>8.500000000000002?t[4]>15.500000000000002?Be=-.02381165060401718:Be=-.10950361804974783:Be=.03538211665111128:t[212]>1e-35?t[19]>1e-35?Be=-.09940014650006174:t[0]>2215.5000000000005?t[5]>5056.500000000001?t[3]>5.500000000000001?t[10]>25.500000000000004?Be=-.06371052144380579:Be=.0835500621252692:Be=-.10408255929333915:t[1]>74.50000000000001?Be=.13208968122712403:t[1]>64.50000000000001?Be=-.04778844603644965:t[8]>51.50000000000001?t[8]>201.50000000000003?t[8]>660.5000000000001?t[6]>4.500000000000001?t[9]>5.500000000000001?t[1]>29.500000000000004?t[0]>3830.5000000000005?Be=.09922816902423433:Be=.016366955328796718:Be=.1592412560903584:t[1]>39.50000000000001?Be=.05409467990258923:Be=-.08260633210459611:Be=-.06307205775247567:t[9]>36.50000000000001?Be=.040253940015648144:Be=.14202568969471283:Be=-.028761848341594044:Be=.08994073058773508:t[0]>807.5000000000001?Be=-.043427848826323195:Be=.04573516446846493:t[20]>1e-35?t[188]>1e-35?Be=-.0758877731600639:t[23]>1e-35?Be=.05913923322043199:t[8]>155.50000000000003?t[128]>1e-35?Be=.08124700978741987:Be=.013296063087086852:t[7]>5.500000000000001?Be=-.01640196088612987:Be=-.12685498840146067:Be=-.0004940792382459551;let et;t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?et=-.05584993681929434:t[9]>27.500000000000004?t[0]>3916.5000000000005?et=.08513773825688947:et=-.1184664832315282:et=.05676963535893477:et=.14263843210340613:et=.0005795003292924202:t[18]>1e-35?t[0]>5453.500000000001?t[1]>11.500000000000002?et=-.10669720555606924:et=.029016613003137307:t[2]>46.50000000000001?t[10]>9.500000000000002?et=.0664744575868955:et=-.08469256188890871:et=-.026746678040592144:t[281]>1e-35?et=-.07408427239006925:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?et=.012131807587207655:et=-.12776015795398743:et=.04320472481083551:et=.08390980661550446:t[10]>227.50000000000003?et=-.09771783809101153:t[10]>130.50000000000003?et=.11175201938704937:t[8]>779.5000000000001?t[5]>3325.5000000000005?t[128]>1e-35?et=-.07610698254064358:t[8]>902.5000000000001?et=-.03136381213599649:t[131]>1e-35?et=.0704821739127936:t[224]>1e-35?et=-.056961477774953785:t[10]>30.500000000000004?t[9]>43.50000000000001?et=.10431473040024908:t[8]>841.5000000000001?et=.07304745320500514:et=-.038011541882439825:et=-.01679746695007364:t[0]>3129.5000000000005?et=.05589952587431965:t[210]>1e-35?et=.06227198085800842:et=-.0011341890997947812:t[8]>740.5000000000001?et=.04817300084412584:et=-.000577001010789238;let ut;t[187]>1e-35?t[6]>12.500000000000002?t[10]>8.500000000000002?t[10]>16.500000000000004?t[8]>234.50000000000003?t[4]>43.50000000000001?t[0]>4476.500000000001?ut=-.10504730480402079:t[5]>3341.5000000000005?ut=.11087894671081754:ut=-.0406668834674614:ut=.03308382165616109:t[8]>104.50000000000001?ut=-.10431436764549162:ut=.0073928337244891455:t[4]>34.50000000000001?ut=-.10571751512748416:ut=-.006081128814142983:t[13]>1e-35?ut=.1299673566095023:t[4]>60.50000000000001?ut=-.06587492443829139:t[0]>2604.5000000000005?t[3]>19.500000000000004?ut=.04857126072645073:ut=-.03431365358104773:t[4]>16.500000000000004?ut=.04101865986596709:ut=.16480274980378218:t[10]>26.500000000000004?ut=.03673978504199255:t[10]>9.500000000000002?ut=-.10996402743800027:t[308]>1e-35?ut=.0553693735082498:ut=-.041600136235644125:t[306]>1e-35?t[8]>1156.5000000000002?t[4]>14.500000000000002?t[10]>21.500000000000004?ut=.010902983761213922:ut=.1325118659895645:ut=-.064362945508595:t[1]>66.50000000000001?ut=.033416767779331176:ut=-.054080316225040496:t[42]>1e-35?ut=-.07762364337810815:t[10]>1089.5000000000002?ut=-.08465599849125216:t[31]>1e-35?t[8]>30.500000000000004?ut=.012788520036013586:t[1]>32.50000000000001?t[1]>51.50000000000001?ut=.0220102041325908:ut=-.06516708740003069:ut=.012833498905748267:t[224]>1e-35?ut=-.007038418272997865:ut=.00037666304316290967;let ye;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?ye=.07554189644995735:ye=-.052089349455904946:ye=-.10148206848169845:t[113]>1e-35?ye=-.06666678653225779:t[39]>1e-35?t[9]>3.5000000000000004?t[0]>3670.5000000000005?ye=.07172653627995676:ye=-.07602959317610998:ye=-.08790686271287523:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?ye=-.0399322883690891:ye=.06523495517476098:ye=-.10358715295743802:t[193]>1e-35?ye=-.05551414334329124:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[10]>1.5000000000000002?ye=.015928764772252406:ye=.1341513061552287:ye=-.04975001987586173:t[10]>2.5000000000000004?t[3]>5.500000000000001?t[9]>2.5000000000000004?t[8]>310.50000000000006?ye=-.033592997607280156:ye=-.12432458028446665:t[1]>32.50000000000001?t[217]>1e-35?ye=-.08402551858097379:ye=.017401984506038796:t[1]>25.500000000000004?ye=.13337205393591278:ye=-.01160208350090984:ye=.06708317942315471:t[8]>227.50000000000003?ye=-.08486943882418681:ye=-.013970104864235007:t[8]>4968.500000000001?t[1]>31.500000000000004?t[9]>4.500000000000001?ye=-.10496268177586783:ye=-.020921489532370493:ye=.02629915927247642:t[7]>20.500000000000004?t[8]>251.50000000000003?t[115]>1e-35?ye=.11639296062157028:ye=-.004275784356569115:t[32]>1e-35?ye=-.07297384970166025:ye=.006026841626381599:ye=.002034611134960428;let Le;t[248]>1e-35?Le=.06091438745093315:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?Le=-.06455513326540585:t[1]>29.500000000000004?Le=.07718474591552532:t[4]>7.500000000000001?Le=.040139336931404826:Le=-.09685734690563386:Le=.00015327283570347363:t[9]>88.50000000000001?Le=.10079017954199324:t[1]>47.50000000000001?t[2]>20.500000000000004?t[2]>27.500000000000004?Le=-.04077257804338707:Le=.0739963982640615:t[9]>1.5000000000000002?t[17]>1e-35?Le=.03778141591008941:Le=-.06459919920634845:Le=-.11193190957880604:t[7]>6.500000000000001?t[11]>1e-35?t[18]>1e-35?Le=.14063930759326346:t[0]>179.50000000000003?Le=.07287482250668585:t[8]>1180.5000000000002?Le=-.14419393112726253:t[10]>28.500000000000004?Le=-.07993142770099469:t[17]>1e-35?Le=-.04702595410391655:t[7]>21.500000000000004?t[2]>26.500000000000004?Le=.05527969663610186:Le=-.10824385941441346:t[3]>11.500000000000002?Le=.12358502961047915:Le=-.017509147119622873:t[0]>74.50000000000001?Le=-.014907705458730486:t[8]>95.50000000000001?Le=-.02225118168342062:Le=-.1222374623708485:t[8]>1.5000000000000002?t[8]>950.5000000000001?Le=.06946188930925638:t[3]>6.500000000000001?t[10]>2.5000000000000004?t[19]>1e-35?Le=.04962819555610421:Le=-.07213577821855309:Le=.09139529824708481:t[19]>1e-35?Le=.013439401088345224:Le=-.049274647207292056:Le=.10531673719686951;let $e;t[40]>1e-35?t[0]>1937.5000000000002?$e=-.06421671152073961:$e=.04235421241226177:t[294]>1e-35?t[10]>50.50000000000001?$e=-.09100102290316286:t[0]>3030.5000000000005?t[0]>4177.500000000001?$e=-.03520420769287065:t[8]>1085.5000000000002?$e=-.019817352506127633:$e=.11444439424520964:$e=-.06854631664538167:t[120]>1e-35?t[4]>18.500000000000004?$e=-.010490117519863269:$e=.08104430117757461:t[121]>1e-35?t[243]>1e-35?$e=.16408304891242204:t[217]>1e-35?t[0]>4449.500000000001?$e=.06619344145920268:t[0]>4091.5000000000005?$e=-.08813353450871053:t[0]>3519.5000000000005?t[8]>668.5000000000001?$e=.10016091391222309:$e=-.017407607199427293:t[8]>501.50000000000006?t[10]>16.500000000000004?$e=-.019511460451434884:$e=-.11643672465055221:t[2]>18.500000000000004?$e=.07848228087333317:t[8]>55.50000000000001?$e=.032583027899956235:$e=-.11209832692153521:t[11]>1e-35?$e=.027482174104412567:t[10]>1.5000000000000002?t[6]>26.500000000000004?t[4]>19.500000000000004?t[9]>31.500000000000004?$e=-.09996887746328006:t[9]>2.5000000000000004?$e=.02157682011863397:$e=-.05247727848991843:$e=.07409150201483244:t[1]>38.50000000000001?$e=-.11378466075449625:t[224]>1e-35?$e=-.10741749127732923:t[1]>26.500000000000004?$e=.07343136534146562:$e=-.07013573628594773:t[25]>1e-35?$e=-.04626669734164317:$e=.05518333197956482:$e=.00032434010867555516;let rt;t[183]>1e-35?t[10]>1.5000000000000002?t[17]>1e-35?rt=.026313251010808853:rt=-.08997339150292381:rt=.025062509535227952:t[227]>1e-35?t[1]>6.500000000000001?t[2]>9.500000000000002?t[210]>1e-35?rt=.08071107515789745:t[23]>1e-35?t[1]>75.50000000000001?rt=.0905155504503746:t[8]>1049.5000000000002?rt=-.062312558183394054:t[8]>719.5000000000001?rt=.09583836191410239:t[0]>3719.5000000000005?rt=-.0778097309430818:rt=.04012012419054895:t[4]>12.500000000000002?t[8]>1496.5000000000002?t[10]>42.50000000000001?rt=-.12920865648544927:t[0]>2699.5000000000005?rt=-.07086587879041864:rt=.022614182502461846:t[4]>15.500000000000002?t[8]>55.50000000000001?t[1]>60.50000000000001?t[8]>652.5000000000001?rt=-.11377786322600797:rt=-.009486325820117998:t[1]>55.50000000000001?rt=.12430248795958142:t[0]>2952.5000000000005?t[0]>4331.500000000001?t[1]>38.50000000000001?rt=-.07938291201004219:t[2]>36.50000000000001?rt=.01520046732530246:rt=.13649854049662832:rt=-.07145015938528873:t[8]>407.50000000000006?rt=-.00350257360822279:rt=.11332047082193297:rt=-.10060624458629897:rt=.05429496612497562:t[8]>1446.5000000000002?rt=.006073419197482838:rt=-.08718676350883998:rt=-.11532497988252638:rt=.10766270463068293:t[34]>1e-35?rt=-.06345912440611544:t[131]>1e-35?t[9]>1.5000000000000002?rt=-.0004109812623829506:rt=.021601073497455662:rt=-7343540098965853e-20;let ot;t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?ot=-.06107663265515864:t[9]>70.50000000000001?t[10]>37.50000000000001?ot=.05995640200798119:t[0]>3443.5000000000005?ot=-.14698883458733583:ot=-.030039164579240187:t[189]>1e-35?ot=-.06086763220538141:t[1]>86.50000000000001?ot=-.05096727866142538:t[4]>64.50000000000001?ot=.11240554253834577:t[4]>45.50000000000001?ot=-.030279760168394117:t[6]>45.50000000000001?ot=.10161088917815142:t[10]>77.50000000000001?ot=-.0792333078055653:t[7]>23.500000000000004?t[0]>2882.5000000000005?ot=-.06672020005240323:ot=.08831457502630258:t[8]>2592.5000000000005?ot=-.052617701047376654:t[10]>29.500000000000004?ot=.08499327690298047:t[2]>12.500000000000002?t[9]>41.50000000000001?ot=.12880460816709416:t[9]>25.500000000000004?t[4]>11.500000000000002?ot=-.064099222705728:ot=.044332487521538365:t[0]>2882.5000000000005?ot=.031099546885005065:ot=.12938467051623853:t[0]>4221.500000000001?ot=-.0928676413498701:t[9]>30.500000000000004?ot=-.05781824812803708:ot=.07561268901778094:t[8]>711.5000000000001?t[2]>22.500000000000004?ot=-.06648105454098469:ot=.05985487552383097:ot=-.13070190291919334:t[116]>1e-35?t[10]>38.50000000000001?ot=.05282385499619401:t[1]>66.50000000000001?ot=.048802929108006314:t[2]>4.500000000000001?t[0]>4593.500000000001?ot=.027885690791379255:ot=-.08407126408362446:ot=.014432924125571093:ot=-9903435845205118e-20;let ft;t[76]>1e-35?ft=-.06307875292162934:t[21]>1e-35?t[7]>10.500000000000002?t[10]>4.500000000000001?t[8]>944.5000000000001?t[0]>3655.5000000000005?ft=.013633653464240465:ft=-.10164319411983509:ft=-.1228424374328996:t[1]>26.500000000000004?t[2]>28.500000000000004?ft=.00632864847804078:ft=-.08393000368134668:ft=.07870508617440916:t[284]>1e-35?ft=.1092302727710421:ft=-.0025505047582483234:t[248]>1e-35?ft=.07101822393621864:t[274]>1e-35?ft=-.06621099406425579:t[1]>26.500000000000004?t[1]>28.500000000000004?ft=.0003077044909372931:t[10]>2.5000000000000004?t[0]>3770.5000000000005?ft=.025081789181021243:ft=-.014813325803582618:t[9]>33.50000000000001?ft=-.033466921233840194:t[3]>12.500000000000002?t[23]>1e-35?ft=.11926990418060353:ft=.01852125513565268:ft=.0975367595927343:t[5]>3325.5000000000005?t[8]>892.5000000000001?t[133]>1e-35?ft=-.1178464984373743:t[283]>1e-35?ft=.043370859226927405:t[5]>4320.500000000001?ft=-.01103141226366587:t[8]>1104.5000000000002?ft=-.023053423988095886:ft=-.0734238953804657:t[6]>18.500000000000004?t[8]>85.50000000000001?ft=.000579145585864887:ft=.03389152834202143:t[128]>1e-35?ft=-.14527722052568462:t[210]>1e-35?ft=-.08915971541902741:t[7]>9.500000000000002?ft=-.03307314577076116:t[18]>1e-35?ft=-.05521712302023565:ft=.009315605032770029:ft=.0036332551852289933;let z;t[0]>689.5000000000001?t[5]>768.5000000000001?t[20]>1e-35?t[5]>4368.500000000001?z=-.07583539600416284:t[188]>1e-35?z=-.07042659515500142:t[23]>1e-35?t[0]>3807.5000000000005?z=-.011038193049597113:z=.08154028164397753:t[1]>85.50000000000001?z=.10259361975201933:z=.011640408330521594:z=-.00023319159023748508:t[92]>1e-35?z=.13771692859530546:z=.022860029819654806:t[1]>22.500000000000004?t[1]>24.500000000000004?t[2]>96.50000000000001?z=.09967230141007705:t[30]>1e-35?z=-.08888529037551285:z=-.008615931385397808:t[10]>5.500000000000001?t[4]>36.50000000000001?z=.08284665960761373:z=-.029292565021289504:t[7]>7.500000000000001?z=-.09945093355204493:z=-.008381393701708593:t[20]>1e-35?z=-.04218678460370465:t[10]>6.500000000000001?t[9]>2.5000000000000004?t[1]>13.500000000000002?t[8]>143.50000000000003?t[4]>7.500000000000001?t[2]>36.50000000000001?z=.07585582641438211:t[8]>284.50000000000006?z=-.029387993239886723:z=.07716738177321587:t[1]>18.500000000000004?z=.026745348497993746:z=.1427429617069753:t[9]>16.500000000000004?t[9]>33.50000000000001?z=.02337306890530338:z=-.10390355904767366:z=.07390521199638532:z=-.06788247515155237:z=-.04201446383470994:t[2]>25.500000000000004?t[2]>29.500000000000004?t[8]>227.50000000000003?z=-.06360325615644084:z=.04342192339836601:z=-.10598779152030145:z=.05253384605768211;let se;t[3]>7.500000000000001?t[157]>1e-35?se=-.07514182877923786:se=.000636205502279271:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?se=.028692053800951845:se=.14081686716133598:se=-.03316566526940354:t[186]>1e-35?t[0]>2653.5000000000005?se=.0037139292567243084:se=.12662311031652707:t[107]>1e-35?t[0]>612.5000000000001?se=.01202688580305612:se=.0993509141454483:t[203]>1e-35?t[1]>77.50000000000001?se=.043935495082738626:se=-.05639305759669704:t[247]>1e-35?se=-.06770766046891649:t[105]>1e-35?t[19]>1e-35?se=.10331836202616368:se=.0006926658459781341:t[96]>1e-35?se=.05361846065599475:t[127]>1e-35?t[0]>2723.5000000000005?t[1]>54.50000000000001?se=-.0741403257305367:se=.022900127535540854:t[7]>3.5000000000000004?se=.038110741403836294:se=.14618649985842758:t[5]>3921.5000000000005?t[1]>110.50000000000001?se=-.09552842289807008:t[1]>27.500000000000004?se=.012505935885798007:se=-.020509603428689526:t[282]>1e-35?t[9]>45.50000000000001?t[6]>5.500000000000001?se=-.1046104767723845:se=.031388606992301074:t[8]>114.50000000000001?t[9]>17.500000000000004?t[9]>22.500000000000004?t[1]>32.50000000000001?se=.023466328488582572:se=.11730925774586994:se=-.04771965631104874:se=.17059689880751394:se=-.08181850955999449:t[26]>1e-35?se=-.12727482696678769:se=-.014343123272734182;let Ce;t[147]>1e-35?t[1]>53.50000000000001?Ce=-.0993064321015924:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ce=-.02763546051134888:Ce=.06423344777499343:Ce=-.064606430904295:t[302]>1e-35?t[10]>2.5000000000000004?t[10]>47.50000000000001?Ce=.049825139823021586:t[7]>22.500000000000004?Ce=-.01131680751379858:t[0]>2579.5000000000005?Ce=-.10673674485369694:Ce=-.015387212937189957:Ce=.04347325151148724:t[179]>1e-35?Ce=-.05788885608624092:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Ce=.0650355590939066:Ce=-.0473332870892226:Ce=-.09699315983340703:t[288]>1e-35?t[88]>1e-35?Ce=.11139543329789044:t[126]>1e-35?Ce=-.09726928633696198:t[8]>149.50000000000003?t[9]>46.50000000000001?t[4]>1.5000000000000002?t[8]>1861.5000000000002?Ce=.06370903833231022:t[10]>29.500000000000004?Ce=.03415223859607161:t[10]>3.5000000000000004?Ce=-.07415518117873297:Ce=-.0014119203473324082:Ce=.12617652343819508:t[9]>41.50000000000001?Ce=-.10311145857176976:t[8]>2757.5000000000005?Ce=-.08106484219011428:t[7]>71.50000000000001?Ce=-.09783384432091176:t[1]>88.50000000000001?Ce=.06249739709782831:t[3]>9.500000000000002?t[5]>1601.5000000000002?Ce=-.008884084501608536:Ce=.061339437777743616:Ce=-.042490992675121846:t[2]>6.500000000000001?t[3]>10.500000000000002?Ce=.01526664064166223:Ce=.13534828515415498:Ce=-.06985484465894776:Ce=.0005758961943178744;let we;t[86]>1e-35?t[1]>23.500000000000004?t[1]>29.500000000000004?t[4]>16.500000000000004?t[2]>31.500000000000004?we=-.029152732370514342:we=.07173628916139178:t[1]>36.50000000000001?we=-.08859111297255318:we=.0018030071815630785:we=.13652461563759322:we=-.07550137680349367:t[10]>52.50000000000001?t[49]>1e-35?we=-.07145140450454163:t[21]>1e-35?we=-.07422841663493233:we=.006289319702780104:t[10]>40.50000000000001?t[9]>59.50000000000001?t[19]>1e-35?t[13]>1e-35?we=.11864240653986852:t[3]>33.50000000000001?we=-.08821209591953476:we=.05706392280054726:we=-.03600088051578915:t[18]>1e-35?t[1]>24.500000000000004?we=.01953613016837112:we=-.059781039130025006:t[148]>1e-35?we=.052668447861325476:t[3]>30.500000000000004?t[9]>49.50000000000001?we=.07207826841738371:t[202]>1e-35?we=.08163917539410503:we=-.01319846363832958:t[9]>35.50000000000001?t[5]>4134.500000000001?t[10]>44.50000000000001?we=-.06858280496900336:we=-.1781828899516648:we=-.04024620133969553:t[9]>10.500000000000002?t[1]>22.500000000000004?t[1]>37.50000000000001?we=.018232649414147116:we=-.04419781124222661:we=.05145485182416554:t[1]>23.500000000000004?t[0]>655.5000000000001?t[5]>4901.500000000001?t[10]>45.50000000000001?we=.11452368095776105:we=-.036496437259924026:we=-.040445338739465486:we=.0816572651001145:we=-.08968914517368663:we=.0002826343082585516;let je;t[189]>1e-35?t[0]>5269.500000000001?je=-.08839493050459957:t[10]>85.50000000000001?je=.10046908365702462:t[8]>2592.5000000000005?je=-.09632233975926387:t[8]>2000.5000000000002?je=.10282992953871627:t[8]>1266.5000000000002?t[9]>34.50000000000001?je=.035504970430426296:t[1]>31.500000000000004?je=-.1133764813142531:je=-.01138280942244812:t[8]>1125.5000000000002?je=.09800530246229806:je=.016170419267589393:t[218]>1e-35?t[9]>99.50000000000001?t[9]>101.50000000000001?t[9]>124.50000000000001?je=.07316772160107896:je=-.059095014819051765:je=.17859437315769733:t[2]>1.5000000000000002?t[9]>86.50000000000001?je=-.09150209066166894:t[8]>3084.0000000000005?je=-.05443972593168094:t[1]>65.50000000000001?t[10]>11.500000000000002?t[9]>33.50000000000001?je=-.04449234460408263:je=.05568837973347338:je=-.12362324875024472:t[1]>41.50000000000001?t[10]>12.500000000000002?t[8]>1336.5000000000002?je=.12741077850267066:je=.007372371864985329:t[2]>39.50000000000001?je=.02295917234617787:je=.14966532083907075:t[1]>39.50000000000001?je=-.06685557815340279:t[10]>22.500000000000004?t[2]>52.50000000000001?je=-.02511861881285652:t[1]>27.500000000000004?je=.08683660011672288:je=.02956214835267301:t[9]>15.500000000000002?je=-.016538805462996232:je=.04352738094981517:je=-.05561856645643868:t[9]>170.50000000000003?je=-.07996752635874248:t[179]>1e-35?je=-.09065975936933919:je=-.00042817975060427177;let Ye;t[39]>1e-35?t[4]>25.500000000000004?Ye=.03443173196222934:Ye=-.06554248341270724:t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[4]>86.50000000000001?Ye=-.0013415395759330318:Ye=.12950978489563347:t[1]>22.500000000000004?t[10]>19.500000000000004?t[4]>30.500000000000004?t[9]>41.50000000000001?Ye=.002297618040307216:Ye=-.12522800128774994:t[4]>8.500000000000002?t[8]>1075.5000000000002?Ye=-.015297257305397608:Ye=.09651828834062742:Ye=-.06636003334371929:t[10]>11.500000000000002?Ye=.17631616138309397:t[0]>1639.5000000000002?Ye=3804386478092585e-20:Ye=-.09099296398683193:Ye=-.06874415876172972:t[0]>2151.5000000000005?Ye=-.1311264883406766:Ye=.00809052010141122:t[253]>1e-35?Ye=-.06338558211939296:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?t[10]>10.500000000000002?t[0]>3615.5000000000005?Ye=.045038497754638605:Ye=-.07770167665661752:Ye=-.08596294280650517:Ye=.08538655727027213:Ye=.09829076418590559:t[1]>39.50000000000001?t[9]>1.5000000000000002?Ye=.054627956617973275:t[1]>61.50000000000001?Ye=-.11994465088415499:t[4]>8.500000000000002?Ye=.06676200239406452:Ye=-.027503148069376867:t[8]>676.5000000000001?Ye=-.10363964928357075:t[4]>8.500000000000002?Ye=-.07589816227175682:Ye=.034664436544646814:t[1]>159.50000000000003?t[6]>25.500000000000004?Ye=.009093153189012338:Ye=-.06119765876605404:Ye=.0004668642103528348;let gt;t[223]>1e-35?t[1]>31.500000000000004?t[8]>711.5000000000001?gt=-.10100794502567233:gt=.08000205636470442:gt=-.11945419826856896:t[113]>1e-35?gt=-.06105445938688056:t[167]>1e-35?t[0]>3928.5000000000005?gt=.1224302423880318:gt=-.01875566982911468:t[222]>1e-35?t[1]>8.500000000000002?t[1]>24.500000000000004?t[4]>3.5000000000000004?t[0]>725.5000000000001?t[0]>1682.5000000000002?t[0]>2860.5000000000005?gt=.0019277012166729114:t[1]>28.500000000000004?gt=-.054445821715687494:gt=.045645722976713245:t[30]>1e-35?gt=.13402660155331655:gt=.008921176001777645:gt=-.058547426505451076:gt=.08841202222426625:t[1]>22.500000000000004?t[10]>9.500000000000002?gt=-.13526418192218206:gt=-.03266013432583145:t[1]>20.500000000000004?t[4]>27.500000000000004?gt=.0007263224246135398:gt=.12450043268647056:t[1]>17.500000000000004?t[9]>1.5000000000000002?gt=-.11575657261278308:gt=-.01530376565862095:t[4]>13.500000000000002?t[4]>22.500000000000004?gt=-.01995960178292952:gt=.11216586049153021:gt=-.10050961087149474:gt=.08848063368485726:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?gt=.10303451081526649:gt=-.01375730267020699:t[1]>28.500000000000004?t[2]>20.500000000000004?gt=-.043799548968209395:gt=-.12451444314954115:t[4]>12.500000000000002?gt=-.03838117361958468:gt=.06504990789767144:t[57]>1e-35?gt=.06890006938293915:gt=.0003914274695562949;let xt;t[53]>1e-35?t[4]>11.500000000000002?t[8]>617.5000000000001?t[2]>41.50000000000001?xt=.004271749009686975:xt=-.10523878297127605:xt=.04633982158107851:xt=-.10349713975483057:t[183]>1e-35?t[15]>1e-35?xt=-.08655730561951676:t[8]>919.5000000000001?xt=-.0676453705610183:t[7]>18.500000000000004?xt=-.027787974193650575:xt=.08012784576991301:t[227]>1e-35?t[1]>6.500000000000001?t[3]>8.500000000000002?t[210]>1e-35?xt=.07185850683316512:t[8]>201.50000000000003?t[8]>348.50000000000006?t[23]>1e-35?t[8]>1049.5000000000002?xt=-.03473877164537313:t[8]>719.5000000000001?xt=.10471053866934404:xt=.008236107678382981:t[4]>57.50000000000001?xt=.09412219478825269:t[10]>66.50000000000001?xt=-.13884338641811986:t[10]>19.500000000000004?t[10]>22.500000000000004?t[0]>2490.5000000000005?xt=-.040681323751002293:xt=.06374650297561021:xt=.12884615227401788:t[10]>5.500000000000001?xt=-.0887517295786972:t[8]>597.5000000000001?t[18]>1e-35?xt=-.05474068967150784:xt=.03744700650806603:xt=-.07846396348680855:t[1]>42.50000000000001?xt=.018972315810821302:xt=.10953621007604744:t[5]>4439.500000000001?xt=.010999776705494586:t[1]>40.50000000000001?xt=-.12394200059775967:t[10]>2.5000000000000004?xt=.013528093962849453:xt=-.09222088417048682:xt=-.12662967149701485:xt=.09327296405849603:t[3]>99.50000000000001?xt=-.013581954439986752:xt=.0005526498251862075;let Bt;t[187]>1e-35?t[243]>1e-35?Bt=-.08392792551692502:t[10]>68.50000000000001?Bt=.07871769409454053:t[10]>8.500000000000002?t[10]>16.500000000000004?t[2]>17.500000000000004?t[3]>31.500000000000004?t[91]>1e-35?t[10]>21.500000000000004?t[10]>33.50000000000001?t[10]>48.50000000000001?Bt=-.0825306209711224:Bt=.049559996084532945:Bt=-.1064938580886302:Bt=.03353240732240275:Bt=.045985370399163464:t[1]>42.50000000000001?t[4]>20.500000000000004?Bt=.16966001471529374:t[1]>57.50000000000001?Bt=-.005772777673676247:Bt=.09383677041525058:t[8]>747.5000000000001?Bt=.054068175469351235:Bt=-.049968216310277036:t[8]>753.5000000000001?Bt=-.0679383555784074:t[4]>8.500000000000002?Bt=-.059757341189735386:Bt=.05701083682780414:Bt=-.052497281448921164:t[6]>12.500000000000002?t[8]>969.5000000000001?t[4]>23.500000000000004?Bt=.05820296128730006:Bt=-.1063042385102475:t[1]>49.50000000000001?t[8]>302.50000000000006?Bt=.15340611616954566:Bt=.04385036188666874:t[0]>4449.500000000001?Bt=-.02110897605541555:t[1]>24.500000000000004?t[2]>17.500000000000004?Bt=.004840354641006495:Bt=.09967827580276283:Bt=.11605363537391578:t[9]>19.500000000000004?Bt=-.0735831692725717:Bt=.019973331823355176:t[306]>1e-35?t[149]>1e-35?Bt=-.08968948874343531:t[8]>1094.5000000000002?t[10]>15.500000000000002?Bt=-.02442182361342386:Bt=.10334853004243093:Bt=-.030431948680167104:Bt=-956078595250818e-19;let Ct;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4078.5000000000005?Ct=-.040232505718244854:t[0]>3030.5000000000005?Ct=.0634109586813073:Ct=-.04043617034245621:Ct=-.06385323610738443:t[120]>1e-35?t[4]>18.500000000000004?Ct=-.007859096946435131:Ct=.07282728486115758:t[229]>1e-35?t[0]>2952.5000000000005?t[17]>1e-35?Ct=.05515771679628051:Ct=-.04214471312668263:Ct=-.09589322222261765:t[193]>1e-35?Ct=-.05056345906812831:t[121]>1e-35?t[243]>1e-35?Ct=.14857706653119385:t[4]>9.500000000000002?t[1]>26.500000000000004?t[2]>59.50000000000001?Ct=-.08152604001147906:t[11]>1e-35?Ct=.09132936522356462:t[15]>1e-35?t[4]>23.500000000000004?Ct=.13100930780107503:t[10]>25.500000000000004?Ct=.05921074710011526:Ct=-.07226005736695183:t[0]>3304.5000000000005?t[0]>3707.5000000000005?t[0]>4053.5000000000005?Ct=.0009447118243153454:Ct=-.09820565036865991:Ct=.057146909749745546:t[0]>2115.5000000000005?Ct=-.12331216726611678:Ct=.007281983677694285:t[2]>56.50000000000001?Ct=.012310154675612615:Ct=-.08873665774670461:t[6]>25.500000000000004?Ct=.134708740821879:t[9]>5.500000000000001?Ct=-.0805901581148979:t[224]>1e-35?Ct=-.063684477784257:t[7]>2.5000000000000004?t[19]>1e-35?Ct=.10842593386554122:t[2]>13.500000000000002?Ct=.06466798320378395:Ct=-.08578130788886655:Ct=-.03590892078300114:Ct=.0003499894043880708;let Ie;t[134]>1e-35?t[6]>50.50000000000001?t[0]>3601.5000000000005?Ie=.10839808814624702:Ie=-.028043875308180352:t[7]>30.500000000000004?t[8]>932.5000000000001?Ie=-.007478368069393829:Ie=-.09066751344326617:t[0]>3588.5000000000005?t[5]>4748.500000000001?Ie=.04035247751736232:t[0]>4255.500000000001?Ie=-.1310865624507367:t[0]>4004.5000000000005?Ie=.06647367311982634:Ie=-.08339693352955757:t[4]>10.500000000000002?t[1]>34.50000000000001?Ie=-.011618902907510411:Ie=.1114646660406691:t[10]>2.5000000000000004?t[0]>3072.5000000000005?Ie=.09356028223727986:Ie=-.03811765057032162:Ie=-.09456215497345526:t[280]>1e-35?t[7]>70.50000000000001?Ie=.10322956436499003:t[2]>22.500000000000004?t[1]>83.50000000000001?Ie=.1146142460964847:t[1]>62.50000000000001?Ie=-.09679869865322362:t[9]>71.50000000000001?Ie=-.07377580769927583:t[4]>19.500000000000004?t[0]>4571.500000000001?Ie=-.039046426387852974:Ie=.04558778688367152:Ie=.11220830937352602:t[7]>5.500000000000001?t[9]>17.500000000000004?t[8]>1067.5000000000002?Ie=.03261697816211156:t[15]>1e-35?Ie=.02586252542264368:t[2]>14.500000000000002?Ie=-.016420452667484604:Ie=-.1011799626006976:Ie=-.13787471318963773:t[6]>4.500000000000001?t[8]>427.50000000000006?t[10]>36.50000000000001?Ie=.010193588102560583:Ie=.11748729525930773:Ie=-.04468162226743652:Ie=-.028365274393617957:t[71]>1e-35?Ie=.05115139346588793:Ie=-.0001510425316936658;let K;t[298]>1e-35?t[8]>81.50000000000001?t[8]>119.50000000000001?t[4]>64.50000000000001?K=.09072192054181037:t[9]>72.50000000000001?t[8]>1094.5000000000002?K=.020637047900190317:K=-.1017300802134141:t[1]>23.500000000000004?t[9]>12.500000000000002?t[0]>2815.5000000000005?t[0]>3183.5000000000005?t[3]>23.500000000000004?t[3]>45.50000000000001?t[4]>48.50000000000001?K=-.04632587527094407:K=.08603684785510396:K=-.05101401015448496:K=.025466432054358498:K=-.07897811963329214:t[6]>13.500000000000002?t[10]>26.500000000000004?K=.020385355430046367:K=.12032592051335252:K=-.012387370292173013:t[2]>23.500000000000004?K=-.12568545484492677:K=-.022261190943521976:t[8]>634.5000000000001?t[8]>857.5000000000001?K=.043528764484784536:K=.14352071657196003:K=-.009332833816977268:K=.11186782227735846:K=-.0737365712425554:t[136]>1e-35?t[0]>1937.5000000000002?K=-.05649104643152564:K=.03884200719305747:t[42]>1e-35?K=-.07191700385792335:t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?K=-.04103416502526736:K=.04881823954656287:t[4]>15.500000000000002?K=.009342724662897898:t[0]>3969.5000000000005?K=-.025637309961309498:K=-.12574492012987865:t[212]>1e-35?t[19]>1e-35?K=-.08185697075265091:t[0]>2215.5000000000005?K=.030063975892297354:t[0]>807.5000000000001?K=-.03924325550733229:K=.0415330999189793:K=-.00024374664461674863;let pe;t[3]>7.500000000000001?pe=.0005117490419655908:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?pe=.025798416259686565:pe=.13251610353146012:pe=-.029900559552677654:t[1]>81.50000000000001?t[1]>110.50000000000001?t[0]>4242.500000000001?pe=-.11098564237775424:pe=25960925309712775e-21:t[0]>4177.500000000001?t[9]>35.50000000000001?pe=.15347826616466054:t[3]>4.500000000000001?pe=.10379320730958941:pe=-.008896303020010654:t[0]>3415.5000000000005?t[0]>3830.5000000000005?pe=.03159791088468647:pe=-.10612873364104258:pe=.05059856107348746:t[133]>1e-35?t[2]>5.500000000000001?pe=-.02335760775001469:pe=-.1379386577903324:t[1]>62.50000000000001?t[3]>2.5000000000000004?pe=-.011164334474672973:pe=-.06594044410501655:t[207]>1e-35?pe=-.1014214372326535:t[8]>3.5000000000000004?t[107]>1e-35?t[2]>6.500000000000001?pe=-.01725821503981916:pe=.05594086838700241:t[203]>1e-35?t[1]>44.50000000000001?t[1]>51.50000000000001?pe=-.04226531631656534:pe=-.14409800530171432:pe=-.03245576341206398:t[8]>4214.500000000001?pe=.0895409165534886:t[247]>1e-35?pe=-.06506383629143335:t[118]>1e-35?pe=-.07214270121257443:t[8]>546.5000000000001?pe=-.004385020865473831:pe=.009321812545248529:t[0]>1639.5000000000002?t[13]>1e-35?pe=.046278501133958524:pe=-.030835570926968044:t[0]>493.50000000000006?pe=-.12794504651610425:pe=.009415039807550776;let me;t[304]>1e-35?me=-.04717777269217453:t[76]>1e-35?me=-.05813439142128324:t[1]>59.50000000000001?t[0]>350.50000000000006?t[53]>1e-35?me=-.09648224457374217:t[132]>1e-35?me=.07089308107910267:t[0]>2248.5000000000005?t[5]>2525.5000000000005?t[9]>1.5000000000000002?t[114]>1e-35?me=-.08595213071749083:t[9]>14.500000000000002?t[9]>33.50000000000001?t[285]>1e-35?me=.10838431695638147:t[230]>1e-35?me=.06458713915750626:t[0]>3219.5000000000005?t[3]>23.500000000000004?t[9]>69.50000000000001?me=.050071316251979:me=-.006356941111525215:t[6]>8.500000000000002?me=-.0384814076434817:t[1]>73.50000000000001?t[0]>3746.5000000000005?me=.10217402850540398:me=-.048840949025349197:me=-.03668313197909846:t[7]>39.50000000000001?me=-.0562642841496003:t[10]>2.5000000000000004?me=.09749777369987417:me=-.04848223121417616:t[0]>5453.500000000001?me=.08316648226133942:me=-.0261979698267618:t[212]>1e-35?me=.09565573198318654:t[5]>4814.500000000001?t[8]>963.5000000000001?t[8]>1514.5000000000002?me=.04837009746506856:me=-.09184360565631328:me=.0032411047845613606:t[0]>4733.500000000001?me=.0977378556864798:me=.010776545559325588:me=-.012483310473120218:me=-.049284121449103935:me=.011962641341789565:t[1]>67.50000000000001?t[1]>77.50000000000001?me=-.08380361910948711:me=.07375088778585813:me=-.1084864186071348:me=.0007819503469605476;let ne;t[7]>17.500000000000004?t[115]>1e-35?ne=.08741852531696623:t[167]>1e-35?ne=.10078975495600809:ne=-.0018324767784017562:t[290]>1e-35?ne=-.0850089851255888:t[74]>1e-35?t[10]>16.500000000000004?ne=.1379733311640402:ne=-.0038500648529631075:t[6]>29.500000000000004?t[8]>876.5000000000001?t[0]>3129.5000000000005?t[9]>5.500000000000001?t[8]>1765.5000000000002?ne=-.09360083033774169:ne=.061471353193188374:t[10]>11.500000000000002?t[10]>31.500000000000004?ne=-.015599362579530679:t[0]>4593.500000000001?ne=-.12029549262691491:ne=-.018917032256501397:ne=.04632831686576592:ne=.06892347785444271:t[4]>8.500000000000002?t[10]>33.50000000000001?ne=-.05894883236412263:ne=.05213944998315824:ne=.12621779223564986:t[243]>1e-35?t[6]>16.500000000000004?t[0]>4141.500000000001?t[0]>5850.500000000001?ne=.07577412405680808:ne=-.053144737214742235:t[1]>29.500000000000004?t[9]>16.500000000000004?ne=-.0277076900736147:t[1]>65.50000000000001?ne=-.023587471585763506:ne=.10184896592433082:ne=-.057699270527916825:ne=-.041191811945739454:t[114]>1e-35?t[2]>23.500000000000004?ne=.06566902102799584:t[10]>25.500000000000004?ne=-.07033633753181047:ne=-.01599120398351932:t[242]>1e-35?t[0]>2402.5000000000005?ne=-.08108035861059537:ne=.04184690010531078:t[35]>1e-35?t[0]>2904.5000000000005?ne=-.12431182772561139:ne=.01886235886984271:ne=.0025579594894418116;let V;t[8]>2915.5000000000005?t[101]>1e-35?V=.08648323956719083:t[0]>93.50000000000001?t[196]>1e-35?V=-.09509320772734361:t[4]>1.5000000000000002?t[5]>1106.5000000000002?t[5]>1191.5000000000002?t[283]>1e-35?V=-.11268313808648661:t[10]>12.500000000000002?t[131]>1e-35?V=.0687641681341721:t[10]>102.50000000000001?V=-.09667920080214842:t[4]>15.500000000000002?t[8]>2992.5000000000005?t[1]>24.500000000000004?t[1]>71.50000000000001?V=-.06762578396473291:t[10]>65.50000000000001?V=-.05226727783610509:t[282]>1e-35?V=.09911438410640917:t[19]>1e-35?V=.06915156336429933:V=-.006565637886508241:V=-.08344300251849307:V=-.0928863907927501:t[1]>60.50000000000001?t[2]>17.500000000000004?V=.19428463865406298:V=.016073883020956765:t[13]>1e-35?V=.06864077097923665:V=-.01388867527034731:t[0]>1847.5000000000002?V=.004655280608161356:t[1]>40.50000000000001?V=.031406054057765996:V=.12798062439212832:V=.09859670536264255:t[10]>2.5000000000000004?t[9]>68.50000000000001?V=.08821759640665892:t[9]>32.50000000000001?t[8]>3960.0000000000005?t[1]>31.500000000000004?V=-.0706095614785733:V=.04227164041372561:V=-.1056906923176064:t[2]>8.500000000000002?t[19]>1e-35?V=-.07139533369873902:V=.008952586782921625:V=.06086212582180936:V=-.0816938490403437:V=-.051224901945956025:V=-.10525399124186095:V=.000270924147208224;let Re;t[122]>1e-35?t[0]>2461.5000000000005?t[2]>36.50000000000001?Re=.029186512383291244:t[7]>1.5000000000000002?Re=-.14984127276725573:t[1]>40.50000000000001?Re=.032757060730648144:Re=-.07675575422749602:t[6]>8.500000000000002?Re=.10599766037117893:Re=-.0541423394552156:t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?Re=-.051394622947855385:Re=.03237141302699347:Re=.12526173027943244:Re=.000579473126472788:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?Re=-.07383912482657777:t[0]>5147.500000000001?Re=.07008813937042091:t[10]>38.50000000000001?Re=-.06779203808365307:Re=-.013782769999524498:Re=.0880038869117715:Re=-.12846294176070952:t[281]>1e-35?Re=-.06810806903850834:t[10]>227.50000000000003?Re=-.08937977001661111:t[10]>130.50000000000003?Re=.10538920632708033:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?Re=.011036530162093841:Re=-.11500797478569702:Re=.03702229366129399:Re=.07242026683784307:t[189]>1e-35?Re=.03331407112090286:t[9]>33.50000000000001?t[201]>1e-35?Re=.08979610115743614:t[7]>57.50000000000001?t[1]>20.500000000000004?Re=-.02608892716555304:Re=.09609599320761308:t[9]>105.50000000000001?Re=-.06848127135991534:Re=.0023675721254089715:t[86]>1e-35?Re=-.11049635625500497:Re=-.004847764219432233;let ze;t[125]>1e-35?t[0]>3969.5000000000005?ze=-.09462233499115416:ze=.05235324508465096:t[17]>1e-35?t[49]>1e-35?t[10]>19.500000000000004?ze=-.030700661288166148:ze=.0870883677166864:t[10]>3.5000000000000004?t[3]>18.500000000000004?t[0]>3544.5000000000005?t[188]>1e-35?t[9]>7.500000000000001?ze=.03149547314036763:ze=-.08166208257451366:t[0]>5850.500000000001?ze=-.10228136324773157:t[102]>1e-35?ze=-.10572585290676295:t[8]>726.5000000000001?t[5]>3657.5000000000005?ze=.01782894842128785:t[13]>1e-35?ze=.002680190260979968:ze=.1773965720476949:t[2]>72.50000000000001?ze=.09090831938627947:t[1]>59.50000000000001?ze=-.12297206702816128:t[0]>4977.500000000001?ze=.09899015653118268:ze=-.022207141540838887:t[4]>32.50000000000001?t[1]>34.50000000000001?ze=-.0675900954187773:ze=.012336403425364092:ze=-.0017002325391924573:t[6]>7.500000000000001?t[1]>17.500000000000004?ze=-.02671721777458802:ze=-.09242452991958029:t[284]>1e-35?ze=-.08585691288582491:ze=.013332890564324447:t[4]>14.500000000000002?ze=-.005245022074799553:t[23]>1e-35?ze=-.020036720167235768:t[1]>29.500000000000004?t[114]>1e-35?ze=-.09289852307936758:t[116]>1e-35?ze=-.09686573010015055:t[8]>804.5000000000001?ze=.03812547148215318:ze=.005162744968176633:t[9]>43.50000000000001?ze=-.059246106396159376:ze=.050370113808135275:ze=.000794041852811028;let Mt;t[3]>7.500000000000001?Mt=.0004981426543104341:t[9]>114.50000000000001?Mt=.05666010099424601:t[129]>1e-35?t[6]>3.5000000000000004?Mt=-.019061766497948867:Mt=.07193491146561211:t[186]>1e-35?t[0]>2653.5000000000005?Mt=-.006044199577160493:Mt=.1147136801028133:t[6]>85.50000000000001?t[8]>847.5000000000001?Mt=.11486607015912494:t[9]>16.500000000000004?Mt=-.08686820858087294:Mt=.06119632492911875:t[127]>1e-35?t[0]>2723.5000000000005?t[0]>3682.5000000000005?t[1]>38.50000000000001?Mt=-.022230207980026437:Mt=.1056683690528792:Mt=-.05859530800943035:Mt=.06970608927597141:t[7]>3.5000000000000004?t[105]>1e-35?Mt=.08073568184886762:t[107]>1e-35?t[2]>6.500000000000001?Mt=-.05177544573528314:Mt=.05370469772149028:t[1]>35.50000000000001?t[0]>4106.500000000001?t[9]>46.50000000000001?t[0]>4633.500000000001?Mt=.15159657923771555:Mt=-.0060542654587671055:t[9]>5.500000000000001?Mt=-.042808028205051786:t[1]>48.50000000000001?Mt=-.010449538258110742:Mt=.10026907521968294:Mt=-.04249349329714756:t[9]>42.50000000000001?t[1]>19.500000000000004?t[8]>852.5000000000001?Mt=-.02272452389409874:Mt=-.11202691218244319:t[5]>1809.5000000000002?Mt=-.04460413584255906:Mt=.08196329474205256:t[10]>69.50000000000001?Mt=.10221481166238167:Mt=.0004063052701699382:t[243]>1e-35?Mt=-.07563941678849846:t[18]>1e-35?Mt=.02563513231103432:Mt=-.004740081147303786;let rr;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?rr=.057446442918106:rr=-.04404018270156349:rr=-.09282976714550464:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?rr=-.05930486238817954:t[1]>29.500000000000004?rr=.06955866121256543:t[8]>597.5000000000001?rr=-.06538593556505168:rr=.06212512595497445:rr=.00021102929959182257:t[9]>90.50000000000001?rr=.0958061289119631:t[102]>1e-35?rr=.07172059675638813:t[1]>47.50000000000001?rr=-.03879798603977766:t[297]>1e-35?rr=.054948234271956144:t[282]>1e-35?t[2]>6.500000000000001?rr=.003805910996312012:rr=.09304295674749524:t[11]>1e-35?t[18]>1e-35?rr=.11252376801858695:t[288]>1e-35?rr=-.10293901912180432:rr=.014669268837893872:t[1]>42.50000000000001?rr=-.05988274123836837:t[145]>1e-35?rr=.06142784665288495:t[3]>1.5000000000000002?t[4]>4.500000000000001?t[1]>21.500000000000004?t[1]>27.500000000000004?t[9]>24.500000000000004?rr=.038791154988529926:t[10]>22.500000000000004?t[2]>19.500000000000004?rr=-.03366718308159971:rr=.11936550608549797:t[1]>31.500000000000004?rr=-.07454716789539667:rr=.027859650621164217:t[10]>10.500000000000002?rr=-.11806374092321247:rr=-.03506042229223101:rr=-.0007080765837654515:t[10]>6.500000000000001?rr=-.028077713664996503:t[2]>7.500000000000001?rr=.15803724124216814:rr=.0351381284833169:rr=-.07877953381054767;let zt;t[131]>1e-35?t[282]>1e-35?t[4]>23.500000000000004?zt=.14144941521975005:zt=.0007727806714190652:t[9]>1.5000000000000002?t[8]>2134.5000000000005?t[2]>34.50000000000001?zt=.10514088112381886:t[7]>18.500000000000004?zt=-.10370643555956745:zt=.04093594315421388:t[6]>15.500000000000002?t[4]>9.500000000000002?t[10]>27.500000000000004?t[10]>71.50000000000001?zt=-.0508129468802936:t[224]>1e-35?zt=-.037816066368733595:t[10]>43.50000000000001?zt=.07793408602607932:zt=.017646166646099453:t[9]>3.5000000000000004?t[9]>29.500000000000004?t[17]>1e-35?zt=.036972453794202324:zt=-.08727431092411866:t[8]>427.50000000000006?t[8]>1278.5000000000002?zt=.09475302525132188:zt=-.03580104945898193:zt=.08349488283861875:t[10]>3.5000000000000004?t[0]>1847.5000000000002?t[0]>4280.500000000001?t[2]>27.500000000000004?zt=-.1282448778804823:zt=-.014395808269207212:zt=-.008940927190750592:zt=-.1459118815453748:t[0]>4897.500000000001?zt=-.09733068457286576:t[1]>57.50000000000001?zt=.06575271409540207:zt=-.019556422817450115:zt=-.10623959222984136:t[18]>1e-35?zt=.11280940901275241:t[8]>319.50000000000006?t[2]>6.500000000000001?zt=.008125645893104896:zt=-.11084368630465868:zt=.0584398731508786:t[0]>350.50000000000006?t[3]>83.50000000000001?zt=-.05854904579626861:t[4]>5.500000000000001?zt=.02985784951394175:zt=-.03247600140149334:zt=-.11152899295304973:zt=-.00035424577714215764;let gr;t[32]>1e-35?t[17]>1e-35?t[8]>359.50000000000006?t[8]>804.5000000000001?gr=-.06563670567578264:gr=.067656954313663:gr=-.10388217548685377:t[8]>2302.5000000000005?gr=.07190621943790435:t[4]>67.50000000000001?gr=.060020507643618604:t[4]>38.50000000000001?gr=-.08707253184321638:t[2]>11.500000000000002?t[2]>16.500000000000004?t[1]>31.500000000000004?t[1]>59.50000000000001?gr=-.06568134366461277:t[8]>1075.5000000000002?gr=-.004768057709758692:gr=.11785959165999467:gr=-.05080221682879267:gr=.14814206127494542:gr=-.07241946332311736:t[253]>1e-35?gr=-.058893562861261274:t[4]>61.50000000000001?t[283]>1e-35?t[10]>23.500000000000004?gr=-.02471195342450034:gr=.11866056464409412:t[10]>44.50000000000001?t[1]>16.500000000000004?t[8]>2640.0000000000005?gr=-.10741850739482771:gr=.010051635824944:gr=.12502069436017124:t[8]>1971.5000000000002?t[1]>23.500000000000004?t[308]>1e-35?gr=.10511236013756364:t[10]>10.500000000000002?t[1]>53.50000000000001?gr=-.08992396138178163:gr=.010944365997007212:gr=.06221307021813793:gr=.1286024087559141:t[127]>1e-35?gr=.06568148624531012:t[10]>40.50000000000001?gr=-.07567979134643352:t[5]>5647.500000000001?gr=.07594672895572069:gr=-.018158016446439187:t[6]>55.50000000000001?gr=.009293422430111872:t[4]>45.50000000000001?gr=-.017749818406964022:t[2]>46.50000000000001?gr=.01714136511113982:gr=-724762291423549e-19;let xr;t[1]>24.500000000000004?t[103]>1e-35?t[8]>48.50000000000001?t[17]>1e-35?xr=-.048689215588703864:t[9]>27.500000000000004?t[0]>3916.5000000000005?xr=.07084726276890757:xr=-.11232323677722932:xr=.04812773089510436:xr=.11757502216780046:t[5]>1464.5000000000002?t[5]>1505.5000000000002?t[167]>1e-35?xr=.07470606002425358:t[1]>53.50000000000001?t[132]>1e-35?xr=.0879462816013881:xr=-.002966662093626573:t[306]>1e-35?xr=-.04588085188342676:xr=.0031910005157084823:t[3]>10.500000000000002?t[10]>20.500000000000004?xr=-.006600332774461143:xr=.1272481351557754:xr=-.09030973597154808:t[284]>1e-35?t[1]>38.50000000000001?t[10]>2.5000000000000004?xr=.011884312066620044:xr=.11678751052403374:t[4]>8.500000000000002?xr=.03627129613273813:xr=-.12132783497902287:xr=-.006784372643244717:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?xr=-.06830131718398992:t[0]>5147.500000000001?xr=.062360406249609306:t[4]>4.500000000000001?xr=-.013162203864592055:xr=-.07153029184927609:xr=.07628618062271557:xr=-.12085065687320373:t[190]>1e-35?xr=-.045816889524231186:t[137]>1e-35?xr=-.07956001795911584:t[199]>1e-35?t[0]>3853.5000000000005?xr=.025895337822752502:xr=-.06503949350616421:t[10]>227.50000000000003?xr=-.09989456525790491:t[10]>130.50000000000003?xr=.08616651057030683:xr=.0001234981796706021;let wr;t[8]>1014.5000000000001?t[9]>137.50000000000003?wr=-.08778879924617534:t[8]>1022.5000000000001?t[285]>1e-35?t[9]>64.50000000000001?wr=.04955806187281689:t[0]>3670.5000000000005?t[10]>32.50000000000001?wr=-.141732381961068:wr=-.0317152307496497:wr=-.02074638849097191:t[0]>93.50000000000001?t[0]>3072.5000000000005?t[10]>100.50000000000001?t[4]>24.500000000000004?t[8]>1336.5000000000002?wr=.12191801556691254:wr=-.0003444689085397977:wr=.005739668504631604:t[146]>1e-35?t[308]>1e-35?wr=.015237524791728777:t[6]>61.50000000000001?t[4]>63.50000000000001?wr=-.05676033995381961:wr=.10933961076803381:t[4]>26.500000000000004?wr=-.11667582544549814:t[8]>1765.5000000000002?wr=.032174455312047705:wr=-.0755016390126608:t[293]>1e-35?wr=-.08234885407658332:t[9]>41.50000000000001?t[0]>3830.5000000000005?wr=.026571311956824436:t[15]>1e-35?wr=.06175459479851121:wr=-.018778084411148754:t[9]>40.50000000000001?wr=-.09420232889965811:wr=-.004578248021263184:t[2]>1.5000000000000002?wr=.005453714644971445:wr=-.03907138175699279:wr=-.055296364182154736:t[23]>1e-35?wr=.036555134842143476:t[0]>4188.500000000001?t[6]>29.500000000000004?wr=-.09358146510580179:wr=.060524657996178094:wr=-.11245101144669545:t[125]>1e-35?t[9]>1.5000000000000002?wr=-.12698331085931538:wr=.006059605604079918:t[2]>196.50000000000003?wr=-.09451315810804783:wr=.0011390147031687425;let Ut;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[8]>3794.5000000000005?Ut=.05517359070460923:Ut=-.04758751221404857:Ut=-.09482078194138792:t[8]>2992.5000000000005?t[1]>101.50000000000001?Ut=.1040436595565776:t[9]>21.500000000000004?Ut=.04032250517675179:t[107]>1e-35?Ut=.05978752253058374:t[210]>1e-35?t[4]>37.50000000000001?Ut=.1192453009230486:t[1]>51.50000000000001?Ut=.0443376336292195:Ut=-.07967674833321865:t[5]>2117.5000000000005?t[9]>10.500000000000002?Ut=-.10025078607591283:t[0]>2882.5000000000005?t[18]>1e-35?Ut=-.08999822408398037:Ut=.017533219253893447:t[9]>1.5000000000000002?t[4]>12.500000000000002?Ut=-.061850439226075:Ut=.08849196353361093:Ut=.10536348167793089:t[92]>1e-35?Ut=.04894947712119185:t[9]>16.500000000000004?Ut=.05900227903883853:t[9]>5.500000000000001?Ut=-.11946594348916476:Ut=-.03652096348071964:t[1]>41.50000000000001?Ut=-.07411603110840567:Ut=-.00021033247574340914:t[10]>22.500000000000004?t[9]>68.50000000000001?Ut=.08493634342741495:t[11]>1e-35?Ut=-.10899097825564363:Ut=-.006156708838964173:t[8]>3198.5000000000005?t[2]>41.50000000000001?Ut=.08356655906359918:t[7]>25.500000000000004?Ut=-.09475076526194888:t[10]>5.500000000000001?Ut=-.01999406228763778:Ut=.06696212545889428:t[6]>20.500000000000004?Ut=.14713592661393468:Ut=.0459917279002218:Ut=.00027445928493734093;let sr;t[223]>1e-35?t[1]>31.500000000000004?t[8]>634.5000000000001?sr=-.06904501553217077:sr=.05696231672035904:sr=-.1124703178077813:t[99]>1e-35?t[1]>89.50000000000001?sr=-.05074261170009721:t[1]>57.50000000000001?t[8]>969.5000000000001?sr=-.011419256378538392:t[0]>3830.5000000000005?sr=.140315841503076:sr=.02403434913963024:t[1]>31.500000000000004?t[8]>65.50000000000001?t[2]>10.500000000000002?sr=-.04027822909411164:sr=.03176085103667189:sr=.06779515865838849:t[4]>15.500000000000002?sr=.0762878389015175:t[8]>175.50000000000003?t[0]>3030.5000000000005?t[8]>1041.5000000000002?sr=.06124039747298539:sr=-.04312732764434027:sr=.09161522761808062:sr=-.09663512235460074:t[280]>1e-35?t[6]>45.50000000000001?t[1]>46.50000000000001?sr=.11211681010488772:t[13]>1e-35?sr=.06725735814960367:sr=-.046744031455827846:t[10]>44.50000000000001?t[0]>3400.5000000000005?t[0]>4004.5000000000005?t[2]>22.500000000000004?sr=.11743605068905603:sr=-.011309033539148687:sr=-.07896094707523052:sr=.12862714793172117:t[10]>1.5000000000000002?t[8]>455.50000000000006?t[0]>4706.500000000001?sr=-.09218756798869711:t[10]>19.500000000000004?t[0]>1894.5000000000002?t[0]>3719.5000000000005?sr=.02836295848998302:sr=.12210680366745175:sr=-.058302317470509096:t[5]>4144.500000000001?sr=.06123341960495106:sr=-.03840046906926525:sr=-.05221474543453495:sr=.03988215485860711:sr=-.00033074684693083496;let Hp=L$o(e+r+n+o+s+c+l+u+d+p+h+m+g+A+y+E+_+v+b+I+x+R+w+P+k+Q+M+D+G+O+N+F+U+L+H+$+W+j+ce+J+Te+fe+De+Ve+Ue+Ke+X+le+te+xe+Z+ae+Ne+Y+ee+Ee+Ae+ve+We+Ze+vt+Nt+Gt+Qt+ue+Be+et+ut+ye+Le+$e+rt+ot+ft+z+se+Ce+we+je+Ye+gt+xt+Bt+Ct+Ie+K+pe+me+ne+V+Re+ze+Mt+rr+zt+gr+xr+wr+Ut+sr);return[1-Hp,Hp]}a(gvn,"multilineModelPredict");function L$o(t){if(t<0){let e=Math.exp(t);return e/(1+e)}return 1/(1+Math.exp(-t))}a(L$o,"sigmoid");var F$o={javascript:["//"],typescript:["//"],typescriptreact:["//"],javascriptreact:["//"],vue:["//","-->"],php:["//","#"],dart:["//"],go:["//"],cpp:["//"],scss:["//"],csharp:["//"],java:["//"],c:["//"],rust:["//"],python:["#"],markdown:["#","-->"],css:["*/"]},Avn={javascript:1,javascriptreact:2,typescript:3,typescriptreact:4,python:5,go:6,ruby:7};function yvn(t,e,r,n=!0){let o=t.split(` -`);if(n&&(o=o.filter(l=>l.trim().length>0)),Math.abs(e)>o.length||e>=o.length)return!1;e<0&&(e=o.length+e);let s=o[e];return(F$o[r]??[]).some(l=>s.includes(l))}a(yvn,"hasComment");var qYe=class{static{a(this,"PromptFeatures")}constructor(e,r){let[n,o]=this.firstAndLast(e),s=this.firstAndLast(e.trimEnd());this.language=r,this.length=e.length,this.firstLineLength=n.length,this.lastLineLength=o.length,this.lastLineRstripLength=o.trimEnd().length,this.lastLineStripLength=o.trim().length,this.rstripLength=e.trimEnd().length,this.stripLength=e.trim().length,this.rstripLastLineLength=s[1].length,this.rstripLastLineStripLength=s[1].trim().length,this.secondToLastLineHasComment=yvn(e,-2,r),this.rstripSecondToLastLineHasComment=yvn(e.trimEnd(),-2,r),this.prefixEndsWithNewline=e.endsWith(` +`)}`}a(Lin,"createErrorMessage");f();f();f();f();var yvo=new Se("BackgroundAgent.Attachments");function Fin(t,e){let r=[];for(let n of t){let o=Evo(n);o?r.push(o):yvo.debug(e,`Skipping unsupported reference type for SDK attachment: ${n.type}`)}return r}a(Fin,"convertReferencesToAttachments");function Evo(t){switch(t.type){case"file":{let e=bl(t.uri).fsPath;return t.selection?{type:"selection",filePath:e,displayName:e,text:"",selection:{start:{line:t.selection.start.line,character:t.selection.start.character},end:{line:t.selection.end.line,character:t.selection.end.character}}}:{type:"file",path:e,displayName:e}}case"directory":{let e=bl(t.uri).fsPath;return{type:"directory",path:e,displayName:e}}default:return null}}a(Evo,"convertReferenceToAttachment");f();var Uin=new Se("BackgroundAgent.CustomAgents");async function Qin(t,e){try{let n=await t.get(F1).listCustomAgents(e);return n.length>0&&Uin.info(t,`Loaded ${n.length} custom agent(s) for session`),n.map(o=>_vo(o))}catch(r){return Uin.warn(t,"Failed to load custom agents:",r),[]}}a(Qin,"loadCustomAgents");function _vo(t){let e=t.instruction??"";return{name:t.name,displayName:t.name,description:t.description??"",tools:t.tools??null,prompt:a(()=>Promise.resolve(e),"prompt"),disableModelInvocation:!1,model:t.model}}a(_vo,"toSweCustomAgent");f();function qin(t,e){switch(e.type){case"permission":t.respondToPermission(e.requestId,e.result);break;case"user_input":t.respondToUserInput(e.requestId,e.response);break;case"elicitation":t.respondToElicitation(e.requestId,e.response);break;case"exit_plan_mode":t.respondToExitPlanMode(e.requestId,e.response);break;case"queued_command":t.respondToQueuedCommand(e.requestId,e.result);break;case"external_tool":t.respondToExternalTool(e.requestId,e.result);break;default:throw new Error(`Unknown interaction type: ${e.type}`)}return{success:!0}}a(qin,"routeInteraction");f();f();var Fhn=de(require("crypto")),Uhn=de(require("fs")),YVe=de(Bhn()),Qhn=require("tls"),qhn=de(Lhn());var Yoe=new Se("certificates"),Od=class{static{a(this,"RootCertificateReader")}};function KVe(t,e=process.platform){return new sUt(t,[new aUt,new cUt,EBo(t,e)])}a(KVe,"getRootCertificateReader");function EBo(t,e){switch(e){case"linux":return new lUt(t);case"darwin":return new uUt(t);case"win32":return new dUt(t);default:return new fUt}}a(EBo,"createPlatformReader");var oUt=class extends Od{constructor(r,n){super();this.ctx=r;this.delegate=n}static{a(this,"ErrorHandlingCertificateReader")}async getAllRootCAs(){try{return await this.delegate.getAllRootCAs()}catch(r){return Yoe.warn(this.ctx,"Failed to read root certificates:",r),[]}}},sUt=class extends Od{constructor(r,n){super();this.ctx=r;this.delegates=n.map(o=>new oUt(r,o))}static{a(this,"CachingRootCertificateReader")}async getAllRootCAs(){return this.certificates||(this.certificates=this.removeExpiredCertificates((await Promise.all(this.delegates.map(r=>r.getAllRootCAs()))).flat())),this.certificates}removeExpiredCertificates(r){let n=Date.now(),o=r.filter(s=>{try{let c=new Fhn.X509Certificate(s),l=Date.parse(c.validTo);return isNaN(l)||l>n}catch(c){return Yoe.warn(this.ctx,"Failed to parse certificate",s,c),!1}});return r.length!==o.length&&Yoe.info(this.ctx,`Removed ${r.length-o.length} expired certificates`),o}},aUt=class extends Od{static{a(this,"NodeTlsRootCertificateReader")}getAllRootCAs(){return Qhn.rootCertificates}},cUt=class extends Od{static{a(this,"EnvironmentVariableRootCertificateReader")}async getAllRootCAs(){let e=process.env.NODE_EXTRA_CA_CERTS;return e?await Ghn(e):[]}},lUt=class extends Od{constructor(r){super();this.ctx=r}static{a(this,"LinuxRootCertificateReader")}async getAllRootCAs(){let r=[];for(let n of["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt"]){let o=await Ghn(n);Yoe.debug(this.ctx,`Read ${o.length} certificates from ${n}`),r=r.concat(o)}return r}},uUt=class extends Od{constructor(r){super();this.ctx=r}static{a(this,"MacRootCertificateReader")}getAllRootCAs(){let r=YVe.get({excludeBundled:!1,format:YVe.Format.pem});return Yoe.debug(this.ctx,`Read ${r.length} certificates from Mac keychain`),r}},dUt=class extends Od{constructor(r){super();this.ctx=r}static{a(this,"WindowsRootCertificateReader")}getAllRootCAs(){let r=qhn.all();return Yoe.debug(this.ctx,`Read ${r.length} certificates from Windows store`),r}},fUt=class extends Od{static{a(this,"UnsupportedPlatformRootCertificateReader")}getAllRootCAs(){return Promise.reject(new Error("No certificate reader available for unsupported platform"))}};async function Ghn(t){let e;try{e=await Uhn.promises.readFile(t,{encoding:"utf8"})}catch{return[]}let r=e.match(/-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g);if(!r)return[];let n=r.filter(s=>s.length>0),o=new Set(n);return Array.from(o)}a(Ghn,"readCertsFromFile");var O9=de(lbn());var QHt=new Se("BackgroundAgent.ProxyEnv"),qHt=new Map,GHt=new Set,qve;function HHt(){for(let t of GHt){let e=qHt.get(t);e===void 0?delete process.env[t]:process.env[t]=e}GHt.clear(),qve&&((0,O9.setGlobalDispatcher)(qve),qve=void 0)}a(HHt,"restoreProxyEnvironment");function UHt(t,e,r){process.env[t]||process.env[e]||(qHt.has(t)||qHt.set(t,process.env[t]),process.env[t]=r,GHt.add(t))}a(UHt,"setEnvIfAbsent");function NWo(t,e){if(!e)return t;try{let r=new URL(t),n=e.indexOf(":"),o=n===-1?e:e.slice(0,n),s=n===-1?"":e.slice(n+1);return o&&(r.username=encodeURIComponent(o),s&&(r.password=encodeURIComponent(s))),r.toString()}catch{return t}}a(NWo,"buildProxyUrl");async function MWo(t,e){if(e===!1){let r={rejectUnauthorized:!1};return{requestTls:r,proxyTls:r}}try{let r=await t.get(Od).getAllRootCAs();if(r.length>0){let n={ca:r};return{requestTls:n,proxyTls:n}}}catch{QHt.warn(t,"Failed to load system CA certificates for SDK proxy dispatcher")}return{}}a(MWo,"buildTlsOptions");async function jHt(t){try{HHt();let e=t.get(Mc).getHttpSettings();if(!e.proxy)return;let r=NWo(e.proxy,e.proxyAuthorization);UHt("HTTPS_PROXY","https_proxy",r),UHt("HTTP_PROXY","http_proxy",r);let n=e.noProxy?.length?e.noProxy.join(","):void 0;n&&UHt("NO_PROXY","no_proxy",n),qve||(qve=(0,O9.getGlobalDispatcher)());let o=await MWo(t,e.proxyStrictSSL);(0,O9.setGlobalDispatcher)(new O9.EnvHttpProxyAgent({allowH2:!0,httpProxy:r,httpsProxy:r,noProxy:n,...o})),QHt.info(t,"Applied proxy settings to environment for SDK",{hasProxy:!0,hasAuth:!!e.proxyAuthorization,hasNoProxy:!!n,proxyStrictSSL:e.proxyStrictSSL!==!1,hasTlsCa:!!o.requestTls,dispatcherType:(0,O9.getGlobalDispatcher)().constructor.name})}catch(e){QHt.warn(t,"Failed to apply proxy settings to environment:",e)}}a(jHt,"applyProxyToEnvironment");var ubn=require("node:module");var _p=new Se("BackgroundAgent"),OWo=20,Gve="backgroundAgent";async function BWo(){return"pkg"in process?(0,ubn.createRequire)(__filename)("./node_modules/@github/copilot/sdk/index.cjs"):import("@github/copilot/sdk")}a(BWo,"importSdk");var xu=class{constructor(e){this.ctx=e;this.activeSessions=new Map;this.processedEventIds=new Map;this.notificationSender=e.get(dc),e.get(Mc).onDidChangeHttpSettings(()=>{jHt(this.ctx)}),e.get(Nt).onDidResetToken(()=>{_p.info(this.ctx,"GitHub token changed, clearing cached sessions"),this.activeSessions.clear()})}static{a(this,"BackgroundAgentService")}async ensureManager(){if(this.manager)return this.manager;this.managerInitPromise||(this.managerInitPromise=this.initManager());try{await this.managerInitPromise}catch(e){throw this.managerInitPromise=void 0,e}if(!this.manager)throw new Error("LocalSessionManager initialization succeeded but manager is undefined");return this.manager}async initManager(){_p.info(this.ctx,"Initializing LocalSessionManager (in-process SDK)..."),await jHt(this.ctx);let e=performance.now();try{this.sdk=await BWo(),rr(this.ctx,"backgroundAgent.importSdk",{status_text:"success"},{duration_ms:performance.now()-e})}catch(r){throw Sa(this.ctx,"backgroundAgent.importSdk",r,{status_text:"failure"},{duration_ms:performance.now()-e}),r}this.manager=new this.sdk.internal.LocalSessionManager({telemetryService:new this.sdk.internal.NoopTelemetryService,telemetryBinder:void 0}),_p.info(this.ctx,"LocalSessionManager initialized.")}cacheSession(e,r){if(this.activeSessions.has(e)&&this.activeSessions.delete(e),this.activeSessions.set(e,r),this.activeSessions.size>OWo){let n=this.activeSessions.keys().next().value;n!==void 0&&(_p.debug(this.ctx,`Evicting oldest cached session: ${n}`),this.activeSessions.delete(n))}}async handleInteraction(e){let r=performance.now(),n=await this.getOrResumeSession(e.sessionId),o=qin(n,e);return rr(this.ctx,"backgroundAgent.interaction",{requestSource:Gve,sessionId:e.sessionId,requestId:e.requestId,interactionType:e.type,resultKind:e.type==="permission"?e.result.kind:""},{totalTimeMs:performance.now()-r}),o}async buildAuthInfo(){let r=await this.ctx.get(en).getSession();if(!r)throw new Error("Not authenticated. Please sign in first.");let n=r.serverUrl.replace(/\/+$/,"")||"https://github.com";return{type:"token",token:r.accessToken,host:n}}async buildSessionOptions(e,r){let n=await this.buildAuthInfo(),o={clientName:this.ctx.get(Dr).getEditorPluginInfo().name,sessionId:e,authInfo:n,model:r.model,reasoningEffort:r.reasoningEffort,enableStreaming:r.enableStreaming??!0,availableTools:r.availableTools,excludedTools:r.excludedTools,skillDirectories:r.skillDirectories,disabledSkills:r.disabledSkills?new Set(r.disabledSkills):void 0,systemMessage:r.systemMessage?{mode:"append",content:r.systemMessage}:void 0};if(r.workspaceFolders?.[0]?.uri&&(o.workingDirectory=bl(r.workspaceFolders[0].uri).fsPath),r.workspaceFolders?.length){let s=await Qin(this.ctx,r.workspaceFolders);s.length>0&&(o.customAgents=s)}return o}async createSession(e){let r=performance.now();_p.info(this.ctx,"createSession called:",{model:e.model,workspaceFolders:e.workspaceFolders,hasSystemMessage:!!e.systemMessage,availableTools:e.availableTools});let n=await this.ensureManager(),o=yr(),s=await this.buildSessionOptions(o,e),c=await n.createSession(s);return _p.info(this.ctx,"Session created:",o),rr(this.ctx,"backgroundAgent.create",{requestSource:Gve,modelId:e.model??"",reasoningEffort:e.reasoningEffort??"",sessionId:o},{totalTimeMs:performance.now()-r,workspaceFolderCount:e.workspaceFolders?.length??0,availableToolCount:e.availableTools?.length??0}),this.cacheSession(o,c),{sessionId:o,workspacePath:c.workspacePath}}async getOrResumeSession(e,r){let n=this.activeSessions.get(e);if(n)return n;let o=await this.ensureManager(),s=await this.buildAuthInfo(),c={sessionId:e,authInfo:s,model:r?.model,reasoningEffort:r?.reasoningEffort},l=await o.getSession(c,!0);if(!l)throw new Error(`Session not found: ${e}`);return this.cacheSession(e,l),l}async sendMessage(e,r){let n=performance.now(),o=await this.getOrResumeSession(e.sessionId);if(e.model)try{await o.setSelectedModel(e.model)}catch(A){_p.warn(this.ctx,`Failed to set model ${e.model} for session ${e.sessionId}:`,A)}this.processedEventIds.set(e.sessionId,new Set);let s=a(()=>{},"noop"),c=o.on("user_input.requested",s),l=o.on("permission.requested",s),u=o.on("*",A=>{this.handleSessionEvent(e.sessionId,A)}),d=a(()=>{m?.dispose(),c(),l(),u(),p(),h(),this.processedEventIds.delete(e.sessionId)},"cleanup"),p=o.on("session.idle",()=>{d()}),h=o.on("session.error",()=>{d()}),m;r&&(m=r.onCancellationRequested(()=>{_p.info(this.ctx,"Cancellation requested, aborting session:",e.sessionId),o.abort()}));let g={prompt:e.message};if(e.references?.length){let A=Fin(e.references,this.ctx);A.length>0&&(g.attachments=A)}return rr(this.ctx,"backgroundAgent.send",{requestSource:Gve,sessionId:e.sessionId,modelId:e.model??"",hasReferences:String(!!e.references?.length)},{totalTimeMs:performance.now()-n,messageCharLen:e.message.length,referenceCount:e.references?.length??0}),o.send(g).catch(A=>{d();let y={type:"session.error",id:yr(),timestamp:new Date().toISOString(),parentId:null,data:{errorType:"SendMessageError",message:A instanceof Error?A.message:String(A)}};this.sendSessionUpdateNotification(e.sessionId,y)}),{}}async destroySession(e){try{return this.activeSessions.delete(e.sessionId),await(await this.ensureManager()).deleteSession(e.sessionId),{success:!0}}catch(r){return _p.error(this.ctx,`Failed to destroy session ${e.sessionId}:`,r),{success:!1}}}async stopSession(e){let r=performance.now(),n=await this.getOrResumeSession(e);_p.info(this.ctx,"Stopping session via abort:",e),await n.abort(),rr(this.ctx,"backgroundAgent.stop",{requestSource:Gve,sessionId:e},{totalTimeMs:performance.now()-r})}async resumeSession(e){let r=performance.now();_p.info(this.ctx,"resumeSession called:",e.sessionId);let n=await this.getOrResumeSession(e.sessionId,{model:e.model,reasoningEffort:e.reasoningEffort,streaming:e.streaming}),o=Array.from(n.getEvents());return rr(this.ctx,"backgroundAgent.resume",{requestSource:Gve,sessionId:e.sessionId,modelId:e.model??"",streaming:String(e.streaming??!0)},{totalTimeMs:performance.now()-r,eventCount:o.length}),{sessionId:e.sessionId,workspacePath:n.workspacePath,events:o}}async listSessions(e){let n=await(await this.ensureManager()).listSessions(),o=n;return e&&(o=n.filter(s=>!(e.cwd&&s.context?.cwd!==e.cwd||e.gitRoot&&s.context?.gitRoot!==e.gitRoot||e.repository&&s.context?.repository!==e.repository||e.branch&&s.context?.branch!==e.branch))),{sessions:o.map(s=>({sessionId:s.sessionId,startTime:s.startTime instanceof Date?s.startTime.toISOString():String(s.startTime),modifiedTime:s.modifiedTime instanceof Date?s.modifiedTime.toISOString():String(s.modifiedTime),summary:s.summary,isRemote:s.isRemote,context:s.context}))}}async listModels(e){_p.info(this.ctx,"listModels called",{forceRefresh:e}),await this.ensureManager();let r=await this.buildAuthInfo();_p.info(this.ctx,"listModels proxy diagnostics",{HTTPS_PROXY:process.env.HTTPS_PROXY?"(set)":"(not set)",HTTP_PROXY:process.env.HTTP_PROXY?"(set)":"(not set)",NO_PROXY:process.env.NO_PROXY??"(not set)",NODE_TLS_REJECT_UNAUTHORIZED:process.env.NODE_TLS_REJECT_UNAUTHORIZED??"(not set)",NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS??"(not set)"});try{let n=await this.sdk.getAvailableModels(r);return n.length===0?_p.warn(this.ctx,"No models available. Check authentication and Copilot subscription status."):_p.info(this.ctx,`Successfully retrieved ${n.length} models`),_p.debug(this.ctx,"Models retrieved:",n.map(o=>o.id)),{models:n}}catch(n){let o=n instanceof Error?n.message:String(n);throw _p.error(this.ctx,"getAvailableModels failed",{error:o,stack:n instanceof Error?n.stack:void 0}),new Error(`Failed to retrieve models: ${o}`)}}async handleSessionEvent(e,r){let n=r.id,o=this.processedEventIds.get(e);if(o?.has(n)){_p.debug(this.ctx,`Skipping duplicate SDK event: ${r.type} (id=${n})`);return}o?.add(n),await this.sendSessionUpdateNotification(e,r)}async sendSessionUpdateNotification(e,r){try{await this.notificationSender.sendBackgroundAgentSessionUpdate(e,r)}catch(n){_p.error(this.ctx,"Failed to send session update notification:",n)}}async shutdown(){this.activeSessions.clear(),this.processedEventIds.clear(),HHt(),this.manager&&(await this.manager.dispose(),this.manager=void 0),this.sdk=void 0,this.managerInitPromise=void 0}};f();var $Ht=new $r;function dbn(t){return[...t].sort((e,r)=>{let n=$Ht.get(e.uri)??0;return($Ht.get(r.uri)??0)-n})}a(dbn,"sortByAccessTimes");var fbn=a(t=>t.get(zr).onDidFocusTextDocument(e=>{e.document&&$Ht.set(e.document.uri.toString(),Date.now())}),"registerDocumentTracker");f();f();f();var pbn=de(require("events"));var Wze="CompletionRequested",b5=class{constructor(e){this.ctx=e}static{a(this,"CompletionNotifier")}#e=new pbn.default;notifyRequest(e,r,n,o,s){return this.#e.emit(Wze,{completionId:r,completionState:e,telemetryData:n,cancellationToken:o,options:s})}onRequest(e){let r=Up(this.ctx,e,`event.${Wze}`);return this.#e.on(Wze,r),Cn.Disposable.create(()=>this.#e.off(Wze,r))}};f();f();var VHt=class{constructor(){this.observers=new Set}static{a(this,"Subject")}subscribe(e){return this.observers.add(e),()=>this.observers.delete(e)}next(e){for(let r of this.observers)r.next(e)}error(e){for(let r of this.observers)r.error?.(e)}complete(){for(let e of this.observers)e.complete?.()}},zze=class extends VHt{static{a(this,"ReplaySubject")}subscribe(e){let r=super.subscribe(e);return this._value!==void 0&&e.next(this._value),r}next(e){this._value=e,super.next(e)}};var P_=class{constructor(e){this.ctx=e;this.#e=new Se("AsyncCompletionManager");this.requests=new $r(100);this.mostRecentRequestId=""}static{a(this,"AsyncCompletionManager")}#e;clear(){this.requests.clear()}shouldWaitForAsyncCompletions(e,r){for(let[n,o]of this.requests)if(WHt(e,r,o))return!0;return!1}updateCompletion(e,r){let n=this.requests.get(e);n!==void 0&&(n.partialCompletionText=r,n.subject.next(n))}queueCompletionRequest(e,r,n,o,s){this.#e.debug(this.ctx,`[${e}] Queueing async completion request:`,r.substring(r.lastIndexOf(` +`)+1));let c=new zze;return this.requests.set(e,{state:2,cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c}),s.then(l=>{if(this.requests.delete(e),l.type!=="success"){this.#e.debug(this.ctx,`[${e}] Request failed with`,l.reason),c.error(l.reason);return}let u={cancellationTokenSource:o,headerRequestId:e,prefix:r,prompt:n,subject:c,choice:l.value[0],result:l,state:0,allChoicesPromise:l.value[1]};this.requests.set(e,u),c.next(u),c.complete()}).catch(l=>{this.#e.error(this.ctx,`[${e}] Request errored with`,l),this.requests.delete(e),c.error(l)})}getFirstMatchingRequestWithTimeout(e,r,n,o,s){let c=this.ctx.get(Gt).asyncCompletionsTimeout(s);return c<0?(this.#e.debug(this.ctx,`[${e}] Waiting for completions without timeout`),this.getFirstMatchingRequest(e,r,n,o)):(this.#e.debug(this.ctx,`[${e}] Waiting for completions with timeout of ${c}ms`),Promise.race([this.getFirstMatchingRequest(e,r,n,o),new Promise(l=>setTimeout(()=>l(null),c))]).then(l=>{if(l===null){this.#e.debug(this.ctx,`[${e}] Timed out waiting for completion`);return}return l}))}async getFirstMatchingRequest(e,r,n,o){o||(this.mostRecentRequestId=e);let s=!1,c=new wE,l=new Map,u=a(p=>()=>{let h=l.get(p);h!==void 0&&(h(),l.delete(p),!s&&l.size===0&&(s=!0,this.#e.debug(this.ctx,`[${e}] No matching completions found`),c.resolve(void 0)))},"finishRequest"),d=a(p=>{if(WHt(r,n,p)){if(p.state===0){let h=r.substring(p.prefix.length),{completionText:m}=p.choice;if(!m.startsWith(h)||m.length<=h.length){u(p.headerRequestId)();return}m=m.substring(h.length),p.choice.telemetryData.measurements.foundOffset=h.length,this.#e.debug(this.ctx,`[${e}] Found completion at offset ${h.length}: ${JSON.stringify(m)}`),c.resolve([{...p.choice,completionText:m},p.allChoicesPromise]),s=!0}}else this.cancelRequest(e,p),u(p.headerRequestId)()},"next");for(let[p,h]of this.requests)WHt(r,n,h)?l.set(p,h.subject.subscribe({next:d,error:u(p),complete:u(p)})):this.cancelRequest(e,h);return c.promise.finally(()=>{for(let p of l.values())p()})}cancelRequest(e,r){e===this.mostRecentRequestId&&r.state!==0&&(this.#e.debug(this.ctx,`[${e}] Cancelling request: ${r.headerRequestId}`),r.cancellationTokenSource.cancel(),this.requests.delete(r.headerRequestId))}};function WHt(t,e,r){if(r.prompt.suffix!==e.suffix||!t.startsWith(r.prefix))return!1;let n=t.substring(r.prefix.length);return r.state===0?r.choice.completionText.startsWith(n)&&r.choice.completionText.trimEnd().length>n.length:r.partialCompletionText===void 0?!0:r.partialCompletionText.startsWith(n)}a(WHt,"isCandidate");f();f();var jve=class{constructor(e){this.maxSize=e;this.root=new Hve;this.leafNodes=new Set}static{a(this,"LRURadixTrie")}set(e,r){let{node:n,remainingKey:o}=this.findClosestNode(e);if(o.length>0){for(let[s,c]of n.children)if(s.startsWith(o)){let l=s.slice(0,o.length),u=new Hve;n.removeChild(s),n.addChild(l,u),u.addChild(s.slice(l.length),c),n=u,o=o.slice(l.length);break}if(o.length>0){let s=new Hve;n.addChild(o,s),n=s}}n.value=r,this.leafNodes.add(n),this.leafNodes.size>this.maxSize&&this.evictLeastRecentlyUsed()}findAll(e){return this.findClosestNode(e).stack.map(({node:r,remainingKey:n})=>r.value!==void 0?{remainingKey:n,value:r.value}:void 0).filter(r=>r!==void 0)}delete(e){let{node:r,remainingKey:n}=this.findClosestNode(e);n.length>0||this.deleteNode(r)}findClosestNode(e){let r=!0,n=this.root,o=[{node:n,remainingKey:e}];for(;e.length>0&&r;){r=!1;for(let[s,c]of n.children)if(e.startsWith(s)){e=e.slice(s.length),o.unshift({node:c,remainingKey:e}),n=c,r=!0;break}}return{node:n,remainingKey:e,stack:o}}deleteNode(e){if(e.value=void 0,this.leafNodes.delete(e),e.parent===void 0||e.childCount>1)return;let{node:r,edge:n}=e.parent;if(e.childCount===1){let[s,c]=Array.from(e.children)[0];e.removeChild(s),r.removeChild(n),r.addChild(n+s,c);return}if(r.removeChild(n),r.parent===void 0)return;let o=r.parent;if(r.value===void 0&&r.childCount===1){let[s,c]=Array.from(r.children)[0],l=o.edge+s;r.removeChild(s),o.node.removeChild(o.edge),o.node.addChild(l,c)}}evictLeastRecentlyUsed(){let e=this.findLeastRecentlyUsed();e&&this.deleteNode(e)}findLeastRecentlyUsed(){let e;for(let r of this.leafNodes)(e===void 0||r.touchedo.content.filter(s=>s.suffix===r&&s.choice.completionText.startsWith(n)&&s.choice.completionText.length>n.length).map(s=>({...s.choice,completionText:s.choice.completionText.slice(n.length),telemetryData:s.choice.telemetryData.extendedBy({},{foundOffset:n.length})})))}append(e,r,n){let o=this.cache.findAll(e);if(o.length>0&&o[0].remainingKey===""){let s=o[0].value.content;this.cache.set(e,{content:[...s,{suffix:r,choice:n}]})}else this.cache.set(e,{content:[{suffix:r,choice:n}]})}clear(){this.cache=new jve(100)}};f();var k_=class{constructor(){this.choices=[]}static{a(this,"CurrentGhostText")}get clientCompletionId(){return this.choices[0]?.clientCompletionId}setGhostText(e,r,n,o){o!==2&&(this.prefix=e,this.suffix=r,this.choices=n)}getCompletionsForUserTyping(e,r){let n=this.getRemainingPrefix(e,r);if(n!==void 0&&hbn(this.choices[0].completionText,n))return LWo(this.choices,n)}hasAcceptedCurrentCompletion(e,r){let n=this.getRemainingPrefix(e,r);if(n===void 0)return!1;let o=n===this.choices?.[0].completionText,s=this.choices?.[0].finishReason;return o&&s==="stop"}getRemainingPrefix(e,r){if(!(this.prefix===void 0||this.suffix===void 0||this.choices.length===0)&&this.suffix===r&&e.startsWith(this.prefix))return e.substring(this.prefix.length)}};function LWo(t,e){return t.filter(r=>hbn(r.completionText,e)).map(r=>({...r,completionText:r.completionText.substring(e.length)}))}a(LWo,"adjustChoicesStart");function hbn(t,e){return t.startsWith(e)&&t.length>e.length}a(hbn,"startsWithAndExceeds");f();f();var mO={" ":1,"!":2,'"':3,"#":4,$:5,"%":6,"&":7,"'":8,"(":9,")":10,"*":11,"+":12,",":13,"-":14,".":15,"/":16,0:17,1:18,2:19,3:20,4:21,5:22,6:23,7:24,8:25,9:26,":":27,";":28,"<":29,"=":30,">":31,"?":32,"@":33,A:34,B:35,C:36,D:37,E:38,F:39,G:40,H:41,I:42,J:43,K:44,L:45,M:46,N:47,O:48,P:49,Q:50,R:51,S:52,T:53,U:54,V:55,W:56,X:57,Y:58,Z:59,"[":60,"\\":61,"]":62,"^":63,_:64,"`":65,a:66,b:67,c:68,d:69,e:70,f:71,g:72,h:73,i:74,j:75,k:76,l:77,m:78,n:79,o:80,p:81,q:82,r:83,s:84,t:85,u:86,v:87,w:88,x:89,y:90,z:91,"{":92,"|":93,"}":94,"~":95};f();function mbn(t){let e;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>427.50000000000006?t[9]>13.500000000000002?t[121]>1e-35?e=-.3793786744885956:t[149]>1e-35?e=-.34717430705356905:e=-.26126834451035963:e=-.2431318366096852:t[5]>888.5000000000001?e=-.20600463586387135:e=-.2568037008471491:t[308]>1e-35?e=-.2363064824497454:t[8]>370.50000000000006?e=-.37470755210284723:e=-.321978453730494:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?e=-.26259136509758885:e=-.3096719634039438:t[4]>30.500000000000004?t[9]>18.500000000000004?e=-.34254903852890883:t[2]>98.50000000000001?e=-.41585250791146294:e=-.3673574858887241:t[9]>6.500000000000001?e=-.31688079287876225:t[31]>1e-35?e=-.29110977864003823:t[308]>1e-35?e=-.3201411739040839:e=-.36874023066055506:t[8]>691.5000000000001?t[82]>1e-35?e=-.41318393149040566:t[133]>1e-35?e=-.3741272613525161:t[32]>1e-35?e=-.4112378041027121:t[227]>1e-35?e=-.37726615155719356:t[10]>3.5000000000000004?e=-.3164502293560397:e=-.2930071546509045:t[9]>13.500000000000002?e=-.277366858539218:t[308]>1e-35?t[4]>10.500000000000002?e=-.30975610686807187:t[4]>1.5000000000000002?e=-.2549142136728043:e=-.3271325650785176:t[127]>1e-35?t[0]>1937.5000000000002?e=-.2533046188098832:e=-.325520883579:e=-.331628896481776;let r;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?t[9]>13.500000000000002?r=.031231253521808708:r=.05380836288014532:t[5]>423.00000000000006?t[8]>114.50000000000001?r=.06751619128429062:r=.09625089153176467:r=.027268163053989804:t[308]>1e-35?r=.060174483556283756:r=-.049062854038919135:t[3]>24.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?r=-.03969241799174589:r=.01086816842550381:t[31]>1e-35?r=-.003284694817583201:t[9]>6.500000000000001?t[4]>30.500000000000004?r=-.04224490699947552:r=-.011834162944360616:t[308]>1e-35?t[32]>1e-35?r=-.13448447971850278:r=-.019569456707046823:t[19]>1e-35?t[9]>1.5000000000000002?r=-.07256260662659254:t[4]>60.50000000000001?r=-.08227503453609311:r=-.020596416747563847:r=-.07396549241564149:t[8]>691.5000000000001?t[82]>1e-35?r=-.10046536995362734:t[133]>1e-35?r=-.06407649822752297:t[225]>1e-35?r=.08035785003303324:t[92]>1e-35?r=.018901360933204676:t[20]>1e-35?r=.05252546973665552:t[8]>2592.5000000000005?r=-.040543705016462955:r=-.011236043818320725:t[9]>17.500000000000004?r=.025560632674895334:t[308]>1e-35?t[0]>1847.5000000000002?r=.03527165701669741:r=-.0071847350825815035:t[127]>1e-35?r=.024373016379595405:t[9]>2.5000000000000004?r=-.0035090719709448288:r=-.03514829488063766;let n;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?n=.03848674861536988:t[5]>423.00000000000006?t[8]>114.50000000000001?t[9]>56.50000000000001?n=-.003764520033319488:n=.06570817919969299:t[4]>61.50000000000001?n=.028346156293069538:n=.0908154644362606:n=.02445594243234816:t[308]>1e-35?t[8]>65.50000000000001?n=.0019305229020073053:n=.09279357295883772:n=-.04458984161917124:t[3]>24.500000000000004?t[23]>1e-35?n=.0027405390271277013:t[4]>29.500000000000004?t[52]>1e-35?n=.044727478132905285:t[115]>1e-35?n=.10245804828855934:t[9]>17.500000000000004?n=-.03353173647469207:t[2]>98.50000000000001?n=-.10048106638102179:n=-.05484231104348874:t[31]>1e-35?n=.016807537467116516:t[9]>6.500000000000001?n=-.012113620535295137:t[4]>8.500000000000002?t[308]>1e-35?n=-.01882594250504289:n=-.05585658862796076:n=.04279591277938338:t[8]>691.5000000000001?t[82]>1e-35?n=-.09262278043707878:t[133]>1e-35?n=-.058454257768893625:t[32]>1e-35?n=-.09769348447126434:t[25]>1e-35?n=-.0725430043727677:t[122]>1e-35?n=-.10047841601578077:n=-.00580671054458958:t[9]>13.500000000000002?n=.021399199032818294:t[308]>1e-35?t[4]>10.500000000000002?n=-.0076376731757173515:n=.03394923033036848:t[127]>1e-35?n=.02070489091204209:n=-.02290162726126496;let o;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?o=.010230295672324606:o=.038540509248742805:t[8]>125.50000000000001?t[1]>49.50000000000001?o=.03086356292895467:o=.057128750867458604:t[5]>888.5000000000001?o=.07861602941396924:o=.030523262699070908:t[308]>1e-35?o=.048236117667577356:t[8]>370.50000000000006?o=-.05642125069212264:o=-.007232836777168195:t[3]>24.500000000000004?t[23]>1e-35?t[131]>1e-35?o=.03640661467213915:o=-.005889820723907028:t[31]>1e-35?o=-.0009007166998276938:t[9]>6.500000000000001?o=-.022590340093882378:t[308]>1e-35?t[32]>1e-35?o=-.1215445089091064:o=-.01435612266219722:t[19]>1e-35?t[9]>1.5000000000000002?o=-.061555513040777825:t[4]>60.50000000000001?o=-.07053475504569347:o=-.013733369453963092:o=-.06302097189114152:t[227]>1e-35?o=-.05820440333190048:t[8]>683.5000000000001?t[82]>1e-35?o=-.08466979526809346:t[10]>24.500000000000004?o=-.017092159721119944:t[92]>1e-35?o=.03592901452463749:o=-.00359310519524756:t[5]>1809.5000000000002?t[243]>1e-35?o=-.03963116207386097:t[118]>1e-35?o=-.09483996283536394:t[217]>1e-35?o=-.03394542089519989:t[242]>1e-35?o=-.07985899422287938:o=.019706602160656964:t[9]>12.500000000000002?o=.014072998937735146:o=-.021156294523894684;let s;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[9]>21.500000000000004?s=.009197756540516563:s=.03458896869535166:t[5]>5082.500000000001?s=.08265545468131008:t[131]>1e-35?s=.0740738432473315:s=.045159136632942756:t[8]>319.50000000000006?s=-.04653401534465376:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?s=-.011400839766681709:s=.11149800187510031:s=-.08683250977599462:s=.08355310136724753:t[4]>23.500000000000004?t[23]>1e-35?t[131]>1e-35?s=.040389083779932555:s=-.009887614274108602:t[52]>1e-35?s=.03705353499757327:t[9]>6.500000000000001?s=-.025401260429257562:t[2]>98.50000000000001?s=-.09237673187534504:s=-.04298556869281803:t[222]>1e-35?s=-.045221965895986184:t[8]>691.5000000000001?t[133]>1e-35?s=-.05435318330148897:t[128]>1e-35?s=-.08672907303184191:t[227]>1e-35?s=-.05568304584186561:t[122]>1e-35?s=-.09623059693538563:t[225]>1e-35?s=.07558331642202279:t[82]>1e-35?s=-.07360566227233566:s=-.005646164647395919:t[242]>1e-35?s=-.08203758341228108:t[9]>13.500000000000002?s=.018726123829696042:t[308]>1e-35?t[4]>10.500000000000002?s=-.011153942154062704:s=.03132858912391067:t[127]>1e-35?s=.021455228822345174:t[23]>1e-35?s=.01959966745346997:s=-.021764790177579325;let c;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>284.50000000000006?t[121]>1e-35?t[18]>1e-35?c=.07547602514276922:c=-.08529678832140396:c=.030314822344598043:t[5]>888.5000000000001?t[4]>61.50000000000001?c=.011143589009415464:c=.0654700456802118:c=.021794712646632755:t[308]>1e-35?c=.04231872551095028:c=-.034381999950549455:t[4]>23.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?c=-.03678981254332261:c=.010518160384496255:t[8]>825.5000000000001?c=-.04506534842082387:t[9]>38.50000000000001?c=.01004983052203438:c=-.030580958620701027:t[39]>1e-35?c=-.12802435021505382:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>6.500000000000001?c=.030426957004611704:c=-.0726407693060581:c=.017395521646964375:t[4]>7.500000000000001?t[0]>93.50000000000001?t[9]>7.500000000000001?c=-.008024349629981291:t[31]>1e-35?c=.01296539930850471:t[308]>1e-35?c=-.012855016509024084:c=-.04564527976851505:c=-.15681420504058596:t[10]>4.500000000000001?t[243]>1e-35?c=-.1012064426380198:c=-.0062808850924854194:c=.030706323726162416:t[9]>13.500000000000002?c=.017081636133736405:t[308]>1e-35?t[4]>10.500000000000002?c=-.009306613091760644:t[4]>1.5000000000000002?c=.03655523200850989:c=-.02671654212893341:t[127]>1e-35?c=.019261510468604387:c=-.017627818570628936;let l;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>892.5000000000001?t[308]>1e-35?l=.036100405995889276:l=.011709313297015793:t[0]>119.50000000000001?t[8]>125.50000000000001?l=.03622542297472574:l=.05595579157301536:l=-.02234751038146796:t[8]>319.50000000000006?l=-.040132029478400735:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?l=-.009306153573847916:l=.10058509567064988:l=-.0785668890966017:t[9]>28.500000000000004?l=-.04781977604130416:l=.09753292614937459:t[4]>23.500000000000004?t[131]>1e-35?l=.02372493254975127:t[148]>1e-35?l=.028103095989516644:t[4]>58.50000000000001?t[10]>1e-35?l=-.05000852203469597:l=.02922366846119705:t[23]>1e-35?l=-.0026335076988151292:l=-.03073993752935585:t[222]>1e-35?l=-.03867374428185713:t[32]>1e-35?l=-.07220729365053084:t[39]>1e-35?l=-.11624524614351733:t[8]>691.5000000000001?t[133]>1e-35?l=-.04836360271198036:t[8]>4968.500000000001?l=-.10873681915578029:t[149]>1e-35?l=-.11847484033769298:t[122]>1e-35?l=-.08916172460307559:t[82]>1e-35?l=-.06774726602152634:l=-.0033469147714351327:t[126]>1e-35?l=-.09474445392080015:t[8]>131.50000000000003?t[118]>1e-35?l=-.09002547031023511:l=.015475385187009489:t[25]>1e-35?l=-.08175501232759151:l=-.000429679055394914;let u;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>546.5000000000001?u=.021942996005324917:u=.042349138084484074:t[308]>1e-35?u=.036507270845732874:u=-.028981850556764995:t[3]>24.500000000000004?t[23]>1e-35?u=.00210930790963475:t[31]>1e-35?u=.006825358293027163:t[9]>6.500000000000001?u=-.013772084269062394:t[308]>1e-35?u=-.008307929099892574:t[19]>1e-35?u=-.027706313312904487:u=-.04891108984170914:t[134]>1e-35?u=-.0605730733844732:t[25]>1e-35?u=-.05347926493253117:t[227]>1e-35?u=-.049415829249003666:t[32]>1e-35?u=-.06807799662179595:t[308]>1e-35?t[4]>10.500000000000002?t[2]>13.500000000000002?u=-.00016302718260794637:u=-.10247095758122947:t[210]>1e-35?u=-.022149002072787024:t[95]>1e-35?u=.15222631630626304:u=.027393884520465712:t[9]>7.500000000000001?t[225]>1e-35?u=.13483346577752245:t[3]>9.500000000000002?t[243]>1e-35?u=-.045352728133789516:t[8]>683.5000000000001?u=.00474372227519902:u=.02635476098707525:t[92]>1e-35?u=.05659380819933452:t[105]>1e-35?u=.07431443210341222:t[186]>1e-35?u=.0915821133384904:u=-.016414750130401053:t[127]>1e-35?u=.011824693641866162:t[23]>1e-35?u=.0228468674288774:t[284]>1e-35?u=.06606936863302432:u=-.02872463273902358;let d;t[13]>1e-35?t[3]>1.5000000000000002?t[8]>125.50000000000001?t[288]>1e-35?d=-.019844363904157558:t[1]>50.50000000000001?t[131]>1e-35?d=.044961338592245194:d=.003659599513761676:t[121]>1e-35?d=-.04057103630479994:d=.03158560697078578:t[0]>421.50000000000006?t[4]>61.50000000000001?d=-.0003708603406529278:d=.05331312264472391:d=.0006575958601218936:t[8]>319.50000000000006?d=-.034654694051901545:t[7]>3.5000000000000004?t[0]>1230.5000000000002?t[0]>2579.5000000000005?d=-.0076053515916517005:d=.09116695486305336:d=-.07137458699162028:d=.06633130654035282:t[4]>29.500000000000004?t[23]>1e-35?t[4]>63.50000000000001?d=-.0308520802187302:d=.013156423968295541:t[115]>1e-35?d=.11581171687488252:t[52]>1e-35?t[10]>22.500000000000004?d=.12264179915175587:d=-.021905727233873535:t[8]>799.5000000000001?d=-.04181869575935412:d=-.023695901673350575:t[222]>1e-35?d=-.034612899265371776:t[8]>691.5000000000001?t[9]>98.50000000000001?d=-.06892116536821917:t[149]>1e-35?d=-.11194586444154514:t[133]>1e-35?d=-.04269583234000504:t[128]>1e-35?d=-.0644631966969502:t[8]>4968.500000000001?d=-.09650726096330133:d=-.004219129180139438:t[126]>1e-35?d=-.08038306745347751:t[5]>1809.5000000000002?d=.009265335288169993:t[9]>2.5000000000000004?d=.006447645462117438:d=-.021047132609551503;let p;t[13]>1e-35?t[3]>1.5000000000000002?t[9]>21.500000000000004?t[121]>1e-35?p=-.08436540015142402:t[8]>1861.5000000000002?p=-.01621425699342421:p=.01878613821895428:p=.031052879158242532:t[8]>319.50000000000006?p=-.031536619360997865:t[7]>3.5000000000000004?p=-.004510586962343298:p=.0596524941011746:t[4]>18.500000000000004?t[23]>1e-35?p=.004757490541310808:t[9]>6.500000000000001?p=-.008842393772207996:t[31]>1e-35?p=.0010536183837006993:t[308]>1e-35?p=-.008145882815435419:t[2]>98.50000000000001?p=-.08404937622173021:t[276]>1e-35?p=.0020072791321856663:t[19]>1e-35?p=-.023031820639490178:p=-.04553314326377875:t[8]>2134.5000000000005?p=-.02244583113572251:t[134]>1e-35?p=-.05592137394753121:t[308]>1e-35?t[49]>1e-35?p=.09989109704064947:t[4]>10.500000000000002?t[2]>13.500000000000002?p=-.00447733056482096:p=-.10191061664873849:p=.021765308380331864:t[9]>7.500000000000001?t[118]>1e-35?p=-.07570059131536411:t[243]>1e-35?p=-.040983393346598646:t[3]>9.500000000000002?p=.014763759061483812:t[92]>1e-35?p=.05136368898963024:p=-.008162398981149495:t[127]>1e-35?p=.013999119696708346:t[23]>1e-35?t[20]>1e-35?p=.14138985500120907:p=.008668274102844162:t[284]>1e-35?p=.06356484011042893:p=-.024781304572706303;let h;t[13]>1e-35?t[3]>8.500000000000002?t[8]>892.5000000000001?t[0]>384.50000000000006?h=.014387526569215037:t[8]>2266.5000000000005?h=-.1397298649743087:h=.007953931014097788:t[0]>119.50000000000001?t[4]>61.50000000000001?h=.0029819092211896296:t[218]>1e-35?h=.08450459375645737:h=.031646488019280654:h=-.03544960151460596:t[9]>9.500000000000002?h=-.026002317735915183:t[7]>1.5000000000000002?h=.005074258810794793:h=.0745247650477651:t[4]>29.500000000000004?t[131]>1e-35?h=.023269218675640847:t[148]>1e-35?h=.03812942399144545:t[115]>1e-35?h=.10512283476967227:h=-.02607307479736138:t[227]>1e-35?h=-.036576708299046294:t[101]>1e-35?h=.027948683650881864:t[149]>1e-35?h=-.08195628451594297:t[50]>1e-35?h=-.16997544922278504:t[8]>691.5000000000001?t[9]>101.50000000000001?h=-.06860333850762075:t[225]>1e-35?h=.06066641950951723:t[10]>22.500000000000004?t[1]>29.500000000000004?t[127]>1e-35?h=.028599705845427533:h=-.010746719511640914:t[0]>4877.500000000001?h=-.07251187886096228:h=-.021299712241446785:t[118]>1e-35?h=-.11902023760964736:h=15874469526809387e-21:t[8]>267.50000000000006?h=.01317292185402293:t[148]>1e-35?t[9]>20.500000000000004?h=.09614842415142123:h=.006049073167176467:t[189]>1e-35?h=.05562696451900713:h=-.006257541923837303;let m;t[13]>1e-35?t[9]>14.500000000000002?t[2]>11.500000000000002?t[1]>71.50000000000001?t[8]>1252.5000000000002?m=-.10069846585436666:m=-.010577995535809317:t[146]>1e-35?m=-.008877238274428668:t[280]>1e-35?m=.10076055897012692:t[6]>70.50000000000001?m=-.020603523042565547:t[7]>1.5000000000000002?m=.02819095420813202:m=-.1223354167911277:m=-.025073583348334844:t[8]>416.50000000000006?m=.01718560189149466:t[230]>1e-35?m=.12281803224342265:m=.03281276971308565:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?m=-.13070568109867683:t[4]>63.50000000000001?m=-.027221825262496814:m=.01530862490082352:t[9]>6.500000000000001?t[5]>4320.500000000001?t[2]>31.500000000000004?m=-.00605574271293711:m=.04739407327741249:m=-.012537528620315956:t[31]>1e-35?t[20]>1e-35?m=.1252215087035768:m=.003905888677601057:t[52]>1e-35?m=.045466299731038815:t[2]>100.50000000000001?m=-.07815624550168065:t[308]>1e-35?m=-.007715815250508057:t[276]>1e-35?t[9]>1.5000000000000002?m=-.03538265083203445:t[18]>1e-35?m=.1591211669800727:m=.015151475408241136:t[8]>557.5000000000001?m=-.04225569725456342:m=-.022455546324243267:t[308]>1e-35?m=.01325441736085826:t[197]>1e-35?m=.03752194600682512:t[225]>1e-35?m=.06583712394533976:m=-.005205289866839043;let g;t[13]>1e-35?t[9]>21.500000000000004?t[2]>12.500000000000002?g=.010264022580774884:g=-.02335958814489217:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?g=-.0936747137352166:t[0]>384.50000000000006?g=.019846244507320695:g=-.0751102554077272:g=-.026885329334203723:t[0]>966.5000000000001?t[10]>48.50000000000001?g=.11654906890054273:g=.0346250587613322:t[4]>39.50000000000001?g=-.08568002378645614:t[9]>16.500000000000004?g=-.12010535752923689:g=.021321923389033808:t[4]>14.500000000000002?t[23]>1e-35?t[21]>1e-35?g=-.12056431231412057:t[131]>1e-35?g=.03652965550568472:g=.002563006128791669:t[9]>6.500000000000001?t[30]>1e-35?g=-.10141481732178981:g=-.003936457893178248:t[31]>1e-35?g=.008215898756249477:t[52]>1e-35?t[0]>4188.500000000001?g=.12972828769588213:g=-.003137412232297087:t[2]>100.50000000000001?g=-.0730872929087944:t[308]>1e-35?g=-.006958622747243333:t[35]>1e-35?t[0]>3707.5000000000005?g=.07934620723812878:g=-.018598568353702116:g=-.030635505446410763:t[128]>1e-35?g=-.06962290453843294:t[84]>1e-35?g=-.15290337844960322:t[308]>1e-35?t[8]>2543.5000000000005?g=-.034938657503885584:g=.016339322898966915:t[197]>1e-35?g=.03358907965870046:t[18]>1e-35?g=-.01754013791515288:g=-.0004944586067698557;let A;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?A=.005888790687820524:A=.0429676533834978:t[2]>7.500000000000001?t[0]>119.50000000000001?t[6]>79.50000000000001?A=-.0224319889201976:t[212]>1e-35?A=.06249587051783863:t[8]>963.5000000000001?t[8]>1156.5000000000002?A=.010357273289123324:A=-.029749145161304082:t[218]>1e-35?A=.06449336340743606:A=.018047654539345502:A=-.07350502390293116:A=-.019594829995832414:t[4]>39.50000000000001?A=-.019338083179859314:t[39]>1e-35?A=-.10427066919173111:t[222]>1e-35?t[0]>612.5000000000001?A=-.019197415255018464:A=-.0836562507048181:t[149]>1e-35?A=-.07679624472577429:t[32]>1e-35?A=-.05097506748590604:t[191]>1e-35?A=.04670476485250936:t[30]>1e-35?A=-.05313073892148652:t[8]>691.5000000000001?t[23]>1e-35?t[203]>1e-35?t[4]>8.500000000000002?A=.03930363008271334:A=-.06029171685615689:A=.016203086182431294:t[4]>7.500000000000001?A=-.013824248237085224:t[10]>4.500000000000001?t[94]>1e-35?A=-.09817668643367765:t[10]>40.50000000000001?A=-.023558078753593125:A=.0065113494780482326:t[8]>809.5000000000001?t[297]>1e-35?A=-.1352063548573715:A=.058203900441270634:A=-.035243959159285736:t[10]>59.50000000000001?t[1]>43.50000000000001?A=-.012552876807800442:A=.05991247777734298:A=.0035893102109330177;let y;t[13]>1e-35?t[9]>21.500000000000004?t[145]>1e-35?y=.03507251990078782:t[2]>14.500000000000002?y=.004905698363309292:t[8]>2421.5000000000005?y=-.10306119951984316:y=-.018951037816654928:t[8]>416.50000000000006?t[3]>4.500000000000001?t[295]>1e-35?y=-.08503171085833393:y=.015130974593044409:y=-.024425267075198206:y=.02624054905103126:t[4]>19.500000000000004?t[131]>1e-35?y=.02100191580704534:t[32]>1e-35?t[8]>2302.5000000000005?y=.09908783187786288:y=-.06920877329925636:t[8]>241.50000000000003?y=-.016756131804203496:t[9]>33.50000000000001?y=.04903179955263626:t[217]>1e-35?y=-.047416847619291644:y=-.0017200891991431119:t[39]>1e-35?y=-.10389927604977028:t[134]>1e-35?y=-.050480365434872866:t[178]>1e-35?y=-.05167855791556937:t[8]>2134.5000000000005?y=-.01663197335585307:t[242]>1e-35?y=-.05361323756615453:t[118]>1e-35?y=-.05299780866211368:t[10]>24.500000000000004?t[10]>55.50000000000001?t[8]>764.5000000000001?y=-.0016544848369620534:y=.04494144460483587:y=-.009283616456736156:t[121]>1e-35?t[0]>4463.500000000001?y=.051166688553608355:y=-.06623908820705383:t[84]>1e-35?y=-.12990936092409747:t[306]>1e-35?y=-.07020596855118943:t[49]>1e-35?y=.06272964802556856:t[192]>1e-35?y=.06540204627162581:y=.008277910531592885;let E;t[13]>1e-35?t[308]>1e-35?t[210]>1e-35?E=.003325460510319164:E=.037153108286272905:t[2]>12.500000000000002?t[1]>124.50000000000001?E=-.09880713344892134:t[7]>60.50000000000001?t[10]>71.50000000000001?E=.0697359767152808:t[230]>1e-35?E=.06513506845651572:E=-.02826625276613455:t[5]>246.50000000000003?t[8]>95.50000000000001?E=.013616385013146277:E=.04171540100223404:E=-.04360396575094823:t[212]>1e-35?E=.025945477945627522:E=-.019793208261535442:t[4]>39.50000000000001?t[25]>1e-35?E=-.07856453318384411:E=-.014803893522351739:t[39]>1e-35?E=-.09185452630751932:t[149]>1e-35?E=-.07122426086157027:t[134]>1e-35?E=-.04231052091434186:t[227]>1e-35?E=-.029815824273994197:t[50]>1e-35?E=-.15736496271211153:t[222]>1e-35?E=-.02360285356956629:t[128]>1e-35?E=-.03922080193836443:t[136]>1e-35?E=-.07219685327698587:t[10]>24.500000000000004?t[1]>8.500000000000002?E=-.0029736170756835783:E=-.06482902102259112:t[84]>1e-35?E=-.11340924635708383:t[94]>1e-35?E=-.03635703457792193:t[118]>1e-35?E=-.058181913914186034:t[126]>1e-35?E=-.062030576241517366:t[116]>1e-35?E=-.045086301850604006:t[25]>1e-35?E=-.031665223656767286:t[203]>1e-35?E=-.009444685731407691:E=.0112265153772187;let _;t[13]>1e-35?t[1]>64.50000000000001?t[9]>14.500000000000002?t[9]>54.50000000000001?_=.022717227245241684:_=-.049700413274686266:_=.007175776918589741:t[5]>50.50000000000001?t[8]>61.50000000000001?t[21]>1e-35?_=-.07927556792063156:t[3]>8.500000000000002?t[4]>23.500000000000004?t[281]>1e-35?_=-.12263724050601095:_=.0070743478891288035:t[288]>1e-35?_=-.050439138582109:_=.0255701593657891:_=-.005812703740580558:t[6]>49.50000000000001?_=-.008542694147899113:_=.035147383686665:_=-.0960461939274094:t[32]>1e-35?_=-.04555453745517765:t[222]>1e-35?t[0]>612.5000000000001?_=-.01800870272656664:_=-.07817304234604389:t[30]>1e-35?_=-.05227061750368981:t[25]>1e-35?t[0]>4449.500000000001?t[217]>1e-35?_=.08778416018479411:_=-.026563982720830256:_=-.05296139548112329:t[50]>1e-35?_=-.14926464875852247:t[8]>779.5000000000001?t[133]>1e-35?_=-.036572140520852024:t[183]>1e-35?_=-.10766853736801459:_=-.003966794968701808:t[217]>1e-35?t[5]>5237.500000000001?_=.09513215942486053:_=-.03641865277445567:t[10]>59.50000000000001?_=.03177172388687933:t[39]>1e-35?_=-.10234241303898953:t[243]>1e-35?_=-.02966738115984321:t[190]>1e-35?_=-.04312785336449181:t[118]>1e-35?_=-.05808521194081524:_=.006720381600740378;let v;t[308]>1e-35?t[5]>423.00000000000006?t[133]>1e-35?v=-.046284053681928526:t[210]>1e-35?v=49778070699847876e-21:t[13]>1e-35?v=.03328070054739309:t[128]>1e-35?v=-.054790214922938896:t[126]>1e-35?v=-.08524792218532945:v=.014414055975542446:t[1]>38.50000000000001?v=-.07287851335872973:v=.005263371501687163:t[9]>7.500000000000001?t[21]>1e-35?t[10]>4.500000000000001?v=-.12459748864088374:v=-.004626323021331593:t[298]>1e-35?t[4]>64.50000000000001?v=.13044981041138526:t[9]>71.50000000000001?v=-.056068402282406865:t[9]>12.500000000000002?v=.038957722962512764:v=-.04598815982492169:t[8]>691.5000000000001?t[126]>1e-35?v=-.0852126122372075:t[225]>1e-35?v=.10082066771689505:t[1]>161.50000000000003?v=-.11609832500613824:t[3]>8.500000000000002?t[8]>1685.5000000000002?v=-.010835400874777133:v=.004607419973807752:v=-.016989075258564062:v=.009205417251698097:t[23]>1e-35?t[20]>1e-35?v=.10184317139657878:t[0]>5724.500000000001?v=-.1163666496650542:t[1]>106.50000000000001?v=.1303850608190687:t[129]>1e-35?v=.10745031509534769:v=.006166901738036226:t[31]>1e-35?v=.010177092833155127:t[13]>1e-35?t[0]>213.50000000000003?v=.005004582564506611:v=-.10481581731668346:t[19]>1e-35?v=-.009850706427306281:v=-.02608226348051303;let b;t[13]>1e-35?t[1]>64.50000000000001?t[2]>4.500000000000001?b=-.0024117174588695603:b=-.058339700513831916:t[212]>1e-35?t[0]>2215.5000000000005?t[8]>847.5000000000001?t[10]>21.500000000000004?t[1]>39.50000000000001?b=.04575380761203418:b=-.10025595041353463:t[15]>1e-35?b=.17705790384964004:b=.0073813837628615014:b=.07676373681392407:b=-.027167992693885996:t[3]>11.500000000000002?t[280]>1e-35?b=.07078572910026419:t[4]>23.500000000000004?b=.005513918674164821:b=.0206586476926392:t[0]>5269.500000000001?b=.07706773525822633:b=-.010233826953776122:t[148]>1e-35?t[8]>1622.5000000000002?b=-.03204783603215824:b=.027405418223981973:t[4]>14.500000000000002?t[131]>1e-35?t[9]>1.5000000000000002?t[0]>5026.500000000001?b=-.0930246911392012:b=.011173087289703683:t[3]>24.500000000000004?b=.03281421918878597:b=.12449335091369843:t[204]>1e-35?b=.06634531187326123:b=-.011522999669353388:t[92]>1e-35?t[10]>42.50000000000001?b=-.041196758517013515:t[4]>7.500000000000001?b=-2942718111029724e-20:t[4]>6.500000000000001?b=.11953909558532852:b=.03188615019450534:t[122]>1e-35?b=-.0616037324662157:t[101]>1e-35?b=.027230889593349412:t[8]>4968.500000000001?b=-.1113986516540856:t[3]>2.5000000000000004?b=-.002045140426885727:t[129]>1e-35?b=.12641163374304432:b=.014909826232873194;let I;t[308]>1e-35?t[0]>7277.500000000001?I=-.09337446795435:t[5]>423.00000000000006?t[133]>1e-35?I=-.040884836258675006:t[210]>1e-35?I=-.0003719413278428804:t[13]>1e-35?I=.030287610160818174:I=.011174130013595384:t[1]>38.50000000000001?I=-.0662442170185784:I=.004332185707008564:t[9]>7.500000000000001?t[145]>1e-35?t[285]>1e-35?I=-.08092286307197555:I=.029866363328584986:t[21]>1e-35?t[10]>4.500000000000001?I=-.1155211149523894:I=-.0032903546638958538:t[149]>1e-35?I=-.03632198993199768:t[3]>9.500000000000002?t[8]>999.5000000000001?I=-.003507023626534306:t[128]>1e-35?t[4]>13.500000000000002?t[0]>3459.5000000000005?I=-.025416927789760076:I=.02777568919793122:I=-.10310351509769732:I=.013549608903688785:t[186]>1e-35?I=.08513865847420551:I=-.009306721292510369:t[31]>1e-35?I=.009780833952582307:t[23]>1e-35?I=.011143773934157629:t[210]>1e-35?I=.025354797285173356:t[17]>1e-35?t[10]>3.5000000000000004?I=-.04846287537743046:I=-.014647271080376757:t[2]>5.500000000000001?t[7]>57.50000000000001?I=-.034224938681445764:t[8]>1641.5000000000002?I=-.027298372075800673:t[191]>1e-35?t[10]>18.500000000000004?I=-.027950103994861836:I=.14575930827829034:I=-.007124740389354946:t[10]>22.500000000000004?I=.013173304107866726:I=-.11119620042551365;let x;t[131]>1e-35?x=.01892225243240137:t[308]>1e-35?t[5]>691.5000000000001?t[133]>1e-35?x=-.037118314390013646:t[1]>51.50000000000001?t[5]>3749.5000000000005?t[8]>58.50000000000001?x=-.022305242912035072:x=.024792895826340516:x=.013666137278072166:t[88]>1e-35?t[10]>27.500000000000004?x=.2080083584805785:x=.04247197078083379:t[10]>40.50000000000001?t[18]>1e-35?t[1]>27.500000000000004?x=.060783227455868206:x=-.056904865557409035:x=-.03278952553107572:t[192]>1e-35?x=.13117402617043625:x=.01647119888257836:x=-.01825870445636398:t[9]>6.500000000000001?t[298]>1e-35?x=.026536210945939682:t[8]>691.5000000000001?t[126]>1e-35?x=-.07927319604548912:t[10]>3.5000000000000004?t[21]>1e-35?x=-.11083976837572328:t[146]>1e-35?x=-.03359294484446772:x=-.0042815953591236475:t[190]>1e-35?x=-.09264239592903775:t[10]>1e-35?x=.022282638485105657:x=-.0205994057928458:t[5]>4918.500000000001?x=.03430715695199153:t[243]>1e-35?t[2]>57.50000000000001?x=.08935072241972036:x=-.03781647876237494:x=.0062655753179671515:t[31]>1e-35?x=.008603500300349887:t[230]>1e-35?x=.03350056932774173:t[23]>1e-35?t[241]>1e-35?x=.10277555508503314:x=.0017901817172993888:t[2]>98.50000000000001?x=-.05920081229672715:x=-.015722173275739208;let w;t[13]>1e-35?t[118]>1e-35?w=.07957905150112207:t[1]>125.50000000000001?w=-.0662620579858685:t[145]>1e-35?w=.029682040828779843:t[19]>1e-35?t[6]>15.500000000000002?w=-.0009597832580977798:w=-.081474760755753:t[212]>1e-35?w=.03637001492325179:w=.006912305498963309:t[32]>1e-35?w=-.03919900630910754:t[134]>1e-35?w=-.036225295529777886:t[4]>4.500000000000001?t[5]>384.50000000000006?t[204]>1e-35?w=.06671440854602108:t[136]>1e-35?w=-.07577364230133474:t[148]>1e-35?t[4]>7.500000000000001?w=.026430947016830915:w=-.04075501264495112:t[9]>93.50000000000001?w=-.04353169430417609:t[50]>1e-35?w=-.1411224537622882:t[17]>1e-35?t[49]>1e-35?w=.068392679163672:t[10]>1.5000000000000002?w=-.0209659792007492:w=-.0004393235559249831:t[133]>1e-35?t[9]>64.50000000000001?w=.07254524592323175:w=-.0319087835282534:w=.00037444813327793425:w=-.025138768151370408:t[243]>1e-35?w=-.050010891710502096:t[94]>1e-35?w=-.0817513550778599:t[122]>1e-35?w=-.061038875809822285:t[19]>1e-35?t[8]>1085.5000000000002?w=-.008408408775061623:t[2]>5.500000000000001?t[218]>1e-35?w=.1454877641381946:w=.053787998331240316:t[9]>33.50000000000001?w=.08602629796680285:w=-.03895127455803038:w=.008830878042315722;let R;t[131]>1e-35?R=.01687979707990516:t[8]>2915.5000000000005?t[297]>1e-35?R=.07473600489975568:t[0]>93.50000000000001?R=-.021596848506011502:R=-.13840802327735696:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?R=.10264284346448256:R=.031042487183181262:R=-.016653982936827776:t[4]>60.50000000000001?t[10]>75.50000000000001?R=.04226403420647408:t[10]>1e-35?t[0]>4733.500000000001?R=.006271403149804702:R=-.030013637555715046:t[0]>4449.500000000001?R=-.06556876058654929:R=.06437994816903034:t[32]>1e-35?R=-.043814577251655815:t[308]>1e-35?t[0]>7277.500000000001?R=-.09349726304052086:t[210]>1e-35?R=-.0035960132209098003:t[5]>691.5000000000001?t[133]>1e-35?R=-.029188394315052574:R=.017219308333820193:R=-.017378928852189585:t[9]>6.500000000000001?t[0]>2653.5000000000005?t[149]>1e-35?R=-.04428555753857688:R=.0001456106867817353:t[5]>213.50000000000003?R=.01740292726636365:R=-.011361718115556464:t[7]>4.500000000000001?t[0]>316.50000000000006?t[19]>1e-35?t[10]>54.50000000000001?R=.03410288911259329:t[121]>1e-35?R=-.06056527462120627:t[8]>2592.5000000000005?R=.12166808844363577:t[191]>1e-35?R=.11669879218998758:R=-.001664858391716235:R=-.01262927450503166:R=-.04506589951879664:t[227]>1e-35?R=-.08548904959752329:R=.02156080776537726;let P;t[306]>1e-35?t[149]>1e-35?P=-.1389218965136736:P=-.032218642644416894:t[13]>1e-35?P=.006465035217331847:t[50]>1e-35?P=-.1381687930130022:t[179]>1e-35?P=-.13112784985951215:t[148]>1e-35?t[8]>1726.5000000000002?P=-.03262719498763048:P=.023342916702125613:t[191]>1e-35?P=.030005484947580197:t[4]>4.500000000000001?t[204]>1e-35?P=.047767773119269434:t[136]>1e-35?t[0]>1937.5000000000002?P=-.09989343595668776:P=.06533942033334243:t[15]>1e-35?t[9]>86.50000000000001?P=-.10577989354150097:t[8]>668.5000000000001?t[126]>1e-35?P=-.09165257825246746:t[9]>32.50000000000001?P=.02484870392366004:P=-.008499493096971395:t[8]>24.500000000000004?P=.02459679192828244:P=-.010527978013140512:t[25]>1e-35?t[217]>1e-35?P=.0015644546318714849:P=-.06579524865022705:P=-.0060233890975120614:t[122]>1e-35?t[1]>36.50000000000001?P=.03331853632960164:P=-.09482264761126993:t[19]>1e-35?t[8]>1430.5000000000002?P=-.019091477207111116:P=.037878468575478504:t[94]>1e-35?P=-.08013082284576584:t[4]>2.5000000000000004?t[186]>1e-35?P=.16919658785098224:t[243]>1e-35?P=-.06580584936754524:P=.01567555159935563:t[129]>1e-35?P=.06721746994993226:t[10]>32.50000000000001?P=-.046394462507797975:P=-.006436180519584767;let k;t[131]>1e-35?k=.015039096856208693:t[8]>779.5000000000001?t[145]>1e-35?k=.019122095523977856:t[298]>1e-35?k=.023828936462317443:t[1]>23.500000000000004?t[5]>384.50000000000006?t[7]>59.50000000000001?k=-.026094309429557913:t[204]>1e-35?k=.09163404305658318:t[1]>27.500000000000004?t[149]>1e-35?t[6]>34.50000000000001?k=.012643810980689466:k=-.07884161741497837:k=-.0025267379810891104:t[2]>43.50000000000001?t[0]>2860.5000000000005?k=.04493082949897325:k=.18046359750455776:t[7]>18.500000000000004?k=-.018667348656891496:k=.02584325784698236:k=-.045696524897545915:t[0]>3321.5000000000005?t[201]>1e-35?k=.04749240016989375:k=-.0333334578246718:t[5]>3276.5000000000005?k=.11330554740098908:t[7]>94.50000000000001?k=.1296600395033268:k=-.003576436308940934:t[15]>1e-35?t[183]>1e-35?k=-.13787130789142835:t[0]>1847.5000000000002?k=.017915229729920556:t[10]>23.500000000000004?t[10]>31.500000000000004?t[6]>7.500000000000001?k=.028856848462727104:k=-.11197632885851168:k=.08169801342016791:t[1]>22.500000000000004?k=-.021052888644970163:k=.019048604298876753:t[7]>4.500000000000001?k=-.002603328695276418:t[7]>1.5000000000000002?t[2]>5.500000000000001?k=.03432638833359197:k=-.0036767863082454973:t[1]>48.50000000000001?k=.03087375270128195:t[2]>3.5000000000000004?k=-.04219917149740248:k=.018818493993207935;let Q;t[306]>1e-35?Q=-.04076858123502297:t[13]>1e-35?t[1]>67.50000000000001?t[9]>14.500000000000002?t[9]>53.50000000000001?t[8]>1971.5000000000002?Q=-.09091897542577475:Q=.04042943082645558:t[218]>1e-35?Q=.056254985867151:Q=-.053848117950183044:Q=.003881630017086845:t[5]>5152.500000000001?t[8]>857.5000000000001?t[6]>28.500000000000004?Q=.021581808008986944:Q=-.05639286496176611:Q=.052838875036198954:t[5]>50.50000000000001?t[5]>4082.5000000000005?t[17]>1e-35?Q=.023061479860228728:t[145]>1e-35?t[9]>10.500000000000002?Q=.023885302967553288:Q=.1617794086125622:t[212]>1e-35?Q=.04504545345658806:t[3]>17.500000000000004?t[4]>45.50000000000001?Q=-.03948072448245435:t[1]>47.50000000000001?t[9]>18.500000000000004?Q=.01894935813286188:Q=-.06449356357429188:Q=.012297239104320094:t[1]>26.500000000000004?t[8]>33.50000000000001?Q=-.034718828212885515:Q=.0898976288814321:t[1]>17.500000000000004?Q=-.15440137451988326:Q=-.03864183216821465:Q=.009988507307006308:Q=-.08540311947043305:t[50]>1e-35?Q=-.13323659732101975:t[134]>1e-35?Q=-.031820386486894385:t[32]>1e-35?t[8]>2302.5000000000005?Q=.08082476177379844:Q=-.041665761903645876:t[179]>1e-35?Q=-.12405023987936657:t[39]>1e-35?Q=-.06247416524997478:t[138]>1e-35?Q=-.10724031753676487:Q=-.0005423122305122404;let M;t[308]>1e-35?M=.006160742906729798:t[190]>1e-35?t[0]>2461.5000000000005?t[10]>22.500000000000004?M=.023223358334607133:M=-.04383410185346742:M=-.08542395045055405:t[297]>1e-35?t[8]>51.50000000000001?t[1]>13.500000000000002?M=.023406489302867494:M=-.085521220804058:M=-.02921899554854833:t[298]>1e-35?t[9]>12.500000000000002?M=.028120059780969632:M=-.04211009474298743:t[294]>1e-35?M=-.05040415676618239:t[86]>1e-35?t[1]>36.50000000000001?M=-.0993035220737934:M=-.0005384930611060366:t[230]>1e-35?t[4]>6.500000000000001?M=.029770210551187937:M=-.016272917551655715:t[4]>60.50000000000001?t[280]>1e-35?M=.06421359317599738:M=-.01963732469244167:t[218]>1e-35?t[3]>3.5000000000000004?M=.024368404612215164:M=-.04045232374803373:t[131]>1e-35?M=.017372701982485795:t[120]>1e-35?M=.08812710275150198:t[18]>1e-35?t[90]>1e-35?M=.18451364351180236:t[7]>33.50000000000001?M=-.03850813130183531:t[195]>1e-35?M=.06966114053446336:t[3]>16.500000000000004?M=-.0012869181693341211:t[0]>4242.500000000001?M=-.054625548611291035:M=-.014431095117473881:t[5]>4558.500000000001?t[8]>1.5000000000000002?M=.006302103427145562:M=.13967622319898698:t[121]>1e-35?M=-.038798585213145644:t[5]>4544.500000000001?M=-.08050498033009466:M=-.002986974112681435;let N;t[0]>384.50000000000006?t[2]>101.50000000000001?t[1]>16.500000000000004?N=-.03461119351456781:N=.05659026566680352:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?N=-.12404435523286539:N=-.0034376913880382956:N=-.09821622245095822:t[131]>1e-35?t[9]>1.5000000000000002?N=.0037507103585310234:N=.03610387965829944:t[8]>999.5000000000001?t[9]>137.50000000000003?N=-.11985021663179699:t[0]>1847.5000000000002?t[126]>1e-35?N=-.04832024079663151:t[37]>1e-35?N=-.037103393468366934:N=-.004248086592531705:t[8]>3084.0000000000005?t[9]>43.50000000000001?N=.032539071163832034:t[5]>1643.5000000000002?N=.036408625378035665:t[0]>1500.5000000000002?N=-.1346358322854993:N=-.027586559522081014:t[3]>1e-35?t[190]>1e-35?N=-.1133991164577881:t[9]>52.50000000000001?N=-.024478640359723122:N=.03673777861098756:N=-.1037451237591819:t[230]>1e-35?t[9]>48.50000000000001?t[10]>20.500000000000004?N=.002583438691776944:N=.10773520810108106:t[9]>12.500000000000002?t[1]>16.500000000000004?N=-.02141222346712401:N=.06392462314316179:t[4]>12.500000000000002?N=.08700122294434816:t[8]>267.50000000000006?N=.056923170082743224:N=-.07716309825583327:t[32]>1e-35?N=-.03961343943752142:N=.002674914122888783:t[1]>42.50000000000001?N=-.05217539654421676:t[145]>1e-35?N=.09553630282946368:N=-.009424791262477729;let G;t[183]>1e-35?G=-.05753337139158443:t[308]>1e-35?G=.00562436671450989:t[9]>7.500000000000001?t[21]>1e-35?t[10]>8.500000000000002?G=-.10477869875380448:G=-.0070301869937306055:t[3]>9.500000000000002?t[8]>1765.5000000000002?t[0]>4571.500000000001?G=-.12526505173232894:t[10]>1e-35?t[9]>71.50000000000001?G=-.04442302951713574:G=.00012409888451734224:G=-.092199119633697:t[225]>1e-35?G=.13773072450201831:t[0]>2882.5000000000005?G=.0028540012229920533:t[298]>1e-35?G=.07134486044361629:G=.014297412329837425:t[145]>1e-35?G=.05608385321902638:t[92]>1e-35?G=.038298413603926135:t[107]>1e-35?t[2]>6.500000000000001?G=-.0039957800609801315:G=.0776927564241081:t[203]>1e-35?G=-.05502900859432093:t[105]>1e-35?G=.06062892720841595:G=-.009574839629252128:t[31]>1e-35?G=.009488858841144216:t[23]>1e-35?t[20]>1e-35?G=.08818126313644752:t[8]>161.50000000000003?G=.014353968957885408:G=-.022240738532827903:t[210]>1e-35?G=.024648862719806694:t[2]>5.500000000000001?t[4]>4.500000000000001?t[17]>1e-35?t[10]>16.500000000000004?G=-.043902062079383485:G=-.014741559220396223:G=-.00934935734853194:t[6]>32.50000000000001?G=.1514593126307404:G=.010771222510801532:t[10]>22.500000000000004?G=.01412495209334078:G=-.08576940379502533;let O;t[0]>384.50000000000006?t[84]>1e-35?O=-.06647690967306838:t[2]>101.50000000000001?O=-.024451334501552457:t[306]>1e-35?O=-.034517188927733505:t[131]>1e-35?t[9]>1.5000000000000002?O=.0031858381443673127:O=.032574927024450646:t[204]>1e-35?t[1]>62.50000000000001?O=-.08601340441214533:t[1]>29.500000000000004?O=.10487598629539963:t[8]>597.5000000000001?O=-.0786529133673238:O=.08689436600511559:t[8]>779.5000000000001?t[10]>2.5000000000000004?t[9]>100.50000000000001?O=-.04883600353740688:t[126]>1e-35?O=-.03794042763348827:O=-.003358871967539988:t[210]>1e-35?O=.054991356498447566:t[6]>19.500000000000004?O=-.007418396981635549:O=.018032606049498613:t[18]>1e-35?t[7]>35.50000000000001?t[2]>44.50000000000001?O=-.02143003429501711:O=-.09016000554055564:t[1]>19.500000000000004?t[1]>42.50000000000001?t[8]>17.500000000000004?O=-.006636355416244082:O=-.06483095743431454:t[4]>21.500000000000004?O=-.028975965946833545:O=.022012264796522657:O=-.06653648243193663:t[5]>4593.500000000001?O=.01753551428088607:t[217]>1e-35?O=-.028864824937700297:t[94]>1e-35?O=-.04885192273020658:t[279]>1e-35?O=.08105715462329498:t[121]>1e-35?O=-.04576676034750651:O=.004795141324949362:t[1]>42.50000000000001?O=-.047446619702809195:t[145]>1e-35?O=.08400495571952321:O=-.00854528836489364;let D;t[294]>1e-35?D=-.042529778074638265:t[266]>1e-35?D=-.1180276669679798:t[134]>1e-35?D=-.026818144353279623:t[183]>1e-35?D=-.05120747503479363:t[227]>1e-35?t[8]>1641.5000000000002?D=-.07265906898294434:t[4]>12.500000000000002?t[17]>1e-35?D=-.027516137530797014:t[0]>4331.500000000001?t[1]>64.50000000000001?D=-.03049646619610203:t[1]>50.50000000000001?D=.20634590755061122:D=.06956378103625731:t[0]>3770.5000000000005?D=-.07946414366134913:t[19]>1e-35?D=.17083312065604694:t[2]>21.500000000000004?D=-.02327981978127724:D=.129717297518715:t[145]>1e-35?D=.006891245076133524:D=-.0789123467863741:t[3]>99.50000000000001?D=-.02022281202803071:t[302]>1e-35?t[10]>47.50000000000001?D=.06447639919732716:D=-.05457561977645972:t[306]>1e-35?D=-.029995903305383882:t[191]>1e-35?D=.030596508110850414:t[242]>1e-35?D=-.024085578702020216:t[8]>3198.5000000000005?t[297]>1e-35?D=.09518584795377832:D=-.018197744600833596:t[13]>1e-35?D=.006751790086127549:t[148]>1e-35?D=.01904174573618417:t[99]>1e-35?D=.025287735102561926:t[4]>14.500000000000002?D=-.004364337681643273:t[1]>15.500000000000002?t[35]>1e-35?D=-.09467943982430241:t[243]>1e-35?D=-.02521824751996268:D=.005437570718352172:D=-.022476214821960674;let F;t[0]>384.50000000000006?t[84]>1e-35?F=-.06088131453064195:t[147]>1e-35?F=-.05332792965930566:t[135]>1e-35?t[9]>32.50000000000001?F=.04219361472548491:F=-.07227529211725771:t[10]>4.500000000000001?t[21]>1e-35?F=-.0787279848043689:t[17]>1e-35?t[3]>18.500000000000004?t[188]>1e-35?F=-.054347604504400286:t[0]>3544.5000000000005?t[0]>5850.500000000001?F=-.11431764534511478:F=.013549717238356157:F=-.020987333767091276:t[6]>2.5000000000000004?F=-.02914877855133127:F=.08483464900160231:t[8]>58.50000000000001?t[183]>1e-35?F=-.10087072787978416:t[37]>1e-35?F=-.030467397753331196:t[229]>1e-35?F=-.1017559811057469:t[4]>20.500000000000004?F=-.00413177742240167:t[20]>1e-35?F=.05213315982685969:F=.0037921635866823133:t[8]>51.50000000000001?F=.07327913092421544:t[6]>49.50000000000001?F=-.03457694284156811:t[6]>18.500000000000004?t[7]>17.500000000000004?F=.02744420891894289:F=.11288946357194463:F=.003482908820966248:t[18]>1e-35?t[1]>20.500000000000004?t[7]>4.500000000000001?F=-.012329314369909049:F=.026816658655600168:F=-.0872405354618811:F=.007872673500247845:t[1]>42.50000000000001?F=-.04309044198258254:t[145]>1e-35?F=.07572529147860785:t[7]>5.500000000000001?F=-.013837187093264945:t[1]>17.500000000000004?F=.04208698439539668:F=-.06284346769019863;let U;t[294]>1e-35?U=-.0384794324818203:t[266]>1e-35?U=-.1087205883821061:t[32]>1e-35?t[8]>2302.5000000000005?U=.07432960094940501:U=-.035248735855751855:t[134]>1e-35?U=-.02456191365284949:t[121]>1e-35?t[0]>4720.500000000001?t[1]>39.50000000000001?U=-.01706896375068821:U=.08212247914968074:t[2]>59.50000000000001?U=-.09546478958824225:t[6]>53.50000000000001?U=.12317082897575611:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?U=.02816463285971267:U=.15449139016588445:U=-.10199787406123524:U=-.038068684323297096:t[223]>1e-35?t[8]>668.5000000000001?U=-.13924786681478077:U=-.0072772442570213335:t[39]>1e-35?U=-.05392786531177836:t[0]>93.50000000000001?t[40]>1e-35?U=-.054059371343144036:t[306]>1e-35?t[2]>14.500000000000002?t[149]>1e-35?U=-.11174465335620831:U=.00013144040097180107:U=-.08493919336681105:t[42]>1e-35?U=-.11078582572836196:t[84]>1e-35?t[4]>17.500000000000004?U=-.015540659878839153:U=-.14442609417300142:t[21]>1e-35?U=-.025251979447574083:U=.0023698372645272847:t[18]>1e-35?U=.07269739695712212:t[8]>2592.5000000000005?U=-.1460388776448558:t[9]>30.500000000000004?t[1]>23.500000000000004?U=-.01835130329646532:t[9]>45.50000000000001?U=.02023047454629885:U=.16469378262221102:U=-.042975030085836426;let L;t[8]>2915.5000000000005?t[297]>1e-35?L=.06257393915394144:t[0]>93.50000000000001?t[4]>1.5000000000000002?L=-.01034964686484714:L=-.07357437440667927:L=-.11987794734779106:t[298]>1e-35?t[8]>81.50000000000001?t[0]>3370.5000000000005?t[8]>155.50000000000003?t[8]>660.5000000000001?t[8]>2134.5000000000005?L=-.09476398869062203:t[9]>72.50000000000001?L=-.0757383854264379:L=.02806542779508718:L=-.05147742568418084:L=.10212721564444344:L=.0518263760642861:L=-.08743405377022222:t[189]>1e-35?t[0]>5269.500000000001?L=-.10669213185972036:L=.027050434286384796:t[302]>1e-35?L=-.0407832394672723:t[116]>1e-35?t[10]>38.50000000000001?L=.06354599160071946:t[1]>67.50000000000001?L=.05317447949011187:L=-.059138165935307165:t[212]>1e-35?t[19]>1e-35?L=-.09369289448773599:t[0]>2215.5000000000005?L=.04077965380363924:t[0]>807.5000000000001?L=-.0591771776458298:L=.057315736906679376:t[308]>1e-35?t[1]>52.50000000000001?t[5]>3749.5000000000005?L=-.016323380219241672:L=.007291062979527741:t[210]>1e-35?t[8]>1641.5000000000002?L=.03720704290087811:L=-.008730548158766654:t[4]>80.50000000000001?L=-.05346644687473197:L=.014596824736762107:t[218]>1e-35?t[3]>3.5000000000000004?L=.019984510398089086:L=-.03917825025861855:t[9]>170.50000000000003?L=-.09759719821334525:L=-.0023586682752856298;let H;t[183]>1e-35?t[17]>1e-35?H=.030100940443356424:t[10]>1.5000000000000002?H=-.10861112216742408:H=.017680668976453255:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?H=-.032062878390325456:H=-.10808232631806887:t[8]>1641.5000000000002?H=-.06147013392655731:t[4]>12.500000000000002?H=.03324767551088266:t[145]>1e-35?H=.028851633810612017:H=-.054871239091792784:t[134]>1e-35?H=-.023813968121342108:t[266]>1e-35?H=-.10037039667146351:t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>1939.5000000000002?H=-.055566877553100726:t[2]>24.500000000000004?t[8]>182.50000000000003?t[10]>43.50000000000001?t[10]>55.50000000000001?H=-.025350325484720576:H=.1579024598549572:t[9]>2.5000000000000004?t[0]>3746.5000000000005?H=.056817276537534815:H=-.07674158463557636:H=-.06335553143454145:t[1]>56.50000000000001?H=.16390494217299284:H=-.0027330160430847177:t[10]>36.50000000000001?t[8]>1067.5000000000002?H=.041717597065890205:H=-.10357913492269129:t[10]>29.500000000000004?H=.1365512866715726:H=.020600048310575665:H=.09708785634773187:H=-.060427658852305666:t[126]>1e-35?t[10]>32.50000000000001?t[6]>24.500000000000004?t[8]>1146.5000000000002?H=-.03146213719547347:H=.11784024316238083:H=-.050940520532045355:H=-.047988344143075616:t[191]>1e-35?H=.028764654731460032:H=.0011911575567860023;let $;t[294]>1e-35?t[10]>50.50000000000001?$=-.11630092297244568:t[0]>2432.5000000000005?t[0]>4199.500000000001?$=-.05103908560370243:$=.05002066201169583:$=-.09976646725732496:t[32]>1e-35?t[0]>4242.500000000001?$=-.0648838712201258:t[5]>3721.5000000000005?t[9]>4.500000000000001?$=.127983140816313:$=-.05436534163636867:$=-.024514536544596455:t[121]>1e-35?t[0]>4449.500000000001?t[4]>9.500000000000002?$=-.009504203657088933:t[8]>819.5000000000001?$=.18689664822602375:$=.03635576744011826:$=-.029862411809998525:t[223]>1e-35?$=-.06474496692999487:t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?$=-.09405026597863717:t[0]>4153.500000000001?$=.053577663326799765:$=-.05062127873995668:$=.06512222894425874:t[39]>1e-35?$=-.04985311717827547:t[51]>1e-35?$=-.04541229517934797:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?$=-.02860634573675884:$=.08863753005590103:$=.11158892111063744:t[0]>655.5000000000001?$=-.031005736641654926:$=-.1439827004505974:t[222]>1e-35?t[1]>11.500000000000002?t[0]>612.5000000000001?$=-.00843386136334982:$=-.05273594615999777:$=.1060183822015004:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?$=-.015774115523598486:$=.10147367091236065:$=-.048307000563071016:$=.002118376117677254;let W;t[8]>1014.5000000000001?t[9]>137.50000000000003?W=-.10279096288817871:t[0]>93.50000000000001?t[8]>1067.5000000000002?t[227]>1e-35?W=-.03544332389470493:t[285]>1e-35?t[9]>64.50000000000001?W=.07211107542565391:W=-.041556776020476104:t[145]>1e-35?t[1]>66.50000000000001?W=-.0751486415451188:t[1]>59.50000000000001?W=.13459005084554104:W=.024184371850147466:t[0]>3072.5000000000005?t[95]>1e-35?W=.06715575425741895:W=-.005895690393702183:t[8]>2915.5000000000005?W=-.010205039411753762:t[9]>33.50000000000001?t[9]>47.50000000000001?W=-.00029068886245881074:W=.0613467393188786:t[148]>1e-35?W=-.06074463294936236:t[3]>1.5000000000000002?t[5]>1849.5000000000002?t[1]>15.500000000000002?W=.003887223773199377:W=-.08553893131979015:W=.025654192706396767:W=-.05651733979610658:W=-.02039913645229667:t[2]>7.500000000000001?W=-.1058450646728524:W=.02267192191610376:t[1]>120.50000000000001?t[2]>60.50000000000001?W=-.12304707569000428:t[1]>132.50000000000003?t[6]>41.50000000000001?W=.1283258201586378:W=-.01718135372229775:W=-.07702452408491414:t[125]>1e-35?W=-.0804612900572707:t[178]>1e-35?t[0]>4533.500000000001?W=.04273051857848212:W=-.04533122948101463:t[2]>196.50000000000003?W=-.10543331044088727:t[94]>1e-35?t[5]>4532.500000000001?W=.0231032972703664:W=-.04807386814498683:W=.002729435991332102;let j;t[179]>1e-35?j=-.08065315471211375:t[183]>1e-35?t[17]>1e-35?j=.026484626664041125:t[10]>1.5000000000000002?j=-.10187000872941615:j=.015274190652133752:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?j=.09574540795390041:j=-.06454986703691233:j=-.11411849349353141:t[266]>1e-35?j=-.09281838517322076:t[32]>1e-35?t[8]>2302.5000000000005?j=.06685250330182936:t[4]>67.50000000000001?t[2]>97.50000000000001?j=-.04403391373512386:j=.1132928075412222:t[2]>47.50000000000001?j=-.09700191391838056:j=-.02147184357182825:t[10]>4.500000000000001?t[21]>1e-35?j=-.0735617817957859:t[17]>1e-35?t[3]>18.500000000000004?j=-.001668912999010927:j=-.02363511102970245:t[8]>58.50000000000001?j=-.00035213368294640616:t[3]>17.500000000000004?t[2]>28.500000000000004?t[10]>23.500000000000004?t[1]>38.50000000000001?j=.0911011436534449:t[1]>28.500000000000004?j=-.07192390493729035:j=.06913818091291246:j=-.012312625373699222:j=.06784496312307986:j=-167756936027735e-19:t[18]>1e-35?t[8]>302.50000000000006?j=.0026564453057705273:j=-.025425772389361445:t[122]>1e-35?j=-.12046786388602149:t[0]>3183.5000000000005?j=.01162092842804907:t[91]>1e-35?j=.07000265526928563:t[1]>22.500000000000004?t[0]>576.5000000000001?j=-.0001647792543020228:j=-.023664538532907665:j=.01609078206180752;let ce;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4141.500000000001?ce=-.051473645433684705:t[0]>3030.5000000000005?t[1]>51.50000000000001?ce=-.017696526862422682:ce=.1450050954613223:ce=-.05406930069823832:ce=-.08308700260259043:t[120]>1e-35?ce=.058316269489189415:t[297]>1e-35?t[94]>1e-35?ce=-.07425512495167255:t[8]>51.50000000000001?t[1]>13.500000000000002?t[1]>33.50000000000001?t[19]>1e-35?t[0]>4498.500000000001?ce=.038431826961746934:ce=-.05937462906539856:t[9]>65.50000000000001?ce=.10814845712507865:t[4]>9.500000000000002?t[2]>22.500000000000004?t[1]>39.50000000000001?t[1]>44.50000000000001?t[10]>44.50000000000001?ce=.12297945639231944:t[0]>3796.5000000000005?t[4]>26.500000000000004?ce=-.09579030954062734:ce=.025064711572811746:ce=.02579440518821548:ce=.1044440128091862:ce=-.058348633139536844:ce=.07766788227934436:ce=-.01021229539092708:t[2]>2.5000000000000004?t[10]>29.500000000000004?t[0]>3770.5000000000005?t[0]>4438.500000000001?ce=.07463684068207214:ce=.18244269035484484:t[6]>39.50000000000001?ce=-.06050050067471004:ce=.05787759066913493:ce=.010783225857972171:ce=.1674891243602606:t[4]>9.500000000000002?ce=-.004814132027475892:ce=-.14543299413454813:ce=-.02935093398687923:t[116]>1e-35?t[9]>2.5000000000000004?t[8]>1218.5000000000002?ce=-.07634466313617769:ce=.0287825335169114:ce=-.06894721943300268:ce=-.00023988459059521937;let J;t[131]>1e-35?t[1]>93.50000000000001?J=-.05706887458825395:t[2]>1.5000000000000002?J=.011446637886629108:J=-.10616119878749211:t[230]>1e-35?t[4]>6.500000000000001?t[0]>4977.500000000001?J=.08424281276381033:t[3]>17.500000000000004?t[20]>1e-35?J=.11146885439601915:t[8]>61.50000000000001?t[0]>3530.5000000000005?t[9]>48.50000000000001?t[9]>61.50000000000001?J=.026278724448495064:J=.17053138400480508:t[0]>4463.500000000001?J=-.06482289890096041:J=.03026516489536295:J=-.031785170717683144:J=.1312690622980455:t[13]>1e-35?J=.14336922540461444:J=.03523850945454039:J=-.015407465968975714:t[39]>1e-35?J=-.054809635385158186:t[32]>1e-35?t[0]>4242.500000000001?J=-.0659975068798723:J=-.008386582621403979:t[4]>60.50000000000001?t[10]>75.50000000000001?t[3]>107.50000000000001?J=-.04225314193574262:t[3]>70.50000000000001?t[1]>29.500000000000004?J=.057409156184759516:J=.2024322059866388:J=-.030670938454461245:t[10]>1e-35?t[0]>4733.500000000001?J=.010648654146284154:t[308]>1e-35?J=.008728141696325391:t[4]>64.50000000000001?t[298]>1e-35?J=.12364025998551711:J=-.02247495081065243:t[1]>22.500000000000004?J=-.0726295464624251:J=.03481895086048152:t[0]>4331.500000000001?J=-.04775443357020673:J=.07172377425057568:t[2]>89.50000000000001?J=-.11782645274716962:J=.00010092665257989378;let Te;t[147]>1e-35?Te=-.041560228567115574:t[302]>1e-35?t[10]>47.50000000000001?Te=.062292114082780084:t[10]>5.500000000000001?t[7]>22.500000000000004?Te=-.016101990375700172:t[0]>2579.5000000000005?Te=-.13045089661551845:Te=-.02874367814784938:Te=.025835149631944995:t[167]>1e-35?t[0]>3928.5000000000005?Te=.17084176915326055:Te=-.019195947948312853:t[222]>1e-35?t[30]>1e-35?t[1]>36.50000000000001?t[8]>45.50000000000001?t[8]>578.5000000000001?t[1]>67.50000000000001?Te=.10591712319944074:Te=-.024082167264285:Te=.16497698867036126:Te=-.04985066326861431:t[0]>1937.5000000000002?t[2]>16.500000000000004?Te=-.021012910475524206:Te=-.13058422554298485:t[0]>1102.5000000000002?Te=.10955864175201457:Te=-.03566689354348996:t[1]>11.500000000000002?Te=-.02093884208606101:Te=.09107244766183857:t[126]>1e-35?t[10]>32.50000000000001?t[8]>719.5000000000001?Te=-.013861861436128482:Te=.09756849802202777:t[224]>1e-35?t[1]>51.50000000000001?Te=.10163873449625677:Te=-.02779270277623805:t[1]>26.500000000000004?Te=-.08035058228527389:Te=.0005719695099064484:t[191]>1e-35?t[9]>9.500000000000002?Te=-.007028075523033826:Te=.0489470913925288:t[1]>61.50000000000001?t[132]>1e-35?Te=.11230846723576784:t[0]>350.50000000000006?t[2]>1.5000000000000002?Te=-.0032075580718124892:Te=-.04442829143298883:Te=-.06597073245775804:Te=.0015594090939337751;let fe;t[223]>1e-35?t[8]>668.5000000000001?fe=-.12803889879260094:fe=.002171373740016862:t[121]>1e-35?t[0]>4720.500000000001?t[217]>1e-35?fe=.08967966612917375:t[1]>39.50000000000001?fe=-.059791671514498074:fe=.05648934961902822:t[2]>59.50000000000001?fe=-.08633234097449628:t[6]>53.50000000000001?fe=.11140345067444689:t[1]>56.50000000000001?t[4]>7.500000000000001?t[0]>3560.5000000000005?fe=.025606129643140924:fe=.13835395886271978:fe=-.09361630641448024:t[4]>7.500000000000001?t[1]>26.500000000000004?t[1]>49.50000000000001?fe=-.09975506556937946:t[10]>36.50000000000001?fe=-.09427724661655643:t[10]>24.500000000000004?fe=.07329330653410447:fe=-.02271182965807972:fe=-.09767874967639482:t[6]>13.500000000000002?t[10]>23.500000000000004?fe=-.05082091374050816:fe=.1687114435254966:t[0]>2314.5000000000005?fe=-.06422664016383926:fe=.0636688376664789:t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?fe=-.06857762517406195:t[9]>71.50000000000001?t[0]>4188.500000000001?fe=-.1274167728754332:fe=.01308079126447365:t[4]>73.50000000000001?fe=.13854015371106546:t[4]>48.50000000000001?fe=-.03684255740123261:t[6]>45.50000000000001?fe=.10329912215813097:t[10]>77.50000000000001?fe=-.08630788656925215:fe=.031022006843800853:t[1]>25.500000000000004?fe=-.08278381528048026:fe=.06664374548141594:t[84]>1e-35?fe=-.05624227409079396:fe=.00012184182357340415;let Ne;t[179]>1e-35?Ne=-.07443348719246982:t[40]>1e-35?t[0]>1937.5000000000002?Ne=-.07595415373151816:Ne=.054065040429292326:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[0]>1187.5000000000002?Ne=.022822510448266862:Ne=.17491569312933697:Ne=-.058362287133533565:t[2]>2.5000000000000004?Ne=-.03633895806364428:Ne=.06397808186120692:t[8]>4968.500000000001?t[1]>31.500000000000004?Ne=-.07294848747514579:Ne=.025053613105805606:t[230]>1e-35?t[4]>6.500000000000001?t[107]>1e-35?Ne=-.07009535282685533:t[8]>2640.0000000000005?Ne=-.051761240111316276:t[131]>1e-35?Ne=-.06245774419231631:Ne=.03495606662854905:Ne=-.013863522184803188:t[131]>1e-35?t[1]>93.50000000000001?t[1]>105.50000000000001?Ne=.0015036626973581122:Ne=-.12505706794835883:t[1]>48.50000000000001?t[276]>1e-35?Ne=.10435171369790015:t[0]>5026.500000000001?t[0]>5308.500000000001?Ne=.022343994371919224:Ne=-.14087991797693533:t[8]>1323.5000000000002?t[10]>49.50000000000001?Ne=.07724450228328664:t[0]>3853.5000000000005?Ne=-.15671707454435677:t[10]>28.500000000000004?Ne=-.10179090671841723:Ne=.014878216919760927:Ne=.03967665658164865:t[8]>2696.5000000000005?t[15]>1e-35?Ne=.14054154485273487:Ne=.01821247272493051:t[2]>5.500000000000001?t[2]>100.50000000000001?Ne=-.08632985141410315:Ne=.005524157938954954:Ne=-.08802502622523681:Ne=-.0004649168897260341;let Ve;t[86]>1e-35?t[8]>65.50000000000001?t[1]>32.50000000000001?t[4]>16.500000000000004?Ve=-.007458687464321174:Ve=-.09444966249102484:t[1]>23.500000000000004?Ve=.08564129697360716:Ve=-.07105002902845851:Ve=.05688756955238231:t[294]>1e-35?t[10]>50.50000000000001?Ve=-.10326216566705966:t[1]>26.500000000000004?Ve=.0050539832484585365:Ve=-.07080395606126953:t[306]>1e-35?t[149]>1e-35?Ve=-.10399433201474328:t[2]>14.500000000000002?t[9]>6.500000000000001?Ve=.05783632021087773:t[10]>17.500000000000004?Ve=-.06720598671764105:t[1]>47.50000000000001?Ve=.097495825172558:Ve=-.013372242800584872:Ve=-.06463226787713715:t[42]>1e-35?Ve=-.0885725817597767:t[204]>1e-35?t[1]>62.50000000000001?Ve=-.07496598696848249:t[1]>29.500000000000004?t[8]>446.50000000000006?Ve=.11051270080118503:Ve=.027719462817590454:t[8]>597.5000000000001?Ve=-.08441503592016869:Ve=.05534229430302502:t[223]>1e-35?t[8]>668.5000000000001?Ve=-.12190088985091102:Ve=-.0067442838156576345:t[148]>1e-35?t[9]>79.50000000000001?Ve=.09225972475904022:t[2]>10.500000000000002?t[1]>102.50000000000001?Ve=.11805676536334647:t[8]>1726.5000000000002?t[9]>10.500000000000002?Ve=.016585157185448045:Ve=-.11032043771149425:Ve=.01586986028570486:t[8]>388.50000000000006?Ve=-.10592413013261853:Ve=.04930703248769364:t[13]>1e-35?Ve=.003621937787920821:Ve=-.0013786331198611841;let Ue;t[145]>1e-35?t[1]>32.50000000000001?t[1]>38.50000000000001?t[10]>55.50000000000001?t[1]>54.50000000000001?Ue=.009769895322846493:Ue=-.10620052926943656:t[9]>19.500000000000004?Ue=.03781202525403449:t[9]>14.500000000000002?Ue=-.11485785321365344:t[9]>6.500000000000001?Ue=.07677177833073881:t[0]>4342.500000000001?Ue=-.07079285609687631:t[49]>1e-35?Ue=.06156814809246001:Ue=-.014788509042554625:Ue=-.032659201618470655:t[5]>5207.500000000001?Ue=-.09013500825185713:t[3]>10.500000000000002?t[8]>1787.5000000000002?Ue=-.03094160322187924:t[1]>29.500000000000004?Ue=.09474646043921069:Ue=.023445783928231618:Ue=.09342846694174194:t[0]>533.5000000000001?t[204]>1e-35?t[1]>62.50000000000001?Ue=-.07164443768784848:t[1]>29.500000000000004?Ue=.089473622509272:t[8]>597.5000000000001?Ue=-.08155349903101317:Ue=.07098423265024251:t[8]>691.5000000000001?t[5]>2252.5000000000005?Ue=-.004003900679358653:t[190]>1e-35?Ue=-.09236113461485262:t[8]>3198.5000000000005?Ue=-.0124130160451179:Ue=.018453070064009328:t[15]>1e-35?Ue=.012013209112857824:t[7]>4.500000000000001?t[7]>5.500000000000001?Ue=-.0009580759587680961:Ue=-.03227283036698222:Ue=.01369287669536875:t[1]>50.50000000000001?Ue=-.04213060332500437:t[35]>1e-35?Ue=-.11508095777767471:t[190]>1e-35?Ue=-.08611884672400155:t[297]>1e-35?Ue=.05723551879433584:Ue=-.004829340082311461;let Ke;t[183]>1e-35?Ke=-.037994150023203555:t[227]>1e-35?t[17]>1e-35?t[3]>20.500000000000004?t[10]>36.50000000000001?Ke=-.11753465135886734:Ke=-.007515490299047085:Ke=-.08576941990777916:t[8]>1641.5000000000002?t[10]>37.50000000000001?Ke=-.12371142493530439:t[1]>36.50000000000001?Ke=.032189417575190435:Ke=-.10339125953022954:t[3]>32.50000000000001?t[4]>27.500000000000004?t[1]>59.50000000000001?Ke=-.0784518658439288:t[2]>54.50000000000001?Ke=.12477882322370665:Ke=.000313468482399738:Ke=.12261955132611434:t[8]>81.50000000000001?t[23]>1e-35?Ke=.04969252946760318:t[8]>511.50000000000006?t[8]>1146.5000000000002?Ke=.0353146070135579:Ke=-.06327619611098285:Ke=.02813577701641991:Ke=-.12354390728506215:t[34]>1e-35?Ke=-.07664408516055397:t[3]>99.50000000000001?t[1]>16.500000000000004?t[1]>26.500000000000004?Ke=-.01245803535276381:Ke=-.07169472553475001:t[1]>11.500000000000002?Ke=.12989984824561698:Ke=-.01201544398886606:t[6]>91.50000000000001?t[1]>22.500000000000004?Ke=.010390226893521422:t[10]>14.500000000000002?Ke=.16790888126487719:Ke=.010614982228955577:t[4]>79.50000000000001?t[9]>44.50000000000001?t[0]>3853.5000000000005?Ke=-.043398307129729134:Ke=.09963544907820426:t[9]>30.500000000000004?Ke=-.13540713124984502:t[9]>17.500000000000004?Ke=.0509435850590757:Ke=-.04761897852404613:t[4]>78.50000000000001?Ke=.09197086656470652:Ke=.0006771050176682337;let X;t[122]>1e-35?t[6]>36.50000000000001?X=.05686884451670743:X=-.05334759543084309:t[266]>1e-35?X=-.08603579519816038:t[157]>1e-35?X=-.06736746113382097:t[302]>1e-35?t[0]>2579.5000000000005?X=-.0499592651503952:t[0]>725.5000000000001?X=.11780353905132664:X=-.05232097173108943:t[147]>1e-35?t[1]>53.50000000000001?X=-.11398297342629615:t[0]>2604.5000000000005?t[0]>3629.5000000000005?X=-.03190157229022304:X=.07985197845805492:X=-.0763078988943886:t[4]>41.50000000000001?t[280]>1e-35?X=.05162933940904835:t[11]>1e-35?t[0]>460.50000000000006?X=-.027174047777029083:X=.057117284879796476:t[3]>43.50000000000001?X=-.0016147040913107311:X=-.05856597304613519:t[2]>45.50000000000001?t[0]>4663.500000000001?t[18]>1e-35?X=-.04779247091640426:t[10]>25.500000000000004?t[9]>22.500000000000004?t[22]>1e-35?X=-.01466076988151239:X=.13375695925484857:X=-.04885873081899647:t[0]>5566.500000000001?X=.11086813028591343:t[8]>992.5000000000001?X=-.07622304217072383:X=.04316019272026325:t[10]>12.500000000000002?t[9]>36.50000000000001?t[9]>45.50000000000001?X=.03285858361708423:X=-.12354858211764992:X=.0672788301823281:t[15]>1e-35?X=.08658836986585006:X=-.02741484278509758:t[290]>1e-35?X=-.08161310335133287:t[135]>1e-35?X=-.04824156054814152:X=.0009156904299554183;let le;t[3]>7.500000000000001?le=.0006791852818377787:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?le=.03642374718166293:le=.16379973756366603:le=-.03946685266127979:t[186]>1e-35?le=.07618896623420895:t[96]>1e-35?le=.0680272261319657:t[107]>1e-35?t[1]>48.50000000000001?le=-.022822371600847505:le=.0501405836324949:t[203]>1e-35?t[1]>77.50000000000001?le=.044416424920571296:le=-.0648450593196238:t[5]>3921.5000000000005?t[1]>110.50000000000001?le=-.11110466767595227:t[9]>5.500000000000001?t[9]>52.50000000000001?t[1]>50.50000000000001?le=.1061937286809567:t[7]>54.50000000000001?le=.11487507743121311:t[8]>819.5000000000001?le=-.07181278009001418:t[10]>25.500000000000004?le=.13499019430369633:t[1]>31.500000000000004?le=.09032979489780704:le=-.12754166393372374:t[9]>37.50000000000001?le=-.05093963635361407:le=-.005026651151683848:t[9]>2.5000000000000004?le=.07619735785573735:le=.012363301341532136:t[26]>1e-35?le=-.10685800454968203:t[8]>125.50000000000001?t[8]>446.50000000000006?t[0]>3842.5000000000005?le=-.08783796894105043:t[282]>1e-35?t[1]>47.50000000000001?t[9]>40.50000000000001?le=-.10764172927882483:le=.01890760098464703:le=.06573095405846417:t[8]>634.5000000000001?le=-.00783575973273707:le=-.050612689680229306:t[1]>22.500000000000004?le=-.0016842490401359626:le=.0738227088444087:le=-.02663970950432175;let te;t[31]>1e-35?t[8]>17.500000000000004?te=.013678038624884814:t[1]>35.50000000000001?t[1]>51.50000000000001?te=.007191286124908192:te=-.09347881647636902:t[10]>1.5000000000000002?te=.07938758708008091:te=-.008702935600305113:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?te=.12321804057595996:te=-.018281109320672437:t[23]>1e-35?t[4]>62.50000000000001?te=-.04644244754790671:te=.024546310702263208:t[8]>862.5000000000001?t[0]>3429.5000000000005?t[4]>9.500000000000002?t[52]>1e-35?te=.0706108609273337:t[2]>40.50000000000001?te=-.028046629962303716:te=-.06497613993109329:te=.01076489668586676:t[1]>33.50000000000001?t[0]>966.5000000000001?t[2]>14.500000000000002?t[1]>38.50000000000001?te=-.03056331974267756:te=-.11886389712497057:te=.053364962175658184:t[8]>2233.5000000000005?te=-.0448152521157682:te=.1508651602190868:t[2]>33.50000000000001?t[0]>2882.5000000000005?t[0]>3183.5000000000005?te=.03818796510453344:te=.23673992112982362:te=.02858814226507374:t[10]>44.50000000000001?te=-.1125863771551199:te=.009129996952394916:t[1]>7.500000000000001?te=-.004374525302461639:te=-.07858519434925451:t[149]>1e-35?t[6]>23.500000000000004?te=.0005231594491642136:t[0]>4053.5000000000005?t[8]>660.5000000000001?te=-.13677189943034931:t[10]>2.5000000000000004?te=.039591891437078086:te=-.09312596849507347:te=-.02423172142089822:te=.0009836986075266283;let xe;t[189]>1e-35?t[0]>5269.500000000001?xe=-.103183298350443:t[2]>51.50000000000001?xe=.09784373530929913:t[10]>26.500000000000004?t[8]>764.5000000000001?xe=-.05186168947388339:xe=.0496996365539082:t[10]>23.500000000000004?xe=.1404445738719:t[93]>1e-35?xe=.0027146310074558505:t[5]>3821.5000000000005?xe=.002153033152069652:t[4]>2.5000000000000004?xe=.007663539551317215:xe=.13902616832015402:t[298]>1e-35?t[8]>81.50000000000001?t[4]>64.50000000000001?xe=.11498405722487515:t[2]>23.500000000000004?t[0]>2815.5000000000005?t[2]>44.50000000000001?t[4]>42.50000000000001?xe=-.021479467709980358:xe=.09336868994327292:t[1]>22.500000000000004?t[15]>1e-35?xe=.021660293256233334:xe=-.0927396152303864:xe=.0665074081601698:t[0]>1550.5000000000002?xe=.08972407105958534:xe=-.0380796411182682:t[6]>13.500000000000002?t[10]>2.5000000000000004?xe=.06761927942466854:xe=-.015762168112653286:t[17]>1e-35?xe=.10311304131145381:xe=-.017672785252336027:xe=-.08629805732772755:t[1]>24.500000000000004?t[138]>1e-35?xe=-.10638321435298535:xe=.0007073011744385905:t[18]>1e-35?xe=-.027056185501334325:t[145]>1e-35?xe=.023191199677450886:t[9]>33.50000000000001?t[201]>1e-35?xe=.09762140519655171:t[9]>110.50000000000001?xe=-.06581942957595835:t[6]>54.50000000000001?xe=.04959634035251596:xe=.0022616298654554207:xe=-.007437620924990854;let Z;t[179]>1e-35?Z=-.06961998209988884:t[167]>1e-35?t[0]>3928.5000000000005?Z=.1470294450403005:Z=-.01671476793947083:t[187]>1e-35?t[6]>13.500000000000002?t[4]>30.500000000000004?t[13]>1e-35?Z=.07448480853603114:t[0]>1012.5000000000001?t[5]>2883.5000000000005?t[0]>3682.5000000000005?t[5]>4031.5000000000005?t[23]>1e-35?Z=.07965955447707423:t[10]>10.500000000000002?Z=-.09236156404262426:Z=.03396273196231458:Z=-.13246465021467432:Z=.07092822261735353:Z=-.08753829085942:Z=.09409024840640956:t[1]>40.50000000000001?t[8]>984.5000000000001?t[8]>1514.5000000000002?t[8]>2134.5000000000005?Z=.004705878789890202:Z=.13775378964952867:Z=-.04770928980587811:t[10]>29.500000000000004?Z=.011221519891071544:t[0]>3853.5000000000005?Z=.06365381191628273:Z=.15506252245336827:t[1]>37.50000000000001?Z=-.07254777021042061:Z=.026514587757252385:t[308]>1e-35?Z=.04115804816617256:t[10]>26.500000000000004?Z=.02077721353011946:t[5]>3548.5000000000005?Z=-.1280907116663952:Z=-.021974774274438:t[306]>1e-35?Z=-.02700446558079895:t[297]>1e-35?t[212]>1e-35?Z=.07794139136748461:t[7]>5.500000000000001?t[19]>1e-35?Z=-.005710865560475598:t[94]>1e-35?Z=-.06751507982853555:Z=.027250040757588703:t[9]>52.50000000000001?Z=.07060357924595577:Z=-.030297760713011795:Z=-.0006005400085266517;let ae;t[113]>1e-35?ae=-.07311041707507712:t[40]>1e-35?t[0]>1937.5000000000002?ae=-.06996356565314456:ae=.04780211300352931:t[10]>52.50000000000001?t[49]>1e-35?ae=-.08317707559926495:t[21]>1e-35?ae=-.0817284654645976:t[15]>1e-35?t[2]>3.5000000000000004?ae=-.010538203005984922:ae=.08454819465349446:t[9]>124.50000000000001?ae=.09015659250299132:t[7]>15.500000000000002?t[5]>5732.500000000001?ae=-.08542251249346582:t[9]>50.50000000000001?ae=-.023428882537657472:ae=.010042500833979073:ae=.020697210754240154:t[10]>28.500000000000004?t[5]>423.00000000000006?t[148]>1e-35?ae=.03006025206979096:t[9]>108.50000000000001?ae=-.09153851322499747:t[145]>1e-35?t[5]>4814.500000000001?t[2]>38.50000000000001?ae=.04222035773042132:ae=-.09078149053947535:t[8]>568.5000000000001?t[1]>64.50000000000001?ae=-.07209095448054853:ae=.028065954981903313:ae=.08714651929917122:ae=-.006678820669279169:t[10]>40.50000000000001?ae=.006982396294941626:ae=-.07889649792011418:t[94]>1e-35?t[4]>30.500000000000004?ae=-.09351114982645548:t[4]>3.5000000000000004?ae=-.004837550129223451:ae=-.08324141237464677:t[303]>1e-35?ae=.10703037493990825:t[9]>156.50000000000003?ae=-.10803018621648303:t[116]>1e-35?ae=-.03208302566598311:t[212]>1e-35?t[243]>1e-35?ae=.10261721665006701:ae=.018994509090668264:ae=.0011244262442038839;let De;t[86]>1e-35?t[8]>65.50000000000001?t[1]>46.50000000000001?De=-.08404263465005328:t[0]>3682.5000000000005?De=.041259223920298876:t[1]>29.500000000000004?De=-.09541257493441671:De=.001482192721625409:De=.051541427372951004:t[3]>7.500000000000001?t[157]>1e-35?De=-.08268996098437432:t[230]>1e-35?De=.015749498159959817:t[4]>7.500000000000001?t[3]>11.500000000000002?De=-913218977737457e-19:t[4]>10.500000000000002?De=-.056334165674005156:t[127]>1e-35?De=-.0784634021824036:t[2]>9.500000000000002?t[1]>62.50000000000001?De=-.04231200150318989:t[10]>42.50000000000001?De=.10182973257894812:De=.015934763950068445:De=-.03130938805859397:t[92]>1e-35?t[4]>6.500000000000001?t[1]>51.50000000000001?t[9]>19.500000000000004?De=-.041117068322885315:De=.1167767830037126:De=.13611206992387337:t[10]>41.50000000000001?De=-.07120286010564107:De=.022032788063345417:t[8]>1.5000000000000002?t[1]>51.50000000000001?t[9]>72.50000000000001?De=-.07702290997669524:t[198]>1e-35?De=.08776558554437136:De=-.008290740324975692:t[2]>32.50000000000001?De=.07198457624219955:De=.005463113714361629:De=.09414099512900526:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?De=.03295785445437507:De=.15140250150674536:De=-.035613213948910254:t[186]>1e-35?De=.06849425535860769:t[96]>1e-35?De=.06028225812727254:De=-.007582543288662308;let Y;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?Y=.08396556264106572:Y=-.0562516995099192:Y=-.10593011018789432:t[183]>1e-35?t[15]>1e-35?Y=-.09705176473553752:t[7]>18.500000000000004?t[2]>37.50000000000001?Y=.0052017514017035915:Y=-.11194119432743639:Y=.03724337696163019:t[227]>1e-35?t[17]>1e-35?t[2]>16.500000000000004?Y=-.025692451287403446:Y=-.09511862672123193:t[8]>1661.5000000000002?t[10]>37.50000000000001?Y=-.11892250746801664:t[10]>22.500000000000004?Y=.07548493166973796:Y=-.05973048107712209:t[4]>12.500000000000002?t[0]>4319.500000000001?t[10]>4.500000000000001?t[10]>37.50000000000001?Y=.13750699058082427:t[18]>1e-35?Y=.06535408879552801:Y=-.054118179035040674:Y=.1344282838979622:t[0]>3982.5000000000005?Y=-.10409582202467015:t[19]>1e-35?Y=.12672850705810795:t[8]>587.5000000000001?t[1]>35.50000000000001?Y=.012705935670766466:Y=.14149359442527545:Y=-.047977876173706004:t[20]>1e-35?Y=.057945228080337946:t[0]>3642.5000000000005?Y=-.008726535792122467:Y=-.08424769891378858:t[34]>1e-35?Y=-.0699329538228602:t[134]>1e-35?t[11]>1e-35?t[4]>15.500000000000002?t[0]>1187.5000000000002?Y=.01196849566739346:Y=.1614642278429876:Y=-.043022338150701625:t[3]>5.500000000000001?Y=-.03907848255033881:Y=.018280601026175593:Y=.0006654540402589085;let ee;t[31]>1e-35?t[2]>58.50000000000001?t[9]>1.5000000000000002?ee=-.01386103677247845:ee=.11386694333005128:t[4]>27.500000000000004?ee=-.021862617610091336:t[2]>31.500000000000004?ee=.0828858469030438:ee=.006483353475830127:t[224]>1e-35?t[149]>1e-35?t[13]>1e-35?ee=.11303635767048735:ee=-.01645525128352694:t[23]>1e-35?t[4]>62.50000000000001?ee=-.04238798044549342:ee=.022091190130494303:t[5]>5082.500000000001?ee=-.04287166152163786:t[8]>862.5000000000001?t[19]>1e-35?ee=.000660344696244351:t[4]>9.500000000000002?t[0]>1277.5000000000002?ee=-.04291104140431434:t[17]>1e-35?ee=.11256797532342613:ee=-.017206916368289193:ee=.026482035265709743:t[1]>8.500000000000002?t[11]>1e-35?ee=.04060606971664621:t[0]>4733.500000000001?t[8]>214.50000000000003?t[5]>4814.500000000001?ee=.03581712466863222:ee=.14770264307668884:t[8]>73.50000000000001?ee=-.13093289429740068:ee=.042461737442702936:t[52]>1e-35?ee=.0501831919044939:ee=-.010450249720465756:ee=-.0753365425372656:t[149]>1e-35?t[6]>23.500000000000004?ee=.0005381332165438493:ee=-.04549431717503909:t[133]>1e-35?t[2]>5.500000000000001?t[8]>698.5000000000001?t[282]>1e-35?ee=.04849637311285226:ee=-.036671377119808564:t[0]>421.50000000000006?ee=.00020968499911058945:ee=.11636422423182405:ee=-.12687837788222575:ee=.0012774367867215346;let Ee;t[120]>1e-35?Ee=.04776057572434719:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?Ee=-.042799574885345304:Ee=.07412430171193245:Ee=-.11248270469336048:t[193]>1e-35?Ee=-.060694220820603384:t[121]>1e-35?t[217]>1e-35?t[0]>4449.500000000001?t[4]>8.500000000000002?Ee=.028911612178122104:Ee=.12326369727728437:t[0]>4091.5000000000005?Ee=-.09370267064141052:t[0]>3519.5000000000005?t[8]>668.5000000000001?Ee=.1159839898100149:Ee=-.01924880886585737:t[8]>501.50000000000006?t[10]>16.500000000000004?Ee=-.0216343737351583:Ee=-.1220272260878369:t[2]>18.500000000000004?Ee=.09152924475072398:t[8]>55.50000000000001?Ee=.039508716651005665:Ee=-.11714436880423203:t[18]>1e-35?t[9]>2.5000000000000004?Ee=.06793009902674053:Ee=-.024060578029812988:t[4]>2.5000000000000004?t[2]>16.500000000000004?t[4]>11.500000000000002?Ee=-.04391068849624096:Ee=.04009967593394672:t[8]>1085.5000000000002?Ee=-.024773826356034825:Ee=-.13919707884246582:Ee=.06659278075192335:t[223]>1e-35?t[8]>668.5000000000001?Ee=-.11567917501901476:Ee=-.006813640337684114:t[3]>7.500000000000001?Ee=.0010671269682548076:t[7]>3.5000000000000004?t[1]>33.50000000000001?t[0]>1597.5000000000002?t[10]>1.5000000000000002?Ee=-.001754586408351048:Ee=-.055422422450722056:Ee=-.06090032532532226:t[0]>5269.500000000001?Ee=.11787981735983527:Ee=-.00198119768540783:Ee=.00210412924303036;let Ae;t[294]>1e-35?t[10]>50.50000000000001?Ae=-.09738558653332406:t[0]>2432.5000000000005?t[0]>4533.500000000001?Ae=-.06063239096209816:Ae=.03317022411417386:Ae=-.08607562321324262:t[120]>1e-35?t[4]>18.500000000000004?Ae=-.013608609329298802:Ae=.09078000157330264:t[99]>1e-35?Ae=.014828708581964632:t[10]>52.50000000000001?t[49]>1e-35?Ae=-.07536137260189814:Ae=.006253266595455118:t[10]>28.500000000000004?Ae=-.006106041147592768:t[9]>156.50000000000003?Ae=-.11828932797811101:t[94]>1e-35?Ae=-.02566078479505714:t[303]>1e-35?Ae=.09544850289775349:t[15]>1e-35?t[224]>1e-35?t[4]>56.50000000000001?Ae=-.08401252789168523:t[5]>4244.500000000001?Ae=.026372887658499107:t[1]>16.500000000000004?Ae=-.027836756345634026:Ae=.09205362097909099:Ae=.00934612788718244:t[203]>1e-35?Ae=-.016371658366767253:t[7]>26.500000000000004?t[0]>966.5000000000001?t[1]>38.50000000000001?t[146]>1e-35?t[9]>21.500000000000004?Ae=-.09580979052540028:t[1]>50.50000000000001?Ae=-.06402211827281554:Ae=.08342858760095972:t[2]>36.50000000000001?Ae=.008114897658204584:t[92]>1e-35?Ae=.09541587072672864:Ae=-.022342147210555434:Ae=-.01660492519175128:Ae=.014721622240945446:t[4]>25.500000000000004?t[11]>1e-35?Ae=.15846731118501817:Ae=.039498507912023195:t[245]>1e-35?Ae=.07008718676813333:Ae=.0019806389728814727;let ve;t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[0]>4188.500000000001?ve=-.01192072916082109:ve=.13888590840802637:t[1]>16.500000000000004?t[8]>2302.5000000000005?ve=.06874032717466054:t[4]>40.50000000000001?ve=-.07752510020707537:t[1]>76.50000000000001?ve=-.09944032260703917:t[8]>1381.5000000000002?ve=-.054466635810800745:t[1]>32.50000000000001?ve=.05974084520839573:ve=-.0384718740755954:ve=-.11374190719134032:t[0]>2151.5000000000005?ve=-.13703645155803298:ve=.004833344758654556:t[297]>1e-35?t[212]>1e-35?ve=.06954747264544993:t[7]>9.500000000000002?t[19]>1e-35?t[1]>30.500000000000004?t[0]>4242.500000000001?ve=.013539805885738608:ve=-.0692740641801559:t[0]>2653.5000000000005?t[10]>57.50000000000001?ve=.09941880179344399:ve=-.01608127391210995:ve=.08025226531247417:t[9]>67.50000000000001?ve=.13525448212444113:t[6]>61.50000000000001?ve=-.05511099182158894:t[94]>1e-35?ve=-.06821509831783572:t[128]>1e-35?ve=.11361314817714643:ve=.030160785008575566:t[1]>13.500000000000002?t[8]>17.500000000000004?t[16]>1e-35?ve=-.09954181329804547:t[197]>1e-35?ve=.10102833149755386:t[188]>1e-35?ve=.05584490988313965:t[9]>49.50000000000001?t[4]>5.500000000000001?ve=-.03781554214742005:ve=.09927933385592314:ve=-.020006000056720083:ve=-.10520473615957895:ve=-.12006990846253787:ve=-.00026111570975317574;let We;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[0]>1725.5000000000002?t[7]>14.500000000000002?t[2]>38.50000000000001?We=-.019188245509744628:We=-.13354864350075848:t[0]>2461.5000000000005?We=.051885477468354396:We=-.0833581968852119:We=.08233441701532287:We=-.10865584951212362:t[8]>2992.5000000000005?t[10]>49.50000000000001?t[10]>56.50000000000001?t[1]>45.50000000000001?t[0]>2041.5000000000002?We=.09926337893072812:We=-.027753610497327715:t[0]>1972.5000000000002?We=-.09780045823152517:We=.032380915168504935:We=.11502632261226381:t[17]>1e-35?We=-.06094965899579662:t[10]>40.50000000000001?We=-.07500475582440802:We=.006499832113084677:t[10]>4.500000000000001?t[4]>10.500000000000002?We=-.09584538995220808:We=-.00908705814304442:We=.03203281520813893:t[10]>49.50000000000001?We=-.03146271513986384:t[2]>63.50000000000001?We=.13172001315536286:t[224]>1e-35?We=.08945777550527927:t[0]>2282.5000000000005?t[4]>4.500000000000001?We=.09521549382082259:We=-.04414925613522197:t[0]>1847.5000000000002?We=-.09118580379557353:We=.009206744918282364:t[178]>1e-35?t[2]>25.500000000000004?t[1]>31.500000000000004?We=.03525144509943896:We=-.053340750721609057:t[0]>1057.5000000000002?t[10]>2.5000000000000004?We=-.04766112322938157:t[2]>10.500000000000002?We=.0728516504357201:We=-.05049625965272536:We=-.10868663055825774:We=.0005382613419948969;let Ze;t[147]>1e-35?t[1]>53.50000000000001?Ze=-.10615739288764095:t[0]>2604.5000000000005?t[0]>3629.5000000000005?Ze=-.030504020655417463:Ze=.07102458639110094:Ze=-.07058131985243714:t[302]>1e-35?t[10]>47.50000000000001?Ze=.055304563442710876:t[1]>53.50000000000001?Ze=.033723409577443623:t[8]>175.50000000000003?t[0]>2628.5000000000005?t[9]>40.50000000000001?Ze=-.1568835288372895:Ze=-.0279829124400056:Ze=.04493843959601833:Ze=-.11637042729644327:t[191]>1e-35?t[282]>1e-35?Ze=-.054133834303687026:t[9]>48.50000000000001?Ze=.11263810289007213:t[9]>9.500000000000002?Ze=-.02202034562838259:t[4]>45.50000000000001?Ze=-.03410927569045158:Ze=.04381615166534081:t[242]>1e-35?t[0]>3615.5000000000005?t[3]>19.500000000000004?t[1]>56.50000000000001?t[4]>28.500000000000004?Ze=-.029687297407295893:Ze=.10673602850001934:t[4]>42.50000000000001?Ze=.0036275562945108117:Ze=-.0760789221330622:Ze=-.10385623431741903:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Ze=.08274426793676076:Ze=-.07076234425516396:Ze=.13890177606150175:Ze=-.019863286503635686:t[53]>1e-35?t[18]>1e-35?Ze=-.09250637750836187:Ze=-.0031531727902009026:t[2]>107.50000000000001?t[4]>91.50000000000001?t[1]>16.500000000000004?Ze=-.01897867921812603:Ze=.04890781705365262:Ze=-.11569892307597907:t[2]>106.50000000000001?Ze=.09032697440623969:Ze=.00047935919155035045;let Et;t[115]>1e-35?Et=.05338335681275557:t[242]>1e-35?t[0]>3615.5000000000005?t[4]>42.50000000000001?t[4]>75.50000000000001?Et=-.10131179514695865:t[8]>938.5000000000001?Et=.10203729808015481:Et=-.015357944186835289:t[1]>56.50000000000001?t[2]>22.500000000000004?Et=.03574015165562999:Et=-.07763042506449493:Et=-.0813323116215548:t[2]>34.50000000000001?t[2]>44.50000000000001?t[4]>51.50000000000001?Et=.0665706259130275:Et=-.06586817559309924:Et=.11925564412287476:Et=-.014170019267143326:t[1]>124.50000000000001?t[2]>30.500000000000004?t[8]>533.5000000000001?t[4]>41.50000000000001?t[8]>977.5000000000001?Et=.046017146627455346:Et=-.08623321630086885:t[8]>1765.5000000000002?Et=-.017990564319859934:t[10]>25.500000000000004?t[10]>48.50000000000001?Et=.11143827902215087:Et=-.01817808730473413:Et=.16980985030210127:Et=-.09357806298740017:t[10]>7.500000000000001?t[10]>54.50000000000001?Et=.010168994879727824:Et=-.09099594488792513:t[9]>1.5000000000000002?Et=.0533459678147928:Et=-.06886854808370108:t[99]>1e-35?t[17]>1e-35?t[9]>22.500000000000004?Et=-.062346959148773695:t[1]>47.50000000000001?Et=-.0021578343835599316:t[2]>27.500000000000004?Et=.19567373210166172:Et=.07851555379116423:t[18]>1e-35?Et=.03711549097804649:t[8]>359.50000000000006?Et=.012492346746905587:t[4]>20.500000000000004?Et=.047511695735697544:Et=-.07999269063948773:Et=6802045404471004e-20;let Rt;t[222]>1e-35?t[0]>612.5000000000001?t[10]>1e-35?t[8]>2167.5000000000005?t[4]>25.500000000000004?Rt=.0011484728213539738:Rt=-.0936582904650763:t[2]>25.500000000000004?t[8]>182.50000000000003?t[10]>22.500000000000004?t[0]>5026.500000000001?Rt=-.09828874964938798:t[8]>1586.5000000000002?Rt=.13726397438080162:t[4]>48.50000000000001?t[2]>63.50000000000001?Rt=.011938269926919522:Rt=.17541983715953954:t[19]>1e-35?Rt=.023002786011088672:Rt=-.06221461272461431:t[9]>2.5000000000000004?t[0]>3818.5000000000005?Rt=.06508934844183291:Rt=-.10168553534835639:Rt=-.07755626499024171:t[2]>51.50000000000001?t[4]>65.50000000000001?Rt=.021140806225203937:Rt=-.1167833342453639:t[2]>33.50000000000001?Rt=.13163585734056618:Rt=-.00203273890889717:t[10]>36.50000000000001?t[8]>1067.5000000000002?Rt=.06314479201263888:Rt=-.09639088327091713:t[10]>29.500000000000004?Rt=.09225469303582386:t[0]>3129.5000000000005?t[0]>4091.5000000000005?t[0]>4354.500000000001?Rt=40577156464836036e-21:Rt=.12322387121810757:Rt=-.03697224045046014:t[1]>22.500000000000004?Rt=.016474835887320276:Rt=.16919298733903063:Rt=.07633203630214054:Rt=-.047438037934250644:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?Rt=.14150493354700563:Rt=-.01831155354975749:t[1]>28.500000000000004?Rt=-.07952557178685365:t[10]>28.500000000000004?Rt=.0665695554984927:Rt=-.053640139319277094:Rt=.0004754840665898665;let Qt;t[76]>1e-35?Qt=-.06814884255939921:t[179]>1e-35?Qt=-.06325743795510681:t[122]>1e-35?t[6]>36.50000000000001?Qt=.05052338063261613:t[8]>626.5000000000001?t[1]>38.50000000000001?Qt=.004193658608848433:Qt=-.1066968975983452:t[8]>302.50000000000006?Qt=.05476730110440451:Qt=-.06382970920394895:t[218]>1e-35?t[2]>3.5000000000000004?t[6]>13.500000000000002?t[2]>19.500000000000004?t[0]>3200.5000000000005?t[4]>91.50000000000001?Qt=-.12156071809840739:t[9]>21.500000000000004?t[5]>3883.5000000000005?t[8]>919.5000000000001?t[8]>1085.5000000000002?Qt=.013555772109446666:Qt=-.09856116699770784:Qt=.0284329611813383:t[2]>52.50000000000001?Qt=.04008708444763762:t[9]>29.500000000000004?Qt=-.1289599546008197:Qt=-.018566534248335896:t[8]>747.5000000000001?Qt=.02236484980076122:Qt=.1148871655157582:t[8]>3084.0000000000005?Qt=-.05573875952902531:t[10]>17.500000000000004?t[2]>51.50000000000001?Qt=.03164751204281298:Qt=.11752140436184891:t[9]>42.50000000000001?Qt=-.07180559595410106:t[22]>1e-35?Qt=.09325040416256854:Qt=-.016041122807939914:Qt=-.02765708954618808:t[1]>30.500000000000004?t[1]>66.50000000000001?Qt=-.010718250133458515:Qt=.09818827994853763:Qt=.010180038981174032:Qt=-.039472162599295535:t[9]>170.50000000000003?Qt=-.08536729235976731:t[189]>1e-35?t[0]>5269.500000000001?Qt=-.08674788057474031:Qt=.02077653508548371:Qt=-.0003536561382007414;let Ft;t[86]>1e-35?t[10]>6.500000000000001?t[0]>4376.500000000001?Ft=.018337297491457794:Ft=-.05926206443180149:Ft=.024026520855881126:t[288]>1e-35?t[184]>1e-35?Ft=.10747078482128616:t[126]>1e-35?Ft=-.10550625192391357:t[7]>71.50000000000001?Ft=-.07698346027863572:t[8]>302.50000000000006?t[6]>49.50000000000001?t[4]>47.50000000000001?t[1]>38.50000000000001?t[15]>1e-35?Ft=.1317396472229434:Ft=-.025035791351328947:Ft=-.0728334305864372:t[8]>963.5000000000001?Ft=.023642201723096064:Ft=.183010326734258:t[128]>1e-35?Ft=.04228920135648387:t[2]>34.50000000000001?t[15]>1e-35?Ft=.002801782941492993:t[3]>40.50000000000001?t[4]>39.50000000000001?Ft=-.1088876900335281:Ft=.02758317023002635:Ft=-.11886771300807207:t[9]>59.50000000000001?t[1]>33.50000000000001?Ft=-.01928020117446408:Ft=.10193718474139135:t[1]>48.50000000000001?t[4]>9.500000000000002?t[8]>932.5000000000001?Ft=.07893723375925096:Ft=-.009878929627026153:t[10]>2.5000000000000004?t[9]>20.500000000000004?Ft=-.10301657587280551:Ft=.005787463140224318:Ft=.07421364314695046:t[0]>2840.5000000000005?t[10]>29.500000000000004?Ft=-.019296977889522397:Ft=-.07274529751752634:t[1]>30.500000000000004?Ft=-.050368901143148286:Ft=.029630869489466655:t[2]>6.500000000000001?t[4]>9.500000000000002?Ft=.0015332402792773946:Ft=.09930153676749967:Ft=-.06370844564357069:Ft=.00042272155209927616;let ue;t[71]>1e-35?t[4]>17.500000000000004?ue=.12586844370423247:ue=-.006791999603126354:t[222]>1e-35?t[1]>10.500000000000002?t[30]>1e-35?t[1]>36.50000000000001?t[9]>1.5000000000000002?t[10]>25.500000000000004?ue=-.08474891624263797:t[8]>125.50000000000001?ue=.08125086980439704:ue=-.04082085238068532:t[0]>3863.5000000000005?ue=.020481535807469208:ue=.14810819386202126:t[0]>1937.5000000000002?t[2]>16.500000000000004?ue=-.019110200161573936:ue=-.12387719685855114:t[0]>1102.5000000000002?ue=.08376595701957407:ue=-.031821919580524834:t[9]>4.500000000000001?ue=-.08116383486497568:t[7]>8.500000000000002?t[2]>24.500000000000004?ue=-.02154820850475448:t[0]>3863.5000000000005?t[8]>902.5000000000001?ue=.1349841206807871:ue=.011864053595560297:t[1]>41.50000000000001?ue=-.08203662486612544:t[2]>18.500000000000004?ue=-.009541865642346947:ue=.08345043168501759:t[2]>10.500000000000002?ue=-.09585031818030947:ue=.019432330487099865:ue=.08399259524715129:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ue=.11951517733981365:ue=-.016651014735738538:t[1]>28.500000000000004?ue=-.07410922545030711:t[10]>28.500000000000004?ue=.05886430683844788:ue=-.04929626605117184:t[191]>1e-35?t[9]>9.500000000000002?t[9]>48.50000000000001?ue=.04802269879144705:ue=-.026208212831796737:t[4]>45.50000000000001?ue=-.03227476944664786:ue=.05124575625622705:ue=.00020506696916003137;let Be;t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?Be=-.03042091758483443:t[10]>14.500000000000002?Be=.09816619204768777:Be=.01332124067720947:t[8]>8.500000000000002?t[4]>15.500000000000002?Be=-.02381165060401718:Be=-.10950361804974783:Be=.03538211665111128:t[212]>1e-35?t[19]>1e-35?Be=-.09940014650006174:t[0]>2215.5000000000005?t[5]>5056.500000000001?t[3]>5.500000000000001?t[10]>25.500000000000004?Be=-.06371052144380579:Be=.0835500621252692:Be=-.10408255929333915:t[1]>74.50000000000001?Be=.13208968122712403:t[1]>64.50000000000001?Be=-.04778844603644965:t[8]>51.50000000000001?t[8]>201.50000000000003?t[8]>660.5000000000001?t[6]>4.500000000000001?t[9]>5.500000000000001?t[1]>29.500000000000004?t[0]>3830.5000000000005?Be=.09922816902423433:Be=.016366955328796718:Be=.1592412560903584:t[1]>39.50000000000001?Be=.05409467990258923:Be=-.08260633210459611:Be=-.06307205775247567:t[9]>36.50000000000001?Be=.040253940015648144:Be=.14202568969471283:Be=-.028761848341594044:Be=.08994073058773508:t[0]>807.5000000000001?Be=-.043427848826323195:Be=.04573516446846493:t[20]>1e-35?t[188]>1e-35?Be=-.0758877731600639:t[23]>1e-35?Be=.05913923322043199:t[8]>155.50000000000003?t[128]>1e-35?Be=.08124700978741987:Be=.013296063087086852:t[7]>5.500000000000001?Be=-.01640196088612987:Be=-.12685498840146067:Be=-.0004940792382459551;let et;t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?et=-.05584993681929434:t[9]>27.500000000000004?t[0]>3916.5000000000005?et=.08513773825688947:et=-.1184664832315282:et=.05676963535893477:et=.14263843210340613:et=.0005795003292924202:t[18]>1e-35?t[0]>5453.500000000001?t[1]>11.500000000000002?et=-.10669720555606924:et=.029016613003137307:t[2]>46.50000000000001?t[10]>9.500000000000002?et=.0664744575868955:et=-.08469256188890871:et=-.026746678040592144:t[281]>1e-35?et=-.07408427239006925:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?et=.012131807587207655:et=-.12776015795398743:et=.04320472481083551:et=.08390980661550446:t[10]>227.50000000000003?et=-.09771783809101153:t[10]>130.50000000000003?et=.11175201938704937:t[8]>779.5000000000001?t[5]>3325.5000000000005?t[128]>1e-35?et=-.07610698254064358:t[8]>902.5000000000001?et=-.03136381213599649:t[131]>1e-35?et=.0704821739127936:t[224]>1e-35?et=-.056961477774953785:t[10]>30.500000000000004?t[9]>43.50000000000001?et=.10431473040024908:t[8]>841.5000000000001?et=.07304745320500514:et=-.038011541882439825:et=-.01679746695007364:t[0]>3129.5000000000005?et=.05589952587431965:t[210]>1e-35?et=.06227198085800842:et=-.0011341890997947812:t[8]>740.5000000000001?et=.04817300084412584:et=-.000577001010789238;let lt;t[187]>1e-35?t[6]>12.500000000000002?t[10]>8.500000000000002?t[10]>16.500000000000004?t[8]>234.50000000000003?t[4]>43.50000000000001?t[0]>4476.500000000001?lt=-.10504730480402079:t[5]>3341.5000000000005?lt=.11087894671081754:lt=-.0406668834674614:lt=.03308382165616109:t[8]>104.50000000000001?lt=-.10431436764549162:lt=.0073928337244891455:t[4]>34.50000000000001?lt=-.10571751512748416:lt=-.006081128814142983:t[13]>1e-35?lt=.1299673566095023:t[4]>60.50000000000001?lt=-.06587492443829139:t[0]>2604.5000000000005?t[3]>19.500000000000004?lt=.04857126072645073:lt=-.03431365358104773:t[4]>16.500000000000004?lt=.04101865986596709:lt=.16480274980378218:t[10]>26.500000000000004?lt=.03673978504199255:t[10]>9.500000000000002?lt=-.10996402743800027:t[308]>1e-35?lt=.0553693735082498:lt=-.041600136235644125:t[306]>1e-35?t[8]>1156.5000000000002?t[4]>14.500000000000002?t[10]>21.500000000000004?lt=.010902983761213922:lt=.1325118659895645:lt=-.064362945508595:t[1]>66.50000000000001?lt=.033416767779331176:lt=-.054080316225040496:t[42]>1e-35?lt=-.07762364337810815:t[10]>1089.5000000000002?lt=-.08465599849125216:t[31]>1e-35?t[8]>30.500000000000004?lt=.012788520036013586:t[1]>32.50000000000001?t[1]>51.50000000000001?lt=.0220102041325908:lt=-.06516708740003069:lt=.012833498905748267:t[224]>1e-35?lt=-.007038418272997865:lt=.00037666304316290967;let ye;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?ye=.07554189644995735:ye=-.052089349455904946:ye=-.10148206848169845:t[113]>1e-35?ye=-.06666678653225779:t[39]>1e-35?t[9]>3.5000000000000004?t[0]>3670.5000000000005?ye=.07172653627995676:ye=-.07602959317610998:ye=-.08790686271287523:t[229]>1e-35?t[0]>2952.5000000000005?t[0]>3904.5000000000005?ye=-.0399322883690891:ye=.06523495517476098:ye=-.10358715295743802:t[193]>1e-35?ye=-.05551414334329124:t[134]>1e-35?t[11]>1e-35?t[2]>13.500000000000002?t[10]>1.5000000000000002?ye=.015928764772252406:ye=.1341513061552287:ye=-.04975001987586173:t[10]>2.5000000000000004?t[3]>5.500000000000001?t[9]>2.5000000000000004?t[8]>310.50000000000006?ye=-.033592997607280156:ye=-.12432458028446665:t[1]>32.50000000000001?t[217]>1e-35?ye=-.08402551858097379:ye=.017401984506038796:t[1]>25.500000000000004?ye=.13337205393591278:ye=-.01160208350090984:ye=.06708317942315471:t[8]>227.50000000000003?ye=-.08486943882418681:ye=-.013970104864235007:t[8]>4968.500000000001?t[1]>31.500000000000004?t[9]>4.500000000000001?ye=-.10496268177586783:ye=-.020921489532370493:ye=.02629915927247642:t[7]>20.500000000000004?t[8]>251.50000000000003?t[115]>1e-35?ye=.11639296062157028:ye=-.004275784356569115:t[32]>1e-35?ye=-.07297384970166025:ye=.006026841626381599:ye=.002034611134960428;let Le;t[248]>1e-35?Le=.06091438745093315:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?Le=-.06455513326540585:t[1]>29.500000000000004?Le=.07718474591552532:t[4]>7.500000000000001?Le=.040139336931404826:Le=-.09685734690563386:Le=.00015327283570347363:t[9]>88.50000000000001?Le=.10079017954199324:t[1]>47.50000000000001?t[2]>20.500000000000004?t[2]>27.500000000000004?Le=-.04077257804338707:Le=.0739963982640615:t[9]>1.5000000000000002?t[17]>1e-35?Le=.03778141591008941:Le=-.06459919920634845:Le=-.11193190957880604:t[7]>6.500000000000001?t[11]>1e-35?t[18]>1e-35?Le=.14063930759326346:t[0]>179.50000000000003?Le=.07287482250668585:t[8]>1180.5000000000002?Le=-.14419393112726253:t[10]>28.500000000000004?Le=-.07993142770099469:t[17]>1e-35?Le=-.04702595410391655:t[7]>21.500000000000004?t[2]>26.500000000000004?Le=.05527969663610186:Le=-.10824385941441346:t[3]>11.500000000000002?Le=.12358502961047915:Le=-.017509147119622873:t[0]>74.50000000000001?Le=-.014907705458730486:t[8]>95.50000000000001?Le=-.02225118168342062:Le=-.1222374623708485:t[8]>1.5000000000000002?t[8]>950.5000000000001?Le=.06946188930925638:t[3]>6.500000000000001?t[10]>2.5000000000000004?t[19]>1e-35?Le=.04962819555610421:Le=-.07213577821855309:Le=.09139529824708481:t[19]>1e-35?Le=.013439401088345224:Le=-.049274647207292056:Le=.10531673719686951;let $e;t[40]>1e-35?t[0]>1937.5000000000002?$e=-.06421671152073961:$e=.04235421241226177:t[294]>1e-35?t[10]>50.50000000000001?$e=-.09100102290316286:t[0]>3030.5000000000005?t[0]>4177.500000000001?$e=-.03520420769287065:t[8]>1085.5000000000002?$e=-.019817352506127633:$e=.11444439424520964:$e=-.06854631664538167:t[120]>1e-35?t[4]>18.500000000000004?$e=-.010490117519863269:$e=.08104430117757461:t[121]>1e-35?t[243]>1e-35?$e=.16408304891242204:t[217]>1e-35?t[0]>4449.500000000001?$e=.06619344145920268:t[0]>4091.5000000000005?$e=-.08813353450871053:t[0]>3519.5000000000005?t[8]>668.5000000000001?$e=.10016091391222309:$e=-.017407607199427293:t[8]>501.50000000000006?t[10]>16.500000000000004?$e=-.019511460451434884:$e=-.11643672465055221:t[2]>18.500000000000004?$e=.07848228087333317:t[8]>55.50000000000001?$e=.032583027899956235:$e=-.11209832692153521:t[11]>1e-35?$e=.027482174104412567:t[10]>1.5000000000000002?t[6]>26.500000000000004?t[4]>19.500000000000004?t[9]>31.500000000000004?$e=-.09996887746328006:t[9]>2.5000000000000004?$e=.02157682011863397:$e=-.05247727848991843:$e=.07409150201483244:t[1]>38.50000000000001?$e=-.11378466075449625:t[224]>1e-35?$e=-.10741749127732923:t[1]>26.500000000000004?$e=.07343136534146562:$e=-.07013573628594773:t[25]>1e-35?$e=-.04626669734164317:$e=.05518333197956482:$e=.00032434010867555516;let rt;t[183]>1e-35?t[10]>1.5000000000000002?t[17]>1e-35?rt=.026313251010808853:rt=-.08997339150292381:rt=.025062509535227952:t[227]>1e-35?t[1]>6.500000000000001?t[2]>9.500000000000002?t[210]>1e-35?rt=.08071107515789745:t[23]>1e-35?t[1]>75.50000000000001?rt=.0905155504503746:t[8]>1049.5000000000002?rt=-.062312558183394054:t[8]>719.5000000000001?rt=.09583836191410239:t[0]>3719.5000000000005?rt=-.0778097309430818:rt=.04012012419054895:t[4]>12.500000000000002?t[8]>1496.5000000000002?t[10]>42.50000000000001?rt=-.12920865648544927:t[0]>2699.5000000000005?rt=-.07086587879041864:rt=.022614182502461846:t[4]>15.500000000000002?t[8]>55.50000000000001?t[1]>60.50000000000001?t[8]>652.5000000000001?rt=-.11377786322600797:rt=-.009486325820117998:t[1]>55.50000000000001?rt=.12430248795958142:t[0]>2952.5000000000005?t[0]>4331.500000000001?t[1]>38.50000000000001?rt=-.07938291201004219:t[2]>36.50000000000001?rt=.01520046732530246:rt=.13649854049662832:rt=-.07145015938528873:t[8]>407.50000000000006?rt=-.00350257360822279:rt=.11332047082193297:rt=-.10060624458629897:rt=.05429496612497562:t[8]>1446.5000000000002?rt=.006073419197482838:rt=-.08718676350883998:rt=-.11532497988252638:rt=.10766270463068293:t[34]>1e-35?rt=-.06345912440611544:t[131]>1e-35?t[9]>1.5000000000000002?rt=-.0004109812623829506:rt=.021601073497455662:rt=-7343540098965853e-20;let it;t[298]>1e-35?t[9]>12.500000000000002?t[133]>1e-35?it=-.06107663265515864:t[9]>70.50000000000001?t[10]>37.50000000000001?it=.05995640200798119:t[0]>3443.5000000000005?it=-.14698883458733583:it=-.030039164579240187:t[189]>1e-35?it=-.06086763220538141:t[1]>86.50000000000001?it=-.05096727866142538:t[4]>64.50000000000001?it=.11240554253834577:t[4]>45.50000000000001?it=-.030279760168394117:t[6]>45.50000000000001?it=.10161088917815142:t[10]>77.50000000000001?it=-.0792333078055653:t[7]>23.500000000000004?t[0]>2882.5000000000005?it=-.06672020005240323:it=.08831457502630258:t[8]>2592.5000000000005?it=-.052617701047376654:t[10]>29.500000000000004?it=.08499327690298047:t[2]>12.500000000000002?t[9]>41.50000000000001?it=.12880460816709416:t[9]>25.500000000000004?t[4]>11.500000000000002?it=-.064099222705728:it=.044332487521538365:t[0]>2882.5000000000005?it=.031099546885005065:it=.12938467051623853:t[0]>4221.500000000001?it=-.0928676413498701:t[9]>30.500000000000004?it=-.05781824812803708:it=.07561268901778094:t[8]>711.5000000000001?t[2]>22.500000000000004?it=-.06648105454098469:it=.05985487552383097:it=-.13070190291919334:t[116]>1e-35?t[10]>38.50000000000001?it=.05282385499619401:t[1]>66.50000000000001?it=.048802929108006314:t[2]>4.500000000000001?t[0]>4593.500000000001?it=.027885690791379255:it=-.08407126408362446:it=.014432924125571093:it=-9903435845205118e-20;let dt;t[76]>1e-35?dt=-.06307875292162934:t[21]>1e-35?t[7]>10.500000000000002?t[10]>4.500000000000001?t[8]>944.5000000000001?t[0]>3655.5000000000005?dt=.013633653464240465:dt=-.10164319411983509:dt=-.1228424374328996:t[1]>26.500000000000004?t[2]>28.500000000000004?dt=.00632864847804078:dt=-.08393000368134668:dt=.07870508617440916:t[284]>1e-35?dt=.1092302727710421:dt=-.0025505047582483234:t[248]>1e-35?dt=.07101822393621864:t[274]>1e-35?dt=-.06621099406425579:t[1]>26.500000000000004?t[1]>28.500000000000004?dt=.0003077044909372931:t[10]>2.5000000000000004?t[0]>3770.5000000000005?dt=.025081789181021243:dt=-.014813325803582618:t[9]>33.50000000000001?dt=-.033466921233840194:t[3]>12.500000000000002?t[23]>1e-35?dt=.11926990418060353:dt=.01852125513565268:dt=.0975367595927343:t[5]>3325.5000000000005?t[8]>892.5000000000001?t[133]>1e-35?dt=-.1178464984373743:t[283]>1e-35?dt=.043370859226927405:t[5]>4320.500000000001?dt=-.01103141226366587:t[8]>1104.5000000000002?dt=-.023053423988095886:dt=-.0734238953804657:t[6]>18.500000000000004?t[8]>85.50000000000001?dt=.000579145585864887:dt=.03389152834202143:t[128]>1e-35?dt=-.14527722052568462:t[210]>1e-35?dt=-.08915971541902741:t[7]>9.500000000000002?dt=-.03307314577076116:t[18]>1e-35?dt=-.05521712302023565:dt=.009315605032770029:dt=.0036332551852289933;let z;t[0]>689.5000000000001?t[5]>768.5000000000001?t[20]>1e-35?t[5]>4368.500000000001?z=-.07583539600416284:t[188]>1e-35?z=-.07042659515500142:t[23]>1e-35?t[0]>3807.5000000000005?z=-.011038193049597113:z=.08154028164397753:t[1]>85.50000000000001?z=.10259361975201933:z=.011640408330521594:z=-.00023319159023748508:t[92]>1e-35?z=.13771692859530546:z=.022860029819654806:t[1]>22.500000000000004?t[1]>24.500000000000004?t[2]>96.50000000000001?z=.09967230141007705:t[30]>1e-35?z=-.08888529037551285:z=-.008615931385397808:t[10]>5.500000000000001?t[4]>36.50000000000001?z=.08284665960761373:z=-.029292565021289504:t[7]>7.500000000000001?z=-.09945093355204493:z=-.008381393701708593:t[20]>1e-35?z=-.04218678460370465:t[10]>6.500000000000001?t[9]>2.5000000000000004?t[1]>13.500000000000002?t[8]>143.50000000000003?t[4]>7.500000000000001?t[2]>36.50000000000001?z=.07585582641438211:t[8]>284.50000000000006?z=-.029387993239886723:z=.07716738177321587:t[1]>18.500000000000004?z=.026745348497993746:z=.1427429617069753:t[9]>16.500000000000004?t[9]>33.50000000000001?z=.02337306890530338:z=-.10390355904767366:z=.07390521199638532:z=-.06788247515155237:z=-.04201446383470994:t[2]>25.500000000000004?t[2]>29.500000000000004?t[8]>227.50000000000003?z=-.06360325615644084:z=.04342192339836601:z=-.10598779152030145:z=.05253384605768211;let se;t[3]>7.500000000000001?t[157]>1e-35?se=-.07514182877923786:se=.000636205502279271:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?se=.028692053800951845:se=.14081686716133598:se=-.03316566526940354:t[186]>1e-35?t[0]>2653.5000000000005?se=.0037139292567243084:se=.12662311031652707:t[107]>1e-35?t[0]>612.5000000000001?se=.01202688580305612:se=.0993509141454483:t[203]>1e-35?t[1]>77.50000000000001?se=.043935495082738626:se=-.05639305759669704:t[247]>1e-35?se=-.06770766046891649:t[105]>1e-35?t[19]>1e-35?se=.10331836202616368:se=.0006926658459781341:t[96]>1e-35?se=.05361846065599475:t[127]>1e-35?t[0]>2723.5000000000005?t[1]>54.50000000000001?se=-.0741403257305367:se=.022900127535540854:t[7]>3.5000000000000004?se=.038110741403836294:se=.14618649985842758:t[5]>3921.5000000000005?t[1]>110.50000000000001?se=-.09552842289807008:t[1]>27.500000000000004?se=.012505935885798007:se=-.020509603428689526:t[282]>1e-35?t[9]>45.50000000000001?t[6]>5.500000000000001?se=-.1046104767723845:se=.031388606992301074:t[8]>114.50000000000001?t[9]>17.500000000000004?t[9]>22.500000000000004?t[1]>32.50000000000001?se=.023466328488582572:se=.11730925774586994:se=-.04771965631104874:se=.17059689880751394:se=-.08181850955999449:t[26]>1e-35?se=-.12727482696678769:se=-.014343123272734182;let _e;t[147]>1e-35?t[1]>53.50000000000001?_e=-.0993064321015924:t[0]>2604.5000000000005?t[0]>3629.5000000000005?_e=-.02763546051134888:_e=.06423344777499343:_e=-.064606430904295:t[302]>1e-35?t[10]>2.5000000000000004?t[10]>47.50000000000001?_e=.049825139823021586:t[7]>22.500000000000004?_e=-.01131680751379858:t[0]>2579.5000000000005?_e=-.10673674485369694:_e=-.015387212937189957:_e=.04347325151148724:t[179]>1e-35?_e=-.05788885608624092:t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?_e=.0650355590939066:_e=-.0473332870892226:_e=-.09699315983340703:t[288]>1e-35?t[88]>1e-35?_e=.11139543329789044:t[126]>1e-35?_e=-.09726928633696198:t[8]>149.50000000000003?t[9]>46.50000000000001?t[4]>1.5000000000000002?t[8]>1861.5000000000002?_e=.06370903833231022:t[10]>29.500000000000004?_e=.03415223859607161:t[10]>3.5000000000000004?_e=-.07415518117873297:_e=-.0014119203473324082:_e=.12617652343819508:t[9]>41.50000000000001?_e=-.10311145857176976:t[8]>2757.5000000000005?_e=-.08106484219011428:t[7]>71.50000000000001?_e=-.09783384432091176:t[1]>88.50000000000001?_e=.06249739709782831:t[3]>9.500000000000002?t[5]>1601.5000000000002?_e=-.008884084501608536:_e=.061339437777743616:_e=-.042490992675121846:t[2]>6.500000000000001?t[3]>10.500000000000002?_e=.01526664064166223:_e=.13534828515415498:_e=-.06985484465894776:_e=.0005758961943178744;let we;t[86]>1e-35?t[1]>23.500000000000004?t[1]>29.500000000000004?t[4]>16.500000000000004?t[2]>31.500000000000004?we=-.029152732370514342:we=.07173628916139178:t[1]>36.50000000000001?we=-.08859111297255318:we=.0018030071815630785:we=.13652461563759322:we=-.07550137680349367:t[10]>52.50000000000001?t[49]>1e-35?we=-.07145140450454163:t[21]>1e-35?we=-.07422841663493233:we=.006289319702780104:t[10]>40.50000000000001?t[9]>59.50000000000001?t[19]>1e-35?t[13]>1e-35?we=.11864240653986852:t[3]>33.50000000000001?we=-.08821209591953476:we=.05706392280054726:we=-.03600088051578915:t[18]>1e-35?t[1]>24.500000000000004?we=.01953613016837112:we=-.059781039130025006:t[148]>1e-35?we=.052668447861325476:t[3]>30.500000000000004?t[9]>49.50000000000001?we=.07207826841738371:t[202]>1e-35?we=.08163917539410503:we=-.01319846363832958:t[9]>35.50000000000001?t[5]>4134.500000000001?t[10]>44.50000000000001?we=-.06858280496900336:we=-.1781828899516648:we=-.04024620133969553:t[9]>10.500000000000002?t[1]>22.500000000000004?t[1]>37.50000000000001?we=.018232649414147116:we=-.04419781124222661:we=.05145485182416554:t[1]>23.500000000000004?t[0]>655.5000000000001?t[5]>4901.500000000001?t[10]>45.50000000000001?we=.11452368095776105:we=-.036496437259924026:we=-.040445338739465486:we=.0816572651001145:we=-.08968914517368663:we=.0002826343082585516;let je;t[189]>1e-35?t[0]>5269.500000000001?je=-.08839493050459957:t[10]>85.50000000000001?je=.10046908365702462:t[8]>2592.5000000000005?je=-.09632233975926387:t[8]>2000.5000000000002?je=.10282992953871627:t[8]>1266.5000000000002?t[9]>34.50000000000001?je=.035504970430426296:t[1]>31.500000000000004?je=-.1133764813142531:je=-.01138280942244812:t[8]>1125.5000000000002?je=.09800530246229806:je=.016170419267589393:t[218]>1e-35?t[9]>99.50000000000001?t[9]>101.50000000000001?t[9]>124.50000000000001?je=.07316772160107896:je=-.059095014819051765:je=.17859437315769733:t[2]>1.5000000000000002?t[9]>86.50000000000001?je=-.09150209066166894:t[8]>3084.0000000000005?je=-.05443972593168094:t[1]>65.50000000000001?t[10]>11.500000000000002?t[9]>33.50000000000001?je=-.04449234460408263:je=.05568837973347338:je=-.12362324875024472:t[1]>41.50000000000001?t[10]>12.500000000000002?t[8]>1336.5000000000002?je=.12741077850267066:je=.007372371864985329:t[2]>39.50000000000001?je=.02295917234617787:je=.14966532083907075:t[1]>39.50000000000001?je=-.06685557815340279:t[10]>22.500000000000004?t[2]>52.50000000000001?je=-.02511861881285652:t[1]>27.500000000000004?je=.08683660011672288:je=.02956214835267301:t[9]>15.500000000000002?je=-.016538805462996232:je=.04352738094981517:je=-.05561856645643868:t[9]>170.50000000000003?je=-.07996752635874248:t[179]>1e-35?je=-.09065975936933919:je=-.00042817975060427177;let Ye;t[39]>1e-35?t[4]>25.500000000000004?Ye=.03443173196222934:Ye=-.06554248341270724:t[32]>1e-35?t[8]>90.50000000000001?t[4]>67.50000000000001?t[4]>86.50000000000001?Ye=-.0013415395759330318:Ye=.12950978489563347:t[1]>22.500000000000004?t[10]>19.500000000000004?t[4]>30.500000000000004?t[9]>41.50000000000001?Ye=.002297618040307216:Ye=-.12522800128774994:t[4]>8.500000000000002?t[8]>1075.5000000000002?Ye=-.015297257305397608:Ye=.09651828834062742:Ye=-.06636003334371929:t[10]>11.500000000000002?Ye=.17631616138309397:t[0]>1639.5000000000002?Ye=3804386478092585e-20:Ye=-.09099296398683193:Ye=-.06874415876172972:t[0]>2151.5000000000005?Ye=-.1311264883406766:Ye=.00809052010141122:t[253]>1e-35?Ye=-.06338558211939296:t[178]>1e-35?t[2]>25.500000000000004?t[2]>30.500000000000004?t[0]>2151.5000000000005?t[10]>10.500000000000002?t[0]>3615.5000000000005?Ye=.045038497754638605:Ye=-.07770167665661752:Ye=-.08596294280650517:Ye=.08538655727027213:Ye=.09829076418590559:t[1]>39.50000000000001?t[9]>1.5000000000000002?Ye=.054627956617973275:t[1]>61.50000000000001?Ye=-.11994465088415499:t[4]>8.500000000000002?Ye=.06676200239406452:Ye=-.027503148069376867:t[8]>676.5000000000001?Ye=-.10363964928357075:t[4]>8.500000000000002?Ye=-.07589816227175682:Ye=.034664436544646814:t[1]>159.50000000000003?t[6]>25.500000000000004?Ye=.009093153189012338:Ye=-.06119765876605404:Ye=.0004668642103528348;let ht;t[223]>1e-35?t[1]>31.500000000000004?t[8]>711.5000000000001?ht=-.10100794502567233:ht=.08000205636470442:ht=-.11945419826856896:t[113]>1e-35?ht=-.06105445938688056:t[167]>1e-35?t[0]>3928.5000000000005?ht=.1224302423880318:ht=-.01875566982911468:t[222]>1e-35?t[1]>8.500000000000002?t[1]>24.500000000000004?t[4]>3.5000000000000004?t[0]>725.5000000000001?t[0]>1682.5000000000002?t[0]>2860.5000000000005?ht=.0019277012166729114:t[1]>28.500000000000004?ht=-.054445821715687494:ht=.045645722976713245:t[30]>1e-35?ht=.13402660155331655:ht=.008921176001777645:ht=-.058547426505451076:ht=.08841202222426625:t[1]>22.500000000000004?t[10]>9.500000000000002?ht=-.13526418192218206:ht=-.03266013432583145:t[1]>20.500000000000004?t[4]>27.500000000000004?ht=.0007263224246135398:ht=.12450043268647056:t[1]>17.500000000000004?t[9]>1.5000000000000002?ht=-.11575657261278308:ht=-.01530376565862095:t[4]>13.500000000000002?t[4]>22.500000000000004?ht=-.01995960178292952:ht=.11216586049153021:ht=-.10050961087149474:ht=.08848063368485726:t[30]>1e-35?t[224]>1e-35?t[1]>52.50000000000001?ht=.10303451081526649:ht=-.01375730267020699:t[1]>28.500000000000004?t[2]>20.500000000000004?ht=-.043799548968209395:ht=-.12451444314954115:t[4]>12.500000000000002?ht=-.03838117361958468:ht=.06504990789767144:t[57]>1e-35?ht=.06890006938293915:ht=.0003914274695562949;let St;t[53]>1e-35?t[4]>11.500000000000002?t[8]>617.5000000000001?t[2]>41.50000000000001?St=.004271749009686975:St=-.10523878297127605:St=.04633982158107851:St=-.10349713975483057:t[183]>1e-35?t[15]>1e-35?St=-.08655730561951676:t[8]>919.5000000000001?St=-.0676453705610183:t[7]>18.500000000000004?St=-.027787974193650575:St=.08012784576991301:t[227]>1e-35?t[1]>6.500000000000001?t[3]>8.500000000000002?t[210]>1e-35?St=.07185850683316512:t[8]>201.50000000000003?t[8]>348.50000000000006?t[23]>1e-35?t[8]>1049.5000000000002?St=-.03473877164537313:t[8]>719.5000000000001?St=.10471053866934404:St=.008236107678382981:t[4]>57.50000000000001?St=.09412219478825269:t[10]>66.50000000000001?St=-.13884338641811986:t[10]>19.500000000000004?t[10]>22.500000000000004?t[0]>2490.5000000000005?St=-.040681323751002293:St=.06374650297561021:St=.12884615227401788:t[10]>5.500000000000001?St=-.0887517295786972:t[8]>597.5000000000001?t[18]>1e-35?St=-.05474068967150784:St=.03744700650806603:St=-.07846396348680855:t[1]>42.50000000000001?St=.018972315810821302:St=.10953621007604744:t[5]>4439.500000000001?St=.010999776705494586:t[1]>40.50000000000001?St=-.12394200059775967:t[10]>2.5000000000000004?St=.013528093962849453:St=-.09222088417048682:St=-.12662967149701485:St=.09327296405849603:t[3]>99.50000000000001?St=-.013581954439986752:St=.0005526498251862075;let Mt;t[187]>1e-35?t[243]>1e-35?Mt=-.08392792551692502:t[10]>68.50000000000001?Mt=.07871769409454053:t[10]>8.500000000000002?t[10]>16.500000000000004?t[2]>17.500000000000004?t[3]>31.500000000000004?t[91]>1e-35?t[10]>21.500000000000004?t[10]>33.50000000000001?t[10]>48.50000000000001?Mt=-.0825306209711224:Mt=.049559996084532945:Mt=-.1064938580886302:Mt=.03353240732240275:Mt=.045985370399163464:t[1]>42.50000000000001?t[4]>20.500000000000004?Mt=.16966001471529374:t[1]>57.50000000000001?Mt=-.005772777673676247:Mt=.09383677041525058:t[8]>747.5000000000001?Mt=.054068175469351235:Mt=-.049968216310277036:t[8]>753.5000000000001?Mt=-.0679383555784074:t[4]>8.500000000000002?Mt=-.059757341189735386:Mt=.05701083682780414:Mt=-.052497281448921164:t[6]>12.500000000000002?t[8]>969.5000000000001?t[4]>23.500000000000004?Mt=.05820296128730006:Mt=-.1063042385102475:t[1]>49.50000000000001?t[8]>302.50000000000006?Mt=.15340611616954566:Mt=.04385036188666874:t[0]>4449.500000000001?Mt=-.02110897605541555:t[1]>24.500000000000004?t[2]>17.500000000000004?Mt=.004840354641006495:Mt=.09967827580276283:Mt=.11605363537391578:t[9]>19.500000000000004?Mt=-.0735831692725717:Mt=.019973331823355176:t[306]>1e-35?t[149]>1e-35?Mt=-.08968948874343531:t[8]>1094.5000000000002?t[10]>15.500000000000002?Mt=-.02442182361342386:Mt=.10334853004243093:Mt=-.030431948680167104:Mt=-956078595250818e-19;let At;t[294]>1e-35?t[1]>26.500000000000004?t[0]>4078.5000000000005?At=-.040232505718244854:t[0]>3030.5000000000005?At=.0634109586813073:At=-.04043617034245621:At=-.06385323610738443:t[120]>1e-35?t[4]>18.500000000000004?At=-.007859096946435131:At=.07282728486115758:t[229]>1e-35?t[0]>2952.5000000000005?t[17]>1e-35?At=.05515771679628051:At=-.04214471312668263:At=-.09589322222261765:t[193]>1e-35?At=-.05056345906812831:t[121]>1e-35?t[243]>1e-35?At=.14857706653119385:t[4]>9.500000000000002?t[1]>26.500000000000004?t[2]>59.50000000000001?At=-.08152604001147906:t[11]>1e-35?At=.09132936522356462:t[15]>1e-35?t[4]>23.500000000000004?At=.13100930780107503:t[10]>25.500000000000004?At=.05921074710011526:At=-.07226005736695183:t[0]>3304.5000000000005?t[0]>3707.5000000000005?t[0]>4053.5000000000005?At=.0009447118243153454:At=-.09820565036865991:At=.057146909749745546:t[0]>2115.5000000000005?At=-.12331216726611678:At=.007281983677694285:t[2]>56.50000000000001?At=.012310154675612615:At=-.08873665774670461:t[6]>25.500000000000004?At=.134708740821879:t[9]>5.500000000000001?At=-.0805901581148979:t[224]>1e-35?At=-.063684477784257:t[7]>2.5000000000000004?t[19]>1e-35?At=.10842593386554122:t[2]>13.500000000000002?At=.06466798320378395:At=-.08578130788886655:At=-.03590892078300114:At=.0003499894043880708;let Ie;t[134]>1e-35?t[6]>50.50000000000001?t[0]>3601.5000000000005?Ie=.10839808814624702:Ie=-.028043875308180352:t[7]>30.500000000000004?t[8]>932.5000000000001?Ie=-.007478368069393829:Ie=-.09066751344326617:t[0]>3588.5000000000005?t[5]>4748.500000000001?Ie=.04035247751736232:t[0]>4255.500000000001?Ie=-.1310865624507367:t[0]>4004.5000000000005?Ie=.06647367311982634:Ie=-.08339693352955757:t[4]>10.500000000000002?t[1]>34.50000000000001?Ie=-.011618902907510411:Ie=.1114646660406691:t[10]>2.5000000000000004?t[0]>3072.5000000000005?Ie=.09356028223727986:Ie=-.03811765057032162:Ie=-.09456215497345526:t[280]>1e-35?t[7]>70.50000000000001?Ie=.10322956436499003:t[2]>22.500000000000004?t[1]>83.50000000000001?Ie=.1146142460964847:t[1]>62.50000000000001?Ie=-.09679869865322362:t[9]>71.50000000000001?Ie=-.07377580769927583:t[4]>19.500000000000004?t[0]>4571.500000000001?Ie=-.039046426387852974:Ie=.04558778688367152:Ie=.11220830937352602:t[7]>5.500000000000001?t[9]>17.500000000000004?t[8]>1067.5000000000002?Ie=.03261697816211156:t[15]>1e-35?Ie=.02586252542264368:t[2]>14.500000000000002?Ie=-.016420452667484604:Ie=-.1011799626006976:Ie=-.13787471318963773:t[6]>4.500000000000001?t[8]>427.50000000000006?t[10]>36.50000000000001?Ie=.010193588102560583:Ie=.11748729525930773:Ie=-.04468162226743652:Ie=-.028365274393617957:t[71]>1e-35?Ie=.05115139346588793:Ie=-.0001510425316936658;let K;t[298]>1e-35?t[8]>81.50000000000001?t[8]>119.50000000000001?t[4]>64.50000000000001?K=.09072192054181037:t[9]>72.50000000000001?t[8]>1094.5000000000002?K=.020637047900190317:K=-.1017300802134141:t[1]>23.500000000000004?t[9]>12.500000000000002?t[0]>2815.5000000000005?t[0]>3183.5000000000005?t[3]>23.500000000000004?t[3]>45.50000000000001?t[4]>48.50000000000001?K=-.04632587527094407:K=.08603684785510396:K=-.05101401015448496:K=.025466432054358498:K=-.07897811963329214:t[6]>13.500000000000002?t[10]>26.500000000000004?K=.020385355430046367:K=.12032592051335252:K=-.012387370292173013:t[2]>23.500000000000004?K=-.12568545484492677:K=-.022261190943521976:t[8]>634.5000000000001?t[8]>857.5000000000001?K=.043528764484784536:K=.14352071657196003:K=-.009332833816977268:K=.11186782227735846:K=-.0737365712425554:t[136]>1e-35?t[0]>1937.5000000000002?K=-.05649104643152564:K=.03884200719305747:t[42]>1e-35?K=-.07191700385792335:t[116]>1e-35?t[9]>2.5000000000000004?t[9]>17.500000000000004?K=-.04103416502526736:K=.04881823954656287:t[4]>15.500000000000002?K=.009342724662897898:t[0]>3969.5000000000005?K=-.025637309961309498:K=-.12574492012987865:t[212]>1e-35?t[19]>1e-35?K=-.08185697075265091:t[0]>2215.5000000000005?K=.030063975892297354:t[0]>807.5000000000001?K=-.03924325550733229:K=.0415330999189793:K=-.00024374664461674863;let pe;t[3]>7.500000000000001?pe=.0005117490419655908:t[129]>1e-35?t[0]>2904.5000000000005?t[0]>4004.5000000000005?pe=.025798416259686565:pe=.13251610353146012:pe=-.029900559552677654:t[1]>81.50000000000001?t[1]>110.50000000000001?t[0]>4242.500000000001?pe=-.11098564237775424:pe=25960925309712775e-21:t[0]>4177.500000000001?t[9]>35.50000000000001?pe=.15347826616466054:t[3]>4.500000000000001?pe=.10379320730958941:pe=-.008896303020010654:t[0]>3415.5000000000005?t[0]>3830.5000000000005?pe=.03159791088468647:pe=-.10612873364104258:pe=.05059856107348746:t[133]>1e-35?t[2]>5.500000000000001?pe=-.02335760775001469:pe=-.1379386577903324:t[1]>62.50000000000001?t[3]>2.5000000000000004?pe=-.011164334474672973:pe=-.06594044410501655:t[207]>1e-35?pe=-.1014214372326535:t[8]>3.5000000000000004?t[107]>1e-35?t[2]>6.500000000000001?pe=-.01725821503981916:pe=.05594086838700241:t[203]>1e-35?t[1]>44.50000000000001?t[1]>51.50000000000001?pe=-.04226531631656534:pe=-.14409800530171432:pe=-.03245576341206398:t[8]>4214.500000000001?pe=.0895409165534886:t[247]>1e-35?pe=-.06506383629143335:t[118]>1e-35?pe=-.07214270121257443:t[8]>546.5000000000001?pe=-.004385020865473831:pe=.009321812545248529:t[0]>1639.5000000000002?t[13]>1e-35?pe=.046278501133958524:pe=-.030835570926968044:t[0]>493.50000000000006?pe=-.12794504651610425:pe=.009415039807550776;let me;t[304]>1e-35?me=-.04717777269217453:t[76]>1e-35?me=-.05813439142128324:t[1]>59.50000000000001?t[0]>350.50000000000006?t[53]>1e-35?me=-.09648224457374217:t[132]>1e-35?me=.07089308107910267:t[0]>2248.5000000000005?t[5]>2525.5000000000005?t[9]>1.5000000000000002?t[114]>1e-35?me=-.08595213071749083:t[9]>14.500000000000002?t[9]>33.50000000000001?t[285]>1e-35?me=.10838431695638147:t[230]>1e-35?me=.06458713915750626:t[0]>3219.5000000000005?t[3]>23.500000000000004?t[9]>69.50000000000001?me=.050071316251979:me=-.006356941111525215:t[6]>8.500000000000002?me=-.0384814076434817:t[1]>73.50000000000001?t[0]>3746.5000000000005?me=.10217402850540398:me=-.048840949025349197:me=-.03668313197909846:t[7]>39.50000000000001?me=-.0562642841496003:t[10]>2.5000000000000004?me=.09749777369987417:me=-.04848223121417616:t[0]>5453.500000000001?me=.08316648226133942:me=-.0261979698267618:t[212]>1e-35?me=.09565573198318654:t[5]>4814.500000000001?t[8]>963.5000000000001?t[8]>1514.5000000000002?me=.04837009746506856:me=-.09184360565631328:me=.0032411047845613606:t[0]>4733.500000000001?me=.0977378556864798:me=.010776545559325588:me=-.012483310473120218:me=-.049284121449103935:me=.011962641341789565:t[1]>67.50000000000001?t[1]>77.50000000000001?me=-.08380361910948711:me=.07375088778585813:me=-.1084864186071348:me=.0007819503469605476;let ne;t[7]>17.500000000000004?t[115]>1e-35?ne=.08741852531696623:t[167]>1e-35?ne=.10078975495600809:ne=-.0018324767784017562:t[290]>1e-35?ne=-.0850089851255888:t[74]>1e-35?t[10]>16.500000000000004?ne=.1379733311640402:ne=-.0038500648529631075:t[6]>29.500000000000004?t[8]>876.5000000000001?t[0]>3129.5000000000005?t[9]>5.500000000000001?t[8]>1765.5000000000002?ne=-.09360083033774169:ne=.061471353193188374:t[10]>11.500000000000002?t[10]>31.500000000000004?ne=-.015599362579530679:t[0]>4593.500000000001?ne=-.12029549262691491:ne=-.018917032256501397:ne=.04632831686576592:ne=.06892347785444271:t[4]>8.500000000000002?t[10]>33.50000000000001?ne=-.05894883236412263:ne=.05213944998315824:ne=.12621779223564986:t[243]>1e-35?t[6]>16.500000000000004?t[0]>4141.500000000001?t[0]>5850.500000000001?ne=.07577412405680808:ne=-.053144737214742235:t[1]>29.500000000000004?t[9]>16.500000000000004?ne=-.0277076900736147:t[1]>65.50000000000001?ne=-.023587471585763506:ne=.10184896592433082:ne=-.057699270527916825:ne=-.041191811945739454:t[114]>1e-35?t[2]>23.500000000000004?ne=.06566902102799584:t[10]>25.500000000000004?ne=-.07033633753181047:ne=-.01599120398351932:t[242]>1e-35?t[0]>2402.5000000000005?ne=-.08108035861059537:ne=.04184690010531078:t[35]>1e-35?t[0]>2904.5000000000005?ne=-.12431182772561139:ne=.01886235886984271:ne=.0025579594894418116;let V;t[8]>2915.5000000000005?t[101]>1e-35?V=.08648323956719083:t[0]>93.50000000000001?t[196]>1e-35?V=-.09509320772734361:t[4]>1.5000000000000002?t[5]>1106.5000000000002?t[5]>1191.5000000000002?t[283]>1e-35?V=-.11268313808648661:t[10]>12.500000000000002?t[131]>1e-35?V=.0687641681341721:t[10]>102.50000000000001?V=-.09667920080214842:t[4]>15.500000000000002?t[8]>2992.5000000000005?t[1]>24.500000000000004?t[1]>71.50000000000001?V=-.06762578396473291:t[10]>65.50000000000001?V=-.05226727783610509:t[282]>1e-35?V=.09911438410640917:t[19]>1e-35?V=.06915156336429933:V=-.006565637886508241:V=-.08344300251849307:V=-.0928863907927501:t[1]>60.50000000000001?t[2]>17.500000000000004?V=.19428463865406298:V=.016073883020956765:t[13]>1e-35?V=.06864077097923665:V=-.01388867527034731:t[0]>1847.5000000000002?V=.004655280608161356:t[1]>40.50000000000001?V=.031406054057765996:V=.12798062439212832:V=.09859670536264255:t[10]>2.5000000000000004?t[9]>68.50000000000001?V=.08821759640665892:t[9]>32.50000000000001?t[8]>3960.0000000000005?t[1]>31.500000000000004?V=-.0706095614785733:V=.04227164041372561:V=-.1056906923176064:t[2]>8.500000000000002?t[19]>1e-35?V=-.07139533369873902:V=.008952586782921625:V=.06086212582180936:V=-.0816938490403437:V=-.051224901945956025:V=-.10525399124186095:V=.000270924147208224;let Re;t[122]>1e-35?t[0]>2461.5000000000005?t[2]>36.50000000000001?Re=.029186512383291244:t[7]>1.5000000000000002?Re=-.14984127276725573:t[1]>40.50000000000001?Re=.032757060730648144:Re=-.07675575422749602:t[6]>8.500000000000002?Re=.10599766037117893:Re=-.0541423394552156:t[1]>24.500000000000004?t[103]>1e-35?t[8]>61.50000000000001?t[17]>1e-35?Re=-.051394622947855385:Re=.03237141302699347:Re=.12526173027943244:Re=.000579473126472788:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?Re=-.07383912482657777:t[0]>5147.500000000001?Re=.07008813937042091:t[10]>38.50000000000001?Re=-.06779203808365307:Re=-.013782769999524498:Re=.0880038869117715:Re=-.12846294176070952:t[281]>1e-35?Re=-.06810806903850834:t[10]>227.50000000000003?Re=-.08937977001661111:t[10]>130.50000000000003?Re=.10538920632708033:t[145]>1e-35?t[4]>6.500000000000001?t[9]>16.500000000000004?t[4]>18.500000000000004?Re=.011036530162093841:Re=-.11500797478569702:Re=.03702229366129399:Re=.07242026683784307:t[189]>1e-35?Re=.03331407112090286:t[9]>33.50000000000001?t[201]>1e-35?Re=.08979610115743614:t[7]>57.50000000000001?t[1]>20.500000000000004?Re=-.02608892716555304:Re=.09609599320761308:t[9]>105.50000000000001?Re=-.06848127135991534:Re=.0023675721254089715:t[86]>1e-35?Re=-.11049635625500497:Re=-.004847764219432233;let ze;t[125]>1e-35?t[0]>3969.5000000000005?ze=-.09462233499115416:ze=.05235324508465096:t[17]>1e-35?t[49]>1e-35?t[10]>19.500000000000004?ze=-.030700661288166148:ze=.0870883677166864:t[10]>3.5000000000000004?t[3]>18.500000000000004?t[0]>3544.5000000000005?t[188]>1e-35?t[9]>7.500000000000001?ze=.03149547314036763:ze=-.08166208257451366:t[0]>5850.500000000001?ze=-.10228136324773157:t[102]>1e-35?ze=-.10572585290676295:t[8]>726.5000000000001?t[5]>3657.5000000000005?ze=.01782894842128785:t[13]>1e-35?ze=.002680190260979968:ze=.1773965720476949:t[2]>72.50000000000001?ze=.09090831938627947:t[1]>59.50000000000001?ze=-.12297206702816128:t[0]>4977.500000000001?ze=.09899015653118268:ze=-.022207141540838887:t[4]>32.50000000000001?t[1]>34.50000000000001?ze=-.0675900954187773:ze=.012336403425364092:ze=-.0017002325391924573:t[6]>7.500000000000001?t[1]>17.500000000000004?ze=-.02671721777458802:ze=-.09242452991958029:t[284]>1e-35?ze=-.08585691288582491:ze=.013332890564324447:t[4]>14.500000000000002?ze=-.005245022074799553:t[23]>1e-35?ze=-.020036720167235768:t[1]>29.500000000000004?t[114]>1e-35?ze=-.09289852307936758:t[116]>1e-35?ze=-.09686573010015055:t[8]>804.5000000000001?ze=.03812547148215318:ze=.005162744968176633:t[9]>43.50000000000001?ze=-.059246106396159376:ze=.050370113808135275:ze=.000794041852811028;let Dt;t[3]>7.500000000000001?Dt=.0004981426543104341:t[9]>114.50000000000001?Dt=.05666010099424601:t[129]>1e-35?t[6]>3.5000000000000004?Dt=-.019061766497948867:Dt=.07193491146561211:t[186]>1e-35?t[0]>2653.5000000000005?Dt=-.006044199577160493:Dt=.1147136801028133:t[6]>85.50000000000001?t[8]>847.5000000000001?Dt=.11486607015912494:t[9]>16.500000000000004?Dt=-.08686820858087294:Dt=.06119632492911875:t[127]>1e-35?t[0]>2723.5000000000005?t[0]>3682.5000000000005?t[1]>38.50000000000001?Dt=-.022230207980026437:Dt=.1056683690528792:Dt=-.05859530800943035:Dt=.06970608927597141:t[7]>3.5000000000000004?t[105]>1e-35?Dt=.08073568184886762:t[107]>1e-35?t[2]>6.500000000000001?Dt=-.05177544573528314:Dt=.05370469772149028:t[1]>35.50000000000001?t[0]>4106.500000000001?t[9]>46.50000000000001?t[0]>4633.500000000001?Dt=.15159657923771555:Dt=-.0060542654587671055:t[9]>5.500000000000001?Dt=-.042808028205051786:t[1]>48.50000000000001?Dt=-.010449538258110742:Dt=.10026907521968294:Dt=-.04249349329714756:t[9]>42.50000000000001?t[1]>19.500000000000004?t[8]>852.5000000000001?Dt=-.02272452389409874:Dt=-.11202691218244319:t[5]>1809.5000000000002?Dt=-.04460413584255906:Dt=.08196329474205256:t[10]>69.50000000000001?Dt=.10221481166238167:Dt=.0004063052701699382:t[243]>1e-35?Dt=-.07563941678849846:t[18]>1e-35?Dt=.02563513231103432:Dt=-.004740081147303786;let tr;t[84]>1e-35?t[9]>6.500000000000001?t[2]>43.50000000000001?tr=.057446442918106:tr=-.04404018270156349:tr=-.09282976714550464:t[0]>384.50000000000006?t[204]>1e-35?t[1]>62.50000000000001?tr=-.05930486238817954:t[1]>29.500000000000004?tr=.06955866121256543:t[8]>597.5000000000001?tr=-.06538593556505168:tr=.06212512595497445:tr=.00021102929959182257:t[9]>90.50000000000001?tr=.0958061289119631:t[102]>1e-35?tr=.07172059675638813:t[1]>47.50000000000001?tr=-.03879798603977766:t[297]>1e-35?tr=.054948234271956144:t[282]>1e-35?t[2]>6.500000000000001?tr=.003805910996312012:tr=.09304295674749524:t[11]>1e-35?t[18]>1e-35?tr=.11252376801858695:t[288]>1e-35?tr=-.10293901912180432:tr=.014669268837893872:t[1]>42.50000000000001?tr=-.05988274123836837:t[145]>1e-35?tr=.06142784665288495:t[3]>1.5000000000000002?t[4]>4.500000000000001?t[1]>21.500000000000004?t[1]>27.500000000000004?t[9]>24.500000000000004?tr=.038791154988529926:t[10]>22.500000000000004?t[2]>19.500000000000004?tr=-.03366718308159971:tr=.11936550608549797:t[1]>31.500000000000004?tr=-.07454716789539667:tr=.027859650621164217:t[10]>10.500000000000002?tr=-.11806374092321247:tr=-.03506042229223101:tr=-.0007080765837654515:t[10]>6.500000000000001?tr=-.028077713664996503:t[2]>7.500000000000001?tr=.15803724124216814:tr=.0351381284833169:tr=-.07877953381054767;let Wt;t[131]>1e-35?t[282]>1e-35?t[4]>23.500000000000004?Wt=.14144941521975005:Wt=.0007727806714190652:t[9]>1.5000000000000002?t[8]>2134.5000000000005?t[2]>34.50000000000001?Wt=.10514088112381886:t[7]>18.500000000000004?Wt=-.10370643555956745:Wt=.04093594315421388:t[6]>15.500000000000002?t[4]>9.500000000000002?t[10]>27.500000000000004?t[10]>71.50000000000001?Wt=-.0508129468802936:t[224]>1e-35?Wt=-.037816066368733595:t[10]>43.50000000000001?Wt=.07793408602607932:Wt=.017646166646099453:t[9]>3.5000000000000004?t[9]>29.500000000000004?t[17]>1e-35?Wt=.036972453794202324:Wt=-.08727431092411866:t[8]>427.50000000000006?t[8]>1278.5000000000002?Wt=.09475302525132188:Wt=-.03580104945898193:Wt=.08349488283861875:t[10]>3.5000000000000004?t[0]>1847.5000000000002?t[0]>4280.500000000001?t[2]>27.500000000000004?Wt=-.1282448778804823:Wt=-.014395808269207212:Wt=-.008940927190750592:Wt=-.1459118815453748:t[0]>4897.500000000001?Wt=-.09733068457286576:t[1]>57.50000000000001?Wt=.06575271409540207:Wt=-.019556422817450115:Wt=-.10623959222984136:t[18]>1e-35?Wt=.11280940901275241:t[8]>319.50000000000006?t[2]>6.500000000000001?Wt=.008125645893104896:Wt=-.11084368630465868:Wt=.0584398731508786:t[0]>350.50000000000006?t[3]>83.50000000000001?Wt=-.05854904579626861:t[4]>5.500000000000001?Wt=.02985784951394175:Wt=-.03247600140149334:Wt=-.11152899295304973:Wt=-.00035424577714215764;let gr;t[32]>1e-35?t[17]>1e-35?t[8]>359.50000000000006?t[8]>804.5000000000001?gr=-.06563670567578264:gr=.067656954313663:gr=-.10388217548685377:t[8]>2302.5000000000005?gr=.07190621943790435:t[4]>67.50000000000001?gr=.060020507643618604:t[4]>38.50000000000001?gr=-.08707253184321638:t[2]>11.500000000000002?t[2]>16.500000000000004?t[1]>31.500000000000004?t[1]>59.50000000000001?gr=-.06568134366461277:t[8]>1075.5000000000002?gr=-.004768057709758692:gr=.11785959165999467:gr=-.05080221682879267:gr=.14814206127494542:gr=-.07241946332311736:t[253]>1e-35?gr=-.058893562861261274:t[4]>61.50000000000001?t[283]>1e-35?t[10]>23.500000000000004?gr=-.02471195342450034:gr=.11866056464409412:t[10]>44.50000000000001?t[1]>16.500000000000004?t[8]>2640.0000000000005?gr=-.10741850739482771:gr=.010051635824944:gr=.12502069436017124:t[8]>1971.5000000000002?t[1]>23.500000000000004?t[308]>1e-35?gr=.10511236013756364:t[10]>10.500000000000002?t[1]>53.50000000000001?gr=-.08992396138178163:gr=.010944365997007212:gr=.06221307021813793:gr=.1286024087559141:t[127]>1e-35?gr=.06568148624531012:t[10]>40.50000000000001?gr=-.07567979134643352:t[5]>5647.500000000001?gr=.07594672895572069:gr=-.018158016446439187:t[6]>55.50000000000001?gr=.009293422430111872:t[4]>45.50000000000001?gr=-.017749818406964022:t[2]>46.50000000000001?gr=.01714136511113982:gr=-724762291423549e-19;let xr;t[1]>24.500000000000004?t[103]>1e-35?t[8]>48.50000000000001?t[17]>1e-35?xr=-.048689215588703864:t[9]>27.500000000000004?t[0]>3916.5000000000005?xr=.07084726276890757:xr=-.11232323677722932:xr=.04812773089510436:xr=.11757502216780046:t[5]>1464.5000000000002?t[5]>1505.5000000000002?t[167]>1e-35?xr=.07470606002425358:t[1]>53.50000000000001?t[132]>1e-35?xr=.0879462816013881:xr=-.002966662093626573:t[306]>1e-35?xr=-.04588085188342676:xr=.0031910005157084823:t[3]>10.500000000000002?t[10]>20.500000000000004?xr=-.006600332774461143:xr=.1272481351557754:xr=-.09030973597154808:t[284]>1e-35?t[1]>38.50000000000001?t[10]>2.5000000000000004?xr=.011884312066620044:xr=.11678751052403374:t[4]>8.500000000000002?xr=.03627129613273813:xr=-.12132783497902287:xr=-.006784372643244717:t[18]>1e-35?t[3]>4.500000000000001?t[3]>6.500000000000001?t[0]>5453.500000000001?xr=-.06830131718398992:t[0]>5147.500000000001?xr=.062360406249609306:t[4]>4.500000000000001?xr=-.013162203864592055:xr=-.07153029184927609:xr=.07628618062271557:xr=-.12085065687320373:t[190]>1e-35?xr=-.045816889524231186:t[137]>1e-35?xr=-.07956001795911584:t[199]>1e-35?t[0]>3853.5000000000005?xr=.025895337822752502:xr=-.06503949350616421:t[10]>227.50000000000003?xr=-.09989456525790491:t[10]>130.50000000000003?xr=.08616651057030683:xr=.0001234981796706021;let wr;t[8]>1014.5000000000001?t[9]>137.50000000000003?wr=-.08778879924617534:t[8]>1022.5000000000001?t[285]>1e-35?t[9]>64.50000000000001?wr=.04955806187281689:t[0]>3670.5000000000005?t[10]>32.50000000000001?wr=-.141732381961068:wr=-.0317152307496497:wr=-.02074638849097191:t[0]>93.50000000000001?t[0]>3072.5000000000005?t[10]>100.50000000000001?t[4]>24.500000000000004?t[8]>1336.5000000000002?wr=.12191801556691254:wr=-.0003444689085397977:wr=.005739668504631604:t[146]>1e-35?t[308]>1e-35?wr=.015237524791728777:t[6]>61.50000000000001?t[4]>63.50000000000001?wr=-.05676033995381961:wr=.10933961076803381:t[4]>26.500000000000004?wr=-.11667582544549814:t[8]>1765.5000000000002?wr=.032174455312047705:wr=-.0755016390126608:t[293]>1e-35?wr=-.08234885407658332:t[9]>41.50000000000001?t[0]>3830.5000000000005?wr=.026571311956824436:t[15]>1e-35?wr=.06175459479851121:wr=-.018778084411148754:t[9]>40.50000000000001?wr=-.09420232889965811:wr=-.004578248021263184:t[2]>1.5000000000000002?wr=.005453714644971445:wr=-.03907138175699279:wr=-.055296364182154736:t[23]>1e-35?wr=.036555134842143476:t[0]>4188.500000000001?t[6]>29.500000000000004?wr=-.09358146510580179:wr=.060524657996178094:wr=-.11245101144669545:t[125]>1e-35?t[9]>1.5000000000000002?wr=-.12698331085931538:wr=.006059605604079918:t[2]>196.50000000000003?wr=-.09451315810804783:wr=.0011390147031687425;let Lt;t[8]>2830.5000000000005?t[1]>31.500000000000004?t[9]>32.50000000000001?t[5]>1234.5000000000002?t[8]>3794.5000000000005?Lt=.05517359070460923:Lt=-.04758751221404857:Lt=-.09482078194138792:t[8]>2992.5000000000005?t[1]>101.50000000000001?Lt=.1040436595565776:t[9]>21.500000000000004?Lt=.04032250517675179:t[107]>1e-35?Lt=.05978752253058374:t[210]>1e-35?t[4]>37.50000000000001?Lt=.1192453009230486:t[1]>51.50000000000001?Lt=.0443376336292195:Lt=-.07967674833321865:t[5]>2117.5000000000005?t[9]>10.500000000000002?Lt=-.10025078607591283:t[0]>2882.5000000000005?t[18]>1e-35?Lt=-.08999822408398037:Lt=.017533219253893447:t[9]>1.5000000000000002?t[4]>12.500000000000002?Lt=-.061850439226075:Lt=.08849196353361093:Lt=.10536348167793089:t[92]>1e-35?Lt=.04894947712119185:t[9]>16.500000000000004?Lt=.05900227903883853:t[9]>5.500000000000001?Lt=-.11946594348916476:Lt=-.03652096348071964:t[1]>41.50000000000001?Lt=-.07411603110840567:Lt=-.00021033247574340914:t[10]>22.500000000000004?t[9]>68.50000000000001?Lt=.08493634342741495:t[11]>1e-35?Lt=-.10899097825564363:Lt=-.006156708838964173:t[8]>3198.5000000000005?t[2]>41.50000000000001?Lt=.08356655906359918:t[7]>25.500000000000004?Lt=-.09475076526194888:t[10]>5.500000000000001?Lt=-.01999406228763778:Lt=.06696212545889428:t[6]>20.500000000000004?Lt=.14713592661393468:Lt=.0459917279002218:Lt=.00027445928493734093;let sr;t[223]>1e-35?t[1]>31.500000000000004?t[8]>634.5000000000001?sr=-.06904501553217077:sr=.05696231672035904:sr=-.1124703178077813:t[99]>1e-35?t[1]>89.50000000000001?sr=-.05074261170009721:t[1]>57.50000000000001?t[8]>969.5000000000001?sr=-.011419256378538392:t[0]>3830.5000000000005?sr=.140315841503076:sr=.02403434913963024:t[1]>31.500000000000004?t[8]>65.50000000000001?t[2]>10.500000000000002?sr=-.04027822909411164:sr=.03176085103667189:sr=.06779515865838849:t[4]>15.500000000000002?sr=.0762878389015175:t[8]>175.50000000000003?t[0]>3030.5000000000005?t[8]>1041.5000000000002?sr=.06124039747298539:sr=-.04312732764434027:sr=.09161522761808062:sr=-.09663512235460074:t[280]>1e-35?t[6]>45.50000000000001?t[1]>46.50000000000001?sr=.11211681010488772:t[13]>1e-35?sr=.06725735814960367:sr=-.046744031455827846:t[10]>44.50000000000001?t[0]>3400.5000000000005?t[0]>4004.5000000000005?t[2]>22.500000000000004?sr=.11743605068905603:sr=-.011309033539148687:sr=-.07896094707523052:sr=.12862714793172117:t[10]>1.5000000000000002?t[8]>455.50000000000006?t[0]>4706.500000000001?sr=-.09218756798869711:t[10]>19.500000000000004?t[0]>1894.5000000000002?t[0]>3719.5000000000005?sr=.02836295848998302:sr=.12210680366745175:sr=-.058302317470509096:t[5]>4144.500000000001?sr=.06123341960495106:sr=-.03840046906926525:sr=-.05221474543453495:sr=.03988215485860711:sr=-.00033074684693083496;let Lp=FWo(e+r+n+o+s+c+l+u+d+p+h+m+g+A+y+E+_+v+b+I+x+w+R+P+k+Q+M+N+G+O+D+F+U+L+H+$+W+j+ce+J+Te+fe+Ne+Ve+Ue+Ke+X+le+te+xe+Z+ae+De+Y+ee+Ee+Ae+ve+We+Ze+Et+Rt+Qt+Ft+ue+Be+et+lt+ye+Le+$e+rt+it+dt+z+se+_e+we+je+Ye+ht+St+Mt+At+Ie+K+pe+me+ne+V+Re+ze+Dt+tr+Wt+gr+xr+wr+Lt+sr);return[1-Lp,Lp]}a(mbn,"multilineModelPredict");function FWo(t){if(t<0){let e=Math.exp(t);return e/(1+e)}return 1/(1+Math.exp(-t))}a(FWo,"sigmoid");var UWo={javascript:["//"],typescript:["//"],typescriptreact:["//"],javascriptreact:["//"],vue:["//","-->"],php:["//","#"],dart:["//"],go:["//"],cpp:["//"],scss:["//"],csharp:["//"],java:["//"],c:["//"],rust:["//"],python:["#"],markdown:["#","-->"],css:["*/"]},gbn={javascript:1,javascriptreact:2,typescript:3,typescriptreact:4,python:5,go:6,ruby:7};function Abn(t,e,r,n=!0){let o=t.split(` +`);if(n&&(o=o.filter(l=>l.trim().length>0)),Math.abs(e)>o.length||e>=o.length)return!1;e<0&&(e=o.length+e);let s=o[e];return(UWo[r]??[]).some(l=>s.includes(l))}a(Abn,"hasComment");var Yze=class{static{a(this,"PromptFeatures")}constructor(e,r){let[n,o]=this.firstAndLast(e),s=this.firstAndLast(e.trimEnd());this.language=r,this.length=e.length,this.firstLineLength=n.length,this.lastLineLength=o.length,this.lastLineRstripLength=o.trimEnd().length,this.lastLineStripLength=o.trim().length,this.rstripLength=e.trimEnd().length,this.stripLength=e.trim().length,this.rstripLastLineLength=s[1].length,this.rstripLastLineStripLength=s[1].trim().length,this.secondToLastLineHasComment=Abn(e,-2,r),this.rstripSecondToLastLineHasComment=Abn(e.trimEnd(),-2,r),this.prefixEndsWithNewline=e.endsWith(` `),this.lastChar=e.slice(-1),this.rstripLastChar=e.trimEnd().slice(-1),this.firstChar=e[0],this.lstripFirstChar=e.trimStart().slice(0,1)}firstAndLast(e){let r=e.split(` -`),n=r.length,o=r[0],s=r[n-1];return s==""&&n>1&&(s=r[n-2]),[o,s]}},wHt=class{static{a(this,"MultilineModelFeatures")}constructor(e,r,n){this.language=n,this.prefixFeatures=new qYe(e,n),this.suffixFeatures=new qYe(r,n)}constructFeatures(){let e=new Array(14).fill(0);e[0]=this.prefixFeatures.length,e[1]=this.prefixFeatures.firstLineLength,e[2]=this.prefixFeatures.lastLineLength,e[3]=this.prefixFeatures.lastLineRstripLength,e[4]=this.prefixFeatures.lastLineStripLength,e[5]=this.prefixFeatures.rstripLength,e[6]=this.prefixFeatures.rstripLastLineLength,e[7]=this.prefixFeatures.rstripLastLineStripLength,e[8]=this.suffixFeatures.length,e[9]=this.suffixFeatures.firstLineLength,e[10]=this.suffixFeatures.lastLineLength,e[11]=this.prefixFeatures.secondToLastLineHasComment?1:0,e[12]=this.prefixFeatures.rstripSecondToLastLineHasComment?1:0,e[13]=this.prefixFeatures.prefixEndsWithNewline?1:0;let r=new Array(Object.keys(Avn).length+1).fill(0);r[Avn[this.language]??0]=1;let n=new Array(Object.keys(D4).length+1).fill(0);n[D4[this.prefixFeatures.lastChar]??0]=1;let o=new Array(Object.keys(D4).length+1).fill(0);o[D4[this.prefixFeatures.rstripLastChar]??0]=1;let s=new Array(Object.keys(D4).length+1).fill(0);s[D4[this.suffixFeatures.firstChar]??0]=1;let c=new Array(Object.keys(D4).length+1).fill(0);return c[D4[this.suffixFeatures.lstripFirstChar]??0]=1,e.concat(r,n,o,s,c)}};function U$o(t,e){return new wHt(t.prefix,t.suffix,e)}a(U$o,"constructMultilineFeatures");function Evn(t,e){let r=U$o(t,e).constructFeatures();return gvn(r)[1]}a(Evn,"requestMultilineScore");f();var RHt=class t{constructor(e,r){this.index=e;this.documentPrefix=r;this.startOffset=0;this.text="";this.trimCount=0}static{a(this,"StreamingCompletion")}updateText(e){this.text=e}get addedToPrefix(){return this.text.substring(0,this.startOffset)}get effectivePrefix(){return this.documentPrefix+this.addedToPrefix}get effectiveText(){return this.text.substring(this.startOffset)}get isFirstCompletion(){return this.trimCount===0}get firstNewlineOffset(){let e=[...this.text.matchAll(/\r?\n/g)];return e.length>0&&e[0].index===0&&e.shift(),e.length>0?e[0].index:-1}trimAt(e){let r=new t(this.index,this.documentPrefix);return r.startOffset=this.startOffset,r.text=this.text.substring(0,this.startOffset+e),r.trimCount=this.trimCount,this.startOffset+=e,this.trimCount++,r}},GYe=class{constructor(e,r,n,o,s,c){this.ctx=e;this.prefix=r;this.languageId=n;this.initialSingleLine=o;this.trimmerLookahead=s;this.cacheFunction=c;this.lineLimit=3;this.completions=new Map}static{a(this,"StreamedCompletionSplitter")}getFinishedCallback(){return async(e,r)=>{let n=r.index??0,o=this.getCompletion(n,e);if(o.isFirstCompletion&&this.initialSingleLine&&o.firstNewlineOffset>=0){let s={yieldSolution:!0,continueStreaming:!0,finishOffset:o.firstNewlineOffset};return o.trimAt(s.finishOffset),r.finished&&await this.trimAll(r,o),s}return r.finished?await this.trimAll(r,o):await this.trimOnce(r,o)}}getCompletion(e,r){let n=this.completions.get(e);return n||(n=new RHt(e,this.prefix),this.completions.set(e,n)),n.updateText(r),n}async trimOnce(e,r){let n=await this.trim(r);return n===void 0?{yieldSolution:!1,continueStreaming:!0}:r.isFirstCompletion?(r.trimAt(n),{yieldSolution:!0,continueStreaming:!0,finishOffset:n}):(this.cacheCompletion(e,r,n),{yieldSolution:!1,continueStreaming:!0})}async trimAll(e,r){let n,o;do n=await this.trim(r),r.isFirstCompletion?(o=n,r.trimAt(n??r.effectiveText.length)):this.cacheCompletion(e,r,n);while(n!==void 0);return o!==void 0?{yieldSolution:!0,continueStreaming:!0,finishOffset:o}:{yieldSolution:!1,continueStreaming:!0}}async trim(e){return await new b8e(this.languageId,e.effectivePrefix,e.effectiveText,this.lineLimit,this.trimmerLookahead).getCompletionTrimOffset()}cacheCompletion(e,r,n){let o=r.trimAt(n??r.effectiveText.length);if(o.effectiveText.trim()==="")return;let s=G9e(this.ctx,o.effectiveText.trimEnd(),e.getAPIJsonData(),o.index,e.requestId,n!==void 0,e.telemetryData);s.copilotAnnotations=this.adjustedAnnotations(s,r,o),s.generatedChoiceIndex=o.trimCount,this.cacheFunction(o.addedToPrefix,s)}adjustedAnnotations(e,r,n){if(e.copilotAnnotations===void 0)return;let o=n.addedToPrefix.length,c=o+e.completionText.length>=r.text.length,l={};for(let[u,d]of Object.entries(e.copilotAnnotations)){let p=d.filter(h=>h.start_offset-o0).map(h=>{let m={...h};return m.start_offset-=o,m.stop_offset-=o,c||(m.stop_offset=Math.min(m.stop_offset,e.completionText.length)),m});p.length>0&&(l[u]=p)}return Object.keys(l).length>0?l:void 0}};f();f();var Gm=class{static{a(this,"InlineCompletionManager")}};var HYe=new Se("getCompletions"),zbe=["afterAccept","afterCursorWhitespace","beforeCursorWhitespace","blockMode","cancelledNetworkRequest","choiceIndex","clientCompletionId","contextProviders","endpoint","engineChoiceSource","engineName","headerRequestId","isCycling","isMultiline","isSpeculative","languageId","n","neighborSource","performanceMetrics","promptMetadata","reason","request_option_code_annotations","request_option_extra","request_option_max_tokens","request_option_n","request_option_stream","request_option_temperature","request_option_top_p","status","temperature","uiKind"];function jYe(t,e,r){t.get(Gm).triggerSpeculativeRequests(r);let n=r.telemetry,o=`${e}.shown`;n.markAsDisplayed(),n.properties.reason=Tae(r.resultType),at(t,o,n),yi(t,o,lL(n.properties,zbe),n.measurements)}a(jYe,"telemetryShown");function Cvn(t,e,r){let n=`${e}.accepted`;at(t,n,r),yi(t,n,lL(r.properties,zbe),r.measurements)}a(Cvn,"telemetryAccepted");function _vn(t,e,r){let n=`${e}.rejected`;at(t,n,r),yi(t,n,lL(r.properties,zbe),r.measurements)}a(_vn,"telemetryRejected");function l7(t,e={}){return{...e,telemetryBlob:t}}a(l7,"mkCanceledResultTelemetry");function zd(t,e){let r={headerRequestId:t.properties.headerRequestId,copilot_trackingId:t.properties.copilot_trackingId};t.properties.sku!==void 0&&(r.sku=t.properties.sku),t.properties.opportunityId!==void 0&&(r.opportunityId=t.properties.opportunityId),t.properties.organizations_list!==void 0&&(r.organizations_list=t.properties.organizations_list),t.properties.enterprise_list!==void 0&&(r.enterprise_list=t.properties.enterprise_list),t.properties.clientCompletionId!==void 0&&(r.clientCompletionId=t.properties.clientCompletionId);let n=t.filtersAndExp.exp.assignmentContext;if(e){let s=e.get(FI).inlineCompletionsUnificationState.expAssignments.filter(c=>!n.includes(c));n=[n,...s].filter(Boolean).join(";")}return r["abexp.assignmentcontext"]=n,r}a(zd,"mkBasicResultTelemetry");function vvn(t,e){if(e.type!=="promptOnly"){if(e.type==="success"){let r=Ac()-e.telemetryBlob.issuedTime,n=Tae(e.resultType),o=JSON.stringify(e.performanceMetrics),s={...e.telemetryData,reason:n,performanceMetrics:o},{foundOffset:c}=e.telemetryBlob.measurements,l=e.performanceMetrics?.map(([u,d])=>` -${d.toFixed(2)} ${u}`).join("")??"";return HYe.debug(t,`ghostText produced from ${n} in ${Math.round(r)}ms with foundOffset ${c}${l}`),WZ(t,"ghostText.produced",s,{timeToProduceMs:r,foundOffset:c}),e.value}if(HYe.debug(t,"No ghostText produced -- "+e.type+": "+e.reason),e.type==="canceled"){at(t,"ghostText.canceled",e.telemetryData.telemetryBlob.extendedBy({reason:e.reason,cancelledNetworkRequest:e.telemetryData.cancelledNetworkRequest?"true":"false"}));return}WZ(t,`ghostText.${e.type}`,{...e.telemetryData,reason:e.reason},{})}}a(vvn,"handleGhostTextResultTelemetry");function Tae(t){switch(t){case 0:return"network";case 1:return"cache";case 3:return"cycling";case 2:return"typingAsSuggested";case 4:return"async"}}a(Tae,"resultTypeToString");f();f();f();var Q$o={maxSnippetLength:3e3,maxSnippetCount:7,enabledFeatures:"Deferred",timeBudgetMs:7,doAggregateSnippets:!0},q$o="ms-vscode.cpptools",G$o="CppCompletionContextProvider";function bvn(t,e,r,n){(e.includes(G$o)||e.length===1&&e[0]==="*")&&Svn(t,r,n)}a(bvn,"fillInCppVSActiveExperiments");function Tvn(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(q$o))&&Svn(t,r,n)}a(Tvn,"fillInCppVSCodeActiveExperiments");function Svn(t,e,r){try{let n=Q$o,o=t.get(jt).cppContextProviderParams(r);if(o)try{n=JSON.parse(o)}catch(s){_r.error(t,"Failed to parse cppContextProviderParams",s)}for(let[s,c]of Object.entries(n))e.set(s,c)}catch(n){_r.exception(t,n,"fillInCppActiveExperiments")}}a(Svn,"addActiveExperiments");f();function $Ye(t,e,r){try{let n=t.get(jt).csharpContextProviderParams(r);if(n){let o=JSON.parse(n);for(let[s,c]of Object.entries(o))e.set(s,c)}}catch(n){return _r.debug(t,"Failed to get the active C# experiments for the Context Provider API",n),!1}return!0}a($Ye,"fillInCSharpActiveExperiments");f();var PHt="fallbackContextProvider",kHt={mlcpMaxContextItems:20,mlcpMaxSymbolMatches:20,mlcpEnableImports:!1};function Ivn(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(PHt))&&H$o(t,r,n)}a(Ivn,"fillInMultiLanguageActiveExperiments");function H$o(t,e,r){try{let n=j$o(t,r);for(let[o,s]of Object.entries(n))e.set(o,s)}catch(n){_r.exception(t,n,"fillInMultiLanguageActiveExperiments")}}a(H$o,"addActiveExperiments");function j$o(t,e){let r=kHt,n=t.get(jt).multiLanguageContextProviderParams(e);if(n)try{r=JSON.parse(n)}catch(o){_r.error(t,"Failed to parse multiLanguageContextProviderParams",o)}return r}a(j$o,"getMultiLanguageContextProviderParamsFromExp");f();var $$o="typescript-ai-context-provider";function xvn(t,e,r,n){if(!(e.length===1&&e[0]==="*"||e.includes($$o)))return!1;try{let o=t.get(jt).tsContextProviderParams(n);if(o){let s=JSON.parse(o);for(let[c,l]of Object.entries(s))r.set(c,l)}}catch(o){return _r.debug(t,"Failed to get the active TypeScript experiments for the Context Provider API",o),!1}return!0}a(xvn,"fillInTsActiveExperiments");f();var wvn=S.Object({importance:S.Optional(S.Integer({minimum:0,maximum:100})),id:S.Optional(S.String()),origin:S.Optional(S.Union([S.Literal("request"),S.Literal("update")]))}),Rvn=S.Intersect([S.Object({name:S.String(),value:S.String()}),wvn]),Pvn=S.Intersect([S.Object({uri:S.String(),value:S.String(),additionalUris:S.Optional(S.Array(S.String()))}),wvn]),V$o=[Rvn,Pvn],W$o=S.Union(V$o),z$o=new Map([["Trait",Ol.Compile(Rvn)],["CodeSnippet",Ol.Compile(Pvn)]]),Y$o=a(t=>t,"ensureTypesAreEqual");Y$o(!0);var K$o=S.Object({contextItems:S.Array(W$o)}),J$o=S.Object({selector:S.Array(S.Union([S.String(),S.Object({language:S.Optional(S.String()),scheme:S.Optional(S.String()),pattern:S.Optional(S.String())})]))}),NHt=S.Object({id:S.String()}),X$o=S.Intersect([NHt,J$o]),Z$o=S.Intersect([NHt,K$o]),kvn=S.Object({providers:S.Array(X$o)}),Nvn=S.Object({providers:S.Array(NHt)}),DHt=S.Object({providers:S.Array(Z$o),updating:S.Optional(S.Array(S.String()))}),Dvn=S.Intersect([W$r,S.Object({contextItems:S.Optional(DHt)})]);function VYe(t,e){return t.map(r=>{let n=r.data.filter(o=>o.type===e);return n.length>0?{...r,data:n}:void 0}).filter(r=>r!==void 0)}a(VYe,"filterContextItemsByType");function Mvn(t){let e=[],r=0;return t.forEach(n=>{let o=!1;for(let[s,c]of z$o.entries())if(c.Check(n)){e.push({...n,type:s}),o=!0;break}o||r++}),[e,r]}a(Mvn,"filterSupportedContextItems");function eVo(t){return t.length>0&&t.replaceAll(/[^a-zA-Z0-9-]/g,"").length===t.length}a(eVo,"validateContextItemId");function Ovn(t,e){let r=new Set,n=[];for(let o of e){let s=o.id??yr();if(!eVo(s)){let c=yr();_r.error(t,`Invalid context item ID ${s}, replacing with ${c}`),s=c}if(r.has(s)){let c=yr();_r.error(t,`Duplicate context item ID ${s}, replacing with ${c}`),s=c}r.add(s),n.push({...o,id:s})}return n}a(Ovn,"addOrValidateContextItemsIDs");f();var P0=class{constructor(e=()=>new MHt){this.createStatistics=e;this.statistics=new $r(25)}static{a(this,"ContextProviderStatistics")}getStatisticsForCompletion(e){let r=this.statistics.get(e);if(r)return r;let n=this.createStatistics();return this.statistics.set(e,n),n}getPreviousStatisticsForCompletion(e){let r=Array.from(this.statistics.keys());for(let n=r.length-1;n>=0;n--){let o=r[n];if(o!==e)return this.statistics.peek(o)}}},MHt=class{constructor(){this._expectations=new Map;this._lastResolution=new Map;this._statistics=new Map}static{a(this,"PerCompletionContextProviderStatistics")}addExpectations(e,r){let n=this._expectations.get(e)??[];this._expectations.set(e,[...n,...r])}clearExpectations(){this._expectations.clear()}setLastResolution(e,r){this._lastResolution.set(e,r)}get(e){return this._statistics.get(e)}computeMatch(e){try{for(let[r,n]of this._expectations){if(n.length===0)continue;let o=this._lastResolution.get(r)??"none";if(o==="none"||o==="error"){this._statistics.set(r,{usage:"none",resolution:o});continue}let s=[];for(let[d,p]of n){let h={id:d.id,type:d.type};if(d.origin&&(h.origin=d.origin),p==="content_excluded"){s.push({...h,usage:"none_content_excluded"});continue}let m=e.find(g=>g.source===d);m===void 0?s.push({...h,usage:"error"}):s.push({...h,usage:m.expectedTokens>0&&m.expectedTokens===m.actualTokens?"full":m.actualTokens>0?"partial":"none",expectedTokens:m.expectedTokens,actualTokens:m.actualTokens})}let l=s.reduce((d,p)=>p.usage==="full"?d+1:p.usage==="partial"?d+.5:d,0)/n.length,u=l===1?"full":l===0?"none":"partial";this._statistics.set(r,{resolution:o,usage:u,usageDetails:s})}}finally{this.clearExpectations(),this._lastResolution.clear()}}};function WYe(t){return t.map(e=>{if(!(e.source===void 0||e.expectedTokens===void 0||e.actualTokens===void 0))return{source:e.source,expectedTokens:e.expectedTokens,actualTokens:e.actualTokens}}).filter(e=>e!==void 0)}a(WYe,"componentStatisticsToPromptMatcher");var Bvn=de(Nn());var k0=class{static{a(this,"ContextProviderRegistry")}},BN=class{static{a(this,"DefaultContextProviders")}},Sae=class extends BN{constructor(){super();this.ids=[]}static{a(this,"DefaultContextProvidersContainer")}add(r){this.ids.push(r)}getIds(){return this.ids}},OHt=class extends k0{constructor(r,n){super();this.ctx=r;this.match=n;this._providers=[]}static{a(this,"CoreContextProviderRegistry")}registerContextProvider(r){if(r.id.includes(",")||r.id.includes("*"))throw new Error(`A context provider id cannot contain a comma or an asterisk. The id ${r.id} is invalid.`);if(this._providers.find(n=>n.id===r.id))throw new Error(`A context provider with id ${r.id} has already been registered`);this._providers.push(r)}unregisterContextProvider(r){this._providers=this._providers.filter(n=>n.id!==r)}get providers(){return this._providers.slice()}async resolveAllProviders(r,n,o,s,c,l){if(c?.isCancellationRequested)return _r.debug(this.ctx,"Resolving context providers cancelled"),[];let u=new Map;$Ye(this.ctx,u,s);let d=[];if(this._providers.length===0)return d;let p=await this.matchProviders(o,s),h=p.filter(I=>I[1]>0);if(p.filter(I=>I[1]<=0).forEach(([I,x])=>{let R={providerId:I.id,matchScore:x,resolution:"none",resolutionTimeMs:0,data:[]};d.push(R)}),h.length===0)return d;if(c?.isCancellationRequested)return _r.debug(this.ctx,"Resolving context providers cancelled"),[];Tvn(this.ctx,h.map(I=>I[0].id),u,s),Ivn(this.ctx,h.map(I=>I[0].id),u,s),xvn(this.ctx,h.map(I=>I[0].id),u,s);let g=new Bvn.CancellationTokenSource;if(c){let I=c.onCancellationRequested(x=>{g.cancel(),I.dispose()})}let A=Spe(this.ctx)&&!uDe(this.ctx)?0:tVo(this.ctx,s),y=A>0?Date.now()+A:Number.MAX_SAFE_INTEGER,E;A>0&&(E=setTimeout(()=>{g.cancel(),g.dispose()},A));let _=new Map,v={completionId:r,opportunityId:n,documentContext:o,activeExperiments:u,timeBudget:A,timeoutEnd:y,data:l};for(let[I]of h){let x=this.ctx.get(P0).getPreviousStatisticsForCompletion(r)?.get(I.id);x&&(v.previousUsageStatistics=x);let R=I.resolver.resolve(v,g.token);_.set(I.id,R)}let b=await fFr(_,g.token);E&&clearTimeout(E);for(let[I,x]of h){let R=b.get(I.id);if(R){if(R.status==="error")Dx(R.reason)||_r.error(this.ctx,`Error resolving context from ${I.id}: `,R.reason),d.push({providerId:I.id,matchScore:x,resolution:R.status,resolutionTimeMs:R.resolutionTime,data:[]});else{let w=[...R.value??[]];if((R.status==="none"||R.status==="partial")&&(_r.info(this.ctx,`Context provider ${I.id} exceeded time budget of ${A}ms`),I.resolver.resolveOnTimeout))try{let D=I.resolver.resolveOnTimeout(v);sIt(D)?w.push(...D):D&&w.push(D),w.length>0&&(R.status="partial")}catch(D){_r.error(this.ctx,`Error in fallback logic for context provider ${I.id}: `,D)}let[P,k]=Mvn(w);k&&_r.error(this.ctx,`Dropped ${k} context items from ${I.id} due to invalid schema`);let Q=Ovn(this.ctx,P),M={providerId:I.id,matchScore:x,resolution:R.status,resolutionTimeMs:R.resolutionTime,data:Q};d.push(M)}this.ctx.get(P0).getStatisticsForCompletion(r).setLastResolution(I.id,R.status)}else _r.error(this.ctx,`Context provider ${I.id} not found in results`)}return d.sort((I,x)=>x.matchScore-I.matchScore)}async matchProviders(r,n){let o=Lvn(this.ctx,n),s=o.length===1&&o[0]==="*";return await Promise.all(this._providers.map(async l=>{if(!s&&!o.includes(l.id))return[l,0];let u=await this.match(this.ctx,l.selector,r);return[l,u]}))}get matchFunction(){return this.match}},BHt=class extends k0{constructor(r){super();this.delegate=r;this._cachedContextItems=new $r(5)}static{a(this,"CachedContextProviderRegistry")}registerContextProvider(r){this.delegate.registerContextProvider(r)}unregisterContextProvider(r){this.delegate.unregisterContextProvider(r)}get providers(){return this.delegate.providers}async resolveAllProviders(r,n,o,s,c,l){let u=this._cachedContextItems.get(r);if(r&&u&&u.length>0)return u;let d=await this.delegate.resolveAllProviders(r,n,o,s,c,l);return d.length>0&&r&&this._cachedContextItems.set(r,d),d}get matchFunction(){return this.delegate.matchFunction}};function zYe(t,e){return new BHt(new OHt(t,e))}a(zYe,"getContextProviderRegistry");function YYe(t,e,r){let n=t.get(P0).getStatisticsForCompletion(e);return r.map(s=>{let{providerId:c,resolution:l,resolutionTimeMs:u,matchScore:d,data:p}=s,h=n.get(c),m=h?.usage??"none";(d<=0||l==="none"||l==="error")&&(m="none");let g={providerId:c,resolution:l,resolutionTimeMs:u,usage:m,usageDetails:h?.usageDetails,matched:d>0,numResolvedItems:p.length},A=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="full"||E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0,y=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0;return A!==void 0&&(g.numUsedItems=A),y!==void 0&&(g.numPartiallyUsedItems=y),g})}a(YYe,"telemetrizeContextItems");function KYe(t){return t.matchScore>0&&t.resolution!=="error"}a(KYe,"matchContextItems");function Lvn(t,e){let r=LHt(t,e),n=vr(t,tt.ContextProviders)??[];if(r.length===1&&r[0]==="*"||n.length===1&&n[0]==="*")return["*"];let o=t.get(BN).getIds();return Array.from(new Set([...o,...r,...n]))}a(Lvn,"getActiveContextProviders");function LHt(t,e){return Spe(t)?["*"]:t.get(jt).contextProviders(e)}a(LHt,"getExpContextProviders");function Iae(t,e){return Lvn(t,e).length>0}a(Iae,"useContextProviderAPI");function tVo(t,e){let r=vr(t,tt.ContextProviderTimeBudget);return r!==void 0&&typeof r=="number"?r:t.get(jt).contextProviderTimeBudget(e)}a(tVo,"getContextProviderTimeBudget");var jC=class{constructor(e){this.ctx=e;this.scheduledResolutions=new $r(25)}static{a(this,"ContextProviderBridge")}schedule(e,r,n,o,s,c){let l=this.ctx.get(k0),{textDocument:u,originalPosition:d,originalOffset:p,originalVersion:h,editsWithPosition:m}=e,g=l.resolveAllProviders(r,n,{uri:u.uri,languageId:u.detectedLanguageId,version:h,offset:p,position:d,proposedEdits:m.length>0?m:void 0},o,s,c?.data);this.scheduledResolutions.set(r,g)}async resolution(e){let r=this.scheduledResolutions.get(e);return r?await r:[]}};f();f();var JYe=class{constructor(e,r,n){this.languageId=e;this.nodeMatch=r;this.nodeTypesWithBlockOrStmtChild=n}static{a(this,"BaseBlockParser")}async getNodeMatchAtPosition(e,r,n){let o=await g6(this.languageId,e);try{let c=o.rootNode.descendantForIndex(r);for(;c;){let l=this.nodeMatch[c.type];if(l){if(!this.nodeTypesWithBlockOrStmtChild.has(c.type))break;let u=this.nodeTypesWithBlockOrStmtChild.get(c.type);if((u==""?c.namedChildren[0]:c.childForFieldName(u))?.type==l)break}c=c.parent}return c?n(c):void 0}finally{o.delete()}}getNextBlockAtPosition(e,r,n){return this.getNodeMatchAtPosition(e,r,o=>{let s=o.children.reverse().find(c=>c.type==this.nodeMatch[o.type]);if(s){if(this.languageId=="python"&&s.parent){let c=s.parent.type==":"?s.parent.parent:s.parent,l=c?.nextSibling;for(;l&&l.type=="comment";){let u=l.startPosition.row==s.endPosition.row&&l.startPosition.column>=s.endPosition.column,d=l.startPosition.row>c.endPosition.row&&l.startPosition.column>c.startPosition.column;if(u||d)s=l,l=l.nextSibling;else break}}if(!(s.endIndex>=s.tree.rootNode.endIndex-1&&(s.hasError||s.parent.hasError)))return n(s)}})}async isBlockBodyFinished(e,r,n){let o=(e+r).trimEnd(),s=await this.getNextBlockAtPosition(o,n,c=>c.endIndex);if(s!==void 0&&s0?c:void 0}}getNodeStart(e,r){let n=e.trimEnd();return this.getNodeMatchAtPosition(n,r,o=>o.startIndex)}},XYe=class extends JYe{constructor(r,n,o,s,c){super(r,s,c);this.blockEmptyMatch=n;this.lineMatch=o}static{a(this,"RegexBasedBlockParser")}isBlockStart(r){return this.lineMatch.test(r.trimStart())}async isBlockBodyEmpty(r,n){let o=await this.getNextBlockAtPosition(r,n,s=>{s.startIndex1&&(s=r[n-2]),[o,s]}},zHt=class{static{a(this,"MultilineModelFeatures")}constructor(e,r,n){this.language=n,this.prefixFeatures=new Yze(e,n),this.suffixFeatures=new Yze(r,n)}constructFeatures(){let e=new Array(14).fill(0);e[0]=this.prefixFeatures.length,e[1]=this.prefixFeatures.firstLineLength,e[2]=this.prefixFeatures.lastLineLength,e[3]=this.prefixFeatures.lastLineRstripLength,e[4]=this.prefixFeatures.lastLineStripLength,e[5]=this.prefixFeatures.rstripLength,e[6]=this.prefixFeatures.rstripLastLineLength,e[7]=this.prefixFeatures.rstripLastLineStripLength,e[8]=this.suffixFeatures.length,e[9]=this.suffixFeatures.firstLineLength,e[10]=this.suffixFeatures.lastLineLength,e[11]=this.prefixFeatures.secondToLastLineHasComment?1:0,e[12]=this.prefixFeatures.rstripSecondToLastLineHasComment?1:0,e[13]=this.prefixFeatures.prefixEndsWithNewline?1:0;let r=new Array(Object.keys(gbn).length+1).fill(0);r[gbn[this.language]??0]=1;let n=new Array(Object.keys(mO).length+1).fill(0);n[mO[this.prefixFeatures.lastChar]??0]=1;let o=new Array(Object.keys(mO).length+1).fill(0);o[mO[this.prefixFeatures.rstripLastChar]??0]=1;let s=new Array(Object.keys(mO).length+1).fill(0);s[mO[this.suffixFeatures.firstChar]??0]=1;let c=new Array(Object.keys(mO).length+1).fill(0);return c[mO[this.suffixFeatures.lstripFirstChar]??0]=1,e.concat(r,n,o,s,c)}};function QWo(t,e){return new zHt(t.prefix,t.suffix,e)}a(QWo,"constructMultilineFeatures");function ybn(t,e){let r=QWo(t,e).constructFeatures();return mbn(r)[1]}a(ybn,"requestMultilineScore");f();var YHt=class t{constructor(e,r){this.index=e;this.documentPrefix=r;this.startOffset=0;this.text="";this.trimCount=0}static{a(this,"StreamingCompletion")}updateText(e){this.text=e}get addedToPrefix(){return this.text.substring(0,this.startOffset)}get effectivePrefix(){return this.documentPrefix+this.addedToPrefix}get effectiveText(){return this.text.substring(this.startOffset)}get isFirstCompletion(){return this.trimCount===0}get firstNewlineOffset(){let e=[...this.text.matchAll(/\r?\n/g)];return e.length>0&&e[0].index===0&&e.shift(),e.length>0?e[0].index:-1}trimAt(e){let r=new t(this.index,this.documentPrefix);return r.startOffset=this.startOffset,r.text=this.text.substring(0,this.startOffset+e),r.trimCount=this.trimCount,this.startOffset+=e,this.trimCount++,r}},Kze=class{constructor(e,r,n,o,s,c){this.ctx=e;this.prefix=r;this.languageId=n;this.initialSingleLine=o;this.trimmerLookahead=s;this.cacheFunction=c;this.lineLimit=3;this.completions=new Map}static{a(this,"StreamedCompletionSplitter")}getFinishedCallback(){return async(e,r)=>{let n=r.index??0,o=this.getCompletion(n,e);if(o.isFirstCompletion&&this.initialSingleLine&&o.firstNewlineOffset>=0){let s={yieldSolution:!0,continueStreaming:!0,finishOffset:o.firstNewlineOffset};return o.trimAt(s.finishOffset),r.finished&&await this.trimAll(r,o),s}return r.finished?await this.trimAll(r,o):await this.trimOnce(r,o)}}getCompletion(e,r){let n=this.completions.get(e);return n||(n=new YHt(e,this.prefix),this.completions.set(e,n)),n.updateText(r),n}async trimOnce(e,r){let n=await this.trim(r);return n===void 0?{yieldSolution:!1,continueStreaming:!0}:r.isFirstCompletion?(r.trimAt(n),{yieldSolution:!0,continueStreaming:!0,finishOffset:n}):(this.cacheCompletion(e,r,n),{yieldSolution:!1,continueStreaming:!0})}async trimAll(e,r){let n,o;do n=await this.trim(r),r.isFirstCompletion?(o=n,r.trimAt(n??r.effectiveText.length)):this.cacheCompletion(e,r,n);while(n!==void 0);return o!==void 0?{yieldSolution:!0,continueStreaming:!0,finishOffset:o}:{yieldSolution:!1,continueStreaming:!0}}async trim(e){return await new kLe(this.languageId,e.effectivePrefix,e.effectiveText,this.lineLimit,this.trimmerLookahead).getCompletionTrimOffset()}cacheCompletion(e,r,n){let o=r.trimAt(n??r.effectiveText.length);if(o.effectiveText.trim()==="")return;let s=KFe(this.ctx,o.effectiveText.trimEnd(),e.getAPIJsonData(),o.index,e.requestId,n!==void 0,e.telemetryData);s.copilotAnnotations=this.adjustedAnnotations(s,r,o),s.generatedChoiceIndex=o.trimCount,this.cacheFunction(o.addedToPrefix,s)}adjustedAnnotations(e,r,n){if(e.copilotAnnotations===void 0)return;let o=n.addedToPrefix.length,c=o+e.completionText.length>=r.text.length,l={};for(let[u,d]of Object.entries(e.copilotAnnotations)){let p=d.filter(h=>h.start_offset-o0).map(h=>{let m={...h};return m.start_offset-=o,m.stop_offset-=o,c||(m.stop_offset=Math.min(m.stop_offset,e.completionText.length)),m});p.length>0&&(l[u]=p)}return Object.keys(l).length>0?l:void 0}};f();f();var Dm=class{static{a(this,"InlineCompletionManager")}};var Jze=new Se("getCompletions"),$ve=["afterAccept","afterCursorWhitespace","beforeCursorWhitespace","blockMode","cancelledNetworkRequest","choiceIndex","clientCompletionId","contextProviders","endpoint","engineChoiceSource","engineName","headerRequestId","isCycling","isMultiline","isSpeculative","languageId","n","neighborSource","performanceMetrics","promptMetadata","reason","request_option_code_annotations","request_option_extra","request_option_max_tokens","request_option_n","request_option_stream","request_option_temperature","request_option_top_p","status","temperature","uiKind"];function Xze(t,e,r){t.get(Dm).triggerSpeculativeRequests(r);let n=r.telemetry,o=`${e}.shown`;n.markAsDisplayed(),n.properties.reason=Fse(r.resultType),st(t,o,n),rr(t,o,$3(n.properties,$ve),n.measurements)}a(Xze,"telemetryShown");function Ebn(t,e,r){let n=`${e}.accepted`;st(t,n,r),rr(t,n,$3(r.properties,$ve),r.measurements)}a(Ebn,"telemetryAccepted");function _bn(t,e,r){let n=`${e}.rejected`;st(t,n,r),rr(t,n,$3(r.properties,$ve),r.measurements)}a(_bn,"telemetryRejected");function B9(t,e={}){return{...e,telemetryBlob:t}}a(B9,"mkCanceledResultTelemetry");function Ud(t,e){let r={headerRequestId:t.properties.headerRequestId,copilot_trackingId:t.properties.copilot_trackingId};t.properties.sku!==void 0&&(r.sku=t.properties.sku),t.properties.opportunityId!==void 0&&(r.opportunityId=t.properties.opportunityId),t.properties.organizations_list!==void 0&&(r.organizations_list=t.properties.organizations_list),t.properties.enterprise_list!==void 0&&(r.enterprise_list=t.properties.enterprise_list),t.properties.clientCompletionId!==void 0&&(r.clientCompletionId=t.properties.clientCompletionId);let n=t.filtersAndExp.exp.assignmentContext;if(e){let s=e.get(II).inlineCompletionsUnificationState.expAssignments.filter(c=>!n.includes(c));n=[n,...s].filter(Boolean).join(";")}return r["abexp.assignmentcontext"]=n,r}a(Ud,"mkBasicResultTelemetry");function Cbn(t,e){if(e.type!=="promptOnly"){if(e.type==="success"){let r=fc()-e.telemetryBlob.issuedTime,n=Fse(e.resultType),o=JSON.stringify(e.performanceMetrics),s={...e.telemetryData,reason:n,performanceMetrics:o},{foundOffset:c}=e.telemetryBlob.measurements,l=e.performanceMetrics?.map(([u,d])=>` +${d.toFixed(2)} ${u}`).join("")??"";return Jze.debug(t,`ghostText produced from ${n} in ${Math.round(r)}ms with foundOffset ${c}${l}`),eZ(t,"ghostText.produced",s,{timeToProduceMs:r,foundOffset:c}),e.value}if(Jze.debug(t,"No ghostText produced -- "+e.type+": "+e.reason),e.type==="canceled"){st(t,"ghostText.canceled",e.telemetryData.telemetryBlob.extendedBy({reason:e.reason,cancelledNetworkRequest:e.telemetryData.cancelledNetworkRequest?"true":"false"}));return}eZ(t,`ghostText.${e.type}`,{...e.telemetryData,reason:e.reason},{})}}a(Cbn,"handleGhostTextResultTelemetry");function Fse(t){switch(t){case 0:return"network";case 1:return"cache";case 3:return"cycling";case 2:return"typingAsSuggested";case 4:return"async"}}a(Fse,"resultTypeToString");f();f();f();var qWo={maxSnippetLength:3e3,maxSnippetCount:7,enabledFeatures:"Deferred",timeBudgetMs:7,doAggregateSnippets:!0},GWo="ms-vscode.cpptools",HWo="CppCompletionContextProvider";function vbn(t,e,r,n){(e.includes(HWo)||e.length===1&&e[0]==="*")&&Tbn(t,r,n)}a(vbn,"fillInCppVSActiveExperiments");function bbn(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(GWo))&&Tbn(t,r,n)}a(bbn,"fillInCppVSCodeActiveExperiments");function Tbn(t,e,r){try{let n=qWo,o=t.get(Gt).cppContextProviderParams(r);if(o)try{n=JSON.parse(o)}catch(s){Cr.error(t,"Failed to parse cppContextProviderParams",s)}for(let[s,c]of Object.entries(n))e.set(s,c)}catch(n){Cr.exception(t,n,"fillInCppActiveExperiments")}}a(Tbn,"addActiveExperiments");f();function Zze(t,e,r){try{let n=t.get(Gt).csharpContextProviderParams(r);if(n){let o=JSON.parse(n);for(let[s,c]of Object.entries(o))e.set(s,c)}}catch(n){return Cr.debug(t,"Failed to get the active C# experiments for the Context Provider API",n),!1}return!0}a(Zze,"fillInCSharpActiveExperiments");f();var KHt="fallbackContextProvider",JHt={mlcpMaxContextItems:20,mlcpMaxSymbolMatches:20,mlcpEnableImports:!1};function Sbn(t,e,r,n){(e.length===1&&e[0]==="*"||e.includes(KHt))&&jWo(t,r,n)}a(Sbn,"fillInMultiLanguageActiveExperiments");function jWo(t,e,r){try{let n=$Wo(t,r);for(let[o,s]of Object.entries(n))e.set(o,s)}catch(n){Cr.exception(t,n,"fillInMultiLanguageActiveExperiments")}}a(jWo,"addActiveExperiments");function $Wo(t,e){let r=JHt,n=t.get(Gt).multiLanguageContextProviderParams(e);if(n)try{r=JSON.parse(n)}catch(o){Cr.error(t,"Failed to parse multiLanguageContextProviderParams",o)}return r}a($Wo,"getMultiLanguageContextProviderParamsFromExp");f();var VWo="typescript-ai-context-provider";function Ibn(t,e,r,n){if(!(e.length===1&&e[0]==="*"||e.includes(VWo)))return!1;try{let o=t.get(Gt).tsContextProviderParams(n);if(o){let s=JSON.parse(o);for(let[c,l]of Object.entries(s))r.set(c,l)}}catch(o){return Cr.debug(t,"Failed to get the active TypeScript experiments for the Context Provider API",o),!1}return!0}a(Ibn,"fillInTsActiveExperiments");f();var xbn=S.Object({importance:S.Optional(S.Integer({minimum:0,maximum:100})),id:S.Optional(S.String()),origin:S.Optional(S.Union([S.Literal("request"),S.Literal("update")]))}),wbn=S.Intersect([S.Object({name:S.String(),value:S.String()}),xbn]),Rbn=S.Intersect([S.Object({uri:S.String(),value:S.String(),additionalUris:S.Optional(S.Array(S.String()))}),xbn]),WWo=[wbn,Rbn],zWo=S.Union(WWo),YWo=new Map([["Trait",wl.Compile(wbn)],["CodeSnippet",wl.Compile(Rbn)]]),KWo=a(t=>t,"ensureTypesAreEqual");KWo(!0);var JWo=S.Object({contextItems:S.Array(zWo)}),XWo=S.Object({selector:S.Array(S.Union([S.String(),S.Object({language:S.Optional(S.String()),scheme:S.Optional(S.String()),pattern:S.Optional(S.String())})]))}),XHt=S.Object({id:S.String()}),ZWo=S.Intersect([XHt,XWo]),ezo=S.Intersect([XHt,JWo]),Pbn=S.Object({providers:S.Array(ZWo)}),kbn=S.Object({providers:S.Array(XHt)}),ZHt=S.Object({providers:S.Array(ezo),updating:S.Optional(S.Array(S.String()))}),Dbn=S.Intersect([VVr,S.Object({contextItems:S.Optional(ZHt)})]);function eYe(t,e){return t.map(r=>{let n=r.data.filter(o=>o.type===e);return n.length>0?{...r,data:n}:void 0}).filter(r=>r!==void 0)}a(eYe,"filterContextItemsByType");function Nbn(t){let e=[],r=0;return t.forEach(n=>{let o=!1;for(let[s,c]of YWo.entries())if(c.Check(n)){e.push({...n,type:s}),o=!0;break}o||r++}),[e,r]}a(Nbn,"filterSupportedContextItems");function tzo(t){return t.length>0&&t.replaceAll(/[^a-zA-Z0-9-]/g,"").length===t.length}a(tzo,"validateContextItemId");function Mbn(t,e){let r=new Set,n=[];for(let o of e){let s=o.id??yr();if(!tzo(s)){let c=yr();Cr.error(t,`Invalid context item ID ${s}, replacing with ${c}`),s=c}if(r.has(s)){let c=yr();Cr.error(t,`Duplicate context item ID ${s}, replacing with ${c}`),s=c}r.add(s),n.push({...o,id:s})}return n}a(Mbn,"addOrValidateContextItemsIDs");f();var S0=class{constructor(e=()=>new ejt){this.createStatistics=e;this.statistics=new $r(25)}static{a(this,"ContextProviderStatistics")}getStatisticsForCompletion(e){let r=this.statistics.get(e);if(r)return r;let n=this.createStatistics();return this.statistics.set(e,n),n}getPreviousStatisticsForCompletion(e){let r=Array.from(this.statistics.keys());for(let n=r.length-1;n>=0;n--){let o=r[n];if(o!==e)return this.statistics.peek(o)}}},ejt=class{constructor(){this._expectations=new Map;this._lastResolution=new Map;this._statistics=new Map}static{a(this,"PerCompletionContextProviderStatistics")}addExpectations(e,r){let n=this._expectations.get(e)??[];this._expectations.set(e,[...n,...r])}clearExpectations(){this._expectations.clear()}setLastResolution(e,r){this._lastResolution.set(e,r)}get(e){return this._statistics.get(e)}computeMatch(e){try{for(let[r,n]of this._expectations){if(n.length===0)continue;let o=this._lastResolution.get(r)??"none";if(o==="none"||o==="error"){this._statistics.set(r,{usage:"none",resolution:o});continue}let s=[];for(let[d,p]of n){let h={id:d.id,type:d.type};if(d.origin&&(h.origin=d.origin),p==="content_excluded"){s.push({...h,usage:"none_content_excluded"});continue}let m=e.find(g=>g.source===d);m===void 0?s.push({...h,usage:"error"}):s.push({...h,usage:m.expectedTokens>0&&m.expectedTokens===m.actualTokens?"full":m.actualTokens>0?"partial":"none",expectedTokens:m.expectedTokens,actualTokens:m.actualTokens})}let l=s.reduce((d,p)=>p.usage==="full"?d+1:p.usage==="partial"?d+.5:d,0)/n.length,u=l===1?"full":l===0?"none":"partial";this._statistics.set(r,{resolution:o,usage:u,usageDetails:s})}}finally{this.clearExpectations(),this._lastResolution.clear()}}};function tYe(t){return t.map(e=>{if(!(e.source===void 0||e.expectedTokens===void 0||e.actualTokens===void 0))return{source:e.source,expectedTokens:e.expectedTokens,actualTokens:e.actualTokens}}).filter(e=>e!==void 0)}a(tYe,"componentStatisticsToPromptMatcher");var Obn=de(Dn());var I0=class{static{a(this,"ContextProviderRegistry")}},T5=class{static{a(this,"DefaultContextProviders")}},Use=class extends T5{constructor(){super();this.ids=[]}static{a(this,"DefaultContextProvidersContainer")}add(r){this.ids.push(r)}getIds(){return this.ids}},tjt=class extends I0{constructor(r,n){super();this.ctx=r;this.match=n;this._providers=[]}static{a(this,"CoreContextProviderRegistry")}registerContextProvider(r){if(r.id.includes(",")||r.id.includes("*"))throw new Error(`A context provider id cannot contain a comma or an asterisk. The id ${r.id} is invalid.`);if(this._providers.find(n=>n.id===r.id))throw new Error(`A context provider with id ${r.id} has already been registered`);this._providers.push(r)}unregisterContextProvider(r){this._providers=this._providers.filter(n=>n.id!==r)}get providers(){return this._providers.slice()}async resolveAllProviders(r,n,o,s,c,l){if(c?.isCancellationRequested)return Cr.debug(this.ctx,"Resolving context providers cancelled"),[];let u=new Map;Zze(this.ctx,u,s);let d=[];if(this._providers.length===0)return d;let p=await this.matchProviders(o,s),h=p.filter(I=>I[1]>0);if(p.filter(I=>I[1]<=0).forEach(([I,x])=>{let w={providerId:I.id,matchScore:x,resolution:"none",resolutionTimeMs:0,data:[]};d.push(w)}),h.length===0)return d;if(c?.isCancellationRequested)return Cr.debug(this.ctx,"Resolving context providers cancelled"),[];bbn(this.ctx,h.map(I=>I[0].id),u,s),Sbn(this.ctx,h.map(I=>I[0].id),u,s),Ibn(this.ctx,h.map(I=>I[0].id),u,s);let g=new Obn.CancellationTokenSource;if(c){let I=c.onCancellationRequested(x=>{g.cancel(),I.dispose()})}let A=U0e(this.ctx)&&!a5e(this.ctx)?0:rzo(this.ctx,s),y=A>0?Date.now()+A:Number.MAX_SAFE_INTEGER,E;A>0&&(E=setTimeout(()=>{g.cancel(),g.dispose()},A));let _=new Map,v={completionId:r,opportunityId:n,documentContext:o,activeExperiments:u,timeBudget:A,timeoutEnd:y,data:l};for(let[I]of h){let x=this.ctx.get(S0).getPreviousStatisticsForCompletion(r)?.get(I.id);x&&(v.previousUsageStatistics=x);let w=I.resolver.resolve(v,g.token);_.set(I.id,w)}let b=await d9r(_,g.token);E&&clearTimeout(E);for(let[I,x]of h){let w=b.get(I.id);if(w){if(w.status==="error")vx(w.reason)||Cr.error(this.ctx,`Error resolving context from ${I.id}: `,w.reason),d.push({providerId:I.id,matchScore:x,resolution:w.status,resolutionTimeMs:w.resolutionTime,data:[]});else{let R=[...w.value??[]];if((w.status==="none"||w.status==="partial")&&(Cr.info(this.ctx,`Context provider ${I.id} exceeded time budget of ${A}ms`),I.resolver.resolveOnTimeout))try{let N=I.resolver.resolveOnTimeout(v);IIt(N)?R.push(...N):N&&R.push(N),R.length>0&&(w.status="partial")}catch(N){Cr.error(this.ctx,`Error in fallback logic for context provider ${I.id}: `,N)}let[P,k]=Nbn(R);k&&Cr.error(this.ctx,`Dropped ${k} context items from ${I.id} due to invalid schema`);let Q=Mbn(this.ctx,P),M={providerId:I.id,matchScore:x,resolution:w.status,resolutionTimeMs:w.resolutionTime,data:Q};d.push(M)}this.ctx.get(S0).getStatisticsForCompletion(r).setLastResolution(I.id,w.status)}else Cr.error(this.ctx,`Context provider ${I.id} not found in results`)}return d.sort((I,x)=>x.matchScore-I.matchScore)}async matchProviders(r,n){let o=Bbn(this.ctx,n),s=o.length===1&&o[0]==="*";return await Promise.all(this._providers.map(async l=>{if(!s&&!o.includes(l.id))return[l,0];let u=await this.match(this.ctx,l.selector,r);return[l,u]}))}get matchFunction(){return this.match}},rjt=class extends I0{constructor(r){super();this.delegate=r;this._cachedContextItems=new $r(5)}static{a(this,"CachedContextProviderRegistry")}registerContextProvider(r){this.delegate.registerContextProvider(r)}unregisterContextProvider(r){this.delegate.unregisterContextProvider(r)}get providers(){return this.delegate.providers}async resolveAllProviders(r,n,o,s,c,l){let u=this._cachedContextItems.get(r);if(r&&u&&u.length>0)return u;let d=await this.delegate.resolveAllProviders(r,n,o,s,c,l);return d.length>0&&r&&this._cachedContextItems.set(r,d),d}get matchFunction(){return this.delegate.matchFunction}};function rYe(t,e){return new rjt(new tjt(t,e))}a(rYe,"getContextProviderRegistry");function nYe(t,e,r){let n=t.get(S0).getStatisticsForCompletion(e);return r.map(s=>{let{providerId:c,resolution:l,resolutionTimeMs:u,matchScore:d,data:p}=s,h=n.get(c),m=h?.usage??"none";(d<=0||l==="none"||l==="error")&&(m="none");let g={providerId:c,resolution:l,resolutionTimeMs:u,usage:m,usageDetails:h?.usageDetails,matched:d>0,numResolvedItems:p.length},A=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="full"||E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0,y=h?.usageDetails!==void 0?h?.usageDetails.filter(E=>E.usage==="partial"||E.usage==="partial_content_excluded").length:void 0;return A!==void 0&&(g.numUsedItems=A),y!==void 0&&(g.numPartiallyUsedItems=y),g})}a(nYe,"telemetrizeContextItems");function iYe(t){return t.matchScore>0&&t.resolution!=="error"}a(iYe,"matchContextItems");function Bbn(t,e){let r=njt(t,e),n=vr(t,tt.ContextProviders)??[];if(r.length===1&&r[0]==="*"||n.length===1&&n[0]==="*")return["*"];let o=t.get(T5).getIds();return Array.from(new Set([...o,...r,...n]))}a(Bbn,"getActiveContextProviders");function njt(t,e){return U0e(t)?["*"]:t.get(Gt).contextProviders(e)}a(njt,"getExpContextProviders");function Qse(t,e){return Bbn(t,e).length>0}a(Qse,"useContextProviderAPI");function rzo(t,e){let r=vr(t,tt.ContextProviderTimeBudget);return r!==void 0&&typeof r=="number"?r:t.get(Gt).contextProviderTimeBudget(e)}a(rzo,"getContextProviderTimeBudget");var D_=class{constructor(e){this.ctx=e;this.scheduledResolutions=new $r(25)}static{a(this,"ContextProviderBridge")}schedule(e,r,n,o,s,c){let l=this.ctx.get(I0),{textDocument:u,originalPosition:d,originalOffset:p,originalVersion:h,editsWithPosition:m}=e,g=l.resolveAllProviders(r,n,{uri:u.uri,languageId:u.detectedLanguageId,version:h,offset:p,position:d,proposedEdits:m.length>0?m:void 0},o,s,c?.data);this.scheduledResolutions.set(r,g)}async resolution(e){let r=this.scheduledResolutions.get(e);return r?await r:[]}};f();f();var oYe=class{constructor(e,r,n){this.languageId=e;this.nodeMatch=r;this.nodeTypesWithBlockOrStmtChild=n}static{a(this,"BaseBlockParser")}async getNodeMatchAtPosition(e,r,n){let o=await H8(this.languageId,e);try{let c=o.rootNode.descendantForIndex(r);for(;c;){let l=this.nodeMatch[c.type];if(l){if(!this.nodeTypesWithBlockOrStmtChild.has(c.type))break;let u=this.nodeTypesWithBlockOrStmtChild.get(c.type);if((u==""?c.namedChildren[0]:c.childForFieldName(u))?.type==l)break}c=c.parent}return c?n(c):void 0}finally{o.delete()}}getNextBlockAtPosition(e,r,n){return this.getNodeMatchAtPosition(e,r,o=>{let s=o.children.reverse().find(c=>c.type==this.nodeMatch[o.type]);if(s){if(this.languageId=="python"&&s.parent){let c=s.parent.type==":"?s.parent.parent:s.parent,l=c?.nextSibling;for(;l&&l.type=="comment";){let u=l.startPosition.row==s.endPosition.row&&l.startPosition.column>=s.endPosition.column,d=l.startPosition.row>c.endPosition.row&&l.startPosition.column>c.startPosition.column;if(u||d)s=l,l=l.nextSibling;else break}}if(!(s.endIndex>=s.tree.rootNode.endIndex-1&&(s.hasError||s.parent.hasError)))return n(s)}})}async isBlockBodyFinished(e,r,n){let o=(e+r).trimEnd(),s=await this.getNextBlockAtPosition(o,n,c=>c.endIndex);if(s!==void 0&&s0?c:void 0}}getNodeStart(e,r){let n=e.trimEnd();return this.getNodeMatchAtPosition(n,r,o=>o.startIndex)}},sYe=class extends oYe{constructor(r,n,o,s,c){super(r,s,c);this.blockEmptyMatch=n;this.lineMatch=o}static{a(this,"RegexBasedBlockParser")}isBlockStart(r){return this.lineMatch.test(r.trimStart())}async isBlockBodyEmpty(r,n){let o=await this.getNextBlockAtPosition(r,n,s=>{s.startIndex0&&/\s/.test(t.charAt(r-1));)r--;return r}a(Uvn,"rewindToNearestNonWs");function Fvn(t,e){let r=t.startIndex,n=t.startIndex-t.startPosition.column,o=e.substring(n,r);if(/^\s*$/.test(o))return o}a(Fvn,"indent");function nVo(t,e,r){if(e.startPosition.row<=t.startPosition.row)return!1;let n=Fvn(t,r),o=Fvn(e,r);return n!==void 0&&o!==void 0&&n.startsWith(o)}a(nVo,"outdented");var LN=class extends JYe{constructor(r,n,o,s,c,l,u){super(r,n,o);this.startKeywords=s;this.blockNodeType=c;this.emptyStatementType=l;this.curlyBraceLanguage=u}static{a(this,"TreeSitterBasedBlockParser")}isBlockEmpty(r,n){let o=r.text.trim();return this.curlyBraceLanguage&&(o.startsWith("{")&&(o=o.slice(1)),o.endsWith("}")&&(o=o.slice(0,-1)),o=o.trim()),!!(o.length==0||this.languageId=="python"&&(r.parent?.type=="class_definition"||r.parent?.type=="function_definition")&&r.children.length==1&&P6r(r.parent))}async isEmptyBlockStart(r,n){if(n>r.length)throw new RangeError("Invalid offset");for(let c=n;cA.type==";")&&h.endIndex<=n}h=h.parent}}let l=null,u=null,d=null,p=c;for(;p!=null;){if(p.type==this.blockNodeType){u=p;break}if(this.nodeMatch[p.type]){d=p;break}if(p.type=="ERROR"){l=p;break}p=p.parent}if(u!=null){if(!u.parent||!this.nodeMatch[u.parent.type])return!1;if(this.languageId=="python"){let h=u.previousSibling;if(h!=null&&h.hasError&&(h.text.startsWith('"""')||h.text.startsWith("'''")))return!0}return this.isBlockEmpty(u,n)}if(l!=null){if(l.previousSibling?.type=="module"||l.previousSibling?.type=="internal_module"||l.previousSibling?.type=="def")return!0;if(this.languageId==="python"&&s>=14&&l.hasError&&(l.text.startsWith('"')||l.text.startsWith("'"))){let A=l.parent?.type;if(A==="function_definition"||A==="class_definition"||A==="module")return!0}let h=[...l.children].reverse(),m=h.find(A=>this.startKeywords.includes(A.type)),g=h.find(A=>A.type==this.blockNodeType);if(m){switch(this.languageId){case"python":{m.type=="try"&&c.type=="identifier"&&c.text.length>4&&(g=h.find(E=>E.hasError)?.children.find(E=>E.type=="block"));let A,y=0;for(let E of l.children){if(E.type==":"&&y==0){A=E;break}E.type=="("&&(y+=1),E.type==")"&&(y-=1)}if(A&&m.endIndex<=A.startIndex&&A.nextSibling){if(m.type=="def"){let E=A.nextSibling;if(E.type=='"'||E.type=="'"||E.type=="ERROR"&&(E.text=='"""'||E.text=="'''"))return!0}return!1}break}case"javascript":{if(m.type==="class")if(s<=13){if(h.find(_=>_.type==="formal_parameters"))return!0}else{let E=l.children;for(let _=0;_E.type=="{");if(A&&A.startIndex>m.endIndex&&A.nextSibling!=null||h.find(E=>E.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}case"typescript":{let A=h.find(E=>E.type=="{");if(A&&A.startIndex>m.endIndex&&A.nextSibling!=null||h.find(E=>E.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}}return g&&g.startIndex>m.endIndex?this.isBlockEmpty(g,n):!0}}if(d!=null){let h=this.nodeMatch[d.type],m=d.children.slice().reverse().find(g=>g.type==h);if(m)return this.isBlockEmpty(m,n);if(this.nodeTypesWithBlockOrStmtChild.has(d.type)){let g=this.nodeTypesWithBlockOrStmtChild.get(d.type),A=g==""?d.children[0]:d.childForFieldName(g);if(A&&A.type!=this.blockNodeType&&A.type!=this.emptyStatementType)return!1}return!0}return!1}finally{o.delete()}}},iVo={python:new LN("python",{class_definition:"block",elif_clause:"block",else_clause:"block",except_clause:"block",finally_clause:"block",for_statement:"block",function_definition:"block",if_statement:"block",try_statement:"block",while_statement:"block",with_statement:"block"},new Map,["def","class","if","elif","else","for","while","try","except","finally","with"],"block",null,!1),javascript:new LN("javascript",{arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",method_definition:"statement_block",try_statement:"statement_block",while_statement:"statement_block",with_statement:"statement_block",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),typescript:new LN("typescript",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),tsx:new LN("typescriptreact",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),go:new XYe("go","{}",/\b(func|if|else|for)\b/,{communication_case:"block",default_case:"block",expression_case:"block",for_statement:"block",func_literal:"block",function_declaration:"block",if_statement:"block",labeled_statement:"block",method_declaration:"block",type_case:"block"},new Map),ruby:new XYe("ruby","end",/\b(BEGIN|END|case|class|def|do|else|elsif|for|if|module|unless|until|while)\b|->/,{begin_block:"}",block:"}",end_block:"}",lambda:"block",for:"do",until:"do",while:"do",case:"end",do:"end",if:"end",method:"end",module:"end",unless:"end",do_block:"end"},new Map),"c-sharp":new LN("csharp",{},new Map([]),[],"block",null,!0),java:new LN("java",{},new Map([]),[],"block",null,!0),php:new LN("php",{},new Map([]),[],"block",null,!0),cpp:new LN("cpp",{},new Map([]),[],"block",null,!0)};function FHt(t){if(!F1(t))throw new Error(`Language ${t} is not supported`);return iVo[_8e(t)]}a(FHt,"getBlockParser");async function Qvn(t,e,r){return F1(t)?FHt(t).isEmptyBlockStart(e,r):!1}a(Qvn,"isEmptyBlockStart");async function qvn(t,e,r,n){if(F1(t))return FHt(t).isBlockBodyFinished(e,r,n)}a(qvn,"isBlockBodyFinished");async function Gvn(t,e,r){if(F1(t))return FHt(t).getNodeStart(e,r)}a(Gvn,"getNodeStart");var Uqu=new Se("parseBlock");function Ybe(t,e,r){let n=e.getText(vc.range(vc.position(0,0),r)),o=e.offsetAt(r),s=e.detectedLanguageId;return c=>qvn(s,n,c,o)}a(Ybe,"parsingBlockFinished");function eKe(t,e){return Qvn(t.detectedLanguageId,t.getText(),t.offsetAt(e))}a(eKe,"isEmptyBlockStartUtil");async function Hvn(t,e,r,n){let s=e.getText(vc.range(vc.position(0,0),r))+n,c=await Gvn(e.detectedLanguageId,s,e.offsetAt(r));if(c)return e.positionAt(c)}a(Hvn,"getNodeStartUtil");var oVo=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map(t=>t+"\\b")),sVo=new RegExp(`^(${oVo.join("|")})`);function aVo(t){return sVo.test(t.trimLeft().toLowerCase())}a(aVo,"isContinuationLine");function ZYe(t){let e=/^(\s*)([^]*)$/.exec(t);if(e&&e[2]&&e[2].length>0)return e[1].length}a(ZYe,"indentationOfLine");function tKe(t,e){let r=t.getText(),n=t.offsetAt(e);return UHt(r,n,t.detectedLanguageId)}a(tKe,"contextIndentation");function UHt(t,e,r){let n=t.slice(0,e).split(` +`,e);return n<0&&(n=t.length),t.slice(r+1,n)}a(nzo,"getLineAtOffset");function Fbn(t,e){let r=e;for(;r>0&&/\s/.test(t.charAt(r-1));)r--;return r}a(Fbn,"rewindToNearestNonWs");function Lbn(t,e){let r=t.startIndex,n=t.startIndex-t.startPosition.column,o=e.substring(n,r);if(/^\s*$/.test(o))return o}a(Lbn,"indent");function izo(t,e,r){if(e.startPosition.row<=t.startPosition.row)return!1;let n=Lbn(t,r),o=Lbn(e,r);return n!==void 0&&o!==void 0&&n.startsWith(o)}a(izo,"outdented");var S5=class extends oYe{constructor(r,n,o,s,c,l,u){super(r,n,o);this.startKeywords=s;this.blockNodeType=c;this.emptyStatementType=l;this.curlyBraceLanguage=u}static{a(this,"TreeSitterBasedBlockParser")}isBlockEmpty(r,n){let o=r.text.trim();return this.curlyBraceLanguage&&(o.startsWith("{")&&(o=o.slice(1)),o.endsWith("}")&&(o=o.slice(0,-1)),o=o.trim()),!!(o.length==0||this.languageId=="python"&&(r.parent?.type=="class_definition"||r.parent?.type=="function_definition")&&r.children.length==1&&RFr(r.parent))}async isEmptyBlockStart(r,n){if(n>r.length)throw new RangeError("Invalid offset");for(let c=n;cA.type==";")&&h.endIndex<=n}h=h.parent}}let l=null,u=null,d=null,p=c;for(;p!=null;){if(p.type==this.blockNodeType){u=p;break}if(this.nodeMatch[p.type]){d=p;break}if(p.type=="ERROR"){l=p;break}p=p.parent}if(u!=null){if(!u.parent||!this.nodeMatch[u.parent.type])return!1;if(this.languageId=="python"){let h=u.previousSibling;if(h!=null&&h.hasError&&(h.text.startsWith('"""')||h.text.startsWith("'''")))return!0}return this.isBlockEmpty(u,n)}if(l!=null){if(l.previousSibling?.type=="module"||l.previousSibling?.type=="internal_module"||l.previousSibling?.type=="def")return!0;if(this.languageId==="python"&&s>=14&&l.hasError&&(l.text.startsWith('"')||l.text.startsWith("'"))){let A=l.parent?.type;if(A==="function_definition"||A==="class_definition"||A==="module")return!0}let h=[...l.children].reverse(),m=h.find(A=>this.startKeywords.includes(A.type)),g=h.find(A=>A.type==this.blockNodeType);if(m){switch(this.languageId){case"python":{m.type=="try"&&c.type=="identifier"&&c.text.length>4&&(g=h.find(E=>E.hasError)?.children.find(E=>E.type=="block"));let A,y=0;for(let E of l.children){if(E.type==":"&&y==0){A=E;break}E.type=="("&&(y+=1),E.type==")"&&(y-=1)}if(A&&m.endIndex<=A.startIndex&&A.nextSibling){if(m.type=="def"){let E=A.nextSibling;if(E.type=='"'||E.type=="'"||E.type=="ERROR"&&(E.text=='"""'||E.text=="'''"))return!0}return!1}break}case"javascript":{if(m.type==="class")if(s<=13){if(h.find(_=>_.type==="formal_parameters"))return!0}else{let E=l.children;for(let _=0;_E.type=="{");if(A&&A.startIndex>m.endIndex&&A.nextSibling!=null||h.find(E=>E.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}case"typescript":{let A=h.find(E=>E.type=="{");if(A&&A.startIndex>m.endIndex&&A.nextSibling!=null||h.find(E=>E.type=="do")&&m.type=="while"||m.type=="=>"&&m.nextSibling&&m.nextSibling.type!="{")return!1;break}}return g&&g.startIndex>m.endIndex?this.isBlockEmpty(g,n):!0}}if(d!=null){let h=this.nodeMatch[d.type],m=d.children.slice().reverse().find(g=>g.type==h);if(m)return this.isBlockEmpty(m,n);if(this.nodeTypesWithBlockOrStmtChild.has(d.type)){let g=this.nodeTypesWithBlockOrStmtChild.get(d.type),A=g==""?d.children[0]:d.childForFieldName(g);if(A&&A.type!=this.blockNodeType&&A.type!=this.emptyStatementType)return!1}return!0}return!1}finally{o.delete()}}},ozo={python:new S5("python",{class_definition:"block",elif_clause:"block",else_clause:"block",except_clause:"block",finally_clause:"block",for_statement:"block",function_definition:"block",if_statement:"block",try_statement:"block",while_statement:"block",with_statement:"block"},new Map,["def","class","if","elif","else","for","while","try","except","finally","with"],"block",null,!1),javascript:new S5("javascript",{arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",method_definition:"statement_block",try_statement:"statement_block",while_statement:"statement_block",with_statement:"statement_block",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),typescript:new S5("typescript",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),tsx:new S5("typescriptreact",{ambient_declaration:"statement_block",arrow_function:"statement_block",catch_clause:"statement_block",do_statement:"statement_block",else_clause:"statement_block",finally_clause:"statement_block",for_in_statement:"statement_block",for_statement:"statement_block",function:"statement_block",function_expression:"statement_block",function_declaration:"statement_block",generator_function:"statement_block",generator_function_declaration:"statement_block",if_statement:"statement_block",internal_module:"statement_block",method_definition:"statement_block",module:"statement_block",try_statement:"statement_block",while_statement:"statement_block",abstract_class_declaration:"class_body",class:"class_body",class_declaration:"class_body"},new Map([["arrow_function","body"],["do_statement","body"],["else_clause",""],["for_in_statement","body"],["for_statement","body"],["if_statement","consequence"],["while_statement","body"],["with_statement","body"]]),["declare","=>","try","catch","finally","do","for","if","else","while","with","function","function*","class"],"statement_block","empty_statement",!0),go:new sYe("go","{}",/\b(func|if|else|for)\b/,{communication_case:"block",default_case:"block",expression_case:"block",for_statement:"block",func_literal:"block",function_declaration:"block",if_statement:"block",labeled_statement:"block",method_declaration:"block",type_case:"block"},new Map),ruby:new sYe("ruby","end",/\b(BEGIN|END|case|class|def|do|else|elsif|for|if|module|unless|until|while)\b|->/,{begin_block:"}",block:"}",end_block:"}",lambda:"block",for:"do",until:"do",while:"do",case:"end",do:"end",if:"end",method:"end",module:"end",unless:"end",do_block:"end"},new Map),"c-sharp":new S5("csharp",{},new Map([]),[],"block",null,!0),java:new S5("java",{},new Map([]),[],"block",null,!0),php:new S5("php",{},new Map([]),[],"block",null,!0),cpp:new S5("cpp",{},new Map([]),[],"block",null,!0)};function ijt(t){if(!S1(t))throw new Error(`Language ${t} is not supported`);return ozo[RLe(t)]}a(ijt,"getBlockParser");async function Ubn(t,e,r){return S1(t)?ijt(t).isEmptyBlockStart(e,r):!1}a(Ubn,"isEmptyBlockStart");async function Qbn(t,e,r,n){if(S1(t))return ijt(t).isBlockBodyFinished(e,r,n)}a(Qbn,"isBlockBodyFinished");async function qbn(t,e,r){if(S1(t))return ijt(t).getNodeStart(e,r)}a(qbn,"getNodeStart");var KHu=new Se("parseBlock");function Vve(t,e,r){let n=e.getText(gc.range(gc.position(0,0),r)),o=e.offsetAt(r),s=e.detectedLanguageId;return c=>Qbn(s,n,c,o)}a(Vve,"parsingBlockFinished");function cYe(t,e){return Ubn(t.detectedLanguageId,t.getText(),t.offsetAt(e))}a(cYe,"isEmptyBlockStartUtil");async function Gbn(t,e,r,n){let s=e.getText(gc.range(gc.position(0,0),r))+n,c=await qbn(e.detectedLanguageId,s,e.offsetAt(r));if(c)return e.positionAt(c)}a(Gbn,"getNodeStartUtil");var szo=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map(t=>t+"\\b")),azo=new RegExp(`^(${szo.join("|")})`);function czo(t){return azo.test(t.trimLeft().toLowerCase())}a(czo,"isContinuationLine");function aYe(t){let e=/^(\s*)([^]*)$/.exec(t);if(e&&e[2]&&e[2].length>0)return e[1].length}a(aYe,"indentationOfLine");function lYe(t,e){let r=t.getText(),n=t.offsetAt(e);return ojt(r,n,t.detectedLanguageId)}a(lYe,"contextIndentation");function ojt(t,e,r){let n=t.slice(0,e).split(` `),o=t.slice(e).split(` -`);function s(p,h,m){let g=h,A,y;for(;A===void 0&&g>=0&&g=0&&!p[g].trim().startsWith('"""');)g--;if(g>=0)for(A=void 0,g--;A===void 0&&g>=0;)A=ZYe(p[g]),y=g,g--}}return[A,y]}a(s,"seekNonBlank");let[c,l]=s(n,n.length-1,-1),u=(()=>{if(!(c===void 0||l===void 0))for(let p=l-1;p>=0;p--){let h=ZYe(n[p]);if(h!==void 0&&h=0&&g=0&&!p[g].trim().startsWith('"""');)g--;if(g>=0)for(A=void 0,g--;A===void 0&&g>=0;)A=aYe(p[g]),y=g,g--}}return[A,y]}a(s,"seekNonBlank");let[c,l]=s(n,n.length-1,-1),u=(()=>{if(!(c===void 0||l===void 0))for(let p=l-1;p>=0;p--){let h=aYe(n[p]);if(h!==void 0&&h{let n=lVo(r,t,e);return n==="continue"?void 0:n}}a(jvn,"indentationBlockFinished");f();f();f();f();f();f();var uVo={tokenizerName:"o200k_base"};function dVo(t){return{...uVo,...t}}a(dVo,"cursorContextOptions");function Kbe(t,e={}){let r=dVo(e),n=wo(r.tokenizerName);if(r.maxLineCount!==void 0&&r.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(r.maxTokenLength!==void 0&&r.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(r.maxLineCount===0||r.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:r.tokenizerName};let o=t.source.slice(0,t.offset);return r.maxLineCount!==void 0&&(o=o.split(` +`).pop(),c=0;if(o&&s?.trim()!=""&&n[0].trim()!==""&&c++,!o&&lzo&&n[0].trim()===""&&c++,o||c++,n.length===c)return"continue";let l=Math.max(e.current,e.next??0);for(let u=c;u{let n=uzo(r,t,e);return n==="continue"?void 0:n}}a(Hbn,"indentationBlockFinished");f();f();f();f();f();f();var dzo={tokenizerName:"o200k_base"};function fzo(t){return{...dzo,...t}}a(fzo,"cursorContextOptions");function Wve(t,e={}){let r=fzo(e),n=To(r.tokenizerName);if(r.maxLineCount!==void 0&&r.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(r.maxTokenLength!==void 0&&r.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(r.maxLineCount===0||r.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:r.tokenizerName};let o=t.source.slice(0,t.offset);return r.maxLineCount!==void 0&&(o=o.split(` `).slice(-r.maxLineCount).join(` `)),r.maxTokenLength!==void 0&&(o=n.takeLastLinesTokens(o,r.maxTokenLength)),{context:o,lineCount:o.split(` -`).length,tokenLength:n.tokenLength(o),tokenizerName:r.tokenizerName}}a(Kbe,"getCursorContext");f();f();var fVo={function:"function",snippet:"snippet",snippets:"snippets",variable:"variable",parameter:"parameter",method:"method",class:"class",module:"module",alias:"alias","enum member":"enum member",interface:"interface"};function $vn(t){let e=fVo[t.semantics],r=["snippets"].includes(t.semantics)?"these":"this";return{headline:t.relativePath?`Compare ${r} ${e} from ${t.relativePath}:`:`Compare ${r} ${e}:`,snippet:t.snippet}}a($vn,"announceSnippet");var QHt=class{constructor(e){this.keys=[];this.cache={};this.size=e}static{a(this,"FifoCache")}put(e,r){if(this.cache[e]=r,this.keys.length>this.size){this.keys.push(e);let n=this.keys.shift()??"";delete this.cache[n]}}get(e){return this.cache[e]}};var qHt=class{static{a(this,"Tokenizer")}constructor(e){this.stopsForLanguage=gVo.get(e.languageId)??mVo}tokenize(e){return new Set(pVo(e).filter(r=>!this.stopsForLanguage.has(r)))}},Vvn=new QHt(20),xae=class{static{a(this,"WindowedMatcher")}constructor(e){this.referenceDoc=e,this.tokenizer=new qHt(e)}get referenceTokens(){return Promise.resolve(this.createReferenceTokens())}createReferenceTokens(){return this.referenceTokensCache??=this.tokenizer.tokenize(this._getCursorContextInfo(this.referenceDoc).context)}sortScoredSnippets(e,r="descending"){return r=="ascending"?e.sort((n,o)=>n.score>o.score?1:-1):r=="descending"?e.sort((n,o)=>n.score>o.score?-1:1):e}async retrieveAllSnippets(e,r="descending"){let n=[];if(e.source.length===0||(await this.referenceTokens).size===0)return n;let o=e.source.split(` -`),s=this.id()+":"+e.source,c=Vvn.get(s)??[],l=c.length==0,u=l?o.map(d=>this.tokenizer.tokenize(d),this.tokenizer):[];for(let[d,[p,h]]of this.getWindowsDelineations(o).entries()){if(l){let A=new Set;u.slice(p,h).forEach(y=>y.forEach(E=>A.add(E),A)),c.push(A)}let m=c[d],g=this.similarityScore(m,await this.referenceTokens);if(n.length&&p>0&&n[n.length-1].endLine>p){n[n.length-1].scorethis.size){this.keys.push(e);let n=this.keys.shift()??"";delete this.cache[n]}}get(e){return this.cache[e]}};var ajt=class{static{a(this,"Tokenizer")}constructor(e){this.stopsForLanguage=Azo.get(e.languageId)??gzo}tokenize(e){return new Set(hzo(e).filter(r=>!this.stopsForLanguage.has(r)))}},$bn=new sjt(20),qse=class{static{a(this,"WindowedMatcher")}constructor(e){this.referenceDoc=e,this.tokenizer=new ajt(e)}get referenceTokens(){return Promise.resolve(this.createReferenceTokens())}createReferenceTokens(){return this.referenceTokensCache??=this.tokenizer.tokenize(this._getCursorContextInfo(this.referenceDoc).context)}sortScoredSnippets(e,r="descending"){return r=="ascending"?e.sort((n,o)=>n.score>o.score?1:-1):r=="descending"?e.sort((n,o)=>n.score>o.score?-1:1):e}async retrieveAllSnippets(e,r="descending"){let n=[];if(e.source.length===0||(await this.referenceTokens).size===0)return n;let o=e.source.split(` +`),s=this.id()+":"+e.source,c=$bn.get(s)??[],l=c.length==0,u=l?o.map(d=>this.tokenizer.tokenize(d),this.tokenizer):[];for(let[d,[p,h]]of this.getWindowsDelineations(o).entries()){if(l){let A=new Set;u.slice(p,h).forEach(y=>y.forEach(E=>A.add(E),A)),c.push(A)}let m=c[d],g=this.similarityScore(m,await this.referenceTokens);if(n.length&&p>0&&n[n.length-1].endLine>p){n[n.length-1].scoree.length>0)}a(pVo,"splitIntoWords");var hVo=new Set(["we","our","you","it","its","they","them","their","this","that","these","those","is","are","was","were","be","been","being","have","has","had","having","do","does","did","doing","can","don","t","s","will","would","should","what","which","who","when","where","why","how","a","an","the","and","or","not","no","but","because","as","until","again","further","then","once","here","there","all","any","both","each","few","more","most","other","some","such","above","below","to","during","before","after","of","at","by","about","between","into","through","from","up","down","in","out","on","off","over","under","only","own","same","so","than","too","very","just","now"]),mVo=new Set(["if","then","else","for","while","with","def","function","return","TODO","import","try","catch","raise","finally","repeat","switch","case","match","assert","continue","break","const","class","enum","struct","static","new","super","this","var",...hVo]),gVo=new Map([]);f();function rKe(t,e){let r=[],n=e.length;if(n==0)return[];if(n({to:a(r=>new t(r,e),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return rKe(this.windowLength,e)}_getCursorContextInfo(e){return Kbe(e,{maxLineCount:this.windowLength})}similarityScore(e,r){return AVo(e,r)}};function AVo(t,e){let r=new Set;return t.forEach(n=>{e.has(n)&&r.add(n)}),r.size/(t.size+e.size-r.size)}a(AVo,"computeScore");f();var iKe=class t extends xae{static{a(this,"BlockTokenSubsetMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=a(e=>({to:a(r=>new t(r,e),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return rKe(this.windowLength,e)}_getCursorContextInfo(e){return Kbe(e,{maxLineCount:this.windowLength})}get referenceTokens(){return this.createReferenceTokensForLanguage()}async createReferenceTokensForLanguage(){return this.referenceTokensCache?this.referenceTokensCache:(this.referenceTokensCache=t.syntaxAwareSupportsLanguage(this.referenceDoc.languageId)?await this.syntaxAwareReferenceTokens():await super.referenceTokens,this.referenceTokensCache)}async syntaxAwareReferenceTokens(){let e=(await this.getEnclosingMemberStart(this.referenceDoc.source,this.referenceDoc.offset))?.startIndex,r=this.referenceDoc.offset,n=e?this.referenceDoc.source.slice(e,r):Kbe(this.referenceDoc,{maxLineCount:this.windowLength}).context;return this.tokenizer.tokenize(n)}static syntaxAwareSupportsLanguage(e){return e==="csharp"}similarityScore(e,r){return yVo(e,r)}async getEnclosingMemberStart(e,r){let n;try{n=await g6(this.referenceDoc.languageId,e);let o=n.rootNode.namedDescendantForIndex(r);for(;o&&!(t.isMember(o)||t.isBlock(o));)o=o.parent??void 0;return o}finally{n?.delete()}}static isMember(e){switch(e?.type){case"method_declaration":case"property_declaration":case"field_declaration":case"constructor_declaration":return!0;default:return!1}}static isBlock(e){switch(e?.type){case"class_declaration":case"struct_declaration":case"record_declaration":case"enum_declaration":case"interface_declaration":return!0;default:return!1}}};function yVo(t,e){let r=new Set;return e.forEach(n=>{t.has(n)&&r.add(n)}),r.size}a(yVo,"computeScore");var EVo=0,CVo=60,_Vo=4,vVo=1,bVo=20,TVo=1e4,Wvn={snippetLength:CVo,threshold:EVo,maxTopSnippets:_Vo,maxCharPerFile:TVo,maxNumberOfFiles:bVo,maxSnippetsPerFile:vVo,useSubsetMatching:!1};var GHt={snippetLength:60,threshold:0,maxTopSnippets:16,maxCharPerFile:1e5,maxNumberOfFiles:200,maxSnippetsPerFile:4};function SVo(t,e){return(e.useSubsetMatching?iKe.FACTORY(e.snippetLength):nKe.FACTORY(e.snippetLength)).to(t)}a(SVo,"getMatcher");async function zvn(t,e,r){let n=SVo(t,r);return r.maxTopSnippets===0?[]:(await e.filter(s=>s.source.length0).slice(0,r.maxNumberOfFiles).reduce(async(s,c)=>(await s).concat((await n.findMatches(c,r.maxSnippetsPerFile)).map(l=>({relativePath:c.relativePath,...l}))),Promise.resolve([]))).filter(s=>s.score&&s.snippet&&s.score>r.threshold).sort((s,c)=>s.score-c.score).slice(-r.maxTopSnippets)}a(zvn,"getSimilarSnippets");function Yvn(t,e){return{...GHt,useSubsetMatching:HHt(t,e)}}a(Yvn,"getCppSimilarFilesOptions");function Kvn(t){return GHt.maxTopSnippets}a(Kvn,"getCppNumberOfSnippets");var IVo=new Map([["cpp",Yvn]]);function oKe(t,e,r){let n=IVo.get(r);return n?n(t,e):{...Wvn,useSubsetMatching:HHt(t,e)}}a(oKe,"getSimilarFilesOptions");var xVo=new Map([["cpp",Kvn]]);function Jvn(t,e){let r=xVo.get(e);return r?r(t):x6r}a(Jvn,"getNumberOfSnippets");function HHt(t,e){return(e.filtersAndExp.exp.variables.copilotsubsetmatching||vr(t,tt.UseSubsetMatching))??!1}a(HHt,"useSubsetMatching");f();f();f();f();var wVo="content_excluded";async function sKe(t,e,r,n){let o=VYe(r,"CodeSnippet");if(o.length===0)return[];let s=new Set,c=o.flatMap(p=>p.data.map(h=>(s.add(h.uri),h.additionalUris?.forEach(m=>s.add(m)),{providerId:p.providerId,data:h}))),l=t.get(zr),u=new Map;await Promise.all(Array.from(s).map(async p=>{u.set(p,await l.getTextDocumentValidation({uri:p}))}));let d=t.get(P0).getStatisticsForCompletion(e);return c.filter(p=>{let m=[p.data.uri,...p.data.additionalUris??[]].every(g=>u.get(g)?.status==="valid");return m?d.addExpectations(p.providerId,[[p.data,"included"]]):d.addExpectations(p.providerId,[[p.data,wVo]]),m}).map(p=>p.data)}a(sKe,"getCodeSnippetsFromContextItems");function Xvn(t,e){let r=t.get(zr);return e.map(n=>({snippet:n,relativePath:r.getRelativePath(n)}))}a(Xvn,"addRelativePathToCodeSnippets");f();function Yd(t){if(t.children)return Array.isArray(t.children)?t.children.join(""):t.children}a(Yd,"Text");function u7(t){return t.children}a(u7,"Chunk");f();function xn(t,e,r){let n=[];Array.isArray(e.children)?n=e.children:e.children&&(n=[e.children]);let o={...e,children:n};return r&&(o.key=r),{type:t,props:o}}a(xn,"functionComponentFunction");function Lw(t){return{type:"f",children:t}}a(Lw,"fragmentFunction");Lw.isFragmentFunction=!0;var aKe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData($C,d=>{d.codeSnippets!==r&&n(d.codeSnippets),d.document.uri!==o?.uri&&s(d.document)}),!r||r.length===0||!o)return;let c=Xvn(t.ctx,r),l=new Map;for(let d of c){let p=d.relativePath??d.snippet.uri,h=l.get(p);h===void 0&&(h=[],l.set(p,h)),h.push(d)}let u=[];for(let[d,p]of l.entries()){let h=p.filter(m=>m.snippet.value.length>0);h.length>0&&u.push({chunkElements:h.map(m=>m.snippet),importance:Math.max(...h.map(m=>m.snippet.importance??0)),uri:d})}if(u.length!==0)return u.sort((d,p)=>p.importance-d.importance),u.reverse(),u.map(d=>{let p=[];return p.push(xn(Yd,{children:`Compare ${d.chunkElements.length>1?"these snippets":"this snippet"} from ${d.uri}:`})),d.chunkElements.forEach((h,m)=>{p.push(xn(Yd,{source:h,children:h.value},h.id)),d.chunkElements.length>1&&mArray.from({length:e.length}).map(()=>0));for(let n=0;n{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=WHt(c);return xn(Lw,{children:[xn(FW,{document:r,position:o,maxCharacters:m}),xn(uKe,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})]})}a(Xbe,"CurrentFile");function FW(t){if(t.document===void 0||t.position===void 0)return xn(Yd,{});let e=t.document.getText({start:{line:0,character:0},end:t.position});return e.length>t.maxCharacters&&(e=e.slice(-t.maxCharacters)),xn(Yd,{children:e})}a(FW,"BeforeCursor");function uKe(t,e){let[r,n]=e.useState("");if(t.document===void 0||t.position===void 0)return xn(Yd,{});let o=t.document.getText({start:t.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}});o.length>t.maxCharacters&&(o=o.slice(0,t.maxCharacters));let s=o.replace(/^.*/,"").trimStart();if(s==="")return xn(Yd,{});if(r===s)return xn(Yd,{children:r});let c=s;if(r!==""){let l=wo(t.tokenizer),u=l.takeFirstTokens(s,Jbe);u.tokens.length>0&&100*lKe(u.tokens,l.takeFirstTokens(r,Jbe).tokens)?.score<(t.suffixMatchThreshold??y8e)*u.tokens.length&&(c=r)}return c!==r&&n(c),xn(Yd,{children:c})}a(uKe,"AfterCursor");function Zvn(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0);e.useData($C,d=>{let p=d.document;(d.document.uri!==r?.uri||p.getText()!==r?.getText())&&n(p),d.position!==o&&s(d.position),d.maxPromptTokens!==c&&l(d.maxPromptTokens)});let u=WHt(c);return xn(FW,{document:r,position:o,maxCharacters:u})}a(Zvn,"DocumentPrefix");function ebn(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData($C,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=WHt(c);return xn(uKe,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})}a(ebn,"DocumentSuffix");f();var dKe=class{static{a(this,"WishlistElision")}elide(e,r,n,o,s){if(r<=0)throw new Error("Prefix limit must be greater than 0");let[c,l]=this.preparePrefixBlocks(e,s),{elidedSuffix:u,adjustedPrefixTokenLimit:d}=this.elideSuffix(n,o,r,l,s),p=this.elidePrefix(c,d,l,s);return{blocks:[u,...p],cycles:1}}preparePrefixBlocks(e,r){let n=0,o=new Set;return[e.map((c,l)=>{let u=0,p=c.value.split(/([^\n]*\n+)/).filter(m=>m!=="").map(m=>{let g=r.tokenLength(m);return u+=g,n+=g,{line:m,componentPath:c.componentPath,tokens:g}}),h=c.componentPath;if(o.has(h))throw new Error(`Duplicate component path in prefix blocks: ${h}`);return o.add(h),{...c,tokens:u,markedForRemoval:!1,originalIndex:l,lines:p}}),n]}elideSuffix(e,r,n,o,s){let c=e.value;if(c.length===0||r<=0)return{elidedSuffix:{...e,tokens:0,elidedValue:"",elidedTokens:0},adjustedPrefixTokenLimit:n+Math.max(0,r)};o!p.markedForRemoval).flatMap(p=>p.lines);if(c.length===0)return[];let[l,u]=this.trimPrefixLinesToFit(c,r,o),d=u;return s.map(p=>{if(p.markedForRemoval)return d+p.tokens<=r&&!p.chunks?(d+=p.tokens,{...p,elidedValue:p.value,elidedTokens:p.tokens}):{...p,elidedValue:"",elidedTokens:0};let h=l.filter(g=>g.componentPath===p.componentPath&&g.line!=="").map(g=>g.line).join(""),m=p.tokens;return h!==p.value&&(m=h!==""?o.tokenLength(h):0),{...p,elidedValue:h,elidedTokens:m}})}removeLowWeightPrefixBlocks(e,r,n){let o=n;e.sort((s,c)=>s.weight-c.weight);for(let s of e){if(o<=r)break;if(s.weight!==1&&!(s.chunks&&s.markedForRemoval))if(s.chunks&&s.chunks.size>0)for(let c of e)!c.markedForRemoval&&c.chunks&&[...s.chunks].every(l=>c.chunks?.has(l))&&(c.markedForRemoval=!0,o-=c.tokens);else s.markedForRemoval=!0,o-=s.tokens}return e.sort((s,c)=>s.originalIndex-c.originalIndex)}trimPrefixLinesToFit(e,r,n){let o=0,s=[];for(let c=e.length-1;c>=0;c--){let l=e[c],u=l.tokens;if(o+u<=r)s.unshift(l),o+=u;else break}if(s.length===0){let c=e[e.length-1];if(c&&c.line.length>0){let u=n.takeLastTokens(c.line,r);return s.push({line:u.text,componentPath:c.componentPath,tokens:u.tokens.length}),[s,u.tokens.length]}let l=`Cannot fit prefix within limit of ${r} tokens`;throw new Error(l)}return[s,o]}};function tbn(t){return t.map(e=>e.elidedValue).join("")}a(tbn,"makePrompt");function rbn(t){return t.filter(e=>e.type==="prefix").map(e=>e.elidedValue).join("")}a(rbn,"makePrefixPrompt");function nbn(t){if(t.length===0)return[];let e=new Map;for(let o of t)if(o.type==="context"&&o.index!==void 0){e.has(o.index)||e.set(o.index,[]);let s=o.elidedValue.trim();s.length>0&&e.get(o.index).push(s)}let r=Math.max(...Array.from(e.keys()),-1),n=[];for(let o=0;o<=r;o++){let s=e.get(o);if(s&&s.length>0){let c=s.join(` -`).trim();n.push(c)}else n.push("")}return n}a(nbn,"makeContextPrompt");f();var wae=class{constructor(e,r=zHt()){this.snapshot=e;this.transformers=r}static{a(this,"SnapshotWalker")}walkSnapshot(e){this.walkSnapshotNode(this.snapshot,void 0,e,{})}walkSnapshotNode(e,r,n,o){let s=this.transformers.reduce((l,u)=>u(e,r,l),{...o});if(n(e,r,s))for(let l of e.children??[])this.walkSnapshotNode(l,e,n,s)}};function zHt(){return[(t,e,r)=>{r.weight===void 0&&(r.weight=1);let n=t.props?.weight??1,o=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,weight:o*r.weight}},(t,e,r)=>{if(t.name===u7.name){let n=r.chunks?new Set(r.chunks):new Set;return n.add(t.path),{...r,chunks:n}}return r},(t,e,r)=>t.props?.source!==void 0?{...r,source:t.props.source}:r]}a(zHt,"defaultTransformers");f();var YHt={abap:{lineComment:{start:'"',end:""},markdownLanguageIds:["abap","sap-abap"]},aspdotnet:{lineComment:{start:"<%--",end:"--%>"}},bat:{lineComment:{start:"REM",end:""}},bibtex:{lineComment:{start:"%",end:""},markdownLanguageIds:["bibtex"]},blade:{lineComment:{start:"#",end:""}},BluespecSystemVerilog:{lineComment:{start:"//",end:""}},c:{lineComment:{start:"//",end:""},markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";",end:""},markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["coffeescript","coffee","cson","iced"]},cpp:{lineComment:{start:"//",end:""},markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"]},csharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["csharp","cs"]},css:{lineComment:{start:"/*",end:"*/"}},cuda:{lineComment:{start:"//",end:""}},dart:{lineComment:{start:"//",end:""}},dockerfile:{lineComment:{start:"#",end:""},markdownLanguageIds:["dockerfile","docker"]},dotenv:{lineComment:{start:"#",end:""}},elixir:{lineComment:{start:"#",end:""}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%",end:""},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"]},go:{lineComment:{start:"//",end:""},markdownLanguageIds:["go","golang"]},graphql:{lineComment:{start:"#",end:""}},groovy:{lineComment:{start:"//",end:""}},haml:{lineComment:{start:"-#",end:""}},handlebars:{lineComment:{start:"{{!",end:"}}"},markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"]},haskell:{lineComment:{start:"--",end:""},markdownLanguageIds:["haskell","hs"]},hlsl:{lineComment:{start:"//",end:""}},html:{lineComment:{start:""},markdownLanguageIds:["html","xhtml"]},ini:{lineComment:{start:";",end:""}},java:{lineComment:{start:"//",end:""},markdownLanguageIds:["java","jsp"]},javascript:{lineComment:{start:"//",end:""},markdownLanguageIds:["javascript","js"]},javascriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},jsonc:{lineComment:{start:"//",end:""}},jsx:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#",end:""},markdownLanguageIds:["julia","jl"]},kotlin:{lineComment:{start:"//",end:""},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%",end:""},markdownLanguageIds:["tex"]},legend:{lineComment:{start:"//",end:""}},less:{lineComment:{start:"//",end:""}},lua:{lineComment:{start:"--",end:""},markdownLanguageIds:["lua","pluto"]},makefile:{lineComment:{start:"#",end:""},markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"[]: #",end:""},markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec","mm","objc","obj-c"]},"objective-cpp":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#",end:""},markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//",end:""}},powershell:{lineComment:{start:"#",end:""},markdownLanguageIds:["powershell","ps","ps1"]},pug:{lineComment:{start:"//",end:""}},python:{lineComment:{start:"#",end:""},markdownLanguageIds:["python","py","gyp"]},ql:{lineComment:{start:"//",end:""}},r:{lineComment:{start:"#",end:""}},razor:{lineComment:{start:""},markdownLanguageIds:["cshtml","razor","razor-cshtml"]},ruby:{lineComment:{start:"#",end:""},markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"]},rust:{lineComment:{start:"//",end:""},markdownLanguageIds:["rust","rs"]},sass:{lineComment:{start:"//",end:""}},scala:{lineComment:{start:"//",end:""}},scss:{lineComment:{start:"//",end:""}},shellscript:{lineComment:{start:"#",end:""},markdownLanguageIds:["bash","sh","zsh"]},slang:{lineComment:{start:"//",end:""}},slim:{lineComment:{start:"/",end:""}},solidity:{lineComment:{start:"//",end:""},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--",end:""}},stylus:{lineComment:{start:"//",end:""}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//",end:""}},systemverilog:{lineComment:{start:"//",end:""}},terraform:{lineComment:{start:"#",end:""}},tex:{lineComment:{start:"%",end:""}},typescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["typescript","ts"]},typescriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["tsx"]},vb:{lineComment:{start:"'",end:""},markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//",end:""}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//",end:""}},xml:{lineComment:{start:""}},xsl:{lineComment:{start:""}},yaml:{lineComment:{start:"#",end:""},markdownLanguageIds:["yaml","yml"]}},ibn={};for(let[t,e]of Object.entries(YHt))if(e.markdownLanguageIds)for(let r of e.markdownLanguageIds)ibn[r]=t;else ibn[t]=t;var RVo={start:"//",end:""},PVo=["php","plaintext"],KHt={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function obn(t){return Object.values(KHt).includes(t.trim())}a(obn,"isShebangLine");function kVo({source:t}){return t.startsWith("#!")||t.startsWith("e.length>0)}a(hzo,"splitIntoWords");var mzo=new Set(["we","our","you","it","its","they","them","their","this","that","these","those","is","are","was","were","be","been","being","have","has","had","having","do","does","did","doing","can","don","t","s","will","would","should","what","which","who","when","where","why","how","a","an","the","and","or","not","no","but","because","as","until","again","further","then","once","here","there","all","any","both","each","few","more","most","other","some","such","above","below","to","during","before","after","of","at","by","about","between","into","through","from","up","down","in","out","on","off","over","under","only","own","same","so","than","too","very","just","now"]),gzo=new Set(["if","then","else","for","while","with","def","function","return","TODO","import","try","catch","raise","finally","repeat","switch","case","match","assert","continue","break","const","class","enum","struct","static","new","super","this","var",...mzo]),Azo=new Map([]);f();function uYe(t,e){let r=[],n=e.length;if(n==0)return[];if(n({to:a(r=>new t(r,e),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return uYe(this.windowLength,e)}_getCursorContextInfo(e){return Wve(e,{maxLineCount:this.windowLength})}similarityScore(e,r){return yzo(e,r)}};function yzo(t,e){let r=new Set;return t.forEach(n=>{e.has(n)&&r.add(n)}),r.size/(t.size+e.size-r.size)}a(yzo,"computeScore");f();var fYe=class t extends qse{static{a(this,"BlockTokenSubsetMatcher")}constructor(e,r){super(e),this.windowLength=r}static{this.FACTORY=a(e=>({to:a(r=>new t(r,e),"to")}),"FACTORY")}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){return uYe(this.windowLength,e)}_getCursorContextInfo(e){return Wve(e,{maxLineCount:this.windowLength})}get referenceTokens(){return this.createReferenceTokensForLanguage()}async createReferenceTokensForLanguage(){return this.referenceTokensCache?this.referenceTokensCache:(this.referenceTokensCache=t.syntaxAwareSupportsLanguage(this.referenceDoc.languageId)?await this.syntaxAwareReferenceTokens():await super.referenceTokens,this.referenceTokensCache)}async syntaxAwareReferenceTokens(){let e=(await this.getEnclosingMemberStart(this.referenceDoc.source,this.referenceDoc.offset))?.startIndex,r=this.referenceDoc.offset,n=e?this.referenceDoc.source.slice(e,r):Wve(this.referenceDoc,{maxLineCount:this.windowLength}).context;return this.tokenizer.tokenize(n)}static syntaxAwareSupportsLanguage(e){return e==="csharp"}similarityScore(e,r){return Ezo(e,r)}async getEnclosingMemberStart(e,r){let n;try{n=await H8(this.referenceDoc.languageId,e);let o=n.rootNode.namedDescendantForIndex(r);for(;o&&!(t.isMember(o)||t.isBlock(o));)o=o.parent??void 0;return o}finally{n?.delete()}}static isMember(e){switch(e?.type){case"method_declaration":case"property_declaration":case"field_declaration":case"constructor_declaration":return!0;default:return!1}}static isBlock(e){switch(e?.type){case"class_declaration":case"struct_declaration":case"record_declaration":case"enum_declaration":case"interface_declaration":return!0;default:return!1}}};function Ezo(t,e){let r=new Set;return e.forEach(n=>{t.has(n)&&r.add(n)}),r.size}a(Ezo,"computeScore");var _zo=0,Czo=60,vzo=4,bzo=1,Tzo=20,Szo=1e4,Vbn={snippetLength:Czo,threshold:_zo,maxTopSnippets:vzo,maxCharPerFile:Szo,maxNumberOfFiles:Tzo,maxSnippetsPerFile:bzo,useSubsetMatching:!1};var cjt={snippetLength:60,threshold:0,maxTopSnippets:16,maxCharPerFile:1e5,maxNumberOfFiles:200,maxSnippetsPerFile:4};function Izo(t,e){return(e.useSubsetMatching?fYe.FACTORY(e.snippetLength):dYe.FACTORY(e.snippetLength)).to(t)}a(Izo,"getMatcher");async function Wbn(t,e,r){let n=Izo(t,r);return r.maxTopSnippets===0?[]:(await e.filter(s=>s.source.length0).slice(0,r.maxNumberOfFiles).reduce(async(s,c)=>(await s).concat((await n.findMatches(c,r.maxSnippetsPerFile)).map(l=>({relativePath:c.relativePath,...l}))),Promise.resolve([]))).filter(s=>s.score&&s.snippet&&s.score>r.threshold).sort((s,c)=>s.score-c.score).slice(-r.maxTopSnippets)}a(Wbn,"getSimilarSnippets");function zbn(t,e){return{...cjt,useSubsetMatching:ljt(t,e)}}a(zbn,"getCppSimilarFilesOptions");function Ybn(t){return cjt.maxTopSnippets}a(Ybn,"getCppNumberOfSnippets");var xzo=new Map([["cpp",zbn]]);function pYe(t,e,r){let n=xzo.get(r);return n?n(t,e):{...Vbn,useSubsetMatching:ljt(t,e)}}a(pYe,"getSimilarFilesOptions");var wzo=new Map([["cpp",Ybn]]);function Kbn(t,e){let r=wzo.get(e);return r?r(t):IFr}a(Kbn,"getNumberOfSnippets");function ljt(t,e){return(e.filtersAndExp.exp.variables.copilotsubsetmatching||vr(t,tt.UseSubsetMatching))??!1}a(ljt,"useSubsetMatching");f();f();f();f();var Rzo="content_excluded";async function hYe(t,e,r,n){let o=eYe(r,"CodeSnippet");if(o.length===0)return[];let s=new Set,c=o.flatMap(p=>p.data.map(h=>(s.add(h.uri),h.additionalUris?.forEach(m=>s.add(m)),{providerId:p.providerId,data:h}))),l=t.get(zr),u=new Map;await Promise.all(Array.from(s).map(async p=>{u.set(p,await l.getTextDocumentValidation({uri:p}))}));let d=t.get(S0).getStatisticsForCompletion(e);return c.filter(p=>{let m=[p.data.uri,...p.data.additionalUris??[]].every(g=>u.get(g)?.status==="valid");return m?d.addExpectations(p.providerId,[[p.data,"included"]]):d.addExpectations(p.providerId,[[p.data,Rzo]]),m}).map(p=>p.data)}a(hYe,"getCodeSnippetsFromContextItems");function Jbn(t,e){let r=t.get(zr);return e.map(n=>({snippet:n,relativePath:r.getRelativePath(n)}))}a(Jbn,"addRelativePathToCodeSnippets");f();function Qd(t){if(t.children)return Array.isArray(t.children)?t.children.join(""):t.children}a(Qd,"Text");function L9(t){return t.children}a(L9,"Chunk");f();function xn(t,e,r){let n=[];Array.isArray(e.children)?n=e.children:e.children&&(n=[e.children]);let o={...e,children:n};return r&&(o.key=r),{type:t,props:o}}a(xn,"functionComponentFunction");function Iw(t){return{type:"f",children:t}}a(Iw,"fragmentFunction");Iw.isFragmentFunction=!0;var mYe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(N_,d=>{d.codeSnippets!==r&&n(d.codeSnippets),d.document.uri!==o?.uri&&s(d.document)}),!r||r.length===0||!o)return;let c=Jbn(t.ctx,r),l=new Map;for(let d of c){let p=d.relativePath??d.snippet.uri,h=l.get(p);h===void 0&&(h=[],l.set(p,h)),h.push(d)}let u=[];for(let[d,p]of l.entries()){let h=p.filter(m=>m.snippet.value.length>0);h.length>0&&u.push({chunkElements:h.map(m=>m.snippet),importance:Math.max(...h.map(m=>m.snippet.importance??0)),uri:d})}if(u.length!==0)return u.sort((d,p)=>p.importance-d.importance),u.reverse(),u.map(d=>{let p=[];return p.push(xn(Qd,{children:`Compare ${d.chunkElements.length>1?"these snippets":"this snippet"} from ${d.uri}:`})),d.chunkElements.forEach((h,m)=>{p.push(xn(Qd,{source:h,children:h.value},h.id)),d.chunkElements.length>1&&mArray.from({length:e.length}).map(()=>0));for(let n=0;n{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=pjt(c);return xn(Iw,{children:[xn($V,{document:r,position:o,maxCharacters:m}),xn(yYe,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})]})}a(Yve,"CurrentFile");function $V(t){if(t.document===void 0||t.position===void 0)return xn(Qd,{});let e=t.document.getText({start:{line:0,character:0},end:t.position});return e.length>t.maxCharacters&&(e=e.slice(-t.maxCharacters)),xn(Qd,{children:e})}a($V,"BeforeCursor");function yYe(t,e){let[r,n]=e.useState("");if(t.document===void 0||t.position===void 0)return xn(Qd,{});let o=t.document.getText({start:t.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}});o.length>t.maxCharacters&&(o=o.slice(0,t.maxCharacters));let s=o.replace(/^.*/,"").trimStart();if(s==="")return xn(Qd,{});if(r===s)return xn(Qd,{children:r});let c=s;if(r!==""){let l=To(t.tokenizer),u=l.takeFirstTokens(s,zve);u.tokens.length>0&&100*AYe(u.tokens,l.takeFirstTokens(r,zve).tokens)?.score<(t.suffixMatchThreshold??ILe)*u.tokens.length&&(c=r)}return c!==r&&n(c),xn(Qd,{children:c})}a(yYe,"AfterCursor");function Xbn(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0);e.useData(N_,d=>{let p=d.document;(d.document.uri!==r?.uri||p.getText()!==r?.getText())&&n(p),d.position!==o&&s(d.position),d.maxPromptTokens!==c&&l(d.maxPromptTokens)});let u=pjt(c);return xn($V,{document:r,position:o,maxCharacters:u})}a(Xbn,"DocumentPrefix");function Zbn(t,e){let[r,n]=e.useState(),[o,s]=e.useState(),[c,l]=e.useState(0),[u,d]=e.useState(),[p,h]=e.useState();e.useData(N_,g=>{let A=g.document;(g.document.uri!==r?.uri||A.getText()!==r?.getText())&&n(A),g.position!==o&&s(g.position),g.suffixMatchThreshold!==u&&d(g.suffixMatchThreshold),g.maxPromptTokens!==c&&l(g.maxPromptTokens),g.tokenizer!==p&&h(g.tokenizer)});let m=pjt(c);return xn(yYe,{document:r,position:o,suffixMatchThreshold:u,maxCharacters:m,tokenizer:p})}a(Zbn,"DocumentSuffix");f();var EYe=class{static{a(this,"WishlistElision")}elide(e,r,n,o,s){if(r<=0)throw new Error("Prefix limit must be greater than 0");let[c,l]=this.preparePrefixBlocks(e,s),{elidedSuffix:u,adjustedPrefixTokenLimit:d}=this.elideSuffix(n,o,r,l,s),p=this.elidePrefix(c,d,l,s);return{blocks:[u,...p],cycles:1}}preparePrefixBlocks(e,r){let n=0,o=new Set;return[e.map((c,l)=>{let u=0,p=c.value.split(/([^\n]*\n+)/).filter(m=>m!=="").map(m=>{let g=r.tokenLength(m);return u+=g,n+=g,{line:m,componentPath:c.componentPath,tokens:g}}),h=c.componentPath;if(o.has(h))throw new Error(`Duplicate component path in prefix blocks: ${h}`);return o.add(h),{...c,tokens:u,markedForRemoval:!1,originalIndex:l,lines:p}}),n]}elideSuffix(e,r,n,o,s){let c=e.value;if(c.length===0||r<=0)return{elidedSuffix:{...e,tokens:0,elidedValue:"",elidedTokens:0},adjustedPrefixTokenLimit:n+Math.max(0,r)};o!p.markedForRemoval).flatMap(p=>p.lines);if(c.length===0)return[];let[l,u]=this.trimPrefixLinesToFit(c,r,o),d=u;return s.map(p=>{if(p.markedForRemoval)return d+p.tokens<=r&&!p.chunks?(d+=p.tokens,{...p,elidedValue:p.value,elidedTokens:p.tokens}):{...p,elidedValue:"",elidedTokens:0};let h=l.filter(g=>g.componentPath===p.componentPath&&g.line!=="").map(g=>g.line).join(""),m=p.tokens;return h!==p.value&&(m=h!==""?o.tokenLength(h):0),{...p,elidedValue:h,elidedTokens:m}})}removeLowWeightPrefixBlocks(e,r,n){let o=n;e.sort((s,c)=>s.weight-c.weight);for(let s of e){if(o<=r)break;if(s.weight!==1&&!(s.chunks&&s.markedForRemoval))if(s.chunks&&s.chunks.size>0)for(let c of e)!c.markedForRemoval&&c.chunks&&[...s.chunks].every(l=>c.chunks?.has(l))&&(c.markedForRemoval=!0,o-=c.tokens);else s.markedForRemoval=!0,o-=s.tokens}return e.sort((s,c)=>s.originalIndex-c.originalIndex)}trimPrefixLinesToFit(e,r,n){let o=0,s=[];for(let c=e.length-1;c>=0;c--){let l=e[c],u=l.tokens;if(o+u<=r)s.unshift(l),o+=u;else break}if(s.length===0){let c=e[e.length-1];if(c&&c.line.length>0){let u=n.takeLastTokens(c.line,r);return s.push({line:u.text,componentPath:c.componentPath,tokens:u.tokens.length}),[s,u.tokens.length]}let l=`Cannot fit prefix within limit of ${r} tokens`;throw new Error(l)}return[s,o]}};function eTn(t){return t.map(e=>e.elidedValue).join("")}a(eTn,"makePrompt");function tTn(t){return t.filter(e=>e.type==="prefix").map(e=>e.elidedValue).join("")}a(tTn,"makePrefixPrompt");function rTn(t){if(t.length===0)return[];let e=new Map;for(let o of t)if(o.type==="context"&&o.index!==void 0){e.has(o.index)||e.set(o.index,[]);let s=o.elidedValue.trim();s.length>0&&e.get(o.index).push(s)}let r=Math.max(...Array.from(e.keys()),-1),n=[];for(let o=0;o<=r;o++){let s=e.get(o);if(s&&s.length>0){let c=s.join(` +`).trim();n.push(c)}else n.push("")}return n}a(rTn,"makeContextPrompt");f();var Gse=class{constructor(e,r=hjt()){this.snapshot=e;this.transformers=r}static{a(this,"SnapshotWalker")}walkSnapshot(e){this.walkSnapshotNode(this.snapshot,void 0,e,{})}walkSnapshotNode(e,r,n,o){let s=this.transformers.reduce((l,u)=>u(e,r,l),{...o});if(n(e,r,s))for(let l of e.children??[])this.walkSnapshotNode(l,e,n,s)}};function hjt(){return[(t,e,r)=>{r.weight===void 0&&(r.weight=1);let n=t.props?.weight??1,o=typeof n=="number"?Math.max(0,Math.min(1,n)):1;return{...r,weight:o*r.weight}},(t,e,r)=>{if(t.name===L9.name){let n=r.chunks?new Set(r.chunks):new Set;return n.add(t.path),{...r,chunks:n}}return r},(t,e,r)=>t.props?.source!==void 0?{...r,source:t.props.source}:r]}a(hjt,"defaultTransformers");f();var mjt={abap:{lineComment:{start:'"',end:""},markdownLanguageIds:["abap","sap-abap"]},aspdotnet:{lineComment:{start:"<%--",end:"--%>"}},bat:{lineComment:{start:"REM",end:""}},bibtex:{lineComment:{start:"%",end:""},markdownLanguageIds:["bibtex"]},blade:{lineComment:{start:"#",end:""}},BluespecSystemVerilog:{lineComment:{start:"//",end:""}},c:{lineComment:{start:"//",end:""},markdownLanguageIds:["c","h"]},clojure:{lineComment:{start:";",end:""},markdownLanguageIds:["clojure","clj"]},coffeescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["coffeescript","coffee","cson","iced"]},cpp:{lineComment:{start:"//",end:""},markdownLanguageIds:["cpp","hpp","cc","hh","c++","h++","cxx","hxx"]},csharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["csharp","cs"]},css:{lineComment:{start:"/*",end:"*/"}},cuda:{lineComment:{start:"//",end:""}},dart:{lineComment:{start:"//",end:""}},dockerfile:{lineComment:{start:"#",end:""},markdownLanguageIds:["dockerfile","docker"]},dotenv:{lineComment:{start:"#",end:""}},elixir:{lineComment:{start:"#",end:""}},erb:{lineComment:{start:"<%#",end:"%>"}},erlang:{lineComment:{start:"%",end:""},markdownLanguageIds:["erlang","erl"]},fsharp:{lineComment:{start:"//",end:""},markdownLanguageIds:["fsharp","fs","fsx","fsi","fsscript"]},go:{lineComment:{start:"//",end:""},markdownLanguageIds:["go","golang"]},graphql:{lineComment:{start:"#",end:""}},groovy:{lineComment:{start:"//",end:""}},haml:{lineComment:{start:"-#",end:""}},handlebars:{lineComment:{start:"{{!",end:"}}"},markdownLanguageIds:["handlebars","hbs","html.hbs","html.handlebars"]},haskell:{lineComment:{start:"--",end:""},markdownLanguageIds:["haskell","hs"]},hlsl:{lineComment:{start:"//",end:""}},html:{lineComment:{start:""},markdownLanguageIds:["html","xhtml"]},ini:{lineComment:{start:";",end:""}},java:{lineComment:{start:"//",end:""},markdownLanguageIds:["java","jsp"]},javascript:{lineComment:{start:"//",end:""},markdownLanguageIds:["javascript","js"]},javascriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},jsonc:{lineComment:{start:"//",end:""}},jsx:{lineComment:{start:"//",end:""},markdownLanguageIds:["jsx"]},julia:{lineComment:{start:"#",end:""},markdownLanguageIds:["julia","jl"]},kotlin:{lineComment:{start:"//",end:""},markdownLanguageIds:["kotlin","kt"]},latex:{lineComment:{start:"%",end:""},markdownLanguageIds:["tex"]},legend:{lineComment:{start:"//",end:""}},less:{lineComment:{start:"//",end:""}},lua:{lineComment:{start:"--",end:""},markdownLanguageIds:["lua","pluto"]},makefile:{lineComment:{start:"#",end:""},markdownLanguageIds:["makefile","mk","mak","make"]},markdown:{lineComment:{start:"[]: #",end:""},markdownLanguageIds:["markdown","md","mkdown","mkd"]},"objective-c":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec","mm","objc","obj-c"]},"objective-cpp":{lineComment:{start:"//",end:""},markdownLanguageIds:["objectivec++","objc+"]},perl:{lineComment:{start:"#",end:""},markdownLanguageIds:["perl","pl","pm"]},php:{lineComment:{start:"//",end:""}},powershell:{lineComment:{start:"#",end:""},markdownLanguageIds:["powershell","ps","ps1"]},pug:{lineComment:{start:"//",end:""}},python:{lineComment:{start:"#",end:""},markdownLanguageIds:["python","py","gyp"]},ql:{lineComment:{start:"//",end:""}},r:{lineComment:{start:"#",end:""}},razor:{lineComment:{start:""},markdownLanguageIds:["cshtml","razor","razor-cshtml"]},ruby:{lineComment:{start:"#",end:""},markdownLanguageIds:["ruby","rb","gemspec","podspec","thor","irb"]},rust:{lineComment:{start:"//",end:""},markdownLanguageIds:["rust","rs"]},sass:{lineComment:{start:"//",end:""}},scala:{lineComment:{start:"//",end:""}},scss:{lineComment:{start:"//",end:""}},shellscript:{lineComment:{start:"#",end:""},markdownLanguageIds:["bash","sh","zsh"]},slang:{lineComment:{start:"//",end:""}},slim:{lineComment:{start:"/",end:""}},solidity:{lineComment:{start:"//",end:""},markdownLanguageIds:["solidity","sol"]},sql:{lineComment:{start:"--",end:""}},stylus:{lineComment:{start:"//",end:""}},svelte:{lineComment:{start:""}},swift:{lineComment:{start:"//",end:""}},systemverilog:{lineComment:{start:"//",end:""}},terraform:{lineComment:{start:"#",end:""}},tex:{lineComment:{start:"%",end:""}},typescript:{lineComment:{start:"//",end:""},markdownLanguageIds:["typescript","ts"]},typescriptreact:{lineComment:{start:"//",end:""},markdownLanguageIds:["tsx"]},vb:{lineComment:{start:"'",end:""},markdownLanguageIds:["vb","vbscript"]},verilog:{lineComment:{start:"//",end:""}},"vue-html":{lineComment:{start:""}},vue:{lineComment:{start:"//",end:""}},xml:{lineComment:{start:""}},xsl:{lineComment:{start:""}},yaml:{lineComment:{start:"#",end:""},markdownLanguageIds:["yaml","yml"]}},nTn={};for(let[t,e]of Object.entries(mjt))if(e.markdownLanguageIds)for(let r of e.markdownLanguageIds)nTn[r]=t;else nTn[t]=t;var Pzo={start:"//",end:""},kzo=["php","plaintext"],gjt={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function iTn(t){return Object.values(gjt).includes(t.trim())}a(iTn,"isShebangLine");function Dzo({source:t}){return t.startsWith("#!")||t.startsWith("NVo(s,e)).join(` +`).map(s=>Nzo(s,e)).join(` `);return r?o+` -`:o}a(FN,"commentBlockAsSingles");function fKe(t){let{languageId:e}=t;return PVo.indexOf(e)===-1&&!kVo(t)?e in KHt?KHt[e]:`Language: ${e}`:""}a(fKe,"getLanguageMarker");function pKe(t){return t.relativePath?`Path: ${t.relativePath}`:""}a(pKe,"getPathMarker");function Zbe(t){return t===""||t.endsWith(` +`:o}a(I5,"commentBlockAsSingles");function _Ye(t){let{languageId:e}=t;return kzo.indexOf(e)===-1&&!Dzo(t)?e in gjt?gjt[e]:`Language: ${e}`:""}a(_Ye,"getLanguageMarker");function CYe(t){return t.relativePath?`Path: ${t.relativePath}`:""}a(CYe,"getPathMarker");function Kve(t){return t===""||t.endsWith(` `)?t:t+` -`}a(Zbe,"newLineEnded");var DVo=5,Rae=class{constructor(){this.renderId=0;this.formatPrefix=tbn}static{a(this,"CompletionsPromptRenderer")}render(e,r,n){let o=this.renderId++,s=performance.now();try{if(n?.isCancellationRequested)return{status:"cancelled"};let c=r.delimiter??"",l=r.tokenizer??"o200k_base",{prefixBlocks:u,suffixBlock:d,componentStatistics:p}=this.processSnapshot(e,c,r.languageId),{prefixTokenLimit:h,suffixTokenLimit:m}=this.getPromptLimits(d,r),g=performance.now(),A=new dKe,{blocks:[y,...E]}=A.elide(u,h,d,m,wo(l)),_=performance.now(),v=this.formatPrefix(E),b=this.formatContext?this.formatContext(E):void 0,I=y.elidedValue,x=E.reduce((R,w)=>R+w.elidedTokens,0);return p.push(...MVo([...E,y])),{prefix:v,prefixTokens:x,suffix:I,suffixTokens:y.elidedTokens,context:b,status:"ok",metadata:{renderId:o,rendererName:"c",tokenizer:l,elisionTimeMs:_-g,renderTimeMs:performance.now()-s,componentStatistics:p,updateDataTimeMs:p.reduce((R,w)=>R+(w.updateDataTimeMs??0),0)}}}catch(c){return{status:"error",error:c}}}getPromptLimits(e,r){let n=e?.value??"",o=r.promptTokenLimit,s=r.suffixPercent;if(n.length==0||s==0)return{prefixTokenLimit:o,suffixTokenLimit:0};o=n.length>0?o-DVo:o;let c=Math.ceil(o*(s/100));return{prefixTokenLimit:o-c,suffixTokenLimit:c}}processSnapshot(e,r,n){let o=[],s=[],c=[],l=!1;if(new wae(e,JHt).walkSnapshot((p,h,m)=>{if(p===e||(p.name===Xbe.name&&(l=!0),p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.value===void 0||p.value===""))return!0;let g=m.chunks;if(m.type==="suffix")s.push({value:eTe(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let A=p.value.endsWith(r)?p.value:p.value+r,y=A;m.type==="prefix"?y=p.value:obn(p.value)?y=A:y=FN(A,n),o.push({type:m.type==="prefix"?"prefix":"context",value:eTe(y),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source})}return!0}),!l)throw new Error(`Node of type ${Xbe.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}},JHt=[...zHt(),(t,e,r)=>cKe(t)?{...r,type:"context"}:r,(t,e,r)=>t.name===FW.name?{...r,type:"prefix"}:r,(t,e,r)=>t.name===uKe.name?{...r,type:"suffix"}:r];function MVo(t){return t.map(e=>{let r={componentPath:e.componentPath};return e.tokens!==0&&(r.expectedTokens=e.tokens,r.actualTokens=e.elidedTokens),e.nodeStatistics.updateDataTimeMs!==void 0&&(r.updateDataTimeMs=e.nodeStatistics.updateDataTimeMs),e.source&&(r.source=e.source),r})}a(MVo,"computeComponentStatistics");function eTe(t){return t.replace(/\r\n?/g,` -`)}a(eTe,"normalizeLineEndings");f();var hKe=a((t,e)=>{let[r,n]=e.useState();if(e.useData($C,o=>{o.document.uri!==r?.uri&&n(o.document)}),r){let o=t.ctx.get(zr),s=o.getRelativePath(r),c={uri:r.uri,source:r.getText(),relativePath:s,languageId:r.detectedLanguageId},l=o.findNotebook(r);return c.relativePath&&!l?xn(OVo,{docInfo:c}):xn(BVo,{docInfo:c})}},"DocumentMarker"),OVo=a(t=>xn(Yd,{children:pKe(t.docInfo)}),"PathMarker"),BVo=a(t=>xn(Yd,{children:fKe(t.docInfo)}),"LanguageMarker");f();f();f();var NYo=de(KW()),DYo=de(KN()),JTn=de(so()),MYo=de(LKe());var JN=class extends JTn.Disposable{static{a(this,"RecentEditsProvider")}};function OYo(t,e=!1,r=void 0,n){if(e&&(r===void 0||n===void 0))throw new Error("cursorLine and activeDocDistanceLimitFromCursor are required when filterByCursorLine is true");let o=t.startLine-1,s=t.endLine-1;return!!(e&&(Math.abs(o-r)<=n||Math.abs(s-r)<=n))}a(OYo,"editIsTooCloseToCursor");var dJe=a((t,e)=>{let[r,n]=e.useState();return e.useData($C,async o=>{if(!o.document)return;let s=t.ctx.get(JN);if(s.isEnabled())s.start();else return;let c=s.config,l=s.getRecentEdits(),u=new Set,d=t.ctx.get(zr),p=[];for(let m=l.length-1;m>=0&&!(p.length>=c.maxEdits);m--){let g=l[m];if(!await d.getTextDocument({uri:g.file}))continue;let A=!u.has(g.file);if(u.size+(A?1:0)>c.maxFiles)break;let E=g.file===o.document?.uri,_=E?o.position.line:void 0;if(OYo(g,E,_,c.activeDocDistanceLimitFromCursor))continue;let b=s.getEditSummary(g);if(b){u.add(g.file);let I=d.getRelativePath({uri:g.file});p.unshift(Zbe(`File: ${I}`)+Zbe(b))}}if(p.length===0){n(void 0);return}let h=Zbe("These are recently edited files. Do not suggest code that has been deleted.")+p.join("")+Zbe("End of recent edits");n(h)}),r?xn(u7,{children:xn(Yd,{children:r})}):void 0},"RecentEdits");f();f();f();var fJe=class{constructor(e){this.docManager=e}static{a(this,"OpenTabFiles")}truncateDocs(e,r,n,o){let s=new Map,c=0;for(let l of e)if(!(c+l.getText().length>XW.MAX_NEIGHBOR_AGGREGATE_LENGTH)&&(l.uri.startsWith("file:")&&r.startsWith("file:")&&l.uri!==r&&pJe(n,l.detectedLanguageId)&&(s.set(l.uri.toString(),{uri:l.uri.toString(),relativePath:this.docManager.getRelativePath(l),source:l.getText()}),c+=l.getText().length),s.size>=o))break;return s}async getNeighborFiles(e,r,n){let o=new Map,s=new Map;return o=this.truncateDocs(fvn(await this.docManager.textDocuments()),e,r,n),s.set("opentabs",Array.from(o.keys()).map(c=>c.toString())),{docs:o,neighborSource:s}}};f();f();function XTn(t,e,r){return async function(...n){return await Promise.race([t.apply(this,n),new Promise(o=>{setTimeout(o,e,r)})])}}a(XTn,"shortCircuit");f();function LYo(...t){return JSON.stringify(t,(e,r)=>typeof r=="object"?r:String(r))}a(LYo,"defaultHash");function Jjt(t,e={}){let{hash:r=LYo,cache:n=new Map}=e;return function(...o){let s=r.apply(this,o);if(n.has(s))return n.get(s);let c=t.apply(this,o);return c instanceof Promise&&(c=c.catch(l=>{throw n.delete(s),l})),n.set(s,c),c}}a(Jjt,"memoize");var ZTn={entries:[],traits:[]},hJe={entries:new Map,traits:[]},Xjt=class extends $r{constructor(r,n=120*1e3){super(r);this.defaultEvictionTimeMs=n;this._cacheTimestamps=new Map}static{a(this,"PromiseExpirationCacheMap")}bumpRetryCount(r){let n=this._cacheTimestamps.get(r);return n?++n.retryCount:(this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),0)}has(r){return this.isValid(r)?super.has(r):(this.deleteExpiredEntry(r),!1)}get(r){let n=super.get(r);if(this.isValid(r))return n;this.deleteExpiredEntry(r)}set(r,n){let o=super.set(r,n);return this.isValid(r)||this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),o}clear(){super.clear(),this._cacheTimestamps.clear()}isValid(r){let n=this._cacheTimestamps.get(r);return n!==void 0&&Date.now()-n.timestamp=UYo?c=hJe:c=void 0);let l=performance.now()-s;if(xp.debug(t,c!==void 0?`Fetched ${[...c.entries.values()].map(u=>u.size).reduce((u,d)=>u+d,0)} related files for '${e.uri}' in ${l}ms.`:`Failing fetching files for '${e.uri}' in ${l}ms.`),c===void 0)throw new mJe;return c}a(tSn,"getRelatedFiles");var Zjt=Jjt(tSn,{cache:eSn,hash:a((t,e,r,n,o)=>`${e.uri}`,"hash")});Zjt=XTn(Zjt,200,hJe);async function gJe(t,e,r,n,o,s=!1){let c=t.get(ZW),l=hJe;try{let u={uri:e.uri,clientLanguageId:e.clientLanguageId,data:o};l=s?await tSn(t,u,r,n,c):await Zjt(t,u,r,n,c)}catch(u){l=hJe,u instanceof mJe&&at(t,"getRelatedFilesList",r)}return xp.debug(t,l!=null?`Fetched following traits ${l.traits.map(u=>`{${u.name} : ${u.value}}`).join("")} for '${e.uri}'`:`Failing fecthing traits for '${e.uri}'.`),l}a(gJe,"getRelatedFilesAndTraits");function pJe(t,e){return lye(t)===lye(e)}a(pJe,"considerNeighborFile");var XW=class t{static{a(this,"NeighborSource")}static{this.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5}static{this.MAX_NEIGHBOR_FILES=20}static{this.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"]}static defaultEmptyResult(){return{docs:new Map,neighborSource:new Map,traits:[]}}static reset(){t.instance=void 0}static async getNeighborFilesAndTraits(e,r,n,o,s,c,l){let u=e.get(zr);t.instance===void 0&&(t.instance=new fJe(u));let d={...await t.instance.getNeighborFiles(r,n,t.MAX_NEIGHBOR_FILES),traits:[]};if(QYo(e,o))return d;let p=await u.getTextDocument({uri:r});if(!p)return xp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: failed to get the document ${r}`),d;let h=u.getWorkspaceFolder(p);if(!h)return xp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: ${r} is not under the workspace folder`),d;let m=await gJe(e,p,o,s,c,l);return m.entries.size===0?(xp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`0 related files found for ${r}`),d.traits.push(...m.traits),d):(m.entries.forEach((g,A)=>{let y=[];g.forEach((E,_)=>{let v=t.getRelativePath(_,h.uri);if(!v||d.docs.has(_))return;let b={relativePath:v,uri:_,source:E};y.unshift(b),d.docs.set(_,b)}),y.length>0&&d.neighborSource.set(A,y.map(E=>E.uri.toString()))}),d.traits.push(...m.traits),d)}static basename(e){return decodeURIComponent(e.replace(/[#?].*$/,"").replace(/^.*[/:]/,""))}static getRelativePath(e,r){let n=r.toString().replace(/[#?].*/,"").replace(/\/?$/,"/");return e.toString().startsWith(n)?e.toString().slice(n.length):t.basename(e)}};function QYo(t,e){return t.get(jt).excludeRelatedFiles(e)||vr(t,tt.ExcludeRelatedFiles)}a(QYo,"isExcludeRelatedFilesActive");function rSn(t,e){return t.get(jt).includeNeighboringFiles(e)||vr(t,tt.IncludeNeighboringFiles)}a(rSn,"isIncludeNeighborFilesActive");var AJe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState([]);e.useData($C,async u=>{u.document.uri!==r?.uri&&s([]),n(u.document);let d=XW.defaultEmptyResult();u.turnOffSimilarFiles||(d=await XW.getNeighborFilesAndTraits(t.ctx,u.document.uri,u.document.detectedLanguageId,u.telemetryData,u.cancellationToken,u.data));let p=await c(u.telemetryData,u.document,u,d);s(p)});async function c(u,d,p,h){let m=zae(t.ctx,u,d.detectedLanguageId);return(await l(m,u,d,p,h)).filter(A=>A.snippet.length>0).sort((A,y)=>A.score-y.score).map(A=>({...$vn(A),score:A.score}))}a(c,"produceSimilarFiles");async function l(u,d,p,h,m){let g=u.similarFilesOptions||oKe(t.ctx,d,p.detectedLanguageId),y=t.ctx.get(zr).getRelativePath(p),E={uri:p.uri,source:p.getText(),offset:p.offsetAt(h.position),relativePath:y,languageId:p.detectedLanguageId};return await zvn(E,Array.from(m.docs.values()),g)}return a(l,"findSimilarSnippets"),xn(Lw,{children:[...o.map((u,d)=>xn(qYo,{snippet:u}))]})},"SimilarFiles"),qYo=a((t,e)=>xn(u7,{children:[xn(Yd,{children:t.snippet.headline}),xn(Yd,{children:t.snippet.snippet})]}),"SimilarFile");f();f();var yJe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData($C,c=>{c.traits!==r&&n(c.traits);let l=lye(c.document.detectedLanguageId);l!==o&&s(l)}),!(!r||r.length===0||!o))return xn(Lw,{children:[xn(Yd,{children:`Consider this related information: -`}),...r.map(c=>xn(Yd,{source:c,children:`${c.name}: ${c.value}`},c.id))]})},"Traits");function nSn(t,e){return vr(t,tt.UseSplitContextPrompt)??t.get(jt).enablePromptContextProxyField(e)}a(nSn,"shouldUseSplitContextPrompt");function iSn(t){return xn(Lw,{children:[xn($Ht,{children:[xn(hKe,{ctx:t,weight:.7}),xn(yJe,{weight:.6}),xn(aKe,{ctx:t,weight:.9}),xn(AJe,{ctx:t,weight:.8})]}),xn(ebn,{weight:1}),xn(VHt,{children:xn(dJe,{ctx:t,weight:.99})}),xn(Zvn,{weight:1})]})}a(iSn,"splitContextCompletionsPrompt");f();var oSn=0;function GYo(){oSn=0}a(GYo,"resetContextIndex");function HYo(){return oSn++}a(HYo,"getNextContextIndex");var EJe=class extends Rae{constructor(){super(...arguments);this.formatPrefix=rbn;this.formatContext=nbn}static{a(this,"SplitContextPromptRenderer")}processSnapshot(r,n){let o=[],s=[],c=[],l=!1;if(GYo(),new wae(r,jYo).walkSnapshot((p,h,m)=>{if(p===r||(p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.name===FW.name&&(l=!0),p.value===void 0||p.value===""))return!0;let g=m.chunks,A=m.type;if(A==="suffix")s.push({value:eTe(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let y=A==="prefix",E=y||p.value.endsWith(n)?p.value:p.value+n;o.push({type:y?"prefix":"context",value:eTe(E),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source,index:y?void 0:m.index})}return!0}),!l)throw new Error(`Node of type ${FW.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}},jYo=[...JHt,(t,e,r)=>cKe(t)?{...r,index:HYo()}:r];f();function CJe(t,e,r){let n=VYe(r,"Trait");for(let s of n)$Yo(t,e,s.data,s.providerId);return n.flatMap(s=>s.data).sort((s,c)=>(s.importance??0)-(c.importance??0))}a(CJe,"getTraitsFromContextItems");function $Yo(t,e,r,n){let o=t.get(P0).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a($Yo,"setupExpectationsForTraits");var VYo=new Map([["TargetFrameworks","targetFrameworks"],["LanguageVersion","languageVersion"]]);function _Je(t,e,r,n,o,s){if(r.length>0){let c={};c.detectedLanguageId=n,c.languageId=o;for(let u of r){let d=VYo.get(u.name);d&&(c[d]=u.value)}let l=s.extendedBy(c,{});return at(e,t,l)}}a(_Je,"ReportTraitsTelemetry");f();f();f();var vJe=class{constructor(e){this.states=e;this.currentIndex=0;this.stateChanged=!1}static{a(this,"UseState")}useState(e){let r=this.currentIndex;if(this.states[r]===void 0){let o=typeof e=="function"?e():e;this.states[r]=o}let n=a(o=>{let s=typeof o=="function"?o(this.states[r]):o;this.states[r]=s,this.stateChanged=!0},"setState");return this.currentIndex++,[this.states[r],n]}hasChanged(){return this.stateChanged}},bJe=class{constructor(e){this.measureUpdateTime=e;this.consumers=[]}static{a(this,"UseData")}useData(e,r){this.consumers.push(n=>{if(e(n))return r(n)})}async updateData(e){if(this.consumers.length>0){let r=performance.now();for(let n of this.consumers)await n(e);this.measureUpdateTime(performance.now()-r)}}};var TJe=class{constructor(e){this.lifecycleData=new Map;this.vTree=this.virtualizeElement(e,"$",0)}static{a(this,"VirtualPromptReconciler")}reconcile(e){if(!this.vTree)throw new Error("No tree to reconcile, make sure to pass a valid prompt");return e?.isCancellationRequested?this.vTree:(this.vTree=this.reconcileNode(this.vTree,"$",0,e),this.vTree)}reconcileNode(e,r,n,o){if(!e.children&&!e.lifecycle)return e;let s=e;if(e.lifecycle?.isRemountRequired()){let l=this.collectChildPaths(e);s=this.virtualizeElement(e.component,r,n);let u=this.collectChildPaths(s);this.cleanupState(l,u)}else if(e.children){let l=[];for(let u=0;u"u")){if(typeof e=="string"||typeof e=="number")return{name:typeof e,path:`${r}[${n}]`,props:{value:e},component:e};if(WYo(e.type)){let o=e.type(e.props.children),s=r!=="$"?`[${n}]`:"",c=`${r}${s}.${o.type}`,l=o.children.map((u,d)=>this.virtualizeElement(u,c,d));return this.ensureUniqueKeys(l),{name:o.type,path:c,children:l.flat().filter(u=>u!==void 0),component:e}}return this.virtualizeFunctionComponent(r,n,e,e.type)}}virtualizeFunctionComponent(e,r,n,o){let s=n.props.key?`["${n.props.key}"]`:`[${r}]`,c=`${e}${s}.${o.name}`,l=new t$t(this.getOrCreateLifecycleData(c)),u=o(n.props,l),h=(Array.isArray(u)?u:[u]).map((m,g)=>this.virtualizeElement(m,c,g)).flat().filter(m=>m!==void 0);return this.ensureUniqueKeys(h),{name:o.name,path:c,props:n.props,children:h,component:n,lifecycle:l}}ensureUniqueKeys(e){let r=new Map;for(let o of e){if(!o)continue;let s=o.props?.key;s&&r.set(s,(r.get(s)||0)+1)}let n=Array.from(r.entries()).filter(([o,s])=>s>1).map(([o])=>o);if(n.length>0)throw new Error(`Duplicate keys found: ${n.join(", ")}`)}collectChildPaths(e){let r=[];if(e?.children)for(let n of e.children)n&&(r.push(n.path),r.push(...this.collectChildPaths(n)));return r}cleanupState(e,r){for(let n of e)r.includes(n)||this.lifecycleData.delete(n)}getOrCreateLifecycleData(e){return this.lifecycleData.has(e)||this.lifecycleData.set(e,new e$t([])),this.lifecycleData.get(e)}createPipe(){return{pump:a(async e=>{await this.pumpData(e)},"pump")}}async pumpData(e){if(!this.vTree)throw new Error("No tree to pump data into. Pumping data before initializing?");await this.recursivelyPumpData(e,this.vTree)}async recursivelyPumpData(e,r){if(!r)throw new Error("Can't pump data into undefined node.");await r.lifecycle?.dataHook.updateData(e);for(let n of r.children||[])await this.recursivelyPumpData(e,n)}},e$t=class{static{a(this,"PromptElementLifecycleData")}constructor(e){this.state=e,this._updateTimeMs=0}getUpdateTimeMsAndReset(){let e=this._updateTimeMs;return this._updateTimeMs=0,e}},t$t=class{constructor(e){this.lifecycleData=e;this.stateHook=new vJe(e.state),this.dataHook=new bJe(r=>{e._updateTimeMs=r})}static{a(this,"PromptElementLifecycle")}useState(e){return this.stateHook.useState(e)}useData(e,r){this.dataHook.useData(e,r)}isRemountRequired(){return this.stateHook.hasChanged()}};function WYo(t){return typeof t=="function"&&"isFragmentFunction"in t}a(WYo,"isFragmentFunction");var ATe=class{static{a(this,"VirtualPrompt")}constructor(e){this.reconciler=new TJe(e)}snapshotNode(e,r){if(!e)return;if(r?.isCancellationRequested)return"cancelled";let n=[];for(let o of e.children??[]){let s=this.snapshotNode(o,r);if(s==="cancelled")return"cancelled";s!==void 0&&n.push(s)}return{value:e.props?.value?.toString(),name:e.name,path:e.path,props:e.props,children:n,statistics:{updateDataTimeMs:e.lifecycle?.lifecycleData.getUpdateTimeMsAndReset()}}}snapshot(e){try{let r=this.reconciler.reconcile(e);if(e?.isCancellationRequested)return{snapshot:void 0,status:"cancelled"};if(!r)throw new Error("Invalid virtual prompt tree");let n=this.snapshotNode(r,e);return n==="cancelled"||e?.isCancellationRequested?{snapshot:void 0,status:"cancelled"}:{snapshot:n,status:"ok"}}catch(r){return{snapshot:void 0,status:"error",error:r}}}createPipe(){return this.reconciler.createPipe()}};function $C(t){if(!t||typeof t!="object")return!1;let e=t;return!(!e.document||!e.position||e.position.line===void 0||e.position.character===void 0||!e.telemetryData)}a($C,"isCompletionRequestData");var r$t={default:{promptFunction:sSn,renderer:Rae},splitContext:{promptFunction:iSn,renderer:EJe}};function sSn(t){return xn(Lw,{children:[xn(jHt,{children:[xn(hKe,{ctx:t,weight:.7}),xn(yJe,{weight:.6}),xn(aKe,{ctx:t,weight:.9}),xn(AJe,{ctx:t,weight:.8}),xn(dJe,{ctx:t,weight:.99})]}),xn(Xbe,{weight:1})]})}a(sSn,"defaultCompletionsPrompt");var SJe=class{constructor(e,r,n){this.ctx=e;this.promptOrdering=n??"default",this.virtualPrompt=r??new ATe(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe(),this.renderer=this.getRenderer()}static{a(this,"ComponentsCompletionsPromptFactory")}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}async createPromptUnsafe({completionId:e,completionState:r,telemetryData:n,promptOpts:o},s){let{maxPromptLength:c,suffixPercent:l,suffixMatchThreshold:u}=zae(this.ctx,n,r.textDocument.detectedLanguageId),d=await this.failFastPrompt(r.textDocument,r.position,l,s);if(d)return d;let p=o?.separateContext?"splitContext":"default";this.setPromptOrdering(p);let h=performance.now(),{traits:m,codeSnippets:g,turnOffSimilarFiles:A,resolvedContextItems:y}=await this.resolveContext(e,r,n,s,o);if(await this.updateComponentData(r.textDocument,r.position,m,g,n,A,c,s,o,u,o?.tokenizer),s?.isCancellationRequested)return B4;let E=this.virtualPrompt.snapshot(s),_=E.status;if(_==="cancelled")return B4;if(_==="error")return this.errorPrompt(E.error);let v=this.renderer.render(E.snapshot,{delimiter:` -`,tokenizer:o?.tokenizer,promptTokenLimit:c,suffixPercent:l,languageId:r.textDocument.detectedLanguageId},s);if(v.status==="cancelled")return B4;if(v.status==="error")return this.errorPrompt(v.error);let[b,I]=C7(v.prefix),x={...v,prefix:b},R;if(Iae(this.ctx,n)){let P=WYe(v.metadata.componentStatistics);this.ctx.get(P0).getStatisticsForCompletion(e).computeMatch(P),R=YYe(this.ctx,e,y),_r.debug(this.ctx,`Context providers telemetry: '${JSON.stringify(R)}'`)}let w=performance.now();return this.resetIfEmpty(v),this.successPrompt(x,w,h,I,R)}async updateComponentData(e,r,n,o,s,c,l,u,d={},p,h){let m=this.createRequestData(e,r,s,u,d,l,n,o,c,p,h);await this.pipe.pump(m)}async resolveContext(e,r,n,o,s={}){let c=[],l,u,d=!1;if(Iae(this.ctx,n)){c=await this.ctx.get(jC).resolution(e);let{textDocument:p}=r,h=c.filter(KYe);YYo(this.ctx,p.detectedLanguageId,h,n)||(d=!0),l=CJe(this.ctx,e,h),_Je("contextProvider.traits",this.ctx,l,p.detectedLanguageId,p.detectedLanguageId,n),u=await sKe(this.ctx,e,h,p.detectedLanguageId)}return{traits:l,codeSnippets:u,turnOffSimilarFiles:d,resolvedContextItems:c}}async failFastPrompt(e,r,n,o){if(o?.isCancellationRequested)return B4;if((await this.ctx.get(bc).evaluate(e.uri,e.getText(),"UPDATE")).isBlocked)return wJe;if((n>0?e.getText().length:e.offsetAt(r))0},computeTimeMs:r-n,trailingWs:o,neighborSource:new Map,metadata:e.metadata,contextProvidersTelemetry:s}}errorPrompt(e){return qo(this.ctx,e,"PromptComponents.CompletionsPromptFactory"),this.reset(),Yae}reset(){this.renderer=this.getRenderer(),this.virtualPrompt=new ATe(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}setPromptOrdering(e){this.promptOrdering!==e&&(this.promptOrdering=e,this.reset())}completionsPrompt(){return(r$t[this.promptOrdering]?.promptFunction??sSn)(this.ctx)}getRenderer(){let e=r$t[this.promptOrdering]??r$t.default;return new e.renderer}};function YYo(t,e,r,n){let o=["cpp","c"];return rSn(t,n)||o.includes(e)||!r.some(c=>c.data.some(l=>l.type==="CodeSnippet"))}a(YYo,"similarFilesEnabled");f();f();f();var uSn=2e4,aSn=0,cSn=new $r;function dSn(t,e,r,n){aSn++;let o=r.promptOpts?.tokenizer??"o200k_base",s=performance.now(),{root:c,mask:l,statistics:u}=t.snapshot(r,n),d=performance.now(),p=new Set(l),h=cSn?.get(c.id),m;if(h&&h.budget>=e&&h.render.cost<=e&&h.tokenizer===o&&p.size===h.mask.size&&[...p].every(v=>h.mask.has(v)))m=h.render;else{let v=wo(o);m=gFr(c,{budget:e,mask:l,costFunction:a(I=>v.tokenLength(I),"costFunction")}),cSn.set(c.id,{budget:e,mask:p,tokenizer:o,render:m})}let{text:g,cost:A,renderedNodes:y}=m,E=performance.now();for(let[v,b]of u?.entries()??[])b.actualTokens=y.get(v)?.cost??0;let _={renderId:aSn,rendererName:"renderNode",tokenizer:o,elisionTimeMs:E-d,renderTimeMs:d-s,updateDataTimeMs:0,componentStatistics:[{componentPath:t.name,actualTokens:A}]};return{root:c,renderedNodes:y,text:g,cost:A,metadata:_}}a(dSn,"renderWithMetadata");function fSn(t,e){return r=>{let n=r.text.join("")+` -`;return gp(e,n,()=>t.tokenLength(n)+1)}}a(fSn,"cachedLineCostFunction");function pSn(t,e,r){let o=t.split(` -`).map(p=>({id:rd(),text:[p],children:[],canMerge:!0})),s=[""];o.length>=1&&s.push(...Array(o.length-1).fill(` -`),"");let c={id:rd(),text:s,children:o,canMerge:!0},u=Pye(c,a(p=>p.id===c.id?0:e(p),"nodeCostFunction")),d=r?o.length:1;for(let p of u.children)p.weight=d*Math.max(1,p.cost),d+=r?-1:1;return u}a(pSn,"getLinewiseNode");var RJe=class{constructor(){this.name="basicPrefix";this.costCache=new $r(uSn)}static{a(this,"BasicPrefixComponent")}snapshot(e){let{completionState:r,promptOpts:n}=e,o=r.textDocument.getText({start:{line:0,character:0},end:r.position}),s=wo(n?.tokenizer),c=fSn(s,this.costCache);return{root:pSn(o,c,!1)}}},lSn={root:T6,text:"",cost:0},PJe=class{constructor(e){this.ctx=e;this.name="cachedSuffix";this.cache=new $r(5);this.costCache=new $r(uSn)}static{a(this,"CachedSuffixComponent")}snapshot(e){return{root:this.getCachedSuffix(e).root}}estimatedCost(e,r){return this.getCachedSuffix(e).cost}getCachedSuffix(e){let{completionState:r,telemetryData:n,promptOpts:o}=e,c=r.textDocument.getText({start:r.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}}).replace(/^.*/,"").trimStart();if(c==="")return lSn;let l=this.cache.get(r.textDocument.uri)||lSn;if(l.text===c)return l;let u=this.ctx.get(jt).suffixMatchThreshold(n);if(l.text!==""){let g=new _re,A=g.takeFirstTokens(c,Jbe);if(A.tokens.length>0&&100*lKe(A.tokens,g.takeFirstTokens(l.text,Jbe).tokens)?.scoreg+A.cost+1,0);return{root:h,cost:m,text:c}}},kJe=class{constructor(){this.name="traitProvider"}static{a(this,"TraitComponent")}snapshot(e,r){let{promptOpts:n}=e,o=wo(n?.tokenizer);if(!r||r.traits.length===0)return{root:T6};let s=new Map,c=0,l=[],u=new Map;for(let m of r.traits){let g=rd(),A=`${m.name}: ${m.value}`,y={id:g,text:[A],children:[],cost:o.tokenLength(A),weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};l.push(y),u.set(g,{componentPath:m.id,source:m,expectedTokens:y.cost}),s.set(g,m.importance??0),c+=m.importance??0}c=Math.max(c,1);let p=[`Related context: +`}a(Kve,"newLineEnded");var Mzo=5,Hse=class{constructor(){this.renderId=0;this.formatPrefix=eTn}static{a(this,"CompletionsPromptRenderer")}render(e,r,n){let o=this.renderId++,s=performance.now();try{if(n?.isCancellationRequested)return{status:"cancelled"};let c=r.delimiter??"",l=r.tokenizer??"o200k_base",{prefixBlocks:u,suffixBlock:d,componentStatistics:p}=this.processSnapshot(e,c,r.languageId),{prefixTokenLimit:h,suffixTokenLimit:m}=this.getPromptLimits(d,r),g=performance.now(),A=new EYe,{blocks:[y,...E]}=A.elide(u,h,d,m,To(l)),_=performance.now(),v=this.formatPrefix(E),b=this.formatContext?this.formatContext(E):void 0,I=y.elidedValue,x=E.reduce((w,R)=>w+R.elidedTokens,0);return p.push(...Ozo([...E,y])),{prefix:v,prefixTokens:x,suffix:I,suffixTokens:y.elidedTokens,context:b,status:"ok",metadata:{renderId:o,rendererName:"c",tokenizer:l,elisionTimeMs:_-g,renderTimeMs:performance.now()-s,componentStatistics:p,updateDataTimeMs:p.reduce((w,R)=>w+(R.updateDataTimeMs??0),0)}}}catch(c){return{status:"error",error:c}}}getPromptLimits(e,r){let n=e?.value??"",o=r.promptTokenLimit,s=r.suffixPercent;if(n.length==0||s==0)return{prefixTokenLimit:o,suffixTokenLimit:0};o=n.length>0?o-Mzo:o;let c=Math.ceil(o*(s/100));return{prefixTokenLimit:o-c,suffixTokenLimit:c}}processSnapshot(e,r,n){let o=[],s=[],c=[],l=!1;if(new Gse(e,Ajt).walkSnapshot((p,h,m)=>{if(p===e||(p.name===Yve.name&&(l=!0),p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.value===void 0||p.value===""))return!0;let g=m.chunks;if(m.type==="suffix")s.push({value:Jve(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let A=p.value.endsWith(r)?p.value:p.value+r,y=A;m.type==="prefix"?y=p.value:iTn(p.value)?y=A:y=I5(A,n),o.push({type:m.type==="prefix"?"prefix":"context",value:Jve(y),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source})}return!0}),!l)throw new Error(`Node of type ${Yve.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}},Ajt=[...hjt(),(t,e,r)=>gYe(t)?{...r,type:"context"}:r,(t,e,r)=>t.name===$V.name?{...r,type:"prefix"}:r,(t,e,r)=>t.name===yYe.name?{...r,type:"suffix"}:r];function Ozo(t){return t.map(e=>{let r={componentPath:e.componentPath};return e.tokens!==0&&(r.expectedTokens=e.tokens,r.actualTokens=e.elidedTokens),e.nodeStatistics.updateDataTimeMs!==void 0&&(r.updateDataTimeMs=e.nodeStatistics.updateDataTimeMs),e.source&&(r.source=e.source),r})}a(Ozo,"computeComponentStatistics");function Jve(t){return t.replace(/\r\n?/g,` +`)}a(Jve,"normalizeLineEndings");f();var vYe=a((t,e)=>{let[r,n]=e.useState();if(e.useData(N_,o=>{o.document.uri!==r?.uri&&n(o.document)}),r){let o=t.ctx.get(zr),s=o.getRelativePath(r),c={uri:r.uri,source:r.getText(),relativePath:s,languageId:r.detectedLanguageId},l=o.findNotebook(r);return c.relativePath&&!l?xn(Bzo,{docInfo:c}):xn(Lzo,{docInfo:c})}},"DocumentMarker"),Bzo=a(t=>xn(Qd,{children:CYe(t.docInfo)}),"PathMarker"),Lzo=a(t=>xn(Qd,{children:_Ye(t.docInfo)}),"LanguageMarker");f();f();f();var NJo=de(nW()),MJo=de(F5()),KSn=de(ro()),OJo=de($Ye());var U5=class extends KSn.Disposable{static{a(this,"RecentEditsProvider")}};function BJo(t,e=!1,r=void 0,n){if(e&&(r===void 0||n===void 0))throw new Error("cursorLine and activeDocDistanceLimitFromCursor are required when filterByCursorLine is true");let o=t.startLine-1,s=t.endLine-1;return!!(e&&(Math.abs(o-r)<=n||Math.abs(s-r)<=n))}a(BJo,"editIsTooCloseToCursor");var EKe=a((t,e)=>{let[r,n]=e.useState();return e.useData(N_,async o=>{if(!o.document)return;let s=t.ctx.get(U5);if(s.isEnabled())s.start();else return;let c=s.config,l=s.getRecentEdits(),u=new Set,d=t.ctx.get(zr),p=[];for(let m=l.length-1;m>=0&&!(p.length>=c.maxEdits);m--){let g=l[m];if(!await d.getTextDocument({uri:g.file}))continue;let A=!u.has(g.file);if(u.size+(A?1:0)>c.maxFiles)break;let E=g.file===o.document?.uri,_=E?o.position.line:void 0;if(BJo(g,E,_,c.activeDocDistanceLimitFromCursor))continue;let b=s.getEditSummary(g);if(b){u.add(g.file);let I=d.getRelativePath({uri:g.file});p.unshift(Kve(`File: ${I}`)+Kve(b))}}if(p.length===0){n(void 0);return}let h=Kve("These are recently edited files. Do not suggest code that has been deleted.")+p.join("")+Kve("End of recent edits");n(h)}),r?xn(L9,{children:xn(Qd,{children:r})}):void 0},"RecentEdits");f();f();f();var _Ke=class{constructor(e){this.docManager=e}static{a(this,"OpenTabFiles")}truncateDocs(e,r,n,o){let s=new Map,c=0;for(let l of e)if(!(c+l.getText().length>oW.MAX_NEIGHBOR_AGGREGATE_LENGTH)&&(l.uri.startsWith("file:")&&r.startsWith("file:")&&l.uri!==r&&CKe(n,l.detectedLanguageId)&&(s.set(l.uri.toString(),{uri:l.uri.toString(),relativePath:this.docManager.getRelativePath(l),source:l.getText()}),c+=l.getText().length),s.size>=o))break;return s}async getNeighborFiles(e,r,n){let o=new Map,s=new Map;return o=this.truncateDocs(dbn(await this.docManager.textDocuments()),e,r,n),s.set("opentabs",Array.from(o.keys()).map(c=>c.toString())),{docs:o,neighborSource:s}}};f();f();function JSn(t,e,r){return async function(...n){return await Promise.race([t.apply(this,n),new Promise(o=>{setTimeout(o,e,r)})])}}a(JSn,"shortCircuit");f();function FJo(...t){return JSON.stringify(t,(e,r)=>typeof r=="object"?r:String(r))}a(FJo,"defaultHash");function A$t(t,e={}){let{hash:r=FJo,cache:n=new Map}=e;return function(...o){let s=r.apply(this,o);if(n.has(s))return n.get(s);let c=t.apply(this,o);return c instanceof Promise&&(c=c.catch(l=>{throw n.delete(s),l})),n.set(s,c),c}}a(A$t,"memoize");var XSn={entries:[],traits:[]},vKe={entries:new Map,traits:[]},y$t=class extends $r{constructor(r,n=120*1e3){super(r);this.defaultEvictionTimeMs=n;this._cacheTimestamps=new Map}static{a(this,"PromiseExpirationCacheMap")}bumpRetryCount(r){let n=this._cacheTimestamps.get(r);return n?++n.retryCount:(this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),0)}has(r){return this.isValid(r)?super.has(r):(this.deleteExpiredEntry(r),!1)}get(r){let n=super.get(r);if(this.isValid(r))return n;this.deleteExpiredEntry(r)}set(r,n){let o=super.set(r,n);return this.isValid(r)||this._cacheTimestamps.set(r,{timestamp:Date.now(),retryCount:0}),o}clear(){super.clear(),this._cacheTimestamps.clear()}isValid(r){let n=this._cacheTimestamps.get(r);return n!==void 0&&Date.now()-n.timestamp=QJo?c=vKe:c=void 0);let l=performance.now()-s;if(Cp.debug(t,c!==void 0?`Fetched ${[...c.entries.values()].map(u=>u.size).reduce((u,d)=>u+d,0)} related files for '${e.uri}' in ${l}ms.`:`Failing fetching files for '${e.uri}' in ${l}ms.`),c===void 0)throw new bKe;return c}a(eIn,"getRelatedFiles");var E$t=A$t(eIn,{cache:ZSn,hash:a((t,e,r,n,o)=>`${e.uri}`,"hash")});E$t=JSn(E$t,200,vKe);async function TKe(t,e,r,n,o,s=!1){let c=t.get(sW),l=vKe;try{let u={uri:e.uri,clientLanguageId:e.clientLanguageId,data:o};l=s?await eIn(t,u,r,n,c):await E$t(t,u,r,n,c)}catch(u){l=vKe,u instanceof bKe&&st(t,"getRelatedFilesList",r)}return Cp.debug(t,l!=null?`Fetched following traits ${l.traits.map(u=>`{${u.name} : ${u.value}}`).join("")} for '${e.uri}'`:`Failing fecthing traits for '${e.uri}'.`),l}a(TKe,"getRelatedFilesAndTraits");function CKe(t,e){return aAe(t)===aAe(e)}a(CKe,"considerNeighborFile");var oW=class t{static{a(this,"NeighborSource")}static{this.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5}static{this.MAX_NEIGHBOR_FILES=20}static{this.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"]}static defaultEmptyResult(){return{docs:new Map,neighborSource:new Map,traits:[]}}static reset(){t.instance=void 0}static async getNeighborFilesAndTraits(e,r,n,o,s,c,l){let u=e.get(zr);t.instance===void 0&&(t.instance=new _Ke(u));let d={...await t.instance.getNeighborFiles(r,n,t.MAX_NEIGHBOR_FILES),traits:[]};if(qJo(e,o))return d;let p=await u.getTextDocument({uri:r});if(!p)return Cp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: failed to get the document ${r}`),d;let h=u.getWorkspaceFolder(p);if(!h)return Cp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`Failed to get the related files: ${r} is not under the workspace folder`),d;let m=await TKe(e,p,o,s,c,l);return m.entries.size===0?(Cp.debug(e,"neighborFiles.getNeighborFilesAndTraits",`0 related files found for ${r}`),d.traits.push(...m.traits),d):(m.entries.forEach((g,A)=>{let y=[];g.forEach((E,_)=>{let v=t.getRelativePath(_,h.uri);if(!v||d.docs.has(_))return;let b={relativePath:v,uri:_,source:E};y.unshift(b),d.docs.set(_,b)}),y.length>0&&d.neighborSource.set(A,y.map(E=>E.uri.toString()))}),d.traits.push(...m.traits),d)}static basename(e){return decodeURIComponent(e.replace(/[#?].*$/,"").replace(/^.*[/:]/,""))}static getRelativePath(e,r){let n=r.toString().replace(/[#?].*/,"").replace(/\/?$/,"/");return e.toString().startsWith(n)?e.toString().slice(n.length):t.basename(e)}};function qJo(t,e){return t.get(Gt).excludeRelatedFiles(e)||vr(t,tt.ExcludeRelatedFiles)}a(qJo,"isExcludeRelatedFilesActive");function tIn(t,e){return t.get(Gt).includeNeighboringFiles(e)||vr(t,tt.IncludeNeighboringFiles)}a(tIn,"isIncludeNeighborFilesActive");var SKe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState([]);e.useData(N_,async u=>{u.document.uri!==r?.uri&&s([]),n(u.document);let d=oW.defaultEmptyResult();u.turnOffSimilarFiles||(d=await oW.getNeighborFilesAndTraits(t.ctx,u.document.uri,u.document.detectedLanguageId,u.telemetryData,u.cancellationToken,u.data));let p=await c(u.telemetryData,u.document,u,d);s(p)});async function c(u,d,p,h){let m=cae(t.ctx,u,d.detectedLanguageId);return(await l(m,u,d,p,h)).filter(A=>A.snippet.length>0).sort((A,y)=>A.score-y.score).map(A=>({...jbn(A),score:A.score}))}a(c,"produceSimilarFiles");async function l(u,d,p,h,m){let g=u.similarFilesOptions||pYe(t.ctx,d,p.detectedLanguageId),y=t.ctx.get(zr).getRelativePath(p),E={uri:p.uri,source:p.getText(),offset:p.offsetAt(h.position),relativePath:y,languageId:p.detectedLanguageId};return await Wbn(E,Array.from(m.docs.values()),g)}return a(l,"findSimilarSnippets"),xn(Iw,{children:[...o.map((u,d)=>xn(GJo,{snippet:u}))]})},"SimilarFiles"),GJo=a((t,e)=>xn(L9,{children:[xn(Qd,{children:t.snippet.headline}),xn(Qd,{children:t.snippet.snippet})]}),"SimilarFile");f();f();var IKe=a((t,e)=>{let[r,n]=e.useState(),[o,s]=e.useState();if(e.useData(N_,c=>{c.traits!==r&&n(c.traits);let l=aAe(c.document.detectedLanguageId);l!==o&&s(l)}),!(!r||r.length===0||!o))return xn(Iw,{children:[xn(Qd,{children:`Consider this related information: +`}),...r.map(c=>xn(Qd,{source:c,children:`${c.name}: ${c.value}`},c.id))]})},"Traits");function rIn(t,e){return vr(t,tt.UseSplitContextPrompt)??t.get(Gt).enablePromptContextProxyField(e)}a(rIn,"shouldUseSplitContextPrompt");function nIn(t){return xn(Iw,{children:[xn(djt,{children:[xn(vYe,{ctx:t,weight:.7}),xn(IKe,{weight:.6}),xn(mYe,{ctx:t,weight:.9}),xn(SKe,{ctx:t,weight:.8})]}),xn(Zbn,{weight:1}),xn(fjt,{children:xn(EKe,{ctx:t,weight:.99})}),xn(Xbn,{weight:1})]})}a(nIn,"splitContextCompletionsPrompt");f();var iIn=0;function HJo(){iIn=0}a(HJo,"resetContextIndex");function jJo(){return iIn++}a(jJo,"getNextContextIndex");var xKe=class extends Hse{constructor(){super(...arguments);this.formatPrefix=tTn;this.formatContext=rTn}static{a(this,"SplitContextPromptRenderer")}processSnapshot(r,n){let o=[],s=[],c=[],l=!1;if(HJo(),new Gse(r,$Jo).walkSnapshot((p,h,m)=>{if(p===r||(p.statistics.updateDataTimeMs&&p.statistics.updateDataTimeMs>0&&c.push({componentPath:p.path,updateDataTimeMs:p.statistics.updateDataTimeMs}),p.name===$V.name&&(l=!0),p.value===void 0||p.value===""))return!0;let g=m.chunks,A=m.type;if(A==="suffix")s.push({value:Jve(p.value),type:"suffix",weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source});else{let y=A==="prefix",E=y||p.value.endsWith(n)?p.value:p.value+n;o.push({type:y?"prefix":"context",value:Jve(E),weight:m.weight,componentPath:p.path,nodeStatistics:p.statistics,chunks:g,source:m.source,index:y?void 0:m.index})}return!0}),!l)throw new Error(`Node of type ${$V.name} not found`);if(s.length>1)throw new Error("Only one suffix is allowed");let d=s.length===1?s[0]:{componentPath:"",value:"",weight:1,nodeStatistics:{},type:"suffix"};return{prefixBlocks:o,suffixBlock:d,componentStatistics:c}}},$Jo=[...Ajt,(t,e,r)=>gYe(t)?{...r,index:jJo()}:r];f();function wKe(t,e,r){let n=eYe(r,"Trait");for(let s of n)VJo(t,e,s.data,s.providerId);return n.flatMap(s=>s.data).sort((s,c)=>(s.importance??0)-(c.importance??0))}a(wKe,"getTraitsFromContextItems");function VJo(t,e,r,n){let o=t.get(S0).getStatisticsForCompletion(e);r.forEach(s=>{o.addExpectations(n,[[s,"included"]])})}a(VJo,"setupExpectationsForTraits");var WJo=new Map([["TargetFrameworks","targetFrameworks"],["LanguageVersion","languageVersion"]]);function RKe(t,e,r,n,o,s){if(r.length>0){let c={};c.detectedLanguageId=n,c.languageId=o;for(let u of r){let d=WJo.get(u.name);d&&(c[d]=u.value)}let l=s.extendedBy(c,{});return st(e,t,l)}}a(RKe,"ReportTraitsTelemetry");f();f();f();var PKe=class{constructor(e){this.states=e;this.currentIndex=0;this.stateChanged=!1}static{a(this,"UseState")}useState(e){let r=this.currentIndex;if(this.states[r]===void 0){let o=typeof e=="function"?e():e;this.states[r]=o}let n=a(o=>{let s=typeof o=="function"?o(this.states[r]):o;this.states[r]=s,this.stateChanged=!0},"setState");return this.currentIndex++,[this.states[r],n]}hasChanged(){return this.stateChanged}},kKe=class{constructor(e){this.measureUpdateTime=e;this.consumers=[]}static{a(this,"UseData")}useData(e,r){this.consumers.push(n=>{if(e(n))return r(n)})}async updateData(e){if(this.consumers.length>0){let r=performance.now();for(let n of this.consumers)await n(e);this.measureUpdateTime(performance.now()-r)}}};var DKe=class{constructor(e){this.lifecycleData=new Map;this.vTree=this.virtualizeElement(e,"$",0)}static{a(this,"VirtualPromptReconciler")}reconcile(e){if(!this.vTree)throw new Error("No tree to reconcile, make sure to pass a valid prompt");return e?.isCancellationRequested?this.vTree:(this.vTree=this.reconcileNode(this.vTree,"$",0,e),this.vTree)}reconcileNode(e,r,n,o){if(!e.children&&!e.lifecycle)return e;let s=e;if(e.lifecycle?.isRemountRequired()){let l=this.collectChildPaths(e);s=this.virtualizeElement(e.component,r,n);let u=this.collectChildPaths(s);this.cleanupState(l,u)}else if(e.children){let l=[];for(let u=0;u"u")){if(typeof e=="string"||typeof e=="number")return{name:typeof e,path:`${r}[${n}]`,props:{value:e},component:e};if(zJo(e.type)){let o=e.type(e.props.children),s=r!=="$"?`[${n}]`:"",c=`${r}${s}.${o.type}`,l=o.children.map((u,d)=>this.virtualizeElement(u,c,d));return this.ensureUniqueKeys(l),{name:o.type,path:c,children:l.flat().filter(u=>u!==void 0),component:e}}return this.virtualizeFunctionComponent(r,n,e,e.type)}}virtualizeFunctionComponent(e,r,n,o){let s=n.props.key?`["${n.props.key}"]`:`[${r}]`,c=`${e}${s}.${o.name}`,l=new C$t(this.getOrCreateLifecycleData(c)),u=o(n.props,l),h=(Array.isArray(u)?u:[u]).map((m,g)=>this.virtualizeElement(m,c,g)).flat().filter(m=>m!==void 0);return this.ensureUniqueKeys(h),{name:o.name,path:c,props:n.props,children:h,component:n,lifecycle:l}}ensureUniqueKeys(e){let r=new Map;for(let o of e){if(!o)continue;let s=o.props?.key;s&&r.set(s,(r.get(s)||0)+1)}let n=Array.from(r.entries()).filter(([o,s])=>s>1).map(([o])=>o);if(n.length>0)throw new Error(`Duplicate keys found: ${n.join(", ")}`)}collectChildPaths(e){let r=[];if(e?.children)for(let n of e.children)n&&(r.push(n.path),r.push(...this.collectChildPaths(n)));return r}cleanupState(e,r){for(let n of e)r.includes(n)||this.lifecycleData.delete(n)}getOrCreateLifecycleData(e){return this.lifecycleData.has(e)||this.lifecycleData.set(e,new _$t([])),this.lifecycleData.get(e)}createPipe(){return{pump:a(async e=>{await this.pumpData(e)},"pump")}}async pumpData(e){if(!this.vTree)throw new Error("No tree to pump data into. Pumping data before initializing?");await this.recursivelyPumpData(e,this.vTree)}async recursivelyPumpData(e,r){if(!r)throw new Error("Can't pump data into undefined node.");await r.lifecycle?.dataHook.updateData(e);for(let n of r.children||[])await this.recursivelyPumpData(e,n)}},_$t=class{static{a(this,"PromptElementLifecycleData")}constructor(e){this.state=e,this._updateTimeMs=0}getUpdateTimeMsAndReset(){let e=this._updateTimeMs;return this._updateTimeMs=0,e}},C$t=class{constructor(e){this.lifecycleData=e;this.stateHook=new PKe(e.state),this.dataHook=new kKe(r=>{e._updateTimeMs=r})}static{a(this,"PromptElementLifecycle")}useState(e){return this.stateHook.useState(e)}useData(e,r){this.dataHook.useData(e,r)}isRemountRequired(){return this.stateHook.hasChanged()}};function zJo(t){return typeof t=="function"&&"isFragmentFunction"in t}a(zJo,"isFragmentFunction");var hbe=class{static{a(this,"VirtualPrompt")}constructor(e){this.reconciler=new DKe(e)}snapshotNode(e,r){if(!e)return;if(r?.isCancellationRequested)return"cancelled";let n=[];for(let o of e.children??[]){let s=this.snapshotNode(o,r);if(s==="cancelled")return"cancelled";s!==void 0&&n.push(s)}return{value:e.props?.value?.toString(),name:e.name,path:e.path,props:e.props,children:n,statistics:{updateDataTimeMs:e.lifecycle?.lifecycleData.getUpdateTimeMsAndReset()}}}snapshot(e){try{let r=this.reconciler.reconcile(e);if(e?.isCancellationRequested)return{snapshot:void 0,status:"cancelled"};if(!r)throw new Error("Invalid virtual prompt tree");let n=this.snapshotNode(r,e);return n==="cancelled"||e?.isCancellationRequested?{snapshot:void 0,status:"cancelled"}:{snapshot:n,status:"ok"}}catch(r){return{snapshot:void 0,status:"error",error:r}}}createPipe(){return this.reconciler.createPipe()}};function N_(t){if(!t||typeof t!="object")return!1;let e=t;return!(!e.document||!e.position||e.position.line===void 0||e.position.character===void 0||!e.telemetryData)}a(N_,"isCompletionRequestData");var v$t={default:{promptFunction:oIn,renderer:Hse},splitContext:{promptFunction:nIn,renderer:xKe}};function oIn(t){return xn(Iw,{children:[xn(ujt,{children:[xn(vYe,{ctx:t,weight:.7}),xn(IKe,{weight:.6}),xn(mYe,{ctx:t,weight:.9}),xn(SKe,{ctx:t,weight:.8}),xn(EKe,{ctx:t,weight:.99})]}),xn(Yve,{weight:1})]})}a(oIn,"defaultCompletionsPrompt");var NKe=class{constructor(e,r,n){this.ctx=e;this.promptOrdering=n??"default",this.virtualPrompt=r??new hbe(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe(),this.renderer=this.getRenderer()}static{a(this,"ComponentsCompletionsPromptFactory")}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}async createPromptUnsafe({completionId:e,completionState:r,telemetryData:n,promptOpts:o},s){let{maxPromptLength:c,suffixPercent:l,suffixMatchThreshold:u}=cae(this.ctx,n,r.textDocument.detectedLanguageId),d=await this.failFastPrompt(r.textDocument,r.position,l,s);if(d)return d;let p=o?.separateContext?"splitContext":"default";this.setPromptOrdering(p);let h=performance.now(),{traits:m,codeSnippets:g,turnOffSimilarFiles:A,resolvedContextItems:y}=await this.resolveContext(e,r,n,s,o);if(await this.updateComponentData(r.textDocument,r.position,m,g,n,A,c,s,o,u,o?.tokenizer),s?.isCancellationRequested)return yO;let E=this.virtualPrompt.snapshot(s),_=E.status;if(_==="cancelled")return yO;if(_==="error")return this.errorPrompt(E.error);let v=this.renderer.render(E.snapshot,{delimiter:` +`,tokenizer:o?.tokenizer,promptTokenLimit:c,suffixPercent:l,languageId:r.textDocument.detectedLanguageId},s);if(v.status==="cancelled")return yO;if(v.status==="error")return this.errorPrompt(v.error);let[b,I]=W9(v.prefix),x={...v,prefix:b},w;if(Qse(this.ctx,n)){let P=tYe(v.metadata.componentStatistics);this.ctx.get(S0).getStatisticsForCompletion(e).computeMatch(P),w=nYe(this.ctx,e,y),Cr.debug(this.ctx,`Context providers telemetry: '${JSON.stringify(w)}'`)}let R=performance.now();return this.resetIfEmpty(v),this.successPrompt(x,R,h,I,w)}async updateComponentData(e,r,n,o,s,c,l,u,d={},p,h){let m=this.createRequestData(e,r,s,u,d,l,n,o,c,p,h);await this.pipe.pump(m)}async resolveContext(e,r,n,o,s={}){let c=[],l,u,d=!1;if(Qse(this.ctx,n)){c=await this.ctx.get(D_).resolution(e);let{textDocument:p}=r,h=c.filter(iYe);KJo(this.ctx,p.detectedLanguageId,h,n)||(d=!0),l=wKe(this.ctx,e,h),RKe("contextProvider.traits",this.ctx,l,p.detectedLanguageId,p.detectedLanguageId,n),u=await hYe(this.ctx,e,h,p.detectedLanguageId)}return{traits:l,codeSnippets:u,turnOffSimilarFiles:d,resolvedContextItems:c}}async failFastPrompt(e,r,n,o){if(o?.isCancellationRequested)return yO;if((await this.ctx.get(Ac).evaluate(e.uri,e.getText(),"UPDATE")).isBlocked)return BKe;if((n>0?e.getText().length:e.offsetAt(r))0},computeTimeMs:r-n,trailingWs:o,neighborSource:new Map,metadata:e.metadata,contextProvidersTelemetry:s}}errorPrompt(e){return Lo(this.ctx,e,"PromptComponents.CompletionsPromptFactory"),this.reset(),lae}reset(){this.renderer=this.getRenderer(),this.virtualPrompt=new hbe(this.completionsPrompt()),this.pipe=this.virtualPrompt.createPipe()}setPromptOrdering(e){this.promptOrdering!==e&&(this.promptOrdering=e,this.reset())}completionsPrompt(){return(v$t[this.promptOrdering]?.promptFunction??oIn)(this.ctx)}getRenderer(){let e=v$t[this.promptOrdering]??v$t.default;return new e.renderer}};function KJo(t,e,r,n){let o=["cpp","c"];return tIn(t,n)||o.includes(e)||!r.some(c=>c.data.some(l=>l.type==="CodeSnippet"))}a(KJo,"similarFilesEnabled");f();f();f();var lIn=2e4,sIn=0,aIn=new $r;function uIn(t,e,r,n){sIn++;let o=r.promptOpts?.tokenizer??"o200k_base",s=performance.now(),{root:c,mask:l,statistics:u}=t.snapshot(r,n),d=performance.now(),p=new Set(l),h=aIn?.get(c.id),m;if(h&&h.budget>=e&&h.render.cost<=e&&h.tokenizer===o&&p.size===h.mask.size&&[...p].every(v=>h.mask.has(v)))m=h.render;else{let v=To(o);m=m9r(c,{budget:e,mask:l,costFunction:a(I=>v.tokenLength(I),"costFunction")}),aIn.set(c.id,{budget:e,mask:p,tokenizer:o,render:m})}let{text:g,cost:A,renderedNodes:y}=m,E=performance.now();for(let[v,b]of u?.entries()??[])b.actualTokens=y.get(v)?.cost??0;let _={renderId:sIn,rendererName:"renderNode",tokenizer:o,elisionTimeMs:E-d,renderTimeMs:d-s,updateDataTimeMs:0,componentStatistics:[{componentPath:t.name,actualTokens:A}]};return{root:c,renderedNodes:y,text:g,cost:A,metadata:_}}a(uIn,"renderWithMetadata");function dIn(t,e){return r=>{let n=r.text.join("")+` +`;return up(e,n,()=>t.tokenLength(n)+1)}}a(dIn,"cachedLineCostFunction");function fIn(t,e,r){let o=t.split(` +`).map(p=>({id:zu(),text:[p],children:[],canMerge:!0})),s=[""];o.length>=1&&s.push(...Array(o.length-1).fill(` +`),"");let c={id:zu(),text:s,children:o,canMerge:!0},u=wAe(c,a(p=>p.id===c.id?0:e(p),"nodeCostFunction")),d=r?o.length:1;for(let p of u.children)p.weight=d*Math.max(1,p.cost),d+=r?-1:1;return u}a(fIn,"getLinewiseNode");var LKe=class{constructor(){this.name="basicPrefix";this.costCache=new $r(lIn)}static{a(this,"BasicPrefixComponent")}snapshot(e){let{completionState:r,promptOpts:n}=e,o=r.textDocument.getText({start:{line:0,character:0},end:r.position}),s=To(n?.tokenizer),c=dIn(s,this.costCache);return{root:fIn(o,c,!1)}}},cIn={root:J8,text:"",cost:0},FKe=class{constructor(e){this.ctx=e;this.name="cachedSuffix";this.cache=new $r(5);this.costCache=new $r(lIn)}static{a(this,"CachedSuffixComponent")}snapshot(e){return{root:this.getCachedSuffix(e).root}}estimatedCost(e,r){return this.getCachedSuffix(e).cost}getCachedSuffix(e){let{completionState:r,telemetryData:n,promptOpts:o}=e,c=r.textDocument.getText({start:r.position,end:{line:Number.MAX_VALUE,character:Number.MAX_VALUE}}).replace(/^.*/,"").trimStart();if(c==="")return cIn;let l=this.cache.get(r.textDocument.uri)||cIn;if(l.text===c)return l;let u=this.ctx.get(Gt).suffixMatchThreshold(n);if(l.text!==""){let g=new Bte,A=g.takeFirstTokens(c,zve);if(A.tokens.length>0&&100*AYe(A.tokens,g.takeFirstTokens(l.text,zve).tokens)?.scoreg+A.cost+1,0);return{root:h,cost:m,text:c}}},UKe=class{constructor(){this.name="traitProvider"}static{a(this,"TraitComponent")}snapshot(e,r){let{promptOpts:n}=e,o=To(n?.tokenizer);if(!r||r.traits.length===0)return{root:J8};let s=new Map,c=0,l=[],u=new Map;for(let m of r.traits){let g=zu(),A=`${m.name}: ${m.value}`,y={id:g,text:[A],children:[],cost:o.tokenLength(A),weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};l.push(y),u.set(g,{componentPath:m.id,source:m,expectedTokens:y.cost}),s.set(g,m.importance??0),c+=m.importance??0}c=Math.max(c,1);let p=[`Related context: `,...new Array(l.length).fill(` -`)],h={id:rd(),text:p,children:l,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};return Rye(h,m=>(s.get(m.id)??0)/c),{root:h,statistics:u}}},NJe=class{constructor(e){this.ctx=e;this.name="contextProvider"}static{a(this,"CodeSnippetComponent")}snapshot(e,r){let{promptOpts:n}=e,o=wo(n?.tokenizer);if(!r||r.codeSnippets.length===0)return{root:T6};let s=new Map;for(let g of r.codeSnippets){let A=g.uri;gp(s,A,()=>[]).push(g)}let c=new Map,l=[],u=new Map,d=0,p=this.ctx.get(zr);for(let[g,A]of s.entries()){let y=p.getRelativePath({uri:g})??g,_=[`Compare ${A.length>1?"these snippets":"this snippet"} from ${y}: +`)],h={id:zu(),text:p,children:l,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};return xAe(h,m=>(s.get(m.id)??0)/c),{root:h,statistics:u}}},QKe=class{constructor(e){this.ctx=e;this.name="contextProvider"}static{a(this,"CodeSnippetComponent")}snapshot(e,r){let{promptOpts:n}=e,o=To(n?.tokenizer);if(!r||r.codeSnippets.length===0)return{root:J8};let s=new Map;for(let g of r.codeSnippets){let A=g.uri;up(s,A,()=>[]).push(g)}let c=new Map,l=[],u=new Map,d=0,p=this.ctx.get(zr);for(let[g,A]of s.entries()){let y=p.getRelativePath({uri:g})??g,_=[`Compare ${A.length>1?"these snippets":"this snippet"} from ${y}: `,...new Array(A.length).fill(` -`)],v=[];for(let b of A){let I=rd();u.set(I,b.importance??0);let x={id:I,text:[b.value],children:[],cost:o.tokenLength(b.value),weight:b.importance??0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1};v.push(x),d+=b.importance??0,c.set(I,{componentPath:b.id,source:b,expectedTokens:x.cost})}l.push({id:rd(),text:_,children:v,cost:o.tokenLength(_.join("")),weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0})}d=Math.max(d,1);let h=new Array(l.length+1).fill(""),m={id:rd(),text:h,children:l,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};return Rye(m,g=>(u.get(g.id)??0)/d),{root:m,statistics:c}}},DJe=class{constructor(e,r){this.name=e;this.components=r}static{a(this,"ConcatenatedContextComponent")}snapshot(e,r){let n=this.components.map(d=>d.snapshot(e,r)),o=n.map(d=>d.root).filter(d=>d.id!==T6.id);if(o.length===0)return{root:T6};let s=["",...Array(o.length-1).fill(` -`),""],c={id:rd(),text:s,children:o,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1},l=[],u=new Map;for(let d of n){for(let[p,h]of d.statistics?.entries()??[])u.set(p,h);d.mask&&l.push(...d.mask)}return{root:c,mask:l,statistics:u}}};var KYo=.8,MJe=class{constructor(e,r){this.ctx=e;this.components=r;this.renderId=0}static{a(this,"CascadingPromptFactory")}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}getComponentAllocation(e){let r=this.ctx.get(jt).suffixPercent(e),n=this.ctx.get(jt).stableContextPercent(e),o=this.ctx.get(jt).volatileContextPercent(e);if(r<0||r>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${r}`);if(n<0||n>100)throw new Error(`stableContextPercent must be between 0 and 100, but was ${n}`);if(o<0||o>100)throw new Error(`volatileContextPercent must be between 0 and 100, but was ${o}`);let s=100-r-n-o;if(s<=1||s>100)throw new Error(`prefixPercent must be between 1 and 100, but was ${s}`);return{prefix:s/100,suffix:r/100,stableContext:n/100,volatileContext:o/100}}async createPromptUnsafe(e,r){this.renderId++;let{completionId:n,completionState:o,telemetryData:s,promptOpts:c}=e,l=await this.failFastPrompt(o.textDocument,r);if(l)return l;let u=performance.now(),d;Iae(this.ctx,s)&&(d=await this.resolveContext(n,o,s,r));let p=performance.now()-u,h={},m={renderId:this.renderId,rendererName:"w",tokenizer:c?.tokenizer??"o200k_base",elisionTimeMs:0,renderTimeMs:0,updateDataTimeMs:p,componentStatistics:[]},g=o.textDocument.detectedLanguageId,{maxPromptLength:A}=zae(this.ctx,s,g),y=this.getComponentAllocation(s),E=y.suffix*A,_=this.components.suffix.estimatedCost?.(e,d),v=["stableContext","volatileContext","prefix","suffix"];E>KYo*(_??0)&&(v=["stableContext","volatileContext","suffix","prefix"]);let b=0;for(let Q of v){let M=b+A*y[Q],D=dSn(this.components[Q],M,e,d);b=M-D.cost,h[Q]=D,JYo(m,D.metadata)}let[I,x]=C7(h.prefix.text),R=performance.now(),w=Iae(this.ctx,s)?this.telemetrizeContext(n,m.componentStatistics,d?.resolvedContextItems??[]):[],P=[h.stableContext.text.trim(),h.volatileContext.text.trim()];return{type:"prompt",prompt:{prefix:c?.separateContext?I:FN(P.join(` +`)],v=[];for(let b of A){let I=zu();u.set(I,b.importance??0);let x={id:I,text:[b.value],children:[],cost:o.tokenLength(b.value),weight:b.importance??0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1};v.push(x),d+=b.importance??0,c.set(I,{componentPath:b.id,source:b,expectedTokens:x.cost})}l.push({id:zu(),text:_,children:v,cost:o.tokenLength(_.join("")),weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0})}d=Math.max(d,1);let h=new Array(l.length+1).fill(""),m={id:zu(),text:h,children:l,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0};return xAe(m,g=>(u.get(g.id)??0)/d),{root:m,statistics:c}}},qKe=class{constructor(e,r){this.name=e;this.components=r}static{a(this,"ConcatenatedContextComponent")}snapshot(e,r){let n=this.components.map(d=>d.snapshot(e,r)),o=n.map(d=>d.root).filter(d=>d.id!==J8.id);if(o.length===0)return{root:J8};let s=["",...Array(o.length-1).fill(` +`),""],c={id:zu(),text:s,children:o,cost:0,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!1},l=[],u=new Map;for(let d of n){for(let[p,h]of d.statistics?.entries()??[])u.set(p,h);d.mask&&l.push(...d.mask)}return{root:c,mask:l,statistics:u}}};var JJo=.8,GKe=class{constructor(e,r){this.ctx=e;this.components=r;this.renderId=0}static{a(this,"CascadingPromptFactory")}async prompt(e,r){try{return await this.createPromptUnsafe(e,r)}catch(n){return this.errorPrompt(n)}}getComponentAllocation(e){let r=this.ctx.get(Gt).suffixPercent(e),n=this.ctx.get(Gt).stableContextPercent(e),o=this.ctx.get(Gt).volatileContextPercent(e);if(r<0||r>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${r}`);if(n<0||n>100)throw new Error(`stableContextPercent must be between 0 and 100, but was ${n}`);if(o<0||o>100)throw new Error(`volatileContextPercent must be between 0 and 100, but was ${o}`);let s=100-r-n-o;if(s<=1||s>100)throw new Error(`prefixPercent must be between 1 and 100, but was ${s}`);return{prefix:s/100,suffix:r/100,stableContext:n/100,volatileContext:o/100}}async createPromptUnsafe(e,r){this.renderId++;let{completionId:n,completionState:o,telemetryData:s,promptOpts:c}=e,l=await this.failFastPrompt(o.textDocument,r);if(l)return l;let u=performance.now(),d;Qse(this.ctx,s)&&(d=await this.resolveContext(n,o,s,r));let p=performance.now()-u,h={},m={renderId:this.renderId,rendererName:"w",tokenizer:c?.tokenizer??"o200k_base",elisionTimeMs:0,renderTimeMs:0,updateDataTimeMs:p,componentStatistics:[]},g=o.textDocument.detectedLanguageId,{maxPromptLength:A}=cae(this.ctx,s,g),y=this.getComponentAllocation(s),E=y.suffix*A,_=this.components.suffix.estimatedCost?.(e,d),v=["stableContext","volatileContext","prefix","suffix"];E>JJo*(_??0)&&(v=["stableContext","volatileContext","suffix","prefix"]);let b=0;for(let Q of v){let M=b+A*y[Q],N=uIn(this.components[Q],M,e,d);b=M-N.cost,h[Q]=N,XJo(m,N.metadata)}let[I,x]=W9(h.prefix.text),w=performance.now(),R=Qse(this.ctx,s)?this.telemetrizeContext(n,m.componentStatistics,d?.resolvedContextItems??[]):[],P=[h.stableContext.text.trim(),h.volatileContext.text.trim()];return{type:"prompt",prompt:{prefix:c?.separateContext?I:I5(P.join(` `),g)+` -`+I,prefixTokens:h.prefix.cost+h.stableContext.cost+h.volatileContext.cost,suffix:h.suffix.text,suffixTokens:h.suffix.cost,context:c?.separateContext?P:void 0,isFimEnabled:h.suffix.text.length>0},computeTimeMs:R-u,trailingWs:x,neighborSource:new Map,metadata:m,contextProvidersTelemetry:w}}async resolveContext(e,r,n,o){let s=await this.ctx.get(jC).resolution(e),{textDocument:c}=r,l=s.filter(KYe),u=CJe(this.ctx,e,l);_Je("contextProvider.traits",this.ctx,u,c.detectedLanguageId,c.detectedLanguageId,n);let d=await sKe(this.ctx,e,l,c.detectedLanguageId);return{traits:u,codeSnippets:d,resolvedContextItems:s}}telemetrizeContext(e,r,n){let o=WYe(r);this.ctx.get(P0).getStatisticsForCompletion(e).computeMatch(o);let s=YYe(this.ctx,e,n);return _r.debug(this.ctx,`Context providers telemetry: '${JSON.stringify(s)}'`),s}async failFastPrompt(e,r){if(r?.isCancellationRequested)return B4;if((await this.ctx.get(bc).evaluate(e.uri,e.getText(),"UPDATE")).isBlocked)return wJe;if(e.getText().length{this.nextRequest.changedFiles===void 0&&(this.nextRequest.changedFiles=[]),this.nextRequest.changedFiles.push(r.document.uri)}),this.deferredStart.resolve(),this.loop())}dispose(){this.isActive()&&(this.didDispose=!0,this.emitter.emit(t.DisposeEventName),this.fileChangeDisposable?.dispose(),this.client?.exit())}pushWorkspaceContext(e,r){this.nextRequest.sources={...this.nextRequest.sources,[e]:r}}recordWorkspaceContextActivity(e,r,n){this.nextRequest.recentActivity===void 0&&(this.nextRequest.recentActivity=[]),this.nextRequest.recentActivity.push({sourceId:e,locations:r,timestamp:n})}getLastEvent(){return this.lastEvent}onUpdate(e){return this.emitter.on(t.UpdateEventName,e),_n.Disposable.create(()=>this.emitter.off(t.UpdateEventName,e))}onDisposal(e){return this.emitter.on(t.DisposeEventName,e),_n.Disposable.create(()=>this.emitter.off(t.DisposeEventName,e))}setContextLanguages(e){this.nextRequest.languages=e}async loop(){let e=0;for(;this.isActive();){try{let r=this.nextRequest;this.nextRequest={},this.lastEvent=await this.client.updateContext(r),this.emitter.emit(t.UpdateEventName,this.lastEvent),e=0}catch(r){if(A6(this.ctx,r,"WorkspaceContextFeature.loop"),e++,e>=ZYo){this.dispose();break}}await CT(this.config.UpdateInterval)}}};function mSn(t,e){let r=$p(t,e,"event.WorkspaceContextUpdate");return t.get(Hw).onUpdate(r)}a(mSn,"onWorkspaceContextUpdate");f();var OJe=class{constructor(e){this.ctx=e;this.name="workspaceContext";this.documents=new Map;this.root=T6;this.disposables=[];this.rootWithPathCache=new $r;this.disposables.push(mSn(e,r=>{(this.nextUpdateTime===void 0||performance.now()>=this.nextUpdateTime)&&setTimeout(()=>{this.update(r)},0)}))}static{a(this,"WorkspaceContextPromptComponent")}snapshot(e){let{completionState:r,telemetryData:n}=e;this.nextUpdateTime=this.lastUpdateTime!==void 0?this.lastUpdateTime+this.ctx.get(jt).workspaceContextCacheTime(n):performance.now();let o=gp(this.rootWithPathCache,r.textDocument.uri,()=>{let c=this.getPathMarker(r);return{id:rd(),text:[`${c} -`,""],children:[this.root],cost:1,weight:1,elisionMarker:"",canMerge:!0,requireRenderedChild:!1}}),s=this.getMask(r.textDocument.uri);return{root:o,mask:s}}getRoot(){return this.root}getMask(e){let r=this.documents.get(e);return r===void 0?[]:[r.id]}getPathMarker(e){let r=e.textDocument,n=this.ctx.get(zr),o=n.getRelativePath(e.textDocument),s={uri:r.uri,source:"",relativePath:o,languageId:r.detectedLanguageId},c=n.findNotebook(r);return s.relativePath&&!c?FN(pKe(s),s.languageId):FN(fKe(s),s.languageId)}update(e){this.rootWithPathCache.clear(),this.documents.clear();for(let[r,n]of Object.entries(e.documents)){let o=this.createAnnotatedDocumentRoot(r,n);n.requireRenderedChild=n.children.length>0,this.documents.set(r,o)}this.root=this.createRootNode(),this.lastUpdateTime=performance.now()}createRootNode(){let e=new Array(this.documents.size+1).fill(""),r=[...this.documents.values()];return{id:rd(),text:e,children:r,cost:1,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0}}createAnnotatedDocumentRoot(e,r){let n=$P({uri:e,languageId:"UNKNOWN"}),o=this.getDocumentAnnotation(e,n);return{id:rd(),text:[o,` +`+I,prefixTokens:h.prefix.cost+h.stableContext.cost+h.volatileContext.cost,suffix:h.suffix.text,suffixTokens:h.suffix.cost,context:c?.separateContext?P:void 0,isFimEnabled:h.suffix.text.length>0},computeTimeMs:w-u,trailingWs:x,neighborSource:new Map,metadata:m,contextProvidersTelemetry:R}}async resolveContext(e,r,n,o){let s=await this.ctx.get(D_).resolution(e),{textDocument:c}=r,l=s.filter(iYe),u=wKe(this.ctx,e,l);RKe("contextProvider.traits",this.ctx,u,c.detectedLanguageId,c.detectedLanguageId,n);let d=await hYe(this.ctx,e,l,c.detectedLanguageId);return{traits:u,codeSnippets:d,resolvedContextItems:s}}telemetrizeContext(e,r,n){let o=tYe(r);this.ctx.get(S0).getStatisticsForCompletion(e).computeMatch(o);let s=nYe(this.ctx,e,n);return Cr.debug(this.ctx,`Context providers telemetry: '${JSON.stringify(s)}'`),s}async failFastPrompt(e,r){if(r?.isCancellationRequested)return yO;if((await this.ctx.get(Ac).evaluate(e.uri,e.getText(),"UPDATE")).isBlocked)return BKe;if(e.getText().length{this.nextRequest.changedFiles===void 0&&(this.nextRequest.changedFiles=[]),this.nextRequest.changedFiles.push(r.document.uri)}),this.deferredStart.resolve(),this.loop())}dispose(){this.isActive()&&(this.didDispose=!0,this.emitter.emit(t.DisposeEventName),this.fileChangeDisposable?.dispose(),this.client?.exit())}pushWorkspaceContext(e,r){this.nextRequest.sources={...this.nextRequest.sources,[e]:r}}recordWorkspaceContextActivity(e,r,n){this.nextRequest.recentActivity===void 0&&(this.nextRequest.recentActivity=[]),this.nextRequest.recentActivity.push({sourceId:e,locations:r,timestamp:n})}getLastEvent(){return this.lastEvent}onUpdate(e){return this.emitter.on(t.UpdateEventName,e),Cn.Disposable.create(()=>this.emitter.off(t.UpdateEventName,e))}onDisposal(e){return this.emitter.on(t.DisposeEventName,e),Cn.Disposable.create(()=>this.emitter.off(t.DisposeEventName,e))}setContextLanguages(e){this.nextRequest.languages=e}async loop(){let e=0;for(;this.isActive();){try{let r=this.nextRequest;this.nextRequest={},this.lastEvent=await this.client.updateContext(r),this.emitter.emit(t.UpdateEventName,this.lastEvent),e=0}catch(r){if(j8(this.ctx,r,"WorkspaceContextFeature.loop"),e++,e>=eXo){this.dispose();break}}await Wb(this.config.UpdateInterval)}}};function hIn(t,e){let r=Up(t,e,"event.WorkspaceContextUpdate");return t.get(Dw).onUpdate(r)}a(hIn,"onWorkspaceContextUpdate");f();var HKe=class{constructor(e){this.ctx=e;this.name="workspaceContext";this.documents=new Map;this.root=J8;this.disposables=[];this.rootWithPathCache=new $r;this.disposables.push(hIn(e,r=>{(this.nextUpdateTime===void 0||performance.now()>=this.nextUpdateTime)&&setTimeout(()=>{this.update(r)},0)}))}static{a(this,"WorkspaceContextPromptComponent")}snapshot(e){let{completionState:r,telemetryData:n}=e;this.nextUpdateTime=this.lastUpdateTime!==void 0?this.lastUpdateTime+this.ctx.get(Gt).workspaceContextCacheTime(n):performance.now();let o=up(this.rootWithPathCache,r.textDocument.uri,()=>{let c=this.getPathMarker(r);return{id:zu(),text:[`${c} +`,""],children:[this.root],cost:1,weight:1,elisionMarker:"",canMerge:!0,requireRenderedChild:!1}}),s=this.getMask(r.textDocument.uri);return{root:o,mask:s}}getRoot(){return this.root}getMask(e){let r=this.documents.get(e);return r===void 0?[]:[r.id]}getPathMarker(e){let r=e.textDocument,n=this.ctx.get(zr),o=n.getRelativePath(e.textDocument),s={uri:r.uri,source:"",relativePath:o,languageId:r.detectedLanguageId},c=n.findNotebook(r);return s.relativePath&&!c?I5(CYe(s),s.languageId):I5(_Ye(s),s.languageId)}update(e){this.rootWithPathCache.clear(),this.documents.clear();for(let[r,n]of Object.entries(e.documents)){let o=this.createAnnotatedDocumentRoot(r,n);n.requireRenderedChild=n.children.length>0,this.documents.set(r,o)}this.root=this.createRootNode(),this.lastUpdateTime=performance.now()}createRootNode(){let e=new Array(this.documents.size+1).fill(""),r=[...this.documents.values()];return{id:zu(),text:e,children:r,cost:1,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0}}createAnnotatedDocumentRoot(e,r){let n=NP({uri:e,languageId:"UNKNOWN"}),o=this.getDocumentAnnotation(e,n);return{id:zu(),text:[o,` -`],children:[r],cost:1,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0}}getDocumentAnnotation(e,r){let o=this.ctx.get(zr).getRelativePath({uri:e});return FN(`Related portions of ${o??e}: -`,r)}dispose(){for(let e of this.disposables)e.dispose();this.disposables=[]}};f();var BJe=class extends MJe{static{a(this,"WorkspaceContextPromptFactory")}constructor(e){let r={stableContext:new OJe(e),prefix:new RJe,suffix:new PJe(e),volatileContext:new DJe("volatileContext",[new kJe,new NJe(e)])};super(e,r)}};var gSn=de(Nn());var L4=class{static{a(this,"CompletionsPromptFactory")}};function LJe(t,e,r){return new n$t(new i$t(new o$t(t,new SJe(t,e,r),new BJe(t),tKo)))}a(LJe,"createCompletionsPromptFactory");var n$t=class extends L4{constructor(r){super();this.delegate=r}static{a(this,"SequentialCompletionsPromptFactory")}async prompt(r,n){return this.lastPromise=this.promptAsync(r,n),this.lastPromise}async promptAsync(r,n){if(await this.lastPromise,n?.isCancellationRequested)return B4;try{return await this.delegate.prompt(r,n)}catch{return Yae}}},eKo=1200,i$t=class{constructor(e){this.delegate=e}static{a(this,"TimeoutHandlingCompletionsPromptFactory")}async prompt(e,r){let n=new gSn.CancellationTokenSource,o=n.token;return r?.onCancellationRequested(()=>{n.cancel()}),await Promise.race([this.delegate.prompt(e,o),new Promise(s=>{setTimeout(()=>{n.cancel(),s(ASn)},eKo)})])}},o$t=class{constructor(e,r,n,o){this.ctx=e;this.defaultDelegate=r;this.experimentalDelegate=n;this.fn=o}static{a(this,"ExperimentalCompletionsPromptFactory")}async prompt(e,r){return this.fn(this.ctx,e.telemetryData)?this.experimentalDelegate.prompt(e,r):this.defaultDelegate.prompt(e,r)}};function tKo(t,e){let r=t.get(Hw);return r.isEnabled(e)&&r.isActive()}a(tKo,"workspaceContextEnabledAndActive");var IJe=10,xJe={type:"contextTooShort"},wJe={type:"copilotContentExclusion"},Yae={type:"promptError"},B4={type:"promptCancelled"},ASn={type:"promptTimeout"};function C7(t){let e=t.split(` -`),r=e[e.length-1],n=r.length-r.trimEnd().length,o=t.slice(0,t.length-n),s=t.slice(o.length);return[r.length==n?o:t,s]}a(C7,"trimLastLine");function Kae(t,e,r,n,o,s={}){let l=t.get(zr).findNotebook(r.textDocument),u=l?.getCellFor(r.textDocument);l&&u&&(r=nKo(r,l,u)),n.extendWithConfigProperties(t),n.sanitizeKeys();let d=nSn(t,n);return t.get(L4).prompt({completionId:e,completionState:r,telemetryData:n,promptOpts:{...s,separateContext:d}},o)}a(Kae,"extractPrompt");function rKo(t,e){let r=t.document.detectedLanguageId,n=t.document.getText();return r===e?n:FN(n,e)}a(rKo,"addNeighboringCellsToPrompt");function nKo(t,e,r){let o=e.getCells().filter(l=>l.index0?o.map(l=>rKo(l,r.document.detectedLanguageId)).join(` +`],children:[r],cost:1,weight:0,elisionMarker:"",canMerge:!0,requireRenderedChild:!0}}getDocumentAnnotation(e,r){let o=this.ctx.get(zr).getRelativePath({uri:e});return I5(`Related portions of ${o??e}: +`,r)}dispose(){for(let e of this.disposables)e.dispose();this.disposables=[]}};f();var jKe=class extends GKe{static{a(this,"WorkspaceContextPromptFactory")}constructor(e){let r={stableContext:new HKe(e),prefix:new LKe,suffix:new FKe(e),volatileContext:new qKe("volatileContext",[new UKe,new QKe(e)])};super(e,r)}};var mIn=de(Dn());var EO=class{static{a(this,"CompletionsPromptFactory")}};function $Ke(t,e,r){return new b$t(new T$t(new S$t(t,new NKe(t,e,r),new jKe(t),rXo)))}a($Ke,"createCompletionsPromptFactory");var b$t=class extends EO{constructor(r){super();this.delegate=r}static{a(this,"SequentialCompletionsPromptFactory")}async prompt(r,n){return this.lastPromise=this.promptAsync(r,n),this.lastPromise}async promptAsync(r,n){if(await this.lastPromise,n?.isCancellationRequested)return yO;try{return await this.delegate.prompt(r,n)}catch{return lae}}},tXo=1200,T$t=class{constructor(e){this.delegate=e}static{a(this,"TimeoutHandlingCompletionsPromptFactory")}async prompt(e,r){let n=new mIn.CancellationTokenSource,o=n.token;return r?.onCancellationRequested(()=>{n.cancel()}),await Promise.race([this.delegate.prompt(e,o),new Promise(s=>{setTimeout(()=>{n.cancel(),s(gIn)},tXo)})])}},S$t=class{constructor(e,r,n,o){this.ctx=e;this.defaultDelegate=r;this.experimentalDelegate=n;this.fn=o}static{a(this,"ExperimentalCompletionsPromptFactory")}async prompt(e,r){return this.fn(this.ctx,e.telemetryData)?this.experimentalDelegate.prompt(e,r):this.defaultDelegate.prompt(e,r)}};function rXo(t,e){let r=t.get(Dw);return r.isEnabled(e)&&r.isActive()}a(rXo,"workspaceContextEnabledAndActive");var MKe=10,OKe={type:"contextTooShort"},BKe={type:"copilotContentExclusion"},lae={type:"promptError"},yO={type:"promptCancelled"},gIn={type:"promptTimeout"};function W9(t){let e=t.split(` +`),r=e[e.length-1],n=r.length-r.trimEnd().length,o=t.slice(0,t.length-n),s=t.slice(o.length);return[r.length==n?o:t,s]}a(W9,"trimLastLine");function uae(t,e,r,n,o,s={}){let l=t.get(zr).findNotebook(r.textDocument),u=l?.getCellFor(r.textDocument);l&&u&&(r=iXo(r,l,u)),n.extendWithConfigProperties(t),n.sanitizeKeys();let d=rIn(t,n);return t.get(EO).prompt({completionId:e,completionState:r,telemetryData:n,promptOpts:{...s,separateContext:d}},o)}a(uae,"extractPrompt");function nXo(t,e){let r=t.document.detectedLanguageId,n=t.document.getText();return r===e?n:I5(n,e)}a(nXo,"addNeighboringCellsToPrompt");function iXo(t,e,r){let o=e.getCells().filter(l=>l.index0?o.map(l=>nXo(l,r.document.detectedLanguageId)).join(` `)+` -`:"",c={line:0,character:0};return t.applyEdits([{newText:s,range:{start:c,end:c}}])}a(nKo,"applyEditsForNotebook");function zae(t,e,r){let o=t.get(jt).maxPromptCompletionTokens(e)-H9e(t),s=Jvn(e,r),c=oKe(t,e,r),l=t.get(jt).suffixPercent(e),u=t.get(jt).suffixMatchThreshold(e);if(l<0||l>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${l}`);if(u<0||u>100)throw new Error(`suffixMatchThreshold must be between 0 and 100, but was ${u}`);return{maxPromptLength:o,similarFilesOptions:c,numberOfSnippets:s,suffixPercent:l,suffixMatchThreshold:u}}a(zae,"getPromptOptions");f();f();var ySn=2.98410452738298,ESn=-.838732736843507,CSn=1.50314646255716,_Sn=-.237798634012662,FJe={python:.314368072478742},vSn={"0.01":.225800751784931,"0.02":.290204307767402,"0.03":.333153496466045,"0.05":.404516749849559,"0.1":.513216040545626,"0.2":.626904979128674,"0.3":.694880719658273,"0.4":.743100684947291,"0.5":.782524520571946,"0.6":.816856186092243,"0.7":.84922977716585,"0.8":.883694877241999,"0.9":.921859050950077,"0.95":.944571268106974,"0.99":.969535563141733};var iKo={link:a(t=>Math.exp(t)/(1+Math.exp(t)),"link"),unlink:a(t=>Math.log(t/(1-t)),"unlink")};function oKo(t,e){let r=Math.min(...Array.from(e.keys()).filter(c=>c>=t)),n=Math.max(...Array.from(e.keys()).filter(c=>co)}contribution(e){return this.coefficient*this.transformation(e)}},s$t=class{constructor(e,r,n){this.link=iKo;if(this.intercept=e,this.coefficients=r,this.logitsToQuantiles=new Map,this.logitsToQuantiles.set(0,0),this.logitsToQuantiles.set(1,1),n)for(let o in n)this.logitsToQuantiles.set(n[o],Number(o))}static{a(this,"LogisticRegression")}predict(e,r){let n=this.intercept;for(let o of this.coefficients){let s=r[o.name];if(s===void 0)return NaN;n+=o.contribution(s)}return this.link.link(n)}quantile(e,r){let n=this.predict(e,r);return oKo(n,this.logitsToQuantiles)}},bSn=new s$t(ySn,[new Jae("compCharLen",ESn,t=>Math.log(1+t)),new Jae("meanLogProb",CSn),new Jae("meanAlternativeLogProb",_Sn)].concat(Object.entries(FJe).map(t=>new Jae(t[0],t[1]))),vSn);function TSn(t,e){let r={...e.measurements};return Object.keys(FJe).forEach(n=>{r[n]=e.properties["customDimensions.languageId"]==n?1:0}),bSn.predict(t,r)}a(TSn,"ghostTextScoreConfidence");function SSn(t,e){let r={...e.measurements};return Object.keys(FJe).forEach(n=>{r[n]=e.properties["customDimensions.languageId"]==n?1:0}),bSn.quantile(t,r)}a(SSn,"ghostTextScoreQuantile");f();function sKo(t,e,r,n){let o="}";try{o=R6r(e.detectedLanguageId)??"}"}catch{}return aKo({getLineText:a(s=>e.lineAt(s).text,"getLineText"),getLineCount:a(()=>e.lineCount,"getLineCount")},r,n,o)}a(sKo,"maybeSnipCompletion");function aKo(t,e,r,n){let o=cKo(r),s=o.lines;if(s.length===1)return r;for(let c=1;c=t.getLineCount()?void 0:t.getLineText(y),h!==void 0&&h.trim()==="")u++;else break}let m,g;for(;m=c+p+d,g=m>=s.length?void 0:s[m],g!==void 0&&g.trim()==="";)d++;let A=m===s.length-1;if(!g||!(h&&(A?h.startsWith(g)||g.startsWith(h):h===g&&g.trim()===n))){l=!1;break}}if(l)return s.slice(0,c).join(o.newLineCharacter)}return r}a(aKo,"maybeSnipCompletionImpl");function cKo(t){let e=t.includes(`\r +`:"",c={line:0,character:0};return t.applyEdits([{newText:s,range:{start:c,end:c}}])}a(iXo,"applyEditsForNotebook");function cae(t,e,r){let o=t.get(Gt).maxPromptCompletionTokens(e)-JFe(t),s=Kbn(e,r),c=pYe(t,e,r),l=t.get(Gt).suffixPercent(e),u=t.get(Gt).suffixMatchThreshold(e);if(l<0||l>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${l}`);if(u<0||u>100)throw new Error(`suffixMatchThreshold must be between 0 and 100, but was ${u}`);return{maxPromptLength:o,similarFilesOptions:c,numberOfSnippets:s,suffixPercent:l,suffixMatchThreshold:u}}a(cae,"getPromptOptions");f();f();var AIn=2.98410452738298,yIn=-.838732736843507,EIn=1.50314646255716,_In=-.237798634012662,VKe={python:.314368072478742},CIn={"0.01":.225800751784931,"0.02":.290204307767402,"0.03":.333153496466045,"0.05":.404516749849559,"0.1":.513216040545626,"0.2":.626904979128674,"0.3":.694880719658273,"0.4":.743100684947291,"0.5":.782524520571946,"0.6":.816856186092243,"0.7":.84922977716585,"0.8":.883694877241999,"0.9":.921859050950077,"0.95":.944571268106974,"0.99":.969535563141733};var oXo={link:a(t=>Math.exp(t)/(1+Math.exp(t)),"link"),unlink:a(t=>Math.log(t/(1-t)),"unlink")};function sXo(t,e){let r=Math.min(...Array.from(e.keys()).filter(c=>c>=t)),n=Math.max(...Array.from(e.keys()).filter(c=>co)}contribution(e){return this.coefficient*this.transformation(e)}},I$t=class{constructor(e,r,n){this.link=oXo;if(this.intercept=e,this.coefficients=r,this.logitsToQuantiles=new Map,this.logitsToQuantiles.set(0,0),this.logitsToQuantiles.set(1,1),n)for(let o in n)this.logitsToQuantiles.set(n[o],Number(o))}static{a(this,"LogisticRegression")}predict(e,r){let n=this.intercept;for(let o of this.coefficients){let s=r[o.name];if(s===void 0)return NaN;n+=o.contribution(s)}return this.link.link(n)}quantile(e,r){let n=this.predict(e,r);return sXo(n,this.logitsToQuantiles)}},vIn=new I$t(AIn,[new dae("compCharLen",yIn,t=>Math.log(1+t)),new dae("meanLogProb",EIn),new dae("meanAlternativeLogProb",_In)].concat(Object.entries(VKe).map(t=>new dae(t[0],t[1]))),CIn);function bIn(t,e){let r={...e.measurements};return Object.keys(VKe).forEach(n=>{r[n]=e.properties["customDimensions.languageId"]==n?1:0}),vIn.predict(t,r)}a(bIn,"ghostTextScoreConfidence");function TIn(t,e){let r={...e.measurements};return Object.keys(VKe).forEach(n=>{r[n]=e.properties["customDimensions.languageId"]==n?1:0}),vIn.quantile(t,r)}a(TIn,"ghostTextScoreQuantile");f();function aXo(t,e,r,n){let o="}";try{o=wFr(e.detectedLanguageId)??"}"}catch{}return cXo({getLineText:a(s=>e.lineAt(s).text,"getLineText"),getLineCount:a(()=>e.lineCount,"getLineCount")},r,n,o)}a(aXo,"maybeSnipCompletion");function cXo(t,e,r,n){let o=lXo(r),s=o.lines;if(s.length===1)return r;for(let c=1;c=t.getLineCount()?void 0:t.getLineText(y),h!==void 0&&h.trim()==="")u++;else break}let m,g;for(;m=c+p+d,g=m>=s.length?void 0:s[m],g!==void 0&&g.trim()==="";)d++;let A=m===s.length-1;if(!g||!(h&&(A?h.startsWith(g)||g.startsWith(h):h===g&&g.trim()===n))){l=!1;break}}if(l)return s.slice(0,c).join(o.newLineCharacter)}return r}a(cXo,"maybeSnipCompletionImpl");function lXo(t){let e=t.includes(`\r `)?`\r `:` -`;return{lines:t.split(e),newLineCharacter:e}}a(cKo,"splitByNewLine");function lKo(t,e,r,n){let o="",s=e.line+1,c=n?r.trim():r;for(;o===""&&s0){if(r.completionText.indexOf(o)!==-1)return o.length;{let s=-1,c=0;for(let l of o){let u=r.completionText.indexOf(l,s+1);if(u>s)c++,s=u;else break}return c}}return 0}a(ISn,"checkSuffix");var PSn=de(x5());var lc=new Se("ghostText");var xSn=20;async function kSn(t,e,r,n,o,s,c){lc.debug(t,`Getting ${s} from network`),r=r.extendedBy();let l=e.isCycling?3:1,u=_ne(t,l),d={language:e.languageId,next_indent:e.indentation.next??0,trim_by_indentation:M6r(e.blockMode),prompt_tokens:e.prompt.prefixTokens??0,suffix_tokens:e.prompt.suffixTokens??0},p={n:l,temperature:u,code_annotations:!1},h=vr(t,tt.ModelAlwaysTerminatesSingleline)??t.get(jt).modelAlwaysTerminatesSingleline(r),m=e.blockMode==="moremultiline"&&jP.isSupported(e.languageId)&&!h;!e.multiline&&!m?p.stop=[` -`]:e.stop&&(p.stop=e.stop),e.maxTokens!==void 0&&(p.max_tokens=e.maxTokens);let g=Date.now(),A={endpoint:"completions",uiKind:"ghostText",temperature:JSON.stringify(u),n:JSON.stringify(l),stop:JSON.stringify(p.stop)??"unset",logit_bias:JSON.stringify(null)};Object.assign(r.properties,A);try{let y={prompt:e.prompt,languageId:e.languageId,repoInfo:e.repoInfo,ourRequestId:e.ourRequestId,engineModelId:e.engineModelId,count:l,uiKind:"ghostText",postOptions:p,headers:e.headers,extra:d},E=await t.get(ok).fetchAndStreamCompletions(t,y,r,o,n);return E.type==="failed"?{type:"failed",reason:E.reason,telemetryData:zd(r,t)}:E.type==="canceled"?(lc.debug(t,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:E.reason,telemetryData:l7(r)}):c(g,E.getProcessingTime(),E.choices)}catch(y){if(ep(y))return{type:"canceled",reason:"network request aborted",telemetryData:l7(r,{cancelledNetworkRequest:!0})};if(lc.exception(t,y,"Error on ghost text request"),t.get(OE).notifyUser(t,y),$X(t))throw y;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:zd(r,t)}}}a(kSn,"genericGetCompletionsFromNetwork");function a$t(t,e,r){if(r||(r=[]),t.completionText=t.completionText.trimEnd(),!!t.completionText&&r.findIndex(n=>n.completionText.trim()===t.completionText.trim())===-1)return t}a(a$t,"postProcessChoices");async function dKo(t,e,r,n,o){return kSn(t,e,r,n,o,"completions",async(s,c,l)=>{let d=await l[Symbol.asyncIterator]().next();if(d.done)return lc.debug(t,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:zd(r,t)};if(n?.isCancellationRequested)return lc.debug(t,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:l7(r)};let p=d.value;if(p===void 0)return lc.debug(t,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:zd(r,t)};DSn(t,"performance",p,s,c),lc.debug(t,`Awaited first result, id: ${p.choiceIndex}`);let h=a$t(p,e);h&&(UJe(t,e,h),lc.debug(t,`GhostText first completion (index ${h?.choiceIndex}): ${JSON.stringify(h?.completionText)}`));let m=(async()=>{let g=h!==void 0?[h]:[];for await(let A of l){if(A===void 0)continue;lc.debug(t,`GhostText later completion (index ${A?.choiceIndex}): ${JSON.stringify(A.completionText)}`);let y=a$t(A,e,g);y&&(g.push(y),UJe(t,e,y))}})();return q_(t)&&await m,h?{type:"success",value:[c$t(h,{forceSingleLine:!1}),m],telemetryData:zd(r,t),telemetryBlob:r,resultType:0}:{type:"empty",reason:"got undefined processedFirstChoice",telemetryData:zd(r,t)}})}a(dKo,"getCompletionsFromNetwork");async function fKo(t,e,r,n,o){return kSn(t,e,r,n,o,"all completions",async(s,c,l)=>{let u=[];for await(let d of l){if(n?.isCancellationRequested)return lc.debug(t,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:l7(r)};let p=a$t(d,e,u);p&&u.push(p)}if(u.length>0){for(let d of u)UJe(t,e,d);DSn(t,"cyclingPerformance",u[0],s,c)}return{type:"success",value:[u,Promise.resolve()],telemetryData:zd(r,t),telemetryBlob:r,resultType:3}})}a(fKo,"getAllCompletionsFromNetwork");function c$t(t,e){let r={...t};if(e.forceSingleLine){let{completionText:n}=r,o=n.match(/^\r?\n/);o?r.completionText=o[0]+n.split(` +`;return{lines:t.split(e),newLineCharacter:e}}a(lXo,"splitByNewLine");function uXo(t,e,r,n){let o="",s=e.line+1,c=n?r.trim():r;for(;o===""&&s0){if(r.completionText.indexOf(o)!==-1)return o.length;{let s=-1,c=0;for(let l of o){let u=r.completionText.indexOf(l,s+1);if(u>s)c++,s=u;else break}return c}}return 0}a(SIn,"checkSuffix");var RIn=de(mN());var ic=new Se("ghostText");var IIn=20;async function PIn(t,e,r,n,o,s,c){ic.debug(t,`Getting ${s} from network`),r=r.extendedBy();let l=e.isCycling?3:1,u=Mre(t,l),d={language:e.languageId,next_indent:e.indentation.next??0,trim_by_indentation:NFr(e.blockMode),prompt_tokens:e.prompt.prefixTokens??0,suffix_tokens:e.prompt.suffixTokens??0},p={n:l,temperature:u,code_annotations:!1},h=vr(t,tt.ModelAlwaysTerminatesSingleline)??t.get(Gt).modelAlwaysTerminatesSingleline(r),m=e.blockMode==="moremultiline"&&DP.isSupported(e.languageId)&&!h;!e.multiline&&!m?p.stop=[` +`]:e.stop&&(p.stop=e.stop),e.maxTokens!==void 0&&(p.max_tokens=e.maxTokens);let g=Date.now(),A={endpoint:"completions",uiKind:"ghostText",temperature:JSON.stringify(u),n:JSON.stringify(l),stop:JSON.stringify(p.stop)??"unset",logit_bias:JSON.stringify(null)};Object.assign(r.properties,A);try{let y={prompt:e.prompt,languageId:e.languageId,repoInfo:e.repoInfo,ourRequestId:e.ourRequestId,engineModelId:e.engineModelId,count:l,uiKind:"ghostText",postOptions:p,headers:e.headers,extra:d},E=await t.get(WP).fetchAndStreamCompletions(t,y,r,o,n);return E.type==="failed"?{type:"failed",reason:E.reason,telemetryData:Ud(r,t)}:E.type==="canceled"?(ic.debug(t,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:E.reason,telemetryData:B9(r)}):c(g,E.getProcessingTime(),E.choices)}catch(y){if(Y0(y))return{type:"canceled",reason:"network request aborted",telemetryData:B9(r,{cancelledNetworkRequest:!0})};if(ic.exception(t,y,"Error on ghost text request"),t.get(xE).notifyUser(t,y),XJ(t))throw y;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:Ud(r,t)}}}a(PIn,"genericGetCompletionsFromNetwork");function x$t(t,e,r){if(r||(r=[]),t.completionText=t.completionText.trimEnd(),!!t.completionText&&r.findIndex(n=>n.completionText.trim()===t.completionText.trim())===-1)return t}a(x$t,"postProcessChoices");async function fXo(t,e,r,n,o){return PIn(t,e,r,n,o,"completions",async(s,c,l)=>{let d=await l[Symbol.asyncIterator]().next();if(d.done)return ic.debug(t,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:Ud(r,t)};if(n?.isCancellationRequested)return ic.debug(t,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:B9(r)};let p=d.value;if(p===void 0)return ic.debug(t,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:Ud(r,t)};DIn(t,"performance",p,s,c),ic.debug(t,`Awaited first result, id: ${p.choiceIndex}`);let h=x$t(p,e);h&&(WKe(t,e,h),ic.debug(t,`GhostText first completion (index ${h?.choiceIndex}): ${JSON.stringify(h?.completionText)}`));let m=(async()=>{let g=h!==void 0?[h]:[];for await(let A of l){if(A===void 0)continue;ic.debug(t,`GhostText later completion (index ${A?.choiceIndex}): ${JSON.stringify(A.completionText)}`);let y=x$t(A,e,g);y&&(g.push(y),WKe(t,e,y))}})();return RC(t)&&await m,h?{type:"success",value:[w$t(h,{forceSingleLine:!1}),m],telemetryData:Ud(r,t),telemetryBlob:r,resultType:0}:{type:"empty",reason:"got undefined processedFirstChoice",telemetryData:Ud(r,t)}})}a(fXo,"getCompletionsFromNetwork");async function pXo(t,e,r,n,o){return PIn(t,e,r,n,o,"all completions",async(s,c,l)=>{let u=[];for await(let d of l){if(n?.isCancellationRequested)return ic.debug(t,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:B9(r)};let p=x$t(d,e,u);p&&u.push(p)}if(u.length>0){for(let d of u)WKe(t,e,d);DIn(t,"cyclingPerformance",u[0],s,c)}return{type:"success",value:[u,Promise.resolve()],telemetryData:Ud(r,t),telemetryBlob:r,resultType:3}})}a(pXo,"getAllCompletionsFromNetwork");function w$t(t,e){let r={...t};if(e.forceSingleLine){let{completionText:n}=r,o=n.match(/^\r?\n/);o?r.completionText=o[0]+n.split(` `)[1]:r.completionText=n.split(` -`)[0]}return r}a(c$t,"makeGhostAPIChoice");function wSn(t){return e=>{let r=e?.split(` +`)[0]}return r}a(w$t,"makeGhostAPIChoice");function xIn(t){return e=>{let r=e?.split(` `)??[];if(r.length>t+1)return r.slice(0,t+1).join(` -`).length}}a(wSn,"takeNLines");async function pKo(t,e,r,n,o,s,c,l){let u=t.get(jt).multilineAfterAcceptLines(l),d=t.get(Nx).forLanguage(t,e.textDocument.detectedLanguageId,l);switch(d){case"server":return c?{blockMode:"parsing",requestMultiline:!0,finishedCb:wSn(u),stop:[` +`).length}}a(xIn,"takeNLines");async function hXo(t,e,r,n,o,s,c,l){let u=t.get(Gt).multilineAfterAcceptLines(l),d=t.get(Cx).forLanguage(t,e.textDocument.detectedLanguageId,l);switch(d){case"server":return c?{blockMode:"parsing",requestMultiline:!0,finishedCb:xIn(u),stop:[` -`],maxTokens:xSn*u}:{blockMode:"server",requestMultiline:!0,finishedCb:a(p=>{},"finishedCb")};case"parsing":case"parsingandserver":case"moremultiline":default:{let p;try{p=await vKo(t,d,e.textDocument,e.position,s,c,n)}catch{p={requestMultiline:!1}}if(!c&&p.requestMultiline&&t.get(jt).singleLineUnlessAccepted(l)&&(p.requestMultiline=!1),p.requestMultiline){let h;return n.trailingWs.length>0&&!n.prompt.prefix.endsWith(n.trailingWs)?h=vc.position(e.position.line,Math.max(e.position.character-n.trailingWs.length,0)):h=e.position,{blockMode:d,requestMultiline:!0,...RSn(t,d,e.textDocument,h,p.blockPosition,r,!0,n.prompt,l)}}if(c){let h={blockMode:"parsing",requestMultiline:!0,finishedCb:wSn(u),stop:[` +`],maxTokens:IIn*u}:{blockMode:"server",requestMultiline:!0,finishedCb:a(p=>{},"finishedCb")};case"parsing":case"parsingandserver":case"moremultiline":default:{let p;try{p=await bXo(t,d,e.textDocument,e.position,s,c,n)}catch{p={requestMultiline:!1}}if(!c&&p.requestMultiline&&t.get(Gt).singleLineUnlessAccepted(l)&&(p.requestMultiline=!1),p.requestMultiline){let h;return n.trailingWs.length>0&&!n.prompt.prefix.endsWith(n.trailingWs)?h=gc.position(e.position.line,Math.max(e.position.character-n.trailingWs.length,0)):h=e.position,{blockMode:d,requestMultiline:!0,...wIn(t,d,e.textDocument,h,p.blockPosition,r,!0,n.prompt,l)}}if(c){let h={blockMode:"parsing",requestMultiline:!0,finishedCb:xIn(u),stop:[` -`],maxTokens:xSn*u};return d==="moremultiline"&&(h.blockMode="moremultiline"),h}return{blockMode:d,requestMultiline:!1,...RSn(t,d,e.textDocument,e.position,p.blockPosition,r,!1,n.prompt,l)}}}}a(pKo,"getGhostTextStrategy");function RSn(t,e,r,n,o,s,c,l,u){if(c&&e==="moremultiline"&&jP.isSupported(r.detectedLanguageId)){let d=o==="empty-block"||o==="block-end"?t.get(jt).longLookaheadSize(u):t.get(jt).shortLookaheadSize(u);return{finishedCb:new GYe(t,s,r.detectedLanguageId,!1,d,(h,m)=>{let g={prefix:s+h,prompt:{...l,prefix:l.prefix+h}};UJe(t,g,m)}).getFinishedCallback(),maxTokens:t.get(jt).maxMultilineTokens(u)}}return{finishedCb:c?Ybe(t,r,n):d=>{}}}a(RSn,"buildFinishedCallback");var hKo={isCycling:!1,promptOnly:!1,isSpeculative:!1};function mKo(t,e,r){let n=vr(t,tt.CompletionsDebounce)??t.get(jt).completionsDebounce(r)??e.debounceMs;if(n===void 0)return 0;let o=Ac()-r.issuedTime;return Math.max(0,n-o)}a(mKo,"getRemainingDebounceMs");function ETe(t,e,r){return r?.isCancellationRequested||e!==t.get(HC).currentRequestId}a(ETe,"inlineCompletionRequestCancelled");async function gKo(t,e,r,n,o,s){let c=n.issuedTime,l=[];function u(E){let _=Ac();l.push([E,_-c]),c=_}a(u,"recordPerformance"),u("telemetry");let d=t.get(jt);if(ETe(t,r,o))return{type:"abortedBeforeIssued",reason:"cancelled before extractPrompt",telemetryData:zd(n,t)};let p=yKo(e.textDocument,e.position);if(p===void 0)return lc.debug(t,"Breaking, invalid middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line",telemetryData:zd(n,t)};let h=h6(t,n),m={...hKo,...s,tokenizer:h.tokenizer},g=await Kae(t,r,e,n,void 0,m);if(u("prompt"),g.type==="copilotContentExclusion")return lc.debug(t,"Copilot not available, due to content exclusion"),{type:"abortedBeforeIssued",reason:"Copilot not available due to content exclusion",telemetryData:zd(n,t)};if(g.type==="contextTooShort")return lc.debug(t,"Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context",telemetryData:zd(n,t)};if(g.type==="promptError")return lc.debug(t,"Error while building the prompt"),{type:"abortedBeforeIssued",reason:"Error while building the prompt",telemetryData:zd(n,t)};if(m.promptOnly)return{type:"promptOnly",reason:"Breaking, promptOnly set to true",prompt:g};if(g.type==="promptCancelled")return lc.debug(t,"Cancelled during extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled during extractPrompt",telemetryData:zd(n,t)};if(g.type==="promptTimeout")return lc.debug(t,"Timeout during extractPrompt"),{type:"abortedBeforeIssued",reason:"Timeout",telemetryData:zd(n,t)};if(g.prompt.prefix.length===0&&g.prompt.suffix.length===0)return lc.debug(t,"Error empty prompt"),{type:"abortedBeforeIssued",reason:"Empty prompt",telemetryData:zd(n,t)};let A=mKo(t,m,n);return A>0&&(lc.debug(t,`Debouncing ghost text request for ${A}ms`),await CT(A),ETe(t,r,o))?{type:"abortedBeforeIssued",reason:"cancelled after debounce",telemetryData:zd(n,t)}:t.get(Xs).withProgress(async()=>{let[E]=C7(e.textDocument.getText(vc.range(vc.position(0,0),e.position))),_=t.get(HC).hasAcceptedCurrentCompletion(E,g.prompt.suffix),v=g.prompt,b=await pKo(t,e,E,g,m.isCycling,p,_,n);u("strategy");let I=AKo(t,E,v,b.requestMultiline);u("cache");let x=m6(t,e.textDocument.uri),R={blockMode:b.blockMode,languageId:e.textDocument.detectedLanguageId,repoInfo:x,engineModelId:h.modelId,ourRequestId:r,prefix:E,prompt:g.prompt,multiline:b.requestMultiline,indentation:tKe(e.textDocument,e.position),isCycling:m.isCycling,headers:h.headers,stop:b.stop,maxTokens:b.maxTokens,afterAccept:_};R.headers={...R.headers,"X-Copilot-Async":"true","X-Copilot-Speculative":m.isSpeculative?"true":"false"};let w=xKo(t,e.textDocument,R,e.position,g,n,h,m);if(I===void 0&&!m.isCycling&&t.get(GC).shouldWaitForAsyncCompletions(E,g.prompt)){let F=await t.get(GC).getFirstMatchingRequestWithTimeout(r,E,g.prompt,m.isSpeculative,w);if(u("asyncWait"),F){let U=!b.requestMultiline;I=[[c$t(F[0],{forceSingleLine:U})],4]}if(ETe(t,r,o))return lc.debug(t,"Cancelled before requesting a new completion"),{type:"abortedBeforeIssued",reason:"Cancelled after waiting for async completion",telemetryData:zd(w,t)}}let P=b.blockMode==="moremultiline"&&jP.isSupported(e.textDocument.detectedLanguageId);if(I!==void 0&&(I[0]=I[0].map(F=>yTe(t,e.textDocument,e.position,F,P,lc)).filter(F=>F!==void 0)),I!==void 0&&I[0].length===0)return lc.debug(t,`Found empty inline suggestions locally via ${Tae(I[1])}`),{type:"empty",reason:"cached results empty after post-processing",telemetryData:zd(w,t)};if(I!==void 0&&I[0].length>0&&(!m.isCycling||I[0].length>1))lc.debug(t,`Found inline suggestions locally via ${Tae(I[1])}`);else{if(m.isCycling){let F=await fKo(t,R,w,o,b.finishedCb);if(F.type==="success"){let U=I?.[0]??[];F.value[0].forEach(L=>{U.findIndex(H=>H.completionText.trim()===L.completionText.trim())===-1&&U.push(L)}),I=[U,3]}else if(I===void 0)return F}else{let F=a(($,W)=>(t.get(GC).updateCompletion(r,$),b.finishedCb($,W)),"finishedCb"),U=new _n.CancellationTokenSource,L=dKo(t,R,w,U.token,F);t.get(GC).queueCompletionRequest(r,E,g.prompt,U,L);let H=await t.get(GC).getFirstMatchingRequest(r,E,g.prompt,m.isSpeculative);if(H===void 0)return{type:"empty",reason:"received no results from async completions",telemetryData:zd(w,t)};I=[[H[0]],4]}u("network")}if(I===void 0)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:zd(w,t)};let[k,Q]=I,M=k.map(F=>yTe(t,e.textDocument,e.position,F,P,lc)).filter(F=>F!==void 0),D=vr(t,tt.CompletionsDelay)??d.completionsDelay(n),G=Ac()-n.issuedTime,O=Math.max(D-G,0);if(Q!==2&&!m.isCycling&&O>0&&(lc.debug(t,`Waiting ${O}ms before returning completion`),await CT(O),ETe(t,r,o)))return lc.debug(t,"Cancelled after completions delay"),{type:"canceled",reason:"after completions delay",telemetryData:l7(w)};let N=[];for(let F of M){let U=IKo(t,e.textDocument,R,F,w),L=p?ISn(e.textDocument,e.position,F):0,$={completion:bKo(F.choiceIndex,F.completionText,g.trailingWs),telemetry:U,isMiddleOfTheLine:p,suffixCoverage:L,copilotAnnotations:F.copilotAnnotations,clientCompletionId:F.clientCompletionId};N.push($)}return w.properties.clientCompletionId=N[0]?.clientCompletionId,w.measurements.foundOffset=N?.[0]?.telemetry?.measurements?.foundOffset??-1,lc.debug(t,`Produced ${N.length} results from ${Tae(Q)} at ${w.measurements.foundOffset} offset`),ETe(t,r,o)?{type:"canceled",reason:"after post processing completions",telemetryData:l7(w)}:(m.isSpeculative||t.get(HC).setGhostText(E,g.prompt.suffix,M,Q),u("complete"),{type:"success",value:[N,Q],telemetryData:zd(w,t),telemetryBlob:w,resultType:Q,performanceMetrics:l})})}a(gKo,"getGhostTextWithoutAbortHandling");async function l$t(t,e,r,n){let o=yr();t.get(HC).currentRequestId=o;let s=await SKo(t,e.textDocument,o,n);await nye.catch(()=>{});try{return t.get(jC).schedule(e,o,n?.opportunityId??"",s,r,n),t.get(ON).notifyRequest(e,o,s,r,n),await gKo(t,e,o,s,r,n)}catch(c){if(ep(c))return{type:"canceled",reason:"aborted at unknown location",telemetryData:l7(s,{cancelledNetworkRequest:!0})};throw c}}a(l$t,"getGhostText");function AKo(t,e,r,n){let o=t.get(HC).getCompletionsForUserTyping(e,r.suffix),s=TKo(t,e,r.suffix,n);if(o&&o.length>0){let c=(s??[]).filter(l=>!o.some(u=>u.completionText===l.completionText));return[o.concat(c),2]}if(s&&s.length>0)return[s,1]}a(AKo,"getLocalInlineSuggestion");function yKo(t,e){let r=EKo(e,t),n=CKo(e,t);return r&&!n?void 0:r&&n}a(yKo,"isInlineSuggestion");function EKo(t,e){return e.lineAt(t).text.substr(t.character).trim().length!=0}a(EKo,"isMiddleOfTheLine");function CKo(t,e){let n=e.lineAt(t).text.substr(t.character).trim();return/^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(n)}a(CKo,"isValidMiddleOfTheLinePosition");function _Ko(t,e){return e.lineAt(t).text.trim().length===0}a(_Ko,"isNewLine");var F4=class t{constructor(e=!1){this.requestMultilineOverride=e}static{a(this,"ForceMultiLine")}static{this.default=new t}};async function vKo(t,e,r,n,o,s,c){if(t.get(F4).requestMultilineOverride)return{requestMultiline:!0};if(r.lineCount>=8e3)at(t,"ghostText.longFileMultilineSkip",yt.createAndMarkAsIssued({languageId:r.detectedLanguageId,lineCount:String(r.lineCount),currentLine:String(n.line)}));else{if(e=="moremultiline"&&jP.isSupported(r.detectedLanguageId))return s?{requestMultiline:!0,blockPosition:await k6r(r,n)}:{requestMultiline:!1};if(["typescript","typescriptreact"].includes(r.detectedLanguageId)&&_Ko(n,r))return{requestMultiline:!0};let u=!1;return!o&&F1(r.detectedLanguageId)?u=await eKe(r,n):o&&F1(r.detectedLanguageId)&&(u=await eKe(r,n)||await eKe(r,r.lineAt(n).range.end)),u||["javascript","javascriptreact","python"].includes(r.detectedLanguageId)&&(u=Evn(c.prompt,r.detectedLanguageId)>.5),{requestMultiline:u}}return{requestMultiline:!1}}a(vKo,"shouldRequestMultiline");function UJe(t,e,r){t.get(Bw).append(e.prefix,e.prompt.suffix,r)}a(UJe,"appendToCache");function bKo(t,e,r){if(r.length>0){if(e.startsWith(r))return{completionIndex:t,completionText:e,displayText:e.substring(r.length),displayNeedsWsOffset:!1};{let n=e.substring(0,e.length-e.trimStart().length);return r.startsWith(n)?{completionIndex:t,completionText:e,displayText:e.trimStart(),displayNeedsWsOffset:!0}:{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}}else return{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}a(bKo,"adjustLeadingWhitespace");function TKo(t,e,r,n){let o=t.get(Bw).findAll(e,r);return o.length===0?(lc.debug(t,"Found no completions in cache"),[]):(lc.debug(t,`Found ${o.length} completions in cache`),o.map(s=>c$t(s,{forceSingleLine:!n})))}a(TKo,"getCompletionsFromCache");async function SKo(t,e,r,n){let o={headerRequestId:r};n?.opportunityId&&(o.opportunityId=n.opportunityId),n?.selectedCompletionInfo?.text&&(o.completionsActive="true"),n?.isSpeculative&&(o.reason="speculative");let s=yt.createAndMarkAsIssued(o);return await t.get(jt).fetchTokenAndUpdateExPValuesAndAssignments({uri:e.uri,languageId:e.detectedLanguageId},s)}a(SKo,"createTelemetryWithExp");function IKo(t,e,r,n,o){let s=n.requestId,c={choiceIndex:n.choiceIndex.toString(),clientCompletionId:n.clientCompletionId};n.generatedChoiceIndex!==void 0&&(c.originalChoiceIndex=c.choiceIndex,c.choiceIndex=(1e4*(n.generatedChoiceIndex+1)+n.choiceIndex).toString());let l={compCharLen:n.completionText.length,numLines:n.completionText.trim().split(` -`).length};n.meanLogProb&&(l.meanLogProb=n.meanLogProb),n.meanAlternativeLogProb&&(l.meanAlternativeLogProb=n.meanAlternativeLogProb);let u=n.telemetryData.extendedBy(c,l);return u.issuedTime=o.issuedTime,u.measurements.timeToProduceMs=performance.now()-o.issuedTime,NSn(u,e),u.extendWithRequestId(s),u.measurements.confidence=TSn(t,u),u.measurements.quantile=SSn(t,u),lc.debug(t,`Extended telemetry for ${n.telemetryData.properties.headerRequestId} with retention confidence ${u.measurements.confidence} (expected as good or better than about ${u.measurements.quantile} of all suggestions)`),u}a(IKo,"telemetryWithAddData");function xKo(t,e,r,n,o,s,c,l){let u={languageId:e.detectedLanguageId};u.afterAccept=r.afterAccept.toString(),u.isSpeculative=l.isSpeculative.toString();let d=s.extendedBy(u);NSn(d,e);let p=r.repoInfo;d.properties.gitRepoInformation=p===void 0?"unavailable":p===0?"pending":"available",p!==void 0&&p!==0&&(d.properties.gitRepoUrl=p.url,d.properties.gitRepoHost=p.hostname,d.properties.gitRepoOwner=p.owner,d.properties.gitRepoName=p.repo,d.properties.gitRepoPath=p.pathname),d.properties.engineName=c.modelId,d.properties.engineChoiceSource=c.engineChoiceSource,d.properties.isMultiline=JSON.stringify(r.multiline),d.properties.isCycling=JSON.stringify(r.isCycling);let h=e.lineAt(n.line),m=e.getText(vc.range(h.range.start,n)),g=e.getText(vc.range(n,h.range.end)),A=Array.from(o.neighborSource.entries()).map(v=>[v[0],v[1].map(b=>(0,PSn.SHA256)(b).toString())]),y={beforeCursorWhitespace:JSON.stringify(m.trim()===""),afterCursorWhitespace:JSON.stringify(g.trim()===""),neighborSource:JSON.stringify(A),blockMode:r.blockMode},E={...$Z(o.prompt),promptEndPos:e.offsetAt(n),promptComputeTimeMs:o.computeTimeMs};o.metadata&&(y.promptMetadata=JSON.stringify(o.metadata)),o.contextProvidersTelemetry&&(y.contextProviders=JSON.stringify(o.contextProvidersTelemetry));let _=d.extendedBy(y,E);return at(t,"ghostText.issued",_),d}a(xKo,"telemetryIssued");function NSn(t,e){t.measurements.documentLength=e.getText().length,t.measurements.documentLineCount=e.lineCount}a(NSn,"addDocumentTelemetry");function DSn(t,e,r,n,o){let s=Date.now()-n,c=s-o,l=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:s,processingTimeMs:o,deltaMs:c,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN});l.extendWithRequestId(r.requestId),at(t,`ghostText.${e}`,l)}a(DSn,"telemetryPerformance");f();f();var ez=class{constructor(e,r,n){this._referenceCount=0;this._isDisposed=!1;this._offset=n;let o=e.get(zr);this._tracker=o.onDidChangeTextDocument(s=>{if(s.document.uri===r){for(let c of s.contentChanges)if(c.rangeOffset+c.rangeLength<=this.offset){let l=c.text.length-c.rangeLength;this._offset=this._offset+l}}})}static{a(this,"ChangeTracker")}get offset(){return this._offset}push(e,r){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout(()=>{e(),this._referenceCount--,this._referenceCount===0&&(this._tracker.dispose(),this._isDisposed=!0)},r)}};f();var qv=class{static{a(this,"CitationManager")}},QJe=class extends qv{static{a(this,"NoOpCitationManager")}async handleIPCodeCitation(e,r){}};f();var u$t=class t{constructor(e,r,n=[],o,s,c){this._textDocument=e;this._position=r;this.originalPosition=o??_n.Position.create(r.line,r.character),this.originalVersion=s??e.version,this.originalOffset=c??e.offsetAt(this.originalPosition),this._editsWithPosition=[...n]}static{a(this,"CompletionState")}get textDocument(){return this._textDocument}get position(){return this._position}get editsWithPosition(){return[...this._editsWithPosition]}updateState(e,r,n){return new t(e,r,n??this.editsWithPosition,this.originalPosition,this.originalVersion,this.originalOffset)}updatePosition(e){return this.updateState(this._textDocument,e)}addSelectedCompletionInfo(e){if(this.editsWithPosition.find(n=>n.source==="selectedCompletionInfo"))throw new Error("Selected completion info already applied");let r={range:e.range,newText:e.text};return this.applyEdits([r],!0)}applyEdits(e,r=!1){if(r&&e.length>1)throw new Error("Selected completion info should be a single edit");let n=this._textDocument,o=this._position,s=n.offsetAt(o),c=this.editsWithPosition;for(let{range:l,newText:u}of e){let d=n.getText(l),p=n.offsetAt(l.end);if(n=n.applyEdits([{range:l,newText:u}]),s{let v=GJe.indexOf(_);v!==-1&&GJe.splice(v,1)}}a(t,"subscribe");function e(){for(let _ of GJe)_()}a(e,"afterUpdateConnection");function r(_){jw.connection!==_&&(jw.connection=_,e())}a(r,"updateConnection");function n(){return jw.connection==="connected"}a(n,"isConnected");function o(){return jw.connection==="disconnected"}a(o,"isDisconnected");function s(){return jw.connection==="retry"}a(s,"isRetrying");function c(){return jw.connection==="disabled"}a(c,"isDisabled");function l(){r("connected"),h(!1)}a(l,"setConnected");function u(){r("disconnected")}a(u,"setDisconnected");function d(){r("retry")}a(d,"setRetrying");function p(){r("disabled")}a(p,"setDisabled");function h(_){jw.initialWait!==_&&(jw.initialWait=_)}a(h,"setInitialWait");function m(_,v=wKo){s()||(d(),h(!0),A(_,v))}a(m,"enableRetry");function g(){return jw.initialWait}a(g,"isInitialWait");async function A(_,v){VC.info(_,`Attempting to reconnect in ${v}ms.`),await y(v),h(!1);let b=_.get(dr);function I(x,R){if(x>OSn){VC.info(R,"Max retry time reached, disabling."),p();return}let w=a(async()=>{jw.retryAttempts=Math.min(jw.retryAttempts+1,BSn);try{VC.info(R,`Pinging service after ${x} second(s)`);let P=await b.fetch(new URL("_ping",zX(R)["origin-tracker"]).href,{method:"GET",headers:{"content-type":"application/json"}});if(P.status!==200||!P.ok)I(x**2,R);else{VC.info(R,"Successfully reconnected."),l();return}}catch{I(x**2,R)}},"tryAgain");setTimeout(()=>{w()},x*1e3)}a(I,"succeedOrRetry"),VC.info(_,"Attempting to reconnect."),I(d$t,_)}a(A,"attemptToPing");let y=a(_=>new Promise(v=>setTimeout(v,_)),"timeout");function E(_){return{dispose:t(_)}}return a(E,"listen"),qJe={setConnected:l,setDisconnected:u,setRetrying:d,setDisabled:p,enableRetry:m,listen:E,isConnected:n,isDisconnected:o,isRetrying:s,isDisabled:c,isInitialWait:g},qJe}a(RKo,"registerConnectionState");var rz=RKo();f();var Oh={BadArguments:"BadArgumentsError",Unauthorized:"NotAuthorized",NotFound:"NotFoundError",RateLimit:"RateLimitError",InternalError:"InternalError",ConnectionError:"ConnectionError",Unknown:"UnknownError"},CTe={[Oh.Unauthorized]:"Invalid GitHub token. Please sign out from your GitHub account using VSCode UI and try again",[Oh.InternalError]:"Internal error: matches to public code will not be detected. It is advised to disable Copilot completions until the service is reconnected.",[Oh.RateLimit]:"You've reached your quota and limit, code matching will be unavailable until the limit resets"};function f$t(t){return t===401?Oh.Unauthorized:t===400?Oh.BadArguments:t===404?Oh.NotFound:t===429?Oh.RateLimit:t>=500&&t<600?Oh.InternalError:t>=600?Oh.ConnectionError:Oh.Unknown}a(f$t,"getErrorType");function XN(t,e,r={}){return{kind:"failure",reason:f$t(Number(t)),code:Number(t),msg:e,meta:r}}a(XN,"createErrorResponse");f();var PKo=/^[1-6][0-9][0-9]$/,kKo=/([A-Z][a-z]+)/,NKo="code_referencing",_Te=class{constructor(e){this.baseKey=e}static{a(this,"CodeQuoteTelemetry")}buildKey(...e){return[NKo,this.baseKey,...e].join(".")}},p$t=class extends _Te{static{a(this,"CopilotOutputLogTelemetry")}constructor(){super("github_copilot_log")}handleOpen({context:e}){let r=this.buildKey("open","count"),n=yt.createAndMarkAsIssued();at(e,r,n)}handleFocus({context:e}){let r=yt.createAndMarkAsIssued(),n=this.buildKey("focus","count");at(e,n,r)}handleWrite({context:e}){let r=yt.createAndMarkAsIssued(),n=this.buildKey("write","count");at(e,n,r)}},OZu=new p$t,h$t=class extends _Te{static{a(this,"MatchNotificationTelemetry")}constructor(){super("match_notification")}handleDoAction({context:e,actor:r}){let n=yt.createAndMarkAsIssued({actor:r}),o=this.buildKey("acknowledge","count");at(e,o,n)}handleDismiss({context:e,actor:r}){let n=yt.createAndMarkAsIssued({actor:r}),o=this.buildKey("ignore","count");at(e,o,n)}},BZu=new h$t,m$t=class extends _Te{static{a(this,"SnippyTelemetry")}constructor(){super("snippy")}handleUnexpectedError({context:e,origin:r,reason:n}){let o=yt.createAndMarkAsIssued({origin:r,reason:n});Kp(e,this.buildKey("unexpectedError"),o)}handleCompletionMissing({context:e,origin:r,reason:n}){let o=yt.createAndMarkAsIssued({origin:r,reason:n});Kp(e,this.buildKey("completionMissing"),o)}handleSnippyNetworkError({context:e,origin:r,reason:n,message:o}){if(!r.match(PKo)){VC.debug(e,"Invalid status code, not sending telemetry",{origin:r});return}let s=n.split(kKo).filter(l=>!!l).join("_").toLowerCase(),c=yt.createAndMarkAsIssued({message:o});Kp(e,this.buildKey(s,r),c)}},HJe=new m$t;var DKo="twirp/github.snippy.v1.SnippyAPI";async function g$t(t,e,r,n){let o;try{o=await t.get(Ot).getToken()}catch{return rz.setDisconnected(),XN(401,CTe[Oh.Unauthorized])}if(VC.info(t,`Calling ${e}`),rz.isRetrying())return XN(600,"Attempting to reconnect to the public code matching service.");if(rz.isDisconnected())return XN(601,"The public code matching service is offline.");let s;try{s=await t.get(dr).fetch(L2(t,o,"origin-tracker",`${DKo}/${e}`),{method:r.method,body:r.method==="POST"?JSON.stringify(r.body):void 0,headers:{"content-type":"application/json",authorization:`Bearer ${o.token}`,...mE(t)},signal:n})}catch{return rz.enableRetry(t),XN(602,"Network error detected. Check your internet connection.")}let c;try{c=await s.json()}catch(A){let y=A.message;throw HJe.handleUnexpectedError({context:t,origin:"snippyNetwork",reason:y}),A}if(s.ok)return{kind:"success",...c};let l={...c,code:Number(s.status)},{code:u,msg:d,meta:p}=l,h=Number(u),m=f$t(h),g=d||"unknown error";switch(m){case Oh.Unauthorized:return XN(u,CTe[Oh.Unauthorized],p);case Oh.BadArguments:return XN(u,g,p);case Oh.RateLimit:return rz.enableRetry(t,60*1e3),XN(u,CTe.RateLimitError,p);case Oh.InternalError:return rz.enableRetry(t),XN(u,CTe[Oh.InternalError],p);default:return XN(u,g,p)}}a(g$t,"call");f();var jJe=S.Object({kind:S.Literal("failure"),reason:S.String(),code:S.Number(),msg:S.String(),meta:S.Optional(S.Any())}),OKo=S.Object({matched_source:S.String(),occurrences:S.String(),capped:S.Boolean(),cursor:S.String(),github_url:S.String()}),LSn=S.Object({source:S.String()}),BKo=S.Object({snippets:S.Array(OKo)}),FSn=S.Union([BKo,jJe]),USn=S.Object({cursor:S.String()}),LKo=S.Object({commit_id:S.String(),license:S.String(),nwo:S.String(),path:S.String(),url:S.String()}),FKo=S.Object({has_next_page:S.Boolean(),cursor:S.String()}),UKo=S.Object({count:S.Record(S.String(),S.String())}),QKo=S.Object({file_matches:S.Array(LKo),page_info:FKo,license_stats:UKo}),QSn=S.Union([QKo,jJe]);async function qSn(t,e,r){let n=await g$t(t,"Match",{method:"POST",body:Uj(LSn,{source:e})},r);return Uj(FSn,n)}a(qSn,"Match");async function GSn(t,{cursor:e},r){let n=await g$t(t,"FilesForMatch",{method:"POST",body:Uj(USn,{cursor:e})},r);return Uj(QSn,n)}a(GSn,"FilesForMatch");f();var vTe=new RegExp("[_\\p{L}\\p{Nd}]+|====+|----+|####+|////+|\\*\\*\\*\\*+|[\\p{P}\\p{S}]","gu"),$Je=65;function HKo(t){let e=0,r;vTe.lastIndex=0;do if(r=vTe.exec(t),r&&(e+=1),e>=$Je)break;while(r);return e}a(HKo,"lexemeLength");function jKo(t,e){let r=0,n;vTe.lastIndex=0;do if(n=vTe.exec(t),n&&(r+=1,r>=e))return vTe.lastIndex;while(n);return t.length}a(jKo,"offsetFirstLexemes");function HSn(t,e){let r=t.split("").reverse().join(""),n=jKo(r,e);return r.length-n}a(HSn,"offsetLastLexemes");function bTe(t){return HKo(t)>=$Je}a(bTe,"hasMinLexemeLength");function VKo(t){return GP.Check(jJe,t)}a(VKo,"isError");async function jSn(t,e){let r=await e();if(VKo(r)){HJe.handleSnippyNetworkError({context:t,origin:String(r.code),reason:r.reason,message:r.msg});return}return r}a(jSn,"snippyRequest");function $Sn(t){return"kind"in t&&t.kind==="failure"}a($Sn,"isMatchError");async function VSn(t,e,r,n){let s=await t.get(zr).getTextDocument({uri:e});if(!s){VC.debug(t,`Expected document matching ${e}, got nothing.`);return}let c=s.getText();if(!bTe(c)||!bTe(c))return;let l=r;if(!bTe(r)){let g=c.slice(0,n),A=HSn(g,$Je);l=c.slice(A,n+r.length)}if(!bTe(l))return;let u=await jSn(t,()=>qSn(t,l));if(!u||$Sn(u)||!u.snippets.length){VC.info(t,"No match found");return}VC.info(t,"Match found");let{snippets:d}=u,p=d.map(async g=>{let A=await jSn(t,()=>GSn(t,{cursor:g.cursor}));if(!A||$Sn(A))return;let y=A.file_matches,E=A.license_stats;return{match:g,files:y,licenseStats:E}}),m=(await Promise.all(p)).filter(g=>g!==void 0);if(m.length)for(let g of m){let A=new Set(Object.keys(g.licenseStats?.count??{}));A.has("NOASSERTION")&&(A.delete("NOASSERTION"),A.add("unknown"));let y=Array.from(A).sort(),E=n,_=n+g.match.matched_source.length,v=s.positionAt(E),b=s.positionAt(_);await t.get(qv).handleIPCodeCitation(t,{inDocumentUri:e,offsetStart:E,offsetEnd:_,version:s.version,location:{start:v,end:b},matchingText:l,details:y.map(I=>({license:I,url:g.match.github_url}))})}}a(VSn,"fetchCitations");f();function A$t(t,e,r=(n,o)=>n===o?0:1){if(e.length===0||t.length===0)return{distance:e.length,startOffset:0,endOffset:0};let n=new Array(e.length+1).fill(0),o=new Array(e.length+1).fill(0),s=new Array(t.length+1).fill(0),c=new Array(t.length+1).fill(0),l=e[0];for(let d=0;d0?d-1:0;for(let d=1;d(l[l.Word=0]="Word",l[l.Space=1]="Space",l[l.Other=2]="Other"))(r||={});let n=0;for(let o of t){let s;new RegExp("(\\p{L}|\\p{Nd}|_)","u").test(o)?s=0:o===" "?s=1:s=2,s===n&&s!==2?e+=o:(e.length>0&&(yield e),e=o,n=s)}e.length>0&&(yield e)}a(YKo,"lexGeneratorWords");function WSn(t,e,r,n){let o=[],s=0;for(let c of r(t))n(c)&&(e.has(c)||e.set(c,e.size),o.push([e.get(c),s])),s+=c.length;return[o,e]}a(WSn,"lexicalAnalyzer");function zSn(t){return t!==" "}a(zSn,"notSingleSpace");function YSn(t,e,r=YKo){let[n,o]=WSn(t,WKo(),r,zSn),[s,c]=WSn(e,o,r,zSn);if(s.length===0||n.length===0)return{lexDistance:s.length,startOffset:0,endOffset:0,haystackLexLength:n.length,needleLexLength:s.length};let l=zKo(c),u=s.length,d=l[s[0][0]],p=l[s[u-1][0]];function h(y,E,_,v){if(v===0||v===u-1){let b=l[n[_][0]];return v==0&&b.endsWith(d)||v==u-1&&b.startsWith(p)?0:1}else return y===E?0:1}a(h,"compare");let m=A$t(n.map(y=>y[0]),s.map(y=>y[0]),h),g=n[m.startOffset][1],A=m.endOffset0&&t[A-1]===" "&&--A,{lexDistance:m.distance,startOffset:g,endOffset:A,haystackLexLength:n.length,needleLexLength:s.length}}a(YSn,"lexEditDistance");f();function _7(t){return t.length===0?0:t.split(` -`).length}a(_7,"countLines");function KSn(t,e){return e.compType==="partial"?t.substring(0,e.acceptedLength):t}a(KSn,"computeCompletionText");var v7=new Se("postInsertion"),JSn=[{seconds:15,captureCode:!1,captureRejection:!1},{seconds:30,captureCode:!0,captureRejection:!0},{seconds:120,captureCode:!1,captureRejection:!1},{seconds:300,captureCode:!1,captureRejection:!1},{seconds:600,captureCode:!1,captureRejection:!1}],XSn=50,KKo=1500,JKo=.5,XKo=500,y$t={triggerPostInsertionSynchroneously:!1,captureCode:!1,captureRejection:!1};async function ZSn(t,e,r,n,o){let s=await t.get(In).getOrReadTextDocumentWithFakeClientProperties({uri:e});if(s.status!=="valid")return v7.info(t,`Could not get document for ${e}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1},capturedCode:"",terminationOffset:0};let c=s.document,l=c.getText(),u=l.substring(0,n),d=c.positionAt(n),p=await Kae(t,r.properties.headerRequestId,tz(c,d),r),h=p.type==="prompt"?p.prompt:{prefix:u,suffix:"",isFimEnabled:!1};if(h.isFimEnabled&&o!==void 0){let m=l.substring(n,o);return h.suffix=l.substring(o),{prompt:h,capturedCode:m,terminationOffset:0}}else{let m=l.substring(n),g=UHt(u,n,c.detectedLanguageId),y=jvn(g,void 0)(m),E=Math.min(l.length,n+(y?y*2:XKo)),_=l.substring(n,E);return{prompt:h,capturedCode:_,terminationOffset:y??-1}}}a(ZSn,"captureCode");function VJe(t,e,r,n,o){o.forEach(({completionText:u,completionTelemetryData:d})=>{v7.debug(t,`${e}.rejected choiceIndex: ${d.properties.choiceIndex}`),_vn(t,e,d)});let s=new ez(t,n,r-1),c=new ez(t,n,r),l=a(async u=>{v7.debug(t,`Original offset: ${r}, Tracked offset: ${s.offset}`);let{completionTelemetryData:d}=o[0],{prompt:p,capturedCode:h,terminationOffset:m}=await ZSn(t,n,d,s.offset+1,c.offset),g={hypotheticalPromptJson:JSON.stringify({prefix:p.prefix,context:p.context}),hypotheticalPromptSuffixJson:JSON.stringify(p.suffix)},A=d.extendedBy({...g,capturedCodeJson:JSON.stringify(h)},{timeout:u.seconds,insertionOffset:r,trackedOffset:s.offset,terminationOffsetInCapturedCode:m});v7.debug(t,`${e}.capturedAfterRejected choiceIndex: ${d.properties.choiceIndex}`,A),at(t,e+".capturedAfterRejected",A,1)},"checkInCode");JSn.filter(u=>u.captureRejection).map(u=>s.push($p(t,()=>l(u),"postRejectionTasks"),u.seconds*1e3))}a(VJe,"postRejectionTasks");function TTe(t,e,r,n,o,s,c,l){let u=s.extendedBy({compType:c.compType},{compCharLen:c.acceptedLength,numLines:c.acceptedLines});v7.debug(t,`${e}.accepted choiceIndex: ${u.properties.choiceIndex}`),Cvn(t,e,u);let d=r;r=KSn(r,c);let p=r.trim(),h=new ez(t,o,n),m=new ez(t,o,n+r.length),g=a(async A=>{await rJo(t,e,p,n,o,A,u,h,m)},"stillInCodeCheck");if(y$t.triggerPostInsertionSynchroneously&&q_(t)){let A=g({seconds:0,captureCode:y$t.captureCode,captureRejection:y$t.captureRejection});t.get(gu).register(A)}else JSn.map(A=>h.push($p(t,()=>g(A),"postInsertionTasks"),A.seconds*1e3));$p(t,ZKo,"post insertion citation check")(t,o,d,r,n,l)}a(TTe,"postInsertionTasks");async function ZKo(t,e,r,n,o,s){if(!s||(s.ip_code_citations?.length??0)<1){if(cL(t)?.getTokenValue("sn")==="1")return;await VSn(t,e,n,o);return}let c=await t.get(zr).getTextDocument({uri:e});if(c){let l=E$t(c.getText(),n,XSn,o);l.stillInCodeHeuristic&&(o=l.foundOffset)}for(let l of s.ip_code_citations){let u=eJo(r.length,n.length,l.start_offset);if(u===void 0){v7.info(t,`Full completion for ${e} contains a reference matching public code, but the partially inserted text did not include the match.`);continue}let d=o+u,p=c?.positionAt(d),h=o+tJo(r.length,n.length,l.stop_offset),m=c?.positionAt(h),g=p&&m?c?.getText({start:p,end:m}):"";await t.get(qv).handleIPCodeCitation(t,{inDocumentUri:e,offsetStart:d,offsetEnd:h,version:c?.version,location:p&&m?{start:p,end:m}:void 0,matchingText:g,details:l.details.citations})}}a(ZKo,"citationCheck");function eJo(t,e,r){if(!(ee))return r}a(eJo,"computeCitationStart");function tJo(t,e,r){return e{if(r.displayText&&r.telemetry){let n,o;t.partiallyAcceptedLength?(n=r.displayText.substring(t.partiallyAcceptedLength-1),o=r.telemetry.extendedBy({compType:"partial"},{compCharLen:n.length})):(n=r.displayText,o=r.telemetry);let s={completionText:n,completionTelemetryData:o,offset:r.offset};e.push(s)}}),e}a(oJo,"computeRejectedCompletions");function C$t(t,e){let r=t.get(jm);if(!r.position||!r.uri)return;let n=oJo(r);n.length>0&&VJe(t,"ghostText",e??n[0].offset,r.uri,n),r.resetState(),r.resetPartialAcceptanceState()}a(C$t,"rejectLastShown");function eIn(t,e,r,n){let o=t.get(jm);return o.position&&o.uri&&!(o.position.line===r.line&&o.position.character===r.character&&o.uri.toString()===e.uri.toString())&&n!==2&&C$t(t,e.offsetAt(o.position)),o.setState(e,r),o.index}a(eIn,"setLastShown");function tIn(t,e){let r=t.get(jm);if(r.index=e.index,!r.shownCompletions.find(n=>n.index===e.index)&&(e.uri===r.uri&&r.position?.line===e.position.line&&r.position?.character==e.position.character&&r.shownCompletions.push(e),e.displayText)){let n=e.resultType!==0;iJo.debug(t,`[${e.telemetry.properties.headerRequestId}] shown choiceIndex: ${e.telemetry.properties.choiceIndex}, fromCache ${n}`),e.telemetry.measurements.compCharLen=e.displayText.length,jYe(t,"ghostText",e)}}a(tIn,"handleGhostTextShown");function sJo(t,e,r){let n=t.get(jm);n.linesLeft===void 0&&(n.linesAccepted=_7(e.insertText.substring(0,r)),n.linesLeft=_7(e.displayText));let o=_7(e.displayText);n.linesLeft>o&&(n.linesAccepted+=n.linesLeft-o,n.lastLineAcceptedLength=n.partiallyAcceptedLength,n.linesLeft=o),n.partiallyAcceptedLength=(n.lastLineAcceptedLength||0)+r}a(sJo,"handleLineAcceptance");function Xae(t,e,r="ghostText"){let n=t.get(jm),o;return n.partiallyAcceptedLength?o={compType:"full",acceptedLength:(n.partiallyAcceptedLength||0)+e.displayText.length,acceptedLines:n.linesAccepted+(n.linesLeft??0)}:o={compType:"full",acceptedLength:e.displayText.length,acceptedLines:_7(e.displayText)},n.resetState(),TTe(t,r,e.displayText,e.offset,e.uri,e.telemetry,o,e.copilotAnnotations)}a(Xae,"handleGhostTextPostInsert");function WJe(t,e,r,n=0,o="ghostText",s="line"){let c=t.get(jm),l;return s==="cumulative"?(aJo(t,e,r),l={compType:c.totalLength!=null?"full":"partial",acceptedLength:c.totalLength??(c.partiallyAcceptedLength||0),acceptedLines:c.linesAccepted},l.compType==="full"&&c.resetState()):(sJo(t,e,r),l={compType:"partial",acceptedLength:c.partiallyAcceptedLength||0,acceptedLines:c.linesAccepted}),TTe(t,o,e.displayText,e.offset,e.uri,e.telemetry,l,e.copilotAnnotations)}a(WJe,"handlePartialGhostTextPostInsert");function aJo(t,e,r){let n=t.get(jm);n.partiallyAcceptedLength=(n.partiallyAcceptedLength||0)+r,n.linesAccepted=_7(e.insertText.substring(0,n.partiallyAcceptedLength)),n.partiallyAcceptedLength>=e.insertText.length&&(n.totalLength=n.partiallyAcceptedLength)}a(aJo,"handleCumulativeAcceptance");f();var ZN=new Map;ZN.set("copilot",{app:"copilot-client",catalog_service:"CopilotCompletionsVSCode"});ZN.set("copilot-intellij",{app:"copilot-intellij",catalog_service:"CopilotIntelliJ"});ZN.set("copilot-xcode",{app:"copilot-xcode",catalog_service:"CopilotXcode"});ZN.set("copilot-eclipse",{app:"copilot-eclipse",catalog_service:"CopilotEclipse"});ZN.set("copilot.vim",{app:"copilot-vim",catalog_service:"CopilotVim"});ZN.set("copilot-vs",{app:"copilot-vs",catalog_service:"CopilotVS"});var cJo=new Se("sdk");function zJe(t,e){ZN.has(t.get(Nr).getEditorPluginInfo().name)||cJo.warn(t,...e)}a(zJe,"deprecationWarning");var mgi=de(J8()),Ib=de(Fx());f();f();f();f();var _$t={NewGitHubLogin:"auth.new_github_login",GitHubLoginResult:"auth.github_login_result"};function Zae(t,e){let r=yt.createAndMarkAsIssued({authType:e});at(t,_$t.NewGitHubLogin,r),yi(t,_$t.NewGitHubLogin,{authType:e})}a(Zae,"telemetryNewGitHubLogin");function $w(t,e,r,n,o){_u(t,_$t.GitHubLoginResult,o,{authType:e,authStatus:r},{totalTimeMs:n})}a($w,"telemetryGitHubLoginResult");var rIn=["repo","workflow"],v$t=class extends no{static{a(this,"DeviceFlowError")}constructor(e){super(e.error_description),this.code=e.error,this.uri=e.error_uri,this.name="DeviceFlowError"}};async function lJo(t,e,{serverUrl:r}){let n={method:"POST",headers:{Accept:"application/json",...mE(t)},json:{client_id:e,scope:rIn.join(" ")},timeout:3e4},o,s=new URL("login/device/code",r).href;try{o=await t.get(dr).fetch(s,n)}catch(c){throw c instanceof Error&&Pb(c)?new no(`Could not log in with device flow on ${r}: ${c.message}`):c}if(!o.ok)throw new no(`Could not log in with device flow on ${r}: HTTP ${o.status}`);return await o.json()}a(lJo,"requestDeviceFlowStage1");async function uJo(t,e,r,{serverUrl:n}){let o={method:"POST",headers:{Accept:"application/json",...mE(t)},json:{client_id:r,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4},s=await t.get(dr).fetch(new URL("login/oauth/access_token",n).href,o),c=await s.json();if(c.access_token||c.error==="authorization_pending"||c.error==="slow_down")return c;throw c.error&&c.error_description?new v$t(c):new no(`Unexpected ${s.status} response from device flow: ${JSON.stringify(c)}`)}a(uJo,"requestDeviceFlowStage2");async function dJo(t,e){let n=await(await mu(t,e,"user",{headers:{Accept:"application/json"}})).json();if("errors"in n)throw new no(`Error retrieving user information: ${String(n.errors)}`);return n}a(dJo,"requestUserInfo");var Gv=class{constructor(e){this.ctx=e;this.pendingSignIn=void 0}static{a(this,"GitHubDeviceFlow")}get authManager(){return this.ctx.get(en)}async save(e){let r=new URL(e.serverUrl).hostname;return await this.authManager.saveAndActivateSession({oauth_token:e.accessToken,user:e.login,githubAppId:e.githubAppId,authAuthority:r,scopes:e.scopes})}async initiate(e,r){let n=e?.githubAppId??this.ctx.get(qc).findAppIdToAuthenticate();r??=this.authManager.getConfiguredUrls();let o=performance.now(),s=a(()=>performance.now()-o,"getElapsedTimeMs");try{let c=await this.getTokenUnguarded(n,r),l=c.waitForAuth.then(async u=>{this.ctx.get(qc).githubAppId=n;let d=await this.save(u);return $w(this.ctx,"deviceFlow",d.status,s()),d});return l.catch(u=>{$w(this.ctx,"deviceFlow","NotSignedIn",s(),u)}),this.pendingSignIn={verificationUri:c.verification_uri,status:l},c}catch(c){throw $w(this.ctx,"deviceFlow","NotSignedIn",s(),c),this.ctx.get(OE).notifyUser(this.ctx,c),c}}async getTokenUnguarded(e,r){let n=this.ctx;Zae(n,"deviceFlow");let o=await lJo(n,e,r),s=(async()=>{let c=o.expires_in,l=o.interval,u;do{await new Promise(p=>setTimeout(p,1e3*l)),u=await uJo(n,o.device_code,e,r),c-=l;let d=u.access_token;if(d){let p=await dJo(n,{...r,accessToken:d}),h=u.scope?u.scope.split(" ").filter(m=>m.length>0):rIn;return{...r,githubAppId:e,login:p.login,accessToken:d,scopes:h}}l=u.interval??l}while(c>0);throw new no(`Timed out polling for access token. Last response was ${JSON.stringify(u)}`)})();return{...o,waitForAuth:s}}};var b$t=de(Nn());f();var kS=class{constructor(e){this.ctx=e}static{a(this,"AbstractCommand")}};var YJe="github.copilot.finishDeviceFlow",T$t=class extends kS{constructor(){super(...arguments);this.name=YJe;this.arguments=S.Tuple([])}static{a(this,"FinishDeviceFlowCommand")}async handle(r,n){let o=this.ctx.get(Gv),s=o.pendingSignIn;if(!s)throw new b$t.ResponseError(lt.InvalidRequest,"No pending sign in");try{await this.ctx.get(ip).open(s.verificationUri)}catch(c){e1.warn(this.ctx,"Failed to open",s.verificationUri),e1.exception(this.ctx,c,YJe)}try{return await s.status}catch(c){throw new b$t.ResponseError(lt.DeviceFlowFailed,String(c))}finally{o.pendingSignIn=void 0}}},nIn=[T$t];f();f();var Cl=class extends $r{static{a(this,"CopilotCompletionCache")}constructor(e=100){super(e)}};var STe="github.copilot.didAcceptCompletionItem",S$t=class extends kS{constructor(){super(...arguments);this.name=STe;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptCommand")}handle(r,[n]){let s=this.ctx.get(Cl).get(n);return s?(Xae(this.ctx,s),!0):!1}},iIn=[S$t];f();f();f();f();f();f();function oIn(t,e,r){function n(s,c,l){let u=new RegExp(`^(${c})+`,"g");return s.split(` +`],maxTokens:IIn*u};return d==="moremultiline"&&(h.blockMode="moremultiline"),h}return{blockMode:d,requestMultiline:!1,...wIn(t,d,e.textDocument,e.position,p.blockPosition,r,!1,n.prompt,l)}}}}a(hXo,"getGhostTextStrategy");function wIn(t,e,r,n,o,s,c,l,u){if(c&&e==="moremultiline"&&DP.isSupported(r.detectedLanguageId)){let d=o==="empty-block"||o==="block-end"?t.get(Gt).longLookaheadSize(u):t.get(Gt).shortLookaheadSize(u);return{finishedCb:new Kze(t,s,r.detectedLanguageId,!1,d,(h,m)=>{let g={prefix:s+h,prompt:{...l,prefix:l.prefix+h}};WKe(t,g,m)}).getFinishedCallback(),maxTokens:t.get(Gt).maxMultilineTokens(u)}}return{finishedCb:c?Vve(t,r,n):d=>{}}}a(wIn,"buildFinishedCallback");var mXo={isCycling:!1,promptOnly:!1,isSpeculative:!1};function gXo(t,e,r){let n=vr(t,tt.CompletionsDebounce)??t.get(Gt).completionsDebounce(r)??e.debounceMs;if(n===void 0)return 0;let o=fc()-r.issuedTime;return Math.max(0,n-o)}a(gXo,"getRemainingDebounceMs");function gbe(t,e,r){return r?.isCancellationRequested||e!==t.get(k_).currentRequestId}a(gbe,"inlineCompletionRequestCancelled");async function AXo(t,e,r,n,o,s){let c=n.issuedTime,l=[];function u(E){let _=fc();l.push([E,_-c]),c=_}a(u,"recordPerformance"),u("telemetry");let d=t.get(Gt);if(gbe(t,r,o))return{type:"abortedBeforeIssued",reason:"cancelled before extractPrompt",telemetryData:Ud(n,t)};let p=EXo(e.textDocument,e.position);if(p===void 0)return ic.debug(t,"Breaking, invalid middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line",telemetryData:Ud(n,t)};let h=q8(t,n),m={...mXo,...s,tokenizer:h.tokenizer},g=await uae(t,r,e,n,void 0,m);if(u("prompt"),g.type==="copilotContentExclusion")return ic.debug(t,"Copilot not available, due to content exclusion"),{type:"abortedBeforeIssued",reason:"Copilot not available due to content exclusion",telemetryData:Ud(n,t)};if(g.type==="contextTooShort")return ic.debug(t,"Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context",telemetryData:Ud(n,t)};if(g.type==="promptError")return ic.debug(t,"Error while building the prompt"),{type:"abortedBeforeIssued",reason:"Error while building the prompt",telemetryData:Ud(n,t)};if(m.promptOnly)return{type:"promptOnly",reason:"Breaking, promptOnly set to true",prompt:g};if(g.type==="promptCancelled")return ic.debug(t,"Cancelled during extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled during extractPrompt",telemetryData:Ud(n,t)};if(g.type==="promptTimeout")return ic.debug(t,"Timeout during extractPrompt"),{type:"abortedBeforeIssued",reason:"Timeout",telemetryData:Ud(n,t)};if(g.prompt.prefix.length===0&&g.prompt.suffix.length===0)return ic.debug(t,"Error empty prompt"),{type:"abortedBeforeIssued",reason:"Empty prompt",telemetryData:Ud(n,t)};let A=gXo(t,m,n);return A>0&&(ic.debug(t,`Debouncing ghost text request for ${A}ms`),await Wb(A),gbe(t,r,o))?{type:"abortedBeforeIssued",reason:"cancelled after debounce",telemetryData:Ud(n,t)}:t.get(Bs).withProgress(async()=>{let[E]=W9(e.textDocument.getText(gc.range(gc.position(0,0),e.position))),_=t.get(k_).hasAcceptedCurrentCompletion(E,g.prompt.suffix),v=g.prompt,b=await hXo(t,e,E,g,m.isCycling,p,_,n);u("strategy");let I=yXo(t,E,v,b.requestMultiline);u("cache");let x=G8(t,e.textDocument.uri),w={blockMode:b.blockMode,languageId:e.textDocument.detectedLanguageId,repoInfo:x,engineModelId:h.modelId,ourRequestId:r,prefix:E,prompt:g.prompt,multiline:b.requestMultiline,indentation:lYe(e.textDocument,e.position),isCycling:m.isCycling,headers:h.headers,stop:b.stop,maxTokens:b.maxTokens,afterAccept:_};w.headers={...w.headers,"X-Copilot-Async":"true","X-Copilot-Speculative":m.isSpeculative?"true":"false"};let R=wXo(t,e.textDocument,w,e.position,g,n,h,m);if(I===void 0&&!m.isCycling&&t.get(P_).shouldWaitForAsyncCompletions(E,g.prompt)){let F=await t.get(P_).getFirstMatchingRequestWithTimeout(r,E,g.prompt,m.isSpeculative,R);if(u("asyncWait"),F){let U=!b.requestMultiline;I=[[w$t(F[0],{forceSingleLine:U})],4]}if(gbe(t,r,o))return ic.debug(t,"Cancelled before requesting a new completion"),{type:"abortedBeforeIssued",reason:"Cancelled after waiting for async completion",telemetryData:Ud(R,t)}}let P=b.blockMode==="moremultiline"&&DP.isSupported(e.textDocument.detectedLanguageId);if(I!==void 0&&(I[0]=I[0].map(F=>mbe(t,e.textDocument,e.position,F,P,ic)).filter(F=>F!==void 0)),I!==void 0&&I[0].length===0)return ic.debug(t,`Found empty inline suggestions locally via ${Fse(I[1])}`),{type:"empty",reason:"cached results empty after post-processing",telemetryData:Ud(R,t)};if(I!==void 0&&I[0].length>0&&(!m.isCycling||I[0].length>1))ic.debug(t,`Found inline suggestions locally via ${Fse(I[1])}`);else{if(m.isCycling){let F=await pXo(t,w,R,o,b.finishedCb);if(F.type==="success"){let U=I?.[0]??[];F.value[0].forEach(L=>{U.findIndex(H=>H.completionText.trim()===L.completionText.trim())===-1&&U.push(L)}),I=[U,3]}else if(I===void 0)return F}else{let F=a(($,W)=>(t.get(P_).updateCompletion(r,$),b.finishedCb($,W)),"finishedCb"),U=new Cn.CancellationTokenSource,L=fXo(t,w,R,U.token,F);t.get(P_).queueCompletionRequest(r,E,g.prompt,U,L);let H=await t.get(P_).getFirstMatchingRequest(r,E,g.prompt,m.isSpeculative);if(H===void 0)return{type:"empty",reason:"received no results from async completions",telemetryData:Ud(R,t)};I=[[H[0]],4]}u("network")}if(I===void 0)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:Ud(R,t)};let[k,Q]=I,M=k.map(F=>mbe(t,e.textDocument,e.position,F,P,ic)).filter(F=>F!==void 0),N=vr(t,tt.CompletionsDelay)??d.completionsDelay(n),G=fc()-n.issuedTime,O=Math.max(N-G,0);if(Q!==2&&!m.isCycling&&O>0&&(ic.debug(t,`Waiting ${O}ms before returning completion`),await Wb(O),gbe(t,r,o)))return ic.debug(t,"Cancelled after completions delay"),{type:"canceled",reason:"after completions delay",telemetryData:B9(R)};let D=[];for(let F of M){let U=xXo(t,e.textDocument,w,F,R),L=p?SIn(e.textDocument,e.position,F):0,$={completion:TXo(F.choiceIndex,F.completionText,g.trailingWs),telemetry:U,isMiddleOfTheLine:p,suffixCoverage:L,copilotAnnotations:F.copilotAnnotations,clientCompletionId:F.clientCompletionId};D.push($)}return R.properties.clientCompletionId=D[0]?.clientCompletionId,R.measurements.foundOffset=D?.[0]?.telemetry?.measurements?.foundOffset??-1,ic.debug(t,`Produced ${D.length} results from ${Fse(Q)} at ${R.measurements.foundOffset} offset`),gbe(t,r,o)?{type:"canceled",reason:"after post processing completions",telemetryData:B9(R)}:(m.isSpeculative||t.get(k_).setGhostText(E,g.prompt.suffix,M,Q),u("complete"),{type:"success",value:[D,Q],telemetryData:Ud(R,t),telemetryBlob:R,resultType:Q,performanceMetrics:l})})}a(AXo,"getGhostTextWithoutAbortHandling");async function R$t(t,e,r,n){let o=yr();t.get(k_).currentRequestId=o;let s=await IXo(t,e.textDocument,o,n);await tAe.catch(()=>{});try{return t.get(D_).schedule(e,o,n?.opportunityId??"",s,r,n),t.get(b5).notifyRequest(e,o,s,r,n),await AXo(t,e,o,s,r,n)}catch(c){if(Y0(c))return{type:"canceled",reason:"aborted at unknown location",telemetryData:B9(s,{cancelledNetworkRequest:!0})};throw c}}a(R$t,"getGhostText");function yXo(t,e,r,n){let o=t.get(k_).getCompletionsForUserTyping(e,r.suffix),s=SXo(t,e,r.suffix,n);if(o&&o.length>0){let c=(s??[]).filter(l=>!o.some(u=>u.completionText===l.completionText));return[o.concat(c),2]}if(s&&s.length>0)return[s,1]}a(yXo,"getLocalInlineSuggestion");function EXo(t,e){let r=_Xo(e,t),n=CXo(e,t);return r&&!n?void 0:r&&n}a(EXo,"isInlineSuggestion");function _Xo(t,e){return e.lineAt(t).text.substr(t.character).trim().length!=0}a(_Xo,"isMiddleOfTheLine");function CXo(t,e){let n=e.lineAt(t).text.substr(t.character).trim();return/^\s*[)>}\]"'`]*\s*[:{;,]?\s*$/.test(n)}a(CXo,"isValidMiddleOfTheLinePosition");function vXo(t,e){return e.lineAt(t).text.trim().length===0}a(vXo,"isNewLine");var _O=class t{constructor(e=!1){this.requestMultilineOverride=e}static{a(this,"ForceMultiLine")}static{this.default=new t}};async function bXo(t,e,r,n,o,s,c){if(t.get(_O).requestMultilineOverride)return{requestMultiline:!0};if(r.lineCount>=8e3)st(t,"ghostText.longFileMultilineSkip",Pt.createAndMarkAsIssued({languageId:r.detectedLanguageId,lineCount:String(r.lineCount),currentLine:String(n.line)}));else{if(e=="moremultiline"&&DP.isSupported(r.detectedLanguageId))return s?{requestMultiline:!0,blockPosition:await PFr(r,n)}:{requestMultiline:!1};if(["typescript","typescriptreact"].includes(r.detectedLanguageId)&&vXo(n,r))return{requestMultiline:!0};let u=!1;return!o&&S1(r.detectedLanguageId)?u=await cYe(r,n):o&&S1(r.detectedLanguageId)&&(u=await cYe(r,n)||await cYe(r,r.lineAt(n).range.end)),u||["javascript","javascriptreact","python"].includes(r.detectedLanguageId)&&(u=ybn(c.prompt,r.detectedLanguageId)>.5),{requestMultiline:u}}return{requestMultiline:!1}}a(bXo,"shouldRequestMultiline");function WKe(t,e,r){t.get(Sw).append(e.prefix,e.prompt.suffix,r)}a(WKe,"appendToCache");function TXo(t,e,r){if(r.length>0){if(e.startsWith(r))return{completionIndex:t,completionText:e,displayText:e.substring(r.length),displayNeedsWsOffset:!1};{let n=e.substring(0,e.length-e.trimStart().length);return r.startsWith(n)?{completionIndex:t,completionText:e,displayText:e.trimStart(),displayNeedsWsOffset:!0}:{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}}else return{completionIndex:t,completionText:e,displayText:e,displayNeedsWsOffset:!1}}a(TXo,"adjustLeadingWhitespace");function SXo(t,e,r,n){let o=t.get(Sw).findAll(e,r);return o.length===0?(ic.debug(t,"Found no completions in cache"),[]):(ic.debug(t,`Found ${o.length} completions in cache`),o.map(s=>w$t(s,{forceSingleLine:!n})))}a(SXo,"getCompletionsFromCache");async function IXo(t,e,r,n){let o={headerRequestId:r};n?.opportunityId&&(o.opportunityId=n.opportunityId),n?.selectedCompletionInfo?.text&&(o.completionsActive="true"),n?.isSpeculative&&(o.reason="speculative");let s=Pt.createAndMarkAsIssued(o);return await t.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments({uri:e.uri,languageId:e.detectedLanguageId},s)}a(IXo,"createTelemetryWithExp");function xXo(t,e,r,n,o){let s=n.requestId,c={choiceIndex:n.choiceIndex.toString(),clientCompletionId:n.clientCompletionId};n.generatedChoiceIndex!==void 0&&(c.originalChoiceIndex=c.choiceIndex,c.choiceIndex=(1e4*(n.generatedChoiceIndex+1)+n.choiceIndex).toString());let l={compCharLen:n.completionText.length,numLines:n.completionText.trim().split(` +`).length};n.meanLogProb&&(l.meanLogProb=n.meanLogProb),n.meanAlternativeLogProb&&(l.meanAlternativeLogProb=n.meanAlternativeLogProb);let u=n.telemetryData.extendedBy(c,l);return u.issuedTime=o.issuedTime,u.measurements.timeToProduceMs=performance.now()-o.issuedTime,kIn(u,e),u.extendWithRequestId(s),u.measurements.confidence=bIn(t,u),u.measurements.quantile=TIn(t,u),ic.debug(t,`Extended telemetry for ${n.telemetryData.properties.headerRequestId} with retention confidence ${u.measurements.confidence} (expected as good or better than about ${u.measurements.quantile} of all suggestions)`),u}a(xXo,"telemetryWithAddData");function wXo(t,e,r,n,o,s,c,l){let u={languageId:e.detectedLanguageId};u.afterAccept=r.afterAccept.toString(),u.isSpeculative=l.isSpeculative.toString();let d=s.extendedBy(u);kIn(d,e);let p=r.repoInfo;d.properties.gitRepoInformation=p===void 0?"unavailable":p===0?"pending":"available",p!==void 0&&p!==0&&(d.properties.gitRepoUrl=p.url,d.properties.gitRepoHost=p.hostname,d.properties.gitRepoOwner=p.owner,d.properties.gitRepoName=p.repo,d.properties.gitRepoPath=p.pathname),d.properties.engineName=c.modelId,d.properties.engineChoiceSource=c.engineChoiceSource,d.properties.isMultiline=JSON.stringify(r.multiline),d.properties.isCycling=JSON.stringify(r.isCycling);let h=e.lineAt(n.line),m=e.getText(gc.range(h.range.start,n)),g=e.getText(gc.range(n,h.range.end)),A=Array.from(o.neighborSource.entries()).map(v=>[v[0],v[1].map(b=>(0,RIn.SHA256)(b).toString())]),y={beforeCursorWhitespace:JSON.stringify(m.trim()===""),afterCursorWhitespace:JSON.stringify(g.trim()===""),neighborSource:JSON.stringify(A),blockMode:r.blockMode},E={...XX(o.prompt),promptEndPos:e.offsetAt(n),promptComputeTimeMs:o.computeTimeMs};o.metadata&&(y.promptMetadata=JSON.stringify(o.metadata)),o.contextProvidersTelemetry&&(y.contextProviders=JSON.stringify(o.contextProvidersTelemetry));let _=d.extendedBy(y,E);return st(t,"ghostText.issued",_),d}a(wXo,"telemetryIssued");function kIn(t,e){t.measurements.documentLength=e.getText().length,t.measurements.documentLineCount=e.lineCount}a(kIn,"addDocumentTelemetry");function DIn(t,e,r,n,o){let s=Date.now()-n,c=s-o,l=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:s,processingTimeMs:o,deltaMs:c,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN});l.extendWithRequestId(r.requestId),st(t,`ghostText.${e}`,l)}a(DIn,"telemetryPerformance");f();f();var aW=class{constructor(e,r,n){this._referenceCount=0;this._isDisposed=!1;this._offset=n;let o=e.get(zr);this._tracker=o.onDidChangeTextDocument(s=>{if(s.document.uri===r){for(let c of s.contentChanges)if(c.rangeOffset+c.rangeLength<=this.offset){let l=c.text.length-c.rangeLength;this._offset=this._offset+l}}})}static{a(this,"ChangeTracker")}get offset(){return this._offset}push(e,r){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout(()=>{e(),this._referenceCount--,this._referenceCount===0&&(this._tracker.dispose(),this._isDisposed=!0)},r)}};f();var wv=class{static{a(this,"CitationManager")}},zKe=class extends wv{static{a(this,"NoOpCitationManager")}async handleIPCodeCitation(e,r){}};f();var P$t=class t{constructor(e,r,n=[],o,s,c){this._textDocument=e;this._position=r;this.originalPosition=o??Cn.Position.create(r.line,r.character),this.originalVersion=s??e.version,this.originalOffset=c??e.offsetAt(this.originalPosition),this._editsWithPosition=[...n]}static{a(this,"CompletionState")}get textDocument(){return this._textDocument}get position(){return this._position}get editsWithPosition(){return[...this._editsWithPosition]}updateState(e,r,n){return new t(e,r,n??this.editsWithPosition,this.originalPosition,this.originalVersion,this.originalOffset)}updatePosition(e){return this.updateState(this._textDocument,e)}addSelectedCompletionInfo(e){if(this.editsWithPosition.find(n=>n.source==="selectedCompletionInfo"))throw new Error("Selected completion info already applied");let r={range:e.range,newText:e.text};return this.applyEdits([r],!0)}applyEdits(e,r=!1){if(r&&e.length>1)throw new Error("Selected completion info should be a single edit");let n=this._textDocument,o=this._position,s=n.offsetAt(o),c=this.editsWithPosition;for(let{range:l,newText:u}of e){let d=n.getText(l),p=n.offsetAt(l.end);if(n=n.applyEdits([{range:l,newText:u}]),s{let v=KKe.indexOf(_);v!==-1&&KKe.splice(v,1)}}a(t,"subscribe");function e(){for(let _ of KKe)_()}a(e,"afterUpdateConnection");function r(_){Nw.connection!==_&&(Nw.connection=_,e())}a(r,"updateConnection");function n(){return Nw.connection==="connected"}a(n,"isConnected");function o(){return Nw.connection==="disconnected"}a(o,"isDisconnected");function s(){return Nw.connection==="retry"}a(s,"isRetrying");function c(){return Nw.connection==="disabled"}a(c,"isDisabled");function l(){r("connected"),h(!1)}a(l,"setConnected");function u(){r("disconnected")}a(u,"setDisconnected");function d(){r("retry")}a(d,"setRetrying");function p(){r("disabled")}a(p,"setDisabled");function h(_){Nw.initialWait!==_&&(Nw.initialWait=_)}a(h,"setInitialWait");function m(_,v=RXo){s()||(d(),h(!0),A(_,v))}a(m,"enableRetry");function g(){return Nw.initialWait}a(g,"isInitialWait");async function A(_,v){M_.info(_,`Attempting to reconnect in ${v}ms.`),await y(v),h(!1);let b=_.get(dr);function I(x,w){if(x>MIn){M_.info(w,"Max retry time reached, disabling."),p();return}let R=a(async()=>{Nw.retryAttempts=Math.min(Nw.retryAttempts+1,OIn);try{M_.info(w,`Pinging service after ${x} second(s)`);let P=await b.fetch(new URL("_ping",tX(w)["origin-tracker"]).href,{method:"GET",headers:{"content-type":"application/json"}});if(P.status!==200||!P.ok)I(x**2,w);else{M_.info(w,"Successfully reconnected."),l();return}}catch{I(x**2,w)}},"tryAgain");setTimeout(()=>{R()},x*1e3)}a(I,"succeedOrRetry"),M_.info(_,"Attempting to reconnect."),I(k$t,_)}a(A,"attemptToPing");let y=a(_=>new Promise(v=>setTimeout(v,_)),"timeout");function E(_){return{dispose:t(_)}}return a(E,"listen"),YKe={setConnected:l,setDisconnected:u,setRetrying:d,setDisabled:p,enableRetry:m,listen:E,isConnected:n,isDisconnected:o,isRetrying:s,isDisabled:c,isInitialWait:g},YKe}a(PXo,"registerConnectionState");var lW=PXo();f();var wh={BadArguments:"BadArgumentsError",Unauthorized:"NotAuthorized",NotFound:"NotFoundError",RateLimit:"RateLimitError",InternalError:"InternalError",ConnectionError:"ConnectionError",Unknown:"UnknownError"},Abe={[wh.Unauthorized]:"Invalid GitHub token. Please sign out from your GitHub account using VSCode UI and try again",[wh.InternalError]:"Internal error: matches to public code will not be detected. It is advised to disable Copilot completions until the service is reconnected.",[wh.RateLimit]:"You've reached your quota and limit, code matching will be unavailable until the limit resets"};function D$t(t){return t===401?wh.Unauthorized:t===400?wh.BadArguments:t===404?wh.NotFound:t===429?wh.RateLimit:t>=500&&t<600?wh.InternalError:t>=600?wh.ConnectionError:wh.Unknown}a(D$t,"getErrorType");function Q5(t,e,r={}){return{kind:"failure",reason:D$t(Number(t)),code:Number(t),msg:e,meta:r}}a(Q5,"createErrorResponse");f();var kXo=/^[1-6][0-9][0-9]$/,DXo=/([A-Z][a-z]+)/,NXo="code_referencing",ybe=class{constructor(e){this.baseKey=e}static{a(this,"CodeQuoteTelemetry")}buildKey(...e){return[NXo,this.baseKey,...e].join(".")}},N$t=class extends ybe{static{a(this,"CopilotOutputLogTelemetry")}constructor(){super("github_copilot_log")}handleOpen({context:e}){let r=this.buildKey("open","count"),n=Pt.createAndMarkAsIssued();st(e,r,n)}handleFocus({context:e}){let r=Pt.createAndMarkAsIssued(),n=this.buildKey("focus","count");st(e,n,r)}handleWrite({context:e}){let r=Pt.createAndMarkAsIssued(),n=this.buildKey("write","count");st(e,n,r)}},Vtd=new N$t,M$t=class extends ybe{static{a(this,"MatchNotificationTelemetry")}constructor(){super("match_notification")}handleDoAction({context:e,actor:r}){let n=Pt.createAndMarkAsIssued({actor:r}),o=this.buildKey("acknowledge","count");st(e,o,n)}handleDismiss({context:e,actor:r}){let n=Pt.createAndMarkAsIssued({actor:r}),o=this.buildKey("ignore","count");st(e,o,n)}},Wtd=new M$t,O$t=class extends ybe{static{a(this,"SnippyTelemetry")}constructor(){super("snippy")}handleUnexpectedError({context:e,origin:r,reason:n}){let o=Pt.createAndMarkAsIssued({origin:r,reason:n});jp(e,this.buildKey("unexpectedError"),o)}handleCompletionMissing({context:e,origin:r,reason:n}){let o=Pt.createAndMarkAsIssued({origin:r,reason:n});jp(e,this.buildKey("completionMissing"),o)}handleSnippyNetworkError({context:e,origin:r,reason:n,message:o}){if(!r.match(kXo)){M_.debug(e,"Invalid status code, not sending telemetry",{origin:r});return}let s=n.split(DXo).filter(l=>!!l).join("_").toLowerCase(),c=Pt.createAndMarkAsIssued({message:o});jp(e,this.buildKey(s,r),c)}},JKe=new O$t;var MXo="twirp/github.snippy.v1.SnippyAPI";async function B$t(t,e,r,n){let o;try{o=await t.get(Nt).getToken()}catch{return lW.setDisconnected(),Q5(401,Abe[wh.Unauthorized])}if(M_.info(t,`Calling ${e}`),lW.isRetrying())return Q5(600,"Attempting to reconnect to the public code matching service.");if(lW.isDisconnected())return Q5(601,"The public code matching service is offline.");let s;try{s=await t.get(dr).fetch(I2(t,o,"origin-tracker",`${MXo}/${e}`),{method:r.method,body:r.method==="POST"?JSON.stringify(r.body):void 0,headers:{"content-type":"application/json",authorization:`Bearer ${o.token}`,...sE(t)},signal:n})}catch{return lW.enableRetry(t),Q5(602,"Network error detected. Check your internet connection.")}let c;try{c=await s.json()}catch(A){let y=A.message;throw JKe.handleUnexpectedError({context:t,origin:"snippyNetwork",reason:y}),A}if(s.ok)return{kind:"success",...c};let l={...c,code:Number(s.status)},{code:u,msg:d,meta:p}=l,h=Number(u),m=D$t(h),g=d||"unknown error";switch(m){case wh.Unauthorized:return Q5(u,Abe[wh.Unauthorized],p);case wh.BadArguments:return Q5(u,g,p);case wh.RateLimit:return lW.enableRetry(t,60*1e3),Q5(u,Abe.RateLimitError,p);case wh.InternalError:return lW.enableRetry(t),Q5(u,Abe[wh.InternalError],p);default:return Q5(u,g,p)}}a(B$t,"call");f();var XKe=S.Object({kind:S.Literal("failure"),reason:S.String(),code:S.Number(),msg:S.String(),meta:S.Optional(S.Any())}),BXo=S.Object({matched_source:S.String(),occurrences:S.String(),capped:S.Boolean(),cursor:S.String(),github_url:S.String()}),BIn=S.Object({source:S.String()}),LXo=S.Object({snippets:S.Array(BXo)}),LIn=S.Union([LXo,XKe]),FIn=S.Object({cursor:S.String()}),FXo=S.Object({commit_id:S.String(),license:S.String(),nwo:S.String(),path:S.String(),url:S.String()}),UXo=S.Object({has_next_page:S.Boolean(),cursor:S.String()}),QXo=S.Object({count:S.Record(S.String(),S.String())}),qXo=S.Object({file_matches:S.Array(FXo),page_info:UXo,license_stats:QXo}),UIn=S.Union([qXo,XKe]);async function QIn(t,e,r){let n=await B$t(t,"Match",{method:"POST",body:VH(BIn,{source:e})},r);return VH(LIn,n)}a(QIn,"Match");async function qIn(t,{cursor:e},r){let n=await B$t(t,"FilesForMatch",{method:"POST",body:VH(FIn,{cursor:e})},r);return VH(UIn,n)}a(qIn,"FilesForMatch");f();var Ebe=new RegExp("[_\\p{L}\\p{Nd}]+|====+|----+|####+|////+|\\*\\*\\*\\*+|[\\p{P}\\p{S}]","gu"),ZKe=65;function jXo(t){let e=0,r;Ebe.lastIndex=0;do if(r=Ebe.exec(t),r&&(e+=1),e>=ZKe)break;while(r);return e}a(jXo,"lexemeLength");function $Xo(t,e){let r=0,n;Ebe.lastIndex=0;do if(n=Ebe.exec(t),n&&(r+=1,r>=e))return Ebe.lastIndex;while(n);return t.length}a($Xo,"offsetFirstLexemes");function GIn(t,e){let r=t.split("").reverse().join(""),n=$Xo(r,e);return r.length-n}a(GIn,"offsetLastLexemes");function _be(t){return jXo(t)>=ZKe}a(_be,"hasMinLexemeLength");function WXo(t){return PP.Check(XKe,t)}a(WXo,"isError");async function HIn(t,e){let r=await e();if(WXo(r)){JKe.handleSnippyNetworkError({context:t,origin:String(r.code),reason:r.reason,message:r.msg});return}return r}a(HIn,"snippyRequest");function jIn(t){return"kind"in t&&t.kind==="failure"}a(jIn,"isMatchError");async function $In(t,e,r,n){let s=await t.get(zr).getTextDocument({uri:e});if(!s){M_.debug(t,`Expected document matching ${e}, got nothing.`);return}let c=s.getText();if(!_be(c)||!_be(c))return;let l=r;if(!_be(r)){let g=c.slice(0,n),A=GIn(g,ZKe);l=c.slice(A,n+r.length)}if(!_be(l))return;let u=await HIn(t,()=>QIn(t,l));if(!u||jIn(u)||!u.snippets.length){M_.info(t,"No match found");return}M_.info(t,"Match found");let{snippets:d}=u,p=d.map(async g=>{let A=await HIn(t,()=>qIn(t,{cursor:g.cursor}));if(!A||jIn(A))return;let y=A.file_matches,E=A.license_stats;return{match:g,files:y,licenseStats:E}}),m=(await Promise.all(p)).filter(g=>g!==void 0);if(m.length)for(let g of m){let A=new Set(Object.keys(g.licenseStats?.count??{}));A.has("NOASSERTION")&&(A.delete("NOASSERTION"),A.add("unknown"));let y=Array.from(A).sort(),E=n,_=n+g.match.matched_source.length,v=s.positionAt(E),b=s.positionAt(_);await t.get(wv).handleIPCodeCitation(t,{inDocumentUri:e,offsetStart:E,offsetEnd:_,version:s.version,location:{start:v,end:b},matchingText:l,details:y.map(I=>({license:I,url:g.match.github_url}))})}}a($In,"fetchCitations");f();function L$t(t,e,r=(n,o)=>n===o?0:1){if(e.length===0||t.length===0)return{distance:e.length,startOffset:0,endOffset:0};let n=new Array(e.length+1).fill(0),o=new Array(e.length+1).fill(0),s=new Array(t.length+1).fill(0),c=new Array(t.length+1).fill(0),l=e[0];for(let d=0;d0?d-1:0;for(let d=1;d(l[l.Word=0]="Word",l[l.Space=1]="Space",l[l.Other=2]="Other"))(r||={});let n=0;for(let o of t){let s;new RegExp("(\\p{L}|\\p{Nd}|_)","u").test(o)?s=0:o===" "?s=1:s=2,s===n&&s!==2?e+=o:(e.length>0&&(yield e),e=o,n=s)}e.length>0&&(yield e)}a(KXo,"lexGeneratorWords");function VIn(t,e,r,n){let o=[],s=0;for(let c of r(t))n(c)&&(e.has(c)||e.set(c,e.size),o.push([e.get(c),s])),s+=c.length;return[o,e]}a(VIn,"lexicalAnalyzer");function WIn(t){return t!==" "}a(WIn,"notSingleSpace");function zIn(t,e,r=KXo){let[n,o]=VIn(t,zXo(),r,WIn),[s,c]=VIn(e,o,r,WIn);if(s.length===0||n.length===0)return{lexDistance:s.length,startOffset:0,endOffset:0,haystackLexLength:n.length,needleLexLength:s.length};let l=YXo(c),u=s.length,d=l[s[0][0]],p=l[s[u-1][0]];function h(y,E,_,v){if(v===0||v===u-1){let b=l[n[_][0]];return v==0&&b.endsWith(d)||v==u-1&&b.startsWith(p)?0:1}else return y===E?0:1}a(h,"compare");let m=L$t(n.map(y=>y[0]),s.map(y=>y[0]),h),g=n[m.startOffset][1],A=m.endOffset0&&t[A-1]===" "&&--A,{lexDistance:m.distance,startOffset:g,endOffset:A,haystackLexLength:n.length,needleLexLength:s.length}}a(zIn,"lexEditDistance");f();function z9(t){return t.length===0?0:t.split(` +`).length}a(z9,"countLines");function YIn(t,e){return e.compType==="partial"?t.substring(0,e.acceptedLength):t}a(YIn,"computeCompletionText");var Y9=new Se("postInsertion"),KIn=[{seconds:15,captureCode:!1,captureRejection:!1},{seconds:30,captureCode:!0,captureRejection:!0},{seconds:120,captureCode:!1,captureRejection:!1},{seconds:300,captureCode:!1,captureRejection:!1},{seconds:600,captureCode:!1,captureRejection:!1}],JIn=50,JXo=1500,XXo=.5,ZXo=500,F$t={triggerPostInsertionSynchroneously:!1,captureCode:!1,captureRejection:!1};async function XIn(t,e,r,n,o){let s=await t.get(In).getOrReadTextDocumentWithFakeClientProperties({uri:e});if(s.status!=="valid")return Y9.info(t,`Could not get document for ${e}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1},capturedCode:"",terminationOffset:0};let c=s.document,l=c.getText(),u=l.substring(0,n),d=c.positionAt(n),p=await uae(t,r.properties.headerRequestId,cW(c,d),r),h=p.type==="prompt"?p.prompt:{prefix:u,suffix:"",isFimEnabled:!1};if(h.isFimEnabled&&o!==void 0){let m=l.substring(n,o);return h.suffix=l.substring(o),{prompt:h,capturedCode:m,terminationOffset:0}}else{let m=l.substring(n),g=ojt(u,n,c.detectedLanguageId),y=Hbn(g,void 0)(m),E=Math.min(l.length,n+(y?y*2:ZXo)),_=l.substring(n,E);return{prompt:h,capturedCode:_,terminationOffset:y??-1}}}a(XIn,"captureCode");function eJe(t,e,r,n,o){o.forEach(({completionText:u,completionTelemetryData:d})=>{Y9.debug(t,`${e}.rejected choiceIndex: ${d.properties.choiceIndex}`),_bn(t,e,d)});let s=new aW(t,n,r-1),c=new aW(t,n,r),l=a(async u=>{Y9.debug(t,`Original offset: ${r}, Tracked offset: ${s.offset}`);let{completionTelemetryData:d}=o[0],{prompt:p,capturedCode:h,terminationOffset:m}=await XIn(t,n,d,s.offset+1,c.offset),g={hypotheticalPromptJson:JSON.stringify({prefix:p.prefix,context:p.context}),hypotheticalPromptSuffixJson:JSON.stringify(p.suffix)},A=d.extendedBy({...g,capturedCodeJson:JSON.stringify(h)},{timeout:u.seconds,insertionOffset:r,trackedOffset:s.offset,terminationOffsetInCapturedCode:m});Y9.debug(t,`${e}.capturedAfterRejected choiceIndex: ${d.properties.choiceIndex}`,A),st(t,e+".capturedAfterRejected",A,1)},"checkInCode");KIn.filter(u=>u.captureRejection).map(u=>s.push(Up(t,()=>l(u),"postRejectionTasks"),u.seconds*1e3))}a(eJe,"postRejectionTasks");function Cbe(t,e,r,n,o,s,c,l){let u=s.extendedBy({compType:c.compType},{compCharLen:c.acceptedLength,numLines:c.acceptedLines});Y9.debug(t,`${e}.accepted choiceIndex: ${u.properties.choiceIndex}`),Ebn(t,e,u);let d=r;r=YIn(r,c);let p=r.trim(),h=new aW(t,o,n),m=new aW(t,o,n+r.length),g=a(async A=>{await nZo(t,e,p,n,o,A,u,h,m)},"stillInCodeCheck");if(F$t.triggerPostInsertionSynchroneously&&RC(t)){let A=g({seconds:0,captureCode:F$t.captureCode,captureRejection:F$t.captureRejection});t.get(cu).register(A)}else KIn.map(A=>h.push(Up(t,()=>g(A),"postInsertionTasks"),A.seconds*1e3));Up(t,eZo,"post insertion citation check")(t,o,d,r,n,l)}a(Cbe,"postInsertionTasks");async function eZo(t,e,r,n,o,s){if(!s||(s.ip_code_citations?.length??0)<1){if(j3(t)?.getTokenValue("sn")==="1")return;await $In(t,e,n,o);return}let c=await t.get(zr).getTextDocument({uri:e});if(c){let l=U$t(c.getText(),n,JIn,o);l.stillInCodeHeuristic&&(o=l.foundOffset)}for(let l of s.ip_code_citations){let u=tZo(r.length,n.length,l.start_offset);if(u===void 0){Y9.info(t,`Full completion for ${e} contains a reference matching public code, but the partially inserted text did not include the match.`);continue}let d=o+u,p=c?.positionAt(d),h=o+rZo(r.length,n.length,l.stop_offset),m=c?.positionAt(h),g=p&&m?c?.getText({start:p,end:m}):"";await t.get(wv).handleIPCodeCitation(t,{inDocumentUri:e,offsetStart:d,offsetEnd:h,version:c?.version,location:p&&m?{start:p,end:m}:void 0,matchingText:g,details:l.details.citations})}}a(eZo,"citationCheck");function tZo(t,e,r){if(!(ee))return r}a(tZo,"computeCitationStart");function rZo(t,e,r){return e{if(r.displayText&&r.telemetry){let n,o;t.partiallyAcceptedLength?(n=r.displayText.substring(t.partiallyAcceptedLength-1),o=r.telemetry.extendedBy({compType:"partial"},{compCharLen:n.length})):(n=r.displayText,o=r.telemetry);let s={completionText:n,completionTelemetryData:o,offset:r.offset};e.push(s)}}),e}a(sZo,"computeRejectedCompletions");function Q$t(t,e){let r=t.get(Mm);if(!r.position||!r.uri)return;let n=sZo(r);n.length>0&&eJe(t,"ghostText",e??n[0].offset,r.uri,n),r.resetState(),r.resetPartialAcceptanceState()}a(Q$t,"rejectLastShown");function ZIn(t,e,r,n){let o=t.get(Mm);return o.position&&o.uri&&!(o.position.line===r.line&&o.position.character===r.character&&o.uri.toString()===e.uri.toString())&&n!==2&&Q$t(t,e.offsetAt(o.position)),o.setState(e,r),o.index}a(ZIn,"setLastShown");function exn(t,e){let r=t.get(Mm);if(r.index=e.index,!r.shownCompletions.find(n=>n.index===e.index)&&(e.uri===r.uri&&r.position?.line===e.position.line&&r.position?.character==e.position.character&&r.shownCompletions.push(e),e.displayText)){let n=e.resultType!==0;oZo.debug(t,`[${e.telemetry.properties.headerRequestId}] shown choiceIndex: ${e.telemetry.properties.choiceIndex}, fromCache ${n}`),e.telemetry.measurements.compCharLen=e.displayText.length,Xze(t,"ghostText",e)}}a(exn,"handleGhostTextShown");function aZo(t,e,r){let n=t.get(Mm);n.linesLeft===void 0&&(n.linesAccepted=z9(e.insertText.substring(0,r)),n.linesLeft=z9(e.displayText));let o=z9(e.displayText);n.linesLeft>o&&(n.linesAccepted+=n.linesLeft-o,n.lastLineAcceptedLength=n.partiallyAcceptedLength,n.linesLeft=o),n.partiallyAcceptedLength=(n.lastLineAcceptedLength||0)+r}a(aZo,"handleLineAcceptance");function fae(t,e,r="ghostText"){let n=t.get(Mm),o;return n.partiallyAcceptedLength?o={compType:"full",acceptedLength:(n.partiallyAcceptedLength||0)+e.displayText.length,acceptedLines:n.linesAccepted+(n.linesLeft??0)}:o={compType:"full",acceptedLength:e.displayText.length,acceptedLines:z9(e.displayText)},n.resetState(),Cbe(t,r,e.displayText,e.offset,e.uri,e.telemetry,o,e.copilotAnnotations)}a(fae,"handleGhostTextPostInsert");function tJe(t,e,r,n=0,o="ghostText",s="line"){let c=t.get(Mm),l;return s==="cumulative"?(cZo(t,e,r),l={compType:c.totalLength!=null?"full":"partial",acceptedLength:c.totalLength??(c.partiallyAcceptedLength||0),acceptedLines:c.linesAccepted},l.compType==="full"&&c.resetState()):(aZo(t,e,r),l={compType:"partial",acceptedLength:c.partiallyAcceptedLength||0,acceptedLines:c.linesAccepted}),Cbe(t,o,e.displayText,e.offset,e.uri,e.telemetry,l,e.copilotAnnotations)}a(tJe,"handlePartialGhostTextPostInsert");function cZo(t,e,r){let n=t.get(Mm);n.partiallyAcceptedLength=(n.partiallyAcceptedLength||0)+r,n.linesAccepted=z9(e.insertText.substring(0,n.partiallyAcceptedLength)),n.partiallyAcceptedLength>=e.insertText.length&&(n.totalLength=n.partiallyAcceptedLength)}a(cZo,"handleCumulativeAcceptance");f();var q5=new Map;q5.set("copilot",{app:"copilot-client",catalog_service:"CopilotCompletionsVSCode"});q5.set("copilot-intellij",{app:"copilot-intellij",catalog_service:"CopilotIntelliJ"});q5.set("copilot-xcode",{app:"copilot-xcode",catalog_service:"CopilotXcode"});q5.set("copilot-eclipse",{app:"copilot-eclipse",catalog_service:"CopilotEclipse"});q5.set("copilot.vim",{app:"copilot-vim",catalog_service:"CopilotVim"});q5.set("copilot-vs",{app:"copilot-vs",catalog_service:"CopilotVS"});var lZo=new Se("sdk");function rJe(t,e){q5.has(t.get(Dr).getEditorPluginInfo().name)||lZo.warn(t,...e)}a(rJe,"deprecationWarning");var hAi=de(I8()),pb=de(xx());f();f();f();f();var q$t={NewGitHubLogin:"auth.new_github_login",GitHubLoginResult:"auth.github_login_result"};function pae(t,e){let r=Pt.createAndMarkAsIssued({authType:e});st(t,q$t.NewGitHubLogin,r),rr(t,q$t.NewGitHubLogin,{authType:e})}a(pae,"telemetryNewGitHubLogin");function Mw(t,e,r,n,o){Sa(t,q$t.GitHubLoginResult,o,{authType:e,authStatus:r},{totalTimeMs:n})}a(Mw,"telemetryGitHubLoginResult");var txn=["repo","workflow"],G$t=class extends $i{static{a(this,"DeviceFlowError")}constructor(e){super(e.error_description),this.code=e.error,this.uri=e.error_uri,this.name="DeviceFlowError"}};async function uZo(t,e,{serverUrl:r}){let n={method:"POST",headers:{Accept:"application/json",...sE(t)},json:{client_id:e,scope:txn.join(" ")},timeout:3e4},o,s=new URL("login/device/code",r).href;try{o=await t.get(dr).fetch(s,n)}catch(c){throw c instanceof Error&&Ab(c)?new $i(`Could not log in with device flow on ${r}: ${c.message}`):c}if(!o.ok)throw new $i(`Could not log in with device flow on ${r}: HTTP ${o.status}`);return await o.json()}a(uZo,"requestDeviceFlowStage1");async function dZo(t,e,r,{serverUrl:n}){let o={method:"POST",headers:{Accept:"application/json",...sE(t)},json:{client_id:r,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4},s=await t.get(dr).fetch(new URL("login/oauth/access_token",n).href,o),c=await s.json();if(c.access_token||c.error==="authorization_pending"||c.error==="slow_down")return c;throw c.error&&c.error_description?new G$t(c):new $i(`Unexpected ${s.status} response from device flow: ${JSON.stringify(c)}`)}a(dZo,"requestDeviceFlowStage2");async function fZo(t,e){let n=await(await au(t,e,"user",{headers:{Accept:"application/json"}})).json();if("errors"in n)throw new $i(`Error retrieving user information: ${String(n.errors)}`);return n}a(fZo,"requestUserInfo");var Rv=class{constructor(e){this.ctx=e;this.pendingSignIn=void 0}static{a(this,"GitHubDeviceFlow")}get authManager(){return this.ctx.get(en)}async save(e){let r=new URL(e.serverUrl).hostname;return await this.authManager.saveAndActivateSession({oauth_token:e.accessToken,user:e.login,githubAppId:e.githubAppId,authAuthority:r,scopes:e.scopes})}async initiate(e,r){let n=e?.githubAppId??this.ctx.get(Oc).findAppIdToAuthenticate();r??=this.authManager.getConfiguredUrls();let o=performance.now(),s=a(()=>performance.now()-o,"getElapsedTimeMs");try{let c=await this.getTokenUnguarded(n,r),l=c.waitForAuth.then(async u=>{this.ctx.get(Oc).githubAppId=n;let d=await this.save(u);return Mw(this.ctx,"deviceFlow",d.status,s()),d});return l.catch(u=>{Mw(this.ctx,"deviceFlow","NotSignedIn",s(),u)}),this.pendingSignIn={verificationUri:c.verification_uri,status:l},c}catch(c){throw Mw(this.ctx,"deviceFlow","NotSignedIn",s(),c),this.ctx.get(xE).notifyUser(this.ctx,c),c}}async getTokenUnguarded(e,r){let n=this.ctx;pae(n,"deviceFlow");let o=await uZo(n,e,r),s=(async()=>{let c=o.expires_in,l=o.interval,u;do{await new Promise(p=>setTimeout(p,1e3*l)),u=await dZo(n,o.device_code,e,r),c-=l;let d=u.access_token;if(d){let p=await fZo(n,{...r,accessToken:d}),h=u.scope?u.scope.split(" ").filter(m=>m.length>0):txn;return{...r,githubAppId:e,login:p.login,accessToken:d,scopes:h}}l=u.interval??l}while(c>0);throw new $i(`Timed out polling for access token. Last response was ${JSON.stringify(u)}`)})();return{...o,waitForAuth:s}}};var H$t=de(Dn());f();var ES=class{constructor(e){this.ctx=e}static{a(this,"AbstractCommand")}};var nJe="github.copilot.finishDeviceFlow",j$t=class extends ES{constructor(){super(...arguments);this.name=nJe;this.arguments=S.Tuple([])}static{a(this,"FinishDeviceFlowCommand")}async handle(r,n){let o=this.ctx.get(Rv),s=o.pendingSignIn;if(!s)throw new H$t.ResponseError(ct.InvalidRequest,"No pending sign in");try{await this.ctx.get(Z0).open(s.verificationUri)}catch(c){AE.warn(this.ctx,"Failed to open",s.verificationUri),AE.exception(this.ctx,c,nJe)}try{return await s.status}catch(c){throw new H$t.ResponseError(ct.DeviceFlowFailed,String(c))}finally{o.pendingSignIn=void 0}}},rxn=[j$t];f();f();var pl=class extends $r{static{a(this,"CopilotCompletionCache")}constructor(e=100){super(e)}};var vbe="github.copilot.didAcceptCompletionItem",$$t=class extends ES{constructor(){super(...arguments);this.name=vbe;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptCommand")}handle(r,[n]){let s=this.ctx.get(pl).get(n);return s?(fae(this.ctx,s),!0):!1}},nxn=[$$t];f();f();f();f();f();f();function ixn(t,e,r){function n(s,c,l){let u=new RegExp(`^(${c})+`,"g");return s.split(` `).map(d=>{let p=d.replace(u,""),h=d.length-p.length;return l(h)+p}).join(` `)}a(n,"replace");let o;if(t.tabSize===void 0||typeof t.tabSize=="string"?o=4:o=t.tabSize,t.insertSpaces===!1){let s=a(c=>n(c," ",l=>" ".repeat(Math.floor(l/o))+" ".repeat(l%o)),"r");e.displayText=s(e.displayText),e.completionText=s(e.completionText)}else if(t.insertSpaces===!0){let s=a(c=>n(c," ",l=>" ".repeat(l*o)),"r");if(e.displayText=s(e.displayText),e.completionText=s(e.completionText),r){let c=a(l=>{if(l==="")return l;let u=l.split(` -`)[0],d=u.length-u.trimStart().length,p=d%o;if(p!==0&&d>0){let h=" ".repeat(p);return n(l,h,m=>" ".repeat((Math.floor(m/o)+1)*o))}else return l},"re");e.displayText=c(e.displayText),e.completionText=c(e.completionText)}}return e}a(oIn,"normalizeIndentCharacter");function sIn(t,e,r,n,o,s,c){let l=n.lineAt(o),u=e.map(d=>{let p=vc.range(vc.position(o.line,0),vc.position(o.line,o.character+d.suffixCoverage)),h="";if(s&&(d.completion=oIn(s,d.completion,l.isEmptyOrWhitespace)),l.isEmptyOrWhitespace&&(d.completion.displayNeedsWsOffset||d.completion.completionText.startsWith(l.text)))h=d.completion.completionText;else{let g=vc.range(p.start,o);h=n.getText(g)+d.completion.displayText}return{uuid:yr(),insertText:h,range:p,uri:n.uri,index:d.completion.completionIndex,telemetry:d.telemetry,displayText:d.completion.displayText,position:o,offset:n.offsetAt(o),resultType:r,copilotAnnotations:d.copilotAnnotations,clientCompletionId:d.clientCompletionId}});if(r===2&&c!==void 0){let d=u.find(p=>p.index===c);if(d){let p=u.filter(h=>h.index!==c);u=[d,...p]}}return u}a(sIn,"completionsFromGhostTextResults");f();var Vw=class{constructor(){this.cache=new $r(100)}static{a(this,"SpeculativeRequestCache")}set(e,r){this.cache.set(e,r)}async request(e){let r=this.cache.get(e);r!==void 0&&(this.cache.delete(e),await r())}};var ece=class extends Gm{constructor(r){super();this.ctx=r}static{a(this,"GhostTextInlineCompletionManager")}async getInlineCompletionsResult(r,n,o={}){let s=this.ctx,c=0;o.selectedCompletionInfo?.text&&!o.selectedCompletionInfo.text.includes(")")&&(r=r.addSelectedCompletionInfo(o.selectedCompletionInfo),c=r.position.character-o.selectedCompletionInfo.range.end.character);let l=await l$t(s,r,n,o);if(l.type!=="success")return l;let[u,d]=l.value;if(n?.isCancellationRequested)return{type:"canceled",reason:"after getGhostText",telemetryData:{telemetryBlob:l.telemetryBlob}};let p=eIn(s,r.textDocument,r.position,d),h=sIn(s,u,d,r.textDocument,r.position,o.formattingOptions,p);if(h.length===0)return{type:"empty",reason:"no completions in final result",telemetryData:l.telemetryData};if(d!==2){r=r.applyEdits([{newText:h[0].insertText,range:h[0].range}]);let g={isSpeculative:!0,opportunityId:o.opportunityId},A=a(()=>l$t(s,r,void 0,g),"fn");s.get(Vw).set(h[0].clientCompletionId,A)}let m=h.map(g=>{let{start:A,end:y}=g.range,E=_n.Range.create(A,_n.Position.create(y.line,y.character-c));return{...g,range:E}});return{...l,value:m}}async getPrompt(r,n,o,s={}){let c=await this.getInlineCompletionsResult(tz(r,n),o,{...s,promptOnly:!0});if(c.type!=="promptOnly")throw new Error(`Unexpected result type ${c.type}`);return c.prompt}async getCompletions(r,n,o,s={}){this.logCompletionLocation(r,n);let c=await this.getInlineCompletionsResult(tz(r,n),o,s);return vvn(this.ctx,c)}logCompletionLocation(r,n){let o=r.getText({start:{line:Math.max(n.line-1,0),character:0},end:n}),s=r.getText({start:n,end:{line:Math.min(n.line+2,r.lineCount-1),character:r.lineCount-1>n.line?0:n.character}});HYe.debug(this.ctx,`Requesting for ${r.uri} at ${n.line}:${n.character}`,`between ${JSON.stringify(o)} and ${JSON.stringify(s)}.`)}triggerSpeculativeRequests(r){return this.ctx.get(Vw).request(r.clientCompletionId)}};var fdi=de(Agr()),pdi=de(Pnt()),hdi=de(KW()),z2e=de(nc()),vgr=de(so());var ygr=class extends vgr.Disposable{constructor(r){super();this.ctx=r;this.isMinimalMode=!0;this.permissiveGitHubSession=void 0;this._tokenChangedEverFired=!1;this._onDidAuthenticationChange=this._register(new z2e.Emitter);this.onDidAuthenticationChange=this._onDidAuthenticationChange.event;this._onDidAccessTokenChange=this._register(new z2e.Emitter);this.onDidAccessTokenChange=this._onDidAccessTokenChange.event;this._onDidAdoAuthenticationChange=this._register(new z2e.Emitter);this.onDidAdoAuthenticationChange=this._onDidAdoAuthenticationChange.event;this.anyGitHubSession=void 0;this._register(ss(r,()=>{this.fireTokenChanged()}))}static{a(this,"AuthServiceAdapter")}fireTokenChanged(){this._tokenChangedEverFired=!0,this._onDidAccessTokenChange.fire(),this._onDidAuthenticationChange.fire()}ensureTokenChangedFired(){this._tokenChangedEverFired||this.fireTokenChanged()}async getAnyGitHubSession(r){let n=await this.ctx.get(en).getSession();if(n!==void 0)return{id:n.login,accessToken:n.accessToken,account:{id:n.login,label:n.serverUrl},scopes:[]}}async getGitHubSession(r,n){if(r!=="permissive")return this.getAnyGitHubSession(n)}getPermissiveGitHubSession(r){return Promise.resolve(void 0)}get copilotToken(){let r=this.ctx.get(Ot).getLastToken();if(r!==void 0)return this.ensureTokenChangedFired(),gdt(r,this.ctx)}async getCopilotToken(r){let n=this.ctx.get(Ot);r&&n.resetToken("inline_completion_force_refresh");let o=await n.getToken();this.ensureTokenChangedFired();let s=await this.ctx.get(en).getSession();return gdt(o,this.ctx,s?.login)}resetCopilotToken(r){this.ctx.get(Ot).resetToken("inline_completion",r)}getAdoAccessTokenBase64(r){return Promise.resolve(void 0)}};function gdt(t,e,r){let n=t.envelope.refresh_in??Math.max(0,t.expiresAt-Math.floor(Date.now()/1e3));return new pdi.CopilotToken({token:t.envelope.token,expires_at:t.envelope.expires_at,refresh_in:n,user_notification:t.envelope.user_notification,organization_list:t.envelope.organization_list,code_quote_enabled:t.envelope.code_quote_enabled??!1,copilotignore_enabled:t.envelope.copilotignore_enabled??!1,endpoints:t.envelope.endpoints,limited_user_quotas:t.envelope.limited_user_quotas,enterprise_list:t.envelope.enterprise_list?t.envelope.enterprise_list.map(Number):void 0,sku:t.getTokenValue("sku")??"",individual:t.userInfo.isIndividualUser,blackbird_clientside_indexing:!1,code_review_enabled:t.isCopilotCodeReviewEnabled,codesearch:t.envelope.codesearch??!1,vsc_electron_fetcher_v2:t.envelope.vsc_electron_fetcher_v2??!1,public_suggestions:"unconfigured",telemetry:e.get(i0).isEnabled?"enabled":"disabled",username:r??"",isVscodeTeamMember:!1,copilot_plan:t.userInfo.copilotPlan,organization_login_list:t.userInfo.raw?.organization_login_list??[]})}a(gdt,"asChatLibCopilotToken");var Egr=class extends vgr.Disposable{constructor(r){super();this.ctx=r;this._onDidModelsRefresh=this._register(new z2e.Emitter);this.onDidModelsRefresh=this._onDidModelsRefresh.event;this._register(ss(r,()=>{this.models=void 0}))}static{a(this,"EndpointProviderAdapter")}async getAllModels(r=!1){if(this.models===void 0||r)try{let n=this.ctx.get(AT),o=await this.ctx.get(Ot).getToken();this.models=await n.fetchModels(o)??[],this._onDidModelsRefresh.fire()}catch(n){qo(this.ctx,n,"AvailableModelsManager.fetchModels"),this.models=[]}return this.models}async getAllCompletionModels(r){return(await this.getAllModels(r)).filter(o=>o.capabilities.type==="completion")}getAllChatEndpoints(){throw new Error("getAllChatEndpoints is not supported.")}getChatEndpoint(r){throw new Error("getChatEndpoint is not supported.")}getEmbeddingsEndpoint(r){throw new Error("getEmbeddingsEndpoint is not supported.")}},Cgr=class{constructor(e){this.ctx=e}static{a(this,"IgnoreServiceAdapter")}get isEnabled(){return this.ctx.get(bc).enabled}get isRegexExclusionsEnabled(){return!0}dispose(){}init(){return Promise.resolve()}async isCopilotIgnored(e,r){let n=e.toString();return(await this.ctx.get(zr).getTextDocumentValidation({uri:n})).status==="invalid"}asMinimatchPattern(){return Promise.resolve(void 0)}},_gr=class extends Gm{constructor(r){super();this.ctx=r;this._telemetrySender=new Y2e(this.ctx)}static{a(this,"ChatLibInlineCompletionManager")}get completionProvider(){return this._completionProvider||(this._completionProvider=this.createCompletionProvider()),this._completionProvider}createCompletionProvider(){let r=this.ctx,n=r.get(k0).matchFunction,o=new J2e(this.ctx.get(dr)),s=S8e(r),c={fetcher:o,authService:new ygr(r),telemetrySender:this._telemetrySender,logTarget:new K2e(r),isRunningInTest:q_(r),contextProviderMatch:a(async(l,u)=>await n(r,l,u),"contextProviderMatch"),languageContextProvider:void 0,statusHandler:r.get(Xs),documentManager:r.get(zr),workspace:r.get(hdi.ObservableWorkspace),urlOpener:r.get(ip),editorInfo:r.get(Nr).getEditorInfo(),editorPluginInfo:r.get(Nr).getEditorPluginInfo(),relatedPluginInfo:r.get(Nr).getRelatedPluginInfo(),editorSession:r.get(Ks),notificationSender:r.get(gc),ignoreService:new Cgr(r),waitForTreatmentVariables:!1,endpointProvider:new Egr(r),capiClientService:void 0,citationHandler:void 0,configOverrides:s};return(0,fdi.createInlineCompletionsProvider)(c)}async getCompletions(r,n,o,s={}){let c=await this.ctx.get(jt).fetchTokenAndUpdateExPValuesAndAssignments();return this._telemetrySender.updateExpConfig(c.filtersAndExp.exp),this.completionProvider.updateTreatmentVariables(c.filtersAndExp.exp.variables),this.asLocalResult(await this.completionProvider.getInlineCompletions(r,n,o,s),c)}asLocalResult(r,n){if(r!==void 0)return r.map(o=>({uuid:o.uuid,insertText:o.insertText,range:o.range,uri:o.uri,telemetry:new Gb({"abexp.assignmentcontext":n.filtersAndExp.exp.assignmentContext,...o.telemetry.properties},o.telemetry.measurements,o.telemetry.issuedTime,{filters:new w5(o.telemetry.filtersAndExp.filters.toHeaders()),exp:new gE(o.telemetry.filtersAndExp.exp.variables,n.filtersAndExp.exp.assignmentContext,o.telemetry.filtersAndExp.exp.features)}),displayText:o.displayText,position:o.position,offset:o.offset,index:o.index,resultType:o.resultType,copilotAnnotations:o.copilotAnnotations,clientCompletionId:o.clientCompletionId}))}triggerSpeculativeRequests(r){return this.completionProvider.inlineCompletionShown(r.clientCompletionId)}},Adt=class extends Gm{constructor(r){super();this.ctx=r}static{a(this,"ConfigurableInlineCompletionManager")}get ghostTextImpl(){return this._ghostTextImpl||(this._ghostTextImpl=new ece(this.ctx)),this._ghostTextImpl}get chatLibImpl(){return this._chatLibImpl||(this._chatLibImpl=new _gr(this.ctx)),this._chatLibImpl}async isChatLibEnabled(){let r=await this.ctx.get(jt).fetchTokenAndUpdateExPValuesAndAssignments();return vr(this.ctx,tt.UseChatLibCompletions)??this.ctx.get(jt).useChatLibCompletions(r)}async getCompletions(r,n,o,s={}){return await this.isChatLibEnabled()?this.chatLibImpl.getCompletions(r,n,o,s):this.ghostTextImpl.getCompletions(r,n,o,s)}async triggerSpeculativeRequests(r){return await this.isChatLibEnabled()?this.chatLibImpl.triggerSpeculativeRequests(r):this.ghostTextImpl.triggerSpeculativeRequests(r)}},Y2e=class{constructor(e){this.ctx=e;this.ctx=e}static{a(this,"TelemetrySender")}updateExpConfig(e){this._expConfig=e}sendTelemetryEvent(e,r,n){let o=this.asTelemetryData(r,n);WZ(this.ctx,e,o.properties,o.measurements,0),yi(this.ctx,e,lL(o.properties,zbe),o.measurements)}sendEnhancedTelemetryEvent(e,r,n){let o=this.asTelemetryData(r,n);WZ(this.ctx,e,o.properties,o.measurements,1)}asTelemetryData(e,r){let n=Object.fromEntries(Object.entries(e??{}).filter(([s,c])=>c!==void 0)),o=Object.fromEntries(Object.entries(r??{}).filter(([s,c])=>c!==void 0));return n["abexp.assignmentcontext"]===void 0&&this._expConfig?.assignmentContext!==void 0&&(n["abexp.assignmentcontext"]=this._expConfig.assignmentContext),yt.createAndMarkAsIssued(n,o)}};f();var Ofe=de(LJ()),mdi=de(t2()),bgr=de(cJe()),Cdt=de(KW()),gdi=de(es()),Adi=de(Gw()),X2e=de(aA()),Edt=de(ZE()),Tgr=de(Fu()),ydi=de(Qv()),Edi=de(Nn());f();var ydt=class{constructor(e){this.ctx=e;this._onDidOpenTextDocument=new ki;this._onDidChangeTextDocument=new ki;this._onDidCloseTextDocument=new ki;this._onDidSelectTextDocument=new ki;this.onDidOpenTextDocument=this._onDidOpenTextDocument.event;this.onDidChangeTextDocument=this._onDidChangeTextDocument.event;this.onDidCloseTextDocument=this._onDidCloseTextDocument.event;this.onDidSelectTextDocument=this._onDidSelectTextDocument.event;this.bufferedEvents=[];this.forwardedAsOpen=new Set;this.started=!1;this.documentManager=this.ctx.get(zr)}static{a(this,"DocumentChangeFilter")}start(){if(!this.started){this.started=!0;for(let e of this.documentManager.getTextDocumentsUnsafe())this.bufferedEvents.push({type:"addition",event:{document:{uri:e.uri,languageId:e.clientLanguageId,version:e.version,text:e.getText()}}});this.documentManager.onDidOpenTextDocument(e=>{this.bufferedEvents.push({type:"addition",event:e})}),this.documentManager.onDidChangeTextDocument(e=>{this.bufferedEvents.push({type:"change",event:e})}),this.documentManager.onDidCloseTextDocument(e=>{this.bufferedEvents.push({type:"removal",event:e})})}}addSelectionEvent(e){this.bufferedEvents.push({type:"selection",event:e})}async syncSafeDocuments(){let e=[...this.bufferedEvents];this.bufferedEvents.length=0;for(let r of e){let n=r.type==="selection"?r.event.uri:r.event.document.uri;if(r.type==="removal"){this.forwardedAsOpen.has(n)&&(this.forwardedAsOpen.delete(n),this._onDidCloseTextDocument.fire(r.event));continue}let o=await this.documentManager.getTextDocument({uri:n});if(o===void 0){this.forwardedAsOpen.has(n)&&(this.forwardedAsOpen.delete(n),this._onDidCloseTextDocument.fire({document:{uri:n}}));continue}r.type==="addition"?(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire(r.event)):r.type==="change"?this.forwardedAsOpen.has(n)?this._onDidChangeTextDocument.fire(r.event):(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire({document:{uri:o.clientUri,languageId:o.clientLanguageId,version:o.version,text:o.getText()}})):r.type==="selection"&&(this.forwardedAsOpen.has(n)||(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire({document:{uri:o.clientUri,languageId:o.clientLanguageId,version:o.version,text:o.getText()}})),this._onDidSelectTextDocument.fire(r.event))}}};var Bfe=class extends Cdt.ObservableWorkspace{constructor(r,n,o){super();this._openDocuments=(0,Adi.observableValue)(this,[]);this.openDocuments=this._openDocuments;this._documents=new Map;this.ctx=r,n&&(this.documentChangeFilter=new ydt(r)),this._started=!1,o||this.start()}static{a(this,"ObservableLspWorkspace")}start(){if(this._started)return;this._started=!0;let r=this.ctx.get(zr);if(this.documentChangeFilter)this.documentChangeFilter.start();else for(let o of r.getTextDocumentsUnsafe())this.addLspDocument(o.uri,o.clientLanguageId,o.getText());let n=this.documentChangeFilter??r;n.onDidOpenTextDocument(o=>{this.addLspDocument(o.document.uri,o.document.languageId,o.document.text)}),n.onDidCloseTextDocument(o=>{this.removeClosedLspDocument(o.document.uri)}),n.onDidChangeTextDocument(o=>{this.onDidChangeLspDocument(o.document.uri,o.contentChanges)}),this.documentChangeFilter?.onDidSelectTextDocument(o=>{let s=Ofe.DocumentId.create(ha(o.uri)),c=this._documents.get(s);c&&c.updateSelectionFromLspPosition(o.position)})}addLspDocument(r,n,o){let s=Ofe.DocumentId.create(ha(ha(r)));return this.addDocument({id:s,initialValue:o,languageId:bgr.LanguageId.create(n)},void 0)}onDidChangeLspDocument(r,n){let o=Ofe.DocumentId.create(ha(ha(r))),s=this._documents.get(o);s&&s.applyLspContentChanges(n)}onUserPositionChange(r,n){if(this.documentChangeFilter)this.documentChangeFilter.addSelectionEvent({uri:r,position:n});else{let o=Ofe.DocumentId.create(ha(r)),s=this._documents.get(o);s&&s.updateSelectionFromLspPosition(n)}}removeClosedLspDocument(r){let n=Ofe.DocumentId.create(ha(r));this._documents.get(n)?.dispose()}addDocument(r,n=void 0){let o=this._documents.get(r.id);if(o)return o;let s=new Sgr(r.id,new ydi.StringText(r.initialValue??""),[],r.languageId??bgr.LanguageId.PlainText,()=>{this._documents.delete(r.id);let c=this._openDocuments.get(),l=c.filter(u=>u.id!==s.id);l.length!==c.length&&this._openDocuments.set(l,n,{added:[],removed:[s]})},r.workspaceRoot);return this._documents.set(r.id,s),this._openDocuments.set([...this._openDocuments.get(),s],n,{added:[s],removed:[]}),s}getDocument(r){return this._documents.get(r)}clear(){this._openDocuments.set([],void 0,{added:[],removed:this._openDocuments.get()});for(let r of this._documents.values())r.dispose();this._documents.clear()}getWorkspaceRoot(r){return this._documents.get(r)?.workspaceRoot}async syncSafeDocuments(){this.start(),await this.documentChangeFilter?.syncSafeDocuments()}},Sgr=class extends Cdt.MutableObservableDocument{static{a(this,"MutableObservableLspDocument")}constructor(e,r,n,o,s,c){super(e,r,n,o,s,0,c)}applyLspContentChanges(e){let r=this.editFromLspContentChanges(e);this.applyEdit(r.compose(),void 0)}updateSelectionFromLspPosition(e){let r=this.value.get().getTransformer().getOffset(new Edt.Position(e.lineNumber+1,e.column+1));this.updateSelection([new Tgr.OffsetRange(r,r)])}editFromLspContentChanges(e){return new mdi.Edits(X2e.StringEdit,e.map((n,o)=>this.editFromLspContentChange(n,o)))}editFromLspContentChange(e,r){if(Edi.TextDocumentContentChangeEvent.isIncremental(e)){let n=this.value.get().getTransformer(),o=n.getOffset(new Edt.Position(e.range.start.line+1,e.range.start.character+1)),s=n.getOffset(new Edt.Position(e.range.end.line+1,e.range.end.character+1));if(o>s){let c=this.value.get().value,l=c.split(/\r\n|\n/).length,u=c.split(/\r\n|\r|\n/).length,d=new gdi.BugIndicatingError(`Invalid range: [${o}, ${s}) from ${JSON.stringify(e.range)}. Line counts: nes=${l}, lsp=${u}`);throw lu?d.code="ObservableWorkspace_TooManyLines":d.code="ObservableWorkspace_InvalidRange",d.code+=r>0?"_SubsequentChange":"_FirstChange",d}return X2e.StringEdit.single(new X2e.StringReplacement(new Tgr.OffsetRange(o,s),e.text))}throw new Error("Full replacement edits are not supported")}};var k3=de(Agr()),_di=de(LJ()),Igr=de(KW()),vdi=de(ig()),bdi=de(gut()),Tdi=de(nc()),xgr=require("node:stream");var Cdi=10,LIa={[k3.LogLevel.Off]:4,[k3.LogLevel.Trace]:4,[k3.LogLevel.Debug]:4,[k3.LogLevel.Info]:3,[k3.LogLevel.Warning]:2,[k3.LogLevel.Error]:1},K2e=class{constructor(e){this.ctx=e}static{a(this,"ForwardingLogTarget")}logIt(e,r,...n){this.ctx.get(Cd).logIt(this.ctx,LIa[e],r,...n)}},_b=class{constructor(e){this.lastResultsById=new $r(Cdi);this.lastResultsByUri=new $r(Cdi);this.ctx=e,this.telemetrySender=new Y2e(this.ctx)}static{a(this,"NextEditSuggestionsManager")}async handleNextEditRequest(e,r,n){let o=await(this.nextEditProvider??=this.createNextEditProvider()),s=this.ctx.get(Igr.ObservableWorkspace);if(s instanceof Bfe&&await s.syncSafeDocuments(),!this.shouldUseExplicitRejection()){let y=this.lastResultsByUri.get(e);y&&(this.lastResultsByUri.delete(e),this.lastResultsById.delete(y.resultId),y.isShown&&o.handleRejection(y.nextEditResult))}let c=_di.DocumentId.create(ha(e)),l=await this.ctx.get(jt).fetchTokenAndUpdateExPValuesAndAssignments();o.updateTreatmentVariables(l.filtersAndExp.exp.variables),this.telemetrySender.updateExpConfig(l.filtersAndExp.exp);let u=await o.getNextEdit(c.toUri(),n);if(u.result==null)return;let d=await this.ctx.get(zr).getTextDocument({uri:e});if(!d)return;let p=d.positionAt(u.result.range.start),h=d.positionAt(u.result.range.endExclusive),m=yr(),g={resultId:m,nextEditResult:u,documentId:c,isShown:!1};return this.lastResultsById.set(m,g),this.lastResultsByUri.set(e,g),[{edit:{text:u.result.newText,range:{start:p,end:h},textDocument:{uri:e,version:r}},id:m}]}async handleAcceptance(e){let r=await this.nextEditProvider,n=this.lastResultsById.get(e);!r||!n||(this.lastResultsByUri.delete(n.documentId.uri),this.lastResultsById.delete(n.resultId),await r.handleAcceptance(n.nextEditResult))}async handleRejection(e){await this.doHandleDismiss(e,!0)}async handleIgnored(e){await this.doHandleDismiss(e,!1)}async doHandleDismiss(e,r){if(!this.shouldUseExplicitRejection())return;let n=await this.nextEditProvider,o=this.lastResultsById.get(e);!n||!o||(this.lastResultsByUri.delete(o.documentId.uri),this.lastResultsById.delete(o.resultId),o.isShown&&(r?n.handleRejection(o.nextEditResult):n.handleIgnored(o.nextEditResult,void 0)))}async handleShown(e){let r=await this.nextEditProvider,n=this.lastResultsById.get(e);!r||!n||(n.isShown=!0,r.handleShown(n.nextEditResult))}async createNextEditProvider(){let e=this.ctx.get(Igr.ObservableWorkspace),r=new J2e(this.ctx.get(dr)),n=new wgr(this.ctx),o=S8e(this.ctx);return(0,k3.createNESProvider)({configOverrides:o,workspace:e,fetcher:r,copilotTokenManager:n,terminalService:bdi.NullTerminalService.Instance,telemetrySender:this.telemetrySender,logTarget:new K2e(this.ctx)})}shouldUseExplicitRejection(){return vr(this.ctx,tt.NESUseExplicitRejection)}},wgr=class{constructor(e){this._ctx=e;this.didChangeTokenResult=new Tdi.Emitter;this.onDidCopilotTokenRefresh=this.didChangeTokenResult.event;this._ctx.get(Ot).onDidChangeTokenResult(()=>{this.didChangeTokenResult.fire()})}static{a(this,"CopilotTokenManagerAdapter")}async getCopilotToken(e){let r=this._ctx.get(Ot);e&&r.resetToken("nes_force_refresh");let n=await r.getToken(),o=await this._ctx.get(en).getSession();return gdt(n,this._ctx,o?.login)}resetCopilotToken(e){this._ctx.get(Ot).resetToken("nes",e)}},J2e=class{constructor(e){this._delegate=e}static{a(this,"FetcherAdapter")}getUserAgentLibrary(){return this._delegate.name}async fetch(e,r){let n={headers:r.headers,body:r.body,timeout:r.timeout,json:r.json,method:r.method,signal:r.signal},o=await this._delegate.fetch(e,n),s=o.body(),c=null;return s&&(s instanceof xgr.Readable?c=xgr.Readable.toWeb(s):c=s),new vdi.Response(o.status,o.statusText,o.headers,c,this.fetcherId(),()=>{},yr(),new URL(e).hostname)}fetcherId(){switch(this._delegate.name){case"EditorFetcher":case"ElectronFetcher":return"electron-fetch";case"FetchFetcher":case"NodeFetchFetcher":return"node-fetch";case"FakeFetcher":return"test-stub";default:return"helix-fetch"}}async disconnectAll(){return this._delegate.disconnectAll()}makeAbortController(){return new AbortController}isAbortError(e){return e&&e.name==="AbortError"}isInternetDisconnectedError(e){return!1}isFetcherError(e){return Pb(e)}isNetworkProcessCrashedError(e){return!1}getUserMessageForFetcherError(e){return`Fetcher error: ${e.message}`}async fetchWithPagination(e,r){let n=[],o=r.pageSize??20,s=r.startPage??1,c=!1;do{let l=r.buildUrl(e,o,s),u=await this.fetch(l,r);if(!u.ok)return n;let d=await u.json(),p=r.getItemsFromResponse(d);n.push(...p),c=p.length===o,s++}while(c);return n}};var FIa="github.copilot.didAcceptNextEditSuggestionItem",Rgr=class extends kS{constructor(){super(...arguments);this.name=FIa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptCommand")}async handle(r,[n]){return await this.ctx.get(_b).handleAcceptance(n),!0}},UIa="github.copilot.didRejectNextEditSuggestionItem",Pgr=class extends kS{constructor(){super(...arguments);this.name=UIa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidRejectCommand")}async handle(r,[n]){return await this.ctx.get(_b).handleRejection(n),!0}},QIa="github.copilot.didIgnoreNextEditSuggestionItem",kgr=class extends kS{constructor(){super(...arguments);this.name=QIa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidIgnoreCommand")}async handle(r,[n]){return await this.ctx.get(_b).handleIgnored(n),!0}},Sdi=[Rgr,Pgr,kgr];f();var Dgr="github.copilot.didAcceptPanelCompletionItem",Ngr=class extends kS{constructor(){super(...arguments);this.name=Dgr;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptPanelCompletionItemCommand")}handle(r,n){let[o]=n,c=this.ctx.get(Cl).get(o);return c?(TTe(this.ctx,c.triggerCategory,c.displayText,c.offset,c.uri,c.telemetry,{compType:"full",acceptedLength:c.displayText.length,acceptedLines:_7(c.displayText)},c.copilotAnnotations),!0):!1}},Idi=[Ngr];var qIa=[...nIn,...iIn,...Sdi,...Idi];function xdi(t,e){let r=new Map;for(let n of qIa){let o=new n(t),s=Ol.Compile(o.arguments);r.set(o.name,{typeCheck:s,command:o})}return e.onExecuteCommand((n,o)=>{let s=r.get(n.command);if(!s)throw new Error(`Unknown command: ${n.command}`);let c=N3(n.arguments??[]);if(c.length0}async markInstalled(e){let r=e.get(Nr).getEditorPluginInfo();await e.get(Si).update("versions",r.name,r.version)}wasPreviouslyInstalled(e){return Promise.resolve(!1)}async isNewUpgrade(e){try{let r=e.get(Nr).getEditorPluginInfo(),n=await e.get(Si).read("versions",r.name);return n===void 0&&await this.hasPersistedSettings(e)?!0:(0,Z2e.gt)((0,Z2e.coerce)(r.version),(0,Z2e.coerce)(n))}catch{return!1}}async markUpgraded(e){await this.markInstalled(e)}async uninstall(e){await super.uninstall(e);let r=e.get(Nr).getEditorPluginInfo();await e.get(Si).delete("versions",r.name),(await e.get(Si).listKeys("versions")).length===0&&await e.get(Si).deleteSetting("versions")}};f();var Ndi=require("crypto"),Mgr=de(require("path")),Ffe=de(Su());var jIa={watchedFiles:[],contentRestrictedFiles:[],unknownFileExtensions:[]},$Ia=new Ffe.ProgressType,c5=class t{constructor(e){this.ctx=e;this.#e=new ki;this.onDidChangeWatchedFiles=this.#e.event}static{a(this,"LspFileWatcher")}#e;static{this.requestType=new Ffe.ProtocolRequestType("copilot/watchedFiles")}get connection(){return this.ctx.get(Ar).connection}init(){this.ctx.get(Fn).getCapabilities().watchedFiles&&this.connection.onNotification(Ffe.DidChangeWatchedFilesNotification.type,r=>{"workspaceUri"in r&&typeof r.workspaceUri=="string"&&this.didChangeWatchedFilesHandler(r)})}async getWatchedFiles(e){if(!this.ctx.get(Fn).getCapabilities().watchedFiles)return jIa;let n=await this.fetchWatchedFileEntries(e);return this.buildWatchedFilesResponse(n)}async didChangeWatchedFilesHandler(e){let r=[],n=[],o=[];for(let s of e.changes){let c=s.uri,l={uri:c,isRestricted:!1,isUnknownFileExtension:!1},u=Mgr.extname(s.uri).toLowerCase();if(!aj.includes(u))l.isUnknownFileExtension=!0;else{let d=await this.getValidDocument(c);d===void 0?l.isRestricted=!0:l.document=d}switch(s.type){case 1:n.push(l);break;case 2:r.push(l);break;case 3:o.push(l);break}}this.#e.fire({workspaceFolder:{uri:e.workspaceUri},created:n,changed:r,deleted:o})}async getValidDocument(e){let n=await this.ctx.get(In).getOrReadTextDocument({uri:e});return n.status==="valid"?n.document:void 0}async fetchWatchedFileEntries(e){let r=e.partialResultToken??(0,Ndi.randomUUID)(),n=[],o=this.connection.onProgress($Ia,r,s=>{s?.files?.length&&n.push(...s.files)});try{let s=await this.connection.sendRequest(t.requestType,{...e,partialResultToken:r});Array.isArray(s.files)&&n.push(...s.files)}finally{o.dispose()}return n}async buildWatchedFilesResponse(e){let r=[],n=[],o=[],s=new Set;for(let c of e){let l=typeof c=="string"?c:c?.uri;if(!l||s.has(l))continue;s.add(l);let u=Mgr.extname(l).toLowerCase();if(!aj.includes(u)){o.push({uri:l});continue}let d=await this.getValidDocument(l);if(d===void 0){n.push({uri:l});continue}r.push(d)}return{watchedFiles:r,contentRestrictedFiles:n,unknownFileExtensions:o}}};f();f();f();var buf=S.Union([S.String(),S.Number()]),lE=S.String(),Sdt=S.Optional(S.Union([S.Literal("low"),S.Literal("medium"),S.Literal("high"),S.Literal("xhigh")]));async function kA(t){try{return[await t(),null]}catch(e){return[null,{code:lt.InternalError,message:e instanceof Error?e.message:String(e)}]}}a(kA,"withServiceErrorHandling");var Ddi=new Se("BackgroundAgent.create"),VIa=S.Object({systemMessage:S.Optional(S.String()),model:S.Optional(S.String()),reasoningEffort:Sdt,workspaceFolders:S.Optional(S.Array(S.Object({uri:S.String(),name:S.Optional(S.String())}))),tools:S.Optional(S.Array(S.String()))});async function WIa(t,e,r){Ddi.info(t,"handleBackgroundAgentCreate called",{model:r.model,workspaceFolders:r.workspaceFolders});let n=t.get(Lu),o={systemMessage:r.systemMessage,model:r.model,reasoningEffort:r.reasoningEffort,workspaceFolders:r.workspaceFolders,availableTools:r.tools};return kA(async()=>{let s=await n.createSession(o);return Ddi.info(t,"createSession succeeded:",s.sessionId),{sessionId:s.sessionId,workspacePath:s.workspacePath}})}a(WIa,"handleBackgroundAgentCreateChecked");var Mdi=He(VIa,WIa);f();var zIa=S.Object({sessionId:lE});async function YIa(t,e,r){let n=t.get(Lu);return kA(async()=>({success:(await n.destroySession({sessionId:r.sessionId})).success}))}a(YIa,"handleBackgroundAgentDestroyChecked");var Odi=He(zIa,YIa);f();var KIa=new Se("BackgroundAgent.interaction"),JIa=S.Union([S.Object({kind:S.Literal("approved")}),S.Object({kind:S.Literal("denied-by-rules"),rules:S.Array(S.Unknown())}),S.Object({kind:S.Literal("denied-no-approval-rule-and-could-not-request-from-user")}),S.Object({kind:S.Literal("denied-interactively-by-user"),feedback:S.Optional(S.String())}),S.Object({kind:S.Literal("denied-by-content-exclusion-policy"),path:S.String(),message:S.String()})]),XIa=S.Object({answer:S.String(),wasFreeform:S.Boolean()}),ZIa=S.Object({action:S.Union([S.Literal("accept"),S.Literal("decline"),S.Literal("cancel")]),content:S.Optional(S.Record(S.String(),S.Union([S.String(),S.Number(),S.Boolean(),S.Array(S.String())])))}),exa=S.Object({approved:S.Boolean(),selectedAction:S.Optional(S.Union([S.Literal("exit_only"),S.Literal("interactive"),S.Literal("autopilot"),S.Literal("autopilot_fleet")])),autoApproveEdits:S.Optional(S.Boolean()),feedback:S.Optional(S.String())}),txa=S.Union([S.Object({handled:S.Literal(!0),stopProcessingQueue:S.Optional(S.Boolean())}),S.Object({handled:S.Literal(!1)})]),rxa=S.Union([S.String(),S.Object({textResultForLlm:S.String(),binaryResultsForLlm:S.Optional(S.Array(S.Object({data:S.String(),mimeType:S.String(),type:S.String(),description:S.Optional(S.String())}))),resultType:S.Union([S.Literal("success"),S.Literal("failure"),S.Literal("rejected"),S.Literal("denied")]),error:S.Optional(S.String())})]),nxa=S.Union([S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("permission"),result:JIa}),S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("user_input"),response:XIa}),S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("elicitation"),response:ZIa}),S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("exit_plan_mode"),response:exa}),S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("queued_command"),result:txa}),S.Object({sessionId:lE,requestId:S.String(),type:S.Literal("external_tool"),result:rxa})]);async function ixa(t,e,r){KIa.info(t,"handleBackgroundAgentInteraction called",{sessionId:r.sessionId,type:r.type,requestId:r.requestId});let n=t.get(Lu);return kA(async()=>await n.handleInteraction(r))}a(ixa,"handleBackgroundAgentInteractionChecked");var Bdi=He(nxa,ixa);f();var Ldi=new Se("BackgroundAgent.listSessions"),oxa=S.Object({cwd:S.Optional(S.String()),gitRoot:S.Optional(S.String()),repository:S.Optional(S.String()),branch:S.Optional(S.String())});async function sxa(t,e,r){Ldi.info(t,"handleBackgroundAgentSessionsList called",r);let n=t.get(Lu);return kA(async()=>{let o=await n.listSessions(r);return Ldi.info(t,"listSessions succeeded, returning",o.sessions.length,"sessions"),o})}a(sxa,"handleBackgroundAgentSessionsListChecked");var Fdi=He(oxa,sxa);f();var Udi=new Se("BackgroundAgent.listModels"),axa=S.Object({forceRefresh:S.Optional(S.Boolean())});async function cxa(t,e,r){Udi.info(t,"handleBackgroundAgentListModels called",{forceRefresh:r.forceRefresh});let n=t.get(Lu);return kA(async()=>{let o=await n.listModels(r.forceRefresh);return Udi.info(t,"listModels succeeded, returning",o.models.length,"models"),o})}a(cxa,"handleBackgroundAgentListModelsChecked");var Qdi=He(axa,cxa);f();var qdi=new Se("BackgroundAgent.resume"),lxa=S.Object({sessionId:lE,model:S.Optional(S.String()),reasoningEffort:Sdt,streaming:S.Optional(S.Boolean())});async function uxa(t,e,r){qdi.info(t,"handleBackgroundAgentResume called",{sessionId:r.sessionId,model:r.model});let n=t.get(Lu),o={sessionId:r.sessionId,model:r.model,reasoningEffort:r.reasoningEffort,streaming:r.streaming};return kA(async()=>{let s=await n.resumeSession(o);return qdi.info(t,"resumeSession succeeded:",s.sessionId),{sessionId:s.sessionId,workspacePath:s.workspacePath,events:s.events}})}a(uxa,"handleBackgroundAgentResumeChecked");var Gdi=He(lxa,uxa);f();var dxa=S.Object({sessionId:lE,message:S.String(),model:S.Optional(S.String()),references:S.Optional(S.Array(IF))});async function fxa(t,e,r){let n=t.get(Lu),o={sessionId:r.sessionId,message:r.message,model:r.model,references:r.references};return kA(async()=>({messageId:(await n.sendMessage(o,e)).messageId}))}a(fxa,"handleBackgroundAgentSendChecked");var Hdi=He(dxa,fxa);f();var pxa=new Se("BackgroundAgent.stop"),hxa=S.Object({sessionId:lE});async function mxa(t,e,r){pxa.info(t,"handleBackgroundAgentStop called",{sessionId:r.sessionId});let n=t.get(Lu);return kA(async()=>(await n.stopSession(r.sessionId),{success:!0}))}a(mxa,"handleBackgroundAgentStopChecked");var jdi=He(hxa,mxa);f();var gxa=S.Object({providerName:S.String()});async function Axa(t,e,r){try{let{providerName:n}=r,o=rF(n);if(o!==0)return[null,{code:lt.InvalidParams,message:`deleteApiKey is only supported for providers with GlobalApiKey auth type. Provider ${n} has auth type: ${o}`}];let s=new tc(t.get(Si));return await s.removeAllModelConfigs(n),await s.deleteAPIKey(n,o),[{success:!0,message:`API key and all model configurations deleted successfully for provider ${n}`},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to delete API key: ${n instanceof Error?n.message:String(n)}`}]}}a(Axa,"handleBYOKDeleteApiKeyChecked");var $di=He(gxa,Axa);f();var yxa=S.Object({providerName:S.String(),modelId:S.String()});async function Exa(t,e,r){try{let n=new tc(t.get(Si)),{providerName:o,modelId:s}=r,c=rF(o);return await n.removeModelConfig(o,s),c===1&&await n.deleteAPIKey(o,c,s),[{success:!0,message:`Model ${s} deleted successfully for provider ${o}`},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to delete model: ${n instanceof Error?n.message:String(n)}`}]}}a(Exa,"handleBYOKDeleteModelChecked");var Vdi=He(yxa,Exa);f();var Cxa=S.Object({providerName:S.Optional(S.String()),modelId:S.Optional(S.String())});async function _xa(t,e,r){try{let n=new tc(t.get(Si)),{providerName:o,modelId:s}=r;if(!o){let l=t.get(Si),u=await l.listKeys("byok"),d=[];for(let p of u)if(p.endsWith("-api-key")){let h=await l.read("byok",p);if(h){let g=p.replace("-api-key","").split("-");if(g.length===1)d.push({providerName:g[0],apiKey:h});else if(g.length>=2){let A=g[0],y=g.slice(1).join("-");d.push({providerName:A,modelId:y,apiKey:h})}}}return[{apiKeys:d},null]}return[{apiKeys:[{apiKey:await n.getAPIKey(o,s)||void 0,providerName:o,modelId:s}]},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to get API key: ${n instanceof Error?n.message:String(n)}`}]}}a(_xa,"handleBYOKListApiKeysChecked");var Wdi=He(Cxa,_xa);f();f();f();f();f();f();function ui(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r}a(ui,"__classPrivateFieldSet");function Lt(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}a(Lt,"__classPrivateFieldGet");f();var Ogr=a(function(){let{crypto:t}=globalThis;if(t?.randomUUID)return Ogr=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),r=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))},"uuid4");f();f();f();function M3(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}a(M3,"isAbortError");var ePe=a(t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)},"castToError");var si=class extends Error{static{a(this,"AnthropicError")}},Kh=class t extends si{static{a(this,"APIError")}constructor(e,r,n,o){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=o,this.requestID=o?.get("request-id"),this.error=r}static makeMessage(e,r,n){let o=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return e&&o?`${e} ${o}`:e?`${e} status code (no body)`:o||"(no status code or body)"}static generate(e,r,n,o){if(!e||!o)return new tq({message:n,cause:ePe(r)});let s=r;return e===400?new Qfe(e,s,n,o):e===401?new qfe(e,s,n,o):e===403?new Gfe(e,s,n,o):e===404?new Hfe(e,s,n,o):e===409?new jfe(e,s,n,o):e===422?new $fe(e,s,n,o):e===429?new Vfe(e,s,n,o):e>=500?new Wfe(e,s,n,o):new t(e,s,n,o)}},cg=class extends Kh{static{a(this,"APIUserAbortError")}constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},tq=class extends Kh{static{a(this,"APIConnectionError")}constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},Ufe=class extends tq{static{a(this,"APIConnectionTimeoutError")}constructor({message:e}={}){super({message:e??"Request timed out."})}},Qfe=class extends Kh{static{a(this,"BadRequestError")}},qfe=class extends Kh{static{a(this,"AuthenticationError")}},Gfe=class extends Kh{static{a(this,"PermissionDeniedError")}},Hfe=class extends Kh{static{a(this,"NotFoundError")}},jfe=class extends Kh{static{a(this,"ConflictError")}},$fe=class extends Kh{static{a(this,"UnprocessableEntityError")}},Vfe=class extends Kh{static{a(this,"RateLimitError")}},Wfe=class extends Kh{static{a(this,"InternalServerError")}};var bxa=/^[a-z][a-z0-9+.-]*:/i,zdi=a(t=>bxa.test(t),"isAbsoluteURL"),Bgr=a(t=>(Bgr=Array.isArray,Bgr(t)),"isArray"),Lgr=Bgr;function Fgr(t){return typeof t!="object"?{}:t??{}}a(Fgr,"maybeObj");function Ydi(t){if(!t)return!0;for(let e in t)return!1;return!0}a(Ydi,"isEmptyObj");function Kdi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a(Kdi,"hasOwn");var Jdi=a((t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new si(`${t} must be an integer`);if(e<0)throw new si(`${t} must be a positive integer`);return e},"validatePositiveInteger");var Idt=a(t=>{try{return JSON.parse(t)}catch{return}},"safeJSON");f();var Xdi=a(t=>new Promise(e=>setTimeout(e,t)),"sleep");f();f();var rq="0.56.0";var rfi=a(()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u","isRunningInBrowser");function Txa(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}a(Txa,"getDetectedPlatform");var Sxa=a(()=>{let t=Txa();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":rq,"X-Stainless-OS":efi(Deno.build.os),"X-Stainless-Arch":Zdi(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":rq,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":rq,"X-Stainless-OS":efi(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Zdi(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=Ixa();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":rq,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":rq,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},"getPlatformProperties");function Ixa(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:r}of t){let n=r.exec(navigator.userAgent);if(n){let o=n[1]||0,s=n[2]||0,c=n[3]||0;return{browser:e,version:`${o}.${s}.${c}`}}}return null}a(Ixa,"getBrowserInfo");var Zdi=a(t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown","normalizeArch"),efi=a(t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),"normalizePlatform"),tfi,nfi=a(()=>tfi??(tfi=Sxa()),"getPlatformHeaders");f();function ifi(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}a(ifi,"getDefaultFetch");function Ugr(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}a(Ugr,"makeReadableStream");function xdt(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return Ugr({start(){},async pull(r){let{done:n,value:o}=await e.next();n?r.close():r.enqueue(o)},async cancel(){await e.return?.()}})}a(xdt,"ReadableStreamFrom");function tPe(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let r=await e.read();return r?.done&&e.releaseLock(),r}catch(r){throw e.releaseLock(),r}},async return(){let r=e.cancel();return e.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}a(tPe,"ReadableStreamToAsyncIterable");async function ofi(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),r=e.cancel();e.releaseLock(),await r}a(ofi,"CancelReadableStream");f();var sfi=a(({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),"FallbackEncoder");f();f();f();f();f();function lfi(t){let e=0;for(let o of t)e+=o.length;let r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}a(lfi,"concatBytes");var afi;function rPe(t){let e;return(afi??(e=new globalThis.TextEncoder,afi=e.encode.bind(e)))(t)}a(rPe,"encodeUTF8");var cfi;function Qgr(t){let e;return(cfi??(e=new globalThis.TextDecoder,cfi=e.decode.bind(e)))(t)}a(Qgr,"decodeUTF8");var vb,bb,O3=class{static{a(this,"LineDecoder")}constructor(){vb.set(this,void 0),bb.set(this,void 0),ui(this,vb,new Uint8Array,"f"),ui(this,bb,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?rPe(e):e;ui(this,vb,lfi([Lt(this,vb,"f"),r]),"f");let n=[],o;for(;(o=Rxa(Lt(this,vb,"f"),Lt(this,bb,"f")))!=null;){if(o.carriage&&Lt(this,bb,"f")==null){ui(this,bb,o.index,"f");continue}if(Lt(this,bb,"f")!=null&&(o.index!==Lt(this,bb,"f")+1||o.carriage)){n.push(Qgr(Lt(this,vb,"f").subarray(0,Lt(this,bb,"f")-1))),ui(this,vb,Lt(this,vb,"f").subarray(Lt(this,bb,"f")),"f"),ui(this,bb,null,"f");continue}let s=Lt(this,bb,"f")!==null?o.preceding-1:o.preceding,c=Qgr(Lt(this,vb,"f").subarray(0,s));n.push(c),ui(this,vb,Lt(this,vb,"f").subarray(o.index),"f"),ui(this,bb,null,"f")}return n}flush(){return Lt(this,vb,"f").length?this.decode(` -`):[]}};vb=new WeakMap,bb=new WeakMap;O3.NEWLINE_CHARS=new Set([` -`,"\r"]);O3.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Rxa(t,e){for(let o=e??0;o{if(t){if(Kdi(Rdt,t))return t;Jh(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(Rdt))}`)}},"parseLogLevel");function nPe(){}a(nPe,"noop");function wdt(t,e,r){return!e||Rdt[t]>Rdt[r]?nPe:e[t].bind(e)}a(wdt,"makeLogFn");var Pxa={error:nPe,warn:nPe,info:nPe,debug:nPe},dfi=new WeakMap;function Jh(t){let e=t.logger,r=t.logLevel??"off";if(!e)return Pxa;let n=dfi.get(e);if(n&&n[0]===r)return n[1];let o={error:wdt("error",e,r),warn:wdt("warn",e,r),info:wdt("info",e,r),debug:wdt("debug",e,r)};return dfi.set(e,[r,o]),o}a(Jh,"loggerFor");var B3=a(t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,r])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t),"formatRequestDetails");var iPe,l5=class t{static{a(this,"Stream")}constructor(e,r,n){this.iterator=e,iPe.set(this,void 0),this.controller=r,ui(this,iPe,n,"f")}static fromSSEResponse(e,r,n){let o=!1,s=n?Jh(n):console;async function*c(){if(o)throw new si("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let l=!1;try{for await(let u of kxa(e,r)){if(u.event==="completion")try{yield JSON.parse(u.data)}catch(d){throw s.error("Could not parse message into JSON:",u.data),s.error("From chunk:",u.raw),d}if(u.event==="message_start"||u.event==="message_delta"||u.event==="message_stop"||u.event==="content_block_start"||u.event==="content_block_delta"||u.event==="content_block_stop")try{yield JSON.parse(u.data)}catch(d){throw s.error("Could not parse message into JSON:",u.data),s.error("From chunk:",u.raw),d}if(u.event!=="ping"&&u.event==="error")throw new Kh(void 0,Idt(u.data)??u.data,void 0,e.headers)}l=!0}catch(u){if(M3(u))return;throw u}finally{l||r.abort()}}return a(c,"iterator"),new t(c,r,n)}static fromReadableStream(e,r,n){let o=!1;async function*s(){let l=new O3,u=tPe(e);for await(let d of u)for(let p of l.decode(d))yield p;for(let d of l.flush())yield d}a(s,"iterLines");async function*c(){if(o)throw new si("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let l=!1;try{for await(let u of s())l||u&&(yield JSON.parse(u));l=!0}catch(u){if(M3(u))return;throw u}finally{l||r.abort()}}return a(c,"iterator"),new t(c,r,n)}[(iPe=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),o=a(s=>({next:a(()=>{if(s.length===0){let c=n.next();e.push(c),r.push(c)}return s.shift()},"next")}),"teeIterator");return[new t(()=>o(e),this.controller,Lt(this,iPe,"f")),new t(()=>o(r),this.controller,Lt(this,iPe,"f"))]}toReadableStream(){let e=this,r;return Ugr({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:o,done:s}=await r.next();if(s)return n.close();let c=rPe(JSON.stringify(o)+` -`);n.enqueue(c)}catch(o){n.error(o)}},async cancel(){await r.return?.()}})}};async function*kxa(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new si("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new si("Attempted to iterate over a response with no body");let r=new Ggr,n=new O3,o=tPe(t.body);for await(let s of Nxa(o))for(let c of n.decode(s)){let l=r.decode(c);l&&(yield l)}for(let s of n.flush()){let c=r.decode(s);c&&(yield c)}}a(kxa,"_iterSSEMessages");async function*Nxa(t){let e=new Uint8Array;for await(let r of t){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?rPe(r):r,o=new Uint8Array(e.length+n.length);o.set(e),o.set(n,e.length),e=o;let s;for(;(s=ufi(e))!==-1;)yield e.slice(0,s),e=e.slice(s)}e.length>0&&(yield e)}a(Nxa,"iterSSEChunks");var Ggr=class{static{a(this,"SSEDecoder")}constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let s={event:this.event,data:this.data.join(` -`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],s}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,o]=Dxa(e,":");return o.startsWith(" ")&&(o=o.substring(1)),r==="event"?this.event=o:r==="data"&&this.data.push(o),null}};function Dxa(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}a(Dxa,"partition");async function Pdt(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:o,startTime:s}=e,c=await(async()=>{if(e.options.stream)return Jh(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller,t):l5.fromSSEResponse(r,e.controller,t);if(r.status===204)return null;if(e.options.__binaryResponse)return r;let u=r.headers.get("content-type")?.split(";")[0]?.trim();if(u?.includes("application/json")||u?.endsWith("+json")){let h=await r.json();return Hgr(h,r)}return await r.text()})();return Jh(t).debug(`[${n}] response parsed`,B3({retryOfRequestLogID:o,url:r.url,status:r.status,body:c,durationMs:Date.now()-s})),c}a(Pdt,"defaultParseResponse");function Hgr(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}a(Hgr,"addRequestID");f();var oPe,XJ=class t extends Promise{static{a(this,"APIPromise")}constructor(e,r,n=Pdt){super(o=>{o(null)}),this.responsePromise=r,this.parseResponse=n,oPe.set(this,void 0),ui(this,oPe,e,"f")}_thenUnwrap(e){return new t(Lt(this,oPe,"f"),this.responsePromise,async(r,n)=>Hgr(e(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(Lt(this,oPe,"f"),e))),this.parsedPromise}then(e,r){return this.parse().then(e,r)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};oPe=new WeakMap;var kdt,jgr=class{static{a(this,"AbstractPage")}constructor(e,r,n,o){kdt.set(this,void 0),ui(this,kdt,e,"f"),this.options=o,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new si("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Lt(this,kdt,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(kdt=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},sPe=class extends XJ{static{a(this,"PagePromise")}constructor(e,r,n){super(e,r,async(o,s)=>new n(o,s.response,await Pdt(o,s),s.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},_I=class extends jgr{static{a(this,"Page")}constructor(e,r,n,o){super(e,r,n,o),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let r=this.first_id;return r?{...this.options,query:{...Fgr(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...Fgr(this.options.query),after_id:e}}:null}};f();f();f();var Vgr=a(()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},"checkFileSupport");function ZJ(t,e,r){return Vgr(),new File(t,e??"unknown_file",r)}a(ZJ,"makeFile");function aPe(t){return(typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"").split(/[\\/]/).pop()||void 0}a(aPe,"getName");var Wgr=a(t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function","isAsyncIterable");var pfi=a(async(t,e)=>({...t,body:await Bxa(t.body,e)}),"multipartFormRequestOptions"),ffi=new WeakMap;function Oxa(t){let e=typeof t=="function"?t:t.fetch,r=ffi.get(e);if(r)return r;let n=(async()=>{try{let o="Response"in e?e.Response:(await e("data:,")).constructor,s=new FormData;return s.toString()!==await new o(s).text()}catch{return!0}})();return ffi.set(e,n),n}a(Oxa,"supportsFormData");var Bxa=a(async(t,e)=>{if(!await Oxa(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let r=new FormData;return await Promise.all(Object.entries(t||{}).map(([n,o])=>$gr(r,n,o))),r},"createForm"),Lxa=a(t=>t instanceof Blob&&"name"in t,"isNamedBlob");var $gr=a(async(t,e,r)=>{if(r!==void 0){if(r==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")t.append(e,String(r));else if(r instanceof Response){let n={},o=r.headers.get("Content-Type");o&&(n={type:o}),t.append(e,ZJ([await r.blob()],aPe(r),n))}else if(Wgr(r))t.append(e,ZJ([await new Response(xdt(r)).blob()],aPe(r)));else if(Lxa(r))t.append(e,ZJ([r],aPe(r),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(n=>$gr(t,e+"[]",n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([n,o])=>$gr(t,`${e}[${n}]`,o)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},"addFormValue");var hfi=a(t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function","isBlobLike"),Fxa=a(t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&hfi(t),"isFileLike"),Uxa=a(t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function","isResponseLike");async function Ndt(t,e,r){if(Vgr(),t=await t,e||(e=aPe(t)),Fxa(t))return t instanceof File&&e==null&&r==null?t:ZJ([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(Uxa(t)){let o=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),ZJ(await zgr(o),e,r)}let n=await zgr(t);if(!r?.type){let o=n.find(s=>typeof s=="object"&&"type"in s&&s.type);typeof o=="string"&&(r={...r,type:o})}return ZJ(n,e,r)}a(Ndt,"toFile");async function zgr(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(hfi(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(Wgr(t))for await(let r of t)e.push(...await zgr(r));else{let r=t?.constructor?.name;throw new Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${Qxa(t)}`)}return e}a(zgr,"getBytes");function Qxa(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(r=>`"${r}"`).join(", ")}]`}a(Qxa,"propsForError");f();f();f();f();var Z0=class{static{a(this,"APIResource")}constructor(e){this._client=e}};f();f();var mfi=Symbol.for("brand.privateNullableHeaders");function*Gxa(t){if(!t)return;if(mfi in t){let{values:n,nulls:o}=t;yield*n.entries();for(let s of o)yield[s,null];return}let e=!1,r;t instanceof Headers?r=t.entries():Lgr(t)?r=t:(e=!0,r=Object.entries(t??{}));for(let n of r){let o=n[0];if(typeof o!="string")throw new TypeError("expected header name to be a string");let s=Lgr(n[1])?n[1]:[n[1]],c=!1;for(let l of s)l!==void 0&&(e&&!c&&(c=!0,yield[o,null]),yield[o,l])}}a(Gxa,"iterateHeaders");var Ra=a(t=>{let e=new Headers,r=new Set;for(let n of t){let o=new Set;for(let[s,c]of Gxa(n)){let l=s.toLowerCase();o.has(l)||(e.delete(s),o.add(l)),c===null?(e.delete(s),r.add(l)):(e.append(s,c),r.delete(l))}}return{[mfi]:!0,values:e,nulls:r}},"buildHeaders");f();function Afi(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}a(Afi,"encodeURIPath");var gfi=Object.freeze(Object.create(null)),Hxa=a((t=Afi)=>a(function(r,...n){if(r.length===1)return r[0];let o=!1,s=[],c=r.reduce((p,h,m)=>{/[?#]/.test(h)&&(o=!0);let g=n[m],A=(o?encodeURIComponent:t)(""+g);return m!==n.length&&(g==null||typeof g=="object"&&g.toString===Object.getPrototypeOf(Object.getPrototypeOf(g.hasOwnProperty??gfi)??gfi)?.toString)&&(A=g+"",s.push({start:p.length+h.length,length:A.length,error:`Value of type ${Object.prototype.toString.call(g).slice(8,-1)} is not a valid path parameter`})),p+h+(m===n.length?"":A)},""),l=c.split(/[?#]/,1)[0],u=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,d;for(;(d=u.exec(l))!==null;)s.push({start:d.index,length:d[0].length,error:`Value "${d[0]}" can't be safely passed as a path parameter`});if(s.sort((p,h)=>p.start-h.start),s.length>0){let p=0,h=s.reduce((m,g)=>{let A=" ".repeat(g.start-p),y="^".repeat(g.length);return p=g.start+g.length,m+A+y},"");throw new si(`Path parameters result in path with invalid segments: +`)[0],d=u.length-u.trimStart().length,p=d%o;if(p!==0&&d>0){let h=" ".repeat(p);return n(l,h,m=>" ".repeat((Math.floor(m/o)+1)*o))}else return l},"re");e.displayText=c(e.displayText),e.completionText=c(e.completionText)}}return e}a(ixn,"normalizeIndentCharacter");function oxn(t,e,r,n,o,s,c){let l=n.lineAt(o),u=e.map(d=>{let p=gc.range(gc.position(o.line,0),gc.position(o.line,o.character+d.suffixCoverage)),h="";if(s&&(d.completion=ixn(s,d.completion,l.isEmptyOrWhitespace)),l.isEmptyOrWhitespace&&(d.completion.displayNeedsWsOffset||d.completion.completionText.startsWith(l.text)))h=d.completion.completionText;else{let g=gc.range(p.start,o);h=n.getText(g)+d.completion.displayText}return{uuid:yr(),insertText:h,range:p,uri:n.uri,index:d.completion.completionIndex,telemetry:d.telemetry,displayText:d.completion.displayText,position:o,offset:n.offsetAt(o),resultType:r,copilotAnnotations:d.copilotAnnotations,clientCompletionId:d.clientCompletionId}});if(r===2&&c!==void 0){let d=u.find(p=>p.index===c);if(d){let p=u.filter(h=>h.index!==c);u=[d,...p]}}return u}a(oxn,"completionsFromGhostTextResults");f();var Ow=class{constructor(){this.cache=new $r(100)}static{a(this,"SpeculativeRequestCache")}set(e,r){this.cache.set(e,r)}async request(e){let r=this.cache.get(e);r!==void 0&&(this.cache.delete(e),await r())}};var hae=class extends Dm{constructor(r){super();this.ctx=r}static{a(this,"GhostTextInlineCompletionManager")}async getInlineCompletionsResult(r,n,o={}){let s=this.ctx,c=0;o.selectedCompletionInfo?.text&&!o.selectedCompletionInfo.text.includes(")")&&(r=r.addSelectedCompletionInfo(o.selectedCompletionInfo),c=r.position.character-o.selectedCompletionInfo.range.end.character);let l=await R$t(s,r,n,o);if(l.type!=="success")return l;let[u,d]=l.value;if(n?.isCancellationRequested)return{type:"canceled",reason:"after getGhostText",telemetryData:{telemetryBlob:l.telemetryBlob}};let p=ZIn(s,r.textDocument,r.position,d),h=oxn(s,u,d,r.textDocument,r.position,o.formattingOptions,p);if(h.length===0)return{type:"empty",reason:"no completions in final result",telemetryData:l.telemetryData};if(d!==2){r=r.applyEdits([{newText:h[0].insertText,range:h[0].range}]);let g={isSpeculative:!0,opportunityId:o.opportunityId},A=a(()=>R$t(s,r,void 0,g),"fn");s.get(Ow).set(h[0].clientCompletionId,A)}let m=h.map(g=>{let{start:A,end:y}=g.range,E=Cn.Range.create(A,Cn.Position.create(y.line,y.character-c));return{...g,range:E}});return{...l,value:m}}async getPrompt(r,n,o,s={}){let c=await this.getInlineCompletionsResult(cW(r,n),o,{...s,promptOnly:!0});if(c.type!=="promptOnly")throw new Error(`Unexpected result type ${c.type}`);return c.prompt}async getCompletions(r,n,o,s={}){this.logCompletionLocation(r,n);let c=await this.getInlineCompletionsResult(cW(r,n),o,s);return Cbn(this.ctx,c)}logCompletionLocation(r,n){let o=r.getText({start:{line:Math.max(n.line-1,0),character:0},end:n}),s=r.getText({start:n,end:{line:Math.min(n.line+2,r.lineCount-1),character:r.lineCount-1>n.line?0:n.character}});Jze.debug(this.ctx,`Requesting for ${r.uri} at ${n.line}:${n.character}`,`between ${JSON.stringify(o)} and ${JSON.stringify(s)}.`)}triggerSpeculativeRequests(r){return this.ctx.get(Ow).request(r.clientCompletionId)}};var dfi=de(Lgr()),ffi=de(Frt()),pfi=de(nW()),$Re=de(Xa()),Ggr=de(ro());var Fgr=class extends Ggr.Disposable{constructor(r){super();this.ctx=r;this.isMinimalMode=!0;this.permissiveGitHubSession=void 0;this._tokenChangedEverFired=!1;this._onDidAuthenticationChange=this._register(new $Re.Emitter);this.onDidAuthenticationChange=this._onDidAuthenticationChange.event;this._onDidAccessTokenChange=this._register(new $Re.Emitter);this.onDidAccessTokenChange=this._onDidAccessTokenChange.event;this._onDidAdoAuthenticationChange=this._register(new $Re.Emitter);this.onDidAdoAuthenticationChange=this._onDidAdoAuthenticationChange.event;this.anyGitHubSession=void 0;this._register(Ps(r,()=>{this.fireTokenChanged()}))}static{a(this,"AuthServiceAdapter")}fireTokenChanged(){this._tokenChangedEverFired=!0,this._onDidAccessTokenChange.fire(),this._onDidAuthenticationChange.fire()}ensureTokenChangedFired(){this._tokenChangedEverFired||this.fireTokenChanged()}async getAnyGitHubSession(r){let n=await this.ctx.get(en).getSession();if(n!==void 0)return{id:n.login,accessToken:n.accessToken,account:{id:n.login,label:n.serverUrl},scopes:[]}}async getGitHubSession(r,n){if(r!=="permissive")return this.getAnyGitHubSession(n)}getPermissiveGitHubSession(r){return Promise.resolve(void 0)}get copilotToken(){let r=this.ctx.get(Nt).getLastToken();if(r!==void 0)return this.ensureTokenChangedFired(),Tut(r,this.ctx)}async getCopilotToken(r){let n=this.ctx.get(Nt);r&&n.resetToken("inline_completion_force_refresh");let o=await n.getToken();this.ensureTokenChangedFired();let s=await this.ctx.get(en).getSession();return Tut(o,this.ctx,s?.login)}resetCopilotToken(r){this.ctx.get(Nt).resetToken("inline_completion",r)}getAdoAccessTokenBase64(r){return Promise.resolve(void 0)}};function Tut(t,e,r){let n=t.envelope.refresh_in??Math.max(0,t.expiresAt-Math.floor(Date.now()/1e3));return new ffi.CopilotToken({token:t.envelope.token,expires_at:t.envelope.expires_at,refresh_in:n,user_notification:t.envelope.user_notification,organization_list:t.envelope.organization_list,code_quote_enabled:t.envelope.code_quote_enabled??!1,copilotignore_enabled:t.envelope.copilotignore_enabled??!1,endpoints:t.envelope.endpoints,limited_user_quotas:t.envelope.limited_user_quotas,enterprise_list:t.envelope.enterprise_list?t.envelope.enterprise_list.map(Number):void 0,sku:t.getTokenValue("sku")??"",individual:t.userInfo.isIndividualUser,blackbird_clientside_indexing:!1,code_review_enabled:t.isCopilotCodeReviewEnabled,codesearch:t.envelope.codesearch??!1,vsc_electron_fetcher_v2:t.envelope.vsc_electron_fetcher_v2??!1,public_suggestions:"unconfigured",telemetry:e.get(Jf).isEnabled?"enabled":"disabled",username:r??"",isVscodeTeamMember:!1,copilot_plan:t.userInfo.copilotPlan,organization_login_list:t.userInfo.raw?.organization_login_list??[]})}a(Tut,"asChatLibCopilotToken");var Ugr=class extends Ggr.Disposable{constructor(r){super();this.ctx=r;this._onDidModelsRefresh=this._register(new $Re.Emitter);this.onDidModelsRefresh=this._onDidModelsRefresh.event;this._register(Ps(r,()=>{this.models=void 0}))}static{a(this,"EndpointProviderAdapter")}async getAllModels(r=!1){if(this.models===void 0||r)try{let n=this.ctx.get(sT),o=await this.ctx.get(Nt).getToken();this.models=await n.fetchModels(o)??[],this._onDidModelsRefresh.fire()}catch(n){Lo(this.ctx,n,"AvailableModelsManager.fetchModels"),this.models=[]}return this.models}async getAllCompletionModels(r){return(await this.getAllModels(r)).filter(o=>o.capabilities.type==="completion")}getAllChatEndpoints(){throw new Error("getAllChatEndpoints is not supported.")}getChatEndpoint(r){throw new Error("getChatEndpoint is not supported.")}getEmbeddingsEndpoint(r){throw new Error("getEmbeddingsEndpoint is not supported.")}},Qgr=class{constructor(e){this.ctx=e}static{a(this,"IgnoreServiceAdapter")}get isEnabled(){return this.ctx.get(Ac).enabled}get isRegexExclusionsEnabled(){return!0}dispose(){}init(){return Promise.resolve()}async isCopilotIgnored(e,r){let n=e.toString();return(await this.ctx.get(zr).getTextDocumentValidation({uri:n})).status==="invalid"}asMinimatchPattern(){return Promise.resolve(void 0)}},qgr=class extends Dm{constructor(r){super();this.ctx=r;this._telemetrySender=new VRe(this.ctx)}static{a(this,"ChatLibInlineCompletionManager")}get completionProvider(){return this._completionProvider||(this._completionProvider=this.createCompletionProvider()),this._completionProvider}createCompletionProvider(){let r=this.ctx,n=r.get(I0).matchFunction,o=new zRe(this.ctx.get(dr)),s=NLe(r),c={fetcher:o,authService:new Fgr(r),telemetrySender:this._telemetrySender,logTarget:new WRe(r),isRunningInTest:RC(r),contextProviderMatch:a(async(l,u)=>await n(r,l,u),"contextProviderMatch"),languageContextProvider:void 0,statusHandler:r.get(Bs),documentManager:r.get(zr),workspace:r.get(pfi.ObservableWorkspace),urlOpener:r.get(Z0),editorInfo:r.get(Dr).getEditorInfo(),editorPluginInfo:r.get(Dr).getEditorPluginInfo(),relatedPluginInfo:r.get(Dr).getRelatedPluginInfo(),editorSession:r.get(Vs),notificationSender:r.get(dc),ignoreService:new Qgr(r),waitForTreatmentVariables:!1,endpointProvider:new Ugr(r),capiClientService:void 0,citationHandler:void 0,configOverrides:s};return(0,dfi.createInlineCompletionsProvider)(c)}async getCompletions(r,n,o,s={}){let c=await this.ctx.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments();return this._telemetrySender.updateExpConfig(c.filtersAndExp.exp),this.completionProvider.updateTreatmentVariables(c.filtersAndExp.exp.variables),this.asLocalResult(await this.completionProvider.getInlineCompletions(r,n,o,s),c)}asLocalResult(r,n){if(r!==void 0)return r.map(o=>({uuid:o.uuid,insertText:o.insertText,range:o.range,uri:o.uri,telemetry:new Rb({"abexp.assignmentcontext":n.filtersAndExp.exp.assignmentContext,...o.telemetry.properties},o.telemetry.measurements,o.telemetry.issuedTime,{filters:new gN(o.telemetry.filtersAndExp.filters.toHeaders()),exp:new aE(o.telemetry.filtersAndExp.exp.variables,n.filtersAndExp.exp.assignmentContext,o.telemetry.filtersAndExp.exp.features)}),displayText:o.displayText,position:o.position,offset:o.offset,index:o.index,resultType:o.resultType,copilotAnnotations:o.copilotAnnotations,clientCompletionId:o.clientCompletionId}))}triggerSpeculativeRequests(r){return this.completionProvider.inlineCompletionShown(r.clientCompletionId)}},Sut=class extends Dm{constructor(r){super();this.ctx=r}static{a(this,"ConfigurableInlineCompletionManager")}get ghostTextImpl(){return this._ghostTextImpl||(this._ghostTextImpl=new hae(this.ctx)),this._ghostTextImpl}get chatLibImpl(){return this._chatLibImpl||(this._chatLibImpl=new qgr(this.ctx)),this._chatLibImpl}async isChatLibEnabled(){let r=await this.ctx.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments();return vr(this.ctx,tt.UseChatLibCompletions)??this.ctx.get(Gt).useChatLibCompletions(r)}async getCompletions(r,n,o,s={}){return await this.isChatLibEnabled()?this.chatLibImpl.getCompletions(r,n,o,s):this.ghostTextImpl.getCompletions(r,n,o,s)}async triggerSpeculativeRequests(r){return await this.isChatLibEnabled()?this.chatLibImpl.triggerSpeculativeRequests(r):this.ghostTextImpl.triggerSpeculativeRequests(r)}},VRe=class{constructor(e){this.ctx=e;this.ctx=e}static{a(this,"TelemetrySender")}updateExpConfig(e){this._expConfig=e}sendTelemetryEvent(e,r,n){let o=this.asTelemetryData(r,n);eZ(this.ctx,e,o.properties,o.measurements,0),rr(this.ctx,e,$3(o.properties,$ve),o.measurements)}sendEnhancedTelemetryEvent(e,r,n){let o=this.asTelemetryData(r,n);eZ(this.ctx,e,o.properties,o.measurements,1)}asTelemetryData(e,r){let n=Object.fromEntries(Object.entries(e??{}).filter(([s,c])=>c!==void 0)),o=Object.fromEntries(Object.entries(r??{}).filter(([s,c])=>c!==void 0));return n["abexp.assignmentcontext"]===void 0&&this._expConfig?.assignmentContext!==void 0&&(n["abexp.assignmentcontext"]=this._expConfig.assignmentContext),Pt.createAndMarkAsIssued(n,o)}};f();var Yde=de(jK()),hfi=de(jR()),Hgr=de(gKe()),wut=de(nW()),mfi=de(Ko()),gfi=de(kw()),YRe=de(Zg()),xut=de(qE()),jgr=de(wu()),Afi=de(xv()),yfi=de(Dn());f();var Iut=class{constructor(e){this.ctx=e;this._onDidOpenTextDocument=new Ri;this._onDidChangeTextDocument=new Ri;this._onDidCloseTextDocument=new Ri;this._onDidSelectTextDocument=new Ri;this.onDidOpenTextDocument=this._onDidOpenTextDocument.event;this.onDidChangeTextDocument=this._onDidChangeTextDocument.event;this.onDidCloseTextDocument=this._onDidCloseTextDocument.event;this.onDidSelectTextDocument=this._onDidSelectTextDocument.event;this.bufferedEvents=[];this.forwardedAsOpen=new Set;this.started=!1;this.documentManager=this.ctx.get(zr)}static{a(this,"DocumentChangeFilter")}start(){if(!this.started){this.started=!0;for(let e of this.documentManager.getTextDocumentsUnsafe())this.bufferedEvents.push({type:"addition",event:{document:{uri:e.uri,languageId:e.clientLanguageId,version:e.version,text:e.getText()}}});this.documentManager.onDidOpenTextDocument(e=>{this.bufferedEvents.push({type:"addition",event:e})}),this.documentManager.onDidChangeTextDocument(e=>{this.bufferedEvents.push({type:"change",event:e})}),this.documentManager.onDidCloseTextDocument(e=>{this.bufferedEvents.push({type:"removal",event:e})})}}addSelectionEvent(e){this.bufferedEvents.push({type:"selection",event:e})}async syncSafeDocuments(){let e=[...this.bufferedEvents];this.bufferedEvents.length=0;for(let r of e){let n=r.type==="selection"?r.event.uri:r.event.document.uri;if(r.type==="removal"){this.forwardedAsOpen.has(n)&&(this.forwardedAsOpen.delete(n),this._onDidCloseTextDocument.fire(r.event));continue}let o=await this.documentManager.getTextDocument({uri:n});if(o===void 0){this.forwardedAsOpen.has(n)&&(this.forwardedAsOpen.delete(n),this._onDidCloseTextDocument.fire({document:{uri:n}}));continue}r.type==="addition"?(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire(r.event)):r.type==="change"?this.forwardedAsOpen.has(n)?this._onDidChangeTextDocument.fire(r.event):(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire({document:{uri:o.clientUri,languageId:o.clientLanguageId,version:o.version,text:o.getText()}})):r.type==="selection"&&(this.forwardedAsOpen.has(n)||(this.forwardedAsOpen.add(n),this._onDidOpenTextDocument.fire({document:{uri:o.clientUri,languageId:o.clientLanguageId,version:o.version,text:o.getText()}})),this._onDidSelectTextDocument.fire(r.event))}}};var Kde=class extends wut.ObservableWorkspace{constructor(r,n,o){super();this._openDocuments=(0,gfi.observableValue)(this,[]);this.openDocuments=this._openDocuments;this._documents=new Map;this.ctx=r,n&&(this.documentChangeFilter=new Iut(r)),this._started=!1,o||this.start()}static{a(this,"ObservableLspWorkspace")}start(){if(this._started)return;this._started=!0;let r=this.ctx.get(zr);if(this.documentChangeFilter)this.documentChangeFilter.start();else for(let o of r.getTextDocumentsUnsafe())this.addLspDocument(o.uri,o.clientLanguageId,o.getText());let n=this.documentChangeFilter??r;n.onDidOpenTextDocument(o=>{this.addLspDocument(o.document.uri,o.document.languageId,o.document.text)}),n.onDidCloseTextDocument(o=>{this.removeClosedLspDocument(o.document.uri)}),n.onDidChangeTextDocument(o=>{this.onDidChangeLspDocument(o.document.uri,o.contentChanges)}),this.documentChangeFilter?.onDidSelectTextDocument(o=>{let s=Yde.DocumentId.create(ca(o.uri)),c=this._documents.get(s);c&&c.updateSelectionFromLspPosition(o.position)})}addLspDocument(r,n,o){let s=Yde.DocumentId.create(ca(ca(r)));return this.addDocument({id:s,initialValue:o,languageId:Hgr.LanguageId.create(n)},void 0)}onDidChangeLspDocument(r,n){let o=Yde.DocumentId.create(ca(ca(r))),s=this._documents.get(o);s&&s.applyLspContentChanges(n)}onUserPositionChange(r,n){if(this.documentChangeFilter)this.documentChangeFilter.addSelectionEvent({uri:r,position:n});else{let o=Yde.DocumentId.create(ca(r)),s=this._documents.get(o);s&&s.updateSelectionFromLspPosition(n)}}removeClosedLspDocument(r){let n=Yde.DocumentId.create(ca(r));this._documents.get(n)?.dispose()}addDocument(r,n=void 0){let o=this._documents.get(r.id);if(o)return o;let s=new $gr(r.id,new Afi.StringText(r.initialValue??""),[],r.languageId??Hgr.LanguageId.PlainText,()=>{this._documents.delete(r.id);let c=this._openDocuments.get(),l=c.filter(u=>u.id!==s.id);l.length!==c.length&&this._openDocuments.set(l,n,{added:[],removed:[s]})},r.workspaceRoot);return this._documents.set(r.id,s),this._openDocuments.set([...this._openDocuments.get(),s],n,{added:[s],removed:[]}),s}getDocument(r){return this._documents.get(r)}clear(){this._openDocuments.set([],void 0,{added:[],removed:this._openDocuments.get()});for(let r of this._documents.values())r.dispose();this._documents.clear()}getWorkspaceRoot(r){return this._documents.get(r)?.workspaceRoot}async syncSafeDocuments(){this.start(),await this.documentChangeFilter?.syncSafeDocuments()}},$gr=class extends wut.MutableObservableDocument{static{a(this,"MutableObservableLspDocument")}constructor(e,r,n,o,s,c){super(e,r,n,o,s,0,c)}applyLspContentChanges(e){let r=this.editFromLspContentChanges(e);this.applyEdit(r.compose(),void 0)}updateSelectionFromLspPosition(e){let r=this.value.get().getTransformer().getOffset(new xut.Position(e.lineNumber+1,e.column+1));this.updateSelection([new jgr.OffsetRange(r,r)])}editFromLspContentChanges(e){return new hfi.Edits(YRe.StringEdit,e.map((n,o)=>this.editFromLspContentChange(n,o)))}editFromLspContentChange(e,r){if(yfi.TextDocumentContentChangeEvent.isIncremental(e)){let n=this.value.get().getTransformer(),o=n.getOffset(new xut.Position(e.range.start.line+1,e.range.start.character+1)),s=n.getOffset(new xut.Position(e.range.end.line+1,e.range.end.character+1));if(o>s){let c=this.value.get().value,l=c.split(/\r\n|\n/).length,u=c.split(/\r\n|\r|\n/).length,d=new mfi.BugIndicatingError(`Invalid range: [${o}, ${s}) from ${JSON.stringify(e.range)}. Line counts: nes=${l}, lsp=${u}`);throw lu?d.code="ObservableWorkspace_TooManyLines":d.code="ObservableWorkspace_InvalidRange",d.code+=r>0?"_SubsequentChange":"_FirstChange",d}return YRe.StringEdit.single(new YRe.StringReplacement(new jgr.OffsetRange(o,s),e.text))}throw new Error("Full replacement edits are not supported")}};var p3=de(Lgr()),_fi=de(jK()),Vgr=de(nW()),Cfi=de(zm()),vfi=de(blt()),bfi=de(Xa()),Wgr=require("node:stream");var Efi=10,Fwa={[p3.LogLevel.Off]:4,[p3.LogLevel.Trace]:4,[p3.LogLevel.Debug]:4,[p3.LogLevel.Info]:3,[p3.LogLevel.Warning]:2,[p3.LogLevel.Error]:1},WRe=class{constructor(e){this.ctx=e}static{a(this,"ForwardingLogTarget")}logIt(e,r,...n){this.ctx.get(fd).logIt(this.ctx,Fwa[e],r,...n)}},cb=class{constructor(e){this.lastResultsById=new $r(Efi);this.lastResultsByUri=new $r(Efi);this.ctx=e,this.telemetrySender=new VRe(this.ctx)}static{a(this,"NextEditSuggestionsManager")}async handleNextEditRequest(e,r,n){let o=await(this.nextEditProvider??=this.createNextEditProvider()),s=this.ctx.get(Vgr.ObservableWorkspace);if(s instanceof Kde&&await s.syncSafeDocuments(),!this.shouldUseExplicitRejection()){let y=this.lastResultsByUri.get(e);y&&(this.lastResultsByUri.delete(e),this.lastResultsById.delete(y.resultId),y.isShown&&o.handleRejection(y.nextEditResult))}let c=_fi.DocumentId.create(ca(e)),l=await this.ctx.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments();o.updateTreatmentVariables(l.filtersAndExp.exp.variables),this.telemetrySender.updateExpConfig(l.filtersAndExp.exp);let u=await o.getNextEdit(c.toUri(),n);if(u.result==null)return;let d=await this.ctx.get(zr).getTextDocument({uri:e});if(!d)return;let p=d.positionAt(u.result.range.start),h=d.positionAt(u.result.range.endExclusive),m=yr(),g={resultId:m,nextEditResult:u,documentId:c,isShown:!1};return this.lastResultsById.set(m,g),this.lastResultsByUri.set(e,g),[{edit:{text:u.result.newText,range:{start:p,end:h},textDocument:{uri:e,version:r}},id:m}]}async handleAcceptance(e){let r=await this.nextEditProvider,n=this.lastResultsById.get(e);!r||!n||(this.lastResultsByUri.delete(n.documentId.uri),this.lastResultsById.delete(n.resultId),await r.handleAcceptance(n.nextEditResult))}async handleRejection(e){await this.doHandleDismiss(e,!0)}async handleIgnored(e){await this.doHandleDismiss(e,!1)}async doHandleDismiss(e,r){if(!this.shouldUseExplicitRejection())return;let n=await this.nextEditProvider,o=this.lastResultsById.get(e);!n||!o||(this.lastResultsByUri.delete(o.documentId.uri),this.lastResultsById.delete(o.resultId),o.isShown&&(r?n.handleRejection(o.nextEditResult):n.handleIgnored(o.nextEditResult,void 0)))}async handleShown(e){let r=await this.nextEditProvider,n=this.lastResultsById.get(e);!r||!n||(n.isShown=!0,r.handleShown(n.nextEditResult))}async createNextEditProvider(){let e=this.ctx.get(Vgr.ObservableWorkspace),r=new zRe(this.ctx.get(dr)),n=new zgr(this.ctx),o=NLe(this.ctx);return(0,p3.createNESProvider)({configOverrides:o,workspace:e,fetcher:r,copilotTokenManager:n,terminalService:vfi.NullTerminalService.Instance,telemetrySender:this.telemetrySender,logTarget:new WRe(this.ctx)})}shouldUseExplicitRejection(){return vr(this.ctx,tt.NESUseExplicitRejection)}},zgr=class{constructor(e){this._ctx=e;this.didChangeTokenResult=new bfi.Emitter;this.onDidCopilotTokenRefresh=this.didChangeTokenResult.event;this._ctx.get(Nt).onDidChangeTokenResult(()=>{this.didChangeTokenResult.fire()})}static{a(this,"CopilotTokenManagerAdapter")}async getCopilotToken(e){let r=this._ctx.get(Nt);e&&r.resetToken("nes_force_refresh");let n=await r.getToken(),o=await this._ctx.get(en).getSession();return Tut(n,this._ctx,o?.login)}resetCopilotToken(e){this._ctx.get(Nt).resetToken("nes",e)}},zRe=class{constructor(e){this._delegate=e}static{a(this,"FetcherAdapter")}getUserAgentLibrary(){return this._delegate.name}async fetch(e,r){let n={headers:r.headers,body:r.body,timeout:r.timeout,json:r.json,method:r.method,signal:r.signal},o=await this._delegate.fetch(e,n),s=o.body(),c=null;return s&&(s instanceof Wgr.Readable?c=Wgr.Readable.toWeb(s):c=s),new Cfi.Response(o.status,o.statusText,o.headers,c,this.fetcherId(),()=>{},yr(),new URL(e).hostname)}fetcherId(){switch(this._delegate.name){case"EditorFetcher":case"ElectronFetcher":return"electron-fetch";case"FetchFetcher":case"NodeFetchFetcher":return"node-fetch";case"FakeFetcher":return"test-stub";default:return"helix-fetch"}}async disconnectAll(){return this._delegate.disconnectAll()}makeAbortController(){return new AbortController}isAbortError(e){return e&&e.name==="AbortError"}isInternetDisconnectedError(e){return!1}isFetcherError(e){return Ab(e)}isNetworkProcessCrashedError(e){return!1}getUserMessageForFetcherError(e){return`Fetcher error: ${e.message}`}async fetchWithPagination(e,r){let n=[],o=r.pageSize??20,s=r.startPage??1,c=!1;do{let l=r.buildUrl(e,o,s),u=await this.fetch(l,r);if(!u.ok)return n;let d=await u.json(),p=r.getItemsFromResponse(d);n.push(...p),c=p.length===o,s++}while(c);return n}};var Uwa="github.copilot.didAcceptNextEditSuggestionItem",Ygr=class extends ES{constructor(){super(...arguments);this.name=Uwa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptCommand")}async handle(r,[n]){return await this.ctx.get(cb).handleAcceptance(n),!0}},Qwa="github.copilot.didRejectNextEditSuggestionItem",Kgr=class extends ES{constructor(){super(...arguments);this.name=Qwa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidRejectCommand")}async handle(r,[n]){return await this.ctx.get(cb).handleRejection(n),!0}},qwa="github.copilot.didIgnoreNextEditSuggestionItem",Jgr=class extends ES{constructor(){super(...arguments);this.name=qwa;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidIgnoreCommand")}async handle(r,[n]){return await this.ctx.get(cb).handleIgnored(n),!0}},Tfi=[Ygr,Kgr,Jgr];f();var Zgr="github.copilot.didAcceptPanelCompletionItem",Xgr=class extends ES{constructor(){super(...arguments);this.name=Zgr;this.arguments=S.Tuple([S.String({minLength:1})])}static{a(this,"DidAcceptPanelCompletionItemCommand")}handle(r,n){let[o]=n,c=this.ctx.get(pl).get(o);return c?(Cbe(this.ctx,c.triggerCategory,c.displayText,c.offset,c.uri,c.telemetry,{compType:"full",acceptedLength:c.displayText.length,acceptedLines:z9(c.displayText)},c.copilotAnnotations),!0):!1}},Sfi=[Xgr];var Gwa=[...rxn,...nxn,...Tfi,...Sfi];function Ifi(t,e){let r=new Map;for(let n of Gwa){let o=new n(t),s=wl.Compile(o.arguments);r.set(o.name,{typeCheck:s,command:o})}return e.onExecuteCommand((n,o)=>{let s=r.get(n.command);if(!s)throw new Error(`Unknown command: ${n.command}`);let c=h3(n.arguments??[]);if(c.length0}async markInstalled(e){let r=e.get(Dr).getEditorPluginInfo();await e.get(Ti).update("versions",r.name,r.version)}wasPreviouslyInstalled(e){return Promise.resolve(!1)}async isNewUpgrade(e){try{let r=e.get(Dr).getEditorPluginInfo(),n=await e.get(Ti).read("versions",r.name);return n===void 0&&await this.hasPersistedSettings(e)?!0:(0,KRe.gt)((0,KRe.coerce)(r.version),(0,KRe.coerce)(n))}catch{return!1}}async markUpgraded(e){await this.markInstalled(e)}async uninstall(e){await super.uninstall(e);let r=e.get(Dr).getEditorPluginInfo();await e.get(Ti).delete("versions",r.name),(await e.get(Ti).listKeys("versions")).length===0&&await e.get(Ti).deleteSetting("versions")}};f();var kfi=require("crypto"),eAr=de(require("path")),Xde=de(mu());var $wa={watchedFiles:[],contentRestrictedFiles:[],unknownFileExtensions:[]},Vwa=new Xde.ProgressType,KD=class t{constructor(e){this.ctx=e;this.#e=new Ri;this.onDidChangeWatchedFiles=this.#e.event}static{a(this,"LspFileWatcher")}#e;static{this.requestType=new Xde.ProtocolRequestType("copilot/watchedFiles")}get connection(){return this.ctx.get(Ar).connection}init(){this.ctx.get(Fn).getCapabilities().watchedFiles&&this.connection.onNotification(Xde.DidChangeWatchedFilesNotification.type,r=>{"workspaceUri"in r&&typeof r.workspaceUri=="string"&&this.didChangeWatchedFilesHandler(r)})}async getWatchedFiles(e){if(!this.ctx.get(Fn).getCapabilities().watchedFiles)return $wa;let n=await this.fetchWatchedFileEntries(e);return this.buildWatchedFilesResponse(n)}async didChangeWatchedFilesHandler(e){let r=[],n=[],o=[];for(let s of e.changes){let c=s.uri,l={uri:c,isRestricted:!1,isUnknownFileExtension:!1},u=eAr.extname(s.uri).toLowerCase();if(!hH.includes(u))l.isUnknownFileExtension=!0;else{let d=await this.getValidDocument(c);d===void 0?l.isRestricted=!0:l.document=d}switch(s.type){case 1:n.push(l);break;case 2:r.push(l);break;case 3:o.push(l);break}}this.#e.fire({workspaceFolder:{uri:e.workspaceUri},created:n,changed:r,deleted:o})}async getValidDocument(e){let n=await this.ctx.get(In).getOrReadTextDocument({uri:e});return n.status==="valid"?n.document:void 0}async fetchWatchedFileEntries(e){let r=e.partialResultToken??(0,kfi.randomUUID)(),n=[],o=this.connection.onProgress(Vwa,r,s=>{s?.files?.length&&n.push(...s.files)});try{let s=await this.connection.sendRequest(t.requestType,{...e,partialResultToken:r});Array.isArray(s.files)&&n.push(...s.files)}finally{o.dispose()}return n}async buildWatchedFilesResponse(e){let r=[],n=[],o=[],s=new Set;for(let c of e){let l=typeof c=="string"?c:c?.uri;if(!l||s.has(l))continue;s.add(l);let u=eAr.extname(l).toLowerCase();if(!hH.includes(u)){o.push({uri:l});continue}let d=await this.getValidDocument(l);if(d===void 0){n.push({uri:l});continue}r.push(d)}return{watchedFiles:r,contentRestrictedFiles:n,unknownFileExtensions:o}}};f();f();f();var Mff=S.Union([S.String(),S.Number()]),eE=S.String(),Nut=S.Optional(S.Union([S.Literal("low"),S.Literal("medium"),S.Literal("high"),S.Literal("xhigh")]));async function bA(t){try{return[await t(),null]}catch(e){return[null,{code:ct.InternalError,message:e instanceof Error?e.message:String(e)}]}}a(bA,"withServiceErrorHandling");var Dfi=new Se("BackgroundAgent.create"),Wwa=S.Object({systemMessage:S.Optional(S.String()),model:S.Optional(S.String()),reasoningEffort:Nut,workspaceFolders:S.Optional(S.Array(S.Object({uri:S.String(),name:S.Optional(S.String())}))),tools:S.Optional(S.Array(S.String()))});async function zwa(t,e,r){Dfi.info(t,"handleBackgroundAgentCreate called",{model:r.model,workspaceFolders:r.workspaceFolders});let n=t.get(xu),o={systemMessage:r.systemMessage,model:r.model,reasoningEffort:r.reasoningEffort,workspaceFolders:r.workspaceFolders,availableTools:r.tools};return bA(async()=>{let s=await n.createSession(o);return Dfi.info(t,"createSession succeeded:",s.sessionId),{sessionId:s.sessionId,workspacePath:s.workspacePath}})}a(zwa,"handleBackgroundAgentCreateChecked");var Nfi=He(Wwa,zwa);f();var Ywa=S.Object({sessionId:eE});async function Kwa(t,e,r){let n=t.get(xu);return bA(async()=>({success:(await n.destroySession({sessionId:r.sessionId})).success}))}a(Kwa,"handleBackgroundAgentDestroyChecked");var Mfi=He(Ywa,Kwa);f();var Jwa=new Se("BackgroundAgent.interaction"),Xwa=S.Union([S.Object({kind:S.Literal("approved")}),S.Object({kind:S.Literal("denied-by-rules"),rules:S.Array(S.Unknown())}),S.Object({kind:S.Literal("denied-no-approval-rule-and-could-not-request-from-user")}),S.Object({kind:S.Literal("denied-interactively-by-user"),feedback:S.Optional(S.String())}),S.Object({kind:S.Literal("denied-by-content-exclusion-policy"),path:S.String(),message:S.String()})]),Zwa=S.Object({answer:S.String(),wasFreeform:S.Boolean()}),eRa=S.Object({action:S.Union([S.Literal("accept"),S.Literal("decline"),S.Literal("cancel")]),content:S.Optional(S.Record(S.String(),S.Union([S.String(),S.Number(),S.Boolean(),S.Array(S.String())])))}),tRa=S.Object({approved:S.Boolean(),selectedAction:S.Optional(S.Union([S.Literal("exit_only"),S.Literal("interactive"),S.Literal("autopilot"),S.Literal("autopilot_fleet")])),autoApproveEdits:S.Optional(S.Boolean()),feedback:S.Optional(S.String())}),rRa=S.Union([S.Object({handled:S.Literal(!0),stopProcessingQueue:S.Optional(S.Boolean())}),S.Object({handled:S.Literal(!1)})]),nRa=S.Union([S.String(),S.Object({textResultForLlm:S.String(),binaryResultsForLlm:S.Optional(S.Array(S.Object({data:S.String(),mimeType:S.String(),type:S.String(),description:S.Optional(S.String())}))),resultType:S.Union([S.Literal("success"),S.Literal("failure"),S.Literal("rejected"),S.Literal("denied")]),error:S.Optional(S.String())})]),iRa=S.Union([S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("permission"),result:Xwa}),S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("user_input"),response:Zwa}),S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("elicitation"),response:eRa}),S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("exit_plan_mode"),response:tRa}),S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("queued_command"),result:rRa}),S.Object({sessionId:eE,requestId:S.String(),type:S.Literal("external_tool"),result:nRa})]);async function oRa(t,e,r){Jwa.info(t,"handleBackgroundAgentInteraction called",{sessionId:r.sessionId,type:r.type,requestId:r.requestId});let n=t.get(xu);return bA(async()=>await n.handleInteraction(r))}a(oRa,"handleBackgroundAgentInteractionChecked");var Ofi=He(iRa,oRa);f();var Bfi=new Se("BackgroundAgent.listSessions"),sRa=S.Object({cwd:S.Optional(S.String()),gitRoot:S.Optional(S.String()),repository:S.Optional(S.String()),branch:S.Optional(S.String())});async function aRa(t,e,r){Bfi.info(t,"handleBackgroundAgentSessionsList called",r);let n=t.get(xu);return bA(async()=>{let o=await n.listSessions(r);return Bfi.info(t,"listSessions succeeded, returning",o.sessions.length,"sessions"),o})}a(aRa,"handleBackgroundAgentSessionsListChecked");var Lfi=He(sRa,aRa);f();var Ffi=new Se("BackgroundAgent.listModels"),cRa=S.Object({forceRefresh:S.Optional(S.Boolean())});async function lRa(t,e,r){Ffi.info(t,"handleBackgroundAgentListModels called",{forceRefresh:r.forceRefresh});let n=t.get(xu);return bA(async()=>{let o=await n.listModels(r.forceRefresh);return Ffi.info(t,"listModels succeeded, returning",o.models.length,"models"),o})}a(lRa,"handleBackgroundAgentListModelsChecked");var Ufi=He(cRa,lRa);f();var Qfi=new Se("BackgroundAgent.resume"),uRa=S.Object({sessionId:eE,model:S.Optional(S.String()),reasoningEffort:Nut,streaming:S.Optional(S.Boolean())});async function dRa(t,e,r){Qfi.info(t,"handleBackgroundAgentResume called",{sessionId:r.sessionId,model:r.model});let n=t.get(xu),o={sessionId:r.sessionId,model:r.model,reasoningEffort:r.reasoningEffort,streaming:r.streaming};return bA(async()=>{let s=await n.resumeSession(o);return Qfi.info(t,"resumeSession succeeded:",s.sessionId),{sessionId:s.sessionId,workspacePath:s.workspacePath,events:s.events}})}a(dRa,"handleBackgroundAgentResumeChecked");var qfi=He(uRa,dRa);f();var fRa=S.Object({sessionId:eE,message:S.String(),model:S.Optional(S.String()),references:S.Optional(S.Array(Z6))});async function pRa(t,e,r){let n=t.get(xu),o={sessionId:r.sessionId,message:r.message,model:r.model,references:r.references};return bA(async()=>({messageId:(await n.sendMessage(o,e)).messageId}))}a(pRa,"handleBackgroundAgentSendChecked");var Gfi=He(fRa,pRa);f();var hRa=new Se("BackgroundAgent.stop"),mRa=S.Object({sessionId:eE});async function gRa(t,e,r){hRa.info(t,"handleBackgroundAgentStop called",{sessionId:r.sessionId});let n=t.get(xu);return bA(async()=>(await n.stopSession(r.sessionId),{success:!0}))}a(gRa,"handleBackgroundAgentStopChecked");var Hfi=He(mRa,gRa);f();var ARa=S.Object({providerName:S.String()});async function yRa(t,e,r){try{let{providerName:n}=r,o=R6(n);if(o!==0)return[null,{code:ct.InvalidParams,message:`deleteApiKey is only supported for providers with GlobalApiKey auth type. Provider ${n} has auth type: ${o}`}];let s=new Ka(t.get(Ti));return await s.removeAllModelConfigs(n),await s.deleteAPIKey(n,o),[{success:!0,message:`API key and all model configurations deleted successfully for provider ${n}`},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to delete API key: ${n instanceof Error?n.message:String(n)}`}]}}a(yRa,"handleBYOKDeleteApiKeyChecked");var jfi=He(ARa,yRa);f();var ERa=S.Object({providerName:S.String(),modelId:S.String()});async function _Ra(t,e,r){try{let n=new Ka(t.get(Ti)),{providerName:o,modelId:s}=r,c=R6(o);return await n.removeModelConfig(o,s),c===1&&await n.deleteAPIKey(o,c,s),[{success:!0,message:`Model ${s} deleted successfully for provider ${o}`},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to delete model: ${n instanceof Error?n.message:String(n)}`}]}}a(_Ra,"handleBYOKDeleteModelChecked");var $fi=He(ERa,_Ra);f();var CRa=S.Object({providerName:S.Optional(S.String()),modelId:S.Optional(S.String())});async function vRa(t,e,r){try{let n=new Ka(t.get(Ti)),{providerName:o,modelId:s}=r;if(!o){let l=t.get(Ti),u=await l.listKeys("byok"),d=[];for(let p of u)if(p.endsWith("-api-key")){let h=await l.read("byok",p);if(h){let g=p.replace("-api-key","").split("-");if(g.length===1)d.push({providerName:g[0],apiKey:h});else if(g.length>=2){let A=g[0],y=g.slice(1).join("-");d.push({providerName:A,modelId:y,apiKey:h})}}}return[{apiKeys:d},null]}return[{apiKeys:[{apiKey:await n.getAPIKey(o,s)||void 0,providerName:o,modelId:s}]},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to get API key: ${n instanceof Error?n.message:String(n)}`}]}}a(vRa,"handleBYOKListApiKeysChecked");var Vfi=He(CRa,vRa);f();f();f();f();f();f();function li(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r}a(li,"__classPrivateFieldSet");function Ot(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}a(Ot,"__classPrivateFieldGet");f();var tAr=a(function(){let{crypto:t}=globalThis;if(t?.randomUUID)return tAr=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),r=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))},"uuid4");f();f();f();function g3(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}a(g3,"isAbortError");var JRe=a(t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)},"castToError");var oi=class extends Error{static{a(this,"AnthropicError")}},Hh=class t extends oi{static{a(this,"APIError")}constructor(e,r,n,o){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=o,this.requestID=o?.get("request-id"),this.error=r}static makeMessage(e,r,n){let o=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return e&&o?`${e} ${o}`:e?`${e} status code (no body)`:o||"(no status code or body)"}static generate(e,r,n,o){if(!e||!o)return new wQ({message:n,cause:JRe(r)});let s=r;return e===400?new efe(e,s,n,o):e===401?new tfe(e,s,n,o):e===403?new rfe(e,s,n,o):e===404?new nfe(e,s,n,o):e===409?new ife(e,s,n,o):e===422?new ofe(e,s,n,o):e===429?new sfe(e,s,n,o):e>=500?new afe(e,s,n,o):new t(e,s,n,o)}},Xm=class extends Hh{static{a(this,"APIUserAbortError")}constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},wQ=class extends Hh{static{a(this,"APIConnectionError")}constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},Zde=class extends wQ{static{a(this,"APIConnectionTimeoutError")}constructor({message:e}={}){super({message:e??"Request timed out."})}},efe=class extends Hh{static{a(this,"BadRequestError")}},tfe=class extends Hh{static{a(this,"AuthenticationError")}},rfe=class extends Hh{static{a(this,"PermissionDeniedError")}},nfe=class extends Hh{static{a(this,"NotFoundError")}},ife=class extends Hh{static{a(this,"ConflictError")}},ofe=class extends Hh{static{a(this,"UnprocessableEntityError")}},sfe=class extends Hh{static{a(this,"RateLimitError")}},afe=class extends Hh{static{a(this,"InternalServerError")}};var TRa=/^[a-z][a-z0-9+.-]*:/i,Wfi=a(t=>TRa.test(t),"isAbsoluteURL"),rAr=a(t=>(rAr=Array.isArray,rAr(t)),"isArray"),nAr=rAr;function iAr(t){return typeof t!="object"?{}:t??{}}a(iAr,"maybeObj");function zfi(t){if(!t)return!0;for(let e in t)return!1;return!0}a(zfi,"isEmptyObj");function Yfi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a(Yfi,"hasOwn");var Kfi=a((t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new oi(`${t} must be an integer`);if(e<0)throw new oi(`${t} must be a positive integer`);return e},"validatePositiveInteger");var Mut=a(t=>{try{return JSON.parse(t)}catch{return}},"safeJSON");f();var Jfi=a(t=>new Promise(e=>setTimeout(e,t)),"sleep");f();f();var RQ="0.56.0";var t0i=a(()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u","isRunningInBrowser");function SRa(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}a(SRa,"getDetectedPlatform");var IRa=a(()=>{let t=SRa();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":RQ,"X-Stainless-OS":Zfi(Deno.build.os),"X-Stainless-Arch":Xfi(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":RQ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":RQ,"X-Stainless-OS":Zfi(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Xfi(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=xRa();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":RQ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":RQ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},"getPlatformProperties");function xRa(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:r}of t){let n=r.exec(navigator.userAgent);if(n){let o=n[1]||0,s=n[2]||0,c=n[3]||0;return{browser:e,version:`${o}.${s}.${c}`}}}return null}a(xRa,"getBrowserInfo");var Xfi=a(t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown","normalizeArch"),Zfi=a(t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),"normalizePlatform"),e0i,r0i=a(()=>e0i??(e0i=IRa()),"getPlatformHeaders");f();function n0i(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}a(n0i,"getDefaultFetch");function oAr(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}a(oAr,"makeReadableStream");function Out(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return oAr({start(){},async pull(r){let{done:n,value:o}=await e.next();n?r.close():r.enqueue(o)},async cancel(){await e.return?.()}})}a(Out,"ReadableStreamFrom");function XRe(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let r=await e.read();return r?.done&&e.releaseLock(),r}catch(r){throw e.releaseLock(),r}},async return(){let r=e.cancel();return e.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}a(XRe,"ReadableStreamToAsyncIterable");async function i0i(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),r=e.cancel();e.releaseLock(),await r}a(i0i,"CancelReadableStream");f();var o0i=a(({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),"FallbackEncoder");f();f();f();f();f();function c0i(t){let e=0;for(let o of t)e+=o.length;let r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}a(c0i,"concatBytes");var s0i;function ZRe(t){let e;return(s0i??(e=new globalThis.TextEncoder,s0i=e.encode.bind(e)))(t)}a(ZRe,"encodeUTF8");var a0i;function sAr(t){let e;return(a0i??(e=new globalThis.TextDecoder,a0i=e.decode.bind(e)))(t)}a(sAr,"decodeUTF8");var lb,ub,A3=class{static{a(this,"LineDecoder")}constructor(){lb.set(this,void 0),ub.set(this,void 0),li(this,lb,new Uint8Array,"f"),li(this,ub,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?ZRe(e):e;li(this,lb,c0i([Ot(this,lb,"f"),r]),"f");let n=[],o;for(;(o=PRa(Ot(this,lb,"f"),Ot(this,ub,"f")))!=null;){if(o.carriage&&Ot(this,ub,"f")==null){li(this,ub,o.index,"f");continue}if(Ot(this,ub,"f")!=null&&(o.index!==Ot(this,ub,"f")+1||o.carriage)){n.push(sAr(Ot(this,lb,"f").subarray(0,Ot(this,ub,"f")-1))),li(this,lb,Ot(this,lb,"f").subarray(Ot(this,ub,"f")),"f"),li(this,ub,null,"f");continue}let s=Ot(this,ub,"f")!==null?o.preceding-1:o.preceding,c=sAr(Ot(this,lb,"f").subarray(0,s));n.push(c),li(this,lb,Ot(this,lb,"f").subarray(o.index),"f"),li(this,ub,null,"f")}return n}flush(){return Ot(this,lb,"f").length?this.decode(` +`):[]}};lb=new WeakMap,ub=new WeakMap;A3.NEWLINE_CHARS=new Set([` +`,"\r"]);A3.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function PRa(t,e){for(let o=e??0;o{if(t){if(Yfi(Lut,t))return t;jh(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(Lut))}`)}},"parseLogLevel");function e2e(){}a(e2e,"noop");function But(t,e,r){return!e||Lut[t]>Lut[r]?e2e:e[t].bind(e)}a(But,"makeLogFn");var kRa={error:e2e,warn:e2e,info:e2e,debug:e2e},u0i=new WeakMap;function jh(t){let e=t.logger,r=t.logLevel??"off";if(!e)return kRa;let n=u0i.get(e);if(n&&n[0]===r)return n[1];let o={error:But("error",e,r),warn:But("warn",e,r),info:But("info",e,r),debug:But("debug",e,r)};return u0i.set(e,[r,o]),o}a(jh,"loggerFor");var y3=a(t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,r])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t),"formatRequestDetails");var t2e,JD=class t{static{a(this,"Stream")}constructor(e,r,n){this.iterator=e,t2e.set(this,void 0),this.controller=r,li(this,t2e,n,"f")}static fromSSEResponse(e,r,n){let o=!1,s=n?jh(n):console;async function*c(){if(o)throw new oi("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let l=!1;try{for await(let u of DRa(e,r)){if(u.event==="completion")try{yield JSON.parse(u.data)}catch(d){throw s.error("Could not parse message into JSON:",u.data),s.error("From chunk:",u.raw),d}if(u.event==="message_start"||u.event==="message_delta"||u.event==="message_stop"||u.event==="content_block_start"||u.event==="content_block_delta"||u.event==="content_block_stop")try{yield JSON.parse(u.data)}catch(d){throw s.error("Could not parse message into JSON:",u.data),s.error("From chunk:",u.raw),d}if(u.event!=="ping"&&u.event==="error")throw new Hh(void 0,Mut(u.data)??u.data,void 0,e.headers)}l=!0}catch(u){if(g3(u))return;throw u}finally{l||r.abort()}}return a(c,"iterator"),new t(c,r,n)}static fromReadableStream(e,r,n){let o=!1;async function*s(){let l=new A3,u=XRe(e);for await(let d of u)for(let p of l.decode(d))yield p;for(let d of l.flush())yield d}a(s,"iterLines");async function*c(){if(o)throw new oi("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let l=!1;try{for await(let u of s())l||u&&(yield JSON.parse(u));l=!0}catch(u){if(g3(u))return;throw u}finally{l||r.abort()}}return a(c,"iterator"),new t(c,r,n)}[(t2e=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),o=a(s=>({next:a(()=>{if(s.length===0){let c=n.next();e.push(c),r.push(c)}return s.shift()},"next")}),"teeIterator");return[new t(()=>o(e),this.controller,Ot(this,t2e,"f")),new t(()=>o(r),this.controller,Ot(this,t2e,"f"))]}toReadableStream(){let e=this,r;return oAr({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:o,done:s}=await r.next();if(s)return n.close();let c=ZRe(JSON.stringify(o)+` +`);n.enqueue(c)}catch(o){n.error(o)}},async cancel(){await r.return?.()}})}};async function*DRa(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new oi("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new oi("Attempted to iterate over a response with no body");let r=new cAr,n=new A3,o=XRe(t.body);for await(let s of NRa(o))for(let c of n.decode(s)){let l=r.decode(c);l&&(yield l)}for(let s of n.flush()){let c=r.decode(s);c&&(yield c)}}a(DRa,"_iterSSEMessages");async function*NRa(t){let e=new Uint8Array;for await(let r of t){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?ZRe(r):r,o=new Uint8Array(e.length+n.length);o.set(e),o.set(n,e.length),e=o;let s;for(;(s=l0i(e))!==-1;)yield e.slice(0,s),e=e.slice(s)}e.length>0&&(yield e)}a(NRa,"iterSSEChunks");var cAr=class{static{a(this,"SSEDecoder")}constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let s={event:this.event,data:this.data.join(` +`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],s}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,o]=MRa(e,":");return o.startsWith(" ")&&(o=o.substring(1)),r==="event"?this.event=o:r==="data"&&this.data.push(o),null}};function MRa(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}a(MRa,"partition");async function Fut(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:o,startTime:s}=e,c=await(async()=>{if(e.options.stream)return jh(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller,t):JD.fromSSEResponse(r,e.controller,t);if(r.status===204)return null;if(e.options.__binaryResponse)return r;let u=r.headers.get("content-type")?.split(";")[0]?.trim();if(u?.includes("application/json")||u?.endsWith("+json")){let h=await r.json();return lAr(h,r)}return await r.text()})();return jh(t).debug(`[${n}] response parsed`,y3({retryOfRequestLogID:o,url:r.url,status:r.status,body:c,durationMs:Date.now()-s})),c}a(Fut,"defaultParseResponse");function lAr(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}a(lAr,"addRequestID");f();var r2e,oJ=class t extends Promise{static{a(this,"APIPromise")}constructor(e,r,n=Fut){super(o=>{o(null)}),this.responsePromise=r,this.parseResponse=n,r2e.set(this,void 0),li(this,r2e,e,"f")}_thenUnwrap(e){return new t(Ot(this,r2e,"f"),this.responsePromise,async(r,n)=>lAr(e(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(Ot(this,r2e,"f"),e))),this.parsedPromise}then(e,r){return this.parse().then(e,r)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};r2e=new WeakMap;var Uut,uAr=class{static{a(this,"AbstractPage")}constructor(e,r,n,o){Uut.set(this,void 0),li(this,Uut,e,"f"),this.options=o,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new oi("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Ot(this,Uut,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(Uut=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},n2e=class extends oJ{static{a(this,"PagePromise")}constructor(e,r,n){super(e,r,async(o,s)=>new n(o,s.response,await Fut(o,s),s.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},lI=class extends uAr{static{a(this,"Page")}constructor(e,r,n,o){super(e,r,n,o),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let r=this.first_id;return r?{...this.options,query:{...iAr(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...iAr(this.options.query),after_id:e}}:null}};f();f();f();var fAr=a(()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},"checkFileSupport");function sJ(t,e,r){return fAr(),new File(t,e??"unknown_file",r)}a(sJ,"makeFile");function i2e(t){return(typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"").split(/[\\/]/).pop()||void 0}a(i2e,"getName");var pAr=a(t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function","isAsyncIterable");var f0i=a(async(t,e)=>({...t,body:await LRa(t.body,e)}),"multipartFormRequestOptions"),d0i=new WeakMap;function BRa(t){let e=typeof t=="function"?t:t.fetch,r=d0i.get(e);if(r)return r;let n=(async()=>{try{let o="Response"in e?e.Response:(await e("data:,")).constructor,s=new FormData;return s.toString()!==await new o(s).text()}catch{return!0}})();return d0i.set(e,n),n}a(BRa,"supportsFormData");var LRa=a(async(t,e)=>{if(!await BRa(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let r=new FormData;return await Promise.all(Object.entries(t||{}).map(([n,o])=>dAr(r,n,o))),r},"createForm"),FRa=a(t=>t instanceof Blob&&"name"in t,"isNamedBlob");var dAr=a(async(t,e,r)=>{if(r!==void 0){if(r==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")t.append(e,String(r));else if(r instanceof Response){let n={},o=r.headers.get("Content-Type");o&&(n={type:o}),t.append(e,sJ([await r.blob()],i2e(r),n))}else if(pAr(r))t.append(e,sJ([await new Response(Out(r)).blob()],i2e(r)));else if(FRa(r))t.append(e,sJ([r],i2e(r),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(n=>dAr(t,e+"[]",n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([n,o])=>dAr(t,`${e}[${n}]`,o)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},"addFormValue");var p0i=a(t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function","isBlobLike"),URa=a(t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&p0i(t),"isFileLike"),QRa=a(t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function","isResponseLike");async function Qut(t,e,r){if(fAr(),t=await t,e||(e=i2e(t)),URa(t))return t instanceof File&&e==null&&r==null?t:sJ([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(QRa(t)){let o=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),sJ(await hAr(o),e,r)}let n=await hAr(t);if(!r?.type){let o=n.find(s=>typeof s=="object"&&"type"in s&&s.type);typeof o=="string"&&(r={...r,type:o})}return sJ(n,e,r)}a(Qut,"toFile");async function hAr(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(p0i(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(pAr(t))for await(let r of t)e.push(...await hAr(r));else{let r=t?.constructor?.name;throw new Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${qRa(t)}`)}return e}a(hAr,"getBytes");function qRa(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(r=>`"${r}"`).join(", ")}]`}a(qRa,"propsForError");f();f();f();f();var z0=class{static{a(this,"APIResource")}constructor(e){this._client=e}};f();f();var h0i=Symbol.for("brand.privateNullableHeaders");function*HRa(t){if(!t)return;if(h0i in t){let{values:n,nulls:o}=t;yield*n.entries();for(let s of o)yield[s,null];return}let e=!1,r;t instanceof Headers?r=t.entries():nAr(t)?r=t:(e=!0,r=Object.entries(t??{}));for(let n of r){let o=n[0];if(typeof o!="string")throw new TypeError("expected header name to be a string");let s=nAr(n[1])?n[1]:[n[1]],c=!1;for(let l of s)l!==void 0&&(e&&!c&&(c=!0,yield[o,null]),yield[o,l])}}a(HRa,"iterateHeaders");var ba=a(t=>{let e=new Headers,r=new Set;for(let n of t){let o=new Set;for(let[s,c]of HRa(n)){let l=s.toLowerCase();o.has(l)||(e.delete(s),o.add(l)),c===null?(e.delete(s),r.add(l)):(e.append(s,c),r.delete(l))}}return{[h0i]:!0,values:e,nulls:r}},"buildHeaders");f();function g0i(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}a(g0i,"encodeURIPath");var m0i=Object.freeze(Object.create(null)),jRa=a((t=g0i)=>a(function(r,...n){if(r.length===1)return r[0];let o=!1,s=[],c=r.reduce((p,h,m)=>{/[?#]/.test(h)&&(o=!0);let g=n[m],A=(o?encodeURIComponent:t)(""+g);return m!==n.length&&(g==null||typeof g=="object"&&g.toString===Object.getPrototypeOf(Object.getPrototypeOf(g.hasOwnProperty??m0i)??m0i)?.toString)&&(A=g+"",s.push({start:p.length+h.length,length:A.length,error:`Value of type ${Object.prototype.toString.call(g).slice(8,-1)} is not a valid path parameter`})),p+h+(m===n.length?"":A)},""),l=c.split(/[?#]/,1)[0],u=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,d;for(;(d=u.exec(l))!==null;)s.push({start:d.index,length:d[0].length,error:`Value "${d[0]}" can't be safely passed as a path parameter`});if(s.sort((p,h)=>p.start-h.start),s.length>0){let p=0,h=s.reduce((m,g)=>{let A=" ".repeat(g.start-p),y="^".repeat(g.length);return p=g.start+g.length,m+A+y},"");throw new oi(`Path parameters result in path with invalid segments: ${s.map(m=>m.error).join(` `)} ${c} -${h}`)}return c},"path"),"createPathTagFunction"),NA=Hxa(Afi);var zfe=class extends Z0{static{a(this,"Files")}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/files",_I,{query:o,...r,headers:Ra([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(e,r={},n){let{betas:o}=r??{};return this._client.delete(NA`/v1/files/${e}`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(e,r={},n){let{betas:o}=r??{};return this._client.get(NA`/v1/files/${e}/content`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,r={},n){let{betas:o}=r??{};return this._client.get(NA`/v1/files/${e}`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(e,r){let{betas:n,...o}=e;return this._client.post("/v1/files",pfi({body:o,...r,headers:Ra([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])},this._client))}};f();var Yfe=class extends Z0{static{a(this,"Models")}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(NA`/v1/models/${e}?beta=true`,{...n,headers:Ra([{...o?.toString()!=null?{"anthropic-beta":o?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/models?beta=true",_I,{query:o,...r,headers:Ra([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}};f();f();f();var Kfe=class t{static{a(this,"JSONLDecoder")}constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new O3;for await(let r of this.iterator)for(let n of e.decode(r))yield JSON.parse(n);for(let r of e.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,r){if(!e.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new si("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new si("Attempted to iterate over a response with no body");return new t(tPe(e.body),r)}};f();var Jfe=class extends Z0{static{a(this,"Batches")}create(e,r){let{betas:n,...o}=e;return this._client.post("/v1/messages/batches?beta=true",{body:o,...r,headers:Ra([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(NA`/v1/messages/batches/${e}?beta=true`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",_I,{query:o,...r,headers:Ra([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(e,r={},n){let{betas:o}=r??{};return this._client.delete(NA`/v1/messages/batches/${e}?beta=true`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(e,r={},n){let{betas:o}=r??{};return this._client.post(NA`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:Ra([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(e,r={},n){let o=await this.retrieve(e);if(!o.results_url)throw new si(`No batch \`results_url\`; Has it finished processing? ${o.processing_status} - ${o.id}`);let{betas:s}=r??{};return this._client.get(o.results_url,{...n,headers:Ra([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((c,l)=>Kfe.fromResponse(l.response,l.controller))}};f();f();f();var Wxa=a(t=>{let e=0,r=[];for(;e{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),Xfe(t);break;case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),Xfe(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),Xfe(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),Xfe(t);break;case"delimiter":return t=t.slice(0,t.length-1),Xfe(t);break}return t},"strip"),zxa=a(t=>{let e=[];return t.map(r=>{r.type==="brace"&&(r.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(r=>{r==="}"?t.push({type:"brace",value:"}"}):r==="]"&&t.push({type:"paren",value:"]"})}),t},"unstrip"),Yxa=a(t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},"generate"),Ddt=a(t=>JSON.parse(Yxa(zxa(Xfe(Wxa(t))))),"partialParse");var vI,nq,cPe,Mdt,lPe,uPe,Odt,dPe,L3,fPe,Bdt,Ldt,Zfe,Fdt,Udt,Ygr,yfi,Qdt,Kgr,Jgr,Xgr,Efi,Cfi="__json_buf";function _fi(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}a(_fi,"tracksToolInput");var qdt=class t{static{a(this,"BetaMessageStream")}constructor(){vI.add(this),this.messages=[],this.receivedMessages=[],nq.set(this,void 0),this.controller=new AbortController,cPe.set(this,void 0),Mdt.set(this,()=>{}),lPe.set(this,()=>{}),uPe.set(this,void 0),Odt.set(this,()=>{}),dPe.set(this,()=>{}),L3.set(this,{}),fPe.set(this,!1),Bdt.set(this,!1),Ldt.set(this,!1),Zfe.set(this,!1),Fdt.set(this,void 0),Udt.set(this,void 0),Qdt.set(this,e=>{if(ui(this,Bdt,!0,"f"),M3(e)&&(e=new cg),e instanceof cg)return ui(this,Ldt,!0,"f"),this._emit("abort",e);if(e instanceof si)return this._emit("error",e);if(e instanceof Error){let r=new si(e.message);return r.cause=e,this._emit("error",r)}return this._emit("error",new si(String(e)))}),ui(this,cPe,new Promise((e,r)=>{ui(this,Mdt,e,"f"),ui(this,lPe,r,"f")}),"f"),ui(this,uPe,new Promise((e,r)=>{ui(this,Odt,e,"f"),ui(this,dPe,r,"f")}),"f"),Lt(this,cPe,"f").catch(()=>{}),Lt(this,uPe,"f").catch(()=>{})}get response(){return Lt(this,Fdt,"f")}get request_id(){return Lt(this,Udt,"f")}async withResponse(){let e=await Lt(this,cPe,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t;return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n){let o=new t;for(let s of r.messages)o._addMessageParam(s);return o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Lt(this,Qdt,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let o=n?.signal,s;o&&(o.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),o.addEventListener("abort",s));try{Lt(this,vI,"m",Kgr).call(this);let{response:c,data:l}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(c);for await(let u of l)Lt(this,vI,"m",Jgr).call(this,u);if(l.controller.signal?.aborted)throw new cg;Lt(this,vI,"m",Xgr).call(this)}finally{o&&s&&o.removeEventListener("abort",s)}}_connected(e){this.ended||(ui(this,Fdt,e,"f"),ui(this,Udt,e?.headers.get("request-id"),"f"),Lt(this,Mdt,"f").call(this,e),this._emit("connect"))}get ended(){return Lt(this,fPe,"f")}get errored(){return Lt(this,Bdt,"f")}get aborted(){return Lt(this,Ldt,"f")}abort(){this.controller.abort()}on(e,r){return(Lt(this,L3,"f")[e]||(Lt(this,L3,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Lt(this,L3,"f")[e];if(!n)return this;let o=n.findIndex(s=>s.listener===r);return o>=0&&n.splice(o,1),this}once(e,r){return(Lt(this,L3,"f")[e]||(Lt(this,L3,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{ui(this,Zfe,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){ui(this,Zfe,!0,"f"),await Lt(this,uPe,"f")}get currentMessage(){return Lt(this,nq,"f")}async finalMessage(){return await this.done(),Lt(this,vI,"m",Ygr).call(this)}async finalText(){return await this.done(),Lt(this,vI,"m",yfi).call(this)}_emit(e,...r){if(Lt(this,fPe,"f"))return;e==="end"&&(ui(this,fPe,!0,"f"),Lt(this,Odt,"f").call(this));let n=Lt(this,L3,"f")[e];if(n&&(Lt(this,L3,"f")[e]=n.filter(o=>!o.once),n.forEach(({listener:o})=>o(...r))),e==="abort"){let o=r[0];!Lt(this,Zfe,"f")&&!n?.length&&Promise.reject(o),Lt(this,lPe,"f").call(this,o),Lt(this,dPe,"f").call(this,o),this._emit("end");return}if(e==="error"){let o=r[0];!Lt(this,Zfe,"f")&&!n?.length&&Promise.reject(o),Lt(this,lPe,"f").call(this,o),Lt(this,dPe,"f").call(this,o),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Lt(this,vI,"m",Ygr).call(this))}async _fromReadableStream(e,r){let n=r?.signal,o;n&&(n.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),n.addEventListener("abort",o));try{Lt(this,vI,"m",Kgr).call(this),this._connected(null);let s=l5.fromReadableStream(e,this.controller);for await(let c of s)Lt(this,vI,"m",Jgr).call(this,c);if(s.controller.signal?.aborted)throw new cg;Lt(this,vI,"m",Xgr).call(this)}finally{n&&o&&n.removeEventListener("abort",o)}}[(nq=new WeakMap,cPe=new WeakMap,Mdt=new WeakMap,lPe=new WeakMap,uPe=new WeakMap,Odt=new WeakMap,dPe=new WeakMap,L3=new WeakMap,fPe=new WeakMap,Bdt=new WeakMap,Ldt=new WeakMap,Zfe=new WeakMap,Fdt=new WeakMap,Udt=new WeakMap,Qdt=new WeakMap,vI=new WeakSet,Ygr=a(function(){if(this.receivedMessages.length===0)throw new si("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},"_BetaMessageStream_getFinalMessage"),yfi=a(function(){if(this.receivedMessages.length===0)throw new si("stream ended without producing a Message with role=assistant");let r=this.receivedMessages.at(-1).content.filter(n=>n.type==="text").map(n=>n.text);if(r.length===0)throw new si("stream ended without producing a content block with type=text");return r.join(" ")},"_BetaMessageStream_getFinalText"),Kgr=a(function(){this.ended||ui(this,nq,void 0,"f")},"_BetaMessageStream_beginRequest"),Jgr=a(function(r){if(this.ended)return;let n=Lt(this,vI,"m",Efi).call(this,r);switch(this._emit("streamEvent",r,n),r.type){case"content_block_delta":{let o=n.content.at(-1);switch(r.delta.type){case"text_delta":{o.type==="text"&&this._emit("text",r.delta.text,o.text||"");break}case"citations_delta":{o.type==="text"&&this._emit("citation",r.delta.citation,o.citations??[]);break}case"input_json_delta":{_fi(o)&&o.input&&this._emit("inputJson",r.delta.partial_json,o.input);break}case"thinking_delta":{o.type==="thinking"&&this._emit("thinking",r.delta.thinking,o.thinking);break}case"signature_delta":{o.type==="thinking"&&this._emit("signature",o.signature);break}default:r.delta}break}case"message_stop":{this._addMessageParam(n),this._addMessage(n,!0);break}case"content_block_stop":{this._emit("contentBlock",n.content.at(-1));break}case"message_start":{ui(this,nq,n,"f");break}case"content_block_start":case"message_delta":break}},"_BetaMessageStream_addStreamEvent"),Xgr=a(function(){if(this.ended)throw new si("stream has ended, this shouldn't happen");let r=Lt(this,nq,"f");if(!r)throw new si("request ended without sending any chunks");return ui(this,nq,void 0,"f"),r},"_BetaMessageStream_endRequest"),Efi=a(function(r){let n=Lt(this,nq,"f");if(r.type==="message_start"){if(n)throw new si(`Unexpected event order, got ${r.type} before receiving "message_stop"`);return r.message}if(!n)throw new si(`Unexpected event order, got ${r.type} before "message_start"`);switch(r.type){case"message_stop":return n;case"message_delta":return n.container=r.delta.container,n.stop_reason=r.delta.stop_reason,n.stop_sequence=r.delta.stop_sequence,n.usage.output_tokens=r.usage.output_tokens,r.usage.input_tokens!=null&&(n.usage.input_tokens=r.usage.input_tokens),r.usage.cache_creation_input_tokens!=null&&(n.usage.cache_creation_input_tokens=r.usage.cache_creation_input_tokens),r.usage.cache_read_input_tokens!=null&&(n.usage.cache_read_input_tokens=r.usage.cache_read_input_tokens),r.usage.server_tool_use!=null&&(n.usage.server_tool_use=r.usage.server_tool_use),n;case"content_block_start":return n.content.push(r.content_block),n;case"content_block_delta":{let o=n.content.at(r.index);switch(r.delta.type){case"text_delta":{o?.type==="text"&&(n.content[r.index]={...o,text:(o.text||"")+r.delta.text});break}case"citations_delta":{o?.type==="text"&&(n.content[r.index]={...o,citations:[...o.citations??[],r.delta.citation]});break}case"input_json_delta":{if(o&&_fi(o)){let s=o[Cfi]||"";s+=r.delta.partial_json;let c={...o};if(Object.defineProperty(c,Cfi,{value:s,enumerable:!1,writable:!0}),s)try{c.input=Ddt(s)}catch(l){let u=new si(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${l}. JSON: ${s}`);Lt(this,Qdt,"f").call(this,u)}n.content[r.index]=c}break}case"thinking_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,thinking:o.thinking+r.delta.thinking});break}case"signature_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,signature:r.delta.signature});break}default:r.delta}return n}case"content_block_stop":return n}},"_BetaMessageStream_accumulateMessage"),Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",o=>{let s=r.shift();s?s.resolve(o):e.push(o)}),this.on("end",()=>{n=!0;for(let o of r)o.resolve(void 0);r.length=0}),this.on("abort",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),this.on("error",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),{next:a(async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((s,c)=>r.push({resolve:s,reject:c})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),"next"),return:a(async()=>(this.abort(),{value:void 0,done:!0}),"return")}}toReadableStream(){return new l5(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};f();var Gdt={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192};var vfi={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"},eX=class extends Z0{static{a(this,"Messages")}constructor(){super(...arguments),this.batches=new Jfe(this._client)}create(e,r){let{betas:n,...o}=e;o.model in vfi&&console.warn(`The model '${o.model}' is deprecated and will reach end-of-life on ${vfi[o.model]} -Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let s=this._client._options.timeout;if(!o.stream&&s==null){let c=Gdt[o.model]??void 0;s=this._client.calculateNonstreamingTimeout(o.max_tokens,c)}return this._client.post("/v1/messages?beta=true",{body:o,timeout:s??6e5,...r,headers:Ra([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}stream(e,r){return qdt.createMessage(this,e,r)}countTokens(e,r){let{betas:n,...o}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:o,...r,headers:Ra([{"anthropic-beta":[...n??[],"token-counting-2024-11-01"].toString()},r?.headers])})}};eX.Batches=Jfe;var u5=class extends Z0{static{a(this,"Beta")}constructor(){super(...arguments),this.models=new Yfe(this._client),this.messages=new eX(this._client),this.files=new zfe(this._client)}};u5.Models=Yfe;u5.Messages=eX;u5.Files=zfe;f();var tX=class extends Z0{static{a(this,"Completions")}create(e,r){let{betas:n,...o}=e;return this._client.post("/v1/complete",{body:o,timeout:this._client._options.timeout??6e5,...r,headers:Ra([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}};f();f();var bI,iq,pPe,Hdt,hPe,mPe,jdt,gPe,F3,APe,$dt,Vdt,e0e,Wdt,zdt,Zgr,bfi,eAr,tAr,rAr,nAr,Tfi,Sfi="__json_buf";function Ifi(t){return t.type==="tool_use"||t.type==="server_tool_use"}a(Ifi,"tracksToolInput");var Ydt=class t{static{a(this,"MessageStream")}constructor(){bI.add(this),this.messages=[],this.receivedMessages=[],iq.set(this,void 0),this.controller=new AbortController,pPe.set(this,void 0),Hdt.set(this,()=>{}),hPe.set(this,()=>{}),mPe.set(this,void 0),jdt.set(this,()=>{}),gPe.set(this,()=>{}),F3.set(this,{}),APe.set(this,!1),$dt.set(this,!1),Vdt.set(this,!1),e0e.set(this,!1),Wdt.set(this,void 0),zdt.set(this,void 0),eAr.set(this,e=>{if(ui(this,$dt,!0,"f"),M3(e)&&(e=new cg),e instanceof cg)return ui(this,Vdt,!0,"f"),this._emit("abort",e);if(e instanceof si)return this._emit("error",e);if(e instanceof Error){let r=new si(e.message);return r.cause=e,this._emit("error",r)}return this._emit("error",new si(String(e)))}),ui(this,pPe,new Promise((e,r)=>{ui(this,Hdt,e,"f"),ui(this,hPe,r,"f")}),"f"),ui(this,mPe,new Promise((e,r)=>{ui(this,jdt,e,"f"),ui(this,gPe,r,"f")}),"f"),Lt(this,pPe,"f").catch(()=>{}),Lt(this,mPe,"f").catch(()=>{})}get response(){return Lt(this,Wdt,"f")}get request_id(){return Lt(this,zdt,"f")}async withResponse(){let e=await Lt(this,pPe,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t;return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n){let o=new t;for(let s of r.messages)o._addMessageParam(s);return o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Lt(this,eAr,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let o=n?.signal,s;o&&(o.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),o.addEventListener("abort",s));try{Lt(this,bI,"m",tAr).call(this);let{response:c,data:l}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(c);for await(let u of l)Lt(this,bI,"m",rAr).call(this,u);if(l.controller.signal?.aborted)throw new cg;Lt(this,bI,"m",nAr).call(this)}finally{o&&s&&o.removeEventListener("abort",s)}}_connected(e){this.ended||(ui(this,Wdt,e,"f"),ui(this,zdt,e?.headers.get("request-id"),"f"),Lt(this,Hdt,"f").call(this,e),this._emit("connect"))}get ended(){return Lt(this,APe,"f")}get errored(){return Lt(this,$dt,"f")}get aborted(){return Lt(this,Vdt,"f")}abort(){this.controller.abort()}on(e,r){return(Lt(this,F3,"f")[e]||(Lt(this,F3,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Lt(this,F3,"f")[e];if(!n)return this;let o=n.findIndex(s=>s.listener===r);return o>=0&&n.splice(o,1),this}once(e,r){return(Lt(this,F3,"f")[e]||(Lt(this,F3,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{ui(this,e0e,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){ui(this,e0e,!0,"f"),await Lt(this,mPe,"f")}get currentMessage(){return Lt(this,iq,"f")}async finalMessage(){return await this.done(),Lt(this,bI,"m",Zgr).call(this)}async finalText(){return await this.done(),Lt(this,bI,"m",bfi).call(this)}_emit(e,...r){if(Lt(this,APe,"f"))return;e==="end"&&(ui(this,APe,!0,"f"),Lt(this,jdt,"f").call(this));let n=Lt(this,F3,"f")[e];if(n&&(Lt(this,F3,"f")[e]=n.filter(o=>!o.once),n.forEach(({listener:o})=>o(...r))),e==="abort"){let o=r[0];!Lt(this,e0e,"f")&&!n?.length&&Promise.reject(o),Lt(this,hPe,"f").call(this,o),Lt(this,gPe,"f").call(this,o),this._emit("end");return}if(e==="error"){let o=r[0];!Lt(this,e0e,"f")&&!n?.length&&Promise.reject(o),Lt(this,hPe,"f").call(this,o),Lt(this,gPe,"f").call(this,o),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Lt(this,bI,"m",Zgr).call(this))}async _fromReadableStream(e,r){let n=r?.signal,o;n&&(n.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),n.addEventListener("abort",o));try{Lt(this,bI,"m",tAr).call(this),this._connected(null);let s=l5.fromReadableStream(e,this.controller);for await(let c of s)Lt(this,bI,"m",rAr).call(this,c);if(s.controller.signal?.aborted)throw new cg;Lt(this,bI,"m",nAr).call(this)}finally{n&&o&&n.removeEventListener("abort",o)}}[(iq=new WeakMap,pPe=new WeakMap,Hdt=new WeakMap,hPe=new WeakMap,mPe=new WeakMap,jdt=new WeakMap,gPe=new WeakMap,F3=new WeakMap,APe=new WeakMap,$dt=new WeakMap,Vdt=new WeakMap,e0e=new WeakMap,Wdt=new WeakMap,zdt=new WeakMap,eAr=new WeakMap,bI=new WeakSet,Zgr=a(function(){if(this.receivedMessages.length===0)throw new si("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},"_MessageStream_getFinalMessage"),bfi=a(function(){if(this.receivedMessages.length===0)throw new si("stream ended without producing a Message with role=assistant");let r=this.receivedMessages.at(-1).content.filter(n=>n.type==="text").map(n=>n.text);if(r.length===0)throw new si("stream ended without producing a content block with type=text");return r.join(" ")},"_MessageStream_getFinalText"),tAr=a(function(){this.ended||ui(this,iq,void 0,"f")},"_MessageStream_beginRequest"),rAr=a(function(r){if(this.ended)return;let n=Lt(this,bI,"m",Tfi).call(this,r);switch(this._emit("streamEvent",r,n),r.type){case"content_block_delta":{let o=n.content.at(-1);switch(r.delta.type){case"text_delta":{o.type==="text"&&this._emit("text",r.delta.text,o.text||"");break}case"citations_delta":{o.type==="text"&&this._emit("citation",r.delta.citation,o.citations??[]);break}case"input_json_delta":{Ifi(o)&&o.input&&this._emit("inputJson",r.delta.partial_json,o.input);break}case"thinking_delta":{o.type==="thinking"&&this._emit("thinking",r.delta.thinking,o.thinking);break}case"signature_delta":{o.type==="thinking"&&this._emit("signature",o.signature);break}default:r.delta}break}case"message_stop":{this._addMessageParam(n),this._addMessage(n,!0);break}case"content_block_stop":{this._emit("contentBlock",n.content.at(-1));break}case"message_start":{ui(this,iq,n,"f");break}case"content_block_start":case"message_delta":break}},"_MessageStream_addStreamEvent"),nAr=a(function(){if(this.ended)throw new si("stream has ended, this shouldn't happen");let r=Lt(this,iq,"f");if(!r)throw new si("request ended without sending any chunks");return ui(this,iq,void 0,"f"),r},"_MessageStream_endRequest"),Tfi=a(function(r){let n=Lt(this,iq,"f");if(r.type==="message_start"){if(n)throw new si(`Unexpected event order, got ${r.type} before receiving "message_stop"`);return r.message}if(!n)throw new si(`Unexpected event order, got ${r.type} before "message_start"`);switch(r.type){case"message_stop":return n;case"message_delta":return n.stop_reason=r.delta.stop_reason,n.stop_sequence=r.delta.stop_sequence,n.usage.output_tokens=r.usage.output_tokens,r.usage.input_tokens!=null&&(n.usage.input_tokens=r.usage.input_tokens),r.usage.cache_creation_input_tokens!=null&&(n.usage.cache_creation_input_tokens=r.usage.cache_creation_input_tokens),r.usage.cache_read_input_tokens!=null&&(n.usage.cache_read_input_tokens=r.usage.cache_read_input_tokens),r.usage.server_tool_use!=null&&(n.usage.server_tool_use=r.usage.server_tool_use),n;case"content_block_start":return n.content.push({...r.content_block}),n;case"content_block_delta":{let o=n.content.at(r.index);switch(r.delta.type){case"text_delta":{o?.type==="text"&&(n.content[r.index]={...o,text:(o.text||"")+r.delta.text});break}case"citations_delta":{o?.type==="text"&&(n.content[r.index]={...o,citations:[...o.citations??[],r.delta.citation]});break}case"input_json_delta":{if(o&&Ifi(o)){let s=o[Sfi]||"";s+=r.delta.partial_json;let c={...o};Object.defineProperty(c,Sfi,{value:s,enumerable:!1,writable:!0}),s&&(c.input=Ddt(s)),n.content[r.index]=c}break}case"thinking_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,thinking:o.thinking+r.delta.thinking});break}case"signature_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,signature:r.delta.signature});break}default:r.delta}return n}case"content_block_stop":return n}},"_MessageStream_accumulateMessage"),Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",o=>{let s=r.shift();s?s.resolve(o):e.push(o)}),this.on("end",()=>{n=!0;for(let o of r)o.resolve(void 0);r.length=0}),this.on("abort",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),this.on("error",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),{next:a(async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((s,c)=>r.push({resolve:s,reject:c})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),"next"),return:a(async()=>(this.abort(),{value:void 0,done:!0}),"return")}}toReadableStream(){return new l5(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};f();var t0e=class extends Z0{static{a(this,"Batches")}create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get(NA`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",_I,{query:e,...r})}delete(e,r){return this._client.delete(NA`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post(NA`/v1/messages/batches/${e}/cancel`,r)}async results(e,r){let n=await this.retrieve(e);if(!n.results_url)throw new si(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:Ra([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((o,s)=>Kfe.fromResponse(s.response,s.controller))}};var oq=class extends Z0{static{a(this,"Messages")}constructor(){super(...arguments),this.batches=new t0e(this._client)}create(e,r){e.model in xfi&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${xfi[e.model]} -Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let n=this._client._options.timeout;if(!e.stream&&n==null){let o=Gdt[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,o)}return this._client.post("/v1/messages",{body:e,timeout:n??6e5,...r,stream:e.stream??!1})}stream(e,r){return Ydt.createMessage(this,e,r)}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},xfi={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};oq.Batches=t0e;f();var rX=class extends Z0{static{a(this,"Models")}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(NA`/v1/models/${e}`,{...n,headers:Ra([{...o?.toString()!=null?{"anthropic-beta":o?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/models",_I,{query:o,...r,headers:Ra([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}};f();var yPe=a(t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()},"readEnv");var iAr,oAr,Kdt,wfi,Ed=class{static{a(this,"BaseAnthropic")}constructor({baseURL:e=yPe("ANTHROPIC_BASE_URL"),apiKey:r=yPe("ANTHROPIC_API_KEY")??null,authToken:n=yPe("ANTHROPIC_AUTH_TOKEN")??null,...o}={}){iAr.add(this),Kdt.set(this,void 0);let s={apiKey:r,authToken:n,...o,baseURL:e||"https://api.anthropic.com"};if(!s.dangerouslyAllowBrowser&&rfi())throw new si(`It looks like you're running in a browser-like environment. +${h}`)}return c},"path"),"createPathTagFunction"),TA=jRa(g0i);var cfe=class extends z0{static{a(this,"Files")}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/files",lI,{query:o,...r,headers:ba([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(e,r={},n){let{betas:o}=r??{};return this._client.delete(TA`/v1/files/${e}`,{...n,headers:ba([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(e,r={},n){let{betas:o}=r??{};return this._client.get(TA`/v1/files/${e}/content`,{...n,headers:ba([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,r={},n){let{betas:o}=r??{};return this._client.get(TA`/v1/files/${e}`,{...n,headers:ba([{"anthropic-beta":[...o??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(e,r){let{betas:n,...o}=e;return this._client.post("/v1/files",f0i({body:o,...r,headers:ba([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])},this._client))}};f();var lfe=class extends z0{static{a(this,"Models")}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(TA`/v1/models/${e}?beta=true`,{...n,headers:ba([{...o?.toString()!=null?{"anthropic-beta":o?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/models?beta=true",lI,{query:o,...r,headers:ba([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}};f();f();f();var ufe=class t{static{a(this,"JSONLDecoder")}constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new A3;for await(let r of this.iterator)for(let n of e.decode(r))yield JSON.parse(n);for(let r of e.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,r){if(!e.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new oi("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new oi("Attempted to iterate over a response with no body");return new t(XRe(e.body),r)}};f();var dfe=class extends z0{static{a(this,"Batches")}create(e,r){let{betas:n,...o}=e;return this._client.post("/v1/messages/batches?beta=true",{body:o,...r,headers:ba([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(TA`/v1/messages/batches/${e}?beta=true`,{...n,headers:ba([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",lI,{query:o,...r,headers:ba([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(e,r={},n){let{betas:o}=r??{};return this._client.delete(TA`/v1/messages/batches/${e}?beta=true`,{...n,headers:ba([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(e,r={},n){let{betas:o}=r??{};return this._client.post(TA`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:ba([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(e,r={},n){let o=await this.retrieve(e);if(!o.results_url)throw new oi(`No batch \`results_url\`; Has it finished processing? ${o.processing_status} - ${o.id}`);let{betas:s}=r??{};return this._client.get(o.results_url,{...n,headers:ba([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((c,l)=>ufe.fromResponse(l.response,l.controller))}};f();f();f();var zRa=a(t=>{let e=0,r=[];for(;e{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),ffe(t);break;case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),ffe(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),ffe(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),ffe(t);break;case"delimiter":return t=t.slice(0,t.length-1),ffe(t);break}return t},"strip"),YRa=a(t=>{let e=[];return t.map(r=>{r.type==="brace"&&(r.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(r=>{r==="}"?t.push({type:"brace",value:"}"}):r==="]"&&t.push({type:"paren",value:"]"})}),t},"unstrip"),KRa=a(t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},"generate"),qut=a(t=>JSON.parse(KRa(YRa(ffe(zRa(t))))),"partialParse");var uI,PQ,o2e,Gut,s2e,a2e,Hut,c2e,E3,l2e,jut,$ut,pfe,Vut,Wut,mAr,A0i,zut,gAr,AAr,yAr,y0i,E0i="__json_buf";function _0i(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}a(_0i,"tracksToolInput");var Yut=class t{static{a(this,"BetaMessageStream")}constructor(){uI.add(this),this.messages=[],this.receivedMessages=[],PQ.set(this,void 0),this.controller=new AbortController,o2e.set(this,void 0),Gut.set(this,()=>{}),s2e.set(this,()=>{}),a2e.set(this,void 0),Hut.set(this,()=>{}),c2e.set(this,()=>{}),E3.set(this,{}),l2e.set(this,!1),jut.set(this,!1),$ut.set(this,!1),pfe.set(this,!1),Vut.set(this,void 0),Wut.set(this,void 0),zut.set(this,e=>{if(li(this,jut,!0,"f"),g3(e)&&(e=new Xm),e instanceof Xm)return li(this,$ut,!0,"f"),this._emit("abort",e);if(e instanceof oi)return this._emit("error",e);if(e instanceof Error){let r=new oi(e.message);return r.cause=e,this._emit("error",r)}return this._emit("error",new oi(String(e)))}),li(this,o2e,new Promise((e,r)=>{li(this,Gut,e,"f"),li(this,s2e,r,"f")}),"f"),li(this,a2e,new Promise((e,r)=>{li(this,Hut,e,"f"),li(this,c2e,r,"f")}),"f"),Ot(this,o2e,"f").catch(()=>{}),Ot(this,a2e,"f").catch(()=>{})}get response(){return Ot(this,Vut,"f")}get request_id(){return Ot(this,Wut,"f")}async withResponse(){let e=await Ot(this,o2e,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t;return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n){let o=new t;for(let s of r.messages)o._addMessageParam(s);return o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Ot(this,zut,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let o=n?.signal,s;o&&(o.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),o.addEventListener("abort",s));try{Ot(this,uI,"m",gAr).call(this);let{response:c,data:l}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(c);for await(let u of l)Ot(this,uI,"m",AAr).call(this,u);if(l.controller.signal?.aborted)throw new Xm;Ot(this,uI,"m",yAr).call(this)}finally{o&&s&&o.removeEventListener("abort",s)}}_connected(e){this.ended||(li(this,Vut,e,"f"),li(this,Wut,e?.headers.get("request-id"),"f"),Ot(this,Gut,"f").call(this,e),this._emit("connect"))}get ended(){return Ot(this,l2e,"f")}get errored(){return Ot(this,jut,"f")}get aborted(){return Ot(this,$ut,"f")}abort(){this.controller.abort()}on(e,r){return(Ot(this,E3,"f")[e]||(Ot(this,E3,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Ot(this,E3,"f")[e];if(!n)return this;let o=n.findIndex(s=>s.listener===r);return o>=0&&n.splice(o,1),this}once(e,r){return(Ot(this,E3,"f")[e]||(Ot(this,E3,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{li(this,pfe,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){li(this,pfe,!0,"f"),await Ot(this,a2e,"f")}get currentMessage(){return Ot(this,PQ,"f")}async finalMessage(){return await this.done(),Ot(this,uI,"m",mAr).call(this)}async finalText(){return await this.done(),Ot(this,uI,"m",A0i).call(this)}_emit(e,...r){if(Ot(this,l2e,"f"))return;e==="end"&&(li(this,l2e,!0,"f"),Ot(this,Hut,"f").call(this));let n=Ot(this,E3,"f")[e];if(n&&(Ot(this,E3,"f")[e]=n.filter(o=>!o.once),n.forEach(({listener:o})=>o(...r))),e==="abort"){let o=r[0];!Ot(this,pfe,"f")&&!n?.length&&Promise.reject(o),Ot(this,s2e,"f").call(this,o),Ot(this,c2e,"f").call(this,o),this._emit("end");return}if(e==="error"){let o=r[0];!Ot(this,pfe,"f")&&!n?.length&&Promise.reject(o),Ot(this,s2e,"f").call(this,o),Ot(this,c2e,"f").call(this,o),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Ot(this,uI,"m",mAr).call(this))}async _fromReadableStream(e,r){let n=r?.signal,o;n&&(n.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),n.addEventListener("abort",o));try{Ot(this,uI,"m",gAr).call(this),this._connected(null);let s=JD.fromReadableStream(e,this.controller);for await(let c of s)Ot(this,uI,"m",AAr).call(this,c);if(s.controller.signal?.aborted)throw new Xm;Ot(this,uI,"m",yAr).call(this)}finally{n&&o&&n.removeEventListener("abort",o)}}[(PQ=new WeakMap,o2e=new WeakMap,Gut=new WeakMap,s2e=new WeakMap,a2e=new WeakMap,Hut=new WeakMap,c2e=new WeakMap,E3=new WeakMap,l2e=new WeakMap,jut=new WeakMap,$ut=new WeakMap,pfe=new WeakMap,Vut=new WeakMap,Wut=new WeakMap,zut=new WeakMap,uI=new WeakSet,mAr=a(function(){if(this.receivedMessages.length===0)throw new oi("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},"_BetaMessageStream_getFinalMessage"),A0i=a(function(){if(this.receivedMessages.length===0)throw new oi("stream ended without producing a Message with role=assistant");let r=this.receivedMessages.at(-1).content.filter(n=>n.type==="text").map(n=>n.text);if(r.length===0)throw new oi("stream ended without producing a content block with type=text");return r.join(" ")},"_BetaMessageStream_getFinalText"),gAr=a(function(){this.ended||li(this,PQ,void 0,"f")},"_BetaMessageStream_beginRequest"),AAr=a(function(r){if(this.ended)return;let n=Ot(this,uI,"m",y0i).call(this,r);switch(this._emit("streamEvent",r,n),r.type){case"content_block_delta":{let o=n.content.at(-1);switch(r.delta.type){case"text_delta":{o.type==="text"&&this._emit("text",r.delta.text,o.text||"");break}case"citations_delta":{o.type==="text"&&this._emit("citation",r.delta.citation,o.citations??[]);break}case"input_json_delta":{_0i(o)&&o.input&&this._emit("inputJson",r.delta.partial_json,o.input);break}case"thinking_delta":{o.type==="thinking"&&this._emit("thinking",r.delta.thinking,o.thinking);break}case"signature_delta":{o.type==="thinking"&&this._emit("signature",o.signature);break}default:r.delta}break}case"message_stop":{this._addMessageParam(n),this._addMessage(n,!0);break}case"content_block_stop":{this._emit("contentBlock",n.content.at(-1));break}case"message_start":{li(this,PQ,n,"f");break}case"content_block_start":case"message_delta":break}},"_BetaMessageStream_addStreamEvent"),yAr=a(function(){if(this.ended)throw new oi("stream has ended, this shouldn't happen");let r=Ot(this,PQ,"f");if(!r)throw new oi("request ended without sending any chunks");return li(this,PQ,void 0,"f"),r},"_BetaMessageStream_endRequest"),y0i=a(function(r){let n=Ot(this,PQ,"f");if(r.type==="message_start"){if(n)throw new oi(`Unexpected event order, got ${r.type} before receiving "message_stop"`);return r.message}if(!n)throw new oi(`Unexpected event order, got ${r.type} before "message_start"`);switch(r.type){case"message_stop":return n;case"message_delta":return n.container=r.delta.container,n.stop_reason=r.delta.stop_reason,n.stop_sequence=r.delta.stop_sequence,n.usage.output_tokens=r.usage.output_tokens,r.usage.input_tokens!=null&&(n.usage.input_tokens=r.usage.input_tokens),r.usage.cache_creation_input_tokens!=null&&(n.usage.cache_creation_input_tokens=r.usage.cache_creation_input_tokens),r.usage.cache_read_input_tokens!=null&&(n.usage.cache_read_input_tokens=r.usage.cache_read_input_tokens),r.usage.server_tool_use!=null&&(n.usage.server_tool_use=r.usage.server_tool_use),n;case"content_block_start":return n.content.push(r.content_block),n;case"content_block_delta":{let o=n.content.at(r.index);switch(r.delta.type){case"text_delta":{o?.type==="text"&&(n.content[r.index]={...o,text:(o.text||"")+r.delta.text});break}case"citations_delta":{o?.type==="text"&&(n.content[r.index]={...o,citations:[...o.citations??[],r.delta.citation]});break}case"input_json_delta":{if(o&&_0i(o)){let s=o[E0i]||"";s+=r.delta.partial_json;let c={...o};if(Object.defineProperty(c,E0i,{value:s,enumerable:!1,writable:!0}),s)try{c.input=qut(s)}catch(l){let u=new oi(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${l}. JSON: ${s}`);Ot(this,zut,"f").call(this,u)}n.content[r.index]=c}break}case"thinking_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,thinking:o.thinking+r.delta.thinking});break}case"signature_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,signature:r.delta.signature});break}default:r.delta}return n}case"content_block_stop":return n}},"_BetaMessageStream_accumulateMessage"),Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",o=>{let s=r.shift();s?s.resolve(o):e.push(o)}),this.on("end",()=>{n=!0;for(let o of r)o.resolve(void 0);r.length=0}),this.on("abort",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),this.on("error",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),{next:a(async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((s,c)=>r.push({resolve:s,reject:c})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),"next"),return:a(async()=>(this.abort(),{value:void 0,done:!0}),"return")}}toReadableStream(){return new JD(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};f();var Kut={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192};var C0i={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"},aJ=class extends z0{static{a(this,"Messages")}constructor(){super(...arguments),this.batches=new dfe(this._client)}create(e,r){let{betas:n,...o}=e;o.model in C0i&&console.warn(`The model '${o.model}' is deprecated and will reach end-of-life on ${C0i[o.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let s=this._client._options.timeout;if(!o.stream&&s==null){let c=Kut[o.model]??void 0;s=this._client.calculateNonstreamingTimeout(o.max_tokens,c)}return this._client.post("/v1/messages?beta=true",{body:o,timeout:s??6e5,...r,headers:ba([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}stream(e,r){return Yut.createMessage(this,e,r)}countTokens(e,r){let{betas:n,...o}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:o,...r,headers:ba([{"anthropic-beta":[...n??[],"token-counting-2024-11-01"].toString()},r?.headers])})}};aJ.Batches=dfe;var XD=class extends z0{static{a(this,"Beta")}constructor(){super(...arguments),this.models=new lfe(this._client),this.messages=new aJ(this._client),this.files=new cfe(this._client)}};XD.Models=lfe;XD.Messages=aJ;XD.Files=cfe;f();var cJ=class extends z0{static{a(this,"Completions")}create(e,r){let{betas:n,...o}=e;return this._client.post("/v1/complete",{body:o,timeout:this._client._options.timeout??6e5,...r,headers:ba([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}};f();f();var dI,kQ,u2e,Jut,d2e,f2e,Xut,p2e,_3,h2e,Zut,edt,hfe,tdt,rdt,EAr,v0i,_Ar,CAr,vAr,bAr,b0i,T0i="__json_buf";function S0i(t){return t.type==="tool_use"||t.type==="server_tool_use"}a(S0i,"tracksToolInput");var ndt=class t{static{a(this,"MessageStream")}constructor(){dI.add(this),this.messages=[],this.receivedMessages=[],kQ.set(this,void 0),this.controller=new AbortController,u2e.set(this,void 0),Jut.set(this,()=>{}),d2e.set(this,()=>{}),f2e.set(this,void 0),Xut.set(this,()=>{}),p2e.set(this,()=>{}),_3.set(this,{}),h2e.set(this,!1),Zut.set(this,!1),edt.set(this,!1),hfe.set(this,!1),tdt.set(this,void 0),rdt.set(this,void 0),_Ar.set(this,e=>{if(li(this,Zut,!0,"f"),g3(e)&&(e=new Xm),e instanceof Xm)return li(this,edt,!0,"f"),this._emit("abort",e);if(e instanceof oi)return this._emit("error",e);if(e instanceof Error){let r=new oi(e.message);return r.cause=e,this._emit("error",r)}return this._emit("error",new oi(String(e)))}),li(this,u2e,new Promise((e,r)=>{li(this,Jut,e,"f"),li(this,d2e,r,"f")}),"f"),li(this,f2e,new Promise((e,r)=>{li(this,Xut,e,"f"),li(this,p2e,r,"f")}),"f"),Ot(this,u2e,"f").catch(()=>{}),Ot(this,f2e,"f").catch(()=>{})}get response(){return Ot(this,tdt,"f")}get request_id(){return Ot(this,rdt,"f")}async withResponse(){let e=await Ot(this,u2e,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t;return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n){let o=new t;for(let s of r.messages)o._addMessageParam(s);return o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Ot(this,_Ar,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let o=n?.signal,s;o&&(o.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),o.addEventListener("abort",s));try{Ot(this,dI,"m",CAr).call(this);let{response:c,data:l}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(c);for await(let u of l)Ot(this,dI,"m",vAr).call(this,u);if(l.controller.signal?.aborted)throw new Xm;Ot(this,dI,"m",bAr).call(this)}finally{o&&s&&o.removeEventListener("abort",s)}}_connected(e){this.ended||(li(this,tdt,e,"f"),li(this,rdt,e?.headers.get("request-id"),"f"),Ot(this,Jut,"f").call(this,e),this._emit("connect"))}get ended(){return Ot(this,h2e,"f")}get errored(){return Ot(this,Zut,"f")}get aborted(){return Ot(this,edt,"f")}abort(){this.controller.abort()}on(e,r){return(Ot(this,_3,"f")[e]||(Ot(this,_3,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Ot(this,_3,"f")[e];if(!n)return this;let o=n.findIndex(s=>s.listener===r);return o>=0&&n.splice(o,1),this}once(e,r){return(Ot(this,_3,"f")[e]||(Ot(this,_3,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{li(this,hfe,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){li(this,hfe,!0,"f"),await Ot(this,f2e,"f")}get currentMessage(){return Ot(this,kQ,"f")}async finalMessage(){return await this.done(),Ot(this,dI,"m",EAr).call(this)}async finalText(){return await this.done(),Ot(this,dI,"m",v0i).call(this)}_emit(e,...r){if(Ot(this,h2e,"f"))return;e==="end"&&(li(this,h2e,!0,"f"),Ot(this,Xut,"f").call(this));let n=Ot(this,_3,"f")[e];if(n&&(Ot(this,_3,"f")[e]=n.filter(o=>!o.once),n.forEach(({listener:o})=>o(...r))),e==="abort"){let o=r[0];!Ot(this,hfe,"f")&&!n?.length&&Promise.reject(o),Ot(this,d2e,"f").call(this,o),Ot(this,p2e,"f").call(this,o),this._emit("end");return}if(e==="error"){let o=r[0];!Ot(this,hfe,"f")&&!n?.length&&Promise.reject(o),Ot(this,d2e,"f").call(this,o),Ot(this,p2e,"f").call(this,o),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Ot(this,dI,"m",EAr).call(this))}async _fromReadableStream(e,r){let n=r?.signal,o;n&&(n.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),n.addEventListener("abort",o));try{Ot(this,dI,"m",CAr).call(this),this._connected(null);let s=JD.fromReadableStream(e,this.controller);for await(let c of s)Ot(this,dI,"m",vAr).call(this,c);if(s.controller.signal?.aborted)throw new Xm;Ot(this,dI,"m",bAr).call(this)}finally{n&&o&&n.removeEventListener("abort",o)}}[(kQ=new WeakMap,u2e=new WeakMap,Jut=new WeakMap,d2e=new WeakMap,f2e=new WeakMap,Xut=new WeakMap,p2e=new WeakMap,_3=new WeakMap,h2e=new WeakMap,Zut=new WeakMap,edt=new WeakMap,hfe=new WeakMap,tdt=new WeakMap,rdt=new WeakMap,_Ar=new WeakMap,dI=new WeakSet,EAr=a(function(){if(this.receivedMessages.length===0)throw new oi("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},"_MessageStream_getFinalMessage"),v0i=a(function(){if(this.receivedMessages.length===0)throw new oi("stream ended without producing a Message with role=assistant");let r=this.receivedMessages.at(-1).content.filter(n=>n.type==="text").map(n=>n.text);if(r.length===0)throw new oi("stream ended without producing a content block with type=text");return r.join(" ")},"_MessageStream_getFinalText"),CAr=a(function(){this.ended||li(this,kQ,void 0,"f")},"_MessageStream_beginRequest"),vAr=a(function(r){if(this.ended)return;let n=Ot(this,dI,"m",b0i).call(this,r);switch(this._emit("streamEvent",r,n),r.type){case"content_block_delta":{let o=n.content.at(-1);switch(r.delta.type){case"text_delta":{o.type==="text"&&this._emit("text",r.delta.text,o.text||"");break}case"citations_delta":{o.type==="text"&&this._emit("citation",r.delta.citation,o.citations??[]);break}case"input_json_delta":{S0i(o)&&o.input&&this._emit("inputJson",r.delta.partial_json,o.input);break}case"thinking_delta":{o.type==="thinking"&&this._emit("thinking",r.delta.thinking,o.thinking);break}case"signature_delta":{o.type==="thinking"&&this._emit("signature",o.signature);break}default:r.delta}break}case"message_stop":{this._addMessageParam(n),this._addMessage(n,!0);break}case"content_block_stop":{this._emit("contentBlock",n.content.at(-1));break}case"message_start":{li(this,kQ,n,"f");break}case"content_block_start":case"message_delta":break}},"_MessageStream_addStreamEvent"),bAr=a(function(){if(this.ended)throw new oi("stream has ended, this shouldn't happen");let r=Ot(this,kQ,"f");if(!r)throw new oi("request ended without sending any chunks");return li(this,kQ,void 0,"f"),r},"_MessageStream_endRequest"),b0i=a(function(r){let n=Ot(this,kQ,"f");if(r.type==="message_start"){if(n)throw new oi(`Unexpected event order, got ${r.type} before receiving "message_stop"`);return r.message}if(!n)throw new oi(`Unexpected event order, got ${r.type} before "message_start"`);switch(r.type){case"message_stop":return n;case"message_delta":return n.stop_reason=r.delta.stop_reason,n.stop_sequence=r.delta.stop_sequence,n.usage.output_tokens=r.usage.output_tokens,r.usage.input_tokens!=null&&(n.usage.input_tokens=r.usage.input_tokens),r.usage.cache_creation_input_tokens!=null&&(n.usage.cache_creation_input_tokens=r.usage.cache_creation_input_tokens),r.usage.cache_read_input_tokens!=null&&(n.usage.cache_read_input_tokens=r.usage.cache_read_input_tokens),r.usage.server_tool_use!=null&&(n.usage.server_tool_use=r.usage.server_tool_use),n;case"content_block_start":return n.content.push({...r.content_block}),n;case"content_block_delta":{let o=n.content.at(r.index);switch(r.delta.type){case"text_delta":{o?.type==="text"&&(n.content[r.index]={...o,text:(o.text||"")+r.delta.text});break}case"citations_delta":{o?.type==="text"&&(n.content[r.index]={...o,citations:[...o.citations??[],r.delta.citation]});break}case"input_json_delta":{if(o&&S0i(o)){let s=o[T0i]||"";s+=r.delta.partial_json;let c={...o};Object.defineProperty(c,T0i,{value:s,enumerable:!1,writable:!0}),s&&(c.input=qut(s)),n.content[r.index]=c}break}case"thinking_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,thinking:o.thinking+r.delta.thinking});break}case"signature_delta":{o?.type==="thinking"&&(n.content[r.index]={...o,signature:r.delta.signature});break}default:r.delta}return n}case"content_block_stop":return n}},"_MessageStream_accumulateMessage"),Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",o=>{let s=r.shift();s?s.resolve(o):e.push(o)}),this.on("end",()=>{n=!0;for(let o of r)o.resolve(void 0);r.length=0}),this.on("abort",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),this.on("error",o=>{n=!0;for(let s of r)s.reject(o);r.length=0}),{next:a(async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((s,c)=>r.push({resolve:s,reject:c})).then(s=>s?{value:s,done:!1}:{value:void 0,done:!0}),"next"),return:a(async()=>(this.abort(),{value:void 0,done:!0}),"return")}}toReadableStream(){return new JD(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};f();var mfe=class extends z0{static{a(this,"Batches")}create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get(TA`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",lI,{query:e,...r})}delete(e,r){return this._client.delete(TA`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post(TA`/v1/messages/batches/${e}/cancel`,r)}async results(e,r){let n=await this.retrieve(e);if(!n.results_url)throw new oi(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:ba([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((o,s)=>ufe.fromResponse(s.response,s.controller))}};var DQ=class extends z0{static{a(this,"Messages")}constructor(){super(...arguments),this.batches=new mfe(this._client)}create(e,r){e.model in I0i&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${I0i[e.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let n=this._client._options.timeout;if(!e.stream&&n==null){let o=Kut[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,o)}return this._client.post("/v1/messages",{body:e,timeout:n??6e5,...r,stream:e.stream??!1})}stream(e,r){return ndt.createMessage(this,e,r)}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},I0i={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};DQ.Batches=mfe;f();var lJ=class extends z0{static{a(this,"Models")}retrieve(e,r={},n){let{betas:o}=r??{};return this._client.get(TA`/v1/models/${e}`,{...n,headers:ba([{...o?.toString()!=null?{"anthropic-beta":o?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...o}=e??{};return this._client.getAPIList("/v1/models",lI,{query:o,...r,headers:ba([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}};f();var m2e=a(t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()},"readEnv");var TAr,SAr,idt,x0i,dd=class{static{a(this,"BaseAnthropic")}constructor({baseURL:e=m2e("ANTHROPIC_BASE_URL"),apiKey:r=m2e("ANTHROPIC_API_KEY")??null,authToken:n=m2e("ANTHROPIC_AUTH_TOKEN")??null,...o}={}){TAr.add(this),idt.set(this,void 0);let s={apiKey:r,authToken:n,...o,baseURL:e||"https://api.anthropic.com"};if(!s.dangerouslyAllowBrowser&&t0i())throw new oi(`It looks like you're running in a browser-like environment. This is disabled by default, as it risks exposing your secret API credentials to attackers. If you understand the risks and have appropriate mitigations in place, you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g., new Anthropic({ apiKey, dangerouslyAllowBrowser: true }); -`);this.baseURL=s.baseURL,this.timeout=s.timeout??oAr.DEFAULT_TIMEOUT,this.logger=s.logger??console;let c="warn";this.logLevel=c,this.logLevel=qgr(s.logLevel,"ClientOptions.logLevel",this)??qgr(yPe("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??c,this.fetchOptions=s.fetchOptions,this.maxRetries=s.maxRetries??2,this.fetch=s.fetch??ifi(),ui(this,Kdt,sfi,"f"),this._options=s,this.apiKey=r,this.authToken=n}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:r}){if(!(this.apiKey&&e.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!r.has("authorization"))throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){return Ra([this.apiKeyAuth(e),this.bearerAuth(e)])}apiKeyAuth(e){if(this.apiKey!=null)return Ra([{"X-Api-Key":this.apiKey}])}bearerAuth(e){if(this.authToken!=null)return Ra([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([r,n])=>typeof n<"u").map(([r,n])=>{if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return`${encodeURIComponent(r)}=${encodeURIComponent(n)}`;if(n===null)return`${encodeURIComponent(r)}=`;throw new si(`Cannot stringify type ${typeof n}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${rq}`}defaultIdempotencyKey(){return`stainless-node-retry-${Ogr()}`}makeStatusError(e,r,n,o){return Kh.generate(e,r,n,o)}buildURL(e,r,n){let o=!Lt(this,iAr,"m",wfi).call(this)&&n||this.baseURL,s=zdi(e)?new URL(e):new URL(o+(o.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),c=this.defaultQuery();return Ydi(c)||(r={...c,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(s.search=this.stringifyQuery(r)),s.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new si("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600*1e3}async prepareOptions(e){}async prepareRequest(e,{url:r,options:n}){}get(e,r){return this.methodRequest("get",e,r)}post(e,r){return this.methodRequest("post",e,r)}patch(e,r){return this.methodRequest("patch",e,r)}put(e,r){return this.methodRequest("put",e,r)}delete(e,r){return this.methodRequest("delete",e,r)}methodRequest(e,r,n){return this.request(Promise.resolve(n).then(o=>({method:e,path:r,...o})))}request(e,r=null){return new XJ(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let o=await e,s=o.maxRetries??this.maxRetries;r==null&&(r=s),await this.prepareOptions(o);let{req:c,url:l,timeout:u}=this.buildRequest(o,{retryCount:s-r});await this.prepareRequest(c,{url:l,options:o});let d="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),p=n===void 0?"":`, retryOf: ${n}`,h=Date.now();if(Jh(this).debug(`[${d}] sending request`,B3({retryOfRequestLogID:n,method:o.method,url:l,options:o,headers:c.headers})),o.signal?.aborted)throw new cg;let m=new AbortController,g=await this.fetchWithTimeout(l,c,u,m).catch(ePe),A=Date.now();if(g instanceof Error){let _=`retrying, ${r} attempts remaining`;if(o.signal?.aborted)throw new cg;let v=M3(g)||/timed? ?out/i.test(String(g)+("cause"in g?String(g.cause):""));if(r)return Jh(this).info(`[${d}] connection ${v?"timed out":"failed"} - ${_}`),Jh(this).debug(`[${d}] connection ${v?"timed out":"failed"} (${_})`,B3({retryOfRequestLogID:n,url:l,durationMs:A-h,message:g.message})),this.retryRequest(o,r,n??d);throw Jh(this).info(`[${d}] connection ${v?"timed out":"failed"} - error; no more retries left`),Jh(this).debug(`[${d}] connection ${v?"timed out":"failed"} (error; no more retries left)`,B3({retryOfRequestLogID:n,url:l,durationMs:A-h,message:g.message})),v?new Ufe:new tq({cause:g})}let y=[...g.headers.entries()].filter(([_])=>_==="request-id").map(([_,v])=>", "+_+": "+JSON.stringify(v)).join(""),E=`[${d}${p}${y}] ${c.method} ${l} ${g.ok?"succeeded":"failed"} with status ${g.status} in ${A-h}ms`;if(!g.ok){let _=this.shouldRetry(g);if(r&&_){let w=`retrying, ${r} attempts remaining`;return await ofi(g.body),Jh(this).info(`${E} - ${w}`),Jh(this).debug(`[${d}] response error (${w})`,B3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,durationMs:A-h})),this.retryRequest(o,r,n??d,g.headers)}let v=_?"error; no more retries left":"error; not retryable";Jh(this).info(`${E} - ${v}`);let b=await g.text().catch(w=>ePe(w).message),I=Idt(b),x=I?void 0:b;throw Jh(this).debug(`[${d}] response error (${v})`,B3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,message:x,durationMs:Date.now()-h})),this.makeStatusError(g.status,I,x,g.headers)}return Jh(this).info(E),Jh(this).debug(`[${d}] response start`,B3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,durationMs:A-h})),{response:g,options:o,controller:m,requestLogID:d,retryOfRequestLogID:n,startTime:h}}getAPIList(e,r,n){return this.requestAPIList(r,{method:"get",path:e,...n})}requestAPIList(e,r){let n=this.makeRequest(r,null,void 0);return new sPe(this,n,e)}async fetchWithTimeout(e,r,n,o){let{signal:s,method:c,...l}=r||{};s&&s.addEventListener("abort",()=>o.abort());let u=setTimeout(()=>o.abort(),n),d=globalThis.ReadableStream&&l.body instanceof globalThis.ReadableStream||typeof l.body=="object"&&l.body!==null&&Symbol.asyncIterator in l.body,p={signal:o.signal,...d?{duplex:"half"}:{},method:"GET",...l};c&&(p.method=c.toUpperCase());try{return await this.fetch.call(void 0,e,p)}finally{clearTimeout(u)}}shouldRetry(e){let r=e.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,r,n,o){let s,c=o?.get("retry-after-ms");if(c){let u=parseFloat(c);Number.isNaN(u)||(s=u)}let l=o?.get("retry-after");if(l&&!s){let u=parseFloat(l);Number.isNaN(u)?s=Date.parse(l)-Date.now():s=u*1e3}if(!(s&&0<=s&&s<60*1e3)){let u=e.maxRetries??this.maxRetries;s=this.calculateDefaultRetryTimeoutMillis(r,u)}return await Xdi(s),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let s=r-e,c=Math.min(.5*Math.pow(2,s),8),l=1-Math.random()*.25;return c*l*1e3}calculateNonstreamingTimeout(e,r){if(36e5*e/128e3>6e5||r!=null&&e>r)throw new si("Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}buildRequest(e,{retryCount:r=0}={}){let n={...e},{method:o,path:s,query:c,defaultBaseURL:l}=n,u=this.buildURL(s,c,l);"timeout"in n&&Jdi("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:d,body:p}=this.buildBody({options:n}),h=this.buildHeaders({options:e,method:o,bodyHeaders:d,retryCount:r});return{req:{method:o,headers:h,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&p instanceof globalThis.ReadableStream&&{duplex:"half"},...p&&{body:p},...this.fetchOptions??{},...n.fetchOptions??{}},url:u,timeout:n.timeout}}buildHeaders({options:e,method:r,bodyHeaders:n,retryCount:o}){let s={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),s[this.idempotencyHeader]=e.idempotencyKey);let c=Ra([s,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(o),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...nfi(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(c),c.values}buildBody({options:{body:e,headers:r}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=Ra([r]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&n.values.has("content-type")||e instanceof Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:xdt(e)}:Lt(this,Kdt,"f").call(this,{body:e,headers:n})}};oAr=Ed,Kdt=new WeakMap,iAr=new WeakSet,wfi=a(function(){return this.baseURL!=="https://api.anthropic.com"},"_BaseAnthropic_baseURLOverridden");Ed.Anthropic=oAr;Ed.HUMAN_PROMPT=` +`);this.baseURL=s.baseURL,this.timeout=s.timeout??SAr.DEFAULT_TIMEOUT,this.logger=s.logger??console;let c="warn";this.logLevel=c,this.logLevel=aAr(s.logLevel,"ClientOptions.logLevel",this)??aAr(m2e("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??c,this.fetchOptions=s.fetchOptions,this.maxRetries=s.maxRetries??2,this.fetch=s.fetch??n0i(),li(this,idt,o0i,"f"),this._options=s,this.apiKey=r,this.authToken=n}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:r}){if(!(this.apiKey&&e.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!r.has("authorization"))throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){return ba([this.apiKeyAuth(e),this.bearerAuth(e)])}apiKeyAuth(e){if(this.apiKey!=null)return ba([{"X-Api-Key":this.apiKey}])}bearerAuth(e){if(this.authToken!=null)return ba([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([r,n])=>typeof n<"u").map(([r,n])=>{if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return`${encodeURIComponent(r)}=${encodeURIComponent(n)}`;if(n===null)return`${encodeURIComponent(r)}=`;throw new oi(`Cannot stringify type ${typeof n}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${RQ}`}defaultIdempotencyKey(){return`stainless-node-retry-${tAr()}`}makeStatusError(e,r,n,o){return Hh.generate(e,r,n,o)}buildURL(e,r,n){let o=!Ot(this,TAr,"m",x0i).call(this)&&n||this.baseURL,s=Wfi(e)?new URL(e):new URL(o+(o.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),c=this.defaultQuery();return zfi(c)||(r={...c,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(s.search=this.stringifyQuery(r)),s.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new oi("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600*1e3}async prepareOptions(e){}async prepareRequest(e,{url:r,options:n}){}get(e,r){return this.methodRequest("get",e,r)}post(e,r){return this.methodRequest("post",e,r)}patch(e,r){return this.methodRequest("patch",e,r)}put(e,r){return this.methodRequest("put",e,r)}delete(e,r){return this.methodRequest("delete",e,r)}methodRequest(e,r,n){return this.request(Promise.resolve(n).then(o=>({method:e,path:r,...o})))}request(e,r=null){return new oJ(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let o=await e,s=o.maxRetries??this.maxRetries;r==null&&(r=s),await this.prepareOptions(o);let{req:c,url:l,timeout:u}=this.buildRequest(o,{retryCount:s-r});await this.prepareRequest(c,{url:l,options:o});let d="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),p=n===void 0?"":`, retryOf: ${n}`,h=Date.now();if(jh(this).debug(`[${d}] sending request`,y3({retryOfRequestLogID:n,method:o.method,url:l,options:o,headers:c.headers})),o.signal?.aborted)throw new Xm;let m=new AbortController,g=await this.fetchWithTimeout(l,c,u,m).catch(JRe),A=Date.now();if(g instanceof Error){let _=`retrying, ${r} attempts remaining`;if(o.signal?.aborted)throw new Xm;let v=g3(g)||/timed? ?out/i.test(String(g)+("cause"in g?String(g.cause):""));if(r)return jh(this).info(`[${d}] connection ${v?"timed out":"failed"} - ${_}`),jh(this).debug(`[${d}] connection ${v?"timed out":"failed"} (${_})`,y3({retryOfRequestLogID:n,url:l,durationMs:A-h,message:g.message})),this.retryRequest(o,r,n??d);throw jh(this).info(`[${d}] connection ${v?"timed out":"failed"} - error; no more retries left`),jh(this).debug(`[${d}] connection ${v?"timed out":"failed"} (error; no more retries left)`,y3({retryOfRequestLogID:n,url:l,durationMs:A-h,message:g.message})),v?new Zde:new wQ({cause:g})}let y=[...g.headers.entries()].filter(([_])=>_==="request-id").map(([_,v])=>", "+_+": "+JSON.stringify(v)).join(""),E=`[${d}${p}${y}] ${c.method} ${l} ${g.ok?"succeeded":"failed"} with status ${g.status} in ${A-h}ms`;if(!g.ok){let _=this.shouldRetry(g);if(r&&_){let R=`retrying, ${r} attempts remaining`;return await i0i(g.body),jh(this).info(`${E} - ${R}`),jh(this).debug(`[${d}] response error (${R})`,y3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,durationMs:A-h})),this.retryRequest(o,r,n??d,g.headers)}let v=_?"error; no more retries left":"error; not retryable";jh(this).info(`${E} - ${v}`);let b=await g.text().catch(R=>JRe(R).message),I=Mut(b),x=I?void 0:b;throw jh(this).debug(`[${d}] response error (${v})`,y3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,message:x,durationMs:Date.now()-h})),this.makeStatusError(g.status,I,x,g.headers)}return jh(this).info(E),jh(this).debug(`[${d}] response start`,y3({retryOfRequestLogID:n,url:g.url,status:g.status,headers:g.headers,durationMs:A-h})),{response:g,options:o,controller:m,requestLogID:d,retryOfRequestLogID:n,startTime:h}}getAPIList(e,r,n){return this.requestAPIList(r,{method:"get",path:e,...n})}requestAPIList(e,r){let n=this.makeRequest(r,null,void 0);return new n2e(this,n,e)}async fetchWithTimeout(e,r,n,o){let{signal:s,method:c,...l}=r||{};s&&s.addEventListener("abort",()=>o.abort());let u=setTimeout(()=>o.abort(),n),d=globalThis.ReadableStream&&l.body instanceof globalThis.ReadableStream||typeof l.body=="object"&&l.body!==null&&Symbol.asyncIterator in l.body,p={signal:o.signal,...d?{duplex:"half"}:{},method:"GET",...l};c&&(p.method=c.toUpperCase());try{return await this.fetch.call(void 0,e,p)}finally{clearTimeout(u)}}shouldRetry(e){let r=e.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,r,n,o){let s,c=o?.get("retry-after-ms");if(c){let u=parseFloat(c);Number.isNaN(u)||(s=u)}let l=o?.get("retry-after");if(l&&!s){let u=parseFloat(l);Number.isNaN(u)?s=Date.parse(l)-Date.now():s=u*1e3}if(!(s&&0<=s&&s<60*1e3)){let u=e.maxRetries??this.maxRetries;s=this.calculateDefaultRetryTimeoutMillis(r,u)}return await Jfi(s),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let s=r-e,c=Math.min(.5*Math.pow(2,s),8),l=1-Math.random()*.25;return c*l*1e3}calculateNonstreamingTimeout(e,r){if(36e5*e/128e3>6e5||r!=null&&e>r)throw new oi("Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}buildRequest(e,{retryCount:r=0}={}){let n={...e},{method:o,path:s,query:c,defaultBaseURL:l}=n,u=this.buildURL(s,c,l);"timeout"in n&&Kfi("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:d,body:p}=this.buildBody({options:n}),h=this.buildHeaders({options:e,method:o,bodyHeaders:d,retryCount:r});return{req:{method:o,headers:h,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&p instanceof globalThis.ReadableStream&&{duplex:"half"},...p&&{body:p},...this.fetchOptions??{},...n.fetchOptions??{}},url:u,timeout:n.timeout}}buildHeaders({options:e,method:r,bodyHeaders:n,retryCount:o}){let s={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),s[this.idempotencyHeader]=e.idempotencyKey);let c=ba([s,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(o),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...r0i(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(c),c.values}buildBody({options:{body:e,headers:r}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=ba([r]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&n.values.has("content-type")||e instanceof Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:Out(e)}:Ot(this,idt,"f").call(this,{body:e,headers:n})}};SAr=dd,idt=new WeakMap,TAr=new WeakSet,x0i=a(function(){return this.baseURL!=="https://api.anthropic.com"},"_BaseAnthropic_baseURLOverridden");dd.Anthropic=SAr;dd.HUMAN_PROMPT=` -Human:`;Ed.AI_PROMPT=` +Human:`;dd.AI_PROMPT=` -Assistant:`;Ed.DEFAULT_TIMEOUT=6e5;Ed.AnthropicError=si;Ed.APIError=Kh;Ed.APIConnectionError=tq;Ed.APIConnectionTimeoutError=Ufe;Ed.APIUserAbortError=cg;Ed.NotFoundError=Hfe;Ed.ConflictError=jfe;Ed.RateLimitError=Vfe;Ed.BadRequestError=Qfe;Ed.AuthenticationError=qfe;Ed.InternalServerError=Wfe;Ed.PermissionDeniedError=Gfe;Ed.UnprocessableEntityError=$fe;Ed.toFile=Ndt;var g2=class extends Ed{static{a(this,"Anthropic")}constructor(){super(...arguments),this.completions=new tX(this),this.messages=new oq(this),this.models=new rX(this),this.beta=new u5(this)}};g2.Completions=tX;g2.Messages=oq;g2.Models=rX;g2.Beta=u5;var{HUMAN_PROMPT:Zxa,AI_PROMPT:ewa}=g2;var Jdt=class extends BT{static{a(this,"AnthropicProvider")}constructor(e){super(Ss.Anthropic,e)}async getAllModels(){await this.ensureKnownModelsCache();let e=await new tc(this.ctx.get(Si)).getAPIKey(this.providerName);if(!e)throw new Error(`API key not found for provider: ${this.providerName}`);let r=new g2({apiKey:e,fetch:twa(this.ctx.get(dr))});try{let n=await r.models.list(),o=[];for(let s of n.data){let c=this._knownModels?.[s.id];c&&o.push({providerName:this.providerName,modelId:s.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:c})}return o}catch(n){throw NEe.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,n),n}}};function twa(t){return async(e,r)=>{let n=rwa(e,r),o=iwa(r),s=await t.fetch(n,o);return swa(s)}}a(twa,"createAnthropicFetchAdapter");function rwa(t,e){return t instanceof Request?(nwa(t,e),t.url):t instanceof URL?t.toString():t}a(rwa,"convertInputToString");function nwa(t,e){e&&(e.headers??=t.headers,e.method??=t.method,!e.body&&!t.bodyUsed&&(e.body=t.body))}a(nwa,"mergeRequestInit");function iwa(t){let e;return t?.headers&&(e=owa(t.headers)),{method:t?.method||"GET",headers:e,body:t?.body,signal:t?.signal||void 0}}a(iwa,"convertToFetchOptions");function owa(t){let e={};if(t instanceof Headers)for(let[r,n]of t.entries())e[r]=n;else if(Array.isArray(t))for(let[r,n]of t)e[r]=n;else return t;return e}a(owa,"convertHeaders");async function swa(t){let e=t.body(),r=null;if(e)r=awa(e);else{let n=await t.text();r=lwa(n)}return new globalThis.Response(r,{status:t.status,statusText:t.statusText,headers:new Headers(t.headers)})}a(swa,"convertToWebResponse");function awa(t){return new ReadableStream({start(e){let r=cwa(t,e);return()=>r()},cancel(){"destroy"in t&&typeof t.destroy=="function"&&t.destroy()}})}a(awa,"createReadableStreamFromNodeStream");function cwa(t,e){let r=a(c=>{e.enqueue(new Uint8Array(c))},"onData"),n=a(()=>{e.close(),s()},"onEnd"),o=a(c=>{e.error(c),s()},"onError"),s=a(()=>{t.off("data",r),t.off("end",n),t.off("error",o)},"cleanup");return t.on("data",r),t.on("end",n),t.on("error",o),s}a(cwa,"setupStreamHandlers");function lwa(t){return new ReadableStream({start(e){e.enqueue(new TextEncoder().encode(t)),e.close()}})}a(lwa,"createReadableStreamFromText");f();var Xdt=class extends BT{static{a(this,"GeminiProvider")}constructor(e){super(Ss.Gemini,e)}};f();var Zdt=class extends BT{static{a(this,"GroqProvider")}constructor(e){super(Ss.Groq,e)}};f();var eft=class extends BT{static{a(this,"OpenAIProvider")}constructor(e){super(Ss.OpenAI,e)}};f();var Rfi=16e3,tft=class extends BT{static{a(this,"OpenRouterProvider")}constructor(e){super(Ss.OpenRouter,e)}async getAllModels(){try{let e=this.getFetchModelUrl(),r={"Content-Type":"application/json"},n=await new tc(this.ctx.get(Si)).getAPIKey(this.providerName);n&&(r.Authorization=`Bearer ${n}`);let o=await this.ctx.get(dr).fetch(e,{method:"GET",headers:r});if(!o.ok)throw new Error(`Failed to fetch models: ${o.status} ${o.statusText}`);let s=await o.json();if(s.error)throw new Error(`API Error: ${JSON.stringify(s.error)}`);let c=[];for(let l of s.data)c.push({providerName:this.providerName,modelId:l.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:{name:l.name,maxInputTokens:Math.max(0,l.top_provider.context_length-Rfi),maxOutputTokens:Rfi,toolCalling:l.supported_parameters?.includes("tools")??!1,vision:l.architecture?.input_modalities?.includes("image")??!1}});return c}catch(e){throw NEe.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,e),e}}getFetchModelUrl(){return`${this.getBaseUrl()}/models?supported_parameters=tools`}};var nX=class{static{a(this,"BYOKProviderFactory")}constructor(e){this.providers=new Map([[Ss.OpenAI,new eft(e)],[Ss.Gemini,new Xdt(e)],[Ss.Groq,new Zdt(e)],[Ss.OpenRouter,new tft(e)],[Ss.Anthropic,new Jdt(e)]])}getBYOKProvider(e){return this.providers.get(e)}};var uwa=S.Object({providerName:S.Optional(S.String()),enableFetchUrl:S.Optional(S.Boolean())});async function dwa(t,e,r){try{let{providerName:n,enableFetchUrl:o}=r,s=new tc(t.get(Si)),c=[];if(n)if(o){if(!B9e(n))return[null,{code:lt.InvalidRequest,message:`enableFetchUrl is not supported for the ${n} provider`}];if(!await s.getAPIKey(n))return[null,{code:lt.InvalidRequest,message:`API key is required to fetch models from ${n}`}];let u=t.get(nX).getBYOKProvider(n);if(u){let d=await u.getAllModels(),p=new Map;d.forEach(g=>{let A=`${g.providerName}_${g.modelId}`;p.set(A,g)});let h=await s.getStoredModelConfigs(n),m=[];Object.entries(h).forEach(([g,A])=>{m.push({providerName:n,modelId:g,deploymentUrl:A.deploymentUrl,isRegistered:A.isRegistered,isCustomModel:A.isCustomModel,modelCapabilities:A.modelCapabilities})}),m.forEach(g=>{let A=`${g.providerName}_${g.modelId}`;p.set(A,g)}),c.push(...p.values())}}else{let l=await s.getStoredModelConfigs(n);Object.entries(l).forEach(([u,d])=>{c.push({providerName:n,modelId:u,deploymentUrl:d.deploymentUrl,isRegistered:d.isRegistered,isCustomModel:d.isCustomModel,modelCapabilities:d.modelCapabilities})})}else{let l=Object.values(Ss);for(let u of l){let d=await s.getStoredModelConfigs(u);Object.entries(d).forEach(([p,h])=>{c.push({providerName:u,modelId:p,deploymentUrl:h.deploymentUrl,isRegistered:h.isRegistered,isCustomModel:h.isCustomModel,modelCapabilities:h.modelCapabilities})})}}return[{models:c},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to get models: ${n instanceof Error?n.message:String(n)}`}]}}a(dwa,"handleBYOKListModelsChecked");var Pfi=He(uwa,dwa);f();var fwa=S.Object({providerName:S.String(),apiKey:S.String(),modelId:S.Optional(S.String())});async function pwa(t,e,r){try{let n=new tc(t.get(Si)),{providerName:o,apiKey:s,modelId:c}=r,l=rF(o);if(l===1&&!c)return[null,{code:lt.InvalidRequest,message:"modelId is required for PerModelDeployment auth type"}];await n.storeAPIKey(o,s,l,c);let u=`API key saved successfully for provider ${o}`;return[{success:!0,message:c?`${u} and model ${c}`:u},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to save API key: ${n instanceof Error?n.message:String(n)}`}]}}a(pwa,"handleBYOKSaveApiKeyChecked");var kfi=He(fwa,pwa);f();var hwa=S.Object({providerName:S.String(),modelId:S.String(),isRegistered:S.Boolean(),isCustomModel:S.Boolean(),deploymentUrl:S.Optional(S.String()),apiKey:S.Optional(S.String()),modelCapabilities:S.Optional(S.Object({name:S.String(),maxInputTokens:S.Optional(S.Number()),maxOutputTokens:S.Optional(S.Number()),toolCalling:S.Boolean(),vision:S.Boolean(),thinking:S.Optional(S.Boolean())}))});async function mwa(t,e,r){try{let{providerName:n,modelId:o,isRegistered:s,isCustomModel:c,deploymentUrl:l,apiKey:u,modelCapabilities:d}=r,p=new tc(t.get(Si)),h=rF(n);if(h===1&&!l)return[null,{code:lt.InvalidRequest,message:`deploymentUrl is required for the ${n} provider`}];if(l||d){let m={deploymentUrl:l,isRegistered:s,isCustomModel:c,modelCapabilities:d};await p.saveModelConfig(n,o,m,u,h)}else u!==void 0&&await p.storeAPIKey(n,u,h,o);return[{success:!0,message:`Model ${o} saved successfully for provider ${n}`},null]}catch(n){return[null,{code:lt.InternalError,message:`Failed to save model: ${n instanceof Error?n.message:String(n)}`}]}}a(mwa,"handleBYOKSaveModelChecked");var Nfi=He(hwa,mwa);f();var gwa=S.Object({uri:S.String({minLength:1})});async function Awa(t,e,r){let n=await t.get(In).getOrReadTextDocument(r);return[{status:Kl(n),...n.status==="invalid"&&{reason:n.reason},...n.status==="notfound"&&{reason:n.message}},null]}a(Awa,"handleCheckFileStatusChecked");var Dfi=He(gwa,Awa);f();var ywa=S.Object({});function Mfi(t,e){return typeof t!="number"||typeof e!="number"||e===0?0:Math.max(0,Math.min(100,t/e*100))}a(Mfi,"calculatePercentRemaining");async function Ewa(t,e,r){let n=await t.get(en).getSession();if(n){let o=await eyt(t,n);if(o.ok){let s=await o.json();return s.access_type_sku==="free_limited_copilot"?[{chat:{percentRemaining:Mfi(s.limited_user_quotas?.chat,s.monthly_quotas?.chat),unlimited:!1,overagePermitted:!1},completions:{percentRemaining:Mfi(s.limited_user_quotas?.completions,s.monthly_quotas?.completions),unlimited:!1,overagePermitted:!1},premiumInteractions:{percentRemaining:0,unlimited:!1,overagePermitted:!1},resetDate:s.limited_user_reset_date??"",copilotPlan:"free"},null]:[{chat:{percentRemaining:s.quota_snapshots?.chat?.percent_remaining??100,unlimited:s.quota_snapshots?.chat?.unlimited??!1,overagePermitted:s.quota_snapshots?.chat?.overage_permitted??!1},completions:{percentRemaining:s.quota_snapshots?.completions?.percent_remaining??100,unlimited:s.quota_snapshots?.completions?.unlimited??!1,overagePermitted:s.quota_snapshots?.completions?.overage_permitted??!1},premiumInteractions:{percentRemaining:s.quota_snapshots?.premium_interactions?.percent_remaining??100,unlimited:s.quota_snapshots?.premium_interactions?.unlimited??!1,overagePermitted:s.quota_snapshots?.premium_interactions?.overage_permitted??!1},resetDate:s.quota_reset_date??"",copilotPlan:s.copilot_plan},null]}return[null,{code:lt.InternalError,message:"Failed to fetch quota info"}]}else return[null,{code:lt.InternalError,message:"Not signed in"}]}a(Ewa,"handleCheckQuotaChecked");var Ofi=He(ywa,Ewa);f();var Cwa=S.Object({options:S.Optional(S.Object({localChecksOnly:S.Optional(S.Boolean()),forceRefresh:S.Optional(S.Boolean())}))});async function _wa(t,e,r){return[await t.get(en).checkAndUpdateStatus(r.options),null]}a(_wa,"handleCheckStatusChecked");var Bfi=He(Cwa,_wa);f();var vwa=S.Object({pullRequestId:S.Number(),repoOwner:S.String({minLength:1}),repoName:S.String({minLength:1})});async function bwa(t,e,r){try{let o=await new Hne(t).getAllSessions(r.pullRequestId,e);if(!o||o.length===0)return[null,{code:lt.InvalidRequest,message:"No session found for this pull request"}];let s=o[0];return s.state==="completed"?(at(t,"githubApi.cancelCodingAgent",yt.createAndMarkAsIssued()),yi(t,"githubApi.cancelCodingAgent"),[{success:!0},null]):s.workflow_run_id?(await new cC(t).cancelWorkflow(r.repoOwner,r.repoName,s.workflow_run_id),at(t,"githubApi.cancelCodingAgent",yt.createAndMarkAsIssued()),yi(t,"githubApi.cancelCodingAgent"),[{success:!0},null]):[null,{code:lt.InternalError,message:"No workflow run ID found in session"}]}catch(n){if(qo(t,n,"githubApi.cancelCodingAgent"),_u(t,"githubApi.cancelCodingAgent",n),n instanceof Fne)return[null,{code:lt.NoCopilotToken,message:n.message}];if(n instanceof fy)return[null,{code:lt.InvalidRequest,message:n.message}];if(n instanceof UT)return[null,{code:lt.InvalidRequest,message:n.message}];if(n instanceof QT)return[null,{code:lt.NoGitHubToken,message:n.message}];if(n instanceof yp&&n.isClientError())return[null,{code:lt.InvalidRequest,message:n.message}];if(n instanceof Error)return[null,{code:lt.InternalError,message:`Unexpected error happened: ${n.message}`}];let o=JSON.stringify(n)??String(n);return[null,{code:lt.InternalError,message:`Unexpected error happened: ${o}`}]}}a(bwa,"handleCancelCodingAgentChecked");var Lfi=He(vwa,bwa);f();var Twa=S.Object({});async function Swa(t,e,r){return[(await FT(t)).map(s=>({slug:s.slug,name:s.name,description:s.description,avatarUrl:s.avatarUrl})),null]}a(Swa,"handleConversationAgentsChecked");var Ffi=He(Twa,Swa);f();f();var EPe=de(Su());function Iwa(t,e,r){let n=yt.createAndMarkAsIssued({languageId:String(e.detectedLanguageId),requestedDocumentVersion:String(r),actualDocumentVersion:String(e.version)});return at(t,"getCompletions.docVersionMismatch",n)}a(Iwa,"telemetryVersionMismatch");async function U3(t,e,r){let o=t.get(zr).getTextDocumentUnsafe(e);if(!o)throw new EPe.ResponseError(lt.InvalidParams,`Document for URI could not be found: ${e.uri}`);let s=await V6(t,e,o.getText());if(s.status==="invalid")throw t.get(Xs).setInactive(s.reason),new EPe.ResponseError(lt.CopilotNotAvailable,s.reason);if(e.version!==void 0&&o.version!==e.version)throw r?.isCancellationRequested||(Iwa(t,o,e.version),Ka.debug(t,`Requested document version was ${e.version} but actual document version was ${o.version}.`)),new EPe.ResponseError(lt.ContentModified,"Document Version Mismatch");return o}a(U3,"getTextDocument");async function d5(t,e,r){let n=e.textDocument??e.doc;if(n)try{return await U3(t,n,r)}catch(o){if(o instanceof EPe.ResponseError){if(o.code===lt.CopilotNotAvailable)return;if(o.code===lt.InvalidParams){Ka.warn(t,`Document not found for conversation: ${n.uri}. Continuing without this file.`);return}}throw o}}a(d5,"getTextDocumentIfAvailable");var xwa=S.Union([S.Literal("keyboard"),S.Literal("toolbar")]),wwa=S.Object({turnId:A$,codeBlockIndex:S.Number(),source:xwa,copiedCharacters:S.Number(),totalCharacters:S.Number(),copiedText:S.String(),doc:S.Optional(VUe),textDocument:S.Optional(sC),position:S.Optional(Ah),conversationSource:S.Optional(Ek)});async function Rwa(t,e,r){let n=await d5(t,r,e),o={totalCharacters:r.totalCharacters,copiedCharacters:r.copiedCharacters},s=r.position??r.doc?.position;n&&s&&(o={...o,currentLine:s.line});let c=sF(r.conversationSource),l=t.get(ho).findByTurnId(r.turnId),u=await rc(t,l,{languageId:n?.detectedLanguageId??""});return Z1(t,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:c,mode:l?.turn.getChatModeForTelemetry()??"unknown",modelId:l?.turn.getResolvedModelId()??"unknown"},o,`${jg(c)}.acceptedCopy`,u),["OK",null]}a(Rwa,"handleConversationCodeCopyChecked");var Ufi=He(wwa,Rwa);f();var Pwa=S.Union([S.Literal("keyboard"),S.Literal("toolbar"),S.Literal("diff")]),kwa=S.Object({turnId:A$,source:Pwa,codeBlockIndex:S.Number(),acceptedLength:S.Optional(S.Number()),totalCharacters:S.Number(),newFile:S.Optional(S.Boolean()),doc:S.Optional(VUe),textDocument:S.Optional(sC),position:S.Optional(Ah),conversationSource:S.Optional(Ek)});async function Nwa(t,e,r){let n=await d5(t,r,e),o={totalCharacters:r.totalCharacters,acceptedLength:r.acceptedLength??r.totalCharacters},s=r.position??r.doc?.position;n&&s&&(o={...o,insertionOffset:n.offsetAt(s),currentLine:s.line});let c=sF(r.conversationSource),l=t.get(ho).findByTurnId(r.turnId),u=await rc(t,l,{languageId:n?.detectedLanguageId??""});return Z1(t,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:c,compType:r.acceptedLength&&r.acceptedLength0&&(e+=` +Assistant:`;dd.DEFAULT_TIMEOUT=6e5;dd.AnthropicError=oi;dd.APIError=Hh;dd.APIConnectionError=wQ;dd.APIConnectionTimeoutError=Zde;dd.APIUserAbortError=Xm;dd.NotFoundError=nfe;dd.ConflictError=ife;dd.RateLimitError=sfe;dd.BadRequestError=efe;dd.AuthenticationError=tfe;dd.InternalServerError=afe;dd.PermissionDeniedError=rfe;dd.UnprocessableEntityError=ofe;dd.toFile=Qut;var o2=class extends dd{static{a(this,"Anthropic")}constructor(){super(...arguments),this.completions=new cJ(this),this.messages=new DQ(this),this.models=new lJ(this),this.beta=new XD(this)}};o2.Completions=cJ;o2.Messages=DQ;o2.Models=lJ;o2.Beta=XD;var{HUMAN_PROMPT:e2a,AI_PROMPT:t2a}=o2;var odt=class extends TT{static{a(this,"AnthropicProvider")}constructor(e){super(Es.Anthropic,e)}async getAllModels(){await this.ensureKnownModelsCache();let e=await new Ka(this.ctx.get(Ti)).getAPIKey(this.providerName);if(!e)throw new Error(`API key not found for provider: ${this.providerName}`);let r=new o2({apiKey:e,fetch:r2a(this.ctx.get(dr))});try{let n=await r.models.list(),o=[];for(let s of n.data){let c=this._knownModels?.[s.id];c&&o.push({providerName:this.providerName,modelId:s.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:c})}return o}catch(n){throw Pye.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,n),n}}};function r2a(t){return async(e,r)=>{let n=n2a(e,r),o=o2a(r),s=await t.fetch(n,o);return a2a(s)}}a(r2a,"createAnthropicFetchAdapter");function n2a(t,e){return t instanceof Request?(i2a(t,e),t.url):t instanceof URL?t.toString():t}a(n2a,"convertInputToString");function i2a(t,e){e&&(e.headers??=t.headers,e.method??=t.method,!e.body&&!t.bodyUsed&&(e.body=t.body))}a(i2a,"mergeRequestInit");function o2a(t){let e;return t?.headers&&(e=s2a(t.headers)),{method:t?.method||"GET",headers:e,body:t?.body,signal:t?.signal||void 0}}a(o2a,"convertToFetchOptions");function s2a(t){let e={};if(t instanceof Headers)for(let[r,n]of t.entries())e[r]=n;else if(Array.isArray(t))for(let[r,n]of t)e[r]=n;else return t;return e}a(s2a,"convertHeaders");async function a2a(t){let e=t.body(),r=null;if(e)r=c2a(e);else{let n=await t.text();r=u2a(n)}return new globalThis.Response(r,{status:t.status,statusText:t.statusText,headers:new Headers(t.headers)})}a(a2a,"convertToWebResponse");function c2a(t){return new ReadableStream({start(e){let r=l2a(t,e);return()=>r()},cancel(){"destroy"in t&&typeof t.destroy=="function"&&t.destroy()}})}a(c2a,"createReadableStreamFromNodeStream");function l2a(t,e){let r=a(c=>{e.enqueue(new Uint8Array(c))},"onData"),n=a(()=>{e.close(),s()},"onEnd"),o=a(c=>{e.error(c),s()},"onError"),s=a(()=>{t.off("data",r),t.off("end",n),t.off("error",o)},"cleanup");return t.on("data",r),t.on("end",n),t.on("error",o),s}a(l2a,"setupStreamHandlers");function u2a(t){return new ReadableStream({start(e){e.enqueue(new TextEncoder().encode(t)),e.close()}})}a(u2a,"createReadableStreamFromText");f();var sdt=class extends TT{static{a(this,"GeminiProvider")}constructor(e){super(Es.Gemini,e)}};f();var adt=class extends TT{static{a(this,"GroqProvider")}constructor(e){super(Es.Groq,e)}};f();var cdt=class extends TT{static{a(this,"OpenAIProvider")}constructor(e){super(Es.OpenAI,e)}};f();var w0i=16e3,ldt=class extends TT{static{a(this,"OpenRouterProvider")}constructor(e){super(Es.OpenRouter,e)}async getAllModels(){try{let e=this.getFetchModelUrl(),r={"Content-Type":"application/json"},n=await new Ka(this.ctx.get(Ti)).getAPIKey(this.providerName);n&&(r.Authorization=`Bearer ${n}`);let o=await this.ctx.get(dr).fetch(e,{method:"GET",headers:r});if(!o.ok)throw new Error(`Failed to fetch models: ${o.status} ${o.statusText}`);let s=await o.json();if(s.error)throw new Error(`API Error: ${JSON.stringify(s.error)}`);let c=[];for(let l of s.data)c.push({providerName:this.providerName,modelId:l.id,isRegistered:!1,isCustomModel:!1,modelCapabilities:{name:l.name,maxInputTokens:Math.max(0,l.top_provider.context_length-w0i),maxOutputTokens:w0i,toolCalling:l.supported_parameters?.includes("tools")??!1,vision:l.architecture?.input_modalities?.includes("image")??!1}});return c}catch(e){throw Pye.error(this.ctx,`Error fetching models from ${this.providerName} provider:`,e),e}}getFetchModelUrl(){return`${this.getBaseUrl()}/models?supported_parameters=tools`}};var uJ=class{static{a(this,"BYOKProviderFactory")}constructor(e){this.providers=new Map([[Es.OpenAI,new cdt(e)],[Es.Gemini,new sdt(e)],[Es.Groq,new adt(e)],[Es.OpenRouter,new ldt(e)],[Es.Anthropic,new odt(e)]])}getBYOKProvider(e){return this.providers.get(e)}};var d2a=S.Object({providerName:S.Optional(S.String()),enableFetchUrl:S.Optional(S.Boolean())});async function f2a(t,e,r){try{let{providerName:n,enableFetchUrl:o}=r,s=new Ka(t.get(Ti)),c=[];if(n)if(o){if(!jFe(n))return[null,{code:ct.InvalidRequest,message:`enableFetchUrl is not supported for the ${n} provider`}];if(!await s.getAPIKey(n))return[null,{code:ct.InvalidRequest,message:`API key is required to fetch models from ${n}`}];let u=t.get(uJ).getBYOKProvider(n);if(u){let d=await u.getAllModels(),p=new Map;d.forEach(g=>{let A=`${g.providerName}_${g.modelId}`;p.set(A,g)});let h=await s.getStoredModelConfigs(n),m=[];Object.entries(h).forEach(([g,A])=>{m.push({providerName:n,modelId:g,deploymentUrl:A.deploymentUrl,isRegistered:A.isRegistered,isCustomModel:A.isCustomModel,modelCapabilities:A.modelCapabilities})}),m.forEach(g=>{let A=`${g.providerName}_${g.modelId}`;p.set(A,g)}),c.push(...p.values())}}else{let l=await s.getStoredModelConfigs(n);Object.entries(l).forEach(([u,d])=>{c.push({providerName:n,modelId:u,deploymentUrl:d.deploymentUrl,isRegistered:d.isRegistered,isCustomModel:d.isCustomModel,modelCapabilities:d.modelCapabilities})})}else{let l=Object.values(Es);for(let u of l){let d=await s.getStoredModelConfigs(u);Object.entries(d).forEach(([p,h])=>{c.push({providerName:u,modelId:p,deploymentUrl:h.deploymentUrl,isRegistered:h.isRegistered,isCustomModel:h.isCustomModel,modelCapabilities:h.modelCapabilities})})}}return[{models:c},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to get models: ${n instanceof Error?n.message:String(n)}`}]}}a(f2a,"handleBYOKListModelsChecked");var R0i=He(d2a,f2a);f();var p2a=S.Object({providerName:S.String(),apiKey:S.String(),modelId:S.Optional(S.String())});async function h2a(t,e,r){try{let n=new Ka(t.get(Ti)),{providerName:o,apiKey:s,modelId:c}=r,l=R6(o);if(l===1&&!c)return[null,{code:ct.InvalidRequest,message:"modelId is required for PerModelDeployment auth type"}];await n.storeAPIKey(o,s,l,c);let u=`API key saved successfully for provider ${o}`;return[{success:!0,message:c?`${u} and model ${c}`:u},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to save API key: ${n instanceof Error?n.message:String(n)}`}]}}a(h2a,"handleBYOKSaveApiKeyChecked");var P0i=He(p2a,h2a);f();var m2a=S.Object({providerName:S.String(),modelId:S.String(),isRegistered:S.Boolean(),isCustomModel:S.Boolean(),deploymentUrl:S.Optional(S.String()),apiKey:S.Optional(S.String()),modelCapabilities:S.Optional(S.Object({name:S.String(),maxInputTokens:S.Optional(S.Number()),maxOutputTokens:S.Optional(S.Number()),toolCalling:S.Boolean(),vision:S.Boolean(),thinking:S.Optional(S.Boolean())}))});async function g2a(t,e,r){try{let{providerName:n,modelId:o,isRegistered:s,isCustomModel:c,deploymentUrl:l,apiKey:u,modelCapabilities:d}=r,p=new Ka(t.get(Ti)),h=R6(n);if(h===1&&!l)return[null,{code:ct.InvalidRequest,message:`deploymentUrl is required for the ${n} provider`}];if(l||d){let m={deploymentUrl:l,isRegistered:s,isCustomModel:c,modelCapabilities:d};await p.saveModelConfig(n,o,m,u,h)}else u!==void 0&&await p.storeAPIKey(n,u,h,o);return[{success:!0,message:`Model ${o} saved successfully for provider ${n}`},null]}catch(n){return[null,{code:ct.InternalError,message:`Failed to save model: ${n instanceof Error?n.message:String(n)}`}]}}a(g2a,"handleBYOKSaveModelChecked");var k0i=He(m2a,g2a);f();var A2a=S.Object({uri:S.String({minLength:1})});async function y2a(t,e,r){let n=await t.get(In).getOrReadTextDocument(r);return[{status:Gl(n),...n.status==="invalid"&&{reason:n.reason},...n.status==="notfound"&&{reason:n.message}},null]}a(y2a,"handleCheckFileStatusChecked");var D0i=He(A2a,y2a);f();var E2a=S.Object({});function N0i(t,e){return typeof t!="number"||typeof e!="number"||e===0?0:Math.max(0,Math.min(100,t/e*100))}a(N0i,"calculatePercentRemaining");async function _2a(t,e,r){let n=await t.get(en).getSession();if(n){let o=await cAt(t,n);if(o.ok){let s=await o.json();return s.access_type_sku==="free_limited_copilot"?[{chat:{percentRemaining:N0i(s.limited_user_quotas?.chat,s.monthly_quotas?.chat),unlimited:!1,overagePermitted:!1},completions:{percentRemaining:N0i(s.limited_user_quotas?.completions,s.monthly_quotas?.completions),unlimited:!1,overagePermitted:!1},premiumInteractions:{percentRemaining:0,unlimited:!1,overagePermitted:!1},resetDate:s.limited_user_reset_date??"",copilotPlan:"free"},null]:[{chat:{percentRemaining:s.quota_snapshots?.chat?.percent_remaining??100,unlimited:s.quota_snapshots?.chat?.unlimited??!1,overagePermitted:s.quota_snapshots?.chat?.overage_permitted??!1},completions:{percentRemaining:s.quota_snapshots?.completions?.percent_remaining??100,unlimited:s.quota_snapshots?.completions?.unlimited??!1,overagePermitted:s.quota_snapshots?.completions?.overage_permitted??!1},premiumInteractions:{percentRemaining:s.quota_snapshots?.premium_interactions?.percent_remaining??100,unlimited:s.quota_snapshots?.premium_interactions?.unlimited??!1,overagePermitted:s.quota_snapshots?.premium_interactions?.overage_permitted??!1},resetDate:s.quota_reset_date??"",copilotPlan:s.copilot_plan},null]}return[null,{code:ct.InternalError,message:"Failed to fetch quota info"}]}else return[null,{code:ct.InternalError,message:"Not signed in"}]}a(_2a,"handleCheckQuotaChecked");var M0i=He(E2a,_2a);f();var C2a=S.Object({options:S.Optional(S.Object({localChecksOnly:S.Optional(S.Boolean()),forceRefresh:S.Optional(S.Boolean())}))});async function v2a(t,e,r){return[await t.get(en).checkAndUpdateStatus(r.options),null]}a(v2a,"handleCheckStatusChecked");var O0i=He(C2a,v2a);f();var b2a=S.Object({pullRequestId:S.Number(),repoOwner:S.String({minLength:1}),repoName:S.String({minLength:1})});async function T2a(t,e,r){try{let o=await new rne(t).getAllSessions(r.pullRequestId,e);if(!o||o.length===0)return[null,{code:ct.InvalidRequest,message:"No session found for this pull request"}];let s=o[0];return s.state==="completed"?(st(t,"githubApi.cancelCodingAgent",Pt.createAndMarkAsIssued()),rr(t,"githubApi.cancelCodingAgent"),[{success:!0},null]):s.workflow_run_id?(await new KE(t).cancelWorkflow(r.repoOwner,r.repoName,s.workflow_run_id),st(t,"githubApi.cancelCodingAgent",Pt.createAndMarkAsIssued()),rr(t,"githubApi.cancelCodingAgent"),[{success:!0},null]):[null,{code:ct.InternalError,message:"No workflow run ID found in session"}]}catch(n){if(Lo(t,n,"githubApi.cancelCodingAgent"),Sa(t,"githubApi.cancelCodingAgent",n),n instanceof Jre)return[null,{code:ct.NoCopilotToken,message:n.message}];if(n instanceof ny)return[null,{code:ct.InvalidRequest,message:n.message}];if(n instanceof xT)return[null,{code:ct.InvalidRequest,message:n.message}];if(n instanceof wT)return[null,{code:ct.NoGitHubToken,message:n.message}];if(n instanceof fp&&n.isClientError())return[null,{code:ct.InvalidRequest,message:n.message}];if(n instanceof Error)return[null,{code:ct.InternalError,message:`Unexpected error happened: ${n.message}`}];let o=JSON.stringify(n)??String(n);return[null,{code:ct.InternalError,message:`Unexpected error happened: ${o}`}]}}a(T2a,"handleCancelCodingAgentChecked");var B0i=He(b2a,T2a);f();var S2a=S.Object({});async function I2a(t,e,r){return[(await IT(t)).map(s=>({slug:s.slug,name:s.name,description:s.description,avatarUrl:s.avatarUrl})),null]}a(I2a,"handleConversationAgentsChecked");var L0i=He(S2a,I2a);f();f();var g2e=de(mu());function x2a(t,e,r){let n=Pt.createAndMarkAsIssued({languageId:String(e.detectedLanguageId),requestedDocumentVersion:String(r),actualDocumentVersion:String(e.version)});return st(t,"getCompletions.docVersionMismatch",n)}a(x2a,"telemetryVersionMismatch");async function C3(t,e,r){let o=t.get(zr).getTextDocumentUnsafe(e);if(!o)throw new g2e.ResponseError(ct.InvalidParams,`Document for URI could not be found: ${e.uri}`);let s=await E6(t,e,o.getText());if(s.status==="invalid")throw t.get(Bs).setInactive(s.reason),new g2e.ResponseError(ct.CopilotNotAvailable,s.reason);if(e.version!==void 0&&o.version!==e.version)throw r?.isCancellationRequested||(x2a(t,o,e.version),$a.debug(t,`Requested document version was ${e.version} but actual document version was ${o.version}.`)),new g2e.ResponseError(ct.ContentModified,"Document Version Mismatch");return o}a(C3,"getTextDocument");async function ZD(t,e,r){let n=e.textDocument??e.doc;if(n)try{return await C3(t,n,r)}catch(o){if(o instanceof g2e.ResponseError){if(o.code===ct.CopilotNotAvailable)return;if(o.code===ct.InvalidParams){$a.warn(t,`Document not found for conversation: ${n.uri}. Continuing without this file.`);return}}throw o}}a(ZD,"getTextDocumentIfAvailable");var w2a=S.Union([S.Literal("keyboard"),S.Literal("toolbar")]),R2a=S.Object({turnId:Tj,codeBlockIndex:S.Number(),source:w2a,copiedCharacters:S.Number(),totalCharacters:S.Number(),copiedText:S.String(),doc:S.Optional(eUe),textDocument:S.Optional(zE),position:S.Optional(uh),conversationSource:S.Optional(ak)});async function P2a(t,e,r){let n=await ZD(t,r,e),o={totalCharacters:r.totalCharacters,copiedCharacters:r.copiedCharacters},s=r.position??r.doc?.position;n&&s&&(o={...o,currentLine:s.line});let c=N6(r.conversationSource),l=t.get(lo).findByTurnId(r.turnId),u=await Ja(t,l,{languageId:n?.detectedLanguageId??""});return Q1(t,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:c,mode:l?.turn.getChatModeForTelemetry()??"unknown",modelId:l?.turn.getResolvedModelId()??"unknown"},o,`${Bg(c)}.acceptedCopy`,u),["OK",null]}a(P2a,"handleConversationCodeCopyChecked");var F0i=He(R2a,P2a);f();var k2a=S.Union([S.Literal("keyboard"),S.Literal("toolbar"),S.Literal("diff")]),D2a=S.Object({turnId:Tj,source:k2a,codeBlockIndex:S.Number(),acceptedLength:S.Optional(S.Number()),totalCharacters:S.Number(),newFile:S.Optional(S.Boolean()),doc:S.Optional(eUe),textDocument:S.Optional(zE),position:S.Optional(uh),conversationSource:S.Optional(ak)});async function N2a(t,e,r){let n=await ZD(t,r,e),o={totalCharacters:r.totalCharacters,acceptedLength:r.acceptedLength??r.totalCharacters},s=r.position??r.doc?.position;n&&s&&(o={...o,insertionOffset:n.offsetAt(s),currentLine:s.line});let c=N6(r.conversationSource),l=t.get(lo).findByTurnId(r.turnId),u=await Ja(t,l,{languageId:n?.detectedLanguageId??""});return Q1(t,n,{codeBlockIndex:r.codeBlockIndex.toString(),source:r.source,uiKind:c,compType:r.acceptedLength&&r.acceptedLength0&&(e+=` ## Latest Todo List \`\`\`json ${JSON.stringify(o,null,2)} -\`\`\``),e}sendStartedTelemetry(e,r,n,o){let s=yt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r)},{turnCount:n});at(this.ctx,"conversationPartition.compression.started",s,0)}sendArchivedTelemetry(e,r,n){let o=yt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r)},{turnCount:n});at(this.ctx,"conversationPartition.compression.archived",o,0)}sendSummarizedTelemetry(e,r,n){let o=yt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r)},{summaryLength:n});at(this.ctx,"conversationPartition.compression.summarized",o,0)}sendCompletedTelemetry(e,r,n,o,s,c,l){let u=yt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r),newPartitionId:String(n),modelId:l},{archivedTurnCount:o,summaryLength:s,compressionTimeMs:c});at(this.ctx,"conversationPartition.compression.completed",u,0)}sendFailedTelemetry(e,r,n,o){let s=yt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r),error:n},{compressionTimeMs:o});at(this.ctx,"conversationPartition.compression.failed",s,0)}sendCancelledTelemetry(e,r,n){let o=Date.now()-n,s=yt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r)},{compressionTimeMs:o});at(this.ctx,"conversationPartition.compression.cancelled",s,0)}async recordPartitionTranscriptEvents(e,r,n,o,s){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.initializePartition(e,n,{compressedFrom:r,source:"compression",summary:o,turnId:s?String(s):void 0})}catch(c){Ge.error(this.ctx,`Failed to initialize new partition transcript: ${c instanceof Error?c.message:String(c)}`)}}};f();f();var ift=de(po());var nft=class extends Zt{static{a(this,"ConversationSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(ift.SystemMessage,{priority:100},vscpp(vscppf,null,this.renderSummarizationInstructions())),this.renderPartitionTurns(),vscpp(ift.UserMessage,{priority:90},vscpp(vscppf,null,this.renderFinalInstructions())))}renderSummarizationInstructions(){return`You are an expert at summarizing chat conversations for context compression. +\`\`\``),e}sendStartedTelemetry(e,r,n,o){let s=Pt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r)},{turnCount:n});st(this.ctx,"conversationPartition.compression.started",s,0)}sendArchivedTelemetry(e,r,n){let o=Pt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r)},{turnCount:n});st(this.ctx,"conversationPartition.compression.archived",o,0)}sendSummarizedTelemetry(e,r,n){let o=Pt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r)},{summaryLength:n});st(this.ctx,"conversationPartition.compression.summarized",o,0)}sendCompletedTelemetry(e,r,n,o,s,c,l){let u=Pt.createAndMarkAsIssued({conversationId:String(e),archivedPartitionId:String(r),newPartitionId:String(n),modelId:l},{archivedTurnCount:o,summaryLength:s,compressionTimeMs:c});st(this.ctx,"conversationPartition.compression.completed",u,0)}sendFailedTelemetry(e,r,n,o){let s=Pt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r),error:n},{compressionTimeMs:o});st(this.ctx,"conversationPartition.compression.failed",s,0)}sendCancelledTelemetry(e,r,n){let o=Date.now()-n,s=Pt.createAndMarkAsIssued({conversationId:String(e),partitionId:String(r)},{compressionTimeMs:o});st(this.ctx,"conversationPartition.compression.cancelled",s,0)}async recordPartitionTranscriptEvents(e,r,n,o,s){if(this.transcriptPersistence.isEnabled())try{await this.transcriptPersistence.initializePartition(e,n,{compressedFrom:r,source:"compression",summary:o,turnId:s?String(s):void 0})}catch(c){Ge.error(this.ctx,`Failed to initialize new partition transcript: ${c instanceof Error?c.message:String(c)}`)}}};f();f();var fdt=de(co());var ddt=class extends Xt{static{a(this,"ConversationSummaryPrompt")}renderCopilot(){return vscpp(vscppf,null,vscpp(fdt.SystemMessage,{priority:100},vscpp(vscppf,null,this.renderSummarizationInstructions())),this.renderPartitionTurns(),vscpp(fdt.UserMessage,{priority:90},vscpp(vscppf,null,this.renderFinalInstructions())))}renderSummarizationInstructions(){return`You are an expert at summarizing chat conversations for context compression. You will be provided with a series of user/assistant message pairs from a conversation partition that needs to be compressed. @@ -3495,7 +3484,7 @@ Summary: 1. **Analysis Section** = Chronological story for understanding flow 2. **Summary Section** = Structured lookup reference for key facts 3. **Redundancy is acceptable** - same info can appear in both sections -4. **Completeness over brevity** - better to include too much than too little`}renderPartitionTurns(){let{partition:e,ctx:r}=this.props,n=[];if(!e.turns||e.turns.length===0)return n;for(let o of e.turns)if(o.request&&n.push(wUe({role:"user",content:ev(o.request.message)})),o.response){let s=cF(o.response.message,!0),c=bF(s,{ctx:r,identifier:"partition summary",enableWarnings:!1});c.length>0&&n.push(vscpp(mk,{assistantRounds:c,ctx:r,isHistorical:!0,identifier:"partition-summary"}))}return n}renderFinalInstructions(){let{partition:e,ctx:r,userLanguage:n}=this.props,o=new vh(r),s=o.isEnabled()?this.getTranscriptReferenceMessage(o.getTranscriptPath(e.conversationId,e.partitionId),n):"";return`The conversation above contains ${e.turnCount} turn(s) from partition ${e.partitionId}. +4. **Completeness over brevity** - better to include too much than too little`}renderPartitionTurns(){let{partition:e,ctx:r}=this.props,n=[];if(!e.turns||e.turns.length===0)return n;for(let o of e.turns)if(o.request&&n.push(B7e({role:"user",content:q1(o.request.message)})),o.response){let s=O6(o.response.message,!0),c=K6(s,{ctx:r,identifier:"partition summary",enableWarnings:!1});c.length>0&&n.push(vscpp(nk,{assistantRounds:c,ctx:r,isHistorical:!0,identifier:"partition-summary"}))}return n}renderFinalInstructions(){let{partition:e,ctx:r,userLanguage:n}=this.props,o=new mh(r),s=o.isEnabled()?this.getTranscriptReferenceMessage(o.getTranscriptPath(e.conversationId,e.partitionId),n):"";return`The conversation above contains ${e.turnCount} turn(s) from partition ${e.partitionId}. Please create a comprehensive summary following the exact format specified in the system instructions. @@ -3513,7 +3502,7 @@ If you need specific details from before compaction (like exact code snippets, e \u5727\u7E2E\u524D\u306E\u5177\u4F53\u7684\u306A\u8A73\u7D30\uFF08\u6B63\u78BA\u306A\u30B3\u30FC\u30C9\u30B9\u30CB\u30DA\u30C3\u30C8\u3001\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u3001\u751F\u6210\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u306A\u3069\uFF09\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u3001\u5B8C\u5168\u306A\u30C8\u30E9\u30F3\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u304A\u8AAD\u307F\u304F\u3060\u3055\u3044\uFF1A${e}`,es:` -Si necesita detalles espec\xEDficos de antes de la compactaci\xF3n (como fragmentos de c\xF3digo exactos, mensajes de error o contenido que gener\xF3), lea la transcripci\xF3n completa en: ${e}`},s=n.split("-")[0];return o[n]||o[s]||o.en}};var A2=class{constructor(e){this.ctx=e}static{a(this,"ConversationSummaryManager")}async generateSummary(e,r,n,o="conversation-other"){let s=Date.now();try{if(this.sendStartedTelemetry(e),n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";let l=await y0.create(nft,{ctx:this.ctx,partition:e},r).renderPrompt(void 0,n);if(n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";let u=wm.user(o,yr()),d=Gb.createEmptyConfigForTesting(),p;try{p=this.ctx.get(ya)}catch{p=new ya(this.ctx)}let h={messages:l.messages,uiKind:"conversationPanel",llmInteraction:u,modelConfiguration:r},m=await p.fetchResponse(h,n,d,void 0);if(n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";if(m.type==="success"){let g=m.value.trim();return this.sendSuccessTelemetry(e,s,g,r),Ge.debug(this.ctx,`Generated partition summary: conversationId=${e.conversationId}, partitionId=${e.partitionId}, length=${g.length}`),g}else{let g="reason"in m?m.reason:"Unknown error";return Ge.error(this.ctx,`Failed to generate partition summary: conversationId=${e.conversationId}, partitionId=${e.partitionId}, type=${m.type}, reason=${g}`),this.sendErrorTelemetry(e,s,m.type,g),""}}catch(c){let l=c instanceof Error?c.message:String(c);return Ge.exception(this.ctx,c,`Error generating partition summary for conversationId=${e.conversationId}, partitionId=${e.partitionId}`),this.sendErrorTelemetry(e,s,"exception",l),""}}sendStartedTelemetry(e){let r=yt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId)},{turnCount:e.turnCount});at(this.ctx,"partition.summary.started",r,0)}sendSuccessTelemetry(e,r,n,o){let s=Date.now()-r,c=yt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId),modelId:o.modelId},{summaryLength:n.length,generationTimeMs:s,turnCount:e.turnCount});at(this.ctx,"partition.summary.success",c,0)}sendErrorTelemetry(e,r,n,o){let s=Date.now()-r,c=yt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId),errorType:n,errorMessage:o||"Unknown error"},{generationTimeMs:s});at(this.ctx,"partition.summary.error",c,0)}sendCancelledTelemetry(e,r){let n=Date.now()-r,o=yt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId)},{generationTimeMs:n});at(this.ctx,"partition.summary.cancelled",o,0)}};var Dwa=S.Object({conversationId:S.String()});async function Mwa(t,e,r){let{conversationId:n}=r,o=Date.now();Ge.debug(t,`Manual compression started for conversation: ${n}`);let s=t.get(Tb);Owa(t,n,o);try{if(e.isCancellationRequested)return Ge.debug(t,`Manual compression cancelled before start: ${n}`),[CPe(n,"Compression cancelled"),null];let c=t.get(ho),l;try{l=c.get(n)}catch{return Ge.warn(t,`Conversation not found: ${n}`),_Pe(t,n,0,"Conversation not found",Date.now()-o),[CPe(n,`Conversation not found: ${n}`),null]}let u=l.turns.length;if(u===0)return Ge.warn(t,`Cannot compress conversation with 0 turns: ${n}`),_Pe(t,n,0,"No turns to compress",Date.now()-o),[CPe(n,`Cannot compress conversation with 0 turns: ${n}`),null];let d=l.turns.filter(v=>v.request.type!=="meta").length;if(l.currentPartitionId>1&&d===0)return Ge.warn(t,`Cannot compress - no new turns since last compression: ${n}`),_Pe(t,n,l.currentPartitionId,"No new turns since last compression",Date.now()-o),[CPe(n,`Cannot compress - no new turns since last compression: ${n}`),null];let h=t.get(Da),g=l.turns[l.turns.length-1]?.resolvedModelConfiguration||await h.getBestChatModelConfig($E("user")),A=t.get(A2),y=new TI(A,t),E=l.currentPartitionId;await s.notifyCompressionStarted({conversationId:n,partitionId:E,reason:"manual"});let _=await y.compressCurrentPartition(l,g,e);if(_.success){let v=l.turns[0],b=typeof v?.request?.message=="string"?v.request.message:"",I=Date.now()-o;Ge.debug(t,`Manual compression completed: conversationId=${n}, archivedPartitionId=${_.archivedPartitionId}, newPartitionId=${_.newPartitionId}, turnCount=${u}, summaryLength=${b.length}, durationMs=${I}`);let x;try{x=new jF().calculateContextSize(t,l,g)}catch(R){Ge.warn(t,`Failed to calculate context size after compression: ${R instanceof Error?R.message:String(R)}`)}return await s.notifyCompressionCompleted({conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryLength:b.length,turnCount:u,durationMs:I,contextInfo:x}),Bwa(t,n,_.archivedPartitionId,_.newPartitionId,u,b.length,I),[{success:!0,conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryContent:b,summaryLength:b.length,turnCount:u,contextInfo:x},null]}else{let v=_.error||"Compression failed",b=Date.now()-o;return Ge.warn(t,`Manual compression failed: conversationId=${n}, error=${v}`),_Pe(t,n,_.archivedPartitionId,v,b),[{success:!1,conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryContent:"",summaryLength:0,turnCount:u,error:v},null]}}catch(c){let l=c instanceof Error?c.message:String(c),u=Date.now()-o;return Ge.exception(t,c,`Manual compression error: conversationId=${n}`),_Pe(t,n,0,l,u),[CPe(n,`Compression failed: ${l}`),null]}}a(Mwa,"handleConversationCompressChecked");function CPe(t,e){return{success:!1,conversationId:t,archivedPartitionId:0,newPartitionId:0,summaryContent:"",summaryLength:0,turnCount:0,error:e,contextInfo:void 0}}a(CPe,"createErrorResult");function Owa(t,e,r){let n=yt.createAndMarkAsIssued({conversationId:e},{});at(t,"conversationPartition.manualCompression.started",n,0)}a(Owa,"sendStartedTelemetry");function Bwa(t,e,r,n,o,s,c){let l=yt.createAndMarkAsIssued({conversationId:e,archivedPartitionId:String(r),newPartitionId:String(n),success:"true"},{turnCount:o,summaryLength:s,durationMs:c});at(t,"conversationPartition.manualCompression.completed",l,0)}a(Bwa,"sendCompletedTelemetry");function _Pe(t,e,r,n,o){let s=yt.createAndMarkAsIssued({conversationId:e,partitionId:String(r),success:"false",error:n},{durationMs:o});at(t,"conversationPartition.manualCompression.failed",s,0)}a(_Pe,"sendFailedTelemetry");var qfi=He(Dwa,Mwa);f();f();function oft(t){if(t?.originalBillingMultiplier===void 0)return;let e=t.autoModeDiscountedCost??0;return Math.round((t.originalBillingMultiplier??0)*(1-e)*100)/100}a(oft,"calculateBillingMultiplier");f();var sft=S.Array(bf);function aft(t){if(t.textDocument?.uri)return{uri:t.textDocument.uri,selection:t.selection,visibleRange:t.visibleRanges?.[0]}}a(aft,"resolveAsActiveEditor");f();var Gfi=de(Su());var cft=new Gfi.ProgressType,sAr=class{constructor(e){this.progressToken=e;this.tokenBudgetEstimator=new jF}static{a(this,"WorkDoneProgressHandler")}async begin(e,r,n,o){await e.get(Ar).connection.sendProgress(cft,this.progressToken,{kind:"begin",title:`Conversation ${r.id} Turn ${n.id}`,conversationId:r.id,turnId:n.id,agentSlug:n.agent?.agentSlug,...o})}async report(e,r,n,o){let s=o.contextSize;s||(s=this.calculateContextSize(e,r,n)),await e.get(Ar).connection.sendProgress(cft,this.progressToken,{kind:"report",conversationId:r.id,turnId:n.id,...o,contextSize:s})}async end(e,r,n,o){await e.get(Ar).connection.sendProgress(cft,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,...o})}async cancel(e,r,n,o){await e.get(Ar).connection.sendProgress(cft,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,cancellationReason:"CancelledByUser",error:o})}calculateContextSize(e,r,n){try{let o=n.resolvedModelConfiguration;return o?this.tokenBudgetEstimator.calculateContextSize(e,r,o):void 0}catch(o){Ge.error(e,"Failed to calculate context size",o);return}}};function r0e(t){return new sAr(t.workDoneToken)}a(r0e,"createProgressHandler");f();var Hfi=de(Su());var n0e=class{static{a(this,"WorkspaceFoldersValidator")}static validate(e){if(!e)return;let r=new Set;for(let n of e){if(r.has(n.uri))throw new Hfi.ResponseError(lt.InvalidParams,`Duplicate workspace folder uri ${n.uri}`);r.add(n.uri)}}};f();function lft(t){if(t&&t.uri.length>0)return[{uri:t.uri,name:ei(t.uri)}]}a(lft,"resolveAsWorkspaceFolders");f();f();var Lwa=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),DA=class{constructor(e){this.tokens=[];this.handlers=[];this._isCancelled=!1;this.onCancellationRequested=a((e,r)=>this._isCancelled?Lwa(e,r):(this.handlers.push(e.bind(r)),{dispose:a(()=>{},"dispose")}),"onCancellationRequested");this.tokens=e,this._isCancelled=e.some(r=>r.isCancellationRequested),e.forEach(r=>{r.onCancellationRequested(n=>this.cancel(n))})}static{a(this,"MergedToken")}cancel(e){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach(r=>r(e)))}get isCancellationRequested(){return this.tokens.some(e=>e.isCancellationRequested)}};var y2=class{constructor(){this.tokens=new $r(250)}static{a(this,"ProgressTokens")}add(e,r){let n=new _n.CancellationTokenSource,o=new DA([r,n.token]);return this.tokens.set(e.toString(),n),o}cancel(e){let r=this.tokens.get(e.toString());r&&(r.cancel(),this.tokens.delete(e.toString()))}};var Fwa=S.Object({conversationId:S.Optional($Ue),workDoneToken:S.Union([S.String(),S.Number()]),turns:S.Array(OWr,{minItems:1}),capabilities:S.Optional(S.Object({allSkills:S.Optional(S.Boolean()),skills:S.Optional(S.Array(S.String()))})),doc:S.Optional(sC),textDocument:S.Optional(sC),selection:S.Optional(bf),visibleRanges:S.Optional(sft),computeSuggestions:S.Optional(S.Boolean()),references:S.Optional(S.Array(IF)),source:S.Optional(Ek),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(yh)),ignoredSkills:S.Optional(S.Array(S.String())),userLanguage:S.Optional(S.String()),model:S.Optional(S.String()),modelProviderName:S.Optional(S.String()),chatMode:S.Optional(YUe),customChatModeId:S.Optional(S.String()),needToolCallConfirmation:S.Optional(S.Boolean()),todoList:S.Optional(S.Array(KUe)),restoreToTurnId:S.Optional(S.String())});async function Uwa(t,e,r){n0e.validate(r.workspaceFolders);let n=await d5(t,r,e),o=await t.get(ho).createOrRestore({...r,restoreToTurnId:r.restoreToTurnId});r.todoList!==void 0&&t.get(_p).setTodos(o,r.todoList);let s=o.turns.length>0?r.turns.slice(-1):r.turns;await Qwa(t,o,{...r,turns:s},n);let c=o.turns[o.turns.length-1],l=r0e(r),u=t.get(y2).add(l.progressToken,e),d=new YT(t,o,c,u);await(await t.get(E2).createProcessor(d,l.progressToken,r.computeSuggestions)).process(l,u,void 0,n,r.model,r.modelProviderName);let h=c.resolvedModelConfiguration,m=oft(h);return[{conversationId:o.id,turnId:c.id,agentSlug:c.agent?.agentSlug,modelName:h?.uiName??r.model,modelProviderName:r.modelProviderName,billingMultiplier:m},null]}a(Uwa,"handleConversationCreateChecked");async function Qwa(t,e,r,n){for(let o of r.turns){let s=WUe(o.request),c=new Dd({message:s,type:"user"},o.turnId);o.response&&(c.response={message:o.response,type:"model"}),o.agentSlug&&(c.agent={agentSlug:o.agentSlug});let l=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,u=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:lft(l),d=t.get(dy),p=L6(r.chatMode);c.chatMode=await d.getChatMode(p,r.customChatModeId,u),c.userRequestedModel=o.model??r.model,c.needToolCallConfirmation=r.needToolCallConfirmation;let h=aft({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});await t.get(ho).addTurn(e.id,c,r.references,h,l,u,r.ignoredSkills,void 0)}}a(Qwa,"addTurns");var jfi=He(Fwa,Uwa);f();var qwa=S.Object({conversationId:S.String()});function Gwa(t,e,r){return t.get(ho).destroy(r.conversationId),["OK",null]}a(Gwa,"handleConversationDestroyChecked");var $fi=He(qwa,Gwa);f();var Hwa=S.Object({workspaceFolders:S.Optional(S.Array(yh))});async function jwa(t,e,r){return[(await t.get(dy).listChatModes(r.workspaceFolders)).map(c=>({id:c.id,name:c.name,kind:c.kind,isBuiltIn:c.isBuiltIn,uri:c.uri,description:c.description,customTools:c.customTools,model:c.model,handOffs:c.handOffs})),null]}a(jwa,"handleConversationModesChecked");var Vfi=He(Hwa,jwa);f();var $wa=S.Object({turnId:S.String(),acceptedFileCount:S.Number({minimum:0}),totalFileCount:S.Number({minimum:1})}),Vwa=new Se("conversationNotifyCodeAcceptance");async function Wwa(t,e,r){let n=t.get(ho).findByTurnId(r.turnId);if(!n)return Vwa.warn(t,`Turn with id ${r.turnId} not found`),["OK",null];let o=await rc(t,n,{languageId:""});return Z1(t,void 0,{mode:n?.turn.getChatModeForTelemetry()??"unknown",modelId:n?.turn.getResolvedModelId()??"unknown"},{acceptedFileCount:r.acceptedFileCount,totalFileCount:r.totalFileCount},`${jg("agentPanel")}.codeAcceptance`,o),["OK",null]}a(Wwa,"handleConversationNotifyCodeAcceptanceChecked");var Wfi=He($wa,Wwa);f();var zwa=S.Object({});function Ywa(t,e,r){return[{path:t.get(Si).directory},null]}a(Ywa,"handleConversationPersistenceChecked");var zfi=He(zwa,Ywa);f();f();var aAr=class{static{a(this,"TokenPreconditionCheck")}async check(e,r){let n=await e.get(en).getSession(),o=e.get(qc);return n&&n.githubAppId&&(r||n.githubAppId!==ex)?{type:"token",status:"ok"}:{type:"token",status:"failed",githubAppId:o.githubAppId}}},cAr=class{static{a(this,"ChatEnabledPreconditionCheck")}async check(e,r){return{type:"chat_enabled",status:(await e.get(Ot).getToken()).envelope.chat_enabled?"ok":"failed"}}},Kwa=[new aAr,new cAr],SI=class{constructor(e,r=Kwa){this.ctx=e;this.checks=r;this.emitter=new ki;this.onChange=this.emitter.event;ss(e,async()=>{await this.check()})}static{a(this,"PreconditionsCheck")}check(e,r){return e&&(this.result=void 0),this.result===void 0&&(this.result=this.requestChecks(r)),this.result}async requestChecks(e){let r=[];this.checks.length>0&&(r=await Promise.all(this.checks.map(s=>s.check(this.ctx,e))));let n=r.every(s=>s.status==="ok")?"ok":"failed",o={results:r,status:n};return this.emitter.fire(o),o}};var Jwa=S.Object({forceCheck:S.Optional(S.Boolean()),skipAppIdCheck:S.Optional(S.Boolean())});async function Xwa(t,e,r){let n=r.forceCheck??!1,o=r.skipAppIdCheck??!1;return[await t.get(SI).check(n,o),null]}a(Xwa,"handleConversationPreconditionsChecked");var Yfi=He(Jwa,Xwa);f();var Zwa=S.Object({turnId:S.String(),rating:S.Number(),doc:S.Optional(sC),textDocument:S.Optional(sC),source:S.Optional(Ek)});async function eRa(t,e,r){let n=await d5(t,r,e),o=sF(r.source),s="unrated";r.rating>0?s="positive":r.rating<0&&(s="negative");let c=await rc(t,t.get(ho).findByTurnId(r.turnId),{languageId:n?.detectedLanguageId??""});return Z1(t,n,{rating:s,uiKind:o},{},`${jg(o)}.messageRating`,c),["OK",null]}a(eRa,"handleConversationRatingChecked");var Kfi=He(Zwa,eRa);f();var tRa=S.Object({tools:S.Array(BWr)});function rRa(t,e,r){let n=t.get(Po);return r.tools.forEach(s=>{n.registerTool(new ZF({name:s.name,description:s.description,inputSchema:s.inputSchema,confirmationMessages:s.confirmationMessages}))}),[n.getToolsForModel().filter(s=>s.type!=="mcp"),null]}a(rRa,"conversationRegisterToolsChecked");var Jfi=He(tRa,rRa);f();var nRa=S.Object({workspaceFolders:S.Optional(S.Array(yh))});async function iRa(t,e,r){let n=T5t(t).map(l=>({id:l.id,description:l.description,shortDescription:l.shortDescription,scopes:l.scopes,source:"builtin"})),c=(await t.get(uy).collectGlobalPromptFiles()).filter(l=>!n.some(u=>u.id===l.name)).map(l=>({id:l.name,description:l.description||"",shortDescription:"",scopes:["chat-panel","agent-panel"],source:"globalPrompt"}));if(n.push(...c),r.workspaceFolders&&r.workspaceFolders.length>0){let d=(await t.get(uy).listCustomPrompts(r.workspaceFolders)).filter(g=>!n.some(A=>A.id===g.name)).map(g=>({id:g.name,description:g.description||"",shortDescription:"",scopes:["chat-panel","agent-panel"],source:"workspacePrompt"}));n.push(...d);let m=(await t.get(BO).listSkills(r.workspaceFolders)).map(g=>({id:`skill:${ei(Wu(g.uri))}`,description:g.description||"",shortDescription:g.name,scopes:["agent-panel"],source:"skill"})).filter(g=>!n.some(A=>A.id===g.id));n.push(...m)}return[n,null]}a(iRa,"handleConversationTemplatesChecked");var Xfi=He(nRa,iRa);f();var oRa=S.Object({workDoneToken:S.Union([S.String(),S.Number()]),conversationId:$Ue,turnId:S.Optional(A$),message:LPt,followUp:S.Optional(S.Object({id:S.String(),type:S.String()})),doc:S.Optional(sC),textDocument:S.Optional(sC),selection:S.Optional(bf),visibleRanges:S.Optional(sft),computeSuggestions:S.Optional(S.Boolean()),references:S.Optional(S.Array(IF)),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(yh)),ignoredSkills:S.Optional(S.Array(S.String())),confirmationResponse:VHr,model:S.Optional(S.String()),modelProviderName:S.Optional(S.String()),chatMode:S.Optional(YUe),customChatModeId:S.Optional(S.String()),needToolCallConfirmation:S.Optional(S.Boolean()),agentSlug:S.Optional(S.String()),todoList:S.Optional(S.Array(KUe))});async function sRa(t,e,r){n0e.validate(r.workspaceFolders);let n=await d5(t,r,e),o=t.get(ho),s=o.get(r.conversationId);r.todoList!==void 0&&t.get(_p).setTodos(s,r.todoList);let c=WUe(r.message),l=new Dd({message:c,type:"user"},r.turnId),u=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,d=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:lft(u),p=t.get(dy),h=L6(r.chatMode);l.chatMode=await p.getChatMode(h,r.customChatModeId,d),l.userRequestedModel=r.model,l.needToolCallConfirmation=r.needToolCallConfirmation,r.agentSlug&&(l.agent={agentSlug:r.agentSlug});let m=aft({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});l=await o.addTurn(s.id,l,r.references,m,u,d,r.ignoredSkills,r.confirmationResponse);let g=r0e(r),A=t.get(y2).add(g.progressToken,e),y=new YT(t,s,l,A);await(await t.get(E2).createProcessor(y,g.progressToken,r.computeSuggestions)).process(g,A,r.followUp,n,r.model,r.modelProviderName);let _=l.resolvedModelConfiguration,v=oft(_);return[{conversationId:s.id,turnId:l.id,agentSlug:l.agent?.agentSlug,modelName:_?.uiName??r.model,modelProviderName:r.modelProviderName,billingMultiplier:v},null]}a(sRa,"handleConversationTurnChecked");var Zfi=He(oRa,sRa);f();var aRa=S.Object({conversationId:S.String(),turnId:S.String(),source:S.Optional(Ek)});async function cRa(t,e,r){t.get(ho).deleteTurn(r.conversationId,r.turnId);let o=sF(r.source),s=await rc(t,t.get(ho).findByTurnId(r.turnId),{languageId:""});return Z1(t,void 0,{messageId:r.turnId,uiKind:o,conversationId:r.conversationId},{},`${jg(o)}.messageDelete`,s),["OK",null]}a(cRa,"handleConversationTurnDeleteChecked");var e0i=He(aRa,cRa);f();var lRa=S.Object({toolIds:S.Array(S.String())});function uRa(t,e,r){let n=t.get(Po);return r.toolIds.forEach(s=>{n.unregisterTool(s)}),[n.getToolsForModel().filter(s=>s.type!=="mcp"),null]}a(uRa,"conversationUnregisterToolsChecked");var t0i=He(lRa,uRa);f();var dRa=S.Object({chatModeKind:S.Optional(S.Literal("Agent")),customChatModeId:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(yh)),tools:S.Array(S.Object({name:S.String(),status:S.Enum(iO)}))});async function fRa(t,e,r){let{chatModeKind:n,customChatModeId:o,workspaceFolders:s}=r,c=await t.get(dy).getChatMode(n?L6(n):"Agent",o,s),l=t.get(Po),u=r.tools.map(({name:p,status:h})=>({toolName:p,status:h}));return await l.updateToolsStatusByName(c,u),[l.getToolsForModel(c).filter(p=>p.type!=="mcp"),null]}a(fRa,"conversationUpdateToolsStatusChecked");var r0i=He(dRa,fRa);f();f();var pRa=5e3,iX=class{static{a(this,"ThinkingTitleGenerateService")}buildPrompt(e){let r;return e.extractedTitles&&e.extractedTitles.length>0?r=e.extractedTitles.join(", "):r=(e.thinkingContent??"").substring(0,1e3),`Summarize the following content in a SINGLE sentence (under 10 words) using past tense. Follow these rules strictly: +Si necesita detalles espec\xEDficos de antes de la compactaci\xF3n (como fragmentos de c\xF3digo exactos, mensajes de error o contenido que gener\xF3), lea la transcripci\xF3n completa en: ${e}`},s=n.split("-")[0];return o[n]||o[s]||o.en}};var s2=class{constructor(e){this.ctx=e}static{a(this,"ConversationSummaryManager")}async generateSummary(e,r,n,o="conversation-other"){let s=Date.now();try{if(this.sendStartedTelemetry(e),n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";let l=await p0.create(ddt,{ctx:this.ctx,partition:e},r).renderPrompt(void 0,n);if(n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";let u=ym.user(o,yr()),d=Rb.createEmptyConfigForTesting(),p;try{p=this.ctx.get(fa)}catch{p=new fa(this.ctx)}let h={messages:l.messages,uiKind:"conversationPanel",llmInteraction:u,modelConfiguration:r},m=await p.fetchResponse(h,n,d,void 0);if(n.isCancellationRequested)return this.sendCancelledTelemetry(e,s),"";if(m.type==="success"){let g=m.value.trim();return this.sendSuccessTelemetry(e,s,g,r),Ge.debug(this.ctx,`Generated partition summary: conversationId=${e.conversationId}, partitionId=${e.partitionId}, length=${g.length}`),g}else{let g="reason"in m?m.reason:"Unknown error";return Ge.error(this.ctx,`Failed to generate partition summary: conversationId=${e.conversationId}, partitionId=${e.partitionId}, type=${m.type}, reason=${g}`),this.sendErrorTelemetry(e,s,m.type,g),""}}catch(c){let l=c instanceof Error?c.message:String(c);return Ge.exception(this.ctx,c,`Error generating partition summary for conversationId=${e.conversationId}, partitionId=${e.partitionId}`),this.sendErrorTelemetry(e,s,"exception",l),""}}sendStartedTelemetry(e){let r=Pt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId)},{turnCount:e.turnCount});st(this.ctx,"partition.summary.started",r,0)}sendSuccessTelemetry(e,r,n,o){let s=Date.now()-r,c=Pt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId),modelId:o.modelId},{summaryLength:n.length,generationTimeMs:s,turnCount:e.turnCount});st(this.ctx,"partition.summary.success",c,0)}sendErrorTelemetry(e,r,n,o){let s=Date.now()-r,c=Pt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId),errorType:n,errorMessage:o||"Unknown error"},{generationTimeMs:s});st(this.ctx,"partition.summary.error",c,0)}sendCancelledTelemetry(e,r){let n=Date.now()-r,o=Pt.createAndMarkAsIssued({conversationId:String(e.conversationId),partitionId:String(e.partitionId)},{generationTimeMs:n});st(this.ctx,"partition.summary.cancelled",o,0)}};var M2a=S.Object({conversationId:S.String()});async function O2a(t,e,r){let{conversationId:n}=r,o=Date.now();Ge.debug(t,`Manual compression started for conversation: ${n}`);let s=t.get(db);B2a(t,n,o);try{if(e.isCancellationRequested)return Ge.debug(t,`Manual compression cancelled before start: ${n}`),[A2e(n,"Compression cancelled"),null];let c=t.get(lo),l;try{l=c.get(n)}catch{return Ge.warn(t,`Conversation not found: ${n}`),y2e(t,n,0,"Conversation not found",Date.now()-o),[A2e(n,`Conversation not found: ${n}`),null]}let u=l.turns.length;if(u===0)return Ge.warn(t,`Cannot compress conversation with 0 turns: ${n}`),y2e(t,n,0,"No turns to compress",Date.now()-o),[A2e(n,`Cannot compress conversation with 0 turns: ${n}`),null];let d=l.turns.filter(v=>v.request.type!=="meta").length;if(l.currentPartitionId>1&&d===0)return Ge.warn(t,`Cannot compress - no new turns since last compression: ${n}`),y2e(t,n,l.currentPartitionId,"No new turns since last compression",Date.now()-o),[A2e(n,`Cannot compress - no new turns since last compression: ${n}`),null];let h=t.get(wa),g=l.turns[l.turns.length-1]?.resolvedModelConfiguration||await h.getBestChatModelConfig(ME("user")),A=t.get(s2),y=new fI(A,t),E=l.currentPartitionId;await s.notifyCompressionStarted({conversationId:n,partitionId:E,reason:"manual"});let _=await y.compressCurrentPartition(l,g,e);if(_.success){let v=l.turns[0],b=typeof v?.request?.message=="string"?v.request.message:"",I=Date.now()-o;Ge.debug(t,`Manual compression completed: conversationId=${n}, archivedPartitionId=${_.archivedPartitionId}, newPartitionId=${_.newPartitionId}, turnCount=${u}, summaryLength=${b.length}, durationMs=${I}`);let x;try{x=new AF().calculateContextSize(t,l,g)}catch(w){Ge.warn(t,`Failed to calculate context size after compression: ${w instanceof Error?w.message:String(w)}`)}return await s.notifyCompressionCompleted({conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryLength:b.length,turnCount:u,durationMs:I,contextInfo:x}),L2a(t,n,_.archivedPartitionId,_.newPartitionId,u,b.length,I),[{success:!0,conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryContent:b,summaryLength:b.length,turnCount:u,contextInfo:x},null]}else{let v=_.error||"Compression failed",b=Date.now()-o;return Ge.warn(t,`Manual compression failed: conversationId=${n}, error=${v}`),y2e(t,n,_.archivedPartitionId,v,b),[{success:!1,conversationId:n,archivedPartitionId:_.archivedPartitionId,newPartitionId:_.newPartitionId,summaryContent:"",summaryLength:0,turnCount:u,error:v},null]}}catch(c){let l=c instanceof Error?c.message:String(c),u=Date.now()-o;return Ge.exception(t,c,`Manual compression error: conversationId=${n}`),y2e(t,n,0,l,u),[A2e(n,`Compression failed: ${l}`),null]}}a(O2a,"handleConversationCompressChecked");function A2e(t,e){return{success:!1,conversationId:t,archivedPartitionId:0,newPartitionId:0,summaryContent:"",summaryLength:0,turnCount:0,error:e,contextInfo:void 0}}a(A2e,"createErrorResult");function B2a(t,e,r){let n=Pt.createAndMarkAsIssued({conversationId:e},{});st(t,"conversationPartition.manualCompression.started",n,0)}a(B2a,"sendStartedTelemetry");function L2a(t,e,r,n,o,s,c){let l=Pt.createAndMarkAsIssued({conversationId:e,archivedPartitionId:String(r),newPartitionId:String(n),success:"true"},{turnCount:o,summaryLength:s,durationMs:c});st(t,"conversationPartition.manualCompression.completed",l,0)}a(L2a,"sendCompletedTelemetry");function y2e(t,e,r,n,o){let s=Pt.createAndMarkAsIssued({conversationId:e,partitionId:String(r),success:"false",error:n},{durationMs:o});st(t,"conversationPartition.manualCompression.failed",s,0)}a(y2e,"sendFailedTelemetry");var Q0i=He(M2a,O2a);f();f();function pdt(t){if(t?.originalBillingMultiplier===void 0)return;let e=t.autoModeDiscountedCost??0;return Math.round((t.originalBillingMultiplier??0)*(1-e)*100)/100}a(pdt,"calculateBillingMultiplier");f();var hdt=S.Array(gf);function mdt(t){if(t.textDocument?.uri)return{uri:t.textDocument.uri,selection:t.selection,visibleRange:t.visibleRanges?.[0]}}a(mdt,"resolveAsActiveEditor");f();var q0i=de(mu());var gdt=new q0i.ProgressType,IAr=class{constructor(e){this.progressToken=e;this.tokenBudgetEstimator=new AF}static{a(this,"WorkDoneProgressHandler")}async begin(e,r,n,o){await e.get(Ar).connection.sendProgress(gdt,this.progressToken,{kind:"begin",title:`Conversation ${r.id} Turn ${n.id}`,conversationId:r.id,turnId:n.id,agentSlug:n.agent?.agentSlug,...o})}async report(e,r,n,o){let s=o.contextSize;s||(s=this.calculateContextSize(e,r,n)),await e.get(Ar).connection.sendProgress(gdt,this.progressToken,{kind:"report",conversationId:r.id,turnId:n.id,...o,contextSize:s})}async end(e,r,n,o){await e.get(Ar).connection.sendProgress(gdt,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,...o})}async cancel(e,r,n,o){await e.get(Ar).connection.sendProgress(gdt,this.progressToken,{kind:"end",conversationId:r.id,turnId:n.id,cancellationReason:"CancelledByUser",error:o})}calculateContextSize(e,r,n){try{let o=n.resolvedModelConfiguration;return o?this.tokenBudgetEstimator.calculateContextSize(e,r,o):void 0}catch(o){Ge.error(e,"Failed to calculate context size",o);return}}};function gfe(t){return new IAr(t.workDoneToken)}a(gfe,"createProgressHandler");f();var G0i=de(mu());var Afe=class{static{a(this,"WorkspaceFoldersValidator")}static validate(e){if(!e)return;let r=new Set;for(let n of e){if(r.has(n.uri))throw new G0i.ResponseError(ct.InvalidParams,`Duplicate workspace folder uri ${n.uri}`);r.add(n.uri)}}};f();function Adt(t){if(t&&t.uri.length>0)return[{uri:t.uri,name:Zn(t.uri)}]}a(Adt,"resolveAsWorkspaceFolders");f();f();var F2a=Object.freeze(function(t,e){let r=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(r)}}}),SA=class{constructor(e){this.tokens=[];this.handlers=[];this._isCancelled=!1;this.onCancellationRequested=a((e,r)=>this._isCancelled?F2a(e,r):(this.handlers.push(e.bind(r)),{dispose:a(()=>{},"dispose")}),"onCancellationRequested");this.tokens=e,this._isCancelled=e.some(r=>r.isCancellationRequested),e.forEach(r=>{r.onCancellationRequested(n=>this.cancel(n))})}static{a(this,"MergedToken")}cancel(e){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach(r=>r(e)))}get isCancellationRequested(){return this.tokens.some(e=>e.isCancellationRequested)}};var a2=class{constructor(){this.tokens=new $r(250)}static{a(this,"ProgressTokens")}add(e,r){let n=new Cn.CancellationTokenSource,o=new SA([r,n.token]);return this.tokens.set(e.toString(),n),o}cancel(e){let r=this.tokens.get(e.toString());r&&(r.cancel(),this.tokens.delete(e.toString()))}};var U2a=S.Object({conversationId:S.Optional(Z7e),workDoneToken:S.Union([S.String(),S.Number()]),turns:S.Array(Mzr,{minItems:1}),capabilities:S.Optional(S.Object({allSkills:S.Optional(S.Boolean()),skills:S.Optional(S.Array(S.String()))})),doc:S.Optional(zE),textDocument:S.Optional(zE),selection:S.Optional(gf),visibleRanges:S.Optional(hdt),computeSuggestions:S.Optional(S.Boolean()),references:S.Optional(S.Array(Z6)),source:S.Optional(ak),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(dh)),ignoredSkills:S.Optional(S.Array(S.String())),userLanguage:S.Optional(S.String()),model:S.Optional(S.String()),modelProviderName:S.Optional(S.String()),chatMode:S.Optional(nUe),customChatModeId:S.Optional(S.String()),needToolCallConfirmation:S.Optional(S.Boolean()),todoList:S.Optional(S.Array(iUe)),restoreToTurnId:S.Optional(S.String())});async function Q2a(t,e,r){Afe.validate(r.workspaceFolders);let n=await ZD(t,r,e),o=await t.get(lo).createOrRestore({...r,restoreToTurnId:r.restoreToTurnId});r.todoList!==void 0&&t.get(mp).setTodos(o,r.todoList);let s=o.turns.length>0?r.turns.slice(-1):r.turns;await q2a(t,o,{...r,turns:s},n);let c=o.turns[o.turns.length-1],l=gfe(r),u=t.get(a2).add(l.progressToken,e),d=new LT(t,o,c,u);await(await t.get(c2).createProcessor(d,l.progressToken,r.computeSuggestions)).process(l,u,void 0,n,r.model,r.modelProviderName);let h=c.resolvedModelConfiguration,m=pdt(h);return[{conversationId:o.id,turnId:c.id,agentSlug:c.agent?.agentSlug,modelName:h?.uiName??r.model,modelProviderName:r.modelProviderName,billingMultiplier:m},null]}a(Q2a,"handleConversationCreateChecked");async function q2a(t,e,r,n){for(let o of r.turns){let s=tUe(o.request),c=new Td({message:s,type:"user"},o.turnId);o.response&&(c.response={message:o.response,type:"model"}),o.agentSlug&&(c.agent={agentSlug:o.agentSlug});let l=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,u=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:Adt(l),d=t.get(ry),p=u6(r.chatMode);c.chatMode=await d.getChatMode(p,r.customChatModeId,u),c.userRequestedModel=o.model??r.model,c.needToolCallConfirmation=r.needToolCallConfirmation;let h=mdt({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});await t.get(lo).addTurn(e.id,c,r.references,h,l,u,r.ignoredSkills,void 0)}}a(q2a,"addTurns");var H0i=He(U2a,Q2a);f();var G2a=S.Object({conversationId:S.String()});function H2a(t,e,r){return t.get(lo).destroy(r.conversationId),["OK",null]}a(H2a,"handleConversationDestroyChecked");var j0i=He(G2a,H2a);f();var j2a=S.Object({workspaceFolders:S.Optional(S.Array(dh))});async function $2a(t,e,r){return[(await t.get(ry).listChatModes(r.workspaceFolders)).map(c=>({id:c.id,name:c.name,kind:c.kind,isBuiltIn:c.isBuiltIn,uri:c.uri,description:c.description,customTools:c.customTools,model:c.model,handOffs:c.handOffs})),null]}a($2a,"handleConversationModesChecked");var $0i=He(j2a,$2a);f();var V2a=S.Object({turnId:S.String(),acceptedFileCount:S.Number({minimum:0}),totalFileCount:S.Number({minimum:1})}),W2a=new Se("conversationNotifyCodeAcceptance");async function z2a(t,e,r){let n=t.get(lo).findByTurnId(r.turnId);if(!n)return W2a.warn(t,`Turn with id ${r.turnId} not found`),["OK",null];let o=await Ja(t,n,{languageId:""});return Q1(t,void 0,{mode:n?.turn.getChatModeForTelemetry()??"unknown",modelId:n?.turn.getResolvedModelId()??"unknown"},{acceptedFileCount:r.acceptedFileCount,totalFileCount:r.totalFileCount},`${Bg("agentPanel")}.codeAcceptance`,o),["OK",null]}a(z2a,"handleConversationNotifyCodeAcceptanceChecked");var V0i=He(V2a,z2a);f();var Y2a=S.Object({});function K2a(t,e,r){return[{path:t.get(Ti).directory},null]}a(K2a,"handleConversationPersistenceChecked");var W0i=He(Y2a,K2a);f();f();var xAr=class{static{a(this,"TokenPreconditionCheck")}async check(e,r){let n=await e.get(en).getSession(),o=e.get(Oc);return n&&n.githubAppId&&(r||n.githubAppId!==GI)?{type:"token",status:"ok"}:{type:"token",status:"failed",githubAppId:o.githubAppId}}},wAr=class{static{a(this,"ChatEnabledPreconditionCheck")}async check(e,r){return{type:"chat_enabled",status:(await e.get(Nt).getToken()).envelope.chat_enabled?"ok":"failed"}}},J2a=[new xAr,new wAr],pI=class{constructor(e,r=J2a){this.ctx=e;this.checks=r;this.emitter=new Ri;this.onChange=this.emitter.event;Ps(e,async()=>{await this.check()})}static{a(this,"PreconditionsCheck")}check(e,r){return e&&(this.result=void 0),this.result===void 0&&(this.result=this.requestChecks(r)),this.result}async requestChecks(e){let r=[];this.checks.length>0&&(r=await Promise.all(this.checks.map(s=>s.check(this.ctx,e))));let n=r.every(s=>s.status==="ok")?"ok":"failed",o={results:r,status:n};return this.emitter.fire(o),o}};var X2a=S.Object({forceCheck:S.Optional(S.Boolean()),skipAppIdCheck:S.Optional(S.Boolean())});async function Z2a(t,e,r){let n=r.forceCheck??!1,o=r.skipAppIdCheck??!1;return[await t.get(pI).check(n,o),null]}a(Z2a,"handleConversationPreconditionsChecked");var z0i=He(X2a,Z2a);f();var ePa=S.Object({turnId:S.String(),rating:S.Number(),doc:S.Optional(zE),textDocument:S.Optional(zE),source:S.Optional(ak)});async function tPa(t,e,r){let n=await ZD(t,r,e),o=N6(r.source),s="unrated";r.rating>0?s="positive":r.rating<0&&(s="negative");let c=await Ja(t,t.get(lo).findByTurnId(r.turnId),{languageId:n?.detectedLanguageId??""});return Q1(t,n,{rating:s,uiKind:o},{},`${Bg(o)}.messageRating`,c),["OK",null]}a(tPa,"handleConversationRatingChecked");var Y0i=He(ePa,tPa);f();var rPa=S.Object({tools:S.Array(Ozr)});function nPa(t,e,r){let n=t.get(Io);return r.tools.forEach(s=>{n.registerTool(new IF({name:s.name,description:s.description,inputSchema:s.inputSchema,confirmationMessages:s.confirmationMessages}))}),[n.getToolsForModel().filter(s=>s.type!=="mcp"),null]}a(nPa,"conversationRegisterToolsChecked");var K0i=He(rPa,nPa);f();var iPa=S.Object({workspaceFolders:S.Optional(S.Array(dh))});async function oPa(t,e,r){let n=jNt(t).map(l=>({id:l.id,description:l.description,shortDescription:l.shortDescription,scopes:l.scopes,source:"builtin"})),c=(await t.get(ty).collectGlobalPromptFiles()).filter(l=>!n.some(u=>u.id===l.name)).map(l=>({id:l.name,description:l.description||"",shortDescription:"",scopes:["chat-panel","agent-panel"],source:"globalPrompt"}));if(n.push(...c),r.workspaceFolders&&r.workspaceFolders.length>0){let d=(await t.get(ty).listCustomPrompts(r.workspaceFolders)).filter(g=>!n.some(A=>A.id===g.name)).map(g=>({id:g.name,description:g.description||"",shortDescription:"",scopes:["chat-panel","agent-panel"],source:"workspacePrompt"}));n.push(...d);let m=(await t.get(y4).listSkills(r.workspaceFolders)).map(g=>({id:`skill:${Zn(Lu(g.uri))}`,description:g.description||"",shortDescription:g.name,scopes:["agent-panel"],source:"skill"})).filter(g=>!n.some(A=>A.id===g.id));n.push(...m)}return[n,null]}a(oPa,"handleConversationTemplatesChecked");var J0i=He(iPa,oPa);f();var sPa=S.Object({workDoneToken:S.Union([S.String(),S.Number()]),conversationId:Z7e,turnId:S.Optional(Tj),message:nkt,followUp:S.Optional(S.Object({id:S.String(),type:S.String()})),doc:S.Optional(zE),textDocument:S.Optional(zE),selection:S.Optional(gf),visibleRanges:S.Optional(hdt),computeSuggestions:S.Optional(S.Boolean()),references:S.Optional(S.Array(Z6)),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(dh)),ignoredSkills:S.Optional(S.Array(S.String())),confirmationResponse:$jr,model:S.Optional(S.String()),modelProviderName:S.Optional(S.String()),chatMode:S.Optional(nUe),customChatModeId:S.Optional(S.String()),needToolCallConfirmation:S.Optional(S.Boolean()),agentSlug:S.Optional(S.String()),todoList:S.Optional(S.Array(iUe))});async function aPa(t,e,r){Afe.validate(r.workspaceFolders);let n=await ZD(t,r,e),o=t.get(lo),s=o.get(r.conversationId);r.todoList!==void 0&&t.get(mp).setTodos(s,r.todoList);let c=tUe(r.message),l=new Td({message:c,type:"user"},r.turnId),u=r.workspaceFolder?{uri:r.workspaceFolder}:void 0,d=r.workspaceFolders&&r.workspaceFolders.length>0?r.workspaceFolders:Adt(u),p=t.get(ry),h=u6(r.chatMode);l.chatMode=await p.getChatMode(h,r.customChatModeId,d),l.userRequestedModel=r.model,l.needToolCallConfirmation=r.needToolCallConfirmation,r.agentSlug&&(l.agent={agentSlug:r.agentSlug});let m=mdt({textDocument:n,selection:r.selection,visibleRanges:r.visibleRanges});l=await o.addTurn(s.id,l,r.references,m,u,d,r.ignoredSkills,r.confirmationResponse);let g=gfe(r),A=t.get(a2).add(g.progressToken,e),y=new LT(t,s,l,A);await(await t.get(c2).createProcessor(y,g.progressToken,r.computeSuggestions)).process(g,A,r.followUp,n,r.model,r.modelProviderName);let _=l.resolvedModelConfiguration,v=pdt(_);return[{conversationId:s.id,turnId:l.id,agentSlug:l.agent?.agentSlug,modelName:_?.uiName??r.model,modelProviderName:r.modelProviderName,billingMultiplier:v},null]}a(aPa,"handleConversationTurnChecked");var X0i=He(sPa,aPa);f();var cPa=S.Object({conversationId:S.String(),turnId:S.String(),source:S.Optional(ak)});async function lPa(t,e,r){t.get(lo).deleteTurn(r.conversationId,r.turnId);let o=N6(r.source),s=await Ja(t,t.get(lo).findByTurnId(r.turnId),{languageId:""});return Q1(t,void 0,{messageId:r.turnId,uiKind:o,conversationId:r.conversationId},{},`${Bg(o)}.messageDelete`,s),["OK",null]}a(lPa,"handleConversationTurnDeleteChecked");var Z0i=He(cPa,lPa);f();var uPa=S.Object({toolIds:S.Array(S.String())});function dPa(t,e,r){let n=t.get(Io);return r.toolIds.forEach(s=>{n.unregisterTool(s)}),[n.getToolsForModel().filter(s=>s.type!=="mcp"),null]}a(dPa,"conversationUnregisterToolsChecked");var epi=He(uPa,dPa);f();var fPa=S.Object({chatModeKind:S.Optional(S.Literal("Agent")),customChatModeId:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(dh)),tools:S.Array(S.Object({name:S.String(),status:S.Enum(QM)}))});async function pPa(t,e,r){let{chatModeKind:n,customChatModeId:o,workspaceFolders:s}=r,c=await t.get(ry).getChatMode(n?u6(n):"Agent",o,s),l=t.get(Io),u=r.tools.map(({name:p,status:h})=>({toolName:p,status:h}));return await l.updateToolsStatusByName(c,u),[l.getToolsForModel(c).filter(p=>p.type!=="mcp"),null]}a(pPa,"conversationUpdateToolsStatusChecked");var tpi=He(fPa,pPa);f();f();var hPa=5e3,dJ=class{static{a(this,"ThinkingTitleGenerateService")}buildPrompt(e){let r;return e.extractedTitles&&e.extractedTitles.length>0?r=e.extractedTitles.join(", "):r=(e.thinkingContent??"").substring(0,1e3),`Summarize the following content in a SINGLE sentence (under 10 words) using past tense. Follow these rules strictly: OUTPUT FORMAT: - MUST be a single sentence @@ -3555,25 +3544,25 @@ EXAMPLES WITH RAW THINKING TEXT: - "The error seems to be coming from the database connection..." \u2192 "Investigated database connection issue" - "Looking at the UserService class, I see it handles..." \u2192 "Reviewed UserService implementation" -Content: ${r}`}async generateTitle(e,r,n){let o=new _n.CancellationTokenSource,s=setTimeout(()=>o.cancel(),pRa),c=r.onCancellationRequested(()=>o.cancel());try{let l=new ya(e),u=await $o.getModelConfiguration(e,"suggestions"),d=[{role:"user",content:this.buildPrompt(n)}],p=await e.get(Ot).getToken(),h=await e.get(jt).updateExPValuesAndAssignments(p),m=await l.fetchResponse({modelConfiguration:u,messages:d,uiKind:"conversationPanel",llmInteraction:wm.user("conversation-panel",yr())},o.token,h);if(m.type!=="success"){let A="reason"in m?m.reason:"unknown";this.reportFailure(e,m.type,A);return}let g=m.value.trim();if(g.includes("can't assist with that")){this.reportFailure(e,"refused","model refused to assist");return}return g}catch(l){let u=l instanceof Error?l.message:String(l);this.reportFailure(e,"exception",u);return}finally{clearTimeout(s),c.dispose(),o.dispose()}}reportFailure(e,r,n){let o=n.replace(/\n/g," ").substring(0,360);Ge.debug(e,`Failed to generate thinking title: errorType='${r}', reason: ${o}`);let s=yt.createAndMarkAsIssued({errorType:r,errorMessage:o},{});Kn(e,"thinkingTitle.generateFailed",s)}};var hRa=S.Object({thinkingContent:S.Optional(S.String()),extractedTitles:S.Optional(S.Array(S.String()))});async function mRa(t,e,r){if(!r.thinkingContent&&(!r.extractedTitles||r.extractedTitles.length===0))return[null,{code:lt.InvalidRequest,message:"No thinking content or extracted titles provided"}];if(e.isCancellationRequested)return[null,{code:lt.RequestCancelled,message:"Request was cancelled"}];let o=await t.get(iX).generateTitle(t,e,{thinkingContent:r.thinkingContent,extractedTitles:r.extractedTitles});return e.isCancellationRequested?[null,{code:lt.RequestCancelled,message:"Request was cancelled"}]:o?[{title:o},null]:[null,{code:lt.InternalError,message:"Failed to generate thinking title"}]}a(mRa,"handleThinkingTitleGenerateChecked");var n0i=He(hRa,mRa);f();f();f();var uft=/```suggestion(\u0020*(\r\n|\n))((?[\s\S]*?)(\r\n|\n))?```/g;var i0e=class t{static{a(this,"CodeReviewResponseParser")}static findFirstNonWhitespaceCharacterIndex(e){let r=e.match(/\S/);return r?r.index:e.length}static removeSuggestion(e){return e.replaceAll(uft,"")}static extractSuggestionAndText(e){uft.lastIndex=0;let n=uft.exec(e)?.groups?.suggestion||null,o=t.removeSuggestion(e);return{suggestion:n,textWithoutSuggestion:o}}static ghCommentToReviewComment(e,r){let n=r.headContent.split(` +Content: ${r}`}async generateTitle(e,r,n){let o=new Cn.CancellationTokenSource,s=setTimeout(()=>o.cancel(),hPa),c=r.onCancellationRequested(()=>o.cancel());try{let l=new fa(e),u=await qo.getModelConfiguration(e,"suggestions"),d=[{role:"user",content:this.buildPrompt(n)}],p=await e.get(Nt).getToken(),h=await e.get(Gt).updateExPValuesAndAssignments(p),m=await l.fetchResponse({modelConfiguration:u,messages:d,uiKind:"conversationPanel",llmInteraction:ym.user("conversation-panel",yr())},o.token,h);if(m.type!=="success"){let A="reason"in m?m.reason:"unknown";this.reportFailure(e,m.type,A);return}let g=m.value.trim();if(g.includes("can't assist with that")){this.reportFailure(e,"refused","model refused to assist");return}return g}catch(l){let u=l instanceof Error?l.message:String(l);this.reportFailure(e,"exception",u);return}finally{clearTimeout(s),c.dispose(),o.dispose()}}reportFailure(e,r,n){let o=n.replace(/\n/g," ").substring(0,360);Ge.debug(e,`Failed to generate thinking title: errorType='${r}', reason: ${o}`),rr(e,"thinkingTitle.generateFailed",{errorType:r,errorMessage:o})}};var mPa=S.Object({thinkingContent:S.Optional(S.String()),extractedTitles:S.Optional(S.Array(S.String()))});async function gPa(t,e,r){if(!r.thinkingContent&&(!r.extractedTitles||r.extractedTitles.length===0))return[null,{code:ct.InvalidRequest,message:"No thinking content or extracted titles provided"}];if(e.isCancellationRequested)return[null,{code:ct.RequestCancelled,message:"Request was cancelled"}];let o=await t.get(dJ).generateTitle(t,e,{thinkingContent:r.thinkingContent,extractedTitles:r.extractedTitles});return e.isCancellationRequested?[null,{code:ct.RequestCancelled,message:"Request was cancelled"}]:o?[{title:o},null]:[null,{code:ct.InternalError,message:"Failed to generate thinking title"}]}a(gPa,"handleThinkingTitleGenerateChecked");var rpi=He(mPa,gPa);f();f();f();var ydt=/```suggestion(\u0020*(\r\n|\n))((?[\s\S]*?)(\r\n|\n))?```/g;var yfe=class t{static{a(this,"CodeReviewResponseParser")}static findFirstNonWhitespaceCharacterIndex(e){let r=e.match(/\S/);return r?r.index:e.length}static removeSuggestion(e){return e.replaceAll(ydt,"")}static extractSuggestionAndText(e){ydt.lastIndex=0;let n=ydt.exec(e)?.groups?.suggestion||null,o=t.removeSuggestion(e);return{suggestion:n,textWithoutSuggestion:o}}static ghCommentToReviewComment(e,r){let n=r.headContent.split(` `)[e.data.line-1],o=n.trimEnd().length,s={start:{line:e.data.start_line?e.data.start_line+r.startLineOffset-1:e.data.line+r.startLineOffset-1,character:t.findFirstNonWhitespaceCharacterIndex(n)},end:{line:e.data.line+r.startLineOffset-1,character:o}},c=e.data.body,{suggestion:l,textWithoutSuggestion:u}=t.extractSuggestionAndText(c);return{uri:r.uri,range:s,message:u,kind:e.data.problem_type,severity:"medium",suggestion:l}}static parseLine(e){if(e==="data: [DONE]")return[];if(e==="")return[];let r=JSON.parse(e.replace("data: ",""));return Array.isArray(r.copilot_references)&&r.copilot_references.length>0?r.copilot_references.filter(n=>n.type):[]}static parseReviewResponse(e,r){let n=e.split(` -`),o=[];for(let s of n){let c=t.parseLine(s);for(let l of c.filter(u=>u.type==="github.generated-pull-request-comment")){if(l.data.side!=="RIGHT")continue;let u=r.find(p=>p.path===l.data.path);if(!u)continue;let d=t.ghCommentToReviewComment(l,u);o.push(d)}}return o}};f();f();var dft=require("path");var o0e=class t{constructor(e,r){this.ctx=e;this.workspaceFolders=r}static{a(this,"BaseReviewProvider")}static{this.DEFAULT_TIMEOUT=120*1e3}static{this.CODING_GUIDELINES_START_INDEX=2}static{this.CODE_REVIEW_ENDPOINT_SERVICE="api"}static{this.CODE_REVIEW_ENDPOINT_PATH="agents/github-code-review"}static{this.CODE_REVIEW_MODE_HEADER="X-Copilot-Code-Review-Mode"}static{this.CODE_REVIEW_MODE_VALUE="ide"}static{this.COPILOT_INTEGRATION_ID_HEADER="Copilot-Integration-Id"}static{this.GITHUB_CODING_GUIDELINE="github.coding_guideline"}static{this.CODING_GUIDELINE="coding-guideline"}static{this.UI_KIND="codeReview"}async fetchCodeReview(e,r){let n=await this.ctx.get(Ot).getToken(),o=L2(this.ctx,n,t.CODE_REVIEW_ENDPOINT_SERVICE,t.CODE_REVIEW_ENDPOINT_PATH),c=O1(this.ctx)[t.COPILOT_INTEGRATION_ID_HEADER];this.telemetryTracker.telemetrySent();let l=Ac();return await zM(this.ctx,o,n.token,void 0,this.telemetryTracker.headerRequestId,e,r,{[t.CODE_REVIEW_MODE_HEADER]:t.CODE_REVIEW_MODE_VALUE,[t.COPILOT_INTEGRATION_ID_HEADER]:c},t.DEFAULT_TIMEOUT).then(d=>{let p=sO(d);this.telemetryTracker.telemetryData.extendWithRequestId(p);let h=Ac()-l;return this.telemetryTracker.telemetryData.measurements.totalTimeMs=h,this.telemetryTracker.telemetryResponse(),d}).catch(d=>{if(ep(d))throw d;let p=Ac()-l;throw this.telemetryTracker.telemetryData.measurements.totalTimeMs=p,this.telemetryTracker.telemetryError(d),d})}getCodingGuidelineName(e){return(0,dft.basename)(e,(0,dft.extname)(e))}async buildCodingGuideline(e){return!this.workspaceFolders||this.workspaceFolders.length===0?[]:(await this.ctx.get(od).collectAllInstructions(this.ctx,this.workspaceFolders.map(o=>({uri:o.uri})),{includeCodeGenerationInstructions:!0,includePromptInstructionFiles:!0},e)).map((o,s)=>({type:"github.coding_guideline",id:(s+t.CODING_GUIDELINES_START_INDEX).toString(),data:{id:s+t.CODING_GUIDELINES_START_INDEX,type:"coding-guideline",name:o.description??this.getCodingGuidelineName(o.uri),description:o.content,filePatterns:o.applyTo?[o.applyTo]:[]}}))}};f();var s0e=class t{constructor(e,r={}){this.ctx=e;this.id=yr(),this.telemetryData=t.createTelemetryData(this.id).extendedBy(r)}static{a(this,"CopilotCodeReviewTelemetry")}static createTelemetryData(e){let r={headerRequestId:e};return yt.createAndMarkAsIssued(r)}telemetrySent(){at(this.ctx,"request.sent",this.telemetryData)}telemetryResponse(){at(this.ctx,"request.response",this.telemetryData)}telemetryError(e){this.telemetryData.properties.message=String(m0(e,"name")??""),this.telemetryData.properties.code=String(m0(e,"code")??""),this.telemetryData.properties.errno=String(m0(e,"errno")??""),this.telemetryData.properties.type=String(m0(e,"type")??""),at(this.ctx,"request.error",this.telemetryData)}get headerRequestId(){return this.id}};var fft=class t extends o0e{constructor(r,n,o){super(r,o);this.changes=n;this.name="ReviewChangesProvider";this.telemetryTracker=new s0e(r,{mode:"reviewChanges",uiKind:t.UI_KIND})}static{a(this,"ReviewChangesProvider")}async fetchCodeReview(r,n){return super.fetchCodeReview(r,n)}async changesToReference(){let r=this.ctx.get(bc),n=[],o=await Promise.allSettled(this.changes.map(s=>r.evaluate(s.uri,s.headContent)));for(let s=0;s({path:s.path,content:s.headContent})),baseFileContents:n.map(s=>({path:s.path,content:s.baseContent}))}}}async buildCodingGuideline(){return super.buildCodingGuideline(this.changes.map(r=>r.uri))}async createReviewRequest(){return{messages:[{role:"user",copilot_references:[await this.changesToReference(),...await this.buildCodingGuideline()]}]}}};var gRa=S.Object({uri:S.String(),path:S.String(),baseContent:S.String(),headContent:S.String()}),ARa=S.Object({changes:S.Array(gRa),workspaceFolders:S.Optional(S.Array(yh))}),vPe;async function yRa(t,e,r){vPe&&(vPe.cancel(),vPe.dispose()),vPe=new _n.CancellationTokenSource;let n=new DA([e,vPe.token]),o=new fft(t,r.changes,r.workspaceFolders);if(!(await t.get(Ot).getToken()).isCopilotCodeReviewEnabled)return[null,{code:lt.InternalError,message:"GitHub Copilot Code Review is not enabled."}];let c=await o.createReviewRequest(),l=await o.fetchCodeReview(c,n),u=await l.text();if(!l.ok)return l.status===402?[null,{code:l.status,message:"You have reached your GitHub Copilot Code Review quota limit."}]:(_r.error(t,`Code review request failed: ${l.status}. Response: ${u}`),[null,{code:lt.InternalError,message:"Failed to generate code review."}]);let d=r.changes.map(h=>({uri:h.uri,path:h.path,headContent:h.headContent,startLineOffset:0}));return[{comments:i0e.parseReviewResponse(u,d)},null]}a(yRa,"handleCopilotCodeReviewReviewChangesChecked");var i0i=He(ARa,yRa);f();f();var pft=class t extends o0e{constructor(r,n){super(r,n);this.name="ReviewSnippetsProvider";this.telemetryTracker=new s0e(r,{mode:"reviewSnippets",uiKind:t.UI_KIND})}static{a(this,"ReviewSnippetsProvider")}static{this.SNIPPET_REVIEW_TYPE="snippet"}async fetchCodeReview(r,n){return super.fetchCodeReview(r,n)}async buildCodingGuideline(r){return super.buildCodingGuideline(r)}snippetsToReference(r){return{type:"github.pull_request",id:"1",data:{type:"pull-request",headFileContents:r.map(n=>({path:n.path,content:n.content})),baseFileContents:[]}}}static snippetsToSnippetFile(r){let n=r[0];return n?.startLine!==void 0&&n?.endLine!==void 0?{path:n.path,start_line:n.startLine,end_line:n.endLine}:void 0}async createReviewRequest(r){let n=this.ctx.get(bc),o=await Promise.allSettled(r.map(u=>n.evaluate(u.uri,u.content))),s=[];for(let u=0;uu.uri),l=await this.buildCodingGuideline(c);return{messages:[{role:"user",review_type:t.SNIPPET_REVIEW_TYPE,copilot_references:[this.snippetsToReference(s),...l],snippet_file:t.snippetsToSnippetFile(s)}]}}};var ERa=S.Object({uri:S.String(),path:S.String(),content:S.String(),startLine:S.Number(),endLine:S.Number()}),CRa=S.Object({snippets:S.Array(ERa),workspaceFolders:S.Optional(S.Array(yh))}),bPe;async function _Ra(t,e,r){bPe&&(bPe.cancel(),bPe.dispose()),bPe=new _n.CancellationTokenSource;let n=new DA([e,bPe.token]),o=new pft(t,r.workspaceFolders);if(!(await t.get(Ot).getToken()).isCopilotCodeReviewEnabled)return[null,{code:lt.InternalError,message:"GitHub Copilot Code Review is not enabled."}];let c=await o.createReviewRequest(r.snippets),l=await o.fetchCodeReview(c,n);if(!l.ok)return l.status===402?[null,{code:l.status,message:"You have reached your GitHub Copilot Code Review quota limit."}]:[null,{code:lt.InternalError,message:"Failed to generate code review."}];let u=await l.text(),d=r.snippets.map(h=>({uri:h.uri,path:h.path,headContent:h.content,startLineOffset:h.startLine-1}));return[{comments:i0e.parseReviewResponse(u,d)},null]}a(_Ra,"handleCopilotCodeReviewReviewSnippetsChecked");var o0i=He(CRa,_Ra);f();f();var hft=Symbol("onMCPToolsListChanged"),mft=Symbol("onMCPResourcesListChanged"),gft=Symbol("onMCPPromptsListChanged"),s0i=Symbol("onMCPResourceUpdated"),sq=Symbol("onMCPCacheUpdated"),MA=class{static{a(this,"McpManager")}};var vRa=S.Object({}),bRa=S.Object({chatModeKind:S.Optional(S.Literal("Agent")),customChatModeId:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(yh)),servers:S.Array(S.Object({name:S.String(),tools:S.Array(S.Object({name:S.String(),status:S.Enum(iO)}))}))}),TRa=S.Object({serverName:S.String(),promptName:S.String(),arguments:S.Optional(S.Record(S.String(),S.String()))}),SRa=S.Object({serverName:S.String(),promptName:S.String(),argumentName:S.String(),prefix:S.String(),alreadyResolved:S.Optional(S.Record(S.String(),S.String()))}),IRa=S.Object({serverName:S.String(),uri:S.String()}),xRa=S.Object({serverName:S.String(),action:S.Union([S.Literal("start"),S.Literal("stop"),S.Literal("restart"),S.Literal("logout"),S.Literal("clearOAuth")])});function wRa(t,e,r){return[t.get(MA).getAllContents(),null]}a(wRa,"handleGetMCPContentsChecked");async function RRa(t,e,r){let{chatModeKind:n,customChatModeId:o,workspaceFolders:s}=r,c=await t.get(dy).getChatMode(n?L6(n):"Agent",o,s),l=r.servers.flatMap(({name:d,tools:p})=>p.map(({name:h,status:m})=>({serverName:d,toolName:h,status:m})));return await t.get(MA).updateMCPToolsStatus(c,l),[t.get(MA).getAllContents(c),null]}a(RRa,"handleUpdateMCPToolsStatusChecked");async function PRa(t,e,r){return[await t.get(MA).readResource(r.serverName,r.uri),null]}a(PRa,"handleReadResourceChecked");async function kRa(t,e,r){let{serverName:n,promptName:o,arguments:s={}}=r;return[await t.get(MA).getPrompt(n,o,s),null]}a(kRa,"handleGetPromptChecked");async function NRa(t,e,r){let{serverName:n,promptName:o,argumentName:s,prefix:c,alreadyResolved:l={}}=r;return[await t.get(MA).completePrompt(n,o,s,c,l),null]}a(NRa,"handleCompletePromptChecked");async function DRa(t,e,r){let n=t.get(MA),{serverName:o,action:s}=r;switch(s){case"start":await n.startMCPServer(o);break;case"stop":await n.stopMCPServer(o);break;case"restart":await n.restartMCPServer(o);break;case"logout":await n.logoutMCPServer(o);break;case"clearOAuth":await n.clearOAuthMCPServer(o);break}return[null,null]}a(DRa,"handleMCPServerActionChecked");var a0i=He(vRa,wRa),c0i=He(bRa,RRa),l0i=He(IRa,PRa),u0i=He(TRa,kRa),d0i=He(SRa,NRa),f0i=He(xRa,DRa);f();var MRa=S.Object({});async function ORa(t,e,r){let n=await t.get(Ot).getToken();return[BRa(t,await t.get(cl).getMetadata(),n),null]}a(ORa,"handleCopilotModelsChecked");function BRa(t,e,r){let n=[];return e.forEach(o=>{if(o.model_picker_enabled===!0&&o.capabilities.family!==k$r){let s=[];o.capabilities.type==="chat"?(s.push("chat-panel"),s.push("inline"),!yre.has(o.capabilities.family)&&o.capabilities.supports?.tool_calls&&(o.capabilities.limits?.max_prompt_tokens??!1)&&s.push("agent-panel"),n.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:s,id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0,degradationReason:WLe(o)})):o.capabilities.type==="completion"?n.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:["completion"],id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0,degradationReason:WLe(o)}):n.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:s,id:o.id,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1}},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0,degradationReason:WLe(o)})}}),t.get(Cm).getPolicyValue("autoModel.enabled")!==!1&&n.push({modelFamily:pO,modelName:U7e,modelPolicy:void 0,scopes:["inline","chat-panel","agent-panel"],id:pO,preview:!1,isChatDefault:!1,isChatFallback:!1,capabilities:{supports:{vision:!0}},billing:void 0,degradationReason:void 0}),n}a(BRa,"filterModels");var p0i=He(MRa,ORa);f();var LRa=S.Object({});async function FRa(t,e,r){let{models:n,xGithubRequestId:o}=await t.get(cl).getModelMetadataList();return[{models:n,xGithubRequestId:o},null]}a(FRa,"handleCopilotModelsGetModelMetadataListChecked");var h0i=He(LRa,FRa);f();var URa=S.Object({model:S.Optional(S.String()),status:S.Optional(S.String())});async function QRa(t,e,r){return r.model&&r.status==="enabled"?await t.get(cl).acceptModelPolicy(r.model)?["OK",null]:[null,{code:lt.InternalError,message:"Failed to accept model policy"}]:[null,{code:lt.InvalidRequest,message:"Invalid model or status"}]}a(QRa,"handleCopilotModelsPolicyChecked");var m0i=He(URa,QRa);f();f();f();f();function qRa(t,e){let r=e,n=t.lineAt(e.line);return n.isEmptyOrWhitespace||(r=n.range.end),r}a(qRa,"panelPositionForDocument");async function*g0i(t){for await(let e of t){let r={...e};r.completionText=r.completionText.trimEnd(),yield r}}a(g0i,"trimChoices");var a0e=class{constructor(e,r,n,o){this.textDocument=e;this.startPosition=r;this.cancellationToken=n;this.solutionCountTarget=o;this.targetPosition=qRa(this.textDocument,this.startPosition)}static{a(this,"SolutionManager")}get savedTelemetryData(){return this._savedTelemetryData}set savedTelemetryData(e){this._savedTelemetryData=e}};async function lAr(t,e){let r=await t;switch(r.status){case"Solution":await e.onSolution(r.solution),await lAr(r.next,e);break;case"FinishedNormally":await e.onFinishedNormally();break;case"FinishedWithError":await e.onFinishedWithError(r.error);break}}a(lAr,"reportSolutions");async function uAr(t,e){if(t.isCancellationRequested)return{status:"FinishedWithError",error:"Cancelled"};let r=await e.next();return r.done===!0?{status:"FinishedNormally"}:{status:"Solution",solution:r.value,next:uAr(t,e)}}a(uAr,"generateSolutionsStream");function Aft(t){return t.replace(/\s+/g,"")}a(Aft,"normalizeCompletionText");async function A0i(t,e,r,n,o,s){let c=e.targetPosition,l=e.textDocument,u=m6(t,l.uri),d=yr(),p=yt.createAndMarkAsIssued({headerRequestId:d,languageId:l.detectedLanguageId,source:r},{});e.savedTelemetryData=await t.get(jt).fetchTokenAndUpdateExPValuesAndAssignments({uri:l.uri,languageId:l.detectedLanguageId},p),o&&(e.savedTelemetryData=e.savedTelemetryData.extendedBy({engineName:o})),s&&(e.savedTelemetryData=e.savedTelemetryData.extendedBy({comparisonRequestId:s}));let h=await Kae(t,d,tz(l,c),e.savedTelemetryData);if(h.type==="copilotContentExclusion")return{status:"FinishedNormally"};if(h.type==="contextTooShort")return{status:"FinishedWithError",error:"Context too short"};if(h.type==="promptCancelled")return{status:"FinishedWithError",error:"Prompt cancelled"};if(h.type==="promptTimeout")return{status:"FinishedWithError",error:"Prompt timeout"};if(h.type==="promptError")return{status:"FinishedWithError",error:"Prompt error"};let m=h.prompt,g=h.trailingWs;return g.length>0&&(e.startPosition=vc.position(e.startPosition.line,e.startPosition.character-g.length)),e.savedTelemetryData=e.savedTelemetryData.extendedBy({},{...$Z(m),solutionCount:e.solutionCountTarget,promptEndPos:l.offsetAt(c)}),n.debug(t,"prompt:",m),at(t,"solution.requested",e.savedTelemetryData),{prompt:m,trailingWs:g,telemetryData:e.savedTelemetryData,repoInfo:u,ourRequestId:d}}a(A0i,"setupPromptAndTelemetry");function y0i(t,e,r,n,o,s){let c=t.get(Nx).forLanguage(t,e.detectedLanguageId,s),l=F1(e.detectedLanguageId),u=tKe(e,r),d={language:e.detectedLanguageId,next_indent:u.next??0,prompt_tokens:n.prefixTokens??0,suffix_tokens:n.suffixTokens??0},p={};c==="parsing"&&!l&&(p.stop=[` +`),o=[];for(let s of n){let c=t.parseLine(s);for(let l of c.filter(u=>u.type==="github.generated-pull-request-comment")){if(l.data.side!=="RIGHT")continue;let u=r.find(p=>p.path===l.data.path);if(!u)continue;let d=t.ghCommentToReviewComment(l,u);o.push(d)}}return o}};f();f();var Edt=require("path");var Efe=class t{constructor(e,r){this.ctx=e;this.workspaceFolders=r}static{a(this,"BaseReviewProvider")}static{this.DEFAULT_TIMEOUT=120*1e3}static{this.CODING_GUIDELINES_START_INDEX=2}static{this.CODE_REVIEW_ENDPOINT_SERVICE="api"}static{this.CODE_REVIEW_ENDPOINT_PATH="agents/github-code-review"}static{this.CODE_REVIEW_MODE_HEADER="X-Copilot-Code-Review-Mode"}static{this.CODE_REVIEW_MODE_VALUE="ide"}static{this.COPILOT_INTEGRATION_ID_HEADER="Copilot-Integration-Id"}static{this.GITHUB_CODING_GUIDELINE="github.coding_guideline"}static{this.CODING_GUIDELINE="coding-guideline"}static{this.UI_KIND="codeReview"}async fetchCodeReview(e,r){let n=await this.ctx.get(Nt).getToken(),o=I2(this.ctx,n,t.CODE_REVIEW_ENDPOINT_SERVICE,t.CODE_REVIEW_ENDPOINT_PATH),c=v1(this.ctx)[t.COPILOT_INTEGRATION_ID_HEADER];this.telemetryTracker.telemetrySent();let l=fc();return await PM(this.ctx,o,n.token,void 0,this.telemetryTracker.headerRequestId,e,r,{[t.CODE_REVIEW_MODE_HEADER]:t.CODE_REVIEW_MODE_VALUE,[t.COPILOT_INTEGRATION_ID_HEADER]:c},t.DEFAULT_TIMEOUT).then(d=>{let p=GM(d);this.telemetryTracker.telemetryData.extendWithRequestId(p);let h=fc()-l;return this.telemetryTracker.telemetryData.measurements.totalTimeMs=h,this.telemetryTracker.telemetryResponse(),d}).catch(d=>{if(Y0(d))throw d;let p=fc()-l;throw this.telemetryTracker.telemetryData.measurements.totalTimeMs=p,this.telemetryTracker.telemetryError(d),d})}getCodingGuidelineName(e){return(0,Edt.basename)(e,(0,Edt.extname)(e))}async buildCodingGuideline(e){return!this.workspaceFolders||this.workspaceFolders.length===0?[]:(await this.ctx.get(Ju).collectAllInstructions(this.ctx,this.workspaceFolders.map(o=>({uri:o.uri})),{includeCopilotInstructions:!0,includeCustomInstructionFiles:!0},e)).map((o,s)=>({type:"github.coding_guideline",id:(s+t.CODING_GUIDELINES_START_INDEX).toString(),data:{id:s+t.CODING_GUIDELINES_START_INDEX,type:"coding-guideline",name:o.description??this.getCodingGuidelineName(o.uri),description:o.content,filePatterns:o.applyTo?[o.applyTo]:[]}}))}};f();var _fe=class t{constructor(e,r={}){this.ctx=e;this.id=yr(),this.telemetryData=t.createTelemetryData(this.id).extendedBy(r)}static{a(this,"CopilotCodeReviewTelemetry")}static createTelemetryData(e){let r={headerRequestId:e};return Pt.createAndMarkAsIssued(r)}telemetrySent(){st(this.ctx,"request.sent",this.telemetryData)}telemetryResponse(){st(this.ctx,"request.response",this.telemetryData)}telemetryError(e){this.telemetryData.properties.message=String(u0(e,"name")??""),this.telemetryData.properties.code=String(u0(e,"code")??""),this.telemetryData.properties.errno=String(u0(e,"errno")??""),this.telemetryData.properties.type=String(u0(e,"type")??""),st(this.ctx,"request.error",this.telemetryData)}get headerRequestId(){return this.id}};var _dt=class t extends Efe{constructor(r,n,o){super(r,o);this.changes=n;this.name="ReviewChangesProvider";this.telemetryTracker=new _fe(r,{mode:"reviewChanges",uiKind:t.UI_KIND})}static{a(this,"ReviewChangesProvider")}async fetchCodeReview(r,n){return super.fetchCodeReview(r,n)}async changesToReference(){let r=this.ctx.get(Ac),n=[],o=await Promise.allSettled(this.changes.map(s=>r.evaluate(s.uri,s.headContent)));for(let s=0;s({path:s.path,content:s.headContent})),baseFileContents:n.map(s=>({path:s.path,content:s.baseContent}))}}}async buildCodingGuideline(){return super.buildCodingGuideline(this.changes.map(r=>r.uri))}async createReviewRequest(){return{messages:[{role:"user",copilot_references:[await this.changesToReference(),...await this.buildCodingGuideline()]}]}}};var APa=S.Object({uri:S.String(),path:S.String(),baseContent:S.String(),headContent:S.String()}),yPa=S.Object({changes:S.Array(APa),workspaceFolders:S.Optional(S.Array(dh))}),E2e;async function EPa(t,e,r){E2e&&(E2e.cancel(),E2e.dispose()),E2e=new Cn.CancellationTokenSource;let n=new SA([e,E2e.token]),o=new _dt(t,r.changes,r.workspaceFolders);if(!(await t.get(Nt).getToken()).isCopilotCodeReviewEnabled)return[null,{code:ct.InternalError,message:"GitHub Copilot Code Review is not enabled."}];let c=await o.createReviewRequest(),l=await o.fetchCodeReview(c,n),u=await l.text();if(!l.ok)return l.status===402?[null,{code:l.status,message:"You have reached your GitHub Copilot Code Review quota limit."}]:(Cr.error(t,`Code review request failed: ${l.status}. Response: ${u}`),[null,{code:ct.InternalError,message:"Failed to generate code review."}]);let d=r.changes.map(h=>({uri:h.uri,path:h.path,headContent:h.headContent,startLineOffset:0}));return[{comments:yfe.parseReviewResponse(u,d)},null]}a(EPa,"handleCopilotCodeReviewReviewChangesChecked");var npi=He(yPa,EPa);f();f();var Cdt=class t extends Efe{constructor(r,n){super(r,n);this.name="ReviewSnippetsProvider";this.telemetryTracker=new _fe(r,{mode:"reviewSnippets",uiKind:t.UI_KIND})}static{a(this,"ReviewSnippetsProvider")}static{this.SNIPPET_REVIEW_TYPE="snippet"}async fetchCodeReview(r,n){return super.fetchCodeReview(r,n)}async buildCodingGuideline(r){return super.buildCodingGuideline(r)}snippetsToReference(r){return{type:"github.pull_request",id:"1",data:{type:"pull-request",headFileContents:r.map(n=>({path:n.path,content:n.content})),baseFileContents:[]}}}static snippetsToSnippetFile(r){let n=r[0];return n?.startLine!==void 0&&n?.endLine!==void 0?{path:n.path,start_line:n.startLine,end_line:n.endLine}:void 0}async createReviewRequest(r){let n=this.ctx.get(Ac),o=await Promise.allSettled(r.map(u=>n.evaluate(u.uri,u.content))),s=[];for(let u=0;uu.uri),l=await this.buildCodingGuideline(c);return{messages:[{role:"user",review_type:t.SNIPPET_REVIEW_TYPE,copilot_references:[this.snippetsToReference(s),...l],snippet_file:t.snippetsToSnippetFile(s)}]}}};var _Pa=S.Object({uri:S.String(),path:S.String(),content:S.String(),startLine:S.Number(),endLine:S.Number()}),CPa=S.Object({snippets:S.Array(_Pa),workspaceFolders:S.Optional(S.Array(dh))}),_2e;async function vPa(t,e,r){_2e&&(_2e.cancel(),_2e.dispose()),_2e=new Cn.CancellationTokenSource;let n=new SA([e,_2e.token]),o=new Cdt(t,r.workspaceFolders);if(!(await t.get(Nt).getToken()).isCopilotCodeReviewEnabled)return[null,{code:ct.InternalError,message:"GitHub Copilot Code Review is not enabled."}];let c=await o.createReviewRequest(r.snippets),l=await o.fetchCodeReview(c,n);if(!l.ok)return l.status===402?[null,{code:l.status,message:"You have reached your GitHub Copilot Code Review quota limit."}]:[null,{code:ct.InternalError,message:"Failed to generate code review."}];let u=await l.text(),d=r.snippets.map(h=>({uri:h.uri,path:h.path,headContent:h.content,startLineOffset:h.startLine-1}));return[{comments:yfe.parseReviewResponse(u,d)},null]}a(vPa,"handleCopilotCodeReviewReviewSnippetsChecked");var ipi=He(CPa,vPa);f();f();var vdt=Symbol("onMCPToolsListChanged"),bdt=Symbol("onMCPResourcesListChanged"),Tdt=Symbol("onMCPPromptsListChanged"),opi=Symbol("onMCPResourceUpdated"),NQ=Symbol("onMCPCacheUpdated"),IA=class{static{a(this,"McpManager")}};var bPa=S.Object({}),TPa=S.Object({chatModeKind:S.Optional(S.Literal("Agent")),customChatModeId:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(dh)),servers:S.Array(S.Object({name:S.String(),tools:S.Array(S.Object({name:S.String(),status:S.Enum(QM)}))}))}),SPa=S.Object({serverName:S.String(),promptName:S.String(),arguments:S.Optional(S.Record(S.String(),S.String()))}),IPa=S.Object({serverName:S.String(),promptName:S.String(),argumentName:S.String(),prefix:S.String(),alreadyResolved:S.Optional(S.Record(S.String(),S.String()))}),xPa=S.Object({serverName:S.String(),uri:S.String()}),wPa=S.Object({serverName:S.String(),action:S.Union([S.Literal("start"),S.Literal("stop"),S.Literal("restart"),S.Literal("logout"),S.Literal("clearOAuth")])});function RPa(t,e,r){return[t.get(IA).getAllContents(),null]}a(RPa,"handleGetMCPContentsChecked");async function PPa(t,e,r){let{chatModeKind:n,customChatModeId:o,workspaceFolders:s}=r,c=await t.get(ry).getChatMode(n?u6(n):"Agent",o,s),l=r.servers.flatMap(({name:d,tools:p})=>p.map(({name:h,status:m})=>({serverName:d,toolName:h,status:m})));return await t.get(IA).updateMCPToolsStatus(c,l),[t.get(IA).getAllContents(c),null]}a(PPa,"handleUpdateMCPToolsStatusChecked");async function kPa(t,e,r){return[await t.get(IA).readResource(r.serverName,r.uri),null]}a(kPa,"handleReadResourceChecked");async function DPa(t,e,r){let{serverName:n,promptName:o,arguments:s={}}=r;return[await t.get(IA).getPrompt(n,o,s),null]}a(DPa,"handleGetPromptChecked");async function NPa(t,e,r){let{serverName:n,promptName:o,argumentName:s,prefix:c,alreadyResolved:l={}}=r;return[await t.get(IA).completePrompt(n,o,s,c,l),null]}a(NPa,"handleCompletePromptChecked");async function MPa(t,e,r){let n=t.get(IA),{serverName:o,action:s}=r;switch(s){case"start":await n.startMCPServer(o);break;case"stop":await n.stopMCPServer(o);break;case"restart":await n.restartMCPServer(o);break;case"logout":await n.logoutMCPServer(o);break;case"clearOAuth":await n.clearOAuthMCPServer(o);break}return[null,null]}a(MPa,"handleMCPServerActionChecked");var spi=He(bPa,RPa),api=He(TPa,PPa),cpi=He(xPa,kPa),lpi=He(SPa,DPa),upi=He(IPa,NPa),dpi=He(wPa,MPa);f();var OPa=S.Object({});async function BPa(t,e,r){let n=await t.get(Nt).getToken();return[FPa(t,await t.get(tl).getMetadata(),n),null]}a(BPa,"handleCopilotModelsChecked");function LPa(t){if(t.capabilities.type==="chat"){let e=["chat-panel","inline"];return!Nte.has(t.capabilities.family)&&t.capabilities.supports?.tool_calls&&(t.capabilities.limits?.max_prompt_tokens??0)>4e4&&e.push("agent-panel"),e}else if(t.capabilities.type==="completion")return["completion"];return[]}a(LPa,"getModelScopes");function FPa(t,e,r){let n=[];return e.forEach(o=>{o.model_picker_enabled===!0&&o.capabilities.family!==PVr&&n.push({modelFamily:o.capabilities.family,modelName:o.name,modelPolicy:o.policy,scopes:LPa(o),id:o.id,vendor:o.vendor,preview:o.preview??!1,isChatDefault:o.is_chat_default??!1,isChatFallback:o.is_chat_fallback??!1,capabilities:{supports:{vision:o.capabilities.supports?.vision??!1},limits:o.capabilities.limits?{maxContextWindowTokens:o.capabilities.limits.max_context_window_tokens,maxOutputTokens:o.capabilities.limits.max_output_tokens,maxInputTokens:o.capabilities.limits.max_prompt_tokens,maxNonStreamingOutputTokens:o.capabilities.limits.max_non_streaming_output_tokens}:void 0},billing:o.billing?{isPremium:o.billing?.is_premium??!0,multiplier:o.billing?.multiplier??0}:void 0,degradationReason:_6r(o),modelPickerCategory:o.model_picker_category})}),t.get(um).getPolicyValue("autoModel.enabled")!==!1&&n.push({modelFamily:YM,modelName:W9e,modelPolicy:void 0,scopes:["inline","chat-panel","agent-panel"],id:YM,preview:!1,isChatDefault:!1,isChatFallback:!1,capabilities:{supports:{vision:!0}},billing:void 0,degradationReason:void 0}),n}a(FPa,"filterModels");var fpi=He(OPa,BPa);f();var UPa=S.Object({});async function QPa(t,e,r){let{models:n,xGithubRequestId:o}=await t.get(tl).getModelMetadataList();return[{models:n,xGithubRequestId:o},null]}a(QPa,"handleCopilotModelsGetModelMetadataListChecked");var ppi=He(UPa,QPa);f();var qPa=S.Object({model:S.Optional(S.String()),status:S.Optional(S.String())});async function GPa(t,e,r){return r.model&&r.status==="enabled"?await t.get(tl).acceptModelPolicy(r.model)?["OK",null]:[null,{code:ct.InternalError,message:"Failed to accept model policy"}]:[null,{code:ct.InvalidRequest,message:"Invalid model or status"}]}a(GPa,"handleCopilotModelsPolicyChecked");var hpi=He(qPa,GPa);f();f();f();f();function HPa(t,e){let r=e,n=t.lineAt(e.line);return n.isEmptyOrWhitespace||(r=n.range.end),r}a(HPa,"panelPositionForDocument");async function*mpi(t){for await(let e of t){let r={...e};r.completionText=r.completionText.trimEnd(),yield r}}a(mpi,"trimChoices");var Cfe=class{constructor(e,r,n,o){this.textDocument=e;this.startPosition=r;this.cancellationToken=n;this.solutionCountTarget=o;this.targetPosition=HPa(this.textDocument,this.startPosition)}static{a(this,"SolutionManager")}get savedTelemetryData(){return this._savedTelemetryData}set savedTelemetryData(e){this._savedTelemetryData=e}};async function RAr(t,e){let r=await t;switch(r.status){case"Solution":await e.onSolution(r.solution),await RAr(r.next,e);break;case"FinishedNormally":await e.onFinishedNormally();break;case"FinishedWithError":await e.onFinishedWithError(r.error);break}}a(RAr,"reportSolutions");async function PAr(t,e){if(t.isCancellationRequested)return{status:"FinishedWithError",error:"Cancelled"};let r=await e.next();return r.done===!0?{status:"FinishedNormally"}:{status:"Solution",solution:r.value,next:PAr(t,e)}}a(PAr,"generateSolutionsStream");function Sdt(t){return t.replace(/\s+/g,"")}a(Sdt,"normalizeCompletionText");async function gpi(t,e,r,n,o,s){let c=e.targetPosition,l=e.textDocument,u=G8(t,l.uri),d=yr(),p=Pt.createAndMarkAsIssued({headerRequestId:d,languageId:l.detectedLanguageId,source:r},{});e.savedTelemetryData=await t.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments({uri:l.uri,languageId:l.detectedLanguageId},p),o&&(e.savedTelemetryData=e.savedTelemetryData.extendedBy({engineName:o})),s&&(e.savedTelemetryData=e.savedTelemetryData.extendedBy({comparisonRequestId:s}));let h=await uae(t,d,cW(l,c),e.savedTelemetryData);if(h.type==="copilotContentExclusion")return{status:"FinishedNormally"};if(h.type==="contextTooShort")return{status:"FinishedWithError",error:"Context too short"};if(h.type==="promptCancelled")return{status:"FinishedWithError",error:"Prompt cancelled"};if(h.type==="promptTimeout")return{status:"FinishedWithError",error:"Prompt timeout"};if(h.type==="promptError")return{status:"FinishedWithError",error:"Prompt error"};let m=h.prompt,g=h.trailingWs;return g.length>0&&(e.startPosition=gc.position(e.startPosition.line,e.startPosition.character-g.length)),e.savedTelemetryData=e.savedTelemetryData.extendedBy({},{...XX(m),solutionCount:e.solutionCountTarget,promptEndPos:l.offsetAt(c)}),n.debug(t,"prompt:",m),st(t,"solution.requested",e.savedTelemetryData),{prompt:m,trailingWs:g,telemetryData:e.savedTelemetryData,repoInfo:u,ourRequestId:d}}a(gpi,"setupPromptAndTelemetry");function Api(t,e,r,n,o,s){let c=t.get(Cx).forLanguage(t,e.detectedLanguageId,s),l=S1(e.detectedLanguageId),u=lYe(e,r),d={language:e.detectedLanguageId,next_indent:u.next??0,prompt_tokens:n.prefixTokens??0,suffix_tokens:n.suffixTokens??0},p={};c==="parsing"&&!l&&(p.stop=[` `,`\r \r -`]);let h=h6(t,s),m;switch(c){case"server":m=a(()=>{},"finishedCb"),d.force_indent=u.prev??-1,d.trim_by_indentation=!0;break;case"parsingandserver":m=l?Ybe(t,e,o.startPosition):()=>{},d.force_indent=u.prev??-1,d.trim_by_indentation=!0;break;case"parsing":default:m=l?Ybe(t,e,o.startPosition):()=>{};break}return{extra:d,postOptions:p,finishedCb:m,engineInfo:h}}a(y0i,"setupCompletionParams");var dAr=new Se("solutions");async function GRa(t,e){let r=e.targetPosition,n=e.textDocument,o=await A0i(t,e,"open copilot",dAr);if("status"in o)return o;let{prompt:s,trailingWs:c,telemetryData:l,repoInfo:u,ourRequestId:d}=o,{extra:p,postOptions:h,finishedCb:m,engineInfo:g}=y0i(t,n,r,s,e,l),A=e.cancellationToken,y={prompt:s,languageId:n.detectedLanguageId,repoInfo:u,ourRequestId:d,engineModelId:g.modelId,count:e.solutionCountTarget,uiKind:"synthesize",postOptions:h,headers:g.headers,extra:p},E=await t.get(ok).fetchAndStreamCompletions(t,y,l.extendedBy(),m,A);if(E.type==="failed"||E.type==="canceled")return{status:"FinishedWithError",error:`${E.type}: ${E.reason}`};let _=E.choices;_=g0i(_),_=DEe(_,I=>yTe(t,n,r,I,!1,dAr));let v=DEe(_,async I=>{let x=I.completionText;dAr.info(t,`Open Copilot completion: [${I.completionText}]`);let R=await Hvn(t,n,r,I.completionText)??vc.position(r.line,0),[w]=C7(n.getText(vc.range(R,r)));x=w+x;let P=I.completionText;c.length>0&&P.startsWith(c)&&(P=P.substring(c.length));let k=I.meanLogProb,Q=k!==void 0?Math.exp(k):0,M=l.extendedBy({choiceIndex:I.choiceIndex.toString()});return{completionText:P,insertText:x,range:vc.range(R,r),meanProb:Q,meanLogProb:k||0,requestId:I.requestId,choiceIndex:I.choiceIndex,telemetryData:M,copilotAnnotations:I.copilotAnnotations}});return uAr(A,v[Symbol.asyncIterator]())}a(GRa,"launchSolutions");async function yft(t,e,r){return t.get(Xs).withProgress(async()=>{let o=GRa(t,e);return await lAr(o,r)})}a(yft,"runSolutions");var C0i=de(x5()),SPe=de(Su());f();f();function Eft(t,e){let r=t.split(` -`),n=e,o=e,s=r[e.line],c=s.indexOf("%");c!==-1&&(s=s.substring(0,c)+s.substring(c+1),n={line:e.line,character:c});let l=s.indexOf("^");if(l!==-1){let u=s.indexOf("^",l+1);if(u===-1)throw new Error("Challenge document must contain zero or two ^ characters.");s=s.substring(0,l)+s.substring(l+1,u)+s.substring(u+1),n={line:e.line,character:e.character},o={line:e.line,character:e.character+u-l-1}}return{cursorLine:s,lines:r,start:n,end:o}}a(Eft,"parseChallengeDoc");var HRa=S.Object({text:S.String(),score:S.Number()}),jRa=S.Object({documents:S.Array(HRa),options:S.Optional(S.Object({}))});async function Cft(t,e,r){let n=yr();for(let o=0;oh+m.length+1,0)+d.character,await r.onSolution({requestId:{headerRequestId:n,serverExperiments:"",deploymentId:""},completionText:p,insertText:p,range:{start:t,end:t},meanProb:c,meanLogProb:-1,choiceIndex:o,telemetryData:Gb.createEmptyConfigForTesting()})}await r.onFinishedNormally()}a(Cft,"runTestSolutions");var C2=class{constructor(e){this.documents=e}static{a(this,"ExternalTestingPanelCompletionDocuments")}};function $Ra(t,e,r){return t.forceSet(C2,new C2(r.documents)),["OK",null]}a($Ra,"handleTestingSetPanelCompletionDocumentsChecked");var E0i=He(jRa,$Ra);var _0i=$7e.type;function VRa(t,e,r,n,o){let s=Aft(n.completionText),c=(0,C0i.SHA256)(s).toString();return t.get(Cl).set(c,{displayText:n.completionText,insertText:n.insertText,offset:r,uuid:c,range:n.range,uri:e.textDocument.uri,telemetry:n.telemetryData.extendedBy({},{rank:o-1}),index:n.choiceIndex,position:e.position,resultType:0,triggerCategory:"solution",copilotAnnotations:n.copilotAnnotations,clientCompletionId:c}),{range:n.range,insertText:n.insertText,command:{command:Dgr,title:`Accept completion ${o}`,arguments:[c]}}}a(VRa,"makeCompletion");function pAr(t,e){return`${t}/${e}`}a(pAr,"progressMessage");var fAr=class{constructor(e,r,n){this.ctx=e;this.params=r;this.onCompletion=n;this.offset=0;this.count=0;this.items=new Map}static{a(this,"SolutionHandler")}get service(){return this.ctx.get(Ar)}async onSolution(e){this.count+=1;let r=VRa(this.ctx,this.params,this.offset,e,this.items.size+1);this.items.has(r.command.arguments[0])||(this.items.set(r.command.arguments[0],r),await this.onCompletion(r)),this.params.workDoneToken!==void 0&&await this.service.connection.sendProgress(SPe.WorkDoneProgress.type,this.params.workDoneToken,{kind:"report",message:pAr(this.count,10),percentage:Math.round(100*this.count/10)})}onFinishedNormally(){return WRa(this.params.workDoneToken,this.service,this.count)}async onFinishedWithError(e){if(this.error=e,this.params.workDoneToken!==void 0)return this.service.connection.sendProgress(SPe.WorkDoneProgress.type,this.params.workDoneToken,{kind:"end",message:`Error: ${e}`})}};async function WRa(t,e,r=0){t!==void 0&&await e.connection.sendProgress(SPe.WorkDoneProgress.type,t,{kind:"end",message:pAr(r,10)})}a(WRa,"reportDone");var TPe;async function zRa(t,e,r){let n=await U3(t,r.textDocument,e),o=r.position;r.workDoneToken!==void 0&&await t.get(Ar).connection.sendProgress(SPe.WorkDoneProgress.type,r.workDoneToken,{kind:"begin",title:"GitHub Copilot Completions Panel",cancellable:!0,message:pAr(0,10),percentage:0});let s=[],c=a(p=>(s.push(p),Promise.resolve()),"onCompletion"),l=r.partialResultToken;l!==void 0&&(c=a(async p=>{await t.get(Ar).connection.sendProgress($7e.partialResult,l,{items:[p]})},"onCompletion"));let u=new fAr(t,r,c),d=t.get(C2);if(d.documents){let p=d.documents;await Cft(o,p,u)}else{u.offset=n.offsetAt(o);let p=new a0e(n,o,e,10);await yft(t,p,u)}return u.error!==void 0?[null,{code:lt.InternalError,message:u.error}]:[{items:s},null]}a(zRa,"handleChecked");async function YRa(t,e,r){TPe&&(TPe.cancel(),TPe.dispose()),TPe=new _n.CancellationTokenSource;let n=TPe.token,o=new DA([e,n]);try{return await zRa(t,o,r)}catch(s){if(n.isCancellationRequested&&!e.isCancellationRequested)return[null,{code:lt.ServerCancelled,message:"Request was superseded by a new request"}];throw s}}a(YRa,"handleCheckedWithAbort");var v0i=He(tVr,YRa);f();f();f();function JRa(t,e,r){let{apiUrl:n,serverUrl:o}=r||t.get(jp).getConfiguredUrls(),s=new URL("login/device",o).href,c=new URL("_ping",e.proxy).href,l=new URL("_ping",e.api).href,u=new URL("_ping",e.telemetry).href;function d(p){return new URL(p).host}return a(d,"label"),[{label:d(s),url:s},{label:d(n),url:n,session:r},{label:d(c),url:c},{label:d(l),url:l,session:r},{label:d(u),url:u}]}a(JRa,"urlsToCheck");async function b0i(t,e,r=zX(t),n,o){let s=JRa(t,r,n).map(async({label:c,url:l,session:u})=>{let{message:d,status:p}=await XRa(e,l,u,o);return{label:c,url:l,message:d,status:p}});return await Promise.all(s)}a(b0i,"checkReachability");async function XRa(t,e,r,n){try{let o=new AbortController;n?.onCancellationRequested(()=>o.abort());let s=await t.fetch(e,{headers:r?{Authorization:`Bearer ${r.accessToken}`}:{},signal:o.signal}),c=s.status>=200&&s.status<400?"reachable":"unreachable";return{message:`HTTP ${s.status}`+(s.statusText?` - ${s.statusText}`:""),status:c}}catch(o){return{message:String(o),status:"unreachable"}}}a(XRa,"determineReachability");var Sb=de(require("os")),c0e=de(require("tls"));async function S0i(t,e){let r=await t.get(dr).getImplementation(),n=await t.get(Ot).getGitHubSession(),o=await t.get(Ot).getToken().catch(()=>{});return{sections:[e2a(t),ZRa(t,n),t2a(t,r),await r2a(t,r,o?.endpoints,n,e)]}}a(S0i,"collectDiagnostics");function I0i(t){return t.sections.map(n2a).join(Sb.EOL+Sb.EOL)+Sb.EOL}a(I0i,"formatDiagnosticsAsMarkdown");function ZRa(t,e){let r=e&&new URL(e.serverUrl).host,n;return e?r==="github.com"?n=e.login:n=`${e.login} (${r})`:n="not signed in",{name:"Copilot",items:{Version:Z_(t),"GitHub Account":n,"Session ID":t.get(Ks).sessionId,"Send Restricted Telemetry":VZ(t)?"enabled":"disabled","Content Exclusion":t.get(bc).enabled?"enabled":"unavailable"}}}a(ZRa,"collectCopilotSection");function e2a(t){let e={Plugin:o2a(t),Editor:i2a(t),"Operating System":`${Sb.type()} ${Sb.release()} (${Sb.arch()})`};return f5(e,"NODE_OPTIONS"),{name:"Environment",items:e}}a(e2a,"collectEnvironmentSection");function t2a(t,e){let r=t.get(Qc).getHttpSettings(),n={Proxy:r.proxy||void 0,"Proxy Authorization":r.proxyAuthorization?"present":void 0,"Proxy Kerberos SPN":r.proxyKerberosServicePrincipal,"Proxy Strict SSL":r.proxyStrictSSL===!1?"disabled":"enabled","No Proxy":r.noProxy?.join(",")||void 0,Fetcher:e.name.replace(/Fetcher$/,""),"Number of Root Certificates":c0e.rootCertificates.length,"TLS Default Min Version":c0e.DEFAULT_MIN_VERSION,"TLS Default Max Version":c0e.DEFAULT_MAX_VERSION};return f5(n,"http_proxy"),f5(n,"https_proxy"),f5(n,"no_proxy"),f5(n,"SSL_CERT_FILE"),f5(n,"SSL_CERT_DIR"),f5(n,"OPENSSL_CONF"),f5(n,"NODE_EXTRA_CA_CERTS"),f5(n,"NODE_TLS_REJECT_UNAUTHORIZED"),{name:"Network Configuration",items:n}}a(t2a,"collectNetworkConfigSection");async function r2a(t,e,r,n,o){return{name:"Reachability",items:Object.fromEntries((await b0i(t,e,r,n,o)).map(({label:c,message:l})=>[c,l]))}}a(r2a,"collectReachabilitySection");function T0i(t){return t.includes("`")?`\`\` ${t} \`\``:`\`${t}\``}a(T0i,"quoteCode");function f5(t,e){let r=process.env[e];r&&(t[T0i(e)]=T0i(r)),r!==process.env[e.toUpperCase()]&&f5(t,e.toUpperCase())}a(f5,"addEnvironmentVariable");function n2a(t){return`## ${t.name}`+Sb.EOL+Sb.EOL+Object.keys(t.items).filter(e=>e!=="name").map(e=>`- ${e}: ${t.items[e]??"N/A"}`).join(Sb.EOL)}a(n2a,"formatSectionAsMarkdown");function i2a(t){let e=t.get(Nr).getEditorInfo();return`${e.readableName||e.name} ${e.version}`}a(i2a,"getEditorDisplayVersion");function o2a(t){let e=t.get(Nr).getEditorPluginInfo();return`${e.readableName||e.name} ${e.version}`}a(o2a,"getPluginDisplayVersion");var s2a=S.Object({});async function a2a(t,e){return[{report:I0i(await S0i(t,e))},null]}a(a2a,"handleDiagnosticsChecked");var x0i=He(s2a,a2a);f();var D0i=de(Su());f();var w0i=require("crypto");var l0e=class{static{a(this,"LspClientContextProvider")}constructor(e,r,n){this.id=r,this.selector=n,this.resolver=new mAr(e,this.id)}},mAr=class{constructor(e,r){this.ctx=e;this.id=r;this.contextItems=[];this.update=!1}static{a(this,"LspClientContextResolver")}async resolve(e,r){let n=[];if(this.contextItems.length>0)n=this.contextItems;else if(this.update){let o=this.ctx.get(Ar),s=(0,w0i.randomUUID)(),c=o.connection.onProgress(H7e.type,s,l=>{n.push(...l)});r.onCancellationRequested(()=>{c?.dispose()});try{let l=await o.connection.sendRequest(H7e.type,{providerId:this.id,data:this.data,textDocument:{uri:e.documentContext.uri,languageId:e.documentContext.languageId,version:e.documentContext.version},position:e.documentContext.position,partialResultToken:s},r);n.push(...l)}finally{c?.dispose()}}return this.reset(),Promise.resolve(n)}setContextItems(e){this.contextItems=e}clearContextItems(){this.contextItems=[]}setUpdate(e){this.update=e}clearData(){this.data=void 0}reset(){this.clearContextItems(),this.clearData(),this.setUpdate(!1)}};function _ft(t,e,r){try{let n=t.get(k0),o=new Map;n.providers.forEach(s=>{o.set(s.id,s)}),e.providers.forEach(s=>{let c=o.get(s.id);c&&c instanceof l0e&&c.resolver.setContextItems(s.contextItems)}),e.updating&&e.updating.length>0&&e.updating.forEach(s=>{let c=o.get(s);c&&c instanceof l0e&&(c.resolver.setUpdate(!0),c.resolver.data=r)})}catch(n){_r.error(t,"Failed to set context items on context providers",n)}}a(_ft,"setContextItems");var hAr={nocase:!0,matchBase:!0,nonegate:!0,dot:!0};function R0i(t,e,r){return e.map(o=>{try{if(typeof o=="string")return id(r.uri,o,hAr);if(typeof o=="object"){let s=!0;return"language"in o&&(s&&=r.languageId==(o.language||"")),"scheme"in o&&(s&&=id(r.uri,o.scheme||"",hAr)),"pattern"in o&&(s&&=id(r.uri,o.pattern||"",hAr)),s}}catch{return!1}return!1}).some(Boolean)?10:0}a(R0i,"match");f();var c2a=S.Object({documents:S.Array(S.String()),basename:S.Optional(S.String()),options:S.Optional(S.Object({}))}),cq=class{constructor(e,r){this.documents=e;this.basename=r}static{a(this,"ExternalTestingCompletionDocuments")}};function l2a(t,e,r){return t.forceSet(cq,new cq(r.documents,r.basename||"")),["OK",null]}a(l2a,"handleTestingSetCompletionDocumentsChecked");var P0i=new Se("setCompletionDocuments"),N0i=He(c2a,l2a);function vft(t,e,r,n){let o=t.get(cq);if(o.documents){let s=n?3:1;if(r&&o.basename&&o.basename.trim().length>0){P0i.debug(t,`Returning filtered completions by basename ${o.basename}`);let c=u2a(o,r);return c&&c.length>0?k0i(c,s,e):void 0}else return P0i.debug(t,"Returning completions for all pre-set documents"),k0i(o.documents,s,e)}}a(vft,"getTestCompletions");function k0i(t,e,r){return t.slice(0,e).map(n=>{let{cursorLine:o,lines:s,start:c,end:l}=Eft(n,r);return{insertText:[o.slice(Math.min(c.character,r.character))].concat(s.slice(r.line+1)).join(` -`),range:{start:c,end:l}}})}a(k0i,"sliceAndMapCompletions");function u2a(t,e){return t.basename===ei(e)?t.documents||[]:[]}a(u2a,"getFilteredDocs");var M0i=S.Object({doc:S.Object({position:Ah,insertSpaces:S.Optional(S.Boolean()),tabSize:S.Optional(S.Number()),uri:ZEe,version:S.Number()}),contextItems:S.Optional(DHt)}),IPe;async function O0i(t,e,r,n){IPe&&(IPe.cancel(),IPe.dispose()),IPe=new _n.CancellationTokenSource;let o=new DA([e,IPe.token]);r.contextItems&&_ft(t,r.contextItems);let s=vft(t,r.doc.position,r.doc.uri,n);if(s)return[{completions:s.map(m=>({uuid:yr(),text:m.insertText,displayText:m.insertText,position:r.doc.position,range:m.range,docVersion:r.doc.version}))},null];let c;try{c=await U3(t,r.doc,o)}catch(h){if(!(h instanceof D0i.ResponseError))throw h;switch(h.code){case lt.CopilotNotAvailable:case lt.ContentModified:return[{completions:[]},null]}throw h}let l=r.doc.position,u=await t.get(Gm).getCompletions(c,l,o,{isCycling:n,formattingOptions:r.doc});if(!u)return[{completions:[]},null];let d=t.get(Cl);for(let h of u)d.set(h.uuid,{...h,triggerCategory:"ghostText"});return[{completions:u.map(h=>({uuid:h.uuid,text:h.insertText,range:h.range,displayText:h.displayText,position:h.position,docVersion:c.version}))},null]}a(O0i,"handleGetCompletionsHelper");var B0i=He(M0i,(t,e,r)=>O0i(t,e,r,!1)),L0i=He(M0i,(t,e,r)=>O0i(t,e,r,!0));f();var d2a=S.Object({});function f2a(t,e,r){return[{defaultRules:t.get(KT).getDefaultRules()},null]}a(f2a,"handleGetDefaultFileSafetyRulesChecked");var F0i=He(d2a,f2a);f();var U0i=de(x5()),u0e=de(Su());var p2a=S.Object({doc:S.Object({position:Ah,uri:ZEe,version:S.Number()}),panelId:S.String()});function h2a(t,e,r,n,o){let s=Aft(o.completionText),c=(0,U0i.SHA256)(s).toString();return t.get(Cl).set(c,{displayText:o.insertText,insertText:o.completionText,offset:n,uuid:c,range:r,uri:e.doc.uri,telemetry:o.telemetryData,index:o.choiceIndex,position:r.end,resultType:0,triggerCategory:"solution",copilotAnnotations:o.copilotAnnotations,clientCompletionId:c}),{panelId:e.panelId,range:r,completionText:o.completionText,displayText:o.insertText,score:o.meanProb,solutionId:c}}a(h2a,"makeSolution");var gAr=class{constructor(e,r,n){this.ctx=e;this.params=r;this.range=n;this.offset=0}static{a(this,"SolutionHandler")}get service(){return this.ctx.get(Ar)}onSolution(e){return this.service.connection.sendNotification(new u0e.NotificationType("PanelSolution"),h2a(this.ctx,this.params,this.range,this.offset,e))}onFinishedNormally(){return Q0i(this.params.panelId,this.service)}onFinishedWithError(e){return this.service.connection.sendNotification(new u0e.NotificationType("PanelSolutionsDone"),{status:"Error",message:e,panelId:this.params.panelId})}};async function Q0i(t,e){return e.connection.sendNotification(new u0e.NotificationType("PanelSolutionsDone"),{status:"OK",panelId:t})}a(Q0i,"reportDone");var xPe;async function m2a(t,e,r){xPe&&(xPe.cancel(),xPe.dispose()),xPe=new _n.CancellationTokenSource;let n=new DA([e,xPe.token]),o=r.doc.position,s=vc.range(o,o),c=new gAr(t,r,s),l=t.get(C2);if(l.documents){let u=l.documents;Cft(o,u,c)}else{let u;try{u=await U3(t,r.doc,n)}catch(p){if(!(p instanceof u0e.ResponseError))throw p;switch(p.code){case lt.CopilotNotAvailable:case lt.ContentModified:return g2a(t,r)}throw p}c.offset=u.offsetAt(o);let d=new a0e(u,o,n,10);yft(t,d,c)}return[{solutionCountTarget:10},null]}a(m2a,"handleGetPanelCompletionsChecked");async function g2a(t,e){return await Q0i(e.panelId,t.get(Ar)),[{solutionCountTarget:0},null]}a(g2a,"produceEmptySolutions");var q0i=He(p2a,m2a);f();var A2a=S.Object({});async function y2a(t,e,r){let o=(await t.get(Ot).getToken()).userInfo,s=o.raw,l=(await t.get(en).getSession())?.login;return!s||!l?[null,null]:[{userName:l,copilotPlan:o.copilotPlan,rawUserInfo:s},null]}a(y2a,"handleGetUserInfoChecked");var G0i=He(A2a,y2a);f();var E2a=S.Object({});function C2a(t,e,r){return[{version:t.get(Ko).getDisplayVersion(),buildType:kL(t),runtimeVersion:`node/${process.versions.node}`},null]}a(C2a,"handleGetVersionChecked");var H0i=He(E2a,C2a);f();f();var oX=class{constructor(){this.lastChanges=[];this.attemptCount=0;this.DEFAULT_TEMPERATURE=.1}static{a(this,"GitCommitGenerateService")}buildSystemMessage(e,r){let n=["You are an AI programming assistant, helping a software developer to come up with the best git commit message for their code changes.","You excel in interpreting the purpose behind code changes to craft succinct, clear commit messages that adhere to the repository's guidelines.","","# First, think step-by-step:","1. Analyze the CODE CHANGES thoroughly to understand what's been modified.","2. Identify the purpose of the changes to answer the *why* for the commit messages, also considering the optionally provided RECENT USER COMMITS.","3. Review the provided RECENT REPOSITORY COMMITS to identify established commit message conventions. Focus on the format and style, ignoring commit-specific details like refs, tags, and authors.","4. Generate a thoughtful and succinct commit message for the given CODE CHANGES. It MUST follow the established writing conventions.","5. Remove any meta information like issue references, tags, or author names from the commit message. The developer will add them.","6. Now only show your message, wrapped with a single markdown ```text codeblock! Do not provide any explanations or details"];return r&&n.push(` +`]);let h=q8(t,s),m;switch(c){case"server":m=a(()=>{},"finishedCb"),d.force_indent=u.prev??-1,d.trim_by_indentation=!0;break;case"parsingandserver":m=l?Vve(t,e,o.startPosition):()=>{},d.force_indent=u.prev??-1,d.trim_by_indentation=!0;break;case"parsing":default:m=l?Vve(t,e,o.startPosition):()=>{};break}return{extra:d,postOptions:p,finishedCb:m,engineInfo:h}}a(Api,"setupCompletionParams");var kAr=new Se("solutions");async function jPa(t,e){let r=e.targetPosition,n=e.textDocument,o=await gpi(t,e,"open copilot",kAr);if("status"in o)return o;let{prompt:s,trailingWs:c,telemetryData:l,repoInfo:u,ourRequestId:d}=o,{extra:p,postOptions:h,finishedCb:m,engineInfo:g}=Api(t,n,r,s,e,l),A=e.cancellationToken,y={prompt:s,languageId:n.detectedLanguageId,repoInfo:u,ourRequestId:d,engineModelId:g.modelId,count:e.solutionCountTarget,uiKind:"synthesize",postOptions:h,headers:g.headers,extra:p},E=await t.get(WP).fetchAndStreamCompletions(t,y,l.extendedBy(),m,A);if(E.type==="failed"||E.type==="canceled")return{status:"FinishedWithError",error:`${E.type}: ${E.reason}`};let _=E.choices;_=mpi(_),_=kye(_,I=>mbe(t,n,r,I,!1,kAr));let v=kye(_,async I=>{let x=I.completionText;kAr.info(t,`Open Copilot completion: [${I.completionText}]`);let w=await Gbn(t,n,r,I.completionText)??gc.position(r.line,0),[R]=W9(n.getText(gc.range(w,r)));x=R+x;let P=I.completionText;c.length>0&&P.startsWith(c)&&(P=P.substring(c.length));let k=I.meanLogProb,Q=k!==void 0?Math.exp(k):0,M=l.extendedBy({choiceIndex:I.choiceIndex.toString()});return{completionText:P,insertText:x,range:gc.range(w,r),meanProb:Q,meanLogProb:k||0,requestId:I.requestId,choiceIndex:I.choiceIndex,telemetryData:M,copilotAnnotations:I.copilotAnnotations}});return PAr(A,v[Symbol.asyncIterator]())}a(jPa,"launchSolutions");async function Idt(t,e,r){return t.get(Bs).withProgress(async()=>{let o=jPa(t,e);return await RAr(o,r)})}a(Idt,"runSolutions");var Epi=de(mN()),v2e=de(mu());f();f();function xdt(t,e){let r=t.split(` +`),n=e,o=e,s=r[e.line],c=s.indexOf("%");c!==-1&&(s=s.substring(0,c)+s.substring(c+1),n={line:e.line,character:c});let l=s.indexOf("^");if(l!==-1){let u=s.indexOf("^",l+1);if(u===-1)throw new Error("Challenge document must contain zero or two ^ characters.");s=s.substring(0,l)+s.substring(l+1,u)+s.substring(u+1),n={line:e.line,character:e.character},o={line:e.line,character:e.character+u-l-1}}return{cursorLine:s,lines:r,start:n,end:o}}a(xdt,"parseChallengeDoc");var $Pa=S.Object({text:S.String(),score:S.Number()}),VPa=S.Object({documents:S.Array($Pa),options:S.Optional(S.Object({}))});async function wdt(t,e,r){let n=yr();for(let o=0;oh+m.length+1,0)+d.character,await r.onSolution({requestId:{headerRequestId:n,serverExperiments:"",deploymentId:""},completionText:p,insertText:p,range:{start:t,end:t},meanProb:c,meanLogProb:-1,choiceIndex:o,telemetryData:Rb.createEmptyConfigForTesting()})}await r.onFinishedNormally()}a(wdt,"runTestSolutions");var l2=class{constructor(e){this.documents=e}static{a(this,"ExternalTestingPanelCompletionDocuments")}};function WPa(t,e,r){return t.forceSet(l2,new l2(r.documents)),["OK",null]}a(WPa,"handleTestingSetPanelCompletionDocumentsChecked");var ypi=He(VPa,WPa);var _pi=Z9e.type;function zPa(t,e,r,n,o){let s=Sdt(n.completionText),c=(0,Epi.SHA256)(s).toString();return t.get(pl).set(c,{displayText:n.completionText,insertText:n.insertText,offset:r,uuid:c,range:n.range,uri:e.textDocument.uri,telemetry:n.telemetryData.extendedBy({},{rank:o-1}),index:n.choiceIndex,position:e.position,resultType:0,triggerCategory:"solution",copilotAnnotations:n.copilotAnnotations,clientCompletionId:c}),{range:n.range,insertText:n.insertText,command:{command:Zgr,title:`Accept completion ${o}`,arguments:[c]}}}a(zPa,"makeCompletion");function NAr(t,e){return`${t}/${e}`}a(NAr,"progressMessage");var DAr=class{constructor(e,r,n){this.ctx=e;this.params=r;this.onCompletion=n;this.offset=0;this.count=0;this.items=new Map}static{a(this,"SolutionHandler")}get service(){return this.ctx.get(Ar)}async onSolution(e){this.count+=1;let r=zPa(this.ctx,this.params,this.offset,e,this.items.size+1);this.items.has(r.command.arguments[0])||(this.items.set(r.command.arguments[0],r),await this.onCompletion(r)),this.params.workDoneToken!==void 0&&await this.service.connection.sendProgress(v2e.WorkDoneProgress.type,this.params.workDoneToken,{kind:"report",message:NAr(this.count,10),percentage:Math.round(100*this.count/10)})}onFinishedNormally(){return YPa(this.params.workDoneToken,this.service,this.count)}async onFinishedWithError(e){if(this.error=e,this.params.workDoneToken!==void 0)return this.service.connection.sendProgress(v2e.WorkDoneProgress.type,this.params.workDoneToken,{kind:"end",message:`Error: ${e}`})}};async function YPa(t,e,r=0){t!==void 0&&await e.connection.sendProgress(v2e.WorkDoneProgress.type,t,{kind:"end",message:NAr(r,10)})}a(YPa,"reportDone");var C2e;async function KPa(t,e,r){let n=await C3(t,r.textDocument,e),o=r.position;r.workDoneToken!==void 0&&await t.get(Ar).connection.sendProgress(v2e.WorkDoneProgress.type,r.workDoneToken,{kind:"begin",title:"GitHub Copilot Completions Panel",cancellable:!0,message:NAr(0,10),percentage:0});let s=[],c=a(p=>(s.push(p),Promise.resolve()),"onCompletion"),l=r.partialResultToken;l!==void 0&&(c=a(async p=>{await t.get(Ar).connection.sendProgress(Z9e.partialResult,l,{items:[p]})},"onCompletion"));let u=new DAr(t,r,c),d=t.get(l2);if(d.documents){let p=d.documents;await wdt(o,p,u)}else{u.offset=n.offsetAt(o);let p=new Cfe(n,o,e,10);await Idt(t,p,u)}return u.error!==void 0?[null,{code:ct.InternalError,message:u.error}]:[{items:s},null]}a(KPa,"handleChecked");async function JPa(t,e,r){C2e&&(C2e.cancel(),C2e.dispose()),C2e=new Cn.CancellationTokenSource;let n=C2e.token,o=new SA([e,n]);try{return await KPa(t,o,r)}catch(s){if(n.isCancellationRequested&&!e.isCancellationRequested)return[null,{code:ct.ServerCancelled,message:"Request was superseded by a new request"}];throw s}}a(JPa,"handleCheckedWithAbort");var Cpi=He(eWr,JPa);f();f();f();function ZPa(t,e,r){let{apiUrl:n,serverUrl:o}=r||t.get(Fp).getConfiguredUrls(),s=new URL("login/device",o).href,c=new URL("_ping",e.proxy).href,l=new URL("_ping",e.api).href,u=new URL("_ping",e.telemetry).href;function d(p){return new URL(p).host}return a(d,"label"),[{label:d(s),url:s},{label:d(n),url:n,session:r},{label:d(c),url:c},{label:d(l),url:l,session:r},{label:d(u),url:u}]}a(ZPa,"urlsToCheck");async function vpi(t,e,r=tX(t),n,o){let s=ZPa(t,r,n).map(async({label:c,url:l,session:u})=>{let{message:d,status:p}=await eka(e,l,u,o);return{label:c,url:l,message:d,status:p}});return await Promise.all(s)}a(vpi,"checkReachability");async function eka(t,e,r,n){try{let o=new AbortController;n?.onCancellationRequested(()=>o.abort());let s=await t.fetch(e,{headers:r?{Authorization:`Bearer ${r.accessToken}`}:{},signal:o.signal}),c=s.status>=200&&s.status<400?"reachable":"unreachable";return{message:`HTTP ${s.status}`+(s.statusText?` - ${s.statusText}`:""),status:c}}catch(o){return{message:String(o),status:"unreachable"}}}a(eka,"determineReachability");var fb=de(require("os")),vfe=de(require("tls"));async function Tpi(t,e){let r=await t.get(dr).getImplementation(),n=await t.get(Nt).getGitHubSession(),o=await t.get(Nt).getToken().catch(()=>{});return{sections:[rka(t),tka(t,n),nka(t,r),await ika(t,r,o?.endpoints,n,e)]}}a(Tpi,"collectDiagnostics");function Spi(t){return t.sections.map(oka).join(fb.EOL+fb.EOL)+fb.EOL}a(Spi,"formatDiagnosticsAsMarkdown");function tka(t,e){let r=e&&new URL(e.serverUrl).host,n;return e?r==="github.com"?n=e.login:n=`${e.login} (${r})`:n="not signed in",{name:"Copilot",items:{Version:qC(t),"GitHub Account":n,"Session ID":t.get(Vs).sessionId,"Send Restricted Telemetry":ZX(t)?"enabled":"disabled","Content Exclusion":t.get(Ac).enabled?"enabled":"unavailable"}}}a(tka,"collectCopilotSection");function rka(t){let e={Plugin:aka(t),Editor:ska(t),"Operating System":`${fb.type()} ${fb.release()} (${fb.arch()})`};return eN(e,"NODE_OPTIONS"),{name:"Environment",items:e}}a(rka,"collectEnvironmentSection");function nka(t,e){let r=t.get(Mc).getHttpSettings(),n={Proxy:r.proxy||void 0,"Proxy Authorization":r.proxyAuthorization?"present":void 0,"Proxy Kerberos SPN":r.proxyKerberosServicePrincipal,"Proxy Strict SSL":r.proxyStrictSSL===!1?"disabled":"enabled","No Proxy":r.noProxy?.join(",")||void 0,Fetcher:e.name.replace(/Fetcher$/,""),"Number of Root Certificates":vfe.rootCertificates.length,"TLS Default Min Version":vfe.DEFAULT_MIN_VERSION,"TLS Default Max Version":vfe.DEFAULT_MAX_VERSION};return eN(n,"http_proxy"),eN(n,"https_proxy"),eN(n,"no_proxy"),eN(n,"SSL_CERT_FILE"),eN(n,"SSL_CERT_DIR"),eN(n,"OPENSSL_CONF"),eN(n,"NODE_EXTRA_CA_CERTS"),eN(n,"NODE_TLS_REJECT_UNAUTHORIZED"),{name:"Network Configuration",items:n}}a(nka,"collectNetworkConfigSection");async function ika(t,e,r,n,o){return{name:"Reachability",items:Object.fromEntries((await vpi(t,e,r,n,o)).map(({label:c,message:l})=>[c,l]))}}a(ika,"collectReachabilitySection");function bpi(t){return t.includes("`")?`\`\` ${t} \`\``:`\`${t}\``}a(bpi,"quoteCode");function eN(t,e){let r=process.env[e];r&&(t[bpi(e)]=bpi(r)),r!==process.env[e.toUpperCase()]&&eN(t,e.toUpperCase())}a(eN,"addEnvironmentVariable");function oka(t){return`## ${t.name}`+fb.EOL+fb.EOL+Object.keys(t.items).filter(e=>e!=="name").map(e=>`- ${e}: ${t.items[e]??"N/A"}`).join(fb.EOL)}a(oka,"formatSectionAsMarkdown");function ska(t){let e=t.get(Dr).getEditorInfo();return`${e.readableName||e.name} ${e.version}`}a(ska,"getEditorDisplayVersion");function aka(t){let e=t.get(Dr).getEditorPluginInfo();return`${e.readableName||e.name} ${e.version}`}a(aka,"getPluginDisplayVersion");var cka=S.Object({});async function lka(t,e){return[{report:Spi(await Tpi(t,e))},null]}a(lka,"handleDiagnosticsChecked");var Ipi=He(cka,lka);f();var Dpi=de(mu());f();var xpi=require("crypto");var bfe=class{static{a(this,"LspClientContextProvider")}constructor(e,r,n){this.id=r,this.selector=n,this.resolver=new OAr(e,this.id)}},OAr=class{constructor(e,r){this.ctx=e;this.id=r;this.contextItems=[];this.update=!1}static{a(this,"LspClientContextResolver")}async resolve(e,r){let n=[];if(this.contextItems.length>0)n=this.contextItems;else if(this.update){let o=this.ctx.get(Ar),s=(0,xpi.randomUUID)(),c=o.connection.onProgress(J9e.type,s,l=>{n.push(...l)});r.onCancellationRequested(()=>{c?.dispose()});try{let l=await o.connection.sendRequest(J9e.type,{providerId:this.id,data:this.data,textDocument:{uri:e.documentContext.uri,languageId:e.documentContext.languageId,version:e.documentContext.version},position:e.documentContext.position,partialResultToken:s},r);n.push(...l)}finally{c?.dispose()}}return this.reset(),Promise.resolve(n)}setContextItems(e){this.contextItems=e}clearContextItems(){this.contextItems=[]}setUpdate(e){this.update=e}clearData(){this.data=void 0}reset(){this.clearContextItems(),this.clearData(),this.setUpdate(!1)}};function Rdt(t,e,r){try{let n=t.get(I0),o=new Map;n.providers.forEach(s=>{o.set(s.id,s)}),e.providers.forEach(s=>{let c=o.get(s.id);c&&c instanceof bfe&&c.resolver.setContextItems(s.contextItems)}),e.updating&&e.updating.length>0&&e.updating.forEach(s=>{let c=o.get(s);c&&c instanceof bfe&&(c.resolver.setUpdate(!0),c.resolver.data=r)})}catch(n){Cr.error(t,"Failed to set context items on context providers",n)}}a(Rdt,"setContextItems");var MAr={nocase:!0,matchBase:!0,nonegate:!0,dot:!0};function wpi(t,e,r){return e.map(o=>{try{if(typeof o=="string")return Ku(r.uri,o,MAr);if(typeof o=="object"){let s=!0;return"language"in o&&(s&&=r.languageId==(o.language||"")),"scheme"in o&&(s&&=Ku(r.uri,o.scheme||"",MAr)),"pattern"in o&&(s&&=Ku(r.uri,o.pattern||"",MAr)),s}}catch{return!1}return!1}).some(Boolean)?10:0}a(wpi,"match");f();var uka=S.Object({documents:S.Array(S.String()),basename:S.Optional(S.String()),options:S.Optional(S.Object({}))}),OQ=class{constructor(e,r){this.documents=e;this.basename=r}static{a(this,"ExternalTestingCompletionDocuments")}};function dka(t,e,r){return t.forceSet(OQ,new OQ(r.documents,r.basename||"")),["OK",null]}a(dka,"handleTestingSetCompletionDocumentsChecked");var Rpi=new Se("setCompletionDocuments"),kpi=He(uka,dka);function Pdt(t,e,r,n){let o=t.get(OQ);if(o.documents){let s=n?3:1;if(r&&o.basename&&o.basename.trim().length>0){Rpi.debug(t,`Returning filtered completions by basename ${o.basename}`);let c=fka(o,r);return c&&c.length>0?Ppi(c,s,e):void 0}else return Rpi.debug(t,"Returning completions for all pre-set documents"),Ppi(o.documents,s,e)}}a(Pdt,"getTestCompletions");function Ppi(t,e,r){return t.slice(0,e).map(n=>{let{cursorLine:o,lines:s,start:c,end:l}=xdt(n,r);return{insertText:[o.slice(Math.min(c.character,r.character))].concat(s.slice(r.line+1)).join(` +`),range:{start:c,end:l}}})}a(Ppi,"sliceAndMapCompletions");function fka(t,e){return t.basename===Zn(e)?t.documents||[]:[]}a(fka,"getFilteredDocs");var Npi=S.Object({doc:S.Object({position:uh,insertSpaces:S.Optional(S.Boolean()),tabSize:S.Optional(S.Number()),uri:Jye,version:S.Number()}),contextItems:S.Optional(ZHt)}),b2e;async function Mpi(t,e,r,n){b2e&&(b2e.cancel(),b2e.dispose()),b2e=new Cn.CancellationTokenSource;let o=new SA([e,b2e.token]);r.contextItems&&Rdt(t,r.contextItems);let s=Pdt(t,r.doc.position,r.doc.uri,n);if(s)return[{completions:s.map(m=>({uuid:yr(),text:m.insertText,displayText:m.insertText,position:r.doc.position,range:m.range,docVersion:r.doc.version}))},null];let c;try{c=await C3(t,r.doc,o)}catch(h){if(!(h instanceof Dpi.ResponseError))throw h;switch(h.code){case ct.CopilotNotAvailable:case ct.ContentModified:return[{completions:[]},null]}throw h}let l=r.doc.position,u=await t.get(Dm).getCompletions(c,l,o,{isCycling:n,formattingOptions:r.doc});if(!u)return[{completions:[]},null];let d=t.get(pl);for(let h of u)d.set(h.uuid,{...h,triggerCategory:"ghostText"});return[{completions:u.map(h=>({uuid:h.uuid,text:h.insertText,range:h.range,displayText:h.displayText,position:h.position,docVersion:c.version}))},null]}a(Mpi,"handleGetCompletionsHelper");var Opi=He(Npi,(t,e,r)=>Mpi(t,e,r,!1)),Bpi=He(Npi,(t,e,r)=>Mpi(t,e,r,!0));f();var pka=S.Object({});function hka(t,e,r){return[{defaultRules:t.get(FT).getDefaultRules()},null]}a(hka,"handleGetDefaultFileSafetyRulesChecked");var Lpi=He(pka,hka);f();var Fpi=de(mN()),Tfe=de(mu());var mka=S.Object({doc:S.Object({position:uh,uri:Jye,version:S.Number()}),panelId:S.String()});function gka(t,e,r,n,o){let s=Sdt(o.completionText),c=(0,Fpi.SHA256)(s).toString();return t.get(pl).set(c,{displayText:o.insertText,insertText:o.completionText,offset:n,uuid:c,range:r,uri:e.doc.uri,telemetry:o.telemetryData,index:o.choiceIndex,position:r.end,resultType:0,triggerCategory:"solution",copilotAnnotations:o.copilotAnnotations,clientCompletionId:c}),{panelId:e.panelId,range:r,completionText:o.completionText,displayText:o.insertText,score:o.meanProb,solutionId:c}}a(gka,"makeSolution");var BAr=class{constructor(e,r,n){this.ctx=e;this.params=r;this.range=n;this.offset=0}static{a(this,"SolutionHandler")}get service(){return this.ctx.get(Ar)}onSolution(e){return this.service.connection.sendNotification(new Tfe.NotificationType("PanelSolution"),gka(this.ctx,this.params,this.range,this.offset,e))}onFinishedNormally(){return Upi(this.params.panelId,this.service)}onFinishedWithError(e){return this.service.connection.sendNotification(new Tfe.NotificationType("PanelSolutionsDone"),{status:"Error",message:e,panelId:this.params.panelId})}};async function Upi(t,e){return e.connection.sendNotification(new Tfe.NotificationType("PanelSolutionsDone"),{status:"OK",panelId:t})}a(Upi,"reportDone");var T2e;async function Aka(t,e,r){T2e&&(T2e.cancel(),T2e.dispose()),T2e=new Cn.CancellationTokenSource;let n=new SA([e,T2e.token]),o=r.doc.position,s=gc.range(o,o),c=new BAr(t,r,s),l=t.get(l2);if(l.documents){let u=l.documents;wdt(o,u,c)}else{let u;try{u=await C3(t,r.doc,n)}catch(p){if(!(p instanceof Tfe.ResponseError))throw p;switch(p.code){case ct.CopilotNotAvailable:case ct.ContentModified:return yka(t,r)}throw p}c.offset=u.offsetAt(o);let d=new Cfe(u,o,n,10);Idt(t,d,c)}return[{solutionCountTarget:10},null]}a(Aka,"handleGetPanelCompletionsChecked");async function yka(t,e){return await Upi(e.panelId,t.get(Ar)),[{solutionCountTarget:0},null]}a(yka,"produceEmptySolutions");var Qpi=He(mka,Aka);f();var Eka=S.Object({});async function _ka(t,e,r){let o=(await t.get(Nt).getToken()).userInfo,s=o.raw,l=(await t.get(en).getSession())?.login;return!s||!l?[null,null]:[{userName:l,copilotPlan:o.copilotPlan,rawUserInfo:s},null]}a(_ka,"handleGetUserInfoChecked");var qpi=He(Eka,_ka);f();var Cka=S.Object({});function vka(t,e,r){return[{version:t.get(Vo).getDisplayVersion(),buildType:pL(t),runtimeVersion:`node/${process.versions.node}`},null]}a(vka,"handleGetVersionChecked");var Gpi=He(Cka,vka);f();f();var fJ=class{constructor(){this.lastChanges=[];this.attemptCount=0;this.DEFAULT_TEMPERATURE=.1}static{a(this,"GitCommitGenerateService")}buildSystemMessage(e,r){let n=["You are an AI programming assistant, helping a software developer to come up with the best git commit message for their code changes.","You excel in interpreting the purpose behind code changes to craft succinct, clear commit messages that adhere to the repository's guidelines.","","# First, think step-by-step:","1. Analyze the CODE CHANGES thoroughly to understand what's been modified.","2. Identify the purpose of the changes to answer the *why* for the commit messages, also considering the optionally provided RECENT USER COMMITS.","3. Review the provided RECENT REPOSITORY COMMITS to identify established commit message conventions. Focus on the format and style, ignoring commit-specific details like refs, tags, and authors.","4. Generate a thoughtful and succinct commit message for the given CODE CHANGES. It MUST follow the established writing conventions.","5. Remove any meta information like issue references, tags, or author names from the commit message. The developer will add them.","6. Now only show your message, wrapped with a single markdown ```text codeblock! Do not provide any explanations or details"];return r&&n.push(` Current git branch name: ${r}`),e&&n.push(` Respond in the following locale: ${e}`),n.join(` `)}buildUserMessage(e,r){let n=[];return e.userCommits.length>0&&n.push("# RECENT USER COMMITS (For reference only, do not copy!):",e.userCommits.map(o=>`- ${o}`).join(` `),""),e.recentCommits.length>0&&n.push("# RECENT REPOSITORY COMMITS (For reference only, do not copy!):",e.recentCommits.map(o=>`- ${o}`).join(` `),""),n.push("# CODE CHANGES:",e.changes.join(` `),"","","Now generate a commit message that describes the CODE CHANGES.","DO NOT COPY commits from RECENT COMMITS, but use them as reference for the commit style.","ONLY return a single markdown code block, NO OTHER PROSE!","```text","commit message goes here","```",""),r&&n.push("",r,""),n.join(` -`)}updateAttemptCount(e){if(e.length!==this.lastChanges.length){this.attemptCount=0;return}for(let r=0;r(e[r.toLowerCase()]=t[r],e),{}):{}}a(w2a,"lowercaseKeys");function R2a(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(t)}a(R2a,"isPlainObject");function z0i(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{R2a(e[n])?n in t?r[n]=z0i(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}a(z0i,"mergeDeep");function V0i(t){for(let e in t)t[e]===void 0&&delete t[e];return t}a(V0i,"removeUndefinedProperties");function yAr(t,e,r){if(typeof e=="string"){let[o,s]=e.split(" ");r=Object.assign(s?{method:o,url:s}:{url:o},r)}else r=Object.assign({},e);r.headers=w2a(r.headers),V0i(r),V0i(r.headers);let n=z0i(t||{},r);return r.url==="/graphql"&&(t&&t.mediaType.previews?.length&&(n.mediaType.previews=t.mediaType.previews.filter(o=>!n.mediaType.previews.includes(o)).concat(n.mediaType.previews)),n.mediaType.previews=(n.mediaType.previews||[]).map(o=>o.replace(/-preview/,""))),n}a(yAr,"merge");function P2a(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(o=>o==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${o}=${encodeURIComponent(e[o])}`).join("&")}a(P2a,"addQueryParameters");var k2a=/\{[^{}}]+\}/g;function N2a(t){return t.replace(/(?:^\W+)|(?:(?r.concat(n),[]):[]}a(D2a,"extractUrlVariableNames");function W0i(t,e){let r={__proto__:null};for(let n of Object.keys(t))e.indexOf(n)===-1&&(r[n]=t[n]);return r}a(W0i,"omit");function Y0i(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}a(Y0i,"encodeReserved");function f0e(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}a(f0e,"encodeUnreserved");function wPe(t,e,r){return e=t==="+"||t==="#"?Y0i(e):f0e(e),r?f0e(r)+"="+e:e}a(wPe,"encodeValue");function d0e(t){return t!=null}a(d0e,"isDefined");function AAr(t){return t===";"||t==="&"||t==="?"}a(AAr,"isKeyOperator");function M2a(t,e,r,n){var o=t[r],s=[];if(d0e(o)&&o!=="")if(typeof o=="string"||typeof o=="number"||typeof o=="boolean")o=o.toString(),n&&n!=="*"&&(o=o.substring(0,parseInt(n,10))),s.push(wPe(e,o,AAr(e)?r:""));else if(n==="*")Array.isArray(o)?o.filter(d0e).forEach(function(c){s.push(wPe(e,c,AAr(e)?r:""))}):Object.keys(o).forEach(function(c){d0e(o[c])&&s.push(wPe(e,o[c],c))});else{let c=[];Array.isArray(o)?o.filter(d0e).forEach(function(l){c.push(wPe(e,l))}):Object.keys(o).forEach(function(l){d0e(o[l])&&(c.push(f0e(l)),c.push(wPe(e,o[l].toString())))}),AAr(e)?s.push(f0e(r)+"="+c.join(",")):c.length!==0&&s.push(c.join(","))}else e===";"?d0e(o)&&s.push(f0e(r)):o===""&&(e==="&"||e==="?")?s.push(f0e(r)+"="):o===""&&s.push("");return s}a(M2a,"getValues");function O2a(t){return{expand:B2a.bind(null,t)}}a(O2a,"parseUrl");function B2a(t,e){var r=["+","#",".","/",";","?","&"];return t=t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,o,s){if(o){let l="",u=[];if(r.indexOf(o.charAt(0))!==-1&&(l=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach(function(d){var p=/([^:\*]*)(?::(\d+)|(\*))?/.exec(d);u.push(M2a(e,l,p[1],p[2]||p[3]))}),l&&l!=="+"){var c=",";return l==="?"?c="&":l!=="#"&&(c=l),(u.length!==0?l:"")+u.join(c)}else return u.join(",")}else return Y0i(s)}),t==="/"?t:t.replace(/\/$/,"")}a(B2a,"expand");function K0i(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),o,s=W0i(t,["method","baseUrl","url","headers","request","mediaType"]),c=D2a(r);r=O2a(r).expand(s),/^http/.test(r)||(r=t.baseUrl+r);let l=Object.keys(t).filter(p=>c.includes(p)).concat("baseUrl"),u=W0i(s,l);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),r.endsWith("/graphql")&&t.mediaType.previews?.length)){let p=n.accept.match(/(?{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${h}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=P2a(r,u):"data"in u?o=u.data:Object.keys(u).length&&(o=u),!n["content-type"]&&typeof o<"u"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof o>"u"&&(o=""),Object.assign({method:e,url:r,headers:n},typeof o<"u"?{body:o}:null,t.request?{request:t.request}:null)}a(K0i,"parse");function L2a(t,e,r){return K0i(yAr(t,e,r))}a(L2a,"endpointWithDefaults");function J0i(t,e){let r=yAr(t,e),n=L2a.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:J0i.bind(null,r),merge:yAr.bind(null,r),parse:K0i})}a(J0i,"withDefaults");var X0i=J0i(null,x2a);var ipi=de(rpi(),1);f();var aX=class extends Error{static{a(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0),"response"in n&&(this.response=n.response);let o=Object.assign({},n.request);n.request.headers.authorization&&(o.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?[h,String(m)])),c;try{c=await e(t.url,{method:t.method,body:o,redirect:t.request?.redirect,headers:s,signal:t.request?.signal,...t.body&&{duplex:"half"}})}catch(h){let m="Unknown Error";if(h instanceof Error){if(h.name==="AbortError")throw h.status=500,h;m=h.message,h.name==="TypeError"&&"cause"in h&&(h.cause instanceof Error?m=h.cause.message:typeof h.cause=="string"&&(m=h.cause))}let g=new aX(m,500,{request:t});throw g.cause=h,g}let l=c.status,u=c.url,d={};for(let[h,m]of c.headers)d[h]=m;let p={url:u,status:l,headers:d,data:""};if("deprecation"in d){let h=d.link&&d.link.match(/<([^<>]+)>; rel="deprecation"/),m=h&&h.pop();r.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${d.sunset}${m?`. See ${m}`:""}`)}if(l===204||l===205)return p;if(t.method==="HEAD"){if(l<400)return p;throw new aX(c.statusText,l,{response:p,request:t})}if(l===304)throw p.data=await EAr(c),new aX("Not modified",l,{response:p,request:t});if(l>=400)throw p.data=await EAr(c),new aX(G2a(p.data),l,{response:p,request:t});return p.data=n?await EAr(c):c.body,p}a(npi,"fetchWrapper");async function EAr(t){let e=t.headers.get("content-type");if(!e)return t.text().catch(()=>"");let r=(0,ipi.safeParse)(e);if(q2a(r)){let n="";try{return n=await t.text(),JSON.parse(n)}catch{return n}}else return r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"?t.text().catch(()=>""):t.arrayBuffer().catch(()=>new ArrayBuffer(0))}a(EAr,"getResponseData");function q2a(t){return t.type==="application/json"||t.type==="application/scim+json"}a(q2a,"isJSONResponse");function G2a(t){if(typeof t=="string")return t;if(t instanceof ArrayBuffer)return"Unknown error";if("message"in t){let e="documentation_url"in t?` - ${t.documentation_url}`:"";return Array.isArray(t.errors)?`${t.message}: ${t.errors.map(r=>JSON.stringify(r)).join(", ")}${e}`:`${t.message}${e}`}return`Unknown error: ${JSON.stringify(t)}`}a(G2a,"toErrorMessage");function CAr(t,e){let r=t.defaults(e);return Object.assign(a(function(o,s){let c=r.merge(o,s);if(!c.request||!c.request.hook)return npi(r.parse(c));let l=a((u,d)=>npi(r.parse(r.merge(u,d))),"request2");return Object.assign(l,{endpoint:r,defaults:CAr.bind(null,r)}),c.request.hook(l,c)},"newApi"),{endpoint:r,defaults:CAr.bind(null,r)})}a(CAr,"withDefaults");var opi=CAr(X0i,U2a);var H2a="0.0.0-development";function j2a(t){return`Request failed due to following response errors: +`)}updateAttemptCount(e){if(e.length!==this.lastChanges.length){this.attemptCount=0;return}for(let r=0;r(e[r.toLowerCase()]=t[r],e),{}):{}}a(Pka,"lowercaseKeys");function kka(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(t)}a(kka,"isPlainObject");function Wpi(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{kka(e[n])?n in t?r[n]=Wpi(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}a(Wpi,"mergeDeep");function $pi(t){for(let e in t)t[e]===void 0&&delete t[e];return t}a($pi,"removeUndefinedProperties");function FAr(t,e,r){if(typeof e=="string"){let[o,s]=e.split(" ");r=Object.assign(s?{method:o,url:s}:{url:o},r)}else r=Object.assign({},e);r.headers=Pka(r.headers),$pi(r),$pi(r.headers);let n=Wpi(t||{},r);return r.url==="/graphql"&&(t&&t.mediaType.previews?.length&&(n.mediaType.previews=t.mediaType.previews.filter(o=>!n.mediaType.previews.includes(o)).concat(n.mediaType.previews)),n.mediaType.previews=(n.mediaType.previews||[]).map(o=>o.replace(/-preview/,""))),n}a(FAr,"merge");function Dka(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(o=>o==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${o}=${encodeURIComponent(e[o])}`).join("&")}a(Dka,"addQueryParameters");var Nka=/\{[^{}}]+\}/g;function Mka(t){return t.replace(/(?:^\W+)|(?:(?r.concat(n),[]):[]}a(Oka,"extractUrlVariableNames");function Vpi(t,e){let r={__proto__:null};for(let n of Object.keys(t))e.indexOf(n)===-1&&(r[n]=t[n]);return r}a(Vpi,"omit");function zpi(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}a(zpi,"encodeReserved");function Ife(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}a(Ife,"encodeUnreserved");function S2e(t,e,r){return e=t==="+"||t==="#"?zpi(e):Ife(e),r?Ife(r)+"="+e:e}a(S2e,"encodeValue");function Sfe(t){return t!=null}a(Sfe,"isDefined");function LAr(t){return t===";"||t==="&"||t==="?"}a(LAr,"isKeyOperator");function Bka(t,e,r,n){var o=t[r],s=[];if(Sfe(o)&&o!=="")if(typeof o=="string"||typeof o=="number"||typeof o=="boolean")o=o.toString(),n&&n!=="*"&&(o=o.substring(0,parseInt(n,10))),s.push(S2e(e,o,LAr(e)?r:""));else if(n==="*")Array.isArray(o)?o.filter(Sfe).forEach(function(c){s.push(S2e(e,c,LAr(e)?r:""))}):Object.keys(o).forEach(function(c){Sfe(o[c])&&s.push(S2e(e,o[c],c))});else{let c=[];Array.isArray(o)?o.filter(Sfe).forEach(function(l){c.push(S2e(e,l))}):Object.keys(o).forEach(function(l){Sfe(o[l])&&(c.push(Ife(l)),c.push(S2e(e,o[l].toString())))}),LAr(e)?s.push(Ife(r)+"="+c.join(",")):c.length!==0&&s.push(c.join(","))}else e===";"?Sfe(o)&&s.push(Ife(r)):o===""&&(e==="&"||e==="?")?s.push(Ife(r)+"="):o===""&&s.push("");return s}a(Bka,"getValues");function Lka(t){return{expand:Fka.bind(null,t)}}a(Lka,"parseUrl");function Fka(t,e){var r=["+","#",".","/",";","?","&"];return t=t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,o,s){if(o){let l="",u=[];if(r.indexOf(o.charAt(0))!==-1&&(l=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach(function(d){var p=/([^:\*]*)(?::(\d+)|(\*))?/.exec(d);u.push(Bka(e,l,p[1],p[2]||p[3]))}),l&&l!=="+"){var c=",";return l==="?"?c="&":l!=="#"&&(c=l),(u.length!==0?l:"")+u.join(c)}else return u.join(",")}else return zpi(s)}),t==="/"?t:t.replace(/\/$/,"")}a(Fka,"expand");function Ypi(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),o,s=Vpi(t,["method","baseUrl","url","headers","request","mediaType"]),c=Oka(r);r=Lka(r).expand(s),/^http/.test(r)||(r=t.baseUrl+r);let l=Object.keys(t).filter(p=>c.includes(p)).concat("baseUrl"),u=Vpi(s,l);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),r.endsWith("/graphql")&&t.mediaType.previews?.length)){let p=n.accept.match(/(?{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${h}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=Dka(r,u):"data"in u?o=u.data:Object.keys(u).length&&(o=u),!n["content-type"]&&typeof o<"u"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof o>"u"&&(o=""),Object.assign({method:e,url:r,headers:n},typeof o<"u"?{body:o}:null,t.request?{request:t.request}:null)}a(Ypi,"parse");function Uka(t,e,r){return Ypi(FAr(t,e,r))}a(Uka,"endpointWithDefaults");function Kpi(t,e){let r=FAr(t,e),n=Uka.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:Kpi.bind(null,r),merge:FAr.bind(null,r),parse:Ypi})}a(Kpi,"withDefaults");var Jpi=Kpi(null,Rka);var nhi=de(thi(),1);f();var hJ=class extends Error{static{a(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0),"response"in n&&(this.response=n.response);let o=Object.assign({},n.request);n.request.headers.authorization&&(o.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?[h,String(m)])),c;try{c=await e(t.url,{method:t.method,body:o,redirect:t.request?.redirect,headers:s,signal:t.request?.signal,...t.body&&{duplex:"half"}})}catch(h){let m="Unknown Error";if(h instanceof Error){if(h.name==="AbortError")throw h.status=500,h;m=h.message,h.name==="TypeError"&&"cause"in h&&(h.cause instanceof Error?m=h.cause.message:typeof h.cause=="string"&&(m=h.cause))}let g=new hJ(m,500,{request:t});throw g.cause=h,g}let l=c.status,u=c.url,d={};for(let[h,m]of c.headers)d[h]=m;let p={url:u,status:l,headers:d,data:""};if("deprecation"in d){let h=d.link&&d.link.match(/<([^<>]+)>; rel="deprecation"/),m=h&&h.pop();r.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${d.sunset}${m?`. See ${m}`:""}`)}if(l===204||l===205)return p;if(t.method==="HEAD"){if(l<400)return p;throw new hJ(c.statusText,l,{response:p,request:t})}if(l===304)throw p.data=await UAr(c),new hJ("Not modified",l,{response:p,request:t});if(l>=400)throw p.data=await UAr(c),new hJ(jka(p.data),l,{response:p,request:t});return p.data=n?await UAr(c):c.body,p}a(rhi,"fetchWrapper");async function UAr(t){let e=t.headers.get("content-type");if(!e)return t.text().catch(()=>"");let r=(0,nhi.safeParse)(e);if(Hka(r)){let n="";try{return n=await t.text(),JSON.parse(n)}catch{return n}}else return r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"?t.text().catch(()=>""):t.arrayBuffer().catch(()=>new ArrayBuffer(0))}a(UAr,"getResponseData");function Hka(t){return t.type==="application/json"||t.type==="application/scim+json"}a(Hka,"isJSONResponse");function jka(t){if(typeof t=="string")return t;if(t instanceof ArrayBuffer)return"Unknown error";if("message"in t){let e="documentation_url"in t?` - ${t.documentation_url}`:"";return Array.isArray(t.errors)?`${t.message}: ${t.errors.map(r=>JSON.stringify(r)).join(", ")}${e}`:`${t.message}${e}`}return`Unknown error: ${JSON.stringify(t)}`}a(jka,"toErrorMessage");function QAr(t,e){let r=t.defaults(e);return Object.assign(a(function(o,s){let c=r.merge(o,s);if(!c.request||!c.request.hook)return rhi(r.parse(c));let l=a((u,d)=>rhi(r.parse(r.merge(u,d))),"request2");return Object.assign(l,{endpoint:r,defaults:QAr.bind(null,r)}),c.request.hook(l,c)},"newApi"),{endpoint:r,defaults:QAr.bind(null,r)})}a(QAr,"withDefaults");var ihi=QAr(Jpi,qka);var $ka="0.0.0-development";function Vka(t){return`Request failed due to following response errors: `+t.errors.map(e=>` - ${e.message}`).join(` -`)}a(j2a,"_buildMessageForResponseErrors");var $2a=class extends Error{static{a(this,"GraphqlResponseError")}constructor(t,e,r){super(j2a(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},V2a=["method","baseUrl","url","headers","request","query","mediaType","operationName"],W2a=["query","method","url"],spi=/\/api\/v3\/?$/;function z2a(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let c in r)if(W2a.includes(c))return Promise.reject(new Error(`[@octokit/graphql] "${c}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((c,l)=>V2a.includes(l)?(c[l]=n[l],c):(c.variables||(c.variables={}),c.variables[l]=n[l],c),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return spi.test(s)&&(o.url=s.replace(spi,"/api/graphql")),t(o).then(c=>{if(c.data.errors){let l={};for(let u of Object.keys(c.headers))l[u]=c.headers[u];throw new $2a(o,l,c.data)}return c.data.data})}a(z2a,"graphql");function api(t,e){let r=t.defaults(e);return Object.assign(a((o,s)=>z2a(r,o,s),"newApi"),{defaults:api.bind(null,r),endpoint:r.endpoint})}a(api,"withDefaults");var cpi=api(opi,{headers:{"user-agent":`octokit-graphql.js/${H2a} ${aC()}`},method:"POST",url:"/graphql"});var Ift=new Se("GitHubGraphQLClient"),xft=class{constructor(e){this.ctx=e;this.graphqlClient=null}static{a(this,"GitHubGraphQLClient")}async getGraphQLClient(){if(this.graphqlClient)return this.graphqlClient;let e=await this.getApiSession(),r=this.ctx.get(dr);return this.graphqlClient=cpi.defaults({headers:{authorization:`token ${e.accessToken}`},baseUrl:e.apiUrl,request:{fetch:r.fetch.bind(r)}}),this.graphqlClient}async searchPullRequests(e){Ift.debug(this.ctx,`Searching pull requests with query: ${e}`);let r=await this.getGraphQLClient();try{let n=[],o=null,s=!0,c=0;for(;s;){c++,Ift.debug(this.ctx,`Fetching page ${c} of pull requests search results`);let u=await r(` +`)}a(Vka,"_buildMessageForResponseErrors");var Wka=class extends Error{static{a(this,"GraphqlResponseError")}constructor(t,e,r){super(Vka(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},zka=["method","baseUrl","url","headers","request","query","mediaType","operationName"],Yka=["query","method","url"],ohi=/\/api\/v3\/?$/;function Kka(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let c in r)if(Yka.includes(c))return Promise.reject(new Error(`[@octokit/graphql] "${c}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((c,l)=>zka.includes(l)?(c[l]=n[l],c):(c.variables||(c.variables={}),c.variables[l]=n[l],c),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return ohi.test(s)&&(o.url=s.replace(ohi,"/api/graphql")),t(o).then(c=>{if(c.data.errors){let l={};for(let u of Object.keys(c.headers))l[u]=c.headers[u];throw new Wka(o,l,c.data)}return c.data.data})}a(Kka,"graphql");function shi(t,e){let r=t.defaults(e);return Object.assign(a((o,s)=>Kka(r,o,s),"newApi"),{defaults:shi.bind(null,r),endpoint:r.endpoint})}a(shi,"withDefaults");var ahi=shi(ihi,{headers:{"user-agent":`octokit-graphql.js/${$ka} ${YE()}`},method:"POST",url:"/graphql"});var Mdt=new Se("GitHubGraphQLClient"),Odt=class{constructor(e){this.ctx=e;this.graphqlClient=null}static{a(this,"GitHubGraphQLClient")}async getGraphQLClient(){if(this.graphqlClient)return this.graphqlClient;let e=await this.getApiSession(),r=this.ctx.get(dr);return this.graphqlClient=ahi.defaults({headers:{authorization:`token ${e.accessToken}`},baseUrl:e.apiUrl,request:{fetch:r.fetch.bind(r)}}),this.graphqlClient}async searchPullRequests(e){Mdt.debug(this.ctx,`Searching pull requests with query: ${e}`);let r=await this.getGraphQLClient();try{let n=[],o=null,s=!0,c=0;for(;s;){c++,Mdt.debug(this.ctx,`Fetching page ${c} of pull requests search results`);let u=await r(` query searchPullRequests($searchQuery: String!, $cursor: String) { search(query: $searchQuery, type: ISSUE, first: 100, after: $cursor) { nodes { @@ -3601,7 +3590,7 @@ Respond in the following locale: ${e}`),n.join(` } } } - `,{searchQuery:e,cursor:o}),d=u.search.nodes.map(p=>({id:p.fullDatabaseId,number:p.number,title:p.title,user:p.author,html_url:p.url,draft:p.isDraft,body:p.body,repository:p.repository}));n.push(...d),s=u.search.pageInfo.hasNextPage,o=u.search.pageInfo.endCursor}return Ift.debug(this.ctx,`Found ${n.length} pull requests`),n}catch(n){if(Ift.error(this.ctx,`Failed to search pull requests with query '${e}':`,n),n&&typeof n=="object"&&"status"in n){let o=n;throw new yp(o.status,o.message||"GitHub GraphQL API failed")}throw n}}async getApiSession(){let e=await this.ctx.get(en).getSession();if(!e)throw new QT;return{apiUrl:e.apiUrl.replace(/\/$/,""),accessToken:e.accessToken}}};var Y2a=S.Object({query:S.String(),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(yh))}),lpi=4,p0e=class extends Error{static{a(this,"TemplateVariableSubstituteError")}constructor(e,r){super(e),this.errorCode=r}};async function K2a(t,e,r){try{let n=new xft(t),o=await X2a(t,r),s=await n.searchPullRequests(o);await J2a(t,s);let c=Z2a(s);return at(t,"githubApi.searchPR",yt.createAndMarkAsIssued()),yi(t,"githubApi.searchPR",void 0,c),[{pullRequests:s},null]}catch(n){if(n instanceof p0e)return[null,{code:n.errorCode,message:n.message}];if(n instanceof QT)return[null,{code:lt.NoGitHubToken,message:n.message}];if(qo(t,n,"githubApi.searchPR"),_u(t,"githubApi.searchPR",n),n instanceof yp&&n.isClientError())return[null,{code:lt.InvalidRequest,message:n.message}];if(n instanceof Error)return[null,{code:lt.InternalError,message:`Unexpected error happened: ${n.message}`}];let o=JSON.stringify(n)??String(n);return[null,{code:lt.InternalError,message:`Unexpected error happened: ${o}`}]}}a(K2a,"handleSearchPRChecked");async function J2a(t,e){let r=new cC(t);for(let n=0;n{try{c.copilotWorkStatus=await r.getCopilotWorkingStatus(c.repository.owner.login,c.repository.name,c.number,c.user?.login)}catch{c.copilotWorkStatus="not_copilot_issue"}});await Promise.all(s)}}a(J2a,"appendCopilotWorkStatus");async function X2a(t,e){let r=e.query;if(r.includes("${user}")){let n=await t.get(en).getSession();if(!n)throw new p0e("The user is not logged in.",lt.NoGitHubToken);r=r.replace(/\$\{user\}/g,n.login)}if(r.includes("${owner}")||r.includes("${repository}")){let n;if(e.workspaceFolders&&e.workspaceFolders.length>0)n=e.workspaceFolders[0];else if(e.workspaceFolder)n={uri:e.workspaceFolder};else throw new p0e("No workspace folder provided",lt.InvalidRequest);let s=await t.get(Em).getRepo(n);if(s&&s.owner&&s.name)r=r.replace(/\$\{owner\}/g,s.owner),r=r.replace(/\$\{repository\}/g,s.name);else{let c;s?!s.owner&&!s.name?c="Git repository detected but both owner and repository name information are missing. Ensure the repository has a valid remote origin.":s.owner?s.name||(c="Git repository detected but repository name is missing. Ensure the repository has a valid remote origin."):c="Git repository detected but owner information is missing. Ensure the repository has a valid remote origin.":c="The workspace folder is not a GitHub repository.";let l=`Cannot obtain GitHub information for workspace folder: ${n.uri}. Template variables \${owner} and \${repository} require a valid Git repository with remote GitHub origin configured: ${c}`;throw new p0e(l,lt.InvalidRequest)}}return r}a(X2a,"replaceTemplateVariables");function Z2a(t){let e=0,r=0,n=0,o=0;for(let s of t)switch(s.copilotWorkStatus){case"in_progress":e++;break;case"done":r++;break;case"error":n++;break;case"not_copilot_issue":default:o++;break}return{totalPRs:t.length,inProgressPRs:e,donePRs:r,errorPRs:n,notCopilotPRs:o}}a(Z2a,"buildCopilotWorkStatusMeasurements");var upi=He(Y2a,K2a);f();var fpi=V2t.type,PPe;function dpi(t){return{title:"Completion Accepted",command:STe,arguments:[t]}}a(dpi,"makeCommand");async function ePa(t,e,r){PPe&&(PPe.cancel(),PPe.dispose());let n=r.context.triggerKind===1;PPe=new _n.CancellationTokenSource;let o=PPe.token,s=new DA([e,o]);r.contextItems&&_ft(t,r.contextItems,r.data);let c=vft(t,r.position,r.textDocument.uri,n);if(c)return[{items:c.map(g=>({command:dpi(yr()),...g}))},null];let l=await U3(t,r.textDocument,s),u=r.position,d=await t.get(Gm).getCompletions(l,u,s,{isCycling:n,selectedCompletionInfo:r.context.selectedCompletionInfo,formattingOptions:r.formattingOptions,data:r.data});if(!d)return e.isCancellationRequested?[null,{code:lt.RequestCancelled,message:"Request was canceled"}]:o.isCancellationRequested?[null,{code:lt.ServerCancelled,message:"Request was superseded by a new request"}]:[{items:[]},null];let p=t.get(Cl);for(let m of d)p.set(m.uuid,{...m,triggerCategory:"ghostText"});return[{items:d.map(m=>({command:dpi(m.uuid),insertText:m.insertText,range:m.range}))},null]}a(ePa,"handleChecked");var ppi=He(Dvn,(t,e,r)=>ePa(t,e,r));f();f();function _Ar(t){let e=t.indexOf("-----BEGIN CERTIFICATE-----")+27,r=t.indexOf("-----END CERTIFICATE-----"),n=30,o=t.substring(e,e+n)+"..."+t.substring(r-n,r-1);return h0e(o)}a(_Ar,"asReadableCert");function h0e(t){return t.replace(/\s/g,"")}a(h0e,"normalizeNewlines");var rPa=S.Object({});async function nPa(t){return[{certificates:(await t.get(jd).getAllRootCAs()).map(h0e)},null]}a(nPa,"handleListCertificatesChecked");var hpi=He(rPa,nPa);f();f();f();var mpi=de(Su());var vAr=class extends mpi.ResponseError{static{a(this,"BaseMcpRegistryError")}constructor(e,r,n,o=lt.InternalError){super(o,e,{errorType:r,...n})}},cX=class extends vAr{static{a(this,"HttpStatusError")}constructor(e,r,n,o=lt.InternalError){super(e,r,{status:n},o)}},wft=class extends cX{static{a(this,"AuthError")}constructor(e){super("Missing or invalid authentication token for MCP registry allowlist","authError",e,lt.NoCopilotToken)}},Rft=class extends cX{static{a(this,"PermissionError")}constructor(e){super("MCP is disabled for this user","permissionError",e)}};var Pft=class extends cX{static{a(this,"TransientError")}constructor(e){let r=`Transient server error when fetching MCP registry allowlist: HTTP ${e}`;super(r,"transientError",e)}};f();function gpi(t){try{if(!("x-metadata"in t))return null;let e=t["x-metadata"];if(typeof e!="object"||e===null)return null;let r=e.registry;if(typeof r!="object"||r===null)return null;let n=r,o=n.api,s=n.mcpServer;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return null;let c=o,l=s;return typeof c.baseUrl=="string"&&c.baseUrl.length>0&&typeof c.version=="string"&&c.version.length>0&&typeof l.name=="string"&&l.name.length>0&&typeof l.version=="string"&&l.version.length>0?{api:{baseUrl:c.baseUrl,version:c.version},mcpServer:{name:l.name,version:l.version},...Object.fromEntries(Object.entries(n).filter(([u])=>!["api","mcpServer"].includes(u)))}:null}catch{return null}}a(gpi,"getRegistryMetadataFromConfig");function Api(t,e){try{let r=e.server;return"command"in t?!0:"url"in t?iPa(t,r):!1}catch{return!1}}a(Api,"validateServerConfigurationMatch");function iPa(t,e){if(!e.remotes||e.remotes.length===0)return!1;let r=a(o=>o.replace(/\/+$/,""),"normalizeUrl"),n=r(t.url);return e.remotes.some(o=>r(o.url)===n)}a(iPa,"validateRemoteURL");var ypi=300*1e3,_2=class{constructor(e){this.allowlistCache=null;this.serverCache=null;this.ctx=e}static{a(this,"McpRegistryService")}isAllowlistCacheValid(e,r){return Date.now()-e=500&&u<600?[null,new Pft(u)]:[null,new cX(`Failed to fetch MCP registry allowlist: HTTP ${u}`,"httpError",u)]}}try{let u=await s.text();c=JSON.parse(u)}catch(u){return[null,{code:lt.InternalError,message:`Failed to parse MCP registry allowlist: ${u instanceof Error?u.message:String(u)}`}]}return!c.mcp_registries||!Array.isArray(c.mcp_registries)?[null,{code:lt.InternalError,message:"Invalid allowlist format: expected mcp_registries array"}]:c.mcp_registries.some(u=>!u.url||!u.registry_access)?[null,{code:lt.InternalError,message:"Invalid allowlist format: registry entries missing required fields"}]:(this.allowlistCache={timestamp:Date.now(),data:c,userLogin:r},[c,null])}catch(e){return[null,{code:lt.InternalError,message:`Failed to fetch MCP registry allowlist: ${e instanceof Error?e.message:String(e)}`}]}}async validateServerConfig(e,r){try{let n=await this.getRegistryInfo();if(n.accessMode==="fallback")return{serverName:e,serverConfig:r,isBlocked:!1};let o=n.registryUrl,s=n.owner,c=await this.checkServerInRegistry(r,o);if(n.accessMode==="allow_all")return{serverName:e,serverConfig:r,isBlocked:!1,registryInfo:c.isFoundInRegistry?s?`Provided by ${s.login} organization`:"Provided by organization":void 0};{let l=!c.isFoundInRegistry;return{serverName:e,serverConfig:r,isBlocked:l,blockReason:l?c.validationError:void 0,registryInfo:l?s?`Blocked by ${s.login} organization registry policy`:"Blocked by organization registry policy":s?`Provided by ${s.login} organization`:"Provided by organization"}}}catch(n){return{serverName:e,serverConfig:r,isBlocked:!0,blockReason:`validation failed: ${n instanceof Error?n.message:String(n)}`,registryInfo:"Blocked by organization registry policy"}}}async checkServerInRegistry(e,r){let n=gpi(e);if(!n)return{isFoundInRegistry:!1,validationError:"does not have valid registry config"};let o=n.mcpServer.name,s=n.mcpServer.version,c=n.api.baseUrl,l=n.api.version,u=a(m=>m.replace(/\/+$/,""),"normalizeUrl");if(u(c)!==u(r))return{isFoundInRegistry:!1,validationError:`does not match allowed registry Url, expected: ${r}, found: ${c}`};let d=`${c.replace(/\/+$/,"")}/${l}/servers`,[p,h]=await this.fetchServer(d,o,s);return p&&!h?Api(e,p)?{isFoundInRegistry:!0}:{isFoundInRegistry:!1,validationError:"url"in e?"remote server URL does not match any registry remote URL":"local configuration does not match registry server configuration"}:{isFoundInRegistry:!1,validationError:h?`Server validation failed: ${h.message}`:`Server not found in registry ${c}`}}async getRegistryInfo(){let[e,r]=await this.fetchMcpRegistryAllowlist();if(r)return{accessMode:"fallback",errorMessage:`Failed to fetch registry allowlist: ${r.message}`};if(!e?.mcp_registries?.length)return{accessMode:"fallback",errorMessage:"Registry allowlist is empty - allowlist feature is disabled"};let n=e.mcp_registries[0];return{accessMode:n.registry_access,registryUrl:n.url,owner:n.owner}}async fetchServer(e,r,n){let o=encodeURIComponent(r),s=encodeURIComponent(n),c=`${e}/${o}/versions/${s}`;if(this.serverCache&&this.isServerCacheValid(this.serverCache.timestamp)){let l=this.serverCache.data.get(c);if(l)return[l,null]}try{let u=await this.ctx.get(dr).fetch(c,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(u.status===404)return[null,{code:lt.InternalError,message:"Server not found"}];if(!u.ok)return[null,{code:lt.InternalError,message:`Failed to fetch server from registry: HTTP ${u.status}`}];let d=await u.text(),p=JSON.parse(d);return(!this.serverCache||!this.isServerCacheValid(this.serverCache.timestamp))&&(this.serverCache={timestamp:Date.now(),data:new Map}),this.serverCache.data.set(c,p),[p,null]}catch(l){return[null,{code:lt.InternalError,message:`Failed to fetch server from registry: ${l instanceof Error?l.message:String(l)}`}]}}};f();var oPa=S.Object({url:S.String(),source:S.String(),id:S.String(),subfolder:S.Optional(S.String())}),Epi=S.Object({description:S.Optional(S.String()),isRequired:S.Optional(S.Boolean()),format:S.Optional(S.Union([S.Literal("string"),S.Literal("number"),S.Literal("boolean"),S.Literal("filepath")])),value:S.Optional(S.String()),isSecret:S.Optional(S.Boolean()),default:S.Optional(S.String()),placeholder:S.Optional(S.String()),choices:S.Optional(S.Array(S.String()))}),bAr=S.Intersect([Epi,S.Object({variables:S.Optional(S.Record(S.String(),Epi))})]),sPa=S.Intersect([bAr,S.Object({type:S.Literal("positional"),valueHint:S.Optional(S.String()),isRepeated:S.Optional(S.Boolean())})]),aPa=S.Intersect([bAr,S.Object({type:S.Literal("named"),name:S.String(),isRepeated:S.Optional(S.Boolean())})]),Cpi=S.Union([sPa,aPa]),kPe=S.Intersect([bAr,S.Object({name:S.String()})]),cPa=S.Object({registryType:S.String(),registryBaseUrl:S.Optional(S.String()),identifier:S.String(),version:S.Optional(S.String()),fileSha256:S.Optional(S.String()),runtimeHint:S.Optional(S.String()),transport:S.Optional(S.Union([S.Object({type:S.Literal("stdio")}),S.Object({type:S.Literal("streamable-http"),url:S.String(),headers:S.Optional(S.Array(kPe))}),S.Object({type:S.Literal("sse"),url:S.String(),headers:S.Optional(S.Array(kPe))})])),runtimeArguments:S.Optional(S.Array(Cpi)),packageArguments:S.Optional(S.Array(Cpi)),environmentVariables:S.Optional(S.Array(kPe))}),lPa=S.Union([S.Object({type:S.Literal("streamable-http"),url:S.String(),headers:S.Optional(S.Array(kPe))}),S.Object({type:S.Literal("sse"),url:S.String(),headers:S.Optional(S.Array(kPe))})]),uPa=S.Object({src:S.String(),mimeType:S.Optional(S.Union([S.Literal("image/png"),S.Literal("image/jpeg"),S.Literal("image/jpg"),S.Literal("image/svg+xml"),S.Literal("image/webp")])),sizes:S.Optional(S.Array(S.String())),theme:S.Optional(S.Union([S.Literal("light"),S.Literal("dark")]))}),dPa=S.Object({status:S.Optional(S.Union([S.Literal("active"),S.Literal("deprecated"),S.Literal("deleted")])),publishedAt:S.Optional(S.String()),updatedAt:S.Optional(S.String()),isLatest:S.Optional(S.Boolean())},{additionalProperties:!1}),fPa=S.Object({"io.modelcontextprotocol.registry/publisher-provided":S.Optional(S.Object({tool:S.Optional(S.String()),version:S.Optional(S.String()),buildInfo:S.Optional(S.Object({commit:S.Optional(S.String()),timestamp:S.Optional(S.String()),pipelineId:S.Optional(S.String())}))},{additionalProperties:!0}))},{additionalProperties:!0}),pPa=S.Object({"io.modelcontextprotocol.registry/official":S.Optional(dPa)},{additionalProperties:!0}),hPa=S.Object({name:S.String(),description:S.String(),title:S.Optional(S.String()),repository:S.Optional(oPa),version:S.String(),websiteUrl:S.Optional(S.String()),icons:S.Optional(S.Array(uPa)),$schema:S.Optional(S.String()),packages:S.Optional(S.Array(cPa)),remotes:S.Optional(S.Array(lPa)),_meta:S.Optional(fPa)}),mPa=S.Object({server:hPa,_meta:pPa}),FRf=S.Object({servers:S.Array(mPa),metadata:S.Optional(S.Object({nextCursor:S.Optional(S.String()),count:S.Optional(S.Number())}))}),_pi=S.Object({baseUrl:S.String(),cursor:S.Optional(S.String()),limit:S.Optional(S.Number({minimum:1})),search:S.Optional(S.String()),updatedSince:S.Optional(S.String()),version:S.Optional(S.String())}),vpi=S.Object({baseUrl:S.String(),serverName:S.String(),version:S.String()});var NPe="mcp.registry.listServers",m0e="mcp.registry.getServer";async function gPa(t,e,r,n){return await t.get(_2).fetchServer(e,r,n)}a(gPa,"fetchServer");async function APa(t,e,r){if(!r.baseUrl)return[null,{code:lt.InvalidParams,message:"Base URL is required"}];let n=t.get(dr),o=new URLSearchParams;r.limit!==void 0&&o.append("limit",r.limit.toString()),r.cursor!==void 0&&o.append("cursor",r.cursor),r.search!==void 0&&o.append("search",r.search),r.updatedSince!==void 0&&o.append("updated_since",r.updatedSince),r.version!==void 0&&o.append("version",r.version);let s=`${r.baseUrl}${o.toString()?`?${o.toString()}`:""}`;try{let c=await n.fetch(s,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!c.ok){let d=`MCP Registry API error: HTTP ${c.status}`;return Kp(t,NPe,yt.createAndMarkAsIssued({message:d})),[null,{code:lt.InternalError,message:d}]}let l=await c.text(),u=JSON.parse(l);return at(t,NPe,yt.createAndMarkAsIssued()),yi(t,NPe),[u,null]}catch(c){_u(t,NPe,c);let l=`Failed to fetch servers from MCP Registry: ${c instanceof Error?c.message:String(c)}`;return Kp(t,NPe,yt.createAndMarkAsIssued({message:l})),[null,{code:lt.InternalError,message:l}]}}a(APa,"handleListServersChecked");async function yPa(t,e,r){if(e.isCancellationRequested)return[null,{code:lt.RequestCancelled,message:"Request was cancelled"}];if(!r.baseUrl)return[null,{code:lt.InvalidParams,message:"Base URL is required"}];if(!r.serverName)return[null,{code:lt.InvalidParams,message:"Server name is required"}];if(!r.version)return[null,{code:lt.InvalidParams,message:"Version is required"}];let[n,o]=await gPa(t,r.baseUrl,r.serverName,r.version);if(o){let s={message:o.message};return Kp(t,m0e,yt.createAndMarkAsIssued(s)),yi(t,m0e,s),[null,o]}if(!n){let s="Failed to retrieve server data",c={message:s};return Kp(t,m0e,yt.createAndMarkAsIssued(c)),yi(t,m0e,c),[null,{code:lt.InternalError,message:s}]}return at(t,m0e,yt.createAndMarkAsIssued()),yi(t,m0e),[n,null]}a(yPa,"handleGetServerChecked");var bpi=He(_pi,APa),Tpi=He(vpi,yPa);f();f();var Spi=S.Object({}),EPa=S.Object({login:S.String(),id:S.Number(),type:S.String(),parent_login:S.Union([S.String(),S.Null()]),parent_id:S.Union([S.Number(),S.Null()])}),CPa=S.Object({url:S.String(),registry_access:S.Union([S.Literal("registry_only"),S.Literal("allow_all")]),owner:EPa}),t2f=S.Object({mcp_registries:S.Array(CPa)});async function _Pa(t){return await t.get(_2).fetchMcpRegistryAllowlist()}a(_Pa,"fetchMcpRegistryAllowlist");async function vPa(t,e,r){try{if(e.isCancellationRequested)return[null,{code:lt.RequestCancelled,message:"Request was cancelled"}];let[n,o]=await _Pa(t);return o?[null,o]:n?n.mcp_registries.length===0?[n,null]:[n,null]:[null,{code:lt.InternalError,message:"Failed to retrieve MCP registry allowlist data"}]}catch(n){return[null,{code:lt.InternalError,message:`Unexpected error in MCP registry allowlist handler: ${n instanceof Error?n.message:String(n)}`}]}}a(vPa,"handleGetMcpRegistryAllowlistChecked");var Ipi=He(Spi,vPa);f();var Rpi=de(KW()),Ppi=de(ZE());f();var bPa=S.Object({edits:S.Array(S.Object({text:S.String(),range:S.Object({start:S.Object({line:S.Number(),character:S.Number()}),end:S.Object({line:S.Number(),character:S.Number()})}),predictedCursorPosition:S.Object({line:S.Number(),character:S.Number()})}))}),lq=class{constructor(e){this.edits=e}static{a(this,"ExternalTestingNextEditDocuments")}},TAr=new Se("setNextEditDocument");function TPa(t,e,r){return TAr.debug(t,`Set Next Edit documents: ${JSON.stringify(r)}`),t.forceSet(lq,new lq(r.edits)),["OK",null]}a(TPa,"handleTestingSetNextEditDocumentChecked");var xpi=He(bPa,TPa);function wpi(t,e,r,n){let o=t.get(lq);if(o.edits&&o.edits.length>0){let s=o.edits.filter(c=>e.line===c.predictedCursorPosition.line&&e.character===c.predictedCursorPosition.character);return s.length===0?(TAr.debug(t,`No edits match current position ${JSON.stringify(e)}, returning empty results`),[]):(TAr.debug(t,`Returning ${s.length} matching Next Edit documents`),s.map(c=>SPa(c,r,n)))}}a(wpi,"getTestNextEditSuggestions");function SPa(t,e,r){return{text:t.text,textDocument:{uri:e,version:r},range:t.range,command:{title:"Accept inline edit",command:"github.copilot.didAcceptNextEditSuggestionItem",arguments:[yr()]}}}a(SPa,"createNextEditSuggestion");async function IPa(t,e,r){if(r.textDocument.version===void 0)throw new Error("textDocument.version is undefined");let n=ha(r.textDocument.uri),o=wpi(t,r.position,n,r.textDocument.version);if(o)return[{edits:o},null];let s=t.get(_b);t.get(Rpi.ObservableWorkspace).onUserPositionChange(n,new Ppi.Position(r.position.line,r.position.character));let c=await s.handleNextEditRequest(n,r.textDocument.version,e);return c?[{edits:c.map(u=>({text:u.edit.text,textDocument:u.edit.textDocument,range:u.edit.range,command:{title:"Accept inline edit",command:STe,arguments:[u.id]}}))},null]:[{edits:[]},null]}a(IPa,"handleChecked");var kpi=He(Z$r,IPa);f();var wPa=S.Object({uuid:S.String({minLength:1}),acceptedLength:S.Optional(S.Number({minimum:1}))});function RPa(t,e,r){let n=t.get(Cl),o=n.get(r.uuid);return o&&(PPa(r,o)==="full"?(n.delete(r.uuid),Xae(t,o,o.triggerCategory)):WJe(t,o,r.acceptedLength,0,o.triggerCategory,"cumulative")),["OK",null]}a(RPa,"notifyAcceptedChecked");function PPa(t,e){return t.acceptedLength===void 0?"full":t.acceptedLengthn.get(s)??[]);if(o.length>0){let s=o[0];for(let l of r.uuids)n.delete(l);let c=o.map(l=>({completionText:l.displayText,completionTelemetryData:l.telemetry}));VJe(t,"ghostText",s.offset,s.uri,c),t.get(jm).resetState()}return["OK",null]}a(NPa,"notifyRejectedChecked");var Dpi=He(kPa,NPa);f();var DPa=S.Object({uuid:S.String({minLength:1})});function MPa(t,e,r){let o=t.get(Cl).get(r.uuid);return o&&jYe(t,o.triggerCategory,o),["OK",null]}a(MPa,"notifyShownChecked");var Mpi=He(DPa,MPa);f();var OPa=kvn;function BPa(t,e,r){let n=t.get(k0),o={unregistered:[],registered:[]};return r.providers.forEach(s=>{try{let c=new l0e(t,s.id,s.selector);n.registerContextProvider(c),o.registered.push(s.id)}catch{o.unregistered.push(s.id)}}),[o,null]}a(BPa,"registerContextProviders");var Opi=He(OPa,BPa);f();f();var LPa=S.Object({uri:S.Optional(S.String())}),FPa=S.Object({showEditorCompletions:S.Optional(S.Boolean()),enableAutoCompletions:S.Optional(S.Boolean()),delayCompletions:S.Optional(S.Boolean()),filterCompletions:S.Optional(S.Boolean())}),Lpi=S.Object({github:S.Optional(S.Object({copilot:S.Optional(S.Object({}))})),[L1r]:S.Optional(LPa),http:S.Optional(N6r),telemetry:S.Optional(S.Object({telemetryLevel:S.Optional(S.String())}))}),DPe=Object.keys(Lpi.properties).filter(t=>t!=="github"),UPa=S.Intersect([Lpi,FPa]),QPa=S.Object({settings:S.Optional(S.Union([S.Object({}),S.Array(S.Unknown(),{maxItems:0})])),authProvider:S.Optional(S.Never())}),Bpi=Ol.Compile(QPa),SAr=Ol.Compile(UPa);function g0e(t){if(typeof t=="string")return{type:"content",content:t};if(t&&typeof t=="object"){let e=t;if(e.type==="uri"&&typeof e.uri=="string")return{type:"uri",uri:e.uri};if(e.type==="content"&&typeof e.content=="string")return{type:"content",content:e.content};if(typeof e.uri=="string")return{type:"uri",uri:e.uri};if(typeof e.content=="string")return{type:"content",content:e.content}}return{type:"content",content:""}}a(g0e,"normalizePromptSetting");async function Nft(t,e){if(!Bpi.Check(e))throw kft(t),new Om(Bpi.Errors(e));let r=Array.isArray(e.settings)?{}:e.settings;return r&&qPa(t,r),kft(t,r),Promise.resolve()}a(Nft,"notifyChangeConfiguration");function qPa(t,e){for(let n of SAr.Errors(e)){let o=n.path.split("/")?.[1];Ka.warn(t,`Invalid ${n.path.slice(1).replace(/\//g,".")} setting:`,n.message),delete e[o]}if(!SAr.Check(e))throw new Om(SAr.Errors(e));e.http&&IAr(t,e.http);let r=e["github-enterprise"];r&&rbr(t,r.uri),e.github?.copilot&&GPa(t,e.github.copilot)}a(qPa,"applySettingsToConfiguration");function GPa(t,e){let r=t.get(TC),n={};for(let o of Object.values(tt)){let s=O6r(e,o);n[o]=s}r.setCopilotSettings(n),typeof e.mcp=="string"&&JPa(t,e.mcp),e.agent&&typeof e.agent=="object"&&(XPa(t,e.agent),ZPa(t,e.agent),eka(t,e.agent)),HPa(t,e.globalCopilotInstructions),jPa(t,e.globalGitCommitInstructions),$Pa(t,e.globalAgentsMdInstructions),VPa(t,e.globalClaudeMdInstructions),WPa(t,e.globalInstructionFiles),zPa(t,e.globalPromptFiles),YPa(t,e.instructionFileLocations),KPa(t,e.promptFileLocations)}a(GPa,"applyCopilotConfiguration");function HPa(t,e){try{t.get(od).setGlobalCopilotInstructions(g0e(e))}catch(r){Ka.error(t,"Failed to apply global Copilot instructions configuration",r)}}a(HPa,"applyGlobalCopilotInstructionsConfiguration");function jPa(t,e){try{t.get(od).setGlobalGitCommitInstructions(g0e(e))}catch(r){Ka.error(t,"Failed to apply global Git commit instructions configuration",r)}}a(jPa,"applyGlobalGitCommitInstructionsConfiguration");function $Pa(t,e){try{t.get(od).setGlobalAgentsMdInstructions(g0e(e))}catch(r){Ka.error(t,"Failed to apply global Agents.md instructions configuration",r)}}a($Pa,"applyGlobalAgentsMdInstructionsConfiguration");function VPa(t,e){try{t.get(od).setGlobalClaudeMdInstructions(g0e(e))}catch(r){Ka.error(t,"Failed to apply global Claude.md instructions configuration",r)}}a(VPa,"applyGlobalClaudeMdInstructionsConfiguration");function WPa(t,e){try{let r=t.get(od),n=(e||[]).map(g0e);r.setGlobalInstructionFiles(n)}catch(r){Ka.error(t,"Failed to apply global instruction files configuration",r)}}a(WPa,"applyGlobalInstructionFilesConfiguration");function zPa(t,e){try{let r=t.get(uy),n=(e||[]).map(g0e);r.setGlobalPromptFiles(n)}catch(r){Ka.error(t,"Failed to apply global prompt files configuration",r)}}a(zPa,"applyGlobalPromptFilesConfiguration");function YPa(t,e){try{let r=t.get(od);e&&r.setInstructionFileLocations(e.workspaceUri,e.locations)}catch(r){Ka.error(t,"Failed to apply instruction file locations configuration",r)}}a(YPa,"applyInstructionFileLocationsConfiguration");function KPa(t,e){try{let r=t.get(uy);e&&r.setPromptFileLocations(e.workspaceUri,e.locations)}catch(r){Ka.error(t,"Failed to apply prompt file locations configuration",r)}}a(KPa,"applyPromptFileLocationsConfiguration");function IAr(t,e){let r=t.get(TC);e.proxy===void 0&&(e=D6r(r.env));try{r.setHttpSettings(gye(e))}catch(n){if(!(n instanceof TypeError))throw n;Ka.warn(t,"Invalid proxy URL",e.proxy,n),r.setHttpSettings({proxy:""})}}a(IAr,"applyHttpConfiguration");async function JPa(t,e){try{let r=JSON.parse(e||"{}");await t.get(MA).updateMCPServers(r)}catch(r){Ka.error(t,"Failed to apply MCP configuration",r)}}a(JPa,"applyMCPConfiguration");function XPa(t,e){try{let r=e;t.get(uw).updateConfiguration(r.tools?.terminal?.autoApprove)}catch(r){Ka.error(t,"Failed to apply settings configuration",r)}}a(XPa,"applyTerminalAutoApproveConfiguration");function ZPa(t,e){try{let r=e;t.get(KT).updateRulesFromConfiguration(r.tools?.edit?.autoApprove)}catch(r){Ka.error(t,"Failed to apply edit auto approve configuration",r)}}a(ZPa,"applyEditAutoApproveConfiguration");function eka(t,e){try{let r=e;t.get(FO).updateConfiguration(r.tools?.mcp?.autoApprove)}catch(r){Ka.error(t,"Failed to apply MCP auto approve configuration",r)}}a(eka,"applyMCPAutoApproveConfiguration");function kft(t,e){if(t.get(TC).markReady(),!t.get(Fn).getCapabilities().redirectedTelemetry){let r=(e?.telemetry?.telemetryLevel??"all")==="all";t.get(i0).initialize(r)}}a(kft,"initializePostConfigurationDependencies");var Fpi=S.Object({name:S.String(),version:S.String(),readableName:S.Optional(S.String())}),tka=S.Object({editorInfo:Fpi,editorPluginInfo:Fpi,editorConfiguration:S.Optional(S.Object({}))});async function rka(t,e,r){t.get(Nr).setEditorAndPluginInfo(r.editorPluginInfo,r.editorInfo),zJe(t,["setEditorInfo is deprecated. Use initializationOptions for editorInfo and editorPluginInfo","and workspace/didChangeConfiguration for editorConfiguration."]),await Nft(t,{settings:r.editorConfiguration}),at(t,"setEditorInfo");for(let n of["github",...DPe])r.editorConfiguration&&n in r.editorConfiguration&&at(t,`setEditorInfo.editorConfiguration.${n}`);return["OK",null]}a(rka,"handleSetEditorInfoChecked");var Upi=He(tka,rka);f();var nka=S.Object({options:S.Optional(S.Object({}))});async function ika(t,e,r){let n=t.get(Gv),o=n.pendingSignIn?.status;if(o===void 0)return[null,{code:lt.InvalidRequest,message:"No pending sign in"}];let s;try{return s=await o,[s,null]}catch(c){return[null,{code:lt.DeviceFlowFailed,message:String(c)}]}finally{n.pendingSignIn=void 0}}a(ika,"handleSignInConfirmChecked");var Qpi=He(nka,ika);f();var oka=S.Object({options:S.Optional(S.Object({})),githubAppId:S.Optional(S.String())});async function ska(t,e,r){try{let o=await t.get(en).checkAndUpdateStatus({githubAppId:r.githubAppId});if(o.status==="OK")return[{status:"AlreadySignedIn",user:o.user},null];let c=await t.get(Gv).initiate(r);return[{status:"PromptUserDeviceFlow",userCode:c.user_code,verificationUri:c.verification_uri,expiresIn:c.expires_in,interval:c.interval,command:{command:YJe,title:"Sign in with GitHub",arguments:[]}},null]}catch(n){if(!(n instanceof no))throw n;return[null,{code:lt.DeviceFlowFailed,message:n.message}]}}a(ska,"handleSignInInitiateChecked");var xAr=He(oka,ska);f();f();f();function qpi(){return!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY||(process.platform==="linux"||process.platform==="freebsd"||process.platform==="openbsd")&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY)}a(qpi,"isBrowserAvailable");function aka(t,e){let n=(e!==void 0?Q5e(e):t.get(jp).getConfiguredUrls().serverUrl).replace(/\/$/,"");return{issuer:n,authorization_endpoint:`${n}/login/oauth/authorize`,token_endpoint:`${n}/login/oauth/access_token`,response_types_supported:["code"],code_challenge_methods_supported:["S256"],grant_types_supported:["authorization_code"],scopes_supported:["repo","workflow","user","read:org"]}}a(aka,"getGitHubOAuthServerMetadata");async function Dft(t,e,r={},n){let o=performance.now();Zae(t,"codeFlow");let s={status:"NotSignedIn"};try{if(!qpi())throw new NL("Browser not available (SSH session or headless environment). Cannot perform OAuth code flow.");let c=aka(t,r.serverUrl),l=e(t,c),u=r.scopes??["repo","workflow"],d=await l.createSession(u,{cancellationToken:n}),p=d.scopes||u,h=t.get(qc).findAppIdToAuthenticate(),m;try{m=new URL(c.issuer).hostname}catch{throw new no(`Invalid authentication server URL: ${c.issuer}`)}return s=await t.get(en).saveAndActivateSession({oauth_token:d.accessToken,user:d.account.label,githubAppId:h,authAuthority:m,scopes:p?[...p]:void 0}),$w(t,"codeFlow",s.status,performance.now()-o),s}catch(c){throw $w(t,"codeFlow",s.status,performance.now()-o,c),c}}a(Dft,"performGitHubOAuthCodeFlow");f();f();f();async function lX(t,e,r,n,o){return await t.get(dr).fetch(new URL(e).href,{method:r,headers:n,body:o})}a(lX,"fetchOauthServer");async function wAr(t){try{return await t.text()}catch{return t.statusText}}a(wAr,"getErrText");f();MLe();var A0e=class extends ip{constructor(r,n=new RAr){super();this.ctx=r;this.fallback=n}static{a(this,"AgentUrlOpener")}async open(r){let n=this.ctx.get(Ar);if(!(n.clientCapabilities?.window?.showDocument?.support&&(await Promise.race([n.connection.window.showDocument({uri:r,external:!0}),new Promise((s,c)=>setTimeout(()=>c(new Error("window/showDocument timed out")),15e3))])).success))return this.fallback.open(r)}},RAr=class extends ip{static{a(this,"SpawnUrlOpener")}async open(e){await GAe(e)}};f();var Gpi=require("crypto"),Hpi=de(require("http"));f();var Mft=new Se("OAuth Code Flow");function PAr(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n({id:p.fullDatabaseId,number:p.number,title:p.title,user:p.author,html_url:p.url,draft:p.isDraft,body:p.body,repository:p.repository}));n.push(...d),s=u.search.pageInfo.hasNextPage,o=u.search.pageInfo.endCursor}return Mdt.debug(this.ctx,`Found ${n.length} pull requests`),n}catch(n){if(Mdt.error(this.ctx,`Failed to search pull requests with query '${e}':`,n),n&&typeof n=="object"&&"status"in n){let o=n;throw new fp(o.status,o.message||"GitHub GraphQL API failed")}throw n}}async getApiSession(){let e=await this.ctx.get(en).getSession();if(!e)throw new wT;return{apiUrl:e.apiUrl.replace(/\/$/,""),accessToken:e.accessToken}}};var Jka=S.Object({query:S.String(),workspaceFolder:S.Optional(S.String()),workspaceFolders:S.Optional(S.Array(dh))}),chi=4,xfe=class extends Error{static{a(this,"TemplateVariableSubstituteError")}constructor(e,r){super(e),this.errorCode=r}};async function Xka(t,e,r){try{let n=new Odt(t),o=await e5a(t,r),s=await n.searchPullRequests(o);await Zka(t,s);let c=t5a(s);return st(t,"githubApi.searchPR",Pt.createAndMarkAsIssued()),rr(t,"githubApi.searchPR",void 0,c),[{pullRequests:s},null]}catch(n){if(n instanceof xfe)return[null,{code:n.errorCode,message:n.message}];if(n instanceof wT)return[null,{code:ct.NoGitHubToken,message:n.message}];if(Lo(t,n,"githubApi.searchPR"),Sa(t,"githubApi.searchPR",n),n instanceof fp&&n.isClientError())return[null,{code:ct.InvalidRequest,message:n.message}];if(n instanceof Error)return[null,{code:ct.InternalError,message:`Unexpected error happened: ${n.message}`}];let o=JSON.stringify(n)??String(n);return[null,{code:ct.InternalError,message:`Unexpected error happened: ${o}`}]}}a(Xka,"handleSearchPRChecked");async function Zka(t,e){let r=new KE(t);for(let n=0;n{try{c.copilotWorkStatus=await r.getCopilotWorkingStatus(c.repository.owner.login,c.repository.name,c.number,c.user?.login)}catch{c.copilotWorkStatus="not_copilot_issue"}});await Promise.all(s)}}a(Zka,"appendCopilotWorkStatus");async function e5a(t,e){let r=e.query;if(r.includes("${user}")){let n=await t.get(en).getSession();if(!n)throw new xfe("The user is not logged in.",ct.NoGitHubToken);r=r.replace(/\$\{user\}/g,n.login)}if(r.includes("${owner}")||r.includes("${repository}")){let n;if(e.workspaceFolders&&e.workspaceFolders.length>0)n=e.workspaceFolders[0];else if(e.workspaceFolder)n={uri:e.workspaceFolder};else throw new xfe("No workspace folder provided",ct.InvalidRequest);let s=await t.get(lm).getRepo(n);if(s&&s.owner&&s.name)r=r.replace(/\$\{owner\}/g,s.owner),r=r.replace(/\$\{repository\}/g,s.name);else{let c;s?!s.owner&&!s.name?c="Git repository detected but both owner and repository name information are missing. Ensure the repository has a valid remote origin.":s.owner?s.name||(c="Git repository detected but repository name is missing. Ensure the repository has a valid remote origin."):c="Git repository detected but owner information is missing. Ensure the repository has a valid remote origin.":c="The workspace folder is not a GitHub repository.";let l=`Cannot obtain GitHub information for workspace folder: ${n.uri}. Template variables \${owner} and \${repository} require a valid Git repository with remote GitHub origin configured: ${c}`;throw new xfe(l,ct.InvalidRequest)}}return r}a(e5a,"replaceTemplateVariables");function t5a(t){let e=0,r=0,n=0,o=0;for(let s of t)switch(s.copilotWorkStatus){case"in_progress":e++;break;case"done":r++;break;case"error":n++;break;case"not_copilot_issue":default:o++;break}return{totalPRs:t.length,inProgressPRs:e,donePRs:r,errorPRs:n,notCopilotPRs:o}}a(t5a,"buildCopilotWorkStatusMeasurements");var lhi=He(Jka,Xka);f();var dhi=fPt.type,x2e;function uhi(t){return{title:"Completion Accepted",command:vbe,arguments:[t]}}a(uhi,"makeCommand");async function r5a(t,e,r){x2e&&(x2e.cancel(),x2e.dispose());let n=r.context.triggerKind===1;x2e=new Cn.CancellationTokenSource;let o=x2e.token,s=new SA([e,o]);r.contextItems&&Rdt(t,r.contextItems,r.data);let c=Pdt(t,r.position,r.textDocument.uri,n);if(c)return[{items:c.map(g=>({command:uhi(yr()),...g}))},null];let l=await C3(t,r.textDocument,s),u=r.position,d=await t.get(Dm).getCompletions(l,u,s,{isCycling:n,selectedCompletionInfo:r.context.selectedCompletionInfo,formattingOptions:r.formattingOptions,data:r.data});if(!d)return e.isCancellationRequested?[null,{code:ct.RequestCancelled,message:"Request was canceled"}]:o.isCancellationRequested?[null,{code:ct.ServerCancelled,message:"Request was superseded by a new request"}]:[{items:[]},null];let p=t.get(pl);for(let m of d)p.set(m.uuid,{...m,triggerCategory:"ghostText"});return[{items:d.map(m=>({command:uhi(m.uuid),insertText:m.insertText,range:m.range}))},null]}a(r5a,"handleChecked");var fhi=He(Dbn,(t,e,r)=>r5a(t,e,r));f();f();function qAr(t){let e=t.indexOf("-----BEGIN CERTIFICATE-----")+27,r=t.indexOf("-----END CERTIFICATE-----"),n=30,o=t.substring(e,e+n)+"..."+t.substring(r-n,r-1);return wfe(o)}a(qAr,"asReadableCert");function wfe(t){return t.replace(/\s/g,"")}a(wfe,"normalizeNewlines");var i5a=S.Object({});async function o5a(t){return[{certificates:(await t.get(Od).getAllRootCAs()).map(wfe)},null]}a(o5a,"handleListCertificatesChecked");var phi=He(i5a,o5a);f();f();f();var hhi=de(mu());var GAr=class extends hhi.ResponseError{static{a(this,"BaseMcpRegistryError")}constructor(e,r,n,o=ct.InternalError){super(o,e,{errorType:r,...n})}},mJ=class extends GAr{static{a(this,"HttpStatusError")}constructor(e,r,n,o=ct.InternalError){super(e,r,{status:n},o)}},Bdt=class extends mJ{static{a(this,"AuthError")}constructor(e){super("Missing or invalid authentication token for MCP registry allowlist","authError",e,ct.NoCopilotToken)}},Ldt=class extends mJ{static{a(this,"PermissionError")}constructor(e){super("MCP is disabled for this user","permissionError",e)}};var Fdt=class extends mJ{static{a(this,"TransientError")}constructor(e){let r=`Transient server error when fetching MCP registry allowlist: HTTP ${e}`;super(r,"transientError",e)}};f();function mhi(t){try{if(!("x-metadata"in t))return null;let e=t["x-metadata"];if(typeof e!="object"||e===null)return null;let r=e.registry;if(typeof r!="object"||r===null)return null;let n=r,o=n.api,s=n.mcpServer;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return null;let c=o,l=s;return typeof c.baseUrl=="string"&&c.baseUrl.length>0&&typeof c.version=="string"&&c.version.length>0&&typeof l.name=="string"&&l.name.length>0&&typeof l.version=="string"&&l.version.length>0?{api:{baseUrl:c.baseUrl,version:c.version},mcpServer:{name:l.name,version:l.version},...Object.fromEntries(Object.entries(n).filter(([u])=>!["api","mcpServer"].includes(u)))}:null}catch{return null}}a(mhi,"getRegistryMetadataFromConfig");function ghi(t,e){try{let r=e.server;return"command"in t?!0:"url"in t?s5a(t,r):!1}catch{return!1}}a(ghi,"validateServerConfigurationMatch");function s5a(t,e){if(!e.remotes||e.remotes.length===0)return!1;let r=a(o=>o.replace(/\/+$/,""),"normalizeUrl"),n=r(t.url);return e.remotes.some(o=>r(o.url)===n)}a(s5a,"validateRemoteURL");var Ahi=300*1e3,u2=class{constructor(e){this.allowlistCache=null;this.serverCache=null;this.ctx=e}static{a(this,"McpRegistryService")}isAllowlistCacheValid(e,r){return Date.now()-e=500&&u<600?[null,new Fdt(u)]:[null,new mJ(`Failed to fetch MCP registry allowlist: HTTP ${u}`,"httpError",u)]}}try{let u=await s.text();c=JSON.parse(u)}catch(u){return[null,{code:ct.InternalError,message:`Failed to parse MCP registry allowlist: ${u instanceof Error?u.message:String(u)}`}]}return!c.mcp_registries||!Array.isArray(c.mcp_registries)?[null,{code:ct.InternalError,message:"Invalid allowlist format: expected mcp_registries array"}]:c.mcp_registries.some(u=>!u.url||!u.registry_access)?[null,{code:ct.InternalError,message:"Invalid allowlist format: registry entries missing required fields"}]:(this.allowlistCache={timestamp:Date.now(),data:c,userLogin:r},[c,null])}catch(e){return[null,{code:ct.InternalError,message:`Failed to fetch MCP registry allowlist: ${e instanceof Error?e.message:String(e)}`}]}}async validateServerConfig(e,r){try{let n=await this.getRegistryInfo();if(n.accessMode==="fallback")return{serverName:e,serverConfig:r,isBlocked:!1};let o=n.registryUrl,s=n.owner,c=await this.checkServerInRegistry(r,o);if(n.accessMode==="allow_all")return{serverName:e,serverConfig:r,isBlocked:!1,registryInfo:c.isFoundInRegistry?s?`Provided by ${s.login} organization`:"Provided by organization":void 0};{let l=!c.isFoundInRegistry;return{serverName:e,serverConfig:r,isBlocked:l,blockReason:l?c.validationError:void 0,registryInfo:l?s?`Blocked by ${s.login} organization registry policy`:"Blocked by organization registry policy":s?`Provided by ${s.login} organization`:"Provided by organization"}}}catch(n){return{serverName:e,serverConfig:r,isBlocked:!0,blockReason:`validation failed: ${n instanceof Error?n.message:String(n)}`,registryInfo:"Blocked by organization registry policy"}}}async checkServerInRegistry(e,r){let n=mhi(e);if(!n)return{isFoundInRegistry:!1,validationError:"does not have valid registry config"};let o=n.mcpServer.name,s=n.mcpServer.version,c=n.api.baseUrl,l=n.api.version,u=a(m=>m.replace(/\/+$/,""),"normalizeUrl");if(u(c)!==u(r))return{isFoundInRegistry:!1,validationError:`does not match allowed registry Url, expected: ${r}, found: ${c}`};let d=`${c.replace(/\/+$/,"")}/${l}/servers`,[p,h]=await this.fetchServer(d,o,s);return p&&!h?ghi(e,p)?{isFoundInRegistry:!0}:{isFoundInRegistry:!1,validationError:"url"in e?"remote server URL does not match any registry remote URL":"local configuration does not match registry server configuration"}:{isFoundInRegistry:!1,validationError:h?`Server validation failed: ${h.message}`:`Server not found in registry ${c}`}}async getRegistryInfo(){let[e,r]=await this.fetchMcpRegistryAllowlist();if(r)return{accessMode:"fallback",errorMessage:`Failed to fetch registry allowlist: ${r.message}`};if(!e?.mcp_registries?.length)return{accessMode:"fallback",errorMessage:"Registry allowlist is empty - allowlist feature is disabled"};let n=e.mcp_registries[0];return{accessMode:n.registry_access,registryUrl:n.url,owner:n.owner}}async fetchServer(e,r,n){let o=encodeURIComponent(r),s=encodeURIComponent(n),c=`${e}/${o}/versions/${s}`;if(this.serverCache&&this.isServerCacheValid(this.serverCache.timestamp)){let l=this.serverCache.data.get(c);if(l)return[l,null]}try{let u=await this.ctx.get(dr).fetch(c,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(u.status===404)return[null,{code:ct.InternalError,message:"Server not found"}];if(!u.ok)return[null,{code:ct.InternalError,message:`Failed to fetch server from registry: HTTP ${u.status}`}];let d=await u.text(),p=JSON.parse(d);return(!this.serverCache||!this.isServerCacheValid(this.serverCache.timestamp))&&(this.serverCache={timestamp:Date.now(),data:new Map}),this.serverCache.data.set(c,p),[p,null]}catch(l){return[null,{code:ct.InternalError,message:`Failed to fetch server from registry: ${l instanceof Error?l.message:String(l)}`}]}}};f();var a5a=S.Object({url:S.String(),source:S.String(),id:S.String(),subfolder:S.Optional(S.String())}),yhi=S.Object({description:S.Optional(S.String()),isRequired:S.Optional(S.Boolean()),format:S.Optional(S.Union([S.Literal("string"),S.Literal("number"),S.Literal("boolean"),S.Literal("filepath")])),value:S.Optional(S.String()),isSecret:S.Optional(S.Boolean()),default:S.Optional(S.String()),placeholder:S.Optional(S.String()),choices:S.Optional(S.Array(S.String()))}),HAr=S.Intersect([yhi,S.Object({variables:S.Optional(S.Record(S.String(),yhi))})]),c5a=S.Intersect([HAr,S.Object({type:S.Literal("positional"),valueHint:S.Optional(S.String()),isRepeated:S.Optional(S.Boolean())})]),l5a=S.Intersect([HAr,S.Object({type:S.Literal("named"),name:S.String(),isRepeated:S.Optional(S.Boolean())})]),Ehi=S.Union([c5a,l5a]),w2e=S.Intersect([HAr,S.Object({name:S.String()})]),u5a=S.Object({registryType:S.String(),registryBaseUrl:S.Optional(S.String()),identifier:S.String(),version:S.Optional(S.String()),fileSha256:S.Optional(S.String()),runtimeHint:S.Optional(S.String()),transport:S.Optional(S.Union([S.Object({type:S.Literal("stdio")}),S.Object({type:S.Literal("streamable-http"),url:S.String(),headers:S.Optional(S.Array(w2e))}),S.Object({type:S.Literal("sse"),url:S.String(),headers:S.Optional(S.Array(w2e))})])),runtimeArguments:S.Optional(S.Array(Ehi)),packageArguments:S.Optional(S.Array(Ehi)),environmentVariables:S.Optional(S.Array(w2e))}),d5a=S.Union([S.Object({type:S.Literal("streamable-http"),url:S.String(),headers:S.Optional(S.Array(w2e))}),S.Object({type:S.Literal("sse"),url:S.String(),headers:S.Optional(S.Array(w2e))})]),f5a=S.Object({src:S.String(),mimeType:S.Optional(S.Union([S.Literal("image/png"),S.Literal("image/jpeg"),S.Literal("image/jpg"),S.Literal("image/svg+xml"),S.Literal("image/webp")])),sizes:S.Optional(S.Array(S.String())),theme:S.Optional(S.Union([S.Literal("light"),S.Literal("dark")]))}),p5a=S.Object({status:S.Optional(S.Union([S.Literal("active"),S.Literal("deprecated"),S.Literal("deleted")])),publishedAt:S.Optional(S.String()),updatedAt:S.Optional(S.String()),isLatest:S.Optional(S.Boolean())},{additionalProperties:!1}),h5a=S.Object({"io.modelcontextprotocol.registry/publisher-provided":S.Optional(S.Object({tool:S.Optional(S.String()),version:S.Optional(S.String()),buildInfo:S.Optional(S.Object({commit:S.Optional(S.String()),timestamp:S.Optional(S.String()),pipelineId:S.Optional(S.String())}))},{additionalProperties:!0}))},{additionalProperties:!0}),m5a=S.Object({"io.modelcontextprotocol.registry/official":S.Optional(p5a)},{additionalProperties:!0}),g5a=S.Object({name:S.String(),description:S.String(),title:S.Optional(S.String()),repository:S.Optional(a5a),version:S.String(),websiteUrl:S.Optional(S.String()),icons:S.Optional(S.Array(f5a)),$schema:S.Optional(S.String()),packages:S.Optional(S.Array(u5a)),remotes:S.Optional(S.Array(d5a)),_meta:S.Optional(h5a)}),A5a=S.Object({server:g5a,_meta:m5a}),YPf=S.Object({servers:S.Array(A5a),metadata:S.Optional(S.Object({nextCursor:S.Optional(S.String()),count:S.Optional(S.Number())}))}),_hi=S.Object({baseUrl:S.String(),cursor:S.Optional(S.String()),limit:S.Optional(S.Number({minimum:1})),search:S.Optional(S.String()),updatedSince:S.Optional(S.String()),version:S.Optional(S.String())}),Chi=S.Object({baseUrl:S.String(),serverName:S.String(),version:S.String()});var R2e="mcp.registry.listServers",Rfe="mcp.registry.getServer";async function y5a(t,e,r,n){return await t.get(u2).fetchServer(e,r,n)}a(y5a,"fetchServer");async function E5a(t,e,r){if(!r.baseUrl)return[null,{code:ct.InvalidParams,message:"Base URL is required"}];let n=t.get(dr),o=new URLSearchParams;r.limit!==void 0&&o.append("limit",r.limit.toString()),r.cursor!==void 0&&o.append("cursor",r.cursor),r.search!==void 0&&o.append("search",r.search),r.updatedSince!==void 0&&o.append("updated_since",r.updatedSince),r.version!==void 0&&o.append("version",r.version);let s=`${r.baseUrl}${o.toString()?`?${o.toString()}`:""}`;try{let c=await n.fetch(s,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!c.ok){let d=`MCP Registry API error: HTTP ${c.status}`;return jp(t,R2e,Pt.createAndMarkAsIssued({message:d})),[null,{code:ct.InternalError,message:d}]}let l=await c.text(),u=JSON.parse(l);return st(t,R2e,Pt.createAndMarkAsIssued()),rr(t,R2e),[u,null]}catch(c){Sa(t,R2e,c);let l=`Failed to fetch servers from MCP Registry: ${c instanceof Error?c.message:String(c)}`;return jp(t,R2e,Pt.createAndMarkAsIssued({message:l})),[null,{code:ct.InternalError,message:l}]}}a(E5a,"handleListServersChecked");async function _5a(t,e,r){if(e.isCancellationRequested)return[null,{code:ct.RequestCancelled,message:"Request was cancelled"}];if(!r.baseUrl)return[null,{code:ct.InvalidParams,message:"Base URL is required"}];if(!r.serverName)return[null,{code:ct.InvalidParams,message:"Server name is required"}];if(!r.version)return[null,{code:ct.InvalidParams,message:"Version is required"}];let[n,o]=await y5a(t,r.baseUrl,r.serverName,r.version);if(o){let s={message:o.message};return jp(t,Rfe,Pt.createAndMarkAsIssued(s)),rr(t,Rfe,s),[null,o]}if(!n){let s="Failed to retrieve server data",c={message:s};return jp(t,Rfe,Pt.createAndMarkAsIssued(c)),rr(t,Rfe,c),[null,{code:ct.InternalError,message:s}]}return st(t,Rfe,Pt.createAndMarkAsIssued()),rr(t,Rfe),[n,null]}a(_5a,"handleGetServerChecked");var vhi=He(_hi,E5a),bhi=He(Chi,_5a);f();f();var Thi=S.Object({}),C5a=S.Object({login:S.String(),id:S.Number(),type:S.String(),parent_login:S.Union([S.String(),S.Null()]),parent_id:S.Union([S.Number(),S.Null()])}),v5a=S.Object({url:S.String(),registry_access:S.Union([S.Literal("registry_only"),S.Literal("allow_all")]),owner:C5a}),fkf=S.Object({mcp_registries:S.Array(v5a)});async function b5a(t){return await t.get(u2).fetchMcpRegistryAllowlist()}a(b5a,"fetchMcpRegistryAllowlist");async function T5a(t,e,r){try{if(e.isCancellationRequested)return[null,{code:ct.RequestCancelled,message:"Request was cancelled"}];let[n,o]=await b5a(t);return o?[null,o]:n?n.mcp_registries.length===0?[n,null]:[n,null]:[null,{code:ct.InternalError,message:"Failed to retrieve MCP registry allowlist data"}]}catch(n){return[null,{code:ct.InternalError,message:`Unexpected error in MCP registry allowlist handler: ${n instanceof Error?n.message:String(n)}`}]}}a(T5a,"handleGetMcpRegistryAllowlistChecked");var Shi=He(Thi,T5a);f();var whi=de(nW()),Rhi=de(qE());f();var S5a=S.Object({edits:S.Array(S.Object({text:S.String(),range:S.Object({start:S.Object({line:S.Number(),character:S.Number()}),end:S.Object({line:S.Number(),character:S.Number()})}),predictedCursorPosition:S.Object({line:S.Number(),character:S.Number()})}))}),BQ=class{constructor(e){this.edits=e}static{a(this,"ExternalTestingNextEditDocuments")}},jAr=new Se("setNextEditDocument");function I5a(t,e,r){return jAr.debug(t,`Set Next Edit documents: ${JSON.stringify(r)}`),t.forceSet(BQ,new BQ(r.edits)),["OK",null]}a(I5a,"handleTestingSetNextEditDocumentChecked");var Ihi=He(S5a,I5a);function xhi(t,e,r,n){let o=t.get(BQ);if(o.edits&&o.edits.length>0){let s=o.edits.filter(c=>e.line===c.predictedCursorPosition.line&&e.character===c.predictedCursorPosition.character);return s.length===0?(jAr.debug(t,`No edits match current position ${JSON.stringify(e)}, returning empty results`),[]):(jAr.debug(t,`Returning ${s.length} matching Next Edit documents`),s.map(c=>x5a(c,r,n)))}}a(xhi,"getTestNextEditSuggestions");function x5a(t,e,r){return{text:t.text,textDocument:{uri:e,version:r},range:t.range,command:{title:"Accept inline edit",command:"github.copilot.didAcceptNextEditSuggestionItem",arguments:[yr()]}}}a(x5a,"createNextEditSuggestion");async function w5a(t,e,r){if(r.textDocument.version===void 0)throw new Error("textDocument.version is undefined");let n=ca(r.textDocument.uri),o=xhi(t,r.position,n,r.textDocument.version);if(o)return[{edits:o},null];let s=t.get(cb);t.get(whi.ObservableWorkspace).onUserPositionChange(n,new Rhi.Position(r.position.line,r.position.character));let c=await s.handleNextEditRequest(n,r.textDocument.version,e);return c?[{edits:c.map(u=>({text:u.edit.text,textDocument:u.edit.textDocument,range:u.edit.range,command:{title:"Accept inline edit",command:vbe,arguments:[u.id]}}))},null]:[{edits:[]},null]}a(w5a,"handleChecked");var Phi=He(XVr,w5a);f();var P5a=S.Object({uuid:S.String({minLength:1}),acceptedLength:S.Optional(S.Number({minimum:1}))});function k5a(t,e,r){let n=t.get(pl),o=n.get(r.uuid);return o&&(D5a(r,o)==="full"?(n.delete(r.uuid),fae(t,o,o.triggerCategory)):tJe(t,o,r.acceptedLength,0,o.triggerCategory,"cumulative")),["OK",null]}a(k5a,"notifyAcceptedChecked");function D5a(t,e){return t.acceptedLength===void 0?"full":t.acceptedLengthn.get(s)??[]);if(o.length>0){let s=o[0];for(let l of r.uuids)n.delete(l);let c=o.map(l=>({completionText:l.displayText,completionTelemetryData:l.telemetry}));eJe(t,"ghostText",s.offset,s.uri,c),t.get(Mm).resetState()}return["OK",null]}a(M5a,"notifyRejectedChecked");var Dhi=He(N5a,M5a);f();var O5a=S.Object({uuid:S.String({minLength:1})});function B5a(t,e,r){let o=t.get(pl).get(r.uuid);return o&&Xze(t,o.triggerCategory,o),["OK",null]}a(B5a,"notifyShownChecked");var Nhi=He(O5a,B5a);f();var L5a=Pbn;function F5a(t,e,r){let n=t.get(I0),o={unregistered:[],registered:[]};return r.providers.forEach(s=>{try{let c=new bfe(t,s.id,s.selector);n.registerContextProvider(c),o.registered.push(s.id)}catch{o.unregistered.push(s.id)}}),[o,null]}a(F5a,"registerContextProviders");var Mhi=He(L5a,F5a);f();f();var U5a=S.Object({uri:S.Optional(S.String())}),Q5a=S.Object({showEditorCompletions:S.Optional(S.Boolean()),enableAutoCompletions:S.Optional(S.Boolean()),delayCompletions:S.Optional(S.Boolean()),filterCompletions:S.Optional(S.Boolean())}),Bhi=S.Object({github:S.Optional(S.Object({copilot:S.Optional(S.Object({}))})),[rvr]:S.Optional(U5a),http:S.Optional(kFr),telemetry:S.Optional(S.Object({telemetryLevel:S.Optional(S.String())}))}),P2e=Object.keys(Bhi.properties).filter(t=>t!=="github"),q5a=S.Intersect([Bhi,Q5a]),G5a=S.Object({settings:S.Optional(S.Union([S.Object({}),S.Array(S.Unknown(),{maxItems:0})])),authProvider:S.Optional(S.Never())}),Ohi=wl.Compile(G5a),$Ar=wl.Compile(q5a);function Pfe(t){if(typeof t=="string")return{type:"content",content:t};if(t&&typeof t=="object"){let e=t;if(e.type==="uri"&&typeof e.uri=="string")return{type:"uri",uri:e.uri};if(e.type==="content"&&typeof e.content=="string")return{type:"content",content:e.content};if(typeof e.uri=="string")return{type:"uri",uri:e.uri};if(typeof e.content=="string")return{type:"content",content:e.content}}return{type:"content",content:""}}a(Pfe,"normalizePromptSetting");async function Qdt(t,e){if(!Ohi.Check(e))throw Udt(t),new Sm(Ohi.Errors(e));let r=Array.isArray(e.settings)?{}:e.settings;return r&&H5a(t,r),Udt(t,r),Promise.resolve()}a(Qdt,"notifyChangeConfiguration");function H5a(t,e){for(let n of $Ar.Errors(e)){let o=n.path.split("/")?.[1];$a.warn(t,`Invalid ${n.path.slice(1).replace(/\//g,".")} setting:`,n.message),delete e[o]}if(!$Ar.Check(e))throw new Sm($Ar.Errors(e));e.http&&VAr(t,e.http);let r=e["github-enterprise"];r&&Cbr(t,r.uri),e.github?.copilot&&j5a(t,e.github.copilot)}a(H5a,"applySettingsToConfiguration");function j5a(t,e){let r=t.get(f_),n={};for(let o of Object.values(tt)){let s=MFr(e,o);n[o]=s}r.setCopilotSettings(n),typeof e.mcp=="string"&&Z5a(t,e.mcp),e.agent&&typeof e.agent=="object"&&(eDa(t,e.agent),tDa(t,e.agent),rDa(t,e.agent)),$5a(t,e.globalCopilotInstructions),V5a(t,e.globalGitCommitInstructions),W5a(t,e.globalAgentsMdInstructions),z5a(t,e.globalClaudeMdInstructions),Y5a(t,e.globalInstructionFiles),K5a(t,e.globalPromptFiles),J5a(t,e.instructionFileLocations),X5a(t,e.promptFileLocations)}a(j5a,"applyCopilotConfiguration");function $5a(t,e){try{t.get(Ju).setGlobalCopilotInstructions(Pfe(e))}catch(r){$a.error(t,"Failed to apply global Copilot instructions configuration",r)}}a($5a,"applyGlobalCopilotInstructionsConfiguration");function V5a(t,e){try{t.get(Ju).setGlobalGitCommitInstructions(Pfe(e))}catch(r){$a.error(t,"Failed to apply global Git commit instructions configuration",r)}}a(V5a,"applyGlobalGitCommitInstructionsConfiguration");function W5a(t,e){try{t.get(Ju).setGlobalAgentsMdInstructions(Pfe(e))}catch(r){$a.error(t,"Failed to apply global Agents.md instructions configuration",r)}}a(W5a,"applyGlobalAgentsMdInstructionsConfiguration");function z5a(t,e){try{t.get(Ju).setGlobalClaudeMdInstructions(Pfe(e))}catch(r){$a.error(t,"Failed to apply global Claude.md instructions configuration",r)}}a(z5a,"applyGlobalClaudeMdInstructionsConfiguration");function Y5a(t,e){try{let r=t.get(Ju),n=(e||[]).map(Pfe);r.setGlobalInstructionFiles(n)}catch(r){$a.error(t,"Failed to apply global instruction files configuration",r)}}a(Y5a,"applyGlobalInstructionFilesConfiguration");function K5a(t,e){try{let r=t.get(ty),n=(e||[]).map(Pfe);r.setGlobalPromptFiles(n)}catch(r){$a.error(t,"Failed to apply global prompt files configuration",r)}}a(K5a,"applyGlobalPromptFilesConfiguration");function J5a(t,e){try{let r=t.get(Ju);e&&r.setInstructionFileLocations(e.workspaceUri,e.locations)}catch(r){$a.error(t,"Failed to apply instruction file locations configuration",r)}}a(J5a,"applyInstructionFileLocationsConfiguration");function X5a(t,e){try{let r=t.get(ty);e&&r.setPromptFileLocations(e.workspaceUri,e.locations)}catch(r){$a.error(t,"Failed to apply prompt file locations configuration",r)}}a(X5a,"applyPromptFileLocationsConfiguration");function VAr(t,e){let r=t.get(f_);e.proxy===void 0&&(e=DFr(r.env));try{r.setHttpSettings(hAe(e))}catch(n){if(!(n instanceof TypeError))throw n;$a.warn(t,"Invalid proxy URL",e.proxy,n),r.setHttpSettings({proxy:""})}}a(VAr,"applyHttpConfiguration");async function Z5a(t,e){try{let r=JSON.parse(e||"{}");await t.get(IA).updateMCPServers(r)}catch(r){$a.error(t,"Failed to apply MCP configuration",r)}}a(Z5a,"applyMCPConfiguration");function eDa(t,e){try{let r=e;t.get(Zx).updateConfiguration(r.tools?.terminal?.autoApprove)}catch(r){$a.error(t,"Failed to apply settings configuration",r)}}a(eDa,"applyTerminalAutoApproveConfiguration");function tDa(t,e){try{let r=e;t.get(FT).updateRulesFromConfiguration(r.tools?.edit?.autoApprove)}catch(r){$a.error(t,"Failed to apply edit auto approve configuration",r)}}a(tDa,"applyEditAutoApproveConfiguration");function rDa(t,e){try{let r=e;t.get(_4).updateConfiguration(r.tools?.mcp?.autoApprove)}catch(r){$a.error(t,"Failed to apply MCP auto approve configuration",r)}}a(rDa,"applyMCPAutoApproveConfiguration");function Udt(t,e){if(t.get(f_).markReady(),!t.get(Fn).getCapabilities().redirectedTelemetry){let r=(e?.telemetry?.telemetryLevel??"all")==="all";t.get(Jf).initialize(r)}}a(Udt,"initializePostConfigurationDependencies");var Lhi=S.Object({name:S.String(),version:S.String(),readableName:S.Optional(S.String())}),nDa=S.Object({editorInfo:Lhi,editorPluginInfo:Lhi,editorConfiguration:S.Optional(S.Object({}))});async function iDa(t,e,r){t.get(Dr).setEditorAndPluginInfo(r.editorPluginInfo,r.editorInfo),rJe(t,["setEditorInfo is deprecated. Use initializationOptions for editorInfo and editorPluginInfo","and workspace/didChangeConfiguration for editorConfiguration."]),await Qdt(t,{settings:r.editorConfiguration}),st(t,"setEditorInfo");for(let n of["github",...P2e])r.editorConfiguration&&n in r.editorConfiguration&&st(t,`setEditorInfo.editorConfiguration.${n}`);return["OK",null]}a(iDa,"handleSetEditorInfoChecked");var Fhi=He(nDa,iDa);f();var oDa=S.Object({options:S.Optional(S.Object({}))});async function sDa(t,e,r){let n=t.get(Rv),o=n.pendingSignIn?.status;if(o===void 0)return[null,{code:ct.InvalidRequest,message:"No pending sign in"}];let s;try{return s=await o,[s,null]}catch(c){return[null,{code:ct.DeviceFlowFailed,message:String(c)}]}finally{n.pendingSignIn=void 0}}a(sDa,"handleSignInConfirmChecked");var Uhi=He(oDa,sDa);f();var aDa=S.Object({options:S.Optional(S.Object({})),githubAppId:S.Optional(S.String())});async function cDa(t,e,r){try{let o=await t.get(en).checkAndUpdateStatus({githubAppId:r.githubAppId});if(o.status==="OK")return[{status:"AlreadySignedIn",user:o.user},null];let c=await t.get(Rv).initiate(r);return[{status:"PromptUserDeviceFlow",userCode:c.user_code,verificationUri:c.verification_uri,expiresIn:c.expires_in,interval:c.interval,command:{command:nJe,title:"Sign in with GitHub",arguments:[]}},null]}catch(n){if(!(n instanceof $i))throw n;return[null,{code:ct.DeviceFlowFailed,message:n.message}]}}a(cDa,"handleSignInInitiateChecked");var WAr=He(aDa,cDa);f();f();f();function Qhi(){return!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY||(process.platform==="linux"||process.platform==="freebsd"||process.platform==="openbsd")&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY)}a(Qhi,"isBrowserAvailable");function lDa(t,e){let n=(e!==void 0?FDe(e):t.get(Fp).getConfiguredUrls().serverUrl).replace(/\/$/,"");return{issuer:n,authorization_endpoint:`${n}/login/oauth/authorize`,token_endpoint:`${n}/login/oauth/access_token`,response_types_supported:["code"],code_challenge_methods_supported:["S256"],grant_types_supported:["authorization_code"],scopes_supported:["repo","workflow","user","read:org"]}}a(lDa,"getGitHubOAuthServerMetadata");async function qdt(t,e,r={},n){let o=performance.now();pae(t,"codeFlow");let s={status:"NotSignedIn"};try{if(!Qhi())throw new hL("Browser not available (SSH session or headless environment). Cannot perform OAuth code flow.");let c=lDa(t,r.serverUrl),l=e(t,c),u=r.scopes??["repo","workflow"],d=await l.createSession(u,{cancellationToken:n}),p=d.scopes||u,h=t.get(Oc).findAppIdToAuthenticate(),m;try{m=new URL(c.issuer).hostname}catch{throw new $i(`Invalid authentication server URL: ${c.issuer}`)}return s=await t.get(en).saveAndActivateSession({oauth_token:d.accessToken,user:d.account.label,githubAppId:h,authAuthority:m,scopes:p?[...p]:void 0}),Mw(t,"codeFlow",s.status,performance.now()-o),s}catch(c){throw Mw(t,"codeFlow",s.status,performance.now()-o,c),c}}a(qdt,"performGitHubOAuthCodeFlow");f();f();f();async function gJ(t,e,r,n,o){return await t.get(dr).fetch(new URL(e).href,{method:r,headers:n,body:o})}a(gJ,"fetchOauthServer");async function zAr(t){try{return await t.text()}catch{return t.statusText}}a(zAr,"getErrText");f();H3e();var kfe=class extends Z0{constructor(r,n=new YAr){super();this.ctx=r;this.fallback=n}static{a(this,"AgentUrlOpener")}async open(r){let n=this.ctx.get(Ar);if(!(n.clientCapabilities?.window?.showDocument?.support&&(await Promise.race([n.connection.window.showDocument({uri:r,external:!0}),new Promise((s,c)=>setTimeout(()=>c(new Error("window/showDocument timed out")),15e3))])).success))return this.fallback.open(r)}},YAr=class extends Z0{static{a(this,"SpawnUrlOpener")}async open(e){await Qge(e)}};f();var qhi=require("crypto"),Ghi=de(require("http"));f();f();var Gdt=new Se("OAuth Code Flow");function KAr(t,e,r=(n,o)=>n===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let n=0,o=t.length;n @@ -3675,56 +3664,56 @@ Respond in the following locale: ${e}`),n.join(` } -`;var NAr=["authorization_code","refresh_token"],y0e=33428,Oft=class{constructor(e,r){this._logger=new Se("LoopbackAuthServer");this.nonce=(0,Gpi.randomBytes)(16).toString("hex");if(!e)throw new Error("startingRedirect must be defined");this._startingRedirect=new URL(e),this._ctx=r;let n;this._resultPromise=new Promise((s,c)=>n={resolve:s,reject:c});let o=`&app_name=${encodeURIComponent("GitHub Copilot")}`;this._server=Hpi.createServer((s,c)=>{let l=new URL(s.url,`http://${s.headers.host}`);switch(l.pathname){case"/signin":{let u=(l.searchParams.get("nonce")??"").replace(/ /g,"+");if(u!==this.nonce){this._logger.warn(this._ctx,"Nonce mismatch in /signin request",{receivedNonce:u,expectedNonce:this.nonce}),c.writeHead(302,{location:`/?error=${encodeURIComponent("Nonce does not match.")}${o}`}),c.end();return}this._startingRedirect.searchParams.set("redirect_uri",`http://127.0.0.1:${this.port}/callback`),this._logger.info(this._ctx,"Redirecting to auth server"),c.writeHead(302,{location:this._startingRedirect.toString()}),c.end();break}case"/callback":{let u=l.search||"",d=/[?&]code=([^&]+)/.exec(u),p=/[?&]state=([^&]+)/.exec(u),h=d&&d.length>1?decodeURIComponent(d[1]):void 0,m=p&&p.length>1?decodeURIComponent(p[1]):void 0,g=new URL(m||"").searchParams.get("nonce")??void 0;if(!h||!m||!g){let A="Missing required parameters, at least one from code, state, nonce is needed.";this._logger.warn(this._ctx,"OAuth callback missing required parameters",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url}),c.writeHead(302,{location:`/?error=${encodeURIComponent(A)}${o}`}),c.end(),n.reject(new Error(A));return}if(this.state!==m){this._logger.warn(this._ctx,"OAuth callback state mismatch",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url,receivedState:m,expectedState:this.state}),c.writeHead(302,{location:`/?error=${encodeURIComponent("State does not match.")}${o}`}),c.end(),n.reject(new Error("State does not match."));return}if(this.nonce!==g){this._logger.warn(this._ctx,"OAuth callback nonce mismatch",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url,receivedNonce:g,expectedNonce:this.nonce}),c.writeHead(302,{location:`/?error=${encodeURIComponent("Nonce does not match.")}${o}`}),c.end(),n.reject(new Error("Nonce does not match."));return}this._logger.info(this._ctx,"OAuth callback validation successful"),n.resolve({code:h,state:m}),c.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),c.end(kAr);break}default:c.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),c.end(kAr)}})}static{a(this,"LoopbackAuthServer")}get redirectUri(){if(this.port===void 0)throw new Error("Server is not started yet");return`http://127.0.0.1:${this.port}/callback`}set state(e){e?this._startingRedirect.searchParams.set("state",e):this._startingRedirect.searchParams.delete("state")}get state(){return this._startingRedirect.searchParams.get("state")??void 0}start(){return new Promise((e,r)=>{if(this._server.listening)throw new Error("Server is already started");let n=setTimeout(()=>{r(new Error("Timeout waiting for port"))},5e3);this._server.on("listening",()=>{let o=this._server.address();if(typeof o=="string")this.port=parseInt(o);else if(o instanceof Object)this.port=o.port;else throw new Error("Unable to determine port");clearTimeout(n),this.state=`http://127.0.0.1:${this.port}/callback?nonce=${this.nonce}`,this._logger.info(this._ctx,"OAuth server started and state configured",{port:this.port,redirectUri:this.redirectUri}),e(this.port)}),this._server.on("error",o=>{if(o.code==="EADDRINUSE"){console.warn(`Port ${y0e} is in use, retrying with a random port...`),this._server.listen(0,"127.0.0.1");return}clearTimeout(n),r(new Error(`Error listening to server: ${o.message}`))}),this._server.on("close",()=>{clearTimeout(n),r(new Error("Server closed unexpectedly"))}),this._server.listen(y0e,"127.0.0.1")})}stop(){return new Promise((e,r)=>{if(!this._server.listening)throw new Error("Server is not started");let n,o=a(()=>{n&&(clearTimeout(n),n=void 0)},"cleanup");n=setTimeout(()=>{o(),r(new Error("Timeout waiting for server to close"))},5e3),this._server.close(s=>{o(),s?r(s):e()})})}waitForOAuthResponse(){return this._resultPromise}};f();var Bft=require("crypto");var MPe=class{static{a(this,"PKCEUtils")}static generateCodeVerifier(){let e=this.generateRandomBytes(32);return this.base64UrlEncode(e)}static generateCodeChallenge(e){let r=(0,Bft.createHash)("sha256");r.update(e,"ascii");let n=r.digest();return this.base64UrlEncode(n)}static getCodeChallengeMethod(){return"S256"}static generateRandomBytes(e){return(0,Bft.randomBytes)(e)}static base64UrlEncode(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static getSupportedMethods(){return[this.getCodeChallengeMethod()]}static isServerSupported(e){if(!e||e.length===0)return!1;let r=this.getSupportedMethods();return e.some(n=>r.includes(n))}static createPKCEParameters(){let e=this.generateCodeVerifier(),r=this.generateCodeChallenge(e),n=this.getCodeChallengeMethod();return{codeVerifier:e,codeChallenge:r,codeChallengeMethod:n}}};var cka="Timed out",jpi="Sign-in request was cancelled",DAr=class{static{a(this,"CodeFlow")}},E0e=class extends DAr{static{a(this,"CLSCodeFlow")}constructor(e){super(),this.ctx=e}async auth(e,r,n,o,s,c){let{clientId:l,clientSecret:u}=e,d=o?.resource,p=MPe.isServerSupported(n.code_challenge_methods_supported),h=p?MPe.createPKCEParameters():void 0;p?_r.info(this.ctx,`PKCE supported by server with methods: [${n.code_challenge_methods_supported?.join(", ")}], using ${h.codeChallengeMethod}`):_r.info(this.ctx,"PKCE not supported by server, falling back to standard OAuth flow");let m=this.buildAuthorizationParams({clientId:l,scope:r.join(" "),pkceParams:h,resource:d,...s??{}}),g=new URLSearchParams(m),A=n.authorization_endpoint+"?"+g.toString(),y=new Oft(A,this.ctx),_=`http://127.0.0.1:${await y.start()}/signin?nonce=${encodeURIComponent(y.nonce)}`;_r.info(this.ctx,"Auth URL created and opening browser for sign-in"),await new A0e(this.ctx).open(_);let v,b=[];try{let x=[y.waitForOAuthResponse(),new Promise((w,P)=>{let k=setTimeout(()=>P(new Error(cka)),3e5);b.push({dispose:a(()=>clearTimeout(k),"dispose")})})];if(c){let w=c;x.push(new Promise((P,k)=>{if(w.isCancellationRequested){_r.info(this.ctx,"OAuth flow cancelled (already requested)"),k(new Error(jpi));return}let Q=w.onCancellationRequested(()=>{_r.info(this.ctx,"OAuth flow cancelled"),k(new Error(jpi))});b.push(Q)}))}v=(await Promise.race(x)).code,_r.info(this.ctx,"OAuth response received successfully")}catch(x){throw _r.error(this.ctx,"OAuth flow error",x),x}finally{for(let x of b)x.dispose();setTimeout(()=>{y.stop()},5e3)}return await this.exchangeCodeForToken({endpointUri:n.token_endpoint,redirectUri:y.redirectUri,code:v,clientId:l,clientSecret:u,codeVerifier:h?.codeVerifier,resource:d})}async exchangeCodeForToken({endpointUri:e,redirectUri:r,code:n,clientId:o,clientSecret:s,codeVerifier:c,resource:l}){let u=[["grant_type","authorization_code"],["code",n],["client_id",o],["redirect_uri",r]];s&&u.push(["client_secret",s]),c&&u.push(["code_verifier",c]),l&&u.push(["resource",l]);let d=new URLSearchParams(u);_r.info(this.ctx,"Exchanging authorization code for token",{endpointUri:e,clientId:o,redirectUri:r});let p=await lX(this.ctx,e,"POST",{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},d.toString());if(p.ok){let h=await p.json();return _r.info(this.ctx,"Token exchange successful"),h}else{let h=await p.text(),m=new Error(h);throw m.name="Token Exchange Error",m}}buildAuthorizationParams({clientId:e,scope:r,pkceParams:n,resource:o,...s}){let c=[["client_id",e],["response_type","code"],["scope",r]];n&&c.push(["code_challenge",n.codeChallenge],["code_challenge_method",n.codeChallengeMethod]),o&&c.push(["resource",o]);for(let[l,u]of Object.entries(s??{}))u!==void 0&&c.push([l,String(u)]);return c}};var v2=class t{constructor(e,r,n,o){this.id=t.providerId;this.label="GitHub";this.supportsMultipleAccounts=!1;this.authorizationServers=[t.providerId];this.ctx=e,this.serverMetadata=n,this.resourceMetadata=o,this._sessionsPromise=this.readSessions().then(s=>(setTimeout(()=>s.forEach(c=>{this.afterSessionLoad(c)}),1e3),s))}static{a(this,"GitHubAuthenticationProvider")}static{this.providerId="https://github.com/login/oauth"}async getSessions(e,r){await this.checkSessionsExpiration();let n=await this._sessionsPromise,o=e?.sort()||[];return o.length?n.filter(c=>PAr([...c.scopes].sort(),o)):n}async afterSessionLoad(e){}async readSessions(){let e=await this.ctx.get(Si).read("oauth",this.id);return e||[]}async createSession(e,r){let n=[...e].sort(),o=await this._sessionsPromise,s=this.ctx.get(qc),c=s.findAppIdToAuthenticate(),l=s.findAppSecretToAuthenticate(),u=await new E0e(this.ctx).auth({clientId:c,clientSecret:l},n,this.serverMetadata,this.resourceMetadata,{prompt:"select_account"},r.cancellationToken),d=await this.tokenToSession(u.access_token,e);this.afterSessionLoad(d);let p=o.findIndex(m=>m.account.id===d.account.id&&PAr([...m.scopes].sort(),n)),h=new Array;return p>-1?h.push(...o.splice(p,1,d)):o.push(d),await this.storeSessions(o),d}async storeSessions(e){this._sessionsPromise=Promise.resolve(e),await this.ctx.get(Si).update("oauth",this.id,e)}async tokenToSession(e,r){let n=await this.getUserInfo(e);return{id:crypto.getRandomValues(new Uint32Array(2)).reduce((o,s)=>o+=s.toString(16),""),accessToken:e,account:{label:n.accountName,id:n.id},scopes:r}}buildGetUserInfoUrl(){try{let e=new URL(this.serverMetadata?.issuer);return e.hostname.toLowerCase()==="github.com"?"https://api.github.com/user":`${e.origin.replace(/\/+$/,"")}/api/v3/user`}catch{return"https://api.github.com/user"}}async getUserInfo(e){let r=this.buildGetUserInfoUrl(),n;try{n=await this.ctx.get(dr).fetch(new URL(r).href,{method:"GET",headers:{Authorization:`token ${e}`}})}catch(o){return Mft.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}if(n.ok)try{let o=await n.json();return{id:`${o.id}`,accountName:o.login}}catch(o){return Mft.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}else{let o=n.statusText;try{let s=await n.json();s.message&&(o=s.message)}catch{}return Mft.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}}async removeSession(e){let r=await this._sessionsPromise,n=r.findIndex(o=>o.id===e);if(n>-1)r.splice(n,1),await this.storeSessions(r);else throw new Error(`No session with id '${e}' found.`)}async checkSessionsExpiration(){let e=await this._sessionsPromise;if(e.length!==0)for(let r of e)await this.isSessionExpired(r)&&await this.removeSession(r.id)}async isSessionExpired(e){let{accessToken:r}=e,{id:n,accountName:o}=await this.getUserInfo(r);return!n||!o}};var lka=S.Object({scopes:S.Optional(S.Array(S.String({minLength:1}),{minItems:1})),serverUrl:S.Optional(S.String({minLength:1}))});async function uka(t,e,r){try{if(e.isCancellationRequested)return[null,{code:lt.RequestCancelled,message:"Sign-in request was cancelled"}];let o=await t.get(en).checkAndUpdateStatus();if(o.status==="OK")return[o,null];let s=await Dft(t,(c,l)=>new v2(c,v2.providerId,l,void 0),{scopes:r.scopes,serverUrl:r.serverUrl},e);if(!["OK","MaybeOK"].includes(s.status))throw new no("OAuth authentication failed for unknown reasons. Please try again later.");return[s,null]}catch(n){if(n instanceof NL)return[null,{code:lt.NoBrowserAvailable,message:n.message}];if(!(n instanceof no))throw n;return[null,{code:lt.CodeFlowFailed,message:n.message}]}}a(uka,"handleSignInWithCodeFlowChecked");var $pi=He(lka,uka);f();f();f();var Q3=class extends Error{static{a(this,"OperationCancelledError")}constructor(e="Operation was cancelled"){super(e),this.name="OperationCancelledError"}},OPe=class extends Error{static{a(this,"OperationTimeoutError")}constructor(e="Operation timed out"){super(e),this.name="OperationTimeoutError"}};function Vpi(t,e,r){return e.isCancellationRequested?Promise.reject(new Q3):new Promise((n,o)=>{let s=!1,c=e.onCancellationRequested(()=>{s||(s=!0,clearTimeout(l),c.dispose(),o(new Q3))}),l=setTimeout(()=>{s||(s=!0,c.dispose(),o(new OPe))},r);t.then(u=>{s||(s=!0,clearTimeout(l),c.dispose(),n(u))},u=>{s||(s=!0,clearTimeout(l),c.dispose(),o(u instanceof Error?u:new Error(String(u))))})})}a(Vpi,"raceWithCancellationAndTimeout");var dka=["repo","workflow"];async function fka(t,e,r,n){let o={method:"POST",headers:{Accept:"application/json",...mE(t)},json:{client_id:e,scope:n.join(" ")},timeout:3e4},s=new URL("login/device/code",r).href,c;try{c=await t.get(dr).fetch(s,o)}catch(l){throw l instanceof Error&&Pb(l)?new no(`Could not log in with device flow on ${r}: ${l.message}`):l}if(!c.ok)throw new no(`Could not log in with device flow on ${r}: HTTP ${c.status}`);return await c.json()}a(fka,"requestDeviceCode");async function pka(t,e,r,n){let o={method:"POST",headers:{Accept:"application/json",...mE(t)},json:{client_id:r,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4},s;try{s=await t.get(dr).fetch(new URL("login/oauth/access_token",n).href,o)}catch(l){throw l instanceof Error&&Pb(l)?new no(`Device flow token request failed on ${n}: ${l.message}`):l}let c=await s.json();if(c.access_token||c.error==="authorization_pending"||c.error==="slow_down")return c;throw c.error&&c.error_description?new no(c.error_description):new no(`Unexpected ${s.status} response from device flow: ${JSON.stringify(c)}`)}a(pka,"requestAccessToken");async function hka(t,e){let n=await(await mu(t,e,"user",{headers:{Accept:"application/json"}})).json();if("errors"in n)throw new no(`Error retrieving user information: ${String(n.errors)}`);return n}a(hka,"requestUserInfo");async function mka(t,e,r){let n=r?.githubAppId??t.get(qc).findAppIdToAuthenticate(),o=r?.scopes??dka,s=r?.serverUrl!==void 0?Q5e(r.serverUrl):void 0,{serverUrl:c,apiUrl:l}=s?HA({serverUrl:s}):t.get(en).getConfiguredUrls(),u=await fka(t,n,c,o),d=(async()=>{let p=Date.now()+u.expires_in*1e3,h=u.interval,m;do{if(await new Promise(A=>setTimeout(A,1e3*h)),e.isCancellationRequested)throw new Q3("Sign-in request was cancelled");m=await pka(t,u.device_code,n,c);let g=m.access_token;if(g){let A=await hka(t,{apiUrl:l,accessToken:g});if(e.isCancellationRequested)throw new Q3("Sign-in request was cancelled");let y=m.scope?m.scope.split(" ").filter(E=>E.length>0):o;return{serverUrl:c,githubAppId:n,username:A.login,accessToken:g,scopes:y}}h=m.interval??h}while(Date.now()performance.now()-n,"getElapsedTimeMs");try{let c=await t.get(en).checkAndUpdateStatus();if(c.status==="OK")return[c,null];Zae(t,"deviceFlow");let l=t.get(uX),u=await l.initiate(e,{scopes:r.scopes,serverUrl:r.serverUrl});await t.get(Ar).connection.sendNotification(yka,{userCode:u.userCode,verificationUri:u.verificationUri,expiresIn:u.expiresIn});let d=await Vpi(u.waitForAuth,e,Eka),p=await l.save(d);return $w(t,"deviceFlow",p.status,o()),[p,null]}catch(s){if(s instanceof Q3)return[null,{code:lt.RequestCancelled,message:"Sign-in request was cancelled"}];if(s instanceof OPe)return $w(t,"deviceFlow","NotSignedIn",o(),s),[null,{code:lt.DeviceFlowFailed,message:"Sign-in request timed out"}];if($w(t,"deviceFlow","NotSignedIn",o(),s),!(s instanceof no))throw s;return[null,{code:lt.DeviceFlowFailed,message:s.message}]}}a(Cka,"handleSignInWithDeviceFlowChecked");var zpi=He(Aka,Cka);f();var _ka=S.Object({githubToken:S.String({minLength:1}),user:S.String({minLength:1}),githubAppId:S.Optional(S.String({minLength:1}))});async function vka(t,e,r){let n=r.githubToken,o=r.user,s=r.githubAppId,c=t.get(en);return[await t.get(Gv).save({...c.getConfiguredUrls(),accessToken:n,login:o,githubAppId:s}),null]}a(vka,"handleSignInWithGithubTokenChecked");var Ypi=He(_ka,vka);f();var bka=S.Object({options:S.Optional(S.Object({}))});async function Tka(t,e,r){return[await t.get(en).deleteAndDeactivateAllSessions(),null]}a(Tka,"handleSignOutChecked");var Kpi=He(bka,Tka);f();var Ska=S.Object({transaction:S.Optional(S.String()),stacktrace:S.Optional(S.String()),properties:S.Optional(S.Record(S.String(),S.String())),platform:S.Optional(S.String()),exception_detail:S.Optional(S.Array(S.Object({type:S.Optional(S.String()),value:S.Optional(S.String()),stacktrace:S.Optional(S.Array(S.Object({filename:S.Optional(S.String()),lineno:S.Optional(S.Union([S.String(),S.Integer()])),colno:S.Optional(S.Union([S.String(),S.Integer()])),function:S.Optional(S.String()),in_app:S.Optional(S.Boolean())})))})))}),MAr=class extends Error{constructor(r,n){super(r);this.code=n;this.name="AgentEditorError"}static{a(this,"AgentEditorError")}};function Ika(t,e,r){let n=t.get(Ko),o=t.get(Nr).getEditorPluginInfo(),s=r.properties||{},c;r.platform&&r.exception_detail&&ZN.has(o.name)&&(c=Object.assign({rollup_id:"auto",context:Tmt(t),sensitive_context:{},deployed_to:n.getBuildType(),platform:r.platform,exception_detail:r.exception_detail},ZN.get(o.name)),r.transaction&&(c.transaction=r.transaction),n.getBuildType()!=="dev"&&(c.release=`${c.app}@${o.version}`));let l=new MAr(r.stacktrace??"N/A",o.name);return l.stack=void 0,qo(t,l,r.transaction??"",s,c),["OK",null]}a(Ika,"handleTelemetryExceptionChecked");var Jpi=He(Ska,Ika);f();f();f();function OAr(t){let e=Date.now()+((t?.refresh_in??0)+U5e)*1e3;return new Xq({token:`test token ${yr()}`,refresh_in:0,expires_at:e,...t},void 0,e)}a(OAr,"createTestCopilotToken");var C0e=class extends Jp{constructor(){super(...arguments);this.defaultToken=OAr({token:"tid=test;rt=1"})}static{a(this,"FakeCopilotTokenFetcherFromSession")}fetchTokenResult(r,n){switch(n.accessToken){case"":return{copilotToken:this.defaultToken};case"valid-github-token":return{copilotToken:OAr({token:"tid=valid-copilot-token"})};case void 0:return{failureKind:"NotSignedIn"};case"notauth-github-token":return{failureKind:"NotAuthorized",message:"notauth",canSignUpForLimited:!0};case"bogus-github-token":return{failureKind:"NotAuthorized",message:"bogus",canSignUpForLimited:!1};case"expired-github-token":return{failureKind:"HTTP401",message:"expired"};default:throw new Error("Don't have a valid GitHub token")}}};var Lft=class extends Jp{constructor(r){super();this.envelopeFn=r}static{a(this,"StaticCopilotTokenFetcher")}async fetchTokenResult(){return{copilotToken:OAr(await this.envelopeFn())}}};var xka=S.Object({options:S.Optional(S.Object({}))});async function wka(t,e,r){let n=new C0e;return t.get(en).setTransientSession({accessToken:"valid-github-token",login:"always auth"}),t.forceSet(Jp,n),t.get(Xs).forceNormal(),await new Promise(o=>setTimeout(o,0)),["OK",null]}a(wka,"handleTestingAlwaysAuthChecked");var BAr=He(xka,wka);f();var Rka=S.Object({messages:S.Array(S.Object({role:S.Enum(Sa),content:S.String(),name:S.Optional(S.String())})),modelFamily:S.Optional(S.Enum(Cn)),stop:S.Optional(S.Array(S.String())),conversationOptions:S.Optional(S.Object({maxResponseTokens:S.Optional(S.Number()),temperature:S.Optional(S.Number())}))});async function Pka(t,e,r){let n=new ya(t),o=await t.get(Da).getBestChatModelConfig([r.modelFamily??Cn.CopilotBase]),s=await BEe(t,"","");return[await n.fetchResponse({modelConfiguration:o,messages:r.messages,uiKind:"conversationIntegrationTest",stop:r.stop,intentParams:{intent:!0},llmInteraction:wm.user("test",yr())},e,s),null]}a(Pka,"handleChatMLChecked");var Xpi=He(Rka,Pka);f();f();f();var S0e=de(rmi(),1),dMf={ALPN_HTTP2:S0e.default.ALPN_HTTP2,ALPN_HTTP2C:S0e.default.ALPN_HTTP2C,ALPN_HTTP1_1:S0e.default.ALPN_HTTP1_1,ALPN_HTTP1_0:S0e.default.ALPN_HTTP1_0},{fetch:fMf,context:nmi,reset:pMf,noCache:hMf,h1:mMf,keepAlive:gMf,h1NoCache:AMf,keepAliveNoCache:yMf,cacheStats:EMf,clearCache:CMf,offPush:_Mf,onPush:vMf,createUrl:bMf,timeoutSignal:TMf,Body:SMf,Headers:imi,Request:IMf,Response:xMf,AbortController:wMf,AbortError:e0t,AbortSignal:RMf,FetchBaseError:PMf,FetchError:kMf,ALPN_HTTP2:NMf,ALPN_HTTP2C:DMf,ALPN_HTTP1_1:MMf,ALPN_HTTP1_0:OMf}=S0e.default;var smi=require("crypto"),ami=require("http"),cmi=require("stream"),lmi=require("util"),x0e=de(Fx());var XDa=9e4,ZDa=new x0e.ProtocolRequestType("copilot/fetch"),e5a=new x0e.ProtocolRequestType("copilot/fetchCancel"),t5a=new x0e.ProgressType,r5a=new x0e.ProtocolRequestType("copilot/fetchDisconnectAll"),p5=class extends Error{static{a(this,"EditorFetcherError")}constructor(e){super(e),this.name="EditorFetcherError"}},I0e=class extends dr{constructor(r){super();this.ctx=r;this.name="EditorFetcher";this.userAgent=`GithubCopilot/${r.get(Ko).getVersion()}`}static{a(this,"EditorFetcher")}disconnectAll(){return this.ctx.get(Ar).connection.sendRequest(r5a,{})}async fetch(r,n){n.headers||={},n.headers["user-agent"]=this.userAgent;let{signal:o}=n,s=this.ctx.get(Ar).connection,c=(0,smi.randomUUID)(),l=new _n.CancellationTokenSource,u=new cmi.PassThrough,d=a(()=>{s.sendRequest(e5a,{workDoneToken:c})},"sendCancelRequest"),p=a(()=>{u.emit("error",new e0t("EditorFetch request aborted")),u.end()},"destroyBodyStream");if(o){if(!(o instanceof AbortSignal))throw new p5("EditorFetcher received unexpected abort signal");if(o.aborted)throw new e0t("EditorFetcher signal aborted before fetch");o.addEventListener("abort",d)}s.onProgress(t5a,c,m=>{m.kind==="end"?(o?.removeEventListener("abort",d),o?.removeEventListener("abort",p),m.error&&u.emit("error",new p5(m.error)),u.end()):m.kind==="report"&&u.write(m.chunk)});let h=await new Promise((m,g)=>{let A=setTimeout(()=>{g(new p5("Request timed out from lsp server"))},n.timeout??XDa),y=a(()=>{g(new e0t("EditorFetcher request aborted"))},"rejectIfAborted");o?.addEventListener("abort",y),s.sendRequest(ZDa,i5a(r,c,n),l.token).then(m).catch(E=>{let _="EditorFetcher request failed";E&&typeof E=="object"&&"message"in E&&(_+=`: ${String(E.message)}`),E&&typeof E=="object"&&"data"in E&&(_+=`: ${(0,lmi.inspect)(E.data)}`),g(new p5(_))}).finally(()=>{o?.removeEventListener("abort",y),clearTimeout(A)})});if(!h.status)throw new p5("EditorFetcher received invalid response");return o?.addEventListener("abort",p),new B2(h.status,ami.STATUS_CODES[h.status]??"",new imi(h.headers),()=>n5a(u),()=>u)}};function n5a(t){return new Promise((e,r)=>{let n="";t.on("error",r),t.on("end",()=>e(n)),t.on("data",o=>n+=String(o))})}a(n5a,"consumeStream");function i5a(t,e,r){let{timeout:n,method:o}=r,s=r.headers??{},c=r.json?JSON.stringify(r.json):r.body;return r.json&&(s["content-type"]="application/json"),{url:t,headers:s,body:c,timeout:n,method:o,workDoneToken:e}}a(i5a,"convertOptionsToParams");var o5a=S.Object({url:S.String(),headers:S.Optional(S.Record(S.String(),S.String())),body:S.Optional(S.String()),timeout:S.Optional(S.Number()),method:S.Optional(S.Union([S.Literal("GET"),S.Literal("POST"),S.Literal("DELETE")])),cancelBeforeRequest:S.Optional(S.Boolean()),cancelAfterRequest:S.Optional(S.Boolean()),cancelAfterFirstChunk:S.Optional(S.Boolean())});async function s5a(t,e,r){let n=new I0e(t),o=new AbortController,s=o.signal,{url:c,cancelBeforeRequest:l,cancelAfterRequest:u,cancelAfterFirstChunk:d,...p}=r;l&&o.abort();let h=n.fetch(c,{signal:s,...p});u&&o.abort();let m;try{m=await h}catch(y){return[{error:`Fetch stream error: ${y instanceof p5?y.message:String(y)}`},null]}let{status:g}=m,A=Object.fromEntries(Array.from(m.headers));try{if(d){let E=m.body();for await(let _ of E){let v=_.toString();return o.abort(),[{status:g,headers:A,body:v},null]}}let y=await m.text();return[{status:g,headers:A,body:y},null]}catch(y){return[{error:`Fetch stream error: ${y instanceof p5?y.message:String(y)}`},null]}}a(s5a,"handleTestingFetchChecked");var umi=He(o5a,s5a);f();var a5a=S.Object({});async function c5a(t,e,r){return await t.get(gu).flush(),["OK",null]}a(c5a,"handleTestingFlushPromiseQueueChecked");var dmi=He(a5a,c5a);f();f();f();var fq=class{static{a(this,"FileSearch")}};f();f();f();var t0t=de(require("path")),fmi=require("worker_threads");function pmi(t,e){return new fmi.Worker(t0t.default.resolve(t0t.default.extname(__filename)!==".ts"?__dirname:t0t.default.resolve(__dirname,"../../dist"),t),{workerData:e})}a(pmi,"createWorker");f();var r0t=class{constructor(e){this.maxDegreeOfParalellism=e;this.outstandingPromises=[],this.runningPromises=0}static{a(this,"PriorityLimiter")}queue(e,r=!1){return new Promise((n,o)=>{r?this.outstandingPromises.unshift({factory:e,c:n,e:o}):this.outstandingPromises.push({factory:e,c:n,e:o}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}};var hmi=de(Nn());var n0t="main.js",i0t=class{constructor(e,r,n=3){this.promiseResolvers=new Map;this.id=0;try{let o={cwd:process.cwd(),indexWorkspaceRoots:e,params:r};this.worker=pmi(n0t,o),this.worker.on("message",this.handleWorkerMessage.bind(this)),this.worker.on("error",s=>{this.handleUnexpectedError(s)}),this.postMessageQueue=new r0t(n)}catch(o){throw console.error(`Failed to create worker: ${o.message}`),o}}static{a(this,"IndexClient")}dispose(){return this.postMessageInQueue(new c6e(this.id++),hmi.CancellationToken.None,!0)}async indexFile(e,r,n){return await this.postMessageInQueue(new o6e(this.id++,e,r),n)}async getAllFileNames(e,r){return this.postMessageInQueue(new s6e(this.id++,e),r)}getContext(e,r,n,o,s,c){return this.postMessageInQueue(new a6e(this.id++,e,r,n,o,s),c,!0)}tryCreateIndex(e,r,n){return this.postMessageInQueue(new n6e(this.id++,e,r),n)}async postMessageInQueue(e,r,n=!1){return this.postMessageQueue.queue(()=>this.postMessageAndWait(e,r),n)}tryRemoveIndex(e,r){return this.postMessageAndWait(new i6e(this.id++,e),r)}async postMessageAndWait(e,r){if(this.fatalError)return Promise.reject(this.fatalError);let n=new Promise((s,c)=>{this.promiseResolvers.set(e.id,{resolve:s,reject:c})});this.worker.postMessage(e);let o=r.onCancellationRequested(()=>{this.worker.postMessage(new r6e(e.id))});try{return await n}finally{o.dispose()}}handleWorkerMessage(e){if(e.operation!=="response")throw new Error("Unexpected message operation");let r=this.promiseResolvers.get(e.id);if(!r)throw new Error(`Received response for message that isn't in progress: ${e.id}`);this.promiseResolvers.delete(e.id),e.error?(e.error.code=e.code,r.reject(e.error)):r.resolve(e.data)}handleUnexpectedError(e){let r;if(e instanceof Error){r=e,r.code==="MODULE_NOT_FOUND"&&r.message?.endsWith(n0t+"'")&&(r=new Error(`Failed to load ${n0t}`),r.code="CopilotPromptLoadFailure");let n=new Error().stack;r.stack&&n?.match(/^Error\n/)&&(r.stack+=n.replace(/^Error/,""))}else e&&typeof e=="object"&&"name"in e&&"status"in e&&e.name==="ExitStatus"&&typeof e.status=="number"?(r=new Error(`${n0t} exited with status ${e.status}`),r.code=`CopilotPromptWorkerExit${e.status}`):r=new Error(`Non-error thrown: ${JSON.stringify(e)}`);for(let n of this.promiseResolvers.values())n.reject(r);this.promiseResolvers.clear(),this.fatalError=r}};var HPe=de(Nn());var $3=new Se(PHt),o0t=class{constructor(e,r,n,o,s){this.ctx=e;this.watcher=r;this.workspaceDatabasePersistenceManager=n;this.workspaceInit=new Map;this.watcher.onFileChange(async(c,l)=>{await this.indexFile(l,this.languageId(l)??"plaintext")}),this.watcher.onWorkspaceChange(async(c,l)=>{if(c===1){$3.debug(this.ctx,`workspace removed: ${l}`),await this.indexClient.tryRemoveIndex(l,HPe.CancellationToken.None);return}$3.debug(this.ctx,`workspace added: ${l}`),await this.indexAddedWorkspace(l)}),this.indexClient=new i0t(o,s);for(let c of o){let l=c.rootPath;this.workspaceInit.set(l,this.doWorkspaceIndex(l).then(()=>{$3.debug(this.ctx,`workspace ${l} indexed`),this.workspaceInit.delete(l)}))}}static{a(this,"MultiLanguageContextIndexWatcher")}isInitializing(e){for(let[r]of this.workspaceInit)if(e.startsWith(r))return!0;return!1}dispose(){return this.indexClient.dispose()}async indexAddedWorkspace(e){let r=await l5a(e,this.workspaceDatabasePersistenceManager);await this.indexClient.tryCreateIndex(r.rootPath,r.databaseFilePath,HPe.CancellationToken.None),this.workspaceInit.has(e)&&await this.workspaceInit.get(e);let n=this.doWorkspaceIndex(e).then(()=>{$3.debug(this.ctx,`workspace ${e} indexed`),this.workspaceInit.delete(e)});this.workspaceInit.set(e,n)}async doWorkspaceIndex(e){$3.debug(this.ctx,`indexing workspace ${e}`);let r=VSt.map(p=>`*${p}`);if(r.length===0)return;let o=`**/${VSt.length===1?r[0]:`{${r.join(",")}}`}`,s=this.ctx.get(fq),c=await Promise.all([s.findFiles(o,{uri:e},{excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0,excludeIDESearchIgnoredFiles:!0}),this.indexClient.getAllFileNames(e,HPe.CancellationToken.None)]),l=c[0],u=c[1],d=Array.from(new Set([...l,...u]));$3.debug(this.ctx,`found ${d.length} files to index in ${e}`),await Promise.all(d.map(async p=>{let h=this.languageId(p);h&&await this.indexFile(p.replace(/\/+$/,""),h)})),$3.debug(this.ctx,`finished indexing workspace ${e}`)}async indexFile(e,r){try{$3.debug(this.ctx,`index triggered for ${e}`),await this.indexClient.indexFile(e,r,HPe.CancellationToken.None)}catch(n){$3.debug(this.ctx,`failed to index ${e} with ${n}`)}}languageId(e){return $6r(e)}};async function l5a(t,e){return{databaseFilePath:await e.getDBFilePath(t),rootPath:t}}a(l5a,"createIndexableWorkspaceFolder");var u5a=S.Object({filePath:S.String(),code:S.String(),offset:S.Number(),languageId:S.String(),timeout:S.Optional(S.Number()),waitForContext:S.Optional(S.Boolean())});async function d5a(t,e,r){try{await t.get(wk).start();let n=t.get(o0t),o=r.timeout??1e3,s=Date.now(),c=[],l=!0;for(;l;)try{c=await n.indexClient.getContext(r.filePath,r.code,r.offset,r.languageId,kHt,e)}catch{}finally{l=(r.waitForContext??!1)&&c.length==0&&Date.now()-ssetTimeout(n,0)),["OK",null]}a(m5a,"handleTestingNeverAuthChecked");var dyr=He(h5a,m5a);f();f();f();var fyr=class extends jd{constructor(r){super();this.certificates=r}static{a(this,"TestCertificateReader")}getAllRootCAs(){return this.certificates}},Ami=a(t=>new fyr(t),"createTestCertificateReader");function hyr(t,e,r){let n=new pyr;n.set("x-github-request-id","1");for(let[o,s]of Object.entries(r||{}))n.set(o,s);return new B2(t,"status text",n,()=>Promise.resolve(e??""),()=>null)}a(hyr,"createFakeResponse");function ymi(t,e,r){let n;return typeof e=="string"?n=e:n=JSON.stringify(e),hyr(t,n,Object.assign({"content-type":"application/json"},r))}a(ymi,"createFakeJsonResponse");var jPe=class extends dr{constructor(){super(...arguments);this.name="FakeFetcher"}static{a(this,"FakeFetcher")}disconnectAll(){throw new Error("Method not implemented.")}};var s0t=class extends jPe{static{a(this,"NoFetchFetcher")}fetch(e,r){throw new Error("NoFetchFetcher does not support fetching")}};var pyr=class{constructor(){this.headers=new Map}static{a(this,"FakeHeaders")}append(e,r){this.headers.set(e.toLowerCase(),r)}delete(e){this.headers.delete(e.toLowerCase())}get(e){return this.headers.get(e.toLowerCase())??null}has(e){return this.headers.has(e.toLowerCase())}set(e,r){this.headers.set(e.toLowerCase(),r)}entries(){return this.headers.entries()}keys(){return this.headers.keys()}values(){return this.headers.values()}[Symbol.iterator](){return this.headers.entries()}};var myr=class extends jPe{static{a(this,"ExpConfigFetcher")}constructor(e){super(),this.fullConfig={Features:[],Flights:{},Configs:[{Id:"vscode",Parameters:e.Parameters}],ParameterGroups:[],AssignmentContext:e.AssignmentContext}}fetch(e,r){return e.endsWith("telemetry")?Promise.resolve(ymi(200,this.fullConfig)):Promise.resolve(hyr(404,""))}},a0t=class extends myr{constructor(r,n){super(r);this.delegate=n}static{a(this,"ExpConfigFetcherWithDelegate")}fetch(r,n){return r.endsWith("telemetry")?super.fetch(r,n):this.delegate.fetch(r,n)}};var g5a=S.Object({expFlags:S.Record(S.String(),S.Union([S.String(),S.Number(),S.Boolean()]))});function A5a(t,e,r){if(r.expFlags){let n={AssignmentContext:"assignmentcontext",Parameters:{...r.expFlags}};t.forceSet(dr,new a0t(n,t.get(dr)))}return["OK",null]}a(A5a,"handleTestingOverrideExpFlagsChecked");var Emi=He(g5a,A5a);f();var y5a=S.Object({rules:Pwt});function E5a(t,e,r){return t.get(bc).setTestingRules(r.rules),["OK",null]}a(E5a,"handleTestingSetContentExclusionRulesChecked");var Cmi=He(y5a,E5a);f();var C5a=S.Object({workDoneToken:S.Union([S.String(),S.Number()]),chunks:S.Array(S.String()),followUp:S.Optional(S.String()),suggestedTitle:S.Optional(S.String()),skills:S.Optional(S.Array(S.String())),references:S.Optional(S.Array(IF)),options:S.Optional(S.Object({}))});function _5a(t,e,r){return t.get(V3).add(r.workDoneToken,r.chunks,r.followUp,r.suggestedTitle,r.skills,r.references),["OK",null]}a(_5a,"handleTestingSetSyntheticTurnsChecked");var _mi=He(C5a,_5a);f();var v5a=S.Object({});async function b5a(t,e,r){let n=t.get(gc),o=t.get(Cd);return await n.showWarningMessage("This is a test message",{title:"Some Action"}).then(c=>s(3,"response from message request",c?.title)).catch(c=>s(1,"error sending show message request",c)),["OK",null];function s(c,l,u){return o.logIt(t,c,"triggerShowMessage",`${l} (${String(u)})`)}a(s,"sendNotification")}a(b5a,"handleTriggerShowMessageChecked");var vmi=He(v5a,b5a);f();f();f();f();var bmi=de(require("tls"));var c0t=class{static{a(this,"RootCertificateConfigurator")}#e;constructor(e){this._certificateReader=e.get(jd)}async getCertificates(){let e=await this._certificateReader.getAllRootCAs();if(e.length!==0)return e}async createSecureContext(){let e=await this._certificateReader.getAllRootCAs(),n=bmi.createSecureContext({_vscodeAdditionalCaCerts:e}),o=n.context;for(let s of e)o.addCACert(s);return{secureContext:n,certs:e}}async applyToRequestOptions(e){this.#e??=this.createSecureContext();let r=await this.#e;e.secureContext=r.secureContext,e.ca=r.certs,e.cert=r.certs}};f();var Fmi=de(require("http"));var J5a=407,lg=new Se("proxySocketFactory"),h5=class{static{a(this,"ProxySocketFactory")}},mX=class extends Error{static{a(this,"ProxySocketError")}constructor(e,r,n){super(e),this.code=r?.code,this.syscall=r?.syscall,this.errno=r?.errno,/^Failed to establish a socket connection to proxies:/.test(r?.message??"")?this.code="ProxyFailedToEstablishSocketConnection":/^InitializeSecurityContext:/.test(r?.message??"")?this.code="ProxyInitializeSecurityContext":r?.message==="Miscellaneous failure (see text): Server not found in Kerberos database"?this.code="ProxyKerberosServerNotFound":/^Unspecified GSS failure. {2}Minor code may provide more information: No Kerberos credentials available/.test(r?.message??"")&&(this.code="ProxyGSSFailureNoKerberosCredentialsAvailable"),n!==void 0&&(this.code=n)}};function u0t(t){return new Cyr(t,new _yr(t))}a(u0t,"getProxySocketFactory");var Cyr=class extends h5{constructor(r,n,o=new WPe,s=process.platform){super();this.ctx=r;this.delegate=n;this.kerberosLoader=o;this.platform=s;this.successfullyAuthorized=new $r(20)}static{a(this,"KerberosProxySocketFactory")}async createSocket(r,n){this.successfullyAuthorized.get(this.getProxyCacheKey(n))&&(lg.debug(this.ctx,"Proxy authorization already successful once, skipping 407 round trip"),await this.reauthorize(r,n));try{return await this.delegate.createSocket(r,n)}catch(o){if(o instanceof mX&&o.code===`ProxyStatusCode${J5a}`){lg.debug(this.ctx,"Proxy authorization required, trying to authorize first time");let s=await this.authorizeAndCreateSocket(r,n);if(s)return lg.debug(this.ctx,"Proxy authorization successful, caching result"),at(this.ctx,"proxy.kerberosAuthorized"),this.successfullyAuthorized.set(this.getProxyCacheKey(n),!0),s}throw o}}async reauthorize(r,n){let o=await this.authorize(n);o&&(lg.debug(this.ctx,"Proxy re-authorization successful, received token"),r.headers["Proxy-Authorization"]="Negotiate "+o)}async authorizeAndCreateSocket(r,n){let o=await this.authorize(n);if(lg.debug(this.ctx,"Proxy authorization successful, received token"),o)return lg.debug(this.ctx,"Trying to create socket with proxy authorization"),r.headers["Proxy-Authorization"]="Negotiate "+o,await this.delegate.createSocket(r,n)}async authorize(r){lg.debug(this.ctx,"Loading kerberos module");let n=await this.kerberosLoader.load(),o=this.computeSpn(r);lg.debug(this.ctx,"Initializing kerberos client using spn",o);let s=await n.initializeClient(o);lg.debug(this.ctx,"Perform client side kerberos step");let c=await s.step("");return lg.debug(this.ctx,"Received kerberos server response"),c}computeSpn(r){let n=r.kerberosServicePrincipal;if(n)return lg.debug(this.ctx,"Using configured kerberos spn",n),n;let o=this.platform==="win32"?`HTTP/${r.hostname}`:`HTTP@${r.hostname}`;return lg.debug(this.ctx,"Using default kerberos spn",o),o}getProxyCacheKey(r){return`${r.hostname}:${r.port}`}},_yr=class extends h5{constructor(r){super();this.ctx=r;this.userAgent=`GithubCopilot/${this.ctx.get(Ko).getVersion()}`}static{a(this,"TunnelingProxySocketFactory")}async createSocket(r,n){let o=this.createConnectRequestOptions(r,n);return new Promise((s,c)=>{lg.debug(this.ctx,"Attempting to establish connection to proxy");let l=Fmi.request(o);l.useChunkedEncodingByDefault=!1,l.once("connect",(u,d,p)=>{lg.debug(this.ctx,"Socket Connect returned status code",u.statusCode),l.removeAllListeners(),d.removeAllListeners(),u.statusCode!==200?(d.destroy(),c(new mX(`tunneling socket could not be established, statusCode=${u.statusCode}`,void 0,`ProxyStatusCode${u.statusCode}`))):p.length>0?(d.destroy(),c(new mX(`got non-empty response body from proxy, length=${p.length}`,void 0,"ProxyNonEmptyResponseBody"))):(lg.debug(this.ctx,"Successfully established tunneling connection to proxy"),s(d))}),l.once("error",u=>{lg.debug(this.ctx,"Proxy socket connection error",u.message),l.removeAllListeners(),c(new mX(`tunneling socket could not be established, cause=${u.message}`,u))}),l.on("timeout",()=>{lg.debug(this.ctx,"Proxy socket connection timeout"),c(new mX(`tunneling socket could not be established, proxy socket connection timeout while connecting to ${o.hostname}:${o.port}`,void 0,"ProxyTimeout"))}),l.end()})}createConnectRequestOptions(r,n){let o=`${r.hostname}:${r.port}`,s={hostname:n.hostname,port:n.port,method:"CONNECT",path:o,agent:!1,headers:{host:o,"Proxy-Connection":"keep-alive","User-Agent":this.userAgent},timeout:r.timeout};return r.localAddress&&(s.localAddress=r.localAddress),this.configureProxyAuthorization(s,r,n.authorization),s}configureProxyAuthorization(r,n,o){r.headers["Proxy-Authorization"]=[],o&&r.headers["Proxy-Authorization"].push("Basic "+Buffer.from(o).toString("base64")),typeof n.headers?.["Proxy-Authorization"]=="string"&&r.headers["Proxy-Authorization"].push(n.headers["Proxy-Authorization"])}},WPe=class{static{a(this,"KerberosLoader")}load(){return Promise.resolve().then(()=>de(Lmi()))}};var P0e=class extends dr{constructor(r,n){super();this.name="HelixFetcher";this.certificateConfigurator=new c0t(r),this.proxySocketFactory=r.get(h5),this.proxySocketTimeoutForTesting=n?.proxySocketTimeoutForTesting,r.get(Qc).onDidChangeHttpSettings(o=>{this.fetchApi=this.createFetchApi(r,o),this.updateNoProxy(o.noProxy)}),this.fetchApi=this.createFetchApi(r,r.get(Qc).getHttpSettings()),this.updateNoProxy(r.get(Qc).getHttpSettings().noProxy),this.fetchApiByPass=this.createFetchApi(r,{proxy:""})}static{a(this,"HelixFetcher")}maybeCreateSocketFactory(r,n){if(!r?.proxy)return;let o=new URL(r.proxy);return async s=>(s.rejectUnauthorized=r.proxyStrictSSL,s.timeout=n,await this.certificateConfigurator.applyToRequestOptions(s),await this.proxySocketFactory.createSocket(s,{hostname:o.hostname,port:o.port,authorization:r.proxyAuthorization,kerberosServicePrincipal:r.proxyKerberosServicePrincipal}))}createFetchApi(r,n){let o=r.get(Ko),s=this.proxySocketTimeoutForTesting;return nmi({userAgent:`GithubCopilot/${o.getVersion()}`,socketFactory:this.maybeCreateSocketFactory(n,s),rejectUnauthorized:n.proxyStrictSSL})}parseNoProxy(r){return r?.map(n=>n.trim()).filter(n=>n.length>0)||[]}updateNoProxy(r){if(this.noProxy=this.parseNoProxy(r),this.proxyExceptionFilters=void 0,!this.noProxy.length)return;if(this.noProxy.includes("*")){this.proxyExceptionFilters=[{regex:/.*/i}];return}let n=a(s=>{if(!s)return;s.startsWith(".")&&(s=`*${s}`);let c=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${c}$`,"i")}catch{return}},"toRegex"),o=[];for(let s of this.noProxy){let c=s,l;if(c.startsWith("[")){let d=c.indexOf("]");if(d!==-1){let p=c.slice(1,d),h=c.slice(d+1);h.startsWith(":")&&(l=h.slice(1)),c=p}}else{let d=c.split(":");d.length===2&&(c=d[0],l=d[1])}let u=n(c);u&&o.push({regex:u,port:l})}o.length&&(this.proxyExceptionFilters=o)}shouldBypassProxy(r){if(!this.proxyExceptionFilters||!this.proxyExceptionFilters.length)return!1;let n;try{n=new URL(r)}catch{return!1}let o=n.hostname;if(!o)return!1;let s=n.port||(n.protocol==="https:"?"443":"80"),c=o.toLowerCase();return this.proxyExceptionFilters.some(l=>l.regex.test(c)&&(!l.port||l.port===s))}async fetch(r,n){let o=n.signal,s=!1;if(n.timeout){let p=new AbortController;setTimeout(()=>{p.abort(),s=!0},n.timeout),n.signal?.addEventListener("abort",()=>p.abort()),n.signal?.aborted&&p.abort(),o=p.signal}let c={...n,body:n.body?n.body:n.json,signal:o},l=this.shouldBypassProxy(r);if(!l){await this.certificateConfigurator.applyToRequestOptions(c);let p=await this.certificateConfigurator.getCertificates();this.fetchApi.setCA(p)}let d=await(l?this.fetchApiByPass:this.fetchApi).fetch(r,c).catch(p=>{throw s?new bpe(`Request to <${r}> timed out after ${n.timeout}ms`,p):p});return new B2(d.status,d.statusText,d.headers,()=>d.text(),()=>d.body)}disconnectAll(){return this.fetchApi.reset()}};f();f();var k0e=class extends jp{constructor(r,n={}){super();this.env=n;this.recalculateUrlDefaults(r,this.getDefaultUrls())}static{a(this,"DefaultNetworkConfiguration")}getAuthAuthority(){return this.baseUrlObject.hostname}getConfiguredUrls(){return{serverUrl:this.baseUrlObject.href,apiUrl:this.apiUrl}}setConfiguredUrls(r,n){let o=this.getConfiguredUrls();this.recalculateUrlDefaults(r,n);let s=this.getConfiguredUrls();(o.apiUrl!==s.apiUrl||o.serverUrl!==s.serverUrl)&&r.get(Ot).resetToken("config_urls_changed"),r.get(i0).updateSessionConfig(s)}recalculateUrlDefaults(r,n){let{serverUrl:o,apiUrl:s}=HA({serverUrl:pDe(r,n.serverUrl),apiUrl:pDe(r,n.apiUrl)});this.baseUrlObject=new URL(o),this.apiUrl=s}getDefaultUrls(){return this.env.CODESPACES==="true"&&this.env.GITHUB_TOKEN&&this.env.GITHUB_SERVER_URL&&this.env.GITHUB_API_URL&&!this.env.GITHUB_COPILOT_TOKEN&&!this.env.GH_COPILOT_TOKEN?{apiUrl:this.env.GITHUB_API_URL,serverUrl:this.env.GITHUB_SERVER_URL}:{}}};f();var N0e=class extends S5{static{a(this,"TelemetryLogSenderImpl")}sendException(e,r,n){qo(e,r,n)}};f();var S2=class{static{a(this,"McpRuntimeNotifier")}},d0t=class extends S2{static{a(this,"NoOpMcpRuntimeNotifier")}async notifyLog(e){}};f();var D0e=class extends JN{static{a(this,"EmptyRecentEditsProvider")}isEnabled(){return!1}start(){}getRecentEdits(){return[]}getEditSummary(e){return null}};f();var f0t=class extends nw{constructor(r=[]){super();this._agents=r}static{a(this,"TestRemoteAgentRegistry")}agents(){return this._agents}};f();var p0t=class extends g0{constructor(){super(...arguments);this.prompts=[];this.fetchResults=[];this.diffs=[]}static{a(this,"TestConversationInspector")}shouldInspect(){return!0}inspectPrompt(r){this.shouldInspect()&&this.prompts.push(r)}inspectFetchResult(r){this.shouldInspect()&&this.fetchResults.push(r)}documentDiff(r){this.shouldInspect()&&this.diffs.push(r)}};f();var h0t=class extends fq{constructor(){super(...arguments);this.allowedFiles=[]}static{a(this,"TestingFileSearch")}addAllowedFiles(r){this.allowedFiles.push(...r)}findFiles(r,{uri:n},o){return Promise.resolve(this.allowedFiles)}};f();function X5a(t,e="cl100k_base"){return{modelId:"gpt-3.5-turbo",modelFamily:t,uiName:"Test GPT",maxRequestTokens:6144,maxResponseTokens:2048,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:e,isExperimental:!1,stream:!0,toolCalls:!0}}a(X5a,"fakeChatModelConfiguration");function Z5a(t){return{modelId:"embedding-test",modelFamily:t,maxBatchSize:1,maxTokens:50,tokenizer:"cl100k_base"}}a(Z5a,"fakeEmbeddingModelConfiguration");var m0t=class extends Da{static{a(this,"TestModelConfigurationProvider")}getBestChatModelConfig(e){let r=e[0];return Promise.resolve(X5a(r))}getFirstMatchingEmbeddingModelConfiguration(e){return Promise.resolve(Z5a(e))}};f();var g0t=class extends ip{constructor(){super(...arguments);this.openedUrls=[];this.opened=new zE}static{a(this,"TestUrlOpener")}open(r){return this.openedUrls.push(r),this.opened.resolve(),Promise.resolve()}},A0t=class extends gc{constructor(){super();this.sentMessages=[];this.warningPromises=[];this.informationPromises=[]}static{a(this,"TestNotificationSender")}performDismiss(){this.actionToPerform="DISMISS"}performAction(r){this.actionToPerform=r}showWarningMessage(r,...n){this.sentMessages.push(r);let o;if(this.actionToPerform)if(this.actionToPerform==="DISMISS")o=Promise.resolve(void 0);else{let s=n.find(c=>c.title===this.actionToPerform);o=s?Promise.resolve(s):Promise.resolve(void 0)}else o=n?Promise.resolve(n[0]):Promise.resolve(void 0);return this.warningPromises.push(o),o}showInformationMessage(r,...n){this.sentMessages.push(r);let o;if(this.actionToPerform)if(this.actionToPerform==="DISMISS")o=Promise.resolve(void 0);else{let s=n.find(c=>c.title===this.actionToPerform);o=s?Promise.resolve(s):Promise.resolve(void 0)}else o=n?Promise.resolve(n[0]):Promise.resolve(void 0);return this.informationPromises.push(o),o}showInformationModal(r,...n){return this.showInformationMessage(r,...n)}sendBackgroundAgentSessionUpdate(r,n){return Promise.resolve()}async waitForMessages(){await Promise.all(this.warningPromises),await Promise.all(this.informationPromises)}};f();function Umi(t,e,r,n){return Bx.create(fDe(t),e,r,n,e)}a(Umi,"createTextDocument");var vyr=class extends zr{constructor(r,n){super(r,n);this._openTextDocuments=[];this._notebookDocuments=new Map;this._workspaceFolders=[];this.didFocusTextDocumentEmitter=new ki;this.onDidFocusTextDocument=this.didFocusTextDocumentEmitter.event;this.didChangeTextDocumentEmitter=new ki;this.onDidChangeTextDocument=this.didChangeTextDocumentEmitter.event;this.didOpenTextDocumentEmitter=new ki;this.onDidOpenTextDocument=this.didOpenTextDocumentEmitter.event;this.didCloseTextDocumentEmitter=new ki;this.onDidCloseTextDocument=this.didCloseTextDocumentEmitter.event;this.didChangeWorkspaceFoldersEmitter=new ki;this.onDidChangeWorkspaceFolders=this.didChangeWorkspaceFoldersEmitter.event}static{a(this,"SimpleTestTextDocumentManager")}init(r){this._workspaceFolders=r.map(n=>({uri:n.uri,name:n.name??ei(n.uri)}))}async readTextDocumentFromDisk(r){return super.readTextDocumentFromDisk(r)}getTextDocumentsUnsafe(){return this._openTextDocuments}setTextDocument(r,n,o){let s=Umi(r,n,0,o);return this._openTextDocuments.push(s),s}updateTextDocument(r,n){let o=this._openTextDocuments.findIndex(c=>c.uri===r.toString());if(o<0)throw new Error("Document not found");let s=this._openTextDocuments[o];this._openTextDocuments[o]=Umi(r,s.clientLanguageId,s.version+1,n)}setNotebookDocument(r,n){this._notebookDocuments.set(r.uri.replace(/#.*/,""),n)}findNotebook({uri:r}){return this._notebookDocuments.get(r.replace(/#.*/,""))}getWorkspaceFolders(){return this._workspaceFolders}},y0t=class extends vyr{constructor(r){super(r);this.contents=new Map}static{a(this,"TestTextDocumentManager")}readTextDocumentFromDisk(r){return Promise.resolve(this.contents.get(r))}setDiskContents(r,n){this.contents.set(r,n)}};var byr=class extends Cd{static{a(this,"NullLog")}logIt(...e){}},Tyr=class extends en{static{a(this,"TestAuthManager")}constructor(e,r){super(e,{}),this.transientSession=r&&Promise.resolve(r)}getPersistedSession(){return Promise.resolve(void 0)}saveAndActivateSession(e){return Promise.resolve({status:"OK",user:"test-user"})}deleteAndDeactivateAllSessions(){return Promise.resolve({status:"NotSignedIn"})}};function eMa(t){let e=new Mne;e.set(Qc,t),e.set(sj,t);let r=new Tyr(e,{accessToken:"",login:"user"});e.set(en,r),e.set(Ko,new Ko),e.set(kb,new kb({debug:!1,verboseLogging:!1,testMode:!0,simulation:!1})),e.set(jd,Ami([])),e.set(h5,u0t(e)),e.set(bP,new bP),e.set(Ex,new V4e);let n=new C0e;e.set(Jp,n),e.set(Ot,new Ot(e,!0));let o=new _d(e);return o.updateFromToken(n.defaultToken),e.set(_d,o),e.set(np,new np),e.set(F2,new F2),e.set(gc,new A0t),e.set(ip,new g0t),e.set(S5,new N0e),e.set(Cd,new byr),e.set(OE,new OE),e.set(Ks,new Ks("test-session","test-machine","test-device")),e.set(jp,new k0e(e)),e.set(FI,new YX),e.set(i0,new i0(e,"copilot-test")),e.set(jt,new jt(e)),e.set(Bw,new Bw),e.set(Nx,new xre),e.set(Xs,new j4e),e.set(gu,new gu),e.set(ON,new ON(e)),e.set(fq,new h0t),e.set(Hw,new Hw(e)),e.set(L4,LJe(e)),e.set(jm,new jm),e.set(HC,new HC),e.set(F4,F4.default),e.set(AT,new AT(e,!1)),e.set(qc,new qc),e.set(In,new In(e)),e.set(qv,new QJe),e.set(P0,new P0),e.set(k0,zYe(e,(s,c,l)=>c.find(u=>u==="*")?1:c.find(u=>typeof u!="string"&&u.language===l.languageId)?10:0)),e.set(jC,new jC(e)),tMa(e),e.set(GC,new GC(e)),e.set(Fn,new Fn),e.set(JN,new D0e),e.set(Vw,new Vw),e.set(XT,new XT),e.set(pw,new pw(e)),e}a(eMa,"_createBaselineContext");function tMa(t){t.set(ho,new ho(t)),t.set(Na,new Na(t)),t.set(vm,new vm(t)),t.set(A0,new A0),t.set(gh,new gh),t.set(g0,new p0t),t.set(SI,new SI(t,[])),t.set(Da,new m0t),t.set(nw,new f0t),t.set(gk,new gk(t)),t.set(xF,new xF),t.set(Fd,new Fd(t)),t.set(bm,new bm),t.set(ov,new ov);let e=new A2(t);t.set(A2,e),t.set(TI,new TI(e,t)),t.set(Pk,new Pk(t)),t.set(Tb,new rft),t.set(yC,new yC(t.get(TI),t.get(Tb),t)),t.set(_p,new _p)}a(tMa,"registerConversation");function Qmi(){let t=eMa(new sj(new wre,new Map));return t.set(dr,new s0t),t.set(Nr,new Syr),t.set(zr,new y0t(t)),t.set(Xn,new _6),t.set(bc,new bc(t)),t.set(LT,new LT(t)),t.set(BN,new Sae),t.set(S2,new d0t),t.set(Cm,new x9e),Gqe(t),t.set(Gm,new ece(t)),t}a(Qmi,"createLibTestingContext");var Syr=class extends Nr{constructor(r={name:"lib-tests-plugin",version:"2"},n={name:"lib-tests-editor",version:"1"},o=[{name:"lib-tests-related-plugin",version:"3"}]){super();this.editorPluginInfo=r;this.editorInfo=n;this.relatedPluginInfo=o}static{a(this,"LibTestsEditorInfo")}getEditorInfo(){return this.editorInfo}getEditorPluginInfo(){return this.editorPluginInfo}getRelatedPluginInfo(){return this.relatedPluginInfo}};var Gmi=de(require("fs"));var qmi=`${process.env.HOME}/.copilot-testing-gh-token`,E0t,C0t;function Hmi(t){let e=jmi(),r=new Lft(rMa);return t.forceSet(Jp,r),t.get(en).setTransientSession(e),r}a(Hmi,"setIntegrationTokenManager");var rMa=a(async()=>{if(C0t)return C0t;let t=await jmi(),e=Qmi(),r=new P0e(e);return e.forceSet(dr,r),C0t=ZAt(e,t).then(n=>{if(n.copilotToken)return{token:n.copilotToken.token,refresh_in:n.copilotToken.envelope.refresh_in};throw new no('Could not fetch testing Copilot token. Try running "npm run get_token" again?')}),C0t},"getEnvelope");async function jmi(){let t=O_t(process.env);if(t)return t;try{E0t??=(await Gmi.promises.readFile(qmi)).toString().trim()}catch{E0t??=process.env.GITHUB_TOKEN??""}if(!E0t)throw new Error(`Tests: either GH_COPILOT_TOKEN, GITHUB_COPILOT_TOKEN, or GITHUB_TOKEN must be set, or there must be a GitHub token from an app with access to Copilot in ${qmi}. Run "npm run get_token" to get one.`);return{...HA({}),accessToken:E0t,login:"copilot-client tests"}}a(jmi,"getTestingGitHubSession");var nMa=S.Object({options:S.Optional(S.Object({})),githubAppId:S.Optional(S.String())});async function iMa(t,e,r){return Hmi(t),await t.get(Ot).primeToken(),["OK",null]}a(iMa,"handleTestingUseTestingTokenChecked");var $mi=He(nMa,iMa);f();var oMa=S.Object({});async function sMa(t,e,r){return await new Lfe().uninstall(t),["OK",null]}a(sMa,"handleUninstallChecked");var Vmi=He(oMa,sMa);f();var aMa=Nvn;function cMa(t,e,r){let n=t.get(k0),o={unregistered:[],notUnregistered:[]};return r.providers.forEach(s=>{try{n.unregisterContextProvider(s.id),o.unregistered.push(s.id)}catch{o.notUnregistered.push(s.id)}}),[o,null]}a(cMa,"unregisterContextProviders");var Wmi=He(aMa,cMa);f();var Iyr=de(require("os"));var lMa=S.Object({expectedCertificate:S.String()});async function uMa(t,e,r){let o=(await GWe(t).getAllRootCAs()).map(h0e),s=h0e(r.expectedCertificate);return o.includes(s)?[{status:!0,message:"Certificate verified"},null]:[{status:!1,message:`expected certificate not found - Expected to find certificate ${_Ar(s)}. Only found those installed on the system:${Iyr.EOL}${o.map(c=>"- "+_Ar(c)).join(Iyr.EOL)}`},null]}a(uMa,"handleVerifyCertificateChecked");var zmi=He(lMa,uMa);f();var dMa=S.Object({});async function fMa(){return[{status:!!await new WPe().load()},null]}a(fMa,"handleVerifyKerberosChecked");var Ymi=He(dMa,fMa);f();var pMa=S.Object({source:S.String(),version:S.Number(),uri:S.String()});async function hMa(t,e,r){let o=await t.get(zr).getTextDocument(r);return o?o.getText()!==r.source?[{status:!1,message:`Source mismatch: [State] ${o.getText()} !== [Request] ${r.source}`},null]:o.version!==r.version?[{status:!1,message:`Version mismatch: [State] ${o.version} !== [Request] ${r.version}`},null]:[{status:!0,message:""},null]:[{status:!1,message:`Document not found: <${r.uri}>`},null]}a(hMa,"handleVerifyStateChecked");var Kmi=He(pMa,hMa);f();var mMa=S.Object({});function gMa(t,e,r){return[t.get(zr).getWorkspaceFolders().map(o=>{let s=new URL(o.uri),c=decodeURIComponent(s.pathname);return{...o,path:c}}),null]}a(gMa,"handleVerifyWorkspaceStateChecked");var Jmi=He(mMa,gMa);f();f();var O0e=de(require("fs/promises")),Xmi=de(require("os")),$u=de(require("path"));var af=new Se("GitWorktreeService"),AMa=20,M0e=class{constructor(e){this.ctx=e;this.gitInstances=new $r(AMa)}static{a(this,"GitWorktreeService")}getGitInstance(e){let r=$u.resolve(e),n=this.gitInstances.get(r);return n||(n=Iqe(r),this.gitInstances.set(r,n)),n}generateTimestamp(){return new Date().toISOString().replace(/[:.]/g,"-").slice(0,19)}async runGitOperation(e,r,n,o){let s=$u.resolve(e);af.info(this.ctx,`[git] ${r} started for ${s}`);try{let c=await n(this.getGitInstance(s)),l=o?.(c);return af.info(this.ctx,`[git] ${r} finished for ${s}${l?` (${l})`:""}`),c}catch(c){let l=c instanceof Error?c.message:String(c);throw af.error(this.ctx,`[git] ${r} failed for ${s}: ${l}`),c}}async isGitRepository(e){try{return await this.runGitOperation(e,"checkIsRepo",r=>r.checkIsRepo(),r=>`isRepo=${r}`)}catch{return!1}}async getHeadCommit(e){return(await this.runGitOperation(e,"rev-parse HEAD",n=>n.raw(["rev-parse","HEAD"]),n=>`head=${n.trim()}`)).trim()}async commitWorktreeChanges(e,r,n){let o=await this.runGitOperation(e,"status",s=>s.status(),s=>`files=${s.files.length}`);return o.files.length===0?(af.info(this.ctx,`Skipping checkpoint commit for ${$u.resolve(e)} because there are no changes`),!1):(await this.runGitOperation(e,"add -A -- .",s=>s.raw(["add","-A","--","."])),await this.runGitOperation(e,`commit ${r}`,s=>s.commit(r)),af.info(this.ctx,`Created ${n} commit for ${$u.resolve(e)} with ${o.files.length} changed file(s)`),!0)}async snapshotCopiedChanges(e){af.info(this.ctx,`Snapshotting copied changes in ${$u.resolve(e)} to establish the apply baseline`),await this.commitWorktreeChanges(e,"chore: snapshot copied worktree changes","copied worktree changes");let r=await this.getHeadCommit(e);return af.info(this.ctx,`Using copied-changes snapshot commit ${r} as the worktree baseCommit`),r}async applyPatchToRepository(e,r){let n=await O0e.mkdtemp($u.join(Xmi.tmpdir(),"copilot-worktree-")),o=$u.join(n,"changes.patch");try{af.info(this.ctx,`Writing temporary patch for ${$u.resolve(e)} to ${o} (${r.length} chars)`),await O0e.writeFile(o,r,"utf8"),await this.runGitOperation(e,`apply --check ${o}`,s=>s.raw(["apply","--check",o])),await this.runGitOperation(e,`apply ${o}`,s=>s.raw(["apply",o]))}finally{await O0e.rm(n,{recursive:!0,force:!0}),af.info(this.ctx,`Removed temporary patch file ${o}`)}}async createWorktree(e){let{repositoryPath:r}=e;if(!await this.isGitRepository(r))throw new Error(`${r} is not a git repository`);let s=(await this.runGitOperation(r,"branch",g=>g.branch(),g=>`current=${g.current||"HEAD"}`)).current||"HEAD",c=await this.getHeadCommit(r),l=this.generateTimestamp(),u=`copilot/worktree-${l}`,d=`copilot-worktree-${l}`,p=$u.basename(r),h=$u.join($u.dirname(r),`${p}.worktrees`),m=$u.join(h,d);return af.info(this.ctx,`Preparing worktree creation for ${$u.resolve(r)} with branch ${u}, baseBranch ${s}, baseCommit ${c}`),await this.runGitOperation(r,`worktree add -b ${u} ${m} ${s}`,g=>g.raw(["worktree","add","-b",u,m,s])),af.info(this.ctx,`Created worktree ${m} from ${$u.resolve(r)}`),{worktreePath:m,worktreeDirName:d,branchName:u,baseBranchName:s,baseCommit:c,repositoryPath:r}}async removeWorktree(e,r){af.info(this.ctx,`Preparing to remove worktree ${e} from ${$u.resolve(r)}`),await this.runGitOperation(r,`worktree remove --force ${e}`,n=>n.raw(["worktree","remove","--force",e])),af.info(this.ctx,`Removed worktree ${e}`)}async getUncommittedChanges(e){if(!await this.isGitRepository(e))return af.info(this.ctx,`Skipping status lookup for ${$u.resolve(e)} because it is not a git repository`),[];let r=await this.runGitOperation(e,"status",n=>n.status(),n=>`files=${n.files.length}`);return[...new Set(r.files.map(n=>n.path))]}async applyWorktreeChanges(e,r,n){af.info(this.ctx,`Applying worktree changes from ${$u.resolve(e)} to ${$u.resolve(r)} using baseCommit ${n}`);let o=await this.commitWorktreeChanges(e,"chore: checkpoint worktree changes","checkpoint worktree changes");af.info(this.ctx,o?`Committed pending worktree changes in ${$u.resolve(e)} before generating patch`:`No pending worktree changes to commit in ${$u.resolve(e)}`);let s=await this.getHeadCommit(e);if(s===n)return af.info(this.ctx,"No new commits to apply from worktree"),{baseCommit:s};let c=await this.runGitOperation(e,`diff --binary --full-index ${n}..${s}`,l=>l.raw(["diff","--binary","--full-index",`${n}..${s}`]),l=>`outputLength=${l.length}`);if(!c.trim())return af.info(this.ctx,"No patch content to apply from worktree"),{baseCommit:s};try{await this.applyPatchToRepository(r,c)}catch(l){let u=l instanceof Error?l.message:String(l);throw new Error(`Failed to apply worktree patch: ${u}`)}return af.info(this.ctx,`Applied worktree patch from ${n} to ${s}`),{baseCommit:s}}async stash(e){await this.runGitOperation(e,"stash push --include-untracked",r=>r.stash(["push","--include-untracked"])),af.info(this.ctx,`Stashed changes in ${e}`)}async stashApply(e){await this.runGitOperation(e,"stash apply",r=>r.stash(["apply"])),af.info(this.ctx,`Applied stash in ${e}`)}async stashPop(e){await this.runGitOperation(e,"stash pop",r=>r.stash(["pop"])),af.info(this.ctx,`Popped stash in ${e}`)}};f();var Zmi=de(Nn());var D_=new Se("WorktreeService");var yMa=new Zmi.ProtocolRequestType("worktree/requestUserDecision"),zPe=class{constructor(e,r){this.ctx=e;this.gitService=r}static{a(this,"WorktreeService")}async requestUserDecision(e){let r=await this.gitService.getUncommittedChanges(e);if(r.length===0)return D_.info(this.ctx,`No uncommitted changes found in ${e}, skipping user decision prompt`),"skip";D_.info(this.ctx,`Found ${r.length} uncommitted changes, requesting user decision`);let o=await this.ctx.get(Ar).connection.sendRequest(yMa,{type:"uncommitted-changes",title:"Handle Uncommitted Changes",message:`You have ${r.length} uncommitted changes. How would you like to proceed?`,options:[{id:"copy",label:"Copy changes",description:"Copy uncommitted changes into the new worktree",recommended:!0},{id:"move",label:"Move changes",description:"Move uncommitted changes to the new worktree and clean the original"},{id:"skip",label:"Skip changes",description:"Create worktree from clean state, leave local changes untouched"},{id:"cancel",label:"Cancel",description:"Cancel worktree creation",destructive:!0}],defaultOption:"copy"});return o.cancelled?(D_.info(this.ctx,`User cancelled worktree creation for ${e}`),"cancel"):(D_.info(this.ctx,`User selected worktree migration strategy ${o.selectedOption} for ${e}`),o.selectedOption)}async createWorktree(e,r){D_.info(this.ctx,`Starting worktree creation for ${e} with strategy ${r}`);let n=r==="copy"||r==="move";n&&(D_.info(this.ctx,`Stashing original repository changes before worktree creation for ${e}`),await this.gitService.stash(e));let o;try{o=await this.gitService.createWorktree({repositoryPath:e})}catch(s){throw n&&(D_.warn(this.ctx,`Worktree creation failed for ${e}, restoring original stash`),await this.gitService.stashPop(e).catch(()=>{})),s}if(n)try{if(D_.info(this.ctx,`Migrating changes into worktree ${o.worktreePath} using strategy ${r}`),r==="copy"){await this.gitService.stashApply(o.worktreePath),await this.gitService.stashPop(e);let s=await this.gitService.snapshotCopiedChanges(o.worktreePath);o={...o,baseCommit:s},D_.info(this.ctx,`Updated worktree baseCommit to copied-changes snapshot ${s} for ${o.worktreePath}`)}else await this.gitService.stashPop(o.worktreePath);D_.info(this.ctx,`Finished migrating changes into worktree ${o.worktreePath}`)}catch(s){throw D_.warn(this.ctx,`Failed to migrate changes to worktree: ${s instanceof Error?s.message:String(s)}`),await this.gitService.stashPop(e).catch(()=>{}),s}return D_.info(this.ctx,`Completed worktree creation for ${e}; worktreePath=${o.worktreePath}, baseCommit=${o.baseCommit}`),o}async applyWorktreeChanges(e,r,n){D_.info(this.ctx,`Starting worktree apply from ${r} to ${e} with baseCommit ${n}`);let o=await this.gitService.applyWorktreeChanges(r,e,n);return D_.info(this.ctx,`Completed worktree apply from ${r} to ${e}; nextBaseCommit=${o.baseCommit}`),o}};var EMa="Failed to apply changes to the current workspace. Please stage or commit your changes in the current workspace and try again.",CMa=["already exists in working directory","patch does not apply","patch failed"];function _Ma(t){let e=t instanceof Error?t.message:String(t);return e.includes("Failed to apply worktree patch:")&&CMa.some(n=>e.includes(n))?EMa:`Failed to apply worktree changes: ${e}`}a(_Ma,"getWorktreeCompleteErrorMessage");var vMa=S.Object({repositoryPath:S.String()});async function bMa(t,e,r){try{let n=new M0e(t),o=new zPe(t,n),s=await o.requestUserDecision(r.repositoryPath);if(s==="cancel")return[{success:!1,error:"Worktree creation cancelled by user"},null];let c=await o.createWorktree(r.repositoryPath,s);return[{success:!0,worktreePath:c.worktreePath,worktreeDirName:c.worktreeDirName,branchName:c.branchName,baseBranchName:c.baseBranchName,baseCommit:c.baseCommit},null]}catch(n){let o=n instanceof Error?n.message:String(n);return[null,{code:lt.InternalError,message:`Failed to create worktree: ${o}`}]}}a(bMa,"handleWorktreeCreateChecked");var egi=He(vMa,bMa),TMa=S.Object({repositoryPath:S.String(),worktreePath:S.String(),baseCommit:S.String()});async function SMa(t,e,r){try{let n=new M0e(t);return[{success:!0,baseCommit:(await new zPe(t,n).applyWorktreeChanges(r.repositoryPath,r.worktreePath,r.baseCommit)).baseCommit},null]}catch(n){return[null,{code:lt.InternalError,message:_Ma(n)}]}}a(SMa,"handleWorktreeCompleteChecked");var tgi=He(TMa,SMa),IMa=S.Object({worktreePath:S.String(),repositoryPath:S.String()});async function xMa(t,e,r){try{return await new M0e(t).removeWorktree(r.worktreePath,r.repositoryPath),[{success:!0},null]}catch(n){let o=n instanceof Error?n.message:String(n);return[null,{code:lt.InternalError,message:`Failed to delete worktree: ${o}`}]}}a(xMa,"handleWorktreeDeleteChecked");var rgi=He(IMa,xMa);var gX=class{constructor(e){this.handlers=e}static{a(this,"MethodHandlers")}};function ngi(){let t=new Map;return t.set(fpi.method,ppi),t.set("getCompletions",B0i),t.set("getCompletionsCycling",L0i),t.set("getDefaultFileSafetyRules",F0i),t.set("getPanelCompletions",q0i),t.set(_0i.method,v0i),t.set("getVersion",H0i),t.set("getUserInfo",G0i),t.set("setEditorInfo",Upi),t.set("checkStatus",Bfi),t.set("checkQuota",Ofi),t.set("checkFileStatus",Dfi),t.set("signInInitiate",xAr),t.set("signIn",xAr),t.set("signInWithCodeFlow",$pi),t.set("signInWithDeviceFlow",zpi),t.set("signInConfirm",Qpi),t.set("signInWithGithubToken",Ypi),t.set("signOut",Kpi),t.set("notifyShown",Mpi),t.set("notifyAccepted",Npi),t.set("notifyRejected",Dpi),t.set("telemetry/exception",Jpi),t.set("textDocument/copilotInlineEdit",kpi),t.set("testing/overrideExpFlags",Emi),t.set("testing/alwaysAuth",BAr),t.set("testing/setAlwaysAuthed",BAr),t.set("testing/neverAuth",dyr),t.set("testing/setNeverAuthed",dyr),t.set("testing/useTestingToken",$mi),t.set("testing/setCompletionDocuments",N0i),t.set("testing/setPanelCompletionDocuments",E0i),t.set("testing/setNextEditDocument",xpi),t.set("testing/triggerShowMessageRequest",vmi),t.set("testing/flushPromiseQueue",dmi),t.set("testing/getDocument",gmi),t.set("testing/chatml",Xpi),t.set("testing/setSyntheticTurns",_mi),t.set("testing/fetch",umi),t.set("testing/setContentExclusionRules",Cmi),t.set("testing/getContext",mmi),t.set("uninstall",Vmi),t.set("debug/diagnostics",x0i),t.set("debug/listCertificates",hpi),t.set("debug/verifyState",Kmi),t.set("debug/verifyCertificate",zmi),t.set("debug/verifyKerberos",Ymi),t.set("debug/verifyWorkspaceState",Jmi),t.set("context/registerProviders",Opi),t.set("context/unregisterProviders",Wmi),t.set("conversation/preconditions",Yfi),t.set("conversation/persistence",zfi),t.set("conversation/create",jfi),t.set("conversation/turn",Zfi),t.set("conversation/turnDelete",e0i),t.set("conversation/destroy",$fi),t.set("conversation/compress",qfi),t.set("conversation/rating",Kfi),t.set("conversation/copyCode",Ufi),t.set("conversation/insertCode",Qfi),t.set("conversation/templates",Xfi),t.set("conversation/modes",Vfi),t.set("conversation/agents",Ffi),t.set("conversation/registerTools",Jfi),t.set("conversation/unregisterTools",t0i),t.set("conversation/updateToolsStatus",r0i),t.set("conversation/notifyCodeAcceptance",Wfi),t.set("copilot/models",p0i),t.set("copilot/models/getModelMetadataList",h0i),t.set("copilot/byok/saveModel",Nfi),t.set("copilot/byok/deleteModel",Vdi),t.set("copilot/byok/listModels",Pfi),t.set("copilot/byok/saveApiKey",kfi),t.set("copilot/byok/deleteApiKey",$di),t.set("copilot/byok/listApiKeys",Wdi),t.set("copilot/setModelPolicy",m0i),t.set("copilot/codeReview/reviewChanges",i0i),t.set("copilot/codeReview/reviewSnippets",o0i),t.set("git/commitGenerate",j0i),t.set("thinking/generateTitle",n0i),t.set("mcp/getTools",a0i),t.set("mcp/updateToolsStatus",c0i),t.set("mcp/readResource",l0i),t.set("mcp/registry/listServers",bpi),t.set("mcp/registry/getServer",Tpi),t.set("mcp/registry/getAllowlist",Ipi),t.set("mcp/getPrompt",u0i),t.set("mcp/completePrompt",d0i),t.set("mcp/serverAction",f0i),t.set("githubApi/searchPR",upi),t.set("githubApi/cancelCodingAgent",Lfi),t.set("githubApi/listPullRequestChangedFiles",$0i),t.set("worktree/create",egi),t.set("worktree/complete",tgi),t.set("worktree/delete",rgi),t.set("backgroundAgent/create",Mdi),t.set("backgroundAgent/send",Hdi),t.set("backgroundAgent/destroy",Odi),t.set("backgroundAgent/listModels",Qdi),t.set("backgroundAgent/listSessions",Fdi),t.set("backgroundAgent/resume",Gdi),t.set("backgroundAgent/stop",jdi),t.set("backgroundAgent/interaction",Bdi),new gX(t)}a(ngi,"getAllMethods");f();f();f();var igi=de(Fx());var M_=class{constructor(e){this.ctx=e}static{a(this,"AbstractNotification")}get type(){return new igi.NotificationType(this.name)}};var xyr=class extends M_{constructor(){super(...arguments);this.name="backgroundAgent/sessionUpdate";this.params=S.Object({sessionId:S.String(),event:S.Unknown()})}static{a(this,"BackgroundAgentSessionUpdateNotification")}handle(){}},ogi=[xyr];f();var wyr=class extends M_{constructor(){super(...arguments);this.name="copilot/didChangeToken";this.params=S.Unknown()}static{a(this,"DidChangeTokenNotificationHandler")}handle(){this.ctx.get(Ot).resetToken("did_change_token_notification")}},sgi=[wyr];f();var wMa=new Se("agentCopilotTokenManager");function Pyr(t){try{let e=new URL(t||"https://api.github.com");if(e.protocol==="https:"&&e.hostname.startsWith("api."))return`${e.origin}/`}catch{}}a(Pyr,"tokenEndpointToApiUrl");function RMa(t,e){if(!e.tokenEndpoint)return HA(e);let r=Pyr(e.tokenEndpoint);return r||wMa.warn(t,`Invalid token endpoint URL <${e.tokenEndpoint}>`),HA({apiUrl:r})}a(RMa,"getUrlsFromParams");var Ryr=class extends M_{constructor(){super(...arguments);this.name=q2t.method;this.params=q$r}static{a(this,"DidChangeAuthNotificationHandler")}handle(r){let n=this.ctx.get(en),o=RMa(this.ctx,r);this.ctx.get(jp).setConfiguredUrls(this.ctx,o);let s=r.handle||r.login;s&&r?.accessToken?n.setTransientSession({accessToken:r.accessToken,login:s,githubAppId:r.githubAppId,...o}):n.setTransientSession({githubAppId:r.githubAppId,...o})}},agi=[Ryr];f();var kyr=class extends M_{constructor(){super(...arguments);this.name=W2t.method;this.params=Y$r}static{a(this,"DidShowCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],s=this.ctx.get(Cl).get(n);s&&tIn(this.ctx,s)}},Nyr=class extends M_{constructor(){super(...arguments);this.name=Y2t.method;this.params=eVr}static{a(this,"DidShowInlineEditNotificationHandler")}async handle(r){let n=r.item.command.arguments[0];await this.ctx.get(_b).handleShown(n)}},Dyr=class extends M_{constructor(){super(...arguments);this.name=z2t.method;this.params=K$r}static{a(this,"DidPartiallyAcceptCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],o=r.acceptedLength,s=this.ctx.get(Cl),c=s.get(n);c&&(o>=c.insertText.length?(s.delete(n),Xae(this.ctx,c)):WJe(this.ctx,c,o,void 0,void 0,"cumulative"))}},cgi=[kyr,Nyr,Dyr];f();var _0t=class extends M_{constructor(){super(...arguments);this.name="window/workDoneProgress/cancel";this.params=S.Object({token:S.Union([S.String(),S.Number()])})}static{a(this,"WorkDoneProgressCancelNotification")}handle(r){this.ctx.get(y2).cancel(r.token)}};var PMa=[...ogi,...sgi,...agi,...cgi,_0t];function lgi(t,e){for(let r of PMa){let n=new r(t),o=Ol.Compile(n.params);e.onNotification(n.type,$p(t,async s=>{N3(s),o.Check(s)?await n.handle(s):Ka.error(t,`Notification ${n.name}:`,new Om(o.Errors(s)))},`Notification ${n.name}`))}}a(lgi,"registerNotifications");f();f();var ugi=de(require("crypto")),dgi=require("os");var kMa=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function NMa(t){let e=t.replace(/-/g,":").toLowerCase();return!kMa.has(e)}a(NMa,"validateMacAddress");function DMa(){let t=(0,dgi.networkInterfaces)();for(let e in t){let r=t[e];if(r){for(let{mac:n}of r)if(NMa(n))return n}}throw new Error("Unable to retrieve mac address (unexpected format)")}a(DMa,"getMac");var Myr;function MMa(){try{let t=DMa();return ugi.createHash("sha256").update(t,"utf8").digest("hex")}catch{return}}a(MMa,"getMacMachineId");function Oyr(){return Myr||(Myr=MMa()||yr()),Myr}a(Oyr,"getMachineId");function Byr(t){let e=t??yr()+Date.now();return new Ks(e,Oyr(),Oyr())}a(Byr,"createEditorSession");var fgi=Byr();f();var v0t=de(Su());var Lyr=new Se("AgentTextDocumentConfiguration"),Fyr=class{constructor(e){this.ctx=e;this.#e=new ki;this.onDidChange=this.#e.event}static{a(this,"AgentTextDocumentsConfiguration")}#e;create(e,r,n,o){try{return Bx.create(e,r,n,o)}catch(s){throw Lyr.exception(this.ctx,s,".create"),s}}update(e,r,n){try{let o=[],s=Bx.withChanges(e,r,n);for(let l of r)if(v0t.TextDocumentContentChangeEvent.isIncremental(l)){let u=e.offsetAt(l.range.start),d=e.offsetAt(l.range.end),p={start:e.positionAt(u),end:e.positionAt(d)};for(let m of["start","end"])if(p[m].line!==l.range[m].line||p[m].character!==l.range[m].character){let g=`invalid range ${m} position ${JSON.stringify(l.range[m])}. Assuming ${JSON.stringify(p[m])}.`;Lyr.warn(this.ctx,`textDocument/didChange for ${e.uri} has ${g}`);let A=yt.createAndMarkAsIssued({message:`Received ${g}`});at(this.ctx,`invalidRange.${m}`,A)}let h={range:p,rangeOffset:u,rangeLength:d-u,text:l.text};o.push(h),e=e.applyEdits([{range:h.range,newText:h.text}])}let c={document:{uri:e.uri,version:n},contentChanges:o};return this.#e.fire(c),s}catch(o){throw Lyr.exception(this.ctx,o,".update"),o}}},hq=class extends zr{constructor(){super(...arguments);this.#e=new ki;this.onDidOpenTextDocument=this.#e.event;this.#t=new ki;this.onDidCloseTextDocument=this.#t.event;this.#n=new ki;this.onDidFocusTextDocument=this.#n.event;this._textDocumentConfiguration=new Fyr(this.ctx);this.onDidChangeTextDocument=this._textDocumentConfiguration.onDidChange;this._documents=new Map;this._notebookDocuments=new v0t.NotebookDocuments(this._textDocumentConfiguration);this.workspaceFolders=[];this.#r=new ki;this.onDidChangeWorkspaceFolders=this.#r.event}static{a(this,"AgentTextDocumentManager")}#e;#t;#n;#r;get connection(){return this.ctx.get(Ar).connection}init(r){this.connection.onDidOpenTextDocument(n=>{let o=n.textDocument,s=this._textDocumentConfiguration.create(o.uri,o.languageId,o.version,o.text);this._documents.set(ha(o.uri),s),this.#e.fire({document:{...o,uri:s.uri}})}),this.connection.onDidChangeTextDocument(n=>{let o=n.textDocument,s=n.contentChanges,{version:c}=o;if(c==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let l=ha(o.uri),u=this._documents.get(l);u!==void 0&&(u=this._textDocumentConfiguration.update(u,s,c),this._documents.set(l,u))}),this.connection.onDidCloseTextDocument(n=>{let o=ha(n.textDocument.uri);this._documents.delete(o),this.#t.fire({document:{uri:o}})}),this.connection.onNotification(j2t.type,n=>{let o=("textDocument"in n?n.textDocument:n)??{};this.#n.fire("uri"in o?{document:o}:{})}),this._notebookDocuments.listen(this.connection),this.workspaceFolders.length=0,this.workspaceFolders.push(...r),r.length>0&&this.#r.fire({workspaceFolders:this.workspaceFolders,added:r,removed:[]})}didChangeWorkspaceFolders(r){r.added.forEach(n=>this.registerWorkspaceFolder(n)),r.removed.forEach(n=>this.unregisterWorkspaceFolder(n)),this.#r.fire({workspaceFolders:this.workspaceFolders,added:r.added,removed:r.removed})}unregisterWorkspaceFolder(r){let n=this.workspaceFolders.findIndex(o=>o.uri===r.uri);n>=0&&this.workspaceFolders.splice(n,1)}registerWorkspaceFolder(r){this.workspaceFolders.find(n=>n.uri===r.uri)||this.workspaceFolders.push(r)}getTextDocumentsUnsafe(){return[...this._documents.values()]}getTextDocumentUnsafe(r){return this._documents.get(ha(r.uri))}getWorkspaceFolders(){return this.workspaceFolders}findNotebook(r){let n=this._notebookDocuments.findNotebookDocumentForCell(r.uri);if(n)return{getCells:a(()=>n.cells.map((o,s)=>this.wrapCell(o,s)).filter(o=>!!o),"getCells"),getCellFor:a(({uri:o})=>{let s=n.cells.findIndex(c=>c.document===o);return s!==-1?this.wrapCell(n.cells[s],s):void 0},"getCellFor")}}wrapCell(r,n){let o=this._notebookDocuments.getCellTextDocument(r);if(o)return{kind:r.kind,metadata:r.metadata??{},index:n,document:o}}};var pgi=Ol.Compile(V$r);function N3(t){if(t!==null){if(Array.isArray(t))for(let e=0;e{try{if(this.#t?.workspace?.configuration&&e&&typeof e=="object"&&!("settings"in e)){let n=await this.connection.workspace.getConfiguration(hgi.map(s=>({section:s}))),o={github:{copilot:n.shift()}};for(let s of DPe)o[s]=n.shift();e.settings=o}if(e&&typeof e=="object"&&"settings"in e)try{this.ctx.get(dk).handleConfigurationChange(e.settings)}catch(n){Ka.exception(this.ctx,n,"EncodingConfigurationService.handleConfigurationChange")}return Nft(this.ctx,N3(e))}catch(r){Ka.exception(this.ctx,r,"didChangeConfiguration")}},"handleDidChangeConfiguration");this.#n=this.ctx.get(Cd)}static{a(this,"Service")}#e;#t;#n;get clientCapabilities(){return this.#t}listen(){let e=this.ctx,r=this.connection;r.onRequest(this.messageHandler.bind(this)),lgi(e,r);let n={name:"GitHub Copilot Language Server",version:e.get(Ko).getDisplayVersion(),nodeVersion:process.versions.node};function o(c){try{e.get(hq).didChangeWorkspaceFolders(c)}catch(l){Ka.exception(e,l,"didChangeWorkspaceFolders")}}a(o,"didChangeWorkspaceFolders"),this.connection.onNotification("vs/didAddWorkspaceFolder",({name:c,uri:l})=>o({added:[{uri:l,name:c??l}],removed:[]})),this.connection.onNotification("vs/didRemoveWorkspaceFolder",({name:c,uri:l})=>o({added:[],removed:[{uri:l,name:c??l}]})),r.onInitialize(c=>{if(this.initialized)throw new Error("initialize request sent after initialized notification");this.#t=c.capabilities;let l=c.capabilities.copilot,u=N3(c.initializationOptions);if(u){if(!pgi.Check(u))throw new Om(pgi.Errors(u));let m=u,g=e.get(Nr);m.editorPluginInfo?g.setEditorAndPluginInfo({version:"unknown",...m.editorPluginInfo},m.editorInfo&&{version:"unknown",...m.editorInfo},m.relatedPluginInfo??[]):Ka.warn(e,"editorInfo and editorPluginInfo will soon be required in initializationOptions. This will replace setEditorInfo."),m.copilotIntegrationId&&g.setCopilotIntegrationId(m.copilotIntegrationId),m.githubAppId&&(e.get(qc).githubAppId=m.githubAppId),m.copilotCapabilities&&(l=m.copilotCapabilities),m.sessionId&&e.forceSet(Ks,Byr(m.sessionId))}let d=c.capabilities.workspace?.workspaceFolders??!1;e.get(hq).init(c.workspaceFolders??[]),pvn(this.ctx),l&&(e.get(Fn).setCapabilities(l),l.contentProvider&&tm.registerSchemes(l.contentProvider),"openURL"in l&&zJe(e,["The openURL Copilot capability has been removed in favor of window/showDocument."]));let h=a(async()=>{this.initialized||(this.initialized=!0,Ka.info(e,`${n.name} ${n.version} initialized`),e.get(Ot).primeToken(),d&&r.workspace.onDidChangeWorkspaceFolders(o),c.capabilities.workspace?.didChangeConfiguration?.dynamicRegistration&&await r.client.register(Ib.DidChangeConfigurationNotification.type,{section:hgi}),c.capabilities.workspace?.configuration?await this.handleDidChangeConfiguration({}):await Promise.race([this.ctx.get(TC).requireReady().then(()=>!0),new Promise(A=>setTimeout(()=>A(!1),200))])||kft(e),!this.deactivated&&(this.activationEmitter.fire(),new Lfe().startup(e).catch(()=>{})))},"onInitialized");return r.onInitialized($p(e,h,"onInitialized")),e.get(c5).init(),l?.token&&e.get(en).setTransientSession({}),l?.redirectedTelemetry&&kdi(e),mgi.lt(process.versions.node,"22.0.0")&&Ka.warn(e,`Node.js ${process.versions.node} support is deprecated. Please upgrade to Node.js 22 or newer.`),{capabilities:{textDocumentSync:{openClose:!0,change:Ib.TextDocumentSyncKind.Incremental},notebookDocumentSync:{notebookSelector:[{notebook:"*"}]},workspace:{workspaceFolders:{supported:d,changeNotifications:d}},executeCommandProvider:{commands:xdi(e,r)},inlineCompletionProvider:{}},serverInfo:n}}),r.onShutdown(async()=>{await(this.#e??=this.deactivate())}),r.onExit(()=>{this.onExit()}),r.onDidChangeConfiguration(c=>{this.handleDidChangeConfiguration(c)}),r.listen();let s=new vdt;this.ctx.forceSet(Cd,s)}telemetryMethodFailure(e,r){let n=e.replaceAll("/",".");_u(this.ctx,"lsp.method.failure",r,{method:n})}async messageHandler(e,r,n){let o=this.ctx.get(gX).handlers.get(e);if(!o)return new Ib.ResponseError(lt.MethodNotFound,`Method not found: ${e}`);if(!this.initialized)return new Ib.ResponseError(lt.ServerNotInitialized,"Agent service not initialized.");if(this.#e)return new Ib.ResponseError(lt.InvalidRequest,"Agent service shut down.");if(e!=="setEditorInfo"&&!Lnn(this.ctx.get(Nr)))throw new Ib.ResponseError(lt.ServerNotInitialized,"editorInfo and editorPluginInfo not set in initializationOptions");Array.isArray(r)&&(r=r[0]),N3(r);try{let[s,c]=await o(this.ctx,n,r);return c?new Ib.ResponseError(c.code,c.message,c.data):s}catch(s){if(n.isCancellationRequested)return new Ib.ResponseError(lt.RequestCancelled,"Request was canceled");if(s instanceof no)return this.telemetryMethodFailure(e,s),new Ib.ResponseError(lt.NoCopilotToken,`Not authenticated: ${s.message}`);throw s instanceof Ib.ResponseError||Ka.exception(this.ctx,s,`Request ${e}`),this.telemetryMethodFailure(e,s),s}}async onExit(){try{this.ctx.get(hw).dispose()}catch(e){Ka.exception(this.ctx,e,"failed to dispose ripgrep process manager")}try{this.ctx.get(cw).dispose()}catch(e){Ka.exception(this.ctx,e,"failed to dispose workspace chunk search service")}try{await this.ctx.get(Lu).shutdown()}catch(e){Ka.exception(this.ctx,e,"failed to shutdown background agent service")}this.ctx.forceSet(Cd,this.#n),await(this.#e??=this.deactivate())}markDeactivated(){this.deactivated||(this.deactivated=!0,this.deactivationEmitter.fire(),this.ctx.get(TC).markReady())}async deactivate(){let e=this.ctx;this.markDeactivated(),C$t(e),await Promise.race([new Promise(r=>setTimeout(r,100)),e.get(gu).flush()]),await Promise.race([new Promise(r=>setTimeout(r,1800)),e.get(np).deactivate()])}dispose(){this.markDeactivated(),this.connection.dispose()}},Ka=new Se("lsp");var uE=class{constructor(e,r,n){this.ctx=e;this.skillId=r;this.requestType=new ggi.ProtocolRequestType("conversation/context");this.typeCheck=Ol.Compile(n)}static{a(this,"AgentSkillResolver")}async resolveSkill(e){let r=this.ctx.get(Ar).connection,n={conversationId:e.conversation.id,turnId:e.turn.id,skillId:this.skillId},o;try{let s=await r.sendRequest(this.requestType,n),[c,l]=s;if(l){let u=new Agi.ResponseError(l.code,l.message,l.data);Ge.error(this.ctx,`ResponseError while resolving skill ${this.skillId}`,u);return}o=c}catch(s){Ge.error(this.ctx,`Error while resolving skill ${this.skillId}`,s);return}if(o!=null){if(!this.typeCheck.Check(o))throw new Om(this.typeCheck.Errors(o));return o}}};var Uyr=class{constructor(e,r,n="",o="",s=[],c=[]){this.progressToken=e;this.chunks=r;this.followUp=n;this.suggestedTitle=o;this.skills=s;this.references=c}static{a(this,"SyntheticTurn")}},V3=class{constructor(){this.turns=[]}static{a(this,"SyntheticTurns")}add(e,r,n="",o="",s=[],c=[]){let l=new Uyr(e,r,n,o,s,c);return this.turns.push(l),l}get(e){return this.turns.find(r=>r.progressToken===e)}},b0t=class{constructor(e,r){this.turnContext=e;this.syntheticTurn=r;this.conversationProgress=e.ctx.get(Na)}static{a(this,"SyntheticTurnProcessor")}async process(e,r){try{await this.processWithSyntheticTurns(this.syntheticTurn,e,r)}catch(n){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turnContext.turn.id}`,n);let o=n.message;this.turnContext.turn.status="error",this.turnContext.turn.response={message:o,type:"meta"},await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{error:{message:o,responseIsIncomplete:!0}})}}async processWithSyntheticTurns(e,r,n){await this.conversationProgress.begin(this.turnContext.conversation,this.turnContext.turn,r),await this.resolveSyntheticSkill(e,n),await this.processSyntheticChunks(e,n),await this.endSyntheticProgress(e,n),this.turnContext.turn.response={type:"model",message:e.chunks.join("")},this.turnContext.turn.status=n.isCancellationRequested?"cancelled":"success"}async resolveSyntheticSkill(e,r){let n=this.turnContext.ctx.get(ho).getCapabilities(this.turnContext.conversation.id),o=e.skills.filter(s=>n.skills.includes(s));for(let s of o){let l=await new uE(this.turnContext.ctx,s,S.Object({value:S.String()})).resolveSkill(this.turnContext);l&&!r.isCancellationRequested&&await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:l.value})}}async processSyntheticChunks(e,r){for(let n of e.chunks)r.isCancellationRequested||(await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:n}),await CT(1))}async endSyntheticProgress(e,r){r.isCancellationRequested?await this.conversationProgress.cancel(this.turnContext.conversation,this.turnContext.turn):await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{followUp:{message:e.followUp,type:"followup",id:yr()},suggestedTitle:e.suggestedTitle,updatedDocuments:this.turnContext.conversation.source==="inline"?[{uri:"fakeUpdatedDoc.ts",text:"fake"}]:void 0})}};var E2=class{static{a(this,"TurnProcessorFactory")}async createProcessor(e,r,n){let o=e.ctx.get(V3).get(r);if(o)return new b0t(e,o);let c=(await FT(e.ctx)).find(u=>u.slug===e.turn.agent?.agentSlug);if(c?.turnProcessor)return c.turnProcessor(e);let l;return e.conversation.source==="inline"?l=new MUe(e.ctx):l=new zne(e.ctx),n!==void 0&&(l.computeSuggestions=n),e.turn.chatMode?.kind==="Agent"||e.turn.chatMode?.kind==="InlineAgent"?new C1e(e,l):e.turn.chatMode?.kind==="Ask"&&e.conversation.source!=="inline"?new C1e(e,l):new d$e(e,l)}};f();var mq=class extends ay{constructor(r){super(r);this.connection=null;this.capabilities={readTextFile:!1,writeTextFile:!1};this.currentSessionId=null}static{a(this,"ACPClientToolInvoker")}setACPContext(r,n,o){this.connection=r,this.capabilities=n,this.currentSessionId=o}clearACPContext(){this.currentSessionId=null}async invokeClientTool(r,n){if(!this.connection||!this.currentSessionId)return this.errorResult("ACP connection not available for tool invocation");switch(n.name){case"create_file":return this.handleCreateFile(n.input,n.toolCallId);case"insert_edit_into_file":return this.handleEditFile(n.input,n.toolCallId);default:return this.errorResult(`Tool ${n.name} is not supported in ACP mode`)}}async handleCreateFile(r,n){if(!this.capabilities.writeTextFile)return this.errorResult("Client does not support file writing");if(!r?.filePath||r.content===void 0)return this.errorResult("create_file requires filePath and content");try{let o=r.content;return await this.connection.writeTextFile({sessionId:this.currentSessionId,path:r.filePath,content:o}),await this.sendDiffUpdate(n,r.filePath,null,o),this.successResult(`Successfully created file: ${r.filePath}`)}catch(o){return this.errorResult(`Failed to create file ${r.filePath}: ${String(o)}`)}}async handleEditFile(r,n){if(!this.capabilities.writeTextFile)return this.errorResult("Client does not support file writing");if(!r?.filePath||r.code===void 0)return this.errorResult("insert_edit_into_file requires filePath and code");try{let o=null;if(this.capabilities.readTextFile)try{o=(await this.connection.readTextFile({sessionId:this.currentSessionId,path:r.filePath})).content}catch{}let s=r.code.replace(/\r\n/g,` -`);return await this.connection.writeTextFile({sessionId:this.currentSessionId,path:r.filePath,content:s}),await this.sendDiffUpdate(n,r.filePath,o,s),this.successResult(`Successfully edited file: ${r.filePath}`)}catch(o){return this.errorResult(`Failed to edit file ${r.filePath}: ${String(o)}`)}}async sendDiffUpdate(r,n,o,s){await this.connection.sessionUpdate({sessionId:this.currentSessionId,update:{sessionUpdate:"tool_call_update",toolCallId:r,content:[{type:"diff",path:n,oldText:o,newText:s}]}})}successResult(r){return new Cr([new fr(r)],"success")}errorResult(r){return new Cr([new fr(r)],"error")}};f();function OMa(t){switch(t){case"read_file":case"list_dir":case"get_errors":return"read";case"insert_edit_into_file":case"create_file":case"replace_string_in_file":return"edit";case"semantic_search":case"file_search":case"grep_search":return"search";case"run_in_terminal":case"run_subagent":return"execute";case"update_user_preferences":case"validate_cves":default:return"other"}}a(OMa,"mapToolNameToKind");function BMa(t,e){if(!e)return;let r=[];switch(t){case"read_file":case"insert_edit_into_file":case"create_file":case"replace_string_in_file":{let n=e.filePath;if(n){let o=e.startLine;r.push({path:n,line:o??void 0})}break}case"list_dir":{let n=e.path;n&&r.push({path:n});break}case"get_errors":{let n=e.filePaths;if(n&&Array.isArray(n))for(let o of n)r.push({path:o});break}}return r.length>0?r:void 0}a(BMa,"extractLocationsFromInput");function LMa(t){switch(t){case"not started":return"pending";case"running":return"in_progress";case"completed":return"completed";case"error":case"cancelled":return"failed";default:return"pending"}}a(LMa,"mapToolCallStatus");var T0t=class{constructor(e,r){this.connection=e;this.sessionId=r;this.activeToolCalls=new Map;this.messageChunkBuffer=""}static{a(this,"ACPProgressReporter")}async begin(e,r,n,o){}async report(e,r,n,o){if(o.reply&&await this.reportTextChunk(o.reply),o.editAgentRounds){for(let s of o.editAgentRounds)if(s.reply&&await this.reportTextChunk(s.reply),s.toolCalls)for(let c of s.toolCalls){let l=LMa(c.status),u=!this.activeToolCalls.has(c.id);if(u&&(c.status==="running"||c.status==="not started")){let d=BMa(c.name,c.input);await this.reportToolCallStart(c.id,c.name,OMa(c.name),l,c.input,d)}else c.status==="completed"?await this.reportToolCallComplete(c.id):c.status==="error"?await this.reportToolCallError(c.id,c.error||"Unknown error"):c.status==="cancelled"?await this.reportToolCallCancelled(c.id):u||await this.reportToolCallProgress(c.id,l)}}}async end(e,r,n,o){if(o?.error&&await this.reportTextChunk(` +`;var XAr=["authorization_code","refresh_token"],Dfe=33428,Hdt=class{constructor(e,r){this._logger=new Se("LoopbackAuthServer");this.nonce=(0,qhi.randomBytes)(16).toString("hex");if(!e)throw new Error("startingRedirect must be defined");this._startingRedirect=new URL(e),this._ctx=r;let n;this._resultPromise=new Promise((s,c)=>n={resolve:s,reject:c});let o=`&app_name=${encodeURIComponent("GitHub Copilot")}`;this._server=Ghi.createServer((s,c)=>{let l=new URL(s.url,`http://${s.headers.host}`);switch(l.pathname){case"/signin":{let u=(l.searchParams.get("nonce")??"").replace(/ /g,"+");if(u!==this.nonce){this._logger.warn(this._ctx,"Nonce mismatch in /signin request",{receivedNonce:u,expectedNonce:this.nonce}),c.writeHead(302,{location:`/?error=${encodeURIComponent("Nonce does not match.")}${o}`}),c.end();return}this._startingRedirect.searchParams.set("redirect_uri",`http://127.0.0.1:${this.port}/callback`),this._logger.info(this._ctx,"Redirecting to auth server"),c.writeHead(302,{location:this._startingRedirect.toString()}),c.end();break}case"/callback":{let u=l.search||"",d=/[?&]code=([^&]+)/.exec(u),p=/[?&]state=([^&]+)/.exec(u),h=d&&d.length>1?decodeURIComponent(d[1]):void 0,m=p&&p.length>1?decodeURIComponent(p[1]):void 0,g=new URL(m||"").searchParams.get("nonce")??void 0;if(!h||!m||!g){let A="Missing required parameters, at least one from code, state, nonce is needed.";this._logger.warn(this._ctx,"OAuth callback missing required parameters",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url}),c.writeHead(302,{location:`/?error=${encodeURIComponent(A)}${o}`}),c.end(),n.reject(new Error(A));return}if(this.state!==m){this._logger.warn(this._ctx,"OAuth callback state mismatch",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url,receivedState:m,expectedState:this.state}),c.writeHead(302,{location:`/?error=${encodeURIComponent("State does not match.")}${o}`}),c.end(),n.reject(new Error("State does not match."));return}if(this.nonce!==g){this._logger.warn(this._ctx,"OAuth callback nonce mismatch",{originalUrl:this._startingRedirect.toString(),callbackUrl:s.url,receivedNonce:g,expectedNonce:this.nonce}),c.writeHead(302,{location:`/?error=${encodeURIComponent("Nonce does not match.")}${o}`}),c.end(),n.reject(new Error("Nonce does not match."));return}this._logger.info(this._ctx,"OAuth callback validation successful"),n.resolve({code:h,state:m}),c.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),c.end(JAr);break}default:c.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),c.end(JAr)}})}static{a(this,"LoopbackAuthServer")}get redirectUri(){if(this.port===void 0)throw new Error("Server is not started yet");return`http://127.0.0.1:${this.port}/callback`}set state(e){e?this._startingRedirect.searchParams.set("state",e):this._startingRedirect.searchParams.delete("state")}get state(){return this._startingRedirect.searchParams.get("state")??void 0}start(){return new Promise((e,r)=>{if(this._server.listening)throw new Error("Server is already started");let n=setTimeout(()=>{r(new Error("Timeout waiting for port"))},5e3);this._server.on("listening",()=>{let o=this._server.address();if(typeof o=="string")this.port=parseInt(o);else if(o instanceof Object)this.port=o.port;else throw new Error("Unable to determine port");clearTimeout(n),this.state=`http://127.0.0.1:${this.port}/callback?nonce=${this.nonce}`,this._logger.info(this._ctx,"OAuth server started and state configured",{port:this.port,redirectUri:this.redirectUri}),e(this.port)}),this._server.on("error",o=>{if(o.code==="EADDRINUSE"){console.warn(`Port ${Dfe} is in use, retrying with a random port...`),this._server.listen(0,"127.0.0.1");return}clearTimeout(n),r(new Error(`Error listening to server: ${o.message}`))}),this._server.on("close",()=>{clearTimeout(n),r(new Error("Server closed unexpectedly"))}),this._server.listen(Dfe,"127.0.0.1")})}stop(){return new Promise((e,r)=>{if(!this._server.listening)throw new Error("Server is not started");let n,o=a(()=>{n&&(clearTimeout(n),n=void 0)},"cleanup");n=setTimeout(()=>{o(),r(new Error("Timeout waiting for server to close"))},5e3),this._server.close(s=>{o(),s?r(s):e()})})}waitForOAuthResponse(){return this._resultPromise}};f();var jdt=require("crypto");var k2e=class{static{a(this,"PKCEUtils")}static generateCodeVerifier(){let e=this.generateRandomBytes(32);return this.base64UrlEncode(e)}static generateCodeChallenge(e){let r=(0,jdt.createHash)("sha256");r.update(e,"ascii");let n=r.digest();return this.base64UrlEncode(n)}static getCodeChallengeMethod(){return"S256"}static generateRandomBytes(e){return(0,jdt.randomBytes)(e)}static base64UrlEncode(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static getSupportedMethods(){return[this.getCodeChallengeMethod()]}static isServerSupported(e){if(!e||e.length===0)return!1;let r=this.getSupportedMethods();return e.some(n=>r.includes(n))}static createPKCEParameters(){let e=this.generateCodeVerifier(),r=this.generateCodeChallenge(e),n=this.getCodeChallengeMethod();return{codeVerifier:e,codeChallenge:r,codeChallengeMethod:n}}};var dDa="Timed out",Hhi="Sign-in request was cancelled",ZAr=class{static{a(this,"CodeFlow")}},Nfe=class extends ZAr{static{a(this,"CLSCodeFlow")}constructor(e){super(),this.ctx=e}async auth(e,r,n,o,s,c){let{clientId:l,clientSecret:u}=e,d=o?.resource,p=k2e.isServerSupported(n.code_challenge_methods_supported),h=p?k2e.createPKCEParameters():void 0;p?Cr.info(this.ctx,`PKCE supported by server with methods: [${n.code_challenge_methods_supported?.join(", ")}], using ${h.codeChallengeMethod}`):Cr.info(this.ctx,"PKCE not supported by server, falling back to standard OAuth flow");let m=this.buildAuthorizationParams({clientId:l,scope:r.join(" "),pkceParams:h,resource:d,...s??{}}),g=new URLSearchParams(m),A=n.authorization_endpoint+"?"+g.toString(),y=new Hdt(A,this.ctx),_=`http://127.0.0.1:${await y.start()}/signin?nonce=${encodeURIComponent(y.nonce)}`;Cr.info(this.ctx,"Auth URL created and opening browser for sign-in"),await new kfe(this.ctx).open(_);let v,b=[];try{let x=[y.waitForOAuthResponse(),new Promise((R,P)=>{let k=setTimeout(()=>P(new Error(dDa)),3e5);b.push({dispose:a(()=>clearTimeout(k),"dispose")})})];if(c){let R=c;x.push(new Promise((P,k)=>{if(R.isCancellationRequested){Cr.info(this.ctx,"OAuth flow cancelled (already requested)"),k(new Error(Hhi));return}let Q=R.onCancellationRequested(()=>{Cr.info(this.ctx,"OAuth flow cancelled"),k(new Error(Hhi))});b.push(Q)}))}v=(await Promise.race(x)).code,Cr.info(this.ctx,"OAuth response received successfully")}catch(x){throw Cr.error(this.ctx,"OAuth flow error",x),x}finally{for(let x of b)x.dispose();setTimeout(()=>{y.stop()},5e3)}return await this.exchangeCodeForToken({endpointUri:n.token_endpoint,redirectUri:y.redirectUri,code:v,clientId:l,clientSecret:u,codeVerifier:h?.codeVerifier,resource:d})}async exchangeCodeForToken({endpointUri:e,redirectUri:r,code:n,clientId:o,clientSecret:s,codeVerifier:c,resource:l}){let u=[["grant_type","authorization_code"],["code",n],["client_id",o],["redirect_uri",r]];s&&u.push(["client_secret",s]),c&&u.push(["code_verifier",c]),l&&u.push(["resource",l]);let d=new URLSearchParams(u);Cr.info(this.ctx,"Exchanging authorization code for token",{endpointUri:e,clientId:o,redirectUri:r});let p=await gJ(this.ctx,e,"POST",{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},d.toString());if(p.ok){let h=await p.json();return Cr.info(this.ctx,"Token exchange successful"),h}else{let h=await p.text(),m=new Error(h);throw m.name="Token Exchange Error",m}}buildAuthorizationParams({clientId:e,scope:r,pkceParams:n,resource:o,...s}){let c=[["client_id",e],["response_type","code"],["scope",r]];n&&c.push(["code_challenge",n.codeChallenge],["code_challenge_method",n.codeChallengeMethod]),o&&c.push(["resource",o]);for(let[l,u]of Object.entries(s??{}))u!==void 0&&c.push([l,String(u)]);return c}};var d2=class t{constructor(e,r,n,o){this.id=t.providerId;this.label="GitHub";this.supportsMultipleAccounts=!1;this.authorizationServers=[t.providerId];this.ctx=e,this.serverMetadata=n,this.resourceMetadata=o,this._sessionsPromise=this.readSessions().then(s=>(setTimeout(()=>s.forEach(c=>{this.afterSessionLoad(c)}),1e3),s))}static{a(this,"GitHubAuthenticationProvider")}static{this.providerId="https://github.com/login/oauth"}async getSessions(e,r){await this.checkSessionsExpiration();let n=await this._sessionsPromise,o=e?.sort()||[];return o.length?n.filter(c=>KAr([...c.scopes].sort(),o)):n}async afterSessionLoad(e){}async readSessions(){let e=await this.ctx.get(Ti).read("oauth",this.id);return e||[]}async createSession(e,r){let n=[...e].sort(),o=await this._sessionsPromise,s=this.ctx.get(Oc),c=s.findAppIdToAuthenticate(),l=s.findAppSecretToAuthenticate(),u=await new Nfe(this.ctx).auth({clientId:c,clientSecret:l},n,this.serverMetadata,this.resourceMetadata,{prompt:"select_account"},r.cancellationToken),d=await this.tokenToSession(u.access_token,e);this.afterSessionLoad(d);let p=o.findIndex(m=>m.account.id===d.account.id&&KAr([...m.scopes].sort(),n)),h=new Array;return p>-1?h.push(...o.splice(p,1,d)):o.push(d),await this.storeSessions(o),d}async storeSessions(e){this._sessionsPromise=Promise.resolve(e),await this.ctx.get(Ti).update("oauth",this.id,e)}async tokenToSession(e,r){let n=await this.getUserInfo(e);return{id:crypto.getRandomValues(new Uint32Array(2)).reduce((o,s)=>o+=s.toString(16),""),accessToken:e,account:{label:n.accountName,id:n.id},scopes:r}}buildGetUserInfoUrl(){try{let e=new URL(this.serverMetadata?.issuer);return e.hostname.toLowerCase()==="github.com"?"https://api.github.com/user":`${e.origin.replace(/\/+$/,"")}/api/v3/user`}catch{return"https://api.github.com/user"}}async getUserInfo(e){let r=this.buildGetUserInfoUrl(),n;try{n=await this.ctx.get(dr).fetch(new URL(r).href,{method:"GET",headers:{Authorization:`token ${e}`}})}catch(o){return Gdt.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}if(n.ok)try{let o=await n.json();return{id:`${o.id}`,accountName:o.login}}catch(o){return Gdt.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}else{let o=n.statusText;try{let s=await n.json();s.message&&(o=s.message)}catch{}return Gdt.error(this.ctx,"Failed to fetch user info: ",o),{id:"",accountName:""}}}async removeSession(e){let r=await this._sessionsPromise,n=r.findIndex(o=>o.id===e);if(n>-1)r.splice(n,1),await this.storeSessions(r);else throw new Error(`No session with id '${e}' found.`)}async checkSessionsExpiration(){let e=await this._sessionsPromise;if(e.length!==0)for(let r of e)await this.isSessionExpired(r)&&await this.removeSession(r.id)}async isSessionExpired(e){let{accessToken:r}=e,{id:n,accountName:o}=await this.getUserInfo(r);return!n||!o}};var fDa=S.Object({scopes:S.Optional(S.Array(S.String({minLength:1}),{minItems:1})),serverUrl:S.Optional(S.String({minLength:1}))});async function pDa(t,e,r){try{if(e.isCancellationRequested)return[null,{code:ct.RequestCancelled,message:"Sign-in request was cancelled"}];let o=await t.get(en).checkAndUpdateStatus();if(o.status==="OK")return[o,null];let s=await qdt(t,(c,l)=>new d2(c,d2.providerId,l,void 0),{scopes:r.scopes,serverUrl:r.serverUrl},e);if(!["OK","MaybeOK"].includes(s.status))throw new $i("OAuth authentication failed for unknown reasons. Please try again later.");return[s,null]}catch(n){if(n instanceof hL)return[null,{code:ct.NoBrowserAvailable,message:n.message}];if(!(n instanceof $i))throw n;return[null,{code:ct.CodeFlowFailed,message:n.message}]}}a(pDa,"handleSignInWithCodeFlowChecked");var jhi=He(fDa,pDa);f();f();f();var v3=class extends Error{static{a(this,"OperationCancelledError")}constructor(e="Operation was cancelled"){super(e),this.name="OperationCancelledError"}},D2e=class extends Error{static{a(this,"OperationTimeoutError")}constructor(e="Operation timed out"){super(e),this.name="OperationTimeoutError"}};function $hi(t,e,r){return e.isCancellationRequested?Promise.reject(new v3):new Promise((n,o)=>{let s=!1,c=e.onCancellationRequested(()=>{s||(s=!0,clearTimeout(l),c.dispose(),o(new v3))}),l=setTimeout(()=>{s||(s=!0,c.dispose(),o(new D2e))},r);t.then(u=>{s||(s=!0,clearTimeout(l),c.dispose(),n(u))},u=>{s||(s=!0,clearTimeout(l),c.dispose(),o(u instanceof Error?u:new Error(String(u))))})})}a($hi,"raceWithCancellationAndTimeout");var hDa=["repo","workflow"];async function mDa(t,e,r,n){let o={method:"POST",headers:{Accept:"application/json",...sE(t)},json:{client_id:e,scope:n.join(" ")},timeout:3e4},s=new URL("login/device/code",r).href,c;try{c=await t.get(dr).fetch(s,o)}catch(l){throw l instanceof Error&&Ab(l)?new $i(`Could not log in with device flow on ${r}: ${l.message}`):l}if(!c.ok)throw new $i(`Could not log in with device flow on ${r}: HTTP ${c.status}`);return await c.json()}a(mDa,"requestDeviceCode");async function gDa(t,e,r,n){let o={method:"POST",headers:{Accept:"application/json",...sE(t)},json:{client_id:r,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4},s;try{s=await t.get(dr).fetch(new URL("login/oauth/access_token",n).href,o)}catch(l){throw l instanceof Error&&Ab(l)?new $i(`Device flow token request failed on ${n}: ${l.message}`):l}let c=await s.json();if(c.access_token||c.error==="authorization_pending"||c.error==="slow_down")return c;throw c.error&&c.error_description?new $i(c.error_description):new $i(`Unexpected ${s.status} response from device flow: ${JSON.stringify(c)}`)}a(gDa,"requestAccessToken");async function ADa(t,e){let n=await(await au(t,e,"user",{headers:{Accept:"application/json"}})).json();if("errors"in n)throw new $i(`Error retrieving user information: ${String(n.errors)}`);return n}a(ADa,"requestUserInfo");async function yDa(t,e,r){let n=r?.githubAppId??t.get(Oc).findAppIdToAuthenticate(),o=r?.scopes??hDa,s=r?.serverUrl!==void 0?FDe(r.serverUrl):void 0,{serverUrl:c,apiUrl:l}=s?OA({serverUrl:s}):t.get(en).getConfiguredUrls(),u=await mDa(t,n,c,o),d=(async()=>{let p=Date.now()+u.expires_in*1e3,h=u.interval,m;do{if(await new Promise(A=>setTimeout(A,1e3*h)),e.isCancellationRequested)throw new v3("Sign-in request was cancelled");m=await gDa(t,u.device_code,n,c);let g=m.access_token;if(g){let A=await ADa(t,{apiUrl:l,accessToken:g});if(e.isCancellationRequested)throw new v3("Sign-in request was cancelled");let y=m.scope?m.scope.split(" ").filter(E=>E.length>0):o;return{serverUrl:c,githubAppId:n,username:A.login,accessToken:g,scopes:y}}h=m.interval??h}while(Date.now()performance.now()-n,"getElapsedTimeMs");try{let c=await t.get(en).checkAndUpdateStatus();if(c.status==="OK")return[c,null];pae(t,"deviceFlow");let l=t.get(AJ),u=await l.initiate(e,{scopes:r.scopes,serverUrl:r.serverUrl});await t.get(Ar).connection.sendNotification(CDa,{userCode:u.userCode,verificationUri:u.verificationUri,expiresIn:u.expiresIn});let d=await $hi(u.waitForAuth,e,vDa),p=await l.save(d);return Mw(t,"deviceFlow",p.status,o()),[p,null]}catch(s){if(s instanceof v3)return[null,{code:ct.RequestCancelled,message:"Sign-in request was cancelled"}];if(s instanceof D2e)return Mw(t,"deviceFlow","NotSignedIn",o(),s),[null,{code:ct.DeviceFlowFailed,message:"Sign-in request timed out"}];if(Mw(t,"deviceFlow","NotSignedIn",o(),s),!(s instanceof $i))throw s;return[null,{code:ct.DeviceFlowFailed,message:s.message}]}}a(bDa,"handleSignInWithDeviceFlowChecked");var Whi=He(_Da,bDa);f();var TDa=S.Object({githubToken:S.String({minLength:1}),user:S.String({minLength:1}),githubAppId:S.Optional(S.String({minLength:1}))});async function SDa(t,e,r){let n=r.githubToken,o=r.user,s=r.githubAppId,c=t.get(en);return[await t.get(Rv).save({...c.getConfiguredUrls(),accessToken:n,login:o,githubAppId:s}),null]}a(SDa,"handleSignInWithGithubTokenChecked");var zhi=He(TDa,SDa);f();var IDa=S.Object({options:S.Optional(S.Object({}))});async function xDa(t,e,r){return[await t.get(en).deleteAndDeactivateAllSessions(),null]}a(xDa,"handleSignOutChecked");var Yhi=He(IDa,xDa);f();var wDa=S.Object({transaction:S.Optional(S.String()),stacktrace:S.Optional(S.String()),properties:S.Optional(S.Record(S.String(),S.String())),platform:S.Optional(S.String()),exception_detail:S.Optional(S.Array(S.Object({type:S.Optional(S.String()),value:S.Optional(S.String()),stacktrace:S.Optional(S.Array(S.Object({filename:S.Optional(S.String()),lineno:S.Optional(S.Union([S.String(),S.Integer()])),colno:S.Optional(S.Union([S.String(),S.Integer()])),function:S.Optional(S.String()),in_app:S.Optional(S.Boolean())})))})))}),eyr=class extends Error{constructor(r,n){super(r);this.code=n;this.name="AgentEditorError"}static{a(this,"AgentEditorError")}};function RDa(t,e,r){let n=t.get(Vo),o=t.get(Dr).getEditorPluginInfo(),s=r.properties||{},c;r.platform&&r.exception_detail&&q5.has(o.name)&&(c=Object.assign({rollup_id:"auto",context:Dht(t),sensitive_context:{},deployed_to:n.getBuildType(),platform:r.platform,exception_detail:r.exception_detail},q5.get(o.name)),r.transaction&&(c.transaction=r.transaction),n.getBuildType()!=="dev"&&(c.release=`${c.app}@${o.version}`));let l=new eyr(r.stacktrace??"N/A",o.name);return l.stack=void 0,Lo(t,l,r.transaction??"",s,c),["OK",null]}a(RDa,"handleTelemetryExceptionChecked");var Khi=He(wDa,RDa);f();f();f();function tyr(t){let e=Date.now()+((t?.refresh_in??0)+LDe)*1e3;return new Sq({token:`test token ${yr()}`,refresh_in:0,expires_at:e,...t},void 0,e)}a(tyr,"createTestCopilotToken");var Mfe=class extends $p{constructor(){super(...arguments);this.defaultToken=tyr({token:"tid=test;rt=1"})}static{a(this,"FakeCopilotTokenFetcherFromSession")}fetchTokenResult(r,n){switch(n.accessToken){case"":return{copilotToken:this.defaultToken};case"valid-github-token":return{copilotToken:tyr({token:"tid=valid-copilot-token"})};case void 0:return{failureKind:"NotSignedIn"};case"notauth-github-token":return{failureKind:"NotAuthorized",message:"notauth",canSignUpForLimited:!0};case"bogus-github-token":return{failureKind:"NotAuthorized",message:"bogus",canSignUpForLimited:!1};case"expired-github-token":return{failureKind:"HTTP401",message:"expired"};default:throw new Error("Don't have a valid GitHub token")}}};var $dt=class extends $p{constructor(r){super();this.envelopeFn=r}static{a(this,"StaticCopilotTokenFetcher")}async fetchTokenResult(){return{copilotToken:tyr(await this.envelopeFn())}}};var PDa=S.Object({options:S.Optional(S.Object({}))});async function kDa(t,e,r){let n=new Mfe;return t.get(en).setTransientSession({accessToken:"valid-github-token",login:"always auth"}),t.forceSet($p,n),t.get(Bs).forceNormal(),await new Promise(o=>setTimeout(o,0)),["OK",null]}a(kDa,"handleTestingAlwaysAuthChecked");var ryr=He(PDa,kDa);f();var DDa=S.Object({messages:S.Array(S.Object({role:S.Enum(Ea),content:S.String(),name:S.Optional(S.String())})),modelFamily:S.Optional(S.Enum(_n)),stop:S.Optional(S.Array(S.String())),conversationOptions:S.Optional(S.Object({maxResponseTokens:S.Optional(S.Number()),temperature:S.Optional(S.Number())}))});async function NDa(t,e,r){let n=new fa(t),o=await t.get(wa).getBestChatModelConfig([r.modelFamily??_n.CopilotBase]),s=await Mye(t,"","");return[await n.fetchResponse({modelConfiguration:o,messages:r.messages,uiKind:"conversationIntegrationTest",stop:r.stop,intentParams:{intent:!0},llmInteraction:ym.user("test",yr())},e,s),null]}a(NDa,"handleChatMLChecked");var Jhi=He(DDa,NDa);f();f();f();var Ufe=de(tgi(),1),DOf={ALPN_HTTP2:Ufe.default.ALPN_HTTP2,ALPN_HTTP2C:Ufe.default.ALPN_HTTP2C,ALPN_HTTP1_1:Ufe.default.ALPN_HTTP1_1,ALPN_HTTP1_0:Ufe.default.ALPN_HTTP1_0},{fetch:NOf,context:rgi,reset:MOf,noCache:OOf,h1:BOf,keepAlive:LOf,h1NoCache:FOf,keepAliveNoCache:UOf,cacheStats:QOf,clearCache:qOf,offPush:GOf,onPush:HOf,createUrl:jOf,timeoutSignal:$Of,Body:VOf,Headers:ngi,Request:WOf,Response:zOf,AbortController:YOf,AbortError:cft,AbortSignal:KOf,FetchBaseError:JOf,FetchError:XOf,ALPN_HTTP2:ZOf,ALPN_HTTP2C:eBf,ALPN_HTTP1_1:tBf,ALPN_HTTP1_0:rBf}=Ufe.default;var ogi=require("crypto"),sgi=require("http"),agi=require("stream"),cgi=require("util"),qfe=de(xx());var t4a=9e4,r4a=new qfe.ProtocolRequestType("copilot/fetch"),n4a=new qfe.ProtocolRequestType("copilot/fetchCancel"),i4a=new qfe.ProgressType,o4a=new qfe.ProtocolRequestType("copilot/fetchDisconnectAll"),tN=class extends Error{static{a(this,"EditorFetcherError")}constructor(e){super(e),this.name="EditorFetcherError"}},Qfe=class extends dr{constructor(r){super();this.ctx=r;this.name="EditorFetcher";this.userAgent=`GithubCopilot/${r.get(Vo).getVersion()}`}static{a(this,"EditorFetcher")}disconnectAll(){return this.ctx.get(Ar).connection.sendRequest(o4a,{})}async fetch(r,n){n.headers||={},n.headers["user-agent"]=this.userAgent;let{signal:o}=n,s=this.ctx.get(Ar).connection,c=(0,ogi.randomUUID)(),l=new Cn.CancellationTokenSource,u=new agi.PassThrough,d=a(()=>{s.sendRequest(n4a,{workDoneToken:c})},"sendCancelRequest"),p=a(()=>{u.emit("error",new cft("EditorFetch request aborted")),u.end()},"destroyBodyStream");if(o){if(!(o instanceof AbortSignal))throw new tN("EditorFetcher received unexpected abort signal");if(o.aborted)throw new cft("EditorFetcher signal aborted before fetch");o.addEventListener("abort",d)}s.onProgress(i4a,c,m=>{m.kind==="end"?(o?.removeEventListener("abort",d),o?.removeEventListener("abort",p),m.error&&u.emit("error",new tN(m.error)),u.end()):m.kind==="report"&&u.write(m.chunk)});let h=await new Promise((m,g)=>{let A=setTimeout(()=>{g(new tN("Request timed out from lsp server"))},n.timeout??t4a),y=a(()=>{g(new cft("EditorFetcher request aborted"))},"rejectIfAborted");o?.addEventListener("abort",y),s.sendRequest(r4a,a4a(r,c,n),l.token).then(m).catch(E=>{let _="EditorFetcher request failed";E&&typeof E=="object"&&"message"in E&&(_+=`: ${String(E.message)}`),E&&typeof E=="object"&&"data"in E&&(_+=`: ${(0,cgi.inspect)(E.data)}`),g(new tN(_))}).finally(()=>{o?.removeEventListener("abort",y),clearTimeout(A)})});if(!h.status)throw new tN("EditorFetcher received invalid response");return o?.addEventListener("abort",p),new S2(h.status,sgi.STATUS_CODES[h.status]??"",new ngi(h.headers),()=>s4a(u),()=>u)}};function s4a(t){return new Promise((e,r)=>{let n="";t.on("error",r),t.on("end",()=>e(n)),t.on("data",o=>n+=String(o))})}a(s4a,"consumeStream");function a4a(t,e,r){let{timeout:n,method:o}=r,s=r.headers??{},c=r.json?JSON.stringify(r.json):r.body;return r.json&&(s["content-type"]="application/json"),{url:t,headers:s,body:c,timeout:n,method:o,workDoneToken:e}}a(a4a,"convertOptionsToParams");var c4a=S.Object({url:S.String(),headers:S.Optional(S.Record(S.String(),S.String())),body:S.Optional(S.String()),timeout:S.Optional(S.Number()),method:S.Optional(S.Union([S.Literal("GET"),S.Literal("POST"),S.Literal("DELETE")])),cancelBeforeRequest:S.Optional(S.Boolean()),cancelAfterRequest:S.Optional(S.Boolean()),cancelAfterFirstChunk:S.Optional(S.Boolean())});async function l4a(t,e,r){let n=new Qfe(t),o=new AbortController,s=o.signal,{url:c,cancelBeforeRequest:l,cancelAfterRequest:u,cancelAfterFirstChunk:d,...p}=r;l&&o.abort();let h=n.fetch(c,{signal:s,...p});u&&o.abort();let m;try{m=await h}catch(y){return[{error:`Fetch stream error: ${y instanceof tN?y.message:String(y)}`},null]}let{status:g}=m,A=Object.fromEntries(Array.from(m.headers));try{if(d){let E=m.body();for await(let _ of E){let v=_.toString();return o.abort(),[{status:g,headers:A,body:v},null]}}let y=await m.text();return[{status:g,headers:A,body:y},null]}catch(y){return[{error:`Fetch stream error: ${y instanceof tN?y.message:String(y)}`},null]}}a(l4a,"handleTestingFetchChecked");var lgi=He(c4a,l4a);f();var u4a=S.Object({});async function d4a(t,e,r){return await t.get(cu).flush(),["OK",null]}a(d4a,"handleTestingFlushPromiseQueueChecked");var ugi=He(u4a,d4a);f();f();f();var UQ=class{static{a(this,"FileSearch")}};f();f();f();var lft=de(require("path")),dgi=require("worker_threads");function fgi(t,e){return new dgi.Worker(lft.default.resolve(lft.default.extname(__filename)!==".ts"?__dirname:lft.default.resolve(__dirname,"../../dist"),t),{workerData:e})}a(fgi,"createWorker");f();var uft=class{constructor(e){this.maxDegreeOfParalellism=e;this.outstandingPromises=[],this.runningPromises=0}static{a(this,"PriorityLimiter")}queue(e,r=!1){return new Promise((n,o)=>{r?this.outstandingPromises.unshift({factory:e,c:n,e:o}):this.outstandingPromises.push({factory:e,c:n,e:o}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromisesthis.consumed(),()=>this.consumed())}}consumed(){this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}};var pgi=de(Dn());var dft="main.js",fft=class{constructor(e,r,n=3){this.promiseResolvers=new Map;this.id=0;try{let o={cwd:process.cwd(),indexWorkspaceRoots:e,params:r};this.worker=fgi(dft,o),this.worker.on("message",this.handleWorkerMessage.bind(this)),this.worker.on("error",s=>{this.handleUnexpectedError(s)}),this.postMessageQueue=new uft(n)}catch(o){throw console.error(`Failed to create worker: ${o.message}`),o}}static{a(this,"IndexClient")}dispose(){return this.postMessageInQueue(new g8e(this.id++),pgi.CancellationToken.None,!0)}async indexFile(e,r,n){return await this.postMessageInQueue(new p8e(this.id++,e,r),n)}async getAllFileNames(e,r){return this.postMessageInQueue(new h8e(this.id++,e),r)}getContext(e,r,n,o,s,c){return this.postMessageInQueue(new m8e(this.id++,e,r,n,o,s),c,!0)}tryCreateIndex(e,r,n){return this.postMessageInQueue(new d8e(this.id++,e,r),n)}async postMessageInQueue(e,r,n=!1){return this.postMessageQueue.queue(()=>this.postMessageAndWait(e,r),n)}tryRemoveIndex(e,r){return this.postMessageAndWait(new f8e(this.id++,e),r)}async postMessageAndWait(e,r){if(this.fatalError)return Promise.reject(this.fatalError);let n=new Promise((s,c)=>{this.promiseResolvers.set(e.id,{resolve:s,reject:c})});this.worker.postMessage(e);let o=r.onCancellationRequested(()=>{this.worker.postMessage(new u8e(e.id))});try{return await n}finally{o.dispose()}}handleWorkerMessage(e){if(e.operation!=="response")throw new Error("Unexpected message operation");let r=this.promiseResolvers.get(e.id);if(!r)throw new Error(`Received response for message that isn't in progress: ${e.id}`);this.promiseResolvers.delete(e.id),e.error?(e.error.code=e.code,r.reject(e.error)):r.resolve(e.data)}handleUnexpectedError(e){let r;if(e instanceof Error){r=e,r.code==="MODULE_NOT_FOUND"&&r.message?.endsWith(dft+"'")&&(r=new Error(`Failed to load ${dft}`),r.code="CopilotPromptLoadFailure");let n=new Error().stack;r.stack&&n?.match(/^Error\n/)&&(r.stack+=n.replace(/^Error/,""))}else e&&typeof e=="object"&&"name"in e&&"status"in e&&e.name==="ExitStatus"&&typeof e.status=="number"?(r=new Error(`${dft} exited with status ${e.status}`),r.code=`CopilotPromptWorkerExit${e.status}`):r=new Error(`Non-error thrown: ${JSON.stringify(e)}`);for(let n of this.promiseResolvers.values())n.reject(r);this.promiseResolvers.clear(),this.fatalError=r}};var Q2e=de(Dn());var x3=new Se(KHt),pft=class{constructor(e,r,n,o,s){this.ctx=e;this.watcher=r;this.workspaceDatabasePersistenceManager=n;this.workspaceInit=new Map;this.watcher.onFileChange(async(c,l)=>{await this.indexFile(l,this.languageId(l)??"plaintext")}),this.watcher.onWorkspaceChange(async(c,l)=>{if(c===1){x3.debug(this.ctx,`workspace removed: ${l}`),await this.indexClient.tryRemoveIndex(l,Q2e.CancellationToken.None);return}x3.debug(this.ctx,`workspace added: ${l}`),await this.indexAddedWorkspace(l)}),this.indexClient=new fft(o,s);for(let c of o){let l=c.rootPath;this.workspaceInit.set(l,this.doWorkspaceIndex(l).then(()=>{x3.debug(this.ctx,`workspace ${l} indexed`),this.workspaceInit.delete(l)}))}}static{a(this,"MultiLanguageContextIndexWatcher")}isInitializing(e){for(let[r]of this.workspaceInit)if(e.startsWith(r))return!0;return!1}dispose(){return this.indexClient.dispose()}async indexAddedWorkspace(e){let r=await f4a(e,this.workspaceDatabasePersistenceManager);await this.indexClient.tryCreateIndex(r.rootPath,r.databaseFilePath,Q2e.CancellationToken.None),this.workspaceInit.has(e)&&await this.workspaceInit.get(e);let n=this.doWorkspaceIndex(e).then(()=>{x3.debug(this.ctx,`workspace ${e} indexed`),this.workspaceInit.delete(e)});this.workspaceInit.set(e,n)}async doWorkspaceIndex(e){x3.debug(this.ctx,`indexing workspace ${e}`);let r=fIt.map(p=>`*${p}`);if(r.length===0)return;let o=`**/${fIt.length===1?r[0]:`{${r.join(",")}}`}`,s=this.ctx.get(UQ),c=await Promise.all([s.findFiles(o,{uri:e},{excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0,excludeIDESearchIgnoredFiles:!0}),this.indexClient.getAllFileNames(e,Q2e.CancellationToken.None)]),l=c[0],u=c[1],d=Array.from(new Set([...l,...u]));x3.debug(this.ctx,`found ${d.length} files to index in ${e}`),await Promise.all(d.map(async p=>{let h=this.languageId(p);h&&await this.indexFile(p.replace(/\/+$/,""),h)})),x3.debug(this.ctx,`finished indexing workspace ${e}`)}async indexFile(e,r){try{x3.debug(this.ctx,`index triggered for ${e}`),await this.indexClient.indexFile(e,r,Q2e.CancellationToken.None)}catch(n){x3.debug(this.ctx,`failed to index ${e} with ${n}`)}}languageId(e){return jFr(e)}};async function f4a(t,e){return{databaseFilePath:await e.getDBFilePath(t),rootPath:t}}a(f4a,"createIndexableWorkspaceFolder");var p4a=S.Object({filePath:S.String(),code:S.String(),offset:S.Number(),languageId:S.String(),timeout:S.Optional(S.Number()),waitForContext:S.Optional(S.Boolean())});async function h4a(t,e,r){try{await t.get(gk).start();let n=t.get(pft),o=r.timeout??1e3,s=Date.now(),c=[],l=!0;for(;l;)try{c=await n.indexClient.getContext(r.filePath,r.code,r.offset,r.languageId,JHt,e)}catch{}finally{l=(r.waitForContext??!1)&&c.length==0&&Date.now()-ssetTimeout(n,0)),["OK",null]}a(y4a,"handleTestingNeverAuthChecked");var kyr=He(A4a,y4a);f();f();f();var Dyr=class extends Od{constructor(r){super();this.certificates=r}static{a(this,"TestCertificateReader")}getAllRootCAs(){return this.certificates}},ggi=a(t=>new Dyr(t),"createTestCertificateReader");function Myr(t,e,r){let n=new Nyr;n.set("x-github-request-id","1");for(let[o,s]of Object.entries(r||{}))n.set(o,s);return new S2(t,"status text",n,()=>Promise.resolve(e??""),()=>null)}a(Myr,"createFakeResponse");function Agi(t,e,r){let n;return typeof e=="string"?n=e:n=JSON.stringify(e),Myr(t,n,Object.assign({"content-type":"application/json"},r))}a(Agi,"createFakeJsonResponse");var q2e=class extends dr{constructor(){super(...arguments);this.name="FakeFetcher"}static{a(this,"FakeFetcher")}disconnectAll(){throw new Error("Method not implemented.")}};var hft=class extends q2e{static{a(this,"NoFetchFetcher")}fetch(e,r){throw new Error("NoFetchFetcher does not support fetching")}};var Nyr=class{constructor(){this.headers=new Map}static{a(this,"FakeHeaders")}append(e,r){this.headers.set(e.toLowerCase(),r)}delete(e){this.headers.delete(e.toLowerCase())}get(e){return this.headers.get(e.toLowerCase())??null}has(e){return this.headers.has(e.toLowerCase())}set(e,r){this.headers.set(e.toLowerCase(),r)}entries(){return this.headers.entries()}keys(){return this.headers.keys()}values(){return this.headers.values()}[Symbol.iterator](){return this.headers.entries()}};var Oyr=class extends q2e{static{a(this,"ExpConfigFetcher")}constructor(e){super(),this.fullConfig={Features:[],Flights:{},Configs:[{Id:"vscode",Parameters:e.Parameters}],ParameterGroups:[],AssignmentContext:e.AssignmentContext}}fetch(e,r){return e.endsWith("telemetry")?Promise.resolve(Agi(200,this.fullConfig)):Promise.resolve(Myr(404,""))}},mft=class extends Oyr{constructor(r,n){super(r);this.delegate=n}static{a(this,"ExpConfigFetcherWithDelegate")}fetch(r,n){return r.endsWith("telemetry")?super.fetch(r,n):this.delegate.fetch(r,n)}};var E4a=S.Object({expFlags:S.Record(S.String(),S.Union([S.String(),S.Number(),S.Boolean()]))});function _4a(t,e,r){if(r.expFlags){let n={AssignmentContext:"assignmentcontext",Parameters:{...r.expFlags}};t.forceSet(dr,new mft(n,t.get(dr)))}return["OK",null]}a(_4a,"handleTestingOverrideExpFlagsChecked");var ygi=He(E4a,_4a);f();var C4a=S.Object({rules:Kwt});function v4a(t,e,r){return t.get(Ac).setTestingRules(r.rules),["OK",null]}a(v4a,"handleTestingSetContentExclusionRulesChecked");var Egi=He(C4a,v4a);f();var b4a=S.Object({workDoneToken:S.Union([S.String(),S.Number()]),chunks:S.Array(S.String()),followUp:S.Optional(S.String()),suggestedTitle:S.Optional(S.String()),skills:S.Optional(S.Array(S.String())),references:S.Optional(S.Array(Z6)),options:S.Optional(S.Object({}))});function T4a(t,e,r){return t.get(w3).add(r.workDoneToken,r.chunks,r.followUp,r.suggestedTitle,r.skills,r.references),["OK",null]}a(T4a,"handleTestingSetSyntheticTurnsChecked");var _gi=He(b4a,T4a);f();var S4a=S.Object({});async function I4a(t,e,r){let n=t.get(dc),o=t.get(fd);return await n.showWarningMessage("This is a test message",{title:"Some Action"}).then(c=>s(3,"response from message request",c?.title)).catch(c=>s(1,"error sending show message request",c)),["OK",null];function s(c,l,u){return o.logIt(t,c,"triggerShowMessage",`${l} (${String(u)})`)}a(s,"sendNotification")}a(I4a,"handleTriggerShowMessageChecked");var Cgi=He(S4a,I4a);f();f();f();f();var vgi=de(require("tls"));var gft=class{static{a(this,"RootCertificateConfigurator")}#e;constructor(e){this._certificateReader=e.get(Od)}async getCertificates(){let e=await this._certificateReader.getAllRootCAs();if(e.length!==0)return e}async createSecureContext(){let e=await this._certificateReader.getAllRootCAs(),n=vgi.createSecureContext({_vscodeAdditionalCaCerts:e}),o=n.context;for(let s of e)o.addCACert(s);return{secureContext:n,certs:e}}async applyToRequestOptions(e){this.#e??=this.createSecureContext();let r=await this.#e;e.secureContext=r.secureContext,e.ca=r.certs,e.cert=r.certs}};f();var Lgi=de(require("http"));var eOa=407,Zm=new Se("proxySocketFactory"),rN=class{static{a(this,"ProxySocketFactory")}},vJ=class extends Error{static{a(this,"ProxySocketError")}constructor(e,r,n){super(e),this.code=r?.code,this.syscall=r?.syscall,this.errno=r?.errno,/^Failed to establish a socket connection to proxies:/.test(r?.message??"")?this.code="ProxyFailedToEstablishSocketConnection":/^InitializeSecurityContext:/.test(r?.message??"")?this.code="ProxyInitializeSecurityContext":r?.message==="Miscellaneous failure (see text): Server not found in Kerberos database"?this.code="ProxyKerberosServerNotFound":/^Unspecified GSS failure. {2}Minor code may provide more information: No Kerberos credentials available/.test(r?.message??"")&&(this.code="ProxyGSSFailureNoKerberosCredentialsAvailable"),n!==void 0&&(this.code=n)}};function yft(t){return new Qyr(t,new qyr(t))}a(yft,"getProxySocketFactory");var Qyr=class extends rN{constructor(r,n,o=new j2e,s=process.platform){super();this.ctx=r;this.delegate=n;this.kerberosLoader=o;this.platform=s;this.successfullyAuthorized=new $r(20)}static{a(this,"KerberosProxySocketFactory")}async createSocket(r,n){this.successfullyAuthorized.get(this.getProxyCacheKey(n))&&(Zm.debug(this.ctx,"Proxy authorization already successful once, skipping 407 round trip"),await this.reauthorize(r,n));try{return await this.delegate.createSocket(r,n)}catch(o){if(o instanceof vJ&&o.code===`ProxyStatusCode${eOa}`){Zm.debug(this.ctx,"Proxy authorization required, trying to authorize first time");let s=await this.authorizeAndCreateSocket(r,n);if(s)return Zm.debug(this.ctx,"Proxy authorization successful, caching result"),st(this.ctx,"proxy.kerberosAuthorized"),this.successfullyAuthorized.set(this.getProxyCacheKey(n),!0),s}throw o}}async reauthorize(r,n){let o=await this.authorize(n);o&&(Zm.debug(this.ctx,"Proxy re-authorization successful, received token"),r.headers["Proxy-Authorization"]="Negotiate "+o)}async authorizeAndCreateSocket(r,n){let o=await this.authorize(n);if(Zm.debug(this.ctx,"Proxy authorization successful, received token"),o)return Zm.debug(this.ctx,"Trying to create socket with proxy authorization"),r.headers["Proxy-Authorization"]="Negotiate "+o,await this.delegate.createSocket(r,n)}async authorize(r){Zm.debug(this.ctx,"Loading kerberos module");let n=await this.kerberosLoader.load(),o=this.computeSpn(r);Zm.debug(this.ctx,"Initializing kerberos client using spn",o);let s=await n.initializeClient(o);Zm.debug(this.ctx,"Perform client side kerberos step");let c=await s.step("");return Zm.debug(this.ctx,"Received kerberos server response"),c}computeSpn(r){let n=r.kerberosServicePrincipal;if(n)return Zm.debug(this.ctx,"Using configured kerberos spn",n),n;let o=this.platform==="win32"?`HTTP/${r.hostname}`:`HTTP@${r.hostname}`;return Zm.debug(this.ctx,"Using default kerberos spn",o),o}getProxyCacheKey(r){return`${r.hostname}:${r.port}`}},qyr=class extends rN{constructor(r){super();this.ctx=r;this.userAgent=`GithubCopilot/${this.ctx.get(Vo).getVersion()}`}static{a(this,"TunnelingProxySocketFactory")}async createSocket(r,n){let o=this.createConnectRequestOptions(r,n);return new Promise((s,c)=>{Zm.debug(this.ctx,"Attempting to establish connection to proxy");let l=Lgi.request(o);l.useChunkedEncodingByDefault=!1,l.once("connect",(u,d,p)=>{Zm.debug(this.ctx,"Socket Connect returned status code",u.statusCode),l.removeAllListeners(),d.removeAllListeners(),u.statusCode!==200?(d.destroy(),c(new vJ(`tunneling socket could not be established, statusCode=${u.statusCode}`,void 0,`ProxyStatusCode${u.statusCode}`))):p.length>0?(d.destroy(),c(new vJ(`got non-empty response body from proxy, length=${p.length}`,void 0,"ProxyNonEmptyResponseBody"))):(Zm.debug(this.ctx,"Successfully established tunneling connection to proxy"),s(d))}),l.once("error",u=>{Zm.debug(this.ctx,"Proxy socket connection error",u.message),l.removeAllListeners(),c(new vJ(`tunneling socket could not be established, cause=${u.message}`,u))}),l.on("timeout",()=>{Zm.debug(this.ctx,"Proxy socket connection timeout"),c(new vJ(`tunneling socket could not be established, proxy socket connection timeout while connecting to ${o.hostname}:${o.port}`,void 0,"ProxyTimeout"))}),l.end()})}createConnectRequestOptions(r,n){let o=`${r.hostname}:${r.port}`,s={hostname:n.hostname,port:n.port,method:"CONNECT",path:o,agent:!1,headers:{host:o,"Proxy-Connection":"keep-alive","User-Agent":this.userAgent},timeout:r.timeout};return r.localAddress&&(s.localAddress=r.localAddress),this.configureProxyAuthorization(s,r,n.authorization),s}configureProxyAuthorization(r,n,o){r.headers["Proxy-Authorization"]=[],o&&r.headers["Proxy-Authorization"].push("Basic "+Buffer.from(o).toString("base64")),typeof n.headers?.["Proxy-Authorization"]=="string"&&r.headers["Proxy-Authorization"].push(n.headers["Proxy-Authorization"])}},j2e=class{static{a(this,"KerberosLoader")}load(){return Promise.resolve().then(()=>de(Bgi()))}};var jfe=class extends dr{constructor(r,n){super();this.name="HelixFetcher";this.certificateConfigurator=new gft(r),this.proxySocketFactory=r.get(rN),this.proxySocketTimeoutForTesting=n?.proxySocketTimeoutForTesting,r.get(Mc).onDidChangeHttpSettings(o=>{this.fetchApi=this.createFetchApi(r,o),this.updateNoProxy(o.noProxy)}),this.fetchApi=this.createFetchApi(r,r.get(Mc).getHttpSettings()),this.updateNoProxy(r.get(Mc).getHttpSettings().noProxy),this.fetchApiByPass=this.createFetchApi(r,{proxy:""})}static{a(this,"HelixFetcher")}maybeCreateSocketFactory(r,n){if(!r?.proxy)return;let o=new URL(r.proxy);return async s=>(s.rejectUnauthorized=r.proxyStrictSSL,s.timeout=n,await this.certificateConfigurator.applyToRequestOptions(s),await this.proxySocketFactory.createSocket(s,{hostname:o.hostname,port:o.port,authorization:r.proxyAuthorization,kerberosServicePrincipal:r.proxyKerberosServicePrincipal}))}createFetchApi(r,n){let o=r.get(Vo),s=this.proxySocketTimeoutForTesting;return rgi({userAgent:`GithubCopilot/${o.getVersion()}`,socketFactory:this.maybeCreateSocketFactory(n,s),rejectUnauthorized:n.proxyStrictSSL})}parseNoProxy(r){return r?.map(n=>n.trim()).filter(n=>n.length>0)||[]}updateNoProxy(r){if(this.noProxy=this.parseNoProxy(r),this.proxyExceptionFilters=void 0,!this.noProxy.length)return;if(this.noProxy.includes("*")){this.proxyExceptionFilters=[{regex:/.*/i}];return}let n=a(s=>{if(!s)return;s.startsWith(".")&&(s=`*${s}`);let c=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${c}$`,"i")}catch{return}},"toRegex"),o=[];for(let s of this.noProxy){let c=s,l;if(c.startsWith("[")){let d=c.indexOf("]");if(d!==-1){let p=c.slice(1,d),h=c.slice(d+1);h.startsWith(":")&&(l=h.slice(1)),c=p}}else{let d=c.split(":");d.length===2&&(c=d[0],l=d[1])}let u=n(c);u&&o.push({regex:u,port:l})}o.length&&(this.proxyExceptionFilters=o)}shouldBypassProxy(r){if(!this.proxyExceptionFilters||!this.proxyExceptionFilters.length)return!1;let n;try{n=new URL(r)}catch{return!1}let o=n.hostname;if(!o)return!1;let s=n.port||(n.protocol==="https:"?"443":"80"),c=o.toLowerCase();return this.proxyExceptionFilters.some(l=>l.regex.test(c)&&(!l.port||l.port===s))}async fetch(r,n){let o=n.signal,s=!1;if(n.timeout){let p=new AbortController;setTimeout(()=>{p.abort(),s=!0},n.timeout),n.signal?.addEventListener("abort",()=>p.abort()),n.signal?.aborted&&p.abort(),o=p.signal}let c={...n,body:n.body?n.body:n.json,signal:o},l=this.shouldBypassProxy(r);if(!l){await this.certificateConfigurator.applyToRequestOptions(c);let p=await this.certificateConfigurator.getCertificates();this.fetchApi.setCA(p)}let d=await(l?this.fetchApiByPass:this.fetchApi).fetch(r,c).catch(p=>{throw s?new L0e(`Request to <${r}> timed out after ${n.timeout}ms`,p):p});return new S2(d.status,d.statusText,d.headers,()=>d.text(),()=>d.body)}disconnectAll(){return this.fetchApi.reset()}};f();f();var $fe=class extends Fp{constructor(r,n={}){super();this.env=n;this.recalculateUrlDefaults(r,this.getDefaultUrls())}static{a(this,"DefaultNetworkConfiguration")}getAuthAuthority(){return this.baseUrlObject.hostname}getConfiguredUrls(){return{serverUrl:this.baseUrlObject.href,apiUrl:this.apiUrl}}setConfiguredUrls(r,n){let o=this.getConfiguredUrls();this.recalculateUrlDefaults(r,n);let s=this.getConfiguredUrls();(o.apiUrl!==s.apiUrl||o.serverUrl!==s.serverUrl)&&r.get(Nt).resetToken("config_urls_changed"),r.get(Jf).updateSessionConfig(s)}recalculateUrlDefaults(r,n){let{serverUrl:o,apiUrl:s}=OA({serverUrl:u5e(r,n.serverUrl),apiUrl:u5e(r,n.apiUrl)});this.baseUrlObject=new URL(o),this.apiUrl=s}getDefaultUrls(){return this.env.CODESPACES==="true"&&this.env.GITHUB_TOKEN&&this.env.GITHUB_SERVER_URL&&this.env.GITHUB_API_URL&&!this.env.GITHUB_COPILOT_TOKEN&&!this.env.GH_COPILOT_TOKEN?{apiUrl:this.env.GITHUB_API_URL,serverUrl:this.env.GITHUB_SERVER_URL}:{}}};f();var Vfe=class extends pN{static{a(this,"TelemetryLogSenderImpl")}sendException(e,r,n){Lo(e,r,n)}};f();var h2=class{static{a(this,"McpRuntimeNotifier")}},Eft=class extends h2{static{a(this,"NoOpMcpRuntimeNotifier")}async notifyLog(e){}};f();var Wfe=class extends U5{static{a(this,"EmptyRecentEditsProvider")}isEnabled(){return!1}start(){}getRecentEdits(){return[]}getEditSummary(e){return null}};f();var _ft=class extends Vx{constructor(r=[]){super();this._agents=r}static{a(this,"TestRemoteAgentRegistry")}agents(){return this._agents}};f();var Cft=class extends d0{constructor(){super(...arguments);this.prompts=[];this.fetchResults=[];this.diffs=[]}static{a(this,"TestConversationInspector")}shouldInspect(){return!0}inspectPrompt(r){this.shouldInspect()&&this.prompts.push(r)}inspectFetchResult(r){this.shouldInspect()&&this.fetchResults.push(r)}documentDiff(r){this.shouldInspect()&&this.diffs.push(r)}};f();var vft=class extends UQ{constructor(){super(...arguments);this.allowedFiles=[]}static{a(this,"TestingFileSearch")}addAllowedFiles(r){this.allowedFiles.push(...r)}findFiles(r,{uri:n},o){return Promise.resolve(this.allowedFiles)}};f();function tOa(t,e="cl100k_base"){return{modelId:"gpt-3.5-turbo",modelFamily:t,uiName:"Test GPT",maxRequestTokens:6144,maxResponseTokens:2048,baseTokensPerMessage:3,baseTokensPerName:1,baseTokensPerCompletion:3,tokenizer:e,isExperimental:!1,stream:!0,toolCalls:!0}}a(tOa,"fakeChatModelConfiguration");function rOa(t){return{modelId:"embedding-test",modelFamily:t,maxBatchSize:1,maxTokens:50,tokenizer:"cl100k_base"}}a(rOa,"fakeEmbeddingModelConfiguration");var bft=class extends wa{static{a(this,"TestModelConfigurationProvider")}getBestChatModelConfig(e){let r=e[0];return Promise.resolve(tOa(r))}getFirstMatchingEmbeddingModelConfiguration(e){return Promise.resolve(rOa(e))}};f();var Tft=class extends Z0{constructor(){super(...arguments);this.openedUrls=[];this.opened=new wE}static{a(this,"TestUrlOpener")}open(r){return this.openedUrls.push(r),this.opened.resolve(),Promise.resolve()}},Sft=class extends dc{constructor(){super();this.sentMessages=[];this.warningPromises=[];this.informationPromises=[]}static{a(this,"TestNotificationSender")}performDismiss(){this.actionToPerform="DISMISS"}performAction(r){this.actionToPerform=r}showWarningMessage(r,...n){this.sentMessages.push(r);let o;if(this.actionToPerform)if(this.actionToPerform==="DISMISS")o=Promise.resolve(void 0);else{let s=n.find(c=>c.title===this.actionToPerform);o=s?Promise.resolve(s):Promise.resolve(void 0)}else o=n?Promise.resolve(n[0]):Promise.resolve(void 0);return this.warningPromises.push(o),o}showInformationMessage(r,...n){this.sentMessages.push(r);let o;if(this.actionToPerform)if(this.actionToPerform==="DISMISS")o=Promise.resolve(void 0);else{let s=n.find(c=>c.title===this.actionToPerform);o=s?Promise.resolve(s):Promise.resolve(void 0)}else o=n?Promise.resolve(n[0]):Promise.resolve(void 0);return this.informationPromises.push(o),o}showInformationModal(r,...n){return this.showInformationMessage(r,...n)}sendBackgroundAgentSessionUpdate(r,n){return Promise.resolve()}async waitForMessages(){await Promise.all(this.warningPromises),await Promise.all(this.informationPromises)}};f();function Fgi(t,e,r,n){return Sx.create(l5e(t),e,r,n,e)}a(Fgi,"createTextDocument");var Gyr=class extends zr{constructor(r,n){super(r,n);this._openTextDocuments=[];this._notebookDocuments=new Map;this._workspaceFolders=[];this.didFocusTextDocumentEmitter=new Ri;this.onDidFocusTextDocument=this.didFocusTextDocumentEmitter.event;this.didChangeTextDocumentEmitter=new Ri;this.onDidChangeTextDocument=this.didChangeTextDocumentEmitter.event;this.didOpenTextDocumentEmitter=new Ri;this.onDidOpenTextDocument=this.didOpenTextDocumentEmitter.event;this.didCloseTextDocumentEmitter=new Ri;this.onDidCloseTextDocument=this.didCloseTextDocumentEmitter.event;this.didChangeWorkspaceFoldersEmitter=new Ri;this.onDidChangeWorkspaceFolders=this.didChangeWorkspaceFoldersEmitter.event}static{a(this,"SimpleTestTextDocumentManager")}init(r){this._workspaceFolders=r.map(n=>({uri:n.uri,name:n.name??Zn(n.uri)}))}async readTextDocumentFromDisk(r){return super.readTextDocumentFromDisk(r)}getTextDocumentsUnsafe(){return this._openTextDocuments}setTextDocument(r,n,o){let s=Fgi(r,n,0,o);return this._openTextDocuments.push(s),s}updateTextDocument(r,n){let o=this._openTextDocuments.findIndex(c=>c.uri===r.toString());if(o<0)throw new Error("Document not found");let s=this._openTextDocuments[o];this._openTextDocuments[o]=Fgi(r,s.clientLanguageId,s.version+1,n)}setNotebookDocument(r,n){this._notebookDocuments.set(r.uri.replace(/#.*/,""),n)}findNotebook({uri:r}){return this._notebookDocuments.get(r.replace(/#.*/,""))}getWorkspaceFolders(){return this._workspaceFolders}},Ift=class extends Gyr{constructor(r){super(r);this.contents=new Map}static{a(this,"TestTextDocumentManager")}readTextDocumentFromDisk(r){return Promise.resolve(this.contents.get(r))}setDiskContents(r,n){this.contents.set(r,n)}};var Hyr=class extends fd{static{a(this,"NullLog")}logIt(...e){}},jyr=class extends en{static{a(this,"TestAuthManager")}constructor(e,r){super(e,{}),this.transientSession=r&&Promise.resolve(r)}getPersistedSession(){return Promise.resolve(void 0)}saveAndActivateSession(e){return Promise.resolve({status:"OK",user:"test-user"})}deleteAndDeactivateAllSessions(){return Promise.resolve({status:"NotSignedIn"})}};function nOa(t){let e=new Wre;e.set(Mc,t),e.set(pH,t);let r=new jyr(e,{accessToken:"",login:"user"});e.set(en,r),e.set(Vo,new Vo),e.set(yb,new yb({debug:!1,verboseLogging:!1,testMode:!0,simulation:!1})),e.set(Od,ggi([])),e.set(rN,yft(e)),e.set(fP,new fP),e.set(ax,new j4e);let n=new Mfe;e.set($p,n),e.set(Nt,new Nt(e,!0));let o=new pd(e);return o.updateFromToken(n.defaultToken),e.set(pd,o),e.set(X0,new X0),e.set(x2,new x2),e.set(dc,new Sft),e.set(Z0,new Tft),e.set(pN,new Vfe),e.set(fd,new Hyr),e.set(xE,new xE),e.set(Vs,new Vs("test-session","test-machine","test-device")),e.set(Fp,new $fe(e)),e.set(II,new rX),e.set(Jf,new Jf(e,"copilot-test")),e.set(Gt,new Gt(e)),e.set(Sw,new Sw),e.set(Cx,new Gte),e.set(Bs,new G4e),e.set(cu,new cu),e.set(b5,new b5(e)),e.set(UQ,new vft),e.set(Dw,new Dw(e)),e.set(EO,$Ke(e)),e.set(Mm,new Mm),e.set(k_,new k_),e.set(_O,_O.default),e.set(sT,new sT(e,!1)),e.set(Oc,new Oc),e.set(In,new In(e)),e.set(wv,new zKe),e.set(S0,new S0),e.set(I0,rYe(e,(s,c,l)=>c.find(u=>u==="*")?1:c.find(u=>typeof u!="string"&&u.language===l.languageId)?10:0)),e.set(D_,new D_(e)),iOa(e),e.set(P_,new P_(e)),e.set(Fn,new Fn),e.set(U5,new Wfe),e.set(Ow,new Ow),e.set(QT,new QT),e.set(rw,new rw(e)),e}a(nOa,"_createBaselineContext");function iOa(t){t.set(lo,new lo(t)),t.set(xa,new xa(t)),t.set(fm,new fm(t)),t.set(f0,new f0),t.set(lh,new lh),t.set(d0,new Cft),t.set(pI,new pI(t,[])),t.set(wa,new bft),t.set(Vx,new _ft),t.set(ik,new ik(t)),t.set(eF,new eF),t.set(Rd,new Rd(t)),t.set(pm,new pm),t.set(V1,new V1);let e=new s2(t);t.set(s2,e),t.set(fI,new fI(e,t)),t.set(yk,new yk(t)),t.set(db,new udt),t.set(s_,new s_(t.get(fI),t.get(db),t)),t.set(mp,new mp)}a(iOa,"registerConversation");function Ugi(){let t=nOa(new pH(new Hte,new Map));return t.set(dr,new hft),t.set(Dr,new $yr),t.set(zr,new Ift(t)),t.set(Jn,new z8),t.set(Ac,new Ac(t)),t.set(ST,new ST(t)),t.set(T5,new Use),t.set(h2,new Eft),t.set(um,new OFe),KQe(t),t.set(Dm,new hae(t)),t}a(Ugi,"createLibTestingContext");var $yr=class extends Dr{constructor(r={name:"lib-tests-plugin",version:"2"},n={name:"lib-tests-editor",version:"1"},o=[{name:"lib-tests-related-plugin",version:"3"}]){super();this.editorPluginInfo=r;this.editorInfo=n;this.relatedPluginInfo=o}static{a(this,"LibTestsEditorInfo")}getEditorInfo(){return this.editorInfo}getEditorPluginInfo(){return this.editorPluginInfo}getRelatedPluginInfo(){return this.relatedPluginInfo}};var qgi=de(require("fs"));var Qgi=`${process.env.HOME}/.copilot-testing-gh-token`,xft,wft;function Ggi(t){let e=Hgi(),r=new $dt(oOa);return t.forceSet($p,r),t.get(en).setTransientSession(e),r}a(Ggi,"setIntegrationTokenManager");var oOa=a(async()=>{if(wft)return wft;let t=await Hgi(),e=Ugi(),r=new jfe(e);return e.forceSet(dr,r),wft=aAt(e,t).then(n=>{if(n.copilotToken)return{token:n.copilotToken.token,refresh_in:n.copilotToken.envelope.refresh_in};throw new $i('Could not fetch testing Copilot token. Try running "npm run get_token" again?')}),wft},"getEnvelope");async function Hgi(){let t=G_t(process.env);if(t)return t;try{xft??=(await qgi.promises.readFile(Qgi)).toString().trim()}catch{xft??=process.env.GITHUB_TOKEN??""}if(!xft)throw new Error(`Tests: either GH_COPILOT_TOKEN, GITHUB_COPILOT_TOKEN, or GITHUB_TOKEN must be set, or there must be a GitHub token from an app with access to Copilot in ${Qgi}. Run "npm run get_token" to get one.`);return{...OA({}),accessToken:xft,login:"copilot-client tests"}}a(Hgi,"getTestingGitHubSession");var sOa=S.Object({options:S.Optional(S.Object({})),githubAppId:S.Optional(S.String())});async function aOa(t,e,r){return Ggi(t),await t.get(Nt).primeToken(),["OK",null]}a(aOa,"handleTestingUseTestingTokenChecked");var jgi=He(sOa,aOa);f();var cOa=S.Object({});async function lOa(t,e,r){return await new Jde().uninstall(t),["OK",null]}a(lOa,"handleUninstallChecked");var $gi=He(cOa,lOa);f();var uOa=kbn;function dOa(t,e,r){let n=t.get(I0),o={unregistered:[],notUnregistered:[]};return r.providers.forEach(s=>{try{n.unregisterContextProvider(s.id),o.unregistered.push(s.id)}catch{o.notUnregistered.push(s.id)}}),[o,null]}a(dOa,"unregisterContextProviders");var Vgi=He(uOa,dOa);f();var Vyr=de(require("os"));var fOa=S.Object({expectedCertificate:S.String()});async function pOa(t,e,r){let o=(await KVe(t).getAllRootCAs()).map(wfe),s=wfe(r.expectedCertificate);return o.includes(s)?[{status:!0,message:"Certificate verified"},null]:[{status:!1,message:`expected certificate not found - Expected to find certificate ${qAr(s)}. Only found those installed on the system:${Vyr.EOL}${o.map(c=>"- "+qAr(c)).join(Vyr.EOL)}`},null]}a(pOa,"handleVerifyCertificateChecked");var Wgi=He(fOa,pOa);f();var hOa=S.Object({});async function mOa(){return[{status:!!await new j2e().load()},null]}a(mOa,"handleVerifyKerberosChecked");var zgi=He(hOa,mOa);f();var gOa=S.Object({source:S.String(),version:S.Number(),uri:S.String()});async function AOa(t,e,r){let o=await t.get(zr).getTextDocument(r);return o?o.getText()!==r.source?[{status:!1,message:`Source mismatch: [State] ${o.getText()} !== [Request] ${r.source}`},null]:o.version!==r.version?[{status:!1,message:`Version mismatch: [State] ${o.version} !== [Request] ${r.version}`},null]:[{status:!0,message:""},null]:[{status:!1,message:`Document not found: <${r.uri}>`},null]}a(AOa,"handleVerifyStateChecked");var Ygi=He(gOa,AOa);f();var yOa=S.Object({});function EOa(t,e,r){return[t.get(zr).getWorkspaceFolders().map(o=>{let s=new URL(o.uri),c=decodeURIComponent(s.pathname);return{...o,path:c}}),null]}a(EOa,"handleVerifyWorkspaceStateChecked");var Kgi=He(yOa,EOa);f();f();var Yfe=de(require("fs/promises")),Jgi=de(require("os")),Ou=de(require("path"));var Jd=new Se("GitWorktreeService"),_Oa=20,zfe=class{constructor(e){this.ctx=e;this.gitInstances=new $r(_Oa)}static{a(this,"GitWorktreeService")}getGitInstance(e){let r=Ou.resolve(e),n=this.gitInstances.get(r);return n||(n=MQe(r),this.gitInstances.set(r,n)),n}generateTimestamp(){return new Date().toISOString().replace(/[:.]/g,"-").slice(0,19)}async runGitOperation(e,r,n,o){let s=Ou.resolve(e);Jd.info(this.ctx,`[git] ${r} started for ${s}`);try{let c=await n(this.getGitInstance(s)),l=o?.(c);return Jd.info(this.ctx,`[git] ${r} finished for ${s}${l?` (${l})`:""}`),c}catch(c){let l=c instanceof Error?c.message:String(c);throw Jd.error(this.ctx,`[git] ${r} failed for ${s}: ${l}`),c}}async isGitRepository(e){try{return await this.runGitOperation(e,"checkIsRepo",r=>r.checkIsRepo(),r=>`isRepo=${r}`)}catch{return!1}}async getHeadCommit(e){return(await this.runGitOperation(e,"rev-parse HEAD",n=>n.raw(["rev-parse","HEAD"]),n=>`head=${n.trim()}`)).trim()}async commitWorktreeChanges(e,r,n){let o=await this.runGitOperation(e,"status",s=>s.status(),s=>`files=${s.files.length}`);return o.files.length===0?(Jd.info(this.ctx,`Skipping checkpoint commit for ${Ou.resolve(e)} because there are no changes`),!1):(await this.runGitOperation(e,"add -A -- .",s=>s.raw(["add","-A","--","."])),await this.runGitOperation(e,`commit ${r}`,s=>s.commit(r)),Jd.info(this.ctx,`Created ${n} commit for ${Ou.resolve(e)} with ${o.files.length} changed file(s)`),!0)}async snapshotCopiedChanges(e){Jd.info(this.ctx,`Snapshotting copied changes in ${Ou.resolve(e)} to establish the apply baseline`),await this.commitWorktreeChanges(e,"chore: snapshot copied worktree changes","copied worktree changes");let r=await this.getHeadCommit(e);return Jd.info(this.ctx,`Using copied-changes snapshot commit ${r} as the worktree baseCommit`),r}async applyPatchToRepository(e,r){let n=await Yfe.mkdtemp(Ou.join(Jgi.tmpdir(),"copilot-worktree-")),o=Ou.join(n,"changes.patch");try{Jd.info(this.ctx,`Writing temporary patch for ${Ou.resolve(e)} to ${o} (${r.length} chars)`),await Yfe.writeFile(o,r,"utf8"),await this.runGitOperation(e,`apply --check ${o}`,s=>s.raw(["apply","--check",o])),await this.runGitOperation(e,`apply ${o}`,s=>s.raw(["apply",o]))}finally{await Yfe.rm(n,{recursive:!0,force:!0}),Jd.info(this.ctx,`Removed temporary patch file ${o}`)}}async createWorktree(e){let{repositoryPath:r}=e;if(!await this.isGitRepository(r))throw new Error(`${r} is not a git repository`);let s=(await this.runGitOperation(r,"branch",g=>g.branch(),g=>`current=${g.current||"HEAD"}`)).current||"HEAD",c=await this.getHeadCommit(r),l=this.generateTimestamp(),u=`copilot/worktree-${l}`,d=`copilot-worktree-${l}`,p=Ou.basename(r),h=Ou.join(Ou.dirname(r),`${p}.worktrees`),m=Ou.join(h,d);return Jd.info(this.ctx,`Preparing worktree creation for ${Ou.resolve(r)} with branch ${u}, baseBranch ${s}, baseCommit ${c}`),await this.runGitOperation(r,`worktree add -b ${u} ${m} ${s}`,g=>g.raw(["worktree","add","-b",u,m,s])),Jd.info(this.ctx,`Created worktree ${m} from ${Ou.resolve(r)}`),{worktreePath:m,worktreeDirName:d,branchName:u,baseBranchName:s,baseCommit:c,repositoryPath:r}}async removeWorktree(e,r){Jd.info(this.ctx,`Preparing to remove worktree ${e} from ${Ou.resolve(r)}`),await this.runGitOperation(r,`worktree remove --force ${e}`,n=>n.raw(["worktree","remove","--force",e])),Jd.info(this.ctx,`Removed worktree ${e}`)}async getUncommittedChanges(e){if(!await this.isGitRepository(e))return Jd.info(this.ctx,`Skipping status lookup for ${Ou.resolve(e)} because it is not a git repository`),[];let r=await this.runGitOperation(e,"status",n=>n.status(),n=>`files=${n.files.length}`);return[...new Set(r.files.map(n=>n.path))]}async applyWorktreeChanges(e,r,n){Jd.info(this.ctx,`Applying worktree changes from ${Ou.resolve(e)} to ${Ou.resolve(r)} using baseCommit ${n}`);let o=await this.commitWorktreeChanges(e,"chore: checkpoint worktree changes","checkpoint worktree changes");Jd.info(this.ctx,o?`Committed pending worktree changes in ${Ou.resolve(e)} before generating patch`:`No pending worktree changes to commit in ${Ou.resolve(e)}`);let s=await this.getHeadCommit(e);if(s===n)return Jd.info(this.ctx,"No new commits to apply from worktree"),{baseCommit:s};let c=await this.runGitOperation(e,`diff --binary --full-index ${n}..${s}`,l=>l.raw(["diff","--binary","--full-index",`${n}..${s}`]),l=>`outputLength=${l.length}`);if(!c.trim())return Jd.info(this.ctx,"No patch content to apply from worktree"),{baseCommit:s};try{await this.applyPatchToRepository(r,c)}catch(l){let u=l instanceof Error?l.message:String(l);throw new Error(`Failed to apply worktree patch: ${u}`)}return Jd.info(this.ctx,`Applied worktree patch from ${n} to ${s}`),{baseCommit:s}}async stash(e){await this.runGitOperation(e,"stash push --include-untracked",r=>r.stash(["push","--include-untracked"])),Jd.info(this.ctx,`Stashed changes in ${e}`)}async stashApply(e){await this.runGitOperation(e,"stash apply",r=>r.stash(["apply"])),Jd.info(this.ctx,`Applied stash in ${e}`)}async stashPop(e){await this.runGitOperation(e,"stash pop",r=>r.stash(["pop"])),Jd.info(this.ctx,`Popped stash in ${e}`)}};f();var Xgi=de(Dn());var CC=new Se("WorktreeService");var COa=new Xgi.ProtocolRequestType("worktree/requestUserDecision"),$2e=class{constructor(e,r){this.ctx=e;this.gitService=r}static{a(this,"WorktreeService")}async requestUserDecision(e){let r=await this.gitService.getUncommittedChanges(e);if(r.length===0)return CC.info(this.ctx,`No uncommitted changes found in ${e}, skipping user decision prompt`),"skip";CC.info(this.ctx,`Found ${r.length} uncommitted changes, requesting user decision`);let o=await this.ctx.get(Ar).connection.sendRequest(COa,{type:"uncommitted-changes",title:"Handle Uncommitted Changes",message:`You have ${r.length} uncommitted changes. How would you like to proceed?`,options:[{id:"copy",label:"Copy changes",description:"Copy uncommitted changes into the new worktree",recommended:!0},{id:"move",label:"Move changes",description:"Move uncommitted changes to the new worktree and clean the original"},{id:"skip",label:"Skip changes",description:"Create worktree from clean state, leave local changes untouched"},{id:"cancel",label:"Cancel",description:"Cancel worktree creation",destructive:!0}],defaultOption:"copy"});return o.cancelled?(CC.info(this.ctx,`User cancelled worktree creation for ${e}`),"cancel"):(CC.info(this.ctx,`User selected worktree migration strategy ${o.selectedOption} for ${e}`),o.selectedOption)}async createWorktree(e,r){CC.info(this.ctx,`Starting worktree creation for ${e} with strategy ${r}`);let n=r==="copy"||r==="move";n&&(CC.info(this.ctx,`Stashing original repository changes before worktree creation for ${e}`),await this.gitService.stash(e));let o;try{o=await this.gitService.createWorktree({repositoryPath:e})}catch(s){throw n&&(CC.warn(this.ctx,`Worktree creation failed for ${e}, restoring original stash`),await this.gitService.stashPop(e).catch(()=>{})),s}if(n)try{if(CC.info(this.ctx,`Migrating changes into worktree ${o.worktreePath} using strategy ${r}`),r==="copy"){await this.gitService.stashApply(o.worktreePath),await this.gitService.stashPop(e);let s=await this.gitService.snapshotCopiedChanges(o.worktreePath);o={...o,baseCommit:s},CC.info(this.ctx,`Updated worktree baseCommit to copied-changes snapshot ${s} for ${o.worktreePath}`)}else await this.gitService.stashPop(o.worktreePath);CC.info(this.ctx,`Finished migrating changes into worktree ${o.worktreePath}`)}catch(s){throw CC.warn(this.ctx,`Failed to migrate changes to worktree: ${s instanceof Error?s.message:String(s)}`),await this.gitService.stashPop(e).catch(()=>{}),s}return CC.info(this.ctx,`Completed worktree creation for ${e}; worktreePath=${o.worktreePath}, baseCommit=${o.baseCommit}`),o}async applyWorktreeChanges(e,r,n){CC.info(this.ctx,`Starting worktree apply from ${r} to ${e} with baseCommit ${n}`);let o=await this.gitService.applyWorktreeChanges(r,e,n);return CC.info(this.ctx,`Completed worktree apply from ${r} to ${e}; nextBaseCommit=${o.baseCommit}`),o}};var vOa="Failed to apply changes to the current workspace. Please stage or commit your changes in the current workspace and try again.",bOa=["already exists in working directory","patch does not apply","patch failed"];function TOa(t){let e=t instanceof Error?t.message:String(t);return e.includes("Failed to apply worktree patch:")&&bOa.some(n=>e.includes(n))?vOa:`Failed to apply worktree changes: ${e}`}a(TOa,"getWorktreeCompleteErrorMessage");var SOa=S.Object({repositoryPath:S.String()});async function IOa(t,e,r){try{let n=new zfe(t),o=new $2e(t,n),s=await o.requestUserDecision(r.repositoryPath);if(s==="cancel")return[{success:!1,error:"Worktree creation cancelled by user"},null];let c=await o.createWorktree(r.repositoryPath,s);return[{success:!0,worktreePath:c.worktreePath,worktreeDirName:c.worktreeDirName,branchName:c.branchName,baseBranchName:c.baseBranchName,baseCommit:c.baseCommit},null]}catch(n){let o=n instanceof Error?n.message:String(n);return[null,{code:ct.InternalError,message:`Failed to create worktree: ${o}`}]}}a(IOa,"handleWorktreeCreateChecked");var Zgi=He(SOa,IOa),xOa=S.Object({repositoryPath:S.String(),worktreePath:S.String(),baseCommit:S.String()});async function wOa(t,e,r){try{let n=new zfe(t);return[{success:!0,baseCommit:(await new $2e(t,n).applyWorktreeChanges(r.repositoryPath,r.worktreePath,r.baseCommit)).baseCommit},null]}catch(n){return[null,{code:ct.InternalError,message:TOa(n)}]}}a(wOa,"handleWorktreeCompleteChecked");var eAi=He(xOa,wOa),ROa=S.Object({worktreePath:S.String(),repositoryPath:S.String()});async function POa(t,e,r){try{return await new zfe(t).removeWorktree(r.worktreePath,r.repositoryPath),[{success:!0},null]}catch(n){let o=n instanceof Error?n.message:String(n);return[null,{code:ct.InternalError,message:`Failed to delete worktree: ${o}`}]}}a(POa,"handleWorktreeDeleteChecked");var tAi=He(ROa,POa);var bJ=class{constructor(e){this.handlers=e}static{a(this,"MethodHandlers")}};function rAi(){let t=new Map;return t.set(dhi.method,fhi),t.set("getCompletions",Opi),t.set("getCompletionsCycling",Bpi),t.set("getDefaultFileSafetyRules",Lpi),t.set("getPanelCompletions",Qpi),t.set(_pi.method,Cpi),t.set("getVersion",Gpi),t.set("getUserInfo",qpi),t.set("setEditorInfo",Fhi),t.set("checkStatus",O0i),t.set("checkQuota",M0i),t.set("checkFileStatus",D0i),t.set("signInInitiate",WAr),t.set("signIn",WAr),t.set("signInWithCodeFlow",jhi),t.set("signInWithDeviceFlow",Whi),t.set("signInConfirm",Uhi),t.set("signInWithGithubToken",zhi),t.set("signOut",Yhi),t.set("notifyShown",Nhi),t.set("notifyAccepted",khi),t.set("notifyRejected",Dhi),t.set("telemetry/exception",Khi),t.set("textDocument/copilotInlineEdit",Phi),t.set("testing/overrideExpFlags",ygi),t.set("testing/alwaysAuth",ryr),t.set("testing/setAlwaysAuthed",ryr),t.set("testing/neverAuth",kyr),t.set("testing/setNeverAuthed",kyr),t.set("testing/useTestingToken",jgi),t.set("testing/setCompletionDocuments",kpi),t.set("testing/setPanelCompletionDocuments",ypi),t.set("testing/setNextEditDocument",Ihi),t.set("testing/triggerShowMessageRequest",Cgi),t.set("testing/flushPromiseQueue",ugi),t.set("testing/getDocument",mgi),t.set("testing/chatml",Jhi),t.set("testing/setSyntheticTurns",_gi),t.set("testing/fetch",lgi),t.set("testing/setContentExclusionRules",Egi),t.set("testing/getContext",hgi),t.set("uninstall",$gi),t.set("debug/diagnostics",Ipi),t.set("debug/listCertificates",phi),t.set("debug/verifyState",Ygi),t.set("debug/verifyCertificate",Wgi),t.set("debug/verifyKerberos",zgi),t.set("debug/verifyWorkspaceState",Kgi),t.set("context/registerProviders",Mhi),t.set("context/unregisterProviders",Vgi),t.set("conversation/preconditions",z0i),t.set("conversation/persistence",W0i),t.set("conversation/create",H0i),t.set("conversation/turn",X0i),t.set("conversation/turnDelete",Z0i),t.set("conversation/destroy",j0i),t.set("conversation/compress",Q0i),t.set("conversation/rating",Y0i),t.set("conversation/copyCode",F0i),t.set("conversation/insertCode",U0i),t.set("conversation/templates",J0i),t.set("conversation/modes",$0i),t.set("conversation/agents",L0i),t.set("conversation/registerTools",K0i),t.set("conversation/unregisterTools",epi),t.set("conversation/updateToolsStatus",tpi),t.set("conversation/notifyCodeAcceptance",V0i),t.set("copilot/models",fpi),t.set("copilot/models/getModelMetadataList",ppi),t.set("copilot/byok/saveModel",k0i),t.set("copilot/byok/deleteModel",$fi),t.set("copilot/byok/listModels",R0i),t.set("copilot/byok/saveApiKey",P0i),t.set("copilot/byok/deleteApiKey",jfi),t.set("copilot/byok/listApiKeys",Vfi),t.set("copilot/setModelPolicy",hpi),t.set("copilot/codeReview/reviewChanges",npi),t.set("copilot/codeReview/reviewSnippets",ipi),t.set("git/commitGenerate",Hpi),t.set("thinking/generateTitle",rpi),t.set("mcp/getTools",spi),t.set("mcp/updateToolsStatus",api),t.set("mcp/readResource",cpi),t.set("mcp/registry/listServers",vhi),t.set("mcp/registry/getServer",bhi),t.set("mcp/registry/getAllowlist",Shi),t.set("mcp/getPrompt",lpi),t.set("mcp/completePrompt",upi),t.set("mcp/serverAction",dpi),t.set("githubApi/searchPR",lhi),t.set("githubApi/cancelCodingAgent",B0i),t.set("githubApi/listPullRequestChangedFiles",jpi),t.set("worktree/create",Zgi),t.set("worktree/complete",eAi),t.set("worktree/delete",tAi),t.set("backgroundAgent/create",Nfi),t.set("backgroundAgent/send",Gfi),t.set("backgroundAgent/destroy",Mfi),t.set("backgroundAgent/listModels",Ufi),t.set("backgroundAgent/listSessions",Lfi),t.set("backgroundAgent/resume",qfi),t.set("backgroundAgent/stop",Hfi),t.set("backgroundAgent/interaction",Ofi),new bJ(t)}a(rAi,"getAllMethods");f();f();f();var nAi=de(xx());var vC=class{constructor(e){this.ctx=e}static{a(this,"AbstractNotification")}get type(){return new nAi.NotificationType(this.name)}};var Wyr=class extends vC{constructor(){super(...arguments);this.name="backgroundAgent/sessionUpdate";this.params=S.Object({sessionId:S.String(),event:S.Unknown()})}static{a(this,"BackgroundAgentSessionUpdateNotification")}handle(){}},iAi=[Wyr];f();var zyr=class extends vC{constructor(){super(...arguments);this.name="copilot/didChangeToken";this.params=S.Unknown()}static{a(this,"DidChangeTokenNotificationHandler")}handle(){this.ctx.get(Nt).resetToken("did_change_token_notification")}},oAi=[zyr];f();var kOa=new Se("agentCopilotTokenManager");function Kyr(t){try{let e=new URL(t||"https://api.github.com");if(e.protocol==="https:"&&e.hostname.startsWith("api."))return`${e.origin}/`}catch{}}a(Kyr,"tokenEndpointToApiUrl");function DOa(t,e){if(!e.tokenEndpoint)return OA(e);let r=Kyr(e.tokenEndpoint);return r||kOa.warn(t,`Invalid token endpoint URL <${e.tokenEndpoint}>`),OA({apiUrl:r})}a(DOa,"getUrlsFromParams");var Yyr=class extends vC{constructor(){super(...arguments);this.name=aPt.method;this.params=QVr}static{a(this,"DidChangeAuthNotificationHandler")}handle(r){let n=this.ctx.get(en),o=DOa(this.ctx,r);this.ctx.get(Fp).setConfiguredUrls(this.ctx,o);let s=r.handle||r.login;s&&r?.accessToken?n.setTransientSession({accessToken:r.accessToken,login:s,githubAppId:r.githubAppId,...o}):n.setTransientSession({githubAppId:r.githubAppId,...o})}},sAi=[Yyr];f();var Jyr=class extends vC{constructor(){super(...arguments);this.name=pPt.method;this.params=zVr}static{a(this,"DidShowCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],s=this.ctx.get(pl).get(n);s&&exn(this.ctx,s)}},Xyr=class extends vC{constructor(){super(...arguments);this.name=mPt.method;this.params=ZVr}static{a(this,"DidShowInlineEditNotificationHandler")}async handle(r){let n=r.item.command.arguments[0];await this.ctx.get(cb).handleShown(n)}},Zyr=class extends vC{constructor(){super(...arguments);this.name=hPt.method;this.params=YVr}static{a(this,"DidPartiallyAcceptCompletionNotificationHandler")}handle(r){let n=r.item.command.arguments[0],o=r.acceptedLength,s=this.ctx.get(pl),c=s.get(n);c&&(o>=c.insertText.length?(s.delete(n),fae(this.ctx,c)):tJe(this.ctx,c,o,void 0,void 0,"cumulative"))}},aAi=[Jyr,Xyr,Zyr];f();var Rft=class extends vC{constructor(){super(...arguments);this.name="window/workDoneProgress/cancel";this.params=S.Object({token:S.Union([S.String(),S.Number()])})}static{a(this,"WorkDoneProgressCancelNotification")}handle(r){this.ctx.get(a2).cancel(r.token)}};var NOa=[...iAi,...oAi,...sAi,...aAi,Rft];function cAi(t,e){for(let r of NOa){let n=new r(t),o=wl.Compile(n.params);e.onNotification(n.type,Up(t,async s=>{h3(s),o.Check(s)?await n.handle(s):$a.error(t,`Notification ${n.name}:`,new Sm(o.Errors(s)))},`Notification ${n.name}`))}}a(cAi,"registerNotifications");f();f();var lAi=de(require("crypto")),uAi=require("os");var MOa=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function OOa(t){let e=t.replace(/-/g,":").toLowerCase();return!MOa.has(e)}a(OOa,"validateMacAddress");function BOa(){let t=(0,uAi.networkInterfaces)();for(let e in t){let r=t[e];if(r){for(let{mac:n}of r)if(OOa(n))return n}}throw new Error("Unable to retrieve mac address (unexpected format)")}a(BOa,"getMac");var eEr;function LOa(){try{let t=BOa();return lAi.createHash("sha256").update(t,"utf8").digest("hex")}catch{return}}a(LOa,"getMacMachineId");function tEr(){return eEr||(eEr=LOa()||yr()),eEr}a(tEr,"getMachineId");function rEr(t){let e=t??yr()+Date.now();return new Vs(e,tEr(),tEr())}a(rEr,"createEditorSession");var dAi=rEr();f();var Pft=de(mu());var nEr=new Se("AgentTextDocumentConfiguration"),iEr=class{constructor(e){this.ctx=e;this.#e=new Ri;this.onDidChange=this.#e.event}static{a(this,"AgentTextDocumentsConfiguration")}#e;create(e,r,n,o){try{return Sx.create(e,r,n,o)}catch(s){throw nEr.exception(this.ctx,s,".create"),s}}update(e,r,n){try{let o=[],s=Sx.withChanges(e,r,n);for(let l of r)if(Pft.TextDocumentContentChangeEvent.isIncremental(l)){let u=e.offsetAt(l.range.start),d=e.offsetAt(l.range.end),p={start:e.positionAt(u),end:e.positionAt(d)};for(let m of["start","end"])if(p[m].line!==l.range[m].line||p[m].character!==l.range[m].character){let g=`invalid range ${m} position ${JSON.stringify(l.range[m])}. Assuming ${JSON.stringify(p[m])}.`;nEr.warn(this.ctx,`textDocument/didChange for ${e.uri} has ${g}`);let A=Pt.createAndMarkAsIssued({message:`Received ${g}`});st(this.ctx,`invalidRange.${m}`,A)}let h={range:p,rangeOffset:u,rangeLength:d-u,text:l.text};o.push(h),e=e.applyEdits([{range:h.range,newText:h.text}])}let c={document:{uri:e.uri,version:n},contentChanges:o};return this.#e.fire(c),s}catch(o){throw nEr.exception(this.ctx,o,".update"),o}}},qQ=class extends zr{constructor(){super(...arguments);this.#e=new Ri;this.onDidOpenTextDocument=this.#e.event;this.#t=new Ri;this.onDidCloseTextDocument=this.#t.event;this.#n=new Ri;this.onDidFocusTextDocument=this.#n.event;this._textDocumentConfiguration=new iEr(this.ctx);this.onDidChangeTextDocument=this._textDocumentConfiguration.onDidChange;this._documents=new Map;this._notebookDocuments=new Pft.NotebookDocuments(this._textDocumentConfiguration);this.workspaceFolders=[];this.#r=new Ri;this.onDidChangeWorkspaceFolders=this.#r.event}static{a(this,"AgentTextDocumentManager")}#e;#t;#n;#r;get connection(){return this.ctx.get(Ar).connection}init(r){this.connection.onDidOpenTextDocument(n=>{let o=n.textDocument,s=this._textDocumentConfiguration.create(o.uri,o.languageId,o.version,o.text);this._documents.set(ca(o.uri),s),this.#e.fire({document:{...o,uri:s.uri}})}),this.connection.onDidChangeTextDocument(n=>{let o=n.textDocument,s=n.contentChanges,{version:c}=o;if(c==null)throw new Error(`Received document change event for ${o.uri} without valid version identifier`);let l=ca(o.uri),u=this._documents.get(l);u!==void 0&&(u=this._textDocumentConfiguration.update(u,s,c),this._documents.set(l,u))}),this.connection.onDidCloseTextDocument(n=>{let o=ca(n.textDocument.uri);this._documents.delete(o),this.#t.fire({document:{uri:o}})}),this.connection.onNotification(uPt.type,n=>{let o=("textDocument"in n?n.textDocument:n)??{};this.#n.fire("uri"in o?{document:o}:{})}),this._notebookDocuments.listen(this.connection),this.workspaceFolders.length=0,this.workspaceFolders.push(...r),r.length>0&&this.#r.fire({workspaceFolders:this.workspaceFolders,added:r,removed:[]})}didChangeWorkspaceFolders(r){r.added.forEach(n=>this.registerWorkspaceFolder(n)),r.removed.forEach(n=>this.unregisterWorkspaceFolder(n)),this.#r.fire({workspaceFolders:this.workspaceFolders,added:r.added,removed:r.removed})}unregisterWorkspaceFolder(r){let n=this.workspaceFolders.findIndex(o=>o.uri===r.uri);n>=0&&this.workspaceFolders.splice(n,1)}registerWorkspaceFolder(r){this.workspaceFolders.find(n=>n.uri===r.uri)||this.workspaceFolders.push(r)}getTextDocumentsUnsafe(){return[...this._documents.values()]}getTextDocumentUnsafe(r){return this._documents.get(ca(r.uri))}getWorkspaceFolders(){return this.workspaceFolders}findNotebook(r){let n=this._notebookDocuments.findNotebookDocumentForCell(r.uri);if(n)return{getCells:a(()=>n.cells.map((o,s)=>this.wrapCell(o,s)).filter(o=>!!o),"getCells"),getCellFor:a(({uri:o})=>{let s=n.cells.findIndex(c=>c.document===o);return s!==-1?this.wrapCell(n.cells[s],s):void 0},"getCellFor")}}wrapCell(r,n){let o=this._notebookDocuments.getCellTextDocument(r);if(o)return{kind:r.kind,metadata:r.metadata??{},index:n,document:o}}};var fAi=wl.Compile($Vr);function h3(t){if(t!==null){if(Array.isArray(t))for(let e=0;e{try{if(this.#t?.workspace?.configuration&&e&&typeof e=="object"&&!("settings"in e)){let n=await this.connection.workspace.getConfiguration(pAi.map(s=>({section:s}))),o={github:{copilot:n.shift()}};for(let s of P2e)o[s]=n.shift();e.settings=o}if(e&&typeof e=="object"&&"settings"in e)try{this.ctx.get(ZP).handleConfigurationChange(e.settings)}catch(n){$a.exception(this.ctx,n,"EncodingConfigurationService.handleConfigurationChange")}return Qdt(this.ctx,h3(e))}catch(r){$a.exception(this.ctx,r,"didChangeConfiguration")}},"handleDidChangeConfiguration");this.#n=this.ctx.get(fd)}static{a(this,"Service")}#e;#t;#n;get clientCapabilities(){return this.#t}listen(){let e=this.ctx,r=this.connection;r.onRequest(this.messageHandler.bind(this)),cAi(e,r);let n={name:"GitHub Copilot Language Server",version:e.get(Vo).getDisplayVersion(),nodeVersion:process.versions.node};function o(c){try{e.get(qQ).didChangeWorkspaceFolders(c)}catch(l){$a.exception(e,l,"didChangeWorkspaceFolders")}}a(o,"didChangeWorkspaceFolders"),this.connection.onNotification("vs/didAddWorkspaceFolder",({name:c,uri:l})=>o({added:[{uri:l,name:c??l}],removed:[]})),this.connection.onNotification("vs/didRemoveWorkspaceFolder",({name:c,uri:l})=>o({added:[],removed:[{uri:l,name:c??l}]})),r.onInitialize(c=>{if(this.initialized)throw new Error("initialize request sent after initialized notification");this.#t=c.capabilities;let l=c.capabilities.copilot,u=h3(c.initializationOptions);if(u){if(!fAi.Check(u))throw new Sm(fAi.Errors(u));let m=u,g=e.get(Dr);m.editorPluginInfo?g.setEditorAndPluginInfo({version:"unknown",...m.editorPluginInfo},m.editorInfo&&{version:"unknown",...m.editorInfo},m.relatedPluginInfo??[]):$a.warn(e,"editorInfo and editorPluginInfo will soon be required in initializationOptions. This will replace setEditorInfo."),m.copilotIntegrationId&&g.setCopilotIntegrationId(m.copilotIntegrationId),m.githubAppId&&(e.get(Oc).githubAppId=m.githubAppId),m.copilotCapabilities&&(l=m.copilotCapabilities),m.sessionId&&e.forceSet(Vs,rEr(m.sessionId))}let d=c.capabilities.workspace?.workspaceFolders??!1;e.get(qQ).init(c.workspaceFolders??[]),fbn(this.ctx),l&&(e.get(Fn).setCapabilities(l),l.contentProvider&&zh.registerSchemes(l.contentProvider),"openURL"in l&&rJe(e,["The openURL Copilot capability has been removed in favor of window/showDocument."]));let h=a(async()=>{this.initialized||(this.initialized=!0,$a.info(e,`${n.name} ${n.version} initialized`),e.get(Nt).primeToken(),d&&r.workspace.onDidChangeWorkspaceFolders(o),c.capabilities.workspace?.didChangeConfiguration?.dynamicRegistration&&await r.client.register(pb.DidChangeConfigurationNotification.type,{section:pAi}),c.capabilities.workspace?.configuration?await this.handleDidChangeConfiguration({}):await Promise.race([this.ctx.get(f_).requireReady().then(()=>!0),new Promise(A=>setTimeout(()=>A(!1),200))])||Udt(e),!this.deactivated&&(this.activationEmitter.fire(),new Jde().startup(e).catch(()=>{})))},"onInitialized");return r.onInitialized(Up(e,h,"onInitialized")),e.get(KD).init(),l?.token&&e.get(en).setTransientSession({}),l?.redirectedTelemetry&&Pfi(e),hAi.lt(process.versions.node,"22.0.0")&&$a.warn(e,`Node.js ${process.versions.node} support is deprecated. Please upgrade to Node.js 22 or newer.`),{capabilities:{textDocumentSync:{openClose:!0,change:pb.TextDocumentSyncKind.Incremental},notebookDocumentSync:{notebookSelector:[{notebook:"*"}]},workspace:{workspaceFolders:{supported:d,changeNotifications:d}},executeCommandProvider:{commands:Ifi(e,r)},inlineCompletionProvider:{}},serverInfo:n}}),r.onShutdown(async()=>{await(this.#e??=this.deactivate())}),r.onExit(()=>{this.onExit()}),r.onDidChangeConfiguration(c=>{this.handleDidChangeConfiguration(c)}),r.listen();let s=new Put;this.ctx.forceSet(fd,s)}telemetryMethodFailure(e,r){let n=e.replaceAll("/",".");Sa(this.ctx,"lsp.method.failure",r,{method:n})}async messageHandler(e,r,n){let o=this.ctx.get(bJ).handlers.get(e);if(!o)return new pb.ResponseError(ct.MethodNotFound,`Method not found: ${e}`);if(!this.initialized)return new pb.ResponseError(ct.ServerNotInitialized,"Agent service not initialized.");if(this.#e)return new pb.ResponseError(ct.InvalidRequest,"Agent service shut down.");if(e!=="setEditorInfo"&&!Bin(this.ctx.get(Dr)))throw new pb.ResponseError(ct.ServerNotInitialized,"editorInfo and editorPluginInfo not set in initializationOptions");Array.isArray(r)&&(r=r[0]),h3(r);try{let[s,c]=await o(this.ctx,n,r);return c?new pb.ResponseError(c.code,c.message,c.data):s}catch(s){if(n.isCancellationRequested)return new pb.ResponseError(ct.RequestCancelled,"Request was canceled");if(s instanceof $i)return this.telemetryMethodFailure(e,s),new pb.ResponseError(ct.NoCopilotToken,`Not authenticated: ${s.message}`);throw s instanceof pb.ResponseError||$a.exception(this.ctx,s,`Request ${e}`),this.telemetryMethodFailure(e,s),s}}async onExit(){try{this.ctx.get(nw).dispose()}catch(e){$a.exception(this.ctx,e,"failed to dispose ripgrep process manager")}try{this.ctx.get(Jx).dispose()}catch(e){$a.exception(this.ctx,e,"failed to dispose workspace chunk search service")}try{await this.ctx.get(xu).shutdown()}catch(e){$a.exception(this.ctx,e,"failed to shutdown background agent service")}this.ctx.forceSet(fd,this.#n),await(this.#e??=this.deactivate())}markDeactivated(){this.deactivated||(this.deactivated=!0,this.deactivationEmitter.fire(),this.ctx.get(f_).markReady())}async deactivate(){let e=this.ctx;this.markDeactivated(),Q$t(e),await Promise.race([new Promise(r=>setTimeout(r,100).unref()),e.get(cu).flush()]),await Promise.race([new Promise(r=>setTimeout(r,1800).unref()),e.get(X0).deactivate()])}dispose(){this.markDeactivated(),this.connection.dispose()}},$a=new Se("lsp");var tE=class{constructor(e,r,n){this.ctx=e;this.skillId=r;this.requestType=new mAi.ProtocolRequestType("conversation/context");this.typeCheck=wl.Compile(n)}static{a(this,"AgentSkillResolver")}async resolveSkill(e){let r=this.ctx.get(Ar).connection,n={conversationId:e.conversation.id,turnId:e.turn.id,skillId:this.skillId},o;try{let s=await r.sendRequest(this.requestType,n),[c,l]=s;if(l){let u=new gAi.ResponseError(l.code,l.message,l.data);Ge.error(this.ctx,`ResponseError while resolving skill ${this.skillId}`,u);return}o=c}catch(s){Ge.error(this.ctx,`Error while resolving skill ${this.skillId}`,s);return}if(o!=null){if(!this.typeCheck.Check(o))throw new Sm(this.typeCheck.Errors(o));return o}}};var oEr=class{constructor(e,r,n="",o="",s=[],c=[]){this.progressToken=e;this.chunks=r;this.followUp=n;this.suggestedTitle=o;this.skills=s;this.references=c}static{a(this,"SyntheticTurn")}},w3=class{constructor(){this.turns=[]}static{a(this,"SyntheticTurns")}add(e,r,n="",o="",s=[],c=[]){let l=new oEr(e,r,n,o,s,c);return this.turns.push(l),l}get(e){return this.turns.find(r=>r.progressToken===e)}},kft=class{constructor(e,r){this.turnContext=e;this.syntheticTurn=r;this.conversationProgress=e.ctx.get(xa)}static{a(this,"SyntheticTurnProcessor")}async process(e,r){try{await this.processWithSyntheticTurns(this.syntheticTurn,e,r)}catch(n){Ge.error(this.turnContext.ctx,`Error processing turn ${this.turnContext.turn.id}`,n);let o=n.message;this.turnContext.turn.status="error",this.turnContext.turn.response={message:o,type:"meta"},await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{error:{message:o,responseIsIncomplete:!0}})}}async processWithSyntheticTurns(e,r,n){await this.conversationProgress.begin(this.turnContext.conversation,this.turnContext.turn,r),await this.resolveSyntheticSkill(e,n),await this.processSyntheticChunks(e,n),await this.endSyntheticProgress(e,n),this.turnContext.turn.response={type:"model",message:e.chunks.join("")},this.turnContext.turn.status=n.isCancellationRequested?"cancelled":"success"}async resolveSyntheticSkill(e,r){let n=this.turnContext.ctx.get(lo).getCapabilities(this.turnContext.conversation.id),o=e.skills.filter(s=>n.skills.includes(s));for(let s of o){let l=await new tE(this.turnContext.ctx,s,S.Object({value:S.String()})).resolveSkill(this.turnContext);l&&!r.isCancellationRequested&&await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:l.value})}}async processSyntheticChunks(e,r){for(let n of e.chunks)r.isCancellationRequested||(await this.conversationProgress.report(this.turnContext.conversation,this.turnContext.turn,{reply:n}),await Wb(1))}async endSyntheticProgress(e,r){r.isCancellationRequested?await this.conversationProgress.cancel(this.turnContext.conversation,this.turnContext.turn):await this.conversationProgress.end(this.turnContext.conversation,this.turnContext.turn,{followUp:{message:e.followUp,type:"followup",id:yr()},suggestedTitle:e.suggestedTitle,updatedDocuments:this.turnContext.conversation.source==="inline"?[{uri:"fakeUpdatedDoc.ts",text:"fake"}]:void 0})}};var c2=class{static{a(this,"TurnProcessorFactory")}async createProcessor(e,r,n){let o=e.ctx.get(w3).get(r);if(o)return new kft(e,o);let c=(await IT(e.ctx)).find(u=>u.slug===e.turn.agent?.agentSlug);if(c?.turnProcessor)return c.turnProcessor(e);let l;return e.conversation.source==="inline"?l=new G7e(e.ctx):l=new ane(e.ctx),n!==void 0&&(l.computeSuggestions=n),e.turn.chatMode?.kind==="Agent"||e.turn.chatMode?.kind==="InlineAgent"?new ACe(e,l):e.turn.chatMode?.kind==="Ask"&&e.conversation.source!=="inline"?new ACe(e,l):new Eje(e,l)}};f();var GQ=class extends XA{constructor(r){super(r);this.connection=null;this.capabilities={readTextFile:!1,writeTextFile:!1};this.currentSessionId=null}static{a(this,"ACPClientToolInvoker")}setACPContext(r,n,o){this.connection=r,this.capabilities=n,this.currentSessionId=o}clearACPContext(){this.currentSessionId=null}async invokeClientTool(r,n){if(!this.connection||!this.currentSessionId)return this.errorResult("ACP connection not available for tool invocation");switch(n.name){case"create_file":return this.handleCreateFile(n.input,n.toolCallId);case"insert_edit_into_file":return this.handleEditFile(n.input,n.toolCallId);default:return this.errorResult(`Tool ${n.name} is not supported in ACP mode`)}}async handleCreateFile(r,n){if(!this.capabilities.writeTextFile)return this.errorResult("Client does not support file writing");if(!r?.filePath||r.content===void 0)return this.errorResult("create_file requires filePath and content");try{let o=r.content;return await this.connection.writeTextFile({sessionId:this.currentSessionId,path:r.filePath,content:o}),await this.sendDiffUpdate(n,r.filePath,null,o),this.successResult(`Successfully created file: ${r.filePath}`)}catch(o){return this.errorResult(`Failed to create file ${r.filePath}: ${String(o)}`)}}async handleEditFile(r,n){if(!this.capabilities.writeTextFile)return this.errorResult("Client does not support file writing");if(!r?.filePath||r.code===void 0)return this.errorResult("insert_edit_into_file requires filePath and code");try{let o=null;if(this.capabilities.readTextFile)try{o=(await this.connection.readTextFile({sessionId:this.currentSessionId,path:r.filePath})).content}catch{}let s=r.code.replace(/\r\n/g,` +`);return await this.connection.writeTextFile({sessionId:this.currentSessionId,path:r.filePath,content:s}),await this.sendDiffUpdate(n,r.filePath,o,s),this.successResult(`Successfully edited file: ${r.filePath}`)}catch(o){return this.errorResult(`Failed to edit file ${r.filePath}: ${String(o)}`)}}async sendDiffUpdate(r,n,o,s){await this.connection.sessionUpdate({sessionId:this.currentSessionId,update:{sessionUpdate:"tool_call_update",toolCallId:r,content:[{type:"diff",path:n,oldText:o,newText:s}]}})}successResult(r){return new _r([new fr(r)],"success")}errorResult(r){return new _r([new fr(r)],"error")}};f();function FOa(t){switch(t){case"read_file":case"list_dir":case"get_errors":return"read";case"insert_edit_into_file":case"create_file":case"replace_string_in_file":return"edit";case"semantic_search":case"file_search":case"grep_search":return"search";case"run_in_terminal":case"run_subagent":return"execute";case"update_user_preferences":case"validate_cves":default:return"other"}}a(FOa,"mapToolNameToKind");function UOa(t,e){if(!e)return;let r=[];switch(t){case"read_file":case"insert_edit_into_file":case"create_file":case"replace_string_in_file":{let n=e.filePath;if(n){let o=e.startLine;r.push({path:n,line:o??void 0})}break}case"list_dir":{let n=e.path;n&&r.push({path:n});break}case"get_errors":{let n=e.filePaths;if(n&&Array.isArray(n))for(let o of n)r.push({path:o});break}}return r.length>0?r:void 0}a(UOa,"extractLocationsFromInput");function QOa(t){switch(t){case"not started":return"pending";case"running":return"in_progress";case"completed":return"completed";case"error":case"cancelled":return"failed";default:return"pending"}}a(QOa,"mapToolCallStatus");var Dft=class{constructor(e,r){this.connection=e;this.sessionId=r;this.activeToolCalls=new Map;this.messageChunkBuffer=""}static{a(this,"ACPProgressReporter")}async begin(e,r,n,o){}async report(e,r,n,o){if(o.reply&&await this.reportTextChunk(o.reply),o.editAgentRounds){for(let s of o.editAgentRounds)if(s.reply&&await this.reportTextChunk(s.reply),s.toolCalls)for(let c of s.toolCalls){let l=QOa(c.status),u=!this.activeToolCalls.has(c.id);if(u&&(c.status==="running"||c.status==="not started")){let d=UOa(c.name,c.input);await this.reportToolCallStart(c.id,c.name,FOa(c.name),l,c.input,d)}else c.status==="completed"?await this.reportToolCallComplete(c.id):c.status==="error"?await this.reportToolCallError(c.id,c.error||"Unknown error"):c.status==="cancelled"?await this.reportToolCallCancelled(c.id):u||await this.reportToolCallProgress(c.id,l)}}}async end(e,r,n,o){if(o?.error&&await this.reportTextChunk(` Error: ${o.error.message}`),this.messageChunkBuffer===""&&n.response?.message){let s=typeof n.response.message=="string"?n.response.message:JSON.stringify(n.response.message);await this.reportTextChunk(s)}await this.complete()}async cancel(e,r,n,o){o&&await this.reportTextChunk(` -Cancelled: ${o.message}`),await this.complete()}async reportTextChunk(e){this.messageChunkBuffer+=e,await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"agent_message_chunk",content:{type:"text",text:e}}})}async reportToolCallStart(e,r,n="other",o="pending",s,c){let l={toolCallId:e,title:r,kind:n,status:o};this.activeToolCalls.set(e,l),await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"tool_call",toolCallId:e,title:r,kind:n,status:o,rawInput:s,locations:c}})}async reportToolCallProgress(e,r="in_progress",n){let o=this.activeToolCalls.get(e);o&&(o.status=r,await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"tool_call_update",toolCallId:e,status:r,content:n}}))}async reportToolCallComplete(e,r){let n=this.activeToolCalls.get(e);n&&(n.status="completed",await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"tool_call_update",toolCallId:e,status:"completed",content:r}}),this.activeToolCalls.delete(e))}async reportToolCallError(e,r){let n=this.activeToolCalls.get(e);n&&(n.status="failed",await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"tool_call_update",toolCallId:e,status:"failed",content:[{type:"content",content:{type:"text",text:r}}]}}),this.activeToolCalls.delete(e))}async reportToolCallCancelled(e){let r=this.activeToolCalls.get(e);r&&(r.status="failed",await this.connection.sessionUpdate({sessionId:this.sessionId,update:{sessionUpdate:"tool_call_update",toolCallId:e,status:"failed",content:[{type:"content",content:{type:"text",text:"Cancelled"}}]}}),this.activeToolCalls.delete(e))}async complete(){for(let[e]of this.activeToolCalls)await this.reportToolCallComplete(e)}};f();async function S0t(t){try{if((await t.get(en).checkAndUpdateStatus()).status==="OK")return;let n=await Dft(t,(o,s)=>new v2(o,v2.providerId,s,void 0));if(n.status!=="OK"&&n.status!=="MaybeOK")throw new Is(lt.CodeFlowFailed,`Authentication failed: ${n.status}`)}catch(e){throw e instanceof NL?new Is(lt.CodeFlowFailed,`OAuth code flow requires a browser but none is available: ${e.message}`):e instanceof no?new Is(lt.CodeFlowFailed,`Authentication failed: ${e.message}`):e}}a(S0t,"performACPGitHubOAuth");function I0t(t){if(t!=="github_oauth")throw new Is(lt.InvalidParams,`Unknown authentication method: ${t}`)}a(I0t,"validateAuthMethodId");async function x0t(t){let r=await t.get(en).checkAndUpdateStatus({localChecksOnly:!0});if(r.status!=="OK"&&r.status!=="MaybeOK")throw Is.authRequired()}a(x0t,"requireACPAuthenticated");var ygi=[{id:Tc.Ask.id,name:Tc.Ask.name,description:Tc.Ask.description},{id:Tc.Agent.id,name:Tc.Agent.name,description:Tc.Agent.description}],w0t=class{constructor(e,r){this.connection=e;this.ctx=r;this.sessions=new Map;this.clientCapabilities={readTextFile:!1,writeTextFile:!1}}static{a(this,"CopilotACPAgent")}initialize(e){if(e.clientInfo){let o=this.ctx.get(Nr);o instanceof s9&&o.setEditorAndPluginInfo({name:e.clientInfo.name,version:e.clientInfo.version},{name:e.clientInfo.name,version:e.clientInfo.version})}Kn(this.ctx,"acp.initialize");let r=e.clientCapabilities?.fs;r&&(this.clientCapabilities={readTextFile:r.readTextFile??!1,writeTextFile:r.writeTextFile??!1});let n=[{id:"github_oauth",name:"Sign in with GitHub",description:"Authenticate using GitHub OAuth (opens browser)"}];return Promise.resolve({protocolVersion:cje,agentCapabilities:{loadSession:!1,promptCapabilities:{audio:!1,embeddedContext:!0,image:!1}},agentInfo:{name:"GitHub Copilot",version:Z_(this.ctx)},authMethods:n})}async newSession(e){Kn(this.ctx,"acp.newSession"),await this.requireAuthenticated();let r=yr(),n=yr(),s=this.ctx.get(ho).create({source:"panel",conversationId:n}),c=e.cwd?{uri:Lc(e.cwd)}:null,l=this.getAvailableModes(),u=this.getDefaultModeId(),{availableModels:d,defaultModelId:p}=await this.getAvailableModels(),h=p;return this.sessions.set(r,{conversationId:n,conversation:s,pendingPrompt:null,cancellationTokenSource:null,workspaceFolder:c,currentModeId:u,currentModelId:h}),{sessionId:r,modes:{currentModeId:u,availableModes:l},models:{currentModelId:h,availableModels:d}}}async authenticate(e){return Kn(this.ctx,"acp.authenticate"),I0t(e.methodId),await S0t(this.ctx),{}}async requireAuthenticated(){await x0t(this.ctx)}async prompt(e){Kn(this.ctx,"acp.prompt"),await this.requireAuthenticated();let r=this.sessions.get(e.sessionId);if(!r)throw new Error(`Session ${e.sessionId} not found`);let n=process.env.GITHUB_COPILOT_ACP_MODEL_ID??r.currentModelId;r.pendingPrompt?.abort(),r.cancellationTokenSource?.cancel(),r.pendingPrompt=new AbortController,r.cancellationTokenSource=new _n.CancellationTokenSource,r.pendingPrompt.signal.addEventListener("abort",()=>{r.cancellationTokenSource?.cancel()});try{let s={message:this.extractTextFromPrompt(e.prompt),type:"user"},c=yr(),l=new Dd(s,c),u=r.currentModeId===Tc.Ask.id?Tc.Ask:Tc.Agent;l.chatMode=u,l.userRequestedModel=n;let d=this.extractReferencesFromPrompt(e.prompt),p=this.ctx.get(ho),h=r.workspaceFolder?[{uri:r.workspaceFolder.uri,name:""}]:void 0;await p.addTurn(r.conversation.id,l,d,void 0,r.workspaceFolder??void 0,h);let m=new T0t(this.connection,e.sessionId),g=new YT(this.ctx,r.conversation,l,r.cancellationTokenSource.token),A=this.ctx.get(ay);A instanceof mq&&A.setACPContext(this.connection,this.clientCapabilities,e.sessionId);let E=await this.ctx.get(E2).createProcessor(g,e.sessionId);try{await E.process(m,r.cancellationTokenSource.token,void 0,void 0,n)}finally{A instanceof mq&&A.clearACPContext()}return r.pendingPrompt=null,r.cancellationTokenSource=null,{stopReason:"end_turn"}}catch(o){let s=this.ctx.get(ay);if(s instanceof mq&&s.clearACPContext(),r.pendingPrompt?.signal.aborted)return{stopReason:"cancelled"};throw o}}cancel(e){Kn(this.ctx,"acp.cancel");let r=this.sessions.get(e.sessionId);return r?.pendingPrompt?.abort(),r?.cancellationTokenSource?.cancel(),Promise.resolve()}async setSessionMode(e){Kn(this.ctx,"acp.setSessionMode");let r=this.sessions.get(e.sessionId);if(!r)throw new Is(lt.InvalidParams,`Session ${e.sessionId} not found`);let n=this.getAvailableModes();if(!n.some(s=>s.id===e.modeId))throw new Is(lt.InvalidParams,`Mode '${e.modeId}' is not available. Available modes: ${n.map(s=>s.id).join(", ")}`);return r.currentModeId=e.modeId,Promise.resolve({})}async unstable_setSessionModel(e){Kn(this.ctx,"acp.setSessionModel");let r=this.sessions.get(e.sessionId);if(!r)throw new Is(lt.InvalidParams,`Session ${e.sessionId} not found`);let{availableModels:n}=await this.getAvailableModels();if(!n.some(s=>s.modelId===e.modelId))throw new Is(lt.InvalidParams,`Model '${e.modelId}' is not available. Available models: ${n.map(s=>s.modelId).join(", ")}`);return r.currentModelId=e.modelId,{}}isAgentModeEnabled(){return cL(this.ctx)?.getTokenValue("agent_mode")!=="0"}getAvailableModes(){return this.isAgentModeEnabled()?ygi:ygi.filter(e=>e.id===Tc.Ask.id)}getDefaultModeId(){return this.isAgentModeEnabled()?Tc.Agent.id:Tc.Ask.id}async getAvailableModels(){let e=await this.ctx.get(cl).getMetadata(),r=[],n=pO;r.push({modelId:pO,name:"Auto",description:"Automatically selects the best model for the task"});for(let o of e)o.model_picker_enabled&&o.capabilities.type==="chat"&&this.isModelCompatibleWithAgentMode(o)&&r.push({modelId:o.id,name:o.name,description:this.getModelDescription(o)});return{availableModels:r,defaultModelId:n}}isModelCompatibleWithAgentMode(e){return!(yre.has(e.capabilities.family)||!e.capabilities.supports?.tool_calls||(e.capabilities.limits?.max_prompt_tokens??0)<4e4)}getModelDescription(e){let r=e.billing?.multiplier;if(r!==void 0)return`${r}x`}extractTextFromPrompt(e){return e.filter(r=>r.type==="text").map(r=>r.text).join(` -`)}extractReferencesFromPrompt(e){let r=[];for(let n of e)if(n.type==="resource_link"){let o=n;r.push({type:"file",uri:o.uri})}else if(n.type==="resource"){let o=n;o.resource?.uri&&r.push({type:"file",uri:o.resource.uri})}return r}getFileSystemCapabilities(){return this.clientCapabilities}getConnection(){return this.connection}};f();var Egi=require("node:child_process"),P0t=require("node:stream");var R0t=class{constructor(e,r){this.cliInfo=e;this.ctx=r;this.cliProcess=null;this._cliConnection=null;this.disposed=!1}static{a(this,"CLIProcessManager")}start(e,r){if(this.disposed)throw new Error("CLIProcessManager has been disposed");if(this.cliProcess)throw new Error("CLI process is already running");let n={...process.env};r&&(n.GH_TOKEN=r);let o=[...this.cliInfo.args,"--acp","--stdio","--yolo"];if(this.cliProcess=(0,Egi.spawn)(this.cliInfo.path,o,{stdio:["pipe","pipe","inherit"],env:n,shell:Mxt}),!this.cliProcess.stdin||!this.cliProcess.stdout)throw new Error("Failed to start Copilot CLI process with piped stdio");this.cliProcess.on("error",u=>{V2(this.ctx,"acp.cli.process.error",u)}),this.cliProcess.on("exit",(u,d)=>{this.disposed||Kn(this.ctx,"acp.cli.process.exit",yt.createAndMarkAsIssued({exitCode:String(u??""),exitSignal:d??""})),this.cliProcess=null});let s=P0t.Writable.toWeb(this.cliProcess.stdin),c=P0t.Readable.toWeb(this.cliProcess.stdout),l=A1e(s,c);return this._cliConnection=new c$e(e,l),this._cliConnection}get connection(){return this._cliConnection}get isRunning(){return this.cliProcess!==null&&this.cliProcess.exitCode===null}async kill(){await this.terminateProcess()}async dispose(){this.disposed=!0,await this.terminateProcess()}async terminateProcess(){if(this.cliProcess){try{this.cliProcess.stdin?.end(),this.cliProcess.kill("SIGTERM")}catch{}await new Promise(e=>{if(!this.cliProcess){e();return}let r=setTimeout(()=>{this.cliProcess?.kill("SIGKILL"),e()},3e3);this.cliProcess.once("exit",()=>{clearTimeout(r),e()})}),this.cliProcess=null}this._cliConnection=null}};f();var k0t=class{constructor(e,r,n){this.externalConnection=e;this.ctx=r;this.cliProcessManager=n;this.cliConnection=null;this.initParams=null;this.ensureCLIPromise=null}static{a(this,"CLIProxyAgent")}initialize(e){if(e.clientInfo){let r=this.ctx.get(Nr);r instanceof s9&&r.setEditorAndPluginInfo({name:e.clientInfo.name,version:e.clientInfo.version},{name:e.clientInfo.name,version:e.clientInfo.version})}return Kn(this.ctx,"acp.cli.initialize"),this.initParams=e,Promise.resolve({protocolVersion:cje,agentCapabilities:{loadSession:!0,sessionCapabilities:{list:{}},promptCapabilities:{audio:!1,embeddedContext:!0,image:!0}},agentInfo:{name:"GitHub Copilot",version:Z_(this.ctx)},authMethods:[{id:"github_oauth",name:"Sign in with GitHub",description:"Authenticate using GitHub OAuth (opens browser)"}]})}async authenticate(e){return Kn(this.ctx,"acp.cli.authenticate"),I0t(e.methodId),await S0t(this.ctx),{}}async newSession(e){return Kn(this.ctx,"acp.cli.newSession"),await this.requireAuthenticated(),(await this.ensureCLI()).newSession(e)}async prompt(e){return Kn(this.ctx,"acp.cli.prompt"),await this.requireAuthenticated(),(await this.ensureCLI()).prompt(e)}async cancel(e){return Kn(this.ctx,"acp.cli.cancel"),(await this.ensureCLI()).cancel(e)}async setSessionMode(e){return Kn(this.ctx,"acp.cli.setSessionMode"),(await this.ensureCLI()).setSessionMode(e)}async unstable_setSessionModel(e){return Kn(this.ctx,"acp.cli.setSessionModel"),(await this.ensureCLI()).unstable_setSessionModel(e)}async setSessionConfigOption(e){return Kn(this.ctx,"acp.cli.setSessionConfigOption"),(await this.ensureCLI()).setSessionConfigOption(e)}async loadSession(e){return Kn(this.ctx,"acp.cli.loadSession"),await this.requireAuthenticated(),(await this.ensureCLI()).loadSession(e)}async listSessions(e){return Kn(this.ctx,"acp.cli.listSessions"),await this.requireAuthenticated(),(await this.ensureCLI()).listSessions(e)}async ensureCLI(){if(this.cliConnection)return this.cliConnection;if(!this.initParams)throw new Is(lt.InternalError,"CLI connection not initialized. Call initialize() first.");if(this.ensureCLIPromise)return this.ensureCLIPromise;this.ensureCLIPromise=this.spawnAndInitializeCLI();try{return await this.ensureCLIPromise}finally{this.ensureCLIPromise=null}}async spawnAndInitializeCLI(){try{let r=(await this.ctx.get(Ot).getGitHubSession())?.accessToken;this.cliConnection=this.cliProcessManager.start(s=>this.createCLIClientHandler(),r);let n=this.cliConnection.initialize({protocolVersion:this.initParams.protocolVersion,clientCapabilities:this.initParams.clientCapabilities,clientInfo:{name:"GitHub Copilot Language Server",version:Z_(this.ctx),_meta:{upstreamClientInfo:this.initParams.clientInfo??null}}}),o=this.cliConnection.closed.then(()=>{throw new Error("CLI connection closed before initialize response was received")});o.catch(()=>{}),await Promise.race([n,o]),Kn(this.ctx,"acp.cli.handshake",yt.createAndMarkAsIssued({cliVersion:this.cliProcessManager.cliInfo.version,cliSource:this.cliProcessManager.cliInfo.source}))}catch(e){throw V2(this.ctx,"acp.cli.handshake.error",e,yt.createAndMarkAsIssued({cliVersion:this.cliProcessManager.cliInfo.version,cliSource:this.cliProcessManager.cliInfo.source})),this.cliConnection=null,await this.cliProcessManager.kill(),new Is(lt.InternalError,`Failed to initialize Copilot CLI: ${e instanceof Error?e.message:String(e)}`)}return this.cliConnection}async requireAuthenticated(){await x0t(this.ctx)}createCLIClientHandler(){return{sessionUpdate:a(async e=>{await this.externalConnection.sessionUpdate(e)},"sessionUpdate"),requestPermission:a(async e=>this.externalConnection.requestPermission(e),"requestPermission"),readTextFile:a(async e=>this.externalConnection.readTextFile(e),"readTextFile"),writeTextFile:a(async e=>this.externalConnection.writeTextFile(e),"writeTextFile"),createTerminal:a(async e=>({terminalId:(await this.externalConnection.createTerminal(e)).id}),"createTerminal"),extMethod:a(async(e,r)=>this.externalConnection.extMethod(e,r),"extMethod"),extNotification:a(async(e,r)=>this.externalConnection.extNotification(e,r),"extNotification")}}async dispose(){await this.cliProcessManager.dispose()}};f();f();f();function Cgi(t){let e=new Mne;return e.set(Qc,t),e.set(bP,new bP),e.set(Ko,new Ko),e.set(Bw,new Bw),e.set(Ot,new Ot(e)),e.set(jt,new jt(e)),e.set(F2,new F2),e.set(_d,new _d(e)),e.set(np,new np),e.set(OE,new OE),e.set(ok,new MEe),e.set(Nx,new xre),e.set(Ex,new ege),e.set(gu,new gu),e.set(ON,new ON(e)),e.set(In,new In(e)),e.set(Hw,new Hw(e)),e.set(L4,LJe(e)),e.set(jm,new jm),e.set(HC,new HC),e.set(F4,F4.default),e.set(Em,new Em(e)),e.set(AT,new AT(e)),e.set(qc,new qc),e.set(GC,new GC(e)),e.set(Fn,new Fn),e.set(LT,new LT(e)),e.set(Vw,new Vw),e.set(l$,new l$(e)),e}a(Cgi,"createCommonContext");f();var N0t=class extends Cd{constructor(r){super();this.console=r}static{a(this,"ConsoleLog")}logIt(r,n,o,...s){n==1?this.console.error(`[${o}]`,...s):(n==2||_dt(r))&&this.console.warn(`[${o}]`,...s)}};f();var Tgi=require("node:os");var FMa=new Se("repository"),AX="\\\\",Sgi="(?:[#;].*)",B0e=`(?:[^"${AX}]|${AX}.)`,UMa="[0-9A-Za-z-]",_gi=`[A-Za-z]${UMa}*`,Igi=`\\s*${Sgi}?$`,xgi=`(?:[^"${AX};#]|${AX}.)`,QMa=`(?:"${B0e}*"|"${B0e}*(?${AX})$)`,qMa=`(?:${xgi}|${QMa})+`,GMa=`(?:(?${AX})$)`,wgi=`(?${qMa})${GMa}?${Igi}`,vgi=new RegExp(`^${wgi}`),HMa=new RegExp(`^(?${B0e}*(?:(?${AX})$|(?")))`),jMa=new RegExp(`^\\s*(?:(?${_gi})\\s*=\\s*${wgi}|(?${_gi})${Igi})`),$Ma=new RegExp(`(?${xgi}+)|"(?${B0e}*)"`,"g"),bgi="[-.0-9A-Za-z]+",VMa=`\\s+"(?${B0e}*)"`,WMa=`\\s+"(?${B0e}*)"`,zMa=new RegExp(`^\\s*\\[(?:(?${bgi})${VMa}|${WMa}|(?${bgi}))\\]`),YMa=new RegExp(`^\\s*${Sgi}$`),Qyr=class{constructor(e){this.content=e;this.stopped=!1;this.section="";this.line="";this.lineNum=0;this.lines=[];this.linesWithErrors=[]}static{a(this,"GitConfigParser")}parse(e){for(this.stopped=!1,this.section="",this.line="",this.linesWithErrors=[],this.configValueHandler=e,this.lines=this.content.split(/\r?\n/),this.lineNum=0;!this.stopped&&this.lineNum0}errorAt(e){this.linesWithErrors.push(e)}parseSectionStart(){let e=this.line.match(zMa);e&&(e.groups?.simple?this.section=e.groups.simple.toLowerCase()+"."+this.unescapeBaseValue(e.groups.ext):e.groups?.extOnly?this.section="."+this.unescapeBaseValue(e.groups.extOnly):this.section=e.groups.simpleOnly.toLowerCase(),this.line=this.line.slice(e[0].length))}unescapeBaseValue(e){return e.replace(/\\(.)/g,"$1")}parseConfigPair(){let e=this.line.match(jMa);if(e){if(e.groups?.key){let r=this.handleContinued(e);this.configValueHandler?.(this.nameWithSection(e.groups.key.toLowerCase()),r)}else e.groups?.soloKey&&this.configValueHandler?.(this.nameWithSection(e.groups.soloKey.toLowerCase()),"");this.line=""}}handleContinued(e){let r=e,n=[this.matchedValue(r)];for(;r?.groups?.cont||r?.groups?.strCont;){if(this.line=this.lines[++this.lineNum],this.lineNum>=this.lines.length){this.errorAt(this.lineNum);break}r.groups.strCont?(r=this.line.match(HMa),r?(n.push(this.matchedValue(r)),r.groups?.quote&&(r=this.line.slice(r[0].length).match(vgi),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))):this.errorAt(this.lineNum+1)):(r=this.line.match(vgi),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))}return this.normalizeValue(n.join(""))}matchedValue(e){return e.groups.strCont?e.groups.value.slice(0,-1):e.groups.value}normalizeValue(e){let r=!1,n=[...e.matchAll($Ma)].map(o=>o.groups?.value?(r=!0,this.unescapeValue(o.groups.value.replace(/\s/g," "))):(r=!1,this.unescapeValue(o.groups.string))).join("");return r?n.trimEnd():n}unescapeValue(e){let r={n:` -`,t:" ",b:"\b"};return e.replace(/\\(.)/g,(n,o)=>r[o]||o)}nameWithSection(e){return this.section?this.section+"."+e:e}parseComment(){YMa.test(this.line)&&(this.line="")}},D0t=class extends Hx{static{a(this,"GitParsingConfigLoader")}async getConfig(e,r){let n=await Em.getRepoConfigLocation(e,r);if(!n)return;let o=await this.getParsedConfig(e,n);if(o)return this.mergeConfig(await this.baseConfig(e,n),o)}mergeConfig(...e){return e.filter(r=>r!==void 0).reduce((r,n)=>r.concat(n),new Fj)}async getParsedConfig(e,r,n=!0){let o=await this.tryLoadConfig(e,r,n);if(!o)return;let s=new Qyr(o),c=new Fj;return s.parse((l,u)=>c.add(l,u)),c}async tryLoadConfig(e,r,n){try{return await e.get(Xn).readFileString(r)}catch(o){(n||!(o instanceof Error)||o.code!=="ENOENT")&&FMa.warn(e,`Failed to load git config from ${JSON.stringify(r)}:`,o);return}}async baseConfig(e,r){let n=await this.commondirConfigUri(e,r),o=Ti(this.xdgConfigUri(),"git","config"),s=Ti(this.homeUri(),".gitconfig");return this.mergeConfig(await this.getParsedConfig(e,o,!1),await this.getParsedConfig(e,s,!1),n?await this.getParsedConfig(e,n,!1):void 0)}async commondirConfigUri(e,r){if(ei(r).toLowerCase()!=="config.worktree")return;let n=Wu(r),o=Ti(n,"commondir");try{let s=(await e.get(Xn).readFileString(o)).trimEnd();return Ti(Oq(n,s),"config")}catch{return}}xdgConfigUri(){return typeof process<"u"&&process.env.XDG_CONFIG_HOME?Lc(process.env.XDG_CONFIG_HOME):Ti(this.homeUri(),".config")}homeUri(){return Lc((0,Tgi.homedir)())}};f();var Rgi=require("child_process");var M0t=class extends Hx{static{a(this,"GitCLIConfigLoader")}runCommand(e,r,n){return new Promise((o,s)=>{(0,Rgi.execFile)(r,n,{cwd:e},(c,l)=>{c?s(c):o(l)})})}async tryRunCommand(e,r,n,o){try{return await this.runCommand(r,n,o)}catch(s){WQr.info(e,`Failed to run command '${n}' in ${r}:`,s);return}}async getConfig(e,r){let n=Eo(r);if(n===void 0)return;let o=await this.tryRunCommand(e,n,"git",["-c","safe.directory=*","config","--list","--null",...this.extraArgs()]);return o?this.extractConfig(o):void 0}extractConfig(e){let r=new Fj;for(let n of e.split("\0").filter(o=>o)){let o=n.split(` -`,1)[0],s=n.slice(o.length+1);r.add(o,s)}return r}extraArgs(){return[]}};function Pgi(t){let e=Cgi(t);return KMa(e),e.set(jd,GWe(e)),e.set(h5,u0t(e)),e.set(Hx,new ZFe([new M0t,new D0t])),e}a(Pgi,"createProductionContext");function KMa(t){t.set(kb,kb.fromEnvironment(!1)),t.set(S5,new N0e),t.set(Cd,new N0t(console))}a(KMa,"setupRudimentaryLogging");var zGf=new Se("context");f();var sHf=new Se("exp");function Ngi(t){let e=t.get(jt);e.registerStaticFilters(ZMa(t)),e.registerDynamicFilter("X-Copilot-OverrideEngine",()=>vr(t,tt.DebugOverrideEngine)||vr(t,tt.DebugOverrideEngineLegacy)),e.registerDynamicFilter("X-VSCode-ExtensionName",()=>TNe()?"copilot-web":t.get(Nr).getEditorPluginInfo().name),e.registerDynamicFilter("X-VSCode-ExtensionVersion",()=>kgi(t)),e.registerDynamicFilter(KX.CopilotRelatedPluginVersionGithubCopilot,()=>kgi(t)),e.registerDynamicFilter("X-VSCode-ExtensionRelease",()=>JMa(t)),e.registerDynamicFilter("X-VSCode-Build",()=>t.get(Nr).getEditorInfo().name),e.registerDynamicFilter("X-VSCode-AppVersion",()=>O0t(t.get(Nr).getEditorInfo().version)),e.registerDynamicFilter("X-VSCode-TargetPopulation",()=>XMa(t)),e.registerDynamicFilterGroup(()=>{let r={};for(let n of t.get(Nr).getRelatedPluginInfo()){let o=UA+n.name.replace(/[^A-Za-z]/g,"").toLowerCase();if(!Object.values(KX).includes(o)){hDe(t,{reason:`A filter could not be registered for the unrecognized related plugin "${n.name}".`});continue}r[o]=O0t(n.version)}return r}),e.registerDynamicFilterGroup(()=>{let r={};for(let n of t.get(Nr).getEditorPluginSpecificFilters()){let o=n.isVersion?O0t(n.value):n.value;r[n.filter]=o}return r})}a(Ngi,"setupExperimentationService");function kgi(t){return O0t(!t.get(Ko).isProduction()&&t.get(Nr).getEditorPluginInfo().name==="copilot"?"1.999.0":t.get(Nr).getEditorPluginInfo().version)}a(kgi,"getEditorPluginVersion");function JMa(t){let e=t.get(Nr).getEditorPluginInfo();return e.name==="copilot-intellij"&&e.version.endsWith("nightly")?"nightly":"stable"}a(JMa,"getPluginRelease");function XMa(t){let e=t.get(Nr).getEditorInfo();return e.name==="vscode"&&e.version.endsWith("-insider")?"insider":"public"}a(XMa,"getTargetPopulation");function ZMa(t){return eOa(t)}a(ZMa,"createAllFilters");function eOa(t){let e=t.get(Ks);return{"X-MSEdge-ClientId":e.machineId,"X-VSCode-DevDeviceId":e.devDeviceId,"X-Copilot-ClientVersion":t.get(Ko).isProduction()?Z_(t):"1.999.0"}}a(eOa,"createDefaultFilters");function O0t(t){return t.split("-")[0]}a(O0t,"trimVersionSuffix");f();var gq=class{static{a(this,"AbstractCopilotMcpSamplingConfigSender")}};f();var L0e=class{static{a(this,"AbstractCopilotMessageSender")}};f();var Xh=class{static{a(this,"AuthenticationService")}};f();var Dgi=100,Mgi=1e3*60*5;function Ogi(t){let e=new qyr(t);t.get(k0).registerContextProvider(e),t.get(BN).add(e.id)}a(Ogi,"registerRelatedFilesShim");var qyr=class{constructor(e){this.ctx=e;this.id="relatedFilesShim";this.selector=["*"];this.traitCache=new LI(Dgi,Mgi);this.relatedFilesCache=new LI(Dgi,Mgi);this.resolver={resolve:a(async(r,n)=>{let o=r.documentContext.uri,s=r.documentContext.languageId;return await this.getTraits(o,s,n)},"resolve")}}static{a(this,"RelatedFilesShim")}async getTraits(e,r,n){return this.traitCache.has(e)||await this.requestRelatedFilesAndTraits(e,r,r,n),this.traitCache.get(e)??[]}async requestRelatedFilesAndTraits(e,r,n,o){try{let s=await this.ctx.get(jt).fetchTokenAndUpdateExPValuesAndAssignments({uri:e,languageId:n}),c={uri:e,clientLanguageId:r,detectedLanguageId:n},l=await gJe(this.ctx,c,s,o,!0);if(o?.isCancellationRequested)return;let u=l.traits.filter(p=>p.includeInPrompt).map(p=>p.promptTextOverride?{name:"OtherInformation",value:p.promptTextOverride}:p),d=new Set;for(let p of l.entries.values())for(let h of p.keys())d.add(h);this.traitCache.set(e,u),this.relatedFilesCache.set(e,Array.from(d))}catch(s){A6(this.ctx,s,"relatedFilesShim")}}};var t1i=de(KW());f();var Bgi=de(Nn());var tOa=new Bgi.ProtocolRequestType("workspace/readFile"),B0t=class extends tm{constructor(r){super();this.ctx=r}static{a(this,"AgentContentProvider")}get connection(){return this.ctx.get(Ar).connection}async readFile(r){return await this.connection.sendRequest(tOa,r)}};f();var L0t=class extends hk{constructor(r){super();this.ctx=r}static{a(this,"AgentLSPRequestSender")}async sendRequest(r,n){let o=this.ctx.get(Ar);try{return await o.connection.sendRequest(r,n)}catch(s){throw _u(this.ctx,"lsp.requestToClient.failure",s,{method:r.method.replaceAll("/",".")}),s}}};f();var F0t=class t extends ZW{constructor(r){super(r);this.reportedUnknownProviders=new Set}static{a(this,"AgentRelatedFilesProvider")}get service(){return this.context.get(Ar)}static mapProviderNameToNeighboringFileType(r){let n="CSharpCopilotCompletionContextProvider",o="CSharpRoslynCompletionRelatedContextProvider",s="CppCopilotCompletionContextProvider",c="CppCopilotCompletionSemanticCodeContextProvider";switch(r){case n:return"related/csharp";case o:return"related/csharproslyn";case s:return"related/cpp";case c:return"related/cppsemanticcodecontext";default:return"related/other"}}convert(r){let n={entries:[],traits:r.traits};for(let o of r.entries){let s={type:t.mapProviderNameToNeighboringFileType(o.providerName),uris:o.uris};n.entries.push(s),s.type==="related/other"&&!this.reportedUnknownProviders.has(o.providerName)&&(this.reportedUnknownProviders.add(o.providerName),xp.warn(this.context,`unknown providerName ${o.providerName}`))}return n}async getRelatedFilesResponse(r,n,o){xp.debug(this.context,`Fetching related files for ${r.uri}`);let s=this.context.get(Fn).getCapabilities().related??!1;if(t.relatedCapabilityTelemetry(this.context,n,s),!s)return xp.debug(this.context,"`copilot/related` not supported"),ZTn;try{let c=await this.service.connection.sendRequest(K2t.type,{textDocument:{uri:r.uri},data:r.data,telemetry:{properties:n.properties,measurements:n.measurements}},o);return this.convert(c)}catch(c){xp.exception(this.context,c,".copilotRelated");return}}static{this.telemetrySent=!1}static relatedCapabilityTelemetry(r,n,o){try{if(!o||t.telemetrySent)return;t.telemetrySent=!0,at(r,"copilotRelated.hasRelatedCapability",n)}catch(s){xp.exception(r,s,"copilotRelated")}}};f();f();f();var Lgi="/.well-known",Gyr=`${Lgi}/oauth-protected-resource`,Fgi=`${Lgi}/oauth-authorization-server`,Ugi=" ";function Qgi(t){return typeof t!="object"||t===null?!1:t.resource!==void 0}a(Qgi,"isAuthorizationProtectedResourceMetadata");function qgi(t){return typeof t!="object"||t===null?!1:t.issuer!==void 0}a(qgi,"isAuthorizationServerMetadata");function U0t(t){let e=t.split(" "),r=e[0],n={};return e.length>1&&e.slice(1).join(" ").split(",").forEach(s=>{let[c,l]=s.split("=").map(u=>u.trim().replace(/"/g,""));n[c]=l}),{scheme:r,params:n}}a(U0t,"parseWWWAuthenticateHeader");function Ggi(t){let e=new URL(t.issuer);return{...t,authorization_endpoint:t.authorization_endpoint??new URL("/authorize",e).toString(),token_endpoint:t.token_endpoint??new URL("/token",e).toString(),registration_endpoint:t.registration_endpoint??new URL("/register",e).toString()}}a(Ggi,"getMetadataWithDefaultValues");function Hgi(t){return{issuer:t.toString(),authorization_endpoint:new URL("/authorize",t).toString(),token_endpoint:new URL("/token",t).toString(),registration_endpoint:new URL("/register",t).toString(),response_types_supported:["code","id_token","id_token token"]}}a(Hgi,"getDefaultMetadataForUrl");function jgi(t){let e=new URL(t);if(!e.pathname.startsWith(Gyr))throw new Error(`Invalid discovery URL: expected path to start with ${Gyr}`);let r=e.pathname.substring(Gyr.length),n=new URL(e.origin);return n.pathname=r||"/",n.toString()}a(jgi,"getResourceServerBaseUrlFromDiscoveryUrl");function $gi(t){return typeof t!="object"||t===null?!1:t.client_id!==void 0}a($gi,"isAuthorizationDynamicClientRegistrationResponse");function Q0t(t){if(typeof t!="object"||t===null)return!1;let e=t;return e.access_token!==void 0&&e.token_type!==void 0}a(Q0t,"isAuthorizationTokenResponse");function Hyr(t){let e=t.split(".");if(e.length!==3)throw new Error("Invalid JWT token format: token must have three parts separated by dots");let[r,n,o]=e;try{if(typeof JSON.parse(H5t(r))!="object")throw new Error("Invalid JWT token format: header is not a JSON object");let c=JSON.parse(H5t(n));if(typeof c!="object")throw new Error("Invalid JWT token format: payload is not a JSON object");return c}catch(s){throw s instanceof Error?new Error(`Failed to parse JWT token: ${s.message}`):new Error("Failed to parse JWT token")}}a(Hyr,"getClaimsFromJWT");var Xgi=de(Nn());f();f();function Vgi(t,e){return(e<<5)-e+t|0}a(Vgi,"numberHash");function Wgi(t,e){e=Vgi(149417,e);for(let r=0,n=t.length;rnew d2(o,d2.providerId,s,void 0));if(n.status!=="OK"&&n.status!=="MaybeOK")throw new _s(ct.CodeFlowFailed,`Authentication failed: ${n.status}`)}catch(e){throw e instanceof hL?new _s(ct.CodeFlowFailed,`OAuth code flow requires a browser but none is available: ${e.message}`):e instanceof $i?new _s(ct.CodeFlowFailed,`Authentication failed: ${e.message}`):e}}a(Nft,"performACPGitHubOAuth");function Mft(t){if(t!=="github_oauth")throw new _s(ct.InvalidParams,`Unknown authentication method: ${t}`)}a(Mft,"validateAuthMethodId");async function Oft(t){let r=await t.get(en).checkAndUpdateStatus({localChecksOnly:!0});if(r.status!=="OK"&&r.status!=="MaybeOK")throw _s.authRequired()}a(Oft,"requireACPAuthenticated");var AAi=[{id:yc.Ask.id,name:yc.Ask.name,description:yc.Ask.description},{id:yc.Agent.id,name:yc.Agent.name,description:yc.Agent.description}],Bft=class{constructor(e,r){this.connection=e;this.ctx=r;this.sessions=new Map;this.clientCapabilities={readTextFile:!1,writeTextFile:!1}}static{a(this,"CopilotACPAgent")}initialize(e){if(e.clientInfo){let o=this.ctx.get(Dr);o instanceof NF&&o.setEditorAndPluginInfo({name:e.clientInfo.name,version:e.clientInfo.version},{name:e.clientInfo.name,version:e.clientInfo.version})}rr(this.ctx,"acp.initialize");let r=e.clientCapabilities?.fs;r&&(this.clientCapabilities={readTextFile:r.readTextFile??!1,writeTextFile:r.writeTextFile??!1});let n=[{id:"github_oauth",name:"Sign in with GitHub",description:"Authenticate using GitHub OAuth (opens browser)"}];return Promise.resolve({protocolVersion:gHe,agentCapabilities:{loadSession:!1,promptCapabilities:{audio:!1,embeddedContext:!0,image:!1}},agentInfo:{name:"GitHub Copilot",version:qC(this.ctx)},authMethods:n})}async newSession(e){rr(this.ctx,"acp.newSession"),await this.requireAuthenticated();let r=yr(),n=yr(),s=this.ctx.get(lo).create({source:"panel",conversationId:n}),c=e.cwd?{uri:kc(e.cwd)}:null,l=this.getAvailableModes(),u=this.getDefaultModeId(),{availableModels:d,defaultModelId:p}=await this.getAvailableModels(),h=p;return this.sessions.set(r,{conversationId:n,conversation:s,pendingPrompt:null,cancellationTokenSource:null,workspaceFolder:c,currentModeId:u,currentModelId:h}),{sessionId:r,modes:{currentModeId:u,availableModes:l},models:{currentModelId:h,availableModels:d}}}async authenticate(e){return rr(this.ctx,"acp.authenticate"),Mft(e.methodId),await Nft(this.ctx),{}}async requireAuthenticated(){await Oft(this.ctx)}async prompt(e){rr(this.ctx,"acp.prompt"),await this.requireAuthenticated();let r=this.sessions.get(e.sessionId);if(!r)throw new Error(`Session ${e.sessionId} not found`);let n=process.env.GITHUB_COPILOT_ACP_MODEL_ID??r.currentModelId;r.pendingPrompt?.abort(),r.cancellationTokenSource?.cancel(),r.pendingPrompt=new AbortController,r.cancellationTokenSource=new Cn.CancellationTokenSource,r.pendingPrompt.signal.addEventListener("abort",()=>{r.cancellationTokenSource?.cancel()});try{let s={message:this.extractTextFromPrompt(e.prompt),type:"user"},c=yr(),l=new Td(s,c),u=r.currentModeId===yc.Ask.id?yc.Ask:yc.Agent;l.chatMode=u,l.userRequestedModel=n;let d=this.extractReferencesFromPrompt(e.prompt),p=this.ctx.get(lo),h=r.workspaceFolder?[{uri:r.workspaceFolder.uri,name:""}]:void 0;await p.addTurn(r.conversation.id,l,d,void 0,r.workspaceFolder??void 0,h);let m=new Dft(this.connection,e.sessionId),g=new LT(this.ctx,r.conversation,l,r.cancellationTokenSource.token),A=this.ctx.get(XA);A instanceof GQ&&A.setACPContext(this.connection,this.clientCapabilities,e.sessionId);let E=await this.ctx.get(c2).createProcessor(g,e.sessionId);try{await E.process(m,r.cancellationTokenSource.token,void 0,void 0,n)}finally{A instanceof GQ&&A.clearACPContext()}return r.pendingPrompt=null,r.cancellationTokenSource=null,{stopReason:"end_turn"}}catch(o){let s=this.ctx.get(XA);if(s instanceof GQ&&s.clearACPContext(),r.pendingPrompt?.signal.aborted)return{stopReason:"cancelled"};throw o}}cancel(e){rr(this.ctx,"acp.cancel");let r=this.sessions.get(e.sessionId);return r?.pendingPrompt?.abort(),r?.cancellationTokenSource?.cancel(),Promise.resolve()}async setSessionMode(e){rr(this.ctx,"acp.setSessionMode");let r=this.sessions.get(e.sessionId);if(!r)throw new _s(ct.InvalidParams,`Session ${e.sessionId} not found`);let n=this.getAvailableModes();if(!n.some(s=>s.id===e.modeId))throw new _s(ct.InvalidParams,`Mode '${e.modeId}' is not available. Available modes: ${n.map(s=>s.id).join(", ")}`);return r.currentModeId=e.modeId,Promise.resolve({})}async unstable_setSessionModel(e){rr(this.ctx,"acp.setSessionModel");let r=this.sessions.get(e.sessionId);if(!r)throw new _s(ct.InvalidParams,`Session ${e.sessionId} not found`);let{availableModels:n}=await this.getAvailableModels();if(!n.some(s=>s.modelId===e.modelId))throw new _s(ct.InvalidParams,`Model '${e.modelId}' is not available. Available models: ${n.map(s=>s.modelId).join(", ")}`);return r.currentModelId=e.modelId,{}}isAgentModeEnabled(){return j3(this.ctx)?.getTokenValue("agent_mode")!=="0"}getAvailableModes(){return this.isAgentModeEnabled()?AAi:AAi.filter(e=>e.id===yc.Ask.id)}getDefaultModeId(){return this.isAgentModeEnabled()?yc.Agent.id:yc.Ask.id}async getAvailableModels(){let e=await this.ctx.get(tl).getMetadata(),r=[],n=YM;r.push({modelId:YM,name:"Auto",description:"Automatically selects the best model for the task"});for(let o of e)o.model_picker_enabled&&o.capabilities.type==="chat"&&this.isModelCompatibleWithAgentMode(o)&&r.push({modelId:o.id,name:o.name,description:this.getModelDescription(o)});return{availableModels:r,defaultModelId:n}}isModelCompatibleWithAgentMode(e){return!(Nte.has(e.capabilities.family)||!e.capabilities.supports?.tool_calls||(e.capabilities.limits?.max_prompt_tokens??0)<4e4)}getModelDescription(e){let r=e.billing?.multiplier;if(r!==void 0)return`${r}x`}extractTextFromPrompt(e){return e.filter(r=>r.type==="text").map(r=>r.text).join(` +`)}extractReferencesFromPrompt(e){let r=[];for(let n of e)if(n.type==="resource_link"){let o=n;r.push({type:"file",uri:o.uri})}else if(n.type==="resource"){let o=n;o.resource?.uri&&r.push({type:"file",uri:o.resource.uri})}return r}getFileSystemCapabilities(){return this.clientCapabilities}getConnection(){return this.connection}};f();var yAi=require("node:child_process"),Fft=require("node:stream");var Lft=class{constructor(e,r){this.cliInfo=e;this.ctx=r;this.cliProcess=null;this._cliConnection=null;this.disposed=!1}static{a(this,"CLIProcessManager")}start(e,r){if(this.disposed)throw new Error("CLIProcessManager has been disposed");if(this.cliProcess)throw new Error("CLI process is already running");let n={...process.env};r&&(n.GH_TOKEN=r);let o=[...this.cliInfo.args,"--acp","--stdio","--yolo"];if(this.cliProcess=(0,yAi.spawn)(this.cliInfo.path,o,{stdio:["pipe","pipe","inherit"],env:n,shell:ewt}),!this.cliProcess.stdin||!this.cliProcess.stdout)throw new Error("Failed to start Copilot CLI process with piped stdio");this.cliProcess.on("error",u=>{Sa(this.ctx,"acp.cli.process.error",u)}),this.cliProcess.on("exit",(u,d)=>{this.disposed||rr(this.ctx,"acp.cli.process.exit",{exitCode:String(u??""),exitSignal:d??""}),this.cliProcess=null});let s=Fft.Writable.toWeb(this.cliProcess.stdin),c=Fft.Readable.toWeb(this.cliProcess.stdout),l=hCe(s,c);return this._cliConnection=new gje(e,l),this._cliConnection}get connection(){return this._cliConnection}get isRunning(){return this.cliProcess!==null&&this.cliProcess.exitCode===null}async kill(){await this.terminateProcess()}async dispose(){this.disposed=!0,await this.terminateProcess()}async terminateProcess(){if(this.cliProcess){try{this.cliProcess.stdin?.end(),this.cliProcess.kill("SIGTERM")}catch{}await new Promise(e=>{if(!this.cliProcess){e();return}let r=setTimeout(()=>{this.cliProcess?.kill("SIGKILL"),e()},3e3);this.cliProcess.once("exit",()=>{clearTimeout(r),e()})}),this.cliProcess=null}this._cliConnection=null}};f();var Uft=class{constructor(e,r,n){this.externalConnection=e;this.ctx=r;this.cliProcessManager=n;this.cliConnection=null;this.initParams=null;this.ensureCLIPromise=null}static{a(this,"CLIProxyAgent")}initialize(e){if(e.clientInfo){let r=this.ctx.get(Dr);r instanceof NF&&r.setEditorAndPluginInfo({name:e.clientInfo.name,version:e.clientInfo.version},{name:e.clientInfo.name,version:e.clientInfo.version})}return rr(this.ctx,"acp.cli.initialize"),this.initParams=e,Promise.resolve({protocolVersion:gHe,agentCapabilities:{loadSession:!0,sessionCapabilities:{list:{}},promptCapabilities:{audio:!1,embeddedContext:!0,image:!0}},agentInfo:{name:"GitHub Copilot",version:qC(this.ctx)},authMethods:[{id:"github_oauth",name:"Sign in with GitHub",description:"Authenticate using GitHub OAuth (opens browser)"}]})}async authenticate(e){return rr(this.ctx,"acp.cli.authenticate"),Mft(e.methodId),await Nft(this.ctx),{}}async newSession(e){return rr(this.ctx,"acp.cli.newSession"),await this.requireAuthenticated(),(await this.ensureCLI()).newSession(e)}async prompt(e){return rr(this.ctx,"acp.cli.prompt"),await this.requireAuthenticated(),(await this.ensureCLI()).prompt(e)}async cancel(e){return rr(this.ctx,"acp.cli.cancel"),(await this.ensureCLI()).cancel(e)}async setSessionMode(e){return rr(this.ctx,"acp.cli.setSessionMode"),(await this.ensureCLI()).setSessionMode(e)}async unstable_setSessionModel(e){return rr(this.ctx,"acp.cli.setSessionModel"),(await this.ensureCLI()).unstable_setSessionModel(e)}async setSessionConfigOption(e){return rr(this.ctx,"acp.cli.setSessionConfigOption"),(await this.ensureCLI()).setSessionConfigOption(e)}async loadSession(e){return rr(this.ctx,"acp.cli.loadSession"),await this.requireAuthenticated(),(await this.ensureCLI()).loadSession(e)}async listSessions(e){return rr(this.ctx,"acp.cli.listSessions"),await this.requireAuthenticated(),(await this.ensureCLI()).listSessions(e)}async ensureCLI(){if(this.cliConnection)return this.cliConnection;if(!this.initParams)throw new _s(ct.InternalError,"CLI connection not initialized. Call initialize() first.");if(this.ensureCLIPromise)return this.ensureCLIPromise;this.ensureCLIPromise=this.spawnAndInitializeCLI();try{return await this.ensureCLIPromise}finally{this.ensureCLIPromise=null}}async spawnAndInitializeCLI(){try{let r=(await this.ctx.get(Nt).getGitHubSession())?.accessToken;this.cliConnection=this.cliProcessManager.start(s=>this.createCLIClientHandler(),r);let n=this.cliConnection.initialize({protocolVersion:this.initParams.protocolVersion,clientCapabilities:this.initParams.clientCapabilities,clientInfo:{name:"GitHub Copilot Language Server",version:qC(this.ctx),_meta:{upstreamClientInfo:this.initParams.clientInfo??null}}}),o=this.cliConnection.closed.then(()=>{throw new Error("CLI connection closed before initialize response was received")});o.catch(()=>{}),await Promise.race([n,o]),rr(this.ctx,"acp.cli.handshake",{cliVersion:this.cliProcessManager.cliInfo.version,cliSource:this.cliProcessManager.cliInfo.source})}catch(e){throw Sa(this.ctx,"acp.cli.handshake.error",e,{cliVersion:this.cliProcessManager.cliInfo.version,cliSource:this.cliProcessManager.cliInfo.source}),this.cliConnection=null,await this.cliProcessManager.kill(),new _s(ct.InternalError,`Failed to initialize Copilot CLI: ${e instanceof Error?e.message:String(e)}`)}return this.cliConnection}async requireAuthenticated(){await Oft(this.ctx)}createCLIClientHandler(){return{sessionUpdate:a(async e=>{await this.externalConnection.sessionUpdate(e)},"sessionUpdate"),requestPermission:a(async e=>this.externalConnection.requestPermission(e),"requestPermission"),readTextFile:a(async e=>this.externalConnection.readTextFile(e),"readTextFile"),writeTextFile:a(async e=>this.externalConnection.writeTextFile(e),"writeTextFile"),createTerminal:a(async e=>({terminalId:(await this.externalConnection.createTerminal(e)).id}),"createTerminal"),extMethod:a(async(e,r)=>this.externalConnection.extMethod(e,r),"extMethod"),extNotification:a(async(e,r)=>this.externalConnection.extNotification(e,r),"extNotification")}}async dispose(){await this.cliProcessManager.dispose()}};f();f();f();function EAi(t){let e=new Wre;return e.set(Mc,t),e.set(fP,new fP),e.set(Vo,new Vo),e.set(Sw,new Sw),e.set(Nt,new Nt(e)),e.set(Gt,new Gt(e)),e.set(x2,new x2),e.set(pd,new pd(e)),e.set(X0,new X0),e.set(xE,new xE),e.set(WP,new Dye),e.set(Cx,new Gte),e.set(ax,new hme),e.set(cu,new cu),e.set(b5,new b5(e)),e.set(In,new In(e)),e.set(Dw,new Dw(e)),e.set(EO,$Ke(e)),e.set(Mm,new Mm),e.set(k_,new k_),e.set(_O,_O.default),e.set(lm,new lm(e)),e.set(sT,new sT(e)),e.set(Oc,new Oc),e.set(P_,new P_(e)),e.set(Fn,new Fn),e.set(ST,new ST(e)),e.set(Ow,new Ow),e.set(gj,new gj(e)),e}a(EAi,"createCommonContext");f();var Qft=class extends fd{constructor(r){super();this.console=r}static{a(this,"ConsoleLog")}logIt(r,n,o,...s){n==1?this.console.error(`[${o}]`,...s):(n==2||Rut(r))&&this.console.warn(`[${o}]`,...s)}};f();var bAi=require("node:os");var qOa=new Se("repository"),TJ="\\\\",TAi="(?:[#;].*)",Kfe=`(?:[^"${TJ}]|${TJ}.)`,GOa="[0-9A-Za-z-]",_Ai=`[A-Za-z]${GOa}*`,SAi=`\\s*${TAi}?$`,IAi=`(?:[^"${TJ};#]|${TJ}.)`,HOa=`(?:"${Kfe}*"|"${Kfe}*(?${TJ})$)`,jOa=`(?:${IAi}|${HOa})+`,$Oa=`(?:(?${TJ})$)`,xAi=`(?${jOa})${$Oa}?${SAi}`,CAi=new RegExp(`^${xAi}`),VOa=new RegExp(`^(?${Kfe}*(?:(?${TJ})$|(?")))`),WOa=new RegExp(`^\\s*(?:(?${_Ai})\\s*=\\s*${xAi}|(?${_Ai})${SAi})`),zOa=new RegExp(`(?${IAi}+)|"(?${Kfe}*)"`,"g"),vAi="[-.0-9A-Za-z]+",YOa=`\\s+"(?${Kfe}*)"`,KOa=`\\s+"(?${Kfe}*)"`,JOa=new RegExp(`^\\s*\\[(?:(?${vAi})${YOa}|${KOa}|(?${vAi}))\\]`),XOa=new RegExp(`^\\s*${TAi}$`),sEr=class{constructor(e){this.content=e;this.stopped=!1;this.section="";this.line="";this.lineNum=0;this.lines=[];this.linesWithErrors=[]}static{a(this,"GitConfigParser")}parse(e){for(this.stopped=!1,this.section="",this.line="",this.linesWithErrors=[],this.configValueHandler=e,this.lines=this.content.split(/\r?\n/),this.lineNum=0;!this.stopped&&this.lineNum0}errorAt(e){this.linesWithErrors.push(e)}parseSectionStart(){let e=this.line.match(JOa);e&&(e.groups?.simple?this.section=e.groups.simple.toLowerCase()+"."+this.unescapeBaseValue(e.groups.ext):e.groups?.extOnly?this.section="."+this.unescapeBaseValue(e.groups.extOnly):this.section=e.groups.simpleOnly.toLowerCase(),this.line=this.line.slice(e[0].length))}unescapeBaseValue(e){return e.replace(/\\(.)/g,"$1")}parseConfigPair(){let e=this.line.match(WOa);if(e){if(e.groups?.key){let r=this.handleContinued(e);this.configValueHandler?.(this.nameWithSection(e.groups.key.toLowerCase()),r)}else e.groups?.soloKey&&this.configValueHandler?.(this.nameWithSection(e.groups.soloKey.toLowerCase()),"");this.line=""}}handleContinued(e){let r=e,n=[this.matchedValue(r)];for(;r?.groups?.cont||r?.groups?.strCont;){if(this.line=this.lines[++this.lineNum],this.lineNum>=this.lines.length){this.errorAt(this.lineNum);break}r.groups.strCont?(r=this.line.match(VOa),r?(n.push(this.matchedValue(r)),r.groups?.quote&&(r=this.line.slice(r[0].length).match(CAi),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))):this.errorAt(this.lineNum+1)):(r=this.line.match(CAi),r?n.push(this.matchedValue(r)):this.errorAt(this.lineNum+1))}return this.normalizeValue(n.join(""))}matchedValue(e){return e.groups.strCont?e.groups.value.slice(0,-1):e.groups.value}normalizeValue(e){let r=!1,n=[...e.matchAll(zOa)].map(o=>o.groups?.value?(r=!0,this.unescapeValue(o.groups.value.replace(/\s/g," "))):(r=!1,this.unescapeValue(o.groups.string))).join("");return r?n.trimEnd():n}unescapeValue(e){let r={n:` +`,t:" ",b:"\b"};return e.replace(/\\(.)/g,(n,o)=>r[o]||o)}nameWithSection(e){return this.section?this.section+"."+e:e}parseComment(){XOa.test(this.line)&&(this.line="")}},qft=class extends Dx{static{a(this,"GitParsingConfigLoader")}async getConfig(e,r){let n=await lm.getRepoConfigLocation(e,r);if(!n)return;let o=await this.getParsedConfig(e,n);if(o)return this.mergeConfig(await this.baseConfig(e,n),o)}mergeConfig(...e){return e.filter(r=>r!==void 0).reduce((r,n)=>r.concat(n),new $H)}async getParsedConfig(e,r,n=!0){let o=await this.tryLoadConfig(e,r,n);if(!o)return;let s=new sEr(o),c=new $H;return s.parse((l,u)=>c.add(l,u)),c}async tryLoadConfig(e,r,n){try{return await e.get(Jn).readFileString(r)}catch(o){(n||!(o instanceof Error)||o.code!=="ENOENT")&&qOa.warn(e,`Failed to load git config from ${JSON.stringify(r)}:`,o);return}}async baseConfig(e,r){let n=await this.commondirConfigUri(e,r),o=bi(this.xdgConfigUri(),"git","config"),s=bi(this.homeUri(),".gitconfig");return this.mergeConfig(await this.getParsedConfig(e,o,!1),await this.getParsedConfig(e,s,!1),n?await this.getParsedConfig(e,n,!1):void 0)}async commondirConfigUri(e,r){if(Zn(r).toLowerCase()!=="config.worktree")return;let n=Lu(r),o=bi(n,"commondir");try{let s=(await e.get(Jn).readFileString(o)).trimEnd();return bi(cq(n,s),"config")}catch{return}}xdgConfigUri(){return typeof process<"u"&&process.env.XDG_CONFIG_HOME?kc(process.env.XDG_CONFIG_HOME):bi(this.homeUri(),".config")}homeUri(){return kc((0,bAi.homedir)())}};f();var wAi=require("child_process");var Gft=class extends Dx{static{a(this,"GitCLIConfigLoader")}runCommand(e,r,n){return new Promise((o,s)=>{(0,wAi.execFile)(r,n,{cwd:e},(c,l)=>{c?s(c):o(l)})})}async tryRunCommand(e,r,n,o){try{return await this.runCommand(r,n,o)}catch(s){Vqr.info(e,`Failed to run command '${n}' in ${r}:`,s);return}}async getConfig(e,r){let n=mo(r);if(n===void 0)return;let o=await this.tryRunCommand(e,n,"git",["-c","safe.directory=*","config","--list","--null",...this.extraArgs()]);return o?this.extractConfig(o):void 0}extractConfig(e){let r=new $H;for(let n of e.split("\0").filter(o=>o)){let o=n.split(` +`,1)[0],s=n.slice(o.length+1);r.add(o,s)}return r}extraArgs(){return[]}};function RAi(t){let e=EAi(t);return ZOa(e),e.set(Od,KVe(e)),e.set(rN,yft(e)),e.set(Dx,new aFe([new Gft,new qft])),e}a(RAi,"createProductionContext");function ZOa(t){t.set(yb,yb.fromEnvironment(!1)),t.set(pN,new Vfe),t.set(fd,new Qft(console))}a(ZOa,"setupRudimentaryLogging");var m$f=new Se("context");f();var x$f=new Se("exp");function kAi(t){let e=t.get(Gt);e.registerStaticFilters(rBa(t)),e.registerDynamicFilter("X-Copilot-OverrideEngine",()=>vr(t,tt.DebugOverrideEngine)||vr(t,tt.DebugOverrideEngineLegacy)),e.registerDynamicFilter("X-VSCode-ExtensionName",()=>Cke()?"copilot-web":t.get(Dr).getEditorPluginInfo().name),e.registerDynamicFilter("X-VSCode-ExtensionVersion",()=>PAi(t)),e.registerDynamicFilter(nX.CopilotRelatedPluginVersionGithubCopilot,()=>PAi(t)),e.registerDynamicFilter("X-VSCode-ExtensionRelease",()=>eBa(t)),e.registerDynamicFilter("X-VSCode-Build",()=>t.get(Dr).getEditorInfo().name),e.registerDynamicFilter("X-VSCode-AppVersion",()=>Hft(t.get(Dr).getEditorInfo().version)),e.registerDynamicFilter("X-VSCode-TargetPopulation",()=>tBa(t)),e.registerDynamicFilterGroup(()=>{let r={};for(let n of t.get(Dr).getRelatedPluginInfo()){let o=kA+n.name.replace(/[^A-Za-z]/g,"").toLowerCase();if(!Object.values(nX).includes(o)){d5e(t,{reason:`A filter could not be registered for the unrecognized related plugin "${n.name}".`});continue}r[o]=Hft(n.version)}return r}),e.registerDynamicFilterGroup(()=>{let r={};for(let n of t.get(Dr).getEditorPluginSpecificFilters()){let o=n.isVersion?Hft(n.value):n.value;r[n.filter]=o}return r})}a(kAi,"setupExperimentationService");function PAi(t){return Hft(!t.get(Vo).isProduction()&&t.get(Dr).getEditorPluginInfo().name==="copilot"?"1.999.0":t.get(Dr).getEditorPluginInfo().version)}a(PAi,"getEditorPluginVersion");function eBa(t){let e=t.get(Dr).getEditorPluginInfo();return e.name==="copilot-intellij"&&e.version.endsWith("nightly")?"nightly":"stable"}a(eBa,"getPluginRelease");function tBa(t){let e=t.get(Dr).getEditorInfo();return e.name==="vscode"&&e.version.endsWith("-insider")?"insider":"public"}a(tBa,"getTargetPopulation");function rBa(t){return nBa(t)}a(rBa,"createAllFilters");function nBa(t){let e=t.get(Vs);return{"X-MSEdge-ClientId":e.machineId,"X-VSCode-DevDeviceId":e.devDeviceId,"X-Copilot-ClientVersion":t.get(Vo).isProduction()?qC(t):"1.999.0"}}a(nBa,"createDefaultFilters");function Hft(t){return t.split("-")[0]}a(Hft,"trimVersionSuffix");f();var HQ=class{static{a(this,"AbstractCopilotMcpSamplingConfigSender")}};f();var Jfe=class{static{a(this,"AbstractCopilotMessageSender")}};f();var $h=class{static{a(this,"AuthenticationService")}};f();var DAi=100,NAi=1e3*60*5;function MAi(t){let e=new aEr(t);t.get(I0).registerContextProvider(e),t.get(T5).add(e.id)}a(MAi,"registerRelatedFilesShim");var aEr=class{constructor(e){this.ctx=e;this.id="relatedFilesShim";this.selector=["*"];this.traitCache=new SI(DAi,NAi);this.relatedFilesCache=new SI(DAi,NAi);this.resolver={resolve:a(async(r,n)=>{let o=r.documentContext.uri,s=r.documentContext.languageId;return await this.getTraits(o,s,n)},"resolve")}}static{a(this,"RelatedFilesShim")}async getTraits(e,r,n){return this.traitCache.has(e)||await this.requestRelatedFilesAndTraits(e,r,r,n),this.traitCache.get(e)??[]}async requestRelatedFilesAndTraits(e,r,n,o){try{let s=await this.ctx.get(Gt).fetchTokenAndUpdateExPValuesAndAssignments({uri:e,languageId:n}),c={uri:e,clientLanguageId:r,detectedLanguageId:n},l=await TKe(this.ctx,c,s,o,!0);if(o?.isCancellationRequested)return;let u=l.traits.filter(p=>p.includeInPrompt).map(p=>p.promptTextOverride?{name:"OtherInformation",value:p.promptTextOverride}:p),d=new Set;for(let p of l.entries.values())for(let h of p.keys())d.add(h);this.traitCache.set(e,u),this.relatedFilesCache.set(e,Array.from(d))}catch(s){j8(this.ctx,s,"relatedFilesShim")}}};var tvi=de(nW());f();var OAi=de(Dn());var iBa=new OAi.ProtocolRequestType("workspace/readFile"),jft=class extends zh{constructor(r){super();this.ctx=r}static{a(this,"AgentContentProvider")}get connection(){return this.ctx.get(Ar).connection}async readFile(r){return await this.connection.sendRequest(iBa,r)}};f();var $ft=class extends rk{constructor(r){super();this.ctx=r}static{a(this,"AgentLSPRequestSender")}async sendRequest(r,n){let o=this.ctx.get(Ar);try{return await o.connection.sendRequest(r,n)}catch(s){throw Sa(this.ctx,"lsp.requestToClient.failure",s,{method:r.method.replaceAll("/",".")}),s}}};f();var Vft=class t extends sW{constructor(r){super(r);this.reportedUnknownProviders=new Set}static{a(this,"AgentRelatedFilesProvider")}get service(){return this.context.get(Ar)}static mapProviderNameToNeighboringFileType(r){let n="CSharpCopilotCompletionContextProvider",o="CSharpRoslynCompletionRelatedContextProvider",s="CppCopilotCompletionContextProvider",c="CppCopilotCompletionSemanticCodeContextProvider";switch(r){case n:return"related/csharp";case o:return"related/csharproslyn";case s:return"related/cpp";case c:return"related/cppsemanticcodecontext";default:return"related/other"}}convert(r){let n={entries:[],traits:r.traits};for(let o of r.entries){let s={type:t.mapProviderNameToNeighboringFileType(o.providerName),uris:o.uris};n.entries.push(s),s.type==="related/other"&&!this.reportedUnknownProviders.has(o.providerName)&&(this.reportedUnknownProviders.add(o.providerName),Cp.warn(this.context,`unknown providerName ${o.providerName}`))}return n}async getRelatedFilesResponse(r,n,o){Cp.debug(this.context,`Fetching related files for ${r.uri}`);let s=this.context.get(Fn).getCapabilities().related??!1;if(t.relatedCapabilityTelemetry(this.context,n,s),!s)return Cp.debug(this.context,"`copilot/related` not supported"),XSn;try{let c=await this.service.connection.sendRequest(gPt.type,{textDocument:{uri:r.uri},data:r.data,telemetry:{properties:n.properties,measurements:n.measurements}},o);return this.convert(c)}catch(c){Cp.exception(this.context,c,".copilotRelated");return}}static{this.telemetrySent=!1}static relatedCapabilityTelemetry(r,n,o){try{if(!o||t.telemetrySent)return;t.telemetrySent=!0,st(r,"copilotRelated.hasRelatedCapability",n)}catch(s){Cp.exception(r,s,"copilotRelated")}}};f();f();f();var BAi="/.well-known",cEr=`${BAi}/oauth-protected-resource`,LAi=`${BAi}/oauth-authorization-server`,FAi=" ";function UAi(t){return typeof t!="object"||t===null?!1:t.resource!==void 0}a(UAi,"isAuthorizationProtectedResourceMetadata");function QAi(t){return typeof t!="object"||t===null?!1:t.issuer!==void 0}a(QAi,"isAuthorizationServerMetadata");function Wft(t){let e=t.split(" "),r=e[0],n={};return e.length>1&&e.slice(1).join(" ").split(",").forEach(s=>{let[c,l]=s.split("=").map(u=>u.trim().replace(/"/g,""));n[c]=l}),{scheme:r,params:n}}a(Wft,"parseWWWAuthenticateHeader");function qAi(t){let e=new URL(t.issuer);return{...t,authorization_endpoint:t.authorization_endpoint??new URL("/authorize",e).toString(),token_endpoint:t.token_endpoint??new URL("/token",e).toString(),registration_endpoint:t.registration_endpoint??new URL("/register",e).toString()}}a(qAi,"getMetadataWithDefaultValues");function GAi(t){return{issuer:t.toString(),authorization_endpoint:new URL("/authorize",t).toString(),token_endpoint:new URL("/token",t).toString(),registration_endpoint:new URL("/register",t).toString(),response_types_supported:["code","id_token","id_token token"]}}a(GAi,"getDefaultMetadataForUrl");function HAi(t){let e=new URL(t);if(!e.pathname.startsWith(cEr))throw new Error(`Invalid discovery URL: expected path to start with ${cEr}`);let r=e.pathname.substring(cEr.length),n=new URL(e.origin);return n.pathname=r||"/",n.toString()}a(HAi,"getResourceServerBaseUrlFromDiscoveryUrl");function jAi(t){return typeof t!="object"||t===null?!1:t.client_id!==void 0}a(jAi,"isAuthorizationDynamicClientRegistrationResponse");function zft(t){if(typeof t!="object"||t===null)return!1;let e=t;return e.access_token!==void 0&&e.token_type!==void 0}a(zft,"isAuthorizationTokenResponse");function lEr(t){let e=t.split(".");if(e.length!==3)throw new Error("Invalid JWT token format: token must have three parts separated by dots");let[r,n,o]=e;try{if(typeof JSON.parse(lMt(r))!="object")throw new Error("Invalid JWT token format: header is not a JSON object");let c=JSON.parse(lMt(n));if(typeof c!="object")throw new Error("Invalid JWT token format: payload is not a JSON object");return c}catch(s){throw s instanceof Error?new Error(`Failed to parse JWT token: ${s.message}`):new Error("Failed to parse JWT token")}}a(lEr,"getClaimsFromJWT");var JAi=de(Dn());f();f();function $Ai(t,e){return(e<<5)-e+t|0}a($Ai,"numberHash");function VAi(t,e){e=$Ai(149417,e);for(let r=0,n=t.length;r{this.initialize()})}static{a(this,"StateDatabase")}get isClosed(){return this.state===3}get canPersist(){return this.persistenceEnabled&&!this.initializationFailed&&!this.isClosed}get canPerformDatabaseOperation(){return this.persistenceEnabled&&!this.initializationFailed}get onDidChange(){return this.changeEmitter.event}get initialized(){return this.state===2&&this.persistenceEnabled&&!this.initializationFailed&&this.database!==void 0}get size(){return this.cache.size}has(e){return this.cache.has(e)}clear(){if(this.isClosed)return;let e=this.getAllKeys();for(let r of e)this.delete(r)}getAllKeys(){return[...this.cache.keys()]}get(e){return this.cache.get(e)}set(e,r){if(this.isClosed)return;let n=fen(r)||Array.isArray(r)?JSON.stringify(r):String(r);this.cache.get(e)!==n&&(this.cache.set(e,n),this.changeEmitter.fire({key:e,value:n}),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this.scheduleFlush())}delete(e){this.isClosed||!this.cache.delete(e)||(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this.changeEmitter.fire({key:e,value:void 0}),this.scheduleFlush())}initialize(){if(this.state!==0)return;let e=this.ctx.get(Fn).getCapabilities().stateDatabase??!1;if(this.state=1,this.persistenceEnabled=e,!e){this.state=2,this.initializationFailed=!1,this.database=void 0;return}this.initializationTask||(this.initializationTask=this.initializeWithTimeout().catch(r=>{this.handleInitializationError("Failed to initialize state database",r)})),this.state=2}handleInitializationError(e,r){this.initializationFailed=!0,this.state=0,F0e.error(this.ctx,e,r)}async waitForInitialization(){await this.initializationTask?.catch(()=>{})}async dispose(){this.state=3,this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0);try{await this.forceFlush()}catch(e){F0e.error(this.ctx,"Failed to flush data before closing",e)}await this.waitForInitialization(),await this.writeQueue.catch(()=>{}),this.database&&(this.close(this.database),this.database=void 0),this.persistenceEnabled=!1}async forceFlush(){if(!this.canPersist)return;this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),await this.flushPendingChanges()&&await this.writeQueue}async initializeWithTimeout(){await Promise.race([this.initializeInternal(),(0,Jgi.setTimeout)(iOa).then(()=>{throw new Error("State database initialization timed out")})])}async initializeInternal(){let e;try{e=await this.resolveDatabasePath()}catch(o){this.handleInitializationError("State database disabled - unable to resolve storage path",o);return}let r;try{r=new Ygi.default.DatabaseSync(e,{open:!0})}catch(o){this.handleInitializationError("Failed to open state database file",o);return}this.database=r,r.exec(` - ${oOa}; - ${sOa}; - ${aOa}; - ${cOa}; - ${lOa}; - `);let n=this.all(r,dOa,[]);for(let o of n)try{let s=JSON.parse(o.value);s!==void 0?this.cache.set(o.key,s):F0e.warn(this.ctx,`Skipping corrupted state value for key '${o.key}' - parsed to undefined`)}catch(s){F0e.warn(this.ctx,`Failed to parse state value for key '${o.key}'`,s)}}async resolveDatabasePath(){let r=this.ctx.get(Si).directory;await zgi.mkdir(r,{recursive:!0,mode:448});let n=this.getSanitizedDatabaseName();return Kgi.default.join(r,`${n}.db`)}getSanitizedDatabaseName(){return this.ctx.get(Nr).getEditorPluginInfo().name.replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_")||nOa}scheduleFlush(){if(this.isClosed||this.flushTimer)return;let e=rOa;this.flushTimer=setTimeout(()=>{this.flushTimer=void 0,this.flushPendingChanges()},e),typeof this.flushTimer.unref=="function"&&this.flushTimer.unref()}enqueue(e){return this.writeQueue=this.writeQueue.then(e).catch(r=>{F0e.error(this.ctx,"State database write failed",r)}),this.writeQueue}async flushPendingChanges(){let e=new Map(this.pendingInserts.entries()),r=new Set(this.pendingDeletes.values());return this.pendingInserts.clear(),this.pendingDeletes.clear(),!e.size&&!r.size?!1:(await this.enqueue(()=>this.persistWrites(e,r)),!0)}async persistWrites(e,r){if(!e.size&&!r.size)return;let n=await this.awaitDatabase();if(!n){for(let[o,s]of e)this.pendingInserts.set(o,s);for(let o of r)this.pendingDeletes.add(o);return}this.run(n,"BEGIN IMMEDIATE",[]);try{for(let o of r)this.run(n,"DELETE FROM state WHERE key = ?",[o]);for(let[o,s]of e){let c;try{c=JSON.stringify(s)}catch(l){F0e.warn(this.ctx,`Failed to serialize state value for key '${o}'`,l);continue}this.run(n,uOa,[o,c,Date.now()])}this.run(n,"COMMIT",[])}catch(o){try{this.run(n,"ROLLBACK",[])}catch{}for(let[s,c]of e)this.pendingInserts.set(s,c);for(let s of r)this.pendingDeletes.add(s);throw this.scheduleFlush(),o}}async awaitDatabase(){if(this.canPerformDatabaseOperation)return await this.waitForInitialization(),this.database}run(e,r,n){let o=n;o.length>0?e.prepare(r).run(...o):e.prepare(r).run()}all(e,r,n){let o=n;return o.length>0?e.prepare(r).all(...o):e.prepare(r).all()}close(e){e.close()}};var dE=class{static{a(this,"DynamicAuthenticationProviderStorageService")}},q0t=class extends dE{static{a(this,"CLSDynamicAuthenticationProviderStorageService")}constructor(e){super(),this.ctx=e}getClientRegistration(e){let r=this._getClientRegistration(e);if(r)try{let n=JSON.parse(r);if(n&&(n.clientId||n.clientSecret))return n}catch{this._removeClientRegistration(e)}}storeClientRegistration(e,r,n,o,s){let c={providerId:e,label:s||e,authorizationServer:r,clientId:n,clientSecret:o};this._updateClientRegistration(e,c)}removeDynamicProvider(e){this._removeClientRegistration(e)}getSessionsForDynamicAuthProvider(e,r){let n=this._getSessions(e,r);if(n)try{let o=JSON.parse(n);if(!Array.isArray(o)||!o.every(s=>typeof s.created_at=="number"&&Q0t(s))){this._removeSessions(e,r);return}return o}catch{this._removeSessions(e,r)}}setSessionsForDynamicAuthProvider(e,r,n){this._updateSessions(e,r,n)}_generateClientKey(e){return`dynamicAuthProvider:clientRegistration:${e}`}_generateSessionKey(e,r){return`dynamicAuthProvider:sessions:${e}:${r}`}_getClientRegistration(e){let r=this._generateClientKey(e);return this.ctx.get(Zh).get(r)}_updateClientRegistration(e,r){let n=this._generateClientKey(e);this.ctx.get(Zh).set(n,r)}_removeClientRegistration(e){let r=this._generateClientKey(e);this.ctx.get(Zh).delete(r)}_getSessions(e,r){let n=this._generateSessionKey(e,r);return this.ctx.get(Zh).get(n)}_updateSessions(e,r,n){let o=this._generateSessionKey(e,r);this.ctx.get(Zh).set(o,n)}_removeSessions(e,r){let n=this._generateSessionKey(e,r);this.ctx.get(Zh).delete(n)}};var OA=new Se("DynamicAuthenticationProvider"),G0t=class{static{a(this,"DynamicAuthenticationProvider")}constructor(e,r,n,o,s,c,l){this.ctx=e,this.authorizationServer=r,this.serverMetadata=n,this.resourceMetadata=o,this.clientId=s,this.clientSecret=c,this.initialTokens=l,this.id=o?.resource?r+" "+o?.resource:r,this.label=o?.resource_name??r,this.authorizationServers=[r],this.supportsMultipleAccounts=!0,this._tokenStore=new jyr(e,l,{set:a(u=>{this.ctx.get(dE).setSessionsForDynamicAuthProvider(this.id,this.clientId,u)},"set")})}async getSessions(e,r){if(OA.info(this.ctx,`Getting sessions for scopes: ${e?.join(" ")??"all"}`),!e)return this._tokenStore.sessions;let n=[...e].sort(),o=e.join(" "),s=this._tokenStore.sessions.filter(c=>o_e([...c.scopes].sort(),n));if(OA.info(this.ctx,`Found ${s.length} sessions for scopes: ${o}`),s.length){let c=[],l=[],u=new Map(this._tokenStore.tokens.map(d=>[d.access_token,d]));for(let d of s){let p=u.get(d.accessToken);if(p&&p.expires_in){let h=Date.now(),m=p.expires_in*1e3;if(h>p.created_at+m-300*1e3){if(OA.info(this.ctx,`Token for session ${d.id} is about to expire, refreshing...`),l.push(p),!p.refresh_token){OA.warn(this.ctx,`No refresh token available for scopes ${d.scopes.join(" ")}. Throwing away token.`);continue}try{let g=await this.exchangeRefreshTokenForToken(p.refresh_token);g.scope!==o&&(OA.warn(this.ctx,`Token scopes '${g.scope}' do not match requested scopes '${o}'. Overwriting token with what was requested...`),g.scope=o),OA.info(this.ctx,`Successfully created a new token for scopes ${d.scopes.join(" ")}.`),c.push(g)}catch(g){OA.error(this.ctx,"Failed to refresh token: ",g)}}}}return(c.length||l.length)&&(this._tokenStore.update({added:c,removed:l}),s=this._tokenStore.sessions.filter(d=>o_e([...d.scopes].sort(),n))),OA.info(this.ctx,`Found ${s.length} sessions for scopes: ${o}`),s}return[]}async createSession(e,r){let n=[...e].sort(),o=await new E0e(this.ctx).auth({clientId:this.clientId,clientSecret:this.clientSecret},n,this.serverMetadata,this.resourceMetadata);o.scope!==e.join(" ")&&(OA.warn(this.ctx,`Token scopes '${o.scope}' do not match requested scopes '${e.join(" ")}'. Overwriting token with what was requested...`),o.scope=e.join(" ")),this._tokenStore.update({added:[{...o,created_at:Date.now()}],removed:[]});let s=this._tokenStore.sessions.find(c=>c.accessToken===o.access_token);return OA.info(this.ctx,`Created ${o.refresh_token?"refreshable":"non-refreshable"} session for scopes: ${o.scope}${o.expires_in?` that expires in ${o.expires_in} seconds`:""}`),s}removeSession(e){OA.info(this.ctx,`Removing session with id: ${e}`);let r=this._tokenStore.sessions.find(o=>o.id===e);if(!r)return OA.error(this.ctx,`Session with id ${e} not found`),Promise.resolve();let n=this._tokenStore.tokens.find(o=>o.access_token===r.accessToken);return n?(this._tokenStore.update({added:[],removed:[n]}),OA.info(this.ctx,`Removed token for session: ${r.id} with scopes: ${r.scopes.join(" ")}`),Promise.resolve()):(OA.error(this.ctx,`Failed to retrieve token for removed session: ${r.id}`),Promise.resolve())}async exchangeRefreshTokenForToken(e){if(!this.serverMetadata.token_endpoint)throw new Error("Token endpoint not available in server metadata");let r=new URLSearchParams;r.append("client_id",this.clientId),r.append("grant_type","refresh_token"),r.append("refresh_token",e),this.resourceMetadata?.resource&&r.append("resource",this.resourceMetadata.resource),this.clientSecret&&r.append("client_secret",this.clientSecret);let o=await(await this.ctx.get(dr).fetch(this.serverMetadata.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:r.toString()})).json();if(Q0t(o))return{...o,created_at:Date.now()};throw new Error(`Invalid authorization token response: ${JSON.stringify(o)}`)}},jyr=class{static{a(this,"TokenStore")}constructor(e,r,n){this.ctx=e,this.tokens=r??[],this._persistence=n}get sessions(){return this.tokens.map(e=>this._getSessionFromToken(e))}update({added:e,removed:r}){OA.info(this.ctx,`Updating tokens: added ${e.length}, removed ${r.length}`);let n=[...this.tokens];for(let o of r){let s=n.findIndex(c=>c.access_token===o.access_token);s!==-1&&n.splice(s,1)}for(let o of e){let s=n.findIndex(c=>c.access_token===o.access_token);s===-1?n.push(o):n[s]=o}(e.length||r.length)&&(this.tokens=n,this._persistence.set(n)),OA.info(this.ctx,`Tokens updated: ${n.length} tokens stored.`)}_getSessionFromToken(e){let r;if(e.id_token)try{r=Hyr(e.id_token)}catch{}if(!r)try{r=Hyr(e.access_token)}catch{}let n=e.scope?e.scope.split(" "):r?.scope?r.scope.split(" "):[];return{id:Wgi(e.access_token,0).toString(),accessToken:e.access_token,account:{id:r?.sub||"unknown",label:r?.preferred_username||r?.name||r?.email||"MCP"},scopes:n,idToken:e.id_token}}};var xb=new Se("DynamicAuthProviderService"),W3=class t{static{a(this,"DynamicAuthenticationProviderService")}static{this.dynamicOAuthRequestType=new Xgi.ProtocolRequestType("copilot/dynamicOAuth")}constructor(e){this.ctx=e}async registerDynamicAuthProvider(e,r,n,o,s,c){if(!o){let u=await this.getDynamicClientRegistration(e,r,n);o=u.clientId,s=u.clientSecret}let l=new G0t(this.ctx,e,r,n,o,s,c);return this.registerDynamicAuthenticationProvider(l),l}async getDynamicClientRegistration(e,r,n){let o,s;if(r.registration_endpoint)try{let c=await this.fetchDynamicRegistration(r,n?.scopes_supported);o=c.client_id,s=c.client_secret}catch(c){xb.error(this.ctx,`Dynamic registration failed for ${e.toString()}: ${zl(c)}. Prompting user for client ID and client secret...`)}if(!o){let c=[`http://127.0.0.1:${y0e}/callback`,"http://127.0.0.1/callback"],l;try{l=await this.ctx.get(Ar).connection.sendRequest(t.dynamicOAuthRequestType,{title:"Add Client Registration Details",header:`The authorization server '${e.toString()}' does not support automatic client registration.`,detail:`Do you want to proceed by manually providing a client registration (client ID)? +`,hBa="SELECT key, value FROM state",Xfe=new Se("state-database"),Vh=class{constructor(e){this.cache=new Map;this.changeEmitter=new Ri;this.pendingInserts=new Map;this.pendingDeletes=new Set;this.writeQueue=Promise.resolve();this.persistenceEnabled=!1;this.initializationFailed=!1;this.state=0;this.ctx=e,e.get(Fn).onDidSetCapabilities(()=>{this.initialize()})}static{a(this,"StateDatabase")}get isClosed(){return this.state===3}get canPersist(){return this.persistenceEnabled&&!this.initializationFailed&&!this.isClosed}get canPerformDatabaseOperation(){return this.persistenceEnabled&&!this.initializationFailed}get onDidChange(){return this.changeEmitter.event}get initialized(){return this.state===2&&this.persistenceEnabled&&!this.initializationFailed&&this.database!==void 0}get size(){return this.cache.size}has(e){return this.cache.has(e)}clear(){if(this.isClosed)return;let e=this.getAllKeys();for(let r of e)this.delete(r)}getAllKeys(){return[...this.cache.keys()]}get(e){return this.cache.get(e)}set(e,r){if(this.isClosed)return;let n=dtn(r)||Array.isArray(r)?JSON.stringify(r):String(r);this.cache.get(e)!==n&&(this.cache.set(e,n),this.changeEmitter.fire({key:e,value:n}),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this.scheduleFlush())}delete(e){this.isClosed||!this.cache.delete(e)||(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this.changeEmitter.fire({key:e,value:void 0}),this.scheduleFlush())}initialize(){if(this.state!==0)return;let e=this.ctx.get(Fn).getCapabilities().stateDatabase??!1;if(this.state=1,this.persistenceEnabled=e,!e){this.state=2,this.initializationFailed=!1,this.database=void 0;return}this.initializationTask||(this.initializationTask=this.initializeWithTimeout().catch(r=>{this.handleInitializationError("Failed to initialize state database",r)})),this.state=2}handleInitializationError(e,r){this.initializationFailed=!0,this.state=0,Xfe.error(this.ctx,e,r)}async waitForInitialization(){await this.initializationTask?.catch(()=>{})}async dispose(){this.state=3,this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0);try{await this.forceFlush()}catch(e){Xfe.error(this.ctx,"Failed to flush data before closing",e)}await this.waitForInitialization(),await this.writeQueue.catch(()=>{}),this.database&&(this.close(this.database),this.database=void 0),this.persistenceEnabled=!1}async forceFlush(){if(!this.canPersist)return;this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),await this.flushPendingChanges()&&await this.writeQueue}async initializeWithTimeout(){await Promise.race([this.initializeInternal(),(0,KAi.setTimeout)(aBa).then(()=>{throw new Error("State database initialization timed out")})])}async initializeInternal(){let e;try{e=await this.resolveDatabasePath()}catch(o){this.handleInitializationError("State database disabled - unable to resolve storage path",o);return}let r;try{r=new zAi.default.DatabaseSync(e,{open:!0})}catch(o){this.handleInitializationError("Failed to open state database file",o);return}this.database=r,r.exec(` + ${cBa}; + ${lBa}; + ${uBa}; + ${dBa}; + ${fBa}; + `);let n=this.all(r,hBa,[]);for(let o of n)try{let s=JSON.parse(o.value);s!==void 0?this.cache.set(o.key,s):Xfe.warn(this.ctx,`Skipping corrupted state value for key '${o.key}' - parsed to undefined`)}catch(s){Xfe.warn(this.ctx,`Failed to parse state value for key '${o.key}'`,s)}}async resolveDatabasePath(){let r=this.ctx.get(Ti).directory;await WAi.mkdir(r,{recursive:!0,mode:448});let n=this.getSanitizedDatabaseName();return YAi.default.join(r,`${n}.db`)}getSanitizedDatabaseName(){return this.ctx.get(Dr).getEditorPluginInfo().name.replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/_+/g,"_")||sBa}scheduleFlush(){if(this.isClosed||this.flushTimer)return;let e=oBa;this.flushTimer=setTimeout(()=>{this.flushTimer=void 0,this.flushPendingChanges()},e),typeof this.flushTimer.unref=="function"&&this.flushTimer.unref()}enqueue(e){return this.writeQueue=this.writeQueue.then(e).catch(r=>{Xfe.error(this.ctx,"State database write failed",r)}),this.writeQueue}async flushPendingChanges(){let e=new Map(this.pendingInserts.entries()),r=new Set(this.pendingDeletes.values());return this.pendingInserts.clear(),this.pendingDeletes.clear(),!e.size&&!r.size?!1:(await this.enqueue(()=>this.persistWrites(e,r)),!0)}async persistWrites(e,r){if(!e.size&&!r.size)return;let n=await this.awaitDatabase();if(!n){for(let[o,s]of e)this.pendingInserts.set(o,s);for(let o of r)this.pendingDeletes.add(o);return}this.run(n,"BEGIN IMMEDIATE",[]);try{for(let o of r)this.run(n,"DELETE FROM state WHERE key = ?",[o]);for(let[o,s]of e){let c;try{c=JSON.stringify(s)}catch(l){Xfe.warn(this.ctx,`Failed to serialize state value for key '${o}'`,l);continue}this.run(n,pBa,[o,c,Date.now()])}this.run(n,"COMMIT",[])}catch(o){try{this.run(n,"ROLLBACK",[])}catch{}for(let[s,c]of e)this.pendingInserts.set(s,c);for(let s of r)this.pendingDeletes.add(s);throw this.scheduleFlush(),o}}async awaitDatabase(){if(this.canPerformDatabaseOperation)return await this.waitForInitialization(),this.database}run(e,r,n){let o=n;o.length>0?e.prepare(r).run(...o):e.prepare(r).run()}all(e,r,n){let o=n;return o.length>0?e.prepare(r).all(...o):e.prepare(r).all()}close(e){e.close()}};var rE=class{static{a(this,"DynamicAuthenticationProviderStorageService")}},Yft=class extends rE{static{a(this,"CLSDynamicAuthenticationProviderStorageService")}constructor(e){super(),this.ctx=e}getClientRegistration(e){let r=this._getClientRegistration(e);if(r)try{let n=JSON.parse(r);if(n&&(n.clientId||n.clientSecret))return n}catch{this._removeClientRegistration(e)}}storeClientRegistration(e,r,n,o,s){let c={providerId:e,label:s||e,authorizationServer:r,clientId:n,clientSecret:o};this._updateClientRegistration(e,c)}removeDynamicProvider(e){this._removeClientRegistration(e)}getSessionsForDynamicAuthProvider(e,r){let n=this._getSessions(e,r);if(n)try{let o=JSON.parse(n);if(!Array.isArray(o)||!o.every(s=>typeof s.created_at=="number"&&zft(s))){this._removeSessions(e,r);return}return o}catch{this._removeSessions(e,r)}}setSessionsForDynamicAuthProvider(e,r,n){this._updateSessions(e,r,n)}_generateClientKey(e){return`dynamicAuthProvider:clientRegistration:${e}`}_generateSessionKey(e,r){return`dynamicAuthProvider:sessions:${e}:${r}`}_getClientRegistration(e){let r=this._generateClientKey(e);return this.ctx.get(Vh).get(r)}_updateClientRegistration(e,r){let n=this._generateClientKey(e);this.ctx.get(Vh).set(n,r)}_removeClientRegistration(e){let r=this._generateClientKey(e);this.ctx.get(Vh).delete(r)}_getSessions(e,r){let n=this._generateSessionKey(e,r);return this.ctx.get(Vh).get(n)}_updateSessions(e,r,n){let o=this._generateSessionKey(e,r);this.ctx.get(Vh).set(o,n)}_removeSessions(e,r){let n=this._generateSessionKey(e,r);this.ctx.get(Vh).delete(n)}};var xA=new Se("DynamicAuthenticationProvider"),Kft=class{static{a(this,"DynamicAuthenticationProvider")}constructor(e,r,n,o,s,c,l){this.ctx=e,this.authorizationServer=r,this.serverMetadata=n,this.resourceMetadata=o,this.clientId=s,this.clientSecret=c,this.initialTokens=l,this.id=o?.resource?r+" "+o?.resource:r,this.label=o?.resource_name??r,this.authorizationServers=[r],this.supportsMultipleAccounts=!0,this._tokenStore=new uEr(e,l,{set:a(u=>{this.ctx.get(rE).setSessionsForDynamicAuthProvider(this.id,this.clientId,u)},"set")})}async getSessions(e,r){if(xA.info(this.ctx,`Getting sessions for scopes: ${e?.join(" ")??"all"}`),!e)return this._tokenStore.sessions;let n=[...e].sort(),o=e.join(" "),s=this._tokenStore.sessions.filter(c=>r_e([...c.scopes].sort(),n));if(xA.info(this.ctx,`Found ${s.length} sessions for scopes: ${o}`),s.length){let c=[],l=[],u=new Map(this._tokenStore.tokens.map(d=>[d.access_token,d]));for(let d of s){let p=u.get(d.accessToken);if(p&&p.expires_in){let h=Date.now(),m=p.expires_in*1e3;if(h>p.created_at+m-300*1e3){if(xA.info(this.ctx,`Token for session ${d.id} is about to expire, refreshing...`),l.push(p),!p.refresh_token){xA.warn(this.ctx,`No refresh token available for scopes ${d.scopes.join(" ")}. Throwing away token.`);continue}try{let g=await this.exchangeRefreshTokenForToken(p.refresh_token);g.scope!==o&&(xA.warn(this.ctx,`Token scopes '${g.scope}' do not match requested scopes '${o}'. Overwriting token with what was requested...`),g.scope=o),xA.info(this.ctx,`Successfully created a new token for scopes ${d.scopes.join(" ")}.`),c.push(g)}catch(g){xA.error(this.ctx,"Failed to refresh token: ",g)}}}}return(c.length||l.length)&&(this._tokenStore.update({added:c,removed:l}),s=this._tokenStore.sessions.filter(d=>r_e([...d.scopes].sort(),n))),xA.info(this.ctx,`Found ${s.length} sessions for scopes: ${o}`),s}return[]}async createSession(e,r){let n=[...e].sort(),o=await new Nfe(this.ctx).auth({clientId:this.clientId,clientSecret:this.clientSecret},n,this.serverMetadata,this.resourceMetadata);o.scope!==e.join(" ")&&(xA.warn(this.ctx,`Token scopes '${o.scope}' do not match requested scopes '${e.join(" ")}'. Overwriting token with what was requested...`),o.scope=e.join(" ")),this._tokenStore.update({added:[{...o,created_at:Date.now()}],removed:[]});let s=this._tokenStore.sessions.find(c=>c.accessToken===o.access_token);return xA.info(this.ctx,`Created ${o.refresh_token?"refreshable":"non-refreshable"} session for scopes: ${o.scope}${o.expires_in?` that expires in ${o.expires_in} seconds`:""}`),s}removeSession(e){xA.info(this.ctx,`Removing session with id: ${e}`);let r=this._tokenStore.sessions.find(o=>o.id===e);if(!r)return xA.error(this.ctx,`Session with id ${e} not found`),Promise.resolve();let n=this._tokenStore.tokens.find(o=>o.access_token===r.accessToken);return n?(this._tokenStore.update({added:[],removed:[n]}),xA.info(this.ctx,`Removed token for session: ${r.id} with scopes: ${r.scopes.join(" ")}`),Promise.resolve()):(xA.error(this.ctx,`Failed to retrieve token for removed session: ${r.id}`),Promise.resolve())}async exchangeRefreshTokenForToken(e){if(!this.serverMetadata.token_endpoint)throw new Error("Token endpoint not available in server metadata");let r=new URLSearchParams;r.append("client_id",this.clientId),r.append("grant_type","refresh_token"),r.append("refresh_token",e),this.resourceMetadata?.resource&&r.append("resource",this.resourceMetadata.resource),this.clientSecret&&r.append("client_secret",this.clientSecret);let o=await(await this.ctx.get(dr).fetch(this.serverMetadata.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:r.toString()})).json();if(zft(o))return{...o,created_at:Date.now()};throw new Error(`Invalid authorization token response: ${JSON.stringify(o)}`)}},uEr=class{static{a(this,"TokenStore")}constructor(e,r,n){this.ctx=e,this.tokens=r??[],this._persistence=n}get sessions(){return this.tokens.map(e=>this._getSessionFromToken(e))}update({added:e,removed:r}){xA.info(this.ctx,`Updating tokens: added ${e.length}, removed ${r.length}`);let n=[...this.tokens];for(let o of r){let s=n.findIndex(c=>c.access_token===o.access_token);s!==-1&&n.splice(s,1)}for(let o of e){let s=n.findIndex(c=>c.access_token===o.access_token);s===-1?n.push(o):n[s]=o}(e.length||r.length)&&(this.tokens=n,this._persistence.set(n)),xA.info(this.ctx,`Tokens updated: ${n.length} tokens stored.`)}_getSessionFromToken(e){let r;if(e.id_token)try{r=lEr(e.id_token)}catch{}if(!r)try{r=lEr(e.access_token)}catch{}let n=e.scope?e.scope.split(" "):r?.scope?r.scope.split(" "):[];return{id:VAi(e.access_token,0).toString(),accessToken:e.access_token,account:{id:r?.sub||"unknown",label:r?.preferred_username||r?.name||r?.email||"MCP"},scopes:n,idToken:e.id_token}}};var hb=new Se("DynamicAuthProviderService"),R3=class t{static{a(this,"DynamicAuthenticationProviderService")}static{this.dynamicOAuthRequestType=new JAi.ProtocolRequestType("copilot/dynamicOAuth")}constructor(e){this.ctx=e}async registerDynamicAuthProvider(e,r,n,o,s,c){if(!o){let u=await this.getDynamicClientRegistration(e,r,n);o=u.clientId,s=u.clientSecret}let l=new Kft(this.ctx,e,r,n,o,s,c);return this.registerDynamicAuthenticationProvider(l),l}async getDynamicClientRegistration(e,r,n){let o,s;if(r.registration_endpoint)try{let c=await this.fetchDynamicRegistration(r,n?.scopes_supported);o=c.client_id,s=c.client_secret}catch(c){hb.error(this.ctx,`Dynamic registration failed for ${e.toString()}: ${Ql(c)}. Prompting user for client ID and client secret...`)}if(!o){let c=[`http://127.0.0.1:${Dfe}/callback`,"http://127.0.0.1/callback"],l;try{l=await this.ctx.get(Ar).connection.sendRequest(t.dynamicOAuthRequestType,{title:"Add Client Registration Details",header:`The authorization server '${e.toString()}' does not support automatic client registration.`,detail:`Do you want to proceed by manually providing a client registration (client ID)? Note: When registering your OAuth application, make sure to include these redirect URIs: ${c.join(` -`)}`,inputs:[{title:"Client ID",value:"clientId",description:`Enter an existing client ID that has been registered with the following redirect URIs: ${c.join(", ")}`,placeholder:"OAuth client ID (azye39d...)",required:!0},{title:"Client Secret",value:"clientSecret",description:"(optional) Enter an existing client secret associated with the previous client id or leave this field blank",placeholder:"OAuth client secret (wer32o50f...) or leave it blank",required:!1}]})}catch(u){xb.error(this.ctx,`Failed to get client ID and secret from user: ${zl(u)}`)}if(!l)throw new Error("User did not provide client details");o=l.clientId,s=l.clientSecret,xb.info(this.ctx,`User provided client registration for ${e.toString()}`),s?xb.info(this.ctx,`User provided client secret for ${e.toString()}`):xb.info(this.ctx,`User did not provide client secret for ${e.toString()}`)}return{clientId:o,clientSecret:s}}async fetchDynamicRegistration(e,r){if(!e.registration_endpoint)throw new Error("Server does not support dynamic registration");let n=await this.ctx.get(dr).fetch(e.registration_endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_name:"GitHub Copilot",client_uri:"https://github.com/features/copilot",grant_types:e.grant_types_supported?e.grant_types_supported.filter(s=>NAr.includes(s)):NAr,response_types:["code"],redirect_uris:["http://127.0.0.1/callback","http://localhost/callback",`http://localhost:${y0e}/callback`,`http://127.0.0.1:${y0e}/callback`],scope:r?.join(Ugi),token_endpoint_auth_method:"none",application_type:"native"})});if(!n.ok)throw new Error(`Dynamic client registration failed: ${n.status} ${n.statusText}`);let o=await n.json();if($gi(o))return o;throw new Error(`Invalid authorization dynamic client registration response: ${JSON.stringify(o)}`)}registerDynamicAuthenticationProvider(e){this.ctx.get(Xh).registerAuthenticationProvider(e.id,e),this.ctx.get(dE).storeClientRegistration(e.id,e.authorizationServer,e.clientId,e.clientSecret,e.label)}async removeSessionByAccountName(e,r){let n=this.ctx.get(Xh);try{let o=n.getProvider(e),c=(await o.getSessions(void 0,{})).filter(l=>l.account.label===r);xb.info(this.ctx,`Removing ${c.length} session(s) for account ${r} in provider ${e}`);for(let l of c)await o.removeSession(l.id);xb.info(this.ctx,`Successfully removed session(s) for account ${r} in provider ${e}`)}catch(o){throw xb.error(this.ctx,`Failed to remove session for account ${r} in provider ${e}:`,o),o}}async removeAllSessions(e){let r=this.ctx.get(Xh);try{let n=r.getProvider(e),o=await n.getSessions(void 0,{});xb.info(this.ctx,`Removing ${o.length} sessions for provider ${e}`);for(let s of o)await n.removeSession(s.id);xb.info(this.ctx,`Successfully removed all sessions for provider ${e}`)}catch(n){throw xb.error(this.ctx,`Failed to remove sessions for provider ${e}:`,n),n}}async unregisterProvider(e){let r=this.ctx.get(Xh),n=this.ctx.get(dE);try{await this.removeAllSessions(e),n.removeDynamicProvider(e),r.unregisterAuthenticationProvider(e),xb.info(this.ctx,`Successfully unregistered provider ${e} and removed all associated data`)}catch(o){throw xb.error(this.ctx,`Failed to unregister provider ${e}:`,o),o}}};var H0t=class extends Xh{constructor(r){super();this._authenticationProviders=new Map;this.ctx=r}static{a(this,"CLSAuthenticationService")}registerAuthenticationProvider(r,n){this._authenticationProviders.set(r,n)}unregisterAuthenticationProvider(r){this._authenticationProviders.delete(r)}getOrActivateProviderIdForServer(r){for(let n of this._authenticationProviders.values())if(n.authorizationServers?.some(o=>o===r))return n.id}createAuthenticationProvider(r,n,o){if(r===v2.providerId){let s=new v2(this.ctx,r,n,o);return this.registerAuthenticationProvider(s.id,s),s}}async createDynamicAuthenticationProvider(r,n,o){let s=o?`${r.toString()} ${o.resource}`:r.toString(),c=this.ctx.get(dE).getClientRegistration(s),l=c?.clientId,u=c?.clientSecret,d;return l&&(d=this.ctx.get(dE).getSessionsForDynamicAuthProvider(s,l)),await this.ctx.get(W3).registerDynamicAuthProvider(r,n,o,l,u,d)}getProvider(r){if(this._authenticationProviders.has(r))return this._authenticationProviders.get(r);throw new Error(`No authentication provider '${r}' is currently registered.`)}async getSessions(r,n,o,s=!1){let c=this._authenticationProviders.get(r);if(c){if(o?.authorizationServer){let l=o.authorizationServer;if(!c.authorizationServers?.some(u=>u===l))throw new Error(`The authorization server '${l}' is not supported by the authentication provider '${r}'.`)}return await c.getSessions(n,{...o})}else throw new Error(`No authentication provider '${r}' is currently registered.`)}};f();var Zgi=de(Su());var $yr=new Se("agentCopilotTokenManager"),fOa={type:new Zgi.ProtocolRequestType("copilot/token")},j0t=class extends Jp{constructor(){super(...arguments);this.networkFetcher=new F5e}static{a(this,"AgentCopilotTokenFetcher")}async fetchTokenResult(r,n,o){if(!r.get(Fn).getCapabilities().token)return this.networkFetcher.fetchTokenResult(r,n,o);let s=r.get(Ar).connection;try{let c=await s.sendRequest(fOa.type,{force:!1,session:n});if(!c?.envelope)return $yr.debug(r,"Envelope missing from copilot/token response"),{failureKind:"HTTP401",message:"Editor did not return a token"};let{envelope:l,tokenEndpoint:u}=c;if($yr.debug(r,"Retrieved envelope from copilot/token"),l.expires_at*1e3this.updateCapabilities(r))}static{a(this,"CapabilitiesUpdater")}async updateCapabilities(e){let r=this.ctx.get(Fn),n=this.isPreviewFeaturesDisabled(e);n&&r.setCapabilities({mcpAllowlist:!1}),await this.updateCveRemediatorCapability(e,n)}async updateCveRemediatorCapability(e,r){let n=this.ctx.get(Fn),o=this.ctx.get(jt),s=n.getCapabilities().cveRemediatorAgent??!1,c=await o.updateExPValuesAndAssignments(e),l=o.cveRemediatorAgentEnabled(c),u=s&&l&&!r;n.setCapabilities({cveRemediatorAgent:u})}isPreviewFeaturesDisabled(e){return e.getTokenValue("editor_preview_features")==="0"}};f();var pOa=new Se("Public Code References"),$0t=class extends qv{static{a(this,"CLSCitationManager")}async handleIPCodeCitation(e,r){let n=r.location?.start.line!==void 0?r.location.start.line+1:"-",o=r.location?.start.character!==void 0?r.location.start.character+1:"-",s=(r.matchingText??"").replace(/[\r\n]/g," ");pOa.info(e,`Text found matching public code in ${r.inDocumentUri} [Ln ${n}, Col ${o}] near ${s}...:`+r.details.map((c,l)=>` - ${l+1}) [${c.license}] ${c.url}`).join("")),!(r.version===void 0||r.location===void 0)&&e.get(Fn).getCapabilities().ipCodeCitation===!0&&await e.get(Ar).connection.sendNotification(G2t.type,{uri:r.inDocumentUri,version:r.version,range:r.location,matchingText:r.matchingText??"",citations:r.details})}};f();var Vyr=de(Su());var hOa=new Vyr.ProtocolNotificationType("$/copilot/compressionStarted"),mOa=new Vyr.ProtocolNotificationType("$/copilot/compressionCompleted"),V0t=class extends Tb{constructor(r){super();this.ctx=r}static{a(this,"CLSCompressionNotifier")}async notifyCompressionStarted(r){await this.ctx.get(Ar).connection.sendNotification(hOa,r)}async notifyCompressionCompleted(r){await this.ctx.get(Ar).connection.sendNotification(mOa,r)}};f();f();function eAi(t){gOa(t)}a(eAi,"activateExtensibilityPlatformFeature");function gOa(t){t.set(nw,new ZUe(t)),t.set(gk,new gk(t))}a(gOa,"registerContextDependencies");f();var tAi=S.String(),Wyr=class{constructor(e){this.turnContext=e}static{a(this,"BuildLogsSkillProcessor")}value(){return .9}processSkill(e){return this.turnContext.collectLabel(z0t,"build logs"),`The contents of the application build logs: +`)}`,inputs:[{title:"Client ID",value:"clientId",description:`Enter an existing client ID that has been registered with the following redirect URIs: ${c.join(", ")}`,placeholder:"OAuth client ID (azye39d...)",required:!0},{title:"Client Secret",value:"clientSecret",description:"(optional) Enter an existing client secret associated with the previous client id or leave this field blank",placeholder:"OAuth client secret (wer32o50f...) or leave it blank",required:!1}]})}catch(u){hb.error(this.ctx,`Failed to get client ID and secret from user: ${Ql(u)}`)}if(!l)throw new Error("User did not provide client details");o=l.clientId,s=l.clientSecret,hb.info(this.ctx,`User provided client registration for ${e.toString()}`),s?hb.info(this.ctx,`User provided client secret for ${e.toString()}`):hb.info(this.ctx,`User did not provide client secret for ${e.toString()}`)}return{clientId:o,clientSecret:s}}async fetchDynamicRegistration(e,r){if(!e.registration_endpoint)throw new Error("Server does not support dynamic registration");let n=await this.ctx.get(dr).fetch(e.registration_endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_name:"GitHub Copilot",client_uri:"https://github.com/features/copilot",grant_types:e.grant_types_supported?e.grant_types_supported.filter(s=>XAr.includes(s)):XAr,response_types:["code"],redirect_uris:["http://127.0.0.1/callback","http://localhost/callback",`http://localhost:${Dfe}/callback`,`http://127.0.0.1:${Dfe}/callback`],scope:r?.join(FAi),token_endpoint_auth_method:"none",application_type:"native"})});if(!n.ok)throw new Error(`Dynamic client registration failed: ${n.status} ${n.statusText}`);let o=await n.json();if(jAi(o))return o;throw new Error(`Invalid authorization dynamic client registration response: ${JSON.stringify(o)}`)}registerDynamicAuthenticationProvider(e){this.ctx.get($h).registerAuthenticationProvider(e.id,e),this.ctx.get(rE).storeClientRegistration(e.id,e.authorizationServer,e.clientId,e.clientSecret,e.label)}async removeSessionByAccountName(e,r){let n=this.ctx.get($h);try{let o=n.getProvider(e),c=(await o.getSessions(void 0,{})).filter(l=>l.account.label===r);hb.info(this.ctx,`Removing ${c.length} session(s) for account ${r} in provider ${e}`);for(let l of c)await o.removeSession(l.id);hb.info(this.ctx,`Successfully removed session(s) for account ${r} in provider ${e}`)}catch(o){throw hb.error(this.ctx,`Failed to remove session for account ${r} in provider ${e}:`,o),o}}async removeAllSessions(e){let r=this.ctx.get($h);try{let n=r.getProvider(e),o=await n.getSessions(void 0,{});hb.info(this.ctx,`Removing ${o.length} sessions for provider ${e}`);for(let s of o)await n.removeSession(s.id);hb.info(this.ctx,`Successfully removed all sessions for provider ${e}`)}catch(n){throw hb.error(this.ctx,`Failed to remove sessions for provider ${e}:`,n),n}}async unregisterProvider(e){let r=this.ctx.get($h),n=this.ctx.get(rE);try{await this.removeAllSessions(e),n.removeDynamicProvider(e),r.unregisterAuthenticationProvider(e),hb.info(this.ctx,`Successfully unregistered provider ${e} and removed all associated data`)}catch(o){throw hb.error(this.ctx,`Failed to unregister provider ${e}:`,o),o}}};var Jft=class extends $h{constructor(r){super();this._authenticationProviders=new Map;this.ctx=r}static{a(this,"CLSAuthenticationService")}registerAuthenticationProvider(r,n){this._authenticationProviders.set(r,n)}unregisterAuthenticationProvider(r){this._authenticationProviders.delete(r)}getOrActivateProviderIdForServer(r){for(let n of this._authenticationProviders.values())if(n.authorizationServers?.some(o=>o===r))return n.id}createAuthenticationProvider(r,n,o){if(r===d2.providerId){let s=new d2(this.ctx,r,n,o);return this.registerAuthenticationProvider(s.id,s),s}}async createDynamicAuthenticationProvider(r,n,o){let s=o?`${r.toString()} ${o.resource}`:r.toString(),c=this.ctx.get(rE).getClientRegistration(s),l=c?.clientId,u=c?.clientSecret,d;return l&&(d=this.ctx.get(rE).getSessionsForDynamicAuthProvider(s,l)),await this.ctx.get(R3).registerDynamicAuthProvider(r,n,o,l,u,d)}getProvider(r){if(this._authenticationProviders.has(r))return this._authenticationProviders.get(r);throw new Error(`No authentication provider '${r}' is currently registered.`)}async getSessions(r,n,o,s=!1){let c=this._authenticationProviders.get(r);if(c){if(o?.authorizationServer){let l=o.authorizationServer;if(!c.authorizationServers?.some(u=>u===l))throw new Error(`The authorization server '${l}' is not supported by the authentication provider '${r}'.`)}return await c.getSessions(n,{...o})}else throw new Error(`No authentication provider '${r}' is currently registered.`)}};f();var ZAi=de(mu());var XAi=new Se("agentCopilotTokenManager"),mBa={type:new ZAi.ProtocolRequestType("copilot/token")},Xft=class extends $p{constructor(){super(...arguments);this.networkFetcher=new BDe}static{a(this,"AgentCopilotTokenFetcher")}async fetchTokenResult(r,n,o){if(!r.get(Fn).getCapabilities().token)return this.networkFetcher.fetchTokenResult(r,n,o);let s=r.get(Ar).connection;try{let c=await s.sendRequest(mBa.type,{force:!1,session:n});if(!c?.envelope)throw new $i("Editor did not return a token");let{envelope:l,tokenEndpoint:u}=c;if(XAi.debug(r,"Retrieved envelope from copilot/token"),l.expires_at*1e3this.updateCapabilities(r))}static{a(this,"CapabilitiesUpdater")}async updateCapabilities(e){let r=this.ctx.get(Fn),n=this.isPreviewFeaturesDisabled(e);n&&r.setCapabilities({mcpAllowlist:!1}),await this.updateCveRemediatorCapability(e,n)}async updateCveRemediatorCapability(e,r){let n=this.ctx.get(Fn),o=this.ctx.get(Gt),s=n.getCapabilities().cveRemediatorAgent??!1,c=await o.updateExPValuesAndAssignments(e),l=o.cveRemediatorAgentEnabled(c),u=s&&l&&!r;n.setCapabilities({cveRemediatorAgent:u})}isPreviewFeaturesDisabled(e){return e.getTokenValue("editor_preview_features")==="0"}};f();var gBa=new Se("Public Code References"),Zft=class extends wv{static{a(this,"CLSCitationManager")}async handleIPCodeCitation(e,r){let n=r.location?.start.line!==void 0?r.location.start.line+1:"-",o=r.location?.start.character!==void 0?r.location.start.character+1:"-",s=(r.matchingText??"").replace(/[\r\n]/g," ");gBa.info(e,`Text found matching public code in ${r.inDocumentUri} [Ln ${n}, Col ${o}] near ${s}...:`+r.details.map((c,l)=>` + ${l+1}) [${c.license}] ${c.url}`).join("")),!(r.version===void 0||r.location===void 0)&&e.get(Fn).getCapabilities().ipCodeCitation===!0&&await e.get(Ar).connection.sendNotification(cPt.type,{uri:r.inDocumentUri,version:r.version,range:r.location,matchingText:r.matchingText??"",citations:r.details})}};f();var dEr=de(mu());var ABa=new dEr.ProtocolNotificationType("$/copilot/compressionStarted"),yBa=new dEr.ProtocolNotificationType("$/copilot/compressionCompleted"),e0t=class extends db{constructor(r){super();this.ctx=r}static{a(this,"CLSCompressionNotifier")}async notifyCompressionStarted(r){await this.ctx.get(Ar).connection.sendNotification(ABa,r)}async notifyCompressionCompleted(r){await this.ctx.get(Ar).connection.sendNotification(yBa,r)}};f();f();function eyi(t){EBa(t)}a(eyi,"activateExtensibilityPlatformFeature");function EBa(t){t.set(Vx,new aUe(t)),t.set(ik,new ik(t))}a(EBa,"registerContextDependencies");f();var tyi=S.String(),fEr=class{constructor(e){this.turnContext=e}static{a(this,"BuildLogsSkillProcessor")}value(){return .9}processSkill(e){return this.turnContext.collectLabel(r0t,"build logs"),`The contents of the application build logs: \`\`\` ${e} -\`\`\``}},z0t="build-logs",W0t=class extends mh{static{a(this,"BuildLogsSkill")}constructor(e){super(z0t,"The application build logs, which can be used to fix build or compilation errors.","Reading build logs",()=>e,r=>new Wyr(r))}};f();var zyr=class{constructor(e){this.turnContext=e}static{a(this,"DirectoryReferencesSkillProcessor")}value(){return 1}async processSkill(e){let r=this.filterDirectoryReferences(e);if(r.length===0)return;let n=await EGe(this.turnContext.ctx,this.turnContext.cancelationToken,r);if(n.length>0){let o=[[new nr(["The user wants you to consider the following directory structures when computing your answer."]),1]];for(let s of n)o.push([new nr([s]),1]);return new nr(o)}}filterDirectoryReferences(e){return e.filter(r=>r.type==="directory")}},Yyr=class{static{a(this,"DirectoryReferencesSkillResolver")}resolveSkill(e){if(e.turn.request.references&&e.turn.request.references.length>0)return e.turn.request.references}},AOa="directory-references",Y0t=class{constructor(){this.id=AOa;this.type="implicit"}static{a(this,"DirectoryReferencesSkill")}description(){return"The directory structure from the user's referenced directories"}resolver(){return new Yyr}processor(e){return new zyr(e)}};f();var KPe=class extends Tie{constructor(r,n){super();this.ctx=r;this.enablementCheck=n;this.ready=!1;this.ctx.get(wk).addListener(this)}static{a(this,"ProjectContextListener")}start(){this.ready=!0}async didAddWorkspace(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx)||!r.uri)return;this.workerPoolToken=await hCe();let n=this.ctx.get(Fd),o=this.ctx.get(Wg),s=this.ctx.get(bm),c=await n.chunk(this.ctx,r);n.status(r)!=="completed"&&o.terminateWatching(r),await s.initialize(this.ctx,r,c),await this.workerPoolToken.stopWorkerPool()}async didRemoveWorkspace(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx)||!r)return;let n=this.ctx.get(Fd),o=n.getParentFolder(r);if(o){let l=await n.deleteSubfolderChunks(o,r);await this.ctx.get(bm).deleteEmbeddings(this.ctx,o,l);return}n.terminateChunking(this.ctx,r),await this.ctx.get(bm).terminateRanking(this.ctx,r),this.ctx.get(ov).terminateScoring(this.ctx,r),n.workspaceCount===0&&await Iie.forceStopWorkerPool()}async didTerminateWorkspaceSubfolders(r,n){if(!await this.enablementCheck(this.ctx))return;let o=this.ctx.get(Fd),s=this.ctx.get(bm),c=this.ctx.get(ov);for(let l of n)o.terminateChunking(this.ctx,l),await s.terminateRanking(this.ctx,l),c.terminateScoring(this.ctx,r)}async didChangeFiles(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx))return;let n=await hCe();try{let o=r.documents.map(u=>u.uri),s=r.workspaceFolder;if(!s)return;let c=this.ctx.get(Fd),l=this.ctx.get(bm);if(r.type==="delete"||r.type==="update"){let u=await c.deleteFileChunks(s,o);await l.deleteEmbeddings(this.ctx,s,u)}if(r.type==="create"||r.type==="update"){let u=await c.chunk(this.ctx,s,r.documents);await l.addChunks(this.ctx,s,u)}}finally{await n.stopWorkerPool()}}isStarted(){return this.ready}isEnabled(){return Promise.resolve(!0)}};f();var yOa=S.Object({uri:S.String(),visibleRange:S.Optional(bf),openedAt:S.Optional(S.String()),activeAt:S.Optional(S.String())}),rAi=S.Object({files:S.Array(yOa)}),EOa=3,Kyr=class{constructor(e){this.turnContext=e}static{a(this,"RecentFilesSkillProcessor")}value(){return .7}async processSkill(e){let r=await this.getDocuments(e);if(r.length>0){let n=this.toElidableDocs(r),o=CF(n,"inversePositional");return await this.preElideDocuments(o)}}async getDocuments(e){let r=this.sortFiles(e.files);r=this.filterIncludedDocs(r);let n=this.turnContext.ctx.get(In),o=[];for(let s of r){let c=await n.getOrReadTextDocument(s),l=Kl(c);if(await this.turnContext.collectFile(J0t,s.uri,l),c.status==="valid"&&l!=="empty"&&(o.push([c.document,s]),o.length===EOa))break}return o.reverse()}sortFiles(e){return e.sort((r,n)=>r.activeAt&&n.activeAt?new Date(r.activeAt).getTime()-new Date(n.activeAt).getTime():r.activeAt?-1:n.activeAt?1:0).reverse()}filterIncludedDocs(e){return e.filter(r=>!this.turnContext.isFileIncluded(r.uri))}toElidableDocs(e){return e.map(r=>{let[n,o]=r,s=this.turnContext.ctx.get(In).getRelativePath(n),c=new fk(n,void 0,o.visibleRange);return new nr([[`Code excerpt from file \`${s}\`:`,1],[c.fromAllCode({addLineNumbers:!1}),.9]])})}async preElideDocuments(e){let r=(await $o.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=e.elide(Math.floor(r*.1)).getText();return new nr([n])}},J0t="recent-files",K0t=class extends mh{static{a(this,"RecentFilesSkill")}constructor(e){super(J0t,"Provides code examples helpful for creating, explaining, refactoring, or fixing code. It's based on the files the user has worked on in the editor.","Resolving recent files",()=>e,r=>new Kyr(r))}};f();var nAi=S.String(),Jyr=class{constructor(e){this.turnContext=e}static{a(this,"RuntimeLogsSkillProcessor")}value(){return .9}processSkill(e){return this.turnContext.collectLabel(Z0t,"runtime logs"),`The contents of the application runtime logs: +\`\`\``}},r0t="build-logs",t0t=class extends ch{static{a(this,"BuildLogsSkill")}constructor(e){super(r0t,"The application build logs, which can be used to fix build or compilation errors.","Reading build logs",()=>e,r=>new fEr(r))}};f();var pEr=class{constructor(e){this.turnContext=e}static{a(this,"DirectoryReferencesSkillProcessor")}value(){return 1}async processSkill(e){let r=this.filterDirectoryReferences(e);if(r.length===0)return;let n=await xqe(this.turnContext.ctx,this.turnContext.cancelationToken,r);if(n.length>0){let o=[[new nr(["The user wants you to consider the following directory structures when computing your answer."]),1]];for(let s of n)o.push([new nr([s]),1]);return new nr(o)}}filterDirectoryReferences(e){return e.filter(r=>r.type==="directory")}},hEr=class{static{a(this,"DirectoryReferencesSkillResolver")}resolveSkill(e){if(e.turn.request.references&&e.turn.request.references.length>0)return e.turn.request.references}},_Ba="directory-references",n0t=class{constructor(){this.id=_Ba;this.type="implicit"}static{a(this,"DirectoryReferencesSkill")}description(){return"The directory structure from the user's referenced directories"}resolver(){return new hEr}processor(e){return new pEr(e)}};f();var W2e=class extends Lne{constructor(r,n){super();this.ctx=r;this.enablementCheck=n;this.ready=!1;this.ctx.get(gk).addListener(this)}static{a(this,"ProjectContextListener")}start(){this.ready=!0}async didAddWorkspace(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx)||!r.uri)return;this.workerPoolToken=await fEe();let n=this.ctx.get(Rd),o=this.ctx.get(Ug),s=this.ctx.get(pm),c=await n.chunk(this.ctx,r);n.status(r)!=="completed"&&o.terminateWatching(r),await s.initialize(this.ctx,r,c),await this.workerPoolToken.stopWorkerPool()}async didRemoveWorkspace(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx)||!r)return;let n=this.ctx.get(Rd),o=n.getParentFolder(r);if(o){let l=await n.deleteSubfolderChunks(o,r);await this.ctx.get(pm).deleteEmbeddings(this.ctx,o,l);return}n.terminateChunking(this.ctx,r),await this.ctx.get(pm).terminateRanking(this.ctx,r),this.ctx.get(V1).terminateScoring(this.ctx,r),n.workspaceCount===0&&await Une.forceStopWorkerPool()}async didTerminateWorkspaceSubfolders(r,n){if(!await this.enablementCheck(this.ctx))return;let o=this.ctx.get(Rd),s=this.ctx.get(pm),c=this.ctx.get(V1);for(let l of n)o.terminateChunking(this.ctx,l),await s.terminateRanking(this.ctx,l),c.terminateScoring(this.ctx,r)}async didChangeFiles(r){if(!await this.isEnabled()||!await this.enablementCheck(this.ctx))return;let n=await fEe();try{let o=r.documents.map(u=>u.uri),s=r.workspaceFolder;if(!s)return;let c=this.ctx.get(Rd),l=this.ctx.get(pm);if(r.type==="delete"||r.type==="update"){let u=await c.deleteFileChunks(s,o);await l.deleteEmbeddings(this.ctx,s,u)}if(r.type==="create"||r.type==="update"){let u=await c.chunk(this.ctx,s,r.documents);await l.addChunks(this.ctx,s,u)}}finally{await n.stopWorkerPool()}}isStarted(){return this.ready}isEnabled(){return Promise.resolve(!0)}};f();var CBa=S.Object({uri:S.String(),visibleRange:S.Optional(gf),openedAt:S.Optional(S.String()),activeAt:S.Optional(S.String())}),ryi=S.Object({files:S.Array(CBa)}),vBa=3,mEr=class{constructor(e){this.turnContext=e}static{a(this,"RecentFilesSkillProcessor")}value(){return .7}async processSkill(e){let r=await this.getDocuments(e);if(r.length>0){let n=this.toElidableDocs(r),o=W6(n,"inversePositional");return await this.preElideDocuments(o)}}async getDocuments(e){let r=this.sortFiles(e.files);r=this.filterIncludedDocs(r);let n=this.turnContext.ctx.get(In),o=[];for(let s of r){let c=await n.getOrReadTextDocument(s),l=Gl(c);if(await this.turnContext.collectFile(o0t,s.uri,l),c.status==="valid"&&l!=="empty"&&(o.push([c.document,s]),o.length===vBa))break}return o.reverse()}sortFiles(e){return e.sort((r,n)=>r.activeAt&&n.activeAt?new Date(r.activeAt).getTime()-new Date(n.activeAt).getTime():r.activeAt?-1:n.activeAt?1:0).reverse()}filterIncludedDocs(e){return e.filter(r=>!this.turnContext.isFileIncluded(r.uri))}toElidableDocs(e){return e.map(r=>{let[n,o]=r,s=this.turnContext.ctx.get(In).getRelativePath(n),c=new ek(n,void 0,o.visibleRange);return new nr([[`Code excerpt from file \`${s}\`:`,1],[c.fromAllCode({addLineNumbers:!1}),.9]])})}async preElideDocuments(e){let r=(await qo.getModelConfiguration(this.turnContext.ctx,"user")).maxRequestTokens,n=e.elide(Math.floor(r*.1)).getText();return new nr([n])}},o0t="recent-files",i0t=class extends ch{static{a(this,"RecentFilesSkill")}constructor(e){super(o0t,"Provides code examples helpful for creating, explaining, refactoring, or fixing code. It's based on the files the user has worked on in the editor.","Resolving recent files",()=>e,r=>new mEr(r))}};f();var nyi=S.String(),gEr=class{constructor(e){this.turnContext=e}static{a(this,"RuntimeLogsSkillProcessor")}value(){return .9}processSkill(e){return this.turnContext.collectLabel(a0t,"runtime logs"),`The contents of the application runtime logs: \`\`\` ${e} -\`\`\``}},Z0t="runtime-logs",X0t=class extends mh{static{a(this,"RuntimeLogsSkill")}constructor(e){super(Z0t,"The application runtime or debug logs, which are used to view output logs from the console. This is useful for debugging and troubleshooting runtime issues.","Reading runtime logs",()=>e,r=>new Jyr(r))}};f();var ept=de(Fx());var tpt=class extends g0{constructor(r){super();this.ctx=r}static{a(this,"AgentConversationInspector")}shouldInspect(){return uDe(this.ctx)}get connection(){if(this.shouldInspect())return this.ctx.get(Ar).connection}async inspectPrompt(r){return this.connection?.sendNotification(new ept.NotificationType("conversation/inspectPrompt"),r)}async inspectFetchResult(r){return this.connection?.sendNotification(new ept.NotificationType("conversation/inspectFetchResult"),r)}async documentDiff(r){return this.connection?.sendNotification(new ept.NotificationType("conversation/documentDiff"),r)}};f();var iAi=de(Su());var JPe=class{constructor(e){this.ctx=e;this.notificationEndpoint="conversation/preconditionsNotification";e.get(SI).onChange(r=>{this.sendNotification(r)})}static{a(this,"PreconditionsNotifier")}sendNotification(e){return this.ctx.get(Ar).connection.sendNotification(new iAi.NotificationType(this.notificationEndpoint),e)}};function oAi(t){COa(t),_Oa(t),eAi(t)}a(oAi,"activateConversationFeature");function COa(t){JDt(t),t.set(ho,new ho(t)),t.set(gh,new gh),t.set(vm,new vm(t)),t.set(Da,new F9e(t)),t.set(V3,new V3),t.set(Na,new Na(t)),t.set(SI,new SI(t)),t.set(JPe,new JPe(t)),t.set(cl,new $Le(t,new jLe(t))),t.set(E2,new E2),t.set(xF,new xF),t.set(g0,new tpt(t)),t.set(Fd,new Fd(t)),t.set(bm,new bm),t.set(ov,new ov),t.set(cw,new cw(t)),t.set(KPe,new KPe(t,async()=>!await qF(t)))}a(COa,"registerContextDependencies");function _Oa(t){let e=new A0;qF(t).then(r=>{r?e.registerSkill(new JCe(new zqe)):e.registerSkill(new JCe(new Yqe))}),e.registerSkill(new oUe(new uE(t,pk,dVr))),e.registerSkill(new W7e(new uE(t,tw,sVr))),e.registerSkill(new V7e(new uE(t,Vg,oVr))),e.registerSkill(new sUe),e.registerSkill(new Y0t),e.registerSkill(new K0t(new uE(t,J0t,rAi))),e.registerSkill(new BUe(new uE(t,Ak,CWr))),e.registerSkill(new eGe(new uE(t,HF,AZr))),e.registerSkill(new X0t(new uE(t,Z0t,nAi))),e.registerSkill(new W0t(new uE(t,z0t,tAi))),e.registerSkill(new rGe(new uE(t,lw,yZr))),e.registerSkill(new nGe(new uE(t,N$,EZr))),t.set(A0,e)}a(_Oa,"registerSkills");f();var sAi=de(Su()),aAi=de(Fx());var rpt=class extends ku{constructor(){super(...arguments);this.requestType=new sAi.ProtocolRequestType("conversation/invokeClientToolConfirmation");this.typeCheck=Ol.Compile(RGr)}static{a(this,"AgentClientToolConfirmationInvoker")}async invokeClientToolConfirmation(r,n){let o=this.ctx.get(Ar).connection,s;try{let c=await o.sendRequest(this.requestType,n),[l,u]=c;if(u){let d=new aAi.ResponseError(u.code,u.message,u.data);throw Ge.error(this.ctx,`ResponseError while invoking client tool confirmation ${n.name}`,d),new Error(`Failed to invoke client tool confirmation ${n.name}: ${u.message}`)}s=l}catch(c){throw new Error(`Failed to invoke client tool confirmation ${n.name}: ${String(c)}`)}if(s==null)throw new Error(`Failed to invoke client tool confirmation ${n.name}: No result returned`);if(!this.typeCheck.Check(s))throw new Om(this.typeCheck.Errors(s));return s}};f();var cAi=de(Su()),lAi=de(Fx());var npt=class extends ay{constructor(){super(...arguments);this.requestType=new cAi.ProtocolRequestType("conversation/invokeClientTool");this.typeCheck=Ol.Compile(wGr)}static{a(this,"AgentClientToolInvoker")}async invokeClientTool(r,n){let o=this.ctx.get(Ar).connection,s;try{let c=await o.sendRequest(this.requestType,n),[l,u]=c;if(u){let d=new lAi.ResponseError(u.code,u.message,u.data);throw Ge.error(this.ctx,`ResponseError while invoking client tool ${n.name}`,d),new Error(`Failed to invoke client tool ${n.name}: ${u.message}`)}s=l}catch(c){throw new Error(`Failed to invoke client tool ${n.name}: ${String(c)}`)}if(s==null)throw new Error(`Failed to invoke client tool ${n.name}: No result returned`);if(!this.typeCheck.Check(s))throw new Om(this.typeCheck.Errors(s));return this.transformToToolResult(s)}transformToToolResult(r){let n=r.content.map(o=>typeof o.value=="string"?new fr(o.value):new Wj(o.value));return new Cr(n,r.status??"success")}};f();f();function uAi(t,e,r){try{let n=t.get(jt).javaContextProviderParams(r);if(n){let o=JSON.parse(n);for(let[s,c]of Object.entries(o))e.set(s,c)}}catch(n){return _r.debug(t,"Failed to get the active Java experiments for the Context Provider API",n),!1}return!0}a(uAi,"fillInJavaActiveExperiments");var Xyr=de(Fx());var vOa={type:new Xyr.NotificationType("featureFlagsNotification")},bOa={type:new Xyr.NotificationType("copilot/didChangeFeatureFlags")},XPe=class{constructor(e){this.ctx=e;ss(e,r=>this.sendNotification(r))}static{a(this,"FeatureFlagsNotifier")}async sendNotification(e){let r=this.ctx,n=!1,o=!1,s=r.get(jt),c=await s.updateExPValuesAndAssignments(e);n=s.ideDataMigrationCompleted(c),o=s.appmodContextMenuEnabled(c);let l={};r.get(jt).excludeRelatedFiles(c)&&(l.ExcludeRelatedFiles=!0);let u=LHt(r,c);u.length>0&&(l.ExpContextProviders=u);let d=new Map;bvn(r,u,d,c),$Ye(r,d,c),uAi(r,d,c);for(let[m,g]of d.entries())l[m]=g;let p=r.get(Fn),h=r.get(Ar).connection;if(p.getCapabilities().didChangeFeatureFlags)await h.sendNotification(bOa.type,{envelope:{...e.envelope,token:void 0,expires_at:void 0,refresh_in:void 0,user_notification:void 0,limited_user_quotas:void 0,limited_user_reset_date:void 0,error_details:void 0,organization_list:void 0,enterprise_list:void 0,endpoints:void 0},token:e.getTokenValues(),activeExps:l,byok:Cne(e),data_migration_completed:n,appmod_context_menu_enabled:o});else{let m={rt:e.getTokenValue("rt")==="1",sn:e.getTokenValue("sn")==="1",chat:e.envelope.chat_enabled??!1,ic:e.envelope.chat_enabled??!1,pc:!0,ae:l,byok:Cne(e),data_migration_completed:n,appmod_context_menu_enabled:o};e.getTokenValue("agent_mode")==="0"&&(m.agent_mode=!1),e.getTokenValue("agent_mode_auto_approval")==="0"&&(m.agent_mode_auto_approval=!1),e.getTokenValue("mcp")==="0"&&(m.mcp=!1),e.envelope.xcode_chat&&e.envelope.chat_enabled&&(m.xc=!0),await h.sendNotification(vOa.type,m)}}};f();var ipt=class extends Xs{constructor(r){super();this.ctx=r;this.notificationEndpoint="statusNotification"}static{a(this,"NotificationStatusReporter")}didChange(r){let n=r.kind;r.busy&&n!=="Error"&&(n="InProgress"),this.ctx.get(Ar).connection.sendNotification(J2t.type,{busy:r.busy,kind:r.kind,status:n,message:r.message??""}),this.ctx.get(Ar).connection.sendNotification("didChangeStatus",{busy:r.busy,kind:r.kind,message:r.message,command:r.command})}};f();var dAi=new Se("AgentEncodingConfigurationService"),opt=class extends dk{static{a(this,"AgentEncodingConfigurationService")}constructor(e){super(e),this.service=e.get(Ar)}async requestEncodingFromClient(e){if(!this.service.clientCapabilities?.workspace?.configuration){dAi.debug(this.ctx,"Client does not support workspace/configuration, using UTF-8 fallback");return}try{let o=(await this.service.connection.workspace.getConfiguration([{scopeUri:e,section:"copilot.file.encoding"}]))[0];return o&&["utf8","utf-8","utf16le","ucs2","ucs-2","base64","base64url","latin1","binary","hex","ascii"].includes(o)?o:void 0}catch(n){dAi.debug(this.ctx,`Unable to request encoding for ${e}, using UTF-8 fallback`,n);return}}};f();var fAi=new _6;f();var mAi=de(Nn());var gAi={"mcp.contributionPoint.enabled":{description:"Whether extension-contributed MCP servers are enabled",defaultValue:!0,type:"boolean"},"customAgent.enabled":{description:"Whether custom agent functionality is enabled",defaultValue:!0,type:"boolean"},"subagent.enabled":{description:"Whether subagent functionality is enabled",defaultValue:!0,type:"boolean"},"autoModel.enabled":{description:"Whether auto model functionality is enabled",defaultValue:!0,type:"boolean"},"cveRemediatorAgent.enabled":{description:"Whether CVE remediator agent functionality is enabled",defaultValue:!0,type:"boolean"},"agentMode.autoApproval.enabled":{description:"Whether agent mode auto-approval is enabled",defaultValue:!0,type:"boolean"}},TOa=new mAi.NotificationType("policy/didChange"),SOa=Object.fromEntries(Object.entries(gAi).map(([t,e])=>[t,{type:e.type}])),ZPe=class extends Cm{constructor(r,n){super();this.ctx=r;this.connection=n;this.disposed=!1;this.policyValues=new Map(Object.entries(gAi).map(([r,n])=>[r,n.defaultValue]));let o=r.get(Ar);o.onActivation(()=>{this.startWatching().catch(s=>{_r.error(this.ctx,"Unexpected error starting policy watcher:",s)})}),o.onDeactivation(()=>{this.dispose()})}static{a(this,"GroupPolicyWatcher")}async startWatching(){try{let{createWatcher:r}=await Promise.resolve().then(()=>de(hAi()));this.policyWatcher=r("IDEGitHubCopilot",SOa,n=>{this.handlePolicyUpdate(n).catch(o=>{_r.error(this.ctx,"Error in handlePolicyUpdate:",o)})}),_r.info(this.ctx,"Policy watcher started for GitHub Copilot Plugin")}catch(r){process.platform==="darwin"||process.platform==="win32"?_r.exception(this.ctx,r,"Policy watcher failed to load on supported platform"):_r.warn(this.ctx,"Policy watcher not available - continuing without policy watching:",r instanceof Error?r.message:String(r))}}async handlePolicyUpdate(r){_r.debug(this.ctx,"GroupPolicyWatcher - policy update triggered",r);for(let[n,o]of Object.entries(r))if(o!==void 0){let s=n;this.policyValues.set(s,o),_r.debug(this.ctx,`Policy change: ${n} = ${o}`)}this.policyValues.get("subagent.enabled")===!1&&this.ctx.get(Fn).setCapabilities({subAgent:!1}),this.policyValues.get("cveRemediatorAgent.enabled")===!1&&this.ctx.get(Fn).setCapabilities({cveRemediatorAgent:!1}),await this.sendPolicyChangeNotification()}getAllPolicyValues(){let r={};for(let[n,o]of this.policyValues.entries())r[n]=o;return r}getPolicyValue(r){return this.policyValues.get(r)}sendPolicyChangeNotification(){if(this.disposed)return Promise.resolve();let r=this.getAllPolicyValues();try{return this.connection.sendNotification(TOa,r)}catch{return Promise.resolve()}}dispose(){if(!this.disposed){if(this.disposed=!0,this.policyWatcher){try{this.policyWatcher.dispose()}catch(r){_r.error(this.ctx,"Error disposing policy watcher:",r)}this.policyWatcher=void 0}_r.debug(this.ctx,"Policy watcher stopped")}}};f();var I2=class{static{a(this,"McpAuthService")}},spt=class extends I2{static{a(this,"CLSMcpAuthServer")}constructor(e){super(),this.ctx=e}getAccountPreference(e,r){let n=this._getAccountPreferenceKey(e,r);return this.ctx.get(Zh).get(n)}updateAccountPreference(e,r,n){let o=this._getAccountPreferenceKey(e,r);this.ctx.get(Zh).set(o,n.label)}removeAccountPreference(e,r){let n=this._getAccountPreferenceKey(e,r);this.ctx.get(Zh).delete(n)}_getAccountPreferenceKey(e,r){return`mcp-${e}-${r}`}};f();f();f();var Kt=new Se("CopilotMCP");async function eEr(t,e){await t.get(S2).notifyLog(e)}a(eEr,"notifyMCPRuntimeLog");async function qp(t,e){await eEr(t,{...e,level:"error"})}a(qp,"notifyMCPRuntimeError");async function yX(t,e){await eEr(t,{...e,level:"warning"})}a(yX,"notifyMCPRuntimeWarning");async function _a(t,e){await eEr(t,{...e,level:"info"})}a(_a,"notifyMCPRuntimeInfo");f();var m5="2025-11-25";var AAi=[m5,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Aq="io.modelcontextprotocol/related-task",cpt="2.0",ug=FLt(t=>t!==null&&(typeof t=="object"||typeof t=="function")),yAi=oc([Me(),na().int()]),EAi=Me(),tYf=S0({ttl:oc([na(),p1e()]).optional(),pollInterval:na().optional()}),xOa=kr({ttl:na().optional()}),wOa=kr({taskId:Me()}),rEr=S0({progressToken:yAi.optional(),[Aq]:wOa.optional()}),wb=kr({_meta:rEr.optional()}),eke=wb.extend({task:xOa.optional()}),CAi=a(t=>eke.safeParse(t).success,"isTaskAugmentedRequestParams"),dg=kr({method:Me(),params:wb.loose().optional()}),xI=kr({_meta:rEr.optional()}),wI=kr({method:Me(),params:xI.loose().optional()}),fg=S0({_meta:rEr.optional()}),lpt=oc([Me(),na().int()]),_Ai=kr({jsonrpc:vn(cpt),id:lpt,...dg.shape}).strict(),tke=a(t=>_Ai.safeParse(t).success,"isJSONRPCRequest"),vAi=kr({jsonrpc:vn(cpt),...wI.shape}).strict(),bAi=a(t=>vAi.safeParse(t).success,"isJSONRPCNotification"),nEr=kr({jsonrpc:vn(cpt),id:lpt,result:fg}).strict(),EX=a(t=>nEr.safeParse(t).success,"isJSONRPCResultResponse");var kn;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(kn||(kn={}));var iEr=kr({jsonrpc:vn(cpt),id:lpt.optional(),error:kr({code:na().int(),message:Me(),data:Zl().optional()})}).strict();var TAi=a(t=>iEr.safeParse(t).success,"isJSONRPCErrorResponse");var yq=oc([_Ai,vAi,nEr,iEr]),rYf=oc([nEr,iEr]),CX=fg.strict(),ROa=xI.extend({requestId:lpt.optional(),reason:Me().optional()}),upt=wI.extend({method:vn("notifications/cancelled"),params:ROa}),POa=kr({src:Me(),mimeType:Me().optional(),sizes:br(Me()).optional(),theme:Cy(["light","dark"]).optional()}),rke=kr({icons:br(POa).optional()}),U0e=kr({name:Me(),title:Me().optional()}),SAi=U0e.extend({...U0e.shape,...rke.shape,version:Me(),websiteUrl:Me().optional(),description:Me().optional()}),kOa=h1e(kr({applyDefaults:ic().optional()}),ml(Me(),Zl())),NOa=n$e(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,h1e(kr({form:kOa.optional(),url:ug.optional()}),ml(Me(),Zl()).optional())),DOa=S0({list:ug.optional(),cancel:ug.optional(),requests:S0({sampling:S0({createMessage:ug.optional()}).optional(),elicitation:S0({create:ug.optional()}).optional()}).optional()}),MOa=S0({list:ug.optional(),cancel:ug.optional(),requests:S0({tools:S0({call:ug.optional()}).optional()}).optional()}),OOa=kr({experimental:ml(Me(),ug).optional(),sampling:kr({context:ug.optional(),tools:ug.optional()}).optional(),elicitation:NOa.optional(),roots:kr({listChanged:ic().optional()}).optional(),tasks:DOa.optional()}),BOa=wb.extend({protocolVersion:Me(),capabilities:OOa,clientInfo:SAi}),LOa=dg.extend({method:vn("initialize"),params:BOa});var FOa=kr({experimental:ml(Me(),ug).optional(),logging:ug.optional(),completions:ug.optional(),prompts:kr({listChanged:ic().optional()}).optional(),resources:kr({subscribe:ic().optional(),listChanged:ic().optional()}).optional(),tools:kr({listChanged:ic().optional()}).optional(),tasks:MOa.optional()}),oEr=fg.extend({protocolVersion:Me(),capabilities:FOa,serverInfo:SAi,instructions:Me().optional()}),IAi=wI.extend({method:vn("notifications/initialized"),params:xI.optional()}),xAi=a(t=>IAi.safeParse(t).success,"isInitializedNotification"),dpt=dg.extend({method:vn("ping"),params:wb.optional()}),UOa=kr({progress:na(),total:eu(na()),message:eu(Me())}),QOa=kr({...xI.shape,...UOa.shape,progressToken:yAi}),fpt=wI.extend({method:vn("notifications/progress"),params:QOa}),qOa=wb.extend({cursor:EAi.optional()}),nke=dg.extend({params:qOa.optional()}),ike=fg.extend({nextCursor:EAi.optional()}),GOa=Cy(["working","input_required","completed","failed","cancelled"]),oke=kr({taskId:Me(),status:GOa,ttl:oc([na(),p1e()]),createdAt:Me(),lastUpdatedAt:Me(),pollInterval:eu(na()),statusMessage:eu(Me())}),_X=fg.extend({task:oke}),HOa=xI.merge(oke),ske=wI.extend({method:vn("notifications/tasks/status"),params:HOa}),ppt=dg.extend({method:vn("tasks/get"),params:wb.extend({taskId:Me()})}),hpt=fg.merge(oke),mpt=dg.extend({method:vn("tasks/result"),params:wb.extend({taskId:Me()})}),nYf=fg.loose(),gpt=nke.extend({method:vn("tasks/list")}),Apt=ike.extend({tasks:br(oke)}),ypt=dg.extend({method:vn("tasks/cancel"),params:wb.extend({taskId:Me()})}),wAi=fg.merge(oke),RAi=kr({uri:Me(),mimeType:eu(Me()),_meta:ml(Me(),Zl()).optional()}),PAi=RAi.extend({text:Me()}),sEr=Me().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),kAi=RAi.extend({blob:sEr}),ake=Cy(["user","assistant"]),Q0e=kr({audience:br(ake).optional(),priority:na().min(0).max(1).optional(),lastModified:_oe.datetime({offset:!0}).optional()}),NAi=kr({...U0e.shape,...rke.shape,uri:Me(),description:eu(Me()),mimeType:eu(Me()),annotations:Q0e.optional(),_meta:eu(S0({}))}),jOa=kr({...U0e.shape,...rke.shape,uriTemplate:Me(),description:eu(Me()),mimeType:eu(Me()),annotations:Q0e.optional(),_meta:eu(S0({}))}),$Oa=nke.extend({method:vn("resources/list")}),aEr=ike.extend({resources:br(NAi)}),VOa=nke.extend({method:vn("resources/templates/list")}),cEr=ike.extend({resourceTemplates:br(jOa)}),lEr=wb.extend({uri:Me()}),WOa=lEr,zOa=dg.extend({method:vn("resources/read"),params:WOa}),uEr=fg.extend({contents:br(oc([PAi,kAi]))}),cke=wI.extend({method:vn("notifications/resources/list_changed"),params:xI.optional()}),YOa=lEr,KOa=dg.extend({method:vn("resources/subscribe"),params:YOa}),JOa=lEr,XOa=dg.extend({method:vn("resources/unsubscribe"),params:JOa}),ZOa=xI.extend({uri:Me()}),dEr=wI.extend({method:vn("notifications/resources/updated"),params:ZOa}),e4a=kr({name:Me(),description:eu(Me()),required:eu(ic())}),t4a=kr({...U0e.shape,...rke.shape,description:eu(Me()),arguments:eu(br(e4a)),_meta:eu(S0({}))}),r4a=nke.extend({method:vn("prompts/list")}),fEr=ike.extend({prompts:br(t4a)}),n4a=wb.extend({name:Me(),arguments:ml(Me(),Me()).optional()}),i4a=dg.extend({method:vn("prompts/get"),params:n4a}),pEr=kr({type:vn("text"),text:Me(),annotations:Q0e.optional(),_meta:ml(Me(),Zl()).optional()}),hEr=kr({type:vn("image"),data:sEr,mimeType:Me(),annotations:Q0e.optional(),_meta:ml(Me(),Zl()).optional()}),mEr=kr({type:vn("audio"),data:sEr,mimeType:Me(),annotations:Q0e.optional(),_meta:ml(Me(),Zl()).optional()}),o4a=kr({type:vn("tool_use"),name:Me(),id:Me(),input:ml(Me(),Zl()),_meta:ml(Me(),Zl()).optional()}),s4a=kr({type:vn("resource"),resource:oc([PAi,kAi]),annotations:Q0e.optional(),_meta:ml(Me(),Zl()).optional()}),a4a=NAi.extend({type:vn("resource_link")}),gEr=oc([pEr,hEr,mEr,a4a,s4a]),c4a=kr({role:ake,content:gEr}),AEr=fg.extend({description:Me().optional(),messages:br(c4a)}),lke=wI.extend({method:vn("notifications/prompts/list_changed"),params:xI.optional()}),l4a=kr({title:Me().optional(),readOnlyHint:ic().optional(),destructiveHint:ic().optional(),idempotentHint:ic().optional(),openWorldHint:ic().optional()}),u4a=kr({taskSupport:Cy(["required","optional","forbidden"]).optional()}),DAi=kr({...U0e.shape,...rke.shape,description:Me().optional(),inputSchema:kr({type:vn("object"),properties:ml(Me(),ug).optional(),required:br(Me()).optional()}).catchall(Zl()),outputSchema:kr({type:vn("object"),properties:ml(Me(),ug).optional(),required:br(Me()).optional()}).catchall(Zl()).optional(),annotations:l4a.optional(),execution:u4a.optional(),_meta:ml(Me(),Zl()).optional()}),d4a=nke.extend({method:vn("tools/list")}),yEr=ike.extend({tools:br(DAi)}),Eq=fg.extend({content:br(gEr).default([]),structuredContent:ml(Me(),Zl()).optional(),isError:ic().optional()}),iYf=Eq.or(fg.extend({toolResult:Zl()})),f4a=eke.extend({name:Me(),arguments:ml(Me(),Zl()).optional()}),p4a=dg.extend({method:vn("tools/call"),params:f4a}),uke=wI.extend({method:vn("notifications/tools/list_changed"),params:xI.optional()}),MAi=kr({autoRefresh:ic().default(!0),debounceMs:na().int().nonnegative().default(300)}),OAi=Cy(["debug","info","notice","warning","error","critical","alert","emergency"]),h4a=wb.extend({level:OAi}),m4a=dg.extend({method:vn("logging/setLevel"),params:h4a}),g4a=xI.extend({level:OAi,logger:Me().optional(),data:Zl()}),EEr=wI.extend({method:vn("notifications/message"),params:g4a}),A4a=kr({name:Me().optional()}),y4a=kr({hints:br(A4a).optional(),costPriority:na().min(0).max(1).optional(),speedPriority:na().min(0).max(1).optional(),intelligencePriority:na().min(0).max(1).optional()}),E4a=kr({mode:Cy(["auto","required","none"]).optional()}),C4a=kr({type:vn("tool_result"),toolUseId:Me().describe("The unique identifier for the corresponding tool call."),content:br(gEr).default([]),structuredContent:kr({}).loose().optional(),isError:ic().optional(),_meta:ml(Me(),Zl()).optional()}),_4a=t$e("type",[pEr,hEr,mEr]),apt=t$e("type",[pEr,hEr,mEr,o4a,C4a]),v4a=kr({role:ake,content:oc([apt,br(apt)]),_meta:ml(Me(),Zl()).optional()}),b4a=eke.extend({messages:br(v4a),modelPreferences:y4a.optional(),systemPrompt:Me().optional(),includeContext:Cy(["none","thisServer","allServers"]).optional(),temperature:na().optional(),maxTokens:na().int(),stopSequences:br(Me()).optional(),metadata:ug.optional(),tools:br(DAi).optional(),toolChoice:E4a.optional()}),dke=dg.extend({method:vn("sampling/createMessage"),params:b4a}),CEr=fg.extend({model:Me(),stopReason:eu(Cy(["endTurn","stopSequence","maxTokens"]).or(Me())),role:ake,content:_4a}),_Er=fg.extend({model:Me(),stopReason:eu(Cy(["endTurn","stopSequence","maxTokens","toolUse"]).or(Me())),role:ake,content:oc([apt,br(apt)])}),T4a=kr({type:vn("boolean"),title:Me().optional(),description:Me().optional(),default:ic().optional()}),S4a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),minLength:na().optional(),maxLength:na().optional(),format:Cy(["email","uri","date","date-time"]).optional(),default:Me().optional()}),I4a=kr({type:Cy(["number","integer"]),title:Me().optional(),description:Me().optional(),minimum:na().optional(),maximum:na().optional(),default:na().optional()}),x4a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),enum:br(Me()),default:Me().optional()}),w4a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),oneOf:br(kr({const:Me(),title:Me()})),default:Me().optional()}),R4a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),enum:br(Me()),enumNames:br(Me()).optional(),default:Me().optional()}),P4a=oc([x4a,w4a]),k4a=kr({type:vn("array"),title:Me().optional(),description:Me().optional(),minItems:na().optional(),maxItems:na().optional(),items:kr({type:vn("string"),enum:br(Me())}),default:br(Me()).optional()}),N4a=kr({type:vn("array"),title:Me().optional(),description:Me().optional(),minItems:na().optional(),maxItems:na().optional(),items:kr({anyOf:br(kr({const:Me(),title:Me()}))}),default:br(Me()).optional()}),D4a=oc([k4a,N4a]),M4a=oc([R4a,P4a,D4a]),O4a=oc([M4a,T4a,S4a,I4a]),B4a=eke.extend({mode:vn("form").optional(),message:Me(),requestedSchema:kr({type:vn("object"),properties:ml(Me(),O4a),required:br(Me()).optional()})}),L4a=eke.extend({mode:vn("url"),message:Me(),elicitationId:Me(),url:Me().url()}),F4a=oc([B4a,L4a]),fke=dg.extend({method:vn("elicitation/create"),params:F4a}),U4a=xI.extend({elicitationId:Me()}),Q4a=wI.extend({method:vn("notifications/elicitation/complete"),params:U4a}),vEr=fg.extend({action:Cy(["accept","decline","cancel"]),content:n$e(t=>t===null?void 0:t,ml(Me(),oc([Me(),na(),ic(),br(Me())])).optional())}),q4a=kr({type:vn("ref/resource"),uri:Me()});var G4a=kr({type:vn("ref/prompt"),name:Me()}),H4a=wb.extend({ref:oc([G4a,q4a]),argument:kr({name:Me(),value:Me()}),context:kr({arguments:ml(Me(),Me()).optional()}).optional()}),j4a=dg.extend({method:vn("completion/complete"),params:H4a});var bEr=fg.extend({completion:S0({values:br(Me()).max(100),total:eu(na().int()),hasMore:eu(ic())})}),$4a=kr({uri:Me().startsWith("file://"),name:Me().optional(),_meta:ml(Me(),Zl()).optional()}),TEr=dg.extend({method:vn("roots/list"),params:wb.optional()}),V4a=fg.extend({roots:br($4a)}),W4a=wI.extend({method:vn("notifications/roots/list_changed"),params:xI.optional()}),oYf=oc([dpt,LOa,j4a,m4a,i4a,r4a,$Oa,VOa,zOa,KOa,XOa,p4a,d4a,ppt,mpt,gpt,ypt]),sYf=oc([upt,fpt,IAi,W4a,ske]),aYf=oc([CX,CEr,_Er,vEr,V4a,hpt,Apt,_X]),cYf=oc([dpt,dke,fke,TEr,ppt,mpt,gpt,ypt]),lYf=oc([upt,fpt,EEr,dEr,cke,uke,lke,ske,Q4a]),uYf=oc([CX,oEr,bEr,AEr,fEr,aEr,cEr,uEr,Eq,yEr,hpt,Apt,_X]),An=class t extends Error{static{a(this,"McpError")}constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===kn.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new tEr(o.elicitations,r)}return new t(e,r,n)}},tEr=class extends An{static{a(this,"UrlElicitationRequiredError")}constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(kn.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};var SEr=class{static{a(this,"AuthMetadata")}},Ept=class extends SEr{static{a(this,"MCPAuthMetadata")}constructor(e){super(),this.ctx=e}async getMetadataFromOriginalUrl(e,r){let n=await this.getResourceMetadataChallenge(e),o,s,c,l=await this.getResourceMetadata(n,{url:e,headers:r??{}});l.resource&&(o=l.authorization_servers?.[0],s=l.scopes_supported,c=l);let u=new URL(e).origin,d={};o||(o=u,d=r??{});let p;try{let m=await this.getAuthorizationServerMetadata(o,d),g=Ggi(m);return p={authorizationServer:o,serverMetadata:g,resourceMetadata:c},Kt.info(this.ctx,"authMetadata",p),p}catch(m){Kt.warn(this.ctx,`Error populating auth metadata: ${String(m)}`)}let h=Hgi(new URL(u));return h.scopes_supported=s??h.scopes_supported??[],p={authorizationServer:o,serverMetadata:h,resourceMetadata:c},p}async getResourceMetadataChallenge(e){let r=await lX(this.ctx,e,"POST"),n;if(r.status===401&&r.headers.has("WWW-Authenticate")){let o=r.headers.get("WWW-Authenticate"),{scheme:s,params:c}=U0t(o);s==="Bearer"&&c.resource_metadata&&(n=c.resource_metadata)}return n}async getResourceMetadata(e,r){if(!e)return{resource:""};let n=new URL(e),o=new URL(r.url),s={};n.origin===o.origin&&(s=r.headers);let c=await lX(this.ctx,e,"GET",{...s,Accept:"application/json","MCP-Protocol-Version":m5});if(c.status!==200)throw new Error(`Failed to fetch resource metadata: ${c.status} ${await wAr(c)}`);let l=await c.json();if(Qgi(l)){let u=jgi(e),d=new URL(l.resource).toString(),p=new URL(u).toString();if(d!==p)throw new Error(`Protected Resource Metadata resource "${d}" does not match MCP server resolved resource "${p}". The MCP server must follow OAuth spec https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation`);return l}else throw new Error(`Invalid resource metadata: ${JSON.stringify(l)}`)}async getAuthorizationServerMetadata(e,r){let n=new URL(e),o=n.pathname==="/"?"":n.pathname,s=new URL(Fgi,e).toString()+o,c=await lX(this.ctx,s,"GET",{...r,Accept:"application/json","MCP-Protocol-Version":m5});if(c.status!==200&&(c=await lX(this.ctx,Ti(e,".well-known","openid-configuration"),"GET",{...r,Accept:"application/json","MCP-Protocol-Version":m5}),c.status!==200))throw new Error(`Failed to fetch authorization server metadata: ${c.status} ${await wAr(c)}`);let l=await c.json();if(qgi(l))return l;throw new Error(`Invalid authorization server metadata: ${JSON.stringify(l)}`)}};f();f();f();var BAi=de(Nn());var Cpt="mcp.elicitation",_pt=class{constructor(){this.ongoingMcpElicitationCalls=!1;this.elicitationRequestType=new BAi.ProtocolRequestType("copilot/mcpElicitation")}static{a(this,"ElicitationHandler")}async handleRequest(e,r,n,o,s){if(this.ongoingMcpElicitationCalls)throw new An(kn.InternalError,"Another MCP elicitation request is already in progress.");this.ongoingMcpElicitationCalls=!0;try{let c=n.params.message;if("url"in n.params)throw new An(kn.InvalidRequest,"URL mode elicitation is not supported");let l=n.params.requestedSchema;Kt.info(e.ctx,`MCP server ${r} elicitation request received: ${c}`),await _a(e.ctx,{message:`MCP server ${r} elicitation request received: ${c}`,server:r});let d=await e.ctx.get(hk).sendRequest(this.elicitationRequestType,{mcpServer:r,message:c,requestedSchema:l,conversationId:e.conversation.id.toString(),roundId:o??e.agentToolCalls.getRound(0).roundId,turnId:e.turn.id.toString(),toolCallId:s??e.agentToolCalls.getRound(0).toolCalls[0].id});return at(e.ctx,Cpt,yt.createAndMarkAsIssued()),yi(e.ctx,Cpt),d}catch(c){let l=`Failed to process elicitation request: ${c instanceof Error?c.message:String(c)}`;throw Kt.error(e.ctx,l,c),await qp(e.ctx,{message:l,server:r}),qo(e.ctx,c,Cpt),_u(e.ctx,Cpt,c),new An(kn.InternalError,l)}finally{this.ongoingMcpElicitationCalls=!1}}};f();f();f();var RI=class{static{a(this,"MCPNotificationHandler")}constructor(e,r){this.ctx=e,this.serverName=r}};var pke=class extends RI{static{a(this,"LoggingMessageNotificationHandler")}constructor(e,r){super(e,r)}handle(e){let r=typeof e.params.data=="string"?e.params.data:JSON.stringify(e.params.data);switch(e.params.logger&&(r=`${e.params.logger}: ${r}`),e.params?.level){case"debug":case"info":case"notice":Kt.info(this.ctx,`MCP server ${this.serverName} log:`,r),_a(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;case"warning":Kt.warn(this.ctx,`MCP server ${this.serverName} log:`,r),yX(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;case"error":case"critical":case"alert":case"emergency":Kt.error(this.ctx,`MCP server ${this.serverName} log:`,r),qp(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;default:Kt.info(this.ctx,`MCP server ${this.serverName} log:`,r),_a(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break}}};f();var hke=class extends RI{static{a(this,"PromptListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Kt.info(this.ctx,"Prompts list changed, refreshing prompts..."),_a(this.ctx,{message:"Prompts list changed, refreshing prompts...",server:this.serverName}),this.emitter.emit(gft)}};f();var mke=class extends RI{static{a(this,"ResourceListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Kt.info(this.ctx,"Resource list changed, refreshing resources..."),_a(this.ctx,{message:"Resource list changed, refreshing resources...",server:this.serverName}),this.emitter.emit(mft)}};f();var gke=class extends RI{static{a(this,"ResourceUpdatedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Kt.info(this.ctx,`Resource updated for URI: ${e.params.uri}`),_a(this.ctx,{message:`Resource updated: ${e.params.uri}`,server:this.serverName}),this.emitter.emit(s0i)}};f();var vpt=class{static{a(this,"MCPRequestHandler")}constructor(e,r){this.ctx=e,this.serverName=r}},Ake=class extends vpt{static{a(this,"ListRootsRequestHandler")}constructor(e,r){super(e,r)}handle(e){Kt.info(this.ctx,`MCP server ${this.serverName} requested roots list`);let r=[];try{(this.ctx.get(zr).getWorkspaceFolders()||[]).forEach(o=>{r.push(o)}),_a(this.ctx,{message:`Requested roots list and found ${r.length} root(s).`,server:this.serverName})}catch(n){Kt.error(this.ctx,`Error getting workspace folders for MCP server ${this.serverName}:`,n),qp(this.ctx,{message:`Error getting workspace folders for MCP server ${this.serverName}: ${n instanceof Error?n.message:String(n)}`,server:this.serverName})}return{roots:r}}};f();var yke=class extends RI{static{a(this,"ToolListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Kt.info(this.ctx,"Tool list changed, refreshing tools..."),_a(this.ctx,{message:"Tool list changed, refreshing tools...",server:this.serverName}),this.emitter.emit(hft)}};f();var LAi="mcp.sampling",bpt=class{constructor(){this.defaultTemperature=.7;this.ongoingMcpSamplingCalls=!1}static{a(this,"McpSamplingService")}async handleSamplingRequest(e,r,n,o,s,c){try{if(this.ongoingMcpSamplingCalls)throw new An(kn.InternalError,"Another MCP sampling request is already in progress.");this.ongoingMcpSamplingCalls=!0,Kt.info(e.ctx,`MCP server ${o} requested sampling:`,n.params),await _a(e.ctx,{message:`Sampling request received from ${o}: ${JSON.stringify({messageCount:n.params.messages.length,systemPrompt:n.params.systemPrompt?"provided":"none",maxTokens:n.params.maxTokens,temperature:n.params.temperature})}`,server:o});let l=await e.ctx.get(gq).readMcpSamplingConfig({serverName:o});if(l.alwaysDeny)throw new Error("User has chosen to always deny MCP tools with this mcp server.");if(!l.alwaysAllow){let y=n.params.messages.filter(v=>v.role==="user"),E=y[y.length-1];if((await e.ctx.get(ku).invokeClientToolConfirmation(e,{name:o,title:`Allow MCP tools from "${o}" to make LLM requests?`,message:`The MCP server "${o}" has issued a request to make a language model call. Do you want to allow it to make requests during chat?`,input:E,conversationId:e.conversation.id,roundId:s??e.agentToolCalls.getRound(0).roundId,turnId:e.turn.id,toolCallId:c??e.agentToolCalls.getRound(0).toolCalls[0].id})).result==="dismiss")throw new Sc}let u=await this.getModelConfiguration(e.ctx,n,l),d=this.convertMCPMessagesToChatML(e.ctx,n.params.messages,n.params.systemPrompt),p=(await BEe(e.ctx,e.turn.telemetryId,e.conversation.telemetryId)).extendedBy({messageSource:"mcp.sampling"}),m=new _n.CancellationTokenSource().token,g=await r.fetchResponse({modelConfiguration:u,messages:d,uiKind:"conversationPanel",llmInteraction:e.toLlmInteraction(),temperature:n.params.temperature??this.defaultTemperature,stop:n.params.stopSequences},m,p),A=this.processFetchResult(g,u.uiName);return Kn(e.ctx,LAi,yt.createAndMarkAsIssued({userPreference:l.alwaysAllow?"autoApprove":l.alwaysDeny?"autoDeny":"none",selectedModel:u.uiName,success:"true"})),A}catch(l){let u=`Failed to process sampling request: ${l instanceof Error?l.message:String(l)}`;throw Kt.error(e.ctx,u,l),await qp(e.ctx,{message:u,server:o}),Kn(e.ctx,LAi,yt.createAndMarkAsIssued({success:"false",errorMessage:u})),new An(kn.InternalError,u)}finally{this.ongoingMcpSamplingCalls=!1}}convertMCPMessagesToChatML(e,r,n){let o=[];n&&o.push({role:"system",content:n});for(let s of r){let c,l=Array.isArray(s.content)?s.content[0]:s.content;if(!l){Kt.warn(e,"Empty content in MCP message, skipping");continue}if(l.type==="text")c=l.text;else if(l.type==="image")c=[{type:"image_url",image_url:{url:atob(l.data)}}];else throw Kt.warn(e,`Unknown MCP content type: ${l.type}, defaulting to empty array`),new Error(`Unknown MCP content type: ${l.type}`);let u;switch(s.role){case"user":u="user";break;case"assistant":u="assistant";break;default:u="user",Kt.warn(e,`Unknown MCP role: ${s.role}, defaulting to user`)}o.push({role:u,content:c})}return o}processFetchResult(e,r){if(e.type!=="success"){let n=`Unexpected fetch result type: ${e.type}.`;throw"reason"in e&&(n+=` Reason: ${e.reason}`),new Error(n)}return{model:r,role:"assistant",content:{type:"text",text:e.value}}}async getModelConfiguration(e,r,n){let o=await this.getAvailableBYOKModels(e),s=[...await this.getAvailableModels(e),...o.map(d=>d.name)];if(!s)throw new Error("No available models found");let c=n.allowedModels&&n.allowedModels.length>0?s.filter(d=>n.allowedModels.some(p=>p.toLowerCase()===d.toLowerCase())):s;if(!c||c.length===0)throw new Error("No available models found");let l;r.params.modelPreferences?.hints&&(l=this.mapFindFirst(r.params.modelPreferences.hints,d=>c.find(p=>p.toLowerCase().includes(d.name.toLowerCase())))),l=l??c[0];let u=o.find(d=>d.name===l);return u?nk(e,u.provider,l):await e.get(Da).getBestChatModelConfig([l])}async getAvailableModels(e){return(await e.get(cl).getMetadata()).filter(n=>n.capabilities.type&&!yre.has(n.capabilities.family)&&n.capabilities.supports?.tool_calls&&(n.capabilities.limits?.max_prompt_tokens??!1)).map(n=>n.capabilities.family)}async getAvailableBYOKModels(e){return(await new tc(e.get(Si)).getAllModels(e)).filter(n=>n.capabilities?.toolCalling)}mapFindFirst(e,r){for(let n of e){let o=r(n);if(o!==void 0)return o}}};f();var q0e=class extends Error{constructor(r,n){super(r);this.challengeInfo=n;this.name="ScopeChallengeError"}static{a(this,"ScopeChallengeError")}};function FAi(t,e){if(t!==403||!e)return null;let{scheme:r,params:n}=U0t(e);if(r!=="Bearer"||n.error!=="insufficient_scope")return null;let o=n.scope;if(!o)return null;let s=o.split(" ").filter(c=>c.length>0);return{error:n.error,requiredScopes:s,resourceMetadata:n.resource_metadata,errorDescription:n.error_description}}a(FAi,"parseScopeChallenge");f();var IEr=/[^a-z0-9_-]/gi;var z4a=process.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function UAi(){let t={};for(let e of z4a){let r=process.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}a(UAi,"getDefaultEnvironment");async function QAi(t,e,r){if(!e.description){let n=`Tool ${e.name} does not have a description. Tools must be accurately described to be called.`;Kt.warn(t,n),await yX(t,{message:n,server:r,tool:e.name}),e.description=""}if(IEr.lastIndex=0,IEr.test(e.name)){let n=`Tool ${e.name} is invalid. Tools names may only contain [a-zA-Z0-9_-]`;Kt.warn(t,n),await yX(t,{message:n,server:r,tool:e.name}),e._nameForModel=e.name.replace(IEr,"_")}else e._nameForModel=e.name;return e}a(QAi,"normalizeTool");var Tpt=class{constructor(){this.seenPrefixes=new Set}static{a(this,"McpPrefixGenerator")}generate(e){let r="mcp_"+e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"_").slice(0,13),n=r;for(let o=2;this.seenPrefixes.has(n);o++)n=r+o;return this.seenPrefixes.add(n),n}};f();async function*xEr(t,e,r){let n;do{let o=await t(n),s=e(o);s.length>0&&(yield s),n=r(o)}while(n!==void 0)}a(xEr,"paginateRequest");async function wEr(t){let e=[];for await(let r of t)e.push(...r);return e}a(wEr,"flattenAsyncIterable");f();f();f();f();function G0e(t){return!!t._zod}a(G0e,"isZ4Schema");function x2(t,e){return G0e(t)?poe(t,e):t.safeParse(e)}a(x2,"safeParse");function Spt(t){if(!t)return;let e;if(G0e(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}a(Spt,"getObjectShape");function qAi(t){if(G0e(t)){let s=t._zod?.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}a(qAi,"getLiteralValue");f();function Cq(t){return t==="completed"||t==="failed"||t==="cancelled"}a(Cq,"isTerminal");f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();var SXf=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();function REr(t){let r=Spt(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=qAi(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}a(REr,"getMethodLiteral");function PEr(t,e){let r=x2(t,e);if(!r.success)throw r.error;return r.data}a(PEr,"parseWithCompat");var eBa=6e4,Ipt=class{static{a(this,"Protocol")}constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(upt,r=>{this._oncancel(r)}),this.setNotificationHandler(fpt,r=>{this._onprogress(r)}),this.setRequestHandler(dpt,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ppt,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new An(kn.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(mpt,async(r,n)=>{let o=a(async()=>{let s=r.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(s,n.sessionId);){if(l.type==="response"||l.type==="error"){let u=l.message,d=u.id,p=this._requestResolvers.get(d);if(p)if(this._requestResolvers.delete(d),l.type==="response")p(u);else{let h=u,m=new An(h.error.code,h.error.message,h.error.data);p(m)}else{let h=l.type==="response"?"Response":"Error";this._onerror(new Error(`${h} handler missing for request ${d}`))}continue}await this._transport?.send(l.message,{relatedRequestId:n.requestId})}}let c=await this._taskStore.getTask(s,n.sessionId);if(!c)throw new An(kn.InvalidParams,`Task not found: ${s}`);if(!Cq(c.status))return await this._waitForTaskUpdate(s,n.signal),await o();if(Cq(c.status)){let l=await this._taskStore.getTaskResult(s,n.sessionId);return this._clearTaskQueue(s),{...l,_meta:{...l._meta,[Aq]:{taskId:s}}}}return await o()},"handleTaskResult");return await o()}),this.setRequestHandler(gpt,async(r,n)=>{try{let{tasks:o,nextCursor:s}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:s,_meta:{}}}catch(o){throw new An(kn.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(ypt,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new An(kn.InvalidParams,`Task not found: ${r.params.taskId}`);if(Cq(o.status))throw new An(kn.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let s=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!s)throw new An(kn.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof An?o:new An(kn.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,o,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:o})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),An.fromError(kn.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=s=>{n?.(s),this._onerror(s)};let o=this._transport?.onmessage;this._transport.onmessage=(s,c)=>{o?.(s,c),EX(s)||TAi(s)?this._onresponse(s):tke(s)?this._onrequest(s,c):bAi(s)?this._onnotification(s):this._onerror(new Error(`Unknown message type: ${JSON.stringify(s)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=An.fromError(kn.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,s=e.params?._meta?.[Aq]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:e.id,error:{code:kn.MethodNotFound,message:"Method not found"}};s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):o?.send(p).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}let c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);let l=CAi(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,d={signal:c.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:a(async p=>{if(c.signal.aborted)return;let h={relatedRequestId:e.id};s&&(h.relatedTask={taskId:s}),await this.notification(p,h)},"sendNotification"),sendRequest:a(async(p,h,m)=>{if(c.signal.aborted)throw new An(kn.ConnectionClosed,"Request was cancelled");let g={...m,relatedRequestId:e.id};s&&!g.relatedTask&&(g.relatedTask={taskId:s});let A=g.relatedTask?.taskId??s;return A&&u&&await u.updateTaskStatus(A,"input_required"),await this.request(p,h,g)},"sendRequest"),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:s,taskStore:u,taskRequestedTtl:l?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{l&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,d)).then(async p=>{if(c.signal.aborted)return;let h={result:p,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)},async p=>{if(c.signal.aborted)return;let h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(p.code)?p.code:kn.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,o=Number(r),s=this._progressHandlers.get(o);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let c=this._responseHandlers.get(o),l=this._timeoutInfo.get(o);if(l&&c&&l.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(u){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),c(u);return}s(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),EX(e))n(e);else{let c=new An(e.error.code,e.error.message,e.error.data);n(c)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let s=!1;if(EX(e)&&e.result&&typeof e.result=="object"){let c=e.result;if(c.task&&typeof c.task=="object"){let l=c.task;typeof l.taskId=="string"&&(s=!0,this._taskProgressTokens.set(l.taskId,r))}}if(s||this._progressHandlers.delete(r),EX(e))o(e);else{let c=An.fromError(e.error.code,e.error.message,e.error.data);o(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(e,r,n)}}catch(c){yield{type:"error",error:c instanceof An?c:new An(kn.InternalError,String(c))}}return}let s;try{let c=await this.request(e,_X,n);if(c.task)s=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new An(kn.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:s},n);if(yield{type:"taskStatus",task:l},Cq(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)}:l.status==="failed"?yield{type:"error",error:new An(kn.InternalError,`Task ${s} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new An(kn.InternalError,`Task ${s} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)};return}let u=l.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(d=>setTimeout(d,u)),n?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof An?c:new An(kn.InternalError,String(c))}}}request(e,r,n){let{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c,task:l,relatedTask:u}=n??{};return new Promise((d,p)=>{let h=a(v=>{p(v)},"earlyReject");if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),l&&this.assertTaskCapability(e.method)}catch(v){h(v);return}n?.signal?.throwIfAborted();let m=this._requestMessageId++,g={...e,jsonrpc:"2.0",id:m};n?.onprogress&&(this._progressHandlers.set(m,n.onprogress),g.params={...e.params,_meta:{...e.params?._meta||{},progressToken:m}}),l&&(g.params={...g.params,task:l}),u&&(g.params={...g.params,_meta:{...g.params?._meta||{},[Aq]:u}});let A=a(v=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(v)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c}).catch(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));let b=v instanceof An?v:new An(kn.RequestTimeout,String(v));p(b)},"cancel");this._responseHandlers.set(m,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let b=x2(r,v.result);b.success?d(b.data):p(b.error)}catch(b){p(b)}}}),n?.signal?.addEventListener("abort",()=>{A(n?.signal?.reason)});let y=n?.timeout??eBa,E=a(()=>A(An.fromError(kn.RequestTimeout,"Request timed out",{timeout:y})),"timeoutHandler");this._setupTimeout(m,y,n?.maxTotalTimeout,E,n?.resetTimeoutOnProgress??!1);let _=u?.taskId;if(_){let v=a(b=>{let I=this._responseHandlers.get(m);I?I(b):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))},"responseResolver");this._requestResolvers.set(m,v),this._enqueueTaskMessage(_,{type:"request",message:g,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(m),p(b)})}else this._transport.send(g,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c}).catch(v=>{this._cleanupTimeout(m),p(v)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},hpt,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Apt,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},wAi,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let l={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[Aq]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:l,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let l={...e,jsonrpc:"2.0"};r?.relatedTask&&(l={...l,params:{...l.params,_meta:{...l.params?._meta||{},[Aq]:r.relatedTask}}}),this._transport?.send(l,r).catch(u=>this._onerror(u))});return}let c={...e,jsonrpc:"2.0"};r?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[Aq]:r.relatedTask}}}),await this._transport.send(c,r)}setRequestHandler(e,r){let n=REr(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,s)=>{let c=PEr(e,o);return Promise.resolve(r(c,s))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=REr(e);this._notificationHandlers.set(n,o=>{let s=PEr(e,o);return Promise.resolve(r(s))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,o)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let o of n)if(o.type==="request"&&tke(o.message)){let s=o.message.id,c=this._requestResolvers.get(s);c?(c(new An(kn.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(e);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,s)=>{if(r.aborted){s(new An(kn.InvalidRequest,"Request cancelled"));return}let c=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(c),s(new An(kn.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:a(async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},r)},"createTask"),getTask:a(async o=>{let s=await n.getTask(o,r);if(!s)throw new An(kn.InvalidParams,"Failed to retrieve task: Task not found");return s},"getTask"),storeTaskResult:a(async(o,s,c)=>{await n.storeTaskResult(o,s,c,r);let l=await n.getTask(o,r);if(l){let u=ske.parse({method:"notifications/tasks/status",params:l});await this.notification(u),Cq(l.status)&&this._cleanupTaskProgressHandler(o)}},"storeTaskResult"),getTaskResult:a(o=>n.getTaskResult(o,r),"getTaskResult"),updateTaskStatus:a(async(o,s,c)=>{let l=await n.getTask(o,r);if(!l)throw new An(kn.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Cq(l.status))throw new An(kn.InvalidParams,`Cannot update task "${o}" from terminal status "${l.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,s,c,r);let u=await n.getTask(o,r);if(u){let d=ske.parse({method:"notifications/tasks/status",params:u});await this.notification(d),Cq(u.status)&&this._cleanupTaskProgressHandler(o)}},"updateTaskStatus"),listTasks:a(o=>n.listTasks(o,r),"listTasks")}}};function GAi(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}a(GAi,"isPlainObject");function HAi(t,e){let r={...t};for(let n in e){let o=n,s=e[o];if(s===void 0)continue;let c=r[o];GAi(c)&&GAi(s)?r[o]={...c,...s}:r[o]=s}return r}a(HAi,"mergeCapabilities");f();var OCi=de(h_r(),1),BCi=de(MCi(),1);function HFa(){let t=new OCi.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,BCi.default)(t),t}a(HFa,"createDefaultAjvInstance");var aht=class{static{a(this,"AjvJsonSchemaValidator")}constructor(e){this._ajv=e??HFa()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};f();var cht=class{static{a(this,"ExperimentalClientTasks")}constructor(e){this._client=e}async*callToolStream(e,r=Eq,n){let o=this._client,s={...n,task:n?.task??(o.isToolTask(e.name)?{}:void 0)},c=o.requestStream({method:"tools/call",params:e},r,s),l=o.getToolOutputValidator(e.name);for await(let u of c){if(u.type==="result"&&l){let d=u.result;if(!d.structuredContent&&!d.isError){yield{type:"error",error:new An(kn.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(d.structuredContent)try{let p=l(d.structuredContent);if(!p.valid){yield{type:"error",error:new An(kn.InvalidParams,`Structured content does not match the tool's output schema: ${p.errorMessage}`)};return}}catch(p){if(p instanceof An){yield{type:"error",error:p};return}yield{type:"error",error:new An(kn.InvalidParams,`Failed to validate structured content: ${p instanceof Error?p.message:String(p)}`)};return}}yield u}}async getTask(e,r){return this._client.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._client.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._client.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._client.cancelTask({taskId:e},r)}requestStream(e,r,n){return this._client.requestStream(e,r,n)}};f();function LCi(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}a(LCi,"assertToolsCallTaskCapability");function FCi(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}a(FCi,"assertClientRequestTaskCapability");function lht(t,e){if(!(!t||e===null||typeof e!="object")){if(t.type==="object"&&t.properties&&typeof t.properties=="object"){let r=e,n=t.properties;for(let o of Object.keys(n)){let s=n[o];r[o]===void 0&&Object.prototype.hasOwnProperty.call(s,"default")&&(r[o]=s.default),r[o]!==void 0&&lht(s,r[o])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&lht(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&lht(r,e)}}a(lht,"applyElicitationDefaults");function jFa(t){if(!t)return{supportsFormMode:!1,supportsUrlMode:!1};let e=t.form!==void 0,r=t.url!==void 0;return{supportsFormMode:e||!e&&!r,supportsUrlMode:r}}a(jFa,"getSupportedElicitationModes");var uht=class extends Ipt{static{a(this,"Client")}constructor(e,r){super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new aht,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",uke,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",lke,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",cke,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new cht(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=HAi(this._capabilities,e)}setRequestHandler(e,r){let o=Spt(e)?.method;if(!o)throw new Error("Schema is missing a method literal");let s;if(G0e(o)){let l=o;s=l._zod?.def?.value??l.value}else{let l=o;s=l._def?.value??l.value}if(typeof s!="string")throw new Error("Schema method literal must be a string");let c=s;if(c==="elicitation/create"){let l=a(async(u,d)=>{let p=x2(fke,u);if(!p.success){let v=p.error instanceof Error?p.error.message:String(p.error);throw new An(kn.InvalidParams,`Invalid elicitation request: ${v}`)}let{params:h}=p.data;h.mode=h.mode??"form";let{supportsFormMode:m,supportsUrlMode:g}=jFa(this._capabilities.elicitation);if(h.mode==="form"&&!m)throw new An(kn.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!g)throw new An(kn.InvalidParams,"Client does not support URL-mode elicitation requests");let A=await Promise.resolve(r(u,d));if(h.task){let v=x2(_X,A);if(!v.success){let b=v.error instanceof Error?v.error.message:String(v.error);throw new An(kn.InvalidParams,`Invalid task creation result: ${b}`)}return v.data}let y=x2(vEr,A);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new An(kn.InvalidParams,`Invalid elicitation result: ${v}`)}let E=y.data,_=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&E.action==="accept"&&E.content&&_&&this._capabilities.elicitation?.form?.applyDefaults)try{lht(_,E.content)}catch{}return E},"wrappedHandler");return super.setRequestHandler(e,l)}if(c==="sampling/createMessage"){let l=a(async(u,d)=>{let p=x2(dke,u);if(!p.success){let E=p.error instanceof Error?p.error.message:String(p.error);throw new An(kn.InvalidParams,`Invalid sampling request: ${E}`)}let{params:h}=p.data,m=await Promise.resolve(r(u,d));if(h.task){let E=x2(_X,m);if(!E.success){let _=E.error instanceof Error?E.error.message:String(E.error);throw new An(kn.InvalidParams,`Invalid task creation result: ${_}`)}return E.data}let A=h.tools||h.toolChoice?_Er:CEr,y=x2(A,m);if(!y.success){let E=y.error instanceof Error?y.error.message:String(y.error);throw new An(kn.InvalidParams,`Invalid sampling result: ${E}`)}return y.data},"wrappedHandler");return super.setRequestHandler(e,l)}return super.setRequestHandler(e,r)}assertCapability(e,r){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:m5,capabilities:this._capabilities,clientInfo:this._clientInfo}},oEr,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!AAi.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){LCi(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&FCi(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},CX,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},bEr,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},CX,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},AEr,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},fEr,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},aEr,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},cEr,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},uEr,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},CX,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},CX,r)}async callTool(e,r=Eq,n){if(this.isToolTaskRequired(e.name))throw new An(kn.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let o=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!o.structuredContent&&!o.isError)throw new An(kn.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{let c=s(o.structuredContent);if(!c.valid)throw new An(kn.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof An?c:new An(kn.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return o}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of e){if(r.outputSchema){let o=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,o)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let n=await this.request({method:"tools/list",params:e},yEr,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,o){let s=MAi.safeParse(n);if(!s.success)throw new Error(`Invalid ${e} listChanged options: ${s.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:c,debounceMs:l}=s.data,{onChanged:u}=n,d=a(async()=>{if(!c){u(null,null);return}try{let h=await o();u(null,h)}catch(h){let m=h instanceof Error?h:new Error(String(h));u(m,null)}},"refresh"),p=a(()=>{if(l){let h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);let m=setTimeout(d,l);this._listChangedDebounceTimers.set(e,m)}else d()},"handler");this.setNotificationHandler(r,p)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};var UCi=de(require("events"));var v_r=6e4,Rq=class{constructor(e,r,n){this.transport=null;this.emitter=new UCi.default;this.ongoingMcpToolCalls=[];this.isSamplingEnabled=!1;this.isElicitationEnabled=!1;this.cachedTools=[];this.cachedResources=[];this.cachedResourceTemplates=[];this.cachedPrompts=[];this.ctx=e;let o=e.get(Fn);this.isSamplingEnabled=o.getCapabilities().mcpSampling,this.isSamplingEnabled&&(this.samplingService=new bpt),this.isElicitationEnabled=o.getCapabilities().mcpElicitation,this.isElicitationEnabled&&(this.elicitationHandler=new _pt);let s=this.ctx.get(Nr).getEditorInfo(),c=this.ctx.get(Nr).getEditorPluginInfo();this.mcp=new uht({name:`${s.name}/${c.name}`,version:`${s.version}/${c.version}`},{capabilities:{roots:{listChanged:!0},...this.isSamplingEnabled?{sampling:{}}:{},...this.isElicitationEnabled?{elicitation:{}}:{}}}),this.name=r}static{a(this,"MCPBaseServer")}get isConnected(){return this.transport!==null}async connect(e){if(this.transport=this.initTransport(e),!this.transport){let r=new Error("Failed to initialize transport");throw Kt.error(this.ctx,"Transport initialization failed:",r),r}this.addListeners();try{await this.mcp.connect(this.transport),this.initializeCache()}catch(r){throw Kt.error(this.ctx,"Connection failed:",r),await qp(this.ctx,{message:`Failed to connect to MCP server: ${r instanceof Error?r.message:String(r)}`,server:this.name}),this.transport=null,r}}async initializeCache(){await Promise.all([this.refreshToolsCache(!0),this.refreshResourcesCache(!0),this.refreshPromptsCache(!0)]),this.emitter.emit(sq)}getCachedTools(){return this.cachedTools}getCachedResources(){return this.cachedResources}getCachedResourceTemplates(){return this.cachedResourceTemplates}getCachedPrompts(){return this.cachedPrompts}restoreCacheFromPersistence(e){this.cachedTools=[...e.tools],this.cachedResources=[...e.resources],this.cachedResourceTemplates=[...e.resourceTemplates],this.cachedPrompts=[...e.prompts]}async createMcpTool(e,r){let n={name:e.name,description:e.description,inputSchema:{...e.inputSchema||{},properties:e.inputSchema?.properties||{},type:e.inputSchema?.type||"object"},_status:r??"enabled",_nameForModel:e.name,annotations:e.annotations};return await QAi(this.ctx,n,this.name),n}async handleMCPOperationError(e,r,n){try{return await e()}catch(o){let s=o;if(s instanceof q0e){let l=`OAuth scope challenge during ${r} from server ${this.name}. Required scopes: ${s.challengeInfo.requiredScopes.join(", ")}`;if(n.scopeChallengeHandler)return n.scopeChallengeHandler(s.challengeInfo.requiredScopes);if(Kt.info(this.ctx,l),await qp(this.ctx,{message:l,server:this.name}),n.errorHandler)return n.errorHandler(l);if("defaultValue"in n)return n.defaultValue;throw s}if(s.code===kn.MethodNotFound){if(Kt.info(this.ctx,`${r} not supported by server ${this.name}:`,s.message),"methodNotFoundValue"in n)return n.methodNotFoundValue;if(n.errorHandler)return n.errorHandler("Method not found");if("defaultValue"in n)return n.defaultValue;throw new Error("No default value or error handler provided")}let c=`Failed to ${r} from server ${this.name}: ${s.message||String(s)}`;if(Kt.error(this.ctx,c),await qp(this.ctx,{message:c,server:this.name}),n.errorHandler)return n.errorHandler(c);if("defaultValue"in n)return n.defaultValue;throw new Error("No default value or error handler provided")}}async*getResourcesIterable(e){if(!this.transport)return;let r=xEr(n=>this.mcp.listResources({cursor:n},{signal:e}),n=>n.resources,n=>n.nextCursor);for await(let n of r)yield n}async getResources(e){return await this.handleMCPOperationError(async()=>{let r=await wEr(this.getResourcesIterable(e));return _a(this.ctx,{message:`Discovered ${r.length} resources`,server:this.name}),r},"get resources",{defaultValue:[]})}async*getResourceTemplatesIterable(e){if(!this.transport)return;let r=xEr(n=>this.mcp.listResourceTemplates({cursor:n},{signal:e}),n=>n.resourceTemplates,n=>n.nextCursor);for await(let n of r)yield n}async getResourceTemplates(e){return await this.handleMCPOperationError(async()=>{let r=await wEr(this.getResourceTemplatesIterable(e));return _a(this.ctx,{message:`Discovered ${r.length} resource templates`,server:this.name}),r},"get resource templates",{defaultValue:[]})}async readResource(e){return this.transport?await this.handleMCPOperationError(async()=>await this.mcp.readResource({uri:e}),`read resource ${e}`,{defaultValue:null,methodNotFoundValue:{contents:[]}}):null}async subscribeResource(e){this.transport&&await this.handleMCPOperationError(async()=>{await this.mcp.subscribeResource({uri:e})},`subscribe resource ${e}`,{defaultValue:void 0})}async unsubscribeResource(e){this.transport&&await this.handleMCPOperationError(async()=>{await this.mcp.unsubscribeResource({uri:e})},`unsubscribe resource ${e}`,{defaultValue:void 0})}async callTool(e,r,n,o,s,c){let l=Z$();this.ongoingMcpToolCalls.push({requestId:l,toolName:e,turnContext:o,roundId:s,toolCallId:c});let u=a(d=>{let p=new Cr([],"error");return p.content.push(new fr(d)),p},"createErrorResult");try{return await this.handleMCPOperationError(async()=>{let d=new AbortController;n.onCancellationRequested(()=>{d.abort()});let p=await this.mcp.callTool({name:e,arguments:r,_meta:{progressToken:l}},Eq,{onprogress:a(m=>{Kt.info(this.ctx,`${e} calling progress`,m),_a(this.ctx,{message:`${e} calling progress:`+JSON.stringify(m),server:this.name})},"onprogress"),resetTimeoutOnProgress:!0,signal:d.signal});if(p&&typeof p=="object"){if(p.content||p.structuredContent)return this.formatToolResult(p);let m=`Error calling tool ${e}: `+JSON.stringify(p);return Kt.error(this.ctx,m),await qp(this.ctx,{message:m,server:this.name,tool:e}),u(m)}let h=`Error calling tool ${e}: `+JSON.stringify(p);return Kt.error(this.ctx,h),await qp(this.ctx,{message:h,server:this.name,tool:e}),u(h)},`call tool ${e}`,{errorHandler:u})}finally{this.ongoingMcpToolCalls=this.ongoingMcpToolCalls.filter(d=>d.requestId!==l)}}async getPrompt(e,r){return(await this.mcp.getPrompt({name:e,arguments:r})).messages}async completePrompt(e,r,n,o){return(await this.mcp.complete({ref:{type:"ref/prompt",name:e},argument:{name:r,value:n},context:{arguments:o}})).completion.values}addListeners(){this.mcp.onclose=()=>{Kt.info(this.ctx,`MCP server ${this.name} connection closed.`),_a(this.ctx,{message:"Connection state: Stopped",server:this.name})},this.mcp.onerror=e=>{Kt.error(this.ctx,`MCP server ${this.name} error:`,e),qp(this.ctx,{message:`Connection state: Error: ${e.message}`,server:this.name})},this.mcp.setNotificationHandler(EEr,e=>new pke(this.ctx,this.name).handle(e)),this.mcp.setNotificationHandler(uke,e=>new yke(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(lke,e=>new hke(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(cke,e=>new mke(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(dEr,e=>new gke(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setRequestHandler(TEr,e=>(this.initRootsTracker(),new Ake(this.ctx,this.name).handle(e))),this.isSamplingEnabled&&this.mcp.setRequestHandler(dke,async(e,r)=>{if(!this.samplingService){let o="Sampling is not enabled.";throw Kt.error(this.ctx,o),new An(kn.InternalError,o)}if(this.ongoingMcpToolCalls.length===0){let o="No ongoing tool call context found for sampling request.";throw Kt.error(this.ctx,o),new An(kn.InternalError,o)}let n=this.ongoingMcpToolCalls[this.ongoingMcpToolCalls.length-1];return await this.samplingService.handleSamplingRequest(n.turnContext,new ya(this.ctx),e,this.name,n.roundId,n.toolCallId)}),this.isElicitationEnabled&&this.mcp.setRequestHandler(fke,async e=>{if(this.ongoingMcpToolCalls.length===0){let n="No ongoing tool call context found for elicitation request.";throw Kt.error(this.ctx,n),new An(kn.InternalError,n)}let r=this.ongoingMcpToolCalls[this.ongoingMcpToolCalls.length-1];return this.elicitationHandler.handleRequest(r.turnContext,this.name,e,r.roundId,r.toolCallId)}),this.setupDataRefreshListeners()}setupDataRefreshListeners(){this.emitter.on(hft,()=>{this.refreshToolsCache()}),this.emitter.on(mft,()=>{this.refreshResourcesCache()}),this.emitter.on(gft,()=>{this.refreshPromptsCache()})}async refreshToolsCache(e=!1){this.transport&&await this.handleMCPOperationError(async()=>{let r=AbortSignal.timeout(v_r),n=await this.mcp.listTools({},{signal:r}),o=new Map(this.cachedTools.map(s=>[s.name,s._status]));this.cachedTools=await Promise.all(n.tools.map(s=>this.createMcpTool(s,o.get(s.name)))),Kt.info(this.ctx,`Refreshed ${this.cachedTools.length} tools for server ${this.name}`),e||this.emitter.emit(sq)},"refresh tools",{defaultValue:void 0})}async refreshResourcesCache(e=!1){if(this.transport)try{let r=AbortSignal.timeout(v_r),[n,o]=await Promise.all([this.getResources(r),this.getResourceTemplates(r)]);this.cachedResources=n,this.cachedResourceTemplates=o,Kt.info(this.ctx,`Refreshed ${this.cachedResources.length} resources and ${this.cachedResourceTemplates.length} templates for server ${this.name}`),e||this.emitter.emit(sq)}catch(r){Kt.error(this.ctx,`Failed to refresh resources cache for ${this.name}:`,r)}}async refreshPromptsCache(e=!1){this.transport&&await this.handleMCPOperationError(async()=>{let r=AbortSignal.timeout(v_r),n=await this.mcp.listPrompts({},{signal:r});this.cachedPrompts=n.prompts,Kt.info(this.ctx,`Refreshed ${this.cachedPrompts.length} prompts for server ${this.name}`),e||this.emitter.emit(sq)},"refresh prompts",{defaultValue:void 0})}formatToolResult(e){let r=new Cr([],e.isError===!0?"error":"success");for(let n of e.content??[])if(n.type==="text")r.content.push(new fr(n.text));else if(n.type==="image"||n.type==="audio")r.content.push(new X6({mimeType:n.mimeType,data:n.data}));else if(n.type==="resource"){let o=n.resource;if("text"in o)r.content.push(new fr(o.text));else if("blob"in o){let s=o.mimeType||"application/octet-stream";r.content.push(new X6({mimeType:s,data:o.blob}))}}return e.structuredContent&&r.content.push(new fr(JSON.stringify(e.structuredContent))),r}initRootsTracker(){let e=this.ctx.get(zr);this.rootsTracker=e.onDidChangeWorkspaceFolders(r=>{this.mcp.sendRootsListChanged().then(()=>{this.rootsTracker?.dispose()})})}getEmitter(){return this.emitter}async cleanup(){this.transport&&(await this.mcp.close(),this.mcp.transport&&this.mcp.transport.onclose?.(),this.rootsTracker?.dispose(),this.transport=null)}};f();function $Fa(t){return a(async(r,n)=>{let o=r instanceof URL?r.toString():r,s;if(n?.headers)if(n.headers instanceof Headers){s={};for(let[p,h]of n.headers.entries())s[p]=h}else if(Array.isArray(n.headers)){s={};for(let[p,h]of n.headers)s[p]=h}else s=n.headers;let c={method:n?.method||"GET",headers:s,body:n?.body,signal:n?.signal||void 0},l=await t.fetch(o,c);if(l.status===403){let p=l.headers.get("WWW-Authenticate"),h=FAi(l.status,p);if(h){let m=h.errorDescription||"Insufficient scope for this operation";throw new q0e(m,h)}}let u=l.body(),d=null;if(u)d=new ReadableStream({start(p){let h=a(y=>{p.enqueue(new Uint8Array(y))},"onData"),m=a(()=>{p.close(),A()},"onEnd"),g=a(y=>{p.error(y),A()},"onError"),A=a(()=>{u.off("data",h),u.off("end",m),u.off("error",g)},"cleanup");u.on("data",h),u.on("end",m),u.on("error",g)},cancel(){u&&"destroy"in u&&typeof u.destroy=="function"&&u.destroy()}});else{let p=await l.text();d=new ReadableStream({start(h){h.enqueue(new TextEncoder().encode(p)),h.close()}})}return new globalThis.Response(d,{status:l.status,statusText:l.statusText,headers:new Headers(l.headers)})},"fetchLike")}a($Fa,"createFetchAdapter");function dht(t,e){let r=t.get(dr),n=$Fa(r);return{...e,fetch:n}}a(dht,"createConfigWithFetch");f();f();f();var fht=class extends Error{static{a(this,"ParseError")}constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function b_r(t){}a(b_r,"noop");function pht(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:e=b_r,onError:r=b_r,onRetry:n=b_r,onComment:o}=t,s="",c=!0,l,u="",d="";function p(y){let E=c?y.replace(/^\xEF\xBB\xBF/,""):y,[_,v]=VFa(`${s}${E}`);for(let b of _)h(b);s=v,c=!1}a(p,"feed");function h(y){if(y===""){g();return}if(y.startsWith(":")){o&&o(y.slice(y.startsWith(": ")?2:1));return}let E=y.indexOf(":");if(E!==-1){let _=y.slice(0,E),v=y[E+1]===" "?2:1,b=y.slice(E+v);m(_,b,y);return}m(y,"",y)}a(h,"parseLine");function m(y,E,_){switch(y){case"event":d=E;break;case"data":u=`${u}${E} -`;break;case"id":l=E.includes("\0")?void 0:E;break;case"retry":/^\d+$/.test(E)?n(parseInt(E,10)):r(new fht(`Invalid \`retry\` value: "${E}"`,{type:"invalid-retry",value:E,line:_}));break;default:r(new fht(`Unknown field "${y.length>20?`${y.slice(0,20)}\u2026`:y}"`,{type:"unknown-field",field:y,value:E,line:_}));break}}a(m,"processField");function g(){u.length>0&&e({id:l,event:d||void 0,data:u.endsWith(` -`)?u.slice(0,-1):u}),l=void 0,u="",d=""}a(g,"dispatchEvent");function A(y={}){s&&y.consume&&h(s),c=!0,l=void 0,u="",d="",s=""}return a(A,"reset"),{feed:p,reset:A}}a(pht,"createParser");function VFa(t){let e=[],r="",n=0;for(;ne,r=>new gEr(r))}};f();var c0t=de(xx());var l0t=class extends d0{constructor(r){super();this.ctx=r}static{a(this,"AgentConversationInspector")}shouldInspect(){return a5e(this.ctx)}get connection(){if(this.shouldInspect())return this.ctx.get(Ar).connection}async inspectPrompt(r){return this.connection?.sendNotification(new c0t.NotificationType("conversation/inspectPrompt"),r)}async inspectFetchResult(r){return this.connection?.sendNotification(new c0t.NotificationType("conversation/inspectFetchResult"),r)}async documentDiff(r){return this.connection?.sendNotification(new c0t.NotificationType("conversation/documentDiff"),r)}};f();var iyi=de(mu());var z2e=class{constructor(e){this.ctx=e;this.notificationEndpoint="conversation/preconditionsNotification";e.get(pI).onChange(r=>{this.sendNotification(r)})}static{a(this,"PreconditionsNotifier")}sendNotification(e){return this.ctx.get(Ar).connection.sendNotification(new iyi.NotificationType(this.notificationEndpoint),e)}};function oyi(t){bBa(t),TBa(t),eyi(t)}a(oyi,"activateConversationFeature");function bBa(t){ANt(t),t.set(lo,new lo(t)),t.set(lh,new lh),t.set(fm,new fm(t)),t.set(wa,new VFe(t)),t.set(w3,new w3),t.set(xa,new xa(t)),t.set(pI,new pI(t)),t.set(z2e,new z2e(t)),t.set(tl,new eLe(t,new Z3e(t))),t.set(c2,new c2),t.set(eF,new eF),t.set(d0,new l0t(t)),t.set(Rd,new Rd(t)),t.set(pm,new pm),t.set(V1,new V1),t.set(Jx,new Jx(t)),t.set(W2e,new W2e(t,async()=>!await hF(t)))}a(bBa,"registerContextDependencies");function TBa(t){let e=new f0;hF(t).then(r=>{r?e.registerSkill(new YEe(new rqe)):e.registerSkill(new YEe(new nqe))}),e.registerSkill(new p7e(new tE(t,tk,uWr))),e.registerSkill(new t7e(new tE(t,jx,oWr))),e.registerSkill(new e7e(new tE(t,Fg,iWr))),e.registerSkill(new h7e),e.registerSkill(new n0t),e.registerSkill(new i0t(new tE(t,o0t,ryi))),e.registerSkill(new j7e(new tE(t,ok,Ezr))),e.registerSkill(new cqe(new tE(t,gF,gen))),e.registerSkill(new s0t(new tE(t,a0t,nyi))),e.registerSkill(new t0t(new tE(t,r0t,tyi))),e.registerSkill(new uqe(new tE(t,Xx,Aen))),e.registerSkill(new dqe(new tE(t,Uj,yen))),t.set(f0,e)}a(TBa,"registerSkills");f();var syi=de(mu()),ayi=de(xx());var u0t=class extends Cu{constructor(){super(...arguments);this.requestType=new syi.ProtocolRequestType("conversation/invokeClientToolConfirmation");this.typeCheck=wl.Compile(wHr)}static{a(this,"AgentClientToolConfirmationInvoker")}async invokeClientToolConfirmation(r,n){let o=this.ctx.get(Ar).connection,s;try{let c=await o.sendRequest(this.requestType,n),[l,u]=c;if(u){let d=new ayi.ResponseError(u.code,u.message,u.data);throw Ge.error(this.ctx,`ResponseError while invoking client tool confirmation ${n.name}`,d),new Error(`Failed to invoke client tool confirmation ${n.name}: ${u.message}`)}s=l}catch(c){throw new Error(`Failed to invoke client tool confirmation ${n.name}: ${String(c)}`)}if(s==null)throw new Error(`Failed to invoke client tool confirmation ${n.name}: No result returned`);if(!this.typeCheck.Check(s))throw new Sm(this.typeCheck.Errors(s));return s}};f();var cyi=de(mu()),lyi=de(xx());var d0t=class extends XA{constructor(){super(...arguments);this.requestType=new cyi.ProtocolRequestType("conversation/invokeClientTool");this.typeCheck=wl.Compile(xHr)}static{a(this,"AgentClientToolInvoker")}async invokeClientTool(r,n){let o=this.ctx.get(Ar).connection,s;try{let c=await o.sendRequest(this.requestType,n),[l,u]=c;if(u){let d=new lyi.ResponseError(u.code,u.message,u.data);throw Ge.error(this.ctx,`ResponseError while invoking client tool ${n.name}`,d),new Error(`Failed to invoke client tool ${n.name}: ${u.message}`)}s=l}catch(c){throw new Error(`Failed to invoke client tool ${n.name}: ${String(c)}`)}if(s==null)throw new Error(`Failed to invoke client tool ${n.name}: No result returned`);if(!this.typeCheck.Check(s))throw new Sm(this.typeCheck.Errors(s));return this.transformToToolResult(s)}transformToToolResult(r){let n=r.content.map(o=>typeof o.value=="string"?new fr(o.value):new ej(o.value));return new _r(n,r.status??"success")}};f();f();function uyi(t,e,r){try{let n=t.get(Gt).javaContextProviderParams(r);if(n){let o=JSON.parse(n);for(let[s,c]of Object.entries(o))e.set(s,c)}}catch(n){return Cr.debug(t,"Failed to get the active Java experiments for the Context Provider API",n),!1}return!0}a(uyi,"fillInJavaActiveExperiments");var AEr=de(xx());var SBa={type:new AEr.NotificationType("featureFlagsNotification")},IBa={type:new AEr.NotificationType("copilot/didChangeFeatureFlags")},Y2e=class{constructor(e){this.ctx=e;Ps(e,r=>this.sendNotification(r))}static{a(this,"FeatureFlagsNotifier")}async sendNotification(e){let r=this.ctx,n=!1,o=!1,s=r.get(Gt),c=await s.updateExPValuesAndAssignments(e);n=s.ideDataMigrationCompleted(c),o=s.appmodContextMenuEnabled(c);let l={};r.get(Gt).excludeRelatedFiles(c)&&(l.ExcludeRelatedFiles=!0);let u=njt(r,c);u.length>0&&(l.ExpContextProviders=u);let d=new Map;vbn(r,u,d,c),Zze(r,d,c),uyi(r,d,c);for(let[m,g]of d.entries())l[m]=g;let p=r.get(Fn),h=r.get(Ar).connection;if(p.getCapabilities().didChangeFeatureFlags)await h.sendNotification(IBa.type,{envelope:{...e.envelope,token:void 0,expires_at:void 0,refresh_in:void 0,user_notification:void 0,limited_user_quotas:void 0,limited_user_reset_date:void 0,error_details:void 0,organization_list:void 0,enterprise_list:void 0,endpoints:void 0},token:e.getTokenValues(),activeExps:l,byok:Nre(e),data_migration_completed:n,appmod_context_menu_enabled:o});else{let m={rt:e.getTokenValue("rt")==="1",sn:e.getTokenValue("sn")==="1",chat:e.envelope.chat_enabled??!1,ic:e.envelope.chat_enabled??!1,pc:!0,ae:l,byok:Nre(e),data_migration_completed:n,appmod_context_menu_enabled:o};e.getTokenValue("agent_mode")==="0"&&(m.agent_mode=!1),e.getTokenValue("agent_mode_auto_approval")==="0"&&(m.agent_mode_auto_approval=!1),e.getTokenValue("mcp")==="0"&&(m.mcp=!1),e.envelope.xcode_chat&&e.envelope.chat_enabled&&(m.xc=!0),await h.sendNotification(SBa.type,m)}}};f();var f0t=class extends Bs{constructor(r){super();this.ctx=r;this.notificationEndpoint="statusNotification"}static{a(this,"NotificationStatusReporter")}didChange(r){let n=r.kind;r.busy&&n!=="Error"&&(n="InProgress"),this.ctx.get(Ar).connection.sendNotification(APt.type,{busy:r.busy,kind:r.kind,status:n,message:r.message??""}),this.ctx.get(Ar).connection.sendNotification("didChangeStatus",{busy:r.busy,kind:r.kind,message:r.message,command:r.command})}};f();var dyi=new Se("AgentEncodingConfigurationService"),p0t=class extends ZP{static{a(this,"AgentEncodingConfigurationService")}constructor(e){super(e),this.service=e.get(Ar)}async requestEncodingFromClient(e){if(!this.service.clientCapabilities?.workspace?.configuration){dyi.debug(this.ctx,"Client does not support workspace/configuration, using UTF-8 fallback");return}try{let o=(await this.service.connection.workspace.getConfiguration([{scopeUri:e,section:"copilot.file.encoding"}]))[0];return o&&["utf8","utf-8","utf16le","ucs2","ucs-2","base64","base64url","latin1","binary","hex","ascii"].includes(o)?o:void 0}catch(n){dyi.debug(this.ctx,`Unable to request encoding for ${e}, using UTF-8 fallback`,n);return}}};f();var fyi=new z8;f();var myi=de(Dn());var gyi={"mcp.contributionPoint.enabled":{description:"Whether extension-contributed MCP servers are enabled",defaultValue:!0,type:"boolean"},"customAgent.enabled":{description:"Whether custom agent functionality is enabled",defaultValue:!0,type:"boolean"},"subagent.enabled":{description:"Whether subagent functionality is enabled",defaultValue:!0,type:"boolean"},"autoModel.enabled":{description:"Whether auto model functionality is enabled",defaultValue:!0,type:"boolean"},"cveRemediatorAgent.enabled":{description:"Whether CVE remediator agent functionality is enabled",defaultValue:!0,type:"boolean"},"agentMode.autoApproval.enabled":{description:"Whether agent mode auto-approval is enabled",defaultValue:!0,type:"boolean"}},xBa=new myi.NotificationType("policy/didChange"),wBa=Object.fromEntries(Object.entries(gyi).map(([t,e])=>[t,{type:e.type}])),K2e=class extends um{constructor(r,n){super();this.ctx=r;this.connection=n;this.disposed=!1;this.policyValues=new Map(Object.entries(gyi).map(([r,n])=>[r,n.defaultValue]));let o=r.get(Ar);o.onActivation(()=>{this.startWatching().catch(s=>{Cr.error(this.ctx,"Unexpected error starting policy watcher:",s)})}),o.onDeactivation(()=>{this.dispose()})}static{a(this,"GroupPolicyWatcher")}async startWatching(){try{let{createWatcher:r}=await Promise.resolve().then(()=>de(hyi()));this.policyWatcher=r("IDEGitHubCopilot",wBa,n=>{this.handlePolicyUpdate(n).catch(o=>{Cr.error(this.ctx,"Error in handlePolicyUpdate:",o)})}),Cr.info(this.ctx,"Policy watcher started for GitHub Copilot Plugin")}catch(r){process.platform==="darwin"||process.platform==="win32"?Cr.exception(this.ctx,r,"Policy watcher failed to load on supported platform"):Cr.warn(this.ctx,"Policy watcher not available - continuing without policy watching:",r instanceof Error?r.message:String(r))}}async handlePolicyUpdate(r){Cr.debug(this.ctx,"GroupPolicyWatcher - policy update triggered",r);for(let[n,o]of Object.entries(r))if(o!==void 0){let s=n;this.policyValues.set(s,o),Cr.debug(this.ctx,`Policy change: ${n} = ${o}`)}this.policyValues.get("subagent.enabled")===!1&&this.ctx.get(Fn).setCapabilities({subAgent:!1}),this.policyValues.get("cveRemediatorAgent.enabled")===!1&&this.ctx.get(Fn).setCapabilities({cveRemediatorAgent:!1}),await this.sendPolicyChangeNotification()}getAllPolicyValues(){let r={};for(let[n,o]of this.policyValues.entries())r[n]=o;return r}getPolicyValue(r){return this.policyValues.get(r)}sendPolicyChangeNotification(){if(this.disposed)return Promise.resolve();let r=this.getAllPolicyValues();try{return this.connection.sendNotification(xBa,r)}catch{return Promise.resolve()}}dispose(){if(!this.disposed){if(this.disposed=!0,this.policyWatcher){try{this.policyWatcher.dispose()}catch(r){Cr.error(this.ctx,"Error disposing policy watcher:",r)}this.policyWatcher=void 0}Cr.debug(this.ctx,"Policy watcher stopped")}}};f();var m2=class{static{a(this,"McpAuthService")}},h0t=class extends m2{static{a(this,"CLSMcpAuthServer")}constructor(e){super(),this.ctx=e}getAccountPreference(e,r){let n=this._getAccountPreferenceKey(e,r);return this.ctx.get(Vh).get(n)}updateAccountPreference(e,r,n){let o=this._getAccountPreferenceKey(e,r);this.ctx.get(Vh).set(o,n.label)}removeAccountPreference(e,r){let n=this._getAccountPreferenceKey(e,r);this.ctx.get(Vh).delete(n)}_getAccountPreferenceKey(e,r){return`mcp-${e}-${r}`}};f();f();f();var Yt=new Se("CopilotMCP");async function EEr(t,e){await t.get(h2).notifyLog(e)}a(EEr,"notifyMCPRuntimeLog");async function Op(t,e){await EEr(t,{...e,level:"error"})}a(Op,"notifyMCPRuntimeError");async function SJ(t,e){await EEr(t,{...e,level:"warning"})}a(SJ,"notifyMCPRuntimeWarning");async function ma(t,e){await EEr(t,{...e,level:"info"})}a(ma,"notifyMCPRuntimeInfo");f();var nN="2025-11-25";var Ayi=[nN,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],jQ="io.modelcontextprotocol/related-task",g0t="2.0",eg=i8t(t=>t!==null&&(typeof t=="object"||typeof t=="function")),yyi=ec([Me(),Js().int()]),Eyi=Me(),vJf=_0({ttl:ec([Js(),uCe()]).optional(),pollInterval:Js().optional()}),PBa=kr({ttl:Js().optional()}),kBa=kr({taskId:Me()}),CEr=_0({progressToken:yyi.optional(),[jQ]:kBa.optional()}),mb=kr({_meta:CEr.optional()}),J2e=mb.extend({task:PBa.optional()}),_yi=a(t=>J2e.safeParse(t).success,"isTaskAugmentedRequestParams"),tg=kr({method:Me(),params:mb.loose().optional()}),mI=kr({_meta:CEr.optional()}),gI=kr({method:Me(),params:mI.loose().optional()}),rg=_0({_meta:CEr.optional()}),A0t=ec([Me(),Js().int()]),Cyi=kr({jsonrpc:vn(g0t),id:A0t,...tg.shape}).strict(),X2e=a(t=>Cyi.safeParse(t).success,"isJSONRPCRequest"),vyi=kr({jsonrpc:vn(g0t),...gI.shape}).strict(),byi=a(t=>vyi.safeParse(t).success,"isJSONRPCNotification"),vEr=kr({jsonrpc:vn(g0t),id:A0t,result:rg}).strict(),IJ=a(t=>vEr.safeParse(t).success,"isJSONRPCResultResponse");var kn;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(kn||(kn={}));var bEr=kr({jsonrpc:vn(g0t),id:A0t.optional(),error:kr({code:Js().int(),message:Me(),data:$l().optional()})}).strict();var Tyi=a(t=>bEr.safeParse(t).success,"isJSONRPCErrorResponse");var $Q=ec([Cyi,vyi,vEr,bEr]),bJf=ec([vEr,bEr]),xJ=rg.strict(),DBa=mI.extend({requestId:A0t.optional(),reason:Me().optional()}),y0t=gI.extend({method:vn("notifications/cancelled"),params:DBa}),NBa=kr({src:Me(),mimeType:Me().optional(),sizes:br(Me()).optional(),theme:dy(["light","dark"]).optional()}),Z2e=kr({icons:br(NBa).optional()}),Zfe=kr({name:Me(),title:Me().optional()}),Syi=Zfe.extend({...Zfe.shape,...Z2e.shape,version:Me(),websiteUrl:Me().optional(),description:Me().optional()}),MBa=dCe(kr({applyDefaults:Za().optional()}),cl(Me(),$l())),OBa=dje(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,dCe(kr({form:MBa.optional(),url:eg.optional()}),cl(Me(),$l()).optional())),BBa=_0({list:eg.optional(),cancel:eg.optional(),requests:_0({sampling:_0({createMessage:eg.optional()}).optional(),elicitation:_0({create:eg.optional()}).optional()}).optional()}),LBa=_0({list:eg.optional(),cancel:eg.optional(),requests:_0({tools:_0({call:eg.optional()}).optional()}).optional()}),FBa=kr({experimental:cl(Me(),eg).optional(),sampling:kr({context:eg.optional(),tools:eg.optional()}).optional(),elicitation:OBa.optional(),roots:kr({listChanged:Za().optional()}).optional(),tasks:BBa.optional()}),UBa=mb.extend({protocolVersion:Me(),capabilities:FBa,clientInfo:Syi}),QBa=tg.extend({method:vn("initialize"),params:UBa});var qBa=kr({experimental:cl(Me(),eg).optional(),logging:eg.optional(),completions:eg.optional(),prompts:kr({listChanged:Za().optional()}).optional(),resources:kr({subscribe:Za().optional(),listChanged:Za().optional()}).optional(),tools:kr({listChanged:Za().optional()}).optional(),tasks:LBa.optional()}),TEr=rg.extend({protocolVersion:Me(),capabilities:qBa,serverInfo:Syi,instructions:Me().optional()}),Iyi=gI.extend({method:vn("notifications/initialized"),params:mI.optional()}),xyi=a(t=>Iyi.safeParse(t).success,"isInitializedNotification"),E0t=tg.extend({method:vn("ping"),params:mb.optional()}),GBa=kr({progress:Js(),total:Vl(Js()),message:Vl(Me())}),HBa=kr({...mI.shape,...GBa.shape,progressToken:yyi}),_0t=gI.extend({method:vn("notifications/progress"),params:HBa}),jBa=mb.extend({cursor:Eyi.optional()}),ePe=tg.extend({params:jBa.optional()}),tPe=rg.extend({nextCursor:Eyi.optional()}),$Ba=dy(["working","input_required","completed","failed","cancelled"]),rPe=kr({taskId:Me(),status:$Ba,ttl:ec([Js(),uCe()]),createdAt:Me(),lastUpdatedAt:Me(),pollInterval:Vl(Js()),statusMessage:Vl(Me())}),wJ=rg.extend({task:rPe}),VBa=mI.merge(rPe),nPe=gI.extend({method:vn("notifications/tasks/status"),params:VBa}),C0t=tg.extend({method:vn("tasks/get"),params:mb.extend({taskId:Me()})}),v0t=rg.merge(rPe),b0t=tg.extend({method:vn("tasks/result"),params:mb.extend({taskId:Me()})}),TJf=rg.loose(),T0t=ePe.extend({method:vn("tasks/list")}),S0t=tPe.extend({tasks:br(rPe)}),I0t=tg.extend({method:vn("tasks/cancel"),params:mb.extend({taskId:Me()})}),wyi=rg.merge(rPe),Ryi=kr({uri:Me(),mimeType:Vl(Me()),_meta:cl(Me(),$l()).optional()}),Pyi=Ryi.extend({text:Me()}),SEr=Me().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),kyi=Ryi.extend({blob:SEr}),iPe=dy(["user","assistant"]),e0e=kr({audience:br(iPe).optional(),priority:Js().min(0).max(1).optional(),lastModified:Oie.datetime({offset:!0}).optional()}),Dyi=kr({...Zfe.shape,...Z2e.shape,uri:Me(),description:Vl(Me()),mimeType:Vl(Me()),annotations:e0e.optional(),_meta:Vl(_0({}))}),WBa=kr({...Zfe.shape,...Z2e.shape,uriTemplate:Me(),description:Vl(Me()),mimeType:Vl(Me()),annotations:e0e.optional(),_meta:Vl(_0({}))}),zBa=ePe.extend({method:vn("resources/list")}),IEr=tPe.extend({resources:br(Dyi)}),YBa=ePe.extend({method:vn("resources/templates/list")}),xEr=tPe.extend({resourceTemplates:br(WBa)}),wEr=mb.extend({uri:Me()}),KBa=wEr,JBa=tg.extend({method:vn("resources/read"),params:KBa}),REr=rg.extend({contents:br(ec([Pyi,kyi]))}),oPe=gI.extend({method:vn("notifications/resources/list_changed"),params:mI.optional()}),XBa=wEr,ZBa=tg.extend({method:vn("resources/subscribe"),params:XBa}),e3a=wEr,t3a=tg.extend({method:vn("resources/unsubscribe"),params:e3a}),r3a=mI.extend({uri:Me()}),PEr=gI.extend({method:vn("notifications/resources/updated"),params:r3a}),n3a=kr({name:Me(),description:Vl(Me()),required:Vl(Za())}),i3a=kr({...Zfe.shape,...Z2e.shape,description:Vl(Me()),arguments:Vl(br(n3a)),_meta:Vl(_0({}))}),o3a=ePe.extend({method:vn("prompts/list")}),kEr=tPe.extend({prompts:br(i3a)}),s3a=mb.extend({name:Me(),arguments:cl(Me(),Me()).optional()}),a3a=tg.extend({method:vn("prompts/get"),params:s3a}),DEr=kr({type:vn("text"),text:Me(),annotations:e0e.optional(),_meta:cl(Me(),$l()).optional()}),NEr=kr({type:vn("image"),data:SEr,mimeType:Me(),annotations:e0e.optional(),_meta:cl(Me(),$l()).optional()}),MEr=kr({type:vn("audio"),data:SEr,mimeType:Me(),annotations:e0e.optional(),_meta:cl(Me(),$l()).optional()}),c3a=kr({type:vn("tool_use"),name:Me(),id:Me(),input:cl(Me(),$l()),_meta:cl(Me(),$l()).optional()}),l3a=kr({type:vn("resource"),resource:ec([Pyi,kyi]),annotations:e0e.optional(),_meta:cl(Me(),$l()).optional()}),u3a=Dyi.extend({type:vn("resource_link")}),OEr=ec([DEr,NEr,MEr,u3a,l3a]),d3a=kr({role:iPe,content:OEr}),BEr=rg.extend({description:Me().optional(),messages:br(d3a)}),sPe=gI.extend({method:vn("notifications/prompts/list_changed"),params:mI.optional()}),f3a=kr({title:Me().optional(),readOnlyHint:Za().optional(),destructiveHint:Za().optional(),idempotentHint:Za().optional(),openWorldHint:Za().optional()}),p3a=kr({taskSupport:dy(["required","optional","forbidden"]).optional()}),Nyi=kr({...Zfe.shape,...Z2e.shape,description:Me().optional(),inputSchema:kr({type:vn("object"),properties:cl(Me(),eg).optional(),required:br(Me()).optional()}).catchall($l()),outputSchema:kr({type:vn("object"),properties:cl(Me(),eg).optional(),required:br(Me()).optional()}).catchall($l()).optional(),annotations:f3a.optional(),execution:p3a.optional(),_meta:cl(Me(),$l()).optional()}),h3a=ePe.extend({method:vn("tools/list")}),LEr=tPe.extend({tools:br(Nyi)}),VQ=rg.extend({content:br(OEr).default([]),structuredContent:cl(Me(),$l()).optional(),isError:Za().optional()}),SJf=VQ.or(rg.extend({toolResult:$l()})),m3a=J2e.extend({name:Me(),arguments:cl(Me(),$l()).optional()}),g3a=tg.extend({method:vn("tools/call"),params:m3a}),aPe=gI.extend({method:vn("notifications/tools/list_changed"),params:mI.optional()}),Myi=kr({autoRefresh:Za().default(!0),debounceMs:Js().int().nonnegative().default(300)}),Oyi=dy(["debug","info","notice","warning","error","critical","alert","emergency"]),A3a=mb.extend({level:Oyi}),y3a=tg.extend({method:vn("logging/setLevel"),params:A3a}),E3a=mI.extend({level:Oyi,logger:Me().optional(),data:$l()}),FEr=gI.extend({method:vn("notifications/message"),params:E3a}),_3a=kr({name:Me().optional()}),C3a=kr({hints:br(_3a).optional(),costPriority:Js().min(0).max(1).optional(),speedPriority:Js().min(0).max(1).optional(),intelligencePriority:Js().min(0).max(1).optional()}),v3a=kr({mode:dy(["auto","required","none"]).optional()}),b3a=kr({type:vn("tool_result"),toolUseId:Me().describe("The unique identifier for the corresponding tool call."),content:br(OEr).default([]),structuredContent:kr({}).loose().optional(),isError:Za().optional(),_meta:cl(Me(),$l()).optional()}),T3a=lje("type",[DEr,NEr,MEr]),m0t=lje("type",[DEr,NEr,MEr,c3a,b3a]),S3a=kr({role:iPe,content:ec([m0t,br(m0t)]),_meta:cl(Me(),$l()).optional()}),I3a=J2e.extend({messages:br(S3a),modelPreferences:C3a.optional(),systemPrompt:Me().optional(),includeContext:dy(["none","thisServer","allServers"]).optional(),temperature:Js().optional(),maxTokens:Js().int(),stopSequences:br(Me()).optional(),metadata:eg.optional(),tools:br(Nyi).optional(),toolChoice:v3a.optional()}),cPe=tg.extend({method:vn("sampling/createMessage"),params:I3a}),UEr=rg.extend({model:Me(),stopReason:Vl(dy(["endTurn","stopSequence","maxTokens"]).or(Me())),role:iPe,content:T3a}),QEr=rg.extend({model:Me(),stopReason:Vl(dy(["endTurn","stopSequence","maxTokens","toolUse"]).or(Me())),role:iPe,content:ec([m0t,br(m0t)])}),x3a=kr({type:vn("boolean"),title:Me().optional(),description:Me().optional(),default:Za().optional()}),w3a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),minLength:Js().optional(),maxLength:Js().optional(),format:dy(["email","uri","date","date-time"]).optional(),default:Me().optional()}),R3a=kr({type:dy(["number","integer"]),title:Me().optional(),description:Me().optional(),minimum:Js().optional(),maximum:Js().optional(),default:Js().optional()}),P3a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),enum:br(Me()),default:Me().optional()}),k3a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),oneOf:br(kr({const:Me(),title:Me()})),default:Me().optional()}),D3a=kr({type:vn("string"),title:Me().optional(),description:Me().optional(),enum:br(Me()),enumNames:br(Me()).optional(),default:Me().optional()}),N3a=ec([P3a,k3a]),M3a=kr({type:vn("array"),title:Me().optional(),description:Me().optional(),minItems:Js().optional(),maxItems:Js().optional(),items:kr({type:vn("string"),enum:br(Me())}),default:br(Me()).optional()}),O3a=kr({type:vn("array"),title:Me().optional(),description:Me().optional(),minItems:Js().optional(),maxItems:Js().optional(),items:kr({anyOf:br(kr({const:Me(),title:Me()}))}),default:br(Me()).optional()}),B3a=ec([M3a,O3a]),L3a=ec([D3a,N3a,B3a]),F3a=ec([L3a,x3a,w3a,R3a]),U3a=J2e.extend({mode:vn("form").optional(),message:Me(),requestedSchema:kr({type:vn("object"),properties:cl(Me(),F3a),required:br(Me()).optional()})}),Q3a=J2e.extend({mode:vn("url"),message:Me(),elicitationId:Me(),url:Me().url()}),q3a=ec([U3a,Q3a]),lPe=tg.extend({method:vn("elicitation/create"),params:q3a}),G3a=mI.extend({elicitationId:Me()}),H3a=gI.extend({method:vn("notifications/elicitation/complete"),params:G3a}),qEr=rg.extend({action:dy(["accept","decline","cancel"]),content:dje(t=>t===null?void 0:t,cl(Me(),ec([Me(),Js(),Za(),br(Me())])).optional())}),j3a=kr({type:vn("ref/resource"),uri:Me()});var $3a=kr({type:vn("ref/prompt"),name:Me()}),V3a=mb.extend({ref:ec([$3a,j3a]),argument:kr({name:Me(),value:Me()}),context:kr({arguments:cl(Me(),Me()).optional()}).optional()}),W3a=tg.extend({method:vn("completion/complete"),params:V3a});var GEr=rg.extend({completion:_0({values:br(Me()).max(100),total:Vl(Js().int()),hasMore:Vl(Za())})}),z3a=kr({uri:Me().startsWith("file://"),name:Me().optional(),_meta:cl(Me(),$l()).optional()}),HEr=tg.extend({method:vn("roots/list"),params:mb.optional()}),Y3a=rg.extend({roots:br(z3a)}),K3a=gI.extend({method:vn("notifications/roots/list_changed"),params:mI.optional()}),IJf=ec([E0t,QBa,W3a,y3a,a3a,o3a,zBa,YBa,JBa,ZBa,t3a,g3a,h3a,C0t,b0t,T0t,I0t]),xJf=ec([y0t,_0t,Iyi,K3a,nPe]),wJf=ec([xJ,UEr,QEr,qEr,Y3a,v0t,S0t,wJ]),RJf=ec([E0t,cPe,lPe,HEr,C0t,b0t,T0t,I0t]),PJf=ec([y0t,_0t,FEr,PEr,oPe,aPe,sPe,nPe,H3a]),kJf=ec([xJ,TEr,GEr,BEr,kEr,IEr,xEr,REr,VQ,LEr,v0t,S0t,wJ]),An=class t extends Error{static{a(this,"McpError")}constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===kn.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new _Er(o.elicitations,r)}return new t(e,r,n)}},_Er=class extends An{static{a(this,"UrlElicitationRequiredError")}constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(kn.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};var jEr=class{static{a(this,"AuthMetadata")}},x0t=class extends jEr{static{a(this,"MCPAuthMetadata")}constructor(e){super(),this.ctx=e}async getMetadataFromOriginalUrl(e,r){let n=await this.getResourceMetadataChallenge(e),o,s,c,l=await this.getResourceMetadata(n,{url:e,headers:r??{}});l.resource&&(o=l.authorization_servers?.[0],s=l.scopes_supported,c=l);let u=new URL(e).origin,d={};o||(o=u,d=r??{});let p;try{let m=await this.getAuthorizationServerMetadata(o,d),g=qAi(m);return p={authorizationServer:o,serverMetadata:g,resourceMetadata:c},Yt.info(this.ctx,"authMetadata",p),p}catch(m){Yt.warn(this.ctx,`Error populating auth metadata: ${String(m)}`)}let h=GAi(new URL(u));return h.scopes_supported=s??h.scopes_supported??[],p={authorizationServer:o,serverMetadata:h,resourceMetadata:c},p}async getResourceMetadataChallenge(e){let r=await gJ(this.ctx,e,"POST"),n;if(r.status===401&&r.headers.has("WWW-Authenticate")){let o=r.headers.get("WWW-Authenticate"),{scheme:s,params:c}=Wft(o);s==="Bearer"&&c.resource_metadata&&(n=c.resource_metadata)}return n}async getResourceMetadata(e,r){if(!e)return{resource:""};let n=new URL(e),o=new URL(r.url),s={};n.origin===o.origin&&(s=r.headers);let c=await gJ(this.ctx,e,"GET",{...s,Accept:"application/json","MCP-Protocol-Version":nN});if(c.status!==200)throw new Error(`Failed to fetch resource metadata: ${c.status} ${await zAr(c)}`);let l=await c.json();if(UAi(l)){let u=HAi(e),d=new URL(l.resource).toString(),p=new URL(u).toString();if(d!==p)throw new Error(`Protected Resource Metadata resource "${d}" does not match MCP server resolved resource "${p}". The MCP server must follow OAuth spec https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation`);return l}else throw new Error(`Invalid resource metadata: ${JSON.stringify(l)}`)}async getAuthorizationServerMetadata(e,r){let n=new URL(e),o=n.pathname==="/"?"":n.pathname,s=new URL(LAi,e).toString()+o,c=await gJ(this.ctx,s,"GET",{...r,Accept:"application/json","MCP-Protocol-Version":nN});if(c.status!==200&&(c=await gJ(this.ctx,bi(e,".well-known","openid-configuration"),"GET",{...r,Accept:"application/json","MCP-Protocol-Version":nN}),c.status!==200))throw new Error(`Failed to fetch authorization server metadata: ${c.status} ${await zAr(c)}`);let l=await c.json();if(QAi(l))return l;throw new Error(`Invalid authorization server metadata: ${JSON.stringify(l)}`)}};f();f();f();var Byi=de(Dn());var w0t="mcp.elicitation",R0t=class{constructor(){this.ongoingMcpElicitationCalls=!1;this.elicitationRequestType=new Byi.ProtocolRequestType("copilot/mcpElicitation")}static{a(this,"ElicitationHandler")}async handleRequest(e,r,n,o,s){if(this.ongoingMcpElicitationCalls)throw new An(kn.InternalError,"Another MCP elicitation request is already in progress.");this.ongoingMcpElicitationCalls=!0;try{let c=n.params.message;if("url"in n.params)throw new An(kn.InvalidRequest,"URL mode elicitation is not supported");let l=n.params.requestedSchema;Yt.info(e.ctx,`MCP server ${r} elicitation request received: ${c}`),await ma(e.ctx,{message:`MCP server ${r} elicitation request received: ${c}`,server:r});let d=await e.ctx.get(rk).sendRequest(this.elicitationRequestType,{mcpServer:r,message:c,requestedSchema:l,conversationId:e.conversation.id.toString(),roundId:o??e.agentToolCalls.getRound(0).roundId,turnId:e.turn.id.toString(),toolCallId:s??e.agentToolCalls.getRound(0).toolCalls[0].id});return st(e.ctx,w0t,Pt.createAndMarkAsIssued()),rr(e.ctx,w0t),d}catch(c){let l=`Failed to process elicitation request: ${c instanceof Error?c.message:String(c)}`;throw Yt.error(e.ctx,l,c),await Op(e.ctx,{message:l,server:r}),Lo(e.ctx,c,w0t),Sa(e.ctx,w0t,c),new An(kn.InternalError,l)}finally{this.ongoingMcpElicitationCalls=!1}}};f();f();f();var AI=class{static{a(this,"MCPNotificationHandler")}constructor(e,r){this.ctx=e,this.serverName=r}};var uPe=class extends AI{static{a(this,"LoggingMessageNotificationHandler")}constructor(e,r){super(e,r)}handle(e){let r=typeof e.params.data=="string"?e.params.data:JSON.stringify(e.params.data);switch(e.params.logger&&(r=`${e.params.logger}: ${r}`),e.params?.level){case"debug":case"info":case"notice":Yt.info(this.ctx,`MCP server ${this.serverName} log:`,r),ma(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;case"warning":Yt.warn(this.ctx,`MCP server ${this.serverName} log:`,r),SJ(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;case"error":case"critical":case"alert":case"emergency":Yt.error(this.ctx,`MCP server ${this.serverName} log:`,r),Op(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break;default:Yt.info(this.ctx,`MCP server ${this.serverName} log:`,r),ma(this.ctx,{message:`Notification message: ${r}`,server:this.serverName});break}}};f();var dPe=class extends AI{static{a(this,"PromptListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Yt.info(this.ctx,"Prompts list changed, refreshing prompts..."),ma(this.ctx,{message:"Prompts list changed, refreshing prompts...",server:this.serverName}),this.emitter.emit(Tdt)}};f();var fPe=class extends AI{static{a(this,"ResourceListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Yt.info(this.ctx,"Resource list changed, refreshing resources..."),ma(this.ctx,{message:"Resource list changed, refreshing resources...",server:this.serverName}),this.emitter.emit(bdt)}};f();var pPe=class extends AI{static{a(this,"ResourceUpdatedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Yt.info(this.ctx,`Resource updated for URI: ${e.params.uri}`),ma(this.ctx,{message:`Resource updated: ${e.params.uri}`,server:this.serverName}),this.emitter.emit(opi)}};f();var P0t=class{static{a(this,"MCPRequestHandler")}constructor(e,r){this.ctx=e,this.serverName=r}},hPe=class extends P0t{static{a(this,"ListRootsRequestHandler")}constructor(e,r){super(e,r)}handle(e){Yt.info(this.ctx,`MCP server ${this.serverName} requested roots list`);let r=[];try{(this.ctx.get(zr).getWorkspaceFolders()||[]).forEach(o=>{r.push(o)}),ma(this.ctx,{message:`Requested roots list and found ${r.length} root(s).`,server:this.serverName})}catch(n){Yt.error(this.ctx,`Error getting workspace folders for MCP server ${this.serverName}:`,n),Op(this.ctx,{message:`Error getting workspace folders for MCP server ${this.serverName}: ${n instanceof Error?n.message:String(n)}`,server:this.serverName})}return{roots:r}}};f();var mPe=class extends AI{static{a(this,"ToolListChangedNotificationHandler")}constructor(e,r,n){super(e,r),this.emitter=n}handle(e){Yt.info(this.ctx,"Tool list changed, refreshing tools..."),ma(this.ctx,{message:"Tool list changed, refreshing tools...",server:this.serverName}),this.emitter.emit(vdt)}};f();var Lyi="mcp.sampling",k0t=class{constructor(){this.defaultTemperature=.7;this.ongoingMcpSamplingCalls=!1}static{a(this,"McpSamplingService")}async handleSamplingRequest(e,r,n,o,s,c){try{if(this.ongoingMcpSamplingCalls)throw new An(kn.InternalError,"Another MCP sampling request is already in progress.");this.ongoingMcpSamplingCalls=!0,Yt.info(e.ctx,`MCP server ${o} requested sampling:`,n.params),await ma(e.ctx,{message:`Sampling request received from ${o}: ${JSON.stringify({messageCount:n.params.messages.length,systemPrompt:n.params.systemPrompt?"provided":"none",maxTokens:n.params.maxTokens,temperature:n.params.temperature})}`,server:o});let l=await e.ctx.get(HQ).readMcpSamplingConfig({serverName:o});if(l.alwaysDeny)throw new Error("User has chosen to always deny MCP tools with this mcp server.");if(!l.alwaysAllow){let y=n.params.messages.filter(v=>v.role==="user"),E=y[y.length-1];if((await e.ctx.get(Cu).invokeClientToolConfirmation(e,{name:o,title:`Allow MCP tools from "${o}" to make LLM requests?`,message:`The MCP server "${o}" has issued a request to make a language model call. Do you want to allow it to make requests during chat?`,input:E,conversationId:e.conversation.id,roundId:s??e.agentToolCalls.getRound(0).roundId,turnId:e.turn.id,toolCallId:c??e.agentToolCalls.getRound(0).toolCalls[0].id})).result==="dismiss")throw new Ec}let u=await this.getModelConfiguration(e.ctx,n,l),d=this.convertMCPMessagesToChatML(e.ctx,n.params.messages,n.params.systemPrompt),p=(await Mye(e.ctx,e.turn.telemetryId,e.conversation.telemetryId)).extendedBy({messageSource:"mcp.sampling"}),m=new Cn.CancellationTokenSource().token,g=await r.fetchResponse({modelConfiguration:u,messages:d,uiKind:"conversationPanel",llmInteraction:e.toLlmInteraction(),temperature:n.params.temperature??this.defaultTemperature,stop:n.params.stopSequences},m,p),A=this.processFetchResult(g,u.uiName);return rr(e.ctx,Lyi,{userPreference:l.alwaysAllow?"autoApprove":l.alwaysDeny?"autoDeny":"none",selectedModel:u.uiName,success:"true"}),A}catch(l){let u=`Failed to process sampling request: ${l instanceof Error?l.message:String(l)}`;throw Yt.error(e.ctx,u,l),await Op(e.ctx,{message:u,server:o}),rr(e.ctx,Lyi,{success:"false",errorMessage:u}),new An(kn.InternalError,u)}finally{this.ongoingMcpSamplingCalls=!1}}convertMCPMessagesToChatML(e,r,n){let o=[];n&&o.push({role:"system",content:n});for(let s of r){let c,l=Array.isArray(s.content)?s.content[0]:s.content;if(!l){Yt.warn(e,"Empty content in MCP message, skipping");continue}if(l.type==="text")c=l.text;else if(l.type==="image")c=[{type:"image_url",image_url:{url:atob(l.data)}}];else throw Yt.warn(e,`Unknown MCP content type: ${l.type}, defaulting to empty array`),new Error(`Unknown MCP content type: ${l.type}`);let u;switch(s.role){case"user":u="user";break;case"assistant":u="assistant";break;default:u="user",Yt.warn(e,`Unknown MCP role: ${s.role}, defaulting to user`)}o.push({role:u,content:c})}return o}processFetchResult(e,r){if(e.type!=="success"){let n=`Unexpected fetch result type: ${e.type}.`;throw"reason"in e&&(n+=` Reason: ${e.reason}`),new Error(n)}return{model:r,role:"assistant",content:{type:"text",text:e.value}}}async getModelConfiguration(e,r,n){let o=await this.getAvailableBYOKModels(e),s=[...await this.getAvailableModels(e),...o.map(d=>d.name)];if(!s)throw new Error("No available models found");let c=n.allowedModels&&n.allowedModels.length>0?s.filter(d=>n.allowedModels.some(p=>p.toLowerCase()===d.toLowerCase())):s;if(!c||c.length===0)throw new Error("No available models found");let l;r.params.modelPreferences?.hints&&(l=this.mapFindFirst(r.params.modelPreferences.hints,d=>c.find(p=>p.toLowerCase().includes(d.name.toLowerCase())))),l=l??c[0];let u=o.find(d=>d.name===l);return u?$P(e,u.provider,l):await e.get(wa).getBestChatModelConfig([l])}async getAvailableModels(e){return(await e.get(tl).getMetadata()).filter(n=>n.capabilities.type&&!Nte.has(n.capabilities.family)&&n.capabilities.supports?.tool_calls&&(n.capabilities.limits?.max_prompt_tokens??!1)).map(n=>n.capabilities.family)}async getAvailableBYOKModels(e){return(await new Ka(e.get(Ti)).getAllModels(e)).filter(n=>n.capabilities?.toolCalling)}mapFindFirst(e,r){for(let n of e){let o=r(n);if(o!==void 0)return o}}};f();var t0e=class extends Error{constructor(r,n){super(r);this.challengeInfo=n;this.name="ScopeChallengeError"}static{a(this,"ScopeChallengeError")}};function Fyi(t,e){if(t!==403||!e)return null;let{scheme:r,params:n}=Wft(e);if(r!=="Bearer"||n.error!=="insufficient_scope")return null;let o=n.scope;if(!o)return null;let s=o.split(" ").filter(c=>c.length>0);return{error:n.error,requiredScopes:s,resourceMetadata:n.resource_metadata,errorDescription:n.error_description}}a(Fyi,"parseScopeChallenge");f();var $Er=/[^a-z0-9_-]/gi;var J3a=process.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function Uyi(){let t={};for(let e of J3a){let r=process.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}a(Uyi,"getDefaultEnvironment");async function Qyi(t,e,r){if(!e.description){let n=`Tool ${e.name} does not have a description. Tools must be accurately described to be called.`;Yt.warn(t,n),await SJ(t,{message:n,server:r,tool:e.name}),e.description=""}if($Er.lastIndex=0,$Er.test(e.name)){let n=`Tool ${e.name} is invalid. Tools names may only contain [a-zA-Z0-9_-]`;Yt.warn(t,n),await SJ(t,{message:n,server:r,tool:e.name}),e._nameForModel=e.name.replace($Er,"_")}else e._nameForModel=e.name;return e}a(Qyi,"normalizeTool");var D0t=class{constructor(){this.seenPrefixes=new Set}static{a(this,"McpPrefixGenerator")}generate(e){let r="mcp_"+e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"_").slice(0,13),n=r;for(let o=2;this.seenPrefixes.has(n);o++)n=r+o;return this.seenPrefixes.add(n),n}};f();async function*VEr(t,e,r){let n;do{let o=await t(n),s=e(o);s.length>0&&(yield s),n=r(o)}while(n!==void 0)}a(VEr,"paginateRequest");async function WEr(t){let e=[];for await(let r of t)e.push(...r);return e}a(WEr,"flattenAsyncIterable");f();f();f();f();function r0e(t){return!!t._zod}a(r0e,"isZ4Schema");function g2(t,e){return r0e(t)?xie(t,e):t.safeParse(e)}a(g2,"safeParse");function N0t(t){if(!t)return;let e;if(r0e(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}a(N0t,"getObjectShape");function qyi(t){if(r0e(t)){let s=t._zod?.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}a(qyi,"getLiteralValue");f();function WQ(t){return t==="completed"||t==="failed"||t==="cancelled"}a(WQ,"isTerminal");f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();var Ve0=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();f();function zEr(t){let r=N0t(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=qyi(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}a(zEr,"getMethodLiteral");function YEr(t,e){let r=g2(t,e);if(!r.success)throw r.error;return r.data}a(YEr,"parseWithCompat");var nLa=6e4,M0t=class{static{a(this,"Protocol")}constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(y0t,r=>{this._oncancel(r)}),this.setNotificationHandler(_0t,r=>{this._onprogress(r)}),this.setRequestHandler(E0t,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(C0t,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new An(kn.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(b0t,async(r,n)=>{let o=a(async()=>{let s=r.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(s,n.sessionId);){if(l.type==="response"||l.type==="error"){let u=l.message,d=u.id,p=this._requestResolvers.get(d);if(p)if(this._requestResolvers.delete(d),l.type==="response")p(u);else{let h=u,m=new An(h.error.code,h.error.message,h.error.data);p(m)}else{let h=l.type==="response"?"Response":"Error";this._onerror(new Error(`${h} handler missing for request ${d}`))}continue}await this._transport?.send(l.message,{relatedRequestId:n.requestId})}}let c=await this._taskStore.getTask(s,n.sessionId);if(!c)throw new An(kn.InvalidParams,`Task not found: ${s}`);if(!WQ(c.status))return await this._waitForTaskUpdate(s,n.signal),await o();if(WQ(c.status)){let l=await this._taskStore.getTaskResult(s,n.sessionId);return this._clearTaskQueue(s),{...l,_meta:{...l._meta,[jQ]:{taskId:s}}}}return await o()},"handleTaskResult");return await o()}),this.setRequestHandler(T0t,async(r,n)=>{try{let{tasks:o,nextCursor:s}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:s,_meta:{}}}catch(o){throw new An(kn.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(I0t,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new An(kn.InvalidParams,`Task not found: ${r.params.taskId}`);if(WQ(o.status))throw new An(kn.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let s=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!s)throw new An(kn.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof An?o:new An(kn.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,o,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:o})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),An.fromError(kn.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=s=>{n?.(s),this._onerror(s)};let o=this._transport?.onmessage;this._transport.onmessage=(s,c)=>{o?.(s,c),IJ(s)||Tyi(s)?this._onresponse(s):X2e(s)?this._onrequest(s,c):byi(s)?this._onnotification(s):this._onerror(new Error(`Unknown message type: ${JSON.stringify(s)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=An.fromError(kn.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,s=e.params?._meta?.[jQ]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:e.id,error:{code:kn.MethodNotFound,message:"Method not found"}};s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):o?.send(p).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}let c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);let l=_yi(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,d={signal:c.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:a(async p=>{if(c.signal.aborted)return;let h={relatedRequestId:e.id};s&&(h.relatedTask={taskId:s}),await this.notification(p,h)},"sendNotification"),sendRequest:a(async(p,h,m)=>{if(c.signal.aborted)throw new An(kn.ConnectionClosed,"Request was cancelled");let g={...m,relatedRequestId:e.id};s&&!g.relatedTask&&(g.relatedTask={taskId:s});let A=g.relatedTask?.taskId??s;return A&&u&&await u.updateTaskStatus(A,"input_required"),await this.request(p,h,g)},"sendRequest"),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:s,taskStore:u,taskRequestedTtl:l?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{l&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,d)).then(async p=>{if(c.signal.aborted)return;let h={result:p,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)},async p=>{if(c.signal.aborted)return;let h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(p.code)?p.code:kn.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:h,timestamp:Date.now()},o?.sessionId):await o?.send(h)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,o=Number(r),s=this._progressHandlers.get(o);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let c=this._responseHandlers.get(o),l=this._timeoutInfo.get(o);if(l&&c&&l.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(u){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),c(u);return}s(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),IJ(e))n(e);else{let c=new An(e.error.code,e.error.message,e.error.data);n(c)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let s=!1;if(IJ(e)&&e.result&&typeof e.result=="object"){let c=e.result;if(c.task&&typeof c.task=="object"){let l=c.task;typeof l.taskId=="string"&&(s=!0,this._taskProgressTokens.set(l.taskId,r))}}if(s||this._progressHandlers.delete(r),IJ(e))o(e);else{let c=An.fromError(e.error.code,e.error.message,e.error.data);o(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(e,r,n)}}catch(c){yield{type:"error",error:c instanceof An?c:new An(kn.InternalError,String(c))}}return}let s;try{let c=await this.request(e,wJ,n);if(c.task)s=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new An(kn.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:s},n);if(yield{type:"taskStatus",task:l},WQ(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)}:l.status==="failed"?yield{type:"error",error:new An(kn.InternalError,`Task ${s} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new An(kn.InternalError,`Task ${s} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)};return}let u=l.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(d=>setTimeout(d,u)),n?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof An?c:new An(kn.InternalError,String(c))}}}request(e,r,n){let{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c,task:l,relatedTask:u}=n??{};return new Promise((d,p)=>{let h=a(v=>{p(v)},"earlyReject");if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),l&&this.assertTaskCapability(e.method)}catch(v){h(v);return}n?.signal?.throwIfAborted();let m=this._requestMessageId++,g={...e,jsonrpc:"2.0",id:m};n?.onprogress&&(this._progressHandlers.set(m,n.onprogress),g.params={...e.params,_meta:{...e.params?._meta||{},progressToken:m}}),l&&(g.params={...g.params,task:l}),u&&(g.params={...g.params,_meta:{...g.params?._meta||{},[jQ]:u}});let A=a(v=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(v)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c}).catch(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));let b=v instanceof An?v:new An(kn.RequestTimeout,String(v));p(b)},"cancel");this._responseHandlers.set(m,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return p(v);try{let b=g2(r,v.result);b.success?d(b.data):p(b.error)}catch(b){p(b)}}}),n?.signal?.addEventListener("abort",()=>{A(n?.signal?.reason)});let y=n?.timeout??nLa,E=a(()=>A(An.fromError(kn.RequestTimeout,"Request timed out",{timeout:y})),"timeoutHandler");this._setupTimeout(m,y,n?.maxTotalTimeout,E,n?.resetTimeoutOnProgress??!1);let _=u?.taskId;if(_){let v=a(b=>{let I=this._responseHandlers.get(m);I?I(b):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))},"responseResolver");this._requestResolvers.set(m,v),this._enqueueTaskMessage(_,{type:"request",message:g,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(m),p(b)})}else this._transport.send(g,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:c}).catch(v=>{this._cleanupTimeout(m),p(v)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},v0t,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},S0t,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},wyi,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let l={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[jQ]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:l,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let l={...e,jsonrpc:"2.0"};r?.relatedTask&&(l={...l,params:{...l.params,_meta:{...l.params?._meta||{},[jQ]:r.relatedTask}}}),this._transport?.send(l,r).catch(u=>this._onerror(u))});return}let c={...e,jsonrpc:"2.0"};r?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[jQ]:r.relatedTask}}}),await this._transport.send(c,r)}setRequestHandler(e,r){let n=zEr(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,s)=>{let c=YEr(e,o);return Promise.resolve(r(c,s))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=zEr(e);this._notificationHandlers.set(n,o=>{let s=YEr(e,o);return Promise.resolve(r(s))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,o)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let o of n)if(o.type==="request"&&X2e(o.message)){let s=o.message.id,c=this._requestResolvers.get(s);c?(c(new An(kn.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(e);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,s)=>{if(r.aborted){s(new An(kn.InvalidRequest,"Request cancelled"));return}let c=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(c),s(new An(kn.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:a(async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},r)},"createTask"),getTask:a(async o=>{let s=await n.getTask(o,r);if(!s)throw new An(kn.InvalidParams,"Failed to retrieve task: Task not found");return s},"getTask"),storeTaskResult:a(async(o,s,c)=>{await n.storeTaskResult(o,s,c,r);let l=await n.getTask(o,r);if(l){let u=nPe.parse({method:"notifications/tasks/status",params:l});await this.notification(u),WQ(l.status)&&this._cleanupTaskProgressHandler(o)}},"storeTaskResult"),getTaskResult:a(o=>n.getTaskResult(o,r),"getTaskResult"),updateTaskStatus:a(async(o,s,c)=>{let l=await n.getTask(o,r);if(!l)throw new An(kn.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(WQ(l.status))throw new An(kn.InvalidParams,`Cannot update task "${o}" from terminal status "${l.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,s,c,r);let u=await n.getTask(o,r);if(u){let d=nPe.parse({method:"notifications/tasks/status",params:u});await this.notification(d),WQ(u.status)&&this._cleanupTaskProgressHandler(o)}},"updateTaskStatus"),listTasks:a(o=>n.listTasks(o,r),"listTasks")}}};function Gyi(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}a(Gyi,"isPlainObject");function Hyi(t,e){let r={...t};for(let n in e){let o=n,s=e[o];if(s===void 0)continue;let c=r[o];Gyi(c)&&Gyi(s)?r[o]={...c,...s}:r[o]=s}return r}a(Hyi,"mergeCapabilities");f();var OCi=de(NCr(),1),BCi=de(MCi(),1);function V7a(){let t=new OCi.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,BCi.default)(t),t}a(V7a,"createDefaultAjvInstance");var mpt=class{static{a(this,"AjvJsonSchemaValidator")}constructor(e){this._ajv=e??V7a()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};f();var gpt=class{static{a(this,"ExperimentalClientTasks")}constructor(e){this._client=e}async*callToolStream(e,r=VQ,n){let o=this._client,s={...n,task:n?.task??(o.isToolTask(e.name)?{}:void 0)},c=o.requestStream({method:"tools/call",params:e},r,s),l=o.getToolOutputValidator(e.name);for await(let u of c){if(u.type==="result"&&l){let d=u.result;if(!d.structuredContent&&!d.isError){yield{type:"error",error:new An(kn.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(d.structuredContent)try{let p=l(d.structuredContent);if(!p.valid){yield{type:"error",error:new An(kn.InvalidParams,`Structured content does not match the tool's output schema: ${p.errorMessage}`)};return}}catch(p){if(p instanceof An){yield{type:"error",error:p};return}yield{type:"error",error:new An(kn.InvalidParams,`Failed to validate structured content: ${p instanceof Error?p.message:String(p)}`)};return}}yield u}}async getTask(e,r){return this._client.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._client.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._client.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._client.cancelTask({taskId:e},r)}requestStream(e,r,n){return this._client.requestStream(e,r,n)}};f();function LCi(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}a(LCi,"assertToolsCallTaskCapability");function FCi(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}a(FCi,"assertClientRequestTaskCapability");function Apt(t,e){if(!(!t||e===null||typeof e!="object")){if(t.type==="object"&&t.properties&&typeof t.properties=="object"){let r=e,n=t.properties;for(let o of Object.keys(n)){let s=n[o];r[o]===void 0&&Object.prototype.hasOwnProperty.call(s,"default")&&(r[o]=s.default),r[o]!==void 0&&Apt(s,r[o])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&Apt(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&Apt(r,e)}}a(Apt,"applyElicitationDefaults");function W7a(t){if(!t)return{supportsFormMode:!1,supportsUrlMode:!1};let e=t.form!==void 0,r=t.url!==void 0;return{supportsFormMode:e||!e&&!r,supportsUrlMode:r}}a(W7a,"getSupportedElicitationModes");var ypt=class extends M0t{static{a(this,"Client")}constructor(e,r){super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new mpt,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",aPe,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",sPe,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",oPe,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new gpt(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Hyi(this._capabilities,e)}setRequestHandler(e,r){let o=N0t(e)?.method;if(!o)throw new Error("Schema is missing a method literal");let s;if(r0e(o)){let l=o;s=l._zod?.def?.value??l.value}else{let l=o;s=l._def?.value??l.value}if(typeof s!="string")throw new Error("Schema method literal must be a string");let c=s;if(c==="elicitation/create"){let l=a(async(u,d)=>{let p=g2(lPe,u);if(!p.success){let v=p.error instanceof Error?p.error.message:String(p.error);throw new An(kn.InvalidParams,`Invalid elicitation request: ${v}`)}let{params:h}=p.data;h.mode=h.mode??"form";let{supportsFormMode:m,supportsUrlMode:g}=W7a(this._capabilities.elicitation);if(h.mode==="form"&&!m)throw new An(kn.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!g)throw new An(kn.InvalidParams,"Client does not support URL-mode elicitation requests");let A=await Promise.resolve(r(u,d));if(h.task){let v=g2(wJ,A);if(!v.success){let b=v.error instanceof Error?v.error.message:String(v.error);throw new An(kn.InvalidParams,`Invalid task creation result: ${b}`)}return v.data}let y=g2(qEr,A);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new An(kn.InvalidParams,`Invalid elicitation result: ${v}`)}let E=y.data,_=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&E.action==="accept"&&E.content&&_&&this._capabilities.elicitation?.form?.applyDefaults)try{Apt(_,E.content)}catch{}return E},"wrappedHandler");return super.setRequestHandler(e,l)}if(c==="sampling/createMessage"){let l=a(async(u,d)=>{let p=g2(cPe,u);if(!p.success){let E=p.error instanceof Error?p.error.message:String(p.error);throw new An(kn.InvalidParams,`Invalid sampling request: ${E}`)}let{params:h}=p.data,m=await Promise.resolve(r(u,d));if(h.task){let E=g2(wJ,m);if(!E.success){let _=E.error instanceof Error?E.error.message:String(E.error);throw new An(kn.InvalidParams,`Invalid task creation result: ${_}`)}return E.data}let A=h.tools||h.toolChoice?QEr:UEr,y=g2(A,m);if(!y.success){let E=y.error instanceof Error?y.error.message:String(y.error);throw new An(kn.InvalidParams,`Invalid sampling result: ${E}`)}return y.data},"wrappedHandler");return super.setRequestHandler(e,l)}return super.setRequestHandler(e,r)}assertCapability(e,r){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:nN,capabilities:this._capabilities,clientInfo:this._clientInfo}},TEr,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!Ayi.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){LCi(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&FCi(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},xJ,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},GEr,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},xJ,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},BEr,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},kEr,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},IEr,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},xEr,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},REr,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},xJ,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},xJ,r)}async callTool(e,r=VQ,n){if(this.isToolTaskRequired(e.name))throw new An(kn.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let o=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!o.structuredContent&&!o.isError)throw new An(kn.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent)try{let c=s(o.structuredContent);if(!c.valid)throw new An(kn.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof An?c:new An(kn.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return o}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of e){if(r.outputSchema){let o=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,o)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let n=await this.request({method:"tools/list",params:e},LEr,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,o){let s=Myi.safeParse(n);if(!s.success)throw new Error(`Invalid ${e} listChanged options: ${s.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:c,debounceMs:l}=s.data,{onChanged:u}=n,d=a(async()=>{if(!c){u(null,null);return}try{let h=await o();u(null,h)}catch(h){let m=h instanceof Error?h:new Error(String(h));u(m,null)}},"refresh"),p=a(()=>{if(l){let h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);let m=setTimeout(d,l);this._listChangedDebounceTimers.set(e,m)}else d()},"handler");this.setNotificationHandler(r,p)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};var UCi=de(require("events"));var qCr=6e4,rq=class{constructor(e,r,n){this.transport=null;this.emitter=new UCi.default;this.ongoingMcpToolCalls=[];this.isSamplingEnabled=!1;this.isElicitationEnabled=!1;this.cachedTools=[];this.cachedResources=[];this.cachedResourceTemplates=[];this.cachedPrompts=[];this.ctx=e;let o=e.get(Fn);this.isSamplingEnabled=o.getCapabilities().mcpSampling,this.isSamplingEnabled&&(this.samplingService=new k0t),this.isElicitationEnabled=o.getCapabilities().mcpElicitation,this.isElicitationEnabled&&(this.elicitationHandler=new R0t);let s=this.ctx.get(Dr).getEditorInfo(),c=this.ctx.get(Dr).getEditorPluginInfo();this.mcp=new ypt({name:`${s.name}/${c.name}`,version:`${s.version}/${c.version}`},{capabilities:{roots:{listChanged:!0},...this.isSamplingEnabled?{sampling:{}}:{},...this.isElicitationEnabled?{elicitation:{}}:{}}}),this.name=r}static{a(this,"MCPBaseServer")}get isConnected(){return this.transport!==null}async connect(e){if(this.transport=this.initTransport(e),!this.transport){let r=new Error("Failed to initialize transport");throw Yt.error(this.ctx,"Transport initialization failed:",r),r}this.addListeners();try{await this.mcp.connect(this.transport),this.initializeCache()}catch(r){throw Yt.error(this.ctx,"Connection failed:",r),await Op(this.ctx,{message:`Failed to connect to MCP server: ${r instanceof Error?r.message:String(r)}`,server:this.name}),this.transport=null,r}}async initializeCache(){await Promise.all([this.refreshToolsCache(!0),this.refreshResourcesCache(!0),this.refreshPromptsCache(!0)]),this.emitter.emit(NQ)}getCachedTools(){return this.cachedTools}getCachedResources(){return this.cachedResources}getCachedResourceTemplates(){return this.cachedResourceTemplates}getCachedPrompts(){return this.cachedPrompts}restoreCacheFromPersistence(e){this.cachedTools=[...e.tools],this.cachedResources=[...e.resources],this.cachedResourceTemplates=[...e.resourceTemplates],this.cachedPrompts=[...e.prompts]}async createMcpTool(e,r){let n={name:e.name,description:e.description,inputSchema:{...e.inputSchema||{},properties:e.inputSchema?.properties||{},type:e.inputSchema?.type||"object"},_status:r??"enabled",_nameForModel:e.name,annotations:e.annotations};return await Qyi(this.ctx,n,this.name),n}async handleMCPOperationError(e,r,n){try{return await e()}catch(o){let s=o;if(s instanceof t0e){let l=`OAuth scope challenge during ${r} from server ${this.name}. Required scopes: ${s.challengeInfo.requiredScopes.join(", ")}`;if(n.scopeChallengeHandler)return n.scopeChallengeHandler(s.challengeInfo.requiredScopes);if(Yt.info(this.ctx,l),await Op(this.ctx,{message:l,server:this.name}),n.errorHandler)return n.errorHandler(l);if("defaultValue"in n)return n.defaultValue;throw s}if(s.code===kn.MethodNotFound){if(Yt.info(this.ctx,`${r} not supported by server ${this.name}:`,s.message),"methodNotFoundValue"in n)return n.methodNotFoundValue;if(n.errorHandler)return n.errorHandler("Method not found");if("defaultValue"in n)return n.defaultValue;throw new Error("No default value or error handler provided")}let c=`Failed to ${r} from server ${this.name}: ${s.message||String(s)}`;if(Yt.error(this.ctx,c),await Op(this.ctx,{message:c,server:this.name}),n.errorHandler)return n.errorHandler(c);if("defaultValue"in n)return n.defaultValue;throw new Error("No default value or error handler provided")}}async*getResourcesIterable(e){if(!this.transport)return;let r=VEr(n=>this.mcp.listResources({cursor:n},{signal:e}),n=>n.resources,n=>n.nextCursor);for await(let n of r)yield n}async getResources(e){return await this.handleMCPOperationError(async()=>{let r=await WEr(this.getResourcesIterable(e));return ma(this.ctx,{message:`Discovered ${r.length} resources`,server:this.name}),r},"get resources",{defaultValue:[]})}async*getResourceTemplatesIterable(e){if(!this.transport)return;let r=VEr(n=>this.mcp.listResourceTemplates({cursor:n},{signal:e}),n=>n.resourceTemplates,n=>n.nextCursor);for await(let n of r)yield n}async getResourceTemplates(e){return await this.handleMCPOperationError(async()=>{let r=await WEr(this.getResourceTemplatesIterable(e));return ma(this.ctx,{message:`Discovered ${r.length} resource templates`,server:this.name}),r},"get resource templates",{defaultValue:[]})}async readResource(e){return this.transport?await this.handleMCPOperationError(async()=>await this.mcp.readResource({uri:e}),`read resource ${e}`,{defaultValue:null,methodNotFoundValue:{contents:[]}}):null}async subscribeResource(e){this.transport&&await this.handleMCPOperationError(async()=>{await this.mcp.subscribeResource({uri:e})},`subscribe resource ${e}`,{defaultValue:void 0})}async unsubscribeResource(e){this.transport&&await this.handleMCPOperationError(async()=>{await this.mcp.unsubscribeResource({uri:e})},`unsubscribe resource ${e}`,{defaultValue:void 0})}async callTool(e,r,n,o,s,c){let l=s$();this.ongoingMcpToolCalls.push({requestId:l,toolName:e,turnContext:o,roundId:s,toolCallId:c});let u=a(d=>{let p=new _r([],"error");return p.content.push(new fr(d)),p},"createErrorResult");try{return await this.handleMCPOperationError(async()=>{let d=new AbortController;n.onCancellationRequested(()=>{d.abort()});let p=await this.mcp.callTool({name:e,arguments:r,_meta:{progressToken:l}},VQ,{onprogress:a(m=>{Yt.info(this.ctx,`${e} calling progress`,m),ma(this.ctx,{message:`${e} calling progress:`+JSON.stringify(m),server:this.name})},"onprogress"),resetTimeoutOnProgress:!0,signal:d.signal});if(p&&typeof p=="object"){if(p.content||p.structuredContent)return this.formatToolResult(p);let m=`Error calling tool ${e}: `+JSON.stringify(p);return Yt.error(this.ctx,m),await Op(this.ctx,{message:m,server:this.name,tool:e}),u(m)}let h=`Error calling tool ${e}: `+JSON.stringify(p);return Yt.error(this.ctx,h),await Op(this.ctx,{message:h,server:this.name,tool:e}),u(h)},`call tool ${e}`,{errorHandler:u})}finally{this.ongoingMcpToolCalls=this.ongoingMcpToolCalls.filter(d=>d.requestId!==l)}}async getPrompt(e,r){return(await this.mcp.getPrompt({name:e,arguments:r})).messages}async completePrompt(e,r,n,o){return(await this.mcp.complete({ref:{type:"ref/prompt",name:e},argument:{name:r,value:n},context:{arguments:o}})).completion.values}addListeners(){this.mcp.onclose=()=>{Yt.info(this.ctx,`MCP server ${this.name} connection closed.`),ma(this.ctx,{message:"Connection state: Stopped",server:this.name})},this.mcp.onerror=e=>{Yt.error(this.ctx,`MCP server ${this.name} error:`,e),Op(this.ctx,{message:`Connection state: Error: ${e.message}`,server:this.name})},this.mcp.setNotificationHandler(FEr,e=>new uPe(this.ctx,this.name).handle(e)),this.mcp.setNotificationHandler(aPe,e=>new mPe(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(sPe,e=>new dPe(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(oPe,e=>new fPe(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setNotificationHandler(PEr,e=>new pPe(this.ctx,this.name,this.emitter).handle(e)),this.mcp.setRequestHandler(HEr,e=>(this.initRootsTracker(),new hPe(this.ctx,this.name).handle(e))),this.isSamplingEnabled&&this.mcp.setRequestHandler(cPe,async(e,r)=>{if(!this.samplingService){let o="Sampling is not enabled.";throw Yt.error(this.ctx,o),new An(kn.InternalError,o)}if(this.ongoingMcpToolCalls.length===0){let o="No ongoing tool call context found for sampling request.";throw Yt.error(this.ctx,o),new An(kn.InternalError,o)}let n=this.ongoingMcpToolCalls[this.ongoingMcpToolCalls.length-1];return await this.samplingService.handleSamplingRequest(n.turnContext,new fa(this.ctx),e,this.name,n.roundId,n.toolCallId)}),this.isElicitationEnabled&&this.mcp.setRequestHandler(lPe,async e=>{if(this.ongoingMcpToolCalls.length===0){let n="No ongoing tool call context found for elicitation request.";throw Yt.error(this.ctx,n),new An(kn.InternalError,n)}let r=this.ongoingMcpToolCalls[this.ongoingMcpToolCalls.length-1];return this.elicitationHandler.handleRequest(r.turnContext,this.name,e,r.roundId,r.toolCallId)}),this.setupDataRefreshListeners()}setupDataRefreshListeners(){this.emitter.on(vdt,()=>{this.refreshToolsCache()}),this.emitter.on(bdt,()=>{this.refreshResourcesCache()}),this.emitter.on(Tdt,()=>{this.refreshPromptsCache()})}async refreshToolsCache(e=!1){this.transport&&await this.handleMCPOperationError(async()=>{let r=AbortSignal.timeout(qCr),n=await this.mcp.listTools({},{signal:r}),o=new Map(this.cachedTools.map(s=>[s.name,s._status]));this.cachedTools=await Promise.all(n.tools.map(s=>this.createMcpTool(s,o.get(s.name)))),Yt.info(this.ctx,`Refreshed ${this.cachedTools.length} tools for server ${this.name}`),e||this.emitter.emit(NQ)},"refresh tools",{defaultValue:void 0})}async refreshResourcesCache(e=!1){if(this.transport)try{let r=AbortSignal.timeout(qCr),[n,o]=await Promise.all([this.getResources(r),this.getResourceTemplates(r)]);this.cachedResources=n,this.cachedResourceTemplates=o,Yt.info(this.ctx,`Refreshed ${this.cachedResources.length} resources and ${this.cachedResourceTemplates.length} templates for server ${this.name}`),e||this.emitter.emit(NQ)}catch(r){Yt.error(this.ctx,`Failed to refresh resources cache for ${this.name}:`,r)}}async refreshPromptsCache(e=!1){this.transport&&await this.handleMCPOperationError(async()=>{let r=AbortSignal.timeout(qCr),n=await this.mcp.listPrompts({},{signal:r});this.cachedPrompts=n.prompts,Yt.info(this.ctx,`Refreshed ${this.cachedPrompts.length} prompts for server ${this.name}`),e||this.emitter.emit(NQ)},"refresh prompts",{defaultValue:void 0})}formatToolResult(e){let r=new _r([],e.isError===!0?"error":"success");for(let n of e.content??[])if(n.type==="text")r.content.push(new fr(n.text));else if(n.type==="image"||n.type==="audio")r.content.push(new S6({mimeType:n.mimeType,data:n.data}));else if(n.type==="resource"){let o=n.resource;if("text"in o)r.content.push(new fr(o.text));else if("blob"in o){let s=o.mimeType||"application/octet-stream";r.content.push(new S6({mimeType:s,data:o.blob}))}}return e.structuredContent&&r.content.push(new fr(JSON.stringify(e.structuredContent))),r}initRootsTracker(){let e=this.ctx.get(zr);this.rootsTracker=e.onDidChangeWorkspaceFolders(r=>{this.mcp.sendRootsListChanged().then(()=>{this.rootsTracker?.dispose()})})}getEmitter(){return this.emitter}async cleanup(){this.transport&&(await this.mcp.close(),this.mcp.transport&&this.mcp.transport.onclose?.(),this.rootsTracker?.dispose(),this.transport=null)}};f();function z7a(t){return a(async(r,n)=>{let o=r instanceof URL?r.toString():r,s;if(n?.headers)if(n.headers instanceof Headers){s={};for(let[p,h]of n.headers.entries())s[p]=h}else if(Array.isArray(n.headers)){s={};for(let[p,h]of n.headers)s[p]=h}else s=n.headers;let c={method:n?.method||"GET",headers:s,body:n?.body,signal:n?.signal||void 0},l=await t.fetch(o,c);if(l.status===403){let p=l.headers.get("WWW-Authenticate"),h=Fyi(l.status,p);if(h){let m=h.errorDescription||"Insufficient scope for this operation";throw new t0e(m,h)}}let u=l.body(),d=null;if(u)d=new ReadableStream({start(p){let h=a(y=>{p.enqueue(new Uint8Array(y))},"onData"),m=a(()=>{p.close(),A()},"onEnd"),g=a(y=>{p.error(y),A()},"onError"),A=a(()=>{u.off("data",h),u.off("end",m),u.off("error",g)},"cleanup");u.on("data",h),u.on("end",m),u.on("error",g)},cancel(){u&&"destroy"in u&&typeof u.destroy=="function"&&u.destroy()}});else{let p=await l.text();d=new ReadableStream({start(h){h.enqueue(new TextEncoder().encode(p)),h.close()}})}return new globalThis.Response(d,{status:l.status,statusText:l.statusText,headers:new Headers(l.headers)})},"fetchLike")}a(z7a,"createFetchAdapter");function Ept(t,e){let r=t.get(dr),n=z7a(r);return{...e,fetch:n}}a(Ept,"createConfigWithFetch");f();f();f();var _pt=class extends Error{static{a(this,"ParseError")}constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function GCr(t){}a(GCr,"noop");function Cpt(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:e=GCr,onError:r=GCr,onRetry:n=GCr,onComment:o}=t,s="",c=!0,l,u="",d="";function p(y){let E=c?y.replace(/^\xEF\xBB\xBF/,""):y,[_,v]=Y7a(`${s}${E}`);for(let b of _)h(b);s=v,c=!1}a(p,"feed");function h(y){if(y===""){g();return}if(y.startsWith(":")){o&&o(y.slice(y.startsWith(": ")?2:1));return}let E=y.indexOf(":");if(E!==-1){let _=y.slice(0,E),v=y[E+1]===" "?2:1,b=y.slice(E+v);m(_,b,y);return}m(y,"",y)}a(h,"parseLine");function m(y,E,_){switch(y){case"event":d=E;break;case"data":u=`${u}${E} +`;break;case"id":l=E.includes("\0")?void 0:E;break;case"retry":/^\d+$/.test(E)?n(parseInt(E,10)):r(new _pt(`Invalid \`retry\` value: "${E}"`,{type:"invalid-retry",value:E,line:_}));break;default:r(new _pt(`Unknown field "${y.length>20?`${y.slice(0,20)}\u2026`:y}"`,{type:"unknown-field",field:y,value:E,line:_}));break}}a(m,"processField");function g(){u.length>0&&e({id:l,event:d||void 0,data:u.endsWith(` +`)?u.slice(0,-1):u}),l=void 0,u="",d=""}a(g,"dispatchEvent");function A(y={}){s&&y.consume&&h(s),c=!0,l=void 0,u="",d="",s=""}return a(A,"reset"),{feed:p,reset:A}}a(Cpt,"createParser");function Y7a(t){let e=[],r="",n=0;for(;n{throw TypeError(t)},"__typeError"),N_r=a((t,e,r)=>e.has(t)||GCi("Cannot "+r),"__accessCheck"),ys=a((t,e,r)=>(N_r(t,e,"read from private field"),r?r.call(t):e.get(t)),"__privateGet"),Gp=a((t,e,r)=>e.has(t)?GCi("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),"__privateAdd"),Vu=a((t,e,r,n)=>(N_r(t,e,"write to private field"),e.set(t,r),r),"__privateSet"),eL=a((t,e,r)=>(N_r(t,e,"access private method"),r),"__privateMethod"),U_,NX,spe,hht,ght,Jke,lpe,Xke,Pq,ape,upe,cpe,Yke,D2,S_r,I_r,x_r,qCi,w_r,R_r,Kke,P_r,k_r,DX=class extends EventTarget{static{a(this,"EventSource")}constructor(e,r){var n,o;super(),Gp(this,D2),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Gp(this,U_),Gp(this,NX),Gp(this,spe),Gp(this,hht),Gp(this,ght),Gp(this,Jke),Gp(this,lpe),Gp(this,Xke,null),Gp(this,Pq),Gp(this,ape),Gp(this,upe,null),Gp(this,cpe,null),Gp(this,Yke,null),Gp(this,I_r,async s=>{var c;ys(this,ape).reset();let{body:l,redirected:u,status:d,headers:p}=s;if(d===204){eL(this,D2,Kke).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(u?Vu(this,spe,new URL(s.url)):Vu(this,spe,void 0),d!==200){eL(this,D2,Kke).call(this,`Non-200 status code (${d})`,d);return}if(!(p.get("content-type")||"").startsWith("text/event-stream")){eL(this,D2,Kke).call(this,'Invalid content type, expected "text/event-stream"',d);return}if(ys(this,U_)===this.CLOSED)return;Vu(this,U_,this.OPEN);let h=new Event("open");if((c=ys(this,Yke))==null||c.call(this,h),this.dispatchEvent(h),typeof l!="object"||!l||!("getReader"in l)){eL(this,D2,Kke).call(this,"Invalid response body, expected a web ReadableStream",d),this.close();return}let m=new TextDecoder,g=l.getReader(),A=!0;do{let{done:y,value:E}=await g.read();E&&ys(this,ape).feed(m.decode(E,{stream:!y})),y&&(A=!1,ys(this,ape).reset(),eL(this,D2,P_r).call(this))}while(A)}),Gp(this,x_r,s=>{Vu(this,Pq,void 0),!(s.name==="AbortError"||s.type==="aborted")&&eL(this,D2,P_r).call(this,T_r(s))}),Gp(this,w_r,s=>{typeof s.id=="string"&&Vu(this,Xke,s.id);let c=new MessageEvent(s.event||"message",{data:s.data,origin:ys(this,spe)?ys(this,spe).origin:ys(this,NX).origin,lastEventId:s.id||""});ys(this,cpe)&&(!s.event||s.event==="message")&&ys(this,cpe).call(this,c),this.dispatchEvent(c)}),Gp(this,R_r,s=>{Vu(this,Jke,s)}),Gp(this,k_r,()=>{Vu(this,lpe,void 0),ys(this,U_)===this.CONNECTING&&eL(this,D2,S_r).call(this)});try{if(e instanceof URL)Vu(this,NX,e);else if(typeof e=="string")Vu(this,NX,new URL(e,zFa()));else throw new Error("Invalid URL")}catch{throw WFa("An invalid or illegal string was specified")}Vu(this,ape,pht({onEvent:ys(this,w_r),onRetry:ys(this,R_r)})),Vu(this,U_,this.CONNECTING),Vu(this,Jke,3e3),Vu(this,ght,(n=r?.fetch)!=null?n:globalThis.fetch),Vu(this,hht,(o=r?.withCredentials)!=null?o:!1),eL(this,D2,S_r).call(this)}get readyState(){return ys(this,U_)}get url(){return ys(this,NX).href}get withCredentials(){return ys(this,hht)}get onerror(){return ys(this,upe)}set onerror(e){Vu(this,upe,e)}get onmessage(){return ys(this,cpe)}set onmessage(e){Vu(this,cpe,e)}get onopen(){return ys(this,Yke)}set onopen(e){Vu(this,Yke,e)}addEventListener(e,r,n){let o=r;super.addEventListener(e,o,n)}removeEventListener(e,r,n){let o=r;super.removeEventListener(e,o,n)}close(){ys(this,lpe)&&clearTimeout(ys(this,lpe)),ys(this,U_)!==this.CLOSED&&(ys(this,Pq)&&ys(this,Pq).abort(),Vu(this,U_,this.CLOSED),Vu(this,Pq,void 0))}};U_=new WeakMap,NX=new WeakMap,spe=new WeakMap,hht=new WeakMap,ght=new WeakMap,Jke=new WeakMap,lpe=new WeakMap,Xke=new WeakMap,Pq=new WeakMap,ape=new WeakMap,upe=new WeakMap,cpe=new WeakMap,Yke=new WeakMap,D2=new WeakSet,S_r=a(function(){Vu(this,U_,this.CONNECTING),Vu(this,Pq,new AbortController),ys(this,ght)(ys(this,NX),eL(this,D2,qCi).call(this)).then(ys(this,I_r)).catch(ys(this,x_r))},"connect_fn"),I_r=new WeakMap,x_r=new WeakMap,qCi=a(function(){var t;let e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ys(this,Xke)?{"Last-Event-ID":ys(this,Xke)}:void 0},cache:"no-store",signal:(t=ys(this,Pq))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},"getRequestOptions_fn"),w_r=new WeakMap,R_r=new WeakMap,Kke=a(function(t,e){var r;ys(this,U_)!==this.CLOSED&&Vu(this,U_,this.CLOSED);let n=new mht("error",{code:e,message:t});(r=ys(this,upe))==null||r.call(this,n),this.dispatchEvent(n)},"failConnection_fn"),P_r=a(function(t,e){var r;if(ys(this,U_)===this.CLOSED)return;Vu(this,U_,this.CONNECTING);let n=new mht("error",{code:e,message:t});(r=ys(this,upe))==null||r.call(this,n),this.dispatchEvent(n),Vu(this,lpe,setTimeout(ys(this,k_r),ys(this,Jke)))},"scheduleReconnect_fn"),k_r=new WeakMap,DX.CONNECTING=0,DX.OPEN=1,DX.CLOSED=2;function zFa(){let t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}a(zFa,"getBaseURL");f();function dpe(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):{...t}:{}}a(dpe,"normalizeHeaders");function Aht(t=fetch,e){return e?async(r,n)=>{let o={...e,...n,headers:n?.headers?{...dpe(e.headers),...dpe(n.headers)}:e.headers};return t(r,o)}:t}a(Aht,"createFetchWithInit");f();f();var D_r;D_r=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(t=>t.webcrypto);async function YFa(t){return(await D_r).getRandomValues(new Uint8Array(t))}a(YFa,"getRandomValues");async function KFa(t){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r="",n=await YFa(t);for(let o=0;o128)throw`Expected a length between 43 and 128. Received ${t}.`;let e=await JFa(t),r=await XFa(e);return{code_verifier:e,code_challenge:r}}a(M_r,"pkceChallenge");f();var gg=pLt().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:ULt.custom,message:"URL must be parseable",fatal:!0}),I_e}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),jCi=S0({resource:Me().url(),authorization_servers:br(gg).optional(),jwks_uri:Me().url().optional(),scopes_supported:br(Me()).optional(),bearer_methods_supported:br(Me()).optional(),resource_signing_alg_values_supported:br(Me()).optional(),resource_name:Me().optional(),resource_documentation:Me().optional(),resource_policy_uri:Me().url().optional(),resource_tos_uri:Me().url().optional(),tls_client_certificate_bound_access_tokens:ic().optional(),authorization_details_types_supported:br(Me()).optional(),dpop_signing_alg_values_supported:br(Me()).optional(),dpop_bound_access_tokens_required:ic().optional()}),O_r=S0({issuer:Me(),authorization_endpoint:gg,token_endpoint:gg,registration_endpoint:gg.optional(),scopes_supported:br(Me()).optional(),response_types_supported:br(Me()),response_modes_supported:br(Me()).optional(),grant_types_supported:br(Me()).optional(),token_endpoint_auth_methods_supported:br(Me()).optional(),token_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),service_documentation:gg.optional(),revocation_endpoint:gg.optional(),revocation_endpoint_auth_methods_supported:br(Me()).optional(),revocation_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),introspection_endpoint:Me().optional(),introspection_endpoint_auth_methods_supported:br(Me()).optional(),introspection_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),code_challenge_methods_supported:br(Me()).optional(),client_id_metadata_document_supported:ic().optional()}),ZFa=S0({issuer:Me(),authorization_endpoint:gg,token_endpoint:gg,userinfo_endpoint:gg.optional(),jwks_uri:gg,registration_endpoint:gg.optional(),scopes_supported:br(Me()).optional(),response_types_supported:br(Me()),response_modes_supported:br(Me()).optional(),grant_types_supported:br(Me()).optional(),acr_values_supported:br(Me()).optional(),subject_types_supported:br(Me()),id_token_signing_alg_values_supported:br(Me()),id_token_encryption_alg_values_supported:br(Me()).optional(),id_token_encryption_enc_values_supported:br(Me()).optional(),userinfo_signing_alg_values_supported:br(Me()).optional(),userinfo_encryption_alg_values_supported:br(Me()).optional(),userinfo_encryption_enc_values_supported:br(Me()).optional(),request_object_signing_alg_values_supported:br(Me()).optional(),request_object_encryption_alg_values_supported:br(Me()).optional(),request_object_encryption_enc_values_supported:br(Me()).optional(),token_endpoint_auth_methods_supported:br(Me()).optional(),token_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),display_values_supported:br(Me()).optional(),claim_types_supported:br(Me()).optional(),claims_supported:br(Me()).optional(),service_documentation:Me().optional(),claims_locales_supported:br(Me()).optional(),ui_locales_supported:br(Me()).optional(),claims_parameter_supported:ic().optional(),request_parameter_supported:ic().optional(),request_uri_parameter_supported:ic().optional(),require_request_uri_registration:ic().optional(),op_policy_uri:gg.optional(),op_tos_uri:gg.optional(),client_id_metadata_document_supported:ic().optional()}),$Ci=kr({...ZFa.shape,...O_r.pick({code_challenge_methods_supported:!0}).shape}),VCi=kr({access_token:Me(),id_token:Me().optional(),token_type:Me(),expires_in:m1e.number().optional(),scope:Me().optional(),refresh_token:Me().optional()}).strip(),WCi=kr({error:Me(),error_description:Me().optional(),error_uri:Me().optional()}),HCi=gg.optional().or(vn("").transform(()=>{})),e9a=kr({redirect_uris:br(gg),token_endpoint_auth_method:Me().optional(),grant_types:br(Me()).optional(),response_types:br(Me()).optional(),client_name:Me().optional(),client_uri:gg.optional(),logo_uri:HCi,scope:Me().optional(),contacts:br(Me()).optional(),tos_uri:HCi,policy_uri:Me().optional(),jwks_uri:gg.optional(),jwks:PLt().optional(),software_id:Me().optional(),software_version:Me().optional(),software_statement:Me().optional()}).strip(),t9a=kr({client_id:Me(),client_secret:Me().optional(),client_id_issued_at:na().optional(),client_secret_expires_at:na().optional()}).strip(),zCi=e9a.merge(t9a),da0=kr({error:Me(),error_description:Me().optional()}).strip(),fa0=kr({token:Me(),token_type_hint:Me().optional()}).strip();f();function YCi(t){let e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}a(YCi,"resourceUrlFromServerUrl");function KCi({requestedResource:t,configuredResource:e}){let r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length0&&(l=c.authorization_servers[0])}catch{}l||(l=new URL("/",e));let u=await l9a(e,t,c),d=await m9a(l,{fetchFn:s}),p=await Promise.resolve(t.clientInformation());if(!p){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");let E=d?.client_id_metadata_document_supported===!0,_=t.clientMetadataUrl;if(_&&!c9a(_))throw new LX(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${_}`);if(E&&_)p={client_id:_},await t.saveClientInformation?.(p);else{if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let b=await C9a(l,{metadata:d,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(b),p=b}}let h=!t.redirectUrl;if(r!==void 0||h){let E=await E9a(t,l,{metadata:d,resource:u,authorizationCode:r,fetchFn:s});return await t.saveTokens(E),"AUTHORIZED"}let m=await t.tokens();if(m?.refresh_token)try{let E=await y9a(l,{metadata:d,clientInformation:p,refreshToken:m.refresh_token,resource:u,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof jf)||E instanceof tL))throw E}let g=t.state?await t.state():void 0,{authorizationUrl:A,codeVerifier:y}=await g9a(l,{metadata:d,clientInformation:p,state:g,redirectUrl:t.redirectUrl,scope:n||c?.scopes_supported?.join(" ")||t.clientMetadata.scope,resource:u});return await t.saveCodeVerifier(y),await t.redirectToAuthorization(A),"REDIRECT"}a(F_r,"authInternal");function c9a(t){if(!t)return!1;try{let e=new URL(t);return e.protocol==="https:"&&e.pathname!=="/"}catch{return!1}}a(c9a,"isHttpsUrl");async function l9a(t,e,r){let n=YCi(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!KCi({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}a(l9a,"selectResourceURL");function fpe(t){let e=t.headers.get("WWW-Authenticate");if(!e)return{};let[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return{};let o=U_r(t,"resource_metadata")||void 0,s;if(o)try{s=new URL(o)}catch{}let c=U_r(t,"scope")||void 0,l=U_r(t,"error")||void 0;return{resourceMetadataUrl:s,scope:c,error:l}}a(fpe,"extractWWWAuthenticateParams");function U_r(t,e){let r=t.headers.get("WWW-Authenticate");if(!r)return null;let n=new RegExp(`${e}=(?:"([^"]+)"|([^\\s,]+))`),o=r.match(n);return o?o[1]||o[2]:null}a(U_r,"extractFieldFromWwwAuth");async function u9a(t,e,r=fetch){let n=await p9a(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw await n?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw await n.body?.cancel(),new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return jCi.parse(await n.json())}a(u9a,"discoverOAuthProtectedResourceMetadata");async function Q_r(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?Q_r(t,void 0,r):void 0;throw n}}a(Q_r,"fetchWithCorsRetry");function d9a(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}a(d9a,"buildWellKnownPath");async function XCi(t,e,r=fetch){return await Q_r(t,{"MCP-Protocol-Version":e},r)}a(XCi,"tryMetadataDiscovery");function f9a(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}a(f9a,"shouldAttemptFallback");async function p9a(t,e,r,n){let o=new URL(t),s=n?.protocolVersion??m5,c;if(n?.metadataUrl)c=new URL(n.metadataUrl);else{let u=d9a(e,o.pathname);c=new URL(u,n?.metadataServerUrl??o),c.search=o.search}let l=await XCi(c,s,r);if(!n?.metadataUrl&&f9a(l,o.pathname)){let u=new URL(`/.well-known/${e}`,o);l=await XCi(u,s,r)}return l}a(p9a,"discoverMetadataWithFallback");function h9a(t){let e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let o=e.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${o}`,e.origin),type:"oidc"}),n.push({url:new URL(`${o}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}a(h9a,"buildDiscoveryUrls");async function m9a(t,{fetchFn:e=fetch,protocolVersion:r=m5}={}){let n={"MCP-Protocol-Version":r,Accept:"application/json"},o=h9a(t);for(let{url:s,type:c}of o){let l=await Q_r(s,n,e);if(l){if(!l.ok){if(await l.body?.cancel(),l.status>=400&&l.status<500)continue;throw new Error(`HTTP ${l.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return c==="oauth"?O_r.parse(await l.json()):$Ci.parse(await l.json())}}}a(m9a,"discoverAuthorizationServerMetadata");async function g9a(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:o,state:s,resource:c}){let l;if(e){if(l=new URL(e.authorization_endpoint),!e.response_types_supported.includes(B_r))throw new Error(`Incompatible auth server: does not support response type ${B_r}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(L_r))throw new Error(`Incompatible auth server: does not support code challenge method ${L_r}`)}else l=new URL("/authorize",t);let u=await M_r(),d=u.code_verifier,p=u.code_challenge;return l.searchParams.set("response_type",B_r),l.searchParams.set("client_id",r.client_id),l.searchParams.set("code_challenge",p),l.searchParams.set("code_challenge_method",L_r),l.searchParams.set("redirect_uri",String(n)),s&&l.searchParams.set("state",s),o&&l.searchParams.set("scope",o),o?.includes("offline_access")&&l.searchParams.append("prompt","consent"),c&&l.searchParams.set("resource",c.href),{authorizationUrl:l,codeVerifier:d}}a(g9a,"startAuthorization");function A9a(t,e,r){return new URLSearchParams({grant_type:"authorization_code",code:t,code_verifier:e,redirect_uri:String(r)})}a(A9a,"prepareAuthorizationCodeRequest");async function e_i(t,{metadata:e,tokenRequestParams:r,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c}){let l=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t),u=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&r.set("resource",s.href),o)await o(u,r,l,e);else if(n){let p=e?.token_endpoint_auth_methods_supported??[],h=n9a(n,p);i9a(h,n,u,r)}let d=await(c??fetch)(l,{method:"POST",headers:u,body:r});if(!d.ok)throw await ZCi(d);return VCi.parse(await d.json())}a(e_i,"executeTokenRequest");async function y9a(t,{metadata:e,clientInformation:r,refreshToken:n,resource:o,addClientAuthentication:s,fetchFn:c}){let l=new URLSearchParams({grant_type:"refresh_token",refresh_token:n}),u=await e_i(t,{metadata:e,tokenRequestParams:l,clientInformation:r,addClientAuthentication:s,resource:o,fetchFn:c});return{refresh_token:n,...u}}a(y9a,"refreshAuthorization");async function E9a(t,e,{metadata:r,resource:n,authorizationCode:o,fetchFn:s}={}){let c=t.clientMetadata.scope,l;if(t.prepareTokenRequest&&(l=await t.prepareTokenRequest(c)),!l){if(!o)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!t.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let d=await t.codeVerifier();l=A9a(o,d,t.redirectUrl)}let u=await t.clientInformation();return e_i(e,{metadata:r,tokenRequestParams:l,clientInformation:u??void 0,addClientAuthentication:t.addClientAuthentication,resource:n,fetchFn:s})}a(E9a,"fetchToken");async function C9a(t,{metadata:e,clientMetadata:r,fetchFn:n}){let o;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");o=new URL(e.registration_endpoint)}else o=new URL("/register",t);let s=await(n??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await ZCi(s);return zCi.parse(await s.json())}a(C9a,"registerClient");var dNe=class extends Error{static{a(this,"SseError")}constructor(e,r,n){super(`SSE error: ${r}`),this.code=e,this.event=n}},yht=class{static{a(this,"SSEClientTransport")}constructor(e,r){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=r?.eventSourceInit,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Aht(r?.fetch,r?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new hE("No auth provider");let e;try{e=await rL(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new hE;return await this._startOrAuth()}async _commonHeaders(){let e={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(e.Authorization=`Bearer ${n.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);let r=dpe(this._requestInit?.headers);return new Headers({...e,...r})}_startOrAuth(){let e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((r,n)=>{this._eventSource=new DX(this._url.href,{...this._eventSourceInit,fetch:a(async(o,s)=>{let c=await this._commonHeaders();c.set("Accept","text/event-stream");let l=await e(o,{...s,headers:c});if(l.status===401&&l.headers.has("www-authenticate")){let{resourceMetadataUrl:u,scope:d}=fpe(l);this._resourceMetadataUrl=u,this._scope=d}return l},"fetch")}),this._abortController=new AbortController,this._eventSource.onerror=o=>{if(o.code===401&&this._authProvider){this._authThenStart().then(r,n);return}let s=new dNe(o.code,o.message,o);n(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",o=>{let s=o;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(c){n(c),this.onerror?.(c),this.close();return}r()}),this._eventSource.onmessage=o=>{let s=o,c;try{c=yq.parse(JSON.parse(s.data))}catch(l){this.onerror?.(l);return}this.onmessage?.(c)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new hE("No auth provider");if(await rL(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new hE("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{let r=await this._commonHeaders();r.set("content-type","application/json");let n={...this._requestInit,method:"POST",headers:r,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._endpoint,n);if(!o.ok){let s=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){let{resourceMetadataUrl:c,scope:l}=fpe(o);if(this._resourceMetadataUrl=c,this._scope=l,await rL(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new hE;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${o.status}): ${s}`)}await o.body?.cancel()}catch(r){throw this.onerror?.(r),r}}setProtocolVersion(e){this._protocolVersion=e}};var Eht=class extends Rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPSSEServer")}initTransport(r){let n=dht(this.ctx,r),{url:o,...s}=n;return new yht(new URL(o),s)}};f();f();var j_i=de(G_i(),1),fNe=de(require("node:process"),1),$_i=require("node:stream");f();var _ht=class{static{a(this,"ReadBuffer")}append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(` -`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),W9a(r)}clear(){this._buffer=void 0}};function W9a(t){return yq.parse(JSON.parse(t))}a(W9a,"deserializeMessage");function H_i(t){return JSON.stringify(t)+` -`}a(H_i,"serializeMessage");var z9a=fNe.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function Y9a(){let t={};for(let e of z9a){let r=fNe.default.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}a(Y9a,"getDefaultEnvironment");var vht=class{static{a(this,"StdioClientTransport")}constructor(e){this._readBuffer=new _ht,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new $_i.PassThrough)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,j_i.default)(this._serverParams.command,this._serverParams.args??[],{env:{...Y9a(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:fNe.default.platform==="win32"&&K9a(),cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=H_i(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}};function K9a(){return"type"in fNe.default}a(K9a,"isElectron");var V_i=require("child_process"),W_i=require("util");var bht=class extends Rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPStdioServer")}initTransport(r){return r.env={...UAi(),...r.env||{}},r.stderr="pipe",new vht(r)}addListeners(){super.addListeners(),this.transport&&this.transport.stderr&&this.transport.stderr.on("data",r=>{yX(this.ctx,{message:`[server stderr] ${r.toString().trimEnd()}`,server:this.name})})}async cleanup(){if(this.transport){if(process.platform==="win32"){let r=null;"pid"in this.transport&&typeof this.transport.pid=="number"&&(r=this.transport.pid),r&&await this.forceKillWindowsProcess(r)}await super.cleanup()}}async forceKillWindowsProcess(r){try{let n=(0,W_i.promisify)(V_i.exec);Kt.info(this.ctx,`Force killing Windows process with PID ${r} for MCP server ${this.name}`),_a(this.ctx,{message:`Force killing Windows process with PID ${r}`,server:this.name}),await n(`taskkill /pid ${r} /t /f`,{timeout:1e4}),Kt.info(this.ctx,`Successfully force killed process ${r}`)}catch(n){Kt.debug(this.ctx,`Failed to kill process ${r} (process may not exist):`,n),qp(this.ctx,{message:`Failed to kill process ${r} (process may not exist): ${n instanceof Error?n.message:String(n)}`,server:this.name})}}};f();f();f();var Tht=class extends TransformStream{static{a(this,"EventSourceParserStream")}constructor({onError:e,onRetry:r,onComment:n}={}){let o;super({start(s){o=pht({onEvent:a(c=>{s.enqueue(c)},"onEvent"),onError(c){e==="terminate"?s.error(c):typeof e=="function"&&e(c)},onRetry:r,onComment:n})},transform(s){o.feed(s)}})}};var J9a={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},v5=class extends Error{static{a(this,"StreamableHTTPError")}constructor(e,r){super(`Streamable HTTP error: ${r}`),this.code=e}},Sht=class{static{a(this,"StreamableHTTPClientTransport")}constructor(e,r){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Aht(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??J9a}async _authThenStart(){if(!this._authProvider)throw new hE("No auth provider");let e;try{e=await rL(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new hE;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(e.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);let r=dpe(this._requestInit?.headers);return new Headers({...e,...r})}async _startOrAuthSse(e){let{resumptionToken:r}=e;try{let n=await this._commonHeaders();n.set("Accept","text/event-stream"),r&&n.set("last-event-id",r);let o=await(this._fetch??fetch)(this._url,{method:"GET",headers:n,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new v5(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,e,!0)}catch(n){throw this.onerror?.(n),n}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let r=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(n,e),o)}_scheduleReconnection(e,r=0){let n=this._reconnectionOptions.maxRetries;if(r>=n){this.onerror?.(new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(s=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${s instanceof Error?s.message:String(s)}`)),this._scheduleReconnection(e,r+1)})},o)}_handleSseStream(e,r,n){if(!e)return;let{onresumptiontoken:o,replayMessageId:s}=r,c,l=!1,u=!1;a(async()=>{try{let p=e.pipeThrough(new TextDecoderStream).pipeThrough(new Tht({onRetry:a(g=>{this._serverRetryMs=g},"onRetry")})).getReader();for(;;){let{value:g,done:A}=await p.read();if(A)break;if(g.id&&(c=g.id,l=!0,o?.(g.id)),!!g.data&&(!g.event||g.event==="message"))try{let y=yq.parse(JSON.parse(g.data));EX(y)&&(u=!0,s!==void 0&&(y.id=s)),this.onmessage?.(y)}catch(y){this.onerror?.(y)}}(n||l)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s},0)}catch(p){if(this.onerror?.(new Error(`SSE stream disconnected: ${p}`)),(n||l)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s},0)}catch(g){this.onerror?.(new Error(`Failed to reconnect: ${g instanceof Error?g.message:String(g)}`))}}},"processStream")()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new hE("No auth provider");if(await rL(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new hE("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,r){try{let{resumptionToken:n,onresumptiontoken:o}=r||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:tke(e)?e.id:void 0}).catch(m=>this.onerror?.(m));return}let s=await this._commonHeaders();s.set("content-type","application/json"),s.set("accept","application/json, text/event-stream");let c={...this._requestInit,method:"POST",headers:s,body:JSON.stringify(e),signal:this._abortController?.signal},l=await(this._fetch??fetch)(this._url,c),u=l.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!l.ok){let m=await l.text().catch(()=>null);if(l.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new v5(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:g,scope:A}=fpe(l);if(this._resourceMetadataUrl=g,this._scope=A,await rL(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new hE;return this._hasCompletedAuthFlow=!0,this.send(e)}if(l.status===403&&this._authProvider){let{resourceMetadataUrl:g,scope:A,error:y}=fpe(l);if(y==="insufficient_scope"){let E=l.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===E)throw new v5(403,"Server returned 403 after trying upscoping");if(A&&(this._scope=A),g&&(this._resourceMetadataUrl=g),this._lastUpscopingHeader=E??void 0,await rL(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new hE;return this.send(e)}}throw new v5(l.status,`Error POSTing to endpoint: ${m}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,l.status===202){await l.body?.cancel(),xAi(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(m=>this.onerror?.(m));return}let p=(Array.isArray(e)?e:[e]).filter(m=>"method"in m&&"id"in m&&m.id!==void 0).length>0,h=l.headers.get("content-type");if(p)if(h?.includes("text/event-stream"))this._handleSseStream(l.body,{onresumptiontoken:o},!1);else if(h?.includes("application/json")){let m=await l.json(),g=Array.isArray(m)?m.map(A=>yq.parse(A)):[yq.parse(m)];for(let A of g)this.onmessage?.(A)}else throw await l.body?.cancel(),new v5(-1,`Unexpected content type: ${h}`);else await l.body?.cancel()}catch(n){throw this.onerror?.(n),n}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,r);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new v5(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,r){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:r?.onresumptiontoken})}};var pNe=class extends Rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPStreamableServer")}initTransport(r){let n=dht(this.ctx,r),{url:o,...s}=n;return new Sht(new URL(o),s)}};f();var Iht=class extends J6{static{a(this,"McpLanguageModelTool")}constructor(e,r){super({...e,toolProvider:{id:e.serverName,displayNamePrefix:e.serverNamePrefix,displayName:e.serverName,description:e.serverName,isFirstPartyTool:!1},type:"mcp"}),this.invoker=r}prepareInvocation(e,r){let n={title:`Confirm MCP Tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,message:`Do you want to allow the external MCP tool "${this.toolProvider.displayName}/${this.displayName}" to run?`};return{progressMessage:`Running MCP tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,confirmationMessages:n}}prepareCompletion(e,r){return{completionMessage:`Ran MCP tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`}}async invoke(e,r,n){return await this.invoker(e,r,r.input,n)}async invokeConfirmation(e,r,n){if(n.isCancellationRequested)throw new Sc;let o={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations};try{return await e.ctx.get(ku).invokeClientToolConfirmation(e,o)}catch(s){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(s)}`)}}};var J_i=de(Su());f();var z_i="mcp-servers-cache",Y_i="mcp-first-boot-completed",xht=class{static{a(this,"McpServerMetadataCache")}constructor(e){this.stateDb=e.get(Zh),this.initPromise=this.initialize()}async initialize(){await this.stateDb.waitForInitialization()}async isFirstBoot(){return await this.initPromise,this.stateDb.get(Y_i)!=="true"}async markFirstBootCompleted(){await this.initPromise,this.stateDb.set(Y_i,"true")}parseCache(){let e=this.stateDb.get(z_i);if(!e)return{};try{return JSON.parse(e)}catch{return{}}}async get(e){return await this.initPromise,this.parseCache()[e]}async store(e){await this.initPromise,this.stateDb.set(z_i,e)}};f();function K_i(t){let e=t.get(Nr).getEditorPluginInfo();if(e.name==="copilot-intellij"){let r=e.version.endsWith("nightly"),n=e.version==="42.0.0.0";return r||n}if(e.name==="copilot-xcode"){let r=e.version.split(".");if(r.length>=3){let[n,o,s]=r;return n==="0"&&o==="0"&&s==="0"||n==="0"&&s!=="0"}}if(e.name==="copilot-eclipse"){let r=e.version.endsWith("nightly"),n=e.version.endsWith("qualifier");return r||n}return!1}a(K_i,"isNightlyOrDevBuild");var wht=class t extends MA{constructor(r){super();this.MCPServersMap=new Map;this.updateServersQueue=Promise.resolve();this.serverOperationSequencer=new Jre;this.prefixGenerator=new Tpt;this.serverPrefixes=new Map;this.isMcpEnabled=!1;this.previousMcpAllowlist=!1;this.storedMCPServersConfig={};this.ctx=r,this.cache=new xht(r),this.registryService=r.get(_2),ss(this.ctx,async n=>{let o=this.isMcpEnabled;this.isMcpEnabled=this.isTokenMcpEnabled(n),o!==this.isMcpEnabled&&(Kt.info(this.ctx,`MCP state changed from ${o} to ${this.isMcpEnabled}`),this.registryService.clearAllCaches(),this.isMcpEnabled?await this.updateMCPServers(this.storedMCPServersConfig):(Kt.info(this.ctx,"MCP is disabled, clearing all servers and tools"),this.clearAllServers()))}),this.ctx.get(Fn).onDidSetCapabilities(n=>{let o=n.mcpAllowlist;o!==this.previousMcpAllowlist&&(this.previousMcpAllowlist=o,this.registryService.clearAllCaches(),this.isMcpEnabled&&(Kt.info(this.ctx,`mcpAllowlist changed to ${o}, updating MCP servers`),this.updateMCPServers(this.storedMCPServersConfig)))})}static{a(this,"CLSMCPManager")}static{this.contentsNotificationType=new J_i.ProtocolNotificationType("copilot/mcpTools")}isTokenMcpEnabled(r){if(!r)return!0;try{return r.getTokenValue("mcp")!=="0"}catch(n){return Kt.warn(this.ctx,`Error reading MCP value from token: ${n instanceof Error?n.message:String(n)}`),!0}}isAllowlistFeatureEnabled(){if(this.ctx.get(Fn).getCapabilities().mcpAllowlist)return Kt.debug(this.ctx,"Allowlist feature enabled via copilotCapabilities.mcpAllowlist"),!0;let n=K_i(this.ctx);return n||Kt.debug(this.ctx,"Allowlist feature disabled for stable version, only enabled for nightly/prerelease/dev (use copilotCapabilities.mcpAllowlist to override)"),n}ensureMcpEnabledOrThrow(r){if(!this.isMcpEnabled)throw new Error(`MCP is disabled, cannot ${r}`)}getActiveServerEntry(r){let n=this.MCPServersMap.get(r);if(!n)throw new Error(`MCP server ${r} does not exist`);if(n.isBlocked)throw new Error(`MCP server ${r} is blocked by registry`);return n}async ensureServerConnection(r,n,o){return n.server.isConnected?n.server:(Kt.info(this.ctx,`Auto-starting MCP server ${r} for ${o}`),await this.startMCPServer(r),this.getActiveServerEntry(r).server)}async updateMCPServers(r){if(this.storedMCPServersConfig=r,!this.isMcpEnabled)return;let n=this.ctx.get(Fn).getCapabilities().mcpServerManagement??!1,o=new Set(Object.keys(r)),s=new Set(this.MCPServersMap.keys()),c=!1;for(let u of s)o.has(u)||(await this.stopMCPServer(u),this.removeServerAccountPreferences(u),this.MCPServersMap.delete(u),this.serverPrefixes.delete(u),c=!0);c&&await this.persistAllServersCache();for(let u of o)if(!this.MCPServersMap.get(u)){let d=r[u],p=this.toManagedServerDefinition(u,d);if(this.isAllowlistFeatureEnabled()){let h=await this.registryService.validateServerConfig(u,d),{registryInfo:m,isBlocked:g,blockReason:A}=h;g?(this.addBlockedServer(p),Kt.info(this.ctx,`MCP server ${u} is blocked: ${A}`)):await this.addServer(p),m&&this.updateRegistryInfo(u,m)}else await this.addServer(p)}if((await this.cache.isFirstBoot()||!n)&&(await this.cache.markFirstBootCompleted(),o.size>0)){let u=Array.from(o).map(async d=>{try{await this.startServer(d);let p=this.MCPServersMap.get(d);p&&(p.hasError=!1,p.errorMessage=void 0,p.isStarting=!1)}catch(p){let h=this.MCPServersMap.get(d);h&&(h.hasError=!0,h.errorMessage=p instanceof Error?p.message:String(p),h.isStarting=!1),Kt.warn(this.ctx,`Failed to auto-start MCP server ${d} during first boot:`,p)}});await Promise.allSettled(u)}await this.updateServersList()}toManagedServerDefinition(r,n){let o=n.type,s="command"in n?"stdio":o??"streamable";return{...n,name:r,type:s}}addBlockedServer(r){this.MCPServersMap.set(r.name,{server:null,definition:r,hasError:!1,errorMessage:void 0,isStarting:!1,isBlocked:!0,authInfo:void 0})}updateRegistryInfo(r,n){let o=this.MCPServersMap.get(r);o&&(o.registryInfo=n)}getAllContents(r){return this.isMcpEnabled?this.getAllMCPServerCapabilities(r):[]}getAllMCPServerCapabilities(r){let n=[];for(let[o,s]of this.MCPServersMap)try{let c=this.createServerSnapshot(o,s);n.push(c)}catch(c){let l=`Failed to create snapshot for MCP server ${o}.`+(c instanceof Error?` message: ${c.message}`:` ${String(c)}`);Kt.error(this.ctx,l);let u={name:o,prefix:this.getServerPrefix(o),status:"error",tools:[],resources:[],resourceTemplates:[],prompts:[],error:l};n.push(u)}return r&&!r.isBuiltIn&&r.customTools?n.map(o=>(o.tools=o.tools.map(s=>{let c=this.createMcpLanguageModelTool(o.name,this.getServerPrefix(o.name),s);return s._status=r.customTools.includes(c.configurationKey)?"enabled":"disabled",s}),o)):n}async updateMCPToolsStatus(r,n){this.ensureMcpEnabledOrThrow("batch update tools status");for(let{serverName:o,toolName:s,status:c}of n){let d=this.getActiveServerEntry(o).server.getCachedTools().find(m=>m.name===s),p=this.getServerPrefix(o);if(!d){Kt.error(this.ctx,`Not found MCP ${o} server ${s} tool`);continue}kEe(r)&&(d._status=c),this.ctx.get(Po).getToolById(`${o}.${s}`)||this.registerTool(o,p,d)}await this.ctx.get(Po).updateToolsStatus(r,n.map(({serverName:o,toolName:s,status:c})=>({toolId:`${o}.${s}`,status:c}))),this.persistAllServersCache()}async callTool(r,n,o,s,c,l,u){this.ensureMcpEnabledOrThrow(`call tool ${r}.${n}`);let d=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,d,"tool call")).callTool(n,o,s,c,l,u)}async getPrompt(r,n,o){this.ensureMcpEnabledOrThrow(`get prompt ${r}.${n}`);let s=this.getActiveServerEntry(r),l=await(await this.ensureServerConnection(r,s,"get prompt")).getPrompt(n,o);return at(this.ctx,"mcp.getPrompt",yt.createAndMarkAsIssued()),yi(this.ctx,"mcp.getPrompt"),l}async completePrompt(r,n,o,s,c){this.ensureMcpEnabledOrThrow(`complete prompt ${r}.${n}`);let l=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,l,"complete prompt")).completePrompt(n,o,s,c)}async readResource(r,n){this.ensureMcpEnabledOrThrow(`read resource from ${r}: ${n}`);let o=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,o,"read resource")).readResource(n)}async startMCPServer(r){return this.ensureMcpEnabledOrThrow(`start server ${r}`),this.serverOperationSequencer.queue(r,async()=>{await this.startMCPServerInternal(r)})}async startMCPServerInternal(r){let n=this.getActiveServerEntry(r);if(n.server.isConnected){Kt.info(this.ctx,`MCP server ${r} is already running`);return}if(n.isStarting){Kt.info(this.ctx,`MCP server ${r} is already starting, skipping duplicate request`);return}n.isStarting=!0,await _a(this.ctx,{message:`Starting server ${r}`,server:r}),await this.updateServersList(!1),this.unregisterServerTools(r);try{await this.startServer(r);let o=this.MCPServersMap.get(r);o&&(o.hasError=!1,o.errorMessage=void 0,o.isStarting=!1)}catch(o){let s=this.MCPServersMap.get(r);throw s&&(s.hasError=!0,s.errorMessage=o instanceof Error?o.message:String(o),s.isStarting=!1),o}finally{this.registerServerTools(r),await this.updateServersList(!1)}}async stopMCPServer(r){return this.serverOperationSequencer.queue(r,async()=>{await this.stopMCPServerInternal(r)})}async stopMCPServerInternal(r){let n=this.getActiveServerEntry(r);if(n.isStarting){Kt.info(this.ctx,`MCP server ${r} is starting, cannot stop now`);return}await _a(this.ctx,{message:`Stopping server ${r}`,server:r}),n.server.getEmitter().removeAllListeners(sq),n.server.isConnected&&await n.server.cleanup(),n.hasError=!1,n.errorMessage=void 0,n.isStarting=!1,await _a(this.ctx,{message:`Server ${r} stopped`,server:r}),await this.updateServersList(!1)}async restartMCPServer(r){return this.ensureMcpEnabledOrThrow(`restart server ${r}`),await _a(this.ctx,{message:`Restarting server ${r}`,server:r}),this.serverOperationSequencer.queue(r,async()=>{await this.stopMCPServerInternal(r),await new Promise(n=>setTimeout(n,100)),await this.startMCPServerInternal(r)})}async logoutMCPServer(r){return this.ensureMcpEnabledOrThrow(`logout server ${r}`),this.serverOperationSequencer.queue(r,async()=>{await _a(this.ctx,{message:`Logging out MCP server ${r}`,server:r}),await this.performLogout(r)})}async clearOAuthMCPServer(r){return this.ensureMcpEnabledOrThrow(`clear OAuth for server ${r}`),this.serverOperationSequencer.queue(r,async()=>{let o=this.getActiveServerEntry(r).authInfo?.providerId;if(!o){Kt.warn(this.ctx,`No OAuth provider found for server ${r}, nothing to clear`);return}await _a(this.ctx,{message:`Clearing OAuth provider registration for MCP server ${r}`,server:r}),await this.performLogout(r),Kt.info(this.ctx,`Unregistering provider ${o} for server ${r}`);try{await this.ctx.get(W3).unregisterProvider(o)}catch{Kt.debug(this.ctx,`Provider ${o} is not a dynamic OAuth provider, skipping unregistration`)}})}async performLogout(r){let n=this.getActiveServerEntry(r);if(n.authInfo){let{providerId:c,accountName:l}=n.authInfo;Kt.info(this.ctx,`Removing account preference and session for account ${l} on server ${r} with provider ${c}`),this.ctx.get(I2).removeAccountPreference(r,c);try{let u=this.ctx.get(Xh).getProvider(c),p=(await u.getSessions(void 0,{})).find(h=>h.account.label===l);p?(await u.removeSession(p.id),Kt.info(this.ctx,`Successfully removed session for account ${l}`)):Kt.warn(this.ctx,`No session found for account ${l}`)}catch(u){Kt.error(this.ctx,`Failed to remove session for account ${l}:`,u)}n.authInfo=void 0}await this.stopMCPServerInternal(r);let o=this.storedMCPServersConfig[r];if(!o){let c=`Original config not found for server ${r}`;throw Kt.error(this.ctx,c),new Error(c)}let s=this.toManagedServerDefinition(r,o);this.MCPServersMap.delete(r),await this.addServer(s),Kt.info(this.ctx,`Server ${r} logged out and restored to original configuration`),await this.updateServersList(!1)}async startServer(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;if(n.server.isConnected){Kt.info(this.ctx,`MCP server ${r} is already running`);return}let{server:o,definition:s}=n;try{o.getEmitter().on(sq,()=>{this.unregisterServerTools(r),this.persistAllServersCache(),this.registerServerTools(r),this.notifyClient()}),await o.connect(s),await _a(this.ctx,{message:"Connection state: Running",server:r})}catch(c){Kt.error(this.ctx,`Error initializing MCP server ${r}:`,c);let l=c instanceof v5||c instanceof dNe,u=l?c.code:void 0;if(l&&u!==void 0&&"url"in s&&s.type!=="sse"&&o instanceof pNe&&u!==401&&u>=400&&u<500){let p=`${u} status sending message to ${s.url}, will attempt to fall back to legacy SSE`;Kt.info(this.ctx,p),_a(this.ctx,{message:p,server:r});let h={...s,name:r,type:"sse"};return await o.cleanup().catch(()=>{}),await this.updateServerDefinition(n,h),await this.startServer(r)}else if(l&&"url"in s&&u===401){let p=await this.getAuthMetadata(s),h=await this.getToken(s.name,s.url,p.authorizationServer,p.serverMetadata,p.resourceMetadata);if(!h){let g=`Failed to get token for server: ${r}`;throw Kt.error(this.ctx,g),new Error(g)}let m={...s,name:r,requestInit:{...s.requestInit??{},headers:{...s.requestInit?.headers??{},Authorization:`Bearer ${h}`}}};return await o.cleanup().catch(()=>{}),await this.updateServerDefinition(n,m),await this.startServer(r)}let d=c instanceof Error?`message: ${c.message} stack: ${c.stack}`:String(c);throw await qp(this.ctx,{message:d,server:r}),this.ctx.get(gc).showWarningMessageOnlyOnce(`${r}.initialize`,`Failed to initialize MCP server '${r}'. Please check the logs for more details.`),c}}async updateServersList(r=!0){return this.updateServersQueue=this.updateServersQueue.then(async()=>{r&&this.registerTools(),await this.notifyClient()}).catch(n=>{Kt.error(this.ctx,"updateServersList: Update failed",n)}),this.updateServersQueue}getServerPrefix(r){let n=this.serverPrefixes.get(r);if(n)return n;let o=this.prefixGenerator.generate(r);return this.serverPrefixes.set(r,o),o}async persistAllServersCache(){try{let r={};for(let[n,o]of this.MCPServersMap){let s=o.server?.getCachedTools()??[],c=o.server?.getCachedResources()??[],l=o.server?.getCachedResourceTemplates()??[],u=o.server?.getCachedPrompts()??[];r[n]={tools:s,resources:c,resourceTemplates:l,prompts:u}}await this.cache.store(r)}catch(r){Kt.error(this.ctx,"Failed to persist MCP servers cache:",r)}}createMCPServer(r){return r.type==="sse"?new Eht(this.ctx,r.name,r.version||"1.0.0"):r.type==="streamable"||"url"in r?new pNe(this.ctx,r.name,r.version||"1.0.0"):new bht(this.ctx,r.name,r.version||"1.0.0")}async addServer(r){let n=this.createMCPServer(r),o=await this.cache.get(r.name);o&&n.restoreCacheFromPersistence(o),this.MCPServersMap.set(r.name,{server:n,definition:r,hasError:!1,errorMessage:void 0,isStarting:!1,isBlocked:!1})}async updateServerDefinition(r,n){let o=this.createMCPServer(n),s=await this.cache.get(n.name);s&&o.restoreCacheFromPersistence(s),r.server=o,r.definition=n}async notifyClient(){let r=this.getAllContents();await this.ctx.get(Ar).connection.sendNotification(t.contentsNotificationType,{servers:r})}registerTools(){for(let[r]of this.MCPServersMap)this.registerServerTools(r)}registerServerTools(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;let o=this.getServerPrefix(r),s=n.server?.getCachedTools()??[];for(let c of s)this.registerTool(r,o,c)}unregisterServerTools(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;let o=n.server?.getCachedTools()??[];for(let s of o)this.unregisterTool(r,s.name)}registerTool(r,n,o){Kt.debug(this.ctx,"register MCP Tool:",{...o}),this.ctx.get(Po).registerTool(this.createMcpLanguageModelTool(r,n,o))}createMcpLanguageModelTool(r,n,o){let{name:s,description:c,inputSchema:l,_status:u,_nameForModel:d,annotations:p}=o;return new Iht({serverName:r,serverNamePrefix:n,name:d,displayName:s,description:c||"",displayDescription:c||"",inputSchema:l,annotations:p,status:u},(h,m,g,A)=>(Kt.info(this.ctx,"copilot MCP Invoker:",r,s,g),this.callTool(r,s,g,A,h,m.roundId,m.toolCallId?.toString())))}unregisterAllTools(){for(let[r,n]of this.MCPServersMap){if(n.isBlocked)continue;let o=n.server?.getCachedTools()??[];for(let s of o)this.unregisterTool(r,s.name)}}unregisterTool(r,n){Kt.debug(this.ctx,"unregister MCP Tool:",{serverName:r,toolName:n}),this.ctx.get(Po).unregisterTool(`${r}.${n}`)}async clearAllServers(){this.unregisterAllTools();for(let r of this.MCPServersMap.keys())if(!this.MCPServersMap.get(r).isBlocked)try{await this.stopMCPServer(r)}catch(o){Kt.error(this.ctx,`Error stopping server ${r} during clearAllServers:`,o)}this.MCPServersMap.clear(),this.serverPrefixes.clear()}determineServerStatus(r){return r.isBlocked?"blocked":r.isStarting?"starting":r.server.isConnected?"running":r.hasError?"error":"stopped"}createServerSnapshot(r,n){return{name:r,prefix:this.getServerPrefix(r),status:this.determineServerStatus(n),tools:n.server?.getCachedTools()??[],resources:n.server?.getCachedResources()??[],resourceTemplates:n.server?.getCachedResourceTemplates()??[],prompts:n.server?.getCachedPrompts()??[],error:n.isBlocked?void 0:n.errorMessage,registryInfo:n.registryInfo,authInfo:n.isBlocked?void 0:n.authInfo}}updateAuthInfo(r,n,o,s){let c=this.MCPServersMap.get(r);c&&!c.isBlocked&&(c.authInfo={providerId:n,accountName:o,isDynamic:s})}removeServerAccountPreferences(r){let n=this.MCPServersMap.get(r);if(n?.isBlocked||!n?.authInfo){Kt.debug(this.ctx,`No auth info found for server ${r}, nothing to remove`);return}let{providerId:o}=n.authInfo;Kt.info(this.ctx,`Removing account preference for server ${r} with provider ${o}`),this.ctx.get(I2).removeAccountPreference(r,o),n.authInfo=void 0}async getAuthMetadata(r){try{return await new Ept(this.ctx).getMetadataFromOriginalUrl(r.url,r.requestInit?.headers)}catch(n){throw Kt.error(this.ctx,`Failed to get auth metadata for ${r.url}: ${n instanceof Error?n.message:String(n)}`,n),n}}async getToken(r,n,o,s,c){let l=this.ctx.get(Xh).getOrActivateProviderIdForServer(o);if(!l){let A=this.ctx.get(Xh).createAuthenticationProvider(o,s,c);if(!A&&(A=await this.ctx.get(Xh).createDynamicAuthenticationProvider(o,s,c),!A)){Kt.warn(this.ctx,`Failed to create authentication provider for server ${r} (authServer: ${o})`);return}l=A.id}let u=c?.scopes_supported||s.scopes_supported||[],d=await this.ctx.get(Xh).getSessions(l,u,{authorizationServer:o},!0),p=this.ctx.get(I2).getAccountPreference(r,l),h;p&&(h=d.find(A=>A.account.label===p));let m=this.ctx.get(Xh).getProvider(l),g=!!this.ctx.get(dE).getClientRegistration(l);if(d.length){if(h)return this.updateAuthInfo(r,l,h.account.label,g),h.accessToken;try{let A=m?.label||l,y="Sign in to another account",E=d.map(v=>({title:v.account.label}));E.push({title:y}),E.push({title:"Cancel"});let _=await this.ctx.get(gc).showInformationModal(`The MCP server ${r} wants to access a ${A} account, Select an account for ${r} to use`,...E);if(!_||_.title==="Cancel"){Kt.warn(this.ctx,"user cancelled the account selection");return}if(_.title!==y){let v=d.find(b=>b.account.label===_.title);if(!v){Kt.warn(this.ctx,"selected account not found in sessions");return}return this.ctx.get(I2).updateAccountPreference(r,l,v.account),this.updateAuthInfo(r,l,v.account.label,g),v.accessToken}}catch(A){Kt.error(this.ctx,"Failed during account selection:",A);return}}else try{if((await this.ctx.get(gc).showInformationModal(`The MCP Server Definition '${n}' wants to authenticate to ${m.label}.`,{title:"OK"},{title:"Cancel"}))?.title!=="OK"){Kt.warn(this.ctx,"user cancelled the authentication request");return}}catch(A){Kt.error(this.ctx,"Failed to show authentication request dialog:",A);return}try{let A=await m.createSession(u,{});return this.ctx.get(gc).showInformationMessageOnlyOnce("Authentication successful",`You have already authenticated with ${m.label}.`,{title:"OK"}),this.ctx.get(I2).updateAccountPreference(r,l,A.account),this.updateAuthInfo(r,l,A.account.label,g),A.accessToken}catch(A){Kt.error(this.ctx,`Failed to create authentication session for server ${r}:`,A),this.ctx.get(gc).showWarningMessageOnlyOnce("Authentication failed",`You need to restart the IDE to authenticate the MCP server again. ${A instanceof Error?A.message:String(A)}`);return}}};f();var X_i=de(Su());var Rht=class t extends S2{static{a(this,"CLSMCPRuntimeNotifier")}static{this.notificationType=new X_i.ProtocolNotificationType("copilot/mcpRuntimeLogs")}constructor(e){super(),this.ctx=e}async notifyLog(e){await this.ctx.get(Ar).connection.sendNotification(t.notificationType,{...e,time:Date.now()})}};f();var Z_i=de(Su());var X9a=new Z_i.ProtocolRequestType("copilot/readMcpSamplingConfig"),Pht=class extends gq{constructor(r){super();this.ctx=r}static{a(this,"CopilotMcpSamplingConfigSender")}async readMcpSamplingConfig(r){let n=this.ctx.get(Ar).connection,o;try{o=await n.sendRequest(X9a,r)}catch(l){throw new Error(`Request copilot/readMcpSamplingConfig failed with message: ${zl(l)}`)}let[s,c]=o;if(c)throw new Error(`Request copilot/readMcpSamplingConfig failed with code: ${c.code}, message: ${c.message}`);return s}};f();var Nht=de(Su());var Z9a=new Nht.ProtocolRequestType("copilot/showPanelMessageRequest"),e7a=new Nht.ProtocolNotificationType("copilot/showPanelMessage"),kht=class extends L0e{constructor(r){super();this.ctx=r}static{a(this,"CopilotMessageSender")}async sendPanelMessageNotification(r){return this.ctx.get(Ar).connection.sendNotification(e7a,r)}async sendPanelMessageRequest(r){let n=this.ctx.get(Ar).connection,o;try{o=await n.sendRequest(Z9a,r)}catch(l){throw new Error(`Request copilot/showPanelMessageRequest failed with message: ${zl(l)}`)}let[s,c]=o;if(c)throw new Error(`Request copilot/showPanelMessageRequest failed with code: ${c.code}, message: ${c.message}`);return s}};f();f();var t7a=new Se("fetcher"),r7a="https://default.exp-tas.com/",Dht=class extends dr{constructor(r,n,o,s){super();this.ctx=r;this.defaultFetcher=n;this.fallbackFetcher=o;this.onFallbackSuccess=s}static{a(this,"FallbackFetcher")}async fetch(r,n){try{return await this.defaultFetcher.fetch(r,n)}catch(o){if(ep(o)||`${r}/`.startsWith(r7a))throw o;t7a.info(this.ctx,`Request to <${r}> failed, attempting fallback.`,o);let s=await this.fallbackFetcher.fetch(r,n);return this.onFallbackSuccess(),s}}getImplementation(){return this.defaultFetcher.getImplementation()}get name(){return this.defaultFetcher.name}async disconnectAll(){return this.defaultFetcher.disconnectAll()}};var e1i=new Se("fetcher"),Mht=class extends dr{constructor(r,n=new P0e(r),o=new I0e(r)){super();this.ctx=r;this.helixFetcher=n;this.editorFetcher=o;this.updateFetcher=a(()=>{let r,n;if(!this.editorFetcherCapability)n="Using Helix fetcher, editor does not have fetch capability.",r=this.helixFetcher;else if(this.fetchStrategy==="client")n="Using editor fetcher, fetch strategy set to client.",r=this.editorFetcher;else if(this.fetchStrategy==="native")n="Using Helix fetcher, fetch strategy set to native.",r=this.helixFetcher;else{let o=vr(this.ctx,tt.DebugUseEditorFetcher);o?.toString()==="true"?(n="Using editor fetcher, debug flag is enabled.",r=this.editorFetcher):o?.toString()==="false"?(n="Using Helix fetcher, debug flag is disabled.",r=this.helixFetcher):(n="Editor fetcher capability available, will fallback if needed.",r=this.fallbackFetcher)}this.currentFetcher!=r&&(e1i.debug(this.ctx,n),this.currentFetcher=r)},"updateFetcher");this.currentFetcher=this.helixFetcher,this.fallbackFetcher=new Dht(r,n,o,()=>{e1i.info(this.ctx,"Fallback fetch succeeded, switching to editor fetcher."),this.currentFetcher=this.editorFetcher}),r.get(Fn).onDidSetCapabilities(this.updateFetcher),r.get(Qc).onDidChangeCopilotSettings(this.updateFetcher)}static{a(this,"AgentDelegatingFetcher")}get fetchStrategy(){return vr(this.ctx,tt.FetchStrategy)}get editorFetcherCapability(){return this.ctx.get(Fn).getCapabilities().fetch??!1}getImplementation(){return this.currentFetcher.getImplementation()}get name(){return this.currentFetcher.name}fetch(r,n){return this.currentFetcher.fetch(r,n)}async disconnectAll(){await Promise.all([this.helixFetcher.disconnectAll(),this.fallbackFetcher.disconnectAll()])}};f();var Bht=de(Nn());var Oht=class extends gc{constructor(r){super();this.ctx=r}static{a(this,"ConnectionNotificationSender")}get connection(){return this.ctx.get(Ar).connection}showWarningMessage(r,...n){return this.connection.window.showWarningMessage(r,...n)}showInformationMessage(r,...n){return this.connection.window.showInformationMessage(r,...n)}showInformationModal(r,...n){return this.connection.sendRequest(Bht.ShowMessageRequest.type,{type:Bht.MessageType.Info,message:r,actions:n,modal:!0}).then(o=>o||void 0)}async sendBackgroundAgentSessionUpdate(r,n){await this.connection.sendNotification("backgroundAgent/sessionUpdate",{sessionId:r,event:n})}};f();f();var Lht=class extends HUe{static{a(this,"AgentWorkspaceWatcher")}async getWatchedFiles(){return(await this.ctx.get(c5).getWatchedFiles({workspaceUri:this.workspaceFolder.uri,workspaceFolder:this.workspaceFolder,excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0})).watchedFiles}startWatching(){if(this.status==="ready")return;let e=this.ctx.get(c5);this._watcher=e.onDidChangeWatchedFiles(this.onDidChangeWatchedFilesHandler.bind(this)),this.status="ready"}stopWatching(){this.status="stopped",this._watcher?.dispose(),this._watcher=void 0}onDidChangeWatchedFilesHandler(e){if(e.workspaceFolder.uri!==this.workspaceFolder.uri)return;let n=e.created.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);if(n.length){let c=n.map(l=>l.document).filter(l=>l!==void 0);this.emitFilesCreated(c)}let o=e.changed.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);if(o.length){let c=o.map(l=>l.document).filter(l=>l!==void 0);this.emitFilesUpdated(c)}let s=e.deleted.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);s.length&&this.emitFilesDeleted(s.map(c=>({uri:c.uri})))}};var Fht=class extends Wg{static{a(this,"AgentWorkspaceWatcherProvider")}createWatcher(e){return new Lht(this.ctx,e)}shouldStartWatching(e){return!!this.ctx.get(Fn).getCapabilities().watchedFiles&&(!this.hasWatcher(e)||this.getStatus(e)==="stopped")}};function Uht(t){let e=new TC(process.env),r=Pgi(e);r.set(TC,e),r.set(dr,new Mht(r)),r.set(ya,new ya(r)),IAr(r,{});let n=Q6r();r.set(Si,n),r.set(Zh,new Zh(r));let o=new j0t;r.set(Jp,o);let s=new $5(r,n);r.set($5,s),r.set(en,new H4e(r,process.env)),r.set(Gv,new Gv(r)),r.set(uX,new uX(r)),r.set(i0,new i0(r,"agent")),r.set(Ks,fgi),r.set(Nr,new s9),r.set(gX,ngi()),r.set(Cl,new Cl),r.set(Xn,fAi),r.set(tm,new B0t(r)),r.set(ZW,new F0t(r)),r.set(Wg,new Fht(r)),r.set(c5,new c5(r)),r.set(P0,new P0),r.set(k0,zYe(r,R0i)),r.set(jC,new jC(r)),r.set(BN,new Sae),Ogi(r),Gqe(r),L6r(r),r.set(Ar,new Ar(r,t)),r.set(hk,new L0t(r)),r.set(gc,new Oht(r)),r.set(L0e,new kht(r)),r.set(gq,new Pht(r)),r.set(ip,new A0e(r)),r.set(Xs,new ipt(r));let c=new ZPe(r,t);r.set(ZPe,c),r.set(Cm,c),r.set(XPe,new XPe(r)),r.set(YPe,new YPe(r));let l=new hq(r);return r.set(zr,l),r.set(hq,l),r.set(jp,new k0e(r,process.env)),r.set(FI,new YX),r.set(bc,new bc(r)),oAi(r),Ngi(r),r.set(y2,new y2),r.set(cq,new cq),r.set(C2,new C2),r.set(lq,new lq([])),r.set(qv,new $0t),r.set(t1i.ObservableWorkspace,new Bfe(r,!0,!0)),r.set(JN,new D0e),r.set(_b,new _b(r)),r.set(Gm,new Adt(r)),r.set(ay,new npt(r)),r.set(ku,new rpt(r)),r.set(KT,new KT(r)),r.set(Po,new Po(r)),r.set(HO,new HO(r)),r.set(hw,new hw(r)),r.set(uw,new uw(r)),r.set(j$,new j$(r)),r.set(Gk,new Gk),r.set(_p,new _p),r.set(_2,new _2(r)),r.set(MA,new wht(r)),r.set(S2,new Rht(r)),r.set(FO,new FO(r)),r.set(I2,new spt(r)),r.set(oX,new oX),r.set(iX,new iX),r.set(Xh,new H0t(r)),r.set(dE,new q0t(r)),r.set(W3,new W3(r)),r.set(od,new od(r)),r.set(uy,new uy(r)),r.set(J1,new J1(r)),r.set(BO,new BO(r)),r.set($j,new $j),r.set(K1,new K1(r)),r.set(XT,new XT),r.set(pw,new pw(r)),r.set(qT,new $ne([new Vne,new Wne])),r.set(nX,new nX(r)),r.set(dy,new dy(r)),r.set(Lu,new Lu(r)),r.set(dk,new opt(r)),r.set(A2,new A2(r)),r.set(TI,new TI(r.get(A2),r)),r.set(Pk,new Pk(r)),r.set(Tb,new V0t(r)),r.set(yC,new yC(r.get(TI),r.get(Tb),r)),r.set(kk,new kk(r)),r}a(Uht,"createLanguageServerContext");var b5=new Se("ACP");async function r1i(t){let e=t.get(Ko);b5.info(t,`Starting Copilot ACP Agent v${e.getDisplayVersion()}`),t.get(TC).markReady(),t.get(qc).githubAppId=LSt,i7a(t),t.get(Fn).setCapabilities({subAgent:!0,cveRemediatorAgent:!1}),await t.get(Ot).primeToken()?b5.info(t,"Token primed successfully"):b5.warn(t,"Token priming failed - set GH_COPILOT_TOKEN or GITHUB_COPILOT_TOKEN environment variable"),t.get(i0).initialize(!0),jUr()?await n7a(t):(Kn(t,"acp.server.start",yt.createAndMarkAsIssued({acpPipeline:"internal"})),await n1i(t))}a(r1i,"startACPServer");async function n1i(t){b5.info(t,"Starting ACP server with internal pipeline");let e=mpe.Writable.toWeb(process.stdout),r=mpe.Readable.toWeb(process.stdin),n=A1e(e,r),o=new y1e(s=>new w0t(s,t),n);o.signal.addEventListener("abort",()=>{b5.info(t,"ACP connection closed"),process.exit(0)}),await o.closed}a(n1i,"startACPServerInternal");async function n7a(t){b5.info(t,"Starting ACP server with CLI proxy"),Kn(t,"acp.cli.discover");let e;try{e=await $Ur()}catch(u){let d=u instanceof Error?u.message:String(u);b5.warn(t,`CLI discovery failed, falling back to internal pipeline: ${d}`),V2(t,"acp.server.start",u,yt.createAndMarkAsIssued({acpPipeline:"internal-fallback"})),await n1i(t);return}let r=e.args.length>0?`${e.path} ${e.args.join(" ")}`:e.path;b5.info(t,`Found Copilot CLI: ${r} v${e.version}`),Kn(t,"acp.server.start",yt.createAndMarkAsIssued({acpPipeline:"cli",cliVersion:e.version,cliSource:e.source}));let n=new R0t(e,t),o=mpe.Writable.toWeb(process.stdout),s=mpe.Readable.toWeb(process.stdin),c=A1e(o,s),l=new y1e(u=>new k0t(u,t,n),c);l.signal.addEventListener("abort",()=>{b5.info(t,"ACP connection closed, disposing CLI process"),n.dispose().then(()=>{process.exit(0)})}),await l.closed}a(n7a,"startACPServerWithCLI");function i7a(t){let e=t.get(Po);e.registerTool(new ZF({name:"create_file",description:"Create a new file in the workspace with the specified content.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to create."}),content:S.String({description:"The content to write to the new file."})})})),e.registerTool(new ZF({name:"insert_edit_into_file",description:"Edit an existing file by inserting, replacing, or deleting content.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),content:S.Optional(S.String({description:"The new content for the file."})),edits:S.Optional(S.Array(S.Object({startLine:S.Number({description:"The starting line number (1-based)."}),endLine:S.Number({description:"The ending line number (1-based)."}),newContent:S.String({description:"The new content to replace the range with."})})))})})),e.registerTool(new ZF({name:"replace_string_in_file",description:"Replace a specific string in a file with a new string.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),oldString:S.String({description:"The string to find and replace."}),newString:S.String({description:"The string to replace it with."})})})),b5.info(t,"Registered ACP client tools: create_file, insert_edit_into_file, replace_string_in_file")}a(i7a,"registerACPClientTools");function i1i(){let e=Uht({onRequest:a(()=>{},"onRequest"),onNotification:a(()=>{},"onNotification"),listen:a(()=>{},"listen"),sendNotification:a(()=>{},"sendNotification"),sendRequest:a(()=>Promise.resolve({}),"sendRequest"),workspace:{onDidChangeWorkspaceFolders:a(()=>{},"onDidChangeWorkspaceFolders")},client:{register:a(()=>Promise.resolve({}),"register")},console:{log:a(()=>{},"log"),info:a(()=>{},"info"),warn:a(()=>{},"warn"),error:a(()=>{},"error")}}),r=new mq(e);return e.forceSet(ay,r),{ctx:e,acpToolInvoker:r}}a(i1i,"createACPContext");f();var K_r=require("events"),hNe=de(require("fs"));MLe();var qht=de(Su());f();var s1i=de(require("fs")),a1i=de(require("http")),gpe=de(require("path"));var Qht=class{constructor(e,r){this.port=e;let n;this.server=a1i.createServer((o,s)=>{if(o.headers.accept&&o.headers.accept=="text/event-stream")switch(s.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}),o.url){case"/stdin":r.on("read",l=>{o1i(s,JSON.stringify(l))});return;case"/stdout":r.on("write",l=>{o1i(s,JSON.stringify(l))});return;default:s.writeHead(404),s.end();return}s.writeHead(200,{"Content-Type":"text/html"});let c=__dirname;gpe.basename(__dirname)!=="debug"&&(c=gpe.dirname(__dirname)),n??=s1i.readFileSync(gpe.join(c,"dist","debugServer.html")).toString(),s.write(n),s.end()}),this.server.on("error",o=>{console.error(o)})}static{a(this,"DebugServer")}listen(){return this.server.listen(this.port),this}getPort(){return this.server.address().port}};function o1i(t,e){t.write("data: "+e.toString().replace(/\n/g,` +`&&n++}}return[e,r]}a(Y7a,"splitLines");var bpt=class extends Event{static{a(this,"ErrorEvent")}constructor(e,r){var n,o;super(e),this.code=(n=r?.code)!=null?n:void 0,this.message=(o=r?.message)!=null?o:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,r,n){return n(QCi(this),r)}[Symbol.for("Deno.customInspect")](e,r){return e(QCi(this),r)}};function K7a(t){let e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}a(K7a,"syntaxError");function HCr(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(HCr).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${HCr(t.cause)}`:t.message:`${t}`}a(HCr,"flattenError");function QCi(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}a(QCi,"inspectableError");var GCi=a(t=>{throw TypeError(t)},"__typeError"),JCr=a((t,e,r)=>e.has(t)||GCi("Cannot "+r),"__accessCheck"),hs=a((t,e,r)=>(JCr(t,e,"read from private field"),r?r.call(t):e.get(t)),"__privateGet"),Bp=a((t,e,r)=>e.has(t)?GCi("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),"__privateAdd"),Bu=a((t,e,r,n)=>(JCr(t,e,"write to private field"),e.set(t,r),r),"__privateSet"),B3=a((t,e,r)=>(JCr(t,e,"access private method"),r),"__privateMethod"),xC,UJ,_0e,vpt,Tpt,zPe,b0e,YPe,nq,C0e,T0e,v0e,VPe,v2,jCr,$Cr,VCr,qCi,WCr,zCr,WPe,YCr,KCr,QJ=class extends EventTarget{static{a(this,"EventSource")}constructor(e,r){var n,o;super(),Bp(this,v2),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Bp(this,xC),Bp(this,UJ),Bp(this,_0e),Bp(this,vpt),Bp(this,Tpt),Bp(this,zPe),Bp(this,b0e),Bp(this,YPe,null),Bp(this,nq),Bp(this,C0e),Bp(this,T0e,null),Bp(this,v0e,null),Bp(this,VPe,null),Bp(this,$Cr,async s=>{var c;hs(this,C0e).reset();let{body:l,redirected:u,status:d,headers:p}=s;if(d===204){B3(this,v2,WPe).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(u?Bu(this,_0e,new URL(s.url)):Bu(this,_0e,void 0),d!==200){B3(this,v2,WPe).call(this,`Non-200 status code (${d})`,d);return}if(!(p.get("content-type")||"").startsWith("text/event-stream")){B3(this,v2,WPe).call(this,'Invalid content type, expected "text/event-stream"',d);return}if(hs(this,xC)===this.CLOSED)return;Bu(this,xC,this.OPEN);let h=new Event("open");if((c=hs(this,VPe))==null||c.call(this,h),this.dispatchEvent(h),typeof l!="object"||!l||!("getReader"in l)){B3(this,v2,WPe).call(this,"Invalid response body, expected a web ReadableStream",d),this.close();return}let m=new TextDecoder,g=l.getReader(),A=!0;do{let{done:y,value:E}=await g.read();E&&hs(this,C0e).feed(m.decode(E,{stream:!y})),y&&(A=!1,hs(this,C0e).reset(),B3(this,v2,YCr).call(this))}while(A)}),Bp(this,VCr,s=>{Bu(this,nq,void 0),!(s.name==="AbortError"||s.type==="aborted")&&B3(this,v2,YCr).call(this,HCr(s))}),Bp(this,WCr,s=>{typeof s.id=="string"&&Bu(this,YPe,s.id);let c=new MessageEvent(s.event||"message",{data:s.data,origin:hs(this,_0e)?hs(this,_0e).origin:hs(this,UJ).origin,lastEventId:s.id||""});hs(this,v0e)&&(!s.event||s.event==="message")&&hs(this,v0e).call(this,c),this.dispatchEvent(c)}),Bp(this,zCr,s=>{Bu(this,zPe,s)}),Bp(this,KCr,()=>{Bu(this,b0e,void 0),hs(this,xC)===this.CONNECTING&&B3(this,v2,jCr).call(this)});try{if(e instanceof URL)Bu(this,UJ,e);else if(typeof e=="string")Bu(this,UJ,new URL(e,J7a()));else throw new Error("Invalid URL")}catch{throw K7a("An invalid or illegal string was specified")}Bu(this,C0e,Cpt({onEvent:hs(this,WCr),onRetry:hs(this,zCr)})),Bu(this,xC,this.CONNECTING),Bu(this,zPe,3e3),Bu(this,Tpt,(n=r?.fetch)!=null?n:globalThis.fetch),Bu(this,vpt,(o=r?.withCredentials)!=null?o:!1),B3(this,v2,jCr).call(this)}get readyState(){return hs(this,xC)}get url(){return hs(this,UJ).href}get withCredentials(){return hs(this,vpt)}get onerror(){return hs(this,T0e)}set onerror(e){Bu(this,T0e,e)}get onmessage(){return hs(this,v0e)}set onmessage(e){Bu(this,v0e,e)}get onopen(){return hs(this,VPe)}set onopen(e){Bu(this,VPe,e)}addEventListener(e,r,n){let o=r;super.addEventListener(e,o,n)}removeEventListener(e,r,n){let o=r;super.removeEventListener(e,o,n)}close(){hs(this,b0e)&&clearTimeout(hs(this,b0e)),hs(this,xC)!==this.CLOSED&&(hs(this,nq)&&hs(this,nq).abort(),Bu(this,xC,this.CLOSED),Bu(this,nq,void 0))}};xC=new WeakMap,UJ=new WeakMap,_0e=new WeakMap,vpt=new WeakMap,Tpt=new WeakMap,zPe=new WeakMap,b0e=new WeakMap,YPe=new WeakMap,nq=new WeakMap,C0e=new WeakMap,T0e=new WeakMap,v0e=new WeakMap,VPe=new WeakMap,v2=new WeakSet,jCr=a(function(){Bu(this,xC,this.CONNECTING),Bu(this,nq,new AbortController),hs(this,Tpt)(hs(this,UJ),B3(this,v2,qCi).call(this)).then(hs(this,$Cr)).catch(hs(this,VCr))},"connect_fn"),$Cr=new WeakMap,VCr=new WeakMap,qCi=a(function(){var t;let e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...hs(this,YPe)?{"Last-Event-ID":hs(this,YPe)}:void 0},cache:"no-store",signal:(t=hs(this,nq))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},"getRequestOptions_fn"),WCr=new WeakMap,zCr=new WeakMap,WPe=a(function(t,e){var r;hs(this,xC)!==this.CLOSED&&Bu(this,xC,this.CLOSED);let n=new bpt("error",{code:e,message:t});(r=hs(this,T0e))==null||r.call(this,n),this.dispatchEvent(n)},"failConnection_fn"),YCr=a(function(t,e){var r;if(hs(this,xC)===this.CLOSED)return;Bu(this,xC,this.CONNECTING);let n=new bpt("error",{code:e,message:t});(r=hs(this,T0e))==null||r.call(this,n),this.dispatchEvent(n),Bu(this,b0e,setTimeout(hs(this,KCr),hs(this,zPe)))},"scheduleReconnect_fn"),KCr=new WeakMap,QJ.CONNECTING=0,QJ.OPEN=1,QJ.CLOSED=2;function J7a(){let t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}a(J7a,"getBaseURL");f();function S0e(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):{...t}:{}}a(S0e,"normalizeHeaders");function Spt(t=fetch,e){return e?async(r,n)=>{let o={...e,...n,headers:n?.headers?{...S0e(e.headers),...S0e(n.headers)}:e.headers};return t(r,o)}:t}a(Spt,"createFetchWithInit");f();f();var XCr;XCr=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(t=>t.webcrypto);async function X7a(t){return(await XCr).getRandomValues(new Uint8Array(t))}a(X7a,"getRandomValues");async function Z7a(t){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r="",n=await X7a(t);for(let o=0;o128)throw`Expected a length between 43 and 128. Received ${t}.`;let e=await eUa(t),r=await tUa(e);return{code_verifier:e,code_challenge:r}}a(ZCr,"pkceChallenge");f();var sg=NLt().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:o8t.custom,message:"URL must be parseable",fatal:!0}),b_e}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),jCi=_0({resource:Me().url(),authorization_servers:br(sg).optional(),jwks_uri:Me().url().optional(),scopes_supported:br(Me()).optional(),bearer_methods_supported:br(Me()).optional(),resource_signing_alg_values_supported:br(Me()).optional(),resource_name:Me().optional(),resource_documentation:Me().optional(),resource_policy_uri:Me().url().optional(),resource_tos_uri:Me().url().optional(),tls_client_certificate_bound_access_tokens:Za().optional(),authorization_details_types_supported:br(Me()).optional(),dpop_signing_alg_values_supported:br(Me()).optional(),dpop_bound_access_tokens_required:Za().optional()}),e1r=_0({issuer:Me(),authorization_endpoint:sg,token_endpoint:sg,registration_endpoint:sg.optional(),scopes_supported:br(Me()).optional(),response_types_supported:br(Me()),response_modes_supported:br(Me()).optional(),grant_types_supported:br(Me()).optional(),token_endpoint_auth_methods_supported:br(Me()).optional(),token_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),service_documentation:sg.optional(),revocation_endpoint:sg.optional(),revocation_endpoint_auth_methods_supported:br(Me()).optional(),revocation_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),introspection_endpoint:Me().optional(),introspection_endpoint_auth_methods_supported:br(Me()).optional(),introspection_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),code_challenge_methods_supported:br(Me()).optional(),client_id_metadata_document_supported:Za().optional()}),rUa=_0({issuer:Me(),authorization_endpoint:sg,token_endpoint:sg,userinfo_endpoint:sg.optional(),jwks_uri:sg,registration_endpoint:sg.optional(),scopes_supported:br(Me()).optional(),response_types_supported:br(Me()),response_modes_supported:br(Me()).optional(),grant_types_supported:br(Me()).optional(),acr_values_supported:br(Me()).optional(),subject_types_supported:br(Me()),id_token_signing_alg_values_supported:br(Me()),id_token_encryption_alg_values_supported:br(Me()).optional(),id_token_encryption_enc_values_supported:br(Me()).optional(),userinfo_signing_alg_values_supported:br(Me()).optional(),userinfo_encryption_alg_values_supported:br(Me()).optional(),userinfo_encryption_enc_values_supported:br(Me()).optional(),request_object_signing_alg_values_supported:br(Me()).optional(),request_object_encryption_alg_values_supported:br(Me()).optional(),request_object_encryption_enc_values_supported:br(Me()).optional(),token_endpoint_auth_methods_supported:br(Me()).optional(),token_endpoint_auth_signing_alg_values_supported:br(Me()).optional(),display_values_supported:br(Me()).optional(),claim_types_supported:br(Me()).optional(),claims_supported:br(Me()).optional(),service_documentation:Me().optional(),claims_locales_supported:br(Me()).optional(),ui_locales_supported:br(Me()).optional(),claims_parameter_supported:Za().optional(),request_parameter_supported:Za().optional(),request_uri_parameter_supported:Za().optional(),require_request_uri_registration:Za().optional(),op_policy_uri:sg.optional(),op_tos_uri:sg.optional(),client_id_metadata_document_supported:Za().optional()}),$Ci=kr({...rUa.shape,...e1r.pick({code_challenge_methods_supported:!0}).shape}),VCi=kr({access_token:Me(),id_token:Me().optional(),token_type:Me(),expires_in:fCe.number().optional(),scope:Me().optional(),refresh_token:Me().optional()}).strip(),WCi=kr({error:Me(),error_description:Me().optional(),error_uri:Me().optional()}),HCi=sg.optional().or(vn("").transform(()=>{})),nUa=kr({redirect_uris:br(sg),token_endpoint_auth_method:Me().optional(),grant_types:br(Me()).optional(),response_types:br(Me()).optional(),client_name:Me().optional(),client_uri:sg.optional(),logo_uri:HCi,scope:Me().optional(),contacts:br(Me()).optional(),tos_uri:HCi,policy_uri:Me().optional(),jwks_uri:sg.optional(),jwks:KLt().optional(),software_id:Me().optional(),software_version:Me().optional(),software_statement:Me().optional()}).strip(),iUa=kr({client_id:Me(),client_secret:Me().optional(),client_id_issued_at:Js().optional(),client_secret_expires_at:Js().optional()}).strip(),zCi=nUa.merge(iUa),Dl0=kr({error:Me(),error_description:Me().optional()}).strip(),Nl0=kr({token:Me(),token_type_hint:Me().optional()}).strip();f();function YCi(t){let e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}a(YCi,"resourceUrlFromServerUrl");function KCi({requestedResource:t,configuredResource:e}){let r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length0&&(l=c.authorization_servers[0])}catch{}l||(l=new URL("/",e));let u=await fUa(e,t,c),d=await yUa(l,{fetchFn:s}),p=await Promise.resolve(t.clientInformation());if(!p){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");let E=d?.client_id_metadata_document_supported===!0,_=t.clientMetadataUrl;if(_&&!dUa(_))throw new jJ(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${_}`);if(E&&_)p={client_id:_},await t.saveClientInformation?.(p);else{if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let b=await bUa(l,{metadata:d,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(b),p=b}}let h=!t.redirectUrl;if(r!==void 0||h){let E=await vUa(t,l,{metadata:d,resource:u,authorizationCode:r,fetchFn:s});return await t.saveTokens(E),"AUTHORIZED"}let m=await t.tokens();if(m?.refresh_token)try{let E=await CUa(l,{metadata:d,clientInformation:p,refreshToken:m.refresh_token,resource:u,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof Lf)||E instanceof L3))throw E}let g=t.state?await t.state():void 0,{authorizationUrl:A,codeVerifier:y}=await EUa(l,{metadata:d,clientInformation:p,state:g,redirectUrl:t.redirectUrl,scope:n||c?.scopes_supported?.join(" ")||t.clientMetadata.scope,resource:u});return await t.saveCodeVerifier(y),await t.redirectToAuthorization(A),"REDIRECT"}a(n1r,"authInternal");function dUa(t){if(!t)return!1;try{let e=new URL(t);return e.protocol==="https:"&&e.pathname!=="/"}catch{return!1}}a(dUa,"isHttpsUrl");async function fUa(t,e,r){let n=YCi(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!KCi({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}a(fUa,"selectResourceURL");function I0e(t){let e=t.headers.get("WWW-Authenticate");if(!e)return{};let[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return{};let o=i1r(t,"resource_metadata")||void 0,s;if(o)try{s=new URL(o)}catch{}let c=i1r(t,"scope")||void 0,l=i1r(t,"error")||void 0;return{resourceMetadataUrl:s,scope:c,error:l}}a(I0e,"extractWWWAuthenticateParams");function i1r(t,e){let r=t.headers.get("WWW-Authenticate");if(!r)return null;let n=new RegExp(`${e}=(?:"([^"]+)"|([^\\s,]+))`),o=r.match(n);return o?o[1]||o[2]:null}a(i1r,"extractFieldFromWwwAuth");async function pUa(t,e,r=fetch){let n=await gUa(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw await n?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw await n.body?.cancel(),new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return jCi.parse(await n.json())}a(pUa,"discoverOAuthProtectedResourceMetadata");async function o1r(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?o1r(t,void 0,r):void 0;throw n}}a(o1r,"fetchWithCorsRetry");function hUa(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}a(hUa,"buildWellKnownPath");async function XCi(t,e,r=fetch){return await o1r(t,{"MCP-Protocol-Version":e},r)}a(XCi,"tryMetadataDiscovery");function mUa(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}a(mUa,"shouldAttemptFallback");async function gUa(t,e,r,n){let o=new URL(t),s=n?.protocolVersion??nN,c;if(n?.metadataUrl)c=new URL(n.metadataUrl);else{let u=hUa(e,o.pathname);c=new URL(u,n?.metadataServerUrl??o),c.search=o.search}let l=await XCi(c,s,r);if(!n?.metadataUrl&&mUa(l,o.pathname)){let u=new URL(`/.well-known/${e}`,o);l=await XCi(u,s,r)}return l}a(gUa,"discoverMetadataWithFallback");function AUa(t){let e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let o=e.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${o}`,e.origin),type:"oidc"}),n.push({url:new URL(`${o}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}a(AUa,"buildDiscoveryUrls");async function yUa(t,{fetchFn:e=fetch,protocolVersion:r=nN}={}){let n={"MCP-Protocol-Version":r,Accept:"application/json"},o=AUa(t);for(let{url:s,type:c}of o){let l=await o1r(s,n,e);if(l){if(!l.ok){if(await l.body?.cancel(),l.status>=400&&l.status<500)continue;throw new Error(`HTTP ${l.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return c==="oauth"?e1r.parse(await l.json()):$Ci.parse(await l.json())}}}a(yUa,"discoverAuthorizationServerMetadata");async function EUa(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:o,state:s,resource:c}){let l;if(e){if(l=new URL(e.authorization_endpoint),!e.response_types_supported.includes(t1r))throw new Error(`Incompatible auth server: does not support response type ${t1r}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(r1r))throw new Error(`Incompatible auth server: does not support code challenge method ${r1r}`)}else l=new URL("/authorize",t);let u=await ZCr(),d=u.code_verifier,p=u.code_challenge;return l.searchParams.set("response_type",t1r),l.searchParams.set("client_id",r.client_id),l.searchParams.set("code_challenge",p),l.searchParams.set("code_challenge_method",r1r),l.searchParams.set("redirect_uri",String(n)),s&&l.searchParams.set("state",s),o&&l.searchParams.set("scope",o),o?.includes("offline_access")&&l.searchParams.append("prompt","consent"),c&&l.searchParams.set("resource",c.href),{authorizationUrl:l,codeVerifier:d}}a(EUa,"startAuthorization");function _Ua(t,e,r){return new URLSearchParams({grant_type:"authorization_code",code:t,code_verifier:e,redirect_uri:String(r)})}a(_Ua,"prepareAuthorizationCodeRequest");async function e1i(t,{metadata:e,tokenRequestParams:r,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c}){let l=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t),u=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&r.set("resource",s.href),o)await o(u,r,l,e);else if(n){let p=e?.token_endpoint_auth_methods_supported??[],h=sUa(n,p);aUa(h,n,u,r)}let d=await(c??fetch)(l,{method:"POST",headers:u,body:r});if(!d.ok)throw await ZCi(d);return VCi.parse(await d.json())}a(e1i,"executeTokenRequest");async function CUa(t,{metadata:e,clientInformation:r,refreshToken:n,resource:o,addClientAuthentication:s,fetchFn:c}){let l=new URLSearchParams({grant_type:"refresh_token",refresh_token:n}),u=await e1i(t,{metadata:e,tokenRequestParams:l,clientInformation:r,addClientAuthentication:s,resource:o,fetchFn:c});return{refresh_token:n,...u}}a(CUa,"refreshAuthorization");async function vUa(t,e,{metadata:r,resource:n,authorizationCode:o,fetchFn:s}={}){let c=t.clientMetadata.scope,l;if(t.prepareTokenRequest&&(l=await t.prepareTokenRequest(c)),!l){if(!o)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!t.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let d=await t.codeVerifier();l=_Ua(o,d,t.redirectUrl)}let u=await t.clientInformation();return e1i(e,{metadata:r,tokenRequestParams:l,clientInformation:u??void 0,addClientAuthentication:t.addClientAuthentication,resource:n,fetchFn:s})}a(vUa,"fetchToken");async function bUa(t,{metadata:e,clientMetadata:r,fetchFn:n}){let o;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");o=new URL(e.registration_endpoint)}else o=new URL("/register",t);let s=await(n??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await ZCi(s);return zCi.parse(await s.json())}a(bUa,"registerClient");var cke=class extends Error{static{a(this,"SseError")}constructor(e,r,n){super(`SSE error: ${r}`),this.code=e,this.event=n}},Ipt=class{static{a(this,"SSEClientTransport")}constructor(e,r){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=r?.eventSourceInit,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Spt(r?.fetch,r?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new oE("No auth provider");let e;try{e=await F3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new oE;return await this._startOrAuth()}async _commonHeaders(){let e={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(e.Authorization=`Bearer ${n.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);let r=S0e(this._requestInit?.headers);return new Headers({...e,...r})}_startOrAuth(){let e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((r,n)=>{this._eventSource=new QJ(this._url.href,{...this._eventSourceInit,fetch:a(async(o,s)=>{let c=await this._commonHeaders();c.set("Accept","text/event-stream");let l=await e(o,{...s,headers:c});if(l.status===401&&l.headers.has("www-authenticate")){let{resourceMetadataUrl:u,scope:d}=I0e(l);this._resourceMetadataUrl=u,this._scope=d}return l},"fetch")}),this._abortController=new AbortController,this._eventSource.onerror=o=>{if(o.code===401&&this._authProvider){this._authThenStart().then(r,n);return}let s=new cke(o.code,o.message,o);n(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",o=>{let s=o;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(c){n(c),this.onerror?.(c),this.close();return}r()}),this._eventSource.onmessage=o=>{let s=o,c;try{c=$Q.parse(JSON.parse(s.data))}catch(l){this.onerror?.(l);return}this.onmessage?.(c)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new oE("No auth provider");if(await F3(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new oE("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{let r=await this._commonHeaders();r.set("content-type","application/json");let n={...this._requestInit,method:"POST",headers:r,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._endpoint,n);if(!o.ok){let s=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){let{resourceMetadataUrl:c,scope:l}=I0e(o);if(this._resourceMetadataUrl=c,this._scope=l,await F3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new oE;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${o.status}): ${s}`)}await o.body?.cancel()}catch(r){throw this.onerror?.(r),r}}setProtocolVersion(e){this._protocolVersion=e}};var xpt=class extends rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPSSEServer")}initTransport(r){let n=Ept(this.ctx,r),{url:o,...s}=n;return new Ipt(new URL(o),s)}};f();f();var j1i=de(G1i(),1),lke=de(require("node:process"),1),$1i=require("node:stream");f();var Rpt=class{static{a(this,"ReadBuffer")}append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(` +`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),KUa(r)}clear(){this._buffer=void 0}};function KUa(t){return $Q.parse(JSON.parse(t))}a(KUa,"deserializeMessage");function H1i(t){return JSON.stringify(t)+` +`}a(H1i,"serializeMessage");var JUa=lke.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function XUa(){let t={};for(let e of JUa){let r=lke.default.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}a(XUa,"getDefaultEnvironment");var Ppt=class{static{a(this,"StdioClientTransport")}constructor(e){this._readBuffer=new Rpt,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new $1i.PassThrough)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,j1i.default)(this._serverParams.command,this._serverParams.args??[],{env:{...XUa(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:lke.default.platform==="win32"&&ZUa(),cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=H1i(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}};function ZUa(){return"type"in lke.default}a(ZUa,"isElectron");var V1i=require("child_process"),W1i=require("util");var kpt=class extends rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPStdioServer")}initTransport(r){return r.env={...Uyi(),...r.env||{}},r.stderr="pipe",new Ppt(r)}addListeners(){super.addListeners(),this.transport&&this.transport.stderr&&this.transport.stderr.on("data",r=>{SJ(this.ctx,{message:`[server stderr] ${r.toString().trimEnd()}`,server:this.name})})}async cleanup(){if(this.transport){if(process.platform==="win32"){let r=null;"pid"in this.transport&&typeof this.transport.pid=="number"&&(r=this.transport.pid),r&&await this.forceKillWindowsProcess(r)}await super.cleanup()}}async forceKillWindowsProcess(r){try{let n=(0,W1i.promisify)(V1i.exec);Yt.info(this.ctx,`Force killing Windows process with PID ${r} for MCP server ${this.name}`),ma(this.ctx,{message:`Force killing Windows process with PID ${r}`,server:this.name}),await n(`taskkill /pid ${r} /t /f`,{timeout:1e4}),Yt.info(this.ctx,`Successfully force killed process ${r}`)}catch(n){Yt.debug(this.ctx,`Failed to kill process ${r} (process may not exist):`,n),Op(this.ctx,{message:`Failed to kill process ${r} (process may not exist): ${n instanceof Error?n.message:String(n)}`,server:this.name})}}};f();f();f();var Dpt=class extends TransformStream{static{a(this,"EventSourceParserStream")}constructor({onError:e,onRetry:r,onComment:n}={}){let o;super({start(s){o=Cpt({onEvent:a(c=>{s.enqueue(c)},"onEvent"),onError(c){e==="terminate"?s.error(c):typeof e=="function"&&e(c)},onRetry:r,onComment:n})},transform(s){o.feed(s)}})}};var eQa={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},uN=class extends Error{static{a(this,"StreamableHTTPError")}constructor(e,r){super(`Streamable HTTP error: ${r}`),this.code=e}},Npt=class{static{a(this,"StreamableHTTPClientTransport")}constructor(e,r){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Spt(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??eQa}async _authThenStart(){if(!this._authProvider)throw new oE("No auth provider");let e;try{e=await F3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(e!=="AUTHORIZED")throw new oE;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let n=await this._authProvider.tokens();n&&(e.Authorization=`Bearer ${n.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);let r=S0e(this._requestInit?.headers);return new Headers({...e,...r})}async _startOrAuthSse(e){let{resumptionToken:r}=e;try{let n=await this._commonHeaders();n.set("Accept","text/event-stream"),r&&n.set("last-event-id",r);let o=await(this._fetch??fetch)(this._url,{method:"GET",headers:n,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new uN(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,e,!0)}catch(n){throw this.onerror?.(n),n}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let r=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(n,e),o)}_scheduleReconnection(e,r=0){let n=this._reconnectionOptions.maxRetries;if(r>=n){this.onerror?.(new Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(s=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${s instanceof Error?s.message:String(s)}`)),this._scheduleReconnection(e,r+1)})},o)}_handleSseStream(e,r,n){if(!e)return;let{onresumptiontoken:o,replayMessageId:s}=r,c,l=!1,u=!1;a(async()=>{try{let p=e.pipeThrough(new TextDecoderStream).pipeThrough(new Dpt({onRetry:a(g=>{this._serverRetryMs=g},"onRetry")})).getReader();for(;;){let{value:g,done:A}=await p.read();if(A)break;if(g.id&&(c=g.id,l=!0,o?.(g.id)),!!g.data&&(!g.event||g.event==="message"))try{let y=$Q.parse(JSON.parse(g.data));IJ(y)&&(u=!0,s!==void 0&&(y.id=s)),this.onmessage?.(y)}catch(y){this.onerror?.(y)}}(n||l)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s},0)}catch(p){if(this.onerror?.(new Error(`SSE stream disconnected: ${p}`)),(n||l)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s},0)}catch(g){this.onerror?.(new Error(`Failed to reconnect: ${g instanceof Error?g.message:String(g)}`))}}},"processStream")()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new oE("No auth provider");if(await F3(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new oE("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,r){try{let{resumptionToken:n,onresumptiontoken:o}=r||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:X2e(e)?e.id:void 0}).catch(m=>this.onerror?.(m));return}let s=await this._commonHeaders();s.set("content-type","application/json"),s.set("accept","application/json, text/event-stream");let c={...this._requestInit,method:"POST",headers:s,body:JSON.stringify(e),signal:this._abortController?.signal},l=await(this._fetch??fetch)(this._url,c),u=l.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!l.ok){let m=await l.text().catch(()=>null);if(l.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new uN(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:g,scope:A}=I0e(l);if(this._resourceMetadataUrl=g,this._scope=A,await F3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new oE;return this._hasCompletedAuthFlow=!0,this.send(e)}if(l.status===403&&this._authProvider){let{resourceMetadataUrl:g,scope:A,error:y}=I0e(l);if(y==="insufficient_scope"){let E=l.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===E)throw new uN(403,"Server returned 403 after trying upscoping");if(A&&(this._scope=A),g&&(this._resourceMetadataUrl=g),this._lastUpscopingHeader=E??void 0,await F3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new oE;return this.send(e)}}throw new uN(l.status,`Error POSTing to endpoint: ${m}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,l.status===202){await l.body?.cancel(),xyi(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(m=>this.onerror?.(m));return}let p=(Array.isArray(e)?e:[e]).filter(m=>"method"in m&&"id"in m&&m.id!==void 0).length>0,h=l.headers.get("content-type");if(p)if(h?.includes("text/event-stream"))this._handleSseStream(l.body,{onresumptiontoken:o},!1);else if(h?.includes("application/json")){let m=await l.json(),g=Array.isArray(m)?m.map(A=>$Q.parse(A)):[$Q.parse(m)];for(let A of g)this.onmessage?.(A)}else throw await l.body?.cancel(),new uN(-1,`Unexpected content type: ${h}`);else await l.body?.cancel()}catch(n){throw this.onerror?.(n),n}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,r);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new uN(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,r){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:r?.onresumptiontoken})}};var uke=class extends rq{constructor(r,n,o){super(r,n,o);this.transport=null}static{a(this,"MCPStreamableServer")}initTransport(r){let n=Ept(this.ctx,r),{url:o,...s}=n;return new Npt(new URL(o),s)}};f();var Mpt=class extends T6{static{a(this,"McpLanguageModelTool")}constructor(e,r){super({...e,toolProvider:{id:e.serverName,displayNamePrefix:e.serverNamePrefix,displayName:e.serverName,description:e.serverName,isFirstPartyTool:!1},type:"mcp"}),this.invoker=r}prepareInvocation(e,r){let n={title:`Confirm MCP Tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,message:`Do you want to allow the external MCP tool "${this.toolProvider.displayName}/${this.displayName}" to run?`};return{progressMessage:`Running MCP tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`,confirmationMessages:n}}prepareCompletion(e,r){return{completionMessage:`Ran MCP tool: ${this.displayName} - ${this.toolProvider.displayName}(MCP Server)`}}async invoke(e,r,n){return await this.invoker(e,r,r.input,n)}async invokeConfirmation(e,r,n){if(n.isCancellationRequested)throw new Ec;let o={name:this.name,title:r.title,message:r.message,input:r.input,conversationId:e.conversation.id,turnId:e.turn.id,roundId:r.roundId,toolCallId:r.toolCallId,annotations:r.annotations};try{return await e.ctx.get(Cu).invokeClientToolConfirmation(e,o)}catch(s){throw new Error(`Failed to invoke client tool confirmation ${this.name}: ${String(s)}`)}}};var J1i=de(mu());f();var z1i="mcp-servers-cache",Y1i="mcp-first-boot-completed",Opt=class{static{a(this,"McpServerMetadataCache")}constructor(e){this.stateDb=e.get(Vh),this.initPromise=this.initialize()}async initialize(){await this.stateDb.waitForInitialization()}async isFirstBoot(){return await this.initPromise,this.stateDb.get(Y1i)!=="true"}async markFirstBootCompleted(){await this.initPromise,this.stateDb.set(Y1i,"true")}parseCache(){let e=this.stateDb.get(z1i);if(!e)return{};try{return JSON.parse(e)}catch{return{}}}async get(e){return await this.initPromise,this.parseCache()[e]}async store(e){await this.initPromise,this.stateDb.set(z1i,e)}};f();function K1i(t){let e=t.get(Dr).getEditorPluginInfo();if(e.name==="copilot-intellij"){let r=e.version.endsWith("nightly"),n=e.version==="42.0.0.0";return r||n}if(e.name==="copilot-xcode"){let r=e.version.split(".");if(r.length>=3){let[n,o,s]=r;return n==="0"&&o==="0"&&s==="0"||n==="0"&&s!=="0"}}if(e.name==="copilot-eclipse"){let r=e.version.endsWith("nightly"),n=e.version.endsWith("qualifier");return r||n}return!1}a(K1i,"isNightlyOrDevBuild");var Bpt=class t extends IA{constructor(r){super();this.MCPServersMap=new Map;this.updateServersQueue=Promise.resolve();this.serverOperationSequencer=new ure;this.prefixGenerator=new D0t;this.serverPrefixes=new Map;this.isMcpEnabled=!1;this.previousMcpAllowlist=!1;this.storedMCPServersConfig={};this.ctx=r,this.cache=new Opt(r),this.registryService=r.get(u2),Ps(this.ctx,async n=>{let o=this.isMcpEnabled;this.isMcpEnabled=this.isTokenMcpEnabled(n),o!==this.isMcpEnabled&&(Yt.info(this.ctx,`MCP state changed from ${o} to ${this.isMcpEnabled}`),this.registryService.clearAllCaches(),this.isMcpEnabled?await this.updateMCPServers(this.storedMCPServersConfig):(Yt.info(this.ctx,"MCP is disabled, clearing all servers and tools"),this.clearAllServers()))}),this.ctx.get(Fn).onDidSetCapabilities(n=>{let o=n.mcpAllowlist;o!==this.previousMcpAllowlist&&(this.previousMcpAllowlist=o,this.registryService.clearAllCaches(),this.isMcpEnabled&&(Yt.info(this.ctx,`mcpAllowlist changed to ${o}, updating MCP servers`),this.updateMCPServers(this.storedMCPServersConfig)))})}static{a(this,"CLSMCPManager")}static{this.contentsNotificationType=new J1i.ProtocolNotificationType("copilot/mcpTools")}isTokenMcpEnabled(r){if(!r)return!0;try{return r.getTokenValue("mcp")!=="0"}catch(n){return Yt.warn(this.ctx,`Error reading MCP value from token: ${n instanceof Error?n.message:String(n)}`),!0}}isAllowlistFeatureEnabled(){if(this.ctx.get(Fn).getCapabilities().mcpAllowlist)return Yt.debug(this.ctx,"Allowlist feature enabled via copilotCapabilities.mcpAllowlist"),!0;let n=K1i(this.ctx);return n||Yt.debug(this.ctx,"Allowlist feature disabled for stable version, only enabled for nightly/prerelease/dev (use copilotCapabilities.mcpAllowlist to override)"),n}ensureMcpEnabledOrThrow(r){if(!this.isMcpEnabled)throw new Error(`MCP is disabled, cannot ${r}`)}getActiveServerEntry(r){let n=this.MCPServersMap.get(r);if(!n)throw new Error(`MCP server ${r} does not exist`);if(n.isBlocked)throw new Error(`MCP server ${r} is blocked by registry`);return n}async ensureServerConnection(r,n,o){return n.server.isConnected?n.server:(Yt.info(this.ctx,`Auto-starting MCP server ${r} for ${o}`),await this.startMCPServer(r),this.getActiveServerEntry(r).server)}async updateMCPServers(r){if(this.storedMCPServersConfig=r,!this.isMcpEnabled)return;let n=this.ctx.get(Fn).getCapabilities().mcpServerManagement??!1,o=new Set(Object.keys(r)),s=new Set(this.MCPServersMap.keys()),c=!1;for(let u of s)o.has(u)||(await this.stopMCPServer(u),this.removeServerAccountPreferences(u),this.MCPServersMap.delete(u),this.serverPrefixes.delete(u),c=!0);c&&await this.persistAllServersCache();for(let u of o)if(!this.MCPServersMap.get(u)){let d=r[u],p=this.toManagedServerDefinition(u,d);if(this.isAllowlistFeatureEnabled()){let h=await this.registryService.validateServerConfig(u,d),{registryInfo:m,isBlocked:g,blockReason:A}=h;g?(this.addBlockedServer(p),Yt.info(this.ctx,`MCP server ${u} is blocked: ${A}`)):await this.addServer(p),m&&this.updateRegistryInfo(u,m)}else await this.addServer(p)}if((await this.cache.isFirstBoot()||!n)&&(await this.cache.markFirstBootCompleted(),o.size>0)){let u=Array.from(o).map(async d=>{try{await this.startServer(d);let p=this.MCPServersMap.get(d);p&&(p.hasError=!1,p.errorMessage=void 0,p.isStarting=!1)}catch(p){let h=this.MCPServersMap.get(d);h&&(h.hasError=!0,h.errorMessage=p instanceof Error?p.message:String(p),h.isStarting=!1),Yt.warn(this.ctx,`Failed to auto-start MCP server ${d} during first boot:`,p)}});await Promise.allSettled(u)}await this.updateServersList()}toManagedServerDefinition(r,n){let o=n.type,s="command"in n?"stdio":o??"streamable";return{...n,name:r,type:s}}addBlockedServer(r){this.MCPServersMap.set(r.name,{server:null,definition:r,hasError:!1,errorMessage:void 0,isStarting:!1,isBlocked:!0,authInfo:void 0})}updateRegistryInfo(r,n){let o=this.MCPServersMap.get(r);o&&(o.registryInfo=n)}getAllContents(r){return this.isMcpEnabled?this.getAllMCPServerCapabilities(r):[]}getAllMCPServerCapabilities(r){let n=[];for(let[o,s]of this.MCPServersMap)try{let c=this.createServerSnapshot(o,s);n.push(c)}catch(c){let l=`Failed to create snapshot for MCP server ${o}.`+(c instanceof Error?` message: ${c.message}`:` ${String(c)}`);Yt.error(this.ctx,l);let u={name:o,prefix:this.getServerPrefix(o),status:"error",tools:[],resources:[],resourceTemplates:[],prompts:[],error:l};n.push(u)}return r&&!r.isBuiltIn&&r.customTools?n.map(o=>(o.tools=o.tools.map(s=>{let c=this.createMcpLanguageModelTool(o.name,this.getServerPrefix(o.name),s);return s._status=r.customTools.includes(c.configurationKey)?"enabled":"disabled",s}),o)):n}async updateMCPToolsStatus(r,n){this.ensureMcpEnabledOrThrow("batch update tools status");for(let{serverName:o,toolName:s,status:c}of n){let d=this.getActiveServerEntry(o).server.getCachedTools().find(m=>m.name===s),p=this.getServerPrefix(o);if(!d){Yt.error(this.ctx,`Not found MCP ${o} server ${s} tool`);continue}Rye(r)&&(d._status=c),this.ctx.get(Io).getToolById(`${o}.${s}`)||this.registerTool(o,p,d)}await this.ctx.get(Io).updateToolsStatus(r,n.map(({serverName:o,toolName:s,status:c})=>({toolId:`${o}.${s}`,status:c}))),this.persistAllServersCache()}async callTool(r,n,o,s,c,l,u){this.ensureMcpEnabledOrThrow(`call tool ${r}.${n}`);let d=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,d,"tool call")).callTool(n,o,s,c,l,u)}async getPrompt(r,n,o){this.ensureMcpEnabledOrThrow(`get prompt ${r}.${n}`);let s=this.getActiveServerEntry(r),l=await(await this.ensureServerConnection(r,s,"get prompt")).getPrompt(n,o);return st(this.ctx,"mcp.getPrompt",Pt.createAndMarkAsIssued()),rr(this.ctx,"mcp.getPrompt"),l}async completePrompt(r,n,o,s,c){this.ensureMcpEnabledOrThrow(`complete prompt ${r}.${n}`);let l=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,l,"complete prompt")).completePrompt(n,o,s,c)}async readResource(r,n){this.ensureMcpEnabledOrThrow(`read resource from ${r}: ${n}`);let o=this.getActiveServerEntry(r);return await(await this.ensureServerConnection(r,o,"read resource")).readResource(n)}async startMCPServer(r){return this.ensureMcpEnabledOrThrow(`start server ${r}`),this.serverOperationSequencer.queue(r,async()=>{await this.startMCPServerInternal(r)})}async startMCPServerInternal(r){let n=this.getActiveServerEntry(r);if(n.server.isConnected){Yt.info(this.ctx,`MCP server ${r} is already running`);return}if(n.isStarting){Yt.info(this.ctx,`MCP server ${r} is already starting, skipping duplicate request`);return}n.isStarting=!0,await ma(this.ctx,{message:`Starting server ${r}`,server:r}),await this.updateServersList(!1),this.unregisterServerTools(r);try{await this.startServer(r);let o=this.MCPServersMap.get(r);o&&(o.hasError=!1,o.errorMessage=void 0,o.isStarting=!1)}catch(o){let s=this.MCPServersMap.get(r);throw s&&(s.hasError=!0,s.errorMessage=o instanceof Error?o.message:String(o),s.isStarting=!1),o}finally{this.registerServerTools(r),await this.updateServersList(!1)}}async stopMCPServer(r){return this.serverOperationSequencer.queue(r,async()=>{await this.stopMCPServerInternal(r)})}async stopMCPServerInternal(r){let n=this.getActiveServerEntry(r);if(n.isStarting){Yt.info(this.ctx,`MCP server ${r} is starting, cannot stop now`);return}await ma(this.ctx,{message:`Stopping server ${r}`,server:r}),n.server.getEmitter().removeAllListeners(NQ),n.server.isConnected&&await n.server.cleanup(),n.hasError=!1,n.errorMessage=void 0,n.isStarting=!1,await ma(this.ctx,{message:`Server ${r} stopped`,server:r}),await this.updateServersList(!1)}async restartMCPServer(r){return this.ensureMcpEnabledOrThrow(`restart server ${r}`),await ma(this.ctx,{message:`Restarting server ${r}`,server:r}),this.serverOperationSequencer.queue(r,async()=>{await this.stopMCPServerInternal(r),await new Promise(n=>setTimeout(n,100)),await this.startMCPServerInternal(r)})}async logoutMCPServer(r){return this.ensureMcpEnabledOrThrow(`logout server ${r}`),this.serverOperationSequencer.queue(r,async()=>{await ma(this.ctx,{message:`Logging out MCP server ${r}`,server:r}),await this.performLogout(r)})}async clearOAuthMCPServer(r){return this.ensureMcpEnabledOrThrow(`clear OAuth for server ${r}`),this.serverOperationSequencer.queue(r,async()=>{let o=this.getActiveServerEntry(r).authInfo?.providerId;if(!o){Yt.warn(this.ctx,`No OAuth provider found for server ${r}, nothing to clear`);return}await ma(this.ctx,{message:`Clearing OAuth provider registration for MCP server ${r}`,server:r}),await this.performLogout(r),Yt.info(this.ctx,`Unregistering provider ${o} for server ${r}`);try{await this.ctx.get(R3).unregisterProvider(o)}catch{Yt.debug(this.ctx,`Provider ${o} is not a dynamic OAuth provider, skipping unregistration`)}})}async performLogout(r){let n=this.getActiveServerEntry(r);if(n.authInfo){let{providerId:c,accountName:l}=n.authInfo;Yt.info(this.ctx,`Removing account preference and session for account ${l} on server ${r} with provider ${c}`),this.ctx.get(m2).removeAccountPreference(r,c);try{let u=this.ctx.get($h).getProvider(c),p=(await u.getSessions(void 0,{})).find(h=>h.account.label===l);p?(await u.removeSession(p.id),Yt.info(this.ctx,`Successfully removed session for account ${l}`)):Yt.warn(this.ctx,`No session found for account ${l}`)}catch(u){Yt.error(this.ctx,`Failed to remove session for account ${l}:`,u)}n.authInfo=void 0}await this.stopMCPServerInternal(r);let o=this.storedMCPServersConfig[r];if(!o){let c=`Original config not found for server ${r}`;throw Yt.error(this.ctx,c),new Error(c)}let s=this.toManagedServerDefinition(r,o);this.MCPServersMap.delete(r),await this.addServer(s),Yt.info(this.ctx,`Server ${r} logged out and restored to original configuration`),await this.updateServersList(!1)}async startServer(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;if(n.server.isConnected){Yt.info(this.ctx,`MCP server ${r} is already running`);return}let{server:o,definition:s}=n;try{o.getEmitter().on(NQ,()=>{this.unregisterServerTools(r),this.persistAllServersCache(),this.registerServerTools(r),this.notifyClient()}),await o.connect(s),await ma(this.ctx,{message:"Connection state: Running",server:r})}catch(c){Yt.error(this.ctx,`Error initializing MCP server ${r}:`,c);let l=c instanceof uN||c instanceof cke,u=l?c.code:void 0;if(l&&u!==void 0&&"url"in s&&s.type!=="sse"&&o instanceof uke&&u!==401&&u>=400&&u<500){let p=`${u} status sending message to ${s.url}, will attempt to fall back to legacy SSE`;Yt.info(this.ctx,p),ma(this.ctx,{message:p,server:r});let h={...s,name:r,type:"sse"};return await o.cleanup().catch(()=>{}),await this.updateServerDefinition(n,h),await this.startServer(r)}else if(l&&"url"in s&&u===401){let p=await this.getAuthMetadata(s),h=await this.getToken(s.name,s.url,p.authorizationServer,p.serverMetadata,p.resourceMetadata);if(!h){let g=`Failed to get token for server: ${r}`;throw Yt.error(this.ctx,g),new Error(g)}let m={...s,name:r,requestInit:{...s.requestInit??{},headers:{...s.requestInit?.headers??{},Authorization:`Bearer ${h}`}}};return await o.cleanup().catch(()=>{}),await this.updateServerDefinition(n,m),await this.startServer(r)}let d=c instanceof Error?`message: ${c.message} stack: ${c.stack}`:String(c);throw await Op(this.ctx,{message:d,server:r}),this.ctx.get(dc).showWarningMessageOnlyOnce(`${r}.initialize`,`Failed to initialize MCP server '${r}'. Please check the logs for more details.`),c}}async updateServersList(r=!0){return this.updateServersQueue=this.updateServersQueue.then(async()=>{r&&this.registerTools(),await this.notifyClient()}).catch(n=>{Yt.error(this.ctx,"updateServersList: Update failed",n)}),this.updateServersQueue}getServerPrefix(r){let n=this.serverPrefixes.get(r);if(n)return n;let o=this.prefixGenerator.generate(r);return this.serverPrefixes.set(r,o),o}async persistAllServersCache(){try{let r={};for(let[n,o]of this.MCPServersMap){let s=o.server?.getCachedTools()??[],c=o.server?.getCachedResources()??[],l=o.server?.getCachedResourceTemplates()??[],u=o.server?.getCachedPrompts()??[];r[n]={tools:s,resources:c,resourceTemplates:l,prompts:u}}await this.cache.store(r)}catch(r){Yt.error(this.ctx,"Failed to persist MCP servers cache:",r)}}createMCPServer(r){return r.type==="sse"?new xpt(this.ctx,r.name,r.version||"1.0.0"):r.type==="streamable"||"url"in r?new uke(this.ctx,r.name,r.version||"1.0.0"):new kpt(this.ctx,r.name,r.version||"1.0.0")}async addServer(r){let n=this.createMCPServer(r),o=await this.cache.get(r.name);o&&n.restoreCacheFromPersistence(o),this.MCPServersMap.set(r.name,{server:n,definition:r,hasError:!1,errorMessage:void 0,isStarting:!1,isBlocked:!1})}async updateServerDefinition(r,n){let o=this.createMCPServer(n),s=await this.cache.get(n.name);s&&o.restoreCacheFromPersistence(s),r.server=o,r.definition=n}async notifyClient(){let r=this.getAllContents();await this.ctx.get(Ar).connection.sendNotification(t.contentsNotificationType,{servers:r})}registerTools(){for(let[r]of this.MCPServersMap)this.registerServerTools(r)}registerServerTools(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;let o=this.getServerPrefix(r),s=n.server?.getCachedTools()??[];for(let c of s)this.registerTool(r,o,c)}unregisterServerTools(r){let n=this.MCPServersMap.get(r);if(!n||n.isBlocked)return;let o=n.server?.getCachedTools()??[];for(let s of o)this.unregisterTool(r,s.name)}registerTool(r,n,o){Yt.debug(this.ctx,"register MCP Tool:",{...o}),this.ctx.get(Io).registerTool(this.createMcpLanguageModelTool(r,n,o))}createMcpLanguageModelTool(r,n,o){let{name:s,description:c,inputSchema:l,_status:u,_nameForModel:d,annotations:p}=o;return new Mpt({serverName:r,serverNamePrefix:n,name:d,displayName:s,description:c||"",displayDescription:c||"",inputSchema:l,annotations:p,status:u},(h,m,g,A)=>(Yt.info(this.ctx,"copilot MCP Invoker:",r,s,g),this.callTool(r,s,g,A,h,m.roundId,m.toolCallId?.toString())))}unregisterAllTools(){for(let[r,n]of this.MCPServersMap){if(n.isBlocked)continue;let o=n.server?.getCachedTools()??[];for(let s of o)this.unregisterTool(r,s.name)}}unregisterTool(r,n){Yt.debug(this.ctx,"unregister MCP Tool:",{serverName:r,toolName:n}),this.ctx.get(Io).unregisterTool(`${r}.${n}`)}async clearAllServers(){this.unregisterAllTools();for(let r of this.MCPServersMap.keys())if(!this.MCPServersMap.get(r).isBlocked)try{await this.stopMCPServer(r)}catch(o){Yt.error(this.ctx,`Error stopping server ${r} during clearAllServers:`,o)}this.MCPServersMap.clear(),this.serverPrefixes.clear()}determineServerStatus(r){return r.isBlocked?"blocked":r.isStarting?"starting":r.server.isConnected?"running":r.hasError?"error":"stopped"}createServerSnapshot(r,n){return{name:r,prefix:this.getServerPrefix(r),status:this.determineServerStatus(n),tools:n.server?.getCachedTools()??[],resources:n.server?.getCachedResources()??[],resourceTemplates:n.server?.getCachedResourceTemplates()??[],prompts:n.server?.getCachedPrompts()??[],error:n.isBlocked?void 0:n.errorMessage,registryInfo:n.registryInfo,authInfo:n.isBlocked?void 0:n.authInfo}}updateAuthInfo(r,n,o,s){let c=this.MCPServersMap.get(r);c&&!c.isBlocked&&(c.authInfo={providerId:n,accountName:o,isDynamic:s})}removeServerAccountPreferences(r){let n=this.MCPServersMap.get(r);if(n?.isBlocked||!n?.authInfo){Yt.debug(this.ctx,`No auth info found for server ${r}, nothing to remove`);return}let{providerId:o}=n.authInfo;Yt.info(this.ctx,`Removing account preference for server ${r} with provider ${o}`),this.ctx.get(m2).removeAccountPreference(r,o),n.authInfo=void 0}async getAuthMetadata(r){try{return await new x0t(this.ctx).getMetadataFromOriginalUrl(r.url,r.requestInit?.headers)}catch(n){throw Yt.error(this.ctx,`Failed to get auth metadata for ${r.url}: ${n instanceof Error?n.message:String(n)}`,n),n}}async getToken(r,n,o,s,c){let l=this.ctx.get($h).getOrActivateProviderIdForServer(o);if(!l){let A=this.ctx.get($h).createAuthenticationProvider(o,s,c);if(!A&&(A=await this.ctx.get($h).createDynamicAuthenticationProvider(o,s,c),!A)){Yt.warn(this.ctx,`Failed to create authentication provider for server ${r} (authServer: ${o})`);return}l=A.id}let u=c?.scopes_supported||s.scopes_supported||[],d=await this.ctx.get($h).getSessions(l,u,{authorizationServer:o},!0),p=this.ctx.get(m2).getAccountPreference(r,l),h;p&&(h=d.find(A=>A.account.label===p));let m=this.ctx.get($h).getProvider(l),g=!!this.ctx.get(rE).getClientRegistration(l);if(d.length){if(h)return this.updateAuthInfo(r,l,h.account.label,g),h.accessToken;try{let A=m?.label||l,y="Sign in to another account",E=d.map(v=>({title:v.account.label}));E.push({title:y}),E.push({title:"Cancel"});let _=await this.ctx.get(dc).showInformationModal(`The MCP server ${r} wants to access a ${A} account, Select an account for ${r} to use`,...E);if(!_||_.title==="Cancel"){Yt.warn(this.ctx,"user cancelled the account selection");return}if(_.title!==y){let v=d.find(b=>b.account.label===_.title);if(!v){Yt.warn(this.ctx,"selected account not found in sessions");return}return this.ctx.get(m2).updateAccountPreference(r,l,v.account),this.updateAuthInfo(r,l,v.account.label,g),v.accessToken}}catch(A){Yt.error(this.ctx,"Failed during account selection:",A);return}}else try{if((await this.ctx.get(dc).showInformationModal(`The MCP Server Definition '${n}' wants to authenticate to ${m.label}.`,{title:"OK"},{title:"Cancel"}))?.title!=="OK"){Yt.warn(this.ctx,"user cancelled the authentication request");return}}catch(A){Yt.error(this.ctx,"Failed to show authentication request dialog:",A);return}try{let A=await m.createSession(u,{});return this.ctx.get(dc).showInformationMessageOnlyOnce("Authentication successful",`You have already authenticated with ${m.label}.`,{title:"OK"}),this.ctx.get(m2).updateAccountPreference(r,l,A.account),this.updateAuthInfo(r,l,A.account.label,g),A.accessToken}catch(A){Yt.error(this.ctx,`Failed to create authentication session for server ${r}:`,A),this.ctx.get(dc).showWarningMessageOnlyOnce("Authentication failed",`You need to restart the IDE to authenticate the MCP server again. ${A instanceof Error?A.message:String(A)}`);return}}};f();var X1i=de(mu());var Lpt=class t extends h2{static{a(this,"CLSMCPRuntimeNotifier")}static{this.notificationType=new X1i.ProtocolNotificationType("copilot/mcpRuntimeLogs")}constructor(e){super(),this.ctx=e}async notifyLog(e){await this.ctx.get(Ar).connection.sendNotification(t.notificationType,{...e,time:Date.now()})}};f();var Z1i=de(mu());var tQa=new Z1i.ProtocolRequestType("copilot/readMcpSamplingConfig"),Fpt=class extends HQ{constructor(r){super();this.ctx=r}static{a(this,"CopilotMcpSamplingConfigSender")}async readMcpSamplingConfig(r){let n=this.ctx.get(Ar).connection,o;try{o=await n.sendRequest(tQa,r)}catch(l){throw new Error(`Request copilot/readMcpSamplingConfig failed with message: ${Ql(l)}`)}let[s,c]=o;if(c)throw new Error(`Request copilot/readMcpSamplingConfig failed with code: ${c.code}, message: ${c.message}`);return s}};f();var Qpt=de(mu());var rQa=new Qpt.ProtocolRequestType("copilot/showPanelMessageRequest"),nQa=new Qpt.ProtocolNotificationType("copilot/showPanelMessage"),Upt=class extends Jfe{constructor(r){super();this.ctx=r}static{a(this,"CopilotMessageSender")}async sendPanelMessageNotification(r){return this.ctx.get(Ar).connection.sendNotification(nQa,r)}async sendPanelMessageRequest(r){let n=this.ctx.get(Ar).connection,o;try{o=await n.sendRequest(rQa,r)}catch(l){throw new Error(`Request copilot/showPanelMessageRequest failed with message: ${Ql(l)}`)}let[s,c]=o;if(c)throw new Error(`Request copilot/showPanelMessageRequest failed with code: ${c.code}, message: ${c.message}`);return s}};f();f();var iQa=new Se("fetcher"),oQa="https://default.exp-tas.com/",qpt=class extends dr{constructor(r,n,o,s){super();this.ctx=r;this.defaultFetcher=n;this.fallbackFetcher=o;this.onFallbackSuccess=s}static{a(this,"FallbackFetcher")}async fetch(r,n){try{return await this.defaultFetcher.fetch(r,n)}catch(o){if(Y0(o)||`${r}/`.startsWith(oQa))throw o;iQa.info(this.ctx,`Request to <${r}> failed, attempting fallback.`,o);let s=await this.fallbackFetcher.fetch(r,n);return this.onFallbackSuccess(),s}}getImplementation(){return this.defaultFetcher.getImplementation()}get name(){return this.defaultFetcher.name}async disconnectAll(){return this.defaultFetcher.disconnectAll()}};var evi=new Se("fetcher"),Gpt=class extends dr{constructor(r,n=new jfe(r),o=new Qfe(r)){super();this.ctx=r;this.helixFetcher=n;this.editorFetcher=o;this.updateFetcher=a(()=>{let r,n;if(!this.editorFetcherCapability)n="Using Helix fetcher, editor does not have fetch capability.",r=this.helixFetcher;else if(this.fetchStrategy==="client")n="Using editor fetcher, fetch strategy set to client.",r=this.editorFetcher;else if(this.fetchStrategy==="native")n="Using Helix fetcher, fetch strategy set to native.",r=this.helixFetcher;else{let o=vr(this.ctx,tt.DebugUseEditorFetcher);o?.toString()==="true"?(n="Using editor fetcher, debug flag is enabled.",r=this.editorFetcher):o?.toString()==="false"?(n="Using Helix fetcher, debug flag is disabled.",r=this.helixFetcher):(n="Editor fetcher capability available, will fallback if needed.",r=this.fallbackFetcher)}this.currentFetcher!=r&&(evi.debug(this.ctx,n),this.currentFetcher=r)},"updateFetcher");this.currentFetcher=this.helixFetcher,this.fallbackFetcher=new qpt(r,n,o,()=>{evi.info(this.ctx,"Fallback fetch succeeded, switching to editor fetcher."),this.currentFetcher=this.editorFetcher}),r.get(Fn).onDidSetCapabilities(this.updateFetcher),r.get(Mc).onDidChangeCopilotSettings(this.updateFetcher)}static{a(this,"AgentDelegatingFetcher")}get fetchStrategy(){return vr(this.ctx,tt.FetchStrategy)}get editorFetcherCapability(){return this.ctx.get(Fn).getCapabilities().fetch??!1}getImplementation(){return this.currentFetcher.getImplementation()}get name(){return this.currentFetcher.name}fetch(r,n){return this.currentFetcher.fetch(r,n)}async disconnectAll(){await Promise.all([this.helixFetcher.disconnectAll(),this.fallbackFetcher.disconnectAll()])}};f();var jpt=de(Dn());var Hpt=class extends dc{constructor(r){super();this.ctx=r}static{a(this,"ConnectionNotificationSender")}get connection(){return this.ctx.get(Ar).connection}showWarningMessage(r,...n){return this.connection.window.showWarningMessage(r,...n)}showInformationMessage(r,...n){return this.connection.window.showInformationMessage(r,...n)}showInformationModal(r,...n){return this.connection.sendRequest(jpt.ShowMessageRequest.type,{type:jpt.MessageType.Info,message:r,actions:n,modal:!0}).then(o=>o||void 0)}async sendBackgroundAgentSessionUpdate(r,n){await this.connection.sendNotification("backgroundAgent/sessionUpdate",{sessionId:r,event:n})}};f();f();var $pt=class extends J7e{static{a(this,"AgentWorkspaceWatcher")}async getWatchedFiles(){return(await this.ctx.get(KD).getWatchedFiles({workspaceUri:this.workspaceFolder.uri,workspaceFolder:this.workspaceFolder,excludeGitignoredFiles:!0,excludeIDEIgnoredFiles:!0})).watchedFiles}startWatching(){if(this.status==="ready")return;let e=this.ctx.get(KD);this._watcher=e.onDidChangeWatchedFiles(this.onDidChangeWatchedFilesHandler.bind(this)),this.status="ready"}stopWatching(){this.status="stopped",this._watcher?.dispose(),this._watcher=void 0}onDidChangeWatchedFilesHandler(e){if(e.workspaceFolder.uri!==this.workspaceFolder.uri)return;let n=e.created.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);if(n.length){let c=n.map(l=>l.document).filter(l=>l!==void 0);this.emitFilesCreated(c)}let o=e.changed.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);if(o.length){let c=o.map(l=>l.document).filter(l=>l!==void 0);this.emitFilesUpdated(c)}let s=e.deleted.filter(c=>!c.isRestricted&&!c.isUnknownFileExtension);s.length&&this.emitFilesDeleted(s.map(c=>({uri:c.uri})))}};var Vpt=class extends Ug{static{a(this,"AgentWorkspaceWatcherProvider")}createWatcher(e){return new $pt(this.ctx,e)}shouldStartWatching(e){return!!this.ctx.get(Fn).getCapabilities().watchedFiles&&(!this.hasWatcher(e)||this.getStatus(e)==="stopped")}};function Wpt(t){let e=new f_(process.env),r=RAi(e);r.set(f_,e),r.set(dr,new Gpt(r)),r.set(fa,new fa(r)),VAr(r,{});let n=UFr();r.set(Ti,n),r.set(Vh,new Vh(r));let o=new Xft;r.set($p,o);let s=new NN(r,n);r.set(NN,s),r.set(en,new q4e(r,process.env)),r.set(Rv,new Rv(r)),r.set(AJ,new AJ(r)),r.set(Jf,new Jf(r,"agent")),r.set(Vs,dAi),r.set(Dr,new NF),r.set(bJ,rAi()),r.set(pl,new pl),r.set(Jn,fyi),r.set(zh,new jft(r)),r.set(sW,new Vft(r)),r.set(Ug,new Vpt(r)),r.set(KD,new KD(r)),r.set(S0,new S0),r.set(I0,rYe(r,wpi)),r.set(D_,new D_(r)),r.set(T5,new Use),MAi(r),KQe(r),BFr(r),r.set(Ar,new Ar(r,t)),r.set(rk,new $ft(r)),r.set(dc,new Hpt(r)),r.set(Jfe,new Upt(r)),r.set(HQ,new Fpt(r)),r.set(Z0,new kfe(r)),r.set(Bs,new f0t(r));let c=new K2e(r,t);r.set(K2e,c),r.set(um,c),r.set(Y2e,new Y2e(r)),r.set(V2e,new V2e(r));let l=new qQ(r);return r.set(zr,l),r.set(qQ,l),r.set(Fp,new $fe(r,process.env)),r.set(II,new rX),r.set(Ac,new Ac(r)),oyi(r),kAi(r),r.set(a2,new a2),r.set(OQ,new OQ),r.set(l2,new l2),r.set(BQ,new BQ([])),r.set(wv,new Zft),r.set(tvi.ObservableWorkspace,new Kde(r,!0,!0)),r.set(U5,new Wfe),r.set(cb,new cb(r)),r.set(Dm,new Sut(r)),r.set(XA,new d0t(r)),r.set(Cu,new u0t(r)),r.set(FT,new FT(r)),r.set(Io,new Io(r)),r.set(S4,new S4(r)),r.set(nw,new nw(r)),r.set(Zx,new Zx(r)),r.set(Jj,new Jj(r)),r.set(Pk,new Pk),r.set(mp,new mp),r.set(u2,new u2(r)),r.set(IA,new Bpt(r)),r.set(h2,new Lpt(r)),r.set(_4,new _4(r)),r.set(m2,new h0t(r)),r.set(fJ,new fJ),r.set(dJ,new dJ),r.set($h,new Jft(r)),r.set(rE,new Yft(r)),r.set(R3,new R3(r)),r.set(Ju,new Ju(r)),r.set(ty,new ty(r)),r.set(F1,new F1(r)),r.set(y4,new y4(r)),r.set(XH,new XH),r.set(L1,new L1(r)),r.set(QT,new QT),r.set(rw,new rw(r)),r.set(RT,new ine([new one,new sne])),r.set(uJ,new uJ(r)),r.set(ry,new ry(r)),r.set(xu,new xu(r)),r.set(ZP,new p0t(r)),r.set(s2,new s2(r)),r.set(fI,new fI(r.get(s2),r)),r.set(yk,new yk(r)),r.set(db,new e0t(r)),r.set(s_,new s_(r.get(fI),r.get(db),r)),r.set(Ek,new Ek(r)),r}a(Wpt,"createLanguageServerContext");var dN=new Se("ACP");async function rvi(t){let e=t.get(Vo);dN.info(t,`Starting Copilot ACP Agent v${e.getDisplayVersion()}`),t.get(f_).markReady(),t.get(Oc).githubAppId=nIt,aQa(t),t.get(Fn).setCapabilities({subAgent:!0,cveRemediatorAgent:!1}),await t.get(Nt).primeToken()?dN.info(t,"Token primed successfully"):dN.warn(t,"Token priming failed - set GH_COPILOT_TOKEN or GITHUB_COPILOT_TOKEN environment variable"),t.get(Jf).initialize(!0),HQr()?await sQa(t):(rr(t,"acp.server.start",{acpPipeline:"internal"}),await nvi(t))}a(rvi,"startACPServer");async function nvi(t){dN.info(t,"Starting ACP server with internal pipeline");let e=R0e.Writable.toWeb(process.stdout),r=R0e.Readable.toWeb(process.stdin),n=hCe(e,r),o=new mCe(s=>new Bft(s,t),n);o.signal.addEventListener("abort",()=>{dN.info(t,"ACP connection closed"),process.exit(0)}),await o.closed}a(nvi,"startACPServerInternal");async function sQa(t){dN.info(t,"Starting ACP server with CLI proxy"),rr(t,"acp.cli.discover");let e;try{e=await jQr()}catch(u){let d=u instanceof Error?u.message:String(u);dN.warn(t,`CLI discovery failed, falling back to internal pipeline: ${d}`),Sa(t,"acp.server.start",u,{acpPipeline:"internal-fallback"}),await nvi(t);return}let r=e.args.length>0?`${e.path} ${e.args.join(" ")}`:e.path;dN.info(t,`Found Copilot CLI: ${r} v${e.version}`),rr(t,"acp.server.start",{acpPipeline:"cli",cliVersion:e.version,cliSource:e.source});let n=new Lft(e,t),o=R0e.Writable.toWeb(process.stdout),s=R0e.Readable.toWeb(process.stdin),c=hCe(o,s),l=new mCe(u=>new Uft(u,t,n),c);l.signal.addEventListener("abort",()=>{dN.info(t,"ACP connection closed, disposing CLI process"),n.dispose().then(()=>{process.exit(0)})}),await l.closed}a(sQa,"startACPServerWithCLI");function aQa(t){let e=t.get(Io);e.registerTool(new IF({name:"create_file",description:"Create a new file in the workspace with the specified content.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to create."}),content:S.String({description:"The content to write to the new file."})})})),e.registerTool(new IF({name:"insert_edit_into_file",description:"Edit an existing file by inserting, replacing, or deleting content.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),content:S.Optional(S.String({description:"The new content for the file."})),edits:S.Optional(S.Array(S.Object({startLine:S.Number({description:"The starting line number (1-based)."}),endLine:S.Number({description:"The ending line number (1-based)."}),newContent:S.String({description:"The new content to replace the range with."})})))})})),e.registerTool(new IF({name:"replace_string_in_file",description:"Replace a specific string in a file with a new string.",inputSchema:S.Object({filePath:S.String({description:"The absolute path of the file to edit."}),oldString:S.String({description:"The string to find and replace."}),newString:S.String({description:"The string to replace it with."})})})),dN.info(t,"Registered ACP client tools: create_file, insert_edit_into_file, replace_string_in_file")}a(aQa,"registerACPClientTools");function ivi(){let e=Wpt({onRequest:a(()=>{},"onRequest"),onNotification:a(()=>{},"onNotification"),listen:a(()=>{},"listen"),sendNotification:a(()=>{},"sendNotification"),sendRequest:a(()=>Promise.resolve({}),"sendRequest"),workspace:{onDidChangeWorkspaceFolders:a(()=>{},"onDidChangeWorkspaceFolders")},client:{register:a(()=>Promise.resolve({}),"register")},console:{log:a(()=>{},"log"),info:a(()=>{},"info"),warn:a(()=>{},"warn"),error:a(()=>{},"error")}}),r=new GQ(e);return e.forceSet(XA,r),{ctx:e,acpToolInvoker:r}}a(ivi,"createACPContext");f();var m1r=require("events"),dke=de(require("fs"));H3e();var Ypt=de(mu());f();var svi=de(require("fs")),avi=de(require("http")),P0e=de(require("path"));var zpt=class{constructor(e,r){this.port=e;let n;this.server=avi.createServer((o,s)=>{if(o.headers.accept&&o.headers.accept=="text/event-stream")switch(s.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}),o.url){case"/stdin":r.on("read",l=>{ovi(s,JSON.stringify(l))});return;case"/stdout":r.on("write",l=>{ovi(s,JSON.stringify(l))});return;default:s.writeHead(404),s.end();return}s.writeHead(200,{"Content-Type":"text/html"});let c=__dirname;P0e.basename(__dirname)!=="debug"&&(c=P0e.dirname(__dirname)),n??=svi.readFileSync(P0e.join(c,"dist","debugServer.html")).toString(),s.write(n),s.end()}),this.server.on("error",o=>{console.error(o)})}static{a(this,"DebugServer")}listen(){return this.server.listen(this.port),this}getPort(){return this.server.address().port}};function ovi(t,e){t.write("data: "+e.toString().replace(/\n/g,` data: `)+` -`)}a(o1i,"writeData");var J_r=class extends qht.AbstractMessageWriter{constructor(r,n){super();this.delegate=r;this.ev=n}static{a(this,"DebugMessageWriter")}async write(r){return this.ev.emit("write",r),this.delegate.write(r)}end(){this.ev.emit("end"),this.delegate.end()}},X_r=class extends qht.AbstractMessageReader{constructor(r,n){super();this.delegate=r;this.ev=n}static{a(this,"DebugMessageReader")}listen(r){return this.delegate.listen(n=>{this.ev.emit("read",n),r(n)})}};async function c1i(t,e,r){let n,o=parseInt(t.GH_COPILOT_DEBUG_UI_PORT??t.GITHUB_COPILOT_DEBUG_UI_PORT);if(!isNaN(o)){n??=new K_r.EventEmitter;let l=new Qht(o,n).listen();o===0&&await GAe(`http://localhost:${l.getPort()}`)}let s=t.GITHUB_COPILOT_RECORD??"",c;try{let l=Date.now().toString();s==="1"||s==="true"?c=hNe.openSync(`stdio${l}.log`,"w"):s&&s!=="0"&&s!=="false"&&(c=hNe.openSync(s.replaceAll("%s",l),"w"))}catch(l){console.error(l)}if(c){let l=a(u=>{c&&hNe.appendFile(c,u,d=>{d&&(c=void 0,console.error(d))})},"log");n??=new K_r.EventEmitter,n.on("read",u=>l(`<-- ${JSON.stringify(u)} +`)}a(ovi,"writeData");var g1r=class extends Ypt.AbstractMessageWriter{constructor(r,n){super();this.delegate=r;this.ev=n}static{a(this,"DebugMessageWriter")}async write(r){return this.ev.emit("write",r),this.delegate.write(r)}end(){this.ev.emit("end"),this.delegate.end()}},A1r=class extends Ypt.AbstractMessageReader{constructor(r,n){super();this.delegate=r;this.ev=n}static{a(this,"DebugMessageReader")}listen(r){return this.delegate.listen(n=>{this.ev.emit("read",n),r(n)})}};async function cvi(t,e,r){let n,o=parseInt(t.GH_COPILOT_DEBUG_UI_PORT??t.GITHUB_COPILOT_DEBUG_UI_PORT);if(!isNaN(o)){n??=new m1r.EventEmitter;let l=new zpt(o,n).listen();o===0&&await Qge(`http://localhost:${l.getPort()}`)}let s=t.GITHUB_COPILOT_RECORD??"",c;try{let l=Date.now().toString();s==="1"||s==="true"?c=dke.openSync(`stdio${l}.log`,"w"):s&&s!=="0"&&s!=="false"&&(c=dke.openSync(s.replaceAll("%s",l),"w"))}catch(l){console.error(l)}if(c){let l=a(u=>{c&&dke.appendFile(c,u,d=>{d&&(c=void 0,console.error(d))})},"log");n??=new m1r.EventEmitter,n.on("read",u=>l(`<-- ${JSON.stringify(u)} `)),n.on("write",u=>l(`--> ${JSON.stringify(u)} -`))}return n&&(e=new X_r(e,n),r=new J_r(r,n)),[e,r]}a(c1i,"wrapTransports");f();var Ght=de(require("fs/promises")),l1i=de(require("os")),u1i=de(require("path"));var o7a={tmpdir:a(()=>l1i.default.tmpdir(),"tmpdir"),isPkg:"pkg"in process};async function d1i(t=o7a){if(t.isPkg&&process.platform!=="win32"){let e=t.tmpdir();await Ght.mkdir(e,{recursive:!0}),process.env.TMPDIR=await Ght.mkdtemp(u1i.join(e,"github-copilot-"))}}a(d1i,"mitigateTempFolder");async function p1i(){let t=UUr(process.argv.slice(2)).version(new Ko().getDisplayVersion()).strict().option("debug",{type:"boolean",hidden:!0}).option("clientProcessId",{type:"string",hidden:!0}).option("stdio",{type:"boolean",describe:"Use stdio"}).option("acp",{type:"boolean",describe:"Run as Agent Client Protocol (ACP) agent"});"pkg"in process||t.option("node-ipc",{type:"boolean",describe:"Use node IPC",conflicts:"stdio"});let e=await t.parse();if(e.acp){let{ctx:l}=i1i();await r1i(l);return}let r,n;e["node-ipc"]?(r=new MI.IPCMessageReader(process),n=new MI.IPCMessageWriter(process)):e.stdio?(r=new MI.StreamMessageReader(process.stdin),n=new MI.StreamMessageWriter(process.stdout)):(console.error("error: required option '--stdio' not specified"),process.exit(1)),await d1i();try{let l=USt(),u=JSON.parse(await FX.readFile(mNe.join(l,"hosts.json"),"utf8")),d={};try{d=JSON.parse(await FX.readFile(mNe.join(l,"apps.json"),"utf8"))}catch{}let p=!1;for(let h of Object.keys(u)){let m=`${h}:${ex}`;d[m]||!u[h].user||!u[h].oauth_token||(d[m]={user:u[h].user,oauth_token:u[h].oauth_token,githubAppId:ex},p=!0)}p&&await FX.writeFile(mNe.join(l,"apps.json"),JSON.stringify(d)+` -`,"utf8"),await FX.rm(mNe.join(l,"hosts.json"),{force:!0})}catch{}let o=(0,MI.createConnection)(MI.ProposedFeatures.all,...await c1i(process.env,r,n)),s=Uht(o);console=q9r(s);let c=s.get(Ar);r.onClose(()=>c.onExit()),process.on("SIGINT",()=>{c.onExit().finally(()=>process.exit(130)).catch(()=>{})}),process.on("SIGTERM",()=>{c.onExit().finally(()=>process.exit(143)).catch(()=>{})}),F6r(s),c.listen()}a(p1i,"main");f1i.isMainThread?require.main===module&&p1i():(cFr()&&lFr(),MIt()&&Q9r());0&&(module.exports={getTokenizer,getTokenizerAsync,main}); +`))}return n&&(e=new A1r(e,n),r=new g1r(r,n)),[e,r]}a(cvi,"wrapTransports");f();var Kpt=de(require("fs/promises")),lvi=de(require("os")),uvi=de(require("path"));var cQa={tmpdir:a(()=>lvi.default.tmpdir(),"tmpdir"),isPkg:"pkg"in process};async function dvi(t=cQa){if(t.isPkg&&process.platform!=="win32"){let e=t.tmpdir();await Kpt.mkdir(e,{recursive:!0}),process.env.TMPDIR=await Kpt.mkdtemp(uvi.join(e,"github-copilot-"))}}a(dvi,"mitigateTempFolder");async function pvi(){let t=FQr(process.argv.slice(2)).version(new Vo().getDisplayVersion()).strict().option("debug",{type:"boolean",hidden:!0}).option("clientProcessId",{type:"string",hidden:!0}).option("stdio",{type:"boolean",describe:"Use stdio"}).option("acp",{type:"boolean",describe:"Run as Agent Client Protocol (ACP) agent"});"pkg"in process||t.option("node-ipc",{type:"boolean",describe:"Use node IPC",conflicts:"stdio"});let e=await t.parse();if(e.acp){let{ctx:l}=ivi();await rvi(l);return}let r,n;e["node-ipc"]?(r=new vI.IPCMessageReader(process),n=new vI.IPCMessageWriter(process)):e.stdio?(r=new vI.StreamMessageReader(process.stdin),n=new vI.StreamMessageWriter(process.stdout)):(console.error("error: required option '--stdio' not specified"),process.exit(1)),await dvi();try{let l=oIt(),u=JSON.parse(await $J.readFile(fke.join(l,"hosts.json"),"utf8")),d={};try{d=JSON.parse(await $J.readFile(fke.join(l,"apps.json"),"utf8"))}catch{}let p=!1;for(let h of Object.keys(u)){let m=`${h}:${GI}`;d[m]||!u[h].user||!u[h].oauth_token||(d[m]={user:u[h].user,oauth_token:u[h].oauth_token,githubAppId:GI},p=!0)}p&&await $J.writeFile(fke.join(l,"apps.json"),JSON.stringify(d)+` +`,"utf8"),await $J.rm(fke.join(l,"hosts.json"),{force:!0})}catch{}let o=(0,vI.createConnection)(vI.ProposedFeatures.all,...await cvi(process.env,r,n)),s=Wpt(o);console=Q7r(s);let c=s.get(Ar);r.onClose(()=>{c.onExit().finally(()=>process.exit(0)).catch(()=>{})}),process.on("SIGINT",()=>{c.onExit().finally(()=>process.exit(130)).catch(()=>{})}),process.on("SIGTERM",()=>{c.onExit().finally(()=>process.exit(143)).catch(()=>{})}),LFr(s),c.listen()}a(pvi,"main");fvi.isMainThread?require.main===module&&pvi():(a9r()&&c9r(),ext()&&U7r());0&&(module.exports={getTokenizer,getTokenizerAsync,main}); //!!! DO NOT modify, this file was COPIED from 'microsoft/vscode' /*! Bundled license information: @@ -3922,7 +3911,6 @@ undici/lib/web/websocket/frame.js: @azure/msal-node/dist/cache/serializer/Deserializer.mjs: @azure/msal-node/dist/internals.mjs: @azure/msal-node/dist/utils/Constants.mjs: -@azure/msal-node/dist/utils/NetworkUtils.mjs: @azure/msal-node/dist/network/HttpClient.mjs: @azure/msal-node/dist/error/ManagedIdentityErrorCodes.mjs: @azure/msal-node/dist/error/ManagedIdentityError.mjs: @@ -3934,10 +3922,13 @@ undici/lib/web/websocket/frame.js: @azure/msal-node/dist/crypto/HashUtils.mjs: @azure/msal-node/dist/crypto/PkceGenerator.mjs: @azure/msal-node/dist/crypto/CryptoProvider.mjs: +@azure/msal-node/dist/cache/CacheHelpers.mjs: @azure/msal-node/dist/cache/NodeStorage.mjs: @azure/msal-node/dist/cache/TokenCache.mjs: +@azure/msal-node/dist/error/ClientAuthErrorCodes.mjs: @azure/msal-node/dist/client/ClientAssertion.mjs: @azure/msal-node/dist/packageMetadata.mjs: +@azure/msal-node/dist/client/BaseClient.mjs: @azure/msal-node/dist/client/UsernamePasswordClient.mjs: @azure/msal-node/dist/protocol/Authorize.mjs: @azure/msal-node/dist/client/ClientApplication.mjs: @@ -3965,69 +3956,70 @@ undici/lib/web/websocket/frame.js: @azure/msal-node/dist/client/ManagedIdentityApplication.mjs: @azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs: @azure/msal-node/dist/index.mjs: - (*! @azure/msal-node v3.6.3 2025-07-08 *) + (*! @azure/msal-node v5.1.2 2026-04-01 *) @azure/msal-common/dist/utils/Constants.mjs: -@azure/msal-common/dist/error/AuthErrorCodes.mjs: +@azure/msal-common/dist/constants/AADServerParamKeys.mjs: @azure/msal-common/dist/error/AuthError.mjs: -@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs: +@azure/msal-common/dist/error/ClientConfigurationError.mjs: +@azure/msal-common/dist/utils/StringUtils.mjs: @azure/msal-common/dist/error/ClientAuthError.mjs: +@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs: +@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs: +@azure/msal-common/dist/request/ScopeSet.mjs: +@azure/msal-common/dist/request/RequestParameterBuilder.mjs: +@azure/msal-common/dist/utils/UrlUtils.mjs: @azure/msal-common/dist/crypto/ICrypto.mjs: @azure/msal-common/dist/logger/Logger.mjs: @azure/msal-common/dist/packageMetadata.mjs: @azure/msal-common/dist/authority/AuthorityOptions.mjs: -@azure/msal-common/dist/account/AuthToken.mjs: -@azure/msal-common/dist/utils/TimeUtils.mjs: -@azure/msal-common/dist/cache/utils/CacheHelpers.mjs: -@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs: -@azure/msal-common/dist/error/ClientConfigurationError.mjs: -@azure/msal-common/dist/utils/StringUtils.mjs: -@azure/msal-common/dist/request/ScopeSet.mjs: -@azure/msal-common/dist/account/ClientInfo.mjs: @azure/msal-common/dist/account/AccountInfo.mjs: -@azure/msal-common/dist/authority/AuthorityType.mjs: -@azure/msal-common/dist/account/TokenClaims.mjs: -@azure/msal-common/dist/authority/ProtocolMode.mjs: -@azure/msal-common/dist/cache/entities/AccountEntity.mjs: -@azure/msal-common/dist/utils/UrlUtils.mjs: +@azure/msal-common/dist/account/AuthToken.mjs: @azure/msal-common/dist/url/UrlString.mjs: @azure/msal-common/dist/authority/AuthorityMetadata.mjs: @azure/msal-common/dist/error/CacheErrorCodes.mjs: @azure/msal-common/dist/error/CacheError.mjs: +@azure/msal-common/dist/account/ClientInfo.mjs: +@azure/msal-common/dist/authority/AuthorityType.mjs: +@azure/msal-common/dist/account/TokenClaims.mjs: +@azure/msal-common/dist/authority/ProtocolMode.mjs: +@azure/msal-common/dist/cache/utils/AccountEntityUtils.mjs: @azure/msal-common/dist/cache/CacheManager.mjs: @azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs: @azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs: @azure/msal-common/dist/config/ClientConfiguration.mjs: +@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs: +@azure/msal-common/dist/utils/TimeUtils.mjs: +@azure/msal-common/dist/cache/utils/CacheHelpers.mjs: +@azure/msal-common/dist/telemetry/performance/PerformanceEvents.mjs: +@azure/msal-common/dist/utils/FunctionWrappers.mjs: +@azure/msal-common/dist/crypto/PopTokenGenerator.mjs: +@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs: +@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs: +@azure/msal-common/dist/error/ServerError.mjs: +@azure/msal-common/dist/utils/ProtocolUtils.mjs: +@azure/msal-common/dist/response/ResponseHandler.mjs: @azure/msal-common/dist/account/CcsCredential.mjs: -@azure/msal-common/dist/constants/AADServerParamKeys.mjs: -@azure/msal-common/dist/request/RequestParameterBuilder.mjs: +@azure/msal-common/dist/utils/ClientAssertionUtils.mjs: +@azure/msal-common/dist/network/RequestThumbprint.mjs: +@azure/msal-common/dist/network/ThrottlingUtils.mjs: +@azure/msal-common/dist/error/NetworkError.mjs: +@azure/msal-common/dist/protocol/Token.mjs: @azure/msal-common/dist/authority/OpenIdConfigResponse.mjs: @azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs: @azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs: -@azure/msal-common/dist/utils/FunctionWrappers.mjs: @azure/msal-common/dist/authority/RegionDiscovery.mjs: @azure/msal-common/dist/authority/Authority.mjs: @azure/msal-common/dist/authority/AuthorityFactory.mjs: -@azure/msal-common/dist/error/ServerError.mjs: -@azure/msal-common/dist/network/RequestThumbprint.mjs: -@azure/msal-common/dist/network/ThrottlingUtils.mjs: -@azure/msal-common/dist/error/NetworkError.mjs: -@azure/msal-common/dist/client/BaseClient.mjs: -@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs: -@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs: -@azure/msal-common/dist/utils/ProtocolUtils.mjs: -@azure/msal-common/dist/crypto/PopTokenGenerator.mjs: -@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs: -@azure/msal-common/dist/response/ResponseHandler.mjs: -@azure/msal-common/dist/utils/ClientAssertionUtils.mjs: @azure/msal-common/dist/client/AuthorizationCodeClient.mjs: @azure/msal-common/dist/client/RefreshTokenClient.mjs: @azure/msal-common/dist/client/SilentFlowClient.mjs: @azure/msal-common/dist/protocol/Authorize.mjs: +@azure/msal-common/dist/request/BaseAuthRequest.mjs: +@azure/msal-common/dist/error/AuthErrorCodes.mjs: @azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs: @azure/msal-common/dist/index-node.mjs: -@azure/msal-common/dist/index.mjs: - (*! @azure/msal-common v15.8.1 2025-07-08 *) + (*! @azure/msal-common v16.4.1 2026-04-01 *) yargs-parser/build/lib/string-utils.js: yargs-parser/build/lib/tokenize-arg-string.js: @@ -4059,4 +4051,3 @@ js-yaml/dist/js-yaml.mjs: (* v8 ignore next -- @preserve *) (* v8 ignore else -- @preserve *) */ -//# sourceMappingURL=main.js.map diff --git a/copilot/js/tfidfWorker.js b/copilot/js/tfidfWorker.js index 5238e8d4..4e356dc7 100644 --- a/copilot/js/tfidfWorker.js +++ b/copilot/js/tfidfWorker.js @@ -127,4 +127,3 @@ ${h.join(` @vscode/chat-lib/dist/src/_internal/util/vs/editor/common/core/range.js: (*!!! DO NOT modify, this file was COPIED from 'microsoft/vscode' *) */ -//# sourceMappingURL=tfidfWorker.js.map diff --git a/lua/copilot/util.lua b/lua/copilot/util.lua index 7f3fd776..a34fb7c4 100644 --- a/lua/copilot/util.lua +++ b/lua/copilot/util.lua @@ -21,7 +21,7 @@ function M.get_editor_info() editorPluginInfo = { name = "copilot.lua", -- reflects version of github/copilot-language-server-release - version = "1.467.0", + version = "1.470.0", }, } return info